@8wave/ai-elements 0.124.0-beta.7 → 0.124.0-beta.8

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 (87) hide show
  1. package/dist/_chunks/{PkChatbotFilePreview-Dk748hZ0.js → PkChatbotFilePreview-DuvRnOes.js} +2 -2
  2. package/dist/_chunks/{PkChatbotFilePreview-Dk748hZ0.js.map → PkChatbotFilePreview-DuvRnOes.js.map} +1 -1
  3. package/dist/_chunks/{PkEditorRadioButtons-DWNs2pp4.js → PkEditorRadioButtons-Cif9q08d.js} +2 -2
  4. package/dist/_chunks/{PkEditorRadioButtons-DWNs2pp4.js.map → PkEditorRadioButtons-Cif9q08d.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreview-CC2W-RXG.js → PkFilePreview-D_piCsAW.js} +203 -203
  6. package/dist/_chunks/{PkFilePreview-CC2W-RXG.js.map → PkFilePreview-D_piCsAW.js.map} +1 -1
  7. package/dist/_chunks/{PkFilePreviewDialog-DYU2CUZS.js → PkFilePreviewDialog-Bq0ipzrJ.js} +3 -3
  8. package/dist/_chunks/{PkFilePreviewDialog-DYU2CUZS.js.map → PkFilePreviewDialog-Bq0ipzrJ.js.map} +1 -1
  9. package/dist/_chunks/{PkHeldImage-BUHSVQzX.js → PkHeldImage-EMuOT-Iv.js} +2 -2
  10. package/dist/_chunks/{PkHeldImage-BUHSVQzX.js.map → PkHeldImage-EMuOT-Iv.js.map} +1 -1
  11. package/dist/_chunks/{PkLazyImg-B7PfEr4P.js → PkLazyImg-CLCyyzuo.js} +2 -2
  12. package/dist/_chunks/{PkLazyImg-B7PfEr4P.js.map → PkLazyImg-CLCyyzuo.js.map} +1 -1
  13. package/dist/_chunks/{PkStreamingMarkdown-CeWyL_2B.js → PkStreamingMarkdown-CHwrLP75.js} +3 -3
  14. package/dist/_chunks/{PkStreamingMarkdown-CeWyL_2B.js.map → PkStreamingMarkdown-CHwrLP75.js.map} +1 -1
  15. package/dist/_chunks/{PkToolChatFile-BMj7-urz.js → PkToolChatFile-DO4zjMJr.js} +4 -4
  16. package/dist/_chunks/{PkToolChatFile-BMj7-urz.js.map → PkToolChatFile-DO4zjMJr.js.map} +1 -1
  17. package/dist/_chunks/{PkToolRequestGeolocation-D98zUqNQ.js → PkToolRequestGeolocation-C9PSITRU.js} +2 -2
  18. package/dist/_chunks/{PkToolRequestGeolocation-D98zUqNQ.js.map → PkToolRequestGeolocation-C9PSITRU.js.map} +1 -1
  19. package/dist/_chunks/{PkToolRequestOAuthConnection-DwcRnUcd.js → PkToolRequestOAuthConnection-CWi5SeCi.js} +3 -3
  20. package/dist/_chunks/{PkToolRequestOAuthConnection-DwcRnUcd.js.map → PkToolRequestOAuthConnection-CWi5SeCi.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShareDocument-1zhZDa0R.js → PkToolShareDocument-Buzu27rQ.js} +6 -6
  22. package/dist/_chunks/{PkToolShareDocument-1zhZDa0R.js.map → PkToolShareDocument-Buzu27rQ.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowArtifact-BoJC-NtV.js → PkToolShowArtifact-B2-3-k2F.js} +4 -4
  24. package/dist/_chunks/{PkToolShowArtifact-BoJC-NtV.js.map → PkToolShowArtifact-B2-3-k2F.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowCalendarEvent-Dvp1SwBY.js → PkToolShowCalendarEvent-mVY2FS24.js} +4 -4
  26. package/dist/_chunks/{PkToolShowCalendarEvent-Dvp1SwBY.js.map → PkToolShowCalendarEvent-mVY2FS24.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowComparison-BPfyn08U.js → PkToolShowComparison-7NCImocZ.js} +4 -4
  28. package/dist/_chunks/{PkToolShowComparison-BPfyn08U.js.map → PkToolShowComparison-7NCImocZ.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowContactForm-CErVBzjl.js → PkToolShowContactForm-DbOZHB_G.js} +5 -5
  30. package/dist/_chunks/{PkToolShowContactForm-CErVBzjl.js.map → PkToolShowContactForm-DbOZHB_G.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowDiagram-C1Q5jhbk.js → PkToolShowDiagram-BHd-C_cx.js} +4 -4
  32. package/dist/_chunks/{PkToolShowDiagram-C1Q5jhbk.js.map → PkToolShowDiagram-BHd-C_cx.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowEmail-Ckxmf4jc.js → PkToolShowEmail-B9F7dnif.js} +4 -4
  34. package/dist/_chunks/{PkToolShowEmail-Ckxmf4jc.js.map → PkToolShowEmail-B9F7dnif.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowForm-B7Q79XAb.js → PkToolShowForm-o2LuWDNq.js} +6 -6
  36. package/dist/_chunks/{PkToolShowForm-B7Q79XAb.js.map → PkToolShowForm-o2LuWDNq.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowImageGallery-CxeQcE6A.js → PkToolShowImageGallery-DAcW2Dau.js} +3 -3
  38. package/dist/_chunks/{PkToolShowImageGallery-CxeQcE6A.js.map → PkToolShowImageGallery-DAcW2Dau.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowLocation-Drq1nnwN.js → PkToolShowLocation-CLS9HQIJ.js} +4 -4
  40. package/dist/_chunks/{PkToolShowLocation-Drq1nnwN.js.map → PkToolShowLocation-CLS9HQIJ.js.map} +1 -1
  41. package/dist/_chunks/{PkToolShowMessage-h2LUBvO4.js → PkToolShowMessage-BoKDMyvU.js} +4 -4
  42. package/dist/_chunks/{PkToolShowMessage-h2LUBvO4.js.map → PkToolShowMessage-BoKDMyvU.js.map} +1 -1
  43. package/dist/_chunks/{PkToolShowProductList-DDqYsHNq.js → PkToolShowProductList-OYwQCHar.js} +4 -4
  44. package/dist/_chunks/{PkToolShowProductList-DDqYsHNq.js.map → PkToolShowProductList-OYwQCHar.js.map} +1 -1
  45. package/dist/_chunks/{PkToolShowQrCode-C8GfpW7f.js → PkToolShowQrCode-e6DxEcWY.js} +4 -4
  46. package/dist/_chunks/{PkToolShowQrCode-C8GfpW7f.js.map → PkToolShowQrCode-e6DxEcWY.js.map} +1 -1
  47. package/dist/_chunks/{PkToolShowSources-CTc2s510.js → PkToolShowSources-CUNneZCp.js} +4 -4
  48. package/dist/_chunks/{PkToolShowSources-CTc2s510.js.map → PkToolShowSources-CUNneZCp.js.map} +1 -1
  49. package/dist/_chunks/{PkToolShowSuggestedReply-vui8vph1.js → PkToolShowSuggestedReply-BTE7TZ4Z.js} +2 -2
  50. package/dist/_chunks/{PkToolShowSuggestedReply-vui8vph1.js.map → PkToolShowSuggestedReply-BTE7TZ4Z.js.map} +1 -1
  51. package/dist/_chunks/{PkToolShowVideo-C2kh6pVN.js → PkToolShowVideo-bTWeXtZd.js} +3 -3
  52. package/dist/_chunks/{PkToolShowVideo-C2kh6pVN.js.map → PkToolShowVideo-bTWeXtZd.js.map} +1 -1
  53. package/dist/_chunks/{PkToolShowWeather-7_f5k1pX.js → PkToolShowWeather-Nr7POGAS.js} +2 -2
  54. package/dist/_chunks/{PkToolShowWeather-7_f5k1pX.js.map → PkToolShowWeather-Nr7POGAS.js.map} +1 -1
  55. package/dist/_chunks/{PkToolShowWebPages-By7zBIVa.js → PkToolShowWebPages-DNbdkSSz.js} +4 -4
  56. package/dist/_chunks/{PkToolShowWebPages-By7zBIVa.js.map → PkToolShowWebPages-DNbdkSSz.js.map} +1 -1
  57. package/dist/_chunks/{VvButtonLocalized-DCJiCUYU.js → VvButtonLocalized-KEhD3ono.js} +2 -2
  58. package/dist/_chunks/{VvButtonLocalized-DCJiCUYU.js.map → VvButtonLocalized-KEhD3ono.js.map} +1 -1
  59. package/dist/_chunks/{VvCheckboxGroup.es-tzyEhJUc.js → VvCheckboxGroup.es-D67JvxVf.js} +2 -2
  60. package/dist/_chunks/{VvCheckboxGroup.es-tzyEhJUc.js.map → VvCheckboxGroup.es-D67JvxVf.js.map} +1 -1
  61. package/dist/_chunks/{VvCombobox.es-D8QFCY85.js → VvCombobox.es-Bb9Dbtdg.js} +457 -457
  62. package/dist/_chunks/{VvCombobox.es-D8QFCY85.js.map → VvCombobox.es-Bb9Dbtdg.js.map} +1 -1
  63. package/dist/_chunks/{VvInputText.es-CaN-GUXU.js → VvInputText.es-CWgEXnVy.js} +396 -396
  64. package/dist/_chunks/{VvInputText.es-CaN-GUXU.js.map → VvInputText.es-CWgEXnVy.js.map} +1 -1
  65. package/dist/_chunks/{VvRadioGroup.es-D73Elvh0.js → VvRadioGroup.es-B3UbDh0z.js} +2 -2
  66. package/dist/_chunks/{VvRadioGroup.es-D73Elvh0.js.map → VvRadioGroup.es-B3UbDh0z.js.map} +1 -1
  67. package/dist/_chunks/{VvSelect.es-8ZE8Zjm9.js → VvSelect.es-BZkBK0gK.js} +170 -170
  68. package/dist/_chunks/{VvSelect.es-8ZE8Zjm9.js.map → VvSelect.es-BZkBK0gK.js.map} +1 -1
  69. package/dist/_chunks/{VvTextarea.es-BNgA61wM.js → VvTextarea.es-C8vAvoJh.js} +139 -139
  70. package/dist/_chunks/{VvTextarea.es-BNgA61wM.js.map → VvTextarea.es-C8vAvoJh.js.map} +1 -1
  71. package/dist/_chunks/{dist-m75acBC9.js → dist-B3-I_01H.js} +67 -15
  72. package/dist/_chunks/dist-B3-I_01H.js.map +1 -0
  73. package/dist/_chunks/{index.es-fkUmGg9G.js → index.es-C7ON2BA3.js} +38 -38
  74. package/dist/_chunks/{index.es-fkUmGg9G.js.map → index.es-C7ON2BA3.js.map} +1 -1
  75. package/dist/_chunks/{index.es-DRbDRAW5.js → index.es-CYAq7LJb.js} +10 -10
  76. package/dist/_chunks/{index.es-DRbDRAW5.js.map → index.es-CYAq7LJb.js.map} +1 -1
  77. package/dist/_chunks/{utils-DAQfsk2H.js → utils-BHvRrCzW.js} +6 -2
  78. package/dist/_chunks/utils-BHvRrCzW.js.map +1 -0
  79. package/dist/ai-elements.es.js +2747 -2727
  80. package/dist/ai-elements.es.js.map +1 -1
  81. package/dist-vue/_chunks/utils-BuxgMuKv.js.map +1 -1
  82. package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +9 -0
  83. package/dist-vue/packages/components/src/chat/PkPageControlBar.d.ts +6 -0
  84. package/dist-vue/packages/components/src/chat/utils.d.ts +8 -0
  85. package/package.json +1 -1
  86. package/dist/_chunks/dist-m75acBC9.js.map +0 -1
  87. package/dist/_chunks/utils-DAQfsk2H.js.map +0 -1
