@floegence/floe-webapp-core 0.35.55 → 0.35.57

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.
@@ -1,170 +1,185 @@
1
- import { createSignal as a, createMemo as c, createEffect as m, onCleanup as X, untrack as to } from "solid-js";
2
- import { Paste as oo, Plus as no, Trash as ro } from "../icons/index.js";
3
- import { NOTES_CONTEXT_MENU_WIDTH_PX as io, estimateNotesContextMenuHeight as co } from "./NotesContextMenu.js";
4
- import { samePoint as fe, resolveFrameSize as $, resolveOverviewBounds as so, createOverviewItem as ao, clamp as M, createContextMenuPosition as lo, NOTES_MOBILE_BREAKPOINT_PX as uo, getNormalizedOverviewPoint as ot, normalizeNoteText as po, findTrashTopicNoteCount as fo, hasLiveNotesForTopic as mo, NOTES_CANVAS_ZOOM_STEP as nt, resolveCenteredViewport as wo } from "./notesOverlayHelpers.js";
5
- import { normalizeNotesSnapshot as ho, groupTrashItems as vo, visibleWorldRect as To, computeBoardBounds as go } from "./types.js";
6
- import { useNotification as yo } from "../../context/NotificationContext.js";
7
- function w(r) {
1
+ import { createSignal as a, createMemo as c, createEffect as p, onCleanup as z, untrack as Ne } from "solid-js";
2
+ import { Paste as vo, Plus as To, Trash as go } from "../icons/index.js";
3
+ import { NOTES_CONTEXT_MENU_WIDTH_PX as yo, estimateNotesContextMenuHeight as No } from "./NotesContextMenu.js";
4
+ import { samePoint as xe, resolveFrameSize as J, resolveOverviewBounds as xo, createOverviewItem as bo, clamp as P, createContextMenuPosition as Co, NOTES_MOBILE_BREAKPOINT_PX as Mo, getNormalizedOverviewPoint as ft, normalizeNoteText as mt, findTrashTopicNoteCount as _o, hasLiveNotesForTopic as Po, NOTES_CANVAS_ZOOM_STEP as ht, resolveCenteredViewport as Io } from "./notesOverlayHelpers.js";
5
+ import { numberNotesInTopic as So, resolveNotesDigitSequence as ee } from "./notesNumbering.js";
6
+ import { normalizeNotesSnapshot as Do, groupTrashItems as ko, visibleWorldRect as Oo, computeBoardBounds as Xo } from "./types.js";
7
+ import { useNotification as Eo } from "../../context/NotificationContext.js";
8
+ const Lo = 650;
9
+ function h(r) {
8
10
  return r instanceof Error ? r.message : String(r);
9
11
  }
10
- function bo(r) {
11
- const l = yo();
12
- let me = 1, G = /* @__PURE__ */ new Set();
13
- const L = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map(), [we, rt] = a(), [_, it] = a({ width: 0, height: 0 }), [h, d] = a(null), [he, ve] = a(""), [K, Te] = a(null), [ge, Z] = a(""), [q, P] = a(null), [U, ye] = a(""), [Ne, xe] = a(""), [Ce, Me] = a("amber"), [_e, Pe] = a(!1), [be, Ie] = a(!1), [J, Oe] = a(null), [Q, ee] = a(""), [ct, b] = a(null), [st, at] = a(Date.now()), [lt, dt] = a(!1), [ke, v] = a(null), [ut, De] = a(null), [Se, I] = a(null), [Xe, R] = a(/* @__PURE__ */ new Map());
14
- let O, te, oe = null;
15
- const u = c(() => ho(r.controller.snapshot())), y = c(
16
- () => u().topics.filter((e) => e.deleted_at_unix_ms <= 0)
17
- ), pt = c(() => y().length), N = c(() => {
12
+ function jo(r) {
13
+ const s = Eo();
14
+ let be = 1, te = /* @__PURE__ */ new Set();
15
+ const F = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), [Ce, wt] = a(), [I, vt] = a({ width: 0, height: 0 }), [v, u] = a(null), [Me, _e] = a(""), [B, Pe] = a(null), [Ie, oe] = a(""), [V, S] = a(null), [ne, Se] = a(""), [De, ke] = a(""), [Oe, Xe] = a("amber"), [re, Ee] = a(!1), [Le, Ye] = a(!1), [j, Re] = a(null), [ie, ce] = a(""), [Tt, C] = a(null), [D, se] = a(""), [gt, yt] = a(Date.now()), [Nt, xt] = a(!1), [ze, T] = a(null), [bt, Fe] = a(null), [Ae, k] = a(null), [Be, $] = a(/* @__PURE__ */ new Map());
16
+ let O, N, ae, le = null;
17
+ const d = c(() => Do(r.controller.snapshot())), x = c(
18
+ () => d().topics.filter((e) => e.deleted_at_unix_ms <= 0)
19
+ ), Ct = c(() => x().length), b = c(() => {
18
20
  const e = r.controller.activeTopicID();
19
- return y().some((t) => t.topic_id === e) ? e : y()[0]?.topic_id ?? "";
20
- }), k = c(
21
- () => y().find((e) => e.topic_id === N())
22
- ), ft = c(() => {
23
- const e = Xe();
24
- return u().items.map((t) => {
21
+ return x().some((t) => t.topic_id === e) ? e : x()[0]?.topic_id ?? "";
22
+ }), X = c(
23
+ () => x().find((e) => e.topic_id === b())
24
+ ), Mt = c(() => {
25
+ const e = Be();
26
+ return d().items.map((t) => {
25
27
  const o = e.get(t.note_id);
26
- return !o || fe({ x: t.x, y: t.y }, o) ? t : {
28
+ return !o || xe({ x: t.x, y: t.y }, o) ? t : {
27
29
  ...t,
28
30
  x: o.x,
29
31
  y: o.y
30
32
  };
31
33
  });
32
- }), z = c(
33
- () => ft().filter((e) => e.topic_id === N())
34
- ), mt = c(() => vo(u().trash_items)), Le = c(() => u().trash_items.length), wt = c(() => u().items.length), ht = c(
35
- () => z().reduce((e, t) => Math.max(e, t.z_index), 1)
36
- ), T = c(() => Se() ?? r.controller.viewport()), vt = c(() => k()?.name ?? "No topic"), Tt = c(() => `${Math.round(T().scale * 100)}%`), gt = c(() => {
37
- const e = $(_());
38
- return To(T(), e.width, e.height);
39
- }), E = c(
40
- () => so(go(z()), gt())
41
- ), yt = c(
42
- () => z().map((e) => ao(e, E()))
43
- ), Ye = c(() => {
44
- const e = E(), t = $(_()), o = T(), n = -o.x / o.scale, i = -o.y / o.scale, s = t.width / o.scale, p = t.height / o.scale, f = M(n, e.minX, e.maxX), x = M(i, e.minY, e.maxY), C = M(n + s, e.minX, e.maxX), pe = M(i + p, e.minY, e.maxY), S = Math.max((C - f) / e.width * 100, 6), g = Math.max((pe - x) / e.height * 100, 8), et = (f - e.minX) / e.width * 100, tt = (x - e.minY) / e.height * 100;
34
+ }), W = c(
35
+ () => Mt().filter((e) => e.topic_id === b())
36
+ ), E = c(
37
+ () => So(d().items, b())
38
+ ), _t = c(
39
+ () => new Map(E().map((e) => [e.item.note_id, e.label]))
40
+ ), Pt = c(() => ko(d().trash_items)), Ve = c(() => d().trash_items.length), It = c(() => d().items.length), St = c(
41
+ () => W().reduce((e, t) => Math.max(e, t.z_index), 1)
42
+ ), g = c(() => Ae() ?? r.controller.viewport()), Dt = c(() => X()?.name ?? "No topic"), kt = c(() => `${Math.round(g().scale * 100)}%`), Ot = c(() => {
43
+ const e = J(I());
44
+ return Oo(g(), e.width, e.height);
45
+ }), q = c(
46
+ () => xo(Xo(W()), Ot())
47
+ ), Xt = c(
48
+ () => W().map((e) => bo(e, q()))
49
+ ), je = c(() => {
50
+ const e = q(), t = J(I()), o = g(), n = -o.x / o.scale, i = -o.y / o.scale, l = t.width / o.scale, f = t.height / o.scale, m = P(n, e.minX, e.maxX), M = P(i, e.minY, e.maxY), _ = P(n + l, e.minX, e.maxX), ye = P(i + f, e.minY, e.maxY), R = Math.max((_ - m) / e.width * 100, 6), y = Math.max((ye - M) / e.height * 100, 8), ut = (m - e.minX) / e.width * 100, pt = (M - e.minY) / e.height * 100;
45
51
  return {
46
- left: et,
47
- top: tt,
48
- width: S,
49
- height: g,
50
- centerX: et + S / 2,
51
- centerY: tt + g / 2
52
+ left: ut,
53
+ top: pt,
54
+ width: R,
55
+ height: y,
56
+ centerX: ut + R / 2,
57
+ centerY: pt + y / 2
52
58
  };
53
- }), Nt = c(() => {
54
- const e = Ye();
59
+ }), Et = c(() => {
60
+ const e = je();
55
61
  return {
56
62
  left: `${e.left}%`,
57
63
  top: `${e.top}%`,
58
64
  width: `${e.width}%`,
59
65
  height: `${e.height}%`
60
66
  };
61
- }), Re = c(() => {
62
- const e = q();
63
- return e ? u().items.find((t) => t.note_id === e) : void 0;
64
- }), ne = (e) => to(() => u().items.some((t) => t.note_id === e)), ze = () => {
65
- const e = me;
66
- return me += 1, e;
67
- }, xt = (e) => {
68
- const t = ze();
69
- return L.set(e, t), t;
70
- }, Ct = (e) => {
71
- const t = ze();
72
- return Y.set(e, t), t;
73
- }, Ee = (e, t) => L.get(e) === t, Fe = (e, t) => Y.get(e) === t, re = (e) => {
74
- L.delete(e);
75
- }, ie = (e) => {
76
- Y.delete(e);
77
- }, ce = (e) => {
78
- re(e), ie(e), A(e), v((t) => t === e ? null : t);
79
- }, Mt = (e) => {
80
- for (const t of u().items)
81
- t.topic_id === e && ce(t.note_id);
82
- }, _t = (e) => {
83
- ce(e), F(), b((t) => t === e ? null : t), d((t) => t?.noteID === e ? null : t), P((t) => t === e ? null : t);
84
- }, Pt = () => {
85
- L.clear(), Y.clear();
86
- }, F = () => {
67
+ }), $e = c(() => {
68
+ const e = V();
69
+ return e ? d().items.find((t) => t.note_id === e) : void 0;
70
+ }), We = c(
71
+ () => !!(V() || j() || B() || v() || re())
72
+ ), Lt = c(() => {
73
+ const e = D();
74
+ if (!e) return null;
75
+ const t = ee(e, E());
76
+ return t.kind !== "pending" ? null : t.exactMatch?.item.note_id ?? null;
77
+ }), de = (e) => Ne(() => d().items.some((t) => t.note_id === e)), qe = () => {
78
+ const e = be;
79
+ return be += 1, e;
80
+ }, Yt = (e) => {
81
+ const t = qe();
82
+ return F.set(e, t), t;
83
+ }, Rt = (e) => {
84
+ const t = qe();
85
+ return A.set(e, t), t;
86
+ }, He = (e, t) => F.get(e) === t, Ge = (e, t) => A.get(e) === t, ue = (e) => {
87
+ F.delete(e);
88
+ }, pe = (e) => {
89
+ A.delete(e);
90
+ }, fe = (e) => {
91
+ ue(e), pe(e), H(e), T((t) => t === e ? null : t);
92
+ }, zt = (e) => {
93
+ for (const t of d().items)
94
+ t.topic_id === e && fe(t.note_id);
95
+ }, Ft = (e) => {
96
+ fe(e), L(), C((t) => t === e ? null : t), u((t) => t?.noteID === e ? null : t), S((t) => t === e ? null : t);
97
+ }, At = () => {
98
+ F.clear(), A.clear();
99
+ }, L = () => {
87
100
  O !== void 0 && (window.clearTimeout(O), O = void 0);
88
- }, Ae = (e, t) => {
89
- R((o) => {
101
+ }, w = () => {
102
+ N !== void 0 && (window.clearTimeout(N), N = void 0), se("");
103
+ }, Ue = (e, t) => {
104
+ $((o) => {
90
105
  const n = o.get(e);
91
- if (n && fe(n, t)) return o;
106
+ if (n && xe(n, t)) return o;
92
107
  const i = new Map(o);
93
108
  return i.set(e, t), i;
94
109
  });
95
- }, A = (e) => {
96
- R((t) => {
110
+ }, H = (e) => {
111
+ $((t) => {
97
112
  if (!t.has(e)) return t;
98
113
  const o = new Map(t);
99
114
  return o.delete(e), o;
100
115
  });
101
- }, B = () => {
102
- Oe(null), ee("");
103
- }, V = () => {
104
- P(null);
105
- }, D = () => {
106
- Ie(!1);
107
- }, Be = () => {
108
- Ie(!0);
109
- }, j = () => {
110
- Pe(!1);
111
- }, se = () => {
112
- Pe(!0);
113
- }, W = () => {
114
- Te(null), Z("");
115
- }, bt = () => {
116
- d(null), j(), D(), V(), B(), R(/* @__PURE__ */ new Map()), Pt();
117
- }, It = () => {
118
- if (h()) {
119
- d(null);
116
+ }, G = () => {
117
+ Re(null), ce("");
118
+ }, U = () => {
119
+ S(null);
120
+ }, Y = () => {
121
+ Ye(!1);
122
+ }, Ke = () => {
123
+ Ye(!0);
124
+ }, K = () => {
125
+ Ee(!1);
126
+ }, me = () => {
127
+ Ee(!0);
128
+ }, Z = () => {
129
+ Pe(null), oe("");
130
+ }, Bt = () => {
131
+ u(null), K(), Y(), U(), G(), $(/* @__PURE__ */ new Map()), At();
132
+ }, Vt = () => {
133
+ if (v()) {
134
+ u(null);
120
135
  return;
121
136
  }
122
- if (q()) {
123
- V();
137
+ if (V()) {
138
+ U();
124
139
  return;
125
140
  }
126
- if (J()) {
127
- B();
141
+ if (j()) {
142
+ G();
128
143
  return;
129
144
  }
130
- if (be()) {
131
- D();
145
+ if (Le()) {
146
+ Y();
132
147
  return;
133
148
  }
134
- if (_e()) {
135
- j();
149
+ if (re()) {
150
+ K();
136
151
  return;
137
152
  }
138
153
  r.onClose();
139
- }, H = (e) => {
154
+ }, Q = (e) => {
140
155
  r.controller.setActiveTopicID(e);
141
- }, Ve = (e) => mo(u().items, e), Ot = (e, t, o = k()?.topic_id) => {
156
+ }, Ze = (e) => Po(d().items, e), jt = (e, t, o = X()?.topic_id) => {
142
157
  if (!o) return null;
143
- const n = y().find((f) => f.topic_id === o);
158
+ const n = x().find((m) => m.topic_id === o);
144
159
  if (!n) return null;
145
- const i = we();
160
+ const i = Ce();
146
161
  if (!i) return null;
147
- const s = i.getBoundingClientRect();
148
- if (s.width <= 0 || s.height <= 0 || e < s.left || e > s.right || t < s.top || t > s.bottom)
162
+ const l = i.getBoundingClientRect();
163
+ if (l.width <= 0 || l.height <= 0 || e < l.left || e > l.right || t < l.top || t > l.bottom)
149
164
  return null;
150
- const p = T();
165
+ const f = g();
151
166
  return {
152
167
  topicID: n.topic_id,
153
- worldX: (e - s.left - p.x) / p.scale,
154
- worldY: (t - s.top - p.y) / p.scale
168
+ worldX: (e - l.left - f.x) / f.scale,
169
+ worldY: (t - l.top - f.y) / f.scale
155
170
  };
156
- }, kt = (e, t) => {
171
+ }, $t = (e, t) => {
157
172
  if (typeof document > "u") return [];
158
173
  if (typeof document.elementsFromPoint == "function")
159
174
  return document.elementsFromPoint(e, t);
160
175
  const o = document.elementFromPoint(e, t);
161
176
  return o ? [o] : [];
162
- }, Dt = (e, t) => {
163
- const o = kt(e, t).filter((n) => n instanceof HTMLElement).map((n) => n.closest("[data-floe-notes-note-id]")).find(Boolean)?.dataset.floeNotesNoteId?.trim();
177
+ }, Wt = (e, t) => {
178
+ const o = $t(e, t).filter((n) => n instanceof HTMLElement).map((n) => n.closest("[data-floe-notes-note-id]")).find(Boolean)?.dataset.floeNotesNoteId?.trim();
164
179
  if (o)
165
- return u().items.find((n) => n.note_id === o);
166
- }, ae = (e, t, o) => {
167
- const n = Ot(e, t, o?.topicID);
180
+ return d().items.find((n) => n.note_id === o);
181
+ }, he = (e, t, o) => {
182
+ const n = jt(e, t, o?.topicID);
168
183
  return n ? {
169
184
  clientX: e,
170
185
  clientY: t,
@@ -173,86 +188,86 @@ function bo(r) {
173
188
  topicID: n.topicID,
174
189
  noteID: o?.noteID ?? null
175
190
  } : null;
176
- }, je = () => {
177
- const e = k();
191
+ }, Qe = () => {
192
+ const e = X();
178
193
  if (!e) return null;
179
- const t = $(_()), o = T();
194
+ const t = J(I()), o = g();
180
195
  return {
181
196
  topicID: e.topic_id,
182
197
  worldX: (t.width / 2 - o.x) / o.scale,
183
198
  worldY: (t.height / 2 - o.y) / o.scale
184
199
  };
185
- }, We = (e, t, o) => {
186
- const n = ae(e, t, o);
187
- return n ? (d(n), !0) : !1;
188
- }, St = (e, t) => {
189
- const o = Dt(e, t);
200
+ }, Je = (e, t, o) => {
201
+ const n = he(e, t, o);
202
+ return n ? (u(n), !0) : !1;
203
+ }, qt = (e, t) => {
204
+ const o = Wt(e, t);
190
205
  if (o) {
191
- de(o.note_id);
192
- const n = ae(e, t, {
206
+ Te(o.note_id);
207
+ const n = he(e, t, {
193
208
  topicID: o.topic_id,
194
209
  noteID: o.note_id
195
210
  });
196
- d(n);
211
+ u(n);
197
212
  return;
198
213
  }
199
- d(ae(e, t));
200
- }, He = (e) => {
201
- I(e), r.controller.setViewport(e), I(null);
202
- }, $e = (e, t, o) => wo({
203
- viewport: T(),
204
- frame: _(),
205
- bounds: E(),
214
+ u(he(e, t));
215
+ }, et = (e) => {
216
+ k(e), r.controller.setViewport(e), k(null);
217
+ }, tt = (e, t, o) => Io({
218
+ viewport: g(),
219
+ frame: I(),
220
+ bounds: q(),
206
221
  worldX: e,
207
222
  worldY: t,
208
223
  scale: o
209
- }), Ge = (e) => {
210
- const t = T(), o = $(_()), n = (o.width / 2 - t.x) / t.scale, i = (o.height / 2 - t.y) / t.scale, s = e === "in" ? t.scale * nt : t.scale / nt;
211
- He($e(n, i, s));
212
- }, Ke = (e, t, o) => {
224
+ }), ot = (e) => {
225
+ const t = g(), o = J(I()), n = (o.width / 2 - t.x) / t.scale, i = (o.height / 2 - t.y) / t.scale, l = e === "in" ? t.scale * ht : t.scale / ht;
226
+ et(tt(n, i, l));
227
+ }, nt = (e, t, o) => {
213
228
  const n = o.surfaceRect;
214
229
  if (n.width <= 0 || n.height <= 0) return;
215
- const i = ot(e, t, n), s = M(i.x - o.centerOffsetX, 0, 1), p = M(i.y - o.centerOffsetY, 0, 1), f = o.bounds;
216
- I(
217
- $e(
218
- f.minX + s * f.width,
219
- f.minY + p * f.height
230
+ const i = ft(e, t, n), l = P(i.x - o.centerOffsetX, 0, 1), f = P(i.y - o.centerOffsetY, 0, 1), m = o.bounds;
231
+ k(
232
+ tt(
233
+ m.minX + l * m.width,
234
+ m.minY + f * m.height
220
235
  )
221
236
  );
222
- }, le = (e) => {
223
- if (te?.abort(), te = void 0, e) {
224
- const t = Se();
237
+ }, we = (e) => {
238
+ if (ae?.abort(), ae = void 0, e) {
239
+ const t = Ae();
225
240
  t && r.controller.setViewport(t);
226
241
  }
227
- I(null), De(null);
228
- }, Xt = (e) => {
242
+ k(null), Fe(null);
243
+ }, Ht = (e) => {
229
244
  if (e.button !== 0 && e.pointerType !== "touch" && e.pointerType !== "pen")
230
245
  return;
231
246
  const t = e.currentTarget, o = t.getBoundingClientRect();
232
247
  if (o.width <= 0 || o.height <= 0) return;
233
- const n = ot(e.clientX, e.clientY, o), i = Ye(), s = n.x * 100, p = n.y * 100, f = s >= i.left && s <= i.left + i.width && p >= i.top && p <= i.top + i.height, x = {
248
+ const n = ft(e.clientX, e.clientY, o), i = je(), l = n.x * 100, f = n.y * 100, m = l >= i.left && l <= i.left + i.width && f >= i.top && f <= i.top + i.height, M = {
234
249
  pointerId: e.pointerId,
235
- bounds: E(),
250
+ bounds: q(),
236
251
  surfaceRect: o,
237
- centerOffsetX: f ? n.x - i.centerX / 100 : 0,
238
- centerOffsetY: f ? n.y - i.centerY / 100 : 0
252
+ centerOffsetX: m ? n.x - i.centerX / 100 : 0,
253
+ centerOffsetY: m ? n.y - i.centerY / 100 : 0
239
254
  };
240
- le(!1), e.preventDefault(), e.stopPropagation(), De(x), Ke(e.clientX, e.clientY, x), t.setPointerCapture?.(e.pointerId);
241
- const C = new AbortController();
242
- te = C;
243
- const pe = (g) => {
244
- g.pointerId === e.pointerId && Ke(g.clientX, g.clientY, x);
245
- }, S = (g) => {
246
- g.pointerId === e.pointerId && (t.hasPointerCapture?.(e.pointerId) && t.releasePointerCapture(e.pointerId), le(!0));
255
+ we(!1), e.preventDefault(), e.stopPropagation(), Fe(M), nt(e.clientX, e.clientY, M), t.setPointerCapture?.(e.pointerId);
256
+ const _ = new AbortController();
257
+ ae = _;
258
+ const ye = (y) => {
259
+ y.pointerId === e.pointerId && nt(y.clientX, y.clientY, M);
260
+ }, R = (y) => {
261
+ y.pointerId === e.pointerId && (t.hasPointerCapture?.(e.pointerId) && t.releasePointerCapture(e.pointerId), we(!0));
247
262
  };
248
- t.addEventListener("pointermove", pe, { signal: C.signal }), t.addEventListener("pointerup", S, {
263
+ t.addEventListener("pointermove", ye, { signal: _.signal }), t.addEventListener("pointerup", R, {
249
264
  once: !0,
250
- signal: C.signal
251
- }), t.addEventListener("pointercancel", S, {
265
+ signal: _.signal
266
+ }), t.addEventListener("pointercancel", R, {
252
267
  once: !0,
253
- signal: C.signal
268
+ signal: _.signal
254
269
  });
255
- }, Ze = async (e) => {
270
+ }, rt = async (e) => {
256
271
  try {
257
272
  const t = await r.controller.createNote({
258
273
  topic_id: e.topicID,
@@ -260,180 +275,216 @@ function bo(r) {
260
275
  y: e.worldY,
261
276
  body: ""
262
277
  });
263
- P(t.note_id);
278
+ S(t.note_id);
264
279
  } catch (t) {
265
- l.error("Create failed", w(t));
280
+ s.error("Create failed", h(t));
266
281
  }
267
- }, qe = async (e, t) => {
282
+ }, it = async (e, t) => {
268
283
  try {
269
284
  await r.controller.createNote({
270
285
  topic_id: e.topicID,
271
286
  x: e.worldX,
272
287
  y: e.worldY,
273
288
  body: t
274
- }), l.success("Pasted", "Created a new note from clipboard text.");
289
+ }), s.success("Pasted", "Created a new note from clipboard text.");
275
290
  } catch (o) {
276
- l.error("Paste failed", w(o));
291
+ s.error("Paste failed", h(o));
277
292
  }
278
- }, Ue = (e) => {
279
- ee(""), Oe(e);
280
- }, Je = async (e) => {
293
+ }, ct = (e) => {
294
+ ce(""), Re(e);
295
+ }, st = async (e) => {
281
296
  try {
282
297
  const t = await navigator.clipboard.readText();
283
298
  if (!t.trim()) {
284
- l.info("Clipboard empty", "Paste text into the dialog to create a note."), Ue(e);
299
+ s.info("Clipboard empty", "Paste text into the dialog to create a note."), ct(e);
285
300
  return;
286
301
  }
287
- await qe(e, t);
302
+ await it(e, t);
288
303
  } catch {
289
- l.info("Clipboard blocked", "Manual paste is available as a fallback."), Ue(e);
304
+ s.info("Clipboard blocked", "Manual paste is available as a fallback."), ct(e);
290
305
  }
291
- }, Lt = (e) => {
292
- F(), b(e), O = window.setTimeout(() => {
293
- O = void 0, b((t) => t === e ? null : t);
306
+ }, at = (e) => {
307
+ L(), C(e), O = window.setTimeout(() => {
308
+ O = void 0, C((t) => t === e ? null : t);
294
309
  }, 1100);
295
- }, Yt = (e) => {
296
- v(e);
297
- }, de = (e) => {
298
- const t = xt(e);
299
- v(e), Promise.resolve(r.controller.bringNoteToFront(e)).then(() => {
300
- Ee(e, t) && re(e);
310
+ }, ve = async (e) => {
311
+ w();
312
+ const t = mt(e.item.body);
313
+ if (!t) {
314
+ s.info("Nothing to copy", `Note #${e.label} has no body text.`);
315
+ return;
316
+ }
317
+ try {
318
+ await navigator.clipboard.writeText(t), at(e.item.note_id), s.success("Copied", `Note #${e.label} copied to clipboard.`);
319
+ } catch {
320
+ s.error("Copy failed", "Clipboard write was not available.");
321
+ }
322
+ }, Gt = (e) => {
323
+ N !== void 0 && window.clearTimeout(N), se(e), N = window.setTimeout(() => {
324
+ if (N = void 0, Ne(D) !== e) return;
325
+ se("");
326
+ const t = ee(e, Ne(E));
327
+ if (t.kind === "ready") {
328
+ ve(t.match);
329
+ return;
330
+ }
331
+ t.kind === "pending" && t.exactMatch && ve(t.exactMatch);
332
+ }, Lo);
333
+ }, lt = (e) => {
334
+ const t = ee(e, E());
335
+ return t.kind === "invalid" ? !1 : t.kind === "ready" ? (w(), ve(t.match), !0) : (Gt(e), !0);
336
+ }, Ut = (e) => {
337
+ const t = D(), o = `${t}${e}`;
338
+ if (!lt(t ? o : e)) {
339
+ if (!t || e === "0") {
340
+ w();
341
+ return;
342
+ }
343
+ lt(e) || w();
344
+ }
345
+ }, Kt = (e) => {
346
+ T(e);
347
+ }, Te = (e) => {
348
+ const t = Yt(e);
349
+ T(e), Promise.resolve(r.controller.bringNoteToFront(e)).then(() => {
350
+ He(e, t) && ue(e);
301
351
  }).catch((o) => {
302
- if (Ee(e, t)) {
303
- if (re(e), !ne(e)) {
304
- v((n) => n === e ? null : n);
352
+ if (He(e, t)) {
353
+ if (ue(e), !de(e)) {
354
+ T((n) => n === e ? null : n);
305
355
  return;
306
356
  }
307
- l.error("Bring forward failed", w(o)), v((n) => n === e ? null : n);
357
+ s.error("Bring forward failed", h(o)), T((n) => n === e ? null : n);
308
358
  }
309
359
  });
310
- }, Rt = (e) => {
311
- d(null), P(e);
312
- }, zt = async (e) => {
313
- const t = po(e.body);
360
+ }, Zt = (e) => {
361
+ w(), u(null), S(e);
362
+ }, Qt = async (e) => {
363
+ w();
364
+ const t = mt(e.body);
314
365
  if (!t) {
315
- d(null), P(e.note_id);
366
+ u(null), S(e.note_id);
316
367
  return;
317
368
  }
318
369
  try {
319
- await navigator.clipboard.writeText(t), Lt(e.note_id);
370
+ await navigator.clipboard.writeText(t), at(e.note_id);
320
371
  } catch {
321
- l.error("Copy failed", "Clipboard write was not available.");
372
+ s.error("Copy failed", "Clipboard write was not available.");
322
373
  }
323
- }, Qe = async (e) => {
374
+ }, dt = async (e) => {
324
375
  try {
325
- ce(e), await r.controller.deleteNote(e), F(), b((t) => t === e ? null : t), se();
376
+ fe(e), await r.controller.deleteNote(e), L(), C((t) => t === e ? null : t), me();
326
377
  } catch (t) {
327
- l.error("Delete failed", w(t));
378
+ s.error("Delete failed", h(t));
328
379
  }
329
- }, Et = async (e) => {
380
+ }, Jt = async (e) => {
330
381
  try {
331
- A(e), await r.controller.restoreNote(e);
382
+ H(e), await r.controller.restoreNote(e);
332
383
  } catch (t) {
333
- l.error("Restore failed", w(t));
384
+ s.error("Restore failed", h(t));
334
385
  }
335
- }, Ft = async (e) => {
386
+ }, eo = async (e) => {
336
387
  if (r.controller.deleteTrashedNotePermanently)
337
388
  try {
338
- A(e), await r.controller.deleteTrashedNotePermanently(e);
389
+ H(e), await r.controller.deleteTrashedNotePermanently(e);
339
390
  } catch (t) {
340
- l.error("Delete failed", w(t));
391
+ s.error("Delete failed", h(t));
341
392
  }
342
- }, At = async (e) => {
393
+ }, to = async (e) => {
343
394
  try {
344
395
  await r.controller.clearTrashTopic(e);
345
396
  } catch (t) {
346
- l.error("Trash failed", w(t));
397
+ s.error("Trash failed", h(t));
347
398
  }
348
- }, Bt = async () => {
349
- const e = q();
399
+ }, oo = async () => {
400
+ const e = V();
350
401
  if (e)
351
402
  try {
352
403
  await r.controller.updateNote(e, {
353
- headline: U(),
354
- title: U(),
355
- body: Ne(),
356
- color_token: Ce()
357
- }), l.success("Saved", "Note updated."), V();
404
+ headline: ne(),
405
+ title: ne(),
406
+ body: De(),
407
+ color_token: Oe()
408
+ }), s.success("Saved", "Note updated."), U();
358
409
  } catch (t) {
359
- l.error("Save failed", w(t));
410
+ s.error("Save failed", h(t));
360
411
  }
361
- }, Vt = async () => {
362
- const e = J();
363
- !e || !Q().trim() || (await qe(e, Q()), B());
364
- }, jt = async () => {
365
- const e = he().trim();
412
+ }, no = async () => {
413
+ const e = j();
414
+ !e || !ie().trim() || (await it(e, ie()), G());
415
+ }, ro = async () => {
416
+ const e = Me().trim();
366
417
  if (e)
367
418
  try {
368
419
  const t = await r.controller.createTopic({ name: e });
369
- ve(""), H(t.topic_id);
420
+ _e(""), Q(t.topic_id);
370
421
  } catch (t) {
371
- l.error("Topic failed", w(t));
422
+ s.error("Topic failed", h(t));
372
423
  }
373
- }, Wt = (e) => {
374
- Te(e.topic_id), Z(e.name);
375
- }, Ht = async () => {
376
- const e = K();
424
+ }, io = (e) => {
425
+ Pe(e.topic_id), oe(e.name);
426
+ }, co = async () => {
427
+ const e = B();
377
428
  if (!e) return;
378
- const t = ge().trim();
379
- if (W(), !!t)
429
+ const t = Ie().trim();
430
+ if (Z(), !!t)
380
431
  try {
381
432
  await r.controller.updateTopic(e, { name: t });
382
433
  } catch (o) {
383
- l.error("Rename failed", w(o));
434
+ s.error("Rename failed", h(o));
384
435
  }
385
- }, $t = async (e) => {
386
- const t = Ve(e.topic_id) + fo(u().trash_items, e.topic_id);
387
- K() === e.topic_id && W();
436
+ }, so = async (e) => {
437
+ const t = Ze(e.topic_id) + _o(d().trash_items, e.topic_id);
438
+ B() === e.topic_id && Z();
388
439
  try {
389
- if (Mt(e.topic_id), await r.controller.deleteTopic(e.topic_id) === !1) {
390
- l.info("Keep one topic", "At least one topic needs to remain available.");
440
+ if (zt(e.topic_id), await r.controller.deleteTopic(e.topic_id) === !1) {
441
+ s.info("Keep one topic", "At least one topic needs to remain available.");
391
442
  return;
392
443
  }
393
444
  if (t > 0) {
394
- se(), l.success("Topic deleted", "Live notes moved into trash for this topic.");
445
+ me(), s.success("Topic deleted", "Live notes moved into trash for this topic.");
395
446
  return;
396
447
  }
397
- l.success("Topic deleted", "The empty topic was removed.");
448
+ s.success("Topic deleted", "The empty topic was removed.");
398
449
  } catch (o) {
399
- l.error("Delete failed", w(o));
450
+ s.error("Delete failed", h(o));
400
451
  }
401
- }, Gt = async (e, t) => {
402
- const o = Ct(e);
403
- Ae(e, t);
452
+ }, ao = async (e, t) => {
453
+ const o = Rt(e);
454
+ Ue(e, t);
404
455
  try {
405
456
  await r.controller.updateNote(e, {
406
457
  x: t.x,
407
458
  y: t.y
408
459
  });
409
460
  } catch (n) {
410
- if (!Fe(e, o) || (ie(e), A(e), !ne(e))) return;
411
- l.error("Move failed", w(n));
461
+ if (!Ge(e, o) || (pe(e), H(e), !de(e))) return;
462
+ s.error("Move failed", h(n));
412
463
  return;
413
464
  }
414
- Fe(e, o) && ie(e);
415
- }, ue = c(() => {
416
- const e = h();
465
+ Ge(e, o) && pe(e);
466
+ }, ge = c(() => {
467
+ const e = v();
417
468
  if (!e) return [];
418
469
  const t = [
419
470
  {
420
471
  id: "paste",
421
472
  kind: "action",
422
473
  label: "Paste here",
423
- icon: oo,
474
+ icon: vo,
424
475
  onSelect: () => {
425
- const o = h();
426
- o && (d(null), Je(o));
476
+ const o = v();
477
+ o && (u(null), st(o));
427
478
  }
428
479
  },
429
480
  {
430
481
  id: "new",
431
482
  kind: "action",
432
483
  label: "New note",
433
- icon: no,
484
+ icon: To,
434
485
  onSelect: () => {
435
- const o = h();
436
- o && (d(null), Ze(o));
486
+ const o = v();
487
+ o && (u(null), rt(o));
437
488
  }
438
489
  }
439
490
  ];
@@ -441,225 +492,239 @@ function bo(r) {
441
492
  id: "delete",
442
493
  kind: "action",
443
494
  label: "Delete",
444
- icon: ro,
495
+ icon: go,
445
496
  destructive: !0,
446
497
  onSelect: () => {
447
- const o = h();
448
- o?.noteID && (d(null), Qe(o.noteID));
498
+ const o = v();
499
+ o?.noteID && (u(null), dt(o.noteID));
449
500
  }
450
501
  })), t;
451
- }), Kt = c(() => {
452
- const e = h();
502
+ }), lo = c(() => {
503
+ const e = v();
453
504
  if (!e) return;
454
- const t = ue().filter((n) => n.kind === "action").length, o = ue().filter((n) => n.kind === "separator").length;
455
- return lo({
505
+ const t = ge().filter((n) => n.kind === "action").length, o = ge().filter((n) => n.kind === "separator").length;
506
+ return Co({
456
507
  clientX: e.clientX,
457
508
  clientY: e.clientY,
458
- menuWidth: io,
459
- menuHeight: co(t, o)
509
+ menuWidth: yo,
510
+ menuHeight: No(t, o)
460
511
  });
461
- }), Zt = (e) => {
462
- const t = k();
463
- t && d({
512
+ }), uo = (e) => {
513
+ const t = X();
514
+ t && u({
464
515
  clientX: e.clientX,
465
516
  clientY: e.clientY,
466
517
  worldX: e.worldX,
467
518
  worldY: e.worldY,
468
519
  topicID: t.topic_id
469
520
  });
470
- }, qt = (e, t) => {
471
- de(t.note_id), We(e.clientX, e.clientY, {
521
+ }, po = (e, t) => {
522
+ Te(t.note_id), Je(e.clientX, e.clientY, {
472
523
  topicID: t.topic_id,
473
524
  noteID: t.note_id
474
525
  });
475
- }, Ut = (e) => {
476
- j(), We(e.clientX, e.clientY);
477
- }, Jt = (e) => {
478
- e.preventDefault(), e.stopPropagation(), St(e.clientX, e.clientY);
526
+ }, fo = (e) => {
527
+ K(), Je(e.clientX, e.clientY);
528
+ }, mo = (e) => {
529
+ e.preventDefault(), e.stopPropagation(), qt(e.clientX, e.clientY);
479
530
  };
480
- m(() => {
481
- const e = new Set(u().items.map((t) => t.note_id));
482
- for (const t of G)
483
- e.has(t) || _t(t);
484
- G = e;
485
- }), m(() => {
486
- const e = h();
487
- e?.noteID && (ne(e.noteID) || d(null));
488
- }), m(() => {
489
- r.open || (G = /* @__PURE__ */ new Set());
531
+ p(() => {
532
+ const e = new Set(d().items.map((t) => t.note_id));
533
+ for (const t of te)
534
+ e.has(t) || Ft(t);
535
+ te = e;
536
+ }), p(() => {
537
+ const e = v();
538
+ e?.noteID && (de(e.noteID) || u(null));
539
+ }), p(() => {
540
+ r.open || (te = /* @__PURE__ */ new Set());
490
541
  });
491
- const Qt = async () => {
492
- const e = je();
493
- e && (D(), await Ze(e));
494
- }, eo = async () => {
495
- const e = je();
496
- e && (D(), await Je(e));
542
+ const ho = async () => {
543
+ const e = Qe();
544
+ e && (Y(), await rt(e));
545
+ }, wo = async () => {
546
+ const e = Qe();
547
+ e && (Y(), await st(e));
497
548
  };
498
- return m(() => {
499
- r.open || (bt(), W(), I(null), v(null), b(null));
500
- }), m(() => {
501
- const e = N();
502
- e && r.controller.activeTopicID() !== e && H(e);
503
- }), m(() => {
504
- const e = Re();
549
+ return p(() => {
550
+ r.open || (Bt(), Z(), k(null), T(null), C(null));
551
+ }), p(() => {
552
+ const e = b();
553
+ e && r.controller.activeTopicID() !== e && Q(e);
554
+ }), p(() => {
555
+ const e = $e();
505
556
  if (!e) {
506
- oe = null;
557
+ le = null;
507
558
  return;
508
559
  }
509
- oe !== e.note_id && (oe = e.note_id, ye(e.title), xe(e.body), Me(e.color_token));
510
- }), m(() => {
511
- const e = ke();
560
+ le !== e.note_id && (le = e.note_id, Se(e.title), ke(e.body), Xe(e.color_token));
561
+ }), p(() => {
562
+ const e = ze();
512
563
  if (!e) return;
513
- const t = u().items.find((n) => n.note_id === e);
564
+ const t = d().items.find((n) => n.note_id === e);
514
565
  if (!t) {
515
- v(null);
566
+ T(null);
516
567
  return;
517
568
  }
518
- const o = u().items.reduce(
569
+ const o = d().items.reduce(
519
570
  (n, i) => Math.max(n, i.z_index),
520
571
  0
521
572
  );
522
- t.z_index >= o && v(null);
523
- }), m(() => {
524
- const e = u().items, t = Xe();
573
+ t.z_index >= o && T(null);
574
+ }), p(() => {
575
+ r.open || (L(), w(), C(null));
576
+ }), p(() => {
577
+ D() && We() && w();
578
+ }), p(() => {
579
+ const e = D();
580
+ e && ee(e, E()).kind === "invalid" && w();
581
+ }), p(() => {
582
+ const e = d().items, t = Be();
525
583
  if (t.size === 0) return;
526
584
  let o = null;
527
585
  for (const [n, i] of t) {
528
- const s = e.find((p) => p.note_id === n);
529
- (!s || fe({ x: s.x, y: s.y }, i)) && (o ??= new Map(t), o.delete(n));
586
+ const l = e.find((f) => f.note_id === n);
587
+ (!l || xe({ x: l.x, y: l.y }, i)) && (o ??= new Map(t), o.delete(n));
530
588
  }
531
- o && R(o);
532
- }), m(() => {
589
+ o && $(o);
590
+ }), p(() => {
533
591
  if (!r.open) return;
534
592
  const e = () => {
535
- dt(window.innerWidth < uo);
593
+ xt(window.innerWidth < Mo);
536
594
  };
537
- e(), window.addEventListener("resize", e), X(() => window.removeEventListener("resize", e));
538
- }), m(() => {
539
- const e = we();
595
+ e(), window.addEventListener("resize", e), z(() => window.removeEventListener("resize", e));
596
+ }), p(() => {
597
+ const e = Ce();
540
598
  if (!e) return;
541
599
  const t = () => {
542
- it({
600
+ vt({
543
601
  width: e.clientWidth,
544
602
  height: e.clientHeight
545
603
  });
546
604
  };
547
605
  if (t(), typeof ResizeObserver > "u") {
548
- window.addEventListener("resize", t), X(() => window.removeEventListener("resize", t));
606
+ window.addEventListener("resize", t), z(() => window.removeEventListener("resize", t));
549
607
  return;
550
608
  }
551
609
  const o = new ResizeObserver(t);
552
- o.observe(e), X(() => o.disconnect());
553
- }), m(() => {
610
+ o.observe(e), z(() => o.disconnect());
611
+ }), p(() => {
554
612
  if (!r.open) return;
555
- const e = window.setInterval(() => at(Date.now()), 60 * 1e3);
556
- X(() => window.clearInterval(e));
557
- }), m(() => {
558
- N() && d(null);
559
- }), X(() => {
560
- F(), le(!1);
613
+ const e = window.setInterval(() => yt(Date.now()), 60 * 1e3);
614
+ z(() => window.clearInterval(e));
615
+ }), p(() => {
616
+ b() && u(null);
617
+ }), z(() => {
618
+ L(), w(), we(!1);
561
619
  }), {
562
620
  header: {
563
- topicCount: pt,
564
- totalLiveNotes: wt,
565
- trashCount: Le
621
+ topicCount: Ct,
622
+ totalLiveNotes: It,
623
+ trashCount: Ve
566
624
  },
567
625
  rail: {
568
- topics: y,
569
- activeTopicID: N,
570
- draftTopicTitle: he,
571
- renamingTopicID: K,
572
- renamingTopicTitle: ge,
573
- getLiveNoteCount: Ve,
574
- setDraftTopicTitle: ve,
575
- submitTopic: jt,
576
- selectTopic: H,
577
- startTopicRename: Wt,
578
- setRenamingTopicTitle: Z,
579
- saveTopicRename: Ht,
580
- cancelTopicRename: W,
581
- deleteTopic: $t
626
+ topics: x,
627
+ activeTopicID: b,
628
+ draftTopicTitle: Me,
629
+ renamingTopicID: B,
630
+ renamingTopicTitle: Ie,
631
+ getLiveNoteCount: Ze,
632
+ setDraftTopicTitle: _e,
633
+ submitTopic: ro,
634
+ selectTopic: Q,
635
+ startTopicRename: io,
636
+ setRenamingTopicTitle: oe,
637
+ saveTopicRename: co,
638
+ cancelTopicRename: Z,
639
+ deleteTopic: so
582
640
  },
583
641
  board: {
584
- activeTopic: k,
585
- activeTopicLabel: vt,
586
- activeItems: z,
587
- activeTopicID: N,
588
- topics: y,
589
- topZIndex: ht,
590
- viewport: T,
591
- boardScaleLabel: Tt,
592
- isMobile: lt,
593
- overviewOpen: be,
594
- optimisticFrontNoteID: ke,
595
- copiedNoteID: ct,
596
- setCanvasFrameRef: rt,
597
- commitViewport: He,
598
- openCanvasContextMenu: Zt,
599
- zoomOut: () => Ge("out"),
600
- zoomIn: () => Ge("in"),
601
- openOverview: Be,
602
- selectTopic: H,
603
- mobileCreateNote: Qt,
604
- mobilePaste: eo,
605
- seedMoveProjection: Ae,
606
- copyNote: zt,
607
- openNoteContextMenu: qt,
608
- openEditor: Rt,
609
- moveToTrash: Qe,
610
- startOptimisticFront: Yt,
611
- commitFront: de,
612
- commitMove: Gt
642
+ activeTopic: X,
643
+ activeTopicLabel: Dt,
644
+ activeItems: W,
645
+ activeTopicID: b,
646
+ topics: x,
647
+ topZIndex: St,
648
+ viewport: g,
649
+ boardScaleLabel: kt,
650
+ isMobile: Nt,
651
+ overviewOpen: Le,
652
+ optimisticFrontNoteID: ze,
653
+ copiedNoteID: Tt,
654
+ noteNumberByID: _t,
655
+ pendingShortcutNoteID: Lt,
656
+ setCanvasFrameRef: wt,
657
+ commitViewport: et,
658
+ openCanvasContextMenu: uo,
659
+ zoomOut: () => ot("out"),
660
+ zoomIn: () => ot("in"),
661
+ openOverview: Ke,
662
+ selectTopic: Q,
663
+ mobileCreateNote: ho,
664
+ mobilePaste: wo,
665
+ seedMoveProjection: Ue,
666
+ copyNote: Qt,
667
+ openNoteContextMenu: po,
668
+ openEditor: Zt,
669
+ moveToTrash: dt,
670
+ startOptimisticFront: Kt,
671
+ commitFront: Te,
672
+ commitMove: ao
613
673
  },
614
674
  overview: {
615
- items: yt,
616
- viewportStyle: Nt,
617
- navigationState: ut,
618
- beginNavigation: Xt,
619
- close: D,
620
- open: Be
675
+ items: Xt,
676
+ viewportStyle: Et,
677
+ navigationState: bt,
678
+ beginNavigation: Ht,
679
+ close: Y,
680
+ open: Ke
621
681
  },
622
682
  trash: {
623
- open: _e,
624
- groups: mt,
625
- count: Le,
626
- now: st,
683
+ open: re,
684
+ groups: Pt,
685
+ count: Ve,
686
+ now: gt,
627
687
  canDeleteNow: !!r.controller.deleteTrashedNotePermanently,
628
- close: j,
629
- openDock: se,
630
- backdropContextMenu: Ut,
631
- restore: Et,
632
- deleteNow: Ft,
633
- clearTopic: At
688
+ close: K,
689
+ openDock: me,
690
+ backdropContextMenu: fo,
691
+ restore: Jt,
692
+ deleteNow: eo,
693
+ clearTopic: to
634
694
  },
635
695
  contextMenu: {
636
- state: h,
637
- items: ue,
638
- position: Kt,
639
- close: () => d(null),
640
- retarget: Jt
696
+ state: v,
697
+ items: ge,
698
+ position: lo,
699
+ close: () => u(null),
700
+ retarget: mo
641
701
  },
642
702
  editor: {
643
- note: Re,
644
- draftTitle: U,
645
- draftBody: Ne,
646
- draftColor: Ce,
647
- setDraftTitle: ye,
648
- setDraftBody: xe,
649
- setDraftColor: Me,
650
- close: V,
651
- save: Bt
703
+ note: $e,
704
+ draftTitle: ne,
705
+ draftBody: De,
706
+ draftColor: Oe,
707
+ setDraftTitle: Se,
708
+ setDraftBody: ke,
709
+ setDraftColor: Xe,
710
+ close: U,
711
+ save: oo
652
712
  },
653
713
  manualPaste: {
654
- open: () => !!J(),
655
- text: Q,
656
- setText: ee,
657
- close: B,
658
- confirm: Vt
714
+ open: () => !!j(),
715
+ text: ie,
716
+ setText: ce,
717
+ close: G,
718
+ confirm: no
719
+ },
720
+ shortcuts: {
721
+ blocked: We,
722
+ handleDigitShortcut: Ut,
723
+ clearPendingDigitState: w
659
724
  },
660
- handleCloseRequest: It
725
+ handleCloseRequest: Vt
661
726
  };
662
727
  }
663
728
  export {
664
- bo as useNotesOverlayModel
729
+ jo as useNotesOverlayModel
665
730
  };