PageSourceSearch

https://starvell.com/_next/static/chunks/pages/newadmin/referral-profit-stats-87f8865dbb29c7b1.js

js starvell.com collected 2026-10-04 04:11:08 UTC 15,761 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4330],{1339:e=>{e.exports={tabs:"tabs_tabs__MYUwR",tab:"tabs_tab__e65v2",active:"tabs_active__jP5xY",tab_content:"tabs_tab_content__G54ca",tab_content_with_oauth:"tabs_tab_content_with_oauth__iPPZE"}},31796:(e,l,a)=>{"use strict";a.d(l,{t:()=>o});var s=a(37876),t=a(69241),r=a(1339),d=a.n(r),i=a(14232),c=a(3413),n=a(8932);function o(e){var l;let{tabs:a,activeTab:r,onChange:o,disabled:m}=e,[v,h]=(0,i.useState)(null!=r?r:null==(l=a[0])?void 0:l.id);return(0,c.H)(()=>{r&&h(r)},[r]),(0,s.jsx)("div",{className:d().tabs,children:a.map(e=>{let l=v===e.id,a=(0,t.A)(d().tab,{[d().active]:l}),r={color:l?e.activeColor:void 0};return e.href?(0,s.jsx)(n.A,{href:e.href,className:a,style:r,onClick:()=>{if(e.disabled||m)return!1},children:e.text},e.id):(0,s.jsx)("div",{className:a,onClick:()=>{e.disabled||m||(h(e.id),null==o||o(e.id))},style:r,children:e.text},e.id)})})}},55365:(e,l,a)=>{"use strict";a.r(l),a.d(l,{__N_SSP:()=>B,default:()=>G});var s=a(37876),t=a(70497),r=a(28531),d=a.n(r),i=a(26777),c=a.n(i),n=a(31796),o=a(14232),m=a(50657),v=a.n(m),h=a(51496),u=a(35407),x=a.n(u),j=a(69241),_=a(58718),N=a(40637),b=a(38219),f=a(7508),p=a(50397),A=a(40090),g=a(85812),C=a(73732),O=a(62808),P=a(22390),w=a(8932),S=a(79615),L=a(89163),F=a(13977),y=a.n(F),T=a(92048),U=a(54587),R=a.n(U);let k="Прибыль с одного платящего пользователя, которого привёл партнёр",V="Средняя прибыль с одного завершённого заказа",M="Количество завершённых заказов на одного платящего пользователя";function D(e){let{id:l,text:a}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(R(),{alt:"",src:L.A,width:12,height:12,className:y().label__help,"data-tooltip-id":l,draggable:!1,onClick:e=>e.stopPropagation()}),(0,s.jsx)(T.A,{id:l,delayShow:250,className:v().ltv_hint_tooltip,children:a})]})}function W(){let[e,l]=(0,o.useState)(null),a=(0,o.useCallback)(e=>({items:e.items,totalCount:Number(e.totalCount)}),[]),{loading:t,items:r,totalItemsCount:d,field:i,model:c,refresh:n}=(0,A.S)({request:async e=>{let a=await p.b.getPartnerLtvStatsList(e);return l(a.totals),a},initParams:{filter:{dateFrom:null,dateTo:null},pagination:{limit:g.$.perPage.referralLinks,offset:0},sort:{dir:"DESC",by:"completedOrdersCount"}},isNestedPagination:!0,transformResponse:a}),{dateFrom:m,dateTo:h}=c.formData.filter;function u(e,l){return(0,s.jsx)(O.bl,{fieldName:e,model:i("sort"),dirFieldName:"dir",byFieldName:"by",sortOrdersWithReset:!1,reverseSortOrder:!0,children:l})}return(0,s.jsxs)(_.Z,{title:" ",header:(0,s.jsx)(S.A,{value:[m?new Date(m):void 0,h?new Date(h):void 0],onChange:(e,l)=>{(0,P.HW)(c,"filter",{dateFrom:null==e?void 0:e.toISOString(),dateTo:null==l?void 0:l.toISOString()})}}),children:[(0,s.jsx)("div",{className:(0,j.A)(x().table,v().referrals_table),children:(0,s.jsxs)("div",{className:(0,j.A)(x().grid_table,v().table,v().table_partner_ltv,{[x().loading]:t}),children:[(0,s.jsxs)("div",{className:x().grid_table__head,children:[(0,s.jsx)("span",{className:(0,j.A)(v().table_title,v().first_col_inset),children:"Партнёр"}),u("usersCount","Пользователи"),u("completedOrdersCount","Заказы"),u("refundsCount","Возвраты"),u("netProfitAmount","Прибыль"),u("rewardAmount","Выплатили партнёру"),u("netLtv",(0,s.jsxs)(s.Fragment,{children:["LTV",(0,s.jsx)(D,{id:"partner-ltv-hint",text:k})]})),u("netAov",(0,s.jsxs)(s.Fragment,{children:["AOV",(0,s.jsx)(D,{id:"partner-aov-hint",text:V})]})),u("opu",(0,s.jsxs)(s.Fragment,{children:["OPU",(0,s.jsx)(D,{id:"partner-opu-hint",text:M})]}))]}),(0,s.jsxs)("div",{className:x().grid_table__body,children:[e&&(0,s.jsxs)("div",{className:x().card_row,children:[(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell,v().totals_cell_first),children:(0,s.jsx)("div",{className:v().totals_label,children:"Итого"})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Пользователи",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,N.ej)(e.usersCount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Заказ
1ы",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,N.ej)(e.completedOrdersCount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Возвраты",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,N.ej)(e.refundsCount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Прибыль",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,f.up)(e.netProfitAmount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Выплатили партнёру",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,f.up)(e.rewardAmount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"LTV",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,f.up)(e.netLtv)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"AOV",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,f.up)(e.netAov)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell,v().totals_cell_last),"data-label":"OPU",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,N.ej)(e.opu)})})]}),null==r?void 0:r.map(e=>(0,s.jsxs)("div",{className:x().card_row,children:[(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().first_col_inset),"data-label":"Партнёр",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)(w.A,{href:(0,b.dE)({username:e.partnerUsername}),className:v().overflow_ellipsis,children:e.partnerUsername})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Пользователи",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,N.ej)(e.usersCount)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Заказы",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,N.ej)(e.completedOrdersCount)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Возвраты",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,N.ej)(e.refundsCount)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Прибыль",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,f.up)(e.netProfitAmount)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Выплатили партнёру",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,f.up)(e.rewardAmount)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"LTV",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,f.up)(e.netLtv)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"AOV",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,f.up)(e.netAov)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"OPU",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,N.ej)(e.opu)})})})]},e.partnerId))]})]})}),(0,s.jsx)(C.Y,{className:v().paginator,initPerPage:g.$.perPage.referralLinks,cookieName:"",count:d,model:c,showPerPage:!1,onPerPageChange:()=>{n()}})]})}var E=a(22083),I=a(55134),H=a(56750),Y=a(62096),q=a(58673);function z(e){var l;return{totalUsersCount:e.totalUsersCount,totalCompletedOrdersCount:e.totalCompletedOrdersCount,totalRefundsCount:null!=(l=e.totalRefundsCount)?l:"0",totalProfitAmount:e.totalProfitAmount,totalAov:e.totalAov,totalLtv:e.totalLtv,totalOpu:e.totalOpu}}function Z(e){return(0,N.ej)(e)}let $=e=>{var l,a;let{params:t,data:r}=e,[d,i]=(0,o.useState)(r?z(r):null),c=(0,o.useCallback)(e=>({items:e.items,totalCount:Number(e.totalCount)}),[]),{loading:n,items:m,totalItemsCount:h,field:u,model:N,refresh:b}=(0,A.S)({request:async e=>{let l=await p.b.getReferralProfitStatsList(e);return i(z(l)),l},initData:r,initParams:t,isNestedPagination:!0,transformResponse:c});return(0,s.jsxs)(_.Z,{title:" ",header:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Y.A,{width:250,title:"UTM Source",model:u("filter.utmSource"),size:"small",items:Object.values(I.i).map(e=>({index:e,title:e.toLocaleLowerCase()}))}),(0,s.jsx)(H.x,{placeholder:"Код",model:u("filter.code"),minLength:3,size:"filter"}),(0,s.jsx)(H.x,{placeholder:"UTM Medium",model:u("filter.utmMedium"),minLength:3,size:"filter"}),(0,s.jsx)(S.A,{value:[(null==(l=N.formData.filter)?void 0:l.dateFrom)?new Date(N.formData.filter.dateFrom):void 0,(null==(a=N.formData.filter)?void 0:a.dateTo)?new Date(N.formData.filter.dateTo):void 0],onChange:(e,l)=>{(0,P.HW)(N,"filter",{dateFrom:null==e?void 0:e.toISOString(),dateTo:null==l?void 0:l.toISOString()})}})]}),children:[(0,s.jsx)("div",{className:(0,j.A)(x().table,v().referrals_table),children:(0,s.jsxs)("div",{className:(0,j.A)(x().grid_table,v().table,v().table_ltv,{[x().loading]:n}),children:[(0,s.jsxs)("div",{className:x().grid_table__head,children:[(0,s.jsx)("span",{className:(0,j.A)(v().table_title,v().first_col_inset),children:"Short URL"}),(0,s.jsx)("span",{className:v().table_title,children:"UTM Source"}),(0,s.jsx)("span",{className:v().table_title,children:"UTM Medium"}),(0,s.jsx)(O.bl,{fieldName:"usersCount",model:u("sort"),dirFieldName:"dir",byFieldName:"by",sortOrdersWithReset:!1,reverseSortOrder:!0,children:"Пользователи"}
1),(0,s.jsx)(O.bl,{fieldName:"completedOrdersCount",model:u("sort"),dirFieldName:"dir",byFieldName:"by",sortOrdersWithReset:!1,reverseSortOrder:!0,children:"Заказы"}),(0,s.jsx)(O.bl,{fieldName:"refundsCount",model:u("sort"),dirFieldName:"dir",byFieldName:"by",sortOrdersWithReset:!1,reverseSortOrder:!0,children:"Возвраты"}),(0,s.jsx)(O.bl,{fieldName:"profitAmount",model:u("sort"),dirFieldName:"dir",byFieldName:"by",sortOrdersWithReset:!1,reverseSortOrder:!0,children:"Прибыль"}),(0,s.jsxs)(O.bl,{fieldName:"ltv",model:u("sort"),dirFieldName:"dir",byFieldName:"by",sortOrdersWithReset:!1,reverseSortOrder:!0,children:["LTV",(0,s.jsx)(D,{id:"referral-ltv-hint",text:k})]}),(0,s.jsxs)(O.bl,{fieldName:"aov",model:u("sort"),dirFieldName:"dir",byFieldName:"by",sortOrdersWithReset:!1,reverseSortOrder:!0,children:["AOV",(0,s.jsx)(D,{id:"referral-aov-hint",text:V})]}),(0,s.jsxs)(O.bl,{fieldName:"opu",model:u("sort"),dirFieldName:"dir",byFieldName:"by",sortOrdersWithReset:!1,reverseSortOrder:!0,children:["OPU",(0,s.jsx)(D,{id:"referral-opu-hint",text:M})]})]}),(0,s.jsxs)("div",{className:x().grid_table__body,children:[d&&(0,s.jsxs)("div",{className:x().card_row,children:[(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell,v().totals_cell_first),children:(0,s.jsx)("div",{className:v().totals_label,children:"Итого"})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell)}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell)}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Пользователи",children:(0,s.jsx)("div",{className:v().totals_value,children:Z(d.totalUsersCount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Заказы",children:(0,s.jsx)("div",{className:v().totals_value,children:Z(d.totalCompletedOrdersCount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Возвраты",children:(0,s.jsx)("div",{className:v().totals_value,children:Z(d.totalRefundsCount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"Прибыль",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,f.up)(d.totalProfitAmount)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"LTV",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,f.up)(d.totalLtv)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell),"data-label":"AOV",children:(0,s.jsx)("div",{className:v().totals_value,children:(0,f.up)(d.totalAov)})}),(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().totals_cell,v().totals_cell_last),"data-label":"OPU",children:(0,s.jsx)("div",{className:v().totals_value,children:Z(d.totalOpu)})})]}),m&&m.length>0&&m.map(e=>{var l,a,t,r;return(0,s.jsxs)("div",{className:x().card_row,children:[(0,s.jsx)("div",{className:(0,j.A)(v().cell,v().first_col_inset),"data-label":"Short URL",children:(0,s.jsxs)("div",{className:x().name_card,children:[(0,s.jsx)(q.A,{text:(0,E.f9)(e.code)}),(0,s.jsx)("div",{className:v().overflow_ellipsis,children:(0,E.f9)(e.code)})]})}),(0,s.jsx)("div",{className:v().cell,"data-label":"UTM Source",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{className:v().overflow_ellipsis,children:null!=(a=null==(l=e.utmSource)?void 0:l.toLocaleLowerCase())?a:"-"})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"UTM Medium",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{className:v().overflow_ellipsis,children:null!=(t=e.utmMedium)?t:"-"})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Пользователи",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:Z(e.usersCount)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Заказы",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:Z(e.completedOrdersCount)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Возвраты",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:Z(null!=(r=e.refundsCount)?r:"0")})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"Прибыль",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,f.up)(e.profitAmount)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"LTV",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,f.up)(e.ltv)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"AOV",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:(0,f.up)(e.aov)})})}),(0,s.jsx)("div",{className:v().cell,"data-label":"OPU",children:(0,s.jsx)("div",{className:x().name_card,children:(0,s.jsx)("div",{children:Z(e.opu)})})})]},e.id)})]})]})}),(0,s.jsx)(C.Y,{className:v().paginator,initPerPage:g.$.perPage.referralLinks,cookieName:"",count:h,model:N,showPerPage:!1,onPerPageChange:()=>{b()}})]})};function X(e){let{data:l,params:a}=e,[t,r]=(0,o.useState)("referrals"),[i,m]=(0,o.useState)(!1);return(0,s.jsxs)("div",{className:d().content_wrapper,children:[(0,s.jsxs)("div",{className:c().admin_header,children:[(0,s.jsx)(h.B,{className:c().breadcrumbs,items:[{id:"referral-profit-stats",title:"LTV",url:"/referral-profit-stats"}]}),(0,s.jsx)("div",{className:v().ltv_tabs,children:(0,s.jsx)(n.t,{activeTab:t,onChange:function(e){r(e),"partners"===e&&m(!0)},tabs:[{id:"referrals",text:"Рефералы"},{id:"partners",text:"Партнёрская программа"}]})})]}),(0,s.jsx)("div",{hidden:"referrals"!==t,children:(0,s.jsx)($,{data:l,params:a})}),i&&(0,s.jsx)("div",{hidden:"partners"!==t,children:(0,s.jsx)(W,{})})]})}var B=!0;function G(e){let{data:l,params:a}=e;return(0,s.jsx)(X,{data:l,params:a})}G.getLayout=(e,l)=>(0,s.jsx)(t.A,{pageProps:e,children:l})},87779:(e,l,a)=>
1{(window.__NEXT_P=window.__NEXT_P||[]).push(["/newadmin/referral-profit-stats",function(){return a(55365)}])},89163:(e,l,a)=>{"use strict";a.d(l,{A:()=>s});let s={src:"/_next/static/media/question.0cd13cbc.svg",height:16,width:16,blurWidth:0,blurHeight:0}}},e=>{e.O(0,[448,6295,8288,7798,636,6593,8792],()=>e(e.s=87779)),_N_E=e.O()}]);

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.