@unicom-cloud/utils 0.1.44 → 0.1.46

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 (985) hide show
  1. package/.virtual/_rolldown/runtime.js +1 -1
  2. package/.vite/manifest.json +363 -29
  3. package/array/index.js +1 -1
  4. package/assert/index.js +1 -1
  5. package/case-name/index.js +1 -1
  6. package/class-name/index.js +1 -1
  7. package/clipboard-copy/index.js +1 -1
  8. package/constant/address.js +1 -1
  9. package/constant/chineseCharacters.js +1 -1
  10. package/constant/constellations.js +1 -1
  11. package/constant/domain.js +1 -1
  12. package/constant/identity.js +1 -1
  13. package/constant/index.js +1 -1
  14. package/constant/keyboardCode.js +1 -1
  15. package/constant/licensePlate.js +1 -1
  16. package/constant/name.js +1 -1
  17. package/constant/platform.js +1 -1
  18. package/constant/protocol.js +1 -1
  19. package/constant/string.js +1 -1
  20. package/constant/ui.js +1 -1
  21. package/content-disposition/index.js +1 -1
  22. package/cookie/api.js +1 -1
  23. package/cookie/assign.js +1 -1
  24. package/cookie/converter.js +1 -1
  25. package/cookie/index.js +1 -1
  26. package/date/convertTime.js +1 -1
  27. package/date/convertToDuration.js +1 -1
  28. package/date/index.js +1 -1
  29. package/decimal/decimal.js +1 -1
  30. package/decimal/index.js +1 -1
  31. package/dom-helpers/activeElement.js +1 -1
  32. package/dom-helpers/addClass.js +1 -1
  33. package/dom-helpers/addEventListener.js +1 -1
  34. package/dom-helpers/animate.js +1 -1
  35. package/dom-helpers/animationFrame.js +1 -1
  36. package/dom-helpers/attribute.js +1 -1
  37. package/dom-helpers/camelize.js +1 -1
  38. package/dom-helpers/camelizeStyle.js +1 -1
  39. package/dom-helpers/canUseDOM.js +1 -1
  40. package/dom-helpers/childElements.js +1 -1
  41. package/dom-helpers/childNodes.js +1 -1
  42. package/dom-helpers/clear.js +1 -1
  43. package/dom-helpers/closest.js +1 -1
  44. package/dom-helpers/collectElements.js +1 -1
  45. package/dom-helpers/collectSiblings.js +1 -1
  46. package/dom-helpers/contains.js +1 -1
  47. package/dom-helpers/css.js +1 -1
  48. package/dom-helpers/filterEventHandler.js +1 -1
  49. package/dom-helpers/getComputedStyle.js +1 -1
  50. package/dom-helpers/getElementCoordinates.js +1 -1
  51. package/dom-helpers/getScrollAccessor.js +1 -1
  52. package/dom-helpers/hasClass.js +1 -1
  53. package/dom-helpers/height.js +1 -1
  54. package/dom-helpers/hyphenate.js +1 -1
  55. package/dom-helpers/hyphenateStyle.js +1 -1
  56. package/dom-helpers/index.js +1 -1
  57. package/dom-helpers/insertAfter.js +1 -1
  58. package/dom-helpers/isDocument.js +1 -1
  59. package/dom-helpers/isInput.js +1 -1
  60. package/dom-helpers/isTransform.js +1 -1
  61. package/dom-helpers/isVisible.js +1 -1
  62. package/dom-helpers/isWindow.js +1 -1
  63. package/dom-helpers/listen.js +1 -1
  64. package/dom-helpers/matches.js +1 -1
  65. package/dom-helpers/nextUntil.js +1 -1
  66. package/dom-helpers/offset.js +1 -1
  67. package/dom-helpers/offsetParent.js +1 -1
  68. package/dom-helpers/ownerDocument.js +1 -1
  69. package/dom-helpers/ownerWindow.js +1 -1
  70. package/dom-helpers/parents.js +1 -1
  71. package/dom-helpers/position.js +1 -1
  72. package/dom-helpers/prepend.js +1 -1
  73. package/dom-helpers/querySelectorAll.js +1 -1
  74. package/dom-helpers/reflow.js +1 -1
  75. package/dom-helpers/remove.js +1 -1
  76. package/dom-helpers/removeClass.js +1 -1
  77. package/dom-helpers/removeEventListener.js +1 -1
  78. package/dom-helpers/scrollLeft.js +1 -1
  79. package/dom-helpers/scrollParent.js +1 -1
  80. package/dom-helpers/scrollTo.js +1 -1
  81. package/dom-helpers/scrollTop.js +1 -1
  82. package/dom-helpers/scrollbarSize.js +1 -1
  83. package/dom-helpers/siblings.js +1 -1
  84. package/dom-helpers/text.js +1 -1
  85. package/dom-helpers/toggleClass.js +1 -1
  86. package/dom-helpers/transitionEnd.js +1 -1
  87. package/dom-helpers/triggerEvent.js +1 -1
  88. package/dom-helpers/types.js +1 -1
  89. package/dom-helpers/width.js +1 -1
  90. package/emitter/index.js +1 -1
  91. package/emoji/emoji.js +1 -1
  92. package/emoji/emojis.js +1 -1
  93. package/emoji/index.js +1 -1
  94. package/escape/index.js +1 -1
  95. package/fflate/LICENSE +20 -0
  96. package/fflate/index.d.ts +1 -0
  97. package/fflate/index.js +4 -0
  98. package/fflate/src/index.d.ts +1538 -0
  99. package/fflate/src/index.js +1424 -0
  100. package/fflate/src/node-worker.d.ts +2 -0
  101. package/fflate/src/worker.d.ts +2 -0
  102. package/fflate/src/worker.js +15 -0
  103. package/file/fileRead.js +1 -1
  104. package/file/fileToDataURL.js +1 -1
  105. package/file/img.js +1 -1
  106. package/file/index.js +1 -1
  107. package/file/saveAs.js +1 -1
  108. package/filesize/index.js +1 -1
  109. package/filesize/src/constants.js +1 -1
  110. package/filesize/src/filesize.js +1 -1
  111. package/filesize/src/helpers.js +1 -1
  112. package/function/index.js +1 -1
  113. package/idb/async-iterators.js +1 -1
  114. package/idb/database-extras.js +1 -1
  115. package/idb/entry.js +1 -1
  116. package/idb/index-.js +1 -1
  117. package/idb/index.js +1 -1
  118. package/idb/util.js +1 -1
  119. package/idb/wrap-idb-value.js +1 -1
  120. package/index.js +1 -1
  121. package/invariant/index.js +1 -1
  122. package/is/index.js +1 -1
  123. package/is/lib/isAscii.js +1 -1
  124. package/is/lib/isBase64.js +1 -1
  125. package/is/lib/isChinese.js +1 -1
  126. package/is/lib/isDataURI.js +1 -1
  127. package/is/lib/isEmail.js +1 -1
  128. package/is/lib/isFQDN.js +1 -1
  129. package/is/lib/isFullWidth.js +1 -1
  130. package/is/lib/isHSL.js +1 -1
  131. package/is/lib/isHalfWidth.js +1 -1
  132. package/is/lib/isHash.js +1 -1
  133. package/is/lib/isHexColor.js +1 -1
  134. package/is/lib/isIMEI.js +1 -1
  135. package/is/lib/isIP.js +1 -1
  136. package/is/lib/isIPRange.js +1 -1
  137. package/is/lib/isIdentityCard.js +1 -1
  138. package/is/lib/isJWT.js +1 -1
  139. package/is/lib/isMACAddress.js +1 -1
  140. package/is/lib/isMD5.js +1 -1
  141. package/is/lib/isMimeType.js +1 -1
  142. package/is/lib/isMobilePhone.js +1 -1
  143. package/is/lib/isPort.js +1 -1
  144. package/is/lib/isRgbColor.js +1 -1
  145. package/is/lib/isSemVer.js +1 -1
  146. package/is/lib/isSlug.js +1 -1
  147. package/is/lib/isStrongPassword.js +1 -1
  148. package/is/lib/isURL.js +5 -3
  149. package/is/lib/isUUID.js +1 -1
  150. package/is/lib/isVariableWidth.js +1 -1
  151. package/lodash/_DataView.js +1 -1
  152. package/lodash/_Hash.js +1 -1
  153. package/lodash/_LazyWrapper.js +1 -1
  154. package/lodash/_ListCache.js +1 -1
  155. package/lodash/_LodashWrapper.js +1 -1
  156. package/lodash/_Map.js +1 -1
  157. package/lodash/_MapCache.js +1 -1
  158. package/lodash/_Promise.js +1 -1
  159. package/lodash/_Set.js +1 -1
  160. package/lodash/_SetCache.js +1 -1
  161. package/lodash/_Stack.js +1 -1
  162. package/lodash/_Symbol.js +1 -1
  163. package/lodash/_Uint8Array.js +1 -1
  164. package/lodash/_WeakMap.js +1 -1
  165. package/lodash/_addMapEntry.js +1 -1
  166. package/lodash/_addSetEntry.js +1 -1
  167. package/lodash/_apply.js +1 -1
  168. package/lodash/_arrayAggregator.js +1 -1
  169. package/lodash/_arrayEach.js +1 -1
  170. package/lodash/_arrayEachRight.js +1 -1
  171. package/lodash/_arrayEvery.js +1 -1
  172. package/lodash/_arrayFilter.js +1 -1
  173. package/lodash/_arrayIncludes.js +1 -1
  174. package/lodash/_arrayIncludesWith.js +1 -1
  175. package/lodash/_arrayLikeKeys.js +1 -1
  176. package/lodash/_arrayMap.js +1 -1
  177. package/lodash/_arrayPush.js +1 -1
  178. package/lodash/_arrayReduce.js +1 -1
  179. package/lodash/_arrayReduceRight.js +1 -1
  180. package/lodash/_arraySample.js +1 -1
  181. package/lodash/_arraySampleSize.js +1 -1
  182. package/lodash/_arrayShuffle.js +1 -1
  183. package/lodash/_arraySome.js +1 -1
  184. package/lodash/_asciiSize.js +1 -1
  185. package/lodash/_asciiToArray.js +1 -1
  186. package/lodash/_asciiWords.js +1 -1
  187. package/lodash/_assignMergeValue.js +1 -1
  188. package/lodash/_assignValue.js +1 -1
  189. package/lodash/_assocIndexOf.js +1 -1
  190. package/lodash/_baseAggregator.js +1 -1
  191. package/lodash/_baseAssign.js +1 -1
  192. package/lodash/_baseAssignIn.js +1 -1
  193. package/lodash/_baseAssignValue.js +1 -1
  194. package/lodash/_baseAt.js +1 -1
  195. package/lodash/_baseClamp.js +1 -1
  196. package/lodash/_baseClone.js +1 -1
  197. package/lodash/_baseConforms.js +1 -1
  198. package/lodash/_baseConformsTo.js +1 -1
  199. package/lodash/_baseCreate.js +1 -1
  200. package/lodash/_baseDelay.js +1 -1
  201. package/lodash/_baseDifference.js +1 -1
  202. package/lodash/_baseEach.js +1 -1
  203. package/lodash/_baseEachRight.js +1 -1
  204. package/lodash/_baseEvery.js +1 -1
  205. package/lodash/_baseExtremum.js +1 -1
  206. package/lodash/_baseFill.js +1 -1
  207. package/lodash/_baseFilter.js +1 -1
  208. package/lodash/_baseFindIndex.js +1 -1
  209. package/lodash/_baseFindKey.js +1 -1
  210. package/lodash/_baseFlatten.js +1 -1
  211. package/lodash/_baseFor.js +1 -1
  212. package/lodash/_baseForOwn.js +1 -1
  213. package/lodash/_baseForOwnRight.js +1 -1
  214. package/lodash/_baseForRight.js +1 -1
  215. package/lodash/_baseFunctions.js +1 -1
  216. package/lodash/_baseGet.js +1 -1
  217. package/lodash/_baseGetAllKeys.js +1 -1
  218. package/lodash/_baseGetTag.js +1 -1
  219. package/lodash/_baseGt.js +1 -1
  220. package/lodash/_baseHas.js +1 -1
  221. package/lodash/_baseHasIn.js +1 -1
  222. package/lodash/_baseInRange.js +1 -1
  223. package/lodash/_baseIndexOf.js +1 -1
  224. package/lodash/_baseIndexOfWith.js +1 -1
  225. package/lodash/_baseIntersection.js +1 -1
  226. package/lodash/_baseInverter.js +1 -1
  227. package/lodash/_baseInvoke.js +1 -1
  228. package/lodash/_baseIsArguments.js +1 -1
  229. package/lodash/_baseIsArrayBuffer.js +1 -1
  230. package/lodash/_baseIsDate.js +1 -1
  231. package/lodash/_baseIsEqual.js +1 -1
  232. package/lodash/_baseIsEqualDeep.js +1 -1
  233. package/lodash/_baseIsMap.js +1 -1
  234. package/lodash/_baseIsMatch.js +1 -1
  235. package/lodash/_baseIsNaN.js +1 -1
  236. package/lodash/_baseIsNative.js +1 -1
  237. package/lodash/_baseIsRegExp.js +1 -1
  238. package/lodash/_baseIsSet.js +1 -1
  239. package/lodash/_baseIsTypedArray.js +1 -1
  240. package/lodash/_baseIteratee.js +1 -1
  241. package/lodash/_baseKeys.js +1 -1
  242. package/lodash/_baseKeysIn.js +1 -1
  243. package/lodash/_baseLodash.js +1 -1
  244. package/lodash/_baseLt.js +1 -1
  245. package/lodash/_baseMap.js +1 -1
  246. package/lodash/_baseMatches.js +1 -1
  247. package/lodash/_baseMatchesProperty.js +1 -1
  248. package/lodash/_baseMean.js +1 -1
  249. package/lodash/_baseMerge.js +1 -1
  250. package/lodash/_baseMergeDeep.js +1 -1
  251. package/lodash/_baseNth.js +1 -1
  252. package/lodash/_baseOrderBy.js +1 -1
  253. package/lodash/_basePick.js +1 -1
  254. package/lodash/_basePickBy.js +1 -1
  255. package/lodash/_baseProperty.js +1 -1
  256. package/lodash/_basePropertyDeep.js +1 -1
  257. package/lodash/_basePropertyOf.js +1 -1
  258. package/lodash/_basePullAll.js +1 -1
  259. package/lodash/_basePullAt.js +1 -1
  260. package/lodash/_baseRandom.js +1 -1
  261. package/lodash/_baseRange.js +1 -1
  262. package/lodash/_baseReduce.js +1 -1
  263. package/lodash/_baseRepeat.js +1 -1
  264. package/lodash/_baseRest.js +1 -1
  265. package/lodash/_baseSample.js +1 -1
  266. package/lodash/_baseSampleSize.js +1 -1
  267. package/lodash/_baseSet.js +1 -1
  268. package/lodash/_baseSetData.js +1 -1
  269. package/lodash/_baseSetToString.js +1 -1
  270. package/lodash/_baseShuffle.js +1 -1
  271. package/lodash/_baseSlice.js +1 -1
  272. package/lodash/_baseSome.js +1 -1
  273. package/lodash/_baseSortBy.js +1 -1
  274. package/lodash/_baseSortedIndex.js +1 -1
  275. package/lodash/_baseSortedIndexBy.js +1 -1
  276. package/lodash/_baseSortedUniq.js +1 -1
  277. package/lodash/_baseSum.js +1 -1
  278. package/lodash/_baseTimes.js +1 -1
  279. package/lodash/_baseToNumber.js +1 -1
  280. package/lodash/_baseToPairs.js +1 -1
  281. package/lodash/_baseToString.js +1 -1
  282. package/lodash/_baseTrim.js +1 -1
  283. package/lodash/_baseUnary.js +1 -1
  284. package/lodash/_baseUniq.js +1 -1
  285. package/lodash/_baseUnset.js +1 -1
  286. package/lodash/_baseUpdate.js +1 -1
  287. package/lodash/_baseValues.js +1 -1
  288. package/lodash/_baseWhile.js +1 -1
  289. package/lodash/_baseWrapperValue.js +1 -1
  290. package/lodash/_baseXor.js +1 -1
  291. package/lodash/_baseZipObject.js +1 -1
  292. package/lodash/_cacheHas.js +1 -1
  293. package/lodash/_castArrayLikeObject.js +1 -1
  294. package/lodash/_castFunction.js +1 -1
  295. package/lodash/_castPath.js +1 -1
  296. package/lodash/_castRest.js +1 -1
  297. package/lodash/_castSlice.js +1 -1
  298. package/lodash/_charsEndIndex.js +1 -1
  299. package/lodash/_charsStartIndex.js +1 -1
  300. package/lodash/_cloneArrayBuffer.js +1 -1
  301. package/lodash/_cloneBuffer.js +1 -1
  302. package/lodash/_cloneDataView.js +1 -1
  303. package/lodash/_cloneMap.js +1 -1
  304. package/lodash/_cloneRegExp.js +1 -1
  305. package/lodash/_cloneSet.js +1 -1
  306. package/lodash/_cloneSymbol.js +1 -1
  307. package/lodash/_cloneTypedArray.js +1 -1
  308. package/lodash/_compareAscending.js +1 -1
  309. package/lodash/_compareMultiple.js +1 -1
  310. package/lodash/_composeArgs.js +1 -1
  311. package/lodash/_composeArgsRight.js +1 -1
  312. package/lodash/_copyArray.js +1 -1
  313. package/lodash/_copyObject.js +1 -1
  314. package/lodash/_copySymbols.js +1 -1
  315. package/lodash/_copySymbolsIn.js +1 -1
  316. package/lodash/_coreJsData.js +1 -1
  317. package/lodash/_countHolders.js +1 -1
  318. package/lodash/_createAggregator.js +1 -1
  319. package/lodash/_createAssigner.js +1 -1
  320. package/lodash/_createBaseEach.js +1 -1
  321. package/lodash/_createBaseFor.js +1 -1
  322. package/lodash/_createBind.js +1 -1
  323. package/lodash/_createCaseFirst.js +1 -1
  324. package/lodash/_createCompounder.js +1 -1
  325. package/lodash/_createCtor.js +1 -1
  326. package/lodash/_createCurry.js +1 -1
  327. package/lodash/_createFind.js +1 -1
  328. package/lodash/_createFlow.js +1 -1
  329. package/lodash/_createHybrid.js +1 -1
  330. package/lodash/_createInverter.js +1 -1
  331. package/lodash/_createMathOperation.js +1 -1
  332. package/lodash/_createOver.js +1 -1
  333. package/lodash/_createPadding.js +1 -1
  334. package/lodash/_createPartial.js +1 -1
  335. package/lodash/_createRange.js +1 -1
  336. package/lodash/_createRecurry.js +1 -1
  337. package/lodash/_createRelationalOperation.js +1 -1
  338. package/lodash/_createRound.js +1 -1
  339. package/lodash/_createSet.js +1 -1
  340. package/lodash/_createToPairs.js +1 -1
  341. package/lodash/_createWrap.js +1 -1
  342. package/lodash/_customDefaultsAssignIn.js +1 -1
  343. package/lodash/_customDefaultsMerge.js +1 -1
  344. package/lodash/_customOmitClone.js +1 -1
  345. package/lodash/_deburrLetter.js +1 -1
  346. package/lodash/_defineProperty.js +1 -1
  347. package/lodash/_equalArrays.js +1 -1
  348. package/lodash/_equalByTag.js +1 -1
  349. package/lodash/_equalObjects.js +1 -1
  350. package/lodash/_escapeHtmlChar.js +1 -1
  351. package/lodash/_escapeStringChar.js +1 -1
  352. package/lodash/_flatRest.js +1 -1
  353. package/lodash/_freeGlobal.js +1 -1
  354. package/lodash/_getAllKeys.js +1 -1
  355. package/lodash/_getAllKeysIn.js +1 -1
  356. package/lodash/_getData.js +1 -1
  357. package/lodash/_getFuncName.js +1 -1
  358. package/lodash/_getHolder.js +1 -1
  359. package/lodash/_getMapData.js +1 -1
  360. package/lodash/_getMatchData.js +1 -1
  361. package/lodash/_getNative.js +1 -1
  362. package/lodash/_getPrototype.js +1 -1
  363. package/lodash/_getRawTag.js +1 -1
  364. package/lodash/_getSymbols.js +1 -1
  365. package/lodash/_getSymbolsIn.js +1 -1
  366. package/lodash/_getTag.js +1 -1
  367. package/lodash/_getValue.js +1 -1
  368. package/lodash/_getView.js +1 -1
  369. package/lodash/_getWrapDetails.js +1 -1
  370. package/lodash/_hasPath.js +1 -1
  371. package/lodash/_hasUnicode.js +1 -1
  372. package/lodash/_hasUnicodeWord.js +1 -1
  373. package/lodash/_hashClear.js +1 -1
  374. package/lodash/_hashDelete.js +1 -1
  375. package/lodash/_hashGet.js +1 -1
  376. package/lodash/_hashHas.js +1 -1
  377. package/lodash/_hashSet.js +1 -1
  378. package/lodash/_initCloneArray.js +1 -1
  379. package/lodash/_initCloneByTag.js +1 -1
  380. package/lodash/_initCloneObject.js +1 -1
  381. package/lodash/_insertWrapDetails.js +1 -1
  382. package/lodash/_isFlattenable.js +1 -1
  383. package/lodash/_isIndex.js +1 -1
  384. package/lodash/_isIterateeCall.js +1 -1
  385. package/lodash/_isKey.js +1 -1
  386. package/lodash/_isKeyable.js +1 -1
  387. package/lodash/_isLaziable.js +1 -1
  388. package/lodash/_isMaskable.js +1 -1
  389. package/lodash/_isMasked.js +1 -1
  390. package/lodash/_isPrototype.js +1 -1
  391. package/lodash/_isStrictComparable.js +1 -1
  392. package/lodash/_iteratorToArray.js +1 -1
  393. package/lodash/_lazyClone.js +1 -1
  394. package/lodash/_lazyReverse.js +1 -1
  395. package/lodash/_lazyValue.js +1 -1
  396. package/lodash/_listCacheClear.js +1 -1
  397. package/lodash/_listCacheDelete.js +1 -1
  398. package/lodash/_listCacheGet.js +1 -1
  399. package/lodash/_listCacheHas.js +1 -1
  400. package/lodash/_listCacheSet.js +1 -1
  401. package/lodash/_mapCacheClear.js +1 -1
  402. package/lodash/_mapCacheDelete.js +1 -1
  403. package/lodash/_mapCacheGet.js +1 -1
  404. package/lodash/_mapCacheHas.js +1 -1
  405. package/lodash/_mapCacheSet.js +1 -1
  406. package/lodash/_mapToArray.js +1 -1
  407. package/lodash/_matchesStrictComparable.js +1 -1
  408. package/lodash/_memoizeCapped.js +1 -1
  409. package/lodash/_mergeData.js +1 -1
  410. package/lodash/_metaMap.js +1 -1
  411. package/lodash/_nativeCreate.js +1 -1
  412. package/lodash/_nativeKeys.js +1 -1
  413. package/lodash/_nativeKeysIn.js +1 -1
  414. package/lodash/_nodeUtil.js +1 -1
  415. package/lodash/_objectToString.js +1 -1
  416. package/lodash/_overArg.js +1 -1
  417. package/lodash/_overRest.js +1 -1
  418. package/lodash/_parent.js +1 -1
  419. package/lodash/_reEscape.js +1 -1
  420. package/lodash/_reEvaluate.js +1 -1
  421. package/lodash/_reInterpolate.js +1 -1
  422. package/lodash/_realNames.js +1 -1
  423. package/lodash/_reorder.js +1 -1
  424. package/lodash/_replaceHolders.js +1 -1
  425. package/lodash/_root.js +1 -1
  426. package/lodash/_safeGet.js +1 -1
  427. package/lodash/_setCacheAdd.js +1 -1
  428. package/lodash/_setCacheHas.js +1 -1
  429. package/lodash/_setData.js +1 -1
  430. package/lodash/_setToArray.js +1 -1
  431. package/lodash/_setToPairs.js +1 -1
  432. package/lodash/_setToString.js +1 -1
  433. package/lodash/_setWrapToString.js +1 -1
  434. package/lodash/_shortOut.js +1 -1
  435. package/lodash/_shuffleSelf.js +1 -1
  436. package/lodash/_stackClear.js +1 -1
  437. package/lodash/_stackDelete.js +1 -1
  438. package/lodash/_stackGet.js +1 -1
  439. package/lodash/_stackHas.js +1 -1
  440. package/lodash/_stackSet.js +1 -1
  441. package/lodash/_strictIndexOf.js +1 -1
  442. package/lodash/_strictLastIndexOf.js +1 -1
  443. package/lodash/_stringSize.js +1 -1
  444. package/lodash/_stringToArray.js +1 -1
  445. package/lodash/_stringToPath.js +1 -1
  446. package/lodash/_toKey.js +1 -1
  447. package/lodash/_toSource.js +1 -1
  448. package/lodash/_trimmedEndIndex.js +1 -1
  449. package/lodash/_unescapeHtmlChar.js +1 -1
  450. package/lodash/_unicodeSize.js +1 -1
  451. package/lodash/_unicodeToArray.js +1 -1
  452. package/lodash/_unicodeWords.js +1 -1
  453. package/lodash/_updateWrapDetails.js +1 -1
  454. package/lodash/_wrapperClone.js +1 -1
  455. package/lodash/add.js +1 -1
  456. package/lodash/after.js +1 -1
  457. package/lodash/array.default.js +1 -1
  458. package/lodash/array.js +1 -1
  459. package/lodash/ary.js +1 -1
  460. package/lodash/assign.js +1 -1
  461. package/lodash/assignIn.js +1 -1
  462. package/lodash/assignInWith.js +1 -1
  463. package/lodash/assignWith.js +1 -1
  464. package/lodash/at.js +1 -1
  465. package/lodash/attempt.js +1 -1
  466. package/lodash/before.js +1 -1
  467. package/lodash/bind.js +1 -1
  468. package/lodash/bindAll.js +1 -1
  469. package/lodash/bindKey.js +1 -1
  470. package/lodash/camelCase.js +1 -1
  471. package/lodash/capitalize.js +1 -1
  472. package/lodash/castArray.js +1 -1
  473. package/lodash/ceil.js +1 -1
  474. package/lodash/chain.js +1 -1
  475. package/lodash/chunk.js +1 -1
  476. package/lodash/clamp.js +1 -1
  477. package/lodash/clone.js +1 -1
  478. package/lodash/cloneDeep.js +1 -1
  479. package/lodash/cloneDeepWith.js +1 -1
  480. package/lodash/cloneWith.js +1 -1
  481. package/lodash/collection.default.js +1 -1
  482. package/lodash/collection.js +1 -1
  483. package/lodash/commit.js +1 -1
  484. package/lodash/compact.js +1 -1
  485. package/lodash/concat.js +1 -1
  486. package/lodash/cond.js +1 -1
  487. package/lodash/conforms.js +1 -1
  488. package/lodash/conformsTo.js +1 -1
  489. package/lodash/constant.js +1 -1
  490. package/lodash/countBy.js +1 -1
  491. package/lodash/create.js +1 -1
  492. package/lodash/curry.js +1 -1
  493. package/lodash/curryRight.js +1 -1
  494. package/lodash/date.default.js +1 -1
  495. package/lodash/date.js +1 -1
  496. package/lodash/debounce.js +1 -1
  497. package/lodash/deburr.js +1 -1
  498. package/lodash/defaultTo.js +1 -1
  499. package/lodash/defaults.js +1 -1
  500. package/lodash/defaultsDeep.js +1 -1
  501. package/lodash/defer.js +1 -1
  502. package/lodash/delay.js +1 -1
  503. package/lodash/difference.js +1 -1
  504. package/lodash/differenceBy.js +1 -1
  505. package/lodash/differenceWith.js +1 -1
  506. package/lodash/divide.js +1 -1
  507. package/lodash/drop.js +1 -1
  508. package/lodash/dropRight.js +1 -1
  509. package/lodash/dropRightWhile.js +1 -1
  510. package/lodash/dropWhile.js +1 -1
  511. package/lodash/each.js +1 -1
  512. package/lodash/eachRight.js +1 -1
  513. package/lodash/endsWith.js +1 -1
  514. package/lodash/entries.js +1 -1
  515. package/lodash/entriesIn.js +1 -1
  516. package/lodash/eq.js +1 -1
  517. package/lodash/escape.js +1 -1
  518. package/lodash/escapeRegExp.js +1 -1
  519. package/lodash/every.js +1 -1
  520. package/lodash/extend.js +1 -1
  521. package/lodash/extendWith.js +1 -1
  522. package/lodash/fill.js +1 -1
  523. package/lodash/filter.js +1 -1
  524. package/lodash/find.js +1 -1
  525. package/lodash/findIndex.js +1 -1
  526. package/lodash/findKey.js +1 -1
  527. package/lodash/findLast.js +1 -1
  528. package/lodash/findLastIndex.js +1 -1
  529. package/lodash/findLastKey.js +1 -1
  530. package/lodash/first.js +1 -1
  531. package/lodash/flatMap.js +1 -1
  532. package/lodash/flatMapDeep.js +1 -1
  533. package/lodash/flatMapDepth.js +1 -1
  534. package/lodash/flatten.js +1 -1
  535. package/lodash/flattenDeep.js +1 -1
  536. package/lodash/flattenDepth.js +1 -1
  537. package/lodash/flip.js +1 -1
  538. package/lodash/floor.js +1 -1
  539. package/lodash/flow.js +1 -1
  540. package/lodash/flowRight.js +1 -1
  541. package/lodash/forEach.js +1 -1
  542. package/lodash/forEachRight.js +1 -1
  543. package/lodash/forIn.js +1 -1
  544. package/lodash/forInRight.js +1 -1
  545. package/lodash/forOwn.js +1 -1
  546. package/lodash/forOwnRight.js +1 -1
  547. package/lodash/fromPairs.js +1 -1
  548. package/lodash/function.default.js +1 -1
  549. package/lodash/function.js +1 -1
  550. package/lodash/functions.js +1 -1
  551. package/lodash/functionsIn.js +1 -1
  552. package/lodash/get.js +1 -1
  553. package/lodash/groupBy.js +1 -1
  554. package/lodash/gt.js +1 -1
  555. package/lodash/gte.js +1 -1
  556. package/lodash/has.js +1 -1
  557. package/lodash/hasIn.js +1 -1
  558. package/lodash/head.js +1 -1
  559. package/lodash/identity.js +1 -1
  560. package/lodash/inRange.js +1 -1
  561. package/lodash/includes.js +1 -1
  562. package/lodash/index.js +1 -1
  563. package/lodash/indexOf.js +1 -1
  564. package/lodash/initial.js +1 -1
  565. package/lodash/intersection.js +1 -1
  566. package/lodash/intersectionBy.js +1 -1
  567. package/lodash/intersectionWith.js +1 -1
  568. package/lodash/invert.js +1 -1
  569. package/lodash/invertBy.js +1 -1
  570. package/lodash/invoke.js +1 -1
  571. package/lodash/invokeMap.js +1 -1
  572. package/lodash/isArguments.js +1 -1
  573. package/lodash/isArray.js +1 -1
  574. package/lodash/isArrayBuffer.js +1 -1
  575. package/lodash/isArrayLike.js +1 -1
  576. package/lodash/isArrayLikeObject.js +1 -1
  577. package/lodash/isBoolean.js +1 -1
  578. package/lodash/isBuffer.js +1 -1
  579. package/lodash/isDate.js +1 -1
  580. package/lodash/isElement.js +1 -1
  581. package/lodash/isEmpty.js +1 -1
  582. package/lodash/isEqual.js +1 -1
  583. package/lodash/isEqualWith.js +1 -1
  584. package/lodash/isError.js +1 -1
  585. package/lodash/isFinite.js +1 -1
  586. package/lodash/isFunction.js +1 -1
  587. package/lodash/isInteger.js +1 -1
  588. package/lodash/isLength.js +1 -1
  589. package/lodash/isMap.js +1 -1
  590. package/lodash/isMatch.js +1 -1
  591. package/lodash/isMatchWith.js +1 -1
  592. package/lodash/isNaN.js +1 -1
  593. package/lodash/isNative.js +1 -1
  594. package/lodash/isNil.js +1 -1
  595. package/lodash/isNull.js +1 -1
  596. package/lodash/isNumber.js +1 -1
  597. package/lodash/isObject.js +1 -1
  598. package/lodash/isObjectLike.js +1 -1
  599. package/lodash/isPlainObject.js +1 -1
  600. package/lodash/isPromise.js +1 -1
  601. package/lodash/isRegExp.js +1 -1
  602. package/lodash/isSafeInteger.js +1 -1
  603. package/lodash/isSet.js +1 -1
  604. package/lodash/isString.js +1 -1
  605. package/lodash/isSymbol.js +1 -1
  606. package/lodash/isTypedArray.js +1 -1
  607. package/lodash/isUndefined.js +1 -1
  608. package/lodash/isWeakMap.js +1 -1
  609. package/lodash/isWeakSet.js +1 -1
  610. package/lodash/iteratee.js +1 -1
  611. package/lodash/join.js +1 -1
  612. package/lodash/kebabCase.js +1 -1
  613. package/lodash/keyBy.js +1 -1
  614. package/lodash/keys.js +1 -1
  615. package/lodash/keysIn.js +1 -1
  616. package/lodash/lang.default.js +1 -1
  617. package/lodash/lang.js +1 -1
  618. package/lodash/last.js +1 -1
  619. package/lodash/lastIndexOf.js +1 -1
  620. package/lodash/lodash.default.js +1 -1
  621. package/lodash/lodash.js +1 -1
  622. package/lodash/lowerCase.js +1 -1
  623. package/lodash/lowerFirst.js +1 -1
  624. package/lodash/lt.js +1 -1
  625. package/lodash/lte.js +1 -1
  626. package/lodash/map.js +1 -1
  627. package/lodash/mapKeys.js +1 -1
  628. package/lodash/mapValues.js +1 -1
  629. package/lodash/matches.js +1 -1
  630. package/lodash/matchesProperty.js +1 -1
  631. package/lodash/math.default.js +1 -1
  632. package/lodash/math.js +1 -1
  633. package/lodash/max.js +1 -1
  634. package/lodash/maxBy.js +1 -1
  635. package/lodash/mean.js +1 -1
  636. package/lodash/meanBy.js +1 -1
  637. package/lodash/memoize.js +1 -1
  638. package/lodash/merge.js +1 -1
  639. package/lodash/mergeWith.js +1 -1
  640. package/lodash/method.js +1 -1
  641. package/lodash/methodOf.js +1 -1
  642. package/lodash/min.js +1 -1
  643. package/lodash/minBy.js +1 -1
  644. package/lodash/mixin.js +1 -1
  645. package/lodash/multiply.js +1 -1
  646. package/lodash/negate.js +1 -1
  647. package/lodash/next.js +1 -1
  648. package/lodash/noop.js +1 -1
  649. package/lodash/now.js +1 -1
  650. package/lodash/nth.js +1 -1
  651. package/lodash/nthArg.js +1 -1
  652. package/lodash/number.default.js +1 -1
  653. package/lodash/number.js +1 -1
  654. package/lodash/object.default.js +1 -1
  655. package/lodash/object.js +1 -1
  656. package/lodash/omit.js +1 -1
  657. package/lodash/omitBy.js +1 -1
  658. package/lodash/once.js +1 -1
  659. package/lodash/orderBy.js +1 -1
  660. package/lodash/over.js +1 -1
  661. package/lodash/overArgs.js +1 -1
  662. package/lodash/overEvery.js +1 -1
  663. package/lodash/overSome.js +1 -1
  664. package/lodash/pad.js +1 -1
  665. package/lodash/padEnd.js +1 -1
  666. package/lodash/padStart.js +1 -1
  667. package/lodash/parseInt.js +1 -1
  668. package/lodash/partial.js +1 -1
  669. package/lodash/partialRight.js +1 -1
  670. package/lodash/partition.js +1 -1
  671. package/lodash/pick.js +1 -1
  672. package/lodash/pickBy.js +1 -1
  673. package/lodash/plant.js +1 -1
  674. package/lodash/property.js +1 -1
  675. package/lodash/propertyOf.js +1 -1
  676. package/lodash/pull.js +1 -1
  677. package/lodash/pullAll.js +1 -1
  678. package/lodash/pullAllBy.js +1 -1
  679. package/lodash/pullAllWith.js +1 -1
  680. package/lodash/pullAt.js +1 -1
  681. package/lodash/random.js +1 -1
  682. package/lodash/range.js +1 -1
  683. package/lodash/rangeRight.js +1 -1
  684. package/lodash/rearg.js +1 -1
  685. package/lodash/reduce.js +1 -1
  686. package/lodash/reduceRight.js +1 -1
  687. package/lodash/reject.js +1 -1
  688. package/lodash/remove.js +1 -1
  689. package/lodash/repeat.js +1 -1
  690. package/lodash/replace.js +1 -1
  691. package/lodash/rest.js +1 -1
  692. package/lodash/result.js +1 -1
  693. package/lodash/reverse.js +1 -1
  694. package/lodash/round.js +1 -1
  695. package/lodash/sample.js +1 -1
  696. package/lodash/sampleSize.js +1 -1
  697. package/lodash/seq.default.js +1 -1
  698. package/lodash/seq.js +1 -1
  699. package/lodash/set.js +1 -1
  700. package/lodash/setWith.js +1 -1
  701. package/lodash/shuffle.js +1 -1
  702. package/lodash/size.js +1 -1
  703. package/lodash/slice.js +1 -1
  704. package/lodash/snakeCase.js +1 -1
  705. package/lodash/some.js +1 -1
  706. package/lodash/sortBy.js +1 -1
  707. package/lodash/sortedIndex.js +1 -1
  708. package/lodash/sortedIndexBy.js +1 -1
  709. package/lodash/sortedIndexOf.js +1 -1
  710. package/lodash/sortedLastIndex.js +1 -1
  711. package/lodash/sortedLastIndexBy.js +1 -1
  712. package/lodash/sortedLastIndexOf.js +1 -1
  713. package/lodash/sortedUniq.js +1 -1
  714. package/lodash/sortedUniqBy.js +1 -1
  715. package/lodash/split.js +1 -1
  716. package/lodash/spread.js +1 -1
  717. package/lodash/startCase.js +1 -1
  718. package/lodash/startsWith.js +1 -1
  719. package/lodash/string.default.js +1 -1
  720. package/lodash/string.js +1 -1
  721. package/lodash/stubArray.js +1 -1
  722. package/lodash/stubFalse.js +1 -1
  723. package/lodash/stubObject.js +1 -1
  724. package/lodash/stubString.js +1 -1
  725. package/lodash/stubTrue.js +1 -1
  726. package/lodash/subtract.js +1 -1
  727. package/lodash/sum.js +1 -1
  728. package/lodash/sumBy.js +1 -1
  729. package/lodash/tail.js +1 -1
  730. package/lodash/take.js +1 -1
  731. package/lodash/takeRight.js +1 -1
  732. package/lodash/takeRightWhile.js +1 -1
  733. package/lodash/takeWhile.js +1 -1
  734. package/lodash/tap.js +1 -1
  735. package/lodash/template.js +1 -1
  736. package/lodash/templateSettings.js +1 -1
  737. package/lodash/throttle.js +1 -1
  738. package/lodash/thru.js +1 -1
  739. package/lodash/times.js +1 -1
  740. package/lodash/toArray.js +1 -1
  741. package/lodash/toFinite.js +1 -1
  742. package/lodash/toInteger.js +1 -1
  743. package/lodash/toIterator.js +1 -1
  744. package/lodash/toJSON.js +1 -1
  745. package/lodash/toLength.js +1 -1
  746. package/lodash/toLower.js +1 -1
  747. package/lodash/toNumber.js +1 -1
  748. package/lodash/toPairs.js +1 -1
  749. package/lodash/toPairsIn.js +1 -1
  750. package/lodash/toPath.js +1 -1
  751. package/lodash/toPlainObject.js +1 -1
  752. package/lodash/toSafeInteger.js +1 -1
  753. package/lodash/toString.js +1 -1
  754. package/lodash/toUpper.js +1 -1
  755. package/lodash/transform.js +1 -1
  756. package/lodash/trim.js +1 -1
  757. package/lodash/trimEnd.js +1 -1
  758. package/lodash/trimStart.js +1 -1
  759. package/lodash/truncate.js +1 -1
  760. package/lodash/unary.js +1 -1
  761. package/lodash/unescape.js +1 -1
  762. package/lodash/union.js +1 -1
  763. package/lodash/unionBy.js +1 -1
  764. package/lodash/unionWith.js +1 -1
  765. package/lodash/uniq.js +1 -1
  766. package/lodash/uniqBy.js +1 -1
  767. package/lodash/uniqWith.js +1 -1
  768. package/lodash/uniqueId.js +1 -1
  769. package/lodash/unset.js +1 -1
  770. package/lodash/unzip.js +1 -1
  771. package/lodash/unzipWith.js +1 -1
  772. package/lodash/update.js +1 -1
  773. package/lodash/updateWith.js +1 -1
  774. package/lodash/upperCase.js +1 -1
  775. package/lodash/upperFirst.js +1 -1
  776. package/lodash/util.default.js +1 -1
  777. package/lodash/util.js +1 -1
  778. package/lodash/value.js +1 -1
  779. package/lodash/valueOf.js +1 -1
  780. package/lodash/values.js +1 -1
  781. package/lodash/valuesIn.js +1 -1
  782. package/lodash/without.js +1 -1
  783. package/lodash/words.js +1 -1
  784. package/lodash/wrap.js +1 -1
  785. package/lodash/wrapperAt.js +1 -1
  786. package/lodash/wrapperChain.js +1 -1
  787. package/lodash/wrapperLodash.js +1 -1
  788. package/lodash/wrapperReverse.js +1 -1
  789. package/lodash/wrapperValue.js +1 -1
  790. package/lodash/xor.js +1 -1
  791. package/lodash/xorBy.js +1 -1
  792. package/lodash/xorWith.js +1 -1
  793. package/lodash/zip.js +1 -1
  794. package/lodash/zipObject.js +1 -1
  795. package/lodash/zipObjectDeep.js +1 -1
  796. package/lodash/zipWith.js +1 -1
  797. package/math/index.js +1 -1
  798. package/md5/index.js +1 -1
  799. package/mock/MockWebSocket.js +1 -1
  800. package/mock/MockXMLHttpRequest.js +1 -1
  801. package/mock/index.js +1 -1
  802. package/normalize-wheel/ExecutionEnvironment.js +1 -1
  803. package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
  804. package/normalize-wheel/index.js +1 -1
  805. package/normalize-wheel/isEventSupported.js +1 -1
  806. package/number-to-chinese/index.js +1 -1
  807. package/nzh/cn.js +1 -1
  808. package/nzh/hk.js +1 -1
  809. package/nzh/index.js +1 -1
  810. package/nzh/nzh.js +1 -1
  811. package/nzh/src/autoGet.js +1 -1
  812. package/nzh/src/index.js +1 -1
  813. package/nzh/src/langs/cn_b.js +1 -1
  814. package/nzh/src/langs/cn_s.js +1 -1
  815. package/nzh/src/langs/hk_b.js +1 -1
  816. package/nzh/src/langs/hk_s.js +1 -1
  817. package/nzh/src/utils.js +1 -1
  818. package/object/index.js +1 -1
  819. package/package.json +1 -1
  820. package/pinyin/LICENSE +13 -12
  821. package/pinyin/index.d.ts +2 -1
  822. package/pinyin/index.js +14 -3
  823. package/pinyin/lib/common/constant.d.ts +16 -0
  824. package/pinyin/lib/common/constant.js +16 -0
  825. package/pinyin/lib/common/segmentit/AC.d.ts +18 -0
  826. package/pinyin/lib/common/segmentit/AC.js +95 -0
  827. package/pinyin/lib/common/segmentit/TrieNode.d.ts +30 -0
  828. package/pinyin/lib/common/segmentit/TrieNode.js +12 -0
  829. package/pinyin/lib/common/segmentit/index.d.ts +3 -0
  830. package/pinyin/lib/common/segmentit/index.js +21 -0
  831. package/pinyin/lib/common/segmentit/max-probability.d.ts +2 -0
  832. package/pinyin/lib/common/segmentit/max-probability.js +41 -0
  833. package/pinyin/lib/common/segmentit/min-tokenization.d.ts +2 -0
  834. package/pinyin/lib/common/segmentit/min-tokenization.js +35 -0
  835. package/pinyin/lib/common/segmentit/reverse-max-match.d.ts +2 -0
  836. package/pinyin/lib/common/segmentit/reverse-max-match.js +17 -0
  837. package/pinyin/lib/common/type.d.ts +69 -0
  838. package/pinyin/lib/common/utils.d.ts +10 -0
  839. package/pinyin/lib/common/utils.js +39 -0
  840. package/pinyin/lib/core/convert/index.d.ts +29 -0
  841. package/pinyin/lib/core/convert/index.js +128 -0
  842. package/pinyin/lib/core/custom/index.d.ts +25 -0
  843. package/pinyin/lib/core/custom/index.js +39 -0
  844. package/pinyin/lib/core/dict/index.d.ts +10 -0
  845. package/pinyin/lib/core/dict/index.js +48 -0
  846. package/pinyin/lib/core/html/index.d.ts +44 -0
  847. package/pinyin/lib/core/html/index.js +36 -0
  848. package/pinyin/lib/core/match/index.d.ts +35 -0
  849. package/pinyin/lib/core/match/index.js +103 -0
  850. package/pinyin/lib/core/pinyin/handle.d.ts +81 -0
  851. package/pinyin/lib/core/pinyin/handle.js +140 -0
  852. package/pinyin/lib/core/pinyin/index.d.ts +117 -0
  853. package/pinyin/lib/core/pinyin/index.js +32 -0
  854. package/pinyin/lib/core/pinyin/middlewares.d.ts +25 -0
  855. package/pinyin/lib/core/pinyin/middlewares.js +110 -0
  856. package/pinyin/lib/core/polyphonic/index.d.ts +87 -0
  857. package/pinyin/lib/core/polyphonic/index.js +60 -0
  858. package/pinyin/lib/core/segment/index.d.ts +87 -0
  859. package/pinyin/lib/core/segment/index.js +33 -0
  860. package/pinyin/lib/core/segment/middlewares.d.ts +55 -0
  861. package/pinyin/lib/core/segment/middlewares.js +67 -0
  862. package/pinyin/lib/core/traditional/index.d.ts +2 -0
  863. package/pinyin/lib/core/traditional/index.js +15 -0
  864. package/pinyin/lib/data/dict1-pinyin.d.ts +3 -0
  865. package/pinyin/lib/data/dict1.d.ts +3 -0
  866. package/pinyin/lib/data/dict1.js +13920 -0
  867. package/pinyin/lib/data/dict2.d.ts +6 -0
  868. package/pinyin/lib/data/dict2.js +2167 -0
  869. package/pinyin/lib/data/dict3.d.ts +6 -0
  870. package/pinyin/lib/data/dict3.js +338 -0
  871. package/pinyin/lib/data/dict4.d.ts +6 -0
  872. package/pinyin/lib/data/dict4.js +1608 -0
  873. package/pinyin/lib/data/dict5.d.ts +6 -0
  874. package/pinyin/lib/data/dict5.js +30 -0
  875. package/pinyin/lib/data/special.d.ts +45 -0
  876. package/pinyin/lib/data/special.js +180 -0
  877. package/pinyin/lib/data/surname.d.ts +6 -0
  878. package/pinyin/lib/data/surname.js +508 -0
  879. package/pinyin/lib/index.d.ts +10 -0
  880. package/pinyin/lib/index.js +13 -0
  881. package/query-string/base.js +1 -1
  882. package/query-string/index.js +1 -1
  883. package/query-string/splitOnFirst.js +1 -1
  884. package/random/address.js +1 -1
  885. package/random/constellation.js +1 -1
  886. package/random/image.js +1 -1
  887. package/random/index.js +1 -1
  888. package/random/licensePlate.js +1 -1
  889. package/random/name.js +1 -1
  890. package/random/number.js +1 -1
  891. package/random/text.js +1 -1
  892. package/random/time.js +1 -1
  893. package/random/web.js +1 -1
  894. package/sanitize-url/index.js +1 -1
  895. package/screenfull/index.js +1 -1
  896. package/sleep/index.js +1 -1
  897. package/snapdom/index.browser.js +1 -1
  898. package/snapdom/index.js +1 -1
  899. package/snapdom/src/api/preCache.js +1 -1
  900. package/snapdom/src/api/snapdom.js +1 -1
  901. package/snapdom/src/core/cache.js +1 -1
  902. package/snapdom/src/core/capture.js +1 -1
  903. package/snapdom/src/core/clone.js +1 -1
  904. package/snapdom/src/core/context.js +1 -1
  905. package/snapdom/src/core/plugins.js +1 -1
  906. package/snapdom/src/core/prepare.js +1 -1
  907. package/snapdom/src/exporters/download.js +1 -1
  908. package/snapdom/src/exporters/toBlob.js +1 -1
  909. package/snapdom/src/exporters/toCanvas.js +1 -1
  910. package/snapdom/src/exporters/toImg.js +1 -1
  911. package/snapdom/src/index.browser.js +1 -1
  912. package/snapdom/src/index.js +1 -1
  913. package/snapdom/src/modules/CSSVar.js +1 -1
  914. package/snapdom/src/modules/background.js +1 -1
  915. package/snapdom/src/modules/changeCSS.js +1 -1
  916. package/snapdom/src/modules/counter.js +1 -1
  917. package/snapdom/src/modules/fonts.js +1 -1
  918. package/snapdom/src/modules/iconFonts.js +1 -1
  919. package/snapdom/src/modules/images.js +1 -1
  920. package/snapdom/src/modules/lineClamp.js +1 -1
  921. package/snapdom/src/modules/pictureResolver.js +1 -1
  922. package/snapdom/src/modules/pseudo.js +1 -1
  923. package/snapdom/src/modules/rasterize.js +1 -1
  924. package/snapdom/src/modules/snapFetch.js +1 -1
  925. package/snapdom/src/modules/styles.js +1 -1
  926. package/snapdom/src/modules/svgDefs.js +1 -1
  927. package/snapdom/src/utils/browser.js +1 -1
  928. package/snapdom/src/utils/capture.helpers.js +1 -1
  929. package/snapdom/src/utils/clone.helpers.js +1 -1
  930. package/snapdom/src/utils/css.js +1 -1
  931. package/snapdom/src/utils/debug.js +1 -1
  932. package/snapdom/src/utils/helpers.js +1 -1
  933. package/snapdom/src/utils/image.js +1 -1
  934. package/snapdom/src/utils/index.js +1 -1
  935. package/snapdom/src/utils/prepare.helpers.js +1 -1
  936. package/snapdom/src/utils/transforms.helpers.js +1 -1
  937. package/string/chars.js +1 -1
  938. package/string/index.js +1 -1
  939. package/tinycolor/conversion.js +1 -1
  940. package/tinycolor/css-color-names.js +1 -1
  941. package/tinycolor/format-input.js +1 -1
  942. package/tinycolor/from-ratio.js +1 -1
  943. package/tinycolor/index.js +1 -1
  944. package/tinycolor/interfaces.js +1 -1
  945. package/tinycolor/public_api.js +1 -1
  946. package/tinycolor/random.js +1 -1
  947. package/tinycolor/readability.js +1 -1
  948. package/tinycolor/to-ms-filter.js +1 -1
  949. package/tinycolor/umd_api.js +1 -1
  950. package/tinycolor/utils.js +1 -1
  951. package/tree/index.js +1 -1
  952. package/tree/searchTree.js +1 -1
  953. package/tween/easing.js +1 -1
  954. package/tween/index.js +1 -1
  955. package/tween/tween.js +1 -1
  956. package/ui-color/compareColorByRange.js +1 -1
  957. package/ui-color/index.js +1 -1
  958. package/url-toolkit/index.js +1 -1
  959. package/validate/index.js +1 -1
  960. package/validate/interface.js +1 -1
  961. package/validate/locale/en-US.js +1 -1
  962. package/validate/locale/index.js +1 -1
  963. package/validate/locale/zh-CN.js +1 -1
  964. package/validate/rules/array.js +1 -1
  965. package/validate/rules/base.js +1 -1
  966. package/validate/rules/boolean.js +1 -1
  967. package/validate/rules/custom.js +1 -1
  968. package/validate/rules/number.js +1 -1
  969. package/validate/rules/object.js +1 -1
  970. package/validate/rules/string.js +1 -1
  971. package/validate/rules/type.js +1 -1
  972. package/version/index.js +1 -1
  973. package/xlsx/crc32.js +1 -1
  974. package/xlsx/index.js +1 -1
  975. package/xlsx/xlsx.js +1 -1
  976. package/pinyin/core.d.ts +0 -3
  977. package/pinyin/core.js +0 -136
  978. package/pinyin/simplified.d.ts +0 -4
  979. package/pinyin/simplified.js +0 -8
  980. package/pinyin/simplified_dict.d.ts +0 -408
  981. package/pinyin/simplified_dict.js +0 -411
  982. package/pinyin/traditional.d.ts +0 -4
  983. package/pinyin/traditional.js +0 -8
  984. package/pinyin/traditional_dict.d.ts +0 -401
  985. package/pinyin/traditional_dict.js +0 -404
