@svgrid/enterprise 3.1.8 → 3.1.10

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 (268) hide show
  1. package/README.md +1 -0
  2. package/dist/SvAlertRuleEditor.svelte +16 -5
  3. package/dist/SvGridAlerts.svelte +8 -0
  4. package/dist/SvGridAlerts.svelte.d.ts +4 -0
  5. package/dist/SvGridBoard.svelte +69 -10
  6. package/dist/SvGridBulkEditDrawer.svelte +13 -5
  7. package/dist/SvGridGallery.svelte +286 -0
  8. package/dist/SvGridGallery.svelte.d.ts +30 -0
  9. package/dist/SvGridScheduler.svelte +33 -11
  10. package/dist/SvGridSelectionBar.svelte +47 -0
  11. package/dist/advanced-filter/expr-columns-from-grid.d.ts +1 -0
  12. package/dist/advanced-filter/expr-columns-from-grid.js +11 -7
  13. package/dist/advanced-filter-enable.d.ts +6 -0
  14. package/dist/advanced-filter-enable.js +8 -0
  15. package/dist/alerts/alert-engine.d.ts +7 -0
  16. package/dist/alerts/alert-engine.js +5 -2
  17. package/dist/alerts/condition-editor.d.ts +26 -0
  18. package/dist/alerts/condition-editor.js +17 -0
  19. package/dist/base/index.d.ts +20 -0
  20. package/dist/base/index.js +20 -0
  21. package/dist/bulk-edit.d.ts +11 -0
  22. package/dist/bulk-edit.js +18 -1
  23. package/dist/cdn/svgrid-enterprise.svelte-external.js +11197 -10639
  24. package/dist/designer/assets/GridFooter-Cu8_yBlQ.js +2 -0
  25. package/dist/designer/assets/GridMenus-BUjkkAU2.js +6 -0
  26. package/dist/designer/assets/PinSplitter-BgTpgh1d.css +1 -0
  27. package/dist/designer/assets/PinSplitter-C5AwA1xV.js +1 -0
  28. package/dist/designer/assets/SvGrid.helpers-CIrmIo9U.js +1 -0
  29. package/dist/designer/assets/SvGridCellEditor-CJxThKL_.js +4 -0
  30. package/dist/designer/assets/SvListBox-CS7oUAiX.js +2 -0
  31. package/dist/designer/assets/conditional-formatting-MDWbF8_Y.js +1 -0
  32. package/dist/designer/assets/grid-extension.svelte-BZ7AqyJI.js +1 -0
  33. package/dist/designer/assets/index-BmvG99kR.css +1 -0
  34. package/dist/designer/assets/{index-Obk8sI77.js → index-CJodU3tU.js} +307 -307
  35. package/dist/designer/assets/sparkline-C-NcnB2i.js +1 -0
  36. package/dist/designer/assets/src-C_U1NKOY.js +58 -0
  37. package/dist/designer/assets/sv-grid-scrollbar-B9N6Wuj0.js +109 -0
  38. package/dist/designer/assets/validate-H5u2HEQh.js +1 -0
  39. package/dist/designer/index.html +11 -7
  40. package/dist/expressions/compile.js +10 -0
  41. package/dist/expressions/evaluate.js +18 -0
  42. package/dist/expressions/expression-types.d.ts +10 -0
  43. package/dist/expressions/kinds.d.ts +28 -0
  44. package/dist/expressions/kinds.js +19 -0
  45. package/dist/expressions/parse.js +9 -1
  46. package/dist/fields/AttachmentCell.svelte +242 -0
  47. package/dist/fields/AttachmentCell.svelte.d.ts +5 -0
  48. package/dist/fields/AttachmentDialog.svelte +357 -0
  49. package/dist/fields/AttachmentDialog.svelte.d.ts +13 -0
  50. package/dist/fields/AttachmentEditor.svelte +41 -0
  51. package/dist/fields/AttachmentEditor.svelte.d.ts +11 -0
  52. package/dist/fields/AttachmentPreview.svelte +72 -0
  53. package/dist/fields/AttachmentPreview.svelte.d.ts +8 -0
  54. package/dist/fields/BarcodeCell.svelte +20 -0
  55. package/dist/fields/BarcodeCell.svelte.d.ts +5 -0
  56. package/dist/fields/BaseAutomations.svelte +558 -0
  57. package/dist/fields/BaseAutomations.svelte.d.ts +18 -0
  58. package/dist/fields/BaseChartView.svelte +47 -0
  59. package/dist/fields/BaseChartView.svelte.d.ts +8 -0
  60. package/dist/fields/BaseTableView.svelte +185 -0
  61. package/dist/fields/BaseTableView.svelte.d.ts +37 -0
  62. package/dist/fields/BaseTabs.svelte +308 -0
  63. package/dist/fields/BaseTabs.svelte.d.ts +21 -0
  64. package/dist/fields/ButtonCell.svelte +47 -0
  65. package/dist/fields/ButtonCell.svelte.d.ts +20 -0
  66. package/dist/fields/CheckboxCell.svelte +46 -0
  67. package/dist/fields/CheckboxCell.svelte.d.ts +14 -0
  68. package/dist/fields/DeleteFieldConfirm.svelte +80 -0
  69. package/dist/fields/DeleteFieldConfirm.svelte.d.ts +8 -0
  70. package/dist/fields/DeleteRecordConfirm.svelte +48 -0
  71. package/dist/fields/DeleteRecordConfirm.svelte.d.ts +9 -0
  72. package/dist/fields/FieldCell.svelte +80 -0
  73. package/dist/fields/FieldCell.svelte.d.ts +9 -0
  74. package/dist/fields/FieldEditor.svelte +321 -0
  75. package/dist/fields/FieldEditor.svelte.d.ts +10 -0
  76. package/dist/fields/FieldInput.svelte +188 -0
  77. package/dist/fields/FieldInput.svelte.d.ts +29 -0
  78. package/dist/fields/FieldsHeaderEnd.svelte +146 -0
  79. package/dist/fields/FieldsHeaderEnd.svelte.d.ts +6 -0
  80. package/dist/fields/FootRowAdder.svelte +8 -0
  81. package/dist/fields/FootRowAdder.svelte.d.ts +6 -0
  82. package/dist/fields/GroupHeader.svelte +127 -0
  83. package/dist/fields/GroupHeader.svelte.d.ts +24 -0
  84. package/dist/fields/LinkCell.svelte +46 -0
  85. package/dist/fields/LinkCell.svelte.d.ts +9 -0
  86. package/dist/fields/LinkPickerEditor.svelte +172 -0
  87. package/dist/fields/LinkPickerEditor.svelte.d.ts +9 -0
  88. package/dist/fields/LinkPreview.svelte +60 -0
  89. package/dist/fields/LinkPreview.svelte.d.ts +7 -0
  90. package/dist/fields/LinkedRecordView.svelte +94 -0
  91. package/dist/fields/LinkedRecordView.svelte.d.ts +9 -0
  92. package/dist/fields/LinkedRecordsCell.svelte +59 -0
  93. package/dist/fields/LinkedRecordsCell.svelte.d.ts +11 -0
  94. package/dist/fields/LongTextEditor.svelte +157 -0
  95. package/dist/fields/LongTextEditor.svelte.d.ts +11 -0
  96. package/dist/fields/NumberEditor.svelte +309 -0
  97. package/dist/fields/NumberEditor.svelte.d.ts +12 -0
  98. package/dist/fields/OptionsEditor.svelte +117 -0
  99. package/dist/fields/OptionsEditor.svelte.d.ts +11 -0
  100. package/dist/fields/PercentCell.svelte +21 -0
  101. package/dist/fields/PercentCell.svelte.d.ts +8 -0
  102. package/dist/fields/PropertyInput.svelte +204 -0
  103. package/dist/fields/PropertyInput.svelte.d.ts +11 -0
  104. package/dist/fields/RatingCell.svelte +75 -0
  105. package/dist/fields/RatingCell.svelte.d.ts +16 -0
  106. package/dist/fields/RatingEditor.svelte +82 -0
  107. package/dist/fields/RatingEditor.svelte.d.ts +9 -0
  108. package/dist/fields/RecordView.svelte +310 -0
  109. package/dist/fields/RecordView.svelte.d.ts +11 -0
  110. package/dist/fields/RichTextCell.svelte +30 -0
  111. package/dist/fields/RichTextCell.svelte.d.ts +5 -0
  112. package/dist/fields/RowAdder.svelte +93 -0
  113. package/dist/fields/RowAdder.svelte.d.ts +7 -0
  114. package/dist/fields/RowHeader.svelte +99 -0
  115. package/dist/fields/RowHeader.svelte.d.ts +11 -0
  116. package/dist/fields/SelectCell.svelte +35 -0
  117. package/dist/fields/SelectCell.svelte.d.ts +15 -0
  118. package/dist/fields/SelectEditor.svelte +350 -0
  119. package/dist/fields/SelectEditor.svelte.d.ts +17 -0
  120. package/dist/fields/SummaryCell.svelte +160 -0
  121. package/dist/fields/SummaryCell.svelte.d.ts +11 -0
  122. package/dist/fields/SvBase.svelte +545 -0
  123. package/dist/fields/SvBase.svelte.d.ts +30 -0
  124. package/dist/fields/SvBaseForm.svelte +295 -0
  125. package/dist/fields/SvBaseForm.svelte.d.ts +22 -0
  126. package/dist/fields/SvBaseViewBar.svelte +644 -0
  127. package/dist/fields/SvBaseViewBar.svelte.d.ts +26 -0
  128. package/dist/fields/UserCell.svelte +39 -0
  129. package/dist/fields/UserCell.svelte.d.ts +9 -0
  130. package/dist/fields/UserFace.svelte +30 -0
  131. package/dist/fields/UserFace.svelte.d.ts +12 -0
  132. package/dist/fields/activity.svelte.d.ts +50 -0
  133. package/dist/fields/activity.svelte.js +110 -0
  134. package/dist/fields/attachments.d.ts +95 -0
  135. package/dist/fields/attachments.js +145 -0
  136. package/dist/fields/automation-outbound.d.ts +46 -0
  137. package/dist/fields/automation-outbound.js +61 -0
  138. package/dist/fields/automation-server.d.ts +53 -0
  139. package/dist/fields/automation-server.js +333 -0
  140. package/dist/fields/automations.svelte.d.ts +208 -0
  141. package/dist/fields/automations.svelte.js +437 -0
  142. package/dist/fields/bar-request.svelte.d.ts +16 -0
  143. package/dist/fields/bar-request.svelte.js +15 -0
  144. package/dist/fields/base-alerts.d.ts +24 -0
  145. package/dist/fields/base-alerts.js +64 -0
  146. package/dist/fields/base-connect.d.ts +82 -0
  147. package/dist/fields/base-connect.js +271 -0
  148. package/dist/fields/base-schema.d.ts +104 -0
  149. package/dist/fields/base-schema.js +266 -0
  150. package/dist/fields/base-sql.d.ts +62 -0
  151. package/dist/fields/base-sql.js +251 -0
  152. package/dist/fields/base-sync.d.ts +142 -0
  153. package/dist/fields/base-sync.js +499 -0
  154. package/dist/fields/base-tables.d.ts +89 -0
  155. package/dist/fields/base-tables.js +349 -0
  156. package/dist/fields/builtin-types.d.ts +13 -0
  157. package/dist/fields/builtin-types.js +773 -0
  158. package/dist/fields/button.d.ts +2 -0
  159. package/dist/fields/button.js +17 -0
  160. package/dist/fields/chart-view.d.ts +35 -0
  161. package/dist/fields/chart-view.js +154 -0
  162. package/dist/fields/column-order.d.ts +6 -0
  163. package/dist/fields/column-order.js +12 -0
  164. package/dist/fields/convert.d.ts +16 -0
  165. package/dist/fields/convert.js +176 -0
  166. package/dist/fields/copy-text.d.ts +13 -0
  167. package/dist/fields/copy-text.js +45 -0
  168. package/dist/fields/editor-request.svelte.d.ts +71 -0
  169. package/dist/fields/editor-request.svelte.js +52 -0
  170. package/dist/fields/field-ops.d.ts +72 -0
  171. package/dist/fields/field-ops.js +334 -0
  172. package/dist/fields/filter-model.d.ts +84 -0
  173. package/dist/fields/filter-model.js +446 -0
  174. package/dist/fields/format.d.ts +109 -0
  175. package/dist/fields/format.js +288 -0
  176. package/dist/fields/formula.d.ts +50 -0
  177. package/dist/fields/formula.js +530 -0
  178. package/dist/fields/grid-access.d.ts +60 -0
  179. package/dist/fields/grid-access.js +120 -0
  180. package/dist/fields/index.d.ts +34 -0
  181. package/dist/fields/index.js +312 -0
  182. package/dist/fields/linked-fields.d.ts +8 -0
  183. package/dist/fields/linked-fields.js +40 -0
  184. package/dist/fields/links.d.ts +10 -0
  185. package/dist/fields/links.js +46 -0
  186. package/dist/fields/name-list.d.ts +16 -0
  187. package/dist/fields/name-list.js +49 -0
  188. package/dist/fields/palette.d.ts +47 -0
  189. package/dist/fields/palette.js +69 -0
  190. package/dist/fields/record-delete.svelte.d.ts +12 -0
  191. package/dist/fields/record-delete.svelte.js +5 -0
  192. package/dist/fields/record-menu.d.ts +9 -0
  193. package/dist/fields/record-menu.js +78 -0
  194. package/dist/fields/registry.svelte.d.ts +176 -0
  195. package/dist/fields/registry.svelte.js +51 -0
  196. package/dist/fields/rich-text.d.ts +23 -0
  197. package/dist/fields/rich-text.js +48 -0
  198. package/dist/fields/row-color-choice.svelte.d.ts +31 -0
  199. package/dist/fields/row-color-choice.svelte.js +25 -0
  200. package/dist/fields/row-colors.d.ts +36 -0
  201. package/dist/fields/row-colors.js +90 -0
  202. package/dist/fields/row-height.d.ts +28 -0
  203. package/dist/fields/row-height.js +50 -0
  204. package/dist/fields/sources.svelte.d.ts +80 -0
  205. package/dist/fields/sources.svelte.js +131 -0
  206. package/dist/fields/summaries.d.ts +18 -0
  207. package/dist/fields/summaries.js +138 -0
  208. package/dist/fields/view-model.d.ts +129 -0
  209. package/dist/fields/view-model.js +492 -0
  210. package/dist/fields/viewbar/ChartPanel.svelte +61 -0
  211. package/dist/fields/viewbar/ChartPanel.svelte.d.ts +9 -0
  212. package/dist/fields/viewbar/ColorPanel.svelte +112 -0
  213. package/dist/fields/viewbar/ColorPanel.svelte.d.ts +9 -0
  214. package/dist/fields/viewbar/ConditionValue.svelte +153 -0
  215. package/dist/fields/viewbar/ConditionValue.svelte.d.ts +15 -0
  216. package/dist/fields/viewbar/FieldIcon.svelte +18 -0
  217. package/dist/fields/viewbar/FieldIcon.svelte.d.ts +9 -0
  218. package/dist/fields/viewbar/FilterPanel.svelte +192 -0
  219. package/dist/fields/viewbar/FilterPanel.svelte.d.ts +13 -0
  220. package/dist/fields/viewbar/GanttPanel.svelte +60 -0
  221. package/dist/fields/viewbar/GanttPanel.svelte.d.ts +10 -0
  222. package/dist/fields/viewbar/HideFieldsPanel.svelte +104 -0
  223. package/dist/fields/viewbar/HideFieldsPanel.svelte.d.ts +7 -0
  224. package/dist/fields/viewbar/SortPanel.svelte +85 -0
  225. package/dist/fields/viewbar/SortPanel.svelte.d.ts +8 -0
  226. package/dist/fields/viewbar/ViewsMenu.svelte +250 -0
  227. package/dist/fields/viewbar/ViewsMenu.svelte.d.ts +15 -0
  228. package/dist/fields/viewbar/panel-focus.d.ts +3 -0
  229. package/dist/fields/viewbar/panel-focus.js +22 -0
  230. package/dist/fields/viewbar/sort-state.d.ts +20 -0
  231. package/dist/fields/viewbar/sort-state.js +24 -0
  232. package/dist/gallery.d.ts +7 -0
  233. package/dist/gallery.js +36 -0
  234. package/dist/gantt/SvGridGantt.svelte +88 -16
  235. package/dist/gantt/gantt-config.d.ts +28 -0
  236. package/dist/index.d.ts +3 -0
  237. package/dist/index.js +6 -0
  238. package/dist/install.js +3 -0
  239. package/dist/license-core.d.ts +3 -3
  240. package/dist/license.js +1 -0
  241. package/dist/node/studio.js +105 -4
  242. package/dist/scheduler-config.d.ts +11 -0
  243. package/dist/sources/introspect-supabase.js +4 -1
  244. package/dist/sources/rest.js +6 -2
  245. package/dist/studio/ui-components.generated.js +93 -1
  246. package/dist/upgrade-prompt.d.ts +1 -1
  247. package/dist/version.d.ts +2 -2
  248. package/dist/version.js +2 -2
  249. package/dist/wc/GridFooter-f5K0aLe_.js +145 -0
  250. package/dist/wc/GridMenus-FtSN_8t9.js +1369 -0
  251. package/dist/wc/PinSplitter-D-qtDhSM.js +132 -0
  252. package/dist/wc/{SvGrid.helpers-zBkDTryR.js → SvGrid.helpers-B2GEKrxS.js} +84 -36
  253. package/dist/wc/{SvGridCellEditor-CzUKEbkI.js → SvGridCellEditor-B_cLJrsp.js} +20 -9
  254. package/dist/wc/conditional-formatting-BXis_oP1.js +189 -0
  255. package/dist/wc/grid-extension.svelte-Bufq4B4C.js +20 -0
  256. package/dist/wc/sv-sheet-element.js +7556 -7617
  257. package/dist/wc/svelte-virtualizer.svelte-ehwOupl-.js +360 -0
  258. package/dist/wc/{validate-43C03DLP.js → validate-BaMO8UPE.js} +1 -1
  259. package/package.json +14 -3
  260. package/dist/designer/assets/GridMenus-CvcASlKv.js +0 -8
  261. package/dist/designer/assets/SvGrid.helpers-DE5mmORW.js +0 -1
  262. package/dist/designer/assets/SvGridCellEditor-C7NWcnNC.js +0 -4
  263. package/dist/designer/assets/SvListBox-BlmmzYcU.js +0 -110
  264. package/dist/designer/assets/index-KmSEY7Lb.css +0 -1
  265. package/dist/designer/assets/src-DqHCqori.js +0 -58
  266. package/dist/designer/assets/validate-B71dE1Cs.js +0 -1
  267. package/dist/wc/GridMenus-fWbBUiRH.js +0 -1088
  268. package/dist/wc/svelte-virtualizer.svelte-Dntdh8Ms.js +0 -581
