1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-KhwZ_J8J.js","assets/rolldown-runtime-B8c6INFZ.js","assets/react-vendor-h0gPD3Fi.js","assets/sentryInit-Dg2zbA90.js"])))=>i.map(i=>d[i]); 2(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`ugc-copilot@f0fdeb4`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ac76363b-ff27-4b37-ac67-7d6f909a772b`,e._sentryDebugIdIdentifier=`sentry-dbid-ac76363b-ff27-4b37-ac67-7d6f909a772b`)}catch{}})();import{n as e}from"./rolldown-runtime-B8c6INFZ.js";import{c as t,i as n,n as r,o as i,r as a}from"./firebaseConfig-DdDGC3lj.js";import{A as o,C as s,D as c,E as l,I as u,L as ee,M as d,N as f,O as te,g as p,j as ne,p as re,u as ie,v as ae,w as oe}from"./firebase-bH8RhHOv.js";var se=50,m=null,h=!1,g=null,_=[],v=e=>{e?.error&&x(e.error)},y=e=>{x(e?.reason)};function ce(){typeof window<`u`&&(window.removeEventListener(`error`,v),window.removeEventListener(`unhandledrejection`,y))}function b(){return g||(g=Promise.all([t(()=>import(`./esm-KhwZ_J8J.js`),__vite__mapDeps([0,1,2])),t(()=>import(`./sentryInit-Dg2zbA90.js`),__vite__mapDeps([3,0,1,2]))]).then(([e,t])=>{m=e,t.initSentry(),ce();for(let t of _.splice(0))try{e.captureException(t.error,t.ctx)}catch{}return e}).catch(e=>(console.warn(`[errorReporting] Sentry failed to load; continuing without monitoring:`,e),h=!0,_.length=0,null)),g)}function le(){b()}function x(e,t){if(m){try{m.captureException(e,t)}catch{}return}h||(_.length<se&&_.push({error:e,ctx:t}),b())}typeof window<`u`&&(window.addEventListener(`error`,v),window.addEventListener(`unhandledrejection`,y));var S=oe(),C={},w=e=>C[e]||null,T=(e,t)=>{C[e]=t},E=e=>{delete C[e]},ue=(e,t)=>{let n=s(S,`users`,e);return re(n,n=>{if(!n.exists())return;let r=n.data(),i={};r.usage!==void 0&&(i.usage=r.usage),r.bonusCredits!==void 0&&(i.bonusCredits=r.bonusCredits),r.freeBuild!==void 0&&(i.freeBuild=r.freeBuild);let a=w(e);a&&T(e,{...a,...i}),t(i)},e=>{console.warn(`subscribeToCreditBalance: snapshot listener error (non-fatal):`,e)})},de=async e=>{let t=s(S,`users`,e);try{let n=await ie(t);if(n.exists()){let t=n.data();t.createdAt&&t.createdAt.toDate&&(t.createdAt=t.createdAt.toDate()),t.trialEndsAt&&t.trialEndsAt.toDate&&(t.trialEndsAt=t.trialEndsAt.toDate()),t.subscriptionEndsAt&&t.subscriptionEndsAt.toDate&&(t.subscriptionEndsAt=t.subscriptionEndsAt.toDate());for(let e of[`lastActiveAt`,`starterPromoExpiresAt`,`starterPromoOfferedAt`,`starterPromoRedeemedAt`,`purchaseNudge1SentAt`,`purchaseNudge2SentAt`,`purchaseNudge3SentAt`,`purchaseNudge4SentAt`,`cancelledAt`])t[e]&&t[e].toDate&&(t[e]=t[e].toDate());let r={uid:e,...t};return T(e,r),r}return null}catch(t){if(t?.code===`unavailable`||t?.message?.includes(`offline`))return console.warn(`getUserProfile: Client is offline, returning cached profile if available.`),w(e)||null;throw t}},fe=async e=>{let t=s(S,`users`,e);await p(t,{hasCompletedOnboarding:!0},{merge:!0})},D=`ugc-last-active-write`,pe=864e5,me=async e=>{if(e)try{let t=Date.now(),n=typeof localStorage<`u`?localStorage.getItem(D):null,r=n?parseInt(n,10):0;if(Number.isFinite(r)&&t-r<pe)return;typeof localStorage<`u`&&localStorage.setItem(D,String(t));let i=s(S,`users`,e);await p(i,{lastActiveAt:l()},{merge:!0})}catch{}},he=async e=>{let t=s(S,`users`,e),n=new Date;await p(t,{hasAcceptedMatureModeTerms:!0,matureModeAcceptedAt:n},{merge:!0});let r=w(e);r&&T(e,{...r,hasAcceptedMatureModeTerms:!0,matureModeAcceptedAt:n})},ge=async(e,t)=>{let n=s(S,`users`,e);await p(n,{showMatureModeOptIn:t},{merge:!0});let r=w(e);r&&T(e,{...r,showMatureModeOptIn:t})},_e=async(e,t)=>{let n=s(S,`users`,e),r={reminderCount:0,...t};await p(n,{pendingDraft:r},{merge:!0});let i=w(e);i&&T(e,{...i,pendingDraft:r})},ve=async e=>{let t=s(S,`users`,e);await p(t,{pendingDraft:null},{merge:!0});let n=w(e);n&&T(e,{...n,pendingDraft:null})},ye=async(e,t)=>{let n=s(S,`users`,e);await p(n,{contactEmail:t},{merge:!0});let r=w(e);r&&T(e,{...r,contactEmail:t})},be=async(e,t)=>{let n=s(S,`users`,e);await p(n,{autosaveVideoLibrary:t},{merge:!0});let r=w(e);r&&T(e,{...r,autosaveVideoLibrary:t})},O=2592e3;function k(e){let t=e+`=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e].trim();if(r.indexOf(t)===0)return decodeURIComponent(r.substring(t.length))}return null}function A(e){document.cookie=`${e}=; path=/; max-age=0`}function xe(){try{if(k(`documentReferrer`))return;let e=document.referrer;if(!e)return;
2try{if(new URL(e).hostname.includes(`ugccopilot.ai`))return}catch{return}document.cookie=`documentReferrer=${encodeURIComponent(e)}; path=/; max-age=${O}`}catch(e){console.warn(`persistReferrerFromDocument failed`,e)}}function Se(){try{if(k(`landingPage`))return;let e=window.location.pathname;document.cookie=`landingPage=${encodeURIComponent(e)}; path=/; max-age=${O}`}catch(e){console.warn(`persistLandingPage failed`,e)}}var j=[`google`,`bing`,`yahoo`,`duckduckgo`,`baidu`,`yandex`,`ecosia`,`ask`],M=[`facebook`,`twitter`,`instagram`,`linkedin`,`youtube`,`tiktok`,`reddit`,`pinterest`,`snapchat`,`t.co`,`x.com`],N=[`chatgpt.com`,`openai.com`,`perplexity.ai`,`perplexity`,`claude.ai`,`anthropic.com`,`copilot.microsoft.com`,`gemini.google.com`,`bard.google.com`,`you.com`,`phind.com`];function P(e,t){let n=e.toLowerCase();return t.some(e=>n.includes(e))}function Ce(e){let{referralId:t,utmSource:n,utmMedium:r,documentReferrer:i}=e;if(t)return`referral`;let a=(n||``).toLowerCase(),o=(r||``).toLowerCase();if([`cpc`,`paid`,`ppc`].includes(o))return`paid`;if(o===`email`)return`email`;if(o===`social`)return`social`;if(a)return P(a,N)?`ai_search`:P(a,j)?`organic_search`:P(a,M)?`social`:`referral`;if(i)try{let e=new URL(i).hostname.toLowerCase();return P(e,N)?`ai_search`:P(e,j)?`organic_search`:P(e,M)?`social`:`referral`}catch{return`other`}return`direct`}function F(){let e=k(`referralId`),t=k(`utmData`),n=k(`documentReferrer`),r=k(`landingPage`),i={},a=[];if(t){try{let e=JSON.parse(t);e.utmSource&&(i.utmSource=String(e.utmSource)),e.utmMedium&&(i.utmMedium=String(e.utmMedium)),e.utmCampaign&&(i.utmCampaign=String(e.utmCampaign))}catch{}a.push(`utmData`)}return n&&(i.documentReferrer=n,a.push(`documentReferrer`)),r&&(i.landingPage=r,a.push(`landingPage`)),i.trafficSource=Ce({referralId:e,utmSource:i.utmSource||null,utmMedium:i.utmMedium||null,documentReferrer:n}),{fields:i,cookiesToDelete:a}}var we=[`example.com`,`example.org`,`example.net`,`example.edu`,`test`,`test.com`,`test.test`,`invalid`,`localhost`,`localhost.com`],Te=[`mailinator.com`,`guerrillamail.com`,`guerrillamail.info`,`grr.la`,`sharklasers.com`,`10minutemail.com`,`10minutemail.net`,`tempmail.com`,`temp-mail.org`,`throwawaymail.com`,`trashmail.com`,`yopmail.com`,`getnada.com`,`dispostable.com`,`fakeinbox.com`,`maildrop.cc`,`mailnesia.com`,`mintemail.com`,`spam4.me`,`tempr.email`,`moakt.com`,`emailondeck.com`,`mohmal.com`,`discard.email`],Ee=new Set([...we,...Te]);function De(e){let t=(e||``).trim().toLowerCase();if(!t.includes(`@`))return!1;let n=t.split(`@`).pop()||``;return n.length>0&&Ee.has(n)}function I(){if(!i||!r)throw Error(n??`Firebase is not configured. Check your .env(.local) values and firebaseConfig.`);return r}var L=`An account with this email already exists. Try signing in instead, or use "Forgot password?" if you've forgotten your credentials.`;function R(e){if(typeof e!=`object`||!e?.code)return e?.message||`An unexpected error occurred. Please try again.`;let t=String(e?.message??e?.customData?.message??``);if(/BLOCKING_FUNCTION_ERROR_RESPONSE/i.test(t))return t.replace(/^.*BLOCKING_FUNCTION_ERROR_RESPONSE\s*:?\s*/is,``).replace(/\s*\(auth\/[^)]+\)\.?\s*$/i,``).trim()||`We couldnât complete your sign-up. Please try a different email, or wait a moment and try again.`;switch(e.code){case`auth/invalid-email`:return`That doesn't look like a valid email address. Please double-check and try again.`;case`auth/user-not-found`:return`No account found with that email. Check the address or create a new account.`;case`auth/wrong-password`:return`Incorrect password. Please try again or use "Forgot password?" to reset it.`;case`auth/invalid-credential`:return`The email or password is incorrect. Please try again or reset your password.`;case`auth/missing-password`:return`Please enter your password.`;case`auth/missing-email`:return`Please enter your email address.`;case`auth/email-already-in-use`:return L;case`auth/weak-password`:return`Your password is too weak. Please use at least 8 characters with a mix of uppercase, lowercase, and numbers.`;case`auth/user-disabled`:return`This account has been disabled. Please contact support at [email protected] for assistance.`;case`auth/requires-recent-login`:return`For security, this action requires a recent sign-in. Please sign out and sign in again, then retry.`;case`auth/too-many-requests`:return`Too many failed attempts. Your account has been temporarily locked for security. Please wait a few minutes and try again, or reset your password.`;case`auth/network-request-failed`:return`Unable to connect. Please check your internet connection and try again.`;case`auth/timeout`:return`The request timed out. Please check your connection and try again.`;case`auth/popup-blocked`:return`Your browser blocked the sign-in popup. Please allow popups for this site and try again.`;case`auth/popup-closed-by-user`:return`The sign-in window was closed before completing. Please try again when you're ready.`;case`auth/cancelled-popup-request`:return`Only one sign-in window can be open at a time. Please close any other sign-in windows and try again.`;case`auth/account-exists-with-different-credential`:return`An account already exists with this email using a different sign-in method. Try signing in with Google or email/password instead.`;case`auth/credential-already-in-use`:return`This credential is already linked to a different account.`;case`auth/unauthorized-domain`:return`This domain is not authorized for sign-in. If you're a developer, add this domain to Firebase Auth's authorized domains.`;case`auth/operation-not-allowed`:return`This sign-in method is not currently available. Please try a different method or contact support.`;case`auth/invalid-api-key`:return`There's a configuration issue with the app. Please try refreshing the page or contact support.`;case`auth/app-not-authorized`:return`This app is not authorized. Please contact support.`;case`auth/internal-error`:return`Something went wrong on our end. Please try again in a moment. If the issue persists, contact support.`;case`auth/unverified-email`:return`Please verify your email address before signing in. Check your inbox for a verification link.`;case`auth/web-storage-unsupported`:case`auth/operation-not-supported-in-this-environment`:return`Sign-in is being blocked by your browser. Turn off any ad or privacy blocker (e.g. AdBlock Plus or uBlock) for this site â or open the page in a different browser â then try again. If you opened this link from inside another app (Instagram, TikTok, email), tap the menu (â¢â¢â¢) and choose "Open in browser".`;default:return console.warn(`[Auth] Unhandled error code: ${e.code}`,e.message),x(e,{level:`warning`,tags:{feature:`auth`,auth_unhandled_code:String(e?.code??`unknown`)},extra:{authCode:e?.code,rawMessage:String(e?.message??``)}}),`Something went wrong. Please try again. If the problem continues, contact support at [email protected]. (ref: ${e.code})`}}async function z(e){let t=I();try{return await e(t)}catch(e){throw console.error(`Firebase Auth Error:`,e.code,e.message),Error(R(e))}}
2new c().setCustomParameters({prompt:`select_account`});var Oe=(e,t,n=``)=>z(async r=>{if(De(e))throw Error(`Please sign up with a valid, non-disposable email address.`);let i=await te(r,e,t),{user:o}=i;n&&await ee(o,{displayName:n});let c=s(a,`users`,o.uid),u=k(`referralId`),{fields:d,cookiesToDelete:f}=F(),ne={fullName:n,email:e,createdAt:l(),subscriptionTier:null,subscriptionStatus:null,signupTier:`free`,freeGrantedAt:l(),hasCompletedOnboarding:!1,usage:{analyses:0,scripts:0,videos:0,videos_hq:0,influencerGenerations:0,sceneImages:0,freeVideosGenerated:0,credits:0},...u&&{referredBy:u,referralStatus:`pending`,referredAt:l()},...d};try{await p(c,ne)}catch(e){if(e?.code===`permission-denied`){console.warn(`[Auth] Lost setDoc race with onUserCreate; retrying an attribution-only merge.`);let e={...d,...u&&{referredBy:u,referralStatus:`pending`,referredAt:l()}};try{await ae(c,e)}catch(e){console.warn(`[Auth] Attribution merge retry failed; attribution data dropped.`,e),x(e,{tags:{area:`signup-attribution-merge`}})}}else throw e}u&&A(`referralId`);for(let e of f)A(e);return J(`proxySendVerificationEmail`,{continueUrl:typeof window<`u`?window.location.origin:`https://www.ugccopilot.ai`}).catch(e=>{console.warn(`[Auth] Failed to send verification email at signup:`,e)}),i}),ke=(e,t)=>z(n=>f(n,e,t)),Ae=()=>z(async e=>{try{return await o(e)}catch(e){return console.warn(`Google sign-in redirect error:`,e.code,e.message),null}}),je=e=>z(t=>d(t,e)),Me=()=>z(async e=>{let t=e.currentUser;t&&E(t.uid),await u(e)}),Ne=e=>{try{let t=I();return ne(t,e)}catch(e){return console.error(`Firebase auth is not initialized. Cannot set up auth listener.`,e),()=>{}}},Pe=()=>{let e=r?.currentUser;return!e||e.emailVerified?!0:(e.providerData||[]).some(e=>e&&(e.providerId===`google.com`||e.providerId===`apple.com`))},Fe=async()=>{let e=r?.currentUser;if(!e)return null;try{await e.reload()}catch(e){console.warn(`[Auth] reloadCurrentUser failed:`,e)}return r?.currentUser??null},Ie=async()=>{if(!r?.currentUser)throw Error(`You need to be signed in to request a verification email.`);await J(`proxySendVerificationEmail`,{continueUrl:typeof window<`u`?window.location.origin:`https://www.ugccopilot.ai`})},Le=async()=>{if(!r?.currentUser)throw Error(`You need to be signed in to request a verification code.`);await J(`proxySendVerificationCode`,{})},Re=async e=>{let t=r?.currentUser;if(!t)throw Error(`You need to be signed in to verify your email.`);await J(`proxyConfirmVerificationCode`,{code:e});try{await t.reload(),await t.getIdToken(!0)}catch(e){console.warn(`[Auth] Verified, but refreshing the local session failed:`,e)}},B=new Set,ze=e=>(B.add(e),()=>{B.delete(e)}),Be=()=>{for(let e of B)try{e()}catch(e){console.warn(`[Auth] verification listener threw:`,e)}},Ve=e({EmailNotVerifiedError:()=>V,InsufficientCreditsError:()=>U,NetworkUnreachableError:()=>H,adaptVisualPrompt:()=>tt,adjustSceneForDuration:()=>rt,analyzeReferenceVideo:()=>Je,callApi:()=>J,checkSceneIdentity:()=>nt,deleteUserAccount:()=>ut,editSceneImage:()=>Qe,enhanceInfluencerDescription:()=>Z,enhanceInteractionPrompt:()=>lt,enhanceScriptSnippet:()=>$e,enhanceTwinField:()=>Q,ensureMasterIdentityPrompt:()=>it,fetchTopSellingProducts:()=>Ge,generateIdealInfluencer:()=>Ke,generateImage:()=>X,generateSceneImage:()=>Ze,generateSocialCaptions:()=>st,generateSocialImage:()=>ot,generateTwinImage:()=>at,generateViralScript:()=>Ye,getApiErrorDetails:()=>G,getInfluencerBrandKit:()=>qe,getVideoLibrary:()=>dt,inferContentPreset:()=>et,isInsufficientCreditsError:()=>W,parseOwnScript:()=>ct,regenerateScriptWithTone:()=>Xe,searchVideoLibrary:()=>$}),V=class extends Error{constructor(e=`Please verify your email to continue.`){super(e),this.apiCode=`email-not-verified`,this.name=`EmailNotVerifiedError`}},H=class extends Error{constructor(e){super(e),this.name=`NetworkUnreachableError`}},U=class extends Error{constructor(e,t){super(e),this.apiCode=`insufficient-credits`,this.name=`InsufficientCreditsError`,this.reason=t}},W=e=>e instanceof U,G=e=>{if(e instanceof U)return{apiCode:e.apiCode,reason:e.reason};if(e instanceof Error){let t=e;return{code:t.code,apiCode:t.details?.apiCode,reason:t.details?.reason,retryAfter:t.details?.retryAfter}}return{}};function K(e,t){let n=typeof e?.details==`string`&&e.details||typeof e?.customData?.message==`string`&&e.customData.message||typeof e?.message==`string`&&e.message||t;return e?.code&&!n.toLowerCase().includes(e.code)?`[${e.code}] ${n}`:n}var q=2e3,He=1e4;async function J(e,t,n){let i;i=`https://us-central1-viral-ugc-copilot.cloudfunctions.net/${e}`;let a,o;typeof window<`u`&&(a=new AbortController,o=setTimeout(()=>a.abort(),3e5));let s=r?.currentUser;if(!s)throw console.error(`callApi ('${e}') was attempted without a signed-in user. Aborting API call.`),Error(`Authentication required. Please sign in.`);let c;try{let e=await s.getIdTokenResult();c=new Date(e.expirationTime).getTime()-Date.now()<3e5?await s.getIdToken(!0):e.token}catch(t){throw console.error(`callApi ('${e}'): Failed to obtain auth token.`,t),Error(`Your session has expired. Please sign in again.`)}try{let r,o=!1;for(;;){let s=Date.now();try{r=await fetch(i,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${c}`},body:JSON.stringify({data:t}),signal:a?.signal});break}catch(t){let r=Date.now()-s<He;if(n?.retryOnNetworkError&&!o&&t instanceof TypeError&&r){o=!0,console.warn(`callApi ('${e}'): network-level fetch failure â retrying once in ${q}ms.`,t),await new Promise(e=>setTimeout(e,q));continue}throw t}}if(!r.ok){let e={code:`internal`,message:`HTTP error! status: ${r.status}`};try{let t=await r.json();t.error&&(e=t.error)}catch{}let t=e?.details,n=t?.apiCode;throw n===`email-not-verified`?(Be(),new V(e.message||`Please verify your email to continue.`)):n===`insufficient-credits`?new U(K(e,`You don't have enough credits for this action.`),t?.reason):e}return(await r.json()).data}catch(t){if(t instanceof V||t instanceof U)throw t;if(t instanceof DOMException&&t.name===`AbortError`)throw Error(`AI service request timed out. Please try again.`);if(console.error(`Error calling cloud function '${e}':`,t),t instanceof TypeError)throw new H(`Couldn't reach the server â this is usually a momentary network or deploy blip. Please try again. (${t.message})`);let n=K(t,`An error occurred while calling the AI service.`),r=Error(n);if(t&&typeof t==`object`){let e=t;typeof e.code==`string`&&(r.code=e.code),e.details&&typeof e.details==`object`&&(r.details=e.details)}throw r}finally{o&&clearTimeout(o)}}function Ue(e,t){if(t)return t;if(e&&Array.isArray(e)&&e.length>0){let t=e[0];if(typeof t==`string`)return t;if(t&&typeof t.url==`string`)return t.url}}function Y(e,t=``){if(e==null)return t;let n=String(e).trim();return n.length?n:t}function We(e){let t=Y(e.name||e.productName,`Unnamed Product`),n=Y(e.brandName||e.brand,``),r=Y(e.description)||Y(e.why_trending)||`Trending product in this niche.`,i=Y(e.problemSolved)||Y(e.why_trending),a=Y(e.successfulAdCreative)||`Short, fast-paced UGC with a bold hook, quick demo, and clear
2CTA.`,o=Y(e.idealCustomer)||Y(e.target_audience)||`Shoppers interested in this category on social platforms.`,s=Y(e.idealInfluencer)||`Relatable micro-creator in the niche with genuine product affinity.`,c=Y(e.imagePrompt)||`Product photography of "${t}", shot on iPhone 15 Pro. The product on a casual real-world surface in a lifestyle setting, soft natural window light, authentic and unretouched, high-resolution, shallow depth of field.`,l=Ue(e.sources,e.url);return{brandName:n,productName:t,description:r,problemSolved:i,successfulAdCreative:a,idealCustomer:o,idealInfluencer:s,imagePrompt:c,imageUrl:e.imageUrl,url:l||null,isGeneratingImage:!1,imageError:null}}var Ge=async e=>{let t=await J(`proxyFetchTopSellingProducts`,{industry:e});return{topSellingProducts:(Array.isArray(t?.items)?t.items:Array.isArray(t?.topSellingProducts)?t.topSellingProducts:[]).map(We),trends:null,characteristics:null,personas:null,topKeywords:null,viralHooks:null,strategyRecommendations:null}},X=(e,t,n,r=`person`,i=`standard`,a,o)=>J(`proxyGenerateImage`,{prompt:e,aspectRatio:t,productImage:n,imageType:r,quality:i,resolution:a,imageEngine:o},{retryOnNetworkError:!0}),Ke=e=>J(`proxyGenerateIdealInfluencer`,{genInput:e,isFaceless:e.isFaceless,quality:e.quality,twinDescription:e.twinDescription,twinEthnicity:e.twinEthnicity,masterIdentityPrompt:e.masterIdentityPrompt,userInfluencerDescription:e.userInfluencerDescription,influencerGender:e.influencerGender,influencerAge:e.influencerAge,influencerEthnicity:e.influencerEthnicity,influencerStyle:e.influencerStyle,videoAnalysis:e.videoAnalysis,projectMode:e.projectMode,contentPreset:e.contentPreset}),qe=e=>J(`proxyGetInfluencerBrandKit`,{influencerDescription:e}),Je=(e,t,n,r)=>J(`proxyAnalyzeReferenceVideo`,{storagePath:e,mimeType:t,projectId:n,mode:r}),Ye=e=>J(`proxyGenerateViralScript`,e),Xe=(e,t,n,r)=>J(`proxyRegenerateScriptWithTone`,{originalScript:e,newTone:t,projectMode:n,twinIntendedForIntimateMode:r}),Ze=({quality:e=`hq`,...t})=>J(`proxyGenerateSceneImage`,{quality:e,...t}),Qe=(e,t,n=`standard`,r,i)=>J(`proxyEditSceneImage`,{sceneImage:e,editPrompt:t,quality:n,aspectRatio:r,imageEngine:i}),$e=e=>J(`proxyEnhanceScriptSnippet`,{text:e}),et=e=>J(`proxyInferContentPreset`,e),tt=(e,t)=>J(`proxyAdaptVisualPrompt`,{visual:e,productDescription:t}),nt=e=>J(`proxyCheckSceneIdentity`,e),rt=(e,t,n,r,i,a)=>J(`proxyAdjustSceneForDuration`,{script:e,visual:t,oldDuration:n,newDuration:r,tone:i,scriptType:a}),Z=async(e,t,n)=>(await J(`proxyEnhanceInfluencerDescription`,{productDescription:e,originalDescription:t,influencerImage:n})).enhancedDescription,Q=async e=>J(`proxyEnhanceTwinField`,e),it=async e=>{if(e.isFaceless||e.masterIdentityPrompt&&e.masterIdentityPrompt.trim())return null;let t=e.influencerOnlyImageUrl||e.imageUrl;if(!t||!/^https?:\/\//.test(t))return null;try{let{result:n}=await Q({field:`masterIdentityPrompt`,name:e.username||`Creator`,currentValue:``,referenceImageUrls:[t]});return(typeof n==`string`?n.trim():``)||null}catch(e){return console.warn(`[ensureMasterIdentityPrompt] Failed to derive identity prompt (non-fatal):`,e),null}},at=e=>J(`proxyGenerateTwinImage`,e),ot=e=>J(`proxyGenerateSocialImage`,e),st=e=>J(`proxyGenerateSocialCaptions`,e),ct=(e,t,n,r,i,a,o)=>J(`proxyParseOwnScript`,{rawScript:e,twinDescription:t,productDescription:n,isFaceless:r,projectMode:i,audioMode:a,engine:o});async function lt(e,t,n){return J(`proxyEnhanceInteractionPrompt`,{visualPrompt:e,productDescription:t,originalInteraction:n})}var ut=e=>J(`proxyDeleteUserAccount`,{confirmation:e}),dt=(e,t)=>J(`proxyGetVideoLibrary`,{pageSize:e,startAfterId:t}),$=(e,t)=>J(`proxySearchVideoLibrary`,{query:e,topK:t});export{de as $,$ as A,je as B,G as C,W as D,et as E,Pe as F,A as G,ke as H,Ne as I,xe as J,k as K,ze as L,Re as M,R as N,ct as O,Ae as P,ve as Q,Fe as R,Ye as S,dt as T,Me as U,Le as V,Oe as W,T as X,F as Y,E as Z,X as _,Je as a,ge as at,ot as b,ut as c,x as ct,lt as d,_e as et,$e as f,Ke as g,Ge as h,Ve as i,he as it,L as j,Xe as k,Qe as l,le as lt,it as m,tt as n,me as nt,J as o,fe as ot,Q as p,Se as q,rt as r,ye as rt,nt as s,be as st,H as t,ue as tt,Z as u,Ze as v,qe as w,at as x,st as y,Ie as z};
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.