@rivm-loculus-tools/sequence-editor 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/_chunks/EngineErrorUtil.js.map +1 -1
  2. package/dist/_chunks/EngineWorker.js +1 -1
  3. package/dist/_chunks/SequenceEditor.js +545 -526
  4. package/dist/_chunks/SequenceEditor.js.map +1 -1
  5. package/dist/_chunks/SequenceEditorEventBusService.js +5 -5
  6. package/dist/_chunks/SequenceEditorEventBusService.js.map +1 -1
  7. package/dist/_chunks/SequenceEditorPageDrawer.js +462 -693
  8. package/dist/_chunks/SequenceEditorPageDrawer.js.map +1 -1
  9. package/dist/_chunks/react.js +1 -1
  10. package/dist/_chunks/react.js.map +1 -1
  11. package/dist/_chunks/sequenceEditorStore.js +61 -58
  12. package/dist/_chunks/sequenceEditorStore.js.map +1 -1
  13. package/dist/_chunks/sequence_editor.js +131 -104
  14. package/dist/_chunks/sequence_editor.js.map +1 -1
  15. package/dist/assets/AlignerWorker-DkAbHwjR.js +8 -0
  16. package/dist/assets/AlignerWorker-DkAbHwjR.js.map +1 -0
  17. package/dist/assets/index-CKWZNkQe.js +8 -0
  18. package/dist/assets/index-CKWZNkQe.js.map +1 -0
  19. package/dist/classes/services/EditorWorkerService/EditorWorkerService.d.ts +18 -19
  20. package/dist/classes/services/EditorWorkerService/index.js +67 -90
  21. package/dist/classes/services/EditorWorkerService/index.js.map +1 -1
  22. package/dist/classes/services/SequenceEditorEventBusService/SequenceEditorEventBusService.d.ts +1 -0
  23. package/dist/classes/workers/AlignerWorker/index.js.map +1 -1
  24. package/dist/classes/workers/EngineWorker/EngineWorker.d.ts +19 -17
  25. package/dist/classes/workers/EngineWorker/index.js +78 -30
  26. package/dist/classes/workers/EngineWorker/index.js.map +1 -1
  27. package/dist/components/app/SequenceEditorApp/index.js +10 -10
  28. package/dist/components/app/SequenceEditorApp/index.js.map +1 -1
  29. package/dist/components/ui/SequenceActionsBar/SequenceActionsBar.d.ts +1 -0
  30. package/dist/components/ui/SequenceActionsBar/index.d.ts +1 -0
  31. package/dist/components/ui/SequenceActionsBar/index.js +113 -0
  32. package/dist/components/ui/SequenceActionsBar/index.js.map +1 -0
  33. package/dist/components/ui/SequenceEditorMenu/SequenceEditorMenu.d.ts +1 -0
  34. package/dist/components/ui/SequenceEditorMenu/index.d.ts +1 -0
  35. package/dist/components/ui/SequenceEditorMenu/index.js +198 -0
  36. package/dist/components/ui/SequenceEditorMenu/index.js.map +1 -0
  37. package/dist/components/ui/SequenceEditorPageHeader/index.js +86 -1
  38. package/dist/components/ui/SequenceEditorPageHeader/index.js.map +1 -0
  39. package/dist/components/ui/SequenceEditorRealignModal/index.js +13 -13
  40. package/dist/components/ui/SequenceEditorRealignModal/index.js.map +1 -1
  41. package/dist/components/ui/SequenceEditorSearchBar/index.js +25 -21
  42. package/dist/components/ui/SequenceEditorSearchBar/index.js.map +1 -1
  43. package/dist/constants/keyboard.js +26 -26
  44. package/dist/constants/keyboard.js.map +1 -1
  45. package/dist/constants/palette.js +20 -20
  46. package/dist/constants/palette.js.map +1 -1
  47. package/dist/models/editor.models.d.ts +34 -26
  48. package/dist/models/editor.models.js +3 -1
  49. package/dist/models/editor.models.js.map +1 -1
  50. package/dist/models/palette.models.js.map +1 -1
  51. package/dist/pages/SequenceEditorMainPage/index.js +19 -19
  52. package/dist/pages/SequenceEditorMainPage/index.js.map +1 -1
  53. package/dist/stores/sequenceEditorStore/sequenceEditorStore.d.ts +3 -1
  54. package/dist/theme/demoTheme/index.js +5 -5
  55. package/dist/theme/demoTheme/index.js.map +1 -1
  56. package/dist/utils/EditorUtil/EditorUtil.d.ts +10 -3
  57. package/dist/utils/EditorUtil/index.js +360 -275
  58. package/dist/utils/EditorUtil/index.js.map +1 -1
  59. package/dist/utils/PaletteUtil/index.js.map +1 -1
  60. package/dist/utils/SequenceEditorStandardConfigUtil/index.js +6 -6
  61. package/dist/utils/SequenceEditorStandardConfigUtil/index.js.map +1 -1
  62. package/dist/vite/paletteSchemaPlugin/index.js.map +1 -1
  63. package/package.json +17 -17
  64. package/dist/_chunks/SequenceEditorPageHeader.js +0 -135
  65. package/dist/_chunks/SequenceEditorPageHeader.js.map +0 -1
  66. package/dist/assets/AlignerWorker-ag-D8qid.js +0 -8
  67. package/dist/assets/AlignerWorker-ag-D8qid.js.map +0 -1
  68. package/dist/assets/index-CN_G9YrF.js +0 -8
  69. package/dist/assets/index-CN_G9YrF.js.map +0 -1
  70. package/dist/components/ui/SequenceEditorPageDrawer/SequenceEditorPageDrawerKeyboardShortcuts.d.ts +0 -1
