1import{k as l}from"./subscriptionCache-DlymxcwH.js";import{i as p,r as d}from"./useTheme-D7D2XGkJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="f97d3b52-3e74-44fa-ac2d-a74099b8f546",e._sentryDebugIdIdentifier="sentry-dbid-f97d3b52-3e74-44fa-ac2d-a74099b8f546")}catch{}})();const f={STAGING:"https://dutch-staging-dutch-8oo2.encr.app/upgrade_membership",PROD:"https://dutch-prod-dutch-8oo2.encr.app/upgrade_membership"};function y(){const{IS_STAGING:e}=p(),s=d(!1),r=d(null),a=d(!1);return{upgradeMembership:async({subscriptionId:u,targetVariantId:c,discountCode:i=""})=>{s.value=!0,r.value=null,a.value=!1;try{const o=`${f[e?"STAGING":"PROD"]}/${u}`,t={discount_code:i,target_variant_id:c},n=await l.post(o,t,{headers:{"Content-Type":"application/json"}});return a.value=n.status===200,a.value}catch(o){const t=o,n=t.response?.data?.message||t.message||"Unknown error occurred";throw r.value=new Error(n),r.value}finally{s.value=!1}},isLoading:s,error:r,success:a}}export{y as u}; 2//# sourceMappingURL=useUpgradeMembership-DvFOdvcM.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.