@8wave/ai-elements 0.125.0-beta.12 → 0.125.0-beta.13

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 (46) hide show
  1. package/dist/_chunks/{PkFilePreview-COiD99Bn.js → PkFilePreview-rAHDDtGS.js} +318 -269
  2. package/dist/_chunks/PkFilePreview-rAHDDtGS.js.map +1 -0
  3. package/dist/_chunks/{PkFilePreviewDialog-gHN4_C95.js → PkFilePreviewDialog-BBFrC_rn.js} +2 -2
  4. package/dist/_chunks/{PkFilePreviewDialog-gHN4_C95.js.map → PkFilePreviewDialog-BBFrC_rn.js.map} +1 -1
  5. package/dist/_chunks/{PkToolShowWeather-C4tqVGFZ.js → PkToolShowWeather-B9HWOU7p.js} +2 -2
  6. package/dist/_chunks/PkToolShowWeather-B9HWOU7p.js.map +1 -0
  7. package/dist/ai-elements.es.js +8 -8
  8. package/dist/ai-elements.es.js.map +1 -1
  9. package/dist-vue/PkChatbot.js +1 -1
  10. package/dist-vue/PkChatbotAudioTranscript.js +1 -1
  11. package/dist-vue/PkChatbotMessages.js +1 -1
  12. package/dist-vue/PkChatbotSteps.js +1 -1
  13. package/dist-vue/PkChatbotViewChat.js +1 -1
  14. package/dist-vue/PkChatbotViewConversations.js +1 -1
  15. package/dist-vue/PkChatbotViewFiles.js +1 -1
  16. package/dist-vue/_chunks/{PkChatbot-BrJxCUeC.js → PkChatbot-D48q-ulR.js} +4 -4
  17. package/dist-vue/_chunks/{PkChatbot-BrJxCUeC.js.map → PkChatbot-D48q-ulR.js.map} +1 -1
  18. package/dist-vue/_chunks/{PkChatbotAudioTranscript-SSTh074Z.js → PkChatbotAudioTranscript-DgmuXalb.js} +2 -2
  19. package/dist-vue/_chunks/PkChatbotAudioTranscript-DgmuXalb.js.map +1 -0
  20. package/dist-vue/_chunks/{PkChatbotMessages-B0erk76c.js → PkChatbotMessages-DftNL5ZQ.js} +4 -4
  21. package/dist-vue/_chunks/{PkChatbotMessages-B0erk76c.js.map → PkChatbotMessages-DftNL5ZQ.js.map} +1 -1
  22. package/dist-vue/_chunks/{PkChatbotSteps-s_Dv4qAx.js → PkChatbotSteps-CY7pN2Gl.js} +3 -3
  23. package/dist-vue/_chunks/PkChatbotSteps-CY7pN2Gl.js.map +1 -0
  24. package/dist-vue/_chunks/{PkChatbotViewChat-CHnOvnMd.js → PkChatbotViewChat-lLX_msKI.js} +3 -3
  25. package/dist-vue/_chunks/{PkChatbotViewChat-CHnOvnMd.js.map → PkChatbotViewChat-lLX_msKI.js.map} +1 -1
  26. package/dist-vue/_chunks/{PkChatbotViewConversations-BUXSz7C7.js → PkChatbotViewConversations-C0KqM_Wq.js} +2 -2
  27. package/dist-vue/_chunks/PkChatbotViewConversations-C0KqM_Wq.js.map +1 -0
  28. package/dist-vue/_chunks/{PkChatbotViewFiles-D4yBDDdC.js → PkChatbotViewFiles-B9mYRoNK.js} +2 -2
  29. package/dist-vue/_chunks/PkChatbotViewFiles-B9mYRoNK.js.map +1 -0
  30. package/dist-vue/_chunks/{PkFilePreview-C_lSOSEW.js → PkFilePreview-Ac_8QIBX.js} +413 -364
  31. package/dist-vue/_chunks/{PkFilePreview-C_lSOSEW.js.map → PkFilePreview-Ac_8QIBX.js.map} +1 -1
  32. package/dist-vue/_chunks/{PkFilePreviewDialog-6ChVRH3u.js → PkFilePreviewDialog-DGBaeZ8y.js} +2 -2
  33. package/dist-vue/_chunks/{PkFilePreviewDialog-6ChVRH3u.js.map → PkFilePreviewDialog-DGBaeZ8y.js.map} +1 -1
  34. package/dist-vue/_chunks/{PkToolShowWeather-BC-Rx-sI.js → PkToolShowWeather-1NJwawC7.js} +2 -2
  35. package/dist-vue/_chunks/PkToolShowWeather-1NJwawC7.js.map +1 -0
  36. package/dist-vue/index.js +8 -8
  37. package/dist-vue/index.js.map +1 -1
  38. package/dist-vue/style.css +1 -1
  39. package/package.json +1 -1
  40. package/dist/_chunks/PkFilePreview-COiD99Bn.js.map +0 -1
  41. package/dist/_chunks/PkToolShowWeather-C4tqVGFZ.js.map +0 -1
  42. package/dist-vue/_chunks/PkChatbotAudioTranscript-SSTh074Z.js.map +0 -1
  43. package/dist-vue/_chunks/PkChatbotSteps-s_Dv4qAx.js.map +0 -1
  44. package/dist-vue/_chunks/PkChatbotViewConversations-BUXSz7C7.js.map +0 -1
  45. package/dist-vue/_chunks/PkChatbotViewFiles-D4yBDDdC.js.map +0 -1
  46. package/dist-vue/_chunks/PkToolShowWeather-BC-Rx-sI.js.map +0 -1
@@ -1,17 +1,17 @@
1
1
  import { r as e } from "./rolldown-runtime-9rEmUaIe.js";
2
- import { A as t, B as n, Et as r, F as i, H as a, I as o, J as s, L as c, N as l, Ot as u, Q as d, S as f, Tt as p, V as m, X as h, _ as g, c as ee, d as _, f as v, g as y, gt as b, h as x, j as S, k as C, kt as w, nt as T, ot as E, pt as D, r as O, tt as k, u as A, v as j, vt as M, w as N, wt as P, x as F, y as I, z as L } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
3
- import { r as te } from "./vue-i18n-POtLvOl1.js";
4
- import { i as R, n as ne, r as re } from "./excelNumberFormat-BhQjife9.js";
5
- import { B as ie, G as z, H as ae, I as oe, K as B, U as V, V as se, W as ce, o as le, z as H } from "./utils-BZuri2jT.js";
2
+ import { A as t, B as n, Et as r, F as i, H as a, I as o, J as s, L as c, N as l, Ot as u, Q as d, S as f, Tt as p, V as m, X as h, _ as g, c as ee, d as _, f as v, g as y, gt as b, h as x, j as S, k as C, kt as w, nt as T, ot as E, pt as D, r as O, tt as k, u as A, v as j, vt as M, w as N, wt as P, x as te, y as F, z as I } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
3
+ import { r as ne } from "./vue-i18n-POtLvOl1.js";
4
+ import { i as L, n as re, r as ie } from "./excelNumberFormat-BhQjife9.js";
5
+ import { B as R, G as z, H as ae, I as B, K as V, U as oe, V as se, W as ce, o as le, z as H } from "./utils-BZuri2jT.js";
6
6
  import { d as ue, l as de } from "./dist-D6oUr4J_.js";
7
7
  import { t as fe } from "./index.es-D-aOuzzp.js";
8
8
  import { t as pe } from "./VvButtonLocalized-B32dBwWJ.js";
9
9
  import { t as U } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
10
- import { t as W } from "./PkEditorRadioButtons-ClUWPayk.js";
10
+ import { t as me } from "./PkEditorRadioButtons-ClUWPayk.js";
11
11
  // ../../packages/composable/src/useSettledSelection.ts
12
12
  E();
