@unicom-cloud/utils 0.1.23 → 0.1.24
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.
- package/case-name/index.js +8 -7
- package/caseName.js +8 -7
- package/class-name/index.js +1 -0
- package/className.js +1 -0
- package/clipboard-copy/index.js +8 -8
- package/clipboardCopy.js +3 -3
- package/constant/address.js +1 -0
- package/constant/chineseCharacters.js +1 -0
- package/constant/constellations.js +1 -0
- package/constant/domain.js +1 -0
- package/constant/emoji.js +1 -0
- package/constant/identity.js +1 -0
- package/constant/index.js +1 -0
- package/constant/keyboardCode.js +1 -0
- package/constant/licensePlate.js +1 -0
- package/constant/name.js +1 -0
- package/constant/platform.js +12 -11
- package/constant/protocol.js +1 -0
- package/constant/ui.js +1 -0
- package/constant.js +1 -0
- package/content-disposition/index.js +3 -3
- package/contentDisposition.js +6 -6
- package/cookie/index.js +1 -0
- package/cookie/src/index.js +1 -0
- package/cookie.js +1 -0
- package/date/convertTime.js +1 -0
- package/date/convertToDuration.js +18 -0
- package/date/index.js +10 -19
- package/date.js +8 -6
- package/decimal/decimal.js +3 -2
- package/decimal/index.js +1 -0
- package/decimal.js +1 -0
- package/dom-helpers/activeElement.js +13 -0
- package/dom-helpers/addClass.js +11 -0
- package/dom-helpers/addEventListener.js +34 -0
- package/dom-helpers/animate.js +51 -0
- package/dom-helpers/animationFrame.js +21 -0
- package/dom-helpers/attribute.js +11 -0
- package/dom-helpers/camelize.js +8 -0
- package/dom-helpers/camelizeStyle.js +9 -0
- package/dom-helpers/canUseDOM.js +5 -0
- package/dom-helpers/childElements.js +7 -0
- package/dom-helpers/childNodes.js +8 -0
- package/dom-helpers/clear.js +12 -0
- package/dom-helpers/closest.js +14 -0
- package/dom-helpers/collectElements.js +11 -0
- package/dom-helpers/collectSiblings.js +15 -0
- package/dom-helpers/contains.js +9 -0
- package/dom-helpers/css.js +16 -0
- package/dom-helpers/filterEventHandler.js +12 -0
- package/dom-helpers/getComputedStyle.js +8 -0
- package/dom-helpers/getScrollAccessor.js +15 -0
- package/dom-helpers/hasClass.js +9 -0
- package/dom-helpers/height.js +10 -0
- package/dom-helpers/hyphenate.js +8 -0
- package/dom-helpers/hyphenateStyle.js +9 -0
- package/dom-helpers/index.js +140 -0
- package/dom-helpers/insertAfter.js +7 -0
- package/dom-helpers/isDocument.js +7 -0
- package/dom-helpers/isInput.js +8 -0
- package/dom-helpers/isTransform.js +8 -0
- package/dom-helpers/isVisible.js +7 -0
- package/dom-helpers/isWindow.js +8 -0
- package/dom-helpers/listen.js +11 -0
- package/dom-helpers/matches.js +12 -0
- package/dom-helpers/nextUntil.js +8 -0
- package/dom-helpers/offset.js +19 -0
- package/dom-helpers/offsetParent.js +14 -0
- package/dom-helpers/ownerDocument.js +7 -0
- package/dom-helpers/ownerWindow.js +9 -0
- package/dom-helpers/parents.js +8 -0
- package/dom-helpers/position.js +29 -0
- package/dom-helpers/prepend.js +7 -0
- package/dom-helpers/querySelectorAll.js +8 -0
- package/dom-helpers/reflow.js +26 -0
- package/dom-helpers/remove.js +7 -0
- package/dom-helpers/removeClass.js +19 -0
- package/dom-helpers/removeEventListener.js +8 -0
- package/dom-helpers/scrollLeft.js +6 -0
- package/dom-helpers/scrollParent.js +17 -0
- package/dom-helpers/scrollTo.js +27 -0
- package/dom-helpers/scrollTop.js +6 -0
- package/dom-helpers/scrollbarSize.js +13 -0
- package/dom-helpers/siblings.js +11 -0
- package/dom-helpers/text.js +9 -0
- package/dom-helpers/toggleClass.js +10 -0
- package/dom-helpers/transitionEnd.js +34 -0
- package/dom-helpers/triggerEvent.js +10 -0
- package/dom-helpers/types.js +1 -0
- package/dom-helpers/width.js +10 -0
- package/domHelpers.js +94 -0
- package/emitter/index.js +1 -0
- package/emitter/src/index.js +1 -0
- package/emitter.js +1 -0
- package/file/fileToURL.js +11 -11
- package/file/index.js +1 -0
- package/file/saveAs.js +1 -0
- package/file.js +1 -0
- package/filesize/types/constants.d.ts +30 -0
- package/filesize/types/helpers.d.ts +130 -0
- package/idb/index.js +103 -0
- package/idb.js +5 -0
- package/index.js +1 -0
- package/invariant/index.js +1 -0
- package/invariant.js +1 -0
- package/is/index.js +119 -119
- package/is.js +38 -37
- package/js-cookie/index.js +1 -0
- package/js-cookie/src/api.js +1 -0
- package/js-cookie/src/assign.js +1 -0
- package/js-cookie/src/converter.js +1 -0
- package/jsCookie.js +1 -0
- package/lunar/index.js +1 -0
- package/lunar/lib/Holiday.js +1 -0
- package/lunar/lib/HolidayUtil.js +1 -0
- package/lunar/lib/I18n.js +1 -0
- package/lunar/lib/JieQi.js +1 -0
- package/lunar/lib/Lunar.js +1 -0
- package/lunar/lib/LunarMonth.js +1 -0
- package/lunar/lib/LunarTime.js +1 -0
- package/lunar/lib/LunarUtil.js +1 -0
- package/lunar/lib/LunarYear.js +1 -0
- package/lunar/lib/ShouXingUtil.js +1 -0
- package/lunar/lib/Solar.js +1 -0
- package/lunar/lib/SolarHalfYear.js +1 -0
- package/lunar/lib/SolarMonth.js +1 -0
- package/lunar/lib/SolarSeason.js +1 -0
- package/lunar/lib/SolarUtil.js +1 -0
- package/lunar/lib/SolarWeek.js +1 -0
- package/lunar/lib/SolarYear.js +1 -0
- package/lunar/lib/index.js +1 -0
- package/lunar.js +1 -0
- package/math/index.js +1 -0
- package/math.js +1 -0
- package/md5/index.js +1 -0
- package/md5.js +1 -0
- package/mock/MockWebSocket.js +1 -1
- package/mock/MockXMLHttpRequest.js +1 -1
- package/mock/index.js +1 -0
- package/mock.js +1 -0
- package/normalize-wheel/ExecutionEnvironment.js +4 -2
- package/normalize-wheel/UserAgent_DEPRECATED.js +1 -0
- package/normalize-wheel/index.js +1 -0
- package/normalize-wheel/isEventSupported.js +1 -0
- package/normalizeWheel.js +1 -0
- package/number-to-chinese/index.js +1 -0
- package/numberToChinese.js +1 -0
- package/nzh/cn.js +1 -0
- package/nzh/hk.js +1 -0
- package/nzh/index.js +1 -0
- package/nzh/nzh.js +1 -0
- package/nzh/src/autoGet.js +1 -0
- package/nzh/src/index.js +1 -0
- package/nzh/src/langs/cn_b.js +1 -0
- package/nzh/src/langs/cn_s.js +1 -0
- package/nzh/src/langs/hk_b.js +1 -0
- package/nzh/src/langs/hk_s.js +1 -0
- package/nzh/src/utils.js +1 -0
- package/nzh.js +1 -0
- package/object-keys-sort/index.js +1 -0
- package/objectKeysSort.js +1 -0
- package/package.json +1 -1
- package/pinyin/index.js +1 -0
- package/pinyin/simplified.js +1 -0
- package/pinyin/src/core.js +44 -42
- package/pinyin/src/simplified.js +6 -5
- package/pinyin/src/simplified_dict.js +3 -3
- package/pinyin/src/traditional.js +4 -3
- package/pinyin/src/traditional_dict.js +3 -3
- package/pinyin/traditional.js +1 -0
- package/pinyin.js +1 -0
- package/query-string/base.d.ts +102 -12
- package/query-string/base.js +76 -67
- package/query-string/index.js +1 -0
- package/query-string/splitOnFirst.js +1 -0
- package/queryString.js +1 -0
- package/random/address.js +1 -0
- package/random/constellation.js +1 -0
- package/random/image.js +1 -0
- package/random/index.js +6 -5
- package/random/licensePlate.js +1 -0
- package/random/name.js +1 -0
- package/random/number.js +1 -0
- package/random/text.js +1 -0
- package/random/time.js +1 -0
- package/random/web.js +1 -0
- package/random.js +1 -0
- package/screenfull/index.js +47 -117
- package/screenfull.js +1 -0
- package/sleep/index.js +7 -0
- package/sleep.js +5 -0
- package/snapdom/index.js +1 -0
- package/snapdom/src/api/preCache.js +63 -35
- package/snapdom/src/api/snapdom.js +84 -106
- package/snapdom/src/core/cache.js +28 -5
- package/snapdom/src/core/capture.js +341 -68
- package/snapdom/src/core/clone.js +296 -93
- package/snapdom/src/core/context.js +57 -0
- package/snapdom/src/core/prepare.js +125 -126
- package/snapdom/src/exporters/download.js +16 -0
- package/snapdom/src/exporters/toBlob.js +21 -0
- package/snapdom/src/exporters/toCanvas.js +106 -0
- package/snapdom/src/exporters/toImg.js +36 -0
- package/snapdom/src/modules/CSSVar.js +61 -0
- package/snapdom/src/modules/background.js +52 -29
- package/snapdom/src/modules/changeCSS.js +61 -0
- package/snapdom/src/modules/counter.js +165 -0
- package/snapdom/src/modules/fonts.js +640 -179
- package/snapdom/src/modules/iconFonts.js +1 -0
- package/snapdom/src/modules/images.js +48 -13
- package/snapdom/src/modules/lineClamp.js +42 -0
- package/snapdom/src/modules/pseudo.js +194 -62
- package/snapdom/src/modules/rasterize.js +10 -0
- package/snapdom/src/modules/snapFetch.js +263 -0
- package/snapdom/src/modules/styles.js +144 -23
- package/snapdom/src/modules/svgDefs.js +1 -0
- package/snapdom/src/utils/browser.js +13 -0
- package/snapdom/src/utils/css.js +191 -0
- package/snapdom/src/utils/helpers.js +25 -234
- package/snapdom/src/utils/image.js +39 -0
- package/snapdom/types/snapdom.d.ts +291 -99
- package/snapdom.js +1 -0
- package/tinycolor/index.js +2 -1
- package/tinycolor/src/conversion.js +2 -1
- package/tinycolor/src/css-color-names.js +1 -0
- package/tinycolor/src/format-input.js +2 -1
- package/tinycolor/src/from-ratio.js +2 -1
- package/tinycolor/src/index.js +2 -1
- package/tinycolor/src/random.js +1 -0
- package/tinycolor/src/readability.js +1 -0
- package/tinycolor/src/to-ms-filter.js +1 -0
- package/tinycolor/src/{util.js → utils.js} +1 -0
- package/tinycolor.js +2 -1
- package/tree/index.js +69 -65
- package/tree/search/index.js +50 -57
- package/tree.js +11 -7
- package/types/date/convertToDuration.d.ts +2 -0
- package/types/date/index.d.ts +2 -2
- package/types/dom-helpers/activeElement.d.ts +6 -0
- package/types/dom-helpers/addClass.d.ts +7 -0
- package/types/dom-helpers/addEventListener.d.ts +16 -0
- package/types/dom-helpers/animate.d.ts +19 -0
- package/types/dom-helpers/animationFrame.d.ts +2 -0
- package/types/dom-helpers/attribute.d.ts +8 -0
- package/types/dom-helpers/camelize.d.ts +1 -0
- package/types/dom-helpers/camelizeStyle.d.ts +2 -0
- package/types/dom-helpers/canUseDOM.d.ts +2 -0
- package/types/dom-helpers/childElements.d.ts +6 -0
- package/types/dom-helpers/childNodes.d.ts +6 -0
- package/types/dom-helpers/clear.d.ts +6 -0
- package/types/dom-helpers/closest.d.ts +8 -0
- package/types/dom-helpers/collectElements.d.ts +3 -0
- package/types/dom-helpers/collectSiblings.d.ts +1 -0
- package/types/dom-helpers/contains.d.ts +7 -0
- package/types/dom-helpers/css.d.ts +3 -0
- package/types/dom-helpers/filterEventHandler.d.ts +2 -0
- package/types/dom-helpers/getComputedStyle.d.ts +7 -0
- package/types/dom-helpers/getScrollAccessor.d.ts +1 -0
- package/types/dom-helpers/hasClass.d.ts +7 -0
- package/types/dom-helpers/height.d.ts +7 -0
- package/types/dom-helpers/hyphenate.d.ts +1 -0
- package/types/dom-helpers/hyphenateStyle.d.ts +7 -0
- package/types/dom-helpers/index.d.ts +93 -0
- package/types/dom-helpers/insertAfter.d.ts +7 -0
- package/types/dom-helpers/isDocument.d.ts +1 -0
- package/types/dom-helpers/isInput.d.ts +6 -0
- package/types/dom-helpers/isTransform.d.ts +2 -0
- package/types/dom-helpers/isVisible.d.ts +6 -0
- package/types/dom-helpers/isWindow.d.ts +1 -0
- package/types/dom-helpers/listen.d.ts +3 -0
- package/types/dom-helpers/matches.d.ts +7 -0
- package/types/dom-helpers/nextUntil.d.ts +7 -0
- package/types/dom-helpers/offset.d.ts +11 -0
- package/types/dom-helpers/offsetParent.d.ts +1 -0
- package/types/dom-helpers/ownerDocument.d.ts +6 -0
- package/types/dom-helpers/ownerWindow.d.ts +6 -0
- package/types/dom-helpers/parents.d.ts +6 -0
- package/types/dom-helpers/position.d.ts +23 -0
- package/types/dom-helpers/prepend.d.ts +7 -0
- package/types/dom-helpers/querySelectorAll.d.ts +7 -0
- package/types/dom-helpers/reflow.d.ts +2 -0
- package/types/dom-helpers/remove.d.ts +6 -0
- package/types/dom-helpers/removeClass.d.ts +7 -0
- package/types/dom-helpers/removeEventListener.d.ts +11 -0
- package/types/dom-helpers/scrollLeft.d.ts +8 -0
- package/types/dom-helpers/scrollParent.d.ts +7 -0
- package/types/dom-helpers/scrollTo.d.ts +1 -0
- package/types/dom-helpers/scrollTop.d.ts +8 -0
- package/types/dom-helpers/scrollbarSize.d.ts +1 -0
- package/types/dom-helpers/siblings.d.ts +6 -0
- package/types/dom-helpers/text.d.ts +8 -0
- package/types/dom-helpers/toggleClass.d.ts +7 -0
- package/types/dom-helpers/transitionEnd.d.ts +2 -0
- package/types/dom-helpers/triggerEvent.d.ts +9 -0
- package/types/dom-helpers/types.d.ts +4 -0
- package/types/dom-helpers/width.d.ts +7 -0
- package/types/filesize/benchmarks/basic-performance.d.ts +1 -0
- package/types/filesize/benchmarks/index.d.ts +2 -0
- package/types/filesize/benchmarks/options-benchmark.d.ts +1 -0
- package/types/filesize/benchmarks/partial-benchmark.d.ts +1 -0
- package/types/filesize/benchmarks/stress-test.d.ts +1 -0
- package/types/filesize/src/constants.d.ts +5 -0
- package/types/filesize/src/helpers.d.ts +55 -0
- package/types/idb/index.d.ts +21 -0
- package/types/index.d.ts +1 -1
- package/types/is/index.d.ts +37 -37
- package/types/lodash/_DataView.d.ts +2 -0
- package/types/lodash/_Hash.d.ts +29 -0
- package/types/lodash/_LazyWrapper.d.ts +26 -0
- package/types/lodash/_ListCache.d.ts +29 -0
- package/types/lodash/_LodashWrapper.d.ts +24 -0
- package/types/lodash/_Map.d.ts +2 -0
- package/types/lodash/_MapCache.d.ts +29 -0
- package/types/lodash/_Promise.d.ts +2 -0
- package/types/lodash/_Set.d.ts +2 -0
- package/types/lodash/_SetCache.d.ts +28 -0
- package/types/lodash/_Stack.d.ts +32 -0
- package/types/lodash/_Symbol.d.ts +3 -0
- package/types/lodash/_Uint8Array.d.ts +3 -0
- package/types/lodash/_WeakMap.d.ts +2 -0
- package/types/lodash/_addMapEntry.d.ts +10 -0
- package/types/lodash/_addSetEntry.d.ts +10 -0
- package/types/lodash/_apply.d.ts +12 -0
- package/types/lodash/_arrayAggregator.d.ts +12 -0
- package/types/lodash/_arrayEach.d.ts +11 -0
- package/types/lodash/_arrayEachRight.d.ts +11 -0
- package/types/lodash/_arrayEvery.d.ts +12 -0
- package/types/lodash/_arrayFilter.d.ts +11 -0
- package/types/lodash/_arrayIncludes.d.ts +11 -0
- package/types/lodash/_arrayIncludesWith.d.ts +11 -0
- package/types/lodash/_arrayLikeKeys.d.ts +10 -0
- package/types/lodash/_arrayMap.d.ts +11 -0
- package/types/lodash/_arrayPush.d.ts +10 -0
- package/types/lodash/_arrayReduce.d.ts +14 -0
- package/types/lodash/_arrayReduceRight.d.ts +14 -0
- package/types/lodash/_arraySample.d.ts +9 -0
- package/types/lodash/_arraySampleSize.d.ts +10 -0
- package/types/lodash/_arrayShuffle.d.ts +9 -0
- package/types/lodash/_arraySome.d.ts +12 -0
- package/types/lodash/_asciiSize.d.ts +9 -0
- package/types/lodash/_asciiToArray.d.ts +9 -0
- package/types/lodash/_asciiWords.d.ts +9 -0
- package/types/lodash/_assignMergeValue.d.ts +11 -0
- package/types/lodash/_assignValue.d.ts +12 -0
- package/types/lodash/_assocIndexOf.d.ts +10 -0
- package/types/lodash/_baseAggregator.d.ts +13 -0
- package/types/lodash/_baseAssign.d.ts +11 -0
- package/types/lodash/_baseAssignIn.d.ts +11 -0
- package/types/lodash/_baseAssignValue.d.ts +11 -0
- package/types/lodash/_baseAt.d.ts +10 -0
- package/types/lodash/_baseClamp.d.ts +11 -0
- package/types/lodash/_baseClone.d.ts +18 -0
- package/types/lodash/_baseConforms.d.ts +9 -0
- package/types/lodash/_baseConformsTo.d.ts +10 -0
- package/types/lodash/_baseCreate.d.ts +2 -0
- package/types/lodash/_baseDelay.d.ts +12 -0
- package/types/lodash/_baseDifference.d.ts +13 -0
- package/types/lodash/_baseEach.d.ts +10 -0
- package/types/lodash/_baseEachRight.d.ts +10 -0
- package/types/lodash/_baseEvery.d.ts +11 -0
- package/types/lodash/_baseExtremum.d.ts +12 -0
- package/types/lodash/_baseFill.d.ts +12 -0
- package/types/lodash/_baseFilter.d.ts +10 -0
- package/types/lodash/_baseFindIndex.d.ts +13 -0
- package/types/lodash/_baseFindKey.d.ts +13 -0
- package/types/lodash/_baseFlatten.d.ts +13 -0
- package/types/lodash/_baseFor.d.ts +13 -0
- package/types/lodash/_baseForOwn.d.ts +10 -0
- package/types/lodash/_baseForOwnRight.d.ts +10 -0
- package/types/lodash/_baseForRight.d.ts +12 -0
- package/types/lodash/_baseFunctions.d.ts +11 -0
- package/types/lodash/_baseGet.d.ts +10 -0
- package/types/lodash/_baseGetAllKeys.d.ts +13 -0
- package/types/lodash/_baseGetTag.d.ts +9 -0
- package/types/lodash/_baseGt.d.ts +11 -0
- package/types/lodash/_baseHas.d.ts +10 -0
- package/types/lodash/_baseHasIn.d.ts +10 -0
- package/types/lodash/_baseInRange.d.ts +11 -0
- package/types/lodash/_baseIndexOf.d.ts +11 -0
- package/types/lodash/_baseIndexOfWith.d.ts +12 -0
- package/types/lodash/_baseIntersection.d.ts +12 -0
- package/types/lodash/_baseInverter.d.ts +13 -0
- package/types/lodash/_baseInvoke.d.ts +12 -0
- package/types/lodash/_baseIsArguments.d.ts +9 -0
- package/types/lodash/_baseIsArrayBuffer.d.ts +9 -0
- package/types/lodash/_baseIsDate.d.ts +9 -0
- package/types/lodash/_baseIsEqual.d.ts +16 -0
- package/types/lodash/_baseIsEqualDeep.d.ts +16 -0
- package/types/lodash/_baseIsMap.d.ts +9 -0
- package/types/lodash/_baseIsMatch.d.ts +12 -0
- package/types/lodash/_baseIsNaN.d.ts +9 -0
- package/types/lodash/_baseIsNative.d.ts +10 -0
- package/types/lodash/_baseIsRegExp.d.ts +9 -0
- package/types/lodash/_baseIsSet.d.ts +9 -0
- package/types/lodash/_baseIsTypedArray.d.ts +9 -0
- package/types/lodash/_baseIteratee.d.ts +9 -0
- package/types/lodash/_baseKeys.d.ts +9 -0
- package/types/lodash/_baseKeysIn.d.ts +9 -0
- package/types/lodash/_baseLodash.d.ts +7 -0
- package/types/lodash/_baseLt.d.ts +11 -0
- package/types/lodash/_baseMap.d.ts +10 -0
- package/types/lodash/_baseMatches.d.ts +9 -0
- package/types/lodash/_baseMatchesProperty.d.ts +10 -0
- package/types/lodash/_baseMean.d.ts +11 -0
- package/types/lodash/_baseMerge.d.ts +13 -0
- package/types/lodash/_baseMergeDeep.d.ts +17 -0
- package/types/lodash/_baseNth.d.ts +10 -0
- package/types/lodash/_baseOrderBy.d.ts +11 -0
- package/types/lodash/_basePick.d.ts +11 -0
- package/types/lodash/_basePickBy.d.ts +11 -0
- package/types/lodash/_baseProperty.d.ts +9 -0
- package/types/lodash/_basePropertyDeep.d.ts +9 -0
- package/types/lodash/_basePropertyOf.d.ts +9 -0
- package/types/lodash/_basePullAll.d.ts +13 -0
- package/types/lodash/_basePullAt.d.ts +11 -0
- package/types/lodash/_baseRandom.d.ts +11 -0
- package/types/lodash/_baseRange.d.ts +13 -0
- package/types/lodash/_baseReduce.d.ts +15 -0
- package/types/lodash/_baseRepeat.d.ts +10 -0
- package/types/lodash/_baseRest.d.ts +10 -0
- package/types/lodash/_baseSample.d.ts +9 -0
- package/types/lodash/_baseSampleSize.d.ts +10 -0
- package/types/lodash/_baseSet.d.ts +12 -0
- package/types/lodash/_baseSetData.d.ts +2 -0
- package/types/lodash/_baseSetToString.d.ts +2 -0
- package/types/lodash/_baseShuffle.d.ts +9 -0
- package/types/lodash/_baseSlice.d.ts +11 -0
- package/types/lodash/_baseSome.d.ts +11 -0
- package/types/lodash/_baseSortBy.d.ts +12 -0
- package/types/lodash/_baseSortedIndex.d.ts +14 -0
- package/types/lodash/_baseSortedIndexBy.d.ts +15 -0
- package/types/lodash/_baseSortedUniq.d.ts +11 -0
- package/types/lodash/_baseSum.d.ts +11 -0
- package/types/lodash/_baseTimes.d.ts +11 -0
- package/types/lodash/_baseToNumber.d.ts +10 -0
- package/types/lodash/_baseToPairs.d.ts +11 -0
- package/types/lodash/_baseToString.d.ts +10 -0
- package/types/lodash/_baseTrim.d.ts +9 -0
- package/types/lodash/_baseUnary.d.ts +9 -0
- package/types/lodash/_baseUniq.d.ts +11 -0
- package/types/lodash/_baseUnset.d.ts +10 -0
- package/types/lodash/_baseUpdate.d.ts +12 -0
- package/types/lodash/_baseValues.d.ts +12 -0
- package/types/lodash/_baseWhile.d.ts +13 -0
- package/types/lodash/_baseWrapperValue.d.ts +12 -0
- package/types/lodash/_baseXor.d.ts +12 -0
- package/types/lodash/_baseZipObject.d.ts +11 -0
- package/types/lodash/_cacheHas.d.ts +10 -0
- package/types/lodash/_castArrayLikeObject.d.ts +9 -0
- package/types/lodash/_castFunction.d.ts +9 -0
- package/types/lodash/_castPath.d.ts +10 -0
- package/types/lodash/_castRest.d.ts +11 -0
- package/types/lodash/_castSlice.d.ts +11 -0
- package/types/lodash/_charsEndIndex.d.ts +11 -0
- package/types/lodash/_charsStartIndex.d.ts +11 -0
- package/types/lodash/_cloneArrayBuffer.d.ts +9 -0
- package/types/lodash/_cloneBuffer.d.ts +10 -0
- package/types/lodash/_cloneDataView.d.ts +10 -0
- package/types/lodash/_cloneMap.d.ts +11 -0
- package/types/lodash/_cloneRegExp.d.ts +9 -0
- package/types/lodash/_cloneSet.d.ts +11 -0
- package/types/lodash/_cloneSymbol.d.ts +9 -0
- package/types/lodash/_cloneTypedArray.d.ts +10 -0
- package/types/lodash/_compareAscending.d.ts +10 -0
- package/types/lodash/_compareMultiple.d.ts +16 -0
- package/types/lodash/_composeArgs.d.ts +13 -0
- package/types/lodash/_composeArgsRight.d.ts +13 -0
- package/types/lodash/_copyArray.d.ts +10 -0
- package/types/lodash/_copyObject.d.ts +12 -0
- package/types/lodash/_copySymbols.d.ts +10 -0
- package/types/lodash/_copySymbolsIn.d.ts +10 -0
- package/types/lodash/_coreJsData.d.ts +3 -0
- package/types/lodash/_countHolders.d.ts +10 -0
- package/types/lodash/_createAggregator.d.ts +10 -0
- package/types/lodash/_createAssigner.d.ts +9 -0
- package/types/lodash/_createBaseEach.d.ts +10 -0
- package/types/lodash/_createBaseFor.d.ts +9 -0
- package/types/lodash/_createBind.d.ts +12 -0
- package/types/lodash/_createCaseFirst.d.ts +9 -0
- package/types/lodash/_createCompounder.d.ts +9 -0
- package/types/lodash/_createCtor.d.ts +10 -0
- package/types/lodash/_createCurry.d.ts +11 -0
- package/types/lodash/_createFind.d.ts +9 -0
- package/types/lodash/_createFlow.d.ts +9 -0
- package/types/lodash/_createHybrid.d.ts +21 -0
- package/types/lodash/_createInverter.d.ts +10 -0
- package/types/lodash/_createMathOperation.d.ts +10 -0
- package/types/lodash/_createOver.d.ts +9 -0
- package/types/lodash/_createPadding.d.ts +11 -0
- package/types/lodash/_createPartial.d.ts +14 -0
- package/types/lodash/_createRange.d.ts +9 -0
- package/types/lodash/_createRecurry.d.ts +19 -0
- package/types/lodash/_createRelationalOperation.d.ts +9 -0
- package/types/lodash/_createRound.d.ts +9 -0
- package/types/lodash/_createSet.d.ts +2 -0
- package/types/lodash/_createToPairs.d.ts +9 -0
- package/types/lodash/_createWrap.d.ts +27 -0
- package/types/lodash/_customDefaultsAssignIn.d.ts +14 -0
- package/types/lodash/_customDefaultsMerge.d.ts +16 -0
- package/types/lodash/_customOmitClone.d.ts +11 -0
- package/types/lodash/_deburrLetter.d.ts +10 -0
- package/types/lodash/_defineProperty.d.ts +2 -0
- package/types/lodash/_equalArrays.d.ts +15 -0
- package/types/lodash/_equalByTag.d.ts +19 -0
- package/types/lodash/_equalObjects.d.ts +15 -0
- package/types/lodash/_escapeHtmlChar.d.ts +9 -0
- package/types/lodash/_escapeStringChar.d.ts +9 -0
- package/types/lodash/_flatRest.d.ts +9 -0
- package/types/lodash/_freeGlobal.d.ts +3 -0
- package/types/lodash/_getAllKeys.d.ts +9 -0
- package/types/lodash/_getAllKeysIn.d.ts +10 -0
- package/types/lodash/_getData.d.ts +2 -0
- package/types/lodash/_getFuncName.d.ts +9 -0
- package/types/lodash/_getHolder.d.ts +9 -0
- package/types/lodash/_getMapData.d.ts +10 -0
- package/types/lodash/_getMatchData.d.ts +9 -0
- package/types/lodash/_getNative.d.ts +10 -0
- package/types/lodash/_getPrototype.d.ts +3 -0
- package/types/lodash/_getRawTag.d.ts +9 -0
- package/types/lodash/_getSymbols.d.ts +2 -0
- package/types/lodash/_getSymbolsIn.d.ts +2 -0
- package/types/lodash/_getTag.d.ts +10 -0
- package/types/lodash/_getValue.d.ts +10 -0
- package/types/lodash/_getView.d.ts +12 -0
- package/types/lodash/_getWrapDetails.d.ts +9 -0
- package/types/lodash/_hasPath.d.ts +11 -0
- package/types/lodash/_hasUnicode.d.ts +9 -0
- package/types/lodash/_hasUnicodeWord.d.ts +9 -0
- package/types/lodash/_hashClear.d.ts +13 -0
- package/types/lodash/_hashDelete.d.ts +12 -0
- package/types/lodash/_hashGet.d.ts +11 -0
- package/types/lodash/_hashHas.d.ts +11 -0
- package/types/lodash/_hashSet.d.ts +12 -0
- package/types/lodash/_initCloneArray.d.ts +9 -0
- package/types/lodash/_initCloneByTag.d.ts +14 -0
- package/types/lodash/_initCloneObject.d.ts +9 -0
- package/types/lodash/_insertWrapDetails.d.ts +10 -0
- package/types/lodash/_isFlattenable.d.ts +9 -0
- package/types/lodash/_isIndex.d.ts +10 -0
- package/types/lodash/_isIterateeCall.d.ts +12 -0
- package/types/lodash/_isKey.d.ts +10 -0
- package/types/lodash/_isKeyable.d.ts +9 -0
- package/types/lodash/_isLaziable.d.ts +10 -0
- package/types/lodash/_isMaskable.d.ts +10 -0
- package/types/lodash/_isMasked.d.ts +9 -0
- package/types/lodash/_isPrototype.d.ts +9 -0
- package/types/lodash/_isStrictComparable.d.ts +10 -0
- package/types/lodash/_iteratorToArray.d.ts +9 -0
- package/types/lodash/_lazyClone.d.ts +10 -0
- package/types/lodash/_lazyReverse.d.ts +10 -0
- package/types/lodash/_lazyValue.d.ts +10 -0
- package/types/lodash/_listCacheClear.d.ts +13 -0
- package/types/lodash/_listCacheDelete.d.ts +11 -0
- package/types/lodash/_listCacheGet.d.ts +11 -0
- package/types/lodash/_listCacheHas.d.ts +11 -0
- package/types/lodash/_listCacheSet.d.ts +12 -0
- package/types/lodash/_mapCacheClear.d.ts +18 -0
- package/types/lodash/_mapCacheDelete.d.ts +11 -0
- package/types/lodash/_mapCacheGet.d.ts +11 -0
- package/types/lodash/_mapCacheHas.d.ts +11 -0
- package/types/lodash/_mapCacheSet.d.ts +12 -0
- package/types/lodash/_mapToArray.d.ts +9 -0
- package/types/lodash/_matchesStrictComparable.d.ts +11 -0
- package/types/lodash/_memoizeCapped.d.ts +10 -0
- package/types/lodash/_mergeData.d.ts +18 -0
- package/types/lodash/_metaMap.d.ts +3 -0
- package/types/lodash/_nativeCreate.d.ts +2 -0
- package/types/lodash/_nativeKeys.d.ts +2 -0
- package/types/lodash/_nativeKeysIn.d.ts +11 -0
- package/types/lodash/_nodeUtil.d.ts +3 -0
- package/types/lodash/_objectToString.d.ts +9 -0
- package/types/lodash/_overArg.d.ts +10 -0
- package/types/lodash/_overRest.d.ts +11 -0
- package/types/lodash/_parent.d.ts +10 -0
- package/types/lodash/_reEscape.d.ts +3 -0
- package/types/lodash/_reEvaluate.d.ts +3 -0
- package/types/lodash/_reInterpolate.d.ts +3 -0
- package/types/lodash/_realNames.d.ts +3 -0
- package/types/lodash/_reorder.d.ts +12 -0
- package/types/lodash/_replaceHolders.d.ts +11 -0
- package/types/lodash/_root.d.ts +3 -0
- package/types/lodash/_safeGet.d.ts +10 -0
- package/types/lodash/_setCacheAdd.d.ts +12 -0
- package/types/lodash/_setCacheHas.d.ts +11 -0
- package/types/lodash/_setData.d.ts +16 -0
- package/types/lodash/_setToArray.d.ts +9 -0
- package/types/lodash/_setToPairs.d.ts +9 -0
- package/types/lodash/_setToString.d.ts +10 -0
- package/types/lodash/_setWrapToString.d.ts +12 -0
- package/types/lodash/_shortOut.d.ts +11 -0
- package/types/lodash/_shuffleSelf.d.ts +10 -0
- package/types/lodash/_stackClear.d.ts +14 -0
- package/types/lodash/_stackDelete.d.ts +24 -0
- package/types/lodash/_stackGet.d.ts +11 -0
- package/types/lodash/_stackHas.d.ts +11 -0
- package/types/lodash/_stackSet.d.ts +28 -0
- package/types/lodash/_strictIndexOf.d.ts +12 -0
- package/types/lodash/_strictLastIndexOf.d.ts +12 -0
- package/types/lodash/_stringSize.d.ts +9 -0
- package/types/lodash/_stringToArray.d.ts +9 -0
- package/types/lodash/_stringToPath.d.ts +9 -0
- package/types/lodash/_toKey.d.ts +9 -0
- package/types/lodash/_toSource.d.ts +9 -0
- package/types/lodash/_trimmedEndIndex.d.ts +10 -0
- package/types/lodash/_unescapeHtmlChar.d.ts +9 -0
- package/types/lodash/_unicodeSize.d.ts +9 -0
- package/types/lodash/_unicodeToArray.d.ts +9 -0
- package/types/lodash/_unicodeWords.d.ts +9 -0
- package/types/lodash/_updateWrapDetails.d.ts +10 -0
- package/types/lodash/_wrapperClone.d.ts +9 -0
- package/types/lodash/add.d.ts +17 -0
- package/types/lodash/after.d.ts +26 -0
- package/types/lodash/array.d.ts +66 -0
- package/types/lodash/array.default.d.ts +133 -0
- package/types/lodash/ary.d.ts +19 -0
- package/types/lodash/assign.d.ts +34 -0
- package/types/lodash/assignIn.d.ts +33 -0
- package/types/lodash/assignInWith.d.ts +31 -0
- package/types/lodash/assignWith.d.ts +30 -0
- package/types/lodash/at.d.ts +19 -0
- package/types/lodash/attempt.d.ts +24 -0
- package/types/lodash/before.d.ts +19 -0
- package/types/lodash/bind.d.ts +37 -0
- package/types/lodash/bindAll.d.ts +28 -0
- package/types/lodash/bindKey.d.ts +47 -0
- package/types/lodash/camelCase.d.ts +22 -0
- package/types/lodash/capitalize.d.ts +17 -0
- package/types/lodash/castArray.d.ts +35 -0
- package/types/lodash/ceil.d.ts +23 -0
- package/types/lodash/chain.d.ts +31 -0
- package/types/lodash/chunk.d.ts +23 -0
- package/types/lodash/clamp.d.ts +21 -0
- package/types/lodash/clone.d.ts +28 -0
- package/types/lodash/cloneDeep.d.ts +20 -0
- package/types/lodash/cloneDeepWith.d.ts +30 -0
- package/types/lodash/cloneWith.d.ts +33 -0
- package/types/lodash/collection.d.ts +29 -0
- package/types/lodash/collection.default.d.ts +59 -0
- package/types/lodash/commit.d.ts +28 -0
- package/types/lodash/compact.d.ts +17 -0
- package/types/lodash/concat.d.ts +24 -0
- package/types/lodash/cond.d.ts +31 -0
- package/types/lodash/conforms.d.ts +26 -0
- package/types/lodash/conformsTo.d.ts +26 -0
- package/types/lodash/constant.d.ts +21 -0
- package/types/lodash/countBy.d.ts +24 -0
- package/types/lodash/create.d.ts +36 -0
- package/types/lodash/curry.d.ts +46 -0
- package/types/lodash/curryRight.d.ts +43 -0
- package/types/lodash/date.d.ts +2 -0
- package/types/lodash/date.default.d.ts +5 -0
- package/types/lodash/debounce.d.ts +60 -0
- package/types/lodash/deburr.d.ts +20 -0
- package/types/lodash/defaultTo.d.ts +22 -0
- package/types/lodash/defaults.d.ts +23 -0
- package/types/lodash/defaultsDeep.d.ts +21 -0
- package/types/lodash/defer.d.ts +20 -0
- package/types/lodash/delay.d.ts +21 -0
- package/types/lodash/difference.d.ts +23 -0
- package/types/lodash/differenceBy.d.ts +28 -0
- package/types/lodash/differenceWith.d.ts +25 -0
- package/types/lodash/divide.d.ts +17 -0
- package/types/lodash/drop.d.ts +27 -0
- package/types/lodash/dropRight.d.ts +27 -0
- package/types/lodash/dropRightWhile.d.ts +37 -0
- package/types/lodash/dropWhile.d.ts +37 -0
- package/types/lodash/each.d.ts +1 -0
- package/types/lodash/eachRight.d.ts +1 -0
- package/types/lodash/endsWith.d.ts +25 -0
- package/types/lodash/entries.d.ts +1 -0
- package/types/lodash/entriesIn.d.ts +1 -0
- package/types/lodash/eq.d.ts +34 -0
- package/types/lodash/escape.d.ts +30 -0
- package/types/lodash/escapeRegExp.d.ts +17 -0
- package/types/lodash/every.d.ts +43 -0
- package/types/lodash/extend.d.ts +1 -0
- package/types/lodash/extendWith.d.ts +1 -0
- package/types/lodash/fill.d.ts +31 -0
- package/types/lodash/filter.d.ts +43 -0
- package/types/lodash/find.d.ts +38 -0
- package/types/lodash/findIndex.d.ts +37 -0
- package/types/lodash/findKey.d.ts +37 -0
- package/types/lodash/findLast.d.ts +21 -0
- package/types/lodash/findLastIndex.d.ts +37 -0
- package/types/lodash/findLastKey.d.ts +37 -0
- package/types/lodash/first.d.ts +1 -0
- package/types/lodash/flatMap.d.ts +23 -0
- package/types/lodash/flatMapDeep.d.ts +22 -0
- package/types/lodash/flatMapDepth.d.ts +23 -0
- package/types/lodash/flatten.d.ts +16 -0
- package/types/lodash/flattenDeep.d.ts +16 -0
- package/types/lodash/flattenDepth.d.ts +22 -0
- package/types/lodash/flip.d.ts +20 -0
- package/types/lodash/floor.d.ts +23 -0
- package/types/lodash/flow.d.ts +24 -0
- package/types/lodash/flowRight.d.ts +23 -0
- package/types/lodash/forEach.d.ts +32 -0
- package/types/lodash/forEachRight.d.ts +22 -0
- package/types/lodash/forIn.d.ts +30 -0
- package/types/lodash/forInRight.d.ts +28 -0
- package/types/lodash/forOwn.d.ts +30 -0
- package/types/lodash/forOwnRight.d.ts +28 -0
- package/types/lodash/fromPairs.d.ts +17 -0
- package/types/lodash/function.d.ts +24 -0
- package/types/lodash/function.default.d.ts +49 -0
- package/types/lodash/functions.d.ts +25 -0
- package/types/lodash/functionsIn.d.ts +25 -0
- package/types/lodash/get.d.ts +27 -0
- package/types/lodash/groupBy.d.ts +25 -0
- package/types/lodash/gt.d.ts +25 -0
- package/types/lodash/gte.d.ts +25 -0
- package/types/lodash/has.d.ts +29 -0
- package/types/lodash/hasIn.d.ts +28 -0
- package/types/lodash/head.d.ts +20 -0
- package/types/lodash/identity.d.ts +18 -0
- package/types/lodash/inRange.d.ts +40 -0
- package/types/lodash/includes.d.ts +32 -0
- package/types/lodash/index.d.ts +3 -0
- package/types/lodash/indexOf.d.ts +25 -0
- package/types/lodash/initial.d.ts +16 -0
- package/types/lodash/intersection.d.ts +19 -0
- package/types/lodash/intersectionBy.d.ts +25 -0
- package/types/lodash/intersectionWith.d.ts +23 -0
- package/types/lodash/invert.d.ts +20 -0
- package/types/lodash/invertBy.d.ts +28 -0
- package/types/lodash/invoke.d.ts +20 -0
- package/types/lodash/invokeMap.d.ts +25 -0
- package/types/lodash/isArguments.d.ts +2 -0
- package/types/lodash/isArray.d.ts +25 -0
- package/types/lodash/isArrayBuffer.d.ts +19 -0
- package/types/lodash/isArrayLike.d.ts +27 -0
- package/types/lodash/isArrayLikeObject.d.ts +27 -0
- package/types/lodash/isBoolean.d.ts +19 -0
- package/types/lodash/isBuffer.d.ts +19 -0
- package/types/lodash/isDate.d.ts +19 -0
- package/types/lodash/isElement.d.ts +19 -0
- package/types/lodash/isEmpty.d.ts +35 -0
- package/types/lodash/isEqual.d.ts +30 -0
- package/types/lodash/isEqualWith.d.ts +34 -0
- package/types/lodash/isError.d.ts +20 -0
- package/types/lodash/isFinite.d.ts +28 -0
- package/types/lodash/isFunction.d.ts +19 -0
- package/types/lodash/isInteger.d.ts +28 -0
- package/types/lodash/isLength.d.ts +28 -0
- package/types/lodash/isMap.d.ts +19 -0
- package/types/lodash/isMatch.d.ts +30 -0
- package/types/lodash/isMatchWith.d.ts +34 -0
- package/types/lodash/isNaN.d.ts +30 -0
- package/types/lodash/isNative.d.ts +28 -0
- package/types/lodash/isNil.d.ts +22 -0
- package/types/lodash/isNull.d.ts +19 -0
- package/types/lodash/isNumber.d.ts +28 -0
- package/types/lodash/isObject.d.ts +27 -0
- package/types/lodash/isObjectLike.d.ts +26 -0
- package/types/lodash/isPlainObject.d.ts +30 -0
- package/types/lodash/isPromise.d.ts +2 -0
- package/types/lodash/isRegExp.d.ts +19 -0
- package/types/lodash/isSafeInteger.d.ts +29 -0
- package/types/lodash/isSet.d.ts +19 -0
- package/types/lodash/isString.d.ts +19 -0
- package/types/lodash/isSymbol.d.ts +19 -0
- package/types/lodash/isTypedArray.d.ts +19 -0
- package/types/lodash/isUndefined.d.ts +19 -0
- package/types/lodash/isWeakMap.d.ts +19 -0
- package/types/lodash/isWeakSet.d.ts +19 -0
- package/types/lodash/iteratee.d.ts +44 -0
- package/types/lodash/join.d.ts +17 -0
- package/types/lodash/kebabCase.d.ts +23 -0
- package/types/lodash/keyBy.d.ts +30 -0
- package/types/lodash/keys.d.ts +30 -0
- package/types/lodash/keysIn.d.ts +25 -0
- package/types/lodash/lang.d.ts +57 -0
- package/types/lodash/lang.default.d.ts +115 -0
- package/types/lodash/last.d.ts +16 -0
- package/types/lodash/lastIndexOf.d.ts +23 -0
- package/types/lodash/lodash.d.ts +317 -0
- package/types/lodash/lodash.default.d.ts +2 -0
- package/types/lodash/lowerCase.d.ts +22 -0
- package/types/lodash/lowerFirst.d.ts +19 -0
- package/types/lodash/lt.d.ts +25 -0
- package/types/lodash/lte.d.ts +25 -0
- package/types/lodash/map.d.ts +44 -0
- package/types/lodash/mapKeys.d.ts +23 -0
- package/types/lodash/mapValues.d.ts +30 -0
- package/types/lodash/matches.d.ts +37 -0
- package/types/lodash/matchesProperty.d.ts +35 -0
- package/types/lodash/math.d.ts +16 -0
- package/types/lodash/math.default.d.ts +33 -0
- package/types/lodash/max.d.ts +20 -0
- package/types/lodash/maxBy.d.ts +25 -0
- package/types/lodash/mean.d.ts +16 -0
- package/types/lodash/meanBy.d.ts +25 -0
- package/types/lodash/memoize.d.ts +50 -0
- package/types/lodash/merge.d.ts +33 -0
- package/types/lodash/mergeWith.d.ts +33 -0
- package/types/lodash/method.d.ts +26 -0
- package/types/lodash/methodOf.d.ts +25 -0
- package/types/lodash/min.d.ts +20 -0
- package/types/lodash/minBy.d.ts +25 -0
- package/types/lodash/mixin.d.ts +40 -0
- package/types/lodash/multiply.d.ts +17 -0
- package/types/lodash/negate.d.ts +22 -0
- package/types/lodash/next.d.ts +27 -0
- package/types/lodash/noop.d.ts +14 -0
- package/types/lodash/now.d.ts +18 -0
- package/types/lodash/nth.d.ts +23 -0
- package/types/lodash/nthArg.d.ts +22 -0
- package/types/lodash/number.d.ts +4 -0
- package/types/lodash/number.default.d.ts +9 -0
- package/types/lodash/object.d.ts +48 -0
- package/types/lodash/object.default.d.ts +97 -0
- package/types/lodash/omit.d.ts +22 -0
- package/types/lodash/omitBy.d.ts +22 -0
- package/types/lodash/once.d.ts +20 -0
- package/types/lodash/orderBy.d.ts +31 -0
- package/types/lodash/over.d.ts +20 -0
- package/types/lodash/overArgs.d.ts +33 -0
- package/types/lodash/overEvery.d.ts +30 -0
- package/types/lodash/overSome.d.ts +33 -0
- package/types/lodash/pad.d.ts +25 -0
- package/types/lodash/padEnd.d.ts +25 -0
- package/types/lodash/padStart.d.ts +25 -0
- package/types/lodash/parseInt.d.ts +26 -0
- package/types/lodash/partial.d.ts +35 -0
- package/types/lodash/partialRight.d.ts +34 -0
- package/types/lodash/partition.d.ts +38 -0
- package/types/lodash/pick.d.ts +19 -0
- package/types/lodash/pickBy.d.ts +20 -0
- package/types/lodash/plant.d.ts +26 -0
- package/types/lodash/property.d.ts +24 -0
- package/types/lodash/propertyOf.d.ts +23 -0
- package/types/lodash/pull.d.ts +25 -0
- package/types/lodash/pullAll.d.ts +22 -0
- package/types/lodash/pullAllBy.d.ts +25 -0
- package/types/lodash/pullAllWith.d.ts +25 -0
- package/types/lodash/pullAt.d.ts +26 -0
- package/types/lodash/random.d.ts +33 -0
- package/types/lodash/range.d.ts +43 -0
- package/types/lodash/rangeRight.d.ts +38 -0
- package/types/lodash/rearg.d.ts +24 -0
- package/types/lodash/reduce.d.ts +39 -0
- package/types/lodash/reduceRight.d.ts +24 -0
- package/types/lodash/reject.d.ts +36 -0
- package/types/lodash/remove.d.ts +30 -0
- package/types/lodash/repeat.d.ts +24 -0
- package/types/lodash/replace.d.ts +21 -0
- package/types/lodash/rest.d.ts +27 -0
- package/types/lodash/result.d.ts +31 -0
- package/types/lodash/reverse.d.ts +25 -0
- package/types/lodash/round.d.ts +23 -0
- package/types/lodash/sample.d.ts +16 -0
- package/types/lodash/sampleSize.d.ts +22 -0
- package/types/lodash/seq.d.ts +15 -0
- package/types/lodash/seq.default.d.ts +31 -0
- package/types/lodash/set.d.ts +30 -0
- package/types/lodash/setWith.d.ts +26 -0
- package/types/lodash/shuffle.d.ts +17 -0
- package/types/lodash/size.d.ts +23 -0
- package/types/lodash/slice.d.ts +18 -0
- package/types/lodash/snakeCase.d.ts +23 -0
- package/types/lodash/some.d.ts +38 -0
- package/types/lodash/sortBy.d.ts +31 -0
- package/types/lodash/sortedIndex.d.ts +19 -0
- package/types/lodash/sortedIndexBy.d.ts +27 -0
- package/types/lodash/sortedIndexOf.d.ts +18 -0
- package/types/lodash/sortedLastIndex.d.ts +20 -0
- package/types/lodash/sortedLastIndexBy.d.ts +27 -0
- package/types/lodash/sortedLastIndexOf.d.ts +18 -0
- package/types/lodash/sortedUniq.d.ts +17 -0
- package/types/lodash/sortedUniqBy.d.ts +18 -0
- package/types/lodash/split.d.ts +21 -0
- package/types/lodash/spread.d.ts +36 -0
- package/types/lodash/startCase.d.ts +23 -0
- package/types/lodash/startsWith.d.ts +25 -0
- package/types/lodash/string.d.ts +32 -0
- package/types/lodash/string.default.d.ts +65 -0
- package/types/lodash/stubArray.d.ts +20 -0
- package/types/lodash/stubFalse.d.ts +15 -0
- package/types/lodash/stubObject.d.ts +20 -0
- package/types/lodash/stubString.d.ts +15 -0
- package/types/lodash/stubTrue.d.ts +15 -0
- package/types/lodash/subtract.d.ts +17 -0
- package/types/lodash/sum.d.ts +16 -0
- package/types/lodash/sumBy.d.ts +25 -0
- package/types/lodash/tail.d.ts +16 -0
- package/types/lodash/take.d.ts +27 -0
- package/types/lodash/takeRight.d.ts +27 -0
- package/types/lodash/takeRightWhile.d.ts +37 -0
- package/types/lodash/takeWhile.d.ts +37 -0
- package/types/lodash/tap.d.ts +25 -0
- package/types/lodash/template.d.ts +113 -0
- package/types/lodash/templateSettings.d.ts +11 -0
- package/types/lodash/throttle.d.ts +49 -0
- package/types/lodash/thru.d.ts +25 -0
- package/types/lodash/times.d.ts +21 -0
- package/types/lodash/toArray.d.ts +25 -0
- package/types/lodash/toFinite.d.ts +25 -0
- package/types/lodash/toInteger.d.ts +28 -0
- package/types/lodash/toIterator.d.ts +20 -0
- package/types/lodash/toJSON.d.ts +1 -0
- package/types/lodash/toLength.d.ts +29 -0
- package/types/lodash/toLower.d.ts +23 -0
- package/types/lodash/toNumber.d.ts +25 -0
- package/types/lodash/toPairs.d.ts +26 -0
- package/types/lodash/toPairsIn.d.ts +26 -0
- package/types/lodash/toPath.d.ts +19 -0
- package/types/lodash/toPlainObject.d.ts +26 -0
- package/types/lodash/toSafeInteger.d.ts +26 -0
- package/types/lodash/toString.d.ts +23 -0
- package/types/lodash/toUpper.d.ts +23 -0
- package/types/lodash/transform.d.ts +32 -0
- package/types/lodash/trim.d.ts +24 -0
- package/types/lodash/trimEnd.d.ts +21 -0
- package/types/lodash/trimStart.d.ts +21 -0
- package/types/lodash/truncate.d.ts +43 -0
- package/types/lodash/unary.d.ts +17 -0
- package/types/lodash/unescape.d.ts +21 -0
- package/types/lodash/union.d.ts +18 -0
- package/types/lodash/unionBy.d.ts +25 -0
- package/types/lodash/unionWith.d.ts +23 -0
- package/types/lodash/uniq.d.ts +20 -0
- package/types/lodash/uniqBy.d.ts +25 -0
- package/types/lodash/uniqWith.d.ts +22 -0
- package/types/lodash/uniqueId.d.ts +19 -0
- package/types/lodash/unset.d.ts +29 -0
- package/types/lodash/unzip.d.ts +21 -0
- package/types/lodash/unzipWith.d.ts +23 -0
- package/types/lodash/update.d.ts +29 -0
- package/types/lodash/updateWith.d.ts +26 -0
- package/types/lodash/upperCase.d.ts +22 -0
- package/types/lodash/upperFirst.d.ts +19 -0
- package/types/lodash/util.d.ts +33 -0
- package/types/lodash/util.default.d.ts +67 -0
- package/types/lodash/value.d.ts +1 -0
- package/types/lodash/valueOf.d.ts +1 -0
- package/types/lodash/values.d.ts +28 -0
- package/types/lodash/valuesIn.d.ts +26 -0
- package/types/lodash/without.d.ts +22 -0
- package/types/lodash/words.d.ts +21 -0
- package/types/lodash/wrap.d.ts +24 -0
- package/types/lodash/wrapperAt.d.ts +18 -0
- package/types/lodash/wrapperChain.d.ts +29 -0
- package/types/lodash/wrapperLodash.d.ts +239 -0
- package/types/lodash/wrapperReverse.d.ts +22 -0
- package/types/lodash/wrapperValue.d.ts +16 -0
- package/types/lodash/xor.d.ts +20 -0
- package/types/lodash/xorBy.d.ts +25 -0
- package/types/lodash/xorWith.d.ts +23 -0
- package/types/lodash/zip.d.ts +18 -0
- package/types/lodash/zipObject.d.ts +18 -0
- package/types/lodash/zipObjectDeep.d.ts +17 -0
- package/types/lodash/zipWith.d.ts +22 -0
- package/types/random/index.d.ts +4 -4
- package/types/screenfull/index.d.ts +1 -7
- package/types/sleep/index.d.ts +2 -0
- package/types/snapdom/src/api/preCache.d.ts +26 -3
- package/types/snapdom/src/api/snapdom.d.ts +86 -21
- package/types/snapdom/src/core/cache.d.ts +27 -12
- package/types/snapdom/src/core/capture.d.ts +18 -2
- package/types/snapdom/src/core/clone.d.ts +1 -10
- package/types/snapdom/src/core/context.d.ts +67 -0
- package/types/snapdom/src/core/prepare.d.ts +1 -2
- package/types/snapdom/src/exporters/download.d.ts +16 -0
- package/types/snapdom/src/exporters/toBlob.d.ts +14 -0
- package/types/snapdom/src/exporters/toCanvas.d.ts +14 -0
- package/types/snapdom/src/exporters/toImg.d.ts +11 -0
- package/types/snapdom/src/modules/CSSVar.d.ts +9 -0
- package/types/snapdom/src/modules/background.d.ts +6 -1
- package/types/snapdom/src/modules/changeCSS.d.ts +14 -0
- package/types/snapdom/src/modules/counter.d.ts +72 -0
- package/types/snapdom/src/modules/fonts.d.ts +67 -11
- package/types/snapdom/src/modules/images.d.ts +10 -4
- package/types/snapdom/src/modules/lineClamp.d.ts +13 -0
- package/types/snapdom/src/modules/pseudo.d.ts +4 -4
- package/types/snapdom/src/modules/rasterize.d.ts +16 -0
- package/types/snapdom/src/modules/snapFetch.d.ts +93 -0
- package/types/snapdom/src/modules/styles.d.ts +2 -1
- package/types/snapdom/src/utils/browser.d.ts +12 -0
- package/types/snapdom/src/utils/css.d.ts +68 -0
- package/types/snapdom/src/utils/helpers.d.ts +0 -61
- package/types/snapdom/src/utils/image.d.ts +21 -0
- package/types/snapdom/src/utils/index.d.ts +4 -0
- package/types/tinycolor/src/public_api.d.ts +1 -1
- package/types/tree/index.d.ts +6 -6
- package/ui-color/compareColorByRange.js +1 -0
- package/ui-color/index.js +1 -0
- package/uiColor.js +1 -0
- package/url-toolkit/index.js +1 -0
- package/url-toolkit/src/url-toolkit.js +1 -0
- package/urlToolkit.js +1 -0
- package/version/index.js +1 -0
- package/version.js +1 -0
- package/filesize/index.js +0 -8
- package/filesize/src/constants.js +0 -71
- package/filesize/src/filesize.js +0 -87
- package/filesize.js +0 -8
- package/snapdom/src/utils/cssTools.js +0 -118
- package/turbo-stream/index.js +0 -6
- package/turbo-stream/src/decode.js +0 -284
- package/turbo-stream/src/encode.js +0 -357
- package/turbo-stream/src/shared.js +0 -267
- package/turboStream.js +0 -6
- package/types/filesize/index.d.ts +0 -2
- package/types/snapdom/src/utils/cssTools.d.ts +0 -29
- package/types/turbo-stream/index.d.ts +0 -1
- package/types/turbo-stream/src/decode.d.ts +0 -7
- package/types/turbo-stream/src/encode.d.ts +0 -27
- package/types/turbo-stream/src/shared.d.ts +0 -107
- package/types/turbo-stream/src/turbo-stream.d.ts +0 -4
- /package/types/tinycolor/src/{util.d.ts → utils.d.ts} +0 -0
|
@@ -1,211 +1,672 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
/* 2025-10-28 09:57:10 */
|
|
2
|
+
import { cache as g } from "../core/cache.js";
|
|
3
|
+
import { extractURL as X } from "../utils/helpers.js";
|
|
4
|
+
import { isIconFont as x } from "./iconFonts.js";
|
|
5
|
+
import { snapFetch as A } from "./snapFetch.js";
|
|
6
|
+
async function lt(o, e, r, a = 32, n = "#000") {
|
|
7
|
+
e = e.replace(/^['"]+|['"]+$/g, "");
|
|
8
|
+
const c = window.devicePixelRatio || 1;
|
|
9
|
+
try {
|
|
10
|
+
await document.fonts.ready;
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
13
|
+
const t = document.createElement("span");
|
|
14
|
+
t.textContent = o, t.style.position = "absolute", t.style.visibility = "hidden", t.style.fontFamily = `"${e}"`, t.style.fontWeight = r || "normal", t.style.fontSize = `${a}px`, t.style.lineHeight = "1", t.style.whiteSpace = "nowrap", t.style.padding = "0", t.style.margin = "0", document.body.appendChild(t);
|
|
15
|
+
const f = t.getBoundingClientRect(), s = Math.ceil(f.width), u = Math.ceil(f.height);
|
|
16
|
+
document.body.removeChild(t);
|
|
17
|
+
const m = document.createElement("canvas");
|
|
18
|
+
m.width = Math.max(1, s * c), m.height = Math.max(1, u * c);
|
|
19
|
+
const d = m.getContext("2d");
|
|
20
|
+
return d.scale(c, c), d.font = r ? `${r} ${a}px "${e}"` : `${a}px "${e}"`, d.textAlign = "left", d.textBaseline = "top", d.fillStyle = n, d.fillText(o, 0, 0), {
|
|
21
|
+
dataUrl: m.toDataURL(),
|
|
22
|
+
width: s,
|
|
23
|
+
height: u
|
|
19
24
|
};
|
|
20
25
|
}
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
const G = /* @__PURE__ */ new Set([
|
|
27
|
+
"serif",
|
|
28
|
+
"sans-serif",
|
|
29
|
+
"monospace",
|
|
30
|
+
"cursive",
|
|
31
|
+
"fantasy",
|
|
32
|
+
"system-ui",
|
|
33
|
+
"emoji",
|
|
34
|
+
"math",
|
|
35
|
+
"fangsong",
|
|
36
|
+
"ui-serif",
|
|
37
|
+
"ui-sans-serif",
|
|
38
|
+
"ui-monospace",
|
|
39
|
+
"ui-rounded"
|
|
40
|
+
]);
|
|
41
|
+
function T(o) {
|
|
42
|
+
if (!o) return "";
|
|
43
|
+
for (let e of o.split(",")) {
|
|
44
|
+
let r = e.trim().replace(/^['"]+|['"]+$/g, "");
|
|
45
|
+
if (r && !G.has(r.toLowerCase()))
|
|
46
|
+
return r;
|
|
47
|
+
}
|
|
48
|
+
return "";
|
|
49
|
+
}
|
|
50
|
+
function N(o) {
|
|
51
|
+
const e = String(o ?? "400").trim().toLowerCase();
|
|
52
|
+
if (e === "normal") return 400;
|
|
53
|
+
if (e === "bold") return 700;
|
|
54
|
+
const r = parseInt(e, 10);
|
|
55
|
+
return Number.isFinite(r) ? Math.min(900, Math.max(100, r)) : 400;
|
|
56
|
+
}
|
|
57
|
+
function W(o) {
|
|
58
|
+
const e = String(o ?? "normal").trim().toLowerCase();
|
|
59
|
+
return e.startsWith("italic") ? "italic" : e.startsWith("oblique") ? "oblique" : "normal";
|
|
60
|
+
}
|
|
61
|
+
function Y(o) {
|
|
62
|
+
const e = String(o ?? "100%").match(/(\d+(?:\.\d+)?)\s*%/);
|
|
63
|
+
return e ? Math.max(50, Math.min(200, parseFloat(e[1]))) : 100;
|
|
64
|
+
}
|
|
65
|
+
function J(o) {
|
|
66
|
+
const e = String(o || "400").trim(), r = e.match(/^(\d{2,3})\s+(\d{2,3})$/);
|
|
67
|
+
if (r) {
|
|
68
|
+
const n = N(r[1]), c = N(r[2]);
|
|
69
|
+
return { min: Math.min(n, c), max: Math.max(n, c) };
|
|
70
|
+
}
|
|
71
|
+
const a = N(e);
|
|
72
|
+
return { min: a, max: a };
|
|
73
|
+
}
|
|
74
|
+
function K(o) {
|
|
75
|
+
const e = String(o || "normal").trim().toLowerCase();
|
|
76
|
+
return e === "italic" ? { kind: "italic" } : e.startsWith("oblique") ? { kind: "oblique" } : { kind: "normal" };
|
|
77
|
+
}
|
|
78
|
+
function Q(o) {
|
|
79
|
+
const e = String(o || "100%").trim(), r = e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);
|
|
80
|
+
if (r) {
|
|
81
|
+
const c = parseFloat(r[1]), t = parseFloat(r[2]);
|
|
82
|
+
return { min: Math.min(c, t), max: Math.max(c, t) };
|
|
83
|
+
}
|
|
84
|
+
const a = e.match(/(\d+(?:\.\d+)?)\s*%/), n = a ? parseFloat(a[1]) : 100;
|
|
85
|
+
return { min: n, max: n };
|
|
86
|
+
}
|
|
87
|
+
function Z(o, e) {
|
|
88
|
+
if (!o) return !1;
|
|
89
|
+
try {
|
|
90
|
+
const r = new URL(o, location.href);
|
|
91
|
+
if (r.origin === location.origin) return !0;
|
|
92
|
+
const n = r.host.toLowerCase();
|
|
93
|
+
if ([
|
|
94
|
+
"fonts.googleapis.com",
|
|
95
|
+
"fonts.gstatic.com",
|
|
96
|
+
"use.typekit.net",
|
|
97
|
+
"p.typekit.net",
|
|
98
|
+
"kit.fontawesome.com",
|
|
99
|
+
"use.fontawesome.com"
|
|
100
|
+
].some((f) => n.endsWith(f))) return !0;
|
|
101
|
+
const t = (r.pathname + r.search).toLowerCase();
|
|
102
|
+
if (/\bfont(s)?\b/.test(t) || /\.woff2?(\b|$)/.test(t)) return !0;
|
|
103
|
+
for (const f of e) {
|
|
104
|
+
const s = f.toLowerCase().replace(/\s+/g, "+"), u = f.toLowerCase().replace(/\s+/g, "-");
|
|
105
|
+
if (t.includes(s) || t.includes(u)) return !0;
|
|
106
|
+
}
|
|
107
|
+
return !1;
|
|
108
|
+
} catch {
|
|
109
|
+
return !1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function tt(o) {
|
|
113
|
+
const e = /* @__PURE__ */ new Set();
|
|
114
|
+
for (const r of o || []) {
|
|
115
|
+
const a = String(r).split("__")[0]?.trim();
|
|
116
|
+
a && e.add(a);
|
|
117
|
+
}
|
|
118
|
+
return e;
|
|
23
119
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
120
|
+
function q(o, e) {
|
|
121
|
+
return o && o.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g, (r, a, n) => {
|
|
122
|
+
const c = (n || "").trim();
|
|
123
|
+
if (!c || /^data:|^blob:|^https?:|^file:|^about:/i.test(c)) return r;
|
|
124
|
+
let t = c;
|
|
125
|
+
try {
|
|
126
|
+
t = new URL(c, e || location.href).href;
|
|
127
|
+
} catch {
|
|
128
|
+
}
|
|
129
|
+
return `url("${t}")`;
|
|
29
130
|
});
|
|
30
131
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
132
|
+
const v = /@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g, I = 4;
|
|
133
|
+
async function et(o, e, r) {
|
|
134
|
+
if (!o) return o;
|
|
135
|
+
const a = /* @__PURE__ */ new Set();
|
|
136
|
+
function n(f, s) {
|
|
137
|
+
try {
|
|
138
|
+
return new URL(f, s || location.href).href;
|
|
139
|
+
} catch {
|
|
140
|
+
return f;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async function c(f, s, u = 0) {
|
|
144
|
+
if (u > I)
|
|
145
|
+
return console.warn(
|
|
146
|
+
`[snapDOM] @import depth exceeded (${I}) at ${s}`
|
|
147
|
+
), f;
|
|
148
|
+
let m = "", d = 0, p;
|
|
149
|
+
for (; p = v.exec(f); ) {
|
|
150
|
+
m += f.slice(d, p.index), d = v.lastIndex;
|
|
151
|
+
const L = (p[2] || p[4] || "").trim(), C = n(L, s);
|
|
152
|
+
if (a.has(C)) {
|
|
153
|
+
console.warn(`[snapDOM] Skipping circular @import: ${C}`);
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
a.add(C);
|
|
157
|
+
let i = "";
|
|
158
|
+
try {
|
|
159
|
+
const l = await A(C, {
|
|
160
|
+
as: "text",
|
|
161
|
+
useProxy: r,
|
|
162
|
+
silent: !0
|
|
163
|
+
});
|
|
164
|
+
l.ok && typeof l.data == "string" && (i = l.data);
|
|
165
|
+
} catch {
|
|
166
|
+
}
|
|
167
|
+
i ? (i = q(i, C), i = await c(i, C, u + 1), m += `
|
|
168
|
+
/* inlined: ${C} */
|
|
169
|
+
${i}
|
|
170
|
+
`) : m += p[0];
|
|
40
171
|
}
|
|
41
|
-
return
|
|
172
|
+
return m += f.slice(d), m;
|
|
42
173
|
}
|
|
43
|
-
|
|
174
|
+
let t = q(o, e || location.href);
|
|
175
|
+
return t = await c(t, e || location.href, 0), t;
|
|
176
|
+
}
|
|
177
|
+
const j = /url\((["']?)([^"')]+)\1\)/g, nt = /@font-face[^{}]*\{[^}]*\}/g;
|
|
178
|
+
function B(o) {
|
|
179
|
+
if (!o) return [];
|
|
180
|
+
const e = [], r = o.split(",").map((a) => a.trim()).filter(Boolean);
|
|
181
|
+
for (const a of r) {
|
|
182
|
+
const n = a.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);
|
|
183
|
+
if (!n) continue;
|
|
184
|
+
const c = n[1], t = n[2], f = (s) => {
|
|
185
|
+
if (!s.includes("?")) return parseInt(s, 16);
|
|
186
|
+
const u = parseInt(s.replace(/\?/g, "0"), 16), m = parseInt(s.replace(/\?/g, "F"), 16);
|
|
187
|
+
return [u, m];
|
|
188
|
+
};
|
|
189
|
+
if (t) {
|
|
190
|
+
const s = f(c), u = f(t), m = Array.isArray(s) ? s[0] : s, d = Array.isArray(u) ? u[1] : u;
|
|
191
|
+
e.push([Math.min(m, d), Math.max(m, d)]);
|
|
192
|
+
} else {
|
|
193
|
+
const s = f(c);
|
|
194
|
+
Array.isArray(s) ? e.push([s[0], s[1]]) : e.push([s, s]);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return e;
|
|
198
|
+
}
|
|
199
|
+
function V(o, e) {
|
|
200
|
+
if (!e.length || !o || o.size === 0) return !0;
|
|
201
|
+
for (const r of o)
|
|
202
|
+
for (const [a, n] of e) if (r >= a && r <= n) return !0;
|
|
203
|
+
return !1;
|
|
204
|
+
}
|
|
205
|
+
function P(o, e) {
|
|
206
|
+
const r = [];
|
|
207
|
+
if (!o) return r;
|
|
208
|
+
for (const a of o.matchAll(j)) {
|
|
209
|
+
let n = (a[2] || "").trim();
|
|
210
|
+
if (!(!n || n.startsWith("data:"))) {
|
|
211
|
+
if (!/^https?:/i.test(n))
|
|
212
|
+
try {
|
|
213
|
+
n = new URL(n, e || location.href).href;
|
|
214
|
+
} catch {
|
|
215
|
+
}
|
|
216
|
+
r.push(n);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return r;
|
|
220
|
+
}
|
|
221
|
+
async function z(o, e, r = "") {
|
|
222
|
+
let a = o;
|
|
223
|
+
for (const n of o.matchAll(j)) {
|
|
224
|
+
const c = X(n[0]);
|
|
225
|
+
if (!c) continue;
|
|
226
|
+
let t = c;
|
|
227
|
+
if (!t.startsWith("http") && !t.startsWith("data:"))
|
|
228
|
+
try {
|
|
229
|
+
t = new URL(t, e || location.href).href;
|
|
230
|
+
} catch {
|
|
231
|
+
}
|
|
232
|
+
if (!x(t)) {
|
|
233
|
+
if (g.resource?.has(t)) {
|
|
234
|
+
g.font?.add(t), a = a.replace(n[0], `url(${g.resource.get(t)})`);
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
if (!g.font?.has(t))
|
|
238
|
+
try {
|
|
239
|
+
const f = await A(t, { as: "dataURL", useProxy: r, silent: !0 });
|
|
240
|
+
if (f.ok && typeof f.data == "string") {
|
|
241
|
+
const s = f.data;
|
|
242
|
+
g.resource?.set(t, s), g.font?.add(t), a = a.replace(n[0], `url(${s})`);
|
|
243
|
+
}
|
|
244
|
+
} catch {
|
|
245
|
+
console.warn("[snapDOM] Failed to fetch font resource:", t);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return a;
|
|
250
|
+
}
|
|
251
|
+
function ot(o) {
|
|
252
|
+
if (!o.length) return null;
|
|
253
|
+
const e = (f, s) => o.some(([u, m]) => !(m < f || u > s)), r = e(0, 255) || e(305, 305), a = e(256, 591) || e(7680, 7935), n = e(880, 1023), c = e(1024, 1279);
|
|
254
|
+
return e(7840, 7929) || e(258, 259) || e(416, 417) || e(431, 432) ? "vietnamese" : c ? "cyrillic" : n ? "greek" : a ? "latin-ext" : r ? "latin" : null;
|
|
255
|
+
}
|
|
256
|
+
function D(o = {}) {
|
|
257
|
+
const e = new Set(
|
|
258
|
+
(o.families || []).map((n) => String(n).toLowerCase())
|
|
259
|
+
), r = new Set(
|
|
260
|
+
(o.domains || []).map((n) => String(n).toLowerCase())
|
|
261
|
+
), a = new Set(
|
|
262
|
+
(o.subsets || []).map((n) => String(n).toLowerCase())
|
|
263
|
+
);
|
|
264
|
+
return (n, c) => {
|
|
265
|
+
if (e.size && e.has(n.family.toLowerCase())) return !0;
|
|
266
|
+
if (r.size)
|
|
267
|
+
for (const t of n.srcUrls)
|
|
268
|
+
try {
|
|
269
|
+
if (r.has(new URL(t).host.toLowerCase())) return !0;
|
|
270
|
+
} catch {
|
|
271
|
+
}
|
|
272
|
+
if (a.size) {
|
|
273
|
+
const t = ot(c);
|
|
274
|
+
if (t && a.has(t)) return !0;
|
|
275
|
+
}
|
|
276
|
+
return !1;
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function rt(o) {
|
|
280
|
+
if (!o) return o;
|
|
281
|
+
const e = /@font-face[^{}]*\{[^}]*\}/gi, r = /* @__PURE__ */ new Set(), a = [];
|
|
282
|
+
for (const c of o.match(e) || []) {
|
|
283
|
+
const t = c.match(/font-family:\s*([^;]+);/i)?.[1] || "", f = T(t), s = (c.match(/font-weight:\s*([^;]+);/i)?.[1] || "400").trim(), u = (c.match(/font-style:\s*([^;]+);/i)?.[1] || "normal").trim(), m = (c.match(/font-stretch:\s*([^;]+);/i)?.[1] || "100%").trim(), d = (c.match(/unicode-range:\s*([^;]+);/i)?.[1] || "").trim(), p = (c.match(/src\s*:\s*([^;]+);/i)?.[1] || "").trim(), L = P(p, location.href), C = L.length ? L.map((l) => String(l).toLowerCase()).sort().join("|") : p.toLowerCase(), i = [
|
|
284
|
+
String(f || "").toLowerCase(),
|
|
285
|
+
s,
|
|
286
|
+
u,
|
|
287
|
+
m,
|
|
288
|
+
d.toLowerCase(),
|
|
289
|
+
C
|
|
290
|
+
].join("|");
|
|
291
|
+
r.has(i) || (r.add(i), a.push(c));
|
|
292
|
+
}
|
|
293
|
+
if (a.length === 0) return o;
|
|
294
|
+
let n = 0;
|
|
295
|
+
return o.replace(e, () => a[n++] || "");
|
|
296
|
+
}
|
|
297
|
+
function st(o, e, r, a) {
|
|
298
|
+
const n = Array.from(o || []).sort().join("|"), c = e ? JSON.stringify({
|
|
299
|
+
families: (e.families || []).map((s) => String(s).toLowerCase()).sort(),
|
|
300
|
+
domains: (e.domains || []).map((s) => String(s).toLowerCase()).sort(),
|
|
301
|
+
subsets: (e.subsets || []).map((s) => String(s).toLowerCase()).sort()
|
|
302
|
+
}) : "", t = (r || []).map(
|
|
303
|
+
(s) => `${(s.family || "").toLowerCase()}::${s.weight || "normal"}::${s.style || "normal"}::${s.src || ""}`
|
|
304
|
+
).sort().join("|");
|
|
305
|
+
return `fonts-embed-css::req=${n}::ex=${c}::lf=${t}::px=${a || ""}`;
|
|
306
|
+
}
|
|
307
|
+
async function H(o, e, r, a) {
|
|
308
|
+
let n;
|
|
44
309
|
try {
|
|
45
|
-
|
|
46
|
-
t.status === "loaded" && y.add(
|
|
47
|
-
`${t.family}__${t.weight || "normal"}__${t.style || "normal"}`
|
|
48
|
-
);
|
|
310
|
+
n = o.cssRules || [];
|
|
49
311
|
} catch {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const c = (t, f) => {
|
|
315
|
+
try {
|
|
316
|
+
return new URL(t, f || location.href).href;
|
|
317
|
+
} catch {
|
|
318
|
+
return t;
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
for (const t of n) {
|
|
322
|
+
if (t.type === CSSRule.IMPORT_RULE && t.styleSheet) {
|
|
323
|
+
const f = t.href ? c(t.href, e) : e;
|
|
324
|
+
if (a.depth >= I) {
|
|
325
|
+
console.warn(
|
|
326
|
+
`[snapDOM] CSSOM import depth exceeded (${I}) at ${f}`
|
|
327
|
+
);
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
if (f && a.visitedSheets.has(f)) {
|
|
331
|
+
console.warn(`[snapDOM] Skipping circular CSSOM import: ${f}`);
|
|
332
|
+
continue;
|
|
333
|
+
}
|
|
334
|
+
f && a.visitedSheets.add(f);
|
|
335
|
+
const s = { ...a, depth: (a.depth || 0) + 1 };
|
|
336
|
+
await H(
|
|
337
|
+
t.styleSheet,
|
|
338
|
+
f,
|
|
339
|
+
r,
|
|
340
|
+
s
|
|
341
|
+
);
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if (t.type === CSSRule.FONT_FACE_RULE) {
|
|
345
|
+
const f = (t.style.getPropertyValue("font-family") || "").trim(), s = T(f);
|
|
346
|
+
if (!s || x(s)) continue;
|
|
347
|
+
const u = (t.style.getPropertyValue("font-weight") || "400").trim(), m = (t.style.getPropertyValue("font-style") || "normal").trim(), d = (t.style.getPropertyValue("font-stretch") || "100%").trim(), p = (t.style.getPropertyValue("src") || "").trim(), L = (t.style.getPropertyValue("unicode-range") || "").trim();
|
|
348
|
+
if (!a.faceMatchesRequired(s, m, u, d))
|
|
349
|
+
continue;
|
|
350
|
+
const C = B(L);
|
|
351
|
+
if (!V(a.usedCodepoints, C)) continue;
|
|
352
|
+
const i = {
|
|
353
|
+
family: s,
|
|
354
|
+
weightSpec: u,
|
|
355
|
+
styleSpec: m,
|
|
356
|
+
stretchSpec: d,
|
|
357
|
+
unicodeRange: L,
|
|
358
|
+
srcRaw: p,
|
|
359
|
+
srcUrls: P(p, e || location.href),
|
|
360
|
+
href: e || location.href
|
|
361
|
+
};
|
|
362
|
+
if (a.simpleExcluder && a.simpleExcluder(i, C)) continue;
|
|
363
|
+
if (/url\(/i.test(p)) {
|
|
364
|
+
const l = await z(
|
|
365
|
+
p,
|
|
366
|
+
e || location.href,
|
|
367
|
+
a.useProxy
|
|
368
|
+
);
|
|
369
|
+
await r(
|
|
370
|
+
`@font-face{font-family:${s};src:${l};font-style:${m};font-weight:${u};font-stretch:${d};${L ? `unicode-range:${L};` : ""}}`
|
|
371
|
+
);
|
|
372
|
+
} else
|
|
373
|
+
await r(
|
|
374
|
+
`@font-face{font-family:${s};src:${p};font-style:${m};font-weight:${u};font-stretch:${d};${L ? `unicode-range:${L};` : ""}}`
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
async function ut({
|
|
380
|
+
required: o,
|
|
381
|
+
usedCodepoints: e,
|
|
382
|
+
exclude: r = void 0,
|
|
383
|
+
localFonts: a = [],
|
|
384
|
+
useProxy: n = ""
|
|
385
|
+
} = {}) {
|
|
386
|
+
o instanceof Set || (o = /* @__PURE__ */ new Set()), e instanceof Set || (e = /* @__PURE__ */ new Set());
|
|
387
|
+
const c = /* @__PURE__ */ new Map();
|
|
388
|
+
for (const i of o) {
|
|
389
|
+
const [l, h, w, S] = String(i).split("__");
|
|
390
|
+
if (!l) continue;
|
|
391
|
+
const y = c.get(l) || [];
|
|
392
|
+
y.push({ w: parseInt(h, 10), s: w, st: parseInt(S, 10) }), c.set(l, y);
|
|
393
|
+
}
|
|
394
|
+
function t(i, l, h, w) {
|
|
395
|
+
if (!c.has(i)) return !1;
|
|
396
|
+
const S = c.get(i), y = J(h), R = K(l), b = Q(w), F = y.min !== y.max, M = y.min, E = ($) => R.kind === "normal" && $ === "normal" || R.kind !== "normal" && ($ === "italic" || $ === "oblique");
|
|
397
|
+
let k = !1;
|
|
398
|
+
for (const $ of S) {
|
|
399
|
+
const _ = F ? $.w >= y.min && $.w <= y.max : $.w === M, O = E(W($.s)), U = $.st >= b.min && $.st <= b.max;
|
|
400
|
+
if (_ && O && U) {
|
|
401
|
+
k = !0;
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (k) return !0;
|
|
406
|
+
if (!F)
|
|
407
|
+
for (const $ of S) {
|
|
408
|
+
const _ = E(W($.s)), O = $.st >= b.min && $.st <= b.max;
|
|
409
|
+
if (Math.abs(M - $.w) <= 300 && _ && O) return !0;
|
|
410
|
+
}
|
|
411
|
+
return !1;
|
|
50
412
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
413
|
+
const f = D(r), s = st(o, r, a, n);
|
|
414
|
+
if (g.resource?.has(s))
|
|
415
|
+
return g.resource.get(s);
|
|
416
|
+
const u = tt(o), m = [], d = v;
|
|
417
|
+
for (const i of document.querySelectorAll("style")) {
|
|
418
|
+
const l = i.textContent || "";
|
|
419
|
+
for (const h of l.matchAll(d)) {
|
|
420
|
+
const w = (h[2] || h[4] || "").trim();
|
|
421
|
+
if (!w || x(w)) continue;
|
|
422
|
+
!!document.querySelector(
|
|
423
|
+
`link[rel="stylesheet"][href="${w}"]`
|
|
424
|
+
) || m.push(w);
|
|
57
425
|
}
|
|
58
426
|
}
|
|
59
|
-
await Promise.all(
|
|
60
|
-
|
|
427
|
+
m.length && await Promise.all(
|
|
428
|
+
m.map(
|
|
429
|
+
(i) => new Promise((l) => {
|
|
430
|
+
if (document.querySelector(`link[rel="stylesheet"][href="${i}"]`))
|
|
431
|
+
return l(null);
|
|
432
|
+
const h = document.createElement("link");
|
|
433
|
+
h.rel = "stylesheet", h.href = i, h.setAttribute("data-snapdom", "injected-import"), h.onload = () => l(h), h.onerror = () => l(null), document.head.appendChild(h);
|
|
434
|
+
})
|
|
435
|
+
)
|
|
436
|
+
);
|
|
437
|
+
let p = "";
|
|
438
|
+
const L = Array.from(
|
|
61
439
|
document.querySelectorAll('link[rel="stylesheet"]')
|
|
62
|
-
).filter((
|
|
63
|
-
|
|
64
|
-
for (const t of i)
|
|
440
|
+
).filter((i) => !!i.href);
|
|
441
|
+
for (const i of L)
|
|
65
442
|
try {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
let U = v(_[0]);
|
|
84
|
-
if (!U) continue;
|
|
85
|
-
let l = U;
|
|
86
|
-
if (!l.startsWith("http") && !l.startsWith("data:") && (l = new URL(l, t.href).href), !$(l)) {
|
|
87
|
-
if (o.resource.has(l)) {
|
|
88
|
-
o.font.add(l), g = g.replace(
|
|
89
|
-
_[0],
|
|
90
|
-
`url(${o.resource.get(l)})`
|
|
91
|
-
);
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
if (!o.font.has(l))
|
|
95
|
-
try {
|
|
96
|
-
const D = await (await A(l, { useProxy: c })).blob(), M = await new Promise((W) => {
|
|
97
|
-
const P = new FileReader();
|
|
98
|
-
P.onload = () => W(P.result), P.readAsDataURL(D);
|
|
99
|
-
});
|
|
100
|
-
o.resource.set(l, M), o.font.add(l), g = g.replace(_[0], `url(${M})`);
|
|
101
|
-
} catch {
|
|
102
|
-
console.warn("[snapdom] Failed to fetch font resource:", l);
|
|
103
|
-
}
|
|
443
|
+
if (x(i.href)) continue;
|
|
444
|
+
let l = "", h = !1;
|
|
445
|
+
try {
|
|
446
|
+
h = new URL(i.href, location.href).origin === location.origin;
|
|
447
|
+
} catch {
|
|
448
|
+
}
|
|
449
|
+
if (!h && !Z(i.href, u))
|
|
450
|
+
continue;
|
|
451
|
+
if (h) {
|
|
452
|
+
const S = Array.from(document.styleSheets).find(
|
|
453
|
+
(y) => y.href === i.href
|
|
454
|
+
);
|
|
455
|
+
if (S)
|
|
456
|
+
try {
|
|
457
|
+
const y = S.cssRules || [];
|
|
458
|
+
l = Array.from(y).map((R) => R.cssText).join("");
|
|
459
|
+
} catch {
|
|
104
460
|
}
|
|
105
|
-
}
|
|
106
|
-
r = r.replace(s, g);
|
|
107
461
|
}
|
|
108
|
-
|
|
109
|
-
|
|
462
|
+
if (!l && (l = (await A(i.href, { as: "text", useProxy: n })).data, x(i.href)))
|
|
463
|
+
continue;
|
|
464
|
+
l = await et(l, i.href, n);
|
|
465
|
+
let w = "";
|
|
466
|
+
for (const S of l.match(nt) || []) {
|
|
467
|
+
const y = (S.match(/font-family:\s*([^;]+);/i)?.[1] || "").trim(), R = T(y);
|
|
468
|
+
if (!R || x(R)) continue;
|
|
469
|
+
const b = (S.match(/font-weight:\s*([^;]+);/i)?.[1] || "400").trim(), F = (S.match(/font-style:\s*([^;]+);/i)?.[1] || "normal").trim(), M = (S.match(/font-stretch:\s*([^;]+);/i)?.[1] || "100%").trim(), E = (S.match(/unicode-range:\s*([^;]+);/i)?.[1] || "").trim(), k = (S.match(/src\s*:\s*([^;]+);/i)?.[1] || "").trim(), $ = P(k, i.href);
|
|
470
|
+
if (!t(R, F, b, M))
|
|
471
|
+
continue;
|
|
472
|
+
const _ = B(E);
|
|
473
|
+
if (!V(e, _)) continue;
|
|
474
|
+
const O = {
|
|
475
|
+
family: R,
|
|
476
|
+
weightSpec: b,
|
|
477
|
+
styleSpec: F,
|
|
478
|
+
stretchSpec: M,
|
|
479
|
+
unicodeRange: E,
|
|
480
|
+
srcRaw: k,
|
|
481
|
+
srcUrls: $,
|
|
482
|
+
href: i.href
|
|
483
|
+
};
|
|
484
|
+
if (r && f(O, _)) continue;
|
|
485
|
+
const U = /url\(/i.test(k) ? await z(S, i.href, n) : S;
|
|
486
|
+
w += U;
|
|
487
|
+
}
|
|
488
|
+
w.trim() && (p += w);
|
|
110
489
|
} catch {
|
|
111
|
-
console.warn("[
|
|
490
|
+
console.warn("[snapDOM] Failed to process stylesheet:", i.href);
|
|
112
491
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
x[0],
|
|
136
|
-
`url(${o.resource.get(f)})`
|
|
137
|
-
);
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
if (!o.font.has(f))
|
|
141
|
-
try {
|
|
142
|
-
const E = await (await A(f, { useProxy: c })).blob(), _ = await new Promise((U) => {
|
|
143
|
-
const l = new FileReader();
|
|
144
|
-
l.onload = () => U(l.result), l.readAsDataURL(E);
|
|
145
|
-
});
|
|
146
|
-
o.resource.set(f, _), o.font.add(f), w = w.replace(x[0], `url(${_})`);
|
|
147
|
-
} catch {
|
|
148
|
-
console.warn("[snapdom] Failed to fetch font URL:", f);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
m += `@font-face{font-family:${a};src:${w};font-style:${s};font-weight:${r};}`;
|
|
153
|
-
}
|
|
492
|
+
const C = {
|
|
493
|
+
requiredIndex: c,
|
|
494
|
+
usedCodepoints: e,
|
|
495
|
+
faceMatchesRequired: t,
|
|
496
|
+
simpleExcluder: r ? D(r) : null,
|
|
497
|
+
useProxy: n,
|
|
498
|
+
visitedSheets: /* @__PURE__ */ new Set(),
|
|
499
|
+
depth: 0
|
|
500
|
+
};
|
|
501
|
+
for (const i of document.styleSheets)
|
|
502
|
+
if (!(i.href && L.some((l) => l.href === i.href)))
|
|
503
|
+
try {
|
|
504
|
+
const l = i.href || location.href;
|
|
505
|
+
l && C.visitedSheets.add(l), await H(
|
|
506
|
+
i,
|
|
507
|
+
l,
|
|
508
|
+
async (h) => {
|
|
509
|
+
p += h;
|
|
510
|
+
},
|
|
511
|
+
C
|
|
512
|
+
);
|
|
513
|
+
} catch {
|
|
154
514
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
515
|
+
try {
|
|
516
|
+
for (const i of document.fonts || []) {
|
|
517
|
+
if (!i || !i.family || i.status !== "loaded" || !i._snapdomSrc) continue;
|
|
518
|
+
const l = String(i.family).replace(/^['"]+|['"]+$/g, "");
|
|
519
|
+
if (x(l) || !c.has(l) || r?.families && r.families.some(
|
|
520
|
+
(w) => String(w).toLowerCase() === l.toLowerCase()
|
|
521
|
+
))
|
|
522
|
+
continue;
|
|
523
|
+
let h = i._snapdomSrc;
|
|
524
|
+
if (!String(h).startsWith("data:")) {
|
|
525
|
+
if (g.resource?.has(i._snapdomSrc))
|
|
526
|
+
h = g.resource.get(i._snapdomSrc), g.font?.add(i._snapdomSrc);
|
|
527
|
+
else if (!g.font?.has(i._snapdomSrc))
|
|
166
528
|
try {
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
})
|
|
529
|
+
const w = await A(i._snapdomSrc, {
|
|
530
|
+
as: "dataURL",
|
|
531
|
+
useProxy: n,
|
|
532
|
+
silent: !0
|
|
533
|
+
});
|
|
534
|
+
if (w.ok && typeof w.data == "string")
|
|
535
|
+
h = w.data, g.resource?.set(i._snapdomSrc, h), g.font?.add(i._snapdomSrc);
|
|
536
|
+
else
|
|
537
|
+
continue;
|
|
172
538
|
} catch {
|
|
173
539
|
console.warn(
|
|
174
|
-
"[
|
|
175
|
-
|
|
540
|
+
"[snapDOM] Failed to fetch dynamic font src:",
|
|
541
|
+
i._snapdomSrc
|
|
176
542
|
);
|
|
177
543
|
continue;
|
|
178
544
|
}
|
|
179
545
|
}
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
if (!
|
|
186
|
-
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
546
|
+
p += `@font-face{font-family:'${l}';src:url(${h});font-style:${i.style || "normal"};font-weight:${i.weight || "normal"};}`;
|
|
547
|
+
}
|
|
548
|
+
} catch {
|
|
549
|
+
}
|
|
550
|
+
for (const i of a) {
|
|
551
|
+
if (!i || typeof i != "object") continue;
|
|
552
|
+
const l = String(i.family || "").replace(/^['"]+|['"]+$/g, "");
|
|
553
|
+
if (!l || x(l) || !c.has(l) || r?.families && r.families.some(
|
|
554
|
+
(b) => String(b).toLowerCase() === l.toLowerCase()
|
|
555
|
+
))
|
|
556
|
+
continue;
|
|
557
|
+
const h = i.weight != null ? String(i.weight) : "normal", w = i.style != null ? String(i.style) : "normal", S = i.stretchPct != null ? `${i.stretchPct}%` : "100%", y = String(i.src || "");
|
|
558
|
+
let R = y;
|
|
559
|
+
if (!R.startsWith("data:")) {
|
|
560
|
+
if (g.resource?.has(y))
|
|
561
|
+
R = g.resource.get(y), g.font?.add(y);
|
|
562
|
+
else if (!g.font?.has(y))
|
|
563
|
+
try {
|
|
564
|
+
const b = await A(y, {
|
|
565
|
+
as: "dataURL",
|
|
566
|
+
useProxy: n,
|
|
567
|
+
silent: !0
|
|
568
|
+
});
|
|
569
|
+
if (b.ok && typeof b.data == "string")
|
|
570
|
+
R = b.data, g.resource?.set(y, R), g.font?.add(y);
|
|
571
|
+
else
|
|
572
|
+
continue;
|
|
573
|
+
} catch {
|
|
574
|
+
console.warn("[snapDOM] Failed to fetch localFonts src:", y);
|
|
575
|
+
continue;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
p += `@font-face{font-family:'${l}';src:url(${R});font-style:${w};font-weight:${h};font-stretch:${S};}`;
|
|
579
|
+
}
|
|
580
|
+
return p && (p = rt(p), g.resource?.set(s, p)), p;
|
|
581
|
+
}
|
|
582
|
+
function mt(o) {
|
|
583
|
+
const e = /* @__PURE__ */ new Set();
|
|
584
|
+
if (!o) return e;
|
|
585
|
+
const r = document.createTreeWalker(o, NodeFilter.SHOW_ELEMENT, null), a = (t) => {
|
|
586
|
+
const f = T(t.fontFamily);
|
|
587
|
+
if (!f) return;
|
|
588
|
+
const s = (u, m, d) => `${f}__${N(u)}__${W(m)}__${Y(d)}`;
|
|
589
|
+
e.add(s(t.fontWeight, t.fontStyle, t.fontStretch));
|
|
590
|
+
};
|
|
591
|
+
a(getComputedStyle(o));
|
|
592
|
+
const n = getComputedStyle(o, "::before");
|
|
593
|
+
n && n.content && n.content !== "none" && a(n);
|
|
594
|
+
const c = getComputedStyle(o, "::after");
|
|
595
|
+
for (c && c.content && c.content !== "none" && a(c); r.nextNode(); ) {
|
|
596
|
+
const t = (
|
|
597
|
+
/** @type {Element} */
|
|
598
|
+
r.currentNode
|
|
599
|
+
), f = getComputedStyle(t);
|
|
600
|
+
a(f);
|
|
601
|
+
const s = getComputedStyle(t, "::before");
|
|
602
|
+
s && s.content && s.content !== "none" && a(s);
|
|
603
|
+
const u = getComputedStyle(t, "::after");
|
|
604
|
+
u && u.content && u.content !== "none" && a(u);
|
|
605
|
+
}
|
|
606
|
+
return e;
|
|
607
|
+
}
|
|
608
|
+
function ht(o) {
|
|
609
|
+
const e = /* @__PURE__ */ new Set(), r = (n) => {
|
|
610
|
+
if (n)
|
|
611
|
+
for (const c of n) e.add(c.codePointAt(0));
|
|
612
|
+
}, a = document.createTreeWalker(
|
|
613
|
+
o,
|
|
614
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,
|
|
615
|
+
null
|
|
616
|
+
);
|
|
617
|
+
for (; a.nextNode(); ) {
|
|
618
|
+
const n = a.currentNode;
|
|
619
|
+
if (n.nodeType === Node.TEXT_NODE)
|
|
620
|
+
r(n.nodeValue || "");
|
|
621
|
+
else if (n.nodeType === Node.ELEMENT_NODE) {
|
|
622
|
+
const c = (
|
|
623
|
+
/** @type {Element} */
|
|
624
|
+
n
|
|
625
|
+
);
|
|
626
|
+
for (const t of ["::before", "::after"]) {
|
|
627
|
+
const s = getComputedStyle(c, t)?.getPropertyValue("content");
|
|
628
|
+
if (!(!s || s === "none"))
|
|
629
|
+
if (/^"/.test(s) || /^'/.test(s))
|
|
630
|
+
r(s.slice(1, -1));
|
|
631
|
+
else {
|
|
632
|
+
const u = s.match(/\\[0-9A-Fa-f]{1,6}/g);
|
|
633
|
+
if (u)
|
|
634
|
+
for (const m of u)
|
|
635
|
+
try {
|
|
636
|
+
e.add(parseInt(m.slice(1), 16));
|
|
637
|
+
} catch {
|
|
638
|
+
}
|
|
639
|
+
}
|
|
199
640
|
}
|
|
200
|
-
|
|
641
|
+
}
|
|
201
642
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
643
|
+
return e;
|
|
644
|
+
}
|
|
645
|
+
async function dt(o, e = 2) {
|
|
646
|
+
try {
|
|
647
|
+
await document.fonts.ready;
|
|
648
|
+
} catch {
|
|
205
649
|
}
|
|
206
|
-
|
|
650
|
+
const r = Array.from(o || []).filter(Boolean);
|
|
651
|
+
if (r.length === 0) return;
|
|
652
|
+
const a = () => {
|
|
653
|
+
const n = document.createElement("div");
|
|
654
|
+
n.style.cssText = "position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";
|
|
655
|
+
for (const c of r) {
|
|
656
|
+
const t = document.createElement("span");
|
|
657
|
+
t.textContent = "AaBbGg1234ÁÉÍÓÚçñ—∞", t.style.fontFamily = `"${c}"`, t.style.fontWeight = "700", t.style.fontStyle = "italic", t.style.fontSize = "32px", t.style.lineHeight = "1", t.style.whiteSpace = "nowrap", t.style.margin = "0", t.style.padding = "0", n.appendChild(t);
|
|
658
|
+
}
|
|
659
|
+
document.body.appendChild(n), n.offsetWidth, document.body.removeChild(n);
|
|
660
|
+
};
|
|
661
|
+
for (let n = 0; n < Math.max(1, e); n++)
|
|
662
|
+
a(), await new Promise(
|
|
663
|
+
(c) => requestAnimationFrame(() => requestAnimationFrame(c))
|
|
664
|
+
);
|
|
207
665
|
}
|
|
208
666
|
export {
|
|
209
|
-
|
|
210
|
-
|
|
667
|
+
ht as collectUsedCodepoints,
|
|
668
|
+
mt as collectUsedFontVariants,
|
|
669
|
+
ut as embedCustomFonts,
|
|
670
|
+
dt as ensureFontsReady,
|
|
671
|
+
lt as iconToImage
|
|
211
672
|
};
|