1import{_ as D,k as I,l as m,m as R,x as A}from"./main-2.3.0.377.js";import{d as M,a as B,r as H,C as J,o as N,c as j,e as z,g as a,x as r,N as E,u as p,P as G,j as T}from"./vendor-2.3.0.377.js";const F={class:"waypoint-container"},K={class:"point-name"},L={class:"func-btn"},O=M({__name:"RouteWaypoint",props:["touchPoint","type"],setup(f,{expose:v}){const{routeState:i,addWayPointAndJump:y,confirmPointAndJump:_}=I(),c=G(),{updateSwiper:h}=A(),t=B({location:{lng:0,lat:0},name:""});let s;const l=[];let u=H("");const{t:d}=J({inheritLocale:!0,useScope:"global"}),g=f;v({close:b}),N(async()=>{s=null,(!history.state.back||i.availablePoints.length<1)&&c.push("/"),u.value=i.availablePoints.length>=7?"btn-disabled":"",h({offsetTop:145,offsetTops:{min:"145px",max:"145px"},animation:!1});const[e,n,P]=decodeURIComponent(g.touchPoint).split(",").map(o=>Number(o));t.name="",t.location={lng:e,lat:n},l.push(x()),S(e,n)}),j(async()=>{for(;l.length>0;){const e=await l.shift();e&&e()}});function b(){history.state.back?c.back():c.replace("/route")}function k(){i.availablePoints.length>=7||y(Object.assign({},t),!1)}function w(){_(i.points.length-1,{name:t.name,location:t.location})}async function S(e,n){(await m.getSiteService()).reverseGeocode({location:{lng:e,lat:n}},(o,C)=>{if(C=="0"&&(o==null?void 0:o.sites)){const W=o.sites[0];t.name=W.name}else t.name="unknown"})}async function x(){return new Promise(async e=>{s=await m.createMarker({position:t.location}),s.setIcon({anchor:[.5,.96],scale:.9,opacity:1,url:R}),s.setZIndex(99),e(()=>{s.setMap(null)})})}return(e,n)=>(T(),z("div",F,[a("div",K,r(t.name),1),a("div",L,[a("div",{class:E(["add-waypoint cursor-pointer",p(u)]),onClick:k},[n[0]||(n[0]=a("i",{class:"iconfont map-route-add-point-highlight"},null,-1)),a("span",null,r(p(d)("routeAddStop")),1)],2),a("div",{class:"set-endpoint cursor-pointer",onClick:w},[n[1]||(n[1]=a("i",{class:"iconfont map-active_location"},null,-1)),a("span",null,r(p(d)("routeSetAsEnd")),1)])])]))}});var Z=D(O,[["__scopeId","data-v-cc7ecd8a"]]);export{Z 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.