@sheetxl/sdk 0.8.0-beta.1 → 0.8.0-beta.10

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 (564) hide show
  1. package/THIRD-PARTY-NOTICES.md +1 -1
  2. package/browser/esm/{B0HS42a7lga1k1U_.mjs → BEAY9XgKNx-bakXW.mjs} +2 -2
  3. package/browser/esm/BbSmt62FpFIpoVzu.mjs +392 -0
  4. package/browser/esm/BcHmrKHwMMOlzc9_.mjs +357 -0
  5. package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +412 -0
  6. package/browser/esm/Bk7xxbdDpa7-sIwd.mjs +7 -0
  7. package/browser/esm/BqskM7wA8oPfFQue.mjs +20 -0
  8. package/browser/esm/Btg43M1Bf-ENDreu.mjs +540 -0
  9. package/browser/esm/BzLfNyc6OOShIErH.mjs +598 -0
  10. package/browser/esm/C9B0djuUarfNdoj0.mjs +466 -0
  11. package/browser/esm/{uyWBMSIxMlt8n5Z3.mjs → CSx9ed1JOs7K5BXO.mjs} +2 -2
  12. package/browser/esm/CYyv6uGjo10ig5FP.mjs +142 -0
  13. package/browser/esm/CZ5oa92wZEAXebgk.mjs +622 -0
  14. package/browser/esm/CdLZWVcH8cncBUPJ.mjs +849 -0
  15. package/browser/esm/Cgd5BnM3hg9RyUel.mjs +171 -0
  16. package/browser/esm/CjsUGJEQSbGjnH6R.mjs +1001 -0
  17. package/browser/esm/ClB5ix51roQOpZEr.mjs +7402 -0
  18. package/browser/esm/{DlPMeIyxT9tG_WDk.mjs → Cqr3knDsBvoVZ6MN.mjs} +179 -202
  19. package/browser/esm/D4uVlrG0xEFctsSM.mjs +905 -0
  20. package/browser/esm/DOMHmhYzPcLVcpAW.mjs +7 -0
  21. package/browser/esm/DUvUK61b2_4pf4tG.mjs +484 -0
  22. package/browser/esm/De175LygU7ot4nQm.mjs +441 -0
  23. package/browser/esm/DhKkrCVASZ6Isvz6.mjs +527 -0
  24. package/browser/esm/Di58Ji1n--3Mgc_2.mjs +607 -0
  25. package/browser/esm/Dtoyt8q5RyGAlxCp.mjs +1141 -0
  26. package/browser/esm/Y79I7Sm8kjaYexhf.mjs +167 -0
  27. package/browser/esm/index.mjs +1472 -1023
  28. package/browser/esm/o8MFgcVXns987D6_.mjs +400 -0
  29. package/browser/esm/zqJOaweiXE9D8RY1.mjs +66681 -0
  30. package/licenses/dependencies.txt +209 -209
  31. package/node/esm/B6D7sSetrcOWLsKj.mjs +1135 -0
  32. package/node/esm/B9ljpEIZg6wOTzRE.mjs +142 -0
  33. package/node/esm/BH1v-E4Ro3bR7Znw.mjs +962 -0
  34. package/node/esm/BN9j8V9gCExMjVtJ.mjs +540 -0
  35. package/node/esm/{Cku7XiUvw1xrRasi.mjs → Bh4dv6tMjXX3X4nI.mjs} +1 -1
  36. package/node/esm/Bqd62L8KFgdS0Vou.mjs +7 -0
  37. package/node/esm/Bsx9uijd4X_SKV3L.mjs +360 -0
  38. package/node/esm/BtuY37FumvLE7EBo.mjs +629 -0
  39. package/node/esm/C6ZXsNyLXI6zA63X.mjs +402 -0
  40. package/node/esm/CCouEwT37f08qO3V.mjs +7 -0
  41. package/node/esm/CD9wbvufChVYYkrI.mjs +451 -0
  42. package/node/esm/CImNvdz1iP-lUlro.mjs +610 -0
  43. package/node/esm/CT0CN82y0_Qgoryk.mjs +7568 -0
  44. package/node/esm/CUQi5ZtMO02nhG0W.mjs +596 -0
  45. package/node/esm/CUUoseJmFsCf82bb.mjs +28 -0
  46. package/node/esm/CnSQ7MTXAUAyBOoS.mjs +911 -0
  47. package/node/esm/D7MfcID2Wf6l6VpC.mjs +171 -0
  48. package/node/esm/DCplLG93GfTs1vNw.mjs +1860 -0
  49. package/node/esm/DHUADiCmxNQS1ARz.mjs +417 -0
  50. package/node/esm/DMD12JUh7HJw2-jl.mjs +638 -0
  51. package/node/esm/DdFgXl-Ux2cMBTs_.mjs +15 -0
  52. package/node/esm/DefYISWfdZJFx57m.mjs +255 -0
  53. package/node/esm/Ds0d8zXzmgOu3MGx.mjs +403 -0
  54. package/node/esm/MiU4rDOiocmJ-9Ry.mjs +1783 -0
  55. package/node/esm/index.mjs +51616 -39665
  56. package/package.json +15 -16
  57. package/resources/contents.json +64 -0
  58. package/resources/fonts/arial-bold-italic.metrics.json +139 -0
  59. package/resources/fonts/arial-bold.metrics.json +139 -0
  60. package/resources/fonts/arial-italic.metrics.json +139 -0
  61. package/resources/fonts/arial-regular.metrics.json +139 -0
  62. package/resources/fonts/calibri-bold-italic.metrics.json +137 -0
  63. package/resources/fonts/calibri-bold.metrics.json +137 -0
  64. package/resources/fonts/calibri-italic.metrics.json +137 -0
  65. package/resources/fonts/calibri-regular.metrics.json +137 -0
  66. package/resources/fonts/cambria-bold-italic.metrics.json +66 -0
  67. package/resources/fonts/cambria-bold.metrics.json +66 -0
  68. package/resources/fonts/cambria-italic.metrics.json +66 -0
  69. package/resources/fonts/cambria-regular.metrics.json +66 -0
  70. package/resources/fonts/contents.json +126 -0
  71. package/resources/fonts/courier-new-bold-italic.metrics.json +143 -0
  72. package/resources/fonts/courier-new-bold.metrics.json +143 -0
  73. package/resources/fonts/courier-new-italic.metrics.json +143 -0
  74. package/resources/fonts/courier-new-regular.metrics.json +143 -0
  75. package/resources/fonts/times-new-roman-bold-italic.metrics.json +141 -0
  76. package/resources/fonts/times-new-roman-bold.metrics.json +141 -0
  77. package/resources/fonts/times-new-roman-italic.metrics.json +143 -0
  78. package/resources/fonts/times-new-roman-regular.metrics.json +141 -0
  79. package/resources/locales/de/model.msg.json +112 -12
  80. package/resources/locales/en/model.msg.json +119 -13
  81. package/types/scripting-api.json +8048 -0
  82. package/types/scripting-enums.json +277 -110
  83. package/types/scripting.d.ts +13077 -3224
  84. package/types/src/anchored/AbstractAnchored.d.ts +18 -8
  85. package/types/src/anchored/AnchoredMap.d.ts +2 -0
  86. package/types/src/anchored/IAnchoredMap.d.ts +52 -4
  87. package/types/src/autoFill/AutoFill.d.ts +316 -32
  88. package/types/src/autoFill/IAutoFill.d.ts +232 -15
  89. package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +42 -41
  90. package/types/src/border/index.d.ts +1 -1
  91. package/types/src/calculation/Calculation.d.ts +754 -49
  92. package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
  93. package/types/src/calculation/FormulaText.d.ts +82 -0
  94. package/types/src/calculation/ICalculation.d.ts +318 -81
  95. package/types/src/calculation/INamedFormulasCollection.d.ts +5 -8
  96. package/types/src/calculation/NamedFormulaCollection.d.ts +139 -107
  97. package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
  98. package/types/src/calculation/TokenType.d.ts +9 -0
  99. package/types/src/calculation/Types.d.ts +83 -2
  100. package/types/src/calculation/_CloneBoundary.d.ts +80 -0
  101. package/types/src/calculation/_TableRename.d.ts +13 -0
  102. package/types/src/calculation/compiler/ASTTypes.d.ts +71 -0
  103. package/types/src/calculation/compiler/CompilerUtils.d.ts +135 -44
  104. package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
  105. package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
  106. package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
  107. package/types/src/calculation/compiler/ParserUtils.d.ts +26 -1
  108. package/types/src/calculation/compiler/SRParser.d.ts +2 -1
  109. package/types/src/calculation/compiler/Types.d.ts +79 -9
  110. package/types/src/calculation/executor/CalcExecutor.d.ts +312 -33
  111. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +43 -2
  112. package/types/src/calculation/executor/CircularReference.d.ts +2 -0
  113. package/types/src/calculation/formula/Formula.d.ts +58 -21
  114. package/types/src/calculation/formula/FormulaBlock.d.ts +125 -23
  115. package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
  116. package/types/src/calculation/formula/FunctionValues.d.ts +10 -0
  117. package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
  118. package/types/src/calculation/formula/LambdaValue.d.ts +46 -23
  119. package/types/src/calculation/formula/LazyValue.d.ts +96 -0
  120. package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
  121. package/types/src/calculation/formula/index.d.ts +1 -0
  122. package/types/src/calculation/functions/FunctionDeclarations.d.ts +31 -0
  123. package/types/src/calculation/functions/Operators.d.ts +8 -0
  124. package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
  125. package/types/src/calculation/grid/CalcGrid.d.ts +407 -158
  126. package/types/src/calculation/grid/CalcGridBackend.d.ts +493 -0
  127. package/types/src/calculation/grid/CalcGridProxy.d.ts +133 -0
  128. package/types/src/calculation/grid/CalcGridUtils.d.ts +62 -12
  129. package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
  130. package/types/src/calculation/grid/FormulaHost.d.ts +239 -0
  131. package/types/src/calculation/grid/ICalcGrid.d.ts +499 -141
  132. package/types/src/calculation/grid/_CalcRequest.d.ts +289 -0
  133. package/types/src/calculation/grid/index.d.ts +4 -0
  134. package/types/src/calculation/index.d.ts +2 -0
  135. package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
  136. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +339 -11
  137. package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
  138. package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
  139. package/types/src/calculation/spatial/index.d.ts +1 -0
  140. package/types/src/calculation/state/CalcInputs.d.ts +41 -0
  141. package/types/src/calculation/state/CalcNode.d.ts +141 -30
  142. package/types/src/calculation/state/CalcScope.d.ts +37 -0
  143. package/types/src/calculation/state/CalcState.d.ts +22 -1
  144. package/types/src/calculation/state/CalculationContext.d.ts +50 -3
  145. package/types/src/calculation/state/IContextContainer.d.ts +129 -27
  146. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +163 -0
  147. package/types/src/calculation/state/_ReadObservedGrid.d.ts +74 -8
  148. package/types/src/calculation/state/index.d.ts +1 -0
  149. package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +80 -0
  150. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +23 -0
  151. package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +16 -2
  152. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +63 -3
  153. package/types/src/calculation/symbol/SymbolRegistry.d.ts +20 -0
  154. package/types/src/calculation/symbol/index.d.ts +3 -2
  155. package/types/src/cell/ICell.d.ts +104 -29
  156. package/types/src/cell/ICellHeader.d.ts +24 -2
  157. package/types/src/cell/ICellProtection.d.ts +50 -10
  158. package/types/src/cellRange/ICellRange.d.ts +419 -79
  159. package/types/src/cellRange/ICellRanges.d.ts +23 -21
  160. package/types/src/chart/Chart.d.ts +41 -13
  161. package/types/src/chart/ChartCollection.d.ts +26 -0
  162. package/types/src/chart/IChart.d.ts +166 -12
  163. package/types/src/chart/IChartCollection.d.ts +25 -0
  164. package/types/src/chart/_ChartXml.d.ts +70 -0
  165. package/types/src/chart/index.d.ts +1 -3
  166. package/types/src/collections/ArraysGrid.d.ts +1 -1
  167. package/types/src/collections/IGrid.d.ts +1 -1
  168. package/types/src/collections/ISparseGrid.d.ts +9 -0
  169. package/types/src/collections/ISpatialMap.d.ts +59 -21
  170. package/types/src/collections/ImmutableList.d.ts +28 -0
  171. package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
  172. package/types/src/collections/OverlappingRangeIterator.d.ts +13 -17
  173. package/types/src/collections/RepeatingList.d.ts +7 -0
  174. package/types/src/collections/ScalarGrid.d.ts +50 -0
  175. package/types/src/collections/SparseGrid.d.ts +1 -1
  176. package/types/src/collections/SpatialMap.d.ts +13 -21
  177. package/types/src/collections/Tuple.d.ts +128 -16
  178. package/types/src/collections/_GridUtils.d.ts +19 -6
  179. package/types/src/collections/_RangeSweep.d.ts +97 -0
  180. package/types/src/collections/_SpatialUtils.d.ts +20 -2
  181. package/types/src/collections/index.d.ts +1 -0
  182. package/types/src/color/_BuiltInIndexDefs.d.ts +6 -0
  183. package/types/src/comment/Comment.d.ts +223 -0
  184. package/types/src/comment/CommentCollection.d.ts +40 -0
  185. package/types/src/comment/IComment.d.ts +340 -50
  186. package/types/src/comment/ICommentCollection.d.ts +90 -0
  187. package/types/src/comment/NoteMovable.d.ts +26 -0
  188. package/types/src/comment/_CommentUtils.d.ts +50 -0
  189. package/types/src/comment/_NoteBox.d.ts +50 -0
  190. package/types/src/comment/index.d.ts +1 -0
  191. package/types/src/condition/AnchoredConditional.d.ts +82 -17
  192. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +42 -12
  193. package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
  194. package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
  195. package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
  196. package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
  197. package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
  198. package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
  199. package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
  200. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
  201. package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
  202. package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
  203. package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +4 -1
  204. package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +5 -6
  205. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
  206. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
  207. package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
  208. package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +22 -5
  209. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
  210. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
  211. package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
  212. package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
  213. package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
  214. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  215. package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
  216. package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +21 -6
  217. package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +4 -5
  218. package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +20 -0
  219. package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +7 -5
  220. package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +3 -5
  221. package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +3 -5
  222. package/types/src/condition/BuiltinSelectors/index.d.ts +12 -6
  223. package/types/src/condition/Condition.d.ts +19 -1
  224. package/types/src/condition/ICondition.d.ts +293 -73
  225. package/types/src/condition/_ConditionFormula.d.ts +152 -0
  226. package/types/src/condition/_ConditionUtils.d.ts +167 -13
  227. package/types/src/conditionalFormat/ConditionalEntry.d.ts +3 -3
  228. package/types/src/conditionalFormat/ConditionalFormat.d.ts +25 -14
  229. package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
  230. package/types/src/conditionalFormat/IConditionalFormat.d.ts +12 -10
  231. package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
  232. package/types/src/dataValidation/DataValidation.d.ts +69 -3
  233. package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
  234. package/types/src/dataValidation/IDataValidation.d.ts +149 -30
  235. package/types/src/dataValidation/IDataValidationCollection.d.ts +10 -2
  236. package/types/src/date/DateUtils.d.ts +20 -0
  237. package/types/src/date/_DateUtils.d.ts +91 -7
  238. package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
  239. package/types/src/externalBook/ExternalBookName.d.ts +96 -0
  240. package/types/src/externalBook/IExternalBook.d.ts +170 -18
  241. package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
  242. package/types/src/externalBook/index.d.ts +1 -0
  243. package/types/src/{lib/file → file}/file.browser.d.ts +22 -8
  244. package/types/src/{lib/file → file}/file.node.d.ts +7 -2
  245. package/types/src/fill/IEffect.d.ts +5 -5
  246. package/types/src/fill/IFill.d.ts +123 -78
  247. package/types/src/fill/IStroke.d.ts +190 -64
  248. package/types/src/fill/RectAlignment.d.ts +20 -0
  249. package/types/src/fill/_Fills.d.ts +187 -0
  250. package/types/src/fill/_Stroke.d.ts +89 -0
  251. package/types/src/fill/index.d.ts +1 -0
  252. package/types/src/filter/IFilter.d.ts +188 -5
  253. package/types/src/font/AdvanceBuilder.d.ts +25 -0
  254. package/types/src/font/AdvanceTable.d.ts +114 -0
  255. package/types/src/font/FontCollection.d.ts +57 -0
  256. package/types/src/font/IFont.d.ts +17 -0
  257. package/types/src/font/IFontCollection.d.ts +120 -22
  258. package/types/src/font/TableFileAdvanceBuilder.d.ts +27 -0
  259. package/types/src/font/_BuiltinFontTables.d.ts +10 -0
  260. package/types/src/font/index.d.ts +4 -1
  261. package/types/src/group/Group.d.ts +136 -0
  262. package/types/src/group/GroupMovableCollection.d.ts +37 -0
  263. package/types/src/group/IGroup.d.ts +129 -0
  264. package/types/src/group/index.d.ts +2 -0
  265. package/types/src/history/IHistory.d.ts +3 -2
  266. package/types/src/hyperlink/IHyperlink.d.ts +13 -0
  267. package/types/src/hyperlink/_Hyperlink.d.ts +5 -1
  268. package/types/src/i18n/LanguagePack.d.ts +12 -4
  269. package/types/src/index.d.ts +5 -0
  270. package/types/src/io/AbstractBackingStore.d.ts +24 -1
  271. package/types/src/io/ArrayBackingStore.d.ts +1 -1
  272. package/types/src/io/EmbeddedPart.d.ts +20 -0
  273. package/types/src/io/IEmbeddedPart.d.ts +63 -0
  274. package/types/src/io/IWorkbookIO.d.ts +185 -18
  275. package/types/src/io/WorkbookIO.d.ts +9 -0
  276. package/types/src/io/WorkbookOrigin.d.ts +20 -11
  277. package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
  278. package/types/src/io/_XmlFragment.d.ts +49 -0
  279. package/types/src/io/index.d.ts +1 -0
  280. package/types/src/license/LicenseDetails.d.ts +1 -0
  281. package/types/src/license/LicenseManager.d.ts +4 -1
  282. package/types/src/license/Types.d.ts +38 -0
  283. package/types/src/license/_Utils.d.ts +22 -0
  284. package/types/src/license/details.d.ts +24 -0
  285. package/types/src/license/license-key.d.ts +49 -2
  286. package/types/src/license/runtime.browser.d.ts +41 -0
  287. package/types/src/{lib/utils/utils.node.d.ts → license/runtime.node.d.ts} +9 -12
  288. package/types/src/listener/IListener.d.ts +12 -7
  289. package/types/src/listener/ListenerEmitter.d.ts +46 -5
  290. package/types/src/model/AbstractModel.d.ts +14 -5
  291. package/types/src/movable/AbstractMovableContent.d.ts +182 -0
  292. package/types/src/movable/CustomElement.d.ts +4 -5
  293. package/types/src/movable/ErrorContent.d.ts +49 -0
  294. package/types/src/movable/FormControl.d.ts +285 -0
  295. package/types/src/movable/GroupMember.d.ts +87 -0
  296. package/types/src/movable/ICustomElement.d.ts +7 -2
  297. package/types/src/movable/IErrorContent.d.ts +23 -0
  298. package/types/src/movable/IFormControl.d.ts +455 -0
  299. package/types/src/movable/IMovable.d.ts +378 -46
  300. package/types/src/movable/IMovableCollection.d.ts +63 -3
  301. package/types/src/movable/Movable.d.ts +149 -49
  302. package/types/src/movable/MovableCollection.d.ts +15 -8
  303. package/types/src/movable/MovableContentRegistry.d.ts +113 -0
  304. package/types/src/movable/_BuiltInContents.d.ts +14 -0
  305. package/types/src/movable/_ContentFactory.d.ts +35 -0
  306. package/types/src/movable/_DrawnBounds.d.ts +37 -0
  307. package/types/src/movable/_InsertableCollection.d.ts +28 -0
  308. package/types/src/movable/_MovableUtils.d.ts +5 -0
  309. package/types/src/movable/_PendingContent.d.ts +25 -0
  310. package/types/src/movable/_PlacementUtils.d.ts +55 -0
  311. package/types/src/movable/_RotatedFrame.d.ts +20 -0
  312. package/types/src/movable/index.d.ts +7 -1
  313. package/types/src/named/AbstractNamed.d.ts +1 -1
  314. package/types/src/named/INamed.d.ts +4 -1
  315. package/types/src/named/INamedCollection.d.ts +26 -0
  316. package/types/src/named/NamedCollection.d.ts +16 -15
  317. package/types/src/numFmt/BuiltInFormats.d.ts +20 -7
  318. package/types/src/numFmt/IFormatEngine.d.ts +2 -0
  319. package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
  320. package/types/src/numFmt/_FormatCell.d.ts +11 -2
  321. package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
  322. package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
  323. package/types/src/outline/IOutline.d.ts +186 -0
  324. package/types/src/outline/Outline.d.ts +157 -0
  325. package/types/src/outline/index.d.ts +2 -0
  326. package/types/src/person/IPerson.d.ts +99 -0
  327. package/types/src/person/IPersonCollection.d.ts +51 -0
  328. package/types/src/person/Person.d.ts +32 -0
  329. package/types/src/person/PersonCollection.d.ts +49 -0
  330. package/types/src/person/index.d.ts +4 -0
  331. package/types/src/picture/IPicture.d.ts +33 -3
  332. package/types/src/picture/Picture.d.ts +33 -13
  333. package/types/src/pivot/IPivotTable.d.ts +72 -0
  334. package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
  335. package/types/src/pivot/PivotCache.d.ts +34 -0
  336. package/types/src/pivot/PivotTable.d.ts +61 -0
  337. package/types/src/pivot/PivotTableCollection.d.ts +25 -0
  338. package/types/src/pivot/_PivotXml.d.ts +24 -0
  339. package/types/src/pivot/index.d.ts +6 -0
  340. package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
  341. package/types/src/primitives/Criteria.d.ts +1 -1
  342. package/types/src/primitives/Grouping.d.ts +65 -0
  343. package/types/src/primitives/LambdaBrand.d.ts +26 -0
  344. package/types/src/primitives/PrimitiveUtils.d.ts +56 -19
  345. package/types/src/primitives/Range.d.ts +133 -25
  346. package/types/src/primitives/RangeStats.d.ts +30 -2
  347. package/types/src/primitives/ReferenceRange.d.ts +44 -0
  348. package/types/src/primitives/Runtime.d.ts +15 -2
  349. package/types/src/primitives/environment.browser.d.ts +9 -0
  350. package/types/src/primitives/environment.node.d.ts +10 -0
  351. package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
  352. package/types/src/primitives/stats/Cancellation.d.ts +13 -0
  353. package/types/src/primitives/stats/FrequencyStats.d.ts +10 -1
  354. package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
  355. package/types/src/primitives/stats/Ranked.d.ts +1 -1
  356. package/types/src/primitives/stats/SortedNumbers.d.ts +4 -2
  357. package/types/src/primitives/stats/index.d.ts +1 -0
  358. package/types/src/print/IPrint.d.ts +0 -22
  359. package/types/src/protectedRange/IProtectedRange.d.ts +4 -0
  360. package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
  361. package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
  362. package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
  363. package/types/src/protection/DefaultProtection.d.ts +12 -1
  364. package/types/src/protection/IProtection.d.ts +36 -2
  365. package/types/src/reference/ReferenceUtils.d.ts +80 -0
  366. package/types/src/reference/index.d.ts +2 -0
  367. package/types/src/resource/IResource.d.ts +21 -1
  368. package/types/src/resource/IResourceCollection.d.ts +9 -1
  369. package/types/src/resource/ResourceCollection.d.ts +6 -6
  370. package/types/src/scripting/FunctionCollection.d.ts +49 -15
  371. package/types/src/scripting/IFunctionCollection.d.ts +62 -32
  372. package/types/src/scripting/IModule.d.ts +25 -0
  373. package/types/src/scripting/IModuleCollection.d.ts +17 -0
  374. package/types/src/scripting/IScript.d.ts +28 -26
  375. package/types/src/scripting/Module.d.ts +34 -6
  376. package/types/src/scripting/ModuleCollection.d.ts +17 -12
  377. package/types/src/scripting/Runtime.d.ts +15 -0
  378. package/types/src/scripting/Scripts.d.ts +3 -7
  379. package/types/src/scripting/TypedFunction.d.ts +154 -18
  380. package/types/src/scripting/_FunctionIndex.d.ts +8 -3
  381. package/types/src/scripting/_ModuleUtils.d.ts +11 -1
  382. package/types/src/scripting/_ScriptUtils.d.ts +3 -0
  383. package/types/src/scripting/declarations.browser.d.ts +10 -0
  384. package/types/src/scripting/declarations.d.ts +49 -0
  385. package/types/src/scripting/declarations.node.d.ts +9 -0
  386. package/types/src/scripting/index.d.ts +3 -0
  387. package/types/src/selection/IMovableSelection.d.ts +148 -0
  388. package/types/src/selection/IRangeSelection.d.ts +9 -4
  389. package/types/src/selection/MovableSelection.d.ts +48 -0
  390. package/types/src/selection/RangeSelection.d.ts +15 -0
  391. package/types/src/selection/index.d.ts +1 -0
  392. package/types/src/shape/GeometryPreset.d.ts +197 -0
  393. package/types/src/shape/IGeometry.d.ts +380 -0
  394. package/types/src/shape/IShape.d.ts +341 -194
  395. package/types/src/shape/IShapeStyle.d.ts +135 -0
  396. package/types/src/shape/Shape.d.ts +107 -21
  397. package/types/src/shape/ShapeStyleUtils.d.ts +54 -0
  398. package/types/src/shape/_ConnectorFrame.d.ts +32 -0
  399. package/types/src/shape/_ConnectorRoute.d.ts +33 -0
  400. package/types/src/shape/_Connectors.d.ts +108 -0
  401. package/types/src/shape/_Geometry.d.ts +14 -0
  402. package/types/src/shape/_GeometryLoader.d.ts +21 -0
  403. package/types/src/shape/_ShapeStyle.d.ts +70 -0
  404. package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
  405. package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
  406. package/types/src/shape/_builtIn/arrows.d.ts +6 -0
  407. package/types/src/shape/_builtIn/basic.d.ts +6 -0
  408. package/types/src/shape/_builtIn/callouts.d.ts +6 -0
  409. package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
  410. package/types/src/shape/_builtIn/lines.d.ts +6 -0
  411. package/types/src/shape/_builtIn/math.d.ts +6 -0
  412. package/types/src/shape/_builtIn/other.d.ts +6 -0
  413. package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
  414. package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
  415. package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
  416. package/types/src/shape/geometry/format.d.ts +3 -0
  417. package/types/src/shape/geometry/geometry.d.ts +85 -0
  418. package/types/src/shape/geometry/guides.d.ts +54 -0
  419. package/types/src/shape/geometry/handles.d.ts +14 -0
  420. package/types/src/shape/geometry/index.d.ts +7 -0
  421. package/types/src/shape/geometry/lineEnds.d.ts +54 -0
  422. package/types/src/shape/geometry/paths.d.ts +35 -0
  423. package/types/src/shape/geometry/segments.d.ts +114 -0
  424. package/types/src/shape/index.d.ts +3 -0
  425. package/types/src/sheet/CellRegion.d.ts +6 -0
  426. package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
  427. package/types/src/sheet/ISheet.d.ts +197 -50
  428. package/types/src/sheet/ISheetCollection.d.ts +2 -5
  429. package/types/src/sheet/NamedCellRange.d.ts +16 -7
  430. package/types/src/sheet/NamedRange.d.ts +8 -0
  431. package/types/src/sheet/Sheet.d.ts +915 -138
  432. package/types/src/sheet/SheetCell.d.ts +92 -32
  433. package/types/src/sheet/SheetCollection.d.ts +19 -8
  434. package/types/src/sheet/SheetRange.d.ts +90 -18
  435. package/types/src/sheet/SheetRanges.d.ts +22 -9
  436. package/types/src/sheet/_CellBuffer.d.ts +214 -0
  437. package/types/src/sheet/_HeldFormula.d.ts +69 -0
  438. package/types/src/sheet/_InvalidSheetRange.d.ts +7 -7
  439. package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
  440. package/types/src/sheet/_RangeStateSweep.d.ts +16 -0
  441. package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
  442. package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
  443. package/types/src/sheet/_SheetAutoFitUtils.d.ts +2 -2
  444. package/types/src/sheet/_SheetEvents.d.ts +43 -0
  445. package/types/src/sheet/_SheetFilterUtils.d.ts +49 -1
  446. package/types/src/sheet/_SheetIntents.d.ts +296 -0
  447. package/types/src/sheet/_SheetMutations.d.ts +182 -62
  448. package/types/src/sheet/_SheetStateReader.d.ts +19 -13
  449. package/types/src/sheet/_SheetStateTypes.d.ts +83 -78
  450. package/types/src/sheet/_SheetUtils.d.ts +39 -22
  451. package/types/src/sheet/_WatchAnchor.d.ts +93 -0
  452. package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
  453. package/types/src/sheet/spatial/index.d.ts +1 -0
  454. package/types/src/sheet/style/SheetCellStyle.d.ts +209 -304
  455. package/types/src/sheet/style/SheetDirectStyle.d.ts +30 -19
  456. package/types/src/sheet/style/SheetNamedStyle.d.ts +17 -17
  457. package/types/src/sheet/style/SheetTableStyle.d.ts +5 -5
  458. package/types/src/sheet/style/_Resolvers.d.ts +14 -8
  459. package/types/src/sheet/style/_StyleUtils.d.ts +38 -8
  460. package/types/src/sheetHeader/ISheetHeader.d.ts +94 -53
  461. package/types/src/sheetHeader/SheetCellHeader.d.ts +4 -0
  462. package/types/src/sheetHeader/SheetHeader.d.ts +42 -22
  463. package/types/src/sheetHeader/_HeaderMetrics.d.ts +37 -0
  464. package/types/src/sheetHeader/_HeaderUtils.d.ts +5 -3
  465. package/types/src/sheetProtection/ISheetProtection.d.ts +41 -7
  466. package/types/src/sheetProtection/SheetProtection.d.ts +12 -0
  467. package/types/src/sheetView/ISheetView.d.ts +69 -15
  468. package/types/src/sheetView/SheetView.d.ts +20 -11
  469. package/types/src/slicer/ISlicer.d.ts +304 -17
  470. package/types/src/slicer/ISlicerStyle.d.ts +109 -0
  471. package/types/src/slicer/Slicer.d.ts +128 -13
  472. package/types/src/slicer/SlicerStyle.d.ts +25 -0
  473. package/types/src/slicer/_BuiltInSlicerStyles.d.ts +13 -0
  474. package/types/src/slicer/_SlicerUtils.d.ts +30 -0
  475. package/types/src/slicer/index.d.ts +1 -0
  476. package/types/src/sort/ISort.d.ts +4 -2
  477. package/types/src/string/IStringCollection.d.ts +5 -0
  478. package/types/src/string/StringCollection.d.ts +6 -6
  479. package/types/src/style/{IStyle.d.ts → ICellStyle.d.ts} +72 -52
  480. package/types/src/style/INamedStyleCollection.d.ts +72 -0
  481. package/types/src/style/ISlicerStyleCollection.d.ts +77 -0
  482. package/types/src/style/IStyleCollection.d.ts +91 -60
  483. package/types/src/style/ITableStyleCollection.d.ts +89 -0
  484. package/types/src/style/NamedStyleCollection.d.ts +39 -0
  485. package/types/src/style/SlicerStyleCollection.d.ts +46 -0
  486. package/types/src/style/StyleCollection.d.ts +81 -26
  487. package/types/src/style/TableStyleCollection.d.ts +49 -0
  488. package/types/src/style/_BuiltInStyleDefs.d.ts +6 -6
  489. package/types/src/style/_BuiltInStyleNames.d.ts +2 -2
  490. package/types/src/style/index.d.ts +7 -1
  491. package/types/src/table/AnchoredTable.d.ts +701 -72
  492. package/types/src/table/AutoTable.d.ts +7 -5
  493. package/types/src/table/ITable.d.ts +261 -34
  494. package/types/src/table/ITableCollection.d.ts +12 -0
  495. package/types/src/table/ITableStyle.d.ts +37 -37
  496. package/types/src/table/TableCollection.d.ts +19 -8
  497. package/types/src/table/_FilterField.d.ts +19 -6
  498. package/types/src/table/_NamedTable.d.ts +17 -1
  499. package/types/src/table/_NamedTableSource.d.ts +1 -0
  500. package/types/src/table/_SortField.d.ts +2 -0
  501. package/types/src/table/_TableColumn.d.ts +13 -2
  502. package/types/src/table/_TableMessages.d.ts +1 -0
  503. package/types/src/table/_TableUtils.d.ts +40 -0
  504. package/types/src/text/Bullet.d.ts +4 -0
  505. package/types/src/text/IText.d.ts +182 -0
  506. package/types/src/text/ITextFrame.d.ts +110 -1
  507. package/types/src/text/TextBoxAlignment.d.ts +25 -16
  508. package/types/src/text/TextFrame.d.ts +4 -0
  509. package/types/src/text/TextLine.d.ts +4 -0
  510. package/types/src/text/TextParagraph.d.ts +4 -0
  511. package/types/src/text/TextRotation.d.ts +3 -3
  512. package/types/src/text/TextRun.d.ts +9 -0
  513. package/types/src/text/TextStacked.d.ts +83 -0
  514. package/types/src/text/index.d.ts +1 -0
  515. package/types/src/text/richtext/IRichText.d.ts +36 -0
  516. package/types/src/text/richtext/IStyledFont.d.ts +18 -18
  517. package/types/src/text/richtext/index.d.ts +1 -0
  518. package/types/src/theme/ITheme.d.ts +45 -4
  519. package/types/src/theme/IThemeCollection.d.ts +2 -0
  520. package/types/src/theme/ThemeCollection.d.ts +11 -7
  521. package/types/src/theme/_OfficeFormatScheme.d.ts +3 -0
  522. package/types/src/transaction/ITransaction.d.ts +258 -45
  523. package/types/src/transaction/Transaction.d.ts +101 -11
  524. package/types/src/transaction/TransactionUndoManager.d.ts +4 -1
  525. package/types/src/type/AbstractCollection.d.ts +101 -0
  526. package/types/src/type/ICollection.d.ts +117 -0
  527. package/types/src/type/ITypes.d.ts +9 -7
  528. package/types/src/type/index.d.ts +1 -0
  529. package/types/src/utils/_CSSUtils.d.ts +3 -3
  530. package/types/src/wasm/_sdkWasm.d.ts +7 -0
  531. package/types/src/wasm/index.d.ts +2 -0
  532. package/types/src/wasm/sdkWasm.d.ts +29 -0
  533. package/types/src/workbook/IWorkbook.d.ts +180 -40
  534. package/types/src/workbook/Workbook.d.ts +123 -10
  535. package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
  536. package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
  537. package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
  538. package/types/src/workbookView/IWorkbookView.d.ts +12 -0
  539. package/types/src/workbookView/WorkbookView.d.ts +5 -0
  540. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  541. package/browser/cjs/BatsV2UUraVDCRXm.cjs +0 -57
  542. package/browser/cjs/CUz53T65cRGQRgvv.cjs +0 -33
  543. package/browser/cjs/DU0kYUtdFa3jK-im.cjs +0 -1
  544. package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +0 -10
  545. package/browser/cjs/Dv4yIPLV98M5zLHa.cjs +0 -1
  546. package/browser/cjs/a0Z-SXs_N71CtqYb.cjs +0 -1
  547. package/browser/cjs/index.cjs +0 -3
  548. package/browser/esm/6JKSOvc5czaQB2Bj.mjs +0 -109
  549. package/browser/esm/BtuJ9AGzeURtAsGo.mjs +0 -51241
  550. package/browser/esm/DGU6sM25u0EWCKl1.mjs +0 -824
  551. package/browser/esm/f2G3QRgEbvFJcoa2.mjs +0 -4436
  552. package/node/esm/-pxdn3M3tc6PLHs7.mjs +0 -114
  553. package/node/esm/0n5bslM9jhO1JnI2.mjs +0 -843
  554. package/types/src/cellRange/_GraphNode.d.ts +0 -38
  555. package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +0 -12
  556. package/types/src/dataValidation/_Utils.d.ts +0 -10
  557. package/types/src/lib/utils/_Utils.d.ts +0 -27
  558. package/types/src/lib/utils/utils.browser.d.ts +0 -33
  559. package/types/src/movable/IGroup.d.ts +0 -30
  560. package/types/src/movable/IMovableSelection.d.ts +0 -49
  561. package/types/src/sheet/listener/RangesListener.d.ts +0 -32
  562. package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
  563. package/types/src/sheet/listener/index.d.ts +0 -3
  564. /package/types/src/{lib/utils → license}/banner.d.ts +0 -0
