PageSourceSearch

https://app.ausha.co/assets/ai-Dn-iCCKq.js

js ausha.co collected 2026-09-24 08:25:32 UTC 10,869 bytes, 52 lines download raw bytes

1import{aW as U,i as W,iP as $,iQ as K,o as P,w as x,c as g,u as b,d as T,h as O,j as e,S as q,C as M,k as z,W as H,l as D,eu as N,T as R,m as V,A as L,U as l,g as c,B as Q,eO as G,Z as J,ai as _,iR as Y,eD as X,p as Z,t as y,a2 as ee,iS as te}from"./index-DUWMLp_A.js";import{A}from"./AIPreferencesIcon-DSvJF6_P.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"03512784fd78c0db53b8a0e370b452e2333ce80d"};var a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="502f557f-975b-41fb-a5cf-f626cbbd7a50",t._sentryDebugIdIdentifier="sentry-dbid-502f557f-975b-41fb-a5cf-f626cbbd7a50")}catch{}})();const se=async({showId:t,customPrompts:a})=>{const{data:n}=await K(t,a);return n},ne=()=>{const t=U();return W({mutationFn:se,onSuccess:(a,{showId:n})=>{t.invalidateQueries({queryKey:$.customPrompts(n)})}})},ie=({characterLimit:t})=>P({toneOfVoice:x().max(t,g.maxLength({max:t}))}),re=({onSubmit:t,isLoading:a,defaultValues:n,isPro:s})=>{const{t:r}=b(),u=ie({characterLimit:s?400:200}),{handleSubmit:d,control:o,formState:f}=T({mode:"onBlur",values:n,resolver:O(u)}),{isDirty:S,isValid:i}=f;return e.jsxs(oe,{onSubmit:d(t),children:[e.jsxs(q,{$gap:"0.5rem",children:[e.jsx(M,{name:"toneOfVoice",control:o,render:({field:m,fieldState:p})=>e.jsxs(z,{children:[e.jsxs(H,{$gap:"0.5rem",$align:"center",$justify:"space-between",$wrap:"nowrap",children:[e.jsx(D,{children:r("cgqqnk",{description:"Define your tone of voice",default:"Définissez votre style narratif"})}),e.jsx(N,{current:m.value?.length??0,max:s?400:200})]}),e.jsx(R,{...m,placeholder:r("h3W+kU",{description:"Enter your custom instructions",default:"Saisissez vos instructions personnalisées"}),maxLength:s?400:200,multiline:!0}),p.error&&e.jsx(V,{children:p.error.message})]})}),e.jsx(L,{variant:"neutral",defaultIcon:!0,description:e.jsxs(ae,{children:[e.jsx(v,{children:e.jsx(l,{children:r("Hmc6lb",{description:"Use a formal tone.",default:"Utiliser un ton formel."})})}),e.jsx(v,{children:e.jsx(l,{children:r("a1WsZI",{description:"Adopt a friendly writing style.",default:"Adopter un style d'écriture amical."})})}),e.jsx(v,{children:e.jsx(l,{children:r("5EBF8y",{description:"Address an expert audience.",default:"S'adresser à un public d'experts."})})})]}),children:e.jsx(l,{fontWeight:"--fw-semibold",children:r("0/tuXz",{description:"Here are some ideas to get started:",default:"Voici quelques idées pour commencer :"})})})]}),e.jsx(le,{type:"submit",isLoading:a,isDisabled:!S||!i,children:r("8pmblh",{description:"Save",default:"Enregistrer"})})]})},oe=c.form`
2    display: flex;
3    flex-direction: column;
4    row-gap: 1.5rem;
5`,le=c(Q)`
6    align-self: stretch;
7
8    @media (min-width: 768px) {
9        align-self: flex-start;
10    }
11`,ae=c.ul`
12    list-style-type: none;
13    padding-inline: 0.5rem;
14`,v=c.li`
15    display: list-item;
16    list-style-type: '- ';
17    color: var(--neutral700);
18`,de="AISettingsFormInput__AISettingsFormInput__customPromptSetting__m3_Qzv_5",ce="AISettingsFormInput__AISettingsFormInput__fieldLabelRow__m3_Qzv_5",ue="AISettingsFormInput__AISettingsFormInput__list__m3_Qzv_5",me="AISettingsFormInput__AISettingsFormInput__listItem__m3_Qzv_5",h={customPromptSetting:de,fieldLabelRow:ce,list:ue,listItem:me},j=({name:t,control:a,isPro:n})=>{const{t:s}=b(),{field:r,fieldState:u}=G({name:t,control:a}),d={title:s("ne3S3j",{description:"Episode title",default:"Titre de l'épisode"}),description:s("IG+dK3",{description:"Episode description",default:"Description de l'épisode"}),tags:s("TTNIpR",{description:"Episode tags",default:"Tags de l'épisode"}),newsletter:s("pVwlf+",{description:"Episode newsletter",default:"Newsletter de l'épisode"}),smm:s("Jk2a4t",{description:"Social post",default:"Post sur les réseaux sociaux"})},o={title:{first:s("FE/n9T",{description:"Rephrase as a question.",default:"Formuler comme une question."}),second:s("60Mysx",{description:"Include speakers' names.",default:"Inclure les noms des intervenants."}),third:s("REUBnK",{description:"Include a key figure.",default:"Inclure un chiffre clé."})},description:{first:s("wz38co",{description:"Start with a question.",default:"Commencer par une question."}),second:s("gp57Od",{description:"Introduce the speakers.",default:"Présenter les orateurs."}),third:s("hxIkAO",{description:"Include a quote from the episode.",default:"Inclure une citation tirée de l'épisode."})},tags:{first:s("F7oGCj",{description:"Include keywords from a related topic.",default:"Inclure des mots-clés relatifs au thème"}),second:s("60Mysx",{description:"Include speakers' names.",default:"Inclure les noms des intervenants."}),third:s("I0CxmT",{description:"Use keywords with several words.",default:"Utiliser des mots-clés composés de plusieurs mots."})},newsletter:{first:s("VWDrQp",{description:"Start the content with a question.",default:"Commencer le contenu par une question."}),second:s("zakgit",{description:"Thank the speakers at the end.",default:"Remercier les intervenants à la fin."}),third:s("hxIkAO",{description:"Include a quote from the episode.",default:"Inclure une citation tirée de l'épisode."})},smm:{first:s("JzeeE+",{description:"Share an inspiring excerpt from the latest episode.",default:"Partager un extrait inspirant du dernier épisode."}),second:s("8m0ut/",{description:"Wrap up with an inspiring call to action.",default:"Terminer par un appel à l'action engageant."}),third:s("REUBnK",{description:"Include a key figure.",default:"Inclure un chiffre clé."})}};return e.jsxs("div",{className:h.customPromptSetting,children:[e.jsxs(z,{children:[e.jsxs("div",{className:h.fieldLabelRow,children:[e.jsx(D,{children:d[t]}),e.jsx(N,{current:r.value?.length??0,max:n?400:200})]}),e.jsx(R,{...r,placeholder:s("h3W+kU",{description:"Enter your custom instructions",default:"Saisissez vos instructions personnalisées"}),maxLength:n?400:200,multiline:!0}),u.error&&e.jsx(V,{children:u.error.message})]}),e.jsx(L,{variant:"neutral",defaultIcon:!0,description:e.jsxs("ul",{className:h.list,children:[e.jsx("li",{className:h.listItem,children:e.jsx(l,{children:o[t].first})}),e.jsx("li",{className:h.listItem,children:e.jsx(l,{children:o[t].second})}),e.jsx("li",{className:h.listItem,children:e.jsx(l,{children:o[t].third})})]}),children:e.jsx(l,{fontWeight:"--fw-semibold",children:s("5dBU1Q",{description:"Need inspiration for your instructions? Here are some ideas to get started!",default:"Besoin d'inspiration pour vos instructions ? Voici quelques idées pour commencer !"})})})]})},pe=({characterLimit:t})=>P({title:x().max(t,g.maxLength({max:t})),description:x().max(t,g.maxLength({max:t})),tags:x().max(t,g.maxLength({max:t})),newsletter:x().max(t,g.maxLength({max:t})),smm:x().max(t,g.maxLength({max:t}))}),fe=({onSubmit:t,isLoading:a,defaultValues:n,isPro:s})=>{const{t:r}=b(),u=pe({characterLimit:s?400:200}),{handleSubmit:d,control:o,formState:f}=T({mode:"onBlur",values:n,resolver:O(u)});return e.jsxs(he,{onSubmit:d(t),children:[e.jsx(j,{name:"title",control:o,isPro:s}),e.jsx(j,{name:"description",control:o,isPro:s}),e.jsx(j,{name:"tags",control:o,isPro:s}),e.jsx(j,{name:"newsletter",control:o,isPro:s}),e.jsx(j,{name:"smm",control:o,isPro:s}),e.jsx(xe,{type:"submit",isLoading:a,isDisabled:!f.isDirty||!f.isValid,children:r("8pmblh",{description:"Save",default:"Enregistrer"})})]})},he=c.form`
19    display: flex;
20    flex-direction: column;
21    row-gap: 1.5rem;
22`,xe=c(Q)`
23    align-self: stretch;
24
25    @media (min-width: 768px) {
26        align-self: flex-start;
27    }
28`,ge=Z("/_authenticated/app/channel/$channelId/show/$showId/settings/ai"),Ie=()=>{J("AI settings viewed");const{showId:t,channelId:a}=ge.useParams(),{data:n}=_(Y(Number(t))),s=ne(),r={title:n.find(i=>i.field==="title")?.prompt||"",description:n.find(i=>i.field==="description")?.prompt||"",tags:n.find(i=>i.field==="tags")?.prompt||"",newsletter:n.find(i=>i.field==="newsletter")?.prompt||"",toneOfVoice:n.find(i=>i.field==="tone_of_voice")?.prompt||"",smm:n.find(i=>i.field==="smm")?.prompt||""},{data:u}=_(X(Number(a))),{t:d}=b(),o=u.isHostingPro??!1,f=i=>{const m=n.filter(w=>w.field!=="tone_of_voice")||[],p={field:"tone_of_voice",prompt:i.toneOfVoice};s.mutate({showId:Number(t),customPrompts:[...m,p]},{onSuccess:()=>{y.success()},onError:()=>{y.alert()}})},S=i=>{const m=n.find(I=>I.field==="tone_of_voice"),p=Object.fromEntries(Object.entries(i).filter(([I,B])=>B.trim()!=="")),w=Object.keys(p).map(I=>({field:ee.decamelize(I),prompt:p[I]}));s.mutate({showId:Number(t),customPrompts:[...m?[m]:[],...w]},{onSuccess:()=>{y.success()},onError:()=>{y.alert()}})};return e.jsxs(q,{$gap:"4rem",children:[e.jsxs(E,{children:[e.jsx(l,{color:"--neutral500",children:d("Nf4aIk",{description:"Default AI Settings",default:"Réglages"})}),e.jsxs(F,{children:[e.jsxs(C,{children:[e.jsxs(k,{children:[e.jsx(A,{primaryColor:"primary",secondaryColor:"primary400"}),e.jsx(l,{variant:"bodyL",fontWeight:"--fw-bold",children:d("5ixYSf",{description:"Tone of voice",default:"Style narratif"})})]}),e.jsx(l,{color:"--neutral500",children:d("r4tfJQ",{description:"Customize Ausha Intelligence’s tone of voice to match your style. Your settings will apply to all episodes!",default:"Ajustez la tonalité de AI pour l'adapter à vos besoins ! Cela influencera le style d'écriture de l'ensemble du contenu généré."})})]}),e.jsx(re,{onSubmit:f,isLoading:s.isPending,defaultValues:r,isPro:o})]})]}),e.jsxs(E,{children:[e.jsx(l,{color:"--neutral500",children:d("bgK34V",{description:"Preferences",default:"Préférences"})}),e.jsxs(F,{children:[e.jsxs(C,{children:[e.jsxs(k,{children:[e.jsx(A,{primaryColor:"primary",secondaryColor:"primary400"}),e.jsx(l,{variant:"bodyL",fontWeight:"--fw-bold",children:d("4lbX55",{description:"AI preferences",default:"AI préférences"})})]}),e.jsx(l,{color:"--neutral500",children:d("6fneki",{description:"Provide Ausha Intelligence with specific instructions to personalize your episode content.",default:"Personnalisez la façon dont AI génère le contenu de vos épisodes en lui donnant des instructions spécifiques."})})]}),e.jsx(fe,{onSubmit:S,isLoading:s.isPending,defaultValues:r,isPro:o})]})]})]})},E=c.section`
29    display: flex;
30    flex-direction: column;
31    row-gap: 1rem;
32`,F=c.div`
33    display: flex;
34    flex-direction: column;
35    row-gap: 1.5rem;
36    padding: var(--container-padding-mobile);
37    background-color: var(--white);
38    border-radius: var(--r-l);
39
40    ${t=>t.theme.mediaQueries.desktopAndUp} {
41        padding: 1.5rem;
42    }
43`,C=c.div`
44    display: flex;
45    flex-direction: column;
46    gap: var(--sp-xs);
47`,k=c.div`
48    display: flex;
49    align-items: center;
50    gap: var(--sp-xs);
51`,be=()=>e.jsx(te,{children:e.jsx(Ie,{})});
51export{be as component};
52//# sourceMappingURL=ai-Dn-iCCKq.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.