@sheetxl/studio-mui 0.4.9 → 0.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/browser/cjs/B29yIlf_FSHx9q3M.cjs +7 -0
  2. package/browser/cjs/B783moVfFT70yQuK.cjs +7 -0
  3. package/browser/cjs/BCtVyhxIZSUPH_Z4.cjs +7 -0
  4. package/browser/cjs/BE6O6K7i1mHBC3et.cjs +7 -0
  5. package/browser/cjs/BQ-G2ABc3FYN-D50.cjs +7 -0
  6. package/browser/cjs/BabvaPi1dUIPt5AG.cjs +7 -0
  7. package/browser/cjs/BbvcxaJzfy7H6xfa.cjs +7 -0
  8. package/browser/cjs/Bhh0dqxUzzOzHWMc.cjs +7 -0
  9. package/browser/cjs/CH50hiw_7LBSC6dR.cjs +7 -0
  10. package/browser/cjs/Cfb0T6htsh82UPK-.cjs +7 -0
  11. package/browser/cjs/CisYglNTHGrj9oMH.cjs +7 -0
  12. package/browser/cjs/Clbakb5VUTDTlofM.cjs +7 -0
  13. package/browser/cjs/D7xmeRe-f7IifEKc.cjs +7 -0
  14. package/browser/cjs/DCV-6w2JGk_faE3x.cjs +7 -0
  15. package/browser/cjs/DY2PuDSgw0TrB5-_.cjs +7 -0
  16. package/browser/cjs/Df5v6knUJ4dqHmmo.cjs +7 -0
  17. package/browser/cjs/DyzVC_iq7ceqC2fj.cjs +7 -0
  18. package/browser/cjs/QB_8kWYEsfOH_HwK.cjs +7 -0
  19. package/browser/cjs/aOmlMJRAkQEF59EX.cjs +7 -0
  20. package/browser/cjs/index.cjs +10 -4
  21. package/browser/cjs/li-J7BWV6WUzY5aq.cjs +7 -0
  22. package/browser/cjs/u0WmWLGlCwhnhL9i.cjs +7 -0
  23. package/browser/cjs/uoBAuXnlUz8scSA1.cjs +7 -0
  24. package/browser/cjs/xp2ZII-PuLk9tHK3.cjs +7 -0
  25. package/browser/cjs/xq-CJbsvm7BQO8lK.cjs +7 -0
  26. package/browser/esm/12Ttun7hzbiInyVr.mjs +7 -0
  27. package/browser/esm/7jSMnphGrNRPUa_S.mjs +7 -0
  28. package/browser/esm/AnCmK-idMDJ2vI8H.mjs +7 -0
  29. package/browser/esm/B-Ut_yUCD9THCz0T.mjs +7 -0
  30. package/browser/esm/BTD5k7gtFcqDwslB.mjs +7 -0
  31. package/browser/esm/BVRUNnRvnt7aVCDD.mjs +7 -0
  32. package/browser/esm/BauTkiamxm0HDt6M.mjs +7 -0
  33. package/browser/esm/BcIp2mxLBfjUBE0q.mjs +7 -0
  34. package/browser/esm/Bi_0z0hyhFuz5Ta3.mjs +7 -0
  35. package/browser/esm/BkDEdK7zOlsoUKCZ.mjs +7 -0
  36. package/browser/esm/BpGexBYtmHbTIJz2.mjs +7 -0
  37. package/browser/esm/CJawFB555VEY-Vge.mjs +7 -0
  38. package/browser/esm/CWogLlWYHiL4W6CH.mjs +7 -0
  39. package/browser/esm/Cr46Bo9bGoz0LbWq.mjs +7 -0
  40. package/browser/esm/Csk8rXNpaXmf5g7O.mjs +7 -0
  41. package/browser/esm/Cu-5HDPN8B0qE77-.mjs +7 -0
  42. package/browser/esm/CzgR8PxJ_89IC4Mr.mjs +7 -0
  43. package/browser/esm/DMUXpRbV3ahdB1lN.mjs +7 -0
  44. package/browser/esm/DiIX5KzrWnbDWjGE.mjs +7 -0
  45. package/browser/esm/Djo2IS-ivmVSrO3v.mjs +7 -0
  46. package/browser/esm/Hy95ExHvIFgzxQb-.mjs +7 -0
  47. package/browser/esm/Z1_72ZY8rW2Mc3g_.mjs +7 -0
  48. package/browser/esm/_ZR9nT54xwy-C6ow.mjs +7 -0
  49. package/browser/esm/csxyptiqbJZO0pQA.mjs +7 -0
  50. package/browser/esm/index.mjs +8 -82
  51. package/licenses/dependencies.txt +145 -145
  52. package/node/esm/{CsbP0EYKOHobzZCu.mjs → 8THCZRGNmI2nPqMR.mjs} +2 -2
  53. package/node/esm/{CGiJgZJFY-YsXWCX.mjs → BDm0y2dv7wLZhYj1.mjs} +1 -1
  54. package/node/esm/{CijBL1IDWaxPgQ_E.mjs → BPylexVHXa-t0sqJ.mjs} +6 -6
  55. package/node/esm/{B7xzqWxB07TdXnmo.mjs → BQYQg7lfqFbWaf8x.mjs} +2 -2
  56. package/node/esm/{BUVA6vYXyFFnBCMg.mjs → BSUbQzac78SXiAJe.mjs} +1 -1
  57. package/node/esm/{qewbqty13W1sKrMC.mjs → BeNXnrWMr5S34Oxb.mjs} +1 -1
  58. package/node/esm/{BfuG4JD3t3n1uOci.mjs → C6jxZQrvMLctjLZM.mjs} +4 -4
  59. package/node/esm/{Dn38s6pH3QNvdk-x.mjs → CCZepFZNn1pIXrnd.mjs} +1 -1
  60. package/node/esm/{9iDXWtTOWeDVslQL.mjs → CXSwyUs6BuNGCic0.mjs} +13 -13
  61. package/node/esm/{Dq49h62ihEYk_8VR.mjs → CaV6SH-PMyHlXUhx.mjs} +1 -1
  62. package/node/esm/{B18g9zjzyR9YL3Mv.mjs → D481dAOp77EZbV5s.mjs} +2 -2
  63. package/node/esm/{DWKLdf_rn5dajRBA.mjs → DHj9iDuBImdwscIb.mjs} +25 -25
  64. package/node/esm/{uY021f9cZSWYX0--.mjs → DIGsHHDexzj0uG_T.mjs} +5 -5
  65. package/node/esm/{Cr5l_3AqPbv4mke9.mjs → DLiw-2C_tqGgJIQ6.mjs} +2 -2
  66. package/node/esm/{CG1T0Z1roNRSVlal.mjs → DNJVdt9TbBsUE8Jm.mjs} +1 -1
  67. package/node/esm/{DGTK2YeARR5cTnft.mjs → DaCmut490aSCGvX8.mjs} +1 -1
  68. package/node/esm/{C7t1ZHhSDgJnZ4Da.mjs → Dd2OFQJQyYp6bAeP.mjs} +1 -1
  69. package/node/esm/{DHmVr6jRLzt6lD1x.mjs → DkpAjhQeaZn_Ipxg.mjs} +2 -2
  70. package/node/esm/{DODhKM0Qeycx3Hvp.mjs → DyMCnCG9LzH5Mgw0.mjs} +2 -2
  71. package/node/esm/{v4fR5lIq2IqY_Clq.mjs → RV-AvxVzzFKWjYFM.mjs} +38 -38
  72. package/node/esm/{tur4cwLbnCn69JK-.mjs → Ui3_6RhrEZQDOXwg.mjs} +8 -8
  73. package/node/esm/index.mjs +5373 -5075
  74. package/node/esm/{CILOMzOF30-XSZqR.mjs → qI75rORek8T0-Kpf.mjs} +2 -2
  75. package/package.json +8 -8
  76. package/types/index.d.ts +24 -0
  77. package/browser/cjs/02LSJ7jnb-ovS7ex.cjs +0 -15
  78. package/browser/cjs/BDDJIe6JwgEYEtda.cjs +0 -6
  79. package/browser/cjs/BGh6tEDK_1MFKfMU.cjs +0 -145
  80. package/browser/cjs/BSRDKlVOTYHfOAF_.cjs +0 -11
  81. package/browser/cjs/Bn0BSzVk_S-rvDwk.cjs +0 -6
  82. package/browser/cjs/Bzf8jKmmZl374mof.cjs +0 -6
  83. package/browser/cjs/C20NTPRE5_ExESDZ.cjs +0 -6
  84. package/browser/cjs/C5i9hklL-WNb8J_q.cjs +0 -42
  85. package/browser/cjs/CLxYxjd0yz1LCTB-.cjs +0 -6
  86. package/browser/cjs/CUo2iW5IL6UZJNWT.cjs +0 -6
  87. package/browser/cjs/C_QWbWVBVc6YJ4Q3.cjs +0 -16
  88. package/browser/cjs/CeeZxww7wpF45vvp.cjs +0 -6
  89. package/browser/cjs/CekKZCV1J1HUFIqO.cjs +0 -6
  90. package/browser/cjs/CgD0b2zJD8zElhuz.cjs +0 -6
  91. package/browser/cjs/CqwEnIUDMxWw5DX1.cjs +0 -87
  92. package/browser/cjs/CwOKyPq_H2afJacv.cjs +0 -7
  93. package/browser/cjs/D32t9wiFoNX7WVEo.cjs +0 -161
  94. package/browser/cjs/DILF3GzsMdg-Y2wu.cjs +0 -11
  95. package/browser/cjs/Dr-PR7J1T91UjrPL.cjs +0 -12
  96. package/browser/cjs/DyR0_iZAINpjodWL.cjs +0 -12
  97. package/browser/cjs/LWuNxqu9MyiniH_g.cjs +0 -18
  98. package/browser/cjs/O8r9K4Qh6Pgd6rXU.cjs +0 -7
  99. package/browser/cjs/jbTHHxJODyD10jVH.cjs +0 -6
  100. package/browser/cjs/n-4XaX3pkXUEEQ5u.cjs +0 -6
  101. package/browser/cjs/qQGaIq5VhlZJU-xf.cjs +0 -6
  102. package/browser/esm/AmErN6xXU01K_bEs.mjs +0 -3803
  103. package/browser/esm/B08nVBuOXar7x7in.mjs +0 -1703
  104. package/browser/esm/B8xKZIF9fvamlvW5.mjs +0 -1467
  105. package/browser/esm/BGWd79IfMfoHoO6g.mjs +0 -392
  106. package/browser/esm/BT8vduOS21nsJ6EQ.mjs +0 -1366
  107. package/browser/esm/Bz6NqTbktTH8Df6_.mjs +0 -2251
  108. package/browser/esm/CDRALHzsBIsRPM5g.mjs +0 -153
  109. package/browser/esm/CIH1rBtL9lK5ku-N.mjs +0 -13391
  110. package/browser/esm/CVJee4uHPTdpZGEH.mjs +0 -46
  111. package/browser/esm/CXUv64T9mbQbJGgM.mjs +0 -48
  112. package/browser/esm/Ca5nvvpeuP6Wsv5P.mjs +0 -43
  113. package/browser/esm/CelDYTh0f7McDj4o.mjs +0 -44
  114. package/browser/esm/DHlS6l8ZPDMN2cwP.mjs +0 -1672
  115. package/browser/esm/DXKQ9TZdaT7ytR1S.mjs +0 -640
  116. package/browser/esm/D_FJwwe-bsDiDGBV.mjs +0 -2410
  117. package/browser/esm/DduyjhwDREaxXNzm.mjs +0 -59
  118. package/browser/esm/DffuCp_514AjqJLT.mjs +0 -864
  119. package/browser/esm/DgC_oaBYpwh1mBi_.mjs +0 -25
  120. package/browser/esm/Dl-SlJoaP7EFX-GR.mjs +0 -52
  121. package/browser/esm/DpTSO921EQ7L_abP.mjs +0 -52
  122. package/browser/esm/Dr5y4zmj1js9FjzE.mjs +0 -1352
  123. package/browser/esm/DuoEo0hJBssfAmB4.mjs +0 -84
  124. package/browser/esm/jIv4VNLAAFANZjhN.mjs +0 -424
  125. package/browser/esm/wysWhT4-jO-uukUH.mjs +0 -23
  126. package/browser/esm/zZaxvhjZK5N3yZkw.mjs +0 -19947
  127. package/node/esm/BBWRiJSBxt6O1CfK.mjs +0 -312
