1import N from"./dropdown.esm.CaeMZ07V.js";import j from"./progressbar.esm.BXUrxHhZ.js";import{_ as A}from"./path.vue.ClYIEfFi.js";import{_ as E}from"./AdverBar.vue.FkyVH5X3.js";import{d as D,j as V,l as F,k as I,Q as L,m as _,n as U,o as s,c as n,a as o,t as a,b as p,w as u,u as t,q as w,E as y,h as B,i as q}from"./entry.Dh2pzgS5.js";import{k as G}from"./index.DlDznzHl.js";import"./index.esm.B-oUFWrZ.js";import"./overlayeventbus.esm.DgQqa-6N.js";import"./virtualscroller.esm.BfeCmxjt.js";import"./Icon.BdbB9Bzr.js";import"./index.DKzsDYrr.js";const H={class:"grid p-fluid justify-content-center"},J={class:"col-12"},K={class:"text-center text-5xl",alt:"page-title"},Q={class:"col-12"},R={class:"text-lg text-center",alt:"page-description"},z={class:"col-12 lg:col-3 md:col-4 sm:col-6 xs:col-12"},O={key:0,class:"flex align-items-center"},W={key:1},X={class:"flex align-items-center"},Y={class:"col-12 lg:col-3 md:col-4 sm:col-6 xs:col-12"},Z={key:0,class:"flex align-items-center"},ee={key:1},te={class:"flex align-items-center"},oe={key:0,class:"col-12 justify-content-center flex mt-4"},ae={class:"text-2xl"},se={key:1,class:"col-12"},fe=D({__name:"find-my-travel-path",setup(le){V({title:"Find My Travel Path"});const{$upxlandAPI:S}=q(),M=F(),f=I(),{t:h}=L();V({title:h("findMyTravelPath"),meta:[{name:"description",content:h("findMyTravelPathPageSlogan")}]});const i=_({city_name:""}),c=_({city_name:""}),r=_(!1),l=_({}),v=_(G(M.cities)),g=async()=>{if(!(i.value.city_name===""||c.value.city_name==="")){if(i.value.city_name===c.value.city_name){f.add({severity:"error",summary:"Please select two different cities",life:1500});return}r.value=!0;try{const d={from_city:i.value.city_name.toLowerCase(),to_city:c.value.city_name.toLowerCase()},m=await S.tools.findTravelPaths(d);l.value=m[0]}catch(d){f.add({severity:"error",summary:"Error",detail:d,life:1500})}finally{r.value=!1}}};return U(()=>{v.value.push({city_name:"JFK Bus"})}),(d,m)=>{var P,T,C;const x=N,$=j,k=A,b=E;return s(),n("div",H,[o("div",J,[o("div",K,a(d.$t("findMyTravelPath")),1)]),o("div",Q,[o("div",R,a(d.$t("findMyTravelPathPageSlogan")),1)]),o("div",z,[p(x,{modelValue:t(i),"onUpdate:modelValue":m[0]||(m[0]=e=>w(i)?i.value=e:null),options:t(v),filter:"","option-label":"city_name",placeholder:"Select a City",onChange:g},{value:u(e=>[e.value?(s(),n("div",O,[o("div",null,a(e.value.city_name),1)])):(s(),n("span",W,a(e.placeholder),1))]),option:u(e=>[o("div",X,[o("div",null,a(e.option.city_name),1)])]),_:1},8,["modelValue","options"])]),o("div",Y,[p(x,{modelValue:t(c),"onUpdate:modelValue":m[1]||(m[1]=e=>w(c)?c.value=e:null),options:t(v),filter:"","option-label":"city_name",placeholder:"Select a City",onChange:g},{value:u(e=>[e.value?(s(),n("div",Z,[o("div",null,a(e.value.city_name),1)])):(s(),n("span",ee,a(e.placeholder),1))]),option:u(e=>[o("div",te,[o("div",null,a(e.option.city_name),1)])]),_:1},8,["modelValue","options"])]),!t(r)&&((P=t(l))==null?void 0:P.city_from)!==void 0?(s(),n("div",oe,[o("b",ae,a(t(l).city_from)+" â "+a(t(l).city_to),1)])):t(r)?(s(),n("div",se,[p($,{mode:"indeterminate",style:{height:"6px"}})])):y("",!0),!t(r)&&((T=t(l))==null?void 0:T.city_from)!==void 0?(s(),B(k,{key:2,"travel-type":"fastest","travel-path":t(l)},null,8,["travel-path"])):y("",!0),!t(r)&&((C=t(l))==null?void 0:C.city_from)!==void 0?(s(),B(k,{key:3,"travel-type":"cheapest","travel-path":t(l)},null,8,["travel-path"])):y("",!0),p(b)])}}});
1export{fe as default};
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.