PageSourceSearch

https://spa-cart.websupport.sk/assets/WsGoogleAutocomplete.proxy.es.es-BDDbLVO3.js

js websupport.sk collected 2026-10-02 02:27:26 UTC 4,526 bytes, 133 lines download raw bytes

1var __async = (__this, __arguments, generator) => {
2  return new Promise((resolve, reject) => {
3    var fulfilled = (value) => {
4      try {
5        step(generator.next(value));
6      } catch (e2) {
7        reject(e2);
8      }
9    };
10    var rejected = (value) => {
11      try {
12        step(generator.throw(value));
13      } catch (e2) {
14        reject(e2);
15      }
16    };
17    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18    step((generator = generator.apply(__this, __arguments)).next());
19  });
20};
21import { a3 as u } from "./index.es.es-CGxJBMfD.js";
22import { l as useGoogleAPI, ab as initGoogleAPI, w as r, ac as M, ad as s, aa as e, p as s$1, q as u$1, v as e$1 } from "./odin-DIiukhnD.js";
23import { J as Ji, m as nl, t as tr, k as kn, b as Mn, h as gs, e as Je, d as xi, r as rl, j as pe, D as Di, I, V as he, W as Vi, c as Ti, A as At } from "./vendor-CZvMt8Uf.js";
24import { I as Icon } from "./odin-assets-D7LmUGe7.js";
25import "./odin-utils-Dx2y7OLM.js";
26import { t as throttle } from "./vendor-utils-j6SE9MGc.js";
27import "./vendor-axios-B5u-j0E8.js";
28import "./vendor-sentry-DRCyJRFj.js";
29import "./vendor-qrcode-DVLuOpww.js";
30import "./vendor-vue-CIEl4Ose.js";
31const z = { key: 1 }, Z = /* @__PURE__ */ Ji({
32  __name: "WsGoogleAutocomplete",
33  props: {
34    throttleDelay: {
35      type: Number,
36      default: 1e3
37    },
38    showPoweredByGoogle: {
39      type: Boolean,
40      default: true
41    },
42    validationPath: {
43      type: String,
44      default: ""
45    },
46    modelValue: {
47      type: String,
48      default: ""
49    }
50  },
51  emits: ["update:model-value", "address-selected"],
52  setup(i, { emit: _ }) {
53    const I$1 = nl(), C = i, s$12 = _, a2 = At(false), r$1 = At([]), d = At(false), g = At(null), v = At(""), S = throttle((e2) => __async(null, null, function* () {
54      if (typeof e2 == "string") {
55        a2.value = true, v.value = e2;
56        try {
57          r$1.value = yield useGoogleAPI().getPlacePredictions(e2, "geocode");
58        } catch (e3) {
59          r$1.value = [];
60        } finally {
61          a2.value = false;
62        }
63      }
64    }), C.throttleDelay), B = (e2) => __async(null, null, function* () {
65      a2.value = true;
66      const o = yield useGoogleAPI().getPlaceAddress(e2.place_id);
67      s$12("address-selected", o), s$12("update:model-value", true), a2.value = false, d.value = true;
68    }), V = () => {
69      var _a, _b;
70      (_b = (_a = g.value) == null ? void 0 : _a.$refs.qFieldRef) == null ? void 0 : _b.updateInputValue("");
71    }, G = () => {
72      r$1.value = [], d.value = false, s$12("address-selected", {}), s$12("update:model-value", false), V();
73    };
74    return tr(() => __async(null, null, function* () {
75      yield initGoogleAPI();
76    })), (e$12, o) => (kn(), Mn(e, Ti({
77      ref_key: "wsSelect",
78      ref: g,
79      class: "ws-google-autocomplete"
80    }, Je(I$1), {
81      options: r$1.value,
82      "with-input": "",
83      "allow-custom-value": "",
84      loading: a2.value,
85      "validation-path": i.validationPath,
86      "option-label": (t) => t.description,
87      onInputValue: o[0] || (o[0] = (t) => Je(S)(t)),
88      "onUpdate:modelValue": o[1] || (o[1] = (t) => B(t))
89    }), {
90      option: gs((t) => [
91        pe(M, he(Vi(t.itemProps)), {
92          default: gs(() => [
93            pe(s, null, {
94              default: gs(() => [
95                Di(I(t.opt.description), 1)
96              ]),
97              _: 2
98            }, 1024)
99          ]),
100          _: 2
101        }, 1040)
102      ]),
103      "no-option": gs(() => [
104        a2.value ? xi("", true) : (kn(), Mn(M, { key: 0 }, {
105          default: gs(() => [
106            pe(s, null, {
107              default: gs(() => [
108                Di(I(v.value ? e$12.$t("uikit:ws_google_autocomplete.no_results") : e$12.$t("uikit:ws_google_autocomplete.start_typing")), 1)
109              ]),
110              _: 1
111            })
112          ]),
113          _: 1
114        }))
115      ]),
116      append: gs(() => [
117        d.value ? (kn(), Mn(r, {
118          key: 0,
119          name: Je(Icon).CLOSE,
120          onClick: G
121        }, null, 8, ["name"])) : xi("", true),
122        i.showPoweredByGoogle ? (kn(), rl("span", z, "Powered by Google")) : xi("", true)
123      ]),
124      _: 1
125    }, 16, ["options", "loading", "validation-path", "option-label"]));
126  }
127});
128const m = /* @__PURE__ */ s$1(Z, [["__scopeId", "data-v-7ea8157a"]
128]);
129const a = u(e$1, "ws-google-autocomplete", m, u$1);
130export {
131  a as default
132};
133//# sourceMappingURL=WsGoogleAutocomplete.proxy.es.es-BDDbLVO3.js.map

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.