import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{D as t,kt as n}from"./vendor-vue-core-BdhYaYlO.js";import{i as r}from"./useFeatureFlags-DLStzqlx.js";import{_i as i}from"./dialogService-CwVeD8j9.js";function useFreeTierOnboarding(){let e=n(!1),a=t(()=>i(`free`)),o=t(()=>r.value.new_free_tier_subscriptions??!1);function switchToEmailForm(){e.value=!0}function switchToSocialLogin(){e.value=!1}return{showEmailForm:e,freeTierCredits:a,isFreeTierEnabled:o,switchToEmailForm,switchToSocialLogin}}var decodeQueryParam=e=>{try{return decodeURIComponent(e)}catch{return null}},isSafeInternalRedirectPath=e=>e.startsWith(`/`)&&!e.startsWith(`//`);const getSafePreviousFullPath=e=>{let t=e.previousFullPath,n=Array.isArray(t)?t[0]:t;if(!n)return null;let r=decodeQueryParam(n);return r&&isSafeInternalRedirectPath(r)?r:null};export{useFreeTierOnboarding as n,getSafePreviousFullPath as t};
//# sourceMappingURL=previousFullPath-Dga7GREX.js.map