PageSourceSearch

https://toutmontpellier.fr/_next/static/chunks/app/portrait/page-08e24694c94db5c7.js

js toutmontpellier.fr collected 2026-10-02 11:29:44 UTC 26,814 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3687],{22868:function(){},26349:function(){},99830:function(){},70209:function(){},84396:function(e,t,a){Promise.resolve().then(a.bind(a,48442))},77891:function(e,t,a){"use strict";a.d(t,{l:function(){return l}});var r=a(57437),n=a(2265),s=a(61094),i=a(48662);function l(e){let{value:t,onChange:a,className:l=""}=e,[o,c]=(0,n.useState)(!1),[d,u]=(0,n.useState)(!1),p=(0,n.useRef)(null),x=(0,n.useRef)("");return((0,n.useEffect)(()=>(c(!!(window.SpeechRecognition||window.webkitSpeechRecognition)),()=>{try{var e;null===(e=p.current)||void 0===e||e.stop()}catch(e){}}),[]),o)?(0,r.jsx)("button",{type:"button",onClick:()=>d?function(){try{var e;null===(e=p.current)||void 0===e||e.stop()}catch(e){}u(!1)}():function(){let e=window.SpeechRecognition||window.webkitSpeechRecognition;if(!e)return;let r=new e;p.current=r,r.lang="fr-FR",r.continuous=!0,r.interimResults=!0,x.current=t?t.trimEnd()+" ":"",r.onresult=e=>{let t="";for(let a=0;a<e.results.length;a++)t+=e.results[a][0].transcript;a(x.current+t)},r.onend=()=>u(!1),r.onerror=()=>u(!1);try{r.start(),u(!0)}catch(e){}}(),"aria-label":d?"Arr\xeater la dict\xe9e":"Dicter",title:d?"Arr\xeater la dict\xe9e":"Dicter \xe0 la voix",className:"flex items-center justify-center flex-shrink-0 transition ".concat(d?"text-danger":""," ").concat(l),children:d?(0,r.jsx)(s.Z,{size:16,className:"fill-current"}):(0,r.jsx)(i.Z,{size:17})}):null}},48442:function(e,t,a){"use strict";a.d(t,{PortraitStudio:function(){return y}});var r=a(57437),n=a(2265),s=a(56662),i=a(54802),l=a(82023),o=a(44743),c=a(60332),d=a(51817),u=a(62883),p=a(77891),x=a(44738),h=a(73732),m=a(53113),f=a(92735);let g="#FF4D3D",b=["JANV.","F\xc9VR.","MARS","AVR.","MAI","JUIN","JUIL.","AO\xdbT","SEPT.","OCT.","NOV.","D\xc9C."];function j(e){let{photoUrl:t,defaultName:a,defaultRole:s}=e,[i,o]=(0,n.useState)(a||""),[c,p]=(0,n.useState)(s||""),[x,j]=(0,n.useState)(""),[v,y]=(0,n.useState)("Que faire ce week-end ?"),[N,w]=(0,n.useState)("Nos bonnes adresses du moment"),[S,k]=(0,n.useState)(22),[C,z]=(0,n.useState)(!1),[I,T]=(0,n.use
1State)(""),[O,F]=(0,n.useState)(""),[M,Z]=(0,n.useState)(!1),[A,R]=(0,n.useState)(!1),J=(0,n.useRef)(null),_=(0,n.useRef)(null),[D,L]=(0,n.useState)(.35);(0,n.useEffect)(()=>{let e=J.current;if(!e)return;let t=new ResizeObserver(()=>L(e.clientWidth/1080));return t.observe(e),L(e.clientWidth/1080),()=>t.disconnect()},[]);let E=new Date,V="N\xb0 ".concat(40+E.getMonth()%6," \xb7 ").concat(b[E.getMonth()]," ").concat(E.getFullYear()),P=M&&O?O:t;async function q(){R(!0),T("");try{let e=await fetch("".concat("https://oacqlmrunjfnvgufhcxr.supabase.co","/functions/v1/portrait-cover-photo"),{method:"POST",headers:{"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9hY3FsbXJ1bmpmbnZndWZoY3hyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzYyNjU4NTksImV4cCI6MjA5MTg0MTg1OX0.HUZFZqiqEuL0MKjou9vTtMkOEzeKVAQu5z98r-TZJYY",Authorization:"Bearer ".concat("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9hY3FsbXJ1bmpmbnZndWZoY3hyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzYyNjU4NTksImV4cCI6MjA5MTg0MTg1OX0.HUZFZqiqEuL0MKjou9vTtMkOEzeKVAQu5z98r-TZJYY")},body:JSON.stringify({photo_url:t})}),a=await e.json();if(!e.ok||!a.url){T(a.error||"Le photographe IA a \xe9chou\xe9. R\xe9essayez.");return}F(a.url),Z(!0)}catch(e){T("Le photographe IA a \xe9chou\xe9. R\xe9essayez.")}finally{R(!1)}}async function U(){if(_.current&&!C){z(!0),T("");try{let e=await (0,h.YM)(_.current,{width:1080,height:1080,pixelRatio:1,cacheBust:!0}),t=document.createElement("a");t.href=e,t.download="ma-une-toutmontpellier.png",t.click()}catch(e){T("T\xe9l\xe9chargement impossible — r\xe9essayez.")}finally{z(!1)}}}let Y="w-full bg-surface border border-edge rounded-lg px-3 py-2 text-sm text-dark outline-none focus:border-brand";return(0,r.jsxs)("div",{className:"mt-7 bg-surface-card border border-edge rounded-2xl p-5",children:[(0,r.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-[0.12em] text-brand",children:[(0,r.jsx)(l.Z,{size:13})," Le photographe IA"]}),(0,r.jsx)("h3",{className:"font-heading font-extrabold text-lg text-dark mt-1",children:"Votre portrait fait la couverture"}),(0,r.jsxs)("p",{className:"text-[13px] text-dark-secondary mt-1",children:["\xc0 partir de votre photo, on compose votre une de ",(0,r.jsx)("b",{children:"toutmontpellier.fr"}),". Modifiez les textes, ajustez le cadrage, puis t\xe9l\xe9chargez-la pour la partager."]}),(0,r.jsx)("div",{ref:J,className:"mt-4 mx-auto rounded-2xl overflow-hidden shadow-lg",style:{width:"100%",maxWidth:420,aspectRatio:"1 / 1"},children:(0,r.jsx)("div",{style:{width:1080,height:1080,transform:"scale(".concat(D,")"),transformOrigin:"top left"},children:(0,r.jsxs)("div",{ref:_,style:{position:"relative",width:1080,height:1080,overflow:"hidden",background:"#0a1024",fontFamily:"'Segoe UI','Helvetica Neue',Arial,sans-serif"},children:[P?(0,r.jsx)("img",{src:P,alt:"",crossOrigin:"anonymous",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center ".concat(S,"%")}}):(0,r.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#39435f"},children:(0,r.jsx)(m.Z,{size:90})}),(0,r.jsx)("div",{style:{position:"absolute",top:0,left:0,right:0,height:"40%",background:"linear-gradient(180deg,rgba(6,11,28,.82),rgba(6,11,28,.35) 55%,rgba(6,11,28,0))"}}),(0,r.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:"62%",background:"linear-gradient(0deg,rgba(6,11,28,.95) 8%,rgba(6,11,28,.6) 45%,rgba(6,11,28,0))"}}),(0,r.jsxs)("div",{style:{position:"absolute",top:40,left:0,right:0,textAlign:"center"},children:[(0,r.jsxs)("div",{style:{fontWeight:900,fontSize:82,letterSpacing:"-3px",color:"#fff",lineHeight:1},children:["tout",(0,r.jsx)("span",{style:{color:g},children:"montpellier"}),(0,r.jsx)("span",{style:{color:"#9aa4bd"},children:".fr"})]}),(0,r.jsx)("div",{style:{marginTop:12,color:"#dfe4ef",fontSize:16,fontWeight:700,letterSpacing:6},children:"LE MAGAZINE DES MONTPELLI\xc9RAIN\xb7ES"})]}),(0,r.jsxs)("div",{style:{position:"absolute",left:58,right:58,bottom:96},children:[(0,r.jsx)("div",{style:{color:g,fontWeight:800,fontSize:26,letterSpacing:5,marginBottom:6},children:"PORTRAIT"}),(0,r.jsx)("div",{style:{color:"#fff",fontWeight:900,fontSize:(i||"Votre pr\xe9nom").length>12?78:104,lineHeight:.92,letterSpacing:"-2px",textShadow:"0 3px 22px rgba(0,0,0,.45)"},children:i||"Votre pr\xe9nom"}),c&&(0,r.jsx)("div",{style:{color:"#eef1f7",fontSize:33,fontWeight:600,marginTop:12},children:c}),x&&(0,r.jsxs)("div",{style:{color:"#c7cede",fontSize:27,fontStyle:"italic",marginTop:8},children:["\xab ",x," \xbb"]}),(0,r.jsx)("div",{style:{marginTop:20,display:"flex",flexDirection:"column",gap:9}
1,children:[v,N].filter(Boolean).map((e,t)=>(0,r.jsxs)("div",{style:{color:"#eef1f7",fontSize:23,fontWeight:600},children:[(0,r.jsx)("span",{style:{color:g,fontWeight:900,marginRight:9},children:"▸"}),e]},t))})]}),(0,r.jsx)("div",{style:{position:"absolute",bottom:40,right:58,color:"rgba(255,255,255,.82)",fontSize:20,fontWeight:700,letterSpacing:2,textShadow:"0 2px 10px rgba(0,0,0,.5)"},children:V})]})})}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-4 justify-center",children:[(0,r.jsx)("button",{type:"button",onClick:q,disabled:A,className:"inline-flex items-center gap-2 bg-brand text-white font-semibold text-[13px] px-4 py-2.5 rounded-xl disabled:opacity-50",children:A?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{size:15,className:"animate-spin"})," Le photographe IA op\xe8re… (~1 min)"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Z,{size:15})," Sublimer par le photographe IA"]})}),O&&(0,r.jsxs)("div",{className:"inline-flex rounded-xl border border-edge overflow-hidden text-[12px] font-medium",children:[(0,r.jsx)("button",{type:"button",onClick:()=>Z(!1),className:"px-3 py-2 ".concat(M?"text-dark-secondary":"bg-brand text-white"),children:"Ma photo"}),(0,r.jsx)("button",{type:"button",onClick:()=>Z(!0),className:"px-3 py-2 ".concat(M?"bg-brand text-white":"text-dark-secondary"),children:"Version IA ✨"})]})]}),(0,r.jsxs)("label",{className:"flex items-center gap-3 mt-4 text-[12px] text-dark-secondary",children:[(0,r.jsx)("span",{className:"flex-shrink-0",children:"Cadrage"}),(0,r.jsx)("input",{type:"range",min:0,max:60,value:S,onChange:e=>k(Number(e.target.value)),className:"flex-1 accent-brand"})]}),(0,r.jsxs)("div",{className:"grid sm:grid-cols-2 gap-2.5 mt-3",children:[(0,r.jsx)("input",{value:i,onChange:e=>o(e.target.value),placeholder:"Votre pr\xe9nom",className:Y,maxLength:22}),(0,r.jsx)("input",{value:c,onChange:e=>p(e.target.value),placeholder:"Votre r\xf4le (ex. c\xe9ramiste \xe0 l’\xc9cusson)",className:Y,maxLength:40}),(0,r.jsx)("input",{value:x,onChange:e=>j(e.target.value),placeholder:"Une petite phrase (facultatif)",className:"".concat(Y," sm:col-span-2"),maxLength:48}),(0,r.jsx)("input",{value:v,onChange:e=>y(e.target.value),placeholder:"Accroche 1",className:Y,maxLength:38}),(0,r.jsx)("input",{value:N,onChange:e=>w(e.target.value),placeholder:"Accroche 2",className:Y,maxLength:38})]}),I&&(0,r.jsx)("p",{className:"text-[12px] text-danger mt-2",children:I}),(0,r.jsx)("button",{type:"button",onClick:U,disabled:C,className:"mt-4 w-full inline-flex items-center justify-center gap-2 bg-brand text-white font-semibold text-[14px] px-4 py-3 rounded-xl hover:bg-brand-dark disabled:opacity-50",children:C?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{size:16,className:"animate-spin"})," Pr\xe9paration…"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.Z,{size:16})," T\xe9l\xe9charger ma une"]})})]})}var v=a(3548);function y(e){let{prenom:t}=e,{user:a}=(0,x.a)(),h="Bonjour ".concat(t||"").concat(t?" ":"","! Moi c'est Montpellito \uD83C\uDF0A Je vais vous poser quelques questions, puis j'\xe9crirai votre portrait de Montpelli\xe9rain\xb7e — \xe0 partager fi\xe8rement autour de vous. Pour commencer, dites-moi : qui \xeates-vous, et qu'est-ce qui vous occupe \xe0 Montpellier ?"),[m,f]=(0,n.useState)([{role:"assistant",content:h}]),[g,b]=(0,n.useState)(""),[y,N]=(0,n.useState)(!1),[w,S]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),[z,I]=(0,n.useState)(""),[T,O]=(0,n.useState)(""),[F,M]=(0,n.useState)(""),[Z,A]=(0,n.use
1State)(!1),[R,J]=(0,n.useState)(null),[_,D]=(0,n.useState)(""),[L,E]=(0,n.useState)(null),[V,P]=(0,n.useState)(!1),[q,U]=(0,n.useState)(!1),[Y,W]=(0,n.useState)(""),X=(0,n.useRef)(null);(0,n.useEffect)(()=>{var e;null===(e=X.current)||void 0===e||e.scrollTo({top:X.current.scrollHeight,behavior:"smooth"})},[m,y]),(0,n.useEffect)(()=>{(0,v.j)("portrait_view")},[]);let B="tm_portrait_draft_v1",H=(0,n.useRef)(!1);(0,n.useEffect)(()=>{try{let e=localStorage.getItem(B);if(e){let t=JSON.parse(e);Array.isArray(t.messages)&&t.messages.length>1&&f(t.messages),"string"==typeof t.photo&&S(t.photo),"string"==typeof t.nom&&I(t.nom),"string"==typeof t.activite&&O(t.activite),"string"==typeof t.site&&M(t.site)}}catch(e){}H.current=!0},[]),(0,n.useEffect)(()=>{if(H.current&&!y)try{localStorage.setItem(B,JSON.stringify({messages:m,photo:w,nom:z,activite:T,site:F}))}catch(e){}},[m,w,z,T,F,y]);let G=m.filter(e=>"user"===e.role&&e.content.trim().length>2).length,Q=!!a||/^\S+@\S+\.\S+$/.test(Y.trim()),K=G>=3&&Q&&!Z&&!y;async function $(e){let t=e.trim();if(!t||y)return;0===m.filter(e=>"user"===e.role).length&&(0,v.j)("portrait_started"),b(""),D("");let a=[...m,{role:"user",content:t}];f([...a,{role:"assistant",content:""}]),N(!0);try{let e=a.filter((e,t)=>t>0),t=await fetch("/api/portrait/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:e})});if(!t.ok||!t.body)throw Error();let r=t.body.getReader(),n=new TextDecoder,s="";for(;;){let{done:e,value:t}=await r.read();if(e)break;s+=n.decode(t,{stream:!0}),f([...a,{role:"assistant",content:s}])}}catch(e){f([...a,{role:"assistant",content:"Oups, une erreur. R\xe9essayez ?"}])}finally{N(!1)}}async function ee(e){C(!0),D("");let t=new FormData;t.append("file",e);let a=await fetch("/api/portrait/upload",{method:"POST",body:t}),r=await a.json();if(C(!1),!a.ok){D(r.error||"Upload impossible");return}S(r.url)}async function et(){A(!0),D("");try{let e=m.filter((e,t)=>t>0),t=await fetch("/api/portrait/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:e,photo_url:w,nom:z,activite:T,site:F,email:Y.trim()})}),a=await t.json();if(!t.ok){D(a.error||"G\xe9n\xe9ration impossible");return}J({title:a.title,html:a.html,id:a.id}),(0,v.j)("portrait_finished",a.id?{id:a.id}:{});try{localStorage.removeItem(B)}catch(e){}window.scrollTo({top:0,behavior:"smooth"}),a.id&&fetch("/api/portrait/backlink",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"offer",article_id:a.id})}).then(e=>e.json()).then(e=>{e.eligible&&E({url:e.url,linkCents:e.linkCents,spotlightCents:e.spotlightCents,anchorCents:e.anchorCents})}).catch(()=>{})}finally{A(!1)}}async function ea(e){if((null==R?void 0:R.id)&&!V){P(!0);try{let t=await fetch("/api/portrait/backlink",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"checkout",article_id:R.id,tier:e})}),a=await t.json();a.url?window.location.href=a.url:P(!1)}catch(e){P(!1)}}}(0,n.useEffect)(()=>{try{"ok"===new URLSearchParams(window.location.search).get("backlink")&&U(!0)}catch(e){}},[]);let er="w-full bg-surface border border-edge rounded-xl px-3.5 py-2.5 text-sm text-dark outline-none focus:border-brand",en=e=>(e/100).toFixed(2).replace(".",",")+" €";return R?(0,r.jsxs)("div",{className:"max-w-2xl mx-auto px-4 pt-6 pb-16",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-success mb-2",children:[(0,r.jsx)(i.Z,{size:18}),(0,r.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-[0.12em]",children:"Votre portrait est pr\xeat"})]}),(0,r.jsx)("h1",{className:"font-heading font-extrabold text-2xl md:text-3xl text-dark tracking-tight",children:R.title}),(0,r.jsxs)("p",{className:"text-sm text-dark-secondary mt-2 bg-brand/[0.08] border border-brand/25 rounded-xl px-4 py-3",children:["Merci ! Votre portrait passe une relecture \xe9clair et sera ",(0,r.jsx)("strong",{children:"en ligne tr\xe8s vite"}),". Vous pourrez le partager \xe0 tout votre r\xe9seau \uD83C\uDF89"]}),w&&(0,r.jsx)("div",{className:"relative aspect-[4/5] max-w-xs mx-auto rounded-2xl overflow-hidden mt-6",children:(0,r.jsx)("img",{src:w,alt:"",className:"absolute inset-0 w-full h-full object-cover",style:{objectPosition:"center 25%"}})}),(0,r.jsx)("div",{className:"lieu-content lieu-article mt-6",dangerouslySetInnerHTML:{__html:(0,s.zu)(R.html||"")}}),q?(0,r.jsxs)("div",{className:"mt-8 rounded-2xl border border-sun/30 p-5 text-center",style:{background:"linear-gradient(135deg, rgba(255,168,40,0.12), rgba(255,168,40,0.04))"},children:[(0,r.jsx)("div",{className:"text-3xl",children:"\uD83D\uDE80"}),(0,r.jsx)("p",{className:"font-heading font-extrabold text-lg text-dark mt-1",children:"Merci ! Votre c
1oup de projecteur est activ\xe9."}),(0,r.jsx)("p",{className:"text-sm text-dark-secondary mt-1.5 max-w-md mx-auto",children:"D\xe8s la mise en ligne de votre portrait, votre site b\xe9n\xe9ficiera d’un lien depuis toutmontpellier.fr — un vrai coup de pouce pour votre r\xe9f\xe9rencement. \uD83D\uDE4C"})]}):L?(0,r.jsx)("div",{className:"mt-8 rounded-2xl overflow-hidden border border-sun/30",style:{background:"linear-gradient(135deg, #12213a 0%, #0c1533 70%)"},children:(0,r.jsxs)("div",{className:"p-6 text-white",children:[(0,r.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-[0.14em] text-sun",children:[(0,r.jsx)(l.Z,{size:13})," Offre exceptionnelle \xb7 initiatives locales"]}),(0,r.jsx)("h3",{className:"font-heading font-extrabold text-xl md:text-[22px] mt-2 leading-tight",children:"Et si votre site profitait, lui aussi, de Montpellier\xa0?"}),(0,r.jsxs)("p",{className:"text-white/75 text-[13.5px] mt-2 leading-snug",children:["On met en avant votre portrait ",(0,r.jsx)("b",{className:"text-white",children:"et"})," un lien vers ",(0,r.jsx)("b",{className:"text-white break-all",children:L.url}),". Un lien depuis un m\xe9dia local reconnu booste votre ",(0,r.jsx)("b",{className:"text-white",children:"r\xe9f\xe9rencement Google"})," — ce qu’on facture d’habitude 250\xa0€ et plus."]}),(0,r.jsxs)("div",{className:"grid sm:grid-cols-2 gap-3 mt-4",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-white/15 p-4 flex flex-col",children:[(0,r.jsx)("p",{className:"font-heading font-bold text-[15px]",children:"Le lien"}),(0,r.jsx)("ul",{className:"text-[12.5px] text-white/70 mt-1.5 space-y-1 flex-1",children:(0,r.jsx)("li",{children:"✓ Lien dofollow vers votre site"})}),(0,r.jsxs)("div",{className:"flex items-end gap-2 mt-3",children:[(0,r.jsx)("span",{className:"text-2xl font-extrabold leading-none",children:en(L.linkCents)}),(0,r.jsx)("span",{className:"text-white/40 line-through text-sm",children:en(L.anchorCents)})]}),(0,r.jsx)("button",{onClick:()=>ea("link"),disabled:V,className:"mt-3 w-full bg-white/10 hover:bg-white/[0.16] text-white font-semibold rounded-lg py-2.5 text-[13px] transition disabled:opacity-50",children:"Choisir"})]}),(0,r.jsxs)("div",{className:"relative rounded-xl border-2 border-sun p-4 flex flex-col",style:{background:"rgba(255,168,40,0.06)"},children:[(0,r.jsx)("span",{className:"absolute -top-2.5 left-4 bg-sun text-[#0c1533] text-[10px] font-bold uppercase tracking-wide px-2 py-0.5 rounded-full",children:"Le + fort"}),(0,r.jsx)("p",{className:"font-heading font-bold text-[15px] text-sun",children:"Le projecteur"}),(0,r.jsxs)("ul",{className:"text-[12.5px] text-white/85 mt-1.5 space-y-1 flex-1",children:[(0,r.jsxs)("li",{children:["✓ ",(0,r.jsx)("b",{className:"text-white",children:"\xc0 la une"})," de la home 24h"]}),(0,r.jsxs)("li",{children:["✓ ",(0,r.jsx)("b",{className:"text-white",children:"Publication prioritaire"})]}),(0,r.jsx)("li",{children:"✓ Lien dofollow vers votre site"})]}),(0,r.jsx)("div",{className:"flex items-end gap-2 mt-3",children:(0,r.jsx)("span",{className:"text-2xl font-extrabold leading-none",children:en(L.spotlightCents)})}),(0,r.jsx)("button",{onClick:()=>ea("spotlight"),disabled:V,className:"mt-3 w-full bg-sun text-[#0c1533] font-semibold rounded-lg py-2.5 text-[13px] hover:opacity-90 transition disabled:opacity-50",children:V?"…":"Choisir"})]})]}),(0,r.jsx)("p",{className:"text-white/45 text-[11px] text-center mt-3",children:"Paiement unique s\xe9curis\xe9 \xb7 sites v\xe9rifi\xe9s uniquement"})]})}):null]}):(0,r.jsxs)("div",{className:"max-w-2xl mx-auto px-4 pt-6 pb-16",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-brand mb-1",children:[(0,r.jsx)(l.Z,{size:16}),(0,r.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-[0.12em]",children:"Portrait de Montpelli\xe9rain\xb7e"})]}),(0,r.jsx)("h1",{className:"font-heading font-extrabold text-2xl md:text-3xl text-dark tracking-tight",children:"Faites la une de toutmontpellier.fr"}),(0,r.jsx)("p",{className:"text-sm text-dark-secondary mt-1.5",children:"Montpellito vous interviewe, puis \xe9crit votre portrait — publi\xe9 sur le m\xe9dia local, \xe0 partager fi\xe8rement. R\xe9pondez naturellement (au clavier ou \xe0 la voix \uD83C\uDF99️)."}),(0,r.jsx)("div",{ref:X,className:"mt-5 max-h-[52vh] overflow-y-auto flex flex-col gap-3 pr-1",children:m.map((e,t)=>"assistant"===e.role?(0,r.jsxs)("div",{className:"flex gap-2.5",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full overflow-hidden flex-shrink-0 bg-[#16233f]",children:(0,r.jsx)("img",{src:"/.netlify/images?url=https%3A%2F%2Foacqlmrunjfnvgufhcxr.supabase.co%2Fstorage%2Fv1%2Fobject%2Fpublic%2Fmedia-library%2Fmontpellito%2Ftete.png&w=128&h=128&fit=cover",alt:"Montpellito",className:"w-full h-full object-cover"})}),(0,r.jsx)("div",{className:"bg-surface rounded-2xl rounded-tl-sm px-3.5 py-2.5 text-sm text-dark leading-relaxed max-w-[85%]",children:e.content||(0,r.jsxs)("span",{className:"inline-flex gap-1 items-center text-dark-muted",children:[(0,r.jsx)(l.Z,{size:13,className:"animate-pulse"})," …"]})})]},t):(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)("div",{className:"bg-brand text-white rounded-2xl rounded-tr-sm px-3.5 py-2.5 text-sm max-w-[85%] leading-relaxed",children:e.content})},t))}),(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),$(g)},className:"mt-3 flex items-center gap-2",children:[(0,r.jsx)("input",{value:g,onChange:e=>b(e.target.value),placeholder:"Votre r\xe9ponse… (ou dictez \uD83C\uDF99️)",className:er,autoComplete:"off"}),(0,r.jsx)(p.l,{value:g,onChange:b,className:"w-10 h-10 rounded-full border border-edge text-dark-secondary hover:border-brand"}),(0,r.jsx)("button",{type:"submit",disabled:y||!g.trim(),className:"w-10 h-10 rounded-full bg-brand flex items-center justify-center text-white disabled:opacity-40 flex-shrink-0",children:(0,r.jsx)(o.Z,{size:17})})]}),(0,r.jsxs)("div",{className:"mt-7 bg-surface-card border border-edge rounded-2xl p-5",children:[(0,r.jsxs)("p",{className:"font-heading font-bold text-[15px] text-dark",children:["Votre photo & vos infos ",(0,r.jsx)("span",{className:"font-normal text-dark-muted text-[13px]",children:"(optionnel mais recommand\xe9)"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4 mt-3",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-xl overflow-hidden bg-surface border border-edge flex-shrink-0",children:w?(0,r.jsx)("img",{src:w,alt:"",className:"w-full h-full object-cover"}):(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center text-dark-muted",children:(0,r.jsx)(c.Z,{size:20})})}),(0,r.jsxs)("label",{className:"inline-flex items-center gap-2 border border-edge text-dark font-medium text-sm px-4 py-2.5 rounded-xl hover:border-brand transition cursor-pointer",children:[k?(0,r.jsx)(d.Z,{size:16,className:"animate-spin"}):(0,r.jsx)(c.Z,{size:16})," ",w?"Changer la photo":"Ajouter votre photo",(0,r.jsx)("input",{type:"file",accept:"image/*",className:"hidden",onChange:e=>{var t;let a=null===(t=e.target.files)||void 0===t?void 0:t[0];a&&ee(a)}})]})]}),(0,r.jsxs)("div",{className:"grid sm:grid-cols-2 gap-2.5 mt-3",children:[(0,r.jsx)("input",{value:z,onChange:e=>I(e.target.value),placeholder:"Nom de votre entreprise / structure",className:er,maxLength:120}),(0,r.jsx)("input",{value:F,onChange:e=>M(e.target.value),placeholder:"Site web ou Instagram",className:er,maxLength:200}),(0,r.jsx)("input",{value:T,onChange:e=>O(e.target.value),placeholder:"Votre activit\xe9 en quelques mots",className:"".concat(er," sm:col-span-2"),maxLength:160})]}
1),!a&&(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)("input",{type:"email",value:Y,onChange:e=>W(e.target.value),placeholder:"Votre email — pour \xeatre pr\xe9venu\xb7e d\xe8s la publication ✉️",className:er,maxLength:160,autoComplete:"email"}),(0,r.jsx)("p",{className:"text-[11px] text-dark-muted mt-1.5",children:"On vous pr\xe9vient d\xe8s que votre portrait est en ligne, avec le lien \xe0 partager. Aucun compte \xe0 cr\xe9er."})]})]}),w&&(0,r.jsx)(j,{photoUrl:w,defaultName:t,defaultRole:T}),_&&(0,r.jsx)("p",{className:"text-sm text-danger bg-danger/10 border border-danger/25 rounded-xl px-4 py-2.5 mt-4",children:_}),(0,r.jsx)("button",{type:"button",disabled:!K,onClick:et,className:"mt-5 w-full inline-flex items-center justify-center gap-2 bg-brand text-white font-semibold text-[15px] px-5 py-3.5 rounded-xl hover:bg-brand-dark transition disabled:opacity-40",children:Z?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{size:18,className:"animate-spin"})," Montpellito \xe9crit votre portrait…"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Z,{size:18})," G\xe9n\xe9rer mon portrait"]})}),!K&&!Z&&(0,r.jsx)("p",{className:"text-[12px] text-dark-muted text-center mt-2",children:"R\xe9pondez \xe0 quelques questions de Montpellito pour d\xe9bloquer la g\xe9n\xe9ration."})]})}},3548:function(e,t,a){"use strict";a.d(t,{Z0:function(){return o},j:function(){return l},yV:function(){return c}});let r="tm_session_id";function n(){let e=function(e){try{return localStorage.getItem(e)}catch(e){return null}}(r);return e||function(e,t){try{localStorage.setItem(e,t)}catch(e){}}(r,e=function(){try{if("undefined"!=typeof crypto&&crypto.randomUUID)return crypto.randomUUID()}catch(e){}return"s_".concat(Date.now().toString(36),"_").concat(Math.random().toString(36).slice(2,10))}()),e}function s(){let e={};try{document.referrer&&(e.referrer=document.referrer.slice(0,400));let t=new URLSearchParams(location.search);for(let a of["utm_source","utm_medium","utm_campaign"]){let r=t.get(a);r&&(e[a]=r.slice(0,120))}}catch(e){}return e}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{let a=window.gtag;"function"==typeof a&&a("event",e,t)}catch(e){}}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n();a&&(i(e,t),fetch("/api/events",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({session_id:a,name:e,payload:t,...s()})}).catch(()=>{}))}function o(e){let t=n();t&&(i("page_view",{page_path:e,page_location:"undefined"!=typeof location?location.href:e}),fetch("/api/events",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({session_id:t,name:"page_view",path:e,payload:{},...s()})}).catch(()=>{}))}function c(e){let t=n();t&&fetch("/api/identify",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({session_id:t,...e})}).catch(()=>{})}},56662:function(e,t,a){"use strict";a.d(t,{zu:function(){return i}});var r=a(90498),n=a.n(r);let s={allowedTags:n().defaults.allowedTags.concat(["img","h1","h2"]),allowedAttributes:{"*":["class","id"],a:["href","name","target","rel"],img:["src","alt","title","loading","decoding","width","height"]},allowedSchemes:["http","https","mailto","tel"],allowedSchemesByTag:{img:["http","https"]},disallowedTagsMode:"discard",exclusiveFilter:e=>{var t,a;let r=(null===(t=e.attribs)||void 0===t?void 0:t.id)||"",n=(null===(a=e.attribs)||void 0===a?void 0:a.class)||"";
1return/\bez-toc/.test(r)||/\bez-toc/.test(n)},transformTags:{a:n().simpleTransform("a",{rel:"noopener"},!0)}};function i(e){let t;if(!e)return"";try{t=n()(e,s)}catch(a){t=e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim()}return(t=(t=t.replace(/\[\/?[a-z0-9_-]+[^\]]*\]/gi,"")).replace(/<img (?![^>]*\bloading=)/gi,'<img loading="lazy" decoding="async" ')).trim()}}},function(e){e.O(0,[4609,498,4144,4738,2971,2117,1744],function(){return e(e.s=84396)}),_N_E=e.O()}]);

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.