PageSourceSearch

https://platform.blackwoodseven.com/assets/index-BEM_m05h.js

js blackwoodseven.com collected 2026-10-04 05:23:08 UTC 7,208 bytes, 2 lines download raw bytes

1import{M as E,a as N,j as l,b8 as V,q as X,s as q,r as Q,e as x,bg as Z,bh as J,f as ee,b9 as te,u as se,bi as ae,bd as L,bj as U,bk as oe,bl as ie,bm as ne}from"./index-BsB7HIV2.js";import{r as C,a as $}from"./vendor-pzayoL5T.js";import{e as O,k as le,u as M}from"./redux-CSIyppIs.js";import{b as re,c as ce,u as j,f as de,a as ue,O as fe,E as be}from"./useEffectiveStackRelations-CNQ4VVke.js";import{T as me,S as pe}from"./index-CX6naElh.js";import{R as ge,Q as H,B as he,H as w}from"./collapse-Ch5dwlgW.js";import{u as A}from"./useControllableLongPollingJobs-5OGGNksd.js";import{L as Se}from"./mui-BIzjK2H4.js";import{u as ve,g as Ie,a as ke,v as _e,d as De}from"./getStackRelationTitleSuffix-utGzo3IV.js";import"./index-DyzRkYa3.js";import"./index-B5_crkTH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"jupiter-frontend--20260924T085157Z--7f0b2cf"};var r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="934d1559-9944-4471-a1ec-67b44abb412d",e._sentryDebugIdIdentifier="sentry-dbid-934d1559-9944-4471-a1ec-67b44abb412d")}catch{}})();function Ce({modelHandle:e,period:r,vsPeriod:c,groupBy:s,filter:d,url:b}){const m={groupBy:s,...Q(d??{})},{data:D,loading:I}=x.useData(`${b}/${e}/decomposition`,{...m,startDate:r[0],endDate:r[1]},{dedupingInterval:240*1e3}),{data:S,loading:p}=x.useData(`${b}/${e}/decomposition`,{...m,startDate:c[0],endDate:c[1]},{dedupingInterval:240*1e3}),a={};return(D||[]).forEach(u=>{const v=u[s]??"__drivers_not_available__";a[v]={...a[v]||{},value:u.observed_effect_value}}),(S||[]).forEach(u=>{const v=u[s]??"__drivers_not_available__";a[v]={...a[v]||{},vsValue:u.observed_effect_value}}),{data:Object.keys(a).map(u=>({id:u,...a[u]})),loading:I||p}}function Ee({period:e,filter:r,groupByDimension:c,vsPeriod:s,url:d,caller:b}){const m=E.useSelectedModel(),{objectiveUnitName:D,driverCustom:I,modelHandle:S}=m,p=re(b,I,c),a=A(m,p),u=ge(),v=O(),B=ce(r,b),{data:y,loading:T}=Ce({modelHandle:S,period:e,vsPeriod:s,groupBy:c,filter:B,url:d}),{total:g,vsTotal:k}=y.reduce((o,n)=>({total:o.total+n.value,vsTotal:o.vsTotal+n.vsValue}),{total:0,vsTotal:0}),P=o=>{let n={...r,[c]:[o]};v(Z(n,I))};return N(H,{header:[g,k].every(Number.isFinite)?`${q(Math.abs(g-k))} ${g-k>0?"more":"less"} ${D.toLowerCase()}`:"Comparison",legend:`compared to comparison period (${X(s,{resolveFullPeriods:!0})})`,children:[T&&l(Se,{}),l("div",{style:{position:"relative",opacity:T?.2:1},children:l(me,{period:e,vsPeriod:s,data:y.map(({id:o,value:n,vsValue:_})=>{const i=o==="__drivers_not_available__"?null:()=>P(o);return{id:o,label:V(a,o,c),color:u(o),delta:n!==void 0&&_!==void 0?n-_:n,value:n,vsValue:_,valueCurrent:n,valuePrevious:_,onClick:i}}),showPaidMediaSplit:!1})})]})}function ye({url:e,startDate:r,endDate:c,metrics:s}){const{data:d,loading:b}=x.useData(e,{startDate:r,endDate:c,metrics:s});return{data:d,loading:b}}function Te({stateStackRelations:e,filter:r,url:c,startDate:s,endDate:d,metrics:b=he,objectiveUnitName:m,stackSuffix:D}){const I=E.useSelectedModel(),{labels:S}=E.useStackModelMetaData(),p=O(),a=A(I),{data:u}=ye({url:c,startDate:s,endDate:d,metrics:b}),v=C.useMemo(()=>u?.[0]?.[b]??0,[u,b]),{data:B=[],loading:y,isRefreshing:T}=ve({url:c,startDate:s,endDate:d,filter:r,stateStackRelations:e,labelDictionary:a,totalLabel:S.total,getTooltipData:i=>Ie({item:i,totalValue:v,objectiveUnitName:m.toLowerCase()})}),g=j({stackRelationsFromStore:e}),k=C.useCallback((i,f)=>{const h=i==="total"?g.map(R=>({...R,isSelected:!0})):de(g,i,String(f));p(J({stackRelations:h}))},[g,p]),P=C.useCallback(i=>{const{dimensionKey:f,dimensionValue:h}=i?.meta??{};!f||f==="total"||h==null||k(f,h)},[k]),o=C.useCallback(i=>{const{dimensionKey:f,dimensionValue:h}=i?.meta??{};!f||h==null||k(f,h)},[k]),n=C.useMemo(()=>ke(g,S)??[],[g,S]),_=C.useCallback((i,f)=>V(a,i,f),[a]);return l(H,{header:`Business-driven ${m.toLowerCase()} - ${D}`,dataTestId:"biIcicleChartSection",styles:{container:{paddingBottom:"10px"}},startCollapsed:!1,children:N(ee,{children:[l(te,{breadcrumbs:[...n].map((i,f)=>{const h=_(i.meta.dimensionValue,i.meta.dimensionKey);return{label:h,onClick:f<n.length-1?()=>o(i):void 0,tooltip:f<n.length-1?`Return to ${h.toLowerCase()} view`:void 0}}),styles:{container:{textTransform:"none",marginBottom:"5px"}}}),l("div",{children:l(_e,{data:B,onNodeClick:P,dataTestId:"business-insights-icicle-chart",emptyStateMessage:"No icicle chart data",config:{zoom:{enabled:!1}},options:{chart:{backgroundColor:"transparent"}},isLoading:y,isRefreshing:T})})]})})}function Pe({businessInsightsPlusSelectPeriod:e}){const r=E.useSelectedModel(),c=O(),s=M(t=>t.businessInsightsPlus.filter),d=M(t=>t.businessInsightsPlus.period),b=M(t=>t.businessInsightsPlus.vsPeriod),m=M(t=>t.businessInsightsPlus.stackRelations),D=m.filter(t=>t.isSelected).length===0,I=ue(m),S=M(t=>t.businessInsightsPlus.groupByDimension),{weekly:p,weekStart:a,driverCustom:u,businessInsights__minInterval:v,objectiveUnitName:B}=r,y=A(r),T=E.useModelDateRanges("decomposition"),{modellingEndDate:g}=T,k=E.useHasStackModelData(),{isFeatureAvailable:P}=se(),o=k&&P("stackedModels"),n=!o,_=$.useMemo(()=>ae({weekly:p,weekStart:a,lastDateInPeriod:g}),[g,a,p]);$.useEffect(()=>{e(_,p,a)},[e,_,p,a]);const{stackParticipants:i,stackRelations:f,labels:h}=E.useStackModelMetaData(),R=j({stackRelationsFromStore:m}),G=C.useMemo(()=>R.filter(t=>t.isSelected),[R]),F=De({stackRelations:R.length>0?R:f,visibleStackRelations:G,stackParticipants:i,labelDictionary:y,labels:h});if(!d)return null;if(!u)return l("div",{style:{marginTop:180,textAlign:"center",fontSize:"1.2em"},children:"Business Groupings are not configured for this model."});const K=t=>{c({type:"BUSINESS_INSIGHTS_PLUS_GROUPBY_UPDATE",groupByDimension:t})},Y=(t,W)=>{c({type:"BUSINESS_INSIGHTS_PLUS_FILTER_UPDATE",filter:t,driverCustom:W})},z=t=>{e(t,p,a)};return N("div",{"data-test-id":"businessInsightsPlus",children:[l(pe,{defaultPeriod:_,stackSuffix:F,showComparisonPeriod:n}),o&&P("BIIcicleChart")&&l(L,{fallbackTitle:"Business Insights Icicle Chart",children:l(Te,{stateStackRelations:m,filter:{...I,...s},url:w+"/"+r.modelHandle+"/decomposition",startDate:d[0],endDate:d[1],objectiveUnitName:B,stackSuffix:F.label})}),l(L,{fallbackTitle:"Business Insights Decomposition",children:l(fe,{filter:{...I,...s},groupByDimension:S,updateGroupBy:K,period:d,updateFilter:Y,url:w,caller:U.BusinessInsights,isStackModelAvailable:o,stackSuffix:F.label})}),l(L,{fallbackTitle:"Business Insights Evolution Over Time",children:l(be,{filter:{...I,...s},groupByDimension:S,period:d,selectPeriod:z,vsPeriod:b,minInterval:v,url:w,excelUrl:oe,caller:U.BusinessInsights,isStackModelAvailable:o,stackSuffix:F.label,isFilterEmpty:Object.keys(s).length===0&&D,showComparisonPeriod:n})}),!o&&l(L,{fallbackTitle:"Business Insights Comparison Mode",children:l(Ee,{filter:s,groupByDimension:S,period:d,vsPeriod:b,url:w,
1caller:U.BusinessInsights})})]})}const $e=le(e=>({period:e.businessInsightsPlus.period}),{businessInsightsPlusSelectPeriod:ne,businessInsightsPlusSelectVsPeriod:ie})(Pe);export{$e as default};
2//# sourceMappingURL=index-BEM_m05h.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.