PageSourceSearch

https://esim.holafly.com/_astro/MegaMenuContent.astro_astro_type_script_index_0_lang.B-lNoK0O.js

js holafly.com collected 2026-09-24 08:44:13 UTC 6,156 bytes, 27 lines download raw bytes

1import{a as e,t}from"./rolldown-runtime.CNC7AqOf.js";import{t as n}from"./i18n.BnmnD03d.js";import{g as r}from"./consts.BWX-LC8m.js";import{p as i}from"./cdn.D7ycv-QL.js";import{i as a}from"./locales.Dp3Q_ff1.js";import{t as o}from"./destinationsStore.CYSS280l.js";import{t as s}from"./toString.gBStDD3m.js";var c=t(((e,t)=>{function n(e){return function(t){return e?.[t]}}t.exports=n})),l=t(((e,t)=>{t.exports=c()({"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`})})),u=e(t(((e,t)=>{var n=l(),r=s(),i=/[&<>"']/g,a=RegExp(i.source);function o(e){return e=r(e),e&&a.test(e)?e.replace(i,n):e}t.exports=o}))(),1),d=document.querySelectorAll(`.megamenu-destinations__tabs button[data-tab]`),f=document.querySelector(`.megamenu-destinations__tabs button.active-tab[aria-selected="true"]`),p=null;if(f){let e=f.getAttribute(`data-tab`);p=document.getElementById(`tab-`+e?.toLowerCase())}d.forEach(e=>{e.addEventListener(`click`,()=>{if(e===f)return;let t=e.getAttribute(`data-tab`),n=document.getElementById(`tab-`+t?.toLowerCase());f&&(f.classList.remove(`active-tab`,`volare-icon-interface-check`),f.setAttribute(`aria-selected`,`false`)),p&&(p.classList.add(`hidden`),p.setAttribute(`aria-hidden`,`true`)),e.classList.add(`active-tab`,`volare-icon-interface-check`),e.setAttribute(`aria-selected`,`true`),n&&(n.classList.remove(`hidden`),n.setAttribute(`aria-hidden`,`false`)),f=e,p=n})}),document.addEventListener(`DOMContentLoaded`,()=>{let e=a(document.documentElement.lang)?.urlCode??r;o.subscribe(t=>{let r=document.getElementById(`tab-popular-list`);r&&!t.errorPopular&&t.popular&&t.popular.length>0&&(r.innerHTML=t.popular.map(t=>{let{slug:r,title:i,flag:a,name:o,sku:s,defaultName:c,minDays:l}=t,d=n(e,r),f=l?`${l}-${l===1?`day`:`days`}`:``;return`
2              <li class="group" data-key="popularDestinations-${(0,u.default)(r)}" data-item-id="${(0,u.default)(s)}" data-item-name="${(0,u.default)(c??o)}" data-item-variant="${(0,u.default)(f)}">
3                <a class="megamenu-destinations__card" href="${(0,u.default)(d)}" title="${(0,u.default)(i)}">
4                  <div class="megamenu-destinations__flags">
5                    <img width="24" height="auto" src="${(0,u.default)(a)}" alt="${(0,u.default)(o)}" loading="lazy" />
6                  </div>
7                  <div class="megamenu-destinations__title">
8                    <span class="megamenu-destinations__text">${(0,u.default)(o)}</span>
9                  </div>
10                </a>
11              </li>
12            `}).join(``))});let t=document.getElementById(`megaMenuContainer`)?.querySelector(`[data-search-result-status]`);if(t){let e=document.getElementById(`megamenu-destinations__content`),n=document.getElementById(`megamenu-no-results`),r=document.querySelectorAll(`.megamenu-destinations__panel`),i=t=>
12{if(!(!e||!n))if(t===`false`)e.classList.add(`hidden`),n.classList.remove(`hidden`),r.forEach(e=>{e.classList.add(`hidden`),e.setAttribute(`aria-hidden`,`true`)});else{e.classList.remove(`hidden`),n.classList.add(`hidden`);let t=document.querySelector(`.megamenu-destinations__tabs button.active-tab[data-tab]`)?.getAttribute(`data-tab`)?.toLowerCase()||`popular`;r.forEach(e=>{let n=e.id===`tab-${t}`;e.classList.toggle(`hidden`,!n),e.setAttribute(`aria-hidden`,String(!n))})}};i(t.getAttribute(`data-search-result-status`)),new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&t.attributeName===`data-search-result-status`){let e=t.target.getAttribute(`data-search-result-status`);i(e)}}).observe(t,{attributes:!0,attributeFilter:[`data-search-result-status`]})}let s=document.getElementById(`megaMenuContainer`);s&&new MutationObserver(t=>{for(let r of t)if(r.type===`attributes`&&r.attributeName===`style`)if(s.style.display===`none`){let e=document.getElementById(`btn-popular`),t=document.getElementById(`tab-popular`);document.querySelectorAll(`.megamenu-destinations__tabs button[data-tab]`).forEach(e=>{e.classList.remove(`active-tab`,`volare-icon-interface-check`),e.setAttribute(`aria-selected`,`false`)}),document.querySelectorAll(`.megamenu-destinations__panel`).forEach(e=>{e.classList.add(`hidden`),e.setAttribute(`aria-hidden`,`true`)}),e&&t&&(e.classList.add(`active-tab`,`volare-icon-interface-check`),e.setAttribute(`aria-selected`,`true`),t.classList.remove(`hidden`),t.setAttribute(`aria-hidden`,`false`),f=e,p=t)}else{let t=document.getElementById(`tab-all-list`);if(t&&t.childNodes.length===0){let r=[],a=0,o=!1,s=()=>i({segments:[`/`.replace(/\/$/,``)||``,`api`,e,`all-destinations.json`],lastSlash:!1}),c=()=>{if(o||a>=r.length)return;let i=r.slice(a,a+20),s=i.map(t=>{let r=n(e,t.slug),i=t.minDays?`${t.minDays}-${t.minDays===1?`day`:`days`}`:`1-day`;return`
13                      <li class="group" data-key="allDestinations-${(0,u.default)(t.name)}" data-item-id="${(0,u.default)(t.sku)}" data-item-name="${(0,u.default)(t.defaultName??t.name)}" data-item-variant="${(0,u.default)(i)}">
14                        <a class="megamenu-destinations__card" href="${(0,u.default)(r)}" title="${(0,u.default)(t.title)}">
15                          <div class="megamenu-destinations__flags">
16                            <img width="24" height="auto" src="${(0,u.default)(t.flag)}" alt="${(0,u.default)(t.name)}" loading="lazy" />
17                          </div>
18                          <div class="megamenu-destinations__title">
19                            <span class="megamenu-destinations__text">${(0,u.default)(t.name)}</span>
20                          </div>
21                        </a>
22                      </li>
23                    `}).join(``);t.insertAdjacentHTML(`beforeend`,s),a+=i.length},l=async()=>{if(!o){o=!0;try{let e=await(await fetch(s())).json();e?.length>0&&(r=e,c())}catch{t.innerHTML=`
24                      <li class="text-left">
25                        No Results...
26                      </li>
27                    `}finally{o=!1}}},d=new IntersectionObserver(e=>{e[0].isIntersecting&&c()},{root:null,rootMargin:`100px`,threshold:.1}),f=document.createElement(`div`);f.className=`end-of-scroll-trigger`,t.after(f),d.observe(f),l()}}}).observe(s,{attributes:!0,attributeFilter:[`style`]})});

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.