@digital-realty/app-shell 11.0.2 → 11.0.3-IXUAT-10793.521848

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{MobxLitElement as M}from"@adobe/lit-mobx";import{authedUser as st}from"@digital-realty/ix-account-switcher";import{TimeoutController as lt}from"@digital-realty/ix-app-logic/controllers/timeout-controller.js";import{appState as g}from"@digital-realty/ix-app-logic/state/app-state.js";import"@digital-realty/ix-app-logic/views/app-versions.js";import"@digital-realty/ix-app-logic/views/auto-logout-dialog.js";import"@digital-realty/ix-app-logic/views/cookie-banner.js";import"@digital-realty/ix-app-logic/views/cookie-dialog.js";import"@digital-realty/ix-app-logic/views/cookie-policy.js";import"@digital-realty/ix-intraportal-nav/ix-intraportal-nav.js";import{__decorate as p}from"tslib";import{svg as b,css as L,html as l,nothing as v,LitElement as z}from"lit";import{property as C,customElement as R,state as E,query as W}from"lit/decorators.js";import ie from"date-fns/differenceInDays.js";import he from"date-fns/differenceInHours.js";import"@digital-realty/ix-button/ix-button.js";import"@digital-realty/ix-drawer/ix-drawer.js";import"@digital-realty/ix-icon";import"@material/web/icon/icon.js";import{makeAutoObservable as ct,reaction as dt}from"mobx";import{makePersistable as ut,isHydrated as ht,hydrateStore as pt,clearPersistedStore as mt,getPersistedStore as gt}from"mobx-persist-store";import Ae from"date-fns/parse.js";import ft from"date-fns/subDays.js";import F from"date-fns/format.js";import"@digital-realty/ix-icon-button/ix-icon-button.js";import"@digital-realty/ix-icon/ix-icon.js";import wt from"date-fns/formatDistance.js";import"@digital-realty/ix-toast/ix-message-toast.js";import{unsafeSVG as bt}from"lit/directives/unsafe-svg.js";import"@digital-realty/ix-switch/ix-switch.js";import"@digital-realty/ix-date/ix-date.js";import"@digital-realty/ix-divider/ix-divider.js";import{computePosition as Ee}from"@floating-ui/dom";import{classMap as vt}from"lit/directives/class-map.js";import"@digital-realty/ix-toast/ix-toasters.js";import"@digital-realty/ix-tooltip/ix-tooltip.js";import{_setQualtricsDataLayer as xt}from"@digital-realty/ix-app-logic/helpers/qualtrics-data-layer.js";import{baseTheme as yt}from"@digital-realty/theme";import{b as Ct,E as _t,G as kt,d as Ne,L as oe,e as K,f as At,h as Et,A as Nt,i as I,j as St,p as J,k as pe,S as Mt,I as $t,O as Tt,R as Lt,l as It,m as Ht,n as Vt,U as Dt,D as Rt,o as Pt,C as Ot,q as me,M as ae,r as ge,s as re,t as fe,v as we,w as zt,g as Ft,x as Zt,y as Se,z as Bt,B as ne,F as jt,H as Ut,K as qt,N as Gt,J as Me,Q as Z,T as be}from"./bootstrap.js";import"@digital-realty/ix-menu/ix-menu-anchor.js";import"@digital-realty/ix-menu/ix-menu.js";import"@digital-realty/ix-account-switcher/ix-account-switcher.js";import"@digital-realty/ix-app-logic/views/manual-logout-dialog.js";import"@microsoft/applicationinsights-web";import"oidc-client-ts";import"@digital-realty/ix-app-logic/views/splash-screen.js";const Wt=b`<svg viewBox="0 0 24 24"><path d="M3 9H7V5H3V9ZM7 14H3V10H7V14ZM7 19H3V15H7V19ZM20 14H8V10H20V14ZM8 19H20V15H8V19ZM8 9V5H20V9H8Z"/></svg>`,$e=b`<svg viewBox="0 0 24 24"><path d="M20 0C17.791 0 16 1.791 16 4C16 6.857 20 11 20 11C20 11 24 6.857 24 4C24 1.791 22.209 0 20 0ZM12 2C6.486 2 2 6.486 2 12C2 17.514 6.486 22 12 22C17.514 22 22 17.514 22 12C22 11.93 21.9912 11.862 21.9902 11.793C21.7532 12.059 21.5575 12.2677 21.4395 12.3887L19.6504 14.3047C19.4484 14.9657 19.1695 15.5919 18.8145 16.1699C18.4985 15.4819 17.806 15 17 15H16V13C16 12.447 15.552 12 15 12H9V10H10C10.552 10 11 9.553 11 9V7.02344L13.0156 7.00781C13.5986 7.00381 14.1175 6.74289 14.4805 6.33789C14.3145 5.89389 14.1875 5.445 14.1035 5L9.99219 5.03125C9.44319 5.03525 9 5.48225 9 6.03125V8H8C7.448 8 7 8.447 7 9V10.1855L4.98047 8.16797C6.34047 5.68697 8.977 4 12 4H14C14 3.397 14.0908 2.81658 14.2578 2.26758C13.5308 2.09858 12.777 2 12 2ZM20 2.57031C20.789 2.57031 21.4297 3.211 21.4297 4C21.4297 4.789 20.789 5.42969 20 5.42969C19.211 5.42969 18.5703 4.789 18.5703 4C18.5703 3.211 19.211 2.57031 20 2.57031ZM4.20703 10.2207L9 15.0137V16C9 17.103 9.897 18 11 18V19.9316C7.06 19.4366 4 16.072 4 12C4 11.388 4.07603 10.7947 4.20703 10.2207ZM10.7793 14H14V16C14 16.553 14.448 17 15 17H17V18.2344C15.875 19.1384 14.502 19.7417 13 19.9297V17C13 16.447 12.552 16 12 16H11V14.5996C11 14.3776 10.9123 14.174 10.7793 14Z"/></svg>`,Te=b`<svg viewBox="0 0 24 24"><path d="M6 2C4.90575 2 4 2.90575 4 4V20C4 21.0943 4.90575 22 6 22H11V20H6V4H13V9H18V13H20V8L14 2H6ZM12 11V14H15C15 12.343 13.641 11.031 12 11ZM11 12C9.343 12 8 13.343 8 15C8 16.657 9.343 18 11 18C12.657 18 13.969 16.641 14 15H11V12ZM16 15V21H13C13 22.654 14.346 24 16 24H21C22.645 24 24 22.645 24 21V15H16ZM18 17H22V21C22 21.565 21.565 22 21 22C20.449 22 20 21.552 20 21H18V17Z"/></svg>`,Kt=b`<svg viewBox="0 0 24 24"><path d="M15.5 4H19V6H5V4H8.5L9.5 3H14.5L15.5 4ZM8 21C6.9 21 6 20.1 6 19V7H18V19C18 20.1 17.1 21 16 21H8Z" /></svg>`;b`<svg viewBox="0 0 24 24"><path d="M11 12C13.21 12 15 10.21 15 8C15 5.79 13.21 4 11 4C8.79 4 7 5.79 7 8C7 10.21 8.79 12 11 12ZM9 17L12 14.06C11.61 14.02 11.32 14 11 14C8.33 14 3 15.34 3 18V20H12L9 17ZM12 17L15.47 20.5L22 13.91L20.6 12.5L15.47 17.67L13.4 15.59L12 17Z"/></svg>`;const Jt=b`<svg viewbox="0 0 24 24"><path d="M 3,6 V 8 H 21 V 6 Z M 3,18 H 9 V 16 H 3 Z M 15,13 H 3 v -2 h 12 z" /><rect x="8" y="0.5" width="16" height="16" rx="8" /><path d="M 14.5,10.585 12.415,8.50001 11.705,9.20501 14.5,12 l 6,-5.99999 -0.705,-0.705 z" style="fill:#ffffff" /></svg>`,k=L` *, ::before, ::after {
1
+ import{MobxLitElement as $}from"@adobe/lit-mobx";import{authedUser as dt}from"@digital-realty/ix-account-switcher";import{TimeoutController as ut}from"@digital-realty/ix-app-logic/controllers/timeout-controller.js";import{appState as g}from"@digital-realty/ix-app-logic/state/app-state.js";import"@digital-realty/ix-app-logic/views/app-versions.js";import"@digital-realty/ix-app-logic/views/auto-logout-dialog.js";import"@digital-realty/ix-app-logic/views/cookie-banner.js";import"@digital-realty/ix-app-logic/views/cookie-dialog.js";import"@digital-realty/ix-app-logic/views/cookie-policy.js";import"@digital-realty/ix-intraportal-nav/ix-intraportal-nav.js";import{__decorate as p}from"tslib";import{svg as x,css as L,html as c,nothing as b,LitElement as R}from"lit";import{property as k,customElement as P,state as N,query as W}from"lit/decorators.js";import ie from"date-fns/differenceInDays.js";import he from"date-fns/differenceInHours.js";import"@digital-realty/ix-button/ix-button.js";import"@digital-realty/ix-drawer/ix-drawer.js";import"@digital-realty/ix-icon";import"@material/web/icon/icon.js";import{makeAutoObservable as ht,reaction as pt}from"mobx";import{makePersistable as mt,isHydrated as gt,hydrateStore as ft,clearPersistedStore as wt,getPersistedStore as bt}from"mobx-persist-store";import Ae from"date-fns/parse.js";import vt from"date-fns/subDays.js";import F from"date-fns/format.js";import"@digital-realty/ix-icon-button/ix-icon-button.js";import"@digital-realty/ix-icon/ix-icon.js";import xt from"date-fns/formatDistance.js";import"@digital-realty/ix-toast/ix-message-toast.js";import{unsafeSVG as yt}from"lit/directives/unsafe-svg.js";import"@digital-realty/ix-switch/ix-switch.js";import"@digital-realty/ix-date/ix-date.js";import"@digital-realty/ix-divider/ix-divider.js";import{computePosition as Ee}from"@floating-ui/dom";import{classMap as Ct}from"lit/directives/class-map.js";import"@digital-realty/ix-toast/ix-toasters.js";import"@digital-realty/ix-tooltip/ix-tooltip.js";import{_setQualtricsDataLayer as _t}from"@digital-realty/ix-app-logic/helpers/qualtrics-data-layer.js";import{baseTheme as kt}from"@digital-realty/theme";import{b as At,E as Et,G as Nt,d as Ne,L as oe,e as K,f as St,h as Tt,A as Mt,i as I,D as Se,j as Te,k as $t,p as J,l as pe,S as Lt,I as It,O as Dt,R as Ht,m as Vt,n as Rt,o as Pt,U as Ot,q as zt,r as Ft,C as Zt,s as me,M as ae,t as ge,v as ne,w as fe,x as we,y as Bt,g as Ut,z as jt,B as Me,F as qt,H as re,J as Gt,K as Wt,N as Kt,Q as $e,T as Z,V as be}from"./bootstrap.js";import"@digital-realty/ix-menu/ix-menu-anchor.js";import"@digital-realty/ix-menu/ix-menu.js";import"@digital-realty/ix-account-switcher/ix-account-switcher.js";import"@digital-realty/ix-app-logic/views/manual-logout-dialog.js";import"@microsoft/applicationinsights-web";import"oidc-client-ts";import"@digital-realty/ix-app-logic/views/splash-screen.js";const Jt=x`<svg viewBox="0 0 24 24"><path d="M3 9H7V5H3V9ZM7 14H3V10H7V14ZM7 19H3V15H7V19ZM20 14H8V10H20V14ZM8 19H20V15H8V19ZM8 9V5H20V9H8Z"/></svg>`,Le=x`<svg viewBox="0 0 24 24"><path d="M20 0C17.791 0 16 1.791 16 4C16 6.857 20 11 20 11C20 11 24 6.857 24 4C24 1.791 22.209 0 20 0ZM12 2C6.486 2 2 6.486 2 12C2 17.514 6.486 22 12 22C17.514 22 22 17.514 22 12C22 11.93 21.9912 11.862 21.9902 11.793C21.7532 12.059 21.5575 12.2677 21.4395 12.3887L19.6504 14.3047C19.4484 14.9657 19.1695 15.5919 18.8145 16.1699C18.4985 15.4819 17.806 15 17 15H16V13C16 12.447 15.552 12 15 12H9V10H10C10.552 10 11 9.553 11 9V7.02344L13.0156 7.00781C13.5986 7.00381 14.1175 6.74289 14.4805 6.33789C14.3145 5.89389 14.1875 5.445 14.1035 5L9.99219 5.03125C9.44319 5.03525 9 5.48225 9 6.03125V8H8C7.448 8 7 8.447 7 9V10.1855L4.98047 8.16797C6.34047 5.68697 8.977 4 12 4H14C14 3.397 14.0908 2.81658 14.2578 2.26758C13.5308 2.09858 12.777 2 12 2ZM20 2.57031C20.789 2.57031 21.4297 3.211 21.4297 4C21.4297 4.789 20.789 5.42969 20 5.42969C19.211 5.42969 18.5703 4.789 18.5703 4C18.5703 3.211 19.211 2.57031 20 2.57031ZM4.20703 10.2207L9 15.0137V16C9 17.103 9.897 18 11 18V19.9316C7.06 19.4366 4 16.072 4 12C4 11.388 4.07603 10.7947 4.20703 10.2207ZM10.7793 14H14V16C14 16.553 14.448 17 15 17H17V18.2344C15.875 19.1384 14.502 19.7417 13 19.9297V17C13 16.447 12.552 16 12 16H11V14.5996C11 14.3776 10.9123 14.174 10.7793 14Z"/></svg>`,Ie=x`<svg viewBox="0 0 24 24"><path d="M6 2C4.90575 2 4 2.90575 4 4V20C4 21.0943 4.90575 22 6 22H11V20H6V4H13V9H18V13H20V8L14 2H6ZM12 11V14H15C15 12.343 13.641 11.031 12 11ZM11 12C9.343 12 8 13.343 8 15C8 16.657 9.343 18 11 18C12.657 18 13.969 16.641 14 15H11V12ZM16 15V21H13C13 22.654 14.346 24 16 24H21C22.645 24 24 22.645 24 21V15H16ZM18 17H22V21C22 21.565 21.565 22 21 22C20.449 22 20 21.552 20 21H18V17Z"/></svg>`,Qt=x`<svg viewBox="0 0 24 24"><path d="M15.5 4H19V6H5V4H8.5L9.5 3H14.5L15.5 4ZM8 21C6.9 21 6 20.1 6 19V7H18V19C18 20.1 17.1 21 16 21H8Z" /></svg>`;x`<svg viewBox="0 0 24 24"><path d="M11 12C13.21 12 15 10.21 15 8C15 5.79 13.21 4 11 4C8.79 4 7 5.79 7 8C7 10.21 8.79 12 11 12ZM9 17L12 14.06C11.61 14.02 11.32 14 11 14C8.33 14 3 15.34 3 18V20H12L9 17ZM12 17L15.47 20.5L22 13.91L20.6 12.5L15.47 17.67L13.4 15.59L12 17Z"/></svg>`;const Yt=x`<svg viewbox="0 0 24 24"><path d="M 3,6 V 8 H 21 V 6 Z M 3,18 H 9 V 16 H 3 Z M 15,13 H 3 v -2 h 12 z" /><rect x="8" y="0.5" width="16" height="16" rx="8" /><path d="M 14.5,10.585 12.415,8.50001 11.705,9.20501 14.5,12 l 6,-5.99999 -0.705,-0.705 z" style="fill:#ffffff" /></svg>`,A=L` *, ::before, ::after {
2
2
  --tw-border-spacing-x: 0;
3
3
  --tw-border-spacing-y: 0;
4
4
  --tw-translate-x: 0;
@@ -613,6 +613,10 @@ video {
613
613
  pointer-events: none;
614
614
  }
615
615
 
616
+ .visible {
617
+ visibility: visible;
618
+ }
619
+
616
620
  .static {
617
621
  position: static;
618
622
  }
@@ -1450,25 +1454,25 @@ video {
1450
1454
  .xl\\:flex-row {
1451
1455
  flex-direction: row;
1452
1456
  }
1453
- } `;var N;(function(i){i.READ="read",i.UNREAD="unread"})(N||(N={}));var m;(function(i){i.PLANNED_MAINTENANCE="Planned Maintenance",i.INCIDENTS="Incidents",i.DCIM_ALERTS="DCIM Alerts",i.SERVICE_TICKETS="Service Tickets"})(m||(m={}));var w;(function(i){i.Remote_Hands="Remote Hands",i.Deliveries="Deliveries",i.Removals="Removals",i.Facility_Access="Facility Access",i.Trouble_Ticket="Trouble Ticket",i.Customer_Care="Customer Care",i.FacilityAccessVisitorAccess="FacilityAccessVisitorAccess",i.FacilityAccessPermanentBadge="FacilityAccessPermanentBadge",i.FacilityAccessOspAccess="FacilityAccessOspAccess",i.FacilityAccessPopPoeAccess="FacilityAccessPopPoeAccess"})(w||(w={}));var B;(function(i){i.LOADING="Loading",i.ERROR="Error",i.SUCCESS="Success"})(B||(B={}));const Q="yyyy-MM-dd",Qt=30,Le="yyyy-MM-dd HH:mm:ss",Yt="http://api.digitalrealty.com/notifications".replace(/\/+$/,"");class Ie{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Yt}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||Ve}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Xt=new Ie;class ue{constructor(e=Xt){this.configuration=e,this.fetchApi=async(t,o)=>{let a={url:t,init:o};for(const n of this.middleware)n.pre&&(a=await n.pre({fetch:this.fetchApi,...a})||a);let r;try{r=await(this.configuration.fetchApi||fetch)(a.url,a.init)}catch(n){for(const s of this.middleware)s.onError&&(r=await s.onError({fetch:this.fetchApi,url:a.url,init:a.init,error:n,response:r?r.clone():void 0})||r);if(r===void 0)throw n instanceof Error?new ii(n,"The request failed and the interceptors did not return an alternative response"):n}for(const n of this.middleware)n.post&&(r=await n.post({fetch:this.fetchApi,url:a.url,init:a.init,response:r.clone()})||r);return r},this.middleware=e.middleware}withMiddleware(...e){const t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){const t=e.map(o=>({pre:o}));return this.withMiddleware(...t)}withPostMiddleware(...e){const t=e.map(o=>({post:o}));return this.withMiddleware(...t)}isJsonMime(e){return e?ue.jsonRegex.test(e):!1}async request(e,t){const{url:o,init:a}=await this.createFetchParams(e,t),r=await this.fetchApi(o,a);if(r&&r.status>=200&&r.status<300)return r;throw new He(r,"Response returned an error code")}async createFetchParams(e,t){let o=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(e.query));const a=Object.assign({},this.configuration.headers,e.headers);Object.keys(a).forEach(d=>a[d]===void 0?delete a[d]:{});const r=typeof t=="function"?t:async()=>t,n={method:e.method,headers:a,body:e.body,credentials:this.configuration.credentials},s={...n,...await r({init:n,context:e})};let c;ti(s.body)||s.body instanceof URLSearchParams||ei(s.body)?c=s.body:this.isJsonMime(a["Content-Type"])?c=JSON.stringify(s.body):c=s.body;const h={...s,body:c};return{url:o,init:h}}clone(){const e=this.constructor,t=new e(this.configuration);return t.middleware=this.middleware.slice(),t}}ue.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ei(i){return typeof Blob<"u"&&i instanceof Blob}function ti(i){return typeof FormData<"u"&&i instanceof FormData}class He extends Error{constructor(e,t){super(t),this.response=e,this.name="ResponseError"}}class ii extends Error{constructor(e,t){super(t),this.cause=e,this.name="FetchError"}}class se extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const oi={csv:","};function Ve(i,e=""){return Object.keys(i).map(t=>De(t,i[t],e)).filter(t=>t.length>0).join("&")}function De(i,e,t=""){const o=t+(t.length?`[${i}]`:i);if(e instanceof Array){const a=e.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${a}`}if(e instanceof Set){const a=Array.from(e);return De(i,a,t)}return e instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?Ve(e,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(e))}`}class j{constructor(e,t=o=>o){this.raw=e,this.transformer=t}async value(){return this.transformer(await this.raw.json())}}function Re(i){return ai(i)}function ai(i,e){return i}function xa(i){return i}function ve(i){return ri(i)}function ri(i,e){return i==null?i:{id:i.id==null?void 0:i.id,resourceType:i.resource_type==null?void 0:i.resource_type,subGroup:i.sub_group==null?void 0:i.sub_group,createdAt:i.created_at==null?void 0:new Date(i.created_at),createdBy:i.created_by==null?void 0:i.created_by,subject:i.subject==null?void 0:i.subject,locations:i.locations==null?void 0:i.locations,resourceId:i.resource_id==null?void 0:i.resource_id,status:i.status==null?void 0:Re(i.status),accountNumber:i.account_number==null?void 0:i.account_number}}function ni(i){return si(i)}function si(i,e){return i==null?i:{self:i.self==null?void 0:i.self,first:i.first==null?void 0:i.first,prev:i.prev==null?void 0:i.prev,next:i.next==null?void 0:i.next,last:i.last==null?void 0:i.last,items:i.items.map(ve)}}function li(i){return ci(i,!1)}function ci(i,e=!1){return i==null?i:{status:i.status}}function di(i){return ui(i)}function ui(i,e){return i==null?i:{updatedCount:i.updated_count==null?void 0:i.updated_count}}function hi(i){return pi(i)}function pi(i,e){return i==null?i:{success:i.success==null?void 0:i.success}}function mi(i){return gi(i)}function gi(i,e){return i==null?i:{status:Re(i.status)}}function fi(i){return wi(i,!1)}function wi(i,e=!1){return i==null?i:{status:i.status}}function bi(i){return vi(i,!1)}function vi(i,e=!1){return i==null?i:{resource_type:i.resourceType,sub_group:i.subGroup,recipients:i.recipients,account_number:i.accountNumber,locations:i.locations,resource_id:i.resourceId,subject:i.subject,created_at:i.createdAt==null?i.createdAt:i.createdAt.toISOString()}}class xi extends ue{async createNotificationRaw(e,t){const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"POST",headers:a,query:o,body:bi(e.notificationRequest)},t);return new j(r,n=>ve(n))}async createNotification(e={},t){return await(await this.createNotificationRaw(e,t)).value()}async deleteNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling deleteNotificationsById().');const o={},a={};if(this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"DELETE",headers:a,query:o},t);return new j(n,s=>hi(s))}async deleteNotificationsById(e,t){return await(await this.deleteNotificationsByIdRaw(e,t)).value()}async getNotificationsRaw(e,t){const o={};e.sort!=null&&(o.sort=e.sort),e.cursor!=null&&(o.cursor=e.cursor),e.resourceType!=null&&(o.resource_type=e.resourceType),e.accountNumber!=null&&(o.account_number=e.accountNumber),e.createdAfter!=null&&(o.created_after=e.createdAfter.toISOString()),e.createdBefore!=null&&(o.created_before=e.createdBefore.toISOString()),e.locationId!=null&&(o.location_id=e.locationId),e.subGroup!=null&&(o.sub_group=e.subGroup),e.status!=null&&(o.status=e.status);const a={};if(e.prefer!=null&&(a.Prefer=e.prefer.join(oi.csv)),this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"GET",headers:a,query:o},t);return new j(r,n=>ni(n))}async getNotifications(e={},t){return await(await this.getNotificationsRaw(e,t)).value()}async getNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling getNotificationsById().');const o={},a={};if(this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"GET",headers:a,query:o},t);return new j(n,s=>ve(s))}async getNotificationsById(e,t){return await(await this.getNotificationsByIdRaw(e,t)).value()}async patchNotificationsRaw(e,t){if(e.notificationBulkPatch==null)throw new se("notificationBulkPatch",'Required parameter "notificationBulkPatch" was null or undefined when calling patchNotifications().');const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"PATCH",headers:a,query:o,body:li(e.notificationBulkPatch)},t);return new j(r,n=>di(n))}async patchNotifications(e,t){return await(await this.patchNotificationsRaw(e,t)).value()}async patchNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling patchNotificationsById().');const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"PATCH",headers:a,query:o,body:fi(e.notificationPatch)},t);return new j(n,s=>mi(s))}async patchNotificationsById(e,t){return await(await this.patchNotificationsByIdRaw(e,t)).value()}}const yi={Notifications:"notifications"};class Ci{constructor(e){this.noInit=!1,this.configuration=e}get notificationsApi(){return new xi(new Ie({basePath:`${this.configuration.NotificationApiUrl}/${yi.Notifications}`,headers:{Authorization:this.getAuthorization()}}))}getAuthorization(){return this.configuration.getAuthorizationFn?this.configuration.getAuthorizationFn():""}}const xe=i=>i==null||i==="",_i=i=>{switch(i.toLowerCase()){case"planned maintenance":return m.PLANNED_MAINTENANCE;case"incidents":return m.INCIDENTS;case"dcim alerts":return m.DCIM_ALERTS;case"service tickets":return m.SERVICE_TICKETS;default:return m.PLANNED_MAINTENANCE}},ki=i=>{switch(i.toLowerCase()){case"unread":return N.UNREAD;case"read":return N.READ;default:return N.UNREAD}},Ai=i=>({sort:"-created_at",cursor:i,prefer:[""]}),Ei=(i,e)=>({id:i,notificationPatch:{status:e}}),Ni=i=>({id:i}),Pe=i=>{var e,t,o,a,r,n,s,c;return{subject:(e=i.subject)!=null?e:"",id:i.id,accountNumber:(t=i.accountNumber)!=null?t:"",resourceType:_i((o=i.resourceType)!=null?o:""),subGroup:(a=i.subGroup)!=null?a:"",resourceId:(r=i.resourceId)!=null?r:"",status:ki((n=i.status)!=null?n:""),createdAt:xe(i.createdAt)?F(new Date,Le):F(i.createdAt,Le),createdBy:(s=i.createdBy)!=null?s:"",locations:(c=i.locations)!=null?c:[]}},Oe=i=>i.map(e=>Pe(e)),Si=i=>{const e=new URLSearchParams(i),t=e.has("cursor")?e.get("cursor"):"";return t!==null?t:""},Y=async(i,e=!0)=>{let t="An error occurred";if(i instanceof He&&i.response.status===400)try{const{detail:o}=await i.response.json();t=o,e&&console.error(t)}catch(o){console.error(i)}else console.error(i)},Mi=i=>{const e=localStorage.getItem(i);return e?JSON.parse(e):null},$i=i=>{var e;return`Bearer ${(e=Mi(i))==null?void 0:e.access_token}`};let Ti=class{constructor(){this.showDrawer=!1,this.apiClient={noInit:!0},this.baseApiUrl="",this.localStorageKey="",this.NewApiClient=()=>{this.apiClient=new Ci({NotificationApiUrl:this.baseApiUrl,getAuthorizationFn:()=>$i(this.localStorageKey)}),this.getNotifications()},this.nextPageCursor="",this.notifications=[],this.unreadNotificationCount=0,this.notificationFilters={SHOW_PLANNED_MAINTENANCE:!0,SHOW_SERVICE_TICKETS:!0,SHOW_DCIM_ALERTS:!0},this.selectedNotification={id:"",resourceType:m.PLANNED_MAINTENANCE,subGroup:"",subject:"",resourceId:"",locations:[],createdAt:"",accountNumber:"",createdBy:"",status:N.READ},this.dateFilters={FROM_DATE:ft(new Date,Qt),TO_DATE:new Date},ct(this),ut(this,{name:"notification-state",properties:["notificationFilters","nextPageCursor"],storage:window.localStorage})}get isHydrated(){return ht(this)}async hydrateStore(){await pt(this)}async clearStoredData(){await mt(this)}async getStoredData(){return gt(this)}ConstructApiClient(){return this.apiClient.noInit?this.NewApiClient():this.apiClient}async clearStoredNotificationsData(){this.notifications=[],this.unreadNotificationCount=0,this.nextPageCursor="",this.apiClient={noInit:!0}}async setNotificationReadStatus(e){const t=await this.setNotificationAsRead(e.toString());if(await t===!0){this.ReduceUnreadNotificationCount();const o=this.notifications.findIndex(a=>a.id===e);this.notifications[o].status=N.READ,this.selectedNotification=this.notifications[o]}return t}async setNotificationDeleted(e){const t=await this.DeleteNotification(e.toString());if(t===!0){const o=this.notifications.find(r=>r.id===e);(o==null?void 0:o.status)==="unread"&&this.ReduceUnreadNotificationCount();const a=this.notifications.findIndex(r=>r.id===e);this.notifications.splice(a,1)}return{State:t===!0?B.SUCCESS:B.ERROR,Message:t===!0?"Successfully deleted the notification":"Error while deleting the notification"}}setNotificationDateFilter(e,t){e!==void 0?this.dateFilters.FROM_DATE=Ae(e,Q,new Date):this.dateFilters.FROM_DATE=void 0,t!==void 0?this.dateFilters.TO_DATE=Ae(t,Q,new Date):this.dateFilters.TO_DATE=void 0}setNotificationFilter(e,t){switch(e){case m.PLANNED_MAINTENANCE:this.notificationFilters.SHOW_PLANNED_MAINTENANCE=t;break;case m.SERVICE_TICKETS:this.notificationFilters.SHOW_SERVICE_TICKETS=t;break;case m.DCIM_ALERTS:this.notificationFilters.SHOW_DCIM_ALERTS=t;break}}async getNotifications(){var e;let t;if(this.nextPageCursor!==void 0&&(t=await((e=this.apiClient)==null?void 0:e.notificationsApi.getNotificationsRaw(Ai(Si(this.nextPageCursor))).catch(o=>{Y(o,!1)})),t)){const o=await(t==null?void 0:t.value());this.notifications=this.nextPageCursor===""?Oe(o==null?void 0:o.items):this.notifications.concat(Oe(o==null?void 0:o.items)),this.nextPageCursor=(o==null?void 0:o.next)!==void 0?o==null?void 0:o.next:void 0,this.unreadNotificationCount=t.raw.headers.get("x-total-unread-count")!==null&&t.raw.headers.get("x-total-unread-count")!==void 0?t.raw.headers.get("x-total-unread-count"):0}}async getNotificationsById(e){var t;let o;e&&(o=await((t=this.apiClient)==null?void 0:t.notificationsApi.getNotificationsById({id:e}).catch(a=>{Y(a,!1)}))),o&&(this.selectedNotification=Pe(o))}async setNotificationAsRead(e){var t;return e?(await((t=this.apiClient)==null?void 0:t.notificationsApi.patchNotificationsById(Ei(e,"read")).catch(o=>(Y(o,!1),!1))),!0):!1}async setAllNotificationAsRead(){var e;const t=await((e=this.apiClient)==null?void 0:e.notificationsApi.patchNotifications({notificationBulkPatch:{status:N.READ}}).catch(o=>(Y(o,!1),!1)));return this.notifications=this.notifications.map(o=>({...o,status:N.READ})),this.unreadNotificationCount=0,t}async DeleteNotification(e){var t;let o=!1;return e&&await((t=this.apiClient)==null?void 0:t.notificationsApi.deleteNotificationsById(Ni(e)).catch(a=>{Y(a,!1),o=!1}).then(()=>{o=!0})),o}ReduceUnreadNotificationCount(){this.unreadNotificationCount>0&&(this.unreadNotificationCount-=1)}};const u=new Ti,H=L`:host{--ix-drawer-border-radius:0;--ix-drawer-padding:0;--ix-drawer-width-sm:320px;--ix-drawer-width-md:320px;--ix-drawer-width-lg:400px}.destructive-icon{color:var(--clr-critical,#db0028);--md-icon-button-icon-color:var(--clr-critical, #DB0028);--md-sys-color-on-surface-variant:var(--clr-critical, #DB0028)}.destructive-icon path{fill:var(--clr-critical,#db0028)}.active-icon{color:var(--clr-primary,#1456e0);--md-icon-button-icon-color:var(--clr-primary, #1456E0);--md-sys-color-on-surface-variant:var(--clr-primary, #1456E0)}.active-icon path{fill:var(--clr-primary,#1456e0)}.inactive-icon{color:var(--clr-on-surface,#092241);--md-icon-button-icon-color:var(--clr-on-surface, #092241);--md-sys-color-on-surface-variant:var(--clr-on-surface, #092241);cursor:default;opacity:.6}.inactive-icon path{fill:var(--clr-on-surface,#092241);opacity:.6}ix-icon-button.sharp{--md-icon-font:'Material Symbols Sharp'!important}.ix-icon-groups{--ix-icon-font-size:32px;--ix-icon-line-height:32px}.ix-icon-groups ix-icon{color:var(--clr-on-surface,#092241);opacity:.6}.ix-icon-groups ix-icon path{fill:var(--clr-on-surface,#092241)}.datefilter-dropdown-content,.filter-dropdown-content{position:absolute;right:5%;top:3rem;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:3;transition:box-shadow .3s cubic-bezier(.4,0,.2,1) 0s;border-radius:3px;box-shadow:rgba(0,0,0,.2) 0 5px 5px -3px,rgba(0,0,0,.14) 0 8px 10px 1px,rgba(0,0,0,.12) 0 3px 14px 2px;background-color:var(--clr-surface-container-lowest,#fff)}.unread{font-family:var(--root-primary-font, 'sans-serif');padding:0 5px;font-size:var(--text-caption-size,.75rem);line-height:var(--text-caption-line-height,1.33333333em);left:22px;top:0;background:var(--clr-critical,#db0028);letter-spacing:var(--text-caption-letter-spacing,.03333333em)}.notification-tooltip{background-color:var(--cp-neutral-blue-4,#040d19);white-space:nowrap;font-size:var(--text-caption-size,.75rem);z-index:9999;color:var(--clr-on-secondary,#fff)}.notification-modal-subtitle,.notification-modal-title{color:var(--clr-on-surface,#092241);font-family:var(--root-secondary-font, 'sans-serif')}.notification-modal-subtitle{font-size:var(--text-heading-size,1.25rem);line-height:var(--text-heading-line-height,1.2em)}.notification-modal-content{display:inline-grid;grid-template-columns:fit-content(183px) 1fr;grid-template-rows:auto auto;grid-column-gap:24px;grid-row-gap:8px;font-family:var(--root-primary-font, 'sans-serif');font-size:var(--text-default-size,16px);line-height:28px;width:560px;padding-bottom:16px;color:var(--clr-on-surface,#092241)}.notification-modal-content-title{width:183px;color:var(--clr-on-surface-variant,#092241B3)}.notification-modal-subject-title{grid-area:1/1/2/2}.notification-modal-subject-text{grid-area:1/2/2/3}.notification-modal-created-date-title{grid-area:2/1/3/2}.notification-modal-created-date-text{grid-area:2/2/3/3}.notification-modal-site-title{grid-area:3/1/4/2}.notification-modal-site-text{grid-area:3/2/4/3}`;let le=class extends M{constructor(){super(...arguments),this.textMessage="Are you sure?",this.open=!1,this.dialogClosed=()=>{this.dispatchEvent(new CustomEvent("confirm-dialog-closed")),this.onClick(!1)}}static get styles(){return[k,H]}onClick(e){const t=new CustomEvent("on-confirm-selection",{detail:{returnValue:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}render(){return l` <ix-dialog ?open="${this.open}" class="w-[580px]" @closed="${this.dialogClosed}"> <div slot="headline">${this.textMessage}</div> <div slot="actions"> <div class="flex flex-row justify-end p-1"> <ix-button name="cancel" appearance="text" @click="${()=>this.onClick(!1)}">DISMISS</ix-button> <ix-button name="confirm" appearance="text" @click="${()=>this.onClick(!0)}">YES</ix-button> </div> </div> </ix-dialog>`}};p([C({type:String,attribute:!0})],le.prototype,"textMessage",void 0),p([C({type:Boolean,attribute:!0})],le.prototype,"open",void 0),le=p([R("confirmation-dialog")],le);let ce=class extends M{constructor(){super(...arguments),this.notification={},this.open=!1,this.dialogClosed=()=>{this.dispatchEvent(new CustomEvent("view-item-dialog-closed"))},this.viewRecord=()=>{this.dialogClosed(),u.showDrawer=!1}}static get styles(){return[k,H]}getUrl(){const e=this.notification.resourceId;switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return`/service-management/reports?ticketId=${e}`;case m.SERVICE_TICKETS:switch(this.notification.subGroup){case w.Remote_Hands:return`/service-management/service-tickets/remote-hands/${e}`;case w.Customer_Care:return`/service-management/service-tickets/customer-care/${e}`;case w.Deliveries:return`/service-management/service-tickets/${w.Deliveries}/${e}`;case w.Facility_Access:return`/service-management/service-tickets/facility-access/${e}`;case w.Removals:return`/service-management/service-tickets/removals/${e}`;case w.Trouble_Ticket:return`/service-management/service-tickets/trouble-tickets/${e}`;case w.FacilityAccessVisitorAccess:return`/service-management/service-tickets/facility-access/visitor-access/${e}`;case w.FacilityAccessPermanentBadge:return`/service-management/service-tickets/facility-access/permanent-badge/${e}`;case w.FacilityAccessOspAccess:return`/service-management/service-tickets/facility-access/osp-access/${e}`;case w.FacilityAccessPopPoeAccess:return`/service-management/service-tickets/facility-access/pop-poe-access/${e}`;default:return""}case m.INCIDENTS:return`/service-management/reports?ticketId=${e}`;case m.DCIM_ALERTS:return`/dcim/${e}`;default:return""}}getLocation(){return this.notification.locations===void 0||this.notification.locations.length<1?"":this.notification.locations.length>1?"Multiple Sites":this.notification.locations[0]}getSubGroupDisplayName(){switch(this.notification.subGroup){case w.FacilityAccessVisitorAccess:case w.FacilityAccessPermanentBadge:case w.FacilityAccessOspAccess:case w.FacilityAccessPopPoeAccess:return"Facility Access";case"Incidents (GSN)":return"Incidents";case"Emergency Repairs (InSite 1.0)":return"Emergency Repairs";default:return this.notification.subGroup}}render(){return l` <ix-dialog ?open="${this.open}" @closed="${this.dialogClosed}" class="notification-modal" data-testclass="notification-modal"> <div slot="headline" class="w-[560px]"> <div class="flex flex-col flex-start"> <div class="notification-modal-title text-2xl font-bold text-balance"> ${this.notification.resourceType} </div> <div class="notification-modal-subtitle pt-4 pb-0 font-bold text-balance" data-testid="notification-view-item-ticket-type"> ${this.getSubGroupDisplayName()} </div> </div> </div> <form class="notification-modal-content" slot="content" id="form-id" method="dialog"> <div class="notification-modal-content-title notification-modal-subject-title"> Subject </div> <div class="notification-modal-subject-text font-normal text-wrap" data-testid="notification-view-item-subject"> ${this.notification.subject} </div> <div class="notification-modal-content-title notification-modal-created-date-title"> Create Date </div> <div class="notification-modal-created-date-text font-normal text-wrap" data-testid="notification-view-item-date"> ${F(new Date(this.notification.createdAt),"dd/MM/yyyy HH:mm:ss")} </div> <div class="notification-modal-content-title notification-modal-site-title"> Site </div> <div class="notification-modal-site-text font-normal text-wrap" data-testid="notification-view-item-site-text"> ${this.getLocation()} </div> </form> <div slot="actions" class="flex flex-row flex-end"> <ix-button data-testid="notification-view-item-close" form="form-id" appearance="text"> Close </ix-button> <ix-button data-testid="notification-view-item-view-record" href="${this.getUrl()}" @click="${this.viewRecord}" appearance="text">View Record</ix-button> </div> </ix-dialog>`}};p([C({type:Object,attribute:!1})],ce.prototype,"notification",void 0),p([C({type:Boolean,attribute:!0})],ce.prototype,"open",void 0),ce=p([R("view-item-dialog")],ce);let P=class extends M{constructor(){super(...arguments),this.disabled=!1,this.read=!1,this.notification={},this.showModal=!1,this.showDeleteConfirmation=!1}static get styles(){return[k,H]}displayItem(){this.notification.status===N.UNREAD&&(u.setNotificationReadStatus(this.notification.id),this.read=!0),this.showModal=!0}deleteItem(){this.disabled||(this.showDeleteConfirmation=!0)}confirmedDelete(e){e.detail.returnValue&&u.setNotificationDeleted(this.notification.id).then(t=>{this.showDeleteResultMessage(t,this.notification.id)}),this.showDeleteConfirmation=!1}showDeleteResultMessage(e,t){window.dispatchEvent(new CustomEvent("add-toast",{detail:{id:t,content:l` <ix-message-toast data-testid="notification-delete-toast" toastId="${t}" .TMessageToast="${e.State.toLowerCase()}" forceClose> ${e.Message} </ix-message-toast>`,autoClose:2e3,durationOut:2e3,vertical:"bottom",horizontal:"center",animated:!0,above:!1}}))}calculateDuration(){return this.notification.createdAt!==void 0?he(new Date,new Date(this.notification.createdAt))<24?wt(new Date(this.notification.createdAt),new Date,{addSuffix:!0}):l`<ix-date type="static" variant="date-time" .value="${this.notification.createdAt}"></ix-date>`:"N/A"}getNotificationIcon(){switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return Te;case m.SERVICE_TICKETS:return"sync_saved_locally";case m.INCIDENTS:return"report";case m.DCIM_ALERTS:return $e;default:return"sync_saved_locally"}}getNotificationTitle(){switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return"Planned Maintenance";case m.SERVICE_TICKETS:return`${this.getServiceTicketSubGroup()} Service Ticket Update`;case m.INCIDENTS:return"Emergency Repair";case m.DCIM_ALERTS:return"DCIM Alert";default:return"sync_saved_locally"}}getServiceTicketSubGroup(){var e,t;switch((e=this.notification)==null?void 0:e.subGroup){case w.FacilityAccessVisitorAccess:case w.FacilityAccessPermanentBadge:case w.FacilityAccessOspAccess:case w.FacilityAccessPopPoeAccess:return"Facility Access";default:return(t=this.notification)==null?void 0:t.subGroup}}render(){return l` <div data-testid="notification-item" class="relative notification-item"> <div class="hover:bg-[rgba(0,0,0,0.04)] p-2 pl-3.5 flex gap-3 relative cursor-pointer items-center font-bold ${this.read?"notification-item-read border-l-3 border-transparent":"notification-item-unread border-l-3 border-success"}"> <ix-icon style="--ix-icon-font-size:24px;--ix-icon-line-height:24px" icon="${this.getNotificationIcon()}" class="${this.read?"inactive-icon":"active-icon"}" @click="${this.displayItem}">${this.getNotificationIcon()} </ix-icon> <div class="flex flex-col grow" @click="${this.displayItem}"> <div class="grow text-base"> <h2 class="dlr-text-caption">${this.getNotificationTitle()}</h2> </div> <div class="grow text-xs"> <h3 class="dlr-text-caption text-on-surface-disabled"> ${this.calculateDuration()} </h3> </div> </div> <div> <view-item-dialog ?open="${this.showModal}" .notification="${this.notification}" @view-item-dialog-closed="${()=>{this.showModal=!1}}"> </view-item-dialog> <confirmation-dialog ?open="${this.showDeleteConfirmation}" @on-confirm-selection="${this.confirmedDelete}" @confirm-dialog-closed="${()=>{this.showModal=!1}}" textMessage="Are you sure you want to delete this notification?" data-testclass="notification-delete-confirmation"> </confirmation-dialog> </div> <ix-icon-button style="--md-icon-button-icon-size:24px" data-testclass="delete-notification" @click="${this.deleteItem}" @mouseover="${e=>{this.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:this.disabled?"Emergency Repair Notification cannot be removed":"Remove Notification",target:e.target}}))}}" @mouseout="${()=>this.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" ?disabled="${this.disabled}"> <ix-icon slot="default" class="${this.disabled?"inactive-icon":"destructive-icon"}"> ${Kt} </ix-icon> </ix-icon-button> </div> </div> `}};p([C({type:Boolean})],P.prototype,"disabled",void 0),p([C({type:Boolean})],P.prototype,"read",void 0),p([C({type:Object,attribute:!1})],P.prototype,"notification",void 0),p([E()],P.prototype,"showModal",void 0),p([E()],P.prototype,"showDeleteConfirmation",void 0),P=p([R("notification-item")],P);let U=class extends M{constructor(){super(...arguments),this.groupTitle="Group 1",this.groupIcon="public",this.childItems=u.notifications,this.isOpen=!1,this.onClick=()=>{this.isOpen=!this.isOpen}}static get styles(){return[k,H]}renderNotificationItems(){var e,t,o;return this.isOpen?((e=this.childItems)==null?void 0:e.length)!==void 0&&((t=this.childItems)==null?void 0:t.length)>0?l`<div> ${(o=this.childItems)==null?void 0:o.map(a=>l`<notification-item .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}" data-testclass="notification-item"> </notification-item>`)} </div>`:l`<p class="dlr-text-caption ml-14 font-bold mr-4" data-testid="msg-no-notifications"> No notifications yet. </p>`:l`${v}`}render(){var e;return l`<div class="group-container-row border-b border-outline py-3"> <div class="flex items-center justify-between"> <div class="flex items-center align-middle"> <ix-icon-button icon="${this.isOpen?"arrow_drop_down":"arrow_right"}" @click="${this.onClick}" data-testclass="grouped-item-toggle-expand"> </ix-icon-button> <ix-icon slot="default" class="ix-icon-groups">${bt(this.groupIcon)}</ix-icon> <p class="m-0 group-name font-bold pl-1">${this.groupTitle}</p> <p class="m-0 pl-4"> ${(e=this.childItems)==null?void 0:e.length.toString().padStart(2,"0")} </p> </div> </div> ${this.renderNotificationItems()} </div>`}};p([C({type:String,attribute:!0})],U.prototype,"groupTitle",void 0),p([C({type:String,attribute:!0})],U.prototype,"groupIcon",void 0),p([C({type:Array,attribute:!0})],U.prototype,"childItems",void 0),p([E()],U.prototype,"isOpen",void 0),U=p([R("grouped-item")],U);let ze=class extends M{static get styles(){return[k,H]}onSwitchChange(e){var t;const o=e.target,a=(t=o.attributes.getNamedItem("name"))==null?void 0:t.value;u.setNotificationFilter(a,o.selected),this.requestUpdate()}render(){return l` <div class="flex flex-col"> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="planned-maintenance-switch" class="flex" name="${m.PLANNED_MAINTENANCE}" selected="${u.notificationFilters.SHOW_PLANNED_MAINTENANCE}" @change="${this.onSwitchChange}"></ix-switch> <span>Planned Maintenance</span></label> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="service-tickets-switch" class="flex" name="${m.SERVICE_TICKETS}" selected="${u.notificationFilters.SHOW_SERVICE_TICKETS}" @change="${this.onSwitchChange}"></ix-switch> <span>Service Ticket Updates</span></label> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="dcim-alerts-switch" class="flex" name="${m.DCIM_ALERTS}" selected="${u.notificationFilters.SHOW_DCIM_ALERTS}" @change="${this.onSwitchChange}"></ix-switch> <span>${m.DCIM_ALERTS}</span></label> </div>`}};ze=p([R("group-filters")],ze);let O=class extends M{constructor(){super(...arguments),this.fromDate=xe(u.dateFilters.FROM_DATE)?void 0:F(u.dateFilters.FROM_DATE,Q),this.toDate=xe(u.dateFilters.TO_DATE)?void 0:F(u.dateFilters.TO_DATE,Q),this.maxDate=F(new Date,Q),this.fromDateErrorText="",this.toDateErrorText=""}static get styles(){return[k,H]}onFromDateChange(e){e===null||e===""?this.fromDate=void 0:(this.fromDate=e,this.fromDate!==void 0&&(this.fromDateErrorText=void 0))}onToDateChange(e){e===null||e===""?this.toDate=void 0:(this.toDate=e,this.toDate!==void 0&&(this.toDateErrorText=void 0))}onApplyDateFilter(e){if(e){if(this.toDate===void 0&&this.fromDate!==void 0){this.toDateErrorText="Please select to date";return}if(this.fromDate===void 0&&this.toDate!==void 0){this.fromDateErrorText="Please select from date";return}if(this.fromDate>this.toDate){this.fromDateErrorText="From date cannot be later than To date.",this.fromDate=void 0;return}if(this.fromDateErrorText=void 0,this.toDate<this.fromDate){this.toDateErrorText="To date cannot be earlier than From date.",this.toDate=void 0;return}this.toDateErrorText=void 0}const t=e&&this.toDateErrorText===void 0&&this.fromDateErrorText===void 0;t&&(u.setNotificationDateFilter(this.fromDate,this.toDate),this.requestUpdate());const o=new CustomEvent("on-selection",{detail:{returnValue:t},bubbles:!0,composed:!0});this.dispatchEvent(o)}clearDateFilters(){this.fromDate=void 0,this.toDate=void 0,this.fromDateErrorText=void 0,this.toDateErrorText=void 0}render(){return l` <div class="flex flex-col p-4"> <div class="flex flex-row items-center"> <div class="grow items-center text-xl font-bold">Filter by Date</div> <div class="flex flex-row items-center" @click="${this.clearDateFilters}"> <label class="grow text-sm text-right pr-1 cursor-pointer">Clear Filter</label> <ix-icon-button data-testid="notifications-clear-date-filter" small appearance="default" icon="domain_verification_off" class="active-icon"></ix-icon-button> </div> </div> <ix-divider class="my-2"></ix-divider> <div class="flex xl:flex-row lg:flex-col md:flex-col sm:flex-col justify-between item-center my-4"> <div class="flex gap-2"> <ix-date data-testid="notifications-from-date" .value="${this.fromDate}" max="${this.maxDate}" label="From" name="FromDate" .errorText="${this.fromDateErrorText}" .onChanged="${e=>this.onFromDateChange(e)}"> </ix-date> <ix-date data-testid="notifications-to-date" .value="${this.toDate}" max="${this.maxDate}" label="To" name="ToDate" .errorText="${this.toDateErrorText}" .onChanged="${e=>this.onToDateChange(e)}"></ix-date> </div> </div> <div class="flex flex-row justify-between"> <ix-button data-testid="notifications-cancel-date-filter" type="" target="" appearance="text" @click="${()=>this.onApplyDateFilter(!1)}">Cancel</ix-button> <ix-button data-testid="notifications-activate-date-filter" type="" target="" appearance="text" @click="${()=>this.onApplyDateFilter(!0)}">Filter List</ix-button> </div> </div>`}};p([E()],O.prototype,"fromDate",void 0),p([E()],O.prototype,"toDate",void 0),p([E()],O.prototype,"maxDate",void 0),p([E()],O.prototype,"fromDateErrorText",void 0),p([E()],O.prototype,"toDateErrorText",void 0),O=p([R("date-filters")],O);let q=class extends M{constructor(){super(...arguments),this.isVisible=!1,this.label="",this.hoveredElement=void 0,this.configureNotificationTooltip=e=>{const{label:t,target:o}=e.detail;this.hoveredElement=o,this.label=t,this.isVisible=!0},this.hideNotificationTooltip=()=>{this.isVisible=!1,this.hoveredElement=void 0,this.label=""}}static get styles(){return[k,H]}connectedCallback(){super.connectedCallback(),window.addEventListener("show-notification-tooltip",this.configureNotificationTooltip),window.addEventListener("hide-notification-tooltip",this.hideNotificationTooltip)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("show-notification-tooltip",this.configureNotificationTooltip),window.removeEventListener("hide-notification-tooltip",this.hideNotificationTooltip)}updated(e){e.has("hoveredElement")&&this.isVisible&&this.hoveredElement&&Ee(this.hoveredElement,this.notificationTooltip,{placement:"bottom-end"}).then(({x:t,y:o})=>{this.notificationTooltip.style.left=`${t}px`,this.notificationTooltip.style.top=`${o+12}px`})}render(){const e={hidden:!this.isVisible};return l`<div class="notification-tooltip z-[9999] rounded absolute p-2 white-text ${vt(e)}"> ${this.label} </div> <slot></slot>`}};p([W(".notification-tooltip")],q.prototype,"notificationTooltip",void 0),p([C({type:Boolean,reflect:!0})],q.prototype,"isVisible",void 0),p([C({type:String,reflect:!0})],q.prototype,"label",void 0),p([E()],q.prototype,"hoveredElement",void 0),q=p([R("notification-tooltip")],q);class S extends M{constructor(){super(...arguments),this.showGroupedView=!1,this.showFilters=!1,this.showDateFilters=!1,this.showMarkAllReadConfirmation=!1,this.baseApiUrl="",this.localStorageKey=""}async firstUpdated(){u.baseApiUrl=this.baseApiUrl,u.localStorageKey=this.localStorageKey,u.ConstructApiClient()}connectedCallback(){super.connectedCallback(),window.addEventListener("account-switched",u.NewApiClient),window.addEventListener("ix-notifications-toggle-drawer",this.toggleDrawer),window.addEventListener("beforeunload",this.handleOnbeforeunload)}disconnectedCallback(){super.disconnectedCallback(),this.handleOnbeforeunload(),window.removeEventListener("account-switched",u.NewApiClient),window.removeEventListener("ix-notifications-toggle-drawer",this.toggleDrawer),window.removeEventListener("beforeunload",this.handleOnbeforeunload)}handleOnbeforeunload(){u.clearStoredNotificationsData()}toggleDrawer(){u.showDrawer=!u.showDrawer,u.showDrawer||(this.showFilters=!1,this.showDateFilters=!1)}markAllread(){u.unreadNotificationCount>0&&(this.showMarkAllReadConfirmation=!0)}async confirmedMarkAllRead(e){if(e.detail.returnValue){try{const t=await u.setAllNotificationAsRead();this.showResultMessage({State:B.SUCCESS,Message:`Successfully marked ${t.updatedCount} notifications as read`},"all-read")}catch(t){this.showResultMessage({State:B.ERROR,Message:"Error while marking the notifications read, Please try again"},"all-read")}this.requestUpdate()}this.showMarkAllReadConfirmation=!1}showResultMessage(e,t){window.dispatchEvent(new CustomEvent("add-toast",{detail:{id:t,content:l` <ix-message-toast data-testid="notification-read-all-toast" toastId="${t}" .TMessageToast="${e.State.toLowerCase()}" forceClose> ${e.Message} </ix-message-toast>`,autoClose:3e3,durationOut:3e3,vertical:"bottom",horizontal:"center",animated:!0,above:!1}}))}toggleGroupView(){this.showGroupedView=!this.showGroupedView}displayFilters(){this.showFilters=!this.showFilters}applyNotificationFilters(){var e;const t=(e=u.notifications)==null?void 0:e.filter(o=>o.resourceType===m.PLANNED_MAINTENANCE&&u.notificationFilters.SHOW_PLANNED_MAINTENANCE===!0||o.resourceType===m.SERVICE_TICKETS&&u.notificationFilters.SHOW_SERVICE_TICKETS===!0||o.resourceType===m.DCIM_ALERTS&&u.notificationFilters.SHOW_DCIM_ALERTS===!0||o.resourceType===m.INCIDENTS);return u.dateFilters.FROM_DATE!==void 0&&u.dateFilters.TO_DATE!==void 0?t.filter(o=>he(new Date(o.createdAt),u.dateFilters.FROM_DATE)>=0&&ie(new Date(o.createdAt),u.dateFilters.TO_DATE)<=0):u.dateFilters.FROM_DATE!==void 0&&u.dateFilters.TO_DATE===void 0?t.filter(o=>he(new Date(o.createdAt),u.dateFilters.FROM_DATE)>=0):u.dateFilters.FROM_DATE===void 0&&u.dateFilters.TO_DATE!==void 0?t.filter(o=>ie(new Date(o.createdAt),u.dateFilters.TO_DATE)<=0):t}displayDateFilters(){this.showDateFilters=!this.showDateFilters}renderGroupedView(){const e=this.applyNotificationFilters();return l`<div class="-mx-4 -mt-2"> <grouped-item data-testid="planned-maintenance-group" groupTitle="Planned Maintenance" groupIcon="${Te.strings[0]}" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.PLANNED_MAINTENANCE)}"></grouped-item> <grouped-item data-testid="emergency-repairs-group" groupTitle="Emergency Repairs" groupIcon="report" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.INCIDENTS)}"></grouped-item> <grouped-item data-testid="service-ticket-updates-group" groupTitle="Service Ticket Updates" groupIcon="sync_saved_locally" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.SERVICE_TICKETS)}"></grouped-item> <grouped-item data-testid="dcim-alerts-group" groupTitle="${m.DCIM_ALERTS}" groupIcon="${$e.strings[0]}" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.DCIM_ALERTS)}"></grouped-item> </div>`}renderDefaultView(){const e=this.applyNotificationFilters(),t=e.filter(a=>ie(new Date(a.createdAt),new Date)===0),o=e.filter(a=>ie(new Date(a.createdAt),new Date)!==0);return(e==null?void 0:e.length)>0?l` <h3>Today</h3> ${t.length>0?l`<div class="-mx-4"> ${t==null?void 0:t.map(a=>l`<notification-item ?read="${a.status!==N.UNREAD}" data-testclass="today-notification" .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}"> </notification-item> `)} </div>`:this.renderNoResult()} <h3>Earlier</h3> ${o.length>0?l`<div class="-mx-4" data-testid="earlier-notifications"> ${o==null?void 0:o.map(a=>l`<notification-item ?read="${a.status!==N.UNREAD}" data-testclass="earlier-notification" .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}"> </notification-item> `)} </div>`:this.renderNoResult()} `:l`<h3>Today</h3> ${this.renderNoResult()}`}renderNoResult(){return l`<p class="dlr-text-caption my-4"> <strong>No notifications yet.</strong> </p>`}handleCloseClick(e){this.showDateFilters=!1,this.showFilters=!1}handleContentScroll(e){e!==null&&e.detail.scrollTop+e.detail.clientHeight>=e.detail.scrollHeight-2&&u.getNotifications()}manageFilterVisibility(e){const t=e.composedPath();this.showFilters&&!t.includes(this.groupFilters)&&!t.includes(this.groupFiltersButton)&&(this.showFilters=!1),this.showDateFilters&&!t.includes(this.dateFilters)&&!t.includes(this.dateFiltersButton)&&(this.showDateFilters=!1)}render(){return l` <notification-tooltip data-testid="notifications-tooltip"> </notification-tooltip> <confirmation-dialog data-testid="notifications-confirm-read-dialog" ?open="${this.showMarkAllReadConfirmation}" @confirm-dialog-closed="${()=>{this.showMarkAllReadConfirmation=!1}}" @on-confirm-selection="${this.confirmedMarkAllRead}" textMessage="Are you sure you want to mark all notifications as read?"> </confirmation-dialog> <ix-drawer data-testid="notifications-drawer" ?isVisible="${u.showDrawer}" .onClosed="${()=>this.toggleDrawer()}" animate-vertical hide-close @on-content-scroll="${this.handleContentScroll}" @click="${this.manageFilterVisibility}" compact="compact"> <div slot="content" class="m-4"> <div class="flex flex-row justify-between grow items-center notification-header-container mb-4"> <h2 data-testid="notifications-heading" class="grow items-center dlr-text-heading"> Notifications </h2> <div class="flex flex-row justify-end grow items-center options" style="--md-icon-button-icon-size:24px"> <ix-icon-button data-testid="notifications-cta-all-read" data-testclass="notifications-cta" @click="${this.markAllread}" @mouseover="${e=>{u.unreadNotificationCount>0&&window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Mark All Read",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" icon="markunread_mailbox" class="${u.unreadNotificationCount<=0?"inactive-icon":"active-icon"}" .disabled="${u.unreadNotificationCount<=0}" filledIcon="true"></ix-icon-button> <ix-icon-button data-testid="notifications-cta-sort-type" data-testclass="notifications-cta" @click="${this.toggleGroupView}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Sort by Type",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" class="active-icon" label="Sort by Type"> <ix-icon slot="default">${this.showGroupedView?Jt:"sort"}</ix-icon> </ix-icon-button> <ix-icon-button data-testid="notifications-cta-filter-type" data-testclass="notifications-cta" @click="${this.displayFilters}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Filter by Type",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" class="active-icon" id="group-filter-button" label="Filter by Type"> <ix-icon slot="default"> ${Wt} </ix-icon> </ix-icon-button> <div data-testid="notifications-filter-dropdown" class="filter-dropdown-content ${this.showFilters?"active z-50":"hidden"}"> <group-filters></group-filters> </div> <ix-icon-button data-testid="notifications-cta-filter-date" data-testclass="notifications-cta" @click="${this.displayDateFilters}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Filter by Date",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" icon="date_range" class="active-icon" filledIcon="true" id="date-filters-button" label="Filter by Date"></ix-icon-button> <div data-testid="notifications-date-filter-dropdown" class="datefilter-dropdown-content ${this.showDateFilters?"active z-50":"hidden"}" @on-selection="${this.handleCloseClick}"> <date-filters></date-filters> </div> </div> </div> ${this.showGroupedView?this.renderGroupedView():this.renderDefaultView()} </div> </ix-drawer> `}}S.styles=[k,H],p([W("group-filters")],S.prototype,"groupFilters",void 0),p([W("ix-icon-button#group-filter-button")],S.prototype,"groupFiltersButton",void 0),p([W("date-filters")],S.prototype,"dateFilters",void 0),p([W("ix-icon-button#date-filters-button")],S.prototype,"dateFiltersButton",void 0),p([E()],S.prototype,"showGroupedView",void 0),p([E()],S.prototype,"showFilters",void 0),p([E()],S.prototype,"showDateFilters",void 0),p([E()],S.prototype,"showMarkAllReadConfirmation",void 0),p([C({type:String})],S.prototype,"baseApiUrl",void 0),p([C({type:String})],S.prototype,"localStorageKey",void 0),window.customElements.define("ix-notifications",S);const Li=Object.keys(window.registeredApps).map(i=>{const e=window.registeredApps[i],{host:t,blob:o,copyNS:a}=e,r=e.entry?`${t}${e.entry}`:null;return{name:i,path:window.registeredApps[i].path,host:t,blob:o,entry:r,serviceWorker:`${t||""}${e.serviceWorker}`,enabled:window.registeredApps[i].enabled,copyNS:a}}),Fe=()=>{const i=[],e={Error:"Failed to get version info"};return window.registeredApps["ui-gom"].enabled&&i.push((async()=>{try{return{"ui-gom":(await import("http://localhost:8090/versions.js")).default}}catch(t){return{"ui-gom":e}}})()),Promise.all(i)},Ii=async()=>{const i=await Fe();return console.log(JSON.stringify(i,void 0,2)),i},Hi=i=>Li.find(e=>{const t=Array.isArray(e.path)?e.path:[e.path];return e.enabled&&t.some(o=>i.startsWith(o))}),Vi=async()=>{const i=await Ct();if(!i)return;window.dataLayer=[{environmentType:_t,hashedUserId:i}];const e=document.createElement("script");e.type="text/javascript",e.text=`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
1457
+ } `;var S;(function(i){i.READ="read",i.UNREAD="unread"})(S||(S={}));var m;(function(i){i.PLANNED_MAINTENANCE="Planned Maintenance",i.INCIDENTS="Incidents",i.DCIM_ALERTS="DCIM Alerts",i.SERVICE_TICKETS="Service Tickets"})(m||(m={}));var v;(function(i){i.Remote_Hands="Remote Hands",i.Deliveries="Deliveries",i.Removals="Removals",i.Facility_Access="Facility Access",i.Trouble_Ticket="Trouble Ticket",i.Customer_Care="Customer Care",i.FacilityAccessVisitorAccess="FacilityAccessVisitorAccess",i.FacilityAccessPermanentBadge="FacilityAccessPermanentBadge",i.FacilityAccessOspAccess="FacilityAccessOspAccess",i.FacilityAccessPopPoeAccess="FacilityAccessPopPoeAccess"})(v||(v={}));var B;(function(i){i.LOADING="Loading",i.ERROR="Error",i.SUCCESS="Success"})(B||(B={}));const Q="yyyy-MM-dd",Xt=30,De="yyyy-MM-dd HH:mm:ss",ei="http://api.digitalrealty.com/notifications".replace(/\/+$/,"");class He{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:ei}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||Re}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const ti=new He;class ue{constructor(e=ti){this.configuration=e,this.fetchApi=async(t,o)=>{let a={url:t,init:o};for(const r of this.middleware)r.pre&&(a=await r.pre({fetch:this.fetchApi,...a})||a);let n;try{n=await(this.configuration.fetchApi||fetch)(a.url,a.init)}catch(r){for(const s of this.middleware)s.onError&&(n=await s.onError({fetch:this.fetchApi,url:a.url,init:a.init,error:r,response:n?n.clone():void 0})||n);if(n===void 0)throw r instanceof Error?new ai(r,"The request failed and the interceptors did not return an alternative response"):r}for(const r of this.middleware)r.post&&(n=await r.post({fetch:this.fetchApi,url:a.url,init:a.init,response:n.clone()})||n);return n},this.middleware=e.middleware}withMiddleware(...e){const t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){const t=e.map(o=>({pre:o}));return this.withMiddleware(...t)}withPostMiddleware(...e){const t=e.map(o=>({post:o}));return this.withMiddleware(...t)}isJsonMime(e){return e?ue.jsonRegex.test(e):!1}async request(e,t){const{url:o,init:a}=await this.createFetchParams(e,t),n=await this.fetchApi(o,a);if(n&&n.status>=200&&n.status<300)return n;throw new Ve(n,"Response returned an error code")}async createFetchParams(e,t){let o=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(e.query));const a=Object.assign({},this.configuration.headers,e.headers);Object.keys(a).forEach(d=>a[d]===void 0?delete a[d]:{});const n=typeof t=="function"?t:async()=>t,r={method:e.method,headers:a,body:e.body,credentials:this.configuration.credentials},s={...r,...await n({init:r,context:e})};let l;oi(s.body)||s.body instanceof URLSearchParams||ii(s.body)?l=s.body:this.isJsonMime(a["Content-Type"])?l=JSON.stringify(s.body):l=s.body;const u={...s,body:l};return{url:o,init:u}}clone(){const e=this.constructor,t=new e(this.configuration);return t.middleware=this.middleware.slice(),t}}ue.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ii(i){return typeof Blob<"u"&&i instanceof Blob}function oi(i){return typeof FormData<"u"&&i instanceof FormData}class Ve extends Error{constructor(e,t){super(t),this.response=e,this.name="ResponseError"}}class ai extends Error{constructor(e,t){super(t),this.cause=e,this.name="FetchError"}}class se extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const ni={csv:","};function Re(i,e=""){return Object.keys(i).map(t=>Pe(t,i[t],e)).filter(t=>t.length>0).join("&")}function Pe(i,e,t=""){const o=t+(t.length?`[${i}]`:i);if(e instanceof Array){const a=e.map(n=>encodeURIComponent(String(n))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${a}`}if(e instanceof Set){const a=Array.from(e);return Pe(i,a,t)}return e instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?Re(e,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(e))}`}class U{constructor(e,t=o=>o){this.raw=e,this.transformer=t}async value(){return this.transformer(await this.raw.json())}}function Oe(i){return ri(i)}function ri(i,e){return i}function Na(i){return i}function ve(i){return si(i)}function si(i,e){return i==null?i:{id:i.id==null?void 0:i.id,resourceType:i.resource_type==null?void 0:i.resource_type,subGroup:i.sub_group==null?void 0:i.sub_group,createdAt:i.created_at==null?void 0:new Date(i.created_at),createdBy:i.created_by==null?void 0:i.created_by,subject:i.subject==null?void 0:i.subject,locations:i.locations==null?void 0:i.locations,resourceId:i.resource_id==null?void 0:i.resource_id,status:i.status==null?void 0:Oe(i.status),accountNumber:i.account_number==null?void 0:i.account_number}}function li(i){return ci(i)}function ci(i,e){return i==null?i:{self:i.self==null?void 0:i.self,first:i.first==null?void 0:i.first,prev:i.prev==null?void 0:i.prev,next:i.next==null?void 0:i.next,last:i.last==null?void 0:i.last,items:i.items.map(ve)}}function di(i){return ui(i,!1)}function ui(i,e=!1){return i==null?i:{status:i.status}}function hi(i){return pi(i)}function pi(i,e){return i==null?i:{updatedCount:i.updated_count==null?void 0:i.updated_count}}function mi(i){return gi(i)}function gi(i,e){return i==null?i:{success:i.success==null?void 0:i.success}}function fi(i){return wi(i)}function wi(i,e){return i==null?i:{status:Oe(i.status)}}function bi(i){return vi(i,!1)}function vi(i,e=!1){return i==null?i:{status:i.status}}function xi(i){return yi(i,!1)}function yi(i,e=!1){return i==null?i:{resource_type:i.resourceType,sub_group:i.subGroup,recipients:i.recipients,account_number:i.accountNumber,locations:i.locations,resource_id:i.resourceId,subject:i.subject,created_at:i.createdAt==null?i.createdAt:i.createdAt.toISOString()}}class Ci extends ue{async createNotificationRaw(e,t){const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const r=this.configuration.accessToken,s=await r("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const n=await this.request({path:"/notifications",method:"POST",headers:a,query:o,body:xi(e.notificationRequest)},t);return new U(n,r=>ve(r))}async createNotification(e={},t){return await(await this.createNotificationRaw(e,t)).value()}async deleteNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling deleteNotificationsById().');const o={},a={};if(this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,l=await s("bearerToken",[]);l&&(a.Authorization=`Bearer ${l}`)}let n="/notifications/{id}";n=n.replace("{id}",encodeURIComponent(String(e.id)));const r=await this.request({path:n,method:"DELETE",headers:a,query:o},t);return new U(r,s=>mi(s))}async deleteNotificationsById(e,t){return await(await this.deleteNotificationsByIdRaw(e,t)).value()}async getNotificationsRaw(e,t){const o={};e.sort!=null&&(o.sort=e.sort),e.cursor!=null&&(o.cursor=e.cursor),e.resourceType!=null&&(o.resource_type=e.resourceType),e.accountNumber!=null&&(o.account_number=e.accountNumber),e.createdAfter!=null&&(o.created_after=e.createdAfter.toISOString()),e.createdBefore!=null&&(o.created_before=e.createdBefore.toISOString()),e.locationId!=null&&(o.location_id=e.locationId),e.subGroup!=null&&(o.sub_group=e.subGroup),e.status!=null&&(o.status=e.status);const a={};if(e.prefer!=null&&(a.Prefer=e.prefer.join(ni.csv)),this.configuration&&this.configuration.accessToken){const r=this.configuration.accessToken,s=await r("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const n=await this.request({path:"/notifications",method:"GET",headers:a,query:o},t);return new U(n,r=>li(r))}async getNotifications(e={},t){return await(await this.getNotificationsRaw(e,t)).value()}async getNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling getNotificationsById().');const o={},a={};if(this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,l=await s("bearerToken",[]);l&&(a.Authorization=`Bearer ${l}`)}let n="/notifications/{id}";n=n.replace("{id}",encodeURIComponent(String(e.id)));const r=await this.request({path:n,method:"GET",headers:a,query:o},t);return new U(r,s=>ve(s))}async getNotificationsById(e,t){return await(await this.getNotificationsByIdRaw(e,t)).value()}async patchNotificationsRaw(e,t){if(e.notificationBulkPatch==null)throw new se("notificationBulkPatch",'Required parameter "notificationBulkPatch" was null or undefined when calling patchNotifications().');const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const r=this.configuration.accessToken,s=await r("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const n=await this.request({path:"/notifications",method:"PATCH",headers:a,query:o,body:di(e.notificationBulkPatch)},t);return new U(n,r=>hi(r))}async patchNotifications(e,t){return await(await this.patchNotificationsRaw(e,t)).value()}async patchNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling patchNotificationsById().');const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,l=await s("bearerToken",[]);l&&(a.Authorization=`Bearer ${l}`)}let n="/notifications/{id}";n=n.replace("{id}",encodeURIComponent(String(e.id)));const r=await this.request({path:n,method:"PATCH",headers:a,query:o,body:bi(e.notificationPatch)},t);return new U(r,s=>fi(s))}async patchNotificationsById(e,t){return await(await this.patchNotificationsByIdRaw(e,t)).value()}}const _i={Notifications:"notifications"};class ki{constructor(e){this.noInit=!1,this.configuration=e}get notificationsApi(){return new Ci(new He({basePath:`${this.configuration.NotificationApiUrl}/${_i.Notifications}`,headers:{Authorization:this.getAuthorization()}}))}getAuthorization(){return this.configuration.getAuthorizationFn?this.configuration.getAuthorizationFn():""}}const xe=i=>i==null||i==="",Ai=i=>{switch(i.toLowerCase()){case"planned maintenance":return m.PLANNED_MAINTENANCE;case"incidents":return m.INCIDENTS;case"dcim alerts":return m.DCIM_ALERTS;case"service tickets":return m.SERVICE_TICKETS;default:return m.PLANNED_MAINTENANCE}},Ei=i=>{switch(i.toLowerCase()){case"unread":return S.UNREAD;case"read":return S.READ;default:return S.UNREAD}},Ni=i=>({sort:"-created_at",cursor:i,prefer:[""]}),Si=(i,e)=>({id:i,notificationPatch:{status:e}}),Ti=i=>({id:i}),ze=i=>{var e,t,o,a,n,r,s,l;return{subject:(e=i.subject)!=null?e:"",id:i.id,accountNumber:(t=i.accountNumber)!=null?t:"",resourceType:Ai((o=i.resourceType)!=null?o:""),subGroup:(a=i.subGroup)!=null?a:"",resourceId:(n=i.resourceId)!=null?n:"",status:Ei((r=i.status)!=null?r:""),createdAt:xe(i.createdAt)?F(new Date,De):F(i.createdAt,De),createdBy:(s=i.createdBy)!=null?s:"",locations:(l=i.locations)!=null?l:[]}},Fe=i=>i.map(e=>ze(e)),Mi=i=>{const e=new URLSearchParams(i),t=e.has("cursor")?e.get("cursor"):"";return t!==null?t:""},Y=async(i,e=!0)=>{let t="An error occurred";if(i instanceof Ve&&i.response.status===400)try{const{detail:o}=await i.response.json();t=o,e&&console.error(t)}catch(o){console.error(i)}else console.error(i)},$i=i=>{const e=localStorage.getItem(i);return e?JSON.parse(e):null},Li=i=>{var e;return`Bearer ${(e=$i(i))==null?void 0:e.access_token}`};let Ii=class{constructor(){this.showDrawer=!1,this.apiClient={noInit:!0},this.baseApiUrl="",this.localStorageKey="",this.NewApiClient=()=>{this.apiClient=new ki({NotificationApiUrl:this.baseApiUrl,getAuthorizationFn:()=>Li(this.localStorageKey)}),this.getNotifications()},this.nextPageCursor="",this.notifications=[],this.unreadNotificationCount=0,this.notificationFilters={SHOW_PLANNED_MAINTENANCE:!0,SHOW_SERVICE_TICKETS:!0,SHOW_DCIM_ALERTS:!0},this.selectedNotification={id:"",resourceType:m.PLANNED_MAINTENANCE,subGroup:"",subject:"",resourceId:"",locations:[],createdAt:"",accountNumber:"",createdBy:"",status:S.READ},this.dateFilters={FROM_DATE:vt(new Date,Xt),TO_DATE:new Date},ht(this),mt(this,{name:"notification-state",properties:["notificationFilters","nextPageCursor"],storage:window.localStorage})}get isHydrated(){return gt(this)}async hydrateStore(){await ft(this)}async clearStoredData(){await wt(this)}async getStoredData(){return bt(this)}ConstructApiClient(){return this.apiClient.noInit?this.NewApiClient():this.apiClient}async clearStoredNotificationsData(){this.notifications=[],this.unreadNotificationCount=0,this.nextPageCursor="",this.apiClient={noInit:!0}}async setNotificationReadStatus(e){const t=await this.setNotificationAsRead(e.toString());if(await t===!0){this.ReduceUnreadNotificationCount();const o=this.notifications.findIndex(a=>a.id===e);this.notifications[o].status=S.READ,this.selectedNotification=this.notifications[o]}return t}async setNotificationDeleted(e){const t=await this.DeleteNotification(e.toString());if(t===!0){const o=this.notifications.find(n=>n.id===e);(o==null?void 0:o.status)==="unread"&&this.ReduceUnreadNotificationCount();const a=this.notifications.findIndex(n=>n.id===e);this.notifications.splice(a,1)}return{State:t===!0?B.SUCCESS:B.ERROR,Message:t===!0?"Successfully deleted the notification":"Error while deleting the notification"}}setNotificationDateFilter(e,t){e!==void 0?this.dateFilters.FROM_DATE=Ae(e,Q,new Date):this.dateFilters.FROM_DATE=void 0,t!==void 0?this.dateFilters.TO_DATE=Ae(t,Q,new Date):this.dateFilters.TO_DATE=void 0}setNotificationFilter(e,t){switch(e){case m.PLANNED_MAINTENANCE:this.notificationFilters.SHOW_PLANNED_MAINTENANCE=t;break;case m.SERVICE_TICKETS:this.notificationFilters.SHOW_SERVICE_TICKETS=t;break;case m.DCIM_ALERTS:this.notificationFilters.SHOW_DCIM_ALERTS=t;break}}async getNotifications(){var e;let t;if(this.nextPageCursor!==void 0&&(t=await((e=this.apiClient)==null?void 0:e.notificationsApi.getNotificationsRaw(Ni(Mi(this.nextPageCursor))).catch(o=>{Y(o,!1)})),t)){const o=await(t==null?void 0:t.value());this.notifications=this.nextPageCursor===""?Fe(o==null?void 0:o.items):this.notifications.concat(Fe(o==null?void 0:o.items)),this.nextPageCursor=(o==null?void 0:o.next)!==void 0?o==null?void 0:o.next:void 0,this.unreadNotificationCount=t.raw.headers.get("x-total-unread-count")!==null&&t.raw.headers.get("x-total-unread-count")!==void 0?t.raw.headers.get("x-total-unread-count"):0}}async getNotificationsById(e){var t;let o;e&&(o=await((t=this.apiClient)==null?void 0:t.notificationsApi.getNotificationsById({id:e}).catch(a=>{Y(a,!1)}))),o&&(this.selectedNotification=ze(o))}async setNotificationAsRead(e){var t;return e?(await((t=this.apiClient)==null?void 0:t.notificationsApi.patchNotificationsById(Si(e,"read")).catch(o=>(Y(o,!1),!1))),!0):!1}async setAllNotificationAsRead(){var e;const t=await((e=this.apiClient)==null?void 0:e.notificationsApi.patchNotifications({notificationBulkPatch:{status:S.READ}}).catch(o=>(Y(o,!1),!1)));return this.notifications=this.notifications.map(o=>({...o,status:S.READ})),this.unreadNotificationCount=0,t}async DeleteNotification(e){var t;let o=!1;return e&&await((t=this.apiClient)==null?void 0:t.notificationsApi.deleteNotificationsById(Ti(e)).catch(a=>{Y(a,!1),o=!1}).then(()=>{o=!0})),o}ReduceUnreadNotificationCount(){this.unreadNotificationCount>0&&(this.unreadNotificationCount-=1)}};const h=new Ii,D=L`:host{--ix-drawer-border-radius:0;--ix-drawer-padding:0;--ix-drawer-width-sm:320px;--ix-drawer-width-md:320px;--ix-drawer-width-lg:400px}.destructive-icon{color:var(--clr-critical,#db0028);--md-icon-button-icon-color:var(--clr-critical, #DB0028);--md-sys-color-on-surface-variant:var(--clr-critical, #DB0028)}.destructive-icon path{fill:var(--clr-critical,#db0028)}.active-icon{color:var(--clr-primary,#1456e0);--md-icon-button-icon-color:var(--clr-primary, #1456E0);--md-sys-color-on-surface-variant:var(--clr-primary, #1456E0)}.active-icon path{fill:var(--clr-primary,#1456e0)}.inactive-icon{color:var(--clr-on-surface,#092241);--md-icon-button-icon-color:var(--clr-on-surface, #092241);--md-sys-color-on-surface-variant:var(--clr-on-surface, #092241);cursor:default;opacity:.6}.inactive-icon path{fill:var(--clr-on-surface,#092241);opacity:.6}ix-icon-button.sharp{--md-icon-font:'Material Symbols Sharp'!important}.ix-icon-groups{--ix-icon-font-size:32px;--ix-icon-line-height:32px}.ix-icon-groups ix-icon{color:var(--clr-on-surface,#092241);opacity:.6}.ix-icon-groups ix-icon path{fill:var(--clr-on-surface,#092241)}.datefilter-dropdown-content,.filter-dropdown-content{position:absolute;right:5%;top:3rem;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:3;transition:box-shadow .3s cubic-bezier(.4,0,.2,1) 0s;border-radius:3px;box-shadow:rgba(0,0,0,.2) 0 5px 5px -3px,rgba(0,0,0,.14) 0 8px 10px 1px,rgba(0,0,0,.12) 0 3px 14px 2px;background-color:var(--clr-surface-container-lowest,#fff)}.unread{font-family:var(--root-primary-font, 'sans-serif');padding:0 5px;font-size:var(--text-caption-size,.75rem);line-height:var(--text-caption-line-height,1.33333333em);left:22px;top:0;background:var(--clr-critical,#db0028);letter-spacing:var(--text-caption-letter-spacing,.03333333em)}.notification-tooltip{background-color:var(--cp-neutral-blue-4,#040d19);white-space:nowrap;font-size:var(--text-caption-size,.75rem);z-index:9999;color:var(--clr-on-secondary,#fff)}.notification-modal-subtitle,.notification-modal-title{color:var(--clr-on-surface,#092241);font-family:var(--root-secondary-font, 'sans-serif')}.notification-modal-subtitle{font-size:var(--text-heading-size,1.25rem);line-height:var(--text-heading-line-height,1.2em)}.notification-modal-content{display:inline-grid;grid-template-columns:fit-content(183px) 1fr;grid-template-rows:auto auto;grid-column-gap:24px;grid-row-gap:8px;font-family:var(--root-primary-font, 'sans-serif');font-size:var(--text-default-size,16px);line-height:28px;width:560px;padding-bottom:16px;color:var(--clr-on-surface,#092241)}.notification-modal-content-title{width:183px;color:var(--clr-on-surface-variant,#092241B3)}.notification-modal-subject-title{grid-area:1/1/2/2}.notification-modal-subject-text{grid-area:1/2/2/3}.notification-modal-created-date-title{grid-area:2/1/3/2}.notification-modal-created-date-text{grid-area:2/2/3/3}.notification-modal-site-title{grid-area:3/1/4/2}.notification-modal-site-text{grid-area:3/2/4/3}`;let le=class extends ${constructor(){super(...arguments),this.textMessage="Are you sure?",this.open=!1,this.dialogClosed=()=>{this.dispatchEvent(new CustomEvent("confirm-dialog-closed")),this.onClick(!1)}}static get styles(){return[A,D]}onClick(e){const t=new CustomEvent("on-confirm-selection",{detail:{returnValue:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}render(){return c` <ix-dialog ?open="${this.open}" class="w-[580px]" @closed="${this.dialogClosed}"> <div slot="headline">${this.textMessage}</div> <div slot="actions"> <div class="flex flex-row justify-end p-1"> <ix-button name="cancel" appearance="text" @click="${()=>this.onClick(!1)}">DISMISS</ix-button> <ix-button name="confirm" appearance="text" @click="${()=>this.onClick(!0)}">YES</ix-button> </div> </div> </ix-dialog>`}};p([k({type:String,attribute:!0})],le.prototype,"textMessage",void 0),p([k({type:Boolean,attribute:!0})],le.prototype,"open",void 0),le=p([P("confirmation-dialog")],le);let ce=class extends ${constructor(){super(...arguments),this.notification={},this.open=!1,this.dialogClosed=()=>{this.dispatchEvent(new CustomEvent("view-item-dialog-closed"))},this.viewRecord=()=>{this.dialogClosed(),h.showDrawer=!1}}static get styles(){return[A,D]}getUrl(){const e=this.notification.resourceId;switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return`/service-management/reports?ticketId=${e}`;case m.SERVICE_TICKETS:switch(this.notification.subGroup){case v.Remote_Hands:return`/service-management/service-tickets/remote-hands/${e}`;case v.Customer_Care:return`/service-management/service-tickets/customer-care/${e}`;case v.Deliveries:return`/service-management/service-tickets/${v.Deliveries}/${e}`;case v.Facility_Access:return`/service-management/service-tickets/facility-access/${e}`;case v.Removals:return`/service-management/service-tickets/removals/${e}`;case v.Trouble_Ticket:return`/service-management/service-tickets/trouble-tickets/${e}`;case v.FacilityAccessVisitorAccess:return`/service-management/service-tickets/facility-access/visitor-access/${e}`;case v.FacilityAccessPermanentBadge:return`/service-management/service-tickets/facility-access/permanent-badge/${e}`;case v.FacilityAccessOspAccess:return`/service-management/service-tickets/facility-access/osp-access/${e}`;case v.FacilityAccessPopPoeAccess:return`/service-management/service-tickets/facility-access/pop-poe-access/${e}`;default:return""}case m.INCIDENTS:return`/service-management/reports?ticketId=${e}`;case m.DCIM_ALERTS:return`/dcim/${e}`;default:return""}}getLocation(){return this.notification.locations===void 0||this.notification.locations.length<1?"":this.notification.locations.length>1?"Multiple Sites":this.notification.locations[0]}getSubGroupDisplayName(){switch(this.notification.subGroup){case v.FacilityAccessVisitorAccess:case v.FacilityAccessPermanentBadge:case v.FacilityAccessOspAccess:case v.FacilityAccessPopPoeAccess:return"Facility Access";case"Incidents (GSN)":return"Incidents";case"Emergency Repairs (InSite 1.0)":return"Emergency Repairs";default:return this.notification.subGroup}}render(){return c` <ix-dialog ?open="${this.open}" @closed="${this.dialogClosed}" class="notification-modal" data-testclass="notification-modal"> <div slot="headline" class="w-[560px]"> <div class="flex flex-col flex-start"> <div class="notification-modal-title text-2xl font-bold text-balance"> ${this.notification.resourceType} </div> <div class="notification-modal-subtitle pt-4 pb-0 font-bold text-balance" data-testid="notification-view-item-ticket-type"> ${this.getSubGroupDisplayName()} </div> </div> </div> <form class="notification-modal-content" slot="content" id="form-id" method="dialog"> <div class="notification-modal-content-title notification-modal-subject-title"> Subject </div> <div class="notification-modal-subject-text font-normal text-wrap" data-testid="notification-view-item-subject"> ${this.notification.subject} </div> <div class="notification-modal-content-title notification-modal-created-date-title"> Create Date </div> <div class="notification-modal-created-date-text font-normal text-wrap" data-testid="notification-view-item-date"> ${F(new Date(this.notification.createdAt),"dd/MM/yyyy HH:mm:ss")} </div> <div class="notification-modal-content-title notification-modal-site-title"> Site </div> <div class="notification-modal-site-text font-normal text-wrap" data-testid="notification-view-item-site-text"> ${this.getLocation()} </div> </form> <div slot="actions" class="flex flex-row flex-end"> <ix-button data-testid="notification-view-item-close" form="form-id" appearance="text"> Close </ix-button> <ix-button data-testid="notification-view-item-view-record" href="${this.getUrl()}" @click="${this.viewRecord}" appearance="text">View Record</ix-button> </div> </ix-dialog>`}};p([k({type:Object,attribute:!1})],ce.prototype,"notification",void 0),p([k({type:Boolean,attribute:!0})],ce.prototype,"open",void 0),ce=p([P("view-item-dialog")],ce);let O=class extends ${constructor(){super(...arguments),this.disabled=!1,this.read=!1,this.notification={},this.showModal=!1,this.showDeleteConfirmation=!1}static get styles(){return[A,D]}displayItem(){this.notification.status===S.UNREAD&&(h.setNotificationReadStatus(this.notification.id),this.read=!0),this.showModal=!0}deleteItem(){this.disabled||(this.showDeleteConfirmation=!0)}confirmedDelete(e){e.detail.returnValue&&h.setNotificationDeleted(this.notification.id).then(t=>{this.showDeleteResultMessage(t,this.notification.id)}),this.showDeleteConfirmation=!1}showDeleteResultMessage(e,t){window.dispatchEvent(new CustomEvent("add-toast",{detail:{id:t,content:c` <ix-message-toast data-testid="notification-delete-toast" toastId="${t}" .TMessageToast="${e.State.toLowerCase()}" forceClose> ${e.Message} </ix-message-toast>`,autoClose:2e3,durationOut:2e3,vertical:"bottom",horizontal:"center",animated:!0,above:!1}}))}calculateDuration(){return this.notification.createdAt!==void 0?he(new Date,new Date(this.notification.createdAt))<24?xt(new Date(this.notification.createdAt),new Date,{addSuffix:!0}):c`<ix-date type="static" variant="date-time" .value="${this.notification.createdAt}"></ix-date>`:"N/A"}getNotificationIcon(){switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return Ie;case m.SERVICE_TICKETS:return"sync_saved_locally";case m.INCIDENTS:return"report";case m.DCIM_ALERTS:return Le;default:return"sync_saved_locally"}}getNotificationTitle(){switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return"Planned Maintenance";case m.SERVICE_TICKETS:return`${this.getServiceTicketSubGroup()} Service Ticket Update`;case m.INCIDENTS:return"Emergency Repair";case m.DCIM_ALERTS:return"DCIM Alert";default:return"sync_saved_locally"}}getServiceTicketSubGroup(){var e,t;switch((e=this.notification)==null?void 0:e.subGroup){case v.FacilityAccessVisitorAccess:case v.FacilityAccessPermanentBadge:case v.FacilityAccessOspAccess:case v.FacilityAccessPopPoeAccess:return"Facility Access";default:return(t=this.notification)==null?void 0:t.subGroup}}render(){return c` <div data-testid="notification-item" class="relative notification-item"> <div class="hover:bg-[rgba(0,0,0,0.04)] p-2 pl-3.5 flex gap-3 relative cursor-pointer items-center font-bold ${this.read?"notification-item-read border-l-3 border-transparent":"notification-item-unread border-l-3 border-success"}"> <ix-icon style="--ix-icon-font-size:24px;--ix-icon-line-height:24px" icon="${this.getNotificationIcon()}" class="${this.read?"inactive-icon":"active-icon"}" @click="${this.displayItem}">${this.getNotificationIcon()} </ix-icon> <div class="flex flex-col grow" @click="${this.displayItem}"> <div class="grow text-base"> <h2 class="dlr-text-caption">${this.getNotificationTitle()}</h2> </div> <div class="grow text-xs"> <h3 class="dlr-text-caption text-on-surface-disabled"> ${this.calculateDuration()} </h3> </div> </div> <div> <view-item-dialog ?open="${this.showModal}" .notification="${this.notification}" @view-item-dialog-closed="${()=>{this.showModal=!1}}"> </view-item-dialog> <confirmation-dialog ?open="${this.showDeleteConfirmation}" @on-confirm-selection="${this.confirmedDelete}" @confirm-dialog-closed="${()=>{this.showModal=!1}}" textMessage="Are you sure you want to delete this notification?" data-testclass="notification-delete-confirmation"> </confirmation-dialog> </div> <ix-icon-button style="--md-icon-button-icon-size:24px" data-testclass="delete-notification" @click="${this.deleteItem}" @mouseover="${e=>{this.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:this.disabled?"Emergency Repair Notification cannot be removed":"Remove Notification",target:e.target}}))}}" @mouseout="${()=>this.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" ?disabled="${this.disabled}"> <ix-icon slot="default" class="${this.disabled?"inactive-icon":"destructive-icon"}"> ${Qt} </ix-icon> </ix-icon-button> </div> </div> `}};p([k({type:Boolean})],O.prototype,"disabled",void 0),p([k({type:Boolean})],O.prototype,"read",void 0),p([k({type:Object,attribute:!1})],O.prototype,"notification",void 0),p([N()],O.prototype,"showModal",void 0),p([N()],O.prototype,"showDeleteConfirmation",void 0),O=p([P("notification-item")],O);let j=class extends ${constructor(){super(...arguments),this.groupTitle="Group 1",this.groupIcon="public",this.childItems=h.notifications,this.isOpen=!1,this.onClick=()=>{this.isOpen=!this.isOpen}}static get styles(){return[A,D]}renderNotificationItems(){var e,t,o;return this.isOpen?((e=this.childItems)==null?void 0:e.length)!==void 0&&((t=this.childItems)==null?void 0:t.length)>0?c`<div> ${(o=this.childItems)==null?void 0:o.map(a=>c`<notification-item .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}" data-testclass="notification-item"> </notification-item>`)} </div>`:c`<p class="dlr-text-caption ml-14 font-bold mr-4" data-testid="msg-no-notifications"> No notifications yet. </p>`:c`${b}`}render(){var e;return c`<div class="group-container-row border-b border-outline py-3"> <div class="flex items-center justify-between"> <div class="flex items-center align-middle"> <ix-icon-button icon="${this.isOpen?"arrow_drop_down":"arrow_right"}" @click="${this.onClick}" data-testclass="grouped-item-toggle-expand"> </ix-icon-button> <ix-icon slot="default" class="ix-icon-groups">${yt(this.groupIcon)}</ix-icon> <p class="m-0 group-name font-bold pl-1">${this.groupTitle}</p> <p class="m-0 pl-4"> ${(e=this.childItems)==null?void 0:e.length.toString().padStart(2,"0")} </p> </div> </div> ${this.renderNotificationItems()} </div>`}};p([k({type:String,attribute:!0})],j.prototype,"groupTitle",void 0),p([k({type:String,attribute:!0})],j.prototype,"groupIcon",void 0),p([k({type:Array,attribute:!0})],j.prototype,"childItems",void 0),p([N()],j.prototype,"isOpen",void 0),j=p([P("grouped-item")],j);let Ze=class extends ${static get styles(){return[A,D]}onSwitchChange(e){var t;const o=e.target,a=(t=o.attributes.getNamedItem("name"))==null?void 0:t.value;h.setNotificationFilter(a,o.selected),this.requestUpdate()}render(){return c` <div class="flex flex-col"> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="planned-maintenance-switch" class="flex" name="${m.PLANNED_MAINTENANCE}" selected="${h.notificationFilters.SHOW_PLANNED_MAINTENANCE}" @change="${this.onSwitchChange}"></ix-switch> <span>Planned Maintenance</span></label> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="service-tickets-switch" class="flex" name="${m.SERVICE_TICKETS}" selected="${h.notificationFilters.SHOW_SERVICE_TICKETS}" @change="${this.onSwitchChange}"></ix-switch> <span>Service Ticket Updates</span></label> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="dcim-alerts-switch" class="flex" name="${m.DCIM_ALERTS}" selected="${h.notificationFilters.SHOW_DCIM_ALERTS}" @change="${this.onSwitchChange}"></ix-switch> <span>${m.DCIM_ALERTS}</span></label> </div>`}};Ze=p([P("group-filters")],Ze);let z=class extends ${constructor(){super(...arguments),this.fromDate=xe(h.dateFilters.FROM_DATE)?void 0:F(h.dateFilters.FROM_DATE,Q),this.toDate=xe(h.dateFilters.TO_DATE)?void 0:F(h.dateFilters.TO_DATE,Q),this.maxDate=F(new Date,Q),this.fromDateErrorText="",this.toDateErrorText=""}static get styles(){return[A,D]}onFromDateChange(e){e===null||e===""?this.fromDate=void 0:(this.fromDate=e,this.fromDate!==void 0&&(this.fromDateErrorText=void 0))}onToDateChange(e){e===null||e===""?this.toDate=void 0:(this.toDate=e,this.toDate!==void 0&&(this.toDateErrorText=void 0))}onApplyDateFilter(e){if(e){if(this.toDate===void 0&&this.fromDate!==void 0){this.toDateErrorText="Please select to date";return}if(this.fromDate===void 0&&this.toDate!==void 0){this.fromDateErrorText="Please select from date";return}if(this.fromDate>this.toDate){this.fromDateErrorText="From date cannot be later than To date.",this.fromDate=void 0;return}if(this.fromDateErrorText=void 0,this.toDate<this.fromDate){this.toDateErrorText="To date cannot be earlier than From date.",this.toDate=void 0;return}this.toDateErrorText=void 0}const t=e&&this.toDateErrorText===void 0&&this.fromDateErrorText===void 0;t&&(h.setNotificationDateFilter(this.fromDate,this.toDate),this.requestUpdate());const o=new CustomEvent("on-selection",{detail:{returnValue:t},bubbles:!0,composed:!0});this.dispatchEvent(o)}clearDateFilters(){this.fromDate=void 0,this.toDate=void 0,this.fromDateErrorText=void 0,this.toDateErrorText=void 0}render(){return c` <div class="flex flex-col p-4"> <div class="flex flex-row items-center"> <div class="grow items-center text-xl font-bold">Filter by Date</div> <div class="flex flex-row items-center" @click="${this.clearDateFilters}"> <label class="grow text-sm text-right pr-1 cursor-pointer">Clear Filter</label> <ix-icon-button data-testid="notifications-clear-date-filter" small appearance="default" icon="domain_verification_off" class="active-icon"></ix-icon-button> </div> </div> <ix-divider class="my-2"></ix-divider> <div class="flex xl:flex-row lg:flex-col md:flex-col sm:flex-col justify-between item-center my-4"> <div class="flex gap-2"> <ix-date data-testid="notifications-from-date" .value="${this.fromDate}" max="${this.maxDate}" label="From" name="FromDate" .errorText="${this.fromDateErrorText}" .onChanged="${e=>this.onFromDateChange(e)}"> </ix-date> <ix-date data-testid="notifications-to-date" .value="${this.toDate}" max="${this.maxDate}" label="To" name="ToDate" .errorText="${this.toDateErrorText}" .onChanged="${e=>this.onToDateChange(e)}"></ix-date> </div> </div> <div class="flex flex-row justify-between"> <ix-button data-testid="notifications-cancel-date-filter" type="" target="" appearance="text" @click="${()=>this.onApplyDateFilter(!1)}">Cancel</ix-button> <ix-button data-testid="notifications-activate-date-filter" type="" target="" appearance="text" @click="${()=>this.onApplyDateFilter(!0)}">Filter List</ix-button> </div> </div>`}};p([N()],z.prototype,"fromDate",void 0),p([N()],z.prototype,"toDate",void 0),p([N()],z.prototype,"maxDate",void 0),p([N()],z.prototype,"fromDateErrorText",void 0),p([N()],z.prototype,"toDateErrorText",void 0),z=p([P("date-filters")],z);let q=class extends ${constructor(){super(...arguments),this.isVisible=!1,this.label="",this.hoveredElement=void 0,this.configureNotificationTooltip=e=>{const{label:t,target:o}=e.detail;this.hoveredElement=o,this.label=t,this.isVisible=!0},this.hideNotificationTooltip=()=>{this.isVisible=!1,this.hoveredElement=void 0,this.label=""}}static get styles(){return[A,D]}connectedCallback(){super.connectedCallback(),window.addEventListener("show-notification-tooltip",this.configureNotificationTooltip),window.addEventListener("hide-notification-tooltip",this.hideNotificationTooltip)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("show-notification-tooltip",this.configureNotificationTooltip),window.removeEventListener("hide-notification-tooltip",this.hideNotificationTooltip)}updated(e){e.has("hoveredElement")&&this.isVisible&&this.hoveredElement&&Ee(this.hoveredElement,this.notificationTooltip,{placement:"bottom-end"}).then(({x:t,y:o})=>{this.notificationTooltip.style.left=`${t}px`,this.notificationTooltip.style.top=`${o+12}px`})}render(){const e={hidden:!this.isVisible};return c`<div class="notification-tooltip z-[9999] rounded absolute p-2 white-text ${Ct(e)}"> ${this.label} </div> <slot></slot>`}};p([W(".notification-tooltip")],q.prototype,"notificationTooltip",void 0),p([k({type:Boolean,reflect:!0})],q.prototype,"isVisible",void 0),p([k({type:String,reflect:!0})],q.prototype,"label",void 0),p([N()],q.prototype,"hoveredElement",void 0),q=p([P("notification-tooltip")],q);class T extends ${constructor(){super(...arguments),this.showGroupedView=!1,this.showFilters=!1,this.showDateFilters=!1,this.showMarkAllReadConfirmation=!1,this.baseApiUrl="",this.localStorageKey=""}async firstUpdated(){h.baseApiUrl=this.baseApiUrl,h.localStorageKey=this.localStorageKey,h.ConstructApiClient()}connectedCallback(){super.connectedCallback(),window.addEventListener("account-switched",h.NewApiClient),window.addEventListener("ix-notifications-toggle-drawer",this.toggleDrawer),window.addEventListener("beforeunload",this.handleOnbeforeunload)}disconnectedCallback(){super.disconnectedCallback(),this.handleOnbeforeunload(),window.removeEventListener("account-switched",h.NewApiClient),window.removeEventListener("ix-notifications-toggle-drawer",this.toggleDrawer),window.removeEventListener("beforeunload",this.handleOnbeforeunload)}handleOnbeforeunload(){h.clearStoredNotificationsData()}toggleDrawer(){h.showDrawer=!h.showDrawer,h.showDrawer||(this.showFilters=!1,this.showDateFilters=!1)}markAllread(){h.unreadNotificationCount>0&&(this.showMarkAllReadConfirmation=!0)}async confirmedMarkAllRead(e){if(e.detail.returnValue){try{const t=await h.setAllNotificationAsRead();this.showResultMessage({State:B.SUCCESS,Message:`Successfully marked ${t.updatedCount} notifications as read`},"all-read")}catch(t){this.showResultMessage({State:B.ERROR,Message:"Error while marking the notifications read, Please try again"},"all-read")}this.requestUpdate()}this.showMarkAllReadConfirmation=!1}showResultMessage(e,t){window.dispatchEvent(new CustomEvent("add-toast",{detail:{id:t,content:c` <ix-message-toast data-testid="notification-read-all-toast" toastId="${t}" .TMessageToast="${e.State.toLowerCase()}" forceClose> ${e.Message} </ix-message-toast>`,autoClose:3e3,durationOut:3e3,vertical:"bottom",horizontal:"center",animated:!0,above:!1}}))}toggleGroupView(){this.showGroupedView=!this.showGroupedView}displayFilters(){this.showFilters=!this.showFilters}applyNotificationFilters(){var e;const t=(e=h.notifications)==null?void 0:e.filter(o=>o.resourceType===m.PLANNED_MAINTENANCE&&h.notificationFilters.SHOW_PLANNED_MAINTENANCE===!0||o.resourceType===m.SERVICE_TICKETS&&h.notificationFilters.SHOW_SERVICE_TICKETS===!0||o.resourceType===m.DCIM_ALERTS&&h.notificationFilters.SHOW_DCIM_ALERTS===!0||o.resourceType===m.INCIDENTS);return h.dateFilters.FROM_DATE!==void 0&&h.dateFilters.TO_DATE!==void 0?t.filter(o=>he(new Date(o.createdAt),h.dateFilters.FROM_DATE)>=0&&ie(new Date(o.createdAt),h.dateFilters.TO_DATE)<=0):h.dateFilters.FROM_DATE!==void 0&&h.dateFilters.TO_DATE===void 0?t.filter(o=>he(new Date(o.createdAt),h.dateFilters.FROM_DATE)>=0):h.dateFilters.FROM_DATE===void 0&&h.dateFilters.TO_DATE!==void 0?t.filter(o=>ie(new Date(o.createdAt),h.dateFilters.TO_DATE)<=0):t}displayDateFilters(){this.showDateFilters=!this.showDateFilters}renderGroupedView(){const e=this.applyNotificationFilters();return c`<div class="-mx-4 -mt-2"> <grouped-item data-testid="planned-maintenance-group" groupTitle="Planned Maintenance" groupIcon="${Ie.strings[0]}" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.PLANNED_MAINTENANCE)}"></grouped-item> <grouped-item data-testid="emergency-repairs-group" groupTitle="Emergency Repairs" groupIcon="report" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.INCIDENTS)}"></grouped-item> <grouped-item data-testid="service-ticket-updates-group" groupTitle="Service Ticket Updates" groupIcon="sync_saved_locally" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.SERVICE_TICKETS)}"></grouped-item> <grouped-item data-testid="dcim-alerts-group" groupTitle="${m.DCIM_ALERTS}" groupIcon="${Le.strings[0]}" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.DCIM_ALERTS)}"></grouped-item> </div>`}renderDefaultView(){const e=this.applyNotificationFilters(),t=e.filter(a=>ie(new Date(a.createdAt),new Date)===0),o=e.filter(a=>ie(new Date(a.createdAt),new Date)!==0);return(e==null?void 0:e.length)>0?c` <h3>Today</h3> ${t.length>0?c`<div class="-mx-4"> ${t==null?void 0:t.map(a=>c`<notification-item ?read="${a.status!==S.UNREAD}" data-testclass="today-notification" .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}"> </notification-item> `)} </div>`:this.renderNoResult()} <h3>Earlier</h3> ${o.length>0?c`<div class="-mx-4" data-testid="earlier-notifications"> ${o==null?void 0:o.map(a=>c`<notification-item ?read="${a.status!==S.UNREAD}" data-testclass="earlier-notification" .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}"> </notification-item> `)} </div>`:this.renderNoResult()} `:c`<h3>Today</h3> ${this.renderNoResult()}`}renderNoResult(){return c`<p class="dlr-text-caption my-4"> <strong>No notifications yet.</strong> </p>`}handleCloseClick(e){this.showDateFilters=!1,this.showFilters=!1}handleContentScroll(e){e!==null&&e.detail.scrollTop+e.detail.clientHeight>=e.detail.scrollHeight-2&&h.getNotifications()}manageFilterVisibility(e){const t=e.composedPath();this.showFilters&&!t.includes(this.groupFilters)&&!t.includes(this.groupFiltersButton)&&(this.showFilters=!1),this.showDateFilters&&!t.includes(this.dateFilters)&&!t.includes(this.dateFiltersButton)&&(this.showDateFilters=!1)}render(){return c` <notification-tooltip data-testid="notifications-tooltip"> </notification-tooltip> <confirmation-dialog data-testid="notifications-confirm-read-dialog" ?open="${this.showMarkAllReadConfirmation}" @confirm-dialog-closed="${()=>{this.showMarkAllReadConfirmation=!1}}" @on-confirm-selection="${this.confirmedMarkAllRead}" textMessage="Are you sure you want to mark all notifications as read?"> </confirmation-dialog> <ix-drawer data-testid="notifications-drawer" ?isVisible="${h.showDrawer}" .onClosed="${()=>this.toggleDrawer()}" animate-vertical hide-close @on-content-scroll="${this.handleContentScroll}" @click="${this.manageFilterVisibility}" compact="compact"> <div slot="content" class="m-4"> <div class="flex flex-row justify-between grow items-center notification-header-container mb-4"> <h2 data-testid="notifications-heading" class="grow items-center dlr-text-heading"> Notifications </h2> <div class="flex flex-row justify-end grow items-center options" style="--md-icon-button-icon-size:24px"> <ix-icon-button data-testid="notifications-cta-all-read" data-testclass="notifications-cta" @click="${this.markAllread}" @mouseover="${e=>{h.unreadNotificationCount>0&&window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Mark All Read",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" icon="markunread_mailbox" class="${h.unreadNotificationCount<=0?"inactive-icon":"active-icon"}" .disabled="${h.unreadNotificationCount<=0}" filledIcon="true"></ix-icon-button> <ix-icon-button data-testid="notifications-cta-sort-type" data-testclass="notifications-cta" @click="${this.toggleGroupView}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Sort by Type",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" class="active-icon" label="Sort by Type"> <ix-icon slot="default">${this.showGroupedView?Yt:"sort"}</ix-icon> </ix-icon-button> <ix-icon-button data-testid="notifications-cta-filter-type" data-testclass="notifications-cta" @click="${this.displayFilters}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Filter by Type",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" class="active-icon" id="group-filter-button" label="Filter by Type"> <ix-icon slot="default"> ${Jt} </ix-icon> </ix-icon-button> <div data-testid="notifications-filter-dropdown" class="filter-dropdown-content ${this.showFilters?"active z-50":"hidden"}"> <group-filters></group-filters> </div> <ix-icon-button data-testid="notifications-cta-filter-date" data-testclass="notifications-cta" @click="${this.displayDateFilters}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Filter by Date",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" icon="date_range" class="active-icon" filledIcon="true" id="date-filters-button" label="Filter by Date"></ix-icon-button> <div data-testid="notifications-date-filter-dropdown" class="datefilter-dropdown-content ${this.showDateFilters?"active z-50":"hidden"}" @on-selection="${this.handleCloseClick}"> <date-filters></date-filters> </div> </div> </div> ${this.showGroupedView?this.renderGroupedView():this.renderDefaultView()} </div> </ix-drawer> `}}T.styles=[A,D],p([W("group-filters")],T.prototype,"groupFilters",void 0),p([W("ix-icon-button#group-filter-button")],T.prototype,"groupFiltersButton",void 0),p([W("date-filters")],T.prototype,"dateFilters",void 0),p([W("ix-icon-button#date-filters-button")],T.prototype,"dateFiltersButton",void 0),p([N()],T.prototype,"showGroupedView",void 0),p([N()],T.prototype,"showFilters",void 0),p([N()],T.prototype,"showDateFilters",void 0),p([N()],T.prototype,"showMarkAllReadConfirmation",void 0),p([k({type:String})],T.prototype,"baseApiUrl",void 0),p([k({type:String})],T.prototype,"localStorageKey",void 0),window.customElements.define("ix-notifications",T);const Di=Object.keys(window.registeredApps).map(i=>{const e=window.registeredApps[i],{host:t,blob:o,copyNS:a}=e,n=e.entry?`${t}${e.entry}`:null;return{name:i,path:window.registeredApps[i].path,host:t,blob:o,entry:n,serviceWorker:`${t||""}${e.serviceWorker}`,enabled:window.registeredApps[i].enabled,copyNS:a}}),Be=()=>{const i=[],e={Error:"Failed to get version info"};return window.registeredApps["ui-gom"].enabled&&i.push((async()=>{try{return{"ui-gom":(await import("http://localhost:8090/versions.js")).default}}catch(t){return{"ui-gom":e}}})()),Promise.all(i)},Hi=async()=>{const i=await Be();return console.log(JSON.stringify(i,void 0,2)),i},Vi=i=>Di.find(e=>{const t=Array.isArray(e.path)?e.path:[e.path];return e.enabled&&t.some(o=>i.startsWith(o))}),Ri=async()=>{const i=await At();if(!i)return;window.dataLayer=[{environmentType:Et,hashedUserId:i}];const e=document.createElement("script");e.type="text/javascript",e.text=`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
1454
1458
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
1455
1459
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
1456
1460
  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
1457
- })(window,document,'script','dataLayer','${kt}')`,document.head.appendChild(e)},Di=async()=>{const i=Ne();return await(await fetch(`${oe}/user-profile`,{headers:{Authorization:`Bearer ${i}`}})).json()};function Ze(i){document.cookie=`${i}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${i}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;const e=location.hostname.split(".").slice(-2).join(".");document.cookie=`${i}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=.${e}`}function Ri(){const i=document.cookie.split(";");for(let e of i){const t=e.indexOf("="),o=t>-1?e.substring(0,t).trim():e.trim();Ze(o)}}function Pi(){document.cookie.split(";").map(i=>i.trim().split("=")[0]).filter(i=>/^_ga(_|$)/.test(i)).forEach(i=>Ze(i))}const Oi=50,G={full:{first:0,last:0,total:0,items:[]},exclude_child_accounts:{first:0,last:0,total:0,items:[]}};let zi=0;const X=new Map,V=async({search_term:i="",page_number:e=0,page_size:t=Oi,exclude_child_accounts:o=!1,account_number:a=null}={})=>{if(i===""&&e===0){if(o){if(G.exclude_child_accounts.items.length>0)return G.exclude_child_accounts}else if(G.full.items.length>0)return G.full}const r=K(),n=a!=null?a:r.profile.account_number,s=new URLSearchParams;s.set("account_number",n),s.set("page_number",e),s.set("page_size",t),s.set("search_term",i),s.set("exclude_child_accounts",!!o);const c=++zi,h=new AbortController;X.set(c,h);try{const d=await fetch(`${oe}/AuthorizedAccountHierarchyV2?${s.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${r.access_token}`},signal:h.signal});for(const[x,$]of X.entries())x<c&&($.abort(),X.delete(x));if(X.delete(c),!d.ok)return console.error("Error fetching account hierarchy:",d==null?void 0:d.status),null;const f=await d.json();return Bi({search_term:i,page_number:e,result:f,exclude_child_accounts:o})}catch(d){return X.delete(c),d.name==="AbortError"||console.error("Error fetching account hierarchy:",d),null}},Fi=()=>{const{location:i}=window;return`${i.protocol}//${i.hostname}${i.port?`:${i.port}`:""}`},Zi=async(i,e)=>{const t=Fi();return await(await fetch(`${oe}/connect/token`,{headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:Et,grant_type:"refresh_token",refresh_token:e,redirect_uri:t,acr_values:`account_number:${i}`}),method:"POST"})).json()},de=async i=>{const e=K(),t=await Zi(i,e.refresh_token);At(t,e),window.location.reload()},Bi=({search_term:i,page_number:e,result:t,exclude_child_accounts:o})=>{if(i===""){const a=o?G.exclude_child_accounts:G.full;e===0?(a.items=t==null?void 0:t.items,a.first=t==null?void 0:t.self,a.last=t==null?void 0:t.self):a.last<t.self?(a.items=[...a.items,...t.items],a.last=t==null?void 0:t.self,a.first===0&&(a.first=t==null?void 0:t.self)):(a.items=[...t==null?void 0:t.items,...a.items],a.first=t==null?void 0:t.self,a.last===0&&(a.last=t==null?void 0:t.self)),a.total=t==null?void 0:t.last,dispatchEvent(new CustomEvent("accountsloaded"))}return t.total=t==null?void 0:t.last,t.first=t==null?void 0:t.self,t.last=t==null?void 0:t.self,t},Be=async i=>{const e=Ne(),t=await fetch(`${Nt}/cookie-consent/cookie-consent`,{headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i),method:"POST"});return t.ok?await t.json():!1},ji=L`:host{--left-bar-width:288px;--left-bar-width-lg:96px;--open-menu-width-md:276px;--content-height:calc(100vh - calc(var(--intraportal-nav-height, 0px) + var(--header-height, 0px) + var(--mobile-nav-height, 0px) + 1rem));--body-height:calc(100vh - var(--intraportal-nav-height, 0px));--main-height:calc(100vh - calc(var(--intraportal-nav-height, 0px) + var(--mobile-nav-height, 0px)));--main-height-tablet-nav:calc(var(--main-height) - 2rem);--top-height:calc(var(--header-height, 0px) + var(--intraportal-nav-height, 0px))}:host([compact]){--left-bar-width:112px}.zero-width-height{width:0;height:0;overflow:hidden}.no-display{display:none}ix-intraportal-nav{position:sticky;top:0;left:0;right:0;z-index:9}:host,:host :root,:root,body{--ix-top-nav-offset:2rem}`,je=L`:host{--logo-padding-left:0px;--navbar-icon-min-width:24px}@-moz-document url-prefix(){nav *{scrollbar-width:thin;scrollbar-color:#002274 #5b73d6}}nav ::-webkit-scrollbar{max-width:8px;background-color:#002274}nav ::-webkit-scrollbar-thumb{background-color:#5b73d6;border-radius:100px;max-height:183px;max-width:6px;border:1px solid #002274}.nav-bar-bg{background:linear-gradient(#1456e0 20.5%,#0d2497 113.5%)}.nav-bar-bg.wide{background:linear-gradient(90.27deg,#1456e0 0,#0d2497 99.23%)}.on-primary-icon{--md-icon-button-icon-color:var(--clr-on-primary, #fff);--md-sys-color-on-surface-variant:var(--clr-on-primary, #fff)}.animate-width{transition:width .3s ease,viewBox .3s ease,left .3s ease,opacity .3s ease,grid-template-columns .3s ease}.expand-cta{--md-icon-button-icon-color:var(--clr-graphics-fill, rgba(9, 34, 65, 0.6))}.divider{border-color:var(--clr-on-primary,#fff);opacity:.2;margin:0;flex-shrink:0;border-width:0 0 thin;border-style:solid}.nav-toggle{--ix-nav-toggle:var(--clr-graphics-fill, rgba(9, 34, 65, 0.6));--md-icon-button-icon-color:var(--ix-nav-toggle);--md-icon-button-hover-icon-color:var(--ix-nav-toggle);--md-icon-button-pressed-icon-color:var(--ix-nav-toggle);--md-icon-button-focus-icon-color:var(--ix-nav-toggle)}@media only screen and (max-width:600px){.dlr-logo{display:none}}`,Ue=L`#menu{--md-sys-color-on-surface-variant:var(--clr-surface-container-lowest, #fff);--md-menu-item-label-text-color:var(--clr-surface-container-lowest, #fff);--md-menu-container-color:var(--clr-secondary, #092241);--ix-icon-font-size:1.4rem;--md-menu-container-shape:8px}.active-icon{color:var(--clr-primary,#1456e0);--md-icon-button-icon-color:var(--clr-primary, #1456E0);--md-sys-color-on-surface-variant:var(--clr-primary, #1456E0)}.header-container{background-color:rgba(245,247,255,.85);backdrop-filter:blur(6px)}.header__account__menu__text{white-space:nowrap}.flex-container{display:flex;gap:1rem;align-items:center;justify-content:center}.header__accounts{--md-outlined-field-top-space:0.5rem;--md-outlined-field-bottom-space:0.5rem;--ix-outline-color:var(--clr-graphics-fill)}.divider{margin:0 10px 0 10px;flex-shrink:0;border-width:0 thin 0 0;border-style:solid;border-color:var(--clr-secondary,#092241);opacity:.12;height:24px;align-self:center}`;var Ui=Object.defineProperty,qi=(i,e,t)=>e in i?Ui(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,qe=(i,e,t)=>qi(i,typeof e!="symbol"?e+"":e,t);const Gi="accountSelection:selectedAccount",Wi="/user-management/user-management",Ki="/user-management/role-management";let Ge=class extends z{constructor(){super(),qe(this,"isUserOrRoleManagement",()=>{const e=window.location.pathname;return e.startsWith(Wi)||e.startsWith(Ki)}),this.accountsPaged=[],this.nextDataAvailable=!1,this.lastFetchedRequest=0,this.rangeLoaded={first:void 0,last:void 0},this.loading=!1,this.showingFlattenedAccounts=!1,this.selectedAccountNumber=K().profile.account_number,this.selectedAccountNumberRootNode=null}firstUpdated(){if(this.getAccounts(),window.location.search.includes("selected_account_number")){sessionStorage.setItem(Gi,this.selectedAccountNumber);return}window.addEventListener(I.VaadinRouterLocationChanged,()=>{this.getAccounts({routeChanged:!0})})}async switchAccount(e){this.selectedAccountNumber=e,await de(e)}async getAccounts({routeChanged:e=!1}={}){if(this.loading)return;const t=this.isUserOrRoleManagement();if(e&&this.showingFlattenedAccounts===t)return;if(this.showingFlattenedAccounts=t,t&&this.selectedAccountNumberRootNode&&this.selectedAccountNumber!==this.selectedAccountNumberRootNode){await de(this.selectedAccountNumberRootNode);return}this.loading=!0;const o=await V({exclude_child_accounts:t});if(!o){this.loading=!1;return}if(this.accountsPaged=this.mapToSwitcherAccounts(o==null?void 0:o.items,null),this.nextDataAvailable=o.last<o.total,this.prevDataAvailable=o.first>1,this.rangeLoaded={first:o.first,last:o.last},this.accountsPaged.length<10&&this.prevDataAvailable){this.rangeLoaded.first-=1;const a=this.rangeLoaded.first,r=await V({page_number:a,exclude_child_accounts:t});this.accountsPaged=[...this.mapToSwitcherAccounts(r==null?void 0:r.items,null),...this.accountsPaged],this.prevDataAvailable=this.rangeLoaded.first>1}this.loading=!1}async getMoreAccounts(e){const t=e.detail,o=t.filterString||"",a=this.isUserOrRoleManagement(),r=Date.now();if(t.next){const n=this.rangeLoaded.last+1,s=await V({search_term:o,page_number:n,exclude_child_accounts:a});if(!s||r<this.lastFetchedRequest)return;this.lastFetchedRequest=r,this.rangeLoaded.last+=1,this.accountsPaged=[...this.accountsPaged,...this.mapToSwitcherAccounts(s==null?void 0:s.items,null)],this.nextDataAvailable=s.total>s.last}else if(t.prev){const n=this.rangeLoaded.first-1,s=await V({search_term:o,page_number:n,exclude_child_accounts:a});if(!s||r<this.lastFetchedRequest)return;this.lastFetchedRequest=r,this.rangeLoaded.first-=1,this.accountsPaged=[...this.mapToSwitcherAccounts(s==null?void 0:s.items,null),...this.accountsPaged],this.prevDataAvailable=this.rangeLoaded.first>1}else if(o===""){const n=await V({exclude_child_accounts:a});if(!n||r<this.lastFetchedRequest)return;this.lastFetchedRequest=r,this.accountsPaged=this.mapToSwitcherAccounts(n==null?void 0:n.items,null),this.rangeLoaded={first:n.first,last:n.last},this.nextDataAvailable=n.total>this.rangeLoaded.last,this.prevDataAvailable=this.rangeLoaded.first>1}else{const n=await V({search_term:o,page_number:1,exclude_child_accounts:a});if(!n||r<this.lastFetchedRequest)return;this.lastFetchedRequest=r,this.accountsPaged=this.mapToSwitcherAccounts(n==null?void 0:n.items,null),this.rangeLoaded={first:n.self,last:n.self},this.nextDataAvailable=n.last>n.self,this.prevDataAvailable=this.rangeLoaded.first>1}}mapToSwitcherAccounts(e,t){return e.map(o=>{const a={id:o.accountNumber,rootId:t?t.rootId:o.accountNumber,status:void 0,accountNumber:o.accountNumber,name:o.accountName||o.accountNumber,displayName:o.displayName||`[${o.accountNumber}] ${o.accountName}`};return this.selectedAccountNumber===o.accountNumber&&(this.selectedAccountNumberRootNode=a.rootId),{...a,subaccounts:this.mapToSwitcherAccounts(o.subAccounts,a)}})}renderEmpty(){return l` <ix-account-switcher class="w-200"></ix-account-switcher> `}render(){return l` <ix-account-switcher .accounts="${this.accountsPaged}" .loading="${this.loading}" .selectedAccountNumber="${this.selectedAccountNumber}" .enableFilterDialog="${!0}" ?nextDataAvailable="${this.nextDataAvailable}" ?prevDataAvailable="${this.prevDataAvailable}" @account-switched="${e=>this.switchAccount(e.detail)}" @account-fetch="${this.getMoreAccounts}" class="w-200"></ix-account-switcher> `}};qe(Ge,"properties",{accountsPaged:{type:Array,state:!0},selectedAccountNumber:{type:String}}),window.customElements.define("account-selection",Ge);var Ji=Object.defineProperty,Qi=(i,e,t)=>e in i?Ji(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,We=(i,e,t)=>Qi(i,typeof e!="symbol"?e+"":e,t);let Yi=class extends M{constructor(){super(...arguments),We(this,"_notificationsState",u),We(this,"toggleNotificationsDrawer",()=>{window.dispatchEvent(new CustomEvent("ix-notifications-toggle-drawer"))})}static get properties(){return{mobile:{type:Boolean}}}static get styles(){return[k,L`.unread{padding:0 5px;font-size:12px;line-height:16px;left:14px;top:-2px;background:var(--clr-critical,#db0028)}`]}renderUnReadCountText(){if(this._notificationsState.unreadNotificationCount<=0)return l` ${v} `;let e="";return this._notificationsState.unreadNotificationCount>99?e="99+":e=this._notificationsState.unreadNotificationCount.toString(),l` <div class="unread rounded-full text-center text-white text-sm absolute icon-position -start-0"> ${e} </div> `}render(){return l` <div class="relative"> <ix-icon-button style="--md-icon-button-icon-size:24px" class="flex" @click="${()=>this.toggleNotificationsDrawer()}" small aria-label="Open notifications"> <svg slot="default" focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="${this.mobile?"white":"rgb(20, 86, 224)"}"> <path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"></path> </svg> </ix-icon-button> ${this.renderUnReadCountText()} </div> `}};window.customElements.define("notifications-icon",Yi);let Xi=class extends z{static get styles(){return[k,L`ix-icon-button{--md-icon-button-icon-size:32px}ix-icon-button.mobile{--md-icon-button-icon-size:40px}`]}static get properties(){return{mobile:{type:Boolean}}}render(){return l` <ix-icon-button class="${`flex ${this.mobile?"mobile":""}`}" tabindex="0" type="button" aria-label="Open profile options" small> <svg slot="default" focusable="false" aria-hidden="true" viewBox="0 0 40 40" data-testid="AccountCircleIcon"> <rect xmlns="http://www.w3.org/2000/svg" width="40" height="40" rx="20" fill="#1456E0"/> <path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M25 15C25 17.7625 22.7625 20 20 20C17.2375 20 15 17.7625 15 15C15 12.2375 17.2375 10 20 10C22.7625 10 25 12.2375 25 15ZM10 27.5C10 24.175 16.6625 22.5 20 22.5C23.3375 22.5 30 24.175 30 27.5V30H10V27.5Z" fill="white"/> </svg> <span></span> </ix-icon-button> `}};window.customElements.define("user-profile-icon",Xi);const eo="uppercase font-bold tracking-wider";let to=class extends z{dispatchCreateUserEvent(){const e=new CustomEvent(I.CreateUserClicked,{bubbles:!1,composed:!1});window.dispatchEvent(e)}render(){return l` <ix-button @click="${this.dispatchCreateUserEvent}" has-icon> <md-icon slot="icon">add</md-icon> <span class="${eo}">Create User</span> </ix-button> `}};customElements.define("create-user-button",to);let io=class extends z{static get properties(){return{isAccountMenuOpen:{state:!0},mobile:{type:Boolean},showManualLogout:{state:!0}}}constructor(){super(),this.isAccountMenuOpen=!1,this.showManualLogout=!1}static get styles(){return[Ue,k]}async firstUpdated(){this.menuElem=this.shadowRoot.querySelector("#menu")}logout(){window.location="/logout"}navigateToUserSettings(){window.dispatchEvent(new CustomEvent("edit-profile",{bubbles:!0,composed:!0}))}navigateToAuthenticationOptions(){window.location=`${oe}/PhoneNumber?returnUrl=${window.location.href}`}handleAccountMenuToggle(){this.isAccountMenuOpen=!this.isAccountMenuOpen,this.menuElem.open=this.isAccountMenuOpen}handleMenuClosed(){this.menuElem.open=!1,this.isAccountMenuOpen=!1}render(){return l` <div class="relative"> <user-profile-icon id="accountBtn" @click="${this.handleAccountMenuToggle}" ?mobile="${this.mobile}"></user-profile-icon> <ix-menu y-offset="0" x-offset="${this.mobile?"-220":"-120"}" anchor="accountBtn" has-overflow id="menu" @closed="${this.handleMenuClosed}"> <ix-menu-item @click="${this.navigateToUserSettings}"> <ix-icon slot="start">edit</ix-icon> <div slot="headline" class="header__account__menu__text"> Edit Profile </div> </ix-menu-item> ${St()?v:l` <ix-menu-item @click="${this.navigateToAuthenticationOptions}"> <ix-icon slot="start">settings</ix-icon> <div slot="headline" class="header__account__menu__text"> Authentication Options </div> </ix-menu-item> `} <ix-menu-item @click="${()=>this.showManualLogout=!0}"> <ix-icon slot="start">exit_to_app</ix-icon> <div slot="headline" class="header__account__menu__text"> Log out </div> </ix-menu-item> </ix-menu> </div> <ix-manual-logout-dialog ?open="${this.showManualLogout}" @closed="${()=>this.showManualLogout=!1}"></ix-manual-logout-dialog> `}};window.customElements.define("user-profile-ui",io);var oo=Object.defineProperty,ao=(i,e,t)=>e in i?oo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ke=(i,e,t)=>ao(i,typeof e!="symbol"?e+"":e,t);let ro=class extends z{constructor(){super(),Ke(this,"setHeaderHeight",async()=>{const e=this.offsetHeight;e&&document.body.style.setProperty("--header-height",`${e}px`)}),Ke(this,"locationChangeHandler",e=>{var t,o,a;if(sessionStorage.getItem(pe.SessionStorage.HasOutstandingChanges)==="true")return;const{location:r}=e.detail;(this.currentLocation!==e.srcElement.location.href||((t=r==null?void 0:r.route)==null?void 0:t.hideAccountSwitcher)===!0)&&(this.hideAccountSwitcher=(a=(o=r==null?void 0:r.route)==null?void 0:o.hideAccountSwitcher)!=null?a:!1,this.currentLocation=e.srcElement.location.href),this.updateHeaderByLocation(r!=null&&r.pathname?r:window.location),this.setHeaderHeight()}),this.headerLeft=null,this.headerRight=null,this.isAccountMenuOpen=!1}static get properties(){return{headerLeft:{attribute:!1},headerRight:{attribute:!1},pageTitle:{state:!0},isAccountMenuOpen:{state:!0},hideAccountSwitcher:{state:!1},currentLocation:{state:""}}}static get styles(){return[Ue,k]}headerClass(){const e=window.location.pathname.split("/");return e[2]?null:e[1]||"launchpad"}chartsHeader(){this.pageTitle="",this.headerRight=null,this.headerLeft=l` <ix-button appearance="text" has-icon @click="${()=>window.history.back()}"> <md-icon slot="icon">arrow_back</md-icon> <span class="uppercase font-bold tracking-wider">Back</span> </ix-button> `}userManagementHeader(){this.pageTitle="User Management",this.headerLeft=null,this.headerRight=J.hasExternalUserCreate()?l` <create-user-button></create-user-button> `:null}dispatchAddConnectivityEvent(){document.dispatchEvent(new CustomEvent("add-connectivity",{detail:{},bubbles:!0,composed:!0}))}inventoryManagementHeader(){this.pageTitle="Inventory",this.headerLeft=null,this.headerRight=J.hasConnectivityCreate()?l` <ix-button @click="${this.dispatchAddConnectivityEvent}" has-icon> <ix-icon slot="icon">add</ix-icon> <span>Add Connectivity</span> </ix-button> `:null}orderManagementHeader(){this.pageTitle="Order Management",this.headerLeft=null,this.headerRight=J.hasConnectivityCreate()?l` <ix-button @click="${this.dispatchAddConnectivityEvent}" has-icon> <ix-icon slot="icon">add</ix-icon> <span>Add Connectivity</span> </ix-button> `:null}orderDetailsHeader(){this.pageTitle="",this.headerLeft=l` <ix-button appearance="text" has-icon @click="${()=>window.history.back()}"> <md-icon slot="icon">arrow_back</md-icon> <span class="uppercase font-bold tracking-wider">Back</span> </ix-button> `,this.headerRight=l` <gom-cancel-order-button></gom-cancel-order-button> `,this.hideAccountSwitcher=!0}emptyHeader(){this.pageTitle="",this.headerLeft=null,this.headerRight=null,this.hideAccountSwitcher=!0}roleManagementHeader(){this.pageTitle="Role Management",this.headerLeft=null,this.headerRight=null}knowledgeBaseHeader(){this.pageTitle="Knowledge Base",this.headerLeft=null,this.headerRight=null}reportsHeader(){this.pageTitle="Reports, Maintenance & Incident Notifications",this.headerRight=null,this.headerLeft=null}launchPadHeader(){this.pageTitle="Launchpad",this.headerLeft=null,this.headerRight=null}myAccountHeader(){this.pageTitle="My Account",this.headerLeft=null,this.headerRight=null}esgHeader(){this.pageTitle="ESG Reporting",this.headerLeft=null,this.headerRight=null}updateHeaderByLocation(e=window.location){var t,o,a;if(sessionStorage.getItem(pe.SessionStorage.HasOutstandingChanges)==="true")return;if(e.pathname.startsWith(window.registeredApps["ui-dcim-charts"].path)){this.chartsHeader();return}if(e.pathname.startsWith(window.registeredApps["ui-knowledge-base"].path)&&this.knowledgeBaseHeader(),e.pathname.startsWith(window.registeredApps["ui-dcim-reports"].path)||e.pathname.startsWith(`${window.registeredApps["ui-service-management"].path}/reports`)||e.pathname.startsWith(`${window.registeredApps["ui-service-management"].path}/incidents`)){this.reportsHeader();return}if(e.pathname.startsWith(window.registeredApps["ui-my-account"].path)){this.myAccountHeader();return}if(e.pathname.startsWith(window.registeredApps["ui-esg"].path)){this.esgHeader();return}if(e.baseUrl==="/"&&e.pathname==="/"){this.launchPadHeader();return}const r=e.pathname.split("/");{if(r[1]==="inventory"){this.inventoryManagementHeader();return}if(r[1]==="order-management"){if(r[2]==="order-details"){this.orderDetailsHeader();return}if(r[2]==="open-orders"||r[2]==="closed-orders"){this.orderManagementHeader();return}this.emptyHeader();return}}if(r[1]==="user-management"){if(r[2]==="user-management"){this.userManagementHeader();return}if(r[2]==="role-management"){this.roleManagementHeader();return}}const n=(t=e.route)==null?void 0:t.name;n&&(this.pageTitle=n,this.headerLeft=(o=e.route)==null?void 0:o.headerLeft,this.headerRight=(a=e.route)==null?void 0:a.headerRight)}async firstUpdated(){this.menuElem=this.shadowRoot.querySelector("#menu"),this.updateHeaderByLocation()}updated(){this.setHeaderHeight(),setTimeout(()=>{this.setHeaderHeight()},2e3)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.setHeaderHeight),window.addEventListener("scroll",this.setHeaderHeight),window.addEventListener(I.VaadinRouterLocationChanged,this.locationChangeHandler),window.addEventListener(I.LocationChanged,this.locationChangeHandler)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.setHeaderHeight),window.removeEventListener("scroll",this.setHeaderHeight),window.removeEventListener(I.VaadinRouterLocationChanged,this.locationChangeHandler),window.removeEventListener(I.LocationChanged,this.locationChangeHandler)}render(){return l` <div class="header-container p-4 md:p-6 lg:px-4 lg:pt-8 lg:pl-12"> <div class="flex flex-col flex-col-reverse gap-4 lg:gap-6 md:flex-row md:items-center justify-start"> <div class="grow flex flex-col gap-4 lg:gap-6 md:flex-row md:items-center md:justify-between"> ${this.headerLeft?this.headerLeft:l` <h1 class="dlr-text-page-title grow">${this.pageTitle}</h1> `} <div class="flex gap-4 lg:gap-6 md:justify-end"> ${this.headerRight?l` <div class="flex gap-4 lg:gap-6 relative items-center md:justify-end"> ${this.headerRight} <hr class="divider hidden lg:block m-0"> </div> `:v} <div class="hidden relative lg:flex gap-6 items-center md:justify-end"> ${window.registeredApps["ui-gom"].enabled?l`<gom-cart-icon-button></gom-cart-icon-button>`:v} <notifications-icon></notifications-icon> <user-profile-ui></user-profile-ui> </div> </div> </div> ${this.hideAccountSwitcher?v:l` <account-selection class="header__accounts grow md:grow-0 -m-4 mb-0 md:m-0 md:w-[260px]"></account-selection> `} </div> </div> `}};window.customElements.define("app-shell-header",ro);const y={digitalRealtyLogo:b`
1461
+ })(window,document,'script','dataLayer','${Nt}')`,document.head.appendChild(e)},Pi=async()=>{const i=Ne();return await(await fetch(`${oe}/user-profile`,{headers:{Authorization:`Bearer ${i}`}})).json()};function Ue(i){document.cookie=`${i}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${i}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;const e=location.hostname.split(".").slice(-2).join(".");document.cookie=`${i}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=.${e}`}function Oi(){const i=document.cookie.split(";");for(let e of i){const t=e.indexOf("="),o=t>-1?e.substring(0,t).trim():e.trim();Ue(o)}}function zi(){document.cookie.split(";").map(i=>i.trim().split("=")[0]).filter(i=>/^_ga(_|$)/.test(i)).forEach(i=>Ue(i))}const Fi=50,G={full:{first:0,last:0,total:0,items:[]},exclude_child_accounts:{first:0,last:0,total:0,items:[]}};let Zi=0;const X=new Map,H=async({search_term:i="",page_number:e=0,page_size:t=Fi,exclude_child_accounts:o=!1,account_number:a=null}={})=>{if(i===""&&e===0){if(o){if(G.exclude_child_accounts.items.length>0)return G.exclude_child_accounts}else if(G.full.items.length>0)return G.full}const n=K(),r=a!=null?a:n.profile.account_number,s=new URLSearchParams;s.set("account_number",r),s.set("page_number",e),s.set("page_size",t),s.set("search_term",i),s.set("exclude_child_accounts",!!o);const l=++Zi,u=new AbortController;X.set(l,u);try{const d=await fetch(`${oe}/AuthorizedAccountHierarchyV2?${s.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${n.access_token}`},signal:u.signal});for(const[w,y]of X.entries())w<l&&(y.abort(),X.delete(w));if(X.delete(l),!d.ok)return console.error("Error fetching account hierarchy:",d==null?void 0:d.status),null;const f=await d.json();return ji({search_term:i,page_number:e,result:f,exclude_child_accounts:o})}catch(d){return X.delete(l),d.name==="AbortError"||console.error("Error fetching account hierarchy:",d),null}},Bi=()=>{const{location:i}=window;return`${i.protocol}//${i.hostname}${i.port?`:${i.port}`:""}`},Ui=async(i,e)=>{const t=Bi();return await(await fetch(`${oe}/connect/token`,{headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:Tt,grant_type:"refresh_token",refresh_token:e,redirect_uri:t,acr_values:`account_number:${i}`}),method:"POST"})).json()},de=async i=>{const e=K(),t=await Ui(i,e.refresh_token);St(t,e),window.location.reload()},ji=({search_term:i,page_number:e,result:t,exclude_child_accounts:o})=>{if(i===""){const a=o?G.exclude_child_accounts:G.full;e===0?(a.items=t==null?void 0:t.items,a.first=t==null?void 0:t.self,a.last=t==null?void 0:t.self):a.last<t.self?(a.items=[...a.items,...t.items],a.last=t==null?void 0:t.self,a.first===0&&(a.first=t==null?void 0:t.self)):(a.items=[...t==null?void 0:t.items,...a.items],a.first=t==null?void 0:t.self,a.last===0&&(a.last=t==null?void 0:t.self)),a.total=t==null?void 0:t.last,dispatchEvent(new CustomEvent("accountsloaded"))}return t.total=t==null?void 0:t.last,t.first=t==null?void 0:t.self,t.last=t==null?void 0:t.self,t},je=async i=>{const e=Ne(),t=await fetch(`${Mt}/cookie-consent/cookie-consent`,{headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i),method:"POST"});return t.ok?await t.json():!1},qi=L`:host{--left-bar-width:288px;--left-bar-width-lg:96px;--open-menu-width-md:276px;--content-height:calc(100vh - calc(var(--intraportal-nav-height, 0px) + var(--header-height, 0px) + var(--mobile-nav-height, 0px) + 1rem));--body-height:calc(100vh - var(--intraportal-nav-height, 0px));--main-height:calc(100vh - calc(var(--intraportal-nav-height, 0px) + var(--mobile-nav-height, 0px)));--main-height-tablet-nav:calc(var(--main-height) - 2rem);--top-height:calc(var(--header-height, 0px) + var(--intraportal-nav-height, 0px))}:host([compact]){--left-bar-width:112px}.zero-width-height{width:0;height:0;overflow:hidden}.no-display{display:none}ix-intraportal-nav{position:sticky;top:0;left:0;right:0;z-index:9}:host,:host :root,:root,body{--ix-top-nav-offset:2rem}`,qe=L`:host{--logo-padding-left:0px;--navbar-icon-min-width:24px}@-moz-document url-prefix(){nav *{scrollbar-width:thin;scrollbar-color:#002274 #5b73d6}}nav ::-webkit-scrollbar{max-width:8px;background-color:#002274}nav ::-webkit-scrollbar-thumb{background-color:#5b73d6;border-radius:100px;max-height:183px;max-width:6px;border:1px solid #002274}.nav-bar-bg{background:linear-gradient(#1456e0 20.5%,#0d2497 113.5%)}.nav-bar-bg.wide{background:linear-gradient(90.27deg,#1456e0 0,#0d2497 99.23%)}.on-primary-icon{--md-icon-button-icon-color:var(--clr-on-primary, #fff);--md-sys-color-on-surface-variant:var(--clr-on-primary, #fff)}.animate-width{transition:width .3s ease,viewBox .3s ease,left .3s ease,opacity .3s ease,grid-template-columns .3s ease}.expand-cta{--md-icon-button-icon-color:var(--clr-graphics-fill, rgba(9, 34, 65, 0.6))}.divider{border-color:var(--clr-on-primary,#fff);opacity:.2;margin:0;flex-shrink:0;border-width:0 0 thin;border-style:solid}.nav-toggle{--ix-nav-toggle:var(--clr-graphics-fill, rgba(9, 34, 65, 0.6));--md-icon-button-icon-color:var(--ix-nav-toggle);--md-icon-button-hover-icon-color:var(--ix-nav-toggle);--md-icon-button-pressed-icon-color:var(--ix-nav-toggle);--md-icon-button-focus-icon-color:var(--ix-nav-toggle)}@media only screen and (max-width:600px){.dlr-logo{display:none}}`,Ge=L`#menu{--md-sys-color-on-surface-variant:var(--clr-surface-container-lowest, #fff);--md-menu-item-label-text-color:var(--clr-surface-container-lowest, #fff);--md-menu-container-color:var(--clr-secondary, #092241);--ix-icon-font-size:1.4rem;--md-menu-container-shape:8px}.active-icon{color:var(--clr-primary,#1456e0);--md-icon-button-icon-color:var(--clr-primary, #1456E0);--md-sys-color-on-surface-variant:var(--clr-primary, #1456E0)}.header-container{background-color:rgba(245,247,255,.85);backdrop-filter:blur(6px)}.header__account__menu__text{white-space:nowrap}.flex-container{display:flex;gap:1rem;align-items:center;justify-content:center}.header__accounts{--md-outlined-field-top-space:0.5rem;--md-outlined-field-bottom-space:0.5rem;--ix-outline-color:var(--clr-graphics-fill)}.divider{margin:0 10px 0 10px;flex-shrink:0;border-width:0 thin 0 0;border-style:solid;border-color:var(--clr-secondary,#092241);opacity:.12;height:24px;align-self:center}`;var Gi=Object.defineProperty,Wi=(i,e,t)=>e in i?Gi(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,We=(i,e,t)=>Wi(i,typeof e!="symbol"?e+"":e,t);const Ki="accountSelection:selectedAccount",Ji="/user-management/user-management",Qi="/user-management/role-management";let Ke=class extends R{constructor(){super(),We(this,"isUserOrRoleManagement",()=>{const e=window.location.pathname;return e.startsWith(Ji)||e.startsWith(Qi)}),this.accountsPaged=[],this.nextDataAvailable=!1,this.lastFetchedRequest=0,this.rangeLoaded={first:void 0,last:void 0},this.loading=!1,this.showingFlattenedAccounts=!1,this.selectedAccountNumber=K().profile.account_number,this.selectedAccountNumberRootNode=null}firstUpdated(){if(this.getAccounts(),window.location.search.includes("selected_account_number")){sessionStorage.setItem(Ki,this.selectedAccountNumber);return}window.addEventListener(I.VaadinRouterLocationChanged,()=>{this.getAccounts({routeChanged:!0})})}async switchAccount(e){this.selectedAccountNumber=e,await de(e)}async getAccounts({routeChanged:e=!1}={}){if(this.loading)return;const t=this.isUserOrRoleManagement();if(e&&this.showingFlattenedAccounts===t)return;if(this.showingFlattenedAccounts=t,t&&this.selectedAccountNumberRootNode&&this.selectedAccountNumber!==this.selectedAccountNumberRootNode){await de(this.selectedAccountNumberRootNode);return}this.loading=!0;const o=await H({exclude_child_accounts:t});if(!o){this.loading=!1;return}if(this.accountsPaged=this.mapToSwitcherAccounts(o==null?void 0:o.items,null),this.nextDataAvailable=o.last<o.total,this.prevDataAvailable=o.first>1,this.rangeLoaded={first:o.first,last:o.last},this.accountsPaged.length<10&&this.prevDataAvailable){this.rangeLoaded.first-=1;const a=this.rangeLoaded.first,n=await H({page_number:a,exclude_child_accounts:t});this.accountsPaged=[...this.mapToSwitcherAccounts(n==null?void 0:n.items,null),...this.accountsPaged],this.prevDataAvailable=this.rangeLoaded.first>1}this.loading=!1}async getMoreAccounts(e){const t=e.detail,o=t.filterString||"",a=this.isUserOrRoleManagement(),n=Date.now();if(t.next){const r=this.rangeLoaded.last+1,s=await H({search_term:o,page_number:r,exclude_child_accounts:a});if(!s||n<this.lastFetchedRequest)return;this.lastFetchedRequest=n,this.rangeLoaded.last+=1,this.accountsPaged=[...this.accountsPaged,...this.mapToSwitcherAccounts(s==null?void 0:s.items,null)],this.nextDataAvailable=s.total>s.last}else if(t.prev){const r=this.rangeLoaded.first-1,s=await H({search_term:o,page_number:r,exclude_child_accounts:a});if(!s||n<this.lastFetchedRequest)return;this.lastFetchedRequest=n,this.rangeLoaded.first-=1,this.accountsPaged=[...this.mapToSwitcherAccounts(s==null?void 0:s.items,null),...this.accountsPaged],this.prevDataAvailable=this.rangeLoaded.first>1}else if(o===""){const r=await H({exclude_child_accounts:a});if(!r||n<this.lastFetchedRequest)return;this.lastFetchedRequest=n,this.accountsPaged=this.mapToSwitcherAccounts(r==null?void 0:r.items,null),this.rangeLoaded={first:r.first,last:r.last},this.nextDataAvailable=r.total>this.rangeLoaded.last,this.prevDataAvailable=this.rangeLoaded.first>1}else{const r=await H({search_term:o,page_number:1,exclude_child_accounts:a});if(!r||n<this.lastFetchedRequest)return;this.lastFetchedRequest=n,this.accountsPaged=this.mapToSwitcherAccounts(r==null?void 0:r.items,null),this.rangeLoaded={first:r.self,last:r.self},this.nextDataAvailable=r.last>r.self,this.prevDataAvailable=this.rangeLoaded.first>1}}mapToSwitcherAccounts(e,t){return e.map(o=>{const a={id:o.accountNumber,rootId:t?t.rootId:o.accountNumber,status:void 0,accountNumber:o.accountNumber,name:o.accountName||o.accountNumber,displayName:o.displayName||`[${o.accountNumber}] ${o.accountName}`};return this.selectedAccountNumber===o.accountNumber&&(this.selectedAccountNumberRootNode=a.rootId),{...a,subaccounts:this.mapToSwitcherAccounts(o.subAccounts,a)}})}renderEmpty(){return c` <ix-account-switcher class="w-200"></ix-account-switcher> `}render(){return c` <ix-account-switcher .accounts="${this.accountsPaged}" .loading="${this.loading}" .selectedAccountNumber="${this.selectedAccountNumber}" .enableFilterDialog="${!0}" ?nextDataAvailable="${this.nextDataAvailable}" ?prevDataAvailable="${this.prevDataAvailable}" @account-switched="${e=>this.switchAccount(e.detail)}" @account-fetch="${this.getMoreAccounts}" class="w-200"></ix-account-switcher> `}};We(Ke,"properties",{accountsPaged:{type:Array,state:!0},selectedAccountNumber:{type:String}}),window.customElements.define("account-selection",Ke);var Yi=Object.defineProperty,Xi=(i,e,t)=>e in i?Yi(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Je=(i,e,t)=>Xi(i,typeof e!="symbol"?e+"":e,t);let eo=class extends ${constructor(){super(...arguments),Je(this,"_notificationsState",h),Je(this,"toggleNotificationsDrawer",()=>{window.dispatchEvent(new CustomEvent("ix-notifications-toggle-drawer"))})}static get properties(){return{mobile:{type:Boolean}}}static get styles(){return[A,L`.unread{padding:0 5px;font-size:12px;line-height:16px;left:14px;top:-2px;background:var(--clr-critical,#db0028)}`]}renderUnReadCountText(){if(this._notificationsState.unreadNotificationCount<=0)return c` ${b} `;let e="";return this._notificationsState.unreadNotificationCount>99?e="99+":e=this._notificationsState.unreadNotificationCount.toString(),c` <div class="unread rounded-full text-center text-white text-sm absolute icon-position -start-0"> ${e} </div> `}render(){return c` <div class="relative"> <ix-icon-button style="--md-icon-button-icon-size:24px" class="flex" @click="${()=>this.toggleNotificationsDrawer()}" small aria-label="Open notifications"> <svg slot="default" focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="${this.mobile?"white":"rgb(20, 86, 224)"}"> <path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"></path> </svg> </ix-icon-button> ${this.renderUnReadCountText()} </div> `}};window.customElements.define("notifications-icon",eo);let to=class extends R{static get styles(){return[A,L`ix-icon-button{--md-icon-button-icon-size:32px}ix-icon-button.mobile{--md-icon-button-icon-size:40px}`]}static get properties(){return{mobile:{type:Boolean}}}render(){return c` <ix-icon-button class="${`flex ${this.mobile?"mobile":""}`}" tabindex="0" type="button" aria-label="Open profile options" small> <svg slot="default" focusable="false" aria-hidden="true" viewBox="0 0 40 40" data-testid="AccountCircleIcon"> <rect xmlns="http://www.w3.org/2000/svg" width="40" height="40" rx="20" fill="#1456E0"/> <path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M25 15C25 17.7625 22.7625 20 20 20C17.2375 20 15 17.7625 15 15C15 12.2375 17.2375 10 20 10C22.7625 10 25 12.2375 25 15ZM10 27.5C10 24.175 16.6625 22.5 20 22.5C23.3375 22.5 30 24.175 30 27.5V30H10V27.5Z" fill="white"/> </svg> <span></span> </ix-icon-button> `}};window.customElements.define("user-profile-icon",to);const io="uppercase font-bold tracking-wider";let oo=class extends R{dispatchCreateUserEvent(){const e=new CustomEvent(I.CreateUserClicked,{bubbles:!1,composed:!1});window.dispatchEvent(e)}render(){return c` <ix-button @click="${this.dispatchCreateUserEvent}" has-icon> <md-icon slot="icon">add</md-icon> <span class="${io}">Create User</span> </ix-button> `}};customElements.define("create-user-button",oo);const ao="mm/dd/yyyy",no=(i,e)=>{const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(i),o=d=>{var f;return Number((f=t.find(w=>w.type===d))==null?void 0:f.value)},a=Date.UTC(o("year"),o("month")-1,o("day"),o("hour"),o("minute"),o("second")),n=Math.round((a-i.getTime())/6e4),r=n>=0?"+":"-",s=Math.abs(n),l=Math.floor(s/60),u=s%60;return u===0?`GMT${r}${l}`:`GMT${r}${l}:${String(u).padStart(2,"0")}`},ro=(i,e,t)=>{const o=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(i),a=w=>{var y;return((y=o.find(M=>M.type===w))==null?void 0:y.value)||""},n=a("year"),r=a("month"),s=a("day"),l=new Intl.DateTimeFormat("en-US",{timeZone:e,month:"long"}).format(i),u=new Intl.DateTimeFormat("en-US",{timeZone:e,month:"short"}).format(i),d={yyyy:n,yy:n.slice(-2),mmmm:l,mmm:u,mm:r,dd:s},f=new RegExp(Object.keys(d).sort((w,y)=>y.length-w.length).join("|"),"gi");return t.replace(f,w=>d[w.toLowerCase()])},Qe=i=>{if(!i)return"Not available";try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;let t="12h",o=ao;const a=localStorage.getItem(Se);if(a){const u=JSON.parse(a);t=u.preferredTimeFormat||t,o=u.preferredDateFormat||o}const n=new Date(i),r=ro(n,e,o),s=n.toLocaleTimeString("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:t==="12h"}),l=no(n,e);return`${r} at ${s} ${l}`}catch(e){return console.error("Error formatting last login date:",e),i}};let so=class extends R{static get properties(){return{isAccountMenuOpen:{state:!0},mobile:{type:Boolean},showManualLogout:{state:!0}}}constructor(){super(),this.isAccountMenuOpen=!1,this.showManualLogout=!1}static get styles(){return[Ge,A]}async firstUpdated(){this.menuElem=this.shadowRoot.querySelector("#menu")}logout(){window.location="/logout"}navigateToUserSettings(){window.dispatchEvent(new CustomEvent("edit-profile",{bubbles:!0,composed:!0}))}navigateToAuthenticationOptions(){window.location=`${oe}/PhoneNumber?returnUrl=${window.location.href}`}handleAccountMenuToggle(){this.isAccountMenuOpen=!this.isAccountMenuOpen,this.menuElem.open=this.isAccountMenuOpen}handleMenuClosed(){this.menuElem.open=!1,this.isAccountMenuOpen=!1}render(){const e=Te(),t=e?Qe(e):null;return c` <div class="relative"> <user-profile-icon id="accountBtn" @click="${this.handleAccountMenuToggle}" ?mobile="${this.mobile}"></user-profile-icon> <ix-menu y-offset="0" x-offset="${this.mobile?"-220":"-120"}" anchor="accountBtn" has-overflow id="menu" @closed="${this.handleMenuClosed}"> <ix-menu-item @click="${this.navigateToUserSettings}"> <ix-icon slot="start">edit</ix-icon> <div slot="headline" class="header__account__menu__text"> Edit Profile </div> </ix-menu-item> ${$t()?b:c` <ix-menu-item @click="${this.navigateToAuthenticationOptions}"> <ix-icon slot="start">settings</ix-icon> <div slot="headline" class="header__account__menu__text"> Authentication Options </div> </ix-menu-item> `} <ix-menu-item @click="${()=>this.showManualLogout=!0}"> <ix-icon slot="start">exit_to_app</ix-icon> <div slot="headline" class="header__account__menu__text"> Log out </div> </ix-menu-item> ${t?c` <div style="padding:16px;font-size:13px;line-height:1.6"> <div style="color:#fff;margin-bottom:4px"> <b>Last Login:</b> </div> <div style="color:#fff;margin-bottom:8px"> ${t} </div> <div style="font-size:12px;color:#fff"> If this wasn't you, please reset the password immediately. </div> </div> `:b} </ix-menu> </div> <ix-manual-logout-dialog ?open="${this.showManualLogout}" @closed="${()=>this.showManualLogout=!1}"></ix-manual-logout-dialog> `}};window.customElements.define("user-profile-ui",so);var lo=Object.defineProperty,co=(i,e,t)=>e in i?lo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ye=(i,e,t)=>co(i,typeof e!="symbol"?e+"":e,t);let uo=class extends R{constructor(){super(),Ye(this,"setHeaderHeight",async()=>{const e=this.offsetHeight;e&&document.body.style.setProperty("--header-height",`${e}px`)}),Ye(this,"locationChangeHandler",e=>{var t,o,a;if(sessionStorage.getItem(pe.SessionStorage.HasOutstandingChanges)==="true")return;const{location:n}=e.detail;(this.currentLocation!==e.srcElement.location.href||((t=n==null?void 0:n.route)==null?void 0:t.hideAccountSwitcher)===!0)&&(this.hideAccountSwitcher=(a=(o=n==null?void 0:n.route)==null?void 0:o.hideAccountSwitcher)!=null?a:!1,this.currentLocation=e.srcElement.location.href),this.updateHeaderByLocation(n!=null&&n.pathname?n:window.location),this.setHeaderHeight()}),this.headerLeft=null,this.headerRight=null,this.isAccountMenuOpen=!1}static get properties(){return{headerLeft:{attribute:!1},headerRight:{attribute:!1},pageTitle:{state:!0},isAccountMenuOpen:{state:!0},hideAccountSwitcher:{state:!1},currentLocation:{state:""}}}static get styles(){return[Ge,A]}headerClass(){const e=window.location.pathname.split("/");return e[2]?null:e[1]||"launchpad"}chartsHeader(){this.pageTitle="",this.headerRight=null,this.headerLeft=c` <ix-button appearance="text" has-icon @click="${()=>window.history.back()}"> <md-icon slot="icon">arrow_back</md-icon> <span class="uppercase font-bold tracking-wider">Back</span> </ix-button> `}userManagementHeader(){this.pageTitle="User Management",this.headerLeft=null,this.headerRight=J.hasExternalUserCreate()?c` <create-user-button></create-user-button> `:null}dispatchAddConnectivityEvent(){document.dispatchEvent(new CustomEvent("add-connectivity",{detail:{},bubbles:!0,composed:!0}))}inventoryManagementHeader(){this.pageTitle="Inventory",this.headerLeft=null,this.headerRight=J.hasConnectivityCreate()?c` <ix-button @click="${this.dispatchAddConnectivityEvent}" has-icon> <ix-icon slot="icon">add</ix-icon> <span>Add Connectivity</span> </ix-button> `:null}orderManagementHeader(){this.pageTitle="Order Management",this.headerLeft=null,this.headerRight=J.hasConnectivityCreate()?c` <ix-button @click="${this.dispatchAddConnectivityEvent}" has-icon> <ix-icon slot="icon">add</ix-icon> <span>Add Connectivity</span> </ix-button> `:null}orderDetailsHeader(){this.pageTitle="",this.headerLeft=c` <ix-button appearance="text" has-icon @click="${()=>window.history.back()}"> <md-icon slot="icon">arrow_back</md-icon> <span class="uppercase font-bold tracking-wider">Back</span> </ix-button> `,this.headerRight=c` <gom-cancel-order-button></gom-cancel-order-button> `,this.hideAccountSwitcher=!0}emptyHeader(){this.pageTitle="",this.headerLeft=null,this.headerRight=null,this.hideAccountSwitcher=!0}roleManagementHeader(){this.pageTitle="Role Management",this.headerLeft=null,this.headerRight=null}knowledgeBaseHeader(){this.pageTitle="Knowledge Base",this.headerLeft=null,this.headerRight=null}reportsHeader(){this.pageTitle="Reports, Maintenance & Incident Notifications",this.headerRight=null,this.headerLeft=null}launchPadHeader(){this.pageTitle="Launchpad",this.headerLeft=null,this.headerRight=null}myAccountHeader(){this.pageTitle="My Account",this.headerLeft=null,this.headerRight=null}esgHeader(){this.pageTitle="ESG Reporting",this.headerLeft=null,this.headerRight=null}updateHeaderByLocation(e=window.location){var t,o,a;if(sessionStorage.getItem(pe.SessionStorage.HasOutstandingChanges)==="true")return;if(e.pathname.startsWith(window.registeredApps["ui-dcim-charts"].path)){this.chartsHeader();return}if(e.pathname.startsWith(window.registeredApps["ui-knowledge-base"].path)&&this.knowledgeBaseHeader(),e.pathname.startsWith(window.registeredApps["ui-dcim-reports"].path)||e.pathname.startsWith(`${window.registeredApps["ui-service-management"].path}/reports`)||e.pathname.startsWith(`${window.registeredApps["ui-service-management"].path}/incidents`)){this.reportsHeader();return}if(e.pathname.startsWith(window.registeredApps["ui-my-account"].path)){this.myAccountHeader();return}if(e.pathname.startsWith(window.registeredApps["ui-esg"].path)){this.esgHeader();return}if(e.baseUrl==="/"&&e.pathname==="/"){this.launchPadHeader();return}const n=e.pathname.split("/");{if(n[1]==="inventory"){this.inventoryManagementHeader();return}if(n[1]==="order-management"){if(n[2]==="order-details"){this.orderDetailsHeader();return}if(n[2]==="open-orders"||n[2]==="closed-orders"){this.orderManagementHeader();return}this.emptyHeader();return}}if(n[1]==="user-management"){if(n[2]==="user-management"){this.userManagementHeader();return}if(n[2]==="role-management"){this.roleManagementHeader();return}}const r=(t=e.route)==null?void 0:t.name;r&&(this.pageTitle=r,this.headerLeft=(o=e.route)==null?void 0:o.headerLeft,this.headerRight=(a=e.route)==null?void 0:a.headerRight)}async firstUpdated(){this.menuElem=this.shadowRoot.querySelector("#menu"),this.updateHeaderByLocation()}updated(){this.setHeaderHeight(),setTimeout(()=>{this.setHeaderHeight()},2e3)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.setHeaderHeight),window.addEventListener("scroll",this.setHeaderHeight),window.addEventListener(I.VaadinRouterLocationChanged,this.locationChangeHandler),window.addEventListener(I.LocationChanged,this.locationChangeHandler)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.setHeaderHeight),window.removeEventListener("scroll",this.setHeaderHeight),window.removeEventListener(I.VaadinRouterLocationChanged,this.locationChangeHandler),window.removeEventListener(I.LocationChanged,this.locationChangeHandler)}render(){return c` <div class="header-container p-4 md:p-6 lg:px-4 lg:pt-8 lg:pl-12"> <div class="flex flex-col flex-col-reverse gap-4 lg:gap-6 md:flex-row md:items-center justify-start"> <div class="grow flex flex-col gap-4 lg:gap-6 md:flex-row md:items-center md:justify-between"> ${this.headerLeft?this.headerLeft:c` <h1 class="dlr-text-page-title grow">${this.pageTitle}</h1> `} <div class="flex gap-4 lg:gap-6 md:justify-end"> ${this.headerRight?c` <div class="flex gap-4 lg:gap-6 relative items-center md:justify-end"> ${this.headerRight} <hr class="divider hidden lg:block m-0"> </div> `:b} <div class="hidden relative lg:flex gap-6 items-center md:justify-end"> ${window.registeredApps["ui-gom"].enabled?c`<gom-cart-icon-button></gom-cart-icon-button>`:b} <notifications-icon></notifications-icon> <user-profile-ui></user-profile-ui> </div> </div> </div> ${this.hideAccountSwitcher?b:c` <account-selection class="header__accounts grow md:grow-0 -m-4 mb-0 md:m-0 md:w-[260px]"></account-selection> `} </div> </div> `}};window.customElements.define("app-shell-header",uo);const C={digitalRealtyLogo:x`
1458
1462
  <path d="M17.6281 26.4421V23.1369C20.6656 23.1369 23.1369 20.6657 23.1369 17.6281H26.4421C26.4421 22.4881 22.4881 26.4421 17.6281 26.4421ZM17.6281 0V3.30527C20.6656 3.30527 23.1369 5.77647 23.1369 8.81404H26.4421C26.4421 3.95398 22.4881 0 17.6281 0ZM8.81404 23.1369H3.30527V17.6281H0V26.4421H8.81404V23.1369ZM3.30527 3.30527H8.81404V0H0V8.81404H3.30527V3.30527Z"></path>
1459
- `,digitalRealtyLogoWithText:b`
1463
+ `,digitalRealtyLogoWithText:x`
1460
1464
  <path d="M174.823 18.1256V18.338H174.216V19.7581H173.986V18.338H173.379V18.1256H174.823ZM175.376 18.1256L176.025 19.4728L176.68 18.1256H177.002V19.7581H176.784V18.3865L176.116 19.7581H175.928L175.272 18.3865V19.7581H175.06V18.1256H175.376Z"></path>
1461
1465
  <path d="M166.533 6.68392L169.465 12.0444L172.547 6.68392H175.666L170.866 14.902V19.7581H168.064V14.902L163.264 6.68392H166.533ZM162.921 6.68392V9.0933H159.148V19.7581H156.347V9.0933H152.574V6.68392H162.921ZM149.268 6.68393H146.467V19.7581H154.836V17.3487H149.268V6.68393ZM137.482 6.68392H140.844L145.588 19.7581H142.581L141.573 16.9005H136.605L135.596 19.7581H132.701L137.482 6.68392ZM140.807 14.6406L139.07 9.67235L137.352 14.6406H140.807ZM131.744 6.68392V9.0933H125.767V12.0257H130.623V14.323H125.767V17.3488H131.949V19.7581H122.965V6.68392H131.744ZM119.015 7.21625C119.743 7.57117 120.307 8.07848 120.705 8.73847C121.104 9.39836 121.303 10.1642 121.303 11.0358C121.303 11.87 121.104 12.6078 120.705 13.249C120.307 13.8904 119.759 14.3791 119.062 14.7152L121.639 19.7581H118.539L116.353 15.369H113.981V19.7581H111.18V6.68392H116.503C117.449 6.68392 118.286 6.86143 119.015 7.21625ZM116.279 13.0343C116.939 13.0343 117.465 12.8537 117.857 12.4927C118.249 12.1315 118.445 11.6459 118.445 11.0358C118.445 10.4132 118.249 9.92141 117.857 9.56024C117.465 9.19916 116.939 9.01862 116.279 9.01862H113.981V13.0343H116.279ZM99.9176 17.3487V6.68398H97.1161V19.7581H105.485V17.3487H99.9176ZM88.1319 6.68397L91.4938 6.68398L96.2379 19.7581H93.2309L92.2222 16.9005H87.2541L86.2454 19.7581H83.3504L88.1319 6.68397ZM91.4564 14.6405L89.7195 9.67236L88.0012 14.6405H91.4564ZM84.9942 6.68397V9.09335H81.2213V19.7581H78.4198V9.09335H74.6469V6.68397H84.9942ZM73.5075 6.68397V19.7581H70.7059V6.68397H73.5075ZM59.5649 7.39371C60.5422 6.84584 61.691 6.5719 63.0109 6.5719C64.0443 6.5719 64.972 6.77111 65.7937 7.16957C66.6156 7.56799 67.2786 8.12833 67.7829 8.85053C68.2872 9.57269 68.5954 10.4008 68.7074 11.3346H65.9432C65.7688 10.6 65.4202 10.0179 64.8972 9.58829C64.3742 9.15869 63.7206 8.94393 62.9361 8.94393C62.2139 8.94393 61.5851 9.12448 61.0497 9.48556C60.5143 9.84664 60.1034 10.351 59.817 10.9984C59.5306 11.6459 59.3874 12.3868 59.3874 13.221C59.3874 14.5036 59.7018 15.5371 60.3306 16.3215C60.9594 17.106 61.8279 17.4982 62.9361 17.4982C63.7454 17.4982 64.4614 17.2772 65.084 16.8351C65.7066 16.3931 66.0801 15.7425 66.2047 14.8833V14.7152H62.9547V12.4926H68.8008V19.7581H66.8584L66.5595 18.1332C66.1736 18.6437 65.6568 19.0609 65.0093 19.3846C64.3618 19.7083 63.6085 19.8702 62.7494 19.8702C61.5166 19.8702 60.4302 19.5963 59.4901 19.0484C58.55 18.5005 57.8216 17.7223 57.3048 16.7137C56.7881 15.7051 56.5298 14.5409 56.5298 13.221C56.5298 11.8887 56.7913 10.7214 57.3142 9.71903C57.8372 8.71668 58.5874 7.94154 59.5649 7.39371ZM55.0729 6.68397V19.7581H52.2713V6.68397H55.0729ZM44.2028 6.68397C45.5101 6.68397 46.665 6.96099 47.6674 7.51512C48.6697 8.0692 49.4417 8.84121 49.9834 9.8311C50.5251 10.821 50.7958 11.951 50.7958 13.221C50.7958 14.4911 50.5251 15.6211 49.9834 16.611C49.4417 17.6009 48.6697 18.3729 47.6674 18.927C46.665 19.4811 45.5101 19.7581 44.2028 19.7581H39.6641V6.68397H44.2028ZM46.9577 16.2748C47.6113 15.509 47.9382 14.4911 47.9382 13.221C47.9382 11.951 47.6113 10.9331 46.9577 10.1673C46.304 9.4015 45.3856 9.01863 44.2028 9.01863H42.4657V17.4234H44.2028C45.3856 17.4234 46.304 17.0406 46.9577 16.2748Z"></path>
1462
1466
  <path d="M17.6281 26.4421V23.1369C20.6656 23.1369 23.1369 20.6657 23.1369 17.6281H26.4421C26.4421 22.4881 22.4881 26.4421 17.6281 26.4421ZM17.6281 0V3.30527C20.6656 3.30527 23.1369 5.77647 23.1369 8.81404H26.4421C26.4421 3.95398 22.4881 0 17.6281 0ZM8.81404 23.1369H3.30527V17.6281H0V26.4421H8.81404V23.1369ZM3.30527 3.30527H8.81404V0H0V8.81404H3.30527V3.30527Z"></path>
1463
- `,userManagementIcon:b`
1467
+ `,userManagementIcon:x`
1464
1468
  <path d="M3 3C1.897 3 1 3.897 1 5V21H11V19H3V5H13V12C13 10.37 13.792 8.93544 15 8.02344V5C15 3.897 14.103 3 13 3H3ZM5 7V9H7V7H5ZM9 7V9H11V7H9ZM18 9C16.318 9 15 10.317 15 12C15 13.683 16.318 15 18 15C19.682 15 21 13.683 21 12C21 10.317 19.682 9 18 9ZM5 11V13H7V11H5ZM9 11V13H11V11H9ZM18 11C18.58 11 19 11.421 19 12C19 12.579 18.58 13 18 13C17.42 13 17 12.579 17 12C17 11.421 17.42 11 18 11ZM5 15V17H7V15H5ZM9 15V17H11V15H9ZM18 16C15.149 16 13 17.4558 13 19.3848V21H23V19.3848C23 17.4558 20.851 16 18 16ZM18 18C19.47 18 20.4895 18.504 20.8535 19H15.1465C15.5095 18.504 16.53 18 18 18Z"></path>
1465
- `,roleManagementIcon:b`
1469
+ `,roleManagementIcon:x`
1466
1470
  <path d="M12 3C9.80271 3 8 4.80271 8 7C8 9.19729 9.80271 11 12 11C14.1973 11 16 9.19729 16 7C16 4.80271 14.1973 3 12 3ZM12 5C13.1164 5 14 5.88359 14 7C14 8.11641 13.1164 9 12 9C10.8836 9 10 8.11641 10 7C10 5.88359 10.8836 5 12 5ZM18 12C16.1872 12 14.5593 12.8158 13.457 14.0957C12.9584 14.0389 12.4662 14 12 14C10.255 14 8.18716 14.4098 6.44922 15.0957C5.58025 15.4387 4.7947 15.846 4.16602 16.3691C3.53734 16.8922 3 17.5994 3 18.5V21H12.8145C13.8556 22.789 15.7903 24 18 24C21.3019 24 24 21.3019 24 18C24 14.6981 21.3019 12 18 12ZM18 14C19.0039 14 19.9057 14.377 20.6055 14.9805L18 17.5859L16.707 16.293L15.293 17.707L18 20.4141L21.7559 16.6582C21.9049 17.0789 22 17.5261 22 18C22 20.221 20.221 22 18 22C15.779 22 14 20.221 14 18C14 15.779 15.779 14 18 14ZM12 16C12.1083 16 12.2316 16.0115 12.3457 16.0156C12.1256 16.6382 12 17.3041 12 18C12 18.3415 12.0364 18.6738 12.0918 19H5V18.5C5 18.4346 5.06759 18.2205 5.44531 17.9062C5.82304 17.592 6.44549 17.2456 7.18164 16.9551C8.65395 16.374 10.586 16 12 16Z"></path>
1467
- `,serviceTicketsIcon:b`
1471
+ `,serviceTicketsIcon:x`
1468
1472
  <path d="M4 4C2.897 4 2 4.897 2 6V16C2 17.103 2.897 18 4 18H0V20H24V18H20C21.103 18 22 17.103 22 16V6C22 4.897 21.103 4 20 4H4ZM4 6H20L20.002 16H4V6ZM14.2852 8.00781L11 11.293L9.20703 9.5L7.79297 10.9141L11 14.1211L15.6992 9.42188L14.2852 8.00781Z"></path>
1469
- `,inventoryIcon:b`
1473
+ `,inventoryIcon:x`
1470
1474
  <path d="M7 1C5.895 1 5 1.895 5 3V21C5 22.105 5.895 23 7 23H17C18.105 23 19 22.105 19 21V3C19 1.895 18.105 1 17 1H7ZM7 3H17V13H7V3ZM9 5V7H15V5H9ZM9 9V11H15V9H9ZM7 15H17V21H7V15ZM12 16.5C11.172 16.5 10.5 17.172 10.5 18C10.5 18.828 11.172 19.5 12 19.5C12.828 19.5 13.5 18.828 13.5 18C13.5 17.172 12.828 16.5 12 16.5Z"></path>
1471
- `,orderManagementIcon:b`
1475
+ `,orderManagementIcon:x`
1472
1476
  <path fill-rule="evenodd" clip-rule="evenodd" d="M4.1 0C2.9402 0 2 0.940202 2 2.1V16.8C2 17.9598 2.9402 18.9 4.1 18.9H10.505C10.4362 18.5607 10.4 18.2096 10.4 17.85C10.4 17.4466 10.4455 17.0538 10.5317 16.6765H4.1V2.22353H17.75V10.5C18.4967 10.5 19.2069 10.6559 19.85 10.9368V2.1C19.85 0.940202 18.9098 0 17.75 0H4.1Z" fill="white"/>
1473
1477
  <path d="M6.2 4.2H15.65V6.3H6.2V4.2Z" fill="white"/>
1474
1478
  <path d="M6.2 8.4H15.65V10.5H6.2V8.4Z" fill="white"/>
@@ -1476,17 +1480,17 @@ video {
1476
1480
  <path fill-rule="evenodd" clip-rule="evenodd" d="M17.75 21.525C19.7796 21.525 21.425 19.8796 21.425 17.85C21.425 15.8204 19.7796 14.175 17.75 14.175C15.7204 14.175 14.075 15.8204 14.075 17.85C14.075 19.8796 15.7204 21.525 17.75 21.525ZM17.75 23.1C20.6495 23.1 23 20.7495 23 17.85C23 14.9505 20.6495 12.6 17.75 12.6C14.8505 12.6 12.5 14.9505 12.5 17.85C12.5 20.7495 14.8505 23.1 17.75 23.1Z" fill="white"/>
1477
1481
  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.9683 15.75H17.7733V18.1888L19.5106 18.7951L19.256 19.5946L16.9683 18.7962V15.75Z" fill="white"/>
1478
1482
  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.7 15.4691H18.0416V16.7277V17.9863L19.85 18.6174L19.4257 19.95L16.7 18.9987V15.4691ZM17.2367 16.0309V18.5938L19.0863 19.2393L19.1712 18.9728L17.505 18.3913V16.0309H17.2367Z" fill="white"/>
1479
- `,reportsIcon:b`
1483
+ `,reportsIcon:x`
1480
1484
  <path d="M6 2C4.90575 2 4 2.90575 4 4V20C4 21.0943 4.90575 22 6 22H11V20H6V4H13V9H18V13H20V8L14 2H6ZM12 11V14H15C15 12.343 13.641 11.031 12 11ZM11 12C9.343 12 8 13.343 8 15C8 16.657 9.343 18 11 18C12.657 18 13.969 16.641 14 15H11V12ZM16 15V21H13C13 22.654 14.346 24 16 24H21C22.645 24 24 22.645 24 21V15H16ZM18 17H22V21C22 21.565 21.565 22 21 22C20.449 22 20 21.552 20 21H18V17Z" fill="white"/>
1481
- `,launchpadIcon:b`
1485
+ `,launchpadIcon:x`
1482
1486
  <path d="M4 2C2.90694 2 2 2.90694 2 4V11C2 12.0931 2.90694 13 4 13H9C10.0931 13 11 12.0931 11 11V4C11 2.90694 10.0931 2 9 2H4ZM15 2C13.9069 2 13 2.90694 13 4V7C13 8.09306 13.9069 9 15 9H20C21.0931 9 22 8.09306 22 7V4C22 2.90694 21.0931 2 20 2H15ZM4 4H9V11H4V4ZM15 4H20V7H15V4ZM15 11C13.9069 11 13 11.9069 13 13V20C13 21.0931 13.9069 22 15 22H20C21.0931 22 22 21.0931 22 20V13C22 11.9069 21.0931 11 20 11H15ZM15 13H20V20H15V13ZM4 15C2.90694 15 2 15.9069 2 17V20C2 21.0931 2.90694 22 4 22H9C10.0931 22 11 21.0931 11 20V17C11 15.9069 10.0931 15 9 15H4ZM4 17H9V20H4V17Z"></path>
1483
- `,knowledgeBaseIcon:b`
1484
- <path d="M2 4V18C2 19.105 2.895 20 4 20H10.2773C10.6236 20.5956 11.2611 21 12 21C12.7389 21 13.3764 20.5956 13.7227 20H20C21.105 20 22 19.105 22 18V4H14C13.228 4 12.532 4.3003 12 4.7793C11.468 4.3003 10.772 4 10 4H2ZM4 6H10C10.551 6 11 6.449 11 7V18H4V6ZM14 6H20V18H13V7C13 6.449 13.449 6 14 6ZM6 8V10H9V8H6ZM15 8V10H18V8H15ZM6 11V13H9V11H6ZM15 11V13H18V11H15ZM6 14V16H9V14H6Z"></path>`,sitesIcon:b`
1487
+ `,knowledgeBaseIcon:x`
1488
+ <path d="M2 4V18C2 19.105 2.895 20 4 20H10.2773C10.6236 20.5956 11.2611 21 12 21C12.7389 21 13.3764 20.5956 13.7227 20H20C21.105 20 22 19.105 22 18V4H14C13.228 4 12.532 4.3003 12 4.7793C11.468 4.3003 10.772 4 10 4H2ZM4 6H10C10.551 6 11 6.449 11 7V18H4V6ZM14 6H20V18H13V7C13 6.449 13.449 6 14 6ZM6 8V10H9V8H6ZM15 8V10H18V8H15ZM6 11V13H9V11H6ZM15 11V13H18V11H15ZM6 14V16H9V14H6Z"></path>`,sitesIcon:x`
1485
1489
  <path d="M20 0C17.791 0 16 1.791 16 4C16 6.857 20 11 20 11C20 11 24 6.857 24 4C24 1.791 22.209 0 20 0ZM12 2C6.486 2 2 6.486 2 12C2 17.514 6.486 22 12 22C17.514 22 22 17.514 22 12C22 11.93 21.9912 11.862 21.9902 11.793C21.7532 12.059 21.5575 12.2677 21.4395 12.3887L19.6504 14.3047C19.4484 14.9657 19.1695 15.5919 18.8145 16.1699C18.4985 15.4819 17.806 15 17 15H16V13C16 12.447 15.552 12 15 12H9V10H10C10.552 10 11 9.553 11 9V7.02344L13.0156 7.00781C13.5986 7.00381 14.1175 6.74289 14.4805 6.33789C14.3145 5.89389 14.1875 5.445 14.1035 5L9.99219 5.03125C9.44319 5.03525 9 5.48225 9 6.03125V8H8C7.448 8 7 8.447 7 9V10.1855L4.98047 8.16797C6.34047 5.68697 8.977 4 12 4H14C14 3.397 14.0908 2.81658 14.2578 2.26758C13.5308 2.09858 12.777 2 12 2ZM20 2.57031C20.789 2.57031 21.4297 3.211 21.4297 4C21.4297 4.789 20.789 5.42969 20 5.42969C19.211 5.42969 18.5703 4.789 18.5703 4C18.5703 3.211 19.211 2.57031 20 2.57031ZM4.20703 10.2207L9 15.0137V16C9 17.103 9.897 18 11 18V19.9316C7.06 19.4366 4 16.072 4 12C4 11.388 4.07603 10.7947 4.20703 10.2207ZM10.7793 14H14V16C14 16.553 14.448 17 15 17H17V18.2344C15.875 19.1384 14.502 19.7417 13 19.9297V17C13 16.447 12.552 16 12 16H11V14.5996C11 14.3776 10.9123 14.174 10.7793 14Z"></path>
1486
- `,myAccountIcon:b` <path d="M5 3C3.89543 3 3 3.89543 3 5V21H9.29126C8.9016 20.3803 8.64745 19.6994 8.52883 19H5V5H15V12.546L17 10.546V5C17 3.89543 16.1046 3 15 3H5Z" fill="white"/> <path d="M7 7H9V9H7V7Z" fill="white"/> <path d="M9 11H7V13H9V11Z" fill="white"/> <path d="M7 15H9V17H7V15Z" fill="white"/> <path d="M13 7H11V9H13V7Z" fill="white"/> <path d="M11 11H13V13H11V11Z" fill="white"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M17.4462 15.9681L19.75 13.6643L21.2928 15.2072L22.7071 13.793L21.1642 12.2501L22.2071 11.2072L20.7928 9.79297L16.0319 14.5539C15.4364 14.202 14.7418 14.0001 14 14.0001C11.7909 14.0001 10 15.7909 10 18.0001C10 20.2092 11.7909 22.0001 14 22.0001C16.2091 22.0001 18 20.2092 18 18.0001C18 17.2582 17.7981 16.5636 17.4462 15.9681ZM12 18.0001C12 16.8955 12.8954 16.0001 14 16.0001C15.1046 16.0001 16 16.8955 16 18.0001C16 19.1046 15.1046 20.0001 14 20.0001C12.8954 20.0001 12 19.1046 12 18.0001Z" fill="white"/>
1487
- `,cookiesSettingsIcon:b`
1490
+ `,myAccountIcon:x` <path d="M5 3C3.89543 3 3 3.89543 3 5V21H9.29126C8.9016 20.3803 8.64745 19.6994 8.52883 19H5V5H15V12.546L17 10.546V5C17 3.89543 16.1046 3 15 3H5Z" fill="white"/> <path d="M7 7H9V9H7V7Z" fill="white"/> <path d="M9 11H7V13H9V11Z" fill="white"/> <path d="M7 15H9V17H7V15Z" fill="white"/> <path d="M13 7H11V9H13V7Z" fill="white"/> <path d="M11 11H13V13H11V11Z" fill="white"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M17.4462 15.9681L19.75 13.6643L21.2928 15.2072L22.7071 13.793L21.1642 12.2501L22.2071 11.2072L20.7928 9.79297L16.0319 14.5539C15.4364 14.202 14.7418 14.0001 14 14.0001C11.7909 14.0001 10 15.7909 10 18.0001C10 20.2092 11.7909 22.0001 14 22.0001C16.2091 22.0001 18 20.2092 18 18.0001C18 17.2582 17.7981 16.5636 17.4462 15.9681ZM12 18.0001C12 16.8955 12.8954 16.0001 14 16.0001C15.1046 16.0001 16 16.8955 16 18.0001C16 19.1046 15.1046 20.0001 14 20.0001C12.8954 20.0001 12 19.1046 12 18.0001Z" fill="white"/>
1491
+ `,cookiesSettingsIcon:x`
1488
1492
  <path d="M12 0C5.37109 0 0 5.37109 0 12C0 18.6289 5.37109 24 12 24C18.6289 24 24 18.6289 24 12C24 11.5156 23.9648 11.0391 23.9062 10.5664C23.5078 10.8398 23.0234 11 22.5 11C21.4219 11 20.5117 10.3125 20.1602 9.35938C19.5352 9.75781 18.7969 10 18 10C15.7891 10 14 8.21094 14 6C14 5.26562 14.2109 4.58594 14.5586 3.99219C14.5391 3.99609 14.5195 4 14.5 4C13.1172 4 12 2.88281 12 1.5C12 0.941406 12.1875 0.433594 12.4961 0.0195308C12.332 0.0117188 12.168 0 12 0ZM19.5 0C18.6719 0 18 0.671875 18 1.5C18 2.32812 18.6719 3 19.5 3C20.3281 3 21 2.32812 21 1.5C21 0.671875 20.3281 0 19.5 0ZM10.0508 2.1875C10.25 3.47656 11 4.58594 12.0469 5.27344C12.0156 5.51172 12 5.75781 12 6C12 9.30859 14.6914 12 18 12C18.4961 12 18.9922 11.9375 19.4688 11.8125C20.1523 12.4375 21.0156 12.8516 21.9531 12.9688C21.4648 18.0312 17.1875 22 12 22C6.48438 22 2 17.5156 2 12C2 7.15234 5.46875 3.09766 10.0508 2.1875ZM18 5C17.4492 5 17 5.44922 17 6C17 6.55078 17.4492 7 18 7C18.5508 7 19 6.55078 19 6C19 5.44922 18.5508 5 18 5ZM10 6C9.44922 6 9 6.44922 9 7C9 7.55078 9.44922 8 10 8C10.5508 8 11 7.55078 11 7C11 6.44922 10.5508 6 10 6ZM23 6C22.4492 6 22 6.44922 22 7C22 7.55078 22.4492 8 23 8C23.5508 8 24 7.55078 24 7C24 6.44922 23.5508 6 23 6ZM7 9C5.89453 9 5 9.89453 5 11C5 12.1055 5.89453 13 7 13C8.10547 13 9 12.1055 9 11C9 9.89453 8.10547 9 7 9ZM12 11C11.4492 11 11 11.4492 11 12C11 12.5508 11.4492 13 12 13C12.5508 13 13 12.5508 13 12C13 11.4492 12.5508 11 12 11ZM8.5 15C7.67188 15 7 15.6719 7 16.5C7 17.3281 7.67188 18 8.5 18C9.32812 18 10 17.3281 10 16.5C10 15.6719 9.32812 15 8.5 15ZM15.5 16C14.6719 16 14 16.6719 14 17.5C14 18.3281 14.6719 19 15.5 19C16.3281 19 17 18.3281 17 17.5C17 16.6719 16.3281 16 15.5 16Z" fill="white"/>
1489
- `,esgIcon:b`
1493
+ `,esgIcon:x`
1490
1494
  <path d="M21 13.5C21 18.47 16.97 22.5 12 22.5C12 17.53 16.03 13.5 21 13.5ZM3 13.5C7.97 13.5 12 17.53 12 22.5C7.03 22.5 3 18.47 3 13.5ZM5.44043 15.9404C6.15045 17.84 7.65999 19.3496 9.55957 20.0596C8.85955 18.16 7.34002 16.6504 5.44043 15.9404ZM18.5596 15.9404C16.66 16.6405 15.1504 18.16 14.4404 20.0596C16.34 19.3496 17.8496 17.84 18.5596 15.9404ZM12 1.5C13.31 1.5 14.4402 2.30996 14.9102 3.45996C15.0501 3.43998 15.19 3.42969 15.3398 3.42969C17.0698 3.42969 18.4805 4.84031 18.4805 6.57031C18.4804 7.2802 18.2395 7.96008 17.8096 8.5C18.2295 9.03992 18.4804 9.7198 18.4805 10.4297C18.4805 12.1597 17.0698 13.5703 15.3398 13.5703C15.1999 13.5703 15.0501 13.56 14.9102 13.54C14.4402 14.69 13.31 15.5 12 15.5C10.69 15.5 9.55984 14.69 9.08984 13.54C8.94994 13.56 8.81004 13.5703 8.66016 13.5703C6.92016 13.5703 5.50977 12.1597 5.50977 10.4297C5.50984 9.7198 5.76049 9.03992 6.19043 8.5C5.77049 7.96008 5.5196 7.2802 5.51953 6.57031C5.51953 4.84031 6.93016 3.42969 8.66016 3.42969C8.80006 3.42969 8.94994 3.43998 9.08984 3.45996C9.55984 2.30996 10.69 1.5 12 1.5ZM13.0303 11.3096C12.7103 11.4296 12.36 11.5 12 11.5C11.6401 11.5 11.3004 11.4295 10.9805 11.3096L10.8604 12.4004C10.8806 13.0102 11.3801 13.5 12 13.5C12.6199 13.5 13.1194 13.0102 13.1396 12.4004L13.0303 11.3096ZM14.9502 8.96973C14.8302 9.70973 14.4396 10.3498 13.8896 10.7998L14.7002 11.3701C14.8801 11.5 15.1 11.5703 15.3398 11.5703C15.9698 11.5703 16.4902 11.0599 16.4902 10.4199C16.4902 9.97995 16.2301 9.57964 15.8301 9.38965L14.9502 8.96973ZM8.16992 9.40039C7.77007 9.60041 7.50957 9.99004 7.51953 10.4199C7.51953 11.0499 8.03016 11.5596 8.66016 11.5596C8.88992 11.5595 9.10974 11.4901 9.30957 11.3604L10.1201 10.8096C9.5603 10.3597 9.16988 9.72023 9.0498 8.98047L8.16992 9.40039ZM8.66016 5.42969C8.03016 5.42969 7.50977 5.94031 7.50977 6.57031C7.50989 7.0101 7.77014 7.39962 8.16992 7.59961L9.0498 8.01953C9.16989 7.27971 9.56046 6.64034 10.1104 6.19043L9.2998 5.62988C9.11988 5.5 8.90001 5.42972 8.66016 5.42969ZM15.3398 5.42969C15.11 5.42972 14.8903 5.50006 14.6904 5.62988L13.8701 6.19043C14.4299 6.64034 14.8204 7.27982 14.9404 8.01953L15.8203 7.59961C16.23 7.3996 16.4804 7.01004 16.4805 6.57031C16.4805 5.94031 15.9698 5.42969 15.3398 5.42969ZM12 3.5C11.3801 3.5 10.8806 3.9898 10.8604 4.59961L10.9805 5.69043C11.3004 5.57049 11.6401 5.5 12 5.5C12.36 5.5 12.7103 5.57043 13.0303 5.69043L13.1396 4.59961C13.1194 3.9898 12.6199 3.5 12 3.5Z" fill="white"/>
1491
- `};var no=Object.defineProperty,so=(i,e,t)=>e in i?no(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ee=(i,e,t)=>so(i,typeof e!="symbol"?e+"":e,t);const lo=[Rt,Pt,Ot];class co extends M{constructor(){super(),ee(this,"topNavigationItems",[{enabled:this._getMfeEnabled("ui-launchpad"),href:"/",title:"Launchpad",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.launchpadIcon} </svg> `},{enabled:!1,href:"/service-management/",inactiveOn:["/service-management/reports","/service-management/incidents"],basePath:"/service-management",title:"Service Tickets",mfeName:"ui-service-management",permissionData:{permissionTypes:Mt},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.serviceTicketsIcon} </svg> `},{enabled:this._getMfeEnabled("ui-gom"),href:"/inventory",basePath:"/inventory",title:"Inventory",mfeName:"ui-gom",permissionData:{permissionTypes:$t},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.inventoryIcon} </svg> `},{enabled:this._getMfeEnabled("ui-gom"),href:"/order-management",basePath:"/order-management",title:"Order Management",mfeName:"ui-gom",permissionData:{permissionTypes:Tt},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.orderManagementIcon} </svg> `},{enabled:!1,href:"/inventory/sites",basePath:"/inventory",title:"Sites",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.sitesIcon} </svg> `},{enabled:this._getMfeEnabled("ui-sites"),href:"/sites/sites",basePath:"/sites",title:"Sites",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.sitesIcon} </svg> `},{enabled:!1,href:"",title:"Reports, Maintenance & Incident Notifications",alt_href:["/service-management/reports","/service-management/incidents","/reports/dcim"],mfeName:"ui-dcim-reports",permissionData:{permissionTypes:Lt,urls:[{href:"/reports/security",requiredPermission:"Security",order:0},{href:"/reports/dcim",requiredPermission:"DCIM",order:1},{href:"/service-management/reports",requiredPermission:"Planned Site Maintenance",order:2}]},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.reportsIcon} </svg> `},{enabled:this._getMfeEnabled("ui-knowledge-base"),href:"/knowledge-base",title:"Knowledge Base",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.knowledgeBaseIcon} </svg> `},{enabled:this._getMfeEnabled("ui-esg"),href:"/esg-reporting",title:"ESG Reporting",mfeName:"ui-esg",permissionData:{permissionTypes:[It]},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.esgIcon} </svg> `},{enabled:this._getMfeEnabled("ui-my-account"),href:"/my-account",title:"My Account",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.myAccountIcon} </svg> `}]),ee(this,"bottomNavigationItems",[{enabled:!1,href:"/user-management/user-management",title:"User Management",mfeName:"ui-user-management",permissionData:{permissionTypes:[Ht,Vt,Dt]},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.userManagementIcon} </svg> `},{enabled:!1,href:"/user-management/role-management",title:"Role Management",mfeName:"ui-user-management",permissionData:{permissionTypes:lo},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.roleManagementIcon} </svg> `}]),ee(this,"subscriptionDisposer"),ee(this,"setMobileNav",async()=>{const e=this.mobileNav.offsetHeight;document.body.style.setProperty("--mobile-nav-height",`${e}px`)}),ee(this,"handleMenuMobileScroll",()=>{this.mobileNav.offsetHeight&&!this.compact&&this.toggleCompact(!0)}),this.dataLoaded=!1,this.permissions={},this.isDevMode=!1}static get styles(){return[je,k]}static get properties(){return{compact:{type:Boolean},tooltipText:{type:String},tooltip:{type:String},dataLoaded:{type:Boolean},isDevMode:{type:Boolean}}}_getMfeEnabled(e){var t;return!!((t=window.registeredApps[e])!=null&&t.enabled)}async firstUpdated(){this.mobileNav=this.shadowRoot.querySelector("#mobileNav"),window.addEventListener(I.VaadinRouterLocationChanged,()=>{this.requestUpdate()}),this.tooltip=this.shadowRoot.querySelector(".tooltip"),this.updateNavItemStates(J.permissions),this.subscriptionDisposer=dt(()=>J.permissions,o=>{this.updateNavItemStates(o),this.requestUpdate()});const e=await import("/versions.js"),{env:t}=e.default;this.isDevMode=t.startsWith("t")}updateNavItemStates(e){this.topNavigationItems=this.topNavigationItems.map(t=>this.setNavigationItemVisibility(t,e)),this.bottomNavigationItems=this.bottomNavigationItems.map(t=>this.setNavigationItemVisibility(t,e)),this.permissions=e}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.setMobileNav),window.addEventListener("scroll",this.handleMenuMobileScroll)}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("resize",this.setMobileNav),window.removeEventListener("scroll",this.handleMenuMobileScroll),(e=this.subscriptionDisposer)==null||e.call(this)}toggleCompact(e){this.dispatchEvent(new CustomEvent("toggle-menu",{bubbles:!0,composed:!0,detail:{isCompact:e}}))}handleMouseOver(e,t){if(this.compact){const o=e.currentTarget;this.tooltipText=t,Ee(o,this.tooltip,{placement:"right",padding:8}).then(({x:a,y:r})=>{this.tooltip.style.display="block",this.tooltip.style.left=`${a+12}px`,this.tooltip.style.top=`${r}px`,this.tooltip.style.transform="translateY(-50%)"})}}updated(){this.setMobileNav(),setTimeout(()=>{this.setMobileNav()},2e3)}resetScrollPosition(){document.querySelector("gp-bootstrap").shadowRoot.querySelector("global-portal-app").shadowRoot.querySelector("#mfeContainer").scrollTo(0,0)}handleMouseOut(){this.tooltipText="",this.tooltip.style.display="none"}_isActiveItem(e){var t;const o=window.location.pathname,a=e.inactiveOn&&e.inactiveOn.some(r=>new RegExp(r).test(o));return(e.href===o||o.startsWith(e.basePath)||((t=e.alt_href)==null?void 0:t.find(r=>r===o)))&&!a}setNavigationItemVisibility(e,t){if(!e.permissionData)return e;const{mfeName:o}=e;let{href:a}=e;const{permissionTypes:r,urls:n}=e.permissionData;let s=!1;if(s=this._getMfeEnabled(o)&&r.some(c=>t[c]),s&&n&&n.length){const c=n.sort((h,d)=>h.order<d.order?-1:1).find(h=>t[h.requiredPermission]);a=c?c.href:a}return{...e,enabled:s,href:a}}renderNavigation(e){return l` ${e.map(t=>t.enabled?l` <li class="relative rounded-md ${this._isActiveItem(t)?"bg-white bg-opacity-[.16] pointer-events-none":"hover:bg-white hover:bg-opacity-[.16]"}"> <a href="${t.href}" @mouseover="${o=>this.handleMouseOver(o,t.title)}" @mouseout="${this.handleMouseOut}" @click="${()=>{this.resetScrollPosition(),window.innerWidth<1200&&this.toggleCompact()}}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold"> <div class="w-6 shrink-0 opacity-60">${t.icon}</div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">${t.title}</div> </div> </div> </a> </li> `:v)} `}render(){return l` <nav id="mobileNav" class="nav-bar wide relative z-1 lg:hidden md:p-2 md:pb-0 lg:pb-2"> <div class="nav-bar-bg p-4 md:py-3 md:m-2 md:rounded-xl flex items-center justify-between"> <div class="w-[20%]"> <ix-icon-button @click="${()=>this.toggleCompact()}" icon="menu" class="on-primary-icon"></ix-icon-button> </div> <div class="w-[178px]"> <svg @click="${()=>this.toggleCompact()}" focusable="false" viewBox="0 0 178 27" fill="white" class="w-[178px] h-[27px] hidden sm:block"> ${y.digitalRealtyLogoWithText} </svg> </div> <div class="flex items-center gap-[18px] w-[20%] justify-end"> <notifications-icon mobile></notifications-icon> <user-profile-ui mobile></user-profile-ui> </div> </div> </nav> <div class="lg:h-full"> <div class="${this.compact?"left-[-300px] lg:w-[--left-bar-width-lg] md:w-[--open-menu-width-md]":"left-0 md:left-4 w-[--open-menu-width-md]"} lg:h-full absolute lg:relative lg:left-0 animate-width lg:w-auto"> <div class="md:h-full h-[--main-height]"> <div class="tooltip text-white p-1 rounded absolute z-50" style="display:none;background-color:#071454;white-space:nowrap;overflow:hidden;font-size:.75rem"> ${this.tooltipText} </div> <nav class="h-full md:mt-2 lg:mt-0 lg:p-4 flex flex-col text-center text-white sticky top-[var(--intraportal-nav-height,0)] mb-[calc(var(--intraportal-nav-height,0)*-1)] max-h-[--main-height]"> <ix-icon-button @click="${()=>this.toggleCompact()}" icon="chevron_right" class="nav-toggle drop-shadow-lg items-center expand-cta bg-white rounded-full h-8 w-8 absolute z-20 hidden top-[18px] right-[-14px] lg:right-[0px] lg:top-[45px] sm:flex ${this.compact?"animate-spin-180-backwards":"animate-spin-180-forwards"}"></ix-icon-button> <div class="absolute inset-0 h-[--main-height] md:h-[--main-height-tablet-nav] lg:h-[--main-height]"> <div class="absolute inset-0 lg:inset-4 nav-bar-bg md:rounded-xl drop-shadow"></div> </div> <div class="h-full md:h-[--main-height-tablet-nav] overflow-hidden md:rounded-xl max-h-full nav-bar long animate-width flex flex-col ${this.compact?"closed":""} relative"> <div class="mx-1 my-0 px-6 py-[20px] lg:py-[31px] hidden md:block overflow-hidden shrink-0"> <svg @click="${()=>this.toggleCompact()}" focusable="false" viewBox="0 0 178 27" fill="white" class="w-[178px] h-[27px]"> ${y.digitalRealtyLogoWithText} </svg> </div> <hr class="divider hidden md:block mb-1"> <ul class="p-1 overflow-y-auto overflow-x-hidden"> ${this.renderNavigation(this.topNavigationItems)} </ul> <hr class="divider hidden md:block my-1"> <ul class="p-1 overflow-y-auto overflow-x-hidden"> ${this.renderNavigation(this.bottomNavigationItems)} </ul> <hr class="divider my-1 mt-auto" ?hidden="${!1}"> <ul class="p-1 justify-end overflow-y-auto overflow-x-hidden" ?hidden="${!1}"> ${l` <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <div role="button" @mouseover="${e=>this.handleMouseOver(e,"Cookies Settings")}" @mouseout="${this.handleMouseOut}" @click="${this.showCustomiseCookies}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold"> <div class="w-6 shrink-0"> <div class="w-6 shrink-0 opacity-60"> <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.cookiesSettingsIcon} </svg> </div> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">Cookies Settings</div> </div> </div> </div> </li> `} ${this.isDevMode?l` <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <button @mouseover="${e=>this.handleMouseOver(e,"App Versions")}" @mouseout="${this.handleMouseOut}" @click="${this.showAppVersions}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold opacity-60"> <div class="w-6 shrink-0"> <ix-icon style="--ix-icon-font-size:24px" class="block"> fingerprint </ix-icon> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">App versions</div> </div> </div> </button> </li> <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <button @mouseover="${e=>this.handleMouseOver(e,"Clear local storage")}" @mouseout="${this.handleMouseOut}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold opacity-60" @click="${()=>localStorage.clear()}"> <div class="w-6 shrink-0"> <ix-icon style="--ix-icon-font-size:24px" class="block"> refresh </ix-icon> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">Clear local storage</div> </div> </div> </button> </li> `:v} </ul> </div> </nav> </div> </div> </div> `}}window.customElements.define("app-shell-navigation-bar",co);try{self["workbox:window:7.3.0"]&&_()}catch(i){}function Je(i,e){return new Promise(function(t){var o=new MessageChannel;o.port1.onmessage=function(a){t(a.data)},i.postMessage(e,[o.port2])})}function Qe(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,o=Array(e);t<e;t++)o[t]=i[t];return o}function uo(i,e){for(var t=0;t<e.length;t++){var o=e[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,po(o.key),o)}}function ho(i,e){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t)return(t=t.call(i)).next.bind(t);if(Array.isArray(i)||(t=(function(a,r){if(a){if(typeof a=="string")return Qe(a,r);var n={}.toString.call(a).slice(8,-1);return n==="Object"&&a.constructor&&(n=a.constructor.name),n==="Map"||n==="Set"?Array.from(a):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(a,r):void 0}})(i))||e){t&&(i=t);var o=0;return function(){return o>=i.length?{done:!0}:{done:!1,value:i[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1492
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ye(i,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},ye(i,e)}function po(i){var e=(function(t,o){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,o);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)})(i,"string");return typeof e=="symbol"?e:e+""}try{self["workbox:core:7.3.0"]&&_()}catch(i){}var Ce=function(){var i=this;this.promise=new Promise(function(e,t){i.resolve=e,i.reject=t})};function _e(i,e){var t=location.href;return new URL(i,t).href===new URL(e,t).href}var te=function(i,e){this.type=i,Object.assign(this,e)};function D(i,e,t){return t?e?e(i):i:(i&&i.then||(i=Promise.resolve(i)),e?i.then(e):i)}function mo(){}var go={type:"SKIP_WAITING"};function Ye(i,e){return i&&i.then?i.then(mo):Promise.resolve()}var fo=(function(i){function e(r,n){var s,c;return n===void 0&&(n={}),(s=i.call(this)||this).nn={},s.tn=0,s.rn=new Ce,s.en=new Ce,s.on=new Ce,s.un=0,s.an=new Set,s.cn=function(){var h=s.fn,d=h.installing;s.tn>0||!_e(d.scriptURL,s.sn.toString())||performance.now()>s.un+6e4?(s.vn=d,h.removeEventListener("updatefound",s.cn)):(s.hn=d,s.an.add(d),s.rn.resolve(d)),++s.tn,d.addEventListener("statechange",s.ln)},s.ln=function(h){var d=s.fn,f=h.target,x=f.state,$=f===s.vn,T={sw:f,isExternal:$,originalEvent:h};!$&&s.mn&&(T.isUpdate=!0),s.dispatchEvent(new te(x,T)),x==="installed"?s.wn=self.setTimeout(function(){x==="installed"&&d.waiting===f&&s.dispatchEvent(new te("waiting",T))},200):x==="activating"&&(clearTimeout(s.wn),$||s.en.resolve(f))},s.yn=function(h){var d=s.hn,f=d!==navigator.serviceWorker.controller;s.dispatchEvent(new te("controlling",{isExternal:f,originalEvent:h,sw:d,isUpdate:s.mn})),f||s.on.resolve(d)},s.gn=(c=function(h){var d=h.data,f=h.ports,x=h.source;return D(s.getSW(),function(){s.an.has(x)&&s.dispatchEvent(new te("message",{data:d,originalEvent:h,ports:f,sw:x}))})},function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];try{return Promise.resolve(c.apply(this,h))}catch(f){return Promise.reject(f)}}),s.sn=r,s.nn=n,navigator.serviceWorker.addEventListener("message",s.gn),s}var t,o;o=i,(t=e).prototype=Object.create(o.prototype),t.prototype.constructor=t,ye(t,o);var a=e.prototype;return a.register=function(r){var n=(r===void 0?{}:r).immediate,s=n!==void 0&&n;try{var c=this;return D((function(h,d){var f=h();return f&&f.then?f.then(d):d(f)})(function(){if(!s&&document.readyState!=="complete")return Ye(new Promise(function(h){return window.addEventListener("load",h)}))},function(){return c.mn=!!navigator.serviceWorker.controller,c.dn=c.pn(),D(c.bn(),function(h){c.fn=h,c.dn&&(c.hn=c.dn,c.en.resolve(c.dn),c.on.resolve(c.dn),c.dn.addEventListener("statechange",c.ln,{once:!0}));var d=c.fn.waiting;return d&&_e(d.scriptURL,c.sn.toString())&&(c.hn=d,Promise.resolve().then(function(){c.dispatchEvent(new te("waiting",{sw:d,wasWaitingBeforeRegister:!0}))}).then(function(){})),c.hn&&(c.rn.resolve(c.hn),c.an.add(c.hn)),c.fn.addEventListener("updatefound",c.cn),navigator.serviceWorker.addEventListener("controllerchange",c.yn),c.fn})}))}catch(h){return Promise.reject(h)}},a.update=function(){try{return this.fn?D(Ye(this.fn.update())):D()}catch(r){return Promise.reject(r)}},a.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(r){try{return D(this.getSW(),function(n){return Je(n,r)})}catch(n){return Promise.reject(n)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Je(this.fn.waiting,go)},a.pn=function(){var r=navigator.serviceWorker.controller;return r&&_e(r.scriptURL,this.sn.toString())?r:void 0},a.bn=function(){try{var r=this;return D((function(n,s){try{var c=n()}catch(h){return s(h)}return c&&c.then?c.then(void 0,s):c})(function(){return D(navigator.serviceWorker.register(r.sn,r.nn),function(n){return r.un=performance.now(),n})},function(n){throw n}))}catch(n){return Promise.reject(n)}},(function(r,n,s){return n&&uo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(e,[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])})((function(){function i(){this.Pn=new Map}var e=i.prototype;return e.addEventListener=function(t,o){this.jn(t).add(o)},e.removeEventListener=function(t,o){this.jn(t).delete(o)},e.dispatchEvent=function(t){t.target=this;for(var o,a=ho(this.jn(t.type));!(o=a()).done;)(0,o.value)(t)},e.jn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},i})());const wo=L`h1,h2,h3,h4,h5{margin:0}dl,p{margin:0}a{color:#09c;text-decoration:underline;cursor:pointer}a:hover{color:#007aa3}.main-heading,.subheading{font-family:Museo-300,Arial,sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5rem}.subheading{color:var(--subheading-color,#333);margin-bottom:var(--spacing-small)}.app-footer .subheading{--subheading-color:#fff}.main-heading-frame{--main-heading-color:#fff;padding:var(--spacing-medium) 0 0;background-color:#003d79}.main-heading{padding:0 0 var(--spacing-medium);color:var(--main-heading-color,#09c);font-weight:400;border-bottom:5px solid #09c}.default-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block}.default-label-note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block;font-style:italic;color:#595959}.small-text{font-size:.875rem;line-height:1.25rem}ul{margin:0;padding:0;list-style-type:none}.bullet-list{list-style-type:disc}.splash-screen-loader-wrapper{display:grid;place-items:center;z-index:1000;background-color:#fff;opacity:1;transition:opacity 2s ease;height:100vh;padding-left:var(--spacing-large);padding-right:var(--spacing-large)}.loader{position:relative;display:block;width:.75rem;height:.75rem;margin:4em auto 1.5em;background-color:rgba(255,255,255,0);border-radius:50%;animation:shadowBounce 1s infinite linear}.loader:before{content:"";position:absolute;top:0;left:0;display:block;width:.75rem;height:4px;border-radius:50%;animation:inceptionShadowBounce 1s infinite linear}@keyframes shadowBounce{0%,100%{box-shadow:-2.5em -1em 0 0 #09c,-1.25em -1.2em 0 0 #26a5a8,0 -1.7em 0 0 #4db284,1.25em -2.4em 0 0 #73be60,2.5em -2.9em 0 0 #99ca3c}10%{box-shadow:-2.5em -1.2em 0 0 #09c,-1.25em -1em 0 0 #26a5a8,0 -1.2em 0 0 #4db284,1.25em -1.7em 0 0 #73be60,2.5em -2.4em 0 0 #99ca3c}20%{box-shadow:-2.5em -1.7em 0 0 #09c,-1.25em -1.2em 0 0 #26a5a8,0 -1em 0 0 #4db284,1.25em -1.2em 0 0 #73be60,2.5em -1.7em 0 0 #99ca3c}30%{box-shadow:-2.5em -2.4em 0 0 #09c,-1.25em -1.7em 0 0 #26a5a8,0 -1.2em 0 0 #4db284,1.25em -1em 0 0 #73be60,2.5em -1.2em 0 0 #99ca3c}40%{box-shadow:-2.5em -2.9em 0 0 #09c,-1.25em -2.4em 0 0 #26a5a8,0 -1.7em 0 0 #4db284,1.25em -1.2em 0 0 #73be60,2.5em -1em 0 0 #99ca3c}50%{box-shadow:-2.5em -3em 0 0 #09c,-1.25em -2.9em 0 0 #26a5a8,0 -2.4em 0 0 #4db284,1.25em -1.7em 0 0 #73be60,2.5em -1.2em 0 0 #99ca3c}60%{box-shadow:-2.5em -2.9em 0 0 #09c,-1.25em -3em 0 0 #26a5a8,0 -2.9em 0 0 #4db284,1.25em -2.4em 0 0 #73be60,2.5em -1.7em 0 0 #99ca3c}70%{box-shadow:-2.5em -2.4em 0 0 #09c,-1.25em -2.9em 0 0 #26a5a8,0 -3em 0 0 #4db284,1.25em -2.9em 0 0 #73be60,2.5em -2.4em 0 0 #99ca3c}80%{box-shadow:-2.5em -1.7em 0 0 #09c,-1.25em -2.4em 0 0 #26a5a8,0 -2.9em 0 0 #4db284,1.25em -3em 0 0 #73be60,2.5em -2.9em 0 0 #99ca3c}90%{box-shadow:-2.5em -1.2em 0 0 #09c,-1.25em -1.7em 0 0 #26a5a8,0 -2.4em 0 0 #4db284,1.25em -2.9em 0 0 #73be60,2.5em -3em 0 0 #99ca3c}}@keyframes inceptionShadowBounce{0%,100%{box-shadow:-2.5em 1em 0 0 #4d7380,-1.25em 1em 0 0 rgba(103,103,103,.95),0 1em 0 0 rgba(128,128,128,.76),1.25em 1em 0 0 rgba(143,143,143,.55),2.5em 1em 0 0 rgba(131,131,131,.35)}10%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.95),-1.25em 1em 0 0 #676767,0 1em 0 0 rgba(128,128,128,.95),1.25em 1em 0 0 rgba(143,143,143,.76),2.5em 1em 0 0 rgba(131,131,131,.55)}20%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.76),-1.25em 1em 0 0 rgba(103,103,103,.95),0 1em 0 0 grey,1.25em 1em 0 0 rgba(143,143,143,.95),2.5em 1em 0 0 rgba(131,131,131,.76)}30%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.55),-1.25em 1em 0 0 rgba(103,103,103,.76),0 1em 0 0 rgba(128,128,128,.95),1.25em 1em 0 0 #8f8f8f,2.5em 1em 0 0 rgba(131,131,131,.95)}40%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.35),-1.25em 1em 0 0 rgba(103,103,103,.55),0 1em 0 0 rgba(128,128,128,.76),1.25em 1em 0 0 rgba(143,143,143,.95),2.5em 1em 0 0 #838383}50%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.31),-1.25em 1em 0 0 rgba(103,103,103,.35),0 1em 0 0 rgba(128,128,128,.55),1.25em 1em 0 0 rgba(143,143,143,.76),2.5em 1em 0 0 rgba(131,131,131,.95)}60%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.35),-1.25em 1em 0 0 rgba(103,103,103,.31),0 1em 0 0 rgba(128,128,128,.35),1.25em 1em 0 0 rgba(143,143,143,.55),2.5em 1em 0 0 rgba(131,131,131,.76)}70%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.55),-1.25em 1em 0 0 rgba(103,103,103,.35),0 1em 0 0 rgba(128,128,128,.31),1.25em 1em 0 0 rgba(143,143,143,.35),2.5em 1em 0 0 rgba(131,131,131,.55)}80%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.76),-1.25em 1em 0 0 rgba(103,103,103,.55),0 1em 0 0 rgba(128,128,128,.35),1.25em 1em 0 0 rgba(143,143,143,.31),2.5em 1em 0 0 rgba(131,131,131,.35)}90%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.95),-1.25em 1em 0 0 rgba(103,103,103,.76),0 1em 0 0 rgba(128,128,128,.55),1.25em 1em 0 0 rgba(143,143,143,.35),2.5em 1em 0 0 rgba(131,131,131,.31)}}.button-group{list-style-type:none;display:inline-flex;flex-wrap:wrap;padding:.125em;margin:0;border:1px solid #f5f5f5;border-radius:3px;background-color:#f0f0f0}.button-group.-full-width{display:flex}.button-group__item{position:relative;flex:0 0 auto;margin:.125em;text-align:center}.button-group.-full-width>.button-group__item{flex:1 0 7em}.button-group__item>label{display:block;margin:0}.button-group__input{position:absolute;z-index:-10;top:0;left:0;opacity:0}.button-group__label{display:block;padding:.75em 1em;border:1px solid transparent;background-color:#fff;color:#777;border-radius:2px;cursor:pointer}.button-group__label:hover{color:#333}.button-group__input:checked~.button-group__label{border-color:#09c;background-color:#e5f4f9;color:#333;cursor:default}.button-group__input:disabled~.button-group__label,.button-group__input:disabled~.button-group__label:hover{background-image:repeating-linear-gradient(-30deg,transparent 0,transparent 3px,rgba(0,0,0,.1) 3px,rgba(0,0,0,.1) 4px);color:#777;cursor:not-allowed}.button-group__input:focus~.button-group__label{box-shadow:0 0 5px #3b90c9}.button-group__sticker{position:absolute;left:0;transform:translateY(-50%);margin:0}.btn{display:inline-block;font-family:var(--button-font-family, "Museo-300", Arial, sans-serif);font-size:1.125em;line-height:1.3333;padding:.88889em .5em;min-width:var(--button-min-width,8em);border:none;background-color:var(--button-background-color,#99ca3c);color:var(--button-text-color,#fff);border-radius:3px;cursor:pointer}.btn.-small{font-size:1rem;line-height:.65rem;min-width:var(--button-min-width,5em)}.btn:not(:disabled):hover{background-color:var(--button-background-color-hover,#7ba42e)}.btn:disabled{opacity:.6}.form-item{display:block;margin-bottom:var(--spacing-x-large);font-weight:400}.form-item:last-child{margin-bottom:0}.form-item__label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block}.form-item__note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block;font-style:italic;color:#595959}.form-item__field{display:block;width:100%;padding:.5em;font-size:1rem;line-height:1.25rem;border:1px solid #d3d3d3;background-repeat:no-repeat;background-position:calc(100% - .5em) 50%;border-radius:3px;max-width:320px}.form-item__field.-uppercase{text-transform:uppercase}.form-item__field:focus{outline:0;box-shadow:0 0 2px 1px rgba(0,153,204,.39),0 0 4px 3px rgba(0,153,204,.18),0 0 8px 4px rgba(0,153,204,.1)}.form-item__field.-has-validation{padding-right:2em}.form-item__field.-is-valid{border-color:#99ca3c;background-image:url("data:image/svg+xml,%3Csvg width='19px' height='13px' viewBox='0 0 19 13' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpolygon fill='%2399CA3C' points='6.70967742 13 0 6.29032258 2.09677419 4.19354839 6.70967742 8.80645161 16.3548387 0 18.4516129 2.09677419'%3E%3C/polygon%3E %3C/svg%3E")}.form-item__field.-is-invalid{border-color:#e3097c;background-image:url("data:image/svg+xml,%3Csvg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpolygon id='Path' fill='%23E3097C' points='12.759145 0.0312229203 14.8804653 2.15254326 9.57716447 7.45584412 14.8804653 12.759145 12.759145 14.8804653 7.45584412 9.57716447 2.15254326 14.8804653 0.0312229203 12.759145 5.33452378 7.45584412 0.0312229203 2.15254326 2.15254326 0.0312229203 7.45584412 5.33452378'%3E%3C/polygon%3E %3C/svg%3E")}.form-item__field.-read-only,.form-item__field:disabled,.form-item__field[disabled]{border-width:0 0 1px;padding-left:0;color:#595959}textarea.form-item__field{min-height:8em}.form-item__multi-input{max-width:320px;display:flex;align-items:center}.form-item__multi-input.-is-as-set{max-width:460px}.form-item__multi-input-separator{flex:0 0 auto;padding:0 .5em}.form-item__multi-input-item{flex:1 0 5em}.form-item__multi-input-item.-fixed-auto-width{flex:0 0 auto;width:auto}.form-radio-line{max-width:320px}.ccards{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.ccards:empty{display:none}.ccard{position:relative;border:1px solid #dedede}.ccard p{margin:0}.ccard>a{text-decoration:none}.ccard.-loading{border:1px dashed #dedede;text-align:center}.ccards.-grid .ccard{flex:1 0 14em;margin:0 var(--spacing-x-large) var(--spacing-x-large) 0}@supports (grid-template-columns:repeat(auto-fill,minmax(14em,1fr))){.ccards{display:grid}.ccards.-grid{grid-template-columns:repeat(auto-fill,minmax(14em,1fr));grid-gap:var(--spacing-x-large)}.ccard,.ccards.-grid .ccard{margin:0}}.ccard__tags{position:absolute;top:0;left:0;display:flex;flex-direction:row-reverse;justify-content:flex-start;width:100%;transform:translateY(-50%)}.ccard__header{display:flex;padding:var(--spacing-small);background-color:#09c;color:#fff}.ccard__header-heading{flex:1 0 auto;color:#fff}.ccard__header-info{flex:0 0 4em;text-align:right;max-height:24px;overflow:hidden}.ccard__content-padding{padding:var(--spacing-medium)}.ccard__heading{margin:0;font-size:1em}.ccard__main-action{display:block;margin:0;font-family:Museo-300}.ccard__main-action-label{display:block;padding:var(--spacing-small);text-align:center;cursor:pointer;background-color:#99ca3c;color:#fff}.ccard__main-action-label.-neutral{background-color:#d8d8d8;color:#333}.ccard__main-action-input:checked+.ccard__main-action-label{background-color:#09c;color:#fff}.ccard__main-action-input{position:absolute;top:0;left:0;opacity:0;z-index:-10}.ccard__add{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;background-color:#f5f5f5;color:#333;cursor:pointer}.ccard__add:hover{background-color:#e6f2f8;text-decoration:none;color:#333}.ccard__add-icon{flex:0 0 6em;width:6em;height:6em;margin-bottom:var(--spacing-small);background:linear-gradient(to right,#09c,#09c) 0 50%/100% 1.25em no-repeat,linear-gradient(to bottom,#09c,#09c) 50% 0/1.25em 100% no-repeat}.ccard__add-label{flex:0 0 auto;text-decoration:none}.ccard__provider-logo{display:block;max-width:92px;height:auto;margin:0 auto var(--spacing-small)}.tiles-list{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.tiles-list:empty{display:none}.tiles-list__item{position:relative;flex:1 0 14em;margin:0 var(--spacing-x-large) var(--spacing-x-large) 0}@supports (grid-template-columns:repeat(auto-fill,minmax(14em,1fr))){.tiles-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(14em,1fr));grid-gap:var(--spacing-x-large)}.tiles-list__item{margin:0}}.tile-add-service{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:var(--spacing-medium);background-color:#f5f5f5;border:1px solid #dedede;color:#333;text-decoration:none}.tile-add-service:hover{background-color:#e6f2f8;text-decoration:none;color:#333}.tile-add-service__icon{flex:0 0 6em;width:6em;height:6em;margin-bottom:var(--spacing-small);background:linear-gradient(to right,#09c,#09c) 0 50%/100% 1.25em no-repeat,linear-gradient(to bottom,#09c,#09c) 50% 0/1.25em 100% no-repeat}.tile-add-service__label{flex:0 0 auto;text-decoration:none}.tile-loading{display:flex;flex-direction:column;justify-content:center;padding:var(--spacing-medium);border:1px dashed #dedede;text-align:center}.switch-bar{display:flex;justify-content:space-between;align-items:center;border:1px solid #d3d3d3;border-width:1px 0}.switch-bar__label{padding:.5em 0;margin-right:.5em}.switch{position:relative}.switch__input{position:absolute;opacity:0;z-index:-1}.switch__icon{display:block;min-width:2.5rem;width:var(--switch-icon-width,3em);min-height:2.5rem;cursor:pointer;background-color:transparent}.switch__icon:after,.switch__icon:before{content:"";position:absolute;display:block}.switch__icon:before{top:50%;transform:translateY(-50%);width:100%;height:var(--switch-icon-bg-height,1.5rem);border-radius:calc(var(--switch-icon-bg-height,1.5rem)/ 2);box-shadow:inset 0 0 0 2px #a4b9c1,inset 0 4px 3px 0 rgba(0,0,0,.22);background-color:#e83a96;will-change:background-color;transition:background-color 150ms ease-in-out}.switch__icon:after{top:calc(50% - var(--switch-icon-toggle-diameter,1.5rem)/ 2);width:var(--switch-icon-toggle-diameter,1.5rem);height:var(--switch-icon-toggle-diameter,1.5rem);border-radius:50%;background-image:linear-gradient(-180deg,#e2e2e2 0,#91c6d7 100%);box-shadow:inset 0 0 0 2px #a4b9c1,0 2px 2px 0 rgba(0,30,40,.34);transform:translateX(0);will-change:transform;transition:transform 150ms ease-in-out}.switch__input:checked+.switch__icon:before{background-color:#99ca3c}.switch__input:checked+.switch__icon:after{transform:translateX(var(--switch-icon-width,3em)) translateX(calc(var(--switch-icon-toggle-diameter,1.5rem) * -1))}.info-bar{display:flex;align-items:flex-start;flex-wrap:wrap;padding:1em 0;border:1px solid #dedede;border-width:1px 0;font-family:Museo-300;line-height:1.5}.info-bar.-align-center{align-items:center}.info-bar.-compact{padding:.5em 0;font-family:Helvetica,Arial,sans-serif}.info-bar+.info-bar{border-width:0 0 1px 0}.info-bar__label{flex:0 0 17em;margin:0}.info-bar.-compact>.info-bar__label{flex-basis:10em}.info-bar__info{flex:1 1 17em;margin:0;word-break:break-all}.flex-grid{display:flex;flex-wrap:wrap;background-color:#d3d3d3}.flex-grid__section{display:flex;flex-wrap:wrap;flex:0 0 100%}.flex-grid__cell{flex:9999 0 14em;padding:.75rem;outline:1px solid #d3d3d3;background-color:#fff}.flex-grid__cell.-medium{flex:2 0 14em}.flex-grid__cell.-small{flex:1 0 7em}.flex-grid__label{margin:0;font-size:.75em;text-transform:uppercase;line-height:1.333}.flex-grid__label.-secondary{font-style:italic;text-transform:none}.flex-grid__info{margin:0 0 .5rem;font-size:1.125em;line-height:1.333}.flex-grid__info:last-child{margin:0}.logo-pills{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.logo-pills__item{flex:1 0 10.5em;margin:0 1em 1em 0}@supports (grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr))){.logo-pills{display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr));grid-gap:1em}.logo-pills__item{position:relative;margin:0}}.logo-pills__input{position:absolute;top:0;left:0;opacity:0;z-index:-10}.logo-pills__frame{display:flex;flex-direction:column;align-items:center;padding:1em;border:1px solid #dedede}.logo-pills__frame:hover{border-color:#09c}.logo-pills__input:checked+.logo-pills__frame{border-color:#09c;background-color:#e5f4f9}.logo-pills__frame.-disabled,.logo-pills__input:disabled+.logo-pills__frame{opacity:.6}.logo-pills__frame.-disabled:hover,.logo-pills__input:disabled+.logo-pills__frame:hover{border-color:#dedede}.logo-pills__click-area{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;cursor:pointer;z-index:2}.logo-pills__frame.-disabled .logo-pills__click-area,.logo-pills__input:disabled+.logo-pills__frame .logo-pills__click-area{cursor:not-allowed}.logo-pills__label{display:block;margin:.25em 0 .5em}.logo-pills__img{max-width:92px;height:auto;margin:.25em 0 .5em}.logo-pills__availability{position:absolute;top:-.5em;left:0;z-index:2}.summary-list{padding:0 0 0 1em;margin:0;list-style-type:none}.summary-list__label{position:relative;font-size:.8125em}.summary-list__label:not(:first-child){margin-top:.61538em}.summary-list__label.-main:not(:first-child){margin-top:1.2307em}.summary-list__label.-main:before{content:"";position:absolute;top:50%;left:-1em;transform:translateY(-50%);display:block;width:.61538em;height:.61538em;background-color:#09c;border-radius:50%}.summary-list__description{margin:0;font-size:1em;line-height:1.5;word-break:break-word}.summary-list__description.-min-two-lines{min-height:3em}.summary-list-csp-logo{max-width:92px;height:auto;margin:0;display:block;float:right}vaadin-dialog-overlay{--spacing-tiny:0.25rem;--spacing-small:0.5rem;--spacing-medium:1rem;--spacing-large:1.5rem;--spacing-x-large:2rem;--spacing-xx-large:2.5rem;--subheading-color:#09c}.no-indent-section{--step-section-content-indentation:0}[slot=body]{margin-top:var(--spacing-small)}.navbar{background-color:#014482}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all;color:#fff}html{font-size:14px}@media (min-width:768px){html{font-size:16px}}.border-top{border-top:1px solid #e5e5e5}.border-bottom{border-bottom:1px solid #e5e5e5}.box-shadow{box-shadow:0 .25rem .75rem rgba(0,0,0,.05)}button.accept-policy{font-size:1rem;line-height:inherit}html{position:relative;min-height:100%}body{margin-bottom:60px}.footer{position:absolute;bottom:0;width:100%;white-space:nowrap;height:60px;line-height:60px}.museo-300{font-family:Museo-300}h1,h2,h3,h4{font-family:Museo-300;font-size:1.3em;font-weight:400}h1{font-size:2em;margin-bottom:.5em}h2{font-size:1.25rem}h4{font-size:1.1em}a.basic-link,a:not([href]):not([tabindex]).basic-link{font-size:14px;font-family:Arial,Helvetica,sans-serif;text-decoration:underline;color:#09c;cursor:pointer}select:disabled{background-color:#eee}.container{max-width:722px}.navbar-nav{list-style-type:none}.navbar-nav>li{margin:16px}.large-margin-top{margin-top:70px}.medium-margin-top{margin-top:45px}.small-margin-top{margin-top:20px}.align-right{text-align:right}.medium-padding{padding:20px}.u-block{display:block}.u-margin-none{margin:0}.u-margin-bottom-large{margin-bottom:2em}.u-padding-small{padding:.5rem}.u-padding-bottom-large{padding-bottom:2em}.u-small-text{font-size:.875rem}.u-mini-text{font-size:.75rem}.green-btn{display:inline-block;background-color:#99ca3c;color:#fff;font-family:Museo-300;padding:15px 50px;border:0;border-radius:4px;text-decoration:none;font-size:1rem}.green-btn:hover{color:#fff;text-decoration:none}.green-btn:disabled{background-color:#ccc}.default-label{font-family:Arial,Helvetica,sans-serif}.standard-text{font-size:14px;font-family:Arial,Helvetica,sans-serif}.legal-text{font-size:13px;font-family:Arial,Helvetica,sans-serif}.pricing-section{background-color:#eee;padding:10px 0}.service-container{display:inline-block;border:solid 1px #ddd;margin:10px;padding:10px}.service-container div{background-color:#99ca3c;color:#fff;font-family:Museo-300;text-align:center;cursor:pointer;padding:10px;margin-top:5px}.bold-text{font-weight:700}.radio-pills{list-style-type:none;padding-left:0}.radio-pills__item{display:inline-block;position:relative;margin:.25em .25em .25em 0}.radio-pills.-stacked .radio-pills__item{display:block}.radio-pills.-stacked .radio-pills__item:not(:last-child){margin-bottom:.5em}.radio-pills__input{position:absolute;width:1px;height:1px;overflow:hidden;z-index:-1;opacity:0}.radio-pills__label{background-color:#f7f8f8;border:1px solid #b3d0e9;border-radius:1.25em;color:#666;line-height:1;padding:.75em 1.5em;text-align:center;display:block;cursor:pointer}.radio-pills.-stacked .radio-pills__label{display:flex;justify-content:space-between;align-items:center;text-align:left;padding-left:2.25em}.radio-pills.-stacked .radio-pills__label:before{content:"";position:absolute;left:1em;width:1em;height:1em;background-color:#fff;border-radius:50%;border:1px solid #09c}.radio-pills__label:hover{background:#e6f2f8}.radio-pills__input:disabled:not(:checked)+.radio-pills__label,.radio-pills__input[disabled]:not(:checked)+.radio-pills__label{cursor:not-allowed;background-image:repeating-linear-gradient(45deg,#e5e5e5,#e5e5e5 1px,transparent 1px,transparent 4px);border-color:#d5d5d5}.radio-pills__input:disabled:not(:checked)+.radio-pills__label:hover,.radio-pills__input[disabled]:not(:checked)+.radio-pills__label:hover{background-color:#f7f8f8}.radio-pills.-stacked .radio-pills__input:disabled:not(:checked)+.radio-pills__label:before,.radio-pills.-stacked .radio-pills__input[disabled]:not(:checked)+.radio-pills__label:before{border-color:#b5b5b5}.radio-pills__input:checked+.radio-pills__label{background-color:#eaf4d8;border-color:#99ca3c;color:#5c7a24}.radio-pills.-stacked .radio-pills__input:checked+.radio-pills__label:before{background-image:radial-gradient(circle,#09c 50%,transparent 55%,transparent);background-repeat:no-repeat}.radio-pills__info{flex:0 1 40%;font-style:italic;font-weight:700;color:#000}.radio-card__input{position:absolute;opacity:0;z-index:-10}.radio-card__main-action{overflow:hidden}.radio-card__dual-label{position:relative;transition:transform 150ms ease-in-out}.radio-card__input:checked+.radio-card__dual-label{transform:translateY(-100%)}.radio-card__input:disabled+.radio-card__dual-label *{background-image:repeating-linear-gradient(-45deg,transparent 0,transparent 3px,rgba(0,0,0,.1) 3px,rgba(0,0,0,.1) 4px);cursor:not-allowed}.radio-card__default-label{display:block;padding:.5em;text-align:center;background-color:#dedede;color:#000}.radio-card__alternate-label{position:absolute;top:100%;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;background-color:#09c;color:#fff}.gauge{border:1px solid #dedede}.gauge>*{height:.5em;background-color:#dedede}.default-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:.25rem}.alternate-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:.25rem;display:block;font-style:italic}.status-timeline{list-style-type:none;margin:0 0 2em;padding:0}.status-timeline__item{position:relative;padding:0 0 3em;padding-left:4rem;background:repeating-linear-gradient(#e0e0e0,#e0e0e0 .75rem,transparent .75rem,transparent 1rem) 1.9rem 0 100% repeat-y}.status-timeline__item.-success{background:linear-gradient(#09c,#09c) 1.9rem 0 100% repeat-y}.status-timeline__item:last-child{background-image:none;padding-bottom:0}.status-timeline__icon{position:absolute;top:0;left:1.25rem;width:1.5rem;height:1.5rem;background-color:#e0e0e0;border-radius:1.5rem;background-repeat:no-repeat;background-position:50% 50%}.status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='140px' height='36px' viewBox='0 0 140 36' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M18,36 C8.0588745,36 0,27.9411255 0,18 C0,8.0588745 8.0588745,0 18,0 C27.9411255,0 36,8.0588745 36,18 C36,27.9411255 27.9411255,36 18,36 Z M70,36 C60.0588745,36 52,27.9411255 52,18 C52,8.0588745 60.0588745,0 70,0 C79.9411255,0 88,8.0588745 88,18 C88,27.9411255 79.9411255,36 70,36 Z M122,36 C112.058875,36 104,27.9411255 104,18 C104,8.0588745 112.058875,0 122,0 C131.941125,0 140,8.0588745 140,18 C140,27.9411255 131.941125,36 122,36 Z' id='Combined-Shape' fill='%23ffffff'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-success .status-timeline__icon{background-color:#09c}.status-timeline__item.-success .status-timeline__icon:empty{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E %3Cpolygon fill='%23ffffff' fill-rule='evenodd' points='19.227 8 13.174 14.053 10.799 11.654 10 12.453 13.174 15.627 19.999 8.8' transform='translate(-10 -8)'/%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-pending .status-timeline__icon{background-color:#8c8c8c}.status-timeline__item.-pending .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='141px' height='156px' viewBox='0 0 141 156' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='two-circling-arrows' fill='%23ffffff' fill-rule='nonzero'%3E %3Cpath d='M35.735,121.521 C22.965,111.248 14.793,95.496 14.793,77.83 C14.793,51.716 32.675,29.838 56.844,23.6 L56.844,9.154 C24.854,15.646 0.776,43.927 0.776,77.83 C0.776,98.781 9.975,117.568 24.543,130.408 C35.819,140.911 42.827,126.894 35.735,121.521 Z M116.589,24.746 C109.409,18.261 98.896,28.774 105.788,33.982 C118.676,44.252 126.931,60.079 126.931,77.83 C126.931,103.948 109.046,125.83 84.879,132.064 L84.879,146.513 C116.869,140.014 140.947,111.737 140.947,77.829 C140.947,56.602 131.502,37.596 116.589,24.746 Z M63.037,35.707 L85.85,22.046 C89.169,20.058 89.176,16.82 85.868,14.818 L62.844,0.883 C59.532,-1.116 56.859,0.393 56.8749285,4.264 L56.999,32.299 C57.009,36.168 59.714,37.695 63.037,35.707 Z M78.883,120.029 L55.856,133.964 C52.545,135.966 52.552,139.203 55.875,141.192 L78.686,154.854 C82.005,156.838 84.716,155.316 84.733,151.442 L84.8530402,123.408 C84.865,119.54 82.188,118.03 78.883,120.029 Z' id='Shape'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-error .status-timeline__icon{background-color:#d00232}.status-timeline__item.-error .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='22px' height='22px' viewBox='0 0 22 22' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='cancel' fill='%23ffffff' fill-rule='nonzero'%3E %3Cpath d='M14.1,11.3 C13.9,11.1 13.9,10.8 14.1,10.6 L21.6,3.1 C21.8,2.9 21.9,2.6 21.9,2.4 C21.9,2.2 21.8,1.9 21.6,1.7 L20.2,0.3 C20,0.1 19.7,0 19.5,0 C19.2,0 19,0.1 18.8,0.3 L11.3,7.8 C11.1,8 10.8,8 10.6,7.8 L3.1,0.3 C2.9,0.1 2.6,0 2.4,0 C2.2,0 1.9,0.1 1.7,0.3 L0.3,1.7 C0.1,1.9 0,2.2 0,2.4 C0,2.6 0.1,2.9 0.3,3.1 L7.8,10.6 C8,10.8 8,11.1 7.8,11.3 L0.3,18.8 C0.1,19 0,19.3 0,19.5 C0,19.7 0.1,20 0.3,20.2 L1.7,21.6 C1.9,21.8 2.2,21.9 2.4,21.9 C2.6,21.9 2.9,21.8 3.1,21.6 L10.6,14.1 C10.8,13.9 11.1,13.9 11.3,14.1 L18.8,21.6 C19,21.8 19.3,21.9 19.5,21.9 C19.7,21.9 20,21.8 20.2,21.6 L21.6,20.2 C21.8,20 21.9,19.7 21.9,19.5 C21.9,19.3 21.8,19 21.6,18.8 L14.1,11.3 Z' id='Path'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");background-size:.5rem .5rem}.status-timeline__item.-warning .status-timeline__icon{background-color:#f1941f}.status-timeline__item.-warning .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='48px' height='228px' viewBox='0 0 48 228' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M24.154,0.005 C36.216,0.005 46.421,6.81 46.421,18.871 C46.421,55.674 42.092,108.558 42.092,145.36 C42.092,154.947 31.577,158.967 24.155,158.967 C14.259,158.967 5.908,154.947 5.907,145.36 C5.907,108.557 1.578,55.673 1.578,18.871 C1.578,6.809 11.474,0.005 24.154,0.005 Z M24.465,180.306 C37.144,180.306 47.97,191.13 47.97,204.12 C47.97,216.8 37.145,227.934 24.465,227.934 C10.857,227.934 0.651,216.8 0.651,204.12 C0.651,191.13 10.858,180.306 24.465,180.306 Z' id='Combined-Shape' fill='%23ffffff' fill-rule='nonzero'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__icon.-anim-rotate{-webkit-animation:icon-rotation 1.2s infinite;animation:icon-rotation 1.2s infinite;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}.status-timeline__heading{margin:0 0 .4em;font-size:1.5em;font-weight:400;font-family:Museo-300;line-height:1.5rem;color:#ccc}.status-timeline__item.-success .status-timeline__heading{color:#09c}.status-timeline__item.-pending .status-timeline__heading{color:#8c8c8c}.status-timeline__item.-error .status-timeline__heading{color:#d00232}.status-timeline__item.-warning .status-timeline__heading{color:#f1941f}.status-timeline__content>:last-child{margin-bottom:0}@keyframes icon-rotation{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}button{cursor:pointer}.u-app-width{width:100%;max-width:920px;margin-left:auto;margin-right:auto;padding-left:var(--spacing-large);padding-right:var(--spacing-large)}.u-text-right{text-align:right}.u-text-center{text-align:center}.u-float-right{float:right}.u-inline-block{display:inline-block;vertical-align:middle}.u-inline-block.-align-bottom{vertical-align:bottom}.u-inline-block.-align-top{vertical-align:top}.u-margin-top-none{margin-top:0}.u-margin-top-small{margin-top:var(--spacing-small)}.u-margin-top-medium{margin-top:var(--spacing-medium)}.u-margin-bottom-small{margin-bottom:var(--spacing-small)}.u-margin-bottom-medium{margin-bottom:var(--spacing-medium)}.u-margin-bottom-large{margin-bottom:var(--spacing-large)}.u-margin-bottom-x-large,.u-mb-2{margin-bottom:var(--spacing-x-large)}.u-margin-top-xx-large{margin-top:var(--spacing-xx-large)}.u-margin-bottom-xx-large{margin-bottom:var(--spacing-xx-large)}.u-margin-right-medium{margin-right:var(--spacing-medium)}.u-margin-left-medium{margin-left:var(--spacing-medium)}.u-margin-left-x-large{margin-left:var(--spacing-x-large)}:host{display:block;box-sizing:border-box}:host *{box-sizing:border-box}`;class bo extends z{static get styles(){return[wo]}static get properties(){return{updateAvailable:{type:Boolean},updating:{type:Boolean},workboxInstance:{type:Object}}}firstUpdated(){this.init()}init(){"serviceWorker"in navigator&&window.addEventListener("load",()=>{this.register()})}register(){this.workboxInstance=new fo("/service-worker-root.js"),this.workboxInstance.addEventListener("waiting",()=>{this.updateAvailable=!0}),this.workboxInstance.addEventListener("installed",e=>{e.isUpdate&&(this.updateAvailable=!0),this.updateAvailable&&this.updateApplication()}),this.workboxInstance.register()}updateApplication(){this.updating=!0,this.workboxInstance.addEventListener("controlling",()=>{window.location.reload()}),this.workboxInstance.messageSW({type:"SKIP_WAITING"})}render(){return l``}}window.customElements.define("register-service-worker",bo);const vo=(i,e)=>{if(!e)throw new Error("Account number is not available in the token.");const t=xo(i,e),o=ge.filter(n=>t.includes(n.label));o.length>0&&(o.find(n=>n.label===re)||o.unshift(ge.find(n=>n.label===re)),!(o.length===1&&o[0].label===re)&&!o.find(n=>n.label===fe)&&o.push(ge.find(n=>n.label===fe))),o.length===1&&o[0].label===re&&o.pop();const{emeaPortalAccountNumber:a,marketPlacePortalAccountNumber:r}=Xe(i,e);return o.map(n=>{let s=`${n.href}?selected_account_number=${e}`;return n.label===me&&(s=`${n.href}?selected_account_number=${a}`),n.label===ae&&(s=et(n,r)),n.label===fe&&(s=n.href),{...n,href:s}})},Xe=(i,e)=>{const t=tt(i,e),o=it(t,e);let a,r;return o&&o.portal===me?a=o.accountNumber:a=ke(t,me)||e,o&&o.portal===ae?r=o.accountNumber:r=ke(t,ae)||e,{emeaPortalAccountNumber:a,marketPlacePortalAccountNumber:r}},et=(i,e)=>{var t;const o=new URL(i.href);o.searchParams.set("selected_account_number",e);const a=d=>d.toLowerCase().replace(/\/+$/,""),r=a(window.location.pathname),{pathAndQuerystring:n}=window.registeredApps["ui-gom"],s=d=>{const f=a(d.path);return r===f||r.startsWith(f+"/")},c=n.find(s),h=(t=c==null?void 0:c.mppProcessQueryString)!=null?t:null;return o.searchParams.delete("process"),h&&o.searchParams.set("process",h),o.toString()},tt=(i,e)=>{if(!e)return null;function t(a){for(const r of a){if(r.accountNumber.toLowerCase()===e.toLowerCase())return r;if(r.subAccounts&&r.subAccounts.length>0){const n=t(r.subAccounts);if(n)return{...r,subAccounts:[n]}}}return null}return i.find(a=>a.accountNumber.toLowerCase()===e.toLowerCase())||t(i)},ke=(i,e)=>{if(!i)return null;if(i.portal===e)return i.accountNumber;if(i.subAccounts&&i.subAccounts.length>0)for(const t of i.subAccounts){const o=ke(t,e);if(o)return o}return null},xo=(i,e)=>{const t=tt(i,e);if(!t)return[];const o=new Set;function a(r){var n;o.add(r.portal),(n=r.subAccounts)!=null&&n.length&&r.subAccounts.forEach(s=>{a(s)})}return a(t),Array.from(o)},it=(i,e)=>{if(!i)return null;if(i.accountNumber.toLowerCase()===e.toLowerCase())return i;if(i.subAccounts&&i.subAccounts.length>0)for(const t of i.subAccounts){const o=it(t,e);if(o)return o}return null};var yo=Object.defineProperty,Co=(i,e,t)=>e in i?yo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,_o=(i,e,t)=>Co(i,e+"",t);const ot=class at{constructor(){if(this.registered=!1,this.appInsightsReady=!1,this.queue=[],window[we.appInsights])this.appInsightsReady=!0;else{const e=()=>{this.appInsightsReady=!0,this.processQueue(),window.removeEventListener("appInsightsInitialized",e)};window.addEventListener("appInsightsInitialized",e)}}isBatched(){return!1}getIgnoreUrls(){return[]}send(e){Array.isArray(e)?e.forEach(t=>this.buildTelemetry(t)):this.buildTelemetry(e)}processQueue(){for(;this.queue.length>0;){const e=this.queue.shift();this.buildTelemetry(e)}}buildTelemetry(e){var t,o,a,r,n,s,c,h,d;if(e.type!=="measurement")return;if(!this.appInsightsReady||!window[we.appInsights]){this.queue.push(e);return}const{payload:f,meta:x}=e,$={application:zt,sessionId:(t=x.session)==null?void 0:t.id,pageUrl:(o=x.page)==null?void 0:o.url,browserName:(a=x.browser)==null?void 0:a.name,browserVersion:(r=x.browser)==null?void 0:r.version,browserOs:(n=x.browser)==null?void 0:n.os,measurementId:(s=f.context)==null?void 0:s.id,rating:(c=f.context)==null?void 0:c.rating,navigationType:(h=f.context)==null?void 0:h.navigation_type,navigationEntryId:(d=f.context)==null?void 0:d.navigation_entry_id};Object.keys($).forEach(T=>{$[T]===void 0&&delete $[T]}),Object.entries(e.payload.values).forEach(([T,rt])=>{if(at.VALID_METRICS.includes(T)){const nt=`global-portal-${T}`;window[we.appInsights].trackMetric({name:nt,average:rt},$)}})}register(){if(this.registered)return;const e=()=>window.faro?(window.faro.transports.add(this),this.registered=!0,!0):!1;if(e())return;let t=0;const o=5,a=setInterval(()=>{t+=1,(e()||t>=o)&&(clearInterval(a),t>=o&&console.warn("Faro SDK not detected after maximum attempts"))},400)}};_o(ot,"VALID_METRICS",["cls","lcp","fcp","time_to_first_byte"]);let ko=ot;var Ao=Object.defineProperty,Eo=(i,e,t)=>e in i?Ao(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,A=(i,e,t)=>Eo(i,typeof e!="symbol"?e+"":e,t);window.registeredApps["ui-user-management"].enabled&&import("@digital-realty/ui-user-management/ui-user-management.js"),window.registeredApps["ui-service-management"].enabled&&import("@digital-realty/ui-service-management/ui-service-management.js"),window.registeredApps["ui-gom"].enabled&&import("http://localhost:8090/ui-mfe-gom.js"),(window.registeredApps["ui-inventory"].enabled||window.registeredApps["ui-sites"].enabled)&&import("@digital-realty/ui-inventory/ui-inventory.js"),window.registeredApps["ui-launchpad"].enabled&&import("@digital-realty/ui-launchpad/ui-launchpad.js"),window.registeredApps["ui-dcim-charts"].enabled&&import("@digital-realty/ui-mfe-dcim/ui-mfe-dcim.js"),window.registeredApps["ui-dcim-reports"].enabled&&import("@digital-realty/ui-mfe-reports/ui-mfe-reports.js"),window.registeredApps["ui-my-account"].enabled&&import("@digital-realty/ui-my-account/ui-my-account.js"),window.registeredApps["ui-esg"].enabled&&import("http://localhost:8091/ui-mfe-esg.js"),window.getAppVersions=Ii;class No extends M{constructor(){super(),A(this,"checkActivityInterval",1e4),A(this,"inactiveDuration",9e5),A(this,"accounts",[]),A(this,"timeoutController",new lt(this,()=>(this.detectLoggedOut(),g.compareLastActive(this.inactiveDuration)),()=>{g.showAutoLogout||(g.showAutoLogout=+new Date)},g.hydrateStore,this.checkActivityInterval)),A(this,"_clearSessionKeys",()=>{sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),sessionStorage.removeItem("accountSelection:selectedAccount")}),A(this,"_initQualtricsDataLayer",()=>{window._setQualtricsDataLayer=xt,window.addEventListener("setQualtricsDataLayer",this._pushQualtricsData)}),A(this,"_pushQualtricsData",e=>{window.dataLayer=window.dataLayer||[];const{dataLayer:t}=window,o=t.length>0?t[t.length-1]:null,a={event:"qualtrics",...e.detail};(o==null?void 0:o.event)==="qualtrics"&&Object.keys(a).every(r=>o[r]===a[r])||window.dataLayer.push(a)}),A(this,"anAppIsActive",()=>this.isDashboardActive||!!Hi(window.location.pathname)),A(this,"renderApps",()=>l` ${this.isDashboardActive&&this.isMfeEnabled("ui-launchpad")?l` <ui-launchpad></ui-launchpad> `:v} ${this.isMfeEnabled("ui-my-account")?l` <div class="${this.isAccActive?"":"zero-width-height"}"> <ui-my-account baseUrl="/my-account"></ui-my-account> </div> `:v} ${this.isMfeEnabled("ui-service-management")?l` <div class="${this.isSMActive?"":"zero-width-height"}"> <ui-service-management baseUrl="/service-management"></ui-service-management> </div> `:v} ${this.isMfeEnabled("ui-gom")?l` <div class="${this.isGOMActive?"":"zero-width-height"}"> <ui-mfe-gom></ui-mfe-gom> </div> `:v} ${this.isMfeEnabled("ui-user-management")?l` <div class="${this.isUMActive?"":"zero-width-height"}"> <ui-user-management data-theme="ix-theme" baseUrl="/user-management"></ui-user-management> </div> `:v} ${this.isMfeEnabled("ui-sites")?l` <div class="${this.isSITEActive?"":"zero-width-height"}"> <ui-inventory data-theme="ix-theme" baseUrl="${window.registeredApps["ui-sites"].path}"></ui-inventory> </div> `:v} ${this.isMfeEnabled("ui-knowledge-base")?l` ${this.isKBActive?l` <iframe title="Knowledge Base" class="w-full h-full" src="${this.knowledgeBaseIframeURL}"></iframe> `:v} `:v} ${this.isMfeEnabled("ui-dcim-charts")?l` <div class="${this.isDCIMChartsActive?"":"zero-width-height"}"> <ui-mfe-charts class="md:mx-4 lg:mx-0 block" baseUrl="${window.registeredApps["ui-dcim-charts"].path}"></ui-mfe-charts> </div> `:v} ${this.isMfeEnabled("ui-dcim-reports")?l` <div class="${this.isDCIMReportsActive?"":"zero-width-height"}"> <ui-mfe-reports class="md:mx-4 lg:mx-0 block" baseUrl="${window.registeredApps["ui-dcim-reports"].path}"></ui-mfe-reports> </div> `:v} ${this.isMfeEnabled("ui-esg")?l` <div class="${this.isESGActive?"":"zero-width-height"}"> <ui-mfe-esg></ui-mfe-esg> </div> `:v} `),A(this,"_handleAutoLogoutClose",()=>{this.detectLoggedOut(!0),g.showAutoLogout=0,this.timeoutController.setInterval()}),A(this,"_setAllCookies",(e,t)=>{const o=Object.keys(ne).map(a=>({cookie_name:ne[a],cookie_version:be,accepted:e,user_action:t}));this.isCookieExpired=!1,this.revokedConsent=!1,this._processTargetingCookieChange(o),this._processPerformanceCookieChange(o),g.cookiesAccepted=o,Be(o),this.revokedConsent&&window.location.reload()}),A(this,"_processTargetingCookieChange",e=>{}),A(this,"_processPerformanceCookieChange",e=>{var t;const o=(t=e.find(a=>a.cookie_name===ne.performance))==null?void 0:t.accepted;this._getCookieConsent("performance")!==o&&(window.dataLayer&&window.dataLayer.push({event:"cookie_consent",cookieConsentPerformance:o}),o||(Ri(),this.revokedConsent=!0))}),A(this,"_checkForCookieExpiry",()=>{if(!g.cookiesAccepted)return;const e=Date.now();g.cookiesAccepted.forEach(t=>{(new Date(t.expires).getTime()<e||t.cookie_version!==be)&&(this.isCookieExpired=!0)})}),this.appReady=!1,this.compact=!0,this.isAppVersionsVisible=!1,this.isCustomiseCookiesVisible=!1,this.isCookieExpired=!1,this.revokedConsent=!1,this.processingConsent=!1,localStorage.setItem("compact",!0),window._setQualtricsDataLayer=()=>{},sessionStorage.setItem(pe.SessionStorage.HasOutstandingChanges,"false")}detectLoggedOut(e){if(!Ft()){const t=window.location.pathname;if(t==="/session-expired"||t==="/authenticate")return!1;sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),sessionStorage.removeItem("accountSelection:selectedAccount"),window.location.href=e?"/logout?isIdle=true":"/logout"}return!0}connectedCallback(){super.connectedCallback(),this.pageWidthElem=this.querySelector("#page-width"),this.intraPortalNavbarItems=[],window.addEventListener("keydown",g.setLastActive),window.addEventListener("click",g.setLastActive),window.addEventListener("scroll",g.setLastActive),window.addEventListener("touchstart",g.setLastActive),Vi(),window.addEventListener("accountsloaded",this.filterIntraNavBarItems.bind(this)),window.addEventListener("beforeunload",this._clearSessionKeys)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",g.setLastActive),window.removeEventListener("click",g.setLastActive),window.removeEventListener("scroll",g.setLastActive),window.removeEventListener("touchstart",g.setLastActive),window.removeEventListener("beforeunload",this._clearSessionKeys),window.removeEventListener("accountsloaded",this.filterIntraNavBarItems),window.removeEventListener("setQualtricsDataLayer",this._pushQualtricsData)}checkAccountExists(e,t){var o;let a=null;for(const r of t){if(r.accountNumber.toLowerCase()===e.toLowerCase()||((o=r.parentAccountNumber)==null?void 0:o.toLowerCase())===e.toLowerCase()){a=r;break}if(r.subAccounts&&r.subAccounts.length>0&&(a=this.checkAccountExists(e,r.subAccounts),a))break}return a}async detectQueryParamsAndSwitchAccount(){const e=new URLSearchParams(window.location.search),t=e.get("selected_account_number");if(t!=null){const o=await V({page_size:1,account_number:t}),a=this.checkAccountExists(t,o.items);e.delete("selected_account_number");let r=window.location.origin+window.location.pathname;const n=e.toString();if(n&&(r+=`?${n}`),window.history.replaceState({},"",r),a)if(a.parentAccountNumber){const s=this.checkAccountExists(a.parentAccountNumber,o.items);s&&await de(s.accountNumber)}else await de(a.accountNumber)}}static get properties(){return{appTitle:{type:String},currentPath:{type:String},compact:{type:Boolean,reflect:!0},isAppVersionsVisible:{type:Boolean},isCustomiseCookiesVisible:{type:Boolean},isCookieExpired:{type:Boolean},intraPortalNavbarItems:{type:Array}}}static get styles(){return[je,yt,k,ji]}update(e){this.appReady=this.anAppIsActive(),super.update(e)}async firstUpdated(){if(!Zt())return;await g.hydrateStore(),g.setLastActive(),g.showAutoLogout=0,await g.hydrateStore(),this.timeoutController.setInterval(),window.addEventListener(I.VaadinRouterLocationChanged,()=>{var a,r;if((a=this.intraPortalNavbarItems)!=null&&a.length){const n=K(),{marketPlacePortalAccountNumber:s}=Xe(this.accounts,(r=n==null?void 0:n.profile)==null?void 0:r.account_number);this.intraPortalNavbarItems=this.intraPortalNavbarItems.map(c=>c.label===ae?{...c,href:et(c,s)}:c)}this.requestUpdate()}),await st.hydrateStore();const e=await Di();this.saveDateTimeFormatToLocalStorage(e),this.detectQueryParamsAndSwitchAccount(),this._checkForCookieExpiry();const t=this._getCookieConsent("targeting"),o=this._getCookieConsent("performance");if(o||Pi(),window.dataLayer){t&&this._getAccountDetails();const a={};(t||o)&&window.dataLayer.push({event:"cookie_consent",cookieConsentPerformance:o,...a})}new ko().register()}_getAccountDetails(){var e,t;const o=(e=JSON.parse(localStorage.getItem(Se)||{}))==null?void 0:e.profile,{account_number:a,hashed_identifier:r}=o!=null?o:{},n=(t=JSON.parse(localStorage.getItem(Bt)||"{}"))==null?void 0:t.name;return{account_number:a,hashed_identifier:r,user_name:n}}_getCookieConsent(e){const t=g.cookiesAccepted.find(o=>o.cookie_name===ne[e]);return t==null?void 0:t.accepted}saveDateTimeFormatToLocalStorage(e){localStorage.setItem(jt,JSON.stringify({preferredDateFormat:e.preferredDateFormat,preferredTimeFormat:e.preferredTimeFormat,preferredTimezone:e.preferredTimezone})),this.dispatchEvent(new CustomEvent("dateFormatChanged",{bubbles:!0,composed:!0}))}async filterIntraNavBarItems(){var e;if(this.accounts.length>0)return!1;const t=await V();this.accounts=t.items;const o=K(),a=(e=o==null?void 0:o.profile)==null?void 0:e.account_number;this.intraPortalNavbarItems=vo(this.accounts,a)}get isDashboardActive(){return window.location.pathname==="/"}get isAccActive(){return window.location.pathname.startsWith(window.registeredApps["ui-my-account"].path)}get isSMActive(){return window.location.pathname.startsWith(window.registeredApps["ui-service-management"].path)}get isGOMActive(){return(window.registeredApps["ui-gom"].path||[]).some(e=>window.location.pathname.startsWith(e))}get isESGActive(){return window.location.pathname.startsWith(window.registeredApps["ui-esg"].path)}get isUMActive(){return window.location.pathname.startsWith(window.registeredApps["ui-user-management"].path)}get isKBActive(){return window.location.pathname.startsWith(window.registeredApps["ui-knowledge-base"].path)}get isUIActive(){return window.location.pathname.startsWith(window.registeredApps["ui-inventory"].path)}get isSITEActive(){return window.location.pathname.startsWith(window.registeredApps["ui-sites"].path)}get isDCIMChartsActive(){return window.location.pathname.startsWith(window.registeredApps["ui-dcim-charts"].path)}get isDCIMReportsActive(){return window.location.pathname.startsWith(window.registeredApps["ui-dcim-reports"].path)}get isCPActive(){return window.location.pathname.startsWith(window.registeredApps[Ut].path)}get knowledgeBaseIframeURL(){const e=window.location.pathname.replace(window.registeredApps["ui-knowledge-base"].path,"");return`${qt}${e}`}get intraportalNavItems(){return this.intraPortalNavbarItems}isMfeEnabled(e){var t;return(t=window.registeredApps[e])==null?void 0:t.enabled}waitForElement(){return new Promise(e=>{new MutationObserver((t,o)=>{const a=this.shadowRoot.querySelector("app-shell-header").shadowRoot.querySelector("account-selection");a&&(o.disconnect(),e(a))}).observe(document.body,{childList:!0,subtree:!0})})}toggleCompact(e){const{isCompact:t}=e.detail;if(t!==void 0){t!==this.compact&&(this.compact=t,localStorage.setItem("compact",`${this.compact}`));return}this.compact=!this.compact,localStorage.setItem("compact",`${this.compact}`)}render(){return this.appReady?this.isCPActive?l`<ix-cookie-policy></ix-cookie-policy>`:l` <div id="page-width"></div> ${v} <div class="fixed inset-0 bg-black opacity-50 z-20 ${this.compact?"hidden":"block"} lg:hidden" @click="${this.toggleCompact}" @keypress="${this.toggleCompact}"></div> <div class="animate-width grid-rows-[min-content] grid grid-cols-1 lg:grid-rows-none lg:grid-cols-[var(--left-bar-width)_minmax(0,auto)] min-h-[--body-height]"> <app-shell-navigation-bar .showAppVersions="${()=>this.isAppVersionsVisible=!0}" .showCustomiseCookies="${()=>this.isCustomiseCookiesVisible=!0}" @toggle-menu="${this.toggleCompact}" ?compact="${this.compact}" class="block drop-shadow-lg relative z-30"></app-shell-navigation-bar> <div class="flex flex-col grow h-full"> <div class="sticky top-0 z-[5]" style="top:var(--intraportal-nav-height,0)"> <app-shell-header></app-shell-header> <register-service-worker></register-service-worker> </div> <main class="grow lg:mx-0 pb-4 lg:px-4 lg:pl-12" id="mfeContainer"> ${this.renderApps()} </main> </div> </div> <ix-notifications style="--md-icon-button-icon-size:29px" data-theme="ix-theme" baseApiUrl="${Gt}" localStorageKey="${Se}"></ix-notifications> ${l` <ix-cookie-dialog ?open="${this.isCustomiseCookiesVisible}" selection="${g.cookiesAccepted.length===0?null:g.cookiesAccepted[0].user_action==="accept_all"?!0:g.cookiesAccepted[0].user_action==="customize"?JSON.stringify(g.cookiesAccepted.reduce((e,t)=>({...e,[t.cookie_name]:t.accepted}),{})):!1}" @closed="${()=>{this.isCustomiseCookiesVisible=!1}}" @accept-all="${()=>{this.processingConsent||(this.processingConsent=!0,this._setAllCookies(!0,Z.accept),setTimeout(()=>{this.processingConsent=!1},10))}}" @reject-all="${()=>{this.processingConsent||(this.processingConsent=!0,this._setAllCookies(!1,Z.reject),setTimeout(()=>{this.processingConsent=!1},10))}}" @accept-some="${e=>{if(this.processingConsent)return;this.processingConsent=!0;const t=e.detail,o=Object.keys(t).map(a=>({cookie_name:a,cookie_version:be,accepted:t[a],user_action:Z.custom}));this.revokedConsent=!1,this._processTargetingCookieChange(o),this._processPerformanceCookieChange(o),g.cookiesAccepted=o,Be(o),this.isCookieExpired=!1,this.revokedConsent&&window.location.reload(),setTimeout(()=>{this.processingConsent=!1},10)}}" policy-url="${Me}"></ix-cookie-dialog> <ix-cookie-banner ?hidden="${!((g.cookiesAccepted.length===0||this.isCookieExpired)&&!this.isCustomiseCookiesVisible)}" @accept-all="${()=>{this._setAllCookies(!0,Z.accept)}}" @reject-all="${()=>{this._setAllCookies(!1,Z.reject)}}" @no-sell="${()=>{this._setAllCookies(!1,Z.no)}}" @customise-cookies="${()=>{this.isCustomiseCookiesVisible=!0}}" policy-url="${Me}"></ix-cookie-banner> `} <ix-toasters></ix-toasters> <ix-tooltip></ix-tooltip> <ix-app-versions @closed="${()=>this.isAppVersionsVisible=!1}" ?isVisible="${this.isAppVersionsVisible}" .versionsRequest="${Fe}"></ix-app-versions> <ix-auto-logout-dialog .externalCheck="${async()=>{await g.getStoredData(),await g.hydrateStore(),g.lastActive===-1&&(window.location.href="/logout")}}" .timeoutAction="${async()=>{await g.getStoredData(),await g.hydrateStore(),g.showAutoLogout!==0&&(window.location.href="/logout?isIdle=true")}}" opened-at="${g.showAutoLogout}" @closed="${this._handleAutoLogoutClose}" ?open="${g.showAutoLogout>0}"></ix-auto-logout-dialog> `:l``}}window.customElements.define("global-portal-app",No);
1495
+ `};var ho=Object.defineProperty,po=(i,e,t)=>e in i?ho(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ee=(i,e,t)=>po(i,typeof e!="symbol"?e+"":e,t);const mo=[zt,Ft,Zt];class go extends ${constructor(){super(),ee(this,"topNavigationItems",[{enabled:this._getMfeEnabled("ui-launchpad"),href:"/",title:"Launchpad",icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.launchpadIcon} </svg> `},{enabled:!1,href:"/service-management/",inactiveOn:["/service-management/reports","/service-management/incidents"],basePath:"/service-management",title:"Service Tickets",mfeName:"ui-service-management",permissionData:{permissionTypes:Lt},icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.serviceTicketsIcon} </svg> `},{enabled:this._getMfeEnabled("ui-gom"),href:"/inventory",basePath:"/inventory",title:"Inventory",mfeName:"ui-gom",permissionData:{permissionTypes:It},icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.inventoryIcon} </svg> `},{enabled:this._getMfeEnabled("ui-gom"),href:"/order-management",basePath:"/order-management",title:"Order Management",mfeName:"ui-gom",permissionData:{permissionTypes:Dt},icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.orderManagementIcon} </svg> `},{enabled:!1,href:"/inventory/sites",basePath:"/inventory",title:"Sites",icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.sitesIcon} </svg> `},{enabled:this._getMfeEnabled("ui-sites"),href:"/sites/sites",basePath:"/sites",title:"Sites",icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.sitesIcon} </svg> `},{enabled:!1,href:"",title:"Reports, Maintenance & Incident Notifications",alt_href:["/service-management/reports","/service-management/incidents","/reports/dcim"],mfeName:"ui-dcim-reports",permissionData:{permissionTypes:Ht,urls:[{href:"/reports/security",requiredPermission:"Security",order:0},{href:"/reports/dcim",requiredPermission:"DCIM",order:1},{href:"/service-management/reports",requiredPermission:"Planned Site Maintenance",order:2}]},icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.reportsIcon} </svg> `},{enabled:this._getMfeEnabled("ui-knowledge-base"),href:"/knowledge-base",title:"Knowledge Base",icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.knowledgeBaseIcon} </svg> `},{enabled:this._getMfeEnabled("ui-esg"),href:"/esg-reporting",title:"ESG Reporting",mfeName:"ui-esg",permissionData:{permissionTypes:[Vt]},icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.esgIcon} </svg> `},{enabled:this._getMfeEnabled("ui-my-account"),href:"/my-account",title:"My Account",icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.myAccountIcon} </svg> `}]),ee(this,"bottomNavigationItems",[{enabled:!1,href:"/user-management/user-management",title:"User Management",mfeName:"ui-user-management",permissionData:{permissionTypes:[Rt,Pt,Ot]},icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.userManagementIcon} </svg> `},{enabled:!1,href:"/user-management/role-management",title:"Role Management",mfeName:"ui-user-management",permissionData:{permissionTypes:mo},icon:c` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.roleManagementIcon} </svg> `}]),ee(this,"subscriptionDisposer"),ee(this,"setMobileNav",async()=>{const e=this.mobileNav.offsetHeight;document.body.style.setProperty("--mobile-nav-height",`${e}px`)}),ee(this,"handleMenuMobileScroll",()=>{this.mobileNav.offsetHeight&&!this.compact&&this.toggleCompact(!0)}),this.dataLoaded=!1,this.permissions={},this.isDevMode=!1}static get styles(){return[qe,A]}static get properties(){return{compact:{type:Boolean},tooltipText:{type:String},tooltip:{type:String},dataLoaded:{type:Boolean},isDevMode:{type:Boolean}}}_getMfeEnabled(e){var t;return!!((t=window.registeredApps[e])!=null&&t.enabled)}async firstUpdated(){this.mobileNav=this.shadowRoot.querySelector("#mobileNav"),window.addEventListener(I.VaadinRouterLocationChanged,()=>{this.requestUpdate()}),this.tooltip=this.shadowRoot.querySelector(".tooltip"),this.updateNavItemStates(J.permissions),this.subscriptionDisposer=pt(()=>J.permissions,o=>{this.updateNavItemStates(o),this.requestUpdate()});const e=await import("/versions.js"),{env:t}=e.default;this.isDevMode=t.startsWith("t")}updateNavItemStates(e){this.topNavigationItems=this.topNavigationItems.map(t=>this.setNavigationItemVisibility(t,e)),this.bottomNavigationItems=this.bottomNavigationItems.map(t=>this.setNavigationItemVisibility(t,e)),this.permissions=e}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.setMobileNav),window.addEventListener("scroll",this.handleMenuMobileScroll)}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("resize",this.setMobileNav),window.removeEventListener("scroll",this.handleMenuMobileScroll),(e=this.subscriptionDisposer)==null||e.call(this)}toggleCompact(e){this.dispatchEvent(new CustomEvent("toggle-menu",{bubbles:!0,composed:!0,detail:{isCompact:e}}))}handleMouseOver(e,t){if(this.compact){const o=e.currentTarget;this.tooltipText=t,Ee(o,this.tooltip,{placement:"right",padding:8}).then(({x:a,y:n})=>{this.tooltip.style.display="block",this.tooltip.style.left=`${a+12}px`,this.tooltip.style.top=`${n}px`,this.tooltip.style.transform="translateY(-50%)"})}}updated(){this.setMobileNav(),setTimeout(()=>{this.setMobileNav()},2e3)}resetScrollPosition(){document.querySelector("gp-bootstrap").shadowRoot.querySelector("global-portal-app").shadowRoot.querySelector("#mfeContainer").scrollTo(0,0)}handleMouseOut(){this.tooltipText="",this.tooltip.style.display="none"}_isActiveItem(e){var t;const o=window.location.pathname,a=e.inactiveOn&&e.inactiveOn.some(n=>new RegExp(n).test(o));return(e.href===o||o.startsWith(e.basePath)||((t=e.alt_href)==null?void 0:t.find(n=>n===o)))&&!a}setNavigationItemVisibility(e,t){if(!e.permissionData)return e;const{mfeName:o}=e;let{href:a}=e;const{permissionTypes:n,urls:r}=e.permissionData;let s=!1;if(s=this._getMfeEnabled(o)&&n.some(l=>t[l]),s&&r&&r.length){const l=r.sort((u,d)=>u.order<d.order?-1:1).find(u=>t[u.requiredPermission]);a=l?l.href:a}return{...e,enabled:s,href:a}}renderNavigation(e){return c` ${e.map(t=>t.enabled?c` <li class="relative rounded-md ${this._isActiveItem(t)?"bg-white bg-opacity-[.16] pointer-events-none":"hover:bg-white hover:bg-opacity-[.16]"}"> <a href="${t.href}" @mouseover="${o=>this.handleMouseOver(o,t.title)}" @mouseout="${this.handleMouseOut}" @click="${()=>{this.resetScrollPosition(),window.innerWidth<1200&&this.toggleCompact()}}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold"> <div class="w-6 shrink-0 opacity-60">${t.icon}</div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">${t.title}</div> </div> </div> </a> </li> `:b)} `}render(){return c` <nav id="mobileNav" class="nav-bar wide relative z-1 lg:hidden md:p-2 md:pb-0 lg:pb-2"> <div class="nav-bar-bg p-4 md:py-3 md:m-2 md:rounded-xl flex items-center justify-between"> <div class="w-[20%]"> <ix-icon-button @click="${()=>this.toggleCompact()}" icon="menu" class="on-primary-icon"></ix-icon-button> </div> <div class="w-[178px]"> <svg @click="${()=>this.toggleCompact()}" focusable="false" viewBox="0 0 178 27" fill="white" class="w-[178px] h-[27px] hidden sm:block"> ${C.digitalRealtyLogoWithText} </svg> </div> <div class="flex items-center gap-[18px] w-[20%] justify-end"> <notifications-icon mobile></notifications-icon> <user-profile-ui mobile></user-profile-ui> </div> </div> </nav> <div class="lg:h-full"> <div class="${this.compact?"left-[-300px] lg:w-[--left-bar-width-lg] md:w-[--open-menu-width-md]":"left-0 md:left-4 w-[--open-menu-width-md]"} lg:h-full absolute lg:relative lg:left-0 animate-width lg:w-auto"> <div class="md:h-full h-[--main-height]"> <div class="tooltip text-white p-1 rounded absolute z-50" style="display:none;background-color:#071454;white-space:nowrap;overflow:hidden;font-size:.75rem"> ${this.tooltipText} </div> <nav class="h-full md:mt-2 lg:mt-0 lg:p-4 flex flex-col text-center text-white sticky top-[var(--intraportal-nav-height,0)] mb-[calc(var(--intraportal-nav-height,0)*-1)] max-h-[--main-height]"> <ix-icon-button @click="${()=>this.toggleCompact()}" icon="chevron_right" class="nav-toggle drop-shadow-lg items-center expand-cta bg-white rounded-full h-8 w-8 absolute z-20 hidden top-[18px] right-[-14px] lg:right-[0px] lg:top-[45px] sm:flex ${this.compact?"animate-spin-180-backwards":"animate-spin-180-forwards"}"></ix-icon-button> <div class="absolute inset-0 h-[--main-height] md:h-[--main-height-tablet-nav] lg:h-[--main-height]"> <div class="absolute inset-0 lg:inset-4 nav-bar-bg md:rounded-xl drop-shadow"></div> </div> <div class="h-full md:h-[--main-height-tablet-nav] overflow-hidden md:rounded-xl max-h-full nav-bar long animate-width flex flex-col ${this.compact?"closed":""} relative"> <div class="mx-1 my-0 px-6 py-[20px] lg:py-[31px] hidden md:block overflow-hidden shrink-0"> <svg @click="${()=>this.toggleCompact()}" focusable="false" viewBox="0 0 178 27" fill="white" class="w-[178px] h-[27px]"> ${C.digitalRealtyLogoWithText} </svg> </div> <hr class="divider hidden md:block mb-1"> <ul class="p-1 overflow-y-auto overflow-x-hidden"> ${this.renderNavigation(this.topNavigationItems)} </ul> <hr class="divider hidden md:block my-1"> <ul class="p-1 overflow-y-auto overflow-x-hidden"> ${this.renderNavigation(this.bottomNavigationItems)} </ul> <hr class="divider my-1 mt-auto" ?hidden="${!1}"> <ul class="p-1 justify-end overflow-y-auto overflow-x-hidden" ?hidden="${!1}"> ${c` <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <div role="button" @mouseover="${e=>this.handleMouseOver(e,"Cookies Settings")}" @mouseout="${this.handleMouseOut}" @click="${this.showCustomiseCookies}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold"> <div class="w-6 shrink-0"> <div class="w-6 shrink-0 opacity-60"> <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${C.cookiesSettingsIcon} </svg> </div> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">Cookies Settings</div> </div> </div> </div> </li> `} ${this.isDevMode?c` <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <button @mouseover="${e=>this.handleMouseOver(e,"App Versions")}" @mouseout="${this.handleMouseOut}" @click="${this.showAppVersions}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold opacity-60"> <div class="w-6 shrink-0"> <ix-icon style="--ix-icon-font-size:24px" class="block"> fingerprint </ix-icon> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">App versions</div> </div> </div> </button> </li> <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <button @mouseover="${e=>this.handleMouseOver(e,"Clear local storage")}" @mouseout="${this.handleMouseOut}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold opacity-60" @click="${()=>localStorage.clear()}"> <div class="w-6 shrink-0"> <ix-icon style="--ix-icon-font-size:24px" class="block"> refresh </ix-icon> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">Clear local storage</div> </div> </div> </button> </li> `:b} </ul> </div> </nav> </div> </div> </div> `}}window.customElements.define("app-shell-navigation-bar",go);try{self["workbox:window:7.3.0"]&&_()}catch(i){}function Xe(i,e){return new Promise(function(t){var o=new MessageChannel;o.port1.onmessage=function(a){t(a.data)},i.postMessage(e,[o.port2])})}function et(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,o=Array(e);t<e;t++)o[t]=i[t];return o}function fo(i,e){for(var t=0;t<e.length;t++){var o=e[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,bo(o.key),o)}}function wo(i,e){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t)return(t=t.call(i)).next.bind(t);if(Array.isArray(i)||(t=(function(a,n){if(a){if(typeof a=="string")return et(a,n);var r={}.toString.call(a).slice(8,-1);return r==="Object"&&a.constructor&&(r=a.constructor.name),r==="Map"||r==="Set"?Array.from(a):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?et(a,n):void 0}})(i))||e){t&&(i=t);var o=0;return function(){return o>=i.length?{done:!0}:{done:!1,value:i[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1496
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ye(i,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},ye(i,e)}function bo(i){var e=(function(t,o){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var n=a.call(t,o);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)})(i,"string");return typeof e=="symbol"?e:e+""}try{self["workbox:core:7.3.0"]&&_()}catch(i){}var Ce=function(){var i=this;this.promise=new Promise(function(e,t){i.resolve=e,i.reject=t})};function _e(i,e){var t=location.href;return new URL(i,t).href===new URL(e,t).href}var te=function(i,e){this.type=i,Object.assign(this,e)};function V(i,e,t){return t?e?e(i):i:(i&&i.then||(i=Promise.resolve(i)),e?i.then(e):i)}function vo(){}var xo={type:"SKIP_WAITING"};function tt(i,e){return i&&i.then?i.then(vo):Promise.resolve()}var yo=(function(i){function e(n,r){var s,l;return r===void 0&&(r={}),(s=i.call(this)||this).nn={},s.tn=0,s.rn=new Ce,s.en=new Ce,s.on=new Ce,s.un=0,s.an=new Set,s.cn=function(){var u=s.fn,d=u.installing;s.tn>0||!_e(d.scriptURL,s.sn.toString())||performance.now()>s.un+6e4?(s.vn=d,u.removeEventListener("updatefound",s.cn)):(s.hn=d,s.an.add(d),s.rn.resolve(d)),++s.tn,d.addEventListener("statechange",s.ln)},s.ln=function(u){var d=s.fn,f=u.target,w=f.state,y=f===s.vn,M={sw:f,isExternal:y,originalEvent:u};!y&&s.mn&&(M.isUpdate=!0),s.dispatchEvent(new te(w,M)),w==="installed"?s.wn=self.setTimeout(function(){w==="installed"&&d.waiting===f&&s.dispatchEvent(new te("waiting",M))},200):w==="activating"&&(clearTimeout(s.wn),y||s.en.resolve(f))},s.yn=function(u){var d=s.hn,f=d!==navigator.serviceWorker.controller;s.dispatchEvent(new te("controlling",{isExternal:f,originalEvent:u,sw:d,isUpdate:s.mn})),f||s.on.resolve(d)},s.gn=(l=function(u){var d=u.data,f=u.ports,w=u.source;return V(s.getSW(),function(){s.an.has(w)&&s.dispatchEvent(new te("message",{data:d,originalEvent:u,ports:f,sw:w}))})},function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];try{return Promise.resolve(l.apply(this,u))}catch(f){return Promise.reject(f)}}),s.sn=n,s.nn=r,navigator.serviceWorker.addEventListener("message",s.gn),s}var t,o;o=i,(t=e).prototype=Object.create(o.prototype),t.prototype.constructor=t,ye(t,o);var a=e.prototype;return a.register=function(n){var r=(n===void 0?{}:n).immediate,s=r!==void 0&&r;try{var l=this;return V((function(u,d){var f=u();return f&&f.then?f.then(d):d(f)})(function(){if(!s&&document.readyState!=="complete")return tt(new Promise(function(u){return window.addEventListener("load",u)}))},function(){return l.mn=!!navigator.serviceWorker.controller,l.dn=l.pn(),V(l.bn(),function(u){l.fn=u,l.dn&&(l.hn=l.dn,l.en.resolve(l.dn),l.on.resolve(l.dn),l.dn.addEventListener("statechange",l.ln,{once:!0}));var d=l.fn.waiting;return d&&_e(d.scriptURL,l.sn.toString())&&(l.hn=d,Promise.resolve().then(function(){l.dispatchEvent(new te("waiting",{sw:d,wasWaitingBeforeRegister:!0}))}).then(function(){})),l.hn&&(l.rn.resolve(l.hn),l.an.add(l.hn)),l.fn.addEventListener("updatefound",l.cn),navigator.serviceWorker.addEventListener("controllerchange",l.yn),l.fn})}))}catch(u){return Promise.reject(u)}},a.update=function(){try{return this.fn?V(tt(this.fn.update())):V()}catch(n){return Promise.reject(n)}},a.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(n){try{return V(this.getSW(),function(r){return Xe(r,n)})}catch(r){return Promise.reject(r)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Xe(this.fn.waiting,xo)},a.pn=function(){var n=navigator.serviceWorker.controller;return n&&_e(n.scriptURL,this.sn.toString())?n:void 0},a.bn=function(){try{var n=this;return V((function(r,s){try{var l=r()}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l})(function(){return V(navigator.serviceWorker.register(n.sn,n.nn),function(r){return n.un=performance.now(),r})},function(r){throw r}))}catch(r){return Promise.reject(r)}},(function(n,r,s){return r&&fo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n})(e,[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])})((function(){function i(){this.Pn=new Map}var e=i.prototype;return e.addEventListener=function(t,o){this.jn(t).add(o)},e.removeEventListener=function(t,o){this.jn(t).delete(o)},e.dispatchEvent=function(t){t.target=this;for(var o,a=wo(this.jn(t.type));!(o=a()).done;)(0,o.value)(t)},e.jn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},i})());const Co=L`h1,h2,h3,h4,h5{margin:0}dl,p{margin:0}a{color:#09c;text-decoration:underline;cursor:pointer}a:hover{color:#007aa3}.main-heading,.subheading{font-family:Museo-300,Arial,sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5rem}.subheading{color:var(--subheading-color,#333);margin-bottom:var(--spacing-small)}.app-footer .subheading{--subheading-color:#fff}.main-heading-frame{--main-heading-color:#fff;padding:var(--spacing-medium) 0 0;background-color:#003d79}.main-heading{padding:0 0 var(--spacing-medium);color:var(--main-heading-color,#09c);font-weight:400;border-bottom:5px solid #09c}.default-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block}.default-label-note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block;font-style:italic;color:#595959}.small-text{font-size:.875rem;line-height:1.25rem}ul{margin:0;padding:0;list-style-type:none}.bullet-list{list-style-type:disc}.splash-screen-loader-wrapper{display:grid;place-items:center;z-index:1000;background-color:#fff;opacity:1;transition:opacity 2s ease;height:100vh;padding-left:var(--spacing-large);padding-right:var(--spacing-large)}.loader{position:relative;display:block;width:.75rem;height:.75rem;margin:4em auto 1.5em;background-color:rgba(255,255,255,0);border-radius:50%;animation:shadowBounce 1s infinite linear}.loader:before{content:"";position:absolute;top:0;left:0;display:block;width:.75rem;height:4px;border-radius:50%;animation:inceptionShadowBounce 1s infinite linear}@keyframes shadowBounce{0%,100%{box-shadow:-2.5em -1em 0 0 #09c,-1.25em -1.2em 0 0 #26a5a8,0 -1.7em 0 0 #4db284,1.25em -2.4em 0 0 #73be60,2.5em -2.9em 0 0 #99ca3c}10%{box-shadow:-2.5em -1.2em 0 0 #09c,-1.25em -1em 0 0 #26a5a8,0 -1.2em 0 0 #4db284,1.25em -1.7em 0 0 #73be60,2.5em -2.4em 0 0 #99ca3c}20%{box-shadow:-2.5em -1.7em 0 0 #09c,-1.25em -1.2em 0 0 #26a5a8,0 -1em 0 0 #4db284,1.25em -1.2em 0 0 #73be60,2.5em -1.7em 0 0 #99ca3c}30%{box-shadow:-2.5em -2.4em 0 0 #09c,-1.25em -1.7em 0 0 #26a5a8,0 -1.2em 0 0 #4db284,1.25em -1em 0 0 #73be60,2.5em -1.2em 0 0 #99ca3c}40%{box-shadow:-2.5em -2.9em 0 0 #09c,-1.25em -2.4em 0 0 #26a5a8,0 -1.7em 0 0 #4db284,1.25em -1.2em 0 0 #73be60,2.5em -1em 0 0 #99ca3c}50%{box-shadow:-2.5em -3em 0 0 #09c,-1.25em -2.9em 0 0 #26a5a8,0 -2.4em 0 0 #4db284,1.25em -1.7em 0 0 #73be60,2.5em -1.2em 0 0 #99ca3c}60%{box-shadow:-2.5em -2.9em 0 0 #09c,-1.25em -3em 0 0 #26a5a8,0 -2.9em 0 0 #4db284,1.25em -2.4em 0 0 #73be60,2.5em -1.7em 0 0 #99ca3c}70%{box-shadow:-2.5em -2.4em 0 0 #09c,-1.25em -2.9em 0 0 #26a5a8,0 -3em 0 0 #4db284,1.25em -2.9em 0 0 #73be60,2.5em -2.4em 0 0 #99ca3c}80%{box-shadow:-2.5em -1.7em 0 0 #09c,-1.25em -2.4em 0 0 #26a5a8,0 -2.9em 0 0 #4db284,1.25em -3em 0 0 #73be60,2.5em -2.9em 0 0 #99ca3c}90%{box-shadow:-2.5em -1.2em 0 0 #09c,-1.25em -1.7em 0 0 #26a5a8,0 -2.4em 0 0 #4db284,1.25em -2.9em 0 0 #73be60,2.5em -3em 0 0 #99ca3c}}@keyframes inceptionShadowBounce{0%,100%{box-shadow:-2.5em 1em 0 0 #4d7380,-1.25em 1em 0 0 rgba(103,103,103,.95),0 1em 0 0 rgba(128,128,128,.76),1.25em 1em 0 0 rgba(143,143,143,.55),2.5em 1em 0 0 rgba(131,131,131,.35)}10%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.95),-1.25em 1em 0 0 #676767,0 1em 0 0 rgba(128,128,128,.95),1.25em 1em 0 0 rgba(143,143,143,.76),2.5em 1em 0 0 rgba(131,131,131,.55)}20%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.76),-1.25em 1em 0 0 rgba(103,103,103,.95),0 1em 0 0 grey,1.25em 1em 0 0 rgba(143,143,143,.95),2.5em 1em 0 0 rgba(131,131,131,.76)}30%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.55),-1.25em 1em 0 0 rgba(103,103,103,.76),0 1em 0 0 rgba(128,128,128,.95),1.25em 1em 0 0 #8f8f8f,2.5em 1em 0 0 rgba(131,131,131,.95)}40%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.35),-1.25em 1em 0 0 rgba(103,103,103,.55),0 1em 0 0 rgba(128,128,128,.76),1.25em 1em 0 0 rgba(143,143,143,.95),2.5em 1em 0 0 #838383}50%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.31),-1.25em 1em 0 0 rgba(103,103,103,.35),0 1em 0 0 rgba(128,128,128,.55),1.25em 1em 0 0 rgba(143,143,143,.76),2.5em 1em 0 0 rgba(131,131,131,.95)}60%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.35),-1.25em 1em 0 0 rgba(103,103,103,.31),0 1em 0 0 rgba(128,128,128,.35),1.25em 1em 0 0 rgba(143,143,143,.55),2.5em 1em 0 0 rgba(131,131,131,.76)}70%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.55),-1.25em 1em 0 0 rgba(103,103,103,.35),0 1em 0 0 rgba(128,128,128,.31),1.25em 1em 0 0 rgba(143,143,143,.35),2.5em 1em 0 0 rgba(131,131,131,.55)}80%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.76),-1.25em 1em 0 0 rgba(103,103,103,.55),0 1em 0 0 rgba(128,128,128,.35),1.25em 1em 0 0 rgba(143,143,143,.31),2.5em 1em 0 0 rgba(131,131,131,.35)}90%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.95),-1.25em 1em 0 0 rgba(103,103,103,.76),0 1em 0 0 rgba(128,128,128,.55),1.25em 1em 0 0 rgba(143,143,143,.35),2.5em 1em 0 0 rgba(131,131,131,.31)}}.button-group{list-style-type:none;display:inline-flex;flex-wrap:wrap;padding:.125em;margin:0;border:1px solid #f5f5f5;border-radius:3px;background-color:#f0f0f0}.button-group.-full-width{display:flex}.button-group__item{position:relative;flex:0 0 auto;margin:.125em;text-align:center}.button-group.-full-width>.button-group__item{flex:1 0 7em}.button-group__item>label{display:block;margin:0}.button-group__input{position:absolute;z-index:-10;top:0;left:0;opacity:0}.button-group__label{display:block;padding:.75em 1em;border:1px solid transparent;background-color:#fff;color:#777;border-radius:2px;cursor:pointer}.button-group__label:hover{color:#333}.button-group__input:checked~.button-group__label{border-color:#09c;background-color:#e5f4f9;color:#333;cursor:default}.button-group__input:disabled~.button-group__label,.button-group__input:disabled~.button-group__label:hover{background-image:repeating-linear-gradient(-30deg,transparent 0,transparent 3px,rgba(0,0,0,.1) 3px,rgba(0,0,0,.1) 4px);color:#777;cursor:not-allowed}.button-group__input:focus~.button-group__label{box-shadow:0 0 5px #3b90c9}.button-group__sticker{position:absolute;left:0;transform:translateY(-50%);margin:0}.btn{display:inline-block;font-family:var(--button-font-family, "Museo-300", Arial, sans-serif);font-size:1.125em;line-height:1.3333;padding:.88889em .5em;min-width:var(--button-min-width,8em);border:none;background-color:var(--button-background-color,#99ca3c);color:var(--button-text-color,#fff);border-radius:3px;cursor:pointer}.btn.-small{font-size:1rem;line-height:.65rem;min-width:var(--button-min-width,5em)}.btn:not(:disabled):hover{background-color:var(--button-background-color-hover,#7ba42e)}.btn:disabled{opacity:.6}.form-item{display:block;margin-bottom:var(--spacing-x-large);font-weight:400}.form-item:last-child{margin-bottom:0}.form-item__label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block}.form-item__note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block;font-style:italic;color:#595959}.form-item__field{display:block;width:100%;padding:.5em;font-size:1rem;line-height:1.25rem;border:1px solid #d3d3d3;background-repeat:no-repeat;background-position:calc(100% - .5em) 50%;border-radius:3px;max-width:320px}.form-item__field.-uppercase{text-transform:uppercase}.form-item__field:focus{outline:0;box-shadow:0 0 2px 1px rgba(0,153,204,.39),0 0 4px 3px rgba(0,153,204,.18),0 0 8px 4px rgba(0,153,204,.1)}.form-item__field.-has-validation{padding-right:2em}.form-item__field.-is-valid{border-color:#99ca3c;background-image:url("data:image/svg+xml,%3Csvg width='19px' height='13px' viewBox='0 0 19 13' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpolygon fill='%2399CA3C' points='6.70967742 13 0 6.29032258 2.09677419 4.19354839 6.70967742 8.80645161 16.3548387 0 18.4516129 2.09677419'%3E%3C/polygon%3E %3C/svg%3E")}.form-item__field.-is-invalid{border-color:#e3097c;background-image:url("data:image/svg+xml,%3Csvg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpolygon id='Path' fill='%23E3097C' points='12.759145 0.0312229203 14.8804653 2.15254326 9.57716447 7.45584412 14.8804653 12.759145 12.759145 14.8804653 7.45584412 9.57716447 2.15254326 14.8804653 0.0312229203 12.759145 5.33452378 7.45584412 0.0312229203 2.15254326 2.15254326 0.0312229203 7.45584412 5.33452378'%3E%3C/polygon%3E %3C/svg%3E")}.form-item__field.-read-only,.form-item__field:disabled,.form-item__field[disabled]{border-width:0 0 1px;padding-left:0;color:#595959}textarea.form-item__field{min-height:8em}.form-item__multi-input{max-width:320px;display:flex;align-items:center}.form-item__multi-input.-is-as-set{max-width:460px}.form-item__multi-input-separator{flex:0 0 auto;padding:0 .5em}.form-item__multi-input-item{flex:1 0 5em}.form-item__multi-input-item.-fixed-auto-width{flex:0 0 auto;width:auto}.form-radio-line{max-width:320px}.ccards{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.ccards:empty{display:none}.ccard{position:relative;border:1px solid #dedede}.ccard p{margin:0}.ccard>a{text-decoration:none}.ccard.-loading{border:1px dashed #dedede;text-align:center}.ccards.-grid .ccard{flex:1 0 14em;margin:0 var(--spacing-x-large) var(--spacing-x-large) 0}@supports (grid-template-columns:repeat(auto-fill,minmax(14em,1fr))){.ccards{display:grid}.ccards.-grid{grid-template-columns:repeat(auto-fill,minmax(14em,1fr));grid-gap:var(--spacing-x-large)}.ccard,.ccards.-grid .ccard{margin:0}}.ccard__tags{position:absolute;top:0;left:0;display:flex;flex-direction:row-reverse;justify-content:flex-start;width:100%;transform:translateY(-50%)}.ccard__header{display:flex;padding:var(--spacing-small);background-color:#09c;color:#fff}.ccard__header-heading{flex:1 0 auto;color:#fff}.ccard__header-info{flex:0 0 4em;text-align:right;max-height:24px;overflow:hidden}.ccard__content-padding{padding:var(--spacing-medium)}.ccard__heading{margin:0;font-size:1em}.ccard__main-action{display:block;margin:0;font-family:Museo-300}.ccard__main-action-label{display:block;padding:var(--spacing-small);text-align:center;cursor:pointer;background-color:#99ca3c;color:#fff}.ccard__main-action-label.-neutral{background-color:#d8d8d8;color:#333}.ccard__main-action-input:checked+.ccard__main-action-label{background-color:#09c;color:#fff}.ccard__main-action-input{position:absolute;top:0;left:0;opacity:0;z-index:-10}.ccard__add{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;background-color:#f5f5f5;color:#333;cursor:pointer}.ccard__add:hover{background-color:#e6f2f8;text-decoration:none;color:#333}.ccard__add-icon{flex:0 0 6em;width:6em;height:6em;margin-bottom:var(--spacing-small);background:linear-gradient(to right,#09c,#09c) 0 50%/100% 1.25em no-repeat,linear-gradient(to bottom,#09c,#09c) 50% 0/1.25em 100% no-repeat}.ccard__add-label{flex:0 0 auto;text-decoration:none}.ccard__provider-logo{display:block;max-width:92px;height:auto;margin:0 auto var(--spacing-small)}.tiles-list{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.tiles-list:empty{display:none}.tiles-list__item{position:relative;flex:1 0 14em;margin:0 var(--spacing-x-large) var(--spacing-x-large) 0}@supports (grid-template-columns:repeat(auto-fill,minmax(14em,1fr))){.tiles-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(14em,1fr));grid-gap:var(--spacing-x-large)}.tiles-list__item{margin:0}}.tile-add-service{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:var(--spacing-medium);background-color:#f5f5f5;border:1px solid #dedede;color:#333;text-decoration:none}.tile-add-service:hover{background-color:#e6f2f8;text-decoration:none;color:#333}.tile-add-service__icon{flex:0 0 6em;width:6em;height:6em;margin-bottom:var(--spacing-small);background:linear-gradient(to right,#09c,#09c) 0 50%/100% 1.25em no-repeat,linear-gradient(to bottom,#09c,#09c) 50% 0/1.25em 100% no-repeat}.tile-add-service__label{flex:0 0 auto;text-decoration:none}.tile-loading{display:flex;flex-direction:column;justify-content:center;padding:var(--spacing-medium);border:1px dashed #dedede;text-align:center}.switch-bar{display:flex;justify-content:space-between;align-items:center;border:1px solid #d3d3d3;border-width:1px 0}.switch-bar__label{padding:.5em 0;margin-right:.5em}.switch{position:relative}.switch__input{position:absolute;opacity:0;z-index:-1}.switch__icon{display:block;min-width:2.5rem;width:var(--switch-icon-width,3em);min-height:2.5rem;cursor:pointer;background-color:transparent}.switch__icon:after,.switch__icon:before{content:"";position:absolute;display:block}.switch__icon:before{top:50%;transform:translateY(-50%);width:100%;height:var(--switch-icon-bg-height,1.5rem);border-radius:calc(var(--switch-icon-bg-height,1.5rem)/ 2);box-shadow:inset 0 0 0 2px #a4b9c1,inset 0 4px 3px 0 rgba(0,0,0,.22);background-color:#e83a96;will-change:background-color;transition:background-color 150ms ease-in-out}.switch__icon:after{top:calc(50% - var(--switch-icon-toggle-diameter,1.5rem)/ 2);width:var(--switch-icon-toggle-diameter,1.5rem);height:var(--switch-icon-toggle-diameter,1.5rem);border-radius:50%;background-image:linear-gradient(-180deg,#e2e2e2 0,#91c6d7 100%);box-shadow:inset 0 0 0 2px #a4b9c1,0 2px 2px 0 rgba(0,30,40,.34);transform:translateX(0);will-change:transform;transition:transform 150ms ease-in-out}.switch__input:checked+.switch__icon:before{background-color:#99ca3c}.switch__input:checked+.switch__icon:after{transform:translateX(var(--switch-icon-width,3em)) translateX(calc(var(--switch-icon-toggle-diameter,1.5rem) * -1))}.info-bar{display:flex;align-items:flex-start;flex-wrap:wrap;padding:1em 0;border:1px solid #dedede;border-width:1px 0;font-family:Museo-300;line-height:1.5}.info-bar.-align-center{align-items:center}.info-bar.-compact{padding:.5em 0;font-family:Helvetica,Arial,sans-serif}.info-bar+.info-bar{border-width:0 0 1px 0}.info-bar__label{flex:0 0 17em;margin:0}.info-bar.-compact>.info-bar__label{flex-basis:10em}.info-bar__info{flex:1 1 17em;margin:0;word-break:break-all}.flex-grid{display:flex;flex-wrap:wrap;background-color:#d3d3d3}.flex-grid__section{display:flex;flex-wrap:wrap;flex:0 0 100%}.flex-grid__cell{flex:9999 0 14em;padding:.75rem;outline:1px solid #d3d3d3;background-color:#fff}.flex-grid__cell.-medium{flex:2 0 14em}.flex-grid__cell.-small{flex:1 0 7em}.flex-grid__label{margin:0;font-size:.75em;text-transform:uppercase;line-height:1.333}.flex-grid__label.-secondary{font-style:italic;text-transform:none}.flex-grid__info{margin:0 0 .5rem;font-size:1.125em;line-height:1.333}.flex-grid__info:last-child{margin:0}.logo-pills{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.logo-pills__item{flex:1 0 10.5em;margin:0 1em 1em 0}@supports (grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr))){.logo-pills{display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr));grid-gap:1em}.logo-pills__item{position:relative;margin:0}}.logo-pills__input{position:absolute;top:0;left:0;opacity:0;z-index:-10}.logo-pills__frame{display:flex;flex-direction:column;align-items:center;padding:1em;border:1px solid #dedede}.logo-pills__frame:hover{border-color:#09c}.logo-pills__input:checked+.logo-pills__frame{border-color:#09c;background-color:#e5f4f9}.logo-pills__frame.-disabled,.logo-pills__input:disabled+.logo-pills__frame{opacity:.6}.logo-pills__frame.-disabled:hover,.logo-pills__input:disabled+.logo-pills__frame:hover{border-color:#dedede}.logo-pills__click-area{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;cursor:pointer;z-index:2}.logo-pills__frame.-disabled .logo-pills__click-area,.logo-pills__input:disabled+.logo-pills__frame .logo-pills__click-area{cursor:not-allowed}.logo-pills__label{display:block;margin:.25em 0 .5em}.logo-pills__img{max-width:92px;height:auto;margin:.25em 0 .5em}.logo-pills__availability{position:absolute;top:-.5em;left:0;z-index:2}.summary-list{padding:0 0 0 1em;margin:0;list-style-type:none}.summary-list__label{position:relative;font-size:.8125em}.summary-list__label:not(:first-child){margin-top:.61538em}.summary-list__label.-main:not(:first-child){margin-top:1.2307em}.summary-list__label.-main:before{content:"";position:absolute;top:50%;left:-1em;transform:translateY(-50%);display:block;width:.61538em;height:.61538em;background-color:#09c;border-radius:50%}.summary-list__description{margin:0;font-size:1em;line-height:1.5;word-break:break-word}.summary-list__description.-min-two-lines{min-height:3em}.summary-list-csp-logo{max-width:92px;height:auto;margin:0;display:block;float:right}vaadin-dialog-overlay{--spacing-tiny:0.25rem;--spacing-small:0.5rem;--spacing-medium:1rem;--spacing-large:1.5rem;--spacing-x-large:2rem;--spacing-xx-large:2.5rem;--subheading-color:#09c}.no-indent-section{--step-section-content-indentation:0}[slot=body]{margin-top:var(--spacing-small)}.navbar{background-color:#014482}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all;color:#fff}html{font-size:14px}@media (min-width:768px){html{font-size:16px}}.border-top{border-top:1px solid #e5e5e5}.border-bottom{border-bottom:1px solid #e5e5e5}.box-shadow{box-shadow:0 .25rem .75rem rgba(0,0,0,.05)}button.accept-policy{font-size:1rem;line-height:inherit}html{position:relative;min-height:100%}body{margin-bottom:60px}.footer{position:absolute;bottom:0;width:100%;white-space:nowrap;height:60px;line-height:60px}.museo-300{font-family:Museo-300}h1,h2,h3,h4{font-family:Museo-300;font-size:1.3em;font-weight:400}h1{font-size:2em;margin-bottom:.5em}h2{font-size:1.25rem}h4{font-size:1.1em}a.basic-link,a:not([href]):not([tabindex]).basic-link{font-size:14px;font-family:Arial,Helvetica,sans-serif;text-decoration:underline;color:#09c;cursor:pointer}select:disabled{background-color:#eee}.container{max-width:722px}.navbar-nav{list-style-type:none}.navbar-nav>li{margin:16px}.large-margin-top{margin-top:70px}.medium-margin-top{margin-top:45px}.small-margin-top{margin-top:20px}.align-right{text-align:right}.medium-padding{padding:20px}.u-block{display:block}.u-margin-none{margin:0}.u-margin-bottom-large{margin-bottom:2em}.u-padding-small{padding:.5rem}.u-padding-bottom-large{padding-bottom:2em}.u-small-text{font-size:.875rem}.u-mini-text{font-size:.75rem}.green-btn{display:inline-block;background-color:#99ca3c;color:#fff;font-family:Museo-300;padding:15px 50px;border:0;border-radius:4px;text-decoration:none;font-size:1rem}.green-btn:hover{color:#fff;text-decoration:none}.green-btn:disabled{background-color:#ccc}.default-label{font-family:Arial,Helvetica,sans-serif}.standard-text{font-size:14px;font-family:Arial,Helvetica,sans-serif}.legal-text{font-size:13px;font-family:Arial,Helvetica,sans-serif}.pricing-section{background-color:#eee;padding:10px 0}.service-container{display:inline-block;border:solid 1px #ddd;margin:10px;padding:10px}.service-container div{background-color:#99ca3c;color:#fff;font-family:Museo-300;text-align:center;cursor:pointer;padding:10px;margin-top:5px}.bold-text{font-weight:700}.radio-pills{list-style-type:none;padding-left:0}.radio-pills__item{display:inline-block;position:relative;margin:.25em .25em .25em 0}.radio-pills.-stacked .radio-pills__item{display:block}.radio-pills.-stacked .radio-pills__item:not(:last-child){margin-bottom:.5em}.radio-pills__input{position:absolute;width:1px;height:1px;overflow:hidden;z-index:-1;opacity:0}.radio-pills__label{background-color:#f7f8f8;border:1px solid #b3d0e9;border-radius:1.25em;color:#666;line-height:1;padding:.75em 1.5em;text-align:center;display:block;cursor:pointer}.radio-pills.-stacked .radio-pills__label{display:flex;justify-content:space-between;align-items:center;text-align:left;padding-left:2.25em}.radio-pills.-stacked .radio-pills__label:before{content:"";position:absolute;left:1em;width:1em;height:1em;background-color:#fff;border-radius:50%;border:1px solid #09c}.radio-pills__label:hover{background:#e6f2f8}.radio-pills__input:disabled:not(:checked)+.radio-pills__label,.radio-pills__input[disabled]:not(:checked)+.radio-pills__label{cursor:not-allowed;background-image:repeating-linear-gradient(45deg,#e5e5e5,#e5e5e5 1px,transparent 1px,transparent 4px);border-color:#d5d5d5}.radio-pills__input:disabled:not(:checked)+.radio-pills__label:hover,.radio-pills__input[disabled]:not(:checked)+.radio-pills__label:hover{background-color:#f7f8f8}.radio-pills.-stacked .radio-pills__input:disabled:not(:checked)+.radio-pills__label:before,.radio-pills.-stacked .radio-pills__input[disabled]:not(:checked)+.radio-pills__label:before{border-color:#b5b5b5}.radio-pills__input:checked+.radio-pills__label{background-color:#eaf4d8;border-color:#99ca3c;color:#5c7a24}.radio-pills.-stacked .radio-pills__input:checked+.radio-pills__label:before{background-image:radial-gradient(circle,#09c 50%,transparent 55%,transparent);background-repeat:no-repeat}.radio-pills__info{flex:0 1 40%;font-style:italic;font-weight:700;color:#000}.radio-card__input{position:absolute;opacity:0;z-index:-10}.radio-card__main-action{overflow:hidden}.radio-card__dual-label{position:relative;transition:transform 150ms ease-in-out}.radio-card__input:checked+.radio-card__dual-label{transform:translateY(-100%)}.radio-card__input:disabled+.radio-card__dual-label *{background-image:repeating-linear-gradient(-45deg,transparent 0,transparent 3px,rgba(0,0,0,.1) 3px,rgba(0,0,0,.1) 4px);cursor:not-allowed}.radio-card__default-label{display:block;padding:.5em;text-align:center;background-color:#dedede;color:#000}.radio-card__alternate-label{position:absolute;top:100%;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;background-color:#09c;color:#fff}.gauge{border:1px solid #dedede}.gauge>*{height:.5em;background-color:#dedede}.default-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:.25rem}.alternate-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:.25rem;display:block;font-style:italic}.status-timeline{list-style-type:none;margin:0 0 2em;padding:0}.status-timeline__item{position:relative;padding:0 0 3em;padding-left:4rem;background:repeating-linear-gradient(#e0e0e0,#e0e0e0 .75rem,transparent .75rem,transparent 1rem) 1.9rem 0 100% repeat-y}.status-timeline__item.-success{background:linear-gradient(#09c,#09c) 1.9rem 0 100% repeat-y}.status-timeline__item:last-child{background-image:none;padding-bottom:0}.status-timeline__icon{position:absolute;top:0;left:1.25rem;width:1.5rem;height:1.5rem;background-color:#e0e0e0;border-radius:1.5rem;background-repeat:no-repeat;background-position:50% 50%}.status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='140px' height='36px' viewBox='0 0 140 36' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M18,36 C8.0588745,36 0,27.9411255 0,18 C0,8.0588745 8.0588745,0 18,0 C27.9411255,0 36,8.0588745 36,18 C36,27.9411255 27.9411255,36 18,36 Z M70,36 C60.0588745,36 52,27.9411255 52,18 C52,8.0588745 60.0588745,0 70,0 C79.9411255,0 88,8.0588745 88,18 C88,27.9411255 79.9411255,36 70,36 Z M122,36 C112.058875,36 104,27.9411255 104,18 C104,8.0588745 112.058875,0 122,0 C131.941125,0 140,8.0588745 140,18 C140,27.9411255 131.941125,36 122,36 Z' id='Combined-Shape' fill='%23ffffff'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-success .status-timeline__icon{background-color:#09c}.status-timeline__item.-success .status-timeline__icon:empty{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E %3Cpolygon fill='%23ffffff' fill-rule='evenodd' points='19.227 8 13.174 14.053 10.799 11.654 10 12.453 13.174 15.627 19.999 8.8' transform='translate(-10 -8)'/%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-pending .status-timeline__icon{background-color:#8c8c8c}.status-timeline__item.-pending .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='141px' height='156px' viewBox='0 0 141 156' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='two-circling-arrows' fill='%23ffffff' fill-rule='nonzero'%3E %3Cpath d='M35.735,121.521 C22.965,111.248 14.793,95.496 14.793,77.83 C14.793,51.716 32.675,29.838 56.844,23.6 L56.844,9.154 C24.854,15.646 0.776,43.927 0.776,77.83 C0.776,98.781 9.975,117.568 24.543,130.408 C35.819,140.911 42.827,126.894 35.735,121.521 Z M116.589,24.746 C109.409,18.261 98.896,28.774 105.788,33.982 C118.676,44.252 126.931,60.079 126.931,77.83 C126.931,103.948 109.046,125.83 84.879,132.064 L84.879,146.513 C116.869,140.014 140.947,111.737 140.947,77.829 C140.947,56.602 131.502,37.596 116.589,24.746 Z M63.037,35.707 L85.85,22.046 C89.169,20.058 89.176,16.82 85.868,14.818 L62.844,0.883 C59.532,-1.116 56.859,0.393 56.8749285,4.264 L56.999,32.299 C57.009,36.168 59.714,37.695 63.037,35.707 Z M78.883,120.029 L55.856,133.964 C52.545,135.966 52.552,139.203 55.875,141.192 L78.686,154.854 C82.005,156.838 84.716,155.316 84.733,151.442 L84.8530402,123.408 C84.865,119.54 82.188,118.03 78.883,120.029 Z' id='Shape'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-error .status-timeline__icon{background-color:#d00232}.status-timeline__item.-error .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='22px' height='22px' viewBox='0 0 22 22' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='cancel' fill='%23ffffff' fill-rule='nonzero'%3E %3Cpath d='M14.1,11.3 C13.9,11.1 13.9,10.8 14.1,10.6 L21.6,3.1 C21.8,2.9 21.9,2.6 21.9,2.4 C21.9,2.2 21.8,1.9 21.6,1.7 L20.2,0.3 C20,0.1 19.7,0 19.5,0 C19.2,0 19,0.1 18.8,0.3 L11.3,7.8 C11.1,8 10.8,8 10.6,7.8 L3.1,0.3 C2.9,0.1 2.6,0 2.4,0 C2.2,0 1.9,0.1 1.7,0.3 L0.3,1.7 C0.1,1.9 0,2.2 0,2.4 C0,2.6 0.1,2.9 0.3,3.1 L7.8,10.6 C8,10.8 8,11.1 7.8,11.3 L0.3,18.8 C0.1,19 0,19.3 0,19.5 C0,19.7 0.1,20 0.3,20.2 L1.7,21.6 C1.9,21.8 2.2,21.9 2.4,21.9 C2.6,21.9 2.9,21.8 3.1,21.6 L10.6,14.1 C10.8,13.9 11.1,13.9 11.3,14.1 L18.8,21.6 C19,21.8 19.3,21.9 19.5,21.9 C19.7,21.9 20,21.8 20.2,21.6 L21.6,20.2 C21.8,20 21.9,19.7 21.9,19.5 C21.9,19.3 21.8,19 21.6,18.8 L14.1,11.3 Z' id='Path'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");background-size:.5rem .5rem}.status-timeline__item.-warning .status-timeline__icon{background-color:#f1941f}.status-timeline__item.-warning .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='48px' height='228px' viewBox='0 0 48 228' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M24.154,0.005 C36.216,0.005 46.421,6.81 46.421,18.871 C46.421,55.674 42.092,108.558 42.092,145.36 C42.092,154.947 31.577,158.967 24.155,158.967 C14.259,158.967 5.908,154.947 5.907,145.36 C5.907,108.557 1.578,55.673 1.578,18.871 C1.578,6.809 11.474,0.005 24.154,0.005 Z M24.465,180.306 C37.144,180.306 47.97,191.13 47.97,204.12 C47.97,216.8 37.145,227.934 24.465,227.934 C10.857,227.934 0.651,216.8 0.651,204.12 C0.651,191.13 10.858,180.306 24.465,180.306 Z' id='Combined-Shape' fill='%23ffffff' fill-rule='nonzero'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__icon.-anim-rotate{-webkit-animation:icon-rotation 1.2s infinite;animation:icon-rotation 1.2s infinite;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}.status-timeline__heading{margin:0 0 .4em;font-size:1.5em;font-weight:400;font-family:Museo-300;line-height:1.5rem;color:#ccc}.status-timeline__item.-success .status-timeline__heading{color:#09c}.status-timeline__item.-pending .status-timeline__heading{color:#8c8c8c}.status-timeline__item.-error .status-timeline__heading{color:#d00232}.status-timeline__item.-warning .status-timeline__heading{color:#f1941f}.status-timeline__content>:last-child{margin-bottom:0}@keyframes icon-rotation{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}button{cursor:pointer}.u-app-width{width:100%;max-width:920px;margin-left:auto;margin-right:auto;padding-left:var(--spacing-large);padding-right:var(--spacing-large)}.u-text-right{text-align:right}.u-text-center{text-align:center}.u-float-right{float:right}.u-inline-block{display:inline-block;vertical-align:middle}.u-inline-block.-align-bottom{vertical-align:bottom}.u-inline-block.-align-top{vertical-align:top}.u-margin-top-none{margin-top:0}.u-margin-top-small{margin-top:var(--spacing-small)}.u-margin-top-medium{margin-top:var(--spacing-medium)}.u-margin-bottom-small{margin-bottom:var(--spacing-small)}.u-margin-bottom-medium{margin-bottom:var(--spacing-medium)}.u-margin-bottom-large{margin-bottom:var(--spacing-large)}.u-margin-bottom-x-large,.u-mb-2{margin-bottom:var(--spacing-x-large)}.u-margin-top-xx-large{margin-top:var(--spacing-xx-large)}.u-margin-bottom-xx-large{margin-bottom:var(--spacing-xx-large)}.u-margin-right-medium{margin-right:var(--spacing-medium)}.u-margin-left-medium{margin-left:var(--spacing-medium)}.u-margin-left-x-large{margin-left:var(--spacing-x-large)}:host{display:block;box-sizing:border-box}:host *{box-sizing:border-box}`;class _o extends R{static get styles(){return[Co]}static get properties(){return{updateAvailable:{type:Boolean},updating:{type:Boolean},workboxInstance:{type:Object}}}firstUpdated(){this.init()}init(){"serviceWorker"in navigator&&window.addEventListener("load",()=>{this.register()})}register(){this.workboxInstance=new yo("/service-worker-root.js"),this.workboxInstance.addEventListener("waiting",()=>{this.updateAvailable=!0}),this.workboxInstance.addEventListener("installed",e=>{e.isUpdate&&(this.updateAvailable=!0),this.updateAvailable&&this.updateApplication()}),this.workboxInstance.register()}updateApplication(){this.updating=!0,this.workboxInstance.addEventListener("controlling",()=>{window.location.reload()}),this.workboxInstance.messageSW({type:"SKIP_WAITING"})}render(){return c``}}window.customElements.define("register-service-worker",_o);const ko=L`:host{position:fixed;bottom:24px;right:24px;z-index:900;pointer-events:none}.popup{background:#fff;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,.12);padding:12px 14px;width:240px;display:flex;flex-direction:column;gap:6px;pointer-events:auto;opacity:1;transform:translateY(0);transition:opacity .3s ease-out,transform .3s ease-out}@media (prefers-reduced-motion:reduce){.popup{transition:opacity .1s ease-out;transform:none}}.popup.hiding{opacity:0;transform:translateY(20px)}@media (prefers-reduced-motion:reduce){.popup.hiding{transform:none}}.header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:4px}.message{font-size:12px;line-height:1.4;color:#000}.message b{font-weight:600;color:#000}.security-warning{font-size:11px;line-height:1.3;color:#000;margin-top:2px}.close-button{background:0 0;border:none;min-width:24px;min-height:24px;padding:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:#666;font-size:14px;line-height:1;border-radius:4px;transition:color .2s;align-self:flex-start}.close-button:hover{color:#000}.close-button:focus-visible{outline:2px solid #06c;outline-offset:2px}@media (prefers-reduced-motion:reduce){.close-button{transition:none}}@media (max-width:640px){:host{bottom:16px;right:16px}}`;class Ao extends R{static get properties(){return{lastLoginDate:{type:String},visible:{type:Boolean,state:!0}}}constructor(){super(),this.lastLoginDate=null,this.visible=!1,this._autoCloseTimeout=null,this._dismissOnDocumentClick=null,this._installDismissListenerTimeout=null,this._activated=!1}static get styles(){return[ko]}connectedCallback(){super.connectedCallback(),this.lastLoginDate&&this._activate()}updated(e){var t;(t=super.updated)==null||t.call(this,e),e.has("lastLoginDate")&&!e.get("lastLoginDate")&&this.lastLoginDate&&this.isConnected&&!this._activated&&queueMicrotask(()=>{this.isConnected&&!this._activated&&this._activate()})}_activate(){this._activated=!0,this.visible=!0,this._autoCloseTimeout=setTimeout(()=>{this.hide()},15e3),this._dismissOnDocumentClick=()=>this.hide(),this._installDismissListenerTimeout=setTimeout(()=>{document.addEventListener("pointerdown",this._dismissOnDocumentClick,!0)},0)}disconnectedCallback(){super.disconnectedCallback(),this._autoCloseTimeout&&clearTimeout(this._autoCloseTimeout),this._installDismissListenerTimeout&&clearTimeout(this._installDismissListenerTimeout),this._dismissOnDocumentClick&&(document.removeEventListener("pointerdown",this._dismissOnDocumentClick,!0),this._dismissOnDocumentClick=null)}hide(){this.visible=!1,setTimeout(()=>{this.remove()},300)}handleClose(){this._autoCloseTimeout&&clearTimeout(this._autoCloseTimeout),this.hide()}render(){if(!this.lastLoginDate)return c``;const e=this.visible?"":"hiding";return c` <div class="popup ${e}" role="status" aria-live="polite"> <div class="header"> <div class="message"> <b>Last Login:</b><br> ${Qe(this.lastLoginDate)} </div> <button class="close-button" @click="${this.handleClose}" aria-label="Close notification" type="button"> ✕ </button> </div> <div class="security-warning"> If this wasn't you, please reset the password immediately. </div> </div> `}}window.customElements.define("last-login-popup",Ao);const Eo=(i,e)=>{if(!e)throw new Error("Account number is not available in the token.");const t=No(i,e),o=ge.filter(r=>t.includes(r.label));o.length>0&&(o.find(r=>r.label===ne)||o.unshift(ge.find(r=>r.label===ne)),!(o.length===1&&o[0].label===ne)&&!o.find(r=>r.label===fe)&&o.push(ge.find(r=>r.label===fe))),o.length===1&&o[0].label===ne&&o.pop();const{emeaPortalAccountNumber:a,marketPlacePortalAccountNumber:n}=it(i,e);return o.map(r=>{let s=`${r.href}?selected_account_number=${e}`;return r.label===me&&(s=`${r.href}?selected_account_number=${a}`),r.label===ae&&(s=ot(r,n)),r.label===fe&&(s=r.href),{...r,href:s}})},it=(i,e)=>{const t=at(i,e),o=nt(t,e);let a,n;return o&&o.portal===me?a=o.accountNumber:a=ke(t,me)||e,o&&o.portal===ae?n=o.accountNumber:n=ke(t,ae)||e,{emeaPortalAccountNumber:a,marketPlacePortalAccountNumber:n}},ot=(i,e)=>{var t;const o=new URL(i.href);o.searchParams.set("selected_account_number",e);const a=d=>d.toLowerCase().replace(/\/+$/,""),n=a(window.location.pathname),{pathAndQuerystring:r}=window.registeredApps["ui-gom"],s=d=>{const f=a(d.path);return n===f||n.startsWith(f+"/")},l=r.find(s),u=(t=l==null?void 0:l.mppProcessQueryString)!=null?t:null;return o.searchParams.delete("process"),u&&o.searchParams.set("process",u),o.toString()},at=(i,e)=>{if(!e)return null;function t(a){for(const n of a){if(n.accountNumber.toLowerCase()===e.toLowerCase())return n;if(n.subAccounts&&n.subAccounts.length>0){const r=t(n.subAccounts);if(r)return{...n,subAccounts:[r]}}}return null}return i.find(a=>a.accountNumber.toLowerCase()===e.toLowerCase())||t(i)},ke=(i,e)=>{if(!i)return null;if(i.portal===e)return i.accountNumber;if(i.subAccounts&&i.subAccounts.length>0)for(const t of i.subAccounts){const o=ke(t,e);if(o)return o}return null},No=(i,e)=>{const t=at(i,e);if(!t)return[];const o=new Set;function a(n){var r;o.add(n.portal),(r=n.subAccounts)!=null&&r.length&&n.subAccounts.forEach(s=>{a(s)})}return a(t),Array.from(o)},nt=(i,e)=>{if(!i)return null;if(i.accountNumber.toLowerCase()===e.toLowerCase())return i;if(i.subAccounts&&i.subAccounts.length>0)for(const t of i.subAccounts){const o=nt(t,e);if(o)return o}return null};var So=Object.defineProperty,To=(i,e,t)=>e in i?So(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Mo=(i,e,t)=>To(i,e+"",t);const rt=class st{constructor(){if(this.registered=!1,this.appInsightsReady=!1,this.queue=[],window[we.appInsights])this.appInsightsReady=!0;else{const e=()=>{this.appInsightsReady=!0,this.processQueue(),window.removeEventListener("appInsightsInitialized",e)};window.addEventListener("appInsightsInitialized",e)}}isBatched(){return!1}getIgnoreUrls(){return[]}send(e){Array.isArray(e)?e.forEach(t=>this.buildTelemetry(t)):this.buildTelemetry(e)}processQueue(){for(;this.queue.length>0;){const e=this.queue.shift();this.buildTelemetry(e)}}buildTelemetry(e){var t,o,a,n,r,s,l,u,d;if(e.type!=="measurement")return;if(!this.appInsightsReady||!window[we.appInsights]){this.queue.push(e);return}const{payload:f,meta:w}=e,y={application:Bt,sessionId:(t=w.session)==null?void 0:t.id,pageUrl:(o=w.page)==null?void 0:o.url,browserName:(a=w.browser)==null?void 0:a.name,browserVersion:(n=w.browser)==null?void 0:n.version,browserOs:(r=w.browser)==null?void 0:r.os,measurementId:(s=f.context)==null?void 0:s.id,rating:(l=f.context)==null?void 0:l.rating,navigationType:(u=f.context)==null?void 0:u.navigation_type,navigationEntryId:(d=f.context)==null?void 0:d.navigation_entry_id};Object.keys(y).forEach(M=>{y[M]===void 0&&delete y[M]}),Object.entries(e.payload.values).forEach(([M,lt])=>{if(st.VALID_METRICS.includes(M)){const ct=`global-portal-${M}`;window[we.appInsights].trackMetric({name:ct,average:lt},y)}})}register(){if(this.registered)return;const e=()=>window.faro?(window.faro.transports.add(this),this.registered=!0,!0):!1;if(e())return;let t=0;const o=5,a=setInterval(()=>{t+=1,(e()||t>=o)&&(clearInterval(a),t>=o&&console.warn("Faro SDK not detected after maximum attempts"))},400)}};Mo(rt,"VALID_METRICS",["cls","lcp","fcp","time_to_first_byte"]);let $o=rt;var Lo=Object.defineProperty,Io=(i,e,t)=>e in i?Lo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,E=(i,e,t)=>Io(i,typeof e!="symbol"?e+"":e,t);window.registeredApps["ui-user-management"].enabled&&import("@digital-realty/ui-user-management/ui-user-management.js"),window.registeredApps["ui-service-management"].enabled&&import("@digital-realty/ui-service-management/ui-service-management.js"),window.registeredApps["ui-gom"].enabled&&import("http://localhost:8090/ui-mfe-gom.js"),(window.registeredApps["ui-inventory"].enabled||window.registeredApps["ui-sites"].enabled)&&import("@digital-realty/ui-inventory/ui-inventory.js"),window.registeredApps["ui-launchpad"].enabled&&import("@digital-realty/ui-launchpad/ui-launchpad.js"),window.registeredApps["ui-dcim-charts"].enabled&&import("@digital-realty/ui-mfe-dcim/ui-mfe-dcim.js"),window.registeredApps["ui-dcim-reports"].enabled&&import("@digital-realty/ui-mfe-reports/ui-mfe-reports.js"),window.registeredApps["ui-my-account"].enabled&&import("@digital-realty/ui-my-account/ui-my-account.js"),window.registeredApps["ui-esg"].enabled&&import("http://localhost:8091/ui-mfe-esg.js"),window.getAppVersions=Hi;class Do extends ${constructor(){super(),E(this,"checkActivityInterval",1e4),E(this,"inactiveDuration",9e5),E(this,"accounts",[]),E(this,"timeoutController",new ut(this,()=>(this.detectLoggedOut(),g.compareLastActive(this.inactiveDuration)),()=>{g.showAutoLogout||(g.showAutoLogout=+new Date)},g.hydrateStore,this.checkActivityInterval)),E(this,"_clearSessionKeys",()=>{sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),sessionStorage.removeItem("accountSelection:selectedAccount")}),E(this,"_initQualtricsDataLayer",()=>{window._setQualtricsDataLayer=_t,window.addEventListener("setQualtricsDataLayer",this._pushQualtricsData)}),E(this,"_pushQualtricsData",e=>{window.dataLayer=window.dataLayer||[];const{dataLayer:t}=window,o=t.length>0?t[t.length-1]:null,a={event:"qualtrics",...e.detail};(o==null?void 0:o.event)==="qualtrics"&&Object.keys(a).every(n=>o[n]===a[n])||window.dataLayer.push(a)}),E(this,"anAppIsActive",()=>this.isDashboardActive||!!Vi(window.location.pathname)),E(this,"renderApps",()=>c` ${this.isDashboardActive&&this.isMfeEnabled("ui-launchpad")?c` <ui-launchpad></ui-launchpad> `:b} ${this.isMfeEnabled("ui-my-account")?c` <div class="${this.isAccActive?"":"zero-width-height"}"> <ui-my-account baseUrl="/my-account"></ui-my-account> </div> `:b} ${this.isMfeEnabled("ui-service-management")?c` <div class="${this.isSMActive?"":"zero-width-height"}"> <ui-service-management baseUrl="/service-management"></ui-service-management> </div> `:b} ${this.isMfeEnabled("ui-gom")?c` <div class="${this.isGOMActive?"":"zero-width-height"}"> <ui-mfe-gom></ui-mfe-gom> </div> `:b} ${this.isMfeEnabled("ui-user-management")?c` <div class="${this.isUMActive?"":"zero-width-height"}"> <ui-user-management data-theme="ix-theme" baseUrl="/user-management"></ui-user-management> </div> `:b} ${this.isMfeEnabled("ui-sites")?c` <div class="${this.isSITEActive?"":"zero-width-height"}"> <ui-inventory data-theme="ix-theme" baseUrl="${window.registeredApps["ui-sites"].path}"></ui-inventory> </div> `:b} ${this.isMfeEnabled("ui-knowledge-base")?c` ${this.isKBActive?c` <iframe title="Knowledge Base" class="w-full h-full" src="${this.knowledgeBaseIframeURL}"></iframe> `:b} `:b} ${this.isMfeEnabled("ui-dcim-charts")?c` <div class="${this.isDCIMChartsActive?"":"zero-width-height"}"> <ui-mfe-charts class="md:mx-4 lg:mx-0 block" baseUrl="${window.registeredApps["ui-dcim-charts"].path}"></ui-mfe-charts> </div> `:b} ${this.isMfeEnabled("ui-dcim-reports")?c` <div class="${this.isDCIMReportsActive?"":"zero-width-height"}"> <ui-mfe-reports class="md:mx-4 lg:mx-0 block" baseUrl="${window.registeredApps["ui-dcim-reports"].path}"></ui-mfe-reports> </div> `:b} ${this.isMfeEnabled("ui-esg")?c` <div class="${this.isESGActive?"":"zero-width-height"}"> <ui-mfe-esg></ui-mfe-esg> </div> `:b} `),E(this,"_handleAutoLogoutClose",()=>{this.detectLoggedOut(!0),g.showAutoLogout=0,this.timeoutController.setInterval()}),E(this,"_setAllCookies",(e,t)=>{const o=Object.keys(re).map(a=>({cookie_name:re[a],cookie_version:be,accepted:e,user_action:t}));this.isCookieExpired=!1,this.revokedConsent=!1,this._processTargetingCookieChange(o),this._processPerformanceCookieChange(o),g.cookiesAccepted=o,je(o),this.revokedConsent&&window.location.reload()}),E(this,"_processTargetingCookieChange",e=>{}),E(this,"_processPerformanceCookieChange",e=>{var t;const o=(t=e.find(a=>a.cookie_name===re.performance))==null?void 0:t.accepted;this._getCookieConsent("performance")!==o&&(window.dataLayer&&window.dataLayer.push({event:"cookie_consent",cookieConsentPerformance:o}),o||(Oi(),this.revokedConsent=!0))}),E(this,"_checkForCookieExpiry",()=>{if(!g.cookiesAccepted)return;const e=Date.now();g.cookiesAccepted.forEach(t=>{(new Date(t.expires).getTime()<e||t.cookie_version!==be)&&(this.isCookieExpired=!0)})}),this.appReady=!1,this.compact=!0,this.isAppVersionsVisible=!1,this.isCustomiseCookiesVisible=!1,this.isCookieExpired=!1,this.revokedConsent=!1,this.processingConsent=!1,localStorage.setItem("compact",!0),window._setQualtricsDataLayer=()=>{},sessionStorage.setItem(pe.SessionStorage.HasOutstandingChanges,"false")}detectLoggedOut(e){if(!Ut()){const t=window.location.pathname;if(t==="/session-expired"||t==="/authenticate")return!1;sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),sessionStorage.removeItem("accountSelection:selectedAccount"),window.location.href=e?"/logout?isIdle=true":"/logout"}return!0}connectedCallback(){super.connectedCallback(),this.pageWidthElem=this.querySelector("#page-width"),this.intraPortalNavbarItems=[],window.addEventListener("keydown",g.setLastActive),window.addEventListener("click",g.setLastActive),window.addEventListener("scroll",g.setLastActive),window.addEventListener("touchstart",g.setLastActive),Ri(),window.addEventListener("accountsloaded",this.filterIntraNavBarItems.bind(this)),window.addEventListener("beforeunload",this._clearSessionKeys)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",g.setLastActive),window.removeEventListener("click",g.setLastActive),window.removeEventListener("scroll",g.setLastActive),window.removeEventListener("touchstart",g.setLastActive),window.removeEventListener("beforeunload",this._clearSessionKeys),window.removeEventListener("accountsloaded",this.filterIntraNavBarItems),window.removeEventListener("setQualtricsDataLayer",this._pushQualtricsData)}checkAccountExists(e,t){var o;let a=null;for(const n of t){if(n.accountNumber.toLowerCase()===e.toLowerCase()||((o=n.parentAccountNumber)==null?void 0:o.toLowerCase())===e.toLowerCase()){a=n;break}if(n.subAccounts&&n.subAccounts.length>0&&(a=this.checkAccountExists(e,n.subAccounts),a))break}return a}async detectQueryParamsAndSwitchAccount(){const e=new URLSearchParams(window.location.search),t=e.get("selected_account_number");if(t!=null){const o=await H({page_size:1,account_number:t}),a=this.checkAccountExists(t,o.items);e.delete("selected_account_number");let n=window.location.origin+window.location.pathname;const r=e.toString();if(r&&(n+=`?${r}`),window.history.replaceState({},"",n),a)if(a.parentAccountNumber){const s=this.checkAccountExists(a.parentAccountNumber,o.items);s&&await de(s.accountNumber)}else await de(a.accountNumber)}}static get properties(){return{appTitle:{type:String},currentPath:{type:String},compact:{type:Boolean,reflect:!0},isAppVersionsVisible:{type:Boolean},isCustomiseCookiesVisible:{type:Boolean},isCookieExpired:{type:Boolean},intraPortalNavbarItems:{type:Array}}}static get styles(){return[qe,kt,A,qi]}update(e){this.appReady=this.anAppIsActive(),super.update(e)}async firstUpdated(){if(!jt())return;await g.hydrateStore(),g.setLastActive(),g.showAutoLogout=0,await g.hydrateStore(),this.timeoutController.setInterval(),window.addEventListener(I.VaadinRouterLocationChanged,()=>{var a,n;if((a=this.intraPortalNavbarItems)!=null&&a.length){const r=K(),{marketPlacePortalAccountNumber:s}=it(this.accounts,(n=r==null?void 0:r.profile)==null?void 0:n.account_number);this.intraPortalNavbarItems=this.intraPortalNavbarItems.map(l=>l.label===ae?{...l,href:ot(l,s)}:l)}this.requestUpdate()}),await dt.hydrateStore();const e=await Pi();this.saveDateTimeFormatToLocalStorage(e),this._showLastLoginPopupIfNeeded(),this.detectQueryParamsAndSwitchAccount(),this._checkForCookieExpiry();const t=this._getCookieConsent("targeting"),o=this._getCookieConsent("performance");if(o||zi(),window.dataLayer){t&&this._getAccountDetails();const a={};(t||o)&&window.dataLayer.push({event:"cookie_consent",cookieConsentPerformance:o,...a})}new $o().register()}_getAccountDetails(){var e,t;const o=(e=JSON.parse(localStorage.getItem(Me)||{}))==null?void 0:e.profile,{account_number:a,hashed_identifier:n}=o!=null?o:{},r=(t=JSON.parse(localStorage.getItem(qt)||"{}"))==null?void 0:t.name;return{account_number:a,hashed_identifier:n,user_name:r}}_getCookieConsent(e){const t=g.cookiesAccepted.find(o=>o.cookie_name===re[e]);return t==null?void 0:t.accepted}saveDateTimeFormatToLocalStorage(e){localStorage.setItem(Se,JSON.stringify({preferredDateFormat:e.preferredDateFormat,preferredTimeFormat:e.preferredTimeFormat,preferredTimezone:e.preferredTimezone})),this.dispatchEvent(new CustomEvent("dateFormatChanged",{bubbles:!0,composed:!0}))}_showLastLoginPopupIfNeeded(){try{if(sessionStorage.getItem("show-last-login-popup")!=="true")return;sessionStorage.removeItem("show-last-login-popup");const e=Te();if(!e)return;const t=document.createElement("last-login-popup");t.lastLoginDate=e,document.body.appendChild(t)}catch(e){console.error("Error showing last login popup:",e)}}async filterIntraNavBarItems(){var e;if(this.accounts.length>0)return!1;const t=await H();this.accounts=t.items;const o=K(),a=(e=o==null?void 0:o.profile)==null?void 0:e.account_number;this.intraPortalNavbarItems=Eo(this.accounts,a)}get isDashboardActive(){return window.location.pathname==="/"}get isAccActive(){return window.location.pathname.startsWith(window.registeredApps["ui-my-account"].path)}get isSMActive(){return window.location.pathname.startsWith(window.registeredApps["ui-service-management"].path)}get isGOMActive(){return(window.registeredApps["ui-gom"].path||[]).some(e=>window.location.pathname.startsWith(e))}get isESGActive(){return window.location.pathname.startsWith(window.registeredApps["ui-esg"].path)}get isUMActive(){return window.location.pathname.startsWith(window.registeredApps["ui-user-management"].path)}get isKBActive(){return window.location.pathname.startsWith(window.registeredApps["ui-knowledge-base"].path)}get isUIActive(){return window.location.pathname.startsWith(window.registeredApps["ui-inventory"].path)}get isSITEActive(){return window.location.pathname.startsWith(window.registeredApps["ui-sites"].path)}get isDCIMChartsActive(){return window.location.pathname.startsWith(window.registeredApps["ui-dcim-charts"].path)}get isDCIMReportsActive(){return window.location.pathname.startsWith(window.registeredApps["ui-dcim-reports"].path)}get isCPActive(){return window.location.pathname.startsWith(window.registeredApps[Gt].path)}get knowledgeBaseIframeURL(){const e=window.location.pathname.replace(window.registeredApps["ui-knowledge-base"].path,"");return`${Wt}${e}`}get intraportalNavItems(){return this.intraPortalNavbarItems}isMfeEnabled(e){var t;return(t=window.registeredApps[e])==null?void 0:t.enabled}waitForElement(){return new Promise(e=>{new MutationObserver((t,o)=>{const a=this.shadowRoot.querySelector("app-shell-header").shadowRoot.querySelector("account-selection");a&&(o.disconnect(),e(a))}).observe(document.body,{childList:!0,subtree:!0})})}toggleCompact(e){const{isCompact:t}=e.detail;if(t!==void 0){t!==this.compact&&(this.compact=t,localStorage.setItem("compact",`${this.compact}`));return}this.compact=!this.compact,localStorage.setItem("compact",`${this.compact}`)}render(){return this.appReady?this.isCPActive?c`<ix-cookie-policy></ix-cookie-policy>`:c` <div id="page-width"></div> ${b} <div class="fixed inset-0 bg-black opacity-50 z-20 ${this.compact?"hidden":"block"} lg:hidden" @click="${this.toggleCompact}" @keypress="${this.toggleCompact}"></div> <div class="animate-width grid-rows-[min-content] grid grid-cols-1 lg:grid-rows-none lg:grid-cols-[var(--left-bar-width)_minmax(0,auto)] min-h-[--body-height]"> <app-shell-navigation-bar .showAppVersions="${()=>this.isAppVersionsVisible=!0}" .showCustomiseCookies="${()=>this.isCustomiseCookiesVisible=!0}" @toggle-menu="${this.toggleCompact}" ?compact="${this.compact}" class="block drop-shadow-lg relative z-30"></app-shell-navigation-bar> <div class="flex flex-col grow h-full"> <div class="sticky top-0 z-[5]" style="top:var(--intraportal-nav-height,0)"> <app-shell-header></app-shell-header> <register-service-worker></register-service-worker> </div> <main class="grow lg:mx-0 pb-4 lg:px-4 lg:pl-12" id="mfeContainer"> ${this.renderApps()} </main> </div> </div> <ix-notifications style="--md-icon-button-icon-size:29px" data-theme="ix-theme" baseApiUrl="${Kt}" localStorageKey="${Me}"></ix-notifications> ${c` <ix-cookie-dialog ?open="${this.isCustomiseCookiesVisible}" selection="${!g.cookiesAccepted||g.cookiesAccepted.length===0?null:g.cookiesAccepted[0].user_action==="accept_all"?!0:g.cookiesAccepted[0].user_action==="customize"?JSON.stringify(g.cookiesAccepted.reduce((e,t)=>({...e,[t.cookie_name]:t.accepted}),{})):!1}" @closed="${()=>{this.isCustomiseCookiesVisible=!1}}" @accept-all="${()=>{this.processingConsent||(this.processingConsent=!0,this._setAllCookies(!0,Z.accept),setTimeout(()=>{this.processingConsent=!1},10))}}" @reject-all="${()=>{this.processingConsent||(this.processingConsent=!0,this._setAllCookies(!1,Z.reject),setTimeout(()=>{this.processingConsent=!1},10))}}" @accept-some="${e=>{if(this.processingConsent)return;this.processingConsent=!0;const t=e.detail,o=Object.keys(t).map(a=>({cookie_name:a,cookie_version:be,accepted:t[a],user_action:Z.custom}));this.revokedConsent=!1,this._processTargetingCookieChange(o),this._processPerformanceCookieChange(o),g.cookiesAccepted=o,je(o),this.isCookieExpired=!1,this.revokedConsent&&window.location.reload(),setTimeout(()=>{this.processingConsent=!1},10)}}" policy-url="${$e}"></ix-cookie-dialog> <ix-cookie-banner ?hidden="${!((!g.cookiesAccepted||g.cookiesAccepted.length===0||this.isCookieExpired)&&!this.isCustomiseCookiesVisible)}" @accept-all="${()=>{this._setAllCookies(!0,Z.accept)}}" @reject-all="${()=>{this._setAllCookies(!1,Z.reject)}}" @no-sell="${()=>{this._setAllCookies(!1,Z.no)}}" @customise-cookies="${()=>{this.isCustomiseCookiesVisible=!0}}" policy-url="${$e}"></ix-cookie-banner> `} <ix-toasters></ix-toasters> <ix-tooltip></ix-tooltip> <ix-app-versions @closed="${()=>this.isAppVersionsVisible=!1}" ?isVisible="${this.isAppVersionsVisible}" .versionsRequest="${Be}"></ix-app-versions> <ix-auto-logout-dialog .externalCheck="${async()=>{await g.getStoredData(),await g.hydrateStore(),g.lastActive===-1&&(window.location.href="/logout")}}" .timeoutAction="${async()=>{await g.getStoredData(),await g.hydrateStore(),g.showAutoLogout!==0&&(window.location.href="/logout?isIdle=true")}}" opened-at="${g.showAutoLogout}" @closed="${this._handleAutoLogoutClose}" ?open="${g.showAutoLogout>0}"></ix-auto-logout-dialog> `:c``}}window.customElements.define("global-portal-app",Do);
package/dist/bootstrap.js CHANGED
@@ -1 +1 @@
1
- import{__decorate as C}from"tslib";import{LitElement as S,html as c}from"lit";import{property as I}from"lit/decorators.js";import{ApplicationInsights as W,DistributedTracingModes as q}from"@microsoft/applicationinsights-web";import{authedUser as R}from"@digital-realty/ix-account-switcher";import{UserManager as Q}from"oidc-client-ts";import"@digital-realty/ix-app-logic/views/splash-screen.js";import{makeObservable as Z,action as ee,observable as te,toJS as se}from"mobx";const T="planbglobalportalui",ae="openid service_management_profile offline_access user_management_profile resource.notifications resource.usermanagementapi resource.servicemanagementapi resource.inventory resource.cookieconsents",O="https://login-a1.digitalrealty.com",re="https://inxn-a1-gpappshell.azureedge.net/?logout=true",P="https://api-a1.interxion.com",ne="",oe="local",ie="GTM-KXBK8CQP",ce=24,le="https://api-a1.interxion.com",pe="ui-ticket-updates-accessAt,ix-grid-,-grid,app-state,releaseNotesViewed",ue="https://gp-dev.digitalrealty.com/standalone/knowledge-base",de="https://portal.interxion.com",_e="https://inxn-a1-gpappshell.azureedge.net",Ee="https://demo.servicefabric.digitalrealty.com/",me="https://marketplaceportal.com/group/telx-new-portal",he="gp-uat.digitalrealty.com,app.humblytics.com",ge=!1,Ae="/cookie-policy",Ce="1.0",Se={strict:"strictly_necessary",performance:"performance",targeting:"targeting"},Ie={accept:"accept_all",reject:"reject_all",custom:"customize",no:"no_sell"},N="globalportalappshell",l="user-authentication",d="redirect-url",Re="ui-cookie-policy",Te="date-format",f="Global Portal",w="Service Fabric",L="Marketplace Portal",b="EMEA Customer Portal",Oe="x-auth",[p,Pe,Ne,fe]=["CREATE","UPDATE","READ","APPROVE"],[y,_,we,Le,v,be,wt,ye,U,Lt,ve,Ue,k,x,M,bt,ke,yt,xe,D,V,G,Me,B,De,Ve,H,Ge]=["Cloud Connect","Cross Connect","Custom Roles","Customer Care","Customer Equipment Connection (CEC)","Customer Support","DCIM-enabled location data","Default System Roles","External User","Facility Access","Internal Roles","Internal User","Internet Exchange","Intra-Customer Connectivity (ICC)","IP Bandwidth","OSP Access","Permanent Badge","PoP/POE Room Access","Remote Hands","Remote Hands Package","Service Exchange Cloud Router","Service Exchange Port","Shipping & Receiving","Space & Power","Trouble Ticket","Visitor Access","User","ESG Reporting"],Be=[xe,be,De,Me,Ve,ke,Le],He=[_,y,v,k,x,M,D,V,G,B],je=[_,y,v,k,x,M,D,V,G,B],Fe={LocationChanged:"location-changed",VaadinRouterLocationChanged:"vaadin-router-location-changed",CreateUserClicked:"create-user-clicked"},Ke={SessionStorage:{HasOutstandingChanges:"hasOutstandingChanges"}},[$e,Ye,ze]=["Security","DCIM","Planned Site Maintenance"],Xe=[$e,Ye,ze],Je=[{label:f,href:_e,selected:!0},{label:L,href:me},{label:b,href:de},{label:w,href:Ee,target:"_blank"}],j={appInsights:"_appInsights"},We=()=>{const e=new W({config:{instrumentationKey:ne,enableCorsCorrelation:!0,enableRequestHeaderTracking:!0,enableResponseHeaderTracking:!0,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,enableAjaxErrorStatusText:!0,enableAjaxPerfTracking:!0,enableUnhandledPromiseRejectionTracking:!0,isCookieUseDisabled:!0,distributedTracingMode:q.AI_AND_W3C,correlationHeaderExcludedDomains:he.split(",").map(t=>t.trim())}});return e.loadAppInsights(),e.trackPageView(),e.addTelemetryInitializer(t=>{t.tags["ai.cloud.role"]=N}),e},u=(e,t,s)=>(...a)=>{const[r,...n]=a;typeof r=="string"&&r.startsWith("[mobx]")&&t===4?s.trackException({exception:{message:n[0].message,stack:n[0].stack,name:r},severityLevel:4}):s.trackTrace({severityLevel:t,message:r},n),e.apply(console,[r,...n])},qe=e=>{console.log=u(console.log,2,e),console.info=u(console.info,2,e),console.warn=u(console.warn,3,e),console.error=u(console.error,4,e),window.console=console},Qe=()=>{const e=We();window[j.appInsights]=e,window.dispatchEvent(new Event("appInsightsInitialized")),qe(e)},F=async e=>{const t=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(s)).map(a=>a.toString(16).padStart(2,"0")).join("")};function Ze(){const{location:e}=window,t=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`;return{authority:O,client_id:T,redirect_uri:`${t}/auth-callback`,response_type:"code",scope:ae,post_logout_redirect_uri:re,monitorSession:!1}}const E=new Q(Ze()),et=e=>{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(window.atob(t).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(s)},tt=()=>{localStorage.removeItem(l)},i=()=>{const e=localStorage.getItem(l);return e?JSON.parse(e):null},st=async()=>{const e=i();if(!e)return null;const t=(e.profile.given_name||"")+(e.profile.family_name||"")+e.profile.sub;return await F(t)},K=()=>{const e=i();return e?e.id_token:null},$=(e,t)=>{const s={...t,...e},a=et(e.access_token);return s.profile.sub=a.sub,s.profile.account_number=a.account_number,s.expires_at=a.exp,s.is_federated=a.is_federated,R.setAccount({accountNumber:a.account_number,email:a.email,name:a.name,givenName:a.given_name,familyName:a.family_name,authTime:a.exp,accessToken:e.access_token,idToken:e.id_token}),localStorage.setItem(l,JSON.stringify(s)),s},at=e=>{$(e,null)},rt=()=>{const e=i();return e?e.access_token:null},nt=()=>{const e=i();return e&&e.is_federated!==null&&e.is_federated!==void 0?String(e.is_federated).toLowerCase()==="true":!1},ot=()=>{const e=i();return e!=null&&e.expires_at?e.expires_at>Date.now()/1e3:!1},it=["authenticate","auth-callback","logout"],ct=e=>e.expires_at&&new Date(e.expires_at*1e3),lt=e=>e.expires_at&&new Date(e.expires_at*1e3+ce*60*60*1e3),Y=()=>{const e=i();if(!K())return!0;if(!e.expires_at)return!1;const t=new Date;return navigator.onLine?t>ct(e):t>lt(e)},pt=()=>{const e=window.location.pathname.split("/");return it.includes(e[e.length-1])},ut=()=>{const e=window.location.pathname.split("/");return e[e.length-1]==="authenticate"?(E.signinRedirect(),!0):!1},dt=()=>{let e="/";const t=localStorage.getItem(d);t&&(localStorage.removeItem(d),e=t),window.location.href=e},_t=e=>{if(!e.id_token)throw new Error("Missing property:id_token");return e},m=e=>{const t=pt();(!t||e)&&(t||localStorage.setItem(d,window.location.href),window.location.href="/authenticate")},Et=async e=>{const t=`${e.profile.sub}-${e.profile.customer_id}`,s=await F(t);return{...e,profile:{...e.profile,hashed_identifier:s}}},mt=()=>{const e=window.location.pathname.split("/");return e[e.length-1]==="auth-callback"?(E.signinRedirectCallback().then(_t).then(Et).then(at).then(dt).catch(m),!0):!1};class ht extends S{render(){return c` <ix-splash-screen></ix-splash-screen> `}}window.customElements.define("splash-screen",ht);var gt=Object.defineProperty,At=(e,t,s)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,h=(e,t,s)=>At(e,typeof t!="symbol"?t+"":t,s);class Ct{constructor(){h(this,"permissions",[]),h(this,"loading",!1),h(this,"getPermissions",async()=>{var t;const s=(t=R)==null?void 0:t.access_token;if(!s)return[];const a=await fetch(`${P}/usermanagement/my-permissions?exclude_parents=false&exclude_siblings=true`,{headers:{Authorization:`Bearer ${s}`}});return a.ok?a.json():[]}),Z(this,{permissions:te,setPermissions:ee})}setPermissions(t){this.permissions=t.reduce((s,a)=>(s[a.permission_name]=a.privilege,s),{})}tryLoadPermissions(){try{this.loading||(this.loading=!0,this.getPermissions().then(t=>{this.setPermissions(t),this.loading=!1}).catch(()=>{this.loading=!1}))}catch(t){this.loading=!1}}clearPermissions(){this.setPermissions([])}hasExternalUserCreate(){return this.hasPermission(U,p)||this.hasPermission(H,p)}hasConnectivityCreate(){return this.hasPermission(_,p)}hasPrivilegeLevel(t,s){const a=[fe,p,Pe,Ne],r=a.findIndex(o=>o===t),n=a.findIndex(o=>o===s);return r>=n}hasPermission(t,s){let a=!1;const r=se(this.permissions),n=Object.keys(r).find(o=>o===t);return n&&(a=this.hasPrivilegeLevel(s,r[n])),a}}const g=new Ct;class A extends S{constructor(){super(),this._currentView="splash",this.appLoaded=!1,this._onPopState=()=>{Y()&&m()};try{Qe()}catch(s){console.error("Telemetry initialization failed:",s)}const t=window.location.pathname;if(t==="/session-expired"){this._currentView="session-expired",this._loadView("session-expired");return}if(t==="/logout"){this._currentView="logout",this._loadView("logout");return}if(ut()||mt()){this._currentView="splash";return}if(Y()){this._currentView="splash",m();return}this._currentView="app",this._loadApp()}async _loadView(t){t==="session-expired"?await import("@digital-realty/ix-app-logic/views/session-expiry.js"):t==="logout"&&await import("./logout-DwQJmwiJ.js")}connectedCallback(){super.connectedCallback(),window.addEventListener("popstate",this._onPopState)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this._onPopState)}_getAccountNumber(){var t,s,a;return(a=new URLSearchParams(window.location.search).get("selected_account_number"))!=null?a:(s=(t=i())==null?void 0:t.profile)==null?void 0:s.account_number}_isESGAccessOnly(t,s){const a=t.filter(r=>r.account_number===s);return a.length===1&&a[0].permission_name==="ESG Reporting"}_applyMfeOverrides(t,s){const a={};for(const r of Object.keys(t))a[r]={...t[r],enabled:s.includes(r)};return a}async _loadApp(){var t;const{authedUser:s}=await import("@digital-realty/ix-account-switcher");await s.hydrateStore();const[a,r]=await Promise.allSettled([fetch("./registered-apps.json").then(J=>J.json()),g.getPermissions()]);if(a.status==="rejected"){console.error("Failed to load registered apps:",a.reason);return}if(r.status==="rejected"){console.error("Failed to load permissions:",r.reason);return}const{registeredApps:n}=a.value,o=r.value,z=(t=this._getAccountNumber())!=null?t:"",X=this._isESGAccessOnly(o,z)?this._applyMfeOverrides(n,["ui-esg"]):n;window.registeredApps=Object.freeze(X),g.setPermissions(o),await import("./app-OlnjR9CM.js"),this.appLoaded=!0}render(){switch(this._currentView){case"session-expired":return c`<ix-session-expiry></ix-session-expiry>`;case"logout":return c`<ixp-logout></ixp-logout>`;case"app":return this.appLoaded?c`<global-portal-app appTitle="DLR" showDrawer></global-portal-app>`:c`<splash-screen></splash-screen>`;default:return c`<splash-screen></splash-screen>`}}}C([I({type:String})],A.prototype,"_currentView",void 0),C([I({type:Boolean})],A.prototype,"appLoaded",void 0),window.customElements.define("gp-bootstrap",A);export{P as A,Se as B,we as C,ye as D,oe as E,Te as F,ie as G,Re as H,He as I,Ae as J,ue as K,O as L,L as M,le as N,je as O,pe as P,Ie as Q,Xe as R,Be as S,Ce as T,H as U,ge as a,st as b,tt as c,rt as d,i as e,$ as f,K as g,T as h,Fe as i,nt as j,Ke as k,Ge as l,Ue as m,U as n,ve as o,g as p,b as q,Je as r,f as s,w as t,E as u,j as v,N as w,ot as x,l as y,Oe as z};
1
+ import{__decorate as S}from"tslib";import{LitElement as C,html as c}from"lit";import{property as I}from"lit/decorators.js";import{ApplicationInsights as W,DistributedTracingModes as q}from"@microsoft/applicationinsights-web";import{authedUser as R}from"@digital-realty/ix-account-switcher";import{UserManager as Q}from"oidc-client-ts";import"@digital-realty/ix-app-logic/views/splash-screen.js";import{makeObservable as Z,action as ee,observable as te,toJS as se}from"mobx";const T="planbglobalportalui",ae="openid service_management_profile offline_access user_management_profile resource.notifications resource.usermanagementapi resource.servicemanagementapi resource.inventory resource.cookieconsents",O="https://login-a1.digitalrealty.com",re="https://inxn-a1-gpappshell.azureedge.net/?logout=true",P="https://api-a1.interxion.com",oe="",ne="local",ie="GTM-KXBK8CQP",ce=24,le="https://api-a1.interxion.com",pe="ui-ticket-updates-accessAt,ix-grid-,-grid,app-state,releaseNotesViewed",ue="https://gp-dev.digitalrealty.com/standalone/knowledge-base",_e="https://portal.interxion.com",de="https://inxn-a1-gpappshell.azureedge.net",Ee="https://demo.servicefabric.digitalrealty.com/",me="https://marketplaceportal.com/group/telx-new-portal",he="gp-uat.digitalrealty.com,app.humblytics.com",ge=!1,Ae="/cookie-policy",Se="1.0",Ce={strict:"strictly_necessary",performance:"performance",targeting:"targeting"},Ie={accept:"accept_all",reject:"reject_all",custom:"customize",no:"no_sell"},f="globalportalappshell",l="user-authentication",_="redirect-url",Re="ui-cookie-policy",Te="date-format",N="Global Portal",w="Service Fabric",L="Marketplace Portal",b="EMEA Customer Portal",Oe="x-auth",[p,Pe,fe,Ne]=["CREATE","UPDATE","READ","APPROVE"],[v,d,we,Le,y,be,Lt,ve,U,bt,ye,Ue,k,x,D,vt,ke,yt,xe,M,V,G,De,B,Me,Ve,H,Ge]=["Cloud Connect","Cross Connect","Custom Roles","Customer Care","Customer Equipment Connection (CEC)","Customer Support","DCIM-enabled location data","Default System Roles","External User","Facility Access","Internal Roles","Internal User","Internet Exchange","Intra-Customer Connectivity (ICC)","IP Bandwidth","OSP Access","Permanent Badge","PoP/POE Room Access","Remote Hands","Remote Hands Package","Service Exchange Cloud Router","Service Exchange Port","Shipping & Receiving","Space & Power","Trouble Ticket","Visitor Access","User","ESG Reporting"],Be=[xe,be,Me,De,Ve,ke,Le],He=[d,v,y,k,x,D,M,V,G,B],je=[d,v,y,k,x,D,M,V,G,B],Fe={LocationChanged:"location-changed",VaadinRouterLocationChanged:"vaadin-router-location-changed",CreateUserClicked:"create-user-clicked"},Ke={SessionStorage:{HasOutstandingChanges:"hasOutstandingChanges"}},[$e,Ye,ze]=["Security","DCIM","Planned Site Maintenance"],Xe=[$e,Ye,ze],Je=[{label:N,href:de,selected:!0},{label:L,href:me},{label:b,href:_e},{label:w,href:Ee,target:"_blank"}],j={appInsights:"_appInsights"},We=()=>{const e=new W({config:{instrumentationKey:oe,enableCorsCorrelation:!0,enableRequestHeaderTracking:!0,enableResponseHeaderTracking:!0,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,enableAjaxErrorStatusText:!0,enableAjaxPerfTracking:!0,enableUnhandledPromiseRejectionTracking:!0,isCookieUseDisabled:!0,distributedTracingMode:q.AI_AND_W3C,correlationHeaderExcludedDomains:he.split(",").map(t=>t.trim())}});return e.loadAppInsights(),e.trackPageView(),e.addTelemetryInitializer(t=>{t.tags["ai.cloud.role"]=f}),e},u=(e,t,a)=>(...s)=>{const[r,...o]=s;typeof r=="string"&&r.startsWith("[mobx]")&&t===4?a.trackException({exception:{message:o[0].message,stack:o[0].stack,name:r},severityLevel:4}):a.trackTrace({severityLevel:t,message:r},o),e.apply(console,[r,...o])},qe=e=>{console.log=u(console.log,2,e),console.info=u(console.info,2,e),console.warn=u(console.warn,3,e),console.error=u(console.error,4,e),window.console=console},Qe=()=>{const e=We();window[j.appInsights]=e,window.dispatchEvent(new Event("appInsightsInitialized")),qe(e)},F=async e=>{const t=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(a)).map(s=>s.toString(16).padStart(2,"0")).join("")};function Ze(){const{location:e}=window,t=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`;return{authority:O,client_id:T,redirect_uri:`${t}/auth-callback`,response_type:"code",scope:ae,post_logout_redirect_uri:re,monitorSession:!1}}const E=new Q(Ze()),et=e=>{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(window.atob(t).split("").map(s=>`%${`00${s.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(a)},tt=()=>{localStorage.removeItem(l)},n=()=>{const e=localStorage.getItem(l);return e?JSON.parse(e):null},st=async()=>{const e=n();if(!e)return null;const t=(e.profile.given_name||"")+(e.profile.family_name||"")+e.profile.sub;return await F(t)},K=()=>{const e=n();return e?e.id_token:null},$=(e,t)=>{const a={...t,...e},s=et(e.access_token);return a.profile.sub=s.sub,a.profile.account_number=s.account_number,a.expires_at=s.exp,a.is_federated=s.is_federated,s.previous_login_date&&(a.profile.previous_login_date=s.previous_login_date),R.setAccount({accountNumber:s.account_number,email:s.email,name:s.name,givenName:s.given_name,familyName:s.family_name,authTime:s.exp,accessToken:e.access_token,idToken:e.id_token}),localStorage.setItem(l,JSON.stringify(a)),a},at=e=>{$(e,null)},rt=()=>{const e=n();return e?e.access_token:null},ot=()=>{const e=n();return e&&e.is_federated!==null&&e.is_federated!==void 0?String(e.is_federated).toLowerCase()==="true":!1},nt=()=>{const e=n();return e!=null&&e.expires_at?e.expires_at>Date.now()/1e3:!1},it=()=>{var e;const t=n();return((e=t==null?void 0:t.profile)==null?void 0:e.previous_login_date)||null},ct=["authenticate","auth-callback","logout"],lt=e=>e.expires_at&&new Date(e.expires_at*1e3),pt=e=>e.expires_at&&new Date(e.expires_at*1e3+ce*60*60*1e3),Y=()=>{const e=n();if(!K())return!0;if(!e.expires_at)return!1;const t=new Date;return navigator.onLine?t>lt(e):t>pt(e)},ut=()=>{const e=window.location.pathname.split("/");return ct.includes(e[e.length-1])},_t=()=>{const e=window.location.pathname.split("/");return e[e.length-1]==="authenticate"?(E.signinRedirect(),!0):!1},dt=()=>{let e="/";const t=localStorage.getItem(_);t&&(localStorage.removeItem(_),e=t),sessionStorage.setItem("show-last-login-popup","true"),window.location.href=e},Et=e=>{if(!e.id_token)throw new Error("Missing property:id_token");return e},m=e=>{const t=ut();(!t||e)&&(t||localStorage.setItem(_,window.location.href),window.location.href="/authenticate")},mt=async e=>{const t=`${e.profile.sub}-${e.profile.customer_id}`,a=await F(t);return{...e,profile:{...e.profile,hashed_identifier:a}}},ht=()=>{const e=window.location.pathname.split("/");return e[e.length-1]==="auth-callback"?(E.signinRedirectCallback().then(Et).then(mt).then(at).then(dt).catch(m),!0):!1};class gt extends C{render(){return c` <ix-splash-screen></ix-splash-screen> `}}window.customElements.define("splash-screen",gt);var At=Object.defineProperty,St=(e,t,a)=>t in e?At(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,h=(e,t,a)=>St(e,typeof t!="symbol"?t+"":t,a);class Ct{constructor(){h(this,"permissions",[]),h(this,"loading",!1),h(this,"getPermissions",async()=>{var t;const a=(t=R)==null?void 0:t.access_token;if(!a)return[];const s=await fetch(`${P}/usermanagement/my-permissions?exclude_parents=false&exclude_siblings=true`,{headers:{Authorization:`Bearer ${a}`}});return s.ok?s.json():[]}),Z(this,{permissions:te,setPermissions:ee})}setPermissions(t){this.permissions=t.reduce((a,s)=>(a[s.permission_name]=s.privilege,a),{})}tryLoadPermissions(){try{this.loading||(this.loading=!0,this.getPermissions().then(t=>{this.setPermissions(t),this.loading=!1}).catch(()=>{this.loading=!1}))}catch(t){this.loading=!1}}clearPermissions(){this.setPermissions([])}hasExternalUserCreate(){return this.hasPermission(U,p)||this.hasPermission(H,p)}hasConnectivityCreate(){return this.hasPermission(d,p)}hasPrivilegeLevel(t,a){const s=[Ne,p,Pe,fe],r=s.findIndex(i=>i===t),o=s.findIndex(i=>i===a);return r>=o}hasPermission(t,a){let s=!1;const r=se(this.permissions),o=Object.keys(r).find(i=>i===t);return o&&(s=this.hasPrivilegeLevel(a,r[o])),s}}const g=new Ct;class A extends C{constructor(){super(),this._currentView="splash",this.appLoaded=!1,this._onPopState=()=>{Y()&&m()};try{Qe()}catch(a){console.error("Telemetry initialization failed:",a)}const t=window.location.pathname;if(t==="/session-expired"){this._currentView="session-expired",this._loadView("session-expired");return}if(t==="/logout"){this._currentView="logout",this._loadView("logout");return}if(_t()||ht()){this._currentView="splash";return}if(Y()){this._currentView="splash",m();return}this._currentView="app",this._loadApp()}async _loadView(t){t==="session-expired"?await import("@digital-realty/ix-app-logic/views/session-expiry.js"):t==="logout"&&await import("./logout-DwQJmwiJ.js")}connectedCallback(){super.connectedCallback(),window.addEventListener("popstate",this._onPopState)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this._onPopState)}_getAccountNumber(){var t,a,s;return(s=new URLSearchParams(window.location.search).get("selected_account_number"))!=null?s:(a=(t=n())==null?void 0:t.profile)==null?void 0:a.account_number}_isESGAccessOnly(t,a){const s=t.filter(r=>r.account_number===a);return s.length===1&&s[0].permission_name==="ESG Reporting"}_applyMfeOverrides(t,a){const s={};for(const r of Object.keys(t))s[r]={...t[r],enabled:a.includes(r)};return s}async _loadApp(){var t;const{authedUser:a}=await import("@digital-realty/ix-account-switcher");await a.hydrateStore();const[s,r]=await Promise.allSettled([fetch("./registered-apps.json").then(J=>J.json()),g.getPermissions()]);if(s.status==="rejected"){console.error("Failed to load registered apps:",s.reason);return}if(r.status==="rejected"){console.error("Failed to load permissions:",r.reason);return}const{registeredApps:o}=s.value,i=r.value,z=(t=this._getAccountNumber())!=null?t:"",X=this._isESGAccessOnly(i,z)?this._applyMfeOverrides(o,["ui-esg"]):o;window.registeredApps=Object.freeze(X),g.setPermissions(i),await import("./app-CGVyA-KI.js"),this.appLoaded=!0}render(){switch(this._currentView){case"session-expired":return c`<ix-session-expiry></ix-session-expiry>`;case"logout":return c`<ixp-logout></ixp-logout>`;case"app":return this.appLoaded?c`<global-portal-app appTitle="DLR" showDrawer></global-portal-app>`:c`<splash-screen></splash-screen>`;default:return c`<splash-screen></splash-screen>`}}}S([I({type:String})],A.prototype,"_currentView",void 0),S([I({type:Boolean})],A.prototype,"appLoaded",void 0),window.customElements.define("gp-bootstrap",A);export{P as A,l as B,we as C,Te as D,ne as E,Oe as F,ie as G,Ce as H,He as I,Re as J,ue as K,O as L,L as M,le as N,je as O,pe as P,Ae as Q,Xe as R,Be as S,Ie as T,H as U,Se as V,ge as a,st as b,tt as c,rt as d,n as e,$ as f,K as g,T as h,Fe as i,it as j,ot as k,Ke as l,Ge as m,Ue as n,U as o,g as p,ve as q,ye as r,b as s,Je as t,E as u,N as v,w,j as x,f as y,nt as z};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-realty/app-shell",
3
- "version": "11.0.2",
3
+ "version": "11.0.3-IXUAT-10793.521848",
4
4
  "license": "UNLICENSED",
5
5
  "contributors": [
6
6
  "DLR"