@@ -1,31 +1,31 @@
1
1
  import { r as e } from "./rolldown-runtime-9rEmUaIe.js";
2
2
  import { A as t, B as n, Et as r, F as i, I as a, J as o, L as s, N as c, Ot as l, Q as u, S as d, Tt as f, V as p, X as m, _ as h, d as g, f as _, g as v, gt as y, h as b, j as x, k as S, kt as C, ot as w, r as T, tt as E, v as D, w as O, wt as k, x as A, y as j, z as M } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
3
3
  import { r as ee } from "./vue-i18n-POtLvOl1.js";
4
- import { B as te, H as N, I as P, L as ne, R as re, U as F, V as ie, a as ae, z as oe } from "./utils-DAQfsk2H.js";
5
- import { c as se } from "./dist-m75acBC9.js";
6
- import { t as I } from "./index.es-fkUmGg9G.js";
7
- import { t as ce } from "./VvButtonLocalized-DCJiCUYU.js";
8
- import { t as L } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
9
- import { t as le } from "./PkEditorRadioButtons-DWNs2pp4.js";
4
+ import { B as te, H as ne, L as N, R as re, U as P, V as F, W as I, a as ie, z as L } from "./utils-BHvRrCzW.js";
5
+ import { l as ae } from "./dist-B3-I_01H.js";
6
+ import { t as R } from "./index.es-C7ON2BA3.js";
7
+ import { t as oe } from "./VvButtonLocalized-KEhD3ono.js";
8
+ import { t as z } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
9
+ import { t as se } from "./PkEditorRadioButtons-Cif9q08d.js";
10
10
  // ../../packages/components/src/chat/PkSpreadsheetPreview.vue?vue&type=script&setup=true&lang.ts
11
11
  S(), w(), f(), T();
12
- var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-preview__bar" }, de = ["aria-label"], z = ["aria-label"], fe = ["aria-label"], pe = [
12
+ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-preview__bar" }, le = ["aria-label"], V = ["aria-label"], ue = ["aria-label"], de = [
13
13
  "rowspan",
14
14
  "colspan",
15
15
  "data-focus",
16
16
  "title",
17
17
  "onMousedown",
18
18
  "onMouseenter"
