@zeniai/web-components 4.4.1-beta0MM → 4.4.1-beta0ND
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SessionTimeoutPopup-Bf7n3N95.cjs → SessionTimeoutPopup-BC3xgHC7.cjs} +804 -943
- package/dist/SessionTimeoutPopup-BC3xgHC7.cjs.map +4 -0
- package/dist/{SessionTimeoutPopup-DRlXjiB_.js → SessionTimeoutPopup-DEw_zv_G.js} +1318 -1448
- package/dist/SessionTimeoutPopup-DEw_zv_G.js.map +4 -0
- package/dist/appLocale.d.ts +2 -68
- package/dist/cockpit.cjs.js +151 -151
- package/dist/cockpit.cjs.js.map +1 -1
- package/dist/cockpit.esm.js +2096 -2096
- package/dist/cockpit.esm.js.map +1 -1
- package/dist/components/common/Footer.d.ts +0 -1
- package/dist/components/expenseAutomation/ExpenseAutomationPage.d.ts +7 -1
- package/dist/components/expenseAutomation/components/navbarHeaderData.d.ts +4 -3
- package/dist/components/expenseAutomation/sections/actualMatching/ActualMatchingKpiStrip.d.ts +3 -2
- package/dist/components/expenseAutomation/sections/actualMatching/ActualMatchingList.d.ts +3 -6
- package/dist/components/expenseAutomation/sections/actualMatching/ActualMatchingListRow.d.ts +2 -5
- package/dist/components/expenseAutomation/sections/actualMatching/ActualMatchingMatchDetailPage.d.ts +4 -18
- package/dist/components/expenseAutomation/sections/actualMatching/ActualMatchingPage.d.ts +3 -2
- package/dist/components/expenseAutomation/sections/actualMatching/actualMatchingHelpers.d.ts +23 -12
- package/dist/components/expenseAutomation/sections/actualMatching/actualMatchingListConfig.d.ts +1 -1
- package/dist/components/expenseAutomation/sections/actualMatching/actualMatchingMatchDetailHelpers.d.ts +1 -6
- package/dist/components/expenseAutomation/sections/actualMatching/actualMatchingTypes.d.ts +22 -15
- package/dist/components/expenseAutomation/sections/actualMatching/matchNewPreviewHelpers.d.ts +0 -9
- package/dist/components/expenseAutomation/sections/jeSchedules/JESchedulePage.d.ts +1 -1
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualFeedbackDialog.d.ts +2 -3
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEScheduleNewEntryButton.d.ts +1 -7
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleGroupList.d.ts +2 -2
- package/dist/components/expenseAutomation/sections/jeSchedules/list/jeScheduleListItems.d.ts +36 -14
- package/dist/context/featureProvider/DynamicConfigNameConstants.d.ts +3 -1
- package/dist/context/featureProvider/isActualMatchingEnabledInAgentJeConfig.d.ts +18 -0
- package/dist/context/featureProvider/isActualMatchingEnabledInAgentJeConfig.test.d.ts +1 -0
- package/dist/context/featureProvider/useActualMatchingEnabled.d.ts +6 -0
- package/dist/{index-DSE5Jeq7.cjs → index-BEgjuI-O.cjs} +2 -2
- package/dist/{index-DSE5Jeq7.cjs.map → index-BEgjuI-O.cjs.map} +1 -1
- package/dist/{index-BuvE_Eyo.js → index-CMHWaaKm.js} +2 -2
- package/dist/{index-BuvE_Eyo.js.map → index-CMHWaaKm.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +1 -1
- package/dist/strings/strings.d.ts +2 -68
- package/package.json +1 -64
- package/dist/SessionTimeoutPopup-Bf7n3N95.cjs.map +0 -4
- package/dist/SessionTimeoutPopup-DRlXjiB_.js.map +0 -4
- package/dist/components/expenseAutomation/sections/actualMatching/ActualMatchingStatusFilterBar.d.ts +0 -9
- package/dist/components/expenseAutomation/sections/actualMatching/matchNewPreviewJeColumns.d.ts +0 -9
package/dist/cockpit.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./SessionTimeoutPopup-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./SessionTimeoutPopup-BC3xgHC7.cjs"),t=require("react"),o=require("@emotion/styled"),n=require("@liveblocks/react"),r=require("@zeniai/client-epic-state"),i=require("@liveblocks/react-ui"),s=require("@emotion/react"),a=require("react-dom"),l=require("@liveblocks/react-ui/primitives"),d=require("@liveblocks/react/suspense");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const p=c(t);const u=({inboxNotification:t,onNotificationClick:o})=>{const r=n.useInboxNotificationThread(t.id),s=r.metadata.entityType.split("."),a=r.metadata.isGlobalComment&&2===s.length;return e.jsxRuntimeExports.jsx(m,{isClickable:a,isUnRead:null==t.readAt,onClick:()=>{o(r.metadata,r.id)},children:e.jsxRuntimeExports.jsx(i.InboxNotification,{inboxNotification:t,kinds:{thread:t=>e.jsxRuntimeExports.jsx(i.InboxNotification.Thread,{...t,showRoomName:!0})}})})},m=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
cursor: ${e=>e.isClickable?"pointer":"initial"};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
&:hover {
|
|
15
15
|
border: 1px solid ${e=>e.theme.colors.grey1};
|
|
16
16
|
}
|
|
17
|
-
`,{common:{headers:{notifications:x}},commentsAndNotifications:{notifications:{texts:h}},timeFormat:{hmmADashDDMMMCommaYYYY:g}}=e.appLocale.getLocalizedStrings(),y=o=>{const{inboxNotifications:i,isLoading:s,isFetchingMore:a,hasFetchedAll:l,fetchMore:d}=n.useInboxNotifications();t.useEffect(()=>{const e=setTimeout(()=>d?.(),0);return()=>clearTimeout(e)});const c=s||!0===a||!0!==l,p=n.useMarkInboxNotificationAsRead(),[m,y]=t.useState(!1),{isDrawerOpen:P,application:D,onNotificationClick:A,onCloseAllInboxNotificationsDrawer:L}=o,O=t.useMemo(()=>{if(!i)return[];const e=[...i];return e.sort((e,t)=>{const o=r.zeniDate(e.notifiedAt.toDateString(),g),n=r.zeniDate(t.notifiedAt.toDateString(),g);return o.isSame(n,"day")?0:o.isSameOrBefore(n,"day")?-1:1}),e.filter(e=>!0===e.roomId?.includes(D)&&"thread"===e.kind)},[D,i]),M=t.useCallback(()=>{y(!0);const e=O.filter(e=>null==e.readAt);0===e.length?y(!1):e.forEach((t,o)=>{p(t.id),o===e.length-1&&setTimeout(()=>{y(!1)},1e3)})},[p,O]);return e.jsxRuntimeExports.jsx(e.Drawer,{anchor:"right",open:P,style:{display:"flex",justifyContent:"space-between"},onClose:L,transitionDuration:250,children:e.jsxRuntimeExports.jsx(S,{children:e.jsxRuntimeExports.jsxs(C,{children:[e.jsxRuntimeExports.jsxs(w,{children:[e.jsxRuntimeExports.jsx(
|
|
17
|
+
`,{common:{headers:{notifications:x}},commentsAndNotifications:{notifications:{texts:h}},timeFormat:{hmmADashDDMMMCommaYYYY:g}}=e.appLocale.getLocalizedStrings(),y=o=>{const{inboxNotifications:i,isLoading:s,isFetchingMore:a,hasFetchedAll:l,fetchMore:d}=n.useInboxNotifications();t.useEffect(()=>{const e=setTimeout(()=>d?.(),0);return()=>clearTimeout(e)});const c=s||!0===a||!0!==l,p=n.useMarkInboxNotificationAsRead(),[m,y]=t.useState(!1),{isDrawerOpen:P,application:D,onNotificationClick:A,onCloseAllInboxNotificationsDrawer:L}=o,O=t.useMemo(()=>{if(!i)return[];const e=[...i];return e.sort((e,t)=>{const o=r.zeniDate(e.notifiedAt.toDateString(),g),n=r.zeniDate(t.notifiedAt.toDateString(),g);return o.isSame(n,"day")?0:o.isSameOrBefore(n,"day")?-1:1}),e.filter(e=>!0===e.roomId?.includes(D)&&"thread"===e.kind)},[D,i]),M=t.useCallback(()=>{y(!0);const e=O.filter(e=>null==e.readAt);0===e.length?y(!1):e.forEach((t,o)=>{p(t.id),o===e.length-1&&setTimeout(()=>{y(!1)},1e3)})},[p,O]);return e.jsxRuntimeExports.jsx(e.Drawer,{anchor:"right",open:P,style:{display:"flex",justifyContent:"space-between"},onClose:L,transitionDuration:250,children:e.jsxRuntimeExports.jsx(S,{children:e.jsxRuntimeExports.jsxs(C,{children:[e.jsxRuntimeExports.jsxs(w,{children:[e.jsxRuntimeExports.jsx(v,{}),e.jsxRuntimeExports.jsx(k,{onClick:L,children:e.jsxRuntimeExports.jsx(T,{})})]}),e.jsxRuntimeExports.jsxs(f,{children:[e.jsxRuntimeExports.jsxs(E,{children:[e.jsxRuntimeExports.jsx($,{children:x}),e.jsxRuntimeExports.jsx(b,{variant:"ghost",size:"small",label:h.markAllAsRead,onClick:M,prefixIcon:c||m?e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Small",start:!0}):e.jsxRuntimeExports.jsx(j,{className:"mark-as-read"}),disabled:c||m,textStyle:{...e.textStyles.standardRegular.cssObject},style:{borderRadius:e.Space.sp1,border:"none",backgroundColor:"transparent",flexShrink:0,padding:e.Space.sp0,cursor:c||m?"default":"pointer"}})]}),!0===s?e.jsxRuntimeExports.jsx(I,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Standard",style:{color:"inherit"},start:!0})}):e.jsxRuntimeExports.jsx(R,{children:O.map(t=>e.jsxRuntimeExports.jsx(u,{inboxNotification:t,onNotificationClick:(e,t)=>A(e,t)},t.id))})]})]})})})},S=o.div`
|
|
18
18
|
height: 100%; // Drawer header height
|
|
19
19
|
`,C=o.div`
|
|
20
20
|
width: 400px;
|
|
@@ -85,14 +85,14 @@
|
|
|
85
85
|
justify-content: space-between;
|
|
86
86
|
gap: ${e.Space.sp3};
|
|
87
87
|
padding: ${e.Space.sp3} ${e.Space.sp4};
|
|
88
|
-
`,
|
|
88
|
+
`,E=o.div`
|
|
89
89
|
display: flex;
|
|
90
90
|
align-items: center;
|
|
91
91
|
justify-content: space-between;
|
|
92
92
|
background-color: inherit;
|
|
93
93
|
padding: ${e.Space.sp0};
|
|
94
94
|
margin: ${e.Space.sp0} ${e.Space.sp4} ${e.Space.sp4} ${e.Space.sp4};
|
|
95
|
-
`,
|
|
95
|
+
`,v=o.div`
|
|
96
96
|
width: ${e.Space.sp3};
|
|
97
97
|
height: ${e.Space.sp3};
|
|
98
98
|
`,$=o(e.H5Regular)`
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
display: flex;
|
|
165
165
|
gap: ${e.Space.sp5};
|
|
166
166
|
align-items: center;
|
|
167
|
-
`,
|
|
167
|
+
`,Ee=o.div`
|
|
168
168
|
display: flex;
|
|
169
169
|
align-items: center;
|
|
170
170
|
justify-content: center;
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
color: ${e=>e.theme.colors.primary};
|
|
179
179
|
background-color: ${e=>e.theme.colors.grey3};
|
|
180
180
|
}
|
|
181
|
-
`,
|
|
181
|
+
`,ve=o(e.SvgComment)`
|
|
182
182
|
display: flex;
|
|
183
183
|
width: ${e.Space.sp3};
|
|
184
184
|
height: ${e.Space.sp3};
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
height: ${e.Space.sp3};
|
|
191
191
|
align-items: center;
|
|
192
192
|
justify-content: center;
|
|
193
|
-
`,ke=o.div``;const Te=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant","creditAgent"],Ie=e=>r.stringToUnion(e,Te),{cockpit:{filters:{filterCategories:Pe}},common:{oauthConsent:{company:De},texts:{controller:Ae,csManager:Le,preparer:Oe,reviewer:Me,apAnalyst:Ne,taxLead:ze,plans:Fe,group:Ve,taxStatus:Be,arr:_e,mrr:He,productVerticals:We,cashBalance:Ue,netIncome:Ge,expensesOpexCogs:qe,revenues:Ke,runway:Ye,upgradeStatus:Ze,addons:Xe,planLowerLimit:Qe,planHigherLimit:Je,status:et,priority:tt,assignee:ot,tag:nt,dueDate:rt,createdAt:it,churnProbability:st,nps:at,csat:lt,lastReportSent:dt,renewalDate:ct,subscriptionDate:pt,externalServicesExposure:ut,lastUpdated:mt}}}=e.appLocale.getLocalizedStrings(),xt=e=>{switch(e){case"management":return B;case"subscription":return _;case"portfolio":return H;case"healthMonitor":return W;case"aiAccountant":return ce;case"taskManager":return pe;default:return[]}},ht={...Pe.management,controllerUserIds:Ae,customerSuccessManagerUserIds:Le,preparerUserIds:Oe,reviewerUserIds:Me,apAnalystUserIds:Ne,taxLeadUserIds:ze,plans:Fe,companyGroupId:Ve,taxStatusCode:Be,annualRecurringRevenue:_e,monthlyRecurringRevenue:He,productVerticals:We},gt={cashPosition:Ue,netBurnOrIncome:Ge,expenses:qe,income:Ke,runway:Ye},yt={...Pe.subscription,controllerUserIds:Ae,recommendedActionCode:Ze,monthlyRecurringRevenue:He,subscriptionPlans:Fe,subscriptionAddOns:Xe,slabLowerLimit:Qe,slabUpperLimit:Je},St={company_id:De,status:et,priority:tt,assignees:ot,tag:nt,dueDate:rt,creationDate:it},Ct={controller:Ae,customerSuccessManager:Le,churnProbabilityPercentage:st,runway:Ye,netPromoterScore:at,customerSatisfactionScore:lt,lastReportSent:dt,subscriptionRenewalDate:ct,subscriptionStartDate:pt,verticalProductServices:We,monthlyRecurringRevenue:He,companyGroupId:Ve,externalProductServiceExposure:ut,companyEngagementMetricsUpdatedAt:mt},ft=(e,t)=>{switch(e){case"management":return ht[t];case"portfolio":return gt[t];case"subscription":return yt[t];case"aiAccountant":return Pe.aiAccountant[t];case"taskManager":return St[t];default:return Ct[t]}},bt="product_enable_access",jt="realm_id_management_access";function Rt(t){const{useDynamicConfig:o}=e.useZeniFeatureContext(),{configValue:n}=o(e.DynamicConfigNames.cockpitControlsConfig),r=e.useGlobalInfoContext().loggedInUser?.userEmail;if(null==n||null==r)return!1;const i=n[t],s=r.trim().toLowerCase();return Array.isArray(i)&&i.some(e=>"string"==typeof e&&e.trim().toLowerCase()===s)}function wt(){return Rt(bt)}const{common:{texts:{category:
|
|
193
|
+
`,ke=o.div``;const Te=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant","creditAgent"],Ie=e=>r.stringToUnion(e,Te),{cockpit:{filters:{filterCategories:Pe}},common:{oauthConsent:{company:De},texts:{controller:Ae,csManager:Le,preparer:Oe,reviewer:Me,apAnalyst:Ne,taxLead:ze,plans:Fe,group:Ve,taxStatus:Be,arr:_e,mrr:He,productVerticals:We,cashBalance:Ue,netIncome:Ge,expensesOpexCogs:qe,revenues:Ke,runway:Ye,upgradeStatus:Ze,addons:Xe,planLowerLimit:Qe,planHigherLimit:Je,status:et,priority:tt,assignee:ot,tag:nt,dueDate:rt,createdAt:it,churnProbability:st,nps:at,csat:lt,lastReportSent:dt,renewalDate:ct,subscriptionDate:pt,externalServicesExposure:ut,lastUpdated:mt}}}=e.appLocale.getLocalizedStrings(),xt=e=>{switch(e){case"management":return B;case"subscription":return _;case"portfolio":return H;case"healthMonitor":return W;case"aiAccountant":return ce;case"taskManager":return pe;default:return[]}},ht={...Pe.management,controllerUserIds:Ae,customerSuccessManagerUserIds:Le,preparerUserIds:Oe,reviewerUserIds:Me,apAnalystUserIds:Ne,taxLeadUserIds:ze,plans:Fe,companyGroupId:Ve,taxStatusCode:Be,annualRecurringRevenue:_e,monthlyRecurringRevenue:He,productVerticals:We},gt={cashPosition:Ue,netBurnOrIncome:Ge,expenses:qe,income:Ke,runway:Ye},yt={...Pe.subscription,controllerUserIds:Ae,recommendedActionCode:Ze,monthlyRecurringRevenue:He,subscriptionPlans:Fe,subscriptionAddOns:Xe,slabLowerLimit:Qe,slabUpperLimit:Je},St={company_id:De,status:et,priority:tt,assignees:ot,tag:nt,dueDate:rt,creationDate:it},Ct={controller:Ae,customerSuccessManager:Le,churnProbabilityPercentage:st,runway:Ye,netPromoterScore:at,customerSatisfactionScore:lt,lastReportSent:dt,subscriptionRenewalDate:ct,subscriptionStartDate:pt,verticalProductServices:We,monthlyRecurringRevenue:He,companyGroupId:Ve,externalProductServiceExposure:ut,companyEngagementMetricsUpdatedAt:mt},ft=(e,t)=>{switch(e){case"management":return ht[t];case"portfolio":return gt[t];case"subscription":return yt[t];case"aiAccountant":return Pe.aiAccountant[t];case"taskManager":return St[t];default:return Ct[t]}},bt="product_enable_access",jt="realm_id_management_access";function Rt(t){const{useDynamicConfig:o}=e.useZeniFeatureContext(),{configValue:n}=o(e.DynamicConfigNames.cockpitControlsConfig),r=e.useGlobalInfoContext().loggedInUser?.userEmail;if(null==n||null==r)return!1;const i=n[t],s=r.trim().toLowerCase();return Array.isArray(i)&&i.some(e=>"string"==typeof e&&e.trim().toLowerCase()===s)}function wt(){return Rt(bt)}const{common:{texts:{category:Et}}}=e.appLocale.getLocalizedStrings(),vt=o.div`
|
|
194
194
|
display: flex;
|
|
195
195
|
justify-content: space-between;
|
|
196
196
|
align-items: center;
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
color: ${e=>e.theme.colors.primary};
|
|
199
199
|
width: ${e.Space.sp4};
|
|
200
200
|
height: ${e.Space.sp4};
|
|
201
|
-
`,kt=({onChange:o,value:n,categoryIndex:r,defaultMenuIsOpen:i=!1,selectedCockpitOption:s})=>{const a=e.useTheme(),l=t.useRef(null),d=e.getDropdownStyles(a),c=wt(),p=xt(s).filter(e=>"productVerticals"!==e.value||c),u=p.find(e=>e.value===n);t.useEffect(()=>{const e=setTimeout(()=>{null!=l.current&&i&&l.current.focus()},300);return()=>{clearTimeout(e)}},[i]);return e.jsxRuntimeExports.jsx(Tt,{"data-testid":e.generateDataTestId("cockpit-filters-category-select"),children:e.jsxRuntimeExports.jsx(e.StateManagedSelect$1,{ref:l,isMulti:!1,value:u,onChange:e=>{o(e,r)},placeholder:
|
|
201
|
+
`,kt=({onChange:o,value:n,categoryIndex:r,defaultMenuIsOpen:i=!1,selectedCockpitOption:s})=>{const a=e.useTheme(),l=t.useRef(null),d=e.getDropdownStyles(a),c=wt(),p=xt(s).filter(e=>"productVerticals"!==e.value||c),u=p.find(e=>e.value===n);t.useEffect(()=>{const e=setTimeout(()=>{null!=l.current&&i&&l.current.focus()},300);return()=>{clearTimeout(e)}},[i]);return e.jsxRuntimeExports.jsx(Tt,{"data-testid":e.generateDataTestId("cockpit-filters-category-select"),children:e.jsxRuntimeExports.jsx(e.StateManagedSelect$1,{ref:l,isMulti:!1,value:u,onChange:e=>{o(e,r)},placeholder:Et,options:p,styles:d,menuPosition:"fixed",openMenuOnFocus:!0,components:{Option:t=>{const{isSelected:o}=t,n=ft(s,t.data.value);return e.jsxRuntimeExports.jsx(e.components.Option,{...t,children:e.jsxRuntimeExports.jsxs(vt,{"data-testid":e.generateDataTestId("cockpit-filters-category-option","string"==typeof t.data.value?t.data.value:t.data.value?.code??t.data.value?.id??t.label),children:[e.jsxRuntimeExports.jsx(e.StandardRegular,{children:n}),o&&e.jsxRuntimeExports.jsx($t,{})]})})},SingleValue:t=>{const o=ft(s,t.data.value);return e.jsxRuntimeExports.jsx(e.components.SingleValue,{...t,children:e.jsxRuntimeExports.jsx(e.StandardRegularSp,{children:o})})}}})})},Tt=o.div``,{spendManagement:{filters:It},common:{texts:{from:Pt,to:Dt}}}=e.appLocale.getLocalizedStrings(),At=({selectedRanges:o,options:n,onNumericRangeChange:r})=>{const i=e.useWindowSizeContext(),s=e.useTheme(),a=o.start,l=o.end,[d,c]=t.useState(a),[p,u]=t.useState(l),[m,x]=t.useState(n);t.useEffect(()=>{null!=d&&null!=p&&(r({start:d,end:p}),d>p&&u(d)),x(null!=d?n.filter(e=>e>=d):n)},[d,p]);return e.jsxRuntimeExports.jsxs(Lt,{size:i,children:[e.jsxRuntimeExports.jsx(Ot,{children:e.jsxRuntimeExports.jsx(e.SingleSelectNumeric,{onSelectedValueChanged:e=>{c(e)},placeholder:Pt,defaultValue:{allOptions:n,selectedOption:d},hasError:!1,customStyleConfig:{input:()=>({input:{textAlign:"left"}}),control:()=>({backgroundColor:s.colors.background})}})}),e.jsxRuntimeExports.jsx(Mt,{children:It.enDash}),e.jsxRuntimeExports.jsx(Ot,{children:e.jsxRuntimeExports.jsx(e.SingleSelectNumeric,{onSelectedValueChanged:e=>{u(e)},placeholder:Dt,defaultValue:{allOptions:m,selectedOption:p},hasError:!1,customStyleConfig:{input:()=>({input:{textAlign:"left"}}),control:()=>({backgroundColor:s.colors.background})}})})]})},Lt=o.div`
|
|
202
202
|
display: flex;
|
|
203
203
|
align-items: center;
|
|
204
204
|
column-gap: ${e.Space.sp3};
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
display: flex;
|
|
327
327
|
align-items: center;
|
|
328
328
|
column-gap: ${e.Space.sp3};
|
|
329
|
-
`,
|
|
329
|
+
`,Eo=o.div`
|
|
330
330
|
width: 315px;
|
|
331
331
|
${e=>"dropdownRange"!==e.categoryType?s.css`
|
|
332
332
|
background: ${e.theme.colors.background};
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
background: none;
|
|
335
335
|
`};
|
|
336
336
|
border-radius: ${e.Space.sp1};
|
|
337
|
-
`,
|
|
337
|
+
`,vo=o.div`
|
|
338
338
|
display: flex;
|
|
339
339
|
align-items: center;
|
|
340
340
|
column-gap: ${e.Space.sp3};
|
|
@@ -350,14 +350,14 @@
|
|
|
350
350
|
align-items: flex-start;
|
|
351
351
|
column-gap: ${e.Space.sp3};
|
|
352
352
|
animation: ${$o} 0.4s;
|
|
353
|
-
`,Io=t.forwardRef(({filters:o,onFiltersChange:n,filterValues:r,selectedCockpitOption:i},s)=>{const a=t.useCallback((t,r)=>{const i=e.getUpdatedFiltersOnCategoryChange({currentFilters:o,selectedOption:t,categoryIndex:r});n(i)},[o,n]),l=t.useCallback((t,r)=>{const i=e.getUpdatedFiltersOnMatchingOperatorChange({currentFilters:o,selectedOption:t,categoryIndex:r});n(i)},[o,n]),d=t.useCallback((e,t)=>{if(null==o.categories)return;const r={...o,categories:o.categories.map((o,n)=>n!=t?o:{...o,valuesCombinationOperator:e.value})};n(r)},[o,n]),c=t.useCallback(e=>{if(null!=o){const t={...o,categoryCombinationOperator:e};n(t)}},[o,n]),p=t.useCallback(e=>{if(0!==e||null==o.categories||1!==o.categories.length){if(null!=o.categories){if([...o.categories.slice(0,e),...o.categories.slice(e+1)].filter(e=>null!=e.field).length){const t={...o,categories:[...o.categories.slice(0,e),...o.categories.slice(e+1)]};return void n(t)}n({})}}else n({})},[n,o]),u=()=>{null!=o.categories&&n({...o,categories:[...o.categories,{...e.NEW_CATEGORY_BODY}]})},m=()=>{n({})},x=t.useCallback((t,r)=>{const i=e.getUpdatedFiltersOnValueChange({currentFilters:o,selectedOptions:t,categoryIndex:r});n(i)},[o,n]);return e.jsxRuntimeExports.jsxs(uo,{ref:s,"data-testid":e.generateDataTestId("cockpit-filters-selection-container"),children:[null==o.categories?e.jsxRuntimeExports.jsx(uo,{"data-testid":e.generateDataTestId("cockpit-filters-empty-state"),children:e.jsxRuntimeExports.jsx(mo,{children:e.jsxRuntimeExports.jsxs(
|
|
353
|
+
`,Io=t.forwardRef(({filters:o,onFiltersChange:n,filterValues:r,selectedCockpitOption:i},s)=>{const a=t.useCallback((t,r)=>{const i=e.getUpdatedFiltersOnCategoryChange({currentFilters:o,selectedOption:t,categoryIndex:r});n(i)},[o,n]),l=t.useCallback((t,r)=>{const i=e.getUpdatedFiltersOnMatchingOperatorChange({currentFilters:o,selectedOption:t,categoryIndex:r});n(i)},[o,n]),d=t.useCallback((e,t)=>{if(null==o.categories)return;const r={...o,categories:o.categories.map((o,n)=>n!=t?o:{...o,valuesCombinationOperator:e.value})};n(r)},[o,n]),c=t.useCallback(e=>{if(null!=o){const t={...o,categoryCombinationOperator:e};n(t)}},[o,n]),p=t.useCallback(e=>{if(0!==e||null==o.categories||1!==o.categories.length){if(null!=o.categories){if([...o.categories.slice(0,e),...o.categories.slice(e+1)].filter(e=>null!=e.field).length){const t={...o,categories:[...o.categories.slice(0,e),...o.categories.slice(e+1)]};return void n(t)}n({})}}else n({})},[n,o]),u=()=>{null!=o.categories&&n({...o,categories:[...o.categories,{...e.NEW_CATEGORY_BODY}]})},m=()=>{n({})},x=t.useCallback((t,r)=>{const i=e.getUpdatedFiltersOnValueChange({currentFilters:o,selectedOptions:t,categoryIndex:r});n(i)},[o,n]);return e.jsxRuntimeExports.jsxs(uo,{ref:s,"data-testid":e.generateDataTestId("cockpit-filters-selection-container"),children:[null==o.categories?e.jsxRuntimeExports.jsx(uo,{"data-testid":e.generateDataTestId("cockpit-filters-empty-state"),children:e.jsxRuntimeExports.jsx(mo,{children:e.jsxRuntimeExports.jsxs(vo,{children:[e.jsxRuntimeExports.jsx(xo,{children:e.jsxRuntimeExports.jsx(bo,{children:po})}),e.jsxRuntimeExports.jsx(ho,{children:e.jsxRuntimeExports.jsx(kt,{defaultMenuIsOpen:!0,onChange:a,selectedCockpitOption:i})})]})})}):e.jsxRuntimeExports.jsx(t.Fragment,{children:o.categories.map((t,n)=>{const s=xt(i).find(e=>e.value===t.field),u=s?.multiple,m=s?.type,h=null!=s?ft(i,s?.value):"",g=t.field??`${n}`;return e.jsxRuntimeExports.jsxs(mo,{"data-testid":e.generateDataTestId("cockpit-filters-row",g),children:[e.jsxRuntimeExports.jsxs(vo,{children:[e.jsxRuntimeExports.jsxs(xo,{children:[0===n&&e.jsxRuntimeExports.jsx(bo,{children:po}),0!==n?e.jsxRuntimeExports.jsx(ko,{"data-testid":e.generateDataTestId("cockpit-filters-combination-operator",g),children:e.jsxRuntimeExports.jsx(e.CombinationOperatorButton,{categoryCombinationOperator:o.categoryCombinationOperator,onChange:c,buttonsDisabled:n>1})}):null]}),e.jsxRuntimeExports.jsx(ho,{"data-testid":e.generateDataTestId("cockpit-filters-category-dropdown",g),children:e.jsxRuntimeExports.jsx(kt,{categoryIndex:n,value:t.field,onChange:a,selectedCockpitOption:i})})]}),t.field&&e.jsxRuntimeExports.jsxs(To,{children:[e.jsxRuntimeExports.jsx(Co,{"data-testid":e.generateDataTestId("cockpit-filters-matching-operator",g),children:e.jsxRuntimeExports.jsx(e.MatchingOperatorDropdown,{categoryIndex:n,value:t.matchingOperator,onChange:l})}),e.jsxRuntimeExports.jsxs(wo,{children:[e.jsxRuntimeExports.jsx(Eo,{categoryType:m,"data-testid":e.generateDataTestId("cockpit-filters-values-dropdown",g),children:e.jsxRuntimeExports.jsx(ro,{options:null!=r[t.field]?r[t.field]:[],value:t.values,categoryIndex:n,categoryType:m,categoryLabel:h,showAnyAll:null!=u&&u,onChange:x,valuesCombinationOperator:t.valuesCombinationOperator,onValuesCombinationOperatorChange:d})}),e.jsxRuntimeExports.jsx(jo,{onClick:()=>p(n),"data-testid":e.generateDataTestId("cockpit-filters-delete-row",g),children:e.jsxRuntimeExports.jsx(Ro,{})})]})]})]},t.field?t.field+n:n)})}),null!=o.categories?e.jsxRuntimeExports.jsxs(fo,{children:[e.jsxRuntimeExports.jsxs(go,{onClick:u,"data-testid":e.generateDataTestId("cockpit-filters-add-button"),children:[e.jsxRuntimeExports.jsx(yo,{}),e.jsxRuntimeExports.jsx(e.StandardRegular,{children:lo})]}),e.jsxRuntimeExports.jsxs(go,{onClick:m,"data-testid":e.generateDataTestId("cockpit-filters-clear-all-button"),children:[e.jsxRuntimeExports.jsx(So,{}),e.jsxRuntimeExports.jsx(e.StandardRegular,{children:co})]})]}):null]})});Io.displayName="FiltersSelection";const{cockpit:{searchplaceholder:Po}}=e.appLocale.getLocalizedStrings(),Do=o.div`
|
|
354
354
|
padding: ${e.Space.sp4};
|
|
355
355
|
box-sizing: border-box;
|
|
356
356
|
height: ${e=>`${"number"==typeof e.height?e.height+"px":e.height}`};
|
|
357
357
|
background: ${e=>e.theme.colors.grey5};
|
|
358
358
|
max-height: 650px;
|
|
359
359
|
overflow: ${e=>e.height>"650"?"scroll":"visible"};
|
|
360
|
-
`,Ao=({selectedCockpitOption:o,filters:n,disableFilters:r=!1,onFiltersChange:i,onSearchTextChanged:s,getCategoryWiseOptions:a,companiesLoaded:l=!0,filterText:d})=>{const c=t.useRef(null),[p,u]=t.useState(!1),m=t.useRef(!1),[x,h]=t.useState({management:{},portfolio:{},subscription:{},onboarding:{},audit:{},healthMonitor:{},taskManager:{},aiAccountant:{},creditAgent:{}}),[g,y]=t.useState(136),S=t.useRef(null),C=e.useWindowSizeContext(),f=t.useCallback(()=>{u(!1)},[]),b=t.useCallback(()=>{!1===r&&u(!0)},[r]);t.useEffect(()=>{a&&0===Object.keys(x[o]).length&&l&&h(e=>({...e,[o]:a()}))},[o,x,l]);const j=t.useCallback(()=>{if(null==n?.categories)return M;const t=S.current,o=null!=t?t.clientHeight:0;return e.sp[7]+(o>0?o:M)},[n]);t.useEffect(()=>{p===m.current?y(j()):y("auto")},[j,p]),t.useEffect(()=>{m.current=p},[p]),t.useEffect(()=>{"auto"===g&&y(j())},[g,j]);const R=null==n?.categories||0===n.categories.length?0:n.categories.filter(e=>null!=e.field&&e.values.length>0).length;return e.jsxRuntimeExports.jsxs(t.Fragment,{children:[e.jsxRuntimeExports.jsx(Lo,{"data-testid":e.generateDataTestId("cockpit-filters-search-box"),children:e.jsxRuntimeExports.jsx(e.SearchBoxWithFilterButton,{isFilterBtnActive:p||R>0,searchPlaceholder:Po,ref:c,isFilterDisabled:r,onSearchTextChanged:s,onFilterButtonClick:b,filtersCount:R,filterText:d})}),1!=r&&e.jsxRuntimeExports.jsx(e.FiltersPopover,{anchorEl:c.current,open:p,onClose:f,paperStyle:{overflow:"visible"},children:e.jsxRuntimeExports.jsx(Do,{height:g,windowSize:C,"data-testid":e.generateDataTestId("cockpit-filters-selection-wrapper"),children:n&&e.jsxRuntimeExports.jsx(Oo,{"data-testid":e.generateDataTestId("cockpit-filters-selection"),children:e.jsxRuntimeExports.jsx(Io,{filters:n,onFiltersChange:i,filterValues:x[o],selectedCockpitOption:o,ref:S})})})},null==n?.categories||0===n.categories.length?"smallBox":"largeBox")]})},Lo=o.div``,Oo=o.div``;function Mo(t){return e.generateUtilityClass("MuiTab",t)}const No=e.generateUtilityClasses("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),zo=e.styled(e.ButtonBase,{name:"MuiTab",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:n}=t;return[o.root,n.label&&n.icon&&o.labelIcon,o[`textColor${e.capitalize(n.textColor)}`],n.fullWidth&&o.fullWidth,n.wrapped&&o.wrapped,{[`& .${No.iconWrapper}`]:o.iconWrapper},{[`& .${No.icon}`]:o.icon}]}})(e.memoTheme(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${No.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${No.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${No.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${No.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${No.selected}`]:{opacity:1},[`&.${No.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${No.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${No.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${No.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${No.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Fo=p.forwardRef(function(t,o){const n=e.useDefaultProps({props:t,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:d="top",indicator:c,label:u,onChange:m,onClick:x,onFocus:h,selected:g,selectionFollowsFocus:y,textColor:S="inherit",value:C,wrapped:f=!1,...b}=n,j={...n,disabled:i,disableFocusRipple:s,selected:g,icon:!!l,iconPosition:d,label:!!u,fullWidth:a,textColor:S,wrapped:f},R=(t=>{const{classes:o,textColor:n,fullWidth:r,wrapped:i,icon:s,label:a,selected:l,disabled:d}=t,c={root:["root",s&&a&&"labelIcon",`textColor${e.capitalize(n)}`,r&&"fullWidth",i&&"wrapped",l&&"selected",d&&"disabled"],icon:["iconWrapper","icon"]};return e.composeClasses(c,Mo,o)})(j),w=l&&u&&p.isValidElement(l)?p.cloneElement(l,{className:e.clsx(R.icon,l.props.className)}):l;return e.jsxRuntimeExports.jsxs(zo,{focusRipple:!s,className:e.clsx(R.root,r),ref:o,role:"tab","aria-selected":g,disabled:i,onClick:e=>{!g&&m&&m(e,C),x&&x(e)},onFocus:e=>{y&&!g&&m&&m(e,C),h&&h(e)},ownerState:j,tabIndex:g?0:-1,...b,children:["top"===d||"start"===d?e.jsxRuntimeExports.jsxs(p.Fragment,{children:[w,u]}):e.jsxRuntimeExports.jsxs(p.Fragment,{children:[u,w]}),c]})});function Vo(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}"production"!==process.env.NODE_ENV&&(Fo.propTypes={children:function(e,t,o,n,r){if("production"===process.env.NODE_ENV)return null;const i=r||t;return void 0!==e[t]?new Error(`The prop \`${i}\` is not supported. Please remove it.`):null},classes:e.PropTypes.object,className:e.PropTypes.string,disabled:e.PropTypes.bool,disableFocusRipple:e.PropTypes.bool,disableRipple:e.PropTypes.bool,icon:e.PropTypes.oneOfType([e.PropTypes.element,e.PropTypes.string]),iconPosition:e.PropTypes.oneOf(["bottom","end","start","top"]),label:e.PropTypes.node,onChange:e.PropTypes.func,onClick:e.PropTypes.func,onFocus:e.PropTypes.func,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),value:e.PropTypes.any,wrapped:e.PropTypes.bool});const Bo={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function _o(t){const{onChange:o,...n}=t,r=p.useRef(),i=p.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return e.useEnhancedEffect(()=>{const t=e.debounce(()=>{const e=r.current;s(),e!==r.current&&o(r.current)}),n=e.ownerWindow(i.current);return n.addEventListener("resize",t),()=>{t.clear(),n.removeEventListener("resize",t)}},[o]),p.useEffect(()=>{s(),o(r.current)},[o]),e.jsxRuntimeExports.jsx("div",{style:Bo,...n,ref:i})}"production"!==process.env.NODE_ENV&&(_o.propTypes={onChange:e.PropTypes.func.isRequired});const Ho=e.createSvgIcon(e.jsxRuntimeExports.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Wo=e.createSvgIcon(e.jsxRuntimeExports.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Uo(t){return e.generateUtilityClass("MuiTabScrollButton",t)}const Go=e.generateUtilityClasses("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),qo=e.styled(e.ButtonBase,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.orientation&&t[o.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Go.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),Ko=p.forwardRef(function(t,o){const n=e.useDefaultProps({props:t,name:"MuiTabScrollButton"}),{className:r,slots:i={},slotProps:s={},direction:a,orientation:l,disabled:d,...c}=n,p=e.useRtl(),u={isRtl:p,...n},m=(t=>{const{classes:o,orientation:n,disabled:r}=t,i={root:["root",n,r&&"disabled"]};return e.composeClasses(i,Uo,o)})(u),x=i.StartScrollButtonIcon??Ho,h=i.EndScrollButtonIcon??Wo,g=e.useSlotProps({elementType:x,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),y=e.useSlotProps({elementType:h,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return e.jsxRuntimeExports.jsx(qo,{component:"div",className:e.clsx(m.root,r),ref:o,role:null,ownerState:u,tabIndex:null,...c,style:{...c.style,..."vertical"===l&&{"--TabScrollButton-svgRotate":`rotate(${p?-90:90}deg)`}},children:"left"===a?e.jsxRuntimeExports.jsx(x,{...g}):e.jsxRuntimeExports.jsx(h,{...y})})});function Yo(t){return e.generateUtilityClass("MuiTabs",t)}"production"!==process.env.NODE_ENV&&(Ko.propTypes={children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,direction:e.PropTypes.oneOf(["left","right"]).isRequired,disabled:e.PropTypes.bool,orientation:e.PropTypes.oneOf(["horizontal","vertical"]).isRequired,slotProps:e.PropTypes.shape({endScrollButtonIcon:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),startScrollButtonIcon:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object])}),slots:e.PropTypes.shape({EndScrollButtonIcon:e.PropTypes.elementType,StartScrollButtonIcon:e.PropTypes.elementType}),style:e.PropTypes.object,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object])});const Zo=e.generateUtilityClasses("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Xo=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Qo=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Jo=(e,t,o)=>{let n=!1,r=o(e,t);for(;r;){if(r===e.firstChild){if(n)return;n=!0}const t=r.disabled||"true"===r.getAttribute("aria-disabled");if(r.hasAttribute("tabindex")&&!t)return void r.focus();r=o(e,r)}},en=e.styled("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{[`& .${Zo.scrollButtons}`]:t.scrollButtons},{[`& .${Zo.scrollButtons}`]:o.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,o.vertical&&t.vertical]}})(e.memoTheme(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Zo.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),tn=e.styled("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.scroller,o.fixed&&t.fixed,o.hideScrollbar&&t.hideScrollbar,o.scrollableX&&t.scrollableX,o.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),on=e.styled("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.list,t.flexContainer,o.vertical&&t.flexContainerVertical,o.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),nn=e.styled("span",{name:"MuiTabs",slot:"Indicator"})(e.memoTheme(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),rn=e.styled(_o)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),sn={};let an=!1;const ln=p.forwardRef(function(t,o){const n=e.useDefaultProps({props:t,name:"MuiTabs"}),r=e.useTheme(),i=e.useRtl(),{"aria-label":s,"aria-labelledby":a,action:l,centered:d=!1,children:c,className:u,component:m="div",allowScrollButtonsMobile:x=!1,indicatorColor:h="primary",onChange:g,orientation:y="horizontal",ScrollButtonComponent:S,scrollButtons:C="auto",selectionFollowsFocus:f,slots:b={},slotProps:j={},TabIndicatorProps:R={},TabScrollButtonProps:w={},textColor:v="primary",value:E,variant:$="standard",visibleScrollbar:k=!1,...T}=n,I="scrollable"===$,P="vertical"===y,D=P?"scrollTop":"scrollLeft",A=P?"top":"left",L=P?"bottom":"right",O=P?"clientHeight":"clientWidth",M=P?"height":"width",N={...n,component:m,allowScrollButtonsMobile:x,indicatorColor:h,orientation:y,vertical:P,scrollButtons:C,textColor:v,variant:$,visibleScrollbar:k,fixed:!I,hideScrollbar:I&&!k,scrollableX:I&&!P,scrollableY:I&&P,centered:d&&!I,scrollButtonsHideMobile:!x},z=(t=>{const{vertical:o,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:a,scrollButtonsHideMobile:l,classes:d}=t,c={root:["root",o&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],list:["list","flexContainer",o&&"flexContainerVertical",o&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return e.composeClasses(c,Yo,d)})(N),F=e.useSlotProps({elementType:b.StartScrollButtonIcon,externalSlotProps:j.startScrollButtonIcon,ownerState:N}),V=e.useSlotProps({elementType:b.EndScrollButtonIcon,externalSlotProps:j.endScrollButtonIcon,ownerState:N});"production"!==process.env.NODE_ENV&&d&&I&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[B,_]=p.useState(!1),[H,W]=p.useState(sn),[U,G]=p.useState(!1),[q,K]=p.useState(!1),[Y,Z]=p.useState(!1),[X,Q]=p.useState({overflow:"hidden",scrollbarWidth:0}),J=new Map,ee=p.useRef(null),te=p.useRef(null),oe={slots:b,slotProps:{indicator:R,scrollButtons:w,...j}},ne=()=>{const t=ee.current;let o,n;if(t){const e=t.getBoundingClientRect();o={clientWidth:t.clientWidth,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,scrollWidth:t.scrollWidth,top:e.top,bottom:e.bottom,left:e.left,right:e.right}}if(t&&!1!==E){const t=te.current.children;if(t.length>0){const r=t[J.get(E)];"production"!==process.env.NODE_ENV&&(r||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${E}".`,J.keys?`You can provide one of the following values: ${Array.from(J.keys()).join(", ")}.`:null].join("\n"))),n=r?r.getBoundingClientRect():null,"production"!==process.env.NODE_ENV&&e.isLayoutSupported()&&!an&&n&&0===n.width&&0===n.height&&0!==o.clientWidth&&(o=null,console.error(["MUI: The `value` provided to the Tabs component is invalid.",`The Tab with this \`value\` ("${E}") is not part of the document layout.`,"Make sure the tab item is present in the document or that it's not `display: none`."].join("\n")),an=!0)}}return{tabsMeta:o,tabMeta:n}},re=e.useEventCallback(()=>{const{tabsMeta:e,tabMeta:t}=ne();let o,n=0;P?(o="top",t&&e&&(n=t.top-e.top+e.scrollTop)):(o=i?"right":"left",t&&e&&(n=(i?-1:1)*(t[o]-e[o]+e.scrollLeft)));const r={[o]:n,[M]:t?t[M]:0};if("number"!=typeof H[o]||"number"!=typeof H[M])W(r);else{const e=Math.abs(H[o]-r[o]),t=Math.abs(H[M]-r[M]);(e>=1||t>=1)&&W(r)}}),ie=(e,{animation:t=!0}={})=>{t?function(e,t,o,n={},r=()=>{}){const{ease:i=Vo,duration:s=300}=n;let a=null;const l=t[e];let d=!1;const c=()=>{d=!0},p=n=>{if(d)return void r(new Error("Animation cancelled"));null===a&&(a=n);const c=Math.min(1,(n-a)/s);t[e]=i(c)*(o-l)+l,c>=1?requestAnimationFrame(()=>{r(null)}):requestAnimationFrame(p)};l===o?r(new Error("Element already at target position")):requestAnimationFrame(p)}(D,ee.current,e,{duration:r.transitions.duration.standard}):ee.current[D]=e},se=e=>{let t=ee.current[D];t+=P?e:e*(i?-1:1),ie(t)},ae=()=>{const e=ee.current[O];let t=0;const o=Array.from(te.current.children);for(let n=0;n<o.length;n+=1){const r=o[n];if(t+r[O]>e){0===n&&(t=e);break}t+=r[O]}return t},le=()=>{se(-1*ae())},de=()=>{se(ae())},[ce,{onChange:pe,...ue}]=e.useSlot("scrollbar",{className:e.clsx(z.scrollableX,z.hideScrollbar),elementType:rn,shouldForwardComponentProp:!0,externalForwardedProps:oe,ownerState:N}),me=p.useCallback(e=>{pe?.(e),Q({overflow:null,scrollbarWidth:e})},[pe]),[xe,he]=e.useSlot("scrollButtons",{className:e.clsx(z.scrollButtons,w.className),elementType:Ko,externalForwardedProps:oe,ownerState:N,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:b.startScrollButtonIcon||b.StartScrollButtonIcon,EndScrollButtonIcon:b.endScrollButtonIcon||b.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:F,endScrollButtonIcon:V}}}),ge=e.useEventCallback(e=>{const{tabsMeta:t,tabMeta:o}=ne();if(o&&t)if(o[A]<t[A]){const n=t[D]+(o[A]-t[A]);ie(n,{animation:e})}else if(o[L]>t[L]){const n=t[D]+(o[L]-t[L]);ie(n,{animation:e})}}),ye=e.useEventCallback(()=>{I&&!1!==C&&Z(!Y)});p.useEffect(()=>{const t=e.debounce(()=>{ee.current&&re()});let o;const n=e=>{e.forEach(e=>{e.removedNodes.forEach(e=>{o?.unobserve(e)}),e.addedNodes.forEach(e=>{o?.observe(e)})}),t(),ye()},r=e.ownerWindow(ee.current);let i;return r.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(t),Array.from(te.current.children).forEach(e=>{o.observe(e)})),"undefined"!=typeof MutationObserver&&(i=new MutationObserver(n),i.observe(te.current,{childList:!0})),()=>{t.clear(),r.removeEventListener("resize",t),i?.disconnect(),o?.disconnect()}},[re,ye]),p.useEffect(()=>{const e=Array.from(te.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&I&&!1!==C){const o=e[0],n=e[t-1],r={root:ee.current,threshold:.99},i=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},r);i.observe(o);const s=new IntersectionObserver(e=>{K(!e[0].isIntersecting)},r);return s.observe(n),()=>{i.disconnect(),s.disconnect()}}},[I,C,Y,c?.length]),p.useEffect(()=>{_(!0)},[]),p.useEffect(()=>{re()}),p.useEffect(()=>{ge(sn!==H)},[ge,H]),p.useImperativeHandle(l,()=>({updateIndicator:re,updateScrollButtons:ye}),[re,ye]);const[Se,Ce]=e.useSlot("indicator",{className:e.clsx(z.indicator,R.className),elementType:nn,externalForwardedProps:oe,ownerState:N,additionalProps:{style:H}}),fe=e.jsxRuntimeExports.jsx(Se,{...Ce});let be=0;const je=p.Children.map(c,t=>{if(!p.isValidElement(t))return null;"production"!==process.env.NODE_ENV&&e.reactIsExports.isFragment(t)&&console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n"));const o=void 0===t.props.value?be:t.props.value;J.set(o,be);const n=o===E;return be+=1,p.cloneElement(t,{fullWidth:"fullWidth"===$,indicator:n&&!B&&fe,selected:n,selectionFollowsFocus:f,onChange:g,textColor:v,value:o,...1!==be||!1!==E||t.props.tabIndex?{}:{tabIndex:0}})}),Re=(()=>{const t={};t.scrollbarSizeListener=I?e.jsxRuntimeExports.jsx(ce,{...ue,onChange:me}):null;const o=I&&("auto"===C&&(U||q)||!0===C);return t.scrollButtonStart=o?e.jsxRuntimeExports.jsx(xe,{direction:i?"right":"left",onClick:le,disabled:!U,...he}):null,t.scrollButtonEnd=o?e.jsxRuntimeExports.jsx(xe,{direction:i?"left":"right",onClick:de,disabled:!q,...he}):null,t})(),[we,ve]=e.useSlot("root",{ref:o,className:e.clsx(z.root,u),elementType:en,externalForwardedProps:{...oe,...T,component:m},ownerState:N}),[Ee,$e]=e.useSlot("scroller",{ref:ee,className:z.scroller,elementType:tn,externalForwardedProps:oe,ownerState:N,additionalProps:{style:{overflow:X.overflow,[P?"margin"+(i?"Left":"Right"):"marginBottom"]:k?void 0:-X.scrollbarWidth}}}),[ke,Te]=e.useSlot("list",{ref:te,className:e.clsx(z.list,z.flexContainer),elementType:on,externalForwardedProps:oe,ownerState:N,getSlotProps:t=>({...t,onKeyDown:o=>{(t=>{if(t.altKey||t.shiftKey||t.ctrlKey||t.metaKey)return;const o=te.current,n=e.activeElement(e.ownerDocument(o)),r=n?.getAttribute("role");if("tab"!==r)return;let s="horizontal"===y?"ArrowLeft":"ArrowUp",a="horizontal"===y?"ArrowRight":"ArrowDown";switch("horizontal"===y&&i&&(s="ArrowRight",a="ArrowLeft"),t.key){case s:t.preventDefault(),Jo(o,n,Qo);break;case a:t.preventDefault(),Jo(o,n,Xo);break;case"Home":t.preventDefault(),Jo(o,null,Xo);break;case"End":t.preventDefault(),Jo(o,null,Qo)}})(o),t.onKeyDown?.(o)}})});return e.jsxRuntimeExports.jsxs(we,{...ve,children:[Re.scrollButtonStart,Re.scrollbarSizeListener,e.jsxRuntimeExports.jsxs(Ee,{...$e,children:[e.jsxRuntimeExports.jsx(ke,{"aria-label":s,"aria-labelledby":a,"aria-orientation":"vertical"===y?"vertical":null,role:"tablist",...Te,children:je}),B&&fe]}),Re.scrollButtonEnd]})});"production"!==process.env.NODE_ENV&&(ln.propTypes={action:e.refType,allowScrollButtonsMobile:e.PropTypes.bool,"aria-label":e.PropTypes.string,"aria-labelledby":e.PropTypes.string,centered:e.PropTypes.bool,children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,component:e.PropTypes.elementType,indicatorColor:e.PropTypes.oneOfType([e.PropTypes.oneOf(["primary","secondary"]),e.PropTypes.string]),onChange:e.PropTypes.func,orientation:e.PropTypes.oneOf(["horizontal","vertical"]),ScrollButtonComponent:e.PropTypes.elementType,scrollButtons:e.PropTypes.oneOf(["auto",!1,!0]),selectionFollowsFocus:e.PropTypes.bool,slotProps:e.PropTypes.shape({endScrollButtonIcon:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),indicator:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),list:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),root:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),scrollbar:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),scrollButtons:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),scroller:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),startScrollButtonIcon:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object])}),slots:e.PropTypes.shape({endScrollButtonIcon:e.PropTypes.elementType,EndScrollButtonIcon:e.PropTypes.elementType,indicator:e.PropTypes.elementType,list:e.PropTypes.elementType,root:e.PropTypes.elementType,scrollbar:e.PropTypes.elementType,scrollButtons:e.PropTypes.elementType,scroller:e.PropTypes.elementType,startScrollButtonIcon:e.PropTypes.elementType,StartScrollButtonIcon:e.PropTypes.elementType}),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),TabIndicatorProps:e.PropTypes.object,TabScrollButtonProps:e.PropTypes.object,textColor:e.PropTypes.oneOf(["inherit","primary","secondary"]),value:e.PropTypes.any,variant:e.PropTypes.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:e.PropTypes.bool});const{common:{numbers:dn,strings:cn}}=e.appLocale.getLocalizedStrings(),pn=({onTabChange:t,allTabOptions:o,selectedOption:n,tabCounterDetails:r,getTitle:i})=>{const s=e=>{let t=0;if(r?.forEach(o=>{o.tab===e&&(t=o.count)}),0!==t)return t<100?`${t}`:`${dn.maximumCount}${cn.plus}`};return e.jsxRuntimeExports.jsx(mn,{"data-testid":e.generateDataTestId("cockpit-nav-switcher"),children:e.jsxRuntimeExports.jsx(un,{value:n,onChange:(e,o)=>{t(o)},centered:!0,"data-testid":e.generateDataTestId("cockpit-nav-switcher-tabs"),children:o.map(t=>e.jsxRuntimeExports.jsx(xn,{count:s(t),label:i(t),disableRipple:!0,"data-testid":e.generateDataTestId("cockpit-nav-switcher-tab",t)},t))})})},un=o(ln)`
|
|
360
|
+
`,Ao=({selectedCockpitOption:o,filters:n,disableFilters:r=!1,onFiltersChange:i,onSearchTextChanged:s,getCategoryWiseOptions:a,companiesLoaded:l=!0,filterText:d})=>{const c=t.useRef(null),[p,u]=t.useState(!1),m=t.useRef(!1),[x,h]=t.useState({management:{},portfolio:{},subscription:{},onboarding:{},audit:{},healthMonitor:{},taskManager:{},aiAccountant:{},creditAgent:{}}),[g,y]=t.useState(136),S=t.useRef(null),C=e.useWindowSizeContext(),f=t.useCallback(()=>{u(!1)},[]),b=t.useCallback(()=>{!1===r&&u(!0)},[r]);t.useEffect(()=>{a&&0===Object.keys(x[o]).length&&l&&h(e=>({...e,[o]:a()}))},[o,x,l]);const j=t.useCallback(()=>{if(null==n?.categories)return M;const t=S.current,o=null!=t?t.clientHeight:0;return e.sp[7]+(o>0?o:M)},[n]);t.useEffect(()=>{p===m.current?y(j()):y("auto")},[j,p]),t.useEffect(()=>{m.current=p},[p]),t.useEffect(()=>{"auto"===g&&y(j())},[g,j]);const R=null==n?.categories||0===n.categories.length?0:n.categories.filter(e=>null!=e.field&&e.values.length>0).length;return e.jsxRuntimeExports.jsxs(t.Fragment,{children:[e.jsxRuntimeExports.jsx(Lo,{"data-testid":e.generateDataTestId("cockpit-filters-search-box"),children:e.jsxRuntimeExports.jsx(e.SearchBoxWithFilterButton,{isFilterBtnActive:p||R>0,searchPlaceholder:Po,ref:c,isFilterDisabled:r,onSearchTextChanged:s,onFilterButtonClick:b,filtersCount:R,filterText:d})}),1!=r&&e.jsxRuntimeExports.jsx(e.FiltersPopover,{anchorEl:c.current,open:p,onClose:f,paperStyle:{overflow:"visible"},children:e.jsxRuntimeExports.jsx(Do,{height:g,windowSize:C,"data-testid":e.generateDataTestId("cockpit-filters-selection-wrapper"),children:n&&e.jsxRuntimeExports.jsx(Oo,{"data-testid":e.generateDataTestId("cockpit-filters-selection"),children:e.jsxRuntimeExports.jsx(Io,{filters:n,onFiltersChange:i,filterValues:x[o],selectedCockpitOption:o,ref:S})})})},null==n?.categories||0===n.categories.length?"smallBox":"largeBox")]})},Lo=o.div``,Oo=o.div``;function Mo(t){return e.generateUtilityClass("MuiTab",t)}const No=e.generateUtilityClasses("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),zo=e.styled(e.ButtonBase,{name:"MuiTab",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:n}=t;return[o.root,n.label&&n.icon&&o.labelIcon,o[`textColor${e.capitalize(n.textColor)}`],n.fullWidth&&o.fullWidth,n.wrapped&&o.wrapped,{[`& .${No.iconWrapper}`]:o.iconWrapper},{[`& .${No.icon}`]:o.icon}]}})(e.memoTheme(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${No.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${No.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${No.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${No.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${No.selected}`]:{opacity:1},[`&.${No.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${No.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${No.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${No.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${No.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Fo=p.forwardRef(function(t,o){const n=e.useDefaultProps({props:t,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:d="top",indicator:c,label:u,onChange:m,onClick:x,onFocus:h,selected:g,selectionFollowsFocus:y,textColor:S="inherit",value:C,wrapped:f=!1,...b}=n,j={...n,disabled:i,disableFocusRipple:s,selected:g,icon:!!l,iconPosition:d,label:!!u,fullWidth:a,textColor:S,wrapped:f},R=(t=>{const{classes:o,textColor:n,fullWidth:r,wrapped:i,icon:s,label:a,selected:l,disabled:d}=t,c={root:["root",s&&a&&"labelIcon",`textColor${e.capitalize(n)}`,r&&"fullWidth",i&&"wrapped",l&&"selected",d&&"disabled"],icon:["iconWrapper","icon"]};return e.composeClasses(c,Mo,o)})(j),w=l&&u&&p.isValidElement(l)?p.cloneElement(l,{className:e.clsx(R.icon,l.props.className)}):l;return e.jsxRuntimeExports.jsxs(zo,{focusRipple:!s,className:e.clsx(R.root,r),ref:o,role:"tab","aria-selected":g,disabled:i,onClick:e=>{!g&&m&&m(e,C),x&&x(e)},onFocus:e=>{y&&!g&&m&&m(e,C),h&&h(e)},ownerState:j,tabIndex:g?0:-1,...b,children:["top"===d||"start"===d?e.jsxRuntimeExports.jsxs(p.Fragment,{children:[w,u]}):e.jsxRuntimeExports.jsxs(p.Fragment,{children:[u,w]}),c]})});function Vo(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}"production"!==process.env.NODE_ENV&&(Fo.propTypes={children:function(e,t,o,n,r){if("production"===process.env.NODE_ENV)return null;const i=r||t;return void 0!==e[t]?new Error(`The prop \`${i}\` is not supported. Please remove it.`):null},classes:e.PropTypes.object,className:e.PropTypes.string,disabled:e.PropTypes.bool,disableFocusRipple:e.PropTypes.bool,disableRipple:e.PropTypes.bool,icon:e.PropTypes.oneOfType([e.PropTypes.element,e.PropTypes.string]),iconPosition:e.PropTypes.oneOf(["bottom","end","start","top"]),label:e.PropTypes.node,onChange:e.PropTypes.func,onClick:e.PropTypes.func,onFocus:e.PropTypes.func,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),value:e.PropTypes.any,wrapped:e.PropTypes.bool});const Bo={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function _o(t){const{onChange:o,...n}=t,r=p.useRef(),i=p.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return e.useEnhancedEffect(()=>{const t=e.debounce(()=>{const e=r.current;s(),e!==r.current&&o(r.current)}),n=e.ownerWindow(i.current);return n.addEventListener("resize",t),()=>{t.clear(),n.removeEventListener("resize",t)}},[o]),p.useEffect(()=>{s(),o(r.current)},[o]),e.jsxRuntimeExports.jsx("div",{style:Bo,...n,ref:i})}"production"!==process.env.NODE_ENV&&(_o.propTypes={onChange:e.PropTypes.func.isRequired});const Ho=e.createSvgIcon(e.jsxRuntimeExports.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Wo=e.createSvgIcon(e.jsxRuntimeExports.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Uo(t){return e.generateUtilityClass("MuiTabScrollButton",t)}const Go=e.generateUtilityClasses("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),qo=e.styled(e.ButtonBase,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.orientation&&t[o.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Go.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),Ko=p.forwardRef(function(t,o){const n=e.useDefaultProps({props:t,name:"MuiTabScrollButton"}),{className:r,slots:i={},slotProps:s={},direction:a,orientation:l,disabled:d,...c}=n,p=e.useRtl(),u={isRtl:p,...n},m=(t=>{const{classes:o,orientation:n,disabled:r}=t,i={root:["root",n,r&&"disabled"]};return e.composeClasses(i,Uo,o)})(u),x=i.StartScrollButtonIcon??Ho,h=i.EndScrollButtonIcon??Wo,g=e.useSlotProps({elementType:x,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),y=e.useSlotProps({elementType:h,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return e.jsxRuntimeExports.jsx(qo,{component:"div",className:e.clsx(m.root,r),ref:o,role:null,ownerState:u,tabIndex:null,...c,style:{...c.style,..."vertical"===l&&{"--TabScrollButton-svgRotate":`rotate(${p?-90:90}deg)`}},children:"left"===a?e.jsxRuntimeExports.jsx(x,{...g}):e.jsxRuntimeExports.jsx(h,{...y})})});function Yo(t){return e.generateUtilityClass("MuiTabs",t)}"production"!==process.env.NODE_ENV&&(Ko.propTypes={children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,direction:e.PropTypes.oneOf(["left","right"]).isRequired,disabled:e.PropTypes.bool,orientation:e.PropTypes.oneOf(["horizontal","vertical"]).isRequired,slotProps:e.PropTypes.shape({endScrollButtonIcon:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),startScrollButtonIcon:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object])}),slots:e.PropTypes.shape({EndScrollButtonIcon:e.PropTypes.elementType,StartScrollButtonIcon:e.PropTypes.elementType}),style:e.PropTypes.object,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object])});const Zo=e.generateUtilityClasses("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Xo=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Qo=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Jo=(e,t,o)=>{let n=!1,r=o(e,t);for(;r;){if(r===e.firstChild){if(n)return;n=!0}const t=r.disabled||"true"===r.getAttribute("aria-disabled");if(r.hasAttribute("tabindex")&&!t)return void r.focus();r=o(e,r)}},en=e.styled("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{[`& .${Zo.scrollButtons}`]:t.scrollButtons},{[`& .${Zo.scrollButtons}`]:o.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,o.vertical&&t.vertical]}})(e.memoTheme(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Zo.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),tn=e.styled("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.scroller,o.fixed&&t.fixed,o.hideScrollbar&&t.hideScrollbar,o.scrollableX&&t.scrollableX,o.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),on=e.styled("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.list,t.flexContainer,o.vertical&&t.flexContainerVertical,o.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),nn=e.styled("span",{name:"MuiTabs",slot:"Indicator"})(e.memoTheme(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),rn=e.styled(_o)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),sn={};let an=!1;const ln=p.forwardRef(function(t,o){const n=e.useDefaultProps({props:t,name:"MuiTabs"}),r=e.useTheme(),i=e.useRtl(),{"aria-label":s,"aria-labelledby":a,action:l,centered:d=!1,children:c,className:u,component:m="div",allowScrollButtonsMobile:x=!1,indicatorColor:h="primary",onChange:g,orientation:y="horizontal",ScrollButtonComponent:S,scrollButtons:C="auto",selectionFollowsFocus:f,slots:b={},slotProps:j={},TabIndicatorProps:R={},TabScrollButtonProps:w={},textColor:E="primary",value:v,variant:$="standard",visibleScrollbar:k=!1,...T}=n,I="scrollable"===$,P="vertical"===y,D=P?"scrollTop":"scrollLeft",A=P?"top":"left",L=P?"bottom":"right",O=P?"clientHeight":"clientWidth",M=P?"height":"width",N={...n,component:m,allowScrollButtonsMobile:x,indicatorColor:h,orientation:y,vertical:P,scrollButtons:C,textColor:E,variant:$,visibleScrollbar:k,fixed:!I,hideScrollbar:I&&!k,scrollableX:I&&!P,scrollableY:I&&P,centered:d&&!I,scrollButtonsHideMobile:!x},z=(t=>{const{vertical:o,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:a,scrollButtonsHideMobile:l,classes:d}=t,c={root:["root",o&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],list:["list","flexContainer",o&&"flexContainerVertical",o&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return e.composeClasses(c,Yo,d)})(N),F=e.useSlotProps({elementType:b.StartScrollButtonIcon,externalSlotProps:j.startScrollButtonIcon,ownerState:N}),V=e.useSlotProps({elementType:b.EndScrollButtonIcon,externalSlotProps:j.endScrollButtonIcon,ownerState:N});"production"!==process.env.NODE_ENV&&d&&I&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[B,_]=p.useState(!1),[H,W]=p.useState(sn),[U,G]=p.useState(!1),[q,K]=p.useState(!1),[Y,Z]=p.useState(!1),[X,Q]=p.useState({overflow:"hidden",scrollbarWidth:0}),J=new Map,ee=p.useRef(null),te=p.useRef(null),oe={slots:b,slotProps:{indicator:R,scrollButtons:w,...j}},ne=()=>{const t=ee.current;let o,n;if(t){const e=t.getBoundingClientRect();o={clientWidth:t.clientWidth,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,scrollWidth:t.scrollWidth,top:e.top,bottom:e.bottom,left:e.left,right:e.right}}if(t&&!1!==v){const t=te.current.children;if(t.length>0){const r=t[J.get(v)];"production"!==process.env.NODE_ENV&&(r||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${v}".`,J.keys?`You can provide one of the following values: ${Array.from(J.keys()).join(", ")}.`:null].join("\n"))),n=r?r.getBoundingClientRect():null,"production"!==process.env.NODE_ENV&&e.isLayoutSupported()&&!an&&n&&0===n.width&&0===n.height&&0!==o.clientWidth&&(o=null,console.error(["MUI: The `value` provided to the Tabs component is invalid.",`The Tab with this \`value\` ("${v}") is not part of the document layout.`,"Make sure the tab item is present in the document or that it's not `display: none`."].join("\n")),an=!0)}}return{tabsMeta:o,tabMeta:n}},re=e.useEventCallback(()=>{const{tabsMeta:e,tabMeta:t}=ne();let o,n=0;P?(o="top",t&&e&&(n=t.top-e.top+e.scrollTop)):(o=i?"right":"left",t&&e&&(n=(i?-1:1)*(t[o]-e[o]+e.scrollLeft)));const r={[o]:n,[M]:t?t[M]:0};if("number"!=typeof H[o]||"number"!=typeof H[M])W(r);else{const e=Math.abs(H[o]-r[o]),t=Math.abs(H[M]-r[M]);(e>=1||t>=1)&&W(r)}}),ie=(e,{animation:t=!0}={})=>{t?function(e,t,o,n={},r=()=>{}){const{ease:i=Vo,duration:s=300}=n;let a=null;const l=t[e];let d=!1;const c=()=>{d=!0},p=n=>{if(d)return void r(new Error("Animation cancelled"));null===a&&(a=n);const c=Math.min(1,(n-a)/s);t[e]=i(c)*(o-l)+l,c>=1?requestAnimationFrame(()=>{r(null)}):requestAnimationFrame(p)};l===o?r(new Error("Element already at target position")):requestAnimationFrame(p)}(D,ee.current,e,{duration:r.transitions.duration.standard}):ee.current[D]=e},se=e=>{let t=ee.current[D];t+=P?e:e*(i?-1:1),ie(t)},ae=()=>{const e=ee.current[O];let t=0;const o=Array.from(te.current.children);for(let n=0;n<o.length;n+=1){const r=o[n];if(t+r[O]>e){0===n&&(t=e);break}t+=r[O]}return t},le=()=>{se(-1*ae())},de=()=>{se(ae())},[ce,{onChange:pe,...ue}]=e.useSlot("scrollbar",{className:e.clsx(z.scrollableX,z.hideScrollbar),elementType:rn,shouldForwardComponentProp:!0,externalForwardedProps:oe,ownerState:N}),me=p.useCallback(e=>{pe?.(e),Q({overflow:null,scrollbarWidth:e})},[pe]),[xe,he]=e.useSlot("scrollButtons",{className:e.clsx(z.scrollButtons,w.className),elementType:Ko,externalForwardedProps:oe,ownerState:N,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:b.startScrollButtonIcon||b.StartScrollButtonIcon,EndScrollButtonIcon:b.endScrollButtonIcon||b.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:F,endScrollButtonIcon:V}}}),ge=e.useEventCallback(e=>{const{tabsMeta:t,tabMeta:o}=ne();if(o&&t)if(o[A]<t[A]){const n=t[D]+(o[A]-t[A]);ie(n,{animation:e})}else if(o[L]>t[L]){const n=t[D]+(o[L]-t[L]);ie(n,{animation:e})}}),ye=e.useEventCallback(()=>{I&&!1!==C&&Z(!Y)});p.useEffect(()=>{const t=e.debounce(()=>{ee.current&&re()});let o;const n=e=>{e.forEach(e=>{e.removedNodes.forEach(e=>{o?.unobserve(e)}),e.addedNodes.forEach(e=>{o?.observe(e)})}),t(),ye()},r=e.ownerWindow(ee.current);let i;return r.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(t),Array.from(te.current.children).forEach(e=>{o.observe(e)})),"undefined"!=typeof MutationObserver&&(i=new MutationObserver(n),i.observe(te.current,{childList:!0})),()=>{t.clear(),r.removeEventListener("resize",t),i?.disconnect(),o?.disconnect()}},[re,ye]),p.useEffect(()=>{const e=Array.from(te.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&I&&!1!==C){const o=e[0],n=e[t-1],r={root:ee.current,threshold:.99},i=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},r);i.observe(o);const s=new IntersectionObserver(e=>{K(!e[0].isIntersecting)},r);return s.observe(n),()=>{i.disconnect(),s.disconnect()}}},[I,C,Y,c?.length]),p.useEffect(()=>{_(!0)},[]),p.useEffect(()=>{re()}),p.useEffect(()=>{ge(sn!==H)},[ge,H]),p.useImperativeHandle(l,()=>({updateIndicator:re,updateScrollButtons:ye}),[re,ye]);const[Se,Ce]=e.useSlot("indicator",{className:e.clsx(z.indicator,R.className),elementType:nn,externalForwardedProps:oe,ownerState:N,additionalProps:{style:H}}),fe=e.jsxRuntimeExports.jsx(Se,{...Ce});let be=0;const je=p.Children.map(c,t=>{if(!p.isValidElement(t))return null;"production"!==process.env.NODE_ENV&&e.reactIsExports.isFragment(t)&&console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n"));const o=void 0===t.props.value?be:t.props.value;J.set(o,be);const n=o===v;return be+=1,p.cloneElement(t,{fullWidth:"fullWidth"===$,indicator:n&&!B&&fe,selected:n,selectionFollowsFocus:f,onChange:g,textColor:E,value:o,...1!==be||!1!==v||t.props.tabIndex?{}:{tabIndex:0}})}),Re=(()=>{const t={};t.scrollbarSizeListener=I?e.jsxRuntimeExports.jsx(ce,{...ue,onChange:me}):null;const o=I&&("auto"===C&&(U||q)||!0===C);return t.scrollButtonStart=o?e.jsxRuntimeExports.jsx(xe,{direction:i?"right":"left",onClick:le,disabled:!U,...he}):null,t.scrollButtonEnd=o?e.jsxRuntimeExports.jsx(xe,{direction:i?"left":"right",onClick:de,disabled:!q,...he}):null,t})(),[we,Ee]=e.useSlot("root",{ref:o,className:e.clsx(z.root,u),elementType:en,externalForwardedProps:{...oe,...T,component:m},ownerState:N}),[ve,$e]=e.useSlot("scroller",{ref:ee,className:z.scroller,elementType:tn,externalForwardedProps:oe,ownerState:N,additionalProps:{style:{overflow:X.overflow,[P?"margin"+(i?"Left":"Right"):"marginBottom"]:k?void 0:-X.scrollbarWidth}}}),[ke,Te]=e.useSlot("list",{ref:te,className:e.clsx(z.list,z.flexContainer),elementType:on,externalForwardedProps:oe,ownerState:N,getSlotProps:t=>({...t,onKeyDown:o=>{(t=>{if(t.altKey||t.shiftKey||t.ctrlKey||t.metaKey)return;const o=te.current,n=e.activeElement(e.ownerDocument(o)),r=n?.getAttribute("role");if("tab"!==r)return;let s="horizontal"===y?"ArrowLeft":"ArrowUp",a="horizontal"===y?"ArrowRight":"ArrowDown";switch("horizontal"===y&&i&&(s="ArrowRight",a="ArrowLeft"),t.key){case s:t.preventDefault(),Jo(o,n,Qo);break;case a:t.preventDefault(),Jo(o,n,Xo);break;case"Home":t.preventDefault(),Jo(o,null,Xo);break;case"End":t.preventDefault(),Jo(o,null,Qo)}})(o),t.onKeyDown?.(o)}})});return e.jsxRuntimeExports.jsxs(we,{...Ee,children:[Re.scrollButtonStart,Re.scrollbarSizeListener,e.jsxRuntimeExports.jsxs(ve,{...$e,children:[e.jsxRuntimeExports.jsx(ke,{"aria-label":s,"aria-labelledby":a,"aria-orientation":"vertical"===y?"vertical":null,role:"tablist",...Te,children:je}),B&&fe]}),Re.scrollButtonEnd]})});"production"!==process.env.NODE_ENV&&(ln.propTypes={action:e.refType,allowScrollButtonsMobile:e.PropTypes.bool,"aria-label":e.PropTypes.string,"aria-labelledby":e.PropTypes.string,centered:e.PropTypes.bool,children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,component:e.PropTypes.elementType,indicatorColor:e.PropTypes.oneOfType([e.PropTypes.oneOf(["primary","secondary"]),e.PropTypes.string]),onChange:e.PropTypes.func,orientation:e.PropTypes.oneOf(["horizontal","vertical"]),ScrollButtonComponent:e.PropTypes.elementType,scrollButtons:e.PropTypes.oneOf(["auto",!1,!0]),selectionFollowsFocus:e.PropTypes.bool,slotProps:e.PropTypes.shape({endScrollButtonIcon:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),indicator:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),list:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),root:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),scrollbar:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),scrollButtons:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),scroller:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),startScrollButtonIcon:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object])}),slots:e.PropTypes.shape({endScrollButtonIcon:e.PropTypes.elementType,EndScrollButtonIcon:e.PropTypes.elementType,indicator:e.PropTypes.elementType,list:e.PropTypes.elementType,root:e.PropTypes.elementType,scrollbar:e.PropTypes.elementType,scrollButtons:e.PropTypes.elementType,scroller:e.PropTypes.elementType,startScrollButtonIcon:e.PropTypes.elementType,StartScrollButtonIcon:e.PropTypes.elementType}),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),TabIndicatorProps:e.PropTypes.object,TabScrollButtonProps:e.PropTypes.object,textColor:e.PropTypes.oneOf(["inherit","primary","secondary"]),value:e.PropTypes.any,variant:e.PropTypes.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:e.PropTypes.bool});const{common:{numbers:dn,strings:cn}}=e.appLocale.getLocalizedStrings(),pn=({onTabChange:t,allTabOptions:o,selectedOption:n,tabCounterDetails:r,getTitle:i})=>{const s=e=>{let t=0;if(r?.forEach(o=>{o.tab===e&&(t=o.count)}),0!==t)return t<100?`${t}`:`${dn.maximumCount}${cn.plus}`};return e.jsxRuntimeExports.jsx(mn,{"data-testid":e.generateDataTestId("cockpit-nav-switcher"),children:e.jsxRuntimeExports.jsx(un,{value:n,onChange:(e,o)=>{t(o)},centered:!0,"data-testid":e.generateDataTestId("cockpit-nav-switcher-tabs"),children:o.map(t=>e.jsxRuntimeExports.jsx(xn,{count:s(t),label:i(t),disableRipple:!0,"data-testid":e.generateDataTestId("cockpit-nav-switcher-tab",t)},t))})})},un=o(ln)`
|
|
361
361
|
.MuiTabs-indicator {
|
|
362
362
|
background-color: ${e=>e.theme.colors.primary};
|
|
363
363
|
width: calc(100% - 20px);
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
border-radius: ${e.Space.sp12};
|
|
396
396
|
margin-left: 2px;
|
|
397
397
|
}
|
|
398
|
-
`,{cockpit:{titles:hn},common:{back:gn,settings:{integrations:{connectorTooltips:{accountantSectionLabel:yn}},productNameByType:{charge_cards:Sn}},texts:{onboarding:Cn,subscription:fn}}}=e.appLocale.getLocalizedStrings(),bn=({headerData:o,headerActions:n})=>{const{filterData:r,showBackButton:i=!1,allTabOptions:s,selectedTabOption:a,companiesLoaded:l,tabCounterDetails:d}=o,{onNavigateBack:c,onTabChange:p,filterActions:u}=n,m=u?.onFilterTextChanged,x=u?.onFiltersChange;let h=-1;s?.forEach((e,t)=>{e===a&&(h=t)}),-1===h&&null!=a&&console.warn("Selected unsupported tab option");const g=t.useCallback(e=>{a&&m?.(a,e)},[m,a]),y=t.useCallback(e=>{x&&a&&x(a,e)},[x,a]);return e.jsxRuntimeExports.jsxs(kn,{"data-testid":e.generateDataTestId("cockpit-nav-header"),children:[e.jsxRuntimeExports.jsx(
|
|
398
|
+
`,{cockpit:{titles:hn},common:{back:gn,settings:{integrations:{connectorTooltips:{accountantSectionLabel:yn}},productNameByType:{charge_cards:Sn}},texts:{onboarding:Cn,subscription:fn}}}=e.appLocale.getLocalizedStrings(),bn=({headerData:o,headerActions:n})=>{const{filterData:r,showBackButton:i=!1,allTabOptions:s,selectedTabOption:a,companiesLoaded:l,tabCounterDetails:d}=o,{onNavigateBack:c,onTabChange:p,filterActions:u}=n,m=u?.onFilterTextChanged,x=u?.onFiltersChange;let h=-1;s?.forEach((e,t)=>{e===a&&(h=t)}),-1===h&&null!=a&&console.warn("Selected unsupported tab option");const g=t.useCallback(e=>{a&&m?.(a,e)},[m,a]),y=t.useCallback(e=>{x&&a&&x(a,e)},[x,a]);return e.jsxRuntimeExports.jsxs(kn,{"data-testid":e.generateDataTestId("cockpit-nav-header"),children:[e.jsxRuntimeExports.jsx(En,{"data-testid":e.generateDataTestId("cockpit-nav-header-back-button"),onClick:()=>{c&&c()},children:!0===i&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(wn,{}),e.jsxRuntimeExports.jsx(Rn,{children:gn})]})}),s&&-1!==h&&null!=s&&p&&e.jsxRuntimeExports.jsx(vn,{"data-testid":e.generateDataTestId("cockpit-nav-header-tab-switcher"),children:e.jsxRuntimeExports.jsx(pn,{tabCounterDetails:d,onTabChange:e=>{const t=s?.[e];null!=t&&p?.(t)},allTabOptions:s,selectedOption:h,getTitle:e=>{let t="";return Te.forEach(o=>{o===e&&(t={...hn,subscription:fn,onboarding:Cn,creditAgent:Sn,aiAccountant:yn}[e])}),t.length,t}})}),e.jsxRuntimeExports.jsx(jn,{"data-testid":e.generateDataTestId("cockpit-nav-header-search-wrapper"),children:r&&u&&e.jsxRuntimeExports.jsx($n,{"data-testid":e.generateDataTestId("cockpit-nav-header-filters"),children:e.jsxRuntimeExports.jsx(Ao,{selectedCockpitOption:a,filters:r.filters,disableFilters:r.disableFilters,getCategoryWiseOptions:u.getCategoryWiseOptions,onSearchTextChanged:g,onFiltersChange:y,companiesLoaded:l,filterText:r.filterText})})})]})},jn=o.div`
|
|
399
399
|
min-width: 250px;
|
|
400
400
|
display: flex;
|
|
401
401
|
justify-content: flex-end;
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
height: ${e.Space.sp4};
|
|
408
408
|
width: ${e.Space.sp4};
|
|
409
409
|
transform: translateY(7px) scale3d(0.8, 0.8, 0.8);
|
|
410
|
-
`,
|
|
410
|
+
`,En=o(e.SmallRegular)`
|
|
411
411
|
padding: 0;
|
|
412
412
|
margin: auto 0;
|
|
413
413
|
color: ${e=>e.theme.colors.hero};
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
cursor: pointer;
|
|
419
419
|
color: ${e=>e.theme.colors.primary};
|
|
420
420
|
}
|
|
421
|
-
`,
|
|
421
|
+
`,vn=o.div``,$n=o.div``,kn=o.div`
|
|
422
422
|
display: flex;
|
|
423
423
|
flex-direction: row;
|
|
424
424
|
justify-content: space-between;
|
|
@@ -619,7 +619,7 @@
|
|
|
619
619
|
width: 100%;
|
|
620
620
|
display: flex;
|
|
621
621
|
align-items: center;
|
|
622
|
-
`,dr=()=>null,cr=()=>null,pr=()=>null,ur=()=>null,{common:{strings:{dot:mr}}}=e.appLocale.getLocalizedStrings(),xr="cockpitCommentsContainer",hr=(e,t,o,n,r)=>({companyName:n,companyId:o,entityId:r??o,entityType:`${e}.${t}`,isGlobalComment:!0,application:"cockpit",tab:e,url:window.location.href}),gr=(t,o,n)=>`${e.toCollaborationEntityType({tab:t,key:o})}${mr}${n}${mr}${e.NEW_THREAD_SUFFIX}`,yr=(e,t)=>{for(;e&&!e.classList.contains(t);)e=e.parentElement;return e},Sr=({open:t,anchorEl:o,children:n,onClose:r})=>{const i=e.useTheme();return e.jsxRuntimeExports.jsx(e.Popover,{transitionDuration:0,anchorEl:o,open:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{style:{marginTop:"6px",background:i.colors.grey5,boxShadow:`${e.Space.sp0} 2px ${e.Space.sp1} ${i.colors.dropShadowNormal}`,width:"284px",padding:e.Space.sp1,border:`1px solid ${i.colors.grey3}`,borderRadius:e.Space.sp2}},"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-popover"),onClose:r,children:n})},{common:{texts:{viewDetails:Cr}}}=e.appLocale.getLocalizedStrings(),fr=({companyId:t,companyName:o,parentInfo:n,subsidiaryInfo:r,onViewDetailsLinkClicked:i})=>{const s=n?n.subsidiaries:r?r.siblings:[],a=r?r.parentCompanyId:t,l=null!=n?o:r?.parentCompanyName;return e.jsxRuntimeExports.jsxs(jr,{"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-content"),children:[e.jsxRuntimeExports.jsxs(Rr,{isHighlighted:null!=n,children:[e.jsxRuntimeExports.jsx(wr,{isHighlighted:null!=n,"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-parent-name"),children:l}),e.jsxRuntimeExports.jsxs(
|
|
622
|
+
`,dr=()=>null,cr=()=>null,pr=()=>null,ur=()=>null,{common:{strings:{dot:mr}}}=e.appLocale.getLocalizedStrings(),xr="cockpitCommentsContainer",hr=(e,t,o,n,r)=>({companyName:n,companyId:o,entityId:r??o,entityType:`${e}.${t}`,isGlobalComment:!0,application:"cockpit",tab:e,url:window.location.href}),gr=(t,o,n)=>`${e.toCollaborationEntityType({tab:t,key:o})}${mr}${n}${mr}${e.NEW_THREAD_SUFFIX}`,yr=(e,t)=>{for(;e&&!e.classList.contains(t);)e=e.parentElement;return e},Sr=({open:t,anchorEl:o,children:n,onClose:r})=>{const i=e.useTheme();return e.jsxRuntimeExports.jsx(e.Popover,{transitionDuration:0,anchorEl:o,open:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{style:{marginTop:"6px",background:i.colors.grey5,boxShadow:`${e.Space.sp0} 2px ${e.Space.sp1} ${i.colors.dropShadowNormal}`,width:"284px",padding:e.Space.sp1,border:`1px solid ${i.colors.grey3}`,borderRadius:e.Space.sp2}},"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-popover"),onClose:r,children:n})},{common:{texts:{viewDetails:Cr}}}=e.appLocale.getLocalizedStrings(),fr=({companyId:t,companyName:o,parentInfo:n,subsidiaryInfo:r,onViewDetailsLinkClicked:i})=>{const s=n?n.subsidiaries:r?r.siblings:[],a=r?r.parentCompanyId:t,l=null!=n?o:r?.parentCompanyName;return e.jsxRuntimeExports.jsxs(jr,{"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-content"),children:[e.jsxRuntimeExports.jsxs(Rr,{isHighlighted:null!=n,children:[e.jsxRuntimeExports.jsx(wr,{isHighlighted:null!=n,"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-parent-name"),children:l}),e.jsxRuntimeExports.jsxs(Er,{"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-view-details"),onClick:()=>{i&&i(a)},children:[Cr,e.jsxRuntimeExports.jsx(br,{})]})]}),e.jsxRuntimeExports.jsxs(vr,{"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-list"),children:[r&&e.jsxRuntimeExports.jsx($r,{isHighlighted:!0,"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-current-company"),children:e.jsxRuntimeExports.jsx(kr,{children:o})}),s.map(t=>e.jsxRuntimeExports.jsx($r,{isHighlighted:!1,"data-testid":e.generateDataTestId("cockpit-parent-subsidiary-item",t.companyId),children:e.jsxRuntimeExports.jsx(kr,{children:t.name})},t.companyId))]})]})},br=o(e.SvgArrowRight)`
|
|
623
623
|
padding-left: ${e.Space.sp1};
|
|
624
624
|
transform: translateY(1px);
|
|
625
625
|
height: 10px;
|
|
@@ -635,14 +635,14 @@
|
|
|
635
635
|
width: 174px;
|
|
636
636
|
font-weight: ${t=>t.isHighlighted?e.FontWeight.medium:e.FontWeight.regular};
|
|
637
637
|
color: ${e=>e.isHighlighted?e.theme.colors.primary:e.theme.colors.hero};
|
|
638
|
-
`,
|
|
638
|
+
`,Er=o(e.SmallRegularA)`
|
|
639
639
|
text-decoration: none;
|
|
640
640
|
cursor: pointer;
|
|
641
641
|
color: ${e=>e.theme.colors.hero};
|
|
642
642
|
&:hover {
|
|
643
643
|
color: ${e=>e.theme.colors.primary};
|
|
644
644
|
}
|
|
645
|
-
`,
|
|
645
|
+
`,vr=o.div`
|
|
646
646
|
width: 206px;
|
|
647
647
|
display: flex;
|
|
648
648
|
flex-direction: column;
|
|
@@ -823,7 +823,7 @@
|
|
|
823
823
|
fill: ${e=>e.theme.colors.grey1};
|
|
824
824
|
`,yi=({chips:t})=>e.jsxRuntimeExports.jsx(xi,{children:t.length>0?t.map((t,o)=>e.jsxRuntimeExports.jsx(hi,{color:t.color,children:t.label},`${t.label}_${o}`)):e.jsxRuntimeExports.jsx(gi,{children:"-"})}),Si=[e.lightColors.graphColor34,e.lightColors.graphColor08,e.lightColors.graphColor11,e.lightColors.graphColor13,e.lightColors.graphColor19,e.lightColors.graphColor20,e.lightColors.graphColor14,e.lightColors.graphColor35,e.lightColors.graphColor32,e.lightColors.graphColor02,e.lightColors.graphColor06,e.lightColors.graphColor04,e.lightColors.graphColor10,e.lightColors.graphColor12,e.lightColors.graphColor15,e.lightColors.graphColor18];function Ci(e,t=0){const o=(e=>{const t=String.prototype.concat(...new Set(e));let o=0;for(let n=0;n<t.length;++n)o+=t.charCodeAt(n);return o})(e)+t*t*t;return Si[Math.floor(o/Si.length)%Si.length]}const fi=e=>e.map(e=>({label:e,color:Ci(e,e.length)})),bi={z1:{bgColor:new e.Color(e.lightColors.primary),color:new e.Color(e.darkColors.primary),borderColor:new e.Color(e.lightColors.primary)},z2:{bgColor:new e.Color(e.lightColors.champion),color:new e.Color(e.darkColors.primary),borderColor:new e.Color(e.lightColors.champion)},z3:{bgColor:new e.Color(e.lightColors.hero),color:new e.Color(e.darkColors.primary),borderColor:new e.Color(e.lightColors.hero)},z4:{bgColor:new e.Color(e.lightColors.grey1),color:new e.Color(e.darkColors.primary),borderColor:new e.Color(e.lightColors.grey1)},z5:{bgColor:new e.Color(e.lightColors.grey2),color:new e.Color(e.darkColors.primary),borderColor:new e.Color(e.lightColors.grey2)},enterprise:{bgColor:new e.Color(e.lightColors.primary),color:new e.Color(e.darkColors.primary),borderColor:new e.Color(e.lightColors.primary)},growth:{bgColor:new e.Color(e.lightColors.champion),color:new e.Color(e.darkColors.primary),borderColor:new e.Color(e.lightColors.champion)},starter:{bgColor:new e.Color(e.lightColors.hero),color:new e.Color(e.darkColors.primary),borderColor:new e.Color(e.lightColors.hero)}},{common:{texts:ji}}=e.appLocale.getLocalizedStrings(),Ri=({onSelectionChanged:t,selectedGroupIndex:o,allGroups:n})=>{const r=n.map(e=>({value:e,options:bi[e.id]}));return e.jsxRuntimeExports.jsx(wi,{children:e.jsxRuntimeExports.jsx(Or,{customization:{placeholderLabel:ji.group},onSelectedValueChanged:e=>{const o=r.findIndex(t=>t.value.id===(e?.value).id);t(o,e?.value)},allowedValues:r,selectedValue:null!=o?r[o]:void 0})})},wi=o.div`
|
|
825
825
|
width: 70%;
|
|
826
|
-
`,
|
|
826
|
+
`,Ei=({registerOptions:t,name:o,value:n})=>{const{control:r}=e.useFormContext();return e.jsxRuntimeExports.jsx(e.Controller,{name:o,control:r,defaultValue:n,rules:t,render:({field:{value:t,onChange:o}})=>e.jsxRuntimeExports.jsx(Ri,{onSelectionChanged:e=>o({allGroups:n.allGroups,selectedValue:n.allGroups[e]}),selectedGroupIndex:n.allGroups.findIndex(e=>e.id===t.selectedValue?.id),allGroups:n.allGroups})})},{cockpit:{management:{header:vi}},common:{texts:{name:$i,task:ki,status:Ti,group:Ii,plans:Pi,controller:Di,csManager:Ai,preparer:Li,reviewer:Oi,apAnalyst:Mi,taxStatus:Ni,taxLead:zi,mrr:Fi,arr:Vi,productVerticals:Bi,realmId:_i}}}=e.appLocale.getLocalizedStrings(),Hi=[{key:"companyName",value:$i,sortOrder:"ascending",width:new e.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"task",value:ki,sortOrder:"ascending",width:new e.ResponsiveSized(117,117),isThreadAllowed:!0},{key:"status",value:Ti,sortOrder:"ascending",width:new e.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"group",value:Ii,sortOrder:"ascending",width:new e.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"plans",value:Pi,sortOrder:"ascending",width:new e.ResponsiveSized(275,275),isThreadAllowed:!0},{key:"satisfaction",value:vi.satisfaction,sortOrder:"ascending",width:new e.ResponsiveSized(149,149),isThreadAllowed:!0},{key:"bookCloseDate",value:vi.bookCloseDate,sortOrder:"ascending",width:new e.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"reportSent",value:vi.reportSent,sortOrder:"ascending",width:new e.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:Di,sortOrder:"ascending",width:new e.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"customerSuccessManager",value:Ai,sortOrder:"ascending",width:new e.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"preparer",value:Li,sortOrder:"ascending",width:new e.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"reviewer",value:Oi,sortOrder:"ascending",width:new e.ResponsiveSized(216,216),isThreadAllowed:!0},{key:"apAnalyst",value:Mi,sortOrder:"ascending",width:new e.ResponsiveSized(216,216),isThreadAllowed:!0},{key:"taxStatus",value:Ni,sortOrder:"ascending",width:new e.ResponsiveSized(282,282),isThreadAllowed:!0},{key:"taxLead",value:zi,sortOrder:"ascending",width:new e.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:Fi,sortOrder:"ascending",width:new e.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"annualRecurringRevenue",value:Vi,sortOrder:"ascending",width:new e.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"productVerticals",value:Bi,sortOrder:"ascending",width:new e.ResponsiveSized(360,360),isThreadAllowed:!1},{key:"realmId",value:_i,sortOrder:"ascending",width:new e.ResponsiveSized(120,120),isThreadAllowed:!1}];Hi.map(e=>e.key);var Wi=(e=>(e.CUSTOMER="customer",e.TEAM="team",e))(Wi||{});const Ui=({activeEntity:e,teamRatingLastUpdatedBy:t,customerRatingLastUpdatedBy:o})=>e===Wi.CUSTOMER?o:e===Wi.TEAM?t:void 0,Gi=({activeEntity:e,customerRatingLastUpdatedDate:t,teamRatingLastUpdatedDate:o})=>e===Wi.CUSTOMER?t:e===Wi.TEAM?o:void 0,qi=({teamRating:e,teamNote:t,customerRating:o,customerNote:n,activeEntity:r})=>{const i=(({activeEntity:e,teamRating:t,customerRating:o})=>e===Wi.CUSTOMER?o:e===Wi.TEAM?t:void 0)({activeEntity:r,teamRating:e,customerRating:o}),s=(({activeEntity:e,teamNote:t,customerNote:o})=>e===Wi.CUSTOMER?o:e===Wi.TEAM?t:"")({activeEntity:r,teamNote:t,customerNote:n});return{savedOption:i,savedNote:s}},Ki=e=>`\n---------------\n${e}`,Yi=e=>p.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("circle",{cx:17,cy:22,r:16,stroke:"currentColor",strokeWidth:1.5,strokeDasharray:"3 3"}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.5 16H16V21H11V22.5H16V28H17.5V22.5H23V21H17.5V16Z",fill:"currentColor"}),p.createElement("rect",{x:20,width:18,height:18,rx:9,fill:"currentColor"}),p.createElement("path",{d:"M30.9863 10.2227H32.4512C32.4043 10.7812 32.248 11.2793 31.9824 11.7168C31.7168 12.1504 31.3438 12.4922 30.8633 12.7422C30.3828 12.9922 29.7988 13.1172 29.1113 13.1172C28.584 13.1172 28.1094 13.0234 27.6875 12.8359C27.2656 12.6445 26.9043 12.375 26.6035 12.0273C26.3027 11.6758 26.0723 11.252 25.9121 10.7559C25.7559 10.2598 25.6777 9.70508 25.6777 9.0918V8.38281C25.6777 7.76953 25.7578 7.21484 25.918 6.71875C26.082 6.22266 26.3164 5.79883 26.6211 5.44727C26.9258 5.0918 27.291 4.82031 27.7168 4.63281C28.1465 4.44531 28.6289 4.35156 29.1641 4.35156C29.8438 4.35156 30.418 4.47656 30.8867 4.72656C31.3555 4.97656 31.7188 5.32227 31.9766 5.76367C32.2383 6.20508 32.3984 6.71094 32.457 7.28125H30.9922C30.9531 6.91406 30.8672 6.59961 30.7344 6.33789C30.6055 6.07617 30.4141 5.87695 30.1602 5.74023C29.9062 5.59961 29.5742 5.5293 29.1641 5.5293C28.8281 5.5293 28.5352 5.5918 28.2852 5.7168C28.0352 5.8418 27.8262 6.02539 27.6582 6.26758C27.4902 6.50977 27.3633 6.80859 27.2773 7.16406C27.1953 7.51562 27.1543 7.91797 27.1543 8.37109V9.0918C27.1543 9.52148 27.1914 9.91211 27.2656 10.2637C27.3438 10.6113 27.4609 10.9102 27.6172 11.1602C27.7773 11.4102 27.9805 11.6035 28.2266 11.7402C28.4727 11.877 28.7676 11.9453 29.1113 11.9453C29.5293 11.9453 29.8672 11.8789 30.125 11.7461C30.3867 11.6133 30.584 11.4199 30.7168 11.166C30.8535 10.9082 30.9434 10.5938 30.9863 10.2227Z"})),Zi=e=>p.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("circle",{cx:17,cy:22,r:16,stroke:"currentColor",strokeWidth:1.5,strokeDasharray:"3 3"}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.5 16H16V21H11V22.5H16V28H17.5V22.5H23V21H17.5V16Z",fill:"currentColor"}),p.createElement("rect",{x:20,width:18,height:18,rx:9,fill:"currentColor"}),p.createElement("path",{d:"M32.2109 11.834V13H26.2871V11.834H32.2109ZM32.0762 5.37695L26.832 13H25.8477V12.0684L31.1094 4.46875H32.0762V5.37695ZM31.5312 4.46875V5.64062H25.8828V4.46875H31.5312Z"})),Xi=o.button`
|
|
827
827
|
background: none;
|
|
828
828
|
border: none;
|
|
829
829
|
cursor: pointer;
|
|
@@ -923,14 +923,14 @@
|
|
|
923
923
|
border-radius: 50%;
|
|
924
924
|
justify-content: center;
|
|
925
925
|
color: ${e=>e.theme.colors.champion};
|
|
926
|
-
`,
|
|
926
|
+
`,Es=o.div`
|
|
927
927
|
margin: ${e.Space.sp2} 5px 6px;
|
|
928
928
|
border-radius: 50%;
|
|
929
929
|
width: ${e.Space.sp1};
|
|
930
930
|
height: ${e.Space.sp1};
|
|
931
931
|
background-color: ${e=>e.theme.colors.grey1};
|
|
932
932
|
order: 2;
|
|
933
|
-
`,
|
|
933
|
+
`,vs=({time:t,user:o})=>e.jsxRuntimeExports.jsxs(Rs,{children:[Boolean(o)&&e.jsxRuntimeExports.jsx(Cs,{children:void 0!==o?.photo?e.jsxRuntimeExports.jsx(ws,{src:o?.photo.href,alt:gs,onError:({currentTarget:t})=>{t.onerror=null,t.src=e.AvatarSVG},loading:"lazy"}):e.jsxRuntimeExports.jsx(e.EntityAvatarWithInitials,{firstName:o?.firstName??"",lastName:o?.lastName??""})}),e.jsxRuntimeExports.jsxs(js,{children:[o&&e.jsxRuntimeExports.jsx(bs,{children:`${o.firstName} ${o.lastName}`}),Boolean(t)&&e.jsxRuntimeExports.jsxs(fs,{children:[null!=t&&e.jsxRuntimeExports.jsxs(ys,{children:[e.jsxRuntimeExports.jsx(e.SvgClock,{width:e.Space.sp3,height:e.Space.sp3}),r.zeniDate(t.toISOString()).format(t.year()===r.dateNow().year()?xs.MMMDFormat:xs.MMMDCommaYYYYformat)]}),e.jsxRuntimeExports.jsx(Es,{}),null!=t&&e.jsxRuntimeExports.jsx(Ss,{children:r.zeniDate(t.toISOString()).format(hs.hhmmAFormat)})]})]})]}),{cockpit:{management:{customerSatisfaction:{noteLabel:$s,updateNoteLabel:ks}}}}=e.appLocale.getLocalizedStrings(),Ts=o.div`
|
|
934
934
|
display: flex;
|
|
935
935
|
flex-direction: column;
|
|
936
936
|
`,Is=o.div`
|
|
@@ -949,7 +949,7 @@
|
|
|
949
949
|
justify-content: flex-end;
|
|
950
950
|
column-gap: ${e.Space.sp3};
|
|
951
951
|
flex: 1;
|
|
952
|
-
`,Ls=({customerSatisfactionOptions:t,noteValue:o,selectedOption:n,savedOption:r,lastUpdatedBy:i,lastUpdatedTime:s,saveBtnDisabled:a,onCancel:l,onSave:d,onOptionChange:c,onNoteChange:p})=>{const u=e=>{p&&p(e)};return e.jsxRuntimeExports.jsxs(Ts,{children:[e.jsxRuntimeExports.jsx(Is,{selectedOption:n,children:e.jsxRuntimeExports.jsx(ds,{onChange:c,value:n,customerSatisfactionOptions:t})}),(()=>{if(null==n)return null;const t=null==r?$s:r==n?"":ks;return e.jsxRuntimeExports.jsxs(Ps,{children:[e.jsxRuntimeExports.jsx(ms,{label:t,onChange:u,value:o}),e.jsxRuntimeExports.jsxs(Ds,{children:[i&&s&&e.jsxRuntimeExports.jsx(
|
|
952
|
+
`,Ls=({customerSatisfactionOptions:t,noteValue:o,selectedOption:n,savedOption:r,lastUpdatedBy:i,lastUpdatedTime:s,saveBtnDisabled:a,onCancel:l,onSave:d,onOptionChange:c,onNoteChange:p})=>{const u=e=>{p&&p(e)};return e.jsxRuntimeExports.jsxs(Ts,{children:[e.jsxRuntimeExports.jsx(Is,{selectedOption:n,children:e.jsxRuntimeExports.jsx(ds,{onChange:c,value:n,customerSatisfactionOptions:t})}),(()=>{if(null==n)return null;const t=null==r?$s:r==n?"":ks;return e.jsxRuntimeExports.jsxs(Ps,{children:[e.jsxRuntimeExports.jsx(ms,{label:t,onChange:u,value:o}),e.jsxRuntimeExports.jsxs(Ds,{children:[i&&s&&e.jsxRuntimeExports.jsx(vs,{time:s,user:i}),e.jsxRuntimeExports.jsxs(As,{children:[e.jsxRuntimeExports.jsx(e.Button,{size:"small",label:"Cancel",onClick:l}),e.jsxRuntimeExports.jsx(e.Button,{label:"Save",disabled:a,variant:"primary",onClick:d,size:"small"})]})]})]})})()]})},Os=({open:t,onClose:o,anchorEl:n,children:r})=>{const i=e.useTheme();return e.jsxRuntimeExports.jsx(e.Popover,{anchorEl:n,open:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{style:{width:"416px",marginTop:"6px",background:i.colors.grey5}},onClose:o,children:r})},Ms=o.div`
|
|
953
953
|
display: flex;
|
|
954
954
|
column-gap: ${e.Space.sp3};
|
|
955
955
|
align-items: center;
|
|
@@ -1015,7 +1015,7 @@
|
|
|
1015
1015
|
`,ea=o(e.SmallRegularSp)`
|
|
1016
1016
|
text-align: left;
|
|
1017
1017
|
color: ${e=>e.theme.colors.important};
|
|
1018
|
-
`,ta=e=>p.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M6 8H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M6 6H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M9.5 14.5C9.62209 14.5 9.73252 14.4545 9.81934 14.3818C9.83066 14.3724 9.843 14.364 9.85352 14.3535L13.3535 10.8535C13.4221 10.7849 13.4706 10.6965 13.4902 10.5977C13.4966 10.5657 13.5 10.533 13.5 10.5V2.5C13.5 2.23479 13.3946 1.98051 13.207 1.79297C13.0195 1.60543 12.7652 1.5 12.5 1.5H3.5C3.23478 1.5 2.98051 1.60543 2.79297 1.79297C2.60543 1.98051 2.5 2.23478 2.5 2.5V13.5C2.5 13.7652 2.60543 14.0195 2.79297 14.207C2.9805 14.3946 3.23478 14.5 3.5 14.5H9.5ZM3.5 2.5H12.5V10H9.5C9.22386 10 9 10.2239 9 10.5V13.5H3.5V2.5ZM10 11H11.793L10 12.793V11Z",fill:"currentColor"})),oa=e=>p.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M11 14.9629H2V3.86499",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M10.0559 8.31177H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M10.0559 5.7395H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M6.52014 5.73978L7.163 6.38264L8.44871 5.09692",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M6.52014 8.31107L7.163 8.95393L8.44871 7.66821",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M13.5591 1.02539H4.74212C4.49865 1.02539 4.30127 1.36118 4.30127 1.77539V12.2754C4.30127 12.6896 4.49865 13.0254 4.74212 13.0254H13.5591C13.8026 13.0254 14 12.6896 14 12.2754V1.77539C14 1.36118 13.8026 1.02539 13.5591 1.02539Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{cockpit:{management:{productVerticals:{placeholder:na},editMonthInsight:ra,createMonthInsight:ia,monthInsightNotReady:sa,monthInsightsCanBeSentFromDashboard:aa,sendMonthInsightsFromDashboardWhenReady:la,monthInsightsCanBeEditedFromDashboard:da,monthEndHistoryUnavailable:ca}},dateFormat:pa,common:ua}=e.appLocale.getLocalizedStrings(),ma=pa.visual.MMMMFormat,xa=ua.texts.monthInsightSent,ha={status:ua.texts.status,group:ua.texts.group,plans:ua.texts.plans,controller:ua.texts.controller,customerSuccessManager:ua.texts.csManager,preparer:ua.texts.preparer,reviewer:ua.texts.reviewer,apAnalyst:ua.texts.apAnalyst,reportSent:ua.texts.date,taxStatus:ua.texts.status,taxLead:ua.texts.taxLead},ga=["status","group","reportSent","taxStatus","customerSatisfaction"],ya=({reportSent:t,hasMonthEndEmailHistory:o,onReportSentClick:n})=>{if(null==t.date)return e.jsxRuntimeExports.jsx(ja,{children:ua.strings.hyphen});const r=`${ua.datePicker.businessDay} ${t.businessDay??ua.strings.empty}${ua.strings.colon} ${t.date.format(pa.visual.DMMMFormat)}`;return o?e.jsxRuntimeExports.jsx(ja,{onClick:n,children:r}):e.jsxRuntimeExports.jsx(e.Tooltip,{placement:"bottom-end",variant:"small-description",data:ca,style:{color:e.Colors.championDark,marginTop:e.Space.sp2},display:"flex",children:e.jsxRuntimeExports.jsx(ja,{children:r})})},Sa=({companyView:o,hasMonthEndEmailHistory:n,companiesExcludedFromMonthEndReport:i,showDetailsPageLink:s,allUsers:a,loggedInUserRole:l,companyNameSticky:d,totalHeight:c,isExpenseAutomationEnabledForUser:p,addThreadRequestThreadId:u,targetElementFromNavigation:m,resetTargetElementFromNavigation:x,setNoteData:h,setElementRef:g,setAddThreadRequestThreadId:y,changeHandlers:S,onCompanyNameClicked:C,onPassportIconClicked:f,onTaskIconClicked:b,onViewDetailsLinkClicked:j,onMonthEndReportPageClick:R,showMonthEndReportHistoricData:w,isProductVerticalsColumnVisible:v=!1,onProductVerticalsChanged:E,isRealmIdColumnVisible:$=!1,realmIdUpdateFetchState:k,onRealmIdReset:T,onRealmIdUpdate:I})=>{const[P,D]=t.useState(null),A=e.useWindowSizeContext(),L=e.useForm({mode:"all"}),[O,M]=t.useState(!1),{companyId:N,name:z}=o.company.company.companyInfo,F=function(e){const t=[];return e.isBookkeepingEnabled&&t.push("bookkeeping"),e.isBillPayEnabled&&t.push("billPay"),e.isReimbursementEnabled&&t.push("reimbursement"),e.isTaxEnabled&&t.push("tax"),e.isPayrollEnabled&&t.push("payroll"),e.isCfoEnabled&&t.push("cfo"),t}(function(e){const t=e.company.company.featuresActivationInfo;return{isBillPayEnabled:t?.isBillPayFeatureEnabled??!1,isBookkeepingEnabled:t?.isBookkeepingEnabled??!1,isCfoEnabled:t?.isCfoEnabled??!1,isPayrollEnabled:t?.isPayrollEnabled??!1,isReimbursementEnabled:t?.isReimbursementFeatureEnabled??!1,isTaxEnabled:t?.isTaxEnabled??!1}}(o)),V={allOptions:(B=F,Nn.map(e=>({value:e,label:Un[e],isDisabled:Wn(e)||B.includes(e),isFiltered:!1}))),selectedOptions:F};var B;const _=t.useRef(F);t.useEffect(()=>{_.current=F,L.setValue("productVerticals",V)},[N]);const H=["companyData.status","companyData.group","companyData.controller","companyData.customerSuccessManager","companyData.preparer","companyData.reviewer","companyData.apAnalyst","companyData.reportSent","companyData.taxStatus","companyData.taxLead","companyData.customerSatisfaction"],W=`cockpit_${N}`,U="management.notes",{threads:G,isLoading:q}=e.useFilteredThreads({entityType:U,companyId:N},!1),{openThread:K,threads:Y,addThread:Z,removeThread:X,setOpenThread:Q}=t.useContext(e.ThreadsContext),J=null!==K?Y.get(K):null,ee=!0===K?.includes(N),te=null!=K&&null==Y.get(K)&&ee,oe=null!=u&&Y.get(u)?.metadata.companyId===N;t.useEffect(()=>{const t=L.watch((t,{name:o})=>{if(null!=o&&o.startsWith("companyData.")&&null!=t.companyData&&e.defer(()=>((e,t)=>{H.includes(e)&&S(N,t)})(o,function(e,t){const o={users:[]},n=t.split(".")[1];if(za(n))return{[n]:e[n]};{const{selectedUsers:t,deSelectedUsers:r}=e[n];return null==r||0==r?.length?t.forEach(e=>{!0===e.isUserSelectionUpdated&&o.users?.push(Fa(n,e.userId,e.isRoleSelected))}):r.forEach(e=>{o.users?.push(Fa(n,e.userId,e.isRoleSelected))}),{users:o.users}}}(t.companyData,o))),"productVerticals"===o&&null!=t.productVerticals){const e=t.productVerticals.selectedOptions,o=function(e,t){const o={};for(const n of On)t.includes(n)&&!e.includes(n)&&("bookkeeping"===n?o.isBookkeepingEnabled=!0:"billPay"===n?o.isBillPayEnabled=!0:"reimbursement"===n&&(o.isReimbursementEnabled=!0));return o}(_.current,e);_.current=e,Object.keys(o).length>0&&E?.(N,o)}});return()=>{t.unsubscribe()}});const ne=function(e,t){return{companyName:e.company.company.companyInfo.name,companyId:e.company.company.companyInfo.companyId,parentSubsidiaryInfo:e.company.company.parentSubsidiaryInfo,status:{allStatuses:e.company.schema.status,selectedValue:e.company.schema.status.find(t=>t.code===e.company.company.managementInfo.statusCode)},group:{allGroups:e.company.schema.companyGroup,selectedValue:e.company.schema.companyGroup.find(t=>t.id===e.company.company.managementInfo.companyGroupId)},plansAndAddons:fi([...new Set(Ma(e).concat(Na(e)))]),controller:{allUsers:t,selectedUsers:e.controllers.map(e=>e.user)},customerSuccessManager:{allUsers:t,selectedUsers:e.customerSuccessManagers.map(e=>e.user)},preparer:{allUsers:t,selectedUsers:e.preparers.map(e=>e.user)},reviewer:{allUsers:t,selectedUsers:e.reviewers.map(e=>e.user)},apAnalyst:{allUsers:t,selectedUsers:e.apAnalysts.map(e=>e.user)},reportSent:{showBusinessDay:!0,maxDate:r.dateNow(),date:e.company.company.managementInfo.lastReportSentDate,businessDay:e.company.company.managementInfo.lastReportSentBusinessDay},taxStatus:{allTaxStatuses:e.company.schema.taxStatus,selectedValue:e.company.schema.taxStatus.find(t=>t.code===e.company.company.managementInfo.taxStatusCode)},taxLead:{allUsers:t,selectedUsers:e.taxLeads.map(e=>e.user)},monthlyRecurringRevenue:e.primarySubscription?.summary?.summary.monthlyRecurringRevenue,annualRecurringRevenue:e.primarySubscription?.summary?.summary.annualRecurringRevenue,customerSatisfaction:e.company.company.managementInfo.customerSatisfaction??{customerNote:"",teamNote:""}}}(o,a),re=()=>{R?.(o)},ie=l?.userRoles?.includes("admin"),se=o.company.company.configInfo.isMonthEndReportInDraft,ae=r.canSendMonthEndEmailReport(o,i),le=r.shouldEnableCalendarPickerForLastReportSent(o,i),de=o.company.company.companyInfo.bookCloseDate,ce=o.company.company.managementInfo.lastReportSentDate,pe=o.taskSummary?.count??0,ue=t.useCallback(()=>{!0===K?.includes(e.NEW_THREAD_SUFFIX)&&X(K),null!=u&&y(void 0)},[u,K,X,y]),me=t.useCallback(t=>{if(t===K)Q(null);else if(Y.has(t))Q(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toManagementSortKeyType(n),N,z);Z(t,{type:"thread",visibility:"public",id:t,roomId:W,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),Q(t)}},[N,z,K,Y,Z,Q,W]),xe=t.useCallback((t,o,n=!1)=>{const r=Hi.find(e=>e.key===o);if(x(),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;ue(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"management",key:r.key});if(t.target instanceof HTMLElement||t.target instanceof SVGElement)if(!0===n&&t.target instanceof HTMLElement)D(t.target.parentElement);else if(t.target instanceof HTMLElement){const e=yr(t.target,xr);D(e||t.target)}else{const e=t.target.closest(`.${xr}`);e instanceof HTMLElement&&D(e)}const i=[...e.getFilteredThreads(Y,{entityType:o,companyId:N},"both")],s=i.length>0&&i[0].length>0?i[0][0]:gr("management",r.key,N);Y.has(s)?me(s):u===s?y(void 0):(y(s),Q(null))}},[Y,N,u,me,y,Q,x,ue]),he=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("management",t,N);y(void 0),me(o)},[N,y,me]),ge=()=>{null!=ne.reportSent.date&&w(N,ne.reportSent.date)},ye=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:W,addThreadRequestThreadId:u,openThreadId:K,threadStyle:t.threadStyle,openThreadMetadata:J?.metadata??null,onElementClick:xe,onAddThreadClick:he,targetElement:m??P});return e.jsxRuntimeExports.jsxs(e.FormProvider,{...L,children:[!0===O?e.jsxRuntimeExports.jsx(mi,{companyDomain:o.company.company.companyInfo.primaryEmailDomain,hasAdminRole:ie,onCancelClick:()=>M(!1),onConnectClick:()=>C(o)}):null,e.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{x(),null!=u&&(y(void 0),u.includes(e.NEW_THREAD_SUFFIX)&&X(u))},children:e.jsxRuntimeExports.jsx(fa,{windowSize:A,hoverParentSubsidiaryTag:s??!1,isThreadOpen:ee||oe,totalHeight:c,isCreationInProgress:te,children:Hi.map((t,r)=>{const i=e.toCollaborationEntityType({tab:"management",key:t.key}),a=Hi.length-(v?0:1)-($?0:1)-2<=r,l=[...e.getFilteredThreads(Y,{entityType:i,companyId:N},"both")],c=l.length>0&&l[0].length>0?l[0][0]:gr("management",t.key,N),x=Y.get(c),y=null!=x&&!1===x.resolved,S=c===K,R=u===c;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs($a,{companyNameSticky:d,columnWidth:t.width,windowSize:A,isThreadOpen:S||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),ref:e=>{g(N,t.key,e)},children:[e.jsxRuntimeExports.jsxs(va,{children:[e.jsxRuntimeExports.jsx(Ea,{className:"company-name",onClick:e=>{e.preventDefault(),e.stopPropagation(),0===o.company.schema.status.length?M(!0):C(o)},children:ne.companyName}),ne.parentSubsidiaryInfo&&e.jsxRuntimeExports.jsx(Pr,{companyId:ne.companyId,isEnabled:s,onViewDetailsLinkClicked:j,companyName:ne.companyName,parentSubsidiaryRelationship:ne.parentSubsidiaryInfo}),e.jsxRuntimeExports.jsx(e.ThreadComponent,{isElementThreadOpen:S,targetElement:m??P,roomId:W,openThreadId:K,openThreadMetadata:J?.metadata??null})]}),e.jsxRuntimeExports.jsxs(ka,{children:[e.jsxRuntimeExports.jsxs(Pa,{onClick:e=>{e.preventDefault(),h({roomId:W,companyId:N,companyName:z,entityType:U})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:G.length,isLoading:q}),e.jsxRuntimeExports.jsx(Da,{})]}),e.jsxRuntimeExports.jsx(Ta,{onClick:e=>{e.preventDefault(),f(o)},children:e.jsxRuntimeExports.jsx(Ia,{className:"passportIcon"})})]}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:y,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:xe}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("management",t.key,N),addThreadRequestThreadId:u,itemKey:t.key,onAddThreadClick:he})]},c);case"task":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsxs(Aa,{onClick:e=>{e.preventDefault(),b?.(o)},children:[e.jsxRuntimeExports.jsx(La,{}),pe>0?e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{isLoading:!1,count:pe}):null]}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"status":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(Yr,{name:"companyData.status",value:ne.status}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"group":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(vi,{name:"companyData.group",value:ne.group}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"plans":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(yi,{chips:ne.plansAndAddons}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"satisfaction":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},windowSize:A,columnWidth:t.width,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(zs,{name:"companyData.customerSatisfaction",value:ne.customerSatisfaction}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"bookCloseDate":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[de?.format(pa.visual.MMMDCommaYYYYformat)??ua.strings.hyphen,ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"reportSent":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),style:{alignItems:"center"},children:[le&&e.jsxRuntimeExports.jsx(wa,{children:e.jsxRuntimeExports.jsx(e.ZeniDatePickerField,{name:"companyData.reportSent",defaultValue:ne.reportSent})}),!le&&e.jsxRuntimeExports.jsx(ya,{reportSent:ne.reportSent,onReportSentClick:ge,hasMonthEndEmailHistory:n}),e.jsxRuntimeExports.jsx(Ra,{children:p?e.jsxRuntimeExports.jsx(Ba,{isMonthEndReportInDraft:se,bookCloseDate:de,lastReportSentDate:ce,enableCompanyMonthEndReportBtn:ae,handleMonthEndReportPageClick:re}):e.jsxRuntimeExports.jsx(Ca,{isMonthEndReportInDraft:se,bookCloseDate:de,lastReportSentDate:ce,enableCompanyMonthEndReportBtn:ae,isExpenseAutomationEnabledForUser:p,handleMonthEndReportPageClick:re})}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"customerSuccessManager":case"preparer":case"reviewer":case"apAnalyst":case"controller":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(e.UserMultiSelectField,{name:`companyData.${t.key}`,value:ne[t.key],placeholderLabel:ha[t.key],pickerStyles:{titleTextStyle:e.textStyles.largeRegular,multiValueLabelTitleStyle:e.textStyles.largeRegular}}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"taxStatus":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(_s,{name:"companyData.taxStatus",value:ne.taxStatus}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"taxLead":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},hasLeadingGap:!0,columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(e.UserMultiSelectField,{name:"companyData.taxLead",value:ne.taxLead,placeholderLabel:ha.taxLead,pickerStyles:{titleTextStyle:e.textStyles.largeRegular,multiValueLabelTitleStyle:e.textStyles.largeRegular}}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"monthlyRecurringRevenue":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.amountToString("0,0",ne.monthlyRecurringRevenue),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"annualRecurringRevenue":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.amountToString("0,0",ne.annualRecurringRevenue),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"productVerticals":return v?e.jsxRuntimeExports.jsx(ba,{ref:e=>{g(N,t.key,e)},hasLeadingGap:!0,columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:e.jsxRuntimeExports.jsx(qn,{name:"productVerticals",defaultValue:V,placeholder:na,selectedOptionsAlignment:"left"})},c):null;case"realmId":return $?e.jsxRuntimeExports.jsx(ba,{ref:e=>{g(N,t.key,e)},hasLeadingGap:!0,columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:e.jsxRuntimeExports.jsx(Gs,{companyId:N,tenantName:ne.companyName,updateFetchState:k,onReset:e=>T?.(e),onUpdate:(e,t)=>I?.(e,t)})},c):null;default:return null}})})})})]})},Ca=({enableCompanyMonthEndReportBtn:t,isMonthEndReportInDraft:o,isExpenseAutomationEnabledForUser:n,bookCloseDate:r,lastReportSentDate:i,handleMonthEndReportPageClick:s})=>e.jsxRuntimeExports.jsx(e.Button,{size:"small",onClick:s,variant:"primary",label:Va(t,o,r,i),disabled:!t||n,style:t?{}:{background:"transparent"},prefixIcon:t&&o?e.jsxRuntimeExports.jsx(Oa,{}):void 0}),fa=o.div`
|
|
1018
|
+
`,ta=e=>p.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M6 8H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M6 6H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M9.5 14.5C9.62209 14.5 9.73252 14.4545 9.81934 14.3818C9.83066 14.3724 9.843 14.364 9.85352 14.3535L13.3535 10.8535C13.4221 10.7849 13.4706 10.6965 13.4902 10.5977C13.4966 10.5657 13.5 10.533 13.5 10.5V2.5C13.5 2.23479 13.3946 1.98051 13.207 1.79297C13.0195 1.60543 12.7652 1.5 12.5 1.5H3.5C3.23478 1.5 2.98051 1.60543 2.79297 1.79297C2.60543 1.98051 2.5 2.23478 2.5 2.5V13.5C2.5 13.7652 2.60543 14.0195 2.79297 14.207C2.9805 14.3946 3.23478 14.5 3.5 14.5H9.5ZM3.5 2.5H12.5V10H9.5C9.22386 10 9 10.2239 9 10.5V13.5H3.5V2.5ZM10 11H11.793L10 12.793V11Z",fill:"currentColor"})),oa=e=>p.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M11 14.9629H2V3.86499",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M10.0559 8.31177H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M10.0559 5.7395H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M6.52014 5.73978L7.163 6.38264L8.44871 5.09692",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M6.52014 8.31107L7.163 8.95393L8.44871 7.66821",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M13.5591 1.02539H4.74212C4.49865 1.02539 4.30127 1.36118 4.30127 1.77539V12.2754C4.30127 12.6896 4.49865 13.0254 4.74212 13.0254H13.5591C13.8026 13.0254 14 12.6896 14 12.2754V1.77539C14 1.36118 13.8026 1.02539 13.5591 1.02539Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{cockpit:{management:{productVerticals:{placeholder:na},editMonthInsight:ra,createMonthInsight:ia,monthInsightNotReady:sa,monthInsightsCanBeSentFromDashboard:aa,sendMonthInsightsFromDashboardWhenReady:la,monthInsightsCanBeEditedFromDashboard:da,monthEndHistoryUnavailable:ca}},dateFormat:pa,common:ua}=e.appLocale.getLocalizedStrings(),ma=pa.visual.MMMMFormat,xa=ua.texts.monthInsightSent,ha={status:ua.texts.status,group:ua.texts.group,plans:ua.texts.plans,controller:ua.texts.controller,customerSuccessManager:ua.texts.csManager,preparer:ua.texts.preparer,reviewer:ua.texts.reviewer,apAnalyst:ua.texts.apAnalyst,reportSent:ua.texts.date,taxStatus:ua.texts.status,taxLead:ua.texts.taxLead},ga=["status","group","reportSent","taxStatus","customerSatisfaction"],ya=({reportSent:t,hasMonthEndEmailHistory:o,onReportSentClick:n})=>{if(null==t.date)return e.jsxRuntimeExports.jsx(ja,{children:ua.strings.hyphen});const r=`${ua.datePicker.businessDay} ${t.businessDay??ua.strings.empty}${ua.strings.colon} ${t.date.format(pa.visual.DMMMFormat)}`;return o?e.jsxRuntimeExports.jsx(ja,{onClick:n,children:r}):e.jsxRuntimeExports.jsx(e.Tooltip,{placement:"bottom-end",variant:"small-description",data:ca,style:{color:e.Colors.championDark,marginTop:e.Space.sp2},display:"flex",children:e.jsxRuntimeExports.jsx(ja,{children:r})})},Sa=({companyView:o,hasMonthEndEmailHistory:n,companiesExcludedFromMonthEndReport:i,showDetailsPageLink:s,allUsers:a,loggedInUserRole:l,companyNameSticky:d,totalHeight:c,isExpenseAutomationEnabledForUser:p,addThreadRequestThreadId:u,targetElementFromNavigation:m,resetTargetElementFromNavigation:x,setNoteData:h,setElementRef:g,setAddThreadRequestThreadId:y,changeHandlers:S,onCompanyNameClicked:C,onPassportIconClicked:f,onTaskIconClicked:b,onViewDetailsLinkClicked:j,onMonthEndReportPageClick:R,showMonthEndReportHistoricData:w,isProductVerticalsColumnVisible:E=!1,onProductVerticalsChanged:v,isRealmIdColumnVisible:$=!1,realmIdUpdateFetchState:k,onRealmIdReset:T,onRealmIdUpdate:I})=>{const[P,D]=t.useState(null),A=e.useWindowSizeContext(),L=e.useForm({mode:"all"}),[O,M]=t.useState(!1),{companyId:N,name:z}=o.company.company.companyInfo,F=function(e){const t=[];return e.isBookkeepingEnabled&&t.push("bookkeeping"),e.isBillPayEnabled&&t.push("billPay"),e.isReimbursementEnabled&&t.push("reimbursement"),e.isTaxEnabled&&t.push("tax"),e.isPayrollEnabled&&t.push("payroll"),e.isCfoEnabled&&t.push("cfo"),t}(function(e){const t=e.company.company.featuresActivationInfo;return{isBillPayEnabled:t?.isBillPayFeatureEnabled??!1,isBookkeepingEnabled:t?.isBookkeepingEnabled??!1,isCfoEnabled:t?.isCfoEnabled??!1,isPayrollEnabled:t?.isPayrollEnabled??!1,isReimbursementEnabled:t?.isReimbursementFeatureEnabled??!1,isTaxEnabled:t?.isTaxEnabled??!1}}(o)),V={allOptions:(B=F,Nn.map(e=>({value:e,label:Un[e],isDisabled:Wn(e)||B.includes(e),isFiltered:!1}))),selectedOptions:F};var B;const _=t.useRef(F);t.useEffect(()=>{_.current=F,L.setValue("productVerticals",V)},[N]);const H=["companyData.status","companyData.group","companyData.controller","companyData.customerSuccessManager","companyData.preparer","companyData.reviewer","companyData.apAnalyst","companyData.reportSent","companyData.taxStatus","companyData.taxLead","companyData.customerSatisfaction"],W=`cockpit_${N}`,U="management.notes",{threads:G,isLoading:q}=e.useFilteredThreads({entityType:U,companyId:N},!1),{openThread:K,threads:Y,addThread:Z,removeThread:X,setOpenThread:Q}=t.useContext(e.ThreadsContext),J=null!==K?Y.get(K):null,ee=!0===K?.includes(N),te=null!=K&&null==Y.get(K)&&ee,oe=null!=u&&Y.get(u)?.metadata.companyId===N;t.useEffect(()=>{const t=L.watch((t,{name:o})=>{if(null!=o&&o.startsWith("companyData.")&&null!=t.companyData&&e.defer(()=>((e,t)=>{H.includes(e)&&S(N,t)})(o,function(e,t){const o={users:[]},n=t.split(".")[1];if(za(n))return{[n]:e[n]};{const{selectedUsers:t,deSelectedUsers:r}=e[n];return null==r||0==r?.length?t.forEach(e=>{!0===e.isUserSelectionUpdated&&o.users?.push(Fa(n,e.userId,e.isRoleSelected))}):r.forEach(e=>{o.users?.push(Fa(n,e.userId,e.isRoleSelected))}),{users:o.users}}}(t.companyData,o))),"productVerticals"===o&&null!=t.productVerticals){const e=t.productVerticals.selectedOptions,o=function(e,t){const o={};for(const n of On)t.includes(n)&&!e.includes(n)&&("bookkeeping"===n?o.isBookkeepingEnabled=!0:"billPay"===n?o.isBillPayEnabled=!0:"reimbursement"===n&&(o.isReimbursementEnabled=!0));return o}(_.current,e);_.current=e,Object.keys(o).length>0&&v?.(N,o)}});return()=>{t.unsubscribe()}});const ne=function(e,t){return{companyName:e.company.company.companyInfo.name,companyId:e.company.company.companyInfo.companyId,parentSubsidiaryInfo:e.company.company.parentSubsidiaryInfo,status:{allStatuses:e.company.schema.status,selectedValue:e.company.schema.status.find(t=>t.code===e.company.company.managementInfo.statusCode)},group:{allGroups:e.company.schema.companyGroup,selectedValue:e.company.schema.companyGroup.find(t=>t.id===e.company.company.managementInfo.companyGroupId)},plansAndAddons:fi([...new Set(Ma(e).concat(Na(e)))]),controller:{allUsers:t,selectedUsers:e.controllers.map(e=>e.user)},customerSuccessManager:{allUsers:t,selectedUsers:e.customerSuccessManagers.map(e=>e.user)},preparer:{allUsers:t,selectedUsers:e.preparers.map(e=>e.user)},reviewer:{allUsers:t,selectedUsers:e.reviewers.map(e=>e.user)},apAnalyst:{allUsers:t,selectedUsers:e.apAnalysts.map(e=>e.user)},reportSent:{showBusinessDay:!0,maxDate:r.dateNow(),date:e.company.company.managementInfo.lastReportSentDate,businessDay:e.company.company.managementInfo.lastReportSentBusinessDay},taxStatus:{allTaxStatuses:e.company.schema.taxStatus,selectedValue:e.company.schema.taxStatus.find(t=>t.code===e.company.company.managementInfo.taxStatusCode)},taxLead:{allUsers:t,selectedUsers:e.taxLeads.map(e=>e.user)},monthlyRecurringRevenue:e.primarySubscription?.summary?.summary.monthlyRecurringRevenue,annualRecurringRevenue:e.primarySubscription?.summary?.summary.annualRecurringRevenue,customerSatisfaction:e.company.company.managementInfo.customerSatisfaction??{customerNote:"",teamNote:""}}}(o,a),re=()=>{R?.(o)},ie=l?.userRoles?.includes("admin"),se=o.company.company.configInfo.isMonthEndReportInDraft,ae=r.canSendMonthEndEmailReport(o,i),le=r.shouldEnableCalendarPickerForLastReportSent(o,i),de=o.company.company.companyInfo.bookCloseDate,ce=o.company.company.managementInfo.lastReportSentDate,pe=o.taskSummary?.count??0,ue=t.useCallback(()=>{!0===K?.includes(e.NEW_THREAD_SUFFIX)&&X(K),null!=u&&y(void 0)},[u,K,X,y]),me=t.useCallback(t=>{if(t===K)Q(null);else if(Y.has(t))Q(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toManagementSortKeyType(n),N,z);Z(t,{type:"thread",visibility:"public",id:t,roomId:W,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),Q(t)}},[N,z,K,Y,Z,Q,W]),xe=t.useCallback((t,o,n=!1)=>{const r=Hi.find(e=>e.key===o);if(x(),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;ue(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"management",key:r.key});if(t.target instanceof HTMLElement||t.target instanceof SVGElement)if(!0===n&&t.target instanceof HTMLElement)D(t.target.parentElement);else if(t.target instanceof HTMLElement){const e=yr(t.target,xr);D(e||t.target)}else{const e=t.target.closest(`.${xr}`);e instanceof HTMLElement&&D(e)}const i=[...e.getFilteredThreads(Y,{entityType:o,companyId:N},"both")],s=i.length>0&&i[0].length>0?i[0][0]:gr("management",r.key,N);Y.has(s)?me(s):u===s?y(void 0):(y(s),Q(null))}},[Y,N,u,me,y,Q,x,ue]),he=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("management",t,N);y(void 0),me(o)},[N,y,me]),ge=()=>{null!=ne.reportSent.date&&w(N,ne.reportSent.date)},ye=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:W,addThreadRequestThreadId:u,openThreadId:K,threadStyle:t.threadStyle,openThreadMetadata:J?.metadata??null,onElementClick:xe,onAddThreadClick:he,targetElement:m??P});return e.jsxRuntimeExports.jsxs(e.FormProvider,{...L,children:[!0===O?e.jsxRuntimeExports.jsx(mi,{companyDomain:o.company.company.companyInfo.primaryEmailDomain,hasAdminRole:ie,onCancelClick:()=>M(!1),onConnectClick:()=>C(o)}):null,e.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{x(),null!=u&&(y(void 0),u.includes(e.NEW_THREAD_SUFFIX)&&X(u))},children:e.jsxRuntimeExports.jsx(fa,{windowSize:A,hoverParentSubsidiaryTag:s??!1,isThreadOpen:ee||oe,totalHeight:c,isCreationInProgress:te,children:Hi.map((t,r)=>{const i=e.toCollaborationEntityType({tab:"management",key:t.key}),a=Hi.length-(E?0:1)-($?0:1)-2<=r,l=[...e.getFilteredThreads(Y,{entityType:i,companyId:N},"both")],c=l.length>0&&l[0].length>0?l[0][0]:gr("management",t.key,N),x=Y.get(c),y=null!=x&&!1===x.resolved,S=c===K,R=u===c;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs($a,{companyNameSticky:d,columnWidth:t.width,windowSize:A,isThreadOpen:S||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),ref:e=>{g(N,t.key,e)},children:[e.jsxRuntimeExports.jsxs(Ea,{children:[e.jsxRuntimeExports.jsx(va,{className:"company-name",onClick:e=>{e.preventDefault(),e.stopPropagation(),0===o.company.schema.status.length?M(!0):C(o)},children:ne.companyName}),ne.parentSubsidiaryInfo&&e.jsxRuntimeExports.jsx(Pr,{companyId:ne.companyId,isEnabled:s,onViewDetailsLinkClicked:j,companyName:ne.companyName,parentSubsidiaryRelationship:ne.parentSubsidiaryInfo}),e.jsxRuntimeExports.jsx(e.ThreadComponent,{isElementThreadOpen:S,targetElement:m??P,roomId:W,openThreadId:K,openThreadMetadata:J?.metadata??null})]}),e.jsxRuntimeExports.jsxs(ka,{children:[e.jsxRuntimeExports.jsxs(Pa,{onClick:e=>{e.preventDefault(),h({roomId:W,companyId:N,companyName:z,entityType:U})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:G.length,isLoading:q}),e.jsxRuntimeExports.jsx(Da,{})]}),e.jsxRuntimeExports.jsx(Ta,{onClick:e=>{e.preventDefault(),f(o)},children:e.jsxRuntimeExports.jsx(Ia,{className:"passportIcon"})})]}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:y,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:xe}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("management",t.key,N),addThreadRequestThreadId:u,itemKey:t.key,onAddThreadClick:he})]},c);case"task":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsxs(Aa,{onClick:e=>{e.preventDefault(),b?.(o)},children:[e.jsxRuntimeExports.jsx(La,{}),pe>0?e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{isLoading:!1,count:pe}):null]}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"status":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(Yr,{name:"companyData.status",value:ne.status}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"group":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(Ei,{name:"companyData.group",value:ne.group}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"plans":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(yi,{chips:ne.plansAndAddons}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"satisfaction":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},windowSize:A,columnWidth:t.width,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(zs,{name:"companyData.customerSatisfaction",value:ne.customerSatisfaction}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"bookCloseDate":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[de?.format(pa.visual.MMMDCommaYYYYformat)??ua.strings.hyphen,ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"reportSent":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),style:{alignItems:"center"},children:[le&&e.jsxRuntimeExports.jsx(wa,{children:e.jsxRuntimeExports.jsx(e.ZeniDatePickerField,{name:"companyData.reportSent",defaultValue:ne.reportSent})}),!le&&e.jsxRuntimeExports.jsx(ya,{reportSent:ne.reportSent,onReportSentClick:ge,hasMonthEndEmailHistory:n}),e.jsxRuntimeExports.jsx(Ra,{children:p?e.jsxRuntimeExports.jsx(Ba,{isMonthEndReportInDraft:se,bookCloseDate:de,lastReportSentDate:ce,enableCompanyMonthEndReportBtn:ae,handleMonthEndReportPageClick:re}):e.jsxRuntimeExports.jsx(Ca,{isMonthEndReportInDraft:se,bookCloseDate:de,lastReportSentDate:ce,enableCompanyMonthEndReportBtn:ae,isExpenseAutomationEnabledForUser:p,handleMonthEndReportPageClick:re})}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"customerSuccessManager":case"preparer":case"reviewer":case"apAnalyst":case"controller":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(e.UserMultiSelectField,{name:`companyData.${t.key}`,value:ne[t.key],placeholderLabel:ha[t.key],pickerStyles:{titleTextStyle:e.textStyles.largeRegular,multiValueLabelTitleStyle:e.textStyles.largeRegular}}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"taxStatus":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(_s,{name:"companyData.taxStatus",value:ne.taxStatus}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"taxLead":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},hasLeadingGap:!0,columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.jsxRuntimeExports.jsx(e.UserMultiSelectField,{name:"companyData.taxLead",value:ne.taxLead,placeholderLabel:ha.taxLead,pickerStyles:{titleTextStyle:e.textStyles.largeRegular,multiValueLabelTitleStyle:e.textStyles.largeRegular}}),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"monthlyRecurringRevenue":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.amountToString("0,0",ne.monthlyRecurringRevenue),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"annualRecurringRevenue":return e.jsxRuntimeExports.jsxs(ba,{ref:e=>{g(N,t.key,e)},columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:[e.amountToString("0,0",ne.annualRecurringRevenue),ye({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:c,threadStyle:a?{right:e.Space.sp0}:void 0})]},c);case"productVerticals":return E?e.jsxRuntimeExports.jsx(ba,{ref:e=>{g(N,t.key,e)},hasLeadingGap:!0,columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:e.jsxRuntimeExports.jsx(qn,{name:"productVerticals",defaultValue:V,placeholder:na,selectedOptionsAlignment:"left"})},c):null;case"realmId":return $?e.jsxRuntimeExports.jsx(ba,{ref:e=>{g(N,t.key,e)},hasLeadingGap:!0,columnWidth:t.width,windowSize:A,isThreadOpen:ee||R,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>xe(e,t.key),children:e.jsxRuntimeExports.jsx(Gs,{companyId:N,tenantName:ne.companyName,updateFetchState:k,onReset:e=>T?.(e),onUpdate:(e,t)=>I?.(e,t)})},c):null;default:return null}})})})})]})},Ca=({enableCompanyMonthEndReportBtn:t,isMonthEndReportInDraft:o,isExpenseAutomationEnabledForUser:n,bookCloseDate:r,lastReportSentDate:i,handleMonthEndReportPageClick:s})=>e.jsxRuntimeExports.jsx(e.Button,{size:"small",onClick:s,variant:"primary",label:Va(t,o,r,i),disabled:!t||n,style:t?{}:{background:"transparent"},prefixIcon:t&&o?e.jsxRuntimeExports.jsx(Oa,{}):void 0}),fa=o.div`
|
|
1019
1019
|
display: flex;
|
|
1020
1020
|
flex-direction: row;
|
|
1021
1021
|
align-items: center;
|
|
@@ -1101,7 +1101,7 @@
|
|
|
1101
1101
|
`,wa=o.div`
|
|
1102
1102
|
border-right: ${e=>`1px solid ${e.theme.colors.grey2}`};
|
|
1103
1103
|
padding-right: ${e.Space.sp3};
|
|
1104
|
-
`,
|
|
1104
|
+
`,Ea=o.div``,va=o(e.LargeMediumSp)`
|
|
1105
1105
|
word-break: break-word;
|
|
1106
1106
|
margin-right: 10px;
|
|
1107
1107
|
cursor: pointer;
|
|
@@ -1246,7 +1246,7 @@
|
|
|
1246
1246
|
width: ${e=>e.width.valuePx(e.windowSize)};
|
|
1247
1247
|
display: flex;
|
|
1248
1248
|
justify-content: start;
|
|
1249
|
-
`,{collaboration:{threads:{placeholder:{addANewComment:Ja,replyAComment:el},tooltip:{resolveComment:tl,unResolveComment:ol}}},dateFormat:{analytics:{YYYYDashMMDashDDFormat:nl}},common:{texts:{comments:rl}}}=e.appLocale.getLocalizedStrings(),il={managementRightPadding:new e.ResponsiveSized(e.sp[3],e.sp[8])},sl=t.createContext(void 0),al=({index:t,style:o,data:n})=>{const r=e.useWindowSizeContext(),{loggedInUserRole:i,showDetailsPageLink:s,addThreadRequestThreadId:a,targetElement:l,setNoteData:d,managementView:c,resetTargetElementFromNavigation:p,setElementRef:u,companiesExcludedFromMonthEndReport:m,makeCompanyNameSticky:x,changeHandlers:h,expenseAutomationEnabledCompanies:g,onCompanyNameClicked:y,onPassportIconClicked:S,onTaskIconClicked:C,onMonthEndReportPageClick:f,onViewDetailsLinkClicked:b,setAddThreadRequestThreadId:j,showMonthEndReportHistoricData:R,isProductVerticalsColumnVisible:w,onProductVerticalsChanged:
|
|
1249
|
+
`,{collaboration:{threads:{placeholder:{addANewComment:Ja,replyAComment:el},tooltip:{resolveComment:tl,unResolveComment:ol}}},dateFormat:{analytics:{YYYYDashMMDashDDFormat:nl}},common:{texts:{comments:rl}}}=e.appLocale.getLocalizedStrings(),il={managementRightPadding:new e.ResponsiveSized(e.sp[3],e.sp[8])},sl=t.createContext(void 0),al=({index:t,style:o,data:n})=>{const r=e.useWindowSizeContext(),{loggedInUserRole:i,showDetailsPageLink:s,addThreadRequestThreadId:a,targetElement:l,setNoteData:d,managementView:c,resetTargetElementFromNavigation:p,setElementRef:u,companiesExcludedFromMonthEndReport:m,makeCompanyNameSticky:x,changeHandlers:h,expenseAutomationEnabledCompanies:g,onCompanyNameClicked:y,onPassportIconClicked:S,onTaskIconClicked:C,onMonthEndReportPageClick:f,onViewDetailsLinkClicked:b,setAddThreadRequestThreadId:j,showMonthEndReportHistoricData:R,isProductVerticalsColumnVisible:w,onProductVerticalsChanged:E,isRealmIdColumnVisible:v,realmIdUpdateStatusByCompanyId:$,onRealmIdReset:k,onRealmIdUpdate:T}=n,I=c.companies[t],{companyId:P}=I.company.company.companyInfo,D=g.includes(P);return e.jsxRuntimeExports.jsx(pl,{style:{...o,width:"fit-content",minWidth:"100%",padding:`${e.Space.sp0} ${il.managementRightPadding.valuePx(r)} ${e.Space.sp3} ${e.Space.sp0}`},children:e.jsxRuntimeExports.jsx(Sa,{onViewDetailsLinkClicked:b,showDetailsPageLink:s,loggedInUserRole:i,addThreadRequestThreadId:a,targetElementFromNavigation:l,resetTargetElementFromNavigation:p,setNoteData:d,setElementRef:u,isExpenseAutomationEnabledForUser:D,totalHeight:"number"==typeof o.height?o.height:M,changeHandlers:h,companyView:c.companies[t],hasMonthEndEmailHistory:c.companies[t].hasMonthEndEmailHistory,allUsers:c.zeniUsers.values,companyNameSticky:x,onCompanyNameClicked:y,onPassportIconClicked:S,onTaskIconClicked:C,onMonthEndReportPageClick:f,setAddThreadRequestThreadId:j,companiesExcludedFromMonthEndReport:m,showMonthEndReportHistoricData:R,isProductVerticalsColumnVisible:w,onProductVerticalsChanged:E,isRealmIdColumnVisible:v,realmIdUpdateFetchState:$?.[P],onRealmIdReset:k,onRealmIdUpdate:T})},P)},ll=t.forwardRef((o,n)=>{const{children:r,style:i,...s}=o,{makeCompanyNameSticky:a,uiState:l,totalAnnualRecurringRevenue:d,totalMonthlyRecurringRevenue:c,onColumnSortConfigChanged:p,isProductVerticalsColumnVisible:u,isRealmIdColumnVisible:m}=t.useContext(sl);return e.jsxRuntimeExports.jsxs(cl,{ref:n,style:{...i,width:"auto"},...s,children:[e.jsxRuntimeExports.jsx(_a,{companyNameSticky:a,onColumnSortConfigChanged:p,isProductVerticalsColumnVisible:u,isRealmIdColumnVisible:m,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),e.jsxRuntimeExports.jsx(ul,{children:r}),e.jsxRuntimeExports.jsx(Ya,{companyNameSticky:a,totalMRRAmount:e.amountToString("0,0",c),totalARRAmount:e.amountToString("0,0",d),isProductVerticalsColumnVisible:u,isRealmIdColumnVisible:m})]})});ll.displayName="Management list view inner element type";const dl=o.div`
|
|
1250
1250
|
/** Subtract top so list can occupy remaining available height */
|
|
1251
1251
|
height: calc(100vh - 110px);
|
|
1252
1252
|
max-width: 99.9%;
|
|
@@ -1259,7 +1259,7 @@
|
|
|
1259
1259
|
position: relative;
|
|
1260
1260
|
width: auto;
|
|
1261
1261
|
height: 100%;
|
|
1262
|
-
`,ml=(t,o)=>{const{note:n,lastReportSentDate:r,...i}=t,{note:s,lastReportSentDate:a,...l}=o;return e.isEqual(i,l)&&e.isEqual(n,s)&&r?.format(nl)===a?.format(nl)},xl=t.memo(({managementView:o,companiesExcludedFromMonthEndReport:r,showDetailsPageLink:i=!0,loggedInUser:s,loggedInUserRole:a,expenseAutomationEnabledCompanies:l,onColumnSortConfigChanged:d,changeHandlers:c,onCompanyNameClicked:p,onTaskIconClicked:u,onPassportIconClicked:m,onScroll:x,onViewDetailsLinkClicked:h,onMonthEndReportPageClick:g,showMonthEndReportHistoricData:y,initialOpenThreadRequest:S,isProductVerticalsColumnVisible:C=!1,onProductVerticalsChanged:f,isRealmIdColumnVisible:b=!1,realmIdUpdateStatusByCompanyId:j,onRealmIdReset:R,onRealmIdUpdate:w})=>{const
|
|
1262
|
+
`,ml=(t,o)=>{const{note:n,lastReportSentDate:r,...i}=t,{note:s,lastReportSentDate:a,...l}=o;return e.isEqual(i,l)&&e.isEqual(n,s)&&r?.format(nl)===a?.format(nl)},xl=t.memo(({managementView:o,companiesExcludedFromMonthEndReport:r,showDetailsPageLink:i=!0,loggedInUser:s,loggedInUserRole:a,expenseAutomationEnabledCompanies:l,onColumnSortConfigChanged:d,changeHandlers:c,onCompanyNameClicked:p,onTaskIconClicked:u,onPassportIconClicked:m,onScroll:x,onViewDetailsLinkClicked:h,onMonthEndReportPageClick:g,showMonthEndReportHistoricData:y,initialOpenThreadRequest:S,isProductVerticalsColumnVisible:C=!1,onProductVerticalsChanged:f,isRealmIdColumnVisible:b=!1,realmIdUpdateStatusByCompanyId:j,onRealmIdReset:R,onRealmIdUpdate:w})=>{const E=e.useWindowSizeContext(),v=t.useRef(null),[$,k]=t.useState(null),[T,I]=t.useState(null),{setOpenThread:P,setRequestToOpenThread:D,requestToOpenThread:A,isLoading:L}=t.useContext(e.ThreadsContext);t.useEffect(()=>{null!=S&&"Completed"===o.fetchState&&!1===L&&D(S)},[S,o.fetchState,L,D]);const[O,N]=t.useState(void 0),F=t.useRef(null),V=t.useRef([]),B=!("small"===E||"medium-compact"===E),{uiState:_,totalAnnualRecurringRevenue:H,totalMonthlyRecurringRevenue:W}=o,U=_.scrollYOffset??0,G=t.useCallback((e,t,n)=>{const r=o.companies.findIndex(t=>t.company.company.companyInfo.companyId===e),i=Hi.findIndex(e=>e.key===t);-1!==r&&-1!==i&&(null==V.current[r]?V.current[r]=[n]:V.current[r][i]=n)},[o.companies]),q=t.useCallback(e=>{let t=o.companies[e].company.company.companyInfo.name.length;const n=o.companies[e].company.company.parentSubsidiaryInfo;return n.parentInfo?t+=10:n.subsidiaryInfo&&(t+=15),t>z?120:M},[o.companies]),K=t.useCallback(()=>{F.current=null,D(null)},[D]);t.useEffect(()=>{v.current&&v.current.resetAfterIndex(0)},[o]),t.useEffect(()=>{if(null!=A&&null!=$){const{companyId:e,entityType:t}=A,[n,r]=t.split("."),i=o.companies.findIndex(t=>t.company.company.companyInfo.companyId===e),s=Hi.findIndex(e=>e.key===r);-1===i||$.visibleStartIndex<=i&&$.visibleStopIndex>=i||v.current?.scrollToItem(i,"center"),setTimeout(()=>{const t=V.current[i],o=t?.[s];null!=o&&(F.current={companyId:e,target:o});const n=V.current[i]?.[0]?.getBoundingClientRect().bottom,r=V.current[i]?.[0]?.getBoundingClientRect().top;if(null!=n&&null!=r&&(window.innerHeight>=n&&window.innerHeight>=r||r<0)){const t=V.current[i][s];null!=t&&(F.current={companyId:e,target:t}),V.current[i][s]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const a=setInterval(()=>{const t=V.current[i]?.[s]?.getBoundingClientRect().left,o=V.current[i]?.[s]?.getBoundingClientRect().right,n=V.current[i]?.[s]?.offsetWidth;if(F.current?.companyId===e&&null!=t&&null!=n&&null!=o&&(t<window.innerWidth-n||o<window.innerWidth)){clearInterval(a);const e=A.threadId,t=A.onThreadShownCallback;!0===Boolean(e)&&(D(null),P(A.threadId),t?.())}},500);setTimeout(()=>{clearInterval(a),D(null)},2e3)}},[A,$,P,D]);const Y=t.useMemo(()=>({isProductVerticalsColumnVisible:C,isRealmIdColumnVisible:b,makeCompanyNameSticky:B,uiState:_,totalAnnualRecurringRevenue:H,totalMonthlyRecurringRevenue:W,onColumnSortConfigChanged:d}),[C,b,B,_,H,W,d]);return e.jsxRuntimeExports.jsx(dl,{children:e.jsxRuntimeExports.jsxs(sl.Provider,{value:Y,children:[e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:n})=>e.jsxRuntimeExports.jsx(e.VariableSizeList,{height:t,innerElementType:ll,itemCount:o.companies.length,itemSize:q,onItemsRendered:e=>k(e),itemData:{managementView:o,loggedInUser:s,loggedInUserRole:a,showDetailsPageLink:i,makeCompanyNameSticky:B,companiesExcludedFromMonthEndReport:r,addThreadRequestThreadId:O,expenseAutomationEnabledCompanies:l,targetElement:F.current?.target,resetTargetElementFromNavigation:K,setElementRef:G,onCompanyNameClicked:p,onPassportIconClicked:m,onTaskIconClicked:u,onMonthEndReportPageClick:g,setAddThreadRequestThreadId:N,changeHandlers:c,setNoteData:I,onViewDetailsLinkClicked:h,showMonthEndReportHistoricData:y,isProductVerticalsColumnVisible:C,onProductVerticalsChanged:f,isRealmIdColumnVisible:b,realmIdUpdateStatusByCompanyId:j,onRealmIdReset:R,onRealmIdUpdate:w},width:n,ref:v,overscanCount:1,onScroll:({scrollOffset:e})=>{x?.(e)},initialScrollOffset:U??0,children:al})}),null!=T?e.jsxRuntimeExports.jsx(n.RoomProvider,{id:T.roomId,children:e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${T.companyName} ${rl}`,filter:{application:"cockpit",companyId:T.companyId,entityType:T.entityType,isGlobalComment:!1,tab:"management"},isLoading:!1,threadMetadata:{companyName:T.companyName,companyId:T.companyId,entityId:T.companyId,entityType:T.entityType,isGlobalComment:!1,application:"cockpit",tab:"management",url:window.location.href},textOverrides:{composerPlaceholder:Ja,replyComposerPlaceholder:el,threadResolve:tl,threadUnResolve:ol},onThreadClick:e=>null,onCloseAllThreadsDrawer:()=>I(null)})}):null]})})},(t,o)=>{if(t.managementView.companies.length!=o.managementView.companies.length)return!1;let n=!0;for(let r=0;r<t.managementView.companies.length;++r){const i=t.managementView.companies[r],s=o.managementView.companies[r];if(n=ml(i.company.company.managementInfo,s.company.company.managementInfo)&&e.isEqual(i.company.company.featuresActivationInfo,s.company.company.featuresActivationInfo),!n)break}for(let e=0;e<t.managementView.companies.length;++e){const r=t.managementView.companies[e],i=o.managementView.companies[e];if(n=n&&r.company.company.configInfo.isMonthEndReportInDraft===i.company.company.configInfo.isMonthEndReportInDraft&&r.hasMonthEndEmailHistory===i.hasMonthEndEmailHistory,!n)break}return n=n&&e.isEqual(t.managementView.zeniUsers.values,o.managementView.zeniUsers.values),n=n&&t.managementView.uiState.sortKey===o.managementView.uiState.sortKey&&t.managementView.uiState.sortOrder===o.managementView.uiState.sortOrder&&t.isProductVerticalsColumnVisible===o.isProductVerticalsColumnVisible&&t.isRealmIdColumnVisible===o.isRealmIdColumnVisible,n=n&&e.isEqual(t.realmIdUpdateStatusByCompanyId,o.realmIdUpdateStatusByCompanyId),n}),{cockpit:{emptySearchOnFilters:hl,emptySearchTextSecondLine:gl,management:{productVerticals:{options:yl}}},common:{settings:{label:{billPay:Sl}},texts:{bookkeeping:Cl,payroll:fl,reimbursement:bl,sorryWeCouldnTFindAnyResults:jl,tax:Rl}}}=e.appLocale.getLocalizedStrings(),wl=o.div`
|
|
1263
1263
|
display: flex;
|
|
1264
1264
|
width: 100%;
|
|
1265
1265
|
height: calc(100vh - 110px);
|
|
@@ -1269,14 +1269,14 @@
|
|
|
1269
1269
|
background-color: ${e=>e.theme.colors.grey5};
|
|
1270
1270
|
box-shadow: ${t=>`${e.Space.sp0} 2px ${e.Space.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
1271
1271
|
background-color: ${e=>e.theme.colors.grey4};
|
|
1272
|
-
`,
|
|
1272
|
+
`,El=o.div`
|
|
1273
1273
|
height: calc(100% - 75px);
|
|
1274
1274
|
padding: ${t=>`${e.Space.sp0} ${e.Space.sp0} ${e.Space.sp0} ${Tn.cockpitLeftPadding.valuePx(t.windowSize)}`};
|
|
1275
|
-
`,
|
|
1275
|
+
`,vl=o.div`
|
|
1276
1276
|
height: calc(100vh - 45px);
|
|
1277
1277
|
overflow-y: hidden;
|
|
1278
1278
|
background-color: ${e=>e.theme.colors.grey4};
|
|
1279
|
-
`,$l=({managementView:t,showDetailsPageLink:o=!0,loggedInUser:n,companiesExcludedFromMonthEndReport:r,expenseAutomationEnabledCompanies:i,initialOpenThreadRequest:s,isFilterApplied:a,loggedInUserRole:l,onColumnSortConfigChanged:d,changeHandlers:c,onScroll:p,onViewDetailsLinkClicked:u,onCockpitReloadData:m,onCompanyNameClicked:x,onTaskIconClicked:h,onPassportIconClicked:g,onClearFilter:y,onMonthEndReportPageClick:S,showMonthEndReportHistoricData:C,isProductVerticalsColumnVisible:f,onProductVerticalsChanged:b,isRealmIdColumnVisible:j,realmIdUpdateStatusByCompanyId:R,onRealmIdReset:w,onRealmIdUpdate:
|
|
1279
|
+
`,$l=({managementView:t,showDetailsPageLink:o=!0,loggedInUser:n,companiesExcludedFromMonthEndReport:r,expenseAutomationEnabledCompanies:i,initialOpenThreadRequest:s,isFilterApplied:a,loggedInUserRole:l,onColumnSortConfigChanged:d,changeHandlers:c,onScroll:p,onViewDetailsLinkClicked:u,onCockpitReloadData:m,onCompanyNameClicked:x,onTaskIconClicked:h,onPassportIconClicked:g,onClearFilter:y,onMonthEndReportPageClick:S,showMonthEndReportHistoricData:C,isProductVerticalsColumnVisible:f,onProductVerticalsChanged:b,isRealmIdColumnVisible:j,realmIdUpdateStatusByCompanyId:R,onRealmIdReset:w,onRealmIdUpdate:E})=>{const v=e.useWindowSizeContext();return"Error"===t.fetchState||"Error"===t.zeniUsers.fetchState?e.jsxRuntimeExports.jsx(Ln,{onCockpitReloadData:m,selectedCockpitOption:"management"}):"In-Progress"===t.fetchState||"Not-Started"===t.fetchState||"In-Progress"===t.zeniUsers.fetchState||"Not-Started"===t.zeniUsers.fetchState?e.jsxRuntimeExports.jsx(wl,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"ExtraLarge",start:!0})}):0===t.companies.length?a?e.jsxRuntimeExports.jsx(e.EmptySearchResults,{emptySearchTextFirstLine:hl,emptySearchTextSecondLine:gl,filtersApplied:!0,onClearFilter:y}):e.jsxRuntimeExports.jsx(e.EmptySearchResults,{emptySearchTextFirstLine:jl,emptySearchTextSecondLine:gl}):e.jsxRuntimeExports.jsx(El,{windowSize:v,children:e.jsxRuntimeExports.jsx(xl,{showDetailsPageLink:o,onColumnSortConfigChanged:d,changeHandlers:c,onScroll:p,onViewDetailsLinkClicked:u,managementView:t,loggedInUser:n,loggedInUserRole:l,expenseAutomationEnabledCompanies:i,onCompanyNameClicked:x,onTaskIconClicked:h,onPassportIconClicked:g,onMonthEndReportPageClick:S,companiesExcludedFromMonthEndReport:r,showMonthEndReportHistoricData:C,initialOpenThreadRequest:s,isProductVerticalsColumnVisible:f,onProductVerticalsChanged:b,isRealmIdColumnVisible:j,realmIdUpdateStatusByCompanyId:R,onRealmIdReset:w,onRealmIdUpdate:E})})},kl=e=>{const t=e.zeniUsers.values,o=B,{companies:n}=e;return o.reduce((o,r)=>{switch(r.value){case"companyGroupId":{if(0===n.length)return{...o,[r.value]:[]};const e=n[0].company.schema.companyGroup.map(e=>{const t=e;return{label:t.name,value:t.id}});return{...o,[r.value]:e}}case"statusCode":{if(0===n.length)return{...o,[r.value]:[]};const e=n[0].company.schema.status.map(e=>{const t=e;return{label:t.name,value:t.code}});return{...o,[r.value]:e}}case"taxStatusCode":{if(0===n.length)return{...o,[r.value]:[]};const e=n[0].company.schema.taxStatus.map(e=>{const t=e;return{label:t.name,value:t.code,avatar:""}});return{...o,[r.value]:e}}case"controllerUserIds":case"apAnalystUserIds":case"preparerUserIds":case"reviewerUserIds":case"taxLeadUserIds":case"customerSuccessManagerUserIds":{const e=t.map(e=>({label:Boolean(e.firstName)||Boolean(e.lastName)?`${e.firstName} ${e.lastName}`:e.email,value:e.userId,photo:e.photo,email:e.email}));return{...o,[r.value]:e}}case"plans":{const t=e.subscriptionPlansZeniSkus.map(e=>({label:e,value:e})).sort((e,t)=>e.label.localeCompare(t.label));return{...o,[r.value]:t}}case"annualRecurringRevenue":return{...o,[r.value]:U};case"monthlyRecurringRevenue":return{...o,[r.value]:G};case"customerSatisfaction":{const e=Object.values(Ft).map(e=>({label:e.name,value:e.id}));return{...o,[r.value]:e}}case"zeniSatisfaction":{const e=Object.values(Vt).map(e=>({label:e.name,value:e.id}));return{...o,[r.value]:e}}case"productVerticals":{const e=Nn.map(e=>({label:{...yl,bookkeeping:Cl,billPay:Sl,reimbursement:bl,tax:Rl,payroll:fl}[e],value:e}));return{...o,[r.value]:e}}default:return{...o,[r.value]:[]}}},{})},{cockpit:{taskManager:{header:Tl}},common:Il}=e.appLocale.getLocalizedStrings(),Pl=[{key:"name",value:Il.texts.name,sortOrder:"ascending",width:new e.ResponsiveSized(176,176),isThreadAllowed:!0},{key:"taskName",value:Tl.taskName,sortOrder:"ascending",width:new e.ResponsiveSized(320,320),isThreadAllowed:!0},{key:"status",value:Il.texts.status,sortOrder:"ascending",width:new e.ResponsiveSized(100,100),isThreadAllowed:!0},{key:"priority",value:Il.texts.priority,sortOrder:"ascending",width:new e.ResponsiveSized(90,90),isThreadAllowed:!0},{key:"dueDate",value:Il.texts.dueDate,sortOrder:"ascending",width:new e.ResponsiveSized(100,100),isThreadAllowed:!0},{key:"assignee",value:Il.texts.assignee,sortOrder:"ascending",width:new e.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"tags",value:Il.texts.tags,sortOrder:"ascending",width:new e.ResponsiveSized(115,115),isThreadAllowed:!0},{key:"createdBy",value:Il.texts.createdBy,sortOrder:"ascending",width:new e.ResponsiveSized(140,140),isThreadAllowed:!0}];function Dl({sortConfig:o,onColumnSortConfigChanged:n}){const i=e.useWindowSizeContext(),[s,a]=t.useState(e.cloneDeep(Pl));t.useEffect(()=>{const e=[...s];for(const t of e)t.key===o.sortKey?t.sortOrder=o.sortOrder:t.sortOrder="ascending";a(e)},[o.sortKey,o.sortOrder]);const l=(e,t)=>{let r=t;o.sortKey===e&&(r="ascending"===t?"descending":"ascending"),n(e,r)};return e.jsxRuntimeExports.jsx(Ll,{height:N,children:s.map(t=>e.jsxRuntimeExports.jsxs(Ol,{sortDataValue:o.sortKey,actualDataValue:t.key,wrapperWidth:t.width,windowSize:i,children:[e.jsxRuntimeExports.jsxs(zl,{onClick:()=>l(r.toTaskManagerSortKeyType(t.key),t.sortOrder),children:[e.jsxRuntimeExports.jsx(e.ExtraSmallRegular,{children:t.value}),e.jsxRuntimeExports.jsx(Al,{sortDataValue:o.sortKey,headerdata:t,children:e.jsxRuntimeExports.jsx(e.SvgArrowTailTop,{width:12,height:12})})]}),e.jsxRuntimeExports.jsx(Nl,{isVisible:o.sortKey===t.key&&"dueDate"!==t.key,children:e.jsxRuntimeExports.jsx(Ml,{onClick:()=>l("dueDate","ascending")})})]},t.key))})}Pl.map(e=>e.key);const Al=o.div`
|
|
1280
1280
|
display: flex;
|
|
1281
1281
|
align-items: center;
|
|
1282
1282
|
transform: ${e=>e.sortDataValue===e.headerdata.key&&"descending"===e.headerdata.sortOrder?"rotate(180deg)":"rotate(0deg)"};
|
|
@@ -1333,7 +1333,7 @@
|
|
|
1333
1333
|
&:hover {
|
|
1334
1334
|
color: ${e=>e.theme.colors.primary};
|
|
1335
1335
|
}
|
|
1336
|
-
`,{dateFormat:Fl,common:{strings:{empty:Vl,hyphen:Bl,plus:_l}}}=e.appLocale.getLocalizedStrings(),Hl=({totalHeight:o,task:n,addThreadRequestThreadId:i,setElementRef:s,setAddThreadRequestThreadId:a,onRowClick:l})=>{const d=e.useWindowSizeContext(),c=e.useTheme(),p=n.assignees.length>0?n.assignees[0]:void 0,u=null!=p?.firstName&&null!=p?.lastName?`${p.firstName} ${p.lastName}`:p?.email??Vl,{companyId:m,name:x}=n.company.companyInfo,h=null!==n.createdByUser?.firstName&&null!=n.createdByUser?.lastName?`${n.createdByUser.firstName} ${n.createdByUser.lastName}`:n.createdByUser?.email??Vl,g=n.assignees.length,y=n.task.id,{openThread:S,threads:C,addThread:f,removeThread:b,setOpenThread:j,setRequestToOpenThread:R}=t.useContext(e.ThreadsContext),w=null!==S?C.get(S):null,
|
|
1336
|
+
`,{dateFormat:Fl,common:{strings:{empty:Vl,hyphen:Bl,plus:_l}}}=e.appLocale.getLocalizedStrings(),Hl=({totalHeight:o,task:n,addThreadRequestThreadId:i,setElementRef:s,setAddThreadRequestThreadId:a,onRowClick:l})=>{const d=e.useWindowSizeContext(),c=e.useTheme(),p=n.assignees.length>0?n.assignees[0]:void 0,u=null!=p?.firstName&&null!=p?.lastName?`${p.firstName} ${p.lastName}`:p?.email??Vl,{companyId:m,name:x}=n.company.companyInfo,h=null!==n.createdByUser?.firstName&&null!=n.createdByUser?.lastName?`${n.createdByUser.firstName} ${n.createdByUser.lastName}`:n.createdByUser?.email??Vl,g=n.assignees.length,y=n.task.id,{openThread:S,threads:C,addThread:f,removeThread:b,setOpenThread:j,setRequestToOpenThread:R}=t.useContext(e.ThreadsContext),w=null!==S?C.get(S):null,E=!0===S?.includes(m),v=null!=S&&null==C.get(S)&&E,$=null!=i&&C.get(i)?.metadata.companyId===m,k=`cockpit_${m}`,T=t.useCallback(()=>{!0===S?.includes(e.NEW_THREAD_SUFFIX)&&b(S),null!=i&&a(void 0)},[i,S,b,a]),I=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:k,addThreadRequestThreadId:i,openThreadId:S,threadStyle:t.threadStyle,openThreadMetadata:w?.metadata??null,onElementClick:D,onAddThreadClick:A}),P=t.useCallback(t=>{if(t===S)j(null);else if(C.has(t))j(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toTaskManagerSortKeyType(n),m,x,y);f(t,{type:"thread",visibility:"public",id:t,roomId:k,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),j(t)}},[S,C,j,m,x,y,f,k]),D=t.useCallback((t,o,n=!1)=>{const r=Pl.find(e=>e.key===o);if(R(null),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;T(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"taskManager",key:r.key}),n=[...e.getFilteredThreads(C,{entityType:o,entityId:y,companyId:m},"both")],s=n.length>0&&n[0].length>0?n[0][0]:gr("taskManager",r.key,m+_l+y);C.has(s)?P(s):i===s?a(void 0):(a(s),j(null))}},[C,y,m,i,P,a,j,R,T]),A=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("taskManager",t,m+_l+y);a(void 0),P(o)},[m,y,a,P]);return e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{R(null),null!=i&&(a(void 0),i.includes(e.NEW_THREAD_SUFFIX)&&b(i))},children:e.jsxRuntimeExports.jsx(Wl,{onClick:()=>l(n.company.companyInfo.primaryEmailDomain,n.task.id),windowSize:d,isThreadOpen:E||$,totalHeight:o,isCreationInProgress:v,children:Pl.map((t,o)=>{const i=e.toCollaborationEntityType({tab:"taskManager",key:t.key}),a=Pl.length-2<=o,l=[...e.getFilteredThreads(C,{entityType:i,entityId:y,companyId:m},"both")],x=l.length>0&&l[0].length>0?l[0][0]:gr("taskManager",t.key,m+_l+y),f=C.get(x),b=null!=f&&!1===f.resolved,j=x===S;switch(t.key){case"name":return e.jsxRuntimeExports.jsxs(Gl,{ref:e=>{s(m,t.key,e)},columnWidth:t.width,windowSize:d,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>D(e,t.key),children:[e.jsxRuntimeExports.jsx(Ul,{children:n.company.companyInfo.name}),I({isElementThreadOpen:j,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:a?{right:e.Space.sp0}:void 0})]},x);case"taskName":return e.jsxRuntimeExports.jsxs(Gl,{ref:e=>{s(m,t.key,e)},columnWidth:t.width,windowSize:d,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>D(e,t.key),children:[e.jsxRuntimeExports.jsx(e.StandardRegular,{children:n.task.name}),I({isElementThreadOpen:j,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:a?{right:e.Space.sp0}:void 0})]},x);case"status":return e.jsxRuntimeExports.jsxs(Gl,{ref:e=>{s(m,t.key,e)},columnWidth:t.width,windowSize:d,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>D(e,t.key),children:[e.getRichLabel(n.task.status.code,c),I({isElementThreadOpen:j,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:a?{right:e.Space.sp0}:void 0})]},x);case"priority":return e.jsxRuntimeExports.jsxs(Gl,{ref:e=>{s(m,t.key,e)},columnWidth:t.width,windowSize:d,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>D(e,t.key),children:[e.jsxRuntimeExports.jsxs(Yl,{children:[e.jsxRuntimeExports.jsx(Zl,{color:e.getLabelColor(n.task.priority.code,c)}),e.jsxRuntimeExports.jsx(e.StandardRegular,{children:(R=n.task.priority.code,r.allTaskPriority.find(e=>e.code===R)?.name??Vl)})]}),I({isElementThreadOpen:j,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:a?{right:e.Space.sp0}:void 0})]},x);case"dueDate":return e.jsxRuntimeExports.jsxs(Gl,{ref:e=>{s(m,t.key,e)},columnWidth:t.width,windowSize:d,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>D(e,t.key),children:[e.jsxRuntimeExports.jsx(e.StandardRegular,{children:null!=n.task.dueDate?n.task.dueDate.format(Fl.visual.MMMDCommaYYYYformat):Bl}),I({isElementThreadOpen:j,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:a?{right:e.Space.sp0}:void 0})]},x);case"assignee":return e.jsxRuntimeExports.jsxs(Gl,{ref:e=>{s(m,t.key,e)},columnWidth:t.width,windowSize:d,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>D(e,t.key),children:[e.jsxRuntimeExports.jsx(e.ZeniAvatar,{personBasic:p,styles:{width:e.Space.sp4,height:e.Space.sp4}}),e.jsxRuntimeExports.jsx(ql,{children:u}),g>1?e.jsxRuntimeExports.jsx(Kl,{children:e.jsxRuntimeExports.jsx(e.SmallRegular,{children:`${_l}${g-1}`})}):null,I({isElementThreadOpen:j,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:a?{right:e.Space.sp0}:void 0})]},x);case"tags":return e.jsxRuntimeExports.jsxs(Gl,{ref:e=>{s(m,t.key,e)},columnWidth:t.width,windowSize:d,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>D(e,t.key),children:[n.task.tagIds.length>0?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.getTagLabel(n.task.tagIds,n.tags)}):null,I({isElementThreadOpen:j,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:a?{right:e.Space.sp0}:void 0})]},x);case"createdBy":return e.jsxRuntimeExports.jsxs(Gl,{ref:e=>{s(m,t.key,e)},columnWidth:t.width,windowSize:d,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>D(e,t.key),children:[e.jsxRuntimeExports.jsx(e.ZeniAvatar,{personBasic:n.createdByUser,styles:{width:e.Space.sp4,height:e.Space.sp4}}),e.jsxRuntimeExports.jsx(ql,{children:h}),I({isElementThreadOpen:j,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:a?{right:e.Space.sp0}:void 0})]},x);default:return null}var R})})})},Wl=o.div`
|
|
1337
1337
|
display: flex;
|
|
1338
1338
|
min-width: 100%;
|
|
1339
1339
|
flex-direction: row;
|
|
@@ -1479,7 +1479,7 @@
|
|
|
1479
1479
|
color: ${e=>e.theme.colors.grey2};
|
|
1480
1480
|
`,jd=o(e.H5Regular)`
|
|
1481
1481
|
color: ${e=>e.theme.colors.hero};
|
|
1482
|
-
`,Rd={},wd={width:"auto",outline:"none",background:"transparent"},{common:{texts:{anonymousUser:
|
|
1482
|
+
`,Rd={},wd={width:"auto",outline:"none",background:"transparent"},{common:{texts:{anonymousUser:Ed},strings:{atTheRate:vd}}}=e.appLocale.getLocalizedStrings(),$d=({roomId:o,threadMetadata:r,composerPlaceholder:i,isSubmitComment:s=!1,createThreadCallback:a,composerFormStyle:d={},composerEditorStyle:c={}})=>{const p=n.useCreateThread(),u=e.useTheme(),m=t.useCallback(({body:e,attachments:t},o)=>{o.preventDefault(),o.stopPropagation();try{p({body:e,attachments:t,metadata:r}),a()}catch(n){console.log(n)}},[p,a,r]);return e.jsxRuntimeExports.jsx(n.RoomProvider,{id:o,children:e.jsxRuntimeExports.jsx(Ld,{children:e.jsxRuntimeExports.jsxs(l.Composer.Form,{onComposerSubmit:m,style:{...Rd,...d},className:"customThreadComposer",children:[e.jsxRuntimeExports.jsx(l.Composer.Editor,{placeholder:i,style:{...e.textStyles.standardRegular,...wd,color:u.colors.primary,...c},components:{Mention:kd,MentionSuggestions:Td,Link:Dd}}),e.jsxRuntimeExports.jsx(l.Composer.Submit,{asChild:!0,children:e.jsxRuntimeExports.jsx(Ad,{isSubmitComment:s})})]})})})};function kd({mention:t}){const{user:o}=d.useUser(t.id);return e.jsxRuntimeExports.jsx(l.Composer.Mention,{asChild:!0,children:e.jsxRuntimeExports.jsxs(zd,{children:[vd,o?.name||Ed]})})}function Td({mentions:o,selectedMentionId:n}){return 0===o.length?null:e.jsxRuntimeExports.jsx(l.Composer.Suggestions,{asChild:!0,children:e.jsxRuntimeExports.jsx(Od,{children:e.jsxRuntimeExports.jsx(l.Composer.SuggestionsList,{asChild:!0,children:e.jsxRuntimeExports.jsx(Md,{children:o.map(o=>e.jsxRuntimeExports.jsx(t.Suspense,{fallback:e.jsxRuntimeExports.jsx(Id,{}),children:e.jsxRuntimeExports.jsx(Pd,{userId:o.id},o.id)},o.id))})})})})}function Id(){return e.jsxRuntimeExports.jsxs(Nd,{children:[e.jsxRuntimeExports.jsx(Vd,{}),e.jsxRuntimeExports.jsx("span",{children:Ed})]})}function Pd({userId:t}){const{user:o}=d.useUser(t);return e.jsxRuntimeExports.jsx(l.Composer.SuggestionsListItem,{asChild:!0,value:o.userId,children:e.jsxRuntimeExports.jsxs(Nd,{children:[o.avatar?e.jsxRuntimeExports.jsx(Bd,{src:o.avatar,alt:""}):e.jsxRuntimeExports.jsx(Vd,{}),e.jsxRuntimeExports.jsx("span",{children:o.name||o.email||Ed})]})},o.userId)}function Dd({href:t,children:o}){return e.jsxRuntimeExports.jsx(l.Composer.Link,{href:t,asChild:!0,children:e.jsxRuntimeExports.jsx(Fd,{children:o})})}const Ad=({isSubmitComment:o=!1})=>{const{isEmpty:n,submit:r}=l.useComposer();return t.useEffect(()=>{o&&!n&&r()},[o,n,r]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})},Ld=o.div`
|
|
1483
1483
|
.customThreadComposer span[data-slate-placeholder="true"] {
|
|
1484
1484
|
color: ${e=>e.theme.colors.grey1};
|
|
1485
1485
|
}
|
|
@@ -1560,7 +1560,7 @@
|
|
|
1560
1560
|
left: 19%;
|
|
1561
1561
|
position: absolute;
|
|
1562
1562
|
background-color: ${e=>e.theme.colors.primary};
|
|
1563
|
-
`,{dateFormat:Xd,timeFormat:Qd,timeframe:Jd,common:ec}=e.appLocale.getLocalizedStrings(),tc=e=>{if(null!=e){const t=r.dateNow();return Math.abs(t.diff(e,"days"))}};function oc(e){if(null==e)return;const t=r.dateNow();if(Math.abs(t.diff(e,"days"))<=0)return`0 ${Jd.day}`;const[o,n]=e<t?[e,t]:[t,e],i=o.year(),s=o.month(),a=o.date(),l=n.year(),d=n.month();let c=l-i,p=d-s,u=n.date()-a;if(u<0){p--;u+=new Date(l,d,0).getDate()}p<0&&(c--,p+=12);const m=[];return c>0&&m.push(`${c} ${c>1?ec.texts.years:ec.texts.years.slice(0,-1)}`),p>0&&m.push(`${p} ${p>1?ec.texts.months:ec.texts.months.slice(0,-1)}`),u>0&&m.push(`${u} ${u>1?Jd.day:Jd.day.slice(0,-1)}`),m.join(", ")}function nc(e){if(null==e)return ec.strings.hyphen;const t=Math.floor(Number(e)/12),o=Number(e)%12,n=t>1?ec.texts.years:ec.texts.years.slice(0,-1),r=o>1?ec.texts.months:ec.texts.months.slice(0,-1);return 0===t?`${e} ${r}`:0===o?`${t} ${n}`:`${t} ${n}, ${o} ${r}`}const rc=t=>({name:t?.companyInfo.name??"",productVerticals:t?.companyHealthMetric.verticalProductServices??void 0,runway:t?.companyHealthMetric.runway,churnProbabilityPercentage:t?.companyHealthMetric.churnProbabilityPercentage,netPromoterScore:t?.companyHealthMetric.netPromoterScore,customerSatisfactionScore:t?.companyHealthMetric.customerSatisfactionScore,lastReportSent:null!=t?.managementInfo.lastReportSentDate?oc(r.zeniDate(t?.managementInfo.lastReportSentDate.toISOString())):void 0,dashboardLastVisit:null!=t?.companyHealthMetric.customerLastDashboardVisit?r.zeniDate(t?.companyHealthMetric.customerLastDashboardVisit.toISOString()).format(Xd.visual.MMMDCommaYYYYformat):void 0,companyEngagementMetricsUpdatedAt:null!=t?.companyHealthMetric.companyEngagementMetricsUpdatedAt?{date:r.zeniDate(t?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(Xd.visual.MMMDCommaYYYYformat),time:r.zeniDate(t?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(Qd.hhmmAFormat)}:void 0,noOfVerticalsEnabled:t?.noOfProductVerticalsEnabled,renewalDate:null!=t?.companyHealthMetric.subscriptionRenewalDate?oc(r.zeniDate(t?.companyHealthMetric.subscriptionRenewalDate.toISOString())):void 0,lastEngagements:null!=t?t.companyHealthMetric.lastEngagements:[],additionalChurnFactors:null!=t?t.companyHealthMetric.additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]},updatedByUserName:null!=t?.companyHealthMetric.updatedByUser?e.getFullName(t.companyHealthMetric.updatedByUser):void 0}),{cockpit:{health:{header:ic}},common:{texts:{name:sc,churnProbability:ac,controller:lc,csManager:dc,lastUpdated:cc,runway:pc,nps:uc,csat:mc,lastReportSent:xc,subscriptionDate:hc,renewalDate:gc,group:yc,mrr:Sc,externalServicesExposure:Cc,productVerticals:fc}}}=e.appLocale.getLocalizedStrings(),bc=[{key:"companyName",value:sc,sortOrder:"ascending",width:new e.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"churnProbability",value:ac,sortOrder:"ascending",width:new e.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:lc,sortOrder:"ascending",width:new e.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"customerSuccessManager",value:dc,sortOrder:"ascending",width:new e.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"lastEngagement",value:ic.lastEngagement,sortOrder:"ascending",width:new e.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"companyEngagementMetricsUpdatedAt",value:cc,sortOrder:"ascending",width:new e.ResponsiveSized(160,160),isThreadAllowed:!0},{key:"runway",value:pc,sortOrder:"ascending",width:new e.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"netPromoterScore",value:uc,sortOrder:"ascending",width:new e.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"customerSatisfactionScore",value:mc,sortOrder:"ascending",width:new e.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"lastReportSent",value:xc,sortOrder:"ascending",width:new e.ResponsiveSized(250,250),isThreadAllowed:!0},{key:"dashboardLastSeen",value:ic.dashboardLastSeen,sortOrder:"ascending",width:new e.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"subscriptionDate",value:hc,sortOrder:"ascending",width:new e.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"renewalDate",value:gc,sortOrder:"ascending",width:new e.ResponsiveSized(180,180),isThreadAllowed:!0},{key:"group",value:yc,sortOrder:"ascending",width:new e.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:Sc,sortOrder:"ascending",width:new e.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"externalProductServiceExposure",value:Cc,sortOrder:"ascending",width:new e.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"productVerticals",value:fc,sortOrder:"ascending",width:new e.ResponsiveSized(360,360),isThreadAllowed:!0}];bc.map(e=>e.key);const jc=e=>p.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M10.1094 4H2.3764C2.16286 4 1.98975 4.22386 1.98975 4.5V11.5C1.98975 11.7761 2.16286 12 2.3764 12H10.1094C10.323 12 10.4961 11.7761 10.4961 11.5V4.5C10.4961 4.22386 10.323 4 10.1094 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M11.0046 7L14.0046 5V11L11.0046 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),Rc=e.appLocale.getLocalizedStrings(),{common:{texts:{churnProbability:wc,is:vc}}}=Rc;function Ec({companyView:o,healthView:n,companyNameSticky:i,totalHeight:s,addThreadRequestThreadId:a,setNoteData:l,setElementRef:d,setAddThreadRequestThreadId:c,onRowClick:p}){const u=e.useWindowSizeContext(),{common:{strings:{hyphen:m,backspace:x,space:h,colon:g,dot:y},settings:{notifications:{mode:{email:S}}}},cockpit:{health:{detailPage:{churnProbabilityTexts:{for:C,percent:f},notApplicable:b},common:{engagementTypes:j,labels:{lastEngagements:R,factorsThatDecreaseChurnProbability:w,factorsThatIncreaseChurnProbability:v}}}},dateFormat:E}=Rc,{companyInfo:{companyId:$,name:k},companyHealthMetric:T,controllers:I,managementInfo:{lastReportSentDate:P,customerSuccessManagerUserIds:D}}=o,A=rc(o),L=n.zeniUsers.values.filter(e=>D.includes(e.userId)),O=`cockpit_${$}`,M="healthMonitor.notes",{threads:N,isLoading:z}=e.useFilteredThreads({entityType:M,companyId:$},!1),F={name:k,companyId:$,companyGroup:null!=o.companyGroup?o.companyGroup.find(e=>e.id===o.managementInfo.companyGroupId):void 0,monthlyRecurringRevenue:o.monthlyRecurringRevenue,productVerticals:T.verticalProductServices,runway:T.runway,churnProbabilityPercentage:T.churnProbabilityPercentage,netPromoterScore:T.netPromoterScore,customerSatisfactionScore:T.customerSatisfactionScore,controllers:I.map(e=>r.getUserName(e)),customerSuccessManagers:L.map(e=>r.getUserName(e)),lastReportSent:null!=P?r.zeniDate(P.toISOString()):void 0,subscriptionStartDate:null!=T.subscriptionStartDate?r.zeniDate(T.subscriptionStartDate.toISOString()).format(E.visual.MMMDCommaYYYYformat):void 0,renewalDate:null!=T.subscriptionRenewalDate?r.zeniDate(T.subscriptionRenewalDate.toISOString()):void 0,companyEngagementMetricsUpdatedAt:T.companyEngagementMetricsUpdatedAt,externalProductServiceExposure:T.externalProductServiceExposure},{openThread:V,threads:B,addThread:_,removeThread:H,setOpenThread:W,setRequestToOpenThread:U}=t.useContext(e.ThreadsContext),G=t.useRef(null),q=null!==V?B.get(V):null,K=!0===V?.includes($),Y=null!=V&&null==B.get(V)&&K,Z=null!=a&&B.get(a)?.metadata.companyId===$,X=t.useCallback(()=>{!0===V?.includes(e.NEW_THREAD_SUFFIX)&&H(V),null!=a&&c(void 0)},[a,V,H,c]),Q=t.useCallback(t=>{if(t===V)W(null);else if(B.has(t))W(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toHealthSortKeyType(n),$,k);_(t,{type:"thread",visibility:"public",id:t,roomId:O,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),W(t)}},[$,k,V,B,_,W,O]),J=t.useCallback((t,o,n=!1)=>{const r=bc.find(e=>e.key===o);if(U(null),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;X(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"healthMonitor",key:r.key}),n=[...e.getFilteredThreads(B,{entityType:o,companyId:$},"both")],i=n.length>0&&n[0].length>0?n[0][0]:gr("healthMonitor",r.key,$);B.has(i)?Q(i):a===i?c(void 0):(c(i),W(null))}},[B,$,a,Q,c,W,U,X]),ee=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("healthMonitor",t,$);c(void 0),Q(o)},[$,c,Q]),te=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:O,addThreadRequestThreadId:a,openThreadId:V,threadStyle:t.threadStyle,openThreadMetadata:q?.metadata??null,onElementClick:J,onAddThreadClick:ee});return e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{U(null),null!=a&&(c(void 0),a.includes(e.NEW_THREAD_SUFFIX)&&H(a))},children:e.jsxRuntimeExports.jsx(kc,{windowSize:u,isThreadOpen:K||Z,totalHeight:s,isCreationInProgress:Y,"data-testid":e.generateDataTestId("health-monitor-row",$),onClick:()=>p(F.companyId),children:bc.map((t,n)=>{const s=e.toCollaborationEntityType({tab:"healthMonitor",key:t.key}),c=bc.length-2<=n,p=[...e.getFilteredThreads(B,{entityType:s,companyId:$},"both")],I=p.length>0&&p[0].length>0?p[0][0]:gr("healthMonitor",t.key,$),P=B.get(I),D=null!=P&&!1===P.resolved,L=I===V,_=a===I,H=A.lastEngagements;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs(Dc,{companyNameSticky:i,columnWidth:t.width,windowSize:u,isThreadOpen:L||_,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-company-name",$),onContextMenu:e=>J(e,t.key),ref:e=>{d($,t.key,e)},children:[e.jsxRuntimeExports.jsxs(Mc,{ref:G,"data-testid":e.generateDataTestId("health-monitor-row-company-name-text",$),children:[F.name,e.jsxRuntimeExports.jsx(e.ThreadComponent,{anchorRef:G,isElementThreadOpen:L,roomId:O,openThreadId:V,openThreadMetadata:q?.metadata??null})]}),e.jsxRuntimeExports.jsx(e.Tooltip,{style:{padding:`2px ${e.Space.sp2}`},title:"Notes",children:e.jsxRuntimeExports.jsxs(Fc,{className:"notesIcon","data-testid":e.generateDataTestId("health-monitor-row-notes-icon",$),onClick:e=>{e.preventDefault(),e.stopPropagation(),l({roomId:O,companyId:$,companyName:k,entityType:M})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:N.length,isLoading:z}),e.jsxRuntimeExports.jsx(Vc,{})]})}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:D,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:J}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("healthMonitor",t.key,$),addThreadRequestThreadId:a,itemKey:t.key,onAddThreadClick:ee})]},I);case"productVerticals":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-product-verticals",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx($c,{productVerticals:T.verticalProductServices,testIdSuffix:$}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"runway":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-runway",$),onContextMenu:e=>J(e,t.key),children:[null!=F.runway?!0===r.isCompanyRunwayInfinite(F.runway)?e.jsxRuntimeExports.jsx(Bc,{"data-testid":e.generateDataTestId("health-monitor-row-runway-infinity",$)}):nc(F.runway.runwayMonths):e.jsxRuntimeExports.jsx(e.LargeRegular,{children:m}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"churnProbability":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-churn-probability",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(Nc,{"data-testid":e.generateDataTestId("health-monitor-row-churn-meter",$),children:e.jsxRuntimeExports.jsx(Hd,{percentage:F.churnProbabilityPercentage,barHeight:12})}),null!=A.churnProbabilityPercentage?e.jsxRuntimeExports.jsx(e.Tooltip,{style:{padding:`12px ${e.Space.sp3}`,textAlign:"left"},title:e.jsxRuntimeExports.jsxs(Uc,{children:[e.jsxRuntimeExports.jsx(Gc,{children:`${wc} ${C} ${o.companyInfo.name} ${vc} ${Math.round(A.churnProbabilityPercentage??0)}${f}${y}`}),0!==o.companyHealthMetric.churnProbabilityReason.length||0!==o.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length?e.jsxRuntimeExports.jsxs(qc,{children:[e.jsxRuntimeExports.jsxs(Kc,{children:[v,g]}),e.jsxRuntimeExports.jsxs(Yc,{children:[o.companyHealthMetric.churnProbabilityReason.map((t,o)=>e.jsxRuntimeExports.jsx(tp,{children:e.jsxRuntimeExports.jsx(op,{children:t.text})},`${e.nanoid()}_${o}}`)),o.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((t,o)=>e.jsxRuntimeExports.jsx(tp,{children:e.jsxRuntimeExports.jsx(op,{children:t.value})},`${e.nanoid()}_${o}}`))]})]}):null,0!==o.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length?e.jsxRuntimeExports.jsxs(qc,{children:[e.jsxRuntimeExports.jsxs(Kc,{children:[w,g]}),e.jsxRuntimeExports.jsx(Yc,{children:o.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((t,o)=>e.jsxRuntimeExports.jsx(tp,{children:e.jsxRuntimeExports.jsx(op,{children:t.value})},`${e.nanoid()}_${o}}`))})]}):null]}),children:e.jsxRuntimeExports.jsx(Wc,{"data-testid":e.generateDataTestId("health-monitor-row-churn-info-icon",$),style:{marginTop:e.Space.sp1,marginLeft:e.Space.sp1,marginRight:e.Space.sp0}})}):null,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"customerSatisfactionScore":case"netPromoterScore":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-"+("netPromoterScore"===t.key?"nps":"csat"),$),onContextMenu:e=>J(e,t.key),children:[null!=F[t.key]?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(Lc,{children:F[t.key]}),e.jsxRuntimeExports.jsx(Ac,{children:x}),"netPromoterScore"===t.key?e.jsxRuntimeExports.jsxs(Oc,{children:[" ",10," "]}):e.jsxRuntimeExports.jsxs(Oc,{children:[" ",5," "]})]}):null!=F.churnProbabilityPercentage?b:m,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"controller":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-controller",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(e.Tooltip,{enterDelay:600,style:{padding:`2px ${e.Space.sp2}`},title:F.controllers.join(", "),children:F.controllers[0]}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"customerSuccessManager":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-csm",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(e.Tooltip,{enterDelay:600,style:{padding:`2px ${e.Space.sp2}`,textAlign:"left"},maxWidth:"300px",title:F.customerSuccessManagers.join(", "),children:F.customerSuccessManagers[0]}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"lastReportSent":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-last-report-sent",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(zc,{children:null!=F.lastReportSent?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.LargeRegular,{children:oc(F.lastReportSent)}),e.jsxRuntimeExports.jsx(e.SmallRegular,{children:F.lastReportSent.format(E.visual.MMMDCommaYYYYformat)})]}):e.jsxRuntimeExports.jsx(e.LargeRegular,{children:m})}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"renewalDate":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-renewal-date",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(zc,{children:null!=F.renewalDate?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.LargeRegular,{children:oc(F.renewalDate)}),e.jsxRuntimeExports.jsx(e.SmallRegular,{children:F.renewalDate.format(E.visual.MMMDCommaYYYYformat)})]}):e.jsxRuntimeExports.jsx(e.LargeRegular,{children:m})}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"group":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-group",$),onContextMenu:e=>J(e,t.key),children:[null!=F.companyGroup?e.jsxRuntimeExports.jsx(Hc,{"data-testid":e.generateDataTestId("health-monitor-row-group-badge",$),textColor:bi[F.companyGroup.id],children:F.companyGroup.name.toUpperCase()}):m,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"monthlyRecurringRevenue":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-mrr",$),onContextMenu:e=>J(e,t.key),children:[e.amountToString("0,0",F.monthlyRecurringRevenue),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"externalProductServiceExposure":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-external-exposure",$),onContextMenu:e=>J(e,t.key),children:[null!=F.externalProductServiceExposure?F.externalProductServiceExposure.name:m,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"lastEngagement":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-last-engagement",$),onContextMenu:e=>J(e,t.key),children:[H.length>0?e.jsxRuntimeExports.jsxs(e.Tooltip,{style:{padding:`12px ${e.Space.sp3}`},title:e.jsxRuntimeExports.jsxs(Zc,{children:[e.jsxRuntimeExports.jsxs(Xc,{children:[R,g]}),H.map((t,o)=>e.jsxRuntimeExports.jsxs(Qc,{children:[e.jsxRuntimeExports.jsxs(Jc,{children:["email"===t.type?e.jsxRuntimeExports.jsx(sp,{}):e.jsxRuntimeExports.jsx(ap,{}),e.jsxRuntimeExports.jsx(Ic,{children:"email"===t.type?S:j.meeting})]}),e.jsxRuntimeExports.jsx(ep,{children:t.scheduledAt?.utc(!0).local().format(E.visual.MMMDCommaYYYYformat)??m})]},`${e.nanoid()}_${o}}`))]}),children:[H[0].scheduledAt?.utc(!0).local().format(E.visual.MMMDCommaYYYYformat)??m,e.jsxRuntimeExports.jsxs(np,{children:["email"===H[0].type?e.jsxRuntimeExports.jsx(rp,{className:"engagement-email-icon"}):e.jsxRuntimeExports.jsx(ip,{className:"engagement-meeting-icon"}),e.jsxRuntimeExports.jsxs(lp,{children:["Via",h,"email"===H[0].type?S:j.meeting]})]})]}):e.jsxRuntimeExports.jsx(e.StandardRegular,{children:m}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"dashboardLastSeen":case"subscriptionDate":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-"+("dashboardLastSeen"===t.key?"dashboard-last-seen":"subscription-date"),$),onContextMenu:e=>J(e,t.key),children:[F.subscriptionStartDate??m,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"companyEngagementMetricsUpdatedAt":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-engagement-updated",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(zc,{children:null!=F.companyEngagementMetricsUpdatedAt?e.jsxRuntimeExports.jsx(e.LargeRegular,{children:oc(F.companyEngagementMetricsUpdatedAt)}):e.jsxRuntimeExports.jsx(e.LargeRegular,{children:m})}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);default:return null}})})})}const $c=({productVerticals:t,testIdSuffix:o})=>e.jsxRuntimeExports.jsx(Tc,{"data-testid":e.generateDataTestId("health-monitor-product-services",o),children:t.map((t,n)=>{const r=(t=>{switch(t){case"billpay":return{key:"ZBP",color:e.Colors.graphColor34Dark};case"reimbursement":return{key:"ZR",color:e.Colors.graphColor06Dark};case"accounts":return{key:"ZA",color:e.Colors.graphColor09Dark};case"cards":return{key:"ZC",color:e.Colors.graphColor33Dark};case"payroll_manager_service_plan":return{key:"Payroll",color:e.Colors.graphColor26Dark};case"zeni_tax_plan":return{key:"Tax",color:e.Colors.graphColor35Dark};case"cfo_plan":return{key:"CFO",color:e.Colors.graphColor17Dark};default:return}})(t.productServiceKey);if(null!=r){const i=null!=o&&""!==o?`${r.key}-${o}`:r.key;return e.jsxRuntimeExports.jsx(Pc,{color:r.color,isEnabled:t.isEnabled,"data-testid":e.generateDataTestId("health-monitor-product-chip",i),children:r.key},`${e.nanoid()}_${n}`)}return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})})}),kc=o.div`
|
|
1563
|
+
`,{dateFormat:Xd,timeFormat:Qd,timeframe:Jd,common:ec}=e.appLocale.getLocalizedStrings(),tc=e=>{if(null!=e){const t=r.dateNow();return Math.abs(t.diff(e,"days"))}};function oc(e){if(null==e)return;const t=r.dateNow();if(Math.abs(t.diff(e,"days"))<=0)return`0 ${Jd.day}`;const[o,n]=e<t?[e,t]:[t,e],i=o.year(),s=o.month(),a=o.date(),l=n.year(),d=n.month();let c=l-i,p=d-s,u=n.date()-a;if(u<0){p--;u+=new Date(l,d,0).getDate()}p<0&&(c--,p+=12);const m=[];return c>0&&m.push(`${c} ${c>1?ec.texts.years:ec.texts.years.slice(0,-1)}`),p>0&&m.push(`${p} ${p>1?ec.texts.months:ec.texts.months.slice(0,-1)}`),u>0&&m.push(`${u} ${u>1?Jd.day:Jd.day.slice(0,-1)}`),m.join(", ")}function nc(e){if(null==e)return ec.strings.hyphen;const t=Math.floor(Number(e)/12),o=Number(e)%12,n=t>1?ec.texts.years:ec.texts.years.slice(0,-1),r=o>1?ec.texts.months:ec.texts.months.slice(0,-1);return 0===t?`${e} ${r}`:0===o?`${t} ${n}`:`${t} ${n}, ${o} ${r}`}const rc=t=>({name:t?.companyInfo.name??"",productVerticals:t?.companyHealthMetric.verticalProductServices??void 0,runway:t?.companyHealthMetric.runway,churnProbabilityPercentage:t?.companyHealthMetric.churnProbabilityPercentage,netPromoterScore:t?.companyHealthMetric.netPromoterScore,customerSatisfactionScore:t?.companyHealthMetric.customerSatisfactionScore,lastReportSent:null!=t?.managementInfo.lastReportSentDate?oc(r.zeniDate(t?.managementInfo.lastReportSentDate.toISOString())):void 0,dashboardLastVisit:null!=t?.companyHealthMetric.customerLastDashboardVisit?r.zeniDate(t?.companyHealthMetric.customerLastDashboardVisit.toISOString()).format(Xd.visual.MMMDCommaYYYYformat):void 0,companyEngagementMetricsUpdatedAt:null!=t?.companyHealthMetric.companyEngagementMetricsUpdatedAt?{date:r.zeniDate(t?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(Xd.visual.MMMDCommaYYYYformat),time:r.zeniDate(t?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(Qd.hhmmAFormat)}:void 0,noOfVerticalsEnabled:t?.noOfProductVerticalsEnabled,renewalDate:null!=t?.companyHealthMetric.subscriptionRenewalDate?oc(r.zeniDate(t?.companyHealthMetric.subscriptionRenewalDate.toISOString())):void 0,lastEngagements:null!=t?t.companyHealthMetric.lastEngagements:[],additionalChurnFactors:null!=t?t.companyHealthMetric.additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]},updatedByUserName:null!=t?.companyHealthMetric.updatedByUser?e.getFullName(t.companyHealthMetric.updatedByUser):void 0}),{cockpit:{health:{header:ic}},common:{texts:{name:sc,churnProbability:ac,controller:lc,csManager:dc,lastUpdated:cc,runway:pc,nps:uc,csat:mc,lastReportSent:xc,subscriptionDate:hc,renewalDate:gc,group:yc,mrr:Sc,externalServicesExposure:Cc,productVerticals:fc}}}=e.appLocale.getLocalizedStrings(),bc=[{key:"companyName",value:sc,sortOrder:"ascending",width:new e.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"churnProbability",value:ac,sortOrder:"ascending",width:new e.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:lc,sortOrder:"ascending",width:new e.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"customerSuccessManager",value:dc,sortOrder:"ascending",width:new e.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"lastEngagement",value:ic.lastEngagement,sortOrder:"ascending",width:new e.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"companyEngagementMetricsUpdatedAt",value:cc,sortOrder:"ascending",width:new e.ResponsiveSized(160,160),isThreadAllowed:!0},{key:"runway",value:pc,sortOrder:"ascending",width:new e.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"netPromoterScore",value:uc,sortOrder:"ascending",width:new e.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"customerSatisfactionScore",value:mc,sortOrder:"ascending",width:new e.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"lastReportSent",value:xc,sortOrder:"ascending",width:new e.ResponsiveSized(250,250),isThreadAllowed:!0},{key:"dashboardLastSeen",value:ic.dashboardLastSeen,sortOrder:"ascending",width:new e.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"subscriptionDate",value:hc,sortOrder:"ascending",width:new e.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"renewalDate",value:gc,sortOrder:"ascending",width:new e.ResponsiveSized(180,180),isThreadAllowed:!0},{key:"group",value:yc,sortOrder:"ascending",width:new e.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:Sc,sortOrder:"ascending",width:new e.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"externalProductServiceExposure",value:Cc,sortOrder:"ascending",width:new e.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"productVerticals",value:fc,sortOrder:"ascending",width:new e.ResponsiveSized(360,360),isThreadAllowed:!0}];bc.map(e=>e.key);const jc=e=>p.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M10.1094 4H2.3764C2.16286 4 1.98975 4.22386 1.98975 4.5V11.5C1.98975 11.7761 2.16286 12 2.3764 12H10.1094C10.323 12 10.4961 11.7761 10.4961 11.5V4.5C10.4961 4.22386 10.323 4 10.1094 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{d:"M11.0046 7L14.0046 5V11L11.0046 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),Rc=e.appLocale.getLocalizedStrings(),{common:{texts:{churnProbability:wc,is:Ec}}}=Rc;function vc({companyView:o,healthView:n,companyNameSticky:i,totalHeight:s,addThreadRequestThreadId:a,setNoteData:l,setElementRef:d,setAddThreadRequestThreadId:c,onRowClick:p}){const u=e.useWindowSizeContext(),{common:{strings:{hyphen:m,backspace:x,space:h,colon:g,dot:y},settings:{notifications:{mode:{email:S}}}},cockpit:{health:{detailPage:{churnProbabilityTexts:{for:C,percent:f},notApplicable:b},common:{engagementTypes:j,labels:{lastEngagements:R,factorsThatDecreaseChurnProbability:w,factorsThatIncreaseChurnProbability:E}}}},dateFormat:v}=Rc,{companyInfo:{companyId:$,name:k},companyHealthMetric:T,controllers:I,managementInfo:{lastReportSentDate:P,customerSuccessManagerUserIds:D}}=o,A=rc(o),L=n.zeniUsers.values.filter(e=>D.includes(e.userId)),O=`cockpit_${$}`,M="healthMonitor.notes",{threads:N,isLoading:z}=e.useFilteredThreads({entityType:M,companyId:$},!1),F={name:k,companyId:$,companyGroup:null!=o.companyGroup?o.companyGroup.find(e=>e.id===o.managementInfo.companyGroupId):void 0,monthlyRecurringRevenue:o.monthlyRecurringRevenue,productVerticals:T.verticalProductServices,runway:T.runway,churnProbabilityPercentage:T.churnProbabilityPercentage,netPromoterScore:T.netPromoterScore,customerSatisfactionScore:T.customerSatisfactionScore,controllers:I.map(e=>r.getUserName(e)),customerSuccessManagers:L.map(e=>r.getUserName(e)),lastReportSent:null!=P?r.zeniDate(P.toISOString()):void 0,subscriptionStartDate:null!=T.subscriptionStartDate?r.zeniDate(T.subscriptionStartDate.toISOString()).format(v.visual.MMMDCommaYYYYformat):void 0,renewalDate:null!=T.subscriptionRenewalDate?r.zeniDate(T.subscriptionRenewalDate.toISOString()):void 0,companyEngagementMetricsUpdatedAt:T.companyEngagementMetricsUpdatedAt,externalProductServiceExposure:T.externalProductServiceExposure},{openThread:V,threads:B,addThread:_,removeThread:H,setOpenThread:W,setRequestToOpenThread:U}=t.useContext(e.ThreadsContext),G=t.useRef(null),q=null!==V?B.get(V):null,K=!0===V?.includes($),Y=null!=V&&null==B.get(V)&&K,Z=null!=a&&B.get(a)?.metadata.companyId===$,X=t.useCallback(()=>{!0===V?.includes(e.NEW_THREAD_SUFFIX)&&H(V),null!=a&&c(void 0)},[a,V,H,c]),Q=t.useCallback(t=>{if(t===V)W(null);else if(B.has(t))W(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toHealthSortKeyType(n),$,k);_(t,{type:"thread",visibility:"public",id:t,roomId:O,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),W(t)}},[$,k,V,B,_,W,O]),J=t.useCallback((t,o,n=!1)=>{const r=bc.find(e=>e.key===o);if(U(null),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;X(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"healthMonitor",key:r.key}),n=[...e.getFilteredThreads(B,{entityType:o,companyId:$},"both")],i=n.length>0&&n[0].length>0?n[0][0]:gr("healthMonitor",r.key,$);B.has(i)?Q(i):a===i?c(void 0):(c(i),W(null))}},[B,$,a,Q,c,W,U,X]),ee=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("healthMonitor",t,$);c(void 0),Q(o)},[$,c,Q]),te=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:O,addThreadRequestThreadId:a,openThreadId:V,threadStyle:t.threadStyle,openThreadMetadata:q?.metadata??null,onElementClick:J,onAddThreadClick:ee});return e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{U(null),null!=a&&(c(void 0),a.includes(e.NEW_THREAD_SUFFIX)&&H(a))},children:e.jsxRuntimeExports.jsx(kc,{windowSize:u,isThreadOpen:K||Z,totalHeight:s,isCreationInProgress:Y,"data-testid":e.generateDataTestId("health-monitor-row",$),onClick:()=>p(F.companyId),children:bc.map((t,n)=>{const s=e.toCollaborationEntityType({tab:"healthMonitor",key:t.key}),c=bc.length-2<=n,p=[...e.getFilteredThreads(B,{entityType:s,companyId:$},"both")],I=p.length>0&&p[0].length>0?p[0][0]:gr("healthMonitor",t.key,$),P=B.get(I),D=null!=P&&!1===P.resolved,L=I===V,_=a===I,H=A.lastEngagements;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs(Dc,{companyNameSticky:i,columnWidth:t.width,windowSize:u,isThreadOpen:L||_,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-company-name",$),onContextMenu:e=>J(e,t.key),ref:e=>{d($,t.key,e)},children:[e.jsxRuntimeExports.jsxs(Mc,{ref:G,"data-testid":e.generateDataTestId("health-monitor-row-company-name-text",$),children:[F.name,e.jsxRuntimeExports.jsx(e.ThreadComponent,{anchorRef:G,isElementThreadOpen:L,roomId:O,openThreadId:V,openThreadMetadata:q?.metadata??null})]}),e.jsxRuntimeExports.jsx(e.Tooltip,{style:{padding:`2px ${e.Space.sp2}`},title:"Notes",children:e.jsxRuntimeExports.jsxs(Fc,{className:"notesIcon","data-testid":e.generateDataTestId("health-monitor-row-notes-icon",$),onClick:e=>{e.preventDefault(),e.stopPropagation(),l({roomId:O,companyId:$,companyName:k,entityType:M})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:N.length,isLoading:z}),e.jsxRuntimeExports.jsx(Vc,{})]})}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:D,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:J}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("healthMonitor",t.key,$),addThreadRequestThreadId:a,itemKey:t.key,onAddThreadClick:ee})]},I);case"productVerticals":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-product-verticals",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx($c,{productVerticals:T.verticalProductServices,testIdSuffix:$}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"runway":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-runway",$),onContextMenu:e=>J(e,t.key),children:[null!=F.runway?!0===r.isCompanyRunwayInfinite(F.runway)?e.jsxRuntimeExports.jsx(Bc,{"data-testid":e.generateDataTestId("health-monitor-row-runway-infinity",$)}):nc(F.runway.runwayMonths):e.jsxRuntimeExports.jsx(e.LargeRegular,{children:m}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"churnProbability":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-churn-probability",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(Nc,{"data-testid":e.generateDataTestId("health-monitor-row-churn-meter",$),children:e.jsxRuntimeExports.jsx(Hd,{percentage:F.churnProbabilityPercentage,barHeight:12})}),null!=A.churnProbabilityPercentage?e.jsxRuntimeExports.jsx(e.Tooltip,{style:{padding:`12px ${e.Space.sp3}`,textAlign:"left"},title:e.jsxRuntimeExports.jsxs(Uc,{children:[e.jsxRuntimeExports.jsx(Gc,{children:`${wc} ${C} ${o.companyInfo.name} ${Ec} ${Math.round(A.churnProbabilityPercentage??0)}${f}${y}`}),0!==o.companyHealthMetric.churnProbabilityReason.length||0!==o.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length?e.jsxRuntimeExports.jsxs(qc,{children:[e.jsxRuntimeExports.jsxs(Kc,{children:[E,g]}),e.jsxRuntimeExports.jsxs(Yc,{children:[o.companyHealthMetric.churnProbabilityReason.map((t,o)=>e.jsxRuntimeExports.jsx(tp,{children:e.jsxRuntimeExports.jsx(op,{children:t.text})},`${e.nanoid()}_${o}}`)),o.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((t,o)=>e.jsxRuntimeExports.jsx(tp,{children:e.jsxRuntimeExports.jsx(op,{children:t.value})},`${e.nanoid()}_${o}}`))]})]}):null,0!==o.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length?e.jsxRuntimeExports.jsxs(qc,{children:[e.jsxRuntimeExports.jsxs(Kc,{children:[w,g]}),e.jsxRuntimeExports.jsx(Yc,{children:o.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((t,o)=>e.jsxRuntimeExports.jsx(tp,{children:e.jsxRuntimeExports.jsx(op,{children:t.value})},`${e.nanoid()}_${o}}`))})]}):null]}),children:e.jsxRuntimeExports.jsx(Wc,{"data-testid":e.generateDataTestId("health-monitor-row-churn-info-icon",$),style:{marginTop:e.Space.sp1,marginLeft:e.Space.sp1,marginRight:e.Space.sp0}})}):null,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"customerSatisfactionScore":case"netPromoterScore":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-"+("netPromoterScore"===t.key?"nps":"csat"),$),onContextMenu:e=>J(e,t.key),children:[null!=F[t.key]?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(Lc,{children:F[t.key]}),e.jsxRuntimeExports.jsx(Ac,{children:x}),"netPromoterScore"===t.key?e.jsxRuntimeExports.jsxs(Oc,{children:[" ",10," "]}):e.jsxRuntimeExports.jsxs(Oc,{children:[" ",5," "]})]}):null!=F.churnProbabilityPercentage?b:m,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"controller":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-controller",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(e.Tooltip,{enterDelay:600,style:{padding:`2px ${e.Space.sp2}`},title:F.controllers.join(", "),children:F.controllers[0]}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"customerSuccessManager":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-csm",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(e.Tooltip,{enterDelay:600,style:{padding:`2px ${e.Space.sp2}`,textAlign:"left"},maxWidth:"300px",title:F.customerSuccessManagers.join(", "),children:F.customerSuccessManagers[0]}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"lastReportSent":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-last-report-sent",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(zc,{children:null!=F.lastReportSent?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.LargeRegular,{children:oc(F.lastReportSent)}),e.jsxRuntimeExports.jsx(e.SmallRegular,{children:F.lastReportSent.format(v.visual.MMMDCommaYYYYformat)})]}):e.jsxRuntimeExports.jsx(e.LargeRegular,{children:m})}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"renewalDate":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-renewal-date",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(zc,{children:null!=F.renewalDate?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.LargeRegular,{children:oc(F.renewalDate)}),e.jsxRuntimeExports.jsx(e.SmallRegular,{children:F.renewalDate.format(v.visual.MMMDCommaYYYYformat)})]}):e.jsxRuntimeExports.jsx(e.LargeRegular,{children:m})}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"group":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-group",$),onContextMenu:e=>J(e,t.key),children:[null!=F.companyGroup?e.jsxRuntimeExports.jsx(Hc,{"data-testid":e.generateDataTestId("health-monitor-row-group-badge",$),textColor:bi[F.companyGroup.id],children:F.companyGroup.name.toUpperCase()}):m,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"monthlyRecurringRevenue":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-mrr",$),onContextMenu:e=>J(e,t.key),children:[e.amountToString("0,0",F.monthlyRecurringRevenue),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"externalProductServiceExposure":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-external-exposure",$),onContextMenu:e=>J(e,t.key),children:[null!=F.externalProductServiceExposure?F.externalProductServiceExposure.name:m,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"lastEngagement":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-last-engagement",$),onContextMenu:e=>J(e,t.key),children:[H.length>0?e.jsxRuntimeExports.jsxs(e.Tooltip,{style:{padding:`12px ${e.Space.sp3}`},title:e.jsxRuntimeExports.jsxs(Zc,{children:[e.jsxRuntimeExports.jsxs(Xc,{children:[R,g]}),H.map((t,o)=>e.jsxRuntimeExports.jsxs(Qc,{children:[e.jsxRuntimeExports.jsxs(Jc,{children:["email"===t.type?e.jsxRuntimeExports.jsx(sp,{}):e.jsxRuntimeExports.jsx(ap,{}),e.jsxRuntimeExports.jsx(Ic,{children:"email"===t.type?S:j.meeting})]}),e.jsxRuntimeExports.jsx(ep,{children:t.scheduledAt?.utc(!0).local().format(v.visual.MMMDCommaYYYYformat)??m})]},`${e.nanoid()}_${o}}`))]}),children:[H[0].scheduledAt?.utc(!0).local().format(v.visual.MMMDCommaYYYYformat)??m,e.jsxRuntimeExports.jsxs(np,{children:["email"===H[0].type?e.jsxRuntimeExports.jsx(rp,{className:"engagement-email-icon"}):e.jsxRuntimeExports.jsx(ip,{className:"engagement-meeting-icon"}),e.jsxRuntimeExports.jsxs(lp,{children:["Via",h,"email"===H[0].type?S:j.meeting]})]})]}):e.jsxRuntimeExports.jsx(e.StandardRegular,{children:m}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"dashboardLastSeen":case"subscriptionDate":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-"+("dashboardLastSeen"===t.key?"dashboard-last-seen":"subscription-date"),$),onContextMenu:e=>J(e,t.key),children:[F.subscriptionStartDate??m,te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);case"companyEngagementMetricsUpdatedAt":return e.jsxRuntimeExports.jsxs(_c,{ref:e=>{d($,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,"data-testid":e.generateDataTestId("health-monitor-row-engagement-updated",$),onContextMenu:e=>J(e,t.key),children:[e.jsxRuntimeExports.jsx(zc,{children:null!=F.companyEngagementMetricsUpdatedAt?e.jsxRuntimeExports.jsx(e.LargeRegular,{children:oc(F.companyEngagementMetricsUpdatedAt)}):e.jsxRuntimeExports.jsx(e.LargeRegular,{children:m})}),te({isElementThreadOpen:L,isElementThreadPresent:D,itemKey:t.key,elementThreadId:I,threadStyle:c?{right:e.Space.sp0}:void 0})]},I);default:return null}})})})}const $c=({productVerticals:t,testIdSuffix:o})=>e.jsxRuntimeExports.jsx(Tc,{"data-testid":e.generateDataTestId("health-monitor-product-services",o),children:t.map((t,n)=>{const r=(t=>{switch(t){case"billpay":return{key:"ZBP",color:e.Colors.graphColor34Dark};case"reimbursement":return{key:"ZR",color:e.Colors.graphColor06Dark};case"accounts":return{key:"ZA",color:e.Colors.graphColor09Dark};case"cards":return{key:"ZC",color:e.Colors.graphColor33Dark};case"payroll_manager_service_plan":return{key:"Payroll",color:e.Colors.graphColor26Dark};case"zeni_tax_plan":return{key:"Tax",color:e.Colors.graphColor35Dark};case"cfo_plan":return{key:"CFO",color:e.Colors.graphColor17Dark};default:return}})(t.productServiceKey);if(null!=r){const i=null!=o&&""!==o?`${r.key}-${o}`:r.key;return e.jsxRuntimeExports.jsx(Pc,{color:r.color,isEnabled:t.isEnabled,"data-testid":e.generateDataTestId("health-monitor-product-chip",i),children:r.key},`${e.nanoid()}_${n}`)}return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})})}),kc=o.div`
|
|
1564
1564
|
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
1565
1565
|
border-radius: ${e.Space.sp2};
|
|
1566
1566
|
display: flex;
|
|
@@ -1741,7 +1741,7 @@
|
|
|
1741
1741
|
color: ${e.Colors.heroDark};
|
|
1742
1742
|
`,ap=o(ip)`
|
|
1743
1743
|
color: ${e.Colors.heroDark};
|
|
1744
|
-
`,lp=o(e.SmallRegular)``,{common:dp,cockpit:{health:{detailPage:cp,common:{engagementTypes:pp,labels:{lastEngagements:up,factorsThatDecreaseChurnProbability:mp,factorsThatIncreaseChurnProbability:xp,contributingFactors:hp,increaseChurnProbability:gp,decreasingChurnProbability:yp}}}},dateFormat:Sp}=e.appLocale.getLocalizedStrings(),{to:Cp,from:fp,cc:bp,host:jp,attendees:Rp,strings:{colon:wp,hyphen:
|
|
1744
|
+
`,lp=o(e.SmallRegular)``,{common:dp,cockpit:{health:{detailPage:cp,common:{engagementTypes:pp,labels:{lastEngagements:up,factorsThatDecreaseChurnProbability:mp,factorsThatIncreaseChurnProbability:xp,contributingFactors:hp,increaseChurnProbability:gp,decreasingChurnProbability:yp}}}},dateFormat:Sp}=e.appLocale.getLocalizedStrings(),{to:Cp,from:fp,cc:bp,host:jp,attendees:Rp,strings:{colon:wp,hyphen:Ep,comma:vp,space:$p},texts:{subject:kp,addMore:Tp,select:Ip}}=dp,{strings:{percentage:Pp}}=dp,Dp=(e,t)=>`${e}.${t}`,Ap=e=>`${e}_form`,Lp="healthMonitorDetails",Op="healthMonitorPage",Mp="netPromoterScore",Np="customerSatisfactionScore",zp="externalProductServiceExposure",Fp="additionalChurnFactors",Vp=e=>[{label:xp,options:e.increasingChurnProbability.map(e=>({label:e.value,value:e.code}))},{label:mp,options:e.decreasingChurnProbability.map(e=>({label:e.value,value:e.code}))}],Bp=e=>null==e?[]:e.increasingChurnProbability.map(e=>e.code).concat(e.decreasingChurnProbability.map(e=>e.code));const _p=(e,t)=>({[Lp]:{netPromoterScore:{selectedOption:e.netPromoterScore,allOptions:ie},customerSatisfactionScore:{selectedOption:e.customerSatisfactionScore,allOptions:se},externalProductServiceExposure:{selectedOption:e.externalProductServiceExposure,allOptions:r.companyHealthMetricDropDownOptions},additionalChurnFactors:{selectedOptions:Bp(e.additionalChurnFactors),allOptions:Vp(t)}}}),Hp=o.div``,Wp=o.div``,Up=o.div``,Gp=o.div``,qp=o.div``,Kp=o.div``,Yp=o.div`
|
|
1745
1745
|
min-width: 100px;
|
|
1746
1746
|
`,Zp=o.div`
|
|
1747
1747
|
min-width: 80px;
|
|
@@ -1897,13 +1897,13 @@
|
|
|
1897
1897
|
color: ${e=>e.theme.colors.primary};
|
|
1898
1898
|
display: flex;
|
|
1899
1899
|
justify-content: center;
|
|
1900
|
-
`,
|
|
1900
|
+
`,Eu=o.div`
|
|
1901
1901
|
display: flex;
|
|
1902
1902
|
position: relative;
|
|
1903
1903
|
flex-direction: column;
|
|
1904
1904
|
padding-left: ${e.Space.sp8};
|
|
1905
1905
|
padding-right: ${e.Space.sp8};
|
|
1906
|
-
`,
|
|
1906
|
+
`,vu=o.div`
|
|
1907
1907
|
display: flex;
|
|
1908
1908
|
flex-direction: column;
|
|
1909
1909
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -2145,16 +2145,16 @@
|
|
|
2145
2145
|
&:hover {
|
|
2146
2146
|
color: ${e=>e.theme.colors.primary};
|
|
2147
2147
|
}
|
|
2148
|
-
`,{cockpit:{health:{healthMonitorFiltersHeaderInfoText:{outOf:cm,customers:pm}}},common:{analytics:um,strings:{space:mm},texts:{showing:xm,comments:hm}},collaboration:{threads:{placeholder:{addANewComment:gm,replyAComment:ym},tooltip:{resolveComment:Sm,unResolveComment:Cm}}}}=e.appLocale.getLocalizedStrings();function fm({healthView:o,mixpanelUrl:r,onRowClick:i,onColumnSortConfigChanged:s,initialOpenThreadRequest:a}){const l=e.useWindowSizeContext(),d=t.useRef(null),[c,p]=t.useState(null),{uiState:u}=o,[m,x]=t.useState(null),{unfilteredCompanyCount:h}=o,{companies:g}=o,{setOpenThread:y,setRequestToOpenThread:S,requestToOpenThread:C,isLoading:f}=t.useContext(e.ThreadsContext),[b,j]=t.useState(void 0),R=t.useRef([]),w=!("small"===l||"medium-compact"===l),
|
|
2148
|
+
`,{cockpit:{health:{healthMonitorFiltersHeaderInfoText:{outOf:cm,customers:pm}}},common:{analytics:um,strings:{space:mm},texts:{showing:xm,comments:hm}},collaboration:{threads:{placeholder:{addANewComment:gm,replyAComment:ym},tooltip:{resolveComment:Sm,unResolveComment:Cm}}}}=e.appLocale.getLocalizedStrings();function fm({healthView:o,mixpanelUrl:r,onRowClick:i,onColumnSortConfigChanged:s,initialOpenThreadRequest:a}){const l=e.useWindowSizeContext(),d=t.useRef(null),[c,p]=t.useState(null),{uiState:u}=o,[m,x]=t.useState(null),{unfilteredCompanyCount:h}=o,{companies:g}=o,{setOpenThread:y,setRequestToOpenThread:S,requestToOpenThread:C,isLoading:f}=t.useContext(e.ThreadsContext),[b,j]=t.useState(void 0),R=t.useRef([]),w=!("small"===l||"medium-compact"===l),E=e=>o.companies[e].companyInfo.name.length>z?120:M,v=t.useMemo(()=>({makeCompanyNameSticky:w,uiState:u,onColumnSortConfigChanged:s}),[w,u,s]),$=t.useCallback((e,t,n)=>{const r=o.companies.findIndex(t=>t.companyInfo.companyId===e),i=bc.findIndex(e=>e.key===t);-1!==r&&-1!==i&&(null==R.current[r]?R.current[r]=[n]:R.current[r][i]=n)},[o.companies]);t.useEffect(()=>{d.current&&d.current.resetAfterIndex(0)},[o]),t.useEffect(()=>{null!=a&&"Completed"===o.fetchState&&!1===f&&S(a)},[a,o.fetchState,f,S]),t.useEffect(()=>{if(null!=C&&null!=c){const{companyId:e,entityType:t}=C,[n,r]=t.split("."),i=o.companies.findIndex(t=>t.companyInfo.companyId===e),s=bc.findIndex(e=>e.key===r);-1===i||c.visibleStartIndex<=i&&c.visibleStopIndex>=i||d.current?.scrollToItem(i,"center"),setTimeout(()=>{const e=R.current[i]?.[0]?.getBoundingClientRect().bottom,t=R.current[i]?.[0]?.getBoundingClientRect().top;null!=e&&null!=t&&(window.innerHeight>=e&&window.innerHeight>=t||t<0)&&R.current[i][s]?.scrollIntoView({block:"center",behavior:"auto"})},0);const a=setInterval(()=>{const e=R.current[i]?.[s]?.getBoundingClientRect().left,t=R.current[i]?.[s]?.getBoundingClientRect().right,o=R.current[i]?.[s]?.offsetWidth;if(null!=e&&null!=o&&null!=t&&(e<window.innerWidth-o||t<window.innerWidth)){clearInterval(a);const e=C.threadId,t=C.onThreadShownCallback;!0===Boolean(e)&&(S(null),y(C.threadId),t?.())}},500);setTimeout(()=>{clearInterval(a),S(null)},2e3)}},[C,c,y,S]);return e.jsxRuntimeExports.jsxs(wm,{companyNameSticky:w,"data-testid":e.generateDataTestId("health-monitor-list-view"),children:[w&&e.jsxRuntimeExports.jsxs(Im,{"data-testid":e.generateDataTestId("health-monitor-list-summary-bar"),children:[e.jsxRuntimeExports.jsxs(Pm,{"data-testid":e.generateDataTestId("health-monitor-list-summary-text"),children:[xm," ",e.jsxRuntimeExports.jsx(Tm,{children:g.length})," ",cm,mm,h," ",pm]}),e.jsxRuntimeExports.jsx(Dm,{"data-testid":e.generateDataTestId("health-monitor-list-analytics-button"),children:e.jsxRuntimeExports.jsx(e.Button,{label:um,variant:"outline",onClick:()=>{window.open(r,"_blank")},size:"small",prefixIcon:e.jsxRuntimeExports.jsx(Lm,{})})})]}),e.jsxRuntimeExports.jsx($m,{companyNameSticky:w,"data-testid":e.generateDataTestId("health-monitor-list-container"),children:e.jsxRuntimeExports.jsxs(bm.Provider,{value:v,children:[e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:n})=>e.jsxRuntimeExports.jsx(e.VariableSizeList,{innerElementType:Rm,height:t,width:n,ref:d,overscanCount:1,itemSize:E,onItemsRendered:e=>p(e),itemData:{healthView:o,makeCompanyNameSticky:w,addThreadRequestThreadId:b,setElementRef:$,setAddThreadRequestThreadId:j,onRowClick:i,setNoteData:x},itemCount:o.companies.length,children:jm})}),null!=m?e.jsxRuntimeExports.jsx(Am,{"data-testid":e.generateDataTestId("health-monitor-notes-drawer"),children:e.jsxRuntimeExports.jsx(n.RoomProvider,{id:m.roomId,children:e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${m.companyName} ${hm}`,filter:{application:"cockpit",companyId:m.companyId,entityType:m.entityType,isGlobalComment:!1,tab:"healthMonitor"},isLoading:!1,threadMetadata:{companyName:m.companyName,companyId:m.companyId,entityId:m.companyId,entityType:m.entityType,isGlobalComment:!1,application:"cockpit",tab:"healthMonitor",url:window.location.href},textOverrides:{composerPlaceholder:gm,replyComposerPlaceholder:ym,threadResolve:Sm,threadUnResolve:Cm},onThreadClick:e=>null,onCloseAllThreadsDrawer:()=>x(null)})})}):null]})})]})}const bm=t.createContext(void 0),jm=({index:t,style:o,data:n})=>{const{healthView:r,makeCompanyNameSticky:i,onRowClick:s,addThreadRequestThreadId:a,setElementRef:l,setNoteData:d,setAddThreadRequestThreadId:c}=n,p=r.companies[t],{companyId:u}=p.companyInfo;return e.jsxRuntimeExports.jsx(Em,{style:{...o,width:"fit-content",minWidth:"100%",padding:`${e.Space.sp0} ${e.Space.sp8} ${e.Space.sp3} ${e.Space.sp0}`},children:e.jsxRuntimeExports.jsx(vc,{companyView:r.companies[t],healthView:r,totalHeight:"number"==typeof o.height?o.height:M,companyNameSticky:i,addThreadRequestThreadId:a,setNoteData:d,setElementRef:l,setAddThreadRequestThreadId:c,onRowClick:s})},u)},Rm=t.forwardRef((o,n)=>{const{children:r,style:i,...s}=o,{makeCompanyNameSticky:a,uiState:l,onColumnSortConfigChanged:d}=t.useContext(bm);return e.jsxRuntimeExports.jsxs(vm,{ref:n,style:{...i,width:"auto"},...s,children:[e.jsxRuntimeExports.jsx(nm,{companyNameSticky:a,onColumnSortConfigChanged:d,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),e.jsxRuntimeExports.jsx(km,{children:r})]})});Rm.displayName="Health Monitor view inner element type";const wm=o.div`
|
|
2149
2149
|
width: 100%;
|
|
2150
2150
|
height: 100%;
|
|
2151
2151
|
background-color: ${e=>e.theme.colors.grey4};
|
|
2152
|
-
`,
|
|
2152
|
+
`,Em=o.div`
|
|
2153
2153
|
top: ${e.Space.sp0};
|
|
2154
2154
|
left: ${e.Space.sp0};
|
|
2155
2155
|
padding-bottom: ${e.Space.sp3};
|
|
2156
2156
|
box-sizing: border-box;
|
|
2157
|
-
`,
|
|
2157
|
+
`,vm=o.div``,$m=o.div`
|
|
2158
2158
|
/** Subtract top so list can occupy remaining available height */
|
|
2159
2159
|
height: ${e=>e.companyNameSticky?"calc(100vh - 180px)":"calc(100vh - 110px)"};
|
|
2160
2160
|
max-width: 99.9%;
|
|
@@ -2279,7 +2279,7 @@
|
|
|
2279
2279
|
display: inline-block;
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
|
-
`,yx=(e.sp[10],34),Sx=18,Cx=e=>({height:e.subscriptions.reduce((e,t)=>e+(t.addOns?.length??0),0)*Sx+yx,collapsedHeight:M}),fx=e=>({height:e.subscriptions.reduce((e,t)=>e+(null!=t.plan?1:0),0)*Sx+yx,collapsedHeight:M}),bx=(e,t)=>{switch(t){case"plans":{const t=fx(e);return t.height>t.collapsedHeight}case"addons":{const t=Cx(e);return t.height>t.collapsedHeight}}},jx=e.appLocale.getLocalizedStrings(),{common:{strings:Rx,due:wx}}=jx,vx={status:jx.common.texts.status,group:jx.common.texts.group,plans:jx.common.texts.plans,controller:jx.common.texts.controller,customerSuccessManager:jx.common.texts.csManager,preparer:jx.common.texts.preparer,reviewer:jx.common.texts.reviewer,apAnalyst:jx.common.texts.apAnalyst,reportSent:jx.common.texts.date,taxStatus:jx.common.texts.status,taxLead:jx.common.texts.taxLead},Ex=({companyView:o,allUsers:n,rowIndex:i,companyNameSticky:s,isCollapsed:a,totalHeight:l,addThreadRequestThreadId:d,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:u,setElementRef:m,setAddThreadRequestThreadId:x,onCollapseToggled:h,onCompanyNameClicked:g,onPassportIconClicked:y,onPlanOrAddOnClicked:S,changeHandlers:C})=>{const[f,b]=t.useState(null),j=e.useWindowSizeContext(),R=o.primarySubscription?.subscription,w=o.primarySubscription?.summary,v=o.primarySubscription?.summary.summary.tenantId,{companyId:E,name:$}=o.company.company.companyInfo,k=kx(w?.schema?.recommendedAction??[]),T=function(e,t){return{controller:{allUsers:t,selectedUsers:e.controllers.map(e=>e.user)}}}(o,n),I=`cockpit_${E}`,P="subscription.notes",{threads:D,isLoading:A}=e.useFilteredThreads({entityType:P,companyId:E},!1),{openThread:L,threads:O,addThread:M,removeThread:N,setOpenThread:z}=t.useContext(e.ThreadsContext),F=null!==L?O.get(L):null,V=!0===L?.includes(E),B=null!=L&&null==O.get(L)&&V,_=null!=d&&O.get(d)?.metadata.companyId===E,H={name:o.company.company.companyInfo.name,status:R?.subscription?.subscription?.status??{code:"",name:""},slabUpperLimit:R?.plan?.plan?.slabUpperLimit??{},slabLowerLimit:R?.plan?.plan?.slabLowerLimit??{},avg2MonthExpenses:w?.summary?.avg2MonthExpenses??{},totalDues:w?.summary?.totalDues??{},recommendedActionName:k[w?.summary?.recommendedActionCode??""]??"",recommendedActionCode:w?.summary?.recommendedActionCode??"",monthlyRecurringRevenue:w?.summary?.monthlyRecurringRevenue??{},...$x(o.subscriptions)},W=e.useForm({mode:"all"}),U="companyData",G=(e,t)=>{e===`${U}.controller`&&null!=E&&(t.users=function(e,t){const o={users:[]},n=t.split(".")[1],{selectedUsers:r,deSelectedUsers:i}=e[n];null==i||0==i?.length?r.forEach(e=>{if(!0===e.isUserSelectionUpdated){const t=Tx(n,e.userId,e.isRoleSelected);void 0!==t&&o.users?.push(t)}}):i.forEach(e=>{const t=Tx(n,e.userId,e.isRoleSelected);void 0!==t&&o.users?.push(t)});return{users:o.users}}(t,e).users,C(E,t))};t.useEffect(()=>{const t=W.watch((t,{name:o})=>{null!=o&&null!=t.companyData&&e.defer(()=>G(o,t.companyData))});return()=>{t.unsubscribe()}});const q=t.useCallback(()=>{!0===L?.includes(e.NEW_THREAD_SUFFIX)&&N(L),null!=d&&x(void 0)},[d,L,N,x]),K=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:I,addThreadRequestThreadId:d,openThreadId:L,threadStyle:t.threadStyle,openThreadMetadata:F?.metadata??null,onElementClick:Z,onAddThreadClick:X,targetElement:c??f}),Y=t.useCallback(t=>{if(t===L)z(null);else if(O.has(t))z(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toSubscriptionSortKeyType(n),E,$);M(t,{type:"thread",visibility:"public",id:t,roomId:I,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),z(t)}},[E,$,L,O,M,z,I]),Z=t.useCallback((t,o,n=!1)=>{const r=ex.find(e=>e.key===o);if(p(),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;q(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"subscription",key:r.key});if(t.target instanceof HTMLElement||t.target instanceof SVGElement)if(!0===n&&t.target instanceof HTMLElement)b(t.target.parentElement);else if(t.target instanceof HTMLElement){const e=yr(t.target,xr);b(e||t.target)}else{const e=t.target.closest(`.${xr}`);e instanceof HTMLElement&&b(e)}const i=[...e.getFilteredThreads(O,{entityType:o,companyId:E},"both")],s=i.length>0&&i[0].length>0?i[0][0]:gr("subscription",r.key,E);O.has(s)?Y(s):d===s?x(void 0):(x(s),z(null))}},[O,E,d,Y,x,z,p,q]),X=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("subscription",t,E);x(void 0),Y(o)},[E,x,Y]);return e.jsxRuntimeExports.jsx(e.FormProvider,{...W,children:e.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{p(),null!=d&&(x(void 0),d.includes(e.NEW_THREAD_SUFFIX)&&N(d))},children:e.jsxRuntimeExports.jsx(Dx,{windowSize:j,isThreadOpen:V||_,totalHeight:l,isCreationInProgress:B,children:ex.map((t,n)=>{const r=e.toCollaborationEntityType({tab:"subscription",key:t.key}),l=ex.length-2<=n,p=[...e.getFilteredThreads(O,{entityType:r,companyId:E},"both")],x=p.length>0&&p[0].length>0?p[0][0]:gr("subscription",t.key,E),C=O.get(x),b=null!=C&&!1===C.resolved,R=x===L,w=d===x;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs(Ax,{companyNameSticky:s,columnWidth:t.width,windowSize:j,isThreadOpen:R||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),ref:e=>{m(E,t.key,e)},children:[e.jsxRuntimeExports.jsxs(Ix,{children:[e.jsxRuntimeExports.jsx(Px,{onClick:e=>{e.preventDefault(),g(o)},children:H.name}),e.jsxRuntimeExports.jsx(e.ThreadComponent,{isElementThreadOpen:R,targetElement:c??f,roomId:I,openThreadId:L,openThreadMetadata:F?.metadata??null})]}),e.jsxRuntimeExports.jsxs(Lx,{children:[e.jsxRuntimeExports.jsxs(Fx,{onClick:e=>{e.preventDefault(),u({roomId:I,companyId:E,companyName:$,entityType:P})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:D.length,isLoading:A}),e.jsxRuntimeExports.jsx(Hx,{})]}),e.jsxRuntimeExports.jsx(Mx,{onClick:e=>{e.preventDefault(),y(o)},children:e.jsxRuntimeExports.jsx(zx,{className:"passportIcon"})})]}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:b,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:Z}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("subscription",t.key,E),addThreadRequestThreadId:d,itemKey:t.key,onAddThreadClick:X})]},x);case"status":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[!0===Boolean(H.status.code)?e.jsxRuntimeExports.jsx(_x,{textColor:e.getCockpitColor(H.status.code),children:H.status.name.toUpperCase()}):Rx.hyphen,K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"controller":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(e.UserMultiSelectField,{name:(k=U,M="controller",`${k}.${M}`),value:T.controller,placeholderLabel:vx.controller,pickerStyles:{titleTextStyle:e.textStyles.largeRegular,multiValueLabelTitleStyle:e.textStyles.largeRegular}}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"plans":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Nx,{children:H.plansWithStatus.length>0?e.jsxRuntimeExports.jsx(cx,{plansAndAddonNames:H.plansWithStatus,isCollapsed:a,rowIndex:i,onCollapseToggled:h,showCollapseToggle:bx(o,"plans"),companyId:E,tenantId:v,onPlanOrAddOnClicked:S}):Rx.hyphen}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"planLowerLimit":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Bx,{widthWrapper:t.width,windowSize:j,textColor:e.getCockpitColor("lowerLimit"),children:e.amountToString("0,0",H.slabLowerLimit)}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"planHigherLimit":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Bx,{widthWrapper:t.width,windowSize:j,textColor:e.getCockpitColor("upperLimit"),children:e.amountToString("0,0",H.slabUpperLimit)}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"avg2MonthExpenses":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Bx,{widthWrapper:t.width,windowSize:j,textColor:e.getCockpitColor("avg2MonthExpenses"),children:e.amountToString("0,0",H.avg2MonthExpenses)}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"addons":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Nx,{children:H.addonsWithStatus.length>0?e.jsxRuntimeExports.jsx(cx,{plansAndAddonNames:H.addonsWithStatus,isCollapsed:a,rowIndex:i,onCollapseToggled:h,showCollapseToggle:bx(o,"addons"),companyId:E,tenantId:v,onPlanOrAddOnClicked:S}):Rx.hyphen}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"upgradeStatus":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Ox,{children:H.recommendedActionName?e.jsxRuntimeExports.jsx(_x,{textColor:e.getCockpitColor(H.recommendedActionCode),onClick:e=>{e.preventDefault(),null!=v&&"upgrade"===H.recommendedActionCode&&S(E,v)},code:H.recommendedActionCode,children:H.recommendedActionName}):Rx.hyphen}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"monthlyRecurringRevenue":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(E,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsxs(Ox,{children:[e.jsxRuntimeExports.jsx(e.LargeRegular,{children:e.amountToString("0,0",H.monthlyRecurringRevenue)}),H.totalDues.amount>0?e.jsxRuntimeExports.jsx(Vx,{children:e.amountToString("0,0",H.totalDues).concat(Rx.space).concat(wx)}):null]}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);default:return null}var k,M})})})})})},$x=e=>{const t={plansWithStatus:[],addonsWithStatus:[]};return e.forEach(e=>{const o=e.plan?.plan.name??"",n=e.subscription.subscription.status.code;null!=o&&t.plansWithStatus.push({name:o,status:n}),e.addOns.forEach(e=>{t.addonsWithStatus.push({name:e.addOn.name,status:n})})}),t},kx=e=>e.reduce((e,t)=>(e[t.code]=t.name,e),{});function Tx(e,t,o){if(function(e){return"controller"===e}(e))return{isZeni:!0,role:e,userId:t,isSelected:o}}const Ix=o.div``,Px=o(e.LargeMediumSp)`
|
|
2282
|
+
`,yx=(e.sp[10],34),Sx=18,Cx=e=>({height:e.subscriptions.reduce((e,t)=>e+(t.addOns?.length??0),0)*Sx+yx,collapsedHeight:M}),fx=e=>({height:e.subscriptions.reduce((e,t)=>e+(null!=t.plan?1:0),0)*Sx+yx,collapsedHeight:M}),bx=(e,t)=>{switch(t){case"plans":{const t=fx(e);return t.height>t.collapsedHeight}case"addons":{const t=Cx(e);return t.height>t.collapsedHeight}}},jx=e.appLocale.getLocalizedStrings(),{common:{strings:Rx,due:wx}}=jx,Ex={status:jx.common.texts.status,group:jx.common.texts.group,plans:jx.common.texts.plans,controller:jx.common.texts.controller,customerSuccessManager:jx.common.texts.csManager,preparer:jx.common.texts.preparer,reviewer:jx.common.texts.reviewer,apAnalyst:jx.common.texts.apAnalyst,reportSent:jx.common.texts.date,taxStatus:jx.common.texts.status,taxLead:jx.common.texts.taxLead},vx=({companyView:o,allUsers:n,rowIndex:i,companyNameSticky:s,isCollapsed:a,totalHeight:l,addThreadRequestThreadId:d,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:u,setElementRef:m,setAddThreadRequestThreadId:x,onCollapseToggled:h,onCompanyNameClicked:g,onPassportIconClicked:y,onPlanOrAddOnClicked:S,changeHandlers:C})=>{const[f,b]=t.useState(null),j=e.useWindowSizeContext(),R=o.primarySubscription?.subscription,w=o.primarySubscription?.summary,E=o.primarySubscription?.summary.summary.tenantId,{companyId:v,name:$}=o.company.company.companyInfo,k=kx(w?.schema?.recommendedAction??[]),T=function(e,t){return{controller:{allUsers:t,selectedUsers:e.controllers.map(e=>e.user)}}}(o,n),I=`cockpit_${v}`,P="subscription.notes",{threads:D,isLoading:A}=e.useFilteredThreads({entityType:P,companyId:v},!1),{openThread:L,threads:O,addThread:M,removeThread:N,setOpenThread:z}=t.useContext(e.ThreadsContext),F=null!==L?O.get(L):null,V=!0===L?.includes(v),B=null!=L&&null==O.get(L)&&V,_=null!=d&&O.get(d)?.metadata.companyId===v,H={name:o.company.company.companyInfo.name,status:R?.subscription?.subscription?.status??{code:"",name:""},slabUpperLimit:R?.plan?.plan?.slabUpperLimit??{},slabLowerLimit:R?.plan?.plan?.slabLowerLimit??{},avg2MonthExpenses:w?.summary?.avg2MonthExpenses??{},totalDues:w?.summary?.totalDues??{},recommendedActionName:k[w?.summary?.recommendedActionCode??""]??"",recommendedActionCode:w?.summary?.recommendedActionCode??"",monthlyRecurringRevenue:w?.summary?.monthlyRecurringRevenue??{},...$x(o.subscriptions)},W=e.useForm({mode:"all"}),U="companyData",G=(e,t)=>{e===`${U}.controller`&&null!=v&&(t.users=function(e,t){const o={users:[]},n=t.split(".")[1],{selectedUsers:r,deSelectedUsers:i}=e[n];null==i||0==i?.length?r.forEach(e=>{if(!0===e.isUserSelectionUpdated){const t=Tx(n,e.userId,e.isRoleSelected);void 0!==t&&o.users?.push(t)}}):i.forEach(e=>{const t=Tx(n,e.userId,e.isRoleSelected);void 0!==t&&o.users?.push(t)});return{users:o.users}}(t,e).users,C(v,t))};t.useEffect(()=>{const t=W.watch((t,{name:o})=>{null!=o&&null!=t.companyData&&e.defer(()=>G(o,t.companyData))});return()=>{t.unsubscribe()}});const q=t.useCallback(()=>{!0===L?.includes(e.NEW_THREAD_SUFFIX)&&N(L),null!=d&&x(void 0)},[d,L,N,x]),K=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:I,addThreadRequestThreadId:d,openThreadId:L,threadStyle:t.threadStyle,openThreadMetadata:F?.metadata??null,onElementClick:Z,onAddThreadClick:X,targetElement:c??f}),Y=t.useCallback(t=>{if(t===L)z(null);else if(O.has(t))z(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toSubscriptionSortKeyType(n),v,$);M(t,{type:"thread",visibility:"public",id:t,roomId:I,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),z(t)}},[v,$,L,O,M,z,I]),Z=t.useCallback((t,o,n=!1)=>{const r=ex.find(e=>e.key===o);if(p(),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;q(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"subscription",key:r.key});if(t.target instanceof HTMLElement||t.target instanceof SVGElement)if(!0===n&&t.target instanceof HTMLElement)b(t.target.parentElement);else if(t.target instanceof HTMLElement){const e=yr(t.target,xr);b(e||t.target)}else{const e=t.target.closest(`.${xr}`);e instanceof HTMLElement&&b(e)}const i=[...e.getFilteredThreads(O,{entityType:o,companyId:v},"both")],s=i.length>0&&i[0].length>0?i[0][0]:gr("subscription",r.key,v);O.has(s)?Y(s):d===s?x(void 0):(x(s),z(null))}},[O,v,d,Y,x,z,p,q]),X=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("subscription",t,v);x(void 0),Y(o)},[v,x,Y]);return e.jsxRuntimeExports.jsx(e.FormProvider,{...W,children:e.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{p(),null!=d&&(x(void 0),d.includes(e.NEW_THREAD_SUFFIX)&&N(d))},children:e.jsxRuntimeExports.jsx(Dx,{windowSize:j,isThreadOpen:V||_,totalHeight:l,isCreationInProgress:B,children:ex.map((t,n)=>{const r=e.toCollaborationEntityType({tab:"subscription",key:t.key}),l=ex.length-2<=n,p=[...e.getFilteredThreads(O,{entityType:r,companyId:v},"both")],x=p.length>0&&p[0].length>0?p[0][0]:gr("subscription",t.key,v),C=O.get(x),b=null!=C&&!1===C.resolved,R=x===L,w=d===x;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs(Ax,{companyNameSticky:s,columnWidth:t.width,windowSize:j,isThreadOpen:R||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),ref:e=>{m(v,t.key,e)},children:[e.jsxRuntimeExports.jsxs(Ix,{children:[e.jsxRuntimeExports.jsx(Px,{onClick:e=>{e.preventDefault(),g(o)},children:H.name}),e.jsxRuntimeExports.jsx(e.ThreadComponent,{isElementThreadOpen:R,targetElement:c??f,roomId:I,openThreadId:L,openThreadMetadata:F?.metadata??null})]}),e.jsxRuntimeExports.jsxs(Lx,{children:[e.jsxRuntimeExports.jsxs(Fx,{onClick:e=>{e.preventDefault(),u({roomId:I,companyId:v,companyName:$,entityType:P})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:D.length,isLoading:A}),e.jsxRuntimeExports.jsx(Hx,{})]}),e.jsxRuntimeExports.jsx(Mx,{onClick:e=>{e.preventDefault(),y(o)},children:e.jsxRuntimeExports.jsx(zx,{className:"passportIcon"})})]}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:b,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:Z}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("subscription",t.key,v),addThreadRequestThreadId:d,itemKey:t.key,onAddThreadClick:X})]},x);case"status":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[!0===Boolean(H.status.code)?e.jsxRuntimeExports.jsx(_x,{textColor:e.getCockpitColor(H.status.code),children:H.status.name.toUpperCase()}):Rx.hyphen,K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"controller":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(e.UserMultiSelectField,{name:(k=U,M="controller",`${k}.${M}`),value:T.controller,placeholderLabel:Ex.controller,pickerStyles:{titleTextStyle:e.textStyles.largeRegular,multiValueLabelTitleStyle:e.textStyles.largeRegular}}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"plans":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Nx,{children:H.plansWithStatus.length>0?e.jsxRuntimeExports.jsx(cx,{plansAndAddonNames:H.plansWithStatus,isCollapsed:a,rowIndex:i,onCollapseToggled:h,showCollapseToggle:bx(o,"plans"),companyId:v,tenantId:E,onPlanOrAddOnClicked:S}):Rx.hyphen}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"planLowerLimit":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Bx,{widthWrapper:t.width,windowSize:j,textColor:e.getCockpitColor("lowerLimit"),children:e.amountToString("0,0",H.slabLowerLimit)}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"planHigherLimit":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Bx,{widthWrapper:t.width,windowSize:j,textColor:e.getCockpitColor("upperLimit"),children:e.amountToString("0,0",H.slabUpperLimit)}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"avg2MonthExpenses":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Bx,{widthWrapper:t.width,windowSize:j,textColor:e.getCockpitColor("avg2MonthExpenses"),children:e.amountToString("0,0",H.avg2MonthExpenses)}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"addons":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Nx,{children:H.addonsWithStatus.length>0?e.jsxRuntimeExports.jsx(cx,{plansAndAddonNames:H.addonsWithStatus,isCollapsed:a,rowIndex:i,onCollapseToggled:h,showCollapseToggle:bx(o,"addons"),companyId:v,tenantId:E,onPlanOrAddOnClicked:S}):Rx.hyphen}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"upgradeStatus":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsx(Ox,{children:H.recommendedActionName?e.jsxRuntimeExports.jsx(_x,{textColor:e.getCockpitColor(H.recommendedActionCode),onClick:e=>{e.preventDefault(),null!=E&&"upgrade"===H.recommendedActionCode&&S(v,E)},code:H.recommendedActionCode,children:H.recommendedActionName}):Rx.hyphen}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"monthlyRecurringRevenue":return e.jsxRuntimeExports.jsxs(Wx,{ref:e=>{m(v,t.key,e)},columnWidth:t.width,windowSize:j,isThreadOpen:V||w,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>Z(e,t.key),children:[e.jsxRuntimeExports.jsxs(Ox,{children:[e.jsxRuntimeExports.jsx(e.LargeRegular,{children:e.amountToString("0,0",H.monthlyRecurringRevenue)}),H.totalDues.amount>0?e.jsxRuntimeExports.jsx(Vx,{children:e.amountToString("0,0",H.totalDues).concat(Rx.space).concat(wx)}):null]}),K({isElementThreadOpen:R,isElementThreadPresent:b,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);default:return null}var k,M})})})})})},$x=e=>{const t={plansWithStatus:[],addonsWithStatus:[]};return e.forEach(e=>{const o=e.plan?.plan.name??"",n=e.subscription.subscription.status.code;null!=o&&t.plansWithStatus.push({name:o,status:n}),e.addOns.forEach(e=>{t.addonsWithStatus.push({name:e.addOn.name,status:n})})}),t},kx=e=>e.reduce((e,t)=>(e[t.code]=t.name,e),{});function Tx(e,t,o){if(function(e){return"controller"===e}(e))return{isZeni:!0,role:e,userId:t,isSelected:o}}const Ix=o.div``,Px=o(e.LargeMediumSp)`
|
|
2283
2283
|
word-break: break-word;
|
|
2284
2284
|
margin-right: 10px;
|
|
2285
2285
|
cursor: pointer;
|
|
@@ -2452,7 +2452,7 @@
|
|
|
2452
2452
|
`,Xx=o.div`
|
|
2453
2453
|
width: ${e=>e.width.valuePx(e.windowSize)};
|
|
2454
2454
|
color: ${e=>e.textColor.color.toString()};
|
|
2455
|
-
`,{collaboration:{threads:{placeholder:{addANewComment:Qx,replyAComment:Jx},tooltip:{resolveComment:eh,unResolveComment:th}}},common:{texts:{comments:oh}}}=e.appLocale.getLocalizedStrings(),nh={subscriptionRightPadding:new e.ResponsiveSized(e.sp[3],e.sp[8])},rh=t.createContext(void 0),ih=t.forwardRef((o,n)=>{const{children:r,style:i,...s}=o,{makeCompanyNameSticky:a,uiState:l,totalMonthlyRecurringRevenue:d,onColumnSortConfigChanged:c}=t.useContext(rh);return e.jsxRuntimeExports.jsxs(lh,{ref:n,style:{...i,width:"auto"},...s,children:[e.jsxRuntimeExports.jsx(tx,{companyNameSticky:a,onColumnSortConfigChanged:c,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),e.jsxRuntimeExports.jsx(ch,{children:r}),e.jsxRuntimeExports.jsx(Ux,{companyNameSticky:a,totalMRRAmount:e.amountToString("0,0",d)})]})});ih.displayName="Subscription list view inner element type";const sh=({index:t,data:o,style:n})=>{const r=e.useWindowSizeContext(),{setNoteData:i,subscriptionView:s,makeCompanyNameSticky:a,addThreadRequestThreadId:l,targetElement:d,resetTargetElementFromNavigation:c,setElementRef:p,changeHandlers:u,onCompanyNameClicked:m,onPassportIconClicked:x,onPlanOrAddOnClicked:h,setAddThreadRequestThreadId:g,onCollapseToggledHandler:y}=o,S=s.companies[t],{companyId:C}=S.company.company.companyInfo,f=!0===s.uiState.isCollapsedByCompanyId[C];return e.jsxRuntimeExports.jsx(dh,{isCollapsed:f,style:{...n,width:"fit-content",minWidth:"100%",padding:`${e.Space.sp0} ${nh.subscriptionRightPadding.valuePx(r)} ${e.Space.sp3} ${e.Space.sp0}`},children:e.jsxRuntimeExports.jsx(
|
|
2455
|
+
`,{collaboration:{threads:{placeholder:{addANewComment:Qx,replyAComment:Jx},tooltip:{resolveComment:eh,unResolveComment:th}}},common:{texts:{comments:oh}}}=e.appLocale.getLocalizedStrings(),nh={subscriptionRightPadding:new e.ResponsiveSized(e.sp[3],e.sp[8])},rh=t.createContext(void 0),ih=t.forwardRef((o,n)=>{const{children:r,style:i,...s}=o,{makeCompanyNameSticky:a,uiState:l,totalMonthlyRecurringRevenue:d,onColumnSortConfigChanged:c}=t.useContext(rh);return e.jsxRuntimeExports.jsxs(lh,{ref:n,style:{...i,width:"auto"},...s,children:[e.jsxRuntimeExports.jsx(tx,{companyNameSticky:a,onColumnSortConfigChanged:c,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),e.jsxRuntimeExports.jsx(ch,{children:r}),e.jsxRuntimeExports.jsx(Ux,{companyNameSticky:a,totalMRRAmount:e.amountToString("0,0",d)})]})});ih.displayName="Subscription list view inner element type";const sh=({index:t,data:o,style:n})=>{const r=e.useWindowSizeContext(),{setNoteData:i,subscriptionView:s,makeCompanyNameSticky:a,addThreadRequestThreadId:l,targetElement:d,resetTargetElementFromNavigation:c,setElementRef:p,changeHandlers:u,onCompanyNameClicked:m,onPassportIconClicked:x,onPlanOrAddOnClicked:h,setAddThreadRequestThreadId:g,onCollapseToggledHandler:y}=o,S=s.companies[t],{companyId:C}=S.company.company.companyInfo,f=!0===s.uiState.isCollapsedByCompanyId[C];return e.jsxRuntimeExports.jsx(dh,{isCollapsed:f,style:{...n,width:"fit-content",minWidth:"100%",padding:`${e.Space.sp0} ${nh.subscriptionRightPadding.valuePx(r)} ${e.Space.sp3} ${e.Space.sp0}`},children:e.jsxRuntimeExports.jsx(vx,{companyView:s.companies[t],allUsers:s.zeniUsers.values,rowIndex:t,companyNameSticky:a,isCollapsed:f,onCollapseToggled:y,onCompanyNameClicked:m,onPassportIconClicked:x,onPlanOrAddOnClicked:h,changeHandlers:u,addThreadRequestThreadId:l,targetElementFromNavigation:d,resetTargetElementFromNavigation:c,setNoteData:i,setElementRef:p,setAddThreadRequestThreadId:g,totalHeight:"number"==typeof n.height?n.height:M})},C)},ah=o.div`
|
|
2456
2456
|
/** Subtract top so list can occupy remaining available height */
|
|
2457
2457
|
height: calc(100vh - 110px);
|
|
2458
2458
|
max-width: 99.9%;
|
|
@@ -2466,7 +2466,7 @@
|
|
|
2466
2466
|
position: relative;
|
|
2467
2467
|
width: auto;
|
|
2468
2468
|
height: 100%;
|
|
2469
|
-
`,ph=(t,o)=>{const{noteLastUpdatedUserId:n,noteLastUpdateTime:r,note:i,...s}=t,{noteLastUpdatedUserId:a,noteLastUpdateTime:l,note:d,...c}=o;return e.isEqual(s,c)&&e.isEqual(i,d)},uh=(t,o)=>e.isEqual(t,o),mh=t.memo(({subscriptionView:o,onColumnSortConfigChanged:r,onCollapseToggled:i,onCompanyNameClicked:s,onPassportIconClicked:a,onPlanOrAddOnClicked:l,onScroll:d,changeHandlers:c,initialOpenThreadRequest:p})=>{const u=e.useWindowSizeContext(),m=t.useRef(null),[x,h]=t.useState(null),g=t.useRef(null),[y,S]=t.useState(null),C=!("small"===u||"medium-compact"===u);t.useEffect(()=>{m.current&&m.current.resetAfterIndex(0)},[o.uiState.isCollapsedByCompanyId,o.uiState.sortKey,o.uiState.sortOrder,o.companies.length]);const{uiState:f,totalMonthlyRecurringRevenue:b}=o,j=f.scrollYOffset??0,R=t.useCallback(e=>{const t=o.companies[e].company.company.companyInfo.companyId;i(t,!o.uiState.isCollapsedByCompanyId[t])},[i,o.companies,o.uiState.isCollapsedByCompanyId]),w=t.useCallback(e=>{const t=o.companies[e].company.company.companyInfo.name.length,n=o.companies[e].company.company.companyInfo.companyId,r=(e=>{const t=Cx(e),o=fx(e);return t.height>o.height?t:o})(o.companies[e]);return o.uiState.isCollapsedByCompanyId[n]?r.height:t>z?120:M},[o.companies,o.uiState.isCollapsedByCompanyId]),{setOpenThread:
|
|
2469
|
+
`,ph=(t,o)=>{const{noteLastUpdatedUserId:n,noteLastUpdateTime:r,note:i,...s}=t,{noteLastUpdatedUserId:a,noteLastUpdateTime:l,note:d,...c}=o;return e.isEqual(s,c)&&e.isEqual(i,d)},uh=(t,o)=>e.isEqual(t,o),mh=t.memo(({subscriptionView:o,onColumnSortConfigChanged:r,onCollapseToggled:i,onCompanyNameClicked:s,onPassportIconClicked:a,onPlanOrAddOnClicked:l,onScroll:d,changeHandlers:c,initialOpenThreadRequest:p})=>{const u=e.useWindowSizeContext(),m=t.useRef(null),[x,h]=t.useState(null),g=t.useRef(null),[y,S]=t.useState(null),C=!("small"===u||"medium-compact"===u);t.useEffect(()=>{m.current&&m.current.resetAfterIndex(0)},[o.uiState.isCollapsedByCompanyId,o.uiState.sortKey,o.uiState.sortOrder,o.companies.length]);const{uiState:f,totalMonthlyRecurringRevenue:b}=o,j=f.scrollYOffset??0,R=t.useCallback(e=>{const t=o.companies[e].company.company.companyInfo.companyId;i(t,!o.uiState.isCollapsedByCompanyId[t])},[i,o.companies,o.uiState.isCollapsedByCompanyId]),w=t.useCallback(e=>{const t=o.companies[e].company.company.companyInfo.name.length,n=o.companies[e].company.company.companyInfo.companyId,r=(e=>{const t=Cx(e),o=fx(e);return t.height>o.height?t:o})(o.companies[e]);return o.uiState.isCollapsedByCompanyId[n]?r.height:t>z?120:M},[o.companies,o.uiState.isCollapsedByCompanyId]),{setOpenThread:E,setRequestToOpenThread:v,requestToOpenThread:$,isLoading:k}=t.useContext(e.ThreadsContext);t.useEffect(()=>{null!=p&&"Completed"===o.fetchState&&!1===k&&v(p)},[p,o.fetchState,k,v]);const[T,I]=t.useState(void 0),P=t.useRef([]),D=t.useMemo(()=>({makeCompanyNameSticky:C,uiState:f,totalMonthlyRecurringRevenue:b,onColumnSortConfigChanged:r}),[C,f,b,r]),A=t.useCallback((e,t,n)=>{const r=o.companies.findIndex(t=>t.company.company.companyInfo.companyId===e),i=ex.findIndex(e=>e.key===t);-1!==r&&-1!==i&&(null==P.current[r]?P.current[r]=[n]:P.current[r][i]=n)},[o.companies]),L=t.useCallback(()=>{g.current=null,v(null)},[v]);return t.useEffect(()=>{if(null!=$&&null!=x){const{companyId:e,entityType:t}=$,[n,r]=t.split("."),i=o.companies.findIndex(t=>t.company.company.companyInfo.companyId===e),s=ex.findIndex(e=>e.key===r);-1===i||x.visibleStartIndex<=i&&x.visibleStopIndex>=i||m.current?.scrollToItem(i,"center"),setTimeout(()=>{const t=P.current[i]?.[0]?.getBoundingClientRect().bottom,o=P.current[i]?.[0]?.getBoundingClientRect().top;if(null!=t&&null!=o&&(window.innerHeight>=t&&window.innerHeight>=o||o<0)){const t=P.current[i][s];null!=t&&(g.current={companyId:e,target:t}),P.current[i][s]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const a=setInterval(()=>{const t=P.current[i]?.[s]?.getBoundingClientRect().left,o=P.current[i]?.[s]?.getBoundingClientRect().right,n=P.current[i]?.[s]?.offsetWidth;if(g.current?.companyId===e&&null!=t&&null!=n&&null!=o&&(t<window.innerWidth-n||o<window.innerWidth)){clearInterval(a);const e=$.threadId,t=$.onThreadShownCallback;!0===Boolean(e)&&(v(null),E($.threadId),t?.())}},500);setTimeout(()=>{clearInterval(a),v(null)},2e3)}},[$,x,E,v]),e.jsxRuntimeExports.jsx(ah,{children:e.jsxRuntimeExports.jsxs(rh.Provider,{value:D,children:[e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:n})=>e.jsxRuntimeExports.jsx(e.VariableSizeList,{height:t,innerElementType:ih,itemCount:o.companies.length,itemSize:w,onItemsRendered:e=>h(e),itemData:{subscriptionView:o,makeCompanyNameSticky:C,addThreadRequestThreadId:T,targetElement:g.current?.target,resetTargetElementFromNavigation:L,setElementRef:A,setAddThreadRequestThreadId:I,onCompanyNameClicked:s,onPassportIconClicked:a,changeHandlers:c,setNoteData:S,onCollapseToggledHandler:R,onPlanOrAddOnClicked:l},width:n,overscanCount:1,ref:m,onScroll:({scrollOffset:e})=>{d(e)},initialScrollOffset:j,children:sh})}),null!=y?e.jsxRuntimeExports.jsx(n.RoomProvider,{id:y.roomId,children:e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${y.companyName} ${oh}`,filter:{application:"cockpit",companyId:y.companyId,entityType:y.entityType,isGlobalComment:!1,tab:"subscription"},isLoading:!1,threadMetadata:{companyName:y.companyName,companyId:y.companyId,entityId:y.companyId,entityType:y.entityType,isGlobalComment:!1,application:"cockpit",tab:"subscription",url:window.location.href},textOverrides:{composerPlaceholder:Qx,replyComposerPlaceholder:Jx,threadResolve:eh,threadUnResolve:th},onThreadClick:e=>null,onCloseAllThreadsDrawer:()=>S(null)})}):null]})})},(t,o)=>{if(t.subscriptionView.companies.length!=o.subscriptionView.companies.length)return!1;let n=!0;for(let e=0;e<t.subscriptionView.companies.length;++e){const r=t.subscriptionView.companies[e],i=o.subscriptionView.companies[e],s=r.primarySubscription?.summary.summary,a=i.primarySubscription?.summary.summary;if(null!=s&&null!=a&&(n=ph(s,a)),n){const t=r.subscriptions,o=i.subscriptions;if(t.length!=o.length)return!1;for(let r=0;r<t.length&&(n=uh(t[e],o[e]),n);r++);}if(!n)break}return n=n&&e.isEqual(t.subscriptionView.zeniUsers.values,o.subscriptionView.zeniUsers.values),n=n&&t.subscriptionView.uiState.sortKey===o.subscriptionView.uiState.sortKey&&t.subscriptionView.uiState.sortOrder===o.subscriptionView.uiState.sortOrder&&e.isEqual(t.subscriptionView.uiState.isCollapsedByCompanyId,o.subscriptionView.uiState.isCollapsedByCompanyId),n}),{cockpit:{emptySearchOnFilters:xh,emptySearchTextSecondLine:hh},common:{texts:{sorryWeCouldnTFindAnyResults:gh}}}=e.appLocale.getLocalizedStrings(),yh=o.div`
|
|
2470
2470
|
display: flex;
|
|
2471
2471
|
width: 100%;
|
|
2472
2472
|
height: calc(100vh - 110px);
|
|
@@ -2483,7 +2483,7 @@
|
|
|
2483
2483
|
height: calc(100vh - 45px);
|
|
2484
2484
|
overflow-y: hidden;
|
|
2485
2485
|
background-color: ${e=>e.theme.colors.grey4};
|
|
2486
|
-
`,fh=({subscriptionView:t,isFilterApplied:o,initialOpenThreadRequest:n,onColumnSortConfigChanged:r,onCollapseToggled:i,onCockpitReloadData:s,changeHandlers:a,onScroll:l,onPlanOrAddOnClicked:d,onCompanyNameClicked:c,onPassportIconClicked:p,onClearFilter:u})=>{const m=e.useWindowSizeContext();return"Error"===t.fetchState?e.jsxRuntimeExports.jsx(Ln,{onCockpitReloadData:s,selectedCockpitOption:"subscription"}):"In-Progress"===t.fetchState||"Not-Started"===t.fetchState?e.jsxRuntimeExports.jsx(yh,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"ExtraLarge",start:!0})}):0===t.companies.length?o?e.jsxRuntimeExports.jsx(e.EmptySearchResults,{emptySearchTextFirstLine:xh,emptySearchTextSecondLine:hh,filtersApplied:!0,onClearFilter:u}):e.jsxRuntimeExports.jsx(e.EmptySearchResults,{emptySearchTextFirstLine:gh,emptySearchTextSecondLine:hh}):e.jsxRuntimeExports.jsx(Sh,{windowSize:m,children:e.jsxRuntimeExports.jsx(mh,{initialOpenThreadRequest:n,subscriptionView:t,changeHandlers:a,onCollapseToggled:i,onColumnSortConfigChanged:r,onCompanyNameClicked:c,onPassportIconClicked:p,onPlanOrAddOnClicked:d,onScroll:l})})},bh=e=>{const t=e.zeniUsers.values,o=_,{companies:n}=e;return o.reduce((o,r)=>{switch(r.value){case"statusCode":return 0===n.length?{...o,[r.value]:[]}:{...o,[r.value]:n[0].primarySubscription?.subscription.subscription.schema.status.map(e=>{const t=e;return{label:t.name,value:t.code}})};case"controllerUserIds":{if(0===n.length)return{...o,[r.value]:[]};const e=t.map(e=>({label:Boolean(e.firstName)||Boolean(e.lastName)?`${e.firstName} ${e.lastName}`:e.email,value:e.userId,photo:e.photo,email:e.email}));return{...o,[r.value]:e}}case"recommendedActionCode":return 0===n.length?{...o,[r.value]:[]}:{...o,[r.value]:n[0].primarySubscription?.summary.schema.recommendedAction.map(e=>{const t=e;return{label:t.name,value:t.code}})};case"monthlyRecurringRevenue":return{...o,[r.value]:G};case"subscriptionPlans":return{...o,[r.value]:e.subscriptionPlans.map(e=>({label:e.name,value:e.subscriptionPlanId}))};case"subscriptionAddOns":return{...o,[r.value]:e.subscriptionAddOns.map(e=>({label:e.name,value:e.subscriptionAddOnId}))};case"avg2MonthExpenses":return{...o,[r.value]:q};case"slabLowerLimit":case"slabUpperLimit":return{...o,[r.value]:K};default:return{...o,[r.value]:[]}}},{})},jh={width:new e.ResponsiveSized(343,580,756)},{subscriptionUpdate:{updatePlan:{applyChanges:Rh}},dateFormat:{visual:wh}}=e.appLocale.getLocalizedStrings();function
|
|
2486
|
+
`,fh=({subscriptionView:t,isFilterApplied:o,initialOpenThreadRequest:n,onColumnSortConfigChanged:r,onCollapseToggled:i,onCockpitReloadData:s,changeHandlers:a,onScroll:l,onPlanOrAddOnClicked:d,onCompanyNameClicked:c,onPassportIconClicked:p,onClearFilter:u})=>{const m=e.useWindowSizeContext();return"Error"===t.fetchState?e.jsxRuntimeExports.jsx(Ln,{onCockpitReloadData:s,selectedCockpitOption:"subscription"}):"In-Progress"===t.fetchState||"Not-Started"===t.fetchState?e.jsxRuntimeExports.jsx(yh,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"ExtraLarge",start:!0})}):0===t.companies.length?o?e.jsxRuntimeExports.jsx(e.EmptySearchResults,{emptySearchTextFirstLine:xh,emptySearchTextSecondLine:hh,filtersApplied:!0,onClearFilter:u}):e.jsxRuntimeExports.jsx(e.EmptySearchResults,{emptySearchTextFirstLine:gh,emptySearchTextSecondLine:hh}):e.jsxRuntimeExports.jsx(Sh,{windowSize:m,children:e.jsxRuntimeExports.jsx(mh,{initialOpenThreadRequest:n,subscriptionView:t,changeHandlers:a,onCollapseToggled:i,onColumnSortConfigChanged:r,onCompanyNameClicked:c,onPassportIconClicked:p,onPlanOrAddOnClicked:d,onScroll:l})})},bh=e=>{const t=e.zeniUsers.values,o=_,{companies:n}=e;return o.reduce((o,r)=>{switch(r.value){case"statusCode":return 0===n.length?{...o,[r.value]:[]}:{...o,[r.value]:n[0].primarySubscription?.subscription.subscription.schema.status.map(e=>{const t=e;return{label:t.name,value:t.code}})};case"controllerUserIds":{if(0===n.length)return{...o,[r.value]:[]};const e=t.map(e=>({label:Boolean(e.firstName)||Boolean(e.lastName)?`${e.firstName} ${e.lastName}`:e.email,value:e.userId,photo:e.photo,email:e.email}));return{...o,[r.value]:e}}case"recommendedActionCode":return 0===n.length?{...o,[r.value]:[]}:{...o,[r.value]:n[0].primarySubscription?.summary.schema.recommendedAction.map(e=>{const t=e;return{label:t.name,value:t.code}})};case"monthlyRecurringRevenue":return{...o,[r.value]:G};case"subscriptionPlans":return{...o,[r.value]:e.subscriptionPlans.map(e=>({label:e.name,value:e.subscriptionPlanId}))};case"subscriptionAddOns":return{...o,[r.value]:e.subscriptionAddOns.map(e=>({label:e.name,value:e.subscriptionAddOnId}))};case"avg2MonthExpenses":return{...o,[r.value]:q};case"slabLowerLimit":case"slabUpperLimit":return{...o,[r.value]:K};default:return{...o,[r.value]:[]}}},{})},jh={width:new e.ResponsiveSized(343,580,756)},{subscriptionUpdate:{updatePlan:{applyChanges:Rh}},dateFormat:{visual:wh}}=e.appLocale.getLocalizedStrings();function Eh({subscriptionUpdateData:t,subscriptionTermEndDate:o,isSubscriptionDetailsChanged:n,isDisabled:r,sectionId:i,style:s}){const a=e.useWindowSizeContext(),l=o?.format(wh.MMMDCommaYYYYformat),d=!0===Boolean(l)?`${Rh.nextRenewal} (${l})`:Rh.nextRenewal;let c=!0===t?.applyEndOfTerm?"readonly":r;return!1===n&&(c="disabled"),e.jsxRuntimeExports.jsxs($h,{style:s,children:[e.jsxRuntimeExports.jsx(kh,{children:Rh.title}),e.jsxRuntimeExports.jsxs(Ph,{children:[e.jsxRuntimeExports.jsx(e.LabeledRadioField,{isDisabled:r,label:{label:d},style:{padding:`${e.Space.sp3} ${e.Space.sp0}`},radioField:{name:vh(i,"changeType"),id:"applyEndOfTerm",value:"applyEndOfTerm"}}),e.jsxRuntimeExports.jsx(e.LabeledRadioField,{isDisabled:!1===n?"disabled":r,label:{label:Rh.immediately},style:{paddingTop:e.Space.sp3},radioField:{name:vh(i,"changeType"),id:"applyImmediately",value:"applyImmediately"}}),e.jsxRuntimeExports.jsx(e.LabeledUnSafeCheckBoxField,{isDisabled:c,label:{label:Rh.applyProRated},checkBoxField:{name:vh(i,"shouldProrate"),defaultChecked:!0===t?.shouldProrate,style:{paddingLeft:e.Space.sp4}}}),e.jsxRuntimeExports.jsxs(Th,{size:a,isDisabled:!1===n?"disabled":r,children:[e.jsxRuntimeExports.jsx(Ih,{children:Rh.proRatedDescription}),e.jsxRuntimeExports.jsx(Ih,{children:Rh.proRatedText1}),e.jsxRuntimeExports.jsx(Ih,{children:Rh.proRatedText2})]})]})]})}const vh=(e,t)=>`${e}.${t}`,$h=o.div`
|
|
2487
2487
|
display: flex;
|
|
2488
2488
|
flex-direction: column;
|
|
2489
2489
|
`,kh=o(e.ExtraLargeMedium)`
|
|
@@ -2505,7 +2505,7 @@
|
|
|
2505
2505
|
`,Ph=o.div`
|
|
2506
2506
|
display: flex;
|
|
2507
2507
|
flex-direction: column;
|
|
2508
|
-
`,Dh=e.appLocale.getLocalizedStrings().common,Ah={infoLabel:new e.ResponsiveSizedStyle("smallRegular","standardRegular"),selectFieldInput:new e.ResponsiveSizedStyle("standardRegular","largeRegular")},Lh=({name:o,registerOptions:n,defaultValue:r,isDisabled:i,style:s,placeholder:a,valueToInfo:l,valueToId:d,showEmptyState:c,additionalLabelInfo:p,customStyleConfig:u,showDownChevronWithValue:m,customPlaceholderString:x,allowEmpty:h=!0,tooltip:g,menuPortal:y,disableCurrentOption:S})=>{const{control:C,formState:{errors:f,dirtyFields:b}}=e.useFormContext(),j=e.useWindowSizeContext(),R=e.useTheme(),[w,
|
|
2508
|
+
`,Dh=e.appLocale.getLocalizedStrings().common,Ah={infoLabel:new e.ResponsiveSizedStyle("smallRegular","standardRegular"),selectFieldInput:new e.ResponsiveSizedStyle("standardRegular","largeRegular")},Lh=({name:o,registerOptions:n,defaultValue:r,isDisabled:i,style:s,placeholder:a,valueToInfo:l,valueToId:d,showEmptyState:c,additionalLabelInfo:p,customStyleConfig:u,showDownChevronWithValue:m,customPlaceholderString:x,allowEmpty:h=!0,tooltip:g,menuPortal:y,disableCurrentOption:S})=>{const{control:C,formState:{errors:f,dirtyFields:b}}=e.useFormContext(),j=e.useWindowSizeContext(),R=e.useTheme(),[w,E]=t.useState(!1),v=e.has(b,o),$=e.has(f,o??""),k=t.useCallback(e=>({value:e.value,label:e.label,info:l?.(e.value)??"",id:d?.(e.value)??null,isDisabled:e.isDisabled,additionalNote:e?.additionalNote,isOptionRecommended:e.isOptionRecommended}),[l,d]),T=e=>{if(null==e||!1===Boolean(e))return;let t=[];return r.allOptions.forEach(e=>{t=t.concat(e.options)}),{value:e,label:t.find(t=>t.value===e)?.label??e,info:l?.(e)??""}};if(!0===c&&!1===w&&!1===v&&!1===Boolean(r.selectedOption)&&null==i)return e.jsxRuntimeExports.jsx(e.ItemWithButton,{style:s,buttonTitle:Dh.add,onClick:()=>E(!0),name:o});const I={...u,container:e=>({...e,width:"100%",...s}),menu:(e,t)=>({...e,backgroundColor:R.colors.grey5,borderRadius:"6px",whiteSpace:"nowrap",zIndex:2,width:"100%",margin:0,...u?.menu?.(e,t)}),menuList:(e,t)=>({...e,borderRadius:"6px",...u?.menuList?.(e,t)}),group:e=>({...e,borderBottom:`1px solid ${R.colors.grey3}`,paddingBottom:0}),control:(e,t)=>({...e,borderRadius:"6px",...u?.control?.(e,t)})},P={hasError:$,showDownChevronWithValue:m,customPlaceholderString:x};return e.jsxRuntimeExports.jsx(e.Controller,{name:o,control:C,defaultValue:r,rules:n,render:({field:{onChange:o,onBlur:n,value:r,ref:s}})=>{const l=r;return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[t.createElement(e.StateManagedSelect$1,{...P,ref:s,isMulti:!1,isSearchable:!0,isClearable:!0,controlShouldRenderValue:!0,placeholder:a,value:T(l.selectedOption),options:(d=l.allOptions,d.map(e=>({label:e.label,options:e.options.map(e=>k(e))}))),onChange:e=>{null==e||null!=e?.value&&l?.selectedOption===e.value?!0===h&&o({selectedOption:void 0,allOptions:l.allOptions}):o({selectedOption:e.value,allOptions:l.allOptions})},key:e.nanoid(),tabSelectsValue:!1,openMenuOnFocus:!0,classNamePrefix:"grouped-single-select-field",onBlur:n,menuPlacement:"auto",menuPortalTarget:y,maxMenuHeight:288,menuShouldScrollIntoView:!0,closeMenuOnSelect:!0,components:{Control:Oh,Option:_h,Input:Nh,Group:zh,GroupHeading:Fh,SingleValue:e=>Vh(e,g),ValueContainer:Mh,DropdownIndicator:cg,IndicatorSeparator:pg,Placeholder:Bh,ClearIndicator:ug},hideSelectedOptions:!1,styles:I,isDisabled:null!=i,isOptionDisabled:e=>S?.(e.value)??!1}),e.jsxRuntimeExports.jsx(tg,{size:j,children:p})]});var d}})},Oh=t=>{const{menuIsOpen:o,isFocused:n,isDisabled:r,selectProps:i,data:s,options:a}=t,{value:l,hasError:d,customPlaceholderString:c}=i;let p=[];a.forEach(e=>{p=p.concat(e.options)});const u=p.find(e=>e.value===s?.value),m=e.useWindowSizeContext();return e.jsxRuntimeExports.jsx(qh,{title:null!=c&&null!=l?l.label:void 0,windowSize:m,menuIsOpen:o,isFocused:n,isDisabled:r,selectedValue:l,hasError:d,customPlaceholderString:c,isRecommended:u?.isOptionRecommended,children:e.jsxRuntimeExports.jsx(e.components.Control,{...t,className:"select-control",children:t.children})})},Mh=t=>{const{selectProps:o,children:n}=t,{showDownChevronWithValue:r}=o;return e.jsxRuntimeExports.jsxs(e.components.ValueContainer,{...t,className:"select-value-container",children:[n,!0===r?e.jsxRuntimeExports.jsx(e.LargeRegular,{children:e.jsxRuntimeExports.jsx(Kh,{})}):null]})},Nh=t=>{const{selectProps:o,innerRef:n,innerProps:r}=t,{placeholder:i,value:s,customPlaceholderString:a,menuIsOpen:l,onMenuOpen:d,hasError:c}=o;return null!=a&&null==s&&!1===l?e.jsxRuntimeExports.jsx(gg,{ref:n,...r,onClick:d,style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"flex-start",cursor:"pointer"},className:"custom-placeholder",children:e.jsxRuntimeExports.jsxs(mg,{children:[e.jsxRuntimeExports.jsx(xg,{hasError:c}),e.jsxRuntimeExports.jsx(hg,{hasError:c,children:a})]})}):e.jsxRuntimeExports.jsx(e.components.Input,{...t,autoComplete:"new-password",autoFocus:l,placeholder:null==s?i:void 0,children:t.children})},zh=t=>e.jsxRuntimeExports.jsx(e.components.Group,{...t,children:t.children}),Fh=o=>{const[n,r]=t.useState(!0);return e.jsxRuntimeExports.jsx(og,{className:"group-heading-container",isGroupOpen:n,onClick:()=>r(!n),children:e.jsxRuntimeExports.jsxs(e.components.GroupHeading,{...o,children:[e.jsxRuntimeExports.jsx(ng,{isGroupOpen:n,children:e.jsxRuntimeExports.jsx(rg,{className:"close-tick-icon"})}),o.children]})})},Vh=({children:t,...o},n)=>{const r=null==n||!0===o.selectProps.menuIsOpen?t:!0===n.sticky?e.jsxRuntimeExports.jsx(Hh,{title:n.text,children:t}):e.jsxRuntimeExports.jsx(e.Tooltip,{style:{padding:e.Space.sp3},title:n.text,placement:"top",children:t});return e.jsxRuntimeExports.jsx(e.components.SingleValue,{title:t,...o,children:r})},Bh=()=>null,_h=t=>{const{data:o,isSelected:n,options:r,isDisabled:i,isFocused:s,selectProps:a}=t,{customPlaceholderString:l}=a;let d=[];r.forEach(e=>{d=d.concat(e.options)});const c=d.find(e=>e.value===o.value);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(Yh,{title:null!=l?t.label:void 0,className:"select-option-wrapper",isFocused:s,isSelected:n,isDisabled:i,isOptionRecommended:!0===c?.isOptionRecommended,showBottomBorder:null==c?.additionalNote||!1===c?.isOptionRecommended,children:e.jsxRuntimeExports.jsx(e.components.Option,{...t,className:"select-option",children:e.jsxRuntimeExports.jsxs(Zh,{children:[e.jsxRuntimeExports.jsxs(eg,{isSelected:n,children:[e.jsxRuntimeExports.jsx(Xh,{isSelected:n,isDisabled:i,children:t.label}),!0===s&&null!=c?.id&&e.jsxRuntimeExports.jsx(dg,{children:c.id}),!0===s&&!0===Boolean(c?.info)?e.jsxRuntimeExports.jsx(Jh,{isSelected:Boolean(n),children:c?.info}):null]}),!0===c?.isOptionRecommended?e.jsxRuntimeExports.jsx(lg,{}):null,!0===Boolean(n)&&null==c?.additionalNote?e.jsxRuntimeExports.jsxs(ig,{children:[e.jsxRuntimeExports.jsx(sg,{className:"right-tick-icon"}),e.jsxRuntimeExports.jsx(ag,{className:"close-tick-icon"})]}):null]})})}),!0===c?.isOptionRecommended&&null!=c.additionalNote?e.jsxRuntimeExports.jsx(Qh,{isSelected:n,isDisabled:i,children:c?.additionalNote}):null]})},Hh=({children:t,title:o})=>e.jsxRuntimeExports.jsxs(Wh,{children:[e.jsxRuntimeExports.jsxs(Uh,{children:[o,e.jsxRuntimeExports.jsx(Gh,{})]}),t]}),Wh=o.div`
|
|
2509
2509
|
position: relative;
|
|
2510
2510
|
display: contents;
|
|
2511
2511
|
`,Uh=o.div`
|
|
@@ -2791,7 +2791,7 @@
|
|
|
2791
2791
|
${e=>`${Sg.infoLabel.style(e.size)}`};
|
|
2792
2792
|
padding-right: ${e.Space.sp3};
|
|
2793
2793
|
text-align: right;
|
|
2794
|
-
`,Rg={width:new e.ResponsiveSized(343,580,756),height:new e.ResponsiveSized(e.sp[6],e.sp[6]),controlHeight:new e.ResponsiveSized(e.sp[6],e.sp[6]),paddingTopBottom:new e.ResponsiveSized(e.sp[2],e.sp[2]),marginTop:new e.ResponsiveSized(e.sp[2],e.sp[2]),marginBottom:new e.ResponsiveSized(e.sp[2],e.sp[2]),marginRight:new e.ResponsiveSized(e.sp[2],e.sp[2]),labelMarginLeft:new e.ResponsiveSized(e.sp[3],e.sp[4]),labelMarginRight:new e.ResponsiveSized(e.sp[4],e.sp[4]),labelMarginTop:new e.ResponsiveSized(e.sp[2],e.sp[2])},wg={infoLabel:new e.ResponsiveSizedStyle("smallRegular","standardRegular")};function
|
|
2794
|
+
`,Rg={width:new e.ResponsiveSized(343,580,756),height:new e.ResponsiveSized(e.sp[6],e.sp[6]),controlHeight:new e.ResponsiveSized(e.sp[6],e.sp[6]),paddingTopBottom:new e.ResponsiveSized(e.sp[2],e.sp[2]),marginTop:new e.ResponsiveSized(e.sp[2],e.sp[2]),marginBottom:new e.ResponsiveSized(e.sp[2],e.sp[2]),marginRight:new e.ResponsiveSized(e.sp[2],e.sp[2]),labelMarginLeft:new e.ResponsiveSized(e.sp[3],e.sp[4]),labelMarginRight:new e.ResponsiveSized(e.sp[4],e.sp[4]),labelMarginTop:new e.ResponsiveSized(e.sp[2],e.sp[2])},wg={infoLabel:new e.ResponsiveSizedStyle("smallRegular","standardRegular")};function Eg({isDisabled:o,label:n,singleSelectPickerField:r,allOptions:i,defaultValues:s,valueToAdditionalLabel:a,style:l}){const d=e.useWindowSizeContext(),{formState:{errors:c},control:p}=e.useFormContext(),{fields:u,replace:m}=e.useFieldArray({control:p,name:r.name}),x=e.has(c,r.name);return t.useEffect(()=>{const t=u.map(e=>e.selectedOption);if(!e.isEqual(t,s)){const e=s.map(e=>({selectedOption:e,allOptions:Dg(i,s,e)}));m(e)}},[i,s,u,m]),e.jsxRuntimeExports.jsxs($g,{size:d,style:l,isDisabled:null!=o,children:[e.jsxRuntimeExports.jsx(e.Label,{isDisabled:o,label:n.label,fieldCode:n.fieldCode,htmlFor:r.name,style:{marginLeft:Rg.labelMarginLeft.value(d),marginRight:Rg.labelMarginRight.value(d),marginTop:Rg.labelMarginTop.value(d),width:n.width??"auto"}}),e.jsxRuntimeExports.jsxs(kg,{size:d,labelWidth:n.width,children:[u.map((n,l)=>{const c=s[l];return e.jsxRuntimeExports.jsxs(Tg,{children:[t.createElement(e.SingleSelectPickerField,{...r,name:`${r.name}.${l}`,key:n.id,defaultValue:{selectedOption:c,allOptions:Dg(i,s,c)},isDisabled:o,style:{display:"flex",flexGrow:1,width:"-webkit-fill-available",height:Rg.controlHeight.value(d),cursor:"inherit"}}),null!=c?e.jsxRuntimeExports.jsx(Ig,{size:d,isError:x,children:a?.(c)}):null]},`${r.name}.${l}`)}),null==o?e.jsxRuntimeExports.jsx(Tg,{children:e.jsxRuntimeExports.jsx(e.SingleSelectPickerField,{...r,showEmptyState:0!==u.length,name:`${r.name}.${s.length}`,defaultValue:{selectedOption:void 0,allOptions:Dg(i,s)},isDisabled:o,style:{display:"flex",flexGrow:1,width:"-webkit-fill-available",height:Rg.controlHeight.value(d),cursor:"inherit"}})},`${r.name}.${s.length}`):e.jsxRuntimeExports.jsx(vg,{numberOfFields:u.length,placeholder:r.placeholder})]})]})}const vg=({numberOfFields:t,placeholder:o})=>{const n=e.useWindowSizeContext();return t>0||null==o?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}):e.jsxRuntimeExports.jsx(Pg,{size:n,children:o})},$g=o.div`
|
|
2795
2795
|
display: flex;
|
|
2796
2796
|
flex-direction: row;
|
|
2797
2797
|
align-items: flex-start;
|
|
@@ -2850,7 +2850,7 @@
|
|
|
2850
2850
|
justify-content: flex-end;
|
|
2851
2851
|
align-items: center;
|
|
2852
2852
|
user-select: none;
|
|
2853
|
-
`,Dg=(e,t,o)=>e.map(e=>({...e,isDisabled:e.value!==o&&t.includes(e.value)})),{common:Ag,subscriptionUpdate:Lg}=e.appLocale.getLocalizedStrings(),{texts:{selectPlan:Og},labels:{recurringAddons:Mg,coupon:Ng}}=Ag,zg={labelWidth:new e.ResponsiveSized(115,145,155),mediumLabelWidth:new e.ResponsiveSized(140,160,170),largeLabelWidth:new e.ResponsiveSized(160,210,210),paddingBottom:new e.ResponsiveSized(e.sp[3],e.sp[2])};function Fg({sectionId:t,isDisabled:o,subscriptionUpdateData:n,subscriptionMetaDetails:r,recommendedSubscriptionPlanId:i,style:s}){const a=e.useWindowSizeContext(),{labels:l,placeholders:d}=Lg.dropDowns,c=zg.labelWidth.value(a),p=zg.mediumLabelWidth.value(a),u=zg.largeLabelWidth.value(a),{plans:m,addOns:x,coupons:h}=r;return e.jsxRuntimeExports.jsx(Bg,{style:s,children:e.jsxRuntimeExports.jsxs(_g,{children:[e.jsxRuntimeExports.jsx(Cg,{label:{label:l.planName,width:p},isDisabled:o,groupedSingleSelectField:{name:Vg(t,"subscriptionPlan"),placeholder:Og,valueToInfo:t=>{const o=m.find(e=>e.subscriptionPlanId===t);return e.amountToString("0,0.00",o?.price)},defaultValue:{selectedOption:n?.subscriptionPlanId,allOptions:Wg(m,i)},registerOptions:{required:!0,validate:e=>null!=e&&null!=e.selectedOption||null!=o}},valueToAdditionalLabel:e=>{const t=m.find(t=>t.subscriptionPlanId===e);return Ug(t?.price,t?.period)??""}}),e.jsxRuntimeExports.jsx(Hg,{}),e.jsxRuntimeExports.jsx(
|
|
2853
|
+
`,Dg=(e,t,o)=>e.map(e=>({...e,isDisabled:e.value!==o&&t.includes(e.value)})),{common:Ag,subscriptionUpdate:Lg}=e.appLocale.getLocalizedStrings(),{texts:{selectPlan:Og},labels:{recurringAddons:Mg,coupon:Ng}}=Ag,zg={labelWidth:new e.ResponsiveSized(115,145,155),mediumLabelWidth:new e.ResponsiveSized(140,160,170),largeLabelWidth:new e.ResponsiveSized(160,210,210),paddingBottom:new e.ResponsiveSized(e.sp[3],e.sp[2])};function Fg({sectionId:t,isDisabled:o,subscriptionUpdateData:n,subscriptionMetaDetails:r,recommendedSubscriptionPlanId:i,style:s}){const a=e.useWindowSizeContext(),{labels:l,placeholders:d}=Lg.dropDowns,c=zg.labelWidth.value(a),p=zg.mediumLabelWidth.value(a),u=zg.largeLabelWidth.value(a),{plans:m,addOns:x,coupons:h}=r;return e.jsxRuntimeExports.jsx(Bg,{style:s,children:e.jsxRuntimeExports.jsxs(_g,{children:[e.jsxRuntimeExports.jsx(Cg,{label:{label:l.planName,width:p},isDisabled:o,groupedSingleSelectField:{name:Vg(t,"subscriptionPlan"),placeholder:Og,valueToInfo:t=>{const o=m.find(e=>e.subscriptionPlanId===t);return e.amountToString("0,0.00",o?.price)},defaultValue:{selectedOption:n?.subscriptionPlanId,allOptions:Wg(m,i)},registerOptions:{required:!0,validate:e=>null!=e&&null!=e.selectedOption||null!=o}},valueToAdditionalLabel:e=>{const t=m.find(t=>t.subscriptionPlanId===e);return Ug(t?.price,t?.period)??""}}),e.jsxRuntimeExports.jsx(Hg,{}),e.jsxRuntimeExports.jsx(Eg,{label:{label:Mg,width:c},isDisabled:o,singleSelectPickerField:{name:Vg(t,"recurringAddOns"),placeholder:d.selectAddOn,valueToInfo:t=>{const o=x.find(e=>e.subscriptionAddOnId===t);return e.amountToString("0,0.00",o?.price)}},valueToAdditionalLabel:e=>{const t=x.find(t=>t.subscriptionAddOnId===e);return Ug(t?.price,t?.period)??""},defaultValues:n?.subscriptionAddOnIds??[],allOptions:x.map(e=>({label:e.name,value:e.subscriptionAddOnId}))}),e.jsxRuntimeExports.jsx(Hg,{}),e.jsxRuntimeExports.jsx(e.LabeledItemWithButton,{isDisabled:"readonly",label:{label:l.nonRecurringAddOns,width:u},style:{opacity:.32},button:{buttonTitle:Ag.add,style:{pointerEvents:"none"}}}),e.jsxRuntimeExports.jsx(Hg,{}),e.jsxRuntimeExports.jsx(e.LabeledSingleSelectPickerField,{isDisabled:o,label:{label:Ng,width:c},singleSelectPickerField:{name:Vg(t,"coupon"),placeholder:d.selectCoupon,defaultValue:{selectedOption:n?.subscriptionCouponIds[0],allOptions:h.map(e=>({label:e.name,value:e.subscriptionCouponId}))}}})]})})}const Vg=(e,t)=>`${e}.${t}`,Bg=o.div`
|
|
2854
2854
|
display: flex;
|
|
2855
2855
|
flex-direction: column;
|
|
2856
2856
|
padding-top: ${e.Space.sp3};
|
|
@@ -2889,7 +2889,7 @@
|
|
|
2889
2889
|
justify-content: center;
|
|
2890
2890
|
height: 100%;
|
|
2891
2891
|
overflow-y: auto;
|
|
2892
|
-
`,oy=e=>`${e}_form`,ny=e=>{const{data:t,subscriptionDetail:o}=e,n=o?.summary?.summary,r=o?.subscription.subscription.subscriptionPlanId,{plans:i,addOns:s,coupons:a}=iy(e),l=null!=n?.recommendedSubscriptionPlanId&&r===n?.primarySubscriptionPlanId?n?.recommendedSubscriptionPlanId:void 0;return{[Xg]:{subscriptionPlan:{selectedOption:t?.subscriptionPlanId,allOptions:Wg(i,l)},recurringAddOns:ry(s,t?.subscriptionAddOnIds),coupon:{selectedOption:t?.subscriptionCouponIds[0],allOptions:a.map(e=>({label:e.name,value:e.subscriptionCouponId}))}},[Qg]:{changeType:!0===t?.applyEndOfTerm?"applyEndOfTerm":"applyImmediately",shouldProrate:!0===t?.shouldProrate}}},ry=(e,t)=>t?.map(o=>{const n=e.map(e=>({label:e.name,value:e.subscriptionAddOnId,isDisabled:e.subscriptionAddOnId!==o&&t?.includes(e.subscriptionAddOnId)}));return{selectedOption:o,allOptions:n}})??[],iy=e=>{const{subscriptionMetaDetails:t}=e;return{plans:t.plans.filter(e=>"active"===e.plan.statusCode).map(e=>e.plan),addOns:t.addOns.filter(e=>"active"===e.addOn.statusCode&&"recurring"===e.addOn.chargeType).map(e=>e.addOn),coupons:t.coupons.filter(e=>"active"===e.coupon.statusCode).map(e=>e.coupon)}},sy=t=>{const{data:o,subscriptionDetail:n}=t;if(null==o||null==n)return!1;const r=n.subscription.subscription.status.code;return[ay(t),!e.isEqual(o.applyEndOfTerm,"future"!==r),!e.isEqual(o.shouldProrate,"future"===r),!e.isEqual(o.invoiceImmediately,!0)].reduce((e,t)=>e||t,!1)},ay=t=>{const{data:o,subscriptionDetail:n}=t;return null!=o&&null!=n&&[!e.isEqual(o.subscriptionPlanId,n.plan?.plan.subscriptionPlanId),!e.isEqual(o.subscriptionAddOnIds,n.addOns?.map(e=>e.addOn.subscriptionAddOnId)),!e.isEqual(o.subscriptionCouponIds,n.coupons?.map(e=>e.coupon.subscriptionCouponId))].reduce((e,t)=>e||t,!1)},ly=e=>{const{subscriptionDetail:t}=e,o=t?.subscription.subscription.status.code,n=t?.summary?.summary,r=t?.subscription.subscription.subscriptionPlanId,{plans:i,addOns:s,coupons:a}=iy(e),l=null!=n?.recommendedSubscriptionPlanId&&r===n?.primarySubscriptionPlanId?n?.recommendedSubscriptionPlanId:void 0;return{[Xg]:{subscriptionPlan:{selectedOption:r,allOptions:Wg(i,l)},recurringAddOns:ry(s,t?.addOns.map(e=>e.addOn.subscriptionAddOnId)),coupon:{selectedOption:t?.coupons[0]?.coupon.subscriptionCouponId,allOptions:a.map(e=>({label:e.name,value:e.subscriptionCouponId}))}},[Qg]:{changeType:"future"===o?"applyImmediately":"applyEndOfTerm",shouldProrate:"future"===o}}},{common:dy,subscriptionUpdate:cy,dateFormat:{visual:py}}=e.appLocale.getLocalizedStrings(),uy={labelWidth:new e.ResponsiveSized(115,145,155),mediumLabelWidth:new e.ResponsiveSized(140,160,170),largeLabelWidth:new e.ResponsiveSized(160,210,210),paddingBottom:new e.ResponsiveSized(e.sp[3],e.sp[2])};function my({sectionId:t,isDisabled:o,subscriptionCreateData:n,subscriptionMetaDetails:i,recommendedSubscriptionPlanId:s,style:a}){const l=e.useWindowSizeContext(),{labels:d,placeholders:c}=cy.dropDowns,p=uy.labelWidth.value(l),u=uy.mediumLabelWidth.value(l),m=uy.largeLabelWidth.value(l),{plans:x,addOns:h,coupons:g}=i;return e.jsxRuntimeExports.jsx(hy,{style:a,children:e.jsxRuntimeExports.jsxs(gy,{children:[e.jsxRuntimeExports.jsx(Cg,{label:{label:d.planName,width:u},isDisabled:o,groupedSingleSelectField:{name:xy(t,"subscriptionPlan"),placeholder:dy.texts.selectPlan,valueToInfo:t=>{const o=x.find(e=>e.subscriptionPlanId===t);return e.amountToString("0,0.00",o?.price)},defaultValue:{selectedOption:n?.subscriptionPlanId,allOptions:Wg(x,s)},registerOptions:{required:!0,validate:e=>null!=e&&null!=e.selectedOption||null!=o}},valueToAdditionalLabel:e=>{const t=x.find(t=>t.subscriptionPlanId===e);return Ug(t?.price,t?.period)??""}}),e.jsxRuntimeExports.jsx(yy,{}),e.jsxRuntimeExports.jsx(
|
|
2892
|
+
`,oy=e=>`${e}_form`,ny=e=>{const{data:t,subscriptionDetail:o}=e,n=o?.summary?.summary,r=o?.subscription.subscription.subscriptionPlanId,{plans:i,addOns:s,coupons:a}=iy(e),l=null!=n?.recommendedSubscriptionPlanId&&r===n?.primarySubscriptionPlanId?n?.recommendedSubscriptionPlanId:void 0;return{[Xg]:{subscriptionPlan:{selectedOption:t?.subscriptionPlanId,allOptions:Wg(i,l)},recurringAddOns:ry(s,t?.subscriptionAddOnIds),coupon:{selectedOption:t?.subscriptionCouponIds[0],allOptions:a.map(e=>({label:e.name,value:e.subscriptionCouponId}))}},[Qg]:{changeType:!0===t?.applyEndOfTerm?"applyEndOfTerm":"applyImmediately",shouldProrate:!0===t?.shouldProrate}}},ry=(e,t)=>t?.map(o=>{const n=e.map(e=>({label:e.name,value:e.subscriptionAddOnId,isDisabled:e.subscriptionAddOnId!==o&&t?.includes(e.subscriptionAddOnId)}));return{selectedOption:o,allOptions:n}})??[],iy=e=>{const{subscriptionMetaDetails:t}=e;return{plans:t.plans.filter(e=>"active"===e.plan.statusCode).map(e=>e.plan),addOns:t.addOns.filter(e=>"active"===e.addOn.statusCode&&"recurring"===e.addOn.chargeType).map(e=>e.addOn),coupons:t.coupons.filter(e=>"active"===e.coupon.statusCode).map(e=>e.coupon)}},sy=t=>{const{data:o,subscriptionDetail:n}=t;if(null==o||null==n)return!1;const r=n.subscription.subscription.status.code;return[ay(t),!e.isEqual(o.applyEndOfTerm,"future"!==r),!e.isEqual(o.shouldProrate,"future"===r),!e.isEqual(o.invoiceImmediately,!0)].reduce((e,t)=>e||t,!1)},ay=t=>{const{data:o,subscriptionDetail:n}=t;return null!=o&&null!=n&&[!e.isEqual(o.subscriptionPlanId,n.plan?.plan.subscriptionPlanId),!e.isEqual(o.subscriptionAddOnIds,n.addOns?.map(e=>e.addOn.subscriptionAddOnId)),!e.isEqual(o.subscriptionCouponIds,n.coupons?.map(e=>e.coupon.subscriptionCouponId))].reduce((e,t)=>e||t,!1)},ly=e=>{const{subscriptionDetail:t}=e,o=t?.subscription.subscription.status.code,n=t?.summary?.summary,r=t?.subscription.subscription.subscriptionPlanId,{plans:i,addOns:s,coupons:a}=iy(e),l=null!=n?.recommendedSubscriptionPlanId&&r===n?.primarySubscriptionPlanId?n?.recommendedSubscriptionPlanId:void 0;return{[Xg]:{subscriptionPlan:{selectedOption:r,allOptions:Wg(i,l)},recurringAddOns:ry(s,t?.addOns.map(e=>e.addOn.subscriptionAddOnId)),coupon:{selectedOption:t?.coupons[0]?.coupon.subscriptionCouponId,allOptions:a.map(e=>({label:e.name,value:e.subscriptionCouponId}))}},[Qg]:{changeType:"future"===o?"applyImmediately":"applyEndOfTerm",shouldProrate:"future"===o}}},{common:dy,subscriptionUpdate:cy,dateFormat:{visual:py}}=e.appLocale.getLocalizedStrings(),uy={labelWidth:new e.ResponsiveSized(115,145,155),mediumLabelWidth:new e.ResponsiveSized(140,160,170),largeLabelWidth:new e.ResponsiveSized(160,210,210),paddingBottom:new e.ResponsiveSized(e.sp[3],e.sp[2])};function my({sectionId:t,isDisabled:o,subscriptionCreateData:n,subscriptionMetaDetails:i,recommendedSubscriptionPlanId:s,style:a}){const l=e.useWindowSizeContext(),{labels:d,placeholders:c}=cy.dropDowns,p=uy.labelWidth.value(l),u=uy.mediumLabelWidth.value(l),m=uy.largeLabelWidth.value(l),{plans:x,addOns:h,coupons:g}=i;return e.jsxRuntimeExports.jsx(hy,{style:a,children:e.jsxRuntimeExports.jsxs(gy,{children:[e.jsxRuntimeExports.jsx(Cg,{label:{label:d.planName,width:u},isDisabled:o,groupedSingleSelectField:{name:xy(t,"subscriptionPlan"),placeholder:dy.texts.selectPlan,valueToInfo:t=>{const o=x.find(e=>e.subscriptionPlanId===t);return e.amountToString("0,0.00",o?.price)},defaultValue:{selectedOption:n?.subscriptionPlanId,allOptions:Wg(x,s)},registerOptions:{required:!0,validate:e=>null!=e&&null!=e.selectedOption||null!=o}},valueToAdditionalLabel:e=>{const t=x.find(t=>t.subscriptionPlanId===e);return Ug(t?.price,t?.period)??""}}),e.jsxRuntimeExports.jsx(yy,{}),e.jsxRuntimeExports.jsx(Eg,{label:{label:dy.labels.recurringAddons,width:p},isDisabled:o,singleSelectPickerField:{name:xy(t,"recurringAddOns"),placeholder:c.selectAddOn,valueToInfo:t=>{const o=h.find(e=>e.subscriptionAddOnId===t);return e.amountToString("0,0.00",o?.price)}},valueToAdditionalLabel:e=>{const t=h.find(t=>t.subscriptionAddOnId===e);return Ug(t?.price,t?.period)??""},defaultValues:n?.subscriptionAddOnIds??[],allOptions:h.map(e=>({label:e.name,value:e.subscriptionAddOnId}))}),e.jsxRuntimeExports.jsx(yy,{}),e.jsxRuntimeExports.jsx(e.LabeledItemWithButton,{isDisabled:"readonly",label:{label:d.nonRecurringAddOns,width:m},style:{opacity:.32},button:{buttonTitle:dy.add,style:{pointerEvents:"none"}}}),e.jsxRuntimeExports.jsx(yy,{}),e.jsxRuntimeExports.jsx(e.LabeledSingleSelectPickerField,{isDisabled:o,label:{label:dy.labels.coupon,width:p},singleSelectPickerField:{name:xy(t,"coupon"),placeholder:c.selectCoupon,defaultValue:{selectedOption:n?.subscriptionCouponIds[0],allOptions:g.map(e=>({label:e.name,value:e.subscriptionCouponId}))}}}),e.jsxRuntimeExports.jsx(yy,{}),e.jsxRuntimeExports.jsx(e.LabeledDatePickerField,{isDisabled:o,label:{label:d.startDate,width:p},dateField:{name:xy(t,"planStartDate"),placeholder:dy.texts.selectStartDate,defaultValue:n?.startDate,dateFormat:py.defaultInput,minDate:r.dateNow(),autoComplete:"off"}})]})})}const xy=(e,t)=>`${e}.${t}`,hy=o.div`
|
|
2893
2893
|
display: flex;
|
|
2894
2894
|
flex-direction: column;
|
|
2895
2895
|
padding-top: ${e.Space.sp3};
|
|
@@ -2907,14 +2907,14 @@
|
|
|
2907
2907
|
background-color: ${e=>e.theme.colors.grey3};
|
|
2908
2908
|
min-height: 1px;
|
|
2909
2909
|
max-height: 1px;
|
|
2910
|
-
`,{subscriptionUpdate:{addPlan:{invoiceOption:{title:Sy,invoiceNow:Cy}}},common:{texts:{ifThereAreAnyChargesYouCanEither:fy}}}=e.appLocale.getLocalizedStrings(),by={width:new e.ResponsiveSized(343,580,756)};function jy({isDisabled:t,sectionId:o,style:n}){const r=e.useWindowSizeContext();return e.jsxRuntimeExports.jsxs(wy,{style:n,children:[e.jsxRuntimeExports.jsx(
|
|
2910
|
+
`,{subscriptionUpdate:{addPlan:{invoiceOption:{title:Sy,invoiceNow:Cy}}},common:{texts:{ifThereAreAnyChargesYouCanEither:fy}}}=e.appLocale.getLocalizedStrings(),by={width:new e.ResponsiveSized(343,580,756)};function jy({isDisabled:t,sectionId:o,style:n}){const r=e.useWindowSizeContext();return e.jsxRuntimeExports.jsxs(wy,{style:n,children:[e.jsxRuntimeExports.jsx(Ey,{children:Sy}),e.jsxRuntimeExports.jsx(vy,{size:r,children:e.jsxRuntimeExports.jsx($y,{children:fy})}),e.jsxRuntimeExports.jsx(ky,{children:e.jsxRuntimeExports.jsx(e.LabeledRadioField,{isDisabled:t,label:{label:Cy},style:{padding:`${e.Space.sp3} ${e.Space.sp0}`},radioField:{name:Ry(o,"invoicingOption"),id:"invoiceNow",value:"invoiceNow"}})})]})}const Ry=(e,t)=>`${e}.${t}`,wy=o.div`
|
|
2911
2911
|
display: flex;
|
|
2912
2912
|
flex-direction: column;
|
|
2913
|
-
`,
|
|
2913
|
+
`,Ey=o(e.ExtraLargeMedium)`
|
|
2914
2914
|
color: ${e=>e.theme.colors.primary};
|
|
2915
2915
|
padding: ${e.Space.sp3} ${e.Space.sp0};
|
|
2916
2916
|
border-bottom: 1px solid ${e=>e.theme.colors.grey3};
|
|
2917
|
-
`,
|
|
2917
|
+
`,vy=o(e.LargeRegular)`
|
|
2918
2918
|
width: ${e=>by.width.valuePx(e.size)};
|
|
2919
2919
|
color: ${e=>e.theme.colors.hero};
|
|
2920
2920
|
padding-top: ${e.Space.sp3};
|
|
@@ -2996,7 +2996,7 @@
|
|
|
2996
2996
|
&:hover {
|
|
2997
2997
|
color: ${e=>e.theme.colors.primary};
|
|
2998
2998
|
}
|
|
2999
|
-
`,rS=e.appLocale.getLocalizedStrings(),{common:{texts:{runway:iS}}}=rS,{common:{strings:sS}}=rS,aS=({companyView:o,companyNameSticky:n,totalHeight:i,addThreadRequestThreadId:s,setNoteData:a,setElementRef:l,setAddThreadRequestThreadId:d,onCompanyNameClicked:c,onPassportIconClicked:p})=>{const u=e.useWindowSizeContext(),{accountingSummary:m,company:x}=o,{companyId:h,name:g}=x.company.companyInfo,y=`cockpit_${h}`,S="portfolio.notes",{threads:C,isLoading:f}=e.useFilteredThreads({entityType:S,companyId:h},!1),{openThread:b,threads:j,addThread:R,removeThread:w,setOpenThread:
|
|
2999
|
+
`,rS=e.appLocale.getLocalizedStrings(),{common:{texts:{runway:iS}}}=rS,{common:{strings:sS}}=rS,aS=({companyView:o,companyNameSticky:n,totalHeight:i,addThreadRequestThreadId:s,setNoteData:a,setElementRef:l,setAddThreadRequestThreadId:d,onCompanyNameClicked:c,onPassportIconClicked:p})=>{const u=e.useWindowSizeContext(),{accountingSummary:m,company:x}=o,{companyId:h,name:g}=x.company.companyInfo,y=`cockpit_${h}`,S="portfolio.notes",{threads:C,isLoading:f}=e.useFilteredThreads({entityType:S,companyId:h},!1),{openThread:b,threads:j,addThread:R,removeThread:w,setOpenThread:E,setRequestToOpenThread:v}=t.useContext(e.ThreadsContext),$=t.useRef(null),k=null!==b?j.get(b):null,T=!0===b?.includes(h),I=null!=b&&null==j.get(b)&&T,P=null!=s&&j.get(s)?.metadata.companyId===h,D=t.useCallback(()=>{!0===b?.includes(e.NEW_THREAD_SUFFIX)&&w(b),null!=s&&d(void 0)},[s,b,w,d]),A=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:y,addThreadRequestThreadId:s,openThreadId:b,threadStyle:t.threadStyle,openThreadMetadata:k?.metadata??null,onElementClick:O,onAddThreadClick:M}),L=t.useCallback(t=>{if(t===b)E(null);else if(j.has(t))E(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toPortfolioSortKeyType(n),h,g);R(t,{type:"thread",visibility:"public",id:t,roomId:y,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),E(t)}},[h,g,b,y,j,R,E]),O=t.useCallback((t,o,n=!1)=>{const r=Yy.find(e=>e.key===o);if(v(null),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;D(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"portfolio",key:r.key}),n=[...e.getFilteredThreads(j,{entityType:o,companyId:h},"both")],i=n.length>0&&n[0].length>0?n[0][0]:gr("portfolio",r.key,h);j.has(i)?L(i):s===i?d(void 0):(d(i),E(null))}},[j,h,s,L,d,E,v,D]),M=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("portfolio",t,h);d(void 0),L(o)},[h,d,L]),N={name:o.company.company.companyInfo.name,runway:m.runway,cashBalance:m.cashPosition?.balance,expenses:m.cogs?.balance&&m.expenses?.balance?lS(m.cogs?.balance,m.expenses?.balance):void 0,netIncome:m.netBurnOrIncome?.balance,revenues:m.income?.balance};return e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{v(null),null!=s&&(d(void 0),s.includes(e.NEW_THREAD_SUFFIX)&&w(s))},children:e.jsxRuntimeExports.jsx(dS,{windowSize:u,isThreadOpen:T||P,totalHeight:i,isCreationInProgress:I,children:Yy.map((t,r)=>{const i=e.toCollaborationEntityType({tab:"portfolio",key:t.key}),d=[...e.getFilteredThreads(j,{entityType:i,companyId:h},"both")],m=Yy.length-2<=r,x=d.length>0&&d[0].length>0?d[0][0]:gr("portfolio",t.key,h),R=j.get(x),w=null!=R&&!1===R.resolved,E=x===b,v=s===x;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs(yS,{companyNameSticky:n,columnWidth:t.width,windowSize:u,isThreadOpen:E||v,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>O(e,t.key),ref:e=>{l(h,t.key,e)},children:[e.jsxRuntimeExports.jsxs(cS,{ref:$,children:[e.jsxRuntimeExports.jsx(pS,{onClick:e=>{e.preventDefault(),c(o)},children:N.name}),e.jsxRuntimeExports.jsx(e.ThreadComponent,{anchorRef:$,isElementThreadOpen:E,roomId:y,openThreadId:b,openThreadMetadata:k?.metadata??null})]}),e.jsxRuntimeExports.jsxs(mS,{children:[e.jsxRuntimeExports.jsxs(xS,{onClick:e=>{e.preventDefault(),a({roomId:y,companyId:h,companyName:g,entityType:S})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:C.length,isLoading:f}),e.jsxRuntimeExports.jsx(hS,{})]}),e.jsxRuntimeExports.jsx(gS,{onClick:e=>{e.preventDefault(),p(o)},children:e.jsxRuntimeExports.jsx(uS,{className:"passportIcon"})})]}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:w,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:O}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("portfolio",t.key,h),addThreadRequestThreadId:s,itemKey:t.key,onAddThreadClick:M})]},x);case"cashBalance":return e.jsxRuntimeExports.jsxs(SS,{ref:e=>{l(h,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>O(e,t.key),children:[e.jsxRuntimeExports.jsx(CS,{textColor:e.getCockpitColor("cashBalance"),wrapperWidth:t.width,windowSize:u,children:e.amountToString("0,0",N.cashBalance)}),A({isElementThreadOpen:E,isElementThreadPresent:w,itemKey:t.key,elementThreadId:x,threadStyle:m?{right:e.Space.sp0}:void 0})]},x);case"expenses":return e.jsxRuntimeExports.jsxs(SS,{ref:e=>{l(h,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>O(e,t.key),children:[e.jsxRuntimeExports.jsx(CS,{textColor:e.getCockpitColor("expenses"),wrapperWidth:t.width,windowSize:u,children:e.amountToString("0,0",N.expenses)}),A({isElementThreadOpen:E,isElementThreadPresent:w,itemKey:t.key,elementThreadId:x,threadStyle:m?{right:e.Space.sp0}:void 0})]},x);case"revenues":return e.jsxRuntimeExports.jsxs(SS,{ref:e=>{l(h,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>O(e,t.key),children:[e.jsxRuntimeExports.jsx(CS,{textColor:e.getCockpitColor("revenues"),wrapperWidth:t.width,windowSize:u,children:e.amountToString("0,0",N.revenues)}),A({isElementThreadOpen:E,isElementThreadPresent:w,itemKey:t.key,elementThreadId:x,threadStyle:m?{right:e.Space.sp0}:void 0})]},x);case"netIncome":return e.jsxRuntimeExports.jsxs(SS,{ref:e=>{l(h,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>O(e,t.key),children:[e.jsxRuntimeExports.jsx(CS,{textColor:e.getCockpitColor("netIncome"),wrapperWidth:t.width,windowSize:u,children:e.amountToString("0,0",N.netIncome)}),A({isElementThreadOpen:E,isElementThreadPresent:w,itemKey:t.key,elementThreadId:x,threadStyle:m?{right:e.Space.sp0}:void 0})]},x);case"runway":return e.jsxRuntimeExports.jsxs(SS,{ref:e=>{l(h,t.key,e)},columnWidth:t.width,windowSize:u,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>O(e,t.key),children:[e.jsxRuntimeExports.jsx(fS,{wrapperWidth:t.width,windowSize:u,children:null!=N.runway?e.jsxRuntimeExports.jsx(e.Tooltip,{variant:"runway",data:N.runway,placement:"right",title:iS,children:e.jsxRuntimeExports.jsx(jS,{textColor:e.getCockpitColor(N.runway.runwayStatusCode)})}):e.jsxRuntimeExports.jsx(bS,{children:sS.hyphen})}),A({isElementThreadOpen:E,isElementThreadPresent:w,itemKey:t.key,elementThreadId:x,threadStyle:m?{right:e.Space.sp0}:void 0})]},x);default:return null}})})})},lS=(e,t)=>({amount:e.amount+t.amount,currencyCode:e.currencyCode,currencySymbol:e.currencySymbol}),dS=o.div`
|
|
3000
3000
|
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
3001
3001
|
border-radius: ${e.Space.sp2};
|
|
3002
3002
|
display: flex;
|
|
@@ -3125,7 +3125,7 @@
|
|
|
3125
3125
|
height: 12px;
|
|
3126
3126
|
border-radius: 50%;
|
|
3127
3127
|
background-color: ${e=>e.textColor.color.toString()};
|
|
3128
|
-
`,RS=e=>p.createElement("svg",{width:48,height:49,viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M23.994 6.29199C20.3944 6.29199 16.8756 7.3594 13.8826 9.35924C10.8897 11.3591 8.55692 14.2015 7.17941 17.5271C5.80189 20.8528 5.44147 24.5122 6.14372 28.0426C6.84597 31.5731 8.57935 34.816 11.1247 37.3613C13.67 39.9066 16.9129 41.64 20.4434 42.3423C23.9738 43.0445 27.6332 42.6841 30.9588 41.3066C34.2845 39.9291 37.1269 37.5963 39.1268 34.6034C41.1266 31.6104 42.194 28.0916 42.194 24.492C42.194 22.1019 41.7232 19.7353 40.8086 17.5271C39.894 15.319 38.5534 13.3127 36.8633 11.6226C35.1733 9.93262 33.167 8.59202 30.9588 7.67738C28.7507 6.76275 26.3841 6.29199 23.994 6.29199Z",fill:"#F9E3AE"}),p.createElement("path",{d:"M8.86603 42.1201C11.0593 44.2078 13.6416 45.8442 16.466 46.9361L44.69 18.7081V13.3861C43.8158 11.9373 42.7857 10.5886 41.618 9.36406L8.86603 42.1201ZM7.25203 40.4221L39.726 7.94806H34.76L5.14803 37.5601C5.77565 38.5661 6.47902 39.5229 7.25203 40.4221ZM4.79203 34.6061L32.276 7.12206L29.794 5.46606L3.60803 31.6521C3.93426 32.6628 4.32987 33.6498 4.79203 34.6061Z",fill:"#FFEFCA"}),p.createElement("path",{d:"M24 1.32788C19.417 1.32788 14.937 2.68689 11.1263 5.23307C7.31572 7.77924 4.34571 11.3982 2.59188 15.6323C0.838043 19.8665 0.37916 24.5256 1.27326 29.0205C2.16735 33.5154 4.37427 37.6443 7.61493 40.885C10.8556 44.1256 14.9845 46.3325 19.4794 47.2266C23.9743 48.1207 28.6334 47.6618 32.8675 45.908C37.1017 44.1542 40.7206 41.1842 43.2668 37.3735C45.813 33.5629 47.172 29.0829 47.172 24.4999C47.172 18.3543 44.7307 12.4604 40.3851 8.1148C36.0395 3.76921 30.1456 1.32788 24 1.32788ZM24 42.7079C21.0282 42.7036 18.1025 41.9717 15.4788 40.576C12.855 39.1803 10.613 37.1634 8.9485 34.7014C7.28402 32.2394 6.24775 29.4072 5.93024 26.4524C5.61273 23.4975 6.02363 20.5099 7.12705 17.7504C8.23047 14.991 9.99283 12.5438 12.2602 10.6225C14.5275 8.70128 17.2308 7.36449 20.1339 6.72895C23.037 6.0934 26.0516 6.17844 28.9143 6.97663C31.7769 7.77482 34.4006 9.26187 36.556 11.3079L37.118 11.8599C37.3313 12.0825 37.538 12.3085 37.738 12.5379C40.0344 15.1727 41.5236 18.4131 42.0276 21.8717C42.5315 25.3304 42.0289 28.861 40.5798 32.0416C39.1307 35.2222 36.7965 37.9183 33.856 39.8076C30.9155 41.697 27.4932 42.6997 23.998 42.6959L24 42.7079Z",fill:"#F6D397"}),p.createElement("path",{d:"M32.192 9.06799C32.3774 9.06725 32.5571 9.00433 32.7025 8.8893C32.8479 8.77426 32.9504 8.61378 32.9937 8.43354C33.0371 8.25331 33.0187 8.06374 32.9415 7.89521C32.8643 7.72667 32.7328 7.58891 32.568 7.50399C31.9491 7.19298 31.3135 6.91655 30.664 6.67599C30.4615 6.60992 30.2413 6.62464 30.0494 6.71706C29.8575 6.80949 29.7087 6.97247 29.6341 7.17199C29.5595 7.37151 29.5649 7.59213 29.6491 7.78779C29.7333 7.98345 29.8898 8.13901 30.086 8.22199C30.6776 8.44532 31.2571 8.69967 31.822 8.98399C31.9377 9.03856 32.064 9.06723 32.192 9.06799Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M24 0.5C19.2533 0.5 14.6131 1.90758 10.6663 4.54473C6.71954 7.18188 3.6434 10.9302 1.8269 15.3156C0.0103989 19.701 -0.464881 24.5266 0.461164 29.1822C1.38721 33.8377 3.67299 38.1141 7.02945 41.4706C10.3859 44.827 14.6623 47.1128 19.3178 48.0388C23.9734 48.9649 28.799 48.4896 33.1844 46.6731C37.5698 44.8566 41.3181 41.7805 43.9553 37.8337C46.5924 33.8869 48 29.2467 48 24.5C48 18.1348 45.4714 12.0303 40.9706 7.52944C36.4697 3.02856 30.3652 0.5 24 0.5ZM24 46.844C19.5808 46.844 15.2608 45.5335 11.5863 43.0783C7.9119 40.6232 5.04801 37.1335 3.35685 33.0507C1.66568 28.9678 1.2232 24.4752 2.08534 20.1409C2.94749 15.8066 5.07555 11.8253 8.20041 8.7004C11.3253 5.57554 15.3066 3.44748 19.6409 2.58533C23.9752 1.72319 28.4678 2.16567 32.5507 3.85684C36.6335 5.548 40.1232 8.41189 42.5784 12.0863C45.0336 15.7608 46.344 20.0808 46.344 24.5C46.3435 30.4258 43.9892 36.1088 39.799 40.299C35.6088 44.4892 29.9258 46.8435 24 46.844Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M24 40.2239C23.7805 40.2245 23.5702 40.3119 23.4151 40.467C23.2599 40.6222 23.1725 40.8325 23.172 41.0519V42.7079C23.172 42.9275 23.2592 43.1381 23.4145 43.2934C23.5698 43.4487 23.7804 43.5359 24 43.5359C24.2196 43.5359 24.4302 43.4487 24.5855 43.2934C24.7407 43.1381 24.828 42.9275 24.828 42.7079V41.0519C24.8274 40.8325 24.74 40.6222 24.5849 40.467C24.4297 40.3119 24.2194 40.2245 24 40.2239ZM28.958 40.2859C28.9004 40.0738 28.7609 39.8931 28.5702 39.7838C28.3795 39.6745 28.1531 39.6454 27.941 39.7029C27.7288 39.7605 27.5482 39.9 27.4389 40.0907C27.3295 40.2814 27.3004 40.5078 27.358 40.7199L27.788 42.3199C27.8585 42.5177 28.0013 42.6814 28.1875 42.7783C28.3737 42.8753 28.5897 42.8982 28.7922 42.8425C28.9946 42.7869 29.1685 42.6567 29.279 42.4782C29.3895 42.2997 29.4284 42.0859 29.388 41.8799L28.958 40.2859ZM16.338 38.1679C16.2435 38.113 16.139 38.0775 16.0306 38.0632C15.9222 38.049 15.8121 38.0564 15.7067 38.0851C15.6012 38.1137 15.5024 38.163 15.4161 38.2301C15.3299 38.2972 15.2577 38.3808 15.204 38.4759L14.376 39.9079C14.2783 40.097 14.2571 40.3164 14.3169 40.5207C14.3767 40.7249 14.5129 40.8983 14.6971 41.0048C14.8813 41.1114 15.0995 41.1429 15.3064 41.0928C15.5132 41.0427 15.6929 40.9149 15.808 40.7359L16.636 39.3039C16.6913 39.21 16.7274 39.1061 16.7424 38.9981C16.7573 38.8902 16.7508 38.7803 16.7231 38.6749C16.6954 38.5695 16.6471 38.4706 16.581 38.3839C16.5149 38.2973 16.4323 38.2245 16.338 38.1699V38.1679ZM32.784 38.4759C32.6689 38.2969 32.4892 38.1691 32.2824 38.1191C32.0755 38.069 31.8573 38.1005 31.6731 38.207C31.4889 38.3135 31.3527 38.4869 31.2929 38.6912C31.2331 38.8954 31.2543 39.1149 31.352 39.3039L32.18 40.7359C32.2314 40.8355 32.3025 40.9235 32.3889 40.9948C32.4754 41.066 32.5754 41.119 32.6829 41.1505C32.7904 41.1819 32.9032 41.1913 33.0145 41.1779C33.1257 41.1645 33.233 41.1287 33.33 41.0726C33.427 41.0165 33.5116 40.9414 33.5787 40.8516C33.6458 40.7619 33.694 40.6595 33.7203 40.5506C33.7467 40.4417 33.7507 40.3286 33.732 40.2182C33.7134 40.1077 33.6726 40.0022 33.612 39.9079L32.784 38.4759ZM20.03 39.7019C19.8181 39.6457 19.5926 39.6759 19.4028 39.7857C19.2131 39.8956 19.0747 40.0762 19.018 40.2879L18.588 41.8879C18.5597 41.993 18.5525 42.1026 18.5666 42.2104C18.5807 42.3183 18.6159 42.4223 18.6703 42.5166C18.7246 42.6108 18.7969 42.6935 18.8832 42.7598C18.9695 42.826 19.0679 42.8747 19.173 42.9029C19.278 42.9312 19.3876 42.9384 19.4955 42.9243C19.6034 42.9102 19.7074 42.875 19.8016 42.8206C19.8959 42.7663 19.9785 42.694 20.0448 42.6077C20.1111 42.5215 20.1597 42.423 20.188 42.3179L20.622 40.7179C20.6783 40.506 20.6485 40.2805 20.5391 40.0905C20.4296 39.9005 20.2495 39.7616 20.038 39.7039L20.03 39.7019ZM22.338 17.0499H25.648C26.3061 17.0505 26.9371 17.3121 27.4024 17.7775C27.8678 18.2428 28.1294 18.8738 28.13 19.5319C28.13 19.7515 28.2172 19.9621 28.3725 20.1174C28.5278 20.2727 28.7384 20.3599 28.958 20.3599C29.1776 20.3599 29.3882 20.2727 29.5435 20.1174C29.6987 19.9621 29.786 19.7515 29.786 19.5319C29.786 18.4345 29.35 17.382 28.574 16.6059C27.798 15.8299 26.7454 15.3939 25.648 15.3939H24.82V12.9139C24.82 12.6943 24.7327 12.4837 24.5775 12.3285C24.4222 12.1732 24.2116 12.0859 23.992 12.0859C23.7724 12.0859 23.5618 12.1732 23.4065 12.3285C23.2512 12.4837 23.164 12.6943 23.164 12.9139V15.3959H22.336C21.2385 15.3959 20.186 15.8319 19.41 16.6079C18.6339 17.384 18.198 18.4365 18.198 19.5339V21.1899C18.198 22.2874 18.6339 23.3399 19.41 24.1159C20.186 24.892 21.2385 25.3279 22.336 25.3279H25.646C26.3041 25.3285 26.9351 25.5901 27.4004 26.0555C27.8658 26.5208 28.1274 27.1518 28.128 27.8099V29.4659C28.1274 30.124 27.8658 30.755 27.4004 31.2204C26.9351 31.6857 26.3041 31.9474 25.646 31.9479H24.818V26.9819C24.818 26.7623 24.7307 26.5517 24.5755 26.3965C24.4202 26.2412 24.2096 26.1539 23.99 26.1539C23.7704 26.1539 23.5598 26.2412 23.4045 26.3965C23.2492 26.5517 23.162 26.7623 23.162 26.9819V31.9479H22.334C21.6759 31.9474 21.0449 31.6857 20.5795 31.2204C20.1142 30.755 19.8525 30.124 19.852 29.4659C19.852 29.2463 19.7647 29.0357 19.6095 28.8804C19.4542 28.7252 19.2436 28.6379 19.024 28.6379C18.8044 28.6379 18.5938 28.7252 18.4385 28.8804C18.2832 29.0357 18.196 29.2463 18.196 29.4659C18.196 30.5634 18.6319 31.6159 19.408 32.3919C20.184 33.168 21.2365 33.6039 22.334 33.6039H23.162V36.0859C23.162 36.3055 23.2492 36.5161 23.4045 36.6714C23.5598 36.8267 23.7704 36.9139 23.99 36.9139C24.2096 36.9139 24.4202 36.8267 24.5755 36.6714C24.7307 36.5161 24.818 36.3055 24.818 36.0859V33.6039H25.646C26.7434 33.6039 27.796 33.168 28.572 32.3919C29.348 31.6159 29.784 30.5634 29.784 29.4659V27.8099C29.784 26.7125 29.348 25.66 28.572 24.8839C27.796 24.1079 26.7434 23.6719 25.646 23.6719H24.818V18.7059C24.818 18.4863 24.7307 18.2757 24.5755 18.1205C24.4202 17.9652 24.2096 17.8779 23.99 17.8779C23.7704 17.8779 23.5598 17.9652 23.4045 18.1205C23.2492 18.2757 23.162 18.4863 23.162 18.7059V23.6719H22.334C21.6759 23.6714 21.0449 23.4097 20.5795 22.9444C20.1142 22.479 19.8525 21.848 19.852 21.1899V19.5339C19.8522 19.2071 19.917 18.8834 20.0426 18.5816C20.1682 18.2799 20.3521 18.0058 20.5838 17.7752C20.8155 17.5447 21.0904 17.3621 21.3928 17.238C21.6952 17.1138 22.0191 17.0506 22.346 17.0519L22.338 17.0499Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M11.71 12.2099C13.6587 10.2705 16.038 8.81892 18.654 7.97332C21.27 7.12772 24.0488 6.91207 26.764 7.34394C26.8727 7.3614 26.9838 7.35728 27.091 7.33181C27.1981 7.30633 27.2992 7.26 27.3884 7.19547C27.4776 7.13093 27.5533 7.04945 27.611 6.95568C27.6688 6.8619 27.7075 6.75767 27.725 6.64894C27.7424 6.5402 27.7383 6.42909 27.7128 6.32195C27.6874 6.21481 27.641 6.11374 27.5765 6.0245C27.512 5.93526 27.4305 5.85961 27.3367 5.80186C27.2429 5.74411 27.1387 5.7054 27.03 5.68794C23.0525 5.04153 18.9724 5.67402 15.3773 7.49435C11.7822 9.31469 8.85744 12.2289 7.02424 15.8175C5.19104 19.4061 4.54393 23.4839 5.17608 27.4637C5.80823 31.4435 7.68704 35.12 10.542 37.9639C10.7002 38.1011 10.9045 38.1732 11.1138 38.1657C11.3231 38.1583 11.5217 38.0718 11.6698 37.9238C11.8179 37.7757 11.9043 37.577 11.9118 37.3677C11.9192 37.1585 11.8471 36.9542 11.71 36.7959C10.0953 35.1818 8.81442 33.2654 7.94053 31.1561C7.06663 29.0468 6.61684 26.7861 6.61684 24.5029C6.61684 22.2198 7.06663 19.959 7.94053 17.8498C8.81442 15.7405 10.0953 13.8241 11.71 12.2099ZM37.458 11.0419C36.9116 10.4949 36.334 9.98007 35.728 9.49994C35.6147 9.39777 35.4755 9.32864 35.3256 9.30008C35.1758 9.27151 35.0209 9.28461 34.878 9.33794C34.7353 9.39119 34.6102 9.48284 34.5163 9.60276C34.4225 9.72268 34.3636 9.86621 34.3462 10.0175C34.3288 10.1688 34.3536 10.3219 34.4178 10.46C34.482 10.5981 34.5831 10.7157 34.71 10.7999C35.2627 11.2363 35.7902 11.7037 36.29 12.1999C39.5488 15.4602 41.3795 19.8812 41.3795 24.4909C41.3795 29.1006 39.5488 33.5217 36.29 36.7819C36.1739 36.881 36.0875 37.0101 36.0402 37.1552C35.9929 37.3002 35.9866 37.4555 36.022 37.6039C36.0579 37.7523 36.1341 37.888 36.2421 37.9959C36.3501 38.1038 36.4858 38.1799 36.6343 38.2156C36.7827 38.2514 36.9382 38.2455 37.0835 38.1986C37.2288 38.1518 37.3584 38.0657 37.458 37.9499C41.023 34.38 43.0254 29.5411 43.0254 24.4959C43.0254 19.4508 41.023 14.6119 37.458 11.0419Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M13.654 22.844L14.678 24.716L16.55 25.74L14.678 26.764L13.654 28.636L12.63 26.764L10.758 25.74L12.63 24.716L13.654 22.844ZM34.28 15.396L34.982 16.686L36.282 17.4L34.982 18.102L34.28 19.402L33.566 18.102L32.276 17.396L33.566 16.682L34.28 15.396ZM34.222 28.396L34.71 29.282L35.586 29.764L34.71 30.252L34.222 31.128L33.74 30.252L32.854 29.764L33.74 29.282L34.222 28.396Z",fill:"#FFF8F8"})),wS=e=>p.createElement("svg",{width:48,height:46,viewBox:"0 0 48 46",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M6 43.3579V1.35786L9.42857 3.92929L12.8571 1.35786L16.2857 3.92929L19.7143 1.35786L23.1429 3.92929L26.5714 1.35786L30 3.92929L33.4286 1.35786L36.8571 3.92929L40.2857 1.35786L42 3.07215V43.3579H6Z",fill:"#FAEFDE"}),p.createElement("path",{d:"M44.5714 39.0721H42H5.99997H3.42855C2.00826 39.0721 0.857117 40.2233 0.857117 41.6436C0.857117 43.0639 2.00826 44.215 3.42855 44.215H44.5714C45.9917 44.215 47.1428 43.0639 47.1428 41.6436C47.1428 40.2233 45.9917 39.0721 44.5714 39.0721Z",fill:"#7E8189"}),p.createElement("path",{d:"M6 36.5007H42V44.215H6V36.5007Z",fill:"#EFD8BE"}),p.createElement("path",{d:"M44.5714 38.215H42.8571V3.07215C42.8571 2.84501 42.7671 2.62644 42.606 2.46615L40.8917 0.751868C40.59 0.450154 40.1126 0.415867 39.7714 0.672153L36.8571 2.85787L33.9437 0.672153C33.6394 0.443296 33.2194 0.443296 32.9151 0.672153L30 2.85787L27.0857 0.672153C26.7814 0.442439 26.3614 0.443296 26.0571 0.672153L23.1429 2.85787L20.2286 0.672153C19.9243 0.443296 19.5043 0.443296 19.2 0.672153L16.2857 2.85787L13.3714 0.672153C13.0671 0.443296 12.6471 0.443296 12.3429 0.672153L9.42857 2.85787L6.51429 0.672153C6.25457 0.476725 5.90657 0.44501 5.61686 0.590724C5.32629 0.736439 5.14286 1.03301 5.14286 1.35787V38.215H3.42857C1.53771 38.215 0 39.7527 0 41.6436C0 43.5344 1.53771 45.0722 3.42857 45.0722H44.5714C46.4623 45.0722 48 43.5344 48 41.6436C48 39.7527 46.4623 38.215 44.5714 38.215ZM3.42857 43.3579C2.48314 43.3579 1.71429 42.589 1.71429 41.6436C1.71429 40.6982 2.48314 39.9293 3.42857 39.9293H5.14286V43.3579H3.42857ZM6.85714 43.3579V39.0739V39.0722V39.0704V38.215C7.33029 38.215 7.71429 37.831 7.71429 37.3579V35.6436C7.71429 35.1704 7.33029 34.7864 6.85714 34.7864V3.07215L8.91429 4.61501C9.21857 4.84387 9.63857 4.84387 9.94286 4.61501L12.8571 2.4293L15.7714 4.61501C16.0757 4.84387 16.4957 4.84387 16.8 4.61501L19.7143 2.4293L22.6286 4.61501C22.9329 4.84472 23.3529 4.84387 23.6571 4.61501L26.5714 2.4293L29.4857 4.61501C29.79 4.84472 30.21 4.84387 30.5143 4.61501L33.4286 2.4293L36.3429 4.61501C36.6471 4.84387 37.0671 4.84387 37.3714 4.61501L40.2051 2.49015L41.1429 3.42701V34.7864C40.6697 34.7864 40.2857 35.1704 40.2857 35.6436V37.3579C40.2857 37.831 40.6697 38.215 41.1429 38.215V43.3579H6.85714ZM44.5714 43.3579H42.8571V39.9293H44.5714C45.5169 39.9293 46.2857 40.6982 46.2857 41.6436C46.2857 42.589 45.5169 43.3579 44.5714 43.3579Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M11.1428 34.7864C10.6697 34.7864 10.2857 35.1704 10.2857 35.6436V37.3579C10.2857 37.831 10.6697 38.215 11.1428 38.215C11.616 38.215 12 37.831 12 37.3579V35.6436C12 35.1704 11.616 34.7864 11.1428 34.7864ZM15.4286 34.7864C14.9554 34.7864 14.5714 35.1704 14.5714 35.6436V37.3579C14.5714 37.831 14.9554 38.215 15.4286 38.215C15.9017 38.215 16.2857 37.831 16.2857 37.3579V35.6436C16.2857 35.1704 15.9017 34.7864 15.4286 34.7864ZM19.7143 34.7864C19.2411 34.7864 18.8571 35.1704 18.8571 35.6436V37.3579C18.8571 37.831 19.2411 38.215 19.7143 38.215C20.1874 38.215 20.5714 37.831 20.5714 37.3579V35.6436C20.5714 35.1704 20.1874 34.7864 19.7143 34.7864ZM24 34.7864C23.5268 34.7864 23.1428 35.1704 23.1428 35.6436V37.3579C23.1428 37.831 23.5268 38.215 24 38.215C24.4731 38.215 24.8571 37.831 24.8571 37.3579V35.6436C24.8571 35.1704 24.4731 34.7864 24 34.7864ZM28.2857 34.7864C27.8126 34.7864 27.4286 35.1704 27.4286 35.6436V37.3579C27.4286 37.831 27.8126 38.215 28.2857 38.215C28.7588 38.215 29.1428 37.831 29.1428 37.3579V35.6436C29.1428 35.1704 28.7588 34.7864 28.2857 34.7864ZM32.5714 34.7864C32.0983 34.7864 31.7143 35.1704 31.7143 35.6436V37.3579C31.7143 37.831 32.0983 38.215 32.5714 38.215C33.0446 38.215 33.4286 37.831 33.4286 37.3579V35.6436C33.4286 35.1704 33.0446 34.7864 32.5714 34.7864ZM36.8571 34.7864C36.384 34.7864 36 35.1704 36 35.6436V37.3579C36 37.831 36.384 38.215 36.8571 38.215C37.3303 38.215 37.7143 37.831 37.7143 37.3579V35.6436C37.7143 35.1704 37.3303 34.7864 36.8571 34.7864Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M30 10.7864H35.1429C35.616 10.7864 36 10.4024 36 9.92929C36 9.45614 35.616 9.07214 35.1429 9.07214H30C29.5269 9.07214 29.1429 9.45614 29.1429 9.92929C29.1429 10.4024 29.5269 10.7864 30 10.7864ZM26.5714 9.07214H12.8571C12.384 9.07214 12 9.45614 12 9.92929C12 10.4024 12.384 10.7864 12.8571 10.7864H26.5714C27.0446 10.7864 27.4286 10.4024 27.4286 9.92929C27.4286 9.45614 27.0446 9.07214 26.5714 9.07214ZM12.8571 14.215H22.2857C22.7589 14.215 23.1429 13.831 23.1429 13.3579C23.1429 12.8847 22.7589 12.5007 22.2857 12.5007H12.8571C12.384 12.5007 12 12.8847 12 13.3579C12 13.831 12.384 14.215 12.8571 14.215ZM12.8571 21.0721H21.4286C21.9017 21.0721 22.2857 20.6881 22.2857 20.215C22.2857 19.7419 21.9017 19.3579 21.4286 19.3579H12.8571C12.384 19.3579 12 19.7419 12 20.215C12 20.6881 12.384 21.0721 12.8571 21.0721Z",fill:"#A5BAC6"}),p.createElement("path",{d:"M21.4286 26.215H19.7143C19.2411 26.215 18.8571 26.599 18.8571 27.0722C18.8571 27.5453 19.2411 27.9293 19.7143 27.9293H21.4286C21.9017 27.9293 22.2857 27.5453 22.2857 27.0722C22.2857 26.599 21.9017 26.215 21.4286 26.215ZM16.2857 26.215H12.8571C12.384 26.215 12 26.599 12 27.0722C12 27.5453 12.384 27.9293 12.8571 27.9293H16.2857C16.7589 27.9293 17.1429 27.5453 17.1429 27.0722C17.1429 26.599 16.7589 26.215 16.2857 26.215ZM24 22.7864H12.8571C12.384 22.7864 12 23.1704 12 23.6436C12 24.1167 12.384 24.5007 12.8571 24.5007H24C24.4731 24.5007 24.8571 24.1167 24.8571 23.6436C24.8571 23.1704 24.4731 22.7864 24 22.7864Z",fill:"#EB9697"}),p.createElement("path",{d:"M36 24.5007C36 23.083 34.8463 21.9293 33.4286 21.9293H31.7143C31.242 21.9293 30.8572 21.5444 30.8572 21.0722V18.5007C30.8572 18.0284 31.242 17.6436 31.7143 17.6436H33.4286C33.9009 17.6436 34.2857 18.0284 34.2857 18.5007V19.3579C34.2857 19.831 34.6697 20.215 35.1429 20.215C35.616 20.215 36 19.831 36 19.3579V18.5007C36 17.083 34.8463 15.9293 33.4286 15.9293V15.0722C33.4286 14.599 33.0446 14.215 32.5715 14.215C32.0983 14.215 31.7143 14.599 31.7143 15.0722V15.9293C30.2966 15.9293 29.1429 17.083 29.1429 18.5007V21.0722C29.1429 22.4899 30.2966 23.6436 31.7143 23.6436H33.4286C33.9009 23.6436 34.2857 24.0284 34.2857 24.5007V27.0722C34.2857 27.5444 33.9009 27.9293 33.4286 27.9293H31.7143C31.242 27.9293 30.8572 27.5444 30.8572 27.0722V26.215C30.8572 25.7419 30.4732 25.3579 30 25.3579C29.5269 25.3579 29.1429 25.7419 29.1429 26.215V27.0722C29.1429 28.4899 30.2966 29.6436 31.7143 29.6436V30.5007C31.7143 30.9739 32.0983 31.3579 32.5715 31.3579C33.0446 31.3579 33.4286 30.9739 33.4286 30.5007V29.6436C34.8463 29.6436 36 28.4899 36 27.0722V24.5007Z",fill:"#98C77C"})),vS=e=>p.createElement("svg",{width:48,height:49,viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M44.2069 35.2586C44.2069 35.2586 42.5517 39.3965 32.6207 39.3965C24.3448 39.3965 21.0345 34.431 21.0345 34.431V5.46551C21.0345 5.46551 22.2759 2.15517 32.4138 2.15517C42.5517 2.15517 44.2069 5.46551 44.2069 5.46551V35.2586Z",fill:"#FFEB9B"}),p.createElement("path",{d:"M26 43.5345C26 43.5345 22.6896 46.8448 14.4138 46.8448C6.13792 46.8448 2.82758 43.5345 2.82758 43.5345V17.8793C2.82758 17.8793 4.06895 14.569 14.2069 14.569C24.3448 14.569 26 17.8793 26 17.8793V43.5345Z",fill:"#FFEB9B"}),p.createElement("path",{d:"M26 43.5345C26 43.5345 21.862 47.6724 16.8965 47.6724C10.2758 47.6724 8.62067 46.8448 8.62067 46.8448V22.0172C8.62067 22.0172 11.931 22.8448 16.8965 22.8448C22.6896 22.8448 26 19.5345 26 18.7069C26 17.8793 26 43.5345 26 43.5345ZM44.2069 35.2586C44.2069 35.2586 40.0689 39.3965 35.1034 39.3965C28.4827 39.3965 26.8276 38.569 26.8276 38.569V8.77586C26.8276 8.77586 30.1379 9.60345 35.1034 9.60345C41.7241 9.60345 44.2069 5.46552 44.2069 5.46552V35.2586Z",fill:"#F9DD8F"}),p.createElement("path",{d:"M18.5518 22.7199V47.5185C22.7476 46.7786 26 43.5345 26 43.5345C26 43.5345 26 16.2241 26 17.8793C26 19.5345 23.3112 22.0495 18.5518 22.7199ZM36.7587 9.47849V39.2426C40.9545 38.5028 44.2069 35.2586 44.2069 35.2586V4.63794C44.2069 4.63794 43.3793 8.77587 36.7587 9.47849Z",fill:"#EFC88E"}),p.createElement("path",{d:"M20.2069 5.46552H21.8621V16.0859H20.2069V5.46552Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M32.6207 10.431C26.1233 10.431 20.2069 8.06497 20.2069 5.46552C20.2069 2.86607 26.1233 0.5 32.6207 0.5C39.1181 0.5 45.0345 2.86607 45.0345 5.46552C45.0345 5.92317 44.6646 6.2931 44.2069 6.2931C43.7493 6.2931 43.3793 5.92317 43.3793 5.46552C43.3793 4.51131 39.0916 2.15517 32.6207 2.15517C26.1498 2.15517 21.8621 4.51131 21.8621 5.46552C21.8621 6.41972 26.1498 8.77586 32.6207 8.77586C33.0784 8.77586 33.4483 9.14579 33.4483 9.60345C33.4483 10.0611 33.0784 10.431 32.6207 10.431Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M35.9583 10.2192C35.5479 10.2192 35.1912 9.91461 35.1382 9.49668C35.0811 9.04316 35.4006 8.62854 35.8541 8.57061C36.9639 8.42909 38.0273 8.21723 39.0146 7.94082C39.4508 7.81999 39.9117 8.07406 40.0342 8.51433C40.1575 8.95461 39.901 9.41144 39.4607 9.53392C38.3956 9.83185 37.2527 10.0603 36.0643 10.2117C36.0287 10.2167 35.9931 10.2192 35.9583 10.2192ZM14.4138 23.6724C7.91641 23.6724 2 21.3063 2 18.7069C2 16.1074 7.91641 13.7414 14.4138 13.7414C20.9112 13.7414 26.8276 16.1074 26.8276 18.7069C26.8276 19.1645 26.4577 19.5345 26 19.5345C25.5423 19.5345 25.1724 19.1645 25.1724 18.7069C25.1724 17.7527 20.8847 15.3965 14.4138 15.3965C7.9429 15.3965 3.65517 17.7527 3.65517 18.7069C3.65517 19.6611 7.9429 22.0172 14.4138 22.0172C14.8714 22.0172 15.2414 22.3872 15.2414 22.8448C15.2414 23.3025 14.8714 23.6724 14.4138 23.6724Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M17.8317 23.4506C17.4221 23.4506 17.0662 23.1477 17.0124 22.7306C16.9528 22.2779 17.2714 21.8616 17.725 21.8029C18.8083 21.6605 19.8477 21.4512 20.8143 21.1805C21.2497 21.0589 21.7114 21.3138 21.8339 21.7541C21.9572 22.1943 21.7007 22.6512 21.2604 22.7736C20.2177 23.0658 19.1012 23.2909 17.9393 23.4432C17.9037 23.4481 17.8673 23.4506 17.8317 23.4506ZM14.4138 28.6379C7.91641 28.6379 2 26.2719 2 23.6724H3.65517C3.65517 24.6266 7.9429 26.9828 14.4138 26.9828C20.8847 26.9828 25.1724 24.6266 25.1724 23.6724H26.8276C26.8276 26.2719 20.9112 28.6379 14.4138 28.6379ZM14.4138 38.569C7.91641 38.569 2 36.2029 2 33.6034H3.65517C3.65517 34.5576 7.9429 36.9138 14.4138 36.9138C20.8847 36.9138 25.1724 34.5576 25.1724 33.6034H26.8276C26.8276 36.2029 20.9112 38.569 14.4138 38.569ZM14.4138 33.6034C7.91641 33.6034 2 31.2374 2 28.6379H3.65517C3.65517 29.5921 7.9429 31.9483 14.4138 31.9483C20.8847 31.9483 25.1724 29.5921 25.1724 28.6379H26.8276C26.8276 31.2374 20.9112 33.6034 14.4138 33.6034ZM14.4138 43.5345C7.91641 43.5345 2 41.1684 2 38.569H3.65517C3.65517 39.5232 7.9429 41.8793 14.4138 41.8793C20.8847 41.8793 25.1724 39.5232 25.1724 38.569H26.8276C26.8276 41.1684 20.9112 43.5345 14.4138 43.5345ZM32.6207 15.3965C26.1233 15.3965 20.2069 13.0305 20.2069 10.431H21.8621C21.8621 11.3852 26.1498 13.7414 32.6207 13.7414C39.0916 13.7414 43.3793 11.3852 43.3793 10.431H45.0345C45.0345 13.0305 39.1181 15.3965 32.6207 15.3965ZM32.6207 20.3621C30.2662 20.3621 27.92 20.0575 25.8378 19.4823L26.2789 17.8868C28.2204 18.423 30.4127 18.7069 32.6207 18.7069C39.0916 18.7069 43.3793 16.3508 43.3793 15.3965H45.0345C45.0345 17.996 39.1181 20.3621 32.6207 20.3621Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M32.6207 25.3276C30.2513 25.3276 27.8935 25.0197 25.8022 24.4371L26.2466 22.8432C28.1947 23.3852 30.3986 23.6724 32.6207 23.6724C39.0916 23.6724 43.3793 21.3163 43.3793 20.3621H45.0345C45.0345 22.9615 39.118 25.3276 32.6207 25.3276ZM32.6207 30.2931C30.2496 30.2931 27.8902 29.9844 25.7972 29.401L26.2416 27.807C28.1914 28.3499 30.3969 28.6379 32.6207 28.6379C39.0916 28.6379 43.3793 26.2818 43.3793 25.3276H45.0345C45.0345 27.927 39.118 30.2931 32.6207 30.2931ZM32.6207 35.2586C30.2438 35.2586 27.8778 34.9483 25.7773 34.3615L26.2234 32.7676C28.1798 33.3138 30.392 33.6034 32.6207 33.6034C39.0916 33.6034 43.3793 31.2473 43.3793 30.2931H45.0345C45.0345 32.8925 39.118 35.2586 32.6207 35.2586Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M32.6207 40.2241C30.2513 40.2241 27.8935 39.9163 25.8022 39.3336L26.2466 37.7397C28.1947 38.2818 30.3986 38.569 32.6207 38.569C39.0916 38.569 43.3793 36.2128 43.3793 35.2586V5.46552H45.0345V35.2586C45.0345 37.8581 39.118 40.2241 32.6207 40.2241Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M14.4138 48.5C7.91641 48.5 2 46.1339 2 43.5345V18.7069H3.65517V43.5345C3.65517 44.4887 7.9429 46.8448 14.4138 46.8448C20.8847 46.8448 25.1724 44.4887 25.1724 43.5345V18.7069H26.8276V43.5345C26.8276 46.1339 20.9112 48.5 14.4138 48.5ZM17.7241 2.98275H16.069C15.6113 2.98275 15.2414 2.61282 15.2414 2.15516C15.2414 1.69751 15.6113 1.32758 16.069 1.32758H17.7241C18.1818 1.32758 18.5517 1.69751 18.5517 2.15516C18.5517 2.61282 18.1818 2.98275 17.7241 2.98275ZM17.7241 7.12068H16.069C15.6113 7.12068 15.2414 6.75075 15.2414 6.29309C15.2414 5.83544 15.6113 5.46551 16.069 5.46551H17.7241C18.1818 5.46551 18.5517 5.83544 18.5517 6.29309C18.5517 6.75075 18.1818 7.12068 17.7241 7.12068ZM17.7241 11.2586H16.069C15.6113 11.2586 15.2414 10.8887 15.2414 10.431C15.2414 9.97337 15.6113 9.60344 16.069 9.60344H17.7241C18.1818 9.60344 18.5517 9.97337 18.5517 10.431C18.5517 10.8887 18.1818 11.2586 17.7241 11.2586Z",fill:"#8D6C9F"})),{cockpit:{portfolio:{cashUnderManagementText:ES,expensesAcrossAllCustomersText:$S,revenuesAcrossAllCustomersText:kS}}}=e.appLocale.getLocalizedStrings(),TS=({totalCashBalance:t,totalExpenses:o,totalRevenues:n,companyNameSticky:r})=>e.jsxRuntimeExports.jsxs(IS,{companyNameSticky:r,children:[e.jsxRuntimeExports.jsxs(PS,{children:[e.jsxRuntimeExports.jsx(LS,{children:e.jsxRuntimeExports.jsx(RS,{})}),e.jsxRuntimeExports.jsxs(LS,{children:[e.jsxRuntimeExports.jsx(DS,{textColor:e.getCockpitColor("cashBalance"),children:e.amountToString("0,0",t)}),e.jsxRuntimeExports.jsx(AS,{children:ES})]})]}),e.jsxRuntimeExports.jsxs(PS,{children:[e.jsxRuntimeExports.jsx(LS,{children:e.jsxRuntimeExports.jsx(wS,{})}),e.jsxRuntimeExports.jsxs(LS,{children:[e.jsxRuntimeExports.jsx(DS,{textColor:e.getCockpitColor("expenses"),children:e.amountToString("0,0",o)}),e.jsxRuntimeExports.jsx(AS,{children:$S})]})]}),e.jsxRuntimeExports.jsxs(PS,{children:[e.jsxRuntimeExports.jsx(LS,{children:e.jsxRuntimeExports.jsx(vS,{})}),e.jsxRuntimeExports.jsxs(LS,{children:[e.jsxRuntimeExports.jsx(DS,{textColor:e.getCockpitColor("revenues"),children:e.amountToString("0,0",n)}),e.jsxRuntimeExports.jsx(AS,{children:kS})]})]})]}),IS=o.div`
|
|
3128
|
+
`,RS=e=>p.createElement("svg",{width:48,height:49,viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M23.994 6.29199C20.3944 6.29199 16.8756 7.3594 13.8826 9.35924C10.8897 11.3591 8.55692 14.2015 7.17941 17.5271C5.80189 20.8528 5.44147 24.5122 6.14372 28.0426C6.84597 31.5731 8.57935 34.816 11.1247 37.3613C13.67 39.9066 16.9129 41.64 20.4434 42.3423C23.9738 43.0445 27.6332 42.6841 30.9588 41.3066C34.2845 39.9291 37.1269 37.5963 39.1268 34.6034C41.1266 31.6104 42.194 28.0916 42.194 24.492C42.194 22.1019 41.7232 19.7353 40.8086 17.5271C39.894 15.319 38.5534 13.3127 36.8633 11.6226C35.1733 9.93262 33.167 8.59202 30.9588 7.67738C28.7507 6.76275 26.3841 6.29199 23.994 6.29199Z",fill:"#F9E3AE"}),p.createElement("path",{d:"M8.86603 42.1201C11.0593 44.2078 13.6416 45.8442 16.466 46.9361L44.69 18.7081V13.3861C43.8158 11.9373 42.7857 10.5886 41.618 9.36406L8.86603 42.1201ZM7.25203 40.4221L39.726 7.94806H34.76L5.14803 37.5601C5.77565 38.5661 6.47902 39.5229 7.25203 40.4221ZM4.79203 34.6061L32.276 7.12206L29.794 5.46606L3.60803 31.6521C3.93426 32.6628 4.32987 33.6498 4.79203 34.6061Z",fill:"#FFEFCA"}),p.createElement("path",{d:"M24 1.32788C19.417 1.32788 14.937 2.68689 11.1263 5.23307C7.31572 7.77924 4.34571 11.3982 2.59188 15.6323C0.838043 19.8665 0.37916 24.5256 1.27326 29.0205C2.16735 33.5154 4.37427 37.6443 7.61493 40.885C10.8556 44.1256 14.9845 46.3325 19.4794 47.2266C23.9743 48.1207 28.6334 47.6618 32.8675 45.908C37.1017 44.1542 40.7206 41.1842 43.2668 37.3735C45.813 33.5629 47.172 29.0829 47.172 24.4999C47.172 18.3543 44.7307 12.4604 40.3851 8.1148C36.0395 3.76921 30.1456 1.32788 24 1.32788ZM24 42.7079C21.0282 42.7036 18.1025 41.9717 15.4788 40.576C12.855 39.1803 10.613 37.1634 8.9485 34.7014C7.28402 32.2394 6.24775 29.4072 5.93024 26.4524C5.61273 23.4975 6.02363 20.5099 7.12705 17.7504C8.23047 14.991 9.99283 12.5438 12.2602 10.6225C14.5275 8.70128 17.2308 7.36449 20.1339 6.72895C23.037 6.0934 26.0516 6.17844 28.9143 6.97663C31.7769 7.77482 34.4006 9.26187 36.556 11.3079L37.118 11.8599C37.3313 12.0825 37.538 12.3085 37.738 12.5379C40.0344 15.1727 41.5236 18.4131 42.0276 21.8717C42.5315 25.3304 42.0289 28.861 40.5798 32.0416C39.1307 35.2222 36.7965 37.9183 33.856 39.8076C30.9155 41.697 27.4932 42.6997 23.998 42.6959L24 42.7079Z",fill:"#F6D397"}),p.createElement("path",{d:"M32.192 9.06799C32.3774 9.06725 32.5571 9.00433 32.7025 8.8893C32.8479 8.77426 32.9504 8.61378 32.9937 8.43354C33.0371 8.25331 33.0187 8.06374 32.9415 7.89521C32.8643 7.72667 32.7328 7.58891 32.568 7.50399C31.9491 7.19298 31.3135 6.91655 30.664 6.67599C30.4615 6.60992 30.2413 6.62464 30.0494 6.71706C29.8575 6.80949 29.7087 6.97247 29.6341 7.17199C29.5595 7.37151 29.5649 7.59213 29.6491 7.78779C29.7333 7.98345 29.8898 8.13901 30.086 8.22199C30.6776 8.44532 31.2571 8.69967 31.822 8.98399C31.9377 9.03856 32.064 9.06723 32.192 9.06799Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M24 0.5C19.2533 0.5 14.6131 1.90758 10.6663 4.54473C6.71954 7.18188 3.6434 10.9302 1.8269 15.3156C0.0103989 19.701 -0.464881 24.5266 0.461164 29.1822C1.38721 33.8377 3.67299 38.1141 7.02945 41.4706C10.3859 44.827 14.6623 47.1128 19.3178 48.0388C23.9734 48.9649 28.799 48.4896 33.1844 46.6731C37.5698 44.8566 41.3181 41.7805 43.9553 37.8337C46.5924 33.8869 48 29.2467 48 24.5C48 18.1348 45.4714 12.0303 40.9706 7.52944C36.4697 3.02856 30.3652 0.5 24 0.5ZM24 46.844C19.5808 46.844 15.2608 45.5335 11.5863 43.0783C7.9119 40.6232 5.04801 37.1335 3.35685 33.0507C1.66568 28.9678 1.2232 24.4752 2.08534 20.1409C2.94749 15.8066 5.07555 11.8253 8.20041 8.7004C11.3253 5.57554 15.3066 3.44748 19.6409 2.58533C23.9752 1.72319 28.4678 2.16567 32.5507 3.85684C36.6335 5.548 40.1232 8.41189 42.5784 12.0863C45.0336 15.7608 46.344 20.0808 46.344 24.5C46.3435 30.4258 43.9892 36.1088 39.799 40.299C35.6088 44.4892 29.9258 46.8435 24 46.844Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M24 40.2239C23.7805 40.2245 23.5702 40.3119 23.4151 40.467C23.2599 40.6222 23.1725 40.8325 23.172 41.0519V42.7079C23.172 42.9275 23.2592 43.1381 23.4145 43.2934C23.5698 43.4487 23.7804 43.5359 24 43.5359C24.2196 43.5359 24.4302 43.4487 24.5855 43.2934C24.7407 43.1381 24.828 42.9275 24.828 42.7079V41.0519C24.8274 40.8325 24.74 40.6222 24.5849 40.467C24.4297 40.3119 24.2194 40.2245 24 40.2239ZM28.958 40.2859C28.9004 40.0738 28.7609 39.8931 28.5702 39.7838C28.3795 39.6745 28.1531 39.6454 27.941 39.7029C27.7288 39.7605 27.5482 39.9 27.4389 40.0907C27.3295 40.2814 27.3004 40.5078 27.358 40.7199L27.788 42.3199C27.8585 42.5177 28.0013 42.6814 28.1875 42.7783C28.3737 42.8753 28.5897 42.8982 28.7922 42.8425C28.9946 42.7869 29.1685 42.6567 29.279 42.4782C29.3895 42.2997 29.4284 42.0859 29.388 41.8799L28.958 40.2859ZM16.338 38.1679C16.2435 38.113 16.139 38.0775 16.0306 38.0632C15.9222 38.049 15.8121 38.0564 15.7067 38.0851C15.6012 38.1137 15.5024 38.163 15.4161 38.2301C15.3299 38.2972 15.2577 38.3808 15.204 38.4759L14.376 39.9079C14.2783 40.097 14.2571 40.3164 14.3169 40.5207C14.3767 40.7249 14.5129 40.8983 14.6971 41.0048C14.8813 41.1114 15.0995 41.1429 15.3064 41.0928C15.5132 41.0427 15.6929 40.9149 15.808 40.7359L16.636 39.3039C16.6913 39.21 16.7274 39.1061 16.7424 38.9981C16.7573 38.8902 16.7508 38.7803 16.7231 38.6749C16.6954 38.5695 16.6471 38.4706 16.581 38.3839C16.5149 38.2973 16.4323 38.2245 16.338 38.1699V38.1679ZM32.784 38.4759C32.6689 38.2969 32.4892 38.1691 32.2824 38.1191C32.0755 38.069 31.8573 38.1005 31.6731 38.207C31.4889 38.3135 31.3527 38.4869 31.2929 38.6912C31.2331 38.8954 31.2543 39.1149 31.352 39.3039L32.18 40.7359C32.2314 40.8355 32.3025 40.9235 32.3889 40.9948C32.4754 41.066 32.5754 41.119 32.6829 41.1505C32.7904 41.1819 32.9032 41.1913 33.0145 41.1779C33.1257 41.1645 33.233 41.1287 33.33 41.0726C33.427 41.0165 33.5116 40.9414 33.5787 40.8516C33.6458 40.7619 33.694 40.6595 33.7203 40.5506C33.7467 40.4417 33.7507 40.3286 33.732 40.2182C33.7134 40.1077 33.6726 40.0022 33.612 39.9079L32.784 38.4759ZM20.03 39.7019C19.8181 39.6457 19.5926 39.6759 19.4028 39.7857C19.2131 39.8956 19.0747 40.0762 19.018 40.2879L18.588 41.8879C18.5597 41.993 18.5525 42.1026 18.5666 42.2104C18.5807 42.3183 18.6159 42.4223 18.6703 42.5166C18.7246 42.6108 18.7969 42.6935 18.8832 42.7598C18.9695 42.826 19.0679 42.8747 19.173 42.9029C19.278 42.9312 19.3876 42.9384 19.4955 42.9243C19.6034 42.9102 19.7074 42.875 19.8016 42.8206C19.8959 42.7663 19.9785 42.694 20.0448 42.6077C20.1111 42.5215 20.1597 42.423 20.188 42.3179L20.622 40.7179C20.6783 40.506 20.6485 40.2805 20.5391 40.0905C20.4296 39.9005 20.2495 39.7616 20.038 39.7039L20.03 39.7019ZM22.338 17.0499H25.648C26.3061 17.0505 26.9371 17.3121 27.4024 17.7775C27.8678 18.2428 28.1294 18.8738 28.13 19.5319C28.13 19.7515 28.2172 19.9621 28.3725 20.1174C28.5278 20.2727 28.7384 20.3599 28.958 20.3599C29.1776 20.3599 29.3882 20.2727 29.5435 20.1174C29.6987 19.9621 29.786 19.7515 29.786 19.5319C29.786 18.4345 29.35 17.382 28.574 16.6059C27.798 15.8299 26.7454 15.3939 25.648 15.3939H24.82V12.9139C24.82 12.6943 24.7327 12.4837 24.5775 12.3285C24.4222 12.1732 24.2116 12.0859 23.992 12.0859C23.7724 12.0859 23.5618 12.1732 23.4065 12.3285C23.2512 12.4837 23.164 12.6943 23.164 12.9139V15.3959H22.336C21.2385 15.3959 20.186 15.8319 19.41 16.6079C18.6339 17.384 18.198 18.4365 18.198 19.5339V21.1899C18.198 22.2874 18.6339 23.3399 19.41 24.1159C20.186 24.892 21.2385 25.3279 22.336 25.3279H25.646C26.3041 25.3285 26.9351 25.5901 27.4004 26.0555C27.8658 26.5208 28.1274 27.1518 28.128 27.8099V29.4659C28.1274 30.124 27.8658 30.755 27.4004 31.2204C26.9351 31.6857 26.3041 31.9474 25.646 31.9479H24.818V26.9819C24.818 26.7623 24.7307 26.5517 24.5755 26.3965C24.4202 26.2412 24.2096 26.1539 23.99 26.1539C23.7704 26.1539 23.5598 26.2412 23.4045 26.3965C23.2492 26.5517 23.162 26.7623 23.162 26.9819V31.9479H22.334C21.6759 31.9474 21.0449 31.6857 20.5795 31.2204C20.1142 30.755 19.8525 30.124 19.852 29.4659C19.852 29.2463 19.7647 29.0357 19.6095 28.8804C19.4542 28.7252 19.2436 28.6379 19.024 28.6379C18.8044 28.6379 18.5938 28.7252 18.4385 28.8804C18.2832 29.0357 18.196 29.2463 18.196 29.4659C18.196 30.5634 18.6319 31.6159 19.408 32.3919C20.184 33.168 21.2365 33.6039 22.334 33.6039H23.162V36.0859C23.162 36.3055 23.2492 36.5161 23.4045 36.6714C23.5598 36.8267 23.7704 36.9139 23.99 36.9139C24.2096 36.9139 24.4202 36.8267 24.5755 36.6714C24.7307 36.5161 24.818 36.3055 24.818 36.0859V33.6039H25.646C26.7434 33.6039 27.796 33.168 28.572 32.3919C29.348 31.6159 29.784 30.5634 29.784 29.4659V27.8099C29.784 26.7125 29.348 25.66 28.572 24.8839C27.796 24.1079 26.7434 23.6719 25.646 23.6719H24.818V18.7059C24.818 18.4863 24.7307 18.2757 24.5755 18.1205C24.4202 17.9652 24.2096 17.8779 23.99 17.8779C23.7704 17.8779 23.5598 17.9652 23.4045 18.1205C23.2492 18.2757 23.162 18.4863 23.162 18.7059V23.6719H22.334C21.6759 23.6714 21.0449 23.4097 20.5795 22.9444C20.1142 22.479 19.8525 21.848 19.852 21.1899V19.5339C19.8522 19.2071 19.917 18.8834 20.0426 18.5816C20.1682 18.2799 20.3521 18.0058 20.5838 17.7752C20.8155 17.5447 21.0904 17.3621 21.3928 17.238C21.6952 17.1138 22.0191 17.0506 22.346 17.0519L22.338 17.0499Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M11.71 12.2099C13.6587 10.2705 16.038 8.81892 18.654 7.97332C21.27 7.12772 24.0488 6.91207 26.764 7.34394C26.8727 7.3614 26.9838 7.35728 27.091 7.33181C27.1981 7.30633 27.2992 7.26 27.3884 7.19547C27.4776 7.13093 27.5533 7.04945 27.611 6.95568C27.6688 6.8619 27.7075 6.75767 27.725 6.64894C27.7424 6.5402 27.7383 6.42909 27.7128 6.32195C27.6874 6.21481 27.641 6.11374 27.5765 6.0245C27.512 5.93526 27.4305 5.85961 27.3367 5.80186C27.2429 5.74411 27.1387 5.7054 27.03 5.68794C23.0525 5.04153 18.9724 5.67402 15.3773 7.49435C11.7822 9.31469 8.85744 12.2289 7.02424 15.8175C5.19104 19.4061 4.54393 23.4839 5.17608 27.4637C5.80823 31.4435 7.68704 35.12 10.542 37.9639C10.7002 38.1011 10.9045 38.1732 11.1138 38.1657C11.3231 38.1583 11.5217 38.0718 11.6698 37.9238C11.8179 37.7757 11.9043 37.577 11.9118 37.3677C11.9192 37.1585 11.8471 36.9542 11.71 36.7959C10.0953 35.1818 8.81442 33.2654 7.94053 31.1561C7.06663 29.0468 6.61684 26.7861 6.61684 24.5029C6.61684 22.2198 7.06663 19.959 7.94053 17.8498C8.81442 15.7405 10.0953 13.8241 11.71 12.2099ZM37.458 11.0419C36.9116 10.4949 36.334 9.98007 35.728 9.49994C35.6147 9.39777 35.4755 9.32864 35.3256 9.30008C35.1758 9.27151 35.0209 9.28461 34.878 9.33794C34.7353 9.39119 34.6102 9.48284 34.5163 9.60276C34.4225 9.72268 34.3636 9.86621 34.3462 10.0175C34.3288 10.1688 34.3536 10.3219 34.4178 10.46C34.482 10.5981 34.5831 10.7157 34.71 10.7999C35.2627 11.2363 35.7902 11.7037 36.29 12.1999C39.5488 15.4602 41.3795 19.8812 41.3795 24.4909C41.3795 29.1006 39.5488 33.5217 36.29 36.7819C36.1739 36.881 36.0875 37.0101 36.0402 37.1552C35.9929 37.3002 35.9866 37.4555 36.022 37.6039C36.0579 37.7523 36.1341 37.888 36.2421 37.9959C36.3501 38.1038 36.4858 38.1799 36.6343 38.2156C36.7827 38.2514 36.9382 38.2455 37.0835 38.1986C37.2288 38.1518 37.3584 38.0657 37.458 37.9499C41.023 34.38 43.0254 29.5411 43.0254 24.4959C43.0254 19.4508 41.023 14.6119 37.458 11.0419Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M13.654 22.844L14.678 24.716L16.55 25.74L14.678 26.764L13.654 28.636L12.63 26.764L10.758 25.74L12.63 24.716L13.654 22.844ZM34.28 15.396L34.982 16.686L36.282 17.4L34.982 18.102L34.28 19.402L33.566 18.102L32.276 17.396L33.566 16.682L34.28 15.396ZM34.222 28.396L34.71 29.282L35.586 29.764L34.71 30.252L34.222 31.128L33.74 30.252L32.854 29.764L33.74 29.282L34.222 28.396Z",fill:"#FFF8F8"})),wS=e=>p.createElement("svg",{width:48,height:46,viewBox:"0 0 48 46",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M6 43.3579V1.35786L9.42857 3.92929L12.8571 1.35786L16.2857 3.92929L19.7143 1.35786L23.1429 3.92929L26.5714 1.35786L30 3.92929L33.4286 1.35786L36.8571 3.92929L40.2857 1.35786L42 3.07215V43.3579H6Z",fill:"#FAEFDE"}),p.createElement("path",{d:"M44.5714 39.0721H42H5.99997H3.42855C2.00826 39.0721 0.857117 40.2233 0.857117 41.6436C0.857117 43.0639 2.00826 44.215 3.42855 44.215H44.5714C45.9917 44.215 47.1428 43.0639 47.1428 41.6436C47.1428 40.2233 45.9917 39.0721 44.5714 39.0721Z",fill:"#7E8189"}),p.createElement("path",{d:"M6 36.5007H42V44.215H6V36.5007Z",fill:"#EFD8BE"}),p.createElement("path",{d:"M44.5714 38.215H42.8571V3.07215C42.8571 2.84501 42.7671 2.62644 42.606 2.46615L40.8917 0.751868C40.59 0.450154 40.1126 0.415867 39.7714 0.672153L36.8571 2.85787L33.9437 0.672153C33.6394 0.443296 33.2194 0.443296 32.9151 0.672153L30 2.85787L27.0857 0.672153C26.7814 0.442439 26.3614 0.443296 26.0571 0.672153L23.1429 2.85787L20.2286 0.672153C19.9243 0.443296 19.5043 0.443296 19.2 0.672153L16.2857 2.85787L13.3714 0.672153C13.0671 0.443296 12.6471 0.443296 12.3429 0.672153L9.42857 2.85787L6.51429 0.672153C6.25457 0.476725 5.90657 0.44501 5.61686 0.590724C5.32629 0.736439 5.14286 1.03301 5.14286 1.35787V38.215H3.42857C1.53771 38.215 0 39.7527 0 41.6436C0 43.5344 1.53771 45.0722 3.42857 45.0722H44.5714C46.4623 45.0722 48 43.5344 48 41.6436C48 39.7527 46.4623 38.215 44.5714 38.215ZM3.42857 43.3579C2.48314 43.3579 1.71429 42.589 1.71429 41.6436C1.71429 40.6982 2.48314 39.9293 3.42857 39.9293H5.14286V43.3579H3.42857ZM6.85714 43.3579V39.0739V39.0722V39.0704V38.215C7.33029 38.215 7.71429 37.831 7.71429 37.3579V35.6436C7.71429 35.1704 7.33029 34.7864 6.85714 34.7864V3.07215L8.91429 4.61501C9.21857 4.84387 9.63857 4.84387 9.94286 4.61501L12.8571 2.4293L15.7714 4.61501C16.0757 4.84387 16.4957 4.84387 16.8 4.61501L19.7143 2.4293L22.6286 4.61501C22.9329 4.84472 23.3529 4.84387 23.6571 4.61501L26.5714 2.4293L29.4857 4.61501C29.79 4.84472 30.21 4.84387 30.5143 4.61501L33.4286 2.4293L36.3429 4.61501C36.6471 4.84387 37.0671 4.84387 37.3714 4.61501L40.2051 2.49015L41.1429 3.42701V34.7864C40.6697 34.7864 40.2857 35.1704 40.2857 35.6436V37.3579C40.2857 37.831 40.6697 38.215 41.1429 38.215V43.3579H6.85714ZM44.5714 43.3579H42.8571V39.9293H44.5714C45.5169 39.9293 46.2857 40.6982 46.2857 41.6436C46.2857 42.589 45.5169 43.3579 44.5714 43.3579Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M11.1428 34.7864C10.6697 34.7864 10.2857 35.1704 10.2857 35.6436V37.3579C10.2857 37.831 10.6697 38.215 11.1428 38.215C11.616 38.215 12 37.831 12 37.3579V35.6436C12 35.1704 11.616 34.7864 11.1428 34.7864ZM15.4286 34.7864C14.9554 34.7864 14.5714 35.1704 14.5714 35.6436V37.3579C14.5714 37.831 14.9554 38.215 15.4286 38.215C15.9017 38.215 16.2857 37.831 16.2857 37.3579V35.6436C16.2857 35.1704 15.9017 34.7864 15.4286 34.7864ZM19.7143 34.7864C19.2411 34.7864 18.8571 35.1704 18.8571 35.6436V37.3579C18.8571 37.831 19.2411 38.215 19.7143 38.215C20.1874 38.215 20.5714 37.831 20.5714 37.3579V35.6436C20.5714 35.1704 20.1874 34.7864 19.7143 34.7864ZM24 34.7864C23.5268 34.7864 23.1428 35.1704 23.1428 35.6436V37.3579C23.1428 37.831 23.5268 38.215 24 38.215C24.4731 38.215 24.8571 37.831 24.8571 37.3579V35.6436C24.8571 35.1704 24.4731 34.7864 24 34.7864ZM28.2857 34.7864C27.8126 34.7864 27.4286 35.1704 27.4286 35.6436V37.3579C27.4286 37.831 27.8126 38.215 28.2857 38.215C28.7588 38.215 29.1428 37.831 29.1428 37.3579V35.6436C29.1428 35.1704 28.7588 34.7864 28.2857 34.7864ZM32.5714 34.7864C32.0983 34.7864 31.7143 35.1704 31.7143 35.6436V37.3579C31.7143 37.831 32.0983 38.215 32.5714 38.215C33.0446 38.215 33.4286 37.831 33.4286 37.3579V35.6436C33.4286 35.1704 33.0446 34.7864 32.5714 34.7864ZM36.8571 34.7864C36.384 34.7864 36 35.1704 36 35.6436V37.3579C36 37.831 36.384 38.215 36.8571 38.215C37.3303 38.215 37.7143 37.831 37.7143 37.3579V35.6436C37.7143 35.1704 37.3303 34.7864 36.8571 34.7864Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M30 10.7864H35.1429C35.616 10.7864 36 10.4024 36 9.92929C36 9.45614 35.616 9.07214 35.1429 9.07214H30C29.5269 9.07214 29.1429 9.45614 29.1429 9.92929C29.1429 10.4024 29.5269 10.7864 30 10.7864ZM26.5714 9.07214H12.8571C12.384 9.07214 12 9.45614 12 9.92929C12 10.4024 12.384 10.7864 12.8571 10.7864H26.5714C27.0446 10.7864 27.4286 10.4024 27.4286 9.92929C27.4286 9.45614 27.0446 9.07214 26.5714 9.07214ZM12.8571 14.215H22.2857C22.7589 14.215 23.1429 13.831 23.1429 13.3579C23.1429 12.8847 22.7589 12.5007 22.2857 12.5007H12.8571C12.384 12.5007 12 12.8847 12 13.3579C12 13.831 12.384 14.215 12.8571 14.215ZM12.8571 21.0721H21.4286C21.9017 21.0721 22.2857 20.6881 22.2857 20.215C22.2857 19.7419 21.9017 19.3579 21.4286 19.3579H12.8571C12.384 19.3579 12 19.7419 12 20.215C12 20.6881 12.384 21.0721 12.8571 21.0721Z",fill:"#A5BAC6"}),p.createElement("path",{d:"M21.4286 26.215H19.7143C19.2411 26.215 18.8571 26.599 18.8571 27.0722C18.8571 27.5453 19.2411 27.9293 19.7143 27.9293H21.4286C21.9017 27.9293 22.2857 27.5453 22.2857 27.0722C22.2857 26.599 21.9017 26.215 21.4286 26.215ZM16.2857 26.215H12.8571C12.384 26.215 12 26.599 12 27.0722C12 27.5453 12.384 27.9293 12.8571 27.9293H16.2857C16.7589 27.9293 17.1429 27.5453 17.1429 27.0722C17.1429 26.599 16.7589 26.215 16.2857 26.215ZM24 22.7864H12.8571C12.384 22.7864 12 23.1704 12 23.6436C12 24.1167 12.384 24.5007 12.8571 24.5007H24C24.4731 24.5007 24.8571 24.1167 24.8571 23.6436C24.8571 23.1704 24.4731 22.7864 24 22.7864Z",fill:"#EB9697"}),p.createElement("path",{d:"M36 24.5007C36 23.083 34.8463 21.9293 33.4286 21.9293H31.7143C31.242 21.9293 30.8572 21.5444 30.8572 21.0722V18.5007C30.8572 18.0284 31.242 17.6436 31.7143 17.6436H33.4286C33.9009 17.6436 34.2857 18.0284 34.2857 18.5007V19.3579C34.2857 19.831 34.6697 20.215 35.1429 20.215C35.616 20.215 36 19.831 36 19.3579V18.5007C36 17.083 34.8463 15.9293 33.4286 15.9293V15.0722C33.4286 14.599 33.0446 14.215 32.5715 14.215C32.0983 14.215 31.7143 14.599 31.7143 15.0722V15.9293C30.2966 15.9293 29.1429 17.083 29.1429 18.5007V21.0722C29.1429 22.4899 30.2966 23.6436 31.7143 23.6436H33.4286C33.9009 23.6436 34.2857 24.0284 34.2857 24.5007V27.0722C34.2857 27.5444 33.9009 27.9293 33.4286 27.9293H31.7143C31.242 27.9293 30.8572 27.5444 30.8572 27.0722V26.215C30.8572 25.7419 30.4732 25.3579 30 25.3579C29.5269 25.3579 29.1429 25.7419 29.1429 26.215V27.0722C29.1429 28.4899 30.2966 29.6436 31.7143 29.6436V30.5007C31.7143 30.9739 32.0983 31.3579 32.5715 31.3579C33.0446 31.3579 33.4286 30.9739 33.4286 30.5007V29.6436C34.8463 29.6436 36 28.4899 36 27.0722V24.5007Z",fill:"#98C77C"})),ES=e=>p.createElement("svg",{width:48,height:49,viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M44.2069 35.2586C44.2069 35.2586 42.5517 39.3965 32.6207 39.3965C24.3448 39.3965 21.0345 34.431 21.0345 34.431V5.46551C21.0345 5.46551 22.2759 2.15517 32.4138 2.15517C42.5517 2.15517 44.2069 5.46551 44.2069 5.46551V35.2586Z",fill:"#FFEB9B"}),p.createElement("path",{d:"M26 43.5345C26 43.5345 22.6896 46.8448 14.4138 46.8448C6.13792 46.8448 2.82758 43.5345 2.82758 43.5345V17.8793C2.82758 17.8793 4.06895 14.569 14.2069 14.569C24.3448 14.569 26 17.8793 26 17.8793V43.5345Z",fill:"#FFEB9B"}),p.createElement("path",{d:"M26 43.5345C26 43.5345 21.862 47.6724 16.8965 47.6724C10.2758 47.6724 8.62067 46.8448 8.62067 46.8448V22.0172C8.62067 22.0172 11.931 22.8448 16.8965 22.8448C22.6896 22.8448 26 19.5345 26 18.7069C26 17.8793 26 43.5345 26 43.5345ZM44.2069 35.2586C44.2069 35.2586 40.0689 39.3965 35.1034 39.3965C28.4827 39.3965 26.8276 38.569 26.8276 38.569V8.77586C26.8276 8.77586 30.1379 9.60345 35.1034 9.60345C41.7241 9.60345 44.2069 5.46552 44.2069 5.46552V35.2586Z",fill:"#F9DD8F"}),p.createElement("path",{d:"M18.5518 22.7199V47.5185C22.7476 46.7786 26 43.5345 26 43.5345C26 43.5345 26 16.2241 26 17.8793C26 19.5345 23.3112 22.0495 18.5518 22.7199ZM36.7587 9.47849V39.2426C40.9545 38.5028 44.2069 35.2586 44.2069 35.2586V4.63794C44.2069 4.63794 43.3793 8.77587 36.7587 9.47849Z",fill:"#EFC88E"}),p.createElement("path",{d:"M20.2069 5.46552H21.8621V16.0859H20.2069V5.46552Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M32.6207 10.431C26.1233 10.431 20.2069 8.06497 20.2069 5.46552C20.2069 2.86607 26.1233 0.5 32.6207 0.5C39.1181 0.5 45.0345 2.86607 45.0345 5.46552C45.0345 5.92317 44.6646 6.2931 44.2069 6.2931C43.7493 6.2931 43.3793 5.92317 43.3793 5.46552C43.3793 4.51131 39.0916 2.15517 32.6207 2.15517C26.1498 2.15517 21.8621 4.51131 21.8621 5.46552C21.8621 6.41972 26.1498 8.77586 32.6207 8.77586C33.0784 8.77586 33.4483 9.14579 33.4483 9.60345C33.4483 10.0611 33.0784 10.431 32.6207 10.431Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M35.9583 10.2192C35.5479 10.2192 35.1912 9.91461 35.1382 9.49668C35.0811 9.04316 35.4006 8.62854 35.8541 8.57061C36.9639 8.42909 38.0273 8.21723 39.0146 7.94082C39.4508 7.81999 39.9117 8.07406 40.0342 8.51433C40.1575 8.95461 39.901 9.41144 39.4607 9.53392C38.3956 9.83185 37.2527 10.0603 36.0643 10.2117C36.0287 10.2167 35.9931 10.2192 35.9583 10.2192ZM14.4138 23.6724C7.91641 23.6724 2 21.3063 2 18.7069C2 16.1074 7.91641 13.7414 14.4138 13.7414C20.9112 13.7414 26.8276 16.1074 26.8276 18.7069C26.8276 19.1645 26.4577 19.5345 26 19.5345C25.5423 19.5345 25.1724 19.1645 25.1724 18.7069C25.1724 17.7527 20.8847 15.3965 14.4138 15.3965C7.9429 15.3965 3.65517 17.7527 3.65517 18.7069C3.65517 19.6611 7.9429 22.0172 14.4138 22.0172C14.8714 22.0172 15.2414 22.3872 15.2414 22.8448C15.2414 23.3025 14.8714 23.6724 14.4138 23.6724Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M17.8317 23.4506C17.4221 23.4506 17.0662 23.1477 17.0124 22.7306C16.9528 22.2779 17.2714 21.8616 17.725 21.8029C18.8083 21.6605 19.8477 21.4512 20.8143 21.1805C21.2497 21.0589 21.7114 21.3138 21.8339 21.7541C21.9572 22.1943 21.7007 22.6512 21.2604 22.7736C20.2177 23.0658 19.1012 23.2909 17.9393 23.4432C17.9037 23.4481 17.8673 23.4506 17.8317 23.4506ZM14.4138 28.6379C7.91641 28.6379 2 26.2719 2 23.6724H3.65517C3.65517 24.6266 7.9429 26.9828 14.4138 26.9828C20.8847 26.9828 25.1724 24.6266 25.1724 23.6724H26.8276C26.8276 26.2719 20.9112 28.6379 14.4138 28.6379ZM14.4138 38.569C7.91641 38.569 2 36.2029 2 33.6034H3.65517C3.65517 34.5576 7.9429 36.9138 14.4138 36.9138C20.8847 36.9138 25.1724 34.5576 25.1724 33.6034H26.8276C26.8276 36.2029 20.9112 38.569 14.4138 38.569ZM14.4138 33.6034C7.91641 33.6034 2 31.2374 2 28.6379H3.65517C3.65517 29.5921 7.9429 31.9483 14.4138 31.9483C20.8847 31.9483 25.1724 29.5921 25.1724 28.6379H26.8276C26.8276 31.2374 20.9112 33.6034 14.4138 33.6034ZM14.4138 43.5345C7.91641 43.5345 2 41.1684 2 38.569H3.65517C3.65517 39.5232 7.9429 41.8793 14.4138 41.8793C20.8847 41.8793 25.1724 39.5232 25.1724 38.569H26.8276C26.8276 41.1684 20.9112 43.5345 14.4138 43.5345ZM32.6207 15.3965C26.1233 15.3965 20.2069 13.0305 20.2069 10.431H21.8621C21.8621 11.3852 26.1498 13.7414 32.6207 13.7414C39.0916 13.7414 43.3793 11.3852 43.3793 10.431H45.0345C45.0345 13.0305 39.1181 15.3965 32.6207 15.3965ZM32.6207 20.3621C30.2662 20.3621 27.92 20.0575 25.8378 19.4823L26.2789 17.8868C28.2204 18.423 30.4127 18.7069 32.6207 18.7069C39.0916 18.7069 43.3793 16.3508 43.3793 15.3965H45.0345C45.0345 17.996 39.1181 20.3621 32.6207 20.3621Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M32.6207 25.3276C30.2513 25.3276 27.8935 25.0197 25.8022 24.4371L26.2466 22.8432C28.1947 23.3852 30.3986 23.6724 32.6207 23.6724C39.0916 23.6724 43.3793 21.3163 43.3793 20.3621H45.0345C45.0345 22.9615 39.118 25.3276 32.6207 25.3276ZM32.6207 30.2931C30.2496 30.2931 27.8902 29.9844 25.7972 29.401L26.2416 27.807C28.1914 28.3499 30.3969 28.6379 32.6207 28.6379C39.0916 28.6379 43.3793 26.2818 43.3793 25.3276H45.0345C45.0345 27.927 39.118 30.2931 32.6207 30.2931ZM32.6207 35.2586C30.2438 35.2586 27.8778 34.9483 25.7773 34.3615L26.2234 32.7676C28.1798 33.3138 30.392 33.6034 32.6207 33.6034C39.0916 33.6034 43.3793 31.2473 43.3793 30.2931H45.0345C45.0345 32.8925 39.118 35.2586 32.6207 35.2586Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M32.6207 40.2241C30.2513 40.2241 27.8935 39.9163 25.8022 39.3336L26.2466 37.7397C28.1947 38.2818 30.3986 38.569 32.6207 38.569C39.0916 38.569 43.3793 36.2128 43.3793 35.2586V5.46552H45.0345V35.2586C45.0345 37.8581 39.118 40.2241 32.6207 40.2241Z",fill:"#8D6C9F"}),p.createElement("path",{d:"M14.4138 48.5C7.91641 48.5 2 46.1339 2 43.5345V18.7069H3.65517V43.5345C3.65517 44.4887 7.9429 46.8448 14.4138 46.8448C20.8847 46.8448 25.1724 44.4887 25.1724 43.5345V18.7069H26.8276V43.5345C26.8276 46.1339 20.9112 48.5 14.4138 48.5ZM17.7241 2.98275H16.069C15.6113 2.98275 15.2414 2.61282 15.2414 2.15516C15.2414 1.69751 15.6113 1.32758 16.069 1.32758H17.7241C18.1818 1.32758 18.5517 1.69751 18.5517 2.15516C18.5517 2.61282 18.1818 2.98275 17.7241 2.98275ZM17.7241 7.12068H16.069C15.6113 7.12068 15.2414 6.75075 15.2414 6.29309C15.2414 5.83544 15.6113 5.46551 16.069 5.46551H17.7241C18.1818 5.46551 18.5517 5.83544 18.5517 6.29309C18.5517 6.75075 18.1818 7.12068 17.7241 7.12068ZM17.7241 11.2586H16.069C15.6113 11.2586 15.2414 10.8887 15.2414 10.431C15.2414 9.97337 15.6113 9.60344 16.069 9.60344H17.7241C18.1818 9.60344 18.5517 9.97337 18.5517 10.431C18.5517 10.8887 18.1818 11.2586 17.7241 11.2586Z",fill:"#8D6C9F"})),{cockpit:{portfolio:{cashUnderManagementText:vS,expensesAcrossAllCustomersText:$S,revenuesAcrossAllCustomersText:kS}}}=e.appLocale.getLocalizedStrings(),TS=({totalCashBalance:t,totalExpenses:o,totalRevenues:n,companyNameSticky:r})=>e.jsxRuntimeExports.jsxs(IS,{companyNameSticky:r,children:[e.jsxRuntimeExports.jsxs(PS,{children:[e.jsxRuntimeExports.jsx(LS,{children:e.jsxRuntimeExports.jsx(RS,{})}),e.jsxRuntimeExports.jsxs(LS,{children:[e.jsxRuntimeExports.jsx(DS,{textColor:e.getCockpitColor("cashBalance"),children:e.amountToString("0,0",t)}),e.jsxRuntimeExports.jsx(AS,{children:vS})]})]}),e.jsxRuntimeExports.jsxs(PS,{children:[e.jsxRuntimeExports.jsx(LS,{children:e.jsxRuntimeExports.jsx(wS,{})}),e.jsxRuntimeExports.jsxs(LS,{children:[e.jsxRuntimeExports.jsx(DS,{textColor:e.getCockpitColor("expenses"),children:e.amountToString("0,0",o)}),e.jsxRuntimeExports.jsx(AS,{children:$S})]})]}),e.jsxRuntimeExports.jsxs(PS,{children:[e.jsxRuntimeExports.jsx(LS,{children:e.jsxRuntimeExports.jsx(ES,{})}),e.jsxRuntimeExports.jsxs(LS,{children:[e.jsxRuntimeExports.jsx(DS,{textColor:e.getCockpitColor("revenues"),children:e.amountToString("0,0",n)}),e.jsxRuntimeExports.jsx(AS,{children:kS})]})]})]}),IS=o.div`
|
|
3129
3129
|
position: sticky;
|
|
3130
3130
|
top: 0;
|
|
3131
3131
|
z-index: 6;
|
|
@@ -3151,7 +3151,7 @@
|
|
|
3151
3151
|
color: ${e=>e.textColor.color.toString()};
|
|
3152
3152
|
`,AS=o(e.StandardRegular)`
|
|
3153
3153
|
color: ${e=>e.theme.colors.champion};
|
|
3154
|
-
`,LS=o.div``,{collaboration:{threads:{placeholder:{addANewComment:OS,replyAComment:MS},tooltip:{resolveComment:NS,unResolveComment:zS}}},common:{texts:{comments:FS}}}=e.appLocale.getLocalizedStrings(),VS={portfolioRightPadding:new e.ResponsiveSized(e.sp[3],e.sp[8])},BS=({portfolioView:o,onColumnSortConfigChanged:r,onCompanyNameClicked:i,onPassportIconClicked:s,onScroll:a,initialOpenThreadRequest:l})=>{const d=e.useWindowSizeContext(),c=t.useRef(null),[p,u]=t.useState(null),[m,x]=t.useState(null),h=!("small"===d||"medium-compact"===d),{uiState:g,totalCashBalance:y,totalExpenses:S,totalRevenues:C}=o,f=g.scrollYOffset??0,b=e=>o.companies[e].company.company.companyInfo.name.length>z?120:M;t.useEffect(()=>{c.current&&c.current.resetAfterIndex(0)},[o]);const{setOpenThread:j,setRequestToOpenThread:R,requestToOpenThread:w,isLoading:
|
|
3154
|
+
`,LS=o.div``,{collaboration:{threads:{placeholder:{addANewComment:OS,replyAComment:MS},tooltip:{resolveComment:NS,unResolveComment:zS}}},common:{texts:{comments:FS}}}=e.appLocale.getLocalizedStrings(),VS={portfolioRightPadding:new e.ResponsiveSized(e.sp[3],e.sp[8])},BS=({portfolioView:o,onColumnSortConfigChanged:r,onCompanyNameClicked:i,onPassportIconClicked:s,onScroll:a,initialOpenThreadRequest:l})=>{const d=e.useWindowSizeContext(),c=t.useRef(null),[p,u]=t.useState(null),[m,x]=t.useState(null),h=!("small"===d||"medium-compact"===d),{uiState:g,totalCashBalance:y,totalExpenses:S,totalRevenues:C}=o,f=g.scrollYOffset??0,b=e=>o.companies[e].company.company.companyInfo.name.length>z?120:M;t.useEffect(()=>{c.current&&c.current.resetAfterIndex(0)},[o]);const{setOpenThread:j,setRequestToOpenThread:R,requestToOpenThread:w,isLoading:E}=t.useContext(e.ThreadsContext);t.useEffect(()=>{null!=l&&"Completed"===o.fetchState&&!1===E&&R(l)},[l,o.fetchState,E,R]);const[v,$]=t.useState(void 0),k=t.useRef([]),T=t.useMemo(()=>({makeCompanyNameSticky:h,uiState:g,totalCashBalance:y,totalExpenses:S,totalRevenues:C,onColumnSortConfigChanged:r}),[h,y,S,C,g,r]),I=t.useCallback((e,t,n)=>{const r=o.companies.findIndex(t=>t.company.company.companyInfo.companyId===e),i=Yy.findIndex(e=>e.key===t);-1!==r&&-1!==i&&(null==k.current[r]?k.current[r]=[n]:k.current[r][i]=n)},[o.companies]);return t.useEffect(()=>{if(null!=w&&null!=p){const{companyId:e,entityType:t}=w,[n,r]=t.split("."),i=o.companies.findIndex(t=>t.company.company.companyInfo.companyId===e),s=Yy.findIndex(e=>e.key===r);-1===i||p.visibleStartIndex<=i&&p.visibleStopIndex>=i||c.current?.scrollToItem(i,"center"),setTimeout(()=>{const e=k.current[i]?.[0]?.getBoundingClientRect().bottom,t=k.current[i]?.[0]?.getBoundingClientRect().top;null!=e&&null!=t&&(window.innerHeight>=e&&window.innerHeight>=t||t<0)&&k.current[i][s]?.scrollIntoView({block:"center",behavior:"auto"})},0);const a=setInterval(()=>{const e=k.current[i]?.[s]?.getBoundingClientRect().left,t=k.current[i]?.[s]?.getBoundingClientRect().right,o=k.current[i]?.[s]?.offsetWidth;if(null!=e&&null!=o&&null!=t&&(e<window.innerWidth-o||t<window.innerWidth)){clearInterval(a);const e=w.threadId,t=w.onThreadShownCallback;!0===Boolean(e)&&(R(null),j(w.threadId),t?.())}},500);setTimeout(()=>{clearInterval(a),R(null)},2e3)}},[w,p,j,R]),e.jsxRuntimeExports.jsxs(US,{companyNameSticky:h,children:[h&&e.jsxRuntimeExports.jsx(TS,{totalCashBalance:y,totalExpenses:S,totalRevenues:C,companyNameSticky:h}),e.jsxRuntimeExports.jsx(GS,{companyNameSticky:h,children:e.jsxRuntimeExports.jsxs(_S.Provider,{value:T,children:[e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:n})=>e.jsxRuntimeExports.jsx(e.VariableSizeList,{height:t,innerElementType:WS,itemCount:o.companies.length,itemSize:b,onItemsRendered:e=>u(e),itemData:{portfolioView:o,makeCompanyNameSticky:h,addThreadRequestThreadId:v,setElementRef:I,setAddThreadRequestThreadId:$,setNoteData:x,onCompanyNameClicked:i,onPassportIconClicked:s},width:n,ref:c,overscanCount:1,onScroll:({scrollOffset:e})=>{a(e)},initialScrollOffset:f,children:HS})}),null!=m?e.jsxRuntimeExports.jsx(n.RoomProvider,{id:m.roomId,children:e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${m.companyName} ${FS}`,filter:{application:"cockpit",companyId:m.companyId,entityType:m.entityType,isGlobalComment:!1,tab:"portfolio"},isLoading:!1,threadMetadata:{companyName:m.companyName,companyId:m.companyId,entityId:m.companyId,entityType:m.entityType,isGlobalComment:!1,application:"cockpit",tab:"portfolio",url:window.location.href},textOverrides:{composerPlaceholder:OS,replyComposerPlaceholder:MS,threadResolve:NS,threadUnResolve:zS},onThreadClick:e=>null,onCloseAllThreadsDrawer:()=>x(null)})}):null]})})]})},_S=t.createContext(void 0),HS=({index:t,style:o,data:n})=>{const r=e.useWindowSizeContext(),{portfolioView:i,makeCompanyNameSticky:s,addThreadRequestThreadId:a,setElementRef:l,setNoteData:d,onCompanyNameClicked:c,onPassportIconClicked:p,setAddThreadRequestThreadId:u}=n,m=i.companies[t],{companyId:x}=m.company.company.companyInfo;return e.jsxRuntimeExports.jsx(qS,{style:{...o,width:"fit-content",minWidth:"100%",padding:`${e.Space.sp0} ${VS.portfolioRightPadding.valuePx(r)} ${e.Space.sp3} ${e.Space.sp0}`},children:e.jsxRuntimeExports.jsx(aS,{addThreadRequestThreadId:a,setNoteData:d,setElementRef:l,setAddThreadRequestThreadId:u,totalHeight:"number"==typeof o.height?o.height:M,companyView:i.companies[t],companyNameSticky:s,onCompanyNameClicked:c,onPassportIconClicked:p})},x)},WS=t.forwardRef((o,n)=>{const{children:r,style:i,...s}=o,{makeCompanyNameSticky:a,uiState:l,totalCashBalance:d,totalExpenses:c,totalRevenues:p,onColumnSortConfigChanged:u}=t.useContext(_S);return e.jsxRuntimeExports.jsxs(YS,{ref:n,style:{...i,width:"auto"},...s,children:[!a&&e.jsxRuntimeExports.jsx(TS,{totalCashBalance:d,totalExpenses:c,totalRevenues:p,companyNameSticky:a}),e.jsxRuntimeExports.jsx(Xy,{companyNameSticky:a,onColumnSortConfigChanged:u,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),e.jsxRuntimeExports.jsx(KS,{children:r})]})});WS.displayName="Portfolio list view inner element type";const US=o.div`
|
|
3155
3155
|
width: 100%;
|
|
3156
3156
|
height: 100%;
|
|
3157
3157
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -3208,7 +3208,7 @@
|
|
|
3208
3208
|
outline: none;
|
|
3209
3209
|
border-color: ${e=>e.theme.colors.primary};
|
|
3210
3210
|
}
|
|
3211
|
-
`,{aiAccountantCustomer:uC,common:{failed:mC,oauthConsent:{company:xC},status:{pending:hC},texts:{lastSync:gC,lastTraining:yC,live:SC,offboarded:CC,onboarding:fC,status:bC}}}=e.appLocale.getLocalizedStrings(),jC={rowHeightPx:e.sp[8],headerHeightPx:44,jobRowHeightPx:44,jobHeaderHeightPx:36,jobTableMinHeightPx:200,jobOperationMinWidthPx:120,jobStatusColumnWidthPx:90,jobDateColumnWidthPx:120,jobByColumnWidthPx:100,jobSkeletonRowCount:3,skeletonLoaderHeightPx:14,accuracyLabelMinWidthPx:80,accuracyValueMinWidthPx:45,accuracySuccessThresholdPercent:80,accuracyAlertThresholdPercent:60,sortIconSize:e.Space.sp2,menuIconSize:e.Space.sp3,statusBadgeVerticalPadding:"2px",accuracyBarHeight:e.Space.sp2,globalNavBarHeightPx:45,pageHeaderHeightPx:75,menuDropdownMinWidthPx:160,checkboxColumnWidthPx:40},RC=200,wC=120,
|
|
3211
|
+
`,{aiAccountantCustomer:uC,common:{failed:mC,oauthConsent:{company:xC},status:{pending:hC},texts:{lastSync:gC,lastTraining:yC,live:SC,offboarded:CC,onboarding:fC,status:bC}}}=e.appLocale.getLocalizedStrings(),jC={rowHeightPx:e.sp[8],headerHeightPx:44,jobRowHeightPx:44,jobHeaderHeightPx:36,jobTableMinHeightPx:200,jobOperationMinWidthPx:120,jobStatusColumnWidthPx:90,jobDateColumnWidthPx:120,jobByColumnWidthPx:100,jobSkeletonRowCount:3,skeletonLoaderHeightPx:14,accuracyLabelMinWidthPx:80,accuracyValueMinWidthPx:45,accuracySuccessThresholdPercent:80,accuracyAlertThresholdPercent:60,sortIconSize:e.Space.sp2,menuIconSize:e.Space.sp3,statusBadgeVerticalPadding:"2px",accuracyBarHeight:e.Space.sp2,globalNavBarHeightPx:45,pageHeaderHeightPx:75,menuDropdownMinWidthPx:160,checkboxColumnWidthPx:40},RC=200,wC=120,EC=130,vC=130,$C=130,kC=100,TC=60,IC=[{key:"companyName",label:xC,sortable:!0,width:RC,justifyContent:"flex-start",growToFill:!0},{key:"status",label:bC,sortable:!0,width:wC,justifyContent:"flex-start"},{key:"bookcloseDate",label:uC.table.bookClose,sortable:!0,width:EC,justifyContent:"flex-start"},{key:"latestTraining",label:yC,sortable:!0,width:vC,justifyContent:"flex-start"},{key:"latestSync",label:gC,sortable:!0,width:$C,justifyContent:"flex-start"},{key:"accuracy",label:uC.table.accuracy,sortable:!0,width:kC,justifyContent:"flex-end"},{key:"actions",label:"",sortable:!1,width:TC,justifyContent:"center"}],PC={onboard:{labelKey:"onboard",destructive:!1},evaluate:{labelKey:"evaluate",destructive:!1},full_pipeline:{labelKey:"fullPipeline",destructive:!1},retrain:{labelKey:"retrain",destructive:!1},offboard:{labelKey:"offboard",destructive:!0},cancel_onboarding:{labelKey:"cancelOnboarding",destructive:!0}},DC=(e,t)=>{const{jobTriggerDialog:o}=uC;return"offboard"===e?o.singleDescriptionOffboard.replace("__companyName__",t):o.singleDescription.replace("__companyName__",t).replace("__datesInstruction__",o.datesInstruction)},AC=e=>r.getAllowedOperationsForStatus(e).map(e=>({operationType:e,...PC[e]})),LC=e=>({active:SC,pending:hC,onboarding:fC,offboarded:CC,failed:mC}[e]??e);function OC(){const{useDynamicConfig:t}=e.useZeniFeatureContext(),{configValue:o}=t(e.DynamicConfigNames.aiAccountantOnboardingConfig),n=e.useGlobalInfoContext().loggedInUser;return null!=o&&null!=n?.userId&&(Array.isArray(o.user_list_with_write_access)&&o.user_list_with_write_access.includes(n.userId))}const{common:{strings:MC,texts:{actions:NC,by:zC,created:FC,lastSync:VC,lastTraining:BC,offboarded:_C,status:HC}},dateFormat:WC,timeFormat:UC,aiAccountantCustomer:GC}=e.appLocale.getLocalizedStrings(),qC=t.memo(({index:t,style:o,data:n})=>{const r=n[t],i=r.operationType.replaceAll("_"," "),s=null!=r.triggeredBy?`${r.triggeredBy.firstName} ${r.triggeredBy.lastName}`.trim():MC.emDash;return e.jsxRuntimeExports.jsxs(Pf,{style:o,children:[e.jsxRuntimeExports.jsx(Af,{children:i}),e.jsxRuntimeExports.jsx(Lf,{children:r.status}),e.jsxRuntimeExports.jsx(Of,{title:r.createdAt.format(UC.hmmADashDDMMMCommaYYYY),children:r.createdAt.format(WC.visual.MMMDCommaYYYYformat)}),e.jsxRuntimeExports.jsx(Mf,{children:s})]})});qC.displayName="JobListItem";const KC=t.forwardRef(({style:t,...o},n)=>e.jsxRuntimeExports.jsx("div",{ref:n,style:{...t,position:"relative"},...o})),YC=t=>t>=jC.accuracySuccessThresholdPercent?e.Colors.success:t>=jC.accuracyAlertThresholdPercent?e.Colors.alert:e.Colors.important,ZC=e=>e.split("_").filter(e=>e.length>0).map(e=>e[0].toUpperCase()+e.slice(1).toLowerCase()).join(" "),XC=o.div`
|
|
3212
3212
|
display: flex;
|
|
3213
3213
|
flex-direction: column;
|
|
3214
3214
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -3357,18 +3357,18 @@
|
|
|
3357
3357
|
border-bottom: 1px solid ${e=>e.theme.colors.grey2};
|
|
3358
3358
|
color: ${e=>e.theme.colors.hero};
|
|
3359
3359
|
padding: ${e.Space.sp0} ${e.Space.sp3};
|
|
3360
|
-
`,
|
|
3360
|
+
`,Ef=o.div`
|
|
3361
3361
|
display: flex;
|
|
3362
3362
|
align-items: center;
|
|
3363
3363
|
padding: ${e.Space.sp1} ${e.Space.sp2};
|
|
3364
|
-
`,
|
|
3364
|
+
`,vf=o(Ef)`
|
|
3365
3365
|
flex: 1 1 auto;
|
|
3366
3366
|
min-width: ${jC.jobOperationMinWidthPx}px;
|
|
3367
|
-
`,$f=o(
|
|
3367
|
+
`,$f=o(Ef)`
|
|
3368
3368
|
width: ${jC.jobStatusColumnWidthPx}px;
|
|
3369
|
-
`,kf=o(
|
|
3369
|
+
`,kf=o(Ef)`
|
|
3370
3370
|
width: ${jC.jobDateColumnWidthPx}px;
|
|
3371
|
-
`,Tf=o(
|
|
3371
|
+
`,Tf=o(Ef)`
|
|
3372
3372
|
width: ${jC.jobByColumnWidthPx}px;
|
|
3373
3373
|
`,If=o.div`
|
|
3374
3374
|
flex: 1;
|
|
@@ -3448,7 +3448,7 @@
|
|
|
3448
3448
|
100% {
|
|
3449
3449
|
rotate: 720deg;
|
|
3450
3450
|
}
|
|
3451
|
-
`,{common:{strings:qf,texts:{noCustomersFound:Kf}},dateFormat:Yf,timeFormat:Zf,aiAccountantCustomer:Xf}=e.appLocale.getLocalizedStrings(),Qf=({customers:o,sortKey:n,sortOrder:r,selectedTenantIds:i,onAction:s,onCancelOnboarding:a,onColumnSortConfigChanged:l,onRowClick:d,onToggleAllVisible:c,onToggleTenantSelection:p})=>{const[u,m]=t.useState(null),x=OC(),h=t.useMemo(()=>new Set(i),[i]),g=i.length>0,y=t.useMemo(()=>o.map(e=>e.tenantId),[o]),S=t.useMemo(()=>y.filter(e=>h.has(e)).length,[y,h]),C=y.length>0&&S===y.length,f=S>0&&!C,b=t.useCallback((e,t)=>{m({customer:e,operationType:t})},[]),j=t.useCallback((e,t,o)=>{null!=u&&s(u.customer,e,t,o),m(null)},[s,u]),R=t.useRef(null),w=t.useMemo(()=>({customerCount:o.length,customers:o,hasWriteAccess:x,isSelectionActive:g,onCancelOnboarding:a,onRequestAction:b,onRowClick:d,onToggleTenantSelection:p,selectedTenantIdSet:h}),[o,x,g,a,b,d,p,h]),
|
|
3451
|
+
`,{common:{strings:qf,texts:{noCustomersFound:Kf}},dateFormat:Yf,timeFormat:Zf,aiAccountantCustomer:Xf}=e.appLocale.getLocalizedStrings(),Qf=({customers:o,sortKey:n,sortOrder:r,selectedTenantIds:i,onAction:s,onCancelOnboarding:a,onColumnSortConfigChanged:l,onRowClick:d,onToggleAllVisible:c,onToggleTenantSelection:p})=>{const[u,m]=t.useState(null),x=OC(),h=t.useMemo(()=>new Set(i),[i]),g=i.length>0,y=t.useMemo(()=>o.map(e=>e.tenantId),[o]),S=t.useMemo(()=>y.filter(e=>h.has(e)).length,[y,h]),C=y.length>0&&S===y.length,f=S>0&&!C,b=t.useCallback((e,t)=>{m({customer:e,operationType:t})},[]),j=t.useCallback((e,t,o)=>{null!=u&&s(u.customer,e,t,o),m(null)},[s,u]),R=t.useRef(null),w=t.useMemo(()=>({customerCount:o.length,customers:o,hasWriteAccess:x,isSelectionActive:g,onCancelOnboarding:a,onRequestAction:b,onRowClick:d,onToggleTenantSelection:p,selectedTenantIdSet:h}),[o,x,g,a,b,d,p,h]),E=t.useCallback(({scrollOffset:e})=>{null!=R.current&&(R.current.scrollLeft=e)},[]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(tb,{children:[e.jsxRuntimeExports.jsxs(ob,{ref:R,children:[x&&e.jsxRuntimeExports.jsx(db,{children:e.jsxRuntimeExports.jsx(e.Checkbox,{size:"small",checked:C,indeterminate:f,disabled:0===y.length,onChange:()=>c(y)})}),IC.map(t=>{const o=n===t.key,i="ascending"===r?"asc":"desc";return e.jsxRuntimeExports.jsx(nb,{$width:t.width,$justifyContent:t.justifyContent,$growToFill:t.growToFill,children:e.jsxRuntimeExports.jsx(rb,{children:t.sortable&&"actions"!==t.key?e.jsxRuntimeExports.jsxs(ib,{type:"button",$active:o,onClick:()=>{return e=t.key,void l(e,n===e&&"ascending"===r?"descending":"ascending");var e},children:[t.label,e.jsxRuntimeExports.jsx(sb,{$direction:o?i:"asc",children:e.jsxRuntimeExports.jsx(e.SvgArrowTailTop,{width:jC.sortIconSize,height:jC.sortIconSize})})]}):t.label})},t.key)})]}),0===o.length?e.jsxRuntimeExports.jsx(yb,{children:Kf}):e.jsxRuntimeExports.jsx(ab,{children:e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:n})=>e.jsxRuntimeExports.jsx(e.FixedSizeList,{height:t,width:n,itemCount:o.length,itemSize:jC.rowHeightPx,itemData:w,innerElementType:eb,onScroll:E,overscanCount:5,children:Jf})})})]}),null!=u&&e.jsxRuntimeExports.jsx(aC,{operationType:u.operationType,dialogTitle:Xf.actions[PC[u.operationType].labelKey],dialogDescription:DC(u.operationType,u.customer.companyName),onCancel:()=>m(null),onConfirm:j})]})},Jf=t.memo(({index:o,style:n,data:r})=>{const{customerCount:i,customers:s,hasWriteAccess:l,isSelectionActive:d,onCancelOnboarding:c,onRequestAction:p,onRowClick:u,onToggleTenantSelection:m,selectedTenantIdSet:x}=r,h=s[o],g=x.has(h.tenantId),y=o===i-1,[S,C]=t.useState(!1),f=t.useRef(null),[b,j]=t.useState({top:0,right:0}),R=h.enrollment?.status??"unknown",w=h.averageAccuracy,E=w>0?`${(100*w).toFixed(1)}${qf.percentage}`:qf.emDash;return t.useEffect(()=>{if(S&&null!=f.current){const e=f.current.getBoundingClientRect();j({top:e.bottom,right:window.innerWidth-e.right})}},[S]),t.useEffect(()=>{if(!S)return;const e=()=>C(!1);return document.addEventListener("click",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{document.removeEventListener("click",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[S]),t.useEffect(()=>{d&&S&&C(!1)},[d,S]),e.jsxRuntimeExports.jsxs(lb,{style:n,$isSelected:g,onClick:()=>u(h),children:[l&&e.jsxRuntimeExports.jsx(cb,{$hideBorder:y,onClick:e=>e.stopPropagation(),children:e.jsxRuntimeExports.jsx(e.Checkbox,{size:"small",checked:g,onChange:()=>m(h.tenantId)})}),e.jsxRuntimeExports.jsx(ub,{$hideBorder:y,children:e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(Sb,{children:h.companyName.length>0?h.companyName:h.companyId}),e.jsxRuntimeExports.jsx(Cb,{children:h.tenantId})]})}),e.jsxRuntimeExports.jsx(mb,{$hideBorder:y,children:e.jsxRuntimeExports.jsx(bb,{status:R,children:LC(R)})}),e.jsxRuntimeExports.jsx(xb,{$hideBorder:y,children:null!=h.bookcloseDate?h.bookcloseDate.format(Yf.visual.MMMDCommaYYYYformat):qf.emDash}),e.jsxRuntimeExports.jsx(xb,{$hideBorder:y,title:null!=h.enrollment?.latestTraining?h.enrollment.latestTraining.format(Zf.hmmADashDDMMMCommaYYYY):void 0,children:null!=h.enrollment?.latestTraining?h.enrollment.latestTraining.format(Yf.visual.MMMDCommaYYYYformat):qf.emDash}),e.jsxRuntimeExports.jsx(xb,{$hideBorder:y,title:null!=h.enrollment?.latestTransactionSync?h.enrollment.latestTransactionSync.local().format(Zf.hmmADashDDMMMCommaYYYY):void 0,children:null!=h.enrollment?.latestTransactionSync?h.enrollment.latestTransactionSync.utc(!0).fromNow():qf.emDash}),e.jsxRuntimeExports.jsx(hb,{$hideBorder:y,children:E}),e.jsxRuntimeExports.jsx(gb,{$hideBorder:y,children:l&&!d&&e.jsxRuntimeExports.jsxs(jb,{onClick:e=>e.stopPropagation(),children:[e.jsxRuntimeExports.jsx(Rb,{ref:f,onClick:()=>C(!S),children:e.jsxRuntimeExports.jsx(e.SvgMore,{width:jC.menuIconSize,height:jC.menuIconSize})}),S&&a.createPortal(e.jsxRuntimeExports.jsx(wb,{style:{top:b.top,right:b.right},children:AC(R).map(t=>e.jsxRuntimeExports.jsx(Eb,{onClick:()=>{C(!1),"cancel_onboarding"===t.operationType?c(h):p(h,t.operationType)},children:Xf.actions[t.labelKey]},t.operationType))}),document.body)]})})]})});Jf.displayName="AiAccountantCustomerListItem";const eb=t.forwardRef(({style:t,...o},n)=>e.jsxRuntimeExports.jsx("div",{ref:n,style:{...t,position:"relative"},...o})),tb=o.div`
|
|
3452
3452
|
position: relative;
|
|
3453
3453
|
flex: 1;
|
|
3454
3454
|
min-height: 0;
|
|
@@ -3568,7 +3568,7 @@
|
|
|
3568
3568
|
`,mb=o(pb)`
|
|
3569
3569
|
width: ${wC}px;
|
|
3570
3570
|
`,xb=o(pb)`
|
|
3571
|
-
width: ${
|
|
3571
|
+
width: ${EC}px;
|
|
3572
3572
|
`,hb=o(pb)`
|
|
3573
3573
|
width: ${kC}px;
|
|
3574
3574
|
justify-content: flex-end;
|
|
@@ -3608,13 +3608,13 @@
|
|
|
3608
3608
|
border-radius: ${e.Space.sp1};
|
|
3609
3609
|
box-shadow: ${e=>e.theme.colors.dropShadowNormal};
|
|
3610
3610
|
z-index: 9999;
|
|
3611
|
-
`,
|
|
3611
|
+
`,Eb=o.div`
|
|
3612
3612
|
padding: ${e.Space.sp2} ${e.Space.sp3};
|
|
3613
3613
|
cursor: pointer;
|
|
3614
3614
|
&:hover {
|
|
3615
3615
|
background-color: ${e=>e.theme.colors.grey5};
|
|
3616
3616
|
}
|
|
3617
|
-
`,
|
|
3617
|
+
`,vb={summaryCardCount:4,tableRowCount:8,labelLoaderWidth:e.Space.sp11,valueLoaderWidthPx:50,valueLoaderHeightPx:20},$b=[25,12,13,13,13,12,12],kb=()=>e.jsxRuntimeExports.jsxs(Tb,{children:[e.jsxRuntimeExports.jsx(Ib,{children:Array.from({length:vb.summaryCardCount},(t,o)=>e.jsxRuntimeExports.jsxs(Pb,{children:[e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:vb.labelLoaderWidth,height:jC.skeletonLoaderHeightPx}),e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:vb.valueLoaderWidthPx,height:vb.valueLoaderHeightPx})]},`card-${o}`))}),e.jsxRuntimeExports.jsx(e.ListTableSkeleton,{colPcts:$b,rowCount:vb.tableRowCount})]}),Tb=o.div`
|
|
3618
3618
|
display: flex;
|
|
3619
3619
|
flex-direction: column;
|
|
3620
3620
|
flex: 1;
|
|
@@ -3825,11 +3825,11 @@
|
|
|
3825
3825
|
white-space: pre-line;
|
|
3826
3826
|
text-align: left;
|
|
3827
3827
|
width: ${e=>"small"===e.windowSize?"auto":"432px"};
|
|
3828
|
-
`,
|
|
3828
|
+
`,Ej=o(e.StandardRegularLi)``,vj=o.hr`
|
|
3829
3829
|
width: 100%;
|
|
3830
3830
|
border: 0.2px solid ${e=>e.theme.colors.grey3};
|
|
3831
3831
|
margin-top: auto;
|
|
3832
|
-
`;function $j(t){const{onCancelClick:o,onGoLiveClick:n,showGoLivePopup:r,loading:i}=t,s=e.useWindowSizeContext();return e.jsxRuntimeExports.jsx(e.Modal$1,{"aria-labelledby":"modal-title","aria-describedby":"modal-description",open:r,BackdropProps:{style:{backgroundColor:e.Colors.modalBackground}},children:e.jsxRuntimeExports.jsxs(bj,{children:[e.jsxRuntimeExports.jsx(jj,{children:Cj.goLiveTitle}),e.jsxRuntimeExports.jsx(Rj,{children:Cj.goLiveDescription}),e.jsxRuntimeExports.jsxs(wj,{windowSize:s,children:[e.jsxRuntimeExports.jsx(
|
|
3832
|
+
`;function $j(t){const{onCancelClick:o,onGoLiveClick:n,showGoLivePopup:r,loading:i}=t,s=e.useWindowSizeContext();return e.jsxRuntimeExports.jsx(e.Modal$1,{"aria-labelledby":"modal-title","aria-describedby":"modal-description",open:r,BackdropProps:{style:{backgroundColor:e.Colors.modalBackground}},children:e.jsxRuntimeExports.jsxs(bj,{children:[e.jsxRuntimeExports.jsx(jj,{children:Cj.goLiveTitle}),e.jsxRuntimeExports.jsx(Rj,{children:Cj.goLiveDescription}),e.jsxRuntimeExports.jsxs(wj,{windowSize:s,children:[e.jsxRuntimeExports.jsx(Ej,{children:Cj.goLiveSteps.stepOne}),e.jsxRuntimeExports.jsx(Ej,{children:Cj.goLiveSteps.stepTwo}),e.jsxRuntimeExports.jsx(Ej,{children:Cj.goLiveSteps.stepThree}),e.jsxRuntimeExports.jsx(Ej,{children:Cj.goLiveSteps.stepFour})]}),e.jsxRuntimeExports.jsx(vj,{}),e.jsxRuntimeExports.jsxs(kj,{onClick:e=>e.stopPropagation(),children:[e.jsxRuntimeExports.jsx(e.Button,{label:fj,onClick:o,size:"standard",type:"reset",disabled:i}),e.jsxRuntimeExports.jsx(Tj,{space:e.Space.sp3}),e.jsxRuntimeExports.jsx(e.Button,{variant:"primary",label:Cj.goLiveText,loading:i,disabled:i,size:"standard",onClick:n})]})]})})}const kj=o.div`
|
|
3833
3833
|
display: flex;
|
|
3834
3834
|
bottom: 0;
|
|
3835
3835
|
left: 0;
|
|
@@ -4001,7 +4001,7 @@
|
|
|
4001
4001
|
margin-left: ${t=>!0===t.setMargin?"20px":e.Space.sp0};
|
|
4002
4002
|
`,SR=o.div`
|
|
4003
4003
|
height: 18px;
|
|
4004
|
-
`,{common:CR,cockpit:fR}=e.appLocale.getLocalizedStrings(),bR=({headerItemData:t,onboardingInfo:o,allUsers:n,retryButtonLoading:r,viaCockpit:i=!1,isDisabled:s=!1,headerKey:a,onOnboardingStepClicked:l,onRetry:d})=>{if(null!=o&&!0==t.key in o){const c=t.key,p=o[c],u=null!=p.userIds?n.find(e=>e.userId===p.userIds[0]):null,m=null!=p.errorDetails?p.errorDetails.summary:"qboLinked"===c?fR.review.errors.qboLinked:fR.review.errors.bankAccountLinked,x=`${CR.via} ${CR.cockpit}`;return!0!==p.error||"qboLinked"!==c&&"bankAccountLinked"!==c?!0===p.completed?e.jsxRuntimeExports.jsxs(jR,{children:[e.jsxRuntimeExports.jsx(nR,{complete:!0,onClick:null!=l?()=>{l(t.key)}:void 0}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null!=u,children:e.jsxRuntimeExports.jsx(TR,{setMargin:!1,children:`${!0===i?x:CR.strings.empty}${"bankAccountLinked"===c&&!0===e.isZeniAIUser(n,u?.userId)?`${CR.via} ${CR.texts.chargebee}`:`${CR.by} ${u?.firstName??CR.strings.empty} ${u?.lastName??CR.strings.empty}`}`})}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null==u,children:e.jsxRuntimeExports.jsx(IR,{})})]}):!0===p.pendingVerification&&"bankAccountLinked"===a?e.jsxRuntimeExports.jsxs(jR,{children:[e.jsxRuntimeExports.jsx(nR,{complete:!1,pendingVerification:!0,onClick:null!=l?()=>{l(t.key)}:void 0}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null!=u,children:e.jsxRuntimeExports.jsx(TR,{setMargin:!1,children:`${!0===i?x:CR.strings.empty}${"bankAccountLinked"===c&&!0===e.isZeniAIUser(n,u?.userId)?`${CR.via} ${CR.texts.chargebee}`:`${CR.by} ${u?.firstName??CR.strings.empty} ${u?.lastName??CR.strings.empty}`}`})}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null==u,children:e.jsxRuntimeExports.jsx(IR,{})})]}):e.jsxRuntimeExports.jsxs(jR,{children:[e.jsxRuntimeExports.jsx(nR,{isDisabled:s,complete:!1,onClick:null!=l?()=>{l(t.key)}:void 0}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null!=u,children:e.jsxRuntimeExports.jsx(TR,{setMargin:!1,children:`${!0===i?x:CR.strings.empty}${"bankAccountLinked"===c&&!0===e.isZeniAIUser(n,u?.userId)?`${CR.via} ${CR.texts.chargebee}`:`${CR.by} ${u?.firstName??CR.strings.empty} ${u?.lastName??CR.strings.empty}`}`})}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null==u,children:e.jsxRuntimeExports.jsx(IR,{})})]}):e.jsxRuntimeExports.jsxs(jR,{children:[e.jsxRuntimeExports.jsxs(RR,{children:[e.jsxRuntimeExports.jsx(e.SvgHighImportance,{width:e.sp[3],height:e.sp[3]}),e.jsxRuntimeExports.jsxs(
|
|
4004
|
+
`,{common:CR,cockpit:fR}=e.appLocale.getLocalizedStrings(),bR=({headerItemData:t,onboardingInfo:o,allUsers:n,retryButtonLoading:r,viaCockpit:i=!1,isDisabled:s=!1,headerKey:a,onOnboardingStepClicked:l,onRetry:d})=>{if(null!=o&&!0==t.key in o){const c=t.key,p=o[c],u=null!=p.userIds?n.find(e=>e.userId===p.userIds[0]):null,m=null!=p.errorDetails?p.errorDetails.summary:"qboLinked"===c?fR.review.errors.qboLinked:fR.review.errors.bankAccountLinked,x=`${CR.via} ${CR.cockpit}`;return!0!==p.error||"qboLinked"!==c&&"bankAccountLinked"!==c?!0===p.completed?e.jsxRuntimeExports.jsxs(jR,{children:[e.jsxRuntimeExports.jsx(nR,{complete:!0,onClick:null!=l?()=>{l(t.key)}:void 0}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null!=u,children:e.jsxRuntimeExports.jsx(TR,{setMargin:!1,children:`${!0===i?x:CR.strings.empty}${"bankAccountLinked"===c&&!0===e.isZeniAIUser(n,u?.userId)?`${CR.via} ${CR.texts.chargebee}`:`${CR.by} ${u?.firstName??CR.strings.empty} ${u?.lastName??CR.strings.empty}`}`})}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null==u,children:e.jsxRuntimeExports.jsx(IR,{})})]}):!0===p.pendingVerification&&"bankAccountLinked"===a?e.jsxRuntimeExports.jsxs(jR,{children:[e.jsxRuntimeExports.jsx(nR,{complete:!1,pendingVerification:!0,onClick:null!=l?()=>{l(t.key)}:void 0}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null!=u,children:e.jsxRuntimeExports.jsx(TR,{setMargin:!1,children:`${!0===i?x:CR.strings.empty}${"bankAccountLinked"===c&&!0===e.isZeniAIUser(n,u?.userId)?`${CR.via} ${CR.texts.chargebee}`:`${CR.by} ${u?.firstName??CR.strings.empty} ${u?.lastName??CR.strings.empty}`}`})}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null==u,children:e.jsxRuntimeExports.jsx(IR,{})})]}):e.jsxRuntimeExports.jsxs(jR,{children:[e.jsxRuntimeExports.jsx(nR,{isDisabled:s,complete:!1,onClick:null!=l?()=>{l(t.key)}:void 0}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null!=u,children:e.jsxRuntimeExports.jsx(TR,{setMargin:!1,children:`${!0===i?x:CR.strings.empty}${"bankAccountLinked"===c&&!0===e.isZeniAIUser(n,u?.userId)?`${CR.via} ${CR.texts.chargebee}`:`${CR.by} ${u?.firstName??CR.strings.empty} ${u?.lastName??CR.strings.empty}`}`})}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null==u,children:e.jsxRuntimeExports.jsx(IR,{})})]}):e.jsxRuntimeExports.jsxs(jR,{children:[e.jsxRuntimeExports.jsxs(RR,{children:[e.jsxRuntimeExports.jsx(e.SvgHighImportance,{width:e.sp[3],height:e.sp[3]}),e.jsxRuntimeExports.jsxs(vR,{children:[e.jsxRuntimeExports.jsx($R,{children:e.jsxRuntimeExports.jsx(e.Tooltip,{display:"flex",placement:"bottom",title:e.jsxRuntimeExports.jsx(kR,{children:m}),children:e.jsxRuntimeExports.jsx(wR,{children:m})})}),e.jsxRuntimeExports.jsx(ER,{}),e.jsxRuntimeExports.jsx(e.Button,{variant:"ghost",size:"small",label:CR.retry,loading:!0===r,onClick:d})]})]}),e.jsxRuntimeExports.jsx(e.ControlledComponent,{controller:null!=u,children:e.jsxRuntimeExports.jsx(TR,{setMargin:!0,children:`${!0===i?x:CR.strings.empty}${"bankAccountLinked"===c&&!0===e.isZeniAIUser(n,u?.userId)?`${CR.via} ${CR.texts.chargebee}`:`${CR.by} ${u?.firstName??CR.strings.empty} ${u?.lastName??CR.strings.empty}`}`})})]})}return null},jR=o.div``,RR=o.div`
|
|
4005
4005
|
display: flex;
|
|
4006
4006
|
align-items: center;
|
|
4007
4007
|
column-gap: ${e.Space.sp1};
|
|
@@ -4017,10 +4017,10 @@
|
|
|
4017
4017
|
-webkit-box-orient: vertical;
|
|
4018
4018
|
-webkit-line-clamp: 1;
|
|
4019
4019
|
overflow: hidden;
|
|
4020
|
-
`,
|
|
4020
|
+
`,ER=o.div`
|
|
4021
4021
|
border-left: 1px solid ${e=>e.theme.colors.grey2};
|
|
4022
4022
|
height: ${e.Space.sp4};
|
|
4023
|
-
`,
|
|
4023
|
+
`,vR=o.div`
|
|
4024
4024
|
display: flex;
|
|
4025
4025
|
align-items: center;
|
|
4026
4026
|
cursor: default;
|
|
@@ -4040,7 +4040,7 @@
|
|
|
4040
4040
|
margin-left: ${t=>!0===t.setMargin?"20px":e.Space.sp0};
|
|
4041
4041
|
`,IR=o.div`
|
|
4042
4042
|
height: 18px;
|
|
4043
|
-
`,{common:{strings:PR,texts:{resendInvite:DR,sendInvite:AR}},cockpit:{onboarding:LR}}=e.appLocale.getLocalizedStrings(),OR=["bankAccountLinked","qboLinked","identityVerified","businessVerified"],MR=({companyView:o,companyNameSticky:n,allUsers:i,sendInviteFetchState:s,retryBankAccountConnectionFetchState:a,totalHeight:l,addThreadRequestThreadId:d,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:u,setElementRef:m,setAddThreadRequestThreadId:x,onOnboardingStepClicked:h,onSendInviteClick:g,redirectToDashboardOnboarding:y,onRetryBankAccountConnection:S})=>{const[C,f]=t.useState(null),b=e.useWindowSizeContext(),j=e.useForm({mode:"all"}),{company:{company:{companyInfo:{companyId:R,name:w,primaryEmailDomain:
|
|
4043
|
+
`,{common:{strings:PR,texts:{resendInvite:DR,sendInvite:AR}},cockpit:{onboarding:LR}}=e.appLocale.getLocalizedStrings(),OR=["bankAccountLinked","qboLinked","identityVerified","businessVerified"],MR=({companyView:o,companyNameSticky:n,allUsers:i,sendInviteFetchState:s,retryBankAccountConnectionFetchState:a,totalHeight:l,addThreadRequestThreadId:d,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:u,setElementRef:m,setAddThreadRequestThreadId:x,onOnboardingStepClicked:h,onSendInviteClick:g,redirectToDashboardOnboarding:y,onRetryBankAccountConnection:S})=>{const[C,f]=t.useState(null),b=e.useWindowSizeContext(),j=e.useForm({mode:"all"}),{company:{company:{companyInfo:{companyId:R,name:w,primaryEmailDomain:E},companyOnboardingInfo:{onboardingInfo:v}}},tenant:$,onboardingCustomerInfo:k}=o,T=function(e,t){const o=e.company.company.companyOnboardingInfo.onboardingUserIds,n=t.filter(e=>o.findIndex(t=>t===e.userId)>-1),r=[];return o.forEach(e=>{const t=n.filter(t=>t.userId===e)[0];null!=t&&r.push(t)}),{controller:{allUsers:t,selectedUsers:r}}}(o,i),I={companyEmailDomain:E,companyName:w,customerEmail:k.email??k.receiverEmails[0]??""},P=`cockpit_${R}`,D="onboarding.notes",{threads:A,isLoading:L}=e.useFilteredThreads({entityType:D,companyId:R},!1),{openThread:O,threads:M,addThread:N,removeThread:z,setOpenThread:F}=t.useContext(e.ThreadsContext),V=null!==O?M.get(O):null,B=!0===O?.includes(R),_=null!=O&&null==M.get(O)&&B,H=null!=d&&M.get(d)?.metadata.companyId===R,W=t.useCallback(()=>{!0===O?.includes(e.NEW_THREAD_SUFFIX)&&z(O),null!=d&&x(void 0)},[d,O,z,x]),U=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??PR.empty,roomId:P,addThreadRequestThreadId:d,openThreadId:O,threadStyle:t.threadStyle,openThreadMetadata:V?.metadata??null,onElementClick:q,onAddThreadClick:K,targetElement:c??C}),G=t.useCallback(t=>{if(t===O)F(null);else if(M.has(t))F(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toOnboardingSortKeyType(n),R,w);N(t,{type:"thread",visibility:"public",id:t,roomId:P,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),F(t)}},[R,w,O,M,N,F,P]),q=t.useCallback((t,o,n=!1)=>{const r=Kj.find(e=>e.key===o);if(p(),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;W(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"onboarding",key:r.key});if(t.target instanceof HTMLElement||t.target instanceof SVGElement)if(!0===n&&t.target instanceof HTMLElement)f(t.target.parentElement);else if(t.target instanceof HTMLElement){const e=yr(t.target,xr);f(e||t.target)}else{const e=t.target.closest(`.${xr}`);e instanceof HTMLElement&&f(e)}const i=[...e.getFilteredThreads(M,{entityType:o,companyId:R},"both")],s=i.length>0&&i[0].length>0?i[0][0]:gr("onboarding",r.key,R);M.has(s)?G(s):d===s?x(void 0):(x(s),F(null))}},[M,R,d,G,x,F,p,W]),K=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("onboarding",t,R);x(void 0),G(o)},[R,x,G]),Y=t.useCallback(()=>{S(R)},[S,R]);t.useEffect(()=>{const t=j.watch((t,{name:o})=>{null!=o&&null!=t.companyData&&e.defer(()=>{})});return()=>{t.unsubscribe()}});const Z=v?.inviteSent,X=v?.accountingConnectionCreationMode,Q=t.useCallback(e=>{if(null==v)return!1;switch(e){case"bankAccountLinked":case"qboLinked":case"identityVerified":case"businessVerified":return!0;default:return!1}},[v]),J=t.useCallback(e=>{OR.includes(e)&&Q(e)?y(E):h(R,e)},[y,E,R,h,Q]),{useFeatureGate:ee}=e.useZeniFeatureContext(),{isFeatureEnabled:te}=ee(e.FeatureGatesNames.isDebitCardFeatureEnabled),oe=r.isTenantBankingOnly(te,$),ne=t.useMemo(()=>{const e=!0===v?.inviteAccepted,t=!0===v?.groupCreated.completed,o=!0===v?.customerCreated.completed,n=null==v?.accountingConnectionCreationMode,r="zeni_user"===v?.accountingConnectionCreationMode&&!0!==v?.qboLinked.completed,i=!oe;return e||!t||!o||n&&i||r&&i},[v?.accountingConnectionCreationMode,v?.customerCreated.completed,v?.groupCreated.completed,v?.inviteAccepted,v?.qboLinked.completed,oe]),re=t.useMemo(()=>!0===v?.inviteSent?DR:AR,[v?.inviteSent]);return e.jsxRuntimeExports.jsx(e.FormProvider,{...j,children:e.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{p(),null!=d&&(x(void 0),d.includes(e.NEW_THREAD_SUFFIX)&&z(d))},children:e.jsxRuntimeExports.jsx(zR,{windowSize:b,isThreadOpen:B||H,totalHeight:l,isCreationInProgress:_,children:Kj.map((t,o)=>{const r=e.toCollaborationEntityType({tab:"onboarding",key:t.key}),l=Kj.length-2<=o,p=[...e.getFilteredThreads(M,{entityType:r,companyId:R},"both")],x=p.length>0&&p[0].length>0?p[0][0]:gr("onboarding",t.key,R),h=M.get(x),y=null!=h&&!1===h.resolved,S=x===O,f=d===x;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs(FR,{companyNameSticky:n,columnWidth:t.width,windowSize:b,isThreadOpen:S||f,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>q(e,t.key),ref:e=>{m(R,t.key,e)},children:[e.jsxRuntimeExports.jsxs(NR,{children:[e.jsxRuntimeExports.jsx(VR,{onClick:e=>{e.preventDefault()},children:!0===Boolean(w)?w:E}),e.jsxRuntimeExports.jsx(e.ThreadComponent,{isElementThreadOpen:S,targetElement:c??C,roomId:P,openThreadId:O,openThreadMetadata:V?.metadata??null})]}),e.jsxRuntimeExports.jsxs(BR,{className:"notesIcon",onClick:e=>{e.preventDefault(),u({roomId:P,companyId:R,companyName:w,entityType:D})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:A.length,isLoading:L}),e.jsxRuntimeExports.jsx(_R,{})]}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:y,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:q}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("onboarding",t.key,R),addThreadRequestThreadId:d,itemKey:t.key,onAddThreadClick:K})]},x);case"groupCreated":case"customerCreated":return e.jsxRuntimeExports.jsxs(HR,{ref:e=>{m(R,t.key,e)},columnWidth:t.width,windowSize:b,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>q(e,t.key),children:[e.jsxRuntimeExports.jsx(bR,{headerItemData:t,onOnboardingStepClicked:J,onboardingInfo:v,allUsers:i}),U({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"bankAccountLinked":return e.jsxRuntimeExports.jsxs(HR,{ref:e=>{m(R,t.key,e)},columnWidth:t.width,windowSize:b,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>q(e,t.key),children:[e.jsxRuntimeExports.jsx(bR,{headerItemData:t,onOnboardingStepClicked:J,onboardingInfo:v,allUsers:i,isDisabled:!0!==Z,onRetry:Y,retryButtonLoading:"In-Progress"===a,headerKey:t.key}),U({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"qboLinked":return e.jsxRuntimeExports.jsxs(HR,{ref:e=>{m(R,t.key,e)},columnWidth:t.width,windowSize:b,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>q(e,t.key),children:[e.jsxRuntimeExports.jsx(bR,{headerItemData:t,onOnboardingStepClicked:J,onboardingInfo:v,allUsers:i,isDisabled:"customer"===X&&!0!==Z||oe}),U({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"identityVerified":case"businessVerified":return e.jsxRuntimeExports.jsxs(HR,{ref:e=>{m(R,t.key,e)},columnWidth:t.width,windowSize:b,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>q(e,t.key),children:[e.jsxRuntimeExports.jsx(cR,{headerItemData:t,onOnboardingStepClicked:J,onboardingInfo:v,allUsers:i,isDisabled:!0!==Z}),U({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"enroller":return e.jsxRuntimeExports.jsxs(HR,{ref:e=>{m(R,t.key,e)},columnWidth:t.width,windowSize:b,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>q(e,t.key),children:[e.jsxRuntimeExports.jsx(e.UserMultiSelectField,{name:"companyData.controller",value:T.controller,placeholderLabel:LR.onboardingUsersPlaceholder,isReadOnly:!0,pickerStyles:{titleTextStyle:e.textStyles.largeRegular,multiValueLabelTitleStyle:e.textStyles.largeRegular}}),U({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);case"invite":return e.jsxRuntimeExports.jsxs(HR,{ref:e=>{m(R,t.key,e)},columnWidth:t.width,windowSize:b,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>q(e,t.key),children:[e.jsxRuntimeExports.jsx(e.Button,{disabled:ne,variant:"primary",label:re,onClick:()=>g(R,v?.inviteSent??!1,I),size:"small",loading:"In-Progress"===s}),U({isElementThreadOpen:S,isElementThreadPresent:y,itemKey:t.key,elementThreadId:x,threadStyle:l?{right:e.Space.sp0}:void 0})]},x);default:return null}})})})})})};const NR=o.div``,zR=o.div`
|
|
4044
4044
|
display: flex;
|
|
4045
4045
|
flex-direction: row;
|
|
4046
4046
|
align-items: center;
|
|
@@ -4140,7 +4140,7 @@
|
|
|
4140
4140
|
z-index: auto;
|
|
4141
4141
|
cursor: ${e=>e.isThreadAllowed?"pointer":"initial"};
|
|
4142
4142
|
position: relative;
|
|
4143
|
-
`,{cockpit:{onboarding:WR},collaboration:{threads:{placeholder:{addANewComment:UR,replyAComment:GR},tooltip:{resolveComment:qR,unResolveComment:KR}}},common:{texts:{comments:YR}}}=e.appLocale.getLocalizedStrings(),ZR={onboardingRightPadding:new e.ResponsiveSized(e.sp[3],e.sp[8])},XR=({onboardingView:o,qboConnectionPoolFlag:r,onSendInviteClick:i,onOnboardingStepClicked:s,onCancelClicked:a,onGoLiveClicked:l,onScroll:d,onUpdateCustomerCreationStatus:c,onColumnSortConfigChanged:p,redirectToDashboardOnboarding:u,onRetryBankAccountConnection:m,onQBOConnectClick:x,initialOpenThreadRequest:h})=>{const g=e.useWindowSizeContext(),y=t.useRef(null),[S,C]=t.useState(null),{setOpenThread:f,setRequestToOpenThread:b,requestToOpenThread:j,isLoading:R}=t.useContext(e.ThreadsContext);t.useEffect(()=>{null!=h&&"Completed"===o.fetchState&&!1===R&&b(h)},[h,o.fetchState,R,b]);const[w,
|
|
4143
|
+
`,{cockpit:{onboarding:WR},collaboration:{threads:{placeholder:{addANewComment:UR,replyAComment:GR},tooltip:{resolveComment:qR,unResolveComment:KR}}},common:{texts:{comments:YR}}}=e.appLocale.getLocalizedStrings(),ZR={onboardingRightPadding:new e.ResponsiveSized(e.sp[3],e.sp[8])},XR=({onboardingView:o,qboConnectionPoolFlag:r,onSendInviteClick:i,onOnboardingStepClicked:s,onCancelClicked:a,onGoLiveClicked:l,onScroll:d,onUpdateCustomerCreationStatus:c,onColumnSortConfigChanged:p,redirectToDashboardOnboarding:u,onRetryBankAccountConnection:m,onQBOConnectClick:x,initialOpenThreadRequest:h})=>{const g=e.useWindowSizeContext(),y=t.useRef(null),[S,C]=t.useState(null),{setOpenThread:f,setRequestToOpenThread:b,requestToOpenThread:j,isLoading:R}=t.useContext(e.ThreadsContext);t.useEffect(()=>{null!=h&&"Completed"===o.fetchState&&!1===R&&b(h)},[h,o.fetchState,R,b]);const[w,E]=t.useState(void 0),v=t.useRef(null),$=t.useRef([]),[k,T]=t.useState(null),I=!("small"===g||"medium-compact"===g),{uiState:P}=o,D=WR.onboardingCompleted.replace("_company-name_",P.selectedCustomerName),[A,L]=t.useState("Not-Started"),[O,N]=t.useState("Not-Started"),{saveFetchState:F,customerCreationStatus:V}=o;t.useEffect(()=>{"Completed"===F.fetchState&&"none"!==V.stage?(N("Not-Started"),L(F.fetchState)):L("Not-Started")},[F.fetchState,V]),t.useEffect(()=>{"Completed"===o.updateStatus.fetchState?(L("Not-Started"),N(o.updateStatus.fetchState)):N("Not-Started")},[o.updateStatus.fetchState]);const B=t.useCallback(()=>{const e=o.onboardingCustomers.filter(e=>e.company.company.companyInfo.companyId===P.selectedCompanyId);if(e.length>0){const{company:t,onboardingCustomerInfo:o,tenant:n}=e[0],r={companyEmailDomain:o.companyEmailDomain,companyId:t.company.companyInfo.companyId,isOnboardingCompleted:!0,isOnboardingTenant:!0,tenantId:n.tenantId,userEmailWithPreOnboardSuccess:o.userEmailWithPreOnboardSuccess};l(r)}},[l,o.onboardingCustomers,P.selectedCompanyId]),_=t.useCallback(e=>o.onboardingCustomers[e].company.company.companyInfo.name.length>z?120:M,[o.onboardingCustomers]);t.useEffect(()=>{y.current&&y.current.resetAfterIndex(0)},[o]);const H=t.useMemo(()=>({makeCompanyNameSticky:I,uiState:P,onColumnSortConfigChanged:p}),[I,P,p]),W=t.useCallback((e,t,n)=>{const r=o.onboardingCustomers.findIndex(t=>t.company.company.companyInfo.companyId===e),i=Kj.findIndex(e=>e.key===t);-1!==r&&-1!==i&&(null==$.current[r]?$.current[r]=[n]:$.current[r][i]=n)},[o.onboardingCustomers]),U=t.useCallback(()=>{v.current=null,b(null)},[b]);return t.useEffect(()=>{if(null!=j&&null!=S){const{companyId:e,entityType:t}=j,[n,r]=t.split("."),i=o.onboardingCustomers.findIndex(t=>t.company.company.companyInfo.companyId===e),s=Kj.findIndex(e=>e.key===r);-1===i||S.visibleStartIndex<=i&&S.visibleStopIndex>=i||y.current?.scrollToItem(i,"center"),setTimeout(()=>{const t=$.current[i]?.[0]?.getBoundingClientRect().bottom,o=$.current[i]?.[0]?.getBoundingClientRect().top;if(null!=t&&null!=o&&(window.innerHeight>=t&&window.innerHeight>=o||o<0)){const t=$.current[i][s];null!=t&&(v.current={companyId:e,target:t}),$.current[i][s]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const a=setInterval(()=>{const t=$.current[i]?.[s]?.getBoundingClientRect().left,o=$.current[i]?.[s]?.getBoundingClientRect().right,n=$.current[i]?.[s]?.offsetWidth;if(v.current?.companyId===e&&null!=t&&null!=n&&null!=o&&(t<window.innerWidth-n||o<window.innerWidth)){clearInterval(a);const e=j.threadId,t=j.onThreadShownCallback;!0===Boolean(e)&&(b(null),f(j.threadId),t?.())}},500);setTimeout(()=>{clearInterval(a),b(null)},2e3)}},[j,S,f,b]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[r?e.jsxRuntimeExports.jsx(lj,{qboConnectionPool:o.qboConnectionPool,isLoading:"In-Progress"===o.qboConnectionPool.saveQBOConnectionPoolState.fetchState,onQBOConnectClick:x}):null,e.jsxRuntimeExports.jsxs(tw,{children:[!0===P.showGoLivePopUp?e.jsxRuntimeExports.jsx($j,{hasAdminRole:!0,onCancelClick:()=>{a()},onGoLiveClick:B,showGoLivePopup:P.showGoLivePopUp,loading:"In-Progress"===o.updateStatus.fetchState}):null,"Completed"===A?e.jsxRuntimeExports.jsx(Nj,{customerCreationType:V,fetchState:A,onRemoveSnackbar:()=>{c(),L("Not-Started")}}):null,"Completed"===O?e.jsxRuntimeExports.jsx(Nj,{fetchState:O,customMessageText:D,onRemoveSnackbar:()=>{N("Not-Started")}}):null,e.jsxRuntimeExports.jsxs(QR.Provider,{value:H,children:[e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:n})=>e.jsxRuntimeExports.jsx(e.VariableSizeList,{height:t,width:n,itemCount:o.onboardingCustomers.length,itemSize:_,onItemsRendered:e=>C(e),overscanCount:1,itemData:{onboardingView:o,makeCompanyNameSticky:I,addThreadRequestThreadId:w,targetElement:v.current?.target,resetTargetElementFromNavigation:U,setElementRef:W,setAddThreadRequestThreadId:E,setNoteData:T,onOnboardingStepClicked:s,onSendInviteClick:i,redirectToDashboardOnboarding:u,onRetryBankAccountConnection:m},ref:y,innerElementType:JR,onScroll:({scrollOffset:e})=>{d(e)},initialScrollOffset:0,style:{willChange:"auto"},children:ew})}),null!=k?e.jsxRuntimeExports.jsx(n.RoomProvider,{id:k.roomId,children:e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${k.companyName} ${YR}`,filter:{application:"cockpit",companyId:k.companyId,entityType:k.entityType,isGlobalComment:!1,tab:"onboarding"},isLoading:!1,threadMetadata:{companyName:k.companyName,companyId:k.companyId,entityId:k.companyId,entityType:k.entityType,isGlobalComment:!1,application:"cockpit",tab:"onboarding",url:window.location.href},textOverrides:{composerPlaceholder:UR,replyComposerPlaceholder:GR,threadResolve:qR,threadUnResolve:KR},onThreadClick:e=>null,onCloseAllThreadsDrawer:()=>T(null)})}):null]})]})]})},QR=t.createContext(void 0),JR=t.forwardRef((o,n)=>{const{children:r,style:i,...s}=o,{makeCompanyNameSticky:a,uiState:l,onColumnSortConfigChanged:d}=t.useContext(QR);return e.jsxRuntimeExports.jsxs(rw,{ref:n,style:{...i,width:"auto"},...s,children:[e.jsxRuntimeExports.jsx(Yj,{companyNameSticky:a,onColumnSortConfigChanged:d,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),e.jsxRuntimeExports.jsx(nw,{children:r})]})});JR.displayName="Onboarding list view inner element type";const ew=({index:t,style:o,data:n})=>{const r=e.useWindowSizeContext(),{onboardingView:i,makeCompanyNameSticky:s,addThreadRequestThreadId:a,targetElement:l,resetTargetElementFromNavigation:d,setElementRef:c,setNoteData:p,setAddThreadRequestThreadId:u,onOnboardingStepClicked:m,onSendInviteClick:x,redirectToDashboardOnboarding:h,onRetryBankAccountConnection:g}=n,y=i.onboardingCustomers[t],{companyId:S}=y.company.company.companyInfo;return e.jsxRuntimeExports.jsx(ow,{isCollapsed:!0,style:{...o,width:"fit-content",minWidth:"100%",padding:`${e.Space.sp0} ${ZR.onboardingRightPadding.valuePx(r)} ${e.Space.sp3} ${e.Space.sp0}`},children:e.jsxRuntimeExports.jsx(MR,{totalHeight:"number"==typeof o.height?o.height:M,companyView:i.onboardingCustomers[t],companyNameSticky:s,allUsers:i.zeniUsers.values,sendInviteFetchState:i.sendInviteFetchStateByCompanyId[i.onboardingCustomers[t].company.company.companyInfo.companyId]?.fetchState,addThreadRequestThreadId:a,targetElementFromNavigation:l,resetTargetElementFromNavigation:d,setNoteData:p,setElementRef:c,setAddThreadRequestThreadId:u,retryBankAccountConnectionFetchState:i.retryBankAccountConnectionFetchStateByCompanyId[i.onboardingCustomers[t].company.company.companyInfo.companyId]?.fetchState,onOnboardingStepClicked:m,onSendInviteClick:x,redirectToDashboardOnboarding:h,onRetryBankAccountConnection:g})},S)},tw=o.div`
|
|
4144
4144
|
/** Subtract top so list can occupy remaining available height */
|
|
4145
4145
|
height: calc(100vh - 108px);
|
|
4146
4146
|
max-width: 99.9%;
|
|
@@ -4183,7 +4183,7 @@
|
|
|
4183
4183
|
border-top: 1px solid ${e=>e.theme.colors.grey2};
|
|
4184
4184
|
`,bw=o(e.LargeSemiBold)`
|
|
4185
4185
|
color: ${e=>e.theme.colors.champion};
|
|
4186
|
-
`,jw=t=>e.DOMAIN_PATTERN.test(t),Rw={width:new e.ResponsiveSized(343,580,756),controlHeight:new e.ResponsiveSized(e.sp[5],e.sp[5]),paddingTopBottom:new e.ResponsiveSized(e.sp[2],e.sp[2]),paddingLeft:new e.ResponsiveSized(e.sp[3],e.sp[4]),paddingRight:new e.ResponsiveSized(e.sp[2],e.sp[3]),labelMarginRight:new e.ResponsiveSized(e.sp[3],e.sp[4])},ww={infoLabel:new e.ResponsiveSizedStyle("smallRegular","standardRegular")};function
|
|
4186
|
+
`,jw=t=>e.DOMAIN_PATTERN.test(t),Rw={width:new e.ResponsiveSized(343,580,756),controlHeight:new e.ResponsiveSized(e.sp[5],e.sp[5]),paddingTopBottom:new e.ResponsiveSized(e.sp[2],e.sp[2]),paddingLeft:new e.ResponsiveSized(e.sp[3],e.sp[4]),paddingRight:new e.ResponsiveSized(e.sp[2],e.sp[3]),labelMarginRight:new e.ResponsiveSized(e.sp[3],e.sp[4])},ww={infoLabel:new e.ResponsiveSizedStyle("smallRegular","standardRegular")};function Ew({label:t,multiSelectWithCheckBoxField:o,style:n,additionalInfoLabel:r}){const i=e.useWindowSizeContext(),{formState:{errors:s}}=e.useFormContext(),a=e.has(s,o.name),l=null!=o.isDisabled,d=null!=r;return e.jsxRuntimeExports.jsxs($w,{isError:a,size:i,style:n,isDisabled:l,$hasAdditionalInfo:d,"data-testid":e.generateDataTestId("labeled-multi-select-with-checkbox",o.name),children:[e.jsxRuntimeExports.jsxs(vw,{className:"labeled-field-row",$windowSize:i,children:[e.jsxRuntimeExports.jsx(e.Label,{isDisabled:o.isDisabled,label:t.label,fieldCode:t.fieldCode,htmlFor:o.name,syncBackgroundWithAncestor:!0,style:{marginRight:Rw.labelMarginRight.value(i),width:t.width??"auto",height:Rw.controlHeight.value(i),minHeight:Rw.controlHeight.value(i)}}),e.jsxRuntimeExports.jsx(kw,{labelWidth:t.width,children:e.jsxRuntimeExports.jsx(qn,{...o,isDisabled:o.isDisabled,customStyleConfig:{...o.customStyleConfig,container:()=>({cursor:"inherit"}),control:()=>({minHeight:e.Space.sp5,height:"auto",flexWrap:"wrap"})}})})]}),d?e.jsxRuntimeExports.jsx(Tw,{windowSize:i,isError:a,children:r}):null]})}const vw=o.div`
|
|
4187
4187
|
display: flex;
|
|
4188
4188
|
flex-direction: row;
|
|
4189
4189
|
align-items: flex-start;
|
|
@@ -4304,7 +4304,7 @@
|
|
|
4304
4304
|
height: ${e.Space.sp6};
|
|
4305
4305
|
align-items: center;
|
|
4306
4306
|
padding: ${e.Space.sp0} ${e.Space.sp4};
|
|
4307
|
-
`,{cockpit:{onboarding:Vw},common:Bw}=e.appLocale.getLocalizedStrings(),{strings:{colon:_w,empty:Hw},placeholder:Ww,labels:Uw}=Bw,Gw=`${Bw.add} ${Bw.texts.firstName.toLowerCase()}`,qw=`${Bw.add} ${Bw.texts.lastName.toLowerCase()}`,Kw=`${Bw.add} ${Vw.customer.customerName.toLowerCase()}`,Yw=t.forwardRef(({sectionId:o,localData:n,onboardedCompanies:r,isSubsidiary:i,labelWidth:s,realmIdAdditionalLabel:a,productsAdditionalLabel:l,isDisabled:d,largeLabelWidth:c},p)=>{const{emailGroupFetchState:u,newOnboardingCustomerLocalData:m,companyView:x,allProductsList:h}=n,g=e.useTheme(),[y,S]=t.useState(
|
|
4307
|
+
`,{cockpit:{onboarding:Vw},common:Bw}=e.appLocale.getLocalizedStrings(),{strings:{colon:_w,empty:Hw},placeholder:Ww,labels:Uw}=Bw,Gw=`${Bw.add} ${Bw.texts.firstName.toLowerCase()}`,qw=`${Bw.add} ${Bw.texts.lastName.toLowerCase()}`,Kw=`${Bw.add} ${Vw.customer.customerName.toLowerCase()}`,Yw=t.forwardRef(({sectionId:o,localData:n,onboardedCompanies:r,isSubsidiary:i,labelWidth:s,realmIdAdditionalLabel:a,productsAdditionalLabel:l,isDisabled:d,largeLabelWidth:c},p)=>{const{emailGroupFetchState:u,newOnboardingCustomerLocalData:m,companyView:x,allProductsList:h}=n,g=e.useTheme(),[y,S]=t.useState(oE(h,m.selectedProducts??[]));t.useEffect(()=>{null!=m.selectedProducts&&S(oE(h,m.selectedProducts))},[m.selectedProducts]);const C="Completed"!==u.fetchState&&null==m.isEmailGroupCreated,f=null!=d||C?"disabled":d,b=!0===n.companyView?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed;let j;const R=r.find(e=>e.companyInfo.companyId===m.parentCompanyId);return null!=R&&(j={label:R.companyInfo.name,value:R.companyInfo.companyId}),e.jsxRuntimeExports.jsxs(Zw,{isDisabled:C,ref:p,children:[e.jsxRuntimeExports.jsxs(Xw,{children:[e.jsxRuntimeExports.jsx(Jw,{children:Bw.texts.customerCreation}),null!=m.companyId&&e.jsxRuntimeExports.jsx(Aw,{isCompleted:!0===x?.company.companyOnboardingInfo.onboardingInfo?.customerCreated.completed})]}),e.jsxRuntimeExports.jsxs(Qw,{children:[e.jsxRuntimeExports.jsx(e.LabeledNameField,{label:{label:`${Vw.customer.customerName}${_w}`,width:s},nameField:{name:`${o}.customerName`,registerOptions:{required:!0},defaultValue:{firstName:n.newOnboardingCustomerLocalData.customerName?.firstName??Hw,lastName:n.newOnboardingCustomerLocalData.customerName?.lastName??Hw},placeHolder:{firstName:Gw,lastName:qw,name:Kw},showFullNameError:!0},isDisabled:"disabled"===f?"disabled":d,showAdditionalInfoLabel:!0,additionalInfoLabel:Vw.customer.customerNameInfoText,style:{width:"auto"}}),e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${Vw.customer.customerEmail}${_w}`,width:s},text:{type:"email",name:`${o}.email`,placeholder:`${Bw.add} ${Vw.customer.customerEmail.toLowerCase()}`,autoComplete:"off",options:{required:!0}},isDisabled:"disabled"===f?"disabled":d,showAdditionalInfoLabel:!0,additionalInfoLabel:Vw.customer.customerEmailInfoText}),e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${Bw.texts.companyName}${_w}`,width:s},text:{type:"text",name:`${o}.name`,placeholder:`${Bw.add} ${Bw.texts.companyName.toLowerCase()}`,options:{required:!0}},isDisabled:f,showAdditionalInfoLabel:!0,additionalInfoLabel:Vw.customer.companyNameInfoText}),!0===i?e.jsxRuntimeExports.jsx(Nw,{label:{label:`${Vw.customer.entity}${_w}`,width:s},concatText:Bw.of,firstSingleSelectField:{name:`${o}.entityType`,placeholder:`${Bw.add} ${Vw.customer.entity.toLowerCase()}`,defaultValue:{selectedOption:{value:Bw.texts.subsidiary,label:Bw.texts.subsidiary},allOptions:[{value:Bw.texts.parent,label:Bw.texts.parent},{value:Bw.texts.subsidiary,label:Bw.texts.subsidiary}]},style:{backgroundColor:g.colors.background}},secondSingleSelectField:{name:`${o}.company`,placeholder:`${Bw.add} ${Bw.texts.parent.toLowerCase()}`,defaultValue:{selectedOption:j,allOptions:r.map(e=>({label:e.companyInfo.name,value:e.companyInfo.companyId}))},style:{backgroundColor:g.colors.background},registerOptions:{required:i}},isDisabled:f}):e.jsxRuntimeExports.jsx(e.LabeledSingleSelectWithoutClearableField,{label:{label:`${Vw.customer.entity}${_w}`,width:s},singleSelectWithoutClearableField:{name:`${o}.entityType`,placeholder:`${Bw.add} ${Vw.customer.entity.toLowerCase()}`,defaultValue:{selectedOption:{value:Bw.texts.parent,label:Bw.texts.parent},allOptions:[{value:Bw.texts.parent,label:Bw.texts.parent},{value:Bw.texts.subsidiary,label:Bw.texts.subsidiary}]}},isDisabled:f}),e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${Bw.texts.realmId}${_w}`,width:s},text:{type:"text",name:`${o}.realmId`,placeholder:`${Bw.add} ${Vw.customer.realmIdText}`,options:{pattern:e.REALM_ID}},showTooltip:!0,tooltipTitle:e.jsxRuntimeExports.jsx(eE,{}),isDisabled:"disabled"===f||!0===b?"disabled":d,isOptional:!0}),e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${Vw.customer.confirmRealmId}${_w}`,width:c},text:{type:"text",name:`${o}.confirmRealmId`,placeholder:`${Vw.customer.confirmRealmIdText}`,options:{pattern:e.REALM_ID,validate:(e,t)=>e===t[o].realmId}},additionalInfoLabel:a,disableCopyPaste:!0,isDisabled:"disabled"===f||!0===b?"disabled":d,isOptional:!0}),e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${Bw.texts.hubspotId}${_w}`,width:s},text:{type:"text",name:"customerSection.hubSpotId",placeholder:`${Bw.add} ${Bw.texts.hubspotId}`,options:{pattern:e.DIGITS_PATTERN}},isDisabled:f,isOptional:!0}),e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${Vw.customer.chargebeeId}${_w}`,width:s},text:{type:"text",name:"customerSection.chargebeeId",placeholder:`${Bw.add} ${Vw.customer.chargebeeIdText}`,options:{pattern:e.ALPHA_NUMERIC_PATTERN,required:!0}},isDisabled:f}),e.jsxRuntimeExports.jsx(Ew,{label:{label:Uw.products,width:s},additionalInfoLabel:!0===Boolean(l)?l:void 0,multiSelectWithCheckBoxField:{name:"customerSection.products",defaultValue:{allOptions:y,selectedOptions:m.selectedProducts??[]},placeholder:Ww.productsPlaceholder,isDisabled:f,registerOptions:{validate:e=>null!=e&&e.selectedOptions.length>0}},style:{width:"auto"}})]})]})});Yw.displayName="CustomerCreation";const Zw=o.div`
|
|
4308
4308
|
opacity: ${e=>e.isDisabled?.4:1};
|
|
4309
4309
|
display: flex;
|
|
4310
4310
|
flex-direction: column;
|
|
@@ -4320,7 +4320,7 @@
|
|
|
4320
4320
|
border-radius: ${e.Space.sp2};
|
|
4321
4321
|
`,Jw=o(e.LargeSemiBold)`
|
|
4322
4322
|
color: ${e=>e.theme.colors.champion};
|
|
4323
|
-
`,
|
|
4323
|
+
`,eE=()=>e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(tE,{children:Vw.customer.reamlIdTooltip.firstLine}),e.jsxRuntimeExports.jsx(tE,{children:Vw.customer.reamlIdTooltip.secondLine})]}),tE=o.div``,oE=(e,t)=>{const o=t.includes("bookkeeping"),n=t.includes("zeni_checking"),r=t.includes("zeni_cards"),i=t.includes("zeni_treasury"),s=t.includes("zeni_payroll"),a=t.includes("zeni_cfo"),l=t.includes("zeni_tax"),d=s||a||l,c=["zeni_payroll","zeni_cfo","zeni_tax"],p=["zeni_bill_pay","zeni_reimbursements"],u=["zeni_checking","zeni_cards","zeni_treasury"],m=["zeni_bill_pay","zeni_reimbursements"];return e.map(e=>{const{code:t,name:s}=e,a={label:s,value:t,isDisabled:!1,isFiltered:!1};if(u.includes(t))return a.isDisabled=!0,a.isFiltered=!0,a;if(p.includes(t))return a.isDisabled=!0,a.isFiltered=!1,a;if(d){const e=c.includes(t);return a.isFiltered=!1,a.isDisabled=!e,a}if(o)return"bookkeeping"===t?(a.isDisabled=!1,a.isFiltered=!1):(m.includes(t),a.isDisabled=!0,a.isFiltered=!1),a;if(n||r||i){const e=["bookkeeping","zeni_checking","zeni_cards","zeni_treasury"].includes(t);return a.isFiltered=!e,a.isDisabled=!e,a}return a})},nE=o.div`
|
|
4324
4324
|
color: ${e=>e.theme.colors.primary};
|
|
4325
4325
|
display: flex;
|
|
4326
4326
|
justify-content: center;
|
|
@@ -4330,23 +4330,23 @@
|
|
|
4330
4330
|
border-radius: 50%;
|
|
4331
4331
|
align-items: center;
|
|
4332
4332
|
box-shadow: ${e.Space.sp0} 2px 2px 2px ${e.Colors.boxShadowElevation};
|
|
4333
|
-
`;function
|
|
4333
|
+
`;function rE({size:t,disableShrink:o,reverseSpinnerColor:n,style:r}){const i=e.useTheme(),s=(t=>{switch(t){case"ExtraSmall":return e.sp[2];case"Small":return e.sp[3];case"Standard":return e.sp[4];case"Large":return e.sp[5];case"ExtraLarge":return e.sp[7]}})(t),a=n?i.colors.grey5:i.colors.primary;return e.jsxRuntimeExports.jsx(nE,{style:{color:a,...r},children:e.jsxRuntimeExports.jsx(e.CircularProgress,{disableShrink:o,size:s,color:"inherit"})})}function iE({size:t,start:o,disableShrink:n,reverseSpinnerColor:r,style:i}){return o?e.jsxRuntimeExports.jsx(rE,{disableShrink:!0===n,size:t,reverseSpinnerColor:!0===r,style:i}):null}const{common:sE,cockpit:{onboarding:aE}}=e.appLocale.getLocalizedStrings(),lE=t.forwardRef(({sectionId:t,localData:o,labelWidth:n,groupNameAdditionalLabel:r,groupEmailAdditionalLabel:i,isDisabled:s},a)=>{const{emailGroupFetchState:l,newOnboardingCustomerLocalData:d,companyView:c}=o,p="Completed"!==l.fetchState&&null==d.isEmailGroupCreated,u=p||!0===d.isEmailGroupCreated||null!=s?"readonly":s;return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:["In-Progress"===l.fetchState?e.jsxRuntimeExports.jsx(mE,{children:e.jsxRuntimeExports.jsx(iE,{size:"Large",start:!0})}):null,e.jsxRuntimeExports.jsxs(dE,{isDisabled:p,ref:a,children:[e.jsxRuntimeExports.jsxs(pE,{children:[e.jsxRuntimeExports.jsx(cE,{children:sE.texts.groupCreation}),null!=d.companyId&&e.jsxRuntimeExports.jsx(Aw,{isCompleted:!0===c?.company.companyOnboardingInfo.onboardingInfo?.groupCreated.completed})]}),e.jsxRuntimeExports.jsxs(uE,{children:[e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${sE.texts.groupName}:`,width:n},text:{type:"text",name:`${t}.groupName`,placeholder:`${sE.add} ${sE.texts.groupName.toLowerCase()}`,options:{required:""!=d.groupId&&null!=d.groupId}},additionalInfoLabel:r,isDisabled:u}),e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${aE.customer.groupEmail}:`,width:n},text:{type:"email",name:`${t}.groupEmail`,placeholder:`${sE.add} ${aE.customer.groupEmail.toLowerCase()}`,options:{required:""!=d.groupName&&null!=d.groupName}},additionalInfoLabel:i,isDisabled:u}),e.jsxRuntimeExports.jsx(e.LabeledTextField,{label:{label:`${aE.customer.groupDescription}:`,width:n},text:{type:"text",name:`${t}.groupDescription`,placeholder:`${sE.add} ${sE.texts.description.toLowerCase()}`},isDisabled:u})]})]})]})});lE.displayName="GroupCreation";const dE=o.div`
|
|
4334
4334
|
opacity: ${e=>e.isDisabled?.4:1};
|
|
4335
4335
|
display: flex;
|
|
4336
4336
|
flex-direction: column;
|
|
4337
4337
|
gap: ${e.Space.sp2};
|
|
4338
4338
|
padding-bottom: ${e.Space.sp7};
|
|
4339
|
-
`,
|
|
4339
|
+
`,cE=o(e.LargeSemiBold)`
|
|
4340
4340
|
color: ${e=>e.theme.colors.champion};
|
|
4341
|
-
`,
|
|
4341
|
+
`,pE=o.div`
|
|
4342
4342
|
display: flex;
|
|
4343
4343
|
justify-content: space-between;
|
|
4344
|
-
`,
|
|
4344
|
+
`,uE=o.div`
|
|
4345
4345
|
display: flex;
|
|
4346
4346
|
flex-direction: column;
|
|
4347
4347
|
border-top: 1px solid ${e=>e.theme.colors.grey2};
|
|
4348
4348
|
border-radius: ${e.Space.sp2};
|
|
4349
|
-
`,
|
|
4349
|
+
`,mE=o.div`
|
|
4350
4350
|
display: flex;
|
|
4351
4351
|
position: fixed;
|
|
4352
4352
|
left: 50%;
|
|
@@ -4356,12 +4356,12 @@
|
|
|
4356
4356
|
align-items: center;
|
|
4357
4357
|
z-index: 10;
|
|
4358
4358
|
margin-top: 28px;
|
|
4359
|
-
`,{cockpit:{onboarding:
|
|
4359
|
+
`,{cockpit:{onboarding:xE},common:{texts:{connectQuickBooks:hE,congratulationsYouHaveSuccessfullyEstablishedAConnectionWith:gE,unableToConnectQuickbooksPleaseTryAgain:yE},settings:{integrations:{actions:{connect:SE}}}}}=e.appLocale.getLocalizedStrings();function CE({sectionId:t,isSectionDisabled:o,isLoading:n,accountingConnectionCreationMode:i,isConnected:s,isInviteSent:a,saveConnectionState:l,onQBOConnectClick:d}){return e.jsxRuntimeExports.jsxs(fE,{isDisabled:!0===o,children:[e.jsxRuntimeExports.jsx($E,{children:hE}),e.jsxRuntimeExports.jsxs(bE,{children:[e.jsxRuntimeExports.jsx(kE,{children:r.ALL_ACCOUNTING_CONNECTION_CREATION_MODES.map((n,r)=>e.jsxRuntimeExports.jsx(TE,{isDisabled:!0===o,leftSideContainer:0===r,children:e.jsxRuntimeExports.jsx(e.LabeledRadioField,{label:{label:xE.qboRadioButtonLabels[n]},style:{width:"100%",backgroundColor:"transparent",borderWidth:0},isDisabled:!0===s||!0===o||!0===a?"disabled":void 0,changeLabelColorInDisableMode:!1,radioField:{radioSize:"small",name:`${t}.accountingConnectionCreationMode`,id:n,value:n}})},n))}),e.jsxRuntimeExports.jsxs(PE,{isDisabled:!0===o||"zeni_user"!==i,children:[e.jsxRuntimeExports.jsxs(jE,{children:[e.jsxRuntimeExports.jsxs(RE,{children:[e.jsxRuntimeExports.jsx(wE,{}),e.jsxRuntimeExports.jsx(EE,{}),e.jsxRuntimeExports.jsx(vE,{})]}),!0!==s?e.jsxRuntimeExports.jsx(e.Button,{variant:"primary",label:SE,style:{width:"fit-content"},disabled:!0===o||"zeni_user"!==i,onClick:d,loading:!0===n}):e.jsxRuntimeExports.jsx(nR,{complete:!0})]}),!0===s?e.jsxRuntimeExports.jsx(IE,{children:gE}):null,"Error"===l?e.jsxRuntimeExports.jsx(DE,{children:yE}):null]})]})]})}const fE=o.div`
|
|
4360
4360
|
opacity: ${e=>e.isDisabled?.4:1};
|
|
4361
4361
|
display: flex;
|
|
4362
4362
|
flex-direction: column;
|
|
4363
4363
|
row-gap: ${e.Space.sp2};
|
|
4364
|
-
`,
|
|
4364
|
+
`,bE=o.div`
|
|
4365
4365
|
display: flex;
|
|
4366
4366
|
flex-direction: column;
|
|
4367
4367
|
width: 100%;
|
|
@@ -4369,33 +4369,33 @@
|
|
|
4369
4369
|
background-color: ${e=>e.theme.colors.grey5};
|
|
4370
4370
|
justify-content: space-between;
|
|
4371
4371
|
box-sizing: border-box;
|
|
4372
|
-
`,
|
|
4372
|
+
`,jE=o.div`
|
|
4373
4373
|
display: flex;
|
|
4374
4374
|
justify-content: space-between;
|
|
4375
4375
|
row-gap: ${e.Space.sp2};
|
|
4376
|
-
`,
|
|
4376
|
+
`,RE=o.div`
|
|
4377
4377
|
display: flex;
|
|
4378
4378
|
align-items: center;
|
|
4379
4379
|
gap: ${e.Space.sp4};
|
|
4380
4380
|
justify-content: left;
|
|
4381
4381
|
color: ${e=>e.theme.colors.primary};
|
|
4382
|
-
`,
|
|
4382
|
+
`,wE=o(e.SvgZeniLogoFull)`
|
|
4383
4383
|
height: 20px;
|
|
4384
4384
|
width: auto;
|
|
4385
4385
|
color: ${e=>e.theme.colors.primary};
|
|
4386
4386
|
cursor: pointer;
|
|
4387
|
-
`,
|
|
4387
|
+
`,EE=o(e.SvgArrowTailRight)`
|
|
4388
4388
|
height: ${e.Space.sp4};
|
|
4389
4389
|
width: ${e.Space.sp4};
|
|
4390
4390
|
color: ${e=>e.theme.colors.hero};
|
|
4391
|
-
`,
|
|
4391
|
+
`,vE=o(e.SvgIntuitQuickBooksLogo)`
|
|
4392
4392
|
height: ${e.Space.sp4};
|
|
4393
4393
|
color: ${e=>e.theme.colors.primary};
|
|
4394
|
-
`,$
|
|
4394
|
+
`,$E=o(e.LargeSemiBold)`
|
|
4395
4395
|
color: ${e=>e.theme.colors.champion};
|
|
4396
|
-
`,
|
|
4396
|
+
`,kE=o.div`
|
|
4397
4397
|
display: flex;
|
|
4398
|
-
`,
|
|
4398
|
+
`,TE=o.div`
|
|
4399
4399
|
border: 1px solid ${e=>e.theme.colors.grey2};
|
|
4400
4400
|
border-top-left-radius: ${t=>!0===t.leftSideContainer?e.Space.sp2:e.Space.sp0};
|
|
4401
4401
|
border-top-right-radius: ${t=>!1===t.leftSideContainer?e.Space.sp2:e.Space.sp0};
|
|
@@ -4404,11 +4404,11 @@
|
|
|
4404
4404
|
&:hover {
|
|
4405
4405
|
fill: ${e=>e.theme.colors.primary};
|
|
4406
4406
|
}
|
|
4407
|
-
`,
|
|
4407
|
+
`,IE=o(e.StandardRegular)`
|
|
4408
4408
|
display: flex;
|
|
4409
4409
|
margin-top: ${e.Space.sp2};
|
|
4410
4410
|
color: ${e=>e.theme.colors.hero};
|
|
4411
|
-
`,
|
|
4411
|
+
`,PE=o.div`
|
|
4412
4412
|
padding: ${e.Space.sp4};
|
|
4413
4413
|
border-width: 0 1px 1px 1px;
|
|
4414
4414
|
border-style: solid;
|
|
@@ -4419,14 +4419,14 @@
|
|
|
4419
4419
|
&:hover {
|
|
4420
4420
|
fill: ${e=>e.theme.colors.primary};
|
|
4421
4421
|
}
|
|
4422
|
-
`,
|
|
4422
|
+
`,DE=o(e.StandardRegular)`
|
|
4423
4423
|
display: flex;
|
|
4424
4424
|
margin-top: ${e.Space.sp3};
|
|
4425
4425
|
background-color: ${e.Colors.importantLight};
|
|
4426
4426
|
color: ${e.Colors.importantDark};
|
|
4427
4427
|
padding: ${e.Space.sp2} ${e.Space.sp2};
|
|
4428
4428
|
border-radius: ${e.Space.sp1};
|
|
4429
|
-
`,{common:
|
|
4429
|
+
`,{common:AE,cockpit:{onboarding:LE}}=e.appLocale.getLocalizedStrings(),OE=AE.no,ME=AE.yes,NE=AE.strings,zE="onboardingCustomerPage",FE="companySection",VE="groupSection",BE="customerSection",_E="qboConnectionSection",HE={labelWidth:new e.ResponsiveSized(120,180),largeLabelWidth:new e.ResponsiveSized(120,210,210),extraLargeLabelWidth:new e.ResponsiveSized(240,240,240),descriptionMarginBottom:new e.ResponsiveSized(20,e.sp[3]),titleFontSize:new e.ResponsiveSized(e.sp[3],18),titleLineHeight:new e.ResponsiveSized(e.sp[4],27),buttonWidth:new e.ResponsiveSized(135,135)};const WE=e=>{const{newOnboardingCustomerLocalData:t,onboardingCompletedCompanies:o}=e;let n;const r=o.companies.find(e=>e.companyInfo.companyId===t.parentCompanyId);return null!=r&&(n={label:r.companyInfo.name,value:r.companyInfo.companyId}),{[FE]:{companyDomain:t.companyEmailDomain??NE.empty},[VE]:{groupName:t.groupName??NE.empty,groupEmail:t.groupId??NE.empty,groupDescription:t.groupDescription??NE.empty},[BE]:{name:t.name??NE.empty,entityType:{allOptions:[{label:AE.texts.parent,value:AE.texts.parent},{label:AE.texts.subsidiary,value:AE.texts.subsidiary}],selectedOption:!0===t.isSubsidiary?{label:AE.texts.subsidiary,value:AE.texts.subsidiary}:{label:AE.texts.parent,value:AE.texts.parent}},company:{selectedOption:n,allOptions:o.companies.map(e=>({label:e.companyInfo.name,value:e.companyInfo.companyId}))},realmId:t.qboRealmId??NE.empty,confirmRealmId:t.qboRealmId??NE.empty,chargebeeId:t.chargebeeId??NE.empty,hubSpotId:t.hubSpotId??NE.empty,email:t.email??NE.empty,customerName:t.customerName??{firstName:NE.empty,lastName:NE.empty},products:{allOptions:oE(e.allProductsList,t.selectedProducts??[]),selectedOptions:t.selectedProducts??[]}},[_E]:{accountingConnectionCreationMode:t.accountingConnectionCreationMode}}},UE=o.div`
|
|
4430
4430
|
display: flex;
|
|
4431
4431
|
justify-content: flex-start;
|
|
4432
4432
|
height: 100%;
|
|
@@ -4435,16 +4435,16 @@
|
|
|
4435
4435
|
align-items: center;
|
|
4436
4436
|
background-color: ${e=>e.theme.colors.grey5};
|
|
4437
4437
|
box-shadow: ${t=>`${e.Space.sp0} 2px ${e.Space.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
4438
|
-
`,
|
|
4438
|
+
`,GE=o(e.LargeRegular)`
|
|
4439
4439
|
color: ${e=>e.theme.colors.hero};
|
|
4440
4440
|
display: flex;
|
|
4441
4441
|
justify-content: center;
|
|
4442
4442
|
padding: ${e.Space.sp3} ${e.Space.sp0} ${e.Space.sp7};
|
|
4443
|
-
`,
|
|
4443
|
+
`,qE=o(e.SvgAlert)`
|
|
4444
4444
|
color: ${e.Colors.important};
|
|
4445
4445
|
width: ${e.Space.sp3};
|
|
4446
4446
|
height: ${e.Space.sp3};
|
|
4447
|
-
`,
|
|
4447
|
+
`,KE=o.div`
|
|
4448
4448
|
display: flex;
|
|
4449
4449
|
gap: ${e.Space.sp2};
|
|
4450
4450
|
padding: ${e.Space.sp3};
|
|
@@ -4453,20 +4453,20 @@
|
|
|
4453
4453
|
border-radius: ${e.Space.sp2};
|
|
4454
4454
|
align-items: center;
|
|
4455
4455
|
justify-content: space-between;
|
|
4456
|
-
`,
|
|
4456
|
+
`,YE=o.div`
|
|
4457
4457
|
display: flex;
|
|
4458
4458
|
max-width: 95%;
|
|
4459
4459
|
align-items: flex-start;
|
|
4460
4460
|
flex-direction: column;
|
|
4461
|
-
`,
|
|
4461
|
+
`,ZE=o.div`
|
|
4462
4462
|
padding-bottom: ${e.Space.sp11};
|
|
4463
|
-
`,
|
|
4463
|
+
`,XE=o.div`
|
|
4464
4464
|
display: flex;
|
|
4465
4465
|
align-items: center;
|
|
4466
4466
|
gap: ${e.Space.sp2};
|
|
4467
|
-
`,
|
|
4467
|
+
`,QE=o(e.StandardMedium)`
|
|
4468
4468
|
margin-left: ${e.Space.sp4};
|
|
4469
|
-
`,
|
|
4469
|
+
`,JE=e=>{const{newOnboardingCustomerLocalData:t}=e,{isOnboardingCompleted:o}=t;return{isExistingCustomer:null!=o,isCustomerOnboardedSuccessfully:null!=o&&!0===o}},ev=(e,t)=>{const o=["zeni_payroll","zeni_cfo","zeni_tax"],n=["bookkeeping","zeni_bill_pay","zeni_reimbursements"],r=e.includes("bookkeeping"),i=t.includes("bookkeeping"),s=e.filter(e=>o.includes(e)),a=t.filter(e=>o.includes(e)),l=s.length>0,d=a.length>0;return!l&&d?a:l&&!d?[]:!r&&i?n:r&&!i?[]:d?a:t};var tv=function(e,t){return(tv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};function ov(e){var o=e.className,n=e.counterClockwise,r=e.dashRatio,i=e.pathRadius,s=e.strokeWidth,a=e.style;return t.createElement("path",{className:o,style:Object.assign({},a,rv({pathRadius:i,dashRatio:r,counterClockwise:n})),d:nv({pathRadius:i,counterClockwise:n}),strokeWidth:s,fillOpacity:0})}function nv(e){var t=e.pathRadius,o=e.counterClockwise?1:0;return"\n M 50,50\n m 0,-"+t+"\n a "+t+","+t+" "+o+" 1 1 0,"+2*t+"\n a "+t+","+t+" "+o+" 1 1 0,-"+2*t+"\n "}function rv(e){var t=e.counterClockwise,o=e.dashRatio,n=e.pathRadius,r=2*Math.PI*n,i=(1-o)*r;return{strokeDasharray:r+"px "+r+"px",strokeDashoffset:(t?-i:i)+"px"}}var iv=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function o(){this.constructor=e}tv(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(o,e),o.prototype.getBackgroundPadding=function(){return this.props.background?this.props.backgroundPadding:0},o.prototype.getPathRadius=function(){return 50-this.props.strokeWidth/2-this.getBackgroundPadding()},o.prototype.getPathRatio=function(){var e=this.props,t=e.value,o=e.minValue,n=e.maxValue;return(Math.min(Math.max(t,o),n)-o)/(n-o)},o.prototype.render=function(){var e=this.props,o=e.circleRatio,n=e.className,r=e.classes,i=e.counterClockwise,s=e.styles,a=e.strokeWidth,l=e.text,d=this.getPathRadius(),c=this.getPathRatio();return t.createElement("svg",{className:r.root+" "+n,style:s.root,viewBox:"0 0 100 100","data-test-id":"CircularProgressbar"},this.props.background?t.createElement("circle",{className:r.background,style:s.background,cx:50,cy:50,r:50}):null,t.createElement(ov,{className:r.trail,counterClockwise:i,dashRatio:o,pathRadius:d,strokeWidth:a,style:s.trail}),t.createElement(ov,{className:r.path,counterClockwise:i,dashRatio:c*o,pathRadius:d,strokeWidth:a,style:s.path}),l?t.createElement("text",{className:r.text,style:s.text,x:50,y:50},l):null)},o.defaultProps={background:!1,backgroundPadding:0,circleRatio:1,classes:{root:"CircularProgressbar",trail:"CircularProgressbar-trail",path:"CircularProgressbar-path",text:"CircularProgressbar-text",background:"CircularProgressbar-background"},counterClockwise:!1,className:"",maxValue:100,minValue:0,strokeWidth:8,styles:{root:{},trail:{},path:{},text:{},background:{}},text:""},o}(t.Component);function sv(e){var t=e.rotation,o=e.strokeLinecap,n=e.textColor,r=e.textSize,i=e.pathColor,s=e.pathTransition,a=e.pathTransitionDuration,l=e.trailColor,d=e.backgroundColor,c=null==t?void 0:"rotate("+t+"turn)",p=null==t?void 0:"center center";return{root:{},path:av({stroke:i,strokeLinecap:o,transform:c,transformOrigin:p,transition:s,transitionDuration:null==a?void 0:a+"s"}),trail:av({stroke:l,strokeLinecap:o,transform:c,transformOrigin:p}),text:av({fill:n,fontSize:r}),background:av({fill:d})}}function av(e){return Object.keys(e).forEach(function(t){null==e[t]&&delete e[t]}),e}const{cockpit:lv,common:dv,dateFormat:{visual:cv}}=e.appLocale.getLocalizedStrings(),pv=o.div`
|
|
4470
4470
|
background-color: ${e=>e.highlight?e.theme.colors.brandColorGoldLight:e.theme.colors.grey5};
|
|
4471
4471
|
border: ${e=>`1px solid ${e.highlight?e.theme.colors.brandColorGoldDark:e.theme.colors.background}`};
|
|
4472
4472
|
border-radius: ${e.Space.sp2};
|
|
@@ -4479,58 +4479,58 @@
|
|
|
4479
4479
|
&:hover {
|
|
4480
4480
|
outline: none;
|
|
4481
4481
|
}
|
|
4482
|
-
`,
|
|
4482
|
+
`,uv=o.div`
|
|
4483
4483
|
display: flex;
|
|
4484
4484
|
align-items: center;
|
|
4485
4485
|
column-gap: ${e.Space.sp2};
|
|
4486
4486
|
justify-content: space-between;
|
|
4487
4487
|
width: 100%;
|
|
4488
|
-
`,
|
|
4488
|
+
`,mv=o.div`
|
|
4489
4489
|
display: flex;
|
|
4490
4490
|
flex-direction: row;
|
|
4491
4491
|
align-items: center;
|
|
4492
|
-
`,
|
|
4492
|
+
`,xv=o.div`
|
|
4493
4493
|
display: flex;
|
|
4494
4494
|
height: ${e.Space.sp7};
|
|
4495
4495
|
padding-right: ${e.Space.sp2};
|
|
4496
4496
|
justify-content: center;
|
|
4497
|
-
`,
|
|
4497
|
+
`,hv=o.div`
|
|
4498
4498
|
display: flex;
|
|
4499
4499
|
flex-direction: row;
|
|
4500
4500
|
padding-left: ${e.Space.sp3};
|
|
4501
4501
|
align-items: center;
|
|
4502
4502
|
justify-content: space-between;
|
|
4503
|
-
`,
|
|
4503
|
+
`,gv=o.div``,yv=o.div`
|
|
4504
4504
|
display: flex;
|
|
4505
4505
|
align-items: center;
|
|
4506
4506
|
column-gap: ${e.Space.sp2};
|
|
4507
|
-
`,
|
|
4507
|
+
`,Sv=o(e.LargeMedium)`
|
|
4508
4508
|
color: ${e=>e.theme.colors.primary};
|
|
4509
|
-
`,
|
|
4509
|
+
`,Cv=o(e.LargeRegular)`
|
|
4510
4510
|
color: ${e.Colors.brandColorGoldDark};
|
|
4511
|
-
`,
|
|
4511
|
+
`,fv=o.div`
|
|
4512
4512
|
display: flex;
|
|
4513
4513
|
align-items: center;
|
|
4514
4514
|
justify-content: flex-start;
|
|
4515
|
-
`,
|
|
4515
|
+
`,bv=o(e.SmallRegularSp)`
|
|
4516
4516
|
color: ${e=>e.theme.colors.hero};
|
|
4517
|
-
`,
|
|
4517
|
+
`,jv=o.div`
|
|
4518
4518
|
display: flex;
|
|
4519
4519
|
color: ${e=>e.theme.colors.hero};
|
|
4520
4520
|
justify-content: flex-end;
|
|
4521
|
-
`,
|
|
4521
|
+
`,Rv=o(e.SvgArrowRight)`
|
|
4522
4522
|
width: ${e.Space.sp4};
|
|
4523
4523
|
height: ${e.Space.sp4};
|
|
4524
|
-
`,
|
|
4524
|
+
`,wv=t.forwardRef(({highlight:t,auditSummaryData:o,isAuditScoreLoadingCompleted:n,onClickAuditScore:i},s)=>{const a=e.useWindowSizeContext(),l=o.auditSummary,d=!n||"In-Progress"===o.fetchState||"Not-Started"===o.fetchState,c=e.useTheme();let p;return p=l.bypassedAuditScore<=50?e.Colors.important:l.bypassedAuditScore<=75?e.Colors.alert:e.Colors.success,e.jsxRuntimeExports.jsx(pv,{ref:s,highlight:t,isAuditScoreLoading:d,onClick:()=>!d&&i(),children:e.jsxRuntimeExports.jsxs(uv,{auditPercentage:l.bypassedAuditScore,children:[e.jsxRuntimeExports.jsxs(mv,{children:[d?e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Standard",start:d}):e.jsxRuntimeExports.jsx(xv,{children:e.jsxRuntimeExports.jsx(iv,{value:l.bypassedAuditScore,text:`${Math.ceil(l.bypassedAuditScore)}%`,strokeWidth:10,styles:sv({rotation:.5,strokeLinecap:"butt",pathColor:p,textColor:c.colors.primary,trailColor:c.colors.grey3,textSize:e.Space.sp4})})}),e.jsxRuntimeExports.jsx(hv,{children:e.jsxRuntimeExports.jsxs(gv,{children:[e.jsxRuntimeExports.jsxs(yv,{children:[e.jsxRuntimeExports.jsx(Sv,{children:d?lv.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",r.dateNow().subtract(1,"month").format(cv.MMMMYYYYFormat)):dv.headers.auditScore}),d?null:e.jsxRuntimeExports.jsx(Cv,{children:l.fixesRequired>0?`${dv.strings.openingBrace}${l.fixesRequired} ${l.fixesRequired>1?dv.texts.issues:dv.texts.issue}${dv.strings.closingBrace}`:dv.strings.empty})]}),e.jsxRuntimeExports.jsx(fv,{children:e.jsxRuntimeExports.jsx(bv,{children:d?dv.texts.thisProcessMayTake23Min:lv.monthEndReport.auditScoreSectionSubtitle})})]})})]}),d?null:e.jsxRuntimeExports.jsx(jv,{windowSize:a,children:e.jsxRuntimeExports.jsx(Rv,{width:e.Space.sp4,height:e.Space.sp4})})]})})});wv.displayName="MonthEndReportAuditSummarySection";const Ev=[...r.SUPPORTED_ATTACHMENT_FILE_TYPES],vv=o.div`
|
|
4525
4525
|
width: ${e.FORM_MINIMUM_WIDTH}px;
|
|
4526
4526
|
margin: ${e.Space.sp4} ${e.Space.sp0};
|
|
4527
|
-
`,$
|
|
4527
|
+
`,$v=o.div`
|
|
4528
4528
|
width: ${e=>`${e.availableWidth}px`};
|
|
4529
4529
|
min-width: auto;
|
|
4530
4530
|
position: relative;
|
|
4531
4531
|
height: fit-content;
|
|
4532
4532
|
min-height: ${e.Space.sp12};
|
|
4533
|
-
`,
|
|
4533
|
+
`,kv=o.div`
|
|
4534
4534
|
flex-grow: 1;
|
|
4535
4535
|
overflow: auto;
|
|
4536
4536
|
min-height: 2em;
|
|
@@ -4546,26 +4546,26 @@
|
|
|
4546
4546
|
.attachFileSeparator {
|
|
4547
4547
|
user-select: none;
|
|
4548
4548
|
}
|
|
4549
|
-
`,
|
|
4549
|
+
`,Tv=o.div`
|
|
4550
4550
|
display: flex;
|
|
4551
4551
|
column-gap: ${e.Space.sp2};
|
|
4552
4552
|
align-items: flex-end;
|
|
4553
4553
|
margin-top: ${e.Space.sp2};
|
|
4554
4554
|
margin-bottom: ${e.Space.sp3};
|
|
4555
|
-
`,
|
|
4555
|
+
`,Iv=o.div`
|
|
4556
4556
|
position: relative;
|
|
4557
|
-
`,
|
|
4557
|
+
`,Pv=o.div`
|
|
4558
4558
|
display: flex;
|
|
4559
4559
|
align-items: center;
|
|
4560
4560
|
justify-content: flex-end;
|
|
4561
4561
|
column-gap: ${e.Space.sp3};
|
|
4562
4562
|
margin-bottom: ${e.Space.sp2};
|
|
4563
|
-
`,
|
|
4563
|
+
`,Dv=o(e.SmallRegular)`
|
|
4564
4564
|
color: ${e=>e.theme.colors.grey1};
|
|
4565
4565
|
text-align: right;
|
|
4566
|
-
`,
|
|
4566
|
+
`,Av=o(e.StandardRegular)`
|
|
4567
4567
|
position: relative;
|
|
4568
|
-
`,
|
|
4568
|
+
`,Lv=o.div`
|
|
4569
4569
|
.lexicalEditor__nestedListItem {
|
|
4570
4570
|
list-style-type: none;
|
|
4571
4571
|
}
|
|
@@ -4580,13 +4580,13 @@
|
|
|
4580
4580
|
padding: ${e.Space.sp5};
|
|
4581
4581
|
color: ${e=>e.theme.colors.champion};
|
|
4582
4582
|
position: relative;
|
|
4583
|
-
`,
|
|
4583
|
+
`,Ov=o.div`
|
|
4584
4584
|
user-select: text;
|
|
4585
|
-
`,
|
|
4585
|
+
`,Mv=o.div`
|
|
4586
4586
|
position: absolute;
|
|
4587
4587
|
top: ${e.Space.sp4}; // Attachment icon position from the top
|
|
4588
4588
|
right: -${e.Space.sp3}; // To show attachment icon on the edge
|
|
4589
|
-
`,
|
|
4589
|
+
`,Nv=o.div`
|
|
4590
4590
|
margin-top: ${e.Space.sp2};
|
|
4591
4591
|
display: flex;
|
|
4592
4592
|
flex-direction: column;
|
|
@@ -4597,31 +4597,31 @@
|
|
|
4597
4597
|
.toolbar {
|
|
4598
4598
|
user-select: none;
|
|
4599
4599
|
}
|
|
4600
|
-
`,
|
|
4600
|
+
`,zv=o(e.SmallRegular)`
|
|
4601
4601
|
color: ${e=>e.theme.colors.grey1};
|
|
4602
4602
|
user-select: none;
|
|
4603
|
-
`,
|
|
4603
|
+
`,Fv=o(e.StandardBold)`
|
|
4604
4604
|
color: ${e=>e.theme.colors.champion};
|
|
4605
|
-
`,
|
|
4605
|
+
`,Vv=o.div`
|
|
4606
4606
|
flex-direction: column;
|
|
4607
4607
|
row-gap: ${e.Space.sp3};
|
|
4608
4608
|
display: flex;
|
|
4609
|
-
`,
|
|
4609
|
+
`,Bv=s.keyframes`
|
|
4610
4610
|
0% {
|
|
4611
4611
|
transform: translateX(100%);
|
|
4612
4612
|
}
|
|
4613
4613
|
100% {
|
|
4614
4614
|
transform: translateX(0)
|
|
4615
4615
|
}
|
|
4616
|
-
`,
|
|
4616
|
+
`,_v=s.keyframes`
|
|
4617
4617
|
0% {
|
|
4618
4618
|
transform: translateX(0)
|
|
4619
4619
|
}
|
|
4620
4620
|
100% {
|
|
4621
4621
|
transform: translateX(100%)
|
|
4622
4622
|
}
|
|
4623
|
-
`,
|
|
4624
|
-
animation: ${e=>e.allThreadsSectionOpen?
|
|
4623
|
+
`,Hv=o.div`
|
|
4624
|
+
animation: ${e=>e.allThreadsSectionOpen?Bv:_v}
|
|
4625
4625
|
0.5s forwards;
|
|
4626
4626
|
width: calc(35% - ${e.Space.sp4});
|
|
4627
4627
|
height: 100vh;
|
|
@@ -4631,7 +4631,7 @@
|
|
|
4631
4631
|
z-index: ${e.sp[2]};
|
|
4632
4632
|
min-width: ${e.COMMENTS_SECTION_MINIMUM_WIDTH}px;
|
|
4633
4633
|
max-width: ${e.COMMENTS_DRAWER_MAXIMUM_WIDTH}px;
|
|
4634
|
-
`,WE="monthEndReportFormSection",UE="monthEndReportPage",{common:GE,cockpit:qE,dateFormat:KE}=e.appLocale.getLocalizedStrings();function YE({companyId:o,enableZeniGPTFeature:n,enableSendingMonthEndEmail:i,monthEndReportView:s,previewMode:a,customerRequestData:l,allThreadsSectionOpen:d,filterMetaData:c,newThreadMetadata:p,isAuditScoreLoadingCompleted:u,regenerationCount:m,onAgentInsightSaveStateChange:x,improveUsingZeniGPTClick:h,onRemoveFileAttachment:g,onUpdateFileAttachment:y,onCloseAllThreadsSection:S,previewMonthEndReport:C,saveMonthEndReport:f,onEditClick:b,onOpenFileAttachmentSnackBar:j,onClickAuditScore:R,onClickCustomerRequest:w,sendMonthEndReport:v}){const E=e.useTheme(),[$,k]=t.useState(),[T,I]=t.useState(!1),{agentInsightEdits:P,agentInsightEditsRef:D,hasUnpersistedAgentEdits:A,onAgentInsightEdit:L,saveState:O}=e.useAgentInsightEdits({saveStatus:s.saveMonthEndReportStatus,save:()=>ke(),regenerationCount:m,onStateChange:x}),[M,N]=t.useState(0),[z,F]=t.useState(0),V=t.useRef(),B=t.useRef(null),_=t.useRef(null),H=t.useRef(null),{html:W,subject:U,improveUsingZeniGPTStatus:G}=s,[q,K]=t.useState(),[Y,Z]=t.useState(!1),[X,Q]=t.useState(!1),[J,ee]=t.useState(!1),[te,oe]=t.useState(!1),ne=t.useRef(null),re=t.useRef(null),ie=e.useDelayUnmount(d,250),se="Not-Started"===s.fetchState||"In-Progress"===s.fetchState||"Not-Started"===s.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===s.companyMonthEndReportTemplatesData.fetchState,{threadsRefs:ae,sortedThreads:le,threadsPositions:de,observer:ce,unresolvedThreadsMap:pe,handleRemoveFloatingThread:ue}=e.useFloatingThreads(c,ne,!a,se),[me,xe]=t.useState(0),he=t.useCallback(()=>{const e=ae.current?.[ae.current?.length-1];xe(window.scrollY+(e?.getBoundingClientRect()?.bottom??0))},[ae]),ge=t.useCallback(()=>{d?F(Math.min((window.innerWidth-e.FORM_MINIMUM_WIDTH)/2,window.innerWidth-e.FORM_MINIMUM_WIDTH-e.COMMENTS_DRAWER_MAXIMUM_WIDTH-e.sp[4])):N(Math.min((window.innerWidth-e.FORM_MINIMUM_WIDTH)/2,window.innerWidth-e.FORM_MINIMUM_WIDTH-e.COMMENTS_SECTION_MINIMUM_WIDTH))},[d]);t.useEffect(()=>{ge()},[d,ge]),t.useEffect(()=>(window.addEventListener("resize",ge),()=>{window.removeEventListener("resize",ge)}),[ge]),t.useEffect(()=>(window.addEventListener("scroll",he),()=>window.removeEventListener("scroll",he)),[he]);const{openThread:ye,addThread:Se,setOpenThread:Ce}=t.useContext(e.ThreadsContext),fe=e.useHandleSelection(e.MONTH_END_REPORT_CANVAS,!1,!a),be=ne.current?.getBoundingClientRect(),je=null!=fe&&fe.coords&&be?{left:fe.coords.left-be.left,top:fe.coords.top-be.top}:void 0,Re=t.useCallback(()=>{const t=window.getSelection()?.getRangeAt(0),n=e.getSelectionData();if(!t||null==n)return;const r={...p,...n,startPath:n.startPath.join(),endPath:n.endPath.join()},i=`${e.nanoid()}${e.NEW_THREAD_SUFFIX}`;Se(i,{type:"thread",visibility:"public",id:i,roomId:`cockpit_${o}`,createdAt:new Date,updatedAt:new Date,comments:[],metadata:r,resolved:!1}),Ce(i)},[Se,o,p,Ce]);t.useEffect(()=>{null!=ye&&d&&S()},[d,ye,S]);const we="In-Progress"===G.fetchState,ve=e.useForm({mode:"all",defaultValues:ZE(s),values:ZE(s)}),Ee=ve.handleSubmit(t=>{const{recipientEmailList:o,subject:n}=t[WE],r=s.auditSummaryData.auditSummary.bypassedAuditScore,l=s.auditSummaryData.isControllerOrReviewer;if(!A)if(!0===a)r>=75?v?.(q?.id):r<75&&(l||i)&&oe(!0);else if(r>=75||r<75&&(l||i)){const t=$?.replace(e.EMPTY_HTML_CHECKER,GE.strings.empty);null!=o&&null!=n&&C(o,n,q?.id,null!=t&&t.length>0?$:void 0,D.current)}else $e()}),$e=()=>{H.current&&(H.current.scrollIntoView({behavior:"smooth"}),ee(!0),setTimeout(()=>{ee(!1)},2e3))},ke=()=>{const e=ve.getValues(),{recipientEmailList:t,subject:o}=e[WE];f(t??s.recipientEmailList??[],o??GE.strings.empty,q?.id,$,D.current)};t.useEffect(()=>{k(s.zeniRequestsHtml)},[s.zeniRequestsHtml]),t.useEffect(()=>{V.current=q},[q]),t.useEffect(()=>{K(r.mapAttachmentFileToAttachmentFilePayload(s.attachmentFile)),Z(!1)},[s.attachmentFile]),t.useEffect(()=>{X&&j()},[X,j]);const Te=r.dateNow().subtract(1,"month").format(KE.visual.MMMMFormat),Ie=null!=W?W.split(e.MONTH_END_EDITOR_PLACEHOLDER):[],Pe=qE.monthEndReport.agentInsights,De=s.templateData,Ae=!a&&e.hasAgentInsights(De),Le=s.concatenatedHtml,Oe={onOkClick:()=>{v?.(q?.id),oe(!1),ve.reset()},onCancelClick:()=>{null==b?oe(!1):b(),oe(!1)}};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(kE,{ref:re,style:me>0?{height:me}:void 0,children:[e.jsxRuntimeExports.jsx($E,{availableWidth:d?z:M}),e.jsxRuntimeExports.jsxs(EE,{children:[e.jsxRuntimeExports.jsx(e.FormProvider,{...ve,children:e.jsxRuntimeExports.jsx("form",{id:XE(UE),onSubmit:Ee,children:e.jsxRuntimeExports.jsxs(VE,{children:[e.jsxRuntimeExports.jsx(e.MonthEndReportSection,{sectionId:WE,previewMode:a,subject:U}),a?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(wE,{ref:H,highlight:J,onClickAuditScore:R,auditSummaryData:s.auditSummaryData,isAuditScoreLoadingCompleted:u}),e.jsxRuntimeExports.jsx(e.MonthEndReportCustomerRequestSection,{totalItems:(s.zeniRequestsData??[]).length+e.getTemplatesFromTemplatedData(s.companyMonthEndReportTemplatesData).length,onClickCustomerRequest:w})]}),e.jsxRuntimeExports.jsxs(LE,{id:e.MONTH_END_REPORT_CANVAS,ref:ne,children:[e.jsxRuntimeExports.jsxs(OE,{className:"monthEndReportCanvasWrapper",children:[null!=q||X?e.jsxRuntimeExports.jsx(ME,{onClick:()=>{_.current&&_.current.scrollIntoView({behavior:"smooth"})},children:e.jsxRuntimeExports.jsx(e.CircleWithAttachmentSuccessIcon,{fileSizeError:X,setFileSizeError:Q,loading:!1,showAnimation:!a&&Y})}):null,a?e.jsxRuntimeExports.jsx(AE,{dangerouslySetInnerHTML:{__html:e.getHTMLWithCommentingSections(Le)}}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[Ae?e.jsxRuntimeExports.jsxs(PE,{children:[e.jsxRuntimeExports.jsx(DE,{role:"status",children:"failed"===O?Pe.saveFailed:"saving"===O?Pe.saving:null}),e.jsxRuntimeExports.jsx(e.Button,{type:"button",size:"small",dataTestId:"agent_insights_edit_toggle",label:T?Pe.doneButtonLabel:Pe.editButtonLabel,onClick:()=>I(!T)})]}):null,e.jsxRuntimeExports.jsxs(IE,{id:e.MONTH_END_EMAIL_HEADER_SECTION,children:[T&&null!=De?e.jsxRuntimeExports.jsx(e.AgentInsightsEditor,{edits:P,resyncToken:m,templateData:De,onEdit:L}):e.jsxRuntimeExports.jsx(e.StandardRegular,{dangerouslySetInnerHTML:{__html:null!=Ie[0]?Ie[0]+"</body></html>":GE.strings.empty}}),e.jsxRuntimeExports.jsxs(TE,{children:[e.jsxRuntimeExports.jsx(FE,{children:qE.monthEndReport.editorTitle}),e.jsxRuntimeExports.jsx(zE,{children:qE.monthEndReport.editorNote})]})]}),e.jsxRuntimeExports.jsx(NE,{id:e.MONTH_END_EMAIL_EDITOR_SECTION,children:e.jsxRuntimeExports.jsx(e.Editor,{handleFileInputClick:()=>{null!=B.current&&B.current.click()},fileAttached:null!=q,enableZeniGPTFeature:n,isZeniGPTResponseLoading:we,initialHtmlString:s.zeniRequestsHtml,improveUsingZeniGPTClick:h,setZeniRequestsHtml:k,customerRequestData:l})}),T?null:e.jsxRuntimeExports.jsx(AE,{id:e.MONTH_END_EMAIL_BODY_SECTION,dangerouslySetInnerHTML:{__html:null!=Ie[1]?"<html><body>"+Ie[1]:GE.strings.empty}})]}),null!=q?e.jsxRuntimeExports.jsx(e.FileAttachment,{ref:_,fileName:q.name,fileSize:e.base64FileSize(q.data),onRemove:()=>{void 0!==q&&null!=q&&(g([q.id]),K(void 0),Z(!1))},isRemovable:!a}):null]}),je?e.jsxRuntimeExports.jsx(e.AddThreadFloating,{style:{zIndex:15},coords:je,alignment:fe.alignment,onClick:Re}):null,e.jsxRuntimeExports.jsx(e.TextHighlightSection,{canvasContainerRef:ne,sortedThreads:le,editorMode:!a})]})]})})}),e.jsxRuntimeExports.jsx(e.FileInputElement,{name:q?.name??GE.strings.empty,fileRef:B,sizeLimit:716800,acceptableTypes:vE,onFileChange:async e=>{(e=>{const t=e.target.files?e.target.files[0]:null;if(t)if(!r.toSupportedAttachmentFileType(t.type)||X)console.warn("Please select a valid file.");else{const e=new FileReader;e.onload=function(e){const n=e.target?.result;if("string"==typeof n){const e={data:n.split(",")[1],name:t.name,id:r.getAttachmentFileIdByFileName(o,t.name)};K(e),Z(!0),y([e])}},e.readAsDataURL(t)}})(e)},onFileSizeError:e=>Q(e),multiple:!1})]}),ie?e.jsxRuntimeExports.jsx(HE,{allThreadsSectionOpen:d,children:e.jsxRuntimeExports.jsx(e.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${E.colors.grey3}`,boxShadow:`${e.Space.sp0} 1px 2px ${e.Space.sp0} ${e.Colors.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${e.Space.sp5} - ${e.Space.sp5})`,backgroundColor:E.colors.background},threadsContainerStyle:{paddingBottom:a?"160px":e.Space.sp12},collapsibleThreadStyle:{width:`calc(100% - ${e.Space.sp4})`},allowComposer:!1,drawerTitle:GE.texts.comments,filter:c,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(e,t)=>{Ce(t);const o=le.findIndex(e=>e[0]===t);S(),ae.current?.[o]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>S()})}):e.jsxRuntimeExports.jsx(e.FloatingThreads,{observer:ce,canvasContainerRef:ne,sortedThreads:le,threadsPositions:de,threadsRefs:ae,unresolvedThreadsMap:pe,editorMode:!a,style:{minWidth:`${e.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${ne.current?.offsetTop}px`},handleRemoveFloatingThread:ue})]}),te?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{children:qE.monthEndReport.sendMonthInsightsTitle.replace("__month__",Te)}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:qE.monthEndReport.sendMonthInsightsDescription.replace("__month__",Te)}),primaryButtonText:qE.monthEndReport.sendAnyway,primaryButtonWidth:124,secondaryButtonWidth:124,proceedButtonVariant:"destructive",secondaryButtonText:GE.edit,action:Oe,containerStyle:{minWidth:356}}):null,e.jsxRuntimeExports.jsx(e.Footer,{style:{zIndex:10},leftSideComponent:null!=s.lastDraftSavedDate&&!1===a?e.jsxRuntimeExports.jsx(e.UserWithTimestamp,{time:s.lastDraftSavedDate,user:s.reportLastSavedByUser,timeStampLabel:qE.monthEndReport.timeStampLabel}):null,formId:XE(UE),helperText:!0===a?qE.monthEndReport.reportSentDateInfo:void 0,cancelBtn:{isDisabled:!u||we,label:!0===a?GE.edit:GE.texts.saveChanges,onClick:!0===a?b:ke,style:{width:"225px"},size:"medium",isLoading:"In-Progress"===s.saveMonthEndReportStatus.fetchState,reverseSpinnerColor:!1},primaryBtn:{isDisabled:!u||we||!a&&A,isLoading:!0===a?"In-Progress"===s.sendMonthEndReportStatus.fetchState:"In-Progress"===s.previewMonthEndReportStatus.fetchState,style:{width:!0===a?"unset":"225px"},label:!0===a?qE.monthEndReport.sendEmailButtonLabel.replace("__month__",Te):GE.texts.preview,size:"medium"}})]})}const ZE=e=>({[WE]:{recipientEmailList:e.recipientEmailList,subject:e.subject??GE.strings.empty}}),XE=e=>`${e}_form`,{refresh:QE}=e.appLocale.getLocalizedStrings().common.texts,JE=o(e.SmallRegular)`
|
|
4634
|
+
`,Wv="monthEndReportFormSection",Uv="monthEndReportPage",{common:Gv,cockpit:qv,dateFormat:Kv}=e.appLocale.getLocalizedStrings();function Yv({companyId:o,enableZeniGPTFeature:n,enableSendingMonthEndEmail:i,monthEndReportView:s,previewMode:a,customerRequestData:l,allThreadsSectionOpen:d,filterMetaData:c,newThreadMetadata:p,isAuditScoreLoadingCompleted:u,regenerationCount:m,onAgentInsightSaveStateChange:x,improveUsingZeniGPTClick:h,onRemoveFileAttachment:g,onUpdateFileAttachment:y,onCloseAllThreadsSection:S,previewMonthEndReport:C,saveMonthEndReport:f,onEditClick:b,onOpenFileAttachmentSnackBar:j,onClickAuditScore:R,onClickCustomerRequest:w,sendMonthEndReport:E}){const v=e.useTheme(),[$,k]=t.useState(),[T,I]=t.useState(!1),{agentInsightEdits:P,agentInsightEditsRef:D,hasUnpersistedAgentEdits:A,onAgentInsightEdit:L,saveState:O}=e.useAgentInsightEdits({saveStatus:s.saveMonthEndReportStatus,save:()=>ke(),regenerationCount:m,onStateChange:x}),[M,N]=t.useState(0),[z,F]=t.useState(0),V=t.useRef(),B=t.useRef(null),_=t.useRef(null),H=t.useRef(null),{html:W,subject:U,improveUsingZeniGPTStatus:G}=s,[q,K]=t.useState(),[Y,Z]=t.useState(!1),[X,Q]=t.useState(!1),[J,ee]=t.useState(!1),[te,oe]=t.useState(!1),ne=t.useRef(null),re=t.useRef(null),ie=e.useDelayUnmount(d,250),se="Not-Started"===s.fetchState||"In-Progress"===s.fetchState||"Not-Started"===s.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===s.companyMonthEndReportTemplatesData.fetchState,{threadsRefs:ae,sortedThreads:le,threadsPositions:de,observer:ce,unresolvedThreadsMap:pe,handleRemoveFloatingThread:ue}=e.useFloatingThreads(c,ne,!a,se),[me,xe]=t.useState(0),he=t.useCallback(()=>{const e=ae.current?.[ae.current?.length-1];xe(window.scrollY+(e?.getBoundingClientRect()?.bottom??0))},[ae]),ge=t.useCallback(()=>{d?F(Math.min((window.innerWidth-e.FORM_MINIMUM_WIDTH)/2,window.innerWidth-e.FORM_MINIMUM_WIDTH-e.COMMENTS_DRAWER_MAXIMUM_WIDTH-e.sp[4])):N(Math.min((window.innerWidth-e.FORM_MINIMUM_WIDTH)/2,window.innerWidth-e.FORM_MINIMUM_WIDTH-e.COMMENTS_SECTION_MINIMUM_WIDTH))},[d]);t.useEffect(()=>{ge()},[d,ge]),t.useEffect(()=>(window.addEventListener("resize",ge),()=>{window.removeEventListener("resize",ge)}),[ge]),t.useEffect(()=>(window.addEventListener("scroll",he),()=>window.removeEventListener("scroll",he)),[he]);const{openThread:ye,addThread:Se,setOpenThread:Ce}=t.useContext(e.ThreadsContext),fe=e.useHandleSelection(e.MONTH_END_REPORT_CANVAS,!1,!a),be=ne.current?.getBoundingClientRect(),je=null!=fe&&fe.coords&&be?{left:fe.coords.left-be.left,top:fe.coords.top-be.top}:void 0,Re=t.useCallback(()=>{const t=window.getSelection()?.getRangeAt(0),n=e.getSelectionData();if(!t||null==n)return;const r={...p,...n,startPath:n.startPath.join(),endPath:n.endPath.join()},i=`${e.nanoid()}${e.NEW_THREAD_SUFFIX}`;Se(i,{type:"thread",visibility:"public",id:i,roomId:`cockpit_${o}`,createdAt:new Date,updatedAt:new Date,comments:[],metadata:r,resolved:!1}),Ce(i)},[Se,o,p,Ce]);t.useEffect(()=>{null!=ye&&d&&S()},[d,ye,S]);const we="In-Progress"===G.fetchState,Ee=e.useForm({mode:"all",defaultValues:Zv(s),values:Zv(s)}),ve=Ee.handleSubmit(t=>{const{recipientEmailList:o,subject:n}=t[Wv],r=s.auditSummaryData.auditSummary.bypassedAuditScore,l=s.auditSummaryData.isControllerOrReviewer;if(!A)if(!0===a)r>=75?E?.(q?.id):r<75&&(l||i)&&oe(!0);else if(r>=75||r<75&&(l||i)){const t=$?.replace(e.EMPTY_HTML_CHECKER,Gv.strings.empty);null!=o&&null!=n&&C(o,n,q?.id,null!=t&&t.length>0?$:void 0,D.current)}else $e()}),$e=()=>{H.current&&(H.current.scrollIntoView({behavior:"smooth"}),ee(!0),setTimeout(()=>{ee(!1)},2e3))},ke=()=>{const e=Ee.getValues(),{recipientEmailList:t,subject:o}=e[Wv];f(t??s.recipientEmailList??[],o??Gv.strings.empty,q?.id,$,D.current)};t.useEffect(()=>{k(s.zeniRequestsHtml)},[s.zeniRequestsHtml]),t.useEffect(()=>{V.current=q},[q]),t.useEffect(()=>{K(r.mapAttachmentFileToAttachmentFilePayload(s.attachmentFile)),Z(!1)},[s.attachmentFile]),t.useEffect(()=>{X&&j()},[X,j]);const Te=r.dateNow().subtract(1,"month").format(Kv.visual.MMMMFormat),Ie=null!=W?W.split(e.MONTH_END_EDITOR_PLACEHOLDER):[],Pe=qv.monthEndReport.agentInsights,De=s.templateData,Ae=!a&&e.hasAgentInsights(De),Le=s.concatenatedHtml,Oe={onOkClick:()=>{E?.(q?.id),oe(!1),Ee.reset()},onCancelClick:()=>{null==b?oe(!1):b(),oe(!1)}};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(kv,{ref:re,style:me>0?{height:me}:void 0,children:[e.jsxRuntimeExports.jsx($v,{availableWidth:d?z:M}),e.jsxRuntimeExports.jsxs(vv,{children:[e.jsxRuntimeExports.jsx(e.FormProvider,{...Ee,children:e.jsxRuntimeExports.jsx("form",{id:Xv(Uv),onSubmit:ve,children:e.jsxRuntimeExports.jsxs(Vv,{children:[e.jsxRuntimeExports.jsx(e.MonthEndReportSection,{sectionId:Wv,previewMode:a,subject:U}),a?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(wv,{ref:H,highlight:J,onClickAuditScore:R,auditSummaryData:s.auditSummaryData,isAuditScoreLoadingCompleted:u}),e.jsxRuntimeExports.jsx(e.MonthEndReportCustomerRequestSection,{totalItems:(s.zeniRequestsData??[]).length+e.getTemplatesFromTemplatedData(s.companyMonthEndReportTemplatesData).length,onClickCustomerRequest:w})]}),e.jsxRuntimeExports.jsxs(Lv,{id:e.MONTH_END_REPORT_CANVAS,ref:ne,children:[e.jsxRuntimeExports.jsxs(Ov,{className:"monthEndReportCanvasWrapper",children:[null!=q||X?e.jsxRuntimeExports.jsx(Mv,{onClick:()=>{_.current&&_.current.scrollIntoView({behavior:"smooth"})},children:e.jsxRuntimeExports.jsx(e.CircleWithAttachmentSuccessIcon,{fileSizeError:X,setFileSizeError:Q,loading:!1,showAnimation:!a&&Y})}):null,a?e.jsxRuntimeExports.jsx(Av,{dangerouslySetInnerHTML:{__html:e.getHTMLWithCommentingSections(Le)}}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[Ae?e.jsxRuntimeExports.jsxs(Pv,{children:[e.jsxRuntimeExports.jsx(Dv,{role:"status",children:"failed"===O?Pe.saveFailed:"saving"===O?Pe.saving:null}),e.jsxRuntimeExports.jsx(e.Button,{type:"button",size:"small",dataTestId:"agent_insights_edit_toggle",label:T?Pe.doneButtonLabel:Pe.editButtonLabel,onClick:()=>I(!T)})]}):null,e.jsxRuntimeExports.jsxs(Iv,{id:e.MONTH_END_EMAIL_HEADER_SECTION,children:[T&&null!=De?e.jsxRuntimeExports.jsx(e.AgentInsightsEditor,{edits:P,resyncToken:m,templateData:De,onEdit:L}):e.jsxRuntimeExports.jsx(e.StandardRegular,{dangerouslySetInnerHTML:{__html:null!=Ie[0]?Ie[0]+"</body></html>":Gv.strings.empty}}),e.jsxRuntimeExports.jsxs(Tv,{children:[e.jsxRuntimeExports.jsx(Fv,{children:qv.monthEndReport.editorTitle}),e.jsxRuntimeExports.jsx(zv,{children:qv.monthEndReport.editorNote})]})]}),e.jsxRuntimeExports.jsx(Nv,{id:e.MONTH_END_EMAIL_EDITOR_SECTION,children:e.jsxRuntimeExports.jsx(e.Editor,{handleFileInputClick:()=>{null!=B.current&&B.current.click()},fileAttached:null!=q,enableZeniGPTFeature:n,isZeniGPTResponseLoading:we,initialHtmlString:s.zeniRequestsHtml,improveUsingZeniGPTClick:h,setZeniRequestsHtml:k,customerRequestData:l})}),T?null:e.jsxRuntimeExports.jsx(Av,{id:e.MONTH_END_EMAIL_BODY_SECTION,dangerouslySetInnerHTML:{__html:null!=Ie[1]?"<html><body>"+Ie[1]:Gv.strings.empty}})]}),null!=q?e.jsxRuntimeExports.jsx(e.FileAttachment,{ref:_,fileName:q.name,fileSize:e.base64FileSize(q.data),onRemove:()=>{void 0!==q&&null!=q&&(g([q.id]),K(void 0),Z(!1))},isRemovable:!a}):null]}),je?e.jsxRuntimeExports.jsx(e.AddThreadFloating,{style:{zIndex:15},coords:je,alignment:fe.alignment,onClick:Re}):null,e.jsxRuntimeExports.jsx(e.TextHighlightSection,{canvasContainerRef:ne,sortedThreads:le,editorMode:!a})]})]})})}),e.jsxRuntimeExports.jsx(e.FileInputElement,{name:q?.name??Gv.strings.empty,fileRef:B,sizeLimit:716800,acceptableTypes:Ev,onFileChange:async e=>{(e=>{const t=e.target.files?e.target.files[0]:null;if(t)if(!r.toSupportedAttachmentFileType(t.type)||X)console.warn("Please select a valid file.");else{const e=new FileReader;e.onload=function(e){const n=e.target?.result;if("string"==typeof n){const e={data:n.split(",")[1],name:t.name,id:r.getAttachmentFileIdByFileName(o,t.name)};K(e),Z(!0),y([e])}},e.readAsDataURL(t)}})(e)},onFileSizeError:e=>Q(e),multiple:!1})]}),ie?e.jsxRuntimeExports.jsx(Hv,{allThreadsSectionOpen:d,children:e.jsxRuntimeExports.jsx(e.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${v.colors.grey3}`,boxShadow:`${e.Space.sp0} 1px 2px ${e.Space.sp0} ${e.Colors.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${e.Space.sp5} - ${e.Space.sp5})`,backgroundColor:v.colors.background},threadsContainerStyle:{paddingBottom:a?"160px":e.Space.sp12},collapsibleThreadStyle:{width:`calc(100% - ${e.Space.sp4})`},allowComposer:!1,drawerTitle:Gv.texts.comments,filter:c,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(e,t)=>{Ce(t);const o=le.findIndex(e=>e[0]===t);S(),ae.current?.[o]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>S()})}):e.jsxRuntimeExports.jsx(e.FloatingThreads,{observer:ce,canvasContainerRef:ne,sortedThreads:le,threadsPositions:de,threadsRefs:ae,unresolvedThreadsMap:pe,editorMode:!a,style:{minWidth:`${e.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${ne.current?.offsetTop}px`},handleRemoveFloatingThread:ue})]}),te?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{children:qv.monthEndReport.sendMonthInsightsTitle.replace("__month__",Te)}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:qv.monthEndReport.sendMonthInsightsDescription.replace("__month__",Te)}),primaryButtonText:qv.monthEndReport.sendAnyway,primaryButtonWidth:124,secondaryButtonWidth:124,proceedButtonVariant:"destructive",secondaryButtonText:Gv.edit,action:Oe,containerStyle:{minWidth:356}}):null,e.jsxRuntimeExports.jsx(e.Footer,{style:{zIndex:10},leftSideComponent:null!=s.lastDraftSavedDate&&!1===a?e.jsxRuntimeExports.jsx(e.UserWithTimestamp,{time:s.lastDraftSavedDate,user:s.reportLastSavedByUser,timeStampLabel:qv.monthEndReport.timeStampLabel}):null,formId:Xv(Uv),helperText:!0===a?qv.monthEndReport.reportSentDateInfo:void 0,cancelBtn:{isDisabled:!u||we,label:!0===a?Gv.edit:Gv.texts.saveChanges,onClick:!0===a?b:ke,style:{width:"225px"},size:"medium",isLoading:"In-Progress"===s.saveMonthEndReportStatus.fetchState,reverseSpinnerColor:!1},primaryBtn:{isDisabled:!u||we||!a&&A,isLoading:!0===a?"In-Progress"===s.sendMonthEndReportStatus.fetchState:"In-Progress"===s.previewMonthEndReportStatus.fetchState,style:{width:!0===a?"unset":"225px"},label:!0===a?qv.monthEndReport.sendEmailButtonLabel.replace("__month__",Te):Gv.texts.preview,size:"medium"}})]})}const Zv=e=>({[Wv]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Gv.strings.empty}}),Xv=e=>`${e}_form`,{refresh:Qv}=e.appLocale.getLocalizedStrings().common.texts,Jv=o(e.SmallRegular)`
|
|
4635
4635
|
color: ${e=>e.theme.colors.hero};
|
|
4636
4636
|
display: flex;
|
|
4637
4637
|
align-items: center;
|
|
@@ -4650,7 +4650,7 @@
|
|
|
4650
4650
|
cursor: pointer;
|
|
4651
4651
|
width: ${e.Space.sp3};
|
|
4652
4652
|
height: ${e.Space.sp3};
|
|
4653
|
-
`;function t$({onClick:t}){return e.jsxRuntimeExports.jsxs(
|
|
4653
|
+
`;function t$({onClick:t}){return e.jsxRuntimeExports.jsxs(Jv,{onClick:()=>{null!=t&&t()},children:[e.jsxRuntimeExports.jsx(e$,{}),Qv]})}const o$=o.div`
|
|
4654
4654
|
display: flex;
|
|
4655
4655
|
justify-content: space-between;
|
|
4656
4656
|
padding: ${e.Space.sp3} ${e.Space.sp8};
|
|
@@ -4729,7 +4729,7 @@
|
|
|
4729
4729
|
`,h$=o(e.SvgReload)`
|
|
4730
4730
|
width: ${e.Space.sp10};
|
|
4731
4731
|
height: ${e.Space.sp10};
|
|
4732
|
-
`,{dateFormat:{visual:{MMSlashYYYYFormat:g$}},cockpit:{monthEndReport:{insightsNotAvailable:y$,agentInsights:{regenerateTitle:S$,regenerateDescription:C$,regenerateConfirm:f$}}},common:{errorMessage:{somethingWentWrong:b$},cancel:j$}}=e.appLocale.getLocalizedStrings(),R$=({message:t,onReload:o})=>e.jsxRuntimeExports.jsxs(x$,{onClick:o,children:[e.jsxRuntimeExports.jsx(h$,{}),e.jsxRuntimeExports.jsx(m$,{children:t})]});var w$,v
|
|
4732
|
+
`,{dateFormat:{visual:{MMSlashYYYYFormat:g$}},cockpit:{monthEndReport:{insightsNotAvailable:y$,agentInsights:{regenerateTitle:S$,regenerateDescription:C$,regenerateConfirm:f$}}},common:{errorMessage:{somethingWentWrong:b$},cancel:j$}}=e.appLocale.getLocalizedStrings(),R$=({message:t,onReload:o})=>e.jsxRuntimeExports.jsxs(x$,{onClick:o,children:[e.jsxRuntimeExports.jsx(h$,{}),e.jsxRuntimeExports.jsx(m$,{children:t})]});var w$,E$,v$,$$,k$,T$,I$,P$,D$,A$,L$,O$;function M$(){if(P$)return I$;P$=1;var t=function(){if($$)return v$;$$=1;var t=e.require_baseProperty()("length");return v$=t}(),o=e.require_hasUnicode(),n=function(){if(T$)return k$;T$=1;var e="\\ud800-\\udfff",t="["+e+"]",o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^"+e+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+o+"|"+n+")?",l="[\\ufe0e\\ufe0f]?",d=l+a+"(?:\\u200d(?:"+[r,i,s].join("|")+")"+l+a+")*",c="(?:"+[r+o+"?",o,i,s,t].join("|")+")",p=RegExp(n+"(?="+n+")|"+c+d,"g");return k$=function(e){for(var t=p.lastIndex=0;p.test(e);)++t;return t}}();return I$=function(e){return o(e)?n(e):t(e)}}function N$(){if(A$)return D$;A$=1;var t=function(){if(E$)return w$;E$=1;var e=Math.floor;return w$=function(t,o){var n="";if(!t||o<1||o>9007199254740991)return n;do{o%2&&(n+=t),(o=e(o/2))&&(t+=t)}while(o);return n}}(),o=e.require_baseToString(),n=e.require_castSlice(),r=e.require_hasUnicode(),i=M$(),s=e.require_stringToArray(),a=Math.ceil;return D$=function(e,l){var d=(l=void 0===l?" ":o(l)).length;if(d<2)return d?t(l,e):l;var c=t(l,a(e/i(l)));return r(l)?n(s(c),0,e).join(""):c.slice(0,e)}}var z$=function(){if(O$)return L$;O$=1;var t=N$(),o=M$(),n=e.requireToInteger(),r=e.requireToString();return L$=function(e,i,s){e=r(e);var a=(i=n(i))?o(e):0;return i&&a<i?t(i-a,s)+e:e}}();const F$=e.getDefaultExportFromCjs(z$),V$=o.div`
|
|
4733
4733
|
display: flex;
|
|
4734
4734
|
justify-content: flex-end;
|
|
4735
4735
|
align-items: center;
|
|
@@ -4852,7 +4852,7 @@
|
|
|
4852
4852
|
padding-bottom: ${e.Space.sp5};
|
|
4853
4853
|
`,ok=o(e.ExtraSmallRegular)`
|
|
4854
4854
|
color: ${e=>e.theme.colors.grey1};
|
|
4855
|
-
`,{common:{strings:nk,datePicker:rk,texts:ik,errorMessage:{somethingWentWrong:sk}},dateFormat:ak,cockpit:lk}=e.appLocale.getLocalizedStrings(),{slash:dk}=nk,{visual:{YYYYformat:ck,MMMformat:pk}}=ak,uk=({historicData:o,companyId:n,newThreadMetadata:i,containerRef:s,sortedThreads:a})=>{const{addThread:l,setOpenThread:d}=t.useContext(e.ThreadsContext),c=t.useRef(null),[p,u]=t.useState(),[m,x]=t.useState(!1),h=e.useHandleSelection(e.MONTH_END_REPORT_CANVAS,!1,!1),g=s.current?.getBoundingClientRect(),y=null!=h&&null!=h.coords&&g?{left:h.coords.left-g.left,top:h.coords.top-g.top}:void 0,S=e.useForm({mode:"all",defaultValues:mk(o),values:mk(o)});t.useEffect(()=>{u(r.mapAttachmentFileToAttachmentFilePayload(o.attachmentFile))},[o.attachmentFile]);const C=t.useCallback(()=>{const t=window.getSelection()?.getRangeAt(0),o=e.getSelectionData();if(!t||null==o)return;const r={...i,...o,startPath:o.startPath.join(),endPath:o.endPath.join()},s=`${e.nanoid()}${e.NEW_THREAD_SUFFIX}`;l(s,{type:"thread",visibility:"public",id:s,roomId:`cockpit_${n}`,createdAt:new Date,updatedAt:new Date,comments:[],metadata:r,resolved:!1}),d(s)},[l,n,i,d]);return e.jsxRuntimeExports.jsx(e.FormProvider,{...S,children:e.jsxRuntimeExports.jsx("form",{id:xk("monthEndReportHistoricDataPage"),children:e.jsxRuntimeExports.jsxs(J$,{children:[e.jsxRuntimeExports.jsx(e.MonthEndReportSection,{previewMode:!0,subject:o.subject,sectionId:
|
|
4855
|
+
`,{common:{strings:nk,datePicker:rk,texts:ik,errorMessage:{somethingWentWrong:sk}},dateFormat:ak,cockpit:lk}=e.appLocale.getLocalizedStrings(),{slash:dk}=nk,{visual:{YYYYformat:ck,MMMformat:pk}}=ak,uk=({historicData:o,companyId:n,newThreadMetadata:i,containerRef:s,sortedThreads:a})=>{const{addThread:l,setOpenThread:d}=t.useContext(e.ThreadsContext),c=t.useRef(null),[p,u]=t.useState(),[m,x]=t.useState(!1),h=e.useHandleSelection(e.MONTH_END_REPORT_CANVAS,!1,!1),g=s.current?.getBoundingClientRect(),y=null!=h&&null!=h.coords&&g?{left:h.coords.left-g.left,top:h.coords.top-g.top}:void 0,S=e.useForm({mode:"all",defaultValues:mk(o),values:mk(o)});t.useEffect(()=>{u(r.mapAttachmentFileToAttachmentFilePayload(o.attachmentFile))},[o.attachmentFile]);const C=t.useCallback(()=>{const t=window.getSelection()?.getRangeAt(0),o=e.getSelectionData();if(!t||null==o)return;const r={...i,...o,startPath:o.startPath.join(),endPath:o.endPath.join()},s=`${e.nanoid()}${e.NEW_THREAD_SUFFIX}`;l(s,{type:"thread",visibility:"public",id:s,roomId:`cockpit_${n}`,createdAt:new Date,updatedAt:new Date,comments:[],metadata:r,resolved:!1}),d(s)},[l,n,i,d]);return e.jsxRuntimeExports.jsx(e.FormProvider,{...S,children:e.jsxRuntimeExports.jsx("form",{id:xk("monthEndReportHistoricDataPage"),children:e.jsxRuntimeExports.jsxs(J$,{children:[e.jsxRuntimeExports.jsx(e.MonthEndReportSection,{previewMode:!0,subject:o.subject,sectionId:Wv}),e.jsxRuntimeExports.jsxs(B$,{id:e.MONTH_END_REPORT_CANVAS,ref:s,children:[e.jsxRuntimeExports.jsxs(_$,{className:"monthEndReportCanvasWrapper",children:[null!=p?e.jsxRuntimeExports.jsx(H$,{onClick:()=>{c.current&&c.current.scrollIntoView({behavior:"smooth"})},children:e.jsxRuntimeExports.jsx(e.CircleWithAttachmentSuccessIcon,{loading:!1,fileSizeError:m,setFileSizeError:x})}):null,e.jsxRuntimeExports.jsx(e.StandardRegular,{style:{position:"relative"},dangerouslySetInnerHTML:{__html:e.getHTMLWithCommentingSections(o.concatenatedHtml)}}),null!=p?e.jsxRuntimeExports.jsx(e.FileAttachment,{ref:c,fileName:p.name,fileSize:e.base64FileSize(p.data),isRemovable:!1}):null]}),y?e.jsxRuntimeExports.jsx(e.AddThreadFloating,{style:{zIndex:15},coords:y,alignment:h.alignment,onClick:C}):null,e.jsxRuntimeExports.jsx(e.TextHighlightSection,{canvasContainerRef:s,sortedThreads:a,editorMode:!1})]})]})})})},mk=e=>({[Wv]:{recipientEmailList:e.recipientEmailList??[],subject:e.subject??""}}),xk=e=>`${e}_form`,{cockpit:{review:{reachedZeni:hk}}}=e.appLocale.getLocalizedStrings(),gk=o.div`
|
|
4856
4856
|
justify-content: center;
|
|
4857
4857
|
align-items: center;
|
|
4858
4858
|
display: flex;
|
|
@@ -4867,7 +4867,7 @@
|
|
|
4867
4867
|
color: ${e=>e.theme.colors.hero};
|
|
4868
4868
|
`,Sk=o(e.StandardRegular)`
|
|
4869
4869
|
color: ${e=>e.theme.colors.grey1};
|
|
4870
|
-
`,Ck=()=>e.jsxRuntimeExports.jsxs(gk,{children:[e.jsxRuntimeExports.jsx(yk,{}),e.jsxRuntimeExports.jsx(Sk,{children:hk})]}),{cockpit:{review:{header:{miscategorizedTransactions:fk,uncategorizedTransactions:bk}}},common:{headers:{auditScore:jk},texts:{name:Rk,reviewVendor:wk,warnings:
|
|
4870
|
+
`,Ck=()=>e.jsxRuntimeExports.jsxs(gk,{children:[e.jsxRuntimeExports.jsx(yk,{}),e.jsxRuntimeExports.jsx(Sk,{children:hk})]}),{cockpit:{review:{header:{miscategorizedTransactions:fk,uncategorizedTransactions:bk}}},common:{headers:{auditScore:jk},texts:{name:Rk,reviewVendor:wk,warnings:Ek}}}=e.appLocale.getLocalizedStrings(),vk=[{key:"companyName",value:Rk,sortOrder:"ascending",width:new e.ResponsiveSized(400,400),isThreadAllowed:!0},{key:"auditScore",value:jk,sortOrder:"descending",width:new e.ResponsiveSized(235,235),isThreadAllowed:!0},{key:"uncategorized",value:bk,sortOrder:"ascending",width:new e.ResponsiveSized(300,300),isThreadAllowed:!0},{key:"miscategorized",value:fk,sortOrder:"ascending",width:new e.ResponsiveSized(300,300),isThreadAllowed:!0},{key:"reviewVendor",value:wk,sortOrder:"ascending",width:new e.ResponsiveSized(225,225),isThreadAllowed:!0},{key:"warnings",value:Ek,sortOrder:"descending",width:new e.ResponsiveSized(125,125),isThreadAllowed:!0}];function $k({companyNameSticky:o,isReviewVendorColumnVisible:n,sortConfig:r,onColumnSortConfigChanged:i}){const s=e.useWindowSizeContext(),[a,l]=t.useState(e.cloneDeep(n?vk:vk.filter(e=>"reviewVendor"!==e.key)));t.useEffect(()=>{const e=[...a];for(const t of e)t.key===r.sortKey&&(t.sortOrder=r.sortOrder);l(e)},[r.sortKey,r.sortOrder]);const d=(e,t)=>{let o=t;r.sortKey===e&&(o="ascending"===t?"descending":"ascending"),i(e,o??void 0)};return e.jsxRuntimeExports.jsx(Pk,{height:N,children:a.map(t=>e.jsxRuntimeExports.jsxs(Dk,{sortDataValue:r.sortKey,actualDataValue:t.key,widthSize:t.width,companyNameSticky:o&&"companyName"===t.key,windowSize:s,children:[e.jsxRuntimeExports.jsxs(Ak,{onClick:()=>d(t.key,t.sortOrder),disabled:null==t.sortOrder,children:[e.jsxRuntimeExports.jsx(e.ExtraSmallRegular,{children:t.value}),null!=t.sortOrder&&e.jsxRuntimeExports.jsx(Ik,{sortDataValue:r.sortKey,headerdata:t,children:e.jsxRuntimeExports.jsx(e.SvgArrowTailTop,{width:12,height:12})})]}),e.jsxRuntimeExports.jsx(Tk,{isVisible:r.sortKey===t.key&&"companyName"!==r.sortKey,children:e.jsxRuntimeExports.jsx(kk,{onClick:()=>d("companyName","ascending")})})]},t.key))})}vk.map(e=>e.key);const kk=o(e.SvgCloseRound)`
|
|
4871
4871
|
cursor: pointer;
|
|
4872
4872
|
width: 12px;
|
|
4873
4873
|
height: 12px;
|
|
@@ -4942,7 +4942,7 @@
|
|
|
4942
4942
|
`,Fk=o(e.SmallRegular)`
|
|
4943
4943
|
display: flex;
|
|
4944
4944
|
align-items: center;
|
|
4945
|
-
`,Vk=({auditSummary:t,onClickScore:o})=>{const n=e.useTheme(),r=t.auditScorePercentage<=50?e.Colors.important:t.auditScorePercentage<=85?e.Colors.alert:e.Colors.success;return e.jsxRuntimeExports.jsx(Ok,{onClick:o,auditPercentage:t.auditScorePercentage,children:null!=t.auditReportLastGeneratedDate?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(Mk,{children:e.jsxRuntimeExports.jsx(
|
|
4945
|
+
`,Vk=({auditSummary:t,onClickScore:o})=>{const n=e.useTheme(),r=t.auditScorePercentage<=50?e.Colors.important:t.auditScorePercentage<=85?e.Colors.alert:e.Colors.success;return e.jsxRuntimeExports.jsx(Ok,{onClick:o,auditPercentage:t.auditScorePercentage,children:null!=t.auditReportLastGeneratedDate?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(Mk,{children:e.jsxRuntimeExports.jsx(iv,{value:t.auditScorePercentage,text:`${Math.ceil(t.auditScorePercentage)}%`,strokeWidth:10,styles:sv({rotation:.5,strokeLinecap:"butt",pathColor:r,textColor:n.colors.primary,trailColor:n.colors.grey3,textSize:e.textStyles.extraLargeRegular.fontSize})})}),e.jsxRuntimeExports.jsxs(Nk,{children:[e.jsxRuntimeExports.jsx(zk,{children:`${t.fixesRequired} ${Lk.cockpit.review.pendingIssues}`}),e.jsxRuntimeExports.jsx(Fk,{children:t.auditReportLastGeneratedDate.format(Lk.dateFormat.visual.MMMDCommaYYYYformat)})]})]}):e.jsxRuntimeExports.jsx(e.Button,{label:Lk.cockpit.review.getScore,onClick:o,style:{backgroundColor:n.colors.grey5},textStyle:{...e.textStyles.smallMedium.cssObject},size:"small",variant:"outline"})})},Bk=o.div`
|
|
4946
4946
|
padding: ${e.Space.sp0} ${e.Space.sp2};
|
|
4947
4947
|
color: ${e=>e.color};
|
|
4948
4948
|
border-radius: ${e.Space.sp1};
|
|
@@ -5003,7 +5003,7 @@
|
|
|
5003
5003
|
`,lT=o.div`
|
|
5004
5004
|
display: flex;
|
|
5005
5005
|
align-items: center;
|
|
5006
|
-
`,{cockpit:{review:{selectUncategorizedAccounts:dT}},dateFormat:{visual:{MMMYYYYFormat:cT},analytics:{MMSlashDDSlashYYYYFormat:pT}}}=e.appLocale.getLocalizedStrings(),uT=({companyView:o,companyNameSticky:n,isReviewVendorColumnVisible:i,totalHeight:s,analytics:a,addThreadRequestThreadId:l,setNoteData:d,setElementRef:c,setAddThreadRequestThreadId:p,onTransactionTagClicked:u,onClickAuditScore:m,onClickWarningsCount:x,onCompanyNameClicked:h,onUncategorizedAccountsErrorClick:g,onReviewVendorTagClicked:y})=>{const S=e.useWindowSizeContext(),{name:C,companyId:f}=o,b=`cockpit_${f}`,j="audit.notes",{threads:R,isLoading:w}=e.useFilteredThreads({entityType:j,companyId:f},!1),{openThread:
|
|
5006
|
+
`,{cockpit:{review:{selectUncategorizedAccounts:dT}},dateFormat:{visual:{MMMYYYYFormat:cT},analytics:{MMSlashDDSlashYYYYFormat:pT}}}=e.appLocale.getLocalizedStrings(),uT=({companyView:o,companyNameSticky:n,isReviewVendorColumnVisible:i,totalHeight:s,analytics:a,addThreadRequestThreadId:l,setNoteData:d,setElementRef:c,setAddThreadRequestThreadId:p,onTransactionTagClicked:u,onClickAuditScore:m,onClickWarningsCount:x,onCompanyNameClicked:h,onUncategorizedAccountsErrorClick:g,onReviewVendorTagClicked:y})=>{const S=e.useWindowSizeContext(),{name:C,companyId:f}=o,b=`cockpit_${f}`,j="audit.notes",{threads:R,isLoading:w}=e.useFilteredThreads({entityType:j,companyId:f},!1),{openThread:E,threads:v,addThread:$,removeThread:k,setOpenThread:T,setRequestToOpenThread:I}=t.useContext(e.ThreadsContext),P=t.useRef(null),D=null!==E?v.get(E):null,A=!0===E?.includes(f),L=null!=E&&null==v.get(E)&&A,O=null!=l&&v.get(l)?.metadata.companyId===f,M=t.useCallback(()=>{!0===E?.includes(e.NEW_THREAD_SUFFIX)&&k(E),null!=l&&p(void 0)},[l,E,k,p]),N=t=>e.jsxRuntimeExports.jsx(e.StickyThread,{isElementThreadOpen:t.isElementThreadOpen??!1,isElementThreadPresent:t.isElementThreadPresent??!1,itemKey:t.itemKey,elementThreadId:t.elementThreadId??"",roomId:b,addThreadRequestThreadId:l,openThreadId:E,threadStyle:t.threadStyle,openThreadMetadata:D?.metadata??null,onElementClick:F,onAddThreadClick:V}),z=t.useCallback(t=>{if(t===E)T(null);else if(v.has(t))T(t);else if(t.includes(e.NEW_THREAD_SUFFIX)){const[o,n]=t.replace(e.NEW_THREAD_SUFFIX,"").split("."),i=hr(Ie(o),r.toReviewColumnKeyType(n),f,C);$(t,{type:"thread",visibility:"public",id:t,roomId:b,createdAt:new Date,updatedAt:new Date,comments:[],metadata:i,resolved:!1}),T(t)}},[f,C,E,v,$,T,b]),F=t.useCallback((t,o,n=!1)=>{const r=vk.find(e=>e.key===o);if(I(null),null!=r&&("contextmenu"===t.type||!0===n)){if(!1===r.isThreadAllowed)return;M(),t.preventDefault(),t.stopPropagation();const o=e.toCollaborationEntityType({tab:"audit",key:r.key}),n=[...e.getFilteredThreads(v,{entityType:o,companyId:f},"both")],i=n.length>0&&n[0].length>0?n[0][0]:gr("audit",r.key,f);v.has(i)?z(i):l===i?p(void 0):(p(i),T(null))}},[v,f,l,z,p,T,I,M]),V=t.useCallback((e,t)=>{e.stopPropagation();const o=gr("audit",t,f);p(void 0),z(o)},[f,p,z]),B=t.useCallback(()=>{g(o.primaryEmailDomain)},[g,o.primaryEmailDomain]),_=()=>{if(null==o.auditSummary.auditReportLastGeneratedDate){const e=r.dateNow().startOf("month").subtract(1,"date").format(cT),t=o.controllers?.map(e=>`${e.user.firstName} ${e.user.middleName} ${e.user.lastName}`)??[];a.trackGetAuditScore(!0,o.name,e,t,r.dateNow().format(pT))}m(o.companyId)},H=!0===o.onboardingInfo?.uncategorizedExpenseAccountIdentified&&!0===o.onboardingInfo?.uncategorizedIncomeAccountIdentified;return e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{I(null),null!=l&&(p(void 0),l.includes(e.NEW_THREAD_SUFFIX)&&k(l))},children:e.jsxRuntimeExports.jsx(yT,{windowSize:S,isThreadOpen:A||O,totalHeight:s,isCreationInProgress:L,children:vk.map((t,s)=>{const a=e.toCollaborationEntityType({tab:"audit",key:t.key}),p=vk.length-2<=s,m=[...e.getFilteredThreads(v,{entityType:a,companyId:f},"both")],g=m.length>0&&m[0].length>0?m[0][0]:gr("audit",t.key,f),$=v.get(g),k=null!=$&&!1===$.resolved,T=g===E,I=l===g;switch(t.key){case"companyName":return e.jsxRuntimeExports.jsxs(xT,{companyNameSticky:n,columnWidth:t.width,windowSize:S,isThreadOpen:T||I,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>F(e,t.key),ref:e=>{c(f,t.key,e)},children:[e.jsxRuntimeExports.jsxs(gT,{ref:P,children:[e.jsxRuntimeExports.jsx(hT,{onClick:e=>{e.preventDefault(),h(o)},children:C}),e.jsxRuntimeExports.jsx(e.ThreadComponent,{anchorRef:P,isElementThreadOpen:T,roomId:b,openThreadId:E,openThreadMetadata:D?.metadata??null})]}),e.jsxRuntimeExports.jsxs(ST,{className:"notesIcon",onClick:e=>{e.preventDefault(),d({roomId:b,companyId:f,companyName:C,entityType:j})},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:R.length,isLoading:w}),e.jsxRuntimeExports.jsx(CT,{})]}),e.jsxRuntimeExports.jsx(e.ThreadDotComponent,{isElementThreadPresent:k,itemKey:t.key,style:{left:e.Space.sp4},onElementClick:F}),e.jsxRuntimeExports.jsx(e.AddThreadsComponent,{elementThreadId:gr("audit",t.key,f),addThreadRequestThreadId:l,itemKey:t.key,onAddThreadClick:V})]},g);case"auditScore":return e.jsxRuntimeExports.jsxs(fT,{ref:e=>{c(f,t.key,e)},columnWidth:t.width,windowSize:S,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>F(e,t.key),children:[e.jsxRuntimeExports.jsx(Vk,{auditSummary:o.auditSummary,onClickScore:_}),N({isElementThreadOpen:T,isElementThreadPresent:k,itemKey:t.key,elementThreadId:g,threadStyle:p?{right:e.Space.sp0}:void 0})]},g);case"uncategorized":return e.jsxRuntimeExports.jsxs(fT,{ref:e=>{c(f,t.key,e)},columnWidth:t.width,windowSize:S,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>F(e,t.key),children:[!0===H?e.jsxRuntimeExports.jsx(oT,{onTransactionTagClicked:e=>u(o,e,"uncategorized"),...o.uncategorizedTransactions}):e.jsxRuntimeExports.jsxs(jT,{onClick:B,children:[e.jsxRuntimeExports.jsx(e.SvgHighImportance,{className:"alert-icon",width:e.sp[3],height:e.sp[3]}),e.jsxRuntimeExports.jsx(bT,{children:dT})]}),N({isElementThreadOpen:T,isElementThreadPresent:k,itemKey:t.key,elementThreadId:g,threadStyle:p?{right:e.Space.sp0}:void 0})]},g);case"miscategorized":return e.jsxRuntimeExports.jsxs(fT,{ref:e=>{c(f,t.key,e)},columnWidth:t.width,windowSize:S,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>F(e,t.key),children:[e.jsxRuntimeExports.jsx(oT,{onTransactionTagClicked:e=>u(o,e,"miscategorized"),...o.miscategorizedTransactions}),N({isElementThreadOpen:T,isElementThreadPresent:k,itemKey:t.key,elementThreadId:g,threadStyle:p?{right:e.Space.sp0}:void 0})]},g);case"reviewVendor":return i?e.jsxRuntimeExports.jsxs(fT,{ref:e=>{c(f,t.key,e)},columnWidth:t.width,windowSize:S,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>F(e,t.key),children:[e.jsxRuntimeExports.jsx(mT,{widthSize:t.width,windowSize:S,children:e.jsxRuntimeExports.jsx(qk,{onReviewVendorTagClicked:()=>y(o),isReviewComplete:!o.isVendorReviewReqiured})}),N({isElementThreadOpen:T,isElementThreadPresent:k,itemKey:t.key,elementThreadId:g,threadStyle:p?{right:e.Space.sp0}:void 0})]},g):null;case"warnings":return e.jsxRuntimeExports.jsxs(fT,{ref:e=>{c(f,t.key,e)},columnWidth:t.width,windowSize:S,isThreadAllowed:t.isThreadAllowed,className:xr,onContextMenu:e=>F(e,t.key),children:[e.jsxRuntimeExports.jsx(nT,{companyId:o.companyId,warningsCount:r.getAuditWarningsCount(o),onClick:x}),N({isElementThreadOpen:T,isElementThreadPresent:k,itemKey:t.key,elementThreadId:g,threadStyle:p?{right:e.Space.sp0}:void 0})]},g);default:return null}})})})},mT=o.div`
|
|
5007
5007
|
display: flex;
|
|
5008
5008
|
align-items: flex-start;
|
|
5009
5009
|
width: ${e=>e.widthSize.valuePx(e.windowSize)};
|
|
@@ -5131,7 +5131,7 @@
|
|
|
5131
5131
|
svg {
|
|
5132
5132
|
color: ${e.Colors.important};
|
|
5133
5133
|
}
|
|
5134
|
-
`,{collaboration:{threads:{placeholder:{addANewComment:RT,replyAComment:wT},tooltip:{resolveComment:
|
|
5134
|
+
`,{collaboration:{threads:{placeholder:{addANewComment:RT,replyAComment:wT},tooltip:{resolveComment:ET,unResolveComment:vT}}},common:{texts:{comments:$T}}}=e.appLocale.getLocalizedStrings(),kT=({reviewView:o,allUsers:r,isReviewVendorColumnVisible:i,analytics:s,onColumnSortConfigChanged:a,onClickAuditScore:l,onClickWarningsCount:d,onTransactionTagClicked:c,onCompanyNameClicked:p,onRetryBankAccountConnection:u,onUncategorizedAccountsErrorClick:m,onReviewVendorTagClicked:x,initialOpenThreadRequest:h})=>{const g=e.useWindowSizeContext(),y=t.useRef(null),[S,C]=t.useState(null),[f,b]=t.useState(null),{uiState:j}=o,R=!("small"===g||"medium-compact"===g),w=e=>o.companies[e].name.length>z?120:M;t.useEffect(()=>{y.current&&y.current.resetAfterIndex(0)},[o]);const{setOpenThread:E,setRequestToOpenThread:v,requestToOpenThread:$,isLoading:k}=t.useContext(e.ThreadsContext);t.useEffect(()=>{null!=h&&"Completed"===o.fetchState&&!1===k&&v(h)},[h,o.fetchState,k,v]);const[T,I]=t.useState(void 0),P=t.useRef([]),D=t.useMemo(()=>({makeCompanyNameSticky:R,uiState:j,isReviewVendorColumnVisible:i,onColumnSortConfigChanged:a}),[R,j,i,a]),A=t.useCallback((e,t,n)=>{const r=o.companies.findIndex(t=>t.companyId===e),i=vk.findIndex(e=>e.key===t);-1!==r&&-1!==i&&(null==P.current[r]?P.current[r]=[n]:P.current[r][i]=n)},[o.companies]);return t.useEffect(()=>{if(null!=$&&null!=S){const{companyId:e,entityType:t}=$,[n,r]=t.split("."),i=o.companies.findIndex(t=>t.companyId===e),s=vk.findIndex(e=>e.key===r);-1===i||S.visibleStartIndex<=i&&S.visibleStopIndex>=i||y.current?.scrollToItem(i,"center"),setTimeout(()=>{const e=P.current[i]?.[0]?.getBoundingClientRect().bottom,t=P.current[i]?.[0]?.getBoundingClientRect().top;null!=e&&null!=t&&(window.innerHeight>=e&&window.innerHeight>=t||t<0)&&P.current[i][s]?.scrollIntoView({block:"center",behavior:"auto"})},0);const a=setInterval(()=>{const e=P.current[i]?.[s]?.getBoundingClientRect().left,t=P.current[i]?.[s]?.getBoundingClientRect().right,o=P.current[i]?.[s]?.offsetWidth;if(null!=e&&null!=o&&null!=t&&(e<window.innerWidth-o||t<window.innerWidth)){clearInterval(a);const e=$.threadId,t=$.onThreadShownCallback;!0===Boolean(e)&&(v(null),E($.threadId),t?.())}},500);setTimeout(()=>{clearInterval(a),v(null)},2e3)}},[$,S,E,v]),e.jsxRuntimeExports.jsx(DT,{children:e.jsxRuntimeExports.jsxs(TT.Provider,{value:D,children:[e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:n})=>e.jsxRuntimeExports.jsx(e.VariableSizeList,{height:t,innerElementType:IT,itemCount:o.companies.length,itemSize:w,onItemsRendered:e=>C(e),itemData:{reviewView:o,isReviewVendorColumnVisible:i,analytics:s,makeCompanyNameSticky:R,allUsers:r,addThreadRequestThreadId:T,setElementRef:A,setAddThreadRequestThreadId:I,setNoteData:b,onTransactionTagClicked:c,onCompanyNameClicked:p,onRetryBankAccountConnection:u,onUncategorizedAccountsErrorClick:m,onReviewVendorTagClicked:x,onClickAuditScore:l,onClickWarningsCount:d},width:n,ref:y,overscanCount:1,children:PT})}),null!=f?e.jsxRuntimeExports.jsx(n.RoomProvider,{id:f.roomId,children:e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${f.companyName} ${$T}`,filter:{application:"cockpit",companyId:f.companyId,entityType:f.entityType,isGlobalComment:!1,tab:"audit"},isLoading:!1,threadMetadata:{companyName:f.companyName,companyId:f.companyId,entityId:f.companyId,entityType:f.entityType,isGlobalComment:!1,application:"cockpit",tab:"audit",url:window.location.href},textOverrides:{composerPlaceholder:RT,replyComposerPlaceholder:wT,threadResolve:ET,threadUnResolve:vT},onThreadClick:e=>null,onCloseAllThreadsDrawer:()=>b(null)})}):null]})})},TT=t.createContext(void 0),IT=t.forwardRef((o,n)=>{const{children:r,style:i,...s}=o,{makeCompanyNameSticky:a,uiState:l,isReviewVendorColumnVisible:d,onColumnSortConfigChanged:c}=t.useContext(TT);return e.jsxRuntimeExports.jsxs(OT,{ref:n,style:{...i,width:"auto"},...s,children:[e.jsxRuntimeExports.jsx($k,{companyNameSticky:a,onColumnSortConfigChanged:c,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder},isReviewVendorColumnVisible:d}),e.jsxRuntimeExports.jsx(LT,{children:r})]})});IT.displayName="Review list view inner element type";const PT=({index:t,style:o,data:n})=>{const{reviewView:r,isReviewVendorColumnVisible:i,makeCompanyNameSticky:s,allUsers:a,analytics:l,addThreadRequestThreadId:d,setElementRef:c,setNoteData:p,onCompanyNameClicked:u,onTransactionTagClicked:m,setAddThreadRequestThreadId:x,onUncategorizedAccountsErrorClick:h,onReviewVendorTagClicked:g,onClickAuditScore:y,onClickWarningsCount:S}=n,C=r.companies[t],{companyId:f}=C;return e.jsxRuntimeExports.jsx(AT,{style:{...o,width:"fit-content",minWidth:"100%"},children:e.jsxRuntimeExports.jsx(uT,{totalHeight:"number"==typeof o.height?o.height:M,addThreadRequestThreadId:d,setNoteData:p,setElementRef:c,setAddThreadRequestThreadId:x,analytics:l,companyView:r.companies[t],isReviewVendorColumnVisible:i,companyNameSticky:s,onCompanyNameClicked:u,onTransactionTagClicked:m,allUsers:a,onUncategorizedAccountsErrorClick:h,onReviewVendorTagClicked:g,onClickWarningsCount:S,onClickAuditScore:y})},f)};PT.displayName="ListItem";const DT=o.div`
|
|
5135
5135
|
/** Subtract top so list can occupy remaining available height */
|
|
5136
5136
|
height: calc(100vh - 150px);
|
|
5137
5137
|
max-width: 99.9%;
|
|
@@ -5208,7 +5208,7 @@
|
|
|
5208
5208
|
`,tI=o(e.StandardRegular)`
|
|
5209
5209
|
margin-bottom: ${e.Space.sp4};
|
|
5210
5210
|
color: ${e=>e.theme.colors.hero};
|
|
5211
|
-
`,oI=({auditSummaryData:o,isAuditScoreLoadingCompleted:n,isMonthEnd:i})=>{const s=!n,a=e.useTheme(),l=o,d=i?l.bypassedAuditScore:l.auditScorePercentage;let c;c=d<=50?e.Colors.important:d<=75?e.Colors.alert:e.Colors.success;const p=t.useCallback(()=>l.fixesRequired>0?`${_T.strings.openingBrace}${l.fixesRequired} ${l.fixesRequired>1?_T.texts.issues:_T.texts.issue}${_T.strings.closingBrace}`:_T.strings.empty,[l.fixesRequired]);return e.jsxRuntimeExports.jsx(UT,{isAuditScoreLoading:s,children:e.jsxRuntimeExports.jsx(qT,{auditPercentage:d,children:e.jsxRuntimeExports.jsxs(GT,{children:[!s&&e.jsxRuntimeExports.jsx(KT,{children:e.jsxRuntimeExports.jsx(
|
|
5211
|
+
`,oI=({auditSummaryData:o,isAuditScoreLoadingCompleted:n,isMonthEnd:i})=>{const s=!n,a=e.useTheme(),l=o,d=i?l.bypassedAuditScore:l.auditScorePercentage;let c;c=d<=50?e.Colors.important:d<=75?e.Colors.alert:e.Colors.success;const p=t.useCallback(()=>l.fixesRequired>0?`${_T.strings.openingBrace}${l.fixesRequired} ${l.fixesRequired>1?_T.texts.issues:_T.texts.issue}${_T.strings.closingBrace}`:_T.strings.empty,[l.fixesRequired]);return e.jsxRuntimeExports.jsx(UT,{isAuditScoreLoading:s,children:e.jsxRuntimeExports.jsx(qT,{auditPercentage:d,children:e.jsxRuntimeExports.jsxs(GT,{children:[!s&&e.jsxRuntimeExports.jsx(KT,{children:e.jsxRuntimeExports.jsx(iv,{value:d,text:`${Math.ceil(d)}${_T.strings.percentage}`,strokeWidth:10,styles:sv({rotation:.5,strokeLinecap:"butt",pathColor:c,textColor:a.colors.primary,trailColor:a.colors.grey3,textSize:e.Space.sp4})})}),e.jsxRuntimeExports.jsx(YT,{children:e.jsxRuntimeExports.jsxs(ZT,{children:[e.jsxRuntimeExports.jsxs(XT,{children:[e.jsxRuntimeExports.jsx(QT,{children:s?WT.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",r.dateNow().subtract(1,"month").format(HT.visual.MMMMYYYYFormat)):_T.headers.auditScore}),s?null:e.jsxRuntimeExports.jsx(JT,{children:p()})]}),e.jsxRuntimeExports.jsx(eI,{children:e.jsxRuntimeExports.jsx(tI,{children:s?_T.texts.thisProcessMayTake23Min:WT.review.auditReportDrawer.reportGeneratedSubtitle})})]})})]})})})},{cockpit:nI,common:rI}=e.appLocale.getLocalizedStrings(),iI=({open:t,anchorElement:o,children:n,onClose:r})=>{const i=e.useTheme();return e.jsxRuntimeExports.jsx(e.Popover,{transitionDuration:0,anchorEl:o,open:t,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",background:i.colors.grey5,boxSizing:"border-box",transform:"translate(0px,30px)",padding:e.Space.sp3,borderRadius:e.Space.sp2}},onClose:r,children:n})},sI=({rule:o,commentsText:n,ruleGroup:r,isControllerOrReviewer:i,triggerComponent:s,setCommentsText:a,handleReasonAuditRule:l})=>{const[d,c]=t.useState(!1),[p,u]=t.useState(n),m=t.useRef(null),x=e.useTheme();t.useEffect(()=>{""!==n&&c(!0)},[n]);return e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{c(!1)},children:e.jsxRuntimeExports.jsxs(hI,{ref:m,children:[null!=s?e.jsxRuntimeExports.jsxs(xI,{className:"placeholder",onClick:()=>{c(!d)},children:[s," "]}):null,d?e.jsxRuntimeExports.jsxs(iI,{open:d,anchorElement:m.current,onClose:()=>c(!1),children:[e.jsxRuntimeExports.jsx(dI,{children:e.jsxRuntimeExports.jsx(aI,{children:nI.review.auditReportDrawer.commentTitle})}),e.jsxRuntimeExports.jsx(gI,{autoFocus:!0,onFocus:e=>{if(e.target instanceof HTMLTextAreaElement){const t=e.target.value;e.target.value="",e.target.value=t}},placeholder:nI.commentPlaceholder,value:p,onChange:e=>{e.target instanceof HTMLTextAreaElement&&u(e.target.value)}}),e.jsxRuntimeExports.jsx(pI,{}),e.jsxRuntimeExports.jsx(uI,{}),e.jsxRuntimeExports.jsxs(lI,{children:[e.jsxRuntimeExports.jsx(mI,{}),e.jsxRuntimeExports.jsxs(cI,{children:[e.jsxRuntimeExports.jsx(yI,{disabled:"In-Progress"===o.reasonUpdateFetchState.fetchState,size:"small",style:{whiteSpace:"nowrap",padding:`${e.Space.sp1} ${e.Space.sp3}`,borderRadius:e.Space.sp2},textStyle:{color:x.colors.primary},label:rI.cancel,onClick:()=>{""!==n&&l(o.auditRuleId,r.auditRuleGroupId,n,"pending"),a(""),c(!1)}}),e.jsxRuntimeExports.jsx(SI,{disabled:""===p&&"In-Progress"===o.reasonUpdateFetchState.fetchState,variant:"primary",size:"small",style:{whiteSpace:"nowrap",padding:i?`${e.Space.sp1} 14px`:`${e.Space.sp1} 22px`,borderRadius:e.Space.sp2},onClick:()=>{""!==p&&"In-Progress"!==o.reasonUpdateFetchState.fetchState&&l(o.auditRuleId,r.auditRuleGroupId,p,i?"approved":"pending")},label:i?rI.resolve:rI.send,loading:"In-Progress"===o.reasonUpdateFetchState.fetchState})]})]})]}):null]})})},aI=o(e.LargeRegular)`
|
|
5212
5212
|
color: ${e=>e.theme.colors.primary};
|
|
5213
5213
|
margin-bottom: ${e.Space.sp3};
|
|
5214
5214
|
`,lI=o.div`
|
|
@@ -5258,18 +5258,18 @@
|
|
|
5258
5258
|
color: ${e=>e.theme.colors.hero};
|
|
5259
5259
|
${e.textStyles.largeRegular.css};
|
|
5260
5260
|
}
|
|
5261
|
-
`,yI=o(e.Button)``,SI=o(e.Button)``,{common:CI,dateFormat:{visual:{MMMDFormat:fI}},timeFormat:{hhmmAFormat:bI}}=e.appLocale.getLocalizedStrings(),jI=({open:t,anchorElement:o,children:n,onClose:r})=>{const i=e.useTheme();return e.jsxRuntimeExports.jsx(e.Popover,{transitionDuration:0,anchorEl:o,open:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:{width:"356px",display:"flex",flexDirection:"column",background:i.colors.grey5,boxSizing:"border-box",transform:"translate(0px,10px)",borderRadius:e.Space.sp2}},onClose:r,children:n})},RI=({isControllerOrReviewer:o,allUsers:n,loggedInUser:i,rule:s,ruleGroup:a,triggerComponent:l,isDisabled:d=!1,handleReasonAuditRule:c,setCommentsText:p})=>{const[u,m]=t.useState(!1),x=t.useRef(null),h=null!=s.reason&&s.reason.userId?r.getUserFromAllUsers(n,s.reason.userId):void 0,g=s.reason?.reasonUpdatedAt,y=e.useTheme();return t.useEffect(()=>{"Completed"===s.reasonUpdateFetchState.fetchState&&m(!1)},[s.reasonUpdateFetchState.fetchState]),e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{m(!1)},children:e.jsxRuntimeExports.jsxs(AI,{ref:x,children:[e.jsxRuntimeExports.jsxs(DI,{className:"placeholder",onClick:()=>{m(e=>!e)},children:[l," "]}),u&&e.jsxRuntimeExports.jsxs(jI,{open:u,anchorElement:x.current,onClose:()=>m(!1),children:[e.jsxRuntimeExports.jsxs(LI,{children:[e.jsxRuntimeExports.jsxs(II,{children:[e.jsxRuntimeExports.jsx(wI,{children:null!=h?.photo?e.jsxRuntimeExports.jsx(PI,{src:h.photo.href,alt:CI.filters.userProfileAltText,onError:({currentTarget:t})=>{t.onerror=null,t.src=e.AvatarSVG}}):e.jsxRuntimeExports.jsx(e.EntityAvatarWithInitials,{firstName:h?.firstName??"",lastName:h?.lastName??""})}),e.jsxRuntimeExports.jsxs(TI,{children:[e.jsxRuntimeExports.jsx(kI,{children:`${r.getUserName(h)}`}),e.jsxRuntimeExports.jsxs($I,{children:[e.jsxRuntimeExports.jsx(
|
|
5261
|
+
`,yI=o(e.Button)``,SI=o(e.Button)``,{common:CI,dateFormat:{visual:{MMMDFormat:fI}},timeFormat:{hhmmAFormat:bI}}=e.appLocale.getLocalizedStrings(),jI=({open:t,anchorElement:o,children:n,onClose:r})=>{const i=e.useTheme();return e.jsxRuntimeExports.jsx(e.Popover,{transitionDuration:0,anchorEl:o,open:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:{width:"356px",display:"flex",flexDirection:"column",background:i.colors.grey5,boxSizing:"border-box",transform:"translate(0px,10px)",borderRadius:e.Space.sp2}},onClose:r,children:n})},RI=({isControllerOrReviewer:o,allUsers:n,loggedInUser:i,rule:s,ruleGroup:a,triggerComponent:l,isDisabled:d=!1,handleReasonAuditRule:c,setCommentsText:p})=>{const[u,m]=t.useState(!1),x=t.useRef(null),h=null!=s.reason&&s.reason.userId?r.getUserFromAllUsers(n,s.reason.userId):void 0,g=s.reason?.reasonUpdatedAt,y=e.useTheme();return t.useEffect(()=>{"Completed"===s.reasonUpdateFetchState.fetchState&&m(!1)},[s.reasonUpdateFetchState.fetchState]),e.jsxRuntimeExports.jsx(e.ClickAwayListener,{onClickAway:()=>{m(!1)},children:e.jsxRuntimeExports.jsxs(AI,{ref:x,children:[e.jsxRuntimeExports.jsxs(DI,{className:"placeholder",onClick:()=>{m(e=>!e)},children:[l," "]}),u&&e.jsxRuntimeExports.jsxs(jI,{open:u,anchorElement:x.current,onClose:()=>m(!1),children:[e.jsxRuntimeExports.jsxs(LI,{children:[e.jsxRuntimeExports.jsxs(II,{children:[e.jsxRuntimeExports.jsx(wI,{children:null!=h?.photo?e.jsxRuntimeExports.jsx(PI,{src:h.photo.href,alt:CI.filters.userProfileAltText,onError:({currentTarget:t})=>{t.onerror=null,t.src=e.AvatarSVG}}):e.jsxRuntimeExports.jsx(e.EntityAvatarWithInitials,{firstName:h?.firstName??"",lastName:h?.lastName??""})}),e.jsxRuntimeExports.jsxs(TI,{children:[e.jsxRuntimeExports.jsx(kI,{children:`${r.getUserName(h)}`}),e.jsxRuntimeExports.jsxs($I,{children:[e.jsxRuntimeExports.jsx(EI,{children:null!=g?r.zeniDate(g.toISOString()).format(fI)+CI.strings.comma:CI.strings.empty}),e.jsxRuntimeExports.jsx(vI,{children:null!=g?r.zeniDate(g.toISOString()).format(bI):CI.strings.empty})]})]})]}),o||i.userId!==s.reason?.userId?null:e.jsxRuntimeExports.jsx(e.MoreMenuButton,{moreIconType:"plain",options:[{label:CI.edit,value:CI.edit},{label:CI.delete,value:CI.delete}],onOptionSelection:e=>{c(s.auditRuleId,a.auditRuleGroupId,s.reason?.reasonToPass??"","rejected"),e===CI.edit?p(s.reason?.reasonToPass??""):p("")},valueToIcon:t=>t===CI.delete?e.jsxRuntimeExports.jsx(e.SvgDelete,{}):t===CI.edit?e.jsxRuntimeExports.jsx(FI,{}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),customStyleConfig:{menuPortal:()=>({zIndex:1e4})},menuPortalTarget:document.body,menuPosition:"fixed"})]}),e.jsxRuntimeExports.jsx(OI,{children:e.jsxRuntimeExports.jsx(MI,{children:s.reason?.reasonToPass})}),o?e.jsxRuntimeExports.jsx(NI,{children:e.jsxRuntimeExports.jsxs(zI,{children:[e.jsxRuntimeExports.jsx(VI,{size:"small",style:{whiteSpace:"nowrap",padding:`${e.Space.sp1} 22px`,borderRadius:e.Space.sp2},textStyle:{color:y.colors.primary},disabled:"In-Progress"===s.reasonUpdateFetchState.fetchState,onClick:()=>{"In-Progress"!==s.reasonUpdateFetchState.fetchState&&c(s.auditRuleId,a.auditRuleGroupId,s.reason?.reasonToPass??"","rejected")},label:CI.footer.reject}),e.jsxRuntimeExports.jsx(BI,{variant:"primary",size:"small",style:{whiteSpace:"nowrap",padding:`${e.Space.sp1} 14px`,borderRadius:e.Space.sp2},label:CI.footer.approve,disabled:"In-Progress"===s.reasonUpdateFetchState.fetchState,onClick:()=>{!0!==d&&"In-Progress"!==s.reasonUpdateFetchState.fetchState&&c(s.auditRuleId,a.auditRuleGroupId,s.reason?.reasonToPass??"","approved")}})]})}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})]})]})})},wI=o.div`
|
|
5262
5262
|
display: flex;
|
|
5263
5263
|
margin-right: ${e.Space.sp2};
|
|
5264
5264
|
margin-left: ${e.Space.sp2};
|
|
5265
5265
|
justify-content: center;
|
|
5266
5266
|
align-items: center;
|
|
5267
|
-
`,
|
|
5267
|
+
`,EI=o.div`
|
|
5268
5268
|
flex: none;
|
|
5269
5269
|
order: 1;
|
|
5270
5270
|
flex-grow: 0;
|
|
5271
5271
|
margin: ${e.Space.sp0} ${e.Space.sp1} ${e.Space.sp0} ${e.Space.sp2};
|
|
5272
|
-
`,
|
|
5272
|
+
`,vI=o.div`
|
|
5273
5273
|
flex: none;
|
|
5274
5274
|
order: 3;
|
|
5275
5275
|
flex-grow: 0;
|
|
@@ -5435,10 +5435,10 @@
|
|
|
5435
5435
|
flex-direction: column;
|
|
5436
5436
|
align-items: center;
|
|
5437
5437
|
justify-content: center;
|
|
5438
|
-
`,
|
|
5438
|
+
`,EP=o.div`
|
|
5439
5439
|
display: flex;
|
|
5440
5440
|
flex: 1 1 0;
|
|
5441
|
-
`,
|
|
5441
|
+
`,vP=o.div`
|
|
5442
5442
|
display: flex;
|
|
5443
5443
|
flex-direction: column;
|
|
5444
5444
|
width: 60%;
|
|
@@ -5656,7 +5656,7 @@
|
|
|
5656
5656
|
background: ${e=>"high"===e.level?e.theme.colors.success:"mid"===e.level?e.theme.colors.alert:e.theme.colors.important};
|
|
5657
5657
|
`,bD=o(e.SmallSemiBoldSp)`
|
|
5658
5658
|
color: ${e=>"high"===e.level?e.theme.colors.success:"mid"===e.level?e.theme.colors.alert:e.theme.colors.important};
|
|
5659
|
-
`,{common:{headers:{notes:jD},texts:{actions:RD,creditLimit:wD,lastUpdatedBy:
|
|
5659
|
+
`,{common:{headers:{notes:jD},texts:{actions:RD,creditLimit:wD,lastUpdatedBy:ED,name:vD,status:$D}}}=e.appLocale.getLocalizedStrings(),kD={rowHeightPx:parseInt(e.Space.sp8),headerHeightPx:44,sortIconSize:e.Space.sp2},TD=200,ID=60,PD=110,DD=120,AD=120,LD=140,OD=200,MD=140,ND=170,zD=120,FD=[18,6,8,10,10,10,14,10,8,6],VD=o.button`
|
|
5660
5660
|
width: ${e.Space.sp5};
|
|
5661
5661
|
height: ${e.Space.sp5};
|
|
5662
5662
|
border-radius: 50%;
|
|
@@ -5709,7 +5709,7 @@
|
|
|
5709
5709
|
&:hover {
|
|
5710
5710
|
background: ${({theme:e})=>e.colors.grey4};
|
|
5711
5711
|
}
|
|
5712
|
-
`,{common:QD,cockpit:{creditAgent:JD},dateFormat:{visual:{MMMDCommaYYYYformat:eA}}}=e.appLocale.getLocalizedStrings(),{strings:{emDash:tA}}=QD;function oA({style:t,row:o,isLastRow:n,cardProfilesActions:r,editingNs:i,editingValue:s,onEditStart:a,onEditChange:l,onEditCancel:d,onNoteOpen:c}){return e.jsxRuntimeExports.jsxs(sA,{style:t,children:[e.jsxRuntimeExports.jsx(lA,{$hideBorder:n,children:e.jsxRuntimeExports.jsxs(SA,{children:[o.customerName??o.tenantId??o.tenantEmailDomain,o.isNew&&e.jsxRuntimeExports.jsx(CA,{children:QD.texts.new})]})}),e.jsxRuntimeExports.jsx(dA,{$hideBorder:n,children:null!=o.companyId&&""!==o.companyId?e.jsxRuntimeExports.jsx(iA,{companyId:o.companyId,onOpen:()=>{const e=o.companyId;c({companyId:e,companyName:o.customerName??o.tenantId??o.tenantEmailDomain,roomId:`cockpit_${e}`})}}):e.jsxRuntimeExports.jsx(fA,{children:tA})}),e.jsxRuntimeExports.jsx(cA,{$hideBorder:n,children:e.jsxRuntimeExports.jsx(bA,{status:o.cardStatus,children:o.cardStatus})}),e.jsxRuntimeExports.jsx(pA,{$hideBorder:n,children:i===o.tenantEmailDomain?e.jsxRuntimeExports.jsxs(RA,{children:[e.jsxRuntimeExports.jsx(wA,{type:"number",min:"0",step:"any",autoFocus:!0,value:s,onChange:e=>l(e.target.value),onKeyDown:e=>{if("Enter"===e.key){const e=parseFloat(s);!isNaN(e)&&e>=0&&(r.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{creditLimit:e}),d())}else"Escape"===e.key&&d()}}),e.jsxRuntimeExports.jsx(
|
|
5712
|
+
`,{common:QD,cockpit:{creditAgent:JD},dateFormat:{visual:{MMMDCommaYYYYformat:eA}}}=e.appLocale.getLocalizedStrings(),{strings:{emDash:tA}}=QD;function oA({style:t,row:o,isLastRow:n,cardProfilesActions:r,editingNs:i,editingValue:s,onEditStart:a,onEditChange:l,onEditCancel:d,onNoteOpen:c}){return e.jsxRuntimeExports.jsxs(sA,{style:t,children:[e.jsxRuntimeExports.jsx(lA,{$hideBorder:n,children:e.jsxRuntimeExports.jsxs(SA,{children:[o.customerName??o.tenantId??o.tenantEmailDomain,o.isNew&&e.jsxRuntimeExports.jsx(CA,{children:QD.texts.new})]})}),e.jsxRuntimeExports.jsx(dA,{$hideBorder:n,children:null!=o.companyId&&""!==o.companyId?e.jsxRuntimeExports.jsx(iA,{companyId:o.companyId,onOpen:()=>{const e=o.companyId;c({companyId:e,companyName:o.customerName??o.tenantId??o.tenantEmailDomain,roomId:`cockpit_${e}`})}}):e.jsxRuntimeExports.jsx(fA,{children:tA})}),e.jsxRuntimeExports.jsx(cA,{$hideBorder:n,children:e.jsxRuntimeExports.jsx(bA,{status:o.cardStatus,children:o.cardStatus})}),e.jsxRuntimeExports.jsx(pA,{$hideBorder:n,children:i===o.tenantEmailDomain?e.jsxRuntimeExports.jsxs(RA,{children:[e.jsxRuntimeExports.jsx(wA,{type:"number",min:"0",step:"any",autoFocus:!0,value:s,onChange:e=>l(e.target.value),onKeyDown:e=>{if("Enter"===e.key){const e=parseFloat(s);!isNaN(e)&&e>=0&&(r.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{creditLimit:e}),d())}else"Escape"===e.key&&d()}}),e.jsxRuntimeExports.jsx(EA,{onClick:()=>{const e=parseFloat(s);!isNaN(e)&&e>=0&&(r.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{creditLimit:e}),d())},children:e.jsxRuntimeExports.jsx(e.SvgTick,{width:e.Space.sp3,height:e.Space.sp3})}),e.jsxRuntimeExports.jsx(vA,{onClick:d,children:e.jsxRuntimeExports.jsx(e.SvgClose,{width:e.Space.sp3,height:e.Space.sp3})})]}):null!=o.creditLimit?e.jsxRuntimeExports.jsxs(jA,{onClick:()=>{a(o.tenantEmailDomain,String(o.creditLimit??""))},children:["$",e.appLocale.numberFormatter().format(o.creditLimit??0)]}):e.jsxRuntimeExports.jsx(jA,{onClick:()=>{a(o.tenantEmailDomain,"")},children:JD.addLimit})}),e.jsxRuntimeExports.jsx(uA,{$hideBorder:n,children:o.isAnalyzing?e.jsxRuntimeExports.jsx(fA,{children:JD.inProgress}):e.jsxRuntimeExports.jsx(hD,{score:o.creditScore})}),e.jsxRuntimeExports.jsx(mA,{$hideBorder:n,children:o.isAnalyzing?e.jsxRuntimeExports.jsx(fA,{children:JD.inProgress}):null!=o.recommendedAmount?e.jsxRuntimeExports.jsx($A,{children:e.currencyAmountCompactFormatter(o.recommendedAmount)}):e.jsxRuntimeExports.jsx(fA,{children:QD.status.pending})}),e.jsxRuntimeExports.jsx(xA,{$hideBorder:n,children:o.isAnalyzing?e.jsxRuntimeExports.jsx(fA,{children:JD.inProgress}):null!=o.rationale?e.jsxRuntimeExports.jsx(rA,{text:o.rationale}):e.jsxRuntimeExports.jsx(fA,{children:tA})}),e.jsxRuntimeExports.jsx(hA,{$hideBorder:n,children:o.isAnalyzing?e.jsxRuntimeExports.jsx(fA,{children:JD.inProgress}):null!=o.reportDate?o.reportDate.format(eA):"—"}),e.jsxRuntimeExports.jsx(gA,{$hideBorder:n,children:e.jsxRuntimeExports.jsxs(PA,{children:[e.jsxRuntimeExports.jsx(e.EntityAvatar,{name:o.updatedByName??JD.creditAgentFallback}),e.jsxRuntimeExports.jsxs(DA,{children:[e.jsxRuntimeExports.jsx(AA,{children:o.updatedByName??JD.creditAgentFallback}),null!=o.updatedOn&&e.jsxRuntimeExports.jsx(LA,{children:o.updatedOn.format(eA)})]})]})}),e.jsxRuntimeExports.jsx(yA,{$hideBorder:n,children:e.jsxRuntimeExports.jsx(nA,{row:o,cardProfilesActions:r})})]})}function nA({row:o,cardProfilesActions:n}){const[r,i]=t.useState(null),[s,a]=t.useState(!1),l=t.useRef(null);t.useEffect(()=>()=>{null!=l.current&&clearTimeout(l.current)},[]);const d=n.onAnalyse?e.jsxRuntimeExports.jsx(VD,{title:o.tenantId?JD.analyseTitle:JD.tenantIdNotAvailable,disabled:!o.tenantId,onClick:()=>null!=o.tenantId&&n.onAnalyse?.(o.tenantId),children:e.jsxRuntimeExports.jsx(e.SvgPlayButtonSmall,{width:e.Space.sp3,height:e.Space.sp3})}):null,c=t.useCallback(e=>{"approve"===e?i("approve"):"reject"===e?i("reject"):"reset"===e?i("reset"):"lock"===e?i("lock"):"unlock"===e&&i("unlock")},[]),p=o.customerName??o.tenantEmailDomain,u=null!=o.creditLimit?e.currencyAmountCompactFormatter(o.creditLimit):"",m=r?function(e,t,o,n){const r={"pre-approve":{title:n.modalPreApproveTitle,body:`${t} ${n.modalCardAccessBodySuffix} ${o}.`,confirmLabel:QD.confirm,confirmVariant:"primary"},approve:{title:n.modalApproveTitle,body:`${t} ${n.modalCardAccessBodySuffix} ${o}.`,confirmLabel:QD.confirm,confirmVariant:"primary"},reject:{title:n.modalRejectTitle,body:`${t} ${n.modalRejectBodySuffix}`,confirmLabel:QD.confirm,confirmVariant:"destructive"},lock:{title:n.modalLockTitle,body:`${t}${n.modalLockBodySuffix}`,confirmLabel:QD.texts.lock,confirmVariant:"destructive"},unlock:{title:n.modalUnlockTitle,body:`${t}${n.modalUnlockBodySuffix}`,confirmLabel:QD.texts.unlock,confirmVariant:"primary"},reset:{title:QD.texts.resetToDefault,body:`${t}${n.modalResetBodySuffix}`,confirmLabel:QD.reset,confirmVariant:"destructive"}};return r[e]}(r,p,u,JD):null,x={onOkClick:e=>(e=>{const t=e??"";if("pre-approve"===r)n.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{cardStatus:"Pre-approved",reason:t});else if("approve"===r)n.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{cardStatus:"Approved",reason:t});else if("reject"===r)n.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{cardStatus:"Rejected",reason:t});else if("lock"===r)n.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{cardStatus:"Locked",reason:t});else if("unlock"===r)n.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{cardStatus:"Active",reason:t});else if("reset"===r){const e="Pre-approved"===o.cardStatus?"Not-Initiated":"Interested";n.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{cardStatus:e,reason:t})}i(null)})(e),onCancelClick:()=>{i(null)},onClickAway:()=>{i(null)}};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[r&&m&&e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(FA,{children:m.title}),descriptionComponent:e.jsxRuntimeExports.jsx(VA,{children:m.body}),primaryButtonText:m.confirmLabel,proceedButtonVariant:m.confirmVariant,secondaryButtonText:QD.cancel,isNotesIncluded:!0,notesPlaceholder:QD.texts.addReasonOptional,action:x,containerStyle:{maxWidth:520}}),e.jsxRuntimeExports.jsxs(MA,{children:[d,"Interested"===o.cardStatus&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(VD,{className:"reject",title:QD.footer.reject,onClick:()=>i("reject"),children:e.jsxRuntimeExports.jsx(e.SvgClose,{width:e.Space.sp3,height:e.Space.sp3})}),e.jsxRuntimeExports.jsxs(NA,{children:[e.jsxRuntimeExports.jsx(VD,{className:"approve",title:null==o.creditLimit?JD.setLimitBeforeApproving:JD.preApprove,onClick:()=>{if(null==o.creditLimit)return a(!0),null!=l.current&&clearTimeout(l.current),void(l.current=setTimeout(()=>a(!1),3e3));i("pre-approve")},children:e.jsxRuntimeExports.jsx(e.SvgTick,{width:e.Space.sp3,height:e.Space.sp3})}),s&&e.jsxRuntimeExports.jsx(zA,{children:JD.setCreditLimitFirst})]})]}),"Not-Initiated"===o.cardStatus&&e.jsxRuntimeExports.jsx(VD,{className:"approve",title:JD.moveToInterested,onClick:()=>n.onUpdateProfile(o.tenantEmailDomain,o.tenantId,{cardStatus:"Interested"}),children:e.jsxRuntimeExports.jsx(e.SvgTick,{width:e.Space.sp3,height:e.Space.sp3})}),["Pre-approved","Approved","Active","Locked"].includes(o.cardStatus)&&e.jsxRuntimeExports.jsx(qD,{row:o,onAction:c})]})]})}function rA({text:o}){const n=t.useRef(null),[r,i]=t.useState(null);return e.jsxRuntimeExports.jsxs(kA,{ref:n,onMouseEnter:()=>{if(!n.current)return;const e=n.current.getBoundingClientRect(),t=e.top>176;i({...t?{bottom:window.innerHeight-e.top+8}:{top:e.bottom+8},left:e.left,above:t})},onMouseLeave:()=>i(null),children:[e.jsxRuntimeExports.jsx(TA,{children:o}),r&&a.createPortal(e.jsxRuntimeExports.jsx(IA,{style:{position:"fixed",left:r.left,...r.above?{bottom:r.bottom}:{top:r.top}},above:r.above,children:o}),document.body)]})}function iA({companyId:t,onOpen:o}){const{threads:n,isLoading:r}=e.useFilteredThreads({entityType:e.toCollaborationEntityType({tab:"creditAgent",key:"details"}),companyId:t},!1);return e.jsxRuntimeExports.jsxs(OA,{onClick:e=>{e.stopPropagation(),o()},children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:n.length,isLoading:r}),e.jsxRuntimeExports.jsx(e.SvgComment,{width:e.Space.sp3,height:e.Space.sp3})]})}const sA=o.div`
|
|
5713
5713
|
display: flex;
|
|
5714
5714
|
flex-direction: row;
|
|
5715
5715
|
align-items: stretch;
|
|
@@ -5807,7 +5807,7 @@
|
|
|
5807
5807
|
&:focus {
|
|
5808
5808
|
border-color: ${({theme:e})=>e.colors.grey1};
|
|
5809
5809
|
}
|
|
5810
|
-
`,
|
|
5810
|
+
`,EA=o.button`
|
|
5811
5811
|
background: none;
|
|
5812
5812
|
border: none;
|
|
5813
5813
|
cursor: pointer;
|
|
@@ -5819,7 +5819,7 @@
|
|
|
5819
5819
|
&:hover {
|
|
5820
5820
|
color: ${({theme:e})=>e.colors.successProgress};
|
|
5821
5821
|
}
|
|
5822
|
-
`,
|
|
5822
|
+
`,vA=o.button`
|
|
5823
5823
|
background: none;
|
|
5824
5824
|
border: none;
|
|
5825
5825
|
cursor: pointer;
|
|
@@ -5905,7 +5905,7 @@
|
|
|
5905
5905
|
`,VA=o(e.StandardRegularSp)`
|
|
5906
5906
|
color: ${({theme:e})=>e.colors.grey1};
|
|
5907
5907
|
line-height: 1.5;
|
|
5908
|
-
`,{cockpit:{creditAgent:BA},common:{headers:{notes:_A}}}=e.appLocale.getLocalizedStrings();function HA({cardProfilesData:o,cardProfilesActions:r,onUIStateChange:i,uiState:s}){const a=t.useMemo(()=>{return[{key:"name",label:
|
|
5908
|
+
`,{cockpit:{creditAgent:BA},common:{headers:{notes:_A}}}=e.appLocale.getLocalizedStrings();function HA({cardProfilesData:o,cardProfilesActions:r,onUIStateChange:i,uiState:s}){const a=t.useMemo(()=>{return[{key:"name",label:vD,sortable:!0,width:TD,justifyContent:"flex-start",growToFill:!0},{key:"notes",label:jD,sortable:!1,width:ID,justifyContent:"center"},{key:"status",label:$D,sortable:!0,width:PD,justifyContent:"flex-start"},{key:"creditLimit",label:wD,sortable:!0,width:DD,justifyContent:"flex-start"},{key:"creditScore",label:(e=BA).colCreditScore,sortable:!0,width:AD,justifyContent:"flex-start"},{key:"recAmount",label:e.colRecommendedAmount,sortable:!0,width:LD,justifyContent:"flex-start"},{key:"rationale",label:e.colRationale,sortable:!1,width:OD,justifyContent:"flex-start"},{key:"reportDate",label:e.colLastAnalysedOn,sortable:!0,width:MD,justifyContent:"flex-start"},{key:"updatedBy",label:ED,sortable:!0,width:ND,justifyContent:"flex-start"},{key:"actions",label:RD,sortable:!1,width:zD,justifyContent:"flex-end"}];var e},[]),[l,d]=t.useState(null),[c,p]=t.useState(""),[u,m]=t.useState(null),x=s.sortKey??null,h=s.sortDir,g=s.filterText,y="Not-Started"===o.fetchState||"In-Progress"===o.fetchState,S=o.rows,C=S.length,f=t.useMemo(()=>({cardProfilesActions:r,editingNs:l,editingValue:c,onEditCancel:()=>d(null),onEditChange:p,onEditStart:(e,t)=>{d(e),p(t)},onNoteOpen:m,rowCount:S.length,rows:S}),[r,l,c,S]);return e.jsxRuntimeExports.jsxs(GA,{children:[e.jsxRuntimeExports.jsxs(nL,{children:[e.jsxRuntimeExports.jsxs(rL,{children:[e.jsxRuntimeExports.jsx(iL,{children:e.jsxRuntimeExports.jsx(e.SvgSearch,{width:e.Space.sp3,height:e.Space.sp3})}),e.jsxRuntimeExports.jsx(sL,{placeholder:BA.searchPlaceholder,value:g,onChange:e=>i({filterText:e.target.value})}),Boolean(g)&&e.jsxRuntimeExports.jsx(aL,{onClick:()=>i({filterText:""}),children:e.jsxRuntimeExports.jsx(e.SvgClose,{width:e.Space.sp3,height:e.Space.sp3})})]}),!y&&e.jsxRuntimeExports.jsxs(lL,{children:[C," ",1!==C?BA.tenantCountPlural:BA.tenantCountSingular,g?` ${BA.tenantCountFound}`:""]})]}),"Error"===o.fetchState?e.jsxRuntimeExports.jsx(oL,{children:BA.failedToLoadCardProfiles}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(qA,{children:[e.jsxRuntimeExports.jsx(KA,{children:a.map(t=>{const o=t.sortable&&x===t.key,n=h;return e.jsxRuntimeExports.jsx(YA,{$width:t.width,$justifyContent:t.justifyContent,$growToFill:t.growToFill,children:e.jsxRuntimeExports.jsx(ZA,{children:t.sortable?e.jsxRuntimeExports.jsxs(XA,{type:"button",$active:o,onClick:()=>{return e=t.key,void i(x===e?{sortDir:"asc"===h?"desc":"asc"}:{sortKey:e,sortDir:"asc"});var e},children:[t.label,e.jsxRuntimeExports.jsx(QA,{$direction:o?n:"asc",children:e.jsxRuntimeExports.jsx(e.SvgArrowTailTop,{width:kD.sortIconSize,height:kD.sortIconSize})})]}):t.label})},t.key)})}),y?e.jsxRuntimeExports.jsx(eL,{children:e.jsxRuntimeExports.jsx(e.ListTableSkeleton,{colPcts:FD,rowCount:8})}):0===S.length?e.jsxRuntimeExports.jsx(tL,{children:Boolean(g)||"All"!==s.focus||s.minScore>0?BA.noTenantsMatchFilters:BA.noCardProfilesYet}):e.jsxRuntimeExports.jsx(JA,{children:e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:o})=>e.jsxRuntimeExports.jsx(e.FixedSizeList,{height:t,width:o,itemCount:S.length,itemSize:kD.rowHeightPx,itemData:f,innerElementType:UA,overscanCount:5,children:WA})})})]}),null!=u&&e.jsxRuntimeExports.jsx(n.RoomProvider,{id:u.roomId,children:e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${u.companyName} ${_A}`,filter:{application:"cockpit",companyId:u.companyId,entityType:e.toCollaborationEntityType({tab:"creditAgent",key:"details"}),isGlobalComment:!1,tab:"creditAgent"},isLoading:!1,threadMetadata:{companyName:u.companyName,companyId:u.companyId,entityId:u.companyId,entityType:e.toCollaborationEntityType({tab:"creditAgent",key:"details"}),isGlobalComment:!1,application:"cockpit",tab:"creditAgent",url:window.location.href},textOverrides:{composerPlaceholder:BA.composerPlaceholder,replyComposerPlaceholder:BA.replyComposerPlaceholder},onThreadClick:()=>null,onCloseAllThreadsDrawer:()=>m(null)})})]})]})}const WA=t.memo(({index:t,style:o,data:n})=>{const r=n.rows[t],i=t===n.rowCount-1;return e.jsxRuntimeExports.jsx(oA,{style:o,row:r,isLastRow:i,cardProfilesActions:n.cardProfilesActions,editingNs:n.editingNs,editingValue:n.editingValue,onEditStart:n.onEditStart,onEditChange:n.onEditChange,onEditCancel:n.onEditCancel,onNoteOpen:n.onNoteOpen})});WA.displayName="CreditAgentListItem";const UA=t.forwardRef(({style:t,...o},n)=>e.jsxRuntimeExports.jsx("div",{ref:n,style:{...t,position:"relative"},...o})),GA=o.div`
|
|
5909
5909
|
display: flex;
|
|
5910
5910
|
flex-direction: column;
|
|
5911
5911
|
flex: 1;
|
|
@@ -6113,11 +6113,11 @@
|
|
|
6113
6113
|
display: flex;
|
|
6114
6114
|
align-items: center;
|
|
6115
6115
|
gap: ${e.Space.sp2};
|
|
6116
|
-
`,
|
|
6116
|
+
`,EL=o(e.EyebrowSmallSemiBoldSp)`
|
|
6117
6117
|
color: ${({theme:e})=>e.colors.grey1};
|
|
6118
6118
|
letter-spacing: 0.5px;
|
|
6119
6119
|
white-space: nowrap;
|
|
6120
|
-
`,
|
|
6120
|
+
`,vL=o.div`
|
|
6121
6121
|
display: flex;
|
|
6122
6122
|
gap: ${e.Space.sp1};
|
|
6123
6123
|
`,$L=o(e.SmallMediumBtn)`
|
|
@@ -6160,5 +6160,5 @@
|
|
|
6160
6160
|
`,DL=o(e.SmallRegularP)`
|
|
6161
6161
|
color: ${e=>e.theme.colors.alert};
|
|
6162
6162
|
margin-top: ${e.Space.sp2};
|
|
6163
|
-
`;exports.AIAgentsActivatingPage=e.AIAgentsActivatingPage,exports.AIIconButton=e.AIIconButton,exports.AIPerformancePage=e.AIPerformancePage,exports.ALL_AI_CFO_MENU_OPTIONS=e.ALL_AI_CFO_MENU_OPTIONS,exports.ALL_INVOICING_MENU_GROUPS=e.ALL_INVOICING_MENU_GROUPS,exports.ALL_INVOICING_MENU_OPTIONS=e.ALL_INVOICING_MENU_OPTIONS,exports.ALL_SETTINGS_MENU_OPTIONS=e.ALL_SETTINGS_MENU_OPTIONS,exports.APP_DRAWER_CONTENT_WIDTH_PX=e.APP_DRAWER_CONTENT_WIDTH_PX,exports.AccountInfoPage=e.AccountInfoPage,exports.AccountLockedInfoModal=e.AccountLockedInfoModal,exports.AccountReconDetailsDrawerPage=e.AccountReconDetailsDrawerPage,exports.AccountReconDetailsDrawerPageV2=e.AccountReconDetailsDrawerPage$1,exports.ActivityIndicator=e.ActivityIndicator,exports.ActualMatchingMatchDetailPage=e.ActualMatchingMatchDetailPage,exports.AddAddressForCardDrawer=e.AddAddressForCardDrawer,exports.AddToWalletPage=e.AddToWalletPage,exports.AddressFormPage=e.AddressFormPage,exports.AgingReportsPage=e.AgingReportsPage,exports.AiCfoChatHeader=e.AiCfoChatHeader,exports.AiCfoMenuContent=e.AiCfoMenuContent,exports.AiCfoOnboardingPage=e.AiCfoOnboardingPage,exports.AiCfoPage=e.AiCfoPage,exports.AiCfoScopeModal=e.AiCfoScopeModal,exports.AiCfoScopeModalScrollBody=e.AiCfoScopeModalScrollBody,exports.AiCfoSidePanel=e.AiCfoSidePanel,exports.AiCfoSkillsBrowser=e.AiCfoSkillsBrowser,exports.AiFinanceTeamReadyPage=e.AiFinanceTeamReadyPage,exports.AllowBlockChipPicker=e.AllowBlockChipPicker,exports.AnalyticsOnLoad=e.AnalyticsOnLoad,exports.ApAgingDetailPage=e.ApAgingDetailPage,exports.AppBasePage=e.AppBasePage,exports.AppDrawerContent=e.AppDrawerContent,exports.AppDrawerHeightMobile=e.AppDrawerHeightMobile,exports.ApprovalRulesSettingsPage=e.ApprovalRulesSettingsPage,exports.ArAgingDetailPage=e.ArAgingDetailPage,exports.AskAiCfoNavButton=e.AskAiCfoNavButton,exports.AskAiCfoNavButtonWhenEnabled=e.AskAiCfoNavButtonWhenEnabled,exports.AttachmentView=e.AttachmentView,exports.AutoTransferRulePage=e.AutoTransferRulePage,exports.BackNavigationProvider=e.BackNavigationProvider,exports.BankConnectionsSettingsPage=e.BankConnectionsSettingsPage,exports.BillDetailPage=e.BillDetailPage,exports.BillDetailPageSkeleton=e.BillDetailPageSkeleton,exports.BillPayApprovalRuleDetailPage=e.BillPayApprovalRuleDetailPage,exports.BillPayApprovalRuleDetailPageV1=e.BillPayApprovalRuleDetailPage$1,exports.BillPayApprovalRulesPage=e.BillPayApprovalRulesPage,exports.BillPayApprovalRulesPageV1=e.BillPayApprovalRulesPage$1,exports.BillPayPromoPage=e.BillPayPromoPage,exports.BillPaySetUpLoading=e.SpendManagementSetUpLoading,exports.BillPaySetUpPage=e.BillPaySetUpPage,exports.BillingSettingsPage=e.BillingSettingsPage,exports.BillsBulkReviewDrawerPage=e.BillsBulkReviewDrawerPage,exports.BusinessVerificationPage=e.BusinessVerificationPage,exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT=e.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT,exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION=e.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION,exports.COMMAND_CENTER_SUBMENU_TYPES=e.COMMAND_CENTER_SUBMENU_TYPES,exports.COMMENT_NOTIFICATION_KINDS=e.COMMENT_NOTIFICATION_KINDS,exports.CapitalizationOnboardingPopup=e.CapitalizationOnboardingPopup,exports.CapitalizationSettingsSection=e.CapitalizationSettingsSection,exports.CardPolicyCreatePage=e.CardPolicyCreatePage,exports.CardPolicyEditPage=e.CardPolicyEditPage,exports.CardPolicyFormPageSkeleton=e.CardPolicyFormPageSkeleton,exports.CardPolicyFormSections=e.CardPolicyFormSections,exports.CardPolicyListPage=e.CardPolicyListPage,exports.CardPolicyListPageSkeleton=e.CardPolicyListPageSkeleton,exports.CardPolicyListRow=e.CardPolicyListRow,exports.CardPolicyListSkeletonRow=e.CardPolicyListSkeletonRow,exports.CardPolicyManualEmptyState=e.CardPolicyManualEmptyState,exports.CardsAiCfoHero=e.CardsAiCfoHero,exports.CardsShutdownBanner=e.CardsShutdownBanner,exports.CashbackDetailLoading=e.CashbackDetailLoading,exports.CashbackDetailPage=e.CashbackDetailPage,exports.ChargeCardCVVActivate=e.ChargeCardCVVActivate,exports.ChargeCardDetailLoading=e.ChargeCardDetailLoading,exports.ChargeCardDetailPage=e.ChargeCardDetailPage,exports.ChargeCardListLoading=e.ChargeCardListLoading,exports.ChargeCardListPage=e.ChargeCardListPage,exports.ChargeCardListSkeletonRow=e.ChargeCardListSkeletonRow,exports.ChargeCardPaymentHistoryPage=e.ChargeCardPaymentHistoryPage,exports.ChargeCardPromoPage=e.ChargeCardPromoPage,exports.ChargeCardPromoPageSkeleton=e.ChargeCardPromoPageSkeleton,exports.ChargeCardSetUpPage=e.ChargeCardSetUpPage,exports.ChargeCardSetupLoading=e.SpendManagementSetUpLoading,exports.ChargeCardStatementsLoading=e.ChargeCardStatementsLoading,exports.ChargeCardStatementsPage=e.ChargeCardStatementsPage,exports.ChargeCardUserOnboardingPromoPage=e.ChargeCardUserOnboardingPromoPage,exports.ChargeCardUserOnboardingPromoPageSkeleton=e.ChargeCardUserOnboardingPromoPageSkeleton,exports.CheckDepositDrawerPage=e.CheckDepositDrawerPage,exports.ClickableRow=e.ClickableRow,exports.CollaborationGlobalStyles=e.CollaborationGlobalStyles,exports.CollaborationProvider=e.CollaborationProvider,exports.CollaborationRoomProvider=e.CollaborationRoomProvider,exports.Colors=e.Colors,exports.CommentsAndNotesCount=e.CommentsAndNotesCount,exports.CommentsDrawerProvider=e.CommentsDrawerProvider,exports.CompanyOfficerOnboardingDetailsSection=e.CompanyOfficerOnboardingDetailsSection,exports.CompanyOnboardingDetailsSection=e.CompanyOnboardingDetailsSection,exports.CompanyPassportCard=e.CompanyPassportCard,exports.CompanyPassportPage=e.CompanyPassportPage,exports.CompleteProfile=e.CompleteProfile,exports.ConfettiBurst=e.ConfettiBurst,exports.ConfirmationPopup=e.ConfirmationPopup,exports.ConnectDataSourcesPage=e.ConnectDataSourcesPage,exports.CreateOrEditVendorPage=e.CreateOrEditVendorPage,exports.CreateOrEditVendorPageSkeleton=e.CreateOrEditVendorPageSkeleton,exports.CreatedEntitiesAnswer=e.CreatedEntitiesAnswer,exports.CreatingEntitiesAnswerLoading=e.CreatingEntitiesAnswerLoading,exports.CreditCardPaymentDrawerPage=e.CreditCardPaymentDrawerPage,exports.CustomerOnboardingContainerPage=e.CustomerOnboardingContainerPage,exports.CustomerOnboardingNoStepsPage=e.CustomerOnboardingNoStepsPage,exports.CustomerOnboardingPage=e.CustomerOnboardingPage,exports.CustomerOnboardingProductSuitePage=e.CustomerOnboardingProductSuitePage,exports.Dashboard=e.Dashboard,exports.DashboardReportPage=e.DashboardReportPage,exports.DashboardSidebarLogoAnimation=e.DashboardSidebarLogoAnimation,exports.DataListTable=e.DataListTable,exports.DataListTableHeader=e.DataListTableHeader,exports.DataListTableRow=e.DataListTableRow,exports.DataListTableSortIndicator=e.DataListTableSortIndicator,exports.DebitCardSetPin=e.DebitCardSetPin,exports.DropdownPortalContext=e.DropdownPortalContext,exports.EditPeoplePage=e.EditPeoplePage,exports.EditReimbursementDetailPage=e.EditReimbursementDetailPage,exports.EditableBillDetailPage=e.EditableBillDetailPage,exports.EntityDetailPage=e.EntityDetailPage,exports.ErrorBoundaryWrapper=e.ErrorBoundaryWrapper,exports.ExcludedAccountReconDetailsDrawerPage=e.ExcludedAccountReconDetailsDrawerPage,exports.ExpenseAutomationOverviewPage=e.ExpenseAutomationOverviewPage,exports.ExpenseAutomationOverviewPageSkeleton=e.ExpenseAutomationOverviewPageSkeleton,exports.ExpenseAutomationPage=e.ExpenseAutomationPage,exports.ExpressPayPage=e.ExpressPayPage,exports.FeatureDynamicConfigNames=e.DynamicConfigNames,exports.FeatureGatesNames=e.FeatureGatesNames,exports.FeaturePreviewPage=e.FeaturePreviewPage,exports.FeatureProvider=e.FeatureProvider,exports.FieldHelpIcon=e.FieldHelpIcon,exports.FieldHelpProvider=e.FieldHelpProvider,exports.FirstReviewVendorDetailPage=e.FirstReviewVendorDetailPage,exports.FontWeight=e.FontWeight,exports.GlobalInfoProvider=e.GlobalInfoProvider,exports.GlobalReviewListPage=e.GlobalReviewListPage,exports.INVOICING_SETTINGS_NAV_SECTIONS=e.INVOICING_SETTINGS_NAV_SECTIONS,exports.INVOICING_SETTINGS_TABS=e.INVOICING_SETTINGS_TABS,exports.InformationCardStack=e.InformationCardStack,exports.InitialCollaborationProvider=e.InitialCollaborationProvider,exports.InsightsCardStack=e.InsightCardStack,exports.IntegrationCardView=e.IntegrationCardView,exports.IntegrationsCardGrid=e.IntegrationsCardGrid,exports.IntegrationsSection=e.IntegrationsSection,exports.IntegrationsSettingsPage=e.IntegrationsSettingsPage,exports.InternationalWireVerificationPage=e.InternationalWireVerificationPage,exports.InviteFormPage=e.InviteFormPage,exports.InvitePageListView=e.InvitePageListView,exports.InvitePeoplePage=e.InvitePeoplePage,exports.InvoiceUploadSection=e.InvoiceUploadSection,exports.InvoiceUploadSectionSkeleton=e.InvoiceUploadSectionSkeleton,exports.InvoicingAddPaymentMethodDialog=e.InvoicingAddPaymentMethodDialog,exports.InvoicingAuditLogPage=e.InvoicingAuditLogPage,exports.InvoicingBrandingSettingsPage=e.InvoicingBrandingSettingsPage,exports.InvoicingCatalogItemDetailPage=e.InvoicingCatalogItemDetailPage,exports.InvoicingCatalogItemFormPage=e.InvoicingCatalogItemFormPage,exports.InvoicingCatalogPage=e.InvoicingCatalogPage,exports.InvoicingCouponFormPage=e.InvoicingCouponFormPage,exports.InvoicingCreateInvoicePage=e.InvoicingCreateInvoicePage,exports.InvoicingCreateInvoiceSkeleton=e.InvoicingCreateInvoiceSkeleton,exports.InvoicingCreatePromotionalCreditsDialog=e.InvoicingCreatePromotionalCreditsDialog,exports.InvoicingCreditDetailPage=e.InvoicingCreditDetailPage,exports.InvoicingCreditListPage=e.InvoicingCreditListPage,exports.InvoicingCustomerDetailPage=e.InvoicingCustomerDetailPage,exports.InvoicingCustomerFormPage=e.InvoicingCustomerFormPage,exports.InvoicingCustomerListPage=e.InvoicingCustomerListPage,exports.InvoicingDashboardSkeleton=e.InvoicingDashboardSkeleton,exports.InvoicingDataImportDetailPage=e.InvoicingDataImportDetailPage,exports.InvoicingDataImportHubPage=e.InvoicingDataImportHubPage,exports.InvoicingDataImportMigratePage=e.InvoicingDataImportMigratePage,exports.InvoicingDetailScaffold=e.InvoicingDetailScaffold,exports.InvoicingDiscountDetailPage=e.InvoicingDiscountDetailPage,exports.InvoicingDiscountListPage=e.InvoicingDiscountListPage,exports.InvoicingDunningDetailPage=e.InvoicingDunningDetailPage,exports.InvoicingDunningEmailComposerDialog=e.InvoicingDunningEmailComposerDialog,exports.InvoicingDunningListPage=e.InvoicingDunningListPage,exports.InvoicingDunningSettingsPage=e.InvoicingDunningSettingsPage,exports.InvoicingEmptyState=e.InvoicingEmptyState,exports.InvoicingIntegrationsSettingsPage=e.InvoicingIntegrationsSettingsPage,exports.InvoicingInvoiceDetailPage=e.InvoicingInvoiceDetailPage,exports.InvoicingInvoiceListPage=e.InvoicingInvoiceListPage,exports.InvoicingIssueCreditNotePage=e.InvoicingIssueCreditNotePage,exports.InvoicingOverviewPage=e.InvoicingOverviewPage,exports.InvoicingPaymentDestinationSettingsPage=e.InvoicingPaymentDestinationSettingsPage,exports.InvoicingPaymentLinkEmailComposerDialog=e.InvoicingPaymentLinkEmailComposerDialog,exports.InvoicingPaymentLinkPage=e.InvoicingPaymentLinkPage,exports.InvoicingPaymentListPage=e.InvoicingPaymentListPage,exports.InvoicingPromoPage=e.InvoicingPromoPage,exports.InvoicingQBOSettingsPage=e.InvoicingQBOSettingsPage,exports.InvoicingRecordPaymentPage=e.InvoicingRecordPaymentPage,exports.InvoicingSettingsHubPage=e.InvoicingSettingsHubPage,exports.InvoicingSettingsPage=e.InvoicingSettingsHubPage,exports.InvoicingSubscriptionDetailPage=e.InvoicingSubscriptionDetailPage,exports.InvoicingSubscriptionFormPage=e.InvoicingSubscriptionFormPage,exports.InvoicingSubscriptionListPage=e.InvoicingSubscriptionListPage,exports.InvoicingTransactionDetailPage=e.InvoicingTransactionDetailPage,exports.InvoicingVoidInvoiceDialog=e.InvoicingVoidInvoiceDialog,exports.IssueChargeCardPage=e.IssueChargeCardPage,exports.IssueChargeCardPageSkeleton=e.IssueChargeCardPageSkeleton,exports.JEOneTimeAccrualDetailPage=e.JEOneTimeAccrualDetailPage,exports.LinkBillExpensePage=e.LinkBillExpensePage,exports.LinkJETransactionPage=e.LinkJETransactionPage,exports.Loader=e.Loader,exports.LogoutButton=e.LogoutButton,exports.MCC_CHIP_ID_PREFIX=e.MCC_CHIP_ID_PREFIX,exports.MEETING_LINK_DEFAULTS=e.MEETING_LINK_DEFAULTS,exports.MagicLinkDomesticWireDetailsPage=e.MagicLinkDomesticWireDetailsPage,exports.MagicLinkInternationalWireDetailsPage=e.MagicLinkInternationalWireDetailsPage,exports.MagicLinkSuccessPage=e.MagicLinkSuccessPage,exports.MagicLinkVendorACHDetailsPage=e.MagicLinkVendorACHDetailsPage,exports.Modal=e.Modal,exports.MonthEndEmailDrawerCustomerRequestPage=e.MonthEndEmailDrawerCustomerRequestPage,exports.MyBankConnectionsSettingsPage=e.MyBankConnectionsSettingsPage,exports.MyPendingActivationChargeCardListPage=e.MyPendingActivationChargeCardListPage,exports.MyProfileSettingsPage=e.MyProfileSettingsPage,exports.NavBar=e.NavBar,exports.NavBarRightRowStyled=e.NavBarRightRowStyled,exports.NewGlobalMerchantPage=e.NewGlobalMerchantPage,exports.NewUpdateAvailablePage=e.NewUpdateAvailablePage,exports.NotFoundPage=e.NotFoundPage,exports.NotificationIcon=e.SvgNotification,exports.NotificationSettingsPage=e.NotificationSettingsPage,exports.NotificationsPage=e.NotificationsPage,exports.OAuthConsentPage=e.OAuthConsentPage,exports.OnboardingInitialLoader=e.OnboardingInitialLoader,exports.OnboardingSidebar=e.OnboardingSidebar,exports.OnboardingStepFrame=e.OnboardingStepFrame,exports.OpExByVendorPage=e.OpExByVendorPage,exports.OverlayContainerPage=e.OverlayContainerPage,exports.PandLWithForecastPage=e.PandLWithForecastPage,exports.PanelDirtyGuardContext=e.PanelDirtyGuardContext,exports.PanelInternalContext=e.PanelInternalContext,exports.PaymentAccountSetupBillingAddressSection=e.PaymentAccountSetupBillingAddressSection,exports.PeoplePage=e.PeoplePage,exports.Picker=e.Picker,exports.PolicyLimitsRowList=e.PolicyLimitsRowList,exports.PolicyModeSelector=e.PolicyModeSelector,exports.PortfolioAllocationFormPage=e.PortfolioAllocationFormPage,exports.QBOConnectionDialog=e.QBOConnectionDialog,exports.QBOSetupSectionWithForm=e.QBOSetupSectionWithForm,exports.QuickResponsesPage=e.QuickResponsesPage,exports.QuickViewModeContext=e.QuickViewModeContext,exports.RIGHT_SIDE_PANEL_WIDTH_PX=e.RIGHT_SIDE_PANEL_WIDTH_PX,exports.RecommendationFeedbackPopup=e.RecommendationFeedbackPopup,exports.ReferralDrawerPage=e.DrawerPage,exports.ReimbursementApprovalRuleDetailPage=e.ReimbursementApprovalRuleDetailPage,exports.ReimbursementApprovalRuleDetailPageV1=e.ReimbursementApprovalRuleDetailPage$1,exports.ReimbursementApprovalRulesPage=e.ReimbursementApprovalRulesPage,exports.ReimbursementApprovalRulesPageV1=e.ReimbursementApprovalRulesPage$1,exports.ReimbursementDetailPage=e.ReimbursementDetailPage,exports.ReimbursementDetailPageSkeleton=e.ReimbursementDetailPageSkeleton,exports.ReimbursementPromoPage=e.ReimbursementPromoPage,exports.ReimbursementSetUpLoading=e.SpendManagementSetUpLoading,exports.ReimbursementSetUpPage=e.RemiSetupPage,exports.RemisBulkReviewDrawerPage=e.ReimbursementsBulkReviewDrawerPage,exports.ReportsPage=e.ReportsPage,exports.ResponsiveSized=e.ResponsiveSized,exports.ReviewBillDetailsPage=e.ReviewBillDetailsPage,exports.ReviewConfirmTransferPanel=e.ReviewConfirmTransferPanel,exports.ReviewDetailsPageSkeleton=e.ReviewDetailsPageSkeleton,exports.ScheduleDetailSkeleton=e.ScheduleDetailSkeleton,exports.ScheduleDetailsAccruedExpensesPage=e.ScheduleDetailsAccruedExpensesPage,exports.ScheduleDetailsFixedAssetsPage=e.ScheduleDetailsFixedAssetsPage,exports.ScheduleDetailsPage=e.ScheduleDetailsPage,exports.SearchableCheckboxCardList=e.SearchableCheckboxCardList,exports.SessionTimeoutPopup=e.SessionTimeoutPopup,exports.SidePanelContext=e.SidePanelContext,exports.SidePanelLayout=e.SidePanelLayout,exports.SidePanelProvider=e.SidePanelProvider,exports.SignIn=e.SignIn,exports.SomethingWrongPage=e.SomethingWrongPage,exports.Space=e.Space,exports.SpendManagementListLoading=e.SpendManagementListLoading,exports.SpendManagementListViewPage=e.SpendManagementListViewPage,exports.StatementParseInfo=e.StatementParseInfoEntry,exports.StatementProcessingPage=e.StatementProcessingPage,exports.StatementsPage=e.StatementsPage,exports.StyledCapsule=e.StyledCapsule,exports.SubscriptionDetailPage=e.SubscriptionDetailPage,exports.SubscriptionSummaryPage=e.SubscriptionSummaryPage,exports.SyntheticAiCfoAnswerView=e.SyntheticAiCfoAnswerView,exports.THREAD_RESOLVED_NOTIFICATION_KIND=e.THREAD_RESOLVED_NOTIFICATION_KIND,exports.THREAD_UNRESOLVED_NOTIFICATION_KIND=e.THREAD_UNRESOLVED_NOTIFICATION_KIND,exports.TaskDetailPage=e.TaskDetailPage,exports.TaskManagementPage=e.TaskManagementPage,exports.TenantsDropDown=e.TenantsDropDown,exports.TextStyle=e.TextStyle,exports.ToolkitProvider=e.ToolkitProvider,exports.TopExDetailPage=e.TopExDetailPage,exports.TransactionActivityLogPage=e.TransactionActivityLogPage,exports.TransactionActivityLogPanel=e.TransactionActivityLogPanel,exports.TransactionDetailPage=e.TransactionDetailPage,exports.TransactionDetailSkeleton=e.TransactionDetailSkeleton,exports.TransactionListBig=e.TransactionListBig,exports.TransactionListComments=e.TransactionListComments,exports.TransactionListPage=e.TransactionListPage,exports.TransactionVendorDetailPage=e.TransactionVendorDetailPage,exports.TransferDrawerPage=e.TransferDrawerPage,exports.TreasuryOverviewPage=e.TreasuryOverviewPage,exports.TreasuryPromoPage=e.TreasuryPromoPage,exports.TreasurySetUpPage=e.TreasurySetUpPage,exports.TreasuryStatementsPage=e.TreasuryStatementsPage,exports.TreasuryTaxLetterPage=e.TreasuryTaxLetterPage,exports.TreasuryTransferOrReviewPage=e.TreasuryTransferOrReviewPage,exports.TrendChart=e.TrendChart,exports.UncategorizedAccountsMappingPage=e.UncategorizedAccountsMappingPage,exports.UnitIntegrationPage=e.UnitIntegrationPage,exports.VENDOR_CHIP_ID_PREFIX=e.VENDOR_CHIP_ID_PREFIX,exports.Vendor2FAPopup=e.Vendor2FAPopup,exports.VendorACHDetailsPage=e.VendorACHDetailsPage,exports.VendorAccruedSchedulesPage=e.VendorAccruedSchedulesPage,exports.VendorDetailPage=e.VendorDetailPage,exports.VendorDomesticWireDetailsPage=e.VendorDomesticWireDetailsPage,exports.VendorFiling1099DetailsEditablePage=e.VendorFiling1099DetailsEditablePage,exports.VendorFiling1099EditableFormSkeleton=e.VendorFiling1099EditableFormSkeleton,exports.VendorFiling1099ListPage=e.VendorFiling1099ListPage,exports.VendorFirstReviewPage=e.VendorFirstReviewPage,exports.VendorInternationalSwiftBasedDetailsPage=e.VendorInternationalSwiftBasedDetailsPage,exports.VendorInternationalWireDetailsPage=e.VendorInternationalWireDetailsPage,exports.VendorListPage=e.VendorListPage,exports.VendorSchedulesPage=e.VendorSchedulesPage,exports.VerificationFrame=e.VerificationFrame,exports.VerifyDevice=e.VerifyDevice,exports.VerifyUnlockFinancialStackPage=e.VerifyUnlockFinancialStackPage,exports.WebV2MicroService=e.WebV2MicroService,exports.WebV2MicroServiceProvider=e.WebV2MicroServiceProvider,exports.WelcomeAnimation=e.WelcomeAnimation,exports.WindowSizeProvider=e.WindowSizeProvider,exports.ZeniAccountDetailLoading=e.ZeniAccountDetailLoading,exports.ZeniAccountDetailNavBarTitleShimmer=e.ZeniAccountDetailNavBarTitleShimmer,exports.ZeniAccountDetailPage=e.ZeniAccountDetailPage,exports.ZeniAccountListLoading=e.ZeniAccountListLoading,exports.ZeniAccountListViewPage=e.ZeniAccountListViewPage,exports.ZeniAccountPromoPage=e.ZeniAccountPromoPage,exports.ZeniAccountSetUpPage=e.ZeniAccountSetUpPage,exports.ZeniText=e.ZeniText,exports.ZeniThemeProvider=e.ZeniThemeProvider,exports.alignToJustify=e.alignToJustify,exports.amountToString=e.amountToString,exports.amountValueToString=e.amountValueToString,exports.appLocale=e.appLocale,exports.applyExtractedPolicyRulesToFormValues=e.applyExtractedPolicyRulesToFormValues,exports.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm=e.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm,exports.buildCardPolicyFormValuesFromRequest=e.buildCardPolicyFormValuesFromRequest,exports.buildCreateCardPolicyTemplateRequest=e.buildCreateCardPolicyTemplateRequest,exports.buildCreateCardPolicyTemplateRequestFromInteractiveForm=e.buildCreateCardPolicyTemplateRequestFromInteractiveForm,exports.buildMccCategoryChipId=e.buildMccCategoryChipId,exports.buildStickyKeySet=e.buildStickyKeySet,exports.buildVendorChipId=e.buildVendorChipId,exports.cellVerticalAlignToFlexAlign=e.cellVerticalAlignToFlexAlign,exports.clearAutoLogoutContext=e.clearAutoLogoutContext,exports.clickableRowStyles=e.clickableRowStyles,exports.computeRecommendationSelectionFeedback=e.computeRecommendationSelectionFeedback,exports.computeStatementProcessingStepsFromElapsedTime=e.computeStatementProcessingStepsFromElapsedTime,exports.computeStickyLeftOffsets=e.computeStickyLeftOffsets,exports.darkColors=e.darkColors,exports.darkTheme=e.darkTheme,exports.dashboardCardDimension=e.designDimension,exports.defaultCardPolicyFormValues=e.defaultCardPolicyFormValues,exports.describeSchedule=e.describeSchedule,exports.formatReconAccountDisplayName=e.formatReconAccountDisplayName,exports.getAlpha2=e.getAlpha2,exports.getAlpha3=e.getAlpha3,exports.getColorForALabel=e.getColorForALabel,exports.getCountries=e.getCountries,exports.getCustomerDataFromAutoComplete=e.getCustomerDataFromAutoComplete,exports.getFullName=e.getFullName,exports.getInitialOpenThreadRequestFromSearch=e.getInitialOpenThreadRequestFromSearch,exports.getRecipientTotalAmount=e.getRecipientTotalAmount,exports.getReconAccountDisplayName=e.getReconAccountDisplayName,exports.getShowNegativeAmountInParenthesisDefaultValue=e.getShowNegativeAmountInParenthesisDefaultValue,exports.getShowNegativeAmountInParenthesisForPercentDefaultValue=e.getShowNegativeAmountInParenthesisForPercentDefaultValue,exports.getStableTransactionId=e.getStableTransactionId,exports.getStatementParseTransactionCount=e.getStatementParseTransactionCount,exports.getTransactionAppliedFiltersCount=e.getTransactionAppliedFiltersCount,exports.invoicingMenuList=e.invoicingMenuList,exports.isCloseManagementMenu=e.isCloseManagementMenu,exports.isClosedCardStatus=e.isClosedCardStatus,exports.isCollaborationEntityType=e.isCollaborationEntityType,exports.isCommentNotificationKind=e.isCommentNotificationKind,exports.isMobileOrTabletView=e.isMobileOrTabletView,exports.isMobilePhoneScreen=e.isMobilePhoneScreen,exports.isRecommendationFeedbackDimension=e.isRecommendationFeedbackDimension,exports.lightColors=e.lightColors,exports.lightTheme=e.lightTheme,exports.menuList=e.menuList,exports.mergeColumnDeclarativeWithRenderers=e.mergeColumnDeclarativeWithRenderers,exports.mergeLayoutDefaults=e.mergeLayoutDefaults,exports.percentValueToString=e.percentValueToString,exports.resolveBackgroundStatementProcessingCompletedSteps=e.resolveBackgroundStatementProcessingCompletedSteps,exports.resolveColumnWidth=e.resolveColumnWidth,exports.roundAmountIfNeeded=e.roundAmountIfNeeded,exports.roundOffNumberToTwoDecimal=e.roundOffNumberToTwoDecimal,exports.routineIdFromSession=e.routineIdFromSession,exports.setAutoLogoutContext=e.setAutoLogoutContext,exports.setShowNegativeAmountInParenthesisDefaultValue=e.setShowNegativeAmountInParenthesisDefaultValue,exports.setShowNegativeAmountInParenthesisForPercentDefaultValue=e.setShowNegativeAmountInParenthesisForPercentDefaultValue,exports.settingMenuList=e.settingMenuList,exports.shortCadence=e.shortCadence,exports.sp=e.sp,exports.textAlignForCell=e.textAlignForCell,exports.textStyles=e.textStyles,exports.toGroupedAccountingClassOptions=e.toGroupedAccountingClassOptions,exports.toGroupedQboAccountOptions=e.toGroupedQboAccountOptions,exports.toInstitutionLogoDataUri=e.toInstitutionLogoDataUri,exports.toInvoicingMenuOptionType=e.toInvoicingMenuOptionType,exports.toInvoicingMenuOptionTypeStrict=e.toInvoicingMenuOptionTypeStrict,exports.toMccCategoryChipFieldValue=e.toMccCategoryChipFieldValue,exports.toMenuOptionType=e.toMenuOptionType,exports.toSettingsMenuOptionTypeStrict=e.toSettingsMenuOptionTypeStrict,exports.toSupportedLocaleStrict=e.toSupportedLocaleStrict,exports.toVendorChipFieldValue=e.toVendorChipFieldValue,exports.trackTreasuryTransferAnalytics=e.trackTreasuryTransferAnalytics,exports.uploadAttachmentReceipts=e.uploadAttachmentReceipts,exports.useApprovalRulesV3Config=e.useApprovalRulesV3Config,exports.useBackNavigation=e.useBackNavigation,exports.useCollaborationInfoContext=e.useCollaborationInfoContext,exports.useCommentsDrawer=e.useCommentsDrawer,exports.useDropdownPortal=e.useDropdownPortal,exports.useExpenseAutomationEnabledForUser=e.useExpenseAutomationEnabledForUser,exports.useFieldHelp=e.useFieldHelp,exports.useGlobalInfoContext=e.useGlobalInfoContext,exports.useLockBodyScroll=e.useLockBodyScroll,exports.useMeetingLinks=e.useMeetingLinks,exports.usePanelDirtyGuardRegistry=e.usePanelDirtyGuardRegistry,exports.usePanelInternal=e.usePanelInternal,exports.usePrevious=e.usePrevious,exports.useQuickViewMode=e.useQuickViewMode,exports.useRegisterBackHandler=e.useRegisterBackHandler,exports.useRegisterPanelDirtyGuard=e.useRegisterPanelDirtyGuard,exports.useRequestCloseAllCommentDrawers=e.useRequestCloseAllCommentDrawers,exports.useSessionAutoLogoutConfig=e.useSessionAutoLogoutConfig,exports.useSidePanelContext=e.useSidePanelContext,exports.useToolkitContext=e.useToolkitContext,exports.useWindowSizeContext=e.useWindowSizeContext,exports.useZeniCardsVisibilityConfig=e.useZeniCardsVisibilityConfig,exports.useZeniFeatureContext=e.useZeniFeatureContext,exports.useZeniTheme=e.useTheme,exports.useZeniThemeContext=e.useZeniThemeContext,exports.waitFor=e.waitFor,exports.zeniStyled=e.styled,exports.zeniEmotionStyled=o,Object.defineProperty(exports,"buildInvoicingEntityPath",{enumerable:!0,get:()=>r.buildInvoicingEntityPath}),Object.defineProperty(exports,"isInvoicingEntityLinkable",{enumerable:!0,get:()=>r.isInvoicingEntityLinkable}),exports.AiAccountantDetailDrawer=({customer:o,hasMoreJobs:n,jobs:r,jobsFetchStatus:i,onAction:s,onCancelOnboarding:a,onClose:l,onLoadMoreJobs:d})=>{const[c,p]=t.useState(null),u=OC(),m=o.enrollment?.status??"unknown",x=o.enrollment,h=x?.accuracy??{},g="In-Progress"===i.fetchState,y=e=>e<r.length,S=()=>{n&&!g&&d()};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(XC,{children:[e.jsxRuntimeExports.jsx(QC,{children:e.jsxRuntimeExports.jsxs(JC,{children:[e.jsxRuntimeExports.jsx(ef,{}),e.jsxRuntimeExports.jsxs(tf,{children:[e.jsxRuntimeExports.jsx(of,{children:o.companyName}),e.jsxRuntimeExports.jsx(nf,{children:o.tenantId})]}),e.jsxRuntimeExports.jsx(rf,{onClick:l,children:e.jsxRuntimeExports.jsx(sf,{})})]})}),e.jsxRuntimeExports.jsxs(af,{children:[e.jsxRuntimeExports.jsxs(lf,{children:[e.jsxRuntimeExports.jsx(cf,{children:GC.drawer.enrollmentDetails}),e.jsxRuntimeExports.jsxs(pf,{children:[e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:HC}),e.jsxRuntimeExports.jsx(xf,{children:LC(m)})]}),e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:GC.drawer.onboarded}),e.jsxRuntimeExports.jsx(xf,{title:null!=x?.onboardedAt?x.onboardedAt.format(UC.hmmADashDDMMMCommaYYYY):void 0,children:null!=x?.onboardedAt?x.onboardedAt.format(WC.visual.MMMDCommaYYYYformat):MC.emDash})]}),e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:BC}),e.jsxRuntimeExports.jsx(xf,{title:null!=x?.latestTraining?x.latestTraining.format(UC.hmmADashDDMMMCommaYYYY):void 0,children:null!=x?.latestTraining?x.latestTraining.format(WC.visual.MMMDCommaYYYYformat):MC.emDash})]}),e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:VC}),e.jsxRuntimeExports.jsx(xf,{title:null!=x?.latestTransactionSync?x.latestTransactionSync.local().format(UC.hmmADashDDMMMCommaYYYY):void 0,children:null!=x?.latestTransactionSync?x.latestTransactionSync.utc(!0).fromNow():MC.emDash})]}),null!=x?.offboardedAt&&e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:_C}),e.jsxRuntimeExports.jsx(xf,{title:x.offboardedAt.format(UC.hmmADashDDMMMCommaYYYY),children:x.offboardedAt.format(WC.visual.MMMDCommaYYYYformat)})]})]})]}),e.jsxRuntimeExports.jsxs(lf,{children:[e.jsxRuntimeExports.jsx(cf,{children:GC.drawer.modelAccuracy}),Object.keys(h).length>0?e.jsxRuntimeExports.jsx(hf,{children:Object.entries(h).map(([t,o])=>{const n=100*o,r=YC(n),i=`${n.toFixed(0)}${MC.percentage}`,s=`${n.toFixed(1)}${MC.percentage}`;return e.jsxRuntimeExports.jsxs(gf,{children:[e.jsxRuntimeExports.jsx(yf,{children:ZC(t)}),e.jsxRuntimeExports.jsx(Sf,{children:e.jsxRuntimeExports.jsx(Cf,{style:{width:i,backgroundColor:r}})}),e.jsxRuntimeExports.jsx(ff,{children:s})]},t)})}):e.jsxRuntimeExports.jsx(bf,{children:GC.drawer.noAccuracyData})]}),u&&e.jsxRuntimeExports.jsxs(lf,{children:[e.jsxRuntimeExports.jsx(cf,{children:NC}),e.jsxRuntimeExports.jsx(jf,{children:AC(m).map(t=>e.jsxRuntimeExports.jsx(e.Button,{label:GC.actions[t.labelKey],variant:t.destructive?"destructive":"outline",size:"small",onClick:()=>{"cancel_onboarding"===t.operationType?a(o):(e=>{p({operationType:e})})(t.operationType)}},t.operationType))})]}),e.jsxRuntimeExports.jsxs(df,{children:[e.jsxRuntimeExports.jsx(cf,{children:GC.drawer.jobHistory}),0!==r.length||g?e.jsxRuntimeExports.jsxs(Rf,{children:[e.jsxRuntimeExports.jsxs(wf,{children:[e.jsxRuntimeExports.jsx(Ef,{children:e.jsxRuntimeExports.jsx(e.ExtraSmallSemiBold,{children:GC.drawer.operation})}),e.jsxRuntimeExports.jsx($f,{children:e.jsxRuntimeExports.jsx(e.ExtraSmallSemiBold,{children:HC})}),e.jsxRuntimeExports.jsx(kf,{children:e.jsxRuntimeExports.jsx(e.ExtraSmallSemiBold,{children:FC})}),e.jsxRuntimeExports.jsx(Tf,{children:e.jsxRuntimeExports.jsx(e.ExtraSmallSemiBold,{children:zC})})]}),e.jsxRuntimeExports.jsx(If,{children:e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:o})=>e.jsxRuntimeExports.jsx(e.InfiniteLoader,{isItemLoaded:y,itemCount:n?r.length+1:r.length,loadMoreItems:S,children:({onItemsRendered:n})=>e.jsxRuntimeExports.jsx(e.FixedSizeList,{height:t,width:o,itemCount:r.length,itemSize:jC.jobRowHeightPx,itemData:r,onItemsRendered:n,innerElementType:KC,overscanCount:jC.jobSkeletonRowCount,children:qC})})})}),g&&e.jsxRuntimeExports.jsx(Nf,{children:Array.from({length:jC.jobSkeletonRowCount},(t,o)=>e.jsxRuntimeExports.jsxs(zf,{children:[e.jsxRuntimeExports.jsx(Ff,{$flex:!0,children:e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:o%2==0?90:70,height:jC.skeletonLoaderHeightPx})}),e.jsxRuntimeExports.jsx(Ff,{children:e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:60,height:jC.skeletonLoaderHeightPx})}),e.jsxRuntimeExports.jsx(Ff,{children:e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:e.Space.sp11,height:jC.skeletonLoaderHeightPx})}),e.jsxRuntimeExports.jsx(Ff,{children:e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:70,height:jC.skeletonLoaderHeightPx})})]},`skeleton-${o}`))})]}):e.jsxRuntimeExports.jsx(bf,{children:GC.drawer.noJobsFound})]})]})]}),null!=c&&e.jsxRuntimeExports.jsx(aC,{operationType:c.operationType,dialogTitle:GC.actions[PC[c.operationType].labelKey],dialogDescription:DC(c.operationType,o.companyName),onCancel:()=>p(null),onConfirm:(e,t,n)=>{s(o,e,t,n),p(null)}})]})},exports.AiAccountantPage=({headerData:o,headerActions:n,aiAccountantPageActions:r,aiAccountantPageData:i})=>{const s=e.useWindowSizeContext(),l=OC(),{aiAccountantView:d}=i,{onAction:c,onBulkAction:p,onCancelOnboarding:u,onClearSelection:m,onCockpitReloadData:x,onColumnSortConfigChanged:h,onCustomerSelected:g,onEvaluateAll:y,onFilterTextChanged:S,onFiltersChange:C,onToggleAllVisible:f,onToggleTenantSelection:b}=r,j="Completed"===d.fetchState,R="In-Progress"===d.fetchState||"Not-Started"===d.fetchState,w="Error"===d.fetchState,v="In-Progress"===d.triggerJobStatus.fetchState,E=d.selectedTenantIds,$=E.length,k=d.unonboardedTenantIds.length,T=$>0,I=t.useMemo(()=>{if(!T)return[];const e=d.selectedCustomersForJobTrigger.map(e=>AC(e.enrollment?.status??"unknown"));if(0===e.length)return[];const[t,...o]=e;return t.filter(e=>"cancel_onboarding"!==e.operationType&&o.every(t=>t.some(t=>t.operationType===e.operationType)))},[T,d.selectedCustomersForJobTrigger]),[P,D]=t.useState(!1),A=t.useRef(null),[L,O]=t.useState({top:0,right:0});t.useEffect(()=>{if(P&&null!=A.current){const e=A.current.getBoundingClientRect();O({top:e.bottom,right:window.innerWidth-e.right})}},[P]),t.useEffect(()=>{if(!P)return;const e=()=>D(!1);return document.addEventListener("click",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{document.removeEventListener("click",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[P]);const[M,N]=t.useState(null),z=T||0===k||v;return e.jsxRuntimeExports.jsxs(Ub,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...n,filterActions:{onFilterTextChanged:(e,t)=>{S(t)},getCategoryWiseOptions:Wb,onFiltersChange:C}},headerData:{...o,allTabOptions:o.allTabOptions??F,companiesLoaded:j,filterData:{filterText:d.uiState.filterText,filters:d.uiState.filters},selectedTabOption:"aiAccountant"}}),e.jsxRuntimeExports.jsx(Gb,{windowSize:s,children:R?e.jsxRuntimeExports.jsx(kb,{}):w?e.jsxRuntimeExports.jsx(Ln,{onCockpitReloadData:x,selectedCockpitOption:"aiAccountant"}):e.jsxRuntimeExports.jsxs(nj,{children:[e.jsxRuntimeExports.jsxs(qb,{children:[e.jsxRuntimeExports.jsx(Kb,{children:T&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(Zb,{children:_b.bulkActions.selectedCount.replace("__count__",String($))}),e.jsxRuntimeExports.jsx(Xb,{type:"button",onClick:m,children:Bb.clear})]})}),e.jsxRuntimeExports.jsxs(Yb,{children:[e.jsxRuntimeExports.jsx(Bf,{isEnabled:!R,spinRefreshIcon:R,onClick:()=>x("aiAccountant")}),l&&!T&&e.jsxRuntimeExports.jsx(e.Button,{label:Bb.texts.evaluateAll,variant:"primary",size:"small",disabled:z,onClick:()=>{0===k||v||N({mode:"evaluateAll",count:k})}}),l&&T&&e.jsxRuntimeExports.jsxs(Qb,{children:[e.jsxRuntimeExports.jsxs(Jb,{ref:A,onClick:e=>e.stopPropagation(),children:[e.jsxRuntimeExports.jsx(e.Button,{label:_b.bulkActions.menuLabel,variant:"primary",size:"small",disabled:0===I.length||v,onClick:()=>D(!P)}),P&&I.length>0&&a.createPortal(e.jsxRuntimeExports.jsx(tj,{style:{top:L.top,right:L.right},children:I.map(t=>e.jsxRuntimeExports.jsx(oj,{onClick:()=>(e=>{D(!1),N({mode:"bulk",operationType:e.operationType,operationLabel:_b.actions[e.labelKey],count:$})})(t),children:_b.actions[t.labelKey]},t.operationType))}),document.body)]}),0===I.length&&e.jsxRuntimeExports.jsx(ej,{children:_b.bulkActions.disabledInfo})]})]})]}),e.jsxRuntimeExports.jsx(Mb,{averageAccuracy:d.averageAccuracy,customers:d.customers}),e.jsxRuntimeExports.jsx(Qf,{customers:d.customers,sortKey:d.uiState.sortKey,sortOrder:d.uiState.sortOrder,selectedTenantIds:E,onColumnSortConfigChanged:h,onRowClick:g,onAction:c,onCancelOnboarding:u,onToggleAllVisible:f,onToggleTenantSelection:b})]})}),null!=M&&e.jsxRuntimeExports.jsx(aC,{operationType:"evaluateAll"===M.mode?"evaluate":M.operationType,dialogTitle:"evaluateAll"===M.mode?Bb.texts.evaluateAll:M.operationLabel,dialogDescription:"evaluateAll"===M.mode?_b.bulkActions.evaluateAllDialogDescription.replace("__count__",String(M.count)):"offboard"===M.operationType?_b.bulkActions.bulkDialogDescriptionOffboard.replace("__count__",String(M.count)):_b.bulkActions.bulkDialogDescription.replace("__count__",String(M.count)).replace("__action__",M.operationLabel),onCancel:()=>N(null),onConfirm:(e,t,o)=>{null!=M&&("evaluateAll"===M.mode?y(t,o):p(e,t,o),N(null))}})]})},exports.AuditReportDrawerPage=({isAuditScoreCompleted:o,auditRuleGroups:n,loggedInUser:i,isMonthEnd:s,auditReportGroupView:a,allUsers:l,reviewCompanyView:d,style:c,analytics:p,handleFetchAuditReportGroupView:u,handleGenerateAuditReport:m,handleCancelIconClick:x,handleRuleClick:h,handleReasonAuditRule:g})=>{const y=e.useWindowSizeContext(),[S,C]=t.useState(jP(n,1)),[f,b]=t.useState({id:n[0]?.auditRuleGroupId,index:0}),[j,R]=t.useState(!1),[w,v]=t.useState(1),[E,$]=t.useState(!1),[k,T]=t.useState(null),I=t.useMemo(()=>d?.controllers.map(e=>`${e.user.firstName} ${e.user.middleName} ${e.user.lastName}`)??[],[d?.controllers]);t.useEffect(()=>{a.auditReportGroups.forEach(e=>{a.auditReportGroups.forEach(e=>{e.auditReportGroupId!==f.id||"Completed"!==e.fetchState&&"Error"!==e.fetchState||b({id:n[f.index+1]?.auditRuleGroupId,index:f.index+1})});const t=e.auditReport?.auditRulesGroupReport.find(t=>t.auditRuleGroupId===e.auditReportGroupId);("Completed"===e.fetchState&&f.id===e.auditReportGroupId&&!0===S[e.auditReportGroupId].isActive&&t?.sequence===w||"Error"===e.fetchState&&f.id===e.auditReportGroupId)&&(v(w+1),C(jP(n,w+1)))})},[a.auditReportGroups,w,n,S]),t.useEffect(()=>{0===a.auditReportGroups.filter(e=>"In-Progress"===e.fetchState).length&&R(!0);if(a.auditReportGroups.filter(e=>"Completed"===e.fetchState||"Error"===e.fetchState).length===n.length){$(!0);let e=0;a.auditReportGroups.forEach(t=>{e+=sP(t.auditReport?.auditRulesGroupReport[0]?.auditRules)});const t=RP(a),o=r.dateNow().startOf("month").subtract(1,"date").format(bP.visual.MMMYYYYFormat),n=d?.customerGroup,i=Math.ceil(a.auditReportGroups[0].auditReport?.auditSummary.auditScorePercentage??0);p.trackAuditScorePercentage(r.dateNow().format(bP.analytics.MMSlashDDSlashYYYYFormat),o,i,d?.name??"",t,e,I,n??null)}const e=a.auditReportGroups.find(e=>"Completed"===e.fetchState);null!=e?.auditReport?.status?.lastRefreshSuccessTime&&T(e)},[a.auditReportGroups,n.length,p,d,a,I]);const P=e=>{u(e)},D=(e,t,o)=>{p.trackAuditIssuesClicked(o,d?.name??"",I,r.dateNow().format(bP.analytics.MMSlashDDSlashYYYYFormat)),h(e,t)};return e.jsxRuntimeExports.jsxs(wP,{style:c,children:[e.jsxRuntimeExports.jsx(PP,{windowSize:y,style:c,children:e.jsxRuntimeExports.jsx(DP,{children:e.jsxRuntimeExports.jsxs(AP,{windowSize:y,children:[e.jsxRuntimeExports.jsx(vP,{}),e.jsxRuntimeExports.jsxs(LP,{children:[e.jsxRuntimeExports.jsx(OP,{children:d?.name}),e.jsxRuntimeExports.jsx(MP,{children:E?k?.auditReport?.status?.lastRefreshSuccessTime?.utc(!0).local().format(CP.hmmADashDDMMMCommaYYYY):fP.strings.empty})]}),e.jsxRuntimeExports.jsxs(zP,{children:[e.jsxRuntimeExports.jsxs(NP,{isGenerateClickEnabled:j,onClick:()=>{C(jP(n,1)),b({id:n[0]?.auditRuleGroupId,index:0}),R(!1),v(1),$(!1),T(null);const e=n.map(e=>e.auditRuleGroupId);m(e)},children:[e.jsxRuntimeExports.jsx(VP,{}),e.jsxRuntimeExports.jsx(FP,{children:SP.auditReportDrawer.updateScore})]}),e.jsxRuntimeExports.jsx(BP,{onClick:()=>{x()},children:e.jsxRuntimeExports.jsx(_P,{})})]})]})})}),e.jsxRuntimeExports.jsxs(EP,{children:[e.jsxRuntimeExports.jsx($P,{children:e.jsxRuntimeExports.jsx(oI,{auditSummaryData:null!=d?d.auditSummary:{fixesRequired:0,totalChecks:0,auditScorePercentage:0,bypassedAuditScore:0,auditReportLastGeneratedDate:null},isAuditScoreLoadingCompleted:E&&o,isMonthEnd:s})}),e.jsxRuntimeExports.jsxs(kP,{children:[e.jsxRuntimeExports.jsx(TP,{children:fP.texts.business}),e.jsxRuntimeExports.jsx(IP,{children:n.filter(e=>e.ruleType===fP.texts.business.toLowerCase()).map(t=>{const o=a.auditReportGroups.find(e=>e.auditReportGroupId===t.auditRuleGroupId);return null!=o&&Object.keys(S).length>0?e.jsxRuntimeExports.jsx(rP,{loggedInUser:i,isControllerOrReviewer:a.isControllerOrReviewer,allUsers:l,isMonthEnd:s,ruleGroup:t,groupIdWithActiveStatus:S,auditReportGroup:o,setGroupIdWithActiveStatus:C,onClickRetryGroupFetch:P,onClickRule:D,handleReasonAuditRule:g},t.auditRuleGroupId):null})})]}),e.jsxRuntimeExports.jsxs(kP,{children:[e.jsxRuntimeExports.jsx(TP,{children:fP.settings.title.accounting}),e.jsxRuntimeExports.jsx(IP,{children:n.filter(e=>e.ruleType===fP.settings.title.accounting.toLowerCase()).map(t=>{const o=a.auditReportGroups.find(e=>e.auditReportGroupId===t.auditRuleGroupId);return null!=o&&Object.keys(S).length>0?e.jsxRuntimeExports.jsx(rP,{loggedInUser:i,isControllerOrReviewer:a.isControllerOrReviewer,allUsers:l,isMonthEnd:s,ruleGroup:t,groupIdWithActiveStatus:S,auditReportGroup:o,setGroupIdWithActiveStatus:C,onClickRetryGroupFetch:P,onClickRule:D,handleReasonAuditRule:g},t.auditRuleGroupId):null})})]})]})]})},exports.COCKPIT_TAB_OPTIONS=F,exports.COCKPIT_TAB_OPTIONS_WITH_CREDIT_AGENT=V,exports.CockpitNavBar=function({defaultOptions:o,downloadState:r,downloadParams:i,signedInUser:s,cockpitHeader:a,analytics:l,currentTab:d,updateDownloadStateHandler:c,onZeniLogoClick:p,onLogOutClick:u,onThreadClick:m,onNotificationClick:x,onNewCustomerClick:h}){const g=e.useWindowSizeContext(),[S,C]=t.useState(!1),[f,b]=t.useState(!1),{inboxNotifications:j,isLoading:R,isFetchingMore:w,hasFetchedAll:v,fetchMore:E}=n.useInboxNotifications(),{threads:$,isLoading:k}=e.useFilteredThreads({application:"cockpit",isGlobalComment:!0},"both",!0),T=t.useMemo(()=>$.filter(e=>!1===e.resolved),[$]).length,{setOpenThread:I,setRequestToOpenThread:P,openThread:D}=t.useContext(e.ThreadsContext);t.useEffect(()=>{const e=setTimeout(()=>E?.(),0);return()=>clearTimeout(e)});const A=R||!0===w||!0!==v,L=j?.filter(e=>null==e.readAt&&!0===e.roomId?.includes("cockpit")&&"thread"===e.kind).length,O=(e=>{switch(e){case"management":case"subscription":case"portfolio":case"onboarding":case"audit":return e;case"aiAccountant":return le;case"creditAgent":return de;default:return ae.healthMonitor}})(d),M=t.useCallback((e,t)=>{const{companyId:o,entityType:n}=e;D===t?I(null):(C(!1),P({threadId:t,companyId:o,entityType:n}))},[D,I,P]),N=t.useCallback((e,t)=>{const{companyId:o,entityType:n}=e;D===t?I(null):(b(!1),P({threadId:t,companyId:o,entityType:n}))},[D,I,P]);return"small"!==g?e.jsxRuntimeExports.jsxs(Se,{children:[e.jsxRuntimeExports.jsxs(fe,{children:[e.jsxRuntimeExports.jsx(Re,{children:e.jsxRuntimeExports.jsx(je,{"data-testid":e.generateDataTestId("zeni-logo-cockpit-nav-bar"),onClick:p})}),e.jsxRuntimeExports.jsx(Ce,{children:a??he}),e.jsxRuntimeExports.jsxs(we,{children:[S?null:e.jsxRuntimeExports.jsxs(ve,{isDisabled:k,onClick:k?()=>null:()=>C(!0),children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:k?void 0:T,isLoading:k,style:{left:"12px"}}),e.jsxRuntimeExports.jsx(Ee,{})]}),e.jsxRuntimeExports.jsxs(ve,{isDisabled:A,onClick:A?()=>null:()=>b(!0),children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:L,isLoading:A,style:{left:"12px"}}),e.jsxRuntimeExports.jsx($e,{})]}),e.jsxRuntimeExports.jsx(me,{defaultOptions:o,downloadParams:i,downloadState:r,analytics:l,currentCockpitTab:O,updateDownloadStateHandler:c}),e.jsxRuntimeExports.jsx(e.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:ge,onClick:h}),e.jsxRuntimeExports.jsx(be,{children:e.jsxRuntimeExports.jsx(e.LogoutButton,{signedInUser:s,pageName:"Cockpit",onLogOutClick:u})})]})]}),e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:S,filter:{application:"cockpit",isGlobalComment:!0},autoExpand:!0,autoFocus:!1,drawerTitle:ye,onCloseAllThreadsDrawer:()=>C(!1),onThreadClick:(e,t)=>{m(e,t,M)},style:{cursor:"pointer"},showReactions:!0,showActions:!0,allowExpand:!0,threads:$,isLoading:k,allowComposer:!1,textOverrides:{},withRoomProvider:!0}),e.jsxRuntimeExports.jsx(y,{application:"cockpit",isDrawerOpen:f,onNotificationClick:(e,t)=>{x(e,t,N)},onCloseAllInboxNotificationsDrawer:()=>b(!1)})]}):e.jsxRuntimeExports.jsx(Se,{className:"mobileHeader",children:e.jsxRuntimeExports.jsxs(fe,{className:"mobileTitle",children:[e.jsxRuntimeExports.jsx(e.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:ge,onClick:h}),e.jsxRuntimeExports.jsx(ke,{children:e.jsxRuntimeExports.jsx(e.LogoutButton,{signedInUser:s,pageName:"Cockpit",onLogOutClick:u})})]})})},exports.CreditAgentPage=function({headerActions:o,headerData:n,creditAgentPageData:r,creditAgentPageActions:i}){const s=e.useWindowSizeContext(),{macroData:a,cardProfilesData:l}=r,{onFetchMacro:d,onSaveMacro:c,onResetSaveMacro:p,onUIStateChange:u,cardProfilesActions:m}=i,{onDownloadReport:x}=m,[h,g]=t.useState(""),[y,S]=t.useState(!1),{focus:C,minScore:f}=l.uiState;t.useEffect(()=>{"Not-Started"===a.fetchState&&d()},[a.fetchState,d]),t.useEffect(()=>{null==a.data||y||g(a.data.instructions)},[a.data,y]),t.useEffect(()=>{"Completed"===a.updateState&&(S(!1),p())},[a.updateState,p]),t.useEffect(()=>{"Not-Started"===l.fetchState&&m.onFetch()},[l.fetchState,m]);const b=t.useCallback(()=>{c(h)},[c,h]),j=t.useCallback(()=>{S(!1),null!=a.data&&g(a.data.instructions),"Error"===a.updateState&&p()},[a.data,a.updateState,p]);return e.jsxRuntimeExports.jsxs(mL,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:o,headerData:{...n,allTabOptions:n.allTabOptions??F,selectedTabOption:"creditAgent"}}),e.jsxRuntimeExports.jsxs(xL,{windowSize:s,children:[e.jsxRuntimeExports.jsxs(hL,{children:[e.jsxRuntimeExports.jsx(gL,{}),e.jsxRuntimeExports.jsxs(yL,{children:[y&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.Button,{variant:"secondary",size:"small",label:dL.cancel,onClick:j}),e.jsxRuntimeExports.jsx(e.Button,{variant:"primary",size:"small",label:"In-Progress"===a.updateState?cL.saving:cL.savePrompt,disabled:"In-Progress"===a.updateState,onClick:b})]}),e.jsxRuntimeExports.jsx(e.Button,{variant:"secondary",size:"small",label:cL.downloadReport,onClick:x})]})]}),e.jsxRuntimeExports.jsxs(SL,{children:[e.jsxRuntimeExports.jsxs(CL,{children:[e.jsxRuntimeExports.jsxs(fL,{children:[e.jsxRuntimeExports.jsx(bL,{children:"✦"}),"In-Progress"===a.fetchState?e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Standard",start:!0}):e.jsxRuntimeExports.jsx(jL,{value:h,disabled:"In-Progress"===a.updateState,onChange:e=>{g(e.target.value),S(!0)},placeholder:cL.promptPlaceholder,rows:6})]}),e.jsxRuntimeExports.jsxs(RL,{children:[e.jsxRuntimeExports.jsxs(wL,{children:[e.jsxRuntimeExports.jsx(vL,{children:cL.focusLabel}),e.jsxRuntimeExports.jsx(EL,{children:pL.map(t=>e.jsxRuntimeExports.jsx($L,{active:C===t,onClick:()=>u({focus:t}),children:uL(t)},t))})]}),e.jsxRuntimeExports.jsx(kL,{}),e.jsxRuntimeExports.jsxs(wL,{children:[e.jsxRuntimeExports.jsx(vL,{children:cL.minScoreLabel}),e.jsxRuntimeExports.jsx(TL,{type:"range",min:0,max:100,value:f,onChange:e=>u({minScore:parseInt(e.target.value)})}),e.jsxRuntimeExports.jsx(IL,{children:f})]})]})]}),"Error"===a.updateState&&e.jsxRuntimeExports.jsx(DL,{children:cL.failedToSavePrompt})]}),e.jsxRuntimeExports.jsx(PL,{children:e.jsxRuntimeExports.jsx(HA,{cardProfilesData:l,cardProfilesActions:m,onUIStateChange:u,uiState:l.uiState})})]})]})},exports.HealthMonitorDetailDrawer=function({localData:o,companyHealthMetricViewSelector:n,additionalChurnFactorsOptions:i,analytics:s,urlSource:l,onCloseDrawer:d,onSaveChangesToLocalStore:c,onSaveClick:p}){const{selectedCompanyDetail:u,localFormDataAndStatusByCompanyId:m}=n,[x,h]=t.useState(!1),g=rc(u),[y,S]=t.useState(!1),[C,f]=t.useState(!1),b=e.useForm({mode:"all",defaultValues:_p(o,i),reValidateMode:"onBlur"}),j=t.useRef(null);function R(e){null!=u&&s.trackCockpitHealthMonitorChurnFormClicked(e,{companyId:u.companyInfo.companyId,companyName:u.companyInfo.name,zeniProductAndServicesCount:u.noOfProductVerticalsEnabled,daysToRenewal:tc(u.companyHealthMetric.subscriptionRenewalDate)??null,netPromoterScore:m?.companyHealthMetricLocalData.netPromoterScore??null,customerSatisfactionScore:m?.companyHealthMetricLocalData.customerSatisfactionScore??null,externalServicesExposure:m?.companyHealthMetricLocalData.externalProductServiceExposure??null,runwayMonths:!0===r.isCompanyRunwayInfinite(u.companyHealthMetric.runway)?1e6:void 0===u.companyHealthMetric.runway?null:u.companyHealthMetric.runway.runwayMonths??null,dashBoardLastSeen:tc(u.companyHealthMetric.customerLastDashboardVisit)??null,lastReportSent:tc(u.managementInfo.lastReportSentDate)??null,churnProbability:u.companyHealthMetric.churnProbabilityPercentage??null})}const w=b.handleSubmit(()=>{R("Save"),j?.current&&j.current.scrollTo({top:0,behavior:"instant"}),S(!0),h(!0),p()}),v=t.useRef(null),E=t.useRef(null),[$,k]=t.useState(null),T=t.useRef(null),I=Bp(o.additionalChurnFactors);function P(){R("Cancel"),d()}t.useEffect(()=>(E.current=setTimeout(()=>{v.current&&(k(v.current),E.current&&clearTimeout(E.current))},10),()=>{null!=E.current&&clearTimeout(E.current)}),[I]),t.useEffect(()=>{const t=b.watch((t,{name:o})=>{null!=o&&null!=t&&e.defer(()=>(async(e,t)=>{if(null!=e){const e={...t},o=e[Lp][Fp].selectedOptions,n={netPromoterScore:e[Lp][Mp]?.selectedOption,customerSatisfactionScore:e[Lp][Np]?.selectedOption,externalProductServiceExposure:e[Lp][zp]?.selectedOption,additionalChurnFactors:{increasingChurnProbability:i.increasingChurnProbability.filter(e=>-1!=o.indexOf(e.code)),decreasingChurnProbability:i.decreasingChurnProbability.filter(e=>-1!=o.indexOf(e.code))}};c(n)}})(o,t))});return()=>{t.unsubscribe()}}),t.useEffect(()=>{if(null!=u){const e=u.controllers.map(e=>`${e.firstName} ${e.lastName}`);l||s.trackCockpitHealthMonitorRowClicked(u.companyInfo.companyId,u.companyInfo.name,e,u.companyHealthMetric.netPromoterScore,u.companyHealthMetric.customerSatisfactionScore,u.companyHealthMetric.churnProbabilityPercentage)}},[]);const D={valueContainer:t=>({...t,padding:`2px ${e.Space.sp3}`,overflow:"unset"}),multiValue:e=>({...e,margin:0})};return e.jsxRuntimeExports.jsxs(Eu,{ref:j,"data-testid":e.generateDataTestId("health-monitor-drawer"),children:[e.jsxRuntimeExports.jsxs(Cu,{"data-testid":e.generateDataTestId("health-monitor-drawer-header"),children:[e.jsxRuntimeExports.jsx(ju,{"data-testid":e.generateDataTestId("health-monitor-drawer-title"),children:`${u?.companyInfo.name}${cp.heading}`}),e.jsxRuntimeExports.jsx(Xp,{"data-testid":e.generateDataTestId("health-monitor-drawer-close-button"),onClick:P,children:e.jsxRuntimeExports.jsx(Qp,{})})]}),e.jsxRuntimeExports.jsxs(vu,{children:["Error"===n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState?e.jsxRuntimeExports.jsx(Fu,{"data-testid":e.generateDataTestId("health-monitor-drawer-error"),children:e.jsxRuntimeExports.jsxs(Vu,{children:[e.jsxRuntimeExports.jsx(Hu,{}),null!=n.localFormDataAndStatusByCompanyId.saveStatus.error?.message?e.jsxRuntimeExports.jsx(Bu,{"data-testid":e.generateDataTestId("health-monitor-drawer-error-text"),children:n.localFormDataAndStatusByCompanyId.saveStatus.error?.message}):null]})}):null,e.jsxRuntimeExports.jsx(tu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-section"),children:"In-Progress"===m?.saveStatus?.fetchState?e.jsxRuntimeExports.jsxs(eu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-loader"),children:[e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"ExtraLarge",start:!0}),e.jsxRuntimeExports.jsx(e.ExtraLargeRegular,{children:cp.calculatingProbability})]}):e.jsxRuntimeExports.jsxs(Ru,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-box"),children:[e.jsxRuntimeExports.jsx(wu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-heading"),children:(A=g.churnProbabilityPercentage,null!=A?`${dp.texts.churnProbability} ${dp.texts.is} ${g.churnProbabilityPercentage}${Pp}`:`${dp.texts.churnProbability} ${Pp}`)}),e.jsxRuntimeExports.jsx(Wp,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-meter"),children:e.jsxRuntimeExports.jsx(Hd,{barHeight:32,percentage:g.churnProbabilityPercentage})}),e.jsxRuntimeExports.jsx(ou,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-reasons"),children:null!=u?.companyHealthMetric.churnProbabilityPercentage&&0!==u?.companyHealthMetric.churnProbabilityReason.length?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-contributing-heading"),children:hp}),0!==u.companyHealthMetric.churnProbabilityReason.length||0!==u.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length?e.jsxRuntimeExports.jsxs(lu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-increasing-factors"),children:[e.jsxRuntimeExports.jsx(ru,{children:`${gp}${wp}`}),e.jsxRuntimeExports.jsxs(cu,{children:[u.companyHealthMetric.churnProbabilityReason.map((t,o)=>e.jsxRuntimeExports.jsx(pu,{children:e.jsxRuntimeExports.jsx(uu,{children:t.text})},`${e.nanoid()}_${o}}`)),u.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((t,o)=>e.jsxRuntimeExports.jsxs(pu,{children:[e.jsxRuntimeExports.jsx(uu,{children:t.value}),e.jsxRuntimeExports.jsx(du,{children:"Newly added"})]},`${e.nanoid()}_${o}}`))]})]}):null,0!==u?.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length?e.jsxRuntimeExports.jsxs(lu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-decreasing-factors"),children:[e.jsxRuntimeExports.jsx(ru,{children:`${yp}${wp}`}),e.jsxRuntimeExports.jsx(cu,{children:u.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((t,o)=>e.jsxRuntimeExports.jsxs(pu,{children:[e.jsxRuntimeExports.jsx(uu,{children:t.value}),e.jsxRuntimeExports.jsx(du,{children:"Newly added"})]},`${e.nanoid()}_${o}}`))})]}):null,e.jsxRuntimeExports.jsxs(au,{"data-testid":e.generateDataTestId("health-monitor-drawer-add-more-button"),onClick:()=>{e.scrollContainerToTargetAdjusted(T?.current,j?.current),setTimeout(()=>{f(!0)},500)},ref:T,children:[e.jsxRuntimeExports.jsx(su,{}),e.jsxRuntimeExports.jsx(iu,{children:Tp})]})]}):null})]})}),e.jsxRuntimeExports.jsxs(ku,{"data-testid":e.generateDataTestId("health-monitor-drawer-form-container"),children:[e.jsxRuntimeExports.jsxs(mu,{children:[e.jsxRuntimeExports.jsxs(gu,{children:[e.jsxRuntimeExports.jsx(yu,{"data-testid":e.generateDataTestId("health-monitor-drawer-manual-input-heading"),children:cp.manualInput.header}),e.jsxRuntimeExports.jsx(e.Tooltip,{maxWidth:"250px",variant:"small-description",data:cp.tooltipTexts.manualInputText,placement:"top",children:e.jsxRuntimeExports.jsx(Jp,{"data-testid":e.generateDataTestId("health-monitor-drawer-manual-input-info"),style:{marginTop:e.Space.sp1,marginRight:e.Space.sp0}})})]}),null!=g.companyEngagementMetricsUpdatedAt&&"In-Progress"!==n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState?e.jsxRuntimeExports.jsx(xu,{"data-testid":e.generateDataTestId("health-monitor-drawer-last-updated"),children:null!=g.updatedByUserName?e.jsxRuntimeExports.jsxs(hu,{children:[`${dp.texts.lastUpdatedBy}${wp} ${g.updatedByUserName}`,e.jsxRuntimeExports.jsx(_u,{}),`${g.companyEngagementMetricsUpdatedAt.date}${Ep}${$p}${g.companyEngagementMetricsUpdatedAt.time}`]}):e.jsxRuntimeExports.jsxs(hu,{children:[`${dp.texts.lastUpdated}${wp} ${g.companyEngagementMetricsUpdatedAt.date}`,e.jsxRuntimeExports.jsx(_u,{}),`${g.companyEngagementMetricsUpdatedAt.time}`]})}):null]}),e.jsxRuntimeExports.jsx(e.FormProvider,{...b,children:e.jsxRuntimeExports.jsx("form",{id:Ap(Op),onSubmit:w,children:e.jsxRuntimeExports.jsxs(Tu,{"data-testid":e.generateDataTestId("health-monitor-drawer-form-fields"),children:[e.jsxRuntimeExports.jsx(Up,{"data-testid":e.generateDataTestId("health-monitor-drawer-nps-field"),children:e.jsxRuntimeExports.jsx(e.LabeledSingleSelectNumericField,{label:{label:`${dp.texts.nps}${wp}`,width:0,style:{width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(e,t)=>({input:{textAlign:!1===t.selectProps.menuIsOpen&&null==o.netPromoterScore?"right":"left"}})},placeholder:dp.add,name:Dp(Lp,Mp),defaultValue:{allOptions:ie,selectedOption:o.netPromoterScore},registerOptions:{required:!0,validate:(e,t)=>{const o=t.healthMonitorDetails.customerSatisfactionScore;return!0===Boolean(o.selectedOption)||null!=e&&!0===Boolean(e.selectedOption)}}},style:{width:"auto"}})}),e.jsxRuntimeExports.jsx(Au,{}),e.jsxRuntimeExports.jsx(Gp,{"data-testid":e.generateDataTestId("health-monitor-drawer-csat-field"),children:e.jsxRuntimeExports.jsx(e.LabeledSingleSelectNumericField,{label:{label:`${dp.texts.csat}${wp}`,width:0,labelIcon:e.jsxRuntimeExports.jsx(e.Tooltip,{maxWidth:"300px",variant:"small-description",data:cp.tooltipTexts.customerSatisfactionScoreText,placement:"top",children:e.jsxRuntimeExports.jsx(Jp,{"data-testid":e.generateDataTestId("health-monitor-drawer-csat-info")})}),style:{marginRight:e.Space.sp2,width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(e,t)=>({input:{textAlign:!1===t.selectProps.menuIsOpen&&null==o.customerSatisfactionScore?"right":"left"}})},placeholder:dp.add,name:Dp(Lp,Np),defaultValue:{allOptions:se,selectedOption:o.customerSatisfactionScore},registerOptions:{required:!0,validate:(e,t)=>{const o=t.healthMonitorDetails.netPromoterScore;return!0===Boolean(o.selectedOption)||null!=e&&!0===Boolean(e.selectedOption)}}},style:{width:"auto"}})}),e.jsxRuntimeExports.jsx(Au,{}),e.jsxRuntimeExports.jsx(qp,{"data-testid":e.generateDataTestId("health-monitor-drawer-external-exposure-field"),children:e.jsxRuntimeExports.jsx(e.LabeledSingleSelectPickerField,{label:{label:cp.manualInput.labels.externalProductServices,labelIcon:e.jsxRuntimeExports.jsx(e.Tooltip,{maxWidth:"265px",variant:"small-description",data:cp.tooltipTexts.externalProductServicesText,placement:"top",children:e.jsxRuntimeExports.jsx(Jp,{"data-testid":e.generateDataTestId("health-monitor-drawer-external-exposure-info")})}),style:{marginRight:e.Space.sp2}},singleSelectPickerField:{placeholder:dp.add,name:Dp(Lp,zp),defaultValue:{allOptions:r.companyHealthMetricDropDownOptions,selectedOption:o.externalProductServiceExposure},textAlignment:"right",registerOptions:{required:!0,validate:e=>null!=e&&!0===Boolean(e.selectedOption)}},style:{width:"auto"}})}),e.jsxRuntimeExports.jsx(Au,{}),e.jsxRuntimeExports.jsxs(Iu,{"data-testid":e.generateDataTestId("health-monitor-drawer-additional-factors"),additionalNotesHidden:0===I.length,isFocused:C,children:[e.jsxRuntimeExports.jsx(e.LabeledGroupedMultiSelectField,{fullWidthSelect:!0,label:{label:`${cp.manualInput.labels.additionalContributingFactorsLabel}${wp}`,labelIcon:e.jsxRuntimeExports.jsx(e.Tooltip,{maxWidth:"280px",variant:"small-description",data:cp.tooltipTexts.additionalContributingFactorsText,placement:"top",children:e.jsxRuntimeExports.jsx(Jp,{"data-testid":e.generateDataTestId("health-monitor-drawer-additional-factors-info")})})},groupedMultiSelectField:{name:Dp(Lp,Fp),treeViewStructure:!0,registerOptions:{required:!1},defaultValue:{allOptions:Vp(i),selectedOptions:I},placeholder:Ip,customStyleConfig:D,showSelectedInNewLines:!0},isMenuOpen:C,setIsMenuOpen:f,menuPortalEnabled:!0}),0!==I.length&&e.jsxRuntimeExports.jsxs(Du,{"data-testid":e.generateDataTestId("health-monitor-drawer-notes-composer"),children:[e.jsxRuntimeExports.jsx(Qu,{}),e.jsxRuntimeExports.jsx(Pu,{ref:v,children:$&&a.createPortal(e.jsxRuntimeExports.jsx($d,{roomId:`cockpit_${u?.companyInfo.companyId}`,threadMetadata:{application:"cockpit",companyId:null!=u?.companyInfo.companyId?u.companyInfo.companyId:"",entityId:null!=u?.companyInfo.companyId?u.companyInfo.companyId:"",companyName:null!=u?.companyInfo.name?u.companyInfo.name:"",tab:"healthMonitor",isGlobalComment:!1,entityType:"healthMonitor.notes",url:window.location.href},composerPlaceholder:cp.manualInput.placeholders.addANote,createThreadCallback:()=>{S(!1)},isSubmitComment:y}),$)})]})]})]})})})]}),e.jsxRuntimeExports.jsxs($u,{"data-testid":e.generateDataTestId("health-monitor-drawer-prefilled-section"),children:[e.jsxRuntimeExports.jsx(Su,{"data-testid":e.generateDataTestId("health-monitor-drawer-prefilled-heading"),children:cp.preFilledInput.header}),e.jsxRuntimeExports.jsxs(Ou,{"data-testid":e.generateDataTestId("health-monitor-drawer-runway"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.runway}),null!=g.runway?!0===r.isCompanyRunwayInfinite(g.runway)?e.jsxRuntimeExports.jsx(zu,{}):e.jsxRuntimeExports.jsx(bu,{children:nc(g.runway.runwayMonths)}):e.jsxRuntimeExports.jsx(bu,{children:cp.notApplicable})]}),e.jsxRuntimeExports.jsxs(Nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-dashboard-last-seen"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.dashboardLastSeen}),e.jsxRuntimeExports.jsx(bu,{children:g.dashboardLastVisit??cp.notApplicable})]}),e.jsxRuntimeExports.jsxs(Nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-last-report-sent"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.lastReportSent}),e.jsxRuntimeExports.jsx(bu,{children:g.lastReportSent??cp.notApplicable})]}),e.jsxRuntimeExports.jsxs(Nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-product-services"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.zeniProductServices}),e.jsxRuntimeExports.jsx(bu,{children:e.jsxRuntimeExports.jsx($c,{productVerticals:u?.companyHealthMetric.verticalProductServices??[],testIdSuffix:u?.companyInfo.companyId})})]}),e.jsxRuntimeExports.jsxs(Nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-days-to-renewal"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.daysToRenewal}),e.jsxRuntimeExports.jsx(bu,{children:g.renewalDate??cp.notApplicable})]}),e.jsxRuntimeExports.jsx(Mu,{"data-testid":e.generateDataTestId("health-monitor-drawer-last-engagements"),children:e.jsxRuntimeExports.jsx(e.LabeledReadOnlyTextField,{label:{label:`${up}${wp}`},text:e.jsxRuntimeExports.jsx(Wu,{children:g.lastEngagements.length>0?g.lastEngagements.map((t,o)=>e.jsxRuntimeExports.jsx(Uu,{"data-testid":e.generateDataTestId("health-monitor-drawer-engagement",String(o)),children:e.jsxRuntimeExports.jsx(e.Tooltip,{style:{padding:`12px ${e.Space.sp3}`,color:e.Colors.heroDark},title:e.jsxRuntimeExports.jsx(qu,{children:"email"===t.type?e.jsxRuntimeExports.jsxs(Ku,{children:[e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[kp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.subject})]}),e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[fp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.from})]}),e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[Cp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.to})]}),""!=t.cc?e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[bp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.cc})]}):null]}):e.jsxRuntimeExports.jsxs(Ku,{children:[e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[kp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.subject})]}),e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[jp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.hostName})]}),e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[Rp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.attendees})]})]})}),placement:"left",children:e.jsxRuntimeExports.jsxs(Gu,{children:[e.jsxRuntimeExports.jsxs(Zp,{children:["email"===t.type?e.jsxRuntimeExports.jsx(em,{"data-testid":e.generateDataTestId("health-monitor-drawer-engagement-email-icon",String(o))}):e.jsxRuntimeExports.jsx(Ju,{"data-testid":e.generateDataTestId("health-monitor-drawer-engagement-meeting-icon",String(o))}),e.jsxRuntimeExports.jsx(Hp,{children:"email"===t.type?dp.settings.notifications.mode.email:pp.meeting})]}),e.jsxRuntimeExports.jsx(tm,{className:"engagementDot"}),e.jsxRuntimeExports.jsx(Yp,{children:t.scheduledAt?.utc(!0).local().format(Sp.visual.MMMDCommaYYYYformat)??vp})]},`${e.nanoid()}_${o}}`)})},o)):vp}),style:{width:"100%"}})})]})]}),!0===r.hasCompanyHealthMetricFormFieldChanged(u?.companyHealthMetric,m?.companyHealthMetricLocalData)||!1===x?e.jsxRuntimeExports.jsx(Kp,{"data-testid":e.generateDataTestId("health-monitor-drawer-footer"),children:e.jsxRuntimeExports.jsx(e.Footer,{style:{zIndex:2,paddingTop:e.Space.sp3,paddingBottom:e.Space.sp3},formId:Ap(Op),primaryBtn:{label:dp.save,style:{minWidth:112},isLoading:"In-Progress"===m?.saveStatus?.fetchState},cancelBtn:{label:dp.cancel,style:{minWidth:112},onClick:P}})}):null]});var A},exports.HealthMonitorPage=({headerActions:t,headerData:o,healthPageData:n,healthPageActions:r,initialOpenThreadRequest:i})=>{const{healthView:s,managementView:a,mixpanelUrl:l}=n,{onColumnSortConfigChanged:d,onRowClick:c,onCockpitReloadData:p,onFiltersChange:u}=r,{filterText:m,filters:x}=s.uiState,h="Completed"===a.fetchState&&"Completed"===s.fetchState&&"Completed"===s.zeniUsers.fetchState;return t.filterActions&&(t.filterActions.getCategoryWiseOptions=()=>zm(s)),e.jsxRuntimeExports.jsxs(Fm,{"data-testid":e.generateDataTestId("health-monitor-page"),children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...t},headerData:{...o,allTabOptions:o.allTabOptions??F,selectedTabOption:"healthMonitor",filterData:{filterText:m,filters:x},companiesLoaded:h}}),e.jsxRuntimeExports.jsx(Nm,{healthView:s,initialOpenThreadRequest:i,managementView:a,mixpanelUrl:l,onClearFilter:()=>u({}),onColumnSortConfigChanged:d,onCockpitReloadData:p,onRowClick:c})]})},exports.ManagementPage=({companiesExcludedFromMonthEndReport:t,headerData:o,headerActions:n,managementPageActions:r,managementPageData:i,expenseAutomationEnabledCompanies:s,initialOpenThreadRequest:a})=>{const{managementView:l,loggedInUser:d,loggedInUserRole:c,realmIdUpdateStatusByCompanyId:p,showDetailsPageLink:u}=i,m=wt(),x=Rt(jt),{onColumnSortConfigChanged:h,changeHandlers:g,onScroll:y,onViewDetailsLinkClicked:S,onCockpitReloadData:C,onCompanyNameClicked:f,onPassportIconClicked:b,onTaskIconClicked:j,onFiltersChange:R,onMonthEndReportPageClick:w,showMonthEndReportHistoricData:v,onProductVerticalsChanged:E,onRealmIdReset:$,onRealmIdUpdate:k}=r,T=l.uiState.filterText,I=l.uiState.filters,P="Completed"===l.fetchState&&"Completed"===l.zeniUsers.fetchState;return n.filterActions&&(n.filterActions.getCategoryWiseOptions=()=>kl(l)),e.jsxRuntimeExports.jsxs(El,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...n},headerData:{...o,filterData:{filterText:T,filters:I},companiesLoaded:P,selectedTabOption:"management",allTabOptions:void 0===u?o.allTabOptions??F:void 0}}),e.jsxRuntimeExports.jsx($l,{changeHandlers:g,companiesExcludedFromMonthEndReport:t,expenseAutomationEnabledCompanies:s,initialOpenThreadRequest:a,isFilterApplied:null!=I?.categories,loggedInUser:d,loggedInUserRole:c,managementView:l,onClearFilter:()=>R?.("management",{}),onCockpitReloadData:C,onColumnSortConfigChanged:h,onCompanyNameClicked:f,onMonthEndReportPageClick:w,onPassportIconClicked:b,onScroll:y,onTaskIconClicked:j,onViewDetailsLinkClicked:S,showMonthEndReportHistoricData:v,isProductVerticalsColumnVisible:m,onProductVerticalsChanged:E,isRealmIdColumnVisible:x,realmIdUpdateStatusByCompanyId:p,onRealmIdReset:$,onRealmIdUpdate:k})]})},exports.MonthEndReportHistoricDataPage=o=>{const{monthEndReportHistoricData:i,reportSentDate:s,onRefresh:a,onNavigateBack:l,onDateChange:d}=o,c=e.useTheme(),[p,u]=t.useState(!1),[m,x]=t.useState(),h=t.useRef(null),[g,y]=t.useState(0),[S,C]=t.useState(0),f=e.useDelayUnmount(p,250),{data:b,companyId:j,companyName:R,firstMonthOfFY:w}=i,v=e.getMonthIndex(s.format(ak.visual.MMMMFormat)),E=Number(s.format(ck)),$=w>v?E-1:E;t.useEffect(()=>{x(`${F$((v>0?v-1:12).toString(),2,"0")}${dk}${E}`)},[]);const k={application:"cockpit",companyId:j,entityId:j,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:R,url:window.location.href,selectedRange:m},{url:T,...I}=k,P={...I},D="Not-Started"===i.fetchState||"In-Progress"===i.fetchState,{threadsRefs:A,sortedThreads:L,threadsPositions:O,observer:M,unresolvedThreadsMap:N,handleRemoveFloatingThread:z}=e.useFloatingThreads(P,h,!1,D),F=t.useRef(null),[V,B]=t.useState(0),_=t.useCallback(()=>{const e=A.current?.[A.current?.length-1];B(window.scrollY+(e?.getBoundingClientRect()?.bottom??0))},[A]),H=t.useCallback(()=>{p?C(Math.min((window.innerWidth-e.FORM_MINIMUM_WIDTH)/2,window.innerWidth-e.FORM_MINIMUM_WIDTH-e.COMMENTS_DRAWER_MAXIMUM_WIDTH-e.sp[4])):y(Math.min((window.innerWidth-e.FORM_MINIMUM_WIDTH)/2,window.innerWidth-e.FORM_MINIMUM_WIDTH-e.COMMENTS_SECTION_MINIMUM_WIDTH))},[p]);t.useEffect(()=>{H()},[p,H]),t.useEffect(()=>(window.addEventListener("resize",H),()=>{window.removeEventListener("resize",H)}),[H]),t.useEffect(()=>(window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)),[_]);const{openThread:W,setOpenThread:U}=t.useContext(e.ThreadsContext);t.useEffect(()=>{null!=W&&p&&u(!1)},[p,W,u]);const G=e.getHistoricMonthsList(w,i.historicReportSentDates),q=t.useCallback((e,t)=>{const o=w>e?t+1:t;d(r.dateFromYearMonthDate(o,e-1));x(`${F$((e>0?e-1:12).toString(),2,"0")}${dk}${o}`)},[w,d]);if("Not-Started"===i.fetchState||"In-Progress"===i.fetchState)return e.jsxRuntimeExports.jsxs(W$,{children:[e.jsxRuntimeExports.jsx(V$,{children:e.jsxRuntimeExports.jsx(U$,{onClick:l})}),e.jsxRuntimeExports.jsx(e.BusyIndication,{fetchState:i.fetchState,styles:{margin:e.Space.sp0}})]});if("Error"===i.fetchState)return e.jsxRuntimeExports.jsxs(W$,{children:[e.jsxRuntimeExports.jsx(V$,{children:e.jsxRuntimeExports.jsx(U$,{onClick:l})}),e.jsxRuntimeExports.jsx(e.ReloadContainer,{onReload:a,message:sk})]});if(null==b?.concatenatedHtml)return e.jsxRuntimeExports.jsxs(W$,{children:[e.jsxRuntimeExports.jsx(V$,{children:e.jsxRuntimeExports.jsx(U$,{onClick:l})}),e.jsxRuntimeExports.jsx(e.ReloadContainer,{onReload:a,message:lk.monthEndReport.insightsNotAvailable})]});const K=`cockpit_${j}`;return e.jsxRuntimeExports.jsx(n.RoomProvider,{id:K,children:e.jsxRuntimeExports.jsxs(G$,{children:[e.jsxRuntimeExports.jsx(c$,{companyName:i.companyName,onNavigateBack:l,monthCalendar:{monthAndYears:G,label:`${s.format(pk)} ${$}`,selectedMonth:{month:v,year:$},onChange:q},threadMetadata:P,onAllThreadsClick:()=>{null!=W&&U(null),u(!0)}}),e.jsxRuntimeExports.jsxs(X$,{ref:F,style:V>0?{height:V}:void 0,children:[e.jsxRuntimeExports.jsx(q$,{availableWidth:p?S:g}),e.jsxRuntimeExports.jsxs(Q$,{children:[e.jsxRuntimeExports.jsx(uk,{historicData:b,newThreadMetadata:k,companyId:j,sortedThreads:L,containerRef:h}),e.jsxRuntimeExports.jsxs(tk,{children:[e.jsxRuntimeExports.jsx(Es,{user:i.reportLastSentByUser}),e.jsxRuntimeExports.jsx(ek,{}),e.jsxRuntimeExports.jsxs(ok,{children:[rk.businessDay,nk.space,null!=i.data?.reportSentDate?r.getBusinessDayOfDate(i.data.reportSentDate):null,":",nk.space,i.data?.reportSentDate?.format(ak.visual.MMMDFormat)]})]})]}),f?e.jsxRuntimeExports.jsx(Z$,{allThreadsSectionOpen:p,children:e.jsxRuntimeExports.jsx(e.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${c.colors.grey3}`,boxShadow:`${e.Space.sp0} 1px 2px ${e.Space.sp0} ${e.Colors.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${e.Space.sp5} - ${e.Space.sp5})`,backgroundColor:c.colors.background},threadsContainerStyle:{paddingBottom:e.Space.sp5},collapsibleThreadStyle:{width:`calc(100% - ${e.Space.sp4})`},allowComposer:!1,drawerTitle:ik.comments,filter:P,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(e,t)=>{U(t);const o=L.findIndex(e=>e[0]===t);u(!1),A.current?.[o]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>u(!1)})}):e.jsxRuntimeExports.jsx(e.FloatingThreads,{observer:M,canvasContainerRef:h,sortedThreads:L,threadsPositions:O,threadsRefs:A,unresolvedThreadsMap:N,editorMode:!1,style:{minWidth:`${e.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${h.current?.offsetTop}px`},handleRemoveFloatingThread:z})]})]})})},exports.MonthEndReportPage=o=>{const{monthEndReportView:i,companyId:s,previewMode:a,onRefresh:l,onNavigateBack:d}=o,{openThread:c,setOpenThread:p}=t.useContext(e.ThreadsContext),u=r.dateNow().subtract(1,"month").format(g$),[m,x]=t.useState(!1),[h,g]=t.useState(!1),[y,S]=t.useState(0),[C,f]=t.useState({hasUnpersistedEdits:!1,isPending:!1}),b=C.isPending,[j,R]=t.useState(!1),w=t.useCallback(()=>{S(e=>e+1),l()},[l]),v=t.useCallback(()=>{b?R(!0):w()},[b,w]);t.useEffect(()=>{j&&!b&&(R(!1),w())},[j,b,w]);if("Not-Started"===i.fetchState||"In-Progress"===i.fetchState||"Not-Started"===i.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===i.companyMonthEndReportTemplatesData.fetchState)return e.jsxRuntimeExports.jsx(u$,{children:e.jsxRuntimeExports.jsx(p$,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"ExtraLarge",start:!0})})});if("Error"===i.fetchState||"Error"===i.companyMonthEndReportTemplatesData.fetchState)return e.jsxRuntimeExports.jsx(u$,{children:e.jsxRuntimeExports.jsx(R$,{onReload:l,message:b$})});if(null==i.html)return e.jsxRuntimeExports.jsx(u$,{children:e.jsxRuntimeExports.jsx(R$,{onReload:l,message:y$})});const E={application:"cockpit",companyId:s,entityId:s,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:i.companyName,url:window.location.href,selectedRange:u},{url:$,...k}=E,T={...k},I=`cockpit_${s}`;return e.jsxRuntimeExports.jsx(n.RoomProvider,{id:I,children:e.jsxRuntimeExports.jsxs(u$,{children:[e.jsxRuntimeExports.jsx(c$,{companyName:i.companyName,threadMetadata:T,onAllThreadsClick:()=>{null!=c&&p(null),x(!0)},onNavigateBack:d,onRefresh:()=>{null!=i.agentInsightsEditedAt||C.hasUnpersistedEdits?g(!0):v()}}),e.jsxRuntimeExports.jsx(YE,{...o,allThreadsSectionOpen:m,filterMetaData:T,newThreadMetadata:E,regenerationCount:y,onAgentInsightSaveStateChange:f,onCloseAllThreadsSection:()=>x(!1)},`${a}_${s}_${i.templateData?.insight_month_year??""}`),h?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{children:S$}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:C$}),primaryButtonText:f$,secondaryButtonText:j$,primaryButtonWidth:168,secondaryButtonWidth:124,action:{onOkClick:()=>{g(!1),v()},onCancelClick:()=>g(!1),onClickAway:()=>g(!1)}}):null]})})},exports.NavHeader=bn,exports.OnboardingCustomerPage=function({localData:o,screenType:n,qboConnectClicked:i,analytics:s,onOnboardingCustomerDataUpdated:a,onCloseClick:l,onSaveClick:d,onViewClick:c,onCompanyDomainBlurred:p,onNavigateToPreOnboarding:u,onQBOConnectClick:m}){const x=e.useTheme(),h=e.useWindowSizeContext(),g=Hv.labelWidth.value(h),y=Hv.largeLabelWidth.value(h),S=Hv.extraLargeLabelWidth.value(h),C=e.useForm({mode:"all",reValidateMode:"onChange",defaultValues:t.useMemo(()=>Wv(o),[o])}),{emailGroupFetchState:f,newOnboardingCustomerLocalData:b,onboardingCompletedCompanies:j,isOnboardingAllowedForUser:R,fetchState:w,sendInviteFetchState:v,uiState:E,companyView:$,externalConnections:k}=o,[T,I]=t.useState(Nv.empty),[P,D]=t.useState(Nv.empty),[A]=t.useState(Nv.empty),[L,O]=t.useState(Nv.empty),[M,N]=t.useState(Nv.empty),[z,F]=t.useState(!1),[V,B]=t.useState(!1),[_,H]=t.useState(Lv.customer.completePreOnboardingText),[W,U]=t.useState(!1),G=t.useRef(null),q=t.useRef(null),K=t.useRef(null),{isExistingCustomer:Y,isCustomerOnboardedSuccessfully:Z}=Jv(o),X=Y&&Z?Lv.customer.customerNameExistInManagementText:Lv.customer.customerNameExistInOnboardingText,Q=t.useMemo(()=>X.replace("_company-domain_",b.companyEmailDomain??Nv.empty),[f.fetchState]),J=$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed,ee=t.useCallback(()=>{const e=C.getValues();return e[Bv].realmId!==e[Bv].confirmRealmId?(O(Lv.customer.realmIdWarning),C.trigger(`${Bv}.confirmRealmId`),!1):(O(Nv.empty),C.clearErrors(`${Bv}.confirmRealmId`),!0)},[C]),te=t.useCallback(()=>{const e=C.getValues();return"Subsidiary"==e[Bv].entityType.selectedOption?.value&&null==e[Bv].company.selectedOption?(C.setError("customerSection.company",{type:"required"}),!1):(C.clearErrors("customerSection.company"),!0)},[C]),oe=t.useCallback(()=>!0===Boolean(b.customerName?.firstName)&&!0!==Boolean(b.customerName?.lastName)||!0!==Boolean(b.customerName?.firstName)&&!0===Boolean(b.customerName?.lastName)?(C.trigger(`${Bv}.customerName`),!1):!0!==Boolean(b.customerName?.firstName)&&!0!==Boolean(b.customerName?.lastName)||!1!==Boolean(b.email)?!0!==Boolean(b.customerName?.firstName)&&!0!==Boolean(b.customerName?.lastName)||!0!==Boolean(b.email)||0!==b.selectedProducts?.length||(N(Lv.customer.productsWarning),C.trigger(`${Bv}.products`),!1):(C.trigger(`${Bv}.email`),!1),[C,b.customerName,b.email,b.selectedProducts]),ne=t.useCallback(()=>ee()&&te()&&oe(),[te,ee,oe]),re=C.handleSubmit(()=>{H(Lv.customer.completePreOnboardingText),ne()&&B(!0)},()=>{ne(),console.warn("Onboarding customer form error")}),ie=C.getValues()[Bv].email??Nv.empty,se=(e=!1)=>{const t={companyDomain:b.companyEmailDomain??Nv.empty,primaryContactEmail:ie},o={groupName:b.groupName??Nv.empty,groupEmail:b.groupId??Nv.empty,groupDescription:b.groupDescription??Nv.empty},n={firstName:b.customerName?.firstName??Nv.empty,lastName:b.customerName?.lastName??Nv.empty,customerEmail:ie,companyName:b.name??Nv.empty,entittyType:!0===b.isSubsidiary?Av.texts.subsidiary:Av.texts.parent??Nv.empty,chargebeeId:b.chargebeeId??Nv.empty,products:b.selectedProducts??[],qboRealmId:b.qboRealmId??Nv.empty,hubSpotId:b.hubSpotId},r={isSendInvite:e,isInviteAlreadySent:!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteSent,isZeniManagedQboConnectionSelected:"zeni_user"===b.accountingConnectionCreationMode,isCustomerManagedQboConnectionSelected:"customer"===b.accountingConnectionCreationMode,qboConnectionStatus:$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed??!1};s?.trackOnboardingSaveOrSendInvite(t,o,n,r)},ae={onOkClick:()=>{F(!1),C.reset(),l()},onCancelClick:()=>{F(!1)}},le={onOkClick:()=>{B(!1),d(!0),se(!0)},onCancelClick:()=>{B(!1)}},de=async(t,n)=>{const i={...n};if(t.includes("groupName")&&n[Vv].groupName!=Nv.empty&&(n[Vv].groupName=n[Vv].groupName.charAt(0).toUpperCase()+n[Vv].groupName.slice(1)),(t.includes("groupName")||t.includes("groupEmail"))&&(()=>{let e=!0;const t=C.getValues();if(t[Vv].groupEmail!==Nv.empty&&t[Vv].groupName===Nv.empty)I(Lv.customer.groupNameWarning),C.setError("groupSection.groupName",{type:"required"}),e=!1;else if(t[Vv].groupName!==Nv.empty&&t[Vv].groupEmail===Nv.empty)D(Lv.customer.groupEmailWarning),C.setError("groupSection.groupEmail",{type:"required"}),e=!1;else{const{error:t}=C.getFieldState("groupSection.groupName"),{error:o}=C.getFieldState("groupSection.groupEmail");null!=t&&"required"!==t.type||null!=o&&"required"!==o.type||(e=!1,C.clearErrors("groupSection")),I(Nv.empty),D(Nv.empty)}})(),t.includes("confirmRealmId")&&O(Nv.empty),t.includes("products")&&!1===e.isEqual(b.selectedProducts??[],n[Bv].products.selectedOptions)){N(Nv.empty);const e=eE(b.selectedProducts??[],n[Bv].products.selectedOptions.map(e=>r.toProductTypeStrict(e)).filter(e=>null!=e));i[Bv].products.selectedOptions=e;const t=ov(o.allProductsList,e);C.setValue(`${Bv}.products`,{allOptions:t,selectedOptions:e})}t.includes("realmId")&&e.has(C.formState.errors,`${Bv}.confirmRealmId`)&&C.trigger(`${Bv}.confirmRealmId`),a(i)};t.useEffect(()=>{const t=C.watch((t,{name:o})=>{null!=o&&null!=t&&e.defer(()=>de(o,t))});return()=>{t.unsubscribe()}}),t.useEffect(()=>{!0===b.isCustomerCreationDisabled&&(C.resetField("customerSection",{defaultValue:Wv(o)[Bv],keepDirty:!0}),C.clearErrors("customerSection"))},[b.isCustomerCreationDisabled]),t.useEffect(()=>{U(!0===b.isSubsidiary),!0!==b.isSubsidiary&&C.resetField("customerSection.company",{defaultValue:Wv(o)[Bv].company,keepDirty:!0}),C.resetField("customerSection.entityType",{defaultValue:Wv(o)[Bv].entityType,keepDirty:!0})},[b.isSubsidiary]),t.useEffect(()=>{"Completed"===f.fetchState&&(C.reset(Wv(o)),Y||(()=>{const e={companyEmailDomain:b.companyEmailDomain??Nv.empty,primaryContactEmail:ie},t={groupName:b.groupName??Nv.empty,groupEmail:b.groupId??Nv.empty,groupDescription:b.groupDescription??Nv.empty,isCompanyEmailDomainAvailable:!0};s?.trackOnboardingNewCustomerGroupCreationCheck(e,t)})())},[f.fetchState]),t.useEffect(()=>{"STEP_1"===E.selectedStep?G.current?.scrollIntoView():"STEP_2"===E.selectedStep?q.current?.scrollIntoView():"STEP_3"===E.selectedStep&&K.current?.scrollIntoView()},[]),t.useEffect(()=>{const e=$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed;if("Error"===k?.saveConnectionState){const e={firstName:b.customerName?.firstName??Nv.empty,lastName:b.customerName?.lastName??Nv.empty,customerEmail:C.getValues()[Bv].email??Nv.empty,qboConnectionResponseMessage:Av.texts.unableToConnectQuickbooksPleaseTryAgain,isSuccess:!1};s?.trackOnboardingZeniManagedQBOConnection(e)}else if(e){const e={firstName:b.customerName?.firstName??Nv.empty,lastName:b.customerName?.lastName??Nv.empty,customerEmail:C.getValues()[Bv].email??Nv.empty,qboConnectionResponseMessage:Av.texts.congratulationsYouHaveSuccessfullyEstablishedAConnectionWith,isSuccess:!0};s?.trackOnboardingZeniManagedQBOConnection(e)}},[k?.saveConnectionState,$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed]),t.useEffect(()=>{if(b.accountingConnectionCreationMode){const e=$?.company.companyOnboardingInfo.onboardingInfo?.accountingConnectionCreationMode??Nv.empty;if(b.accountingConnectionCreationMode!==e){const e={firstName:b.customerName?.firstName??Nv.empty,lastName:b.customerName?.lastName??Nv.empty,customerEmail:C.getValues()[Bv].email??Nv.empty,isZeniOrCustomer:b.accountingConnectionCreationMode??Nv.empty};s?.trackOnboardingQBOConnectionSelected(e)}}},[b.accountingConnectionCreationMode]);const ce=t.useMemo(()=>{const e=C.formState.isValid,t=null!=b.selectedProducts&&(!0===b.selectedProducts.includes("zeni_payroll")||!0===b.selectedProducts.includes("zeni_cfo")||!0===b.selectedProducts.includes("zeni_tax")),o=null!=b.selectedProducts&&(!0===b.selectedProducts.includes("zeni_checking")||!0===b.selectedProducts.includes("zeni_cards")||t)&&!1===b.selectedProducts.includes("bookkeeping");return!0!==e||"In-Progress"===f.fetchState||"Error"===f.fetchState||"In-Progress"===w||"Error"===w||!0!==R||null==b.selectedProducts||0===b.selectedProducts.length||null==b.accountingConnectionCreationMode&&!o||"zeni_user"===b.accountingConnectionCreationMode&&!0!==J&&!o||"Completed"===f.fetchState&&Y||!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted},[f.fetchState,Y,R,w,C.formState.isValid,b.accountingConnectionCreationMode,J,b.selectedProducts,$?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted]),pe=t.useMemo(()=>"In-Progress"!==v.fetchState&&"Error"!==v.fetchState&&"In-Progress"!==w&&"Error"!==w&&"In-Progress"!==f.fetchState&&!0===Y,[f.fetchState,Y,w,v.fetchState]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[!0===z?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{children:Av.confirmationPopup.discardTitle}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:Av.confirmationPopup.discardDescription}),primaryButtonText:Av.confirmationPopup.discard,secondaryButtonText:Av.cancel,proceedButtonVariant:"destructive",action:ae,style:{background:e.Colors.overlayDark}}):null,!0===V?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{style:{paddingLeft:e.Space.sp6,paddingRight:e.Space.sp6},children:Lv.confirmationPopup.title}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:Lv.confirmationPopup.subTitle}),primaryButtonText:Mv,secondaryButtonText:Ov,action:le,style:{background:e.Colors.overlayDark}}):null,e.jsxRuntimeExports.jsx(e.NavBarWithClose,{title:"create"===n?Av.texts.newCustomer:Av.texts.editCustomer,backgroundColor:x.colors.grey5,style:{zIndex:4},onCloseClick:()=>{Object.keys(C.formState.dirtyFields).length>0?F(!0):(C.reset(),l())}}),e.jsxRuntimeExports.jsxs(Uv,{children:[e.jsxRuntimeExports.jsx(Gv,{children:Lv.customer.subTitle}),e.jsxRuntimeExports.jsx(e.FormProvider,{...C,children:e.jsxRuntimeExports.jsxs("form",{id:`${zv}_form`,onSubmit:re,children:[e.jsxRuntimeExports.jsx(Sw,{localData:o,labelWidth:g,onCompanyDomainBlurred:e=>{const{dirtyFields:t}=C.formState;!0===t.companySection?.companyDomain&&p(e)},primaryEmailDomainAdditionalLabel:A,isOnboardingAllowedForUser:R}),!0===pe?e.jsxRuntimeExports.jsxs(Kv,{children:[e.jsxRuntimeExports.jsxs(Yv,{children:[e.jsxRuntimeExports.jsxs(Xv,{children:[e.jsxRuntimeExports.jsx(qv,{}),e.jsxRuntimeExports.jsx(e.StandardMedium,{children:Lv.customer.groupCreationError})]}),e.jsxRuntimeExports.jsx(Qv,{children:Q})]}),e.jsxRuntimeExports.jsx(e.Button,{style:{padding:`${e.Space.sp1} ${e.Space.sp2}`,backgroundColor:x.colors.champion,borderColor:x.colors.champion,color:"light"===x.mode?e.darkColors.primary:e.lightColors.primary,height:"30px",width:e.Space.sp7},label:Av.view,size:"small",onClick:()=>{c(Z?"management":"onboarding")}})]}):null,"Error"===f.fetchState||"Error"===w||"Error"===v.fetchState&&null!=o.error&&406!==o.error?.code?e.jsxRuntimeExports.jsxs(Kv,{children:[e.jsxRuntimeExports.jsx(Yv,{children:e.jsxRuntimeExports.jsxs(Xv,{children:[e.jsxRuntimeExports.jsx(qv,{}),e.jsxRuntimeExports.jsx(e.LargeMedium,{children:Lv.customer.emailgroupAPIError})]})}),e.jsxRuntimeExports.jsx(e.Button,{style:{padding:`${e.Space.sp1} ${e.Space.sp2}`,backgroundColor:x.colors.champion,borderColor:x.colors.champion,color:"light"===x.mode?e.darkColors.primary:e.lightColors.primary},label:Lv.customer.tryAgainText,size:"small",onClick:()=>{"Error"===f.fetchState?p(b.companyEmailDomain):ne()&&0===Object.keys(C.formState.errors).length&&(d("Error"===v.fetchState),se())}})]}):null,"Error"===v.fetchState&&null!=o.error&&406===o.error?.code?e.jsxRuntimeExports.jsxs(Kv,{children:[e.jsxRuntimeExports.jsx(qv,{}),e.jsxRuntimeExports.jsxs(Yv,{children:[e.jsxRuntimeExports.jsx(e.LargeMedium,{children:_!==Nv.empty?Lv.customer.preOnboardingError:Lv.customer.preOnboardingSaveError}),_!==Nv.empty?e.jsxRuntimeExports.jsx(e.Button,{style:{padding:`${e.Space.sp1} ${e.Space.sp2}`,backgroundColor:x.colors.champion,borderColor:x.colors.champion,color:"light"===x.mode?e.darkColors.primary:e.lightColors.primary},label:_,size:"small",onClick:()=>{0===Object.keys(C.formState.errors).length&&(u?.(),H(Nv.empty))}}):null]})]}):null,e.jsxRuntimeExports.jsx(lv,{groupEmailAdditionalLabel:P,groupNameAdditionalLabel:T,labelWidth:g,localData:o,ref:G,sectionId:Vv}),e.jsxRuntimeExports.jsx(Yw,{localData:o,onboardedCompanies:j.companies,isSubsidiary:W,labelWidth:g,largeLabelWidth:y,extraLargeLabelWidth:S,realmIdAdditionalLabel:L,productsAdditionalLabel:M,ref:q,sectionId:Bv,isDisabled:!1===R?"disabled":void 0}),e.jsxRuntimeExports.jsx(Zv,{children:e.jsxRuntimeExports.jsx(Cv,{isSectionDisabled:((e,t)=>{const{fetchState:o}=e,{isEmailGroupCreated:n,selectedProducts:r}=t,i="Completed"!==o&&null==n,s=null==r||0===r.length,a=(!0===r?.includes("zeni_checking")||!0===r?.includes("zeni_treasury")||!0===r?.includes("zeni_cards")||!0===r?.includes("zeni_payroll")||!0===r?.includes("zeni_cfo")||!0===r?.includes("zeni_tax"))&&!1===r?.includes("bookkeeping");return i||s||a})(f,b),sectionId:_v,isLoading:!0===i||"In-Progress"===k?.fetchState||"In-Progress"===k?.saveConnectionState,accountingConnectionCreationMode:o.newOnboardingCustomerLocalData.accountingConnectionCreationMode,onQBOConnectClick:m,isConnected:!0===$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed,isInviteSent:!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteSent||!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted,saveConnectionState:k?.saveConnectionState})})]})})]}),e.jsxRuntimeExports.jsx(e.Footer,{formId:`${zv}_form`,primaryBtn:{label:!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteSent?Av.texts.resendInvite:Av.texts.sendInvite,style:{width:Hv.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isLoading:"In-Progress"===v.fetchState,isDisabled:ce},cancelBtn:{label:Av.save,style:{width:Hv.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isDisabled:!(e.formHasDirtyFields(C.formState.dirtyFields)||"Completed"===o.emailGroupFetchState.fetchState),isLoading:"In-Progress"===w&&!1===i,shouldResetOnCancel:!1,onClick:()=>{ne()&&0===Object.keys(C.formState.errors).length&&(d(!1),se())},reverseSpinnerColor:!1}})]})},exports.OnboardingPage=({headerData:o,headerActions:n,initialOpenThreadRequest:r,onboardingPageActions:i,onboardingPageData:s})=>{const[a,l]=t.useState(!1),[d,c]=t.useState(void 0),[p,u]=t.useState(void 0),{analytics:m}=e.useToolkitContext(),{onboardingView:x,qboConnectionPoolFlag:h}=s,{onScroll:g,onOnboardingStepClicked:y,onCancelClicked:S,onGoLiveClicked:C,onUpdateCustomerCreationStatus:f,onCockpitReloadData:b,onSendInviteClick:j,onColumnSortConfigChanged:R,redirectToDashboardOnboarding:w,onRetryBankAccountConnection:v,onQBOConnectClick:E}=i,$="Completed"===x.fetchState&&"Completed"===x.zeniUsers.fetchState,k={onOkClick:()=>{l(!1),null!=d&&(j(d),null!=p&&m.trackOnboardingSendInvite(d,!1,p))},onCancelClick:()=>{l(!1)}};return e.jsxRuntimeExports.jsxs(uw,{children:[!0===a?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{style:{paddingLeft:e.Space.sp6,paddingRight:e.Space.sp6},children:sw.confirmationPopup.title}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:sw.confirmationPopup.subTitle}),primaryButtonText:lw,secondaryButtonText:aw,action:k,style:{background:e.Colors.overlayDark}}):null,e.jsxRuntimeExports.jsx(bn,{headerActions:{...n},headerData:{...o,allTabOptions:o.allTabOptions??F,companiesLoaded:$,filterData:{filterText:x.uiState.filterText,disableFilters:!0},selectedTabOption:"onboarding"}}),e.jsxRuntimeExports.jsx(mw,{initialOpenThreadRequest:r,onColumnSortConfigChanged:R,onCockpitReloadData:b,onGoLiveClicked:C,onQBOConnectClick:E,onRetryBankAccountConnection:v,onScroll:g,onSendInviteClick:(e,t,o)=>{t?(j(e),m.trackOnboardingSendInvite(e,!0,o)):(c(e),u(o),l(!0))},onboardingView:x,onOnboardingStepClicked:y,onCancelClicked:S,onUpdateCustomerCreationStatus:f,qboConnectionPoolFlag:h,redirectToDashboardOnboarding:w})]})},exports.PortfolioPage=({headerData:t,headerActions:o,portfolioPageActions:n,portfolioPageData:r,initialOpenThreadRequest:i})=>{const{portfolioView:s}=r,{onColumnSortConfigChanged:a,onCompanyNameClicked:l,onPassportIconClicked:d,onScroll:c,onFiltersChange:p,onCockpitReloadData:u}=n,m=s.uiState.filterText,x=s.uiState.filters,h="Completed"===s.fetchState;return o.filterActions&&(o.filterActions.getCategoryWiseOptions=()=>nC()),e.jsxRuntimeExports.jsxs(tC,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...o},headerData:{...t,filterData:{filterText:m,filters:x},companiesLoaded:h,selectedTabOption:"portfolio",allTabOptions:t.allTabOptions??F}}),e.jsxRuntimeExports.jsx(oC,{portfolioView:s,onColumnSortConfigChanged:a,onScroll:c,onCockpitReloadData:u,isFilterApplied:null!=x?.categories,onCompanyNameClicked:l,onPassportIconClicked:d,onClearFilter:()=>p("portfolio",{}),initialOpenThreadRequest:i})]})},exports.ReviewPage=({headerData:o,headerActions:n,initialOpenThreadRequest:r,reviewPageActions:i,reviewPageData:s,analytics:a})=>{const{reviewView:l,zeniUserFetchState:d,allUsers:c,isReviewVendorColumnVisible:p}=s,{onColumnSortConfigChanged:u,onCockpitReloadData:m,onCompanyNameClicked:x,onClickAuditScore:h,onClickWarningsCount:g,onTransactionTagClicked:y,onRetryBankAccountConnection:S,onReviewVendorTagClicked:C,onUncategorizedAccountsErrorClick:f}=i,b=l.uiState.filterText,j="Completed"===l.fetchState,R=t.useMemo(()=>n.filterActions?{...n,filterActions:{...n.filterActions}}:n,[n]);return e.jsxRuntimeExports.jsxs(VT,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:R,headerData:{...o,allTabOptions:o.allTabOptions??F,filterData:{filterText:b,disableFilters:!0},selectedTabOption:"audit",companiesLoaded:j}}),e.jsxRuntimeExports.jsx(BT,{allUsers:c,analytics:a,initialOpenThreadRequest:r,isReviewVendorColumnVisible:p,reviewView:l,zeniUserFetchState:d,onColumnSortConfigChanged:u,onCockpitReloadData:m,onCompanyNameClicked:x,onClickAuditScore:h,onClickWarningsCount:g,onRetryBankAccountConnection:S,onReviewVendorTagClicked:C,onTransactionTagClicked:y,onUncategorizedAccountsErrorClick:f})]})},exports.SubscriptionAddPlanPage=function(o){const n=e.useWindowSizeContext(),r=e.useTheme(),i=t.useRef(null),{localData:s,isDisabled:a,onSubscriptionDetailsChanged:l,onEstimateSuccess:d,onReviewClick:c,onBackClick:p,onResetClick:u}=o,[m,x]=t.useState(void 0),{data:h,fetchState:g,estimateStatus:y}=s,S=e.usePrevious(y.fetchState),C=e.usePrevious(g),f=e.useForm({mode:"all",reValidateMode:"onChange",defaultValues:t.useMemo(()=>Fy(s),[s])});t.useEffect(()=>()=>{x(void 0)},[]),t.useEffect(()=>{"In-Progress"===C&&"Completed"===g&&f.reset(Fy(s))},[C,g,f,s]),t.useEffect(()=>{"In-Progress"===S&&("Error"===y.fetchState?m!==y.fetchState&&x(y.fetchState):"Completed"===y.fetchState&&(x(void 0),d()))},[m,S,y.fetchState,d]),t.useEffect(()=>{const t=f.watch((t,{name:o})=>{null!=o&&null!=t&&e.defer(()=>(async(e,t)=>{(e.includes(Ay)||e.includes(Ly))&&l(t)})(o,t))});return()=>{t.unsubscribe()}});const b=f.handleSubmit(e=>{null!=m&&x(void 0),c()}),j={review:Iy};return e.jsxRuntimeExports.jsxs(Oy,{children:[e.jsxRuntimeExports.jsx(e.NavBar,{title:Py,backgroundColor:r.colors.grey4,style:{zIndex:3},onBackClick:p,scrollableContent:i,source:"SubscriptionAddPlanPage"}),null!=m?e.jsxRuntimeExports.jsx(e.SubscriptionSnackBar,{fetchState:m,customMessageText:y.error?.message??Ty.errorMessage.somethingWentWrongPleaseTryAgain,onRemoveSnackbar:()=>x(void 0)}):null,e.jsxRuntimeExports.jsx(Ny,{ref:i,windowSize:n,children:"In-Progress"===g||"Not-Started"===g?e.jsxRuntimeExports.jsx(My,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Large",start:!0})}):e.jsxRuntimeExports.jsx(e.FormProvider,{...f,children:e.jsxRuntimeExports.jsxs("form",{id:zy(Dy),onSubmit:b,children:[e.jsxRuntimeExports.jsx(my,{sectionId:Ay,subscriptionCreateData:h,subscriptionMetaDetails:iy(s),isDisabled:a}),e.jsxRuntimeExports.jsx(jy,{sectionId:Ly,style:{paddingBottom:e.Space.sp9},subscriptionCreateData:h,isDisabled:a})]})})}),e.formHasDirtyFields(f.formState.dirtyFields)||Vy(s)?e.jsxRuntimeExports.jsx(e.Footer,{formId:zy(Dy),primaryBtn:{label:j.review,isLoading:"In-Progress"===y.fetchState,isDisabled:null!=o.isDisabled&&"In-Progress"!==y.fetchState},cancelBtn:{label:Ty.cancel,shouldResetOnCancel:!0,onClick:()=>{f.reset(By(s)),u()}}}):null]})},exports.SubscriptionPage=({headerData:t,headerActions:o,initialOpenThreadRequest:n,subscriptionPageActions:r,subscriptionPageData:i})=>{const{subscriptionView:s}=i,{onColumnSortConfigChanged:a,changeHandlers:l,onScroll:d,onCompanyNameClicked:c,onPassportIconClicked:p,onCockpitReloadData:u,onPlanOrAddOnClicked:m,onCollapseToggled:x,onFiltersChange:h}=r,g=s.uiState.filterText,y=s.uiState.filters,S="Completed"===s.fetchState&&"Completed"===s.zeniUsers.fetchState;return o.filterActions&&(o.filterActions.getCategoryWiseOptions=()=>bh(s)),e.jsxRuntimeExports.jsxs(Ch,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...o},headerData:{...t,filterData:{filters:y,filterText:g},companiesLoaded:S,allTabOptions:t.allTabOptions??F,selectedTabOption:"subscription"}}),e.jsxRuntimeExports.jsx(fh,{initialOpenThreadRequest:n,isFilterApplied:null!=y?.categories,subscriptionView:s,changeHandlers:l,onClearFilter:()=>h("subscription",{}),onCockpitReloadData:u,onCollapseToggled:x,onColumnSortConfigChanged:a,onCompanyNameClicked:c,onPassportIconClicked:p,onPlanOrAddOnClicked:m,onScroll:d})]})},exports.SubscriptionUpdatePlanPage=function(o){const n=e.useWindowSizeContext(),r=e.useTheme(),{localData:i,isDisabled:s,onSubscriptionDetailsChanged:a,onEstimateSuccess:l,onReviewClick:d,onBackClick:c,onResetClick:p}=o,[u,m]=t.useState(void 0),x=t.useRef(null),{data:h,subscriptionDetail:g,fetchState:y,estimateStatus:S}=i,C=e.usePrevious(S.fetchState),f=e.usePrevious(y),b=e.useForm({mode:"all",reValidateMode:"onChange",defaultValues:t.useMemo(()=>ny(i),[i])});t.useEffect(()=>()=>{m(void 0)},[]),t.useEffect(()=>{"In-Progress"===f&&"Completed"===y&&b.reset(ny(i))},[f,y,b,i]),t.useEffect(()=>{"In-Progress"===C&&("Error"===S.fetchState?u!==S.fetchState&&m(S.fetchState):"Completed"===S.fetchState&&(m(void 0),l()))},[u,C,S.fetchState,l]),t.useEffect(()=>{const t=b.watch((t,{name:o})=>{null!=o&&null!=t&&e.defer(()=>(async(e,t)=>{if(e.includes(Xg)||e.includes(Qg)){if(e.includes(Qg)){const{applyChanges:e}=t,{changeType:o,shouldProrate:n}=e;"applyImmediately"===o&&!0===h?.applyEndOfTerm&&!1===n?b.setValue(Qg,{...e,shouldProrate:!0},{shouldDirty:!0}):"applyEndOfTerm"===o&&!1===h?.applyEndOfTerm&&!0===n&&b.setValue(Qg,{...e,shouldProrate:!1},{shouldDirty:!0})}a(t)}})(o,t))});return()=>{t.unsubscribe()}});const j=b.handleSubmit(e=>{null!=u&&m(void 0),d()}),R=()=>"future"!==E?.status.code?e.jsxRuntimeExports.jsx(vh,{sectionId:Qg,style:{paddingBottom:e.Space.sp9},subscriptionUpdateData:h,subscriptionTermEndDate:E?.currentTerm?.end,isSubscriptionDetailsChanged:ay(i),isDisabled:s}):null,w={review:Kg},v=g?.summary?.summary,E=g?.subscription.subscription,$=g?.plan?.plan.subscriptionPlanId,k=null!=v?.recommendedSubscriptionPlanId&&$===v?.primarySubscriptionPlanId?v?.recommendedSubscriptionPlanId:void 0;return e.jsxRuntimeExports.jsxs(Jg,{children:[e.jsxRuntimeExports.jsx(e.NavBar,{title:Yg,backgroundColor:r.colors.grey4,style:{zIndex:3},onBackClick:c,scrollableContent:x,source:"SubscriptionUpdatePlanPage"}),null!=u?e.jsxRuntimeExports.jsx(e.SubscriptionSnackBar,{fetchState:u,customMessageText:S.error?.message??qg.errorMessage.somethingWentWrongPleaseTryAgain,onRemoveSnackbar:()=>m(void 0)}):null,e.jsxRuntimeExports.jsx(ty,{ref:x,windowSize:n,children:"In-Progress"===y||"Not-Started"===y?e.jsxRuntimeExports.jsx(ey,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Large",start:!0})}):e.jsxRuntimeExports.jsx(e.FormProvider,{...b,children:e.jsxRuntimeExports.jsxs("form",{id:oy(Zg),onSubmit:j,children:[e.jsxRuntimeExports.jsx(Fg,{sectionId:Xg,subscriptionUpdateData:h,recommendedSubscriptionPlanId:k,subscriptionMetaDetails:iy(i),isDisabled:s}),e.jsxRuntimeExports.jsx(R,{})]})})}),e.formHasDirtyFields(b.formState.dirtyFields)||sy(i)?e.jsxRuntimeExports.jsx(e.Footer,{formId:oy(Zg),primaryBtn:{label:w.review,isLoading:"In-Progress"===S.fetchState,isDisabled:null!=o.isDisabled&&"In-Progress"!==S.fetchState},cancelBtn:{label:qg.cancel,shouldResetOnCancel:!0,onClick:()=>{b.reset(ly(i)),null!=g&&p(g)}}}):null]})},exports.TaskManagerPage=({headerActions:o,headerData:n,isBirdsEyeViewEnabled:r,initialOpenThreadRequest:i,taskManagerPageData:s,taskManagerPageActions:a})=>{const{companyTaskManagerView:l}=s,{uiState:d}=l,{onCockpitReloadData:c,onFetchTaskManagerView:p,onRowClick:u}=a,m="Completed"===l.fetchState,{filters:x}=l.uiState,[h,g]=t.useState(l.uiState.filterText??""),y=t.useRef(e.debounce$1(e=>p(d.from,d.sortKey,d.sortOrder,!1,e,x),500,{trailing:!0})).current;return o.filterActions&&(o.filterActions.getCategoryWiseOptions=()=>ud(l)),e.jsxRuntimeExports.jsxs(md,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...o,filterActions:{...o.filterActions,onFilterTextChanged:(e,t)=>{g(t);const o=t.trim();o.length>=2?y(o):y("")}}},headerData:{...n,allTabOptions:n.allTabOptions??F,selectedTabOption:"taskManager",companiesLoaded:m,filterData:{filterText:h,filters:x}}}),r?e.jsxRuntimeExports.jsx(gd,{metrics:l.metrics}):null,e.jsxRuntimeExports.jsx(pd,{companyTaskManagerView:l,fetchNextItemsOnScroll:()=>{p(d.from,d.sortKey,d.sortOrder,!0,d.filterText)},initialOpenThreadRequest:i,onCockpitReloadData:c,onColumnSortConfigChanged:(e,t)=>{p(d.from,e,t,!1,d.filterText,x)},onRowClick:u})]})},exports.WarningsDrawerPage=({companyView:t,allUsers:o,onRetryBankAccountConnection:n,onCloseClick:i})=>{const s=e.useWindowSizeContext(),a=null!=t?r.getAuditWarningsCount(t):0,l=t?.onboardingInfo?.bankAccountLinked,d=t?.onboardingInfo?.qboLinked,c=t?.onboardingInfo?.identityVerified,p=t?.onboardingInfo?.businessVerified,u="zeni_user"===t?.onboardingInfo?.accountingConnectionCreationMode,m=[];if(null!=l){const e=o.find(e=>e.userId===l.userIds[0]),{errorMessage:t,successMessage:r}=GP(l,u,e);m.push({status:null!=t?"Error":null!=r?"Complete":"Incomplete",userInfo:e,message:t??r??`${HP.common.texts.linkBankAccount} ${HP.common.strings.hyphen} ${HP.common.incompleteText}`,onClickRetry:n})}if(null!=d){const e=o.find(e=>e.userId===d.userIds[0]),{errorMessage:t,successMessage:n}=qP(d,u,e);m.push({status:null!=t?"Error":null!=n?"Complete":"Incomplete",userInfo:e,message:t??n??`${HP.common.texts.connectToQbo} ${HP.common.strings.hyphen} ${HP.common.incompleteText}`})}if(null!=c){const e=o.find(e=>e.userId===c.userIds[0]),{errorMessage:t,successMessage:n}=KP(c,u,e);m.push({status:null!=t?"Error":null!=n?"Complete":"Incomplete",userInfo:e,message:t??n??`${HP.cockpit.review.warningsDrawer.kyc} ${HP.common.strings.hyphen} ${c.status}`})}if(null!=p){const e=o.find(e=>e.userId===p.userIds[0]),{errorMessage:t,successMessage:n}=YP(p,u,e);m.push({status:null!=t?"Error":null!=n?"Complete":"Incomplete",userInfo:e,message:t??n??`${HP.cockpit.review.warningsDrawer.kyb} ${HP.common.strings.hyphen} ${p.status}`})}return e.jsxRuntimeExports.jsxs(ZP,{children:[e.jsxRuntimeExports.jsx(XP,{windowSize:s,children:e.jsxRuntimeExports.jsx(QP,{children:e.jsxRuntimeExports.jsxs(tD,{windowSize:s,children:[e.jsxRuntimeExports.jsx(oD,{windowSize:s,children:t?.name}),e.jsxRuntimeExports.jsx(cD,{onClick:i,children:e.jsxRuntimeExports.jsx(pD,{})})]})})}),e.jsxRuntimeExports.jsxs(JP,{children:[e.jsxRuntimeExports.jsx(eD,{children:a>0?e.jsxRuntimeExports.jsxs(uD,{children:[e.jsxRuntimeExports.jsx(uD,{children:e.capitaliseWords(HP.cockpit.review.warningsDrawer.issueFound)}),e.jsxRuntimeExports.jsx(mD,{children:`${HP.common.strings.openingBrace}${a}${HP.common.strings.closingBrace}`})]}):e.jsxRuntimeExports.jsx(uD,{children:`${HP.common.no} \n ${e.capitaliseWords(HP.cockpit.review.warningsDrawer.issueFound)}`})}),m.map((o,n)=>e.jsxRuntimeExports.jsx(nD,{isStepInError:"Error"===o.status,children:e.jsxRuntimeExports.jsxs(rD,{children:[e.jsxRuntimeExports.jsx(iD,{children:"Complete"===o.status?e.jsxRuntimeExports.jsx(lD,{}):"Error"===o.status?e.jsxRuntimeExports.jsx(e.SvgHighImportanceFilled,{}):e.jsxRuntimeExports.jsx(dD,{})}),e.jsxRuntimeExports.jsxs(sD,{children:[e.jsxRuntimeExports.jsx(aD,{isStepInError:"Error"===o.status,children:o.message}),"Error"===o.status?e.jsxRuntimeExports.jsx(e.Button,{label:HP.common.retry,onClick:o.onClickRetry,loading:"In-Progress"===t?.retryBankAccountConnectionFetchState.fetchState,variant:"outline",style:{padding:`${e.Space.sp1} ${e.Space.sp3}`,borderRadius:e.Space.sp1},textStyle:{...e.textStyles.smallMedium.cssObject}}):null]})]})},n))]})]})},exports.toCockpitOptionType=Ie,exports.toCockpitOptionTypeStrict=e=>r.stringToUnionStrict(e,Te);
|
|
6163
|
+
`;exports.AIAgentsActivatingPage=e.AIAgentsActivatingPage,exports.AIIconButton=e.AIIconButton,exports.AIPerformancePage=e.AIPerformancePage,exports.ALL_AI_CFO_MENU_OPTIONS=e.ALL_AI_CFO_MENU_OPTIONS,exports.ALL_INVOICING_MENU_GROUPS=e.ALL_INVOICING_MENU_GROUPS,exports.ALL_INVOICING_MENU_OPTIONS=e.ALL_INVOICING_MENU_OPTIONS,exports.ALL_SETTINGS_MENU_OPTIONS=e.ALL_SETTINGS_MENU_OPTIONS,exports.APP_DRAWER_CONTENT_WIDTH_PX=e.APP_DRAWER_CONTENT_WIDTH_PX,exports.AccountInfoPage=e.AccountInfoPage,exports.AccountLockedInfoModal=e.AccountLockedInfoModal,exports.AccountReconDetailsDrawerPage=e.AccountReconDetailsDrawerPage,exports.AccountReconDetailsDrawerPageV2=e.AccountReconDetailsDrawerPage$1,exports.ActivityIndicator=e.ActivityIndicator,exports.ActualMatchingMatchDetailPage=e.ActualMatchingMatchDetailPage,exports.AddAddressForCardDrawer=e.AddAddressForCardDrawer,exports.AddToWalletPage=e.AddToWalletPage,exports.AddressFormPage=e.AddressFormPage,exports.AgingReportsPage=e.AgingReportsPage,exports.AiCfoChatHeader=e.AiCfoChatHeader,exports.AiCfoMenuContent=e.AiCfoMenuContent,exports.AiCfoOnboardingPage=e.AiCfoOnboardingPage,exports.AiCfoPage=e.AiCfoPage,exports.AiCfoScopeModal=e.AiCfoScopeModal,exports.AiCfoScopeModalScrollBody=e.AiCfoScopeModalScrollBody,exports.AiCfoSidePanel=e.AiCfoSidePanel,exports.AiCfoSkillsBrowser=e.AiCfoSkillsBrowser,exports.AiFinanceTeamReadyPage=e.AiFinanceTeamReadyPage,exports.AllowBlockChipPicker=e.AllowBlockChipPicker,exports.AnalyticsOnLoad=e.AnalyticsOnLoad,exports.ApAgingDetailPage=e.ApAgingDetailPage,exports.AppBasePage=e.AppBasePage,exports.AppDrawerContent=e.AppDrawerContent,exports.AppDrawerHeightMobile=e.AppDrawerHeightMobile,exports.ApprovalRulesSettingsPage=e.ApprovalRulesSettingsPage,exports.ArAgingDetailPage=e.ArAgingDetailPage,exports.AskAiCfoNavButton=e.AskAiCfoNavButton,exports.AskAiCfoNavButtonWhenEnabled=e.AskAiCfoNavButtonWhenEnabled,exports.AttachmentView=e.AttachmentView,exports.AutoTransferRulePage=e.AutoTransferRulePage,exports.BackNavigationProvider=e.BackNavigationProvider,exports.BankConnectionsSettingsPage=e.BankConnectionsSettingsPage,exports.BillDetailPage=e.BillDetailPage,exports.BillDetailPageSkeleton=e.BillDetailPageSkeleton,exports.BillPayApprovalRuleDetailPage=e.BillPayApprovalRuleDetailPage,exports.BillPayApprovalRuleDetailPageV1=e.BillPayApprovalRuleDetailPage$1,exports.BillPayApprovalRulesPage=e.BillPayApprovalRulesPage,exports.BillPayApprovalRulesPageV1=e.BillPayApprovalRulesPage$1,exports.BillPayPromoPage=e.BillPayPromoPage,exports.BillPaySetUpLoading=e.SpendManagementSetUpLoading,exports.BillPaySetUpPage=e.BillPaySetUpPage,exports.BillingSettingsPage=e.BillingSettingsPage,exports.BillsBulkReviewDrawerPage=e.BillsBulkReviewDrawerPage,exports.BusinessVerificationPage=e.BusinessVerificationPage,exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT=e.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT,exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION=e.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION,exports.COMMAND_CENTER_SUBMENU_TYPES=e.COMMAND_CENTER_SUBMENU_TYPES,exports.COMMENT_NOTIFICATION_KINDS=e.COMMENT_NOTIFICATION_KINDS,exports.CapitalizationOnboardingPopup=e.CapitalizationOnboardingPopup,exports.CapitalizationSettingsSection=e.CapitalizationSettingsSection,exports.CardPolicyCreatePage=e.CardPolicyCreatePage,exports.CardPolicyEditPage=e.CardPolicyEditPage,exports.CardPolicyFormPageSkeleton=e.CardPolicyFormPageSkeleton,exports.CardPolicyFormSections=e.CardPolicyFormSections,exports.CardPolicyListPage=e.CardPolicyListPage,exports.CardPolicyListPageSkeleton=e.CardPolicyListPageSkeleton,exports.CardPolicyListRow=e.CardPolicyListRow,exports.CardPolicyListSkeletonRow=e.CardPolicyListSkeletonRow,exports.CardPolicyManualEmptyState=e.CardPolicyManualEmptyState,exports.CardsAiCfoHero=e.CardsAiCfoHero,exports.CardsShutdownBanner=e.CardsShutdownBanner,exports.CashbackDetailLoading=e.CashbackDetailLoading,exports.CashbackDetailPage=e.CashbackDetailPage,exports.ChargeCardCVVActivate=e.ChargeCardCVVActivate,exports.ChargeCardDetailLoading=e.ChargeCardDetailLoading,exports.ChargeCardDetailPage=e.ChargeCardDetailPage,exports.ChargeCardListLoading=e.ChargeCardListLoading,exports.ChargeCardListPage=e.ChargeCardListPage,exports.ChargeCardListSkeletonRow=e.ChargeCardListSkeletonRow,exports.ChargeCardPaymentHistoryPage=e.ChargeCardPaymentHistoryPage,exports.ChargeCardPromoPage=e.ChargeCardPromoPage,exports.ChargeCardPromoPageSkeleton=e.ChargeCardPromoPageSkeleton,exports.ChargeCardSetUpPage=e.ChargeCardSetUpPage,exports.ChargeCardSetupLoading=e.SpendManagementSetUpLoading,exports.ChargeCardStatementsLoading=e.ChargeCardStatementsLoading,exports.ChargeCardStatementsPage=e.ChargeCardStatementsPage,exports.ChargeCardUserOnboardingPromoPage=e.ChargeCardUserOnboardingPromoPage,exports.ChargeCardUserOnboardingPromoPageSkeleton=e.ChargeCardUserOnboardingPromoPageSkeleton,exports.CheckDepositDrawerPage=e.CheckDepositDrawerPage,exports.ClickableRow=e.ClickableRow,exports.CollaborationGlobalStyles=e.CollaborationGlobalStyles,exports.CollaborationProvider=e.CollaborationProvider,exports.CollaborationRoomProvider=e.CollaborationRoomProvider,exports.Colors=e.Colors,exports.CommentsAndNotesCount=e.CommentsAndNotesCount,exports.CommentsDrawerProvider=e.CommentsDrawerProvider,exports.CompanyOfficerOnboardingDetailsSection=e.CompanyOfficerOnboardingDetailsSection,exports.CompanyOnboardingDetailsSection=e.CompanyOnboardingDetailsSection,exports.CompanyPassportCard=e.CompanyPassportCard,exports.CompanyPassportPage=e.CompanyPassportPage,exports.CompleteProfile=e.CompleteProfile,exports.ConfettiBurst=e.ConfettiBurst,exports.ConfirmationPopup=e.ConfirmationPopup,exports.ConnectDataSourcesPage=e.ConnectDataSourcesPage,exports.CreateOrEditVendorPage=e.CreateOrEditVendorPage,exports.CreateOrEditVendorPageSkeleton=e.CreateOrEditVendorPageSkeleton,exports.CreatedEntitiesAnswer=e.CreatedEntitiesAnswer,exports.CreatingEntitiesAnswerLoading=e.CreatingEntitiesAnswerLoading,exports.CreditCardPaymentDrawerPage=e.CreditCardPaymentDrawerPage,exports.CustomerOnboardingContainerPage=e.CustomerOnboardingContainerPage,exports.CustomerOnboardingNoStepsPage=e.CustomerOnboardingNoStepsPage,exports.CustomerOnboardingPage=e.CustomerOnboardingPage,exports.CustomerOnboardingProductSuitePage=e.CustomerOnboardingProductSuitePage,exports.Dashboard=e.Dashboard,exports.DashboardReportPage=e.DashboardReportPage,exports.DashboardSidebarLogoAnimation=e.DashboardSidebarLogoAnimation,exports.DataListTable=e.DataListTable,exports.DataListTableHeader=e.DataListTableHeader,exports.DataListTableRow=e.DataListTableRow,exports.DataListTableSortIndicator=e.DataListTableSortIndicator,exports.DebitCardSetPin=e.DebitCardSetPin,exports.DropdownPortalContext=e.DropdownPortalContext,exports.EditPeoplePage=e.EditPeoplePage,exports.EditReimbursementDetailPage=e.EditReimbursementDetailPage,exports.EditableBillDetailPage=e.EditableBillDetailPage,exports.EntityDetailPage=e.EntityDetailPage,exports.ErrorBoundaryWrapper=e.ErrorBoundaryWrapper,exports.ExcludedAccountReconDetailsDrawerPage=e.ExcludedAccountReconDetailsDrawerPage,exports.ExpenseAutomationOverviewPage=e.ExpenseAutomationOverviewPage,exports.ExpenseAutomationOverviewPageSkeleton=e.ExpenseAutomationOverviewPageSkeleton,exports.ExpenseAutomationPage=e.ExpenseAutomationPage,exports.ExpressPayPage=e.ExpressPayPage,exports.FeatureDynamicConfigNames=e.DynamicConfigNames,exports.FeatureGatesNames=e.FeatureGatesNames,exports.FeaturePreviewPage=e.FeaturePreviewPage,exports.FeatureProvider=e.FeatureProvider,exports.FieldHelpIcon=e.FieldHelpIcon,exports.FieldHelpProvider=e.FieldHelpProvider,exports.FirstReviewVendorDetailPage=e.FirstReviewVendorDetailPage,exports.FontWeight=e.FontWeight,exports.GlobalInfoProvider=e.GlobalInfoProvider,exports.GlobalReviewListPage=e.GlobalReviewListPage,exports.INVOICING_SETTINGS_NAV_SECTIONS=e.INVOICING_SETTINGS_NAV_SECTIONS,exports.INVOICING_SETTINGS_TABS=e.INVOICING_SETTINGS_TABS,exports.InformationCardStack=e.InformationCardStack,exports.InitialCollaborationProvider=e.InitialCollaborationProvider,exports.InsightsCardStack=e.InsightCardStack,exports.IntegrationCardView=e.IntegrationCardView,exports.IntegrationsCardGrid=e.IntegrationsCardGrid,exports.IntegrationsSection=e.IntegrationsSection,exports.IntegrationsSettingsPage=e.IntegrationsSettingsPage,exports.InternationalWireVerificationPage=e.InternationalWireVerificationPage,exports.InviteFormPage=e.InviteFormPage,exports.InvitePageListView=e.InvitePageListView,exports.InvitePeoplePage=e.InvitePeoplePage,exports.InvoiceUploadSection=e.InvoiceUploadSection,exports.InvoiceUploadSectionSkeleton=e.InvoiceUploadSectionSkeleton,exports.InvoicingAddPaymentMethodDialog=e.InvoicingAddPaymentMethodDialog,exports.InvoicingAuditLogPage=e.InvoicingAuditLogPage,exports.InvoicingBrandingSettingsPage=e.InvoicingBrandingSettingsPage,exports.InvoicingCatalogItemDetailPage=e.InvoicingCatalogItemDetailPage,exports.InvoicingCatalogItemFormPage=e.InvoicingCatalogItemFormPage,exports.InvoicingCatalogPage=e.InvoicingCatalogPage,exports.InvoicingCouponFormPage=e.InvoicingCouponFormPage,exports.InvoicingCreateInvoicePage=e.InvoicingCreateInvoicePage,exports.InvoicingCreateInvoiceSkeleton=e.InvoicingCreateInvoiceSkeleton,exports.InvoicingCreatePromotionalCreditsDialog=e.InvoicingCreatePromotionalCreditsDialog,exports.InvoicingCreditDetailPage=e.InvoicingCreditDetailPage,exports.InvoicingCreditListPage=e.InvoicingCreditListPage,exports.InvoicingCustomerDetailPage=e.InvoicingCustomerDetailPage,exports.InvoicingCustomerFormPage=e.InvoicingCustomerFormPage,exports.InvoicingCustomerListPage=e.InvoicingCustomerListPage,exports.InvoicingDashboardSkeleton=e.InvoicingDashboardSkeleton,exports.InvoicingDataImportDetailPage=e.InvoicingDataImportDetailPage,exports.InvoicingDataImportHubPage=e.InvoicingDataImportHubPage,exports.InvoicingDataImportMigratePage=e.InvoicingDataImportMigratePage,exports.InvoicingDetailScaffold=e.InvoicingDetailScaffold,exports.InvoicingDiscountDetailPage=e.InvoicingDiscountDetailPage,exports.InvoicingDiscountListPage=e.InvoicingDiscountListPage,exports.InvoicingDunningDetailPage=e.InvoicingDunningDetailPage,exports.InvoicingDunningEmailComposerDialog=e.InvoicingDunningEmailComposerDialog,exports.InvoicingDunningListPage=e.InvoicingDunningListPage,exports.InvoicingDunningSettingsPage=e.InvoicingDunningSettingsPage,exports.InvoicingEmptyState=e.InvoicingEmptyState,exports.InvoicingIntegrationsSettingsPage=e.InvoicingIntegrationsSettingsPage,exports.InvoicingInvoiceDetailPage=e.InvoicingInvoiceDetailPage,exports.InvoicingInvoiceListPage=e.InvoicingInvoiceListPage,exports.InvoicingIssueCreditNotePage=e.InvoicingIssueCreditNotePage,exports.InvoicingOverviewPage=e.InvoicingOverviewPage,exports.InvoicingPaymentDestinationSettingsPage=e.InvoicingPaymentDestinationSettingsPage,exports.InvoicingPaymentLinkEmailComposerDialog=e.InvoicingPaymentLinkEmailComposerDialog,exports.InvoicingPaymentLinkPage=e.InvoicingPaymentLinkPage,exports.InvoicingPaymentListPage=e.InvoicingPaymentListPage,exports.InvoicingPromoPage=e.InvoicingPromoPage,exports.InvoicingQBOSettingsPage=e.InvoicingQBOSettingsPage,exports.InvoicingRecordPaymentPage=e.InvoicingRecordPaymentPage,exports.InvoicingSettingsHubPage=e.InvoicingSettingsHubPage,exports.InvoicingSettingsPage=e.InvoicingSettingsHubPage,exports.InvoicingSubscriptionDetailPage=e.InvoicingSubscriptionDetailPage,exports.InvoicingSubscriptionFormPage=e.InvoicingSubscriptionFormPage,exports.InvoicingSubscriptionListPage=e.InvoicingSubscriptionListPage,exports.InvoicingTransactionDetailPage=e.InvoicingTransactionDetailPage,exports.InvoicingVoidInvoiceDialog=e.InvoicingVoidInvoiceDialog,exports.IssueChargeCardPage=e.IssueChargeCardPage,exports.IssueChargeCardPageSkeleton=e.IssueChargeCardPageSkeleton,exports.JEOneTimeAccrualDetailPage=e.JEOneTimeAccrualDetailPage,exports.LinkBillExpensePage=e.LinkBillExpensePage,exports.LinkJETransactionPage=e.LinkJETransactionPage,exports.Loader=e.Loader,exports.LogoutButton=e.LogoutButton,exports.MCC_CHIP_ID_PREFIX=e.MCC_CHIP_ID_PREFIX,exports.MEETING_LINK_DEFAULTS=e.MEETING_LINK_DEFAULTS,exports.MagicLinkDomesticWireDetailsPage=e.MagicLinkDomesticWireDetailsPage,exports.MagicLinkInternationalWireDetailsPage=e.MagicLinkInternationalWireDetailsPage,exports.MagicLinkSuccessPage=e.MagicLinkSuccessPage,exports.MagicLinkVendorACHDetailsPage=e.MagicLinkVendorACHDetailsPage,exports.Modal=e.Modal,exports.MonthEndEmailDrawerCustomerRequestPage=e.MonthEndEmailDrawerCustomerRequestPage,exports.MyBankConnectionsSettingsPage=e.MyBankConnectionsSettingsPage,exports.MyPendingActivationChargeCardListPage=e.MyPendingActivationChargeCardListPage,exports.MyProfileSettingsPage=e.MyProfileSettingsPage,exports.NavBar=e.NavBar,exports.NavBarRightRowStyled=e.NavBarRightRowStyled,exports.NewGlobalMerchantPage=e.NewGlobalMerchantPage,exports.NewUpdateAvailablePage=e.NewUpdateAvailablePage,exports.NotFoundPage=e.NotFoundPage,exports.NotificationIcon=e.SvgNotification,exports.NotificationSettingsPage=e.NotificationSettingsPage,exports.NotificationsPage=e.NotificationsPage,exports.OAuthConsentPage=e.OAuthConsentPage,exports.OnboardingInitialLoader=e.OnboardingInitialLoader,exports.OnboardingSidebar=e.OnboardingSidebar,exports.OnboardingStepFrame=e.OnboardingStepFrame,exports.OpExByVendorPage=e.OpExByVendorPage,exports.OverlayContainerPage=e.OverlayContainerPage,exports.PandLWithForecastPage=e.PandLWithForecastPage,exports.PanelDirtyGuardContext=e.PanelDirtyGuardContext,exports.PanelInternalContext=e.PanelInternalContext,exports.PaymentAccountSetupBillingAddressSection=e.PaymentAccountSetupBillingAddressSection,exports.PeoplePage=e.PeoplePage,exports.Picker=e.Picker,exports.PolicyLimitsRowList=e.PolicyLimitsRowList,exports.PolicyModeSelector=e.PolicyModeSelector,exports.PortfolioAllocationFormPage=e.PortfolioAllocationFormPage,exports.QBOConnectionDialog=e.QBOConnectionDialog,exports.QBOSetupSectionWithForm=e.QBOSetupSectionWithForm,exports.QuickResponsesPage=e.QuickResponsesPage,exports.QuickViewModeContext=e.QuickViewModeContext,exports.RIGHT_SIDE_PANEL_WIDTH_PX=e.RIGHT_SIDE_PANEL_WIDTH_PX,exports.RecommendationFeedbackPopup=e.RecommendationFeedbackPopup,exports.ReferralDrawerPage=e.DrawerPage,exports.ReimbursementApprovalRuleDetailPage=e.ReimbursementApprovalRuleDetailPage,exports.ReimbursementApprovalRuleDetailPageV1=e.ReimbursementApprovalRuleDetailPage$1,exports.ReimbursementApprovalRulesPage=e.ReimbursementApprovalRulesPage,exports.ReimbursementApprovalRulesPageV1=e.ReimbursementApprovalRulesPage$1,exports.ReimbursementDetailPage=e.ReimbursementDetailPage,exports.ReimbursementDetailPageSkeleton=e.ReimbursementDetailPageSkeleton,exports.ReimbursementPromoPage=e.ReimbursementPromoPage,exports.ReimbursementSetUpLoading=e.SpendManagementSetUpLoading,exports.ReimbursementSetUpPage=e.RemiSetupPage,exports.RemisBulkReviewDrawerPage=e.ReimbursementsBulkReviewDrawerPage,exports.ReportsPage=e.ReportsPage,exports.ResponsiveSized=e.ResponsiveSized,exports.ReviewBillDetailsPage=e.ReviewBillDetailsPage,exports.ReviewConfirmTransferPanel=e.ReviewConfirmTransferPanel,exports.ReviewDetailsPageSkeleton=e.ReviewDetailsPageSkeleton,exports.ScheduleDetailSkeleton=e.ScheduleDetailSkeleton,exports.ScheduleDetailsAccruedExpensesPage=e.ScheduleDetailsAccruedExpensesPage,exports.ScheduleDetailsFixedAssetsPage=e.ScheduleDetailsFixedAssetsPage,exports.ScheduleDetailsPage=e.ScheduleDetailsPage,exports.SearchableCheckboxCardList=e.SearchableCheckboxCardList,exports.SessionTimeoutPopup=e.SessionTimeoutPopup,exports.SidePanelContext=e.SidePanelContext,exports.SidePanelLayout=e.SidePanelLayout,exports.SidePanelProvider=e.SidePanelProvider,exports.SignIn=e.SignIn,exports.SomethingWrongPage=e.SomethingWrongPage,exports.Space=e.Space,exports.SpendManagementListLoading=e.SpendManagementListLoading,exports.SpendManagementListViewPage=e.SpendManagementListViewPage,exports.StatementParseInfo=e.StatementParseInfoEntry,exports.StatementProcessingPage=e.StatementProcessingPage,exports.StatementsPage=e.StatementsPage,exports.StyledCapsule=e.StyledCapsule,exports.SubscriptionDetailPage=e.SubscriptionDetailPage,exports.SubscriptionSummaryPage=e.SubscriptionSummaryPage,exports.SyntheticAiCfoAnswerView=e.SyntheticAiCfoAnswerView,exports.THREAD_RESOLVED_NOTIFICATION_KIND=e.THREAD_RESOLVED_NOTIFICATION_KIND,exports.THREAD_UNRESOLVED_NOTIFICATION_KIND=e.THREAD_UNRESOLVED_NOTIFICATION_KIND,exports.TaskDetailPage=e.TaskDetailPage,exports.TaskManagementPage=e.TaskManagementPage,exports.TenantsDropDown=e.TenantsDropDown,exports.TextStyle=e.TextStyle,exports.ToolkitProvider=e.ToolkitProvider,exports.TopExDetailPage=e.TopExDetailPage,exports.TransactionActivityLogPage=e.TransactionActivityLogPage,exports.TransactionActivityLogPanel=e.TransactionActivityLogPanel,exports.TransactionDetailPage=e.TransactionDetailPage,exports.TransactionDetailSkeleton=e.TransactionDetailSkeleton,exports.TransactionListBig=e.TransactionListBig,exports.TransactionListComments=e.TransactionListComments,exports.TransactionListPage=e.TransactionListPage,exports.TransactionVendorDetailPage=e.TransactionVendorDetailPage,exports.TransferDrawerPage=e.TransferDrawerPage,exports.TreasuryOverviewPage=e.TreasuryOverviewPage,exports.TreasuryPromoPage=e.TreasuryPromoPage,exports.TreasurySetUpPage=e.TreasurySetUpPage,exports.TreasuryStatementsPage=e.TreasuryStatementsPage,exports.TreasuryTaxLetterPage=e.TreasuryTaxLetterPage,exports.TreasuryTransferOrReviewPage=e.TreasuryTransferOrReviewPage,exports.TrendChart=e.TrendChart,exports.UncategorizedAccountsMappingPage=e.UncategorizedAccountsMappingPage,exports.UnitIntegrationPage=e.UnitIntegrationPage,exports.VENDOR_CHIP_ID_PREFIX=e.VENDOR_CHIP_ID_PREFIX,exports.Vendor2FAPopup=e.Vendor2FAPopup,exports.VendorACHDetailsPage=e.VendorACHDetailsPage,exports.VendorAccruedSchedulesPage=e.VendorAccruedSchedulesPage,exports.VendorDetailPage=e.VendorDetailPage,exports.VendorDomesticWireDetailsPage=e.VendorDomesticWireDetailsPage,exports.VendorFiling1099DetailsEditablePage=e.VendorFiling1099DetailsEditablePage,exports.VendorFiling1099EditableFormSkeleton=e.VendorFiling1099EditableFormSkeleton,exports.VendorFiling1099ListPage=e.VendorFiling1099ListPage,exports.VendorFirstReviewPage=e.VendorFirstReviewPage,exports.VendorInternationalSwiftBasedDetailsPage=e.VendorInternationalSwiftBasedDetailsPage,exports.VendorInternationalWireDetailsPage=e.VendorInternationalWireDetailsPage,exports.VendorListPage=e.VendorListPage,exports.VendorSchedulesPage=e.VendorSchedulesPage,exports.VerificationFrame=e.VerificationFrame,exports.VerifyDevice=e.VerifyDevice,exports.VerifyUnlockFinancialStackPage=e.VerifyUnlockFinancialStackPage,exports.WebV2MicroService=e.WebV2MicroService,exports.WebV2MicroServiceProvider=e.WebV2MicroServiceProvider,exports.WelcomeAnimation=e.WelcomeAnimation,exports.WindowSizeProvider=e.WindowSizeProvider,exports.ZeniAccountDetailLoading=e.ZeniAccountDetailLoading,exports.ZeniAccountDetailNavBarTitleShimmer=e.ZeniAccountDetailNavBarTitleShimmer,exports.ZeniAccountDetailPage=e.ZeniAccountDetailPage,exports.ZeniAccountListLoading=e.ZeniAccountListLoading,exports.ZeniAccountListViewPage=e.ZeniAccountListViewPage,exports.ZeniAccountPromoPage=e.ZeniAccountPromoPage,exports.ZeniAccountSetUpPage=e.ZeniAccountSetUpPage,exports.ZeniText=e.ZeniText,exports.ZeniThemeProvider=e.ZeniThemeProvider,exports.alignToJustify=e.alignToJustify,exports.amountToString=e.amountToString,exports.amountValueToString=e.amountValueToString,exports.appLocale=e.appLocale,exports.applyExtractedPolicyRulesToFormValues=e.applyExtractedPolicyRulesToFormValues,exports.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm=e.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm,exports.buildCardPolicyFormValuesFromRequest=e.buildCardPolicyFormValuesFromRequest,exports.buildCreateCardPolicyTemplateRequest=e.buildCreateCardPolicyTemplateRequest,exports.buildCreateCardPolicyTemplateRequestFromInteractiveForm=e.buildCreateCardPolicyTemplateRequestFromInteractiveForm,exports.buildMccCategoryChipId=e.buildMccCategoryChipId,exports.buildStickyKeySet=e.buildStickyKeySet,exports.buildVendorChipId=e.buildVendorChipId,exports.cellVerticalAlignToFlexAlign=e.cellVerticalAlignToFlexAlign,exports.clearAutoLogoutContext=e.clearAutoLogoutContext,exports.clickableRowStyles=e.clickableRowStyles,exports.computeRecommendationSelectionFeedback=e.computeRecommendationSelectionFeedback,exports.computeStatementProcessingStepsFromElapsedTime=e.computeStatementProcessingStepsFromElapsedTime,exports.computeStickyLeftOffsets=e.computeStickyLeftOffsets,exports.darkColors=e.darkColors,exports.darkTheme=e.darkTheme,exports.dashboardCardDimension=e.designDimension,exports.defaultCardPolicyFormValues=e.defaultCardPolicyFormValues,exports.describeSchedule=e.describeSchedule,exports.formatReconAccountDisplayName=e.formatReconAccountDisplayName,exports.getAlpha2=e.getAlpha2,exports.getAlpha3=e.getAlpha3,exports.getColorForALabel=e.getColorForALabel,exports.getCountries=e.getCountries,exports.getCustomerDataFromAutoComplete=e.getCustomerDataFromAutoComplete,exports.getFullName=e.getFullName,exports.getInitialOpenThreadRequestFromSearch=e.getInitialOpenThreadRequestFromSearch,exports.getRecipientTotalAmount=e.getRecipientTotalAmount,exports.getReconAccountDisplayName=e.getReconAccountDisplayName,exports.getShowNegativeAmountInParenthesisDefaultValue=e.getShowNegativeAmountInParenthesisDefaultValue,exports.getShowNegativeAmountInParenthesisForPercentDefaultValue=e.getShowNegativeAmountInParenthesisForPercentDefaultValue,exports.getStableTransactionId=e.getStableTransactionId,exports.getStatementParseTransactionCount=e.getStatementParseTransactionCount,exports.getTransactionAppliedFiltersCount=e.getTransactionAppliedFiltersCount,exports.invoicingMenuList=e.invoicingMenuList,exports.isActualMatchingEnabledInAgentJeConfig=e.isActualMatchingEnabledInAgentJeConfig,exports.isCloseManagementMenu=e.isCloseManagementMenu,exports.isClosedCardStatus=e.isClosedCardStatus,exports.isCollaborationEntityType=e.isCollaborationEntityType,exports.isCommentNotificationKind=e.isCommentNotificationKind,exports.isMobileOrTabletView=e.isMobileOrTabletView,exports.isMobilePhoneScreen=e.isMobilePhoneScreen,exports.isRecommendationFeedbackDimension=e.isRecommendationFeedbackDimension,exports.lightColors=e.lightColors,exports.lightTheme=e.lightTheme,exports.menuList=e.menuList,exports.mergeColumnDeclarativeWithRenderers=e.mergeColumnDeclarativeWithRenderers,exports.mergeLayoutDefaults=e.mergeLayoutDefaults,exports.percentValueToString=e.percentValueToString,exports.resolveBackgroundStatementProcessingCompletedSteps=e.resolveBackgroundStatementProcessingCompletedSteps,exports.resolveColumnWidth=e.resolveColumnWidth,exports.roundAmountIfNeeded=e.roundAmountIfNeeded,exports.roundOffNumberToTwoDecimal=e.roundOffNumberToTwoDecimal,exports.routineIdFromSession=e.routineIdFromSession,exports.setAutoLogoutContext=e.setAutoLogoutContext,exports.setShowNegativeAmountInParenthesisDefaultValue=e.setShowNegativeAmountInParenthesisDefaultValue,exports.setShowNegativeAmountInParenthesisForPercentDefaultValue=e.setShowNegativeAmountInParenthesisForPercentDefaultValue,exports.settingMenuList=e.settingMenuList,exports.shortCadence=e.shortCadence,exports.sp=e.sp,exports.textAlignForCell=e.textAlignForCell,exports.textStyles=e.textStyles,exports.toGroupedAccountingClassOptions=e.toGroupedAccountingClassOptions,exports.toGroupedQboAccountOptions=e.toGroupedQboAccountOptions,exports.toInstitutionLogoDataUri=e.toInstitutionLogoDataUri,exports.toInvoicingMenuOptionType=e.toInvoicingMenuOptionType,exports.toInvoicingMenuOptionTypeStrict=e.toInvoicingMenuOptionTypeStrict,exports.toMccCategoryChipFieldValue=e.toMccCategoryChipFieldValue,exports.toMenuOptionType=e.toMenuOptionType,exports.toSettingsMenuOptionTypeStrict=e.toSettingsMenuOptionTypeStrict,exports.toSupportedLocaleStrict=e.toSupportedLocaleStrict,exports.toVendorChipFieldValue=e.toVendorChipFieldValue,exports.trackTreasuryTransferAnalytics=e.trackTreasuryTransferAnalytics,exports.uploadAttachmentReceipts=e.uploadAttachmentReceipts,exports.useActualMatchingEnabled=e.useActualMatchingEnabled,exports.useApprovalRulesV3Config=e.useApprovalRulesV3Config,exports.useBackNavigation=e.useBackNavigation,exports.useCollaborationInfoContext=e.useCollaborationInfoContext,exports.useCommentsDrawer=e.useCommentsDrawer,exports.useDropdownPortal=e.useDropdownPortal,exports.useExpenseAutomationEnabledForUser=e.useExpenseAutomationEnabledForUser,exports.useFieldHelp=e.useFieldHelp,exports.useGlobalInfoContext=e.useGlobalInfoContext,exports.useLockBodyScroll=e.useLockBodyScroll,exports.useMeetingLinks=e.useMeetingLinks,exports.usePanelDirtyGuardRegistry=e.usePanelDirtyGuardRegistry,exports.usePanelInternal=e.usePanelInternal,exports.usePrevious=e.usePrevious,exports.useQuickViewMode=e.useQuickViewMode,exports.useRegisterBackHandler=e.useRegisterBackHandler,exports.useRegisterPanelDirtyGuard=e.useRegisterPanelDirtyGuard,exports.useRequestCloseAllCommentDrawers=e.useRequestCloseAllCommentDrawers,exports.useSessionAutoLogoutConfig=e.useSessionAutoLogoutConfig,exports.useSidePanelContext=e.useSidePanelContext,exports.useToolkitContext=e.useToolkitContext,exports.useWindowSizeContext=e.useWindowSizeContext,exports.useZeniCardsVisibilityConfig=e.useZeniCardsVisibilityConfig,exports.useZeniFeatureContext=e.useZeniFeatureContext,exports.useZeniTheme=e.useTheme,exports.useZeniThemeContext=e.useZeniThemeContext,exports.waitFor=e.waitFor,exports.zeniStyled=e.styled,exports.zeniEmotionStyled=o,Object.defineProperty(exports,"buildInvoicingEntityPath",{enumerable:!0,get:()=>r.buildInvoicingEntityPath}),Object.defineProperty(exports,"isInvoicingEntityLinkable",{enumerable:!0,get:()=>r.isInvoicingEntityLinkable}),exports.AiAccountantDetailDrawer=({customer:o,hasMoreJobs:n,jobs:r,jobsFetchStatus:i,onAction:s,onCancelOnboarding:a,onClose:l,onLoadMoreJobs:d})=>{const[c,p]=t.useState(null),u=OC(),m=o.enrollment?.status??"unknown",x=o.enrollment,h=x?.accuracy??{},g="In-Progress"===i.fetchState,y=e=>e<r.length,S=()=>{n&&!g&&d()};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(XC,{children:[e.jsxRuntimeExports.jsx(QC,{children:e.jsxRuntimeExports.jsxs(JC,{children:[e.jsxRuntimeExports.jsx(ef,{}),e.jsxRuntimeExports.jsxs(tf,{children:[e.jsxRuntimeExports.jsx(of,{children:o.companyName}),e.jsxRuntimeExports.jsx(nf,{children:o.tenantId})]}),e.jsxRuntimeExports.jsx(rf,{onClick:l,children:e.jsxRuntimeExports.jsx(sf,{})})]})}),e.jsxRuntimeExports.jsxs(af,{children:[e.jsxRuntimeExports.jsxs(lf,{children:[e.jsxRuntimeExports.jsx(cf,{children:GC.drawer.enrollmentDetails}),e.jsxRuntimeExports.jsxs(pf,{children:[e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:HC}),e.jsxRuntimeExports.jsx(xf,{children:LC(m)})]}),e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:GC.drawer.onboarded}),e.jsxRuntimeExports.jsx(xf,{title:null!=x?.onboardedAt?x.onboardedAt.format(UC.hmmADashDDMMMCommaYYYY):void 0,children:null!=x?.onboardedAt?x.onboardedAt.format(WC.visual.MMMDCommaYYYYformat):MC.emDash})]}),e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:BC}),e.jsxRuntimeExports.jsx(xf,{title:null!=x?.latestTraining?x.latestTraining.format(UC.hmmADashDDMMMCommaYYYY):void 0,children:null!=x?.latestTraining?x.latestTraining.format(WC.visual.MMMDCommaYYYYformat):MC.emDash})]}),e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:VC}),e.jsxRuntimeExports.jsx(xf,{title:null!=x?.latestTransactionSync?x.latestTransactionSync.local().format(UC.hmmADashDDMMMCommaYYYY):void 0,children:null!=x?.latestTransactionSync?x.latestTransactionSync.utc(!0).fromNow():MC.emDash})]}),null!=x?.offboardedAt&&e.jsxRuntimeExports.jsxs(uf,{children:[e.jsxRuntimeExports.jsx(mf,{children:_C}),e.jsxRuntimeExports.jsx(xf,{title:x.offboardedAt.format(UC.hmmADashDDMMMCommaYYYY),children:x.offboardedAt.format(WC.visual.MMMDCommaYYYYformat)})]})]})]}),e.jsxRuntimeExports.jsxs(lf,{children:[e.jsxRuntimeExports.jsx(cf,{children:GC.drawer.modelAccuracy}),Object.keys(h).length>0?e.jsxRuntimeExports.jsx(hf,{children:Object.entries(h).map(([t,o])=>{const n=100*o,r=YC(n),i=`${n.toFixed(0)}${MC.percentage}`,s=`${n.toFixed(1)}${MC.percentage}`;return e.jsxRuntimeExports.jsxs(gf,{children:[e.jsxRuntimeExports.jsx(yf,{children:ZC(t)}),e.jsxRuntimeExports.jsx(Sf,{children:e.jsxRuntimeExports.jsx(Cf,{style:{width:i,backgroundColor:r}})}),e.jsxRuntimeExports.jsx(ff,{children:s})]},t)})}):e.jsxRuntimeExports.jsx(bf,{children:GC.drawer.noAccuracyData})]}),u&&e.jsxRuntimeExports.jsxs(lf,{children:[e.jsxRuntimeExports.jsx(cf,{children:NC}),e.jsxRuntimeExports.jsx(jf,{children:AC(m).map(t=>e.jsxRuntimeExports.jsx(e.Button,{label:GC.actions[t.labelKey],variant:t.destructive?"destructive":"outline",size:"small",onClick:()=>{"cancel_onboarding"===t.operationType?a(o):(e=>{p({operationType:e})})(t.operationType)}},t.operationType))})]}),e.jsxRuntimeExports.jsxs(df,{children:[e.jsxRuntimeExports.jsx(cf,{children:GC.drawer.jobHistory}),0!==r.length||g?e.jsxRuntimeExports.jsxs(Rf,{children:[e.jsxRuntimeExports.jsxs(wf,{children:[e.jsxRuntimeExports.jsx(vf,{children:e.jsxRuntimeExports.jsx(e.ExtraSmallSemiBold,{children:GC.drawer.operation})}),e.jsxRuntimeExports.jsx($f,{children:e.jsxRuntimeExports.jsx(e.ExtraSmallSemiBold,{children:HC})}),e.jsxRuntimeExports.jsx(kf,{children:e.jsxRuntimeExports.jsx(e.ExtraSmallSemiBold,{children:FC})}),e.jsxRuntimeExports.jsx(Tf,{children:e.jsxRuntimeExports.jsx(e.ExtraSmallSemiBold,{children:zC})})]}),e.jsxRuntimeExports.jsx(If,{children:e.jsxRuntimeExports.jsx(e.AutoSizer,{children:({height:t,width:o})=>e.jsxRuntimeExports.jsx(e.InfiniteLoader,{isItemLoaded:y,itemCount:n?r.length+1:r.length,loadMoreItems:S,children:({onItemsRendered:n})=>e.jsxRuntimeExports.jsx(e.FixedSizeList,{height:t,width:o,itemCount:r.length,itemSize:jC.jobRowHeightPx,itemData:r,onItemsRendered:n,innerElementType:KC,overscanCount:jC.jobSkeletonRowCount,children:qC})})})}),g&&e.jsxRuntimeExports.jsx(Nf,{children:Array.from({length:jC.jobSkeletonRowCount},(t,o)=>e.jsxRuntimeExports.jsxs(zf,{children:[e.jsxRuntimeExports.jsx(Ff,{$flex:!0,children:e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:o%2==0?90:70,height:jC.skeletonLoaderHeightPx})}),e.jsxRuntimeExports.jsx(Ff,{children:e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:60,height:jC.skeletonLoaderHeightPx})}),e.jsxRuntimeExports.jsx(Ff,{children:e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:e.Space.sp11,height:jC.skeletonLoaderHeightPx})}),e.jsxRuntimeExports.jsx(Ff,{children:e.jsxRuntimeExports.jsx(e.ContentLoaderSkeleton,{width:70,height:jC.skeletonLoaderHeightPx})})]},`skeleton-${o}`))})]}):e.jsxRuntimeExports.jsx(bf,{children:GC.drawer.noJobsFound})]})]})]}),null!=c&&e.jsxRuntimeExports.jsx(aC,{operationType:c.operationType,dialogTitle:GC.actions[PC[c.operationType].labelKey],dialogDescription:DC(c.operationType,o.companyName),onCancel:()=>p(null),onConfirm:(e,t,n)=>{s(o,e,t,n),p(null)}})]})},exports.AiAccountantPage=({headerData:o,headerActions:n,aiAccountantPageActions:r,aiAccountantPageData:i})=>{const s=e.useWindowSizeContext(),l=OC(),{aiAccountantView:d}=i,{onAction:c,onBulkAction:p,onCancelOnboarding:u,onClearSelection:m,onCockpitReloadData:x,onColumnSortConfigChanged:h,onCustomerSelected:g,onEvaluateAll:y,onFilterTextChanged:S,onFiltersChange:C,onToggleAllVisible:f,onToggleTenantSelection:b}=r,j="Completed"===d.fetchState,R="In-Progress"===d.fetchState||"Not-Started"===d.fetchState,w="Error"===d.fetchState,E="In-Progress"===d.triggerJobStatus.fetchState,v=d.selectedTenantIds,$=v.length,k=d.unonboardedTenantIds.length,T=$>0,I=t.useMemo(()=>{if(!T)return[];const e=d.selectedCustomersForJobTrigger.map(e=>AC(e.enrollment?.status??"unknown"));if(0===e.length)return[];const[t,...o]=e;return t.filter(e=>"cancel_onboarding"!==e.operationType&&o.every(t=>t.some(t=>t.operationType===e.operationType)))},[T,d.selectedCustomersForJobTrigger]),[P,D]=t.useState(!1),A=t.useRef(null),[L,O]=t.useState({top:0,right:0});t.useEffect(()=>{if(P&&null!=A.current){const e=A.current.getBoundingClientRect();O({top:e.bottom,right:window.innerWidth-e.right})}},[P]),t.useEffect(()=>{if(!P)return;const e=()=>D(!1);return document.addEventListener("click",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{document.removeEventListener("click",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[P]);const[M,N]=t.useState(null),z=T||0===k||E;return e.jsxRuntimeExports.jsxs(Ub,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...n,filterActions:{onFilterTextChanged:(e,t)=>{S(t)},getCategoryWiseOptions:Wb,onFiltersChange:C}},headerData:{...o,allTabOptions:o.allTabOptions??F,companiesLoaded:j,filterData:{filterText:d.uiState.filterText,filters:d.uiState.filters},selectedTabOption:"aiAccountant"}}),e.jsxRuntimeExports.jsx(Gb,{windowSize:s,children:R?e.jsxRuntimeExports.jsx(kb,{}):w?e.jsxRuntimeExports.jsx(Ln,{onCockpitReloadData:x,selectedCockpitOption:"aiAccountant"}):e.jsxRuntimeExports.jsxs(nj,{children:[e.jsxRuntimeExports.jsxs(qb,{children:[e.jsxRuntimeExports.jsx(Kb,{children:T&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(Zb,{children:_b.bulkActions.selectedCount.replace("__count__",String($))}),e.jsxRuntimeExports.jsx(Xb,{type:"button",onClick:m,children:Bb.clear})]})}),e.jsxRuntimeExports.jsxs(Yb,{children:[e.jsxRuntimeExports.jsx(Bf,{isEnabled:!R,spinRefreshIcon:R,onClick:()=>x("aiAccountant")}),l&&!T&&e.jsxRuntimeExports.jsx(e.Button,{label:Bb.texts.evaluateAll,variant:"primary",size:"small",disabled:z,onClick:()=>{0===k||E||N({mode:"evaluateAll",count:k})}}),l&&T&&e.jsxRuntimeExports.jsxs(Qb,{children:[e.jsxRuntimeExports.jsxs(Jb,{ref:A,onClick:e=>e.stopPropagation(),children:[e.jsxRuntimeExports.jsx(e.Button,{label:_b.bulkActions.menuLabel,variant:"primary",size:"small",disabled:0===I.length||E,onClick:()=>D(!P)}),P&&I.length>0&&a.createPortal(e.jsxRuntimeExports.jsx(tj,{style:{top:L.top,right:L.right},children:I.map(t=>e.jsxRuntimeExports.jsx(oj,{onClick:()=>(e=>{D(!1),N({mode:"bulk",operationType:e.operationType,operationLabel:_b.actions[e.labelKey],count:$})})(t),children:_b.actions[t.labelKey]},t.operationType))}),document.body)]}),0===I.length&&e.jsxRuntimeExports.jsx(ej,{children:_b.bulkActions.disabledInfo})]})]})]}),e.jsxRuntimeExports.jsx(Mb,{averageAccuracy:d.averageAccuracy,customers:d.customers}),e.jsxRuntimeExports.jsx(Qf,{customers:d.customers,sortKey:d.uiState.sortKey,sortOrder:d.uiState.sortOrder,selectedTenantIds:v,onColumnSortConfigChanged:h,onRowClick:g,onAction:c,onCancelOnboarding:u,onToggleAllVisible:f,onToggleTenantSelection:b})]})}),null!=M&&e.jsxRuntimeExports.jsx(aC,{operationType:"evaluateAll"===M.mode?"evaluate":M.operationType,dialogTitle:"evaluateAll"===M.mode?Bb.texts.evaluateAll:M.operationLabel,dialogDescription:"evaluateAll"===M.mode?_b.bulkActions.evaluateAllDialogDescription.replace("__count__",String(M.count)):"offboard"===M.operationType?_b.bulkActions.bulkDialogDescriptionOffboard.replace("__count__",String(M.count)):_b.bulkActions.bulkDialogDescription.replace("__count__",String(M.count)).replace("__action__",M.operationLabel),onCancel:()=>N(null),onConfirm:(e,t,o)=>{null!=M&&("evaluateAll"===M.mode?y(t,o):p(e,t,o),N(null))}})]})},exports.AuditReportDrawerPage=({isAuditScoreCompleted:o,auditRuleGroups:n,loggedInUser:i,isMonthEnd:s,auditReportGroupView:a,allUsers:l,reviewCompanyView:d,style:c,analytics:p,handleFetchAuditReportGroupView:u,handleGenerateAuditReport:m,handleCancelIconClick:x,handleRuleClick:h,handleReasonAuditRule:g})=>{const y=e.useWindowSizeContext(),[S,C]=t.useState(jP(n,1)),[f,b]=t.useState({id:n[0]?.auditRuleGroupId,index:0}),[j,R]=t.useState(!1),[w,E]=t.useState(1),[v,$]=t.useState(!1),[k,T]=t.useState(null),I=t.useMemo(()=>d?.controllers.map(e=>`${e.user.firstName} ${e.user.middleName} ${e.user.lastName}`)??[],[d?.controllers]);t.useEffect(()=>{a.auditReportGroups.forEach(e=>{a.auditReportGroups.forEach(e=>{e.auditReportGroupId!==f.id||"Completed"!==e.fetchState&&"Error"!==e.fetchState||b({id:n[f.index+1]?.auditRuleGroupId,index:f.index+1})});const t=e.auditReport?.auditRulesGroupReport.find(t=>t.auditRuleGroupId===e.auditReportGroupId);("Completed"===e.fetchState&&f.id===e.auditReportGroupId&&!0===S[e.auditReportGroupId].isActive&&t?.sequence===w||"Error"===e.fetchState&&f.id===e.auditReportGroupId)&&(E(w+1),C(jP(n,w+1)))})},[a.auditReportGroups,w,n,S]),t.useEffect(()=>{0===a.auditReportGroups.filter(e=>"In-Progress"===e.fetchState).length&&R(!0);if(a.auditReportGroups.filter(e=>"Completed"===e.fetchState||"Error"===e.fetchState).length===n.length){$(!0);let e=0;a.auditReportGroups.forEach(t=>{e+=sP(t.auditReport?.auditRulesGroupReport[0]?.auditRules)});const t=RP(a),o=r.dateNow().startOf("month").subtract(1,"date").format(bP.visual.MMMYYYYFormat),n=d?.customerGroup,i=Math.ceil(a.auditReportGroups[0].auditReport?.auditSummary.auditScorePercentage??0);p.trackAuditScorePercentage(r.dateNow().format(bP.analytics.MMSlashDDSlashYYYYFormat),o,i,d?.name??"",t,e,I,n??null)}const e=a.auditReportGroups.find(e=>"Completed"===e.fetchState);null!=e?.auditReport?.status?.lastRefreshSuccessTime&&T(e)},[a.auditReportGroups,n.length,p,d,a,I]);const P=e=>{u(e)},D=(e,t,o)=>{p.trackAuditIssuesClicked(o,d?.name??"",I,r.dateNow().format(bP.analytics.MMSlashDDSlashYYYYFormat)),h(e,t)};return e.jsxRuntimeExports.jsxs(wP,{style:c,children:[e.jsxRuntimeExports.jsx(PP,{windowSize:y,style:c,children:e.jsxRuntimeExports.jsx(DP,{children:e.jsxRuntimeExports.jsxs(AP,{windowSize:y,children:[e.jsxRuntimeExports.jsx(EP,{}),e.jsxRuntimeExports.jsxs(LP,{children:[e.jsxRuntimeExports.jsx(OP,{children:d?.name}),e.jsxRuntimeExports.jsx(MP,{children:v?k?.auditReport?.status?.lastRefreshSuccessTime?.utc(!0).local().format(CP.hmmADashDDMMMCommaYYYY):fP.strings.empty})]}),e.jsxRuntimeExports.jsxs(zP,{children:[e.jsxRuntimeExports.jsxs(NP,{isGenerateClickEnabled:j,onClick:()=>{C(jP(n,1)),b({id:n[0]?.auditRuleGroupId,index:0}),R(!1),E(1),$(!1),T(null);const e=n.map(e=>e.auditRuleGroupId);m(e)},children:[e.jsxRuntimeExports.jsx(VP,{}),e.jsxRuntimeExports.jsx(FP,{children:SP.auditReportDrawer.updateScore})]}),e.jsxRuntimeExports.jsx(BP,{onClick:()=>{x()},children:e.jsxRuntimeExports.jsx(_P,{})})]})]})})}),e.jsxRuntimeExports.jsxs(vP,{children:[e.jsxRuntimeExports.jsx($P,{children:e.jsxRuntimeExports.jsx(oI,{auditSummaryData:null!=d?d.auditSummary:{fixesRequired:0,totalChecks:0,auditScorePercentage:0,bypassedAuditScore:0,auditReportLastGeneratedDate:null},isAuditScoreLoadingCompleted:v&&o,isMonthEnd:s})}),e.jsxRuntimeExports.jsxs(kP,{children:[e.jsxRuntimeExports.jsx(TP,{children:fP.texts.business}),e.jsxRuntimeExports.jsx(IP,{children:n.filter(e=>e.ruleType===fP.texts.business.toLowerCase()).map(t=>{const o=a.auditReportGroups.find(e=>e.auditReportGroupId===t.auditRuleGroupId);return null!=o&&Object.keys(S).length>0?e.jsxRuntimeExports.jsx(rP,{loggedInUser:i,isControllerOrReviewer:a.isControllerOrReviewer,allUsers:l,isMonthEnd:s,ruleGroup:t,groupIdWithActiveStatus:S,auditReportGroup:o,setGroupIdWithActiveStatus:C,onClickRetryGroupFetch:P,onClickRule:D,handleReasonAuditRule:g},t.auditRuleGroupId):null})})]}),e.jsxRuntimeExports.jsxs(kP,{children:[e.jsxRuntimeExports.jsx(TP,{children:fP.settings.title.accounting}),e.jsxRuntimeExports.jsx(IP,{children:n.filter(e=>e.ruleType===fP.settings.title.accounting.toLowerCase()).map(t=>{const o=a.auditReportGroups.find(e=>e.auditReportGroupId===t.auditRuleGroupId);return null!=o&&Object.keys(S).length>0?e.jsxRuntimeExports.jsx(rP,{loggedInUser:i,isControllerOrReviewer:a.isControllerOrReviewer,allUsers:l,isMonthEnd:s,ruleGroup:t,groupIdWithActiveStatus:S,auditReportGroup:o,setGroupIdWithActiveStatus:C,onClickRetryGroupFetch:P,onClickRule:D,handleReasonAuditRule:g},t.auditRuleGroupId):null})})]})]})]})},exports.COCKPIT_TAB_OPTIONS=F,exports.COCKPIT_TAB_OPTIONS_WITH_CREDIT_AGENT=V,exports.CockpitNavBar=function({defaultOptions:o,downloadState:r,downloadParams:i,signedInUser:s,cockpitHeader:a,analytics:l,currentTab:d,updateDownloadStateHandler:c,onZeniLogoClick:p,onLogOutClick:u,onThreadClick:m,onNotificationClick:x,onNewCustomerClick:h}){const g=e.useWindowSizeContext(),[S,C]=t.useState(!1),[f,b]=t.useState(!1),{inboxNotifications:j,isLoading:R,isFetchingMore:w,hasFetchedAll:E,fetchMore:v}=n.useInboxNotifications(),{threads:$,isLoading:k}=e.useFilteredThreads({application:"cockpit",isGlobalComment:!0},"both",!0),T=t.useMemo(()=>$.filter(e=>!1===e.resolved),[$]).length,{setOpenThread:I,setRequestToOpenThread:P,openThread:D}=t.useContext(e.ThreadsContext);t.useEffect(()=>{const e=setTimeout(()=>v?.(),0);return()=>clearTimeout(e)});const A=R||!0===w||!0!==E,L=j?.filter(e=>null==e.readAt&&!0===e.roomId?.includes("cockpit")&&"thread"===e.kind).length,O=(e=>{switch(e){case"management":case"subscription":case"portfolio":case"onboarding":case"audit":return e;case"aiAccountant":return le;case"creditAgent":return de;default:return ae.healthMonitor}})(d),M=t.useCallback((e,t)=>{const{companyId:o,entityType:n}=e;D===t?I(null):(C(!1),P({threadId:t,companyId:o,entityType:n}))},[D,I,P]),N=t.useCallback((e,t)=>{const{companyId:o,entityType:n}=e;D===t?I(null):(b(!1),P({threadId:t,companyId:o,entityType:n}))},[D,I,P]);return"small"!==g?e.jsxRuntimeExports.jsxs(Se,{children:[e.jsxRuntimeExports.jsxs(fe,{children:[e.jsxRuntimeExports.jsx(Re,{children:e.jsxRuntimeExports.jsx(je,{"data-testid":e.generateDataTestId("zeni-logo-cockpit-nav-bar"),onClick:p})}),e.jsxRuntimeExports.jsx(Ce,{children:a??he}),e.jsxRuntimeExports.jsxs(we,{children:[S?null:e.jsxRuntimeExports.jsxs(Ee,{isDisabled:k,onClick:k?()=>null:()=>C(!0),children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:k?void 0:T,isLoading:k,style:{left:"12px"}}),e.jsxRuntimeExports.jsx(ve,{})]}),e.jsxRuntimeExports.jsxs(Ee,{isDisabled:A,onClick:A?()=>null:()=>b(!0),children:[e.jsxRuntimeExports.jsx(e.CommentsAndNotesCount,{count:L,isLoading:A,style:{left:"12px"}}),e.jsxRuntimeExports.jsx($e,{})]}),e.jsxRuntimeExports.jsx(me,{defaultOptions:o,downloadParams:i,downloadState:r,analytics:l,currentCockpitTab:O,updateDownloadStateHandler:c}),e.jsxRuntimeExports.jsx(e.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:ge,onClick:h}),e.jsxRuntimeExports.jsx(be,{children:e.jsxRuntimeExports.jsx(e.LogoutButton,{signedInUser:s,pageName:"Cockpit",onLogOutClick:u})})]})]}),e.jsxRuntimeExports.jsx(e.AllThreadsDrawer,{isDrawerOpen:S,filter:{application:"cockpit",isGlobalComment:!0},autoExpand:!0,autoFocus:!1,drawerTitle:ye,onCloseAllThreadsDrawer:()=>C(!1),onThreadClick:(e,t)=>{m(e,t,M)},style:{cursor:"pointer"},showReactions:!0,showActions:!0,allowExpand:!0,threads:$,isLoading:k,allowComposer:!1,textOverrides:{},withRoomProvider:!0}),e.jsxRuntimeExports.jsx(y,{application:"cockpit",isDrawerOpen:f,onNotificationClick:(e,t)=>{x(e,t,N)},onCloseAllInboxNotificationsDrawer:()=>b(!1)})]}):e.jsxRuntimeExports.jsx(Se,{className:"mobileHeader",children:e.jsxRuntimeExports.jsxs(fe,{className:"mobileTitle",children:[e.jsxRuntimeExports.jsx(e.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:ge,onClick:h}),e.jsxRuntimeExports.jsx(ke,{children:e.jsxRuntimeExports.jsx(e.LogoutButton,{signedInUser:s,pageName:"Cockpit",onLogOutClick:u})})]})})},exports.CreditAgentPage=function({headerActions:o,headerData:n,creditAgentPageData:r,creditAgentPageActions:i}){const s=e.useWindowSizeContext(),{macroData:a,cardProfilesData:l}=r,{onFetchMacro:d,onSaveMacro:c,onResetSaveMacro:p,onUIStateChange:u,cardProfilesActions:m}=i,{onDownloadReport:x}=m,[h,g]=t.useState(""),[y,S]=t.useState(!1),{focus:C,minScore:f}=l.uiState;t.useEffect(()=>{"Not-Started"===a.fetchState&&d()},[a.fetchState,d]),t.useEffect(()=>{null==a.data||y||g(a.data.instructions)},[a.data,y]),t.useEffect(()=>{"Completed"===a.updateState&&(S(!1),p())},[a.updateState,p]),t.useEffect(()=>{"Not-Started"===l.fetchState&&m.onFetch()},[l.fetchState,m]);const b=t.useCallback(()=>{c(h)},[c,h]),j=t.useCallback(()=>{S(!1),null!=a.data&&g(a.data.instructions),"Error"===a.updateState&&p()},[a.data,a.updateState,p]);return e.jsxRuntimeExports.jsxs(mL,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:o,headerData:{...n,allTabOptions:n.allTabOptions??F,selectedTabOption:"creditAgent"}}),e.jsxRuntimeExports.jsxs(xL,{windowSize:s,children:[e.jsxRuntimeExports.jsxs(hL,{children:[e.jsxRuntimeExports.jsx(gL,{}),e.jsxRuntimeExports.jsxs(yL,{children:[y&&e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.Button,{variant:"secondary",size:"small",label:dL.cancel,onClick:j}),e.jsxRuntimeExports.jsx(e.Button,{variant:"primary",size:"small",label:"In-Progress"===a.updateState?cL.saving:cL.savePrompt,disabled:"In-Progress"===a.updateState,onClick:b})]}),e.jsxRuntimeExports.jsx(e.Button,{variant:"secondary",size:"small",label:cL.downloadReport,onClick:x})]})]}),e.jsxRuntimeExports.jsxs(SL,{children:[e.jsxRuntimeExports.jsxs(CL,{children:[e.jsxRuntimeExports.jsxs(fL,{children:[e.jsxRuntimeExports.jsx(bL,{children:"✦"}),"In-Progress"===a.fetchState?e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Standard",start:!0}):e.jsxRuntimeExports.jsx(jL,{value:h,disabled:"In-Progress"===a.updateState,onChange:e=>{g(e.target.value),S(!0)},placeholder:cL.promptPlaceholder,rows:6})]}),e.jsxRuntimeExports.jsxs(RL,{children:[e.jsxRuntimeExports.jsxs(wL,{children:[e.jsxRuntimeExports.jsx(EL,{children:cL.focusLabel}),e.jsxRuntimeExports.jsx(vL,{children:pL.map(t=>e.jsxRuntimeExports.jsx($L,{active:C===t,onClick:()=>u({focus:t}),children:uL(t)},t))})]}),e.jsxRuntimeExports.jsx(kL,{}),e.jsxRuntimeExports.jsxs(wL,{children:[e.jsxRuntimeExports.jsx(EL,{children:cL.minScoreLabel}),e.jsxRuntimeExports.jsx(TL,{type:"range",min:0,max:100,value:f,onChange:e=>u({minScore:parseInt(e.target.value)})}),e.jsxRuntimeExports.jsx(IL,{children:f})]})]})]}),"Error"===a.updateState&&e.jsxRuntimeExports.jsx(DL,{children:cL.failedToSavePrompt})]}),e.jsxRuntimeExports.jsx(PL,{children:e.jsxRuntimeExports.jsx(HA,{cardProfilesData:l,cardProfilesActions:m,onUIStateChange:u,uiState:l.uiState})})]})]})},exports.HealthMonitorDetailDrawer=function({localData:o,companyHealthMetricViewSelector:n,additionalChurnFactorsOptions:i,analytics:s,urlSource:l,onCloseDrawer:d,onSaveChangesToLocalStore:c,onSaveClick:p}){const{selectedCompanyDetail:u,localFormDataAndStatusByCompanyId:m}=n,[x,h]=t.useState(!1),g=rc(u),[y,S]=t.useState(!1),[C,f]=t.useState(!1),b=e.useForm({mode:"all",defaultValues:_p(o,i),reValidateMode:"onBlur"}),j=t.useRef(null);function R(e){null!=u&&s.trackCockpitHealthMonitorChurnFormClicked(e,{companyId:u.companyInfo.companyId,companyName:u.companyInfo.name,zeniProductAndServicesCount:u.noOfProductVerticalsEnabled,daysToRenewal:tc(u.companyHealthMetric.subscriptionRenewalDate)??null,netPromoterScore:m?.companyHealthMetricLocalData.netPromoterScore??null,customerSatisfactionScore:m?.companyHealthMetricLocalData.customerSatisfactionScore??null,externalServicesExposure:m?.companyHealthMetricLocalData.externalProductServiceExposure??null,runwayMonths:!0===r.isCompanyRunwayInfinite(u.companyHealthMetric.runway)?1e6:void 0===u.companyHealthMetric.runway?null:u.companyHealthMetric.runway.runwayMonths??null,dashBoardLastSeen:tc(u.companyHealthMetric.customerLastDashboardVisit)??null,lastReportSent:tc(u.managementInfo.lastReportSentDate)??null,churnProbability:u.companyHealthMetric.churnProbabilityPercentage??null})}const w=b.handleSubmit(()=>{R("Save"),j?.current&&j.current.scrollTo({top:0,behavior:"instant"}),S(!0),h(!0),p()}),E=t.useRef(null),v=t.useRef(null),[$,k]=t.useState(null),T=t.useRef(null),I=Bp(o.additionalChurnFactors);function P(){R("Cancel"),d()}t.useEffect(()=>(v.current=setTimeout(()=>{E.current&&(k(E.current),v.current&&clearTimeout(v.current))},10),()=>{null!=v.current&&clearTimeout(v.current)}),[I]),t.useEffect(()=>{const t=b.watch((t,{name:o})=>{null!=o&&null!=t&&e.defer(()=>(async(e,t)=>{if(null!=e){const e={...t},o=e[Lp][Fp].selectedOptions,n={netPromoterScore:e[Lp][Mp]?.selectedOption,customerSatisfactionScore:e[Lp][Np]?.selectedOption,externalProductServiceExposure:e[Lp][zp]?.selectedOption,additionalChurnFactors:{increasingChurnProbability:i.increasingChurnProbability.filter(e=>-1!=o.indexOf(e.code)),decreasingChurnProbability:i.decreasingChurnProbability.filter(e=>-1!=o.indexOf(e.code))}};c(n)}})(o,t))});return()=>{t.unsubscribe()}}),t.useEffect(()=>{if(null!=u){const e=u.controllers.map(e=>`${e.firstName} ${e.lastName}`);l||s.trackCockpitHealthMonitorRowClicked(u.companyInfo.companyId,u.companyInfo.name,e,u.companyHealthMetric.netPromoterScore,u.companyHealthMetric.customerSatisfactionScore,u.companyHealthMetric.churnProbabilityPercentage)}},[]);const D={valueContainer:t=>({...t,padding:`2px ${e.Space.sp3}`,overflow:"unset"}),multiValue:e=>({...e,margin:0})};return e.jsxRuntimeExports.jsxs(vu,{ref:j,"data-testid":e.generateDataTestId("health-monitor-drawer"),children:[e.jsxRuntimeExports.jsxs(Cu,{"data-testid":e.generateDataTestId("health-monitor-drawer-header"),children:[e.jsxRuntimeExports.jsx(ju,{"data-testid":e.generateDataTestId("health-monitor-drawer-title"),children:`${u?.companyInfo.name}${cp.heading}`}),e.jsxRuntimeExports.jsx(Xp,{"data-testid":e.generateDataTestId("health-monitor-drawer-close-button"),onClick:P,children:e.jsxRuntimeExports.jsx(Qp,{})})]}),e.jsxRuntimeExports.jsxs(Eu,{children:["Error"===n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState?e.jsxRuntimeExports.jsx(Fu,{"data-testid":e.generateDataTestId("health-monitor-drawer-error"),children:e.jsxRuntimeExports.jsxs(Vu,{children:[e.jsxRuntimeExports.jsx(Hu,{}),null!=n.localFormDataAndStatusByCompanyId.saveStatus.error?.message?e.jsxRuntimeExports.jsx(Bu,{"data-testid":e.generateDataTestId("health-monitor-drawer-error-text"),children:n.localFormDataAndStatusByCompanyId.saveStatus.error?.message}):null]})}):null,e.jsxRuntimeExports.jsx(tu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-section"),children:"In-Progress"===m?.saveStatus?.fetchState?e.jsxRuntimeExports.jsxs(eu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-loader"),children:[e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"ExtraLarge",start:!0}),e.jsxRuntimeExports.jsx(e.ExtraLargeRegular,{children:cp.calculatingProbability})]}):e.jsxRuntimeExports.jsxs(Ru,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-box"),children:[e.jsxRuntimeExports.jsx(wu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-heading"),children:(A=g.churnProbabilityPercentage,null!=A?`${dp.texts.churnProbability} ${dp.texts.is} ${g.churnProbabilityPercentage}${Pp}`:`${dp.texts.churnProbability} ${Pp}`)}),e.jsxRuntimeExports.jsx(Wp,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-meter"),children:e.jsxRuntimeExports.jsx(Hd,{barHeight:32,percentage:g.churnProbabilityPercentage})}),e.jsxRuntimeExports.jsx(ou,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-reasons"),children:null!=u?.companyHealthMetric.churnProbabilityPercentage&&0!==u?.companyHealthMetric.churnProbabilityReason.length?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-contributing-heading"),children:hp}),0!==u.companyHealthMetric.churnProbabilityReason.length||0!==u.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length?e.jsxRuntimeExports.jsxs(lu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-increasing-factors"),children:[e.jsxRuntimeExports.jsx(ru,{children:`${gp}${wp}`}),e.jsxRuntimeExports.jsxs(cu,{children:[u.companyHealthMetric.churnProbabilityReason.map((t,o)=>e.jsxRuntimeExports.jsx(pu,{children:e.jsxRuntimeExports.jsx(uu,{children:t.text})},`${e.nanoid()}_${o}}`)),u.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((t,o)=>e.jsxRuntimeExports.jsxs(pu,{children:[e.jsxRuntimeExports.jsx(uu,{children:t.value}),e.jsxRuntimeExports.jsx(du,{children:"Newly added"})]},`${e.nanoid()}_${o}}`))]})]}):null,0!==u?.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length?e.jsxRuntimeExports.jsxs(lu,{"data-testid":e.generateDataTestId("health-monitor-drawer-churn-decreasing-factors"),children:[e.jsxRuntimeExports.jsx(ru,{children:`${yp}${wp}`}),e.jsxRuntimeExports.jsx(cu,{children:u.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((t,o)=>e.jsxRuntimeExports.jsxs(pu,{children:[e.jsxRuntimeExports.jsx(uu,{children:t.value}),e.jsxRuntimeExports.jsx(du,{children:"Newly added"})]},`${e.nanoid()}_${o}}`))})]}):null,e.jsxRuntimeExports.jsxs(au,{"data-testid":e.generateDataTestId("health-monitor-drawer-add-more-button"),onClick:()=>{e.scrollContainerToTargetAdjusted(T?.current,j?.current),setTimeout(()=>{f(!0)},500)},ref:T,children:[e.jsxRuntimeExports.jsx(su,{}),e.jsxRuntimeExports.jsx(iu,{children:Tp})]})]}):null})]})}),e.jsxRuntimeExports.jsxs(ku,{"data-testid":e.generateDataTestId("health-monitor-drawer-form-container"),children:[e.jsxRuntimeExports.jsxs(mu,{children:[e.jsxRuntimeExports.jsxs(gu,{children:[e.jsxRuntimeExports.jsx(yu,{"data-testid":e.generateDataTestId("health-monitor-drawer-manual-input-heading"),children:cp.manualInput.header}),e.jsxRuntimeExports.jsx(e.Tooltip,{maxWidth:"250px",variant:"small-description",data:cp.tooltipTexts.manualInputText,placement:"top",children:e.jsxRuntimeExports.jsx(Jp,{"data-testid":e.generateDataTestId("health-monitor-drawer-manual-input-info"),style:{marginTop:e.Space.sp1,marginRight:e.Space.sp0}})})]}),null!=g.companyEngagementMetricsUpdatedAt&&"In-Progress"!==n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState?e.jsxRuntimeExports.jsx(xu,{"data-testid":e.generateDataTestId("health-monitor-drawer-last-updated"),children:null!=g.updatedByUserName?e.jsxRuntimeExports.jsxs(hu,{children:[`${dp.texts.lastUpdatedBy}${wp} ${g.updatedByUserName}`,e.jsxRuntimeExports.jsx(_u,{}),`${g.companyEngagementMetricsUpdatedAt.date}${vp}${$p}${g.companyEngagementMetricsUpdatedAt.time}`]}):e.jsxRuntimeExports.jsxs(hu,{children:[`${dp.texts.lastUpdated}${wp} ${g.companyEngagementMetricsUpdatedAt.date}`,e.jsxRuntimeExports.jsx(_u,{}),`${g.companyEngagementMetricsUpdatedAt.time}`]})}):null]}),e.jsxRuntimeExports.jsx(e.FormProvider,{...b,children:e.jsxRuntimeExports.jsx("form",{id:Ap(Op),onSubmit:w,children:e.jsxRuntimeExports.jsxs(Tu,{"data-testid":e.generateDataTestId("health-monitor-drawer-form-fields"),children:[e.jsxRuntimeExports.jsx(Up,{"data-testid":e.generateDataTestId("health-monitor-drawer-nps-field"),children:e.jsxRuntimeExports.jsx(e.LabeledSingleSelectNumericField,{label:{label:`${dp.texts.nps}${wp}`,width:0,style:{width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(e,t)=>({input:{textAlign:!1===t.selectProps.menuIsOpen&&null==o.netPromoterScore?"right":"left"}})},placeholder:dp.add,name:Dp(Lp,Mp),defaultValue:{allOptions:ie,selectedOption:o.netPromoterScore},registerOptions:{required:!0,validate:(e,t)=>{const o=t.healthMonitorDetails.customerSatisfactionScore;return!0===Boolean(o.selectedOption)||null!=e&&!0===Boolean(e.selectedOption)}}},style:{width:"auto"}})}),e.jsxRuntimeExports.jsx(Au,{}),e.jsxRuntimeExports.jsx(Gp,{"data-testid":e.generateDataTestId("health-monitor-drawer-csat-field"),children:e.jsxRuntimeExports.jsx(e.LabeledSingleSelectNumericField,{label:{label:`${dp.texts.csat}${wp}`,width:0,labelIcon:e.jsxRuntimeExports.jsx(e.Tooltip,{maxWidth:"300px",variant:"small-description",data:cp.tooltipTexts.customerSatisfactionScoreText,placement:"top",children:e.jsxRuntimeExports.jsx(Jp,{"data-testid":e.generateDataTestId("health-monitor-drawer-csat-info")})}),style:{marginRight:e.Space.sp2,width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(e,t)=>({input:{textAlign:!1===t.selectProps.menuIsOpen&&null==o.customerSatisfactionScore?"right":"left"}})},placeholder:dp.add,name:Dp(Lp,Np),defaultValue:{allOptions:se,selectedOption:o.customerSatisfactionScore},registerOptions:{required:!0,validate:(e,t)=>{const o=t.healthMonitorDetails.netPromoterScore;return!0===Boolean(o.selectedOption)||null!=e&&!0===Boolean(e.selectedOption)}}},style:{width:"auto"}})}),e.jsxRuntimeExports.jsx(Au,{}),e.jsxRuntimeExports.jsx(qp,{"data-testid":e.generateDataTestId("health-monitor-drawer-external-exposure-field"),children:e.jsxRuntimeExports.jsx(e.LabeledSingleSelectPickerField,{label:{label:cp.manualInput.labels.externalProductServices,labelIcon:e.jsxRuntimeExports.jsx(e.Tooltip,{maxWidth:"265px",variant:"small-description",data:cp.tooltipTexts.externalProductServicesText,placement:"top",children:e.jsxRuntimeExports.jsx(Jp,{"data-testid":e.generateDataTestId("health-monitor-drawer-external-exposure-info")})}),style:{marginRight:e.Space.sp2}},singleSelectPickerField:{placeholder:dp.add,name:Dp(Lp,zp),defaultValue:{allOptions:r.companyHealthMetricDropDownOptions,selectedOption:o.externalProductServiceExposure},textAlignment:"right",registerOptions:{required:!0,validate:e=>null!=e&&!0===Boolean(e.selectedOption)}},style:{width:"auto"}})}),e.jsxRuntimeExports.jsx(Au,{}),e.jsxRuntimeExports.jsxs(Iu,{"data-testid":e.generateDataTestId("health-monitor-drawer-additional-factors"),additionalNotesHidden:0===I.length,isFocused:C,children:[e.jsxRuntimeExports.jsx(e.LabeledGroupedMultiSelectField,{fullWidthSelect:!0,label:{label:`${cp.manualInput.labels.additionalContributingFactorsLabel}${wp}`,labelIcon:e.jsxRuntimeExports.jsx(e.Tooltip,{maxWidth:"280px",variant:"small-description",data:cp.tooltipTexts.additionalContributingFactorsText,placement:"top",children:e.jsxRuntimeExports.jsx(Jp,{"data-testid":e.generateDataTestId("health-monitor-drawer-additional-factors-info")})})},groupedMultiSelectField:{name:Dp(Lp,Fp),treeViewStructure:!0,registerOptions:{required:!1},defaultValue:{allOptions:Vp(i),selectedOptions:I},placeholder:Ip,customStyleConfig:D,showSelectedInNewLines:!0},isMenuOpen:C,setIsMenuOpen:f,menuPortalEnabled:!0}),0!==I.length&&e.jsxRuntimeExports.jsxs(Du,{"data-testid":e.generateDataTestId("health-monitor-drawer-notes-composer"),children:[e.jsxRuntimeExports.jsx(Qu,{}),e.jsxRuntimeExports.jsx(Pu,{ref:E,children:$&&a.createPortal(e.jsxRuntimeExports.jsx($d,{roomId:`cockpit_${u?.companyInfo.companyId}`,threadMetadata:{application:"cockpit",companyId:null!=u?.companyInfo.companyId?u.companyInfo.companyId:"",entityId:null!=u?.companyInfo.companyId?u.companyInfo.companyId:"",companyName:null!=u?.companyInfo.name?u.companyInfo.name:"",tab:"healthMonitor",isGlobalComment:!1,entityType:"healthMonitor.notes",url:window.location.href},composerPlaceholder:cp.manualInput.placeholders.addANote,createThreadCallback:()=>{S(!1)},isSubmitComment:y}),$)})]})]})]})})})]}),e.jsxRuntimeExports.jsxs($u,{"data-testid":e.generateDataTestId("health-monitor-drawer-prefilled-section"),children:[e.jsxRuntimeExports.jsx(Su,{"data-testid":e.generateDataTestId("health-monitor-drawer-prefilled-heading"),children:cp.preFilledInput.header}),e.jsxRuntimeExports.jsxs(Ou,{"data-testid":e.generateDataTestId("health-monitor-drawer-runway"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.runway}),null!=g.runway?!0===r.isCompanyRunwayInfinite(g.runway)?e.jsxRuntimeExports.jsx(zu,{}):e.jsxRuntimeExports.jsx(bu,{children:nc(g.runway.runwayMonths)}):e.jsxRuntimeExports.jsx(bu,{children:cp.notApplicable})]}),e.jsxRuntimeExports.jsxs(Nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-dashboard-last-seen"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.dashboardLastSeen}),e.jsxRuntimeExports.jsx(bu,{children:g.dashboardLastVisit??cp.notApplicable})]}),e.jsxRuntimeExports.jsxs(Nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-last-report-sent"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.lastReportSent}),e.jsxRuntimeExports.jsx(bu,{children:g.lastReportSent??cp.notApplicable})]}),e.jsxRuntimeExports.jsxs(Nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-product-services"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.zeniProductServices}),e.jsxRuntimeExports.jsx(bu,{children:e.jsxRuntimeExports.jsx($c,{productVerticals:u?.companyHealthMetric.verticalProductServices??[],testIdSuffix:u?.companyInfo.companyId})})]}),e.jsxRuntimeExports.jsxs(Nu,{"data-testid":e.generateDataTestId("health-monitor-drawer-days-to-renewal"),children:[e.jsxRuntimeExports.jsx(fu,{children:cp.preFilledInput.labels.daysToRenewal}),e.jsxRuntimeExports.jsx(bu,{children:g.renewalDate??cp.notApplicable})]}),e.jsxRuntimeExports.jsx(Mu,{"data-testid":e.generateDataTestId("health-monitor-drawer-last-engagements"),children:e.jsxRuntimeExports.jsx(e.LabeledReadOnlyTextField,{label:{label:`${up}${wp}`},text:e.jsxRuntimeExports.jsx(Wu,{children:g.lastEngagements.length>0?g.lastEngagements.map((t,o)=>e.jsxRuntimeExports.jsx(Uu,{"data-testid":e.generateDataTestId("health-monitor-drawer-engagement",String(o)),children:e.jsxRuntimeExports.jsx(e.Tooltip,{style:{padding:`12px ${e.Space.sp3}`,color:e.Colors.heroDark},title:e.jsxRuntimeExports.jsx(qu,{children:"email"===t.type?e.jsxRuntimeExports.jsxs(Ku,{children:[e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[kp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.subject})]}),e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[fp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.from})]}),e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[Cp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.to})]}),""!=t.cc?e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[bp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.cc})]}):null]}):e.jsxRuntimeExports.jsxs(Ku,{children:[e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[kp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.subject})]}),e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[jp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.hostName})]}),e.jsxRuntimeExports.jsxs(Yu,{children:[e.jsxRuntimeExports.jsxs(Zu,{children:[Rp,wp]}),e.jsxRuntimeExports.jsx(Xu,{children:t.attendees})]})]})}),placement:"left",children:e.jsxRuntimeExports.jsxs(Gu,{children:[e.jsxRuntimeExports.jsxs(Zp,{children:["email"===t.type?e.jsxRuntimeExports.jsx(em,{"data-testid":e.generateDataTestId("health-monitor-drawer-engagement-email-icon",String(o))}):e.jsxRuntimeExports.jsx(Ju,{"data-testid":e.generateDataTestId("health-monitor-drawer-engagement-meeting-icon",String(o))}),e.jsxRuntimeExports.jsx(Hp,{children:"email"===t.type?dp.settings.notifications.mode.email:pp.meeting})]}),e.jsxRuntimeExports.jsx(tm,{className:"engagementDot"}),e.jsxRuntimeExports.jsx(Yp,{children:t.scheduledAt?.utc(!0).local().format(Sp.visual.MMMDCommaYYYYformat)??Ep})]},`${e.nanoid()}_${o}}`)})},o)):Ep}),style:{width:"100%"}})})]})]}),!0===r.hasCompanyHealthMetricFormFieldChanged(u?.companyHealthMetric,m?.companyHealthMetricLocalData)||!1===x?e.jsxRuntimeExports.jsx(Kp,{"data-testid":e.generateDataTestId("health-monitor-drawer-footer"),children:e.jsxRuntimeExports.jsx(e.Footer,{style:{zIndex:2,paddingTop:e.Space.sp3,paddingBottom:e.Space.sp3},formId:Ap(Op),primaryBtn:{label:dp.save,style:{minWidth:112},isLoading:"In-Progress"===m?.saveStatus?.fetchState},cancelBtn:{label:dp.cancel,style:{minWidth:112},onClick:P}})}):null]});var A},exports.HealthMonitorPage=({headerActions:t,headerData:o,healthPageData:n,healthPageActions:r,initialOpenThreadRequest:i})=>{const{healthView:s,managementView:a,mixpanelUrl:l}=n,{onColumnSortConfigChanged:d,onRowClick:c,onCockpitReloadData:p,onFiltersChange:u}=r,{filterText:m,filters:x}=s.uiState,h="Completed"===a.fetchState&&"Completed"===s.fetchState&&"Completed"===s.zeniUsers.fetchState;return t.filterActions&&(t.filterActions.getCategoryWiseOptions=()=>zm(s)),e.jsxRuntimeExports.jsxs(Fm,{"data-testid":e.generateDataTestId("health-monitor-page"),children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...t},headerData:{...o,allTabOptions:o.allTabOptions??F,selectedTabOption:"healthMonitor",filterData:{filterText:m,filters:x},companiesLoaded:h}}),e.jsxRuntimeExports.jsx(Nm,{healthView:s,initialOpenThreadRequest:i,managementView:a,mixpanelUrl:l,onClearFilter:()=>u({}),onColumnSortConfigChanged:d,onCockpitReloadData:p,onRowClick:c})]})},exports.ManagementPage=({companiesExcludedFromMonthEndReport:t,headerData:o,headerActions:n,managementPageActions:r,managementPageData:i,expenseAutomationEnabledCompanies:s,initialOpenThreadRequest:a})=>{const{managementView:l,loggedInUser:d,loggedInUserRole:c,realmIdUpdateStatusByCompanyId:p,showDetailsPageLink:u}=i,m=wt(),x=Rt(jt),{onColumnSortConfigChanged:h,changeHandlers:g,onScroll:y,onViewDetailsLinkClicked:S,onCockpitReloadData:C,onCompanyNameClicked:f,onPassportIconClicked:b,onTaskIconClicked:j,onFiltersChange:R,onMonthEndReportPageClick:w,showMonthEndReportHistoricData:E,onProductVerticalsChanged:v,onRealmIdReset:$,onRealmIdUpdate:k}=r,T=l.uiState.filterText,I=l.uiState.filters,P="Completed"===l.fetchState&&"Completed"===l.zeniUsers.fetchState;return n.filterActions&&(n.filterActions.getCategoryWiseOptions=()=>kl(l)),e.jsxRuntimeExports.jsxs(vl,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...n},headerData:{...o,filterData:{filterText:T,filters:I},companiesLoaded:P,selectedTabOption:"management",allTabOptions:void 0===u?o.allTabOptions??F:void 0}}),e.jsxRuntimeExports.jsx($l,{changeHandlers:g,companiesExcludedFromMonthEndReport:t,expenseAutomationEnabledCompanies:s,initialOpenThreadRequest:a,isFilterApplied:null!=I?.categories,loggedInUser:d,loggedInUserRole:c,managementView:l,onClearFilter:()=>R?.("management",{}),onCockpitReloadData:C,onColumnSortConfigChanged:h,onCompanyNameClicked:f,onMonthEndReportPageClick:w,onPassportIconClicked:b,onScroll:y,onTaskIconClicked:j,onViewDetailsLinkClicked:S,showMonthEndReportHistoricData:E,isProductVerticalsColumnVisible:m,onProductVerticalsChanged:v,isRealmIdColumnVisible:x,realmIdUpdateStatusByCompanyId:p,onRealmIdReset:$,onRealmIdUpdate:k})]})},exports.MonthEndReportHistoricDataPage=o=>{const{monthEndReportHistoricData:i,reportSentDate:s,onRefresh:a,onNavigateBack:l,onDateChange:d}=o,c=e.useTheme(),[p,u]=t.useState(!1),[m,x]=t.useState(),h=t.useRef(null),[g,y]=t.useState(0),[S,C]=t.useState(0),f=e.useDelayUnmount(p,250),{data:b,companyId:j,companyName:R,firstMonthOfFY:w}=i,E=e.getMonthIndex(s.format(ak.visual.MMMMFormat)),v=Number(s.format(ck)),$=w>E?v-1:v;t.useEffect(()=>{x(`${F$((E>0?E-1:12).toString(),2,"0")}${dk}${v}`)},[]);const k={application:"cockpit",companyId:j,entityId:j,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:R,url:window.location.href,selectedRange:m},{url:T,...I}=k,P={...I},D="Not-Started"===i.fetchState||"In-Progress"===i.fetchState,{threadsRefs:A,sortedThreads:L,threadsPositions:O,observer:M,unresolvedThreadsMap:N,handleRemoveFloatingThread:z}=e.useFloatingThreads(P,h,!1,D),F=t.useRef(null),[V,B]=t.useState(0),_=t.useCallback(()=>{const e=A.current?.[A.current?.length-1];B(window.scrollY+(e?.getBoundingClientRect()?.bottom??0))},[A]),H=t.useCallback(()=>{p?C(Math.min((window.innerWidth-e.FORM_MINIMUM_WIDTH)/2,window.innerWidth-e.FORM_MINIMUM_WIDTH-e.COMMENTS_DRAWER_MAXIMUM_WIDTH-e.sp[4])):y(Math.min((window.innerWidth-e.FORM_MINIMUM_WIDTH)/2,window.innerWidth-e.FORM_MINIMUM_WIDTH-e.COMMENTS_SECTION_MINIMUM_WIDTH))},[p]);t.useEffect(()=>{H()},[p,H]),t.useEffect(()=>(window.addEventListener("resize",H),()=>{window.removeEventListener("resize",H)}),[H]),t.useEffect(()=>(window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)),[_]);const{openThread:W,setOpenThread:U}=t.useContext(e.ThreadsContext);t.useEffect(()=>{null!=W&&p&&u(!1)},[p,W,u]);const G=e.getHistoricMonthsList(w,i.historicReportSentDates),q=t.useCallback((e,t)=>{const o=w>e?t+1:t;d(r.dateFromYearMonthDate(o,e-1));x(`${F$((e>0?e-1:12).toString(),2,"0")}${dk}${o}`)},[w,d]);if("Not-Started"===i.fetchState||"In-Progress"===i.fetchState)return e.jsxRuntimeExports.jsxs(W$,{children:[e.jsxRuntimeExports.jsx(V$,{children:e.jsxRuntimeExports.jsx(U$,{onClick:l})}),e.jsxRuntimeExports.jsx(e.BusyIndication,{fetchState:i.fetchState,styles:{margin:e.Space.sp0}})]});if("Error"===i.fetchState)return e.jsxRuntimeExports.jsxs(W$,{children:[e.jsxRuntimeExports.jsx(V$,{children:e.jsxRuntimeExports.jsx(U$,{onClick:l})}),e.jsxRuntimeExports.jsx(e.ReloadContainer,{onReload:a,message:sk})]});if(null==b?.concatenatedHtml)return e.jsxRuntimeExports.jsxs(W$,{children:[e.jsxRuntimeExports.jsx(V$,{children:e.jsxRuntimeExports.jsx(U$,{onClick:l})}),e.jsxRuntimeExports.jsx(e.ReloadContainer,{onReload:a,message:lk.monthEndReport.insightsNotAvailable})]});const K=`cockpit_${j}`;return e.jsxRuntimeExports.jsx(n.RoomProvider,{id:K,children:e.jsxRuntimeExports.jsxs(G$,{children:[e.jsxRuntimeExports.jsx(c$,{companyName:i.companyName,onNavigateBack:l,monthCalendar:{monthAndYears:G,label:`${s.format(pk)} ${$}`,selectedMonth:{month:E,year:$},onChange:q},threadMetadata:P,onAllThreadsClick:()=>{null!=W&&U(null),u(!0)}}),e.jsxRuntimeExports.jsxs(X$,{ref:F,style:V>0?{height:V}:void 0,children:[e.jsxRuntimeExports.jsx(q$,{availableWidth:p?S:g}),e.jsxRuntimeExports.jsxs(Q$,{children:[e.jsxRuntimeExports.jsx(uk,{historicData:b,newThreadMetadata:k,companyId:j,sortedThreads:L,containerRef:h}),e.jsxRuntimeExports.jsxs(tk,{children:[e.jsxRuntimeExports.jsx(vs,{user:i.reportLastSentByUser}),e.jsxRuntimeExports.jsx(ek,{}),e.jsxRuntimeExports.jsxs(ok,{children:[rk.businessDay,nk.space,null!=i.data?.reportSentDate?r.getBusinessDayOfDate(i.data.reportSentDate):null,":",nk.space,i.data?.reportSentDate?.format(ak.visual.MMMDFormat)]})]})]}),f?e.jsxRuntimeExports.jsx(Z$,{allThreadsSectionOpen:p,children:e.jsxRuntimeExports.jsx(e.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${c.colors.grey3}`,boxShadow:`${e.Space.sp0} 1px 2px ${e.Space.sp0} ${e.Colors.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${e.Space.sp5} - ${e.Space.sp5})`,backgroundColor:c.colors.background},threadsContainerStyle:{paddingBottom:e.Space.sp5},collapsibleThreadStyle:{width:`calc(100% - ${e.Space.sp4})`},allowComposer:!1,drawerTitle:ik.comments,filter:P,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(e,t)=>{U(t);const o=L.findIndex(e=>e[0]===t);u(!1),A.current?.[o]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>u(!1)})}):e.jsxRuntimeExports.jsx(e.FloatingThreads,{observer:M,canvasContainerRef:h,sortedThreads:L,threadsPositions:O,threadsRefs:A,unresolvedThreadsMap:N,editorMode:!1,style:{minWidth:`${e.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${h.current?.offsetTop}px`},handleRemoveFloatingThread:z})]})]})})},exports.MonthEndReportPage=o=>{const{monthEndReportView:i,companyId:s,previewMode:a,onRefresh:l,onNavigateBack:d}=o,{openThread:c,setOpenThread:p}=t.useContext(e.ThreadsContext),u=r.dateNow().subtract(1,"month").format(g$),[m,x]=t.useState(!1),[h,g]=t.useState(!1),[y,S]=t.useState(0),[C,f]=t.useState({hasUnpersistedEdits:!1,isPending:!1}),b=C.isPending,[j,R]=t.useState(!1),w=t.useCallback(()=>{S(e=>e+1),l()},[l]),E=t.useCallback(()=>{b?R(!0):w()},[b,w]);t.useEffect(()=>{j&&!b&&(R(!1),w())},[j,b,w]);if("Not-Started"===i.fetchState||"In-Progress"===i.fetchState||"Not-Started"===i.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===i.companyMonthEndReportTemplatesData.fetchState)return e.jsxRuntimeExports.jsx(u$,{children:e.jsxRuntimeExports.jsx(p$,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"ExtraLarge",start:!0})})});if("Error"===i.fetchState||"Error"===i.companyMonthEndReportTemplatesData.fetchState)return e.jsxRuntimeExports.jsx(u$,{children:e.jsxRuntimeExports.jsx(R$,{onReload:l,message:b$})});if(null==i.html)return e.jsxRuntimeExports.jsx(u$,{children:e.jsxRuntimeExports.jsx(R$,{onReload:l,message:y$})});const v={application:"cockpit",companyId:s,entityId:s,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:i.companyName,url:window.location.href,selectedRange:u},{url:$,...k}=v,T={...k},I=`cockpit_${s}`;return e.jsxRuntimeExports.jsx(n.RoomProvider,{id:I,children:e.jsxRuntimeExports.jsxs(u$,{children:[e.jsxRuntimeExports.jsx(c$,{companyName:i.companyName,threadMetadata:T,onAllThreadsClick:()=>{null!=c&&p(null),x(!0)},onNavigateBack:d,onRefresh:()=>{null!=i.agentInsightsEditedAt||C.hasUnpersistedEdits?g(!0):E()}}),e.jsxRuntimeExports.jsx(Yv,{...o,allThreadsSectionOpen:m,filterMetaData:T,newThreadMetadata:v,regenerationCount:y,onAgentInsightSaveStateChange:f,onCloseAllThreadsSection:()=>x(!1)},`${a}_${s}_${i.templateData?.insight_month_year??""}`),h?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{children:S$}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:C$}),primaryButtonText:f$,secondaryButtonText:j$,primaryButtonWidth:168,secondaryButtonWidth:124,action:{onOkClick:()=>{g(!1),E()},onCancelClick:()=>g(!1),onClickAway:()=>g(!1)}}):null]})})},exports.NavHeader=bn,exports.OnboardingCustomerPage=function({localData:o,screenType:n,qboConnectClicked:i,analytics:s,onOnboardingCustomerDataUpdated:a,onCloseClick:l,onSaveClick:d,onViewClick:c,onCompanyDomainBlurred:p,onNavigateToPreOnboarding:u,onQBOConnectClick:m}){const x=e.useTheme(),h=e.useWindowSizeContext(),g=HE.labelWidth.value(h),y=HE.largeLabelWidth.value(h),S=HE.extraLargeLabelWidth.value(h),C=e.useForm({mode:"all",reValidateMode:"onChange",defaultValues:t.useMemo(()=>WE(o),[o])}),{emailGroupFetchState:f,newOnboardingCustomerLocalData:b,onboardingCompletedCompanies:j,isOnboardingAllowedForUser:R,fetchState:w,sendInviteFetchState:E,uiState:v,companyView:$,externalConnections:k}=o,[T,I]=t.useState(NE.empty),[P,D]=t.useState(NE.empty),[A]=t.useState(NE.empty),[L,O]=t.useState(NE.empty),[M,N]=t.useState(NE.empty),[z,F]=t.useState(!1),[V,B]=t.useState(!1),[_,H]=t.useState(LE.customer.completePreOnboardingText),[W,U]=t.useState(!1),G=t.useRef(null),q=t.useRef(null),K=t.useRef(null),{isExistingCustomer:Y,isCustomerOnboardedSuccessfully:Z}=JE(o),X=Y&&Z?LE.customer.customerNameExistInManagementText:LE.customer.customerNameExistInOnboardingText,Q=t.useMemo(()=>X.replace("_company-domain_",b.companyEmailDomain??NE.empty),[f.fetchState]),J=$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed,ee=t.useCallback(()=>{const e=C.getValues();return e[BE].realmId!==e[BE].confirmRealmId?(O(LE.customer.realmIdWarning),C.trigger(`${BE}.confirmRealmId`),!1):(O(NE.empty),C.clearErrors(`${BE}.confirmRealmId`),!0)},[C]),te=t.useCallback(()=>{const e=C.getValues();return"Subsidiary"==e[BE].entityType.selectedOption?.value&&null==e[BE].company.selectedOption?(C.setError("customerSection.company",{type:"required"}),!1):(C.clearErrors("customerSection.company"),!0)},[C]),oe=t.useCallback(()=>!0===Boolean(b.customerName?.firstName)&&!0!==Boolean(b.customerName?.lastName)||!0!==Boolean(b.customerName?.firstName)&&!0===Boolean(b.customerName?.lastName)?(C.trigger(`${BE}.customerName`),!1):!0!==Boolean(b.customerName?.firstName)&&!0!==Boolean(b.customerName?.lastName)||!1!==Boolean(b.email)?!0!==Boolean(b.customerName?.firstName)&&!0!==Boolean(b.customerName?.lastName)||!0!==Boolean(b.email)||0!==b.selectedProducts?.length||(N(LE.customer.productsWarning),C.trigger(`${BE}.products`),!1):(C.trigger(`${BE}.email`),!1),[C,b.customerName,b.email,b.selectedProducts]),ne=t.useCallback(()=>ee()&&te()&&oe(),[te,ee,oe]),re=C.handleSubmit(()=>{H(LE.customer.completePreOnboardingText),ne()&&B(!0)},()=>{ne(),console.warn("Onboarding customer form error")}),ie=C.getValues()[BE].email??NE.empty,se=(e=!1)=>{const t={companyDomain:b.companyEmailDomain??NE.empty,primaryContactEmail:ie},o={groupName:b.groupName??NE.empty,groupEmail:b.groupId??NE.empty,groupDescription:b.groupDescription??NE.empty},n={firstName:b.customerName?.firstName??NE.empty,lastName:b.customerName?.lastName??NE.empty,customerEmail:ie,companyName:b.name??NE.empty,entittyType:!0===b.isSubsidiary?AE.texts.subsidiary:AE.texts.parent??NE.empty,chargebeeId:b.chargebeeId??NE.empty,products:b.selectedProducts??[],qboRealmId:b.qboRealmId??NE.empty,hubSpotId:b.hubSpotId},r={isSendInvite:e,isInviteAlreadySent:!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteSent,isZeniManagedQboConnectionSelected:"zeni_user"===b.accountingConnectionCreationMode,isCustomerManagedQboConnectionSelected:"customer"===b.accountingConnectionCreationMode,qboConnectionStatus:$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed??!1};s?.trackOnboardingSaveOrSendInvite(t,o,n,r)},ae={onOkClick:()=>{F(!1),C.reset(),l()},onCancelClick:()=>{F(!1)}},le={onOkClick:()=>{B(!1),d(!0),se(!0)},onCancelClick:()=>{B(!1)}},de=async(t,n)=>{const i={...n};if(t.includes("groupName")&&n[VE].groupName!=NE.empty&&(n[VE].groupName=n[VE].groupName.charAt(0).toUpperCase()+n[VE].groupName.slice(1)),(t.includes("groupName")||t.includes("groupEmail"))&&(()=>{let e=!0;const t=C.getValues();if(t[VE].groupEmail!==NE.empty&&t[VE].groupName===NE.empty)I(LE.customer.groupNameWarning),C.setError("groupSection.groupName",{type:"required"}),e=!1;else if(t[VE].groupName!==NE.empty&&t[VE].groupEmail===NE.empty)D(LE.customer.groupEmailWarning),C.setError("groupSection.groupEmail",{type:"required"}),e=!1;else{const{error:t}=C.getFieldState("groupSection.groupName"),{error:o}=C.getFieldState("groupSection.groupEmail");null!=t&&"required"!==t.type||null!=o&&"required"!==o.type||(e=!1,C.clearErrors("groupSection")),I(NE.empty),D(NE.empty)}})(),t.includes("confirmRealmId")&&O(NE.empty),t.includes("products")&&!1===e.isEqual(b.selectedProducts??[],n[BE].products.selectedOptions)){N(NE.empty);const e=ev(b.selectedProducts??[],n[BE].products.selectedOptions.map(e=>r.toProductTypeStrict(e)).filter(e=>null!=e));i[BE].products.selectedOptions=e;const t=oE(o.allProductsList,e);C.setValue(`${BE}.products`,{allOptions:t,selectedOptions:e})}t.includes("realmId")&&e.has(C.formState.errors,`${BE}.confirmRealmId`)&&C.trigger(`${BE}.confirmRealmId`),a(i)};t.useEffect(()=>{const t=C.watch((t,{name:o})=>{null!=o&&null!=t&&e.defer(()=>de(o,t))});return()=>{t.unsubscribe()}}),t.useEffect(()=>{!0===b.isCustomerCreationDisabled&&(C.resetField("customerSection",{defaultValue:WE(o)[BE],keepDirty:!0}),C.clearErrors("customerSection"))},[b.isCustomerCreationDisabled]),t.useEffect(()=>{U(!0===b.isSubsidiary),!0!==b.isSubsidiary&&C.resetField("customerSection.company",{defaultValue:WE(o)[BE].company,keepDirty:!0}),C.resetField("customerSection.entityType",{defaultValue:WE(o)[BE].entityType,keepDirty:!0})},[b.isSubsidiary]),t.useEffect(()=>{"Completed"===f.fetchState&&(C.reset(WE(o)),Y||(()=>{const e={companyEmailDomain:b.companyEmailDomain??NE.empty,primaryContactEmail:ie},t={groupName:b.groupName??NE.empty,groupEmail:b.groupId??NE.empty,groupDescription:b.groupDescription??NE.empty,isCompanyEmailDomainAvailable:!0};s?.trackOnboardingNewCustomerGroupCreationCheck(e,t)})())},[f.fetchState]),t.useEffect(()=>{"STEP_1"===v.selectedStep?G.current?.scrollIntoView():"STEP_2"===v.selectedStep?q.current?.scrollIntoView():"STEP_3"===v.selectedStep&&K.current?.scrollIntoView()},[]),t.useEffect(()=>{const e=$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed;if("Error"===k?.saveConnectionState){const e={firstName:b.customerName?.firstName??NE.empty,lastName:b.customerName?.lastName??NE.empty,customerEmail:C.getValues()[BE].email??NE.empty,qboConnectionResponseMessage:AE.texts.unableToConnectQuickbooksPleaseTryAgain,isSuccess:!1};s?.trackOnboardingZeniManagedQBOConnection(e)}else if(e){const e={firstName:b.customerName?.firstName??NE.empty,lastName:b.customerName?.lastName??NE.empty,customerEmail:C.getValues()[BE].email??NE.empty,qboConnectionResponseMessage:AE.texts.congratulationsYouHaveSuccessfullyEstablishedAConnectionWith,isSuccess:!0};s?.trackOnboardingZeniManagedQBOConnection(e)}},[k?.saveConnectionState,$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed]),t.useEffect(()=>{if(b.accountingConnectionCreationMode){const e=$?.company.companyOnboardingInfo.onboardingInfo?.accountingConnectionCreationMode??NE.empty;if(b.accountingConnectionCreationMode!==e){const e={firstName:b.customerName?.firstName??NE.empty,lastName:b.customerName?.lastName??NE.empty,customerEmail:C.getValues()[BE].email??NE.empty,isZeniOrCustomer:b.accountingConnectionCreationMode??NE.empty};s?.trackOnboardingQBOConnectionSelected(e)}}},[b.accountingConnectionCreationMode]);const ce=t.useMemo(()=>{const e=C.formState.isValid,t=null!=b.selectedProducts&&(!0===b.selectedProducts.includes("zeni_payroll")||!0===b.selectedProducts.includes("zeni_cfo")||!0===b.selectedProducts.includes("zeni_tax")),o=null!=b.selectedProducts&&(!0===b.selectedProducts.includes("zeni_checking")||!0===b.selectedProducts.includes("zeni_cards")||t)&&!1===b.selectedProducts.includes("bookkeeping");return!0!==e||"In-Progress"===f.fetchState||"Error"===f.fetchState||"In-Progress"===w||"Error"===w||!0!==R||null==b.selectedProducts||0===b.selectedProducts.length||null==b.accountingConnectionCreationMode&&!o||"zeni_user"===b.accountingConnectionCreationMode&&!0!==J&&!o||"Completed"===f.fetchState&&Y||!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted},[f.fetchState,Y,R,w,C.formState.isValid,b.accountingConnectionCreationMode,J,b.selectedProducts,$?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted]),pe=t.useMemo(()=>"In-Progress"!==E.fetchState&&"Error"!==E.fetchState&&"In-Progress"!==w&&"Error"!==w&&"In-Progress"!==f.fetchState&&!0===Y,[f.fetchState,Y,w,E.fetchState]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[!0===z?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{children:AE.confirmationPopup.discardTitle}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:AE.confirmationPopup.discardDescription}),primaryButtonText:AE.confirmationPopup.discard,secondaryButtonText:AE.cancel,proceedButtonVariant:"destructive",action:ae,style:{background:e.Colors.overlayDark}}):null,!0===V?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{style:{paddingLeft:e.Space.sp6,paddingRight:e.Space.sp6},children:LE.confirmationPopup.title}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:LE.confirmationPopup.subTitle}),primaryButtonText:ME,secondaryButtonText:OE,action:le,style:{background:e.Colors.overlayDark}}):null,e.jsxRuntimeExports.jsx(e.NavBarWithClose,{title:"create"===n?AE.texts.newCustomer:AE.texts.editCustomer,backgroundColor:x.colors.grey5,style:{zIndex:4},onCloseClick:()=>{Object.keys(C.formState.dirtyFields).length>0?F(!0):(C.reset(),l())}}),e.jsxRuntimeExports.jsxs(UE,{children:[e.jsxRuntimeExports.jsx(GE,{children:LE.customer.subTitle}),e.jsxRuntimeExports.jsx(e.FormProvider,{...C,children:e.jsxRuntimeExports.jsxs("form",{id:`${zE}_form`,onSubmit:re,children:[e.jsxRuntimeExports.jsx(Sw,{localData:o,labelWidth:g,onCompanyDomainBlurred:e=>{const{dirtyFields:t}=C.formState;!0===t.companySection?.companyDomain&&p(e)},primaryEmailDomainAdditionalLabel:A,isOnboardingAllowedForUser:R}),!0===pe?e.jsxRuntimeExports.jsxs(KE,{children:[e.jsxRuntimeExports.jsxs(YE,{children:[e.jsxRuntimeExports.jsxs(XE,{children:[e.jsxRuntimeExports.jsx(qE,{}),e.jsxRuntimeExports.jsx(e.StandardMedium,{children:LE.customer.groupCreationError})]}),e.jsxRuntimeExports.jsx(QE,{children:Q})]}),e.jsxRuntimeExports.jsx(e.Button,{style:{padding:`${e.Space.sp1} ${e.Space.sp2}`,backgroundColor:x.colors.champion,borderColor:x.colors.champion,color:"light"===x.mode?e.darkColors.primary:e.lightColors.primary,height:"30px",width:e.Space.sp7},label:AE.view,size:"small",onClick:()=>{c(Z?"management":"onboarding")}})]}):null,"Error"===f.fetchState||"Error"===w||"Error"===E.fetchState&&null!=o.error&&406!==o.error?.code?e.jsxRuntimeExports.jsxs(KE,{children:[e.jsxRuntimeExports.jsx(YE,{children:e.jsxRuntimeExports.jsxs(XE,{children:[e.jsxRuntimeExports.jsx(qE,{}),e.jsxRuntimeExports.jsx(e.LargeMedium,{children:LE.customer.emailgroupAPIError})]})}),e.jsxRuntimeExports.jsx(e.Button,{style:{padding:`${e.Space.sp1} ${e.Space.sp2}`,backgroundColor:x.colors.champion,borderColor:x.colors.champion,color:"light"===x.mode?e.darkColors.primary:e.lightColors.primary},label:LE.customer.tryAgainText,size:"small",onClick:()=>{"Error"===f.fetchState?p(b.companyEmailDomain):ne()&&0===Object.keys(C.formState.errors).length&&(d("Error"===E.fetchState),se())}})]}):null,"Error"===E.fetchState&&null!=o.error&&406===o.error?.code?e.jsxRuntimeExports.jsxs(KE,{children:[e.jsxRuntimeExports.jsx(qE,{}),e.jsxRuntimeExports.jsxs(YE,{children:[e.jsxRuntimeExports.jsx(e.LargeMedium,{children:_!==NE.empty?LE.customer.preOnboardingError:LE.customer.preOnboardingSaveError}),_!==NE.empty?e.jsxRuntimeExports.jsx(e.Button,{style:{padding:`${e.Space.sp1} ${e.Space.sp2}`,backgroundColor:x.colors.champion,borderColor:x.colors.champion,color:"light"===x.mode?e.darkColors.primary:e.lightColors.primary},label:_,size:"small",onClick:()=>{0===Object.keys(C.formState.errors).length&&(u?.(),H(NE.empty))}}):null]})]}):null,e.jsxRuntimeExports.jsx(lE,{groupEmailAdditionalLabel:P,groupNameAdditionalLabel:T,labelWidth:g,localData:o,ref:G,sectionId:VE}),e.jsxRuntimeExports.jsx(Yw,{localData:o,onboardedCompanies:j.companies,isSubsidiary:W,labelWidth:g,largeLabelWidth:y,extraLargeLabelWidth:S,realmIdAdditionalLabel:L,productsAdditionalLabel:M,ref:q,sectionId:BE,isDisabled:!1===R?"disabled":void 0}),e.jsxRuntimeExports.jsx(ZE,{children:e.jsxRuntimeExports.jsx(CE,{isSectionDisabled:((e,t)=>{const{fetchState:o}=e,{isEmailGroupCreated:n,selectedProducts:r}=t,i="Completed"!==o&&null==n,s=null==r||0===r.length,a=(!0===r?.includes("zeni_checking")||!0===r?.includes("zeni_treasury")||!0===r?.includes("zeni_cards")||!0===r?.includes("zeni_payroll")||!0===r?.includes("zeni_cfo")||!0===r?.includes("zeni_tax"))&&!1===r?.includes("bookkeeping");return i||s||a})(f,b),sectionId:_E,isLoading:!0===i||"In-Progress"===k?.fetchState||"In-Progress"===k?.saveConnectionState,accountingConnectionCreationMode:o.newOnboardingCustomerLocalData.accountingConnectionCreationMode,onQBOConnectClick:m,isConnected:!0===$?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed,isInviteSent:!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteSent||!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted,saveConnectionState:k?.saveConnectionState})})]})})]}),e.jsxRuntimeExports.jsx(e.Footer,{formId:`${zE}_form`,primaryBtn:{label:!0===$?.company.companyOnboardingInfo.onboardingInfo?.inviteSent?AE.texts.resendInvite:AE.texts.sendInvite,style:{width:HE.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isLoading:"In-Progress"===E.fetchState,isDisabled:ce},cancelBtn:{label:AE.save,style:{width:HE.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isDisabled:!(e.formHasDirtyFields(C.formState.dirtyFields)||"Completed"===o.emailGroupFetchState.fetchState),isLoading:"In-Progress"===w&&!1===i,shouldResetOnCancel:!1,onClick:()=>{ne()&&0===Object.keys(C.formState.errors).length&&(d(!1),se())},reverseSpinnerColor:!1}})]})},exports.OnboardingPage=({headerData:o,headerActions:n,initialOpenThreadRequest:r,onboardingPageActions:i,onboardingPageData:s})=>{const[a,l]=t.useState(!1),[d,c]=t.useState(void 0),[p,u]=t.useState(void 0),{analytics:m}=e.useToolkitContext(),{onboardingView:x,qboConnectionPoolFlag:h}=s,{onScroll:g,onOnboardingStepClicked:y,onCancelClicked:S,onGoLiveClicked:C,onUpdateCustomerCreationStatus:f,onCockpitReloadData:b,onSendInviteClick:j,onColumnSortConfigChanged:R,redirectToDashboardOnboarding:w,onRetryBankAccountConnection:E,onQBOConnectClick:v}=i,$="Completed"===x.fetchState&&"Completed"===x.zeniUsers.fetchState,k={onOkClick:()=>{l(!1),null!=d&&(j(d),null!=p&&m.trackOnboardingSendInvite(d,!1,p))},onCancelClick:()=>{l(!1)}};return e.jsxRuntimeExports.jsxs(uw,{children:[!0===a?e.jsxRuntimeExports.jsx(e.ConfirmationPopup,{titleComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpTitle,{style:{paddingLeft:e.Space.sp6,paddingRight:e.Space.sp6},children:sw.confirmationPopup.title}),descriptionComponent:e.jsxRuntimeExports.jsx(e.ConfirmationPopUpDescription,{children:sw.confirmationPopup.subTitle}),primaryButtonText:lw,secondaryButtonText:aw,action:k,style:{background:e.Colors.overlayDark}}):null,e.jsxRuntimeExports.jsx(bn,{headerActions:{...n},headerData:{...o,allTabOptions:o.allTabOptions??F,companiesLoaded:$,filterData:{filterText:x.uiState.filterText,disableFilters:!0},selectedTabOption:"onboarding"}}),e.jsxRuntimeExports.jsx(mw,{initialOpenThreadRequest:r,onColumnSortConfigChanged:R,onCockpitReloadData:b,onGoLiveClicked:C,onQBOConnectClick:v,onRetryBankAccountConnection:E,onScroll:g,onSendInviteClick:(e,t,o)=>{t?(j(e),m.trackOnboardingSendInvite(e,!0,o)):(c(e),u(o),l(!0))},onboardingView:x,onOnboardingStepClicked:y,onCancelClicked:S,onUpdateCustomerCreationStatus:f,qboConnectionPoolFlag:h,redirectToDashboardOnboarding:w})]})},exports.PortfolioPage=({headerData:t,headerActions:o,portfolioPageActions:n,portfolioPageData:r,initialOpenThreadRequest:i})=>{const{portfolioView:s}=r,{onColumnSortConfigChanged:a,onCompanyNameClicked:l,onPassportIconClicked:d,onScroll:c,onFiltersChange:p,onCockpitReloadData:u}=n,m=s.uiState.filterText,x=s.uiState.filters,h="Completed"===s.fetchState;return o.filterActions&&(o.filterActions.getCategoryWiseOptions=()=>nC()),e.jsxRuntimeExports.jsxs(tC,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...o},headerData:{...t,filterData:{filterText:m,filters:x},companiesLoaded:h,selectedTabOption:"portfolio",allTabOptions:t.allTabOptions??F}}),e.jsxRuntimeExports.jsx(oC,{portfolioView:s,onColumnSortConfigChanged:a,onScroll:c,onCockpitReloadData:u,isFilterApplied:null!=x?.categories,onCompanyNameClicked:l,onPassportIconClicked:d,onClearFilter:()=>p("portfolio",{}),initialOpenThreadRequest:i})]})},exports.ReviewPage=({headerData:o,headerActions:n,initialOpenThreadRequest:r,reviewPageActions:i,reviewPageData:s,analytics:a})=>{const{reviewView:l,zeniUserFetchState:d,allUsers:c,isReviewVendorColumnVisible:p}=s,{onColumnSortConfigChanged:u,onCockpitReloadData:m,onCompanyNameClicked:x,onClickAuditScore:h,onClickWarningsCount:g,onTransactionTagClicked:y,onRetryBankAccountConnection:S,onReviewVendorTagClicked:C,onUncategorizedAccountsErrorClick:f}=i,b=l.uiState.filterText,j="Completed"===l.fetchState,R=t.useMemo(()=>n.filterActions?{...n,filterActions:{...n.filterActions}}:n,[n]);return e.jsxRuntimeExports.jsxs(VT,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:R,headerData:{...o,allTabOptions:o.allTabOptions??F,filterData:{filterText:b,disableFilters:!0},selectedTabOption:"audit",companiesLoaded:j}}),e.jsxRuntimeExports.jsx(BT,{allUsers:c,analytics:a,initialOpenThreadRequest:r,isReviewVendorColumnVisible:p,reviewView:l,zeniUserFetchState:d,onColumnSortConfigChanged:u,onCockpitReloadData:m,onCompanyNameClicked:x,onClickAuditScore:h,onClickWarningsCount:g,onRetryBankAccountConnection:S,onReviewVendorTagClicked:C,onTransactionTagClicked:y,onUncategorizedAccountsErrorClick:f})]})},exports.SubscriptionAddPlanPage=function(o){const n=e.useWindowSizeContext(),r=e.useTheme(),i=t.useRef(null),{localData:s,isDisabled:a,onSubscriptionDetailsChanged:l,onEstimateSuccess:d,onReviewClick:c,onBackClick:p,onResetClick:u}=o,[m,x]=t.useState(void 0),{data:h,fetchState:g,estimateStatus:y}=s,S=e.usePrevious(y.fetchState),C=e.usePrevious(g),f=e.useForm({mode:"all",reValidateMode:"onChange",defaultValues:t.useMemo(()=>Fy(s),[s])});t.useEffect(()=>()=>{x(void 0)},[]),t.useEffect(()=>{"In-Progress"===C&&"Completed"===g&&f.reset(Fy(s))},[C,g,f,s]),t.useEffect(()=>{"In-Progress"===S&&("Error"===y.fetchState?m!==y.fetchState&&x(y.fetchState):"Completed"===y.fetchState&&(x(void 0),d()))},[m,S,y.fetchState,d]),t.useEffect(()=>{const t=f.watch((t,{name:o})=>{null!=o&&null!=t&&e.defer(()=>(async(e,t)=>{(e.includes(Ay)||e.includes(Ly))&&l(t)})(o,t))});return()=>{t.unsubscribe()}});const b=f.handleSubmit(e=>{null!=m&&x(void 0),c()}),j={review:Iy};return e.jsxRuntimeExports.jsxs(Oy,{children:[e.jsxRuntimeExports.jsx(e.NavBar,{title:Py,backgroundColor:r.colors.grey4,style:{zIndex:3},onBackClick:p,scrollableContent:i,source:"SubscriptionAddPlanPage"}),null!=m?e.jsxRuntimeExports.jsx(e.SubscriptionSnackBar,{fetchState:m,customMessageText:y.error?.message??Ty.errorMessage.somethingWentWrongPleaseTryAgain,onRemoveSnackbar:()=>x(void 0)}):null,e.jsxRuntimeExports.jsx(Ny,{ref:i,windowSize:n,children:"In-Progress"===g||"Not-Started"===g?e.jsxRuntimeExports.jsx(My,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Large",start:!0})}):e.jsxRuntimeExports.jsx(e.FormProvider,{...f,children:e.jsxRuntimeExports.jsxs("form",{id:zy(Dy),onSubmit:b,children:[e.jsxRuntimeExports.jsx(my,{sectionId:Ay,subscriptionCreateData:h,subscriptionMetaDetails:iy(s),isDisabled:a}),e.jsxRuntimeExports.jsx(jy,{sectionId:Ly,style:{paddingBottom:e.Space.sp9},subscriptionCreateData:h,isDisabled:a})]})})}),e.formHasDirtyFields(f.formState.dirtyFields)||Vy(s)?e.jsxRuntimeExports.jsx(e.Footer,{formId:zy(Dy),primaryBtn:{label:j.review,isLoading:"In-Progress"===y.fetchState,isDisabled:null!=o.isDisabled&&"In-Progress"!==y.fetchState},cancelBtn:{label:Ty.cancel,shouldResetOnCancel:!0,onClick:()=>{f.reset(By(s)),u()}}}):null]})},exports.SubscriptionPage=({headerData:t,headerActions:o,initialOpenThreadRequest:n,subscriptionPageActions:r,subscriptionPageData:i})=>{const{subscriptionView:s}=i,{onColumnSortConfigChanged:a,changeHandlers:l,onScroll:d,onCompanyNameClicked:c,onPassportIconClicked:p,onCockpitReloadData:u,onPlanOrAddOnClicked:m,onCollapseToggled:x,onFiltersChange:h}=r,g=s.uiState.filterText,y=s.uiState.filters,S="Completed"===s.fetchState&&"Completed"===s.zeniUsers.fetchState;return o.filterActions&&(o.filterActions.getCategoryWiseOptions=()=>bh(s)),e.jsxRuntimeExports.jsxs(Ch,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...o},headerData:{...t,filterData:{filters:y,filterText:g},companiesLoaded:S,allTabOptions:t.allTabOptions??F,selectedTabOption:"subscription"}}),e.jsxRuntimeExports.jsx(fh,{initialOpenThreadRequest:n,isFilterApplied:null!=y?.categories,subscriptionView:s,changeHandlers:l,onClearFilter:()=>h("subscription",{}),onCockpitReloadData:u,onCollapseToggled:x,onColumnSortConfigChanged:a,onCompanyNameClicked:c,onPassportIconClicked:p,onPlanOrAddOnClicked:m,onScroll:d})]})},exports.SubscriptionUpdatePlanPage=function(o){const n=e.useWindowSizeContext(),r=e.useTheme(),{localData:i,isDisabled:s,onSubscriptionDetailsChanged:a,onEstimateSuccess:l,onReviewClick:d,onBackClick:c,onResetClick:p}=o,[u,m]=t.useState(void 0),x=t.useRef(null),{data:h,subscriptionDetail:g,fetchState:y,estimateStatus:S}=i,C=e.usePrevious(S.fetchState),f=e.usePrevious(y),b=e.useForm({mode:"all",reValidateMode:"onChange",defaultValues:t.useMemo(()=>ny(i),[i])});t.useEffect(()=>()=>{m(void 0)},[]),t.useEffect(()=>{"In-Progress"===f&&"Completed"===y&&b.reset(ny(i))},[f,y,b,i]),t.useEffect(()=>{"In-Progress"===C&&("Error"===S.fetchState?u!==S.fetchState&&m(S.fetchState):"Completed"===S.fetchState&&(m(void 0),l()))},[u,C,S.fetchState,l]),t.useEffect(()=>{const t=b.watch((t,{name:o})=>{null!=o&&null!=t&&e.defer(()=>(async(e,t)=>{if(e.includes(Xg)||e.includes(Qg)){if(e.includes(Qg)){const{applyChanges:e}=t,{changeType:o,shouldProrate:n}=e;"applyImmediately"===o&&!0===h?.applyEndOfTerm&&!1===n?b.setValue(Qg,{...e,shouldProrate:!0},{shouldDirty:!0}):"applyEndOfTerm"===o&&!1===h?.applyEndOfTerm&&!0===n&&b.setValue(Qg,{...e,shouldProrate:!1},{shouldDirty:!0})}a(t)}})(o,t))});return()=>{t.unsubscribe()}});const j=b.handleSubmit(e=>{null!=u&&m(void 0),d()}),R=()=>"future"!==v?.status.code?e.jsxRuntimeExports.jsx(Eh,{sectionId:Qg,style:{paddingBottom:e.Space.sp9},subscriptionUpdateData:h,subscriptionTermEndDate:v?.currentTerm?.end,isSubscriptionDetailsChanged:ay(i),isDisabled:s}):null,w={review:Kg},E=g?.summary?.summary,v=g?.subscription.subscription,$=g?.plan?.plan.subscriptionPlanId,k=null!=E?.recommendedSubscriptionPlanId&&$===E?.primarySubscriptionPlanId?E?.recommendedSubscriptionPlanId:void 0;return e.jsxRuntimeExports.jsxs(Jg,{children:[e.jsxRuntimeExports.jsx(e.NavBar,{title:Yg,backgroundColor:r.colors.grey4,style:{zIndex:3},onBackClick:c,scrollableContent:x,source:"SubscriptionUpdatePlanPage"}),null!=u?e.jsxRuntimeExports.jsx(e.SubscriptionSnackBar,{fetchState:u,customMessageText:S.error?.message??qg.errorMessage.somethingWentWrongPleaseTryAgain,onRemoveSnackbar:()=>m(void 0)}):null,e.jsxRuntimeExports.jsx(ty,{ref:x,windowSize:n,children:"In-Progress"===y||"Not-Started"===y?e.jsxRuntimeExports.jsx(ey,{children:e.jsxRuntimeExports.jsx(e.ActivityIndicator,{size:"Large",start:!0})}):e.jsxRuntimeExports.jsx(e.FormProvider,{...b,children:e.jsxRuntimeExports.jsxs("form",{id:oy(Zg),onSubmit:j,children:[e.jsxRuntimeExports.jsx(Fg,{sectionId:Xg,subscriptionUpdateData:h,recommendedSubscriptionPlanId:k,subscriptionMetaDetails:iy(i),isDisabled:s}),e.jsxRuntimeExports.jsx(R,{})]})})}),e.formHasDirtyFields(b.formState.dirtyFields)||sy(i)?e.jsxRuntimeExports.jsx(e.Footer,{formId:oy(Zg),primaryBtn:{label:w.review,isLoading:"In-Progress"===S.fetchState,isDisabled:null!=o.isDisabled&&"In-Progress"!==S.fetchState},cancelBtn:{label:qg.cancel,shouldResetOnCancel:!0,onClick:()=>{b.reset(ly(i)),null!=g&&p(g)}}}):null]})},exports.TaskManagerPage=({headerActions:o,headerData:n,isBirdsEyeViewEnabled:r,initialOpenThreadRequest:i,taskManagerPageData:s,taskManagerPageActions:a})=>{const{companyTaskManagerView:l}=s,{uiState:d}=l,{onCockpitReloadData:c,onFetchTaskManagerView:p,onRowClick:u}=a,m="Completed"===l.fetchState,{filters:x}=l.uiState,[h,g]=t.useState(l.uiState.filterText??""),y=t.useRef(e.debounce$1(e=>p(d.from,d.sortKey,d.sortOrder,!1,e,x),500,{trailing:!0})).current;return o.filterActions&&(o.filterActions.getCategoryWiseOptions=()=>ud(l)),e.jsxRuntimeExports.jsxs(md,{children:[e.jsxRuntimeExports.jsx(bn,{headerActions:{...o,filterActions:{...o.filterActions,onFilterTextChanged:(e,t)=>{g(t);const o=t.trim();o.length>=2?y(o):y("")}}},headerData:{...n,allTabOptions:n.allTabOptions??F,selectedTabOption:"taskManager",companiesLoaded:m,filterData:{filterText:h,filters:x}}}),r?e.jsxRuntimeExports.jsx(gd,{metrics:l.metrics}):null,e.jsxRuntimeExports.jsx(pd,{companyTaskManagerView:l,fetchNextItemsOnScroll:()=>{p(d.from,d.sortKey,d.sortOrder,!0,d.filterText)},initialOpenThreadRequest:i,onCockpitReloadData:c,onColumnSortConfigChanged:(e,t)=>{p(d.from,e,t,!1,d.filterText,x)},onRowClick:u})]})},exports.WarningsDrawerPage=({companyView:t,allUsers:o,onRetryBankAccountConnection:n,onCloseClick:i})=>{const s=e.useWindowSizeContext(),a=null!=t?r.getAuditWarningsCount(t):0,l=t?.onboardingInfo?.bankAccountLinked,d=t?.onboardingInfo?.qboLinked,c=t?.onboardingInfo?.identityVerified,p=t?.onboardingInfo?.businessVerified,u="zeni_user"===t?.onboardingInfo?.accountingConnectionCreationMode,m=[];if(null!=l){const e=o.find(e=>e.userId===l.userIds[0]),{errorMessage:t,successMessage:r}=GP(l,u,e);m.push({status:null!=t?"Error":null!=r?"Complete":"Incomplete",userInfo:e,message:t??r??`${HP.common.texts.linkBankAccount} ${HP.common.strings.hyphen} ${HP.common.incompleteText}`,onClickRetry:n})}if(null!=d){const e=o.find(e=>e.userId===d.userIds[0]),{errorMessage:t,successMessage:n}=qP(d,u,e);m.push({status:null!=t?"Error":null!=n?"Complete":"Incomplete",userInfo:e,message:t??n??`${HP.common.texts.connectToQbo} ${HP.common.strings.hyphen} ${HP.common.incompleteText}`})}if(null!=c){const e=o.find(e=>e.userId===c.userIds[0]),{errorMessage:t,successMessage:n}=KP(c,u,e);m.push({status:null!=t?"Error":null!=n?"Complete":"Incomplete",userInfo:e,message:t??n??`${HP.cockpit.review.warningsDrawer.kyc} ${HP.common.strings.hyphen} ${c.status}`})}if(null!=p){const e=o.find(e=>e.userId===p.userIds[0]),{errorMessage:t,successMessage:n}=YP(p,u,e);m.push({status:null!=t?"Error":null!=n?"Complete":"Incomplete",userInfo:e,message:t??n??`${HP.cockpit.review.warningsDrawer.kyb} ${HP.common.strings.hyphen} ${p.status}`})}return e.jsxRuntimeExports.jsxs(ZP,{children:[e.jsxRuntimeExports.jsx(XP,{windowSize:s,children:e.jsxRuntimeExports.jsx(QP,{children:e.jsxRuntimeExports.jsxs(tD,{windowSize:s,children:[e.jsxRuntimeExports.jsx(oD,{windowSize:s,children:t?.name}),e.jsxRuntimeExports.jsx(cD,{onClick:i,children:e.jsxRuntimeExports.jsx(pD,{})})]})})}),e.jsxRuntimeExports.jsxs(JP,{children:[e.jsxRuntimeExports.jsx(eD,{children:a>0?e.jsxRuntimeExports.jsxs(uD,{children:[e.jsxRuntimeExports.jsx(uD,{children:e.capitaliseWords(HP.cockpit.review.warningsDrawer.issueFound)}),e.jsxRuntimeExports.jsx(mD,{children:`${HP.common.strings.openingBrace}${a}${HP.common.strings.closingBrace}`})]}):e.jsxRuntimeExports.jsx(uD,{children:`${HP.common.no} \n ${e.capitaliseWords(HP.cockpit.review.warningsDrawer.issueFound)}`})}),m.map((o,n)=>e.jsxRuntimeExports.jsx(nD,{isStepInError:"Error"===o.status,children:e.jsxRuntimeExports.jsxs(rD,{children:[e.jsxRuntimeExports.jsx(iD,{children:"Complete"===o.status?e.jsxRuntimeExports.jsx(lD,{}):"Error"===o.status?e.jsxRuntimeExports.jsx(e.SvgHighImportanceFilled,{}):e.jsxRuntimeExports.jsx(dD,{})}),e.jsxRuntimeExports.jsxs(sD,{children:[e.jsxRuntimeExports.jsx(aD,{isStepInError:"Error"===o.status,children:o.message}),"Error"===o.status?e.jsxRuntimeExports.jsx(e.Button,{label:HP.common.retry,onClick:o.onClickRetry,loading:"In-Progress"===t?.retryBankAccountConnectionFetchState.fetchState,variant:"outline",style:{padding:`${e.Space.sp1} ${e.Space.sp3}`,borderRadius:e.Space.sp1},textStyle:{...e.textStyles.smallMedium.cssObject}}):null]})]})},n))]})]})},exports.toCockpitOptionType=Ie,exports.toCockpitOptionTypeStrict=e=>r.stringToUnionStrict(e,Te);
|
|
6164
6164
|
//# sourceMappingURL=cockpit.cjs.js.map
|