@sheetxl/studio-mui 0.4.12 → 0.4.14

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/-zKDSjn55SCvCwk8.cjs +6 -0
  2. package/browser/cjs/AoLA7tfyPshG_mKt.cjs +6 -0
  3. package/browser/cjs/As7uhSEgY8VJ3I6f.cjs +90 -0
  4. package/browser/cjs/B1Eaz6PFZAmrWiyY.cjs +6 -0
  5. package/browser/cjs/B8ZfZXhvW4sSKKZs.cjs +42 -0
  6. package/browser/cjs/BAfNSJo7fktzFVJd.cjs +11 -0
  7. package/browser/cjs/BH0v7IIykugrFxaT.cjs +6 -0
  8. package/browser/cjs/BUwmvmcdC0xBQ97L.cjs +145 -0
  9. package/browser/cjs/BiBEmbWoJHdOB1li.cjs +12 -0
  10. package/browser/cjs/BkVtS9FZxWYNmrbU.cjs +6 -0
  11. package/browser/cjs/Bmifo5y7ZMJolUTY.cjs +15 -0
  12. package/browser/cjs/BpLu9-spCLcAFdwd.cjs +6 -0
  13. package/browser/cjs/BqOg0z4HGrbNaL1k.cjs +6 -0
  14. package/browser/cjs/C6Fk0jGWAOED60yf.cjs +161 -0
  15. package/browser/cjs/CRvxop0QcZL23Akb.cjs +6 -0
  16. package/browser/cjs/CS5USjyVh8DwPSri.cjs +7 -0
  17. package/browser/cjs/Chz3K3Qt8M2FNJwI.cjs +12 -0
  18. package/browser/cjs/D2gy3JDrJyGAMqsl.cjs +7 -0
  19. package/browser/cjs/DD8-ZSDUkRqk7l6y.cjs +11 -0
  20. package/browser/cjs/DNL88d5PGwk92LeD.cjs +6 -0
  21. package/browser/cjs/DTHMIHonHaHeJ0o1.cjs +18 -0
  22. package/browser/cjs/DZ8WTAzF6V2Tw1tW.cjs +6 -0
  23. package/browser/cjs/W7LR70ajtjR9Lmvl.cjs +6 -0
  24. package/browser/cjs/XGmQ2kUHM2qQkG1r.cjs +16 -0
  25. package/browser/cjs/d2jsgbPdf35xArnn.cjs +6 -0
  26. package/browser/cjs/index.cjs +4 -10
  27. package/browser/esm/4fzdzYhVH9eIXv-E.mjs +2410 -0
  28. package/browser/esm/B-rZWEIXFvB2W_mP.mjs +84 -0
  29. package/browser/esm/C4ORm_Up6Zxt92F_.mjs +1672 -0
  30. package/browser/esm/C5OCdRxcYIZViFzN.mjs +13391 -0
  31. package/browser/esm/C8po4rRYJ8127Rgb.mjs +44 -0
  32. package/browser/esm/CB7vnn7AtsGma4R6.mjs +3803 -0
  33. package/browser/esm/CBQZHZlKIiEz186r.mjs +2251 -0
  34. package/browser/esm/CCwOCTrf9Bira1-Y.mjs +424 -0
  35. package/browser/esm/CHovQU_R4AuKULmT.mjs +392 -0
  36. package/browser/esm/CIH3ADFJJmUiyA8p.mjs +864 -0
  37. package/browser/esm/CQiALmsycGGLFj1o.mjs +25 -0
  38. package/browser/esm/CS6uJp7phBvUmos6.mjs +1467 -0
  39. package/browser/esm/CSKgHJSTMvOEe2RH.mjs +19981 -0
  40. package/browser/esm/CYG1vk4AMMwqsul7.mjs +1366 -0
  41. package/browser/esm/ClmlhDf-0RC5GFV3.mjs +52 -0
  42. package/browser/esm/CmAnpd_SOxQuTQRL.mjs +1703 -0
  43. package/browser/esm/DWy4L2usallW0WdU.mjs +153 -0
  44. package/browser/esm/Dc1PmtvbeqsIQHq6.mjs +48 -0
  45. package/browser/esm/DgKsUQMTThBdEQds.mjs +59 -0
  46. package/browser/esm/Dk00kGaRJxiitO5-.mjs +23 -0
  47. package/browser/esm/FdSIHwC_mNRZpcgJ.mjs +43 -0
  48. package/browser/esm/Ks946bL2vmd4m743.mjs +52 -0
  49. package/browser/esm/TlZOl3Gt-d0Nc2a8.mjs +46 -0
  50. package/browser/esm/_FvE2-K7MOW_qWVS.mjs +1352 -0
  51. package/browser/esm/index.mjs +83 -8
  52. package/browser/esm/vgS9ixFRuZrPx6vq.mjs +640 -0
  53. package/licenses/dependencies.txt +134 -134
  54. package/node/esm/{B3M2CzPvK2oKOfg5.mjs → 762kbapO408ejsVC.mjs} +2 -2
  55. package/node/esm/{CryVonGjJnmo2dE_.mjs → B0gJGF9-J3L5yBEW.mjs} +5 -5
  56. package/node/esm/{CBGAl2mih9mHDt5w.mjs → BR9YJuwMP9nTMBE-.mjs} +1 -1
  57. package/node/esm/{D1xD8cOQDGcbjIlG.mjs → BTNBRzW8ZZbJY4GL.mjs} +1 -1
  58. package/node/esm/{C2P_M1JNT_WZZN3H.mjs → Bgtg4I8EL4M776SY.mjs} +8 -8
  59. package/node/esm/{DUfB1ollhqU-JIk5.mjs → Bi5br6yrYZqhLEiY.mjs} +4 -4
  60. package/node/esm/{M3UB6IrhVERZziiJ.mjs → CCygt4zw40-jO57G.mjs} +2 -2
  61. package/node/esm/{m8fyd2BoYkTOJlc1.mjs → CTpkd2r1aBS5d0yl.mjs} +1 -1
  62. package/node/esm/{kHsChOtl8GUkzj5Q.mjs → CY1qC_sXGD6av4yO.mjs} +2 -2
  63. package/node/esm/{Dx2vq1Hdt4pqmOF-.mjs → CZoMFCKJudiTl_Tf.mjs} +2 -2
  64. package/node/esm/{kIQFLB3nmEJdn_OT.mjs → CzWLA_IQgFbENkMq.mjs} +1 -1
  65. package/node/esm/{BJY8yNMmN_yyRtIG.mjs → D1GfRQ1jyFg-wmLD.mjs} +1 -1
  66. package/node/esm/{D1C8ifsmXsypL6pp.mjs → DC2dPUCWVgxEKzaS.mjs} +13 -13
  67. package/node/esm/{Bj8uU2shfkvN4LnE.mjs → DOUP6ynjlQE-UEJs.mjs} +6 -6
  68. package/node/esm/{BIRLX0-9t62Lqats.mjs → DUqIYzvmrCd67Dpx.mjs} +2 -2
  69. package/node/esm/{CVGxETc4rIE1gNAH.mjs → DWCxF-chq5dVi363.mjs} +38 -38
  70. package/node/esm/{Bt5y5wVaVAVjwHBl.mjs → DghPySv_2Ts78czJ.mjs} +1 -1
  71. package/node/esm/{PF5CCBvapZxEzc7k.mjs → DrujinnhlNDCosqb.mjs} +1 -1
  72. package/node/esm/DsD7O5j2cXyaECkB.mjs +313 -0
  73. package/node/esm/{wdtYNTNCynMMS4_P.mjs → VHY56h6xqQcPba6u.mjs} +1 -1
  74. package/node/esm/{h1y2hBFecTqRgUa-.mjs → dlEq3vDkIERtTn7Y.mjs} +25 -25
  75. package/node/esm/index.mjs +4999 -5264
  76. package/node/esm/{CKtVB9hMCfabQMxC.mjs → yB8OTWhDomxUy_SX.mjs} +2 -2
  77. package/node/esm/{bv_GA6NGCT0sJaXy.mjs → yP0whgIwVZApluLw.mjs} +2 -2
  78. package/package.json +8 -8
  79. package/types/index.d.ts +0 -11
  80. package/browser/cjs/B7qLzxylqOaybl3H.cjs +0 -7
  81. package/browser/cjs/BNGixOiIsu8jZlvn.cjs +0 -7
  82. package/browser/cjs/BUYxt7KgFkIIIMyc.cjs +0 -7
  83. package/browser/cjs/Bk6VhhWsnCRyBu2F.cjs +0 -7
  84. package/browser/cjs/BpiMMYip132x0r1O.cjs +0 -7
  85. package/browser/cjs/ByZ_Q-J7jgF7AoWR.cjs +0 -7
  86. package/browser/cjs/BzD7LV8VmFKLAJyW.cjs +0 -7
  87. package/browser/cjs/C6_zcNM0Efa11KEE.cjs +0 -7
  88. package/browser/cjs/C8Azx_ZaQa4WvAtR.cjs +0 -7
  89. package/browser/cjs/CITvaW7L_iZfIyAN.cjs +0 -7
  90. package/browser/cjs/CNDDYOoLCrGsUMYL.cjs +0 -7
  91. package/browser/cjs/CYbeY5OVZDqHGSOm.cjs +0 -7
  92. package/browser/cjs/C_SgucbRn-v9IkNO.cjs +0 -7
  93. package/browser/cjs/CeTd2nFbE5yFzf7T.cjs +0 -7
  94. package/browser/cjs/Cfe7IbPNI8-CgoDI.cjs +0 -7
  95. package/browser/cjs/Ctyk-ajkSsTDJuvY.cjs +0 -7
  96. package/browser/cjs/DBhTQLbjAtU-A1YA.cjs +0 -7
  97. package/browser/cjs/Dc2rbOjtcmSIm8D4.cjs +0 -7
  98. package/browser/cjs/DcsvUmoS8zGG5GB8.cjs +0 -7
  99. package/browser/cjs/DqAlQQIZIyF7HMib.cjs +0 -7
  100. package/browser/cjs/DuwawlAm4aRBNTBm.cjs +0 -7
  101. package/browser/cjs/Dx9UUJj-yeubDjm4.cjs +0 -7
  102. package/browser/cjs/IC19hB4Ntvw1158j.cjs +0 -7
  103. package/browser/cjs/reQ9miE5C5qMfbRJ.cjs +0 -7
  104. package/browser/esm/B1Ey4ZP8BHUzHW7G.mjs +0 -7
  105. package/browser/esm/B8dJHVZJta8QbNKG.mjs +0 -7
  106. package/browser/esm/BThbC01mtb7qq8_A.mjs +0 -7
  107. package/browser/esm/Bnt1M91BRyMvXrc4.mjs +0 -7
  108. package/browser/esm/BqN0SYrEO0RZQtv-.mjs +0 -7
  109. package/browser/esm/CHPXsEre3jry2-jF.mjs +0 -7
  110. package/browser/esm/CMCOU0nDlymDFS9l.mjs +0 -7
  111. package/browser/esm/Cc7y1nMDr5J8jWx-.mjs +0 -7
  112. package/browser/esm/CesL-3BNbMB1f_if.mjs +0 -7
  113. package/browser/esm/CfvNSnuQLa1SPbNL.mjs +0 -7
  114. package/browser/esm/CloqVDbJmTL4oFek.mjs +0 -7
  115. package/browser/esm/Cta0yn5UIrP2UoT4.mjs +0 -7
  116. package/browser/esm/CwRyQHiDoBLx5_1g.mjs +0 -7
  117. package/browser/esm/DI-ZGstUJFwkx4H6.mjs +0 -7
  118. package/browser/esm/DQTfmweCXjuIlITn.mjs +0 -7
  119. package/browser/esm/DUIfOO25d1fqtJzn.mjs +0 -7
  120. package/browser/esm/DhOXsRr8c7bDS1jM.mjs +0 -7
  121. package/browser/esm/JPwh2m5-pXkdPVzF.mjs +0 -7
  122. package/browser/esm/UkNAvQj0NVgeMpUl.mjs +0 -7
  123. package/browser/esm/ZUfck_LDsQb9gpvU.mjs +0 -7
  124. package/browser/esm/gHhqkr52cxXkga0T.mjs +0 -7
  125. package/browser/esm/obM68UOvA5HV7Lt1.mjs +0 -7
  126. package/browser/esm/x9MyDRdLE47dI9dF.mjs +0 -7
  127. package/browser/esm/yW9jxnamUqAhVQkJ.mjs +0 -7
@@ -0,0 +1,640 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
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
+ };