19
- ], me = {
19
+ ], fe = {
20
20
  key: 1,
21
21
  class: "pk-spreadsheet-preview__more"
22
- }, B = ["aria-label"], he = ["aria-current", "onClick"], V = { class: "pk-spreadsheet-preview__status" }, ge = { class: "pk-spreadsheet-preview__info" }, _e = ["title"], ve = ["title"], ye = {
22
+ }, pe = ["aria-label"], me = ["aria-current", "onClick"], H = { class: "pk-spreadsheet-preview__status" }, he = { class: "pk-spreadsheet-preview__info" }, ge = ["title"], _e = ["title"], ve = {
23
23
  key: 2,
24
24
  class: "pk-spreadsheet-preview__stats"
25
- }, be = {
25
+ }, ye = {
26
26
  key: 0,
27
27
  class: "pk-spreadsheet-preview__average"
28
- }, xe = { key: 1 }, Se = { class: "pk-spreadsheet-preview__zoom" }, H = { class: "pk-spreadsheet-preview__percent" }, Ce = 64, U = 20, W = 28, G = 44, K = /*#__PURE__*/ L(/* @__PURE__ */ O({
28
+ }, be = { key: 1 }, xe = { class: "pk-spreadsheet-preview__zoom" }, U = { class: "pk-spreadsheet-preview__percent" }, Se = 64, W = 20, G = 28, K = 44, q = /*#__PURE__*/ z(/* @__PURE__ */ O({
29
29
  __name: "PkSpreadsheetPreview",
30
30
  props: /*@__PURE__*/ c({ preview: { type: null } }, {
31
31
  sheet: { default: 0 },
@@ -35,7 +35,7 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
35
35
  }),
36
36
  emits: ["update:sheet", "update:zoom"],
37
37
  setup(e) {
38
- let t = e, { t: n, locale: a } = ee({ useScope: "global" }), s = o(e, "sheet"), c = o(e, "zoom"), f = m("scrollEl"), { width: h, height: S } = se(f, {
38
+ let t = e, { t: n, locale: a } = ee({ useScope: "global" }), s = o(e, "sheet"), c = o(e, "zoom"), f = m("scrollEl"), { width: h, height: S } = ae(f, {
39
39
  width: 0,
40
40
  height: 0
41
41
  }, { box: "border-box" }), w = b(() => t.preview.sheets[s.value] ?? t.preview.sheets[0]);
@@ -49,47 +49,47 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
49
49
  }, E = b(() => {
50
50
  let e = w.value;
51
51
  if (!e) return [];
52
- 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 = G, a = h.value / c.value;
52
+ 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 = K, a = h.value / c.value;
53
53
  for (let o = 1; o <= e.lastColumn || !e.moreColumns && (o <= e.lastColumn + 2 || i < a); o++) {
54
54
  if (t.has(o)) continue;
55
- let e = n.get(o) ?? Ce;
55
+ let e = n.get(o) ?? Se;
56
56
  r.push({
57
57
  col: o,
58
58
  width: e
59
59
  }), i += e;
60
60
  }
61
61
  return r;
62
- }), O = b(() => E.value.reduce((e, t) => e + t.width, G)), te = b(() => E.value.map((e) => `${e.col}:${e.width}`).join(",")), N = /* @__PURE__ */ new WeakMap(), P = b(() => {
62
+ }), O = b(() => E.value.reduce((e, t) => e + t.width, K)), te = b(() => E.value.map((e) => `${e.col}:${e.width}`).join(",")), ne = /* @__PURE__ */ new WeakMap(), N = b(() => {
63
63
  let e = w.value;
64
64
  if (!e) return [];
65
- let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((S.value / c.value - W) / U), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = N.get(e);
66
- a || (a = /* @__PURE__ */ new Map(), N.set(e, a));
65
+ let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((S.value / c.value - G) / W), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = ne.get(e);
66
+ a || (a = /* @__PURE__ */ new Map(), ne.set(e, a));
67
67
  let o = a;
68
68
  return Array.from({ length: i }, (e, t) => t + 1).filter((e) => !t.has(e)).map((e) => {
69
69
  let t = o.get(e);
70
70
  return t || (t = {
71
71
  row: e,
72
- height: n.get(e) ?? U
72
+ height: n.get(e) ?? W
73
73
  }, o.set(e, t)), t;
74
74
  });
75
- }), ne = b(() => {
75
+ }), re = b(() => {
76
76
  let e = /* @__PURE__ */ new Map();
77
77
  for (let t of w.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
78
78
  return e;
79
- }), re = b(() => {
79
+ }), P = b(() => {
80
80
  let e = /* @__PURE__ */ new Map();
81
81
  for (let t of w.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}`, {
82
82
  row: t.row,
83
83
  col: n.col
84
84
  });
85
85
  return e;
86
- }), F = (e, t) => ne.value.get(`${e},${t}`), ie = (e, t) => {
86
+ }), F = (e, t) => re.value.get(`${e},${t}`), I = (e, t) => {
87
87
  let n = F(e, t)?.span;
88
88
  if (n) return {
89
- rows: P.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
89
+ rows: N.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
90
90
  cols: E.value.filter((e) => e.col >= t && e.col < t + n.cols).length
91
91
  };
92
- }, ae = (e) => e?.style === void 0 ? void 0 : t.preview.styles[e.style], oe = (e, t) => {
92
+ }, ie = (e) => e?.style === void 0 ? void 0 : t.preview.styles[e.style], L = (e, t) => {
93
93
  let n = e.decimals === void 0 ? { maximumFractionDigits: 10 } : {
94
94
  minimumFractionDigits: e.decimals,
95
95
  maximumFractionDigits: e.maxDecimals ?? e.decimals
@@ -103,18 +103,18 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
103
103
  currency: e.currency
104
104
  } : {}
105
105
  }).format(t);
106
- }, I = (e) => {
106
+ }, R = (e) => {
107
107
  let t = /* @__PURE__ */ new Date(`${e}T00:00:00Z`);
108
108
  return Number.isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(a.value, {
109
109
  dateStyle: "short",
110
110
  timeZone: "UTC"
111
111
  }).format(t);
112
- }, L = (e) => {
112
+ }, z = (e) => {
113
113
  if (!e) return "";
114
114
  if (e.missing) return "—";
115
115
  let t = e.value;
116
- return t === void 0 ? "" : typeof t == "boolean" ? n(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? I(t) : typeof t == "number" ? oe(e, t) : t;
117
- }, le = (e) => {
116
+ return t === void 0 ? "" : typeof t == "boolean" ? n(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? R(t) : typeof t == "number" ? L(e, t) : t;
117
+ }, se = (e) => {
118
118
  if (!e) return "";
119
119
  if (e.formula) return `=${e.formula}`;
120
120
  let t = e.value;
@@ -122,9 +122,9 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
122
122
  useGrouping: !1,
123
123
  maximumFractionDigits: 15,
124
124
  ...e.format === "percent" ? { style: "percent" } : {}
125
- }).format(t) : L(e);
126
- }, K = (e) => e ? `${e.width}px solid ${e.color}` : void 0, we = (e, t, n) => {
127
- let r = ae(e), i = e?.value, a = typeof i == "number" || !!e?.missing, o = {
125
+ }).format(t) : z(e);
126
+ }, q = (e) => e ? `${e.width}px solid ${e.color}` : void 0, Ce = (e, t, n) => {
127
+ let r = ie(e), i = e?.value, a = typeof i == "number" || !!e?.missing, o = {
128
128
  textAlign: r?.align ?? (a ? "right" : typeof i == "boolean" || e?.format === "error" ? "center" : "left"),
129
129
  verticalAlign: r?.valign === "top" ? "top" : r?.valign === "middle" ? "middle" : "bottom",
130
130
  whiteSpace: r?.wrap ? "pre-wrap" : "nowrap"
@@ -135,43 +135,43 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
135
135
  let e = `${4 + r.indent * 9}px`;
136
136
  o.textAlign === "right" ? o.paddingRight = e : o.paddingLeft = e;
137
137
  }
138
- return o.borderTop = K(r?.borders?.top), o.borderRight = K(r?.borders?.right), o.borderBottom = K(r?.borders?.bottom), o.borderLeft = K(r?.borders?.left), Object.assign(o, q(t, n)), o;
139
- }, q = (e, t) => {
138
+ return o.borderTop = q(r?.borders?.top), o.borderRight = q(r?.borders?.right), o.borderBottom = q(r?.borders?.bottom), o.borderLeft = q(r?.borders?.left), Object.assign(o, J(t, n)), o;
139
+ }, J = (e, t) => {
140
140
  let n = w.value?.frozen;
141
141
  if (!n) return {};
142
142
  let r = {};
143
- return e <= n.rows && (r.position = "sticky", r.top = `${W + P.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 = `${G + E.value.filter((e) => e.col < t).reduce((e, t) => e + t.width, 0)}px`, r.zIndex = e <= n.rows ? 3 : 2), r;
144
- }, J = y({
143
+ return e <= n.rows && (r.position = "sticky", r.top = `${G + N.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 = `${K + E.value.filter((e) => e.col < t).reduce((e, t) => e + t.width, 0)}px`, r.zIndex = e <= n.rows ? 3 : 2), r;
144
+ }, Y = y({
145
145
  row: 1,
146
146
  col: 1
147
- }), Y = y({
147
+ }), X = y({
148
148
  row: 1,
149
149
  col: 1
150
150
  });
151
151
  u(w, () => {
152
- J.value = {
152
+ Y.value = {
153
153
  row: 1,
154
154
  col: 1
155
- }, Y.value = {
155
+ }, X.value = {
156
156
  row: 1,
157
157
  col: 1
158
158
  };
159
159
  });
160
- let X = b(() => ({
161
- r1: Math.min(J.value.row, Y.value.row),
162
- r2: Math.max(J.value.row, Y.value.row),
163
- c1: Math.min(J.value.col, Y.value.col),
164
- c2: Math.max(J.value.col, Y.value.col)
165
- })), Te = (e, t) => e >= X.value.r1 && e <= X.value.r2 && t >= X.value.c1 && t <= X.value.c2, Ee = (e, t) => Y.value.row === e && Y.value.col === t, De = (e) => e >= X.value.r1 && e <= X.value.r2 ? `${X.value.c1}:${X.value.c2}:${Y.value.row === e ? Y.value.col : 0}` : "", Z = y(!1), Q = (e, t, n) => {
166
- f.value?.focus({ preventScroll: !0 }), Y.value = {
160
+ let Z = b(() => ({
161
+ r1: Math.min(Y.value.row, X.value.row),
162
+ r2: Math.max(Y.value.row, X.value.row),
163
+ c1: Math.min(Y.value.col, X.value.col),
164
+ c2: Math.max(Y.value.col, X.value.col)
165
+ })), we = (e, t) => e >= Z.value.r1 && e <= Z.value.r2 && t >= Z.value.c1 && t <= Z.value.c2, Te = (e, t) => X.value.row === e && X.value.col === t, Ee = (e) => e >= Z.value.r1 && e <= Z.value.r2 ? `${Z.value.c1}:${Z.value.c2}:${X.value.row === e ? X.value.col : 0}` : "", De = y(!1), Q = (e, t, n) => {
166
+ f.value?.focus({ preventScroll: !0 }), X.value = {
167
167
  row: e,
168
168
  col: t
169
- }, n.shiftKey || (J.value = {
169
+ }, n.shiftKey || (Y.value = {
170
170
  row: e,
171
171
  col: t
172
- }), Z.value = !0;
172
+ }), De.value = !0;
173
173
  }, Oe = (e, t) => {
174
- Z.value && (Y.value = {
174
+ De.value && (X.value = {
175
175
  row: e,
176
176
  col: t
177
177
  });
@@ -186,7 +186,7 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
186
186
  }[e.key];
187
187
  if (!t) return;
188
188
  e.preventDefault();
189
- let n = P.value.map((e) => e.row), r = E.value.map((e) => e.col), a = (e) => re.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;
189
+ let n = N.value.map((e) => e.row), r = E.value.map((e) => e.col), a = (e) => P.value.get(`${e.row},${e.col}`) ?? e, o = a(X.value), s = n.indexOf(X.value.row), c = r.indexOf(X.value.col), l = o;
190
190
  for (;;) {
191
191
  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]));
192
192
  if (e === s && i === c || (s = e, c = i, l = a({
@@ -194,12 +194,12 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
194
194
  col: r[c]
195
195
  }), l.row !== o.row || l.col !== o.col)) break;
196
196
  }
197
- Y.value = l, e.shiftKey || (J.value = l), i(() => f.value?.querySelector("[data-focus]")?.scrollIntoView({
197
+ X.value = l, e.shiftKey || (Y.value = l), i(() => f.value?.querySelector("[data-focus]")?.scrollIntoView({
198
198
  block: "nearest",
199
199
  inline: "nearest"
200
200
  }));
201
- }, Ae = b(() => F(Y.value.row, Y.value.col)), $ = b(() => {
202
- let { r1: e, r2: t, c1: n, c2: r } = X.value;
201
+ }, Ae = b(() => F(X.value.row, X.value.col)), $ = b(() => {
202
+ let { r1: e, r2: t, c1: n, c2: r } = Z.value;
203
203
  if (e === t && n === r) return;
204
204
  let i = 0, a = 0, o = 0, s;
205
205
  for (let c = e; c <= t; c++) for (let e = n; e <= r; e++) {
@@ -208,20 +208,20 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
208
208
  }
209
209
  if (i) return {
210
210
  count: i,
211
- sum: s ? oe(s, a) : void 0,
212
- average: s ? oe(s, a / o) : void 0
211
+ sum: s ? L(s, a) : void 0,
212
+ average: s ? L(s, a / o) : void 0
213
213
  };
214
214
  }), je = (e) => {
215
215
  c.value = Math.min(2, Math.max(.5, Math.round((c.value + e) * 10) / 10));
216
216
  };
217
217
  return (t, i) => {
218
- let o = ce;
219
- return M(), j("div", R, [
220
- v("div", ue, [
218
+ let o = oe;
219
+ return M(), j("div", B, [
220
+ v("div", ce, [
221
221
  v("span", {
222
222
  class: "pk-spreadsheet-preview__ref",
223
223
  "aria-label": k(n)("chatFilePreview.cell")
224
- }, C(T(Y.value.col)) + C(Y.value.row), 9, de),
224
+ }, C(T(X.value.col)) + C(X.value.row), 9, le),
225
225
  i[6] ||= v("span", {
226
226
  class: "pk-spreadsheet-preview__fx",
227
227
  "aria-hidden": "true"
@@ -229,7 +229,7 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
229
229
  v("output", {
230
230
  class: "pk-spreadsheet-preview__formula",
231
231
  "aria-label": k(n)("chatFilePreview.formulaBar")
232
- }, C(le(Ae.value)), 9, z)
232
+ }, C(se(Ae.value)), 9, V)
233
233
  ]),
234
234
  v("div", {
235
235
  ref_key: "scrollEl",
@@ -239,8 +239,8 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
239
239
  role: "grid",
240
240
  "aria-label": w.value?.name,
241
241
  onKeydown: ke,
242
- onMouseup: i[2] ||= (e) => Z.value = !1,
243
- onMouseleave: i[3] ||= (e) => Z.value = !1
242
+ onMouseup: i[2] ||= (e) => De.value = !1,
243
+ onMouseleave: i[3] ||= (e) => De.value = !1
244
244
  }, [w.value ? (M(), j("table", {
245
245
  key: 0,
246
246
  class: r(["pk-spreadsheet-preview__grid", { "pk-spreadsheet-preview__grid--lines": w.value.gridlines }]),
@@ -249,22 +249,22 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
249
249
  width: `${O.value}px`
250
250
  })
251
251
  }, [
252
- v("colgroup", null, [v("col", { style: l({ width: `${G}px` }) }, null, 4), (M(!0), j(_, null, p(E.value, (e) => (M(), j("col", {
252
+ v("colgroup", null, [v("col", { style: l({ width: `${K}px` }) }, null, 4), (M(!0), j(_, null, p(E.value, (e) => (M(), j("col", {
253
253
  key: e.col,
254
254
  style: l({ width: `${e.width}px` })
255
255
  }, null, 4))), 128))]),
256
- v("thead", null, [v("tr", { style: l({ height: `${W}px` }) }, [i[7] ||= v("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (M(!0), j(_, null, p(E.value, (e) => (M(), j("th", {
256
+ v("thead", null, [v("tr", { style: l({ height: `${G}px` }) }, [i[7] ||= v("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (M(!0), j(_, null, p(E.value, (e) => (M(), j("th", {
257
257
  key: e.col,
258
258
  scope: "col",
259
- class: r(["pk-spreadsheet-preview__head", { "pk-spreadsheet-preview__head--current": e.col >= X.value.c1 && e.col <= X.value.c2 }])
259
+ class: r(["pk-spreadsheet-preview__head", { "pk-spreadsheet-preview__head--current": e.col >= Z.value.c1 && e.col <= Z.value.c2 }])
260
260
  }, C(T(e.col)), 3))), 128))], 4)]),
261
- v("tbody", null, [(M(!0), j(_, null, p(P.value, (e, t, i, o) => {
261
+ v("tbody", null, [(M(!0), j(_, null, p(N.value, (e, t, i, o) => {
262
262
  let s = [
263
263
  e,
264
264
  w.value,
265
265
  te.value,
266
266
  k(a),
267
- De(e.row)
267
+ Ee(e.row)
268
268
  ];
269
269
  if (o && o.el && o.key === e.row && x(o, s)) return o;
270
270
  let c = (M(), j("tr", {
@@ -272,29 +272,29 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
272
272
  style: l({ height: `${e.height}px` })
273
273
  }, [v("th", {
274
274
  scope: "row",
275
- class: r(["pk-spreadsheet-preview__row", { "pk-spreadsheet-preview__row--current": e.row >= X.value.r1 && e.row <= X.value.r2 }]),
275
+ class: r(["pk-spreadsheet-preview__row", { "pk-spreadsheet-preview__row--current": e.row >= Z.value.r1 && e.row <= Z.value.r2 }]),
276
276
  style: l(w.value.frozen && e.row <= w.value.frozen.rows ? {
277
- ...q(e.row, 0),
277
+ ...J(e.row, 0),
278
278
  left: 0,
279
279
  zIndex: 4
280
280
  } : void 0)
281
- }, C(e.row), 7), (M(!0), j(_, null, p(E.value, (t) => (M(), j(_, { key: t.col }, [re.value.has(`${e.row},${t.col}`) ? D("", !0) : (M(), j("td", {
281
+ }, C(e.row), 7), (M(!0), j(_, null, p(E.value, (t) => (M(), j(_, { key: t.col }, [P.value.has(`${e.row},${t.col}`) ? D("", !0) : (M(), j("td", {
282
282
  key: 0,
283
- rowspan: ie(e.row, t.col)?.rows,
284
- colspan: ie(e.row, t.col)?.cols,
283
+ rowspan: I(e.row, t.col)?.rows,
284
+ colspan: I(e.row, t.col)?.cols,
285
285
  class: r(["pk-spreadsheet-preview__cell", {
286
- "pk-spreadsheet-preview__cell--range": Te(e.row, t.col) && !Ee(e.row, t.col),
286
+ "pk-spreadsheet-preview__cell--range": we(e.row, t.col) && !Te(e.row, t.col),
287
287
  "pk-spreadsheet-preview__cell--missing": F(e.row, t.col)?.missing
288
288
  }]),
289
- style: l(we(F(e.row, t.col), e.row, t.col)),
290
- "data-focus": Ee(e.row, t.col) ? "" : void 0,
289
+ style: l(Ce(F(e.row, t.col), e.row, t.col)),
290
+ "data-focus": Te(e.row, t.col) ? "" : void 0,
291
291
  title: F(e.row, t.col)?.missing ? k(n)("chatFilePreview.missingValue") : void 0,
292
292
  onMousedown: g((n) => Q(e.row, t.col, n), ["prevent"]),
293
293
  onMouseenter: (n) => Oe(e.row, t.col)
294
- }, C(L(F(e.row, t.col))), 47, pe))], 64))), 128))], 4));
294
+ }, C(z(F(e.row, t.col))), 47, de))], 64))), 128))], 4));
295
295
  return c.memo = s, c;
296
296
  }, i, 0), 128))])
297
- ], 6)) : D("", !0), w.value && (w.value.moreRows || w.value.moreColumns) ? (M(), j("p", me, [w.value.moreRows ? (M(), j(_, { key: 0 }, [A(C(k(n)("chatFilePreview.moreRows", w.value.moreRows)), 1)], 64)) : D("", !0), w.value.moreColumns ? (M(), j(_, { key: 1 }, [A(C(k(n)("chatFilePreview.moreColumns", w.value.moreColumns)), 1)], 64)) : D("", !0)])) : D("", !0)], 40, fe),
297
+ ], 6)) : D("", !0), w.value && (w.value.moreRows || w.value.moreColumns) ? (M(), j("p", fe, [w.value.moreRows ? (M(), j(_, { key: 0 }, [A(C(k(n)("chatFilePreview.moreRows", w.value.moreRows)), 1)], 64)) : D("", !0), w.value.moreColumns ? (M(), j(_, { key: 1 }, [A(C(k(n)("chatFilePreview.moreColumns", w.value.moreColumns)), 1)], 64)) : D("", !0)])) : D("", !0)], 40, ue),
298
298
  v("nav", {
299
299
  class: "pk-spreadsheet-preview__sheets",
300
300
  "aria-label": k(n)("chatFilePreview.sheets")
@@ -304,20 +304,20 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
304
304
  class: "pk-spreadsheet-preview__sheet",
305
305
  "aria-current": t === s.value ? "page" : void 0,
306
306
  onClick: (e) => s.value = t
307
- }, C(e.name), 9, he))), 128))], 8, B),
308
- v("div", V, [v("p", ge, [e.preview.staleFormulas ? (M(), j("span", {
307
+ }, C(e.name), 9, me))), 128))], 8, pe),
308
+ v("div", H, [v("p", he, [e.preview.staleFormulas ? (M(), j("span", {
309
309
  key: 0,
310
310
  class: "pk-spreadsheet-preview__note",
311
311
  title: k(n)("chatFilePreview.staleFormulas")
312
- }, C(k(n)("chatFilePreview.staleFormulas")), 9, _e)) : e.preview.computedFormulas ? (M(), j("span", {
312
+ }, C(k(n)("chatFilePreview.staleFormulas")), 9, ge)) : e.preview.computedFormulas ? (M(), j("span", {
313
313
  key: 1,
314
314
  class: "pk-spreadsheet-preview__note",
315
315
  title: k(n)("chatFilePreview.computedFormulas")
316
- }, C(k(n)("chatFilePreview.computedFormulas")), 9, ve)) : D("", !0), $.value ? (M(), j("span", ye, [
317
- $.value.average ? (M(), j("span", be, C(k(n)("chatFilePreview.average")) + " " + C($.value.average), 1)) : D("", !0),
316
+ }, C(k(n)("chatFilePreview.computedFormulas")), 9, _e)) : D("", !0), $.value ? (M(), j("span", ve, [
317
+ $.value.average ? (M(), j("span", ye, C(k(n)("chatFilePreview.average")) + " " + C($.value.average), 1)) : D("", !0),
318
318
  v("span", null, C(k(n)("chatFilePreview.count")) + " " + C($.value.count), 1),
319
- $.value.sum ? (M(), j("span", xe, C(k(n)("chatFilePreview.sum")) + " " + C($.value.sum), 1)) : D("", !0)
320
- ])) : D("", !0)]), v("div", Se, [
319
+ $.value.sum ? (M(), j("span", be, C(k(n)("chatFilePreview.sum")) + " " + C($.value.sum), 1)) : D("", !0)
320
+ ])) : D("", !0)]), v("div", xe, [
321
321
  d(o, {
322
322
  modifiers: "action-quiet",
323
323
  icon: "ri:subtract-line",
@@ -325,7 +325,7 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
325
325
  disabled: c.value <= .5,
326
326
  onClick: i[4] ||= (e) => je(-.1)
327
327
  }, null, 8, ["aria-label", "disabled"]),
328
- v("span", H, C(Math.round(c.value * 100)) + "% ", 1),
328
+ v("span", U, C(Math.round(c.value * 100)) + "% ", 1),
329
329
  d(o, {
330
330
  modifiers: "action-quiet",
331
331
  icon: "ri:add-line",
@@ -340,10 +340,10 @@ var R = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-previ
340
340
  }), [["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}"]]]);
341
341
  // ../../packages/components/src/chat/PkWordPreviewRuns.vue?vue&type=script&setup=true&lang.ts
342
342
  S(), f(), w();
343
- var we = ["src"], q = {
343
+ var Ce = ["src"], J = {
344
344
  key: 1,
345
345
  class: "pk-word-preview__image"
346
- }, J = ["title"], Y = ["title"], X = /* @__PURE__ */ O({
346
+ }, Y = ["title"], X = ["title"], Z = /* @__PURE__ */ O({
347
347
  __name: "PkWordPreviewRuns",
348
348
  props: {
349
349
  runs: { type: Array },
@@ -352,13 +352,13 @@ var we = ["src"], q = {
352
352
  numbers: { type: Object }
353
353
  },
354
354
  setup(e) {
355
- let n = e, { t: i } = ee({ useScope: "global" }), a = t(ae, void 0), o = (e) => e.picture ? F(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? N(e) : "inline", c = (e) => {
355
+ let n = e, { t: i } = ee({ useScope: "global" }), a = t(ie, void 0), o = (e) => e.picture ? I(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? P(e) : "inline", c = (e) => {
356
356
  let t = {
357
357
  width: `${e.width}pt`,
358
358
  aspectRatio: `${e.width} / ${e.height}`
359
359
  }, r = e.anchor, i = n.page;
360
360
  if (!r || !i) return t;
361
- let a = r.xFrom === "page" ? r.x - i.margins.left : r.x, o = N(e);
361
+ let a = r.xFrom === "page" ? r.x - i.margins.left : r.x, o = P(e);
362
362
  if (o === "around") {
363
363
  let n = i.width - i.margins.left - i.margins.right, o = a + e.width / 2 < n / 2;
364
364
  return {
@@ -380,11 +380,11 @@ var we = ["src"], q = {
380
380
  zIndex: r.wrap === "behind" ? -1 : 1
381
381
  };
382
382
  }, u = (e) => e.field && n.numbers ? String(n.numbers[e.field]) : e.text, d = b(() => {
383
- let e = re(n.runs, n.mode ?? "markup"), t = (e) => !!e.picture && !!n.page && ["around", "block"].includes(N(e.picture));
383
+ let e = L(n.runs, n.mode ?? "markup"), t = (e) => !!e.picture && !!n.page && ["around", "block"].includes(P(e.picture));
384
384
  return [...e.filter(t), ...e.filter((e) => !t(e))];
385
385
  }), f = b(() => !n.mode || n.mode === "markup"), m = (e) => {
386
386
  let t = {};
387
- e.font && (t.fontFamily = ne(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");
387
+ e.font && (t.fontFamily = re(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");
388
388
  let n = [e.underline ? "underline" : "", e.strike ? "line-through" : ""].filter(Boolean).join(" ");
389
389
  return n && (t.textDecoration = n), e.caps && (t.textTransform = "uppercase"), e.vertAlign && (t.verticalAlign = e.vertAlign, t.fontSize = `${(e.size ?? 11) * .65}pt`), t;
390
390
  }, h = (e) => {
@@ -400,17 +400,17 @@ var we = ["src"], q = {
400
400
  style: l(c(e.picture)),
401
401
  src: o(e),
402
402
  alt: ""
403
- }, null, 14, we))], 64)) : (M(), j("span", q, C(k(i)("chatFilePreview.image")), 1))], 64)) : f.value && e.change === "deleted" ? (M(), j("del", {
403
+ }, null, 14, Ce))], 64)) : (M(), j("span", J, C(k(i)("chatFilePreview.image")), 1))], 64)) : f.value && e.change === "deleted" ? (M(), j("del", {
404
404
  key: 1,
405
405
  class: "pk-word-preview__removed",
406
406
  style: l(h(e)),
407
407
  title: g(e)
408
- }, C(u(e)), 13, J)) : f.value && e.change === "inserted" ? (M(), j("ins", {
408
+ }, C(u(e)), 13, Y)) : f.value && e.change === "inserted" ? (M(), j("ins", {
409
409
  key: 2,
410
410
  class: "pk-word-preview__added",
411
411
  style: l(h(e)),
412
412
  title: g(e)
413
- }, C(u(e)), 13, Y)) : (M(), j("span", {
413
+ }, C(u(e)), 13, X)) : (M(), j("span", {
414
414
  key: 3,
415
415
  style: l(m(e))
416
416
  }, C(u(e)), 5))], 64))), 128));
@@ -418,7 +418,7 @@ var we = ["src"], q = {
418
418
  });
419
419
  // ../../packages/components/src/chat/PkWordPreviewBlock.vue?vue&type=script&setup=true&lang.ts
420
420
  S(), f();
421
- var Te = { key: 0 }, Ee = ["colspan"], De = ["role", "aria-level"], Z = { key: 1 }, Q = /* @__PURE__ */ O({
421
+ var we = { key: 0 }, Te = ["colspan"], Ee = ["role", "aria-level"], De = { key: 1 }, Q = /* @__PURE__ */ O({
422
422
  __name: "PkWordPreviewBlock",
423
423
  props: {
424
424
  block: { type: null },
@@ -458,7 +458,7 @@ var Te = { key: 0 }, Ee = ["colspan"], De = ["role", "aria-level"], Z = { key: 1
458
458
  "pk-word-preview__table--next": e.row !== 0,
459
459
  "pk-word-preview__changed": c.value
460
460
  }])
461
- }, [s.value.length ? (M(), j("colgroup", Te, [(M(!0), j(_, null, p(s.value, (e, t) => (M(), j("col", {
461
+ }, [s.value.length ? (M(), j("colgroup", we, [(M(!0), j(_, null, p(s.value, (e, t) => (M(), j("col", {
462
462
  key: t,
463
463
  style: l({ width: e })
464
464
  }, null, 4))), 128))])) : D("", !0), v("tbody", null, [v("tr", null, [(M(!0), j(_, null, p(o.value, (t, n) => (M(), j("td", {
@@ -469,7 +469,7 @@ var Te = { key: 0 }, Ee = ["colspan"], De = ["role", "aria-level"], Z = { key: 1
469
469
  textAlign: t.align,
470
470
  fontSize: t.size ? `${t.size}pt` : void 0
471
471
  })
472
- }, [d(X, {
472
+ }, [d(Z, {
473
473
  runs: t.runs,
474
474
  mode: e.mode,
475
475
  numbers: e.numbers
@@ -477,7 +477,7 @@ var Te = { key: 0 }, Ee = ["colspan"], De = ["role", "aria-level"], Z = { key: 1
477
477
  "runs",
478
478
  "mode",
479
479
  "numbers"
480
- ])], 12, Ee))), 128))])])], 2)) : e.block.kind === "table" ? D("", !0) : (M(), j("div", {
480
+ ])], 12, Te))), 128))])])], 2)) : e.block.kind === "table" ? D("", !0) : (M(), j("div", {
481
481
  key: 1,
482
482
  class: r(["pk-word-preview__block", { "pk-word-preview__changed": a.value }]),
483
483
  role: e.block.kind === "heading" ? "heading" : void 0,
@@ -489,7 +489,7 @@ var Te = { key: 0 }, Ee = ["colspan"], De = ["role", "aria-level"], Z = { key: 1
489
489
  class: "pk-word-preview__label",
490
490
  style: l(i.value)
491
491
  }, C(e.block.label), 5)) : D("", !0),
492
- d(X, {
492
+ d(Z, {
493
493
  runs: e.block.runs,
494
494
  mode: e.mode,
495
495
  page: e.page,
@@ -500,8 +500,8 @@ var Te = { key: 0 }, Ee = ["colspan"], De = ["role", "aria-level"], Z = { key: 1
500
500
  "page",
501
501
  "numbers"
502
502
  ]),
503
- !e.block.label && !e.block.runs.length ? (M(), j("br", Z)) : D("", !0)
504
- ], 14, De));
503
+ !e.block.label && !e.block.runs.length ? (M(), j("br", De)) : D("", !0)
504
+ ], 14, Ee));
505
505
  }
506
506
  });
507
507
  // ../../packages/components/src/chat/PkWordPreviewPart.vue?vue&type=script&setup=true&lang.ts
@@ -516,11 +516,11 @@ var Oe = { class: "pk-word-preview__part" }, ke = ["src"], Ae = /* @__PURE__ */
516
516
  numbers: { type: Object }
517
517
  },
518
518
  setup(e) {
519
- let n = e, r = t(ae, void 0), i = b(() => P(n.blocks, n.mode)), a = b(() => ie(n.blocks, n.mode).flatMap((e) => {
520
- let t = F(r?.value, e.ref);
519
+ let n = e, r = t(ie, void 0), i = b(() => N(n.blocks, n.mode)), a = b(() => ne(n.blocks, n.mode).flatMap((e) => {
520
+ let t = I(r?.value, e.ref);
521
521
  return t ? [{
522
522
  src: t,
523
- css: te(e, n.section.page)
523
+ css: F(e, n.section.page)
524
524
  }] : [];
525
525
  })), o = b(() => {
526
526
  let { margins: e } = n.section.page;
@@ -587,7 +587,7 @@ var $ = ["aria-label"], je = {
587
587
  }, Ye = { class: "pk-word-preview__count" }, Xe = {
588
588
  key: 1,
589
589
  class: "pk-word-preview__legend"
590
- }, Ze = ["title"], Qe = { class: "pk-word-preview__removed" }, $e = { class: "pk-word-preview__added" }, et = { class: "pk-word-preview__percent" }, tt = ["data-part"], nt = 96 / 72, rt = /*#__PURE__*/ L(/* @__PURE__ */ O({
590
+ }, Ze = ["title"], Qe = { class: "pk-word-preview__removed" }, $e = { class: "pk-word-preview__added" }, et = { class: "pk-word-preview__percent" }, tt = ["data-part"], nt = 96 / 72, rt = /*#__PURE__*/ z(/* @__PURE__ */ O({
591
591
  __name: "PkWordPreview",
592
592
  props: /*@__PURE__*/ c({
593
593
  preview: { type: null },
@@ -604,48 +604,48 @@ var $ = ["aria-label"], je = {
604
604
  emits: ["update:fit", "update:zoom"],
605
605
  setup(e) {
606
606
  let t = e, { t: c } = ee({ useScope: "global" });
607
- n(ae, b(() => t.preview.images));
608
- let f = (e) => re(e, t.mode), g = b(() => P(t.preview.blocks, t.mode)), x = m("rootEl"), S = m("scrollEl"), w = m("measureEl"), { width: T } = se(x), { width: E } = se(S), O = b(() => T.value === 0 || T.value >= 640), A = b(() => T.value >= 1e3), N = b(() => t.preview.sections?.length ? t.preview.sections : [{
607
+ n(ie, b(() => t.preview.images));
608
+ let f = (e) => L(e, t.mode), g = b(() => N(t.preview.blocks, t.mode)), x = m("rootEl"), S = m("scrollEl"), w = m("measureEl"), { width: T } = ae(x), { width: E } = ae(S), O = b(() => T.value === 0 || T.value >= 640), A = b(() => T.value >= 1e3), P = b(() => t.preview.sections?.length ? t.preview.sections : [{
609
609
  page: t.preview.page,
610
610
  headerDistance: 0,
611
611
  footerDistance: 0,
612
612
  headers: {},
613
613
  footers: {}
614
- }]), I = b(() => N.value[0].page), L = b(() => ({
615
- fontFamily: ne(t.preview.defaults.font),
614
+ }]), R = b(() => P.value[0].page), z = b(() => ({
615
+ fontFamily: re(t.preview.defaults.font),
616
616
  fontSize: `${t.preview.defaults.size}pt`,
617
617
  color: t.preview.defaults.color ?? "#000000",
618
- "--pk-word-line": oe(t.preview.defaults.font),
618
+ "--pk-word-line": te(t.preview.defaults.font),
619
619
  "--pk-word-size": `${t.preview.defaults.size}pt`
620
- })), le = b(() => ({
621
- ...L.value,
622
- width: `${I.value.width - I.value.margins.left - I.value.margins.right}pt`
623
- })), R = y([]), ue = y({}), de = async () => {
620
+ })), se = b(() => ({
621
+ ...z.value,
622
+ width: `${R.value.width - R.value.margins.left - R.value.margins.right}pt`
623
+ })), B = y([]), ce = y({}), le = async () => {
624
624
  await i();
625
625
  let e = w.value?.querySelectorAll("[data-item]");
626
- R.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
626
+ B.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
627
627
  let t = w.value?.querySelectorAll("[data-part]");
628
- ue.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
628
+ ce.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
629
629
  };
630
630
  u([
631
631
  g,
632
632
  O,
633
633
  () => t.preview.parts
634
- ], de, { flush: "post" }), s(() => {
635
- de(), document.fonts?.ready.then(de);
634
+ ], le, { flush: "post" }), s(() => {
635
+ le(), document.fonts?.ready.then(le);
636
636
  });
637
- let z = b(() => {
638
- if (!O.value || R.value.length !== g.value.length) return [{
637
+ let V = b(() => {
638
+ if (!O.value || B.value.length !== g.value.length) return [{
639
639
  items: g.value.map((e, t) => t),
640
640
  section: 0,
641
641
  number: 1,
642
- top: I.value.margins.top,
643
- bottom: I.value.margins.bottom
642
+ top: R.value.margins.top,
643
+ bottom: R.value.margins.bottom
644
644
  }];
645
645
  let e = [], n = 0, r = !0, i = 0, a, o = () => {
646
- let o = N.value[n], s = r && o.pageStart !== void 0 ? o.pageStart : (a ?? e[e.length - 1]?.number ?? 0) + 1;
646
+ let o = P.value[n], s = r && o.pageStart !== void 0 ? o.pageStart : (a ?? e[e.length - 1]?.number ?? 0) + 1;
647
647
  a = void 0;
648
- let c = (e) => r && o.titlePage ? e.first : t.preview.evenAndOddHeaders && s % 2 == 0 ? e.even : e.default, l = c(o.headers), u = c(o.footers), d = (e) => e ? (ue.value[e] ?? 0) / nt : 0;
648
+ let c = (e) => r && o.titlePage ? e.first : t.preview.evenAndOddHeaders && s % 2 == 0 ? e.even : e.default, l = c(o.headers), u = c(o.footers), d = (e) => e ? (ce.value[e] ?? 0) / nt : 0;
649
649
  e.push({
650
650
  items: [],
651
651
  section: n,
@@ -657,38 +657,38 @@ var $ = ["aria-label"], je = {
657
657
  }), r = !1, i = 0;
658
658
  };
659
659
  return g.value.forEach((t, s) => {
660
- t.section !== void 0 && t.section !== n && N.value[t.section] && (n = t.section, r = t.breakBefore || !e.length, r || (a = N.value[n].pageStart));
661
- let c = e[e.length - 1], l = c && N.value[c.section].page, u = l ? (l.height - c.top - c.bottom) * nt : 0;
662
- (!c || c.items.length && (t.breakBefore || i + R.value[s] > u)) && o(), e[e.length - 1].items.push(s), i += R.value[s];
660
+ t.section !== void 0 && t.section !== n && P.value[t.section] && (n = t.section, r = t.breakBefore || !e.length, r || (a = P.value[n].pageStart));
661
+ let c = e[e.length - 1], l = c && P.value[c.section].page, u = l ? (l.height - c.top - c.bottom) * nt : 0;
662
+ (!c || c.items.length && (t.breakBefore || i + B.value[s] > u)) && o(), e[e.length - 1].items.push(s), i += B.value[s];
663
663
  }), e.length || o(), e;
664
- }), fe = b(() => {
664
+ }), ue = b(() => {
665
665
  let e = /* @__PURE__ */ new Map();
666
- for (let t of z.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
667
- return z.value.map((t) => ({
666
+ for (let t of V.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
667
+ return V.value.map((t) => ({
668
668
  page: t.number,
669
- pages: z.value.length,
669
+ pages: V.value.length,
670
670
  sectionPages: e.get(t.section) ?? 1
671
671
  }));
672
- }), pe = (e) => {
673
- let t = N.value[e.section].page;
672
+ }), de = (e) => {
673
+ let t = P.value[e.section].page;
674
674
  return {
675
- ...L.value,
675
+ ...z.value,
676
676
  width: `${t.width}pt`,
677
677
  minHeight: `${t.height}pt`,
678
678
  padding: `${e.top}pt ${t.margins.right}pt ${e.bottom}pt ${t.margins.left}pt`
679
679
  };
680
- }, me = (e) => {
680
+ }, fe = (e) => {
681
681
  let n = [...new Set(e.items.map((e) => g.value[e].block))];
682
- return ie(n.map((e) => t.preview.blocks[e]), t.mode).flatMap((n) => {
683
- let r = F(t.preview.images, n.ref);
682
+ return ne(n.map((e) => t.preview.blocks[e]), t.mode).flatMap((n) => {
683
+ let r = I(t.preview.images, n.ref);
684
684
  return r ? [{
685
685
  src: r,
686
- css: te(n, N.value[e.section].page)
686
+ css: F(n, P.value[e.section].page)
687
687
  }] : [];
688
688
  });
689
- }, B = o(e, "fit"), he = o(e, "zoom"), V = b(() => B.value ? Math.min(1.25, Math.max(.3, (E.value - 48) / (I.value.width * nt))) : he.value), ge = (e) => {
690
- he.value = Math.min(2, Math.max(.3, Math.round((V.value + e) * 10) / 10)), B.value = !1;
691
- }, _e = y(0), ve = y(), ye = () => {
689
+ }, pe = o(e, "fit"), me = o(e, "zoom"), H = b(() => pe.value ? Math.min(1.25, Math.max(.3, (E.value - 48) / (R.value.width * nt))) : me.value), he = (e) => {
690
+ me.value = Math.min(2, Math.max(.3, Math.round((H.value + e) * 10) / 10)), pe.value = !1;
691
+ }, ge = y(0), _e = y(), ve = () => {
692
692
  let e = S.value?.getBoundingClientRect();
693
693
  if (!e) return;
694
694
  let t = S.value?.querySelectorAll("[data-page]") ?? [], n = 0;
@@ -696,50 +696,50 @@ var $ = ["aria-label"], je = {
696
696
  if (i.getBoundingClientRect().top - e.top > e.height / 3) break;
697
697
  n = r;
698
698
  }
699
- _e.value = n;
699
+ ge.value = n;
700
700
  let r;
701
- for (let t of H.value) {
701
+ for (let t of U.value) {
702
702
  let n = S.value?.querySelector(`[data-key="${t.key}"]`);
703
703
  if (n) {
704
704
  if (n.getBoundingClientRect().top - e.top > 48) break;
705
705
  r = t.key;
706
706
  }
707
707
  }
708
- ve.value = r ?? H.value[0]?.key;
709
- }, be = 0, xe = () => {
710
- be ||= requestAnimationFrame(() => {
711
- be = 0, ye();
708
+ _e.value = r ?? U.value[0]?.key;
709
+ }, ye = 0, be = () => {
710
+ ye ||= requestAnimationFrame(() => {
711
+ ye = 0, ve();
712
712
  });
713
713
  };
714
- a(() => cancelAnimationFrame(be)), u(z, () => i(xe));
715
- let Se = (e) => f(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), H = b(() => g.value.flatMap((e) => {
716
- let n = t.preview.blocks[e.block], r = n.kind === "heading" ? [n.label, Se(n.runs)].filter(Boolean).join(" ") : "";
714
+ a(() => cancelAnimationFrame(ye)), u(V, () => i(be));
715
+ let xe = (e) => f(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), U = b(() => g.value.flatMap((e) => {
716
+ let n = t.preview.blocks[e.block], r = n.kind === "heading" ? [n.label, xe(n.runs)].filter(Boolean).join(" ") : "";
717
717
  return n.kind === "heading" && n.level <= 3 && r ? [{
718
718
  key: e.key,
719
719
  level: n.level,
720
720
  text: r
721
721
  }] : [];
722
- })), Ce = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, U = b(() => g.value.flatMap((e) => {
722
+ })), Se = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, W = b(() => g.value.flatMap((e) => {
723
723
  let n = t.preview.blocks[e.block], r = n.kind === "table" ? (n.rows[e.row ?? 0] ?? []).flatMap((e) => e.runs) : n.runs, i = r.filter((e) => e.change === "deleted").map((e) => e.text).join(" ").trim(), a = r.filter((e) => e.change === "inserted").map((e) => e.text).join(" ").trim();
724
724
  return i || a ? [{
725
725
  key: e.key,
726
- removed: Ce(i),
727
- added: Ce(a)
726
+ removed: Se(i),
727
+ added: Se(a)
728
728
  }] : [];
729
- })), W = y("outline"), G = y(!1), K = (e) => {
729
+ })), G = y("outline"), K = y(!1), q = (e) => {
730
730
  S.value?.querySelector(`[data-key="${e}"]`)?.scrollIntoView({
731
731
  block: "start",
732
732
  behavior: "smooth"
733
- }), A.value || (G.value = !1);
734
- }, we = b(() => t.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => Se(e.runs)) : [Se(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), q = b(() => t.preview.revisionAuthors.join(", "));
733
+ }), A.value || (K.value = !1);
734
+ }, Ce = b(() => t.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => xe(e.runs)) : [xe(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), J = b(() => t.preview.revisionAuthors.join(", "));
735
735
  return (t, n) => {
736
- let i = ce;
736
+ let i = oe;
737
737
  return M(), j("div", {
738
738
  ref_key: "rootEl",
739
739
  ref: x,
740
740
  class: r(["pk-word-preview", { "pk-word-preview--paged": O.value }])
741
741
  }, [
742
- (A.value || G.value) && (H.value.length || U.value.length) ? (M(), j("aside", {
742
+ (A.value || K.value) && (U.value.length || W.value.length) ? (M(), j("aside", {
743
743
  key: 0,
744
744
  class: r(["pk-word-preview__side", { "pk-word-preview__side--over": !A.value }]),
745
745
  "aria-label": k(c)("chatFilePreview.outline")
@@ -747,53 +747,53 @@ var $ = ["aria-label"], je = {
747
747
  type: "button",
748
748
  role: "tab",
749
749
  class: "pk-word-preview__tab",
750
- "aria-selected": W.value === "outline",
751
- onClick: n[0] ||= (e) => W.value = "outline"
752
- }, C(k(c)("chatFilePreview.outline")), 9, Me), U.value.length ? (M(), j("button", {
750
+ "aria-selected": G.value === "outline",
751
+ onClick: n[0] ||= (e) => G.value = "outline"
752
+ }, C(k(c)("chatFilePreview.outline")), 9, Me), W.value.length ? (M(), j("button", {
753
753
  key: 0,
754
754
  type: "button",
755
755
  role: "tab",
756
756
  class: "pk-word-preview__tab",
757
- "aria-selected": W.value === "changes",
758
- onClick: n[1] ||= (e) => W.value = "changes"
759
- }, C(k(c)("chatFilePreview.changes", { count: U.value.length })), 9, Ne)) : D("", !0)]), W.value === "outline" || !U.value.length ? (M(), j("nav", Pe, [(M(!0), j(_, null, p(H.value, (e) => (M(), j("button", {
757
+ "aria-selected": G.value === "changes",
758
+ onClick: n[1] ||= (e) => G.value = "changes"
759
+ }, C(k(c)("chatFilePreview.changes", { count: W.value.length })), 9, Ne)) : D("", !0)]), G.value === "outline" || !W.value.length ? (M(), j("nav", Pe, [(M(!0), j(_, null, p(U.value, (e) => (M(), j("button", {
760
760
  key: e.key,
761
761
  type: "button",
762
762
  class: r(["pk-word-preview__entry", `pk-word-preview__entry--${Math.min(e.level, 3)}`]),
763
- "aria-current": ve.value === e.key ? "location" : void 0,
764
- onClick: (t) => K(e.key)
765
- }, [v("span", Ie, C(e.text), 1), U.value.some((t) => t.key === e.key) ? (M(), j("span", Le)) : D("", !0)], 10, Fe))), 128)), H.value.length ? D("", !0) : (M(), j("p", Re, C(k(c)("chatFilePreview.noHeadings")), 1))])) : (M(), j("nav", ze, [(M(!0), j(_, null, p(U.value, (e) => (M(), j("button", {
763
+ "aria-current": _e.value === e.key ? "location" : void 0,
764
+ onClick: (t) => q(e.key)
765
+ }, [v("span", Ie, C(e.text), 1), W.value.some((t) => t.key === e.key) ? (M(), j("span", Le)) : D("", !0)], 10, Fe))), 128)), U.value.length ? D("", !0) : (M(), j("p", Re, C(k(c)("chatFilePreview.noHeadings")), 1))])) : (M(), j("nav", ze, [(M(!0), j(_, null, p(W.value, (e) => (M(), j("button", {
766
766
  key: e.key,
767
767
  type: "button",
768
768
  class: "pk-word-preview__entry pk-word-preview__entry--change",
769
- onClick: (t) => K(e.key)
769
+ onClick: (t) => q(e.key)
770
770
  }, [e.removed ? (M(), j("del", Ve, C(e.removed), 1)) : D("", !0), e.added ? (M(), j("ins", He, C(e.added), 1)) : D("", !0)], 8, Be))), 128))]))], 10, $)) : D("", !0),
771
771
  v("div", Ue, [v("div", {
772
772
  ref_key: "scrollEl",
773
773
  ref: S,
774
774
  class: "pk-word-preview__scroll",
775
- onScroll: xe
775
+ onScroll: be
776
776
  }, [O.value ? (M(), j("div", {
777
777
  key: 0,
778
778
  class: "pk-word-preview__pages",
779
- style: l({ zoom: V.value })
780
- }, [(M(!0), j(_, null, p(z.value, (t, n) => (M(), j("article", {
779
+ style: l({ zoom: H.value })
780
+ }, [(M(!0), j(_, null, p(V.value, (t, n) => (M(), j("article", {
781
781
  key: n,
782
782
  "data-page": "",
783
783
  class: "pk-word-preview__page",
784
784
  "aria-label": k(c)("chatFilePreview.pageOf", {
785
785
  page: n + 1,
786
- count: z.value.length
786
+ count: V.value.length
787
787
  }),
788
- style: l(pe(t))
788
+ style: l(de(t))
789
789
  }, [
790
790
  t.header && e.preview.parts?.[t.header] ? (M(), h(Ae, {
791
791
  key: 0,
792
792
  blocks: e.preview.parts[t.header],
793
793
  where: "header",
794
- section: N.value[t.section],
794
+ section: P.value[t.section],
795
795
  mode: e.mode,
796
- numbers: fe.value[n]
796
+ numbers: ue.value[n]
797
797
  }, null, 8, [
798
798
  "blocks",
799
799
  "section",
@@ -806,8 +806,8 @@ var $ = ["aria-label"], je = {
806
806
  block: e.preview.blocks[g.value[r].block],
807
807
  row: g.value[r].row,
808
808
  mode: e.mode,
809
- page: N.value[t.section].page,
810
- numbers: fe.value[n]
809
+ page: P.value[t.section].page,
810
+ numbers: ue.value[n]
811
811
  }, null, 8, [
812
812
  "data-key",
813
813
  "block",
@@ -816,7 +816,7 @@ var $ = ["aria-label"], je = {
816
816
  "page",
817
817
  "numbers"
818
818
  ]))), 128)),
819
- (M(!0), j(_, null, p(me(t), (e, t) => (M(), j("img", {
819
+ (M(!0), j(_, null, p(fe(t), (e, t) => (M(), j("img", {
820
820
  key: `image-${t}`,
821
821
  class: "pk-word-preview__float",
822
822
  style: l(e.css),
@@ -827,9 +827,9 @@ var $ = ["aria-label"], je = {
827
827
  key: 1,
828
828
  blocks: e.preview.parts[t.footer],
829
829
  where: "footer",
830
- section: N.value[t.section],
830
+ section: P.value[t.section],
831
831
  mode: e.mode,
832
- numbers: fe.value[n]
832
+ numbers: ue.value[n]
833
833
  }, null, 8, [
834
834
  "blocks",
835
835
  "section",
@@ -839,7 +839,7 @@ var $ = ["aria-label"], je = {
839
839
  ], 12, We))), 128))], 4)) : (M(), j("article", {
840
840
  key: 1,
841
841
  class: "pk-word-preview__page pk-word-preview__page--flow",
842
- style: l(L.value)
842
+ style: l(z.value)
843
843
  }, [(M(!0), j(_, null, p(g.value, (t) => (M(), h(Q, {
844
844
  key: t.key,
845
845
  "data-key": t.key,
@@ -853,20 +853,20 @@ var $ = ["aria-label"], je = {
853
853
  "mode"
854
854
  ]))), 128))], 4)), e.preview.truncated ? (M(), j("p", Ke, C(k(c)("chatFilePreview.truncated")), 1)) : D("", !0)], 544), v("div", qe, [
855
855
  O.value ? (M(), j("span", Je, C(k(c)("chatFilePreview.pageOf", {
856
- page: _e.value + 1,
857
- count: z.value.length
856
+ page: ge.value + 1,
857
+ count: V.value.length
858
858
  })), 1)) : D("", !0),
859
- v("span", Ye, C(k(c)("chatFilePreview.words", we.value)), 1),
859
+ v("span", Ye, C(k(c)("chatFilePreview.words", Ce.value)), 1),
860
860
  e.mode === "markup" && e.preview.revisionAuthors.length ? (M(), j("span", Xe, [
861
861
  v("span", {
862
862
  class: "pk-word-preview__legend-text",
863
- title: k(c)("chatFilePreview.revisionsOf", { authors: q.value })
864
- }, C(k(c)("chatFilePreview.revisionsOf", { authors: q.value })), 9, Ze),
863
+ title: k(c)("chatFilePreview.revisionsOf", { authors: J.value })
864
+ }, C(k(c)("chatFilePreview.revisionsOf", { authors: J.value })), 9, Ze),
865
865
  v("del", Qe, C(k(c)("chatFilePreview.removed")), 1),
866
866
  v("ins", $e, C(k(c)("chatFilePreview.added")), 1)
867
867
  ])) : D("", !0),
868
868
  n[6] ||= v("span", { class: "pk-word-preview__spacer" }, null, -1),
869
- !A.value && (H.value.length || U.value.length) ? (M(), h(i, {
869
+ !A.value && (U.value.length || W.value.length) ? (M(), h(i, {
870
870
  key: 2,
871
871
  class: "pk-word-preview__outline-toggle",
872
872
  modifiers: "action-quiet",
@@ -874,8 +874,8 @@ var $ = ["aria-label"], je = {
874
874
  label: k(c)("chatFilePreview.outline"),
875
875
  title: k(c)("chatFilePreview.outline"),
876
876
  "aria-label": k(c)("chatFilePreview.outline"),
877
- "aria-expanded": G.value,
878
- onClick: n[2] ||= (e) => G.value = !G.value
877
+ "aria-expanded": K.value,
878
+ onClick: n[2] ||= (e) => K.value = !K.value
879
879
  }, null, 8, [
880
880
  "label",
881
881
  "title",
@@ -886,23 +886,23 @@ var $ = ["aria-label"], je = {
886
886
  d(i, {
887
887
  modifiers: "action-quiet",
888
888
  label: k(c)("chatFilePreview.fitWidth"),
889
- disabled: B.value,
890
- onClick: n[3] ||= (e) => B.value = !0
889
+ disabled: pe.value,
890
+ onClick: n[3] ||= (e) => pe.value = !0
891
891
  }, null, 8, ["label", "disabled"]),
892
892
  d(i, {
893
893
  modifiers: "action-quiet",
894
894
  icon: "ri:subtract-line",
895
895
  "aria-label": k(c)("chatFilePreview.zoomOut"),
896
- disabled: V.value <= .3,
897
- onClick: n[4] ||= (e) => ge(-.1)
896
+ disabled: H.value <= .3,
897
+ onClick: n[4] ||= (e) => he(-.1)
898
898
  }, null, 8, ["aria-label", "disabled"]),
899
- v("span", et, C(Math.round(V.value * 100)) + "% ", 1),
899
+ v("span", et, C(Math.round(H.value * 100)) + "% ", 1),
900
900
  d(i, {
901
901
  modifiers: "action-quiet",
902
902
  icon: "ri:add-line",
903
903
  "aria-label": k(c)("chatFilePreview.zoomIn"),
904
- disabled: V.value >= 2,
905
- onClick: n[5] ||= (e) => ge(.1)
904
+ disabled: H.value >= 2,
905
+ onClick: n[5] ||= (e) => he(.1)
906
906
  }, null, 8, ["aria-label", "disabled"])
907
907
  ], 64)) : D("", !0)
908
908
  ])]),
@@ -912,7 +912,7 @@ var $ = ["aria-label"], je = {
912
912
  ref: w,
913
913
  class: "pk-word-preview__measure",
914
914
  "aria-hidden": "true",
915
- style: l(le.value)
915
+ style: l(se.value)
916
916
  }, [(M(!0), j(_, null, p(g.value, (t) => (M(), j("div", {
917
917
  key: t.key,
918
918
  "data-item": ""
@@ -920,7 +920,7 @@ var $ = ["aria-label"], je = {
920
920
  block: e.preview.blocks[t.block],
921
921
  row: t.row,
922
922
  mode: e.mode,
923
- page: I.value
923
+ page: R.value
924
924
  }, null, 8, [
925
925
  "block",
926
926
  "row",
@@ -929,12 +929,12 @@ var $ = ["aria-label"], je = {
929
929
  ])]))), 128)), (M(!0), j(_, null, p(e.preview.parts, (t, n) => (M(), j("div", {
930
930
  key: n,
931
931
  "data-part": n
932
- }, [(M(!0), j(_, null, p(k(P)(t, e.mode), (n) => (M(), h(Q, {
932
+ }, [(M(!0), j(_, null, p(k(N)(t, e.mode), (n) => (M(), h(Q, {
933
933
  key: n.key,
934
934
  block: t[n.block],
935
935
  row: n.row,
936
936
  mode: e.mode,
937
- page: I.value
937
+ page: R.value
938
938
  }, null, 8, [
939
939
  "block",
940
940
  "row",
@@ -1014,7 +1014,7 @@ var it = ["aria-label"], at = { class: "pk-file-preview__head" }, ot = { class:
1014
1014
  return u(() => n.version, () => {
1015
1015
  m.value = "markup";
1016
1016
  }), (t, n) => {
1017
- let o = I, c = ce;
1017
+ let o = R, c = oe;
1018
1018
  return M(), j("section", {
1019
1019
  class: "pk-file-preview",
1020
1020
  "aria-label": e.filename,
@@ -1048,7 +1048,7 @@ var it = ["aria-label"], at = { class: "pk-file-preview__head" }, ot = { class:
1048
1048
  disabled: !f.value,
1049
1049
  onClick: n[1] ||= (e) => f.value && i("version", f.value)
1050
1050
  }, null, 8, ["aria-label", "disabled"])
1051
- ], 8, ft)) : D("", !0), w.value ? (M(), h(le, {
1051
+ ], 8, ft)) : D("", !0), w.value ? (M(), h(se, {
1052
1052
  key: 1,
1053
1053
  modelValue: m.value,
1054
1054
  "onUpdate:modelValue": n[2] ||= (e) => m.value = e,
@@ -1124,7 +1124,7 @@ var it = ["aria-label"], at = { class: "pk-file-preview__head" }, ot = { class:
1124
1124
  "fit",
1125
1125
  "preview",
1126
1126
  "mode"
1127
- ])) : (M(), h(K, {
1127
+ ])) : (M(), h(q, {
1128
1128
  key: 3,
1129
1129
  sheet: g.value,
1130
1130
  "onUpdate:sheet": n[9] ||= (e) => g.value = e,
@@ -1138,7 +1138,7 @@ var it = ["aria-label"], at = { class: "pk-file-preview__head" }, ot = { class:
1138
1138
  ]))])], 8, it);
1139
1139
  };
1140
1140
  }
1141
- }), xt = ".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;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}", St = /* @__PURE__ */ e({ default: () => Ct }), Ct = /*#__PURE__*/ L(bt, [["styles", [xt]]]);
1141
+ }), xt = ".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;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}", St = /* @__PURE__ */ e({ default: () => Ct }), Ct = /*#__PURE__*/ z(bt, [["styles", [xt]]]);
1142
1142
  export { St as n, Ct as t };
1143
1143
 
1144
- //# sourceMappingURL=PkFilePreview-CC2W-RXG.js.map
1144
+ //# sourceMappingURL=PkFilePreview-D_piCsAW.js.map