1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="baa8d60b-1d70-4a95-9fd4-ffcdcb9e0a6d",e._sentryDebugIdIdentifier="sentry-dbid-baa8d60b-1d70-4a95-9fd4-ffcdcb9e0a6d")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2058],{82058:(e,t,r)=>{r.r(t),r.d(t,{PpnOfferSelector:()=>N});var a=r(54568),l=r(7620),n=r(24792),o=r(5239),d=r(38584),s=r(6140),i=r(52137),c=r(58997),g=r(23140),x=r(19146);let p="border-primary-500 dark:border-primary-500",f={gas:{Icon:i.default,iconBg:"bg-yellow-100 dark:bg-yellow-100",iconColor:"text-yellow-600 dark:text-yellow-600",badgeBg:"bg-yellow-100 dark:bg-yellow-100",badgeText:"text-yellow-700 dark:text-yellow-700",ring:"ring-yellow-200 dark:ring-yellow-200",label:"Gaz",cardBorder:p},electricity:{Icon:c.default,iconBg:"bg-purple-100 dark:bg-purple-100",iconColor:"text-purple-600 dark:text-purple-600",badgeBg:"bg-purple-100 dark:bg-purple-100",badgeText:"text-purple-700 dark:text-purple-700",ring:"ring-purple-200 dark:ring-purple-200",label:"\xc9lectricit\xe9",cardBorder:p},dual:{Icon:g.default,iconBg:"bg-indigo-100 dark:bg-indigo-100",iconColor:"text-indigo-600 dark:text-indigo-600",badgeBg:"bg-indigo-100 dark:bg-indigo-100",badgeText:"text-indigo-700 dark:text-indigo-700",ring:"ring-indigo-200 dark:ring-indigo-200",label:"Dual",cardBorder:p},pro:{Icon:x.default,iconBg:"bg-green-100 dark:bg-green-100",iconColor:"text-green-600 dark:text-green-600",badgeBg:"bg-green-100 dark:bg-green-100",badgeText:"text-green-700 dark:text-green-700",ring:"ring-green-200 dark:ring-green-200",label:"Pro",cardBorder:"border-secondary-500 dark:border-secondary-500"}},b=/\r?\n/,u=/^[-â¢]\s*/;function m(e){var t;let{offer:r}=e,{cardBorder:l}=null!=(t=f[r.offer_type])?t:f.electricity,n="pro"===r.offer_type;return(0,a.jsx)(d.TrackingProvider,{slice:{eventStep:r.offer_name,eventWording:r.offer_type},children:(0,a.jsxs)("div",{className:"flex items-start gap-4 roun
1ded-2xl border-2 bg-white p-4 md:p-5 dark:bg-white ".concat(l),children:[(0,a.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full ".concat(n?"bg-secondary-100 dark:bg-secondary-100":"bg-primary-100 dark:bg-primary-100"),children:(0,a.jsx)(s.default,{className:"h-5 w-5 ".concat(n?"text-secondary-700 dark:text-secondary-700":"text-primary-700 dark:text-primary-700")})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:[r.personae_title||r.persona_description?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[r.personae_title?(0,a.jsx)("h4",{className:"!my-0 font-bold text-base text-stone-900 leading-6 md:text-lg dark:text-stone-900",children:r.personae_title}):null,r.persona_description?(0,a.jsx)("p",{className:"!my-0 text-base text-stone-500 leading-6 dark:text-stone-500",children:r.persona_description}):null]}):null,r.offer_text?function(e){let t=e.split(b).map(e=>e.trim()).filter(Boolean);return t.length<=1?(0,a.jsx)("p",{className:"!my-0 text-base text-stone-700 leading-6 dark:text-stone-700",children:e}):(0,a.jsx)("ul",{className:"!my-0 !pl-5 list-disc space-y-1 text-base text-stone-700 leading-6 dark:text-stone-700",children:t.map((e,t)=>(0,a.jsx)("li",{children:e.replace(u,"")},"".concat(t,"-").concat(e.slice(0,12))))})}(r.offer_text):null]})]})})}var h=r(32673),y=r(23951);let k=["electricity","gas","dual","pro"];function v(e){let{offers:t,value:r,onChange:n,label:o,placeholder:d}=e,s=(0,l.useMemo)(()=>
1(function(e){let t={electricity:[],gas:[],dual:[],pro:[]};for(let a of e){var r;(null!=(r=t[a.offer_type])?r:t.electricity).push(a)}return t})(t),[t]),i=(0,y.useTracking)();return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[o?(0,a.jsx)("label",{htmlFor:"ppn-offer-select",className:"font-bold text-base text-stone-900 leading-6 dark:text-stone-900",children:o}):null,(0,a.jsxs)(h.Select,{value:r,onValueChange:e=>{n(e),e&&i({event:"click",eventCategory:"engagement",eventType:"interaction",eventWording:e})},children:[(0,a.jsx)(h.SelectTrigger,{id:"ppn-offer-select",className:"data-[state=open]:!ring-1 data-[state=open]:!ring-primary-500 h-14 w-full rounded border-stone-200 bg-white px-4 text-base text-stone-500 data-[state=open]:border-primary-500 dark:border-stone-200 dark:bg-white dark:text-stone-500 dark:data-[state=open]:border-primary-500",children:(0,a.jsx)(h.SelectValue,{placeholder:d})}),(0,a.jsx)(h.SelectContent,{indicatorPosition:"right",className:"rounded-lg border-stone-200 bg-white p-2 shadow-lg dark:border-stone-200 dark:bg-white",children:k.map(e=>{let t=s[e];return(null==t?void 0:t.length)===0?null:(0,a.jsxs)(h.SelectGroup,{children:[(0,a.jsx)(h.SelectLabel,{className:"px-3 pt-2 pb-1 font-normal text-[#63697F] text-base dark:text-[#63697F]",children:f[e].label}),t.map(e=>(0,a.jsx)(h.SelectItem,{value:e.offer_name,className:"data-[state=checked]:!bg-primary-50 data-[state=checked]:!text-primary-500 my-0.5 rounded-md py-2.5 pr-3 pl-6 text-base text-stone-900 hover:bg-stone-50 focus:bg-stone-50 dark:text-stone-900",children:e.offer_name},e.offer_name))]},e)})})]})]})}var j=r(32536);function w(e){let{logoUrl:t,providerName:r,providerDetail:l}=e;return t||l?(0,a.jsxs)("div",{className:"flex items-center gap-4 border-stone-200 border-b px-5 py-4 md:px-6 dark:border-stone-200",children:[t?(0,a.jsx)(j.default,{src:t,alt:null!=r?r:"Provider logo",width:62,height:34,className:"my-0 h-[34px] w-auto object-contain"}):null,l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"h-5 w-px bg-stone-300 dark:bg-stone-300"}),(0,a.jsx)("span",{className:"text-base text-stone-500 leading-6 dark:text-stone-500",children:l})]}):null]}):null}function N(e){var t,r;let{provider_name:s,provider_detail:i,provider_logo:c,title:g,subtitle:x,dropdown_text:p="Quelle offre vous int\xe9resse ?",dropdown_label:f="S\xe9lectionner une offreâ¦",offer_list:b}=e,u=(0,l.useMemo)(()=>(function(e){if(!e)return[];if(Array.isArray(e))return e;try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}})(b),[b]),[h,y]=(0,l.useState)(""),k=u.find(e=>e.offer_name===h),j=null!=(t=null==k?void 0:k.cta_label)?t:"Voir l'offre",N=null!=(r=null==k?void 0:k.cta_link)?r:"#",_=N.startsWith("tel:"),C=!k;return(0,a.jsx)(d.TrackingProvider,{slice:{eventComponent:"ppn-offer-selector",eventLocation:s},children:(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl p-2",children:(0,a.jsxs)(o.Card,{className:"overflow-hidden border-stone-200 bg-white dark:border-stone-200 dark:bg-white",children:[(0,a.jsx)(w,{logoUrl:c,providerName:s,providerDetail:i}),(0,a.jsxs)("div",{className:"flex flex-col gap-6 p-5 md:p-6",children:[(g||x)&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[g?(0,a.jsx)("h3",{className:"!my-0 font-bold text-lg text-stone-900 leading-7 md:text-xl dark:text-stone-900",children:g}):null,x?(0,a.jsx)("p",{className:"!my-0 text-base text-stone-600 leading-6 dark:text-stone-600",children:x}):null]}),u.length>0?(0,a.jsx)(v,{offers:u,value:h,onChange:y,label:p,placeholder:f}):null,k?(0,a.jsx)(m,{offer:k}):null,(0,a.jsx)("div",{className:"flex justify-center pt-2",children:(0,a.jsx)(n.CallToAction,{className:"min-w-[249px] ".concat(C?"pointer-events-none opacity-50":""),variant:"primary",callModeAttributes:{href:N,value:j,icon:_?"phone":"arrow-right",target:_?void 0:"_blank"},appModeAttributes:{href:N,value:j,icon:_?"wcb":"arrow-right",isCallback:_,target:_?void 0:"_blank"}})})]})]})})})}}}]);
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.