PageSourceSearch

https://vidmax.ai/assets/voices-4y71IR5G.js

js vidmax.ai collected 2026-10-05 13:13:52 UTC 5,243 bytes, 2 lines download raw bytes

1import{hZ as e,M as F,P as S,U as N,X as D,r as f,k4 as C,iq as I,jS as p,iW as V,ib as P,eV as v,fG as E,k5 as O}from"./index-D04aio-r.js";import{C as w}from"./CustomHead-B5FxR42g.js";import{R as L}from"./bundle-CjTa3qQv.js";import{a as H,t as M}from"./zod-geqXdhPU.js";import{c as k}from"./useSettingsCacheUpdate-CeFwMOjA.js";import{F as z,c as x,d as j,e as b,a as h,f as u}from"./ShadcnForm-BNKupssf.js";import{I as B}from"./Input-DHyEO0-w.js";import{T as U}from"./ShadcnTextarea-Cwm6ln5J.js";import{V as l,aO as Y,c9 as R,b_ as y}from"./index.min-DqM6n_B9.js";import{A as $}from"./AixContentHeader-pxmQ4NoZ.js";import{A as q}from"./AixAlertDialog-B4pgk3JR.js";import{A as G}from"./AixContentBody-fQxHHTvZ.js";import{T as K,d as Q,e as A,c as m,a as W,b as d}from"./ShadcnTable-D0ANkqxE.js";import{A as X}from"./AppLayout-Szr5jlpX.js";import{g as Z,I as _}from"./seo-C_GsVxce.js";import"./index-CnJWVjh6.js";import"./ShadcnLabel-MragvuuG.js";import"./useScreenSize-BEPGl4iJ.js";import"./ShadcnSeparator-Cywnz346.js";import"./ShadcnSidebar-CcFML6pV.js";import"./ShadcnSkeleton-DSmN0vHW.js";import"./chevron-left-DkAqb8DK.js";import"./ShadcnAlertDialog-CIPoWHxZ.js";import"./ShadcnBadge-bx-Pzfol.js";import"./GradientBackground-CE4URicP.js";import"./PageLoading-BBgE9Zdd.js";import"./Logo-BWgbhxtJ.js";import"./AixDrawerSwitcher-D41cYW5q.js";import"./_isIterateeCall-DtjUgCb3.js";import"./clock-CjwqgSVJ.js";import"./draftJotai-DQYuv8fM.js";import"./ShadcnCheckbox-92pAQifO.js";import"./check-B_z0h917.js";import"./ShadcnDropDownMenu-CDosLHU_.js";import"./chevron-right-Dl6YQr4T.js";import"./index-CxeoeHDb.js";import"./index-CGdagJvn.js";import"./TopUpModal-A-E0v9Cy.js";import"./subscription-C8Q96QLQ.js";import"./crypto-BX1xTAsC.js";import"./stripe.esm-dkXHr68O.js";import"./Tooltip-B1bz1H2k.js";import"./isNil-CHIgUVhi.js";import"./prismaTypings-DW8Hx9Vn.js";import"./chevron-down-i3Wj6aME.js";import"./find-CVDvtCjo.js";import"./send-Ct-BUx38.js";import"./circle-alert-WnyPIyXg.js";import"./index-CBMyeA0S.js";import"./ShadcnCard-B1kp8rMd.js";import"./ShadcnTabs-B9RDPswh.js";import"./index-DYvv3epU.js";import"./coerce-B8myVSW-.js";import"./adsPlatformStripePricing-CtBvO230.js";const J=I({name:p().max(1e3).nonempty(),description:p().max(5e4).nonempty(),uploadedVoicePath:p().nonempty()}),ee=({voice:t,...i})=>{const{createVoice:a,editVoice:n,isCreating:c,isEditing:o}=k(),g=t?.id?"Edit":"Create",s=H({resolver:M(J),defaultValues:{name:t?.name??"",description:t?.description??"",uploadedVoicePath:t?.UploadedAudio?.uploadedUrl??""}}),T=r=>{t?.id?n.mutate({voiceId:t.id,...r},{onSuccess:()=>i.onOpenChange?.(!1),onError:()=>C.error("Failed to edit voice! Please try again later!")}):a.mutate(r,{onSuccess:()=>i.onOpenChange?.(!1),onError:()=>C.error("Failed to create voice! Please try again later!")})};return e.jsx(e.Fragment,{children:e.jsx(F,{...i,children:e.jsxs(S,{children:[e.jsx(N,{children:e.jsx(D,{children:`${g} Voice`})}),e.jsx(z,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(T),className:"flex w-full flex-col gap-y-4",children:[e.jsx(x,{control:s.control,name:"name",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:"Name"}),e.jsx(h,{children:e.jsx(B,{placeholder:"Name...",...r})}),e.jsx(u,{})]})}),e.jsx(x,{control:s.control,name:"description",render:({field:r})=>e.jsxs(j,{children:[e.jsx(b,{children:"Description"}),e.jsx(h,{children:e.jsx(U,{placeholder:"Audio description...",className:"resize-none",...r})}),e.jsx(u,{})]})}),e.jsx(x,{control:s.control,name:"uploadedVoicePath",render:({field:{value:r,onChange:te}})=>e.jsxs(j,{children:[e.jsx(h,{}),e.jsx(u,{})]})}),e.jsxs(f,{loading:o||c,type:"submit",children:[g," Voice"]})]})})]})})})},oe=({voiceList:t})=>{const[i,a]=V.useState(!1),[n,c]=V.useState();return e.jsxs(e.Fragment,{children:[e.jsx($,{icon:e.jsx(l,{icon:R}),title:"All Voices",right:e.jsx(f,{variant:"default",onClick:()=>a(!0),leftIcon:e.jsx(l,{icon:Y,size:16}),children:e.jsx("span",{children:"Create Voice"})})}),e.jsx(G,{innerClassName:"flex-1",children:e.jsxs(K,{containerClassName:"flex-1",children:[e.jsx(Q,{children:e.jsxs(A,{children:[e.jsx(m,{children:"Name"}),e.jsx(m,{children:"Created"}),e.jsx(m,{children:"Preview"}),e.jsx(m,{className:"text-right",children:"Action"})]})}),e.jsx(W,{children:P(t,o=>e.jsxs(A,{children:[e.jsx(d,{className:"font-medium",children:o.name}),e.jsx(d,{children:E(o.createdAt).format("MMM DD, YYYY")}),e.jsx(d,{children:e.jsx(L,{src:o.previewUrl??"",controls:!0})}),e.jsx(d,{className:"text-right",onClick:()=>c(o),children:e.jsx(f,{variant:"secondary",size:"icon",className:"text-destructive",leftIcon:e.jsx(l,{icon:y,size:16})})})]},o.id))})]})}),e.jsx(ee,{open:i,onOpenChange:o=>!o&&a(!1),defaultOpen:i}),e.jsx(q,{open:!!n,onOpenChange:o=>!o&&c(void 0),title:"Delete Voice",description:`Are you sure you want to delete this voice(${n?.name})?`,cancelLabel:"No, Cancel",actionLabel:"Yes, I'm Sure",actionClassName:v({variant:"destructive"}),icon:e.jsx(l,{icon:y,size:36}),onActionClick:o=>{o.preventDefault()}})]})};function ro(){const{data:t}=O.voices.getPrivateVoices.useQuery();return e.jsx(X,{head:e.jsx(w,{title:Z(_.VOICES)}),children:e.jsx(oe,{voiceList:t??[]})})}export{ro as component};
2//# sourceMappingURL=voices-4y71IR5G.js.map

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.