@dialecte/core 0.1.18 → 0.1.19

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,19 +1,19 @@
1
1
  import { t as qe, i as Ge } from "./index-B1qiHOqL.js";
2
- import { g as fr, l as me, o as dr, k as ur, s as ii, t as oi, C as ha, m as pa } from "./merge-extensions-D-JNgVJ8.js";
2
+ import { g as fr, l as me, o as dr, k as ur, s as oi, t as si, C as pa, m as ma } from "./merge-extensions-D-JNgVJ8.js";
3
3
  function cr(p, o) {
4
4
  if (!p) return {};
5
5
  const c = {};
6
6
  for (const a of Object.keys(p)) {
7
7
  const f = p[a], d = {};
8
- for (const g of Object.keys(f)) {
9
- const v = f[g];
10
- d[g] = (...D) => v(o, ...D);
8
+ for (const m of Object.keys(f)) {
9
+ const v = f[m];
10
+ d[m] = (...D) => v(o, ...D);
11
11
  }
12
12
  c[a] = d;
13
13
  }
14
14
  return c;
15
15
  }
16
- function si(p) {
16
+ function ui(p) {
17
17
  const { stagedOperations: o, tagName: c, id: a } = p;
18
18
  for (let f = o.length - 1; f >= 0; f--) {
19
19
  const d = o[f];
@@ -31,9 +31,9 @@ function si(p) {
31
31
  continue;
32
32
  }
33
33
  if (d.status === "created" && d.newRecord.id === a) {
34
- const g = d.newRecord.tagName;
35
- return g !== c && qe("ELEMENT_TAGNAME_MISMATCH", {
36
- detail: `Expected tagName '${c}', got '${g}' for id '${a}'`,
34
+ const m = d.newRecord.tagName;
35
+ return m !== c && qe("ELEMENT_TAGNAME_MISMATCH", {
36
+ detail: `Expected tagName '${c}', got '${m}' for id '${a}'`,
37
37
  ref: { tagName: c, id: a }
38
38
  }), {
39
39
  ...d.newRecord,
@@ -41,9 +41,9 @@ function si(p) {
41
41
  };
42
42
  }
43
43
  if (d.status === "updated" && d.newRecord.id === a) {
44
- const g = d.newRecord.tagName;
45
- return g !== c && qe("ELEMENT_TAGNAME_MISMATCH", {
46
- detail: `Expected tagName '${c}', got '${g}' for id '${a}'`,
44
+ const m = d.newRecord.tagName;
45
+ return m !== c && qe("ELEMENT_TAGNAME_MISMATCH", {
46
+ detail: `Expected tagName '${c}', got '${m}' for id '${a}'`,
47
47
  ref: { tagName: c, id: a }
48
48
  }), {
49
49
  ...d.newRecord,
@@ -51,9 +51,9 @@ function si(p) {
51
51
  };
52
52
  }
53
53
  if (d.status === "deleted" && d.oldRecord.id === a) {
54
- const g = d.oldRecord.tagName;
55
- return g !== c && qe("ELEMENT_TAGNAME_MISMATCH", {
56
- detail: `Expected tagName '${c}', got '${g}' for id '${a}'`,
54
+ const m = d.oldRecord.tagName;
55
+ return m !== c && qe("ELEMENT_TAGNAME_MISMATCH", {
56
+ detail: `Expected tagName '${c}', got '${m}' for id '${a}'`,
57
57
  ref: { tagName: c, id: a }
58
58
  }), {
59
59
  ...d.oldRecord,
@@ -62,7 +62,7 @@ function si(p) {
62
62
  }
63
63
  }
64
64
  }
65
- function ui(p) {
65
+ function ci(p) {
66
66
  const { rawRecords: o, stagedOperations: c, tagName: a } = p, f = new Map(
67
67
  o.map((d) => [d.id, { ...d, status: "unchanged" }])
68
68
  );
@@ -78,7 +78,7 @@ function ui(p) {
78
78
  async function ve(p) {
79
79
  const { context: o, ref: c } = p;
80
80
  if (o.stagedOperations.length > 0) {
81
- const f = si({
81
+ const f = ui({
82
82
  stagedOperations: o.stagedOperations,
83
83
  tagName: c.tagName,
84
84
  id: c.id
@@ -88,82 +88,105 @@ async function ve(p) {
88
88
  }
89
89
  let a;
90
90
  if (c.id === void 0) {
91
- const f = `__singleton_${c.tagName}`, d = $t(o) ? o.recordCache.get(f) : void 0;
92
- d ? a = d : (a = (await o.store.getByTagName(c.tagName))[0], a && $t(o) && (o.recordCache.set(a.id, a), o.recordCache.set(f, a)));
91
+ const f = `__singleton_${c.tagName}`, d = Xt(o) ? o.recordCache.get(f) : void 0;
92
+ d ? a = d : (a = (await o.store.getByTagName(c.tagName))[0], a && Xt(o) && (o.recordCache.set(a.id, a), o.recordCache.set(f, a)));
93
93
  } else {
94
- const f = $t(o) ? o.recordCache.get(c.id) : void 0;
95
- f ? a = f : (a = await o.store.get(c.id), a && $t(o) && o.recordCache.set(c.id, a));
94
+ const f = Xt(o) ? o.recordCache.get(c.id) : void 0;
95
+ f ? a = f : (a = await o.store.get(c.id), a && Xt(o) && o.recordCache.set(c.id, a));
96
96
  }
97
97
  if (a)
98
98
  return { ...a, status: "unchanged" };
99
99
  }
100
- async function ma(p) {
100
+ async function ga(p) {
101
101
  const { context: o, refs: c } = p;
102
102
  return Promise.all(c.map((a) => ve({ context: o, ref: a })));
103
103
  }
104
104
  async function mr(p) {
105
105
  const { context: o, tagName: c } = p, a = await o.store.getByTagName(c);
106
106
  for (const f of a)
107
- $t(o) && o.recordCache.set(f.id, f);
108
- return ui({ rawRecords: a, stagedOperations: o.stagedOperations, tagName: c });
107
+ Xt(o) && o.recordCache.set(f.id, f);
108
+ return ci({ rawRecords: a, stagedOperations: o.stagedOperations, tagName: c });
109
109
  }
110
- async function ci(p) {
110
+ async function li(p) {
111
111
  const { context: o, ref: c, tagName: a } = p, f = await ve({ context: o, ref: c });
112
112
  if (!f) return;
113
- const d = f.children.find((g) => g.tagName === a);
113
+ const d = f.children.find((m) => m.tagName === a);
114
114
  if (d)
115
115
  return ve({ context: o, ref: d });
116
116
  }
117
- async function li(p) {
117
+ async function fi(p) {
118
118
  const { context: o, ref: c, tagName: a } = p, f = await ve({ context: o, ref: c });
119
119
  if (!f) return [];
120
120
  const d = f.children.filter((v) => v.tagName === a).map((v) => ({ tagName: a, id: v.id }));
121
- return (await ma({ context: o, refs: d })).filter(
121
+ return (await ga({ context: o, refs: d })).filter(
122
122
  (v) => v !== void 0
123
123
  );
124
124
  }
125
- async function fi(p) {
126
- const { context: o, ref: c, options: a } = p, f = a?.depth ?? 1 / 0, d = a?.stopAtTagName, g = a?.order ?? "bottom-up", v = [];
125
+ async function di(p) {
126
+ const { context: o, ref: c, options: a } = p, f = a?.depth ?? 1 / 0, d = a?.stopAtTagName, m = a?.order ?? "bottom-up", v = [];
127
127
  let D = await ve({ context: o, ref: c });
128
128
  for (; D?.parent && v.length < f; ) {
129
129
  const R = D.parent, q = await ve({ context: o, ref: R });
130
130
  if (!q || (v.push(q), d && q.tagName === d)) break;
131
131
  D = q;
132
132
  }
133
- return g === "top-down" ? v.reverse() : v;
133
+ return m === "top-down" ? v.reverse() : v;
134
134
  }
135
- async function ga(p) {
135
+ async function ya(p) {
136
136
  const { context: o, tagName: c, attributes: a } = p, f = await mr({ context: o, tagName: c }), d = [];
137
- for (const g of f)
138
- Wt({ record: g, attributeFilter: a }) && d.push(g);
137
+ for (const m of f)
138
+ It({ record: m, attributeFilter: a }) && d.push(m);
139
139
  return d;
140
140
  }
141
- function Wt(p) {
141
+ function It(p) {
142
142
  const { record: o, attributeFilter: c } = p;
143
143
  if (!c || Object.keys(c).length === 0)
144
144
  return !0;
145
145
  for (const [a, f] of Object.entries(c)) {
146
146
  if (f === void 0) continue;
147
- const g = o.attributes.find(
147
+ const m = o.attributes.find(
148
148
  (v) => v.name === a
149
149
  )?.value ?? "";
150
- if (g === "") return !1;
150
+ if (m === "") return !1;
151
151
  if (Array.isArray(f)) {
152
- if (!f.some((v) => g === v))
152
+ if (!f.some((v) => m === v))
153
153
  return !1;
154
- } else if (g !== f)
154
+ } else if (m !== f)
155
155
  return !1;
156
156
  }
157
157
  return !0;
158
158
  }
159
- async function Qr(p) {
160
- const { context: o, ref: c, options: a } = p, { collect: f, omit: d } = a, g = new Set(d ?? []), v = di(f), D = /* @__PURE__ */ new Map();
159
+ async function Hr(p) {
160
+ const { context: o, ref: c, options: a } = p, { collect: f, omit: d } = a, m = hi(d), v = pi(f), D = /* @__PURE__ */ new Map();
161
161
  for (const q of v.allTags)
162
162
  D.set(q, /* @__PURE__ */ new Map());
163
163
  const R = await ve({ context: o, ref: c });
164
- return R && (v.mode === "flat" ? await pi({ context: o, rootId: R.id, collectSpec: v, omitSet: g, collected: D }) : await ba({ context: o, record: R, pathNodes: v.paths, omitSet: g, collected: D })), Zr(D);
164
+ return R && (v.mode === "flat" ? await gi({ context: o, rootId: R.id, collectSpec: v, omitSpec: m, collected: D }) : await wa({ context: o, record: R, pathNodes: v.paths, omitSpec: m, collected: D })), Jr(D);
165
165
  }
166
- function di(p) {
166
+ function hi(p) {
167
+ const o = /* @__PURE__ */ new Set(), c = [];
168
+ if (!p) return { unconditional: o, conditional: c };
169
+ for (const a of p)
170
+ if (typeof a == "string")
171
+ o.add(a);
172
+ else {
173
+ const f = Object.keys(a)[0], d = a[f];
174
+ d?.where ? c.push({ tagName: f, where: d.where }) : o.add(f);
175
+ }
176
+ return { unconditional: o, conditional: c };
177
+ }
178
+ function gr(p) {
179
+ const { record: o, omitSpec: c } = p;
180
+ if (c.unconditional.has(o.tagName)) return !0;
181
+ for (const a of c.conditional)
182
+ if (a.tagName === o.tagName && It({
183
+ record: o,
184
+ attributeFilter: a.where
185
+ }))
186
+ return !0;
187
+ return !1;
188
+ }
189
+ function pi(p) {
167
190
  if (typeof p == "string")
168
191
  return { mode: "flat", targets: [{ tagName: p }], allTags: /* @__PURE__ */ new Set([p]) };
169
192
  if (Array.isArray(p)) {
@@ -172,214 +195,219 @@ function di(p) {
172
195
  if (typeof d == "string")
173
196
  a.push({ tagName: d }), f.add(d);
174
197
  else
175
- for (const [g, v] of Object.entries(d))
176
- a.push({ tagName: g, where: v?.where }), f.add(g);
198
+ for (const [m, v] of Object.entries(d))
199
+ a.push({ tagName: m, where: v?.where }), f.add(m);
177
200
  return { mode: "flat", targets: a, allTags: f };
178
201
  }
179
202
  const o = /* @__PURE__ */ new Set();
180
- return { mode: "path", paths: ya(p, o), allTags: o };
203
+ return { mode: "path", paths: va(p, o), allTags: o };
181
204
  }
182
- function ya(p, o) {
205
+ function va(p, o) {
183
206
  const c = [];
184
207
  for (const [a, f] of Object.entries(p)) {
185
208
  if (a === "where") continue;
186
209
  o.add(a);
187
- const d = hi({ tagName: a, value: f, allTags: o });
210
+ const d = mi({ tagName: a, value: f, allTags: o });
188
211
  d && c.push(d);
189
212
  }
190
213
  return c;
191
214
  }
192
- function hi(p) {
215
+ function mi(p) {
193
216
  const { tagName: o, value: c, allTags: a } = p;
194
217
  if (c === !0)
195
218
  return { tagName: o, where: void 0, children: [], isLeaf: !0 };
196
219
  if (typeof c != "object" || c === null) return;
197
- const f = c, d = f.where, g = Object.keys(f).filter((R) => R !== "where");
198
- if (g.length === 0)
220
+ const f = c, d = f.where, m = Object.keys(f).filter((R) => R !== "where");
221
+ if (m.length === 0)
199
222
  return { tagName: o, where: d, children: [], isLeaf: !0 };
200
223
  const v = {};
201
- for (const R of g)
224
+ for (const R of m)
202
225
  v[R] = f[R];
203
- const D = ya(v, a);
226
+ const D = va(v, a);
204
227
  return { tagName: o, where: d, children: D, isLeaf: !1 };
205
228
  }
206
- async function pi(p) {
207
- const { context: o, rootId: c, collectSpec: a, omitSet: f, collected: d } = p;
208
- for (const g of a.targets) {
209
- if (f.has(g.tagName)) continue;
229
+ async function gi(p) {
230
+ const { context: o, rootId: c, collectSpec: a, omitSpec: f, collected: d } = p;
231
+ for (const m of a.targets) {
232
+ if (f.unconditional.has(m.tagName)) continue;
210
233
  const v = await mr({
211
234
  context: o,
212
- tagName: g.tagName
235
+ tagName: m.tagName
213
236
  });
214
237
  for (const D of v)
215
- va({ record: D, where: g.where }) && await mi({ context: o, record: D, rootId: c, omitSet: f }) && d.get(g.tagName).set(D.id, D);
238
+ ba({ record: D, where: m.where }) && (gr({ record: D, omitSpec: f }) || await yi({ context: o, record: D, rootId: c, omitSpec: f }) && d.get(m.tagName).set(D.id, D));
216
239
  }
217
240
  }
218
- function va(p) {
241
+ function ba(p) {
219
242
  const { record: o, where: c } = p;
220
- return c ? Wt({
243
+ return c ? It({
221
244
  record: o,
222
245
  attributeFilter: c
223
246
  }) : !0;
224
247
  }
225
- async function mi(p) {
226
- const { context: o, record: c, rootId: a, omitSet: f } = p;
248
+ async function yi(p) {
249
+ const { context: o, record: c, rootId: a, omitSpec: f } = p;
227
250
  if (c.id === a) return !0;
228
251
  let d = c;
229
252
  for (; d; ) {
230
- if (!d.parent || f.has(d.parent.tagName)) return !1;
253
+ if (!d.parent || f.unconditional.has(d.parent.tagName)) return !1;
231
254
  if (d.parent.id === a) return !0;
232
- const g = await ve({ context: o, ref: me(d.parent) });
233
- if (!g) return !1;
234
- d = g;
255
+ const m = await ve({ context: o, ref: me(d.parent) });
256
+ if (!m || gr({ record: m, omitSpec: f })) return !1;
257
+ d = m;
235
258
  }
236
259
  return !1;
237
260
  }
238
- async function ba(p) {
239
- const { context: o, record: c, pathNodes: a, omitSet: f, collected: d } = p;
261
+ async function wa(p) {
262
+ const { context: o, record: c, pathNodes: a, omitSpec: f, collected: d } = p;
240
263
  if (!c.children?.length) return;
241
- const g = new Set(a.map((v) => v.tagName));
264
+ const m = new Set(a.map((v) => v.tagName));
242
265
  for (const v of a) {
243
- const D = await gi({
266
+ const D = await vi({
244
267
  context: o,
245
268
  record: c,
246
269
  tagName: v.tagName,
247
270
  where: v.where,
248
- omitSet: f,
249
- stopAtTagNames: g
271
+ omitSpec: f,
272
+ stopAtTagNames: m
250
273
  });
251
274
  for (const R of D)
252
- d.get(v.tagName).set(R.id, R), !v.isLeaf && v.children.length > 0 && await ba({
275
+ d.get(v.tagName).set(R.id, R), !v.isLeaf && v.children.length > 0 && await wa({
253
276
  context: o,
254
277
  record: R,
255
278
  pathNodes: v.children,
256
- omitSet: f,
279
+ omitSpec: f,
257
280
  collected: d
258
281
  });
259
282
  }
260
283
  }
261
- async function gi(p) {
262
- const { context: o, record: c, tagName: a, where: f, omitSet: d, stopAtTagNames: g } = p, v = [];
284
+ async function vi(p) {
285
+ const { context: o, record: c, tagName: a, where: f, omitSpec: d, stopAtTagNames: m } = p, v = [];
263
286
  if (!c.children?.length) return v;
264
- const D = [], R = await Hr({ context: o, record: c, omitSet: d });
287
+ const D = [], R = await Zr({ context: o, record: c, omitSpec: d });
265
288
  for (D.push(...R); D.length > 0; ) {
266
289
  const q = D.shift();
267
290
  if (q.tagName === a) {
268
- va({ record: q, where: f }) && v.push(q);
291
+ ba({ record: q, where: f }) && v.push(q);
269
292
  continue;
270
293
  }
271
- if (!(g.has(q.tagName) && q.tagName !== a) && q.children?.length) {
272
- const Y = await Hr({ context: o, record: q, omitSet: d });
294
+ if (!(m.has(q.tagName) && q.tagName !== a) && q.children?.length) {
295
+ const Y = await Zr({ context: o, record: q, omitSpec: d });
273
296
  D.push(...Y);
274
297
  }
275
298
  }
276
299
  return v;
277
300
  }
278
- async function Hr(p) {
279
- const { context: o, record: c, omitSet: a } = p;
301
+ async function Zr(p) {
302
+ const { context: o, record: c, omitSpec: a } = p;
280
303
  if (!c.children?.length) return [];
281
- const f = c.children.filter((g) => !a.has(g.tagName));
304
+ const f = c.children.filter((m) => !a.unconditional.has(m.tagName));
282
305
  return f.length ? (await Promise.all(
283
- f.map((g) => ve({ context: o, ref: me(g) }))
306
+ f.map((m) => ve({ context: o, ref: me(m) }))
284
307
  )).filter(
285
- (g) => g !== void 0
308
+ (m) => m !== void 0 && !gr({ record: m, omitSpec: a })
286
309
  ) : [];
287
310
  }
288
- function Zr(p) {
311
+ function Jr(p) {
289
312
  const o = {};
290
313
  for (const [c, a] of p.entries())
291
314
  o[c] = Array.from(a.values());
292
315
  return o;
293
316
  }
294
- async function Jr(p) {
317
+ async function ea(p) {
295
318
  const { context: o, ref: c, name: a } = p;
296
319
  return ((await ve({ context: o, ref: c }))?.attributes ?? []).find((v) => v.name === a)?.value ?? "";
297
320
  }
298
- async function ea(p) {
321
+ async function ta(p) {
299
322
  const { context: o, ref: c, name: a } = p;
300
323
  return ((await ve({ context: o, ref: c }))?.attributes ?? []).find((v) => v.name === a);
301
324
  }
302
- async function ta(p) {
325
+ async function na(p) {
303
326
  const { context: o, ref: c } = p;
304
327
  return ((await ve({ context: o, ref: c }))?.attributes ?? []).reduce(
305
- (d, g) => (d[g.name] = g.value ?? "", d),
328
+ (d, m) => (d[m.name] = m.value ?? "", d),
306
329
  {}
307
330
  );
308
331
  }
309
- async function na(p) {
332
+ async function ra(p) {
310
333
  const { context: o, ref: c } = p;
311
334
  return (await ve({ context: o, ref: c }))?.attributes ?? [];
312
335
  }
313
- async function yi(p) {
314
- const { context: o, ref: c, options: a = {} } = p, { select: f, omit: d, unwrap: g } = a, v = await ve({ context: o, ref: c });
336
+ async function bi(p) {
337
+ const { context: o, ref: c, options: a = {} } = p, { select: f, omit: d, unwrap: m } = a, v = await ve({ context: o, ref: c });
315
338
  Ge(v, {
316
339
  detail: "No record found for provided ref",
317
340
  key: "ELEMENT_NOT_FOUND"
318
341
  });
319
- const D = vi(d), R = await wa({
342
+ const D = wi(d), R = await _a({
320
343
  context: o,
321
344
  record: v,
322
345
  select: f,
323
346
  compiledOmit: D
324
347
  });
325
- return R ? g ? Ci({ tree: R, unwrapTagNames: g }) : R : dr({ record: v });
348
+ return R ? m ? Si({ tree: R, unwrapTagNames: m }) : R : dr({ record: v });
326
349
  }
327
- function vi(p) {
350
+ function wi(p) {
328
351
  const o = /* @__PURE__ */ new Set(), c = [];
329
352
  if (!p) return { unconditional: o, conditional: c };
330
353
  for (const a of p)
331
- typeof a == "string" ? o.add(a) : a.where ? c.push({
332
- tagName: a.tagName,
333
- where: a.where,
334
- scope: a.scope ?? "self"
335
- }) : o.add(a.tagName);
354
+ if (typeof a == "string")
355
+ o.add(a);
356
+ else {
357
+ const f = Object.keys(a)[0], d = a[f];
358
+ d?.where ? c.push({
359
+ tagName: f,
360
+ where: d.where,
361
+ scope: d.scope ?? "self"
362
+ }) : o.add(f);
363
+ }
336
364
  return { unconditional: o, conditional: c };
337
365
  }
338
- async function wa(p) {
366
+ async function _a(p) {
339
367
  const { context: o, record: c, select: a, compiledOmit: f } = p;
340
- if (bi({ record: c, compiledOmit: f }))
368
+ if (_i({ record: c, compiledOmit: f }))
341
369
  return dr({ record: c });
342
- const d = await _i({
370
+ const d = await xi({
343
371
  context: o,
344
372
  record: c,
345
373
  select: a,
346
374
  compiledOmit: f
347
375
  }), v = (await Promise.all(
348
376
  d.map(
349
- ({ record: D, select: R }) => wa({ context: o, record: D, select: R, compiledOmit: f })
377
+ ({ record: D, select: R }) => _a({ context: o, record: D, select: R, compiledOmit: f })
350
378
  )
351
379
  )).filter(
352
380
  (D) => D !== null
353
381
  );
354
382
  return dr({ record: c, tree: v });
355
383
  }
356
- function bi(p) {
384
+ function _i(p) {
357
385
  const { record: o, compiledOmit: c } = p;
358
386
  return c.conditional.some(
359
- (a) => a.scope === "children" && a.tagName === o.tagName && Wt({
387
+ (a) => a.scope === "children" && a.tagName === o.tagName && It({
360
388
  record: o,
361
389
  attributeFilter: a.where
362
390
  })
363
391
  );
364
392
  }
365
- function wi(p) {
393
+ function Ei(p) {
366
394
  const { record: o, compiledOmit: c } = p;
367
395
  return c.unconditional.has(o.tagName) ? !0 : c.conditional.some(
368
- (a) => a.scope === "self" && a.tagName === o.tagName && Wt({
396
+ (a) => a.scope === "self" && a.tagName === o.tagName && It({
369
397
  record: o,
370
398
  attributeFilter: a.where
371
399
  })
372
400
  );
373
401
  }
374
- async function _i(p) {
402
+ async function xi(p) {
375
403
  const { context: o, record: c, select: a, compiledOmit: f } = p;
376
404
  if (!c.children?.length) return [];
377
- const d = a ? Ti(a) : void 0, g = c.children.filter(
378
- (q) => Ei({ tagName: q.tagName, compiledOmit: f, selectKeys: d })
405
+ const d = a ? Oi(a) : void 0, m = c.children.filter(
406
+ (q) => Ti({ tagName: q.tagName, compiledOmit: f, selectKeys: d })
379
407
  );
380
- if (!g.length) return [];
408
+ if (!m.length) return [];
381
409
  const R = (await Promise.all(
382
- g.map(
410
+ m.map(
383
411
  (q) => ve({
384
412
  context: o,
385
413
  ref: me(q)
@@ -387,40 +415,40 @@ async function _i(p) {
387
415
  )
388
416
  )).filter(
389
417
  (q) => q !== void 0
390
- ).filter((q) => !wi({ record: q, compiledOmit: f }));
391
- return Ni({ children: R, select: a, record: c });
418
+ ).filter((q) => !Ei({ record: q, compiledOmit: f }));
419
+ return Ai({ children: R, select: a, record: c });
392
420
  }
393
- function Ei(p) {
421
+ function Ti(p) {
394
422
  const { tagName: o, compiledOmit: c, selectKeys: a } = p;
395
423
  return !(c.unconditional.has(o) || a && !a.has(o));
396
424
  }
397
- const xi = /* @__PURE__ */ new Set(["where", "recursive"]);
398
- function Ti(p) {
425
+ const Ni = /* @__PURE__ */ new Set(["where", "recursive"]);
426
+ function Oi(p) {
399
427
  const o = /* @__PURE__ */ new Set();
400
428
  for (const c of Object.keys(p))
401
- xi.has(c) || o.add(c);
429
+ Ni.has(c) || o.add(c);
402
430
  return o;
403
431
  }
404
- function Ni(p) {
432
+ function Ai(p) {
405
433
  const { children: o, select: c, record: a } = p;
406
434
  if (!c)
407
435
  return o.map((d) => ({ record: d, select: void 0 }));
408
436
  const f = [];
409
437
  for (const d of o) {
410
- const g = c[d.tagName];
411
- if (g === void 0 || g === !1) continue;
412
- if (g === !0) {
438
+ const m = c[d.tagName];
439
+ if (m === void 0 || m === !1) continue;
440
+ if (m === !0) {
413
441
  f.push({ record: d, select: void 0 });
414
442
  continue;
415
443
  }
416
- const v = Oi({ child: d, entry: g, parentRecord: a });
444
+ const v = Ci({ child: d, entry: m, parentRecord: a });
417
445
  v && f.push(v);
418
446
  }
419
447
  return f;
420
448
  }
421
- function Oi(p) {
449
+ function Ci(p) {
422
450
  const { child: o, entry: c, parentRecord: a } = p, f = c;
423
- if (!(f.where && !Wt({
451
+ if (!(f.where && !It({
424
452
  record: o,
425
453
  attributeFilter: f.where
426
454
  }))) {
@@ -428,21 +456,21 @@ function Oi(p) {
428
456
  const d = f.recursive === !0 ? !0 : f.recursive - 1;
429
457
  return d === 0 ? void 0 : { record: o, select: { ...f, recursive: d } };
430
458
  }
431
- return f.recursive ? { record: o, select: Ai(f, o.tagName) } : { record: o, select: f };
459
+ return f.recursive ? { record: o, select: Di(f, o.tagName) } : { record: o, select: f };
432
460
  }
433
461
  }
434
- function Ai(p, o) {
462
+ function Di(p, o) {
435
463
  const c = p[o];
436
464
  return p;
437
465
  }
438
- function Ci(p) {
466
+ function Si(p) {
439
467
  const { tree: o, unwrapTagNames: c } = p;
440
468
  function a(f) {
441
469
  return f.flatMap((d) => c.includes(d.tagName) ? a(d.tree) : [{ ...d, tree: a(d.tree) }]);
442
470
  }
443
471
  return { ...o, tree: a(o.tree) };
444
472
  }
445
- class _a {
473
+ class Ea {
446
474
  constructor(o, c) {
447
475
  this.store = o, this.dialecteConfig = c;
448
476
  }
@@ -527,7 +555,7 @@ class _a {
527
555
  */
528
556
  async getRecords(o) {
529
557
  const c = o.map((a) => me(a));
530
- return ma({ context: this.context, refs: c });
558
+ return ga({ context: this.context, refs: c });
531
559
  }
532
560
  /**
533
561
  * Get the first direct child of an element matching a given tag name.
@@ -543,7 +571,7 @@ class _a {
543
571
  */
544
572
  async getChild(o, c) {
545
573
  if (o)
546
- return ci({ context: this.context, ref: me(o), tagName: c });
574
+ return li({ context: this.context, ref: me(o), tagName: c });
547
575
  }
548
576
  /**
549
577
  * Get all direct children of an element matching a given tag name.
@@ -558,7 +586,7 @@ class _a {
558
586
  * ```
559
587
  */
560
588
  async getChildren(o, c) {
561
- return o ? li({ context: this.context, ref: me(o), tagName: c }) : [];
589
+ return o ? fi({ context: this.context, ref: me(o), tagName: c }) : [];
562
590
  }
563
591
  /**
564
592
  * Get all records of a given tag name.
@@ -578,13 +606,13 @@ class _a {
578
606
  const a = me(o);
579
607
  if (!c) {
580
608
  const f = this.dialecteConfig.descendants[a.tagName] ?? [];
581
- return Qr({
609
+ return Hr({
582
610
  context: this.context,
583
611
  ref: a,
584
612
  options: { collect: f }
585
613
  });
586
614
  }
587
- return Qr({
615
+ return Hr({
588
616
  context: this.context,
589
617
  ref: a,
590
618
  options: c
@@ -604,7 +632,7 @@ class _a {
604
632
  * ```
605
633
  */
606
634
  async findAncestors(o, c) {
607
- return o ? fi({ context: this.context, ref: me(o), options: c }) : [];
635
+ return o ? di({ context: this.context, ref: me(o), options: c }) : [];
608
636
  }
609
637
  /**
610
638
  * Build a full tree structure from an element down.
@@ -619,23 +647,23 @@ class _a {
619
647
  * ```
620
648
  */
621
649
  async getTree(o, c) {
622
- return yi({ context: this.context, ref: me(o), options: c });
650
+ return bi({ context: this.context, ref: me(o), options: c });
623
651
  }
624
652
  async getAttribute(o, c) {
625
653
  const a = me(o), { fullObject: f } = c;
626
- return f ? ea({ context: this.context, ref: a, ...c }) : Jr({ context: this.context, ref: a, ...c });
654
+ return f ? ta({ context: this.context, ref: a, ...c }) : ea({ context: this.context, ref: a, ...c });
627
655
  }
628
656
  async getAttributes(o, c) {
629
657
  const a = me(o), { fullObject: f } = c || {};
630
- return f ? na({ context: this.context, ref: a, ...c }) : ta({ context: this.context, ref: a, ...c });
658
+ return f ? ra({ context: this.context, ref: a, ...c }) : na({ context: this.context, ref: a, ...c });
631
659
  }
632
660
  async getAnyAttribute(o, c) {
633
661
  const a = me(o), { fullObject: f } = c;
634
- return f ? ea({ context: this.context, ref: a, ...c }) : Jr({ context: this.context, ref: a, ...c });
662
+ return f ? ta({ context: this.context, ref: a, ...c }) : ea({ context: this.context, ref: a, ...c });
635
663
  }
636
664
  async getAnyAttributes(o, c) {
637
665
  const a = me(o), { fullObject: f } = c || {};
638
- return f ? na({ context: this.context, ref: a, ...c }) : ta({ context: this.context, ref: a, ...c });
666
+ return f ? ra({ context: this.context, ref: a, ...c }) : na({ context: this.context, ref: a, ...c });
639
667
  }
640
668
  /**
641
669
  * Get the first direct child matching a tag name without element-type constraint.
@@ -673,24 +701,24 @@ class _a {
673
701
  * ```
674
702
  */
675
703
  async findByAttributes(o) {
676
- return ga({ context: this.context, ...o });
704
+ return ya({ context: this.context, ...o });
677
705
  }
678
706
  }
679
707
  function Ze(p) {
680
708
  const { context: o, status: c, record: a, oldRecord: f, newRecord: d } = p;
681
- let g, v, D;
682
- a && (g = ur(a)), f && (v = ur(f)), d && (D = ur(d)), c === "created" ? (Ge(g, {
709
+ let m, v, D;
710
+ a && (m = ur(a)), f && (v = ur(f)), d && (D = ur(d)), c === "created" ? (Ge(m, {
683
711
  detail: "Record is required for created",
684
712
  key: "ELEMENT_NOT_FOUND"
685
- }), o.stagedOperations.push({ status: c, oldRecord: void 0, newRecord: g })) : c === "updated" ? (Ge(v && D, {
713
+ }), o.stagedOperations.push({ status: c, oldRecord: void 0, newRecord: m })) : c === "updated" ? (Ge(v && D, {
686
714
  detail: "Old record and new record are required for updated",
687
715
  key: "ELEMENT_NOT_FOUND"
688
- }), o.stagedOperations.push({ status: c, oldRecord: v, newRecord: D })) : c === "deleted" && g && (Ge(g, {
716
+ }), o.stagedOperations.push({ status: c, oldRecord: v, newRecord: D })) : c === "deleted" && m && (Ge(m, {
689
717
  detail: "Record is required for deleted",
690
718
  key: "ELEMENT_NOT_FOUND"
691
- }), o.stagedOperations.push({ status: c, oldRecord: g, newRecord: void 0 }));
719
+ }), o.stagedOperations.push({ status: c, oldRecord: m, newRecord: void 0 }));
692
720
  }
693
- function gr(p) {
721
+ function yr(p) {
694
722
  const { context: o, operations: c } = p;
695
723
  for (const a of c)
696
724
  switch (a.status) {
@@ -710,14 +738,14 @@ function gr(p) {
710
738
  break;
711
739
  }
712
740
  }
713
- async function yr(p) {
714
- const { dialecteConfig: o, hooks: c, context: a, query: f, parentRef: d, params: g } = p, { id: v, tagName: D, attributes: R, namespace: q, value: Y } = g, Q = await ve({ context: a, ref: d });
741
+ async function vr(p) {
742
+ const { dialecteConfig: o, hooks: c, context: a, query: f, parentRef: d, params: m } = p, { id: v, tagName: D, attributes: R, namespace: q, value: Y } = m, Q = await ve({ context: a, ref: d });
715
743
  Ge(Q, {
716
744
  detail: "Parent record not found",
717
745
  key: "ELEMENT_NOT_FOUND",
718
746
  ref: d
719
747
  });
720
- const fe = ii({
748
+ const fe = oi({
721
749
  dialecteConfig: o,
722
750
  hooks: c,
723
751
  record: {
@@ -750,18 +778,18 @@ async function yr(p) {
750
778
  parentRecord: j,
751
779
  query: f
752
780
  });
753
- gr({ context: a, operations: B });
781
+ yr({ context: a, operations: B });
754
782
  }
755
783
  return fe;
756
784
  }
757
- async function Di(p) {
758
- const { dialecteConfig: o, hooks: c, context: a, query: f, parentRef: d, record: g, cumulativeCloneMappings: v } = p, D = [], R = await Ea({
785
+ async function Ii(p) {
786
+ const { dialecteConfig: o, hooks: c, context: a, query: f, parentRef: d, record: m, cumulativeCloneMappings: v } = p, D = [], R = await xa({
759
787
  dialecteConfig: o,
760
788
  hooks: c,
761
789
  context: a,
762
790
  query: f,
763
791
  parentRef: d,
764
- record: g,
792
+ record: m,
765
793
  mappings: D
766
794
  });
767
795
  if (v.push(...D), c?.afterDeepClone) {
@@ -776,15 +804,15 @@ async function Di(p) {
776
804
  mappings: D
777
805
  };
778
806
  }
779
- async function Ea(p) {
780
- const { dialecteConfig: o, hooks: c, context: a, query: f, parentRef: d, record: g, mappings: v } = p;
781
- let D = !0, R = g;
807
+ async function xa(p) {
808
+ const { dialecteConfig: o, hooks: c, context: a, query: f, parentRef: d, record: m, mappings: v } = p;
809
+ let D = !0, R = m;
782
810
  if (c?.beforeClone) {
783
- const Q = c.beforeClone({ record: g });
811
+ const Q = c.beforeClone({ record: m });
784
812
  D = Q.shouldBeCloned, R = Q.transformedRecord;
785
813
  }
786
814
  if (!D) return R;
787
- const q = await yr({
815
+ const q = await vr({
788
816
  dialecteConfig: o,
789
817
  hooks: c,
790
818
  context: a,
@@ -796,15 +824,15 @@ async function Ea(p) {
796
824
  attributes: R.attributes,
797
825
  value: R.value
798
826
  }
799
- }), Y = me(g);
827
+ }), Y = me(m);
800
828
  v.push({
801
829
  source: Object.assign(Y, {
802
- attributes: [...g.attributes]
830
+ attributes: [...m.attributes]
803
831
  }),
804
832
  target: me(q)
805
833
  });
806
834
  for (const Q of R.tree)
807
- await Ea({
835
+ await xa({
808
836
  dialecteConfig: o,
809
837
  hooks: c,
810
838
  context: a,
@@ -815,7 +843,7 @@ async function Ea(p) {
815
843
  });
816
844
  return q;
817
845
  }
818
- function Si(p) {
846
+ function Ri(p) {
819
847
  const o = /* @__PURE__ */ new Map();
820
848
  for (const a of p) {
821
849
  const f = (a.status === "deleted" ? a.oldRecord : a.newRecord).id, d = o.get(f);
@@ -844,14 +872,14 @@ function Si(p) {
844
872
  deletes: c.filter((a) => a.status === "deleted")
845
873
  };
846
874
  }
847
- async function Ii(p) {
848
- const { stagedOperations: o, store: c, documentState: a } = p, { creates: f, updates: d, deletes: g } = Si(o), v = f.length + d.length + g.length;
875
+ async function ki(p) {
876
+ const { stagedOperations: o, store: c, documentState: a } = p, { creates: f, updates: d, deletes: m } = Ri(o), v = f.length + d.length + m.length;
849
877
  a.loading = !0, a.progress = { message: "Committing changes...", current: 0, total: v };
850
878
  try {
851
879
  await c.commit({
852
880
  creates: f.map((D) => D.newRecord),
853
881
  updates: d.map((D) => D.newRecord),
854
- deletes: g.map((D) => D.oldRecord.id),
882
+ deletes: m.map((D) => D.oldRecord.id),
855
883
  onProgress: (D, R) => {
856
884
  a.progress = { message: "Committing changes...", current: D, total: R };
857
885
  }
@@ -861,7 +889,7 @@ async function Ii(p) {
861
889
  }
862
890
  a.lastUpdate = Date.now();
863
891
  }
864
- async function Ri(p) {
892
+ async function Pi(p) {
865
893
  const { hooks: o, context: c, query: a, ref: f } = p, d = await ve({ context: c, ref: f });
866
894
  if (Ge(d, {
867
895
  detail: `Record not found (tagName=${f.tagName}, id=${f.id})`,
@@ -872,10 +900,10 @@ async function Ri(p) {
872
900
  key: "PROTECTED_ROOT"
873
901
  }), o?.beforeDelete) {
874
902
  const R = await o.beforeDelete({ record: d, query: a });
875
- gr({ context: c, operations: R });
903
+ yr({ context: c, operations: R });
876
904
  }
877
- await xa({ context: c, record: d }), Ze({ context: c, status: "deleted", record: d });
878
- const g = me(d.parent), v = await ve({ context: c, ref: g });
905
+ await Ta({ context: c, record: d }), Ze({ context: c, status: "deleted", record: d });
906
+ const m = me(d.parent), v = await ve({ context: c, ref: m });
879
907
  Ge(v, {
880
908
  detail: `Parent record not found (tagName=${d.parent.tagName}, id=${d.parent.id})`,
881
909
  key: "ELEMENT_NOT_FOUND"
@@ -886,41 +914,41 @@ async function Ri(p) {
886
914
  };
887
915
  return Ze({ context: c, status: "updated", oldRecord: v, newRecord: D }), D;
888
916
  }
889
- async function xa(p) {
917
+ async function Ta(p) {
890
918
  const { context: o, record: c } = p;
891
919
  for (const a of c.children) {
892
920
  const f = me(a), d = await ve({ context: o, ref: f });
893
- d && (d.children.length > 0 && await xa({ context: o, record: d }), Ze({ context: o, status: "deleted", record: d }));
921
+ d && (d.children.length > 0 && await Ta({ context: o, record: d }), Ze({ context: o, status: "deleted", record: d }));
894
922
  }
895
923
  }
896
- async function ki(p) {
897
- const { dialecteConfig: o, hooks: c, context: a, query: f, parentRef: d, params: g } = p, v = Pi(g.attributes);
924
+ async function Fi(p) {
925
+ const { dialecteConfig: o, hooks: c, context: a, query: f, parentRef: d, params: m } = p, v = Bi(m.attributes);
898
926
  if (v) {
899
- const [D] = await ga({
927
+ const [D] = await ya({
900
928
  context: a,
901
- tagName: g.tagName,
929
+ tagName: m.tagName,
902
930
  attributes: v
903
931
  });
904
932
  if (D) return D;
905
933
  } else {
906
- const D = { tagName: g.tagName, id: g.id }, R = await ve({ context: a, ref: D });
934
+ const D = { tagName: m.tagName, id: m.id }, R = await ve({ context: a, ref: D });
907
935
  if (R) return R;
908
936
  }
909
- return yr({
937
+ return vr({
910
938
  dialecteConfig: o,
911
939
  hooks: c,
912
940
  context: a,
913
941
  query: f,
914
942
  parentRef: d,
915
- params: g
943
+ params: m
916
944
  });
917
945
  }
918
- function Pi(p) {
946
+ function Bi(p) {
919
947
  const o = Array.isArray(p) ? Object.fromEntries(p.map((a) => [a.name, a.value])) : p;
920
948
  return Object.values(o).some((a) => a !== void 0 && a !== "") ? o : void 0;
921
949
  }
922
- async function Fi(p) {
923
- const { dialecteConfig: o, hooks: c, context: a, query: f, ref: d, params: g } = p, { attributes: v, value: D } = g, R = await ve({ context: a, ref: d });
950
+ async function ji(p) {
951
+ const { dialecteConfig: o, hooks: c, context: a, query: f, ref: d, params: m } = p, { attributes: v, value: D } = m, R = await ve({ context: a, ref: d });
924
952
  Ge(R, {
925
953
  detail: `Record not found (tagName=${d.tagName}, id=${d.id})`,
926
954
  key: "ELEMENT_NOT_FOUND",
@@ -928,7 +956,7 @@ async function Fi(p) {
928
956
  });
929
957
  let q = R.attributes;
930
958
  if (v) {
931
- const Q = oi({
959
+ const Q = si({
932
960
  dialecteConfig: o,
933
961
  tagName: R.tagName,
934
962
  attributes: v
@@ -950,11 +978,11 @@ async function Fi(p) {
950
978
  newRecord: Y,
951
979
  query: f
952
980
  });
953
- gr({ context: a, operations: Q });
981
+ yr({ context: a, operations: Q });
954
982
  }
955
983
  return Y;
956
984
  }
957
- class Bi extends _a {
985
+ class Mi extends Ea {
958
986
  constructor(o, c, a, f) {
959
987
  super(o, c), this.stagedOperations = [], this.recordCache = /* @__PURE__ */ new Map(), this.cumulativeCloneMappings = [], this.documentState = a, this.hooks = f;
960
988
  }
@@ -994,7 +1022,7 @@ class Bi extends _a {
994
1022
  * ```
995
1023
  */
996
1024
  async addChild(o, c) {
997
- return yr({
1025
+ return vr({
998
1026
  context: this.context,
999
1027
  parentRef: me(o),
1000
1028
  params: c,
@@ -1025,7 +1053,7 @@ class Bi extends _a {
1025
1053
  * If A already exists under root, returns its ref. Otherwise, creates it and returns the new ref.
1026
1054
  */
1027
1055
  async ensureChild(o, c) {
1028
- return ki({
1056
+ return Fi({
1029
1057
  context: this.context,
1030
1058
  parentRef: me(o),
1031
1059
  params: c,
@@ -1049,7 +1077,7 @@ class Bi extends _a {
1049
1077
  * ```
1050
1078
  */
1051
1079
  async update(o, c) {
1052
- return Fi({
1080
+ return ji({
1053
1081
  context: this.context,
1054
1082
  ref: me(o),
1055
1083
  params: c,
@@ -1070,7 +1098,7 @@ class Bi extends _a {
1070
1098
  * ```
1071
1099
  */
1072
1100
  async delete(o) {
1073
- return Ri({
1101
+ return Pi({
1074
1102
  context: this.context,
1075
1103
  ref: me(o),
1076
1104
  hooks: this.hooks,
@@ -1091,7 +1119,7 @@ class Bi extends _a {
1091
1119
  * ```
1092
1120
  */
1093
1121
  async deepClone(o, c) {
1094
- return Di({
1122
+ return Ii({
1095
1123
  dialecteConfig: this.dialecteConfig,
1096
1124
  hooks: this.hooks,
1097
1125
  context: this.context,
@@ -1126,17 +1154,17 @@ class Bi extends _a {
1126
1154
  * Merges operations by ID to optimize database writes.
1127
1155
  */
1128
1156
  async commit() {
1129
- await Ii({
1157
+ await ki({
1130
1158
  stagedOperations: this.stagedOperations,
1131
1159
  store: this.store,
1132
1160
  documentState: this.documentState
1133
1161
  });
1134
1162
  }
1135
1163
  }
1136
- function $t(p) {
1164
+ function Xt(p) {
1137
1165
  return p.recordCache !== void 0;
1138
1166
  }
1139
- class Ta {
1167
+ class Na {
1140
1168
  constructor(o, c, a, f) {
1141
1169
  this.state = {
1142
1170
  loading: !1,
@@ -1161,7 +1189,7 @@ class Ta {
1161
1189
  * Override in dialecte subclass to return a domain-specific Query.
1162
1190
  */
1163
1191
  createQuery() {
1164
- return new _a(this.store, this.config);
1192
+ return new Ea(this.store, this.config);
1165
1193
  }
1166
1194
  get query() {
1167
1195
  return this.withQueryExtensions(this.createQuery());
@@ -1172,7 +1200,7 @@ class Ta {
1172
1200
  * e.g. SclDocument overrides this to return new SclTransaction(...)
1173
1201
  */
1174
1202
  createTransaction() {
1175
- return new Bi(this.store, this.config, this.state, this.hooks);
1203
+ return new Mi(this.store, this.config, this.state, this.hooks);
1176
1204
  }
1177
1205
  async transaction(o, c) {
1178
1206
  this.activeTransactions > 0 && qe("CONCURRENT_TRANSACTION", {
@@ -1232,13 +1260,13 @@ class Ta {
1232
1260
  updates: f.filter((v) => v.status === "updated").length,
1233
1261
  deletes: f.filter((v) => v.status === "deleted").length
1234
1262
  };
1235
- let g = !1;
1263
+ let m = !1;
1236
1264
  return {
1237
1265
  operations: f,
1238
1266
  summary: d,
1239
1267
  commit: async () => {
1240
- if (!g) {
1241
- g = !0, this.activeTransactions++, this.state.loading = !0;
1268
+ if (!m) {
1269
+ m = !0, this.activeTransactions++, this.state.loading = !0;
1242
1270
  try {
1243
1271
  await a.commit(), this.channel.postMessage(this.state.lastUpdate), a.clearStagedOperations(), a.clearRecordCache(), a.clearCumulativeCloneMappings(), this.state.history.push({
1244
1272
  method: "commit",
@@ -1256,7 +1284,7 @@ class Ta {
1256
1284
  }
1257
1285
  },
1258
1286
  discard: () => {
1259
- g || (g = !0, a.clearStagedOperations(), a.clearRecordCache(), a.clearCumulativeCloneMappings());
1287
+ m || (m = !0, a.clearStagedOperations(), a.clearRecordCache(), a.clearCumulativeCloneMappings());
1260
1288
  }
1261
1289
  };
1262
1290
  }
@@ -1296,11 +1324,11 @@ class Ta {
1296
1324
  this.channel.close(), await this.store.destroy();
1297
1325
  }
1298
1326
  }
1299
- var ji = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1300
- function Na(p) {
1327
+ var Ki = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1328
+ function Oa(p) {
1301
1329
  return p && p.__esModule && Object.prototype.hasOwnProperty.call(p, "default") ? p.default : p;
1302
1330
  }
1303
- function Mi(p) {
1331
+ function qi(p) {
1304
1332
  if (Object.prototype.hasOwnProperty.call(p, "__esModule")) return p;
1305
1333
  var o = p.default;
1306
1334
  if (typeof o == "function") {
@@ -1324,12 +1352,12 @@ function Mi(p) {
1324
1352
  });
1325
1353
  }), c;
1326
1354
  }
1327
- var Nn = { exports: {} }, Ki = Nn.exports, ra;
1328
- function qi() {
1329
- return ra || (ra = 1, (function(p, o) {
1355
+ var Nn = { exports: {} }, Li = Nn.exports, aa;
1356
+ function Ui() {
1357
+ return aa || (aa = 1, (function(p, o) {
1330
1358
  (function(c, a) {
1331
1359
  p.exports = a();
1332
- })(Ki, function() {
1360
+ })(Li, function() {
1333
1361
  var c = function(e, t) {
1334
1362
  return (c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
1335
1363
  n.__proto__ = r;
@@ -1346,9 +1374,9 @@ function qi() {
1346
1374
  for (var r, i = 0, u = t.length; i < u; i++) !r && i in t || ((r = r || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
1347
1375
  return e.concat(r || Array.prototype.slice.call(t));
1348
1376
  }
1349
- var d = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ji, g = Object.keys, v = Array.isArray;
1377
+ var d = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ki, m = Object.keys, v = Array.isArray;
1350
1378
  function D(e, t) {
1351
- return typeof t != "object" || g(t).forEach(function(n) {
1379
+ return typeof t != "object" || m(t).forEach(function(n) {
1352
1380
  e[n] = t[n];
1353
1381
  }), e;
1354
1382
  }
@@ -1358,7 +1386,7 @@ function qi() {
1358
1386
  return q.call(e, t);
1359
1387
  }
1360
1388
  function Q(e, t) {
1361
- typeof t == "function" && (t = t(R(e))), (typeof Reflect > "u" ? g : Reflect.ownKeys)(t).forEach(function(n) {
1389
+ typeof t == "function" && (t = t(R(e))), (typeof Reflect > "u" ? m : Reflect.ownKeys)(t).forEach(function(n) {
1362
1390
  j(e, n, t[n]);
1363
1391
  });
1364
1392
  }
@@ -1396,8 +1424,8 @@ function qi() {
1396
1424
  }
1397
1425
  var h = t.indexOf(".");
1398
1426
  if (h !== -1) {
1399
- var m = e[t.substr(0, h)];
1400
- return m == null ? void 0 : de(m, t.substr(h + 1));
1427
+ var g = e[t.substr(0, h)];
1428
+ return g == null ? void 0 : de(g, t.substr(h + 1));
1401
1429
  }
1402
1430
  }
1403
1431
  function le(e, t, n) {
@@ -1405,8 +1433,8 @@ function qi() {
1405
1433
  H(typeof n != "string" && "length" in n);
1406
1434
  for (var r = 0, i = t.length; r < i; ++r) le(e, t[r], n[r]);
1407
1435
  } else {
1408
- var u, h, m = t.indexOf(".");
1409
- m !== -1 ? (u = t.substr(0, m), (h = t.substr(m + 1)) === "" ? n === void 0 ? v(e) && !isNaN(parseInt(u)) ? e.splice(u, 1) : delete e[u] : e[u] = n : le(m = !(m = e[u]) || !Y(e, u) ? e[u] = {} : m, h, n)) : n === void 0 ? v(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
1436
+ var u, h, g = t.indexOf(".");
1437
+ g !== -1 ? (u = t.substr(0, g), (h = t.substr(g + 1)) === "" ? n === void 0 ? v(e) && !isNaN(parseInt(u)) ? e.splice(u, 1) : delete e[u] : e[u] = n : le(g = !(g = e[u]) || !Y(e, u) ? e[u] = {} : g, h, n)) : n === void 0 ? v(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
1410
1438
  }
1411
1439
  }
1412
1440
  function ge(e) {
@@ -1424,7 +1452,7 @@ function qi() {
1424
1452
  });
1425
1453
  }))).filter(function(e) {
1426
1454
  return d[e];
1427
- }), It = new Set(Ve.map(function(e) {
1455
+ }), Rt = new Set(Ve.map(function(e) {
1428
1456
  return d[e];
1429
1457
  })), Ue = null;
1430
1458
  function We(e) {
@@ -1435,21 +1463,21 @@ function qi() {
1435
1463
  if (v(n)) {
1436
1464
  r = [], Ue.set(n, r);
1437
1465
  for (var i = 0, u = n.length; i < u; ++i) r.push(t(n[i]));
1438
- } else if (It.has(n.constructor)) r = n;
1466
+ } else if (Rt.has(n.constructor)) r = n;
1439
1467
  else {
1440
- var h, m = R(n);
1441
- for (h in r = m === Object.prototype ? {} : Object.create(m), Ue.set(n, r), n) Y(n, h) && (r[h] = t(n[h]));
1468
+ var h, g = R(n);
1469
+ for (h in r = g === Object.prototype ? {} : Object.create(g), Ue.set(n, r), n) Y(n, h) && (r[h] = t(n[h]));
1442
1470
  }
1443
1471
  return r;
1444
1472
  })(e), Ue = null, e;
1445
1473
  }
1446
1474
  var zt = {}.toString;
1447
- function Rt(e) {
1475
+ function kt(e) {
1448
1476
  return zt.call(e).slice(8, -1);
1449
1477
  }
1450
- var kt = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", be = typeof kt == "symbol" ? function(e) {
1478
+ var Pt = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", be = typeof Pt == "symbol" ? function(e) {
1451
1479
  var t;
1452
- return e != null && (t = e[kt]) && t.apply(e);
1480
+ return e != null && (t = e[Pt]) && t.apply(e);
1453
1481
  } : function() {
1454
1482
  return null;
1455
1483
  };
@@ -1584,9 +1612,9 @@ function qi() {
1584
1612
  if (typeof crypto > "u" || !crypto.subtle) return [e, R(e), e];
1585
1613
  var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
1586
1614
  return [t, R(t), e];
1587
- })(), nt = Ve[0], Le = Ve[1], Ve = Ve[2], Le = Le && Le.then, $e = nt && nt.constructor, Cn = !!Ve, Pt = function(e, t) {
1588
- Ft.push([e, t]), Ht && (queueMicrotask(Fa), Ht = !1);
1589
- }, Dn = !0, Ht = !0, ft = [], Zt = [], Sn = s, rt = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: l, pgp: !1, env: {}, finalize: l }, W = rt, Ft = [], dt = 0, Jt = [];
1615
+ })(), nt = Ve[0], Le = Ve[1], Ve = Ve[2], Le = Le && Le.then, $e = nt && nt.constructor, Cn = !!Ve, Ft = function(e, t) {
1616
+ Bt.push([e, t]), Ht && (queueMicrotask(Ba), Ht = !1);
1617
+ }, Dn = !0, Ht = !0, ft = [], Zt = [], Sn = s, rt = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: l, pgp: !1, env: {}, finalize: l }, W = rt, Bt = [], dt = 0, Jt = [];
1590
1618
  function $(e) {
1591
1619
  if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
1592
1620
  this._listeners = [], this._lib = !1;
@@ -1601,9 +1629,9 @@ function qi() {
1601
1629
  if (r._state === null) {
1602
1630
  if (u === r) throw new TypeError("A promise cannot be resolved with itself.");
1603
1631
  var h = r._lib && xt();
1604
- u && typeof u.then == "function" ? n(r, function(m, b) {
1605
- u instanceof $ ? u._then(m, b) : u.then(m, b);
1606
- }) : (r._state = !0, r._value = u, br(r)), h && Tt();
1632
+ u && typeof u.then == "function" ? n(r, function(g, b) {
1633
+ u instanceof $ ? u._then(g, b) : u.then(g, b);
1634
+ }) : (r._state = !0, r._value = u, wr(r)), h && Tt();
1607
1635
  }
1608
1636
  }, Rn.bind(null, r));
1609
1637
  } catch (u) {
@@ -1614,8 +1642,8 @@ function qi() {
1614
1642
  var In = { get: function() {
1615
1643
  var e = W, t = rn;
1616
1644
  function n(r, i) {
1617
- var u = this, h = !e.global && (e !== W || t !== rn), m = h && !it(), b = new $(function(_, T) {
1618
- kn(u, new vr(_r(r, e, h, m), _r(i, e, h, m), _, T, e));
1645
+ var u = this, h = !e.global && (e !== W || t !== rn), g = h && !it(), b = new $(function(_, T) {
1646
+ kn(u, new br(Er(r, e, h, g), Er(i, e, h, g), _, T, e));
1619
1647
  });
1620
1648
  return this._consoleTask && (b._consoleTask = this._consoleTask), b;
1621
1649
  }
@@ -1625,21 +1653,21 @@ function qi() {
1625
1653
  return e;
1626
1654
  }, set: In.set });
1627
1655
  } };
1628
- function vr(e, t, n, r, i) {
1656
+ function br(e, t, n, r, i) {
1629
1657
  this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.resolve = n, this.reject = r, this.psd = i;
1630
1658
  }
1631
1659
  function Rn(e, t) {
1632
1660
  var n, r;
1633
1661
  Zt.push(t), e._state === null && (n = e._lib && xt(), t = Sn(t), e._state = !1, e._value = t, r = e, ft.some(function(i) {
1634
1662
  return i._value === r._value;
1635
- }) || ft.push(r), br(e), n && Tt());
1663
+ }) || ft.push(r), wr(e), n && Tt());
1636
1664
  }
1637
- function br(e) {
1665
+ function wr(e) {
1638
1666
  var t = e._listeners;
1639
1667
  e._listeners = [];
1640
1668
  for (var n = 0, r = t.length; n < r; ++n) kn(e, t[n]);
1641
1669
  var i = e._PSD;
1642
- --i.ref || i.finalize(), dt === 0 && (++dt, Pt(function() {
1670
+ --i.ref || i.finalize(), dt === 0 && (++dt, Ft(function() {
1643
1671
  --dt == 0 && Pn();
1644
1672
  }, []));
1645
1673
  }
@@ -1647,10 +1675,10 @@ function qi() {
1647
1675
  if (e._state !== null) {
1648
1676
  var n = e._state ? t.onFulfilled : t.onRejected;
1649
1677
  if (n === null) return (e._state ? t.resolve : t.reject)(e._value);
1650
- ++t.psd.ref, ++dt, Pt(Pa, [n, e, t]);
1678
+ ++t.psd.ref, ++dt, Ft(Fa, [n, e, t]);
1651
1679
  } else e._listeners.push(t);
1652
1680
  }
1653
- function Pa(e, t, n) {
1681
+ function Fa(e, t, n) {
1654
1682
  try {
1655
1683
  var r, i = t._value;
1656
1684
  !t._state && Zt.length && (Zt = []), r = Ne && t._consoleTask ? t._consoleTask.run(function() {
@@ -1664,7 +1692,7 @@ function qi() {
1664
1692
  --dt == 0 && Pn(), --n.psd.ref || n.psd.finalize();
1665
1693
  }
1666
1694
  }
1667
- function Fa() {
1695
+ function Ba() {
1668
1696
  ht(rt, function() {
1669
1697
  xt() && Tt();
1670
1698
  });
@@ -1676,11 +1704,11 @@ function qi() {
1676
1704
  function Tt() {
1677
1705
  var e, t, n;
1678
1706
  do
1679
- for (; 0 < Ft.length; ) for (e = Ft, Ft = [], n = e.length, t = 0; t < n; ++t) {
1707
+ for (; 0 < Bt.length; ) for (e = Bt, Bt = [], n = e.length, t = 0; t < n; ++t) {
1680
1708
  var r = e[t];
1681
1709
  r[0].apply(null, r[1]);
1682
1710
  }
1683
- while (0 < Ft.length);
1711
+ while (0 < Bt.length);
1684
1712
  Ht = Dn = !0;
1685
1713
  }
1686
1714
  function Pn() {
@@ -1707,7 +1735,7 @@ function qi() {
1707
1735
  };
1708
1736
  }
1709
1737
  Q($.prototype, { then: In, _then: function(e, t) {
1710
- kn(this, new vr(null, null, e, t, W));
1738
+ kn(this, new br(null, null, e, t, W));
1711
1739
  }, catch: function(e) {
1712
1740
  if (arguments.length === 1) return this.then(null, e);
1713
1741
  var t = e, n = arguments[1];
@@ -1734,7 +1762,7 @@ function qi() {
1734
1762
  }, e);
1735
1763
  n.then(r, i).finally(clearTimeout.bind(null, u));
1736
1764
  }) : this;
1737
- } }), typeof Symbol < "u" && Symbol.toStringTag && j($.prototype, Symbol.toStringTag, "Dexie.Promise"), rt.env = wr(), Q($, { all: function() {
1765
+ } }), typeof Symbol < "u" && Symbol.toStringTag && j($.prototype, Symbol.toStringTag, "Dexie.Promise"), rt.env = _r(), Q($, { all: function() {
1738
1766
  var e = Se.apply(null, arguments).map(an);
1739
1767
  return new $(function(t, n) {
1740
1768
  e.length === 0 && t([]);
@@ -1763,9 +1791,9 @@ function qi() {
1763
1791
  } }, totalEchoes: { get: function() {
1764
1792
  return rn;
1765
1793
  } }, newPSD: at, usePSD: ht, scheduler: { get: function() {
1766
- return Pt;
1794
+ return Ft;
1767
1795
  }, set: function(e) {
1768
- Pt = e;
1796
+ Ft = e;
1769
1797
  } }, rejectionMapper: { get: function() {
1770
1798
  return Sn;
1771
1799
  }, set: function(e) {
@@ -1775,12 +1803,12 @@ function qi() {
1775
1803
  return at(function(i, u) {
1776
1804
  var h = W;
1777
1805
  h.unhandleds = [], h.onunhandled = u, h.finalize = E(function() {
1778
- var m, b = this;
1779
- m = function() {
1806
+ var g, b = this;
1807
+ g = function() {
1780
1808
  b.unhandleds.length === 0 ? i() : u(b.unhandleds[0]);
1781
1809
  }, Jt.push(function _() {
1782
- m(), Jt.splice(Jt.indexOf(_), 1);
1783
- }), ++dt, Pt(function() {
1810
+ g(), Jt.splice(Jt.indexOf(_), 1);
1811
+ }), ++dt, Ft(function() {
1784
1812
  --dt == 0 && Pn();
1785
1813
  }, []);
1786
1814
  }, h.finalize), e();
@@ -1807,23 +1835,23 @@ function qi() {
1807
1835
  e.length === 0 && n(new AggregateError([]));
1808
1836
  var r = e.length, i = new Array(r);
1809
1837
  e.forEach(function(u, h) {
1810
- return $.resolve(u).then(function(m) {
1811
- return t(m);
1812
- }, function(m) {
1813
- i[h] = m, --r || n(new AggregateError(i));
1838
+ return $.resolve(u).then(function(g) {
1839
+ return t(g);
1840
+ }, function(g) {
1841
+ i[h] = g, --r || n(new AggregateError(i));
1814
1842
  });
1815
1843
  });
1816
1844
  });
1817
1845
  }), $e.withResolvers && ($.withResolvers = $e.withResolvers));
1818
- var Ce = { awaits: 0, echoes: 0, id: 0 }, Ba = 0, tn = [], nn = 0, rn = 0, ja = 0;
1846
+ var Ce = { awaits: 0, echoes: 0, id: 0 }, ja = 0, tn = [], nn = 0, rn = 0, Ma = 0;
1819
1847
  function at(e, t, n, r) {
1820
1848
  var i = W, u = Object.create(i);
1821
- return u.parent = i, u.ref = 0, u.global = !1, u.id = ++ja, rt.env, u.env = Cn ? { Promise: $, PromiseProp: { value: $, configurable: !0, writable: !0 }, all: $.all, race: $.race, allSettled: $.allSettled, any: $.any, resolve: $.resolve, reject: $.reject } : {}, t && D(u, t), ++i.ref, u.finalize = function() {
1849
+ return u.parent = i, u.ref = 0, u.global = !1, u.id = ++Ma, rt.env, u.env = Cn ? { Promise: $, PromiseProp: { value: $, configurable: !0, writable: !0 }, all: $.all, race: $.race, allSettled: $.allSettled, any: $.any, resolve: $.resolve, reject: $.reject } : {}, t && D(u, t), ++i.ref, u.finalize = function() {
1822
1850
  --this.parent.ref || this.parent.finalize();
1823
1851
  }, r = ht(u, e, n, r), u.ref === 0 && u.finalize(), r;
1824
1852
  }
1825
1853
  function Nt() {
1826
- return Ce.id || (Ce.id = ++Ba), ++Ce.awaits, Ce.echoes += Qt, Ce.id;
1854
+ return Ce.id || (Ce.id = ++ja), ++Ce.awaits, Ce.echoes += Qt, Ce.id;
1827
1855
  }
1828
1856
  function it() {
1829
1857
  return !!Ce.awaits && (--Ce.awaits == 0 && (Ce.id = 0), Ce.echoes = Ce.awaits * Qt, !0);
@@ -1835,7 +1863,7 @@ function qi() {
1835
1863
  return it(), Ee(t);
1836
1864
  })) : e;
1837
1865
  }
1838
- function Ma() {
1866
+ function Ka() {
1839
1867
  var e = tn[tn.length - 1];
1840
1868
  tn.pop(), ot(e, !1);
1841
1869
  }
@@ -1843,9 +1871,9 @@ function qi() {
1843
1871
  var n, r = W;
1844
1872
  (t ? !Ce.echoes || nn++ && e === W : !nn || --nn && e === W) || queueMicrotask(t ? (function(i) {
1845
1873
  ++rn, Ce.echoes && --Ce.echoes != 0 || (Ce.echoes = Ce.awaits = Ce.id = 0), tn.push(W), ot(i, !0);
1846
- }).bind(null, e) : Ma), e !== W && (W = e, r === rt && (rt.env = wr()), Cn && (n = rt.env.Promise, t = e.env, (r.global || e.global) && (Object.defineProperty(d, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
1874
+ }).bind(null, e) : Ka), e !== W && (W = e, r === rt && (rt.env = _r()), Cn && (n = rt.env.Promise, t = e.env, (r.global || e.global) && (Object.defineProperty(d, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
1847
1875
  }
1848
- function wr() {
1876
+ function _r() {
1849
1877
  var e = d.Promise;
1850
1878
  return Cn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(d, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
1851
1879
  }
@@ -1857,7 +1885,7 @@ function qi() {
1857
1885
  ot(u, !1);
1858
1886
  }
1859
1887
  }
1860
- function _r(e, t, n, r) {
1888
+ function Er(e, t, n, r) {
1861
1889
  return typeof e != "function" ? e : function() {
1862
1890
  var i = W;
1863
1891
  n && Nt(), ot(t, !0);
@@ -1872,13 +1900,13 @@ function qi() {
1872
1900
  Promise === $e && Ce.echoes === 0 ? nn === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
1873
1901
  }
1874
1902
  ("" + Le).indexOf("[native code]") === -1 && (Nt = it = l);
1875
- var Ee = $.reject, pt = "￿", Qe = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", Er = "String expected.", Ot = [], on = "__dbnames", Bn = "readonly", jn = "readwrite";
1903
+ var Ee = $.reject, pt = "￿", Qe = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", xr = "String expected.", Ot = [], on = "__dbnames", Bn = "readonly", jn = "readwrite";
1876
1904
  function mt(e, t) {
1877
1905
  return e ? t ? function() {
1878
1906
  return e.apply(this, arguments) && t.apply(this, arguments);
1879
1907
  } : e : t;
1880
1908
  }
1881
- var xr = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
1909
+ var Tr = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
1882
1910
  function sn(e) {
1883
1911
  return typeof e != "string" || /\./.test(e) ? function(t) {
1884
1912
  return t;
@@ -1886,12 +1914,12 @@ function qi() {
1886
1914
  return t[e] === void 0 && e in t && delete (t = We(t))[e], t;
1887
1915
  };
1888
1916
  }
1889
- function Tr() {
1917
+ function Nr() {
1890
1918
  throw z.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.");
1891
1919
  }
1892
1920
  function re(e, t) {
1893
1921
  try {
1894
- var n = Nr(e), r = Nr(t);
1922
+ var n = Or(e), r = Or(t);
1895
1923
  if (n !== r) return n === "Array" ? 1 : r === "Array" ? -1 : n === "binary" ? 1 : r === "binary" ? -1 : n === "string" ? 1 : r === "string" ? -1 : n === "Date" ? 1 : r !== "Date" ? NaN : -1;
1896
1924
  switch (n) {
1897
1925
  case "number":
@@ -1900,27 +1928,27 @@ function qi() {
1900
1928
  return t < e ? 1 : e < t ? -1 : 0;
1901
1929
  case "binary":
1902
1930
  return (function(i, u) {
1903
- for (var h = i.length, m = u.length, b = h < m ? h : m, _ = 0; _ < b; ++_) if (i[_] !== u[_]) return i[_] < u[_] ? -1 : 1;
1904
- return h === m ? 0 : h < m ? -1 : 1;
1905
- })(Or(e), Or(t));
1931
+ for (var h = i.length, g = u.length, b = h < g ? h : g, _ = 0; _ < b; ++_) if (i[_] !== u[_]) return i[_] < u[_] ? -1 : 1;
1932
+ return h === g ? 0 : h < g ? -1 : 1;
1933
+ })(Ar(e), Ar(t));
1906
1934
  case "Array":
1907
1935
  return (function(i, u) {
1908
- for (var h = i.length, m = u.length, b = h < m ? h : m, _ = 0; _ < b; ++_) {
1936
+ for (var h = i.length, g = u.length, b = h < g ? h : g, _ = 0; _ < b; ++_) {
1909
1937
  var T = re(i[_], u[_]);
1910
1938
  if (T !== 0) return T;
1911
1939
  }
1912
- return h === m ? 0 : h < m ? -1 : 1;
1940
+ return h === g ? 0 : h < g ? -1 : 1;
1913
1941
  })(e, t);
1914
1942
  }
1915
1943
  } catch {
1916
1944
  }
1917
1945
  return NaN;
1918
1946
  }
1919
- function Nr(e) {
1947
+ function Or(e) {
1920
1948
  var t = typeof e;
1921
- return t != "object" ? t : ArrayBuffer.isView(e) ? "binary" : (e = Rt(e), e === "ArrayBuffer" ? "binary" : e);
1949
+ return t != "object" ? t : ArrayBuffer.isView(e) ? "binary" : (e = kt(e), e === "ArrayBuffer" ? "binary" : e);
1922
1950
  }
1923
- function Or(e) {
1951
+ function Ar(e) {
1924
1952
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
1925
1953
  }
1926
1954
  function un(e, t, n) {
@@ -1933,13 +1961,13 @@ function qi() {
1933
1961
  return n;
1934
1962
  })) : n;
1935
1963
  }
1936
- var Ar = (he.prototype._trans = function(e, t, n) {
1964
+ var Cr = (he.prototype._trans = function(e, t, n) {
1937
1965
  var r = this._tx || W.trans, i = this.name, u = Ne && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
1938
1966
  function h(_, T, y) {
1939
1967
  if (!y.schema[i]) throw new z.NotFound("Table " + i + " not part of transaction");
1940
1968
  return t(y.idbtrans, y);
1941
1969
  }
1942
- var m = xt();
1970
+ var g = xt();
1943
1971
  try {
1944
1972
  var b = r && r.db._novip === this.db._novip ? r === W.trans ? r._promise(e, h, n) : at(function() {
1945
1973
  return r._promise(e, h, n);
@@ -1980,7 +2008,7 @@ function qi() {
1980
2008
  return console.trace(_), Ee(_);
1981
2009
  })), b;
1982
2010
  } finally {
1983
- m && Tt();
2011
+ g && Tt();
1984
2012
  }
1985
2013
  }, he.prototype.get = function(e, t) {
1986
2014
  var n = this;
@@ -1992,18 +2020,18 @@ function qi() {
1992
2020
  }, he.prototype.where = function(e) {
1993
2021
  if (typeof e == "string") return new this.db.WhereClause(this, e);
1994
2022
  if (v(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1995
- var t = g(e);
2023
+ var t = m(e);
1996
2024
  if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
1997
- var n = this.schema.indexes.concat(this.schema.primKey).filter(function(m) {
1998
- if (m.compound && t.every(function(_) {
1999
- return 0 <= m.keyPath.indexOf(_);
2025
+ var n = this.schema.indexes.concat(this.schema.primKey).filter(function(g) {
2026
+ if (g.compound && t.every(function(_) {
2027
+ return 0 <= g.keyPath.indexOf(_);
2000
2028
  })) {
2001
- for (var b = 0; b < t.length; ++b) if (t.indexOf(m.keyPath[b]) === -1) return !1;
2029
+ for (var b = 0; b < t.length; ++b) if (t.indexOf(g.keyPath[b]) === -1) return !1;
2002
2030
  return !0;
2003
2031
  }
2004
2032
  return !1;
2005
- }).sort(function(m, b) {
2006
- return m.keyPath.length - b.keyPath.length;
2033
+ }).sort(function(g, b) {
2034
+ return g.keyPath.length - b.keyPath.length;
2007
2035
  })[0];
2008
2036
  if (n && this.db._maxKey !== pt) {
2009
2037
  var u = n.keyPath.slice(0, t.length);
@@ -2013,8 +2041,8 @@ function qi() {
2013
2041
  }
2014
2042
  !n && Ne && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
2015
2043
  var r = this.schema.idxByName;
2016
- function i(m, b) {
2017
- return re(m, b) === 0;
2044
+ function i(g, b) {
2045
+ return re(g, b) === 0;
2018
2046
  }
2019
2047
  var h = t.reduce(function(y, b) {
2020
2048
  var _ = y[0], T = y[1], y = r[b], A = e[b];
@@ -2050,7 +2078,7 @@ function qi() {
2050
2078
  function i() {
2051
2079
  return t !== null && t.apply(this, arguments) || this;
2052
2080
  }
2053
- (this.schema.mappedClass = e).prototype instanceof Tr && ((function(b, _) {
2081
+ (this.schema.mappedClass = e).prototype instanceof Nr && ((function(b, _) {
2054
2082
  if (typeof _ != "function" && _ !== null) throw new TypeError("Class extends value " + String(_) + " is not a constructor or null");
2055
2083
  function T() {
2056
2084
  this.constructor = b;
@@ -2064,7 +2092,7 @@ function qi() {
2064
2092
  for (var u = /* @__PURE__ */ new Set(), h = e.prototype; h; h = R(h)) Object.getOwnPropertyNames(h).forEach(function(b) {
2065
2093
  return u.add(b);
2066
2094
  });
2067
- function m(b) {
2095
+ function g(b) {
2068
2096
  if (!b) return b;
2069
2097
  var _, T = Object.create(e.prototype);
2070
2098
  for (_ in b) if (!u.has(_)) try {
@@ -2073,38 +2101,38 @@ function qi() {
2073
2101
  }
2074
2102
  return T;
2075
2103
  }
2076
- return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = m, this.hook("reading", m), e;
2104
+ return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = g, this.hook("reading", g), e;
2077
2105
  }, he.prototype.defineClass = function() {
2078
2106
  return this.mapToClass(function(e) {
2079
2107
  D(this, e);
2080
2108
  });
2081
2109
  }, he.prototype.add = function(e, t) {
2082
2110
  var n = this, r = this.schema.primKey, i = r.auto, u = r.keyPath, h = e;
2083
- return u && i && (h = sn(u)(e)), this._trans("readwrite", function(m) {
2084
- return n.core.mutate({ trans: m, type: "add", keys: t != null ? [t] : null, values: [h] });
2085
- }).then(function(m) {
2086
- return m.numFailures ? $.reject(m.failures[0]) : m.lastResult;
2087
- }).then(function(m) {
2111
+ return u && i && (h = sn(u)(e)), this._trans("readwrite", function(g) {
2112
+ return n.core.mutate({ trans: g, type: "add", keys: t != null ? [t] : null, values: [h] });
2113
+ }).then(function(g) {
2114
+ return g.numFailures ? $.reject(g.failures[0]) : g.lastResult;
2115
+ }).then(function(g) {
2088
2116
  if (u) try {
2089
- le(e, u, m);
2117
+ le(e, u, g);
2090
2118
  } catch {
2091
2119
  }
2092
- return m;
2120
+ return g;
2093
2121
  });
2094
2122
  }, he.prototype.update = function(e, t) {
2095
2123
  return typeof e != "object" || v(e) ? this.where(":id").equals(e).modify(t) : (e = de(e, this.schema.primKey.keyPath), e === void 0 ? Ee(new z.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
2096
2124
  }, he.prototype.put = function(e, t) {
2097
2125
  var n = this, r = this.schema.primKey, i = r.auto, u = r.keyPath, h = e;
2098
- return u && i && (h = sn(u)(e)), this._trans("readwrite", function(m) {
2099
- return n.core.mutate({ trans: m, type: "put", values: [h], keys: t != null ? [t] : null });
2100
- }).then(function(m) {
2101
- return m.numFailures ? $.reject(m.failures[0]) : m.lastResult;
2102
- }).then(function(m) {
2126
+ return u && i && (h = sn(u)(e)), this._trans("readwrite", function(g) {
2127
+ return n.core.mutate({ trans: g, type: "put", values: [h], keys: t != null ? [t] : null });
2128
+ }).then(function(g) {
2129
+ return g.numFailures ? $.reject(g.failures[0]) : g.lastResult;
2130
+ }).then(function(g) {
2103
2131
  if (u) try {
2104
- le(e, u, m);
2132
+ le(e, u, g);
2105
2133
  } catch {
2106
2134
  }
2107
- return m;
2135
+ return g;
2108
2136
  });
2109
2137
  }, he.prototype.delete = function(e) {
2110
2138
  var t = this;
@@ -2118,7 +2146,7 @@ function qi() {
2118
2146
  }, he.prototype.clear = function() {
2119
2147
  var e = this;
2120
2148
  return this._trans("readwrite", function(t) {
2121
- return e.core.mutate({ trans: t, type: "deleteRange", range: xr }).then(function(n) {
2149
+ return e.core.mutate({ trans: t, type: "deleteRange", range: Tr }).then(function(n) {
2122
2150
  return un(e, null, n);
2123
2151
  });
2124
2152
  }).then(function(t) {
@@ -2136,10 +2164,10 @@ function qi() {
2136
2164
  }, he.prototype.bulkAdd = function(e, t, n) {
2137
2165
  var r = this, i = Array.isArray(t) ? t : void 0, u = (n = n || (i ? void 0 : t)) ? n.allKeys : void 0;
2138
2166
  return this._trans("readwrite", function(h) {
2139
- var _ = r.schema.primKey, m = _.auto, _ = _.keyPath;
2167
+ var _ = r.schema.primKey, g = _.auto, _ = _.keyPath;
2140
2168
  if (_ && i) throw new z.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
2141
2169
  if (i && i.length !== e.length) throw new z.InvalidArgument("Arguments objects and keys must have the same length");
2142
- var b = e.length, _ = _ && m ? e.map(sn(_)) : e;
2170
+ var b = e.length, _ = _ && g ? e.map(sn(_)) : e;
2143
2171
  return r.core.mutate({ trans: h, type: "add", keys: i, values: _, wantResults: u }).then(function(x) {
2144
2172
  var y = x.numFailures, A = x.results, w = x.lastResult, x = x.failures;
2145
2173
  if (y === 0) return u ? A : w;
@@ -2149,10 +2177,10 @@ function qi() {
2149
2177
  }, he.prototype.bulkPut = function(e, t, n) {
2150
2178
  var r = this, i = Array.isArray(t) ? t : void 0, u = (n = n || (i ? void 0 : t)) ? n.allKeys : void 0;
2151
2179
  return this._trans("readwrite", function(h) {
2152
- var _ = r.schema.primKey, m = _.auto, _ = _.keyPath;
2180
+ var _ = r.schema.primKey, g = _.auto, _ = _.keyPath;
2153
2181
  if (_ && i) throw new z.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
2154
2182
  if (i && i.length !== e.length) throw new z.InvalidArgument("Arguments objects and keys must have the same length");
2155
- var b = e.length, _ = _ && m ? e.map(sn(_)) : e;
2183
+ var b = e.length, _ = _ && g ? e.map(sn(_)) : e;
2156
2184
  return r.core.mutate({ trans: h, type: "put", keys: i, values: _, wantResults: u }).then(function(x) {
2157
2185
  var y = x.numFailures, A = x.results, w = x.lastResult, x = x.failures;
2158
2186
  if (y === 0) return u ? A : w;
@@ -2166,10 +2194,10 @@ function qi() {
2166
2194
  return h.changes;
2167
2195
  }), u = [];
2168
2196
  return this._trans("readwrite", function(h) {
2169
- return n.getMany({ trans: h, keys: r, cache: "clone" }).then(function(m) {
2197
+ return n.getMany({ trans: h, keys: r, cache: "clone" }).then(function(g) {
2170
2198
  var b = [], _ = [];
2171
2199
  e.forEach(function(y, A) {
2172
- var w = y.key, x = y.changes, O = m[A];
2200
+ var w = y.key, x = y.changes, O = g[A];
2173
2201
  if (O) {
2174
2202
  for (var N = 0, C = Object.keys(x); N < C.length; N++) {
2175
2203
  var I = C[N], P = x[I];
@@ -2206,9 +2234,9 @@ function qi() {
2206
2234
  }, he);
2207
2235
  function he() {
2208
2236
  }
2209
- function Bt(e) {
2210
- function t(h, m) {
2211
- if (m) {
2237
+ function jt(e) {
2238
+ function t(h, g) {
2239
+ if (g) {
2212
2240
  for (var b = arguments.length, _ = new Array(b - 1); --b; ) _[b - 1] = arguments[b];
2213
2241
  return n[h].subscribe.apply(null, _), e;
2214
2242
  }
@@ -2218,20 +2246,20 @@ function qi() {
2218
2246
  t.addEventType = u;
2219
2247
  for (var r = 1, i = arguments.length; r < i; ++r) u(arguments[r]);
2220
2248
  return t;
2221
- function u(h, m, b) {
2249
+ function u(h, g, b) {
2222
2250
  if (typeof h != "object") {
2223
2251
  var _;
2224
- m = m || Ie;
2252
+ g = g || Ie;
2225
2253
  var T = { subscribers: [], fire: b = b || l, subscribe: function(y) {
2226
- T.subscribers.indexOf(y) === -1 && (T.subscribers.push(y), T.fire = m(T.fire, y));
2254
+ T.subscribers.indexOf(y) === -1 && (T.subscribers.push(y), T.fire = g(T.fire, y));
2227
2255
  }, unsubscribe: function(y) {
2228
2256
  T.subscribers = T.subscribers.filter(function(A) {
2229
2257
  return A !== y;
2230
- }), T.fire = T.subscribers.reduce(m, b);
2258
+ }), T.fire = T.subscribers.reduce(g, b);
2231
2259
  } };
2232
2260
  return n[h] = t[h] = T;
2233
2261
  }
2234
- g(_ = h).forEach(function(y) {
2262
+ m(_ = h).forEach(function(y) {
2235
2263
  var A = _[y];
2236
2264
  if (v(A)) u(y, _[y][0], _[y][1]);
2237
2265
  else {
@@ -2248,7 +2276,7 @@ function qi() {
2248
2276
  });
2249
2277
  }
2250
2278
  }
2251
- function jt(e, t) {
2279
+ function Mt(e, t) {
2252
2280
  return B(t).from({ prototype: e }), t;
2253
2281
  }
2254
2282
  function At(e, t) {
@@ -2269,47 +2297,47 @@ function qi() {
2269
2297
  if (!n) throw new z.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
2270
2298
  return n;
2271
2299
  }
2272
- function Cr(e, t, n) {
2300
+ function Dr(e, t, n) {
2273
2301
  var r = cn(e, t.schema);
2274
2302
  return t.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: r, range: e.range } });
2275
2303
  }
2276
2304
  function ln(e, t, n, r) {
2277
2305
  var i = e.replayFilter ? mt(e.filter, e.replayFilter()) : e.filter;
2278
2306
  if (e.or) {
2279
- var u = {}, h = function(m, b, _) {
2307
+ var u = {}, h = function(g, b, _) {
2280
2308
  var T, y;
2281
2309
  i && !i(b, _, function(A) {
2282
2310
  return b.stop(A);
2283
2311
  }, function(A) {
2284
2312
  return b.fail(A);
2285
- }) || ((y = "" + (T = b.primaryKey)) == "[object ArrayBuffer]" && (y = "" + new Uint8Array(T)), Y(u, y) || (u[y] = !0, t(m, b, _)));
2313
+ }) || ((y = "" + (T = b.primaryKey)) == "[object ArrayBuffer]" && (y = "" + new Uint8Array(T)), Y(u, y) || (u[y] = !0, t(g, b, _)));
2286
2314
  };
2287
- return Promise.all([e.or._iterate(h, n), Dr(Cr(e, r, n), e.algorithm, h, !e.keysOnly && e.valueMapper)]);
2315
+ return Promise.all([e.or._iterate(h, n), Sr(Dr(e, r, n), e.algorithm, h, !e.keysOnly && e.valueMapper)]);
2288
2316
  }
2289
- return Dr(Cr(e, r, n), mt(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
2317
+ return Sr(Dr(e, r, n), mt(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
2290
2318
  }
2291
- function Dr(e, t, n, r) {
2292
- var i = pe(r ? function(u, h, m) {
2293
- return n(r(u), h, m);
2319
+ function Sr(e, t, n, r) {
2320
+ var i = pe(r ? function(u, h, g) {
2321
+ return n(r(u), h, g);
2294
2322
  } : n);
2295
2323
  return e.then(function(u) {
2296
2324
  if (u) return u.start(function() {
2297
2325
  var h = function() {
2298
2326
  return u.continue();
2299
2327
  };
2300
- t && !t(u, function(m) {
2301
- return h = m;
2302
- }, function(m) {
2303
- u.stop(m), h = l;
2304
- }, function(m) {
2305
- u.fail(m), h = l;
2306
- }) || i(u.value, u, function(m) {
2307
- return h = m;
2328
+ t && !t(u, function(g) {
2329
+ return h = g;
2330
+ }, function(g) {
2331
+ u.stop(g), h = l;
2332
+ }, function(g) {
2333
+ u.fail(g), h = l;
2334
+ }) || i(u.value, u, function(g) {
2335
+ return h = g;
2308
2336
  }), h();
2309
2337
  });
2310
2338
  });
2311
2339
  }
2312
- var Mt = (Sr.prototype.execute = function(e) {
2340
+ var Kt = (Ir.prototype.execute = function(e) {
2313
2341
  var t = this["@@propmod"];
2314
2342
  if (t.add !== void 0) {
2315
2343
  var n = t.add;
@@ -2336,11 +2364,11 @@ function qi() {
2336
2364
  throw new TypeError("Invalid subtrahend ".concat(r));
2337
2365
  }
2338
2366
  return n = (n = t.replacePrefix) === null || n === void 0 ? void 0 : n[0], n && typeof e == "string" && e.startsWith(n) ? t.replacePrefix[1] + e.substring(n.length) : e;
2339
- }, Sr);
2340
- function Sr(e) {
2367
+ }, Ir);
2368
+ function Ir(e) {
2341
2369
  this["@@propmod"] = e;
2342
2370
  }
2343
- var Ka = (oe.prototype._read = function(e, t) {
2371
+ var qa = (oe.prototype._read = function(e, t) {
2344
2372
  var n = this._ctx;
2345
2373
  return n.error ? n.table._trans(null, Ee.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
2346
2374
  }, oe.prototype._write = function(e) {
@@ -2381,11 +2409,11 @@ function qi() {
2381
2409
  return _ ? u(b[n[_]], _ - 1) : b[r];
2382
2410
  }
2383
2411
  var h = this._ctx.dir === "next" ? 1 : -1;
2384
- function m(b, _) {
2412
+ function g(b, _) {
2385
2413
  return re(u(b, i), u(_, i)) * h;
2386
2414
  }
2387
2415
  return this.toArray(function(b) {
2388
- return b.sort(m);
2416
+ return b.sort(g);
2389
2417
  }).then(t);
2390
2418
  }, oe.prototype.toArray = function(e) {
2391
2419
  var t = this;
@@ -2393,13 +2421,13 @@ function qi() {
2393
2421
  var r = t._ctx;
2394
2422
  if (r.dir === "next" && At(r, !0) && 0 < r.limit) {
2395
2423
  var i = r.valueMapper, u = cn(r, r.table.core.schema);
2396
- return r.table.core.query({ trans: n, limit: r.limit, values: !0, query: { index: u, range: r.range } }).then(function(m) {
2397
- return m = m.result, i ? m.map(i) : m;
2424
+ return r.table.core.query({ trans: n, limit: r.limit, values: !0, query: { index: u, range: r.range } }).then(function(g) {
2425
+ return g = g.result, i ? g.map(i) : g;
2398
2426
  });
2399
2427
  }
2400
2428
  var h = [];
2401
- return ln(r, function(m) {
2402
- return h.push(m);
2429
+ return ln(r, function(g) {
2430
+ return h.push(g);
2403
2431
  }, n, r.table.core).then(function() {
2404
2432
  return h;
2405
2433
  });
@@ -2505,42 +2533,42 @@ function qi() {
2505
2533
  var t = this, n = this._ctx;
2506
2534
  return this._write(function(r) {
2507
2535
  var i, u, h;
2508
- h = typeof e == "function" ? e : (i = g(e), u = i.length, function(C) {
2536
+ h = typeof e == "function" ? e : (i = m(e), u = i.length, function(C) {
2509
2537
  for (var I = !1, P = 0; P < u; ++P) {
2510
2538
  var F = i[P], M = e[F], U = de(C, F);
2511
- M instanceof Mt ? (le(C, F, M.execute(U)), I = !0) : U !== M && (le(C, F, M), I = !0);
2539
+ M instanceof Kt ? (le(C, F, M.execute(U)), I = !0) : U !== M && (le(C, F, M), I = !0);
2512
2540
  }
2513
2541
  return I;
2514
2542
  });
2515
- var m = n.table.core, y = m.schema.primaryKey, b = y.outbound, _ = y.extractKey, T = 200, y = t.db._options.modifyChunkSize;
2516
- y && (T = typeof y == "object" ? y[m.name] || y["*"] || 200 : y);
2543
+ var g = n.table.core, y = g.schema.primaryKey, b = y.outbound, _ = y.extractKey, T = 200, y = t.db._options.modifyChunkSize;
2544
+ y && (T = typeof y == "object" ? y[g.name] || y["*"] || 200 : y);
2517
2545
  function A(C, F) {
2518
2546
  var P = F.failures, F = F.numFailures;
2519
2547
  x += C - F;
2520
- for (var M = 0, U = g(P); M < U.length; M++) {
2548
+ for (var M = 0, U = m(P); M < U.length; M++) {
2521
2549
  var K = U[M];
2522
2550
  w.push(P[K]);
2523
2551
  }
2524
2552
  }
2525
- var w = [], x = 0, O = [], N = e === Ir;
2553
+ var w = [], x = 0, O = [], N = e === Rr;
2526
2554
  return t.clone().primaryKeys().then(function(C) {
2527
2555
  function I(F) {
2528
2556
  var M = Math.min(T, C.length - F), U = C.slice(F, F + M);
2529
- return (N ? Promise.resolve([]) : m.getMany({ trans: r, keys: U, cache: "immutable" })).then(function(K) {
2557
+ return (N ? Promise.resolve([]) : g.getMany({ trans: r, keys: U, cache: "immutable" })).then(function(K) {
2530
2558
  var L = [], G = [], V = b ? [] : null, X = N ? U : [];
2531
2559
  if (!N) for (var ne = 0; ne < M; ++ne) {
2532
2560
  var ae = K[ne], ee = { value: We(ae), primKey: C[F + ne] };
2533
2561
  h.call(ee, ee.value, ee) !== !1 && (ee.value == null ? X.push(C[F + ne]) : b || re(_(ae), _(ee.value)) === 0 ? (G.push(ee.value), b && V.push(C[F + ne])) : (X.push(C[F + ne]), L.push(ee.value)));
2534
2562
  }
2535
- return Promise.resolve(0 < L.length && m.mutate({ trans: r, type: "add", values: L }).then(function(we) {
2563
+ return Promise.resolve(0 < L.length && g.mutate({ trans: r, type: "add", values: L }).then(function(we) {
2536
2564
  for (var J in we.failures) X.splice(parseInt(J), 1);
2537
2565
  A(L.length, we);
2538
2566
  })).then(function() {
2539
- return (0 < G.length || P && typeof e == "object") && m.mutate({ trans: r, type: "put", keys: V, values: G, criteria: P, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < F }).then(function(we) {
2567
+ return (0 < G.length || P && typeof e == "object") && g.mutate({ trans: r, type: "put", keys: V, values: G, criteria: P, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < F }).then(function(we) {
2540
2568
  return A(G.length, we);
2541
2569
  });
2542
2570
  }).then(function() {
2543
- return (0 < X.length || P && N) && m.mutate({ trans: r, type: "delete", keys: X, criteria: P, isAdditionalChunk: 0 < F }).then(function(we) {
2571
+ return (0 < X.length || P && N) && g.mutate({ trans: r, type: "delete", keys: X, criteria: P, isAdditionalChunk: 0 < F }).then(function(we) {
2544
2572
  return un(n.table, X, we);
2545
2573
  }).then(function(we) {
2546
2574
  return A(X.length, we);
@@ -2559,13 +2587,13 @@ function qi() {
2559
2587
  });
2560
2588
  }, oe.prototype.delete = function() {
2561
2589
  var e = this._ctx, t = e.range;
2562
- return !At(e) || e.table.schema.yProps || !e.isPrimKey && t.type !== 3 ? this.modify(Ir) : this._write(function(n) {
2590
+ return !At(e) || e.table.schema.yProps || !e.isPrimKey && t.type !== 3 ? this.modify(Rr) : this._write(function(n) {
2563
2591
  var r = e.table.core.schema.primaryKey, i = t;
2564
2592
  return e.table.core.count({ trans: n, query: { index: r, range: i } }).then(function(u) {
2565
2593
  return e.table.core.mutate({ trans: n, type: "deleteRange", range: i }).then(function(b) {
2566
- var m = b.failures, b = b.numFailures;
2567
- if (b) throw new tt("Could not delete some values", Object.keys(m).map(function(_) {
2568
- return m[_];
2594
+ var g = b.failures, b = b.numFailures;
2595
+ if (b) throw new tt("Could not delete some values", Object.keys(g).map(function(_) {
2596
+ return g[_];
2569
2597
  }), u - b);
2570
2598
  return u - b;
2571
2599
  });
@@ -2574,28 +2602,28 @@ function qi() {
2574
2602
  }, oe);
2575
2603
  function oe() {
2576
2604
  }
2577
- var Ir = function(e, t) {
2605
+ var Rr = function(e, t) {
2578
2606
  return t.value = null;
2579
2607
  };
2580
- function qa(e, t) {
2608
+ function La(e, t) {
2581
2609
  return e < t ? -1 : e === t ? 0 : 1;
2582
2610
  }
2583
- function La(e, t) {
2611
+ function Ua(e, t) {
2584
2612
  return t < e ? -1 : e === t ? 0 : 1;
2585
2613
  }
2586
2614
  function Ke(e, t, n) {
2587
- return e = e instanceof kr ? new e.Collection(e) : e, e._ctx.error = new (n || TypeError)(t), e;
2615
+ return e = e instanceof Pr ? new e.Collection(e) : e, e._ctx.error = new (n || TypeError)(t), e;
2588
2616
  }
2589
2617
  function Ct(e) {
2590
2618
  return new e.Collection(e, function() {
2591
- return Rr("");
2619
+ return kr("");
2592
2620
  }).limit(0);
2593
2621
  }
2594
2622
  function fn(e, t, n, r) {
2595
- var i, u, h, m, b, _, T, y = n.length;
2623
+ var i, u, h, g, b, _, T, y = n.length;
2596
2624
  if (!n.every(function(x) {
2597
2625
  return typeof x == "string";
2598
- })) return Ke(e, Er);
2626
+ })) return Ke(e, xr);
2599
2627
  function A(x) {
2600
2628
  i = x === "next" ? function(N) {
2601
2629
  return N.toUpperCase();
@@ -2605,20 +2633,20 @@ function qi() {
2605
2633
  return N.toLowerCase();
2606
2634
  } : function(N) {
2607
2635
  return N.toUpperCase();
2608
- }, h = x === "next" ? qa : La;
2636
+ }, h = x === "next" ? La : Ua;
2609
2637
  var O = n.map(function(N) {
2610
2638
  return { lower: u(N), upper: i(N) };
2611
2639
  }).sort(function(N, C) {
2612
2640
  return h(N.lower, C.lower);
2613
2641
  });
2614
- m = O.map(function(N) {
2642
+ g = O.map(function(N) {
2615
2643
  return N.upper;
2616
2644
  }), b = O.map(function(N) {
2617
2645
  return N.lower;
2618
2646
  }), T = (_ = x) === "next" ? "" : r;
2619
2647
  }
2620
2648
  A("next"), e = new e.Collection(e, function() {
2621
- return st(m[0], b[y - 1] + r);
2649
+ return st(g[0], b[y - 1] + r);
2622
2650
  }), e._ondirectionchange = function(x) {
2623
2651
  A(x);
2624
2652
  };
@@ -2636,7 +2664,7 @@ function qi() {
2636
2664
  V(U[ee], we) < 0 && (ae = ee);
2637
2665
  }
2638
2666
  return ne < G.length && X === "next" ? U + L.substr(U.length) : ne < U.length && X === "prev" ? U.substr(0, L.length) : ae < 0 ? null : U.substr(0, ae) + G[ae] + L.substr(ae + 1);
2639
- })(C, I, m[F], b[F], h, _);
2667
+ })(C, I, g[F], b[F], h, _);
2640
2668
  M === null && P === null ? w = F + 1 : (P === null || 0 < h(P, M)) && (P = M);
2641
2669
  }
2642
2670
  return O(P !== null ? function() {
@@ -2647,10 +2675,10 @@ function qi() {
2647
2675
  function st(e, t, n, r) {
2648
2676
  return { type: 2, lower: e, upper: t, lowerOpen: n, upperOpen: r };
2649
2677
  }
2650
- function Rr(e) {
2678
+ function kr(e) {
2651
2679
  return { type: 1, lower: e, upper: e };
2652
2680
  }
2653
- var kr = (Object.defineProperty(De.prototype, "Collection", { get: function() {
2681
+ var Pr = (Object.defineProperty(De.prototype, "Collection", { get: function() {
2654
2682
  return this._ctx.table.db.Collection;
2655
2683
  }, enumerable: !1, configurable: !0 }), De.prototype.between = function(e, t, n, r) {
2656
2684
  n = n !== !1, r = r === !0;
@@ -2663,7 +2691,7 @@ function qi() {
2663
2691
  }
2664
2692
  }, De.prototype.equals = function(e) {
2665
2693
  return e == null ? Ke(this, Qe) : new this.Collection(this, function() {
2666
- return Rr(e);
2694
+ return kr(e);
2667
2695
  });
2668
2696
  }, De.prototype.above = function(e) {
2669
2697
  return e == null ? Ke(this, Qe) : new this.Collection(this, function() {
@@ -2682,7 +2710,7 @@ function qi() {
2682
2710
  return st(void 0, e);
2683
2711
  });
2684
2712
  }, De.prototype.startsWith = function(e) {
2685
- return typeof e != "string" ? Ke(this, Er) : this.between(e, e + pt, !0, !0);
2713
+ return typeof e != "string" ? Ke(this, xr) : this.between(e, e + pt, !0, !0);
2686
2714
  }, De.prototype.startsWithIgnoreCase = function(e) {
2687
2715
  return e === "" ? this.startsWith(e) : fn(this, function(t, n) {
2688
2716
  return t.indexOf(n[0]) === 0;
@@ -2718,8 +2746,8 @@ function qi() {
2718
2746
  n = u === "next" ? e._ascending : e._descending, t.sort(n);
2719
2747
  };
2720
2748
  var i = 0;
2721
- return r._addAlgorithm(function(u, h, m) {
2722
- for (var b = u.key; 0 < n(b, t[i]); ) if (++i === t.length) return h(m), !1;
2749
+ return r._addAlgorithm(function(u, h, g) {
2750
+ for (var b = u.key; 0 < n(b, t[i]); ) if (++i === t.length) return h(g), !1;
2723
2751
  return n(b, t[i]) === 0 || (h(function() {
2724
2752
  u.continue(t[i]);
2725
2753
  }), !1);
@@ -2739,7 +2767,7 @@ function qi() {
2739
2767
  }, null);
2740
2768
  return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
2741
2769
  }, De.prototype.inAnyRange = function(C, t) {
2742
- var n = this, r = this._cmp, i = this._ascending, u = this._descending, h = this._min, m = this._max;
2770
+ var n = this, r = this._cmp, i = this._ascending, u = this._descending, h = this._min, g = this._max;
2743
2771
  if (C.length === 0) return Ct(this);
2744
2772
  if (!C.every(function(I) {
2745
2773
  return I[0] !== void 0 && I[1] !== void 0 && i(I[0], I[1]) <= 0;
@@ -2753,7 +2781,7 @@ function qi() {
2753
2781
  for (var F = 0, M = I.length; F < M; ++F) {
2754
2782
  var U = I[F];
2755
2783
  if (r(P[0], U[1]) < 0 && 0 < r(P[1], U[0])) {
2756
- U[0] = h(U[0], P[0]), U[1] = m(U[1], P[1]);
2784
+ U[0] = h(U[0], P[0]), U[1] = g(U[1], P[1]);
2757
2785
  break;
2758
2786
  }
2759
2787
  }
@@ -2793,13 +2821,13 @@ function qi() {
2793
2821
  }
2794
2822
  function Xe(e) {
2795
2823
  return pe(function(t) {
2796
- return Kt(t), e(t.target.error), !1;
2824
+ return qt(t), e(t.target.error), !1;
2797
2825
  });
2798
2826
  }
2799
- function Kt(e) {
2827
+ function qt(e) {
2800
2828
  e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
2801
2829
  }
2802
- var qt = "storagemutated", qn = "x-storagemutated-1", ut = Bt(null, qt), Ua = (Ye.prototype._lock = function() {
2830
+ var Lt = "storagemutated", qn = "x-storagemutated-1", ut = jt(null, Lt), Va = (Ye.prototype._lock = function() {
2803
2831
  return H(!W.global), ++this._reculock, this._reculock !== 1 || W.global || (W.lockOwnerFor = this), this;
2804
2832
  }, Ye.prototype._unlock = function() {
2805
2833
  if (H(!W.global), --this._reculock == 0) for (W.global || (W.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
@@ -2826,9 +2854,9 @@ function qi() {
2826
2854
  }
2827
2855
  if (!this.active) throw new z.TransactionInactive();
2828
2856
  return H(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = pe(function(i) {
2829
- Kt(i), t._reject(e.error);
2857
+ qt(i), t._reject(e.error);
2830
2858
  }), e.onabort = pe(function(i) {
2831
- Kt(i), t.active && t._reject(new z.Abort(e.error)), t.active = !1, t.on("abort").fire(i);
2859
+ qt(i), t.active && t._reject(new z.Abort(e.error)), t.active = !1, t.on("abort").fire(i);
2832
2860
  }), e.oncomplete = pe(function() {
2833
2861
  t.active = !1, t._resolve(), "mutatedParts" in e && ut.storagemutated.fire(e.mutatedParts);
2834
2862
  }), this;
@@ -2842,18 +2870,18 @@ function qi() {
2842
2870
  }, W]);
2843
2871
  });
2844
2872
  if (n) return at(function() {
2845
- var u = new $(function(h, m) {
2873
+ var u = new $(function(h, g) {
2846
2874
  r._lock();
2847
- var b = t(h, m, r);
2848
- b && b.then && b.then(h, m);
2875
+ var b = t(h, g, r);
2876
+ b && b.then && b.then(h, g);
2849
2877
  });
2850
2878
  return u.finally(function() {
2851
2879
  return r._unlock();
2852
2880
  }), u._lib = !0, u;
2853
2881
  });
2854
2882
  var i = new $(function(u, h) {
2855
- var m = t(u, h, r);
2856
- m && m.then && m.then(u, h);
2883
+ var g = t(u, h, r);
2884
+ g && g.then && g.then(u, h);
2857
2885
  });
2858
2886
  return i._lib = !0, i;
2859
2887
  }, Ye.prototype._root = function() {
@@ -2868,10 +2896,10 @@ function qi() {
2868
2896
  })());
2869
2897
  var i = n._waitingFor;
2870
2898
  return new $(function(u, h) {
2871
- r.then(function(m) {
2872
- return n._waitingQueue.push(pe(u.bind(null, m)));
2873
- }, function(m) {
2874
- return n._waitingQueue.push(pe(h.bind(null, m)));
2899
+ r.then(function(g) {
2900
+ return n._waitingQueue.push(pe(u.bind(null, g)));
2901
+ }, function(g) {
2902
+ return n._waitingQueue.push(pe(h.bind(null, g)));
2875
2903
  }).finally(function() {
2876
2904
  n._waitingFor === i && (n._waitingFor = null);
2877
2905
  });
@@ -2887,10 +2915,10 @@ function qi() {
2887
2915
  }, Ye);
2888
2916
  function Ye() {
2889
2917
  }
2890
- function Ln(e, t, n, r, i, u, h, m) {
2891
- return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: u, src: (n && !h ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + Pr(t), type: m };
2918
+ function Ln(e, t, n, r, i, u, h, g) {
2919
+ return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: u, src: (n && !h ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + Fr(t), type: g };
2892
2920
  }
2893
- function Pr(e) {
2921
+ function Fr(e) {
2894
2922
  return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
2895
2923
  }
2896
2924
  function Un(e, t, n) {
@@ -2901,13 +2929,13 @@ function qi() {
2901
2929
  }, {})) };
2902
2930
  var r;
2903
2931
  }
2904
- var Lt = function(e) {
2932
+ var Ut = function(e) {
2905
2933
  try {
2906
- return e.only([[]]), Lt = function() {
2934
+ return e.only([[]]), Ut = function() {
2907
2935
  return [[]];
2908
2936
  }, [[]];
2909
2937
  } catch {
2910
- return Lt = function() {
2938
+ return Ut = function() {
2911
2939
  return pt;
2912
2940
  }, pt;
2913
2941
  }
@@ -2923,14 +2951,14 @@ function qi() {
2923
2951
  };
2924
2952
  var t;
2925
2953
  }
2926
- function Fr(e) {
2954
+ function Br(e) {
2927
2955
  return [].slice.call(e);
2928
2956
  }
2929
- var Va = 0;
2930
- function Ut(e) {
2957
+ var Ga = 0;
2958
+ function Vt(e) {
2931
2959
  return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
2932
2960
  }
2933
- function Ga(e, t, b) {
2961
+ function $a(e, t, b) {
2934
2962
  function r(N) {
2935
2963
  if (N.type === 3) return null;
2936
2964
  if (N.type === 4) throw new Error("Cannot convert never type to IDBKeyRange");
@@ -2949,7 +2977,7 @@ function qi() {
2949
2977
  if (I && P && I.length !== P.length) throw new Error("Given keys array must have same length as given values array.");
2950
2978
  if (X === 0) return M({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
2951
2979
  function ne(Be) {
2952
- ++we, Kt(Be);
2980
+ ++we, qt(Be);
2953
2981
  }
2954
2982
  var ae = [], ee = [], we = 0;
2955
2983
  if (C === "deleteRange") {
@@ -3008,7 +3036,7 @@ function qi() {
3008
3036
  var G = I.index, K = I.range, L = N.objectStore(x), L = G.isPrimaryKey ? L : L.index(G.name), G = P ? F ? "prevunique" : "prev" : F ? "nextunique" : "next", V = !C && "openKeyCursor" in L ? L.openKeyCursor(r(K), G) : L.openCursor(r(K), G);
3009
3037
  V.onerror = Xe(U), V.onsuccess = pe(function(X) {
3010
3038
  var ne, ae, ee, we, J = V.result;
3011
- J ? (J.___id = ++Va, J.done = !1, ne = J.continue.bind(J), ae = (ae = J.continuePrimaryKey) && ae.bind(J), ee = J.advance.bind(J), we = function() {
3039
+ J ? (J.___id = ++Ga, J.done = !1, ne = J.continue.bind(J), ae = (ae = J.continuePrimaryKey) && ae.bind(J), ee = J.advance.bind(J), we = function() {
3012
3040
  throw new Error("Cursor not stopped");
3013
3041
  }, J.trans = N, J.stop = J.continue = J.continuePrimaryKey = J.advance = function() {
3014
3042
  throw new Error("Cursor not started");
@@ -3051,34 +3079,34 @@ function qi() {
3051
3079
  });
3052
3080
  } };
3053
3081
  }
3054
- var u, h, m, T = (h = b, m = Fr((u = e).objectStoreNames), { schema: { name: u.name, tables: m.map(function(A) {
3082
+ var u, h, g, T = (h = b, g = Br((u = e).objectStoreNames), { schema: { name: u.name, tables: g.map(function(A) {
3055
3083
  return h.objectStore(A);
3056
3084
  }).map(function(A) {
3057
- var w = A.keyPath, N = A.autoIncrement, x = v(w), O = {}, N = { name: A.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: w == null, compound: x, keyPath: w, autoIncrement: N, unique: !0, extractKey: Vn(w) }, indexes: Fr(A.indexNames).map(function(C) {
3085
+ var w = A.keyPath, N = A.autoIncrement, x = v(w), O = {}, N = { name: A.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: w == null, compound: x, keyPath: w, autoIncrement: N, unique: !0, extractKey: Vn(w) }, indexes: Br(A.indexNames).map(function(C) {
3058
3086
  return A.index(C);
3059
3087
  }).map(function(F) {
3060
3088
  var I = F.name, P = F.unique, M = F.multiEntry, F = F.keyPath, M = { name: I, compound: v(F), keyPath: F, unique: P, multiEntry: M, extractKey: Vn(F) };
3061
- return O[Ut(F)] = M;
3089
+ return O[Vt(F)] = M;
3062
3090
  }), getIndexByKeyPath: function(C) {
3063
- return O[Ut(C)];
3091
+ return O[Vt(C)];
3064
3092
  } };
3065
- return O[":id"] = N.primaryKey, w != null && (O[Ut(w)] = N.primaryKey), N;
3066
- }) }, hasGetAll: 0 < m.length && "getAll" in h.objectStore(m[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), b = T.schema, _ = T.hasGetAll, T = b.tables.map(i), y = {};
3093
+ return O[":id"] = N.primaryKey, w != null && (O[Vt(w)] = N.primaryKey), N;
3094
+ }) }, hasGetAll: 0 < g.length && "getAll" in h.objectStore(g[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), b = T.schema, _ = T.hasGetAll, T = b.tables.map(i), y = {};
3067
3095
  return T.forEach(function(A) {
3068
3096
  return y[A.name] = A;
3069
3097
  }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(A) {
3070
3098
  if (!y[A]) throw new Error("Table '".concat(A, "' not found"));
3071
3099
  return y[A];
3072
- }, MIN_KEY: -1 / 0, MAX_KEY: Lt(t), schema: b };
3100
+ }, MIN_KEY: -1 / 0, MAX_KEY: Ut(t), schema: b };
3073
3101
  }
3074
- function $a(e, t, n, r) {
3102
+ function Xa(e, t, n, r) {
3075
3103
  var i = n.IDBKeyRange;
3076
- return n.indexedDB, { dbcore: (r = Ga(t, i, r), e.dbcore.reduce(function(u, h) {
3104
+ return n.indexedDB, { dbcore: (r = $a(t, i, r), e.dbcore.reduce(function(u, h) {
3077
3105
  return h = h.create, a(a({}, u), h(u));
3078
3106
  }, r)) };
3079
3107
  }
3080
3108
  function dn(e, r) {
3081
- var n = r.db, r = $a(e._middlewares, n, e._deps, r);
3109
+ var n = r.db, r = Xa(e._middlewares, n, e._deps, r);
3082
3110
  e.core = r.dbcore, e.tables.forEach(function(i) {
3083
3111
  var u = i.name;
3084
3112
  e.core.schema.tables.some(function(h) {
@@ -3090,10 +3118,10 @@ function qi() {
3090
3118
  n.forEach(function(i) {
3091
3119
  var u = r[i];
3092
3120
  t.forEach(function(h) {
3093
- var m = (function b(_, T) {
3121
+ var g = (function b(_, T) {
3094
3122
  return ue(_, T) || (_ = R(_)) && b(_, T);
3095
3123
  })(h, i);
3096
- (!m || "value" in m && m.value === void 0) && (h === e.Transaction.prototype || h instanceof e.Transaction ? j(h, i, { get: function() {
3124
+ (!g || "value" in g && g.value === void 0) && (h === e.Transaction.prototype || h instanceof e.Transaction ? j(h, i, { get: function() {
3097
3125
  return this.table(i);
3098
3126
  }, set: function(b) {
3099
3127
  fe(this, i, { value: b, writable: !0, configurable: !0, enumerable: !0 });
@@ -3106,17 +3134,17 @@ function qi() {
3106
3134
  for (var r in n) n[r] instanceof e.Table && delete n[r];
3107
3135
  });
3108
3136
  }
3109
- function Xa(e, t) {
3137
+ function Ya(e, t) {
3110
3138
  return e._cfg.version - t._cfg.version;
3111
3139
  }
3112
- function Ya(e, t, n, r) {
3140
+ function Wa(e, t, n, r) {
3113
3141
  var i = e._dbSchema;
3114
- n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = Un("$meta", jr("")[0], []), e._storeNames.push("$meta"));
3142
+ n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = Un("$meta", Mr("")[0], []), e._storeNames.push("$meta"));
3115
3143
  var u = e._createTransaction("readwrite", e._storeNames, i);
3116
3144
  u.create(n), u._completion.catch(r);
3117
- var h = u._reject.bind(u), m = W.transless || W;
3145
+ var h = u._reject.bind(u), g = W.transless || W;
3118
3146
  at(function() {
3119
- return W.trans = u, W.transless = m, t !== 0 ? (dn(e, n), _ = t, ((b = u).storeNames.includes("$meta") ? b.table("$meta").get("version").then(function(T) {
3147
+ return W.trans = u, W.transless = g, t !== 0 ? (dn(e, n), _ = t, ((b = u).storeNames.includes("$meta") ? b.table("$meta").get("version").then(function(T) {
3120
3148
  return T ?? _;
3121
3149
  }) : $.resolve(_)).then(function(T) {
3122
3150
  return A = T, w = u, x = n, O = [], T = (y = e)._versions, N = y._dbSchema = mn(0, y.idbdb, x), (T = T.filter(function(C) {
@@ -3145,7 +3173,7 @@ function qi() {
3145
3173
  var U = ge(P);
3146
3174
  F.del.forEach(function(G) {
3147
3175
  U[G] = I[G];
3148
- }), Gn(y, [y.Transaction.prototype]), hn(y, [y.Transaction.prototype], g(U), U), w.schema = U;
3176
+ }), Gn(y, [y.Transaction.prototype]), hn(y, [y.Transaction.prototype], m(U), U), w.schema = U;
3149
3177
  var K, L = bt(M);
3150
3178
  return L && Nt(), F = $.follow(function() {
3151
3179
  var G;
@@ -3167,10 +3195,10 @@ function qi() {
3167
3195
  }), (function C() {
3168
3196
  return O.length ? $.resolve(O.shift()(w.idbtrans)).then(C) : $.resolve();
3169
3197
  })().then(function() {
3170
- Br(N, x);
3198
+ jr(N, x);
3171
3199
  })) : $.resolve();
3172
3200
  var y, A, w, x, O, N;
3173
- }).catch(h)) : (g(i).forEach(function(T) {
3201
+ }).catch(h)) : (m(i).forEach(function(T) {
3174
3202
  Xn(n, T, i[T].primKey, i[T].indexes);
3175
3203
  }), dn(e, n), void $.follow(function() {
3176
3204
  return e.on.populate.fire(u);
@@ -3178,16 +3206,16 @@ function qi() {
3178
3206
  var b, _;
3179
3207
  });
3180
3208
  }
3181
- function Wa(e, t) {
3182
- Br(e._dbSchema, t), t.db.version % 10 != 0 || t.objectStoreNames.contains("$meta") || t.db.createObjectStore("$meta").add(Math.ceil(t.db.version / 10 - 1), "version");
3209
+ function za(e, t) {
3210
+ jr(e._dbSchema, t), t.db.version % 10 != 0 || t.objectStoreNames.contains("$meta") || t.db.createObjectStore("$meta").add(Math.ceil(t.db.version / 10 - 1), "version");
3183
3211
  var n = mn(0, e.idbdb, t);
3184
3212
  gn(e, e._dbSchema, t);
3185
3213
  for (var r = 0, i = $n(n, e._dbSchema).change; r < i.length; r++) {
3186
3214
  var u = (function(h) {
3187
3215
  if (h.change.length || h.recreate) return console.warn("Unable to patch indexes of table ".concat(h.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
3188
- var m = t.objectStore(h.name);
3216
+ var g = t.objectStore(h.name);
3189
3217
  h.add.forEach(function(b) {
3190
- Ne && console.debug("Dexie upgrade patch: Creating missing index ".concat(h.name, ".").concat(b.src)), pn(m, b);
3218
+ Ne && console.debug("Dexie upgrade patch: Creating missing index ".concat(h.name, ".").concat(b.src)), pn(g, b);
3191
3219
  });
3192
3220
  })(i[r]);
3193
3221
  if (typeof u == "object") return u.value;
@@ -3202,10 +3230,10 @@ function qi() {
3202
3230
  var h = { name: n, def: u, recreate: !1, del: [], add: [], change: [] };
3203
3231
  if ("" + (i.primKey.keyPath || "") != "" + (u.primKey.keyPath || "") || i.primKey.auto !== u.primKey.auto) h.recreate = !0, r.change.push(h);
3204
3232
  else {
3205
- var m = i.idxByName, b = u.idxByName, _ = void 0;
3206
- for (_ in m) b[_] || h.del.push(_);
3233
+ var g = i.idxByName, b = u.idxByName, _ = void 0;
3234
+ for (_ in g) b[_] || h.del.push(_);
3207
3235
  for (_ in b) {
3208
- var T = m[_], y = b[_];
3236
+ var T = g[_], y = b[_];
3209
3237
  T ? T.src !== y.src && h.change.push(y) : h.add.push(y);
3210
3238
  }
3211
3239
  (0 < h.del.length || 0 < h.add.length || 0 < h.change.length) && r.change.push(h);
@@ -3220,8 +3248,8 @@ function qi() {
3220
3248
  return pn(i, u);
3221
3249
  }), i;
3222
3250
  }
3223
- function Br(e, t) {
3224
- g(e).forEach(function(n) {
3251
+ function jr(e, t) {
3252
+ m(e).forEach(function(n) {
3225
3253
  t.db.objectStoreNames.contains(n) || (Ne && console.debug("Dexie: Creating missing table", n), Xn(t, n, e[n].primKey, e[n].indexes));
3226
3254
  });
3227
3255
  }
@@ -3231,33 +3259,33 @@ function qi() {
3231
3259
  function mn(e, t, n) {
3232
3260
  var r = {};
3233
3261
  return Te(t.objectStoreNames, 0).forEach(function(i) {
3234
- for (var u = n.objectStore(i), h = Ln(Pr(_ = u.keyPath), _ || "", !0, !1, !!u.autoIncrement, _ && typeof _ != "string", !0), m = [], b = 0; b < u.indexNames.length; ++b) {
3262
+ for (var u = n.objectStore(i), h = Ln(Fr(_ = u.keyPath), _ || "", !0, !1, !!u.autoIncrement, _ && typeof _ != "string", !0), g = [], b = 0; b < u.indexNames.length; ++b) {
3235
3263
  var T = u.index(u.indexNames[b]), _ = T.keyPath, T = Ln(T.name, _, !!T.unique, !!T.multiEntry, !1, _ && typeof _ != "string", !1);
3236
- m.push(T);
3264
+ g.push(T);
3237
3265
  }
3238
- r[i] = Un(i, h, m);
3266
+ r[i] = Un(i, h, g);
3239
3267
  }), r;
3240
3268
  }
3241
3269
  function gn(e, t, n) {
3242
3270
  for (var r = n.db.objectStoreNames, i = 0; i < r.length; ++i) {
3243
3271
  var u = r[i], h = n.objectStore(u);
3244
3272
  e._hasGetAll = "getAll" in h;
3245
- for (var m = 0; m < h.indexNames.length; ++m) {
3246
- var b = h.indexNames[m], _ = h.index(b).keyPath, T = typeof _ == "string" ? _ : "[" + Te(_).join("+") + "]";
3273
+ for (var g = 0; g < h.indexNames.length; ++g) {
3274
+ var b = h.indexNames[g], _ = h.index(b).keyPath, T = typeof _ == "string" ? _ : "[" + Te(_).join("+") + "]";
3247
3275
  !t[u] || (_ = t[u].idxByName[T]) && (_.name = b, delete t[u].idxByName[T], t[u].idxByName[b] = _);
3248
3276
  }
3249
3277
  }
3250
3278
  typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && d.WorkerGlobalScope && d instanceof d.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
3251
3279
  }
3252
- function jr(e) {
3280
+ function Mr(e) {
3253
3281
  return e.split(",").map(function(t, n) {
3254
3282
  var u = t.split(":"), r = (i = u[1]) === null || i === void 0 ? void 0 : i.trim(), i = (t = u[0].trim()).replace(/([&*]|\+\+)/g, ""), u = /^\[/.test(i) ? i.match(/^\[(.*)\]$/)[1].split("+") : i;
3255
3283
  return Ln(i, u || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), v(u), n === 0, r);
3256
3284
  });
3257
3285
  }
3258
- var za = (Dt.prototype._createTableSchema = Un, Dt.prototype._parseIndexSyntax = jr, Dt.prototype._parseStoresSpec = function(e, t) {
3286
+ var Qa = (Dt.prototype._createTableSchema = Un, Dt.prototype._parseIndexSyntax = Mr, Dt.prototype._parseStoresSpec = function(e, t) {
3259
3287
  var n = this;
3260
- g(e).forEach(function(r) {
3288
+ m(e).forEach(function(r) {
3261
3289
  if (e[r] !== null) {
3262
3290
  var i = n._parseIndexSyntax(e[r]), u = i.shift();
3263
3291
  if (!u) throw new z.Schema("Invalid schema for table " + r + ": " + e[r]);
@@ -3274,7 +3302,7 @@ function qi() {
3274
3302
  var n = t._versions, r = {}, i = {};
3275
3303
  return n.forEach(function(u) {
3276
3304
  D(r, u._cfg.storesSource), i = u._cfg.dbschema = {}, u._parseStoresSpec(r, i);
3277
- }), t._dbSchema = i, Gn(t, [t._allTables, t, t.Transaction.prototype]), hn(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], g(i), i), t._storeNames = g(i), this;
3305
+ }), t._dbSchema = i, Gn(t, [t._allTables, t, t.Transaction.prototype]), hn(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], m(i), i), t._storeNames = m(i), this;
3278
3306
  }, Dt.prototype.upgrade = function(e) {
3279
3307
  return this._cfg.contentUpgrade = Ae(this._cfg.contentUpgrade || l, e), this;
3280
3308
  }, Dt);
@@ -3302,29 +3330,29 @@ function qi() {
3302
3330
  }
3303
3331
  D(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
3304
3332
  };
3305
- function Vt(e, t, n) {
3333
+ function Gt(e, t, n) {
3306
3334
  var r = re(t, n);
3307
3335
  if (!isNaN(r)) {
3308
3336
  if (0 < r) throw RangeError();
3309
3337
  if (Qn(e)) return D(e, { from: t, to: n, d: 1 });
3310
3338
  var i = e.l, r = e.r;
3311
- if (re(n, e.from) < 0) return i ? Vt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, Kr(e);
3312
- if (0 < re(t, e.to)) return r ? Vt(r, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, Kr(e);
3313
- re(t, e.from) < 0 && (e.from = t, e.l = null, e.d = r ? r.d + 1 : 1), 0 < re(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, i && !e.l && Gt(e, i), r && n && Gt(e, r);
3339
+ if (re(n, e.from) < 0) return i ? Gt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, qr(e);
3340
+ if (0 < re(t, e.to)) return r ? Gt(r, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, qr(e);
3341
+ re(t, e.from) < 0 && (e.from = t, e.l = null, e.d = r ? r.d + 1 : 1), 0 < re(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, i && !e.l && $t(e, i), r && n && $t(e, r);
3314
3342
  }
3315
3343
  }
3316
- function Gt(e, t) {
3344
+ function $t(e, t) {
3317
3345
  Qn(t) || (function n(r, b) {
3318
- var u = b.from, h = b.to, m = b.l, b = b.r;
3319
- Vt(r, u, h), m && n(r, m), b && n(r, b);
3346
+ var u = b.from, h = b.to, g = b.l, b = b.r;
3347
+ Gt(r, u, h), g && n(r, g), b && n(r, b);
3320
3348
  })(e, t);
3321
3349
  }
3322
- function Mr(e, t) {
3350
+ function Kr(e, t) {
3323
3351
  var n = yn(t), r = n.next();
3324
3352
  if (r.done) return !1;
3325
- for (var i = r.value, u = yn(e), h = u.next(i.from), m = h.value; !r.done && !h.done; ) {
3326
- if (re(m.from, i.to) <= 0 && 0 <= re(m.to, i.from)) return !0;
3327
- re(i.from, m.from) < 0 ? i = (r = n.next(m.from)).value : m = (h = u.next(i.from)).value;
3353
+ for (var i = r.value, u = yn(e), h = u.next(i.from), g = h.value; !r.done && !h.done; ) {
3354
+ if (re(g.from, i.to) <= 0 && 0 <= re(g.to, i.from)) return !0;
3355
+ re(i.from, g.from) < 0 ? i = (r = n.next(g.from)).value : g = (h = u.next(i.from)).value;
3328
3356
  }
3329
3357
  return !1;
3330
3358
  }
@@ -3348,41 +3376,41 @@ function qi() {
3348
3376
  return { done: !0 };
3349
3377
  } };
3350
3378
  }
3351
- function Kr(e) {
3379
+ function qr(e) {
3352
3380
  var t, n, r = (((t = e.r) === null || t === void 0 ? void 0 : t.d) || 0) - (((n = e.l) === null || n === void 0 ? void 0 : n.d) || 0), i = 1 < r ? "r" : r < -1 ? "l" : "";
3353
- i && (t = i == "r" ? "l" : "r", n = a({}, e), r = e[i], e.from = r.from, e.to = r.to, e[i] = r[i], n[i] = r[t], (e[t] = n).d = qr(n)), e.d = qr(e);
3381
+ i && (t = i == "r" ? "l" : "r", n = a({}, e), r = e[i], e.from = r.from, e.to = r.to, e[i] = r[i], n[i] = r[t], (e[t] = n).d = Lr(n)), e.d = Lr(e);
3354
3382
  }
3355
- function qr(n) {
3383
+ function Lr(n) {
3356
3384
  var t = n.r, n = n.l;
3357
3385
  return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
3358
3386
  }
3359
3387
  function vn(e, t) {
3360
- return g(t).forEach(function(n) {
3361
- e[n] ? Gt(e[n], t[n]) : e[n] = (function r(i) {
3362
- var u, h, m = {};
3363
- for (u in i) Y(i, u) && (h = i[u], m[u] = !h || typeof h != "object" || It.has(h.constructor) ? h : r(h));
3364
- return m;
3388
+ return m(t).forEach(function(n) {
3389
+ e[n] ? $t(e[n], t[n]) : e[n] = (function r(i) {
3390
+ var u, h, g = {};
3391
+ for (u in i) Y(i, u) && (h = i[u], g[u] = !h || typeof h != "object" || Rt.has(h.constructor) ? h : r(h));
3392
+ return g;
3365
3393
  })(t[n]);
3366
3394
  }), e;
3367
3395
  }
3368
3396
  function Hn(e, t) {
3369
3397
  return e.all || t.all || Object.keys(e).some(function(n) {
3370
- return t[n] && Mr(t[n], e[n]);
3398
+ return t[n] && Kr(t[n], e[n]);
3371
3399
  });
3372
3400
  }
3373
3401
  Q(Re.prototype, ((Le = { add: function(e) {
3374
- return Gt(this, e), this;
3402
+ return $t(this, e), this;
3375
3403
  }, addKey: function(e) {
3376
- return Vt(this, e, e), this;
3404
+ return Gt(this, e, e), this;
3377
3405
  }, addKeys: function(e) {
3378
3406
  var t = this;
3379
3407
  return e.forEach(function(n) {
3380
- return Vt(t, n, n);
3408
+ return Gt(t, n, n);
3381
3409
  }), this;
3382
3410
  }, hasKey: function(e) {
3383
3411
  var t = yn(this).next(e).value;
3384
3412
  return t && re(t.from, e) <= 0 && 0 <= re(t.to, e);
3385
- } })[kt] = function() {
3413
+ } })[Pt] = function() {
3386
3414
  return yn(this);
3387
3415
  }, Le));
3388
3416
  var gt = {}, Zn = {}, Jn = !1;
@@ -3394,18 +3422,18 @@ function qi() {
3394
3422
  function er(e, t) {
3395
3423
  t === void 0 && (t = !1);
3396
3424
  var n = /* @__PURE__ */ new Set();
3397
- if (e.all) for (var r = 0, i = Object.values(gt); r < i.length; r++) Lr(h = i[r], e, n, t);
3425
+ if (e.all) for (var r = 0, i = Object.values(gt); r < i.length; r++) Ur(h = i[r], e, n, t);
3398
3426
  else for (var u in e) {
3399
- var h, m = /^idb\:\/\/(.*)\/(.*)\//.exec(u);
3400
- m && (u = m[1], m = m[2], (h = gt["idb://".concat(u, "/").concat(m)]) && Lr(h, e, n, t));
3427
+ var h, g = /^idb\:\/\/(.*)\/(.*)\//.exec(u);
3428
+ g && (u = g[1], g = g[2], (h = gt["idb://".concat(u, "/").concat(g)]) && Ur(h, e, n, t));
3401
3429
  }
3402
3430
  n.forEach(function(b) {
3403
3431
  return b();
3404
3432
  });
3405
3433
  }
3406
- function Lr(e, t, n, r) {
3434
+ function Ur(e, t, n, r) {
3407
3435
  for (var i = [], u = 0, h = Object.entries(e.queries.query); u < h.length; u++) {
3408
- for (var m = h[u], b = m[0], _ = [], T = 0, y = m[1]; T < y.length; T++) {
3436
+ for (var g = h[u], b = g[0], _ = [], T = 0, y = g[1]; T < y.length; T++) {
3409
3437
  var A = y[T];
3410
3438
  Hn(t, A.obsSet) ? A.subscribers.forEach(function(N) {
3411
3439
  return n.add(N);
@@ -3418,7 +3446,7 @@ function qi() {
3418
3446
  e.queries.query[b] = _;
3419
3447
  }
3420
3448
  }
3421
- function Qa(e) {
3449
+ function Ha(e) {
3422
3450
  var t = e._state, n = e._deps.indexedDB;
3423
3451
  if (t.isBeingOpened || e.idbdb) return t.dbReadyPromise.then(function() {
3424
3452
  return t.dbOpenError ? Ee(t.dbOpenError) : e;
@@ -3428,25 +3456,25 @@ function qi() {
3428
3456
  function h() {
3429
3457
  if (t.openCanceller !== r) throw new z.DatabaseClosed("db.open() was cancelled");
3430
3458
  }
3431
- function m() {
3459
+ function g() {
3432
3460
  return new $(function(A, w) {
3433
3461
  if (h(), !n) throw new z.MissingAPI();
3434
3462
  var x = e.name, O = t.autoSchema || !i ? n.open(x) : n.open(x, i);
3435
3463
  if (!O) throw new z.MissingAPI();
3436
3464
  O.onerror = Xe(w), O.onblocked = pe(e._fireOnBlocked), O.onupgradeneeded = pe(function(N) {
3437
3465
  var C;
3438
- T = O.transaction, t.autoSchema && !e._options.allowEmptyDB ? (O.onerror = Kt, T.abort(), O.result.close(), (C = n.deleteDatabase(x)).onsuccess = C.onerror = pe(function() {
3466
+ T = O.transaction, t.autoSchema && !e._options.allowEmptyDB ? (O.onerror = qt, T.abort(), O.result.close(), (C = n.deleteDatabase(x)).onsuccess = C.onerror = pe(function() {
3439
3467
  w(new z.NoSuchDatabase("Database ".concat(x, " doesnt exist")));
3440
- })) : (T.onerror = Xe(w), N = N.oldVersion > Math.pow(2, 62) ? 0 : N.oldVersion, y = N < 1, e.idbdb = O.result, u && Wa(e, T), Ya(e, N / 10, T, w));
3468
+ })) : (T.onerror = Xe(w), N = N.oldVersion > Math.pow(2, 62) ? 0 : N.oldVersion, y = N < 1, e.idbdb = O.result, u && za(e, T), Wa(e, N / 10, T, w));
3441
3469
  }, w), O.onsuccess = pe(function() {
3442
3470
  T = null;
3443
3471
  var N, C, I, P, F, M = e.idbdb = O.result, U = Te(M.objectStoreNames);
3444
3472
  if (0 < U.length) try {
3445
3473
  var K = M.transaction((P = U).length === 1 ? P[0] : P, "readonly");
3446
- if (t.autoSchema) C = M, I = K, (N = e).verno = C.version / 10, I = N._dbSchema = mn(0, C, I), N._storeNames = Te(C.objectStoreNames, 0), hn(N, [N._allTables], g(I), I);
3474
+ if (t.autoSchema) C = M, I = K, (N = e).verno = C.version / 10, I = N._dbSchema = mn(0, C, I), N._storeNames = Te(C.objectStoreNames, 0), hn(N, [N._allTables], m(I), I);
3447
3475
  else if (gn(e, e._dbSchema, K), ((F = $n(mn(0, (F = e).idbdb, K), F._dbSchema)).add.length || F.change.some(function(L) {
3448
3476
  return L.add.length || L.change.length;
3449
- })) && !u) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), M.close(), i = M.version + 1, u = !0, A(m());
3477
+ })) && !u) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), M.close(), i = M.version + 1, u = !0, A(g());
3450
3478
  dn(e, K);
3451
3479
  } catch {
3452
3480
  }
@@ -3459,10 +3487,10 @@ function qi() {
3459
3487
  }).catch(function(A) {
3460
3488
  switch (A?.name) {
3461
3489
  case "UnknownError":
3462
- if (0 < t.PR1398_maxLoop) return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), m();
3490
+ if (0 < t.PR1398_maxLoop) return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), g();
3463
3491
  break;
3464
3492
  case "VersionError":
3465
- if (0 < i) return i = 0, m();
3493
+ if (0 < i) return i = 0, g();
3466
3494
  }
3467
3495
  return $.reject(A);
3468
3496
  });
@@ -3475,7 +3503,7 @@ function qi() {
3475
3503
  b = setInterval(w, 100), w();
3476
3504
  }).finally(function() {
3477
3505
  return clearInterval(b);
3478
- }) : Promise.resolve()).then(m)]).then(function() {
3506
+ }) : Promise.resolve()).then(g)]).then(function() {
3479
3507
  return h(), t.onReadyBeingFired = [], $.resolve(zn(function() {
3480
3508
  return e.on.ready.fire(e.vip);
3481
3509
  })).then(function A() {
@@ -3503,7 +3531,7 @@ function qi() {
3503
3531
  w.schema.indexes.forEach(function(x) {
3504
3532
  x.name && (A["idb://".concat(e.name, "/").concat(w.name, "/").concat(x.name)] = new Re(-1 / 0, [[[]]]));
3505
3533
  }), A["idb://".concat(e.name, "/").concat(w.name, "/")] = A["idb://".concat(e.name, "/").concat(w.name, "/:dels")] = new Re(-1 / 0, [[[]]]);
3506
- }), ut(qt).fire(A), er(A, !0)), e;
3534
+ }), ut(Lt).fire(A), er(A, !0)), e;
3507
3535
  });
3508
3536
  }
3509
3537
  function tr(e) {
@@ -3515,8 +3543,8 @@ function qi() {
3515
3543
  });
3516
3544
  function i(u) {
3517
3545
  return function(b) {
3518
- var m = u(b), b = m.value;
3519
- return m.done ? b : b && typeof b.then == "function" ? b.then(n, r) : v(b) ? Promise.all(b).then(n, r) : n(b);
3546
+ var g = u(b), b = g.value;
3547
+ return g.done ? b : b && typeof b.then == "function" ? b.then(n, r) : v(b) ? Promise.all(b).then(n, r) : n(b);
3520
3548
  };
3521
3549
  }
3522
3550
  return i(t)();
@@ -3525,18 +3553,18 @@ function qi() {
3525
3553
  for (var r = v(e) ? e.slice() : [e], i = 0; i < n; ++i) r.push(t);
3526
3554
  return r;
3527
3555
  }
3528
- var Ha = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
3556
+ var Za = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
3529
3557
  return a(a({}, e), { table: function(t) {
3530
3558
  var n = e.table(t), r = n.schema, i = {}, u = [];
3531
3559
  function h(y, A, w) {
3532
- var x = Ut(y), O = i[x] = i[x] || [], N = y == null ? 0 : typeof y == "string" ? 1 : y.length, C = 0 < A, C = a(a({}, w), { name: C ? "".concat(x, "(virtual-from:").concat(w.name, ")") : w.name, lowLevelIndex: w, isVirtual: C, keyTail: A, keyLength: N, extractKey: Vn(y), unique: !C && w.unique });
3560
+ var x = Vt(y), O = i[x] = i[x] || [], N = y == null ? 0 : typeof y == "string" ? 1 : y.length, C = 0 < A, C = a(a({}, w), { name: C ? "".concat(x, "(virtual-from:").concat(w.name, ")") : w.name, lowLevelIndex: w, isVirtual: C, keyTail: A, keyLength: N, extractKey: Vn(y), unique: !C && w.unique });
3533
3561
  return O.push(C), C.isPrimaryKey || u.push(C), 1 < N && h(N === 2 ? y[0] : y.slice(0, N - 1), A + 1, w), O.sort(function(I, P) {
3534
3562
  return I.keyTail - P.keyTail;
3535
3563
  }), C;
3536
3564
  }
3537
3565
  t = h(r.primaryKey.keyPath, 0, r.primaryKey), i[":id"] = [t];
3538
- for (var m = 0, b = r.indexes; m < b.length; m++) {
3539
- var _ = b[m];
3566
+ for (var g = 0, b = r.indexes; g < b.length; g++) {
3567
+ var _ = b[g];
3540
3568
  h(_.keyPath, 0, _);
3541
3569
  }
3542
3570
  function T(y) {
@@ -3544,7 +3572,7 @@ function qi() {
3544
3572
  return w.isVirtual ? a(a({}, y), { query: { index: w.lowLevelIndex, range: (A = y.query.range, w = w.keyTail, { type: A.type === 1 ? 2 : A.type, lower: wn(A.lower, A.lowerOpen ? e.MAX_KEY : e.MIN_KEY, w), lowerOpen: !0, upper: wn(A.upper, A.upperOpen ? e.MIN_KEY : e.MAX_KEY, w), upperOpen: !0 }) } }) : y;
3545
3573
  }
3546
3574
  return a(a({}, n), { schema: a(a({}, r), { primaryKey: t, indexes: u, getIndexByKeyPath: function(y) {
3547
- return (y = i[Ut(y)]) && y[0];
3575
+ return (y = i[Vt(y)]) && y[0];
3548
3576
  } }), count: function(y) {
3549
3577
  return n.count(T(y));
3550
3578
  }, query: function(y) {
@@ -3572,21 +3600,21 @@ function qi() {
3572
3600
  } });
3573
3601
  } };
3574
3602
  function nr(e, t, n, r) {
3575
- return n = n || {}, r = r || "", g(e).forEach(function(i) {
3576
- var u, h, m;
3577
- Y(t, i) ? (u = e[i], h = t[i], typeof u == "object" && typeof h == "object" && u && h ? (m = Rt(u)) !== Rt(h) ? n[r + i] = t[i] : m === "Object" ? nr(u, h, n, r + i + ".") : u !== h && (n[r + i] = t[i]) : u !== h && (n[r + i] = t[i])) : n[r + i] = void 0;
3578
- }), g(t).forEach(function(i) {
3603
+ return n = n || {}, r = r || "", m(e).forEach(function(i) {
3604
+ var u, h, g;
3605
+ Y(t, i) ? (u = e[i], h = t[i], typeof u == "object" && typeof h == "object" && u && h ? (g = kt(u)) !== kt(h) ? n[r + i] = t[i] : g === "Object" ? nr(u, h, n, r + i + ".") : u !== h && (n[r + i] = t[i]) : u !== h && (n[r + i] = t[i])) : n[r + i] = void 0;
3606
+ }), m(t).forEach(function(i) {
3579
3607
  Y(e, i) || (n[r + i] = t[i]);
3580
3608
  }), n;
3581
3609
  }
3582
3610
  function rr(e, t) {
3583
3611
  return t.type === "delete" ? t.keys : t.keys || t.values.map(e.extractKey);
3584
3612
  }
3585
- var Za = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
3613
+ var Ja = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
3586
3614
  return a(a({}, e), { table: function(t) {
3587
3615
  var n = e.table(t), r = n.schema.primaryKey;
3588
3616
  return a(a({}, n), { mutate: function(i) {
3589
- var u = W.trans, h = u.table(t).hook, m = h.deleting, b = h.creating, _ = h.updating;
3617
+ var u = W.trans, h = u.table(t).hook, g = h.deleting, b = h.creating, _ = h.updating;
3590
3618
  switch (i.type) {
3591
3619
  case "add":
3592
3620
  if (b.fire === l) break;
@@ -3599,12 +3627,12 @@ function qi() {
3599
3627
  return T(i);
3600
3628
  }, !0);
3601
3629
  case "delete":
3602
- if (m.fire === l) break;
3630
+ if (g.fire === l) break;
3603
3631
  return u._promise("readwrite", function() {
3604
3632
  return T(i);
3605
3633
  }, !0);
3606
3634
  case "deleteRange":
3607
- if (m.fire === l) break;
3635
+ if (g.fire === l) break;
3608
3636
  return u._promise("readwrite", function() {
3609
3637
  return (function y(A, w, x) {
3610
3638
  return n.query({ trans: A, values: !1, query: { index: r, range: w }, limit: x }).then(function(O) {
@@ -3623,7 +3651,7 @@ function qi() {
3623
3651
  return (y = y.type === "add" || y.type === "put" ? a(a({}, y), { keys: N }) : a({}, y)).type !== "delete" && (y.values = f([], y.values)), y.keys && (y.keys = f([], y.keys)), A = n, x = N, ((w = y).type === "add" ? Promise.resolve([]) : A.getMany({ trans: w.trans, keys: x, cache: "immutable" })).then(function(C) {
3624
3652
  var I = N.map(function(P, F) {
3625
3653
  var M, U, K, L = C[F], G = { onerror: null, onsuccess: null };
3626
- return y.type === "delete" ? m.fire.call(G, P, L, O) : y.type === "add" || L === void 0 ? (M = b.fire.call(G, P, y.values[F], O), P == null && M != null && (y.keys[F] = P = M, r.outbound || le(y.values[F], r.keyPath, P))) : (M = nr(L, y.values[F]), (U = _.fire.call(G, M, P, L, O)) && (K = y.values[F], Object.keys(U).forEach(function(V) {
3654
+ return y.type === "delete" ? g.fire.call(G, P, L, O) : y.type === "add" || L === void 0 ? (M = b.fire.call(G, P, y.values[F], O), P == null && M != null && (y.keys[F] = P = M, r.outbound || le(y.values[F], r.keyPath, P))) : (M = nr(L, y.values[F]), (U = _.fire.call(G, M, P, L, O)) && (K = y.values[F], Object.keys(U).forEach(function(V) {
3627
3655
  Y(K, V) ? K[V] = U[V] : le(K, V, U[V]);
3628
3656
  }))), G;
3629
3657
  });
@@ -3643,7 +3671,7 @@ function qi() {
3643
3671
  } });
3644
3672
  } });
3645
3673
  } };
3646
- function Ur(e, t, n) {
3674
+ function Vr(e, t, n) {
3647
3675
  try {
3648
3676
  if (!t || t.keys.length < e.length) return null;
3649
3677
  for (var r = [], i = 0, u = 0; i < t.keys.length && u < e.length; ++i) re(t.keys[i], e[u]) === 0 && (r.push(n ? We(t.values[i]) : t.values[i]), ++u);
@@ -3652,12 +3680,12 @@ function qi() {
3652
3680
  return null;
3653
3681
  }
3654
3682
  }
3655
- var Ja = { stack: "dbcore", level: -1, create: function(e) {
3683
+ var ei = { stack: "dbcore", level: -1, create: function(e) {
3656
3684
  return { table: function(t) {
3657
3685
  var n = e.table(t);
3658
3686
  return a(a({}, n), { getMany: function(r) {
3659
3687
  if (!r.cache) return n.getMany(r);
3660
- var i = Ur(r.keys, r.trans._cache, r.cache === "clone");
3688
+ var i = Vr(r.keys, r.trans._cache, r.cache === "clone");
3661
3689
  return i ? $.resolve(i) : n.getMany(r).then(function(u) {
3662
3690
  return r.trans._cache = { keys: r.keys, values: r.cache === "clone" ? We(u) : u }, u;
3663
3691
  });
@@ -3666,10 +3694,10 @@ function qi() {
3666
3694
  } });
3667
3695
  } };
3668
3696
  } };
3669
- function Vr(e, t) {
3697
+ function Gr(e, t) {
3670
3698
  return e.trans.mode === "readonly" && !!e.subscr && !e.trans.explicit && e.trans.db._options.cache !== "disabled" && !t.schema.primaryKey.outbound;
3671
3699
  }
3672
- function Gr(e, t) {
3700
+ function $r(e, t) {
3673
3701
  switch (e) {
3674
3702
  case "query":
3675
3703
  return t.values && !t.unique;
@@ -3680,13 +3708,13 @@ function qi() {
3680
3708
  return !1;
3681
3709
  }
3682
3710
  }
3683
- var ei = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
3711
+ var ti = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
3684
3712
  var t = e.schema.name, n = new Re(e.MIN_KEY, e.MAX_KEY);
3685
3713
  return a(a({}, e), { transaction: function(r, i, u) {
3686
3714
  if (W.subscr && i !== "readonly") throw new z.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(W.querier));
3687
3715
  return e.transaction(r, i, u);
3688
3716
  }, table: function(r) {
3689
- var i = e.table(r), u = i.schema, h = u.primaryKey, y = u.indexes, m = h.extractKey, b = h.outbound, _ = h.autoIncrement && y.filter(function(w) {
3717
+ var i = e.table(r), u = i.schema, h = u.primaryKey, y = u.indexes, g = h.extractKey, b = h.outbound, _ = h.autoIncrement && y.filter(function(w) {
3690
3718
  return w.compound && w.keyPath.includes(h.keyPath);
3691
3719
  }), T = a(a({}, i), { mutate: function(w) {
3692
3720
  function x(V) {
@@ -3695,7 +3723,7 @@ function qi() {
3695
3723
  var O, N, C, I = w.trans, P = w.mutatedParts || (w.mutatedParts = {}), F = x(""), M = x(":dels"), U = w.type, G = w.type === "deleteRange" ? [w.range] : w.type === "delete" ? [w.keys] : w.values.length < 50 ? [rr(h, w).filter(function(V) {
3696
3724
  return V;
3697
3725
  }), w.values] : [], K = G[0], L = G[1], G = w.trans._cache;
3698
- return v(K) ? (F.addKeys(K), (G = U === "delete" || K.length === L.length ? Ur(K, G) : null) || M.addKeys(K), (G || L) && (O = x, N = G, C = L, u.indexes.forEach(function(V) {
3726
+ return v(K) ? (F.addKeys(K), (G = U === "delete" || K.length === L.length ? Vr(K, G) : null) || M.addKeys(K), (G || L) && (O = x, N = G, C = L, u.indexes.forEach(function(V) {
3699
3727
  var X = O(V.name || "");
3700
3728
  function ne(ee) {
3701
3729
  return ee != null ? V.extractKey(ee) : null;
@@ -3729,9 +3757,9 @@ function qi() {
3729
3757
  }, getMany: function(w) {
3730
3758
  return [h, new Re().addKeys(w.keys)];
3731
3759
  }, count: y, query: y, openCursor: y };
3732
- return g(A).forEach(function(w) {
3760
+ return m(A).forEach(function(w) {
3733
3761
  T[w] = function(x) {
3734
- var O = W.subscr, N = !!O, C = Vr(W, i) && Gr(w, x) ? x.obsSet = {} : O;
3762
+ var O = W.subscr, N = !!O, C = Gr(W, i) && $r(w, x) ? x.obsSet = {} : O;
3735
3763
  if (N) {
3736
3764
  var I = function(L) {
3737
3765
  return L = "idb://".concat(t, "/").concat(r, "/").concat(L), C[L] || (C[L] = new Re());
@@ -3744,7 +3772,7 @@ function qi() {
3744
3772
  if (b && x.values) return M.then(function(ne) {
3745
3773
  return ne = ne.result, P.addKeys(ne), L;
3746
3774
  });
3747
- var G = x.values ? L.result.map(m) : L.result;
3775
+ var G = x.values ? L.result.map(g) : L.result;
3748
3776
  (x.values ? P : F).addKeys(G);
3749
3777
  } else if (w === "openCursor") {
3750
3778
  var V = L, X = x.values;
@@ -3768,7 +3796,7 @@ function qi() {
3768
3796
  }), T;
3769
3797
  } });
3770
3798
  } };
3771
- function $r(e, t, n) {
3799
+ function Xr(e, t, n) {
3772
3800
  if (n.numFailures === 0) return t;
3773
3801
  if (t.type === "deleteRange") return null;
3774
3802
  var r = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
@@ -3782,13 +3810,13 @@ function qi() {
3782
3810
  return n = e, ((r = t).lower === void 0 || (r.lowerOpen ? 0 < re(n, r.lower) : 0 <= re(n, r.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? re(e, t.upper) < 0 : re(e, t.upper) <= 0));
3783
3811
  var n, r;
3784
3812
  }
3785
- function Xr(e, t, A, r, i, u) {
3813
+ function Yr(e, t, A, r, i, u) {
3786
3814
  if (!A || A.length === 0) return e;
3787
- var h = t.query.index, m = h.multiEntry, b = t.query.range, _ = r.schema.primaryKey.extractKey, T = h.extractKey, y = (h.lowLevelIndex || h).extractKey, A = A.reduce(function(w, x) {
3815
+ var h = t.query.index, g = h.multiEntry, b = t.query.range, _ = r.schema.primaryKey.extractKey, T = h.extractKey, y = (h.lowLevelIndex || h).extractKey, A = A.reduce(function(w, x) {
3788
3816
  var O = w, N = [];
3789
3817
  if (x.type === "add" || x.type === "put") for (var C = new Re(), I = x.values.length - 1; 0 <= I; --I) {
3790
3818
  var P, F = x.values[I], M = _(F);
3791
- C.hasKey(M) || (P = T(F), (m && v(P) ? P.some(function(V) {
3819
+ C.hasKey(M) || (P = T(F), (g && v(P) ? P.some(function(V) {
3792
3820
  return ar(V, b);
3793
3821
  }) : ar(P, b)) && (C.addKey(M), N.push(F)));
3794
3822
  }
@@ -3832,10 +3860,10 @@ function qi() {
3832
3860
  return re(y(w), y(x)) || re(_(w), _(x));
3833
3861
  }), t.limit && t.limit < 1 / 0 && (A.length > t.limit ? A.length = t.limit : e.length === t.limit && A.length < t.limit && (i.dirty = !0)), u ? Object.freeze(A) : A);
3834
3862
  }
3835
- function Yr(e, t) {
3863
+ function Wr(e, t) {
3836
3864
  return re(e.lower, t.lower) === 0 && re(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
3837
3865
  }
3838
- function ti(e, t) {
3866
+ function ni(e, t) {
3839
3867
  return (function(n, r, i, u) {
3840
3868
  if (n === void 0) return r !== void 0 ? -1 : 0;
3841
3869
  if (r === void 0) return 1;
@@ -3856,7 +3884,7 @@ function qi() {
3856
3884
  return r;
3857
3885
  })(e.upper, t.upper, e.upperOpen, t.upperOpen);
3858
3886
  }
3859
- function ni(e, t, n, r) {
3887
+ function ri(e, t, n, r) {
3860
3888
  e.subscribers.add(n), r.addEventListener("abort", function() {
3861
3889
  var i, u;
3862
3890
  e.subscribers.delete(n), e.subscribers.size === 0 && (i = e, u = t, setTimeout(function() {
@@ -3864,10 +3892,10 @@ function qi() {
3864
3892
  }, 3e3));
3865
3893
  });
3866
3894
  }
3867
- var ri = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
3895
+ var ai = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
3868
3896
  var t = e.schema.name;
3869
3897
  return a(a({}, e), { transaction: function(n, r, i) {
3870
- var u, h, m = e.transaction(n, r, i);
3898
+ var u, h, g = e.transaction(n, r, i);
3871
3899
  return r === "readwrite" && (h = (u = new AbortController()).signal, i = function(b) {
3872
3900
  return function() {
3873
3901
  if (u.abort(), r === "readwrite") {
@@ -3875,16 +3903,16 @@ function qi() {
3875
3903
  var A = y[T], w = gt["idb://".concat(t, "/").concat(A)];
3876
3904
  if (w) {
3877
3905
  var x = e.table(A), O = w.optimisticOps.filter(function(X) {
3878
- return X.trans === m;
3906
+ return X.trans === g;
3879
3907
  });
3880
- if (m._explicit && b && m.mutatedParts) for (var N = 0, C = Object.values(w.queries.query); N < C.length; N++) for (var I = 0, P = (U = C[N]).slice(); I < P.length; I++) Hn((K = P[I]).obsSet, m.mutatedParts) && (Me(U, K), K.subscribers.forEach(function(X) {
3908
+ if (g._explicit && b && g.mutatedParts) for (var N = 0, C = Object.values(w.queries.query); N < C.length; N++) for (var I = 0, P = (U = C[N]).slice(); I < P.length; I++) Hn((K = P[I]).obsSet, g.mutatedParts) && (Me(U, K), K.subscribers.forEach(function(X) {
3881
3909
  return _.add(X);
3882
3910
  }));
3883
3911
  else if (0 < O.length) {
3884
3912
  w.optimisticOps = w.optimisticOps.filter(function(X) {
3885
- return X.trans !== m;
3913
+ return X.trans !== g;
3886
3914
  });
3887
- for (var F = 0, M = Object.values(w.queries.query); F < M.length; F++) for (var U, K, L, G = 0, V = (U = M[F]).slice(); G < V.length; G++) (K = V[G]).res != null && m.mutatedParts && (b && !K.dirty ? (L = Object.isFrozen(K.res), L = Xr(K.res, K.req, O, x, K, L), K.dirty ? (Me(U, K), K.subscribers.forEach(function(X) {
3915
+ for (var F = 0, M = Object.values(w.queries.query); F < M.length; F++) for (var U, K, L, G = 0, V = (U = M[F]).slice(); G < V.length; G++) (K = V[G]).res != null && g.mutatedParts && (b && !K.dirty ? (L = Object.isFrozen(K.res), L = Yr(K.res, K.req, O, x, K, L), K.dirty ? (Me(U, K), K.subscribers.forEach(function(X) {
3888
3916
  return _.add(X);
3889
3917
  })) : L !== K.res && (K.res = L, K.promise = $.resolve({ result: L }))) : (K.dirty && Me(U, K), K.subscribers.forEach(function(X) {
3890
3918
  return _.add(X);
@@ -3897,31 +3925,31 @@ function qi() {
3897
3925
  });
3898
3926
  }
3899
3927
  };
3900
- }, m.addEventListener("abort", i(!1), { signal: h }), m.addEventListener("error", i(!1), { signal: h }), m.addEventListener("complete", i(!0), { signal: h })), m;
3928
+ }, g.addEventListener("abort", i(!1), { signal: h }), g.addEventListener("error", i(!1), { signal: h }), g.addEventListener("complete", i(!0), { signal: h })), g;
3901
3929
  }, table: function(n) {
3902
3930
  var r = e.table(n), i = r.schema.primaryKey;
3903
3931
  return a(a({}, r), { mutate: function(u) {
3904
3932
  var h = W.trans;
3905
3933
  if (i.outbound || h.db._options.cache === "disabled" || h.explicit || h.idbtrans.mode !== "readwrite") return r.mutate(u);
3906
- var m = gt["idb://".concat(t, "/").concat(n)];
3907
- return m ? (h = r.mutate(u), u.type !== "add" && u.type !== "put" || !(50 <= u.values.length || rr(i, u).some(function(b) {
3934
+ var g = gt["idb://".concat(t, "/").concat(n)];
3935
+ return g ? (h = r.mutate(u), u.type !== "add" && u.type !== "put" || !(50 <= u.values.length || rr(i, u).some(function(b) {
3908
3936
  return b == null;
3909
- })) ? (m.optimisticOps.push(u), u.mutatedParts && bn(u.mutatedParts), h.then(function(b) {
3910
- 0 < b.numFailures && (Me(m.optimisticOps, u), (b = $r(0, u, b)) && m.optimisticOps.push(b), u.mutatedParts && bn(u.mutatedParts));
3937
+ })) ? (g.optimisticOps.push(u), u.mutatedParts && bn(u.mutatedParts), h.then(function(b) {
3938
+ 0 < b.numFailures && (Me(g.optimisticOps, u), (b = Xr(0, u, b)) && g.optimisticOps.push(b), u.mutatedParts && bn(u.mutatedParts));
3911
3939
  }), h.catch(function() {
3912
- Me(m.optimisticOps, u), u.mutatedParts && bn(u.mutatedParts);
3940
+ Me(g.optimisticOps, u), u.mutatedParts && bn(u.mutatedParts);
3913
3941
  })) : h.then(function(b) {
3914
- var _ = $r(0, a(a({}, u), { values: u.values.map(function(T, y) {
3942
+ var _ = Xr(0, a(a({}, u), { values: u.values.map(function(T, y) {
3915
3943
  var A;
3916
3944
  return b.failures[y] ? T : (T = (A = i.keyPath) !== null && A !== void 0 && A.includes(".") ? We(T) : a({}, T), le(T, i.keyPath, b.results[y]), T);
3917
3945
  }) }), b);
3918
- m.optimisticOps.push(_), queueMicrotask(function() {
3946
+ g.optimisticOps.push(_), queueMicrotask(function() {
3919
3947
  return u.mutatedParts && bn(u.mutatedParts);
3920
3948
  });
3921
3949
  }), h) : r.mutate(u);
3922
3950
  }, query: function(u) {
3923
- if (!Vr(W, r) || !Gr("query", u)) return r.query(u);
3924
- var h = ((_ = W.trans) === null || _ === void 0 ? void 0 : _.db._options.cache) === "immutable", y = W, m = y.requery, b = y.signal, _ = (function(x, O, N, C) {
3951
+ if (!Gr(W, r) || !$r("query", u)) return r.query(u);
3952
+ var h = ((_ = W.trans) === null || _ === void 0 ? void 0 : _.db._options.cache) === "immutable", y = W, g = y.requery, b = y.signal, _ = (function(x, O, N, C) {
3925
3953
  var I = gt["idb://".concat(x, "/").concat(O)];
3926
3954
  if (!I) return [];
3927
3955
  if (!(O = I.queries[N])) return [null, !1, I, null];
@@ -3930,14 +3958,14 @@ function qi() {
3930
3958
  switch (N) {
3931
3959
  case "query":
3932
3960
  var F = P.find(function(M) {
3933
- return M.req.limit === C.limit && M.req.values === C.values && Yr(M.req.query.range, C.query.range);
3961
+ return M.req.limit === C.limit && M.req.values === C.values && Wr(M.req.query.range, C.query.range);
3934
3962
  });
3935
3963
  return F ? [F, !0, I, P] : [P.find(function(M) {
3936
- return ("limit" in M.req ? M.req.limit : 1 / 0) >= C.limit && (!C.values || M.req.values) && ti(M.req.query.range, C.query.range);
3964
+ return ("limit" in M.req ? M.req.limit : 1 / 0) >= C.limit && (!C.values || M.req.values) && ni(M.req.query.range, C.query.range);
3937
3965
  }), !1, I, P];
3938
3966
  case "count":
3939
3967
  return F = P.find(function(M) {
3940
- return Yr(M.req.query.range, C.query.range);
3968
+ return Wr(M.req.query.range, C.query.range);
3941
3969
  }), [F, !!F, I, P];
3942
3970
  }
3943
3971
  })(t, n, "query", u), T = _[0], y = _[1], A = _[2], w = _[3];
@@ -3950,8 +3978,8 @@ function qi() {
3950
3978
  return x;
3951
3979
  }).catch(function(x) {
3952
3980
  return w && T && Me(w, T), Promise.reject(x);
3953
- }), T = { obsSet: u.obsSet, promise: y, subscribers: /* @__PURE__ */ new Set(), type: "query", req: u, dirty: !1 }, w ? w.push(T) : (w = [T], (A = A || (gt["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[u.query.index.name || ""] = w)), ni(T, w, m, b), T.promise.then(function(x) {
3954
- return { result: Xr(x.result, u, A?.optimisticOps, r, T, h) };
3981
+ }), T = { obsSet: u.obsSet, promise: y, subscribers: /* @__PURE__ */ new Set(), type: "query", req: u, dirty: !1 }, w ? w.push(T) : (w = [T], (A = A || (gt["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[u.query.index.name || ""] = w)), ri(T, w, g, b), T.promise.then(function(x) {
3982
+ return { result: Yr(x.result, u, A?.optimisticOps, r, T, h) };
3955
3983
  });
3956
3984
  } });
3957
3985
  } });
@@ -3968,7 +3996,7 @@ function qi() {
3968
3996
  var t = this._versions, n = t.filter(function(r) {
3969
3997
  return r._cfg.version === e;
3970
3998
  })[0];
3971
- return n || (n = new this.Version(e), t.push(n), t.sort(Xa), n.stores({}), this._state.autoSchema = !1, n);
3999
+ return n || (n = new this.Version(e), t.push(n), t.sort(Ya), n.stores({}), this._state.autoSchema = !1, n);
3972
4000
  }, xe.prototype._whenReady = function(e) {
3973
4001
  var t = this;
3974
4002
  return this.idbdb && (this._state.openComplete || W.letThrough || this._vip) ? e() : new $(function(n, r) {
@@ -3992,7 +4020,7 @@ function qi() {
3992
4020
  }, xe.prototype.open = function() {
3993
4021
  var e = this;
3994
4022
  return ht(rt, function() {
3995
- return Qa(e);
4023
+ return Ha(e);
3996
4024
  });
3997
4025
  }, xe.prototype._close = function() {
3998
4026
  this.on.close.fire(new CustomEvent("close"));
@@ -4019,11 +4047,11 @@ function qi() {
4019
4047
  return new $(function(i, u) {
4020
4048
  function h() {
4021
4049
  t.close(e);
4022
- var m = t._deps.indexedDB.deleteDatabase(t.name);
4023
- m.onsuccess = pe(function() {
4050
+ var g = t._deps.indexedDB.deleteDatabase(t.name);
4051
+ g.onsuccess = pe(function() {
4024
4052
  var b, _, T;
4025
4053
  b = t._deps, _ = t.name, T = b.indexedDB, b = b.IDBKeyRange, Wn(T) || _ === on || Yn(T, b).delete(_).catch(l), i();
4026
- }), m.onerror = Xe(u), m.onblocked = t._fireOnBlocked;
4054
+ }), g.onerror = Xe(u), g.onblocked = t._fireOnBlocked;
4027
4055
  }
4028
4056
  if (n) throw new z.InvalidArgument("Invalid closeOptions argument to db.delete()");
4029
4057
  r.isBeingOpened ? r.dbReadyPromise.then(h) : h();
@@ -4041,7 +4069,7 @@ function qi() {
4041
4069
  return this._state.autoSchema;
4042
4070
  }, Object.defineProperty(xe.prototype, "tables", { get: function() {
4043
4071
  var e = this;
4044
- return g(this._allTables).map(function(t) {
4072
+ return m(this._allTables).map(function(t) {
4045
4073
  return e._allTables[t];
4046
4074
  });
4047
4075
  }, enumerable: !1, configurable: !0 }), xe.prototype.transaction = function() {
@@ -4055,7 +4083,7 @@ function qi() {
4055
4083
  }, xe.prototype._transaction = function(e, t, n) {
4056
4084
  var r = this, i = W.trans;
4057
4085
  i && i.db === this && e.indexOf("!") === -1 || (i = null);
4058
- var u, h, m = e.indexOf("?") !== -1;
4086
+ var u, h, g = e.indexOf("?") !== -1;
4059
4087
  e = e.replace("!", "").replace("?", "");
4060
4088
  try {
4061
4089
  if (h = t.map(function(_) {
@@ -4068,15 +4096,15 @@ function qi() {
4068
4096
  }
4069
4097
  if (i) {
4070
4098
  if (i.mode === Bn && u === jn) {
4071
- if (!m) throw new z.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
4099
+ if (!g) throw new z.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
4072
4100
  i = null;
4073
4101
  }
4074
4102
  i && h.forEach(function(_) {
4075
4103
  if (i && i.storeNames.indexOf(_) === -1) {
4076
- if (!m) throw new z.SubTransaction("Table " + _ + " not included in parent transaction.");
4104
+ if (!g) throw new z.SubTransaction("Table " + _ + " not included in parent transaction.");
4077
4105
  i = null;
4078
4106
  }
4079
- }), m && i && !i.active && (i = null);
4107
+ }), g && i && !i.active && (i = null);
4080
4108
  }
4081
4109
  } catch (_) {
4082
4110
  return i ? i._promise(null, function(T, y) {
@@ -4123,12 +4151,12 @@ function qi() {
4123
4151
  this._middlewares = {}, this.verno = 0;
4124
4152
  var r = xe.dependencies;
4125
4153
  this._options = t = a({ addons: xe.addons, autoOpen: !0, indexedDB: r.indexedDB, IDBKeyRange: r.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, r = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
4126
- var i, u, h, m, b, _ = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: l, dbReadyPromise: null, cancelOpen: l, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
4154
+ var i, u, h, g, b, _ = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: l, dbReadyPromise: null, cancelOpen: l, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
4127
4155
  _.dbReadyPromise = new $(function(y) {
4128
4156
  _.dbReadyResolve = y;
4129
4157
  }), _.openCanceller = new $(function(y, A) {
4130
4158
  _.cancelOpen = A;
4131
- }), this._state = _, this.name = e, this.on = Bt(this, "populate", "blocked", "versionchange", "close", { ready: [Ae, l] }), this.once = function(y, A) {
4159
+ }), this._state = _, this.name = e, this.on = jt(this, "populate", "blocked", "versionchange", "close", { ready: [Ae, l] }), this.once = function(y, A) {
4132
4160
  var w = function() {
4133
4161
  for (var x = [], O = 0; O < arguments.length; O++) x[O] = arguments[O];
4134
4162
  n.on(y).unsubscribe(w), A.apply(n, x);
@@ -4143,9 +4171,9 @@ function qi() {
4143
4171
  }));
4144
4172
  });
4145
4173
  };
4146
- }), this.Collection = (i = this, jt(Ka.prototype, function(C, N) {
4174
+ }), this.Collection = (i = this, Mt(qa.prototype, function(C, N) {
4147
4175
  this.db = i;
4148
- var w = xr, x = null;
4176
+ var w = Tr, x = null;
4149
4177
  if (N) try {
4150
4178
  w = N();
4151
4179
  } catch (I) {
@@ -4153,15 +4181,15 @@ function qi() {
4153
4181
  }
4154
4182
  var O = C._ctx, N = O.table, C = N.hook.reading.fire;
4155
4183
  this._ctx = { table: N, index: O.index, isPrimKey: !O.index || N.schema.primKey.keyPath && O.index === N.schema.primKey.name, range: w, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: x, or: O.or, valueMapper: C !== s ? C : null };
4156
- })), this.Table = (u = this, jt(Ar.prototype, function(y, A, w) {
4157
- this.db = u, this._tx = w, this.name = y, this.schema = A, this.hook = u._allTables[y] ? u._allTables[y].hook : Bt(null, { creating: [se, l], reading: [k, s], updating: [_e, l], deleting: [ye, l] });
4158
- })), this.Transaction = (h = this, jt(Ua.prototype, function(y, A, w, x, O) {
4184
+ })), this.Table = (u = this, Mt(Cr.prototype, function(y, A, w) {
4185
+ this.db = u, this._tx = w, this.name = y, this.schema = A, this.hook = u._allTables[y] ? u._allTables[y].hook : jt(null, { creating: [se, l], reading: [k, s], updating: [_e, l], deleting: [ye, l] });
4186
+ })), this.Transaction = (h = this, Mt(Va.prototype, function(y, A, w, x, O) {
4159
4187
  var N = this;
4160
4188
  y !== "readonly" && A.forEach(function(C) {
4161
4189
  C = (C = w[C]) === null || C === void 0 ? void 0 : C.yProps, C && (A = A.concat(C.map(function(I) {
4162
4190
  return I.updatesTable;
4163
4191
  })));
4164
- }), this.db = h, this.mode = y, this.storeNames = A, this.schema = w, this.chromeTransactionDurability = x, this.idbtrans = null, this.on = Bt(this, "complete", "error", "abort"), this.parent = O || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new $(function(C, I) {
4192
+ }), this.db = h, this.mode = y, this.storeNames = A, this.schema = w, this.chromeTransactionDurability = x, this.idbtrans = null, this.on = jt(this, "complete", "error", "abort"), this.parent = O || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new $(function(C, I) {
4165
4193
  N._resolve = C, N._reject = I;
4166
4194
  }), this._completion.then(function() {
4167
4195
  N.active = !1, N.on.complete.fire();
@@ -4169,9 +4197,9 @@ function qi() {
4169
4197
  var I = N.active;
4170
4198
  return N.active = !1, N.on.error.fire(C), N.parent ? N.parent._reject(C) : I && N.idbtrans && N.idbtrans.abort(), Ee(C);
4171
4199
  });
4172
- })), this.Version = (m = this, jt(za.prototype, function(y) {
4173
- this.db = m, this._cfg = { version: y, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
4174
- })), this.WhereClause = (b = this, jt(kr.prototype, function(y, A, w) {
4200
+ })), this.Version = (g = this, Mt(Qa.prototype, function(y) {
4201
+ this.db = g, this._cfg = { version: y, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
4202
+ })), this.WhereClause = (b = this, Mt(Pr.prototype, function(y, A, w) {
4175
4203
  if (this.db = b, this._ctx = { table: y, index: A === ":id" ? null : A, or: w }, this._cmp = this._ascending = re, this._descending = function(x, O) {
4176
4204
  return re(O, x);
4177
4205
  }, this._max = function(x, O) {
@@ -4183,7 +4211,7 @@ function qi() {
4183
4211
  0 < y.newVersion ? console.warn("Another connection wants to upgrade database '".concat(n.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(n.name, "'. Closing db now to resume the delete request.")), n.close({ disableAutoOpen: !1 });
4184
4212
  }), this.on("blocked", function(y) {
4185
4213
  !y.newVersion || y.newVersion < y.oldVersion ? console.warn("Dexie.delete('".concat(n.name, "') was blocked")) : console.warn("Upgrade '".concat(n.name, "' blocked by other connection holding version ").concat(y.oldVersion / 10));
4186
- }), this._maxKey = Lt(t.IDBKeyRange), this._createTransaction = function(y, A, w, x) {
4214
+ }), this._maxKey = Ut(t.IDBKeyRange), this._createTransaction = function(y, A, w, x) {
4187
4215
  return new n.Transaction(y, A, w, n._options.chromeTransactionDurability, x);
4188
4216
  }, this._fireOnBlocked = function(y) {
4189
4217
  n.on("blocked").fire(y), Ot.filter(function(A) {
@@ -4191,14 +4219,14 @@ function qi() {
4191
4219
  }).map(function(A) {
4192
4220
  return A.on("versionchange").fire(y);
4193
4221
  });
4194
- }, this.use(Ja), this.use(ri), this.use(ei), this.use(Ha), this.use(Za);
4222
+ }, this.use(ei), this.use(ai), this.use(ti), this.use(Za), this.use(Ja);
4195
4223
  var T = new Proxy(this, { get: function(y, A, w) {
4196
4224
  if (A === "_vip") return !0;
4197
4225
  if (A === "table") return function(O) {
4198
4226
  return _n(n.table(O), T);
4199
4227
  };
4200
4228
  var x = Reflect.get(y, A, w);
4201
- return x instanceof Ar ? _n(x, T) : A === "tables" ? x.map(function(O) {
4229
+ return x instanceof Cr ? _n(x, T) : A === "tables" ? x.map(function(O) {
4202
4230
  return _n(O, T);
4203
4231
  }) : A === "_createTransaction" ? function() {
4204
4232
  return _n(x.apply(this, arguments), T);
@@ -4208,7 +4236,7 @@ function qi() {
4208
4236
  return y(n);
4209
4237
  });
4210
4238
  }
4211
- var En, Le = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", ai = (ir.prototype.subscribe = function(e, t, n) {
4239
+ var En, Le = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", ii = (ir.prototype.subscribe = function(e, t, n) {
4212
4240
  return this._subscribe(e && typeof e != "function" ? e : { next: e, error: t, complete: n });
4213
4241
  }, ir.prototype[Le] = function() {
4214
4242
  return this;
@@ -4221,12 +4249,12 @@ function qi() {
4221
4249
  } catch {
4222
4250
  En = { indexedDB: null, IDBKeyRange: null };
4223
4251
  }
4224
- function Wr(e) {
4225
- var t, n = !1, r = new ai(function(i) {
4226
- var u = bt(e), h, m = !1, b = {}, _ = {}, T = { get closed() {
4227
- return m;
4252
+ function zr(e) {
4253
+ var t, n = !1, r = new ii(function(i) {
4254
+ var u = bt(e), h, g = !1, b = {}, _ = {}, T = { get closed() {
4255
+ return g;
4228
4256
  }, unsubscribe: function() {
4229
- m || (m = !0, h && h.abort(), y && ut.storagemutated.unsubscribe(w));
4257
+ g || (g = !0, h && h.abort(), y && ut.storagemutated.unsubscribe(w));
4230
4258
  } };
4231
4259
  i.start && i.start(T);
4232
4260
  var y = !1, A = function() {
@@ -4235,7 +4263,7 @@ function qi() {
4235
4263
  vn(b, O), Hn(_, b) && A();
4236
4264
  }, x = function() {
4237
4265
  var O, N, C;
4238
- !m && En.indexedDB && (b = {}, O = {}, h && h.abort(), h = new AbortController(), C = (function(I) {
4266
+ !g && En.indexedDB && (b = {}, O = {}, h && h.abort(), h = new AbortController(), C = (function(I) {
4239
4267
  var P = xt();
4240
4268
  try {
4241
4269
  u && Nt();
@@ -4245,15 +4273,15 @@ function qi() {
4245
4273
  P && Tt();
4246
4274
  }
4247
4275
  })(N = { subscr: O, signal: h.signal, requery: A, querier: e, trans: null }), Promise.resolve(C).then(function(I) {
4248
- n = !0, t = I, m || N.signal.aborted || (b = {}, (function(P) {
4276
+ n = !0, t = I, g || N.signal.aborted || (b = {}, (function(P) {
4249
4277
  for (var F in P) if (Y(P, F)) return;
4250
4278
  return 1;
4251
- })(_ = O) || y || (ut(qt, w), y = !0), Fn(function() {
4252
- return !m && i.next && i.next(I);
4279
+ })(_ = O) || y || (ut(Lt, w), y = !0), Fn(function() {
4280
+ return !g && i.next && i.next(I);
4253
4281
  }));
4254
4282
  }, function(I) {
4255
- n = !1, ["DatabaseClosedError", "AbortError"].includes(I?.name) || m || Fn(function() {
4256
- m || i.error && i.error(I);
4283
+ n = !1, ["DatabaseClosedError", "AbortError"].includes(I?.name) || g || Fn(function() {
4284
+ g || i.error && i.error(I);
4257
4285
  });
4258
4286
  }));
4259
4287
  };
@@ -4325,7 +4353,7 @@ function qi() {
4325
4353
  return Ne;
4326
4354
  }, set: function(e) {
4327
4355
  Oe(e);
4328
- } }, derive: B, extend: D, props: Q, override: te, Events: Bt, on: ut, liveQuery: Wr, extendObservabilitySet: vn, getByKeyPath: de, setByKeyPath: le, delByKeyPath: function(e, t) {
4356
+ } }, derive: B, extend: D, props: Q, override: te, Events: jt, on: ut, liveQuery: zr, extendObservabilitySet: vn, getByKeyPath: de, setByKeyPath: le, delByKeyPath: function(e, t) {
4329
4357
  typeof t == "string" ? le(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
4330
4358
  le(e, n, void 0);
4331
4359
  });
@@ -4333,18 +4361,18 @@ function qi() {
4333
4361
  return parseInt(e);
4334
4362
  }).reduce(function(e, t, n) {
4335
4363
  return e + t / Math.pow(10, 2 * n);
4336
- }) })), yt.maxKey = Lt(yt.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (ut(qt, function(e) {
4364
+ }) })), yt.maxKey = Ut(yt.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (ut(Lt, function(e) {
4337
4365
  ct || (e = new CustomEvent(qn, { detail: e }), ct = !0, dispatchEvent(e), ct = !1);
4338
4366
  }), addEventListener(qn, function(e) {
4339
4367
  e = e.detail, ct || or(e);
4340
4368
  }));
4341
- var St, ct = !1, zr = function() {
4369
+ var St, ct = !1, Qr = function() {
4342
4370
  };
4343
- return typeof BroadcastChannel < "u" && ((zr = function() {
4371
+ return typeof BroadcastChannel < "u" && ((Qr = function() {
4344
4372
  (St = new BroadcastChannel(qn)).onmessage = function(e) {
4345
4373
  return e.data && or(e.data);
4346
4374
  };
4347
- })(), typeof St.unref == "function" && St.unref(), ut(qt, function(e) {
4375
+ })(), typeof St.unref == "function" && St.unref(), ut(Lt, function(e) {
4348
4376
  ct || St.postMessage(e);
4349
4377
  })), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
4350
4378
  if (!He.disableBfCache && e.persisted) {
@@ -4352,39 +4380,39 @@ function qi() {
4352
4380
  for (var t = 0, n = Ot; t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
4353
4381
  }
4354
4382
  }), addEventListener("pageshow", function(e) {
4355
- !He.disableBfCache && e.persisted && (Ne && console.debug("Dexie: handling persisted pageshow"), zr(), or({ all: new Re(-1 / 0, [[]]) }));
4383
+ !He.disableBfCache && e.persisted && (Ne && console.debug("Dexie: handling persisted pageshow"), Qr(), or({ all: new Re(-1 / 0, [[]]) }));
4356
4384
  })), $.rejectionMapper = function(e, t) {
4357
4385
  return !e || e instanceof et || e instanceof TypeError || e instanceof SyntaxError || !e.name || !_t[e.name] ? e : (t = new _t[e.name](t || e.message, e), "stack" in e && j(t, "stack", { get: function() {
4358
4386
  return this.inner.stack;
4359
4387
  } }), t);
4360
- }, Oe(Ne), a(He, Object.freeze({ __proto__: null, Dexie: He, liveQuery: Wr, Entity: Tr, cmp: re, PropModification: Mt, replacePrefix: function(e, t) {
4361
- return new Mt({ replacePrefix: [e, t] });
4388
+ }, Oe(Ne), a(He, Object.freeze({ __proto__: null, Dexie: He, liveQuery: zr, Entity: Nr, cmp: re, PropModification: Kt, replacePrefix: function(e, t) {
4389
+ return new Kt({ replacePrefix: [e, t] });
4362
4390
  }, add: function(e) {
4363
- return new Mt({ add: e });
4391
+ return new Kt({ add: e });
4364
4392
  }, remove: function(e) {
4365
- return new Mt({ remove: e });
4366
- }, default: He, RangeSet: Re, mergeRanges: Gt, rangesOverlap: Mr }), { default: He }), He;
4393
+ return new Kt({ remove: e });
4394
+ }, default: He, RangeSet: Re, mergeRanges: $t, rangesOverlap: Kr }), { default: He }), He;
4367
4395
  });
4368
4396
  })(Nn)), Nn.exports;
4369
4397
  }
4370
- var Li = qi();
4371
- const hr = /* @__PURE__ */ Na(Li), aa = /* @__PURE__ */ Symbol.for("Dexie"), Je = globalThis[aa] || (globalThis[aa] = hr);
4398
+ var Vi = Ui();
4399
+ const hr = /* @__PURE__ */ Oa(Vi), ia = /* @__PURE__ */ Symbol.for("Dexie"), Je = globalThis[ia] || (globalThis[ia] = hr);
4372
4400
  if (hr.semVer !== Je.semVer)
4373
4401
  throw new Error(`Two different versions of Dexie loaded in the same app: ${hr.semVer} and ${Je.semVer}`);
4374
4402
  const {
4375
- liveQuery: ko,
4376
- mergeRanges: Po,
4377
- rangesOverlap: Fo,
4378
- RangeSet: Bo,
4379
- cmp: jo,
4380
- Entity: Mo,
4381
- PropModification: Ko,
4382
- replacePrefix: qo,
4383
- add: Lo,
4384
- remove: Uo,
4385
- DexieYProvider: Vo
4386
- } = Je, ia = "_changeLog", oa = "_meta";
4387
- class Ui {
4403
+ liveQuery: Fo,
4404
+ mergeRanges: Bo,
4405
+ rangesOverlap: jo,
4406
+ RangeSet: Mo,
4407
+ cmp: Ko,
4408
+ Entity: qo,
4409
+ PropModification: Lo,
4410
+ replacePrefix: Uo,
4411
+ add: Vo,
4412
+ remove: Go,
4413
+ DexieYProvider: $o
4414
+ } = Je, oa = "_changeLog", sa = "_meta";
4415
+ class Gi {
4388
4416
  constructor(o, c) {
4389
4417
  this.name = o;
4390
4418
  const { xmlElements: a, additionalTables: f } = c.database.tables;
@@ -4393,9 +4421,9 @@ class Ui {
4393
4421
  [a.name]: a.schema
4394
4422
  };
4395
4423
  if (f)
4396
- for (const [g, v] of Object.entries(f))
4397
- d[g] = v.schema;
4398
- d[ia] = "++sequenceNumber, id", d[oa] = "key", this.databaseInstance.version(1).stores(d);
4424
+ for (const [m, v] of Object.entries(f))
4425
+ d[m] = v.schema;
4426
+ d[oa] = "++sequenceNumber, id", d[sa] = "key", this.databaseInstance.version(1).stores(d);
4399
4427
  }
4400
4428
  async get(o) {
4401
4429
  return this.databaseInstance.table(this.tableName).get(o);
@@ -4404,10 +4432,10 @@ class Ui {
4404
4432
  return this.databaseInstance.table(this.tableName).where({ tagName: o }).toArray();
4405
4433
  }
4406
4434
  get changeLogTable() {
4407
- return this.databaseInstance.table(ia);
4435
+ return this.databaseInstance.table(oa);
4408
4436
  }
4409
4437
  get metaTable() {
4410
- return this.databaseInstance.table(oa);
4438
+ return this.databaseInstance.table(sa);
4411
4439
  }
4412
4440
  async getHead() {
4413
4441
  return (await this.metaTable.get("head"))?.value ?? 0;
@@ -4416,19 +4444,19 @@ class Ui {
4416
4444
  await this.metaTable.put({ key: "head", value: o });
4417
4445
  }
4418
4446
  async commit(o) {
4419
- const { creates: c, updates: a, deletes: f, onProgress: d } = o, g = this.databaseInstance.table(this.tableName), v = c.length + a.length + f.length;
4447
+ const { creates: c, updates: a, deletes: f, onProgress: d } = o, m = this.databaseInstance.table(this.tableName), v = c.length + a.length + f.length;
4420
4448
  let D = 0;
4421
4449
  try {
4422
4450
  await this.databaseInstance.transaction(
4423
4451
  "rw",
4424
- g,
4452
+ m,
4425
4453
  this.changeLogTable,
4426
4454
  this.metaTable,
4427
4455
  async () => {
4428
- const R = a.length > 0 ? await g.bulkGet(a.map((j) => j.id)) : [], q = f.length > 0 ? await g.bulkGet(f) : [];
4456
+ const R = a.length > 0 ? await m.bulkGet(a.map((j) => j.id)) : [], q = f.length > 0 ? await m.bulkGet(f) : [];
4429
4457
  if (c.length > 0)
4430
4458
  try {
4431
- await g.bulkAdd(c), D += c.length, d(D, v);
4459
+ await m.bulkAdd(c), D += c.length, d(D, v);
4432
4460
  } catch (j) {
4433
4461
  const B = this.extractFailedRecordFromError(j, c);
4434
4462
  qe("STORE_BULK_ADD_FAILED", {
@@ -4441,7 +4469,7 @@ class Ui {
4441
4469
  }
4442
4470
  if (a.length > 0)
4443
4471
  try {
4444
- await g.bulkPut(a), D += a.length, d(D, v);
4472
+ await m.bulkPut(a), D += a.length, d(D, v);
4445
4473
  } catch (j) {
4446
4474
  const B = this.extractFailedRecordFromError(j, a);
4447
4475
  qe("STORE_BULK_UPDATE_FAILED", {
@@ -4454,7 +4482,7 @@ class Ui {
4454
4482
  }
4455
4483
  if (f.length > 0)
4456
4484
  try {
4457
- await g.bulkDelete(f), D += f.length, d(D, v);
4485
+ await m.bulkDelete(f), D += f.length, d(D, v);
4458
4486
  } catch (j) {
4459
4487
  qe("STORE_DELETE_FAILED", {
4460
4488
  detail: j instanceof Error ? j.message : String(j),
@@ -4510,8 +4538,8 @@ class Ui {
4510
4538
  return;
4511
4539
  const a = this.databaseInstance.table(this.tableName);
4512
4540
  await this.databaseInstance.transaction("rw", a, this.metaTable, async () => {
4513
- const { creates: f, updates: d, deletes: g } = c.operations;
4514
- f.length > 0 && await a.bulkDelete(f.map((v) => v.id)), d.length > 0 && await a.bulkPut(d.map((v) => v.before)), g.length > 0 && await a.bulkAdd(g), await this.setHead(o - 1);
4541
+ const { creates: f, updates: d, deletes: m } = c.operations;
4542
+ f.length > 0 && await a.bulkDelete(f.map((v) => v.id)), d.length > 0 && await a.bulkPut(d.map((v) => v.before)), m.length > 0 && await a.bulkAdd(m), await this.setHead(o - 1);
4515
4543
  });
4516
4544
  }
4517
4545
  async redo() {
@@ -4520,8 +4548,8 @@ class Ui {
4520
4548
  return;
4521
4549
  const f = this.databaseInstance.table(this.tableName);
4522
4550
  await this.databaseInstance.transaction("rw", f, this.metaTable, async () => {
4523
- const { creates: d, updates: g, deletes: v } = a.operations;
4524
- d.length > 0 && await f.bulkAdd(d), g.length > 0 && await f.bulkPut(g.map((D) => D.after)), v.length > 0 && await f.bulkDelete(v.map((D) => D.id)), await this.setHead(c);
4551
+ const { creates: d, updates: m, deletes: v } = a.operations;
4552
+ d.length > 0 && await f.bulkAdd(d), m.length > 0 && await f.bulkPut(m.map((D) => D.after)), v.length > 0 && await f.bulkDelete(v.map((D) => D.id)), await this.setHead(c);
4525
4553
  });
4526
4554
  }
4527
4555
  async getChangeLog() {
@@ -4537,39 +4565,39 @@ class Ui {
4537
4565
  this.databaseInstance.isOpen() && (this.databaseInstance.close(), await new Promise((o) => setTimeout(o, 20))), await Je.delete(this.databaseInstance.name);
4538
4566
  }
4539
4567
  }
4540
- function Vi(p) {
4541
- const { databaseName: o, dialecteConfig: c } = p, { xmlElements: a, additionalTables: f } = c.database.tables, d = new Je(o), g = {
4568
+ function $i(p) {
4569
+ const { databaseName: o, dialecteConfig: c } = p, { xmlElements: a, additionalTables: f } = c.database.tables, d = new Je(o), m = {
4542
4570
  [a.name]: a.schema
4543
4571
  };
4544
4572
  if (f)
4545
4573
  for (const [v, D] of Object.entries(f))
4546
- g[v] = D.schema;
4547
- return d.version(1).stores(g), d;
4574
+ m[v] = D.schema;
4575
+ return d.version(1).stores(m), d;
4548
4576
  }
4549
- async function Oa(p) {
4577
+ async function Aa(p) {
4550
4578
  const { databaseInstance: o, elementsTableName: c, records: a } = p, f = o.table(c);
4551
4579
  await o.transaction("rw", f, () => f.bulkAdd(a));
4552
4580
  }
4553
- async function Gi(p) {
4581
+ async function Xi(p) {
4554
4582
  const { databaseInstance: o, elementsTableName: c, updates: a } = p;
4555
4583
  if (a.length === 0) return;
4556
4584
  const f = o.table(c);
4557
4585
  await o.transaction("rw", f, async () => {
4558
- for (const { recordId: d, ...g } of a) {
4586
+ for (const { recordId: d, ...m } of a) {
4559
4587
  const v = await f.get(d);
4560
4588
  if (!v) continue;
4561
- const D = { ...g };
4562
- if (g.attributes) {
4589
+ const D = { ...m };
4590
+ if (m.attributes) {
4563
4591
  const R = [...v.attributes];
4564
- for (const q of g.attributes) {
4592
+ for (const q of m.attributes) {
4565
4593
  const Y = R.findIndex((Q) => Q.name === q.name);
4566
4594
  Y >= 0 ? R[Y] = q : R.push(q);
4567
4595
  }
4568
4596
  D.attributes = R;
4569
4597
  }
4570
- if (g.children) {
4598
+ if (m.children) {
4571
4599
  const R = [...v.children];
4572
- for (const q of g.children) {
4600
+ for (const q of m.children) {
4573
4601
  const Y = R.findIndex((Q) => Q.id === q.id);
4574
4602
  Y >= 0 ? R[Y] = q : R.push(q);
4575
4603
  }
@@ -4579,16 +4607,16 @@ async function Gi(p) {
4579
4607
  }
4580
4608
  });
4581
4609
  }
4582
- async function Go(p) {
4610
+ async function Xo(p) {
4583
4611
  const { databaseInstance: o, elementsTableName: c, updates: a } = p;
4584
4612
  if (a.length === 0) return;
4585
4613
  const f = o.table(c);
4586
4614
  await o.transaction("rw", f, async () => {
4587
- for (const { recordId: d, attributes: g } of a) {
4615
+ for (const { recordId: d, attributes: m } of a) {
4588
4616
  const v = await f.get(d);
4589
4617
  if (!v) continue;
4590
4618
  const D = [...v.attributes];
4591
- for (const R of g) {
4619
+ for (const R of m) {
4592
4620
  const q = D.findIndex((Y) => Y.name === R.name);
4593
4621
  q >= 0 ? D[q] = R : D.push(R);
4594
4622
  }
@@ -4596,51 +4624,51 @@ async function Go(p) {
4596
4624
  }
4597
4625
  });
4598
4626
  }
4599
- async function $i(p) {
4627
+ async function Yi(p) {
4600
4628
  const { databaseInstance: o, elementsTableName: c, ids: a } = p;
4601
4629
  if (a.length === 0) return;
4602
4630
  const f = o.table(c);
4603
4631
  await o.transaction("rw", f, () => f.bulkDelete(a));
4604
4632
  }
4605
- async function $o(p) {
4633
+ async function Yo(p) {
4606
4634
  if (await Je.exists(p))
4607
4635
  return await Je.delete(p);
4608
4636
  }
4609
- function Xi(p) {
4637
+ function Wi(p) {
4610
4638
  return "prefix" in p && "uri" in p && !!p.prefix && !!p.uri;
4611
4639
  }
4612
- const Yt = {};
4613
- function Yi(p) {
4640
+ const Wt = {};
4641
+ function zi(p) {
4614
4642
  const { parentId: o, child: c } = p;
4615
- Yt[o] || (Yt[o] = []);
4643
+ Wt[o] || (Wt[o] = []);
4616
4644
  const a = {
4617
4645
  id: c.id,
4618
4646
  tagName: c.tagName
4619
4647
  };
4620
- Yt[o].push(a);
4648
+ Wt[o].push(a);
4621
4649
  }
4622
- function Wi(p) {
4650
+ function Qi(p) {
4623
4651
  const { currentBatch: o } = p, c = [...o];
4624
4652
  for (const [a, f] of c.entries()) {
4625
- const d = Yt[f.id] || [];
4626
- d.length > 0 && (c[a].children.push(...d), zi({
4653
+ const d = Wt[f.id] || [];
4654
+ d.length > 0 && (c[a].children.push(...d), Hi({
4627
4655
  parentId: f.id
4628
4656
  }));
4629
4657
  }
4630
4658
  return c;
4631
4659
  }
4632
- function zi(p) {
4660
+ function Hi(p) {
4633
4661
  const { parentId: o } = p;
4634
- delete Yt[o];
4662
+ delete Wt[o];
4635
4663
  }
4636
4664
  var lr = {};
4637
- const Qi = {}, Hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4665
+ const Zi = {}, Ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4638
4666
  __proto__: null,
4639
- default: Qi
4640
- }, Symbol.toStringTag, { value: "Module" })), Zi = /* @__PURE__ */ Mi(Hi);
4641
- var sa;
4642
- function Ji() {
4643
- return sa || (sa = 1, (function(p) {
4667
+ default: Zi
4668
+ }, Symbol.toStringTag, { value: "Module" })), eo = /* @__PURE__ */ qi(Ji);
4669
+ var ua;
4670
+ function to() {
4671
+ return ua || (ua = 1, (function(p) {
4644
4672
  (function(o) {
4645
4673
  o.parser = function(l, s) {
4646
4674
  return new a(l, s);
@@ -4722,7 +4750,7 @@ function Ji() {
4722
4750
  for (var s = 0, k = c.length; s < k; s++)
4723
4751
  l[c[s]] = "";
4724
4752
  }
4725
- function g(l) {
4753
+ function m(l) {
4726
4754
  Me(l), l.cdata !== "" && (be(l, "oncdata", l.cdata), l.cdata = ""), l.script !== "" && (be(l, "onscript", l.script), l.script = "");
4727
4755
  }
4728
4756
  a.prototype = {
@@ -4737,12 +4765,12 @@ function Ji() {
4737
4765
  return this.write(null);
4738
4766
  },
4739
4767
  flush: function() {
4740
- g(this);
4768
+ m(this);
4741
4769
  }
4742
4770
  };
4743
4771
  var v;
4744
4772
  try {
4745
- v = Zi.Stream;
4773
+ v = eo.Stream;
4746
4774
  } catch {
4747
4775
  v = function() {
4748
4776
  };
@@ -5179,8 +5207,8 @@ function Ji() {
5179
5207
  var s = o.ENTITIES[l], k = typeof s == "number" ? String.fromCharCode(s) : s;
5180
5208
  o.ENTITIES[l] = k;
5181
5209
  });
5182
- for (var It in o.STATE)
5183
- o.STATE[o.STATE[It]] = It;
5210
+ for (var Rt in o.STATE)
5211
+ o.STATE[o.STATE[Rt]] = Rt;
5184
5212
  S = o.STATE;
5185
5213
  function Ue(l, s, k) {
5186
5214
  l[s] && l[s](k);
@@ -5192,14 +5220,14 @@ function Ji() {
5192
5220
  function zt(l) {
5193
5221
  return l ? l.toLowerCase().replace(/[^a-z0-9]/g, "") : null;
5194
5222
  }
5195
- function Rt(l, s) {
5223
+ function kt(l, s) {
5196
5224
  const k = zt(l), E = zt(s);
5197
5225
  return !k || !E ? !0 : E === "utf16" ? k === "utf16le" || k === "utf16be" : k === E;
5198
5226
  }
5199
- function kt(l, s) {
5227
+ function Pt(l, s) {
5200
5228
  if (!(!l.strict || !l.encoding || !s || s.name !== "xml")) {
5201
5229
  var k = We(s.body);
5202
- k && !Rt(l.encoding, k) && ce(
5230
+ k && !kt(l.encoding, k) && ce(
5203
5231
  l,
5204
5232
  "XML declaration encoding " + k + " does not match detected stream encoding " + l.encoding.toUpperCase()
5205
5233
  );
@@ -5466,7 +5494,7 @@ Actual: ` + l.attribValue
5466
5494
  name: s.procInstName,
5467
5495
  body: s.procInstBody
5468
5496
  };
5469
- kt(s, Ne), be(s, "onprocessinginstruction", Ne), s.procInstName = s.procInstBody = "", s.state = S.TEXT;
5497
+ Pt(s, Ne), be(s, "onprocessinginstruction", Ne), s.procInstName = s.procInstBody = "", s.state = S.TEXT;
5470
5498
  } else
5471
5499
  s.procInstBody += "?" + E, s.state = S.PROC_INST_BODY;
5472
5500
  continue;
@@ -5591,15 +5619,15 @@ Actual: ` + l.attribValue
5591
5619
  })(p);
5592
5620
  })(lr)), lr;
5593
5621
  }
5594
- var eo = Ji();
5595
- function to(p) {
5622
+ var no = to();
5623
+ function ro(p) {
5596
5624
  const { dialecteConfig: o, useCustomRecordsIds: c } = p, a = o.io.hooks;
5597
5625
  let d = {
5598
5626
  defaultNamespace: null,
5599
5627
  stack: [],
5600
5628
  recordsBatch: []
5601
5629
  };
5602
- const g = eo.parser(
5630
+ const m = no.parser(
5603
5631
  !0,
5604
5632
  // strict mode
5605
5633
  {
@@ -5615,15 +5643,15 @@ function to(p) {
5615
5643
  // Enable namespace handling
5616
5644
  }
5617
5645
  );
5618
- g.onopentag = (R) => d = no({
5646
+ m.onopentag = (R) => d = ao({
5619
5647
  node: R,
5620
5648
  state: d,
5621
5649
  dialecteConfig: o,
5622
5650
  useCustomRecordsIds: c
5623
- }), g.ontext = (R) => d = ro({ text: R, state: d }), g.onclosetag = () => ({ updatedState: d } = ao({
5651
+ }), m.ontext = (R) => d = io({ text: R, state: d }), m.onclosetag = () => ({ updatedState: d } = oo({
5624
5652
  state: d,
5625
5653
  ioHooks: a
5626
- })), g.onerror = io;
5654
+ })), m.onerror = so;
5627
5655
  function v() {
5628
5656
  const R = d.recordsBatch;
5629
5657
  return d.recordsBatch = [], R;
@@ -5632,24 +5660,24 @@ function to(p) {
5632
5660
  return d.recordsBatch.length;
5633
5661
  }
5634
5662
  return {
5635
- parser: g,
5663
+ parser: m,
5636
5664
  drainBatch: v,
5637
5665
  getSize: D
5638
5666
  };
5639
5667
  }
5640
- function no(p) {
5641
- const { node: o, state: c, dialecteConfig: a, useCustomRecordsIds: f } = p, d = { ...c }, g = oo(o);
5642
- d.defaultNamespace || (d.defaultNamespace = so({
5668
+ function ao(p) {
5669
+ const { node: o, state: c, dialecteConfig: a, useCustomRecordsIds: f } = p, d = { ...c }, m = uo(o);
5670
+ d.defaultNamespace || (d.defaultNamespace = co({
5643
5671
  element: o,
5644
5672
  defaultNamespace: a.namespaces.default,
5645
5673
  rootElementName: a.rootElementName
5646
5674
  }));
5647
- const v = uo(o, d.defaultNamespace), D = fo({ attributes: o.attributes, useCustomRecordsIds: f }), R = ho({
5675
+ const v = lo(o, d.defaultNamespace), D = po({ attributes: o.attributes, useCustomRecordsIds: f }), R = mo({
5648
5676
  attributes: o.attributes,
5649
5677
  useCustomRecordsIds: f
5650
- }), q = co(R), Y = lo(c.stack), Q = {
5678
+ }), q = fo(R), Y = ho(c.stack), Q = {
5651
5679
  id: D,
5652
- tagName: g,
5680
+ tagName: m,
5653
5681
  namespace: v,
5654
5682
  attributes: q,
5655
5683
  value: "",
@@ -5658,11 +5686,11 @@ function no(p) {
5658
5686
  };
5659
5687
  return d.stack.push(Q), d;
5660
5688
  }
5661
- function ro(p) {
5689
+ function io(p) {
5662
5690
  const { text: o, state: c } = p;
5663
5691
  return o && c.stack.length > 0 && (c.stack[c.stack.length - 1].value += o), c;
5664
5692
  }
5665
- function ao(p) {
5693
+ function oo(p) {
5666
5694
  const { state: o, ioHooks: c } = p, a = o.stack.at(-1);
5667
5695
  let f = o.stack.slice(0, -1);
5668
5696
  const d = [...o.recordsBatch];
@@ -5671,9 +5699,9 @@ function ao(p) {
5671
5699
  record: a,
5672
5700
  ancestry: f
5673
5701
  }), f.length) {
5674
- const g = f.length - 1;
5702
+ const m = f.length - 1;
5675
5703
  f = f.map(
5676
- (v, D) => D === g ? {
5704
+ (v, D) => D === m ? {
5677
5705
  ...v,
5678
5706
  children: [
5679
5707
  ...v.children,
@@ -5681,7 +5709,7 @@ function ao(p) {
5681
5709
  ]
5682
5710
  } : v
5683
5711
  );
5684
- } else a.parent && Yi({
5712
+ } else a.parent && zi({
5685
5713
  parentId: a.parent.id,
5686
5714
  child: { id: a.id, tagName: a.tagName }
5687
5715
  });
@@ -5695,13 +5723,13 @@ function ao(p) {
5695
5723
  }
5696
5724
  };
5697
5725
  }
5698
- function io(p) {
5726
+ function so(p) {
5699
5727
  return new Error(`XML parsing error: ${p}`);
5700
5728
  }
5701
- function oo(p) {
5729
+ function uo(p) {
5702
5730
  return p.local;
5703
5731
  }
5704
- function so(p) {
5732
+ function co(p) {
5705
5733
  const { element: o, defaultNamespace: c, rootElementName: a } = p;
5706
5734
  return Ge(o.name === a, {
5707
5735
  detail: `Expected root element <${a}>, got <${o.name}>`
@@ -5710,13 +5738,13 @@ function so(p) {
5710
5738
  uri: o.attributes.xmlns.value
5711
5739
  } : c;
5712
5740
  }
5713
- function uo(p, o) {
5714
- return Xi(p) ? {
5741
+ function lo(p, o) {
5742
+ return Wi(p) ? {
5715
5743
  prefix: p.prefix,
5716
5744
  uri: p.uri
5717
5745
  } : o;
5718
5746
  }
5719
- function co(p) {
5747
+ function fo(p) {
5720
5748
  return p.map((o) => {
5721
5749
  const c = o.prefix && o.uri ? {
5722
5750
  prefix: o.prefix,
@@ -5729,39 +5757,39 @@ function co(p) {
5729
5757
  };
5730
5758
  });
5731
5759
  }
5732
- function lo(p) {
5760
+ function ho(p) {
5733
5761
  if (p.length === 0) return null;
5734
5762
  const o = p[p.length - 1];
5735
5763
  return o ? { id: o.id, tagName: o.tagName } : null;
5736
5764
  }
5737
- function fo(p) {
5738
- const { attributes: o, useCustomRecordsIds: c } = p, a = o[ha];
5765
+ function po(p) {
5766
+ const { attributes: o, useCustomRecordsIds: c } = p, a = o[pa];
5739
5767
  return c && a && a.value ? a.value : crypto.randomUUID();
5740
5768
  }
5741
- function ho(p) {
5769
+ function mo(p) {
5742
5770
  const { attributes: o, useCustomRecordsIds: c } = p;
5743
- return c ? Object.values(o).filter((a) => a.name !== ha) : Object.values(o);
5771
+ return c ? Object.values(o).filter((a) => a.name !== pa) : Object.values(o);
5744
5772
  }
5745
- const ua = {
5773
+ const ca = {
5746
5774
  useBrowserApi: !0,
5747
5775
  chunkSize: 32 * 1024,
5748
5776
  // 32KB
5749
5777
  batchSize: 2e3
5750
5778
  };
5751
- async function Xo(p) {
5779
+ async function Wo(p) {
5752
5780
  const { files: o, dialecteConfig: c, useCustomRecordsIds: a = !1 } = p, f = [];
5753
5781
  if (o.length === 0) throw new Error("No files provided for import.");
5754
- const { importOptions: d = ua, supportedFileExtensions: g } = c.io, v = {
5755
- ...ua,
5782
+ const { importOptions: d = ca, supportedFileExtensions: m } = c.io, v = {
5783
+ ...ca,
5756
5784
  ...d
5757
5785
  };
5758
5786
  for (const D of o) {
5759
- if (!po({ file: D, supportedExtensions: g })) {
5787
+ if (!go({ file: D, supportedExtensions: m })) {
5760
5788
  console.error(`Unsupported file type: ${D.name}`);
5761
5789
  continue;
5762
5790
  }
5763
5791
  D.size === 0 && console.warn(`File is empty: ${D.name}`);
5764
- const R = await go({
5792
+ const R = await vo({
5765
5793
  file: D,
5766
5794
  dialecteConfig: c,
5767
5795
  options: v,
@@ -5771,20 +5799,20 @@ async function Xo(p) {
5771
5799
  }
5772
5800
  return f;
5773
5801
  }
5774
- function po(p) {
5802
+ function go(p) {
5775
5803
  const { file: o, supportedExtensions: c } = p;
5776
5804
  return c.some((a) => o.name.toLowerCase().endsWith(a));
5777
5805
  }
5778
- function mo(p) {
5806
+ function yo(p) {
5779
5807
  return p.name.replace(/\.[^.]+$/, "");
5780
5808
  }
5781
- async function go(p) {
5782
- const { file: o, dialecteConfig: c, options: a, useCustomRecordsIds: f } = p, d = mo(o), g = await Vi({ databaseName: d, dialecteConfig: c });
5809
+ async function vo(p) {
5810
+ const { file: o, dialecteConfig: c, options: a, useCustomRecordsIds: f } = p, d = yo(o), m = await $i({ databaseName: d, dialecteConfig: c });
5783
5811
  try {
5784
5812
  const v = c.database.tables.xmlElements.name;
5785
- if (await g.table(v).clear(), a.useBrowserApi && o.size !== 0 && await yo({
5813
+ if (await m.table(v).clear(), a.useBrowserApi && o.size !== 0 && await bo({
5786
5814
  file: o,
5787
- databaseInstance: g,
5815
+ databaseInstance: m,
5788
5816
  elementsTableName: v,
5789
5817
  dialecteConfig: c,
5790
5818
  options: {
@@ -5794,24 +5822,24 @@ async function go(p) {
5794
5822
  }
5795
5823
  }), c.io.hooks?.afterImport) {
5796
5824
  const { creates: D, updates: R, deletes: q } = await c.io.hooks.afterImport();
5797
- D?.length && await Oa({ databaseInstance: g, elementsTableName: v, records: D }), R?.length && await Gi({ databaseInstance: g, elementsTableName: v, updates: R }), q?.length && await $i({ databaseInstance: g, elementsTableName: v, ids: q });
5825
+ D?.length && await Aa({ databaseInstance: m, elementsTableName: v, records: D }), R?.length && await Xi({ databaseInstance: m, elementsTableName: v, updates: R }), q?.length && await Yi({ databaseInstance: m, elementsTableName: v, ids: q });
5798
5826
  }
5799
5827
  return d;
5800
5828
  } catch (v) {
5801
5829
  throw console.error(`Error importing file ${o.name}:`, v), v;
5802
5830
  } finally {
5803
- g.close();
5831
+ m.close();
5804
5832
  }
5805
5833
  }
5806
- async function yo(p) {
5807
- const { file: o, databaseInstance: c, elementsTableName: a, dialecteConfig: f, options: d } = p, g = o.stream().getReader(), v = to({
5834
+ async function bo(p) {
5835
+ const { file: o, databaseInstance: c, elementsTableName: a, dialecteConfig: f, options: d } = p, m = o.stream().getReader(), v = ro({
5808
5836
  dialecteConfig: f,
5809
5837
  useCustomRecordsIds: d.useCustomRecordsIds
5810
5838
  }), D = new TextDecoder(), R = new Uint8Array(0);
5811
5839
  return await pr({
5812
5840
  databaseInstance: c,
5813
5841
  elementsTableName: a,
5814
- reader: g,
5842
+ reader: m,
5815
5843
  sax: v,
5816
5844
  textDecoder: D,
5817
5845
  buffer: R,
@@ -5819,13 +5847,13 @@ async function yo(p) {
5819
5847
  });
5820
5848
  }
5821
5849
  async function pr(p) {
5822
- const { databaseInstance: o, elementsTableName: c, reader: a, sax: f, textDecoder: d, buffer: g, options: v } = p, { chunkSize: D, batchSize: R } = v, { done: q, value: Y } = await a.read();
5850
+ const { databaseInstance: o, elementsTableName: c, reader: a, sax: f, textDecoder: d, buffer: m, options: v } = p, { chunkSize: D, batchSize: R } = v, { done: q, value: Y } = await a.read();
5823
5851
  if (q) {
5824
- if (g.length > 0) {
5825
- const fe = d.decode(g);
5852
+ if (m.length > 0) {
5853
+ const fe = d.decode(m);
5826
5854
  f.parser.write(fe);
5827
5855
  }
5828
- return f.parser.close(), await ca({
5856
+ return f.parser.close(), await la({
5829
5857
  databaseInstance: o,
5830
5858
  elementsTableName: c,
5831
5859
  sax: f,
@@ -5834,12 +5862,12 @@ async function pr(p) {
5834
5862
  }
5835
5863
  if (!Y)
5836
5864
  return await pr(p);
5837
- let Q = new Uint8Array(g.length + Y.length);
5838
- for (Q.set(g), Q.set(Y, g.length); Q.length >= D; ) {
5865
+ let Q = new Uint8Array(m.length + Y.length);
5866
+ for (Q.set(m), Q.set(Y, m.length); Q.length >= D; ) {
5839
5867
  const fe = Q.slice(0, D);
5840
5868
  Q = Q.slice(D);
5841
5869
  const j = d.decode(fe, { stream: !0 });
5842
- f.parser.write(j), await ca({
5870
+ f.parser.write(j), await la({
5843
5871
  databaseInstance: o,
5844
5872
  elementsTableName: c,
5845
5873
  sax: f,
@@ -5848,23 +5876,23 @@ async function pr(p) {
5848
5876
  }
5849
5877
  return await pr({ ...p, buffer: Q });
5850
5878
  }
5851
- async function ca(p) {
5879
+ async function la(p) {
5852
5880
  const { databaseInstance: o, elementsTableName: c, sax: a, batchSize: f } = p;
5853
5881
  if (a.getSize() >= f) {
5854
- const g = a.drainBatch(), v = Wi({
5855
- currentBatch: g
5882
+ const m = a.drainBatch(), v = Qi({
5883
+ currentBatch: m
5856
5884
  });
5857
- await Oa({
5885
+ await Aa({
5858
5886
  databaseInstance: o,
5859
5887
  elementsTableName: c,
5860
5888
  records: v
5861
5889
  });
5862
5890
  }
5863
5891
  }
5864
- const Aa = "_temp-idb-id";
5865
- var Xt = { exports: {} }, Tn = { exports: {} }, la;
5866
- function vo() {
5867
- return la || (la = 1, (function(p, o) {
5892
+ const Ca = "_temp-idb-id";
5893
+ var Yt = { exports: {} }, Tn = { exports: {} }, fa;
5894
+ function wo() {
5895
+ return fa || (fa = 1, (function(p, o) {
5868
5896
  Object.defineProperty(o, "__esModule", { value: !0 }), o.ParsingError = void 0;
5869
5897
  class c extends Error {
5870
5898
  constructor(H, Z) {
@@ -5879,7 +5907,7 @@ function vo() {
5879
5907
  function d() {
5880
5908
  return B(/\s*/), D(!0) || Y() || R() || v();
5881
5909
  }
5882
- function g() {
5910
+ function m() {
5883
5911
  const te = v(), H = [];
5884
5912
  let Z, de = d();
5885
5913
  for (; de; ) {
@@ -6039,19 +6067,19 @@ function vo() {
6039
6067
  return a = {
6040
6068
  xml: te,
6041
6069
  options: Object.assign(Object.assign({}, H), { filter: Z, strictMode: H.strictMode === !0 })
6042
- }, g();
6070
+ }, m();
6043
6071
  }
6044
6072
  p.exports = Te, o.default = Te;
6045
6073
  })(Tn, Tn.exports)), Tn.exports;
6046
6074
  }
6047
- var fa = Xt.exports, da;
6048
- function bo() {
6049
- return da || (da = 1, (function(p, o) {
6050
- var c = fa && fa.__importDefault || function(j) {
6075
+ var da = Yt.exports, ha;
6076
+ function _o() {
6077
+ return ha || (ha = 1, (function(p, o) {
6078
+ var c = da && da.__importDefault || function(j) {
6051
6079
  return j && j.__esModule ? j : { default: j };
6052
6080
  };
6053
6081
  Object.defineProperty(o, "__esModule", { value: !0 });
6054
- const a = c(/* @__PURE__ */ vo());
6082
+ const a = c(/* @__PURE__ */ wo());
6055
6083
  function f(j) {
6056
6084
  if (!j.options.indentation && !j.options.lineSeparator)
6057
6085
  return;
@@ -6066,7 +6094,7 @@ function bo() {
6066
6094
  for (B = 0; B < j.level; B++)
6067
6095
  j.content += j.options.indentation;
6068
6096
  }
6069
- function g(j, B) {
6097
+ function m(j, B) {
6070
6098
  j.content += B;
6071
6099
  }
6072
6100
  function v(j, B, ue) {
@@ -6084,21 +6112,21 @@ function bo() {
6084
6112
  const ie = j.trim();
6085
6113
  (B.options.lineSeparator || ie.length === 0) && (j = ie);
6086
6114
  }
6087
- j.length > 0 && (!ue && B.content.length > 0 && f(B), g(B, j));
6115
+ j.length > 0 && (!ue && B.content.length > 0 && f(B), m(B, j));
6088
6116
  }
6089
6117
  function R(j, B) {
6090
6118
  const ue = "/" + j.join("/"), ie = j[j.length - 1];
6091
6119
  return B.includes(ie) || B.includes(ue);
6092
6120
  }
6093
6121
  function q(j, B, ue) {
6094
- if (B.path.push(j.name), !ue && B.content.length > 0 && f(B), g(B, "<" + j.name), Y(B, j.attributes), j.children === null || B.options.forceSelfClosingEmptyTag && j.children.length === 0) {
6122
+ if (B.path.push(j.name), !ue && B.content.length > 0 && f(B), m(B, "<" + j.name), Y(B, j.attributes), j.children === null || B.options.forceSelfClosingEmptyTag && j.children.length === 0) {
6095
6123
  const ie = B.options.whiteSpaceAtEndOfSelfclosingTag ? " />" : "/>";
6096
- g(B, ie);
6124
+ m(B, ie);
6097
6125
  } else if (j.children.length === 0)
6098
- g(B, "></" + j.name + ">");
6126
+ m(B, "></" + j.name + ">");
6099
6127
  else {
6100
6128
  const ie = j.children;
6101
- g(B, ">"), B.level++;
6129
+ m(B, ">"), B.level++;
6102
6130
  let Te = j.attributes["xml:space"] === "preserve" || ue, te = !1;
6103
6131
  if (!Te && B.options.ignoredPaths && (te = R(B.path, B.options.ignoredPaths), Te = te), !Te && B.options.collapseContent) {
6104
6132
  let H = !1, Z = !1, de = !1;
@@ -6109,7 +6137,7 @@ function bo() {
6109
6137
  }
6110
6138
  ie.forEach(function(H) {
6111
6139
  v(H, B, ue || Te);
6112
- }), B.level--, !ue && !Te && f(B), te && d(B), g(B, "</" + j.name + ">");
6140
+ }), B.level--, !ue && !Te && f(B), te && d(B), m(B, "</" + j.name + ">");
6113
6141
  }
6114
6142
  B.path.pop();
6115
6143
  }
@@ -6117,15 +6145,15 @@ function bo() {
6117
6145
  Object.keys(B).forEach(function(ue) {
6118
6146
  if (j.options.attributeQuotes === "single") {
6119
6147
  const ie = B[ue].replace(/'/g, "&apos;");
6120
- g(j, " " + ue + "='" + ie + "'");
6148
+ m(j, " " + ue + "='" + ie + "'");
6121
6149
  } else {
6122
6150
  const ie = B[ue].replace(/"/g, "&quot;");
6123
- g(j, " " + ue + '="' + ie + '"');
6151
+ m(j, " " + ue + '="' + ie + '"');
6124
6152
  }
6125
6153
  });
6126
6154
  }
6127
6155
  function Q(j, B) {
6128
- B.content.length > 0 && f(B), g(B, "<?" + j.name), g(B, " " + j.content.trim()), g(B, "?>");
6156
+ B.content.length > 0 && f(B), m(B, "<?" + j.name), m(B, " " + j.content.trim()), m(B, "?>");
6129
6157
  }
6130
6158
  function fe(j, B = {}) {
6131
6159
  B.indentation = "indentation" in B ? B.indentation : " ", B.collapseContent = B.collapseContent === !0, B.lineSeparator = "lineSeparator" in B ? B.lineSeparator : `\r
@@ -6143,16 +6171,16 @@ function bo() {
6143
6171
  }
6144
6172
  }
6145
6173
  fe.minify = (j, B = {}) => fe(j, Object.assign(Object.assign({}, B), { indentation: "", lineSeparator: "" })), p.exports = fe, o.default = fe;
6146
- })(Xt, Xt.exports)), Xt.exports;
6174
+ })(Yt, Yt.exports)), Yt.exports;
6147
6175
  }
6148
- var wo = /* @__PURE__ */ bo();
6149
- const _o = /* @__PURE__ */ Na(wo);
6150
- function Eo(p) {
6151
- return _o(p);
6176
+ var Eo = /* @__PURE__ */ _o();
6177
+ const xo = /* @__PURE__ */ Oa(Eo);
6178
+ function To(p) {
6179
+ return xo(p);
6152
6180
  }
6153
- async function xo(p) {
6181
+ async function No(p) {
6154
6182
  const { extension: o, xmlDocument: c, filename: a } = p, v = `<?xml version="1.0" encoding="UTF-8"?>
6155
- ` + new XMLSerializer().serializeToString(c), D = Eo(v), R = new Blob([D], { type: "application/xml" });
6183
+ ` + new XMLSerializer().serializeToString(c), D = To(v), R = new Blob([D], { type: "application/xml" });
6156
6184
  if ("showSaveFilePicker" in window)
6157
6185
  try {
6158
6186
  const Y = await (await window.showSaveFilePicker({
@@ -6173,49 +6201,49 @@ async function xo(p) {
6173
6201
  Y.href = q, Y.download = a, document.body.appendChild(Y), Y.click(), Y.remove(), URL.revokeObjectURL(q);
6174
6202
  }
6175
6203
  }
6176
- async function Yo(p) {
6204
+ async function zo(p) {
6177
6205
  const {
6178
6206
  dialecteConfig: o,
6179
6207
  databaseName: c,
6180
6208
  extension: a,
6181
6209
  withDownload: f = !1,
6182
6210
  withDatabaseIds: d = !1
6183
- } = p, g = await To({
6211
+ } = p, m = await Oo({
6184
6212
  databaseName: c,
6185
6213
  extension: a,
6186
6214
  dialecteConfig: o,
6187
6215
  withDatabaseIds: d
6188
6216
  });
6189
- return f && await xo({
6217
+ return f && await No({
6190
6218
  extension: a,
6191
- xmlDocument: g.xmlDocument,
6192
- filename: g.filename
6193
- }), g;
6219
+ xmlDocument: m.xmlDocument,
6220
+ filename: m.filename
6221
+ }), m;
6194
6222
  }
6195
- async function To(p) {
6223
+ async function Oo(p) {
6196
6224
  const { databaseName: o, extension: c = "xml", dialecteConfig: a, withDatabaseIds: f } = p, d = new Je(o);
6197
6225
  await d.open();
6198
6226
  try {
6199
- const g = await No({
6227
+ const m = await Ao({
6200
6228
  databaseInstance: d,
6201
6229
  dialecteConfig: a,
6202
6230
  withDatabaseIds: f
6203
6231
  });
6204
- if (!g)
6232
+ if (!m)
6205
6233
  throw new Error("Failed to rebuild XML document from IndexedDB.");
6206
6234
  return {
6207
- xmlDocument: g,
6235
+ xmlDocument: m,
6208
6236
  filename: d.name + c
6209
6237
  };
6210
6238
  } finally {
6211
6239
  d.close();
6212
6240
  }
6213
6241
  }
6214
- async function No(p) {
6215
- const { databaseInstance: o, dialecteConfig: c, withDatabaseIds: a } = p, { useBrowserApi: f = !0 } = c.io.exportOptions ?? { useBrowserApi: !0 }, d = c.rootElementName, g = c.namespaces.default, v = c.database.tables.xmlElements.name;
6242
+ async function Ao(p) {
6243
+ const { databaseInstance: o, dialecteConfig: c, withDatabaseIds: a } = p, { useBrowserApi: f = !0 } = c.io.exportOptions ?? { useBrowserApi: !0 }, d = c.rootElementName, m = c.namespaces.default, v = c.database.tables.xmlElements.name;
6216
6244
  if (f) {
6217
6245
  const D = document.implementation.createDocument(
6218
- g.uri,
6246
+ m.uri,
6219
6247
  null,
6220
6248
  null
6221
6249
  ), R = await o.table(v).where({ tagName: d }).first();
@@ -6224,14 +6252,14 @@ async function No(p) {
6224
6252
  R.namespace.uri,
6225
6253
  R.tagName
6226
6254
  );
6227
- return q.setAttribute("xmlns", R.namespace.uri), R.attributes && Da({
6255
+ return q.setAttribute("xmlns", R.namespace.uri), R.attributes && Sa({
6228
6256
  dialecteConfig: c,
6229
6257
  document: D,
6230
6258
  element: q,
6231
6259
  attributes: R.attributes,
6232
6260
  tagName: R.tagName,
6233
6261
  isRoot: !0
6234
- }), Ia({ dialecteConfig: c, rootElement: q, namespace: R.namespace }), R.value && (q.textContent = R.value.trim()), a && q.setAttribute(Aa, R.id), D.appendChild(q), await Ca({
6262
+ }), Ra({ dialecteConfig: c, rootElement: q, namespace: R.namespace }), R.value && (q.textContent = R.value.trim()), a && q.setAttribute(Ca, R.id), D.appendChild(q), await Da({
6235
6263
  databaseInstance: o,
6236
6264
  dialecteConfig: c,
6237
6265
  elementsTableName: v,
@@ -6242,36 +6270,36 @@ async function No(p) {
6242
6270
  });
6243
6271
  }
6244
6272
  }
6245
- async function Ca(p) {
6273
+ async function Da(p) {
6246
6274
  const {
6247
6275
  databaseInstance: o,
6248
6276
  dialecteConfig: c,
6249
6277
  elementsTableName: a,
6250
6278
  withDatabaseIds: f,
6251
6279
  xmlDocument: d,
6252
- databaseRecord: g,
6280
+ databaseRecord: m,
6253
6281
  parentDomElement: v
6254
6282
  } = p;
6255
- if (!g.children) return;
6256
- const D = g.children.map((Q) => Q.id), q = await o.table(a).bulkGet(D);
6257
- Co({
6283
+ if (!m.children) return;
6284
+ const D = m.children.map((Q) => Q.id), q = await o.table(a).bulkGet(D);
6285
+ So({
6258
6286
  childrenRecords: q,
6259
- parentRecord: g
6287
+ parentRecord: m
6260
6288
  });
6261
- const Y = Ao({
6262
- parentTagName: g.tagName,
6289
+ const Y = Do({
6290
+ parentTagName: m.tagName,
6263
6291
  availableChildren: c.children,
6264
6292
  childrenRecords: q
6265
6293
  });
6266
6294
  for (const Q of Y) {
6267
- const fe = Oo({
6295
+ const fe = Co({
6268
6296
  dialecteConfig: c,
6269
6297
  document: d,
6270
6298
  record: Q,
6271
6299
  defaultNamespace: c.namespaces.default,
6272
6300
  withDatabaseIds: f
6273
6301
  });
6274
- v.appendChild(fe), await Ca({
6302
+ v.appendChild(fe), await Da({
6275
6303
  databaseInstance: o,
6276
6304
  dialecteConfig: c,
6277
6305
  elementsTableName: a,
@@ -6283,36 +6311,36 @@ async function Ca(p) {
6283
6311
  }
6284
6312
  return p.xmlDocument;
6285
6313
  }
6286
- function Oo(p) {
6314
+ function Co(p) {
6287
6315
  const { dialecteConfig: o, document: c, record: a, defaultNamespace: f, withDatabaseIds: d } = p;
6288
- let g;
6289
- return !(a.namespace.uri === f.uri) && a.namespace.prefix && a.namespace.prefix !== "xmlns" ? (Sa({
6316
+ let m;
6317
+ return !(a.namespace.uri === f.uri) && a.namespace.prefix && a.namespace.prefix !== "xmlns" ? (Ia({
6290
6318
  dialecteConfig: o,
6291
6319
  document: c,
6292
6320
  namespace: a.namespace
6293
- }), g = c.createElementNS(
6321
+ }), m = c.createElementNS(
6294
6322
  a.namespace.uri,
6295
6323
  `${a.namespace.prefix}:${a.tagName}`
6296
- )) : g = c.createElementNS(a.namespace.uri, a.tagName), a.attributes && Da({
6324
+ )) : m = c.createElementNS(a.namespace.uri, a.tagName), a.attributes && Sa({
6297
6325
  dialecteConfig: o,
6298
6326
  document: c,
6299
- element: g,
6327
+ element: m,
6300
6328
  attributes: a.attributes,
6301
6329
  tagName: a.tagName,
6302
6330
  isRoot: !1
6303
- }), a.value && (g.textContent = a.value.trim()), d && g.setAttribute(Aa, a.id), g;
6331
+ }), a.value && (m.textContent = a.value.trim()), d && m.setAttribute(Ca, a.id), m;
6304
6332
  }
6305
- function Da(p) {
6306
- const { dialecteConfig: o, document: c, element: a, attributes: f, tagName: d, isRoot: g } = p;
6333
+ function Sa(p) {
6334
+ const { dialecteConfig: o, document: c, element: a, attributes: f, tagName: d, isRoot: m } = p;
6307
6335
  for (const v of f)
6308
- if (!Do(v) && !(!g && So({ dialecteConfig: o, tagName: d, attribute: v })))
6309
- if (Ra(v)) {
6336
+ if (!Io(v) && !(!m && Ro({ dialecteConfig: o, tagName: d, attribute: v })))
6337
+ if (ka(v)) {
6310
6338
  const D = v.namespace?.prefix || "";
6311
6339
  if (!D) {
6312
6340
  a.setAttribute(v.name, String(v.value));
6313
6341
  continue;
6314
6342
  }
6315
- g || Sa({
6343
+ m || Ia({
6316
6344
  dialecteConfig: o,
6317
6345
  document: c,
6318
6346
  namespace: v.namespace
@@ -6321,19 +6349,19 @@ function Da(p) {
6321
6349
  a.setAttributeNS(v.namespace.uri, q, String(v.value));
6322
6350
  } else a.setAttribute(v.name, String(v.value));
6323
6351
  }
6324
- function Sa(p) {
6352
+ function Ia(p) {
6325
6353
  const { dialecteConfig: o, document: c, namespace: a } = p, f = c.documentElement;
6326
6354
  if (!f || !a.prefix || a.prefix === "xmlns") return;
6327
6355
  const d = "http://www.w3.org/2000/xmlns/";
6328
- f.getAttributeNS(d, a.prefix) === null && (f.setAttributeNS(d, `xmlns:${a.prefix}`, a.uri), Ia({ dialecteConfig: o, rootElement: f, namespace: a }));
6356
+ f.getAttributeNS(d, a.prefix) === null && (f.setAttributeNS(d, `xmlns:${a.prefix}`, a.uri), Ra({ dialecteConfig: o, rootElement: f, namespace: a }));
6329
6357
  }
6330
- function Ia(p) {
6358
+ function Ra(p) {
6331
6359
  const { dialecteConfig: o, rootElement: c, namespace: a } = p, f = Object.entries(
6332
6360
  o.definition[o.rootElementName].attributes.details
6333
- ).filter(([g, v]) => a.uri === o.namespaces.default.uri ? !v.namespace : v.namespace?.prefix === a.prefix && v.namespace?.uri === a.uri);
6361
+ ).filter(([m, v]) => a.uri === o.namespaces.default.uri ? !v.namespace : v.namespace?.prefix === a.prefix && v.namespace?.uri === a.uri);
6334
6362
  if (f.length > 0)
6335
- for (const [g, v] of f) {
6336
- const D = g.includes(":") && g.split(":").pop() || g;
6363
+ for (const [m, v] of f) {
6364
+ const D = m.includes(":") && m.split(":").pop() || m;
6337
6365
  if (!(v.namespace ? c.hasAttributeNS(v.namespace.uri, D) : c.hasAttribute(D)))
6338
6366
  if (v.namespace) {
6339
6367
  const q = `${v.namespace.prefix}:${D}`;
@@ -6342,39 +6370,39 @@ function Ia(p) {
6342
6370
  c.setAttribute(D, v.default || "");
6343
6371
  }
6344
6372
  }
6345
- function Ao(p) {
6373
+ function Do(p) {
6346
6374
  const { parentTagName: o, availableChildren: c, childrenRecords: a } = p, f = [], d = new Set(c[o]);
6347
6375
  if (!d.size) return a;
6348
- const g = /* @__PURE__ */ new Map(), v = [];
6376
+ const m = /* @__PURE__ */ new Map(), v = [];
6349
6377
  for (const D of d)
6350
- g.set(D, []);
6378
+ m.set(D, []);
6351
6379
  for (const D of a)
6352
- d.has(D.tagName) ? g.get(D.tagName)?.push(D) : v.push(D);
6380
+ d.has(D.tagName) ? m.get(D.tagName)?.push(D) : v.push(D);
6353
6381
  for (const D of d) {
6354
- const R = g.get(D);
6382
+ const R = m.get(D);
6355
6383
  R && R.length && f.push(...R);
6356
6384
  }
6357
6385
  return f.push(...v), f;
6358
6386
  }
6359
- function Co(p) {
6387
+ function So(p) {
6360
6388
  const { childrenRecords: o, parentRecord: c } = p, a = o.map((f, d) => f === void 0 ? d : -1).filter((f) => f !== -1);
6361
6389
  if (a.length > 0) {
6362
6390
  const f = a.map((d) => {
6363
- const g = c.children[d];
6364
- return `'${g.tagName}' (id: ${g.id})`;
6391
+ const m = c.children[d];
6392
+ return `'${m.tagName}' (id: ${m.id})`;
6365
6393
  });
6366
6394
  throw new Error(
6367
6395
  `Database corruption detected: Parent element '${c.tagName}' (id: ${c.id}) references ${a.length} non-existent child record(s): ${f.join(", ")}`
6368
6396
  );
6369
6397
  }
6370
6398
  }
6371
- function Ra(p) {
6399
+ function ka(p) {
6372
6400
  return p !== null && typeof p == "object" && "namespace" in p && !!p.namespace;
6373
6401
  }
6374
- function Do(p) {
6375
- return !!(p.name === "xmlns" || p.name.startsWith("xmlns:") || Ra(p) && p.namespace?.prefix === "xmlns");
6402
+ function Io(p) {
6403
+ return !!(p.name === "xmlns" || p.name.startsWith("xmlns:") || ka(p) && p.namespace?.prefix === "xmlns");
6376
6404
  }
6377
- function So(p) {
6405
+ function Ro(p) {
6378
6406
  const { dialecteConfig: o, tagName: c, attribute: a } = p;
6379
6407
  if (!o.elements.includes(c)) return !1;
6380
6408
  const f = o.definition[c];
@@ -6382,17 +6410,17 @@ function So(p) {
6382
6410
  const d = f.attributes.details[a.name];
6383
6411
  return !(!d || d.required || d.default === void 0 || String(a.value) !== d.default || f.attributes.identityFields?.includes(a.name));
6384
6412
  }
6385
- function Wo(p) {
6386
- const { config: o, storage: c, extensions: a, hooks: f } = p, d = pa({ base: a?.base, custom: a?.custom }), g = ka(c, o);
6387
- return new Ta(g, o, d, f);
6413
+ function Qo(p) {
6414
+ const { config: o, storage: c, extensions: a, hooks: f } = p, d = ma({ base: a?.base, custom: a?.custom }), m = Pa(c, o);
6415
+ return new Na(m, o, d, f);
6388
6416
  }
6389
- async function zo(p) {
6390
- const { config: o, storage: c, extensions: a, hooks: f } = p, d = pa({ base: a?.base, custom: a?.custom }), g = ka(c, o), v = o.definition[o.rootElementName], D = Object.entries(v?.attributes.details ?? {}).filter(([, R]) => R.required).map(([R, q]) => ({
6417
+ async function Ho(p) {
6418
+ const { config: o, storage: c, extensions: a, hooks: f } = p, d = ma({ base: a?.base, custom: a?.custom }), m = Pa(c, o), v = o.definition[o.rootElementName], D = Object.entries(v?.attributes.details ?? {}).filter(([, R]) => R.required).map(([R, q]) => ({
6391
6419
  name: R,
6392
6420
  value: q.fixed ?? q.default ?? "",
6393
6421
  ...q.namespace ? { namespace: q.namespace } : {}
6394
6422
  }));
6395
- return await g.commit({
6423
+ return await m.commit({
6396
6424
  creates: [
6397
6425
  {
6398
6426
  id: crypto.randomUUID(),
@@ -6408,43 +6436,43 @@ async function zo(p) {
6408
6436
  deletes: [],
6409
6437
  onProgress: () => {
6410
6438
  }
6411
- }), new Ta(g, o, d, f);
6439
+ }), new Na(m, o, d, f);
6412
6440
  }
6413
- function ka(p, o) {
6414
- return p.type === "local" ? new Ui(p.databaseName, o) : p.store;
6441
+ function Pa(p, o) {
6442
+ return p.type === "local" ? new Gi(p.databaseName, o) : p.store;
6415
6443
  }
6416
6444
  export {
6417
- yi as A,
6418
- po as B,
6419
- $t as C,
6420
- Ui as D,
6421
- Wt as E,
6422
- _a as Q,
6423
- Aa as T,
6424
- Ta as a,
6425
- Bi as b,
6426
- Oa as c,
6427
- $i as d,
6428
- Yo as e,
6429
- Go as f,
6430
- Gi as g,
6431
- zo as h,
6432
- Xo as i,
6433
- $o as j,
6434
- fi as k,
6435
- ga as l,
6436
- Qr as m,
6437
- Eo as n,
6438
- Wo as o,
6439
- Jr as p,
6440
- ea as q,
6441
- ta as r,
6442
- na as s,
6443
- ci as t,
6444
- li as u,
6445
- mo as v,
6445
+ bi as A,
6446
+ go as B,
6447
+ Xt as C,
6448
+ Gi as D,
6449
+ It as E,
6450
+ Ea as Q,
6451
+ Ca as T,
6452
+ Na as a,
6453
+ Mi as b,
6454
+ Aa as c,
6455
+ Yi as d,
6456
+ zo as e,
6457
+ Xo as f,
6458
+ Xi as g,
6459
+ Ho as h,
6460
+ Wo as i,
6461
+ Yo as j,
6462
+ di as k,
6463
+ ya as l,
6464
+ Hr as m,
6465
+ To as n,
6466
+ Qo as o,
6467
+ ea as p,
6468
+ ta as q,
6469
+ na as r,
6470
+ ra as s,
6471
+ li as t,
6472
+ fi as u,
6473
+ yo as v,
6446
6474
  ve as w,
6447
- _o as x,
6448
- ma as y,
6475
+ xo as x,
6476
+ ga as y,
6449
6477
  mr as z
6450
6478
  };