1import nt from"./BDc5z4ST.js";import{_ as ot}from"./BFUvBxMO.js";import{_ as ct}from"./E6UmVeRS.js";import{_ as A}from"./DH33LfDt.js";import{g as o,h as r,j as it,p as j,Q as M,r as v,a as O,f as V,k as n,af as Y,i as a,as as C,at as L,W as D,b as W,c as z,e as q,V as l,am as lt,au as rt,aj as _t,a3 as F,U as dt,o as ut,ao as pt,X as K,E as gt,Y as Q,a5 as ht}from"./0XwV3hpy.js";import{_ as Z,a as tt}from"./DF8wB0_E.js";import{a as mt}from"./Jy1kau-6.js";import{D as H}from"./aOs1p_HP.js";import{t as vt,d as X}from"./BLF037Qp.js";import"./DMBXOVku.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};f.SENTRY_RELEASE={id:"ecos-frontend-cp@32b46d188678f896e839c69d78ed855453967266"};var t=new f.Error().stack;t&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[t]="4dc43a00-8452-4f9d-9540-3bf5b746ac18",f._sentryDebugIdIdentifier="sentry-dbid-4dc43a00-8452-4f9d-9540-3bf5b746ac18")}catch{}})();const ft={},bt={class:"table-container"};function yt(f,t){return o(),r("div",bt,[...t[0]||(t[0]=[it('<div class="table-header" data-v-31b0cc5f><div class="header-cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div><div class="header-cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div><div class="header-cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div><div class="header-cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div><div class="header-cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div></div><div class="table-body" data-v-31b0cc5f><div class="table-row" data-v-31b0cc5f><div class="cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div><div class="cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div><div class="cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div><div class="cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div><div class="cell skeleton" style="width:20%;height:34px;" data-v-31b0cc5f></div></div></div><div class="pagination" data-v-31b0cc5f><div class="pagination-button skeleton" style="width:34px;height:32px;" data-v-31b0cc5f></div><div class="pagination-info skeleton" style="width:60px;height:32px;margin:0 8px;" data-v-31b0cc5f></div><div class="pagination-button skeleton" style="width:34px;height:32px;" data-v-31b0cc5f></div></div>',3)])])}const J=Object.assign(A(ft,[["render",yt],["__scopeId","data-v-31b0cc5f"]]),{__name:"SkeletonTransactions"}),wt={key:1,class:"total-sum-container"},kt={class:"total-sum-history"},xt={class:"total-sum_tab"},Pt={class:"total-sum__header"},Tt={class:"total-sum__header-title-block"},$t={class:"total-sum__item"},It={class:"total-sum__history__pagination"},B=10,St=j({__name:"TotalSumTransactionsPage",setup(f){const{t,locale:P}=M(),w=v(!0),b=W().public.API_V2_URL,p=v([t("pages.transactions.total_sum.table.title_1"),t("pages.transactions.total_sum.table.title_2"),t("pages.transactions.total_sum.table.title_3")]);O(()=>P.value,()=>{p.value=[t("pages.transactions.total_sum.table.title_1"),t("pages.transactions.total_sum.table.title_2"),t("pages.transactions.total_sum.table.title_3")]},{immediate:!0});const u=z([]),_=v(1),e=q(()=>{const g=(_.value-1)*B,S=g+B;return u.slice(g,S)}),T=q(()=>_.value===1),d=q(()=>_.value>=Math.ceil(u.length/B)),$=()=>{_.value>1&&(_.value-=1)},m=()=>{_.value<Math.ceil(u.length/B)&&(_.value+=1)};return w.value=!0,V(`${b}/transaction/get-total-sum-transactions`).then(g=>{g.ok&&u.push(...g.data)}).finally(()=>{w.value=!1}),(g,S)=>{const U=J,R=Z,y=tt;return n(w)?(o(),Y(U,{key:0})):(o(),r("div",wt,[a("div",kt,[a("table",xt,[a("thead",Pt,[a("tr",Tt,[(o(!0),r(C,null,L(n(p),k=>(o(),r("th",{key:k,class:"total-sum__header-title"},l(k),1))),128))])]),a("tbody",$t,[(o(!0),r(C,null,L(n(e),(k,E)=>(o(),r("tr",{key:E},[a("td",null,l(k.currency),1),a("td",null,l(k.resource),1),a("td",null,l(k.sum),1)]))),128))])])]),a("div",It,[D(R,{class:"total-sum__history__previous",disabled:n(T),onClick:$},null,8,["disabled"]),D(y,{class:"total-sum__history__next",disabled:n(d),onClick:m},null,8,["disabled"])])]))}}}),Dt=Object.assign(A(St,[["__scopeId","data-v-3f48119d"]]),{__name:"TransactionPageTotalSumTransactionsPage"}),Ct={key:1,class:"transaction-page-container"},Lt={class:"transaction-page-history"},Ut={class:"transaction-page__filters"},Rt=["placeholder"],Vt={class:"transaction-page_tab"},At={class:"transaction-page__header"},Et={class:"transaction-page__header-title-block"},Nt={key:0,class:"transaction-page__item"},Bt={class:"transaction-page__header-title"},qt={class:"transaction-page__header-title"},jt={class:"transaction-page__header-title"},Mt={class:"transaction-page__header-title"},Ot={key:0,class:"transaction-page__history__pagination"},Yt={class:"transaction-page__history__current-total"},Wt=j({__name:"TransactionPage",setup(f){const{t,locale:P}=M(),w=W(),I=String(w.public.API_V2_URL),b=v(!0),p=v(""),u=v([]),_=new Set,e=z({current_page:0,data:[],last_page:0,from:0,to:0,total:0,per_page:0,next_page_url:null,first_page_url:"",last_page_url:"",links:[],path:"",prev_page_url:null}),T={},d=c=>T[c]||null,$=(c,i)=>T[c]=i,m=c=>Number(new URL(c,I).searchParams.get("page")||1),g=c=>{const i=new URL(I).origin;return I+c.replace(i,"")},S=(c,i)=>{_.has(i)||(u.value=[...u.value,...c],_.add(i))},U=q(()=>{const c=p.value.trim();return c?u.value.filter(i=>String(i.external_key_id).includes(c)||String(i.contract_id).includes(c)):e.data}),R=c=>{try{return JSON.parse(c).en||c}catch{return c}},y=async c=>{try{const i=m(c),x=g(c);e.data=[],b.value=!0,H(x);const h=d(i);if(h){e.data=h.data,e.next_page_url=h.next_page_url,e.prev_page_url=h.prev_page_url,e.current_page=h.current_page,e.total=h.total,b.value=!1;return}const N=await V(x);if(b.value=!1,!N.ok)return;const s=N.data.response;e.data=s.data,e.current_page=s.current_page,e.last_page=s.last_page,e.from=s.from,e.to=s.to,e.total=s.total,e.per_page=s.per_page,e.next_page_url=s.next_page_url,e.prev_page_url=s.prev_page_url,S(s.data,s.current_page),$(e.current_page,s),s.current_page===1&&k(s.last_page)}catch(i){H("error",i)}},k=async c=>{for(let i=2;i<=c;
1i++)if(!d(i))try{const x=await V(g(`/contract/my-transactions?page=${i}`));if(!x.ok)continue;const h=x.data.response;S(h.data,h.current_page),$(h.current_page,h)}catch(x){H("error",x)}};y("/contract/my-transactions?page=1");const E=v([t("pages.transactions.table.title_1"),t("pages.transactions.table.title_2"),t("pages.transactions.table.title_3"),t("pages.transactions.table.title_4")]);O(()=>P.value,()=>{E.value=[t("pages.transactions.table.title_1"),t("pages.transactions.table.title_2"),t("pages.transactions.table.title_3"),t("pages.transactions.table.title_4")]},{immediate:!0});const at=()=>{e.prev_page_url&&y(e.prev_page_url)},et=()=>{e.next_page_url&&y(e.next_page_url)};return(c,i)=>{const x=J,h=Z,N=tt;return n(b)?(o(),Y(x,{key:0})):(o(),r("div",Ct,[a("div",Lt,[a("div",Ut,[lt(a("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>_t(p)?p.value=s:null),class:"transaction-page__filter-input",type:"search",inputmode:"numeric",placeholder:n(t)("pages.transactions.search_external_key")},null,8,Rt),[[rt,n(p)]])]),a("table",Vt,[a("thead",At,[a("tr",Et,[(o(!0),r(C,null,L(n(E),s=>(o(),r("th",{key:s,class:"transaction-page__header-title"},l(s),1))),128))])]),n(U).length>0?(o(),r("tbody",Nt,[(o(!0),r(C,null,L(n(U),(s,st)=>(o(),r("tr",{key:`${s.external_key_id}-${s.transaction_created_at}-${st}`},[a("td",Bt,l(s.external_key_id),1),a("td",qt,l(R(s.resource_name)),1),a("td",jt,l(s.type===1?"+":"-")+" "+l(s.round_sum),1),a("td",Mt,l(n(mt)(+s.transaction_created_at,"DD.MM.YYYY / HH:mm")),1)]))),128))])):F("",!0)])]),n(p)?F("",!0):(o(),r("div",Ot,[D(h,{class:"transaction-page__history__previous",disabled:!n(e).prev_page_url,onClick:at},null,8,["disabled"]),a("p",Yt,l(n(e).current_page)+" / "+l(n(e).last_page),1),D(N,{class:"transaction-page__history__next",disabled:!n(e).next_page_url,onClick:et},null,8,["disabled"])]))]))}}}),G=Object.assign(A(Wt,[["__scopeId","data-v-b95fcd01"]]),{__name:"TransactionPage"}),Ht={key:1,class:"withdrawal-container"},Ft={class:"withdrawal-history"},zt={class:"withdrawal_tab"},Jt={class:"withdrawal__header"},Kt={class:"withdrawal__header-title-block"},Qt=j({__name:"WithdrawalPage",setup(f){const{t,locale:P}=M(),w=v(!0),b=W().public.API_V2_URL,p=v([t("pages.withdrawal.table.id"),t("pages.withdrawal.table.description"),t("pages.withdrawal.table.data"),t("pages.withdrawal.table.amount"),t("pages.withdrawal.table.address")]);O(()=>P.value,()=>{p.value=[t("pages.withdrawal.table.id"),t("pages.withdrawal.table.description"),t("pages.withdrawal.table.data"),t("pages.withdrawal.table.amount"),t("pages.withdrawal.table.address")]},{immediate:!0});const u=z([]);return w.value=!0,V(`${b}/output-request/output-list`).then(_=>{_.ok&&u.push(..._.data)}).finally(()=>{w.value=!1}),(_,e)=>{const T=J;return n(w)?(o(),Y(T,{key:0})):(o(),r("div",Ht,[a("div",Ft,[a("table",zt,[a("thead",Jt,[a("tr",Kt,[(o(!0),r(C,null,L(n(p),d=>(o(),r("th",{key:d,class:"withdrawal__header-title"},l(d),1))),128))])]),a("tbody",null,[(o(!0),r(C,null,L(n(u),(d,$)=>(o(),r("tr",{key:$},[a("td",null,l(d.id),1),a("td",null,l(d.comment),1),a("td",null,l(new Date(d.created_at*1e3).toLocaleString()),1),a("td",null,l(d.sum),1),a("td",null,l(d.address),1)]))),128))])])])]))}}}),Xt=Object.assign(A(Qt,[["__scopeId","data-v-f39040e8"]]),{__name:"TransactionPageWithdrawalPage"}),Gt={class:"transaction-container holder"},Zt={class:"transaction-title-block"},ta={class:"transaction-title"},aa={class:"transaction-cont"},ea={class:"transaction"},sa={class:"transaction__block"},na={class:"transaction-block__ui"},oa={class:"button"},ca={key:0,class:"transaction-block__message"},ia=j({__name:"transactions",setup(f){dt({title:"Transactions",meta:[{name:"description",content:"transactions page"}]});const{t,locale:P}=M(),I=W().public.API_V2_URL,b=gt(G),p=v(1),u=v(null),_=m=>({productKey:"wallet_payments",itemId:"wallet_transactions",itemName:"Wallet Transactions",itemParams:{flow_step:m,payment_rail:"transactions_report"}}),e=[{id:1,title:t("pages.transactions.title"),component:G},{id:2,title:t("pages.withdrawal.withdrawal_text"),component:Xt},{id:3,title:t("pages.transactions.total_sum.title"),component:Dt}];O(()=>P.value,()=>{e[0].title=t("pages.transactions.title"),e[1].title=t("pages.withdrawal.withdrawal_text"),e[2].title=t("pages.transactions.total_sum.title")},{immediate:!0});const T=m=>{p.value=m.id,b.value=m.component},d=v(!1),$=()=>{d.value||(d.value=!0,setTimeout(()=>{d.value=!1},5e3),X("wallet_transactions_email_request",_("email_request")),V(`${I}/transaction/request-send-transactions`).then(m=>{const g=m.ok&&m.data;u.value=g?"Email request sent successfully":"Failed to send email request",X(g?"wallet_transactions_email_success":"wallet_transactions_email_failed",_(g?"email_success":"email_failed"))}).finally(()=>{setTimeout(()=>{u.value=null},3e3)}))};return ut(()=>{vt(_("transactions_page_view"))}),(m,g)=>{const S=nt,U=ot,R=ct;return o(),r("div",Gt,[a("div",Zt,[D(S),a("h2",ta,l(n(t)("pages.transactions.title")),1)]),a("div",aa,[a("div",ea,[a("div",sa,[(o(),Y(pt(n(b))))]),a("div",na,[(o(),r(C,null,L(e,y=>D(U,{key:y.id,class:ht(["transaction-block__ui-set",{"active-setting":n(p)===y.id}]),setting:y,onClick:k=>T(y)},{default:K(()=>[Q(l(y.title),1)]),_:2},1032,["class","setting","onClick"])),64))])])]),a("div",oa,[D(R,{"disable-after-click":!0,variant:"primary",class:"transaction__btn",onClick:$},{default:K(()=>
1[Q(l(n(t)("pages.transactions.button")),1)]),_:1}),n(u)?(o(),r("p",ca,l(n(u)),1)):F("",!0)])])}}}),fa=A(ia,[["__scopeId","data-v-5f9c17a0"]]);export{fa 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.