@tellaro/tql 0.1.18 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,48 +1,47 @@
1
- import { defineComponent as tt, ref as h, toRef as _, computed as H, watch as ee, onMounted as lt, nextTick as P, onUnmounted as ot, openBlock as a, createElementBlock as s, normalizeClass as V, unref as r, Fragment as Q, renderList as N, toDisplayString as b, createCommentVNode as m, withDirectives as se, vModelText as ue, createElementVNode as c, withModifiers as A, withKeys as xe, createVNode as Ce, createBlock as it, Teleport as at } from "vue";
2
- import nt from "./TqlAutocomplete.vue.js";
3
- import st from "./components/TqlPreview.vue.js";
4
- import { useTqlInput as ut } from "./useTqlInput.js";
5
- import { useQueryHistory as rt } from "./composables/useQueryHistory.js";
6
- import { analyzeComplexity as ct } from "../src/complexityAnalyzer.js";
7
- import { ENRICHMENT_MUTATORS as SLOW_MUTATORS } from "../src/tokenizer.js";
8
- const dt = {
1
+ import { defineComponent as et, ref as h, toRef as _, computed as $, watch as ee, onMounted as tt, nextTick as S, onUnmounted as lt, openBlock as a, createElementBlock as n, normalizeClass as P, unref as c, Fragment as M, renderList as F, toDisplayString as w, createCommentVNode as m, withDirectives as ne, vModelText as se, createElementVNode as d, withModifiers as Q, withKeys as ke, createVNode as xe, createBlock as ot, Teleport as at } from "vue";
2
+ import it from "./TqlAutocomplete.vue.js";
3
+ import nt from "./components/TqlPreview.vue.js";
4
+ import { useTqlInput as st } from "./useTqlInput.js";
5
+ import { useQueryHistory as ut } from "./composables/useQueryHistory.js";
6
+ import { analyzeComplexity as rt } from "../src/complexityAnalyzer.js";
7
+ const ct = {
9
8
  key: 0,
10
9
  class: "tql-highlight-layer",
11
10
  "aria-hidden": "true"
12
- }, vt = ["placeholder", "disabled", "readonly", "rows", "aria-expanded", "aria-invalid", "aria-describedby"], ft = ["placeholder", "disabled", "readonly", "aria-expanded", "aria-invalid", "aria-describedby"], pt = { class: "tql-toolbar" }, ht = ["title"], mt = { class: "tql-complexity-label" }, yt = {
11
+ }, dt = ["placeholder", "disabled", "readonly", "rows", "aria-expanded", "aria-invalid", "aria-describedby"], vt = ["placeholder", "disabled", "readonly", "aria-expanded", "aria-invalid", "aria-describedby"], ft = { class: "tql-toolbar" }, pt = ["title"], ht = { class: "tql-complexity-label" }, mt = {
13
12
  key: 0,
14
13
  class: "tql-complexity-count"
15
- }, gt = {
14
+ }, yt = {
16
15
  key: 4,
17
16
  class: "tql-validation-status"
18
- }, wt = {
17
+ }, gt = {
19
18
  key: 0,
20
19
  class: "pi pi-check-circle tql-icon-valid",
21
20
  "aria-label": "Query is valid"
22
- }, bt = ["aria-label", "aria-expanded"], qt = { class: "tql-history-header" }, kt = { class: "tql-history-list" }, xt = ["onClick"], Ct = ["title", "onClick"], St = { class: "tql-history-content" }, Pt = {
21
+ }, wt = ["aria-label", "aria-expanded"], bt = { class: "tql-history-header" }, qt = { class: "tql-history-list" }, kt = ["onClick"], xt = ["title", "onClick"], Ct = { class: "tql-history-content" }, St = {
23
22
  key: 0,
24
23
  class: "tql-history-label"
25
- }, Vt = { class: "tql-history-query" }, Dt = { class: "tql-history-time" }, Rt = {
24
+ }, Pt = { class: "tql-history-query" }, Vt = { class: "tql-history-time" }, Dt = {
26
25
  key: 0,
27
26
  class: "tql-history-empty"
28
- }, $t = {
27
+ }, Rt = {
29
28
  key: 0,
30
29
  class: "tql-error-suggestion"
31
- }, It = {
30
+ }, Tt = {
32
31
  key: 4,
33
32
  class: "tql-complexity-warnings"
34
- }, Et = {
33
+ }, $t = {
35
34
  key: 0,
36
35
  class: "tql-complexity-suggestions"
37
- }, Ht = {
36
+ }, It = {
38
37
  key: 5,
39
38
  class: "tql-preview-panel"
40
- }, Tt = { class: "tql-preview-header" }, Bt = {
39
+ }, Et = { class: "tql-preview-header" }, Ht = {
41
40
  class: "sr-only",
42
41
  role: "status",
43
42
  "aria-live": "polite",
44
43
  "aria-atomic": "true"
45
- }, Mt = { key: 0 }, Qt = { key: 1 }, At = 1500, Ut = /* @__PURE__ */ tt({
44
+ }, Bt = { key: 0 }, Mt = { key: 1 }, Qt = 1500, Nt = /* @__PURE__ */ et({
46
45
  __name: "TqlInput",
47
46
  props: {
48
47
  modelValue: {},
@@ -72,602 +71,577 @@ const dt = {
72
71
  historyStorageKey: {}
73
72
  },
74
73
  emits: ["update:modelValue", "validation", "parse", "submit"],
75
- setup(n, { expose: Se, emit: Pe }) {
76
- const f = n, q = Pe, i = h(null), k = h(null), L = h(null), u = h(f.modelValue), x = h(!1), y = h(!1), U = h(0), z = h(!1);
77
- let j = null, W = 0;
78
- const D = h(!1), R = h(!1), T = h(""), te = `tql-input-${Math.random().toString(36).substring(2, 9)}`, re = `${te}-input`, le = `${te}-autocomplete`, oe = `${te}-errors`, K = h([]), B = h(-1), Ve = _(f, "modelValue"), De = _(f, "fieldSchema"), Re = _(f, "fieldValues"), $e = _(f, "snippets"), {
79
- tokens: Ie,
80
- cursorPosition: O,
81
- completionItems: F,
82
- showAutocomplete: C,
83
- isValid: ie,
84
- errors: I,
85
- hasErrors: E,
86
- validate: Ee,
87
- handleInput: ce,
88
- handleCursorChange: S,
89
- insertCompletion: He,
90
- insertSnippet: Te,
74
+ setup(i, { expose: Ce, emit: Se }) {
75
+ const v = i, b = Se, o = h(null), q = h(null), A = h(null), s = h(v.modelValue), k = h(!1), y = h(!1), N = h(0), L = h(!1);
76
+ let U = null, j = 0;
77
+ const V = h(!1), D = h(!1), I = h(""), te = `tql-input-${Math.random().toString(36).substring(2, 9)}`, ue = `${te}-input`, le = `${te}-autocomplete`, oe = `${te}-errors`, z = h([]), E = h(-1), Pe = _(v, "modelValue"), Ve = _(v, "fieldSchema"), De = _(v, "fieldValues"), Re = _(v, "snippets"), {
78
+ tokens: Te,
79
+ cursorPosition: K,
80
+ completionItems: O,
81
+ showAutocomplete: x,
82
+ isValid: W,
83
+ errors: R,
84
+ hasErrors: T,
85
+ validate: $e,
86
+ handleInput: re,
87
+ handleCursorChange: C,
88
+ insertCompletion: Ie,
89
+ insertSnippet: Ee,
91
90
  triggerAutocomplete: ae,
92
91
  hideAutocomplete: G,
93
- getTokenAtCursor: Be
94
- } = ut({
95
- modelValue: Ve,
96
- fieldSchema: De,
97
- fieldValues: Re,
98
- snippets: $e,
99
- validateOnInput: f.validateOnInput,
100
- debounceMs: f.debounceMs,
101
- autocomplete: f.autocomplete,
102
- onValidation: (e) => q("validation", e),
103
- onParse: (e) => q("parse", e)
104
- }), $ = f.showHistory ? rt({
105
- storageKey: f.historyStorageKey || "tql-history",
106
- ...f.historyOptions
107
- }) : null, g = H(() => !f.showComplexity || !u.value.trim() ? null : ct(u.value, f.complexityThresholds)), Me = H(() => g.value ? `tql-complexity-${g.value.score}` : ""), de = H(() => g.value && {
92
+ getTokenAtCursor: He
93
+ } = st({
94
+ modelValue: Pe,
95
+ fieldSchema: Ve,
96
+ fieldValues: De,
97
+ snippets: Re,
98
+ validateOnInput: v.validateOnInput,
99
+ debounceMs: v.debounceMs,
100
+ autocomplete: v.autocomplete,
101
+ onValidation: (e) => b("validation", e),
102
+ onParse: (e) => b("parse", e)
103
+ }), H = v.showHistory ? ut({
104
+ storageKey: v.historyStorageKey || "tql-history",
105
+ ...v.historyOptions
106
+ }) : null, g = $(() => !v.showComplexity || !s.value.trim() ? null : rt(s.value, v.complexityThresholds)), Be = $(() => g.value ? `tql-complexity-${g.value.score}` : ""), ce = $(() => g.value && {
108
107
  low: "Low",
109
108
  medium: "Medium",
110
109
  high: "High"
111
- }[g.value.score] || ""), queryState = H(() => {
112
- if (!u.value.trim()) return "empty";
113
- if (E.value) return "invalid";
114
- // Check for enrichment/slow mutators in tokens
115
- const hasSlow = Ie.value.some(t =>
116
- t.type === "mutator" && SLOW_MUTATORS.includes(t.value.toLowerCase())
117
- );
118
- if (hasSlow) return "slow";
119
- if (ie.value) return "valid";
120
- return "unknown";
121
- }), ve = H(() => $ ? T.value.trim() ? $.searchHistory(T.value).slice(0, 10) : $.getRecentQueries(10) : []);
122
- function Qe(e) {
123
- u.value = e.query, q("update:modelValue", e.query), ce(e.query), D.value = !1, T.value = "", P(() => {
124
- var t;
125
- return (t = i.value) == null ? void 0 : t.focus();
126
- });
110
+ }[g.value.score] || ""), de = $(() => H ? I.value.trim() ? H.searchHistory(I.value).slice(0, 10) : H.getRecentQueries(10) : []);
111
+ function Me(e) {
112
+ s.value = e.query, b("update:modelValue", e.query), re(e.query), V.value = !1, I.value = "", S(() => o.value?.focus());
127
113
  }
128
- function Ae(e, t) {
129
- t.stopPropagation(), $ == null || $.toggleFavorite(e.id);
114
+ function Qe(e, t) {
115
+ t.stopPropagation(), H?.toggleFavorite(e.id);
130
116
  }
131
- function fe() {
132
- $ && u.value.trim() && $.addQuery(u.value);
117
+ function ve() {
118
+ H && s.value.trim() && H.addQuery(s.value);
133
119
  }
134
- function Le() {
135
- D.value = !D.value, D.value && (R.value = !1);
120
+ function Ae() {
121
+ V.value = !V.value, V.value && (D.value = !1);
136
122
  }
137
- function ze() {
138
- R.value = !R.value, R.value && (D.value = !1);
123
+ function Le() {
124
+ D.value = !D.value, D.value && (V.value = !1);
139
125
  }
140
126
  ee(
141
- () => f.modelValue,
127
+ () => v.modelValue,
142
128
  (e) => {
143
- e !== u.value && (u.value = e);
129
+ e !== s.value && (s.value = e);
144
130
  }
145
131
  ), ee(
146
- () => f.minHeight,
132
+ () => v.minHeight,
147
133
  (e) => {
148
- k.value && (e ? k.value.style.setProperty("--tql-min-height", e) : k.value.style.removeProperty("--tql-min-height"));
134
+ q.value && (e ? q.value.style.setProperty("--tql-min-height", e) : q.value.style.removeProperty("--tql-min-height"));
149
135
  },
150
136
  { immediate: !0 }
151
137
  );
152
- const Ke = H(() => y.value ? !0 : C.value && F.value.length > 0 ? !1 : !!(!x.value || z.value)), J = h({ top: 0, left: 0 }), Oe = H(() => J.value.top > 0 || J.value.left > 0), pe = h({ top: 0, left: 0, width: 0 }), M = h(null), Fe = H(() => {
153
- const e = pe.value;
138
+ const ze = $(() => y.value ? !0 : x.value && O.value.length > 0 ? !1 : !!(!k.value || L.value)), J = h({ top: 0, left: 0 }), Ke = $(() => J.value.top > 0 || J.value.left > 0), fe = h({ top: 0, left: 0, width: 0 }), B = h(null), Oe = $(() => {
139
+ const e = fe.value;
154
140
  return e.top > 0 || e.left > 0 || e.width > 0;
155
141
  });
156
142
  function X() {
157
- if (!k.value)
143
+ if (!q.value)
158
144
  return;
159
- const e = k.value.getBoundingClientRect();
145
+ const e = q.value.getBoundingClientRect();
160
146
  J.value = {
161
147
  top: e.bottom + 4,
162
148
  left: e.left
163
- }, pe.value = {
149
+ }, fe.value = {
164
150
  top: e.bottom + 4,
165
151
  left: e.left,
166
152
  width: e.width
167
- }, M.value && (M.value.style.setProperty("--tql-msg-top", `${e.bottom + 4}px`), M.value.style.setProperty("--tql-msg-left", `${e.left}px`), M.value.style.setProperty("--tql-msg-width", `${e.width}px`));
153
+ }, B.value && (B.value.style.setProperty("--tql-msg-top", `${e.bottom + 4}px`), B.value.style.setProperty("--tql-msg-left", `${e.left}px`), B.value.style.setProperty("--tql-msg-width", `${e.width}px`));
168
154
  }
169
- function Ne(e) {
155
+ function Fe(e) {
170
156
  const t = `tql-token tql-token-${e.type}`;
171
- return I.value.some((o) => e.start >= o.start && e.end <= o.end) ? `${t} tql-token-error-range` : t;
157
+ return R.value.some((u) => e.start >= u.start && e.end <= u.end) ? `${t} tql-token-error-range` : t;
172
158
  }
173
- function he(e) {
159
+ function pe(e) {
174
160
  const t = e.target;
175
- u.value = t.value, q("update:modelValue", t.value), ce(t.value), U.value = Date.now(), z.value = !1, P(() => {
176
- i.value && S(i.value.selectionStart || 0);
161
+ s.value = t.value, b("update:modelValue", t.value), re(t.value), N.value = Date.now(), L.value = !1, S(() => {
162
+ o.value && C(o.value.selectionStart || 0);
177
163
  });
178
164
  }
179
165
  function Y() {
180
- if (i.value) {
181
- const e = i.value.selectionStart || 0;
182
- e !== O.value && S(e);
166
+ if (o.value) {
167
+ const e = o.value.selectionStart || 0;
168
+ e !== K.value && C(e);
183
169
  }
184
170
  }
185
- function me(e) {
186
- var t, l, o, v;
171
+ function he(e) {
187
172
  if (e.key === "Tab" && !e.shiftKey) {
188
- if (Date.now() - W < 200) {
173
+ if (Date.now() - j < 200) {
189
174
  e.preventDefault();
190
175
  return;
191
176
  }
192
- if (K.value.length > 0 && B.value >= 0) {
193
- e.preventDefault(), Ue();
177
+ if (z.value.length > 0 && E.value >= 0) {
178
+ e.preventDefault(), Ne();
194
179
  return;
195
180
  }
196
- if (ye()) {
197
- e.preventDefault(), Ge();
181
+ if (me()) {
182
+ e.preventDefault(), We();
198
183
  return;
199
184
  }
200
- if (je()) {
201
- e.preventDefault(), We();
185
+ if (Ue()) {
186
+ e.preventDefault(), je();
202
187
  return;
203
188
  }
204
- if (C.value && F.value.length > 0) {
205
- e.preventDefault(), (t = L.value) == null || t.selectCurrent();
189
+ if (x.value && O.value.length > 0) {
190
+ e.preventDefault(), A.value?.selectCurrent();
206
191
  return;
207
192
  }
208
193
  return;
209
194
  }
210
- if (C.value && F.value.length > 0)
195
+ if (x.value && O.value.length > 0)
211
196
  switch (e.key) {
212
197
  case "ArrowDown":
213
- e.preventDefault(), (l = L.value) == null || l.moveDown();
198
+ e.preventDefault(), A.value?.moveDown();
214
199
  return;
215
200
  case "ArrowUp":
216
- e.preventDefault(), (o = L.value) == null || o.moveUp();
201
+ e.preventDefault(), A.value?.moveUp();
217
202
  return;
218
203
  case "Enter":
219
- if (!f.multiline)
204
+ if (!v.multiline)
220
205
  break;
221
- e.preventDefault(), (v = L.value) == null || v.selectCurrent();
206
+ e.preventDefault(), A.value?.selectCurrent();
222
207
  return;
223
208
  case "Escape":
224
- e.preventDefault(), G(), ne();
209
+ e.preventDefault(), G(), ie();
225
210
  return;
226
211
  }
227
212
  if (e.key === " " && e.ctrlKey) {
228
213
  e.preventDefault(), ae();
229
214
  return;
230
215
  }
231
- e.key === "Enter" && (f.multiline && e.ctrlKey || !f.multiline && !C.value) && (e.preventDefault(), fe(), q("submit", u.value));
216
+ e.key === "Enter" && (v.multiline && e.ctrlKey || !v.multiline && !x.value) && (e.preventDefault(), ve(), b("submit", s.value));
232
217
  }
233
- function Ue() {
234
- if (B.value++, B.value >= K.value.length) {
235
- ne();
218
+ function Ne() {
219
+ if (E.value++, E.value >= z.value.length) {
220
+ ie();
236
221
  return;
237
222
  }
238
- const e = K.value[B.value];
239
- i.value && (i.value.setSelectionRange(e.start, e.end), i.value.focus(), S(e.start));
223
+ const e = z.value[E.value];
224
+ o.value && (o.value.setSelectionRange(e.start, e.end), o.value.focus(), C(e.start));
240
225
  }
241
- function ne() {
242
- K.value = [], B.value = -1;
226
+ function ie() {
227
+ z.value = [], E.value = -1;
243
228
  }
244
- function ye() {
245
- var v;
246
- const e = ((v = i.value) == null ? void 0 : v.selectionStart) ?? O.value, t = u.value;
247
- let l = !1, o = null;
248
- for (let d = 0; d < e; d++) {
249
- const p = t[d], w = d > 0 ? t[d - 1] : "";
250
- (p === '"' || p === "'") && w !== "\\" && (l ? p === o && (l = !1, o = null) : (l = !0, o = p));
229
+ function me() {
230
+ const e = o.value?.selectionStart ?? K.value, t = s.value;
231
+ let l = !1, u = null;
232
+ for (let r = 0; r < e; r++) {
233
+ const f = t[r], p = r > 0 ? t[r - 1] : "";
234
+ (f === '"' || f === "'") && p !== "\\" && (l ? f === u && (l = !1, u = null) : (l = !0, u = f));
251
235
  }
252
236
  return l;
253
237
  }
254
- function je() {
255
- var o;
256
- const e = ((o = i.value) == null ? void 0 : o.selectionStart) ?? O.value, t = u.value;
238
+ function Ue() {
239
+ const e = o.value?.selectionStart ?? K.value, t = s.value;
257
240
  if (e === 0) return !1;
258
241
  const l = t[e - 1];
259
- return l !== '"' && l !== "'" ? !1 : !ye();
242
+ return l !== '"' && l !== "'" ? !1 : !me();
260
243
  }
261
- function We() {
262
- var p;
263
- W = Date.now();
264
- const e = ((p = i.value) == null ? void 0 : p.selectionStart) ?? O.value, t = u.value, l = t[e];
244
+ function je() {
245
+ j = Date.now();
246
+ const e = o.value?.selectionStart ?? K.value, t = s.value, l = t[e];
265
247
  if (l === " " || l === `
266
248
  ` || l === " ") {
267
- const w = e + 1;
268
- i.value && (i.value.setSelectionRange(w, w), S(w));
249
+ const p = e + 1;
250
+ o.value && (o.value.setSelectionRange(p, p), C(p));
269
251
  return;
270
252
  }
271
- const o = t.substring(0, e), v = t.substring(e), d = o + " " + v;
272
- u.value = d, q("update:modelValue", d), P(() => {
273
- if (i.value) {
274
- const w = e + 1;
275
- i.value.setSelectionRange(w, w), S(w);
253
+ const u = t.substring(0, e), r = t.substring(e), f = u + " " + r;
254
+ s.value = f, b("update:modelValue", f), S(() => {
255
+ if (o.value) {
256
+ const p = e + 1;
257
+ o.value.setSelectionRange(p, p), C(p);
276
258
  }
277
259
  });
278
260
  }
279
- function Ge() {
280
- var l;
281
- W = Date.now();
282
- const e = ((l = i.value) == null ? void 0 : l.selectionStart) ?? O.value, t = u.value;
283
- for (let o = e; o < t.length; o++)
284
- if (t[o] === '"' || t[o] === "'") {
285
- const v = o + 1, d = t[v];
286
- if (d && d !== " " && d !== `
287
- ` && d !== " ")
288
- i.value && (i.value.setSelectionRange(v, v), S(v));
289
- else if (!d || d === " " || d === `
290
- ` || d === " ")
291
- if (d) {
292
- const p = v + 1;
293
- i.value && (i.value.setSelectionRange(p, p), S(p));
261
+ function We() {
262
+ j = Date.now();
263
+ const e = o.value?.selectionStart ?? K.value, t = s.value;
264
+ for (let l = e; l < t.length; l++)
265
+ if (t[l] === '"' || t[l] === "'") {
266
+ const u = l + 1, r = t[u];
267
+ if (r && r !== " " && r !== `
268
+ ` && r !== " ")
269
+ o.value && (o.value.setSelectionRange(u, u), C(u));
270
+ else if (!r || r === " " || r === `
271
+ ` || r === " ")
272
+ if (r) {
273
+ const f = u + 1;
274
+ o.value && (o.value.setSelectionRange(f, f), C(f));
294
275
  } else {
295
- const p = t + " ";
296
- u.value = p, q("update:modelValue", p), P(() => {
297
- if (i.value) {
298
- const w = v + 1;
299
- i.value.setSelectionRange(w, w), S(w);
276
+ const f = t + " ";
277
+ s.value = f, b("update:modelValue", f), S(() => {
278
+ if (o.value) {
279
+ const p = u + 1;
280
+ o.value.setSelectionRange(p, p), C(p);
300
281
  }
301
282
  });
302
283
  }
303
284
  return;
304
285
  }
305
286
  }
306
- function ge() {
307
- x.value = !0, z.value = !1, U.value = Date.now(), P(() => {
287
+ function ye() {
288
+ k.value = !0, L.value = !1, N.value = Date.now(), S(() => {
308
289
  X(), ae();
309
290
  });
310
291
  }
311
- function we(e) {
312
- const l = e.relatedTarget;
313
- if (l != null && l.closest(".tql-autocomplete-dropdown")) {
292
+ function ge(e) {
293
+ if (e.relatedTarget?.closest(".tql-autocomplete-dropdown")) {
314
294
  setTimeout(() => {
315
- x.value || (G(), y.value = !1);
295
+ k.value || (G(), y.value = !1);
316
296
  }, 300);
317
297
  return;
318
298
  }
319
- x.value = !1, setTimeout(() => {
320
- x.value || (G(), y.value = !1);
299
+ k.value = !1, setTimeout(() => {
300
+ k.value || (G(), y.value = !1);
321
301
  }, 200);
322
302
  }
323
- function Je(e) {
324
- W = Date.now();
325
- const t = He(e);
326
- u.value = t.query, q("update:modelValue", t.query), t.placeholders.length > 0 ? (K.value = t.placeholders, B.value = 0) : ne(), P(() => {
327
- i.value && (i.value.focus(), i.value.setSelectionRange(t.newCursorPosition, t.newCursorPosition), S(t.newCursorPosition), ae());
303
+ function Ge(e) {
304
+ j = Date.now();
305
+ const t = Ie(e);
306
+ s.value = t.query, b("update:modelValue", t.query), t.placeholders.length > 0 ? (z.value = t.placeholders, E.value = 0) : ie(), S(() => {
307
+ o.value && (o.value.focus(), o.value.setSelectionRange(t.newCursorPosition, t.newCursorPosition), C(t.newCursorPosition), ae());
328
308
  });
329
309
  }
330
- function Xe(e) {
331
- const t = Te(e);
332
- u.value = t, q("update:modelValue", t), P(() => {
333
- i.value && i.value.focus();
310
+ function Je(e) {
311
+ const t = Ee(e);
312
+ s.value = t, b("update:modelValue", t), S(() => {
313
+ o.value && o.value.focus();
334
314
  });
335
315
  }
336
- function Ye() {
337
- var e;
338
- (e = i.value) == null || e.focus();
316
+ function Xe() {
317
+ o.value?.focus();
339
318
  }
340
- function Ze() {
341
- var e;
342
- (e = i.value) == null || e.blur();
319
+ function Ye() {
320
+ o.value?.blur();
343
321
  }
344
- function be() {
345
- var e;
346
- return ((e = i.value) == null ? void 0 : e.selectionStart) || 0;
322
+ function we() {
323
+ return o.value?.selectionStart || 0;
347
324
  }
348
- function qe(e) {
349
- i.value && (i.value.setSelectionRange(e, e), S(e));
325
+ function be(e) {
326
+ o.value && (o.value.setSelectionRange(e, e), C(e));
350
327
  }
351
- function _e(e) {
352
- const t = be(), l = u.value.substring(0, t), o = u.value.substring(t), v = l + e + o;
353
- u.value = v, q("update:modelValue", v), P(() => {
354
- qe(t + e.length);
328
+ function Ze(e) {
329
+ const t = we(), l = s.value.substring(0, t), u = s.value.substring(t), r = l + e + u;
330
+ s.value = r, b("update:modelValue", r), S(() => {
331
+ be(t + e.length);
355
332
  });
356
333
  }
357
- function et(e) {
358
- const l = Date.now() - e, o = Math.floor(l / 1e3), v = Math.floor(o / 60), d = Math.floor(v / 60), p = Math.floor(d / 24);
359
- return p > 0 ? `${p}d ago` : d > 0 ? `${d}h ago` : v > 0 ? `${v}m ago` : "just now";
334
+ function _e(e) {
335
+ const l = Date.now() - e, u = Math.floor(l / 1e3), r = Math.floor(u / 60), f = Math.floor(r / 60), p = Math.floor(f / 24);
336
+ return p > 0 ? `${p}d ago` : f > 0 ? `${f}h ago` : r > 0 ? `${r}m ago` : "just now";
360
337
  }
361
- function ke(e) {
362
- var l;
338
+ function qe(e) {
363
339
  const t = e.target;
364
- (l = k.value) != null && l.contains(t) || (D.value = !1, R.value = !1);
340
+ q.value?.contains(t) || (V.value = !1, D.value = !1);
365
341
  }
366
- Se({
367
- focus: Ye,
368
- blur: Ze,
369
- validate: Ee,
370
- insertText: _e,
371
- insertSnippet: Xe,
372
- getTokenAtPosition: Be,
373
- getCursorPosition: be,
374
- setCursorPosition: qe
342
+ Ce({
343
+ // Methods
344
+ focus: Xe,
345
+ blur: Ye,
346
+ validate: $e,
347
+ insertText: Ze,
348
+ insertSnippet: Je,
349
+ getTokenAtPosition: He,
350
+ getCursorPosition: we,
351
+ setCursorPosition: be,
352
+ // Reactive state for form validation
353
+ isValid: W,
354
+ hasErrors: T,
355
+ errors: R
375
356
  });
376
357
  function Z() {
377
- (C.value || E.value) && x.value && X();
358
+ (x.value || T.value) && k.value && X();
378
359
  }
379
- return lt(() => {
380
- document.addEventListener("selectionchange", Y), document.addEventListener("click", ke), window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z), f.minHeight && k.value && k.value.style.setProperty("--tql-min-height", f.minHeight), j = setInterval(() => {
381
- x.value && U.value > 0 && Date.now() - U.value >= At && !z.value && (z.value = !0);
382
- }, 500), P(() => {
360
+ return tt(() => {
361
+ document.addEventListener("selectionchange", Y), document.addEventListener("click", qe), window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z), v.minHeight && q.value && q.value.style.setProperty("--tql-min-height", v.minHeight), U = setInterval(() => {
362
+ k.value && N.value > 0 && Date.now() - N.value >= Qt && !L.value && (L.value = !0);
363
+ }, 500), S(() => {
383
364
  X();
384
365
  });
385
366
  }), ee(
386
- () => E.value,
367
+ () => T.value,
387
368
  (e) => {
388
- e && P(() => {
369
+ e && S(() => {
389
370
  X();
390
371
  });
391
372
  },
392
373
  { immediate: !0 }
393
374
  ), ee(
394
- M,
375
+ B,
395
376
  (e) => {
396
- if (e && k.value) {
397
- const t = k.value.getBoundingClientRect();
377
+ if (e && q.value) {
378
+ const t = q.value.getBoundingClientRect();
398
379
  e.style.setProperty("--tql-msg-top", `${t.bottom + 4}px`), e.style.setProperty("--tql-msg-left", `${t.left}px`), e.style.setProperty("--tql-msg-width", `${t.width}px`);
399
380
  }
400
381
  }
401
- ), ot(() => {
402
- document.removeEventListener("selectionchange", Y), document.removeEventListener("click", ke), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z), j && (clearInterval(j), j = null);
403
- }), (e, t) => (a(), s("div", {
382
+ ), lt(() => {
383
+ document.removeEventListener("selectionchange", Y), document.removeEventListener("click", qe), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z), U && (clearInterval(U), U = null);
384
+ }), (e, t) => (a(), n("div", {
404
385
  ref_key: "wrapperRef",
405
- ref: k,
406
- class: V([
386
+ ref: q,
387
+ class: P([
407
388
  "tql-input-wrapper",
408
389
  {
409
- "tql-input-focused": x.value,
410
- "tql-input-invalid": r(E) && n.showValidation,
411
- "tql-input-valid": queryState.value === "valid" && n.showValidation && u.value.trim(),
412
- "tql-input-slow": queryState.value === "slow" && n.showValidation && u.value.trim(),
413
- "tql-input-disabled": n.disabled,
414
- "tql-input-multiline": n.multiline,
415
- "tql-input-autocomplete-active": r(C),
416
- "tql-input-resizable": n.resizable && n.multiline,
417
- "tql-input-has-min-height": !!n.minHeight
390
+ "tql-input-focused": k.value,
391
+ "tql-input-invalid": c(T) && i.showValidation,
392
+ "tql-input-disabled": i.disabled,
393
+ "tql-input-multiline": i.multiline,
394
+ "tql-input-autocomplete-active": c(x),
395
+ "tql-input-resizable": i.resizable && i.multiline,
396
+ "tql-input-has-min-height": !!i.minHeight
418
397
  }
419
398
  ])
420
399
  }, [
421
- n.syntaxHighlighting ? (a(), s("div", dt, [
422
- (a(!0), s(Q, null, N(r(Ie), (l, o) => (a(), s("span", {
423
- key: o,
424
- class: V(Ne(l))
425
- }, b(l.raw || l.value), 3))), 128))
400
+ i.syntaxHighlighting ? (a(), n("div", ct, [
401
+ (a(!0), n(M, null, F(c(Te), (l, u) => (a(), n("span", {
402
+ key: u,
403
+ class: P(Fe(l))
404
+ }, w(l.raw || l.value), 3))), 128))
426
405
  ])) : m("", !0),
427
- n.multiline ? se((a(), s("textarea", {
406
+ i.multiline ? ne((a(), n("textarea", {
428
407
  key: 1,
429
- id: re,
408
+ id: ue,
430
409
  ref_key: "inputRef",
431
- ref: i,
432
- "onUpdate:modelValue": t[0] || (t[0] = (l) => u.value = l),
433
- class: V(["tql-input", { "tql-input-highlighted": n.syntaxHighlighting, "tql-input-resizable-textarea": n.resizable }]),
434
- placeholder: n.placeholder,
435
- disabled: n.disabled,
436
- readonly: n.readonly,
437
- rows: n.rows,
410
+ ref: o,
411
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => s.value = l),
412
+ class: P(["tql-input", { "tql-input-highlighted": i.syntaxHighlighting, "tql-input-resizable-textarea": i.resizable }]),
413
+ placeholder: i.placeholder,
414
+ disabled: i.disabled,
415
+ readonly: i.readonly,
416
+ rows: i.rows,
438
417
  role: "combobox",
439
- "aria-expanded": r(C) && x.value,
418
+ "aria-expanded": c(x) && k.value,
440
419
  "aria-controls": le,
441
- "aria-invalid": r(E) && n.showValidation,
442
- "aria-describedby": r(E) && y.value ? oe : void 0,
420
+ "aria-invalid": c(T) && i.showValidation,
421
+ "aria-describedby": c(T) && y.value ? oe : void 0,
443
422
  "aria-autocomplete": "list",
444
423
  "aria-haspopup": "listbox",
445
424
  spellcheck: "false",
446
425
  autocomplete: "off",
447
426
  autocapitalize: "off",
448
- onInput: he,
449
- onKeydown: me,
450
- onFocus: ge,
451
- onBlur: we,
427
+ onInput: pe,
428
+ onKeydown: he,
429
+ onFocus: ye,
430
+ onBlur: ge,
452
431
  onClick: Y
453
- }, null, 42, vt)), [
454
- [ue, u.value]
455
- ]) : se((a(), s("input", {
432
+ }, null, 42, dt)), [
433
+ [se, s.value]
434
+ ]) : ne((a(), n("input", {
456
435
  key: 2,
457
- id: re,
436
+ id: ue,
458
437
  ref_key: "inputRef",
459
- ref: i,
460
- "onUpdate:modelValue": t[1] || (t[1] = (l) => u.value = l),
438
+ ref: o,
439
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => s.value = l),
461
440
  type: "text",
462
- class: V(["tql-input", { "tql-input-highlighted": n.syntaxHighlighting }]),
463
- placeholder: n.placeholder,
464
- disabled: n.disabled,
465
- readonly: n.readonly,
441
+ class: P(["tql-input", { "tql-input-highlighted": i.syntaxHighlighting }]),
442
+ placeholder: i.placeholder,
443
+ disabled: i.disabled,
444
+ readonly: i.readonly,
466
445
  role: "combobox",
467
- "aria-expanded": r(C) && x.value,
446
+ "aria-expanded": c(x) && k.value,
468
447
  "aria-controls": le,
469
- "aria-invalid": r(E) && n.showValidation,
470
- "aria-describedby": r(E) && y.value ? oe : void 0,
448
+ "aria-invalid": c(T) && i.showValidation,
449
+ "aria-describedby": c(T) && y.value ? oe : void 0,
471
450
  "aria-autocomplete": "list",
472
451
  "aria-haspopup": "listbox",
473
452
  spellcheck: "false",
474
453
  autocomplete: "off",
475
454
  autocapitalize: "off",
476
- onInput: he,
477
- onKeydown: me,
478
- onFocus: ge,
479
- onBlur: we,
455
+ onInput: pe,
456
+ onKeydown: he,
457
+ onFocus: ye,
458
+ onBlur: ge,
480
459
  onClick: Y
481
- }, null, 42, ft)), [
482
- [ue, u.value]
460
+ }, null, 42, vt)), [
461
+ [se, s.value]
483
462
  ]),
484
- c("div", pt, [
485
- n.showComplexity && g.value && u.value.trim() ? (a(), s("div", {
463
+ d("div", ft, [
464
+ i.showComplexity && g.value && s.value.trim() ? (a(), n("div", {
486
465
  key: 0,
487
- class: V(["tql-complexity-badge", Me.value]),
488
- title: `${de.value} complexity - ${g.value.warnings.length} warning(s)`
466
+ class: P(["tql-complexity-badge", Be.value]),
467
+ title: `${ce.value} complexity - ${g.value.warnings.length} warning(s)`
489
468
  }, [
490
- c("span", mt, b(de.value), 1),
491
- g.value.warnings.length > 0 ? (a(), s("span", yt, b(g.value.warnings.length), 1)) : m("", !0)
492
- ], 10, ht)) : m("", !0),
493
- n.showHistory ? (a(), s("button", {
469
+ d("span", ht, w(ce.value), 1),
470
+ g.value.warnings.length > 0 ? (a(), n("span", mt, w(g.value.warnings.length), 1)) : m("", !0)
471
+ ], 10, pt)) : m("", !0),
472
+ i.showHistory ? (a(), n("button", {
494
473
  key: 1,
495
474
  type: "button",
496
- class: V(["tql-toolbar-button", { "tql-toolbar-button--active": D.value }]),
475
+ class: P(["tql-toolbar-button", { "tql-toolbar-button--active": V.value }]),
497
476
  title: "Query history",
498
- onClick: A(Le, ["stop"])
477
+ onClick: Q(Ae, ["stop"])
499
478
  }, [...t[10] || (t[10] = [
500
- c("i", { class: "pi pi-history" }, null, -1)
479
+ d("i", { class: "pi pi-history" }, null, -1)
501
480
  ])], 2)) : m("", !0),
502
- n.showPreview ? (a(), s("button", {
481
+ i.showPreview ? (a(), n("button", {
503
482
  key: 2,
504
483
  type: "button",
505
- class: V(["tql-toolbar-button", { "tql-toolbar-button--active": R.value }]),
484
+ class: P(["tql-toolbar-button", { "tql-toolbar-button--active": D.value }]),
506
485
  title: "Preview query structure",
507
- onClick: A(ze, ["stop"])
486
+ onClick: Q(Le, ["stop"])
508
487
  }, [...t[11] || (t[11] = [
509
- c("i", { class: "pi pi-sitemap" }, null, -1)
488
+ d("i", { class: "pi pi-sitemap" }, null, -1)
510
489
  ])], 2)) : m("", !0),
511
- n.showSnippetButton && n.snippets && n.snippets.length > 0 ? (a(), s("button", {
490
+ i.showSnippetButton && i.snippets && i.snippets.length > 0 ? (a(), n("button", {
512
491
  key: 3,
513
492
  type: "button",
514
493
  class: "tql-toolbar-button tql-snippet-button",
515
494
  title: "Insert snippet",
516
- onClick: t[2] || (t[2] = A(() => {
495
+ onClick: t[2] || (t[2] = Q(() => {
517
496
  }, ["stop"]))
518
497
  }, [...t[12] || (t[12] = [
519
- c("i", { class: "pi pi-code" }, null, -1)
498
+ d("i", { class: "pi pi-code" }, null, -1)
520
499
  ])])) : m("", !0),
521
- n.showValidation && u.value ? (a(), s("div", gt, [
522
- queryState.value === "slow" ? (a(), s("i", {
523
- key: 0,
524
- class: "pi pi-clock tql-slow-indicator",
525
- title: "This query uses enrichment mutators (geo, nslookup) which require post-processing and may be slower"
526
- })) : m("", !0),
527
- r(ie) && queryState.value !== "slow" ? (a(), s("i", { key: 1, class: "pi pi-check-circle tql-icon-valid", "aria-label": "Query is valid" })) : queryState.value === "slow" && r(ie) ? (a(), s("i", { key: 2, class: "pi pi-check-circle tql-icon-valid", "aria-label": "Query is valid (with enrichment)" })) : (a(), s("i", {
528
- key: 3,
500
+ i.showValidation && s.value ? (a(), n("div", yt, [
501
+ c(W) ? (a(), n("i", gt)) : (a(), n("i", {
502
+ key: 1,
529
503
  class: "pi pi-exclamation-circle tql-icon-invalid tql-icon-clickable",
530
504
  role: "button",
531
505
  tabindex: "0",
532
506
  title: "Click to show/hide errors",
533
- "aria-label": `Query has ${r(I).length} error${r(I).length === 1 ? "" : "s"}. Click to ${y.value ? "hide" : "show"} details.`,
507
+ "aria-label": `Query has ${c(R).length} error${c(R).length === 1 ? "" : "s"}. Click to ${y.value ? "hide" : "show"} details.`,
534
508
  "aria-expanded": y.value,
535
509
  onClick: t[3] || (t[3] = (l) => y.value = !y.value),
536
510
  onKeydown: [
537
- t[4] || (t[4] = xe((l) => y.value = !y.value, ["enter"])),
538
- t[5] || (t[5] = xe(A((l) => y.value = !y.value, ["prevent"]), ["space"]))
511
+ t[4] || (t[4] = ke((l) => y.value = !y.value, ["enter"])),
512
+ t[5] || (t[5] = ke(Q((l) => y.value = !y.value, ["prevent"]), ["space"]))
539
513
  ]
540
- }, null, 40, bt))
514
+ }, null, 40, wt))
541
515
  ])) : m("", !0)
542
516
  ]),
543
- n.showHistory && D.value ? (a(), s("div", {
517
+ i.showHistory && V.value ? (a(), n("div", {
544
518
  key: 3,
545
519
  class: "tql-history-dropdown",
546
- onClick: t[8] || (t[8] = A(() => {
520
+ onClick: t[8] || (t[8] = Q(() => {
547
521
  }, ["stop"]))
548
522
  }, [
549
- c("div", qt, [
550
- se(c("input", {
551
- "onUpdate:modelValue": t[6] || (t[6] = (l) => T.value = l),
523
+ d("div", bt, [
524
+ ne(d("input", {
525
+ "onUpdate:modelValue": t[6] || (t[6] = (l) => I.value = l),
552
526
  type: "text",
553
527
  class: "tql-history-search",
554
528
  placeholder: "Search history...",
555
- onKeydown: t[7] || (t[7] = A(() => {
529
+ onKeydown: t[7] || (t[7] = Q(() => {
556
530
  }, ["stop"]))
557
531
  }, null, 544), [
558
- [ue, T.value]
532
+ [se, I.value]
559
533
  ])
560
534
  ]),
561
- c("div", kt, [
562
- (a(!0), s(Q, null, N(ve.value, (l) => (a(), s("div", {
535
+ d("div", qt, [
536
+ (a(!0), n(M, null, F(de.value, (l) => (a(), n("div", {
563
537
  key: l.id,
564
- class: V(["tql-history-item", { "tql-history-item--favorite": l.isFavorite }]),
565
- onClick: (o) => Qe(l)
538
+ class: P(["tql-history-item", { "tql-history-item--favorite": l.isFavorite }]),
539
+ onClick: (u) => Me(l)
566
540
  }, [
567
- c("button", {
541
+ d("button", {
568
542
  type: "button",
569
543
  class: "tql-history-favorite",
570
544
  title: l.isFavorite ? "Remove from favorites" : "Add to favorites",
571
- onClick: (o) => Ae(l, o)
545
+ onClick: (u) => Qe(l, u)
572
546
  }, [
573
- c("i", {
574
- class: V(l.isFavorite ? "pi pi-star-fill" : "pi pi-star")
547
+ d("i", {
548
+ class: P(l.isFavorite ? "pi pi-star-fill" : "pi pi-star")
575
549
  }, null, 2)
576
- ], 8, Ct),
577
- c("div", St, [
578
- l.label ? (a(), s("div", Pt, b(l.label), 1)) : m("", !0),
579
- c("div", Vt, b(l.query), 1)
550
+ ], 8, xt),
551
+ d("div", Ct, [
552
+ l.label ? (a(), n("div", St, w(l.label), 1)) : m("", !0),
553
+ d("div", Pt, w(l.query), 1)
580
554
  ]),
581
- c("div", Dt, b(et(l.timestamp)), 1)
582
- ], 10, xt))), 128)),
583
- ve.value.length === 0 ? (a(), s("div", Rt, b(T.value ? "No matching queries" : "No query history"), 1)) : m("", !0)
555
+ d("div", Vt, w(_e(l.timestamp)), 1)
556
+ ], 10, kt))), 128)),
557
+ de.value.length === 0 ? (a(), n("div", Dt, w(I.value ? "No matching queries" : "No query history"), 1)) : m("", !0)
584
558
  ])
585
559
  ])) : m("", !0),
586
- Ce(nt, {
560
+ xe(it, {
587
561
  id: le,
588
562
  ref_key: "autocompleteRef",
589
- ref: L,
590
- items: r(F),
591
- visible: r(C) && x.value && Oe.value,
563
+ ref: A,
564
+ items: c(O),
565
+ visible: c(x) && k.value && Ke.value,
592
566
  position: J.value,
593
- onSelect: Je,
594
- onClose: r(G)
567
+ onSelect: Ge,
568
+ onClose: c(G)
595
569
  }, null, 8, ["items", "visible", "position", "onClose"]),
596
- (a(), it(at, { to: "body" }, [
597
- n.showValidation && !r(ie) && Ke.value && u.value && r(I).length > 0 && !(r(C) && r(F).length > 0) && Fe.value ? (a(), s("div", {
570
+ (a(), ot(at, { to: "body" }, [
571
+ i.showValidation && !c(W) && ze.value && s.value && c(R).length > 0 && !(c(x) && c(O).length > 0) && Oe.value ? (a(), n("div", {
598
572
  key: 0,
599
573
  ref_key: "validationMessagesRef",
600
- ref: M,
574
+ ref: B,
601
575
  id: oe,
602
576
  class: "tql-validation-messages-portal",
603
577
  role: "alert",
604
578
  "aria-live": "polite"
605
579
  }, [
606
- (a(!0), s(Q, null, N(r(I).slice(0, 3), (l, o) => (a(), s("div", {
607
- key: o,
580
+ (a(!0), n(M, null, F(c(R).slice(0, 3), (l, u) => (a(), n("div", {
581
+ key: u,
608
582
  class: "tql-error-message"
609
583
  }, [
610
- t[13] || (t[13] = c("i", {
584
+ t[13] || (t[13] = d("i", {
611
585
  class: "pi pi-exclamation-triangle",
612
586
  "aria-hidden": "true"
613
587
  }, null, -1)),
614
- c("span", null, b(l.message), 1),
615
- l.suggestion ? (a(), s("span", $t, b(l.suggestion), 1)) : m("", !0)
588
+ d("span", null, w(l.message), 1),
589
+ l.suggestion ? (a(), n("span", Rt, w(l.suggestion), 1)) : m("", !0)
616
590
  ]))), 128))
617
591
  ], 512)) : m("", !0)
618
592
  ])),
619
- n.showComplexity && g.value && g.value.warnings.length > 0 && !r(C) ? (a(), s("div", It, [
620
- (a(!0), s(Q, null, N(g.value.warnings.slice(0, 3), (l, o) => (a(), s("div", {
621
- key: o,
622
- class: V(["tql-complexity-warning", `tql-complexity-warning--${l.severity}`])
593
+ i.showComplexity && g.value && g.value.warnings.length > 0 && !c(x) ? (a(), n("div", Tt, [
594
+ (a(!0), n(M, null, F(g.value.warnings.slice(0, 3), (l, u) => (a(), n("div", {
595
+ key: u,
596
+ class: P(["tql-complexity-warning", `tql-complexity-warning--${l.severity}`])
623
597
  }, [
624
- t[14] || (t[14] = c("i", {
598
+ t[14] || (t[14] = d("i", {
625
599
  class: "pi pi-info-circle",
626
600
  "aria-hidden": "true"
627
601
  }, null, -1)),
628
- c("span", null, b(l.message), 1)
602
+ d("span", null, w(l.message), 1)
629
603
  ], 2))), 128)),
630
- g.value.suggestions.length > 0 ? (a(), s("div", Et, [
631
- (a(!0), s(Q, null, N(g.value.suggestions.slice(0, 2), (l, o) => (a(), s("div", {
632
- key: o,
604
+ g.value.suggestions.length > 0 ? (a(), n("div", $t, [
605
+ (a(!0), n(M, null, F(g.value.suggestions.slice(0, 2), (l, u) => (a(), n("div", {
606
+ key: u,
633
607
  class: "tql-complexity-suggestion"
634
608
  }, [
635
- t[15] || (t[15] = c("i", {
609
+ t[15] || (t[15] = d("i", {
636
610
  class: "pi pi-lightbulb",
637
611
  "aria-hidden": "true"
638
612
  }, null, -1)),
639
- c("span", null, b(l), 1)
613
+ d("span", null, w(l), 1)
640
614
  ]))), 128))
641
615
  ])) : m("", !0)
642
616
  ])) : m("", !0),
643
- n.showPreview && R.value && u.value.trim() ? (a(), s("div", Ht, [
644
- c("div", Tt, [
645
- t[17] || (t[17] = c("span", null, "Query Structure", -1)),
646
- c("button", {
617
+ i.showPreview && D.value && s.value.trim() ? (a(), n("div", It, [
618
+ d("div", Et, [
619
+ t[17] || (t[17] = d("span", null, "Query Structure", -1)),
620
+ d("button", {
647
621
  type: "button",
648
622
  class: "tql-preview-close",
649
623
  title: "Close preview",
650
- onClick: t[9] || (t[9] = (l) => R.value = !1)
624
+ onClick: t[9] || (t[9] = (l) => D.value = !1)
651
625
  }, [...t[16] || (t[16] = [
652
- c("i", { class: "pi pi-times" }, null, -1)
626
+ d("i", { class: "pi pi-times" }, null, -1)
653
627
  ])])
654
628
  ]),
655
- Ce(st, {
656
- query: u.value,
629
+ xe(nt, {
630
+ query: s.value,
657
631
  "show-complexity": !1,
658
632
  "show-field-usage": !0,
659
633
  "show-logic-tree": !0,
660
634
  compact: ""
661
635
  }, null, 8, ["query"])
662
636
  ])) : m("", !0),
663
- c("div", Bt, [
664
- n.showValidation && u.value ? (a(), s(Q, { key: 0 }, [
665
- r(ie) ? (a(), s("span", Mt, "Query syntax is valid")) : (a(), s("span", Qt, "Query has " + b(r(I).length) + " validation error" + b(r(I).length === 1 ? "" : "s"), 1))
637
+ d("div", Ht, [
638
+ i.showValidation && s.value ? (a(), n(M, { key: 0 }, [
639
+ c(W) ? (a(), n("span", Bt, "Query syntax is valid")) : (a(), n("span", Mt, "Query has " + w(c(R).length) + " validation error" + w(c(R).length === 1 ? "" : "s"), 1))
666
640
  ], 64)) : m("", !0)
667
641
  ])
668
642
  ], 2));
669
643
  }
670
644
  });
671
645
  export {
672
- Ut as default
646
+ Nt as default
673
647
  };