1import{bf as u,b3 as h}from"./_Rl_I6vL.js";function i(){const a=h(),s=u(),m=String(a.public.apiBase||"").replace(/\/?$/,"/"),o=()=>s.value?{Authorization:s.value}:{};async function t(e,r={}){try{return await $fetch(m+e,r)}catch(n){const d=n?.data;return d&&typeof d=="object"&&"success"in d?d:{success:!1,message:n?.message||"Unable to reach the server. Please try again.",data:{}}}}return{fetchCommunities(e={}){return t("communities",{method:"GET",query:e})},fetchCommunity(e){return t(`community/${encodeURIComponent(e)}`,{method:"GET",headers:o()})},fetchCreatorStatus(){return t("creator/my-status",{method:"GET",headers:o()})},fetchLinkedWallet(){return t("account/wallet",{method:"GET",headers:o()})},fetchWalletLinkMessage(e){return t("account/wallet/message",{method:"GET",query:{wallet_address:e},headers:o()})},linkWallet(e){return t("account/wallet/link",{method:"POST",headers:o(),body:e})},checkCommunityKey(e){return t("community/check-key",{method:"GET",query:{key:e},headers:o()})},createCommunity(e){return t("community",{method:"POST",headers:o(),body:e})},fetchMyCommunities(){return t("my/communities",{method:"GET",headers:o()})},updateCommunity(e,r){return t(`community/${encodeURIComponent(e)}/update`,{method:"POST",headers:o(),body:r})},fetchWallet(){return t("wallet",{method:"GET",headers:o()})},generateDepositAddress(){return t("wallet/deposit-address",{method:"POST",headers:o()})},fetchWalletTransactions(e=null,r=20){return t("wallet/transactions",{method:"GET",query:{limit:r,...e?{cursor:e}:{}},headers:o()})},fetchWithdrawalAddresses(){return t("wallet/withdrawal-addresses",{method:"GET",headers:o()})},addWithdrawalAddress(e,r=""){return t("wallet/withdrawal-addresses",{method:"POST",headers:o(),body:{address:e,label:r}})},deleteWithdrawalAddress(e){return t(`wallet/withdrawal-addresses/${e}`,{method:"DELETE",headers:o()})},fetchWithdrawals(){return t("wallet/withdrawals",{method:"GET",headers:o()})},createWithdrawal(e,r){return t("wallet/withdrawals",{method:"POST",headers:o(),body:{amount:e,address_id:r}})},joinCommunity(e,r=""){return t(`community/${encodeURIComponent(e)}/join`,{method:"POST",headers:o(),body:{request_message:r}})},payAndJoin(e){return t(`community/${encodeURIComponent(e)}/pay-join`,{method:"POST",headers:o()})},fetchSubscription(e){return t(`community/${encodeURIComponent(e)}/subscription`,{method:"GET",headers:o()})},leaveCommunity(e){return t(`community/${encodeURIComponent(e)}/leave`,{method:"POST",headers:o()})},fetchMembers(e,r={}){return t(`community/${encodeURIComponent(e)}/members`,{method:"GET",query:r,headers:o()})},fetchJoinRequests(e){return t(`community/${encodeURIComponent(e)}/requests`,{method:"GET",headers:o()})},decideJoinRequest(e,r,n){return t(`community/${encodeURIComponent(e)}/requests/${r}`,{method:"POST",headers:o(),body:{approve:n}})},fetchPosts(e,r=null,n=10){return t(`community/${encodeURIComponent(e)}/posts`,{method:"GET",query:{limit:n,...r||{}},headers:o()})},createPost(e,r){return t(`community/${encodeURIComponent(e)}/posts`,{method:"POST",headers:o(),body:r})},deletePost(e,r){return t(`community/${encodeURIComponent(e)}/posts/${r}`,{method:"DELETE",headers:o()})},fetchComments(e,r,n=1,d=10){return t(`community/${encodeURIComponent(e)}/posts/${r}/comments`,{method:"GET",query:{page:n,limit:d},headers:o()})},createComment(e,r,n,d=null){return t(`community/${encodeURIComponent(e)}/posts/${r}/comments`,{method:"POST",headers:o(),body:{content:n,parent_id:d}})},deleteComment(e,r){return t(`community/${encodeURIComponent(e)}/comments/${r}`,{method:"DELETE",headers:o()})},toggleReaction(e,r,n){return t(`community/${encodeURIComponent(e)}/reactions`,{method:"POST",headers:o(),body:{target_type:r,target_id:n}})}}}export{i as u};
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.