1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4623],{94623:(e,t,a)=>{a.r(t),a.d(t,{ServiceWidgets:()=>I});var i=a(6029),n=a(60750),r=a(76745);let s=["/products/[handle]","/pages/my-lists","/account/register","/account/register-facebook-email","/account/register-newsletter-consent","/account/register/flow","/account/subscription-summary","/pages/paiement","/checkout/register","/pages/subscription-payment","/payment/3ds","/shared-list","/slice-simulator","/first-order-form","/pages/suggestions"],o=["/pages/my-lists?tab=my-purchases"],c=["/cart","/pages/my-lists/[id]","/apps/private-label/result/[slug]","/checkout/delivery","/checkout/payment"];var l=a(82882),d=a(53718),u=a(89542),m=a(81278);let h=()=>{let{isFrenchMarket:e}=(0,l.A)(),t=(0,m.useRouter)(),a=(0,d.Ub)(800),i=!o.includes(t.asPath)&&s.includes(t.pathname)||s.includes(t.asPath)||a&&c.includes(t.pathname);return e&&!u.KR&&!i};var p=a(79002),b=a.n(p),w=a(55729),x=a(7234),y=a(82281),g=a.n(y),f=a(92520),v=a(95295),j=a(74363),k=a.n(j),C=a(86156);let{publicRuntimeConfig:{cobbaiChatIdConnected:E,cobbaiChatIdAnonymous:N}}=g()(),$="cobbai-chat-init-script",S=()=>{try{var e;null==(e=document.getElementById($))||e.remove(),document.querySelectorAll('[id^="cobbai-"]').forEach(e=>{e.id!==$&&e.remove()}),window.CobbaiChatSessionEstablished=void 0,Object.keys(window.localStorage).filter(e=>e.toLowerCase().startsWith("cobbai")).forEach(e=>window.localStorage.removeItem(e))}catch(e){k().error("Cobbai teardown failed",{error:e})}},B=(e,t)=>{let a=document.createElement("script"),i={chat_id:e};t&&(i.auth_token=t),a.id=$,a.async=!0,a.src="".concat("https://lafourche.cobbai.com/connectors/chats/conversations/init","?").concat(new URLSearchParams(i).toString()),document.head.appendChild(a)},W=()=>{let{customer:e}=(0,f.uM)(),[t]=(0,x.n)(v.b6),a=(0,d.Ub)(800),{isGlobalSearchResultsPanelOpen:n}=(0,C.W)(),r=a&&n;return(0,w.useEffect)(()=>{if(null==e?void 0:e.uid){if(!E)return;let e=!1;return t().then(t=>{let{data:a}=t;!e&&(null==a?void 0:a.createCobbaiChatToken)&&B(E,a.createCobbaiChatToken)}).catch(e=>{k().error("Failed to mint Cobbai chat token",{error:e})}),()=>{e=!0,S()}}if(N)return B(N),()=>{S()}},[null==e?void 0:e.uid,t]),(0,i.jsx)(b(),{id:"e7a9049a5734cadc",dynamic:[r?"display: none !important;":""],children:'[id^="cobbai-"]{'.concat(r?"display: none !important;":"",'}@media(max-width:600px){[id^="cobbai-"]{margin-bottom:10px}}@media(min-width:600px)and (max-width:800px){[id^="cobbai-"]{margin-bottom:50px}}')})},{publicRuntimeConfig:{yumaWidgetUrl:_}}=g()(),R="yuma-widget",D="yuma-widget-container",F=()=>{let{customer:e}=(0,f.uM)(),[t]=(0,x.n)(v.Bl),a=(0,d.Ub)(800),{isGlobalSearchResultsPanelOpen:n}=(0,C.W)(),r=a&&n,[s,o]=(0,w.useState)(!1),c=r||s;return(0,w.useEffect)(()=>{let e=e=>{if(e.data&&"object"==typeof e.data&&"setWidgetState"===e.data.action){var t;o((null==(t=e.data.data)?void 0:t.state)!=="closed")}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]),(0,w.useEffect)(()=>{var a,i,n;let r={};return e&&(e.email&&(r.customerEmail=e.email),e.firstName&&(r.firstName=e.firstName),e.lastName&&(r.lastName=e.lastName),null==(a=e.omsTags)||a.forEach(e=>{r[e]="true"})),(e=>{window.$yuma=[],window.$yuma.url=_,window.$yuma.config={properties:e,target:"#".concat(D)};let t=document.createElement("script");t.id=R,t.async=!0,t.src="https://js.yuma.ai/widget.js",document.head.appendChild(t)})(r),(null==e?void 0:e.uid)&&(null==(n=window.$yuma)||null==(i=n.push)||i.call(n,["identify",{token:async()=>{try{let{data:e}=await t();return null==e?void 0:e.createYumaChatToken}catch(e){return k().error("Failed to mint Yuma identify token",{error:e}),null}}}])),()=>(()=>{try{var e,t;null==(e=document.getElementById(R))||e.remove(),null==(t=document.getElementById(D))||t.replaceChildren()}catch(e){k().error("Yuma teardown failed",{error:e})}finally{window.$yuma=void 0}})()},[null==e?void 0:e.uid,t]),(0,w.useEffect)(()=>{var e,t;null==(t=window.$yuma)||null==(e=t.push)||e.call(t,[r?"hide":"show"])},[null==e?void 0:e.uid,r]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{id:D,className:"jsx-5c41c52eb85e5298"}),(0,i.jsx)("button",{id:"yuma-custom-btn",type:"button","aria-label":"Ouvrir le chat",onClick:()=>{var e;(null==(e=window.$yuma)?void 0:e.push)&&(window.$yuma.push([s?"close"
1:"open"]),o(e=>!e))},className:"jsx-5c41c52eb85e5298 "+((c?"hidden":"")||""),children:(0,i.jsxs)("svg",{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"jsx-5c41c52eb85e5298",children:[(0,i.jsx)("rect",{x:"7",y:"9",width:"26",height:"18",rx:"9",stroke:"#23241D",strokeWidth:"2",className:"jsx-5c41c52eb85e5298"}),(0,i.jsx)("circle",{cx:"15",cy:"18",r:"1.6",fill:"#23241D",className:"jsx-5c41c52eb85e5298"}),(0,i.jsx)("circle",{cx:"20",cy:"18",r:"1.6",fill:"#23241D",className:"jsx-5c41c52eb85e5298"}),(0,i.jsx)("circle",{cx:"25",cy:"18",r:"1.6",fill:"#23241D",className:"jsx-5c41c52eb85e5298"})]})}),(0,i.jsx)(b(),{id:"5c41c52eb85e5298",children:'@media(max-width:600px){#yuma-widget-container iframe{margin-bottom:10px}}@media(min-width:600px)and (max-width:800px){#yuma-widget-container iframe{margin-bottom:50px}}#yuma-widget-container iframe[style*="62px"],#yuma-widget-container iframe[style*="72px"]{display:none!important}#yuma-custom-btn{position:fixed;bottom:24px;right:24px;z-index:9998;width:60px;height:60px;border-radius:24px 24px 24px 0;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;background:var(--Base-yellow600,#ffcb03);box-shadow:0 4px 10px 0 rgba(0,0,0,.14);transition:transform.18s ease,box-shadow.18s ease,opacity.18s ease}#yuma-custom-btn:hover{transform:scale(1.06);box-shadow:0 6px 16px 0 rgba(0,0,0,.2)}#yuma-custom-btn.hidden{visibility:hidden;opacity:0;pointer-events:none}'})]})},I=()=>{let e=(()=>{let e=(0,n.KH)(r.$X);return h()&&e})(),t=(()=>{let e=(0,n.KH)(r.$X);return h()&&!e})();return(0,i.jsxs)(i.Fragment,{children:[e&&(0,i.jsx)(W,{}),t&&(0,i.jsx)(F,{})]})}}}]); 2//# sourceMappingURL=4623.1d35570595ece991.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.