{"version":3,"file":"authHelpers.551f19e8.js","sources":["../../../frontend/features/common/utils/authHelpers.js"],"sourcesContent":["const BASE_SIGN_IN_URL = '/users/sign_in';\nconst BASE_SIGN_OUT_URL = '/users/sign_out';\nconst BASE_SIGN_UP_URL = '/users/sign_up';\n\nexport const redirectToSignInPath = (redirectUrl) => {\n const signInUrl = redirectUrl\n ? `${BASE_SIGN_IN_URL}?redirect_url=${encodeURIComponent(redirectUrl)}`\n : BASE_SIGN_IN_URL;\n document.location.href = signInUrl;\n};\n\nexport const signOutPath = (redirectUrl) =>\n redirectUrl\n ? `${BASE_SIGN_OUT_URL}?redirect_url=${encodeURIComponent(redirectUrl)}`\n : BASE_SIGN_OUT_URL;\n\nexport const csrfToken = () => document.querySelector('meta[name=\"csrf-token\"]')?.content;\n\n/**\n * Generate the sign up path with redirect url\n * @param {string} redirectUrl\n */\nexport const redirectToSignUpPath = (redirectUrl) => {\n const signUpUrl = redirectUrl\n ? `${BASE_SIGN_UP_URL}?redirect_url=${encodeURIComponent(redirectUrl)}`\n : BASE_SIGN_UP_URL;\n\n document.location.href = signUpUrl;\n};\n"],"names":["BASE_SIGN_IN_URL","BASE_SIGN_OUT_URL","BASE_SIGN_UP_URL","redirectToSignInPath","redirectUrl","signInUrl","signOutPath","csrfToken","_a","redirectToSignUpPath","signUpUrl"],"mappings":"4WAAA,MAAMA,EAAmB,iBACnBC,EAAoB,kBACpBC,EAAmB,iBAEZC,EAAwBC,GAAgB,CACnD,MAAMC,EAAYD,EACd,GAAGJ,kBAAiC,mBAAmBI,CAAW,IAClEJ,EACJ,SAAS,SAAS,KAAOK,CAC3B,EAEaC,EAAeF,GAC1BA,EACI,GAAGH,kBAAkC,mBAAmBG,CAAW,IACnEH,EAEOM,EAAY,IAAA,OAAM,OAAAC,EAAA,SAAS,cAAc,yBAAyB,IAAhD,YAAAA,EAAmD,SAMrEC,EAAwBL,GAAgB,CACnD,MAAMM,EAAYN,EACd,GAAGF,kBAAiC,mBAAmBE,CAAW,IAClEF,EAEJ,SAAS,SAAS,KAAOQ,CAC3B"}