@aintela/chat 0.2.18 → 0.2.22

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.
Files changed (33) hide show
  1. package/dist/{auth-CcTgInbY.js → auth-DbmLacBc.js} +2 -2
  2. package/dist/{auth-CcTgInbY.js.map → auth-DbmLacBc.js.map} +1 -1
  3. package/dist/components.js +5868 -5530
  4. package/dist/components.js.map +1 -1
  5. package/dist/hooks.js +5 -4
  6. package/dist/{httpArtifactService-BAR60Gu1.js → httpArtifactService-Dh9LGQ9a.js} +2 -2
  7. package/dist/{httpArtifactService-BAR60Gu1.js.map → httpArtifactService-Dh9LGQ9a.js.map} +1 -1
  8. package/dist/index.js +126 -122
  9. package/dist/{sortable-table-DgQHxWIh.js → promptHighlight-BHSQkdFs.js} +330 -282
  10. package/dist/promptHighlight-BHSQkdFs.js.map +1 -0
  11. package/dist/services.js +1 -1
  12. package/dist/src/components/AiChat/AiChatContext.d.ts +14 -2
  13. package/dist/src/components/AiChat/AiChatTypes.d.ts +28 -0
  14. package/dist/src/components/AiChat/ChatPane/AskUserSheet.d.ts +2 -1
  15. package/dist/src/components/AiChat/ChatPane/GuestIcon.d.ts +19 -0
  16. package/dist/src/components/AiChat/ChatPane/parts/AskAuthPart.d.ts +8 -0
  17. package/dist/src/components/AiChat/ChatPane/parts/types.d.ts +6 -1
  18. package/dist/src/components/index.d.ts +1 -1
  19. package/dist/src/components/v2/PromptDateMarkers.d.ts +15 -0
  20. package/dist/src/components/v2/PromptV2.d.ts +18 -0
  21. package/dist/src/components/v2/index.d.ts +2 -0
  22. package/dist/src/hooks/index.d.ts +2 -0
  23. package/dist/src/hooks/usePromptAssist.d.ts +58 -0
  24. package/dist/src/services/httpPromptAssistService.d.ts +58 -0
  25. package/dist/src/utils/index.d.ts +2 -0
  26. package/dist/src/utils/promptHighlight.d.ts +16 -0
  27. package/dist/useContainerWidth-DsNHNR-z.js +187 -0
  28. package/dist/useContainerWidth-DsNHNR-z.js.map +1 -0
  29. package/dist/utils.js +34 -32
  30. package/package.json +1 -1
  31. package/dist/sortable-table-DgQHxWIh.js.map +0 -1
  32. package/dist/useContainerWidth-Df2PmSoC.js +0 -52
  33. package/dist/useContainerWidth-Df2PmSoC.js.map +0 -1