@@ -1,640 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- function I(t) {
8
- return Array.isArray ? Array.isArray(t) : se(t) === "[object Array]";
9
- }
10
- function v(t) {
11
- return typeof t == "string";
12
- }
13
- function te(t) {
14
- return typeof t == "number";
15
- }
16
- function ae(t) {
17
- return t === !0 || t === !1 || function(e) {
18
- return ne(e) && e !== null;
19
- }(t) && se(t) == "[object Boolean]";
20
- }
21
- function ne(t) {
22
- return typeof t == "object";
23
- }
24
- function M(t) {
25
- return t != null;
26
- }
27
- function K(t) {
28
- return !t.trim().length;
29
- }
30
- function se(t) {
31
- return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
32
- }
33
- const H = Object.prototype.hasOwnProperty;
34
- class le {
35
- constructor(e) {
36
- this._keys = [], this._keyMap = {};
37
- let n = 0;
38
- e.forEach((s) => {
39
- let i = ie(s);
40
- this._keys.push(i), this._keyMap[i.id] = i, n += i.weight;
41
- }), this._keys.forEach((s) => {
42
- s.weight /= n;
43
- });
44
- }
45
- get(e) {
46
- return this._keyMap[e];
47
- }
48
- keys() {
49
- return this._keys;
50
- }
51
- toJSON() {
52
- return JSON.stringify(this._keys);
53
- }
54
- }
55
- function ie(t) {
56
- let e = null, n = null, s = null, i = 1, c = null;
57
- if (v(t) || I(t)) s = t, e = T(t), n = q(t);
58
- else {
59
- if (!H.call(t, "name")) throw new Error(((o) => `Missing ${o} property in key`)("name"));
60
- const u = t.name;
61
- if (s = u, H.call(t, "weight") && (i = t.weight, i <= 0)) throw new Error(((o) => `Property 'weight' in key '${o}' must be a positive integer`)(u));
62
- e = T(u), n = q(u), c = t.getFn;
63
- }
64
- return { path: e, id: n, weight: i, src: s, getFn: c };
65
- }
66
- function T(t) {
67
- return I(t) ? t : t.split(".");
68
- }
69
- function q(t) {
70
- return I(t) ? t.join(".") : t;
71
- }
72
- var l = { isCaseSensitive: !1, ignoreDiacritics: !1, includeScore: !1, keys: [], shouldSort: !0, sortFn: (t, e) => t.score === e.score ? t.idx < e.idx ? -1 : 1 : t.score < e.score ? -1 : 1, includeMatches: !1, findAllMatches: !1, minMatchCharLength: 1, location: 0, threshold: 0.6, distance: 100, useExtendedSearch: !1, getFn: function(t, e) {
73
- let n = [], s = !1;
74
- const i = (c, u, o) => {
75
- if (M(c)) if (u[o]) {
76
- const r = c[u[o]];
77
- if (!M(r)) return;
78
- if (o === u.length - 1 && (v(r) || te(r) || ae(r))) n.push(function(a) {
79
- return a == null ? "" : function(h) {
80
- if (typeof h == "string") return h;
81
- let g = h + "";
82
- return g == "0" && 1 / h == -1 / 0 ? "-0" : g;
83
- }(a);
84
- }(r));
85
- else if (I(r)) {
86
- s = !0;
87
- for (let a = 0, h = r.length; a < h; a += 1) i(r[a], u, o + 1);
88
- } else u.length && i(r, u, o + 1);
89
- } else n.push(c);
90
- };
91
- return i(t, v(e) ? e.split(".") : e, 0), s ? n : n[0];
92
- }, ignoreLocation: !1, ignoreFieldNorm: !1, fieldNormWeight: 1 };
93
- const de = /[^ ]+/g;
94
- class U {
95
- constructor({ getFn: e = l.getFn, fieldNormWeight: n = l.fieldNormWeight } = {}) {
96
- this.norm = function(s = 1, i = 3) {
97
- const c = /* @__PURE__ */ new Map(), u = Math.pow(10, i);
98
- return { get(o) {
99
- const r = o.match(de).length;
100
- if (c.has(r)) return c.get(r);
101
- const a = 1 / Math.pow(r, 0.5 * s), h = parseFloat(Math.round(a * u) / u);
102
- return c.set(r, h), h;
103
- }, clear() {
104
- c.clear();
105
- } };
106
- }(n, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
107
- }
108
- setSources(e = []) {
109
- this.docs = e;
110
- }
111
- setIndexRecords(e = []) {
112
- this.records = e;
113
- }
114
- setKeys(e = []) {
115
- this.keys = e, this._keysMap = {}, e.forEach((n, s) => {
116
- this._keysMap[n.id] = s;
117
- });
118
- }
119
- create() {
120
- !this.isCreated && this.docs.length && (this.isCreated = !0, v(this.docs[0]) ? this.docs.forEach((e, n) => {
121
- this._addString(e, n);
122
- }) : this.docs.forEach((e, n) => {
123
- this._addObject(e, n);
124
- }), this.norm.clear());
125
- }
126
- add(e) {
127
- const n = this.size();
128
- v(e) ? this._addString(e, n) : this._addObject(e, n);
129
- }
130
- removeAt(e) {
131
- this.records.splice(e, 1);
132
- for (let n = e, s = this.size(); n < s; n += 1) this.records[n].i -= 1;
133
- }
134
- getValueForItemAtKeyId(e, n) {
135
- return e[this._keysMap[n]];
136
- }
137
- size() {
138
- return this.records.length;
139
- }
140
- _addString(e, n) {
141
- if (!M(e) || K(e)) return;
142
- let s = { v: e, i: n, n: this.norm.get(e) };
143
- this.records.push(s);
144
- }
145
- _addObject(e, n) {
146
- let s = { i: n, $: {} };
147
- this.keys.forEach((i, c) => {
148
- let u = i.getFn ? i.getFn(e) : this.getFn(e, i.path);
149
- if (M(u)) {
150
- if (I(u)) {
151
- let o = [];
152
- const r = [{ nestedArrIndex: -1, value: u }];
153
- for (; r.length; ) {
154
- const { nestedArrIndex: a, value: h } = r.pop();
155
- if (M(h)) if (v(h) && !K(h)) {
156
- let g = { v: h, i: a, n: this.norm.get(h) };
157
- o.push(g);
158
- } else I(h) && h.forEach((g, d) => {
159
- r.push({ nestedArrIndex: d, value: g });
160
- });
161
- }
162
- s.$[c] = o;
163
- } else if (v(u) && !K(u)) {
164
- let o = { v: u, n: this.norm.get(u) };
165
- s.$[c] = o;
166
- }
167
- }
168
- }), this.records.push(s);
169
- }
170
- toJSON() {
171
- return { keys: this.keys, records: this.records };
172
- }
173
- }
174
- function re(t, e, { getFn: n = l.getFn, fieldNormWeight: s = l.fieldNormWeight } = {}) {
175
- const i = new U({ getFn: n, fieldNormWeight: s });
176
- return i.setKeys(t.map(ie)), i.setSources(e), i.create(), i;
177
- }
178
- function W(t, { errors: e = 0, currentLocation: n = 0, expectedLocation: s = 0, distance: i = l.distance, ignoreLocation: c = l.ignoreLocation } = {}) {
179
- const u = e / t.length;
180
- if (c) return u;
181
- const o = Math.abs(s - n);
182
- return i ? u + o / i : o ? 1 : u;
183
- }
184
- const b = 32;
185
- function ge(t, e, n, { location: s = l.location, distance: i = l.distance, threshold: c = l.threshold, findAllMatches: u = l.findAllMatches, minMatchCharLength: o = l.minMatchCharLength, includeMatches: r = l.includeMatches, ignoreLocation: a = l.ignoreLocation } = {}) {
186
- if (e.length > b) throw new Error(`Pattern length exceeds max of ${b}.`);
187
- const h = e.length, g = t.length, d = Math.max(0, Math.min(s, g));
188
- let f = c, A = d;
189
- const C = o > 1 || r, p = C ? Array(g) : [];
190
- let E;
191
- for (; (E = t.indexOf(e, A)) > -1; ) {
192
- let y = W(e, { currentLocation: E, expectedLocation: d, distance: i, ignoreLocation: a });
193
- if (f = Math.min(y, f), A = E + h, C) {
194
- let B = 0;
195
- for (; B < h; ) p[E + B] = 1, B += 1;
196
- }
197
- }
198
- A = -1;
199
- let D = [], k = 1, F = h + g;
200
- const $ = 1 << h - 1;
201
- for (let y = 0; y < h; y += 1) {
202
- let B = 0, L = F;
203
- for (; B < L; )
204
- W(e, { errors: y, currentLocation: d + L, expectedLocation: d, distance: i, ignoreLocation: a }) <= f ? B = L : F = L, L = Math.floor((F - B) / 2 + B);
205
- F = L;
206
- let N = Math.max(1, d - L + 1), x = u ? g : Math.min(d + L, g) + h, _ = Array(x + 2);
207
- _[x + 1] = (1 << y) - 1;
208
- for (let m = x; m >= N; m -= 1) {
209
- let R = m - 1, O = n[t.charAt(R)];
210
- if (C && (p[R] = +!!O), _[m] = (_[m + 1] << 1 | 1) & O, y && (_[m] |= (D[m + 1] | D[m]) << 1 | 1 | D[m + 1]), _[m] & $ && (k = W(e, { errors: y, currentLocation: R, expectedLocation: d, distance: i, ignoreLocation: a }), k <= f)) {
211
- if (f = k, A = R, A <= d) break;
212
- N = Math.max(1, 2 * d - A);
213
- }
214
- }
215
- if (W(e, { errors: y + 1, currentLocation: d, expectedLocation: d, distance: i, ignoreLocation: a }) > f) break;
216
- D = _;
217
- }
218
- const S = { isMatch: A >= 0, score: Math.max(1e-3, k) };
219
- if (C) {
220
- const y = function(B = [], L = l.minMatchCharLength) {
221
- let N = [], x = -1, _ = -1, m = 0;
222
- for (let R = B.length; m < R; m += 1) {
223
- let O = B[m];
224
- O && x === -1 ? x = m : O || x === -1 || (_ = m - 1, _ - x + 1 >= L && N.push([x, _]), x = -1);
225
- }
226
- return B[m - 1] && m - x >= L && N.push([x, m - 1]), N;
227
- }(p, o);
228
- y.length ? r && (S.indices = y) : S.isMatch = !1;
229
- }
230
- return S;
231
- }
232
- function fe(t) {
233
- let e = {};
234
- for (let n = 0, s = t.length; n < s; n += 1) {
235
- const i = t.charAt(n);
236
- e[i] = (e[i] || 0) | 1 << s - n - 1;
237
- }
238
- return e;
239
- }
240
- const z = String.prototype.normalize ? (t) => t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "") : (t) => t;
241
- class ue {
242
- constructor(e, { location: n = l.location, threshold: s = l.threshold, distance: i = l.distance, includeMatches: c = l.includeMatches, findAllMatches: u = l.findAllMatches, minMatchCharLength: o = l.minMatchCharLength, isCaseSensitive: r = l.isCaseSensitive, ignoreDiacritics: a = l.ignoreDiacritics, ignoreLocation: h = l.ignoreLocation } = {}) {
243
- if (this.options = { location: n, threshold: s, distance: i, includeMatches: c, findAllMatches: u, minMatchCharLength: o, isCaseSensitive: r, ignoreDiacritics: a, ignoreLocation: h }, e = r ? e : e.toLowerCase(), e = a ? z(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length) return;
244
- const g = (f, A) => {
245
- this.chunks.push({ pattern: f, alphabet: fe(f), startIndex: A });
246
- }, d = this.pattern.length;
247
- if (d > b) {
248
- let f = 0;
249
- const A = d % b, C = d - A;
250
- for (; f < C; ) g(this.pattern.substr(f, b), f), f += b;
251
- if (A) {
252
- const p = d - b;
253
- g(this.pattern.substr(p), p);
254
- }
255
- } else g(this.pattern, 0);
256
- }
257
- searchIn(e) {
258
- const { isCaseSensitive: n, ignoreDiacritics: s, includeMatches: i } = this.options;
259
- if (e = n ? e : e.toLowerCase(), e = s ? z(e) : e, this.pattern === e) {
260
- let C = { isMatch: !0, score: 0 };
261
- return i && (C.indices = [[0, e.length - 1]]), C;
262
- }
263
- const { location: c, distance: u, threshold: o, findAllMatches: r, minMatchCharLength: a, ignoreLocation: h } = this.options;
264
- let g = [], d = 0, f = !1;
265
- this.chunks.forEach(({ pattern: C, alphabet: p, startIndex: E }) => {
266
- const { isMatch: D, score: k, indices: F } = ge(e, C, p, { location: c + E, distance: u, threshold: o, findAllMatches: r, minMatchCharLength: a, includeMatches: i, ignoreLocation: h });
267
- D && (f = !0), d += k, D && F && (g = [...g, ...F]);
268
- });
269
- let A = { isMatch: f, score: f ? d / this.chunks.length : 1 };
270
- return f && i && (A.indices = g), A;
271
- }
272
- }
273
- class w {
274
- constructor(e) {
275
- this.pattern = e;
276
- }
277
- static isMultiMatch(e) {
278
- return X(e, this.multiRegex);
279
- }
280
- static isSingleMatch(e) {
281
- return X(e, this.singleRegex);
282
- }
283
- search() {
284
- }
285
- }
286
- function X(t, e) {
287
- const n = t.match(e);
288
- return n ? n[1] : null;
289
- }
290
- class ce extends w {
291
- constructor(e, { location: n = l.location, threshold: s = l.threshold, distance: i = l.distance, includeMatches: c = l.includeMatches, findAllMatches: u = l.findAllMatches, minMatchCharLength: o = l.minMatchCharLength, isCaseSensitive: r = l.isCaseSensitive, ignoreDiacritics: a = l.ignoreDiacritics, ignoreLocation: h = l.ignoreLocation } = {}) {
292
- super(e), this._bitapSearch = new ue(e, { location: n, threshold: s, distance: i, includeMatches: c, findAllMatches: u, minMatchCharLength: o, isCaseSensitive: r, ignoreDiacritics: a, ignoreLocation: h });
293
- }
294
- static get type() {
295
- return "fuzzy";
296
- }
297
- static get multiRegex() {
298
- return /^"(.*)"$/;
299
- }
300
- static get singleRegex() {
301
- return /^(.*)$/;
302
- }
303
- search(e) {
304
- return this._bitapSearch.searchIn(e);
305
- }
306
- }
307
- class oe extends w {
308
- constructor(e) {
309
- super(e);
310
- }
311
- static get type() {
312
- return "include";
313
- }
314
- static get multiRegex() {
315
- return /^'"(.*)"$/;
316
- }
317
- static get singleRegex() {
318
- return /^'(.*)$/;
319
- }
320
- search(e) {
321
- let n, s = 0;
322
- const i = [], c = this.pattern.length;
323
- for (; (n = e.indexOf(this.pattern, s)) > -1; ) s = n + c, i.push([n, s - 1]);
324
- const u = !!i.length;
325
- return { isMatch: u, score: u ? 0 : 1, indices: i };
326
- }
327
- }
328
- const J = [class extends w {
329
- constructor(t) {
330
- super(t);
331
- }
332
- static get type() {
333
- return "exact";
334
- }
335
- static get multiRegex() {
336
- return /^="(.*)"$/;
337
- }
338
- static get singleRegex() {
339
- return /^=(.*)$/;
340
- }
341
- search(t) {
342
- const e = t === this.pattern;
343
- return { isMatch: e, score: e ? 0 : 1, indices: [0, this.pattern.length - 1] };
344
- }
345
- }, oe, class extends w {
346
- constructor(t) {
347
- super(t);
348
- }
349
- static get type() {
350
- return "prefix-exact";
351
- }
352
- static get multiRegex() {
353
- return /^\^"(.*)"$/;
354
- }
355
- static get singleRegex() {
356
- return /^\^(.*)$/;
357
- }
358
- search(t) {
359
- const e = t.startsWith(this.pattern);
360
- return { isMatch: e, score: e ? 0 : 1, indices: [0, this.pattern.length - 1] };
361
- }
362
- }, class extends w {
363
- constructor(t) {
364
- super(t);
365
- }
366
- static get type() {
367
- return "inverse-prefix-exact";
368
- }
369
- static get multiRegex() {
370
- return /^!\^"(.*)"$/;
371
- }
372
- static get singleRegex() {
373
- return /^!\^(.*)$/;
374
- }
375
- search(t) {
376
- const e = !t.startsWith(this.pattern);
377
- return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
378
- }
379
- }, class extends w {
380
- constructor(t) {
381
- super(t);
382
- }
383
- static get type() {
384
- return "inverse-suffix-exact";
385
- }
386
- static get multiRegex() {
387
- return /^!"(.*)"\$$/;
388
- }
389
- static get singleRegex() {
390
- return /^!(.*)\$$/;
391
- }
392
- search(t) {
393
- const e = !t.endsWith(this.pattern);
394
- return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
395
- }
396
- }, class extends w {
397
- constructor(t) {
398
- super(t);
399
- }
400
- static get type() {
401
- return "suffix-exact";
402
- }
403
- static get multiRegex() {
404
- return /^"(.*)"\$$/;
405
- }
406
- static get singleRegex() {
407
- return /^(.*)\$$/;
408
- }
409
- search(t) {
410
- const e = t.endsWith(this.pattern);
411
- return { isMatch: e, score: e ? 0 : 1, indices: [t.length - this.pattern.length, t.length - 1] };
412
- }
413
- }, class extends w {
414
- constructor(t) {
415
- super(t);
416
- }
417
- static get type() {
418
- return "inverse-exact";
419
- }
420
- static get multiRegex() {
421
- return /^!"(.*)"$/;
422
- }
423
- static get singleRegex() {
424
- return /^!(.*)$/;
425
- }
426
- search(t) {
427
- const e = t.indexOf(this.pattern) === -1;
428
- return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
429
- }
430
- }, ce], Y = J.length, Ae = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, pe = /* @__PURE__ */ new Set([ce.type, oe.type]);
431
- class Ce {
432
- constructor(e, { isCaseSensitive: n = l.isCaseSensitive, ignoreDiacritics: s = l.ignoreDiacritics, includeMatches: i = l.includeMatches, minMatchCharLength: c = l.minMatchCharLength, ignoreLocation: u = l.ignoreLocation, findAllMatches: o = l.findAllMatches, location: r = l.location, threshold: a = l.threshold, distance: h = l.distance } = {}) {
433
- this.query = null, this.options = { isCaseSensitive: n, ignoreDiacritics: s, includeMatches: i, minMatchCharLength: c, findAllMatches: o, ignoreLocation: u, location: r, threshold: a, distance: h }, e = n ? e : e.toLowerCase(), e = s ? z(e) : e, this.pattern = e, this.query = function(g, d = {}) {
434
- return g.split("|").map((f) => {
435
- let A = f.trim().split(Ae).filter((p) => p && !!p.trim()), C = [];
436
- for (let p = 0, E = A.length; p < E; p += 1) {
437
- const D = A[p];
438
- let k = !1, F = -1;
439
- for (; !k && ++F < Y; ) {
440
- const $ = J[F];
441
- let S = $.isMultiMatch(D);
442
- S && (C.push(new $(S, d)), k = !0);
443
- }
444
- if (!k) for (F = -1; ++F < Y; ) {
445
- const $ = J[F];
446
- let S = $.isSingleMatch(D);
447
- if (S) {
448
- C.push(new $(S, d));
449
- break;
450
- }
451
- }
452
- }
453
- return C;
454
- });
455
- }(this.pattern, this.options);
456
- }
457
- static condition(e, n) {
458
- return n.useExtendedSearch;
459
- }
460
- searchIn(e) {
461
- const n = this.query;
462
- if (!n) return { isMatch: !1, score: 1 };
463
- const { includeMatches: s, isCaseSensitive: i, ignoreDiacritics: c } = this.options;
464
- e = i ? e : e.toLowerCase(), e = c ? z(e) : e;
465
- let u = 0, o = [], r = 0;
466
- for (let a = 0, h = n.length; a < h; a += 1) {
467
- const g = n[a];
468
- o.length = 0, u = 0;
469
- for (let d = 0, f = g.length; d < f; d += 1) {
470
- const A = g[d], { isMatch: C, indices: p, score: E } = A.search(e);
471
- if (!C) {
472
- r = 0, u = 0, o.length = 0;
473
- break;
474
- }
475
- if (u += 1, r += E, s) {
476
- const D = A.constructor.type;
477
- pe.has(D) ? o = [...o, ...p] : o.push(p);
478
- }
479
- }
480
- if (u) {
481
- let d = { isMatch: !0, score: r / u };
482
- return s && (d.indices = o), d;
483
- }
484
- }
485
- return { isMatch: !1, score: 1 };
486
- }
487
- }
488
- const V = [];
489
- function Q(t, e) {
490
- for (let n = 0, s = V.length; n < s; n += 1) {
491
- let i = V[n];
492
- if (i.condition(t, e)) return new i(t, e);
493
- }
494
- return new ue(t, e);
495
- }
496
- const G = "$and", me = "$or", Z = "$path", Fe = "$val", P = (t) => !(!t[G] && !t[me]), ee = (t) => ({ [G]: Object.keys(t).map((e) => ({ [e]: t[e] })) });
497
- function he(t, e, { auto: n = !0 } = {}) {
498
- const s = (i) => {
499
- let c = Object.keys(i);
500
- const u = ((r) => !!r[Z])(i);
501
- if (!u && c.length > 1 && !P(i)) return s(ee(i));
502
- if (((r) => !I(r) && ne(r) && !P(r))(i)) {
503
- const r = u ? i[Z] : c[0], a = u ? i[Fe] : i[r];
504
- if (!v(a)) throw new Error(((g) => `Invalid value for key ${g}`)(r));
505
- const h = { keyId: q(r), pattern: a };
506
- return n && (h.searcher = Q(a, e)), h;
507
- }
508
- let o = { children: [], operator: c[0] };
509
- return c.forEach((r) => {
510
- const a = i[r];
511
- I(a) && a.forEach((h) => {
512
- o.children.push(s(h));
513
- });
514
- }), o;
515
- };
516
- return P(t) || (t = ee(t)), s(t);
517
- }
518
- function Me(t, e) {
519
- const n = t.matches;
520
- e.matches = [], M(n) && n.forEach((s) => {
521
- if (!M(s.indices) || !s.indices.length) return;
522
- const { indices: i, value: c } = s;
523
- let u = { indices: i, value: c };
524
- s.key && (u.key = s.key.src), s.idx > -1 && (u.refIndex = s.idx), e.matches.push(u);
525
- });
526
- }
527
- function Ee(t, e) {
528
- e.score = t.score;
529
- }
530
- class j {
531
- constructor(e, n = {}, s) {
532
- this.options = { ...l, ...n }, this.options.useExtendedSearch, this._keyStore = new le(this.options.keys), this.setCollection(e, s);
533
- }
534
- setCollection(e, n) {
535
- if (this._docs = e, n && !(n instanceof U)) throw new Error("Incorrect 'index' type");
536
- this._myIndex = n || re(this.options.keys, this._docs, { getFn: this.options.getFn, fieldNormWeight: this.options.fieldNormWeight });
537
- }
538
- add(e) {
539
- M(e) && (this._docs.push(e), this._myIndex.add(e));
540
- }
541
- remove(e = () => !1) {
542
- const n = [];
543
- for (let s = 0, i = this._docs.length; s < i; s += 1) {
544
- const c = this._docs[s];
545
- e(c, s) && (this.removeAt(s), s -= 1, i -= 1, n.push(c));
546
- }
547
- return n;
548
- }
549
- removeAt(e) {
550
- this._docs.splice(e, 1), this._myIndex.removeAt(e);
551
- }
552
- getIndex() {
553
- return this._myIndex;
554
- }
555
- search(e, { limit: n = -1 } = {}) {
556
- const { includeMatches: s, includeScore: i, shouldSort: c, sortFn: u, ignoreFieldNorm: o } = this.options;
557
- let r = v(e) ? v(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
558
- return function(a, { ignoreFieldNorm: h = l.ignoreFieldNorm }) {
559
- a.forEach((g) => {
560
- let d = 1;
561
- g.matches.forEach(({ key: f, norm: A, score: C }) => {
562
- const p = f ? f.weight : null;
563
- d *= Math.pow(C === 0 && p ? Number.EPSILON : C, (p || 1) * (h ? 1 : A));
564
- }), g.score = d;
565
- });
566
- }(r, { ignoreFieldNorm: o }), c && r.sort(u), te(n) && n > -1 && (r = r.slice(0, n)), function(a, h, { includeMatches: g = l.includeMatches, includeScore: d = l.includeScore } = {}) {
567
- const f = [];
568
- return g && f.push(Me), d && f.push(Ee), a.map((A) => {
569
- const { idx: C } = A, p = { item: h[C], refIndex: C };
570
- return f.length && f.forEach((E) => {
571
- E(A, p);
572
- }), p;
573
- });
574
- }(r, this._docs, { includeMatches: s, includeScore: i });
575
- }
576
- _searchStringList(e) {
577
- const n = Q(e, this.options), { records: s } = this._myIndex, i = [];
578
- return s.forEach(({ v: c, i: u, n: o }) => {
579
- if (!M(c)) return;
580
- const { isMatch: r, score: a, indices: h } = n.searchIn(c);
581
- r && i.push({ item: c, idx: u, matches: [{ score: a, value: c, norm: o, indices: h }] });
582
- }), i;
583
- }
584
- _searchLogical(e) {
585
- const n = he(e, this.options), s = (o, r, a) => {
586
- if (!o.children) {
587
- const { keyId: g, searcher: d } = o, f = this._findMatches({ key: this._keyStore.get(g), value: this._myIndex.getValueForItemAtKeyId(r, g), searcher: d });
588
- return f && f.length ? [{ idx: a, item: r, matches: f }] : [];
589
- }
590
- const h = [];
591
- for (let g = 0, d = o.children.length; g < d; g += 1) {
592
- const f = o.children[g], A = s(f, r, a);
593
- if (A.length) h.push(...A);
594
- else if (o.operator === G) return [];
595
- }
596
- return h;
597
- }, i = this._myIndex.records, c = {}, u = [];
598
- return i.forEach(({ $: o, i: r }) => {
599
- if (M(o)) {
600
- let a = s(n, o, r);
601
- a.length && (c[r] || (c[r] = { idx: r, item: o, matches: [] }, u.push(c[r])), a.forEach(({ matches: h }) => {
602
- c[r].matches.push(...h);
603
- }));
604
- }
605
- }), u;
606
- }
607
- _searchObjectList(e) {
608
- const n = Q(e, this.options), { keys: s, records: i } = this._myIndex, c = [];
609
- return i.forEach(({ $: u, i: o }) => {
610
- if (!M(u)) return;
611
- let r = [];
612
- s.forEach((a, h) => {
613
- r.push(...this._findMatches({ key: a, value: u[h], searcher: n }));
614
- }), r.length && c.push({ idx: o, item: u, matches: r });
615
- }), c;
616
- }
617
- _findMatches({ key: e, value: n, searcher: s }) {
618
- if (!M(n)) return [];
619
- let i = [];
620
- if (I(n)) n.forEach(({ v: c, i: u, n: o }) => {
621
- if (!M(c)) return;
622
- const { isMatch: r, score: a, indices: h } = s.searchIn(c);
623
- r && i.push({ score: a, key: e, value: c, idx: u, norm: o, indices: h });
624
- });
625
- else {
626
- const { v: c, n: u } = n, { isMatch: o, score: r, indices: a } = s.searchIn(c);
627
- o && i.push({ score: r, key: e, value: c, norm: u, indices: a });
628
- }
629
- return i;
630
- }
631
- }
632
- j.version = "7.1.0", j.createIndex = re, j.parseIndex = function(t, { getFn: e = l.getFn, fieldNormWeight: n = l.fieldNormWeight } = {}) {
633
- const { keys: s, records: i } = t, c = new U({ getFn: e, fieldNormWeight: n });
634
- return c.setKeys(s), c.setIndexRecords(i), c;
635
- }, j.config = l, j.parseQuery = he, function(...t) {
636
- V.push(...t);
637
- }(Ce);
638
- export {
639
- j as default
640
- };