varminer-app-header 2.2.9 → 2.3.5

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/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # varminer-app-header-npm-fe
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://gitlab.medgenome.com/mgm-linc/varminer-app-header-npm-fe.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](https://gitlab.medgenome.com/mgm-linc/varminer-app-header-npm-fe/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -1 +1 @@
1
- {"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../src/AppHeader.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAe,MAAM,SAAS,CAAC;AAKtD,OAAO,sBAAsB,CAAC;AAQ9B,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAszBvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../src/AppHeader.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAe,MAAM,SAAS,CAAC;AAItD,OAAO,sBAAsB,CAAC;AAQ9B,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA6zBvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .MuiToolbar-root{background-color:#fff!important;color:#1e2f97!important;height:65px!important;min-height:65px!important;padding-left:15px!important}.MuiToolbar-root .MuiButtonBase-root{color:#1e2f97!important;margin-right:0}.app-header,.app-header .MuiAppBar-root{background-color:#fff!important;box-shadow:none!important;height:65px!important;left:0;position:fixed!important;right:0;top:0;z-index:200!important}.app-header .MuiPaper-root:only-of-type{border-bottom:1px solid #e5e9eb;box-shadow:none!important;padding:0!important}.var{color:#1aa7ee!important}.miner,.var{font:500 20px OpenSans-SemiBold,Roboto,sans-serif}.miner{color:#0f1e75!important}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-name{color:#1e2f97;font:600 16px/28px OpenSans-SemiBold,Roboto,sans-serif}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-email{color:rgba(0,0,0,.6);font:400 14px/24px OpenSans-Regular,Roboto,sans-serif;text-decoration:underline}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-role{color:rgba(0,0,0,.38);font:400 12px/28px OpenSans-Regular,Roboto,sans-serif;text-transform:uppercase}#account-menu:has(.profile-menu-item) .profile-menu-item{padding:10px 15px 5px}#account-menu:has(.profile-menu-item) .MuiMenu-paper{background:linear-gradient(180deg,#fff,#ddf7ff,#ddf7ff);box-shadow:none!important;color:#000;margin:0;max-width:280px;width:280px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiListItemAvatar-root{min-width:40px;padding:10px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiListItemAvatar-root .MuiAvatar-circular{height:40px;margin-left:-10px;margin-right:0;width:40px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiMenuItem-root:first-of-type{margin-top:10px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiMenuItem-root .MuiListItemIcon-root .MuiSvgIcon-root{color:#1e2f97}
1
+ .MuiToolbar-root{background-color:var(--color-header-bg,#fff)!important;color:var(--color-brand-primary,#1e2f97)!important;height:var(--size-header-height,65px)!important;min-height:var(--size-header-height,65px)!important;padding-left:15px!important}.MuiToolbar-root .MuiButtonBase-root{color:var(--color-brand-primary,#1e2f97)!important;margin-right:0}.app-header,.app-header .MuiAppBar-root{background-color:var(--color-header-bg,#fff)!important;box-shadow:none!important;height:var(--size-header-height,65px)!important;left:0;position:fixed!important;right:0;top:0;z-index:var(--size-header-zindex,200)!important}.app-header .MuiPaper-root:only-of-type{border-bottom:1px solid var(--color-border-header,#e5e9eb);box-shadow:none!important;padding:0!important}.var{color:var(--color-brand-accent,#1aa7ee)!important}.miner,.var{font:500 20px var(--font-brand-semibold,OpenSans-SemiBold,Roboto,sans-serif)}.miner{color:var(--color-brand-deep-navy,#0f1e75)!important}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-name{color:var(--color-profile-name,#1e2f97);font:600 16px/28px var(--font-brand-semibold,OpenSans-SemiBold,Roboto,sans-serif)}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-email{color:var(--color-profile-email,rgba(0,0,0,.6));font:400 14px/24px var(--font-brand-regular,OpenSans-Regular,Roboto,sans-serif);text-decoration:underline}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-role{color:var(--color-profile-role,rgba(0,0,0,.38));font:400 12px/28px var(--font-brand-regular,OpenSans-Regular,Roboto,sans-serif);text-transform:uppercase}#account-menu:has(.profile-menu-item) .profile-menu-item{padding:10px 15px 5px}#account-menu:has(.profile-menu-item) .MuiMenu-paper{background:var(--color-menu-bg-gradient,linear-gradient(180deg,#fff,#ddf7ff,#ddf7ff));box-shadow:none!important;color:var(--color-menu-text,#000);margin:0;max-width:var(--size-menu-width,280px);width:var(--size-menu-width,280px)}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiListItemAvatar-root{min-width:40px;padding:10px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiListItemAvatar-root .MuiAvatar-circular{height:40px;margin-left:-10px;margin-right:0;width:40px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiMenuItem-root:first-of-type{margin-top:10px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiMenuItem-root .MuiListItemIcon-root .MuiSvgIcon-root{color:var(--color-brand-primary,#1e2f97)}
package/dist/index.d.ts CHANGED
@@ -13,6 +13,8 @@ interface AppHeaderProps {
13
13
  language?: 'en' | 'es';
14
14
  /** When provided, used as Bearer token for profile picture and other authenticated requests. */
15
15
  accessToken?: string | null;
16
+ /** Base URL for the object store API (e.g. profile picture). When provided, profile picture is fetched from {objectStoreUrl}/v1/objectStore/profilePicture/path/{userId}. Omit or leave empty to disable profile picture fetch. */
17
+ objectStoreUrl?: string | null;
16
18
  }
17
19
 
18
20
  declare const AppHeader: React__default.FC<AppHeaderProps>;
@@ -115,13 +117,13 @@ declare const setI18nLocaleToStorage: (locale: string) => void;
115
117
  * @returns Object with auth, decodedToken, and other keys (user/userDetails/profile null when using header key)
116
118
  */
117
119
  declare const getAllDataFromStorage: () => any;
118
- declare const getProfilePictureUrl: (baseUrl?: string) => string | null;
120
+ declare const getProfilePictureUrl: (baseUrl?: string | null) => string | null;
119
121
  /**
120
122
  * Get access token from all known storage keys (header, IAM, userdb, and plain keys).
121
123
  * persist:userdb shape: authDetails (stringified) contains auth.accessToken.
122
124
  */
123
125
  declare function getAccessTokenForRequest(): string | undefined;
124
- declare const fetchProfilePictureAsBlobUrl: (baseUrl?: string, accessTokenOverride?: string | null) => Promise<string | null>;
126
+ declare const fetchProfilePictureAsBlobUrl: (baseUrl?: string | null, accessTokenOverride?: string | null) => Promise<string | null>;
125
127
 
126
128
  export { AppHeader, DrawerProvider, PERSIST_HEADER_KEY, USER_DETAILS_STORAGE_KEY, fetchProfilePictureAsBlobUrl, getAccessTokenForRequest, getAllDataFromStorage, getI18nLocaleFromStorage, getMessageCountFromStorage, getNotificationCountFromStorage, getProfilePictureUrl, getStoredUserDetails, getTranslations, getUserDataFromStorage, setHeaderAuth, setI18nLocaleToStorage, translations, useDrawer };
127
129
  export type { AppHeaderProps, HeaderAuthState, SupportedLanguage, Translations, UserDetailsItem, UserDetailsStoredResponse, UserProfile };
@@ -1 +1 @@
1
- .MuiToolbar-root{background-color:#fff!important;color:#1e2f97!important;height:65px!important;min-height:65px!important;padding-left:15px!important}.MuiToolbar-root .MuiButtonBase-root{color:#1e2f97!important;margin-right:0}.app-header,.app-header .MuiAppBar-root{background-color:#fff!important;box-shadow:none!important;height:65px!important;left:0;position:fixed!important;right:0;top:0;z-index:200!important}.app-header .MuiPaper-root:only-of-type{border-bottom:1px solid #e5e9eb;box-shadow:none!important;padding:0!important}.var{color:#1aa7ee!important}.miner,.var{font:500 20px OpenSans-SemiBold,Roboto,sans-serif}.miner{color:#0f1e75!important}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-name{color:#1e2f97;font:600 16px/28px OpenSans-SemiBold,Roboto,sans-serif}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-email{color:rgba(0,0,0,.6);font:400 14px/24px OpenSans-Regular,Roboto,sans-serif;text-decoration:underline}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-role{color:rgba(0,0,0,.38);font:400 12px/28px OpenSans-Regular,Roboto,sans-serif;text-transform:uppercase}#account-menu:has(.profile-menu-item) .profile-menu-item{padding:10px 15px 5px}#account-menu:has(.profile-menu-item) .MuiMenu-paper{background:linear-gradient(180deg,#fff,#ddf7ff,#ddf7ff);box-shadow:none!important;color:#000;margin:0;max-width:280px;width:280px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiListItemAvatar-root{min-width:40px;padding:10px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiListItemAvatar-root .MuiAvatar-circular{height:40px;margin-left:-10px;margin-right:0;width:40px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiMenuItem-root:first-of-type{margin-top:10px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiMenuItem-root .MuiListItemIcon-root .MuiSvgIcon-root{color:#1e2f97}
1
+ .MuiToolbar-root{background-color:var(--color-header-bg,#fff)!important;color:var(--color-brand-primary,#1e2f97)!important;height:var(--size-header-height,65px)!important;min-height:var(--size-header-height,65px)!important;padding-left:15px!important}.MuiToolbar-root .MuiButtonBase-root{color:var(--color-brand-primary,#1e2f97)!important;margin-right:0}.app-header,.app-header .MuiAppBar-root{background-color:var(--color-header-bg,#fff)!important;box-shadow:none!important;height:var(--size-header-height,65px)!important;left:0;position:fixed!important;right:0;top:0;z-index:var(--size-header-zindex,200)!important}.app-header .MuiPaper-root:only-of-type{border-bottom:1px solid var(--color-border-header,#e5e9eb);box-shadow:none!important;padding:0!important}.var{color:var(--color-brand-accent,#1aa7ee)!important}.miner,.var{font:500 20px var(--font-brand-semibold,OpenSans-SemiBold,Roboto,sans-serif)}.miner{color:var(--color-brand-deep-navy,#0f1e75)!important}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-name{color:var(--color-profile-name,#1e2f97);font:600 16px/28px var(--font-brand-semibold,OpenSans-SemiBold,Roboto,sans-serif)}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-email{color:var(--color-profile-email,rgba(0,0,0,.6));font:400 14px/24px var(--font-brand-regular,OpenSans-Regular,Roboto,sans-serif);text-decoration:underline}#account-menu:has(.profile-menu-section) .MuiList-root .MuiListItem-root .MuiListItemText-root .MuiTypography-root.profile-role{color:var(--color-profile-role,rgba(0,0,0,.38));font:400 12px/28px var(--font-brand-regular,OpenSans-Regular,Roboto,sans-serif);text-transform:uppercase}#account-menu:has(.profile-menu-item) .profile-menu-item{padding:10px 15px 5px}#account-menu:has(.profile-menu-item) .MuiMenu-paper{background:var(--color-menu-bg-gradient,linear-gradient(180deg,#fff,#ddf7ff,#ddf7ff));box-shadow:none!important;color:var(--color-menu-text,#000);margin:0;max-width:var(--size-menu-width,280px);width:var(--size-menu-width,280px)}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiListItemAvatar-root{min-width:40px;padding:10px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiListItemAvatar-root .MuiAvatar-circular{height:40px;margin-left:-10px;margin-right:0;width:40px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiMenuItem-root:first-of-type{margin-top:10px}#account-menu:has(.profile-menu-item) .MuiMenu-paper .MuiMenuItem-root .MuiListItemIcon-root .MuiSvgIcon-root{color:var(--color-brand-primary,#1e2f97)}
package/dist/index.esm.js CHANGED
@@ -370,17 +370,20 @@ const getAllDataFromStorage = () => {
370
370
  };
371
371
  /**
372
372
  * Get profile picture URL from object store API using user_id.
373
- * @param baseUrl - Base URL for the object store API (default: http://objectstore.impact0mics.local:9012)
374
- * @returns Profile picture URL or null if user_id is not available
373
+ * @param baseUrl - Base URL for the object store API (e.g. from objectStoreUrl prop). When missing or empty, returns null.
374
+ * @returns Profile picture URL or null if user_id or baseUrl is not available
375
375
  */
376
376
  const VERIFICATION_USER_ID = 4590; // set to null to use only storage userId
377
- const getProfilePictureUrl = (baseUrl = "http://objectstore.impact0mics.local:9012") => {
377
+ const getProfilePictureUrl = (baseUrl) => {
378
378
  try {
379
+ const url = typeof baseUrl === "string" && baseUrl.trim() ? baseUrl.trim() : null;
380
+ if (!url)
381
+ return null;
379
382
  const allData = getAllDataFromStorage();
380
383
  const userId = allData.decodedToken?.user_id ?? allData.auth?.user_id ?? getStoredUserDetails()?.userId ?? VERIFICATION_USER_ID ?? null;
381
384
  if (userId == null)
382
385
  return null;
383
- return `${baseUrl.replace(/\/$/, "")}/v1/objectStore/profilePicture/path/${userId}`;
386
+ return `${url.replace(/\/$/, "")}/v1/objectStore/profilePicture/path/${userId}`;
384
387
  }
385
388
  catch (err) {
386
389
  console.error("Error getting profile picture URL:", err);
@@ -395,8 +398,8 @@ function getKeyFromS3Uri(s3Uri) {
395
398
  /**
396
399
  * Fetch profile picture: (1) GET path API for JSON with filePath/s3Uri, (2) GET download API with key; download returns JSON with base64 fileContent.
397
400
  * Path API: { statusResponse, filePath, s3Uri, errors }. Download API: { statusResponse, fileName, contentType, fileContent (base64), errors }.
398
- * @param baseUrl - Base URL for the object store API (default: http://objectstore.impact0mics.local:9012)
399
- * @returns Promise that resolves to blob URL string or null if fetch fails
401
+ * @param baseUrl - Base URL for the object store API (e.g. from objectStoreUrl prop). When missing or empty, returns null without fetching.
402
+ * @returns Promise that resolves to blob URL string or null if fetch fails or baseUrl not provided
400
403
  */
401
404
  /** Resolve access token from auth object (supports accessToken, access_token, token). */
402
405
  function getAccessTokenFromAuth(auth) {
@@ -522,11 +525,14 @@ function getAccessTokenForRequest() {
522
525
  }
523
526
  return getAccessTokenFromAuth(getAllDataFromStorage().auth);
524
527
  }
525
- const fetchProfilePictureAsBlobUrl = async (baseUrl = "http://objectstore.impact0mics.local:9012", accessTokenOverride) => {
528
+ const fetchProfilePictureAsBlobUrl = async (baseUrl, accessTokenOverride) => {
526
529
  try {
527
530
  const profilePicturePathUrl = getProfilePictureUrl(baseUrl);
528
531
  if (!profilePicturePathUrl)
529
532
  return null;
533
+ const cleanBase = typeof baseUrl === "string" && baseUrl.trim() ? baseUrl.trim().replace(/\/$/, "") : "";
534
+ if (!cleanBase)
535
+ return null;
530
536
  const accessToken = (typeof accessTokenOverride === "string" && accessTokenOverride.length > 0
531
537
  ? accessTokenOverride
532
538
  : null) ?? getAccessTokenForRequest();
@@ -566,7 +572,6 @@ const fetchProfilePictureAsBlobUrl = async (baseUrl = "http://objectstore.impact
566
572
  return null;
567
573
  }
568
574
  // Step 2: GET download API → JSON with fileContent (base64) and contentType
569
- const cleanBase = baseUrl.replace(/\/$/, "");
570
575
  const downloadUrl = `${cleanBase}/v1/objectStore/download?key=${encodeURIComponent(downloadKey)}`;
571
576
  const imageResponse = await fetch(downloadUrl, { method: "GET", headers });
572
577
  if (!imageResponse.ok) {
@@ -629,8 +634,6 @@ const getTranslations = (language = 'en') => {
629
634
  return translations[language] || translations.en;
630
635
  };
631
636
 
632
- var ImpactomicsLogo = "data:image/svg+xml,%3Csvg%20width%3D%22134%22%20height%3D%2223%22%20viewBox%3D%220%200%20134%2023%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M0%2016.9641V0H2.29277V16.9641H0Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M19.7586%204.39182C20.6034%204.36006%2021.361%204.53721%2022.0278%204.92659C22.3033%205.0887%2022.5771%205.30261%2022.8458%205.57C23.1146%205.83738%2023.3531%206.17663%2023.5647%206.58941C23.7764%207.00219%2023.946%207.49519%2024.077%208.07007C24.2064%208.64495%2024.2719%209.32011%2024.2719%2010.0972V16.9891H22.0765V10.6788C22.0765%209.95014%2021.9909%209.3151%2021.8195%208.77364C21.6482%208.23217%2021.4214%207.77929%2021.1359%207.41497C20.8504%207.05065%2020.5262%206.77992%2020.16%206.60111C19.7938%206.42396%2019.4243%206.33372%2019.0497%206.33372C18.6752%206.33372%2018.2821%206.42229%2017.9159%206.60111C17.5498%206.77992%2017.2205%207.05065%2016.9283%207.41497C16.636%207.77929%2016.3992%208.23217%2016.2211%208.77364C16.0414%209.31677%2015.9524%209.95014%2015.9524%2010.6788V16.9891H13.757V10.6788C13.757%209.95014%2013.6714%209.3151%2013.5017%208.77364C13.3304%208.23217%2013.1036%207.77929%2012.8181%207.41497C12.5342%207.05065%2012.2084%206.77992%2011.8422%206.60111C11.476%206.42396%2011.1065%206.33372%2010.7319%206.33372C10.3573%206.33372%209.9643%206.42229%209.59813%206.60111C9.23196%206.77992%208.90274%207.05065%208.61047%207.41497C8.3182%207.77929%208.08137%208.23217%207.90332%208.77364C7.72359%209.31677%207.63457%209.95014%207.63457%2010.6788V16.9891H5.3418V4.58734H7.63457V6.74817C7.97555%206.13318%208.36692%205.66859%208.80531%205.35274C9.24371%205.03689%209.6586%204.80627%2010.05%204.66088C10.5052%204.49877%2010.9688%204.4102%2011.4407%204.39349C12.027%204.36174%2012.588%204.45031%2013.1238%204.66088C13.5958%204.83969%2014.0627%205.13883%2014.5263%205.5583C14.9899%205.97943%2015.3511%206.62618%2015.6114%207.5002C15.9205%206.69135%2016.3102%206.07636%2016.7821%205.65522C17.2541%205.23409%2017.7093%204.92659%2018.1477%204.73274C18.6684%204.52217%2019.2043%204.40853%2019.7586%204.39349V4.39182Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M32.9558%204.39185C34.0291%204.44031%2034.9882%204.69934%2035.8348%205.16894C36.1926%205.3628%2036.5453%205.61013%2036.8964%205.90927C37.2457%206.20841%2037.5548%206.58108%2037.8236%207.02561C38.0923%207.47015%2038.3073%207.99323%2038.4702%208.59151C38.6332%209.18979%2038.7138%209.88666%2038.7138%2010.6788V10.8727C38.7138%2011.6665%2038.6315%2012.365%2038.4702%2012.9717C38.3073%2013.5783%2038.0923%2014.1047%2037.8236%2014.5492C37.5548%2014.9938%2037.2457%2015.3664%2036.8964%2015.6656C36.547%2015.9647%2036.1926%2016.2121%2035.8348%2016.4059C34.9882%2016.8588%2034.0291%2017.1095%2032.9558%2017.1579C32.5174%2017.1412%2032.0773%2017.061%2031.6389%2016.9156C31.2644%2016.7869%2030.8663%2016.5797%2030.443%2016.2973C30.0197%2016.0149%2029.63%2015.6138%2029.2723%2015.0957V22.8132H26.9795V4.5857H29.2723V6.47914C29.63%205.94604%2030.0197%205.5366%2030.443%205.25417C30.8663%204.97174%2031.2644%204.76452%2031.6389%204.63584C32.0773%204.49044%2032.5174%204.41023%2032.9558%204.39352V4.39185ZM36.4932%2010.6788C36.4932%209.95017%2036.3908%209.31512%2036.1875%208.77366C35.9843%208.2322%2035.7155%207.77931%2035.383%207.415C35.0487%207.05068%2034.6674%206.77995%2034.2357%206.60114C33.8041%206.42399%2033.3606%206.33375%2032.9071%206.33375C32.4536%206.33375%2032.0085%206.42232%2031.5768%206.60114C31.1451%206.77995%2030.7588%207.05068%2030.4178%207.415C30.0768%207.77931%2029.7997%208.2322%2029.588%208.77366C29.3764%209.3168%2029.2706%209.95017%2029.2706%2010.6788V10.8727C29.2706%2011.6013%2029.3764%2012.2363%2029.588%2012.7778C29.7997%2013.3209%2030.0752%2013.7738%2030.4178%2014.1365C30.7588%2014.5008%2031.1451%2014.7715%2031.5768%2014.9503C32.0068%2015.1291%2032.4502%2015.2177%2032.9071%2015.2177C33.364%2015.2177%2033.8057%2015.1291%2034.2357%2014.9503C34.6657%2014.7732%2035.0487%2014.5008%2035.383%2014.1365C35.7155%2013.7721%2035.9843%2013.3193%2036.1875%2012.7778C36.3908%2012.2363%2036.4932%2011.6013%2036.4932%2010.8727V10.6788Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M41.0529%205.99458C41.3301%205.8659%2041.6795%205.70714%2042.1011%205.52164C42.5243%205.33614%2042.9913%205.16234%2043.5036%205.00023C44.0159%204.83813%2044.5568%204.70109%2045.1262%204.58745C45.6956%204.47381%2046.2482%204.41699%2046.7857%204.41699C47.3232%204.41699%2047.8338%204.48551%2048.3226%204.62255C48.8097%204.75958%2049.238%204.99856%2049.6025%205.33781C49.9687%205.67706%2050.2576%206.13162%2050.4693%206.69647C50.6809%207.263%2050.7867%207.97492%2050.7867%208.83223V16.9876H48.6149V14.8769C48.4839%2015.2161%2048.2689%2015.5286%2047.9682%2015.8111C47.6675%2016.0935%2047.3215%2016.3375%2046.9318%2016.5397C46.5422%2016.7419%2046.1138%2016.8956%2045.6502%2017.0009C45.1866%2017.1062%2044.7197%2017.158%2044.2477%2017.158C43.7757%2017.158%2043.292%2017.0928%2042.8452%2016.9642C42.3984%2016.8355%2042.0003%2016.6333%2041.6492%2016.3575C41.2998%2016.0835%2041.0193%2015.7308%2040.8077%2015.3013C40.5961%2014.8735%2040.4902%2014.3505%2040.4902%2013.7355C40.4902%2012.9266%2040.6851%2012.223%2041.0764%2011.6248C41.4661%2011.0265%2042.0154%2010.5201%2042.7225%2010.1073C43.4297%209.69456%2044.2847%209.38372%2045.2841%209.17315C46.2835%208.96258%2047.3937%208.8573%2048.6132%208.8573V8.83223C48.6132%208.36263%2048.5561%207.96991%2048.4419%207.65573C48.3277%207.33987%2048.1647%207.08586%2047.9548%206.892C47.7431%206.69814%2047.5029%206.56111%2047.2359%206.47922C46.9671%206.39901%2046.6715%206.35722%2046.3456%206.35722C45.9072%206.35722%2045.4504%206.41739%2044.98%206.53938C44.508%206.66138%2044.0646%206.80176%2043.6497%206.96386C43.2348%207.12596%2042.8653%207.28306%2042.5395%207.4368C42.2136%207.59055%2041.9784%207.69918%2041.8323%207.76435L41.0512%205.99291L41.0529%205.99458ZM48.6149%2010.7507C48.0287%2010.7507%2047.3904%2010.7875%2046.7%2010.8594C46.008%2010.9329%2045.363%2011.0733%2044.76%2011.2838C44.1587%2011.4944%2043.6581%2011.7936%2043.26%2012.1813C42.862%2012.569%2042.6621%2013.0787%2042.6621%2013.7104C42.6621%2014.2769%2042.8821%2014.7014%2043.3205%2014.9855C43.7589%2015.2679%2044.2796%2015.41%2044.8826%2015.41C45.3059%2015.41%2045.7359%2015.3381%2046.176%2015.191C46.6144%2015.0457%2047.0175%2014.8234%2047.3837%2014.5243C47.7498%2014.2251%2048.0455%2013.8524%2048.2739%2013.4079C48.5007%2012.9634%2048.6149%2012.442%2048.6149%2011.842V10.7507Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M55.1523%2010.7991C55.1523%2011.5595%2055.2665%2012.228%2055.4933%2012.8012C55.72%2013.3761%2056.0207%2013.8523%2056.3953%2014.2334C56.7698%2014.6144%2057.1998%2014.9002%2057.6886%2015.0957C58.1757%2015.2895%2058.6796%2015.3865%2059.2004%2015.3865C59.8185%2015.3865%2060.44%2015.2528%2061.0665%2014.9854C61.693%2014.718%2062.2574%2014.3019%2062.7613%2013.7354L63.9085%2014.9971C63.3391%2015.7257%2062.6286%2016.2722%2061.7736%2016.6348C60.9204%2016.9992%2060.0301%2017.1813%2059.1029%2017.1813C58.3387%2017.1813%2057.5912%2017.051%2056.8589%2016.7936C56.1265%2016.5346%2055.4714%2016.1469%2054.8953%2015.6288C54.3175%2015.1107%2053.8539%2014.4473%2053.5045%2013.6384C53.1552%2012.8296%2052.9805%2011.8837%2052.9805%2010.7991C52.9805%209.71451%2053.1552%208.74857%2053.5045%207.94808C53.8539%207.14759%2054.3175%206.48413%2054.8953%205.95771C55.4731%205.43129%2056.1265%205.04024%2056.8589%204.78121C57.5912%204.52218%2058.3387%204.39349%2059.1029%204.39349C60.0301%204.39349%2060.9204%204.57565%2061.7736%204.93997C62.6269%205.30428%2063.3391%205.85076%2063.9085%206.57772L62.7613%207.83946C62.2574%207.27293%2061.6913%206.8568%2061.0665%206.58942C60.44%206.32203%2059.8185%206.18834%2059.2004%206.18834C58.6796%206.18834%2058.1757%206.28526%2057.6886%206.47912C57.2015%206.67298%2056.7698%206.96376%2056.3953%207.35314C56.0207%207.74086%2055.72%208.22383%2055.4933%208.79704C55.2648%209.37192%2055.1523%2010.0387%2055.1523%2010.7991Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M71.9846%2015.2662L72.1559%2016.8672C71.6352%2016.949%2071.1632%2017.0126%2070.7416%2017.061C70.3184%2017.1095%2069.9438%2017.1345%2069.6196%2017.1345C69.067%2017.1345%2068.6152%2017.066%2068.2658%2016.929C67.9164%2016.792%2067.6443%2016.5814%2067.4495%2016.2973C67.2546%2016.0149%2067.1202%2015.6505%2067.0463%2015.2043C66.9724%2014.7598%2066.9288%2014.2217%2066.912%2013.59V6.35715H64.9854V4.5857H66.912V2.6438H69.2047V4.5857H72.1324V6.35715H69.2047V13.59C69.2047%2013.9459%2069.2165%2014.2334%2069.2417%2014.4523C69.2669%2014.6712%2069.3677%2014.84%2069.5474%2014.962C69.7254%2015.084%2070.0059%2015.1642%2070.3889%2015.2043C70.7702%2015.2444%2071.3043%2015.2645%2071.9863%2015.2645L71.9846%2015.2662Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M100.591%204.39163C101.435%204.35988%20102.193%204.53703%20102.86%204.92641C103.135%205.08851%20103.409%205.30242%20103.678%205.56981C103.947%205.8372%20104.185%206.17645%20104.397%206.58923C104.608%207.00201%20104.778%207.495%20104.909%208.06989C105.038%208.64477%20105.104%209.31993%20105.104%2010.097V16.9889H102.909V10.6786C102.909%209.94996%20102.823%209.31491%20102.652%208.77345C102.48%208.23199%20102.253%207.7791%20101.968%207.41479C101.682%207.05047%20101.358%206.77974%20100.992%206.60093C100.626%206.42378%20100.256%206.33354%2099.8818%206.33354C99.5072%206.33354%2099.1142%206.42211%2098.748%206.60093C98.3818%206.77974%2098.0526%207.05047%2097.7603%207.41479C97.4681%207.7791%2097.2312%208.23199%2097.0532%208.77345C96.8734%209.31658%2096.7844%209.94996%2096.7844%2010.6786V16.9889H94.5891V10.6786C94.5891%209.94996%2094.5034%209.31491%2094.3338%208.77345C94.1624%208.23199%2093.9357%207.7791%2093.6501%207.41479C93.3663%207.05047%2093.0404%206.77974%2092.6742%206.60093C92.308%206.42378%2091.9385%206.33354%2091.564%206.33354C91.1894%206.33354%2090.7963%206.42211%2090.4302%206.60093C90.064%206.77974%2089.7348%207.05047%2089.4425%207.41479C89.1502%207.7791%2088.9134%208.23199%2088.7354%208.77345C88.5556%209.31658%2088.4666%209.94996%2088.4666%2010.6786V16.9889H86.1738V4.58716H88.4666V6.74799C88.8076%206.133%2089.199%205.66841%2089.6374%205.35256C90.0758%205.03671%2090.4906%204.80609%2090.882%204.66069C91.3372%204.49859%2091.8008%204.41002%2092.2728%204.3933C92.859%204.36155%2093.42%204.45013%2093.9558%204.66069C94.4278%204.83951%2094.8948%205.13865%2095.3584%205.55811C95.822%205.97925%2096.1831%206.62599%2096.4434%207.50002C96.7525%206.69117%2097.1422%206.07618%2097.6142%205.65504C98.0862%205.23391%2098.5414%204.92641%2098.9798%204.73255C99.5005%204.52199%20100.036%204.40834%20100.591%204.3933V4.39163Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M108.933%203.34883C108.559%203.34883%20108.241%203.22015%20107.982%202.96112C107.722%202.70209%20107.593%202.38624%20107.593%202.01524C107.593%201.64424%20107.722%201.32838%20107.982%201.06935C108.243%200.810321%20108.56%200.681641%20108.933%200.681641C109.306%200.681641%20109.629%200.811992%20109.897%201.06935C110.166%201.32838%20110.3%201.64424%20110.3%202.01524C110.3%202.38624%20110.166%202.70376%20109.897%202.96112C109.629%203.22015%20109.308%203.34883%20108.933%203.34883ZM107.786%2016.989V4.58717H110.104V16.989H107.786Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M114.569%2010.7989C114.569%2011.5593%20114.684%2012.2278%20114.91%2012.801C115.137%2013.3759%20115.438%2013.8522%20115.812%2014.2332C116.187%2014.6142%20116.617%2014.9%20117.106%2015.0955C117.593%2015.2894%20118.097%2015.3863%20118.617%2015.3863C119.235%2015.3863%20119.857%2015.2526%20120.483%2014.9852C121.11%2014.7178%20121.674%2014.3017%20122.178%2013.7352L123.326%2014.9969C122.756%2015.7255%20122.046%2016.272%20121.191%2016.6347C120.337%2016.999%20119.447%2017.1811%20118.52%2017.1811C117.756%2017.1811%20117.008%2017.0508%20116.276%2016.7934C115.544%2016.5344%20114.888%2016.1467%20114.312%2015.6286C113.734%2015.1106%20113.271%2014.4471%20112.922%2013.6382C112.572%2012.8294%20112.397%2011.8835%20112.397%2010.7989C112.397%209.71433%20112.572%208.74839%20112.922%207.9479C113.271%207.14741%20113.734%206.48395%20114.312%205.95753C114.89%205.43111%20115.544%205.04006%20116.276%204.78102C117.008%204.52199%20117.756%204.39331%20118.52%204.39331C119.447%204.39331%20120.337%204.57547%20121.191%204.93979C122.044%205.3041%20122.756%205.85058%20123.326%206.57754L122.178%207.83927C121.674%207.27274%20121.108%206.85662%20120.483%206.58923C119.857%206.32185%20119.235%206.18815%20118.617%206.18815C118.097%206.18815%20117.593%206.28508%20117.106%206.47894C116.619%206.67279%20116.187%206.96358%20115.812%207.35296C115.438%207.74067%20115.137%208.22364%20114.91%208.79685C114.682%209.37174%20114.569%2010.0385%20114.569%2010.7989Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M127.764%207.62027C127.764%207.94447%20127.914%208.21855%20128.216%208.44583C128.517%208.67311%20128.895%208.89036%20129.35%209.10093C129.805%209.31149%20130.3%209.53376%20130.838%209.76773C131.374%2010.0017%20131.871%2010.2858%20132.326%2010.6167C132.781%2010.9492%20133.159%2011.3537%20133.46%2011.83C133.761%2012.3079%20133.912%2012.8861%20133.912%2013.5646C133.912%2014.1796%20133.789%2014.7177%20133.546%2015.179C133.302%2015.6402%20132.98%2016.0213%20132.581%2016.3204C132.183%2016.6195%20131.72%2016.8468%20131.191%2017.0006C130.662%2017.1543%20130.114%2017.2312%20129.545%2017.2312C128.586%2017.2312%20127.653%2017.0206%20126.751%2016.5995C125.849%2016.1783%20125.146%2015.54%20124.642%2014.6826L125.958%2013.202C126.414%2013.9306%20126.943%2014.4604%20127.544%2014.7913C128.145%2015.1238%20128.732%2015.2893%20129.301%2015.2893C129.87%2015.2893%20130.358%2015.1355%20130.764%2014.828C131.171%2014.5205%20131.374%2014.0994%20131.374%2013.5663C131.374%2013.0967%20131.223%2012.7257%20130.922%2012.45C130.621%2012.1742%20130.252%2011.9369%20129.812%2011.7347C129.373%2011.5325%20128.888%2011.3386%20128.36%2011.1515C127.831%2010.966%20127.348%2010.7303%20126.909%2010.4479C126.471%2010.1655%20126.1%209.80115%20125.799%209.35495C125.498%208.91041%20125.347%208.32383%20125.347%207.5952C125.347%207.06042%20125.456%206.5925%20125.676%206.18807C125.896%205.78365%20126.189%205.44774%20126.555%205.18035C126.921%204.91297%20127.339%204.71075%20127.811%204.57372C128.283%204.43668%20128.77%204.36816%20129.274%204.36816C130.007%204.36816%20130.717%204.50186%20131.409%204.76924C132.099%205.03663%20132.665%205.4444%20133.104%205.99422L131.811%207.32948C131.404%206.8766%20130.989%206.5457%20130.566%206.33514C130.143%206.12457%20129.744%206.01928%20129.37%206.01928C128.898%206.01928%20128.512%206.16133%20128.211%206.44376C127.91%206.72786%20127.759%207.11891%20127.759%207.62027H127.764Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M82.2257%2016.5045C82.7489%2016.5045%2083.173%2016.0825%2083.173%2015.5619C83.173%2015.0414%2082.7489%2014.6194%2082.2257%2014.6194C81.7025%2014.6194%2081.2783%2015.0414%2081.2783%2015.5619C81.2783%2016.0825%2081.7025%2016.5045%2082.2257%2016.5045Z%22%20fill%3D%22%235BC0BE%22%2F%3E%3Cpath%20d%3D%22M83.3365%207.03215C82.799%206.22831%2082.4748%205.97596%2082.4379%205.94421C82.4076%205.97763%2081.86%206.56923%2081.3964%207.65716C81.64%207.98304%2081.7509%208.27215%2081.9071%208.71502C82.1019%209.2665%2082.201%209.91325%2082.201%2010.6402C82.201%2011.414%2082.0986%2012.0975%2081.8953%2012.6724C81.6904%2013.2489%2081.4216%2013.7336%2081.0958%2014.1146C80.7682%2014.4973%2080.3886%2014.7914%2079.9704%2014.9869C79.1322%2015.3797%2078.2067%2015.3797%2077.3686%2014.9869C76.9503%2014.7914%2076.5673%2014.4973%2076.2331%2014.1146C75.8971%2013.7319%2075.6284%2013.2472%2075.4336%2012.6707C75.2387%2012.0975%2075.1396%2011.4223%2075.1396%2010.6636C75.1396%209.90489%2075.2421%209.28823%2075.447%208.73841C75.6502%208.18692%2075.919%207.72234%2076.2465%207.35635C76.5741%206.98869%2076.957%206.70794%2077.3837%206.52077C77.8086%206.33359%2078.2554%206.24001%2078.7022%206.24001C79.149%206.24001%2079.5757%206.32858%2079.9922%206.5074C80.2492%206.61769%2080.3668%206.70125%2080.5919%206.88341C80.9396%206.36702%2081.2016%205.79715%2081.3696%205.18048C81.3528%205.17046%2081.336%205.16043%2081.3175%205.1504C80.5146%204.71088%2079.71%204.53207%2078.6888%204.48193H78.6703H78.6518C77.6306%204.53207%2076.7051%204.7794%2075.9022%205.21725C75.5528%205.40776%2075.2118%205.65008%2074.8877%205.94087C74.5652%206.23165%2074.2679%206.59764%2074.0075%207.03047C73.7455%207.46331%2073.5338%207.98304%2073.3743%208.57464C73.2164%209.16623%2073.1357%209.85977%2073.1357%2010.6369C73.1357%2011.414%2073.2164%2012.1359%2073.3743%2012.7342C73.5322%2013.3341%2073.7455%2013.8622%2074.0075%2014.3034C74.2695%2014.7446%2074.5652%2015.124%2074.8893%2015.4298C75.2135%2015.7373%2075.5562%2015.998%2075.9089%2016.2052C76.7051%2016.6548%2077.6256%2016.9171%2078.6451%2016.984H78.6703H78.6955C79.6748%2016.9205%2080.5633%2016.6731%2081.3444%2016.2503C81.0303%2015.8091%2081.0706%2015.1942%2081.467%2014.7998C81.897%2014.3719%2082.584%2014.3602%2083.0291%2014.7597C83.1332%2014.6159%2083.2357%2014.4655%2083.3314%2014.3034C83.5918%2013.8639%2083.8051%2013.3358%2083.9647%2012.7342C84.1226%2012.1326%2084.2032%2011.4273%2084.2032%2010.6369C84.2032%209.8464%2084.1226%209.16958%2083.963%208.57464C83.8034%207.98137%2083.5901%207.46164%2083.3298%207.03047L83.3365%207.03215Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M77.0141%209.74781C75.4268%2011.7031%2077.7582%2014.2817%2079.7788%2013.2322C81.5173%2012.3298%2080.7883%2010.9343%2080.8152%209.58237C80.8387%208.37076%2081.4955%206.88175%2082.2547%205.94923C83.0626%204.95488%2085.1303%204.66243%2084.7238%202.9712C84.4165%201.6961%2082.6864%201.39529%2081.9104%202.3913C81.3594%203.09654%2081.7542%203.96722%2081.603%204.77607C81.3443%206.17651%2080.6153%207.36639%2079.5135%208.25545C78.7777%208.84872%2077.5365%209.10608%2077.0141%209.74781Z%22%20fill%3D%22%235BC0BE%22%2F%3E%3C%2Fsvg%3E";
633
-
634
637
  var GBFlag = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAUCAMAAADImI+JAAAANlBMVEX////w8vfyxcx8jbJCWpAOLHFVa5sBIWnIEC7WTGLnv8qAkLTheYpecqHx0digrMfz3+T21dqBS5WQAAAApUlEQVQoz8WTyxpFMAyEpyqOuhTv/7IntImmurAzC59kfsIIhA5wnn6iASMLgzbIT2Fk6joUaAUKBsiJm+kJ0iyuR1mQBam8Cex1dINkZ6EesSZwrR8JfdYWl7AcbCRw5ypytYmPpy6w3X6jL8HXL6PxOODgTPYEcnXmFe94cuBsdJzwpIFrRwK3WPkJLQqL2aUoUVisXjOvLizWWNyMVljrV0gz/wdhEi0lRIbcAAAAAElFTkSuQmCC";
635
638
 
636
639
  var ESFlag = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAbCAMAAAA5zj1cAAAApVBMVEX6vQCtFRnBPxP3tgCkSRTxsQC9miCtkjL3ugDcdwrVkwndpwauUEi3k3ecLQyvGx01YomtXy3Zhha+gw+4LiCzn4jKeBKyYgjmoAOkXUK/RhC1kJmmKh+0oKCbYwN5OAWWHxSVi0HypQNcdGsDAgC9g1j6vgSWhnLfsSXCn169cE24eBuaNwzQaiOYagW8bxWIOhqoKhPLdq4yUHR+UgVZLWaBHkAs3esWAAAAk0lEQVQ4y+WTVxLDIAxESQwBAwb33tKc3sv9j5YbWJp8JvurNzsrzYpMkCI/BU6RIt9phqIcJSOpEGBu7c2WA+iXOWmbtTmTACh42PdelSgwp+d2nXdvTjuAc3X5vL6qJo4XQEZ9qd8PXaR7yDE5GFOf6XbNRrmB8cgcKaUraJm5z4NiE4RLH3FyIUaG6Pb85XN9AIg9CvrV7UGSAAAAAElFTkSuQmCC";
@@ -665,7 +668,7 @@ const LanguageSelector = ({ currentLanguage, onLanguageChange: _onLanguageChange
665
668
  handleClose();
666
669
  };
667
670
  return (jsxs(Fragment, { children: [jsxs(Button, { onClick: handleClick, sx: {
668
- color: "#1e2f97",
671
+ color: "var(--color-brand-primary, #1e2f97)",
669
672
  textTransform: "none",
670
673
  padding: "4px 8px",
671
674
  minWidth: "auto",
@@ -673,7 +676,7 @@ const LanguageSelector = ({ currentLanguage, onLanguageChange: _onLanguageChange
673
676
  alignItems: "center",
674
677
  gap: "4px",
675
678
  "&:hover": {
676
- backgroundColor: "rgba(30, 47, 151, 0.04)",
679
+ backgroundColor: "var(--color-brand-primary-hover-bg, rgba(30, 47, 151, 0.04))",
677
680
  },
678
681
  }, "aria-label": "Select language", "aria-controls": open ? "language-menu" : undefined, "aria-haspopup": "true", "aria-expanded": open ? "true" : undefined, children: [jsx(Box, { component: "img", src: currentLang.flag, alt: currentLang.name, sx: {
679
682
  width: "20px",
@@ -715,7 +718,7 @@ const DEFAULT_ROUTES = {
715
718
  profile: "/user/profile",
716
719
  logout: "/user/login",
717
720
  };
718
- const AppHeader = ({ language: languageProp, accessToken: accessTokenProp }) => {
721
+ const AppHeader = ({ language: languageProp, accessToken: accessTokenProp, objectStoreUrl }) => {
719
722
  // Get initial language from props, URL, localStorage, or default to 'en'
720
723
  const getInitialLanguage = () => {
721
724
  // Priority 1: Props
@@ -839,7 +842,7 @@ const AppHeader = ({ language: languageProp, accessToken: accessTokenProp }) =>
839
842
  React__default.useEffect(() => {
840
843
  const fetchProfilePicture = async () => {
841
844
  const token = accessTokenProp ?? getAccessTokenForRequest();
842
- const blobUrl = await fetchProfilePictureAsBlobUrl(undefined, token ?? undefined);
845
+ const blobUrl = await fetchProfilePictureAsBlobUrl(objectStoreUrl ?? undefined, token ?? undefined);
843
846
  if (blobUrl) {
844
847
  // Clean up previous blob URL if it exists
845
848
  setProfilePictureBlobUrl((prevUrl) => {
@@ -860,7 +863,7 @@ const AppHeader = ({ language: languageProp, accessToken: accessTokenProp }) =>
860
863
  return null;
861
864
  });
862
865
  };
863
- }, [accessTokenProp]); // Refetch when accessToken prop changes (e.g. after login)
866
+ }, [accessTokenProp, objectStoreUrl]); // Refetch when accessToken or objectStoreUrl changes (e.g. after login or env switch)
864
867
  React__default.useEffect(() => {
865
868
  const allData = getAllDataFromStorage();
866
869
  let userName = "";
@@ -991,8 +994,8 @@ const AppHeader = ({ language: languageProp, accessToken: accessTokenProp }) =>
991
994
  const isMobileMenuOpen = Boolean(mobileMoreAnchorEl);
992
995
  const OnlineBadge = styled(Badge)(({ theme }) => ({
993
996
  "& .MuiBadge-badge": {
994
- backgroundColor: "#44b700",
995
- color: "#44b700",
997
+ backgroundColor: "var(--color-status-online, #44b700)",
998
+ color: "var(--color-status-online, #44b700)",
996
999
  boxShadow: `0 0 0 2px ${theme.palette.background.paper}`,
997
1000
  width: 12,
998
1001
  height: 12,
@@ -1001,8 +1004,8 @@ const AppHeader = ({ language: languageProp, accessToken: accessTokenProp }) =>
1001
1004
  }));
1002
1005
  const OfflineBadge = styled(Badge)(({ theme }) => ({
1003
1006
  "& .MuiBadge-badge": {
1004
- backgroundColor: "gray",
1005
- color: "gray",
1007
+ backgroundColor: "var(--color-status-offline, #808080)",
1008
+ color: "var(--color-status-offline, #808080)",
1006
1009
  boxShadow: `0 0 0 2px ${theme.palette.background.paper}`,
1007
1010
  width: 12,
1008
1011
  height: 12,
@@ -1110,7 +1113,7 @@ const AppHeader = ({ language: languageProp, accessToken: accessTokenProp }) =>
1110
1113
  elevation: 0,
1111
1114
  sx: {
1112
1115
  overflow: "visible",
1113
- filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
1116
+ filter: "drop-shadow(0px 2px 8px var(--color-menu-shadow, rgba(0,0,0,0.32)))",
1114
1117
  mt: 1.5,
1115
1118
  "& .MuiAvatar-root": {
1116
1119
  width: 32,
@@ -1140,39 +1143,46 @@ const AppHeader = ({ language: languageProp, accessToken: accessTokenProp }) =>
1140
1143
  }, id: mobileMenuId, keepMounted: true, transformOrigin: {
1141
1144
  vertical: "top",
1142
1145
  horizontal: "right",
1143
- }, open: isMobileMenuOpen, onClose: handleMobileMenuClose, children: [messageCount !== undefined && (jsxs(MenuItem, { children: [jsx(IconButton, { size: "large", "aria-label": `show ${messageCount} new mails`, sx: { color: '#1e2f97' }, children: jsx(Badge, { badgeContent: messageCount, color: "error", children: jsx(MailIcon, {}) }) }), jsx("p", { children: t.messages })] })), notificationCountValue > 0 && (jsxs(MenuItem, { children: [jsx(IconButton, { size: "large", "aria-label": `show ${notificationCountValue} new notifications`, sx: { color: '#1e2f97' }, children: jsx(Badge, { badgeContent: notificationCount, color: "error", children: jsx(NotificationsActiveOutlined, {}) }) }), jsx("p", { children: t.notifications })] })), jsxs(MenuItem, { onClick: handleProfileMenuOpen, children: [jsx(IconButton, { size: "large", "aria-label": "account of current user", "aria-controls": "primary-account-menu", "aria-haspopup": "true", sx: { color: '#1e2f97' }, children: isOnlineStatus ? (jsx(OnlineBadge, { overlap: "circular", anchorOrigin: { vertical: "bottom", horizontal: "right" }, variant: "dot", title: t.online, "aria-label": `${t.online} status badge`, "data-testid": "online-badge", children: jsx(AccountCircle, { titleAccess: user.name, "aria-label": "User avatar" }) })) : (jsx(OfflineBadge, { overlap: "circular", anchorOrigin: { vertical: "bottom", horizontal: "right" }, variant: "dot", title: t.offline, "aria-label": `${t.offline} status badge`, "data-testid": "offline-badge", children: jsx(AccountCircle, { titleAccess: user.name, "aria-label": "User avatar" }) })) }), jsx("p", { children: t.profile })] })] }));
1146
+ }, open: isMobileMenuOpen, onClose: handleMobileMenuClose, children: [messageCount !== undefined && (jsxs(MenuItem, { children: [jsx(IconButton, { size: "large", "aria-label": `show ${messageCount} new mails`, sx: { color: 'var(--color-brand-primary, #1e2f97)' }, children: jsx(Badge, { badgeContent: messageCount, color: "error", children: jsx(MailIcon, {}) }) }), jsx("p", { children: t.messages })] })), notificationCountValue > 0 && (jsxs(MenuItem, { children: [jsx(IconButton, { size: "large", "aria-label": `show ${notificationCountValue} new notifications`, sx: { color: 'var(--color-brand-primary, #1e2f97)' }, children: jsx(Badge, { badgeContent: notificationCount, color: "error", children: jsx(NotificationsActiveOutlined, {}) }) }), jsx("p", { children: t.notifications })] })), jsxs(MenuItem, { onClick: handleProfileMenuOpen, children: [jsx(IconButton, { size: "large", "aria-label": "account of current user", "aria-controls": "primary-account-menu", "aria-haspopup": "true", sx: { color: 'var(--color-brand-primary, #1e2f97)' }, children: isOnlineStatus ? (jsx(OnlineBadge, { overlap: "circular", anchorOrigin: { vertical: "bottom", horizontal: "right" }, variant: "dot", title: t.online, "aria-label": `${t.online} status badge`, "data-testid": "online-badge", children: jsx(AccountCircle, { titleAccess: user.name, "aria-label": "User avatar" }) })) : (jsx(OfflineBadge, { overlap: "circular", anchorOrigin: { vertical: "bottom", horizontal: "right" }, variant: "dot", title: t.offline, "aria-label": `${t.offline} status badge`, "data-testid": "offline-badge", children: jsx(AccountCircle, { titleAccess: user.name, "aria-label": "User avatar" }) })) }), jsx("p", { children: t.profile })] })] }));
1144
1147
  return (jsxs(Box, { sx: { flexGrow: 1 }, className: "app-header", children: [jsx(AppBar, { elevation: 0, sx: {
1145
- backgroundColor: "#ffffff",
1148
+ backgroundColor: "var(--color-header-bg, #ffffff)",
1146
1149
  boxShadow: 'none !important',
1147
1150
  position: 'fixed',
1148
- zIndex: 200,
1149
- height: '65px',
1150
- }, children: jsxs(Toolbar, { sx: { minHeight: '65px !important', height: '65px' }, children: [jsx(IconButton, { size: "large", edge: "start", "aria-label": "open drawer", sx: {
1151
+ zIndex: 'var(--size-header-zindex, 200)',
1152
+ height: 'var(--size-header-height, 65px)',
1153
+ }, children: jsxs(Toolbar, { sx: { minHeight: 'var(--size-header-height, 65px) !important', height: 'var(--size-header-height, 65px)' }, children: [jsx(IconButton, { size: "large", edge: "start", "aria-label": "open drawer", sx: {
1151
1154
  mr: '10px !important',
1152
- color: '#1e2f97',
1155
+ color: 'var(--color-brand-primary, #1e2f97)',
1153
1156
  padding: 0,
1154
1157
  paddingLeft: '14px',
1155
1158
  '&:hover': {
1156
- backgroundColor: 'rgba(30, 47, 151, 0.04)',
1159
+ backgroundColor: 'var(--color-brand-primary-hover-bg, rgba(30, 47, 151, 0.04))',
1157
1160
  }
1158
1161
  }, onClick: () => {
1159
1162
  toggleDrawer();
1160
1163
  }, children: isDrawerOpen ? (jsx(MenuOpenIcon, { fontSize: "large" })) : (jsx(MenuIcon, { fontSize: "large" })) }), jsx(Box, { component: "div", sx: {
1161
1164
  display: { xs: "none", sm: "flex" },
1162
1165
  alignItems: 'center',
1163
- height: '65px',
1164
- }, "data-testid": "impactomics-logo-wrapper", children: jsx("img", { src: ImpactomicsLogo, alt: "Impactomics", style: { height: '23px', width: 'auto', display: 'block' } }) }), jsx(Box, { sx: { flexGrow: 1 } }), jsxs(Box, { sx: { display: { xs: "none", md: "flex" }, alignItems: "center", gap: "4px" }, children: [jsx(LanguageSelector, { currentLanguage: currentLanguage, onLanguageChange: (lang) => {
1166
+ height: 'var(--size-header-height, 65px)',
1167
+ }, "data-testid": "impactomics-logo-wrapper", children: jsx(Box, { sx: {
1168
+ width: '134px',
1169
+ height: '23px',
1170
+ backgroundImage: 'var(--image-logo-svg)',
1171
+ backgroundSize: 'contain',
1172
+ backgroundRepeat: 'no-repeat',
1173
+ backgroundPosition: 'left center',
1174
+ }, role: "img", "aria-label": "Impactomics" }) }), jsx(Box, { sx: { flexGrow: 1 } }), jsxs(Box, { sx: { display: { xs: "none", md: "flex" }, alignItems: "center", gap: "4px" }, children: [jsx(LanguageSelector, { currentLanguage: currentLanguage, onLanguageChange: (lang) => {
1165
1175
  setCurrentLanguage(lang);
1166
1176
  // The LanguageSelector component handles URL and localStorage updates
1167
1177
  } }), jsx(IconButton, { size: "large", "aria-label": notificationCountValue > 0 ? `show ${notificationCountValue} new notifications` : "show notifications", sx: {
1168
- color: '#1e2f97',
1178
+ color: 'var(--color-brand-primary, #1e2f97)',
1169
1179
  '&:hover': {
1170
- backgroundColor: 'rgba(30, 47, 151, 0.04)',
1180
+ backgroundColor: 'var(--color-brand-primary-hover-bg, rgba(30, 47, 151, 0.04))',
1171
1181
  }
1172
1182
  }, children: jsx(Badge, { badgeContent: notificationCountValue > 0 ? notificationCountValue : 0, color: "error", children: jsx(NotificationsActiveOutlined, {}) }) }), jsx(IconButton, { size: "large", edge: "end", "aria-label": "account of current user", "aria-controls": menuId, "aria-haspopup": "true", onClick: handleProfileMenuOpen, sx: {
1173
- color: '#1e2f97',
1183
+ color: 'var(--color-brand-primary, #1e2f97)',
1174
1184
  '&:hover': {
1175
- backgroundColor: 'rgba(30, 47, 151, 0.04)',
1185
+ backgroundColor: 'var(--color-brand-primary-hover-bg, rgba(30, 47, 151, 0.04))',
1176
1186
  }
1177
1187
  }, children: isOnlineStatus ? (jsx(OnlineBadge, { overlap: "circular", anchorOrigin: { vertical: "bottom", horizontal: "right" }, variant: "dot", title: t.online, "aria-label": `${t.online} status badge`, "data-testid": "online-badge", children: jsx(Avatar, { sx: {
1178
1188
  bgcolor: deepOrange[500],
@@ -1185,9 +1195,9 @@ const AppHeader = ({ language: languageProp, accessToken: accessTokenProp }) =>
1185
1195
  height: 20,
1186
1196
  p: 1,
1187
1197
  }, alt: user.name, title: user.name, src: user.avatar, children: getInitials() }) })) })] }), jsx(Box, { sx: { display: { xs: "flex", md: "none" } }, children: jsx(IconButton, { size: "large", "aria-label": "show more", "aria-controls": mobileMenuId, "aria-haspopup": "true", onClick: handleMobileMenuOpen, sx: {
1188
- color: '#1e2f97',
1198
+ color: 'var(--color-brand-primary, #1e2f97)',
1189
1199
  '&:hover': {
1190
- backgroundColor: 'rgba(30, 47, 151, 0.04)',
1200
+ backgroundColor: 'var(--color-brand-primary-hover-bg, rgba(30, 47, 151, 0.04))',
1191
1201
  }
1192
1202
  }, children: jsx(MoreIcon, {}) }) })] }) }), renderMobileMenu, renderMenu] }));
1193
1203
  };