1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4724],{31547:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(13185).A)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},79564:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(13185).A)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},84724:(e,t,a)=>{a.r(t),a.d(t,{SettingsView:()=>J});var r=a(95155),l=a(12115),s=a(54243),i=a(71408),n=a(58775),o=a(85361),d=a(13185);let c=(0,d.A)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);var m=a(87212),x=a(69746),u=a(79564),p=a(83410),g=a(39823),h=a(44105);let b=(0,d.A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);var f=a(74416),y=a(31547),j=a(38009);let v=(0,d.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"}]]);var N=a(34788);let w=(0,d.A)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var k=a(89168),_=a(8731),A=a(81589),S=a(80526),z=a(91700),C=a(59450),M=a(87691),P=a(34341),F=a(94819),L=a(93821);let $=["#00FF88","#5BFFB0","#00CC6A","#C5A55A","#FF9F43","#A78BFA","#F472B6","#60A5FA","#34D399","#FBBF24"],U={free:{badge:"bg-muted/30 text-muted-foreground border-border/60",glow:"from-muted/20"},zero_gravity:{badge:"bg-muted/30 text-muted-foreground border-border/60",glow:"from-muted/20"},lift_off:{badge:"bg-emerald-500/10 text-emerald-400 border-emerald-500/30",glow:"from-emerald-500/15"},hyperstream:{badge:"bg-primary/10 text-primary border-primary/30",glow:"from-primary/15"},apex_mode:{badge:"bg-amber-500/10 text-amber-300 border-amber-500/30",glow:"from-amber-500/15"},multi_orbit_ops:{badge:"bg-orange-500/10 text-orange-400 border-orange-500/30",glow:"from-orange-500/15"},lunar_ops:{badge:"bg-violet-500/10 text-violet-400 border-violet-500/30",glow:"from-violet-500/15"},command_center:{badge:"bg-pink-500/10 text-pink-400 border-pink-500/30",glow:"from-pink-500/15"}};function B(e){let t=0;for(let a=0;a<e.length;a++)t=(t<<5)-t+e.charCodeAt(a)|0;return Math.abs(t)}function E({name:e,email:t,avatarUrl:a,size:l=72}){let s=$[B(e||t||"?")%$.length],i=(e||t||"?").split(/[\s@]+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??"").join("");return a?(0,r.jsx)("div",{className:"rounded-2xl overflow-hidden flex-shrink-0 ring-2 ring-primary/20 shadow-lg shadow-primary/5",style:{width:l,height:l},children:(0,r.jsx)("img",{src:a,alt:"",className:"w-full h-full object-cover"})}):(0,r.jsx)("div",{className:"rounded-2xl flex items-center justify-center flex-shrink-0 ring-2 shadow-lg",style:{width:l,height:l,background:`linear-gradient(135deg, ${s}33, ${s}11)`,borderColor:`${s}55`,boxShadow:`0 0 24px ${s}18`},children:(0,r.jsx)("span",{className:"font-bold font-mono tracking-tight",style:{fontSize:.34*l,color:s},children:i||"?"})})}let T=[{id:"profile",label:"Profile",icon:n.A},{id:"notifications",label:"Notifications",icon:o.A},{id:"account",label:"Plan & Usage",icon:c}],q=[{id:"batch",label:"Batch completion alerts",description:"Get notified when your ads are ready",default:!0},{id:"usage",label:"Usage warnings",description:"Alert when approaching your credit limit",default:!0},{id:"updates",label:"Product updates",description:"New features and improvements",default:!0},{id:"tips",label:"Tips & tutorials",description:"Learn how to get better results",default:!1}],V="scaleit:notification-prefs";function D(){return(0,r.jsxs)("div",{className:"fixed inset-0 pointer-events-none overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute bottom-1/4 right-1/3 w-[500px] h-[500px] rounded-full bg-primary/3 blur-[120px]"}),(0,r.jsx)("div",{className:"grid-pattern absolute inset-0 opacity-20"})]})}function J({currentUser:e=null,currentPlan:t="free",planKey:a="free",adsRemaining:n=0,usageLimit:o=0,usageMonthly:d=0,onPlans:J,onContactSupport:O,hasActiveSubscription:G=!1,hasBillingSubscription:H=!1,billingStatus:R=null,needsPaymentAttention:Y=!1,nextBillingDate:Z=null,billingStateLoading:I=!1}){let[X,W]=(0,l.useState)("profile"),[K,Q]=(0,l.useState)(null),[ee,et]=(0,l.useState)([]),[ea,er]=(0,l.useState)({full_name:""}),[el,es]=(0,l.useState)(!0),[ei,en]=(0,l.useState)(!1),[eo,ed]=(0,l.useState)(!1),[ec,em]=(0,l.useState)(!1),[ex,eu]=(0,l.useState)(!1),ep=(0,l.useCallback)(async()=>{try{eu(!0),await (0,F.vf)({returnPath:"/scale-it?section=settings&billing_updated=1",surface:"dashboard_settings"})}catch(e){console.error("Could not open billing management:",e),alert(e instanceof Error?e.message:"Could not open billing management.")}finally{eu(!1)}},[]),eg=(0,l.useCallback)(async()=>{try{let[{profile:t},{history:a}]=await Promise.all([z.L.getUserProfile(),z.L.getUserHistory()]);Q(t||null),et(function(e){let t=new Map;for(let a of e){let e=(a.brand||"").trim();!e||t.has(e)||t.set(e,a.input||null)}return Array.from(t.entries()).map(([e,t])=>({name:e,url:t})).slice(0,10)}(a||[])),er({full_name:t?.full_name||e?.user_metadata?.full_name||""})}catch(e){console.error("SettingsView profile load:",e)}finally{es(!1)}},[e]);(0,l.useEffect)(()=>{eg()},[eg]);let eh=async()=>{en(!0),ed(!1);try{let{profile:e,error:t}=await z.L.updateUserProfile(ea);if(t)throw t;Q(t=>({...t,...e,full_name:ea.full_name})),em(!1),ed(!0),setTimeout(()=>ed(!1),3e3)}catch{alert("Failed to update profile. Please try again.")}finally{en(!1)}},eb=()=>{er({full_name:K?.full_name||e?.user_metadata?.full_name||""}),em(!1)},[ef,ey]=(0,l.useState)(()=>Object.fromEntries(q.map(e=>[e.id,e.default])));(0,l.useEffect)(()=>{try{let e=window.localStorage.getItem(V);e&&ey(t=>({...t,...JSON.parse(e)}))}catch{}},[]);let ej=e?.created_at?(0,C.TJ)(e.created_at,{month:"long",year:"numeric"}):K?.created_at?(0,C.TJ)(K.created_at,{month:"long",year:"numeric"}):"â",ev=(0,P.oS)(n,o),eN=o>
10?Math.min(100,Math.round(d/o*100)):0,ew=(0,P.LA)(ev),ek=(0,M.A)(a||K?.subscription_plan||t),e_=U[ek]||U.free,eA=(0,L.ZG)(R||"unknown"),eS="unknown"===eA?(0,L.ZG)(K?.subscription_status):eA,ez=Y||(0,L.D)(eS),eC=H||(0,L.Xs)(eS),eM=!!(eC||K?.stripe_customer_id||K?.stripe_subscription_id),eP="free"!==ek&&(eC||G),eF=K?.full_name||e?.user_metadata?.full_name||e?.email?.split("@")[0]||"Lab Member",eL=e?.email||"â",e$=function(e){if(!e)return null;let t=new Date(e);return Number.isFinite(t.getTime())?Math.max(0,Math.floor((Date.now()-t.getTime())/864e5)):null}(K?.created_at||e?.created_at),eU=K?.total_generations??0,eB=K?.billing_cycle||"monthly",eE=(K?.subscription_status||"inactive").replace(/_/g," "),eT=Z||K?.next_billing_date,eq=eT?(0,C.TJ)(eT,{month:"short",day:"numeric",year:"numeric"}):null,eV=eP?"Next Renewal":"Plan Limit",eD=eP&&eq?eq:String(o),eJ=K?.payment_count??0,eO=K?.avatar_url||e?.user_metadata?.avatar_url;return(0,r.jsxs)("div",{className:"min-h-full p-3 pb-6 sm:p-6 lg:p-8",children:[(0,r.jsx)(D,{}),(0,r.jsxs)("div",{className:"relative max-w-6xl mx-auto",children:[(0,r.jsx)(s.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-5 sm:mb-8",children:(0,r.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3 sm:gap-4",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"scale-it-view-title text-2xl sm:text-3xl font-bold text-foreground tracking-tight mb-1.5 sm:mb-2",children:"Settings"}),(0,r.jsx)("p",{className:"scale-it-view-subtitle text-sm sm:text-base text-muted-foreground",children:"Manage your profile and preferences."})]})})}),(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row gap-5 sm:gap-8",children:[(0,r.jsx)(s.P.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.1},className:"lg:w-64 flex-shrink-0",children:(0,r.jsx)("nav",{className:"flex gap-1 overflow-x-auto p-1.5 rounded-xl bg-secondary/30 border border-border/50 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:block lg:space-y-1 lg:overflow-visible lg:p-2",children:T.map(e=>{let t=e.icon,a=X===e.id;return(0,r.jsxs)("button",{onClick:()=>W(e.id),className:(0,S.cn)("flex shrink-0 items-center gap-2.5 px-3.5 py-2.5 rounded-xl text-left transition-all lg:w-full lg:gap-3 lg:px-4 lg:py-3",a?"bg-primary/10 text-foreground border border-primary/30":"text-muted-foreground hover:text-foreground hover:bg-secondary/50"),children:[(0,r.jsx)(t,{size:18,className:a?"text-primary":""}),(0,r.jsx)("span",{className:"font-medium text-sm lg:text-base whitespace-nowrap",children:e.label}),a&&(0,r.jsx)(m.A,{size:16,className:"ml-auto hidden text-primary lg:block"})]},e.id)})})}),(0,r.jsxs)(s.P.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.2},className:"flex-1 min-w-0",children:["profile"===X&&(0,r.jsx)("div",{className:"overflow-hidden rounded-2xl border border-border/50 bg-secondary/20",children:el?(0,r.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground py-16 justify-center",children:[(0,r.jsx)(x.A,{size:18,className:"animate-spin"}),"Loading profileâ¦"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"relative p-6 lg:p-8 border-b border-border/40",children:[(0,r.jsx)("div",{className:(0,S.cn)("absolute inset-0 bg-gradient-to-br to-transparent pointer-events-none opacity-80",e_.glow)}),(0,r.jsx)("div",{className:"absolute top-0 right-0 w-48 h-48 rounded-full bg-primary/5 blur-3xl pointer-events-none"}),(0,r.jsxs)("div",{className:"relative flex flex-col lg:flex-row lg:items-start gap-6",children:[(0,r.jsx)(E,{name:eF,email:eL,avatarUrl:eO,size:80}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[(0,r.jsx)("h2",{className:"text-2xl lg:text-3xl font-bold text-foreground tracking-tight truncate",children:eF}),(0,r.jsx)("span",{className:(0,S.cn)("inline-flex items-center px-2.5 py-1 rounded-full text-[10px] font-bold uppercase tracking-wider border font-mono",e_.badge),children:t}),"yearly"===eB&&(0,r.jsx)("span",{className:"text-[10px] font-mono font-semibold text-amber-400/90 uppercase tracking-wider",children:"Yearly"})]}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground font-mono truncate mb-3",children:eL}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-muted-foreground",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(u.A,{size:13,className:"text-primary/70"}),"Member since ",ej]}),null!=e$&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(p.A,{size:13,className:"text-primary/70"}),e$," days in the Lab"]}),eP&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 capitalize",children:[(0,r.jsx)(g.A,{size:13,className:"text-primary/70"}),eE]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 lg:flex-col lg:items-end shrink-0",children:[eo&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm text-emerald-400",children:[(0,r.jsx)(h.A,{size:15}),"Saved"]}),ec?null:(0,r.jsxs)(A.$,{type:"button",variant:"outline",className:"scale-it-control scale-it-control--quiet",onClick:()=>em(!0),children:[(0,r.jsx)(b,{size:15,className:"mr-2"}),"Edit your information"]})]})]})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 lg:grid-cols-4 divide-x divide-border/30 border-b border-border/40 bg-secondary/30",children:[{label:"Total Ads",value:String(eU),icon:f.A},{label:"This Period",value:String(d),icon:y.A},{label:"Remaining",value:String(n),icon:j.A},{label:eV,value:eD,icon:eC?u.A:c}].map(e=>{let t=e.icon;return(0,r.jsxs)("div",{className:"p-4 lg:p-5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)(t,{size:13,className:"text-muted-foreground"}),(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:e.label})]}),(0,r.jsx)("div",{className:"text-xl lg:text-2xl font-bold text-foreground truncate",children:e.value})]},e.label)})}),(0,r.jsxs)("div",{className:"p-6 lg:px-8 border-b border-border/40",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-1",children:"Usage this billing period"}),(0,r.jsxs)("p",{className:"text-sm text-foreground",children:[d," of ",o," ads used \xb7 ",ev,"% remaining"]})]}),eJ>0&&(0,r.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-[10px] font-mono font-semibold uppercase tracking-wider bg-primary/10 text-primary border border-primary/25",children:[eJ," payments"]})]}),(0,r.jsx)("div",{className:"h-2.5 rounded-full bg-secondary overflow-hidden",children:(0,r.jsx)(s.P.div,{initial:{width:0},animate:{width:`${Math.min(100,eN)}%`},transition:{duration:.8,delay:.15},className:(0,S.cn)("h-full rounded-full transition-colors duration-500",ew)})})]}),ee.length>0&&(0,r.jsxs)("div",{className:"p-6 lg:px-8 border-b border-border/40",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,r.jsx)(f.A,{size:15,className:"text-primary/80"}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Brands in your Lab"}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:ee.length})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:ee.map(e=>{let t=$[B(e.name)%$.length],a=e.url?e.url.startsWith("http")?e.url:`https://${e.url}`:null,l=a?"a":"span";return(0,r.jsxs)(l,{...a?{href:a,target:"_blank",rel:"noopener noreferrer"}:{},className:(0,S.cn)("inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-mono","bg-secondary/60 border border-border/50 text-muted-foreground",a&&"hover:border-primary/30 hover:text-foreground transition-colors"),children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full shrink-0 opacity-80",style:{background:t}}),e.name,a&&(0,r.jsx)(v,{size:11,className:"opacity-50"})]},e.name)})})]}),(0,r.jsx)(i.N,{children:ec&&(0,r.jsx)(s.P.div,{initial:{opacity:0,height:0}
1,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:(0,r.jsxs)("div",{className:"p-6 lg:p-8 bg-secondary/40 border-t border-border/40",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Edit profile"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Updates sync across your Account and the Lab."})]}),(0,r.jsx)("button",{type:"button",onClick:eb,className:"p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-secondary/80 transition-colors","aria-label":"Cancel editing",children:(0,r.jsx)(N.A,{size:16})})]}),(0,r.jsxs)("div",{className:"grid md:grid-cols-2 gap-4 max-w-2xl",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-muted-foreground uppercase tracking-wider mb-2",children:"Full Name"}),(0,r.jsx)("input",{type:"text",value:ea.full_name,onChange:e=>er(t=>({...t,full_name:e.target.value})),placeholder:"Your name",autoFocus:!0,className:"w-full px-4 py-2.5 rounded-xl bg-background/60 border border-border/50 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary/40 transition-colors"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-muted-foreground uppercase tracking-wider mb-2",children:"Email"}),(0,r.jsx)("input",{type:"email",value:eL,readOnly:!0,disabled:!0,className:"w-full px-4 py-2.5 rounded-xl bg-secondary/50 border border-border/50 text-sm text-muted-foreground cursor-not-allowed"}),(0,r.jsx)("p",{className:"text-[11px] text-muted-foreground mt-1.5",children:"Email is tied to your sign-in and can't be changed here."})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-3 mt-6",children:[(0,r.jsx)(A.$,{type:"button",variant:"outline",className:"scale-it-control scale-it-control--quiet",disabled:ei,onClick:eb,children:"Cancel"}),(0,r.jsx)(A.$,{type:"button",className:"scale-it-control scale-it-control--primary",disabled:ei,onClick:eh,children:ei?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.A,{size:16,className:"mr-2 animate-spin"}),"Savingâ¦"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w,{size:16,className:"mr-2"}),"Save Changes"]})})]})]})})}),!I&&!eC&&!G&&!ec&&(0,r.jsxs)("div",{className:"px-6 lg:px-8 py-4 flex flex-wrap items-center justify-between gap-3 bg-primary/5",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unlock more ads, downloads, and priority generation on a paid plan."}),(0,r.jsxs)("button",{type:"button",onClick:J,className:"text-xs font-medium text-primary hover:underline inline-flex items-center gap-1",children:["View plans",(0,r.jsx)(k.A,{size:13})]})]})]})}),"notifications"===X&&(0,r.jsxs)("div",{className:"p-6 rounded-xl bg-secondary/30 border border-border/50",children:[(0,r.jsx)("h2",{className:"text-xl font-bold text-foreground mb-1",children:"Notification Preferences"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mb-6",children:"Choose what you hear about. Saved to this browser instantly."}),(0,r.jsx)("div",{className:"space-y-3",children:q.map(e=>{let t=ef[e.id];return(0,r.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-secondary/50 border border-border/50",children:[(0,r.jsxs)("div",{className:"pr-4",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.label}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description})]}),(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":t,"aria-label":e.label,onClick:()=>{var t;return t=e.id,void ey(e=>{let a={...e,[t]:!e[t]};try{window.localStorage.setItem(V,JSON.stringify(a))}catch{}return a})},className:(0,S.cn)("relative w-12 h-6 rounded-full transition-colors flex-shrink-0",t?"bg-primary":"bg-muted"),children:(0,r.jsx)("div",{className:(0,S.cn)("absolute top-1 w-4 h-4 rounded-full bg-foreground transition-all",t?"left-7":"left-1")})})]},e.id)})})]}),"account"===X&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[{label:"Ads Remaining",value:String(n),icon:j.A},{label:"Used This Period",value:String(d),icon:y.A},{label:"Member Since",value:ej,icon:p.A}].map(e=>{let t=e.icon;return(0,r.jsxs)("div",{className:"p-4 rounded-xl bg-secondary/30 border border-border/50",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)(t,{size:14,className:"text-muted-foreground"}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:e.label})]}),(0,r.jsx)("div",{className:"text-2xl font-bold text-foreground truncate",children:e.value})]},e.label)})}),(0,r.jsxs)("div",{className:"p-6 rounded-xl bg-secondary/30 border border-border/50",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-xl font-bold text-foreground",children:"Plan & Usage"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Your current allowance at a glance."})]}),(0,r.jsx)("span",{className:"px-3 py-1 rounded-lg bg-primary/10 border border-primary/30 text-primary text-xs font-medium uppercase tracking-wider capitalize",children:t})]}),(0,r.jsxs)("p",{className:"text-sm text-foreground mb-3",children:[ev,"% remaining \xb7 ",n," of ",o," ads left"]}),(0,r.jsx)("div",{className:"h-2 rounded-full bg-secondary overflow-hidden mb-6",children:(0,r.jsx)(s.P.div,{initial:{width:0},animate:{width:`${Math.min(100,ev)}%`},transition:{duration:1,delay:.2},className:(0,S.cn)("h-full rounded-full transition-colors duration-500",ew)})}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-3",children:[(0,r.jsxs)(A.$,{type:"button",className:"scale-it-control scale-it-control--primary",onClick:ez?ep:J,disabled:I||ez&&ex,children:[(0,r.jsx)(g.A,{size:16,className:"mr-2"}),"View Plans",(0,r.jsx)(k.A,{size:15,className:"ml-2"})]}),!I&&eM&&!ez&&(0,r.jsxs)(A.$,{type:"button",variant:"outline",className:"scale-it-control scale-it-control--quiet",onClick:ep,disabled:ex,children:[(0,r.jsx)(v,{size:15,className:"mr-2"}),ex?"Opening billingâ¦":"Manage Billing"]}),(0,r.jsxs)(A.$,{type:"button",variant:"outline",className:"scale-it-control scale-it-control--quiet",onClick:O,children:[(0,r.jsx)(_.A,{size:15,className:"mr-2"}),"Contact Support"]})]})]})]})]})]})]})]})}},87212:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(13185).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},93821:(e,t,a)=>{a.d(t,{D:()=>n,Xs:()=>i,ZG:()=>s});let r=new Set(["incomplete","trialing","active","past_due","unpaid","paused"]),l=new Set(["incomplete","past_due","unpaid","paused"]);function s(e){return String(e||"inactive").trim().toLowerCase()}function i(e){return r.has(s(e))}function n(e){return l.has(s(e))}}}]);
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.