@@ -0,0 +1,1369 @@
1
+ import { $ as e, D as t, G as n, H as r, I as i, L as a, M as o, O as s, P as c, Q as l, R as u, S as d, T as f, U as p, W as m, X as h, Y as g, Z as _, _ as v, a as y, at as b, b as x, d as S, dt as C, et as w, f as T, h as E, ht as D, it as O, j as k, k as A, l as ee, m as j, mt as M, n as N, nt as P, o as te, p as F, pt as I, q as ne, st as L, tt as R, u as z, ut as re, w as ie, x as B, y as V, z as ae } from "./client-DQIzjDBG.js";
2
+ import { S as oe, h as se, r as ce, u as le, w as ue } from "./SvGrid.helpers-B2GEKrxS.js";
3
+ import { c as H, s as de, t as fe } from "./svelte-virtualizer.svelte-ehwOupl-.js";
4
+ import { n as U } from "./grid-extension.svelte-Bufq4B4C.js";
5
+ import { i as pe, t as W } from "./editor-contract-peBDxir_.js";
6
+ import { t as me } from "./SvField-B_kurx_P.js";
7
+ import { n as he } from "./dismissable-CQ6XFXsk.js";
8
+ import { a as ge, i as G, n as _e, o as K, r as ve, t as q } from "./list-option-DrRyivWp.js";
9
+ import "./sv-sheet-element.js";
10
+ //#region ../grid/dist/createListbox.svelte.js
11
+ var ye = 0;
12
+ function J(e, t) {
13
+ if (e == null) return [];
14
+ if (e instanceof Set || Array.isArray(e)) {
15
+ let n = [...e];
16
+ return t ? n : n.slice(0, 1);
17
+ }
18
+ return [e];
19
+ }
20
+ function Y(e, t) {
21
+ return e instanceof Set ? e : new Set(J(e, t));
22
+ }
23
+ function be(e) {
24
+ let t = `sv-lb-${ye++}`, r = () => e.options(), i = () => e.multiple?.() ?? !1, a = () => e.disabled?.() ?? !1, o = b(0), s = L(() => Y(e.value(), i())), c = L(() => J(e.value(), i())), l = L(() => r().map((e, t) => e.disabled ? -1 : t).filter((e) => e >= 0));
25
+ h(() => {
26
+ let e = r()[n(o)];
27
+ (!e || e.disabled) && O(o, n(l)[0] ?? 0, !0);
28
+ });
29
+ let u = (e) => n(s).has(e), d = (e) => e === n(o), f = (e) => `${t}-opt-${e}`;
30
+ function p(e) {
31
+ let t = r()[e];
32
+ t && !t.disabled && O(o, e, !0);
33
+ }
34
+ function m(t) {
35
+ let c = r()[t];
36
+ if (!(!c || c.disabled || a())) {
37
+ if (O(o, t, !0), i()) {
38
+ let t = new Set(n(s));
39
+ t.has(c.value) ? t.delete(c.value) : t.add(c.value), e.onChange?.(e.value() instanceof Set ? t : [...t]);
40
+ } else e.onChange?.(c.value);
41
+ }
42
+ }
43
+ function g(e) {
44
+ let t = n(l);
45
+ if (!t.length) return;
46
+ let r = t[(t.indexOf(n(o)) + e + t.length) % t.length];
47
+ r != null && O(o, r, !0);
48
+ }
49
+ let _ = () => {
50
+ O(o, n(l)[0] ?? 0, !0);
51
+ }, v = () => {
52
+ O(o, n(l).at(-1) ?? 0, !0);
53
+ }, y = q();
54
+ function x(e) {
55
+ let t = y.push(e.toLowerCase()), i = ge(r(), t, n(o));
56
+ i >= 0 && O(o, i, !0);
57
+ }
58
+ function S(e) {
59
+ if (!a()) switch (e.key) {
60
+ case "ArrowDown":
61
+ e.preventDefault(), g(1);
62
+ break;
63
+ case "ArrowUp":
64
+ e.preventDefault(), g(-1);
65
+ break;
66
+ case "Home":
67
+ e.preventDefault(), _();
68
+ break;
69
+ case "End":
70
+ e.preventDefault(), v();
71
+ break;
72
+ case " ":
73
+ case "Enter":
74
+ e.preventDefault(), m(n(o));
75
+ break;
76
+ default: G(e) && x(e.key);
77
+ }
78
+ }
79
+ let C = () => ({
80
+ id: e.id?.(),
81
+ invalid: e.invalid?.(),
82
+ required: e.required?.(),
83
+ error: e.error?.(),
84
+ hint: e.hint?.(),
85
+ ariaLabel: e.ariaLabel?.()
86
+ });
87
+ return {
88
+ get activeIndex() {
89
+ return n(o);
90
+ },
91
+ get selectedValues() {
92
+ return n(c);
93
+ },
94
+ isSelected: u,
95
+ isActive: d,
96
+ setActive: p,
97
+ pick: m,
98
+ move: g,
99
+ first: _,
100
+ last: v,
101
+ onKeydown: S,
102
+ rootProps: () => ({
103
+ role: "listbox",
104
+ id: e.id?.(),
105
+ "aria-multiselectable": i(),
106
+ "aria-disabled": a(),
107
+ "aria-activedescendant": r()[n(o)] ? f(n(o)) : void 0,
108
+ ...W(C()),
109
+ tabindex: a() ? -1 : 0,
110
+ onkeydown: S
111
+ }),
112
+ optionProps: (e) => {
113
+ let t = r()[e];
114
+ return {
115
+ role: "option",
116
+ id: f(e),
117
+ "aria-selected": t ? u(t.value) : !1,
118
+ "aria-disabled": t?.disabled,
119
+ "data-idx": e,
120
+ "data-active": d(e) ? "" : void 0,
121
+ "data-selected": t && u(t.value) ? "" : void 0,
122
+ onclick: () => m(e),
123
+ onpointermove: () => p(e)
124
+ };
125
+ }
126
+ };
127
+ }
128
+ //#endregion
129
+ //#region ../grid/dist/js-scroller.svelte.js
130
+ function xe(e) {
131
+ let t = b(0), r = L(() => Math.max(0, e.totalSize() - e.viewport()));
132
+ h(() => {
133
+ let r = n(t);
134
+ ne(() => e.virtualizer.setScrollOffset(r));
135
+ }), h(() => {
136
+ let e = n(r);
137
+ ne(() => n(t)) > e && O(t, e, !0);
138
+ });
139
+ function i(e) {
140
+ O(t, Math.max(0, Math.min(n(r), e)), !0);
141
+ }
142
+ function a(e) {
143
+ i(n(t) + e);
144
+ }
145
+ function o(i) {
146
+ if (n(r) <= 0) return;
147
+ let o = i.deltaMode === 1 ? i.deltaY * e.lineStep() : i.deltaMode === 2 ? i.deltaY * e.viewport() : i.deltaY, s = n(t);
148
+ a(o), n(t) !== s && i.preventDefault();
149
+ }
150
+ let s = L(() => n(r) > 0 && e.totalSize() > 0 ? Math.max(24, Math.min(e.viewport(), e.viewport() / e.totalSize() * e.viewport())) : 0), c = L(() => Math.max(0, e.viewport() - n(s))), l = L(() => n(r) > 0 ? n(t) / n(r) * n(c) : 0), u = b(!1), d = 0, f = 0;
151
+ function p(e) {
152
+ e.stopPropagation(), e.preventDefault(), O(u, !0), d = e.clientY, f = n(t), e.currentTarget.setPointerCapture(e.pointerId);
153
+ }
154
+ function m(e) {
155
+ if (!n(u)) return;
156
+ let t = e.clientY - d;
157
+ i(f + (n(c) > 0 ? t / n(c) * n(r) : 0));
158
+ }
159
+ function g(e) {
160
+ O(u, !1), T(e);
161
+ }
162
+ function _(t) {
163
+ let r = t.currentTarget.getBoundingClientRect();
164
+ a(t.clientY - r.top < n(l) ? -e.viewport() : e.viewport());
165
+ }
166
+ let v = !1, y = 0, x = 0;
167
+ function S(e) {
168
+ e.pointerType === "touch" && (v = !0, y = e.clientY, x = n(t), e.currentTarget.setPointerCapture(e.pointerId));
169
+ }
170
+ function C(e) {
171
+ v && i(x - (e.clientY - y));
172
+ }
173
+ function w(e) {
174
+ v && (v = !1, T(e));
175
+ }
176
+ function T(e) {
177
+ try {
178
+ e.currentTarget.releasePointerCapture(e.pointerId);
179
+ } catch {}
180
+ }
181
+ function E(r, a) {
182
+ r < n(t) ? i(r) : r + a > n(t) + e.viewport() && i(r + a - e.viewport());
183
+ }
184
+ function D(t) {
185
+ E(e.virtualizer.getOffsetForIndex(t), e.virtualizer.getSizeForIndex(t));
186
+ }
187
+ return {
188
+ get scrollOffset() {
189
+ return n(t);
190
+ },
191
+ get maxOffset() {
192
+ return n(r);
193
+ },
194
+ get thumbH() {
195
+ return n(s);
196
+ },
197
+ get thumbTop() {
198
+ return n(l);
199
+ },
200
+ get dragging() {
201
+ return n(u);
202
+ },
203
+ scrollTo: i,
204
+ scrollByPx: a,
205
+ ensureVisible: E,
206
+ ensureIndexVisible: D,
207
+ onWheel: o,
208
+ onThumbDown: p,
209
+ onThumbMove: m,
210
+ onThumbUp: g,
211
+ onTrackDown: _,
212
+ onContentDown: S,
213
+ onContentMove: C,
214
+ onContentUp: w
215
+ };
216
+ }
217
+ //#endregion
218
+ //#region ../grid/dist/SvListBox.svelte
219
+ var X = u("<span aria-hidden=\"true\"></span>"), Se = u("<span class=\"sv-listbox__check svelte-1qscmce\" aria-hidden=\"true\"> </span>"), Ce = u("<span class=\"sv-listbox__label svelte-1qscmce\"> </span>"), we = u("<span class=\"sv-listbox__hint svelte-1qscmce\" aria-hidden=\"true\"> </span>"), Te = u("<!> <!> <!>", 1), Ee = u("<div><!></div>"), De = u("<div class=\"sv-listbox__group svelte-1qscmce\" role=\"presentation\"> </div>"), Oe = u("<div class=\"sv-listbox__sb svelte-1qscmce\" aria-hidden=\"true\"><div></div></div>"), ke = u("<div class=\"sv-listbox__vp svelte-1qscmce\"></div> <!>", 1), Ae = u("<div class=\"sv-listbox__group svelte-1qscmce\" role=\"presentation\"> </div>"), je = u("<!> <!>", 1), Me = u("<input type=\"hidden\"/>"), Ne = u("<div><!></div> <!>", 1), Pe = {
220
+ hash: "svelte-1qscmce",
221
+ code: ".sv-listbox.svelte-1qscmce {--_accent: var(--sg-accent, #2563eb);margin:0;list-style:none;background:var(--sg-input-bg, #fff);color:var(--sg-fg, #0f172a);border:1px solid var(--sg-input-border, var(--sg-border, #cbd5e1));border-radius:var(--sg-radius, 8px);width:220px;outline:none;--_fs: 13px;}\n /* Native scroll for the (fully rendered) non-virtual list. */.sv-listbox.svelte-1qscmce:not(.is-virtual) {padding:4px;overflow-y:auto;max-height:calc(var(--sv-rows, 7) * var(--sv-row-h, 32px) + 8px);}\n /* JS-driven scroller for the virtual list: fixed height, no native scroll -\n the rows are absolutely positioned and moved by `scrollOffset`. */.sv-listbox.is-virtual.svelte-1qscmce {padding:0;overflow:hidden;position:relative;height:calc(var(--sv-rows, 7) * var(--sv-row-h, 32px) + 8px);}.sv-listbox.is-block.svelte-1qscmce {width:100%;}.sv-listbox--sm.svelte-1qscmce {--_fs: 12px;}.sv-listbox--lg.svelte-1qscmce {--_fs: 15px;}.sv-listbox.svelte-1qscmce:focus-visible {border-color:var(--_accent);box-shadow:0 0 0 2px color-mix(in srgb, var(--_accent) 22%, transparent);}.sv-listbox.is-invalid.svelte-1qscmce {border-color:var(--sg-danger, #dc2626);}.sv-listbox.is-invalid.svelte-1qscmce:focus-visible {box-shadow:0 0 0 2px color-mix(in srgb, var(--sg-danger, #dc2626) 22%, transparent);}\n\n /* The clipped viewport that holds the translated rows. */.sv-listbox__vp.svelte-1qscmce {position:absolute;inset:4px;overflow:hidden;touch-action:none;}.sv-listbox.is-virtual.svelte-1qscmce .sv-listbox__opt:where(.svelte-1qscmce),\n .sv-listbox.is-virtual.svelte-1qscmce .sv-listbox__group:where(.svelte-1qscmce) {position:absolute;left:0;right:0;top:0;}\n\n /* Custom scrollbar (mouse affordance; keyboard nav handles a11y scrolling). */.sv-listbox__sb.svelte-1qscmce {position:absolute;top:4px;right:2px;bottom:4px;width:10px;z-index:2;}.sv-listbox__thumb.svelte-1qscmce {position:absolute;left:2px;right:2px;top:0;min-height:24px;border-radius:4px;background:color-mix(in srgb, currentColor 26%, transparent);cursor:default;touch-action:none;}.sv-listbox__thumb.svelte-1qscmce:hover, .sv-listbox__thumb.is-dragging.svelte-1qscmce {background:color-mix(in srgb, currentColor 42%, transparent);}.sv-listbox__opt.svelte-1qscmce {display:flex;align-items:center;gap:8px;box-sizing:border-box;flex:none;padding:0 10px;border-radius:6px;cursor:pointer;font-size:var(--_fs, 13px);}.sv-listbox__opt.is-active.svelte-1qscmce {background:var(--sg-row-hover-bg, #f1f5f9);}.sv-listbox__opt.is-selected.svelte-1qscmce {background:color-mix(in srgb, var(--_accent) 14%, transparent);color:var(--_accent);font-weight:600;}.sv-listbox__opt.is-selected.is-active.svelte-1qscmce {background:color-mix(in srgb, var(--_accent) 22%, transparent);}.sv-listbox__opt.is-disabled.svelte-1qscmce {opacity:0.4;cursor:not-allowed;}.sv-listbox__group.svelte-1qscmce {box-sizing:border-box;padding:8px 10px 3px;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.04em;color:var(--sg-muted, #94a3b8);display:flex;align-items:flex-end;}.sv-listbox__check.svelte-1qscmce {width:14px;text-align:center;color:var(--_accent);}.sv-listbox__label.svelte-1qscmce {flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}\n /* Trailing muted text (a count, a unit). `flex: none` so it never gives up\n width - the label ellipsises instead, which is the half you can guess. */.sv-listbox__hint.svelte-1qscmce {flex:none;margin-inline-start:8px;color:var(--sg-muted, #64748b);font-variant-numeric:tabular-nums;font-size:0.9em;}\n\n /* ---- Checklist variant ---- */.sv-listbox__box.svelte-1qscmce {width:14px;height:14px;flex:none;box-sizing:border-box;position:relative;border:1px solid var(--sg-input-border, var(--sg-border, #cbd5e1));border-radius:3px;background:var(--sg-input-bg, #fff);}.sv-listbox__box.is-on.svelte-1qscmce {background:var(--_accent);border-color:var(--_accent);}.sv-listbox__box.is-on.svelte-1qscmce::after {content:'';position:absolute;left:4px;top:1px;width:3px;height:7px;border:solid var(--sg-input-bg, #fff);border-width:0 2px 2px 0;transform:rotate(45deg);}\n /* The box carries the state, so selected rows keep neutral chrome - only the\n roving highlight tints a row. */.sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-selected:where(.svelte-1qscmce) {background:none;color:inherit;font-weight:inherit;}.sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-active:where(.svelte-1qscmce),\n .sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-selected.is-active:where(.svelte-1qscmce) {background:var(--sg-row-hover-bg, #f1f5f9);}"
222
+ };
223
+ function Z(e, t) {
224
+ C(t, !0), f(e, Pe);
225
+ let r = (e, n = D) => {
226
+ var r = Te(), s = R(r), l = (e) => {
227
+ var t = X();
228
+ let r;
229
+ g((e) => r = d(t, 1, "sv-listbox__box svelte-1qscmce", null, r, e), [() => ({ "is-on": de(n()) })]), i(e, t);
230
+ }, u = (e) => {
231
+ var t = Se(), r = w(t, !0);
232
+ M(t), g((e) => c(r, e), [() => de(n()) ? "✓" : ""]), i(e, t);
233
+ };
234
+ k(s, (e) => {
235
+ x() ? e(l) : _() && e(u, 1);
236
+ });
237
+ var f = P(s, 2), p = (e) => {
238
+ var r = a(), s = R(r);
239
+ o(s, () => t.item ?? t.itemTemplate, n), i(e, r);
240
+ }, m = (e) => {
241
+ var t = Ce(), r = w(t, !0);
242
+ M(t), g(() => c(r, n().label)), i(e, t);
243
+ };
244
+ k(f, (e) => {
245
+ t.item ?? t.itemTemplate ? e(p) : e(m, -1);
246
+ });
247
+ var h = P(f, 2), v = (e) => {
248
+ var t = we(), r = w(t, !0);
249
+ M(t), g(() => c(r, n().hint)), i(e, t);
250
+ };
251
+ k(h, (e) => {
252
+ n().hint && !(t.item ?? t.itemTemplate) && e(v);
253
+ }), i(e, r);
254
+ }, l = (e, t = D, n = D, a = D, o = D) => {
255
+ var s = Ee();
256
+ T(s, (e, t, n) => ({
257
+ class: "sv-listbox__opt",
258
+ ...e,
259
+ [z]: t,
260
+ [S]: n
261
+ }), [
262
+ () => H.optionProps(n()),
263
+ () => ({
264
+ "is-selected": de(t()),
265
+ "is-active": H.isActive(n()),
266
+ "is-disabled": t().disabled
267
+ }),
268
+ () => ({
269
+ height: `${a() ?? W(t())}px`,
270
+ transform: o() == null ? void 0 : `translateY(${o()}px)`
271
+ })
272
+ ], void 0, void 0, "svelte-1qscmce");
273
+ var c = w(s);
274
+ r(c, t), M(s), i(e, s);
275
+ }, u = N(t, "value", 3, null), _ = N(t, "multiple", 3, !1), x = N(t, "checkbox", 3, !1), E = N(t, "block", 3, !1), A = N(t, "disabled", 3, !1), ee = N(t, "size", 3, "md"), I = N(t, "rows", 3, 7), ie = N(t, "virtual", 3, !1), V = N(t, "rowHeight", 3, 32), ae = N(t, "groupHeaderHeight", 3, 28), oe = N(t, "invalid", 3, !1), se = N(t, "required", 3, !1), ce = pe("sv-lb"), le = L(() => t.id ?? ce), ue = L(() => K(t.options)), H = be({
276
+ options: () => n(ue),
277
+ value: () => u(),
278
+ onChange: (e) => t.onChange?.(e),
279
+ multiple: () => _(),
280
+ disabled: () => A(),
281
+ ariaLabel: () => t.ariaLabel,
282
+ id: () => n(le),
283
+ invalid: () => oe(),
284
+ required: () => se(),
285
+ error: () => t.error,
286
+ hint: () => t.hint
287
+ }), de = (e) => H.isSelected(e.value), U = L(() => typeof V() == "number" ? V() : 32), W = (e) => typeof V() == "function" ? V()(e, e.index) : V(), he = L(ie), ge = b(null), G = b(0), q = L(() => _e(n(ue), {
288
+ rowHeight: V(),
289
+ groupHeaderHeight: ae()
290
+ })), ye = L(() => !n(q).hasGroups && typeof V() == "number"), J = L(() => n(ye) ? n(U) : (e) => n(q).sizeAt(e)), Y = L(() => n(G) > 0 ? n(G) : Math.max(1, I() * n(U))), Z = fe(ne(() => ({
291
+ count: n(q).entries.length,
292
+ estimateSize: n(J),
293
+ overscan: 6,
294
+ viewportHeight: n(Y)
295
+ })));
296
+ h(() => {
297
+ let e = n(q).entries.length, t = n(J);
298
+ ne(() => Z.setOptions({
299
+ count: e,
300
+ estimateSize: t
301
+ }));
302
+ }), h(() => {
303
+ let e = n(Y);
304
+ ne(() => Z.setViewportHeight(e));
305
+ });
306
+ let Fe = L(() => (Z.version, Z.getVirtualItems())), Ie = L(() => (Z.version, Z.getTotalSize())), Q = xe({
307
+ virtualizer: Z,
308
+ totalSize: () => n(Ie),
309
+ viewport: () => n(Y),
310
+ lineStep: () => n(U)
311
+ });
312
+ h(() => {
313
+ let e = H.activeIndex;
314
+ if (n(he)) {
315
+ let t = n(q).optionFlatIndex[e];
316
+ if (t == null) return;
317
+ ne(() => Q.ensureIndexVisible(t));
318
+ } else queueMicrotask(() => n(ge)?.querySelector(`[data-idx="${e}"]`)?.scrollIntoView({ block: "nearest" }));
319
+ }), me(e, {
320
+ get id() {
321
+ return n(le);
322
+ },
323
+ get label() {
324
+ return t.label;
325
+ },
326
+ get hint() {
327
+ return t.hint;
328
+ },
329
+ get error() {
330
+ return t.error;
331
+ },
332
+ get required() {
333
+ return se();
334
+ },
335
+ get dir() {
336
+ return t.dir;
337
+ },
338
+ get block() {
339
+ return E();
340
+ },
341
+ children: (e, r) => {
342
+ var o = Ne(), u = R(o);
343
+ T(u, (e) => ({
344
+ class: `sv-listbox sv-listbox--${ee() ?? ""}`,
345
+ onwheel: n(he) ? Q.onWheel : void 0,
346
+ ...e,
347
+ [z]: {
348
+ "is-invalid": oe(),
349
+ "is-virtual": n(he),
350
+ "is-checkbox": x(),
351
+ "is-block": E()
352
+ },
353
+ [S]: {
354
+ "--sv-rows": I(),
355
+ "--sv-row-h": `${n(U)}px`
356
+ }
357
+ }), [() => H.rootProps()], void 0, void 0, "svelte-1qscmce");
358
+ var f = w(u), h = (e) => {
359
+ var t = ke(), r = R(t);
360
+ s(r, 21, () => n(Fe), (e) => e.key, (e, t) => {
361
+ let r = L(() => n(q).entries[n(t).index]);
362
+ var o = a(), s = R(o), u = (e) => {
363
+ var a = De();
364
+ let o;
365
+ var s = w(a, !0);
366
+ M(a), g(() => {
367
+ o = B(a, "", o, {
368
+ height: `${n(t).size}px`,
369
+ transform: `translateY(${n(t).start - Q.scrollOffset}px)`
370
+ }), c(s, n(r).label);
371
+ }), i(e, a);
372
+ }, d = (e) => {
373
+ l(e, () => n(r).opt, () => n(r).opt.index, () => n(t).size, () => n(t).start - Q.scrollOffset);
374
+ };
375
+ k(s, (e) => {
376
+ n(r)?.type === "group" ? e(u) : n(r) && e(d, 1);
377
+ }), i(e, o);
378
+ }), M(r);
379
+ var o = P(r, 2), u = (e) => {
380
+ var t = Oe(), n = w(t);
381
+ let r, a;
382
+ M(t), g(() => {
383
+ r = d(n, 1, "sv-listbox__thumb svelte-1qscmce", null, r, { "is-dragging": Q.dragging }), a = B(n, "", a, {
384
+ height: `${Q.thumbH}px`,
385
+ transform: `translateY(${Q.thumbTop}px)`
386
+ });
387
+ }), p("pointerdown", t, function(...e) {
388
+ Q.onTrackDown?.apply(this, e);
389
+ }), p("pointerdown", n, function(...e) {
390
+ Q.onThumbDown?.apply(this, e);
391
+ }), p("pointermove", n, function(...e) {
392
+ Q.onThumbMove?.apply(this, e);
393
+ }), p("pointerup", n, function(...e) {
394
+ Q.onThumbUp?.apply(this, e);
395
+ }), m("pointercancel", n, function(...e) {
396
+ Q.onThumbUp?.apply(this, e);
397
+ }), i(e, t);
398
+ };
399
+ k(o, (e) => {
400
+ Q.maxOffset > 0 && e(u);
401
+ }), p("pointerdown", r, function(...e) {
402
+ Q.onContentDown?.apply(this, e);
403
+ }), p("pointermove", r, function(...e) {
404
+ Q.onContentMove?.apply(this, e);
405
+ }), p("pointerup", r, function(...e) {
406
+ Q.onContentUp?.apply(this, e);
407
+ }), m("pointercancel", r, function(...e) {
408
+ Q.onContentUp?.apply(this, e);
409
+ }), te(r, "clientHeight", (e) => O(G, e)), i(e, t);
410
+ }, _ = (e) => {
411
+ var t = a(), r = R(t);
412
+ s(r, 17, () => ve(n(ue)), (e) => e.group ?? " ", (e, t) => {
413
+ var r = je(), a = R(r), o = (e) => {
414
+ var r = Ae(), a = w(r, !0);
415
+ M(r), g(() => c(a, n(t).group)), i(e, r);
416
+ };
417
+ k(a, (e) => {
418
+ n(t).group != null && e(o);
419
+ });
420
+ var u = P(a, 2);
421
+ s(u, 17, () => n(t).options, (e) => e.index, (e, t) => {
422
+ l(e, () => n(t), () => n(t).index);
423
+ }), i(e, r);
424
+ }), i(e, t);
425
+ };
426
+ k(f, (e) => {
427
+ n(he) ? e(h) : e(_, -1);
428
+ }), M(u), y(u, (e) => O(ge, e), () => n(ge));
429
+ var b = P(u, 2), C = (e) => {
430
+ var n = a(), r = R(n);
431
+ s(r, 16, () => H.selectedValues, (e) => e, (e, n) => {
432
+ var r = Me();
433
+ F(r), g(() => {
434
+ j(r, "name", t.name), v(r, n);
435
+ }), i(e, r);
436
+ }), i(e, n);
437
+ };
438
+ k(b, (e) => {
439
+ t.name && e(C);
440
+ }), i(e, o);
441
+ },
442
+ $$slots: { default: !0 }
443
+ }), re();
444
+ }
445
+ r([
446
+ "pointerdown",
447
+ "pointermove",
448
+ "pointerup"
449
+ ]);
450
+ //#endregion
451
+ //#region ../grid/dist/menu-actions.js
452
+ function Fe(e) {
453
+ function t(t) {
454
+ t.stopPropagation();
455
+ let n = t.currentTarget, r = (n.closest(".sv-grid-menu") ?? n).getBoundingClientRect(), i = r.right + 4;
456
+ e.chooseColumnsPos = {
457
+ x: i + 240 + 8 > window.innerWidth ? ce(r.left - 240 - 4, 240) : ce(i, 240),
458
+ y: r.top
459
+ };
460
+ }
461
+ function n(t, n) {
462
+ e.grid.store.setState((e) => ({
463
+ ...e,
464
+ sorting: [{
465
+ id: t,
466
+ desc: n
467
+ }]
468
+ })), e.closeMenus();
469
+ }
470
+ function r(t) {
471
+ e.grid.store.setState((e) => ({
472
+ ...e,
473
+ sorting: (e.sorting ?? []).filter((e) => e.id !== t)
474
+ })), e.closeMenus();
475
+ }
476
+ function i(t) {
477
+ let n = e.grid.getState().grouping ?? [];
478
+ if (n.includes(t)) {
479
+ e.closeMenus();
480
+ return;
481
+ }
482
+ e.grid.setGrouping([...n, t]), e.closeMenus();
483
+ }
484
+ function a(t) {
485
+ let n = e.grid.getState().grouping ?? [];
486
+ e.grid.setGrouping(n.filter((e) => e !== t)), e.closeMenus();
487
+ }
488
+ function o(t, n) {
489
+ let r = e.valueFilters[t];
490
+ return !r || r.has(n);
491
+ }
492
+ function s(t, n) {
493
+ let r = e.columnMenuFacetValues, i = new Set(e.valueFilters[t] ?? r);
494
+ if (i.has(n) ? i.delete(n) : i.add(n), i.size === r.length) {
495
+ let n = { ...e.valueFilters };
496
+ delete n[t], e.valueFilters = n;
497
+ } else e.valueFilters = {
498
+ ...e.valueFilters,
499
+ [t]: i
500
+ };
501
+ }
502
+ function c(t, n) {
503
+ if (n.size >= e.columnMenuFacetValues.length) {
504
+ let n = { ...e.valueFilters };
505
+ delete n[t], e.valueFilters = n;
506
+ return;
507
+ }
508
+ e.valueFilters = {
509
+ ...e.valueFilters,
510
+ [t]: new Set(n)
511
+ };
512
+ }
513
+ function l(t) {
514
+ let n = e.valueFilters[t], r = e.columnMenuVisibleFacets, i = r.length !== e.columnMenuFacetValues.length;
515
+ return n ? i ? r.every((e) => n.has(e)) : n.size >= e.columnMenuFacetValues.length : !0;
516
+ }
517
+ function u(t) {
518
+ let n = e.columnMenuVisibleFacets, r = e.columnMenuFacetValues, i = n.length !== r.length, a = l(t);
519
+ if (!i) {
520
+ if (a) e.valueFilters = {
521
+ ...e.valueFilters,
522
+ [t]: /* @__PURE__ */ new Set()
523
+ };
524
+ else {
525
+ let n = { ...e.valueFilters };
526
+ delete n[t], e.valueFilters = n;
527
+ }
528
+ return;
529
+ }
530
+ let o = e.valueFilters[t] ? new Set(e.valueFilters[t]) : new Set(r);
531
+ for (let e of n) a ? o.delete(e) : o.add(e);
532
+ e.valueFilters = {
533
+ ...e.valueFilters,
534
+ [t]: o
535
+ };
536
+ }
537
+ function d(t, n) {
538
+ let r = e.internalData.slice(), i = t.row ? r.indexOf(t.row) : -1, a = i < 0 ? r.length : i + n;
539
+ r.splice(a, 0, {}), e.internalData = r;
540
+ }
541
+ function f(t) {
542
+ t.row && (e.internalData = e.internalData.filter((e) => e !== t.row));
543
+ }
544
+ function p(t) {
545
+ e.internalColumns = e.internalColumns.filter((e) => (e.id ?? e.field) !== t.columnId);
546
+ }
547
+ let m = {
548
+ copy: {
549
+ label: "Copy",
550
+ msg: "menuCopy",
551
+ run: () => e.copySelectionToClipboard()
552
+ },
553
+ cut: {
554
+ label: "Cut",
555
+ msg: "menuCut",
556
+ run: () => e.cutSelectionToClipboard()
557
+ },
558
+ paste: {
559
+ label: "Paste",
560
+ msg: "menuPaste",
561
+ run: () => void e.pasteFromClipboard()
562
+ },
563
+ clear: {
564
+ label: "Clear",
565
+ msg: "menuClear",
566
+ run: () => e.clearSelectedCells()
567
+ },
568
+ row_above: {
569
+ label: "Insert row above",
570
+ msg: "menuInsertRowAbove",
571
+ run: (e) => d(e, 0)
572
+ },
573
+ row_below: {
574
+ label: "Insert row below",
575
+ msg: "menuInsertRowBelow",
576
+ run: (e) => d(e, 1)
577
+ },
578
+ remove_row: {
579
+ label: "Remove row",
580
+ msg: "menuRemoveRow",
581
+ run: f
582
+ },
583
+ remove_col: {
584
+ label: "Remove column",
585
+ msg: "menuRemoveColumn",
586
+ run: p
587
+ },
588
+ comment: {
589
+ label: "Edit comment",
590
+ msg: "menuEditComment",
591
+ run: (e) => _(e)
592
+ },
593
+ chart: {
594
+ label: "Chart selected range",
595
+ msg: "chartRange",
596
+ run: () => {
597
+ e.chartPanelOpen = !0;
598
+ }
599
+ }
600
+ }, h = [
601
+ "copy",
602
+ "cut",
603
+ "paste",
604
+ "clear",
605
+ "separator",
606
+ "row_above",
607
+ "row_below",
608
+ "remove_row",
609
+ "separator",
610
+ "remove_col"
611
+ ];
612
+ function g() {
613
+ e.contextMenuFor = null;
614
+ }
615
+ function _(t) {
616
+ e.commentDraft = e.noteOverrides?.[t.rowId]?.[t.columnId] ?? e.props.notes?.[t.rowId]?.[t.columnId] ?? "", e.commentEditFor = {
617
+ rowId: t.rowId,
618
+ columnId: t.columnId,
619
+ x: e.contextMenuPos.x,
620
+ y: e.contextMenuPos.y
621
+ }, e.contextMenuFor = null;
622
+ }
623
+ function v(t, n, r) {
624
+ let i = { ...e.noteOverrides };
625
+ i[t] = {
626
+ ...i[t] ?? {},
627
+ [n]: r
628
+ }, e.noteOverrides = i, e.props.onNoteChange?.({
629
+ rowId: t,
630
+ columnId: n,
631
+ note: r
632
+ });
633
+ }
634
+ function y() {
635
+ let t = e.commentEditFor;
636
+ t && (v(t.rowId, t.columnId, e.commentDraft), e.commentEditFor = null);
637
+ }
638
+ function b() {
639
+ let t = e.commentEditFor;
640
+ t && (v(t.rowId, t.columnId, ""), e.commentEditFor = null);
641
+ }
642
+ function x() {
643
+ e.commentEditFor = null;
644
+ }
645
+ function S() {
646
+ let t = e.contextMenuFor;
647
+ if (!t) return [];
648
+ let n = e.props.contextMenu, r = e.messages, i = Array.isArray(n) ? n : [
649
+ ...h,
650
+ ...e.chartingEnabled ? ["separator", "chart"] : [],
651
+ ...e.props.editableComments ? ["separator", "comment"] : []
652
+ ], a = [];
653
+ for (let n of i) {
654
+ if (n === "separator") {
655
+ a.push({
656
+ key: "sep" + a.length,
657
+ label: "",
658
+ separator: !0
659
+ });
660
+ continue;
661
+ }
662
+ if (typeof n == "string") {
663
+ if (n === "chart" && !e.chartingEnabled) continue;
664
+ let i = m[n];
665
+ if (!i) continue;
666
+ let o = i.msg && r?.[i.msg] || i.label;
667
+ a.push({
668
+ key: n,
669
+ label: o,
670
+ run: () => i.run(t)
671
+ });
672
+ continue;
673
+ }
674
+ if (n.hidden?.(t)) continue;
675
+ let i = m[n.key], o = i ? i.msg && r?.[i.msg] || i.label : n.key;
676
+ a.push({
677
+ key: n.key,
678
+ label: n.label ?? o,
679
+ icon: n.icon,
680
+ disabled: n.disabled?.(t) ?? !1,
681
+ run: n.action ? () => n.action(t) : i ? () => i.run(t) : void 0
682
+ });
683
+ }
684
+ return a.filter((e, t, n) => !e.separator || t > 0 && t < n.length - 1 && !n[t - 1]?.separator);
685
+ }
686
+ return {
687
+ openChooseColumns: t,
688
+ sortColumnFromMenu: n,
689
+ clearColumnSort: r,
690
+ groupByColumnFromMenu: i,
691
+ clearGroupingFromMenu: a,
692
+ isFacetChecked: o,
693
+ toggleFacetValue: s,
694
+ setFacetSelection: c,
695
+ isAllFacetsChecked: l,
696
+ toggleAllFacets: u,
697
+ closeContextMenu: g,
698
+ contextMenuItems: S,
699
+ saveComment: y,
700
+ removeComment: b,
701
+ closeCommentEditor: x
702
+ };
703
+ }
704
+ //#endregion
705
+ //#region ../grid/dist/GridMenus.svelte
706
+ var Ie = u("<option> </option>"), Q = u("<input class=\"sv-grid-menu-condition-value\" placeholder=\"To\"/>"), Le = u("<input class=\"sv-grid-menu-condition-value\"/> <!>", 1), Re = u("<option> </option>"), ze = u("<input class=\"sv-grid-menu-condition-value\" placeholder=\"To\"/>"), Be = u("<input class=\"sv-grid-menu-condition-value\"/> <!>", 1), Ve = u("<div class=\"sv-grid-menu-join\" role=\"radiogroup\" aria-label=\"Combine conditions\"><button type=\"button\">AND</button> <button type=\"button\">OR</button> <button type=\"button\" class=\"sv-grid-menu-join-x\" title=\"Remove second condition\" aria-label=\"Remove second condition\"><!></button></div> <select class=\"sv-grid-menu-operator-select\" aria-label=\"Second filter condition\"></select> <!>", 1), He = u("<button type=\"button\" class=\"sv-grid-menu-add-cond\">+ Add condition</button>"), Ue = u("<!> <!>", 1), We = u("<span class=\"sv-grid-menu-head-note\">and the condition above</span>"), Ge = u("<span class=\"sv-grid-menu-head-note\"> </span>"), Ke = u("<div class=\"sv-grid-facet-empty\">No values</div>"), qe = u("<div class=\"sv-grid-facet-note\"> </div>"), Je = u("<div class=\"sv-grid-menu-filter\"><div class=\"sv-grid-menu-filter-head\"><span class=\"sv-grid-header-icon\"><!></span> Filter\n condition</div> <select class=\"sv-grid-menu-operator-select\" aria-label=\"Filter condition\"></select> <!> <div class=\"sv-grid-menu-sep\"></div> <div class=\"sv-grid-menu-filter-head\">Values <!></div> <span class=\"sv-grid-menu-search-wrap\"><!> <input class=\"sv-grid-menu-search\" placeholder=\"Search values...\"/></span> <label class=\"sv-grid-facet sv-grid-facet-all\"><input type=\"checkbox\"/> <span class=\"sv-grid-facet-label\"> </span></label> <!> <!> <div class=\"sv-grid-menu-actions\"><button type=\"button\" class=\"sv-grid-menu-btn\">Clear filter</button> <button type=\"button\" class=\"sv-grid-menu-btn sv-grid-menu-btn-primary\">Done</button></div></div>"), Ye = u("<div role=\"tooltip\"> </div>"), Xe = u("<div class=\"sv-grid-menu-backdrop\" role=\"presentation\"></div>"), Ze = u("<button type=\"button\" role=\"tab\">Filter</button>"), Qe = u("<div class=\"sv-grid-menu-tabs\" role=\"tablist\"><button type=\"button\" role=\"tab\">General</button> <!> <button type=\"button\" role=\"tab\">Columns</button></div>"), $e = u("<div class=\"sv-grid-menu-filter-head\">Visible columns</div> <!>", 1), et = u("<button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> </button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> </button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Remove sort</button>", 1), tt = u("<div class=\"sv-grid-menu-sep\"></div> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Pin to left</button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Pin to right</button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Unpin column</button>", 1), nt = u("<div class=\"sv-grid-menu-sep\"></div>"), rt = ae("<svg class=\"sv-grid-menu-icon-own\" viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" aria-hidden=\"true\"><path fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></svg>"), it = u("<!> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> </button>", 1), at = u("<div class=\"sv-grid-menu-sep\"></div> <!>", 1), ot = u("<button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Autosize\n this column</button>"), st = u("<div class=\"sv-grid-menu-sep\"></div> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Group\n by this column</button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Remove grouping</button>", 1), ct = u("<button type=\"button\" role=\"menuitem\" aria-haspopup=\"menu\"><span class=\"sv-grid-header-icon\"><!></span> Choose columns <span class=\"sv-grid-header-icon sv-grid-menu-item-chevron\"><!></span></button>"), lt = u("<!> <!> <!> <div class=\"sv-grid-menu-sep\"></div> <!> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Autosize\n all columns</button> <!> <div class=\"sv-grid-menu-sep\"></div> <!> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Reset columns</button>", 1), ut = u("<div class=\"sv-grid-menu sv-grid-column-menu\" role=\"menu\"><!> <!></div>"), dt = u("<div class=\"sv-grid-menu sv-grid-filter-menu\" role=\"menu\" tabindex=\"-1\"><!></div>"), ft = u("<div class=\"sv-grid-menu sv-grid-choose-columns-menu\" role=\"menu\"><div class=\"sv-grid-menu-filter-head\">Visible columns</div> <!></div>"), pt = u("<button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitemradio\"><span class=\"sv-grid-header-icon\"><!></span> </button>"), mt = u("<div class=\"sv-grid-menu sv-grid-operator-menu\" role=\"menu\"></div>"), ht = u("<div class=\"sv-grid-facet-empty\">No values</div>"), gt = u("<div class=\"sv-grid-menu sv-grid-in-suggest\"><!></div>"), _t = u("<div class=\"sv-grid-menu-sep\"></div>"), vt = ae("<path></path>"), yt = ae("<svg class=\"sv-grid-menu-icon-own\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" focusable=\"false\"></svg>"), bt = u("<span class=\"sv-grid-menu-icon\" aria-hidden=\"true\"><!></span>"), xt = u("<button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><!><span class=\"sv-grid-menu-label\"> </span></button>"), St = u("<div class=\"sv-grid-menu-backdrop\" role=\"presentation\"></div> <div class=\"sv-grid-menu sv-grid-context-menu\" role=\"menu\"></div>", 1), Ct = u("<div class=\"sv-grid-menu-backdrop\" role=\"presentation\"></div> <div class=\"sv-grid-menu sv-grid-comment-editor\" role=\"dialog\" aria-label=\"Edit comment\"><textarea class=\"sv-grid-comment-textarea\" rows=\"3\" placeholder=\"Add a comment…\"></textarea> <div class=\"sv-grid-comment-actions\"><button type=\"button\" class=\"sv-grid-comment-remove\">Remove</button> <span class=\"sv-grid-comment-spacer\"></span> <button type=\"button\" class=\"sv-grid-comment-cancel\">Cancel</button> <button type=\"button\" class=\"sv-grid-comment-save\">Save</button></div></div>", 1), wt = u("<!> <!> <!> <!> <!> <!> <!> <!> <!>", 1);
707
+ function Tt(r, u) {
708
+ C(u, !0);
709
+ let f = (e, r = D) => {
710
+ let l = L(() => n(Te).find((e) => e.id === r())), f = L(() => n(Tt)(n(l))), h = L(() => n(K)[r()]?.operator ?? n(Et)(n(l))), _ = L(() => se(n(l)?.columnDef.editorType ?? "text")), b = L(() => ue(n(l)?.columnDef) && n(h) !== "isBlank" && n(h) !== "isNotBlank" && n(h) !== "regex" && n(h) !== "in" && n(h) !== "notIn"), S = L(() => n(Lt).length !== n(It).length), C = L(() => n(h) === "isBlank" || n(h) === "isNotBlank" || (n(K)[r()]?.value ?? "").trim().length > 0), T = L(() => n(Kt).size), O = L(() => n(It).length);
711
+ var A = Je(), N = w(A), te = w(N), ne = w(te);
712
+ o(ne, () => u.icon, () => "filter"), M(te), I(), M(N);
713
+ var z = P(N, 2);
714
+ s(z, 21, () => n(f), (e) => e.value, (e, t) => {
715
+ var r = Ie(), a = w(r, !0);
716
+ M(r);
717
+ var o = {};
718
+ g((e) => {
719
+ c(a, e), o !== (o = n(t).value) && (r.value = (r.__value = n(t).value) ?? "");
720
+ }, [() => n(Dt)(n(t), n(l))]), i(e, r);
721
+ }), M(z);
722
+ var re;
723
+ V(z);
724
+ var ie = P(z, 2), B = (e) => {
725
+ let y = L(() => n(K)[r()]);
726
+ var S = Ue(), C = R(S), T = (e) => {
727
+ var o = a(), s = R(o), c = (e) => {
728
+ var o = a(), s = R(o), c = (e) => {
729
+ let o = L(() => n(Bt)), s = L(() => le(n(K)[r()]?.value)), c = L(() => le(n(K)[r()]?.valueTo));
730
+ var l = a(), u = R(l);
731
+ {
732
+ let e = L(() => n(s) && n(c) ? [n(s), n(c)] : null);
733
+ t(u, () => n(o), (t, i) => {
734
+ i(t, {
735
+ get value() {
736
+ return n(e);
737
+ },
738
+ formatString: "yyyy-MM-dd",
739
+ block: !0,
740
+ placeholder: "Pick a range...",
741
+ onChange: (e) => {
742
+ n(Ne)(r(), e ? oe(e[0]) : ""), n(Pe)(r(), e ? oe(e[1]) : "");
743
+ }
744
+ });
745
+ });
746
+ }
747
+ i(e, l);
748
+ };
749
+ k(s, (e) => {
750
+ n(Bt) && e(c);
751
+ }), i(e, o);
752
+ }, l = (e) => {
753
+ let o = L(() => n(zt));
754
+ var s = a(), c = R(s);
755
+ {
756
+ let e = L(() => (n(K)[r()]?.value ?? "") || null);
757
+ t(c, () => n(o), (t, i) => {
758
+ i(t, {
759
+ get value() {
760
+ return n(e);
761
+ },
762
+ formatString: "yyyy-MM-dd",
763
+ dropDownDisplayMode: "calendar",
764
+ block: !0,
765
+ nullable: !0,
766
+ placeholder: "Filter value...",
767
+ onChange: (e) => n(Ne)(r(), oe(e))
768
+ });
769
+ });
770
+ }
771
+ i(e, s);
772
+ };
773
+ k(s, (e) => {
774
+ n(h) === "between" ? e(c) : n(zt) && e(l, 1);
775
+ }), i(e, o);
776
+ }, E = (e) => {
777
+ let t = L(() => n(h) === "in" || n(h) === "notIn");
778
+ var a = Le(), o = R(a);
779
+ F(o);
780
+ var s = P(o, 2), c = (e) => {
781
+ var t = Q();
782
+ F(t), g(() => {
783
+ j(t, "type", n(_)), v(t, n(K)[r()]?.valueTo ?? "");
784
+ }), p("input", t, (e) => n(Pe)(r(), e.currentTarget.value)), i(e, t);
785
+ };
786
+ k(s, (e) => {
787
+ n(h) === "between" && e(c);
788
+ }), g(() => {
789
+ j(o, "type", n(h) === "regex" ? "text" : n(_)), v(o, n(K)[r()]?.value ?? ""), j(o, "placeholder", n(h) === "between" ? "From" : n(t) ? "value, value..." : n(h) === "regex" ? "Pattern..." : "Filter value...");
790
+ }), m("focus", o, (e) => {
791
+ Ut(r()) && Qt(e.currentTarget, r());
792
+ }), m("blur", o, () => {
793
+ Ut(r()) && n(Xt)();
794
+ }), p("input", o, (e) => {
795
+ let i = e.currentTarget;
796
+ n(Ne)(r(), i.value), n(t) && $t(i, r());
797
+ }), i(e, a);
798
+ };
799
+ k(C, (e) => {
800
+ n(b) ? e(T) : e(E, -1);
801
+ });
802
+ var D = P(C, 2), O = (e) => {
803
+ let t = L(() => n(y).operator2 ?? n(Et)(n(l)));
804
+ var a = Ve(), m = R(a), h = w(m);
805
+ let b;
806
+ var S = P(h, 2);
807
+ let C;
808
+ var T = P(S, 2), E = w(T);
809
+ o(E, () => u.icon, () => "remove"), M(T), M(m);
810
+ var D = P(m, 2);
811
+ s(D, 21, () => n(f), (e) => e.value, (e, t) => {
812
+ var r = Re(), a = w(r, !0);
813
+ M(r);
814
+ var o = {};
815
+ g((e) => {
816
+ c(a, e), o !== (o = n(t).value) && (r.value = (r.__value = n(t).value) ?? "");
817
+ }, [() => n(Dt)(n(t), n(l))]), i(e, r);
818
+ }), M(D);
819
+ var O;
820
+ V(D);
821
+ var A = P(D, 2), ee = (e) => {
822
+ var a = Be(), o = R(a);
823
+ F(o);
824
+ var s = P(o, 2), c = (e) => {
825
+ var t = ze();
826
+ F(t), g(() => {
827
+ j(t, "type", n(_)), v(t, n(y).valueTo2 ?? "");
828
+ }), p("input", t, (e) => jt(r(), { valueTo2: e.currentTarget.value })), i(e, t);
829
+ };
830
+ k(s, (e) => {
831
+ n(t) === "between" && e(c);
832
+ }), g(() => {
833
+ j(o, "type", n(_)), v(o, n(y).value2 ?? ""), j(o, "placeholder", n(t) === "between" ? "From" : "Filter value...");
834
+ }), p("input", o, (e) => jt(r(), { value2: e.currentTarget.value })), i(e, a);
835
+ };
836
+ k(A, (e) => {
837
+ n(t) !== "isBlank" && e(ee);
838
+ }), g(() => {
839
+ b = d(h, 1, "", null, b, { "is-on": (n(y).join ?? "AND") === "AND" }), C = d(S, 1, "", null, C, { "is-on": n(y).join === "OR" }), O !== (O = n(t)) && (D.value = (D.__value = n(t)) ?? "", x(D, n(t)));
840
+ }), p("click", h, () => jt(r(), { join: "AND" })), p("click", S, () => jt(r(), { join: "OR" })), p("click", T, () => jt(r(), {
841
+ operator2: void 0,
842
+ value2: void 0,
843
+ valueTo2: void 0,
844
+ join: void 0
845
+ })), p("change", D, (e) => jt(r(), { operator2: e.currentTarget.value })), i(e, a);
846
+ }, A = (e) => {
847
+ var t = He();
848
+ p("click", t, () => jt(r(), {
849
+ operator2: n(Et)(n(l)),
850
+ value2: "",
851
+ join: "AND"
852
+ })), i(e, t);
853
+ };
854
+ k(D, (e) => {
855
+ n(y)?.operator2 ? e(O) : e(A, -1);
856
+ }), i(e, S);
857
+ };
858
+ k(ie, (e) => {
859
+ n(h) !== "isBlank" && n(h) !== "isNotBlank" && e(B);
860
+ });
861
+ var H = P(ie, 4), de = P(w(H)), U = (e) => {
862
+ var t = We();
863
+ i(e, t);
864
+ }, pe = (e) => {
865
+ var t = Ge(), r = w(t);
866
+ M(t), g(() => c(r, `${n(T) ?? ""} of ${n(O) ?? ""}`)), i(e, t);
867
+ };
868
+ k(de, (e) => {
869
+ n(C) ? e(U) : n(T) < n(O) && e(pe, 1);
870
+ }), M(H);
871
+ var W = P(H, 2), me = w(W);
872
+ o(me, () => u.icon, () => "search");
873
+ var he = P(me, 2);
874
+ F(he), M(W);
875
+ var ge = P(W, 2), G = w(ge);
876
+ F(G);
877
+ var _e = P(G, 2), ve = w(_e, !0);
878
+ M(_e), M(ge);
879
+ var q = P(ge, 2), ye = (e) => {
880
+ {
881
+ let t = L(() => n(Gt).length > Zt);
882
+ Z(e, {
883
+ block: !0,
884
+ checkbox: !0,
885
+ multiple: !0,
886
+ get virtual() {
887
+ return n(t);
888
+ },
889
+ get rows() {
890
+ return n(Rt);
891
+ },
892
+ rowHeight: 24,
893
+ size: "sm",
894
+ ariaLabel: "Filter values",
895
+ get options() {
896
+ return n(Gt);
897
+ },
898
+ get value() {
899
+ return n(Kt);
900
+ },
901
+ onChange: (e) => ae(r(), e)
902
+ });
903
+ }
904
+ }, J = (e) => {
905
+ var t = Ke();
906
+ i(e, t);
907
+ };
908
+ k(q, (e) => {
909
+ n(Gt).length ? e(ye) : e(J, -1);
910
+ });
911
+ var Y = P(q, 2), be = (e) => {
912
+ var t = qe(), r = w(t);
913
+ M(t), g(() => c(r, `Showing ${n(Lt).length ?? ""} of ${n(It).length ?? ""}`)), i(e, t);
914
+ };
915
+ k(Y, (e) => {
916
+ n(It).length > n(Lt).length && e(be);
917
+ });
918
+ var xe = P(Y, 2), X = w(xe), Se = P(X, 2);
919
+ M(xe), M(A), g((e, t) => {
920
+ re !== (re = n(h)) && (z.value = (z.__value = n(h)) ?? "", x(z, n(h))), E(G, e), c(ve, n(S) ? "(Select all results)" : "(Select all)"), X.disabled = t;
921
+ }, [() => ce(r()), () => !n(Mt)(r())]), p("change", z, (e) => n(Me)(r(), e.currentTarget.value)), ee(he, () => y().columnMenuSearch, (e) => y().columnMenuSearch = e), p("change", G, () => fe(r())), p("click", X, () => n(rn)(r())), p("click", Se, function(...e) {
922
+ n($)?.apply(this, e);
923
+ }), i(e, A);
924
+ }, y = N(u, "ctrl", 7), { openChooseColumns: S, sortColumnFromMenu: T, clearColumnSort: te, groupByColumnFromMenu: ne, clearGroupingFromMenu: z, setFacetSelection: ae, isAllFacetsChecked: ce, toggleAllFacets: fe, contextMenuItems: pe, closeContextMenu: W, saveComment: me, removeComment: ge, closeCommentEditor: G } = Fe(y()), _e = L(() => y().groupingControlsEnabled), K = L(() => y().filterMenuValues), ve = L(() => y().tooltip), q = L(() => y().columnMenuFor), ye = L(() => y().columnMenuPos), J = L(() => y().filterMenuFor), Y = L(() => y().filterMenuPos), be = L(() => y().operatorMenuFor), xe = L(() => y().operatorMenuPos), X = L(() => y().chooseColumnsPos), Se = L(() => y().showColumnFiltersEffective), Ce = L(() => y().props.columnMenuTabs === !0), we = L(() => y().grid), Te = L(() => y().allColumns), Ee = L(() => y().isColumnPinned), De = L(() => y().pinColumnLeft), Oe = L(() => y().pinColumnRight), ke = L(() => y().unpinColumn), Ae = L(() => y().sortDirectionByColumn), je = L(() => y().groupingColumns), Me = L(() => y().updateFilterOperator), Ne = L(() => y().updateFilterMenuValue), Pe = L(() => y().updateFilterMenuValueTo), Tt = L(() => y().operatorsForColumn), Et = L(() => y().defaultOperatorFor), Dt = L(() => y().operatorLabelFor), Ot = L(() => y().filterRowValues), kt = L(() => y().inSuggestFor), At = L(() => y().inSuggestPos);
925
+ function jt(e, t) {
926
+ let r = n(Te).find((t) => t.id === e), i = y().filterMenuValues[e] ?? {
927
+ operator: n(Et)(r),
928
+ value: ""
929
+ };
930
+ y().filterMenuValues = {
931
+ ...y().filterMenuValues,
932
+ [e]: {
933
+ ...i,
934
+ ...t
935
+ }
936
+ };
937
+ }
938
+ let Mt = L(() => y().isColumnFiltered), $ = L(() => y().closeMenus);
939
+ h(() => {
940
+ if (!(n(q) || n(J) || n(be) || n(X) || n(an) || n(sn))) return;
941
+ let e = () => {
942
+ n($)(), W(), y().commentEditFor && me();
943
+ }, t = he(() => Array.from(document.querySelectorAll(`.sv-grid-menu[data-svgrid-menu="${y().gridDomId}"]`)), e);
944
+ return window.addEventListener("resize", e), () => {
945
+ t(), window.removeEventListener("resize", e);
946
+ };
947
+ });
948
+ let Nt = L(() => y().autosizeColumn), Pt = L(() => y().autosizeAllColumns), Ft = L(() => y().resetColumns), It = L(() => y().columnMenuFacetValues), Lt = L(() => y().columnMenuVisibleFacets), Rt = L(function() {
949
+ if (typeof window > "u") return 7;
950
+ let e = (n(J) ? n(Y).y : n(ye).y) || 0, t = window.innerHeight - e - 320;
951
+ return Math.max(7, Math.min(16, Math.floor(t / 24)));
952
+ }), zt = b(null), Bt = b(null);
953
+ h(() => {
954
+ let e = n(J) ?? n(q);
955
+ if (!e) return;
956
+ let t = n(Te).find((t) => t.id === e);
957
+ ue(t?.columnDef) && (n(zt) || import("./SvDateTimePicker-D-vRnaMo.js").then((e) => O(zt, e.default, !0)), n(Bt) || import("./SvDateRangeInput-DR6m7bSM.js").then((e) => O(Bt, e.default, !0)));
958
+ });
959
+ function Vt(e, t) {
960
+ let n = () => {
961
+ let t = y().contextMenuPos, n = e.getBoundingClientRect();
962
+ if (!n.width && !n.height) return;
963
+ let r = Math.max(8, Math.min(t.x, window.innerWidth - n.width - 8)), i = Math.max(8, Math.min(t.y, window.innerHeight - n.height - 8));
964
+ (r !== t.x || i !== t.y) && (y().contextMenuPos = {
965
+ x: r,
966
+ y: i
967
+ });
968
+ };
969
+ return n(), { update: n };
970
+ }
971
+ function Ht(e) {
972
+ requestAnimationFrame(() => {
973
+ e.querySelector(".sv-grid-menu-condition-value, .sv-dtp__input, .sv-dri__input, .sv-grid-menu-search")?.focus({ preventScroll: !0 });
974
+ });
975
+ }
976
+ function Ut(e) {
977
+ let t = n(Te).find((t) => t.id === e), r = n(K)[e]?.operator ?? n(Et)(t);
978
+ return r === "in" || r === "notIn";
979
+ }
980
+ function Wt(e) {
981
+ if (e.key !== "Enter" || e.shiftKey) return;
982
+ let t = e.target;
983
+ t?.closest(".sv-listbox") || t?.tagName === "BUTTON" || (e.preventDefault(), n($)());
984
+ }
985
+ let Gt = L(() => y().columnMenuFacetOptions), Kt = L(() => y().columnMenuSelectedFacets), qt = L(() => y().setFilterTokens), Jt = L(() => y().inSuggestOptions), Yt = L(() => y().openInSuggest), Xt = L(() => y().closeInSuggest), Zt = 40;
986
+ function Qt(e, t) {
987
+ n(Yt)(e, t), y().inSuggestQuery = H(e.value);
988
+ }
989
+ function $t(e, t) {
990
+ y().inSuggestQuery = H(e.value), y().inSuggestFor !== t && n(Yt)(e, t);
991
+ }
992
+ function en(e) {
993
+ return e.map((e) => ({
994
+ value: e.id,
995
+ label: typeof e.columnDef.header == "string" ? e.columnDef.header : e.id
996
+ }));
997
+ }
998
+ function tn(e) {
999
+ let t = /* @__PURE__ */ new Set();
1000
+ for (let n of e) y().hiddenColumns[n.id] || t.add(n.id);
1001
+ return t;
1002
+ }
1003
+ function nn(e, t) {
1004
+ let n = { ...y().hiddenColumns };
1005
+ for (let r of e) t.has(r.id) ? delete n[r.id] : n[r.id] = !0;
1006
+ y().hiddenColumns = n;
1007
+ }
1008
+ let rn = L(() => y().clearColumnFilter), an = L(() => y().contextMenuFor), on = L(() => y().contextMenuPos), sn = L(() => y().commentEditFor);
1009
+ function cn(e) {
1010
+ n(an) && (e.key === "Escape" || e.key === "Esc") && (e.preventDefault(), e.stopPropagation(), W());
1011
+ }
1012
+ var ln = wt();
1013
+ m("keydown", e, cn);
1014
+ var un = R(ln), dn = (e) => {
1015
+ var t = Ye();
1016
+ let r;
1017
+ var a = w(t, !0);
1018
+ M(t), g(() => {
1019
+ r = d(t, 1, "sv-grid-tooltip", null, r, { "sv-grid-tooltip-above": !n(ve).below }), B(t, `left: ${n(ve).x}px; top: ${n(ve).y}px; ${n(ve).below ? "" : "transform: translateY(-100%);"}`), c(a, n(ve).text);
1020
+ }), i(e, t);
1021
+ };
1022
+ k(un, (e) => {
1023
+ n(ve) && e(dn);
1024
+ });
1025
+ var fn = P(un, 2), pn = (e) => {
1026
+ var t = Xe();
1027
+ p("click", t, function(...e) {
1028
+ n($)?.apply(this, e);
1029
+ }), i(e, t);
1030
+ };
1031
+ k(fn, (e) => {
1032
+ (n(q) || n(J) || n(be) || n(X)) && e(pn);
1033
+ });
1034
+ var mn = P(fn, 2), hn = (e) => {
1035
+ let t = L(() => n(q)), r = L(() => n(Te).find((e) => e.id === n(t))), a = L(() => n(r)?.getCanSort?.() ?? !1), l = L(() => n(r) ? U()?.sortLabels?.(n(r).columnDef) : null), m = L(() => !!U()?.lockColumn?.(y(), n(t))), h = L(() => n(r)?.columnDef.field != null && n(r)?.columnDef.filterable !== !1), _ = L(() => y().columnMenuTab);
1036
+ var v = ut(), b = w(v), x = (e) => {
1037
+ var t = Qe(), r = w(t);
1038
+ let a;
1039
+ var o = P(r, 2), s = (e) => {
1040
+ var t = Ze();
1041
+ let r;
1042
+ g(() => {
1043
+ r = d(t, 1, "sv-grid-menu-tab", null, r, { "is-active": n(_) === "filter" }), j(t, "aria-selected", n(_) === "filter");
1044
+ }), p("click", t, () => y().columnMenuTab = "filter"), i(e, t);
1045
+ };
1046
+ k(o, (e) => {
1047
+ n(h) && n(Se) && e(s);
1048
+ });
1049
+ var c = P(o, 2);
1050
+ let l;
1051
+ M(t), g(() => {
1052
+ a = d(r, 1, "sv-grid-menu-tab", null, a, { "is-active": n(_) === "general" }), j(r, "aria-selected", n(_) === "general"), l = d(c, 1, "sv-grid-menu-tab", null, l, { "is-active": n(_) === "columns" }), j(c, "aria-selected", n(_) === "columns");
1053
+ }), p("click", r, () => y().columnMenuTab = "general"), p("click", c, () => y().columnMenuTab = "columns"), i(e, t);
1054
+ };
1055
+ k(b, (e) => {
1056
+ n(Ce) && e(x);
1057
+ });
1058
+ var C = P(b, 2), E = (e) => {
1059
+ f(e, () => n(t));
1060
+ }, D = (e) => {
1061
+ let t = L(() => n(we).getAllColumns());
1062
+ var r = $e(), a = P(R(r), 2);
1063
+ {
1064
+ let e = L(() => n(t).length > 40), r = L(() => en(n(t))), i = L(() => tn(n(t)));
1065
+ Z(a, {
1066
+ block: !0,
1067
+ checkbox: !0,
1068
+ multiple: !0,
1069
+ get virtual() {
1070
+ return n(e);
1071
+ },
1072
+ rows: 9,
1073
+ rowHeight: 24,
1074
+ size: "sm",
1075
+ ariaLabel: "Visible columns",
1076
+ get options() {
1077
+ return n(r);
1078
+ },
1079
+ get value() {
1080
+ return n(i);
1081
+ },
1082
+ onChange: (e) => nn(n(t), e)
1083
+ });
1084
+ }
1085
+ i(e, r);
1086
+ }, O = (e) => {
1087
+ var r = lt(), f = R(r), h = (e) => {
1088
+ var r = et(), a = R(r), s = w(a), d = w(s);
1089
+ o(d, () => u.icon, () => "sort-asc"), M(s);
1090
+ var f = P(s);
1091
+ M(a);
1092
+ var m = P(a, 2), h = w(m), _ = w(h);
1093
+ o(_, () => u.icon, () => "sort-desc"), M(h);
1094
+ var v = P(h);
1095
+ M(m);
1096
+ var y = P(m, 2), b = w(y), x = w(b);
1097
+ o(x, () => u.icon, () => "x"), M(b), I(), M(y), g(() => {
1098
+ c(f, ` ${n(l) ? `Sort ${n(l)[0]}` : "Sort ascending"}`), c(v, ` ${n(l) ? `Sort ${n(l)[1]}` : "Sort descending"}`), y.disabled = !n(Ae)[n(t)];
1099
+ }), p("click", a, () => T(n(t), !1)), p("click", m, () => T(n(t), !0)), p("click", y, () => te(n(t))), i(e, r);
1100
+ };
1101
+ k(f, (e) => {
1102
+ n(a) && e(h);
1103
+ });
1104
+ var _ = P(f, 2), v = (e) => {
1105
+ let r = L(() => n(Ee)(n(t)));
1106
+ var a = tt(), s = P(R(a), 2), c = w(s), l = w(c);
1107
+ o(l, () => u.icon, () => "pin-left"), M(c), I(), M(s);
1108
+ var d = P(s, 2), f = w(d), h = w(f);
1109
+ o(h, () => u.icon, () => "pin-right"), M(f), I(), M(d);
1110
+ var _ = P(d, 2), v = w(_), y = w(v);
1111
+ o(y, () => u.icon, () => "unpin"), M(v), I(), M(_), g(() => {
1112
+ s.disabled = n(r) === "left" || n(m), d.disabled = n(r) === "right" || n(m), _.disabled = !n(r) || n(m);
1113
+ }), p("click", s, () => n(De)(n(t))), p("click", d, () => n(Oe)(n(t))), p("click", _, () => n(ke)(n(t))), i(e, a);
1114
+ };
1115
+ k(_, (e) => {
1116
+ n(t) && e(v);
1117
+ });
1118
+ var b = P(_, 2), x = (e) => {
1119
+ let r = L(() => U()?.columnMenuItems?.(y(), n(t)) ?? []);
1120
+ var a = at(), o = P(R(a), 2);
1121
+ s(o, 17, () => n(r), (e) => e.key, (e, t) => {
1122
+ var r = it(), a = R(r), o = (e) => {
1123
+ var t = nt();
1124
+ i(e, t);
1125
+ };
1126
+ k(a, (e) => {
1127
+ n(t).separatorBefore && e(o);
1128
+ });
1129
+ var s = P(a, 2), l = w(s), u = w(l), d = (e) => {
1130
+ var r = rt(), a = w(r);
1131
+ M(r), g(() => j(a, "d", n(t).icon)), i(e, r);
1132
+ };
1133
+ k(u, (e) => {
1134
+ n(t).icon && e(d);
1135
+ }), M(l);
1136
+ var f = P(l);
1137
+ M(s), g(() => {
1138
+ s.disabled = n(t).disabled, c(f, ` ${n(t).label ?? ""}`);
1139
+ }), p("click", s, () => {
1140
+ n($)(), n(t).run();
1141
+ }), i(e, r);
1142
+ }), i(e, a);
1143
+ }, C = L(() => n(t) && U()?.columnMenuItems);
1144
+ k(b, (e) => {
1145
+ n(C) && e(x);
1146
+ });
1147
+ var E = P(b, 4), D = (e) => {
1148
+ var r = ot(), a = w(r), s = w(a);
1149
+ o(s, () => u.icon, () => "autosize"), M(a), I(), M(r), p("click", r, () => {
1150
+ n(Nt)(n(t)), n($)();
1151
+ }), i(e, r);
1152
+ }, O = L(() => y().columnResizable(n(t)));
1153
+ k(E, (e) => {
1154
+ n(O) && e(D);
1155
+ });
1156
+ var A = P(E, 2), ee = w(A), N = w(ee);
1157
+ o(N, () => u.icon, () => "autosize"), M(ee), I(), M(A);
1158
+ var F = P(A, 2), re = (e) => {
1159
+ var r = st(), a = P(R(r), 2), s = w(a), c = w(s);
1160
+ o(c, () => u.icon, () => "group"), M(s), I(), M(a);
1161
+ var l = P(a, 2), d = w(l), f = w(d);
1162
+ o(f, () => u.icon, () => "x"), M(d), I(), M(l), g((e, t) => {
1163
+ a.disabled = e, l.disabled = t;
1164
+ }, [() => n(je).includes(n(t)), () => !n(je).includes(n(t))]), p("click", a, () => ne(n(t))), p("click", l, () => z(n(t))), i(e, r);
1165
+ };
1166
+ k(F, (e) => {
1167
+ n(_e) && e(re);
1168
+ });
1169
+ var ie = P(F, 4), B = (e) => {
1170
+ var t = ct();
1171
+ let r;
1172
+ var a = w(t), s = w(a);
1173
+ o(s, () => u.icon, () => "columns"), M(a);
1174
+ var c = P(a, 2), l = w(c);
1175
+ o(l, () => u.icon, () => "chevron-down"), M(c), M(t), g(() => {
1176
+ r = d(t, 1, "sv-grid-menu-item", null, r, { "is-open": n(X) !== null }), j(t, "aria-expanded", n(X) !== null);
1177
+ }), p("click", t, (e) => S(e)), i(e, t);
1178
+ };
1179
+ k(ie, (e) => {
1180
+ n(Ce) || e(B);
1181
+ });
1182
+ var V = P(ie, 2), ae = w(V), oe = w(ae);
1183
+ o(oe, () => u.icon, () => "reset"), M(ae), I(), M(V), p("click", A, () => {
1184
+ n(Pt)(), n($)();
1185
+ }), p("click", V, () => {
1186
+ n(Ft)(), n($)();
1187
+ }), i(e, r);
1188
+ };
1189
+ k(C, (e) => {
1190
+ n(Ce) && n(_) === "filter" && n(h) && n(Se) ? e(E) : n(Ce) && n(_) === "columns" ? e(D, 1) : e(O, -1);
1191
+ }), M(v), g(() => {
1192
+ j(v, "data-svgrid-menu", y().gridDomId), B(v, `left: ${n(ye).x}px; top: ${n(ye).y}px; max-height: calc(100vh - ${n(ye).y}px - 12px);`);
1193
+ }), i(e, v);
1194
+ };
1195
+ k(mn, (e) => {
1196
+ n(q) && e(hn);
1197
+ });
1198
+ var gn = P(mn, 2), _n = (e) => {
1199
+ var t = dt(), r = w(t);
1200
+ f(r, () => n(J)), M(t), ie(t, (e) => Ht?.(e)), g(() => {
1201
+ j(t, "data-svgrid-menu", y().gridDomId), B(t, `left: ${n(Y).x}px; top: ${n(Y).y}px; max-height: calc(100vh - ${n(Y).y}px - 12px);`);
1202
+ }), p("keydown", t, Wt), i(e, t);
1203
+ };
1204
+ k(gn, (e) => {
1205
+ n(J) && n(Se) && e(_n);
1206
+ });
1207
+ var vn = P(gn, 2), yn = (e) => {
1208
+ let t = L(() => n(we).getAllColumns());
1209
+ var r = ft(), a = P(w(r), 2);
1210
+ {
1211
+ let e = L(() => n(t).length > 40), r = L(() => en(n(t))), i = L(() => tn(n(t)));
1212
+ Z(a, {
1213
+ block: !0,
1214
+ checkbox: !0,
1215
+ multiple: !0,
1216
+ get virtual() {
1217
+ return n(e);
1218
+ },
1219
+ rows: 11,
1220
+ rowHeight: 24,
1221
+ size: "sm",
1222
+ ariaLabel: "Visible columns",
1223
+ get options() {
1224
+ return n(r);
1225
+ },
1226
+ get value() {
1227
+ return n(i);
1228
+ },
1229
+ onChange: (e) => nn(n(t), e)
1230
+ });
1231
+ }
1232
+ M(r), g(() => {
1233
+ j(r, "data-svgrid-menu", y().gridDomId), B(r, `left: ${n(X).x}px; top: ${n(X).y}px;`);
1234
+ }), i(e, r);
1235
+ };
1236
+ k(vn, (e) => {
1237
+ n(X) && e(yn);
1238
+ });
1239
+ var bn = P(vn, 2), xn = (e) => {
1240
+ let t = L(() => n(be)), r = L(() => n(Te).find((e) => e.id === n(t))), a = L(() => n(Tt)(n(r))), l = L(() => n(K)[n(t)]?.operator ?? n(Et)(n(r)));
1241
+ var d = mt();
1242
+ s(d, 21, () => n(a), (e) => e.value, (e, a) => {
1243
+ var s = pt(), d = w(s), f = w(d);
1244
+ o(f, () => u.icon, () => n(a).iconName), M(d);
1245
+ var m = P(d);
1246
+ M(s), g((e) => {
1247
+ j(s, "aria-checked", n(l) === n(a).value), c(m, ` ${e ?? ""}`);
1248
+ }, [() => n(Dt)(n(a), n(r))]), p("click", s, () => {
1249
+ n(Me)(n(t), n(a).value), n($)();
1250
+ }), i(e, s);
1251
+ }), M(d), g(() => {
1252
+ j(d, "data-svgrid-menu", y().gridDomId), B(d, `left: ${n(xe).x}px; top: ${n(xe).y}px;`);
1253
+ }), i(e, d);
1254
+ };
1255
+ k(bn, (e) => {
1256
+ n(be) && e(xn);
1257
+ });
1258
+ var Sn = P(bn, 2), Cn = (e) => {
1259
+ let t = L(() => n(kt)), r = L(() => new Set(de(n(Ot)[n(t)] ?? "")));
1260
+ var a = gt(), o = w(a), s = (e) => {
1261
+ {
1262
+ let i = L(() => n(Jt).length > 40);
1263
+ Z(e, {
1264
+ block: !0,
1265
+ checkbox: !0,
1266
+ multiple: !0,
1267
+ get virtual() {
1268
+ return n(i);
1269
+ },
1270
+ rows: 8,
1271
+ rowHeight: 26,
1272
+ size: "sm",
1273
+ ariaLabel: "Filter values",
1274
+ get options() {
1275
+ return n(Jt);
1276
+ },
1277
+ get value() {
1278
+ return n(r);
1279
+ },
1280
+ onChange: (e) => {
1281
+ let r = new Set(e), i = H(n(Ot)[n(t)] ?? "");
1282
+ i && r.delete(i), n(qt)(n(t), [...r]), y().inSuggestQuery = "";
1283
+ }
1284
+ });
1285
+ }
1286
+ }, c = (e) => {
1287
+ var t = ht();
1288
+ i(e, t);
1289
+ };
1290
+ k(o, (e) => {
1291
+ n(Jt).length ? e(s) : e(c, -1);
1292
+ }), M(a), g(() => {
1293
+ j(a, "data-svgrid-menu", y().gridDomId), B(a, `left: ${n(At).x}px; top: ${n(At).y}px;`);
1294
+ }), p("mousedown", a, (e) => e.preventDefault()), i(e, a);
1295
+ };
1296
+ k(Sn, (e) => {
1297
+ n(kt) && e(Cn);
1298
+ });
1299
+ var wn = P(Sn, 2), Tn = (e) => {
1300
+ let t = L(pe), r = L(() => n(t).some((e) => e.icon));
1301
+ var l = St(), d = R(l), f = P(d, 2);
1302
+ s(f, 21, () => n(t), (e) => e.key, (e, t) => {
1303
+ var l = a(), d = R(l), f = (e) => {
1304
+ var t = _t();
1305
+ i(e, t);
1306
+ }, m = (e) => {
1307
+ var l = xt(), d = w(l), f = (e) => {
1308
+ var r = bt(), c = w(r), l = (e) => {
1309
+ var r = a(), s = R(r);
1310
+ o(s, () => u.icon, () => n(t).icon), i(e, r);
1311
+ }, d = (e) => {
1312
+ var r = yt();
1313
+ s(r, 21, () => n(t).icon.paths, A, (e, t) => {
1314
+ var r = vt();
1315
+ g(() => {
1316
+ j(r, "d", n(t).d), j(r, "fill", n(t).fill ? "currentColor" : "none"), j(r, "stroke-width", n(t).width), j(r, "stroke-dasharray", n(t).dash);
1317
+ }), i(e, r);
1318
+ }), M(r), i(e, r);
1319
+ };
1320
+ k(c, (e) => {
1321
+ typeof n(t).icon == "string" ? e(l) : n(t).icon && e(d, 1);
1322
+ }), M(r), i(e, r);
1323
+ };
1324
+ k(d, (e) => {
1325
+ n(r) && e(f);
1326
+ });
1327
+ var m = P(d), h = w(m, !0);
1328
+ M(m), M(l), g(() => {
1329
+ l.disabled = n(t).disabled, c(h, n(t).label);
1330
+ }), p("click", l, () => {
1331
+ n(t).run?.(), W();
1332
+ }), i(e, l);
1333
+ };
1334
+ k(d, (e) => {
1335
+ n(t).separator ? e(f) : e(m, -1);
1336
+ }), i(e, l);
1337
+ }), M(f), ie(f, (e, t) => Vt?.(e, t), () => n(on)), g(() => {
1338
+ j(f, "data-svgrid-menu", y().gridDomId), B(f, `left: ${n(on).x}px; top: ${n(on).y}px;`);
1339
+ }), p("contextmenu", d, (e) => {
1340
+ e.preventDefault(), W();
1341
+ }), p("click", d, W), i(e, l);
1342
+ };
1343
+ k(wn, (e) => {
1344
+ n(an) && e(Tn);
1345
+ });
1346
+ var En = P(wn, 2), Dn = (e) => {
1347
+ var t = Ct(), r = R(t), a = P(r, 2), o = w(a);
1348
+ l(o), _(o, !0);
1349
+ var s = P(o, 2), c = w(s), u = P(c, 4), d = P(u, 2);
1350
+ M(s), M(a), g(() => {
1351
+ j(a, "data-svgrid-menu", y().gridDomId), B(a, `left: ${n(sn).x}px; top: ${n(sn).y}px;`);
1352
+ }), p("click", r, G), p("keydown", o, (e) => {
1353
+ e.stopPropagation(), e.key === "Escape" && (e.preventDefault(), G()), e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), me());
1354
+ }), ee(o, () => y().commentDraft, (e) => y().commentDraft = e), p("click", c, ge), p("click", u, G), p("click", d, me), i(e, t);
1355
+ };
1356
+ k(En, (e) => {
1357
+ n(sn) && e(Dn);
1358
+ }), i(r, ln), re();
1359
+ }
1360
+ r([
1361
+ "change",
1362
+ "input",
1363
+ "click",
1364
+ "keydown",
1365
+ "mousedown",
1366
+ "contextmenu"
1367
+ ]);
1368
+ //#endregion
1369
+ export { Tt as default };