Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cpelements/pfe-navigation-account

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cpelements/pfe-navigation-account - npm Package Compare versions

Comparing version 1.0.26 to 1.0.27

14

dist/pfe-navigation-account.js

@@ -5,3 +5,3 @@ import PFElement from '../../../@patternfly/pfelement/dist/pfelement.js';

/*!
* PatternFly Elements: PfeNavigationAccount 1.0.26
* PatternFly Elements: PfeNavigationAccount 1.0.27
* @license

@@ -38,3 +38,3 @@ * Copyright 2020 Red Hat, Inc.

static get version() {
return "1.0.26";
return "1.0.27";
}

@@ -45,4 +45,6 @@

return `
<style>.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.element-invisible,.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host{display:block}:host([hidden]){display:none}.pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0;margin-left:auto;margin-right:auto;padding:24px;font-size:16px;color:#151515;color:var(--pfe-navigation__dropdown--Color,#151515);background:#fff;background:var(--pfe-navigation__dropdown--Background,var(--pfe-theme--color--surface--lightest,#fff))}@media (min-width:768px){.pfe-navigation__dropdown{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px);grid-auto-flow:row;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;padding:24px 64px}}@media (min-width:1200px){.pfe-navigation__dropdown{-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 32px;gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px)}}:host(.pfe-navigation--collapse-secondary-links) .pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;gap:0}.pfe-navigation__dropdown[class]{width:auto}.pfe-navigation__dropdown li,.pfe-navigation__dropdown ul{margin:0;padding:0;list-style:none}.pfe-navigation__dropdown a{display:inline-block;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c);border:1px solid transparent}.pfe-navigation__dropdown a:focus,.pfe-navigation__dropdown a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:underline}.pfe-navigation__dropdown a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown .pfe-link-list--header,.pfe-navigation__dropdown [role=heading][aria-heading-level],.pfe-navigation__dropdown h2,.pfe-navigation__dropdown h3,.pfe-navigation__dropdown h4,.pfe-navigation__dropdown h5,.pfe-navigation__dropdown h6{margin:32px 0 .75em;margin:var(--pfe-navigation--gutter,32px) 0 .75em;padding:0;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;font-size:18px;font-weight:400;color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646)}.pfe-navigation__dropdown .pfe-link-list--header:first-child,.pfe-navigation__dropdown [role=heading][aria-heading-level]:first-child,.pfe-navigation__dropdown h2:first-child,.pfe-navigation__dropdown h3:first-child,.pfe-navigation__dropdown h4:first-child,.pfe-navigation__dropdown h5:first-child,.pfe-navigation__dropdown h6:first-child{margin-top:0}.pfe-navigation__dropdown .pfe-link-list--header a,.pfe-navigation__dropdown [role=heading][aria-heading-level] a,.pfe-navigation__dropdown h2 a,.pfe-navigation__dropdown h3 a,.pfe-navigation__dropdown h4 a,.pfe-navigation__dropdown h5 a,.pfe-navigation__dropdown h6 a{color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646);border:1px solid transparent}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown .pfe-link-list--header a:hover,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:hover,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h2 a:hover,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h3 a:hover,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h4 a:hover,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h5 a:hover,.pfe-navigation__dropdown h6 a:focus,.pfe-navigation__dropdown h6 a:hover{text-decoration:underline;color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h6 a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown li{margin:0 0 16px;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown a,.pfe-navigation__dropdown pfe-card,.pfe-navigation__dropdown pfe-cta{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary],.pfe-navigation__dropdown pfe-cta[priority=primary]{--pfe-cta--BackgroundColor:#e00;--pfe-cta--BackgroundColor--hover:#c00;--pfe-theme--ui--border-width:0}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:hover,.pfe-navigation__dropdown pfe-cta[priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[priority=primary]:hover{--pfe-cta--BackgroundColor:#c00}pfe-card .pfe-navigation__dropdown pfe-cta{margin-top:0}.user-info[class]{-webkit-box-ordinal-group:-9;-webkit-order:-10;-ms-flex-order:-10;order:-10;position:relative;min-height:64px;margin-bottom:24px;padding-left:76px;font-size:18px}@media (min-width:768px){.user-info[class]{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;margin-bottom:32px}}:host(.pfe-navigation--collapse-secondary-links) .user-info[class]{margin-bottom:24px}.user-info[class] pfe-avatar{position:absolute;top:0;left:0;width:64px;height:64px;border-radius:50%;overflow:hidden;background:rgba(122,122,122,.2)}.user-info[class] .user-info__edit-avatar{font-size:16px;text-decoration:none;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}.user-info[class] .user-info__edit-avatar:focus,.user-info[class] .user-info__edit-avatar:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.account-links{-ms-grid-row:2;grid-row:2;-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;font-size:14px}@media (min-width:768px){.account-links{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;gap:var(--pfe-navigation--gutter,32px);grid-auto-flow:row}}:host(.pfe-navigation--collapse-secondary-links) .account-links{display:block}.account-links li{margin-bottom:.57143em;max-width:19.28571em}@media (min-width:768px){.account-links li{margin-bottom:1.5em}}:host(.pfe-navigation--collapse-secondary-links) .account-links li{margin-bottom:.57143em}.account-links[class] a{text-decoration:none}.account-links[class] a:focus,.account-links[class] a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:none}.account-links .account-link__title[class]{font-size:1.14286em;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}@media (min-width:768px){.account-links .account-link__title[class]{margin-bottom:8px}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__title[class]{margin-bottom:0}.account-links a:focus .account-link__title,.account-links a:hover .account-link__title{text-decoration:underline}.account-links .account-link__description{display:none;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}@media (min-width:768px){.account-links .account-link__description{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__description{display:none}@media (min-width:768px){.account-metadata{-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/span 2}}.account-metadata--mobile{-webkit-box-ordinal-group:-4;-webkit-order:-5;-ms-flex-order:-5;order:-5;display:block;margin-bottom:24px}@media (min-width:768px){.account-metadata--mobile{display:none}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata--mobile{display:block}.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:none}@media (min-width:768px){.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata__account-number,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__email,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__login-name,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__org-admin,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__organization{display:none}.account-metadata--mobile .account-metadata__account-number,.account-metadata--mobile .account-metadata__email,.account-metadata--mobile .account-metadata__login-name,.account-metadata--mobile .account-metadata__org-admin,.account-metadata--mobile .account-metadata__organization{display:block}.account-metadata__login-name[class]{font-size:16px;margin-bottom:1.5em}.account-metadata--org-admin .account-metadata__login-name[class]{margin-bottom:.5em}.account-metadata__account-number[class],.account-metadata__org-admin[class],.account-metadata__organization[class]{font-size:14px;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}.account-metadata__org-admin{margin-bottom:1.71429em}.account-metadata__email[class]{margin-top:1.5em}.account-metadata__logout-wrapper{margin-top:3em;padding:3em 0 24px;border-top:1px solid #d2d2d2}.account-metadata__logout-wrapper[class] a{padding:.375em 1em;color:#fff;color:var(--pfe-navigation__dropdown--Color--on-highlight,#fff);background:#e00;background:var(--pfe-navigation__dropdown--highlight-color,#e00);text-decoration:none;border-radius:3px} /*# sourceMappingURL=pfe-navigation-account.min.css.map */</style>
<div id="wrapper">
<style>.element-invisible,.sr-only,.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host{display:block}:host([hidden]){display:none}.pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0;margin-left:auto;margin-right:auto;padding:24px;font-size:16px;color:#151515;color:var(--pfe-navigation__dropdown--Color,#151515);background:#fff;background:var(--pfe-navigation__dropdown--Background,var(--pfe-theme--color--surface--lightest,#fff))}@media (min-width:768px){.pfe-navigation__dropdown{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px);grid-auto-flow:row;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;padding:24px 64px}}@media (min-width:1200px){.pfe-navigation__dropdown{-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 32px;gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px)}}:host(.pfe-navigation--collapse-secondary-links) .pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;gap:0}.pfe-navigation__dropdown[class]{width:auto}.pfe-navigation__dropdown li,.pfe-navigation__dropdown ul{margin:0;padding:0;list-style:none}.pfe-navigation__dropdown a{display:inline-block;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c);border:1px solid transparent}.pfe-navigation__dropdown a:focus,.pfe-navigation__dropdown a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:underline}.pfe-navigation__dropdown a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown .pfe-link-list--header,.pfe-navigation__dropdown [role=heading][aria-heading-level],.pfe-navigation__dropdown h2,.pfe-navigation__dropdown h3,.pfe-navigation__dropdown h4,.pfe-navigation__dropdown h5,.pfe-navigation__dropdown h6{margin:32px 0 .75em;margin:var(--pfe-navigation--gutter,32px) 0 .75em;padding:0;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;font-size:18px;font-weight:400;color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646)}.pfe-navigation__dropdown .pfe-link-list--header:first-child,.pfe-navigation__dropdown [role=heading][aria-heading-level]:first-child,.pfe-navigation__dropdown h2:first-child,.pfe-navigation__dropdown h3:first-child,.pfe-navigation__dropdown h4:first-child,.pfe-navigation__dropdown h5:first-child,.pfe-navigation__dropdown h6:first-child{margin-top:0}.pfe-navigation__dropdown .pfe-link-list--header a,.pfe-navigation__dropdown [role=heading][aria-heading-level] a,.pfe-navigation__dropdown h2 a,.pfe-navigation__dropdown h3 a,.pfe-navigation__dropdown h4 a,.pfe-navigation__dropdown h5 a,.pfe-navigation__dropdown h6 a{color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646);border:1px solid transparent}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown .pfe-link-list--header a:hover,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:hover,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h2 a:hover,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h3 a:hover,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h4 a:hover,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h5 a:hover,.pfe-navigation__dropdown h6 a:focus,.pfe-navigation__dropdown h6 a:hover{text-decoration:underline;color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h6 a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown li{margin:0 0 16px;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown a,.pfe-navigation__dropdown pfe-card,.pfe-navigation__dropdown pfe-cta{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary],.pfe-navigation__dropdown pfe-cta[priority=primary]{--pfe-cta--BackgroundColor:#e00;--pfe-cta--BackgroundColor--hover:#c00;--pfe-theme--ui--border-width:0}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:hover,.pfe-navigation__dropdown pfe-cta[priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[priority=primary]:hover{--pfe-cta--BackgroundColor:#c00}pfe-card .pfe-navigation__dropdown pfe-cta{margin-top:0}.user-info[class]{-webkit-box-ordinal-group:-9;-webkit-order:-10;-ms-flex-order:-10;order:-10;position:relative;min-height:64px;margin-bottom:24px;padding-left:76px;font-size:18px}@media (min-width:768px){.user-info[class]{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;margin-bottom:32px}}:host(.pfe-navigation--collapse-secondary-links) .user-info[class]{margin-bottom:24px}.user-info[class] pfe-avatar{position:absolute;top:0;left:0;width:64px;height:64px;border-radius:50%;overflow:hidden;background:rgba(122,122,122,.2)}.user-info[class] .user-info__edit-avatar{font-size:16px;text-decoration:none;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}.user-info[class] .user-info__edit-avatar:focus,.user-info[class] .user-info__edit-avatar:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.account-links{-ms-grid-row:2;grid-row:2;-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;font-size:14px}@media (min-width:768px){.account-links{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;gap:var(--pfe-navigation--gutter,32px);grid-auto-flow:row}}:host(.pfe-navigation--collapse-secondary-links) .account-links{display:block}.account-links li{margin-bottom:.57143em;max-width:19.28571em}@media (min-width:768px){.account-links li{margin-bottom:1.5em}}:host(.pfe-navigation--collapse-secondary-links) .account-links li{margin-bottom:.57143em}.account-links[class] a{text-decoration:none}.account-links[class] a:focus,.account-links[class] a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:none}.account-links .account-link__title[class]{font-size:1.14286em;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}@media (min-width:768px){.account-links .account-link__title[class]{margin-bottom:8px}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__title[class]{margin-bottom:0}.account-links a:focus .account-link__title,.account-links a:hover .account-link__title{text-decoration:underline}.account-links .account-link__description{display:none;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}@media (min-width:768px){.account-links .account-link__description{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__description{display:none}@media (min-width:768px){.account-metadata{-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/span 2}}.account-metadata--mobile{-webkit-box-ordinal-group:-4;-webkit-order:-5;-ms-flex-order:-5;order:-5;display:block;margin-bottom:24px}@media (min-width:768px){.account-metadata--mobile{display:none}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata--mobile{display:block}.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:none}@media (min-width:768px){.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata__account-number,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__email,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__login-name,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__org-admin,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__organization{display:none}.account-metadata--mobile .account-metadata__account-number,.account-metadata--mobile .account-metadata__email,.account-metadata--mobile .account-metadata__login-name,.account-metadata--mobile .account-metadata__org-admin,.account-metadata--mobile .account-metadata__organization{display:block}.account-metadata__login-name[class]{font-size:16px;margin-bottom:1.5em}.account-metadata--org-admin .account-metadata__login-name[class]{margin-bottom:.5em}.account-metadata__account-number[class],.account-metadata__org-admin[class],.account-metadata__organization[class]{font-size:14px;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}.account-metadata__org-admin{margin-bottom:1.71429em}.account-metadata__email[class]{margin-top:1.5em}.account-metadata__logout-wrapper{margin-top:3em;padding:3em 0 24px;border-top:1px solid #d2d2d2}.account-metadata__logout-wrapper[class] a{padding:.375em 1em;color:#fff;color:var(--pfe-navigation__dropdown--Color--on-highlight,#fff);background:#e00;background:var(--pfe-navigation__dropdown--highlight-color,#e00);text-decoration:none;border-radius:3px} /*# sourceMappingURL=pfe-navigation-account.min.css.map */</style>
<div>
<div id="wrapper">
</div>
</div>`;

@@ -396,2 +398,6 @@ }

_updateAvatarSrc(REDHAT_LOGIN) {
// Don't bother getting avatar if browser doesn't support fetch
if (typeof fetch === "undefined") {
return;
}
// If REDHAT_LOGIN exists and hasn't changed, there's no reason to fetch a new avatar

@@ -398,0 +404,0 @@ if (

import a from"../../../@patternfly/pfelement/dist/pfelement.min.js";import"../../../@patternfly/pfe-avatar/dist/pfe-avatar.min.js";
/*!
* PatternFly Elements: PfeNavigationAccount 1.0.26
* PatternFly Elements: PfeNavigationAccount 1.0.27
* @license

@@ -26,3 +26,3 @@ * Copyright 2020 Red Hat, Inc.

*/
class t extends a{static get version(){return"1.0.26"}get html(){return'\n<style>.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.element-invisible,.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host{display:block}:host([hidden]){display:none}.pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0;margin-left:auto;margin-right:auto;padding:24px;font-size:16px;color:#151515;color:var(--pfe-navigation__dropdown--Color,#151515);background:#fff;background:var(--pfe-navigation__dropdown--Background,var(--pfe-theme--color--surface--lightest,#fff))}@media (min-width:768px){.pfe-navigation__dropdown{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px);grid-auto-flow:row;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;padding:24px 64px}}@media (min-width:1200px){.pfe-navigation__dropdown{-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 32px;gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px)}}:host(.pfe-navigation--collapse-secondary-links) .pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;gap:0}.pfe-navigation__dropdown[class]{width:auto}.pfe-navigation__dropdown li,.pfe-navigation__dropdown ul{margin:0;padding:0;list-style:none}.pfe-navigation__dropdown a{display:inline-block;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c);border:1px solid transparent}.pfe-navigation__dropdown a:focus,.pfe-navigation__dropdown a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:underline}.pfe-navigation__dropdown a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown .pfe-link-list--header,.pfe-navigation__dropdown [role=heading][aria-heading-level],.pfe-navigation__dropdown h2,.pfe-navigation__dropdown h3,.pfe-navigation__dropdown h4,.pfe-navigation__dropdown h5,.pfe-navigation__dropdown h6{margin:32px 0 .75em;margin:var(--pfe-navigation--gutter,32px) 0 .75em;padding:0;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;font-size:18px;font-weight:400;color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646)}.pfe-navigation__dropdown .pfe-link-list--header:first-child,.pfe-navigation__dropdown [role=heading][aria-heading-level]:first-child,.pfe-navigation__dropdown h2:first-child,.pfe-navigation__dropdown h3:first-child,.pfe-navigation__dropdown h4:first-child,.pfe-navigation__dropdown h5:first-child,.pfe-navigation__dropdown h6:first-child{margin-top:0}.pfe-navigation__dropdown .pfe-link-list--header a,.pfe-navigation__dropdown [role=heading][aria-heading-level] a,.pfe-navigation__dropdown h2 a,.pfe-navigation__dropdown h3 a,.pfe-navigation__dropdown h4 a,.pfe-navigation__dropdown h5 a,.pfe-navigation__dropdown h6 a{color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646);border:1px solid transparent}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown .pfe-link-list--header a:hover,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:hover,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h2 a:hover,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h3 a:hover,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h4 a:hover,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h5 a:hover,.pfe-navigation__dropdown h6 a:focus,.pfe-navigation__dropdown h6 a:hover{text-decoration:underline;color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h6 a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown li{margin:0 0 16px;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown a,.pfe-navigation__dropdown pfe-card,.pfe-navigation__dropdown pfe-cta{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary],.pfe-navigation__dropdown pfe-cta[priority=primary]{--pfe-cta--BackgroundColor:#e00;--pfe-cta--BackgroundColor--hover:#c00;--pfe-theme--ui--border-width:0}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:hover,.pfe-navigation__dropdown pfe-cta[priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[priority=primary]:hover{--pfe-cta--BackgroundColor:#c00}pfe-card .pfe-navigation__dropdown pfe-cta{margin-top:0}.user-info[class]{-webkit-box-ordinal-group:-9;-webkit-order:-10;-ms-flex-order:-10;order:-10;position:relative;min-height:64px;margin-bottom:24px;padding-left:76px;font-size:18px}@media (min-width:768px){.user-info[class]{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;margin-bottom:32px}}:host(.pfe-navigation--collapse-secondary-links) .user-info[class]{margin-bottom:24px}.user-info[class] pfe-avatar{position:absolute;top:0;left:0;width:64px;height:64px;border-radius:50%;overflow:hidden;background:rgba(122,122,122,.2)}.user-info[class] .user-info__edit-avatar{font-size:16px;text-decoration:none;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}.user-info[class] .user-info__edit-avatar:focus,.user-info[class] .user-info__edit-avatar:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.account-links{-ms-grid-row:2;grid-row:2;-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;font-size:14px}@media (min-width:768px){.account-links{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;gap:var(--pfe-navigation--gutter,32px);grid-auto-flow:row}}:host(.pfe-navigation--collapse-secondary-links) .account-links{display:block}.account-links li{margin-bottom:.57143em;max-width:19.28571em}@media (min-width:768px){.account-links li{margin-bottom:1.5em}}:host(.pfe-navigation--collapse-secondary-links) .account-links li{margin-bottom:.57143em}.account-links[class] a{text-decoration:none}.account-links[class] a:focus,.account-links[class] a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:none}.account-links .account-link__title[class]{font-size:1.14286em;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}@media (min-width:768px){.account-links .account-link__title[class]{margin-bottom:8px}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__title[class]{margin-bottom:0}.account-links a:focus .account-link__title,.account-links a:hover .account-link__title{text-decoration:underline}.account-links .account-link__description{display:none;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}@media (min-width:768px){.account-links .account-link__description{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__description{display:none}@media (min-width:768px){.account-metadata{-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/span 2}}.account-metadata--mobile{-webkit-box-ordinal-group:-4;-webkit-order:-5;-ms-flex-order:-5;order:-5;display:block;margin-bottom:24px}@media (min-width:768px){.account-metadata--mobile{display:none}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata--mobile{display:block}.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:none}@media (min-width:768px){.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata__account-number,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__email,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__login-name,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__org-admin,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__organization{display:none}.account-metadata--mobile .account-metadata__account-number,.account-metadata--mobile .account-metadata__email,.account-metadata--mobile .account-metadata__login-name,.account-metadata--mobile .account-metadata__org-admin,.account-metadata--mobile .account-metadata__organization{display:block}.account-metadata__login-name[class]{font-size:16px;margin-bottom:1.5em}.account-metadata--org-admin .account-metadata__login-name[class]{margin-bottom:.5em}.account-metadata__account-number[class],.account-metadata__org-admin[class],.account-metadata__organization[class]{font-size:14px;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}.account-metadata__org-admin{margin-bottom:1.71429em}.account-metadata__email[class]{margin-top:1.5em}.account-metadata__logout-wrapper{margin-top:3em;padding:3em 0 24px;border-top:1px solid #d2d2d2}.account-metadata__logout-wrapper[class] a{padding:.375em 1em;color:#fff;color:var(--pfe-navigation__dropdown--Color--on-highlight,#fff);background:#e00;background:var(--pfe-navigation__dropdown--highlight-color,#e00);text-decoration:none;border-radius:3px} /*# sourceMappingURL=pfe-navigation-account.min.css.map */</style>\n<div id="wrapper">\n</div>'}static get tag(){return"pfe-navigation-account"}static get meta(){return{title:"Navigation account",description:"Be awesome."}}static get observedAttributes(){return["lang"]}get templateUrl(){return"pfe-navigation-account.html"}get styleUrl(){return"pfe-navigation-account.scss"}get userData(){return this.userData}set userData(a){this._processUserData(a)}static get PfeType(){return a.PfeTypes.Content}static get properties(){return{}}static get slots(){return{}}constructor(){super(t,{type:t.PfeType}),this._userData=null,this._avatars=[],this._lang="en",this._navTranslations={en:{accountDetails:"Account details",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},ja:{accountDetails:"Account details JA",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},ko:{accountDetails:"Account details KO",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},zh:{accountDetails:"Account details zh",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},de:{accountDetails:"Account details de",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},fr:{accountDetails:"Account details fr",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},it:{accountDetails:"Account details it",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},es:{accountDetails:"Account details es",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},pt:{accountDetails:"Account details pt",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."}},this._updateAvatarSrc=this._updateAvatarSrc.bind(this),this._createAccountDropdown=this._createAccountDropdown.bind(this),this._processUserReady=this._processUserReady.bind(this),this._processUserData=this._processUserData.bind(this);const a=document.querySelector("body");a.addEventListener("user-ready",this._processUserReady),a.addEventListener("user-update",this._processUserReady)}connectedCallback(){super.connectedCallback(),this.hasAttribute("lang")&&(this._lang=this.getAttribute("lang"))}disconnectedCallback(){const a=document.querySelector("body");a.removeEventListener("user-ready",this._processUserReady),a.removeEventListener("user-update",this._processUserReady)}attributeChangedCallback(a,t,o){super.attributeChangedCallback(a,t,o)}_createPfeAvatar(a,t){let o="";void 0===this.hasSlot&&(o="pfe-");const n=document.createElement("pfe-avatar");return n.setAttribute(`${o}name`,a),n.setAttribute(`${o}shape`,"circle"),"string"==typeof t&&n.setAttribute(`${o}src`,t),n}_getFullName(a){if("string"==typeof a.fullName)return a.fullName;let t="";return"string"==typeof a.firstName&&(t=a.firstName),"string"==typeof a.lastName&&(t=t.length?`${t} ${a.lastName}`:a.lastName),t.length||this.error("Couldn't get full name"),this.setAttribute("full-name",t),t}_updateAvatarSrc(a){if(null===this._userData||"string"==typeof this._userData.REDHAT_LOGIN&&a!==this._userData.REDHAT_LOGIN){let t="//access.redhat.com/api/users/avatar/";(document.domain.includes("access.")||document.domain.includes(".foo."))&&(t="/api/users/avatar/"),fetch(`${t}${a}`).then(a=>{if("object"==typeof a&&"number"==typeof a.status&&200===a.status&&"string"==typeof a.url&&!a.url.includes("blank.png")){this.setAttribute("avatar-url",a.url);for(let t=0;t<this._avatars.length;t++)this._avatars[t].setAttribute("src",a.url)}}).catch(a=>console.error(a))}}_createPfeIcon(a){let t="";void 0===this.hasSlot&&(t="pfe-");const o=document.createElement("pfe-icon");return o.setAttribute("icon",a),o.setAttribute(`${t}size`,"sm"),o.setAttribute("aria-hidden","true"),o}_createAccountMenuToggle(a){const t=this.shadowRoot.querySelector(".pfe-navigation__log-in-link"),o=document.createElement("button");o.classList.add("pfe-navigation__log-in-link","pfe-navigation__log-in-link--logged-in"),o.setAttribute("aria-label","Open user menu");const n=this._createPfeAvatar(a);return o.append(n),o.id="account__toggle",t.parentElement.replaceChild(o,t),this._avatars.push(n),o}_createAccountDropdown(a){const t=document.createElement("div");t.id="wrapper",t.classList.add("pfe-navigation__dropdown");const o=document.createElement("h3"),n=this._getFullName(a),e=this._createPfeAvatar(n);o.classList.add("user-info"),this._avatars.push(e),e.classList.add("user-info__avatar");const i=document.createElement("div");i.classList.add("user-info__full-name"),i.innerText=n;const r=document.createElement("a");r.setAttribute("href","https://access.redhat.com/user/edit"),r.classList.add("user-info__edit-avatar"),r.innerText="Edit avatar",r.prepend(this._createPfeIcon("web-caret-right")),o.append(e),o.append(i),o.append(r);const s=[[{text:this._navTranslations[this._lang].accountDetails,url:"https://www.redhat.com/wapps/ugc/protected/personalInfo.html",description:this._navTranslations[this._lang].accountDetailsDesc},{text:this._navTranslations[this._lang].profile,url:"https://access.redhat.com/user",description:this._navTranslations[this._lang].profileDesc},{text:this._navTranslations[this._lang].training,url:"https://rol.redhat.com/rol/app/",description:this._navTranslations[this._lang].trainingDesc}],[{text:this._navTranslations[this._lang].subscriptions,url:"https://access.redhat.com/management",description:this._navTranslations[this._lang].subscriptionsDesc,requiresRole:"portal_manage_subscriptions"},{text:this._navTranslations[this._lang].accountTeam,url:"https://access.redhat.com/account-team",description:this._navTranslations[this._lang].accountTeamDesc},{text:this._navTranslations[this._lang].userManagement,url:"https://www.redhat.com/wapps/ugc/protected/usermgt/userList.html",description:this._navTranslations[this._lang].userManagementDesc,requiresRole:"admin:org:all"},{text:this._navTranslations[this._lang].support,url:"https://access.redhat.com/support/cases/#/troubleshoot/",description:this._navTranslations[this._lang].supportDesc}]],c=document.createElement("div");c.classList.add("account-links"),c.setAttribute("aria-label","Account managemement links");for(let t=0;t<s.length;t++){const o=s[t],n=document.createElement("ul");n.classList.add("account-links__column");for(let t=0;t<o.length;t++){const e=o[t],i=document.createElement("li"),r=document.createElement("a");let s=!0;void 0!==e.requiresRole&&(a.realm_access.roles.includes(e.requiresRole)||(s=!1)),s&&(r.setAttribute("href",e.url),r.innerHTML=`\n <div class="account-link__title">\n ${e.text}\n </div>`,e.description&&(r.innerHTML=`${r.innerHTML}\n <div class="account-link__description">\n ${e.description}\n </div>`),i.append(r),n.append(i))}c.append(n)}const d=document.createElement("div");d.classList.add("account-metadata");const p=document.createElement("h3");p.classList.add("account-metadata__login-name"),p.innerText=`${this._navTranslations[this._lang].login}: ${a.REDHAT_LOGIN}`;const u=document.createElement("div");u.classList.add("account-metadata__account-number"),u.innerText=`Account number: ${a.account_number}`;const l=document.createElement("div");l.classList.add("account-metadata__email"),l.innerText=a.email;const m=document.createElement("div");m.classList.add("account-metadata__logout-wrapper");const g=document.createElement("a");if(this.hasAttribute("logout-link")?(g.setAttribute("href",this.getAttribute("logout-link")),g.classList.add("a11y-logout-link")):this.error("Couldn't get logout link"),g.hasAttribute("href")&&(g.innerText="Log out",m.append(g)),d.append(p),a.realm_access.roles.includes("admin:org:all")){const a=document.createElement("div");a.classList.add("account-metadata__org-admin"),a.innerText=this._navTranslations[this._lang].orgAdmin,d.classList.add("account-metadata--org-admin"),d.append(a)}d.append(u),d.append(l);const f=d.cloneNode(!0);f.classList.add("account-metadata--mobile"),d.append(m),t.append(o),t.append(f),t.append(c),t.append(d);const _=this.shadowRoot.getElementById("wrapper");return _.parentElement.replaceChild(t,_),t}_processUserData(a){a.fullName=this._getFullName(a),this.getAttribute("full-name")!==a.fullName&&this.setAttribute("full-name",a.fullName),null===this._userData&&this._createAccountDropdown(a),"string"==typeof a.REDHAT_LOGIN?this._updateAvatarSrc(a.REDHAT_LOGIN):this.error("Could not find Redhat Login"),this._userData=a}_processUserReady(a){const t=a.target.user;"object"==typeof t&&this._processUserData(t)}}a.create(t);export default t;
class t extends a{static get version(){return"1.0.27"}get html(){return'\n<style>.element-invisible,.sr-only,.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host{display:block}:host([hidden]){display:none}.pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0;margin-left:auto;margin-right:auto;padding:24px;font-size:16px;color:#151515;color:var(--pfe-navigation__dropdown--Color,#151515);background:#fff;background:var(--pfe-navigation__dropdown--Background,var(--pfe-theme--color--surface--lightest,#fff))}@media (min-width:768px){.pfe-navigation__dropdown{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px);grid-auto-flow:row;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;padding:24px 64px}}@media (min-width:1200px){.pfe-navigation__dropdown{-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 32px;gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px)}}:host(.pfe-navigation--collapse-secondary-links) .pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;gap:0}.pfe-navigation__dropdown[class]{width:auto}.pfe-navigation__dropdown li,.pfe-navigation__dropdown ul{margin:0;padding:0;list-style:none}.pfe-navigation__dropdown a{display:inline-block;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c);border:1px solid transparent}.pfe-navigation__dropdown a:focus,.pfe-navigation__dropdown a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:underline}.pfe-navigation__dropdown a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown .pfe-link-list--header,.pfe-navigation__dropdown [role=heading][aria-heading-level],.pfe-navigation__dropdown h2,.pfe-navigation__dropdown h3,.pfe-navigation__dropdown h4,.pfe-navigation__dropdown h5,.pfe-navigation__dropdown h6{margin:32px 0 .75em;margin:var(--pfe-navigation--gutter,32px) 0 .75em;padding:0;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;font-size:18px;font-weight:400;color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646)}.pfe-navigation__dropdown .pfe-link-list--header:first-child,.pfe-navigation__dropdown [role=heading][aria-heading-level]:first-child,.pfe-navigation__dropdown h2:first-child,.pfe-navigation__dropdown h3:first-child,.pfe-navigation__dropdown h4:first-child,.pfe-navigation__dropdown h5:first-child,.pfe-navigation__dropdown h6:first-child{margin-top:0}.pfe-navigation__dropdown .pfe-link-list--header a,.pfe-navigation__dropdown [role=heading][aria-heading-level] a,.pfe-navigation__dropdown h2 a,.pfe-navigation__dropdown h3 a,.pfe-navigation__dropdown h4 a,.pfe-navigation__dropdown h5 a,.pfe-navigation__dropdown h6 a{color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646);border:1px solid transparent}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown .pfe-link-list--header a:hover,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:hover,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h2 a:hover,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h3 a:hover,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h4 a:hover,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h5 a:hover,.pfe-navigation__dropdown h6 a:focus,.pfe-navigation__dropdown h6 a:hover{text-decoration:underline;color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h6 a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown li{margin:0 0 16px;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown a,.pfe-navigation__dropdown pfe-card,.pfe-navigation__dropdown pfe-cta{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary],.pfe-navigation__dropdown pfe-cta[priority=primary]{--pfe-cta--BackgroundColor:#e00;--pfe-cta--BackgroundColor--hover:#c00;--pfe-theme--ui--border-width:0}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:hover,.pfe-navigation__dropdown pfe-cta[priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[priority=primary]:hover{--pfe-cta--BackgroundColor:#c00}pfe-card .pfe-navigation__dropdown pfe-cta{margin-top:0}.user-info[class]{-webkit-box-ordinal-group:-9;-webkit-order:-10;-ms-flex-order:-10;order:-10;position:relative;min-height:64px;margin-bottom:24px;padding-left:76px;font-size:18px}@media (min-width:768px){.user-info[class]{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;margin-bottom:32px}}:host(.pfe-navigation--collapse-secondary-links) .user-info[class]{margin-bottom:24px}.user-info[class] pfe-avatar{position:absolute;top:0;left:0;width:64px;height:64px;border-radius:50%;overflow:hidden;background:rgba(122,122,122,.2)}.user-info[class] .user-info__edit-avatar{font-size:16px;text-decoration:none;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}.user-info[class] .user-info__edit-avatar:focus,.user-info[class] .user-info__edit-avatar:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.account-links{-ms-grid-row:2;grid-row:2;-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;font-size:14px}@media (min-width:768px){.account-links{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;gap:var(--pfe-navigation--gutter,32px);grid-auto-flow:row}}:host(.pfe-navigation--collapse-secondary-links) .account-links{display:block}.account-links li{margin-bottom:.57143em;max-width:19.28571em}@media (min-width:768px){.account-links li{margin-bottom:1.5em}}:host(.pfe-navigation--collapse-secondary-links) .account-links li{margin-bottom:.57143em}.account-links[class] a{text-decoration:none}.account-links[class] a:focus,.account-links[class] a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:none}.account-links .account-link__title[class]{font-size:1.14286em;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}@media (min-width:768px){.account-links .account-link__title[class]{margin-bottom:8px}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__title[class]{margin-bottom:0}.account-links a:focus .account-link__title,.account-links a:hover .account-link__title{text-decoration:underline}.account-links .account-link__description{display:none;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}@media (min-width:768px){.account-links .account-link__description{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__description{display:none}@media (min-width:768px){.account-metadata{-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/span 2}}.account-metadata--mobile{-webkit-box-ordinal-group:-4;-webkit-order:-5;-ms-flex-order:-5;order:-5;display:block;margin-bottom:24px}@media (min-width:768px){.account-metadata--mobile{display:none}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata--mobile{display:block}.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:none}@media (min-width:768px){.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata__account-number,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__email,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__login-name,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__org-admin,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__organization{display:none}.account-metadata--mobile .account-metadata__account-number,.account-metadata--mobile .account-metadata__email,.account-metadata--mobile .account-metadata__login-name,.account-metadata--mobile .account-metadata__org-admin,.account-metadata--mobile .account-metadata__organization{display:block}.account-metadata__login-name[class]{font-size:16px;margin-bottom:1.5em}.account-metadata--org-admin .account-metadata__login-name[class]{margin-bottom:.5em}.account-metadata__account-number[class],.account-metadata__org-admin[class],.account-metadata__organization[class]{font-size:14px;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}.account-metadata__org-admin{margin-bottom:1.71429em}.account-metadata__email[class]{margin-top:1.5em}.account-metadata__logout-wrapper{margin-top:3em;padding:3em 0 24px;border-top:1px solid #d2d2d2}.account-metadata__logout-wrapper[class] a{padding:.375em 1em;color:#fff;color:var(--pfe-navigation__dropdown--Color--on-highlight,#fff);background:#e00;background:var(--pfe-navigation__dropdown--highlight-color,#e00);text-decoration:none;border-radius:3px} /*# sourceMappingURL=pfe-navigation-account.min.css.map */</style>\n<div>\n <div id="wrapper">\n </div>\n</div>'}static get tag(){return"pfe-navigation-account"}static get meta(){return{title:"Navigation account",description:"Be awesome."}}static get observedAttributes(){return["lang"]}get templateUrl(){return"pfe-navigation-account.html"}get styleUrl(){return"pfe-navigation-account.scss"}get userData(){return this.userData}set userData(a){this._processUserData(a)}static get PfeType(){return a.PfeTypes.Content}static get properties(){return{}}static get slots(){return{}}constructor(){super(t,{type:t.PfeType}),this._userData=null,this._avatars=[],this._lang="en",this._navTranslations={en:{accountDetails:"Account details",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},ja:{accountDetails:"Account details JA",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},ko:{accountDetails:"Account details KO",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},zh:{accountDetails:"Account details zh",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},de:{accountDetails:"Account details de",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},fr:{accountDetails:"Account details fr",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},it:{accountDetails:"Account details it",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},es:{accountDetails:"Account details es",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},pt:{accountDetails:"Account details pt",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."}},this._updateAvatarSrc=this._updateAvatarSrc.bind(this),this._createAccountDropdown=this._createAccountDropdown.bind(this),this._processUserReady=this._processUserReady.bind(this),this._processUserData=this._processUserData.bind(this);const a=document.querySelector("body");a.addEventListener("user-ready",this._processUserReady),a.addEventListener("user-update",this._processUserReady)}connectedCallback(){super.connectedCallback(),this.hasAttribute("lang")&&(this._lang=this.getAttribute("lang"))}disconnectedCallback(){const a=document.querySelector("body");a.removeEventListener("user-ready",this._processUserReady),a.removeEventListener("user-update",this._processUserReady)}attributeChangedCallback(a,t,n){super.attributeChangedCallback(a,t,n)}_createPfeAvatar(a,t){let n="";void 0===this.hasSlot&&(n="pfe-");const o=document.createElement("pfe-avatar");return o.setAttribute(`${n}name`,a),o.setAttribute(`${n}shape`,"circle"),"string"==typeof t&&o.setAttribute(`${n}src`,t),o}_getFullName(a){if("string"==typeof a.fullName)return a.fullName;let t="";return"string"==typeof a.firstName&&(t=a.firstName),"string"==typeof a.lastName&&(t=t.length?`${t} ${a.lastName}`:a.lastName),t.length||this.error("Couldn't get full name"),this.setAttribute("full-name",t),t}_updateAvatarSrc(a){if("undefined"!=typeof fetch&&(null===this._userData||"string"==typeof this._userData.REDHAT_LOGIN&&a!==this._userData.REDHAT_LOGIN)){let t="//access.redhat.com/api/users/avatar/";(document.domain.includes("access.")||document.domain.includes(".foo."))&&(t="/api/users/avatar/"),fetch(`${t}${a}`).then(a=>{if("object"==typeof a&&"number"==typeof a.status&&200===a.status&&"string"==typeof a.url&&!a.url.includes("blank.png")){this.setAttribute("avatar-url",a.url);for(let t=0;t<this._avatars.length;t++)this._avatars[t].setAttribute("src",a.url)}}).catch(a=>console.error(a))}}_createPfeIcon(a){let t="";void 0===this.hasSlot&&(t="pfe-");const n=document.createElement("pfe-icon");return n.setAttribute("icon",a),n.setAttribute(`${t}size`,"sm"),n.setAttribute("aria-hidden","true"),n}_createAccountMenuToggle(a){const t=this.shadowRoot.querySelector(".pfe-navigation__log-in-link"),n=document.createElement("button");n.classList.add("pfe-navigation__log-in-link","pfe-navigation__log-in-link--logged-in"),n.setAttribute("aria-label","Open user menu");const o=this._createPfeAvatar(a);return n.append(o),n.id="account__toggle",t.parentElement.replaceChild(n,t),this._avatars.push(o),n}_createAccountDropdown(a){const t=document.createElement("div");t.id="wrapper",t.classList.add("pfe-navigation__dropdown");const n=document.createElement("h3"),o=this._getFullName(a),e=this._createPfeAvatar(o);n.classList.add("user-info"),this._avatars.push(e),e.classList.add("user-info__avatar");const i=document.createElement("div");i.classList.add("user-info__full-name"),i.innerText=o;const r=document.createElement("a");r.setAttribute("href","https://access.redhat.com/user/edit"),r.classList.add("user-info__edit-avatar"),r.innerText="Edit avatar",r.prepend(this._createPfeIcon("web-caret-right")),n.append(e),n.append(i),n.append(r);const s=[[{text:this._navTranslations[this._lang].accountDetails,url:"https://www.redhat.com/wapps/ugc/protected/personalInfo.html",description:this._navTranslations[this._lang].accountDetailsDesc},{text:this._navTranslations[this._lang].profile,url:"https://access.redhat.com/user",description:this._navTranslations[this._lang].profileDesc},{text:this._navTranslations[this._lang].training,url:"https://rol.redhat.com/rol/app/",description:this._navTranslations[this._lang].trainingDesc}],[{text:this._navTranslations[this._lang].subscriptions,url:"https://access.redhat.com/management",description:this._navTranslations[this._lang].subscriptionsDesc,requiresRole:"portal_manage_subscriptions"},{text:this._navTranslations[this._lang].accountTeam,url:"https://access.redhat.com/account-team",description:this._navTranslations[this._lang].accountTeamDesc},{text:this._navTranslations[this._lang].userManagement,url:"https://www.redhat.com/wapps/ugc/protected/usermgt/userList.html",description:this._navTranslations[this._lang].userManagementDesc,requiresRole:"admin:org:all"},{text:this._navTranslations[this._lang].support,url:"https://access.redhat.com/support/cases/#/troubleshoot/",description:this._navTranslations[this._lang].supportDesc}]],c=document.createElement("div");c.classList.add("account-links"),c.setAttribute("aria-label","Account managemement links");for(let t=0;t<s.length;t++){const n=s[t],o=document.createElement("ul");o.classList.add("account-links__column");for(let t=0;t<n.length;t++){const e=n[t],i=document.createElement("li"),r=document.createElement("a");let s=!0;void 0!==e.requiresRole&&(a.realm_access.roles.includes(e.requiresRole)||(s=!1)),s&&(r.setAttribute("href",e.url),r.innerHTML=`\n <div class="account-link__title">\n ${e.text}\n </div>`,e.description&&(r.innerHTML=`${r.innerHTML}\n <div class="account-link__description">\n ${e.description}\n </div>`),i.append(r),o.append(i))}c.append(o)}const d=document.createElement("div");d.classList.add("account-metadata");const p=document.createElement("h3");p.classList.add("account-metadata__login-name"),p.innerText=`${this._navTranslations[this._lang].login}: ${a.REDHAT_LOGIN}`;const u=document.createElement("div");u.classList.add("account-metadata__account-number"),u.innerText=`Account number: ${a.account_number}`;const l=document.createElement("div");l.classList.add("account-metadata__email"),l.innerText=a.email;const m=document.createElement("div");m.classList.add("account-metadata__logout-wrapper");const g=document.createElement("a");if(this.hasAttribute("logout-link")?(g.setAttribute("href",this.getAttribute("logout-link")),g.classList.add("a11y-logout-link")):this.error("Couldn't get logout link"),g.hasAttribute("href")&&(g.innerText="Log out",m.append(g)),d.append(p),a.realm_access.roles.includes("admin:org:all")){const a=document.createElement("div");a.classList.add("account-metadata__org-admin"),a.innerText=this._navTranslations[this._lang].orgAdmin,d.classList.add("account-metadata--org-admin"),d.append(a)}d.append(u),d.append(l);const f=d.cloneNode(!0);f.classList.add("account-metadata--mobile"),d.append(m),t.append(n),t.append(f),t.append(c),t.append(d);const _=this.shadowRoot.getElementById("wrapper");return _.parentElement.replaceChild(t,_),t}_processUserData(a){a.fullName=this._getFullName(a),this.getAttribute("full-name")!==a.fullName&&this.setAttribute("full-name",a.fullName),null===this._userData&&this._createAccountDropdown(a),"string"==typeof a.REDHAT_LOGIN?this._updateAvatarSrc(a.REDHAT_LOGIN):this.error("Could not find Redhat Login"),this._userData=a}_processUserReady(a){const t=a.target.user;"object"==typeof t&&this._processUserData(t)}}a.create(t);export default t;
//# sourceMappingURL=pfe-navigation-account.min.js.map

@@ -90,3 +90,3 @@ (function (global, factory) {

/*!
* PatternFly Elements: PfeNavigationAccount 1.0.26
* PatternFly Elements: PfeNavigationAccount 1.0.27
* @license

@@ -127,3 +127,3 @@ * Copyright 2020 Red Hat, Inc.

get: function get() {
return "\n<style>.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.element-invisible,.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host{display:block}:host([hidden]){display:none}.pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0;margin-left:auto;margin-right:auto;padding:24px;font-size:16px;color:#151515;color:var(--pfe-navigation__dropdown--Color,#151515);background:#fff;background:var(--pfe-navigation__dropdown--Background,var(--pfe-theme--color--surface--lightest,#fff))}@media (min-width:768px){.pfe-navigation__dropdown{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px);grid-auto-flow:row;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;padding:24px 64px}}@media (min-width:1200px){.pfe-navigation__dropdown{-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 32px;gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px)}}:host(.pfe-navigation--collapse-secondary-links) .pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;gap:0}.pfe-navigation__dropdown[class]{width:auto}.pfe-navigation__dropdown li,.pfe-navigation__dropdown ul{margin:0;padding:0;list-style:none}.pfe-navigation__dropdown a{display:inline-block;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c);border:1px solid transparent}.pfe-navigation__dropdown a:focus,.pfe-navigation__dropdown a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:underline}.pfe-navigation__dropdown a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown .pfe-link-list--header,.pfe-navigation__dropdown [role=heading][aria-heading-level],.pfe-navigation__dropdown h2,.pfe-navigation__dropdown h3,.pfe-navigation__dropdown h4,.pfe-navigation__dropdown h5,.pfe-navigation__dropdown h6{margin:32px 0 .75em;margin:var(--pfe-navigation--gutter,32px) 0 .75em;padding:0;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;font-size:18px;font-weight:400;color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646)}.pfe-navigation__dropdown .pfe-link-list--header:first-child,.pfe-navigation__dropdown [role=heading][aria-heading-level]:first-child,.pfe-navigation__dropdown h2:first-child,.pfe-navigation__dropdown h3:first-child,.pfe-navigation__dropdown h4:first-child,.pfe-navigation__dropdown h5:first-child,.pfe-navigation__dropdown h6:first-child{margin-top:0}.pfe-navigation__dropdown .pfe-link-list--header a,.pfe-navigation__dropdown [role=heading][aria-heading-level] a,.pfe-navigation__dropdown h2 a,.pfe-navigation__dropdown h3 a,.pfe-navigation__dropdown h4 a,.pfe-navigation__dropdown h5 a,.pfe-navigation__dropdown h6 a{color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646);border:1px solid transparent}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown .pfe-link-list--header a:hover,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:hover,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h2 a:hover,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h3 a:hover,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h4 a:hover,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h5 a:hover,.pfe-navigation__dropdown h6 a:focus,.pfe-navigation__dropdown h6 a:hover{text-decoration:underline;color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h6 a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown li{margin:0 0 16px;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown a,.pfe-navigation__dropdown pfe-card,.pfe-navigation__dropdown pfe-cta{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary],.pfe-navigation__dropdown pfe-cta[priority=primary]{--pfe-cta--BackgroundColor:#e00;--pfe-cta--BackgroundColor--hover:#c00;--pfe-theme--ui--border-width:0}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:hover,.pfe-navigation__dropdown pfe-cta[priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[priority=primary]:hover{--pfe-cta--BackgroundColor:#c00}pfe-card .pfe-navigation__dropdown pfe-cta{margin-top:0}.user-info[class]{-webkit-box-ordinal-group:-9;-webkit-order:-10;-ms-flex-order:-10;order:-10;position:relative;min-height:64px;margin-bottom:24px;padding-left:76px;font-size:18px}@media (min-width:768px){.user-info[class]{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;margin-bottom:32px}}:host(.pfe-navigation--collapse-secondary-links) .user-info[class]{margin-bottom:24px}.user-info[class] pfe-avatar{position:absolute;top:0;left:0;width:64px;height:64px;border-radius:50%;overflow:hidden;background:rgba(122,122,122,.2)}.user-info[class] .user-info__edit-avatar{font-size:16px;text-decoration:none;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}.user-info[class] .user-info__edit-avatar:focus,.user-info[class] .user-info__edit-avatar:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.account-links{-ms-grid-row:2;grid-row:2;-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;font-size:14px}@media (min-width:768px){.account-links{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;gap:var(--pfe-navigation--gutter,32px);grid-auto-flow:row}}:host(.pfe-navigation--collapse-secondary-links) .account-links{display:block}.account-links li{margin-bottom:.57143em;max-width:19.28571em}@media (min-width:768px){.account-links li{margin-bottom:1.5em}}:host(.pfe-navigation--collapse-secondary-links) .account-links li{margin-bottom:.57143em}.account-links[class] a{text-decoration:none}.account-links[class] a:focus,.account-links[class] a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:none}.account-links .account-link__title[class]{font-size:1.14286em;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}@media (min-width:768px){.account-links .account-link__title[class]{margin-bottom:8px}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__title[class]{margin-bottom:0}.account-links a:focus .account-link__title,.account-links a:hover .account-link__title{text-decoration:underline}.account-links .account-link__description{display:none;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}@media (min-width:768px){.account-links .account-link__description{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__description{display:none}@media (min-width:768px){.account-metadata{-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/span 2}}.account-metadata--mobile{-webkit-box-ordinal-group:-4;-webkit-order:-5;-ms-flex-order:-5;order:-5;display:block;margin-bottom:24px}@media (min-width:768px){.account-metadata--mobile{display:none}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata--mobile{display:block}.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:none}@media (min-width:768px){.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata__account-number,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__email,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__login-name,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__org-admin,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__organization{display:none}.account-metadata--mobile .account-metadata__account-number,.account-metadata--mobile .account-metadata__email,.account-metadata--mobile .account-metadata__login-name,.account-metadata--mobile .account-metadata__org-admin,.account-metadata--mobile .account-metadata__organization{display:block}.account-metadata__login-name[class]{font-size:16px;margin-bottom:1.5em}.account-metadata--org-admin .account-metadata__login-name[class]{margin-bottom:.5em}.account-metadata__account-number[class],.account-metadata__org-admin[class],.account-metadata__organization[class]{font-size:14px;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}.account-metadata__org-admin{margin-bottom:1.71429em}.account-metadata__email[class]{margin-top:1.5em}.account-metadata__logout-wrapper{margin-top:3em;padding:3em 0 24px;border-top:1px solid #d2d2d2}.account-metadata__logout-wrapper[class] a{padding:.375em 1em;color:#fff;color:var(--pfe-navigation__dropdown--Color--on-highlight,#fff);background:#e00;background:var(--pfe-navigation__dropdown--highlight-color,#e00);text-decoration:none;border-radius:3px} /*# sourceMappingURL=pfe-navigation-account.min.css.map */</style>\n<div id=\"wrapper\">\n</div>";
return "\n<style>.element-invisible,.sr-only,.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host{display:block}:host([hidden]){display:none}.pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0;margin-left:auto;margin-right:auto;padding:24px;font-size:16px;color:#151515;color:var(--pfe-navigation__dropdown--Color,#151515);background:#fff;background:var(--pfe-navigation__dropdown--Background,var(--pfe-theme--color--surface--lightest,#fff))}@media (min-width:768px){.pfe-navigation__dropdown{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px);grid-auto-flow:row;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;padding:24px 64px}}@media (min-width:1200px){.pfe-navigation__dropdown{-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 32px;gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px)}}:host(.pfe-navigation--collapse-secondary-links) .pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;gap:0}.pfe-navigation__dropdown[class]{width:auto}.pfe-navigation__dropdown li,.pfe-navigation__dropdown ul{margin:0;padding:0;list-style:none}.pfe-navigation__dropdown a{display:inline-block;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c);border:1px solid transparent}.pfe-navigation__dropdown a:focus,.pfe-navigation__dropdown a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:underline}.pfe-navigation__dropdown a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown .pfe-link-list--header,.pfe-navigation__dropdown [role=heading][aria-heading-level],.pfe-navigation__dropdown h2,.pfe-navigation__dropdown h3,.pfe-navigation__dropdown h4,.pfe-navigation__dropdown h5,.pfe-navigation__dropdown h6{margin:32px 0 .75em;margin:var(--pfe-navigation--gutter,32px) 0 .75em;padding:0;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;font-size:18px;font-weight:400;color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646)}.pfe-navigation__dropdown .pfe-link-list--header:first-child,.pfe-navigation__dropdown [role=heading][aria-heading-level]:first-child,.pfe-navigation__dropdown h2:first-child,.pfe-navigation__dropdown h3:first-child,.pfe-navigation__dropdown h4:first-child,.pfe-navigation__dropdown h5:first-child,.pfe-navigation__dropdown h6:first-child{margin-top:0}.pfe-navigation__dropdown .pfe-link-list--header a,.pfe-navigation__dropdown [role=heading][aria-heading-level] a,.pfe-navigation__dropdown h2 a,.pfe-navigation__dropdown h3 a,.pfe-navigation__dropdown h4 a,.pfe-navigation__dropdown h5 a,.pfe-navigation__dropdown h6 a{color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646);border:1px solid transparent}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown .pfe-link-list--header a:hover,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:hover,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h2 a:hover,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h3 a:hover,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h4 a:hover,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h5 a:hover,.pfe-navigation__dropdown h6 a:focus,.pfe-navigation__dropdown h6 a:hover{text-decoration:underline;color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h6 a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown li{margin:0 0 16px;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown a,.pfe-navigation__dropdown pfe-card,.pfe-navigation__dropdown pfe-cta{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary],.pfe-navigation__dropdown pfe-cta[priority=primary]{--pfe-cta--BackgroundColor:#e00;--pfe-cta--BackgroundColor--hover:#c00;--pfe-theme--ui--border-width:0}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:hover,.pfe-navigation__dropdown pfe-cta[priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[priority=primary]:hover{--pfe-cta--BackgroundColor:#c00}pfe-card .pfe-navigation__dropdown pfe-cta{margin-top:0}.user-info[class]{-webkit-box-ordinal-group:-9;-webkit-order:-10;-ms-flex-order:-10;order:-10;position:relative;min-height:64px;margin-bottom:24px;padding-left:76px;font-size:18px}@media (min-width:768px){.user-info[class]{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;margin-bottom:32px}}:host(.pfe-navigation--collapse-secondary-links) .user-info[class]{margin-bottom:24px}.user-info[class] pfe-avatar{position:absolute;top:0;left:0;width:64px;height:64px;border-radius:50%;overflow:hidden;background:rgba(122,122,122,.2)}.user-info[class] .user-info__edit-avatar{font-size:16px;text-decoration:none;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}.user-info[class] .user-info__edit-avatar:focus,.user-info[class] .user-info__edit-avatar:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.account-links{-ms-grid-row:2;grid-row:2;-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;font-size:14px}@media (min-width:768px){.account-links{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;gap:var(--pfe-navigation--gutter,32px);grid-auto-flow:row}}:host(.pfe-navigation--collapse-secondary-links) .account-links{display:block}.account-links li{margin-bottom:.57143em;max-width:19.28571em}@media (min-width:768px){.account-links li{margin-bottom:1.5em}}:host(.pfe-navigation--collapse-secondary-links) .account-links li{margin-bottom:.57143em}.account-links[class] a{text-decoration:none}.account-links[class] a:focus,.account-links[class] a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:none}.account-links .account-link__title[class]{font-size:1.14286em;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}@media (min-width:768px){.account-links .account-link__title[class]{margin-bottom:8px}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__title[class]{margin-bottom:0}.account-links a:focus .account-link__title,.account-links a:hover .account-link__title{text-decoration:underline}.account-links .account-link__description{display:none;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}@media (min-width:768px){.account-links .account-link__description{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__description{display:none}@media (min-width:768px){.account-metadata{-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/span 2}}.account-metadata--mobile{-webkit-box-ordinal-group:-4;-webkit-order:-5;-ms-flex-order:-5;order:-5;display:block;margin-bottom:24px}@media (min-width:768px){.account-metadata--mobile{display:none}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata--mobile{display:block}.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:none}@media (min-width:768px){.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata__account-number,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__email,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__login-name,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__org-admin,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__organization{display:none}.account-metadata--mobile .account-metadata__account-number,.account-metadata--mobile .account-metadata__email,.account-metadata--mobile .account-metadata__login-name,.account-metadata--mobile .account-metadata__org-admin,.account-metadata--mobile .account-metadata__organization{display:block}.account-metadata__login-name[class]{font-size:16px;margin-bottom:1.5em}.account-metadata--org-admin .account-metadata__login-name[class]{margin-bottom:.5em}.account-metadata__account-number[class],.account-metadata__org-admin[class],.account-metadata__organization[class]{font-size:14px;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}.account-metadata__org-admin{margin-bottom:1.71429em}.account-metadata__email[class]{margin-top:1.5em}.account-metadata__logout-wrapper{margin-top:3em;padding:3em 0 24px;border-top:1px solid #d2d2d2}.account-metadata__logout-wrapper[class] a{padding:.375em 1em;color:#fff;color:var(--pfe-navigation__dropdown--Color--on-highlight,#fff);background:#e00;background:var(--pfe-navigation__dropdown--highlight-color,#e00);text-decoration:none;border-radius:3px} /*# sourceMappingURL=pfe-navigation-account.min.css.map */</style>\n<div>\n <div id=\"wrapper\">\n </div>\n</div>";
}

@@ -162,3 +162,3 @@ }, {

get: function get() {
return "1.0.26";
return "1.0.27";
}

@@ -517,2 +517,6 @@ }, {

// Don't bother getting avatar if browser doesn't support fetch
if (typeof fetch === "undefined") {
return;
}
// If REDHAT_LOGIN exists and hasn't changed, there's no reason to fetch a new avatar

@@ -519,0 +523,0 @@ if (this._userData === null || typeof this._userData.REDHAT_LOGIN === "string" && REDHAT_LOGIN !== this._userData.REDHAT_LOGIN) {

@@ -1,2 +0,2 @@

!function(t,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("../../../@patternfly/pfelement/dist/pfelement.umd.min"),require("../../../@patternfly/pfe-avatar/dist/pfe-avatar.umd.min")):"function"==typeof define&&define.amd?define(["../../../@patternfly/pfelement/dist/pfelement.umd.min","../../../@patternfly/pfe-avatar/dist/pfe-avatar.umd.min"],a):(t=t||self).PfeNavigationAccount=a(t.PFElement,t.PfeAvatar)}(this,function(t,a){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")},a=function(t,a,e){return a&&o(t.prototype,a),e&&o(t,e),t};function o(t,a){for(var e=0;e<a.length;e++){var n=a[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,a,e){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,a);if(void 0!==n){if("value"in n)return n.value;n=n.get;return void 0!==n?n.call(e):void 0}if(null!==(t=Object.getPrototypeOf(t)))return i(t,a,e)}var r=function(t,a){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=typeof a&&"function"!=typeof a?t:a},a=(function(t,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);t.prototype=Object.create(a&&a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(t,a):t.__proto__=a)}(c,t),a(c,[{key:"html",get:function(){return'\n<style>.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.element-invisible,.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host{display:block}:host([hidden]){display:none}.pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0;margin-left:auto;margin-right:auto;padding:24px;font-size:16px;color:#151515;color:var(--pfe-navigation__dropdown--Color,#151515);background:#fff;background:var(--pfe-navigation__dropdown--Background,var(--pfe-theme--color--surface--lightest,#fff))}@media (min-width:768px){.pfe-navigation__dropdown{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px);grid-auto-flow:row;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;padding:24px 64px}}@media (min-width:1200px){.pfe-navigation__dropdown{-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 32px;gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px)}}:host(.pfe-navigation--collapse-secondary-links) .pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;gap:0}.pfe-navigation__dropdown[class]{width:auto}.pfe-navigation__dropdown li,.pfe-navigation__dropdown ul{margin:0;padding:0;list-style:none}.pfe-navigation__dropdown a{display:inline-block;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c);border:1px solid transparent}.pfe-navigation__dropdown a:focus,.pfe-navigation__dropdown a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:underline}.pfe-navigation__dropdown a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown .pfe-link-list--header,.pfe-navigation__dropdown [role=heading][aria-heading-level],.pfe-navigation__dropdown h2,.pfe-navigation__dropdown h3,.pfe-navigation__dropdown h4,.pfe-navigation__dropdown h5,.pfe-navigation__dropdown h6{margin:32px 0 .75em;margin:var(--pfe-navigation--gutter,32px) 0 .75em;padding:0;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;font-size:18px;font-weight:400;color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646)}.pfe-navigation__dropdown .pfe-link-list--header:first-child,.pfe-navigation__dropdown [role=heading][aria-heading-level]:first-child,.pfe-navigation__dropdown h2:first-child,.pfe-navigation__dropdown h3:first-child,.pfe-navigation__dropdown h4:first-child,.pfe-navigation__dropdown h5:first-child,.pfe-navigation__dropdown h6:first-child{margin-top:0}.pfe-navigation__dropdown .pfe-link-list--header a,.pfe-navigation__dropdown [role=heading][aria-heading-level] a,.pfe-navigation__dropdown h2 a,.pfe-navigation__dropdown h3 a,.pfe-navigation__dropdown h4 a,.pfe-navigation__dropdown h5 a,.pfe-navigation__dropdown h6 a{color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646);border:1px solid transparent}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown .pfe-link-list--header a:hover,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:hover,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h2 a:hover,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h3 a:hover,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h4 a:hover,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h5 a:hover,.pfe-navigation__dropdown h6 a:focus,.pfe-navigation__dropdown h6 a:hover{text-decoration:underline;color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h6 a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown li{margin:0 0 16px;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown a,.pfe-navigation__dropdown pfe-card,.pfe-navigation__dropdown pfe-cta{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary],.pfe-navigation__dropdown pfe-cta[priority=primary]{--pfe-cta--BackgroundColor:#e00;--pfe-cta--BackgroundColor--hover:#c00;--pfe-theme--ui--border-width:0}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:hover,.pfe-navigation__dropdown pfe-cta[priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[priority=primary]:hover{--pfe-cta--BackgroundColor:#c00}pfe-card .pfe-navigation__dropdown pfe-cta{margin-top:0}.user-info[class]{-webkit-box-ordinal-group:-9;-webkit-order:-10;-ms-flex-order:-10;order:-10;position:relative;min-height:64px;margin-bottom:24px;padding-left:76px;font-size:18px}@media (min-width:768px){.user-info[class]{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;margin-bottom:32px}}:host(.pfe-navigation--collapse-secondary-links) .user-info[class]{margin-bottom:24px}.user-info[class] pfe-avatar{position:absolute;top:0;left:0;width:64px;height:64px;border-radius:50%;overflow:hidden;background:rgba(122,122,122,.2)}.user-info[class] .user-info__edit-avatar{font-size:16px;text-decoration:none;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}.user-info[class] .user-info__edit-avatar:focus,.user-info[class] .user-info__edit-avatar:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.account-links{-ms-grid-row:2;grid-row:2;-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;font-size:14px}@media (min-width:768px){.account-links{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;gap:var(--pfe-navigation--gutter,32px);grid-auto-flow:row}}:host(.pfe-navigation--collapse-secondary-links) .account-links{display:block}.account-links li{margin-bottom:.57143em;max-width:19.28571em}@media (min-width:768px){.account-links li{margin-bottom:1.5em}}:host(.pfe-navigation--collapse-secondary-links) .account-links li{margin-bottom:.57143em}.account-links[class] a{text-decoration:none}.account-links[class] a:focus,.account-links[class] a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:none}.account-links .account-link__title[class]{font-size:1.14286em;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}@media (min-width:768px){.account-links .account-link__title[class]{margin-bottom:8px}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__title[class]{margin-bottom:0}.account-links a:focus .account-link__title,.account-links a:hover .account-link__title{text-decoration:underline}.account-links .account-link__description{display:none;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}@media (min-width:768px){.account-links .account-link__description{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__description{display:none}@media (min-width:768px){.account-metadata{-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/span 2}}.account-metadata--mobile{-webkit-box-ordinal-group:-4;-webkit-order:-5;-ms-flex-order:-5;order:-5;display:block;margin-bottom:24px}@media (min-width:768px){.account-metadata--mobile{display:none}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata--mobile{display:block}.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:none}@media (min-width:768px){.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata__account-number,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__email,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__login-name,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__org-admin,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__organization{display:none}.account-metadata--mobile .account-metadata__account-number,.account-metadata--mobile .account-metadata__email,.account-metadata--mobile .account-metadata__login-name,.account-metadata--mobile .account-metadata__org-admin,.account-metadata--mobile .account-metadata__organization{display:block}.account-metadata__login-name[class]{font-size:16px;margin-bottom:1.5em}.account-metadata--org-admin .account-metadata__login-name[class]{margin-bottom:.5em}.account-metadata__account-number[class],.account-metadata__org-admin[class],.account-metadata__organization[class]{font-size:14px;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}.account-metadata__org-admin{margin-bottom:1.71429em}.account-metadata__email[class]{margin-top:1.5em}.account-metadata__logout-wrapper{margin-top:3em;padding:3em 0 24px;border-top:1px solid #d2d2d2}.account-metadata__logout-wrapper[class] a{padding:.375em 1em;color:#fff;color:var(--pfe-navigation__dropdown--Color--on-highlight,#fff);background:#e00;background:var(--pfe-navigation__dropdown--highlight-color,#e00);text-decoration:none;border-radius:3px} /*# sourceMappingURL=pfe-navigation-account.min.css.map */</style>\n<div id="wrapper">\n</div>'}},{key:"templateUrl",get:function(){return"pfe-navigation-account.html"}},{key:"styleUrl",get:function(){return"pfe-navigation-account.scss"}},{key:"userData",get:function(){return this.userData},set:function(t){this._processUserData(t)}}],[{key:"version",get:function(){return"1.0.26"}},{key:"tag",get:function(){return"pfe-navigation-account"}},{key:"meta",get:function(){return{title:"Navigation account",description:"Be awesome."}}},{key:"observedAttributes",get:function(){return["lang"]}},{key:"PfeType",get:function(){return t.PfeTypes.Content}},{key:"properties",get:function(){return{}}},{key:"slots",get:function(){return{}}}]),a(c,[{key:"connectedCallback",value:function(){i(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.hasAttribute("lang")&&(this._lang=this.getAttribute("lang"))}},{key:"disconnectedCallback",value:function(){var t=document.querySelector("body");t.removeEventListener("user-ready",this._processUserReady),t.removeEventListener("user-update",this._processUserReady)}},{key:"attributeChangedCallback",value:function(t,a,e){i(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"attributeChangedCallback",this).call(this,t,a,e)}},{key:"_createPfeAvatar",value:function(t,a){var e="";void 0===this.hasSlot&&(e="pfe-");var n=document.createElement("pfe-avatar");return n.setAttribute(e+"name",t),n.setAttribute(e+"shape","circle"),"string"==typeof a&&n.setAttribute(e+"src",a),n}},{key:"_getFullName",value:function(t){if("string"==typeof t.fullName)return t.fullName;var a="";return"string"==typeof t.firstName&&(a=t.firstName),(a="string"==typeof t.lastName?a.length?a+" "+t.lastName:t.lastName:a).length||this.error("Couldn't get full name"),this.setAttribute("full-name",a),a}},{key:"_updateAvatarSrc",value:function(t){var a,e=this;(null===this._userData||"string"==typeof this._userData.REDHAT_LOGIN&&t!==this._userData.REDHAT_LOGIN)&&(a="//access.redhat.com/api/users/avatar/",(document.domain.includes("access.")||document.domain.includes(".foo."))&&(a="/api/users/avatar/"),fetch(""+a+t).then(function(t){if("object"===(void 0===t?"undefined":n(t))&&"number"==typeof t.status&&200===t.status&&"string"==typeof t.url&&!t.url.includes("blank.png")){e.setAttribute("avatar-url",t.url);for(var a=0;a<e._avatars.length;a++)e._avatars[a].setAttribute("src",t.url)}}).catch(function(t){return console.error(t)}))}},{key:"_createPfeIcon",value:function(t){var a="";void 0===this.hasSlot&&(a="pfe-");var e=document.createElement("pfe-icon");return e.setAttribute("icon",t),e.setAttribute(a+"size","sm"),e.setAttribute("aria-hidden","true"),e}},{key:"_createAccountMenuToggle",value:function(t){var a=this.shadowRoot.querySelector(".pfe-navigation__log-in-link"),e=document.createElement("button");e.classList.add("pfe-navigation__log-in-link","pfe-navigation__log-in-link--logged-in"),e.setAttribute("aria-label","Open user menu");t=this._createPfeAvatar(t);return e.append(t),e.id="account__toggle",a.parentElement.replaceChild(e,a),this._avatars.push(t),e}},{key:"_createAccountDropdown",value:function(t){var a=document.createElement("div");a.id="wrapper",a.classList.add("pfe-navigation__dropdown");var e=document.createElement("h3"),n=this._getFullName(t),o=this._createPfeAvatar(n);e.classList.add("user-info"),this._avatars.push(o),o.classList.add("user-info__avatar");var i=document.createElement("div");i.classList.add("user-info__full-name"),i.innerText=n;var r=document.createElement("a");r.setAttribute("href","https://access.redhat.com/user/edit"),r.classList.add("user-info__edit-avatar"),r.innerText="Edit avatar",r.prepend(this._createPfeIcon("web-caret-right")),e.append(o),e.append(i),e.append(r);var c=[[{text:this._navTranslations[this._lang].accountDetails,url:"https://www.redhat.com/wapps/ugc/protected/personalInfo.html",description:this._navTranslations[this._lang].accountDetailsDesc},{text:this._navTranslations[this._lang].profile,url:"https://access.redhat.com/user",description:this._navTranslations[this._lang].profileDesc},{text:this._navTranslations[this._lang].training,url:"https://rol.redhat.com/rol/app/",description:this._navTranslations[this._lang].trainingDesc}],[{text:this._navTranslations[this._lang].subscriptions,url:"https://access.redhat.com/management",description:this._navTranslations[this._lang].subscriptionsDesc,requiresRole:"portal_manage_subscriptions"},{text:this._navTranslations[this._lang].accountTeam,url:"https://access.redhat.com/account-team",description:this._navTranslations[this._lang].accountTeamDesc},{text:this._navTranslations[this._lang].userManagement,url:"https://www.redhat.com/wapps/ugc/protected/usermgt/userList.html",description:this._navTranslations[this._lang].userManagementDesc,requiresRole:"admin:org:all"},{text:this._navTranslations[this._lang].support,url:"https://access.redhat.com/support/cases/#/troubleshoot/",description:this._navTranslations[this._lang].supportDesc}]],s=document.createElement("div");s.classList.add("account-links"),s.setAttribute("aria-label","Account managemement links");for(var u=0;u<c.length;u++){var p=c[u],d=document.createElement("ul");d.classList.add("account-links__column");for(var l=0;l<p.length;l++){var m=p[l],g=document.createElement("li"),f=document.createElement("a"),_=!0;void 0!==m.requiresRole&&(t.realm_access.roles.includes(m.requiresRole)||(_=!1)),_&&(f.setAttribute("href",m.url),f.innerHTML='\n <div class="account-link__title">\n '+m.text+"\n </div>",m.description&&(f.innerHTML=f.innerHTML+'\n <div class="account-link__description">\n '+m.description+"\n </div>"),g.append(f),d.append(g))}s.append(d)}var h=document.createElement("div");h.classList.add("account-metadata");var v=document.createElement("h3");v.classList.add("account-metadata__login-name"),v.innerText=this._navTranslations[this._lang].login+": "+t.REDHAT_LOGIN;n=document.createElement("div");n.classList.add("account-metadata__account-number"),n.innerText="Account number: "+t.account_number;o=document.createElement("div");o.classList.add("account-metadata__email"),o.innerText=t.email;i=document.createElement("div");i.classList.add("account-metadata__logout-wrapper");r=document.createElement("a");this.hasAttribute("logout-link")?(r.setAttribute("href",this.getAttribute("logout-link")),r.classList.add("a11y-logout-link")):this.error("Couldn't get logout link"),r.hasAttribute("href")&&(r.innerText="Log out",i.append(r)),h.append(v),t.realm_access.roles.includes("admin:org:all")&&((v=document.createElement("div")).classList.add("account-metadata__org-admin"),v.innerText=this._navTranslations[this._lang].orgAdmin,h.classList.add("account-metadata--org-admin"),h.append(v)),h.append(n),h.append(o);o=h.cloneNode(!0);o.classList.add("account-metadata--mobile"),h.append(i),a.append(e),a.append(o),a.append(s),a.append(h);h=this.shadowRoot.getElementById("wrapper");return h.parentElement.replaceChild(a,h),a}},{key:"_processUserData",value:function(t){t.fullName=this._getFullName(t),this.getAttribute("full-name")!==t.fullName&&this.setAttribute("full-name",t.fullName),null===this._userData&&this._createAccountDropdown(t),"string"==typeof t.REDHAT_LOGIN?this._updateAvatarSrc(t.REDHAT_LOGIN):this.error("Could not find Redhat Login"),this._userData=t}},{key:"_processUserReady",value:function(t){t=t.target.user;"object"===(void 0===t?"undefined":n(t))&&this._processUserData(t)}}]),c);function c(){e(this,c);var t=r(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,c,{type:c.PfeType}));t._userData=null,t._avatars=[],t._lang="en",t._navTranslations={en:{accountDetails:"Account details",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},ja:{accountDetails:"Account details JA",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},ko:{accountDetails:"Account details KO",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},zh:{accountDetails:"Account details zh",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},de:{accountDetails:"Account details de",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},fr:{accountDetails:"Account details fr",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},it:{accountDetails:"Account details it",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},es:{accountDetails:"Account details es",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},pt:{accountDetails:"Account details pt",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."}},t._updateAvatarSrc=t._updateAvatarSrc.bind(t),t._createAccountDropdown=t._createAccountDropdown.bind(t),t._processUserReady=t._processUserReady.bind(t),t._processUserData=t._processUserData.bind(t);var a=document.querySelector("body");return a.addEventListener("user-ready",t._processUserReady),a.addEventListener("user-update",t._processUserReady),t}return t.create(a),a});
!function(t,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("../../../@patternfly/pfelement/dist/pfelement.umd.min"),require("../../../@patternfly/pfe-avatar/dist/pfe-avatar.umd.min")):"function"==typeof define&&define.amd?define(["../../../@patternfly/pfelement/dist/pfelement.umd.min","../../../@patternfly/pfe-avatar/dist/pfe-avatar.umd.min"],a):(t=t||self).PfeNavigationAccount=a(t.PFElement,t.PfeAvatar)}(this,function(t,a){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")},a=function(t,a,e){return a&&o(t.prototype,a),e&&o(t,e),t};function o(t,a){for(var e=0;e<a.length;e++){var n=a[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,a,e){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,a);if(void 0!==n){if("value"in n)return n.value;n=n.get;return void 0!==n?n.call(e):void 0}if(null!==(t=Object.getPrototypeOf(t)))return i(t,a,e)}var r=function(t,a){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=typeof a&&"function"!=typeof a?t:a},a=(function(t,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);t.prototype=Object.create(a&&a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(t,a):t.__proto__=a)}(c,t),a(c,[{key:"html",get:function(){return'\n<style>.element-invisible,.sr-only,.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host{display:block}:host([hidden]){display:none}.pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0;margin-left:auto;margin-right:auto;padding:24px;font-size:16px;color:#151515;color:var(--pfe-navigation__dropdown--Color,#151515);background:#fff;background:var(--pfe-navigation__dropdown--Background,var(--pfe-theme--color--surface--lightest,#fff))}@media (min-width:768px){.pfe-navigation__dropdown{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px);grid-auto-flow:row;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;padding:24px 64px}}@media (min-width:1200px){.pfe-navigation__dropdown{-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 32px;gap:0 32px;gap:0 var(--pfe-navigation--gutter,32px)}}:host(.pfe-navigation--collapse-secondary-links) .pfe-navigation__dropdown{display:block;width:calc(100% + 32px);max-width:1136px;max-width:var(--pfe-navigation--content-max-width,1136px);margin-left:-16px;margin-right:-16px;padding-top:12px;padding-bottom:12px;-webkit-column-count:auto;-moz-column-count:auto;column-count:auto;gap:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;gap:0}.pfe-navigation__dropdown[class]{width:auto}.pfe-navigation__dropdown li,.pfe-navigation__dropdown ul{margin:0;padding:0;list-style:none}.pfe-navigation__dropdown a{display:inline-block;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c);border:1px solid transparent}.pfe-navigation__dropdown a:focus,.pfe-navigation__dropdown a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:underline}.pfe-navigation__dropdown a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown .pfe-link-list--header,.pfe-navigation__dropdown [role=heading][aria-heading-level],.pfe-navigation__dropdown h2,.pfe-navigation__dropdown h3,.pfe-navigation__dropdown h4,.pfe-navigation__dropdown h5,.pfe-navigation__dropdown h6{margin:32px 0 .75em;margin:var(--pfe-navigation--gutter,32px) 0 .75em;padding:0;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;font-size:18px;font-weight:400;color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646)}.pfe-navigation__dropdown .pfe-link-list--header:first-child,.pfe-navigation__dropdown [role=heading][aria-heading-level]:first-child,.pfe-navigation__dropdown h2:first-child,.pfe-navigation__dropdown h3:first-child,.pfe-navigation__dropdown h4:first-child,.pfe-navigation__dropdown h5:first-child,.pfe-navigation__dropdown h6:first-child{margin-top:0}.pfe-navigation__dropdown .pfe-link-list--header a,.pfe-navigation__dropdown [role=heading][aria-heading-level] a,.pfe-navigation__dropdown h2 a,.pfe-navigation__dropdown h3 a,.pfe-navigation__dropdown h4 a,.pfe-navigation__dropdown h5 a,.pfe-navigation__dropdown h6 a{color:#464646;color:var(--pfe-navigation__dropdown--headings--Color,#464646);border:1px solid transparent}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown .pfe-link-list--header a:hover,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:hover,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h2 a:hover,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h3 a:hover,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h4 a:hover,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h5 a:hover,.pfe-navigation__dropdown h6 a:focus,.pfe-navigation__dropdown h6 a:hover{text-decoration:underline;color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.pfe-navigation__dropdown .pfe-link-list--header a:focus,.pfe-navigation__dropdown [role=heading][aria-heading-level] a:focus,.pfe-navigation__dropdown h2 a:focus,.pfe-navigation__dropdown h3 a:focus,.pfe-navigation__dropdown h4 a:focus,.pfe-navigation__dropdown h5 a:focus,.pfe-navigation__dropdown h6 a:focus{border:1px dashed currentColor;border-top:1px dashed currentColor;outline:0}.pfe-navigation__dropdown li{margin:0 0 16px;-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown a,.pfe-navigation__dropdown pfe-card,.pfe-navigation__dropdown pfe-cta{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary],.pfe-navigation__dropdown pfe-cta[priority=primary]{--pfe-cta--BackgroundColor:#e00;--pfe-cta--BackgroundColor--hover:#c00;--pfe-theme--ui--border-width:0}.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[pfe-priority=primary]:hover,.pfe-navigation__dropdown pfe-cta[priority=primary]:focus,.pfe-navigation__dropdown pfe-cta[priority=primary]:hover{--pfe-cta--BackgroundColor:#c00}pfe-card .pfe-navigation__dropdown pfe-cta{margin-top:0}.user-info[class]{-webkit-box-ordinal-group:-9;-webkit-order:-10;-ms-flex-order:-10;order:-10;position:relative;min-height:64px;margin-bottom:24px;padding-left:76px;font-size:18px}@media (min-width:768px){.user-info[class]{-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;margin-bottom:32px}}:host(.pfe-navigation--collapse-secondary-links) .user-info[class]{margin-bottom:24px}.user-info[class] pfe-avatar{position:absolute;top:0;left:0;width:64px;height:64px;border-radius:50%;overflow:hidden;background:rgba(122,122,122,.2)}.user-info[class] .user-info__edit-avatar{font-size:16px;text-decoration:none;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}.user-info[class] .user-info__edit-avatar:focus,.user-info[class] .user-info__edit-avatar:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036)}.account-links{-ms-grid-row:2;grid-row:2;-ms-grid-column:1;-ms-grid-column-span:2;grid-column:1/3;font-size:14px}@media (min-width:768px){.account-links{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0,1fr) var(--pfe-navigation--gutter,32px) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;gap:var(--pfe-navigation--gutter,32px);grid-auto-flow:row}}:host(.pfe-navigation--collapse-secondary-links) .account-links{display:block}.account-links li{margin-bottom:.57143em;max-width:19.28571em}@media (min-width:768px){.account-links li{margin-bottom:1.5em}}:host(.pfe-navigation--collapse-secondary-links) .account-links li{margin-bottom:.57143em}.account-links[class] a{text-decoration:none}.account-links[class] a:focus,.account-links[class] a:hover{color:#036;color:var(--pfe-navigation__dropdown--link--Color--hover,#036);text-decoration:none}.account-links .account-link__title[class]{font-size:1.14286em;color:#06c;color:var(--pfe-navigation__dropdown--link--Color,#06c)}@media (min-width:768px){.account-links .account-link__title[class]{margin-bottom:8px}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__title[class]{margin-bottom:0}.account-links a:focus .account-link__title,.account-links a:hover .account-link__title{text-decoration:underline}.account-links .account-link__description{display:none;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}@media (min-width:768px){.account-links .account-link__description{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-links .account-link__description{display:none}@media (min-width:768px){.account-metadata{-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/span 2}}.account-metadata--mobile{-webkit-box-ordinal-group:-4;-webkit-order:-5;-ms-flex-order:-5;order:-5;display:block;margin-bottom:24px}@media (min-width:768px){.account-metadata--mobile{display:none}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata--mobile{display:block}.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:none}@media (min-width:768px){.account-metadata__account-number,.account-metadata__email,.account-metadata__login-name,.account-metadata__org-admin,.account-metadata__organization{display:block}}:host(.pfe-navigation--collapse-secondary-links) .account-metadata__account-number,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__email,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__login-name,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__org-admin,:host(.pfe-navigation--collapse-secondary-links) .account-metadata__organization{display:none}.account-metadata--mobile .account-metadata__account-number,.account-metadata--mobile .account-metadata__email,.account-metadata--mobile .account-metadata__login-name,.account-metadata--mobile .account-metadata__org-admin,.account-metadata--mobile .account-metadata__organization{display:block}.account-metadata__login-name[class]{font-size:16px;margin-bottom:1.5em}.account-metadata--org-admin .account-metadata__login-name[class]{margin-bottom:.5em}.account-metadata__account-number[class],.account-metadata__org-admin[class],.account-metadata__organization[class]{font-size:14px;color:#6a6e73;color:var(--pfe-navigation__dropdown--Color--secondary,#6a6e73)}.account-metadata__org-admin{margin-bottom:1.71429em}.account-metadata__email[class]{margin-top:1.5em}.account-metadata__logout-wrapper{margin-top:3em;padding:3em 0 24px;border-top:1px solid #d2d2d2}.account-metadata__logout-wrapper[class] a{padding:.375em 1em;color:#fff;color:var(--pfe-navigation__dropdown--Color--on-highlight,#fff);background:#e00;background:var(--pfe-navigation__dropdown--highlight-color,#e00);text-decoration:none;border-radius:3px} /*# sourceMappingURL=pfe-navigation-account.min.css.map */</style>\n<div>\n <div id="wrapper">\n </div>\n</div>'}},{key:"templateUrl",get:function(){return"pfe-navigation-account.html"}},{key:"styleUrl",get:function(){return"pfe-navigation-account.scss"}},{key:"userData",get:function(){return this.userData},set:function(t){this._processUserData(t)}}],[{key:"version",get:function(){return"1.0.27"}},{key:"tag",get:function(){return"pfe-navigation-account"}},{key:"meta",get:function(){return{title:"Navigation account",description:"Be awesome."}}},{key:"observedAttributes",get:function(){return["lang"]}},{key:"PfeType",get:function(){return t.PfeTypes.Content}},{key:"properties",get:function(){return{}}},{key:"slots",get:function(){return{}}}]),a(c,[{key:"connectedCallback",value:function(){i(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.hasAttribute("lang")&&(this._lang=this.getAttribute("lang"))}},{key:"disconnectedCallback",value:function(){var t=document.querySelector("body");t.removeEventListener("user-ready",this._processUserReady),t.removeEventListener("user-update",this._processUserReady)}},{key:"attributeChangedCallback",value:function(t,a,e){i(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"attributeChangedCallback",this).call(this,t,a,e)}},{key:"_createPfeAvatar",value:function(t,a){var e="";void 0===this.hasSlot&&(e="pfe-");var n=document.createElement("pfe-avatar");return n.setAttribute(e+"name",t),n.setAttribute(e+"shape","circle"),"string"==typeof a&&n.setAttribute(e+"src",a),n}},{key:"_getFullName",value:function(t){if("string"==typeof t.fullName)return t.fullName;var a="";return"string"==typeof t.firstName&&(a=t.firstName),(a="string"==typeof t.lastName?a.length?a+" "+t.lastName:t.lastName:a).length||this.error("Couldn't get full name"),this.setAttribute("full-name",a),a}},{key:"_updateAvatarSrc",value:function(t){var a,e=this;"undefined"!=typeof fetch&&(null===this._userData||"string"==typeof this._userData.REDHAT_LOGIN&&t!==this._userData.REDHAT_LOGIN)&&(a="//access.redhat.com/api/users/avatar/",(document.domain.includes("access.")||document.domain.includes(".foo."))&&(a="/api/users/avatar/"),fetch(""+a+t).then(function(t){if("object"===(void 0===t?"undefined":n(t))&&"number"==typeof t.status&&200===t.status&&"string"==typeof t.url&&!t.url.includes("blank.png")){e.setAttribute("avatar-url",t.url);for(var a=0;a<e._avatars.length;a++)e._avatars[a].setAttribute("src",t.url)}}).catch(function(t){return console.error(t)}))}},{key:"_createPfeIcon",value:function(t){var a="";void 0===this.hasSlot&&(a="pfe-");var e=document.createElement("pfe-icon");return e.setAttribute("icon",t),e.setAttribute(a+"size","sm"),e.setAttribute("aria-hidden","true"),e}},{key:"_createAccountMenuToggle",value:function(t){var a=this.shadowRoot.querySelector(".pfe-navigation__log-in-link"),e=document.createElement("button");e.classList.add("pfe-navigation__log-in-link","pfe-navigation__log-in-link--logged-in"),e.setAttribute("aria-label","Open user menu");t=this._createPfeAvatar(t);return e.append(t),e.id="account__toggle",a.parentElement.replaceChild(e,a),this._avatars.push(t),e}},{key:"_createAccountDropdown",value:function(t){var a=document.createElement("div");a.id="wrapper",a.classList.add("pfe-navigation__dropdown");var e=document.createElement("h3"),n=this._getFullName(t),o=this._createPfeAvatar(n);e.classList.add("user-info"),this._avatars.push(o),o.classList.add("user-info__avatar");var i=document.createElement("div");i.classList.add("user-info__full-name"),i.innerText=n;var r=document.createElement("a");r.setAttribute("href","https://access.redhat.com/user/edit"),r.classList.add("user-info__edit-avatar"),r.innerText="Edit avatar",r.prepend(this._createPfeIcon("web-caret-right")),e.append(o),e.append(i),e.append(r);var c=[[{text:this._navTranslations[this._lang].accountDetails,url:"https://www.redhat.com/wapps/ugc/protected/personalInfo.html",description:this._navTranslations[this._lang].accountDetailsDesc},{text:this._navTranslations[this._lang].profile,url:"https://access.redhat.com/user",description:this._navTranslations[this._lang].profileDesc},{text:this._navTranslations[this._lang].training,url:"https://rol.redhat.com/rol/app/",description:this._navTranslations[this._lang].trainingDesc}],[{text:this._navTranslations[this._lang].subscriptions,url:"https://access.redhat.com/management",description:this._navTranslations[this._lang].subscriptionsDesc,requiresRole:"portal_manage_subscriptions"},{text:this._navTranslations[this._lang].accountTeam,url:"https://access.redhat.com/account-team",description:this._navTranslations[this._lang].accountTeamDesc},{text:this._navTranslations[this._lang].userManagement,url:"https://www.redhat.com/wapps/ugc/protected/usermgt/userList.html",description:this._navTranslations[this._lang].userManagementDesc,requiresRole:"admin:org:all"},{text:this._navTranslations[this._lang].support,url:"https://access.redhat.com/support/cases/#/troubleshoot/",description:this._navTranslations[this._lang].supportDesc}]],s=document.createElement("div");s.classList.add("account-links"),s.setAttribute("aria-label","Account managemement links");for(var u=0;u<c.length;u++){var p=c[u],d=document.createElement("ul");d.classList.add("account-links__column");for(var l=0;l<p.length;l++){var m=p[l],g=document.createElement("li"),f=document.createElement("a"),_=!0;void 0!==m.requiresRole&&(t.realm_access.roles.includes(m.requiresRole)||(_=!1)),_&&(f.setAttribute("href",m.url),f.innerHTML='\n <div class="account-link__title">\n '+m.text+"\n </div>",m.description&&(f.innerHTML=f.innerHTML+'\n <div class="account-link__description">\n '+m.description+"\n </div>"),g.append(f),d.append(g))}s.append(d)}var h=document.createElement("div");h.classList.add("account-metadata");var v=document.createElement("h3");v.classList.add("account-metadata__login-name"),v.innerText=this._navTranslations[this._lang].login+": "+t.REDHAT_LOGIN;n=document.createElement("div");n.classList.add("account-metadata__account-number"),n.innerText="Account number: "+t.account_number;o=document.createElement("div");o.classList.add("account-metadata__email"),o.innerText=t.email;i=document.createElement("div");i.classList.add("account-metadata__logout-wrapper");r=document.createElement("a");this.hasAttribute("logout-link")?(r.setAttribute("href",this.getAttribute("logout-link")),r.classList.add("a11y-logout-link")):this.error("Couldn't get logout link"),r.hasAttribute("href")&&(r.innerText="Log out",i.append(r)),h.append(v),t.realm_access.roles.includes("admin:org:all")&&((v=document.createElement("div")).classList.add("account-metadata__org-admin"),v.innerText=this._navTranslations[this._lang].orgAdmin,h.classList.add("account-metadata--org-admin"),h.append(v)),h.append(n),h.append(o);o=h.cloneNode(!0);o.classList.add("account-metadata--mobile"),h.append(i),a.append(e),a.append(o),a.append(s),a.append(h);h=this.shadowRoot.getElementById("wrapper");return h.parentElement.replaceChild(a,h),a}},{key:"_processUserData",value:function(t){t.fullName=this._getFullName(t),this.getAttribute("full-name")!==t.fullName&&this.setAttribute("full-name",t.fullName),null===this._userData&&this._createAccountDropdown(t),"string"==typeof t.REDHAT_LOGIN?this._updateAvatarSrc(t.REDHAT_LOGIN):this.error("Could not find Redhat Login"),this._userData=t}},{key:"_processUserReady",value:function(t){t=t.target.user;"object"===(void 0===t?"undefined":n(t))&&this._processUserData(t)}}]),c);function c(){e(this,c);var t=r(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,c,{type:c.PfeType}));t._userData=null,t._avatars=[],t._lang="en",t._navTranslations={en:{accountDetails:"Account details",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},ja:{accountDetails:"Account details JA",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},ko:{accountDetails:"Account details KO",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},zh:{accountDetails:"Account details zh",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},de:{accountDetails:"Account details de",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},fr:{accountDetails:"Account details fr",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},it:{accountDetails:"Account details it",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},es:{accountDetails:"Account details es",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."},pt:{accountDetails:"Account details pt",accountDetailsDesc:"Edit your contact info, password, location preferences, and errata notifications.",accountNumber:"Account number",accountTeam:"Account team",accountTeamDesc:"Get help from your Red Hat account team.",login:"Login",orgAdmin:"Organization administrator",profile:"Community Profile",profileDesc:"Fill out your public profile and control what content you follow.",subscriptions:"Subscriptions",subscriptionsDesc:"Manage your subscriptions.",support:"Support",supportDesc:"Get support for your Red Hat products.",training:"Training & certification",trainingDesc:"Access your Red Hat Learning Subscription, courses, and exams.",userManagement:"User management",userManagementDesc:"Manage users in your organization."}},t._updateAvatarSrc=t._updateAvatarSrc.bind(t),t._createAccountDropdown=t._createAccountDropdown.bind(t),t._processUserReady=t._processUserReady.bind(t),t._processUserData=t._processUserData.bind(t);var a=document.querySelector("body");return a.addEventListener("user-ready",t._processUserReady),a.addEventListener("user-update",t._processUserReady),t}return t.create(a),a});
//# sourceMappingURL=pfe-navigation-account.umd.min.js.map

@@ -14,3 +14,3 @@ {

},
"version": "1.0.26",
"version": "1.0.27",
"keywords": [

@@ -17,0 +17,0 @@ "web-components",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc