PageSourceSearch

https://www.flexport.com/_astro/MegaMenu.astro_astro_type_script_index_0_lang.DA-3Aiut.js

js flexport.com collected 2026-10-01 08:32:23 UTC 3,710 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`4828328c-11c1-4e24-bb62-f5711222b04d`,e._sentryDebugIdIdentifier=`sentry-dbid-4828328c-11c1-4e24-bb62-f5711222b04d`)}catch{}})(),globalThis.process??={},globalThis.process.env??={};import{t as e}from"./protocol.BHsUTYcv.js";import{t}from"./protocol.DfVhZUzo.js";var n=`[data-mega-menu]`,r=`data-mega-menu-id`,i=`data-open`,a=`data-instant`,o=`data-mega-menu-trigger`,s=250,c=100,l=`flex:mega-menu:open`,u=`flex:mega-menu:close`,d=new EventTarget;function f(){return Array.from(document.querySelectorAll(`${n}[${i}="true"]`))}function p(){let e=document.querySelector(`.header`);e!==null&&(e.dataset.megaOpen=f().length>0?`true`:`false`)}function m(e,t){e.dispatchEvent(new CustomEvent(`__mega-menu-close`,{detail:{source:t}}))}function h(e){for(let t of f())m(t,e)}matchMedia(`(min-width: 1024px)`).addEventListener(`change`,e=>{e.matches||h(`breakpoint`)}),window.addEventListener(e.OPEN,()=>{h(`drawer-open`)}),window.addEventListener(t.OPEN,()=>{h(`header-search-open`)});var g=document.querySelector(`header[data-scroll-direction]`);if(g!==null){let e=g.dataset.scrollDirection;new MutationObserver(()=>{let t=g.dataset.scrollDirection;t===`down`&&e!==`down`&&h(`scroll-hide`),e=t}).observe(g,{attributes:!0,attributeFilter:[`data-scroll-direction`]})}function _(e){for(let t of e.querySelectorAll(`.nav-card__media[hidden]`))t.hidden=!1}function v(e){let t=e.getAttribute(r);if(!t)return console.warn(`[mega-menu] panel missing ${r}`),null;let n=document.querySelector(`[aria-controls="${CSS.escape(t)}"]`);if(!n)return console.warn(`[mega-menu] no trigger for id=${t}`),null;let m=n,h=t;m.setAttribute(o,``);let g=new AbortController,{signal:v}=g,y=!1,b=null;function x(){b!==null&&(clearTimeout(b),b=null)}function S(){y||(x(),e.setAttribute(`aria-hidden`,`true`))}function C(t){if(y)return;y=!0,x();let n=f(),r=n.length>0;if(r){e.setAttribute(a,``);for(let e of n)e.setAttribute(a,``)}e.removeAttribute(`aria-hidden`),_(e),e.setAttribute(i,`true`),m.setAttribute(`aria-expanded`,`true`),p(),d.dispatchEvent(new CustomEvent(l,{detail:{id:h,source:t}})),r&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.removeAttribute(a);for(let e of n)e.removeAttribute(a)})})}function w(t,{restoreFocus:n=!0}={}){y&&(y=!1,e.setAttribute(i,`false`),m.setAttribute(`aria-expanded`,`false`),p(),n&&m.focus({preventScroll:!0}),d.dispatchEvent(new CustomEvent(u,{detail:{id:h,source:t}})),e.addEventListener(`transitionend`,S,{once:!0,signal:v}),x(),b=setTimeout(S,s))}let T=null;return m.addEventListener(`pointerenter`,()=>{T=setTimeout(()=>_(e),c)},{signal:v}),m.addEventListener(`pointerleave`,()=>{T!==null&&(clearTimeout(T),T=null)},{signal:v}),m.addEventListener(`click`,e=>{e.preventDefault(),y?w(`user`):C(`user`)},{signal:v}),d.addEventListener(l,e=>{e.detail.id!==h&&y&&w(`sibling`,{restoreFocus:!1})},{signal:v}),e.addEventListener(`__mega-menu-close`,e=>{let t=e.detail;w(t.source,{restoreFocus:!1})},{signal:v}),document.addEventListener(`pointerdown`,t=>{if(!y)return;let n=t.target;(n===null||!e.contains(n)&&!m.contains(n))&&(n instanceof Element&&n.closest(`[${o}]`)||w(`click-outside`,{restoreFocus:!1}))},{signal:v}),document.addEventListener(`keydown`,e=>{y&&e.key===`Escape`&&w(`esc`)},{signal:v}),e.addEventListener(`focusout`,t=>{if(!y)return;let n=t.relatedTarget;if(n===null){w(`focusout`,{restoreFocus:!1});return}!e.contains(n)&&!m.contains(n)&&w(`focusout`,{restoreFocus:!1})},{signal:v}),{destroy:()=>{x(),g.abort()}}}document.querySelectorAll(n).forEach(e=>{v(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.