1"use strict";(self.webpackChunkrefactor=self.webpackChunkrefactor||[]).push([[1931],{91931:(e,t,o)=>{o.r(t),o.d(t,{default:()=>y});var a=o(89379),r=o(9950),_=o(89512),s=o(74465),d=o(70711);const p={udate_operator_top3_page:"udate_operator_top3_page_udate_operator_top3_page__G2gEC",tops_data_wrapper:"udate_operator_top3_page_tops_data_wrapper__jnCsl",period_for_top3:"udate_operator_top3_page_period_for_top3__HsLFm",month:"udate_operator_top3_page_month__9iI4t",active:"udate_operator_top3_page_active__8haC5",users_cards_wrapper:"udate_operator_top3_page_users_cards_wrapper__mMgce",separated_line:"udate_operator_top3_page_separated_line__k5dPd",users_cards:"udate_operator_top3_page_users_cards__vx33W",card:"udate_operator_top3_page_card__gZUkR",card_top:"udate_operator_top3_page_card_top__Qj5aO",card_top_header:"udate_operator_top3_page_card_top_header__mtwm2",card_top_trophy:"udate_operator_top3_page_card_top_trophy__NGdx7",card_bottom:"udate_operator_top3_page_card_bottom__S6PmV",card_bottom_header:"udate_operator_top3_page_card_bottom_header__JWtS9",card_bottom_points:"udate_operator_top3_page_card_bottom_points__cuwrw",trophy_gold:"udate_operator_top3_page_trophy_gold__ekckK",trophy_silver:"udate_operator_top3_page_trophy_silver__z4xOU",trophy_bronze:"udate_operator_top3_page_trophy_bronze__uRbSn"};var n=o(26197),c=o(39324),l=o(43822),i=o(44414);const u=e=>{let{styles:t,place:o,user:a}=e;return(0,i.jsxs)("div",{className:t.card,children:[(0,i.jsx)("div",{className:t.card_top,children:(0,i.jsx)("svg",{className:"".concat(t.card_top_trophy," ").concat(t["trophy_".concat(o)]),children:(0,i.jsx)(n.gc,{icon:c.iHh,size:"lg"})})}),(0,i.jsxs)("div",{className:t.card_bottom,children:[(0,i.jsx)("h1",{className:t.card_top_header,children:(0,i.jsx)(l.P,{name:null===a||void 0===a?void 0:a.name,nickname:null===a||void 0===a?void 0:a.nickname,styles_for_name:{fontWeight:"bold"}})}),(0,i.jsxs)("h3",{className:t.card_bottom_header,children:[null===a||void 0===a?void 0:a.bonuses,"$"]})]})]})};var h=o(97976),v=o.n(h);function m(e){let{styles:t,users:o}=e;return(0,i.jsxs)("div",{className:t.users_cards,children:[o&&!o.length&&(0,i.jsx)("div",{children:"Operators not found"}),o&&0!==o.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v(),{recycle:!1,numberOfPieces:500,wind:.03}),o.sort(((e,t)=>+t.bonuses-+e.bonuses)).map(((e,o)=>{let a="";return 0===o&&(a="gold"),1===o&&(a="silver"),2===o&&(a="bronze"),(0,i.jsx)(u,{styles:t,place:a,user:e},o)}))]})]})}var g=o(95379),x=o(63479);const j=()=>{const e=new Date;return Array.from({length:3},((t,o)=>{const a=new Date(e.getFullYear(),e.getMonth()-o),r=_.US[a.getMonth()],s=a.getFullYear();return{id:o+1,data:"".concat(r," ").concat(s)}}))};const y=function(){const[e,t]=(0,r.useState)({isRequesLoad:!1,checkMonth:1,lastThreeMonth:j(),topUsers:{currentMont:null,preMonth:null,pre_preMonth:null}});(0,r.useEffect)((()=>{null!==e&&void 0!==e&&e.isRequesLoad||async function(){try{(0,x.ZH)(!0);const{data:e}=await s.LV.post(d.pj,{family:"udate"});e.success&&t((t=>(0,a.A)((0,a.A)({},t),{},{topUsers:{currentMont:null===e||void 0===e?void 0:e.data[0].operators,preMonth:null===e||void 0===e?void 0:e.data[1].operators,pre_preMonth:null===e||void 0===e?void 0:e.data[2].operators}}))),e.success||(0,g.FX)({success:!1,text:(null===e||void 0===e?void 0:e.message)||"Failed to retrieve top manager users."})}catch(e){(0,g.FX)({success:!1,text:(null===e||void 0===e?void 0:e.message)||"ERROR: Failed to retrieve top manager users."})}finally{t((e=>(0,a.A)((0,a.A)({},e),{},{isRequesLoad:!0}))),(0,x.ZH)(!1)}}()}),[]);const o={1:(0,i.jsx)(m,{styles:p,users:null===e||void 0===e?void 0:e.topUsers.currentMont}),2:(0,i.jsx)(m,{styles:p,users:null===e||void 0===e?void 0:e.topUsers.preMonth}),3:(0,i.jsx)(m,{styles:p,users:null===e||void 0===e?void 0:e.topUsers.pre_preMonth})};return(0,i.jsx)("div",{className:p.udate_operator_top3_page,children:(0,i.jsxs)("div",{className:p.tops_data_wrapper,children:[(0,i.jsx)("div",{className:p.period_for_top3,children:null===e||void 0===e?void 0:e.lastThreeMonth.map((o=>(0,i.jsx)("div",{className:"".concat(p.month," ").concat((null===e||void 0===e?void 0:e.checkMonth)===o.id&&p.active),onClick:()=>t((e=>(0,a.A)((0,a.A)({},e),{},{checkMonth:Number(null===o||void 0===o?void 0:o.id)}))),children:o.data},o.id)))}),(0,i.jsxs)("div",{className:p.users_cards_wrapper,children:[(0,i.jsx)("div",{className:p.separated_line}),(_=null===e||void 0===e?void 0:e.checkMonth,o[_])]})]})});var _}}}]);
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.