PageSourceSearch

https://www.rafigiveaway.com/_next/static/chunks/pages/admin-127f311e26198973.js

js rafigiveaway.com collected 2026-10-02 00:18:48 UTC 26,335 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[964],{577:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return r(617)}])},1096:function(e,t,r){"use strict";var n=r(3692),s=r(7925),i=r(3024),l=r.n(i),a=r(2274),o=function(){return localStorage.getItem("token")},d=function(){var e=(0,n.Z)((function(){var e,t,r,n,i,o;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:e=localStorage.getItem("refreshToken"),t=new Date,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,l().post("".concat("https://webback.rafigiveaway.com","/auth/refresh"),{refreshToken:e},{headers:{secret:(0,a.Z)(t),current:t},withCredentials:!0})];case 2:return r=s.sent(),localStorage.setItem("token",null===r||void 0===r||null===(n=r.data)||void 0===n?void 0:n.token),[3,4];case 3:return i=s.sent(),console.log("Error",null===i||void 0===i||null===(o=i.response)||void 0===o?void 0:o.data),localStorage.removeItem("rafiuser"),localStorage.setItem("refreshTokenError",!0),[3,4];case 4:return[2]}}))}));return function(){return e.apply(this,arguments)}}();function c(){return(c=(0,n.Z)((function(e){var t,r,n,i,c,u,h,y,p;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,6]),t=new Date,r=o(),[4,l().get(e,{headers:{Authorization:"Bearer ".concat(r),secret:(0,a.Z)(t),current:t},withCredentials:!0})];case 1:return[2,s.sent()];case 2:return 401!==(null===(n=s.sent())||void 0===n||null===(i=n.response)||void 0===i?void 0:i.status)?[3,5]:[4,d()];case 3:return s.sent(),h=o(),y=new Date,[4,l().get(e,{headers:{Authorization:"Bearer ".concat(h),secret:(0,a.Z)(y),current:y},withCredentials:!0})];case 4:return p=s.sent(),console.log("New Get Request DATA",null===p||void 0===p?void 0:p.data),[2,p];case 5:return console.log("Get Request Error",null===n||void 0===n||null===(c=n.response)||void 0===c?void 0:c.data),[2,null===n||void 0===n||null===(u=n.response)||void 0===u?void 0:u.data];case 6:return[2]}}
1))}))).apply(this,arguments)}t.Z=function(e){return c.apply(this,arguments)}},2274:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(7723);function s(e){return n(e)}},617:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return y},default:function(){return p}});var n=r(3692),s=r(5447),i=r(9728),l=r(4911),a=r(7925),o=r(8014),d=r(6168),c=r(5332),u=r(1096),h=[{id:"usuarios",label:"Usuarios"},{id:"sorteos",label:"Sorteos"},{id:"suscripciones",label:"Suscripciones"}],y=!0;function p(){var e=(0,c.useRouter)(),t=(0,d.useState)("usuarios"),r=t[0],l=t[1],y=(0,d.useState)(!1),p=y[0],j=y[1],b=(0,d.useState)(!1),S=b[0],w=b[1],C=(0,d.useState)([]),A=C[0],k=C[1],_=(0,d.useState)(!1),I=_[0],N=_[1],R=(0,d.useState)(""),D=R[0],Z=R[1],E=(0,d.useState)([]),B=E[0],W=E[1],U=(0,d.useState)(!1),P=U[0],L=U[1],T=(0,d.useState)(""),z=T[0],F=T[1],O=(0,d.useState)(""),M=O[0],G=O[1],X=(0,d.useState)(!1),V=X[0],H=X[1],J=(0,d.useState)([]),K=J[0],q=J[1],Q=(0,d.useState)(!1),Y=Q[0],$=Q[1],ee=(0,d.useState)(""),te=ee[0],re=ee[1],ne=(0,d.useState)(null),se=ne[0],ie=ne[1],le=(0,d.useState)(!1),ae=le[0],oe=le[1],de=(0,d.useState)(""),ce=de[0],ue=de[1],he=(0,d.useState)(null),ye=he[0],pe=he[1],xe=(0,d.useState)(!1),fe=xe[0],ge=xe[1],ve=(0,d.useState)(""),me=ve[0],je=ve[1],be=(0,d.useState)(null),Se=be[0],we=be[1],Ce=(0,d.useState)(!1),Ae=Ce[0],ke=Ce[1],_e=(0,d.useState)(""),Ie=_e[0],Ne=_e[1],Re="https://webback.rafigiveaway.com",De=function(){var e=(0,n.Z)((function(e,t){var r,n,s,i,l,o,d,c,h,y,p;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:r=!0,n=!1,s=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),i=e[Symbol.iterator](),a.label=2;case 2:return(r=(l=i.next()).done)?[3,5]:(o=l.value,[4,(0,u.Z)("".concat(Re).concat(o))]);case 3:if(h=a.sent(),y=null===h||void 0===h||null===(d=h.data)||void 0===d||null===(c=d.data)||void 0===c?void 0:c[t],200===(null===h||void 0===h?void 0:h.status)&&Array.isArray(y))return[2,y];a.label=4;case 4:return r=!0,[3,2];case 5:return[3,8];case 6:return p=a.sent(),n=!0,s=p,[3,8];case 7:try{r||null==i.return||i.return()}finally{if(n)throw s}return[7];case 8:return[2,null]}}))}));return function(t,r){return e.apply(this,arguments)}}(),Ze=function(){var e=(0,n.Z)((function(e){var t,r,n,s,i,l,o,d,c;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:t=!0,r=!1,n=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),s=e[Symbol.iterator](),a.label=2;case 2:return(t=(i=s.next()).done)?[3,5]:(l=i.value,[4,(0,u.Z)("".concat(Re).concat(l))]);case 3:if(200===(null===(o=a.sent())||void 0===o?void 0:o.status)&&(d=function(e){var t,r=null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.data;if(!r||!Array.isArray(r.days))return null;var n=r.days.filter((function(e){return e&&"string"===typeof e.date})).map((function(e){return{date:String(e.date),count:Number.isFinite(Number(e.count))?Number(e.count):0}}));return{startDate:r.startDate,endDate:r.endDate,days:n}}(o),d))return[2,d];a.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return c=a.sent(),r=!0,n=c,[3,8];case 7:try{t||null==s.return||s.return()}finally{if(r)throw n}return[7];case 8:return[2,null]}}))}));return function(t){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){try{var t=localStorage.getItem("rafiuser"),r=t?JSON.parse(t):null;if(!("admin"===(null===r||void 0===r?void 0:r.role)))return w(!1),j(!0),void e.replace("/");w(!0),j(!0)}catch(n){w(!1),j(!0),e.replace("/")}}),[e]),(0,d.useEffect)((function(){p&&S&&"usuarios"===r&&We()}),[r,Re,p,S]),(0,d.useEffect)((function(){if(p&&S&&"usuarios"===r){var e=function(){var e=(0,n.Z)((function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return oe(!0),ue(""),[4,Ze(["/admin/stats/users/monthly"])];case 1:return(e=t.sent())?(ie(e),oe(!1),[2]):(ie(null),ue("No se pudieron cargar las estadisticas mensuales."),oe(!1),[2])}}))}));return function(){return e.apply(this,arguments)}}();e()}}),[r,Re,p,S]),(0,d.useEffect)((function(){if(p&&S&&"sorteos"===r){var e=function(){var e=(0,n.Z)((function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return $(!0),re(""),[4,De(["/giveAwayApi/latest"],"giveaways")];case 1:return(e=t.sent())?(q(e),$(!1),[2]):(q([]),re("No se pudieron cargar los sorteos. Verific\xe1 el endpoint de backend."),$(!1),[2])}}))}));return function(){return e.apply(this,arguments)}}();e()}}),[r,Re,p,S]),(0,d.useEffect)((function(){if(p&&S&&"sorteos"===r){var e=function(){var e=(0,n.Z)((function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return ge(!0),je(""),[4,Ze(["/admin/stats/giveaways/monthly"])];case 1:return(e=t.sent())?(pe(e),ge(!1),[2]):(pe(null),je("No se pudieron cargar las estadisticas mensuales."),ge(!1),[2])}}))}));return function(){return e.apply(this,arguments)}}();e()}}),[r,Re,p,S]),(0,d.useEffect)((function(){if(p&&S&&"suscripciones"===r){var e=function(){var e=(0,n.Z)((function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return N(!0),Z(""),[4,De(["/subscription/latest"],"subscriptions")];case 1:return(e=t.sent())?(k(e),N(!1),[2]):(k([]),Z("No se pudieron cargar las suscripciones. Verific\xe1 el endpoint de backend."),N(!1),[2])}}))}));return function(){return e.apply(this,arguments)}}();e()}}),[r,Re,p,S]),(0,d.useEffect)((function(){if(p&&S&&"suscripciones"===r){var e=function(){var e=(0,n.Z)((function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return ke(!0),Ne(""),[4,Ze(["/admin/stats/subscriptions/monthly"])];case 1:return(e=t.sent())?(we(e),ke(!1),[2]):(we(null),Ne("No se pudieron cargar las estadisticas mensuales."),ke(!1),[2])}}))}));return function(){return e.apply(this,arguments)}}();e()}}),[r,Re,p,S]);var Ee,Be=function(e){if(!e)return"\u2014";var t=new Date(e);
1return Number.isNaN(t.getTime())?e:t.toLocaleString()},We=function(){var e=(0,n.Z)((function(){var e;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return p&&S?(L(!0),F(""),[4,De(["/user/latest"],"users")]):[2];case 1:return(e=t.sent())?(W(e),H(!1),L(!1),[2]):(W([]),H(!1),F("No se pudieron cargar los usuarios. Verific\xe1 el endpoint de backend."),L(!1),[2])}}))}));return function(){return e.apply(this,arguments)}}(),Ue=function(){var e=(0,n.Z)((function(){var e,t,r,n,s,i,l,o,d,c,h,y,x;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return p&&S?(e=M.trim())?[3,2]:[4,We()]:[2];case 1:return a.sent(),[2];case 2:L(!0),F(""),t=["/user/searchByEmail?email=".concat(encodeURIComponent(e)),"/users/searchByEmail?email=".concat(encodeURIComponent(e)),"/searchByEmail?email=".concat(encodeURIComponent(e))],r=!0,n=!1,s=void 0,a.label=3;case 3:a.trys.push([3,8,9,10]),i=t[Symbol.iterator](),a.label=4;case 4:return(r=(l=i.next()).done)?[3,7]:(o=l.value,[4,(0,u.Z)("".concat(Re).concat(o))]);case 5:if(h=a.sent(),y=null===h||void 0===h||null===(d=h.data)||void 0===d||null===(c=d.data)||void 0===c?void 0:c.users,200===(null===h||void 0===h?void 0:h.status)&&Array.isArray(y))return W(y),H(!0),L(!1),[2];a.label=6;case 6:return r=!0,[3,4];case 7:return[3,10];case 8:return x=a.sent(),n=!0,s=x,[3,10];case 9:try{r||null==i.return||i.return()}finally{if(n)throw s}return[7];case 10:return W([]),H(!0),F("No se encontraron usuarios para ese email."),L(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();return p?S?(0,o.jsxs)("main",{style:{minHeight:"100vh",background:"#f5f7fb",color:"#111827",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},children:[(0,o.jsx)("header",{style:{position:"sticky",top:0,zIndex:10,background:"#111827",color:"#fff",borderBottom:"1px solid #374151"},children:(0,o.jsxs)("div",{style:{maxWidth:1100,margin:"0 auto",padding:"14px 20px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:16,flexWrap:"wrap"},children:[(0,o.jsx)("strong",{style:{fontSize:18},children:"Panel de Administraci\xf3n"}),(0,o.jsx)("nav",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:h.map((function(e){return(0,o.jsx)("button",{onClick:function(){return l(e.id)},type:"button",style:{border:"1px solid",borderColor:r===e.id?"#93c5fd":"#4b5563",background:r===e.id?"#1d4ed8":"transparent",color:"#fff",borderRadius:8,padding:"8px 12px",cursor:"pointer",fontWeight:600},children:e.label},e.id)}))})]})}),(0,o.jsxs)("section",{style:{maxWidth:1100,margin:"0 auto",padding:20},children:["usuarios"===r&&(0,o.jsxs)("article",{style:{background:"#fff",border:"1px solid #e5e7eb",borderRadius:12,padding:20},children:[(0,o.jsx)("h2",{style:{marginTop:0},children:"Usuarios"}),(0,o.jsx)("p",{style:{marginBottom:16,color:"#4b5563"},children:"Ultimos usuarios reportados por backend."}),(0,o.jsx)(m,{title:"Nuevos usuarios por dia (mensual)",stats:se,isLoading:ae,error:ce}),(0,o.jsxs)("div",{style:{display:"flex",gap:8,marginBottom:16,flexWrap:"wrap",alignItems:"center"},children:[(0,o.jsx)("input",{type:"email",value:M,placeholder:"Buscar por email",onChange:function(e){return G(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&Ue()},style:{border:"1px solid #d1d5db",borderRadius:8,padding:"8px 10px",minWidth:260}}),(0,o.jsx)("button",{type:"button",onClick:Ue,style:{border:"1px solid #2563eb",background:"#2563eb",color:"#fff",borderRadius:8,padding:"8px 12px",cursor:"pointer",fontWeight:600},children:"Buscar"}),(0,o.jsx)("button",{type:"button",onClick:function(){G(""),H(!1),We()},style:{border:"1px solid #d1d5db",background:"#fff",color:"#111827",borderRadius:8,padding:"8px 12px",cursor:"pointer",fontWeight:600},children:"Limpiar"})]}),P&&(0,o.jsx)("p",{style:{margin:0},children:"Cargando usuarios..."}),!P&&z&&(0,o.jsx)("p",{style:{margin:0,color:"#b91c1c"},children:z}),!P&&!z&&!V&&(0,o.jsx)("div",{style:{overflowX:"auto"},children:(0,o.jsxs)("table",{style:{width:"100%",minWidth:2300,borderCollapse:"collapse",fontSize:14},children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{style:x,children:"Nombre"}),(0,o.jsx)("th",{style:x,children:"Email"}),(0,o.jsx)("th",{style:x,children:"Rol"}),(0,o.jsx)("th",{style:x,children:"Google ID"}),(0,o.jsx)("th",{style:x,children:"Cuenta confirmada"}),(0,o.jsx)("th",{style:x,children:"Lang"}),(0,o.jsx)("th",{style:x,children:"Baneado"}),(0,o.jsx)("th",{style:x,children:"Giveaways"}),(0,o.jsx)("th",{style:x,children:"Total coin"}),(0,o.jsx)("th",{style:x,children:"Last login"}),(0,o.jsx)("th",{style:x,children:"Customer ID"}),(0,o.jsx)("th",{style:x,children:"Creado"}),(0,o.jsx)("th",{style:x,children:"Actualizado"})]})}),(0,o.jsxs)("tbody",{children:[0===B.length&&(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:f,colSpan:25,children:"No hay usuarios para mostrar."})}),B.map((function(e,t){return(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{style:f,children:String(e.nameSurname||"\u2014")}
1),(0,o.jsx)("td",{style:f,children:String(e.email||"\u2014")}),(0,o.jsx)("td",{style:f,children:String(e.role||"\u2014")}),(0,o.jsx)("td",{style:f,children:String(e.googleId||"\u2014")}),(0,o.jsx)("td",{style:f,children:"boolean"===typeof e.isAccountConfirmed?e.isAccountConfirmed?"Si":"No":"\u2014"}),(0,o.jsx)("td",{style:f,children:String(e.langCode||"\u2014")}),(0,o.jsx)("td",{style:f,children:"boolean"===typeof e.bannedAccount?e.bannedAccount?"Si":"No":"\u2014"}),(0,o.jsx)("td",{style:f,children:Array.isArray(e.giveaways)?e.giveaways.length:"\u2014"}),(0,o.jsx)("td",{style:f,children:"number"===typeof e.totalCoin?e.totalCoin:"\u2014"}),(0,o.jsx)("td",{style:f,children:Be(String(e.lastLogin||""))}),(0,o.jsx)("td",{style:f,children:e.customerId?(0,o.jsx)("a",{href:"https://dashboard.stripe.com/customers/".concat(e.customerId),target:"_blank",rel:"noopener noreferrer",children:String(e.customerId)}):"\u2014"}),(0,o.jsx)("td",{style:f,children:Be(String(e.createdAt||""))}),(0,o.jsx)("td",{style:f,children:Be(String(e.updatedAt||""))})]},String(e.id||e._id||e.email||"user-".concat(t)))}))]})]})}),!P&&!z&&V&&(0,o.jsxs)("div",{style:{display:"grid",gap:12},children:[0===B.length&&(0,o.jsx)("div",{style:(0,i.Z)((0,s.Z)({},g),{color:"#6b7280"}),children:"No hay resultados para ese email."}),B.map((function(e,t){return(0,o.jsxs)("div",{style:(0,i.Z)((0,s.Z)({},g),{display:"grid",gap:12}),children:[(0,o.jsx)("h3",{style:{margin:0},children:String(e.nameSurname||e.email||"Usuario ".concat(t+1))}),(0,o.jsxs)("div",{style:(0,s.Z)({},v),children:[(0,o.jsx)("strong",{children:"Cuenta"}),(0,o.jsxs)("div",{children:["Email: ",String(e.email||"\u2014")]}),(0,o.jsxs)("div",{children:["Rol: ",String(e.role||"\u2014")]}),(0,o.jsxs)("div",{children:["Cuenta confirmada:"," ","boolean"===typeof e.isAccountConfirmed?e.isAccountConfirmed?"Si":"No":"\u2014"]}),(0,o.jsxs)("div",{children:["Baneado:"," ","boolean"===typeof e.bannedAccount?e.bannedAccount?"Si":"No":"\u2014"]})]}),(0,o.jsxs)("div",{style:(0,s.Z)({},v),children:[(0,o.jsx)("strong",{children:"Acceso"}),(0,o.jsxs)("div",{children:["Google ID: ",String(e.googleId||"\u2014")]}),(0,o.jsxs)("div",{children:["Ultimo login: ",Be(String(e.lastLogin||""))]})]}),(0,o.jsxs)("div",{style:(0,s.Z)({},v),children:[(0,o.jsx)("strong",{children:"Plan y Billing"}),(0,o.jsxs)("div",{children:["Plan/Price flag: ",String(e.priceFlag||"\u2014")]}),(0,o.jsxs)("div",{children:["Customer ID: ",String(e.customerId||"\u2014")]}),(0,o.jsxs)("div",{children:["Total coin: ","number"===typeof e.totalCoin?e.totalCoin:"\u2014"]})]}),(0,o.jsxs)("div",{style:(0,s.Z)({},v),children:[(0,o.jsx)("strong",{children:"Sorteos"}),(0,o.jsxs)("div",{children:["Cantidad: ",Array.isArray(e.giveaways)?e.giveaways.length:"\u2014"]}),Array.isArray(e.giveaways)&&e.giveaways.length>0?(0,o.jsx)("div",{style:{display:"grid",gap:8},children:e.giveaways.map((function(e,t){return"string"===typeof e?(0,o.jsxs)("div",{style:{border:"1px solid #e5e7eb",borderRadius:8,padding:8,wordBreak:"break-all"},children:["ID: ",e]},"giveaway-id-".concat(t)):(0,o.jsxs)("div",{style:{border:"1px solid #e5e7eb",borderRadius:8,padding:8,display:"grid",gap:4},children:[(0,o.jsxs)("div",{children:["Nombre: ",String(e.name||"\u2014")]}),(0,o.jsxs)("div",{children:["Fecha: ",Be(String(e.date||""))]}),(0,o.jsxs)("div",{children:["Comentarios:"," ","number"===typeof e.postComment?e.postComment:"\u2014"]}),(0,o.jsxs)("div",{children:["Shortcode: ",(0,o.jsx)("a",{href:"https://instagram.com/p/".concat(e.shortCode),target:"_blank",rel:"noopener noreferrer",children:String(e.shortCode||"\u2014")})]}),(0,o.jsxs)("div",{children:["Estado: ",String(e.giveawayStatus||"\u2014")]}),(0,o.jsxs)("div",{children:["Post ID: ",String(e.post||"\u2014")]})]},"giveaway-object-".concat(e.id||e._id||t))}))}):(0,o.jsx)("div",{style:{wordBreak:"break-all"},children:"IDs: \u2014"})]})]},String(e.id||e._id||e.email||"search-user-".concat(t)))}))]})]}),"sorteos"===r&&(0,o.jsxs)("article",{style:{background:"#fff",border:"1px solid #e5e7eb",borderRadius:12,padding:20},children:[(0,o.jsx)("h2",{style:{marginTop:0},children:"Sorteos"}),(0,o.jsx)("p",{style:{marginBottom:16,color:"#4b5563"},children:"Ultimos sorteos reportados por backend."}),(0,o.jsx)(m,{title:"Nuevos sorteos por dia (mensual)",stats:ye,isLoading:fe,error:me}),Y&&(0,o.jsx)("p",{style:{margin:0},children:"Cargando sorteos..."}),!Y&&te&&(0,o.jsx)("p",{style:{margin:0,color:"#b91c1c"},children:te}),!Y&&!te&&(0,o.jsx)("div",{style:{overflowX:"auto"},children:(0,o.jsxs)("table",{style:{width:"100%",minWidth:3200,borderCollapse:"collapse",fontSize:14},children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{style:x,children:"Nombre"}),(0,o.jsx)("th",{style:x,children:"Fecha"}),(0,o.jsx)("th",{style:x,children:"Post likes"}),(0,o.jsx)("th",{style:x,children:"Post comments"}),(0,o.jsx)("th",{style:x,children:"Giveaway URL"}),(0,o.jsx)("th",{style:x,children:"Shortcode"}),(0,o.jsx)("th",{style:x,children:"Estado"}),(0,o.jsx)("th",{style:x,children:"Post ID"}),(0,o.jsx)("th",{style:x,children:"Rule countUser"}),(0,o.jsx)("th",{style:x,children:"Rule countDown"}),(0,o.jsx)("th",{style:x,children:"Rule winners"}),(0,o.jsx)("th",{style:x,children:"Rule alt winners"}),(0,o.jsx)("th",{style:x,children:"Rule mentions"}),(0,o.jsx)("th",{style:x,children:"Rule words"}),(0,o.jsx)("th",{style:x,children:"Result winners"}),(0,o.jsx)("th",{style:x,children:"Result alt winners"}),(0,o.jsx)("th",{style:x,children:"Result date"}),(0,o.jsx)("th",{style:x,children:"Result winners raw"}),(0,o.jsx)("th",{style:x,children:"Result alt raw"}),(0,o.jsx)("th",{style:x,children:"User name"}),(0,o.jsx)("th",{style:x,children:"User email"}),(0,o.jsx)("th",{style:x,children:"Actualizado"})]})}),(0,o.jsxs)("tbody",{children:[0===K.length&&(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:f,colSpan:34,children:"No hay sorteos para mostrar."})}),K.map((function(e,t){var r,n,s,i,l,a,d,c,u,h,y,p,x,g,v,m;return(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{style:f,children:String(e.name||"\u2014")}
1),(0,o.jsx)("td",{style:f,children:Be(String(e.date||""))}),(0,o.jsx)("td",{style:f,children:"number"===typeof e.postLike?e.postLike:"\u2014"}),(0,o.jsx)("td",{style:f,children:"number"===typeof e.postComment?e.postComment:"\u2014"}),(0,o.jsx)("td",{style:f,children:(0,o.jsx)("a",{href:"https://instagram.com/p/".concat(e.shortCode),target:"_blank",rel:"noopener noreferrer",children:String(e.shortCode||"\u2014")})}),(0,o.jsx)("td",{style:f,children:String(e.giveawayStatus||"\u2014")}),(0,o.jsx)("td",{style:f,children:String((null===(r=e.rules)||void 0===r?void 0:r.countUser)||"\u2014")}),(0,o.jsx)("td",{style:f,children:"number"===typeof(null===(n=e.rules)||void 0===n?void 0:n.countDown)?e.rules.countDown:"\u2014"}),(0,o.jsx)("td",{style:f,children:"number"===typeof(null===(s=e.rules)||void 0===s?void 0:s.numberOfWinners)?e.rules.numberOfWinners:"\u2014"}),(0,o.jsx)("td",{style:f,children:"number"===typeof(null===(i=e.rules)||void 0===i?void 0:i.numberOfAlternativeWinners)?e.rules.numberOfAlternativeWinners:"\u2014"}),(0,o.jsx)("td",{style:f,children:"number"===typeof(null===(l=e.rules)||void 0===l?void 0:l.numberOfMention)?e.rules.numberOfMention:"\u2014"}),(0,o.jsx)("td",{style:f,children:Array.isArray(null===(a=e.rules)||void 0===a?void 0:a.wordsFiltered)?null===(d=e.rules)||void 0===d?void 0:d.wordsFiltered.length:"\u2014"}),(0,o.jsx)("td",{style:f,children:Array.isArray(null===(c=e.result)||void 0===c?void 0:c.winners)?null===(u=e.result)||void 0===u?void 0:u.winners.length:"\u2014"}),(0,o.jsx)("td",{style:f,children:Array.isArray(null===(h=e.result)||void 0===h?void 0:h.alternativeWinners)?null===(y=e.result)||void 0===y?void 0:y.alternativeWinners.length:"\u2014"}),(0,o.jsx)("td",{style:f,children:Be(String((null===(p=e.result)||void 0===p?void 0:p.date)||""))}),(0,o.jsx)("td",{style:f,children:Array.isArray(null===(x=e.result)||void 0===x?void 0:x.winners)?JSON.stringify(e.result.winners):"\u2014"}),(0,o.jsx)("td",{style:f,children:Array.isArray(null===(g=e.result)||void 0===g?void 0:g.alternativeWinners)?JSON.stringify(e.result.alternativeWinners):"\u2014"}),(0,o.jsx)("td",{style:f,children:String((null===(v=e.user)||void 0===v?void 0:v.nameSurname)||"\u2014")}),(0,o.jsx)("td",{style:f,children:String((null===(m=e.user)||void 0===m?void 0:m.email)||"\u2014")}),(0,o.jsx)("td",{style:f,children:Be(String(e.updatedAt||""))})]},String(e.id||e._id||e.shortCode||"giveaway-".concat(t)))}))]})]})})]}),"suscripciones"===r&&(0,o.jsxs)("article",{style:{background:"#fff",border:"1px solid #e5e7eb",borderRadius:12,padding:20},children:[(0,o.jsx)("h2",{style:{marginTop:0},children:"Suscripciones"}),(0,o.jsx)("p",{style:{marginBottom:16,color:"#4b5563"},children:"Ultimas suscripciones reportadas por backend."}),(0,o.jsx)(m,{title:"Nuevas suscripciones por dia (mensual)",stats:Se,isLoading:Ae,error:Ie}),I&&(0,o.jsx)("p",{style:{margin:0},children:"Cargando suscripciones..."}),!I&&D&&(0,o.jsx)("p",{style:{margin:0,color:"#b91c1c"},children:D}),!I&&!D&&(0,o.jsx)("div",{style:{overflowX:"auto"},children:(0,o.jsxs)("table",{style:{width:"100%",minWidth:1400,borderCollapse:"collapse",fontSize:14},children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{style:x,children:"Plan"}),(0,o.jsx)("th",{style:x,children:"Estado"}),(0,o.jsx)("th",{style:x,children:"Limite comentarios"}),(0,o.jsx)("th",{style:x,children:"Inicio periodo"}),(0,o.jsx)("th",{style:x,children:"Fin periodo"}),(0,o.jsx)("th",{style:x,children:"Cancelar al fin"}),(0,o.jsx)("th",{style:x,children:"Stripe Sub ID"}),(0,o.jsx)("th",{style:x,children:"Stripe Customer ID"}),(0,o.jsx)("th",{style:x,children:"Stripe Price ID"}),(0,o.jsx)("th",{style:x,children:"Usuario"}),(0,o.jsx)("th",{style:x,children:"Email"}),(0,o.jsx)("th",{style:x,children:"Creado"}),(0,o.jsx)("th",{style:x,children:"Actualizado"})]})}),(0,o.jsxs)("tbody",{children:[0===A.length&&(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:f,colSpan:15,children:"No hay suscripciones para mostrar."})}),A.map((function(e){var t,r;return(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{style:f,children:e.planName||"\u2014"}),(0,o.jsx)("td",{style:f,children:e.status||"\u2014"}),(0,o.jsx)("td",{style:f,children:null!==(Ee=e.commentsLimit)&&void 0!==Ee?Ee:"\u2014"}),(0,o.jsx)("td",{style:f,children:Be(e.currentPeriodStart)}),(0,o.jsx)("td",{style:f,children:Be(e.currentPeriodEnd)}),(0,o.jsx)("td",{style:f,children:e.cancelAtPeriodEnd?"Si":"No"}),(0,o.jsx)("td",{style:f,children:e.stripeSubscriptionId||"\u2014"}),(0,o.jsx)("td",{style:f,children:e.stripeCustomerId||"\u2014"}),(0,o.jsx)("td",{style:f,children:e.stripePriceId||"\u2014"}),(0,o.jsx)("td",{style:f,children:(null===(t=e.user)||void 0===t?void 0:t.nameSurname)||"\u2014"}),(0,o.jsx)("td",{style:f,children:(null===(r=e.user)||void 0===r?void 0:r.email)||"\u2014"}),(0,o.jsx)("td",{style:f,children:Be(e.createdAt)}),(0,o.jsx)("td",{style:f,children:Be(e.updatedAt)})]},e.id||e._id)}))]})]})})]})]})]}):null:(0,o.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},children:"Verificando permisos..."})}var x={textAlign:"left",borderBottom:"1px solid #d1d5db",padding:"10px 8px",fontWeight:700,whiteSpace:"nowrap"},f={borderBottom:"1px solid #e5e7eb",padding:"10px 8px",verticalAlign:"top"},g={background:"#fff",border:"1px solid #e5e7eb",borderRadius:10,padding:14},v={background:"#f9fafb",border:"1px solid #e5e7eb",borderRadius:8,padding:10,display:"grid",gap:6};function m(e){var t,r=e.title,n=e.stats,s=e.isLoading,i=e.error,a=(null===n||void 0===n?void 0:n.days)||[],d=(t=Math).max.apply(t,[1].concat((0,l.Z)(a.map((function(e){return e.count})))));return(0,o.jsxs)("div",{style:{border:"1px solid #e5e7eb",borderRadius:10,background:"#f9fafb",padding:12,marginBottom:16},children:[(0,o.jsx)("strong",{style:{display:"block",marginBottom:8},children:r}),(null===n||void 0===n?void 0:n.startDate)&&(null===n||void 0===n?void 0:n.endDate)&&(0,o.jsxs)("p",{style:{margin:"0 0 10px 0",color:"#4b5563",fontSize:13},children:["Rango: ",n.startDate," a ",n.endDate]}),s&&(0,o.jsx)("p",{style:{margin:0},children:"Cargando grafico..."}),!s&&i&&(0,o.jsx)("p",{style:{margin:0,color:"#b91c1c"},children:i}),!s&&!i&&0===a.length&&(0,o.jsx)("p",{style:{margin:0,color:"#6b7280"},children:"Sin datos para el periodo."}),!s&&!i&&a.length>0&&(0,o.jsx)("div",{style:{overflowX:"auto"},children:(0,o.jsx)("div",{style:{display:"flex",alignItems:"flex-end",gap:8,minWidth:Math.max(420,30*a.length),height:190,paddingTop:10},children:a.map((function(e){var t=e.count>0?Math.max(8,Math.round(e.count/d*140)):4;return(0,o.jsxs)("div",{style:{flex:"0 0 22px",display:"flex",flexDirection:"column",alignItems:"center",gap:4},children:[(0,o.jsx)("span",{style:{fontSize:11,color:"#374151"},children:e.count}),(0,o.jsx)("div",{title:"".concat(e.date,": ").concat(e.count),style:{width:"100%",height:t,background:"#2563eb",borderRadius:"6px 6px 0 0"}}
1),(0,o.jsx)("span",{style:{fontSize:10,color:"#6b7280",minHeight:14},children:e.date.slice(5)})]},e.date)}))})})]})}},7723:function(e){"use strict";e.exports=function(e){for(var t=e.getTime().toString(),r=t.substring(0,t.length-4),n="AdfafkOK985!!timeString!!eKSFs54942!".replace("!!timeString!!",r),s="",i=0;i<n.length;i+=1)s+=String.fromCharCode(n.charCodeAt(i)+1);return s}}},function(e){e.O(0,[24,774,888,179],(function(){return t=577,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.