1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67351],{29502:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]])},32978:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("circle-minus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]])},39867:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},48055:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},67351:(e,t,s)=>{s.r(t),s.d(t,{BillingTab:()=>O});var a=s(95155),r=s(12115),n=s(48055),l=s(91761),d=s(75882),i=s(48314),c=s(6132),o=s(90368),x=s(27937),m=s(82084),u=s(73914),p=s(77628);let h=(0,s(71847).A)("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);var b=s(32978);function g(e){let{title:t,count:s,tone:r,icon:n,rows:l}=e;return(0,a.jsxs)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[(0,a.jsx)(n,{className:`h-4 w-4 ${"err"===r?"text-red-500":"text-amber-500"}`}),t]}),(0,a.jsx)("span",{className:"text-2xl font-bold",children:s})]}),0===l.length?(0,a.jsx)("p",{className:"text-xs text-[var(--text-muted)]",children:"None."}):(0,a.jsx)("ul",{className:"space-y-1.5",children:l.map(e=>(0,a.jsxs)("li",{className:"flex justify-between gap-2 text-xs",children:[(0,a.jsx)("span",{className:"truncate",children:e.description||"(no description)"}),(0,a.jsxs)("span",{className:"text-[var(--text-muted)] whitespace-nowrap",children:[(0,p.Ss)(Number(e.amount))," \xb7 ",(0,p.BM)(e.created_at)]})]},e.id))})]})}function v(e){let{userId:t}=e,[s,l]=(0,r.useState)(""),[d,i]=(0,r.useState)(""),c=(0,u.aU)(t),o=Number(s),x=Number.isFinite(o)&&o>0&&!c.isPending;return(0,a.jsxs)("div",{className:"rounded-lg border border-[var(--border-subtle)] bg-white p-3 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",children:[(0,a.jsx)(n.A,{className:"h-3.5 w-3.5"}),"Grant credits"]}),(0,a.jsx)(m.pd,{type:"number",value:s,onChange:e=>l(e.target.value),placeholder:"Credits (e.g. 100)",min:"0",step:"1",fullWidth:!0}),(0,a.jsx)(m.pd,{value:d,onChange:e=>i(e.target.value),placeholder:"Reason (optional)",fullWidth:!0}),(0,a.jsx)(m.$n,{variant:"primary",size:"sm",disabled:!x,isLoading:c.isPending,onClick:async()=>{await c.mutateAsync({amount:Math.floor(o),...d.trim()?{description:d.trim()}:{}}),l(""),i("")},fullWidth:!0,children:"Grant"})]})}function j(e){let{userId:t}=e,[s,n]=(0,r.useState)(""),[l,d]=(0,r.useState)(""),i=(0,u.JB)(t),c=Number(s),o=Number.isFinite(c)&&c>0&&!i.isPending;return(0,a.jsxs)("div",{className:"rounded-lg border border-green-200 bg-white p-3 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-green-700",children:[(0,a.jsx)(h,{className:"h-3.5 w-3.5"}),"Add to balance (USD)"]}),(0,a.jsx)(m.pd,{type:"number",value:s,onChange:e=>n(e.target.value),placeholder:"USD amount",min:"0",step:"0.01",fullWidth:!0}),(0,a.jsx)(m.pd,{value:l,onChange:e=>d(e.target.value),placeholder:"Reason (optional)",fullWidth:!0}),(0,a.jsx)(m.$n,{variant:"primary",size:"sm",disabled:!o,isLoading:i.isPending,onClick:async()=>{await i.mutateAsync({amount:c,...l.trim()?{description:l.trim()}:{}}),n(""),d("")},fullWidth:!0,children:"Credit balance"})]})}function f(e){let{userId:t}=e,[s,n]=(0,r.useState)(""),[l,d]=(0,r.useState)(""),i=(0,u.aF)(t),c=Number(s),o=Number.isFinite(c)&&c>0&&!i.isPending;return(0,a.jsxs)("div",{className:"rounded-lg border border-red-200 bg-white p-3 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-red-700",children:[(0,a.jsx)(b.A,{className:"h-3.5 w-3.5"}),"Deduct from balance (USD)"]}
1),(0,a.jsx)(m.pd,{type:"number",value:s,onChange:e=>n(e.target.value),placeholder:"USD amount",min:"0",step:"0.01",fullWidth:!0}),(0,a.jsx)(m.pd,{value:l,onChange:e=>d(e.target.value),placeholder:"Reason (optional)",fullWidth:!0}),(0,a.jsx)(m.$n,{variant:"outline",size:"sm",disabled:!o,isLoading:i.isPending,onClick:async()=>{await i.mutateAsync({amount:c,...l.trim()?{description:l.trim()}:{}}),n(""),d("")},fullWidth:!0,className:"border-red-300 text-red-700 hover:bg-red-50",children:"Debit balance"})]})}function y(e){let{userId:t}=e,{data:s,isLoading:l}=(0,u.iW)(t),d=(0,u.oD)(t),[i,c]=(0,r.useState)(null),o=s??[];return(0,a.jsxs)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.A,{className:"h-4 w-4 text-[var(--text-muted)]"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-[var(--text-primary)]",children:"Active top-ups (non-expiring)"})]}),l?(0,a.jsx)("p",{className:"text-xs text-[var(--text-muted)]",children:"Loadingâ¦"}):0===o.length?(0,a.jsx)("p",{className:"text-xs text-[var(--text-muted)]",children:"No active top-ups."}):(0,a.jsx)("ul",{className:"space-y-2",children:o.map(e=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-3 rounded-lg border border-[var(--border-subtle)] p-2",children:[(0,a.jsxs)("div",{className:"text-xs",children:[(0,a.jsxs)("div",{className:"font-medium text-[var(--text-primary)]",children:[e.credits_remaining," / ",e.credits_purchased," credits"]}),(0,a.jsxs)("div",{className:"text-[var(--text-muted)]",children:[(0,p.Ss)(e.price_usd)," \xb7 ",e.payment_method," \xb7"," ",(0,p.BM)(e.purchased_at)]})]}),i===e.id?(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(m.$n,{variant:"outline",size:"sm",isLoading:d.isPending,className:"border-red-300 text-red-700 hover:bg-red-50",onClick:async()=>{await d.mutateAsync({topupId:e.id}),c(null)},children:"Confirm void"}),(0,a.jsx)(m.$n,{variant:"outline",size:"sm",onClick:()=>c(null),children:"Cancel"})]}):(0,a.jsx)(m.$n,{variant:"outline",size:"sm",className:"border-red-300 text-red-700 hover:bg-red-50",onClick:()=>c(e.id),children:"Void"})]},e.id))}),(0,a.jsx)("p",{className:"text-xs leading-snug text-[var(--text-muted)]",children:"Voiding set
1s the top-up to 0 (drops from the user's balance + usage). NOT a Stripe refund â handle any money separately."})]})}var N=s(77801),w=s(36402),k=s(64269);function C(e){let{userId:t}=e,[s,n]=(0,r.useState)("deduct"),[l,d]=(0,r.useState)(""),[i,c]=(0,r.useState)(""),[o,x]=(0,r.useState)(!1),p=(0,u.vE)(t),h=(0,u.Aq)(t),b=Number(l),g=Number.isFinite(b)&&Number.isInteger(b)&&("set"===s?b>=0:b>0),v=p.isPending||h.isPending,j=async()=>{let e=i.trim()?{description:i.trim()}:{};"deduct"===s?await p.mutateAsync({amount:b,...e}):await h.mutateAsync({credits:b,...e}),x(!1),d(""),c("")};return(0,a.jsxs)("div",{className:"rounded-lg border border-red-200 bg-white p-3 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-red-700",children:[(0,a.jsx)(N.A,{className:"h-3.5 w-3.5"}),"Adjust credits"]}),(0,a.jsx)("div",{className:"flex rounded-lg border border-[var(--border-subtle)] p-0.5",children:[{key:"deduct",label:"Deduct"},{key:"set",label:"Set exact"}].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>n(e.key),"aria-pressed":s===e.key,className:(0,k.cn)("flex-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",s===e.key?"bg-red-600 text-white":"text-[var(--text-muted)] hover:bg-[var(--surface-muted)]"),children:e.label},e.key))}),(0,a.jsx)(m.pd,{type:"number",value:l,onChange:e=>d(e.target.value),placeholder:"deduct"===s?"Credits to deduct":"New balance",min:"0",step:"1",fullWidth:!0}),(0,a.jsx)(m.pd,{value:i,onChange:e=>c(e.target.value),placeholder:"Reason (optional)",fullWidth:!0}),(0,a.jsx)(m.$n,{variant:"outline",size:"sm",disabled:!g||v,onClick:()=>x(!0),fullWidth:!0,className:"border-red-300 text-red-700 hover:bg-red-50",children:"deduct"===s?"Deduct credits":"Set balance"}),(0,a.jsx)("p",{className:"text-xs leading-snug text-[var(--text-muted)]",children:"deduct"===s?"Removes plan credits (never below zero). Top-up packs are untouched.":"Overwrites the plan credit balance. Top-up packs are untouched."}),(0,a.jsx)(w.ConfirmDialog,{open:o,onClose:()=>x(!1),onConfirm:j,title:"deduct"===s?"Deduct credits?":"Set credit balance?",description:"deduct"===s?`This will remove ${b} plan credit${1===b?"":"s"} from this user. The change is logged as a manual adjustment and cannot be undone automatically.`:`This will set this user's plan credit balance to exactly ${b}. The change is logged as a manual adjustment and cannot be undone automatically.`,variant:"danger",confirmText:"deduct"===s?"Deduct":"Set balance",isLoading:v})]})}function S(e){let{userId:t}=e,[s,n]=(0,r.useState)(!1),l=(0,u.pB)(t);return(0,a.jsxs)("div",{className:"rounded-lg border border-[var(--border-subtle)] bg-white p-3 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",children:[(0,a.jsx)(i.A,{className:"h-3.5 w-3.5"}),"Monthly reset"]}),(0,a.jsx)(m.$n,{variant:"outline",size:"sm",disabled:l.isPending,isLoading:l.isPending,onClick:()=>n(!0),fullWidth:!0,children:"Run monthly reset"}),(0,a.jsx)("p",{className:"text-xs leading-snug text-[var(--text-muted)]",children:"Grants this month's allotment and re-anchors the renewal date to the Stripe period end. Use it when a paid renewal never delivered credits. Only grants if the current period is actually paid."}),(0,a.jsx)(w.ConfirmDialog,{open:s,onClose:()=>n(!1),onConfirm:async()=>{await l.mutateAsync(),n(!1)},title:"Run the monthly reset?",description:"Grants this user's monthly allotment on top of their current balance (capped at 3x the allotment) and moves the next renewal date to their Stripe period end. The server refuses to grant if the current period isn't paid.",variant:"warning",confirmText:"Reset",isLoading:l.isPending})]})}var A=s(95740),$=s(29502),_=s(56154);function P(e){let{open:t,onClose:s,userId:n,existing:l}=e,d=null!==l,[i,c]=(0,r.useState)(""),[o,x]=(0,r.useState)(""),[p,h]=(0,r.useState)(""),[b,g]=(0,r.useState)("next_cycle"),v=(0,u.Bm)(n),j=(0,u.c6)(n),f=d?j:v;(0,r.useEffect)(()=>{t&&(l?(c(String(l.monthly_usd)),x(String(l.monthly_credits)),h(l.reason??"")):(c(""),x(""),h("")),g("next_cycle"))},[t,l]);let y=Number(i),N=Number(o),w=""!==i.trim()&&Number.isFinite(y)&&y>0&&y<=200,k=""!==o.trim()&&Number.isFinite(N)&&N>=0&&N<=1e4,C=""!==i.trim()&&""!==o.trim(),S=w&&k&&!f.isPending,A=d?"Save changes":w?`Apply $${y.toFixed(2)}/mo`:"Apply";return(0,a.jsx)(m.aF,{open:t,onClose:s,title:d?"Edit custom pricing":"Set custom pricing",size:"md",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("p",{className:"text-xs text-[var(--text-muted)]",children:"Sets a per-user override on the Starter subscription. Used for early adopters, founders' circle, comped accounts, and similar deals. The user keeps a real Stripe subscription - only the price differs."}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Monthly USD"}
1),(0,a.jsx)(m.pd,{type:"number",value:i,onChange:e=>c(e.target.value),placeholder:"29",min:"0",max:200,step:"0.01",fullWidth:!0,autoFocus:!0}),(0,a.jsx)("p",{className:"text-xs text-[var(--text-muted)] mt-1",children:`> 0, ⤠$200`})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Monthly credits"}),(0,a.jsx)(m.pd,{type:"number",value:o,onChange:e=>x(e.target.value),placeholder:"1000",min:"0",max:1e4,step:"1",fullWidth:!0}),(0,a.jsx)("p",{className:"text-xs text-[var(--text-muted)] mt-1",children:`⥠0, ⤠${1e4.toLocaleString()}`})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Plan"}),(0,a.jsx)("select",{value:"starter",disabled:!0,className:"w-full rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-muted)] px-3 py-2 text-sm text-[var(--text-primary)] disabled:cursor-not-allowed disabled:opacity-70",children:(0,a.jsx)("option",{value:"starter",children:"Starter"})}),(0,a.jsx)("p",{className:"text-xs text-[var(--text-muted)] mt-1",children:"Standard / Premium will unlock when those plans go public."})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)] mb-1",children:["Reason"," ",(0,a.jsxs)("span",{className:"font-normal lowercase tracking-normal text-[var(--text-muted)]",children:["(optional, max ",500," chars - written to audit log)"]})]}),(0,a.jsx)("textarea",{value:p,onChange:e=>h(e.target.value.slice(0,500)),rows:2,className:"w-full rounded-lg border border-[var(--border-subtle)] p-2 text-sm focus:border-[var(--primary)] focus:outline-none",placeholder:"Founders' circle - $29/mo lifetime deal"}),(0,a.jsxs)("div",{className:"text-right text-xs text-[var(--text-muted)] mt-1",children:[p.length,"/",500]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)] mb-2",children:"When should this take effect?"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsx)(M,{icon:(0,a.jsx)($.A,{className:"h-4 w-4"}),title:"Next billing cycle",subtitle:"Clean - no proration",selected:"next_cycle"===b,onClick:()=>g("next_cycle")}),(0,a.jsx)(M,{icon:(0,a.jsx)(_.A,{className:"h-4 w-4"}),title:"Immediately",subtitle:"Prorate this cycle",selected:"now"===b,onClick:()=>g("now")})]})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,a.jsx)(m.$n,{variant:"outline",onClick:s,disabled:f.isPending,children:"Cancel"}),(0,a.jsx)(m.$n,{variant:"primary",disabled:!S||!C,isLoading:f.isPending,onClick:()=>{if(!w||!k)return;let e=p.trim();f.mutate({monthly_usd:y,monthly_credits:N,plan:"starter",proration:b,...e?{reason:e}:{}},{onSuccess:s})},children:A})]})]})})}function M(e){let{icon:t,title:s,subtitle:r,selected:n,onClick:l}=e;return(0,a.jsxs)("button",{type:"button",onClick:l,"aria-pressed":n,className:`flex items-start gap-2 rounded-lg border p-3 text-left transition-all ${n?"border-[var(--primary)] bg-[var(--primary)]/5 shadow-sm":"border-[var(--border-subtle)] bg-white hover:border-[var(--border-strong)]"}`,children:[(0,a.jsx)("span",{className:`mt-0.5 ${n?"text-[var(--primary)]":"text-[var(--text-muted)]"}`,children:t}),(0,a.jsxs)("span",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-[var(--text-primary)]",children:s}),(0,a.jsx)("span",{className:"text-xs text-[var(--text-muted)]",children:r})]})]})}var I=s(71360);function D(e){let{open:t,onClose:s,userId:n}=e,[l,d]=(0,r.useState)(!1),i=(0,u.rr)(n);return(0,r.useEffect)(()=>{t&&d(!1)},[t]),(0,a.jsx)(m.aF,{open:t,onClose:s,title:"Remove custom pricing?",size:"sm",showCloseButton:!1,children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-red-100",children:(0,a.jsx)(I.A,{className:"h-6 w-6 text-red-600"})}),(0,a.jsx)("p",{className:"text-sm text-[var(--text-muted)] text-center",children:"The user will go back to the public Starter price ($49/mo) at next billing cycle."}),(0,a.jsx)("div",{className:"rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-muted)] p-3",children:(0,a.jsx)(m.Sc,{checked:l,onChange:d,disabled:i.isPending,label:"Also reset monthly credits to standard Starter allowance"})}),(0,a.jsxs)("div",{className:"flex gap-3 pt-1",children:[(0,a.jsx)(m.$n,{variant:"outline",className:"flex-1",onClick:s,disabled:i.isPending,children:"Cancel"}),(0,a.jsx)(m.$n,{variant:"danger",className:"flex-1",onClick:()=>{i.mutate(l,{onSuccess:s})},isLoading:i.isPending,children:"Remove"})]})]})})}function F(e){let{userId:t}=e,[s,n]=(0,r.useState)(!1),[l,d]=(0,r.useState)(!1),i=(0,u.LB)(t);if(!i.data)return null;let{override:c,created_by_admin:o}=i.data,x=null!==c;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white p-4",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold flex items-center gap-2 mb-2",children:[(0,a.jsx)(A.A,{className:"h-4 w-4"}),"Subscription pricing",x&&(0,a.jsx)("span",{className:"inline-flex items-center rounded-full bg-amber-100 px-2 py-0.5 text-xs font-semibold uppercase tracking-wider text-amber-800",children:"Custom pricing"})]}),x?(0,a.jsxs)("div",{className:"text-sm space-y-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["$",Number(c.monthly_usd).toFixed(2),"/mo \xb7"," ",Number(c.monthly_credits).toLocaleStr
1ing()," ","credits/mo"," ",(0,a.jsxs)("span",{className:"capitalize text-[var(--text-muted)] font-normal",children:["(",c.plan,")"]})]}),c.reason&&(0,a.jsxs)("p",{className:"text-xs text-[var(--text-muted)]",children:["Reason: ",c.reason]}),o&&(0,a.jsxs)("p",{className:"text-xs text-[var(--text-muted)]",children:["Granted by"," ",o.name||o.email," \xb7"," ",new Date(c.created_at).toLocaleDateString()]})]}):(0,a.jsx)("p",{className:"text-sm text-[var(--text-secondary)]",children:"Standard pricing - $49/mo \xb7 500 credits/mo (Starter)"})]}),(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:x?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.$n,{variant:"primary",size:"sm",onClick:()=>n(!0),children:"Edit"}),(0,a.jsx)(m.$n,{variant:"outline",size:"sm",onClick:()=>d(!0),children:"Remove"})]}):(0,a.jsx)(m.$n,{variant:"primary",size:"sm",onClick:()=>n(!0),children:"Set custom pricing"})})]})}),(0,a.jsx)(P,{open:s,onClose:()=>n(!1),userId:t,existing:i.data?.override??null}),(0,a.jsx)(D,{open:l,onClose:()=>d(!1),userId:t})]})}var R=s(52056),z=s(78519),L=s(93499),E=s(39867),U=s(94465),W=s(31166);function T(e){let{open:t,onClose:s,userId:n,planLabel:l,periodEnd:d}=e,[i,c]=(0,r.useState)("period_end"),[o,x]=(0,r.useState)(""),[m,p]=(0,r.useState)("en"),h=(0,u.Xi)(n);(0,r.useEffect)(()=>{t&&(c("period_end"),x(""),p("en"))},[t]);let b=d?new Date(d).toLocaleDateString():null,g=async()=>{await h.mutateAsync({mode:i,reason:o.trim(),lang:m}),s()};return(0,a.jsx)(U.Modal,{open:t,onClose:s,title:`Cancel ${l} subscription`,size:"md",footer:(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(W.$,{variant:"ghost",onClick:s,disabled:h.isPending,children:"Keep subscription"}),(0,a.jsx)(W.$,{variant:"danger",onClick:g,isLoading:h.isPending,disabled:o.trim().length<3,children:"Cancel subscription"})]}),children:(0,a.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,a.jsxs)("label",{className:"flex items-start gap-2",children:[(0,a.jsx)("input",{type:"radio",name:"cancel-mode",checked:"period_end"===i,onChange:()=>c("period_end"),"aria-label":"At period end"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("strong",{children:"At period end"})," â keeps access"," ",b?`until ${b}`:"until the period ends","; reversible."]})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2",children:[(0,a.jsx)("input",{type:"radio",name:"cancel-mode",checked:"immediate"===i,onChange:()=>c("immediate"),"aria-label":"Immediately"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("strong",{children:"Immediately"})," â revokes access now."]})]}),"immediate"===i&&(0,a.jsx)("div",{className:"rounded-lg border border-[var(--color-danger)] bg-[var(--color-danger)]/10 p-2 text-xs text-[var(--color-danger)]",children:"This cancels in Stripe now and resets the user's credits to 0."}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-semibold",htmlFor:"cancel-reason",children:"Reason (internal â not shown to the customer)"}),(0,a.jsx)("textarea",{id:"cancel-reason",value:o,onChange:e=>x(e.target.value),rows:3,className:"w-full rounded-lg border border-[var(--border-subtle)] p-2"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-semibold",htmlFor:"cancel-lang",children:"Customer email language"}),(0,a.jsxs)("select",{id:"cancel-lang",value:m,onChange:e=>p(e.target.value),className:"rounded-lg border border-[var(--border-subtle)] p-2",children:[(0,a.jsx)("option",{value:"en",children:"English"}),(0,a.jsx)("option",{value:"tr",children:"T\xfcrk\xe7e"})]})]})]})})}function B(e){let{open:t,onClose:s,userId:n,payment:l}=e,[d,i]=(0,r.useState)(""),[c,o]=(0,r.useState)(""),[x,m]=(0,r.useState)("en"),[p,h]=(0,r.useState)(!1),[b,g]=(0,r.useState)("period_end"),[v,j]=(0,r.useState)(""),f=(0,u.M1)(n);(0,r.useEffect)(()=>{t&&(i(l?(Math.round(100*l.maxRefundable)/100).toString():""),o(""),m("en"),h(!1),g("period_end"),j("undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.round(1e9*Math.random())}`))},[t,l]);let y=d.trim(),N=""===y?void 0:Number(y),w=l?Number.isFinite(N)&&N>0&&N<=l.maxRefundable:""===y||Number.isFinite(N)&&N>0,k=c.trim().length>=3&&w,C=async()=>{let e=await f.mutateAsync({...l?{chargeId:l.chargeId}:{},amountUsd:N,reason:c.trim(),lang:x,request_id:v,...p?{alsoCancel:{mode:b}}:{}});e?.cancelFailed||s()};return(0,a.jsx)(U.Modal,{open:t,onClose:s,title:"Refund payment",size:"md",footer
1:(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(W.$,{variant:"ghost",onClick:s,disabled:f.isPending,children:"Cancel"}),(0,a.jsx)(W.$,{variant:"danger",onClick:C,isLoading:f.isPending,disabled:!k,children:"Process refund"})]}),children:(0,a.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,a.jsx)("p",{className:"text-muted",children:l?`Refunds ${l.label} to the customer's original payment method via Stripe.`:"Refunds the customer's most recent successful payment to their original payment method via Stripe."}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-semibold",htmlFor:"refund-amount",children:l?`Amount (USD) â up to $${l.maxRefundable.toFixed(2)}`:"Amount (USD) â leave blank for a full refund"}),(0,a.jsx)("input",{id:"refund-amount",type:"number",min:"0",step:"0.01",value:d,onChange:e=>i(e.target.value),placeholder:"Full amount",className:"w-40 rounded-lg border border-[var(--border-subtle)] p-2"}),!w&&(0,a.jsx)("p",{className:"mt-1 text-xs text-[var(--color-danger)]",children:l?`Enter a positive amount up to $${l.maxRefundable.toFixed(2)}.`:"Enter a positive amount or leave blank."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-semibold",htmlFor:"refund-reason",children:"Reason (internal â not shown to the customer)"}),(0,a.jsx)("textarea",{id:"refund-reason",value:c,onChange:e=>o(e.target.value),rows:3,className:"w-full rounded-lg border border-[var(--border-subtle)] p-2"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-semibold",htmlFor:"refund-lang",children:"Customer email language"}),(0,a.jsxs)("select",{id:"refund-lang",value:x,onChange:e=>m(e.target.value),className:"rounded-lg border border-[var(--border-subtle)] p-2",children:[(0,a.jsx)("option",{value:"en",children:"English"}),(0,a.jsx)("option",{value:"tr",children:"T\xfcrk\xe7e"})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-[var(--border-subtle)] p-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2 font-medium",children:[(0,a.jsx)("input",{type:"checkbox",checked:p,onChange:e=>h(e.target.checked)}),"Also cancel subscription"]}),p&&(0,a.jsxs)("div",{className:"mt-2 space-y-1 pl-6 text-xs",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"radio",name:"refund-cancel-mode",checked:"period_end"===b,onChange:()=>g("period_end")}),"At period end (keeps access until it ends; reversible)"]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"radio",name:"refund-cancel-mode",checked:"immediate"===b,onChange:()=>g("immediate")}),"Immediately (revokes access + resets credits now)"]})]})]})]})})}let q=e=>`$${e.toFixed(2)}`,G=e=>e?new Date(e).toLocaleDateString():"â",V={active:"bg-green-100 text-green-700",trialing:"bg-blue-100 text-blue-700",past_due:"bg-red-100 text-red-700",unpaid:"bg-red-100 text-red-700",canceled:"bg-gray-100 text-gray-600"};function H(e){let{userId:t}=e,{data:s,isLoading:n,isError:l,refetch:d}=(0,u.x0)(t),{data:i}=(0,u.kG)(t),c=(0,u.a1)(t),[o,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null);if(n)return(0,a.jsx)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white p-4",children:(0,a.jsx)("div",{className:"h-24 w-full animate-pulse rounded bg-[var(--surface-secondary)]"})});if(l||!s)return(0,a.jsxs)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-[var(--color-danger)]",children:[(0,a.jsx)(R.A,{className:"h-4 w-4"}),"Couldn't load the subscription-billing panel."]}),(0,a.jsx)(m.$n,{variant:"ghost",size:"sm",className:"mt-2",onClick:()=>d(),children:"Retry"})]});let b=s.subscription,g=i?.subscription?.stripe_customer_id??null,v=!!b&&"canceled"!==b.status&&"demo"!==b.plan;return(0,a.jsxs)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white p-4 space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold flex items-center gap-2 mb-2",children:[(0,a.jsx)(z.A,{className:"h-4 w-4"}),"Subscription"]}),b?(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsxs)("p",{className:"text-2xl font-bold capitalize",children:[b.plan,b.interval&&(0,a.jsxs)("span",{className:"text-sm font-normal text-[var(--text-muted)] ml-2",children:["\xb7 ",b.interval]}),(0,a.jsx)("span",{className:`ml-3 rounded-full px-2 py-0.5 text-xs font-medium ${V[b.status]??"bg-gray-100 text-gray-600"}`,children:b.status})]}),(0,a.jsxs)("div",{className:"text-xs text-[var(--text-muted)] mt-1 space-y-0.5",children:[(0,a.jsxs)("div",{children:["Current cycle: ",G(b.currentPeriodStart)," â"," ",G(b.currentPeriodEnd)]}),s.upcomingInvoice&&(0,a.jsxs)("div",{children:["Next charge: ",G(s.upcomingInvoice.nextChargeDate)," \xb7"," ",q(s.upcomingInvoice.amountDue)]}),s.paymentMethod&&(0,a.jsxs)("div",{className:"capitalize",children:["Card: ",s.paymentMethod.brand," \xb7\xb7\xb7\xb7 ",s.paymentMethod.last4]}),b.cancelAtPeriodEnd&&(0,a.jsx)("div",{className:"text-amber-700 font-medium",children:"Scheduled to cancel at period end"})]})]}):(0,a.jsx)("p",{className:"text-sm text-[var(--text-muted)]",children:s.hasStripeCustomer?"No active subscription.":"No Stripe customer / payments."})]}),g&&(0,a.jsxs)("a",{href:`https://dashboard.stripe.com/customers/${g}`,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-xs font-medium text-[var(--primary)] hover:underline",children:["Open in Stripe",(0,a.jsx)(L.A,{className:"h-3 w-3"})]})]}),s.stripeError&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-amber-50 border border-amber-200 p-2 text-xs text-amber-700",children:[(0,a.jsx)(R.A,{className:"h-4 w-4 shrink-0"}),"We couldn't load live billing from Stripe (",s.stripeError,")."]}),(v||b?.cancelAtPeriodEnd)&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 border-t border-[var(--border-subtle)] pt-3",children:[v&&(0,a.jsx)(m.$n,{variant:"danger",size:"sm",onClick:()=>x(!0),children:"Cancel subscription"}),b?.cancelAtPeriodEnd&&(0,a.jsx)(m.$n,{variant:"outline",size:"sm",onClick:()=>c.mutate(),isLoading:c.isPending,children:"Resume"})]}),s.payments.length>0&&(0,a.jsxs)("div",{className:"border-t border-[var(--border-subtle)] pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-[var(--text-muted)]",children:"Payment history"}),(0,a.jsxs)("span",{className:"text-xs text-[var(--text-muted)]",children:["Paid ",q(s.totals.paid)," \xb7 Refunded ",q(s.totals.refunded)]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[var(--border-subtle)]",children:(0,a.jsx)("table",{className:"w-full text-xs",children:(0,a.jsx)("tbody",{className:"divide-y divide-[var(--border-subtle)]",children:s.payments.map(e=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 whitespace-nowrap",children:G(e.date)}),(0,a.jsx)("td",{className:"px-3 py-2 font-semibold tabular-nums",children:q(e.amount)}),(0,a.jsx)("td",{className:"px-3 py-2 text-[var(--text-muted)]",children:"partially_refunded"===e.status?`Refunded ${q(e.refundedAmount)}`:"refunded"===e.status?"Refunded":"disputed"===e.status?"Disputed":"failed"===e.status?"Failed":"open"===e.status?"Open":"Paid"}),(0,a.jsx)("td",{className:"px-3 py-2 text-[var(--text-muted)]",children:e.invoiceNumber??"â"}),(0,a.jsx)("td",{className:"px-3 py-2 text-right",children:(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[e.pdfUrl&&(0,a.jsx)("a",{href:e.pdfUrl,target:"_blank",rel:"noreferrer",className:"text-[var(--primary)] hover:underline inline-flex items-center gap-1",children:(0,a.jsx)(E.A,{className:"h-3 w-3"})}),e.refundable&&e.chargeId?(0,a.jsx)(m.$n,{variant:"outline",size:"sm",onClick:()=>h({chargeId:e.chargeId,maxRefundable:e.amount-e.refundedAmount,currency:e.currency,label:`${G(e.date)} \xb7 ${q(e.amount)}`}),children:"Refund"}):null]})})]},e.invoiceId??e.chargeId??e.date))})})})]}),b&&(0,a.jsx)(T,{open:o,onClose:()=>
1x(!1),userId:t,planLabel:b.plan,periodEnd:b.currentPeriodEnd}),(0,a.jsx)(B,{open:!!p,onClose:()=>h(null),userId:t,payment:p})]})}function O(e){let{userId:t}=e,[s,h]=(0,r.useState)("credits"),[b,N]=(0,r.useState)(1),{data:w,error:k}=(0,u.kG)(t),{data:A}=(0,u.Yf)(t),$=A?.plan.current_credits??null,_=A?.plan.monthly_credits??null,P=A?.balance_usd??null,M=(0,u.Vu)(t,{page:b,pageSize:25}),I=(0,u.IQ)(t,{page:b,pageSize:25}),D="credits"===s?M:I,R="credits"===s?M.data?.txns??[]:I.data?.txns??[],z=D.data?.pagination.totalPages??1,L=D.data?.pagination.total??0;return k?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(H,{userId:t}),(0,a.jsxs)("div",{className:"rounded-xl border border-red-200 bg-red-50 p-6 text-sm text-red-700 text-center",children:["Failed to load the billing history: ",k.message]})]}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(H,{userId:t}),(0,a.jsx)(F,{userId:t}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,a.jsx)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white p-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-xs uppercase tracking-wide text-[var(--text-muted)] flex items-center gap-1.5 mb-1",children:[(0,a.jsx)(n.A,{className:"h-3.5 w-3.5"}),"Current credits"]}),null===$?(0,a.jsx)("div",{className:"h-8 w-20 bg-[var(--surface-secondary)] rounded animate-pulse"}):(0,a.jsx)("p",{className:"text-3xl font-bold text-[var(--text-primary)] tabular-nums",children:$.toLocaleString()}),null!==_&&_>0&&(0,a.jsxs)("p",{className:"text-xs text-[var(--text-muted)] mt-0.5",children:["of ",_.toLocaleString()," monthly allowance"]})]}),(0,a.jsx)("div",{className:"flex items-center justify-center w-12 h-12 rounded-full bg-amber-100 text-amber-700 flex-shrink-0",children:(0,a.jsx)(n.A,{className:"h-6 w-6"})})]})}),(0,a.jsx)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white p-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-xs uppercase tracking-wide text-[var(--text-muted)] flex items-center gap-1.5 mb-1",children:[(0,a.jsx)(l.A,{className:"h-3.5 w-3.5"}),"USD balance"]}),null===P?(0,a.jsx)("div",{className:"h-8 w-24 bg-[var(--surface-secondary)] rounded animate-pulse"}):(0,a.jsx)("p",{className:`text-3xl font-bold tabular-nums ${P<0?"text-red-600":0===P?"text-[var(--text-muted)]":"text-[var(--text-primary)]"}`,children:(0,p.Ss)(P)}),(0,a.jsx)("p",{className:"text-xs text-[var(--text-muted)] mt-0.5",children:null===P?"":P<0?"User owes - Stripe charge will retry":0===P?"No balance":"Available to apply against future charges"})]}),(0,a.jsx)("div",{className:`flex items-center justify-center w-12 h-12 rounded-full flex-shrink-0 ${null!==P&&P<0?"bg-red-100 text-red-700":"bg-emerald-100 text-emerald-700"}`,children:(0,a.jsx)(l.A,{className:"h-6 w-6"})})]})})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-[var(--primary)]/30 bg-[var(--secondary)] p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold flex items-center gap-2 mb-3",children:[(0,a.jsx)(d.A,{className:"h-4 w-4 text-[var(--primary)]"}),"Admin actions - add money or credits"]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-3",children:[(0,a.jsx)(v,{userId:t}),(0,a.jsx)(C,{userId:t}),(0,a.jsx)(j,{userId:t}),(0,a.jsx)(f,{userId:t}),(0,a.jsx)(S,{userId:t})]})]}),(0,a.jsx)(y,{userId:t}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[(0,a.jsx)(g,{title:"Refunds issued",count:w?.refunds.count??0,tone:"warn",icon:i.A,rows:w?.refunds.recent??[]}),(0,a.jsx)(g,{title:"Failed payments",count:w?.failed_payments.count??0,tone:"err",icon:c.A,rows:w?.failed_payments.recent??[]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 pt-2",children:[(0,a.jsx)("div",{className:"flex rounded-lg border border-[var(--border-subtle)] overflow-hidden",children:["credits","balance"].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>{h(e),N(1)},className:`px-3 py-1.5 text-xs font-medium transition-colors ${s===e?"bg-[var(--primary)] text-white":"bg-white text-[var(--text-secondary)] hover:bg-[var(--surface-secondary)]"}`,children:"credits"===e?"Credit txns":"Balance txns"},e))}),(0,a.jsxs)("div",{className:"text-xs text-[var(--text-muted)]",children:[L," entries"]}),z>1&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,a.jsx)(m.$n,{variant:"outline",size:"sm",onClick:()=>N(e=>Math.max(1,e-1)),disabled:1===b,children:(0,a.jsx)(o.A,{className:"h-3 w-3"})}),(0,a.jsxs)("span",{className:"text-[var(--text-muted)] whitespace-nowrap",children:["Page ",b," / ",z]}
1),(0,a.jsx)(m.$n,{variant:"outline",size:"sm",onClick:()=>N(e=>Math.min(z,e+1)),disabled:b===z,children:(0,a.jsx)(x.A,{className:"h-3 w-3"})})]})]}),D.isLoading?(0,a.jsx)("div",{className:"space-y-2",children:Array.from({length:4}).map((e,t)=>(0,a.jsx)("div",{className:"h-12 bg-[var(--surface-secondary)] rounded-xl animate-pulse"},t))}):0===R.length?(0,a.jsxs)("div",{className:"rounded-xl border border-dashed border-[var(--border-subtle)] p-12 text-center text-sm text-[var(--text-muted)]",children:["No ",s," transactions."]}):(0,a.jsx)("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-white overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[var(--surface-secondary)] text-xs uppercase tracking-wider text-[var(--text-muted)]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-3 py-2 font-semibold",children:"Type"}),(0,a.jsx)("th",{className:"text-left px-3 py-2 font-semibold",children:"Amount"}),(0,a.jsx)("th",{className:"text-left px-3 py-2 font-semibold",children:"After"}),(0,a.jsx)("th",{className:"text-left px-3 py-2 font-semibold",children:"Description"}),(0,a.jsx)("th",{className:"text-left px-3 py-2 font-semibold",children:"When"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[var(--border-subtle)]",children:R.map(e=>{let t=Number(e.amount),r=t<0||"spent"===e.type,n="credits"===s;return(0,a.jsxs)("tr",{className:"hover:bg-[var(--surface-secondary)]/40",children:[(0,a.jsx)("td",{className:"px-3 py-2 text-xs",children:(0,a.jsx)("span",{className:"font-mono",children:e.type})}),(0,a.jsx)("td",{className:`px-3 py-2 text-xs font-semibold ${r?"text-red-700":"text-green-700"}`,children:n?t.toLocaleString():(0,p.Ss)(t)}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs",children:n?e.balance_after:"number"==typeof e.balance_after?(0,p.Ss)(Number(e.balance_after)):"â"}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs truncate max-w-xs",children:e.description}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs text-[var(--text-muted)] whitespace-nowrap",children:(0,p.BM)(e.created_at)})]},e.id)})})]})})]})}},78519:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},91761:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]])},93499:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])}}]);
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.