1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3928],{93928:(e,t,n)=>{n.r(t),n.d(t,{ConnectSetelButton:()=>R});var l=n(28888),c=n(37876),o=n(65212),i=n(89099),a=n(14232),r=n(77185),s=n(20339),u=n(68047),d=n(66196),h=n(11856),f=n(4385),m=n(96073),w=n(9539),x=n(54482),g=n(88625),p=n(87928),v=n(15411),b=n(33176),_=n(1058),k=n(35244),C=n(48230),N=n.n(C),j=n(15039),S=n.n(j);function B(){let e=(0,l._)(["auth.connect-setel"]);return B=function(){return e},e}function I(){let e=(0,l._)(["auth.connect-to-setel"]);return I=function(){return e},e}function A(){let e=(0,l._)(["auth.continue-with-setel"]);return A=function(){return e},e}function D(){let e=(0,l._)(["auth.or-login-with-email"]);return D=function(){return e},e}function R(e){var t;let{action:n,onlyWithSetel:l=!1,isShowContinueSetel:C,isCheckConnectToSetelSummary:j,className:R}=e,{t:y}=(0,o.Bd)(),L=(0,i.useRouter)(),{merchant:M,isShowRequestConnectWithSetelPopup:P,onCloseRequestConnectWithSetelPopup:V}=(0,a.useContext)(s.BR),E=(0,a.useCallback)(()=>{var e,t,l;P&&V(),(null==(e=f.BV.get())?void 0:e.includes("wishlist"))||(null==(t=f.BV.get())?void 0:t.includes("voucher="))||(null==(l=f.BV.get())?void 0:l.includes("isReceived="))||b.pJ.includes(L.pathname)||f.BV.set(L.asPath),f.A8.set(n)},[P,n,V,L.pathname,L.asPath]),O=a.useMemo(()=>(null==M?void 0:M.forcedLoginWithSetelDate)?new Date(null==M?void 0:M.forcedLoginWithSetelDate):new Date,[M]);if(!(null==M||null==(t=M.setelSso)?void 0:t.clientId)||!M.enableConnectSetel)return null;let U={response_type:x.AO.Code,client_id:M.setelSso.clientId,redirect_uri:"".concat(function(e){let t=e.query.merchantcode,n=window.location.origin;return b.m$.includes(window.location.origin)&&(n+="".concat(b.ZX)),(null==e?void 0:e.locale)&&(n+="/".concat(e.locale)),t&&(n+="/".concat(t)),n}(L)).concat(d.Lkd),scope:x.Rr.UserInfoRead,state:h.Y.getClientId(),lang:k.Ay.language};return p.Y.get()===v.Qe.MINIAPP&&Object.assign(U,{mode:"miniapp"}),(0,c.jsxs)(c.Fragment,{children:[j&&(0,c.jsx)(N(),{rel:"nofollow",href:"".concat(u.XM.connectSetelUrl,"?").concat((0,m.Z)(U)),onClick:E,className:"text-sm text-primary",children:y(B())}),!j&&(0,c.jsxs)(r.vxq,{rel:"nofollow",href:"".concat(u.XM.connectSetelUrl,"?").concat((0,m.Z)(U)),onClick:E,className:S()("w-full h-14 bg-brand text-white uppercase font-bold text-sm rounded-lg",R),children:[(0,c.jsx)(w.bE,{}),(0,c.jsx)("span",{className:"ml-2 tracking-[0.13em]",children:y(C?I():A())})]}),!j&&n===g.W.LOGIN&&!l&&(0,_.A)(O,new Date)&&(0,c.jsxs)("div",{className:"flex flex-row w-full mt-6 mb-6 text-sm text-black-light",children:[(0,c.jsx)(r.Hr,{className:"flex-1 w-1/2 mt-3 mr-2"}),y(D()),(0,c.jsx)(r.Hr,{className:"flex-1 w-1/2 mt-3 ml-2"})]})]})}}}]);
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.