PageSourceSearch

https://app.allocate.co/assets/fe49d794/userProfilesStore-BXfNbUDb.js

js allocate.co collected 2026-09-28 05:40:02 UTC 5,443 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`allocate-platform-09b0df7a`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`7f85a6aa-a6bf-4dae-aa97-9cd1a19fd6b4`,e._sentryDebugIdIdentifier=`sentry-dbid-7f85a6aa-a6bf-4dae-aa97-9cd1a19fd6b4`)}catch{}})();import{Cd as e,Jo as t,Ou as n,S as r,Un as i,bd as a,bs as o}from"./allocate-ui-CvW0g4YV.js";import{Y as s,h as c,y as l}from"./userStore-qM9Q9jE5.js";import{t as u}from"./routes-CfhYea9r.js";var d=`Retail`;function f(){return c.get(d)}function p(e){return i(`api`).get(`/Retail/${e}/BankingAccess`)}var m={root:[`banking-access`],byRetailProfileKey:e=>[...m.root,e]},h=m;function g(t){function n(){return[e(t)]}return r({key:()=>h.byRetailProfileKey(...n()),query:()=>p(...n()),enabled:()=>n().every(Boolean)})}function _(e){return e===`CustomSolution`?`ph:codesandbox-logo-light`:e===`Organization`?`ph:buildings`:e===`SharedWithYou`?`ph:users`:`ph:user-circle`}var v=t(`userProfilesStore`,()=>{let e=a([]),t=n(()=>e.value.map(e=>({displayUserAvatar:e.displayClass===`UserPersonal`,icon:_(e.displayClass),key:e.key,name:e.name,email:e.email??void 0,permissions:e.permissions,enabledProducts:e.enabledProducts,highestInvestorQualificationType:e.highestInvestorQualificationType,limitOfferingsToAllowListedVehicles:e.limitOfferingsToAllowListedVehicles,customSolutionId:e.customSolutionId??void 0,lpProfileIds:e.lpProfileIds,isCustomSolutionProfile:!!e.customSolutionId,isCustomSolutionReviewerProfile:e.isCustomSolutionReviewerProfile,isProviderProfile:e.isProviderProfile,isMigratedProviderProfile:e.isMigratedProviderProfile,isDelegateProfile:e.isDelegatedProfile,isSharedWithYouProfile:e.isSharedWithYouProfile}))),r=a([]);async function c(){let e=d.value?.lpProfileIds[0];if(!e)return;let t=await i(`venture`).get(`/LpVehicleVisibility/SelectedForYou/${e}`);r.value=t.map(e=>e.vehicleId)}let d=a(),p=n(()=>d.value?.key),m=n(()=>d.value?.isCustomSolutionProfile?d.value.customSolutionId:void 0),h=n(()=>!!d.value?.isSharedWithYouProfile),v=n(()=>!!d.value?.isDelegateProfile),y=n(()=>!!d.value&&!d.value.isSharedWithYouProfile&&!d.value.isProviderProfile&&!d.value.isDelegateProfile&&!d.value.enabledProducts.includes(`ProviderLite`)),b=n(()=>y.value&&!d.value?.isCustomSolutionReviewerProfile),x=n(()=>e=>d.value?.enabledProducts.includes(e)??!1),S=n(()=>x.value(`Origination`)),C=n(()=>x.value(`ExternalInvestments`)),w=n(()=>x.value(`ProviderLite`)),T=n(()=>x.value(`AddeparIntegration`)),E=g(()=>p.value),D=n(()=>E.data.value),O=n(()=>e=>d.value?.permissions.includes(e)??!1),k=n(()=>S.value&&!!m.value&&O.value(`AccessOrigination`)),A=n(()=>S.value&&!m.value&&O.value(`AccessOrigination`)),j=n(()=>S.value&&(O.value(`AccessOrigination`)||O.value(`AccessSubscriptions`))),M=n(()=>!h.value&&(S.value||C.value)&&O.value(`AccessPortfolio`)),N=n(()=>!h.value&&C.value&&O.value(`AccessPortfolio`)),P=n(()=>(S.value||C.value)&&O.value(`AccessDocuments`)),F=n(()=>!h.value&&P.value),I=n(()=>w.value&&O.value(`AccessProviderLite`)),L=n(()=>T.value),R=n(()=>k.value?{cta:`Go to Overview`,to:u.retail.customSolutionOverview()}:A.value?{cta:`View Offerings`,to:u.retail.offerings()}:M.value?{cta:`View Portfolio`,to:u.retail.portfolioLayout()}:j.value?{cta:`View Allocations`,to:u.retail.allocations()}:P.value?{cta:`View Documents`,to:u.retail.documents()}:I.value?{cta:`View Client Allocations`,to:u.retail.clientAllocations()}:{cta:`Home`,to:u.retail.home()});function z(e){localStorage.setItem(s.savedRetailContextKey,e.key),d.value=e}function B(e){let n=t.value?.find(t=>t.key===e);n&&z(n)}let V=o(`customSolutionId`,void 0,{mode:`replace`}),H=o(`ctx`);function U(){if(d.value)return;if(V.value){let e=t.value.find(e=>e.customSolutionId===V.value);if(V.value=void 0,e){H.value=void 0,z(e);return}}if(H.value){let e=t.value.find(e=>e.customSolutionId&&e.customSolutionId===H.value);if(e||=t.value.find(e=>H.value&&e.lpProfileIds.includes(H.value)),!e&&H.value===`shared`&&(e=t.value.find(e=>e.isSharedWithYouProfile)),H.value=void 0,e){z(e);return}}let e=localStorage.getItem(s.savedRetailContextKey),n=t.value.find(t=>t.key===e);if(n){z(n);return}t.value.length>0&&z(t.value[0])}let W=a(!1),G=a(!1),K=a(!1),q=a(null);async function J(){if(!(W.value||K.value)){q.value=null,G.value=!1,W.value=!0;try{let t=await f();e.value=t.profiles,await U(),K.value=!0}catch(e){l.error(e,`[userProfilesStore] Failed to initialize retail profile store (GET /Retail)`),q.value=e,G.value=!0}finally{W.value=!1}}}let Y=a();return{initialize:n(()=>async()=>(Y.value||=J(),await Y.value,p.value)),isInitializing:W,initializationFailed:G,lastInitError:q,profileOptions:t,currentProfile:d,currentProfileKey:p,customSolutionIdOfCurrentProfile:m,isSharedWithYouProfileSelected:h,currentProfileCanAccessBilling:y,currentProfileCanPayBilling:b,currentProfileHasEnabledProduct:x,currentProfileHasPermission:O,isCustomSolutionOverviewEnabled:k,isOfferingsEnabled:A,isAllocationsEnabled:j,isPortfolioEnabled:M,isDirectInvestmentsEnabled:N,isDocumentsEnabled:P,isDocumentsTrackerEnabled:F,isClientAllocationsEnabled:I,isAddeparIntegrationEnabled:L,isDelegatedProfileSelected:v,homeRouteForCurrentProfile:R,bankingAccess:D,switchProfile:B,loadSelectedForYouVehicleIds:c,selectedForYouVehicleIds:r}});export{v as t};
2//# sourceMappingURL=userProfilesStore-BXfNbUDb.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.