1import{a as k,_ as F}from"./useNumberFormatter--DZW-Ss2.js";import{_ as I}from"./Table-BMR-p7kg.js";import{_ as B}from"./usePaymentQuery-sZytECE4.js";import{_ as T}from"./s-locked-DxZOzOkT.js";import E from"./ModalBig-CK55-Dwo.js";import{d as L,p as z,q as C,L as D,M as H,o as i,l as c,w as f,g as n,n as _,f as d,i as m,Q as w,x as N,$ as q,_ as A}from"./entry-CNoLJUNe.js";import"./venueEvent-BQsTdcwq.js";import"./ProseA-BdhHqEOb.js";import"./InForm-B_p0phzZ.js";import"./useVenueGtm-1OgRwOHY.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="f34368ad-93ca-4971-b680-11faea62f1cf",s._sentryDebugIdIdentifier="sentry-dbid-f34368ad-93ca-4971-b680-11faea62f1cf")}catch{}})();const U=["innerHTML"],V=["innerHTML"],j=L({__name:"ModalFollowersExport",props:{name:{type:String,required:!0}},setup(s){const t=z().t,g=C(),{$api:y}=D(),v=w(!1),r=w({tiers:[],free_followers_count:0}),a=w(null),p=k(),$=N(()=>{const o=r.value.tiers.reduce((l,u)=>l+u.count,0),e=[{value:t("page.personal_followers.followers_export_modal.column_tier").toString(),label:t("page.personal_followers.followers_export_modal.column_count").toString()},...r.value.tiers.map(l=>({value:l.title,label:p.value.format(l.count)}))];return e.push({value:t("page.personal_followers.followers_export_modal.total_stat_label").toString(),label:p.value.format(o),variant:"highlight"}),r.value.free_followers_count>0&&e.push({value:t("page.personal_followers.followers_export_modal.free_followers_label").toString(),label:t("page.personal_followers.followers_export_modal.free_followers_stat",{count:p.value.format(r.value.free_followers_count)}).toString(),variant:"muted"}),e}),x=async o=>{if(a.value===null){a.value=o;try{const e=await y.User.Following.downloadSupporterExport(o);if(!e.success||!e.data){const l=e.status===429?"export_rate_limited":"export_error";g.setMessage(t(`page.personal_followers.followers_export_modal.${l}`).toString());return}q.downloadBlobToFile(e.data.blob,e.data.filename??`supporters.${o}`)}finally{a.value=null}}};return H(async()=>{const o=await y.User.Following.getSupporterExportSummary();o.success&&o.data&&(r.value=o.data),v.value=!0}),(o,e)=>{const l=F,u=I,h=B,b=T,S=E;return i(),c(S,{name:s.name,header:"page.personal_followers.followers_export",size:520,"fill-height":""},{footer:f(()=>[m("div",{class:_(o.$style.actions)},[d(b,{type:"button",block:"",text:"page.personal_followers.followers_export_modal.download_excel",loading:n(a)==="xlsx",inactive:n(a)!==null,onClick:e[0]||(e[0]=M=>x("xlsx"))},null,8,["loading","inactive"]),d(b,{type:"button",block:"",inverse:"",text:"page.personal_followers.followers_export_modal.download_csv",loading:n(a)==="csv",inactive:n(a)!==null,onClick:e[1]||(e[1]=M=>x("csv"))},null,8,["loading","inactive"]),m("small",{class:_(o.$style.state),innerHTML:o.$t("page.personal_followers.followers_export_modal.export_state")},null,10,V)],2)]),default:f(()=>[n(v)?(i(),c(u,{key:1,rows:n($),"value-as-label":"","align-label-right":"","heading-row":"",class:_(o.$style.summary)},null,8,["rows","class"])):(i(),c(l,{key:0,class:_(o.$style.summary)},null,8,["class"])),d(h,{type:"warning"},{default:f(()=>[m("span",{innerHTML:o.$t("page.personal_followers.followers_export_modal.gdpr_warning")},null,8,U)]),_:1})]),_:1},8,["name"])}}}),O="_summary_1sfsz_1",P="_actions_1sfsz_5",Q="_state_1sfsz_11",R={summary:O,actions:P,state:Q},G={$style:R},so=Object.assign(A(j,[["__cssModules",G]]),{__name:"ModalFollowersExport"});export{so as default};
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.