PageSourceSearch

https://www.iata.org/dist/store/assets/login-button.component-ylBf_83v.js

js iata.org collected 2026-09-24 07:04:28 UTC 1,679 bytes, 1 lines download raw bytes

1import{d as p}from"./apiCustomElement-GHgGwlGy.js";import{p as g,k as i,e as _}from"./ErrorService-DPEGK52z.js";import{u as I}from"./UtilService-BXCNUM6j.js";import{$ as l}from"./LocalizationService-CjnDpG7P.js";import{d as w,r as y,o as t,b as n,u as a,e as c,f as u,t as d}from"./runtime-core.esm-bundler-Bdg3VnDG.js";import"./runtime-dom.esm-bundler-CK4dDhAO.js";const v={key:0,class:"font-medium text-sm/normal !p-0"},A=["href"],b={key:0,class:"w-5.5 h-5.5 icon icon-user-filled bg-blue xl:w-6 xl:h-6"},k=["href"],E={key:0,class:"w-5.5 h-5.5 icon icon-user-outline bg-blue xl:w-6 xl:h-6"},S=w({__name:"login-button.ce",props:{showIcon:{type:Boolean},cachedIsAuthenticated:{type:[Boolean,null],default:null}},setup(e){const r=e,{getUserInformations:m}=g(),o=y(null);f();async function f(){r.cachedIsAuthenticated!==void 0&&(o.value=r.cachedIsAuthenticated);const s=await m();o.value=s.isAuthenticated}return(s,x)=>o.value!==null?(t(),n("span",v,[o.value?(t(),n("a",{key:0,href:a(i).get().accountPageLink,class:"flex items-center gap-3"},[s.showIcon?(t(),n("div",b)):c("",!0),u("span",null,d(a(l)("Menu.GoToAccountCta")),1)],8,A)):(t(),n("a",{key:1,class:"flex items-center gap-3",href:a(i).get().loginEndpoint},[s.showIcon?(t(),n("div",E)):c("",!0),u("span",null,d(a(l)("Menu.LogInCta")),1)],8,k))])):c("",!0)}});customElements.define("login-button",p(S,{shadowRoot:!1}));const h=localStorage.getItem("isAuthenticated");try{h!==null&&JSON.parse(h)!==!1&&I.whenReady(()=>{document.querySelectorAll("login-button").forEach(e=>{e.setAttribute("cached-is-authenticated","")})})}catch(e){_.genericError(new Error("Error while parsing cached value for isAuthenticated"),{cause:e})}

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