@@ -0,0 +1,1538 @@
1
+ /**
2
+ * Codes for errors generated within this library
3
+ */
4
+ export declare const FlateErrorCode: {
5
+ readonly UnexpectedEOF: 0;
6
+ readonly InvalidBlockType: 1;
7
+ readonly InvalidLengthLiteral: 2;
8
+ readonly InvalidDistance: 3;
9
+ readonly StreamFinished: 4;
10
+ readonly NoStreamHandler: 5;
11
+ readonly InvalidHeader: 6;
12
+ readonly NoCallback: 7;
13
+ readonly InvalidUTF8: 8;
14
+ readonly ExtraFieldTooLong: 9;
15
+ readonly InvalidDate: 10;
16
+ readonly FilenameTooLong: 11;
17
+ readonly StreamFinishing: 12;
18
+ readonly InvalidZipData: 13;
19
+ readonly UnknownCompressionMethod: 14;
20
+ };
21
+ /**
22
+ * An error generated within this library
23
+ */
24
+ export interface FlateError extends Error {
25
+ /**
26
+ * The code associated with this error
27
+ */
28
+ code: number;
29
+ }
30
+ /**
31
+ * Options for decompressing a DEFLATE stream
32
+ */
33
+ export interface InflateStreamOptions {
34
+ /**
35
+ * The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect.
36
+ *
37
+ * Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error.
38
+ */
39
+ dictionary?: Uint8Array;
40
+ }
41
+ /**
42
+ * Options for decompressing DEFLATE data
43
+ */
44
+ export interface InflateOptions<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> extends InflateStreamOptions {
45
+ /**
46
+ * The buffer into which to write the decompressed data. Saves memory if you know the decompressed size in advance.
47
+ *
48
+ * Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit.
49
+ */
50
+ out?: Uint8Array<TArrayBuffer>;
51
+ }
52
+ /**
53
+ * Options for decompressing a GZIP stream
54
+ */
55
+ export interface GunzipStreamOptions extends InflateStreamOptions {
56
+ }
57
+ /**
58
+ * Options for decompressing GZIP data
59
+ */
60
+ export interface GunzipOptions<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> extends InflateStreamOptions {
61
+ /**
62
+ * The buffer into which to write the decompressed data. GZIP already encodes the output size, so providing this doesn't save memory.
63
+ *
64
+ * Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit.
65
+ */
66
+ out?: Uint8Array<TArrayBuffer>;
67
+ }
68
+ /**
69
+ * Options for decompressing a Zlib stream
70
+ */
71
+ export interface UnzlibStreamOptions extends InflateStreamOptions {
72
+ }
73
+ /**
74
+ * Options for decompressing Zlib data
75
+ */
76
+ export interface UnzlibOptions<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> extends InflateOptions<TArrayBuffer> {
77
+ }
78
+ /**
79
+ * Options for compressing data into a DEFLATE format
80
+ */
81
+ export interface DeflateOptions {
82
+ /**
83
+ * The level of compression to use, ranging from 0-9.
84
+ *
85
+ * 0 will store the data without compression.
86
+ * 1 is fastest but compresses the worst, 9 is slowest but compresses the best.
87
+ * The default level is 6.
88
+ *
89
+ * Typically, binary data benefits much more from higher values than text data.
90
+ * In both cases, higher values usually take disproportionately longer than the reduction in final size that results.
91
+ *
92
+ * For example, a 1 MB text file could:
93
+ * - become 1.01 MB with level 0 in 1ms
94
+ * - become 400 kB with level 1 in 10ms
95
+ * - become 320 kB with level 9 in 100ms
96
+ */
97
+ level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
98
+ /**
99
+ * The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory.
100
+ *
101
+ * Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB.
102
+ * It is recommended not to lower the value below 4, since that tends to hurt performance.
103
+ * In addition, values above 8 tend to help very little on most data and can even hurt performance.
104
+ *
105
+ * The default value is automatically determined based on the size of the input data.
106
+ */
107
+ mem?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
108
+ /**
109
+ * A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios.
110
+ *
111
+ * Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input.
112
+ * The decompressor must supply the same dictionary as the compressor to extract the original data.
113
+ *
114
+ * Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise.
115
+ *
116
+ * Avoid using dictionaries with GZIP and ZIP to maximize software compatibility.
117
+ */
118
+ dictionary?: Uint8Array;
119
+ }
120
+ /**
121
+ * Options for compressing data into a GZIP format
122
+ */
123
+ export interface GzipOptions extends DeflateOptions {
124
+ /**
125
+ * When the file was last modified. Defaults to the current time.
126
+ * Set this to 0 to avoid revealing a modification date entirely.
127
+ */
128
+ mtime?: Date | string | number;
129
+ /**
130
+ * The filename of the data. If the `gunzip` command is used to decompress the data, it will output a file
131
+ * with this name instead of the name of the compressed file.
132
+ */
133
+ filename?: string;
134
+ }
135
+ /**
136
+ * Options for compressing data into a Zlib format
137
+ */
138
+ export interface ZlibOptions extends DeflateOptions {
139
+ }
140
+ /**
141
+ * Handler for data (de)compression streams
142
+ * @param data The data output from the stream processor
143
+ * @param final Whether this is the final block
144
+ */
145
+ export type FlateStreamHandler = (data: Uint8Array<ArrayBuffer>, final: boolean) => void;
146
+ /**
147
+ * Handler for asynchronous data (de)compression streams
148
+ * @param err Any error that occurred
149
+ * @param data The data output from the stream processor
150
+ * @param final Whether this is the final block
151
+ */
152
+ export type AsyncFlateStreamHandler = (err: FlateError | null, data: Uint8Array<ArrayBuffer>, final: boolean) => void;
153
+ /**
154
+ * Handler for the asynchronous completion of (de)compression for a data chunk
155
+ * @param size The number of bytes that were processed. This is measured in terms of the input
156
+ * (i.e. compressed bytes for decompression, uncompressed bytes for compression.)
157
+ */
158
+ export type AsyncFlateDrainHandler = (size: number) => void;
159
+ /**
160
+ * Callback for asynchronous (de)compression methods
161
+ * @param err Any error that occurred
162
+ * @param data The resulting data. Only present if `err` is null
163
+ */
164
+ export type FlateCallback = (err: FlateError | null, data: Uint8Array<ArrayBuffer>) => void;
165
+ interface AsyncOptions {
166
+ /**
167
+ * Whether or not to "consume" the source data. This will make the typed array/buffer you pass in
168
+ * unusable but will increase performance and reduce memory usage.
169
+ */
170
+ consume?: boolean;
171
+ }
172
+ /**
173
+ * Options for compressing data asynchronously into a DEFLATE format
174
+ */
175
+ export interface AsyncDeflateOptions extends DeflateOptions, AsyncOptions {
176
+ }
177
+ /**
178
+ * Options for decompressing DEFLATE data asynchronously
179
+ */
180
+ export interface AsyncInflateOptions extends AsyncOptions, InflateStreamOptions {
181
+ /**
182
+ * The original size of the data. Currently, the asynchronous API disallows
183
+ * writing into a buffer you provide; the best you can do is provide the
184
+ * size in bytes and be given back a new typed array.
185
+ */
186
+ size?: number;
187
+ }
188
+ /**
189
+ * Options for compressing data asynchronously into a GZIP format
190
+ */
191
+ export interface AsyncGzipOptions extends GzipOptions, AsyncOptions {
192
+ }
193
+ /**
194
+ * Options for decompressing GZIP data asynchronously
195
+ */
196
+ export interface AsyncGunzipOptions extends AsyncOptions, InflateStreamOptions {
197
+ }
198
+ /**
199
+ * Options for compressing data asynchronously into a Zlib format
200
+ */
201
+ export interface AsyncZlibOptions extends ZlibOptions, AsyncOptions {
202
+ }
203
+ /**
204
+ * Options for decompressing Zlib data asynchronously
205
+ */
206
+ export interface AsyncUnzlibOptions extends AsyncInflateOptions {
207
+ }
208
+ /**
209
+ * A terminable compression/decompression process
210
+ */
211
+ export interface AsyncTerminable {
212
+ /**
213
+ * Terminates the worker thread immediately. The callback will not be called.
214
+ */
215
+ (): void;
216
+ }
217
+ /**
218
+ * Streaming DEFLATE compression
219
+ */
220
+ export declare class Deflate {
221
+ /**
222
+ * Creates a DEFLATE stream
223
+ * @param opts The compression options
224
+ * @param cb The callback to call whenever data is deflated
225
+ */
226
+ constructor(opts: DeflateOptions, cb?: FlateStreamHandler);
227
+ /**
228
+ * Creates a DEFLATE stream
229
+ * @param cb The callback to call whenever data is deflated
230
+ */
231
+ constructor(cb?: FlateStreamHandler);
232
+ private b;
233
+ private s;
234
+ private o;
235
+ /**
236
+ * The handler to call whenever data is available
237
+ */
238
+ ondata: FlateStreamHandler;
239
+ private p;
240
+ /**
241
+ * Pushes a chunk to be deflated
242
+ * @param chunk The chunk to push
243
+ * @param final Whether this is the last chunk
244
+ */
245
+ push(chunk: Uint8Array, final?: boolean): void;
246
+ /**
247
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
248
+ * deflated output for small inputs.
249
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
250
+ * extra bytes, but guarantees all pushed data is immediately
251
+ * decompressible. A separate DEFLATE stream may be concatenated
252
+ * with the current output after a sync flush.
253
+ */
254
+ flush(sync?: boolean): void;
255
+ }
256
+ /**
257
+ * Asynchronous streaming DEFLATE compression
258
+ */
259
+ export declare class AsyncDeflate {
260
+ /**
261
+ * The handler to call whenever data is available
262
+ */
263
+ ondata: AsyncFlateStreamHandler;
264
+ /**
265
+ * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates)
266
+ */
267
+ ondrain?: AsyncFlateDrainHandler;
268
+ /**
269
+ * The number of uncompressed bytes buffered in the stream
270
+ */
271
+ queuedSize: number;
272
+ /**
273
+ * Creates an asynchronous DEFLATE stream
274
+ * @param opts The compression options
275
+ * @param cb The callback to call whenever data is deflated
276
+ */
277
+ constructor(opts: DeflateOptions, cb?: AsyncFlateStreamHandler);
278
+ /**
279
+ * Creates an asynchronous DEFLATE stream
280
+ * @param cb The callback to call whenever data is deflated
281
+ */
282
+ constructor(cb?: AsyncFlateStreamHandler);
283
+ /**
284
+ * Pushes a chunk to be deflated
285
+ * @param chunk The chunk to push
286
+ * @param final Whether this is the last chunk
287
+ */
288
+ push(chunk: Uint8Array, final?: boolean): void;
289
+ /**
290
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
291
+ * deflated output for small inputs.
292
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
293
+ * extra bytes, but guarantees all pushed data is immediately
294
+ * decompressible. A separate DEFLATE stream may be concatenated
295
+ * with the current output after a sync flush.
296
+ */
297
+ flush(sync?: boolean): void;
298
+ /**
299
+ * A method to terminate the stream's internal worker. Subsequent calls to
300
+ * push() will silently fail.
301
+ */
302
+ terminate: AsyncTerminable;
303
+ }
304
+ /**
305
+ * Asynchronously compresses data with DEFLATE without any wrapper
306
+ * @param data The data to compress
307
+ * @param opts The compression options
308
+ * @param cb The function to be called upon compression completion
309
+ * @returns A function that can be used to immediately terminate the compression
310
+ */
311
+ export declare function deflate(data: Uint8Array, opts: AsyncDeflateOptions, cb: FlateCallback): AsyncTerminable;
312
+ /**
313
+ * Asynchronously compresses data with DEFLATE without any wrapper
314
+ * @param data The data to compress
315
+ * @param cb The function to be called upon compression completion
316
+ */
317
+ export declare function deflate(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
318
+ /**
319
+ * Compresses data with DEFLATE without any wrapper
320
+ * @param data The data to compress
321
+ * @param opts The compression options
322
+ * @returns The deflated version of the data
323
+ */
324
+ export declare function deflateSync(data: Uint8Array, opts?: DeflateOptions): Uint8Array<ArrayBuffer>;
325
+ /**
326
+ * Streaming DEFLATE decompression
327
+ */
328
+ export declare class Inflate {
329
+ private s;
330
+ private o;
331
+ private p;
332
+ private d;
333
+ /**
334
+ * The handler to call whenever data is available
335
+ */
336
+ ondata: FlateStreamHandler;
337
+ /**
338
+ * Creates a DEFLATE decompression stream
339
+ * @param opts The decompression options
340
+ * @param cb The callback to call whenever data is inflated
341
+ */
342
+ constructor(opts: InflateStreamOptions, cb?: FlateStreamHandler);
343
+ /**
344
+ * Creates a DEFLATE decompression stream
345
+ * @param cb The callback to call whenever data is inflated
346
+ */
347
+ constructor(cb?: FlateStreamHandler);
348
+ private e;
349
+ private c;
350
+ /**
351
+ * Pushes a chunk to be inflated
352
+ * @param chunk The chunk to push
353
+ * @param final Whether this is the final chunk
354
+ */
355
+ push(chunk: Uint8Array, final?: boolean): void;
356
+ }
357
+ /**
358
+ * Asynchronous streaming DEFLATE decompression
359
+ */
360
+ export declare class AsyncInflate {
361
+ /**
362
+ * The handler to call whenever data is available
363
+ */
364
+ ondata: AsyncFlateStreamHandler;
365
+ /**
366
+ * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates)
367
+ */
368
+ ondrain?: AsyncFlateDrainHandler;
369
+ /**
370
+ * The number of compressed bytes buffered in the stream
371
+ */
372
+ queuedSize: number;
373
+ /**
374
+ * Creates an asynchronous DEFLATE decompression stream
375
+ * @param opts The decompression options
376
+ * @param cb The callback to call whenever data is inflated
377
+ */
378
+ constructor(opts: InflateStreamOptions, cb?: AsyncFlateStreamHandler);
379
+ /**
380
+ * Creates an asynchronous DEFLATE decompression stream
381
+ * @param cb The callback to call whenever data is inflated
382
+ */
383
+ constructor(cb?: AsyncFlateStreamHandler);
384
+ /**
385
+ * Pushes a chunk to be inflated
386
+ * @param chunk The chunk to push
387
+ * @param final Whether this is the last chunk
388
+ */
389
+ push(chunk: Uint8Array, final?: boolean): void;
390
+ /**
391
+ * A method to terminate the stream's internal worker. Subsequent calls to
392
+ * push() will silently fail.
393
+ */
394
+ terminate: AsyncTerminable;
395
+ }
396
+ /**
397
+ * Asynchronously expands DEFLATE data with no wrapper
398
+ * @param data The data to decompress
399
+ * @param opts The decompression options
400
+ * @param cb The function to be called upon decompression completion
401
+ * @returns A function that can be used to immediately terminate the decompression
402
+ */
403
+ export declare function inflate(data: Uint8Array, opts: AsyncInflateOptions, cb: FlateCallback): AsyncTerminable;
404
+ /**
405
+ * Asynchronously expands DEFLATE data with no wrapper
406
+ * @param data The data to decompress
407
+ * @param cb The function to be called upon decompression completion
408
+ * @returns A function that can be used to immediately terminate the decompression
409
+ */
410
+ export declare function inflate(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
411
+ /**
412
+ * Expands DEFLATE data with no wrapper
413
+ * @param data The data to decompress
414
+ * @returns The decompressed version of the data
415
+ */
416
+ export declare function inflateSync(data: Uint8Array): Uint8Array<ArrayBuffer>;
417
+ /**
418
+ * Expands DEFLATE data with no wrapper
419
+ * @param data The data to decompress
420
+ * @param opts The decompression options
421
+ * @returns The decompressed version of the data
422
+ */
423
+ export declare function inflateSync<TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(data: Uint8Array, opts?: InflateOptions<TArrayBuffer>): Uint8Array<TArrayBuffer>;
424
+ /**
425
+ * Streaming GZIP compression
426
+ */
427
+ export declare class Gzip {
428
+ private c;
429
+ private l;
430
+ private v;
431
+ private o;
432
+ private s;
433
+ /**
434
+ * The handler to call whenever data is available
435
+ */
436
+ ondata: FlateStreamHandler;
437
+ /**
438
+ * Creates a GZIP stream
439
+ * @param opts The compression options
440
+ * @param cb The callback to call whenever data is deflated
441
+ */
442
+ constructor(opts: GzipOptions, cb?: FlateStreamHandler);
443
+ /**
444
+ * Creates a GZIP stream
445
+ * @param cb The callback to call whenever data is deflated
446
+ */
447
+ constructor(cb?: FlateStreamHandler);
448
+ /**
449
+ * Pushes a chunk to be GZIPped
450
+ * @param chunk The chunk to push
451
+ * @param final Whether this is the last chunk
452
+ */
453
+ push(chunk: Uint8Array, final?: boolean): void;
454
+ private p;
455
+ /**
456
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
457
+ * GZIPped output for small inputs.
458
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
459
+ * extra bytes, but guarantees all pushed data is immediately
460
+ * decompressible.
461
+ */
462
+ flush(sync?: boolean): void;
463
+ }
464
+ /**
465
+ * Asynchronous streaming GZIP compression
466
+ */
467
+ export declare class AsyncGzip {
468
+ /**
469
+ * The handler to call whenever data is available
470
+ */
471
+ ondata: AsyncFlateStreamHandler;
472
+ /**
473
+ * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates)
474
+ */
475
+ ondrain?: AsyncFlateDrainHandler;
476
+ /**
477
+ * The number of uncompressed bytes buffered in the stream
478
+ */
479
+ queuedSize: number;
480
+ /**
481
+ * Creates an asynchronous GZIP stream
482
+ * @param opts The compression options
483
+ * @param cb The callback to call whenever data is deflated
484
+ */
485
+ constructor(opts: GzipOptions, cb?: AsyncFlateStreamHandler);
486
+ /**
487
+ * Creates an asynchronous GZIP stream
488
+ * @param cb The callback to call whenever data is deflated
489
+ */
490
+ constructor(cb?: AsyncFlateStreamHandler);
491
+ /**
492
+ * Pushes a chunk to be GZIPped
493
+ * @param chunk The chunk to push
494
+ * @param final Whether this is the last chunk
495
+ */
496
+ push(chunk: Uint8Array, final?: boolean): void;
497
+ /**
498
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
499
+ * GZIPped output for small inputs.
500
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
501
+ * extra bytes, but guarantees all pushed data is immediately
502
+ * decompressible.
503
+ */
504
+ flush(sync?: boolean): void;
505
+ /**
506
+ * A method to terminate the stream's internal worker. Subsequent calls to
507
+ * push() will silently fail.
508
+ */
509
+ terminate: AsyncTerminable;
510
+ }
511
+ /**
512
+ * Asynchronously compresses data with GZIP
513
+ * @param data The data to compress
514
+ * @param opts The compression options
515
+ * @param cb The function to be called upon compression completion
516
+ * @returns A function that can be used to immediately terminate the compression
517
+ */
518
+ export declare function gzip(data: Uint8Array, opts: AsyncGzipOptions, cb: FlateCallback): AsyncTerminable;
519
+ /**
520
+ * Asynchronously compresses data with GZIP
521
+ * @param data The data to compress
522
+ * @param cb The function to be called upon compression completion
523
+ * @returns A function that can be used to immediately terminate the decompression
524
+ */
525
+ export declare function gzip(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
526
+ /**
527
+ * Compresses data with GZIP
528
+ * @param data The data to compress
529
+ * @param opts The compression options
530
+ * @returns The gzipped version of the data
531
+ */
532
+ export declare function gzipSync(data: Uint8Array, opts?: GzipOptions): Uint8Array<ArrayBuffer>;
533
+ /**
534
+ * Handler for new GZIP members in concatenated GZIP streams. Useful for building indices used to perform random-access reads on compressed files.
535
+ * @param offset The offset of the new member relative to the start of the stream
536
+ */
537
+ export type GunzipMemberHandler = (offset: number) => void;
538
+ /**
539
+ * Streaming single or multi-member GZIP decompression
540
+ */
541
+ export declare class Gunzip {
542
+ private v;
543
+ private r;
544
+ private o;
545
+ private p;
546
+ private s;
547
+ /**
548
+ * The handler to call whenever data is available
549
+ */
550
+ ondata: FlateStreamHandler;
551
+ /**
552
+ * The handler to call whenever a new GZIP member is found
553
+ */
554
+ onmember?: GunzipMemberHandler;
555
+ /**
556
+ * Creates a GUNZIP stream
557
+ * @param opts The decompression options
558
+ * @param cb The callback to call whenever data is inflated
559
+ */
560
+ constructor(opts: GunzipStreamOptions, cb?: FlateStreamHandler);
561
+ /**
562
+ * Creates a GUNZIP stream
563
+ * @param cb The callback to call whenever data is inflated
564
+ */
565
+ constructor(cb?: FlateStreamHandler);
566
+ /**
567
+ * Pushes a chunk to be GUNZIPped
568
+ * @param chunk The chunk to push
569
+ * @param final Whether this is the last chunk
570
+ */
571
+ push(chunk: Uint8Array, final?: boolean): void;
572
+ }
573
+ /**
574
+ * Asynchronous streaming single or multi-member GZIP decompression
575
+ */
576
+ export declare class AsyncGunzip {
577
+ /**
578
+ * The handler to call whenever data is available
579
+ */
580
+ ondata: AsyncFlateStreamHandler;
581
+ /**
582
+ * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates)
583
+ */
584
+ ondrain?: AsyncFlateDrainHandler;
585
+ /**
586
+ * The number of compressed bytes buffered in the stream
587
+ */
588
+ queuedSize: number;
589
+ /**
590
+ * The handler to call whenever a new GZIP member is found
591
+ */
592
+ onmember?: GunzipMemberHandler;
593
+ /**
594
+ * Creates an asynchronous GUNZIP stream
595
+ * @param opts The decompression options
596
+ * @param cb The callback to call whenever data is inflated
597
+ */
598
+ constructor(opts: GunzipStreamOptions, cb?: AsyncFlateStreamHandler);
599
+ /**
600
+ * Creates an asynchronous GUNZIP stream
601
+ * @param cb The callback to call whenever data is inflated
602
+ */
603
+ constructor(cb?: AsyncFlateStreamHandler);
604
+ /**
605
+ * Pushes a chunk to be GUNZIPped
606
+ * @param chunk The chunk to push
607
+ * @param final Whether this is the last chunk
608
+ */
609
+ push(chunk: Uint8Array, final?: boolean): void;
610
+ /**
611
+ * A method to terminate the stream's internal worker. Subsequent calls to
612
+ * push() will silently fail.
613
+ */
614
+ terminate: AsyncTerminable;
615
+ }
616
+ /**
617
+ * Asynchronously expands GZIP data
618
+ * @param data The data to decompress
619
+ * @param opts The decompression options
620
+ * @param cb The function to be called upon decompression completion
621
+ * @returns A function that can be used to immediately terminate the decompression
622
+ */
623
+ export declare function gunzip(data: Uint8Array, opts: AsyncGunzipOptions, cb: FlateCallback): AsyncTerminable;
624
+ /**
625
+ * Asynchronously expands GZIP data
626
+ * @param data The data to decompress
627
+ * @param cb The function to be called upon decompression completion
628
+ * @returns A function that can be used to immediately terminate the decompression
629
+ */
630
+ export declare function gunzip(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
631
+ /**
632
+ * Expands GZIP data
633
+ * @param data The data to decompress
634
+ * @returns The decompressed version of the data
635
+ */
636
+ export declare function gunzipSync(data: Uint8Array): Uint8Array<ArrayBuffer>;
637
+ /**
638
+ * Expands GZIP data
639
+ * @param data The data to decompress
640
+ * @param opts The decompression options
641
+ * @returns The decompressed version of the data
642
+ */
643
+ export declare function gunzipSync<TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(data: Uint8Array, opts?: GunzipOptions<TArrayBuffer>): Uint8Array<TArrayBuffer>;
644
+ /**
645
+ * Streaming Zlib compression
646
+ */
647
+ export declare class Zlib {
648
+ private c;
649
+ private v;
650
+ private o;
651
+ private s;
652
+ /**
653
+ * The handler to call whenever data is available
654
+ */
655
+ ondata: FlateStreamHandler;
656
+ /**
657
+ * Creates a Zlib stream
658
+ * @param opts The compression options
659
+ * @param cb The callback to call whenever data is deflated
660
+ */
661
+ constructor(opts: ZlibOptions, cb?: FlateStreamHandler);
662
+ /**
663
+ * Creates a Zlib stream
664
+ * @param cb The callback to call whenever data is deflated
665
+ */
666
+ constructor(cb?: FlateStreamHandler);
667
+ /**
668
+ * Pushes a chunk to be zlibbed
669
+ * @param chunk The chunk to push
670
+ * @param final Whether this is the last chunk
671
+ */
672
+ push(chunk: Uint8Array, final?: boolean): void;
673
+ private p;
674
+ /**
675
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
676
+ * zlibbed output for small inputs.
677
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
678
+ * extra bytes, but guarantees all pushed data is immediately
679
+ * decompressible.
680
+ */
681
+ flush(sync?: boolean): void;
682
+ }
683
+ /**
684
+ * Asynchronous streaming Zlib compression
685
+ */
686
+ export declare class AsyncZlib {
687
+ /**
688
+ * The handler to call whenever data is available
689
+ */
690
+ ondata: AsyncFlateStreamHandler;
691
+ /**
692
+ * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates)
693
+ */
694
+ ondrain?: AsyncFlateDrainHandler;
695
+ /**
696
+ * The number of uncompressed bytes buffered in the stream
697
+ */
698
+ queuedSize: number;
699
+ /**
700
+ * Creates an asynchronous Zlib stream
701
+ * @param opts The compression options
702
+ * @param cb The callback to call whenever data is deflated
703
+ */
704
+ constructor(opts: ZlibOptions, cb?: AsyncFlateStreamHandler);
705
+ /**
706
+ * Creates an asynchronous Zlib stream
707
+ * @param cb The callback to call whenever data is deflated
708
+ */
709
+ constructor(cb?: AsyncFlateStreamHandler);
710
+ /**
711
+ * Pushes a chunk to be deflated
712
+ * @param chunk The chunk to push
713
+ * @param final Whether this is the last chunk
714
+ */
715
+ push(chunk: Uint8Array, final?: boolean): void;
716
+ /**
717
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
718
+ * zlibbed output for small inputs.
719
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
720
+ * extra bytes, but guarantees all pushed data is immediately
721
+ * decompressible.
722
+ */
723
+ flush(sync?: boolean): void;
724
+ /**
725
+ * A method to terminate the stream's internal worker. Subsequent calls to
726
+ * push() will silently fail.
727
+ */
728
+ terminate: AsyncTerminable;
729
+ }
730
+ /**
731
+ * Asynchronously compresses data with Zlib
732
+ * @param data The data to compress
733
+ * @param opts The compression options
734
+ * @param cb The function to be called upon compression completion
735
+ */
736
+ export declare function zlib(data: Uint8Array, opts: AsyncZlibOptions, cb: FlateCallback): AsyncTerminable;
737
+ /**
738
+ * Asynchronously compresses data with Zlib
739
+ * @param data The data to compress
740
+ * @param cb The function to be called upon compression completion
741
+ * @returns A function that can be used to immediately terminate the compression
742
+ */
743
+ export declare function zlib(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
744
+ /**
745
+ * Compress data with Zlib
746
+ * @param data The data to compress
747
+ * @param opts The compression options
748
+ * @returns The zlib-compressed version of the data
749
+ */
750
+ export declare function zlibSync(data: Uint8Array, opts?: ZlibOptions): Uint8Array<ArrayBuffer>;
751
+ /**
752
+ * Streaming Zlib decompression
753
+ */
754
+ export declare class Unzlib {
755
+ private v;
756
+ private p;
757
+ /**
758
+ * The handler to call whenever data is available
759
+ */
760
+ ondata: FlateStreamHandler;
761
+ /**
762
+ * Creates a Zlib decompression stream
763
+ * @param opts The decompression options
764
+ * @param cb The callback to call whenever data is inflated
765
+ */
766
+ constructor(opts: UnzlibStreamOptions, cb?: FlateStreamHandler);
767
+ /**
768
+ * Creates a Zlib decompression stream
769
+ * @param cb The callback to call whenever data is inflated
770
+ */
771
+ constructor(cb?: FlateStreamHandler);
772
+ /**
773
+ * Pushes a chunk to be unzlibbed
774
+ * @param chunk The chunk to push
775
+ * @param final Whether this is the last chunk
776
+ */
777
+ push(chunk: Uint8Array, final?: boolean): void;
778
+ }
779
+ /**
780
+ * Asynchronous streaming Zlib decompression
781
+ */
782
+ export declare class AsyncUnzlib {
783
+ /**
784
+ * The handler to call whenever data is available
785
+ */
786
+ ondata: AsyncFlateStreamHandler;
787
+ /**
788
+ * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates)
789
+ */
790
+ ondrain?: AsyncFlateDrainHandler;
791
+ /**
792
+ * The number of compressed bytes buffered in the stream
793
+ */
794
+ queuedSize: number;
795
+ /**
796
+ * Creates an asynchronous Zlib decompression stream
797
+ * @param opts The decompression options
798
+ * @param cb The callback to call whenever data is inflated
799
+ */
800
+ constructor(opts: UnzlibStreamOptions, cb?: AsyncFlateStreamHandler);
801
+ /**
802
+ * Creates an asynchronous Zlib decompression stream
803
+ * @param cb The callback to call whenever data is inflated
804
+ */
805
+ constructor(cb?: AsyncFlateStreamHandler);
806
+ /**
807
+ * Pushes a chunk to be decompressed from Zlib
808
+ * @param chunk The chunk to push
809
+ * @param final Whether this is the last chunk
810
+ */
811
+ push(chunk: Uint8Array, final?: boolean): void;
812
+ /**
813
+ * A method to terminate the stream's internal worker. Subsequent calls to
814
+ * push() will silently fail.
815
+ */
816
+ terminate: AsyncTerminable;
817
+ }
818
+ /**
819
+ * Asynchronously expands Zlib data
820
+ * @param data The data to decompress
821
+ * @param opts The decompression options
822
+ * @param cb The function to be called upon decompression completion
823
+ * @returns A function that can be used to immediately terminate the decompression
824
+ */
825
+ export declare function unzlib(data: Uint8Array, opts: AsyncUnzlibOptions, cb: FlateCallback): AsyncTerminable;
826
+ /**
827
+ * Asynchronously expands Zlib data
828
+ * @param data The data to decompress
829
+ * @param cb The function to be called upon decompression completion
830
+ * @returns A function that can be used to immediately terminate the decompression
831
+ */
832
+ export declare function unzlib(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
833
+ /**
834
+ * Expands Zlib data
835
+ * @param data The data to decompress
836
+ * @returns The decompressed version of the data
837
+ */
838
+ export declare function unzlibSync(data: Uint8Array): Uint8Array<ArrayBuffer>;
839
+ /**
840
+ * Expands Zlib data
841
+ * @param data The data to decompress
842
+ * @param opts The decompression options
843
+ * @returns The decompressed version of the data
844
+ */
845
+ export declare function unzlibSync<TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(data: Uint8Array, opts?: UnzlibOptions<TArrayBuffer>): Uint8Array<TArrayBuffer>;
846
+ export { AsyncGzip as AsyncCompress, gzip as compress, Gzip as Compress, gzipSync as compressSync, };
847
+ /**
848
+ * Streaming GZIP, Zlib, or raw DEFLATE decompression
849
+ */
850
+ export declare class Decompress {
851
+ private G;
852
+ private I;
853
+ private Z;
854
+ private o;
855
+ private s;
856
+ private p;
857
+ /**
858
+ * The handler to call whenever data is available
859
+ */
860
+ ondata: FlateStreamHandler;
861
+ /**
862
+ * Creates a decompression stream
863
+ * @param opts The decompression options
864
+ * @param cb The callback to call whenever data is decompressed
865
+ */
866
+ constructor(opts: InflateStreamOptions, cb?: FlateStreamHandler);
867
+ /**
868
+ * Creates a decompression stream
869
+ * @param cb The callback to call whenever data is decompressed
870
+ */
871
+ constructor(cb?: FlateStreamHandler);
872
+ private i;
873
+ /**
874
+ * Pushes a chunk to be decompressed
875
+ * @param chunk The chunk to push
876
+ * @param final Whether this is the last chunk
877
+ */
878
+ push(chunk: Uint8Array, final?: boolean): void;
879
+ }
880
+ /**
881
+ * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression
882
+ */
883
+ export declare class AsyncDecompress {
884
+ private G;
885
+ private I;
886
+ private Z;
887
+ /**
888
+ * The handler to call whenever data is available
889
+ */
890
+ ondata: AsyncFlateStreamHandler;
891
+ /**
892
+ * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates)
893
+ */
894
+ ondrain?: AsyncFlateDrainHandler;
895
+ /**
896
+ * The number of compressed bytes buffered in the stream
897
+ */
898
+ queuedSize: number;
899
+ /**
900
+ * Creates an asynchronous decompression stream
901
+ * @param opts The decompression options
902
+ * @param cb The callback to call whenever data is decompressed
903
+ */
904
+ constructor(opts: InflateStreamOptions, cb?: AsyncFlateStreamHandler);
905
+ /**
906
+ * Creates an asynchronous decompression stream
907
+ * @param cb The callback to call whenever data is decompressed
908
+ */
909
+ constructor(cb?: AsyncFlateStreamHandler);
910
+ private i;
911
+ /**
912
+ * Pushes a chunk to be decompressed
913
+ * @param chunk The chunk to push
914
+ * @param final Whether this is the last chunk
915
+ */
916
+ push(chunk: Uint8Array, final?: boolean): void;
917
+ }
918
+ /**
919
+ * Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
920
+ * @param data The data to decompress
921
+ * @param opts The decompression options
922
+ * @param cb The function to be called upon decompression completion
923
+ * @returns A function that can be used to immediately terminate the decompression
924
+ */
925
+ export declare function decompress(data: Uint8Array, opts: AsyncInflateOptions, cb: FlateCallback): AsyncTerminable;
926
+ /**
927
+ * Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
928
+ * @param data The data to decompress
929
+ * @param cb The function to be called upon decompression completion
930
+ * @returns A function that can be used to immediately terminate the decompression
931
+ */
932
+ export declare function decompress(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
933
+ /**
934
+ * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
935
+ * @param data The data to decompress
936
+ * @param opts The decompression options
937
+ * @returns The decompressed version of the data
938
+ */
939
+ export declare function decompressSync(data: Uint8Array, opts?: InflateOptions): Uint8Array<ArrayBufferLike>;
940
+ /**
941
+ * Attributes for files added to a ZIP archive object
942
+ */
943
+ export interface ZipAttributes {
944
+ /**
945
+ * The operating system of origin for this file. The value is defined
946
+ * by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default)
947
+ * is MS/DOS, 3 is Unix, 19 is macOS.
948
+ */
949
+ os?: number;
950
+ /**
951
+ * The file's attributes. These are traditionally somewhat complicated
952
+ * and platform-dependent, so using them is scarcely necessary. However,
953
+ * here is a representation of what this is, bit by bit:
954
+ *
955
+ * `TTTTugtrwxrwxrwx0000000000ADVSHR`
956
+ *
957
+ * TTTT = file type (rarely useful)
958
+ *
959
+ * u = setuid, g = setgid, t = sticky
960
+ *
961
+ * rwx = user permissions, rwx = group permissions, rwx = other permissions
962
+ *
963
+ * 0000000000 = unused
964
+ *
965
+ * A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only
966
+ *
967
+ * If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16.
968
+ * Note that attributes usually only work in conjunction with the `os` setting: you must use
969
+ * `os` = 3 (Unix) if you want to set Unix permissions
970
+ */
971
+ attrs?: number;
972
+ /**
973
+ * Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt,
974
+ * section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an
975
+ * integer between 0 and 65,535, inclusive.
976
+ *
977
+ * This field is incredibly rare and almost never needed except for compliance with
978
+ * proprietary standards and software.
979
+ */
980
+ extra?: Record<number, Uint8Array>;
981
+ /**
982
+ * The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt,
983
+ * section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This
984
+ * field is not read by consumer software.
985
+ */
986
+ comment?: string;
987
+ /**
988
+ * When the file was last modified. Defaults to the current time.
989
+ */
990
+ mtime?: GzipOptions['mtime'];
991
+ }
992
+ /**
993
+ * Options for creating a ZIP archive
994
+ */
995
+ export interface ZipOptions extends DeflateOptions, ZipAttributes {
996
+ }
997
+ /**
998
+ * Options for expanding a ZIP archive
999
+ */
1000
+ export interface UnzipOptions {
1001
+ /**
1002
+ * A filter function to extract only certain files from a ZIP archive
1003
+ */
1004
+ filter?: UnzipFileFilter;
1005
+ }
1006
+ /**
1007
+ * Options for asynchronously creating a ZIP archive
1008
+ */
1009
+ export interface AsyncZipOptions extends AsyncDeflateOptions, ZipAttributes {
1010
+ }
1011
+ /**
1012
+ * Options for asynchronously expanding a ZIP archive
1013
+ */
1014
+ export interface AsyncUnzipOptions extends UnzipOptions {
1015
+ }
1016
+ /**
1017
+ * A file that can be used to create a ZIP archive
1018
+ */
1019
+ export type ZippableFile = Uint8Array | Zippable | [Uint8Array | Zippable, ZipOptions];
1020
+ /**
1021
+ * A file that can be used to asynchronously create a ZIP archive
1022
+ */
1023
+ export type AsyncZippableFile = Uint8Array | AsyncZippable | [Uint8Array | AsyncZippable, AsyncZipOptions];
1024
+ /**
1025
+ * The complete directory structure of a ZIPpable archive
1026
+ */
1027
+ export interface Zippable {
1028
+ [path: string]: ZippableFile;
1029
+ }
1030
+ /**
1031
+ * The complete directory structure of an asynchronously ZIPpable archive
1032
+ */
1033
+ export interface AsyncZippable {
1034
+ [path: string]: AsyncZippableFile;
1035
+ }
1036
+ /**
1037
+ * An unzipped archive. The full path of each file is used as the key,
1038
+ * and the file is the value
1039
+ */
1040
+ export interface Unzipped {
1041
+ [path: string]: Uint8Array<ArrayBuffer>;
1042
+ }
1043
+ /**
1044
+ * Handler for string generation streams
1045
+ * @param data The string output from the stream processor
1046
+ * @param final Whether this is the final block
1047
+ */
1048
+ export type StringStreamHandler = (data: string, final: boolean) => void;
1049
+ /**
1050
+ * Callback for asynchronous ZIP decompression
1051
+ * @param err Any error that occurred
1052
+ * @param data The decompressed ZIP archive
1053
+ */
1054
+ export type UnzipCallback = (err: FlateError | null, data: Unzipped) => void;
1055
+ /**
1056
+ * Handler for streaming ZIP decompression
1057
+ * @param file The file that was found in the archive
1058
+ */
1059
+ export type UnzipFileHandler = (file: UnzipFile) => void;
1060
+ /**
1061
+ * Streaming UTF-8 decoding
1062
+ */
1063
+ export declare class DecodeUTF8 {
1064
+ private p;
1065
+ private t;
1066
+ /**
1067
+ * Creates a UTF-8 decoding stream
1068
+ * @param cb The callback to call whenever data is decoded
1069
+ */
1070
+ constructor(cb?: StringStreamHandler);
1071
+ /**
1072
+ * Pushes a chunk to be decoded from UTF-8 binary
1073
+ * @param chunk The chunk to push
1074
+ * @param final Whether this is the last chunk
1075
+ */
1076
+ push(chunk: Uint8Array, final?: boolean): void;
1077
+ /**
1078
+ * The handler to call whenever data is available
1079
+ */
1080
+ ondata: StringStreamHandler;
1081
+ }
1082
+ /**
1083
+ * Streaming UTF-8 encoding
1084
+ */
1085
+ export declare class EncodeUTF8 {
1086
+ private d;
1087
+ /**
1088
+ * Creates a UTF-8 decoding stream
1089
+ * @param cb The callback to call whenever data is encoded
1090
+ */
1091
+ constructor(cb?: FlateStreamHandler);
1092
+ /**
1093
+ * Pushes a chunk to be encoded to UTF-8
1094
+ * @param chunk The string data to push
1095
+ * @param final Whether this is the last chunk
1096
+ */
1097
+ push(chunk: string, final?: boolean): void;
1098
+ /**
1099
+ * The handler to call whenever data is available
1100
+ */
1101
+ ondata: FlateStreamHandler;
1102
+ }
1103
+ /**
1104
+ * Converts a string into a Uint8Array for use with compression/decompression methods
1105
+ * @param str The string to encode
1106
+ * @param latin1 Whether or not to interpret the data as Latin-1. This should
1107
+ * not need to be true unless decoding a binary string.
1108
+ * @returns The string encoded in UTF-8/Latin-1 binary
1109
+ */
1110
+ export declare function strToU8(str: string, latin1?: boolean): Uint8Array<ArrayBuffer>;
1111
+ /**
1112
+ * Converts a Uint8Array to a string
1113
+ * @param dat The data to decode to string
1114
+ * @param latin1 Whether or not to interpret the data as Latin-1. This should
1115
+ * not need to be true unless encoding to binary string.
1116
+ * @returns The original UTF-8/Latin-1 string
1117
+ */
1118
+ export declare function strFromU8(dat: Uint8Array, latin1?: boolean): string;
1119
+ /**
1120
+ * A stream that can be used to create a file in a ZIP archive
1121
+ */
1122
+ export interface ZipInputFile extends ZipAttributes {
1123
+ /**
1124
+ * The filename to associate with the data provided to this stream. If you
1125
+ * want a file in a subdirectory, use forward slashes as a separator (e.g.
1126
+ * `directory/filename.ext`). This will still work on Windows.
1127
+ */
1128
+ filename: string;
1129
+ /**
1130
+ * The size of the file in bytes. This attribute may be invalid after
1131
+ * the file is added to the ZIP archive; it must be correct only before the
1132
+ * stream completes.
1133
+ *
1134
+ * If you don't want to have to compute this yourself, consider extending the
1135
+ * ZipPassThrough class and overriding its process() method, or using one of
1136
+ * ZipDeflate or AsyncZipDeflate.
1137
+ */
1138
+ size: number;
1139
+ /**
1140
+ * A CRC of the original file contents. This attribute may be invalid after
1141
+ * the file is added to the ZIP archive; it must be correct only before the
1142
+ * stream completes.
1143
+ *
1144
+ * If you don't want to have to generate this yourself, consider extending the
1145
+ * ZipPassThrough class and overriding its process() method, or using one of
1146
+ * ZipDeflate or AsyncZipDeflate.
1147
+ */
1148
+ crc: number;
1149
+ /**
1150
+ * The compression format for the data stream. This number is determined by
1151
+ * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no
1152
+ * compression, 8 = deflate, 14 = LZMA
1153
+ */
1154
+ compression: number;
1155
+ /**
1156
+ * Bits 1 and 2 of the general purpose bit flag, specified in PKZIP's
1157
+ * APPNOTE.txt, section 4.4.4. Should be between 0 and 3. This is unlikely
1158
+ * to be necessary.
1159
+ */
1160
+ flag?: number;
1161
+ /**
1162
+ * The handler to be called when data is added. After passing this stream to
1163
+ * the ZIP file object, this handler will always be defined. To call it:
1164
+ *
1165
+ * `stream.ondata(error, chunk, final)`
1166
+ *
1167
+ * error = any error that occurred (null if there was no error)
1168
+ *
1169
+ * chunk = a Uint8Array of the data that was added (null if there was an
1170
+ * error)
1171
+ *
1172
+ * final = boolean, whether this is the final chunk in the stream
1173
+ */
1174
+ ondata?: AsyncFlateStreamHandler;
1175
+ /**
1176
+ * A method called when the stream is no longer needed, for clean-up
1177
+ * purposes. This will not always be called after the stream completes,
1178
+ * so you may wish to call this.terminate() after the final chunk is
1179
+ * processed if you have clean-up logic.
1180
+ */
1181
+ terminate?: AsyncTerminable;
1182
+ }
1183
+ /**
1184
+ * A pass-through stream to keep data uncompressed in a ZIP archive.
1185
+ */
1186
+ export declare class ZipPassThrough implements ZipInputFile {
1187
+ filename: string;
1188
+ crc: number;
1189
+ size: number;
1190
+ compression: number;
1191
+ os?: number;
1192
+ attrs?: number;
1193
+ comment?: string;
1194
+ extra?: Record<number, Uint8Array>;
1195
+ mtime?: GzipOptions['mtime'];
1196
+ ondata: AsyncFlateStreamHandler;
1197
+ private c;
1198
+ /**
1199
+ * Creates a pass-through stream that can be added to ZIP archives
1200
+ * @param filename The filename to associate with this data stream
1201
+ */
1202
+ constructor(filename: string);
1203
+ /**
1204
+ * Processes a chunk and pushes to the output stream. You can override this
1205
+ * method in a subclass for custom behavior, but by default this passes
1206
+ * the data through. You must call this.ondata(err, chunk, final) at some
1207
+ * point in this method.
1208
+ * @param chunk The chunk to process
1209
+ * @param final Whether this is the last chunk
1210
+ */
1211
+ protected process(chunk: Uint8Array<ArrayBuffer>, final: boolean): void;
1212
+ /**
1213
+ * Pushes a chunk to be added. If you are subclassing this with a custom
1214
+ * compression algorithm, note that you must push data from the source
1215
+ * file only, pre-compression.
1216
+ * @param chunk The chunk to push
1217
+ * @param final Whether this is the last chunk
1218
+ */
1219
+ push(chunk: Uint8Array, final?: boolean): void;
1220
+ }
1221
+ /**
1222
+ * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate
1223
+ * for better performance
1224
+ */
1225
+ export declare class ZipDeflate implements ZipInputFile {
1226
+ filename: string;
1227
+ crc: number;
1228
+ size: number;
1229
+ compression: number;
1230
+ flag: 0 | 1 | 2 | 3;
1231
+ os?: number;
1232
+ attrs?: number;
1233
+ comment?: string;
1234
+ extra?: Record<number, Uint8Array>;
1235
+ mtime?: GzipOptions['mtime'];
1236
+ ondata: AsyncFlateStreamHandler;
1237
+ private d;
1238
+ /**
1239
+ * Creates a DEFLATE stream that can be added to ZIP archives
1240
+ * @param filename The filename to associate with this data stream
1241
+ * @param opts The compression options
1242
+ */
1243
+ constructor(filename: string, opts?: DeflateOptions);
1244
+ private process;
1245
+ /**
1246
+ * Pushes a chunk to be deflated
1247
+ * @param chunk The chunk to push
1248
+ * @param final Whether this is the last chunk
1249
+ */
1250
+ push(chunk: Uint8Array, final?: boolean): void;
1251
+ }
1252
+ /**
1253
+ * Asynchronous streaming DEFLATE compression for ZIP archives
1254
+ */
1255
+ export declare class AsyncZipDeflate implements ZipInputFile {
1256
+ filename: string;
1257
+ crc: number;
1258
+ size: number;
1259
+ compression: number;
1260
+ flag: 0 | 1 | 2 | 3;
1261
+ os?: number;
1262
+ attrs?: number;
1263
+ comment?: string;
1264
+ extra?: Record<number, Uint8Array>;
1265
+ mtime?: GzipOptions['mtime'];
1266
+ ondata: AsyncFlateStreamHandler;
1267
+ private d;
1268
+ terminate: AsyncTerminable;
1269
+ /**
1270
+ * Creates an asynchronous DEFLATE stream that can be added to ZIP archives
1271
+ * @param filename The filename to associate with this data stream
1272
+ * @param opts The compression options
1273
+ */
1274
+ constructor(filename: string, opts?: DeflateOptions);
1275
+ private process;
1276
+ /**
1277
+ * Pushes a chunk to be deflated
1278
+ * @param chunk The chunk to push
1279
+ * @param final Whether this is the last chunk
1280
+ */
1281
+ push(chunk: Uint8Array, final?: boolean): void;
1282
+ }
1283
+ /**
1284
+ * A zippable archive to which files can incrementally be added
1285
+ */
1286
+ export declare class Zip {
1287
+ private u;
1288
+ private d;
1289
+ /**
1290
+ * Creates an empty ZIP archive to which files can be added
1291
+ * @param cb The callback to call whenever data for the generated ZIP archive
1292
+ * is available
1293
+ */
1294
+ constructor(cb?: AsyncFlateStreamHandler);
1295
+ /**
1296
+ * Adds a file to the ZIP archive
1297
+ * @param file The file stream to add
1298
+ */
1299
+ add(file: ZipInputFile): void;
1300
+ /**
1301
+ * Ends the process of adding files and prepares to emit the final chunks.
1302
+ * This *must* be called after adding all desired files for the resulting
1303
+ * ZIP file to work properly.
1304
+ */
1305
+ end(): void;
1306
+ private e;
1307
+ /**
1308
+ * A method to terminate any internal workers used by the stream. Subsequent
1309
+ * calls to add() will fail.
1310
+ */
1311
+ terminate(): void;
1312
+ /**
1313
+ * The handler to call whenever data is available
1314
+ */
1315
+ ondata: AsyncFlateStreamHandler;
1316
+ }
1317
+ /**
1318
+ * Asynchronously creates a ZIP file
1319
+ * @param data The directory structure for the ZIP archive
1320
+ * @param opts The main options, merged with per-file options
1321
+ * @param cb The callback to call with the generated ZIP archive
1322
+ * @returns A function that can be used to immediately terminate the compression
1323
+ */
1324
+ export declare function zip(data: AsyncZippable, opts: AsyncZipOptions, cb: FlateCallback): AsyncTerminable;
1325
+ /**
1326
+ * Asynchronously creates a ZIP file
1327
+ * @param data The directory structure for the ZIP archive
1328
+ * @param cb The callback to call with the generated ZIP archive
1329
+ * @returns A function that can be used to immediately terminate the compression
1330
+ */
1331
+ export declare function zip(data: AsyncZippable, cb: FlateCallback): AsyncTerminable;
1332
+ /**
1333
+ * Synchronously creates a ZIP file. Prefer using `zip` for better performance
1334
+ * with more than one file.
1335
+ * @param data The directory structure for the ZIP archive
1336
+ * @param opts The main options, merged with per-file options
1337
+ * @returns The generated ZIP archive
1338
+ */
1339
+ export declare function zipSync(data: Zippable, opts?: ZipOptions): Uint8Array<ArrayBuffer>;
1340
+ /**
1341
+ * A decoder for files in ZIP streams
1342
+ */
1343
+ export interface UnzipDecoder {
1344
+ /**
1345
+ * The handler to call whenever data is available
1346
+ */
1347
+ ondata: AsyncFlateStreamHandler;
1348
+ /**
1349
+ * Pushes a chunk to be decompressed
1350
+ * @param chunk The data in this chunk. Do not consume (detach) this buffer.
1351
+ * @param final Whether this is the last chunk in the data stream
1352
+ */
1353
+ push(chunk: Uint8Array, final: boolean): void;
1354
+ /**
1355
+ * A method to terminate any internal workers used by the stream. Subsequent
1356
+ * calls to push() should silently fail.
1357
+ */
1358
+ terminate?: AsyncTerminable;
1359
+ }
1360
+ /**
1361
+ * A constructor for a decoder for unzip streams
1362
+ */
1363
+ export interface UnzipDecoderConstructor {
1364
+ /**
1365
+ * Creates an instance of the decoder
1366
+ * @param filename The name of the file
1367
+ * @param size The compressed size of the file
1368
+ * @param originalSize The original size of the file
1369
+ */
1370
+ new (filename: string, size?: number, originalSize?: number): UnzipDecoder;
1371
+ /**
1372
+ * The compression format for the data stream. This number is determined by
1373
+ * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no
1374
+ * compression, 8 = deflate, 14 = LZMA
1375
+ */
1376
+ compression: number;
1377
+ }
1378
+ /**
1379
+ * Information about a file to be extracted from a ZIP archive
1380
+ */
1381
+ export interface UnzipFileInfo {
1382
+ /**
1383
+ * The name of the file
1384
+ */
1385
+ name: string;
1386
+ /**
1387
+ * The compressed size of the file
1388
+ */
1389
+ size: number;
1390
+ /**
1391
+ * The original size of the file
1392
+ */
1393
+ originalSize: number;
1394
+ /**
1395
+ * The compression format for the data stream. This number is determined by
1396
+ * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no
1397
+ * compression, 8 = deflate, 14 = LZMA. If the filter function returns true
1398
+ * but this value is not 8, the unzip function will throw.
1399
+ */
1400
+ compression: number;
1401
+ }
1402
+ /**
1403
+ * A filter for files to be extracted during the unzipping process
1404
+ * @param file The info for the current file being processed
1405
+ * @returns Whether or not to extract the current file
1406
+ */
1407
+ export type UnzipFileFilter = (file: UnzipFileInfo) => boolean;
1408
+ /**
1409
+ * Streaming file extraction from ZIP archives
1410
+ */
1411
+ export interface UnzipFile {
1412
+ /**
1413
+ * The handler to call whenever data is available
1414
+ */
1415
+ ondata: AsyncFlateStreamHandler;
1416
+ /**
1417
+ * The name of the file
1418
+ */
1419
+ name: string;
1420
+ /**
1421
+ * The compression format for the data stream. This number is determined by
1422
+ * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no
1423
+ * compression, 8 = deflate, 14 = LZMA. If start() is called but there is no
1424
+ * decompression stream available for this method, start() will throw.
1425
+ */
1426
+ compression: number;
1427
+ /**
1428
+ * The compressed size of the file. Will not be present for archives created
1429
+ * in a streaming fashion.
1430
+ */
1431
+ size?: number;
1432
+ /**
1433
+ * The original size of the file. Will not be present for archives created
1434
+ * in a streaming fashion.
1435
+ */
1436
+ originalSize?: number;
1437
+ /**
1438
+ * Starts reading from the stream. Calling this function will always enable
1439
+ * this stream, but ocassionally the stream will be enabled even without
1440
+ * this being called.
1441
+ */
1442
+ start(): void;
1443
+ /**
1444
+ * A method to terminate any internal workers used by the stream. ondata
1445
+ * will not be called any further.
1446
+ */
1447
+ terminate: AsyncTerminable;
1448
+ }
1449
+ /**
1450
+ * Streaming pass-through decompression for ZIP archives
1451
+ */
1452
+ export declare class UnzipPassThrough implements UnzipDecoder {
1453
+ static compression: number;
1454
+ ondata: AsyncFlateStreamHandler;
1455
+ push(chunk: Uint8Array, final: boolean): void;
1456
+ }
1457
+ /**
1458
+ * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for
1459
+ * better performance.
1460
+ */
1461
+ export declare class UnzipInflate implements UnzipDecoder {
1462
+ static compression: number;
1463
+ private i;
1464
+ ondata: AsyncFlateStreamHandler;
1465
+ /**
1466
+ * Creates a DEFLATE decompression that can be used in ZIP archives
1467
+ */
1468
+ constructor();
1469
+ push(chunk: Uint8Array, final: boolean): void;
1470
+ }
1471
+ /**
1472
+ * Asynchronous streaming DEFLATE decompression for ZIP archives
1473
+ */
1474
+ export declare class AsyncUnzipInflate implements UnzipDecoder {
1475
+ static compression: number;
1476
+ private i;
1477
+ ondata: AsyncFlateStreamHandler;
1478
+ terminate: AsyncTerminable;
1479
+ /**
1480
+ * Creates a DEFLATE decompression that can be used in ZIP archives
1481
+ */
1482
+ constructor(_: string, sz?: number);
1483
+ push(chunk: Uint8Array, final: boolean): void;
1484
+ }
1485
+ /**
1486
+ * A ZIP archive decompression stream that emits files as they are discovered
1487
+ */
1488
+ export declare class Unzip {
1489
+ private d;
1490
+ private c;
1491
+ private p;
1492
+ private k;
1493
+ private o;
1494
+ /**
1495
+ * Creates a ZIP decompression stream
1496
+ * @param cb The callback to call whenever a file in the ZIP archive is found
1497
+ */
1498
+ constructor(cb?: UnzipFileHandler);
1499
+ /**
1500
+ * Pushes a chunk to be unzipped
1501
+ * @param chunk The chunk to push
1502
+ * @param final Whether this is the last chunk
1503
+ */
1504
+ push(chunk: Uint8Array, final?: boolean): void;
1505
+ /**
1506
+ * Registers a decoder with the stream, allowing for files compressed with
1507
+ * the compression type provided to be expanded correctly
1508
+ * @param decoder The decoder constructor
1509
+ */
1510
+ register(decoder: UnzipDecoderConstructor): void;
1511
+ /**
1512
+ * The handler to call whenever a file is discovered
1513
+ */
1514
+ onfile: UnzipFileHandler;
1515
+ }
1516
+ /**
1517
+ * Asynchronously decompresses a ZIP archive
1518
+ * @param data The raw compressed ZIP file
1519
+ * @param opts The ZIP extraction options
1520
+ * @param cb The callback to call with the decompressed files
1521
+ * @returns A function that can be used to immediately terminate the unzipping
1522
+ */
1523
+ export declare function unzip(data: Uint8Array, opts: AsyncUnzipOptions, cb: UnzipCallback): AsyncTerminable;
1524
+ /**
1525
+ * Asynchronously decompresses a ZIP archive
1526
+ * @param data The raw compressed ZIP file
1527
+ * @param cb The callback to call with the decompressed files
1528
+ * @returns A function that can be used to immediately terminate the unzipping
1529
+ */
1530
+ export declare function unzip(data: Uint8Array, cb: UnzipCallback): AsyncTerminable;
1531
+ /**
1532
+ * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better
1533
+ * performance with more than one file.
1534
+ * @param data The raw compressed ZIP file
1535
+ * @param opts The ZIP extraction options
1536
+ * @returns The decompressed files
1537
+ */
1538
+ export declare function unzipSync(data: Uint8Array, opts?: UnzipOptions): Unzipped;