@@ -1,56 +1,56 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.1
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.10
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { t as e } from "./B0HS42a7lga1k1U_.mjs";
7
+ import { t as e } from "./BEAY9XgKNx-bakXW.mjs";
8
8
  var t = e((e, t) => {
9
9
  var n = e, r = function e() {
10
- var t, n = typeof self < "u" ? self : typeof window < "u" ? window : n === void 0 ? {} : n, r = !n.document && !!n.postMessage, i = n.IS_PAPA_WORKER || !1, a = {}, o = 0, s = {};
11
- function c(e) {
10
+ var t = typeof self < "u" ? self : typeof window < "u" ? window : t === void 0 ? {} : t, n = !t.document && !!t.postMessage, r = t.IS_PAPA_WORKER || !1, i = {}, a = 0, o = {};
11
+ function s(e) {
12
12
  return e.charCodeAt(0) === 65279 ? e.slice(1) : e;
13
13
  }
14
- function l(e) {
14
+ function c(e) {
15
15
  this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = {
16
16
  data: [],
17
17
  errors: [],
18
18
  meta: {}
19
19
  }, function(e) {
20
- var t = b(e);
21
- t.chunkSize = parseInt(t.chunkSize), e.step || e.chunk || (t.chunkSize = null), this._handle = new m(t), (this._handle.streamer = this)._config = t;
22
- }.call(this, e), this.parseChunk = function(e, t) {
23
- var r = parseInt(this._config.skipFirstNLines) || 0;
24
- if (this.isFirstChunk && 0 < r) {
20
+ var t = y(e);
21
+ t.chunkSize = parseInt(t.chunkSize), e.step || e.chunk || (t.chunkSize = null), this._handle = new p(t), (this._handle.streamer = this)._config = t;
22
+ }.call(this, e), this.parseChunk = function(e, n) {
23
+ var i = parseInt(this._config.skipFirstNLines) || 0;
24
+ if (this.isFirstChunk && 0 < i) {
25
25
  let t = this._config.newline;
26
- t ||= (a = this._config.quoteChar || "\"", this._handle.guessLineEndings(e, a)), e = [...e.split(t).slice(r)].join(t);
26
+ t ||= (a = this._config.quoteChar || "\"", this._handle.guessLineEndings(e, a)), e = [...e.split(t).slice(i)].join(t);
27
27
  }
28
- this.isFirstChunk && S(this._config.beforeFirstChunk) && (a = this._config.beforeFirstChunk(e)) !== void 0 && (e = a), this.isFirstChunk = !1, this._halted = !1, r = this._partialLine + e;
29
- var a = (this._partialLine = "", this._handle.parse(r, this._baseIndex, !this._finished));
28
+ this.isFirstChunk && x(this._config.beforeFirstChunk) && (a = this._config.beforeFirstChunk(e)) !== void 0 && (e = a), this.isFirstChunk = !1, this._halted = !1, i = this._partialLine + e;
29
+ var a = (this._partialLine = "", this._handle.parse(i, this._baseIndex, !this._finished));
30
30
  if (!this._handle.paused() && !this._handle.aborted()) {
31
- if (e = a.meta.cursor, this._finished || (this._partialLine = r.substring(e - this._baseIndex), this._baseIndex = e), a && a.data && (this._rowCount += a.data.length), r = this._finished || this._config.preview && this._rowCount >= this._config.preview, i) n.postMessage({
31
+ if (e = a.meta.cursor, this._finished || (this._partialLine = i.substring(e - this._baseIndex), this._baseIndex = e), a && a.data && (this._rowCount += a.data.length), i = this._finished || this._config.preview && this._rowCount >= this._config.preview, r) t.postMessage({
32
32
  results: a,
33
- workerId: s.WORKER_ID,
34
- finished: r
33
+ workerId: o.WORKER_ID,
34
+ finished: i
35
35
  });
36
- else if (S(this._config.chunk) && !t) {
36
+ else if (x(this._config.chunk) && !n) {
37
37
  if (this._config.chunk(a, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
38
38
  this._completeResults = a = void 0;
39
39
  }
40
- return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(a.data), this._completeResults.errors = this._completeResults.errors.concat(a.errors), this._completeResults.meta = a.meta), this._completed || !r || !S(this._config.complete) || a && a.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), r || a && a.meta.paused || this._nextChunk(), a;
40
+ return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(a.data), this._completeResults.errors = this._completeResults.errors.concat(a.errors), this._completeResults.meta = a.meta), this._completed || !i || !x(this._config.complete) || a && a.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), i || a && a.meta.paused || this._nextChunk(), a;
41
41
  }
42
42
  this._halted = !0;
43
43
  }, this._sendError = function(e) {
44
- S(this._config.error) ? this._config.error(e) : i && this._config.error && n.postMessage({
45
- workerId: s.WORKER_ID,
44
+ x(this._config.error) ? this._config.error(e) : r && this._config.error && t.postMessage({
45
+ workerId: o.WORKER_ID,
46
46
  error: e,
47
47
  finished: !1
48
48
  });
49
49
  };
50
50
  }
51
- function u(e) {
51
+ function l(e) {
52
52
  var t;
53
- (e ||= {}).chunkSize || (e.chunkSize = s.RemoteChunkSize), l.call(this, e), this._nextChunk = r ? function() {
53
+ (e ||= {}).chunkSize || (e.chunkSize = o.RemoteChunkSize), c.call(this, e), this._nextChunk = n ? function() {
54
54
  this._readChunk(), this._chunkLoaded();
55
55
  } : function() {
56
56
  this._readChunk();
@@ -59,9 +59,9 @@ var t = e((e, t) => {
59
59
  }, this._readChunk = function() {
60
60
  if (this._finished) this._chunkLoaded();
61
61
  else {
62
- if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), r || (t.onload = x(this._chunkLoaded, this), t.onerror = x(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !r), this._config.downloadRequestHeaders) {
63
- var e, n = this._config.downloadRequestHeaders;
64
- for (e in n) t.setRequestHeader(e, n[e]);
62
+ if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), n || (t.onload = b(this._chunkLoaded, this), t.onerror = b(this._chunkError, this)), t.ontimeout = b(this._chunkTimeout, this), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !n), this._config.downloadTimeout && !n && (t.timeout = this._config.downloadTimeout), this._config.downloadRequestHeaders) {
63
+ var e, r = this._config.downloadRequestHeaders;
64
+ for (e in r) t.setRequestHeader(e, r[e]);
65
65
  }
66
66
  var i;
67
67
  this._config.chunkSize && (i = this._start + this._config.chunkSize - 1, t.setRequestHeader("Range", "bytes=" + this._start + "-" + i));
@@ -70,19 +70,21 @@ var t = e((e, t) => {
70
70
  } catch (e) {
71
71
  this._chunkError(e.message);
72
72
  }
73
- r && t.status === 0 && this._chunkError();
73
+ n && t.status === 0 && this._chunkError();
74
74
  }
75
75
  }, this._chunkLoaded = function() {
76
76
  t.readyState === 4 && (t.status < 200 || 400 <= t.status ? this._chunkError() : (this._start += this._config.chunkSize || t.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((e) => (e = e.getResponseHeader("Content-Range")) === null ? -1 : parseInt(e.substring(e.lastIndexOf("/") + 1)))(t), this.parseChunk(t.responseText)));
77
77
  }, this._chunkError = function(e) {
78
78
  e = t.statusText || e, this._sendError(Error(e));
79
+ }, this._chunkTimeout = function() {
80
+ this._chunkError("Request timed out after " + this._config.downloadTimeout + "ms");
79
81
  };
80
82
  }
81
- function d(e) {
82
- (e ||= {}).chunkSize || (e.chunkSize = s.LocalChunkSize), l.call(this, e);
83
+ function u(e) {
84
+ (e ||= {}).chunkSize || (e.chunkSize = o.LocalChunkSize), c.call(this, e);
83
85
  var t, n, r = typeof FileReader < "u";
84
86
  this.stream = function(e) {
85
- this._input = e, n = e.slice || e.webkitSlice || e.mozSlice, r ? ((t = new FileReader()).onload = x(this._chunkLoaded, this), t.onerror = x(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
87
+ this._input = e, n = e.slice || e.webkitSlice || e.mozSlice, r ? ((t = new FileReader()).onload = b(this._chunkLoaded, this), t.onerror = b(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
86
88
  }, this._nextChunk = function() {
87
89
  this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
88
90
  }, this._readChunk = function() {
@@ -94,175 +96,177 @@ var t = e((e, t) => {
94
96
  this._sendError(t.error);
95
97
  };
96
98
  }
97
- function f(e) {
99
+ function d(e) {
98
100
  var t;
99
- l.call(this, e ||= {}), this.stream = function(e) {
101
+ c.call(this, e ||= {}), this.stream = function(e) {
100
102
  return t = e, this._nextChunk();
101
103
  }, this._nextChunk = function() {
102
104
  var e, n;
103
105
  if (!this._finished) return e = this._config.chunkSize, t = e ? (n = t.substring(0, e), t.substring(e)) : (n = t, ""), this._finished = !t, this.parseChunk(n);
104
106
  };
105
107
  }
106
- function p(e) {
107
- l.call(this, e ||= {});
108
+ function f(e) {
109
+ c.call(this, e ||= {});
108
110
  var t = [], n = !0, r = !1;
109
111
  this.pause = function() {
110
- l.prototype.pause.apply(this, arguments), this._input.pause();
112
+ c.prototype.pause.apply(this, arguments), this._input.pause();
111
113
  }, this.resume = function() {
112
- l.prototype.resume.apply(this, arguments), this._input.resume();
114
+ c.prototype.resume.apply(this, arguments), this._input.resume();
113
115
  }, this.stream = function(e) {
114
116
  this._input = e, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
115
117
  }, this._checkIsFinished = function() {
116
118
  r && t.length === 1 && (this._finished = !0);
117
119
  }, this._nextChunk = function() {
118
120
  this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : n = !0;
119
- }, this._streamData = x(function(e) {
121
+ }, this._streamData = b(function(e) {
120
122
  try {
121
123
  t.push(typeof e == "string" ? e : e.toString(this._config.encoding)), n && (n = !1, this._checkIsFinished(), this.parseChunk(t.shift()));
122
124
  } catch (e) {
123
125
  this._streamError(e);
124
126
  }
125
- }, this), this._streamError = x(function(e) {
127
+ }, this), this._streamError = b(function(e) {
126
128
  this._streamCleanUp(), this._sendError(e);
127
- }, this), this._streamEnd = x(function() {
129
+ }, this), this._streamEnd = b(function() {
128
130
  this._streamCleanUp(), r = !0, this._streamData("");
129
- }, this), this._streamCleanUp = x(function() {
131
+ }, this), this._streamCleanUp = b(function() {
130
132
  this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
131
133
  }, this);
132
134
  }
133
- function m(e) {
134
- var t, n, r, i, a = 2 ** 53, o = -a, l = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, u = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, d = this, f = 0, p = 0, m = !1, _ = !1, v = [], y = {
135
+ function p(e) {
136
+ var t, n, r, i, a = 2 ** 53, s = -a, c = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, l = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, u = this, d = 0, f = 0, p = !1, g = !1, _ = [], v = {
135
137
  data: [],
136
138
  errors: [],
137
139
  meta: {}
138
140
  };
139
- function x(t) {
141
+ function b(t) {
140
142
  return e.skipEmptyLines === "greedy" ? t.join("").trim() === "" : t.length === 1 && t[0].length === 0;
141
143
  }
142
- function C() {
143
- if (y && r && (T("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + s.DefaultDelimiter + "'"), r = !1), e.skipEmptyLines && (y.data = y.data.filter(function(e) {
144
- return !x(e);
145
- })), w()) {
146
- if (y) if (Array.isArray(y.data[0])) {
147
- for (var t = 0; w() && t < y.data.length; t++) y.data[t].forEach(n);
148
- y.data.splice(0, 1);
149
- } else y.data.forEach(n);
150
- function n(t, n) {
151
- t = c(t), S(e.transformHeader) && (t = e.transformHeader(t, n)), v.push(t);
144
+ function S() {
145
+ if (v && r && (w("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + o.DefaultDelimiter + "'"), r = !1), e.skipEmptyLines && (v.data = v.data.filter(function(e) {
146
+ return !b(e);
147
+ })), C()) {
148
+ if (v) {
149
+ if (Array.isArray(v.data[0])) {
150
+ for (var t = 0; C() && t < v.data.length; t++) v.data[t].forEach(e);
151
+ v.data.splice(0, 1);
152
+ } else v.data.forEach(e);
153
+ }
154
+ function e(e) {
155
+ _.push(e);
152
156
  }
153
157
  }
154
158
  function n(t, n) {
155
159
  for (var r = e.header ? {} : [], i = 0; i < t.length; i++) {
156
- var s = i, c = t[i];
157
- c = ((t, n) => ((t) => (e.dynamicTypingFunction && e.dynamicTyping[t] === void 0 && (e.dynamicTyping[t] = e.dynamicTypingFunction(t)), !0 === (e.dynamicTyping[t] || e.dynamicTyping)))(t) ? n === "true" || n === "TRUE" || n !== "false" && n !== "FALSE" && (((e) => {
158
- if (l.test(e) && (e = parseFloat(e), o < e && e < a)) return 1;
159
- })(n) ? parseFloat(n) : u.test(n) ? new Date(n) : n === "" ? null : n) : n)(s = e.header ? i >= v.length ? "__parsed_extra" : v[i] : s, c = e.transform ? e.transform(c, s) : c), s === "__parsed_extra" ? (r[s] = r[s] || [], r[s].push(c)) : r[s] = c;
160
+ var o = i, u = t[i];
161
+ u = ((t, n) => ((t) => (e.dynamicTypingFunction && e.dynamicTyping[t] === void 0 && (e.dynamicTyping[t] = e.dynamicTypingFunction(t)), !0 === (e.dynamicTyping[t] || e.dynamicTyping)))(t) ? n === "true" || n === "TRUE" || n !== "false" && n !== "FALSE" && (((e) => {
162
+ if (c.test(e) && (e = parseFloat(e), s < e && e < a)) return 1;
163
+ })(n) ? parseFloat(n) : l.test(n) ? new Date(n) : n === "" ? null : n) : n)(o = e.header ? i >= _.length ? "__parsed_extra" : _[i] : o, u = e.transform ? e.transform(u, o) : u), o === "__parsed_extra" ? (r[o] = r[o] || [], r[o].push(u)) : r[o] = u;
160
164
  }
161
- return e.header && (i > v.length ? T("FieldMismatch", "TooManyFields", "Too many fields: expected " + v.length + " fields but parsed " + i, p + n) : i < v.length && T("FieldMismatch", "TooFewFields", "Too few fields: expected " + v.length + " fields but parsed " + i, p + n)), r;
165
+ return e.header && (i > _.length ? w("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + i, f + n) : i < _.length && w("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + i, f + n)), r;
162
166
  }
163
167
  var i;
164
- y && (e.header || e.dynamicTyping || e.transform) && (i = 1, !y.data.length || Array.isArray(y.data[0]) ? (y.data = y.data.map(n), i = y.data.length) : y.data = n(y.data, 0), e.header && y.meta && (y.meta.fields = v), p += i);
168
+ v && (e.header || e.dynamicTyping || e.transform) && (i = 1, !v.data.length || Array.isArray(v.data[0]) ? (v.data = v.data.map(n), i = v.data.length) : v.data = n(v.data, 0), e.header && v.meta && (v.meta.fields = _), f += i);
165
169
  }
166
- function w() {
167
- return e.header && v.length === 0;
170
+ function C() {
171
+ return e.header && _.length === 0;
168
172
  }
169
- function T(e, t, n, r) {
173
+ function w(e, t, n, r) {
170
174
  e = {
171
175
  type: e,
172
176
  code: t,
173
177
  message: n
174
- }, r !== void 0 && (e.row = r), y.errors.push(e);
178
+ }, r !== void 0 && (e.row = r), v.errors.push(e);
175
179
  }
176
- S(e.step) && (i = e.step, e.step = function(t) {
177
- y = t, w() ? C() : (C(), y.data.length !== 0 && (f += t.data.length, e.preview && f > e.preview ? n.abort() : (y.data = y.data[0], i(y, d))));
178
- }), this.parse = function(i, a, o) {
180
+ x(e.step) && (i = e.step, e.step = function(t) {
181
+ v = t, C() ? S() : (S(), v.data.length !== 0 && (d += t.data.length, e.preview && d > e.preview ? n.abort() : (v.data = v.data[0], i(v, u))));
182
+ }), this.parse = function(i, a, s) {
179
183
  var c = e.quoteChar || "\"";
180
- return e.newline ||= this.guessLineEndings(i, c), r = !1, e.delimiter ? S(e.delimiter) && (e.delimiter = e.delimiter(i), y.meta.delimiter = e.delimiter) : ((c = ((t, n, r, i, a) => {
181
- var o, c, l, u;
184
+ return e.newline ||= this.guessLineEndings(i, c), r = !1, e.delimiter ? x(e.delimiter) && (e.delimiter = e.delimiter(i), v.meta.delimiter = e.delimiter) : ((c = ((t, n, r, i, a) => {
185
+ var s, c, l, u;
182
186
  a ||= [
183
187
  ",",
184
188
  " ",
185
189
  "|",
186
190
  ";",
187
- s.RECORD_SEP,
188
- s.UNIT_SEP
191
+ o.RECORD_SEP,
192
+ o.UNIT_SEP
189
193
  ];
190
194
  for (var d = 0; d < a.length; d++) {
191
- for (var f, p = a[d], m = 0, h = 0, _ = 0, v = (l = void 0, new g({
195
+ for (var f, p = a[d], m = 0, g = 0, _ = 0, v = (l = void 0, new h({
192
196
  comments: i,
193
197
  delimiter: p,
194
198
  newline: n,
195
199
  preview: 10
196
- }).parse(t)), y = 0; y < v.data.length; y++) r && x(v.data[y]) ? _++ : (h += f = v.data[y].length, l === void 0 ? l = f : 0 < f && (m += Math.abs(f - l), l = f));
197
- 0 < v.data.length && (h /= v.data.length - _), (c === void 0 || m <= c) && (u === void 0 || u < h) && 1.99 < h && (c = m, o = p, u = h);
200
+ }).parse(t)), y = 0; y < v.data.length; y++) r && b(v.data[y]) ? _++ : (g += f = v.data[y].length, l === void 0 ? l = f : 0 < f && (m += Math.abs(f - l), l = f));
201
+ 0 < v.data.length && (g /= v.data.length - _), 1.99 < g && (c === void 0 || m < c || m === c && u < g) && (c = m, s = p, u = g);
198
202
  }
199
203
  return {
200
- successful: !!(e.delimiter = o),
201
- bestDelimiter: o
204
+ successful: !!(e.delimiter = s),
205
+ bestDelimiter: s
202
206
  };
203
- })(i, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = c.bestDelimiter : (r = !0, e.delimiter = s.DefaultDelimiter), y.meta.delimiter = e.delimiter), c = b(e), e.preview && e.header && c.preview++, t = i, n = new g(c), y = n.parse(t, a, o), C(), m ? { meta: { paused: !0 } } : y || { meta: { paused: !1 } };
207
+ })(i, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = c.bestDelimiter : (r = !0, e.delimiter = o.DefaultDelimiter), v.meta.delimiter = e.delimiter), (c = y(e)).header = C(), e.preview && e.header && c.preview++, t = i, n = new h(c), v = n.parse(t, a, s), S(), p ? { meta: { paused: !0 } } : v || { meta: { paused: !1 } };
204
208
  }, this.paused = function() {
205
- return m;
209
+ return p;
206
210
  }, this.pause = function() {
207
- m = !0, n.abort(), t = S(e.chunk) ? "" : t.substring(n.getCharIndex());
211
+ p = !0, n.abort(), t = x(e.chunk) ? "" : t.substring(n.getCharIndex());
208
212
  }, this.resume = function() {
209
- d.streamer._halted ? (m = !1, d.streamer.parseChunk(t, !0)) : setTimeout(d.resume, 3);
213
+ u.streamer._halted ? (p = !1, u.streamer.parseChunk(t, !0)) : setTimeout(u.resume, 3);
210
214
  }, this.aborted = function() {
211
- return _;
215
+ return g;
212
216
  }, this.abort = function() {
213
- _ = !0, n.abort(), y.meta.aborted = !0, S(e.complete) && e.complete(y), t = "";
217
+ g = !0, n.abort(), v.meta.aborted = !0, x(e.complete) && e.complete(v), t = "";
214
218
  }, this.guessLineEndings = function(e, t) {
215
- e = e.substring(0, 1048576), t = RegExp(h(t) + "([^]*?)" + h(t), "gm");
219
+ e = e.substring(0, 1048576), t = RegExp(m(t) + "([^]*?)" + m(t), "gm");
216
220
  var n = (e = e.replace(t, "")).split("\r");
217
221
  if (e = 1 < (t = e.split("\n")).length && t[0].length < n[0].length, n.length === 1 || e) return "\n";
218
222
  for (var r = 0, i = 0; i < n.length; i++) n[i][0] === "\n" && r++;
219
223
  return r >= n.length / 2 ? "\r\n" : "\r";
220
224
  };
221
225
  }
222
- function h(e) {
226
+ function m(e) {
223
227
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
224
228
  }
225
- function g(e) {
226
- var t = (e ||= {}).delimiter, n = e.newline, r = e.comments, i = e.step, a = e.preview, o = e.fastMode, l = null, u = !1, d = e.quoteChar == null ? "\"" : e.quoteChar, f = d;
227
- if (e.escapeChar !== void 0 && (f = e.escapeChar), (typeof t != "string" || -1 < s.BAD_DELIMITERS.indexOf(t)) && (t = ","), r === t) throw Error("Comment character same as delimiter");
228
- !0 === r ? r = "#" : (typeof r != "string" || -1 < s.BAD_DELIMITERS.indexOf(r)) && (r = !1), n !== "\n" && n !== "\r" && n !== "\r\n" && (n = "\n");
229
- var p = 0, m = !1;
230
- this.parse = function(s, g, _) {
231
- if (typeof s != "string") throw Error("Input must be a string");
232
- var v = s.length, y = t.length, b = n.length, x = r.length, C = S(i), w = [], T = [], E = [], D = p = 0;
233
- if (!s) return z();
234
- if (o || !1 !== o && s.indexOf(d) === -1) {
235
- for (var O = s.split(n), k = 0; k < O.length; k++) {
229
+ function h(e) {
230
+ var t = (e ||= {}).delimiter, n = e.newline, r = e.comments, i = e.step, a = e.preview, c = e.fastMode, l = null, u = !1, d = e.quoteChar == null ? "\"" : e.quoteChar, f = d;
231
+ if (e.escapeChar !== void 0 && (f = e.escapeChar), (typeof t != "string" || -1 < o.BAD_DELIMITERS.indexOf(t)) && (t = ","), r === t) throw Error("Comment character same as delimiter");
232
+ !0 === r ? r = "#" : (typeof r != "string" || -1 < o.BAD_DELIMITERS.indexOf(r)) && (r = !1), n !== "\n" && n !== "\r" && n !== "\r\n" && (n = "\n");
233
+ var p = 0, h = !1;
234
+ this.parse = function(o, g, _) {
235
+ if (typeof o != "string") throw Error("Input must be a string");
236
+ var v = o.length, y = t.length, b = n.length, S = r.length, C = x(i), w = [], T = [], E = [], D = p = 0;
237
+ if (!o) return z();
238
+ if (c || !1 !== c && o.indexOf(d) === -1) {
239
+ for (var O = o.split(n), k = 0; k < O.length; k++) {
236
240
  if (E = O[k], p += E.length, k !== O.length - 1) p += n.length;
237
241
  else if (_) return z();
238
- if (!r || E.substring(0, x) !== r) {
242
+ if (!r || E.substring(0, S) !== r) {
239
243
  if (C) {
240
- if (w = [], F(E.split(t)), B(), m) return z();
244
+ if (w = [], F(E.split(t)), B(), h) return z();
241
245
  } else F(E.split(t));
242
246
  if (a && a <= k) return w = w.slice(0, a), z(!0);
243
247
  }
244
248
  }
245
249
  return z();
246
250
  }
247
- for (var A = s.indexOf(t, p), j = s.indexOf(n, p), M = new RegExp(h(f) + h(d), "g"), N = s.indexOf(d, p);;) if (s[p] === d) for (N = p, p++;;) {
248
- if ((N = s.indexOf(d, N + 1)) === -1) return _ || T.push({
251
+ for (var A = o.indexOf(t, p), j = o.indexOf(n, p), M = new RegExp(m(f) + m(d), "g"), N = o.indexOf(d, p);;) if (o[p] === d) for (N = p, p++;;) {
252
+ if ((N = o.indexOf(d, N + 1)) === -1) return _ || T.push({
249
253
  type: "Quotes",
250
254
  code: "MissingQuotes",
251
255
  message: "Quoted field unterminated",
252
256
  row: w.length,
253
257
  index: p
254
258
  }), L();
255
- if (N === v - 1) return L(s.substring(p, N).replace(M, d));
256
- if (d === f && s[N + 1] === f) N++;
257
- else if (d === f || N === 0 || s[N - 1] !== f) {
258
- A !== -1 && A < N + 1 && (A = s.indexOf(t, N + 1));
259
- var P = I((j = j !== -1 && j < N + 1 ? s.indexOf(n, N + 1) : j) === -1 ? A : Math.min(A, j));
260
- if (s.substr(N + 1 + P, y) === t) {
261
- E.push(s.substring(p, N).replace(M, d)), s[p = N + 1 + P + y] !== d && (N = s.indexOf(d, p)), A = s.indexOf(t, p), j = s.indexOf(n, p);
259
+ if (N === v - 1) return L(o.substring(p, N).replace(M, d));
260
+ if (d === f && o[N + 1] === f) N++;
261
+ else if (d === f || N === 0 || o[N - 1] !== f) {
262
+ A !== -1 && A < N + 1 && (A = o.indexOf(t, N + 1));
263
+ var P = I((j = j !== -1 && j < N + 1 ? o.indexOf(n, N + 1) : j) === -1 ? A : Math.min(A, j));
264
+ if (o.substr(N + 1 + P, y) === t) {
265
+ E.push(o.substring(p, N).replace(M, d)), o[p = N + 1 + P + y] !== d && (N = o.indexOf(d, p)), A = o.indexOf(t, p), j = o.indexOf(n, p);
262
266
  break;
263
267
  }
264
- if (P = I(j), s.substring(N + 1 + P, N + 1 + P + b) === n) {
265
- if (E.push(s.substring(p, N).replace(M, d)), R(N + 1 + P + b), A = s.indexOf(t, p), N = s.indexOf(d, p), C && (B(), m)) return z();
268
+ if (P = I(j), o.substring(N + 1 + P, N + 1 + P + b) === n) {
269
+ if (E.push(o.substring(p, N).replace(M, d)), R(N + 1 + P + b), A = o.indexOf(t, p), N = o.indexOf(d, p), C && (B(), h)) return z();
266
270
  if (a && w.length >= a) return z(!0);
267
271
  break;
268
272
  }
@@ -275,13 +279,13 @@ var t = e((e, t) => {
275
279
  }), N++;
276
280
  }
277
281
  }
278
- else if (r && E.length === 0 && s.substring(p, p + x) === r) {
282
+ else if (r && E.length === 0 && o.substring(p, p + S) === r) {
279
283
  if (j === -1) return z();
280
- p = j + b, j = s.indexOf(n, p), A = s.indexOf(t, p);
281
- } else if (A !== -1 && (A < j || j === -1)) E.push(s.substring(p, A)), p = A + y, A = s.indexOf(t, p);
284
+ p = j + b, j = o.indexOf(n, p), A = o.indexOf(t, p);
285
+ } else if (A !== -1 && (A < j || j === -1)) E.push(o.substring(p, A)), p = A + y, A = o.indexOf(t, p);
282
286
  else {
283
287
  if (j === -1) break;
284
- if (E.push(s.substring(p, j)), R(j + b), C && (B(), m)) return z();
288
+ if (E.push(o.substring(p, j)), R(j + b), C && (B(), h)) return z();
285
289
  if (a && w.length >= a) return z(!0);
286
290
  }
287
291
  return L();
@@ -289,21 +293,21 @@ var t = e((e, t) => {
289
293
  w.push(e), D = p;
290
294
  }
291
295
  function I(e) {
292
- return e !== -1 && (e = s.substring(N + 1, e)) && e.trim() === "" ? e.length : 0;
296
+ return e !== -1 && (e = o.substring(N + 1, e)) && e.trim() === "" ? e.length : 0;
293
297
  }
294
298
  function L(e) {
295
- return _ || (e === void 0 && (e = s.substring(p)), E.push(e), p = v, F(E), C && B()), z();
299
+ return _ || (e === void 0 && (e = o.substring(p)), E.push(e), p = v, F(E), C && B()), z();
296
300
  }
297
301
  function R(e) {
298
- p = e, F(E), E = [], j = s.indexOf(n, p);
302
+ p = e, F(E), E = [], j = o.indexOf(n, p);
299
303
  }
300
304
  function z(r) {
301
305
  if (e.header && !g && w.length && !u) {
302
306
  var i = w[0], a = Object.create(null), o = new Set(i);
303
307
  let t = !1;
304
308
  for (let n = 0; n < i.length; n++) {
305
- let r = c(i[n]);
306
- if (a[r = S(e.transformHeader) ? e.transformHeader(r, n) : r]) {
309
+ let r = s(i[n]);
310
+ if (a[r = x(e.transformHeader) ? e.transformHeader(r, n) : r]) {
307
311
  let e, s = a[r];
308
312
  for (; e = r + "_" + s, s++, o.has(e););
309
313
  o.add(e), i[n] = e, a[r]++, t = !0, (l = l === null ? {} : l)[e] = r;
@@ -318,7 +322,7 @@ var t = e((e, t) => {
318
322
  meta: {
319
323
  delimiter: t,
320
324
  linebreak: n,
321
- aborted: m,
325
+ aborted: h,
322
326
  truncated: !!r,
323
327
  cursor: D + (g || 0),
324
328
  renamedHeaders: l
@@ -329,174 +333,147 @@ var t = e((e, t) => {
329
333
  i(z()), w = [], T = [];
330
334
  }
331
335
  }, this.abort = function() {
332
- m = !0;
336
+ h = !0;
333
337
  }, this.getCharIndex = function() {
334
338
  return p;
335
339
  };
336
340
  }
337
- function _(e) {
338
- var t = e.data, n = a[t.workerId], r = !1;
341
+ function g(e) {
342
+ var t = e.data, n = i[t.workerId], r = !1;
339
343
  if (t.error) n.userError(t.error, t.file);
340
344
  else if (t.results && t.results.data) {
341
- var i = {
345
+ var a = {
342
346
  abort: function() {
343
- r = !0, v(t.workerId, {
347
+ r = !0, _(t.workerId, {
344
348
  data: [],
345
349
  errors: [],
346
350
  meta: { aborted: !0 }
347
351
  });
348
352
  },
349
- pause: y,
350
- resume: y
353
+ pause: v,
354
+ resume: v
351
355
  };
352
- if (S(n.userStep)) {
356
+ if (x(n.userStep)) {
353
357
  for (var o = 0; o < t.results.data.length && (n.userStep({
354
358
  data: t.results.data[o],
355
359
  errors: t.results.errors,
356
360
  meta: t.results.meta
357
- }, i), !r); o++);
361
+ }, a), !r); o++);
358
362
  delete t.results;
359
- } else S(n.userChunk) && (n.userChunk(t.results, i, t.file), delete t.results);
363
+ } else x(n.userChunk) && (n.userChunk(t.results, a, t.file), delete t.results);
360
364
  }
361
- t.finished && !r && v(t.workerId, t.results);
365
+ t.finished && !r && _(t.workerId, t.results);
362
366
  }
363
- function v(e, t) {
364
- var n = a[e];
365
- S(n.userComplete) && n.userComplete(t), n.terminate(), delete a[e];
367
+ function _(e, t) {
368
+ var n = i[e];
369
+ x(n.userComplete) && n.userComplete(t), n.terminate(), delete i[e];
366
370
  }
367
- function y() {
371
+ function v() {
368
372
  throw Error("Not implemented.");
369
373
  }
370
- function b(e) {
374
+ function y(e) {
371
375
  if (typeof e != "object" || !e) return e;
372
376
  var t, n = Array.isArray(e) ? [] : {};
373
- for (t in e) n[t] = b(e[t]);
377
+ for (t in e) n[t] = y(e[t]);
374
378
  return n;
375
379
  }
376
- function x(e, t) {
380
+ function b(e, t) {
377
381
  return function() {
378
382
  e.apply(t, arguments);
379
383
  };
380
384
  }
381
- function S(e) {
385
+ function x(e) {
382
386
  return typeof e == "function";
383
387
  }
384
- return s.parse = function(t, r) {
385
- var i = (r ||= {}).dynamicTyping || !1;
386
- if (S(i) && (r.dynamicTypingFunction = i, i = {}), r.dynamicTyping = i, r.transform = !!S(r.transform) && r.transform, !r.worker || !s.WORKERS_SUPPORTED) return i = null, s.NODE_STREAM_INPUT, typeof t == "string" ? (t = c(t), i = new (r.download ? u : f)(r)) : !0 === t.readable && S(t.read) && S(t.on) ? i = new p(r) : (n.File && t instanceof File || t instanceof Object) && (i = new d(r)), i.stream(t);
387
- (i = (() => {
388
- var t;
389
- return !!s.WORKERS_SUPPORTED && (t = (() => {
390
- var t = n.URL || n.webkitURL || null, r = e.toString();
391
- return s.BLOB_URL ||= t.createObjectURL(new Blob([
388
+ return o.parse = function(n, r) {
389
+ if (x(c = (r ||= {}).dynamicTyping || !1) && (r.dynamicTypingFunction = c, c = {}), r.dynamicTyping = c, r.transform = !!x(r.transform) && r.transform, r.downloadTimeout !== void 0) {
390
+ var c = parseInt(r.downloadTimeout);
391
+ if (isNaN(c)) throw Error("Config downloadTimeout value (" + r.downloadTimeout + ") not parsable by parseInt(val).");
392
+ r.downloadTimeout = c;
393
+ }
394
+ if (!r.worker || !o.WORKERS_SUPPORTED) return c = null, o.NODE_STREAM_INPUT, typeof n == "string" ? (n = s(n), c = new (r.download ? l : d)(r)) : !0 === n.readable && x(n.read) && x(n.on) ? c = new f(r) : (t.File && n instanceof File || n instanceof Object) && (c = new u(r)), c.stream(n);
395
+ (c = (() => {
396
+ var n;
397
+ return !!o.WORKERS_SUPPORTED && (n = (() => {
398
+ var n = t.URL || t.webkitURL || null, r = e.toString();
399
+ return o.BLOB_URL ||= n.createObjectURL(new Blob([
392
400
  "var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ",
393
401
  "(",
394
402
  r,
395
403
  ")();"
396
404
  ], { type: "text/javascript" }));
397
- })(), (t = new n.Worker(t)).onmessage = _, t.id = o++, a[t.id] = t);
398
- })()).userStep = r.step, i.userChunk = r.chunk, i.userComplete = r.complete, i.userError = r.error, r.step = S(r.step), r.chunk = S(r.chunk), r.complete = S(r.complete), r.error = S(r.error), delete r.worker, i.postMessage({
399
- input: t,
405
+ })(), (n = new t.Worker(n)).onmessage = g, n.id = a++, i[n.id] = n);
406
+ })()).userStep = r.step, c.userChunk = r.chunk, c.userComplete = r.complete, c.userError = r.error, r.step = x(r.step), r.chunk = x(r.chunk), r.complete = x(r.complete), r.error = x(r.error), delete r.worker, c.postMessage({
407
+ input: n,
400
408
  config: r,
401
- workerId: i.id
409
+ workerId: c.id
402
410
  });
403
- }, s.unparse = function(e, t) {
404
- var n = !1, r = !0, i = ",", a = "\r\n", o = "\"", c = o + o, l = !1, u = null, d = !1, f = ((() => {
411
+ }, o.unparse = function(e, t) {
412
+ var n = !1, r = !0, i = ",", a = "\r\n", s = "\"", c = s + s, l = !1, u = null, d = !1, f = ((() => {
405
413
  if (typeof t == "object") {
406
- if (typeof t.delimiter != "string" || s.BAD_DELIMITERS.filter(function(e) {
414
+ if (typeof t.delimiter != "string" || o.BAD_DELIMITERS.filter(function(e) {
407
415
  return t.delimiter.indexOf(e) !== -1;
408
- }).length || (i = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (l = t.skipEmptyLines), typeof t.newline == "string" && (a = t.newline), typeof t.quoteChar == "string" && (o = t.quoteChar, c = o + o), typeof t.header == "boolean" && (r = t.header), Array.isArray(t.columns)) {
416
+ }).length || (i = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (l = t.skipEmptyLines), typeof t.newline == "string" && (a = t.newline), typeof t.quoteChar == "string" && (s = t.quoteChar, c = s + s), typeof t.header == "boolean" && (r = t.header), Array.isArray(t.columns)) {
409
417
  if (t.columns.length === 0) throw Error("Option columns is empty");
410
418
  u = t.columns;
411
419
  }
412
- t.escapeChar !== void 0 && (c = t.escapeChar + o), t.escapeFormulae instanceof RegExp ? d = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (d = /^[=+\-@\t\r].*$/);
420
+ t.escapeChar !== void 0 && (c = t.escapeChar + s), t.escapeFormulae instanceof RegExp ? d = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (d = /^[=+\-@\t\r].*$/);
413
421
  }
414
- })(), new RegExp(h(o), "g"));
422
+ })(), new RegExp(m(s), "g"));
415
423
  if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
416
424
  if (!e.length || Array.isArray(e[0])) return p(null, e, l);
417
425
  if (typeof e[0] == "object") return p(u || Object.keys(e[0]), e, l);
418
- } else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields ||= e.meta && e.meta.fields || u, e.fields ||= Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : [], Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), p(e.fields || [], e.data || [], l);
426
+ } else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || u), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), p(e.fields || [], e.data || [], l);
419
427
  throw Error("Unable to serialize unrecognized input");
420
428
  function p(e, t, n) {
421
429
  var o = "", s = (typeof e == "string" && (e = JSON.parse(e)), typeof t == "string" && (t = JSON.parse(t)), Array.isArray(e) && 0 < e.length), c = !Array.isArray(t[0]);
422
430
  if (s && r) {
423
- for (var l = 0; l < e.length; l++) 0 < l && (o += i), o += m(e[l], l);
431
+ for (var l = 0; l < e.length; l++) 0 < l && (o += i), o += h(e[l], l);
424
432
  0 < t.length && (o += a);
425
433
  }
426
434
  for (var u = 0; u < t.length; u++) {
427
435
  var d = (s ? e : t[u]).length, f = !1, p = s ? Object.keys(t[u]).length === 0 : t[u].length === 0;
428
436
  if (n && !s && (f = n === "greedy" ? t[u].join("").trim() === "" : t[u].length === 1 && t[u][0].length === 0), n === "greedy" && s) {
429
- for (var h = [], g = 0; g < d; g++) {
437
+ for (var m = [], g = 0; g < d; g++) {
430
438
  var _ = c ? e[g] : g;
431
- h.push(t[u][_]);
439
+ m.push(t[u][_]);
432
440
  }
433
- f = h.join("").trim() === "";
441
+ f = m.join("").trim() === "";
434
442
  }
435
443
  if (!f) {
436
444
  for (var v = 0; v < d; v++) {
437
445
  0 < v && !p && (o += i);
438
446
  var y = s && c ? e[v] : v;
439
- o += m(t[u][y], v);
447
+ o += h(t[u][y], v);
440
448
  }
441
449
  u < t.length - 1 && (!n || 0 < d && !p) && (o += a);
442
450
  }
443
451
  }
444
452
  return o;
445
453
  }
446
- function m(e, t) {
454
+ function h(e, t) {
447
455
  var r, a, l;
448
- return e == null ? "" : e.constructor === Date ? JSON.stringify(e).slice(1, 25) : (l = !1, d && typeof e == "string" && d.test(e) && (e = "'" + e, l = !0), a = (r = e.toString()).replace(f, c), (l = l || !0 === n || typeof n == "function" && n(e, t) || Array.isArray(n) && n[t] || ((e, t) => {
456
+ return e == null ? "" : e.constructor === Date ? isNaN(e.getTime()) ? "" : e.toISOString() : (l = !1, d && typeof e == "string" && d.test(e) && (e = "'" + e, l = !0), a = (r = e.toString()).replace(f, c), (l = l || !0 === n || typeof n == "function" && n(e, t) || Array.isArray(n) && n[t] || ((e, t) => {
449
457
  for (var n = 0; n < t.length; n++) if (-1 < e.indexOf(t[n])) return !0;
450
458
  return !1;
451
- })(a, s.BAD_DELIMITERS) || -1 < a.indexOf(i) || -1 < r.indexOf(o) || a.charAt(0) === " " || a.charAt(a.length - 1) === " ") ? o + a + o : a);
459
+ })(a, o.BAD_DELIMITERS) || -1 < a.indexOf(i) || -1 < r.indexOf(s) || a.charAt(0) === " " || a.charAt(a.length - 1) === " ") ? s + a + s : a);
452
460
  }
453
- }, s.RECORD_SEP = "", s.UNIT_SEP = "", s.BYTE_ORDER_MARK = "", s.BAD_DELIMITERS = [
461
+ }, o.RECORD_SEP = "", o.UNIT_SEP = "", o.BYTE_ORDER_MARK = "", o.BAD_DELIMITERS = [
454
462
  "\r",
455
463
  "\n",
456
464
  "\"",
457
- s.BYTE_ORDER_MARK
458
- ], s.WORKERS_SUPPORTED = !r && !!n.Worker, s.NODE_STREAM_INPUT = 1, s.LocalChunkSize = 10485760, s.RemoteChunkSize = 5242880, s.DefaultDelimiter = ",", s.Parser = g, s.ParserHandle = m, s.NetworkStreamer = u, s.FileStreamer = d, s.StringStreamer = f, s.ReadableStreamStreamer = p, n.jQuery && ((t = n.jQuery).fn.parse = function(e) {
459
- var r = e.config || {}, i = [];
460
- return this.each(function(e) {
461
- if (t(this).prop("tagName").toUpperCase() !== "INPUT" || t(this).attr("type").toLowerCase() !== "file" || !n.FileReader || !this.files || this.files.length === 0) return !0;
462
- for (var a = 0; a < this.files.length; a++) i.push({
463
- file: this.files[a],
464
- inputElem: this,
465
- instanceConfig: t.extend({}, r)
466
- });
467
- }), a(), this;
468
- function a() {
469
- if (i.length === 0) S(e.complete) && e.complete();
470
- else {
471
- var n, r, a, c = i[0];
472
- if (S(e.before)) {
473
- var l = e.before(c.file, c.inputElem);
474
- if (typeof l == "object") {
475
- if (l.action === "abort") return n = c.file, r = c.inputElem, a = l.reason, void (S(e.error) && e.error({ name: "AbortError" }, n, r, a));
476
- if (l.action === "skip") return void o();
477
- typeof l.config == "object" && (c.instanceConfig = t.extend(c.instanceConfig, l.config));
478
- } else if (l === "skip") return void o();
479
- }
480
- var u = c.instanceConfig.complete;
481
- c.instanceConfig.complete = function(e) {
482
- S(u) && u(e, c.file, c.inputElem), o();
483
- }, s.parse(c.file, c.instanceConfig);
484
- }
485
- }
486
- function o() {
487
- i.splice(0, 1), a();
488
- }
489
- }), i && (n.onmessage = function(e) {
490
- e = e.data, s.WORKER_ID === void 0 && e && (s.WORKER_ID = e.workerId), typeof e.input == "string" ? n.postMessage({
491
- workerId: s.WORKER_ID,
492
- results: s.parse(e.input, e.config),
465
+ o.BYTE_ORDER_MARK
466
+ ], o.WORKERS_SUPPORTED = !n && !!t.Worker, o.NODE_STREAM_INPUT = 1, o.LocalChunkSize = 10485760, o.RemoteChunkSize = 5242880, o.DefaultDelimiter = ",", o.Parser = h, o.ParserHandle = p, o.NetworkStreamer = l, o.FileStreamer = u, o.StringStreamer = d, o.ReadableStreamStreamer = f, r && (t.onmessage = function(e) {
467
+ e = e.data, o.WORKER_ID === void 0 && e && (o.WORKER_ID = e.workerId), typeof e.input == "string" ? t.postMessage({
468
+ workerId: o.WORKER_ID,
469
+ results: o.parse(e.input, e.config),
493
470
  finished: !0
494
- }) : (n.File && e.input instanceof File || e.input instanceof Object) && (e = s.parse(e.input, e.config)) && n.postMessage({
495
- workerId: s.WORKER_ID,
471
+ }) : (t.File && e.input instanceof File || e.input instanceof Object) && (e = o.parse(e.input, e.config)) && t.postMessage({
472
+ workerId: o.WORKER_ID,
496
473
  results: e,
497
474
  finished: !0
498
475
  });
499
- }), (u.prototype = Object.create(l.prototype)).constructor = u, (d.prototype = Object.create(l.prototype)).constructor = d, (f.prototype = Object.create(f.prototype)).constructor = f, (p.prototype = Object.create(l.prototype)).constructor = p, s;
476
+ }), (l.prototype = Object.create(c.prototype)).constructor = l, (u.prototype = Object.create(c.prototype)).constructor = u, (d.prototype = Object.create(d.prototype)).constructor = d, (f.prototype = Object.create(c.prototype)).constructor = f, o;
500
477
  };
501
478
  typeof define == "function" && define.amd ? define([], r) : typeof t == "object" && e !== void 0 ? t.exports = r() : n.Papa = r();
502
479
  });