PageSourceSearch

https://static.monarch.com/static/js/4784.9fc0825e.chunk.js

js monarch.com collected 2026-09-25 18:42:12 UTC 5,361 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d94f2837-ed8e-4b23-a445-57e5eeeaa173",e._sentryDebugIdIdentifier="sentry-dbid-d94f2837-ed8e-4b23-a445-57e5eeeaa173")}catch(e){}}(),(this.webpackChunkweb=this.webpackChunkweb||[]).push([[4784],{4784:(e,t,o)=>{o.r(t),o.d(t,{ReportsPieChart:()=>O});var n=o(68622),a=o(13398),i=o(86432),l=o(66808),r=o(13484),s=o(36938),c=o(39861),d=o(37380),u=o(8483),p=o(62380),m=o(98251),h=o(69263),v=o(57432),f=o(94267),y=o(3664),g=o(39009);const w=["active"],b=e=>{const t=e.active,o=(0,a.A)(e,w),n=(0,g.WS)(e);return n?s.createElement(h.II,Object.assign({"data-external-id":"reports-pie-chart-tooltip",active:t},o),s.createElement("div",{className:"flex items-start gap-sm"},s.createElement(v.c,{className:"mt-2xs",color:n.color,size:12}),s.createElement("div",{className:"flex flex-col"},s.createElement(f.c,{size:"xs",weight:"medium"},n.label),s.createElement(f.c,{size:"xs",weight:"book"},n.formattedValue," ",n.percent?"(".concat((0,y.l9)(n.percent),")"):"")))):null};var E=o(47197),C=o(21327),k=o(3569),_=o.n(k);const I={BudgetVariabilityInfo:"type",Category:"category",Merchant:"merchant",CategoryGroup:"group",BusinessEntity:"business",User:"owner"},x=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e?_()(I[e],t,o):""};var S=o(53083),P=o(6515),D=o(18680),N=o(8134),A=o(1604),z=o(15660);const G=["colors","data","onSelectDatum","selectedDatumId","formatEntityUrl","showAllEntities","onChangeShowAllEntities"],O=e=>{let t=e.colors,o=e.data,i=e.onSelectDatum,c=e.selectedDatumId,d=e.formatEntityUrl,p=e.showAllEntities,h=e.onChangeShowAllEntities,v=(0,a.A)(e,G);const f=(0,E.Nb)({strict:!1}).isPreview,y=(0,n.A)(o,2),g=y[0],w=y[1],k=w.otherGroups.length>0&&0!==w.total,_=(0,s.useMemo)((()=>{let e=g.map(((e,o)=>{var n;let a=e.entities,i=e.total,l=e.percent,r=e.original,s=e.categoryGroupType;if(!a)return;const c=(0,D.KQ)(a),d=c.entity,u=c.id,p=c.color,m=c.label,h=c.selection;return{__typename:null!==(n=null===d||void 0===d?void 0:d.__typename)&&void 0!==n?n:"businessEntity"===(null===h||void 0===h?void 0:h.kind)?"BusinessEntity":void 0,id:u,value:i,color:null!==p&&void 0!==p?p:t[o%t.length],label:m,formattedValue:(0,N.vv)(i),percent:l,isPositive:r.summary.sum>0&&s===z.wNk.EXPENSE,selection:h}}));var o;k&&(0,r.A)(e)&&(e=[...e,{__typename:void 0,id:"everything_else",value:w.total,color:t[e.length%t.length],label:"Everything else",formattedValue:(0,N.vv)(w.total),percent:(null!==(o=w.percent)&&void 0!==o?o:0)<0?void 0:w.percent,isPositive:w.otherGroups.every((e=>e.categoryGroupType===z.wNk.EXPENSE))&&w.total<0,onClick:()=>null===h||void 0===h?void 0:h(!p)}]);return e.filter((e=>!(0,l.A)(e)&&(0!==e.value||!(0,l.A)(e.percent)&&0!==e.percent)))}),[o,t,g,w,p,h]),I=(0,s.useCallback)((e=>e.id&&e.__typename?null===d||void 0===d?void 0:d(e.id,e.__typename):void 0),[d]),S=(0,s.useCallback)((e=>{const t=_.find((t=>t.id===e));i(e,null===t||void 0===t?void 0:t.selection)}),[_,i]),P=(0,s.useCallback)((()=>{if(!h||!p&&!k||f)return null;const e=_[0].__typename;return s.createElement(V,{onClick:()=>null===h||void 0===h?void 0:h(!p),$allowSticky:!!p},s.createElement("span",null,p?"Show top ".concat(C.qu," ").concat(x(e,C.qu)):"Show all ".concat(x(e,0))),s.createElement(W,{name:p?"chevron-up":"chevron-down"}))}),[p,k,_,f,h]),O=(0,s.useCallback)((e=>{let t=e.isPositive,o=e.__typename;if(!t||!o||!["Category","CategoryGroup"].includes(o))return;return"".concat("Category"===o?"This category had more inflows than outflows.":"One of the categories in this group had more inflows than outflows."," It is possible that you had a refund, mis-categorized income, or another inflow.")}),[]),$=(0,s.useCallback)((e=>{let t=e.value;return e.isPositive&&s.createElement(u.v,{color:"green"},(0,A.s_)(t))}),[]);return s.createElement(R,{"data-external-id":"reports-pie-chart",$allowSticky:!!p},s.createElement(m.el,Object.assign({data:_,pieChartSize:"100%",selectedDatumId:c,onClickDatum:S,formatEntityUrl:d?I:void 0,tooltip:b,shouldShowSegment:e=>!e.isPositive,renderItemTooltip:O,renderCustomValue:$,renderLegendFooter:P},v)))},R=c.default.div.withConfig({displayName:"ReportsPieChart__Root",componentId:"a4nd0f-0"})(["[data-sc-tw~='PieChartWithLegend__PieContainer']{align-self:flex-start;position:",";top:",";width:50%;max-width:480px;max-height:480px;","{height:","px;width:","px;}}"],(e=>e.$allowSticky?"sticky":"relative"),(e=>{let t=e.$allowSticky,o=e.theme;return t?o.spacing.gutter:"auto"}),P.J.sm,m.OI,m.OI),V=(0,c.default)(d.g).attrs({center:!0}).withConfig({displayName:"ReportsPieChart__Footer",componentId:"a4nd0f-1"})(["backdrop-filter:blur(4px);background:",";bottom:0;color:",";cursor:pointer;font-size:",";font-weight:",";margin-top:",";padding:",";position:",";transition:",";user-select:none;&:hover,&:active,&:focus{color:",";}"],(e=>{let t=e.theme;return(0,i.B3)(t.color.white,.8)}),S.yW.blue,S.J.small,S.Wy.medium,S.YK.default,S.YK.default,(e=>e.$allowSticky?"sticky":"relative"),S.kY.fast,S.yW.blueDark),W=(0,c.default)(p.r).attrs({size:14}).withConfig({displayName:"ReportsPieChart__ChevronIcon",componentId:"a4nd0f-2"})(["transform:translateY(1px);"])}}]);
2//# sourceMappingURL=4784.9fc0825e.chunk.js.map

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.