13
- var G = "(hover: hover) and (pointer: fine)";
14
- function me(e) {
13
+ var W = "(hover: hover) and (pointer: fine)";
14
+ function he(e) {
15
15
  let t = document.getSelection();
16
16
  if (!t || t.rangeCount === 0) return;
17
17
  if (e.nodeType === Node.DOCUMENT_NODE) return t.getRangeAt(0).cloneRange();
@@ -31,13 +31,13 @@ function me(e) {
31
31
  let r = n.getSelection?.();
32
32
  return r && r.rangeCount > 0 ? r.getRangeAt(0).cloneRange() : void 0;
33
33
  }
34
- function he({ root: e, enabled: t = () => !0, delay: n = 150, minChars: r = 2 }) {
34
+ function ge({ root: e, enabled: t = () => !0, delay: n = 150, minChars: r = 2 }) {
35
35
  let i = M(), a, o = () => {
36
36
  clearTimeout(a), i.value = void 0;
37
37
  }, s = () => {
38
38
  let n = e();
39
39
  if (!n || !t()) return;
40
- let i = me(n);
40
+ let i = he(n);
41
41
  if (!i || i.collapsed || i.toString().trim().length < r) return;
42
42
  let a = i.getBoundingClientRect();
43
43
  return {
@@ -50,7 +50,7 @@ function he({ root: e, enabled: t = () => !0, delay: n = 150, minChars: r = 2 })
50
50
  i.value = s();
51
51
  }, n);
52
52
  };
53
- return typeof document < "u" && typeof matchMedia == "function" && matchMedia(G).matches && (document.addEventListener("selectionchange", c), D(() => {
53
+ return typeof document < "u" && typeof matchMedia == "function" && matchMedia(W).matches && (document.addEventListener("selectionchange", c), D(() => {
54
54
  clearTimeout(a), document.removeEventListener("selectionchange", c);
55
55
  })), {
56
56
  selection: i,
@@ -58,26 +58,26 @@ function he({ root: e, enabled: t = () => !0, delay: n = 150, minChars: r = 2 })
58
58
  };
59
59
  }
60
60
  // ../../packages/components/src/chat/fileSelection.ts
61
- var ge = 2e3, K = 1e3, _e = 60, ve = 1400, q = 20, J = (e) => Number(e.slice(1)), Y = (e) => {
62
- let t = [...new Set(e)].sort((e, t) => J(e) - J(t)), n = [];
61
+ var _e = 2e3, ve = 1e3, ye = 60, be = 1400, xe = 20, G = (e) => Number(e.slice(1)), K = (e) => {
62
+ let t = [...new Set(e)].sort((e, t) => G(e) - G(t)), n = [];
63
63
  for (let e of t) {
64
64
  let t = n[n.length - 1];
65
- t && J(e) === J(t.to) + 1 ? t.to = e : n.push({
65
+ t && G(e) === G(t.to) + 1 ? t.to = e : n.push({
66
66
  from: e,
67
67
  to: e
68
68
  });
69
69
  }
70
70
  return n.slice(0, 100);
71
- }, X = (e, t) => {
71
+ }, q = (e, t) => {
72
72
  let n = [];
73
73
  for (let r = e.indexOf(t); r >= 0;) n.push(r), r = e.indexOf(t, r + t.length);
74
74
  return n;
75
- }, ye = (e, t, n) => {
76
- let r = X(e, e.slice(t, t + n));
75
+ }, Se = (e, t, n) => {
76
+ let r = q(e, e.slice(t, t + n));
77
77
  if (r.length < 2) return {};
78
78
  let i = t, a = t + n;
79
- for (let t = !0; a - i <= ve; t = !t) {
80
- if (X(e, e.slice(i, a)).length === 1) return { find: e.slice(i, a) };
79
+ for (let t = !0; a - i <= be; t = !t) {
80
+ if (q(e, e.slice(i, a)).length === 1) return { find: e.slice(i, a) };
81
81
  if (t && i > 0) i = e.slice(0, i).replace(/\S*\s*$/, "").length;
82
82
  else if (a < e.length) {
83
83
  let t = e.slice(a).match(/^\s*\S*/)?.[0] ?? "";
@@ -88,17 +88,17 @@ var ge = 2e3, K = 1e3, _e = 60, ve = 1400, q = 20, J = (e) => Number(e.slice(1))
88
88
  index: r.indexOf(t) + 1 || 1,
89
89
  of: r.length
90
90
  } };
91
- }, Z = (e) => (e.querySelectorAll("[data-quote-skip]").forEach((e) => e.remove()), e.querySelectorAll("[data-paragraph]").forEach((e) => e.append("\n")), e.textContent ?? ""), Q = (e) => e.length > K ? `${e.slice(0, K / 2)} […] ${e.slice(-500)}` : e, be = (e, t, n) => {
91
+ }, J = (e) => (e.querySelectorAll("[data-quote-skip]").forEach((e) => e.remove()), e.querySelectorAll("[data-paragraph]").forEach((e) => e.append("\n")), e.textContent ?? ""), Y = (e) => e.length > ve ? `${e.slice(0, ve / 2)} […] ${e.slice(-500)}` : e, X = (e, t, n) => {
92
92
  if (!e.contains(t.commonAncestorContainer)) return;
93
93
  let r = [...e.querySelectorAll("[data-paragraph]")].filter((e) => !e.closest(n) && t.intersectsNode(e));
94
94
  if (!r.length) return;
95
- let i = r.flatMap((e) => e.dataset.paragraph.split(" ")), a = Z(t.cloneContents()), o = a.trim();
95
+ let i = r.flatMap((e) => e.dataset.paragraph.split(" ")), a = J(t.cloneContents()), o = a.trim();
96
96
  if (o.length < 2) return;
97
97
  let s = {
98
98
  format: "docx",
99
- runs: Y(i),
99
+ runs: K(i),
100
100
  paragraphCount: new Set(i).size,
101
- quote: Q(o),
101
+ quote: Y(o),
102
102
  measure: () => {
103
103
  let e = t.getBoundingClientRect(), n = t.getClientRects()[0] ?? e;
104
104
  return {
@@ -117,17 +117,17 @@ var ge = 2e3, K = 1e3, _e = 60, ve = 1400, q = 20, J = (e) => Number(e.slice(1))
117
117
  if (r.length === 1) {
118
118
  let e = r[0], n = document.createRange();
119
119
  n.selectNodeContents(e);
120
- let i = Z(n.cloneContents()).replace(/\n$/, ""), c = document.createRange();
120
+ let i = J(n.cloneContents()).replace(/\n$/, ""), c = document.createRange();
121
121
  c.setStart(e, 0), c.setEnd(t.startContainer, t.startOffset);
122
- let l = Z(c.cloneContents()).length + (a.length - a.trimStart().length);
123
- s.before = i.slice(Math.max(0, l - _e), l), s.after = i.slice(l + o.length, l + o.length + _e), Object.assign(s, ye(i, l, o.length));
122
+ let l = J(c.cloneContents()).length + (a.length - a.trimStart().length);
123
+ s.before = i.slice(Math.max(0, l - ye), l), s.after = i.slice(l + o.length, l + o.length + ye), Object.assign(s, Se(i, l, o.length));
124
124
  }
125
125
  return s;
126
- }, $ = (e) => {
126
+ }, Z = (e) => {
127
127
  let t = "";
128
128
  for (let n = e; n > 0; n = Math.floor((n - 1) / 26)) t = String.fromCharCode(65 + (n - 1) % 26) + t;
129
129
  return t;
130
- }, xe = (e, t) => {
130
+ }, Ce = (e, t) => {
131
131
  let n = { ...t }, r = e.rows.flatMap((e) => e.cells.filter((e) => e.span).map((t) => ({
132
132
  r1: e.row,
133
133
  r2: e.row + t.span.rows - 1,
@@ -138,7 +138,7 @@ var ge = 2e3, K = 1e3, _e = 60, ve = 1400, q = 20, J = (e) => Number(e.slice(1))
138
138
  e = !1;
139
139
  for (let t of r) t.r1 <= n.r2 && t.r2 >= n.r1 && t.c1 <= n.c2 && t.c2 >= n.c1 && (t.r1 < n.r1 || t.r2 > n.r2 || t.c1 < n.c1 || t.c2 > n.c2) && (n.r1 = Math.min(n.r1, t.r1), n.r2 = Math.max(n.r2, t.r2), n.c1 = Math.min(n.c1, t.c1), n.c2 = Math.max(n.c2, t.c2), e = !0);
140
140
  }
141
- let i = `${$(n.c1)}${n.r1}`, a = `${$(n.c2)}${n.r2}`, o = (e.hiddenRows ?? []).filter((e) => e >= n.r1 && e <= n.r2), s = e.columns.filter((e) => e.hidden && e.col >= n.c1 && e.col <= n.c2).map((e) => $(e.col)), c = e.rows.filter((e) => e.row >= n.r1 && e.row <= n.r2).flatMap((e) => e.cells.filter((e) => e.col >= n.c1 && e.col <= n.c2 && e.value !== void 0 && e.value !== "")).slice(0, q).map((e) => String(e.value)).join("; ").slice(0, 500);
141
+ let i = `${Z(n.c1)}${n.r1}`, a = `${Z(n.c2)}${n.r2}`, o = (e.hiddenRows ?? []).filter((e) => e >= n.r1 && e <= n.r2), s = e.columns.filter((e) => e.hidden && e.col >= n.c1 && e.col <= n.c2).map((e) => Z(e.col)), c = e.rows.filter((e) => e.row >= n.r1 && e.row <= n.r2).flatMap((e) => e.cells.filter((e) => e.col >= n.c1 && e.col <= n.c2 && e.value !== void 0 && e.value !== "")).slice(0, xe).map((e) => String(e.value)).join("; ").slice(0, 500);
142
142
  return {
143
143
  format: "xlsx",
144
144
  sheet: e.name,
@@ -151,10 +151,10 @@ var ge = 2e3, K = 1e3, _e = 60, ve = 1400, q = 20, J = (e) => Number(e.slice(1))
151
151
  };
152
152
  // ../../packages/components/src/chat/PkSelectionActions.vue?vue&type=script&setup=true&lang.ts
153
153
  C(), O(), E(), p();
154
- var Se = ["onKeydown"], Ce = ["placeholder", "aria-label"], we = ["disabled"], Te = ["aria-label"], Ee = { class: "pk-selection-actions__text" }, De = {
154
+ var we = ["onKeydown"], Te = ["placeholder", "aria-label"], Q = ["disabled"], Ee = ["aria-label"], De = { class: "pk-selection-actions__text" }, Oe = {
155
155
  key: 0,
156
156
  class: "pk-selection-actions__text"
157
- }, Oe = ["onClick"], ke = /*#__PURE__*/ U(/* @__PURE__ */ N({
157
+ }, ke = ["onClick"], Ae = /*#__PURE__*/ U(/* @__PURE__ */ N({
158
158
  __name: "PkSelectionActions",
159
159
  props: /*@__PURE__*/ l({
160
160
  actions: { type: Array },
@@ -178,7 +178,7 @@ var Se = ["onKeydown"], Ce = ["placeholder", "aria-label"], we = ["disabled"], T
178
178
  "close"
179
179
  ], ["update:asking"]),
180
180
  setup(e, { emit: t }) {
181
- let n = e, o = t, c = s(e, "asking"), { t: l } = te({ useScope: "global" }), d = h("barEl"), f = h("inputEl"), { width: p, height: g } = de(d, void 0, { box: "border-box" }), S = x(() => oe({
181
+ let n = e, o = t, c = s(e, "asking"), { t: l } = ne({ useScope: "global" }), d = h("barEl"), f = h("inputEl"), { width: p, height: g } = de(d, void 0, { box: "border-box" }), S = x(() => B({
182
182
  ...n.anchor,
183
183
  bar: {
184
184
  width: p.value,
@@ -200,7 +200,7 @@ var Se = ["onKeydown"], Ce = ["placeholder", "aria-label"], we = ["disabled"], T
200
200
  }, N = () => {
201
201
  C.value ? O() : o("close");
202
202
  };
203
- return (t, n) => (L(), I("div", {
203
+ return (t, n) => (I(), F("div", {
204
204
  class: r(["pk-selection-actions", {
205
205
  "pk-selection-actions--fixed": e.strategy === "fixed",
206
206
  "pk-selection-actions--asking": !!C.value
@@ -210,7 +210,7 @@ var Se = ["onKeydown"], Ce = ["placeholder", "aria-label"], we = ["disabled"], T
210
210
  left: `${S.value.left}px`
211
211
  }),
212
212
  onKeydown: A(_(N, ["stop"]), ["esc"])
213
- }, [C.value ? (L(), I("form", {
213
+ }, [C.value ? (I(), F("form", {
214
214
  key: 0,
215
215
  ref_key: "barEl",
216
216
  ref: d,
@@ -225,60 +225,60 @@ var Se = ["onKeydown"], Ce = ["placeholder", "aria-label"], we = ["disabled"], T
225
225
  maxlength: "500",
226
226
  placeholder: C.value.placeholder,
227
227
  "aria-label": C.value.placeholder
228
- }, null, 8, Ce), [[ee, E.value]]), y("button", {
228
+ }, null, 8, Te), [[ee, E.value]]), y("button", {
229
229
  type: "submit",
230
230
  class: "pk-selection-actions__button pk-selection-actions__button--send",
231
231
  disabled: !E.value.trim()
232
- }, w(P(l)("action.send")), 9, we)], 544)) : (L(), I("div", {
232
+ }, w(P(l)("action.send")), 9, Q)], 544)) : (I(), F("div", {
233
233
  key: 1,
234
234
  ref_key: "barEl",
235
235
  ref: d,
236
236
  class: "pk-selection-actions__bar",
237
237
  role: "toolbar",
238
238
  "aria-label": P(l)("selectionActions.label")
239
- }, [e.note ? (L(), I(v, { key: 0 }, [y("span", Ee, w(e.note), 1), e.noteAction ? (L(), I("button", {
239
+ }, [e.note ? (I(), F(v, { key: 0 }, [y("span", De, w(e.note), 1), e.noteAction ? (I(), F("button", {
240
240
  key: 0,
241
241
  type: "button",
242
242
  class: "pk-selection-actions__button",
243
243
  onMousedown: n[1] ||= _(() => {}, ["prevent"]),
244
244
  onClick: n[2] ||= (e) => o("note")
245
- }, w(e.noteAction), 33)) : j("", !0)], 64)) : (L(), I(v, { key: 1 }, [
246
- e.hint ? (L(), I("span", De, w(e.hint), 1)) : j("", !0),
247
- (L(!0), I(v, null, m(e.actions, (e) => (L(), I("button", {
245
+ }, w(e.noteAction), 33)) : j("", !0)], 64)) : (I(), F(v, { key: 1 }, [
246
+ e.hint ? (I(), F("span", Oe, w(e.hint), 1)) : j("", !0),
247
+ (I(!0), F(v, null, m(e.actions, (e) => (I(), F("button", {
248
248
  key: e.id,
249
249
  type: "button",
250
250
  class: "pk-selection-actions__button",
251
251
  onMousedown: n[3] ||= _(() => {}, ["prevent"]),
252
252
  onClick: (t) => k(e)
253
- }, w(e.label), 41, Oe))), 128)),
253
+ }, w(e.label), 41, ke))), 128)),
254
254
  y("button", {
255
255
  type: "button",
256
256
  class: "pk-selection-actions__button",
257
257
  onMousedown: n[4] ||= _(() => {}, ["prevent"]),
258
258
  onClick: n[5] ||= (e) => D(void 0, P(l)("selectionActions.askPlaceholder"))
259
259
  }, w(P(l)("selectionActions.ask")), 33)
260
- ], 64))], 8, Te)), a(t.$slots, "card")], 46, Se));
260
+ ], 64))], 8, Ee)), a(t.$slots, "card")], 46, we));
261
261
  }
262
262
  }), [["styles", [".pk-selection-actions{z-index:10;max-width:min(32rem, 100% - var(--spacing-16));position:absolute}.pk-selection-actions--fixed{z-index:2147483647;position:fixed}.pk-selection-actions--asking{width:min(var(--spacing-384), 100% - var(--spacing-16))}.pk-selection-actions__bar{align-items:center;gap:var(--spacing-4);width:max-content;max-width:100%;padding:var(--spacing-4);border-radius:var(--rounded-lg);background-color:var(--color-word-1);color:var(--color-surface);font-family:var(--font-sans);font-size:var(--text-14);font-weight:var(--font-medium);box-shadow:var(--shadow-lg);flex-wrap:wrap;display:flex}.pk-selection-actions__bar--field{flex-wrap:nowrap;width:100%}.pk-selection-actions__text{padding:0 var(--spacing-8);opacity:.75;font-size:var(--text-12);font-weight:var(--font-normal)}.pk-selection-actions__button{border-radius:var(--rounded);padding:var(--spacing-6) var(--spacing-10);color:inherit;font:inherit;cursor:pointer;background-color:#0000;border:0;flex-shrink:0}.pk-selection-actions__button:hover{background-color:color-mix(in srgb, var(--color-surface) 16%, transparent)}.pk-selection-actions__button:focus-visible{outline:var(--spacing-2) solid var(--color-surface);outline-offset:calc(-1 * var(--spacing-2))}.pk-selection-actions__button--send{background-color:var(--color-surface);color:var(--color-word-1)}.pk-selection-actions__button--send:hover{background-color:var(--color-surface)}.pk-selection-actions__button--send:disabled{opacity:.5;cursor:default}.pk-selection-actions__input{border-radius:var(--rounded);min-width:0;padding:var(--spacing-6) var(--spacing-8);background-color:color-mix(in srgb, var(--color-surface) 12%, transparent);color:inherit;font:inherit;font-weight:var(--font-normal);border:0;flex:1}.pk-selection-actions__input::placeholder{color:inherit;opacity:.6}.pk-selection-actions__input:focus-visible{outline:var(--spacing-2) solid var(--color-surface);outline-offset:calc(-1 * var(--spacing-2))}"]]]);
263
263
  // ../../packages/components/src/chat/PkSpreadsheetPreview.vue?vue&type=script&setup=true&lang.ts
264
264
  C(), E(), p(), O();
265
- var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-preview__bar" }, Me = ["aria-label"], Ne = ["aria-label"], Pe = ["aria-label"], Fe = [
265
+ var je = { class: "pk-spreadsheet-preview" }, Me = { class: "pk-spreadsheet-preview__bar" }, Ne = ["aria-label"], Pe = ["aria-label"], Fe = ["aria-label"], Ie = [
266
266
  "rowspan",
267
267
  "colspan",
268
268
  "data-focus",
269
269
  "title",
270
270
  "onMousedown",
271
271
  "onMouseenter"
272
- ], Ie = {
272
+ ], Le = {
273
273
  key: 1,
274
274
  class: "pk-spreadsheet-preview__more"
275
- }, Le = ["aria-label"], Re = ["aria-current", "onClick"], ze = { class: "pk-spreadsheet-preview__status" }, Be = { class: "pk-spreadsheet-preview__info" }, Ve = ["title"], He = ["title"], Ue = {
275
+ }, Re = ["aria-label"], ze = ["aria-current", "onClick"], Be = { class: "pk-spreadsheet-preview__status" }, Ve = { class: "pk-spreadsheet-preview__info" }, He = ["title"], Ue = ["title"], We = {
276
276
  key: 2,
277
277
  class: "pk-spreadsheet-preview__stats"
278
- }, We = {
278
+ }, Ge = {
279
279
  key: 0,
280
280
  class: "pk-spreadsheet-preview__average"
281
- }, Ge = { key: 1 }, Ke = { class: "pk-spreadsheet-preview__zoom" }, qe = { class: "pk-spreadsheet-preview__percent" }, Je = 64, Ye = 20, Xe = 28, Ze = 44, Qe = /*#__PURE__*/ U(/* @__PURE__ */ N({
281
+ }, Ke = { key: 1 }, qe = { class: "pk-spreadsheet-preview__zoom" }, Je = { class: "pk-spreadsheet-preview__percent" }, Ye = 64, Xe = 20, Ze = 28, Qe = 44, $e = /*#__PURE__*/ U(/* @__PURE__ */ N({
282
282
  __name: "PkSpreadsheetPreview",
283
283
  props: /*@__PURE__*/ l({ preview: { type: null } }, {
284
284
  sheet: { default: 0 },
@@ -288,7 +288,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
288
288
  }),
289
289
  emits: /*@__PURE__*/ l(["select"], ["update:sheet", "update:zoom"]),
290
290
  setup(e, { emit: t }) {
291
- let n = e, a = t, { t: o, locale: c } = te({ useScope: "global" }), l = s(e, "sheet"), p = s(e, "zoom"), g = h("scrollEl"), { width: ee, height: C } = de(g, {
291
+ let n = e, a = t, { t: o, locale: c } = ne({ useScope: "global" }), l = s(e, "sheet"), p = s(e, "zoom"), g = h("scrollEl"), { width: ee, height: C } = de(g, {
292
292
  width: 0,
293
293
  height: 0
294
294
  }, { box: "border-box" }), T = x(() => n.preview.sheets[l.value] ?? n.preview.sheets[0]);
@@ -302,34 +302,34 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
302
302
  }, D = x(() => {
303
303
  let e = T.value;
304
304
  if (!e) return [];
305
- let t = new Set(e.columns.filter((e) => e.hidden).map((e) => e.col)), n = new Map(e.columns.map((e) => [e.col, e.width])), r = [], i = Ze, a = ee.value / p.value;
305
+ let t = new Set(e.columns.filter((e) => e.hidden).map((e) => e.col)), n = new Map(e.columns.map((e) => [e.col, e.width])), r = [], i = Qe, a = ee.value / p.value;
306
306
  for (let o = 1; o <= e.lastColumn || !e.moreColumns && (o <= e.lastColumn + 2 || i < a); o++) {
307
307
  if (t.has(o)) continue;
308
- let e = n.get(o) ?? Je;
308
+ let e = n.get(o) ?? Ye;
309
309
  r.push({
310
310
  col: o,
311
311
  width: e
312
312
  }), i += e;
313
313
  }
314
314
  return r;
315
- }), O = x(() => D.value.reduce((e, t) => e + t.width, Ze)), k = x(() => D.value.map((e) => `${e.col}:${e.width}`).join(",")), A = /* @__PURE__ */ new WeakMap(), M = x(() => {
315
+ }), O = x(() => D.value.reduce((e, t) => e + t.width, Qe)), k = x(() => D.value.map((e) => `${e.col}:${e.width}`).join(",")), A = /* @__PURE__ */ new WeakMap(), M = x(() => {
316
316
  let e = T.value;
317
317
  if (!e) return [];
318
- let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((C.value / p.value - Xe) / Ye), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = A.get(e);
318
+ let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((C.value / p.value - Ze) / Xe), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = A.get(e);
319
319
  a || (a = /* @__PURE__ */ new Map(), A.set(e, a));
320
320
  let o = a;
321
321
  return Array.from({ length: i }, (e, t) => t + 1).filter((e) => !t.has(e)).map((e) => {
322
322
  let t = o.get(e);
323
323
  return t || (t = {
324
324
  row: e,
325
- height: n.get(e) ?? Ye
325
+ height: n.get(e) ?? Xe
326
326
  }, o.set(e, t)), t;
327
327
  });
328
328
  }), N = x(() => {
329
329
  let e = /* @__PURE__ */ new Map();
330
330
  for (let t of T.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
331
331
  return e;
332
- }), ie = x(() => {
332
+ }), R = x(() => {
333
333
  let e = /* @__PURE__ */ new Map();
334
334
  for (let t of T.value?.rows ?? []) for (let n of t.cells) if (n.span) for (let r = 0; r < n.span.rows; r++) for (let i = 0; i < n.span.cols; i++) (r || i) && e.set(`${t.row + r},${n.col + i}`, {
335
335
  row: t.row,
@@ -342,15 +342,15 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
342
342
  rows: M.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
343
343
  cols: D.value.filter((e) => e.col >= t && e.col < t + n.cols).length
344
344
  };
345
- }, oe = (e) => e?.style === void 0 ? void 0 : n.preview.styles[e.style], B = (e) => {
345
+ }, B = (e) => e?.style === void 0 ? void 0 : n.preview.styles[e.style], V = (e) => {
346
346
  let t = e.numFmt === void 0 ? void 0 : n.preview.numberFormats?.[e.numFmt], r = e.value;
347
347
  if (t !== void 0) try {
348
- return e.format === "date" ? e.serial === void 0 ? void 0 : ne(t, e.serial, c.value, n.preview.date1904) : typeof r == "number" ? R(t) ? ne(t, r, c.value, n.preview.date1904) : re(t, r, c.value) : void 0;
348
+ return e.format === "date" ? e.serial === void 0 ? void 0 : re(t, e.serial, c.value, n.preview.date1904) : typeof r == "number" ? L(t) ? re(t, r, c.value, n.preview.date1904) : ie(t, r, c.value) : void 0;
349
349
  } catch {
350
350
  return;
351
351
  }
352
- }, V = (e, t) => {
353
- let n = B(e);
352
+ }, oe = (e, t) => {
353
+ let n = V(e);
354
354
  if (n) return n.text;
355
355
  let r = e.decimals === void 0 ? { maximumFractionDigits: 10 } : {
356
356
  minimumFractionDigits: e.decimals,
@@ -375,7 +375,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
375
375
  if (!e) return "";
376
376
  if (e.missing) return "—";
377
377
  let t = e.value;
378
- return t === void 0 ? "" : typeof t == "boolean" ? o(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? B(e)?.text ?? se(t) : typeof t == "number" ? V(e, t) : t;
378
+ return t === void 0 ? "" : typeof t == "boolean" ? o(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? V(e)?.text ?? se(t) : typeof t == "number" ? oe(e, t) : t;
379
379
  }, le = (e) => {
380
380
  if (!e) return "";
381
381
  if (e.formula) return `=${e.formula}`;
@@ -386,7 +386,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
386
386
  ...e.format === "percent" ? { style: "percent" } : {}
387
387
  }).format(t) : ce(e);
388
388
  }, H = (e) => e ? `${e.width}px solid ${e.color}` : void 0, ue = (e, t, n) => {
389
- let r = oe(e), i = e?.value, a = typeof i == "number" || e?.format === "date" || !!e?.missing, o = {
389
+ let r = B(e), i = e?.value, a = typeof i == "number" || e?.format === "date" || !!e?.missing, o = {
390
390
  textAlign: r?.align ?? (a ? "right" : typeof i == "boolean" || e?.format === "error" ? "center" : "left"),
391
391
  verticalAlign: r?.valign === "top" ? "top" : r?.valign === "middle" ? "middle" : "bottom",
392
392
  whiteSpace: r?.wrap ? "pre-wrap" : "nowrap"
@@ -394,52 +394,95 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
394
394
  r?.bold && (o.fontWeight = 700), r?.italic && (o.fontStyle = "italic");
395
395
  let s = [r?.underline ? "underline" : "", r?.strike ? "line-through" : ""].filter(Boolean).join(" ");
396
396
  s && (o.textDecoration = s), r?.size && (o.fontSize = `${r.size}pt`);
397
- let c = e ? B(e)?.color : void 0;
397
+ let c = e ? V(e)?.color : void 0;
398
398
  if ((c ?? r?.color) && (o.color = c ?? r?.color), r?.fill && (o.backgroundColor = r.fill), r?.indent) {
399
399
  let e = `${4 + r.indent * 9}px`;
400
400
  o.textAlign === "right" ? o.paddingRight = e : o.paddingLeft = e;
401
401
  }
402
- return o.borderTop = H(r?.borders?.top), o.borderRight = H(r?.borders?.right), o.borderBottom = H(r?.borders?.bottom), o.borderLeft = H(r?.borders?.left), Object.assign(o, fe(t, n)), o;
402
+ return fe(t, n) ? (o.borderStyle = "hidden", o.boxShadow = xe(e, t, n)) : (o.borderTop = H(r?.borders?.top), o.borderRight = H(r?.borders?.right), o.borderBottom = H(r?.borders?.bottom), o.borderLeft = H(r?.borders?.left), o.boxShadow = W(e, t, n).join(", ")), Object.assign(o, Se(t, n)), o;
403
403
  }, fe = (e, t) => {
404
+ let n = T.value?.frozen;
405
+ return !!n && (e <= n.rows || t <= n.cols);
406
+ }, U = {
407
+ top: (e) => `inset 0 ${e.width}px 0 ${e.color}`,
408
+ right: (e) => `inset -${e.width}px 0 0 ${e.color}`,
409
+ bottom: (e) => `inset 0 -${e.width}px 0 ${e.color}`,
410
+ left: (e) => `inset ${e.width}px 0 0 ${e.color}`
411
+ }, me = (...e) => e.reduce((e, t) => t && (!e || t.width > e.width) ? t : e, void 0), W = (e, t, n) => {
412
+ let r = B(e)?.borders;
413
+ return [t === M.value[0]?.row && r?.top && U.top(r.top), n === D.value[0]?.col && r?.left && U.left(r.left)].filter((e) => !!e);
414
+ }, he = x(() => M.value.map((e) => e.row)), ge = x(() => D.value.map((e) => e.col)), _e = x(() => new Map(he.value.map((e, t) => [e, t]))), ve = x(() => new Map(ge.value.map((e, t) => [e, t]))), ye = (e, t, n, r) => {
415
+ let i = [], a = t.get(n) ?? e.length;
416
+ for (; a < e.length && e[a] < n + r; a++) i.push(e[a]);
417
+ return {
418
+ spanned: i,
419
+ next: e[a]
420
+ };
421
+ }, be = (e, t, n, r) => {
422
+ let { spanned: i, next: a } = ye(he.value, _e.value, t, e?.span?.rows ?? 1), { spanned: o, next: s } = ye(ge.value, ve.value, n, e?.span?.cols ?? 1);
423
+ return (r === "right" ? s === void 0 ? [] : i.map((e) => ({
424
+ row: e,
425
+ col: s
426
+ })) : a === void 0 ? [] : o.map((e) => ({
427
+ row: a,
428
+ col: e
429
+ }))).map((e) => {
430
+ let t = R.value.get(`${e.row},${e.col}`) ?? e;
431
+ return z(t.row, t.col);
432
+ });
433
+ }, xe = (e, t, n) => {
434
+ let r = B(e)?.borders, i = me(r?.right, ...be(e, t, n, "right").map((e) => B(e)?.borders?.left)), a = me(r?.bottom, ...be(e, t, n, "bottom").map((e) => B(e)?.borders?.top)), o = T.value?.gridlines;
435
+ return [
436
+ i ? U.right(i) : o && "inset calc(var(--border) * -1) 0 0 var(--pk-spreadsheet-gridline)",
437
+ a ? U.bottom(a) : o && "inset 0 calc(var(--border) * -1) 0 var(--pk-spreadsheet-gridline)",
438
+ ...W(e, t, n)
439
+ ].filter(Boolean).join(", ");
440
+ }, G = (e) => Ze + M.value.filter((t) => t.row < e).reduce((e, t) => e + t.height, 0), K = (e) => Qe + D.value.filter((t) => t.col < e).reduce((e, t) => e + t.width, 0), q = x(() => {
441
+ let e = T.value?.frozen;
442
+ return {
443
+ top: G((e?.rows ?? 0) + 1),
444
+ left: K((e?.cols ?? 0) + 1)
445
+ };
446
+ }), Se = (e, t) => {
404
447
  let n = T.value?.frozen;
405
448
  if (!n) return {};
406
449
  let r = {};
407
- return e <= n.rows && (r.position = "sticky", r.top = `${Xe + M.value.filter((t) => t.row < e).reduce((e, t) => e + t.height, 0)}px`, r.zIndex = 2), t <= n.cols && (r.position = "sticky", r.left = `${Ze + D.value.filter((e) => e.col < t).reduce((e, t) => e + t.width, 0)}px`, r.zIndex = e <= n.rows ? 3 : 2), r;
408
- }, U = b({
450
+ return e <= n.rows && (r.position = "sticky", r.top = `${G(e)}px`, r.scrollMarginTop = r.top, r.zIndex = 0), t <= n.cols && (r.position = "sticky", r.left = `${K(t)}px`, r.scrollMarginLeft = r.left, r.zIndex = +(e <= n.rows)), r;
451
+ }, J = b({
409
452
  row: 1,
410
453
  col: 1
411
- }), W = b({
454
+ }), Y = b({
412
455
  row: 1,
413
456
  col: 1
414
457
  });
415
458
  d(T, () => {
416
- U.value = {
459
+ J.value = {
417
460
  row: 1,
418
461
  col: 1
419
- }, W.value = {
462
+ }, Y.value = {
420
463
  row: 1,
421
464
  col: 1
422
465
  };
423
466
  });
424
- let G = x(() => ({
425
- r1: Math.min(U.value.row, W.value.row),
426
- r2: Math.max(U.value.row, W.value.row),
427
- c1: Math.min(U.value.col, W.value.col),
428
- c2: Math.max(U.value.col, W.value.col)
429
- })), me = (e, t) => e >= G.value.r1 && e <= G.value.r2 && t >= G.value.c1 && t <= G.value.c2, he = (e, t) => W.value.row === e && W.value.col === t, ge = (e) => e >= G.value.r1 && e <= G.value.r2 ? `${G.value.c1}:${G.value.c2}:${W.value.row === e ? W.value.col : 0}` : "", K = b(!1), _e = (e, t, n) => {
430
- g.value?.focus({ preventScroll: !0 }), W.value = {
467
+ let X = x(() => ({
468
+ r1: Math.min(J.value.row, Y.value.row),
469
+ r2: Math.max(J.value.row, Y.value.row),
470
+ c1: Math.min(J.value.col, Y.value.col),
471
+ c2: Math.max(J.value.col, Y.value.col)
472
+ })), Z = (e, t) => e >= X.value.r1 && e <= X.value.r2 && t >= X.value.c1 && t <= X.value.c2, we = (e, t) => Y.value.row === e && Y.value.col === t, Te = (e) => e >= X.value.r1 && e <= X.value.r2 ? `${X.value.c1}:${X.value.c2}:${Y.value.row === e ? Y.value.col : 0}` : "", Q = b(!1), Ee = (e, t, n) => {
473
+ g.value?.focus({ preventScroll: !0 }), Y.value = {
431
474
  row: e,
432
475
  col: t
433
- }, n.shiftKey || (U.value = {
476
+ }, n.shiftKey || (J.value = {
434
477
  row: e,
435
478
  col: t
436
- }), K.value = !0;
437
- }, ve = (e, t) => {
438
- K.value && (W.value = {
479
+ }), Q.value = !0;
480
+ }, De = (e, t) => {
481
+ Q.value && (Y.value = {
439
482
  row: e,
440
483
  col: t
441
484
  });
442
- }, q, J = () => {
485
+ }, Oe, ke = () => {
443
486
  let e = [...g.value?.querySelectorAll(".pk-spreadsheet-preview__cell--range, [data-focus]") ?? []].map((e) => e.getBoundingClientRect());
444
487
  if (e.length) return {
445
488
  start: {
@@ -448,19 +491,19 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
448
491
  },
449
492
  bottom: Math.max(...e.map((e) => e.bottom))
450
493
  };
451
- }, Y = () => T.value ? {
452
- ...xe(T.value, G.value),
453
- measure: J
494
+ }, Ae = () => T.value ? {
495
+ ...Ce(T.value, X.value),
496
+ measure: ke
454
497
  } : void 0;
455
- d([G, K], () => {
456
- clearTimeout(q), !K.value && (q = setTimeout(() => {
457
- let e = G.value, t = e.r2 > e.r1 || e.c2 > e.c1;
458
- a("select", t ? Y() : void 0);
498
+ d([X, Q], () => {
499
+ clearTimeout(Oe), !Q.value && (Oe = setTimeout(() => {
500
+ let e = X.value, t = e.r2 > e.r1 || e.c2 > e.c1;
501
+ a("select", t ? Ae() : void 0);
459
502
  }, 150));
460
503
  });
461
- let X = () => {
462
- clearTimeout(q), a("select", Y());
463
- }, ye = (e) => {
504
+ let $e = () => {
505
+ clearTimeout(Oe), a("select", Ae());
506
+ }, et = (e) => {
464
507
  let t = {
465
508
  ArrowUp: [-1, 0],
466
509
  ArrowDown: [1, 0],
@@ -471,7 +514,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
471
514
  }[e.key];
472
515
  if (!t) return;
473
516
  e.preventDefault();
474
- let n = M.value.map((e) => e.row), r = D.value.map((e) => e.col), a = (e) => ie.value.get(`${e.row},${e.col}`) ?? e, o = a(W.value), s = n.indexOf(W.value.row), c = r.indexOf(W.value.col), l = o;
517
+ let n = M.value.map((e) => e.row), r = D.value.map((e) => e.col), a = (e) => R.value.get(`${e.row},${e.col}`) ?? e, o = a(Y.value), s = n.indexOf(Y.value.row), c = r.indexOf(Y.value.col), l = o;
475
518
  for (;;) {
476
519
  let e = Math.min(n.length - 1, Math.max(0, s + t[0])), i = Math.min(r.length - 1, Math.max(0, c + t[1]));
477
520
  if (e === s && i === c || (s = e, c = i, l = a({
@@ -479,12 +522,12 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
479
522
  col: r[c]
480
523
  }), l.row !== o.row || l.col !== o.col)) break;
481
524
  }
482
- W.value = l, e.shiftKey || (U.value = l), i(() => g.value?.querySelector("[data-focus]")?.scrollIntoView({
525
+ Y.value = l, e.shiftKey || (J.value = l), i(() => g.value?.querySelector("[data-focus]")?.scrollIntoView({
483
526
  block: "nearest",
484
527
  inline: "nearest"
485
528
  }));
486
- }, Z = x(() => z(W.value.row, W.value.col)), Q = x(() => {
487
- let { r1: e, r2: t, c1: n, c2: r } = G.value;
529
+ }, tt = x(() => z(Y.value.row, Y.value.col)), $ = x(() => {
530
+ let { r1: e, r2: t, c1: n, c2: r } = X.value;
488
531
  if (e === t && n === r) return;
489
532
  let i = 0, a = 0, o = 0, s;
490
533
  for (let c = e; c <= t; c++) for (let e = n; e <= r; e++) {
@@ -493,20 +536,20 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
493
536
  }
494
537
  if (i) return {
495
538
  count: i,
496
- sum: s ? V(s, a) : void 0,
497
- average: s ? V(s, a / o) : void 0
539
+ sum: s ? oe(s, a) : void 0,
540
+ average: s ? oe(s, a / o) : void 0
498
541
  };
499
- }), be = (e) => {
542
+ }), nt = (e) => {
500
543
  p.value = Math.min(2, Math.max(.5, Math.round((p.value + e) * 10) / 10));
501
544
  };
502
545
  return (t, n) => {
503
546
  let i = pe;
504
- return L(), I("div", Ae, [
505
- y("div", je, [
547
+ return I(), F("div", je, [
548
+ y("div", Me, [
506
549
  y("span", {
507
550
  class: "pk-spreadsheet-preview__ref",
508
551
  "aria-label": P(o)("chatFilePreview.cell")
509
- }, w(E(W.value.col)) + w(W.value.row), 9, Me),
552
+ }, w(E(Y.value.col)) + w(Y.value.row), 9, Ne),
510
553
  n[6] ||= y("span", {
511
554
  class: "pk-spreadsheet-preview__fx",
512
555
  "aria-hidden": "true"
@@ -514,7 +557,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
514
557
  y("output", {
515
558
  class: "pk-spreadsheet-preview__formula",
516
559
  "aria-label": P(o)("chatFilePreview.formulaBar")
517
- }, w(le(Z.value)), 9, Ne)
560
+ }, w(le(tt.value)), 9, Pe)
518
561
  ]),
519
562
  y("div", {
520
563
  ref_key: "scrollEl",
@@ -523,114 +566,120 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
523
566
  tabindex: "0",
524
567
  role: "grid",
525
568
  "aria-label": T.value?.name,
526
- onKeydown: ye,
527
- onMouseup: n[2] ||= (e) => K.value = !1,
528
- onMouseleave: n[3] ||= (e) => K.value = !1
529
- }, [T.value ? (L(), I("table", {
569
+ onKeydown: et,
570
+ onMouseup: n[2] ||= (e) => Q.value = !1,
571
+ onMouseleave: n[3] ||= (e) => Q.value = !1
572
+ }, [T.value ? (I(), F("table", {
530
573
  key: 0,
531
574
  class: r(["pk-spreadsheet-preview__grid", { "pk-spreadsheet-preview__grid--lines": T.value.gridlines }]),
532
575
  style: u({
533
576
  zoom: p.value,
534
- width: `${O.value}px`
577
+ width: `${O.value}px`,
578
+ "--pk-spreadsheet-stuck-top": `${q.value.top}px`,
579
+ "--pk-spreadsheet-stuck-left": `${q.value.left}px`
535
580
  })
536
581
  }, [
537
- y("colgroup", null, [y("col", { style: u({ width: `${Ze}px` }) }, null, 4), (L(!0), I(v, null, m(D.value, (e) => (L(), I("col", {
582
+ y("colgroup", null, [y("col", { style: u({ width: `${Qe}px` }) }, null, 4), (I(!0), F(v, null, m(D.value, (e) => (I(), F("col", {
538
583
  key: e.col,
539
584
  style: u({ width: `${e.width}px` })
540
585
  }, null, 4))), 128))]),
541
- y("thead", null, [y("tr", { style: u({ height: `${Xe}px` }) }, [n[7] ||= y("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (L(!0), I(v, null, m(D.value, (e) => (L(), I("th", {
586
+ y("thead", null, [y("tr", { style: u({ height: `${Ze}px` }) }, [n[7] ||= y("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (I(!0), F(v, null, m(D.value, (e) => (I(), F("th", {
542
587
  key: e.col,
543
588
  scope: "col",
544
- class: r(["pk-spreadsheet-preview__head", { "pk-spreadsheet-preview__head--current": e.col >= G.value.c1 && e.col <= G.value.c2 }])
545
- }, w(E(e.col)), 3))), 128))], 4)]),
546
- y("tbody", null, [(L(!0), I(v, null, m(M.value, (e, t, n, i) => {
589
+ class: r(["pk-spreadsheet-preview__head", { "pk-spreadsheet-preview__head--current": e.col >= X.value.c1 && e.col <= X.value.c2 }]),
590
+ style: u(T.value.frozen && e.col <= T.value.frozen.cols ? {
591
+ left: `${K(e.col)}px`,
592
+ zIndex: 2
593
+ } : void 0)
594
+ }, w(E(e.col)), 7))), 128))], 4)]),
595
+ y("tbody", null, [(I(!0), F(v, null, m(M.value, (e, t, n, i) => {
547
596
  let a = [
548
597
  e,
549
598
  T.value,
550
599
  k.value,
551
600
  P(c),
552
- ge(e.row)
601
+ Te(e.row)
553
602
  ];
554
603
  if (i && i.el && i.key === e.row && S(i, a)) return i;
555
- let s = (L(), I("tr", {
604
+ let s = (I(), F("tr", {
556
605
  key: e.row,
557
606
  style: u({ height: `${e.height}px` })
558
607
  }, [y("th", {
559
608
  scope: "row",
560
- class: r(["pk-spreadsheet-preview__row", { "pk-spreadsheet-preview__row--current": e.row >= G.value.r1 && e.row <= G.value.r2 }]),
609
+ class: r(["pk-spreadsheet-preview__row", { "pk-spreadsheet-preview__row--current": e.row >= X.value.r1 && e.row <= X.value.r2 }]),
561
610
  style: u(T.value.frozen && e.row <= T.value.frozen.rows ? {
562
- ...fe(e.row, 0),
611
+ ...Se(e.row, 0),
563
612
  left: 0,
564
613
  zIndex: 4
565
614
  } : void 0)
566
- }, w(e.row), 7), (L(!0), I(v, null, m(D.value, (t) => (L(), I(v, { key: t.col }, [ie.value.has(`${e.row},${t.col}`) ? j("", !0) : (L(), I("td", {
615
+ }, w(e.row), 7), (I(!0), F(v, null, m(D.value, (t) => (I(), F(v, { key: t.col }, [R.value.has(`${e.row},${t.col}`) ? j("", !0) : (I(), F("td", {
567
616
  key: 0,
568
617
  rowspan: ae(e.row, t.col)?.rows,
569
618
  colspan: ae(e.row, t.col)?.cols,
570
619
  class: r(["pk-spreadsheet-preview__cell", {
571
- "pk-spreadsheet-preview__cell--range": me(e.row, t.col) && !he(e.row, t.col),
620
+ "pk-spreadsheet-preview__cell--range": Z(e.row, t.col) && !we(e.row, t.col),
572
621
  "pk-spreadsheet-preview__cell--missing": z(e.row, t.col)?.missing
573
622
  }]),
574
623
  style: u(ue(z(e.row, t.col), e.row, t.col)),
575
- "data-focus": he(e.row, t.col) ? "" : void 0,
624
+ "data-focus": we(e.row, t.col) ? "" : void 0,
576
625
  title: z(e.row, t.col)?.missing ? P(o)("chatFilePreview.missingValue") : void 0,
577
- onMousedown: _((n) => _e(e.row, t.col, n), ["prevent"]),
578
- onMouseenter: (n) => ve(e.row, t.col),
579
- onDblclick: X
580
- }, w(ce(z(e.row, t.col))), 47, Fe))], 64))), 128))], 4));
626
+ onMousedown: _((n) => Ee(e.row, t.col, n), ["prevent"]),
627
+ onMouseenter: (n) => De(e.row, t.col),
628
+ onDblclick: $e
629
+ }, w(ce(z(e.row, t.col))), 47, Ie))], 64))), 128))], 4));
581
630
  return s.memo = a, s;
582
631
  }, n, 0), 128))])
583
- ], 6)) : j("", !0), T.value && (T.value.moreRows || T.value.moreColumns) ? (L(), I("p", Ie, [T.value.moreRows ? (L(), I(v, { key: 0 }, [F(w(P(o)("chatFilePreview.moreRows", T.value.moreRows)), 1)], 64)) : j("", !0), T.value.moreColumns ? (L(), I(v, { key: 1 }, [F(w(P(o)("chatFilePreview.moreColumns", T.value.moreColumns)), 1)], 64)) : j("", !0)])) : j("", !0)], 40, Pe),
632
+ ], 6)) : j("", !0), T.value && (T.value.moreRows || T.value.moreColumns) ? (I(), F("p", Le, [T.value.moreRows ? (I(), F(v, { key: 0 }, [te(w(P(o)("chatFilePreview.moreRows", T.value.moreRows)), 1)], 64)) : j("", !0), T.value.moreColumns ? (I(), F(v, { key: 1 }, [te(w(P(o)("chatFilePreview.moreColumns", T.value.moreColumns)), 1)], 64)) : j("", !0)])) : j("", !0)], 40, Fe),
584
633
  y("nav", {
585
634
  class: "pk-spreadsheet-preview__sheets",
586
635
  "aria-label": P(o)("chatFilePreview.sheets")
587
- }, [(L(!0), I(v, null, m(e.preview.sheets, (e, t) => (L(), I("button", {
636
+ }, [(I(!0), F(v, null, m(e.preview.sheets, (e, t) => (I(), F("button", {
588
637
  key: e.name,
589
638
  type: "button",
590
639
  class: "pk-spreadsheet-preview__sheet",
591
640
  "aria-current": t === l.value ? "page" : void 0,
592
641
  onClick: (e) => l.value = t
593
- }, w(e.name), 9, Re))), 128))], 8, Le),
594
- y("div", ze, [y("p", Be, [e.preview.staleFormulas ? (L(), I("span", {
642
+ }, w(e.name), 9, ze))), 128))], 8, Re),
643
+ y("div", Be, [y("p", Ve, [e.preview.staleFormulas ? (I(), F("span", {
595
644
  key: 0,
596
645
  class: "pk-spreadsheet-preview__note",
597
646
  title: P(o)("chatFilePreview.staleFormulas")
598
- }, w(P(o)("chatFilePreview.staleFormulas")), 9, Ve)) : e.preview.computedFormulas ? (L(), I("span", {
647
+ }, w(P(o)("chatFilePreview.staleFormulas")), 9, He)) : e.preview.computedFormulas ? (I(), F("span", {
599
648
  key: 1,
600
649
  class: "pk-spreadsheet-preview__note",
601
650
  title: P(o)("chatFilePreview.computedFormulas")
602
- }, w(P(o)("chatFilePreview.computedFormulas")), 9, He)) : j("", !0), Q.value ? (L(), I("span", Ue, [
603
- Q.value.average ? (L(), I("span", We, w(P(o)("chatFilePreview.average")) + " " + w(Q.value.average), 1)) : j("", !0),
604
- y("span", null, w(P(o)("chatFilePreview.count")) + " " + w(Q.value.count), 1),
605
- Q.value.sum ? (L(), I("span", Ge, w(P(o)("chatFilePreview.sum")) + " " + w(Q.value.sum), 1)) : j("", !0)
606
- ])) : j("", !0)]), y("div", Ke, [
651
+ }, w(P(o)("chatFilePreview.computedFormulas")), 9, Ue)) : j("", !0), $.value ? (I(), F("span", We, [
652
+ $.value.average ? (I(), F("span", Ge, w(P(o)("chatFilePreview.average")) + " " + w($.value.average), 1)) : j("", !0),
653
+ y("span", null, w(P(o)("chatFilePreview.count")) + " " + w($.value.count), 1),
654
+ $.value.sum ? (I(), F("span", Ke, w(P(o)("chatFilePreview.sum")) + " " + w($.value.sum), 1)) : j("", !0)
655
+ ])) : j("", !0)]), y("div", qe, [
607
656
  f(i, {
608
657
  modifiers: "action-quiet",
609
658
  icon: "ri:subtract-line",
610
659
  "aria-label": P(o)("chatFilePreview.zoomOut"),
611
660
  disabled: p.value <= .5,
612
- onClick: n[4] ||= (e) => be(-.1)
661
+ onClick: n[4] ||= (e) => nt(-.1)
613
662
  }, null, 8, ["aria-label", "disabled"]),
614
- y("span", qe, w(Math.round(p.value * 100)) + "% ", 1),
663
+ y("span", Je, w(Math.round(p.value * 100)) + "% ", 1),
615
664
  f(i, {
616
665
  modifiers: "action-quiet",
617
666
  icon: "ri:add-line",
618
667
  "aria-label": P(o)("chatFilePreview.zoomIn"),
619
668
  disabled: p.value >= 2,
620
- onClick: n[5] ||= (e) => be(.1)
669
+ onClick: n[5] ||= (e) => nt(.1)
621
670
  }, null, 8, ["aria-label", "disabled"])
622
671
  ])])
623
672
  ]);
624
673
  };
625
674
  }
626
- }), [["styles", [".pk-spreadsheet-preview{--pk-spreadsheet-green:#217346;--pk-spreadsheet-green-head:#217346;flex-direction:column;flex:1;min-height:0;display:flex}.pk-spreadsheet-preview__bar{min-height:var(--spacing-40);border-bottom:var(--border) solid var(--color-surface-3);background-color:var(--color-surface);font-size:var(--text-14);align-items:stretch;display:flex}.pk-spreadsheet-preview__ref{width:var(--spacing-96);padding:0 var(--spacing-12);box-sizing:border-box;border-right:var(--border) solid var(--color-surface-3);font-variant-numeric:tabular-nums;flex-shrink:0;align-items:center;display:flex}.pk-spreadsheet-preview__fx{width:var(--spacing-40);border-right:var(--border) solid var(--color-surface-3);color:var(--color-word-3);flex-shrink:0;justify-content:center;align-items:center;font-family:Georgia,serif;font-style:italic;display:flex}.pk-spreadsheet-preview__formula{min-width:0;padding:0 var(--spacing-12);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;display:flex;overflow:hidden}.pk-spreadsheet-preview__scroll{cursor:cell;background-color:#fff;outline:none;flex:1;min-height:0;overflow:auto}.pk-spreadsheet-preview__scroll:focus-visible{box-shadow:inset 0 0 0 var(--spacing-2) var(--input-focus-color)}.pk-spreadsheet-preview__grid{border-collapse:collapse;table-layout:fixed;color:#000;-webkit-user-select:none;user-select:none;font-family:Calibri,Carlito,Segoe UI,Arial,sans-serif;font-size:11pt}.pk-spreadsheet-preview__grid td{max-width:0;padding:0 var(--spacing-4);text-overflow:clip;background-color:#fff;line-height:1.2;overflow:hidden}.pk-spreadsheet-preview__grid--lines td{border:var(--border) solid #e1e1e1}.pk-spreadsheet-preview__corner,.pk-spreadsheet-preview__head,.pk-spreadsheet-preview__row{z-index:1;border:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);color:var(--color-word-3);font-family:var(--font-family-sans);font-size:var(--text-12);font-weight:var(--font-normal);text-align:center;position:sticky}.pk-spreadsheet-preview__corner,.pk-spreadsheet-preview__head{padding:var(--spacing-4) var(--spacing-4) var(--spacing-2);vertical-align:middle;line-height:1;top:0}.pk-spreadsheet-preview__row{vertical-align:middle}.pk-spreadsheet-preview__corner{z-index:5;left:0}.pk-spreadsheet-preview__row{padding:0 var(--spacing-4);font-variant-numeric:tabular-nums;left:0}.pk-spreadsheet-preview__head--current{background-color:var(--color-surface-2);box-shadow:inset 0 calc(var(--spacing-2) * -1) 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-medium)}.pk-spreadsheet-preview__row--current{background-color:var(--color-surface-2);box-shadow:inset calc(var(--spacing-2) * -1) 0 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-medium)}.pk-spreadsheet-preview__cell[data-focus]{outline:var(--spacing-2) solid var(--pk-spreadsheet-green);outline-offset:calc(var(--spacing-2) * -1)}.pk-spreadsheet-preview__cell--range{box-shadow:inset 0 0 0 100vmax #1f1d2b14}.pk-spreadsheet-preview__cell--missing{color:#6b6880}.pk-spreadsheet-preview__more{padding:var(--spacing-8) var(--spacing-12);color:#6b6880;font-size:var(--text-12);margin:0;position:sticky;left:0}.pk-spreadsheet-preview__sheets{min-height:var(--spacing-32);padding-left:var(--spacing-40);border-top:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);flex-shrink:0;display:flex;overflow-x:auto}@media (pointer:coarse){.pk-spreadsheet-preview__sheets{min-height:var(--spacing-40)}}.pk-spreadsheet-preview__status{min-height:var(--spacing-40);border-top:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);font-size:var(--text-12);flex-shrink:0;align-items:center;display:flex}.pk-spreadsheet-preview__sheet{padding:0 var(--spacing-16);border:0;border-right:var(--border) solid var(--color-surface-3);color:var(--color-word-2);font:inherit;font-size:var(--text-12);white-space:nowrap;cursor:pointer;background:0 0;flex-shrink:0}.pk-spreadsheet-preview__sheet:first-child{border-left:var(--border) solid var(--color-surface-3)}.pk-spreadsheet-preview__sheet:hover{background-color:var(--color-surface-2)}.pk-spreadsheet-preview__sheet[aria-current=page]{background-color:var(--color-surface);box-shadow:inset 0 calc(var(--spacing-2) * -1) 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-semibold)}.pk-spreadsheet-preview__info{align-items:center;gap:var(--spacing-16);min-width:0;padding:0 var(--spacing-12);color:var(--color-word-2);font-variant-numeric:tabular-nums;white-space:nowrap;flex:1;margin:0;display:flex;overflow:hidden}.pk-spreadsheet-preview__note{min-width:0;color:var(--color-word-3);text-overflow:ellipsis;overflow:hidden}.pk-spreadsheet-preview__stats{gap:var(--spacing-12);flex-shrink:0;margin-left:auto;display:flex}@container (width<26rem){.pk-spreadsheet-preview__average{display:none}}.pk-spreadsheet-preview__zoom{align-items:center;gap:var(--spacing-2);padding-right:var(--spacing-8);flex-shrink:0;display:flex}.pk-spreadsheet-preview__percent{min-width:var(--spacing-40);font-variant-numeric:tabular-nums;text-align:center}@media (prefers-color-scheme:dark){:where(:host,:root,.theme):not(.theme--light) .pk-spreadsheet-preview{--pk-spreadsheet-green-head:#5fbf8f}}:where(.theme.theme--dark) .pk-spreadsheet-preview{--pk-spreadsheet-green-head:#5fbf8f}"]]]);
675
+ }), [["styles", [".pk-spreadsheet-preview{--pk-spreadsheet-green:#217346;--pk-spreadsheet-green-head:#217346;--pk-spreadsheet-gridline:#e1e1e1;flex-direction:column;flex:1;min-height:0;display:flex}.pk-spreadsheet-preview__bar{min-height:var(--spacing-40);border-bottom:var(--border) solid var(--color-surface-3);background-color:var(--color-surface);font-size:var(--text-14);align-items:stretch;display:flex}.pk-spreadsheet-preview__ref{width:var(--spacing-96);padding:0 var(--spacing-12);box-sizing:border-box;border-right:var(--border) solid var(--color-surface-3);font-variant-numeric:tabular-nums;flex-shrink:0;align-items:center;display:flex}.pk-spreadsheet-preview__fx{width:var(--spacing-40);border-right:var(--border) solid var(--color-surface-3);color:var(--color-word-3);flex-shrink:0;justify-content:center;align-items:center;font-family:Georgia,serif;font-style:italic;display:flex}.pk-spreadsheet-preview__formula{min-width:0;padding:0 var(--spacing-12);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;display:flex;overflow:hidden}.pk-spreadsheet-preview__scroll{cursor:cell;background-color:#fff;outline:none;flex:1;min-height:0;overflow:auto}.pk-spreadsheet-preview__scroll:focus-visible{box-shadow:inset 0 0 0 var(--spacing-2) var(--input-focus-color)}.pk-spreadsheet-preview__grid{border-collapse:collapse;table-layout:fixed;color:#000;-webkit-user-select:none;user-select:none;font-family:Calibri,Carlito,Segoe UI,Arial,sans-serif;font-size:11pt}.pk-spreadsheet-preview__grid td{max-width:0;padding:0 var(--spacing-4);text-overflow:clip;background-color:#fff;line-height:1.2;overflow:hidden}.pk-spreadsheet-preview__grid--lines td{border:var(--border) solid var(--pk-spreadsheet-gridline)}.pk-spreadsheet-preview__corner,.pk-spreadsheet-preview__head,.pk-spreadsheet-preview__row{z-index:1;box-shadow:var(--pk-spreadsheet-lines);background-color:var(--color-surface-1);color:var(--color-word-3);font-family:var(--font-family-sans);font-size:var(--text-12);font-weight:var(--font-normal);text-align:center;border-style:hidden;position:sticky}.pk-spreadsheet-preview__corner,.pk-spreadsheet-preview__head{padding:var(--spacing-4) var(--spacing-4) var(--spacing-2);vertical-align:middle;line-height:1;top:0}.pk-spreadsheet-preview__row{vertical-align:middle}.pk-spreadsheet-preview__corner{--pk-spreadsheet-lines:inset 0 0 0 var(--border) var(--color-surface-3);z-index:5;left:0}.pk-spreadsheet-preview__head{--pk-spreadsheet-lines:inset 0 var(--border) 0 var(--color-surface-3), inset calc(var(--border) * -1) calc(var(--border) * -1) 0 var(--color-surface-3)}.pk-spreadsheet-preview__row{--pk-spreadsheet-lines:inset var(--border) 0 0 var(--color-surface-3), inset calc(var(--border) * -1) calc(var(--border) * -1) 0 var(--color-surface-3);padding:0 var(--spacing-4);font-variant-numeric:tabular-nums;left:0}.pk-spreadsheet-preview__head--current{background-color:var(--color-surface-2);box-shadow:var(--pk-spreadsheet-lines), inset 0 calc((var(--spacing-2) + var(--border)) * -1) 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-medium)}.pk-spreadsheet-preview__row--current{background-color:var(--color-surface-2);box-shadow:var(--pk-spreadsheet-lines), inset calc((var(--spacing-2) + var(--border)) * -1) 0 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-medium)}.pk-spreadsheet-preview__cell[data-focus]{scroll-margin-top:var(--pk-spreadsheet-stuck-top);scroll-margin-left:var(--pk-spreadsheet-stuck-left);outline:var(--spacing-2) solid var(--pk-spreadsheet-green);outline-offset:calc(var(--spacing-2) * -1)}.pk-spreadsheet-preview__cell--range{background-image:linear-gradient(#1f1d2b14,#1f1d2b14)}.pk-spreadsheet-preview__cell--missing{color:#6b6880}.pk-spreadsheet-preview__more{padding:var(--spacing-8) var(--spacing-12);color:#6b6880;font-size:var(--text-12);margin:0;position:sticky;left:0}.pk-spreadsheet-preview__sheets{min-height:var(--spacing-32);padding-left:var(--spacing-40);border-top:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);flex-shrink:0;display:flex;overflow-x:auto}@media (pointer:coarse){.pk-spreadsheet-preview__sheets{min-height:var(--spacing-40)}}.pk-spreadsheet-preview__status{min-height:var(--spacing-40);border-top:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);font-size:var(--text-12);flex-shrink:0;align-items:center;display:flex}.pk-spreadsheet-preview__sheet{padding:0 var(--spacing-16);border:0;border-right:var(--border) solid var(--color-surface-3);color:var(--color-word-2);font:inherit;font-size:var(--text-12);white-space:nowrap;cursor:pointer;background:0 0;flex-shrink:0}.pk-spreadsheet-preview__sheet:first-child{border-left:var(--border) solid var(--color-surface-3)}.pk-spreadsheet-preview__sheet:hover{background-color:var(--color-surface-2)}.pk-spreadsheet-preview__sheet[aria-current=page]{background-color:var(--color-surface);box-shadow:inset 0 calc(var(--spacing-2) * -1) 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-semibold)}.pk-spreadsheet-preview__info{align-items:center;gap:var(--spacing-16);min-width:0;padding:0 var(--spacing-12);color:var(--color-word-2);font-variant-numeric:tabular-nums;white-space:nowrap;flex:1;margin:0;display:flex;overflow:hidden}.pk-spreadsheet-preview__note{min-width:0;color:var(--color-word-3);text-overflow:ellipsis;overflow:hidden}.pk-spreadsheet-preview__stats{gap:var(--spacing-12);flex-shrink:0;margin-left:auto;display:flex}@container (width<26rem){.pk-spreadsheet-preview__average{display:none}}.pk-spreadsheet-preview__zoom{align-items:center;gap:var(--spacing-2);padding-right:var(--spacing-8);flex-shrink:0;display:flex}.pk-spreadsheet-preview__percent{min-width:var(--spacing-40);font-variant-numeric:tabular-nums;text-align:center}@media (prefers-color-scheme:dark){:where(:host,:root,.theme):not(.theme--light) .pk-spreadsheet-preview{--pk-spreadsheet-green-head:#5fbf8f}}:where(.theme.theme--dark) .pk-spreadsheet-preview{--pk-spreadsheet-green-head:#5fbf8f}"]]]);
627
676
  // ../../packages/components/src/chat/PkWordPreviewRuns.vue?vue&type=script&setup=true&lang.ts
628
677
  C(), p(), E();
629
- var $e = ["src"], et = {
678
+ var et = ["src"], tt = {
630
679
  key: 1,
631
680
  class: "pk-word-preview__image",
632
681
  "data-quote-skip": ""
633
- }, tt = ["title"], nt = ["title"], rt = ["data-quote-skip"], it = /* @__PURE__ */ N({
682
+ }, $ = ["title"], nt = ["title"], rt = ["data-quote-skip"], it = /* @__PURE__ */ N({
634
683
  __name: "PkWordPreviewRuns",
635
684
  props: {
636
685
  runs: { type: Array },
@@ -639,7 +688,7 @@ var $e = ["src"], et = {
639
688
  numbers: { type: Object }
640
689
  },
641
690
  setup(e) {
642
- let n = e, { t: i } = te({ useScope: "global" }), a = t(le, void 0), o = (e) => e.picture ? B(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? z(e) : "inline", c = (e) => {
691
+ let n = e, { t: i } = ne({ useScope: "global" }), a = t(le, void 0), o = (e) => e.picture ? V(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? z(e) : "inline", c = (e) => {
643
692
  let t = {
644
693
  width: `${e.width}pt`,
645
694
  aspectRatio: `${e.width} / ${e.height}`
@@ -671,7 +720,7 @@ var $e = ["src"], et = {
671
720
  return [...e.filter(t), ...e.filter((e) => !t(e))];
672
721
  }), f = x(() => !n.mode || n.mode === "markup"), p = (e) => {
673
722
  let t = {};
674
- e.font && (t.fontFamily = ie(e.font)), t.fontSize = e.size ? `${e.size}pt` : "var(--pk-word-size)", e.color && (t.color = e.color), e.highlight && (t.backgroundColor = e.highlight), e.bold && (t.fontWeight = 700), e.italic && (t.fontStyle = "italic");
723
+ e.font && (t.fontFamily = R(e.font)), t.fontSize = e.size ? `${e.size}pt` : "var(--pk-word-size)", e.color && (t.color = e.color), e.highlight && (t.backgroundColor = e.highlight), e.bold && (t.fontWeight = 700), e.italic && (t.fontStyle = "italic");
675
724
  let n = [e.underline ? "underline" : "", e.strike ? "line-through" : ""].filter(Boolean).join(" ");
676
725
  return n && (t.textDecoration = n), e.caps && (t.textTransform = "uppercase"), e.vertAlign && (t.verticalAlign = e.vertAlign, t.fontSize = `${(e.size ?? 11) * .65}pt`), t;
677
726
  }, h = (e) => {
@@ -681,24 +730,24 @@ var $e = ["src"], et = {
681
730
  textDecoration: [...n].join(" ")
682
731
  };
683
732
  }, g = (e) => e.author ? i("chatFilePreview.revisionBy", { author: e.author }) : void 0;
684
- return (e, t) => (L(!0), I(v, null, m(d.value, (e, t) => (L(), I(v, { key: t }, [e.image ? (L(), I(v, { key: 0 }, [e.picture && o(e) ? (L(), I(v, { key: 0 }, [s(e.picture) === "page" ? j("", !0) : (L(), I("img", {
733
+ return (e, t) => (I(!0), F(v, null, m(d.value, (e, t) => (I(), F(v, { key: t }, [e.image ? (I(), F(v, { key: 0 }, [e.picture && o(e) ? (I(), F(v, { key: 0 }, [s(e.picture) === "page" ? j("", !0) : (I(), F("img", {
685
734
  key: 0,
686
735
  class: r(["pk-word-preview__picture", `pk-word-preview__picture--${s(e.picture)}`]),
687
736
  style: u(c(e.picture)),
688
737
  src: o(e),
689
738
  alt: ""
690
- }, null, 14, $e))], 64)) : (L(), I("span", et, w(P(i)("chatFilePreview.image")), 1))], 64)) : f.value && e.change === "deleted" ? (L(), I("del", {
739
+ }, null, 14, et))], 64)) : (I(), F("span", tt, w(P(i)("chatFilePreview.image")), 1))], 64)) : f.value && e.change === "deleted" ? (I(), F("del", {
691
740
  key: 1,
692
741
  class: "pk-word-preview__removed",
693
742
  "data-quote-skip": "",
694
743
  style: u(h(e)),
695
744
  title: g(e)
696
- }, w(l(e)), 13, tt)) : f.value && e.change === "inserted" ? (L(), I("ins", {
745
+ }, w(l(e)), 13, $)) : f.value && e.change === "inserted" ? (I(), F("ins", {
697
746
  key: 2,
698
747
  class: "pk-word-preview__added",
699
748
  style: u(h(e)),
700
749
  title: g(e)
701
- }, w(l(e)), 13, nt)) : (L(), I("span", {
750
+ }, w(l(e)), 13, nt)) : (I(), F("span", {
702
751
  key: 3,
703
752
  style: u(p(e)),
704
753
  "data-quote-skip": e.label ? "" : void 0
@@ -744,17 +793,17 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
744
793
  let e = t.block.widths ?? [], n = e.reduce((e, t) => e + t, 0);
745
794
  return n ? e.map((e) => `${e / n * 100}%`) : [];
746
795
  }), c = x(() => t.mode === "markup" && !!o.value?.some((e) => e.runs.some((e) => e.change)));
747
- return (t, l) => e.block.kind === "table" && o.value ? (L(), I("table", {
796
+ return (t, l) => e.block.kind === "table" && o.value ? (I(), F("table", {
748
797
  key: 0,
749
798
  class: r(["pk-word-preview__table", {
750
799
  "pk-word-preview__table--lines": e.block.borders,
751
800
  "pk-word-preview__table--next": e.row !== 0,
752
801
  "pk-word-preview__changed": c.value
753
802
  }])
754
- }, [s.value.length ? (L(), I("colgroup", at, [(L(!0), I(v, null, m(s.value, (e, t) => (L(), I("col", {
803
+ }, [s.value.length ? (I(), F("colgroup", at, [(I(!0), F(v, null, m(s.value, (e, t) => (I(), F("col", {
755
804
  key: t,
756
805
  style: u({ width: e })
757
- }, null, 4))), 128))])) : j("", !0), y("tbody", null, [y("tr", null, [(L(!0), I(v, null, m(o.value, (t, n) => (L(), I("td", {
806
+ }, null, 4))), 128))])) : j("", !0), y("tbody", null, [y("tr", null, [(I(!0), F(v, null, m(o.value, (t, n) => (I(), F("td", {
758
807
  key: n,
759
808
  "data-paragraph": t.ids?.join(" "),
760
809
  colspan: t.span,
@@ -771,7 +820,7 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
771
820
  "runs",
772
821
  "mode",
773
822
  "numbers"
774
- ])], 12, ot))), 128))])])], 2)) : e.block.kind === "table" ? j("", !0) : (L(), I("div", {
823
+ ])], 12, ot))), 128))])])], 2)) : e.block.kind === "table" ? j("", !0) : (I(), F("div", {
775
824
  key: 1,
776
825
  class: r(["pk-word-preview__block", { "pk-word-preview__changed": a.value }]),
777
826
  "data-paragraph": e.block.id,
@@ -779,7 +828,7 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
779
828
  "aria-level": e.block.kind === "heading" ? Math.max(1, e.block.level) : void 0,
780
829
  style: u(n.value)
781
830
  }, [
782
- e.block.label ? (L(), I("span", {
831
+ e.block.label ? (I(), F("span", {
783
832
  key: 0,
784
833
  class: "pk-word-preview__label",
785
834
  "data-quote-skip": "",
@@ -796,7 +845,7 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
796
845
  "page",
797
846
  "numbers"
798
847
  ]),
799
- !e.block.label && !e.block.runs.length ? (L(), I("br", ct)) : j("", !0)
848
+ !e.block.label && !e.block.runs.length ? (I(), F("br", ct)) : j("", !0)
800
849
  ], 14, st));
801
850
  }
802
851
  });
@@ -813,10 +862,10 @@ var ut = { class: "pk-word-preview__part" }, dt = ["src"], ft = /* @__PURE__ */
813
862
  },
814
863
  setup(e) {
815
864
  let n = e, r = t(le, void 0), i = x(() => H(n.blocks, n.mode)), a = x(() => ce(n.blocks, n.mode).flatMap((e) => {
816
- let t = B(r?.value, e.ref);
865
+ let t = V(r?.value, e.ref);
817
866
  return t ? [{
818
867
  src: t,
819
- css: V(e, n.section.page)
868
+ css: oe(e, n.section.page)
820
869
  }] : [];
821
870
  })), o = x(() => {
822
871
  let { margins: e } = n.section.page;
@@ -826,10 +875,10 @@ var ut = { class: "pk-word-preview__part" }, dt = ["src"], ft = /* @__PURE__ */
826
875
  ...n.where === "header" ? { top: `${n.section.headerDistance}pt` } : { bottom: `${n.section.footerDistance}pt` }
827
876
  };
828
877
  });
829
- return (t, n) => (L(), I("div", ut, [y("div", {
878
+ return (t, n) => (I(), F("div", ut, [y("div", {
830
879
  class: "pk-word-preview__part-flow",
831
880
  style: u(o.value)
832
- }, [(L(!0), I(v, null, m(i.value, (t) => (L(), g(lt, {
881
+ }, [(I(!0), F(v, null, m(i.value, (t) => (I(), g(lt, {
833
882
  key: t.key,
834
883
  block: e.blocks[t.block],
835
884
  row: t.row,
@@ -842,7 +891,7 @@ var ut = { class: "pk-word-preview__part" }, dt = ["src"], ft = /* @__PURE__ */
842
891
  "mode",
843
892
  "page",
844
893
  "numbers"
845
- ]))), 128))], 4), (L(!0), I(v, null, m(a.value, (e, t) => (L(), I("img", {
894
+ ]))), 128))], 4), (I(!0), F(v, null, m(a.value, (e, t) => (I(), F("img", {
846
895
  key: t,
847
896
  class: "pk-word-preview__float",
848
897
  style: u(e.css),
@@ -899,7 +948,7 @@ var pt = ["aria-label"], mt = {
899
948
  }),
900
949
  emits: /*@__PURE__*/ l(["select"], ["update:fit", "update:zoom"]),
901
950
  setup(e, { emit: t }) {
902
- let a = e, l = t, { t: p } = te({ useScope: "global" });
951
+ let a = e, l = t, { t: p } = ne({ useScope: "global" });
903
952
  n(le, x(() => a.preview.images));
904
953
  let ee = (e) => se(e, a.mode), _ = x(() => H(a.preview.blocks, a.mode)), S = h("rootEl"), C = h("scrollEl"), T = h("measureEl"), { width: E } = de(S), { width: D } = de(C), O = x(() => E.value === 0 || E.value >= 640), k = x(() => E.value >= 1e3), A = x(() => a.preview.sections?.length ? a.preview.sections : [{
905
954
  page: a.preview.page,
@@ -908,30 +957,30 @@ var pt = ["aria-label"], mt = {
908
957
  headers: {},
909
958
  footers: {}
910
959
  }]), M = x(() => A.value[0].page), N = x(() => ({
911
- fontFamily: ie(a.preview.defaults.font),
960
+ fontFamily: R(a.preview.defaults.font),
912
961
  fontSize: `${a.preview.defaults.size}pt`,
913
962
  color: a.preview.defaults.color ?? "#000000",
914
963
  "--pk-word-line": ae(a.preview.defaults.font),
915
964
  "--pk-word-size": `${a.preview.defaults.size}pt`
916
- })), F = x(() => ({
965
+ })), te = x(() => ({
917
966
  ...N.value,
918
967
  width: `${M.value.width - M.value.margins.left - M.value.margins.right}pt`
919
- })), R = b([]), ne = b({}), re = async () => {
968
+ })), L = b([]), re = b({}), ie = async () => {
920
969
  await i();
921
970
  let e = T.value?.querySelectorAll("[data-item]");
922
- R.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
971
+ L.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
923
972
  let t = T.value?.querySelectorAll("[data-part]");
924
- ne.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
973
+ re.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
925
974
  };
926
975
  d([
927
976
  _,
928
977
  O,
929
978
  () => a.preview.parts
930
- ], re, { flush: "post" }), c(() => {
931
- re(), document.fonts?.ready.then(re);
979
+ ], ie, { flush: "post" }), c(() => {
980
+ ie(), document.fonts?.ready.then(ie);
932
981
  });
933
982
  let z = x(() => {
934
- if (!O.value || R.value.length !== _.value.length) return [{
983
+ if (!O.value || L.value.length !== _.value.length) return [{
935
984
  items: _.value.map((e, t) => t),
936
985
  section: 0,
937
986
  number: 1,
@@ -942,7 +991,7 @@ var pt = ["aria-label"], mt = {
942
991
  let r = A.value[t];
943
992
  return n && r.pageStart !== void 0 ? r.pageStart : (i ?? e[e.length - 1]?.number ?? 0) + 1;
944
993
  }, s = (e) => {
945
- let r = A.value[t], i = (t) => n && r.titlePage ? t.first : a.preview.evenAndOddHeaders && e % 2 == 0 ? t.even : t.default, o = i(r.headers), s = i(r.footers), c = (e) => e ? (ne.value[e] ?? 0) / zt : 0;
994
+ let r = A.value[t], i = (t) => n && r.titlePage ? t.first : a.preview.evenAndOddHeaders && e % 2 == 0 ? t.even : t.default, o = i(r.headers), s = i(r.footers), c = (e) => e ? (re.value[e] ?? 0) / zt : 0;
946
995
  return {
947
996
  header: o,
948
997
  footer: s,
@@ -960,14 +1009,14 @@ var pt = ["aria-label"], mt = {
960
1009
  };
961
1010
  return _.value.forEach((a, l) => {
962
1011
  a.section !== void 0 && a.section !== t && A.value[a.section] && (t = a.section, n = a.breakBefore || !e.length, n || (i = A.value[t].pageStart));
963
- let u = e[e.length - 1], d = u && A.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * zt : 0, p = R.value[l];
964
- for (let e = l; _.value[e]?.keepNext && e + 1 < _.value.length && !_.value[e + 1].breakBefore; e++) p += R.value[e + 1];
965
- (!u || u.items.length && (a.breakBefore || r + R.value[l] > f || r + p > f && p <= (() => {
1012
+ let u = e[e.length - 1], d = u && A.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * zt : 0, p = L.value[l];
1013
+ for (let e = l; _.value[e]?.keepNext && e + 1 < _.value.length && !_.value[e + 1].breakBefore; e++) p += L.value[e + 1];
1014
+ (!u || u.items.length && (a.breakBefore || r + L.value[l] > f || r + p > f && p <= (() => {
966
1015
  let e = s(o());
967
1016
  return (A.value[t].page.height - e.top - e.bottom) * zt;
968
- })())) && c(), e[e.length - 1].items.push(l), r += R.value[l];
1017
+ })())) && c(), e[e.length - 1].items.push(l), r += L.value[l];
969
1018
  }), e.length || c(), e;
970
- }), oe = x(() => {
1019
+ }), B = x(() => {
971
1020
  let e = /* @__PURE__ */ new Map();
972
1021
  for (let t of z.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
973
1022
  return z.value.map((t) => ({
@@ -986,15 +1035,15 @@ var pt = ["aria-label"], mt = {
986
1035
  }, fe = (e) => {
987
1036
  let t = [...new Set(e.items.map((e) => _.value[e].block))];
988
1037
  return ce(t.map((e) => a.preview.blocks[e]), a.mode).flatMap((t) => {
989
- let n = B(a.preview.images, t.ref);
1038
+ let n = V(a.preview.images, t.ref);
990
1039
  return n ? [{
991
1040
  src: n,
992
- css: V(t, A.value[e.section].page)
1041
+ css: oe(t, A.value[e.section].page)
993
1042
  }] : [];
994
1043
  });
995
- }, U = s(e, "fit"), W = s(e, "zoom"), G = x(() => U.value ? Math.min(1.25, Math.max(.3, (D.value - 48) / (M.value.width * zt))) : W.value), me = (e) => {
996
- W.value = Math.min(2, Math.max(.3, Math.round((G.value + e) * 10) / 10)), U.value = !1;
997
- }, ge = b(0), K = b(), _e = () => {
1044
+ }, U = s(e, "fit"), me = s(e, "zoom"), W = x(() => U.value ? Math.min(1.25, Math.max(.3, (D.value - 48) / (M.value.width * zt))) : me.value), he = (e) => {
1045
+ me.value = Math.min(2, Math.max(.3, Math.round((W.value + e) * 10) / 10)), U.value = !1;
1046
+ }, _e = b(0), ve = b(), ye = () => {
998
1047
  let e = C.value?.getBoundingClientRect();
999
1048
  if (!e) return;
1000
1049
  let t = C.value?.querySelectorAll("[data-page]") ?? [], n = 0;
@@ -1002,55 +1051,55 @@ var pt = ["aria-label"], mt = {
1002
1051
  if (i.getBoundingClientRect().top - e.top > e.height / 3) break;
1003
1052
  n = r;
1004
1053
  }
1005
- ge.value = n;
1054
+ _e.value = n;
1006
1055
  let r;
1007
- for (let t of X.value) {
1056
+ for (let t of q.value) {
1008
1057
  let n = C.value?.querySelector(`[data-key="${t.key}"]`);
1009
1058
  if (n) {
1010
1059
  if (n.getBoundingClientRect().top - e.top > 48) break;
1011
1060
  r = t.key;
1012
1061
  }
1013
1062
  }
1014
- K.value = r ?? X.value[0]?.key;
1015
- }, ve = 0, q = () => {
1016
- ve ||= requestAnimationFrame(() => {
1017
- ve = 0, _e();
1063
+ ve.value = r ?? q.value[0]?.key;
1064
+ }, be = 0, xe = () => {
1065
+ be ||= requestAnimationFrame(() => {
1066
+ be = 0, ye();
1018
1067
  });
1019
1068
  };
1020
- o(() => cancelAnimationFrame(ve)), d(z, () => i(q));
1021
- let { selection: J } = he({ root: () => C.value?.getRootNode() });
1022
- d(J, (e) => {
1069
+ o(() => cancelAnimationFrame(be)), d(z, () => i(xe));
1070
+ let { selection: G } = ge({ root: () => C.value?.getRootNode() });
1071
+ d(G, (e) => {
1023
1072
  let t = C.value;
1024
- l("select", e && t ? be(t, e.range, ".pk-word-preview__measure, .pk-word-preview__part") : void 0);
1073
+ l("select", e && t ? X(t, e.range, ".pk-word-preview__measure, .pk-word-preview__part") : void 0);
1025
1074
  });
1026
- let Y = (e) => ee(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), X = x(() => _.value.flatMap((e) => {
1027
- let t = a.preview.blocks[e.block], n = t.kind === "heading" ? [t.label, Y(t.runs)].filter(Boolean).join(" ") : "";
1075
+ let K = (e) => ee(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), q = x(() => _.value.flatMap((e) => {
1076
+ let t = a.preview.blocks[e.block], n = t.kind === "heading" ? [t.label, K(t.runs)].filter(Boolean).join(" ") : "";
1028
1077
  return t.kind === "heading" && t.level <= 3 && n ? [{
1029
1078
  key: e.key,
1030
1079
  level: t.level,
1031
1080
  text: n
1032
1081
  }] : [];
1033
- })), ye = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, Z = x(() => _.value.flatMap((e) => {
1082
+ })), Se = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, J = x(() => _.value.flatMap((e) => {
1034
1083
  let t = a.preview.blocks[e.block], n = t.kind === "table" ? (t.rows[e.row ?? 0] ?? []).flatMap((e) => e.runs) : t.runs, r = n.filter((e) => e.change === "deleted").map((e) => e.text).join(" ").trim(), i = n.filter((e) => e.change === "inserted").map((e) => e.text).join(" ").trim();
1035
1084
  return r || i ? [{
1036
1085
  key: e.key,
1037
- removed: ye(r),
1038
- added: ye(i)
1086
+ removed: Se(r),
1087
+ added: Se(i)
1039
1088
  }] : [];
1040
- })), Q = b("outline"), $ = b(!1), xe = (e) => {
1089
+ })), Y = b("outline"), Z = b(!1), Ce = (e) => {
1041
1090
  C.value?.querySelector(`[data-key="${e}"]`)?.scrollIntoView({
1042
1091
  block: "start",
1043
1092
  behavior: "smooth"
1044
- }), k.value || ($.value = !1);
1045
- }, Se = x(() => a.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => Y(e.runs)) : [Y(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), Ce = x(() => a.preview.revisionAuthors.join(", "));
1093
+ }), k.value || (Z.value = !1);
1094
+ }, we = x(() => a.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => K(e.runs)) : [K(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), Te = x(() => a.preview.revisionAuthors.join(", "));
1046
1095
  return (t, n) => {
1047
1096
  let i = pe;
1048
- return L(), I("div", {
1097
+ return I(), F("div", {
1049
1098
  ref_key: "rootEl",
1050
1099
  ref: S,
1051
1100
  class: r(["pk-word-preview", { "pk-word-preview--paged": O.value }])
1052
1101
  }, [
1053
- (k.value || $.value) && (X.value.length || Z.value.length) ? (L(), I("aside", {
1102
+ (k.value || Z.value) && (q.value.length || J.value.length) ? (I(), F("aside", {
1054
1103
  key: 0,
1055
1104
  class: r(["pk-word-preview__side", { "pk-word-preview__side--over": !k.value }]),
1056
1105
  "aria-label": P(p)("chatFilePreview.outline")
@@ -1058,37 +1107,37 @@ var pt = ["aria-label"], mt = {
1058
1107
  type: "button",
1059
1108
  role: "tab",
1060
1109
  class: "pk-word-preview__tab",
1061
- "aria-selected": Q.value === "outline",
1062
- onClick: n[0] ||= (e) => Q.value = "outline"
1063
- }, w(P(p)("chatFilePreview.outline")), 9, ht), Z.value.length ? (L(), I("button", {
1110
+ "aria-selected": Y.value === "outline",
1111
+ onClick: n[0] ||= (e) => Y.value = "outline"
1112
+ }, w(P(p)("chatFilePreview.outline")), 9, ht), J.value.length ? (I(), F("button", {
1064
1113
  key: 0,
1065
1114
  type: "button",
1066
1115
  role: "tab",
1067
1116
  class: "pk-word-preview__tab",
1068
- "aria-selected": Q.value === "changes",
1069
- onClick: n[1] ||= (e) => Q.value = "changes"
1070
- }, w(P(p)("chatFilePreview.changes", { count: Z.value.length })), 9, gt)) : j("", !0)]), Q.value === "outline" || !Z.value.length ? (L(), I("nav", _t, [(L(!0), I(v, null, m(X.value, (e) => (L(), I("button", {
1117
+ "aria-selected": Y.value === "changes",
1118
+ onClick: n[1] ||= (e) => Y.value = "changes"
1119
+ }, w(P(p)("chatFilePreview.changes", { count: J.value.length })), 9, gt)) : j("", !0)]), Y.value === "outline" || !J.value.length ? (I(), F("nav", _t, [(I(!0), F(v, null, m(q.value, (e) => (I(), F("button", {
1071
1120
  key: e.key,
1072
1121
  type: "button",
1073
1122
  class: r(["pk-word-preview__entry", `pk-word-preview__entry--${Math.min(e.level, 3)}`]),
1074
- "aria-current": K.value === e.key ? "location" : void 0,
1075
- onClick: (t) => xe(e.key)
1076
- }, [y("span", yt, w(e.text), 1), Z.value.some((t) => t.key === e.key) ? (L(), I("span", bt)) : j("", !0)], 10, vt))), 128)), X.value.length ? j("", !0) : (L(), I("p", xt, w(P(p)("chatFilePreview.noHeadings")), 1))])) : (L(), I("nav", St, [(L(!0), I(v, null, m(Z.value, (e) => (L(), I("button", {
1123
+ "aria-current": ve.value === e.key ? "location" : void 0,
1124
+ onClick: (t) => Ce(e.key)
1125
+ }, [y("span", yt, w(e.text), 1), J.value.some((t) => t.key === e.key) ? (I(), F("span", bt)) : j("", !0)], 10, vt))), 128)), q.value.length ? j("", !0) : (I(), F("p", xt, w(P(p)("chatFilePreview.noHeadings")), 1))])) : (I(), F("nav", St, [(I(!0), F(v, null, m(J.value, (e) => (I(), F("button", {
1077
1126
  key: e.key,
1078
1127
  type: "button",
1079
1128
  class: "pk-word-preview__entry pk-word-preview__entry--change",
1080
- onClick: (t) => xe(e.key)
1081
- }, [e.removed ? (L(), I("del", wt, w(e.removed), 1)) : j("", !0), e.added ? (L(), I("ins", Tt, w(e.added), 1)) : j("", !0)], 8, Ct))), 128))]))], 10, pt)) : j("", !0),
1129
+ onClick: (t) => Ce(e.key)
1130
+ }, [e.removed ? (I(), F("del", wt, w(e.removed), 1)) : j("", !0), e.added ? (I(), F("ins", Tt, w(e.added), 1)) : j("", !0)], 8, Ct))), 128))]))], 10, pt)) : j("", !0),
1082
1131
  y("div", Et, [y("div", {
1083
1132
  ref_key: "scrollEl",
1084
1133
  ref: C,
1085
1134
  class: "pk-word-preview__scroll",
1086
- onScroll: q
1087
- }, [O.value ? (L(), I("div", {
1135
+ onScroll: xe
1136
+ }, [O.value ? (I(), F("div", {
1088
1137
  key: 0,
1089
1138
  class: "pk-word-preview__pages",
1090
- style: u({ zoom: G.value })
1091
- }, [(L(!0), I(v, null, m(z.value, (t, n) => (L(), I("article", {
1139
+ style: u({ zoom: W.value })
1140
+ }, [(I(!0), F(v, null, m(z.value, (t, n) => (I(), F("article", {
1092
1141
  key: n,
1093
1142
  "data-page": "",
1094
1143
  class: "pk-word-preview__page",
@@ -1098,27 +1147,27 @@ var pt = ["aria-label"], mt = {
1098
1147
  }),
1099
1148
  style: u(ue(t))
1100
1149
  }, [
1101
- t.header && e.preview.parts?.[t.header] ? (L(), g(ft, {
1150
+ t.header && e.preview.parts?.[t.header] ? (I(), g(ft, {
1102
1151
  key: 0,
1103
1152
  blocks: e.preview.parts[t.header],
1104
1153
  where: "header",
1105
1154
  section: A.value[t.section],
1106
1155
  mode: e.mode,
1107
- numbers: oe.value[n]
1156
+ numbers: B.value[n]
1108
1157
  }, null, 8, [
1109
1158
  "blocks",
1110
1159
  "section",
1111
1160
  "mode",
1112
1161
  "numbers"
1113
1162
  ])) : j("", !0),
1114
- (L(!0), I(v, null, m(t.items, (r) => (L(), g(lt, {
1163
+ (I(!0), F(v, null, m(t.items, (r) => (I(), g(lt, {
1115
1164
  key: _.value[r].key,
1116
1165
  "data-key": _.value[r].key,
1117
1166
  block: e.preview.blocks[_.value[r].block],
1118
1167
  row: _.value[r].row,
1119
1168
  mode: e.mode,
1120
1169
  page: A.value[t.section].page,
1121
- numbers: oe.value[n]
1170
+ numbers: B.value[n]
1122
1171
  }, null, 8, [
1123
1172
  "data-key",
1124
1173
  "block",
@@ -1127,31 +1176,31 @@ var pt = ["aria-label"], mt = {
1127
1176
  "page",
1128
1177
  "numbers"
1129
1178
  ]))), 128)),
1130
- (L(!0), I(v, null, m(fe(t), (e, t) => (L(), I("img", {
1179
+ (I(!0), F(v, null, m(fe(t), (e, t) => (I(), F("img", {
1131
1180
  key: `image-${t}`,
1132
1181
  class: "pk-word-preview__float",
1133
1182
  style: u(e.css),
1134
1183
  src: e.src,
1135
1184
  alt: ""
1136
1185
  }, null, 12, Ot))), 128)),
1137
- t.footer && e.preview.parts?.[t.footer] ? (L(), g(ft, {
1186
+ t.footer && e.preview.parts?.[t.footer] ? (I(), g(ft, {
1138
1187
  key: 1,
1139
1188
  blocks: e.preview.parts[t.footer],
1140
1189
  where: "footer",
1141
1190
  section: A.value[t.section],
1142
1191
  mode: e.mode,
1143
- numbers: oe.value[n]
1192
+ numbers: B.value[n]
1144
1193
  }, null, 8, [
1145
1194
  "blocks",
1146
1195
  "section",
1147
1196
  "mode",
1148
1197
  "numbers"
1149
1198
  ])) : j("", !0)
1150
- ], 12, Dt))), 128))], 4)) : (L(), I("article", {
1199
+ ], 12, Dt))), 128))], 4)) : (I(), F("article", {
1151
1200
  key: 1,
1152
1201
  class: "pk-word-preview__page pk-word-preview__page--flow",
1153
1202
  style: u(N.value)
1154
- }, [(L(!0), I(v, null, m(_.value, (t) => (L(), g(lt, {
1203
+ }, [(I(!0), F(v, null, m(_.value, (t) => (I(), g(lt, {
1155
1204
  key: t.key,
1156
1205
  "data-key": t.key,
1157
1206
  block: e.preview.blocks[t.block],
@@ -1162,22 +1211,22 @@ var pt = ["aria-label"], mt = {
1162
1211
  "block",
1163
1212
  "row",
1164
1213
  "mode"
1165
- ]))), 128))], 4)), e.preview.truncated ? (L(), I("p", kt, w(P(p)("chatFilePreview.truncated")), 1)) : j("", !0)], 544), y("div", At, [
1166
- O.value ? (L(), I("span", jt, w(P(p)("chatFilePreview.pageOf", {
1167
- page: ge.value + 1,
1214
+ ]))), 128))], 4)), e.preview.truncated ? (I(), F("p", kt, w(P(p)("chatFilePreview.truncated")), 1)) : j("", !0)], 544), y("div", At, [
1215
+ O.value ? (I(), F("span", jt, w(P(p)("chatFilePreview.pageOf", {
1216
+ page: _e.value + 1,
1168
1217
  count: z.value.length
1169
1218
  })), 1)) : j("", !0),
1170
- y("span", Mt, w(P(p)("chatFilePreview.words", Se.value)), 1),
1171
- e.mode === "markup" && e.preview.revisionAuthors.length ? (L(), I("span", Nt, [
1219
+ y("span", Mt, w(P(p)("chatFilePreview.words", we.value)), 1),
1220
+ e.mode === "markup" && e.preview.revisionAuthors.length ? (I(), F("span", Nt, [
1172
1221
  y("span", {
1173
1222
  class: "pk-word-preview__legend-text",
1174
- title: P(p)("chatFilePreview.revisionsOf", { authors: Ce.value })
1175
- }, w(P(p)("chatFilePreview.revisionsOf", { authors: Ce.value })), 9, Pt),
1223
+ title: P(p)("chatFilePreview.revisionsOf", { authors: Te.value })
1224
+ }, w(P(p)("chatFilePreview.revisionsOf", { authors: Te.value })), 9, Pt),
1176
1225
  y("del", Ft, w(P(p)("chatFilePreview.removed")), 1),
1177
1226
  y("ins", It, w(P(p)("chatFilePreview.added")), 1)
1178
1227
  ])) : j("", !0),
1179
1228
  n[6] ||= y("span", { class: "pk-word-preview__spacer" }, null, -1),
1180
- !k.value && (X.value.length || Z.value.length) ? (L(), g(i, {
1229
+ !k.value && (q.value.length || J.value.length) ? (I(), g(i, {
1181
1230
  key: 2,
1182
1231
  class: "pk-word-preview__outline-toggle",
1183
1232
  modifiers: "action-quiet",
@@ -1185,15 +1234,15 @@ var pt = ["aria-label"], mt = {
1185
1234
  label: P(p)("chatFilePreview.outline"),
1186
1235
  title: P(p)("chatFilePreview.outline"),
1187
1236
  "aria-label": P(p)("chatFilePreview.outline"),
1188
- "aria-expanded": $.value,
1189
- onClick: n[2] ||= (e) => $.value = !$.value
1237
+ "aria-expanded": Z.value,
1238
+ onClick: n[2] ||= (e) => Z.value = !Z.value
1190
1239
  }, null, 8, [
1191
1240
  "label",
1192
1241
  "title",
1193
1242
  "aria-label",
1194
1243
  "aria-expanded"
1195
1244
  ])) : j("", !0),
1196
- O.value ? (L(), I(v, { key: 3 }, [
1245
+ O.value ? (I(), F(v, { key: 3 }, [
1197
1246
  f(i, {
1198
1247
  modifiers: "action-quiet",
1199
1248
  label: P(p)("chatFilePreview.fitWidth"),
@@ -1204,27 +1253,27 @@ var pt = ["aria-label"], mt = {
1204
1253
  modifiers: "action-quiet",
1205
1254
  icon: "ri:subtract-line",
1206
1255
  "aria-label": P(p)("chatFilePreview.zoomOut"),
1207
- disabled: G.value <= .3,
1208
- onClick: n[4] ||= (e) => me(-.1)
1256
+ disabled: W.value <= .3,
1257
+ onClick: n[4] ||= (e) => he(-.1)
1209
1258
  }, null, 8, ["aria-label", "disabled"]),
1210
- y("span", Lt, w(Math.round(G.value * 100)) + "% ", 1),
1259
+ y("span", Lt, w(Math.round(W.value * 100)) + "% ", 1),
1211
1260
  f(i, {
1212
1261
  modifiers: "action-quiet",
1213
1262
  icon: "ri:add-line",
1214
1263
  "aria-label": P(p)("chatFilePreview.zoomIn"),
1215
- disabled: G.value >= 2,
1216
- onClick: n[5] ||= (e) => me(.1)
1264
+ disabled: W.value >= 2,
1265
+ onClick: n[5] ||= (e) => he(.1)
1217
1266
  }, null, 8, ["aria-label", "disabled"])
1218
1267
  ], 64)) : j("", !0)
1219
1268
  ])]),
1220
- O.value ? (L(), I("div", {
1269
+ O.value ? (I(), F("div", {
1221
1270
  key: 1,
1222
1271
  ref_key: "measureEl",
1223
1272
  ref: T,
1224
1273
  class: "pk-word-preview__measure",
1225
1274
  "aria-hidden": "true",
1226
- style: u(F.value)
1227
- }, [(L(!0), I(v, null, m(_.value, (t) => (L(), I("div", {
1275
+ style: u(te.value)
1276
+ }, [(I(!0), F(v, null, m(_.value, (t) => (I(), F("div", {
1228
1277
  key: t.key,
1229
1278
  "data-item": ""
1230
1279
  }, [f(lt, {
@@ -1237,10 +1286,10 @@ var pt = ["aria-label"], mt = {
1237
1286
  "row",
1238
1287
  "mode",
1239
1288
  "page"
1240
- ])]))), 128)), (L(!0), I(v, null, m(e.preview.parts, (t, n) => (L(), I("div", {
1289
+ ])]))), 128)), (I(!0), F(v, null, m(e.preview.parts, (t, n) => (I(), F("div", {
1241
1290
  key: n,
1242
1291
  "data-part": n
1243
- }, [(L(!0), I(v, null, m(P(H)(t, e.mode), (n) => (L(), g(lt, {
1292
+ }, [(I(!0), F(v, null, m(P(H)(t, e.mode), (n) => (I(), g(lt, {
1244
1293
  key: n.key,
1245
1294
  block: t[n.block],
1246
1295
  row: n.row,
@@ -1312,7 +1361,7 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1312
1361
  "update:fit"
1313
1362
  ]),
1314
1363
  setup(e, { emit: t }) {
1315
- let n = e, a = t, { t: o, locale: c } = te({ useScope: "global" }), l = x(() => n.versions ?? []), u = x(() => n.version ? l.value.indexOf(n.version) : -1), p = x(() => u.value > 0 ? l.value[u.value - 1] : void 0), ee = x(() => u.value >= 0 && u.value < l.value.length - 1 ? l.value[u.value + 1] : void 0), _ = s(e, "mode"), S = s(e, "sheet"), C = s(e, "zoom"), T = s(e, "fit"), E = x(() => [
1364
+ let n = e, a = t, { t: o, locale: c } = ne({ useScope: "global" }), l = x(() => n.versions ?? []), u = x(() => n.version ? l.value.indexOf(n.version) : -1), p = x(() => u.value > 0 ? l.value[u.value - 1] : void 0), ee = x(() => u.value >= 0 && u.value < l.value.length - 1 ? l.value[u.value + 1] : void 0), _ = s(e, "mode"), S = s(e, "sheet"), C = s(e, "zoom"), T = s(e, "fit"), E = x(() => [
1316
1365
  {
1317
1366
  value: "markup",
1318
1367
  label: o("chatFilePreview.modeMarkup")
@@ -1329,40 +1378,40 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1329
1378
  d(() => n.version, () => {
1330
1379
  _.value = "markup";
1331
1380
  });
1332
- let O = h("rootEl"), A = M(), N = b(!1), F = () => {
1381
+ let O = h("rootEl"), A = M(), N = b(!1), te = () => {
1333
1382
  A.value = void 0, N.value = !1;
1334
1383
  };
1335
1384
  d(() => [
1336
1385
  n.version,
1337
1386
  n.preview,
1338
1387
  _.value
1339
- ], F);
1340
- let R = (e) => {
1388
+ ], te);
1389
+ let L = (e) => {
1341
1390
  N.value || (A.value = e);
1342
1391
  };
1343
1392
  d(N, async (e, t) => {
1344
1393
  let n = A.value;
1345
1394
  t && !e && n?.format === "docx" && (await i(), n.restore());
1346
1395
  });
1347
- let ne = x(() => !n.version || n.version === l.value[l.value.length - 1]), re = () => {
1396
+ let re = x(() => !n.version || n.version === l.value[l.value.length - 1]), ie = () => {
1348
1397
  let e = l.value[l.value.length - 1];
1349
1398
  e && a("version", e);
1350
- }, ie = x(() => {
1399
+ }, R = x(() => {
1351
1400
  let e = A.value;
1352
- return e?.format === "docx" ? e.paragraphCount > 200 : (e?.cells ?? 0) > ge;
1353
- }), z = x(() => A.value?.format === "docx" && _.value === "original"), ae = x(() => ie.value || z.value), oe = x(() => z.value ? o("selectionActions.hintOriginal") : ie.value ? o(A.value?.format === "docx" ? "selectionActions.hintParagraphs" : "selectionActions.hintCells", { count: A.value?.format === "docx" ? 200 : ge }) : void 0), B = (e) => e[c.value] ?? e[c.value.split("-")[0]] ?? Object.values(e)[0] ?? "", V = ["explain", "summarize"], se = x(() => {
1401
+ return e?.format === "docx" ? e.paragraphCount > 200 : (e?.cells ?? 0) > _e;
1402
+ }), z = x(() => A.value?.format === "docx" && _.value === "original"), ae = x(() => R.value || z.value), B = x(() => z.value ? o("selectionActions.hintOriginal") : R.value ? o(A.value?.format === "docx" ? "selectionActions.hintParagraphs" : "selectionActions.hintCells", { count: A.value?.format === "docx" ? 200 : _e }) : void 0), V = (e) => e[c.value] ?? e[c.value.split("-")[0]] ?? Object.values(e)[0] ?? "", oe = ["explain", "summarize"], se = x(() => {
1354
1403
  let e = A.value, t = n.selectionActions;
1355
1404
  if (!e || !t) return [];
1356
1405
  let r = e.format;
1357
- return [...(r === "docx" && ae.value ? V : t.builtIns).map((e) => ({
1406
+ return [...(r === "docx" && ae.value ? oe : t.builtIns).map((e) => ({
1358
1407
  id: e,
1359
1408
  label: o(`selectionActions.builtIn.${e}`),
1360
1409
  ...e === "translate" && { asks: o("selectionActions.translateAsks") },
1361
1410
  prompt: (t) => o(`selectionActions.prompt.${r}.${e}`, { language: t ?? "" })
1362
1411
  })), ...(ae.value ? [] : t.actions).map((e) => ({
1363
1412
  id: e.id,
1364
- label: B(e.label),
1365
- prompt: () => B(e.prompt)
1413
+ label: V(e.label),
1414
+ prompt: () => V(e.prompt)
1366
1415
  }))];
1367
1416
  }), ce = (e) => {
1368
1417
  if (e.format === "docx") return o("selectionActions.labelParagraphs", {
@@ -1406,7 +1455,7 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1406
1455
  r && (a("selectionSend", e, r, {
1407
1456
  id: t,
1408
1457
  size: n.format === "docx" ? n.paragraphCount : n.cells
1409
- }), F(), document.getSelection()?.removeAllRanges());
1458
+ }), te(), document.getSelection()?.removeAllRanges());
1410
1459
  }, de = (e, t) => {
1411
1460
  let n = se.value.find((t) => t.id === e);
1412
1461
  n && H(n.prompt(t), e);
@@ -1415,7 +1464,7 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1415
1464
  capture: !0,
1416
1465
  passive: !0
1417
1466
  }), ue(window, "resize", () => U.value++, { passive: !0 });
1418
- let G = x(() => {
1467
+ let W = x(() => {
1419
1468
  U.value;
1420
1469
  let e = A.value?.measure(), t = O.value?.getBoundingClientRect();
1421
1470
  if (e && t) return {
@@ -1434,7 +1483,7 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1434
1483
  });
1435
1484
  return (t, n) => {
1436
1485
  let i = fe, s = pe;
1437
- return L(), I("section", {
1486
+ return I(), F("section", {
1438
1487
  ref_key: "rootEl",
1439
1488
  ref: O,
1440
1489
  class: "pk-file-preview",
@@ -1447,7 +1496,7 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1447
1496
  name: e.kind === "word" ? "ri:file-word-2-line" : "ri:file-excel-2-line",
1448
1497
  class: r(e.kind === "word" ? "pk-file-preview__icon--word" : "pk-file-preview__icon--sheet")
1449
1498
  }, null, 8, ["name", "class"])]), y("div", Gt, [y("strong", Kt, w(e.filename), 1), y("span", qt, w(P(o)("chatFilePreview.readOnly")), 1)])]),
1450
- e.version && l.value.length > 1 || D.value ? (L(), I("div", Jt, [e.version && l.value.length > 1 ? (L(), I("nav", {
1499
+ e.version && l.value.length > 1 || D.value ? (I(), F("div", Jt, [e.version && l.value.length > 1 ? (I(), F("nav", {
1451
1500
  key: 0,
1452
1501
  class: "pk-file-preview__versions",
1453
1502
  "aria-label": P(o)("chatFilePreview.versions")
@@ -1470,7 +1519,7 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1470
1519
  disabled: !ee.value,
1471
1520
  onClick: n[1] ||= (e) => ee.value && a("version", ee.value)
1472
1521
  }, null, 8, ["aria-label", "disabled"])
1473
- ], 8, Yt)) : j("", !0), D.value ? (L(), g(W, {
1522
+ ], 8, Yt)) : j("", !0), D.value ? (I(), g(me, {
1474
1523
  key: 1,
1475
1524
  modelValue: _.value,
1476
1525
  "onUpdate:modelValue": n[2] ||= (e) => _.value = e,
@@ -1488,7 +1537,7 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1488
1537
  "options"
1489
1538
  ])) : j("", !0)])) : j("", !0),
1490
1539
  y("div", $t, [
1491
- e.restorable ? (L(), g(s, {
1540
+ e.restorable ? (I(), g(s, {
1492
1541
  key: 0,
1493
1542
  modifiers: "action-quiet",
1494
1543
  icon: "ri:arrow-go-back-line",
@@ -1507,14 +1556,14 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1507
1556
  "title",
1508
1557
  "aria-label"
1509
1558
  ]),
1510
- e.resize === "expand" ? (L(), g(s, {
1559
+ e.resize === "expand" ? (I(), g(s, {
1511
1560
  key: 1,
1512
1561
  modifiers: "action-quiet",
1513
1562
  icon: "ri:fullscreen-line",
1514
1563
  title: P(o)("chatFilePreview.expand"),
1515
1564
  "aria-label": P(o)("chatFilePreview.expand"),
1516
1565
  onClick: n[4] ||= (e) => a("resize")
1517
- }, null, 8, ["title", "aria-label"])) : e.resize === "shrink" ? (L(), g(s, {
1566
+ }, null, 8, ["title", "aria-label"])) : e.resize === "shrink" ? (I(), g(s, {
1518
1567
  key: 2,
1519
1568
  modifiers: "action-quiet",
1520
1569
  icon: "ri:fullscreen-exit-line",
@@ -1531,10 +1580,10 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1531
1580
  }, null, 8, ["title", "aria-label"])
1532
1581
  ])
1533
1582
  ]),
1534
- y("div", en, [e.loading ? (L(), I("div", tn, [(L(), I(v, null, m(8, (e) => y("div", {
1583
+ y("div", en, [e.loading ? (I(), F("div", tn, [(I(), F(v, null, m(8, (e) => y("div", {
1535
1584
  key: e,
1536
1585
  class: r(["vv-skeleton__item pk-file-preview__skeleton-line", e % 3 ? "w-full" : "w-128"])
1537
- }, null, 2)), 64))])) : e.error || !e.preview ? (L(), I("p", nn, w(P(o)("chatFilePreview.unavailable")), 1)) : e.preview.kind === "word" ? (L(), g(Bt, {
1586
+ }, null, 2)), 64))])) : e.error || !e.preview ? (I(), F("p", nn, w(P(o)("chatFilePreview.unavailable")), 1)) : e.preview.kind === "word" ? (I(), g(Bt, {
1538
1587
  key: 2,
1539
1588
  zoom: C.value,
1540
1589
  "onUpdate:zoom": n[7] ||= (e) => C.value = e,
@@ -1542,39 +1591,39 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1542
1591
  "onUpdate:fit": n[8] ||= (e) => T.value = e,
1543
1592
  preview: e.preview,
1544
1593
  mode: D.value ? _.value : "markup",
1545
- onSelect: R
1594
+ onSelect: L
1546
1595
  }, null, 8, [
1547
1596
  "zoom",
1548
1597
  "fit",
1549
1598
  "preview",
1550
1599
  "mode"
1551
- ])) : (L(), g(Qe, {
1600
+ ])) : (I(), g($e, {
1552
1601
  key: 3,
1553
1602
  sheet: S.value,
1554
1603
  "onUpdate:sheet": n[9] ||= (e) => S.value = e,
1555
1604
  zoom: C.value,
1556
1605
  "onUpdate:zoom": n[10] ||= (e) => C.value = e,
1557
1606
  preview: e.preview,
1558
- onSelect: R
1607
+ onSelect: L
1559
1608
  }, null, 8, [
1560
1609
  "sheet",
1561
1610
  "zoom",
1562
1611
  "preview"
1563
1612
  ]))]),
1564
- e.selectionActions && A.value && G.value ? (L(), g(ke, {
1613
+ e.selectionActions && A.value && W.value ? (I(), g(Ae, {
1565
1614
  key: 0,
1566
1615
  asking: N.value,
1567
1616
  "onUpdate:asking": n[11] ||= (e) => N.value = e,
1568
1617
  strategy: "absolute",
1569
- anchor: G.value,
1618
+ anchor: W.value,
1570
1619
  actions: se.value,
1571
- hint: oe.value,
1572
- note: ne.value ? void 0 : P(o)("selectionActions.notLatest", { version: e.version }),
1620
+ hint: B.value,
1621
+ note: re.value ? void 0 : P(o)("selectionActions.notLatest", { version: e.version }),
1573
1622
  "note-action": P(o)("selectionActions.openLatest"),
1574
1623
  onAction: de,
1575
1624
  onAsk: n[12] ||= (e) => H(e, "ask"),
1576
- onNote: re,
1577
- onClose: F
1625
+ onNote: ie,
1626
+ onClose: te
1578
1627
  }, null, 8, [
1579
1628
  "asking",
1580
1629
  "anchor",
@@ -1589,4 +1638,4 @@ var Vt = ["aria-label"], Ht = { class: "pk-file-preview__head" }, Ut = { class:
1589
1638
  }), an = ".pk-file-preview{background-color:var(--color-surface);height:100%;min-height:0;color:var(--color-word-1);outline:none;flex-direction:column;display:flex;position:relative;container-type:inline-size}.pk-file-preview__head{align-items:center;gap:var(--spacing-8) var(--spacing-12);padding:var(--spacing-12) var(--spacing-12) var(--spacing-12) var(--spacing-md);border-bottom:var(--border) solid var(--color-surface-3);flex-wrap:wrap;display:flex}.pk-file-preview__file{align-items:center;gap:var(--spacing-12);flex:12rem;min-width:0;display:flex}.pk-file-preview__tile{width:var(--spacing-32);height:var(--spacing-32);border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded);flex-shrink:0;justify-content:center;align-items:center;display:flex}.pk-file-preview__tile .vv-icon{width:var(--spacing-18);height:var(--spacing-18)}.pk-file-preview__icon--word{color:#2b7de9}.pk-file-preview__icon--sheet{color:#1f9d57}.pk-file-preview__name{flex-direction:column;min-width:0;display:flex}.pk-file-preview__title{font-size:var(--text-14);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.pk-file-preview__note{color:var(--color-word-3);font-size:var(--text-12)}.pk-file-preview__tools{align-items:center;gap:var(--spacing-8) var(--spacing-12);flex-wrap:wrap;display:flex}.pk-file-preview__versions{align-items:center;gap:var(--spacing-2);display:flex}.pk-file-preview__version{font-size:var(--text-14);font-weight:var(--font-semibold);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-file-preview__actions{align-items:center;gap:var(--spacing-8);margin-left:auto;display:flex}@container (width<52rem){.pk-file-preview__file{order:1}.pk-file-preview__actions{order:2}.pk-file-preview__tools{flex-basis:100%;order:3}.pk-file-preview__tools .pk-file-preview__modes{flex:auto}}.pk-file-preview__mode-short{display:none}@container (width<38rem){.pk-file-preview__mode-long{display:none}.pk-file-preview__mode-short{display:inline}}@container (width<30rem){.pk-file-preview__tools .pk-file-preview__modes{flex:100%}.pk-file-preview__tools .pk-file-preview__modes .vv-radio{padding-inline:var(--spacing-4)}}.pk-file-preview__body{background-color:var(--color-surface-1);flex-direction:column;flex:1;min-height:0;display:flex}.pk-file-preview__skeleton{width:min(42rem, 100% - 2 * var(--spacing-md));margin:var(--spacing-md) auto;padding:var(--spacing-lg);box-sizing:border-box;border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded);background-color:var(--color-surface)}.pk-file-preview__skeleton-line{height:var(--spacing-12);margin-bottom:var(--spacing-12);border-radius:var(--rounded)}.pk-file-preview__empty{margin:var(--spacing-lg) var(--spacing-md);color:var(--color-word-3);font-size:var(--text-14);text-align:center}", on = /* @__PURE__ */ e({ default: () => sn }), sn = /*#__PURE__*/ U(rn, [["styles", [an]]]);
1590
1639
  export { on as n, sn as t };
1591
1640
 
1592
- //# sourceMappingURL=PkFilePreview-COiD99Bn.js.map
1641
+ //# sourceMappingURL=PkFilePreview-rAHDDtGS.js.map