1import{r as u,j as o,B as f,v as p,cj as g}from"./main-DchW9jtY.js";import{t as i}from"./index-sDnXkN1Z.js";import{I as x}from"./IconLoader2-BAcNLlDW.js";const t=p.pricing.customerPortal;function C({returnUrl:e,variant:n="default",size:l="default",className:c,children:d}){const[s,a]=u.useState(!1),m=async()=>{try{a(!0);const r=await g({data:{returnUrl:e?new URL(e,window.location.origin).href:void 0}});r?.url?window.location.href=r.url:i.error(t.failed)}catch(r){console.error("Customer portal error:",r),i.error(t.failed)}finally{a(!1)}};return o.jsx(f,{variant:n,size:l,className:c,onClick:m,disabled:s,children:s?o.jsxs(o.Fragment,{children:[o.jsx(x,{className:"mr-2 size-4 animate-spin"}),t.loading]}):d})}export{C};
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.