PageSourceSearch

https://shuru.co.in/_next/static/chunks/pages/app/profile/top-earners-b91043dfcb09823f.js

js shuru.co.in collected 2026-09-24 11:56:56 UTC 13,419 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3847],{82929:function(e,t,n){"use strict";n.d(t,{$:function(){return p}});var r=n(17674),a=n(50029),i=n(87794),l=n.n(i),s=n(86010),o=n(81998),c=n(67294),u=n(37094),d=n(30080),m=n(68952),f=n(37797),x=n(85893),p=function(e){var t=e.className,n=e.list,i=e.hasNextPage,f=e.onLoadMore,p=e.renderItem,b=e.listEndComponent,g=e.spinnerComponent,v=e.t,j=e.loading,N=e.setLoading,w=(0,c.useState)(!1),k=w[0],y=w[1],_=(0,c.useState)(""),E=_[0],I=_[1],C=function(e){N?N(e):y(e)},O=function(){var e=(0,a.Z)(l().mark((function e(){var t,n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=function(){I(""),C(!1)},n=function(e){I(e),C(!1)},C(!0),f(t,n);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=(0,m.Z)({loading:k,hasNextPage:i,onLoadMore:O,disabled:!!E,rootMargin:"0px 0px 0px 0px"}),F=(0,r.Z)(P,1)[0],D=void 0!==j?j:k;return(0,x.jsxs)(h,{className:(0,s.Z)(t),children:[n.map((function(e,t){return p(e,t)})),(D||i)&&(0,x.jsx)("div",{ref:F,children:E.isNotEmpty()&&!D?(0,x.jsxs)("div",{onClick:function(e){e.preventDefault(),O()},className:"text-center text-xs flex flex-col items-center justify-center text-red-400 my-4",children:[(0,x.jsx)(u.Fer,{className:"text-xl"}),E]}):g||(0,x.jsx)(o.$j,{})}),!D&&!i&&(b||(0,x.jsxs)("div",{className:"text-center text-xs flex flex-col items-center justify-center text-gray-400 my-4",children:[(0,x.jsx)(d.jsv,{className:"text-xl"}),v?v("list_end_reached"):"You have reached the end of the list."]}))]})},h=f.ZP.div.withConfig({displayName:"InfiniteList__Container",componentId:"sc-zwbpw9-0"})([""])},64960:function(e,t,n){"use strict";var r,a;n.d(t,{R:function(){return r},t:function(){return a}}),function(e){e.PageVisited="page_visited",e.OptionSelected="option_selected",e.ButtonClicked="button_clicked",e.FileSelected="file_selected",e.UploadStarted="upload_started",e.UploadCompleted="upload_completed",e.ErrorOccurred="error_occurred",e.CardClicked="card_clicked",e.APISuccess="api_success",e.APIError="api_error",e.Redirected="redirected",e.Initiated="initiated"}(r||(r={})),function(e){e.HeadersHeightUpdated="header_height_updated"}(a||(a={}))},31494:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return L},default:function(){return U}});var r=n(59499),a=n(50029),i=n(87794),l=n.n(i),s=n(86010),o=n(82929),c=n(81998),u=n(16033),d=n(25675),m=n(11163),f=n(67294),x=n(2777),p=n(37094),h=n(41171),b=n(43488),g=n(65241),v=n(1979),j=n(76395),N=n(56550),w=n(64960),k=n(80138),y="app_profile_top_earners",_="https://media.shuru.co.in/input/1697436824708.webp",E=n(85893),I=n(34155);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){var t=Number(e);return Number.isFinite(t)?Math.floor(t):0}function F(){return(F=(0,a.Z)(l().mark((function e(t){var n,r,a,i,s,o,c,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=I.env.API_BASE_URL,s=b.qf.TOP_EARNERS(i,"all=true"),e.next=4,h.S.requestV2({url:s,method:"get",headers:{uid:t.uid,token:null!==(n=t.token)&&void 0!==n?n:"",lang:t.langCode,platform:"ANDROID",device:"APP","app-ver":"402"}},!1);case 4:if(200===(null===(o=e.sent)||void 0===o?void 0:o.status)&&null!==o&&void 0!==o&&null!==(r=o.data)&&void 0!==r&&null!==(a=r.data)&&void 0!==a&&a.content_list){e.next=7;break}return e.abrupt("return",{ok:!1});case 7:return c=o.data.data.content_list,u=c.filter((function(e){var t;return null===(t=e.assignedLabels)||void 0===t?void 0:t.some((function(e){return"reporter"===e.id&&e.show}))})).map((function(e){var t,n,r,a=null===(t=e.assignedLabels)||void 0===t?void 0:t.find((function(e){return"reporter"===e.id&&e.show}));return{userId:e.userId,name:e.name,amount:e.earnedAmount,profileUrl:null!==(n=e.profileUrl)&&void 0!==n&&n.trim()?e.profileUrl:void 0,reporterLabel:a?{labelName:a.labelName,badgeIcon:null!==(r=a.badgeIcon)&&void 0!==r&&r.trim()?a.badgeIcon:_}:void 0}})).sort((function(e,t){return t.amount-e.amount})),e.abrupt("return",{ok:!0,rows:u});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e){var t=e.labelName,n=e.badgeIcon,r=e.compact,a=e.className,i=(0,j.$G)("app/TopEarners").t,l=(null===t||void 0===t?void 0:t.trim())||i("reporterRole");null!==n&&void 0!==n&&n.trim();return(0,E.jsx)("div",{className:(0,s.Z)("inline-flex max-w-full items-center gap-0.5 bg-[#ef423f] py-1 px-1.5 rounded-sm font-medium text-[.5rem]",r&&"leading-tight",a),children:(0,E.jsx)("span",{className:"min-w-0 truncate text-white",children:l})})}function S(e){var t,n,r,a=e.item,i=e.rank,l=e.emphasis,o=e.onNavigate,c=null!==(t=a.profileUrl)&&void 0!==t&&t.trim()?a.profileUrl:u.aU,m=1===i?"bg-gradient-to-br from-amber-400 to-amber-600 text-white ring-2 ring-amber-200/80":2===i?"bg-gradient-to-br from-slate-300 to-slate-500 text-white ring-2 ring-slate-200/80":"bg-gradient-to-br from-amber-700 to-amber-900 text-amber-100 ring-2 ring-amber-900/30",f="large"===l,x="small"===l&&2===i;return(0,E.jsxs)("button",{type:"button",onClick:o,className:(0,s.Z)("flex min-w-0 flex-1 flex-col items-center rounded-2xl px-3 pt-4 text-center shadow-lg transition active:scale-[0.98]","max-[319px]:flex-none max-[319px]:w-full",1===i&&"max-[319px]:order-1",2===i&&"max-[319px]:order-2",3===i&&"max-[319px]:order-3",f?"max-w-[9.5rem] scale-105 bg-gradient-to-b from-[#FFF8E7] to-[#FDE7B6] pb-5 ring-1 ring-[#FFD180]/80":x?"max-w-[8rem] scale-[1.02] bg-white/90 pb-6 ring-1 ring-black/[0.06]":"max-w-[7.5rem] bg-white/90 pb-3 ring-1 ring-black/[0.06]"),children:[(0,E.jsx)("span",{className:(0,s.Z)("mb-2 flex h-8 w-8 items-center justify-center rounded-full text-sm font-bold shadow-sm",m),children:i}),(0,E.jsx)("div",{className:(0,s.Z)("relative mb-2 overflow-hidden rounded-full bg-white ring-2 ring-white shadow-md",f?"h-16 w-16":x?"h-14 w-14":"h-12 w-12"),children:(0,E.jsx)(d.default,{src:c,alt:"",width:f?64:x?56:48,height:f?64:x?56:48,className:"h-full w-full object-cover"})}),(0,E.jsx)("p",{className:(0,s.Z)("mb-1 w-full break-words text-center font-semibold leading-snug text-[#7D4719]","line-clamp-2",f?"text-sm":"text-xs"),children:a.name}),(0,E.jsxs)("p",{className:(0,s.Z)("mb-1 font-bold tabular-nums text-[#FE6822]",f?"text-lg":"text-base"),children:["\u20b9",P(a.amount)]}),(0,E.jsx)(D,{compact:!0,className:"mx-auto",labelName:null===(n=a.reporterLabel)||void 0===n?void 0:n.labelName,badgeIcon:null===(r=a.reporterLabel)||void 0===r?void 0:r.badgeIcon})]})}function R(e){var t,n,r,a=e.item,i=e.rankOffset,l=e.onNavigate,s=null!==(t=a.profileUrl)&&void 0!==t&&t.trim()?a.profileUrl:u.aU;return(0,E.jsxs)("button",{type:"button",onClick:l,className:"flex w-full items-center gap-3 rounded-xl border border-black/[0.06] bg-white px-3 py-3 text-left shadow-sm transition active:bg-neutral-50",children:[(0,E.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[#F5F5F5] text-xs font-bold text-[#6E6E6E]",children:i}),(0,E.jsx)("div",{className:"relative h-11 w-11 shrink-0 overflow-hidden rounded-full bg-neutral-100 ring-1 ring-black/[0.06]",children:(0,E.jsx)(d.default,{src:s,alt:"",width:44,height:44,className:"h-full w-full object-cover"})}),(0,E.jsxs)("div",{className:"min-w-0 flex flex-1 flex-col gap-1",children:[(0,E.jsx)("p",{className:"truncate font-semibold text-neutral-900",children:a.name}),(0,E.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,E.jsxs)("p",{className:"shrink-0 truncate text-base font-bold tabular-nums text-[#FE6822]",children:["\u20b9",P(a.amount)]}),(0,E.jsx)("div",{className:"flex min-w-0 justify-end",children:(0,E.jsx)(D,{compact:!0,className:"max-w-full",labelName:null===(n=a.reporterLabel)||void 0===n?void 0:n.labelName,badgeIcon:null===(r=a.reporterLabel)||void 0===r?void 0:r.badgeIcon})})]})]}),(0,E.jsx)(x.Tfp,{className:"h-4 w-4 shrink-0 text-neutral-400","aria-hidden":!0})]})}function Z(e){var t,n,r=e.langCode,i=(0,m.useRouter)(),u=(0,j.$G)("app/TopEarners").i18n.getFixedT(r||"en","app/TopEarners"),d=null!==(t=i.query.uid)&&void 0!==t?t:"",x=null!==(n=i.query.token)&&void 0!==n?n:"",h=(0,f.useMemo)((function(){return i.isReady?O(O({},i.query),{},{page:y}):{page:y}}),[i]);
1(0,N.H)("".concat(y,"-").concat(w.R.PageVisited),h,i.isReady);var b=(0,f.useCallback)((function(e,t){k.e.logDirectV2(w.R.ButtonClicked,O({page:y,stringifiedParams:(0,v.IA)(i),action:e},t))}),[i]),_=(0,f.useState)(null),I=_[0],C=_[1],P=(0,f.useState)(!1),D=P[0],Z=P[1],L=(0,f.useState)(20),U=L[0],A=L[1],M=(0,f.useMemo)((function(){var e;return null!==(e=null===I||void 0===I?void 0:I.slice(0,3))&&void 0!==e?e:[]}),[I]),T=(0,f.useMemo)((function(){var e;return null!==(e=null===I||void 0===I?void 0:I.slice(3))&&void 0!==e?e:[]}),[I]);(0,f.useEffect)((function(){A(20)}),[I]),(0,f.useEffect)((function(){if(d){var e=!1;return C(null),Z(!1),function(e){return F.apply(this,arguments)}({uid:d,token:x,langCode:r||"en"}).then((function(t){e||(t.ok?C(t.rows):(C([]),Z(!0)))})).catch((function(){e||(C([]),Z(!0))})),function(){e=!0}}C([])}),[d,x,r]);var B=(0,f.useCallback)((function(e){var t=(0,v.IA)(i,{"web-2-app":!0});(0,v.pk)("".concat(g.YC.PROFILE,"/").concat(e),t)}),[i]),$=(0,f.useCallback)((function(){b("back"),(0,v.pk)(g.yy.APP_HOME)}),[b]),q=(0,f.useCallback)((function(e,t){b(e,{targetUserId:t}),B(t)}),[B,b]),V=(0,f.useCallback)((function(e,t){k.e.logDirectV2(w.R.ButtonClicked,{page:"".concat(y,"-list-item"),idx:e}),B(t)}),[B]),H=(0,f.useMemo)((function(){return T.slice(0,U)}),[T,U]),z=U<T.length,G=(0,f.useCallback)(function(){var e=(0,a.Z)(l().mark((function e(t,n){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{A((function(e){return Math.min(e+20,T.length)})),t()}catch(r){n("load_more_failed")}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[T.length]),X=null===I,Y=null!==I&&0===I.length;return(0,E.jsxs)("div",{className:(0,s.Z)("min-h-screen bg-gradient-to-b from-[#FFF8E7] via-white to-neutral-50","font-['Noto_Sans','Noto_Sans_Devanagari',sans-serif]"),children:[(0,E.jsx)("header",{className:"sticky top-0 z-20 border-b border-[#FFD180]/40 bg-[#FDE7B6]/95 backdrop-blur-md",children:(0,E.jsxs)("div",{className:"mx-auto flex max-w-lg items-center gap-2 px-3 py-3",children:[(0,E.jsx)("button",{type:"button",onClick:$,className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-[#7D4719] transition active:bg-black/5","aria-label":u("backAria"),children:(0,E.jsx)(p.u1R,{className:"text-xl"})}),(0,E.jsx)("h1",{className:"min-w-0 flex-1 text-center text-base font-bold text-[#7D4719]",children:u("title")}),(0,E.jsx)("div",{className:"h-10 w-10 shrink-0","aria-hidden":!0})]})}),(0,E.jsx)("main",{className:"mx-auto max-w-lg px-4 pb-10 pt-4",children:X?(0,E.jsx)("div",{className:"flex justify-center py-16",children:(0,E.jsx)(c.$j,{color:"#FE6822"})}):D?(0,E.jsx)("p",{className:"rounded-xl bg-red-50 px-4 py-3 text-center text-sm text-red-700",children:u("loadError")}):Y?(0,E.jsx)("p",{className:"rounded-xl bg-white px-4 py-8 text-center text-sm text-neutral-600 shadow-sm",children:u("empty")}):(0,E.jsxs)(E.Fragment,{children:[M.length>0?(0,E.jsxs)("section",{className:"mb-8","aria-label":u("topThree"),children:[(0,E.jsx)("h2",{className:"mb-4 text-center text-xs font-bold uppercase tracking-wider text-[#7D4719]/80",children:u("topThree")}),(0,E.jsx)("div",{className:"flex items-end justify-center gap-2 sm:gap-3 max-[319px]:flex-col max-[319px]:items-stretch max-[319px]:gap-3",children:M.length>=3?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(S,{item:M[1],rank:2,emphasis:"small",onNavigate:function(){return V(1,M[1].userId)}}),(0,E.jsx)(S,{item:M[0],rank:1,emphasis:"large",onNavigate:function(){return V(0,M[0].userId)}}),(0,E.jsx)(S,{item:M[2],rank:3,emphasis:"small",onNavigate:function(){return V(2,M[2].userId)}})]}):2===M.length?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(S,{item:M[1],rank:2,emphasis:"small",onNavigate:function(){return V(1,M[1].userId)}}),(0,E.jsx)(S,{item:M[0],rank:1,emphasis:"large",onNavigate:function(){return V(0,M[0].userId)}})]}):(0,E.jsx)(S,{item:M[0],rank:1,emphasis:"large",onNavigate:function(){return V(0,M[0].userId)}})})]}):null,T.length>0?(0,E.jsxs)("section",{"aria-label":u("allEarners"),children:[(0,E.jsx)("h2",{className:"mb-3 text-sm font-bold text-[#7D4719]",children:u("allEarners")}),(0,E.jsx)(o.$,{className:"flex flex-col gap-3",list:H,hasNextPage:z,onLoadMore:G,renderItem:function(e,t){return(0,E.jsx)(R,{item:e,rankOffset:4+t,onNavigate:function(){return q("list_profile",e.userId)}},e.userId)},t:u})]}):null]})})]})}var L=!0,U=function(e){var t=e.langCode;return(0,E.jsx)(Z,{langCode:t})}},23432:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/profile/top-earners",function(){return n(31494)}])}},function(e){e.O(0,[4040,1998,9774,2888,179],(function(){return t=23432,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.