@@ -1,122 +1,122 @@
1
- var A = Object.defineProperty;
2
- var h = (a, t) => A(a, "name", { value: t, configurable: !0 });
3
- const $ = /* @__PURE__ */ h((a) => {
4
- if (a[0] == "#")
1
+ var L = Object.defineProperty;
2
+ var h = (i, t) => L(i, "name", { value: t, configurable: !0 });
3
+ const D = /* @__PURE__ */ h((i) => {
4
+ if (i[0] == "#")
5
5
  return null;
6
- const t = a.split("/");
6
+ const t = i.split("/");
7
7
  let e = t[t.length - 1];
8
8
  if (e == "" && t.length > 1 && (e = t[t.length - 2]), e == "")
9
9
  return null;
10
- const s = e.split("?")[0];
11
- return s.startsWith("#") ? s : s.split("#")[0];
12
- }, "parseAndValidateArtifactUrl"), W = /* @__PURE__ */ h((a, t, e) => {
13
- let s = "URL", o = null, i = null, r = null;
14
- if (a[0] == "#") {
15
- const n = a.indexOf("-"), l = a.slice(1, n);
16
- switch (r = a.slice(n + 1), l.toLowerCase()) {
10
+ const r = e.split("?")[0];
11
+ return r.startsWith("#") ? r : r.split("#")[0];
12
+ }, "parseAndValidateArtifactUrl"), M = /* @__PURE__ */ h((i, t, e) => {
13
+ let r = "URL", n = null, o = null, s = null;
14
+ if (i[0] == "#") {
15
+ const a = i.indexOf("-"), l = i.slice(1, a);
16
+ switch (s = i.slice(a + 1), l.toLowerCase()) {
17
17
  case "opendashboard":
18
- s = "OpenDashboard";
18
+ r = "OpenDashboard";
19
19
  break;
20
20
  case "ask":
21
- s = "Question", o = e;
21
+ r = "Question", n = e;
22
22
  break;
23
23
  }
24
24
  } else
25
- a.indexOf("http") > -1 ? (s = "URL", i = a) : (a = a.replaceAll("exported/", `exported/${t}/`), s = "Export");
26
- return { action: s, url: i, question: o, parameter: r };
27
- }, "extractLinkAction"), E = /* @__PURE__ */ h((a, t) => Array.from(
28
- { length: Math.ceil(a.length / t) },
29
- (e, s) => a.slice(s * t, s * t + t)
30
- ), "chunkArray"), q = /* @__PURE__ */ h((a) => {
31
- a = a.replaceAll("\\n", `
25
+ i.indexOf("http") > -1 ? (r = "URL", o = i) : (i = i.replaceAll("exported/", `exported/${t}/`), r = "Export");
26
+ return { action: r, url: o, question: n, parameter: s };
27
+ }, "extractLinkAction"), T = /* @__PURE__ */ h((i, t) => Array.from(
28
+ { length: Math.ceil(i.length / t) },
29
+ (e, r) => i.slice(r * t, r * t + t)
30
+ ), "chunkArray"), O = /* @__PURE__ */ h((i) => {
31
+ i = i.replaceAll("\\n", `
32
32
  `);
33
- const t = 90, e = a.split(" "), s = [];
34
- let o = !1;
35
- for (const i of e)
36
- if (i.length > t) {
37
- o = !0;
38
- const r = [...i], l = E(r, t).map((c) => c.join("")).join(`
33
+ const t = 90, e = i.split(" "), r = [];
34
+ let n = !1;
35
+ for (const o of e)
36
+ if (o.length > t) {
37
+ n = !0;
38
+ const s = [...o], l = T(s, t).map((c) => c.join("")).join(`
39
39
  `);
40
- s.push(l);
40
+ r.push(l);
41
41
  } else
42
- s.push(i);
43
- return o ? s.join(" ") : a;
42
+ r.push(o);
43
+ return n ? r.join(" ") : i;
44
44
  }, "splitBigLinesWithSpaces");
45
- function L(a) {
46
- let t = parseFloat(a);
45
+ function k(i) {
46
+ let t = parseFloat(i);
47
47
  if (!isNaN(t))
48
- return a = a.replaceAll(/[,\.]/g, ""), parseInt(a);
48
+ return i = i.replaceAll(/[,\.]/g, ""), parseInt(i);
49
49
  var e = "";
50
- for (const o of a)
51
- o.match(/[0-9]/) && (e += o);
52
- const s = e.length / a.length;
53
- return t = parseInt(e), !isNaN(t) && s > 0.5 ? t : NaN;
50
+ for (const n of i)
51
+ n.match(/[0-9]/) && (e += n);
52
+ const r = e.length / i.length;
53
+ return t = parseInt(e), !isNaN(t) && r > 0.5 ? t : NaN;
54
54
  }
55
- h(L, "parseRawNumber");
56
- function D(a) {
57
- if (!a) return { prefix: void 0, suffix: void 0, number: void 0 };
55
+ h(k, "parseRawNumber");
56
+ function H(i) {
57
+ if (!i) return { prefix: void 0, suffix: void 0, number: void 0 };
58
58
  const t = /[$%(\w?\$)]/gi, e = /[a-z]?\$/gi;
59
- let s = "", o = "";
60
- if (a.match(t)) {
61
- a.indexOf("%") > -1 && (o = " %");
62
- const n = a.match(e);
63
- n && (s = n[0] + " ");
64
- }
65
- let i = parseFloat(a);
66
- if (!isNaN(i))
67
- return a = a.replaceAll(".", "").replaceAll(",", "."), { prefix: s, suffix: o, number: parseFloat(a) };
68
- var r = "";
69
- for (const n of a)
70
- if (n.match(/[0-9.,]/)) {
71
- let l = n;
72
- l == "." ? l = "" : l == "," && (l = "."), r += l;
59
+ let r = "", n = "";
60
+ if (i.match(t)) {
61
+ i.indexOf("%") > -1 && (n = " %");
62
+ const a = i.match(e);
63
+ a && (r = a[0] + " ");
64
+ }
65
+ let o = parseFloat(i);
66
+ if (!isNaN(o))
67
+ return i = i.replaceAll(".", "").replaceAll(",", "."), { prefix: r, suffix: n, number: parseFloat(i) };
68
+ var s = "";
69
+ for (const a of i)
70
+ if (a.match(/[0-9.,]/)) {
71
+ let l = a;
72
+ l == "." ? l = "" : l == "," && (l = "."), s += l;
73
73
  }
74
- return i = parseFloat(r), isNaN(i) ? { prefix: void 0, suffix: void 0, number: void 0 } : { prefix: s, suffix: o, number: i };
74
+ return o = parseFloat(s), isNaN(o) ? { prefix: void 0, suffix: void 0, number: void 0 } : { prefix: r, suffix: n, number: o };
75
75
  }
76
- h(D, "parseKnownNumbers");
77
- const S = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i, x = /^[0-9a-f]{32}/i;
78
- function M(a) {
79
- if (!a || typeof a != "string")
76
+ h(H, "parseKnownNumbers");
77
+ const A = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i, E = /^[0-9a-f]{32}/i;
78
+ function F(i) {
79
+ if (!i || typeof i != "string")
80
80
  return !1;
81
- const t = T(a);
82
- return t === null ? !1 : a.startsWith(t);
81
+ const t = N(i);
82
+ return t === null ? !1 : i.startsWith(t);
83
83
  }
84
- h(M, "startsWithInteractionId");
85
- function T(a) {
86
- if (!a || typeof a != "string")
84
+ h(F, "startsWithInteractionId");
85
+ function N(i) {
86
+ if (!i || typeof i != "string")
87
87
  return null;
88
- const t = a.match(S);
88
+ const t = i.match(A);
89
89
  if (t)
90
90
  return t[0];
91
- const e = a.match(x);
91
+ const e = i.match(E);
92
92
  return e ? e[0] : null;
93
93
  }
94
- h(T, "extractInteractionId");
95
- function O(a) {
96
- const s = a.replaceAll("_", " ").replaceAll("-", " ").replaceAll("user:", "").replace(/\.[^/.]+$/, ""), o = k(s).trim();
97
- return o.length > 1 ? o[0].toUpperCase() + o.slice(1) : o;
94
+ h(N, "extractInteractionId");
95
+ function R(i) {
96
+ const r = i.replaceAll("_", " ").replaceAll("-", " ").replaceAll("user:", "").replace(/\.[^/.]+$/, ""), n = $(r).trim();
97
+ return n.length > 1 ? n[0].toUpperCase() + n.slice(1) : n;
98
98
  }
99
- h(O, "prettiffyFileName");
100
- function F(a) {
101
- if (a.length == 0)
102
- return a;
103
- const t = a.replaceAll("_", " ").replaceAll("-", " ");
99
+ h(R, "prettiffyFileName");
100
+ function z(i) {
101
+ if (i.length == 0)
102
+ return i;
103
+ const t = i.replaceAll("_", " ").replaceAll("-", " ");
104
104
  return t[0].toUpperCase() + t.slice(1);
105
105
  }
106
- h(F, "prettiffyPythonFunctionName");
107
- function k(a) {
108
- const t = a.match(S);
106
+ h(z, "prettiffyPythonFunctionName");
107
+ function $(i) {
108
+ const t = i.match(A);
109
109
  if (t)
110
- return a.replace(t[0], "");
111
- const e = a.match(x);
112
- return e ? a.replace(e[0], "") : a;
110
+ return i.replace(t[0], "");
111
+ const e = i.match(E);
112
+ return e ? i.replace(e[0], "") : i;
113
113
  }
114
- h(k, "extractNameFromStringWithInteractionId");
115
- function z(a) {
116
- return !a || typeof a != "string" ? !1 : !!(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(a) || /^[0-9a-f]{32}$/i.test(a));
114
+ h($, "extractNameFromStringWithInteractionId");
115
+ function _(i) {
116
+ return !i || typeof i != "string" ? !1 : !!(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(i) || /^[0-9a-f]{32}$/i.test(i));
117
117
  }
118
- h(z, "isValidInteractionId");
119
- const C = /* @__PURE__ */ new Set(), w = class w {
118
+ h(_, "isValidInteractionId");
119
+ const S = /* @__PURE__ */ new Set(), C = class C {
120
120
  constructor(t = {}) {
121
121
  this.options = {
122
122
  // CSS class for sortable headers
@@ -199,8 +199,8 @@ const C = /* @__PURE__ */ new Set(), w = class w {
199
199
  * @param {HTMLElement} container - Optional container element to limit search scope
200
200
  */
201
201
  scanTables(t = null) {
202
- const s = (t || document).querySelectorAll("table");
203
- this.tables = Array.from(s);
202
+ const r = (t || document).querySelectorAll("table");
203
+ this.tables = Array.from(r);
204
204
  }
205
205
  /**
206
206
  * Make all found tables sortable
@@ -214,20 +214,20 @@ const C = /* @__PURE__ */ new Set(), w = class w {
214
214
  * Make a specific table sortable
215
215
  */
216
216
  makeTableSortable(t, e) {
217
- let s = t.querySelector("thead"), o = null, i = [];
218
- if (s && (o = s.querySelector("tr"), o && (i = o.querySelectorAll("th"))), i.length === 0) {
217
+ let r = t.querySelector("thead"), n = null, o = [];
218
+ if (r && (n = r.querySelector("tr"), n && (o = n.querySelectorAll("th"))), o.length === 0) {
219
219
  console.warn("Table has no sortable columns, skipping");
220
220
  return;
221
221
  }
222
- const r = !t.hasAttribute("data-sortable-arrived");
223
- t.classList.add("sortable-table"), r && (t.setAttribute("data-sortable-arrived", "true"), t.classList.add("sortable-table-arriving"), setTimeout(() => {
222
+ const s = !t.hasAttribute("data-sortable-arrived");
223
+ t.classList.add("sortable-table"), s && (t.setAttribute("data-sortable-arrived", "true"), t.classList.add("sortable-table-arriving"), setTimeout(() => {
224
224
  t.classList.remove("sortable-table-arriving");
225
225
  }, 400)), this.sortStates.set(e, {
226
226
  currentColumn: -1,
227
227
  direction: "none"
228
- }), t.hasAttribute("data-original-width") || t.setAttribute("data-original-width", t.getBoundingClientRect().width), this.applyTableStyles(t), this.originalColumnOrder.set(e, Array.from(i).map((n, l) => l)), i.forEach((n, l) => {
229
- this.options.excludeColumns.includes(l) || this.makeHeaderSortable(n, t, e, l);
230
- }), this.replaceExponentialValues(t), C.add(t);
228
+ }), t.hasAttribute("data-original-width") || t.setAttribute("data-original-width", t.getBoundingClientRect().width), this.applyTableStyles(t), this.originalColumnOrder.set(e, Array.from(o).map((a, l) => l)), o.forEach((a, l) => {
229
+ this.options.excludeColumns.includes(l) || this.makeHeaderSortable(a, t, e, l);
230
+ }), this.replaceExponentialValues(t), S.add(t);
231
231
  }
232
232
  /**
233
233
  * Replace exponential values in table cells with full numbers
@@ -236,12 +236,12 @@ const C = /* @__PURE__ */ new Set(), w = class w {
236
236
  replaceExponentialValues(t) {
237
237
  const e = t.querySelector("tbody");
238
238
  if (!e) return;
239
- e.querySelectorAll("tr").forEach((o) => {
240
- o.querySelectorAll("td, th").forEach((r) => {
241
- const l = r.textContent.trim().match(/^([\d,]+\.?\d*)[eE][+-]?(\d+)$/);
239
+ e.querySelectorAll("tr").forEach((n) => {
240
+ n.querySelectorAll("td, th").forEach((s) => {
241
+ const l = s.textContent.trim().match(/^([\d,]+\.?\d*)[eE][+-]?(\d+)$/);
242
242
  if (l) {
243
243
  const c = parseFloat(l[1].replace(/,/g, "")), u = parseInt(l[2]), p = c * Math.pow(10, u), d = this.formatNumber(p);
244
- r.textContent = d;
244
+ s.textContent = d;
245
245
  }
246
246
  });
247
247
  });
@@ -261,32 +261,32 @@ const C = /* @__PURE__ */ new Set(), w = class w {
261
261
  * @param {HTMLElement} tbody - The tbody element to remove from
262
262
  * @returns {HTMLElement} The converted header row
263
263
  */
264
- convertRowToHeader(t, e, s) {
264
+ convertRowToHeader(t, e, r) {
265
265
  try {
266
- const o = t.cloneNode(!0);
267
- return o.querySelectorAll("td").forEach((r) => {
268
- const n = document.createElement("th");
269
- Array.from(r.attributes).forEach((l) => {
270
- n.setAttribute(l.name, l.value);
271
- }), n.innerHTML = r.innerHTML, n.style.cssText = r.style.cssText, r.parentNode.replaceChild(n, r);
272
- }), s && s.contains(t) ? s.removeChild(t) : t.parentNode && t.parentNode.removeChild(t), e.appendChild(o), o;
273
- } catch (o) {
274
- return console.error("Error converting row to header:", o), null;
266
+ const n = t.cloneNode(!0);
267
+ return n.querySelectorAll("td").forEach((s) => {
268
+ const a = document.createElement("th");
269
+ Array.from(s.attributes).forEach((l) => {
270
+ a.setAttribute(l.name, l.value);
271
+ }), a.innerHTML = s.innerHTML, a.style.cssText = s.style.cssText, s.parentNode.replaceChild(a, s);
272
+ }), r && r.contains(t) ? r.removeChild(t) : t.parentNode && t.parentNode.removeChild(t), e.appendChild(n), n;
273
+ } catch (n) {
274
+ return console.error("Error converting row to header:", n), null;
275
275
  }
276
276
  }
277
277
  /**
278
278
  * Make a specific header sortable
279
279
  */
280
- makeHeaderSortable(t, e, s, o) {
281
- t.classList.add(this.options.sortableClass), t.style.cursor = "pointer", (!this.options.preserveExistingIcons || !t.querySelector(".material-icons")) && this.addSortIcon(t), this.options.enableResizing && this.addResizing(t, e, s, o), this.options.enableReordering && this.addDragAndDrop(t, e, s, o);
282
- const i = /* @__PURE__ */ h((l) => {
283
- l.preventDefault(), this.sortTable(e, s, o);
284
- }, "clickListener"), r = /* @__PURE__ */ h((l) => {
280
+ makeHeaderSortable(t, e, r, n) {
281
+ t.classList.add(this.options.sortableClass), t.style.cursor = "pointer", (!this.options.preserveExistingIcons || !t.querySelector(".material-icons")) && this.addSortIcon(t), this.options.enableResizing && this.addResizing(t, e, r, n), this.options.enableReordering && this.addDragAndDrop(t, e, r, n);
282
+ const o = /* @__PURE__ */ h((l) => {
283
+ l.preventDefault(), this.sortTable(e, r, n);
284
+ }, "clickListener"), s = /* @__PURE__ */ h((l) => {
285
285
  t.classList.contains(this.options.activeSortClass) || (t.style.background = this.options.theme.palette.surface.hover);
286
- }, "mouseEnterListener"), n = /* @__PURE__ */ h((l) => {
286
+ }, "mouseEnterListener"), a = /* @__PURE__ */ h((l) => {
287
287
  t.classList.contains(this.options.activeSortClass) || (t.style.background = "");
288
288
  }, "mouseLeaveListener");
289
- t.removeEventListener("click", i), t.addEventListener("click", i), t.removeEventListener("mouseenter", r), t.addEventListener("mouseenter", r), t.removeEventListener("mouseleave", n), t.addEventListener("mouseleave", n);
289
+ t.removeEventListener("click", o), t.addEventListener("click", o), t.removeEventListener("mouseenter", s), t.addEventListener("mouseenter", s), t.removeEventListener("mouseleave", a), t.addEventListener("mouseleave", a);
290
290
  }
291
291
  /**
292
292
  * Add sort icon to header
@@ -304,55 +304,55 @@ const C = /* @__PURE__ */ new Set(), w = class w {
304
304
  /**
305
305
  * Sort table by column
306
306
  */
307
- sortTable(t, e, s) {
308
- const o = t.querySelector("tbody");
309
- if (!o) {
307
+ sortTable(t, e, r) {
308
+ const n = t.querySelector("tbody");
309
+ if (!n) {
310
310
  console.warn("Table has no tbody element");
311
311
  return;
312
312
  }
313
- const i = Array.from(o.querySelectorAll("tr"));
314
- if (i.length === 0) {
313
+ const o = Array.from(n.querySelectorAll("tr"));
314
+ if (o.length === 0) {
315
315
  console.warn("Table has no data rows");
316
316
  return;
317
317
  }
318
- const r = this.sortStates.get(e);
319
- t.querySelector(`thead tr th:nth-child(${s + 1})`);
320
- let n;
321
- if (this.options.sortOnFirstClick ? n = r.currentColumn === s && r.direction === "asc" ? "desc" : "asc" : r.currentColumn !== s ? n = "asc" : n = r.direction === "none" ? "asc" : r.direction === "asc" ? "desc" : "none", r.currentColumn = s, r.direction = n, this.sortStates.set(e, r), this.updateSortIndicators(t, e, s, n), n === "none") {
322
- this.restoreOriginalOrder(t, i);
318
+ const s = this.sortStates.get(e);
319
+ t.querySelector(`thead tr th:nth-child(${r + 1})`);
320
+ let a;
321
+ if (this.options.sortOnFirstClick ? a = s.currentColumn === r && s.direction === "asc" ? "desc" : "asc" : s.currentColumn !== r ? a = "asc" : a = s.direction === "none" ? "asc" : s.direction === "asc" ? "desc" : "none", s.currentColumn = r, s.direction = a, this.sortStates.set(e, s), this.updateSortIndicators(t, e, r, a), a === "none") {
322
+ this.restoreOriginalOrder(t, o);
323
323
  return;
324
324
  }
325
- this.sortRows(i, s, n).forEach((c) => o.appendChild(c));
325
+ this.sortRows(o, r, a).forEach((c) => n.appendChild(c));
326
326
  }
327
327
  /**
328
328
  * Sort rows based on column data
329
329
  */
330
- sortRows(t, e, s) {
331
- return t.sort((o, i) => {
332
- const r = o.cells[e], n = i.cells[e];
333
- if (!r || !n) return 0;
334
- const l = this.extractValue(r), c = this.extractValue(n);
330
+ sortRows(t, e, r) {
331
+ return t.sort((n, o) => {
332
+ const s = n.cells[e], a = o.cells[e];
333
+ if (!s || !a) return 0;
334
+ const l = this.extractValue(s), c = this.extractValue(a);
335
335
  if (this.options.customSorters[e])
336
- return this.options.customSorters[e](l, c, s);
336
+ return this.options.customSorters[e](l, c, r);
337
337
  const u = this.compareValues(l, c);
338
- return s === "asc" ? u : -u;
338
+ return r === "asc" ? u : -u;
339
339
  });
340
340
  }
341
341
  /**
342
342
  * Extract sortable value from cell
343
343
  */
344
344
  extractValue(t) {
345
- let e = t.textContent.trim(), s = L(e);
346
- if (!isNaN(s))
347
- return console.log(s), s;
345
+ let e = t.textContent.trim(), r = k(e);
346
+ if (!isNaN(r))
347
+ return console.log(r), r;
348
348
  if (e = e.replace(/arrow_upward|arrow_downward|remove|keyboard_arrow_up|keyboard_arrow_down|unfold_more|expand_more|expand_less|trending_up|trending_down|↗|↘|↑|↓|→|←/g, "").trim(), /^(N\/A|N\/D|ND|N\/A|n\/a|n\/d|nd|N\/A|N\/D|ND|\s*)$/i.test(e))
349
349
  return -1;
350
- const i = e.match(/^([\d,]+\.?\d*)\s*%$/);
351
- if (i)
352
- return parseFloat(i[1].replace(/,/g, ""));
353
- const r = e.match(/^([\d,]+\.?\d*)[eE][+-]?(\d+)$/);
354
- if (r) {
355
- const u = parseFloat(r[1].replace(/,/g, "")), p = parseInt(r[2]);
350
+ const o = e.match(/^([\d,]+\.?\d*)\s*%$/);
351
+ if (o)
352
+ return parseFloat(o[1].replace(/,/g, ""));
353
+ const s = e.match(/^([\d,]+\.?\d*)[eE][+-]?(\d+)$/);
354
+ if (s) {
355
+ const u = parseFloat(s[1].replace(/,/g, "")), p = parseInt(s[2]);
356
356
  return u * Math.pow(10, p);
357
357
  }
358
358
  if (e.match(/^[\d,]+\.?\d*[KMB]?$/))
@@ -372,34 +372,34 @@ const C = /* @__PURE__ */ new Set(), w = class w {
372
372
  /**
373
373
  * Update visual indicators for sort state
374
374
  */
375
- updateSortIndicators(t, e, s, o) {
376
- const i = t.querySelectorAll("thead tr th");
377
- if (i.forEach((r, n) => {
378
- r.classList.remove(this.options.activeSortClass, this.options.ascendingClass, this.options.descendingClass);
379
- const l = r.querySelector(".material-icons");
375
+ updateSortIndicators(t, e, r, n) {
376
+ const o = t.querySelectorAll("thead tr th");
377
+ if (o.forEach((s, a) => {
378
+ s.classList.remove(this.options.activeSortClass, this.options.ascendingClass, this.options.descendingClass);
379
+ const l = s.querySelector(".material-icons");
380
380
  l && (l.textContent = this.options.unsortedIcon, l.style.opacity = "0.6");
381
- }), o !== "none") {
382
- const r = i[s];
383
- r.classList.add(this.options.activeSortClass);
384
- const n = r.querySelector(".material-icons");
385
- n && (o === "asc" ? (r.classList.add(this.options.ascendingClass), n.textContent = this.options.ascendingIcon) : (r.classList.add(this.options.descendingClass), n.textContent = this.options.descendingIcon), n.style.opacity = "1");
381
+ }), n !== "none") {
382
+ const s = o[r];
383
+ s.classList.add(this.options.activeSortClass);
384
+ const a = s.querySelector(".material-icons");
385
+ a && (n === "asc" ? (s.classList.add(this.options.ascendingClass), a.textContent = this.options.ascendingIcon) : (s.classList.add(this.options.descendingClass), a.textContent = this.options.descendingIcon), a.style.opacity = "1");
386
386
  }
387
387
  }
388
388
  /**
389
389
  * Restore original order (when sort direction is 'none')
390
390
  */
391
391
  restoreOriginalOrder(t, e) {
392
- const s = t.querySelector("tbody");
393
- e.forEach((o) => s.appendChild(o));
392
+ const r = t.querySelector("tbody");
393
+ e.forEach((n) => r.appendChild(n));
394
394
  }
395
395
  /**
396
396
  * Add resizing functionality to a header
397
397
  */
398
- addResizing(t, e, s, o) {
398
+ addResizing(t, e, r, n) {
399
399
  if (t.classList.add(this.options.resizableClass), t.style.position = "relative", t.querySelector(".resize-handle"))
400
400
  return;
401
- const i = document.createElement("div");
402
- i.className = "resize-handle", i.style.cssText = `
401
+ const o = document.createElement("div");
402
+ o.className = "resize-handle", o.style.cssText = `
403
403
  position: absolute;
404
404
  top: 0;
405
405
  right: 0;
@@ -408,14 +408,14 @@ const C = /* @__PURE__ */ new Set(), w = class w {
408
408
  background: transparent;
409
409
  cursor: col-resize;
410
410
  z-index: 10;
411
- `, t.appendChild(i);
412
- let r = !1, n = 0, l = 0;
413
- i.addEventListener("mousedown", (p) => {
414
- p.preventDefault(), p.stopPropagation(), p.stopImmediatePropagation(), r = !0, n = p.clientX, l = t.offsetWidth, t.style.borderRight = "2px solid var(--primary-main, #2196F3)", t.style.background = "var(--background-active, rgba(255, 255, 255, 0.1))", document.addEventListener("mousemove", c), document.addEventListener("mouseup", u), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
411
+ `, t.appendChild(o);
412
+ let s = !1, a = 0, l = 0;
413
+ o.addEventListener("mousedown", (p) => {
414
+ p.preventDefault(), p.stopPropagation(), p.stopImmediatePropagation(), s = !0, a = p.clientX, l = t.offsetWidth, t.style.borderRight = "2px solid var(--primary-main, #2196F3)", t.style.background = "var(--background-active, rgba(255, 255, 255, 0.1))", document.addEventListener("mousemove", c), document.addEventListener("mouseup", u), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
415
415
  });
416
416
  const c = /* @__PURE__ */ h((p) => {
417
- if (!r) return;
418
- const d = l + (p.clientX - n);
417
+ if (!s) return;
418
+ const d = l + (p.clientX - a);
419
419
  if (d > 30) {
420
420
  t.style.width = d + "px";
421
421
  const m = Array.from(t.parentNode.children).indexOf(t), f = e.querySelector("tbody");
@@ -425,41 +425,41 @@ const C = /* @__PURE__ */ new Set(), w = class w {
425
425
  }), this.updateTableWidth(e);
426
426
  }
427
427
  }, "handleResize"), u = /* @__PURE__ */ h(() => {
428
- r = !1, t.style.borderRight = "", t.style.background = "", document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", u), document.body.style.cursor = "", document.body.style.userSelect = "";
428
+ s = !1, t.style.borderRight = "", t.style.background = "", document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", u), document.body.style.cursor = "", document.body.style.userSelect = "";
429
429
  }, "stopResize");
430
430
  }
431
431
  /**
432
432
  * Add drag and drop functionality to a header
433
433
  */
434
- addDragAndDrop(t, e, s, o) {
434
+ addDragAndDrop(t, e, r, n) {
435
435
  if (t.querySelector(".drag-handle"))
436
436
  return;
437
437
  t.classList.add(this.options.draggableClass), t.draggable = !0;
438
- const i = e.querySelector("thead tr");
439
- t.addEventListener("dragstart", (r) => {
438
+ const o = e.querySelector("thead tr");
439
+ t.addEventListener("dragstart", (s) => {
440
440
  this.isDragging = !0;
441
- const n = Array.from(i.children).indexOf(t);
442
- this.dragSource = { table: e, tableIndex: s, columnIndex: n }, r.dataTransfer.effectAllowed = "move", r.dataTransfer.setData("text/html", t.outerHTML);
441
+ const a = Array.from(o.children).indexOf(t);
442
+ this.dragSource = { table: e, tableIndex: r, columnIndex: a }, s.dataTransfer.effectAllowed = "move", s.dataTransfer.setData("text/html", t.outerHTML);
443
443
  const l = t.outerHTML;
444
- t.style.opacity = "0.5", this.createCustomDragImage(r, t, l);
445
- }), t.addEventListener("dragend", (r) => {
444
+ t.style.opacity = "0.5", this.createCustomDragImage(s, t, l);
445
+ }), t.addEventListener("dragend", (s) => {
446
446
  this.isDragging = !1, this.dragSource = null, t.style.opacity = "", this.clearAllColumnHighlights(e);
447
- }), t.addEventListener("dragover", (r) => {
448
- r.preventDefault(), r.dataTransfer.dropEffect = "move";
449
- }), t.addEventListener("dragenter", (r) => {
450
- if (r.preventDefault(), this.dragSource && this.dragSource.tableIndex === s) {
451
- const n = Array.from(i.children).indexOf(t);
452
- this.dragSource.columnIndex !== n && this.highlightColumn(e, n, !0);
447
+ }), t.addEventListener("dragover", (s) => {
448
+ s.preventDefault(), s.dataTransfer.dropEffect = "move";
449
+ }), t.addEventListener("dragenter", (s) => {
450
+ if (s.preventDefault(), this.dragSource && this.dragSource.tableIndex === r) {
451
+ const a = Array.from(o.children).indexOf(t);
452
+ this.dragSource.columnIndex !== a && this.highlightColumn(e, a, !0);
453
453
  }
454
- }), t.addEventListener("dragleave", (r) => {
455
- if (!t.contains(r.relatedTarget)) {
456
- const n = Array.from(i.children).indexOf(t);
457
- this.highlightColumn(e, n, !1);
454
+ }), t.addEventListener("dragleave", (s) => {
455
+ if (!t.contains(s.relatedTarget)) {
456
+ const a = Array.from(o.children).indexOf(t);
457
+ this.highlightColumn(e, a, !1);
458
458
  }
459
- }), t.addEventListener("drop", (r) => {
460
- if (r.preventDefault(), this.dragSource && this.dragSource.tableIndex === s) {
461
- const n = Array.from(i.children).indexOf(t);
462
- this.dragSource.columnIndex !== n && this.reorderColumns(e, s, this.dragSource.columnIndex, n);
459
+ }), t.addEventListener("drop", (s) => {
460
+ if (s.preventDefault(), this.dragSource && this.dragSource.tableIndex === r) {
461
+ const a = Array.from(o.children).indexOf(t);
462
+ this.dragSource.columnIndex !== a && this.reorderColumns(e, r, this.dragSource.columnIndex, a);
463
463
  }
464
464
  this.clearAllColumnHighlights(e);
465
465
  });
@@ -467,9 +467,9 @@ const C = /* @__PURE__ */ new Set(), w = class w {
467
467
  /**
468
468
  * Create a custom drag image for better UX
469
469
  */
470
- createCustomDragImage(t, e, s) {
471
- const o = document.createElement("div");
472
- o.style.cssText = `
470
+ createCustomDragImage(t, e, r) {
471
+ const n = document.createElement("div");
472
+ n.style.cssText = `
473
473
  position: absolute;
474
474
  top: -1000px;
475
475
  left: -1000px;
@@ -492,36 +492,36 @@ const C = /* @__PURE__ */ new Set(), w = class w {
492
492
  display: flex;
493
493
  align-items: center;
494
494
  `;
495
- const i = s;
496
- o.innerHTML = `
495
+ const o = r;
496
+ n.innerHTML = `
497
497
  <div style="display: flex; align-items: center; gap: 5px; align-content: center;color:white;">
498
- <span style="overflow: hidden; text-overflow: ellipsis">${i}</span>
498
+ <span style="overflow: hidden; text-overflow: ellipsis">${o}</span>
499
499
  <svg style="fill: grey; font-size: 10px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20" ><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path clip-path="url(#b)" d="M9.01 14H2v2h7.01v3L13 15l-3.99-4v3zm5.98-1v-3H22V8h-7.01V5L11 9l3.99 4z"/></svg>
500
500
  </div>
501
- `, document.body.appendChild(o), t.dataTransfer.setDragImage(o, 50, 12), setTimeout(() => {
502
- document.body.contains(o) && document.body.removeChild(o);
501
+ `, document.body.appendChild(n), t.dataTransfer.setDragImage(n, 50, 12), setTimeout(() => {
502
+ document.body.contains(n) && document.body.removeChild(n);
503
503
  }, 100);
504
504
  }
505
505
  /**
506
506
  * Highlight an entire column during drag operations
507
507
  */
508
- highlightColumn(t, e, s) {
509
- const o = t.querySelector("thead tr"), i = t.querySelector("tbody");
510
- if (!o || !i) return;
511
- const r = o.children[e];
512
- if (r)
513
- if (s) {
514
- r.classList.add(this.options.dragOverClass);
515
- const n = i.children;
516
- for (let l = 0; l < n.length; l++) {
517
- const c = n[l].children[e];
508
+ highlightColumn(t, e, r) {
509
+ const n = t.querySelector("thead tr"), o = t.querySelector("tbody");
510
+ if (!n || !o) return;
511
+ const s = n.children[e];
512
+ if (s)
513
+ if (r) {
514
+ s.classList.add(this.options.dragOverClass);
515
+ const a = o.children;
516
+ for (let l = 0; l < a.length; l++) {
517
+ const c = a[l].children[e];
518
518
  c && c.classList.add(this.options.dragOverClass);
519
519
  }
520
520
  } else {
521
- r.classList.remove(this.options.dragOverClass);
522
- const n = i.children;
523
- for (let l = 0; l < n.length; l++) {
524
- const c = n[l].children[e];
521
+ s.classList.remove(this.options.dragOverClass);
522
+ const a = o.children;
523
+ for (let l = 0; l < a.length; l++) {
524
+ const c = a[l].children[e];
525
525
  c && c.classList.remove(this.options.dragOverClass);
526
526
  }
527
527
  }
@@ -530,40 +530,40 @@ const C = /* @__PURE__ */ new Set(), w = class w {
530
530
  * Clear all column highlights
531
531
  */
532
532
  clearAllColumnHighlights(t) {
533
- const e = t.querySelector("thead tr"), s = t.querySelector("tbody");
534
- if (!e || !s) return;
535
- const o = e.children;
536
- for (let r = 0; r < o.length; r++)
537
- o[r].classList.remove(this.options.dragOverClass);
538
- const i = s.children;
539
- for (let r = 0; r < i.length; r++) {
540
- const n = i[r].children;
541
- for (let l = 0; l < n.length; l++)
542
- n[l].classList.remove(this.options.dragOverClass);
533
+ const e = t.querySelector("thead tr"), r = t.querySelector("tbody");
534
+ if (!e || !r) return;
535
+ const n = e.children;
536
+ for (let s = 0; s < n.length; s++)
537
+ n[s].classList.remove(this.options.dragOverClass);
538
+ const o = r.children;
539
+ for (let s = 0; s < o.length; s++) {
540
+ const a = o[s].children;
541
+ for (let l = 0; l < a.length; l++)
542
+ a[l].classList.remove(this.options.dragOverClass);
543
543
  }
544
544
  }
545
545
  /**
546
546
  * Reorder columns in a table
547
547
  */
548
- reorderColumns(t, e, s, o) {
549
- const i = t.querySelector("thead tr"), r = t.querySelector("tbody");
550
- if (!i || !r) return;
551
- const n = Array.from(i.children), l = Array.from(r.children);
552
- if (s < 0 || s >= n.length || o < 0 || o >= n.length) {
548
+ reorderColumns(t, e, r, n) {
549
+ const o = t.querySelector("thead tr"), s = t.querySelector("tbody");
550
+ if (!o || !s) return;
551
+ const a = Array.from(o.children), l = Array.from(s.children);
552
+ if (r < 0 || r >= a.length || n < 0 || n >= a.length) {
553
553
  console.warn("Invalid column indices for reordering");
554
554
  return;
555
555
  }
556
- if (s === o)
556
+ if (r === n)
557
557
  return;
558
- const c = n[s], u = n[o];
559
- s < o ? i.insertBefore(c, u.nextSibling) : i.insertBefore(c, u), l.forEach((d, m) => {
560
- const f = Array.from(d.children), g = f[s], y = f[o];
561
- s < o ? d.insertBefore(g, y.nextSibling) : d.insertBefore(g, y);
558
+ const c = a[r], u = a[n];
559
+ r < n ? o.insertBefore(c, u.nextSibling) : o.insertBefore(c, u), l.forEach((d, m) => {
560
+ const f = Array.from(d.children), g = f[r], y = f[n];
561
+ r < n ? d.insertBefore(g, y.nextSibling) : d.insertBefore(g, y);
562
562
  });
563
563
  const p = this.originalColumnOrder.get(e);
564
564
  if (p) {
565
- const d = [...p], m = d[s];
566
- d.splice(s, 1), d.splice(o, 0, m), this.originalColumnOrder.set(e, d);
565
+ const d = [...p], m = d[r];
566
+ d.splice(r, 1), d.splice(n, 0, m), this.originalColumnOrder.set(e, d);
567
567
  }
568
568
  this.applyTableStyles(t), this.refreshDragAndDropListeners(t, e);
569
569
  }
@@ -571,13 +571,13 @@ const C = /* @__PURE__ */ new Set(), w = class w {
571
571
  * Refresh drag and drop listeners after column reordering
572
572
  */
573
573
  refreshDragAndDropListeners(t, e) {
574
- const s = t.querySelector("thead tr");
575
- if (!s) return;
576
- Array.from(s.children).forEach((i, r) => {
577
- if (i.classList.contains(this.options.draggableClass)) {
578
- i.style.opacity = "", i.style.background = "", i.style.borderRight = "";
579
- const n = i.cloneNode(!0);
580
- i.parentNode.replaceChild(n, i), this.makeHeaderSortable(n, t, e, r);
574
+ const r = t.querySelector("thead tr");
575
+ if (!r) return;
576
+ Array.from(r.children).forEach((o, s) => {
577
+ if (o.classList.contains(this.options.draggableClass)) {
578
+ o.style.opacity = "", o.style.background = "", o.style.borderRight = "";
579
+ const a = o.cloneNode(!0);
580
+ o.parentNode.replaceChild(a, o), this.makeHeaderSortable(a, t, e, s);
581
581
  }
582
582
  });
583
583
  }
@@ -586,47 +586,47 @@ const C = /* @__PURE__ */ new Set(), w = class w {
586
586
  */
587
587
  updateTableWidth(t) {
588
588
  const e = t.querySelectorAll("th");
589
- let s = 0;
590
- e.forEach((o) => {
591
- const i = o.style.width;
592
- if (i) {
593
- const r = parseInt(i.replace("px", ""));
594
- s += r;
589
+ let r = 0;
590
+ e.forEach((n) => {
591
+ const o = n.style.width;
592
+ if (o) {
593
+ const s = parseInt(o.replace("px", ""));
594
+ r += s;
595
595
  } else {
596
- const r = o.textContent.replace(/[📊🔍]/g, "").trim();
597
- s += r.length;
596
+ const s = n.textContent.replace(/[📊🔍]/g, "").trim();
597
+ r += s.length;
598
598
  }
599
- }), t.style.width = `${s}px`;
599
+ }), t.style.width = `${r}px`;
600
600
  }
601
601
  /**
602
602
  * Calculate intelligent table width based on header text length
603
603
  */
604
604
  calculateTableWidth(t) {
605
605
  var p;
606
- const e = t.getAttribute("data-original-width"), s = e ? parseFloat(e) : 0, o = t.querySelectorAll("th");
607
- let i = 0;
606
+ const e = t.getAttribute("data-original-width"), r = e ? parseFloat(e) : 0, n = t.querySelectorAll("th");
607
+ let o = 0;
608
608
  t.parentElement.clientWidth;
609
- const r = [];
610
- o.forEach((d) => {
609
+ const s = [];
610
+ n.forEach((d) => {
611
611
  let f = d.textContent.replace(/[📊🔍]/g, "").trim().length * this.charWidth + 15;
612
- r.push(f), i += f;
612
+ s.push(f), o += f;
613
613
  });
614
- const n = t.querySelectorAll("tr"), l = ((p = t.parentElement) == null ? void 0 : p.getBoundingClientRect().width) ?? i;
614
+ const a = t.querySelectorAll("tr"), l = ((p = t.parentElement) == null ? void 0 : p.getBoundingClientRect().width) ?? o;
615
615
  var c = 0;
616
- for (const d of n)
616
+ for (const d of a)
617
617
  d.querySelectorAll("td").forEach((f, g) => {
618
618
  const b = f.textContent.length * this.charWidth + 15;
619
- b > r[g] && g < r.length && (r[g] = b);
619
+ b > s[g] && g < s.length && (s[g] = b);
620
620
  });
621
- c = r.reduce((d, m) => d += m, 0), o.forEach((d, m) => {
621
+ c = s.reduce((d, m) => d += m, 0), n.forEach((d, m) => {
622
622
  if (c > l) {
623
- const f = r[m] / c;
623
+ const f = s[m] / c;
624
624
  d.style.width = `${l * f}px`;
625
625
  } else
626
- d.style.width = `${r[m]}px`;
626
+ d.style.width = `${s[m]}px`;
627
627
  });
628
628
  let u = 0;
629
- return c > l ? u = "100%" : u = `${Math.max(c, s)}px`, u;
629
+ return c > l ? u = "100%" : u = `${Math.max(c, r)}px`, u;
630
630
  }
631
631
  /**
632
632
  * Apply inline styles to ensure text clipping and horizontal scroll work
@@ -635,9 +635,9 @@ const C = /* @__PURE__ */ new Set(), w = class w {
635
635
  const e = this.calculateTableWidth(t);
636
636
  t.style.width = e, t.style.maxWidth = "100%";
637
637
  }
638
- getCharWidth(t, e, s) {
639
- const i = document.createElement("canvas").getContext("2d");
640
- return i.fontFamily = e, i.fontMono = s, i.measureText("A ").width;
638
+ getCharWidth(t, e, r) {
639
+ const o = document.createElement("canvas").getContext("2d");
640
+ return o.fontFamily = e, o.fontMono = r, o.measureText("A ").width;
641
641
  }
642
642
  /**
643
643
  * Add CSS styles for sortable tables
@@ -779,19 +779,19 @@ const C = /* @__PURE__ */ new Set(), w = class w {
779
779
  */
780
780
  destroy() {
781
781
  this.tables.forEach((e) => {
782
- e.querySelectorAll(`.${this.options.sortableClass}`).forEach((o) => {
783
- o.classList.remove(
782
+ e.querySelectorAll(`.${this.options.sortableClass}`).forEach((n) => {
783
+ n.classList.remove(
784
784
  this.options.sortableClass,
785
785
  this.options.activeSortClass,
786
786
  this.options.ascendingClass,
787
787
  this.options.descendingClass
788
- ), o.style.cursor = "", o.style.background = "";
789
- const i = o.cloneNode(!0);
790
- o.parentNode.replaceChild(i, o);
788
+ ), n.style.cursor = "", n.style.background = "";
789
+ const o = n.cloneNode(!0);
790
+ n.parentNode.replaceChild(o, n);
791
791
  });
792
792
  });
793
793
  const t = document.getElementById("sortable-table-styles");
794
- t && t.remove(), this.tables = [], this.sortStates.clear(), C.clear();
794
+ t && t.remove(), this.tables = [], this.sortStates.clear(), S.clear();
795
795
  }
796
796
  /**
797
797
  * Refresh the library (useful after DOM changes)
@@ -800,20 +800,68 @@ const C = /* @__PURE__ */ new Set(), w = class w {
800
800
  this.destroy(), this.init();
801
801
  }
802
802
  };
803
- h(w, "SortableTable");
804
- let v = w;
805
- typeof window < "u" && (window.SortableTable = v);
803
+ h(C, "SortableTable");
804
+ let w = C;
805
+ typeof window < "u" && (window.SortableTable = w);
806
+ const x = /* @__PURE__ */ new Set(["/", "@", "#"]), W = /* @__PURE__ */ h((i) => i === "/" ? "slash" : i === "@" ? "at" : "hash", "triggerTypeFor"), v = /[ \t\r\n\f\v]/, B = /* @__PURE__ */ h((i) => {
807
+ if (!i) return [];
808
+ const t = [];
809
+ let e = 0;
810
+ for (; e < i.length; ) {
811
+ const r = i[e];
812
+ if ((e === 0 || v.test(i[e - 1])) && x.has(r)) {
813
+ let o = e + 1;
814
+ for (; o < i.length && !v.test(i[o]); ) o += 1;
815
+ t.push({ type: W(r), text: i.slice(e, o) }), e = o;
816
+ } else {
817
+ let o = e + 1;
818
+ for (; o < i.length; ) {
819
+ const s = i[o], a = v.test(i[o - 1]);
820
+ if (x.has(s) && a) break;
821
+ o += 1;
822
+ }
823
+ t.push({ type: "plain", text: i.slice(e, o) }), e = o;
824
+ }
825
+ }
826
+ return t;
827
+ }, "tokenizeForHighlight"), I = /* @__PURE__ */ h((i, t) => {
828
+ const e = t.filter((n) => n.trim().length > 0).sort((n, o) => o.length - n.length);
829
+ if (e.length === 0) return i;
830
+ const r = [];
831
+ for (const n of i) {
832
+ if (n.type !== "plain") {
833
+ r.push(n);
834
+ continue;
835
+ }
836
+ let o = n.text;
837
+ for (; o.length > 0; ) {
838
+ let s = -1, a = 0;
839
+ for (const l of e) {
840
+ const c = o.indexOf(l);
841
+ c >= 0 && (s === -1 || c < s) && (s = c, a = l.length);
842
+ }
843
+ if (s === -1) {
844
+ r.push({ type: "plain", text: o });
845
+ break;
846
+ }
847
+ s > 0 && r.push({ type: "plain", text: o.slice(0, s) }), r.push({ type: "at", text: o.slice(s, s + a) }), o = o.slice(s + a);
848
+ }
849
+ }
850
+ return r;
851
+ }, "chipLocations");
806
852
  export {
807
- v as S,
808
- W as a,
809
- D as b,
810
- E as c,
811
- O as d,
812
- T as e,
813
- F as f,
814
- M as g,
815
- z as i,
816
- $ as p,
817
- q as s
853
+ w as S,
854
+ T as a,
855
+ M as b,
856
+ I as c,
857
+ H as d,
858
+ N as e,
859
+ R as f,
860
+ z as g,
861
+ F as h,
862
+ _ as i,
863
+ D as p,
864
+ O as s,
865
+ B as t
818
866
  };
819
- //# sourceMappingURL=sortable-table-DgQHxWIh.js.map
867
+ //# sourceMappingURL=promptHighlight-BHSQkdFs.js.map