PageSourceSearch

https://meuajudante.com.br/_next/static/chunks/pages/gastos-2ede51e12062880d.js

js meuajudante.com.br collected 2026-09-24 10:44:41 UTC 6,321 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2790,63559],{86832:(e,a,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/gastos",function(){return s(97025)}])},97025:(e,a,s)=>{"use strict";s.r(a),s.d(a,{__N_SSP:()=>D,default:()=>A});var t=s(36303),l=s(78594),r=s(77910),n=s(68658),o=s(52327),m=s.n(o),i=s(38605),c=s(9160),d=s(55653),h=s(2895),u=s(27052),g=s(68193),p=s(43998),b=s(57577),N=s(27107),Y=s.n(N),f=s(41081);function v(e){let{monthYear:a,totalAmount:s,count:l,categories:r}=e;return(0,t.Y)(Y(),{href:"/gastos/".concat(a),className:"block h-full",children:(0,t.FD)("div",{className:"bg-theme-3 rounded-2xl p-5 h-full flex flex-col hover:bg-theme-4 transition-colors cursor-pointer border border-transparent hover:border-theme-state-disabled group",children:[(0,t.FD)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.Y)("h3",{className:"theme-body-lg-bold text-white",children:(0,b.N0)(a)}),(0,t.FD)("div",{className:"flex items-center gap-1.5",children:[(0,t.FD)("span",{className:"theme-body-xs-normal text-theme-minor",children:[l," ",1===l?"gasto":"gastos"]}),(0,t.Y)(f.A,{className:"w-3.5 h-3.5 fill-theme-minor group-hover:fill-white transition-colors flex-shrink-0"})]})]}),(0,t.Y)("p",{className:"theme-title-xs-bold text-primary mb-4",children:(0,b.up)(s)}),(0,t.Y)("hr",{className:"border-theme-state-disabled mb-4"}),(0,t.FD)("div",{className:"space-y-2.5 overflow-hidden flex-1",children:[r.slice(0,4).map(e=>{let a="#".concat(e.categoryColor.toString(16).padStart(8,"0").slice(-6)),l=s>0?e.totalAmount/s*100:0;return(0,t.FD)("div",{children:[(0,t.FD)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.FD)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.Y)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:a}}),(0,t.Y)("span",{className:"theme-body-xs-normal text-theme-minor truncate",children:e.categoryName})]}),(0,t.Y)("span",{className:"theme-body-xs-normal text-white ml-2 flex-shrink-0",children:(0,b.up)(e.totalAmount)})]}),(0,t.Y)("div",{className:"w-full bg-theme-2 rounded-full h-1",children:(0,t.Y)("div",{className:"h-1 rounded-full",style:{width:"".concat(l,"%"),backgroundColor:a}})})]},e.categoryId)}),r.length>4&&(0,t.FD)("span",{className:"theme-body-xs-normal text-theme-minor pt-0.5 block",children:["+",r.length-4," categorias"]})]})]})})}function x(){return(0,t.FD)("div",{className:"bg-theme-3 rounded-2xl p-5 animate-pulse",children:[(0,t.FD)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.Y)("div",{className:"h-5 w-28 bg-theme-4 rounded"}),(0,t.Y)("div",{className:"h-4 w-16 bg-theme-4 rounded"})]}),(0,t.Y)("div",{className:"h-6 w-24 bg-theme-4 rounded mb-4"}),(0,t.Y)("hr",{className:"border-theme-state-disabled mb-4"}),(0,t.Y)("div",{className:"space-y-2.5",children:Array.from({length:3}).map((e,a)=>(0,t.FD)("div",{children:[(0,t.FD)("div",{className:"flex justify-between mb-1",children:[(0,t.Y)("div",{className:"h-3 w-20 bg-theme-4 rounded"}),(0,t.Y)("div",{className:"h-3 w-14 bg-theme-4 rounded"})]}),(0,t.Y)("div",{className:"h-1 w-full bg-theme-4 rounded-full"})]},a))})]})}function w(){let e=(0,r.useRouter)(),{summaries:a,hasData:s,loading:l}=(0,b.Ay)(),[o,N]=(0,n.useState)(!1),Y=(0,n.useMemo)(()=>{let e=new Map;for(let s of a){let a=parseInt(s.monthYear.split("_")[1],10);e.has(a)||e.set(a,[]),e.get(a).push(s)}return Array.from(e.entries()).sort((e,a)=>a[0]-e[0])},[a]);return(0,t.FD)(d.Ay,{enableBreadcrumbs:!0,children:[(0,t.Y)(i.A,{title:"Gastos",subTitle:(0,t.FD)("div",{className:"flex items-center justify-between",children:[(0,t.Y)("span",{children:"Acompanhe seus gastos organizados por m\xeas."}),(0,t.FD)("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 ml-4 shrink-0 text-theme-minor hover:text-white transition-colors",children:[(0,t.Y)(h.A,{className:"w-3.5 h-3.5 fill-current"}),(0,t.Y)("span",{className:"theme-body-sm-medium",children:"Buscar por per\xedodo"})]})]}),iconElement:(0,t.Y)(u.A,{className:"w-9"}),subTitleElement:"div",className:"[&>[data-content]]:!items-stretch [&>[data-content]>
1span]:pb-0 mb-8",right:(0,t.FD)("div",{className:"flex gap-2",children:[(0,t.Y)(c._,{className:"!normal-case",value:1,label:"Categorias",onChange:()=>e.push("/gastos/categorias")}),(0,t.Y)(c._,{className:"!normal-case",value:1,title:"Registrar novo gasto",startIcon:(0,t.Y)(g.A,{className:"!mr-0"}),onChange:()=>e.push("/gastos/novo-gasto")})]})}),(0,t.Y)(p.A,{dialogOpen:o,onDialogClose:()=>N(!1),applied:null,onApply:a=>{let s=m()(a[0]),t="".concat(s.format("MM"),"_").concat(s.format("YYYY"));e.push({pathname:"/gastos/".concat(t),query:{startDate:m()(a[0]).format("YYYY-MM-DD"),endDate:m()(a[1]).format("YYYY-MM-DD")}})}}),l&&(0,t.Y)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mt-6",children:Array.from({length:6}).map((e,a)=>(0,t.Y)(x,{},a))}),!l&&!s&&(0,t.FD)("div",{className:"bg-theme-3 rounded-2xl p-10 mt-6 flex flex-col items-center justify-center text-center",children:[(0,t.Y)(u.A,{className:"w-12 h-12 fill-theme-minor mb-4"}),(0,t.Y)("h3",{className:"theme-body-lg-bold text-white mb-2",children:"Nenhum gasto registrado"}),(0,t.Y)("p",{className:"theme-body-md-normal text-theme-minor mb-6 max-w-xs",children:"Comece registrando seu primeiro gasto para acompanhar suas despesas."}),(0,t.Y)(c._,{className:"!normal-case",value:1,title:"Registrar primeiro gasto",startIcon:(0,t.Y)(g.A,{className:"!mr-0"}),onChange:()=>e.push("/gastos/novo-gasto")})]}),!l&&s&&(0,t.Y)("div",{className:"mt-6 space-y-8",children:Y.map(e=>{let[a,s]=e;return(0,t.FD)("div",{children:[(0,t.Y)("p",{className:"theme-body-sm-medium text-theme-minor mb-3 px-1",children:a}),(0,t.Y)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(e=>(0,t.Y)(v,{monthYear:e.monthYear,totalAmount:e.totalAmount,count:e.count,categories:e.categories},e.monthYear))})]},a)})})]})}var y=s(43058),D=!0;let A=()=>((0,y.A)(),(0,t.FD)(t.FK,{children:[(0,t.Y)(l.bV,{title:"Meu ajudante - Gastos",description:"Acompanhe seus gastos mensais com facilidade. Visualize resumos, categorias e mantenha o controle total das suas despesas."}),(0,t.Y)(w,{})]}))}},e=>{e.O(0,[73157,90291,1591,40316,25673,217,96130,82292,19572,90636,46593,38792],()=>e(e.s=86832)),_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.