1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7589],{22925:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/s/friends",function(){return n(83981)}])},83981:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return b}});var r=n(47568),i=n(29815),s=n(20414),a=n(85893),o=n(67294),c=n(11163),l=n(9008),d=n.n(l),u=n(7917),f=n(26070),m=n(41449),h=n(80243),x=n(37546),p=n(58533),g=n(41664),_=n.n(g),v=n(50452),j=n(61646),y=n(17435);var b=!0;t.default=function(e){var t=e.friend,n=e.myProfile,l=e.session_token;(0,y.Z)({session_token:l});var g=(0,v.Ok)().sendNotification,b=(0,c.useRouter)(),w=n.logged?1:3;void 0!==b.query["friend-type"]&&(w=parseInt(b.query["friend-type"]));var N=(0,o.useState)(w),Z=N[0],E=N[1],F=(0,o.useState)(!1),O=(F[0],F[1]),k=(0,o.useState)([]),q=k[0],S=k[1],C=(0,o.useState)([]),P=C[0],M=C[1],B=(0,o.useState)([]),T=B[0],D=B[1],L=(0,o.useState)(!1),R=L[0],U=L[1],I=(0,o.useState)(!1),X=I[0],K=I[1],A=(0,o.useState)(0),G=A[0],V=A[1],z=(0,o.useState)(0),H=z[0],J=z[1],Q=(0,o.useState)(0),W=Q[0],Y=Q[1],$=(0,o.useState)(!0),ee=$[0],te=$[1],ne=(0,o.useState)(!0),re=ne[0],ie=ne[1],se=(0,o.useState)(!0),ae=se[0],oe=se[1];(0,o.useEffect)((function(){le(1),de(1),ue(1)}),[]),(0,o.useEffect)((function(){var e=(window?window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):"")+"/s/friends?friend-type="+Z;b.replace(e,void 0,{scroll:!1})}),[Z]);var ce="",le=function(){var e=(0,r.Z)((function(e){var t,n;return(0,s.__generator)(this,(function(r){switch(r.label){case 0:return O(!0),[4,j.Z.get("/index.php?route=account/friend/getFriends&customer_id=".concat(ge,"&filter_name=").concat(ce,"&page=").concat(null!==e&&void 0!==e?e:G+1))];case 1:return(t=r.sent().data).friends&&0!==t.friends.length?(n=1===e?(0,i.Z)(t.friends):(0,i.Z)(q).concat((0,i.Z)(t.friends)),S(n),V(G+1),O(!1),[2]):(te(!1),O(!1),[2])}}))}));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=(0,r.Z)((function(e){var t,n,r,a,o;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return O(!0),[4,j.Z.get("/index.php?route=account/friend/getFriendRequests&customer_id=".concat(ge,"&filter_name=").concat(ce,"&page=").concat(null!==e&&void 0!==e?e:H+1))];case 1:if(!(t=s.sent().data).friend_requests||0===t.friend_requests.length)return ie(!1),O(!1),[2];for(n=1===e?(0,i.Z)(t.friend_requests):(0,i.Z)(P).concat((0,i.Z)(t.friend_requests)),M(n),J(H+1),r=0,a=0,o=0;o<P.length;o++)P[o].my_request?a++:r++;return U(r>0),K(a>0),O(!1),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=(0,r.Z)((function(e){var t,n;return(0,s.__generator)(this,(function(r){switch(r.label){case 0:return O(!0),[4,j.Z.get("/index.php?route=account/friend/getPeople&customer_id=".concat(ge,"&filter_name=").concat(ce,"&page=").concat(null!==e&&void 0!==e?e:W+1))];case 1:return(t=r.sent().data).people&&0!==t.people.length?(n=1===e?(0,i.Z)(t.people):(0,i.Z)(T).concat((0,i.Z)(t.people)),D(n),Y(W+1),O(!1),[2]):(oe(!1),O(!1),[2])}}))}));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=(0,r.Z)((function(e){var t,n,r;return(0,s.__generator)(this,(function(i){switch(i.label){case 0:return(t=new FormData).append("customer_id",String(e)),[4,j.Z.post("/index.php?route=account/friend/confirmFriend",t,{})];case 1:return n=i.sent(),(r=n.data).error?((0,x.P)(r.error),[2]):(r.success&&((0,x.b)(r.success),xe(),g(e,"friend_confirm")),[2])}}))}));return function(t){return e.apply(this,arguments)}}(),me=function(){var e=(0,r.Z)((function(e){var t,n,r;return(0,s.__generator)(this,(function(i){switch(i.label){case 0:return(t=new FormData).append("customer_id",String(e)),[4,j.Z.post("/index.php?route=account/friend/removeFriend",t,{})];case 1:return n=i.sent(),(r=n.data).error?((0,x.P)(r.error),[2]):(r.success&&((0,x.b)(r.success),xe()),[2])}}))}));return function(t){return e.apply(this,arguments)}}(),he=function(){var e=(0,r.Z)((function(e){var t,n,r;return(0,s.__generator)(this,(function(i){switch(i.label){case 0:return(t=new FormData).append("customer_id",String(e)),[4,j.Z.post("/index.php?route=account/friend/addFriend",t,{})];case 1:return n=i.sent(),(r=n.data).success&&((0,x.b)(r.success),xe(),g(e,"friend_request")),r.error&&(0,x.P)(r.error),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),xe=function(){S([]),M([]),D([]),U(!1),K(!1),V(0),J(0),Y(0),te(!0),ie(!0),oe(!0),le(1),de(1),ue(1)},pe=function(){var e=(0,r.Z)((function(){var e,t;return(0,s.__generator)(this,(function(n){return e=document.getElementById("filter-friend"),t=e.value,ce=t,1==Z?le(1):2==Z?de(1):3==Z&&ue(1),[2]}))}
1));return function(){return e.apply(this,arguments)}}(),ge=t.my_customer_id;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(d(),{children:[(0,a.jsx)("meta",{httpEquiv:"Content-Type",content:"text/html; charset=utf-8"}),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,a.jsx)("meta",{httpEquiv:"X-UA-Compatible",content:"IE=edge"}),(0,a.jsx)("title",{children:t.head_conf.meta_title}),(0,a.jsx)("meta",{name:"description",content:t.head_conf.meta_description}),(0,a.jsx)("meta",{property:"og:image:width",content:"400"}),(0,a.jsx)("meta",{property:"og:image:height",content:"400"}),(0,a.jsx)("meta",{property:"og:title",content:t.head_conf.fb_title}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{property:"og:site_name",content:t.head_conf.fb_site_name}),(0,a.jsx)("meta",{property:"og:image",content:t.head_conf.fb_image}),(0,a.jsx)("meta",{property:"og:url",content:t.head_conf.fb_url}),(0,a.jsx)("meta",{property:"og:description",content:t.head_conf.fb_description})]}),(0,a.jsx)(u.Z,{}),(0,a.jsx)("main",{id:"content",children:(0,a.jsx)("div",{className:"container mb-4",children:(0,a.jsx)("div",{className:"row row-half",children:(0,a.jsx)("div",{className:"col-12 col-half mb-4",children:(0,a.jsx)("div",{className:"social-feed-profile-details card social-card shadow-sm mt-4",children:n.logged?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"card-header header-with-options d-flex justify-content-between align-items-center",children:[(0,a.jsxs)("div",{className:"header-with-search-profile",children:[(0,a.jsx)("div",{children:1==Z?t.texts.text_friends:2==Z?t.texts.text_requests:3==Z?t.texts.text_supporters:(0,a.jsx)(a.Fragment,{})}),(0,a.jsxs)("div",{className:"profile-search-with-icon",children:[(0,a.jsx)("input",{type:"text",id:"filter-friend",name:"filter_friend",className:"form-control",placeholder:t.texts.placeholder_search_friends,onKeyUp:pe}),(0,a.jsx)("i",{id:"filter-friends-toggle",className:"fas fa-search",onClick:pe})]})]}),(0,a.jsx)("div",{className:"buttons-header-with-options",children:n.logged&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"btn btn-outline-secondary btn-sm ms-2 ".concat(1==Z&&"active"),onClick:function(){E(1),le(1)},children:[t.texts.text_friends," (",t.total_friends,")"]}),(0,a.jsx)("div",{className:"btn btn-outline-secondary btn-sm ms-2 ".concat(2==Z&&"active"),onClick:function(){E(2),de(1)},children:t.texts.text_requests}),(0,a.jsx)("div",{className:"btn btn-outline-secondary btn-sm ms-2 ".concat(3==Z&&"active"),onClick:function(){E(3),ue(1)},children:t.texts.text_supporters})]})})]}),1==Z?(0,a.jsx)("div",{className:"card-body",children:(0,a.jsx)("div",{className:"cont-list-friends-inf",children:q?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(p.Z,{dataLength:q.length,next:le,hasMore:ee,loader:(0,a.jsx)(m.Z,{height:200}),style:{overflow:"visible"},endMessage:(0,a.jsx)(a.Fragment,{children:q.length<1&&(0,a.jsx)("div",{className:"d-flex justify-content-center flex-column align-items-center mt-4 mb-4",children:(0,a.jsx)("span",{className:"mt-4",children:t.texts.text_no_friends})})}),children:q.map((function(e,r){return(0,a.jsx)("div",{className:"col-md-6 col-12 col-user-friends-item",children:(0,a.jsx)(h.Z,{user:e,view_position:"social",showButtons:!0,myProfile:n,addFriend:function(){return he(e.friend_id)},confirmFriend:function(){return fe(e.friend_id)},removeFriend:function(){return me(e.friend_id)},texts:t.texts})},r)}))})}):(0,a.jsx)(m.Z,{height:300})})}):2==Z?(0,a.jsx)("div",{className:"card-body",children:(0,a.jsx)("div",{className:"cont-list-friends-inf",children:P?(0,a.jsxs)(a.Fragment,{children:[R&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"header-with-search-profile",children:(0,a.jsx)("strong",{children:t.texts.text_received_requests})}),(0,a.jsx)("hr",{}),(0,a.jsx)(p.Z,{dataLength:P.length,next:de,hasMore:re,loader:(0,a.jsx)(m.Z,{height:200}),style:{overflow:"visible"},endMessage:(0,a.jsx)(a.Fragment,{children:P.length<1&&(0,a.jsx)("div",{className:"d-flex justify-content-center flex-column align-items-center mt-4 mb-4",children:(0,a.jsx)("span",{className:"mt-4",children:t.texts.text_no_requests})})}),children:P.map((function(e,r){if(!e.my_request)return(0,a.jsx)("div",{className:"col-md-6 col-12 col-user-friends-item",children:(0,a.jsx)(h.Z,{user:e,view_position:"social",showButtons:!0,myProfile:n,addFriend:function(){return he(e.friend_id)},confirmFriend:function(){return fe(e.friend_id)},removeFriend:function(){return me(e.friend_id)},texts:t.texts})},r)}))})]}),X&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("hr",{}),(0,a.jsx)("div",{className:"header-with-search-profile",children:(0,a.jsx)("strong",{children:t.texts.text_sent_requests})}),(0,a.jsx)("hr",{}),(0,a.jsx)(p.Z,{dataLength:P.length,next:de,hasMore:re,loader:(0,a.jsx)(m.Z,{height:200}),style:{overflow:"visible"},children:P.map((function(e,r){if(e.my_request)return(0,a.jsx)("div",{className:"col-md-6 col-12 col-user-friends-item",children:(0,a.jsx)(h.Z,{user:e,view_position:"social",showButtons:!0,myProfile:n,addFriend:function(){return he(e.friend_id)},confirmFriend:function(){return fe(e.friend_id)},removeFriend:function(){return me(e.friend_id)},texts:t.texts})},r)}))})]}),P.length<1&&(0,a.jsx)("div",{className:"d-flex justify-content-center flex-column align-items-center mt-4 mb-4",children:(0,a.jsx)("span",{className:"mt-4",children:t.texts.text_no_requests})})]}):(0,a.jsx)(m.Z,{height:300})})}):(0,a.jsx)("div",{className:"card-body",children:(0,a.jsx)("div",{className:"cont-list-friends-inf",children:T?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(p.Z,{dataLength:T.length,next:ue,hasMore:ae,loader:(0,a.jsx)(m.Z,{height:200}),style:{overflow:"visible"},endMessage:(0,a.jsx)(a.Fragment,{children:T.length<1&&(0,a.jsx)("div",{className:"d-flex justify-content-center flex-column align-items-center mt-4 mb-4",children:(0,a.jsx)("span",{className:"mt-4",children:t.texts.text_no_person})})}),children:T.map((function(e,r){return(0,a.jsx)("div",{className:"col-md-6 col-12 col-user-friends-item",children:(0,a.jsx)(h.Z,{user:e,view_position:"social",showButtons:!0,myProfile:n,addFriend:function(){return he(e.friend_id)},confirmFriend:function(){return fe(e.friend_id)},removeFriend:function(){return me(e.friend_id)},texts:t.texts})},r)}))})}):(0,a.jsx)(m.Z,{height:300})})})]}):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"social-feed-profile-detail",children:(0,a.jsxs)("div",{className:"card-body text-center",children:[(0,a.jsx)("div",{children:t.texts.text_login_to_see}),(0,a.jsx)(_(),{href:"/login",children:(0,a.jsx)("a",{className:"btn btn-primary w-100 mt-4",children:t.texts.text_login})})]})})})})})})})}),(0,a.jsx)(f.Z,{})]})}},24561:function(e,t,n){"use strict";var r=n(67294),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};var s=function(e){var t=e.animate,n=e.animateBegin,s=e.backgroundColor,a=e.backgroundOpacity,o=e.baseUrl,c=e.children,l=e.foregroundColor,d=e.foregroundOpacity,u=e.gradientRatio,f=e.gradientDirection,m=e.uniqueKey,h=e.interval,x=e.rtl,p=e.speed,g=e.style,_=e.title,v=e.beforeMask,j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["animate","animateBegin","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","gradientDirection","uniqueKey","interval","rtl","speed","style","title","beforeMask"]),y=m||Math.random().toString(36).substring(6),b=y+"-diff",w=y+"-animated-diff",N=y+"-aria",Z=x?{transform:"scaleX(-1)"}:null,E="0; "+h+"; 1",F=p+"s",O="top-bottom"===f?"rotate(90)":void 0;return(0,r.createElement)("svg",i({"aria-labelledby":N,role:"img",style:i(i({},g),Z)},j),_?(0,r.createElement)("title",{id:N},_):null,v&&(0,r.isValidElement)(v)?v:null,(0,r.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+o+"#"+b+")",style:{fill:"url("+o+"#"+w+")"}}),(0,r.createElement)("defs",null,(0,r.createElement)("clipPath",{id:b},c),(0,r.createElement)("linearGradient",{id:w,gradientTransform:O},(0,r.createElement)("stop",{offset:"0%",stopColor:s,stopOpacity:a},t&&(0,r.createElement)("animate",{attributeName:"offset",values:-u+"; "+-u+";
1 1",keyTimes:E,dur:F,repeatCount:"indefinite",begin:n})),(0,r.createElement)("stop",{offset:"50%",stopColor:l,stopOpacity:d},t&&(0,r.createElement)("animate",{attributeName:"offset",values:-u/2+"; "+-u/2+"; "+(1+u/2),keyTimes:E,dur:F,repeatCount:"indefinite",begin:n})),(0,r.createElement)("stop",{offset:"100%",stopColor:s,stopOpacity:a},t&&(0,r.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+u),keyTimes:E,dur:F,repeatCount:"indefinite",begin:n})))))};s.defaultProps={animate:!0,backgroundColor:"#f5f6f7",backgroundOpacity:1,baseUrl:"",foregroundColor:"#eee",foregroundOpacity:1,gradientRatio:2,gradientDirection:"left-right",id:null,interval:.25,rtl:!1,speed:1.2,style:{},title:"Loading...",beforeMask:null};var a=function(e){return e.children?(0,r.createElement)(s,i({},e)):(0,r.createElement)(o,i({},e))},o=function(e){return(0,r.createElement)(a,i({viewBox:"0 0 476 124"},e),(0,r.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),(0,r.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),(0,r.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),(0,r.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),(0,r.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),(0,r.createElement)("circle",{cx:"20",cy:"20",r:"20"}))};t.ZP=a}},function(e){e.O(0,[3996,5675,9127,3863,7917,6070,9774,2888,179],(function(){return t=22925,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.