@sheetxl/studio-vanilla 0.4.21 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/browser/cjs/2QmtjcI-saz2rkIA.cjs +6 -0
  2. package/browser/cjs/3UFq2FybsZfoS4JL.cjs +6 -0
  3. package/browser/cjs/B-fFQgxMHns-eg-y.cjs +6 -0
  4. package/browser/cjs/{n6CXzSocLW_BCO8w.cjs → B2hhcNzdkhGrH1O6.cjs} +6 -6
  5. package/browser/cjs/BASsCVA0ArIVtY7I.cjs +6 -0
  6. package/browser/cjs/BAxy7pwmXg8SI_oi.cjs +6 -0
  7. package/browser/cjs/BCwHln5zBNJSn0bb.cjs +6 -0
  8. package/browser/cjs/BQYUcoxlHrpI0-pX.cjs +6 -0
  9. package/browser/cjs/BVbQCweLw_r05vPF.cjs +15 -0
  10. package/browser/cjs/BYJxHR3K0UQJ8mYe.cjs +6 -0
  11. package/browser/cjs/Ba8eoGTjjWBH8TbP.cjs +6 -0
  12. package/browser/cjs/BdCoVNJwhPpWfQw2.cjs +6 -0
  13. package/browser/cjs/BkZzUVGQfrUTPE_K.cjs +6 -0
  14. package/browser/cjs/BlpCu5z9eT8rzsZl.cjs +6 -0
  15. package/browser/cjs/BlqTaZ2U_mKVK2lb.cjs +6 -0
  16. package/browser/cjs/BpeteRa_oZ-wN4Yl.cjs +6 -0
  17. package/browser/cjs/BxqDS9XynU5GFbP7.cjs +16 -0
  18. package/browser/cjs/ByB_fmjdLNTv0T0U.cjs +145 -0
  19. package/browser/cjs/C-6TpShR6Bn0HnEd.cjs +7 -0
  20. package/browser/cjs/C5T_oiCG4PwTFSZA.cjs +6 -0
  21. package/browser/cjs/C5e1IjdRuLyAQqNX.cjs +7 -0
  22. package/browser/cjs/CAZoVQtxsVdAtVKy.cjs +6 -0
  23. package/browser/cjs/CBS2kMyEf0c_PUbQ.cjs +12 -0
  24. package/browser/cjs/CO7VEOXret0qr-X3.cjs +6 -0
  25. package/browser/cjs/CVIlAq9nwlOXfHMl.cjs +161 -0
  26. package/browser/cjs/CZEOikBcE4OIr49t.cjs +6 -0
  27. package/browser/cjs/Ce8AVRntRnXZtgzH.cjs +6 -0
  28. package/browser/cjs/ClEZHGlmkSIz6S1O.cjs +6 -0
  29. package/browser/cjs/CvO-oyQ3syx7EGUA.cjs +6 -0
  30. package/browser/cjs/CwqvcNlwUtXJrzsk.cjs +6 -0
  31. package/browser/cjs/D-su0R92LmYTQVL3.cjs +11 -0
  32. package/browser/cjs/D178aT-dgy-ngzYG.cjs +6 -0
  33. package/browser/cjs/D5z-zqUVI3G9JXBC.cjs +1501 -0
  34. package/browser/cjs/D68uE8Ovq38Aj-88.cjs +330 -0
  35. package/browser/cjs/D8mjDoZ4Yyous_Fc.cjs +6 -0
  36. package/browser/cjs/DASsVvQwE2-IWxLR.cjs +6 -0
  37. package/browser/cjs/DBavSByKdf-juvFm.cjs +32 -0
  38. package/browser/cjs/DHRZzqw46ad6Mtw6.cjs +6 -0
  39. package/browser/cjs/DJZBxKlTP03_1kyT.cjs +6 -0
  40. package/browser/cjs/DKq35Q191eW-MovK.cjs +6 -0
  41. package/browser/cjs/DMUFBhoYpT3ai2Sb.cjs +6 -0
  42. package/browser/cjs/DX2XUDUIVBx4UFrJ.cjs +6 -0
  43. package/browser/cjs/DdzEWCcupF-0WS8y.cjs +11 -0
  44. package/browser/cjs/Dg9j6yGv8nrILfzN.cjs +6 -0
  45. package/browser/cjs/DjB9MJwDT6_HgF4U.cjs +6 -0
  46. package/browser/cjs/Dl5mwbo0ahDUm0he.cjs +6 -0
  47. package/browser/cjs/DmT6vIsFpZJ2c8cx.cjs +15 -0
  48. package/browser/cjs/Hi6aVJR9PyRbNYjO.cjs +6 -0
  49. package/browser/cjs/K7QHOvYV_yvLLjsS.cjs +6 -0
  50. package/browser/cjs/LhLQSvaxn8yxAIwj.cjs +6 -0
  51. package/browser/cjs/MgEzGw411nlqjqfH.cjs +42 -0
  52. package/browser/cjs/WJXT0W6bS3bZdAUV.cjs +6 -0
  53. package/browser/cjs/f_Vbi-Lelt9tKZrz.cjs +19 -0
  54. package/browser/cjs/index.cjs +2 -80
  55. package/browser/cjs/tNT3tUxdeIp_Iq2Y.cjs +7 -0
  56. package/browser/cjs/vNEwUuTKk3qucC3P.cjs +6 -0
  57. package/browser/cjs/xMzLyo_gIl82xG8k.cjs +6 -0
  58. package/browser/cjs/yc1bXLJ1yRhBFy0X.cjs +124 -0
  59. package/browser/esm/2fFz5u9jPgrNzcVF.mjs +21 -0
  60. package/browser/esm/2kXHnuU_uz-F9i1S.mjs +44550 -0
  61. package/browser/esm/5F1_gQbzWEFsWO0i.mjs +84 -0
  62. package/browser/esm/9MchcnSGrYDjX4zQ.mjs +46 -0
  63. package/browser/esm/Af7aikoKHz0rpjfv.mjs +10 -0
  64. package/browser/esm/B1Kc7dS9N2PVqxMT.mjs +10 -0
  65. package/browser/esm/B8ePgT5XZ0JlU3T6.mjs +1352 -0
  66. package/browser/esm/B8uy0BSOVjfUw27f.mjs +12 -0
  67. package/browser/esm/BFweWj2oKpTGl7m3.mjs +1672 -0
  68. package/browser/esm/BLseM2hNBI2PgQaX.mjs +13391 -0
  69. package/browser/esm/BUNUi9F3xbjfUKty.mjs +24 -0
  70. package/browser/esm/BV3ROKbw5yMVArqX.mjs +10 -0
  71. package/browser/esm/BXKXqOluLdKs4-V0.mjs +3802 -0
  72. package/browser/esm/BZpMA4DGM1kbVAKF.mjs +10 -0
  73. package/browser/esm/Bg59p3YlNG6o7-M3.mjs +260 -0
  74. package/browser/esm/BlFzVqIUaXFtDy81.mjs +10 -0
  75. package/browser/esm/BtBECeJ4mwD7SUx8.mjs +3936 -0
  76. package/browser/esm/Buw1VxSLsNI8pSYS.mjs +5585 -0
  77. package/browser/esm/BxoWypkKac-_VAm5.mjs +39 -0
  78. package/browser/esm/By3EkyTg3ZYh63C7.mjs +56 -0
  79. package/browser/esm/CDu4VlyMAQ3nxTQG.mjs +10 -0
  80. package/browser/esm/CJ9ZL3uskq3W6s-m.mjs +10 -0
  81. package/browser/esm/CP_sGa9QGT2Nq5ym.mjs +1702 -0
  82. package/browser/esm/CaIFrnjL0xBOtFfM.mjs +10 -0
  83. package/browser/esm/CeP-AnEtOGkuxLqE.mjs +10 -0
  84. package/browser/esm/CjScjxhY2mD7nPZA.mjs +633 -0
  85. package/browser/esm/CozWNYg-NXzV84fz.mjs +10 -0
  86. package/browser/esm/Cprnt9pNXzIiMmkN.mjs +29 -0
  87. package/browser/esm/Cq-wjvtZ92uenxU1.mjs +20 -0
  88. package/browser/esm/CsVeeu8D1A8I-BbH.mjs +1575 -0
  89. package/browser/esm/CzMxOWYq4nqRtKmm.mjs +1366 -0
  90. package/browser/esm/D9MGSJr45cVRF75O.mjs +1466 -0
  91. package/browser/esm/DAUV_w2uv0nHdk5N.mjs +10 -0
  92. package/browser/esm/DIypkIIonThPr-Vt.mjs +47 -0
  93. package/browser/esm/DOG1CaEQVF1sTUFi.mjs +10 -0
  94. package/browser/esm/DOv9FndcEVmQ2LJK.mjs +392 -0
  95. package/browser/esm/DSCVDOwTpDzUVuFj.mjs +10 -0
  96. package/browser/esm/DYF-8AnNDaQUy3aL.mjs +2344 -0
  97. package/browser/esm/Dd0avXHDTPFrx-ot.mjs +44 -0
  98. package/browser/esm/DdQY6IuT4OziHv5i.mjs +48 -0
  99. package/browser/esm/DfRKIODWn8ElqMWa.mjs +425 -0
  100. package/browser/esm/Dfbzljrnj4KrvtaN.mjs +10 -0
  101. package/browser/esm/DfdWpPG9ZcbRBGUg.mjs +10 -0
  102. package/browser/esm/Di8JLQMx61fnrhOn.mjs +10 -0
  103. package/browser/esm/DirXlaTG7TKxrqSR.mjs +10 -0
  104. package/browser/esm/DjGdyf6zsnIMRkQb.mjs +41 -0
  105. package/browser/esm/Dm4Fun7UoovVHafs.mjs +147 -0
  106. package/browser/esm/DwpS4SI4gT1eqfOs.mjs +10 -0
  107. package/browser/esm/DzZDYedlR-CIW2TI.mjs +21 -0
  108. package/browser/esm/HlyDPlaZCA3IOmF2.mjs +2081 -0
  109. package/browser/esm/PzIeb5aTX9JzTTfm.mjs +424 -0
  110. package/browser/esm/{NBuS53B7u8hItiXf.mjs → QPkYQWSepZNIhJst.mjs} +937 -933
  111. package/browser/esm/UENfAV2nBd83yFu7.mjs +10 -0
  112. package/browser/esm/YYqCu_-Z9nzvEseu.mjs +10 -0
  113. package/browser/esm/aEhgzbKqmuKv1oqm.mjs +10 -0
  114. package/browser/esm/bxGRTnY732xGNtpL.mjs +10 -0
  115. package/browser/esm/index.mjs +4 -176
  116. package/browser/esm/zQSjT9VbN7kMDV88.mjs +21 -0
  117. package/cdn/assets/2fFz5u9jPgrNzcVF.js +21 -0
  118. package/cdn/assets/7ZUzaBw_VH3Cvii1.js +1702 -0
  119. package/cdn/assets/7bmIdE8Moi7orOeU.js +50 -0
  120. package/cdn/assets/Af7aikoKHz0rpjfv.js +10 -0
  121. package/cdn/assets/B1Kc7dS9N2PVqxMT.js +10 -0
  122. package/cdn/assets/B6QHusAaPSos46yi.js +3802 -0
  123. package/cdn/assets/B8ePgT5XZ0JlU3T6.js +1352 -0
  124. package/cdn/assets/B8uy0BSOVjfUw27f.js +12 -0
  125. package/cdn/assets/BFweWj2oKpTGl7m3.js +1672 -0
  126. package/cdn/assets/BGF-bSrwdriQTytG.js +1466 -0
  127. package/cdn/assets/BLseM2hNBI2PgQaX.js +13391 -0
  128. package/cdn/assets/BQvzpOcCO8uM_ZaF.js +46 -0
  129. package/cdn/assets/BUNUi9F3xbjfUKty.js +24 -0
  130. package/cdn/assets/BV3ROKbw5yMVArqX.js +10 -0
  131. package/cdn/assets/BZpMA4DGM1kbVAKF.js +10 -0
  132. package/cdn/assets/BlFzVqIUaXFtDy81.js +10 -0
  133. package/cdn/assets/BrwV_8GjxcVuWuUk.js +44377 -0
  134. package/cdn/assets/C7SHJrlOqTIZCB3t.js +41 -0
  135. package/cdn/assets/CCbJipmDawMQQxRJ.js +36 -0
  136. package/cdn/assets/CDu4VlyMAQ3nxTQG.js +10 -0
  137. package/cdn/assets/CEcpUxbZ1W-G1EPq.js +2346 -0
  138. package/cdn/assets/CJ9ZL3uskq3W6s-m.js +10 -0
  139. package/cdn/assets/CaIFrnjL0xBOtFfM.js +10 -0
  140. package/cdn/assets/CaN0O_koLgCkhgEh.js +1575 -0
  141. package/cdn/assets/CeP-AnEtOGkuxLqE.js +10 -0
  142. package/cdn/assets/CjScjxhY2mD7nPZA.js +633 -0
  143. package/cdn/assets/ClkFsS16G5memDzX.js +22 -0
  144. package/cdn/assets/CmUGAy0Bu36DiwJO.js +84 -0
  145. package/cdn/assets/CozWNYg-NXzV84fz.js +10 -0
  146. package/cdn/assets/CsYr_9x-OIQSqGIL.js +27 -0
  147. package/cdn/assets/CzEv6qEIPTHOwOdU.js +2083 -0
  148. package/cdn/assets/CzMF1riupKc6HLGE.js +6481 -0
  149. package/cdn/assets/CzMxOWYq4nqRtKmm.js +1366 -0
  150. package/cdn/assets/D-W_ANt_qJ9dfGy9.js +425 -0
  151. package/cdn/assets/DAI9BFZBDQlMP1v4.js +149 -0
  152. package/cdn/assets/DAUV_w2uv0nHdk5N.js +10 -0
  153. package/cdn/assets/DOG1CaEQVF1sTUFi.js +10 -0
  154. package/cdn/assets/DSCVDOwTpDzUVuFj.js +10 -0
  155. package/cdn/assets/DSv3gXCV9xifjdta.js +23 -0
  156. package/cdn/assets/DaYZ-afnc3QhJo5R.js +58 -0
  157. package/cdn/assets/Dfbzljrnj4KrvtaN.js +10 -0
  158. package/cdn/assets/DfdWpPG9ZcbRBGUg.js +10 -0
  159. package/cdn/assets/Di8JLQMx61fnrhOn.js +10 -0
  160. package/cdn/assets/DirXlaTG7TKxrqSR.js +10 -0
  161. package/cdn/assets/DivRRrwWTqpDEOsE.js +392 -0
  162. package/cdn/assets/DlGa-wREL0uZB2Nx.js +43 -0
  163. package/cdn/assets/DlMH1vSjXgvZMwQJ.js +90 -0
  164. package/cdn/assets/Dml7K4XhLTRwUDTY.js +27 -0
  165. package/cdn/assets/DwpS4SI4gT1eqfOs.js +10 -0
  166. package/cdn/assets/G0GROjU63_EPzAF7.js +241 -0
  167. package/cdn/assets/NoCZPCkSed8lQpNi.js +46 -0
  168. package/cdn/assets/O-MB9oo65vbYOjfG.js +260 -0
  169. package/cdn/assets/PzIeb5aTX9JzTTfm.js +424 -0
  170. package/cdn/assets/UENfAV2nBd83yFu7.js +10 -0
  171. package/cdn/assets/V2bW77WyjoyjJMvZ.js +5585 -0
  172. package/cdn/assets/YJiNeqIJTFYDQPxS.js +3936 -0
  173. package/cdn/assets/YYqCu_-Z9nzvEseu.js +10 -0
  174. package/cdn/assets/Yp0FxpbZyyvU_u6y.js +49 -0
  175. package/cdn/assets/aEhgzbKqmuKv1oqm.js +10 -0
  176. package/cdn/assets/bxGRTnY732xGNtpL.js +10 -0
  177. package/cdn/assets/djN8Su_7GYF42GqX.js +21 -0
  178. package/cdn/assets/m-A0SfNBx32zKuZU.js +29 -0
  179. package/cdn/assets/uvZYEIW4EfvcdsXG.js +12 -0
  180. package/cdn/assets/zZGhctwBXNlAYrJr.js +21 -0
  181. package/cdn/index.js +2 -2
  182. package/cdn/loader.js +1 -1
  183. package/package.json +3 -3
  184. package/cdn/assets/CY8njwo06MWkoPz2.js +0 -21
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.5.0
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
+ const e = { AND: { s: "Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE", p: { logical: { d: "logical1,logical2,... are 1 to 255 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references" } } }, BYCOL: { s: "Applies a LAMBDA function to each column and returns an array of the results.", p: { array: { d: "is an array to be separated by column" }, fn: { d: "is a LAMBDA that is called to scan the array. The LAMBDA takes two parameters, accumulator and value." } }, h: "Unimplemented" }, BYROW: { s: "Applies a LAMBDA function to each row and returns an array of the results.", p: { array: { d: "is an array to be separated by column" }, fn: { d: "is a LAMBDA that is called to scan the array. The LAMBDA takes two parameters, accumulator and value." } }, h: "Unimplemented" }, FALSE: { s: "Returns the logical value FALSE", p: {} }, IF: { s: "Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE", p: { logicalTest: { d: "is any value or expression that can be evaluated to TRUE or FALSE" }, valueIfTrue: { d: "is the value that is returned if Logical_test is TRUE. If omitted, TRUE is returned. You can nest up to seven IF functions" }, valueIfFalse: { d: "is the value that is returned if Logical_test is FALSE. If omitted, FALSE is returned" } } }, IFERROR: { s: "Returns value_if_error if expression is an error and the value of the expression itself otherwise", p: { value: { d: "is any value or expression or reference" }, valueIfError: { d: "is any value or expression or reference" } } }, IFNA: { s: "Returns the value you specify if the expression resolves to #N/A, otherwise returns the result of the expression", p: { value: { d: "is any value or expression or reference" }, valueIfError: { d: "is any value or expression or reference" } } }, IFS: { s: "Checks whether one or more conditions are met and returns a value corresponding to the first TRUE condition", p: { logicalTest: { d: "logical_test1,logical_test2,... is any value or expression that can be evaluated to TRUE or FALSE" }, logicalTrue: { d: "value_if_true1,value_if_true2,... is the value returned if Logical_test is TRUE" }, rest: {} } }, LAMDA: { s: "Creates a function value with can be called within formulas.", p: { parameterOrCalculation: { d: "a parameter or a calculation that returns a value. If a parameter, it must be the last argument." } }, h: "Unimplemented" }, LET: { s: "Assigns calculation results to names. Useful for storing intermediate calculations and values by defining names inside a formula. These names only apply within the scope of the LET function.", p: { name: { d: "name1,name2,... the name, or a calculation which can make use of all names within the LET. Names must start with a letter, cannot be the output of a formula, or conflict with range syntax." }, nameOrValue: { d: "name_value1,name_value2,... the value associated with the name." }, calculationOrName: {}, rest: {} }, h: "Unimplemented" }, MAKEARRAY: { s: "Returns a calculated array of a specified row and column size, by applying a LAMBDA function.", p: { rows: { d: "is the number of rows in the array. Must be greater than zero." }, columns: { d: "is the number of columns in the array. Must be greater than zero." }, fn: { d: "is a LAMBDA that is called to create the array. The LAMBDA takes two parameters, row index and column index." } }, h: "Unimplemented" }, MAP: { s: "Returns an array formed by 'mapping' each value in the array(s) to a new value by applying a lambda to create a new value.", p: { array: { d: "is an array to be mapped" }, lamdaOrArray: { d: "lambda_or_array1,lambda_or_array2,... is a LAMBDA which must be the last argument and must have a parameter for each array passed, or another array to be mapped" } }, h: "Unimplemented" }, NOT: { s: "Changes FALSE to TRUE, or TRUE to FALSE", p: { logical: { d: "is a value or expression that can be evaluated to TRUE or FALSE" } } }, OR: { s: "Checks whether any of the arguments are TRUE, and returns TRUE or FALSE. Returns FALSE only if all arguments are FALSE", p: { logical: { d: "logical1,logical2,... are 1 to 255 conditions that you want to test that can be either TRUE or FALSE" } } }, REDUCE: { s: "Reduces an array to an accumulated value by applying a LAMBDA function to each value and returning the total value in the accumulator.", p: { initialValue: { d: "is the starting value for the accumulator" }, array: { d: "is an array to be reduced" }, fn: { d: "is a LAMBDA that is called to reduce the array. The LAMBDA takes two parameters, accumulator and value." } }, h: "Unimplemented" }, SCAN: { s: "Scans an array by applying a LAMBDA function to each value and returns an array that has each intermediate value", p: { initialValue: { d: "is the starting value for the accumulator" }, array: { d: "is an array to be reduced" }, fn: { d: "is a LAMBDA that is called to reduce the array. The LAMBDA takes two parameters, accumulator and value." } }, h: "Unimplemented" }, SWITCH: { s: "Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value is returned", p: { expression: {}, value: { d: "is an expression to be evaluated" }, results: { d: "result1,result2,... is a result to be returned if the corresponding value matches expression" } }, h: "Unimplemented" }, TRUE: { s: "Returns the logical value TRUE", p: {} }, XOR: { s: "Returns a logical 'Exclusive Or' of all arguments", p: { logical: { d: "logical1,logical2,... are 1 to 254 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references" } } } };
8
+ export {
9
+ e as default
10
+ };
@@ -0,0 +1,633 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.5.0
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 v(t) {
8
+ return Array.isArray ? Array.isArray(t) : Fe(t) === "[object Array]";
9
+ }
10
+ function L(t) {
11
+ return typeof t == "string";
12
+ }
13
+ function Ce(t) {
14
+ return typeof t == "number";
15
+ }
16
+ function me(t) {
17
+ return typeof t == "object";
18
+ }
19
+ function F(t) {
20
+ return t != null;
21
+ }
22
+ function te(t) {
23
+ return !t.trim().length;
24
+ }
25
+ function Fe(t) {
26
+ return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
27
+ }
28
+ const le = Object.prototype.hasOwnProperty;
29
+ class Ie {
30
+ constructor(e) {
31
+ this._keys = [], this._keyMap = {};
32
+ let s = 0;
33
+ e.forEach((i) => {
34
+ let n = Me(i);
35
+ this._keys.push(n), this._keyMap[n.id] = n, s += n.weight;
36
+ }), this._keys.forEach((i) => {
37
+ i.weight /= s;
38
+ });
39
+ }
40
+ get(e) {
41
+ return this._keyMap[e];
42
+ }
43
+ keys() {
44
+ return this._keys;
45
+ }
46
+ toJSON() {
47
+ return JSON.stringify(this._keys);
48
+ }
49
+ }
50
+ function Me(t) {
51
+ let e = null, s = null, i = null, n = 1, r = null;
52
+ if (L(t) || v(t)) i = t, e = de(t), s = ie(t);
53
+ else {
54
+ if (!le.call(t, "name")) throw new Error("Missing name property in key");
55
+ const u = t.name;
56
+ if (i = u, le.call(t, "weight") && (n = t.weight, n <= 0)) throw new Error(`Property 'weight' in key '${u}' must be a positive integer`);
57
+ e = de(u), s = ie(u), r = t.getFn;
58
+ }
59
+ return { path: e, id: s, weight: n, src: i, getFn: r };
60
+ }
61
+ function de(t) {
62
+ return v(t) ? t : t.split(".");
63
+ }
64
+ function ie(t) {
65
+ return v(t) ? t.join(".") : t;
66
+ }
67
+ 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) {
68
+ let s = [], i = !1;
69
+ const n = (r, u, h) => {
70
+ if (F(r)) if (u[h]) {
71
+ const a = r[u[h]];
72
+ if (!F(a)) return;
73
+ if (h === u.length - 1 && (L(a) || Ce(a) || function(o) {
74
+ return o === !0 || o === !1 || me(d = o) && d !== null && Fe(o) == "[object Boolean]";
75
+ var d;
76
+ }(a))) s.push((c = a) == null ? "" : function(o) {
77
+ if (typeof o == "string") return o;
78
+ let d = o + "";
79
+ return d == "0" && 1 / o == -1 / 0 ? "-0" : d;
80
+ }(c));
81
+ else if (v(a)) {
82
+ i = !0;
83
+ for (let o = 0, d = a.length; o < d; o += 1) n(a[o], u, h + 1);
84
+ } else u.length && n(a, u, h + 1);
85
+ } else s.push(r);
86
+ var c;
87
+ };
88
+ return n(t, L(e) ? e.split(".") : e, 0), i ? s : s[0];
89
+ }, ignoreLocation: !1, ignoreFieldNorm: !1, fieldNormWeight: 1 };
90
+ const we = /[^ ]+/g;
91
+ class ce {
92
+ constructor({ getFn: e = l.getFn, fieldNormWeight: s = l.fieldNormWeight } = {}) {
93
+ this.norm = function(i = 1, n = 3) {
94
+ const r = /* @__PURE__ */ new Map(), u = Math.pow(10, n);
95
+ return { get(h) {
96
+ const c = h.match(we).length;
97
+ if (r.has(c)) return r.get(c);
98
+ const a = 1 / Math.pow(c, 0.5 * i), o = parseFloat(Math.round(a * u) / u);
99
+ return r.set(c, o), o;
100
+ }, clear() {
101
+ r.clear();
102
+ } };
103
+ }(s, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
104
+ }
105
+ setSources(e = []) {
106
+ this.docs = e;
107
+ }
108
+ setIndexRecords(e = []) {
109
+ this.records = e;
110
+ }
111
+ setKeys(e = []) {
112
+ this.keys = e, this._keysMap = {}, e.forEach((s, i) => {
113
+ this._keysMap[s.id] = i;
114
+ });
115
+ }
116
+ create() {
117
+ !this.isCreated && this.docs.length && (this.isCreated = !0, L(this.docs[0]) ? this.docs.forEach((e, s) => {
118
+ this._addString(e, s);
119
+ }) : this.docs.forEach((e, s) => {
120
+ this._addObject(e, s);
121
+ }), this.norm.clear());
122
+ }
123
+ add(e) {
124
+ const s = this.size();
125
+ L(e) ? this._addString(e, s) : this._addObject(e, s);
126
+ }
127
+ removeAt(e) {
128
+ this.records.splice(e, 1);
129
+ for (let s = e, i = this.size(); s < i; s += 1) this.records[s].i -= 1;
130
+ }
131
+ getValueForItemAtKeyId(e, s) {
132
+ return e[this._keysMap[s]];
133
+ }
134
+ size() {
135
+ return this.records.length;
136
+ }
137
+ _addString(e, s) {
138
+ if (!F(e) || te(e)) return;
139
+ let i = { v: e, i: s, n: this.norm.get(e) };
140
+ this.records.push(i);
141
+ }
142
+ _addObject(e, s) {
143
+ let i = { i: s, $: {} };
144
+ this.keys.forEach((n, r) => {
145
+ let u = n.getFn ? n.getFn(e) : this.getFn(e, n.path);
146
+ if (F(u)) {
147
+ if (v(u)) {
148
+ let h = [];
149
+ const c = [{ nestedArrIndex: -1, value: u }];
150
+ for (; c.length; ) {
151
+ const { nestedArrIndex: a, value: o } = c.pop();
152
+ if (F(o)) if (L(o) && !te(o)) {
153
+ let d = { v: o, i: a, n: this.norm.get(o) };
154
+ h.push(d);
155
+ } else v(o) && o.forEach((d, f) => {
156
+ c.push({ nestedArrIndex: f, value: d });
157
+ });
158
+ }
159
+ i.$[r] = h;
160
+ } else if (L(u) && !te(u)) {
161
+ let h = { v: u, n: this.norm.get(u) };
162
+ i.$[r] = h;
163
+ }
164
+ }
165
+ }), this.records.push(i);
166
+ }
167
+ toJSON() {
168
+ return { keys: this.keys, records: this.records };
169
+ }
170
+ }
171
+ function Ee(t, e, { getFn: s = l.getFn, fieldNormWeight: i = l.fieldNormWeight } = {}) {
172
+ const n = new ce({ getFn: s, fieldNormWeight: i });
173
+ return n.setKeys(t.map(Me)), n.setSources(e), n.create(), n;
174
+ }
175
+ function X(t, { errors: e = 0, currentLocation: s = 0, expectedLocation: i = 0, distance: n = l.distance, ignoreLocation: r = l.ignoreLocation } = {}) {
176
+ const u = e / t.length;
177
+ if (r) return u;
178
+ const h = Math.abs(i - s);
179
+ return n ? u + h / n : h ? 1 : u;
180
+ }
181
+ const z = 32;
182
+ function $e(t) {
183
+ let e = {};
184
+ for (let s = 0, i = t.length; s < i; s += 1) {
185
+ const n = t.charAt(s);
186
+ e[n] = (e[n] || 0) | 1 << i - s - 1;
187
+ }
188
+ return e;
189
+ }
190
+ const Y = 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;
191
+ class De {
192
+ constructor(e, { location: s = l.location, threshold: i = l.threshold, distance: n = l.distance, includeMatches: r = l.includeMatches, findAllMatches: u = l.findAllMatches, minMatchCharLength: h = l.minMatchCharLength, isCaseSensitive: c = l.isCaseSensitive, ignoreDiacritics: a = l.ignoreDiacritics, ignoreLocation: o = l.ignoreLocation } = {}) {
193
+ if (this.options = { location: s, threshold: i, distance: n, includeMatches: r, findAllMatches: u, minMatchCharLength: h, isCaseSensitive: c, ignoreDiacritics: a, ignoreLocation: o }, e = c ? e : e.toLowerCase(), e = a ? Y(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length) return;
194
+ const d = (g, p) => {
195
+ this.chunks.push({ pattern: g, alphabet: $e(g), startIndex: p });
196
+ }, f = this.pattern.length;
197
+ if (f > z) {
198
+ let g = 0;
199
+ const p = f % z, A = f - p;
200
+ for (; g < A; ) d(this.pattern.substr(g, z), g), g += z;
201
+ if (p) {
202
+ const m = f - z;
203
+ d(this.pattern.substr(m), m);
204
+ }
205
+ } else d(this.pattern, 0);
206
+ }
207
+ searchIn(e) {
208
+ const { isCaseSensitive: s, ignoreDiacritics: i, includeMatches: n } = this.options;
209
+ if (e = s ? e : e.toLowerCase(), e = i ? Y(e) : e, this.pattern === e) {
210
+ let A = { isMatch: !0, score: 0 };
211
+ return n && (A.indices = [[0, e.length - 1]]), A;
212
+ }
213
+ const { location: r, distance: u, threshold: h, findAllMatches: c, minMatchCharLength: a, ignoreLocation: o } = this.options;
214
+ let d = [], f = 0, g = !1;
215
+ this.chunks.forEach(({ pattern: A, alphabet: m, startIndex: _ }) => {
216
+ const { isMatch: N, score: w, indices: S } = function(k, $, Le, { location: ke = l.location, distance: J = l.distance, threshold: ve = l.threshold, findAllMatches: _e = l.findAllMatches, minMatchCharLength: he = l.minMatchCharLength, includeMatches: ae = l.includeMatches, ignoreLocation: V = l.ignoreLocation } = {}) {
217
+ if ($.length > z) throw new Error("Pattern length exceeds max of 32.");
218
+ const R = $.length, K = k.length, y = Math.max(0, Math.min(ke, K));
219
+ let O = ve, b = y;
220
+ const Q = he > 1 || ae, Z = Q ? Array(K) : [];
221
+ let U;
222
+ for (; (U = k.indexOf($, b)) > -1; ) {
223
+ let M = X($, { currentLocation: U, expectedLocation: y, distance: J, ignoreLocation: V });
224
+ if (O = Math.min(M, O), b = U + R, Q) {
225
+ let E = 0;
226
+ for (; E < R; ) Z[U + E] = 1, E += 1;
227
+ }
228
+ }
229
+ b = -1;
230
+ let G = [], H = 1, T = R + K;
231
+ const Se = 1 << R - 1;
232
+ for (let M = 0; M < R; M += 1) {
233
+ let E = 0, B = T;
234
+ for (; E < B; ) X($, { errors: M, currentLocation: y + B, expectedLocation: y, distance: J, ignoreLocation: V }) <= O ? E = B : T = B, B = Math.floor((T - E) / 2 + E);
235
+ T = B;
236
+ let j = Math.max(1, y - B + 1), D = _e ? K : Math.min(y + B, K) + R, x = Array(D + 2);
237
+ x[D + 1] = (1 << M) - 1;
238
+ for (let C = D; C >= j; C -= 1) {
239
+ let W = C - 1, P = Le[k.charAt(W)];
240
+ if (Q && (Z[W] = +!!P), x[C] = (x[C + 1] << 1 | 1) & P, M && (x[C] |= (G[C + 1] | G[C]) << 1 | 1 | G[C + 1]), x[C] & Se && (H = X($, { errors: M, currentLocation: W, expectedLocation: y, distance: J, ignoreLocation: V }), H <= O)) {
241
+ if (O = H, b = W, b <= y) break;
242
+ j = Math.max(1, 2 * y - b);
243
+ }
244
+ }
245
+ if (X($, { errors: M + 1, currentLocation: y, expectedLocation: y, distance: J, ignoreLocation: V }) > O) break;
246
+ G = x;
247
+ }
248
+ const ee = { isMatch: b >= 0, score: Math.max(1e-3, H) };
249
+ if (Q) {
250
+ const M = function(E = [], B = l.minMatchCharLength) {
251
+ let j = [], D = -1, x = -1, C = 0;
252
+ for (let W = E.length; C < W; C += 1) {
253
+ let P = E[C];
254
+ P && D === -1 ? D = C : P || D === -1 || (x = C - 1, x - D + 1 >= B && j.push([D, x]), D = -1);
255
+ }
256
+ return E[C - 1] && C - D >= B && j.push([D, C - 1]), j;
257
+ }(Z, he);
258
+ M.length ? ae && (ee.indices = M) : ee.isMatch = !1;
259
+ }
260
+ return ee;
261
+ }(e, A, m, { location: r + _, distance: u, threshold: h, findAllMatches: c, minMatchCharLength: a, includeMatches: n, ignoreLocation: o });
262
+ N && (g = !0), f += w, N && S && (d = [...d, ...S]);
263
+ });
264
+ let p = { isMatch: g, score: g ? f / this.chunks.length : 1 };
265
+ return g && n && (p.indices = d), p;
266
+ }
267
+ }
268
+ class I {
269
+ constructor(e) {
270
+ this.pattern = e;
271
+ }
272
+ static isMultiMatch(e) {
273
+ return ge(e, this.multiRegex);
274
+ }
275
+ static isSingleMatch(e) {
276
+ return ge(e, this.singleRegex);
277
+ }
278
+ search() {
279
+ }
280
+ }
281
+ function ge(t, e) {
282
+ const s = t.match(e);
283
+ return s ? s[1] : null;
284
+ }
285
+ class ye extends I {
286
+ constructor(e, { location: s = l.location, threshold: i = l.threshold, distance: n = l.distance, includeMatches: r = l.includeMatches, findAllMatches: u = l.findAllMatches, minMatchCharLength: h = l.minMatchCharLength, isCaseSensitive: c = l.isCaseSensitive, ignoreDiacritics: a = l.ignoreDiacritics, ignoreLocation: o = l.ignoreLocation } = {}) {
287
+ super(e), this._bitapSearch = new De(e, { location: s, threshold: i, distance: n, includeMatches: r, findAllMatches: u, minMatchCharLength: h, isCaseSensitive: c, ignoreDiacritics: a, ignoreLocation: o });
288
+ }
289
+ static get type() {
290
+ return "fuzzy";
291
+ }
292
+ static get multiRegex() {
293
+ return /^"(.*)"$/;
294
+ }
295
+ static get singleRegex() {
296
+ return /^(.*)$/;
297
+ }
298
+ search(e) {
299
+ return this._bitapSearch.searchIn(e);
300
+ }
301
+ }
302
+ class Be extends I {
303
+ constructor(e) {
304
+ super(e);
305
+ }
306
+ static get type() {
307
+ return "include";
308
+ }
309
+ static get multiRegex() {
310
+ return /^'"(.*)"$/;
311
+ }
312
+ static get singleRegex() {
313
+ return /^'(.*)$/;
314
+ }
315
+ search(e) {
316
+ let s, i = 0;
317
+ const n = [], r = this.pattern.length;
318
+ for (; (s = e.indexOf(this.pattern, i)) > -1; ) i = s + r, n.push([s, i - 1]);
319
+ const u = !!n.length;
320
+ return { isMatch: u, score: u ? 0 : 1, indices: n };
321
+ }
322
+ }
323
+ const ne = [class extends I {
324
+ constructor(t) {
325
+ super(t);
326
+ }
327
+ static get type() {
328
+ return "exact";
329
+ }
330
+ static get multiRegex() {
331
+ return /^="(.*)"$/;
332
+ }
333
+ static get singleRegex() {
334
+ return /^=(.*)$/;
335
+ }
336
+ search(t) {
337
+ const e = t === this.pattern;
338
+ return { isMatch: e, score: e ? 0 : 1, indices: [0, this.pattern.length - 1] };
339
+ }
340
+ }, Be, class extends I {
341
+ constructor(t) {
342
+ super(t);
343
+ }
344
+ static get type() {
345
+ return "prefix-exact";
346
+ }
347
+ static get multiRegex() {
348
+ return /^\^"(.*)"$/;
349
+ }
350
+ static get singleRegex() {
351
+ return /^\^(.*)$/;
352
+ }
353
+ search(t) {
354
+ const e = t.startsWith(this.pattern);
355
+ return { isMatch: e, score: e ? 0 : 1, indices: [0, this.pattern.length - 1] };
356
+ }
357
+ }, class extends I {
358
+ constructor(t) {
359
+ super(t);
360
+ }
361
+ static get type() {
362
+ return "inverse-prefix-exact";
363
+ }
364
+ static get multiRegex() {
365
+ return /^!\^"(.*)"$/;
366
+ }
367
+ static get singleRegex() {
368
+ return /^!\^(.*)$/;
369
+ }
370
+ search(t) {
371
+ const e = !t.startsWith(this.pattern);
372
+ return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
373
+ }
374
+ }, class extends I {
375
+ constructor(t) {
376
+ super(t);
377
+ }
378
+ static get type() {
379
+ return "inverse-suffix-exact";
380
+ }
381
+ static get multiRegex() {
382
+ return /^!"(.*)"\$$/;
383
+ }
384
+ static get singleRegex() {
385
+ return /^!(.*)\$$/;
386
+ }
387
+ search(t) {
388
+ const e = !t.endsWith(this.pattern);
389
+ return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
390
+ }
391
+ }, class extends I {
392
+ constructor(t) {
393
+ super(t);
394
+ }
395
+ static get type() {
396
+ return "suffix-exact";
397
+ }
398
+ static get multiRegex() {
399
+ return /^"(.*)"\$$/;
400
+ }
401
+ static get singleRegex() {
402
+ return /^(.*)\$$/;
403
+ }
404
+ search(t) {
405
+ const e = t.endsWith(this.pattern);
406
+ return { isMatch: e, score: e ? 0 : 1, indices: [t.length - this.pattern.length, t.length - 1] };
407
+ }
408
+ }, class extends I {
409
+ constructor(t) {
410
+ super(t);
411
+ }
412
+ static get type() {
413
+ return "inverse-exact";
414
+ }
415
+ static get multiRegex() {
416
+ return /^!"(.*)"$/;
417
+ }
418
+ static get singleRegex() {
419
+ return /^!(.*)$/;
420
+ }
421
+ search(t) {
422
+ const e = t.indexOf(this.pattern) === -1;
423
+ return { isMatch: e, score: e ? 0 : 1, indices: [0, t.length - 1] };
424
+ }
425
+ }, ye], fe = ne.length, be = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Ne = /* @__PURE__ */ new Set([ye.type, Be.type]), re = [];
426
+ function ue(t, e) {
427
+ for (let s = 0, i = re.length; s < i; s += 1) {
428
+ let n = re[s];
429
+ if (n.condition(t, e)) return new n(t, e);
430
+ }
431
+ return new De(t, e);
432
+ }
433
+ const oe = "$and", Ae = "$path", se = (t) => !(!t[oe] && !t.$or), pe = (t) => ({ [oe]: Object.keys(t).map((e) => ({ [e]: t[e] })) });
434
+ function xe(t, e, { auto: s = !0 } = {}) {
435
+ const i = (n) => {
436
+ let r = Object.keys(n);
437
+ const u = !!n[Ae];
438
+ if (!u && r.length > 1 && !se(n)) return i(pe(n));
439
+ if (((c) => !v(c) && me(c) && !se(c))(n)) {
440
+ const c = u ? n[Ae] : r[0], a = u ? n.$val : n[c];
441
+ if (!L(a)) throw new Error(`Invalid value for key ${c}`);
442
+ const o = { keyId: ie(c), pattern: a };
443
+ return s && (o.searcher = ue(a, e)), o;
444
+ }
445
+ let h = { children: [], operator: r[0] };
446
+ return r.forEach((c) => {
447
+ const a = n[c];
448
+ v(a) && a.forEach((o) => {
449
+ h.children.push(i(o));
450
+ });
451
+ }), h;
452
+ };
453
+ return se(t) || (t = pe(t)), i(t);
454
+ }
455
+ function Re(t, e) {
456
+ const s = t.matches;
457
+ e.matches = [], F(s) && s.forEach((i) => {
458
+ if (!F(i.indices) || !i.indices.length) return;
459
+ const { indices: n, value: r } = i;
460
+ let u = { indices: n, value: r };
461
+ i.key && (u.key = i.key.src), i.idx > -1 && (u.refIndex = i.idx), e.matches.push(u);
462
+ });
463
+ }
464
+ function Oe(t, e) {
465
+ e.score = t.score;
466
+ }
467
+ class q {
468
+ constructor(e, s = {}, i) {
469
+ this.options = { ...l, ...s }, this.options.useExtendedSearch, this._keyStore = new Ie(this.options.keys), this.setCollection(e, i);
470
+ }
471
+ setCollection(e, s) {
472
+ if (this._docs = e, s && !(s instanceof ce)) throw new Error("Incorrect 'index' type");
473
+ this._myIndex = s || Ee(this.options.keys, this._docs, { getFn: this.options.getFn, fieldNormWeight: this.options.fieldNormWeight });
474
+ }
475
+ add(e) {
476
+ F(e) && (this._docs.push(e), this._myIndex.add(e));
477
+ }
478
+ remove(e = () => !1) {
479
+ const s = [];
480
+ for (let i = 0, n = this._docs.length; i < n; i += 1) {
481
+ const r = this._docs[i];
482
+ e(r, i) && (this.removeAt(i), i -= 1, n -= 1, s.push(r));
483
+ }
484
+ return s;
485
+ }
486
+ removeAt(e) {
487
+ this._docs.splice(e, 1), this._myIndex.removeAt(e);
488
+ }
489
+ getIndex() {
490
+ return this._myIndex;
491
+ }
492
+ search(e, { limit: s = -1 } = {}) {
493
+ const { includeMatches: i, includeScore: n, shouldSort: r, sortFn: u, ignoreFieldNorm: h } = this.options;
494
+ let c = L(e) ? L(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
495
+ return function(a, { ignoreFieldNorm: o = l.ignoreFieldNorm }) {
496
+ a.forEach((d) => {
497
+ let f = 1;
498
+ d.matches.forEach(({ key: g, norm: p, score: A }) => {
499
+ const m = g ? g.weight : null;
500
+ f *= Math.pow(A === 0 && m ? Number.EPSILON : A, (m || 1) * (o ? 1 : p));
501
+ }), d.score = f;
502
+ });
503
+ }(c, { ignoreFieldNorm: h }), r && c.sort(u), Ce(s) && s > -1 && (c = c.slice(0, s)), function(a, o, { includeMatches: d = l.includeMatches, includeScore: f = l.includeScore } = {}) {
504
+ const g = [];
505
+ return d && g.push(Re), f && g.push(Oe), a.map((p) => {
506
+ const { idx: A } = p, m = { item: o[A], refIndex: A };
507
+ return g.length && g.forEach((_) => {
508
+ _(p, m);
509
+ }), m;
510
+ });
511
+ }(c, this._docs, { includeMatches: i, includeScore: n });
512
+ }
513
+ _searchStringList(e) {
514
+ const s = ue(e, this.options), { records: i } = this._myIndex, n = [];
515
+ return i.forEach(({ v: r, i: u, n: h }) => {
516
+ if (!F(r)) return;
517
+ const { isMatch: c, score: a, indices: o } = s.searchIn(r);
518
+ c && n.push({ item: r, idx: u, matches: [{ score: a, value: r, norm: h, indices: o }] });
519
+ }), n;
520
+ }
521
+ _searchLogical(e) {
522
+ const s = xe(e, this.options), i = (h, c, a) => {
523
+ if (!h.children) {
524
+ const { keyId: d, searcher: f } = h, g = this._findMatches({ key: this._keyStore.get(d), value: this._myIndex.getValueForItemAtKeyId(c, d), searcher: f });
525
+ return g && g.length ? [{ idx: a, item: c, matches: g }] : [];
526
+ }
527
+ const o = [];
528
+ for (let d = 0, f = h.children.length; d < f; d += 1) {
529
+ const g = h.children[d], p = i(g, c, a);
530
+ if (p.length) o.push(...p);
531
+ else if (h.operator === oe) return [];
532
+ }
533
+ return o;
534
+ }, n = this._myIndex.records, r = {}, u = [];
535
+ return n.forEach(({ $: h, i: c }) => {
536
+ if (F(h)) {
537
+ let a = i(s, h, c);
538
+ a.length && (r[c] || (r[c] = { idx: c, item: h, matches: [] }, u.push(r[c])), a.forEach(({ matches: o }) => {
539
+ r[c].matches.push(...o);
540
+ }));
541
+ }
542
+ }), u;
543
+ }
544
+ _searchObjectList(e) {
545
+ const s = ue(e, this.options), { keys: i, records: n } = this._myIndex, r = [];
546
+ return n.forEach(({ $: u, i: h }) => {
547
+ if (!F(u)) return;
548
+ let c = [];
549
+ i.forEach((a, o) => {
550
+ c.push(...this._findMatches({ key: a, value: u[o], searcher: s }));
551
+ }), c.length && r.push({ idx: h, item: u, matches: c });
552
+ }), r;
553
+ }
554
+ _findMatches({ key: e, value: s, searcher: i }) {
555
+ if (!F(s)) return [];
556
+ let n = [];
557
+ if (v(s)) s.forEach(({ v: r, i: u, n: h }) => {
558
+ if (!F(r)) return;
559
+ const { isMatch: c, score: a, indices: o } = i.searchIn(r);
560
+ c && n.push({ score: a, key: e, value: r, idx: u, norm: h, indices: o });
561
+ });
562
+ else {
563
+ const { v: r, n: u } = s, { isMatch: h, score: c, indices: a } = i.searchIn(r);
564
+ h && n.push({ score: c, key: e, value: r, norm: u, indices: a });
565
+ }
566
+ return n;
567
+ }
568
+ }
569
+ q.version = "7.1.0", q.createIndex = Ee, q.parseIndex = function(t, { getFn: e = l.getFn, fieldNormWeight: s = l.fieldNormWeight } = {}) {
570
+ const { keys: i, records: n } = t, r = new ce({ getFn: e, fieldNormWeight: s });
571
+ return r.setKeys(i), r.setIndexRecords(n), r;
572
+ }, q.config = l, q.parseQuery = xe, function(...t) {
573
+ re.push(...t);
574
+ }(class {
575
+ constructor(t, { isCaseSensitive: e = l.isCaseSensitive, ignoreDiacritics: s = l.ignoreDiacritics, includeMatches: i = l.includeMatches, minMatchCharLength: n = l.minMatchCharLength, ignoreLocation: r = l.ignoreLocation, findAllMatches: u = l.findAllMatches, location: h = l.location, threshold: c = l.threshold, distance: a = l.distance } = {}) {
576
+ this.query = null, this.options = { isCaseSensitive: e, ignoreDiacritics: s, includeMatches: i, minMatchCharLength: n, findAllMatches: u, ignoreLocation: r, location: h, threshold: c, distance: a }, t = e ? t : t.toLowerCase(), t = s ? Y(t) : t, this.pattern = t, this.query = function(o, d = {}) {
577
+ return o.split("|").map((f) => {
578
+ let g = f.trim().split(be).filter((A) => A && !!A.trim()), p = [];
579
+ for (let A = 0, m = g.length; A < m; A += 1) {
580
+ const _ = g[A];
581
+ let N = !1, w = -1;
582
+ for (; !N && ++w < fe; ) {
583
+ const S = ne[w];
584
+ let k = S.isMultiMatch(_);
585
+ k && (p.push(new S(k, d)), N = !0);
586
+ }
587
+ if (!N) for (w = -1; ++w < fe; ) {
588
+ const S = ne[w];
589
+ let k = S.isSingleMatch(_);
590
+ if (k) {
591
+ p.push(new S(k, d));
592
+ break;
593
+ }
594
+ }
595
+ }
596
+ return p;
597
+ });
598
+ }(this.pattern, this.options);
599
+ }
600
+ static condition(t, e) {
601
+ return e.useExtendedSearch;
602
+ }
603
+ searchIn(t) {
604
+ const e = this.query;
605
+ if (!e) return { isMatch: !1, score: 1 };
606
+ const { includeMatches: s, isCaseSensitive: i, ignoreDiacritics: n } = this.options;
607
+ t = i ? t : t.toLowerCase(), t = n ? Y(t) : t;
608
+ let r = 0, u = [], h = 0;
609
+ for (let c = 0, a = e.length; c < a; c += 1) {
610
+ const o = e[c];
611
+ u.length = 0, r = 0;
612
+ for (let d = 0, f = o.length; d < f; d += 1) {
613
+ const g = o[d], { isMatch: p, indices: A, score: m } = g.search(t);
614
+ if (!p) {
615
+ h = 0, r = 0, u.length = 0;
616
+ break;
617
+ }
618
+ if (r += 1, h += m, s) {
619
+ const _ = g.constructor.type;
620
+ Ne.has(_) ? u = [...u, ...A] : u.push(A);
621
+ }
622
+ }
623
+ if (r) {
624
+ let d = { isMatch: !0, score: h / r };
625
+ return s && (d.indices = u), d;
626
+ }
627
+ }
628
+ return { isMatch: !1, score: 1 };
629
+ }
630
+ });
631
+ export {
632
+ q as default
633
+ };
@@ -0,0 +1,22 @@
1
+ import { a } from "./CCbJipmDawMQQxRJ.js";
2
+ import { r as n } from "./Dml7K4XhLTRwUDTY.js";
3
+ import { T as S, S as T, B as k, a8 as D, F as N, k as w } from "./BrwV_8GjxcVuWuUk.js";
4
+ /**
5
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.5.0
6
+ *
7
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
8
+ * License: The license can be found at https://www.sheetxl.com/license.
9
+ */
10
+ const F = ["Ok", "Cancel"], I = n.memo((g) => {
11
+ const { tableOptions: t, context: p, onOption: r, onValidateOption: v, onDone: c, options: d = F, defaultOption: s = d?.[0], cancelOption: l = "Cancel", sx: m, ...x } = g, [h, O] = n.useState(!1), [o, b] = n.useState(() => t?.hasHeader ?? !1), [i, f] = n.useState(() => t?.ranges ?? null), j = S((e) => {
12
+ const u = { ...t, hasHeader: o, ranges: i };
13
+ r?.(e, e === l, e === s), c?.({ option: e, tableOptions: u });
14
+ }, [c, r, s, l, o, i, t]), C = n.useCallback(async (e, u) => null, []);
15
+ return a.jsx(T, { title: "Insert Table", options: d, onDone: j, onValidateOption: C, defaultOption: s, cancelOption: l, autoFocusSel: ".range-input input", sx: { width: "360px", ...m }, ...x, children: a.jsxs(k, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [a.jsx(D, { formName: "range", value: i, onChangeInput: (e) => f(e), resolvedAddress: p.getNames().getRanges.bind(p.getNames()), onFocus: (e) => {
16
+ h || e.target?.select(), O(!0);
17
+ } }), a.jsx(N, { control: a.jsx(w, { checked: o, onChange: () => b(!o) }), label: "Table has headers", labelPlacement: "end" })] }) });
18
+ });
19
+ export {
20
+ I as TableNewDialog,
21
+ I as default
22
+ };