1import{_ as Xe,u as et,r as g,a3 as tt,H as we,o as ot,A as ae,c as n,d as u,w as m,a as o,t as s,e as y,J as le,a4 as se,h as K,F as A,x as E,g as b,f as at,n as lt,C as st,q as rt,I as it,Q as re,l as S,m as z,P as ke,k as nt,j as ut,i as dt,s as i,S as ct,z as pt}from"./index-C2E9BOP-.js";import{a as mt}from"./progress-Dy_QQgD2.js";import{p as L}from"./promoter-CaFZ-apX.js";import{F as vt}from"./FlowStepper-CYn8l2i8.js";const gt={class:"workflow-content"},ht={key:0,class:"content-card project-info-stack"},ft={class:"form-section"},yt={class:"section-title"},bt={class:"form-row project-settings-row"},_t={class:"form-group flex-1"},wt={class:"form-label"},kt={class:"form-group flex-1"},St={class:"form-label"},Ct={class:"form-section"},Bt={class:"section-title"},$t={class:"section-desc"},Vt={class:"form-row"},Pt={class:"form-group flex-1"},At={class:"form-label"},Lt={class:"form-group flex-1"},Tt={class:"form-label"},It={class:"brand-intro-block"},Mt={class:"form-group"},xt={class:"form-label"},Nt={class:"form-hint"},Ht={key:0,class:"brand-intro-editor"},Ot=["placeholder"],Et={class:"brand-intro-count"},Rt={key:2,class:"uploaded-files"},jt={class:"files-header"},Ft={class:"files-size"},Ut={class:"file-name"},zt={key:0,class:"file-progress"},Dt={key:1,class:"file-size"},Wt={class:"form-section"},qt={class:"section-title"},Gt={class:"form-group logo-upload-group visual-logo-upload"},Zt={class:"form-label"},Kt={class:"logo-upload-container"},Jt={key:0,class:"logo-upload-zone has-logo"},Yt=["src"],Qt={class:"visual-assets-row"},Xt={class:"asset-upload-group"},eo={class:"form-label"},to={key:0,class:"asset-thumbnails"},oo={class:"thumbnails-header"},ao={class:"thumbnails-grid"},lo=["src","alt"],so={class:"asset-upload-group"},ro={class:"form-label"},io={key:0,class:"asset-thumbnails"},no={class:"thumbnails-header"},uo={class:"thumbnails-grid"},co=["src","alt"],po={key:2,class:"content-card strategy-stack"},mo={class:"form-section"},vo={class:"section-title"},go={class:"form-group"},ho={class:"form-label"},fo={class:"form-hint"},yo={class:"purpose-grid"},bo={class:"purpose-icon"},_o={key:0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},wo={key:1,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},ko={key:2,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},So={key:3,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},Co={key:4,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},Bo={key:5,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},$o={key:6,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},Vo={class:"purpose-title"},Po={class:"purpose-desc"},Ao={class:"custom-purpose-area"},Lo={class:"form-label"},To=["placeholder"],Io={class:"form-section"},Mo={class:"section-title"},xo={class:"form-hint"},No={class:"style-grid"},Ho=["onClick"],Oo={class:"style-thumbnail"},Eo=["src","alt"],Ro={class:"style-overlay"},jo={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Fo={class:"style-label"},Uo={class:"custom-style-below"},zo={class:"form-label"},Do=["placeholder"],Wo={class:"form-section settings-section"},qo={class:"section-title"},Go={class:"video-spec-row"},Zo={class:"setting-group-new"},Ko={class:"form-label"},Jo={class:"ratio-options-new"},Yo={key:0,width:"24",height:"16",viewBox:"0 0 24 16",fill:"none"},Qo={key:1,width:"12",height:"20",viewBox:"0 0 12 20",fill:"none"},Xo={class:"setting-group-new"},ea={class:"form-label"},ta={class:"ratio-options-new"},oa={key:0,"aria-hidden":"true"},aa={class:"setting-group-new"},la={class:"form-label"},sa={class:"duration-control"},ra={class:"duration-stepper"},ia={class:"strategy-lock-note"},na={class:"footer-bar"},ua={key:0,class:"video-preview-modal"},da={class:"video-preview-content"},ca={class:"video-preview-title"},pa={class:"video-player-container"},ma=["src"],va={class:"video-preview-actions"},ga={class:"restriction-modal-message"},ie=5*1024*1024,ha={__name:"PromoterModePage",setup(fa){var be;const J=nt();dt();const{t:h,locale:ne}=et(),{user:Y}=rt(),{showToast:$}=ut(),{showConfirm:Se}=pt(),D=g(!1),Ce=e=>{var t,r;if(e==="1080p"){const c=(t=Y.value)==null?void 0:t.account_type,v=(r=Y.value)==null?void 0:r.subscription_plan;if(c!=="business"&&(!v||v==="free"||v==="basic")){D.value=!0;return}}a.value.quality=e},V=g(1),Be=z(()=>V.value===1?"projectInfo":"creative"),_=g(null),C=g(!1),W=g(null),a=g({projectName:"",videoLanguage:"zh-TW",brandName:"",officialWebsite:"",marketingPurpose:"rules",customPurposeText:"",videoStyle:"epic",customStyleText:"",selectedVoice:"",aspectRatio:"16:9",duration:30,quality:((be=Y.value)==null?void 0:be.account_type)==="business"?"1080p":"720p",autoSubtitles:!0,smartBgm:!0}),$e=()=>{const e=new Date,t=e.getFullYear().toString()+String(e.getMonth()+1).padStart(2,"0")+String(e.getDate()).padStart(2,"0");return`${h("presenter.defaultProjectPrefix")}${t}`};a.value.projectName=$e();const Q=[{value:"rules",icon:"rules",label:"promoter.aiStrategy.purposes.rules",desc:"promoter.aiStrategy.purposes.rulesDesc",prompt:"Feature Highlight - Emphasize product features"},{value:"warm",icon:"warm",label:"promoter.aiStrategy.purposes.warm",desc:"promoter.aiStrategy.purposes.warmDesc",prompt:"Warm Recommendation - Create lifestyle scenarios"},{value:"pain",icon:"pain",label:"promoter.aiStrategy.purposes.pain",de
1sc:"promoter.aiStrategy.purposes.painDesc",prompt:"Pain Point Solution - Solve user problems"},{value:"social",icon:"social",label:"promoter.aiStrategy.purposes.social",desc:"promoter.aiStrategy.purposes.socialDesc",prompt:"Social Proof - Show testimonials and popularity"},{value:"identity",icon:"identity",label:"promoter.aiStrategy.purposes.identity",desc:"promoter.aiStrategy.purposes.identityDesc",prompt:"Identity Projection - Show ideal lifestyle"},{value:"action",icon:"action",label:"promoter.aiStrategy.purposes.action",desc:"promoter.aiStrategy.purposes.actionDesc",prompt:"Call to Action - Drive immediate purchase"},{value:"custom",icon:"custom",label:"promoter.aiStrategy.purposes.custom",desc:"promoter.aiStrategy.purposes.customDesc",prompt:""}],X=[{id:"epic",thumbnail:"/img/style1.png",label:"promoter.aiStrategy.styles.epic",prompt:"Cinematic, dramatic lighting, wide angles, epic scale"},{id:"simple",thumbnail:"/img/style2.png",label:"promoter.aiStrategy.styles.simple",prompt:"Clean, minimalist, bright lighting, simple composition"},{id:"dynamic",thumbnail:"/img/style3.png",label:"promoter.aiStrategy.styles.dynamic",prompt:"High contrast, bold colors, energetic composition"},{id:"warm",thumbnail:"/img/style4.png",label:"promoter.aiStrategy.styles.warm",prompt:"Soft lighting, warm color palette, cozy atmosphere"}
1,{id:"tech",thumbnail:"/img/style5.png",label:"promoter.aiStrategy.styles.tech",prompt:"Futuristic, blue/cyan tones, high-tech elements, sleek design"},{id:"documentary",thumbnail:"/img/style6.png",label:"promoter.aiStrategy.styles.documentary",prompt:"Natural lighting, realistic scenes, authentic environment"},{id:"luxury",thumbnail:"/img/style7.png",label:"promoter.aiStrategy.styles.luxury",prompt:"Luxurious, elegant, refined aesthetics, premium quality feel"},{id:"vintage",thumbnail:"/img/style8.png",label:"promoter.aiStrategy.styles.vintage",prompt:"Classic, nostalgic, vintage look, timeless appeal"},{id:"trendy",thumbnail:"/img/style9.png",label:"promoter.aiStrategy.styles.trendy",prompt:"Colorful, lively, trendy, energetic and playful vibes"},{id:"custom",thumbnail:"/img/style10.png",label:"promoter.aiStrategy.styles.custom",prompt:""}],T=g([]),ue=g(!1),Ve=e=>e&&{TW:"ð¹ð¼",CN:"ð¨ð³",HK:"ðð°",US:"ðºð¸",GB:"ð¬ð§",AU:"ð¦ðº",JP:"ð¯ðµ",KR:"ð°ð·",FR:"ð«ð·",DE:"ð©ðª",ES:"ðªð¸",IT:"ð®ð¹",BR:"ð§ð·",PT:"ðµð¹",RU:"ð·ðº",TH:"ð¹ð",VN:"ð»ð³",ID:"ð®ð©",MY:"ð²ð¾",IN:"ð®ð³",SA:"ð¸ð¦",NL:"ð³ð±",PL:"ðµð±",SE:"ð¸ðª",DK:"ð©ð°",FI:"ð«ð®",NO:"ð³ð´",TR:"ð¹ð·",IL:"ð®ð±",CZ:"ð¨ð¿",GR:"ð¬ð·",HU:"ððº",RO:"ð·ð´",SK:"ð¸ð°",UA:"ðºð¦",BG:"ð§ð¬",HR:"ðð·",PH:"ðµð","zh-TW":"ð¹ð¼","zh-CN":"ð¨ð³","yue-CN":"ðð°","en-US":"ðºð¸","en-GB":"ð¬ð§","en-AU":"ð¦ðº","ja-JP":"ð¯ðµ","ko-KR":"ð°ð·","fr-FR":"ð«ð·","de-DE":"ð©ðª","es-ES":"ðªð¸","it-IT":"ð®ð¹","pt-BR":"ð§ð·","pt-PT":"ðµð¹","ru-RU":"ð·ðº","th-TH":"ð¹ð","vi-VN":"ð»ð³","id-ID":"ð®ð©","ms-MY":"ð²ð¾","hi-IN":"ð®ð³","ar-SA":"ð¸ð¦","nl-NL":"ð³ð±","pl-PL":"ðµð±","sv-SE":"ð¸ðª","da-DK":"ð©ð°","fi-FI":"ð«ð®","no-NO":"ð³ð´","tr-TR":"ð¹ð·","he-IL":"ð®ð±","cs-CZ":"ð¨ð¿","el-GR":"ð¬ð·","hu-HU":"ððº","ro-RO":"ð·ð´","sk-SK":"ð¸ð°","uk-UA":"ðºð¦","bg-BG":"ð§ð¬","hr-HR":"ðð·","ca-ES":"ðªð¸","fil-PH":"ðµð"}[e]||"",de=async()=>{try{ue.value=!0;const e=a.value.videoLanguage,t=await it.get(`${re.TTS_VOICES}?type=gemini&language=${e}`);if(T.value=t.voices.map(r=>({id:r.voice_id,name:r.name||r.voice_id,type:r.type,gender:r.gender||"male",locale:r.locale,flag:Ve(r.locale),supported_languages:r.supported_languages||[]})),T.value.length>0&&!a.value.selectedVoice){const r=T.value.find(c=>c.id==="Kore");a.value.selectedVoice=r?r.id:T.value[0].id}console.log(`[PromoterMode] Loaded ${T.value.length} Gemini voices for language ${e}`),console.log("[PromoterMode] Male:",T.value.filter(r=>r.gender==="male").length,"Female:",T.value.filter(r=>r.gender==="female").length)}catch(e){console.error("Failed to fetch voices:",e)}finally{ue.value=!1}},Pe=[{value:"9:16",label:"9:16",preview:"9/16"},{value:"16:9",label:"16:9",preview:"16/9"}],B=g([]),R=g("text"),I=g(""),Ae=z(()=>[{key:"text",label:h("promoter.brandIntroTextMode")},{key:"file",label:h("promoter.brandIntroUploadMode")}]),M=g(null),q=g(null),x=g([]),N=g([]),ce=z(()=>a.value.projectName.trim().length>0||a.value.brandName.trim().length>0||a.value.officialWebsite.trim().length>0||I.value.trim().length>0||B.value.length>0||a.value.customPurposeText.trim().length>0||a.value.customStyleText.trim().length>0||M.value!==null||x.value.length>0||N.value.length>0),Le=z(()=>{const e=!!(a.value.officialWebsite.trim()||I.value.trim()||B.value.length),t=!a.value.officialWebsite.trim()||me(a.value.officialWebsite);return!!(a.value.projectName.trim()&&a.value.brandName.trim()&&e&&t)}),Te=z(()=>{const e=B.value.reduce((t,r)=>t+r.size,0);return he(e)});tt(async(e,t,r)=>{if(ce.value&&!C.value&&!await Se({message:h("common.unsavedChanges"),variant:"danger"})){r(!1);return}r()});const pe=e=>{ce.value&&!C.value&&(e.preventDefault(),e.returnValue="")};window.addEventListener("beforeunload",pe),we(()=>window.removeEventListener("beforeunload",pe));const me=e=>{try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}},Ie=async()=>
1{if(!a.value.projectName||!a.value.brandName){$(h("promoter.requiredFieldsAlert"),"warning");return}if(!a.value.officialWebsite&&!I.value.trim()&&B.value.length===0){$(h("promoter.brandIdentityRequiredAlert"),"warning");return}if(a.value.officialWebsite&&!me(a.value.officialWebsite)){$(h("promoter.invalidUrlAlert"),"warning");return}try{C.value=!0,W.value=null,await Me()}catch(e){W.value=e.message||h("promoter.brandAnalysis.failed"),console.error("Error in brand analysis:",e),$(`Failed to analyze brand: ${e.message}`,"error"),C.value=!1,V.value=2,window.scrollTo({top:0,behavior:"smooth"})}};let ee=null;const Me=async()=>{j.value=!0,G.value=0;let e=R.value==="text"?I.value.trim():"";if(B.value.length>0)try{const v=B.value.map(k=>k.file).filter(k=>k);if(v.length>0){const k=await L.extractTextFromFiles(v);k.text&&(e=k.text,console.log("[BrandAnalysis] Extracted text from files:",e.length,"chars"))}}catch(v){console.warn("[BrandAnalysis] Failed to extract text from files:",v)}const t={brand_name:a.value.brandName,official_website:a.value.officialWebsite,brand_intro:e,video_language:a.value.videoLanguage,locale:ne.value||"zh-TW"};ee=(await L.startStatelessBrandAnalysis(t)).session_id,console.log("[BrandAnalysis] Started stateless analysis with session:",ee);const c=`${ke}${re.STATELESS_BRAND_ANALYSIS_STREAM(ee)}`;return console.log("[BrandAnalysis] Connecting to stateless SSE:",c),new Promise((v,k)=>{w=new EventSource(c),w.onopen=()=>{console.log("[BrandAnalysis] Stateless SSE connection opened")},w.onmessage=H=>{try{const p=JSON.parse(H.data);if(console.log("[BrandAnalysis] SSE message:",p),p.progress!==void 0&&(G.value=mt(G.value,p.progress)),p.message,p.thought&&console.debug("[BrandAnalysis] Detail:",p.thought),p.status==="completed"){if(console.log("[BrandAnalysis] Stateless analysis completed"),console.log("[BrandAnalysis] Recommendations:",p.recommendations),p.result&&(ge.value=p.result,console.log("[BrandAnalysis] Stored brand guidelines:",p.result.length,"chars")),p.recommendations){const d=p.recommendations;d.purpose_prompts&&(F.value=d.purpose_prompts,console.log("[BrandAnalysis] Stored purpose prompts:",Object.keys(d.purpose_prompts))),d.style_prompts&&(U.value=d.style_prompts,console.log("[BrandAnalysis] Stored style prompts:",Object.keys(d.style_prompts))),d.best_purpose&&(a.value.marketingPurpose=d.best_purpose,console.log("[BrandAnalysis] Applied best purpose:",d.best_purpose)),d.best_style&&(a.value.videoStyle=d.best_style,console.log("[BrandAnalysis] Applied best style:",d.best_style)),ct(()=>{const P=a.value.marketingPurpose;F.value[P]&&(a.value.customPurposeText=F.value[P],console.log("[BrandAnalysis] Applied AI purpose prompt for:",P));const O=a.value.videoStyle;U.value[O]&&(a.value.customStyleText=U.value[O],console.log("[BrandAnalysis] Applied AI style prompt for:",O))})}w.close(),w=null,j.value=!1,C.value=!1,V.value=2,window.scrollTo({top:0,behavior:"smooth"}),v()}p.status==="failed"&&(console.error("[BrandAnalysis] Analysis failed:",p.message),w.close(),w=null,j.value=!1,C.value=!1,V.value=2,window.scrollTo({top:0,behavior:"smooth"}),v())}catch(p){console.error("[BrandAnalysis] Error parsing SSE message:",p)}},w.onerror=H=>{console.error("[BrandAnalysis] Stateless SSE error:",H),w.close(),w=null,j.value=!1,C.value=!1,V.value=2,window.scrollTo({top:0,behavior:"smooth"}),v()}})},xe=()=>{V.value=1,window.scrollTo({top:0,behavior:"smooth"})},ve=g(!1),te=g(null),j=g(!1),G=g(0);let w=null;const F=g({}),U=g({}),ge=g(null),Ne=async()=>{if(!C.value){C.value=!0,W.value=null;try{const e={project_name:a.value.projectName,video_language:a.value.videoLanguage,brand_name:a.value.brandName,official_website:a.value.officialWebsite||null,marketing_purpose:a.value.marketingPurpose,custom_purpose_text:a.value.customPurposeText||null,video_style:a.value.videoStyle,custom_style_text:a.value.customStyleText||null,selected_voice:a.value.selectedVoice,aspect_ratio:a.value.aspectRatio,duration:parseInt(a.value.duration),quality:a.value.quality,auto_subtitles:a.value.autoSubtitles,smart_bgm:a.value.smartBgm,brand_guidelines:ge.value||null,ui_language:ne.value||"zh-TW"};if(_.value)await L.updateProject(_.value,e);else{const t=await L.createProject(e);_.value=t.id,await Re()}J.push(`/promoter/${_.value}/setup`)}catch(e){C.value=!1,W.value=e.message||h("promoter.generateFailed"),$(`${h("promoter.aiStrategy.startGenerate")}: ${e.message}`,"error")}}},He=()=>{ve.value=!1,te.value=null},Oe=()=>{_.value&&J.push(`/promoter/${_.value}/edit`)},Ee=()=>{if(!_.value)return;const e=`${ke}${re.VIDEO_DOWNLOAD(_.value)}`,t=document.createElement("a");t.href=e,t.download=`${a.value.projectName||"video"}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Re=async()=>
1{if(_.value)try{for(const e of x.value)if(e.file&&!e.id){const t=await L.uploadProductImage(_.value,e.file);e.id=t.id}for(const e of N.value)if(e.file&&!e.id){const t=await L.uploadCharacterImage(_.value,e.file);e.id=t.id}for(const e of B.value)if(e.file&&!e.id){const t=await L.uploadBrandFile(_.value,e.file);e.id=t.id}q.value&&await L.uploadBrandLogo(_.value,q.value)}catch(e){throw console.error("Error uploading files:",e),e}},oe=g(null),he=e=>{if(e===0)return"0 B";const t=1024,r=["B","KB","MB","GB"],c=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,c)).toFixed(1))+" "+r[c]},je=e=>{const t=Array.isArray(e)?e:[e],r=[".pdf",".pptx",".docx"];t.filter(Boolean).forEach(c=>{const v="."+c.name.split(".").pop().toLowerCase();if(!r.includes(v)){$(h(v===".ppt"||v===".doc"?"promoter.legacyOfficeBrandFile":"promoter.invalidBrandFileFormat"),"error");return}B.value.push({name:c.name,size:c.size,progress:100,file:c})})},Fe=e=>{B.value.splice(e,1)},Ue=["image/png","image/jpeg","image/gif","image/webp"],Z=({code:e})=>{$(h(e==="TOO_LARGE"?"promoter.fileTooLarge":"promoter.invalidImageFormat"),"warning")},fe=e=>Ue.includes(e.type)?!0:($(h("promoter.invalidImageFormat"),"warning"),!1),ze=e=>{const t=Array.isArray(e)?e[0]:e;if(!t||!fe(t))return;q.value=t;const r=new FileReader;r.onload=c=>{M.value=c.target.result}
1,r.readAsDataURL(t)},De=()=>{confirm(h("promoter.confirmRemoveLogo"))&&(M.value=null,q.value=null)},ye=(e,t,r,c)=>{const v=(Array.isArray(e)?e:[e]).filter(Boolean),k=r-t.value.length;if(k<=0){$(h(c),"warning");return}const H=v.slice(0,k),p=v.length>k;H.forEach(d=>{if(!fe(d))return;const P=new FileReader;P.onload=O=>{t.value.push({preview:O.target.result,file:d})},P.readAsDataURL(d)}),p&&$(h(c),"warning")},We=e=>ye(e,x,6,"promoter.maxProductImages"),qe=e=>ye(e,N,4,"promoter.maxCharacterImages"),Ge=e=>{x.value.splice(e,1)},Ze=e=>{N.value.splice(e,1)};return ot(()=>{de();const e=Q.find(r=>r.value===a.value.marketingPurpose);e&&e.prompt&&!a.value.customPurposeText&&(a.value.customPurposeText=e.prompt);const t=X.find(r=>r.id===a.value.videoStyle);t&&t.prompt&&!a.value.customStyleText&&(a.value.customStyleText=t.prompt)}),ae(()=>a.value.videoLanguage,(e,t)=>{e&&e!==t&&(console.log(`[PromoterMode] Language changed from ${t} to ${e}, refetching voices...`),de())}),ae(()=>a.value.marketingPurpose,e=>{if(F.value[e])a.value.customPurposeText=F.value[e],console.log("[PromoterMode] Applied AI purpose prompt for:",e);else{const t=Q.find(r=>r.value===e);t&&t.prompt&&(a.value.customPurposeText=t.prompt)}}),ae(()=>a.value.videoStyle,e=>{if(U.value[e])a.value.customStyleText=U.value[e],console.log("[PromoterMode] Applied AI style prompt for:",e);else{const t=X.find(r=>r.id===e);t&&t.prompt&&(a.value.customStyleText=t.prompt)}}),we(()=>{w&&(console.log("[BrandAnalysis] Cleaning up EventSource on unmount"),w.close(),w=null),oe.value&&(oe.value.pause(),oe.value=null)}),(e,t)=>{const r=S("OvPageHeader"),c=S("OvBadge"),v=S("OvInput"),k=S("OvSelector"),H=S("OvTabs"),p=S("OvUpload"),d=S("OvButton"),P=S("OvRadio"),O=S("OvRange"),Ke=S("OvBackButton"),Je=S("OvOverlay"),Ye=S("OvPageShell"),Qe=S("OvDialog");return i(),n(A,null,[u(Ye,{size:"wide",class:"promoter-mode"},{default:m(()=>[u(r,{title:e.$t("createVideo.promoter.title"),subtitle:e.$t("createVideo.promoter.description"),stacked:""},null,8,["title","subtitle"]),o("div",gt,[u(vt,{current:Be.value},null,8,["current"]),V.value===1?(i(),n("div",ht,[o("section",ft,[o("h2",yt,s(e.$t("promoter.projectSettings")),1),o("div",bt,[o("div",_t,[o("label",wt,[y(s(e.$t("promoter.projectName"))+" ",1),u(c,{class:"required-pill",variant:"error",tone:"soft"},{default:m(()=>[y(s(e.$t("common.required")),1)]),_:1})]),u(v,{modelValue:a.value.projectName,"onUpdate:modelValue":t[0]||(t[0]=l=>a.value.projectName=l),placeholder:e.$t("presenter.projectNamePlaceholder"),maxlength:"50"},{suffix:m(()=>[y(s(a.value.projectName.length)+"/50",1)]),_:1},8,["modelValue","placeholder"])]),o("div",kt,[o("label",St,s(e.$t("presenter.videoLanguage")),1),u(k,{modelValue:a.value.videoLanguage,"onUpdate:modelValue":t[1]||(t[1]=l=>a.value.videoLanguage=l),options:[{value:"zh-TW",label:"ç¹é«ä¸æ"},{value:"zh-CN",label:"ç®ä½ä¸æ"},{value:"ja",label:"æ¥æ¬èª"},{value:"th",label:"ภาษาà¹à¸à¸¢"},{value:"en",label:"English"}]},null,8,["modelValue"])])])]),o("section",Ct,[o("h2",Bt,s(e.$t("promoter.brandIdentity")),1),o("p",$t,s(e.$t("promoter.brandIdentityDesc")),1
1),o("div",Vt,[o("div",Pt,[o("label",At,[y(s(e.$t("promoter.brandName"))+" ",1),u(c,{class:"required-pill",variant:"error",tone:"soft"},{default:m(()=>[y(s(e.$t("common.required")),1)]),_:1})]),u(v,{modelValue:a.value.brandName,"onUpdate:modelValue":t[2]||(t[2]=l=>a.value.brandName=l),placeholder:e.$t("promoter.brandNamePlaceholder")},null,8,["modelValue","placeholder"])]),o("div",Lt,[o("label",Tt,[y(s(e.$t("promoter.officialWebsite"))+" ",1),u(c,{class:"required-pill",variant:"error",tone:"soft"},{default:m(()=>[y(s(e.$t("common.required")),1)]),_:1})]),u(v,{type:"url",modelValue:a.value.officialWebsite,"onUpdate:modelValue":t[3]||(t[3]=l=>a.value.officialWebsite=l),placeholder:"https://"},null,8,["modelValue"])])]),o("div",It,[o("div",Mt,[o("label",xt,s(e.$t("promoter.brandIntro")),1),o("p",Nt,s(e.$t("promoter.brandIntroHelper")),1),u(H,{modelValue:R.value,"onUpdate:modelValue":t[4]||(t[4]=l=>R.value=l),items:Ae.value,mode:"segmented",tone:"brand",block:"",class:"brand-intro-tabs"},null,8,["modelValue","items"]),R.value==="text"?(i(),n("div",Ht,[le(o("textarea",{"onUpdate:modelValue":t[5]||(t[5]=l=>I.value=l),class:"custom-textarea",maxlength:"1500",rows:"5",placeholder:e.$t("promoter.brandIntroPlaceholder")},null,8,Ot),[[se,I.value]]),o("span",Et,s(I.value.length)+"/1500",1)])):(i(),K(p,{key:1,accept:".pdf,.pptx,.docx",multiple:"","max-size":10*1024*1024,"cta-text":e.$t("promoter.uploadBrandFile"),"hint-text":e.$t("promoter.uploadBrandFileHint"),onSelect:je,onError:Z},null,8,["cta-text","hint-text"])),R.value==="file"&&B.value.length>0?(i(),n("div",Rt,[o("div",jt,[o("span",null,s(e.$t("promoter.uploaded"))+" ("+s(B.value.length)+")",1),o("span",Ft,s(Te.value)+" / 10 MB",1)]),(i(!0),n(A,null,E(B.value,(l,f)=>(i(),n("div",{key:f,class:"file-item"},[t[16]||(t[16]=o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[o("path",{d:"M4 2H12L16 6V18H4V2Z",stroke:"#64748b","stroke-width":"1.5"}),o("path",{d:"M12 2V6H16",stroke:"#64748b","stroke-width":"1.5"})],-1)),o("span",Ut,s(l.name),1),l.progress<100?(i(),n("span",zt,s(e.$t("promoter.uploading"))+"..."+s(l.progress)+"% ",1)):(i(),n("span",Dt,s(he(l.size)),1)),u(d,{variant:"ghost",size:"sm","icon-only":"",class:"file-remove",onClick:_e=>Fe(f)},{icon:m(()=>[...t[15]||(t[15]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[o("path",{d:"M3 4H13M6 4V3C6 2.44772 6.44772 2 7 2H9C9.55228 2 10 2.44772 10 3V4M12 4V13C12 13.5523 11.5523 14 11 14H5C4.44772 14 4 13.5523 4 13V4H12Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)])]),_:1},8,["onClick"])]))),128))])):b("",!0)])])]),o("section",Wt,[o("h2",qt,s(e.$t("promoter.visualAssets")),1),o("div",Gt,[o("label",Zt,s(e.$t("promoter.brandLogo")),1),o("div",Kt,[M.value?(i(),n("div",Jt,[M.value?(i(),n("img",{key:0,src:M.value,alt:"Brand Logo",class:"logo-preview"},null,8,Yt)):b("",!0)])):(i(),K(p,{key:1,class:"compact-upload",accept:"image/png,image/jpeg,image/gif,image/webp","max-size":ie,"cta-text":e.$t("promoter.uploadCta"),"hint-text":e.$t("promoter.brandLogoHint"),onSelect:ze,onError:Z},null,8,["cta-text","hint-text"])),M.value?(i(),K(d,{key:2,variant:"danger","icon-only":"",pill:"",class:"logo-remove-btn",title:e.$t("promoter.removeLogo"),onClick:at(De,["stop"])},{icon:m(()=>[...t[17]||(t[17]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[o("path",{d:"M3 4H13M6 4V3C6 2.44772 6.44772 2 7 2H9C9.55228 2 10 2.44772 10 3V4M12 4V13C12 13.5523 11.5523 14 11 14H5C4.44772 14 4 13.5523 4 13V4H12Z",stroke:"white","stroke-width":"1.5","stroke-linecap":"round"})],-1)])]),_:1},8,["title"])):b("",!0)])]),o("div",Qt,[o("div",Xt,[o("label",eo,s(e.$t("promoter.productImages")),1),u(p,{class:"compact-upload",multiple:"",accept:"image/png,image/jpeg,image/gif,image/webp","max-size":ie,"cta-text":e.$t("promoter.uploadCta"),"hint-text":e.$t("promoter.productImagesHint"),onSelect:We,onError:Z},null,8,["cta-text","hint-text"]),x.value.length>0?(i(),n("div",to,[o("div",oo,s(e.$t("promoter.uploaded"))+" ("+s(x.value.length)+"/6) ",1),o("div",ao,[(i(!0),n(A,null,E(x.value,(l,f)=>(i(),n("div",{key:f,class:"thumbnail-item"},[o("img",{src:l.preview,alt:"Product "+(f+1)},null,8,lo),u(d,{variant:"ghost",size:"sm","icon-only":"",class:"thumbnail-remove",onClick:_e=>Ge(f)},{icon:m(()=>[...t[18]||(t[18]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[o("path",{d:"M3 4H13M6 4V3C6 2.44772 6.44772 2 7 2H9C9.55228 2 10 2.44772 10 3V4M12 4V13C12 13.5523 11.5523 14 11 14H5C4.44772 14 4 13.5523 4 13V4H12Z",stroke:"white","stroke-width":"1.5","stroke-linecap":"round"})],-1)])]),_:1},8,["onClick"])]))),128))])])):b("",!0)]),o("div",so,[o("label",ro,s(e.$t("promoter.characterImages")),1),u(p,{class:"compact-upload",multiple:"",accept:"image/png,image/jpeg,image/gif,image/webp","max-size":ie,"cta-text":e.$t("promoter.uploadCta"),"hint-text":e.$t("promoter.characterImagesHint"),onSelect:qe,onError:Z},null,8,["cta-text","hint-text"]),N.value.length>0?(i(),n("div",io,[o("div",no,s(e.$t("promoter.uploaded"))+" ("+s(N.value.length)+"/4) ",1),o("div",uo,[(i(!0),n(A,null,E(N.value,(l,f)=>(i(),n("div",{key:f,class:"thumbnail-item"},[o("img",{src:l.preview,alt:"Character "+(f+1)},null,8,co),u(d,{variant:"ghost",size:"sm","icon-only":"",class:"thumbnail-remove",onClick:_e=>Ze(f)},{icon:m(()=>[...t[19]||(t[19]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[o("path",{d:"M3 4H13M6 4V3C6 2.44772 6.44772 2 7 2H9C9.55228 2 10 2.44772 10 3V4M12 4V13C12 13.5523 11.5523 14 11 14H5C4.44772 14 4 13.5523 4 13V4H12Z",stroke:"white","stroke-width":"1.5","stroke-linecap":"round"})],-1)])]),_:1},8,["onClick"])]))),128))])])):b("",!0)])])])])):b("",!0),V.value===1?(i(),K(d,{key:1,variant:"gradient",size:"lg",block:"",pill:"",class:"submit-btn",disabled:!Le.value,loading:C.value,onClick:Ie},{default:m(()=>[y(s(e.$t("promoter.confirmCreate")),1)]),_:1},8,["disabled","loading"])):b("",!0),V.value===2?(i(),n("div",po,[o("section",mo,[o("h2",vo,s(e.$t("promoter.aiStrategy.title")),1),o("div",go,[o("label",ho,s(e.$t("promoter.aiStrategy.marketingPurpose")),1),o("p",fo,s(e.$t("promoter.aiStrategy.marketingPurposeHelper")),1),o("div",yo,[(i(),n(A,null,E(Q,l=>
1u(P,{key:l.value,modelValue:a.value.marketingPurpose,"onUpdate:modelValue":t[6]||(t[6]=f=>a.value.marketingPurpose=f),value:l.value,variant:"card",class:"purpose-card"},{default:m(()=>[o("span",bo,[l.icon==="rules"?(i(),n("svg",_o,[...t[20]||(t[20]=[o("rect",{x:"3",y:"3",width:"14",height:"14",rx:"2",stroke:"currentColor","stroke-width":"1.5"},null,-1),o("path",{d:"M7 7H13M7 10H13M7 13H10",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])):l.icon==="warm"?(i(),n("svg",wo,[...t[21]||(t[21]=[o("path",{d:"M10 18C10 18 3 13.5 3 8.5C3 5.46243 5.46243 3 8.5 3C9.5 3 10 3.5 10 3.5C10 3.5 10.5 3 11.5 3C14.5376 3 17 5.46243 17 8.5C17 13.5 10 18 10 18Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):l.icon==="pain"?(i(),n("svg",ko,[...t[22]||(t[22]=[o("circle",{cx:"10",cy:"10",r:"7",stroke:"currentColor","stroke-width":"1.5"},null,-1),o("path",{d:"M10 6V10L13 13",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])):l.icon==="social"?(i(),n("svg",So,[...t[23]||(t[23]=[o("circle",{cx:"7",cy:"7",r:"3",stroke:"currentColor","stroke-width":"1.5"},null,-1),o("circle",{cx:"13",cy:"13",r:"3",stroke:"currentColor","stroke-width":"1.5"},null,-1),o("path",{d:"M9.5 9.5L10.5 10.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])):l.icon==="identity"?(i(),n("svg",Co,[...t[24]||(t[24]=[o("path",{d:"M3 17L10 3L17 17H3Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),o("path",{d:"M10 10V13M10 15V15.01",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])):l.icon==="action"?(i(),n("svg",Bo,[...t[25]||(t[25]=[o("path",{d:"M13 3L17 7L13 11",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),o("path",{d:"M17 7H7C4.79086 7 3 8.79086 3 11V17",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])):l.icon==="custom"?(i(),n("svg",$o,[...t[26]||(t[26]=[o("path",{d:"M14 3L17 6L7 16H4V13L14 3Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):b("",!0)]),o("span",Vo,s(e.$t(l.label)),1),o("span",Po,s(e.$t(l.desc)),1)]),_:2},1032,["modelValue","value"])),64))]),o("div",Ao,[o("label",Lo,s(e.$t("promoter.aiStrategy.customPurposeLabel")),1),le(o("textarea",{"onUpdate:modelValue":t[7]||(t[7]=l=>a.value.customPurposeText=l),placeholder:e.$t("promoter.aiStrategy.customPurposePlaceholder"),class:"custom-textarea",rows:"4"},null,8,To),[[se,a.value.customPurposeText]])])])]),o("section",Io,[o("h2",Mo,s(e.$t("promoter.aiStrategy.videoStyle")),1),o("p",xo,s(e.$t("promoter.aiStrategy.videoStyleHelper")),1),o("div",No,[(i(),n(A,null,E(X,l=>o("div",{key:l.id,class:lt(["style-card",{selected:a.value.videoStyle===l.id}]),onClick:f=>a.value.videoStyle=l.id},[o("div",Oo,[o("img",{src:l.thumbnail,alt:e.$t(l.label)},null,8,Eo),o("div",Ro,[a.value.videoStyle===l.id?(i(),n("svg",jo,[...t[27]||(t[27]=[o("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-brand-primary)"},null,-1),o("path",{d:"M8 12L11 15L16 9",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):b("",!0)])]),o("span",Fo,s(e.$t(l.label)),1)],10,Ho)),64))]),o("div",Uo,[o("label",zo,s(e.$t("promoter.aiStrategy.customStyleLabel")),1),le(o("textarea",{"onUpdate:modelValue":t[8]||(t[8]=l=>a.value.customStyleText=l),placeholder:e.$t("promoter.aiStrategy.customStylePlaceholder"),class:"custom-textarea",rows:"3"},null,8,Do),[[se,a.value.customStyleText]])])]),o("section",Wo,[o("h2",qo,s(e.$t("promoter.aiStrategy.videoSettings")),1),o("div",Go,[o("div",Zo,[o("label",Ko,s(e.$t("promoter.aiStrategy.aspectRatio")),1),o("div",Jo,[(i(),n(A,null,E(Pe,l=>u(P,{key:l.value,modelValue:a.value.aspectRatio,"onUpdate:modelValue":t[9]||(t[9]=f=>a.value.aspectRatio=f),value:l.value,variant:"segment",class:"ratio-btn-new"},{default:m(()=>[l.value==="16:9"?(i(),n("svg",Yo,[...t[28]||(t[28]=[o("rect",{x:"1",y:"1",width:"22",height:"14",rx:"2",stroke:"currentColor","stroke-width":"1.5"},null,-1)])])):l.value==="9:16"?(i(),n("svg",Qo,[...t[29]||(t[29]=[o("rect",{x:"1",y:"1",width:"10",height:"18",rx:"2",stroke:"currentColor","stroke-width":"1.5"},null,-1)])])):b("",!0),o("span",null,s(l.label),1)]),_:2},1032,["modelValue","value"])),64))])]),o("div",Xo,[o("label",ea,s(e.$t("promoter.creativeSettings.qualitySection")),1),o("div",ta,[(i(),n(A,null,E(["720p","1080p"],l=>
1u(P,{key:l,"model-value":a.value.quality,value:l,variant:"segment",class:"ratio-btn-new",onChange:Ce},{default:m(()=>[o("span",null,s(l),1),l==="1080p"?(i(),n("span",oa,"â
")):b("",!0)]),_:2},1032,["model-value","value"])),64))])])]),o("div",aa,[o("label",la,s(e.$t("promoter.aiStrategy.duration")),1),o("div",sa,[u(O,{modelValue:a.value.duration,"onUpdate:modelValue":t[10]||(t[10]=l=>a.value.duration=l),min:15,max:90,step:15},null,8,["modelValue"]),o("div",ra,[u(d,{variant:"ghost",size:"sm","icon-only":"","aria-label":e.$t("promoter.aiStrategy.durationDecrease"),onClick:t[11]||(t[11]=l=>a.value.duration=Math.max(15,a.value.duration-15))},{icon:m(()=>[...t[30]||(t[30]=[y("â",-1)])]),_:1},8,["aria-label"]),o("span",null,s(a.value.duration)+"s",1),u(d,{variant:"ghost",size:"sm","icon-only":"","aria-label":e.$t("promoter.aiStrategy.durationIncrease"),onClick:t[12]||(t[12]=l=>a.value.duration=Math.min(90,a.value.duration+15))},{icon:m(()=>[...t[31]||(t[31]=[y("ï¼",-1)])]),_:1},8,["aria-label"])])])])])])):b("",!0),V.value===2?(i(),n(A,{key:3},[o("div",ia,[t[32]||(t[32]=o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},[o("rect",{x:"3.5",y:"7",width:"9",height:"6.5",rx:"1.5",stroke:"currentColor"}),o("path",{d:"M5.5 7V5.5a2.5 2.5 0 015 0V7",stroke:"currentColor","stroke-linecap":"round"})],-1)),o("span",null,s(e.$t("promoter.aiStrategy.lockNote")),1)]),o("div",na,[u(Ke,{onClick:xe},{default:m(()=>[y(s(e.$t("promoter.aiStrategy.prevStep")),1)]),_:1}),u(d,{variant:"gradient",pill:"",loading:C.value,onClick:Ne},{icon:m(()=>[...t[33]||(t[33]=[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},[o("path",{d:"M8 3L10 7L14 7.5L11 10.5L12 14L8 12L4 14L5 10.5L2 7.5L6 7L8 3Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1)])]),default:m(()=>[y(" "+s(e.$t("promoter.aiStrategy.startGenerate")),1)]),_:1},8,["loading"])])],64)):b("",!0)]),ve.value?(i(),n("div",ua,[o("div",da,[u(d,{variant:"secondary","icon-only":"",pill:"",class:"video-preview-close",onClick:He},{icon:m(()=>[...t[34]||(t[34]=[o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[o("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])]),_:1}),o("h3",ca,s(e.$t("promoter.preview.title")),1),o("div",pa,[te.value?(i(),n("video",{key:0,src:te.value,controls:"",controlslist:"nodownload",preload:"metadata",autoplay:"",class:"video-player"},null,8,ma)):b("",!0)]),o("div",va,[u(d,{variant:"secondary",onClick:Oe},{default:m(()=>[y(s(e.$t("promoter.preview.edit")),1)]),_:1}),u(d,{variant:"primary",onClick:Ee},{default:m(()=>[y(s(e.$t("promoter.preview.download")),1)]),_:1})])])])):b("",!0),u(Je,{visible:j.value,size:"sm",title:e.$t("promoter.brandAnalysis.title"),subtitle:e.$t("promoter.brandAnalysis.subtitle"),progress:G.value}
1,null,8,["visible","title","subtitle","progress"])]),_:1}),u(Qe,{modelValue:D.value,"onUpdate:modelValue":t[14]||(t[14]=l=>D.value=l),title:e.$t("promoter.restriction1080p.title"),size:"sm","footer-align":"center"},{footer:m(()=>[u(d,{variant:"primary",block:"",onClick:t[13]||(t[13]=l=>{D.value=!1,st(J).push("/profile?tab=subscription")})},{default:m(()=>[y(s(e.$t("promoter.restriction1080p.upgrade")),1)]),_:1})]),default:m(()=>[o("p",ga,s(e.$t("promoter.restriction1080p.message")),1)]),_:1},8,["modelValue","title"])],64)}}},ka=Xe(ha,[["__scopeId","data-v-e433586d"]]);export{ka 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.