1import{t as e}from"./C3NCWtym.js";import{Mi as t,Ni as n,Ri as r}from"#entry";import{t as i}from"./D46PoaVB.js";import{t as a}from"./W1cVGOy3.js";var o=()=>{let o=a(),s=r(),c=e(),l=(e,t=!1,n=!1,r)=>{let a,l;a=r?.checkin??o.getCheckIn,l=r?.checkout??o.getCheckOut;let u=o.getCU,d,f=`booking.com`;return d=s.page===`region_hub_page`?`https://${f}/searchresults.html?dest_type=region&dest_id=${u?u.cid:``}`:`https://${f}/searchresults.html?dest_type=city&dest_id=${u?u.cid:``}`,d+=`&lang=${s.langcode}`,d+=`&selected_currency=${c.mainInfo?.ShowCurrency}&changed_currency=1`,d+=`&aid=${s.getBcaId}&label=`,s.page===`hotellist`?d+=`hotellist-`:s.page===`country_hub_page`?d+=`country-`:s.page===`main`?d+=`main-`:o.getAvailLabel==`calendar-price`?d+=`calendar-price`:d+=`city-`,n?.type==`map-clickunder`&&(d+=`map-clickunder`),e.label&&(d+=e.label+`-`),u!==void 0&&u.ts!==void 0&&(d+=u.ts),d+=`-ct_ntab`,u!==void 0&&u.hid?d+=`-whotel-`+u.name:u!==void 0&&u.name&&(d+=`-`+u.name),c.wsl&&(d+=`-w`,d+=c.wsl),s.btest&&(d+=`-bt${s.btest}`),c.mainInfo.Affiliate?.GlobalDomainID&&(d+=`-ohid`+c.mainInfo.Affiliate.GlobalDomainID),window.innerWidth<i.md?d+=`-mobile`:d+=`-desktop`,a&&a!==``&&l&&l!==``&&(d+=`&checkin=${a}`,d+=`&checkout=${l}`,d+=m(r?.roomsconf)),u!==void 0&&u.hid!==``&&(d+=`&highlighted_hotels=`+u.hid),d},u=e=>{let t=c.hotel?.exp_info?.hid;if(!t)return null;let n=e?.checkin??o.getCheckIn,r=e?.checkout??o.getCheckOut,i=`https://www.expedia.com/Hotel-Search?selected=${t}&hotelId=${t}`;n&&(i+=`&startDate=${n}`),r&&(i+=`&endDate=${r}`);let a=e?.roomsconf??o.getRoomsConf;if(a){let e=a.split(`|`),t=0,n=[];e.forEach((e,r)=>{let i=e.split(`-`);t+=parseInt(i[0]??``,10)||1;for(let e of i.slice(1))n.push(`${r+1}_${e}`)}),i+=`&adults=${t}`,i+=`&rooms=${e.length}`,n.length&&(i+=`&children=${n.join(`%2C`)}`)}else i+=`&adults=1&rooms=1`;return i+=`&sort=RECOMMENDED`,f(i)},d=()=>typeof c.hotel?.exp_info?.camref==`string`&&c.hotel.exp_info.camref.trim()!==``?c.hotel.exp_info.camref.trim():`1011lvW3Q`,f=e=>{let t=`https://prf.hn/click/camref:`;return t+=d(),t+=`/pubref:ppmd-`,t+=c.mainInfo?.Affiliate?.GlobalNetworkID??`0`,t+=`/ar:`,t+=c.mainInfo?.Affiliate?.ID??`0`,t+=`/destination:`,t+=encodeURIComponent(e),t},p=(e,r)=>{let i=()=>{let t=l(e,r?.isBackLink,r?.alternative,r?.availOverrides);return n(`cu`,`1`,{expires:3,path:`/`,domain:`.`+s.AffDomainNoWWW}),{url:t,target:`booking`}};if(t(`cu`)!==`1`)return i();if(s.page===`hotel`&&c.hotel?.exp_info?.hid&&t(`cu_exp`)!==`1`){let e=u(r?.availOverrides);if(e)return n(`cu_exp`,`1`,{path:`/`,domain:`.`+s.AffDomainNoWWW}),{url:e,target:`expedia`}}return r?.forceBooking?i():null},m=e=>{let t=(e??o.getRoomsConf)?.split(`|`),n=0,r=0,i=``,a=t.length;for(let e of t){let t=e.split(`-`);if(n+=parseInt(t[0]??``,10)||1,t.length>1)for(let e of t.slice(1))r++,i+=`&age=${e}`}return`&group_adults=${n}&group_children=${r}${i}&no_rooms=${a}`};return{getPopUrl:l,getExpediaPopUrl:u,fire:p}};export{o as t};
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.