PageSourceSearch

https://www.jejupass.com/assets/ai_utils.48c3ae24.js

js jejupass.com collected 2026-10-01 14:16:27 UTC 16,646 bytes, 398 lines download raw bytes

1import { d as defineComponent, r as ref, o as openBlock, c as createElementBlock, g as createBaseVNode, F as Fragment, i as renderList, x as toDisplayString, y as createCommentVNode, u as unref, j as createBlock, z as createTextVNode, ag as Teleport, p as pushScopeId, m as popScopeId, L as useRoute, I as firstQuery, q as dayjs } from "./index.37deb195.js";
2import { _ as _export_sfc } from "./_plugin-vue_export-helper.cdc0426e.js";
3import "./ko.58acc6c6.js";
4import { R as REGION } from "./enum.8ee6b244.js";
5function trackEvent(eventName, params) {
6  try {
7    if (typeof window === "undefined")
8      return;
9    window.dataLayer = window.dataLayer || [];
10    window.dataLayer.push({ event: eventName, ...params || {} });
11  } catch (_e) {
12  }
13}
14function trackPageView(device) {
15  trackEvent("karangi_page_view", { device });
16}
17function trackNewChat() {
18  trackEvent("karangi_new_chat");
19}
20function trackQuickOption(option) {
21  trackEvent("karangi_quick_option", { option });
22}
23function trackMessageSend(messageLength) {
24  trackEvent("karangi_message_send", { message_length: messageLength });
25}
26function trackCarClick(carName, companyName, price) {
27  trackEvent("karangi_car_click", {
28    car_name: carName,
29    company_name: companyName,
30    price
31  });
32}
33const _withScopeId = (n) => (pushScopeId("data-v-d81cd7ba"), n = n(), popScopeId(), n);
34const _hoisted_1 = { class: "cafeRouteCard" };
35const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "cafeRouteHeader" }, [
36  /* @__PURE__ */ createBaseVNode("span", { class: "cafeRouteIcon" }, "\u2615"),
37  /* @__PURE__ */ createBaseVNode("h3", { class: "cafeRouteTitle" }, "\uCE74\uD398\uD328\uC2A4 \uD22C\uC5B4 \uCF54\uC2A4")
38], -1));
39const _hoisted_3 = { class: "cafeRouteDayList" };
40const _hoisted_4 = { class: "cafeRouteDayHeader" };
41const _hoisted_5 = { class: "cafeRouteDayBadge" };
42const _hoisted_6 = {
43  key: 0,
44  class: "cafeRouteDayRegion"
45};
46const _hoisted_7 = { class: "cafeRouteStops" };
47const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("span", { class: "cafeRouteStopIcon" }, "\u{1F4CD}", -1));
48const _hoisted_9 = { class: "cafeRouteStopText" };
49const _hoisted_10 = {
50  key: 0,
51  class: "cafeRouteMeta"
52};
53const _hoisted_11 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("span", { class: "cafeRouteMetaIcon" }, "\u{1F697}", -1));
54const _hoisted_12 = { class: "cafeRouteMetaText" };
55const _hoisted_13 = ["onClick"];
56const _hoisted_14 = { class: "cafeRoutePurchaseArea" };
57const _hoisted_15 = { class: "cafeMapModal" };
58const _hoisted_16 = { class: "cafeMapModalHeader" };
59const _hoisted_17 = { class: "cafeMapModalTitle" };
60const _hoisted_18 = { key: 0 };
61const _hoisted_19 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", {
62  id: "cafeRouteMap",
63  class: "cafeMapContainer"
64}, null, -1));
65const _hoisted_20 = { class: "cafeMapCafeList" };
66const _hoisted_21 = { class: "cafeMapCafeIndex" };
67const _hoisted_22 = { class: "cafeMapCafeInfo" };
68const _hoisted_23 = { class: "cafeMapCafeName" };
69const _hoisted_24 = {
70  key: 0,
71  class: "cafeMapCafeAddress"
72};
73const _sfc_main = /* @__PURE__ */ defineComponent({
74  __name: "AiCafeRoute",
75  props: {
76    routes: null
77  },
78  setup(__props) {
79    const props = __props;
80    const isMapModalOpen = ref(false);
81    const selectedRoute = ref(null);
82    function loadKakaoMap() {
83      return new Promise((resolve) => {
84        if (window.kakao && window.kakao.maps) {
85          resolve();
86          return;
87        }
88        const script = document.createElement("script");
89        script.src = "//dapi.kakao.com/v2/maps/sdk.js?appkey=ed585047da0d8d227afcc08358d14e52&autoload=false";
90        script.onload = () => {
91          window.kakao.maps.load(resolve);
92        };
93        document.head.appendChild(script);
94      });
95    }
96    async function initMap(route) {
97      await loadKakaoMap();
98      const kakao = window.kakao;
99      const container = document.getElementById("cafeRouteMap");
100      if (!container)
101        return;
102      let centerLat = 33.399;
103      let centerLng = 126.5518;
104      if (route.cafes && route.cafes.length > 0) {
105        centerLat = route.cafes.reduce((sum, c) => sum + c.lat, 0) / route.cafes.length;
106        centerLng = route.cafes.reduce((sum, c) => sum + c.lng, 0) / route.cafes.length;
107      }
108      const mapOption = {
109        center: new kakao.maps.LatLng(centerLat, centerLng),
110        level: 9
111      };
112      const map = new kakao.maps.Map(container, mapOption);
113      if (route.cafes && route.cafes.length > 0) {
114        route.cafes.forEach((cafe, index) => {
115          const markerPos = new kakao.maps.LatLng(cafe.lat, cafe.lng);
116          const imageSrc = `//t1.daumcdn.net/localimg/localimages/07/mapapidoc/marker_number_blue.png`;
117          const imageSize = new kakao.maps.Size(36, 37);
118          const imgOptions = {
119            spriteSize: new kakao.maps.Size(36, 691),
120            spriteOrigin: new kakao.maps.Point(0, index * 46 + 10),
121            offset: new kakao.maps.Point(13, 37)
122          };
123          const markerImage = new kakao.maps.MarkerImage(imageSrc, imageSize, imgOptions);
124          const marker = new kakao.maps.Marker({
125            map,
126            position: markerPos,
127            image: markerImage,
128            title: cafe.name
129          });
130          const infoContent = `
131        <div style="padding:8px 12px;min-width:120px;max-width:200px;font-size:13px;line-height:1.5;">
132          <strong>${cafe.name}</strong>
133          ${cafe.address ? `<br><span style="color:#666;font-size:12px;">${cafe.address}</span>` : ""}
134          ${cafe.description ? `<br><span style="color:#444;font-size:12px;">${cafe.description}</span>` : ""}
135        </div>
136      `;
137          const infowindow = new kakao.maps.InfoWindow({
138            content: infoContent,
139            removable: true
140          });
141          kakao.maps.event.addListener(marker, "click", () => {
142            infowindow.open(map, marker);
143          });
144        });
145      }
146      if (route.route && route.route.geometry && route.route.geometry.length > 1) {
147        const path = route.route.geometry.map(([lng, lat]) => new kakao.maps.LatLng(lat, lng));
148        const polyline = new kakao.maps.Polyline({
149          path,
150          strokeWeight: 4,
151          strokeColor: "#FF6B6B",
152          strokeOpacity: 0.8,
153          strokeStyle: "solid"
154        });
155        polyline.setMap(map);
156      } else if (route.cafes && route.cafes.length > 1) {
157        const path = route.cafes.map((c) => new kakao.maps.LatLng(c.lat, c.lng));
158        const polyline = new kakao.maps.Polyline({
159          path,
160          strokeWeight: 3,
161          strokeColor: "#FF6B6B",
162          strokeOpacity: 0.6,
163          strokeStyle: "dashed"
164        });
165        polyline.setMap(map);
166      }
167      if (route.cafes && route.cafes.length > 0) {
168        const bounds = new kakao.maps.LatLngBounds();
169        route.cafes.forEach((c) => bounds.extend(new kakao.maps.LatLng(c.lat, c.lng)));
170        if (route.route && route.route.geometry) {
171          route.route.geometry.forEach(([lng, lat]) => bounds.extend(new kakao.maps.LatLng(lat, lng)));
172        }
173        map.setBounds(bounds, 50);
174      }
175    }
176    async function openMapModal(route) {
177      selectedRoute.value = route;
178      isMapModalOpen.value = true;
179      setTimeout(() => {
180        initMap(route);
181      }, 100);
182    }
183    function closeMapModal() {
184      isMapModalOpen.value = false;
185      selectedRoute.value = null;
186    }
187    function openPurchaseUrl(url) {
188      window.open(url, "_blank");
189    }
190    function formatDistance(km) {
191      return `${km.toFixed(1)}km`;
192    }
193    function formatDuration(min) {
194      return `\uC57D ${min}\uBD84`;
195    }
196    function onOverlayClick(e) {
197      if (e.target.classList.contains("cafeMapOverlay")) {
198        closeMapModal();
199      }
200    }
201    const purchaseUrl = props.routes.length > 0 ? props.routes[0].purchase_url : "";
202    return (_ctx, _cache) => {
203      return openBlock(), createElementBlock(Fragment, null, [
204        createBaseVNode("div", _hoisted_1, [
205          _hoisted_2,
206          createBaseVNode("div", _hoisted_3, [
207            (openBlock(true), createElementBlock(Fragment, null, renderList(__props.routes, (route, index) => {
208              return openBlock(), createElementBlock("div", {
209                key: index,
210                class: "cafeRouteDayItem"
211              }, [
212                createBaseVNode("div", _hoisted_4, [
213                  createBaseVNode("span", _hoisted_5, toDisplayString(route.day), 1),
214                  route.region ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(route.region), 1)) : createCommentVNode("", true)
215                ]),
216                createBaseVNode("div", _hoisted_7, [
217                  _hoisted_8,
218                  createBaseVNode("span", _hoisted_9, toDisplayString(route.cafes.map((c) => c.name).join(" \u2192 ")), 1)
219                ]),
220                route.route ? (openBlock(), createElementBlock("div", _hoisted_10, [
221                  _hoisted_11,
222                  createBaseVNode("span", _hoisted_12, toDisplayString(formatDistance(route.route.distance_km)) + " / " + toDisplayString(formatDuration(route.route.duration_min)), 1)
223                ])) : createCommentVNode("", true),
224                createBaseVNode("button", {
225                  type: "button",
226                  class: "btnCafeMap",
227                  onClick: ($event) => openMapModal(route)
228                }, " \uC9C0\uB3C4 \uBCF4\uAE30 ", 8, _hoisted_13)
229              ]);
230            }), 128))
231          ]),
232          createBaseVNode("div", _hoisted_14, [
233            unref(purchaseUrl) ? (openBlock(), createElementBlock("button", {
234              key: 0,
235              type: "button",
236              class: "btnCafePurchase",
237              onClick: _cache[0] || (_cache[0] = ($event) => openPurchaseUrl(unref(purchaseUrl)))
238            }, " \u2615 \uCE74\uD398\uD328\uC2A4 \uAD6C\uB9E4\uD558\uAE30 ")) : createCommentVNode("", true)
239          ])
240        ]),
241        (openBlock(), createBlock(Teleport, { to: "body" }, [
242          isMapModalOpen.value && selectedRoute.value ? (openBlock(), createElementBlock("div", {
243            key: 0,
244            class: "cafeMapOverlay",
245            onClick: onOverlayClick
246          }, [
247            createBaseVNode("div", _hoisted_15, [
248              createBaseVNode("div", _hoisted_16, [
249                createBaseVNode("h4", _hoisted_17, [
250                  createTextVNode(toDisplayString(selectedRoute.value.day) + " ", 1),
251                  selectedRoute.value.region ? (openBlock(), createElementBlock("span", _hoisted_18, " - " + toDisplayString(selectedRoute.value.region), 1)) : createCommentVNode("", true)
252                ]),
253                createBaseVNode("button", {
254                  type: "button",
255                  class: "btnCafeMapClose",
256                  onClick: closeMapModal
257                }, " \u2715 ")
258              ]),
259              _hoisted_19,
260              createBaseVNode("ul", _hoisted_20, [
261                (openBlock(true), createElementBlock(Fragment, null, renderList(selectedRoute.value.cafes, (cafe, idx) => {
262                  return openBlock(), createElementBlock("li", {
263                    key: idx,
264                    class: "cafeMapCafeItem"
265                  }, [
266                    createBaseVNode("span", _hoisted_21, toDisplayString(idx + 1), 1),
267                    createBaseVNode("div", _hoisted_22, [
268                      createBaseVNode("strong", _hoisted_23, toDisplayString(cafe.name), 1),
269                      cafe.address ? (openBlock(), createElementBlock("span", _hoisted_24, toDisplayString(cafe.address), 1)) : createCommentVNode("", true)
270                    ])
271                  ]);
272                }), 128))
273              ])
274            ])
275          ])) : createCommentVNode("", true)
276        ]))
277      ], 64);
278    };
279  }
280});
281const AiCafeRoute_vue_vue_type_style_index_0_scoped_d81cd7ba_lang = "";
282const AiCafeRoute = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d81cd7ba"]]);
283const useRentcarAiSubMain = () => {
284  const route = useRoute();
285  const startDateTime = ref();
286  const endDateTime = ref();
287  const insurance = ref(null);
288  const age = ref(false);
289  const career = ref(false);
290  let resveBeginDe = null;
291  let resveEndDe = null;
292  let driverYearLmtYn = null;
293  let driverLicenseYear = null;
294  const insrncApplcCode = ref(null);
295  let region = null;
296  resveBeginDe = firstQuery(route, "resveBeginDe") || dayjs(dayjs().add(1, "day").hour(9).minute(0).toDate()).format("YYYY-MM-DD");
297  firstQuery(route, "resveBeginTime") || dayjs(dayjs().add(1, "day").hour(9).minute(0).toDate()).format("HHmm");
298  resveEndDe = firstQuery(route, "resveEndDe") || dayjs(dayjs().add(2, "day").hour(9).minute(0).toDate()).format("YYYY-MM-DD");
299  firstQuery(route, "resveEndTime") || dayjs(dayjs().add(2, "day").hour(9).minute(0).toDate()).format("HHmm");
300  driverYearLmtYn = firstQuery(route, "driverYearLmtYn") || "N";
301  driverLicenseYear = firstQuery(route, "driverLicenseYear") || "N";
302  insrncApplcCode.value = firstQuery(route, "insrncApplcCode") || "03";
303  firstQuery(route, "vhctySeCode");
304  region = firstQuery(route, "region") || REGION.JEJU.code;
305  firstQuery(route, "rand") || "";
306  if (region === REGION.JAPAN.code) {
307    if (dayjs(resveBeginDe).diff(dayjs(), "day") < 3) {
308      resveBeginDe = dayjs(dayjs().add(3, "day").hour(9).minute(0)).format("YYYY-MM-DD");
309      dayjs(dayjs().add(3, "day").hour(9).minute(0)).format("HHmm");
310    }
311    if (dayjs(resveEndDe).diff(dayjs(), "day") < 4) {
312      resveEndDe = dayjs(dayjs().add(4, "day").hour(9).minute(0)).format("YYYY-MM-DD");
313      dayjs(dayjs().add(4, "day").hour(9).minute(0)).format("HHmm");
314    }
315  }
316  insrncApplcCode.value = region === REGION.INLAND.code ? "02" : "03";
317  firstQuery(route, "administrativeCode") || "5011000001";
318  firstQuery(route, "administrativeCode2");
319  insurance.value = insrncApplcCode.value;
320  age.value = driverYearLmtYn === "Y" ? true : false;
321  career.value = driverLicenseYear === "1" ? true : false;
322  return { route, startDateTime, endDateTime };
323};
324const CAR_CARD_PATTERN = /\{{2,4}car_card:([^|]+)\|([^|]+)\|([^|]+)\|([^|]+)\|([^|]*)\|([^|}\)]*)(?:\|([^}\)]*))?[)\}]\}{1,4}/g;
325const HIGHLIGHT_PATTERN = /\{\{([^}]+)\}\}/g;
326const BOLD_PATTERN = /\*\*([^*]+)\*\*/g;
327function hasCarMarkers(message) {
328  CAR_CARD_PATTERN.lastIndex = 0;
329  return CAR_CARD_PATTERN.test(message);
330}
331function extractCarsFromMarkers(message) {
332  const cars = [];
333  CAR_CARD_PATTERN.lastIndex = 0;
334  let match;
335  let index = 0;
336  while ((match = CAR_CARD_PATTERN.exec(message)) !== null) {
337    const [, name, company, price, bookingUrl, imageUrl, reason, insuranceType] = match;
338    const priceNum = parseInt(price.replace(/[^0-9]/g, ""), 10) || 0;
339    cars.push({
340      id: String(index + 1),
341      name: name.trim(),
342      category: company.trim(),
343      bookingUrl: bookingUrl.trim(),
344      seats: 0,
345      fuel: "",
346      year: 0,
347      price: priceNum,
348      image: (imageUrl == null ? void 0 : imageUrl.trim()) || "/pc/images/common/no_image.png",
349      reason: (reason == null ? void 0 : reason.trim()) || "AI \uCE74\uB791\uC774\uAC00 \uCD94\uCC9C\uD558\uB294 \uCC28\uB7C9\uC774\uC5D0\uC694.",
350      insuranceType: (insuranceType == null ? void 0 : insuranceType.trim()) || void 0
351    });
352    index++;
353  }
354  return cars;
355}
356function removeCarMarkers(message) {
357  CAR_CARD_PATTERN.lastIndex = 0;
358  const match = CAR_CARD_PATTERN.exec(message);
359  if (match) {
360    return message.substring(0, match.index).trim();
361  }
362  return message.trim();
363}
364const ACTION_PATTERN = /\{{2,4}action:([^|]+)\|([^}\)]+)[)\}]\}{1,4}/g;
365function extractActionsFromMarkers(message) {
366  const actions = [];
367  ACTION_PATTERN.lastIndex = 0;
368  let match;
369  while ((match = ACTION_PATTERN.exec(message)) !== null) {
370    actions.push({
371      label: match[1].trim(),
372      query: match[2].trim()
373    });
374  }
375  return actions;
376}
377function removeActionMarkers(message) {
378  ACTION_PATTERN.lastIndex = 0;
379  return message.replace(ACTION_PATTERN, "").trim();
380}
381function formatMessage(message) {
382  return message.replace(BOLD_PATTERN, "<strong>$1</strong>").replace(HIGHLIGHT_PATTERN, '<span class="text_llm_highlight">$1</span>');
383}
384export {
385  AiCafeRoute as A,
386  trackPageView as a,
387  trackMessageSend as b,
388  extractActionsFromMarkers as c,
389  removeActionMarkers as d,
390  extractCarsFromMarkers as e,
391  formatMessage as f,
392  trackNewChat as g,
393  hasCarMarkers as h,
394  trackQuickOption as i,
395  removeCarMarkers as r,
396  trackCarClick as t,
397  useRentcarAiSubMain as u
398};

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.