1import{Ct as e,I as t,J as n,O as r,S as i,T as a,Vt as o,Yt as s,Z as c,_t as l,j as u,k as d,un as f}from"./DDdKR83C.js";import{c as p}from"./DQqWjWcG.js";import{d as m,p as h}from"./BCL2NB2w.js";import"./AmqZEunZ.js";import{a as g}from"./bckQbxt8.js";import{t as _}from"./DKIGxcg02.js";import{n as v,t as y}from"./BZzk4eak.js";t(),s(),e();var b={class:`fr-connect-group`},x=Object.assign(u({__name:`FranceConnect`,props:{theme:{default:`blue`}},emits:[`loading`],setup(e,{expose:t,emit:s}){let{$apiFetch:u,$toast:x}=p(),S=h(),{$gtm:C}=p(),w=s,T=null,E=new Set;async function D(){w(`loading`,!0);try{if((await u(`/franceconnect/login-callback`,{params:{state:S.query.state,code:S.query.code},retry:!1}))?.ok){let e=C;e?.trackEvent&&e.trackEvent({event:`user-login`}),await g().fetchUser(),window.location.href=`/profile`}}catch(e){let t=v(e)===`account_exists`;await m({path:S.path,query:t?y():{}},{replace:!0}),w(`loading`,!1)}}n(async()=>{let e=typeof S.query.code==`string`?S.query.code:``;!S.query.state||!e||E.has(e)||(E.add(e),T??=D().finally(()=>{T=null}),await T)});async function O(){try{w(`loading`,!0);let e=await u(`/franceconnect/login-authorize`);e&&await m(e,{external:!0})}catch(e){let t=e;if(t.response?.status!==429){let e=t.response?._data?.message;e&&x.error(e)}w(`loading`,!1)}}return t({start:O}),(t,n)=>(c(),a(`div`,b,[i(`button`,{class:f([`fr-connect`,{"!bg-[#8585F6] hover:!bg-[#B1B1F9] !text-[#000091]":e.theme===`purple`}]),type:`button`,onClick:O},[...n[0]||=[i(`span`,{class:`fr-connect__login`},`S'identifier avec`,-1),i(`span`,{class:`fr-connect__brand`},`FranceConnect`,-1)]],2),i(`p`,null,[d(o(_),{to:`https://franceconnect.gouv.fr/`,title:`Qu'est-ce que FranceConnect ? - nouvelle fenêtre`,"is-external":!0,rel:`noopener`,class:f([`text-sm text-jva-blue-500`,{"text-white active:!bg-transparent":e.theme===`purple`}])},{default:l(()=>[...n[1]||=[r(` Qu'est-ce que FranceConnect ? `,-1)]]),_:1},8,[`class`])])]))}}),{__name:`CustomFranceConnect`});export{x as t};
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.