1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8582],{17939:(e,r,t)=>{t.d(r,{qH:()=>i});var s=t(24940);let n={register_started:1,register_completed:2,email_verified:3,alert_created:4};function i(e,r={}){(0,s.sx)("activation_funnel_step",{funnel_name:"activation",funnel_step:n[e],funnel_step_name:e,...r})}},56606:(e,r,t)=>{function s(e,r,t){let s=t.trim();return{search_scope:e,tcg:r,query_length:s.length,token_count:s?s.split(/\s+/).length:0}}function n(e){return{alert_type:e.type,product_id:e.productId,channel:e.channel,source:e.source,merchant_scope:e.merchant||"all"}}t.d(r,{h:()=>s,n:()=>n})},88582:(e,r,t)=>{t.r(r),t.d(r,{AlertCreateDialog:()=>G});var s=t(95155),n=t(12115),i=t(98500),l=t.n(i),a=t(65377),o=t(9005),c=t(92571),d=t(93089),u=t(64577),m=t(15298),x=t(6073),p=t(16720),h=t(75796),f=t(24551),g=t(9383),b=t(66609),v=t(22356),j=t(56606),N=t(24940),_=t(17939),y=t(9726),w=t(13442),k=t(63076),C=t(41757),A=t(10234),$=t(4474),D=t(88599),S=t(4363),R=t(10360),T=t(74350),q=t(39658),E=t(79792),M=t(91337);function P(e){return Math.round(100*e)/100}function F(e){return e?e.offers.length?e.offers:Object.values(e.sites):[]}function L(e){return w.ej[e]?.label??e}function z(e,r){let t=(0,M.Fb)(r),s=(0,M.Fb)(e.name),n=(0,M.Fb)(e.set_code);return s===t?0:s.startsWith(t)?1:n.startsWith(t)?2:s.includes(t)?3:4}function I(e){return[A.ii[e.tcg].shortLabel,e.set_code,e.product_type,null!=e.min_price?`d\xe8s ${(0,M.$g)(e.min_price)}`:null].filter(Boolean).join(" \xb7 ")}function J(e,r){let t=F(e).filter(e=>e.active&&!e.link_only),s=t.filter(e=>"vendeur_tiers"!==e.category),n=s.filter(e=>(0,k.pI)(e)&&null!=e.last_price).map(e=>e.last_price);if(n.length){let e=Math.min(...n);return{value:P(.9*e),label:`Prix observ\xe9 ${(0,M.$g)(e)} : seuil sugg\xe9r\xe9 \xe0 -10 %.`}}let i=s.filter(e=>null!=e.last_price).map(e=>e.last_price);if(i.length){let e=Math.min(...i);return{value:P(.9*e),label:`Dernier prix connu ${(0,M.$g)(e)} : seuil sugg\xe9r\xe9 \xe0 -10 %.`}}if(e?.retail_reference_price!=null)return{value:P(e.retail_reference_price),label:`${e.retail_reference_price_is_estimated?"Prix conseill\xe9 estim\xe9":"Prix conseill\xe9"} disponible : ${(0,M.$g)(e.retail_reference_price)}.`};let l=t.filter(e=>null!=e.last_price).map(e=>e.last_price);if(l.length){let e=Math.min(...l);return{value:P(.9*e),label:`Prix marketplace ${(0,M.$g)(e)} : seuil sugg\xe9r\xe9 \xe0 -10 %.`}}return null!=r?{value:P(r),label:"Seuil pr\xe9rempli depuis la page pr\xe9c\xe9dente."}:{value:null,label:null}}function G(e){let r=[e.open?"open":"closed",e.alert?.id??"new",e.fixedProduct?.id??"catalog",e.initialThreshold??"default"].join(":");return(0,s.jsx)(O,{...e},r)}function O({open:e,onOpenChange:r,alert:t,products:i,productsLoading:k=!1,onSaved:P,onCreated:G,fixedProduct:V,initialThreshold:H,onProductSelected:U}){let{user:W,loading:Z}=(0,y.A)(),B=V?J(V,H).value:null,[K,Q]=(0,n.useState)(t?.product_id??V?.id??""),[X,Y]=(0,n.useState)(t?.type??"price_below"),[ee,er]=(0,n.useState)(t?.channel??"email"),[et,es]=(0,n.useState)(t?.threshold?.toString()??(null!=B?B.toFixed(2):"")),[en,ei]=(0,n.useState)(t?.site??""),[el,ea]=(0,n.useState)(t?.active??!0),[eo,ec]=(0,n.useState)(""),[ed,eu]=(0,n.use
1State)(!1),[em,ex]=(0,n.useState)(0),[ep,eh]=(0,n.useState)([]),[ef,eg]=(0,n.useState)("idle"),[eb,ev]=(0,n.useState)(!1),[ej,eN]=(0,n.useState)(void 0),[e_,ey]=(0,n.useState)(void 0),[ew,ek]=(0,n.useState)(void 0),[eC,eA]=(0,n.useState)([]),e$=(0,n.useRef)(null),eD=(0,n.useRef)(null),eS=(0,n.useRef)(0),eR=void 0===i&&!V&&!t,eT=i??ep;(0,n.useEffect)(()=>{if(!e)return;let r=!1;return(0,v.nr)("/api/public-config").then(e=>{r||eA(e.visible_merchants??[])}).catch(()=>{r||eA([])}),()=>{r=!0}},[e]),(0,n.useEffect)(()=>{e&&!t&&(0,N.sx)("alert_opened",{source:V?"product":"alerts"})},[t,V,e]),(0,n.useEffect)(()=>()=>{null!==e$.current&&window.clearTimeout(e$.current),eD.current?.abort()},[]);let eq=(0,n.useMemo)(()=>V||(""===K?null:eT.find(e=>e.id===Number(K))??null),[V,eT,K]),eE=(0,n.useMemo)(()=>J(eq,H),[eq,H]),eM=(0,n.useMemo)(()=>(function(e){let r=new Map;for(let t of F(e)){if(!t.active||!t.url)continue;let e=r.get(t.site);(!e||(t.last_price??1/0)<(e.last_price??1/0))&&r.set(t.site,t)}return Array.from(r.values()).sort((e,r)=>L(e.site).localeCompare(L(r.site),"fr"))})(eq),[eq]),eP=eM.map(e=>L(e.site)),eF=(0,n.useMemo)(()=>new Set(eM.map(e=>e.site)),[eM]),eL=(0,n.useMemo)(()=>{let e=(e,r)=>L(e).localeCompare(L(r),"fr"),r=w.SZ.filter(e=>eC.includes(e));return{followed:r.filter(e=>eF.has(e)).sort(e),others:r.filter(e=>!eF.has(e)).sort(e)}},[eF,eC]),ez=""!==en&&eF.has(en),eI=V?(0,C.p0)(V):"/alerts",eJ=`/register?next=${encodeURIComponent(eI)}`;(0,n.useEffect)(()=>{if(!e||!W)return;let r=!1;return(0,v.nr)("/api/user/telegram").then(e=>{r||eN(e.chat_id)}).catch(e=>{if(e instanceof v.hD&&401===e.status){r||eN(null);return}r||eN(void 0)}),(0,v.nr)("/api/user/discord").then(e=>{r||ey(e.configured)}).catch(e=>{if(e instanceof v.hD&&401===e.status){r||ey(!1);return}r||ey(void 0)}),(0,v.nr)("/api/user/discord/dm").then(e=>{r||ek(e.connected)}).catch(e=>{if(e instanceof v.hD&&401===e.status){r||ek(!1);return}r||ek(void 0)}),()=>{r=!0}},[e,W]);let eG=(0,n.useMemo)(()=>eR?ep:eo.trim()?eT.map((e,r)=>({product:e,index:r})).filter(({product:e})=>(0,M.xs)(eo,[e.name,e.normalized_name,e.set_code,e.product_type,e.series,e.ean,A.ii[e.tcg].label,A.ii[e.tcg].shortLabel])).sort((e,r)=>z(e.product,eo)-z(r.product,eo)||e.index-r.index).slice(0,8).map(({product:e})=>e):[],[eT,eo,ep,eR]);function eO(e){if(!eR)return;eS.current+=1;let r=eS.current;null!==e$.current&&(window.clearTimeout(e$.current),e$.current=null),eD.current?.abort(),eD.current=null;let t=e.trim();if(t.length<2){eh([]),eg("idle");return}eh([]),eg("loading"),e$.current=window.setTimeout(()=>{let e=new AbortController;eD.current=e,(0,v.zh)(t,e.signal).then(e=>{r===eS.current&&(eh(e),eg("ready"))}).catch(e=>{r===eS.current&&e?.name!=="AbortError"&&(eh([]),eg("error"))})},250)}function eV(e){Q(e.id),ec(e.name),eu(!1),ex(0);let r=J(e,H).value;es(null!=r?r.toFixed(2):""),U?.()}async function eH(e){if(e.preventDefault(),""===K)return void b.oR.error("S\xe9lectionne un produit");if("price_below"===X&&!et)return void b.oR.error("Le seuil de prix est requis");let s="price_below"===X?Number(String(et).replace(",",".")):null;if("price_below"===X&&(!Number.isFinite(s)||null==s||s<=0))return void b.oR.error("Le seuil de prix est invalide");if(!W)return void b.oR.error("Cr\xe9e un compte pour cr\xe9er une alerte");ev(!0);let n={product_id:Number(K),type:X,channel:ee,threshold:s,site:en||null,active:el};try{if(t)await (0,v.nr)(`/api/alerts/${t.id}`,{method:"PATCH",body:{type:n.type,channel:n.channel,threshold:n.threshold,site:n.site,active:n.active}}),b.oR.success("Alerte mise \xe0 jour");else{let e=await (0,v.nr)("/api/alerts",{method:"POST",body:n});(0,N.sx)("alert_created",(0,j.n)({type:X,productId:Number(K),source:V?"product":"alerts",channel:ee,merchant:en})),(0,_.qH)("alert_created",{channel:ee,merchant_scope:en||"all"}),G?.(e),b.oR.success("Alerte cr\xe9\xe9e")}P(),r(!1)}catch(r){let e=r instanceof v.hD?r.message:"Erreur";b.oR.error(`\xc9chec : ${e}`)}finally{ev(!1)}}return(0,s.jsx)(T.lG,{open:e,onOpenChange:r,children:(0,s.jsxs)(T.Cf,{className:"max-h-[90vh] overflow-y-auto sm:max-w-lg",onInteractOutside:e=>{let r=e.target;
1r instanceof Element&&r.closest("[data-first-alert-tour-popover]")&&e.preventDefault()},children:[(0,s.jsxs)(T.c7,{children:[(0,s.jsx)(T.L3,{children:t?"\xc9diter l'alerte":"Cr\xe9er une alerte en quelques secondes"}),(0,s.jsx)(T.rr,{children:"Choisis ce que tu veux surveiller. PrixTCG v\xe9rifiera les marchands connus pour ce produit et d\xe9clenchera lâalerte d\xe8s quâune condition est remplie."})]}),(0,s.jsxs)("form",{onSubmit:eH,className:"space-y-4",children:[V?(0,s.jsxs)("div",{className:"rounded-lg border border-border/70 bg-secondary/30 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Produit suivi"}),(0,s.jsx)(D.S,{tcg:V.tcg,compact:!0})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm font-semibold text-foreground",children:[V.set_code?`[${V.set_code}] `:"",V.name]})]}):t?(0,s.jsxs)("div",{className:"rounded-lg border border-border/70 bg-secondary/30 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Produit suivi \xb7 non modifiable"}),(0,s.jsx)(D.S,{tcg:t.product.tcg,compact:!0})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm font-semibold text-foreground",children:[t.product.set_code?`[${t.product.set_code}] `:"",t.product.name]})]}):(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(E.J,{htmlFor:"product",children:"Produit"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.A,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground","aria-hidden":!0}),(0,s.jsx)(q.p,{id:"product","data-first-alert-tour":"product",role:"combobox","aria-autocomplete":"list","aria-controls":"alert-product-results","aria-expanded":ed&&eo.trim().length>=(eR?2:1),"aria-activedescendant":ed&&eG[em]?`alert-product-${eG[em].id}`:void 0,placeholder:k?"Chargement des produitsâ¦":"Rechercher par nom, s\xe9rie, code ou EANâ¦",disabled:k,value:eo,onFocus:()=>{eo.trim()&&eu(!0)},onChange:e=>{let r=e.target.value;ec(r),Q(""),eu(!0),ex(0),eO(r)},onKeyDown:e=>{"Escape"===e.key?eu(!1):0!==eG.length&&("ArrowDown"===e.key&&(e.preventDefault(),eu(!0),ex(e=>(e+1)%eG.length)),"ArrowUp"===e.key&&(e.preventDefault(),eu(!0),ex(e=>(e-1+eG.length)%eG.length)),"Enter"===e.key&&ed&&(e.preventDefault(),eV(eG[em])))},className:"pr-10 pl-9",required:!0}),eo?(0,s.jsx)("button",{type:"button",className:"absolute right-2 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-sm text-muted-foreground hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>{ec(""),Q(""),eu(!1),eO("")},"aria-label":"Effacer la recherche de produit",children:(0,s.jsx)(o.A,{className:"h-4 w-4","aria-hidden":!0})}):null]}),ed&&eo.trim().length>=(eR?2:1)?(0,s.jsx)("div",{id:"alert-product-results",role:"listbox","aria-label":"R\xe9sultats de produits",className:"max-h-60 overflow-y-auto rounded-lg border border-border/70 bg-card p-1 shadow-sm",children:eR&&"loading"===ef?(0,s.jsxs)("p",{className:"flex items-center gap-2 px-3 py-4 text-sm text-muted-foreground",children:[(0,s.jsx)(c.A,{className:"h-4 w-4 animate-spin","aria-hidden":!0}),"Recherche dans tous les cataloguesâ¦"]}):eR&&"error"===ef?(0,s.jsx)("p",{className:"px-3 py-4 text-sm text-destructive",children:"Recherche indisponible. R\xe9essaie dans quelques instants."}):eG.length>0?eG.map((e,r)=>(0,s.jsxs)("button",{id:`alert-product-${e.id}`,type:"button",role:"option","aria-label":e.name,"aria-selected":e.id===K,className:(0,M.cn)("flex min-h-14 w-full items-center gap-3 rounded-md px-2.5 py-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r===em?"bg-secondary":"hover:bg-secondary/70"),onMouseDown:e=>e.preventDefault(),onClick:()=>eV(e),children:[e.case_packaging?(0,s.jsx)(S.CaseProductVisual,{packaging:e.case_packaging,alt:e.name,sizes:"36px",previewSize:240,className:"h-9 w-9 shrink-0 rounded-md"}):(0,s.jsx)(R.ZoomImage,{src:e.image_url,alt:"",sizes:"36px",previewable:!1,className:"h-9 w-9 shrink-0 rounded-md border bg-media",fallback:(0,s.jsx)(d.A,{className:"h-4 w-4 text-muted-foreground","aria-hidden":!0})}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate text-sm font-medium text-foreground",children:e.name}),I(e)?(0,s.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:I(e)}):null]}),e.id===K?(0,s.jsx)(u.A,{className:"h-4 w-4 shrink-0 text-primary","aria-label":"Produit s\xe9lectionn\xe9"}):null]},e.id)):(0,s.jsx)("p",{className:"px-3 py-4 text-sm text-muted-foreground",children:"Aucun produit trouv\xe9. Essaie un autre nom, code ou EAN."})}
1):null,k||eR&&"loading"===ef?(0,s.jsxs)("p",{className:"flex items-center gap-2 text-xs text-muted-foreground","aria-live":"polite",children:[(0,s.jsx)(c.A,{className:"h-3.5 w-3.5 animate-spin","aria-hidden":!0}),eR?"Recherche multi-TCG en coursâ¦":"Chargement du catalogueâ¦"]}):eq?(0,s.jsxs)("p",{className:"flex items-center gap-2 text-xs text-muted-foreground","aria-live":"polite",children:[(0,s.jsx)(u.A,{className:"h-3.5 w-3.5 shrink-0 text-success","aria-hidden":!0}),"Produit s\xe9lectionn\xe9 : ",(0,s.jsx)("span",{className:"truncate font-medium text-foreground",children:eq.name})]}):eo?eR&&eo.trim().length<2?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Saisis au moins deux caract\xe8res."}):null:(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Commence \xe0 saisir le produit que tu veux surveiller."})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(E.J,{children:"Je veux \xeatre pr\xe9venu"}),(0,s.jsxs)("div",{"data-first-alert-tour":"condition",className:"grid gap-2 sm:grid-cols-2",role:"radiogroup","aria-label":"Type d'alerte",children:[(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":"back_in_stock"===X,onClick:()=>Y("back_in_stock"),className:(0,M.cn)("rounded-lg border p-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","back_in_stock"===X?"border-success/50 bg-success/10 text-success":"border-border/70 bg-card hover:bg-secondary/50"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,s.jsx)(m.A,{className:"h-4 w-4"}),"Retour en stock"]}),(0,s.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:"D\xe8s quâune boutique le remet disponible."})]}),(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":"price_below"===X,onClick:()=>Y("price_below"),className:(0,M.cn)("rounded-lg border p-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","price_below"===X?"border-info/50 bg-info/10 text-info":"border-border/70 bg-card hover:bg-secondary/50"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,s.jsx)(x.A,{className:"h-4 w-4"}),"Prix sous un seuil"]}),(0,s.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:"Quand le meilleur prix passe sous ton budget."})]})]})]}),"price_below"===X?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)(E.J,{htmlFor:"threshold",children:"Me pr\xe9venir sous"}),null!=eE.value?(0,s.jsxs)("button",{type:"button",className:"text-xs font-medium text-info underline-offset-2 hover:underline",onClick:()=>es(eE.value.toFixed(2)),children:["Reprendre ",(0,M.$g)(eE.value)]}):null]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(q.p,{id:"threshold",type:"number",step:"0.01",min:"0",inputMode:"decimal",value:et,onChange:e=>es(e.target.value),className:"pr-10",required:!0}),(0,s.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-3 flex items-center text-sm text-muted-foreground",children:"â¬"})]}),(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:eE.label??"Aucun prix fiable disponible pour proposer un seuil : choisis ton budget."})]}):null,(0,s.jsx)("div",{className:"rounded-lg border border-border/70 bg-card p-3",children:(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)(p.A,{className:"mt-0.5 h-4 w-4 text-muted-foreground"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,s.jsx)(E.J,{htmlFor:"alert-site",className:"text-sm font-semibold",children:"Marchand"}),(0,s.jsxs)("select",{id:"alert-site",className:"h-9 w-full rounded-md border border-input bg-transparent px-3 text-sm",value:en,onChange:e=>ei(e.target.value),children:[(0,s.jsx)("option",{value:"",children:"Tous les marchands"}),eL.followed.length>0?(0,s.jsx)("optgroup",{label:"Suivis pour ce produit",children:eL.followed.map(e=>(0,s.jsx)("option",{value:e,children:L(e)},e))}):null,(0,s.jsx)("optgroup",{label:"Autres marchands",children:eL.others.map(e=>(0,s.jsx)("option",{value:e,children:L(e)},e))})]}),""===en?eM.length>0?(0,s.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[eM.slice(0,8).map(e=>(0,s.jsx)("span",{className:"rounded-md border border-border/70 bg-secondary/40 px-2 py-1 text-xs text-foreground",children:L(e.site)},`${e.site}-${e.id}`)),eM.length>8?(0,s.jsxs)("span",{className:"rounded-md border border-border/70 bg-secondary/40 px-2 py-1 text-xs text-muted-foreground",children:["+",eM.length-8]}):null]}):(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Aucun marchand nâest encore suivi pour ce produit : lâalerte sâactivera d\xe8s quâune offre sera d\xe9couverte."}):ez?(0,s.jsxs)("p",{className:"text-xs leading-5 text-muted-foreground",children:["Alerte limit\xe9e \xe0 ",L(en),"."]}):(0,s.jsxs)("p",{className:"text-xs leading-5 text-muted-foreground",children:[L(en)," nâest pas encore suivi pour ce produit : lâalerte sâactivera d\xe8s quâon d\xe9couvrira son offre."]})]})]})}),(0,s.jsxs)("div",{className:"rounded-lg border border-border/70 bg-secondary/25 p-3",children:[(0,s.jsx)("p",{className:"text-sm font-semibold",children:"R\xe9capitulatif"}),(0,s.jsx)("p",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:"back_in_stock"===X?`Alerte retour en stock ${en?`chez ${L(en)}`:"sur tous les marchands suivis"}.`:`Alerte prix d\xe8s que ${en?`le prix chez ${L(en)}`:"le meilleur prix"} passe sous ${et?(0,M.$g)(Number(et)):"ton seuil"}.`}),!en&&"price_below"===X&&eP.length>0?(0,s.jsxs)("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:["Marchands pris en compte : ",eP.join(", "),"."]}):null]}),(0,s.jsx)("div",{className:"rounded-lg border border-border/70 p-3",children:(0,s.jsxs)("div",{className:"flex items-start gap-2",children:["email"===ee?(0,s.jsx)(h.A,{className:"mt-0.5 h-4 w-4 text-muted-foreground"}):"discord"===ee?(0,s.jsx)(f.A,{className:"mt-0.5 h-4 w-4 text-muted-foreground"}):(0,s.jsx)(g.A,{className:"mt-0.5 h-4 w-4 text-muted-foreground"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-3 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-semibold",children:"Canal de notification"}),(0,s.jsxs)("div",{className:"mt-2 grid gap-2 sm:grid-cols-2",role:"radiogroup","aria-label":"Canal de notification",children:[(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":"telegram"===ee,onClick:()=>er("telegram"),className:(0,M.cn)("rounded-md border p-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","telegram"===ee?"border-primary/40 bg-primary/10":"border-border/70 bg-card hover:bg-secondary/50"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,s.jsx)(g.A,{className:"h-4 w-4"})," Telegram"]}),(0,s.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:"Illimit\xe9"})]}),(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":"discord_dm"===ee,onClick:()=>er("discord_dm"),className:(0,M.cn)("rounded-md border p-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","discord_dm"===ee?"border-primary/40 bg-primary/10":"border-border/70 bg-card hover:bg-secondary/50"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,s.jsx)(f.A,{className:"h-4 w-4"})," Discord DM"]}),(0,s.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:"Message priv\xe9"})]}),(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":"discord"===ee,onClick:()=>
1er("discord"),className:(0,M.cn)("rounded-md border p-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","discord"===ee?"border-primary/40 bg-primary/10":"border-border/70 bg-card hover:bg-secondary/50"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,s.jsx)(f.A,{className:"h-4 w-4"})," Discord"]}),(0,s.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:"Canal de ton choix"})]}),(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":"email"===ee,onClick:()=>er("email"),className:(0,M.cn)("rounded-md border p-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","email"===ee?"border-primary/40 bg-primary/10":"border-border/70 bg-card hover:bg-secondary/50"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,s.jsx)(h.A,{className:"h-4 w-4"})," Email"]}),(0,s.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:"3 alertes actives max"})]})]})]}),"telegram"===ee?W||Z?ej?(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Telegram est configur\xe9 pour ton compte. Lâalerte pourra y \xeatre envoy\xe9e au d\xe9clenchement."}):null===ej?(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Aucun canal Telegram nâest configur\xe9. Lâalerte sera enregistr\xe9e, mais aucune notification Telegram nâest promise."}):(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"V\xe9rification du canal Telegramâ¦"}):(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Cr\xe9e un compte pour cr\xe9er lâalerte et v\xe9rifier ton canal de notification."}):"discord_dm"===ee?W||Z?ew?(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Ton compte Discord est connect\xe9. Lâalerte arrivera en message priv\xe9 tant que tu restes membre du serveur Discord PrixTCG."}):!1===ew?(0,s.jsxs)("p",{className:"text-xs leading-5 text-muted-foreground",children:["1. ",(0,s.jsx)("a",{href:"https://discord.gg/3NXJNT6F9y",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2",children:"Rejoins le serveur Discord PrixTCG"}),"."," ","2. ",(0,s.jsx)(l(),{href:"/profile?section=notifications&setup=discord_dm",className:"underline underline-offset-2",children:"Connecte ton compte Discord"}),"."]}):(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"V\xe9rification de Discordâ¦"}):(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Cr\xe9e un compte pour connecter Discord."}):"discord"===ee?W||Z?e_?(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Ton webhook Discord est configur\xe9. Lâalerte sera envoy\xe9e dans ce canal."}):!1===e_?(0,s.jsxs)("p",{className:"text-xs leading-5 text-muted-foreground",children:["Configure dâabord un webhook Discord dans ton ",(0,s.jsx)(l(),{href:"/profile?section=notifications&setup=discord",className:"underline underline-offset-2",children:"profil"})," pour utiliser ce canal."]}):(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"V\xe9rification du webhook Discordâ¦"}):(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Cr\xe9e un compte pour configurer ton canal Discord."}):(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"Lâalerte sera envoy\xe9e \xe0 lâadresse de ton compte. Tu peux avoir jusquâ\xe0 3 alertes email actives."})]})]})}),(0,s.jsxs)(T.Es,{children:[W||Z?null:(0,s.jsx)($.$,{type:"button",variant:"outline",asChild:!0,children:(0,s.jsx)(l(),{href:eJ,children:"Cr\xe9er un compte"})}),(0,s.jsx)($.$,{type:"button",variant:"outline",onClick:()=>r(!1),disabled:eb,children:"Annuler"}),(0,s.jsx)($.$,{"data-first-alert-tour":"submit",type:"submit",disabled:eb||Z||!W||"discord"===ee&&!0!==e_||"discord_dm"===ee&&!0!==ew,children:eb?"Enregistrementâ¦":t?"Enregistrer":"Cr\xe9er lâalerte"})]})]})]})})}}}]);
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.