@@ -1,222 +1,225 @@
1
- import { t as e } from "./react.js";
2
- import { EditorWorkerService as t } from "../classes/services/EditorWorkerService/index.js";
3
- import { DEFAULT_GRID_GEOMETRY as n, IUPAC_KEYS as r } from "../constants/editor.js";
4
- import { t as i } from "./SequenceEditorEventBusService.js";
5
- import { EDITOR_DIRECTION as a, EDITOR_PATH_PROPERTIES_TYPE as o } from "../models/editor.models.js";
6
- import { KEYBOARD_SHORTCUTS as s } from "../constants/keyboard.js";
1
+ import { container as e } from "tsyringe";
2
+ import { useCallback as t, useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
3
+ import { Box as o, CircularProgress as s, TextField as c, darken as l, useTheme as u } from "@mui/material";
4
+ import { Subject as d } from "@gen-epix/ui-core/classes/Subject";
5
+ import { DevicePixelRatioService as f } from "@gen-epix/ui-core/classes/services/DevicePixelRatioService";
6
+ import { KeyboardShortcutService as p } from "@gen-epix/ui-core/classes/services/KeyboardShortcutService";
7
+ import { t as m } from "./react.js";
8
+ import { ExportUtil as h } from "@rivm-loculus-tools/common-frontend/utils/ExportUtil";
9
+ import { UploadToLoculusModal as g } from "@rivm-loculus-tools/common-frontend/components/loculus/UploadToLoculusModal";
10
+ import { WindowService as _ } from "@gen-epix/ui-core/classes/services/WindowService";
11
+ import { useConfig as v } from "@rivm-loculus-tools/common-frontend/hooks/useConfig";
12
+ import { useFastaDataTransfer as y } from "@rivm-loculus-tools/common-frontend/hooks/useFastaDataTransfer";
13
+ import { EditorWorkerService as b } from "../classes/services/EditorWorkerService/index.js";
14
+ import { t as x } from "./SequenceEditorEventBusService.js";
15
+ import { DEFAULT_GRID_GEOMETRY as ee, IUPAC_KEYS as S } from "../constants/editor.js";
16
+ import { EDITOR_DIRECTION as C, EDITOR_PATH_PROPERTIES_TYPE as w, READING_MODE as T } from "../models/editor.models.js";
17
+ import { KEYBOARD_SHORTCUTS as E } from "../constants/keyboard.js";
7
18
  import "../constants/index.js";
8
- import { EditorUtil as c } from "../utils/EditorUtil/index.js";
9
- import { t as l } from "./EngineErrorUtil.js";
10
- import { t as u } from "./sequenceEditorStore.js";
11
- import { SequenceEditorSearchBar as d } from "../components/ui/SequenceEditorSearchBar/index.js";
12
- import { SequenceEditorRealignModal as f } from "../components/ui/SequenceEditorRealignModal/index.js";
13
- import { useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
14
- import { Box as v, CircularProgress as y, TextField as b, darken as x, useTheme as S } from "@mui/material";
15
- import { container as C } from "tsyringe";
16
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
17
- import { useConfig as E } from "@rivm-loculus-tools/common-frontend/hooks/useConfig";
18
- import { Subject as D } from "@gen-epix/ui-core/classes/Subject";
19
- import { DevicePixelRatioService as O } from "@gen-epix/ui-core/classes/services/DevicePixelRatioService";
20
- import { KeyboardShortcutService as ee } from "@gen-epix/ui-core/classes/services/KeyboardShortcutService";
21
- import { ExportUtil as te } from "@rivm-loculus-tools/common-frontend/utils/ExportUtil";
22
- import { UploadToLoculusModal as ne } from "@rivm-loculus-tools/common-frontend/components/loculus/UploadToLoculusModal";
23
- import { WindowService as re } from "@gen-epix/ui-core/classes/services/WindowService";
24
- import { withDialog as k } from "@gen-epix/ui-core-components/hoc/withDialog";
19
+ import { EditorUtil as D } from "../utils/EditorUtil/index.js";
20
+ import { t as te } from "./EngineErrorUtil.js";
21
+ import { t as O } from "./sequenceEditorStore.js";
22
+ import { SequenceEditorSearchBar as ne } from "../components/ui/SequenceEditorSearchBar/index.js";
23
+ import { SequenceEditorRealignModal as re } from "../components/ui/SequenceEditorRealignModal/index.js";
24
+ import { SequenceEditorMenu as ie } from "../components/ui/SequenceEditorMenu/index.js";
25
+ import { SequenceActionsBar as ae } from "../components/ui/SequenceActionsBar/index.js";
26
+ import { jsx as k, jsxs as A } from "react/jsx-runtime";
27
+ import { withDialog as oe } from "@gen-epix/ui-core-components/hoc/withDialog";
25
28
  // ../../../../node_modules/.pnpm/use-debounce@10.1.1_react@19.3.1/node_modules/use-debounce/dist/index.module.js
26
- function ie(e, t, n, r) {
27
- var i = this, a = g(null), o = g(0), s = g(0), c = g(null), l = g([]), u = g(), d = g(), f = g(e), p = g(!0), _ = g(), v = g();
28
- f.current = e;
29
+ function se(e, t, a, o) {
30
+ var s = this, c = i(null), l = i(0), u = i(0), d = i(null), f = i([]), p = i(), m = i(), h = i(e), g = i(!0), _ = i(), v = i();
31
+ h.current = e;
29
32
  var y = typeof window < "u", b = !t && t !== 0 && y;
30
33
  if (typeof e != "function") throw TypeError("Expected a function");
31
34
  t = +t || 0;
32
- var x = !!(n ||= {}).leading, S = !("trailing" in n) || !!n.trailing, C = !!n.flushOnExit && S, w = "maxWait" in n, T = "debounceOnServer" in n && !!n.debounceOnServer, E = w ? Math.max(+n.maxWait || 0, t) : null, D = h(function() {
35
+ var x = !!(a ||= {}).leading, ee = !("trailing" in a) || !!a.trailing, S = !!a.flushOnExit && ee, C = "maxWait" in a, w = "debounceOnServer" in a && !!a.debounceOnServer, T = C ? Math.max(+a.maxWait || 0, t) : null, E = r(function() {
33
36
  var e = function(e) {
34
- var t = l.current, n = u.current;
35
- return l.current = u.current = null, o.current = e, s.current = s.current || e, d.current = f.current.apply(n, t);
37
+ var t = f.current, n = p.current;
38
+ return f.current = p.current = null, l.current = e, u.current = u.current || e, m.current = h.current.apply(n, t);
36
39
  }, n = function(e, t) {
37
- b && cancelAnimationFrame(c.current), c.current = b ? requestAnimationFrame(e) : setTimeout(e, t);
38
- }, m = function(e) {
39
- if (!p.current) return !1;
40
- var n = e - a.current;
41
- return !a.current || n >= t || n < 0 || w && e - o.current >= E;
42
- }, h = function(t) {
43
- return c.current = null, S && l.current ? e(t) : (l.current = u.current = null, d.current);
44
- }, g = function e() {
45
- var r = Date.now();
46
- if (x && s.current === o.current && D(), m(r)) return h(r);
47
- if (p.current) {
48
- var i = t - (r - a.current);
49
- n(e, w ? Math.min(i, E - (r - o.current)) : i);
40
+ b && cancelAnimationFrame(d.current), d.current = b ? requestAnimationFrame(e) : setTimeout(e, t);
41
+ }, r = function(e) {
42
+ if (!g.current) return !1;
43
+ var n = e - c.current;
44
+ return !c.current || n >= t || n < 0 || C && e - l.current >= T;
45
+ }, i = function(t) {
46
+ return d.current = null, ee && f.current ? e(t) : (f.current = p.current = null, m.current);
47
+ }, a = function e() {
48
+ var a = Date.now();
49
+ if (x && u.current === l.current && E(), r(a)) return i(a);
50
+ if (g.current) {
51
+ var o = t - (a - c.current);
52
+ n(e, C ? Math.min(o, T - (a - l.current)) : o);
50
53
  }
54
+ }, E = function() {
55
+ o && o({});
51
56
  }, D = function() {
52
- r && r({});
53
- }, O = function() {
54
- if (y || T) {
55
- var r, s = Date.now(), f = m(s);
56
- if (l.current = [].slice.call(arguments), u.current = i, a.current = s, C && !_.current && (_.current = function() {
57
+ if (y || w) {
58
+ var i, o = Date.now(), u = r(o);
59
+ if (f.current = [].slice.call(arguments), p.current = s, c.current = o, S && !_.current && (_.current = function() {
57
60
  globalThis.document?.visibilityState === "hidden" && v.current.flush();
58
- }, (r = globalThis.document) == null || r.addEventListener == null || r.addEventListener("visibilitychange", _.current)), f) {
59
- if (!c.current && p.current) return o.current = a.current, n(g, t), x ? e(a.current) : d.current;
60
- if (w) return n(g, t), e(a.current);
61
+ }, (i = globalThis.document) == null || i.addEventListener == null || i.addEventListener("visibilitychange", _.current)), u) {
62
+ if (!d.current && g.current) return l.current = c.current, n(a, t), x ? e(c.current) : m.current;
63
+ if (C) return n(a, t), e(c.current);
61
64
  }
62
- return c.current || n(g, t), d.current;
65
+ return d.current || n(a, t), m.current;
63
66
  }
64
67
  };
65
- return O.cancel = function() {
66
- var e = c.current;
67
- e && (b ? cancelAnimationFrame(c.current) : clearTimeout(c.current)), o.current = 0, l.current = a.current = u.current = c.current = null, e && r && r({});
68
- }, O.isPending = function() {
69
- return !!c.current;
70
- }, O.flush = function() {
71
- return c.current ? h(Date.now()) : d.current;
72
- }, O;
68
+ return D.cancel = function() {
69
+ var e = d.current;
70
+ e && (b ? cancelAnimationFrame(d.current) : clearTimeout(d.current)), l.current = 0, f.current = c.current = p.current = d.current = null, e && o && o({});
71
+ }, D.isPending = function() {
72
+ return !!d.current;
73
+ }, D.flush = function() {
74
+ return d.current ? i(Date.now()) : m.current;
75
+ }, D;
73
76
  }, [
74
77
  x,
75
- w,
78
+ C,
76
79
  t,
77
- E,
80
+ T,
81
+ ee,
78
82
  S,
79
- C,
80
83
  b,
81
84
  y,
82
- T,
83
- r
85
+ w,
86
+ o
84
87
  ]);
85
- return v.current = D, m(function() {
86
- return p.current = !0, function() {
88
+ return v.current = E, n(function() {
89
+ return g.current = !0, function() {
87
90
  var e;
88
- C && v.current.flush(), _.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", _.current), null), p.current = !1;
91
+ S && v.current.flush(), _.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", _.current), null), g.current = !1;
89
92
  };
90
- }, [C]), D;
93
+ }, [S]), E;
91
94
  }
92
95
  // src/components/ui/SequenceEditor/SequenceEditorStatusBar.tsx
93
- var ae = () => {
94
- let t = S(), n = e(u, (e) => e.isRealigning), r = e(u, (e) => e.latestMessage), i = e(u, (e) => e.engineMeta), a = e(u, (e) => e.selection), o = h(() => c.getStatusBarSelectionStats(a, i), [i, a]);
95
- return /* @__PURE__ */ w(v, {
96
+ var ce = () => {
97
+ let e = u(), t = m(O, (e) => e.isRealigning), n = m(O, (e) => e.latestMessage), i = m(O, (e) => e.engineMeta), a = m(O, (e) => e.selection), c = r(() => D.getStatusBarSelectionStats(a, i), [i, a]);
98
+ return /* @__PURE__ */ k(o, {
96
99
  sx: {
97
- backgroundColor: x(t.palette.background.paper, .1),
98
- borderTop: `1px solid ${x(t.palette.background.paper, .2)}`,
99
- fontSize: t.typography.caption,
100
+ backgroundColor: l(e.palette.background.paper, .1),
101
+ borderTop: `1px solid ${l(e.palette.background.paper, .2)}`,
102
+ fontSize: e.typography.caption,
100
103
  height: "100%",
101
104
  width: "100%"
102
105
  },
103
- children: /* @__PURE__ */ T(v, {
106
+ children: /* @__PURE__ */ A(o, {
104
107
  sx: {
105
108
  "& > div": {
106
109
  alignItems: "center",
107
- borderLeft: `1px solid ${x(t.palette.background.paper, .2)}`,
110
+ borderLeft: `1px solid ${l(e.palette.background.paper, .2)}`,
108
111
  display: "flex",
109
- paddingLeft: t.spacing(1)
112
+ paddingLeft: e.spacing(1)
110
113
  },
111
114
  "& > div:first-of-type": { borderLeft: "none" },
112
115
  display: "grid",
113
116
  gap: 4,
114
117
  gridTemplateColumns: "1fr repeat(5, max-content)",
115
- paddingLeft: t.spacing(1),
116
- paddingRight: t.spacing(1)
118
+ paddingLeft: e.spacing(1),
119
+ paddingRight: e.spacing(1)
117
120
  },
118
121
  children: [
119
- /* @__PURE__ */ T(v, {
122
+ /* @__PURE__ */ A(o, {
120
123
  sx: {
121
124
  alignItems: "center",
122
125
  display: "flex",
123
126
  gap: 1
124
127
  },
125
- children: [n && /* @__PURE__ */ w(y, {
128
+ children: [t && /* @__PURE__ */ k(s, {
126
129
  color: "inherit",
127
130
  size: 12
128
- }), r ?? ""]
131
+ }), n ?? ""]
129
132
  }),
130
- /* @__PURE__ */ w(v, { children: `Pos: ${o.pos}` }),
131
- /* @__PURE__ */ w(v, { children: `Selected seqs: ${o.selectedSeqs}` }),
132
- /* @__PURE__ */ w(v, { children: `Cols: ${o.cols}` }),
133
- /* @__PURE__ */ w(v, { children: `Total selected chars: ${o.totalSelectedChars}` }),
134
- /* @__PURE__ */ w(v, { children: `Alignment: ${i?.sequenceCount ?? "0"} sequences, ${i?.alignmentWidth ?? "0"} positions` })
133
+ /* @__PURE__ */ k(o, { children: `Pos: ${c.pos}` }),
134
+ /* @__PURE__ */ k(o, { children: `Selected seqs: ${c.selectedSeqs}` }),
135
+ /* @__PURE__ */ k(o, { children: `Cols: ${c.cols}` }),
136
+ /* @__PURE__ */ k(o, { children: `Total selected chars: ${c.totalSelectedChars}` }),
137
+ /* @__PURE__ */ k(o, { children: `Alignment: ${i?.sequenceCount ?? "0"} sequences, ${i?.alignmentWidth ?? "0"} positions` })
135
138
  ]
136
139
  })
137
140
  });
138
- }, A = /^(?:\d+|,\d+|\d+,\d+)$/, oe = k(({ onActionsChange: e, onClose: t, onGotoPosition: n }) => {
139
- let [r, i] = _(""), a = g(null), o = r === "" || A.test(r);
140
- m(() => {
141
- a.current?.focus();
141
+ }, j = /^(?:\d+|,\d+|\d+,\d+)$/, le = oe(({ onActionsChange: e, onClose: r, onGotoPosition: o }) => {
142
+ let [s, l] = a(""), u = i(null), d = s === "" || j.test(s);
143
+ n(() => {
144
+ u.current?.focus();
142
145
  }, []);
143
- let s = p((e) => {
144
- i(e.target.value);
145
- }, []), c = p(() => {
146
- if (!o) return;
147
- let [e, i] = r.split(",");
148
- n(e ? Number(e) : null, i ? Number(i) : null), t?.();
146
+ let f = t((e) => {
147
+ l(e.target.value);
148
+ }, []), p = t(() => {
149
+ if (!d) return;
150
+ let [e, t] = s.split(",");
151
+ o(e ? Number(e) : null, t ? Number(t) : null), r?.();
149
152
  }, [
153
+ d,
154
+ r,
150
155
  o,
151
- t,
152
- n,
153
- r
154
- ]), l = p((e) => {
155
- e.key === "Enter" && (e.preventDefault(), c());
156
- }, [c]);
157
- return m(() => {
158
- let n = [];
159
- n.push({
156
+ s
157
+ ]), m = t((e) => {
158
+ e.key === "Enter" && (e.preventDefault(), p());
159
+ }, [p]);
160
+ return n(() => {
161
+ let t = [];
162
+ t.push({
160
163
  color: "secondary",
161
164
  label: "Close",
162
- onClick: t,
165
+ onClick: r,
163
166
  variant: "outlined"
164
- }), n.push({
167
+ }), t.push({
165
168
  color: "primary",
166
- disabled: !o,
169
+ disabled: !d,
167
170
  label: "Ok",
168
- onClick: c,
171
+ onClick: p,
169
172
  variant: "contained"
170
- }), e?.(n);
173
+ }), e?.(t);
171
174
  }, [
172
- o,
175
+ d,
173
176
  e,
174
- t,
175
- c
176
- ]), /* @__PURE__ */ w(b, {
177
- error: !o,
177
+ r,
178
+ p
179
+ ]), /* @__PURE__ */ k(c, {
180
+ error: !d,
178
181
  fullWidth: !0,
179
182
  helperText: "Use x, ,y, or x,y.",
180
- inputRef: a,
183
+ inputRef: u,
181
184
  label: "Position",
182
- onChange: s,
183
- onKeyDown: l,
185
+ onChange: f,
186
+ onKeyDown: m,
184
187
  placeholder: "x or ,y or x,y",
185
- value: r
188
+ value: s
186
189
  });
187
190
  }, {
188
191
  defaultTitle: "Goto position (x) or (,y) or (x,y)",
189
192
  fullWidth: !0,
190
193
  maxWidth: "xs",
191
194
  testId: "SequenceEditorGotoPositionDialog"
192
- }), se = () => {
193
- let y = E(), b = e(u, (e) => e.isRealigning), x = e(u, (e) => e.rawFasta), k = e(u, (e) => e.setEngineMeta), A = e(u, (e) => e.setSelection), se = g(null), ce = g(null), le = g(null), j = h(() => C.resolve(t), []), M = g(null), N = g(null), P = g(null), F = g(null), I = g(null), L = g(null), ue = g(null), [R, de] = _({
195
+ }), M = () => {
196
+ let s = v(), c = y(), l = m(O, (e) => e.isRealigning), oe = m(O, (e) => e.rawFasta), j = m(O, (e) => e.setEngineMeta), M = m(O, (e) => e.setSelection), ue = i(null), de = i(null), fe = i(null), N = r(() => e.resolve(b), []), P = i(null), F = i(null), pe = i(null), I = i(null), L = i(null), R = i(null), me = i(null), [z, he] = a({
194
197
  height: 0,
195
198
  width: 0
196
- }), [fe, pe] = _(() => C.resolve(O).data), me = g(0), he = g(0), z = h(() => new D({
199
+ }), [ge, _e] = a(() => e.resolve(f).data), ve = i(0), ye = i(0), B = r(() => new d({
197
200
  scrollLeft: 0,
198
201
  scrollTop: 0
199
- }), []), ge = g(R), B = h(() => new D(null), []), V = h(() => new D(null), []), H = g(null), U = g(null), W = h(() => new D(n), []), G = h(() => new D(null), []), K = g(null), q = g(0), J = g(null), _e = g(!1), Y = S();
200
- m(() => {
201
- b ? le.current?.open() : le.current?.close();
202
- }, [b]);
203
- let X = p(() => {
204
- let e = ue.current;
202
+ }), []), be = i(z), V = r(() => new d(null), []), xe = r(() => new d(null), []), H = i(null), U = i(null), W = r(() => new d(ee), []), G = r(() => new d(null), []), K = i(null), q = i(0), J = i(null), Se = i(!1), Y = u();
203
+ n(() => {
204
+ l ? fe.current?.open() : fe.current?.close();
205
+ }, [l]);
206
+ let X = t(() => {
207
+ let e = me.current;
205
208
  if (!e) return;
206
- let t = W.data, n = B.data;
209
+ let t = W.data, n = V.data;
207
210
  if (t && n) {
208
211
  let e = t.labelWidth + t.cellWidth + n.alignmentWidth * t.cellWidth, r = t.rulerHeight + n.sequenceCount * t.cellHeight;
209
- he.current !== e && (he.current = e), me.current !== r && (me.current = r);
212
+ ye.current !== e && (ye.current = e), ve.current !== r && (ve.current = r);
210
213
  }
211
- let { height: r, width: i } = ge.current, a = `${Math.max(he.current, i)}px`, o = `${Math.max(me.current, r)}px`;
214
+ let { height: r, width: i } = be.current, a = `${Math.max(ye.current, i)}px`, o = `${Math.max(ve.current, r)}px`;
212
215
  e.style.width !== a && (e.style.width = a), e.style.height !== o && (e.style.height = o);
213
- }, [W, B]), Z = p(async (e) => {
214
- let n = C.resolve(t).getMetaData(e), r = await n;
215
- return n.abortSignal?.aborted ? null : (B.next(r), r);
216
- }, [B]), Q = p(() => {
217
- let e = W.data, t = B.data;
216
+ }, [W, V]), Ce = t(async (t) => {
217
+ let n = e.resolve(b).getMetaData(t), r = await n;
218
+ return n.abortSignal?.aborted ? null : (V.next(r), r);
219
+ }, [V]), Z = t(() => {
220
+ let e = W.data, t = V.data;
218
221
  if (!t || !e) return;
219
- let { scrollLeft: n, scrollTop: r } = z.data, { height: i, width: a } = ge.current, o = c.getVisibleGridRange({
222
+ let { scrollLeft: n, scrollTop: r } = B.data, { height: i, width: a } = be.current, o = D.getVisibleGridRange({
220
223
  geometry: e,
221
224
  numCols: t.alignmentWidth,
222
225
  numRows: t.sequenceCount,
@@ -225,7 +228,7 @@ var ae = () => {
225
228
  viewportHeight: i,
226
229
  viewportWidth: a
227
230
  });
228
- V.next({
231
+ xe.next({
229
232
  geometry: e,
230
233
  scrollLeft: n,
231
234
  scrollTop: r,
@@ -235,617 +238,633 @@ var ae = () => {
235
238
  });
236
239
  }, [
237
240
  W,
241
+ V,
238
242
  B,
239
- z,
240
- V
241
- ]), ve = ie((e, t) => {
242
- de({
243
+ xe
244
+ ]), we = se((e, t) => {
245
+ he({
243
246
  height: t,
244
247
  width: e
245
248
  });
246
249
  }, 0, { trailing: !0 });
247
- m(() => {
248
- ge.current = R, X(), Q();
250
+ n(() => {
251
+ be.current = z, X(), Z();
249
252
  }, [
250
- R,
253
+ z,
251
254
  X,
252
- Q
255
+ Z
253
256
  ]);
254
- let $ = R.width > 0 ? R.width / 2 : 120;
255
- m(() => {
256
- let e = [B.subscribe((e) => {
257
- k(e);
257
+ let Q = z.width > 0 ? z.width / 2 : 120;
258
+ n(() => {
259
+ let e = [V.subscribe((e) => {
260
+ j(e);
258
261
  }), G.subscribe((e) => {
259
- A(e);
262
+ M(e);
260
263
  })];
261
264
  return () => {
262
- e.forEach((e) => e()), u.getState().setLatestMessage(null), k(null), A(null);
265
+ e.forEach((e) => e()), O.getState().setLatestMessage(null), j(null), M(null);
263
266
  };
264
267
  }, [
265
- B,
268
+ V,
266
269
  G,
267
- k,
268
- A
269
- ]), m(() => {
270
- if (R.width <= 0) return;
270
+ j,
271
+ M
272
+ ]), n(() => {
273
+ if (z.width <= 0) return;
271
274
  let e = W.data;
272
- e.labelWidth > $ && W.next({
275
+ e.labelWidth > Q && W.next({
273
276
  ...e,
274
- labelWidth: $
277
+ labelWidth: Q
275
278
  });
276
279
  }, [
277
- R.width,
280
+ z.width,
278
281
  W,
279
- $
280
- ]), m(() => {
281
- let e = L.current;
282
+ Q
283
+ ]), n(() => {
284
+ let e = R.current;
282
285
  if (!e) return;
283
286
  let t = new ResizeObserver(([e]) => {
284
287
  if (!e) return;
285
288
  let t = Math.max(1, e.contentRect.height), n = Math.max(1, e.contentRect.width);
286
- ve(n, t);
289
+ we(n, t);
287
290
  });
288
291
  return t.observe(e), () => t.disconnect();
289
- }, [j, ve]), m(() => {
292
+ }, [N, we]), n(() => {
290
293
  let e = new AbortController();
291
294
  return (async () => {
292
- H.current = null, U.current = null, z.next({
295
+ H.current = null, U.current = null, B.next({
293
296
  scrollLeft: 0,
294
297
  scrollTop: 0
295
298
  }), G.next(null);
296
- let t = j.initialize(e.signal);
299
+ let t = N.initialize(e.signal);
297
300
  if (await t, t.abortSignal?.aborted) return;
298
- let n = j.reset(e.signal);
301
+ let n = N.reset(e.signal);
299
302
  if (await n, n.abortSignal?.aborted) return;
300
- let r = j.loadFasta(x, e.signal);
301
- await r, r.abortSignal?.aborted || await Z(e.signal);
303
+ let r = N.loadFasta(oe, e.signal);
304
+ await r, r.abortSignal?.aborted || await Ce(e.signal);
302
305
  })().catch((t) => {
303
306
  e.signal.aborted || console.error(t);
304
307
  }), () => e.abort();
305
308
  }, [
306
- j,
307
- x,
308
- z,
309
+ N,
310
+ oe,
311
+ B,
309
312
  G,
310
- Z,
311
- Q
312
- ]), m(() => {
313
- let e = null, t = !0, n = null, r = null, i = null, a = async () => {
314
- if (t && !_e.current) {
315
- _e.current = !0;
313
+ Ce,
314
+ Z
315
+ ]), n(() => {
316
+ let t = null, n = !0, r = null, i = null, a = null, o = async () => {
317
+ if (n && !Se.current) {
318
+ Se.current = !0;
316
319
  try {
317
- for (; t && J.current;) {
318
- let a = J.current;
320
+ for (; n && J.current;) {
321
+ let o = J.current;
319
322
  J.current = null;
320
- let o = q.current, s = n;
321
- if (!s || s.signal.aborted) return;
322
- if (!U.current || !c.isWithinGridRange({
323
+ let s = q.current, c = r;
324
+ if (!c || c.signal.aborted) return;
325
+ if (!U.current || !D.isWithinGridRange({
323
326
  cachedGridRange: U.current.range,
324
- visibleGridRange: a.visibleGridRange.visible
327
+ visibleGridRange: o.visibleGridRange.visible
325
328
  })) {
326
329
  let e = [];
327
- for (let t = a.visibleGridRange.cache.startRow; t <= a.visibleGridRange.cache.endRow; t++) {
328
- let n = j.name(t, s.signal);
330
+ for (let t = o.visibleGridRange.cache.startRow; t <= o.visibleGridRange.cache.endRow; t++) {
331
+ let n = N.name(t, c.signal);
329
332
  if (e.push(await n), n.abortSignal?.aborted) return;
330
333
  }
331
- if (!t || s.signal.aborted) return;
334
+ if (!n || c.signal.aborted) return;
332
335
  U.current = {
333
- range: a.visibleGridRange.cache,
336
+ range: o.visibleGridRange.cache,
334
337
  rowNames: e
335
338
  };
336
339
  }
337
- if (!H.current || !c.isWithinGridRange({
340
+ if (!H.current || !D.isWithinGridRange({
338
341
  cachedGridRange: H.current.range,
339
- visibleGridRange: a.visibleGridRange.visible
342
+ visibleGridRange: o.visibleGridRange.visible
340
343
  })) {
341
- let e = j.viewport({
342
- endCol: a.visibleGridRange.cache.endCol,
343
- endRow: a.visibleGridRange.cache.endRow,
344
- startCol: a.visibleGridRange.cache.startCol,
345
- startRow: a.visibleGridRange.cache.startRow
346
- }, s.signal), n = await e;
347
- if (!t || e.abortSignal?.aborted) return;
344
+ let e = N.viewport({
345
+ endCol: o.visibleGridRange.cache.endCol,
346
+ endRow: o.visibleGridRange.cache.endRow,
347
+ startCol: o.visibleGridRange.cache.startCol,
348
+ startRow: o.visibleGridRange.cache.startRow
349
+ }, O.getState().readingMode === T.NUCLEOTIDE ? void 0 : O.getState().readingFrame, c.signal), t = await e;
350
+ if (!n || e.abortSignal?.aborted) return;
348
351
  H.current = {
349
- range: a.visibleGridRange.cache,
350
- viewportResult: n
352
+ range: o.visibleGridRange.cache,
353
+ viewportResult: t
351
354
  };
352
355
  }
353
- o === q.current && (e !== null && cancelAnimationFrame(e), e = requestAnimationFrame(() => {
354
- t && o === q.current && M.current && u.getState().nucleotidePalette && H.current && B.data && U.current && (N.current = c.drawCanvas({
355
- canvasElement: M.current,
356
- devicePixelRatio: C.resolve(O).data,
357
- geometry: a.geometry,
358
- meta: B.data,
359
- palette: u.getState().nucleotidePalette,
356
+ s === q.current && (t !== null && cancelAnimationFrame(t), t = requestAnimationFrame(() => {
357
+ n && s === q.current && P.current && O.getState().nucleotidePalette && O.getState().aminoAcidPalette && H.current && V.data && U.current && (F.current = D.drawCanvas({
358
+ aminoAcidPalette: O.getState().aminoAcidPalette,
359
+ canvasElement: P.current,
360
+ devicePixelRatio: e.resolve(f).data,
361
+ geometry: o.geometry,
362
+ meta: V.data,
363
+ nucleotidePalette: O.getState().nucleotidePalette,
364
+ readingFrame: O.getState().readingFrame,
365
+ readingMode: O.getState().readingMode,
360
366
  rowNames: U.current.rowNames,
361
367
  rowNamesStartRow: U.current.range.startRow,
362
- scrollLeft: a.scrollLeft,
363
- scrollTop: a.scrollTop,
364
- searchResult: r,
365
- searchResultHighlightedIndex: i,
368
+ scrollLeft: o.scrollLeft,
369
+ scrollTop: o.scrollTop,
370
+ searchResult: i,
371
+ searchResultHighlightedIndex: a,
366
372
  selection: G.data,
367
373
  viewport: H.current.viewportResult,
368
- viewportHeight: a.viewportHeight,
369
- viewportWidth: a.viewportWidth
374
+ viewportHeight: o.viewportHeight,
375
+ viewportWidth: o.viewportWidth
370
376
  }));
371
377
  }));
372
378
  }
373
379
  } catch (e) {
374
380
  if (!(e instanceof DOMException && e.name === "AbortError")) throw e;
375
381
  } finally {
376
- _e.current = !1, t && J.current && a();
382
+ Se.current = !1, n && J.current && o();
377
383
  }
378
384
  }
379
- }, o = [u.subscribe((e, t) => {
385
+ }, s = [O.subscribe((e, t) => {
380
386
  let n = !1;
381
- e.searchResult !== t.searchResult && (r = e.searchResult, n = !0), e.searchResultHighlightedIndex !== t.searchResultHighlightedIndex && (i = e.searchResultHighlightedIndex, c.scrollToSearchResult({
387
+ e.searchResult !== t.searchResult && (i = e.searchResult, n = !0), e.searchResultHighlightedIndex !== t.searchResultHighlightedIndex && (a = e.searchResultHighlightedIndex, D.scrollToSearchResult({
382
388
  geometry: W.data,
383
- scrollContainer: L.current,
389
+ scrollContainer: R.current,
384
390
  searchResult: e.searchResult,
385
391
  searchResultHighlightedIndex: e.searchResultHighlightedIndex
386
- }), n = !0), n && Q();
387
- }), V.subscribe((e) => {
388
- e && (n?.abort(), n = new AbortController(), J.current = e, q.current += 1, a());
392
+ }), n = !0), n && Z();
393
+ }), xe.subscribe((e) => {
394
+ e && (r?.abort(), r = new AbortController(), J.current = e, q.current += 1, o());
389
395
  })];
390
396
  return () => {
391
- t = !1, n?.abort(), J.current = null, e !== null && cancelAnimationFrame(e), q.current += 1, o.forEach((e) => e());
397
+ n = !1, r?.abort(), J.current = null, t !== null && cancelAnimationFrame(t), q.current += 1, s.forEach((e) => e());
392
398
  };
393
399
  }, [
394
- j,
400
+ N,
395
401
  W,
396
- B,
402
+ V,
397
403
  G,
398
- Q,
399
- V
400
- ]), m(() => {
401
- let e = [
402
- u.subscribe((e, t) => {
403
- e.nucleotidePalette !== t.nucleotidePalette && Q();
404
+ Z,
405
+ xe
406
+ ]), n(() => {
407
+ let t = [
408
+ O.subscribe((e, t) => {
409
+ (e.readingMode !== t.readingMode || e.readingFrame !== t.readingFrame) && (H.current = null, Z()), (e.nucleotidePalette !== t.nucleotidePalette || e.aminoAcidPalette !== t.aminoAcidPalette) && Z();
404
410
  }),
405
411
  W.subscribe(() => {
406
- X(), Q();
412
+ X(), Z();
407
413
  }),
408
- z.subscribe(() => Q()),
409
- B.subscribe((e) => {
410
- e && (X(), Q());
414
+ B.subscribe(() => Z()),
415
+ V.subscribe((e) => {
416
+ e && (X(), Z());
411
417
  }),
412
- G.subscribe(() => Q()),
413
- C.resolve(O).subscribe((e) => {
414
- pe(e), X(), Q();
418
+ G.subscribe(() => Z()),
419
+ e.resolve(f).subscribe((e) => {
420
+ _e(e), X(), Z();
415
421
  })
416
422
  ];
417
423
  return () => {
418
- e.forEach((e) => e());
424
+ t.forEach((e) => e());
419
425
  };
420
426
  }, [
421
- j,
427
+ N,
422
428
  W,
429
+ V,
423
430
  B,
424
- z,
425
431
  G,
426
432
  X,
427
- Q
428
- ]), m(() => {
429
- let e = (e) => {
430
- let t = e.key.toUpperCase();
431
- r.has(t) && (e.preventDefault(), C.resolve(i).emit("onMutateSelection", t));
432
- }, t = (e) => C.resolve(ee).registerShortcut({
433
- callback: e.callback,
434
- element: I.current,
435
- ...e.shortcut
436
- }), n = [
437
- t(s.copySelection),
438
- t(s.expandSelectionLeft),
439
- t(s.expandSelectionRight),
440
- t(s.expandSelectionUp),
441
- t(s.expandSelectionDown),
442
- t(s.moveSelectionLeft),
443
- t(s.moveSelectionRight),
444
- t(s.moveSelectionUp),
445
- t(s.moveSelectionDown),
446
- t(s.moveRowUp),
447
- t(s.moveRowDown),
448
- t(s.moveRowToStart),
449
- t(s.moveRowToEnd),
450
- t(s.moveCellLeft),
451
- t(s.moveCellRight),
452
- t(s.scrollToLineStart),
453
- t(s.scrollToLineEnd),
454
- t(s.scrollPageUp),
455
- t(s.scrollPageDown),
456
- t(s.insertGap),
457
- t(s.deleteBackward),
458
- t(s.deleteSelection),
459
- t(s.deleteRows),
460
- t(s.deleteRowsMac),
461
- t(s.deleteBase),
462
- t(s.pasteFasta),
463
- t(s.undo),
464
- t(s.redo),
465
- t(s.gotoPosition),
466
- C.resolve(ee).registerShortcut({
467
- callback: e,
468
- element: I.current
433
+ Z
434
+ ]), n(() => {
435
+ let t = (t) => {
436
+ let n = t.key.toUpperCase();
437
+ S.has(n) && (t.preventDefault(), e.resolve(x).emit("onMutateSelection", n));
438
+ }, n = (t) => e.resolve(p).registerShortcut({
439
+ callback: t.callback,
440
+ element: L.current,
441
+ ...t.shortcut
442
+ }), r = [
443
+ n(E.copySelection),
444
+ n(E.expandSelectionLeft),
445
+ n(E.expandSelectionRight),
446
+ n(E.expandSelectionUp),
447
+ n(E.expandSelectionDown),
448
+ n(E.moveSelectionLeft),
449
+ n(E.moveSelectionRight),
450
+ n(E.moveSelectionUp),
451
+ n(E.moveSelectionDown),
452
+ n(E.moveRowUp),
453
+ n(E.moveRowDown),
454
+ n(E.moveRowToStart),
455
+ n(E.moveRowToEnd),
456
+ n(E.moveCellLeft),
457
+ n(E.moveCellRight),
458
+ n(E.scrollToLineStart),
459
+ n(E.scrollToLineEnd),
460
+ n(E.scrollPageUp),
461
+ n(E.scrollPageDown),
462
+ n(E.insertGap),
463
+ n(E.deleteBackward),
464
+ n(E.deleteSelection),
465
+ n(E.deleteRows),
466
+ n(E.deleteRowsMac),
467
+ n(E.deleteBase),
468
+ n(E.pasteFasta),
469
+ n(E.undo),
470
+ n(E.redo),
471
+ n(E.gotoPosition),
472
+ e.resolve(p).registerShortcut({
473
+ callback: t,
474
+ element: L.current
469
475
  }),
470
- C.resolve(ee).registerShortcut({
471
- callback: e,
472
- element: I.current,
476
+ e.resolve(p).registerShortcut({
477
+ callback: t,
478
+ element: L.current,
473
479
  modifiers: [["Shift"]]
474
480
  })
475
481
  ];
476
482
  return () => {
477
- n.forEach((e) => e());
483
+ r.forEach((e) => e());
478
484
  };
479
- }, []), m(() => {
480
- let e = async (e) => {
485
+ }, []);
486
+ let $ = t(() => O.getState().readingMode === T.AMINO_ACIDS && (O.getState().setLatestMessage("Mutations are not allowed in amino acid reading mode."), !0), []);
487
+ n(() => {
488
+ let t = async (e) => {
481
489
  let { abortSignal: t, command: n, getSelectionPostCommand: r, invalidateRowNames: i } = e;
482
490
  try {
483
- let e = B.data?.undoDepth;
484
- if (await n(), t?.aborted) return;
485
- H.current = null, i && (U.current = null);
486
- let a = await Z();
487
- if (r) {
488
- if (e !== void 0 && a?.undoDepth === e) return;
489
- let t = r();
490
- G.next(t), K.current = t;
491
+ let e = await n();
492
+ if (t?.aborted || e === !1) return !1;
493
+ if (H.current = null, i && (U.current = null), await Ce(), r) {
494
+ let e = r();
495
+ G.next(e), K.current = e;
491
496
  }
497
+ return !0;
492
498
  } catch (e) {
493
- t?.aborted || console.error("Failed to post command:", e);
499
+ return t?.aborted || console.error("Failed to post command:", e), !1;
494
500
  }
495
- }, t = async (t) => {
496
- if (!B.data) return;
497
- let n = c.getMutateArguments(G.data, B.data);
498
- n && await e({ command: async () => {
499
- await j.mutate(n.rows, n.columns, t);
500
- } });
501
- }, n = (e) => {
502
- if (!B.data) return;
503
- let t = c.getMovedSelection(G.data, e, B.data);
501
+ }, n = async (e) => {
502
+ if (!V.data || $()) return;
503
+ let n = D.getMutateArguments(G.data, V.data);
504
+ n && await t({ command: async () => N.mutate(n.rows, n.columns, e) });
505
+ }, r = (e) => {
506
+ if (!V.data) return;
507
+ let t = D.getMovedSelection(G.data, e, V.data);
504
508
  if (t) {
505
509
  if (G.next(t), K.current) {
506
- let t = c.getMovedSelection(K.current, e, B.data);
510
+ let t = D.getMovedSelection(K.current, e, V.data);
507
511
  K.current = t;
508
512
  } else K.current = t;
509
513
  }
510
- }, r = (e) => {
511
- if (!B.data || !K.current || !G.data) return;
512
- let t = c.getExpandedSelection(G.data, K.current, e, B.data);
514
+ }, i = (e) => {
515
+ if (!V.data || !K.current || !G.data) return;
516
+ let t = D.getExpandedSelection(G.data, K.current, e, V.data);
513
517
  t && G.next(t);
514
- }, o = async (t) => {
515
- if (!B.data) return;
516
- let n = c.getRowsToMove(G.data, t, B.data);
517
- n && await e({
518
+ }, a = async (e) => {
519
+ if (!V.data) return;
520
+ let n = D.getRowsToMove(G.data, e, V.data);
521
+ n && await t({
518
522
  command: async () => {
519
- t === a.UP ? (await j.moveRowsToTop(n), L.current && (L.current.scrollTop = 0)) : (await j.moveRowsToBottom(n), L.current && (L.current.scrollTop = L.current.scrollHeight - L.current.clientHeight));
523
+ if (e === C.UP) {
524
+ let e = await N.moveRowsToTop(n);
525
+ return e && R.current && (R.current.scrollTop = 0), e;
526
+ }
527
+ let t = await N.moveRowsToBottom(n);
528
+ return t && R.current && (R.current.scrollTop = R.current.scrollHeight - R.current.clientHeight), t;
520
529
  },
521
- getSelectionPostCommand: () => c.getMovedRowsEndSelection(G.data, t, B.data),
530
+ getSelectionPostCommand: () => D.getMovedRowsEndSelection(G.data, e, V.data),
522
531
  invalidateRowNames: !0
523
532
  });
524
- }, s = async (t) => {
525
- if (!B.data) return;
526
- let n = c.getRowsToMove(G.data, t, B.data);
527
- n && await e({
528
- command: async () => {
529
- t === a.UP ? await j.moveRowsUp(n) : await j.moveRowsDown(n);
530
- },
531
- getSelectionPostCommand: () => c.getMovedRowsRelativeSelection(G.data, t, B.data),
533
+ }, o = async (e) => {
534
+ if (!V.data) return;
535
+ let n = D.getRowsToMove(G.data, e, V.data);
536
+ n && await t({
537
+ command: async () => e === C.UP ? N.moveRowsUp(n) : N.moveRowsDown(n),
538
+ getSelectionPostCommand: () => D.getMovedRowsRelativeSelection(G.data, e, V.data),
532
539
  invalidateRowNames: !0
533
540
  });
534
- }, d = async (t) => {
535
- if (!B.data || t !== a.LEFT && t !== a.RIGHT || !G.data?.cells && (!G.data?.cols || G.data.cols.length === 0)) return;
536
- let n = c.getMutateArguments(G.data, B.data);
537
- n && n.columns.length !== 0 && n.rows.length !== 0 && await e({
538
- command: async () => {
539
- await j.moveHorizontal(n.rows, n.columns, t);
540
- },
541
- getSelectionPostCommand: () => c.getPostUpsertSelection(G.data, t)
541
+ }, l = async (e) => {
542
+ if ($() || !V.data || e !== C.LEFT && e !== C.RIGHT || !G.data?.cells && (!G.data?.cols || G.data.cols.length === 0)) return;
543
+ let n = D.getMutateArguments(G.data, V.data);
544
+ n && n.columns.length !== 0 && n.rows.length !== 0 && await t({
545
+ command: async () => N.moveHorizontal(n.rows, n.columns, e),
546
+ getSelectionPostCommand: () => D.getPostUpsertSelection(G.data, e)
542
547
  });
543
- }, f = C.resolve(i), p = null, m = null, h = async (t) => {
544
- if (u.getState().isRealigning || !t.trimStart().startsWith(">")) return;
545
- m?.abort();
548
+ }, u = e.resolve(x), d = null, f = null, p = async (e) => {
549
+ if ($() || O.getState().isRealigning || !e.trimStart().startsWith(">")) return;
550
+ f?.abort();
546
551
  let n = new AbortController();
547
- m = n;
552
+ f = n;
548
553
  try {
549
- await e({
554
+ await t({
550
555
  abortSignal: n.signal,
551
556
  command: async () => {
552
- let e = j.loadFasta(t, n.signal);
553
- await e, e.abortSignal?.aborted || (u.getState().searchQuery && f.emit("onSearch", u.getState().searchQuery), u.getState().setLatestMessage("Pasted sequences from clipboard"));
557
+ let t = N.loadFasta(e, n.signal), r = await t;
558
+ return t.abortSignal?.aborted || !r ? !1 : (O.getState().searchQuery && u.emit("onSearch", O.getState().searchQuery), O.getState().setLatestMessage("Pasted sequences from clipboard"), !0);
554
559
  },
555
- getSelectionPostCommand: () => c.getPostPasteSequencesSelection(G.data, t),
560
+ getSelectionPostCommand: () => D.getPostPasteSequencesSelection(G.data, e),
556
561
  invalidateRowNames: !0
557
562
  });
558
563
  } catch (e) {
559
- n.signal.aborted || (console.error("Failed to load FASTA from clipboard:", e), u.getState().setLatestMessage("Failed to load FASTA from clipboard."));
564
+ n.signal.aborted || (console.error("Failed to load FASTA from clipboard:", e), O.getState().setLatestMessage("Failed to load FASTA from clipboard."));
560
565
  } finally {
561
- m === n && (m = null);
566
+ f === n && (f = null);
562
567
  }
563
- }, g = (e) => {
568
+ }, m = (e) => {
564
569
  let t = e.target;
565
570
  if (t instanceof HTMLElement && (t.isContentEditable || t.closest("input, textarea, select"))) return;
566
571
  let n = e.clipboardData?.getData("text/plain") ?? "";
567
- n.trimStart().startsWith(">") && (e.preventDefault(), h(n));
572
+ n.trimStart().startsWith(">") && (e.preventDefault(), p(n));
568
573
  };
569
- C.resolve(re).window.addEventListener("paste", g);
570
- let _ = [
571
- () => C.resolve(re).window.removeEventListener("paste", g),
572
- f.addEventListener("onSearch", async (e) => {
574
+ e.resolve(_).window.addEventListener("paste", m);
575
+ let g = [
576
+ () => e.resolve(_).window.removeEventListener("paste", m),
577
+ u.addEventListener("onSearch", async (e) => {
573
578
  if (!e) {
574
- p?.abort();
579
+ d?.abort();
575
580
  return;
576
581
  }
577
- p?.abort();
582
+ d?.abort();
578
583
  let t = new AbortController();
579
- p = t;
580
- let n = j.search(e, !0, t.signal);
584
+ d = t;
585
+ let n = N.search(e, !0, t.signal);
581
586
  try {
582
587
  let e = await n;
583
- n.abortSignal?.aborted || u.getState().setSearchResult(e);
588
+ n.abortSignal?.aborted || O.getState().setSearchResult(e);
584
589
  } catch (e) {
585
590
  t.signal.aborted || console.error("Failed to search sequences:", e);
586
591
  }
587
592
  }),
588
- f.addEventListener("onExpandSelection", (e) => r(e)),
589
- f.addEventListener("onCopySelection", async () => {
593
+ u.addEventListener("onDeselect", () => {
594
+ G.next(null), K.current = null;
595
+ }),
596
+ u.addEventListener("onExpandSelection", (e) => i(e)),
597
+ u.addEventListener("onCopySelection", async () => {
590
598
  let e = G.data;
591
599
  if (e) try {
592
- let t = await j.exportGappedFasta(), n = c.getSelectedFasta(t, e);
600
+ let t = await N.exportGappedFasta(), n = D.getSelectedFasta(t, e);
593
601
  if (!n) return;
594
- await navigator.clipboard.writeText(n), u.getState().setLatestMessage("Copied selected sequences to clipboard");
602
+ await navigator.clipboard.writeText(n), O.getState().setLatestMessage("Copied selected sequences to clipboard");
595
603
  } catch (e) {
596
- console.error("Failed to copy selected sequences:", e), u.getState().setLatestMessage("Failed to copy selected sequences to clipboard.");
604
+ console.error("Failed to copy selected sequences:", e), O.getState().setLatestMessage("Failed to copy selected sequences to clipboard.");
597
605
  }
598
606
  }),
599
- f.addEventListener("onPasteFasta", async () => {
607
+ u.addEventListener("onPasteFasta", async () => {
600
608
  try {
601
609
  console.log("Reading FASTA from clipboard");
602
610
  let e = await navigator.clipboard.readText();
603
- await h(e);
611
+ await p(e);
604
612
  } catch (e) {
605
- console.error("Failed to read FASTA from clipboard:", e), u.getState().setLatestMessage("Failed to read FASTA from clipboard.");
613
+ console.error("Failed to read FASTA from clipboard:", e), O.getState().setLatestMessage("Failed to read FASTA from clipboard.");
606
614
  }
607
615
  }),
608
- f.addEventListener("onGotoPosition", () => ce.current?.open({})),
609
- f.addEventListener("onMoveSelection", (e) => n(e)),
610
- f.addEventListener("onMoveRows", (e) => {
611
- s(e);
612
- }),
613
- f.addEventListener("onMoveRowsEnd", (e) => {
616
+ u.addEventListener("onGotoPosition", () => de.current?.open({})),
617
+ u.addEventListener("onMoveSelection", (e) => r(e)),
618
+ u.addEventListener("onMoveRows", (e) => {
614
619
  o(e);
615
620
  }),
616
- f.addEventListener("onMoveCells", (e) => {
617
- d(e);
621
+ u.addEventListener("onMoveRowsEnd", (e) => {
622
+ a(e);
618
623
  }),
619
- f.addEventListener("onScrollToLineStart", () => {
620
- let e = L.current;
624
+ u.addEventListener("onMoveCells", (e) => {
625
+ l(e);
626
+ }),
627
+ u.addEventListener("onScrollToLineStart", () => {
628
+ let e = R.current;
621
629
  e && (e.scrollLeft = 0);
622
630
  }),
623
- f.addEventListener("onScrollToLineEnd", () => {
624
- let e = L.current;
631
+ u.addEventListener("onScrollToLineEnd", () => {
632
+ let e = R.current;
625
633
  e && (e.scrollLeft = e.scrollWidth - e.clientWidth);
626
634
  }),
627
- f.addEventListener("onScrollPageUp", () => {
628
- let e = L.current;
635
+ u.addEventListener("onScrollPageUp", () => {
636
+ let e = R.current;
629
637
  e && (e.scrollTop = Math.max(0, e.scrollTop - e.clientHeight));
630
638
  }),
631
- f.addEventListener("onScrollPageDown", () => {
632
- let e = L.current;
639
+ u.addEventListener("onScrollPageDown", () => {
640
+ let e = R.current;
633
641
  e && (e.scrollTop = Math.min(e.scrollHeight - e.clientHeight, e.scrollTop + e.clientHeight));
634
642
  }),
635
- f.addEventListener("onInsert", () => {
643
+ u.addEventListener("onInsert", () => {
636
644
  (async () => {
637
- if (!B.data) return;
638
- let t = c.getUpsertArguments(G.data, B.data);
639
- t && await e({
640
- command: async () => j.insert(t.rows, t.col),
641
- getSelectionPostCommand: () => c.getPostUpsertSelection(G.data, a.RIGHT)
645
+ if (!V.data || $()) return;
646
+ let e = D.getUpsertArguments(G.data, V.data);
647
+ e && await t({
648
+ command: async () => N.insert(e.rows, e.col),
649
+ getSelectionPostCommand: () => D.getPostUpsertSelection(G.data, C.RIGHT)
642
650
  });
643
651
  })();
644
652
  }),
645
- f.addEventListener("onDeleteBackward", () => {
653
+ u.addEventListener("onDeleteBackward", () => {
646
654
  (async () => {
647
- if (!B.data) return;
648
- let t = c.getUpsertArguments(G.data, B.data, -1);
649
- t && await e({
650
- command: async () => j.delete(t.rows, t.col),
651
- getSelectionPostCommand: () => c.getPostUpsertSelection(G.data, a.LEFT)
655
+ if (!V.data || $()) return;
656
+ let e = D.getUpsertArguments(G.data, V.data, -1);
657
+ e && await t({
658
+ command: async () => N.delete(e.rows, e.col),
659
+ getSelectionPostCommand: () => D.getPostUpsertSelection(G.data, C.LEFT)
652
660
  });
653
661
  })();
654
662
  }),
655
- f.addEventListener("onDeleteRows", () => {
663
+ u.addEventListener("onDeleteRows", () => {
656
664
  (async () => {
657
- let t = G.data, n = t?.rows, r = B.data;
658
- n?.length && r && (await e({
659
- command: async () => j.deleteRows(n),
660
- getSelectionPostCommand: () => c.getPostDeleteRowsSelection(t, r.sequenceCount),
665
+ let e = G.data, n = e?.rows, r = V.data;
666
+ n?.length && r && await t({
667
+ command: async () => N.deleteRows(n),
668
+ getSelectionPostCommand: () => D.getPostDeleteRowsSelection(e, r.sequenceCount),
661
669
  invalidateRowNames: !0
662
- }), u.getState().setLatestMessage(`${n.length} row${n.length > 1 ? "s" : ""} deleted`));
670
+ }) && O.getState().setLatestMessage(`${n.length} row${n.length > 1 ? "s" : ""} deleted`);
663
671
  })();
664
672
  }),
665
- f.addEventListener("onMutateSelection", (e) => {
666
- t(e);
673
+ u.addEventListener("onMutateSelection", (e) => {
674
+ n(e);
667
675
  }),
668
- f.addEventListener("onUndo", () => {
669
- e({
670
- command: async () => j.undo(),
676
+ u.addEventListener("onUndo", () => {
677
+ t({
678
+ command: async () => N.undo(),
671
679
  getSelectionPostCommand: () => null,
672
680
  invalidateRowNames: !0
673
681
  });
674
682
  }),
675
- f.addEventListener("onCancelRealign", () => {
676
- j.cancelRealign();
683
+ u.addEventListener("onCancelRealign", () => {
684
+ N.cancelRealign();
677
685
  }),
678
- f.addEventListener("onRealign", () => {
679
- u.getState().setIsRealigning(!0);
680
- let t = !1;
681
- e({
686
+ u.addEventListener("onRealign", () => {
687
+ O.getState().setIsRealigning(!0), t({
682
688
  command: async () => {
683
689
  try {
684
- await j.realign();
690
+ return await N.realign();
685
691
  } catch (e) {
686
- if (e instanceof DOMException && e.name === "AbortError") t = !0;
687
- else throw u.getState().setLatestMessage(l.getEngineErrorMessage(e)), e;
692
+ if (e instanceof DOMException && e.name === "AbortError") return !1;
693
+ throw O.getState().setLatestMessage(te.getEngineErrorMessage(e)), e;
688
694
  } finally {
689
- u.getState().setIsRealigning(!1);
695
+ O.getState().setIsRealigning(!1);
690
696
  }
691
697
  },
692
- getSelectionPostCommand: () => t ? G.data : null,
698
+ getSelectionPostCommand: () => null,
693
699
  invalidateRowNames: !0
694
700
  });
695
701
  }),
696
- f.addEventListener("onRedo", () => {
697
- e({
698
- command: async () => j.redo(),
702
+ u.addEventListener("onRedo", () => {
703
+ t({
704
+ command: async () => N.redo(),
699
705
  getSelectionPostCommand: () => null,
700
706
  invalidateRowNames: !0
701
707
  });
702
708
  }),
703
- f.addEventListener("onExportGappedFasta", async () => {
704
- let e = await j.exportGappedFasta();
705
- te.downloadFastaFile(e, "sequence.gapped.fasta");
709
+ u.addEventListener("onExportGappedFasta", async () => {
710
+ let e = await N.exportGappedFasta();
711
+ h.downloadFastaFile(e, "sequence.gapped.fasta");
706
712
  }),
707
- f.addEventListener("onExportUngappedFasta", async () => {
708
- let e = await j.exportUngappedFasta();
709
- te.downloadFastaFile(e, "sequence.ungapped.fasta");
713
+ u.addEventListener("onExportUngappedFasta", async () => {
714
+ let e = await N.exportUngappedFasta();
715
+ h.downloadFastaFile(e, "sequence.ungapped.fasta");
710
716
  }),
711
- f.addEventListener("onExportToLoculus", async () => {
712
- let e = await j.exportUngappedFasta(), { parsedMetadata: t, rawFasta: n } = u.getState();
713
- se.current?.open({
717
+ u.addEventListener("onExportToLoculus", async () => {
718
+ let e = await N.exportUngappedFasta(), { parsedMetadata: t, rawFasta: n } = O.getState();
719
+ ue.current?.open({
714
720
  fasta: e,
715
721
  metaData: t,
716
722
  rawFasta: n
717
723
  });
718
724
  }),
719
- f.addEventListener("onOpenInPhylogenyViewer", async () => {
720
- if (!y.phylogenyViewerUrl) return;
721
- let e = await j.exportUngappedFasta(), t = u.getState().rawMetadata, n = new URL(y.phylogenyViewerUrl).origin, r = C.resolve(re).window, i = null, a = (o) => {
722
- o.origin === n && o.source === i && typeof o.data == "object" && o.data !== null && "type" in o.data && o.data.type === "data-receiver-ready" && (r.removeEventListener("message", a), i?.postMessage({
723
- fasta: e,
724
- metaData: t,
725
- type: "import-data"
726
- }, n));
727
- };
728
- r.addEventListener("message", a), i = r.open(y.phylogenyViewerUrl), i || r.removeEventListener("message", a);
725
+ u.addEventListener("onOpenInPhylogenyViewer", async () => {
726
+ s.phylogenyViewerUrl && await c(s.phylogenyViewerUrl, async () => ({
727
+ fasta: await N.exportGappedFasta(),
728
+ metaData: O.getState().rawMetadata
729
+ }));
729
730
  })
730
731
  ];
731
732
  return () => {
732
- window.removeEventListener("paste", g), p?.abort(), m?.abort(), _.forEach((e) => e()), j.cancelRealign();
733
+ window.removeEventListener("paste", m), d?.abort(), f?.abort(), g.forEach((e) => e()), N.cancelRealign();
733
734
  };
734
735
  }, [
735
- j,
736
+ N,
736
737
  G,
738
+ Ce,
737
739
  Z,
738
- Q,
739
- B,
740
- y.phylogenyViewerUrl
741
- ]), m(() => {
742
- Q();
743
- }, [Q]);
744
- let ye = p((e) => {
740
+ V,
741
+ s.phylogenyViewerUrl,
742
+ c,
743
+ $
744
+ ]), n(() => {
745
+ Z();
746
+ }, [Z]);
747
+ let Te = t((e) => {
745
748
  let t = e.currentTarget;
746
- z.next({
749
+ B.next({
747
750
  scrollLeft: t.scrollLeft,
748
751
  scrollTop: t.scrollTop
749
752
  });
750
- }, [z]), be = p((e) => {
751
- I.current?.focus();
752
- let t = e.currentTarget, n = t.getBoundingClientRect(), r = e.clientX >= n.left + t.clientWidth, i = e.clientY >= n.top + t.clientHeight;
753
- if (r || i) return;
754
- let a = M.current, s = N.current, l = C.resolve(O).data;
755
- if (!a || !s) return;
756
- let u = c.getPathPropertiesFromCanvas({
757
- canvas: a,
758
- devicePixelRatio: l,
753
+ }, [B]), Ee = t((t) => {
754
+ L.current?.focus();
755
+ let n = t.currentTarget, r = n.getBoundingClientRect(), i = t.clientX >= r.left + n.clientWidth, a = t.clientY >= r.top + n.clientHeight;
756
+ if (i || a) return;
757
+ let o = P.current, s = F.current, c = e.resolve(f).data;
758
+ if (!o || !s) return;
759
+ let l = D.getPathPropertiesFromCanvas({
760
+ canvas: o,
761
+ devicePixelRatio: c,
759
762
  editorAssembly: s,
760
- event: e.nativeEvent
763
+ event: t.nativeEvent
761
764
  });
762
- if (u) {
763
- if (u.type !== o.DIVIDER) {
764
- if (u.type === o.LABEL && (e.metaKey || e.ctrlKey)) {
765
- let t = G.data?.rows ?? [], n = t.includes(u.row) ? t.filter((e) => e !== u.row) : [...t, u.row].sort((e, t) => e - t);
766
- if (e.preventDefault(), F.current = null, n.length === 0) {
765
+ if (l) {
766
+ if (l.type !== w.DIVIDER) {
767
+ if (l.type === w.LABEL && (t.metaKey || t.ctrlKey)) {
768
+ let e = G.data?.rows ?? [], n = e.includes(l.row) ? e.filter((e) => e !== l.row) : [...e, l.row].sort((e, t) => e - t);
769
+ if (t.preventDefault(), I.current = null, n.length === 0) {
767
770
  G.next(null), K.current = null;
768
771
  return;
769
772
  }
770
773
  G.next({ rows: n }), K.current = { rows: n };
771
774
  return;
772
775
  }
773
- let t = c.getSelectionFromPathProperties({
774
- endPath: u,
775
- startPath: u
776
+ let e = D.getSelectionFromPathProperties({
777
+ endPath: l,
778
+ startPath: l
776
779
  });
777
- if (!t) return;
778
- e.preventDefault(), F.current = u, G.next(t), K.current = t;
779
- } else e.preventDefault(), F.current = null, P.current = {
780
+ if (!e) return;
781
+ t.preventDefault(), I.current = l, G.next(e), K.current = e;
782
+ } else t.preventDefault(), I.current = null, pe.current = {
780
783
  startLabelWidth: W.data.labelWidth,
781
- startX: e.clientX
784
+ startX: t.clientX
782
785
  };
783
786
  }
784
- }, [W, G]), xe = p((e) => {
785
- let t = M.current, n = I.current, r = C.resolve(O).data, i = P.current;
786
- if (!n || !t) return;
787
- if (i) {
788
- let t = Math.min($, Math.max(120, i.startLabelWidth + e.clientX - i.startX));
787
+ }, [W, G]), De = t((t) => {
788
+ let n = P.current, r = L.current, i = e.resolve(f).data, a = pe.current;
789
+ if (!r || !n) return;
790
+ if (a) {
791
+ let e = Math.min(Q, Math.max(120, a.startLabelWidth + t.clientX - a.startX));
789
792
  W.next({
790
793
  ...W.data,
791
- labelWidth: t
792
- }), n.style.cursor = "col-resize";
794
+ labelWidth: e
795
+ }), r.style.cursor = "col-resize";
793
796
  return;
794
797
  }
795
- let a = F.current;
796
- if (a) {
797
- let n = N.current;
798
- if (!n) return;
799
- let i = c.getPathPropertiesFromCanvas({
800
- canvas: t,
801
- devicePixelRatio: r,
802
- editorAssembly: n,
803
- event: e.nativeEvent
798
+ let o = I.current;
799
+ if (o) {
800
+ let e = F.current;
801
+ if (!e) return;
802
+ let r = D.getPathPropertiesFromCanvas({
803
+ canvas: n,
804
+ devicePixelRatio: i,
805
+ editorAssembly: e,
806
+ event: t.nativeEvent
804
807
  });
805
- if (!i) return;
806
- let o = c.getSelectionFromPathProperties({
807
- endPath: i,
808
- startPath: a
808
+ if (!r) return;
809
+ let a = D.getSelectionFromPathProperties({
810
+ endPath: r,
811
+ startPath: o
809
812
  });
810
- o && (G.next(o), K.current = o);
813
+ a && (G.next(a), K.current = a);
811
814
  return;
812
815
  }
813
- let s = N.current;
816
+ let s = F.current;
814
817
  if (!s) return;
815
- let l = c.getPathPropertiesFromCanvas({
816
- canvas: t,
817
- devicePixelRatio: r,
818
+ let c = D.getPathPropertiesFromCanvas({
819
+ canvas: n,
820
+ devicePixelRatio: i,
818
821
  editorAssembly: s,
819
- event: e.nativeEvent
822
+ event: t.nativeEvent
820
823
  });
821
- l && l.type === o.DIVIDER ? n.style.cursor = "col-resize" : n.style.cursor = "default";
824
+ c && c.type === w.DIVIDER ? r.style.cursor = "col-resize" : r.style.cursor = "default";
822
825
  }, [
823
826
  W,
824
- $,
827
+ Q,
825
828
  G
826
- ]), Se = p(() => {
827
- P.current = null, F.current = null;
828
- }, []), Ce = p((e, t) => {
829
- c.scrollToPosition({
829
+ ]), Oe = t(() => {
830
+ pe.current = null, I.current = null;
831
+ }, []), ke = t((e, t) => {
832
+ D.scrollToPosition({
830
833
  geometry: W.data,
831
- scrollContainer: L.current,
834
+ scrollContainer: R.current,
832
835
  x: e,
833
836
  y: t
834
837
  });
835
- }, [W]), we = Math.max(1, Math.floor(R.width * fe)), Te = Math.max(1, Math.floor(R.height * fe));
836
- return /* @__PURE__ */ T(v, {
838
+ }, [W]), Ae = Math.max(1, Math.floor(z.width * ge)), je = Math.max(1, Math.floor(z.height * ge));
839
+ return /* @__PURE__ */ A(o, {
837
840
  sx: {
838
841
  display: "grid",
839
- gridTemplateRows: "max-content auto",
842
+ gridTemplateRows: "max-content max-content auto",
840
843
  height: "100%",
841
844
  position: "relative",
842
845
  width: "100%"
843
846
  },
844
847
  children: [
845
- /* @__PURE__ */ w(d, {}),
846
- /* @__PURE__ */ T(v, {
847
- onMouseUp: Se,
848
- ref: I,
848
+ /* @__PURE__ */ k(o, {
849
+ sx: {
850
+ borderBottom: `1px solid ${Y.palette.divider}`,
851
+ py: .5
852
+ },
853
+ children: /* @__PURE__ */ k(ie, {})
854
+ }),
855
+ /* @__PURE__ */ A(o, {
856
+ sx: {
857
+ alignItems: "center",
858
+ display: "grid",
859
+ gap: 1,
860
+ gridTemplateColumns: "4fr 1fr",
861
+ position: "relative"
862
+ },
863
+ children: [/* @__PURE__ */ k(ae, {}), /* @__PURE__ */ k(ne, {})]
864
+ }),
865
+ /* @__PURE__ */ A(o, {
866
+ onMouseUp: Oe,
867
+ ref: L,
849
868
  sx: {
850
869
  height: `calc(100% - ${Y.spacing(3)})`,
851
870
  marginBottom: Y.spacing(3),
@@ -854,11 +873,11 @@ var ae = () => {
854
873
  },
855
874
  tabIndex: 0,
856
875
  children: [
857
- /* @__PURE__ */ w(v, {
858
- onMouseDown: be,
859
- onMouseMove: xe,
860
- onScroll: ye,
861
- ref: L,
876
+ /* @__PURE__ */ k(o, {
877
+ onMouseDown: Ee,
878
+ onMouseMove: De,
879
+ onScroll: Te,
880
+ ref: R,
862
881
  sx: {
863
882
  height: "100%",
864
883
  overflowX: "scroll",
@@ -867,28 +886,28 @@ var ae = () => {
867
886
  width: "100%",
868
887
  zIndex: 1
869
888
  },
870
- children: /* @__PURE__ */ w(v, {
871
- ref: ue,
889
+ children: /* @__PURE__ */ k(o, {
890
+ ref: me,
872
891
  sx: { pointerEvents: "none" }
873
892
  })
874
893
  }),
875
- /* @__PURE__ */ w("canvas", {
876
- height: Te,
877
- ref: M,
894
+ /* @__PURE__ */ k("canvas", {
895
+ height: je,
896
+ ref: P,
878
897
  style: {
879
898
  display: "block",
880
- height: `${R.height}px`,
899
+ height: `${z.height}px`,
881
900
  imageRendering: "pixelated",
882
901
  left: 0,
883
902
  pointerEvents: "auto",
884
903
  position: "absolute",
885
904
  top: 0,
886
- width: `${R.width}px`,
905
+ width: `${z.width}px`,
887
906
  zIndex: 0
888
907
  },
889
- width: we
908
+ width: Ae
890
909
  }),
891
- /* @__PURE__ */ w(v, {
910
+ /* @__PURE__ */ k(o, {
892
911
  sx: {
893
912
  bottom: Y.spacing(-3),
894
913
  height: Y.spacing(3),
@@ -897,19 +916,19 @@ var ae = () => {
897
916
  width: "100%",
898
917
  zIndex: 2
899
918
  },
900
- children: /* @__PURE__ */ w(ae, {})
919
+ children: /* @__PURE__ */ k(ce, {})
901
920
  })
902
921
  ]
903
922
  }),
904
- /* @__PURE__ */ w(oe, {
905
- onGotoPosition: Ce,
906
- ref: ce
923
+ /* @__PURE__ */ k(le, {
924
+ onGotoPosition: ke,
925
+ ref: de
907
926
  }),
908
- /* @__PURE__ */ w(f, { ref: le }),
909
- /* @__PURE__ */ w(ne, { ref: se })
927
+ /* @__PURE__ */ k(re, { ref: fe }),
928
+ /* @__PURE__ */ k(g, { ref: ue })
910
929
  ]
911
930
  });
912
931
  };
913
- export { se as t };
932
+ export { M as t };
914
933
 
915
934
  //# sourceMappingURL=SequenceEditor.js.map