zeed 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +50 -211
- package/README.md +16 -0
- package/dist/_experiments/bitcask.cjs +243 -1
- package/dist/_experiments/bitcask.cjs.map +1 -1
- package/dist/_experiments/bitcask.mjs +230 -1
- package/dist/_experiments/bitcask.mjs.map +1 -1
- package/dist/bin-BAoS4qtm.mjs +593 -0
- package/dist/{bin-SPdenYkw.mjs.map → bin-BAoS4qtm.mjs.map} +1 -1
- package/dist/bin-Ddaz2lxM.cjs +862 -0
- package/dist/{bin-Ce3i6ABn.cjs.map → bin-Ddaz2lxM.cjs.map} +1 -1
- package/dist/browser/base64.cjs +14 -1
- package/dist/browser/base64.cjs.map +1 -1
- package/dist/browser/base64.mjs +12 -1
- package/dist/browser/base64.mjs.map +1 -1
- package/dist/browser/gravatar.cjs +186 -1
- package/dist/browser/gravatar.cjs.map +1 -1
- package/dist/browser/gravatar.mjs +184 -1
- package/dist/browser/gravatar.mjs.map +1 -1
- package/dist/browser/index.cjs +14 -1
- package/dist/browser/index.mjs +8 -1
- package/dist/browser/localstorage.cjs +46 -1
- package/dist/browser/localstorage.cjs.map +1 -1
- package/dist/browser/localstorage.mjs +45 -1
- package/dist/browser/localstorage.mjs.map +1 -1
- package/dist/browser/log/index.cjs +8 -1
- package/dist/browser/log/index.mjs +5 -1
- package/dist/browser/log/log-browser-factory.cjs +65 -1
- package/dist/browser/log/log-browser-factory.cjs.map +1 -1
- package/dist/browser/log/log-browser-factory.mjs +64 -1
- package/dist/browser/log/log-browser-factory.mjs.map +1 -1
- package/dist/browser/log/log-browser.cjs +72 -1
- package/dist/browser/log/log-browser.cjs.map +1 -1
- package/dist/browser/log/log-browser.mjs +71 -1
- package/dist/browser/log/log-browser.mjs.map +1 -1
- package/dist/browser/log/log-colors.cjs +11 -1
- package/dist/browser/log/log-colors.cjs.map +1 -1
- package/dist/browser/log/log-colors.mjs +9 -1
- package/dist/browser/log/log-colors.mjs.map +1 -1
- package/dist/browser/log/log-context-browser.cjs +25 -1
- package/dist/browser/log/log-context-browser.cjs.map +1 -1
- package/dist/browser/log/log-context-browser.mjs +23 -1
- package/dist/browser/log/log-context-browser.mjs.map +1 -1
- package/dist/chunk-DQk6qfdC.mjs +18 -0
- package/dist/chunk-uaV2rQ02.cjs +53 -0
- package/dist/common/assert.cjs +22 -1
- package/dist/common/assert.cjs.map +1 -1
- package/dist/common/assert.mjs +19 -1
- package/dist/common/assert.mjs.map +1 -1
- package/dist/common/bin/index.cjs +106 -1
- package/dist/common/bin/index.cjs.map +1 -1
- package/dist/common/bin/index.mjs +98 -1
- package/dist/common/bin/index.mjs.map +1 -1
- package/dist/common/bin/lib0/binary.cjs +146 -1
- package/dist/common/bin/lib0/binary.cjs.map +1 -1
- package/dist/common/bin/lib0/binary.mjs +80 -1
- package/dist/common/bin/lib0/binary.mjs.map +1 -1
- package/dist/common/bin/lib0/buffer.cjs +42 -1
- package/dist/common/bin/lib0/buffer.cjs.map +1 -1
- package/dist/common/bin/lib0/buffer.mjs +38 -1
- package/dist/common/bin/lib0/buffer.mjs.map +1 -1
- package/dist/common/bin/lib0/create.cjs +24 -1
- package/dist/common/bin/lib0/create.cjs.map +1 -1
- package/dist/common/bin/lib0/create.mjs +21 -1
- package/dist/common/bin/lib0/create.mjs.map +1 -1
- package/dist/common/bin/lib0/decoding.cjs +325 -1
- package/dist/common/bin/lib0/decoding.cjs.map +1 -1
- package/dist/common/bin/lib0/decoding.mjs +298 -1
- package/dist/common/bin/lib0/decoding.mjs.map +1 -1
- package/dist/common/bin/lib0/encoding.cjs +404 -1
- package/dist/common/bin/lib0/encoding.cjs.map +1 -1
- package/dist/common/bin/lib0/encoding.mjs +377 -1
- package/dist/common/bin/lib0/encoding.mjs.map +1 -1
- package/dist/common/bin/lib0/string.cjs +81 -1
- package/dist/common/bin/lib0/string.cjs.map +1 -1
- package/dist/common/bin/lib0/string.mjs +71 -1
- package/dist/common/bin/lib0/string.mjs.map +1 -1
- package/dist/common/crypto/aes-sealed.cjs +34 -1
- package/dist/common/crypto/aes-sealed.cjs.map +1 -1
- package/dist/common/crypto/aes-sealed.mjs +32 -1
- package/dist/common/crypto/aes-sealed.mjs.map +1 -1
- package/dist/common/crypto/crypto.cjs +91 -1
- package/dist/common/crypto/crypto.cjs.map +1 -1
- package/dist/common/crypto/crypto.mjs +80 -1
- package/dist/common/crypto/crypto.mjs.map +1 -1
- package/dist/common/crypto/index.cjs +23 -1
- package/dist/common/crypto/index.mjs +5 -1
- package/dist/common/crypto/xaes.cjs +128 -1
- package/dist/common/crypto/xaes.cjs.map +1 -1
- package/dist/common/crypto/xaes.mjs +123 -1
- package/dist/common/crypto/xaes.mjs.map +1 -1
- package/dist/common/csv.cjs +49 -4
- package/dist/common/csv.cjs.map +1 -1
- package/dist/common/csv.mjs +46 -4
- package/dist/common/csv.mjs.map +1 -1
- package/dist/common/data/array.cjs +299 -1
- package/dist/common/data/array.cjs.map +1 -1
- package/dist/common/data/array.mjs +274 -1
- package/dist/common/data/array.mjs.map +1 -1
- package/dist/common/data/basex-secure.cjs +30 -1
- package/dist/common/data/basex-secure.mjs +3 -1
- package/dist/common/data/basex.cjs +163 -1
- package/dist/common/data/basex.cjs.map +1 -1
- package/dist/common/data/basex.mjs +152 -1
- package/dist/common/data/basex.mjs.map +1 -1
- package/dist/common/data/bin-types.mjs +1 -1
- package/dist/common/data/bin.cjs +21 -1
- package/dist/common/data/bin.mjs +3 -1
- package/dist/common/data/camelcase.cjs +27 -1
- package/dist/common/data/camelcase.cjs.map +1 -1
- package/dist/common/data/camelcase.mjs +22 -1
- package/dist/common/data/camelcase.mjs.map +1 -1
- package/dist/common/data/convert.cjs +104 -1
- package/dist/common/data/convert.cjs.map +1 -1
- package/dist/common/data/convert.mjs +88 -1
- package/dist/common/data/convert.mjs.map +1 -1
- package/dist/common/data/datauri.cjs +32 -1
- package/dist/common/data/datauri.cjs.map +1 -1
- package/dist/common/data/datauri.mjs +27 -1
- package/dist/common/data/datauri.mjs.map +1 -1
- package/dist/common/data/day-legacy.cjs +148 -1
- package/dist/common/data/day-legacy.cjs.map +1 -1
- package/dist/common/data/day-legacy.mjs +143 -1
- package/dist/common/data/day-legacy.mjs.map +1 -1
- package/dist/common/data/day.cjs +335 -1
- package/dist/common/data/day.cjs.map +1 -1
- package/dist/common/data/day.mjs +305 -1
- package/dist/common/data/day.mjs.map +1 -1
- package/dist/common/data/decimal.cjs +28 -1
- package/dist/common/data/decimal.cjs.map +1 -1
- package/dist/common/data/decimal.mjs +23 -1
- package/dist/common/data/decimal.mjs.map +1 -1
- package/dist/common/data/deep.cjs +57 -1
- package/dist/common/data/deep.cjs.map +1 -1
- package/dist/common/data/deep.mjs +54 -1
- package/dist/common/data/deep.mjs.map +1 -1
- package/dist/common/data/diff.cjs +62 -1
- package/dist/common/data/diff.cjs.map +1 -1
- package/dist/common/data/diff.mjs +60 -1
- package/dist/common/data/diff.mjs.map +1 -1
- package/dist/common/data/distributed.cjs +24 -1
- package/dist/common/data/distributed.cjs.map +1 -1
- package/dist/common/data/distributed.mjs +22 -1
- package/dist/common/data/distributed.mjs.map +1 -1
- package/dist/common/data/format.cjs +63 -1
- package/dist/common/data/format.cjs.map +1 -1
- package/dist/common/data/format.mjs +59 -1
- package/dist/common/data/format.mjs.map +1 -1
- package/dist/common/data/html.cjs +13 -1
- package/dist/common/data/html.cjs.map +1 -1
- package/dist/common/data/html.mjs +10 -1
- package/dist/common/data/html.mjs.map +1 -1
- package/dist/common/data/index.cjs +296 -1
- package/dist/common/data/index.mjs +37 -1
- package/dist/common/data/is.cjs +106 -1
- package/dist/common/data/is.cjs.map +1 -1
- package/dist/common/data/is.mjs +85 -1
- package/dist/common/data/is.mjs.map +1 -1
- package/dist/common/data/json.cjs +70 -1
- package/dist/common/data/json.cjs.map +1 -1
- package/dist/common/data/json.mjs +65 -1
- package/dist/common/data/json.mjs.map +1 -1
- package/dist/common/data/list.cjs +32 -1
- package/dist/common/data/list.cjs.map +1 -1
- package/dist/common/data/list.mjs +27 -1
- package/dist/common/data/list.mjs.map +1 -1
- package/dist/common/data/lru.mjs +1 -1
- package/dist/common/data/math.cjs +79 -1
- package/dist/common/data/math.cjs.map +1 -1
- package/dist/common/data/math.mjs +65 -1
- package/dist/common/data/math.mjs.map +1 -1
- package/dist/common/data/message.cjs +30 -1
- package/dist/common/data/message.cjs.map +1 -1
- package/dist/common/data/message.mjs +28 -1
- package/dist/common/data/message.mjs.map +1 -1
- package/dist/common/data/object-changes.cjs +66 -1
- package/dist/common/data/object-changes.cjs.map +1 -1
- package/dist/common/data/object-changes.mjs +63 -1
- package/dist/common/data/object-changes.mjs.map +1 -1
- package/dist/common/data/object.cjs +112 -1
- package/dist/common/data/object.cjs.map +1 -1
- package/dist/common/data/object.mjs +104 -1
- package/dist/common/data/object.mjs.map +1 -1
- package/dist/common/data/orderby.cjs +42 -1
- package/dist/common/data/orderby.cjs.map +1 -1
- package/dist/common/data/orderby.mjs +37 -1
- package/dist/common/data/orderby.mjs.map +1 -1
- package/dist/common/data/path.cjs +26 -1
- package/dist/common/data/path.cjs.map +1 -1
- package/dist/common/data/path.mjs +25 -1
- package/dist/common/data/path.mjs.map +1 -1
- package/dist/common/data/regexp.cjs +12 -1
- package/dist/common/data/regexp.cjs.map +1 -1
- package/dist/common/data/regexp.mjs +10 -1
- package/dist/common/data/regexp.mjs.map +1 -1
- package/dist/common/data/rounding.cjs +107 -1
- package/dist/common/data/rounding.cjs.map +1 -1
- package/dist/common/data/rounding.mjs +95 -1
- package/dist/common/data/rounding.mjs.map +1 -1
- package/dist/common/data/signal.cjs +39 -1
- package/dist/common/data/signal.cjs.map +1 -1
- package/dist/common/data/signal.mjs +38 -1
- package/dist/common/data/signal.mjs.map +1 -1
- package/dist/common/data/sortable.cjs +35 -1
- package/dist/common/data/sortable.cjs.map +1 -1
- package/dist/common/data/sortable.mjs +31 -1
- package/dist/common/data/sortable.mjs.map +1 -1
- package/dist/common/data/sorted.cjs +54 -1
- package/dist/common/data/sorted.cjs.map +1 -1
- package/dist/common/data/sorted.mjs +53 -1
- package/dist/common/data/sorted.mjs.map +1 -1
- package/dist/common/data/string-deburr.cjs +240 -1
- package/dist/common/data/string-deburr.cjs.map +1 -1
- package/dist/common/data/string-deburr.mjs +238 -1
- package/dist/common/data/string-deburr.mjs.map +1 -1
- package/dist/common/data/string-hash-fnv.cjs +69 -1
- package/dist/common/data/string-hash-fnv.cjs.map +1 -1
- package/dist/common/data/string-hash-fnv.mjs +67 -1
- package/dist/common/data/string-hash-fnv.mjs.map +1 -1
- package/dist/common/data/string-hash-pool.cjs +28 -1
- package/dist/common/data/string-hash-pool.cjs.map +1 -1
- package/dist/common/data/string-hash-pool.mjs +27 -1
- package/dist/common/data/string-hash-pool.mjs.map +1 -1
- package/dist/common/data/url.cjs +98 -2
- package/dist/common/data/url.cjs.map +1 -1
- package/dist/common/data/url.mjs +91 -2
- package/dist/common/data/url.mjs.map +1 -1
- package/dist/common/data/utils.cjs +118 -1
- package/dist/common/data/utils.cjs.map +1 -1
- package/dist/common/data/utils.mjs +107 -1
- package/dist/common/data/utils.mjs.map +1 -1
- package/dist/common/data/wordlist.cjs +531 -1
- package/dist/common/data/wordlist.cjs.map +1 -1
- package/dist/common/data/wordlist.mjs +529 -1
- package/dist/common/data/wordlist.mjs.map +1 -1
- package/dist/common/data/xrx.cjs +96 -1
- package/dist/common/data/xrx.cjs.map +1 -1
- package/dist/common/data/xrx.mjs +92 -1
- package/dist/common/data/xrx.mjs.map +1 -1
- package/dist/common/dispose-defer.cjs +133 -1
- package/dist/common/dispose-defer.cjs.map +1 -1
- package/dist/common/dispose-defer.mjs +130 -1
- package/dist/common/dispose-defer.mjs.map +1 -1
- package/dist/common/dispose-types.mjs +1 -1
- package/dist/common/dispose-utils.cjs +113 -1
- package/dist/common/dispose-utils.cjs.map +1 -1
- package/dist/common/dispose-utils.mjs +106 -1
- package/dist/common/dispose-utils.mjs.map +1 -1
- package/dist/common/exec/index.cjs +24 -1
- package/dist/common/exec/index.d.cts +1 -1
- package/dist/common/exec/index.d.mts +1 -1
- package/dist/common/exec/index.mjs +8 -1
- package/dist/common/exec/mutex.cjs +44 -1
- package/dist/common/exec/mutex.cjs.map +1 -1
- package/dist/common/exec/mutex.mjs +42 -1
- package/dist/common/exec/mutex.mjs.map +1 -1
- package/dist/common/exec/pool.cjs +181 -1
- package/dist/common/exec/pool.cjs.map +1 -1
- package/dist/common/exec/pool.d.cts +1 -1
- package/dist/common/exec/pool.d.mts +1 -1
- package/dist/common/exec/pool.mjs +180 -1
- package/dist/common/exec/pool.mjs.map +1 -1
- package/dist/common/exec/progress.cjs +149 -1
- package/dist/common/exec/progress.cjs.map +1 -1
- package/dist/common/exec/progress.d.cts +1 -1
- package/dist/common/exec/progress.d.mts +1 -1
- package/dist/common/exec/progress.mjs +148 -1
- package/dist/common/exec/progress.mjs.map +1 -1
- package/dist/common/exec/promise.cjs +113 -1
- package/dist/common/exec/promise.cjs.map +1 -1
- package/dist/common/exec/promise.mjs +103 -1
- package/dist/common/exec/promise.mjs.map +1 -1
- package/dist/common/exec/queue.cjs +125 -1
- package/dist/common/exec/queue.cjs.map +1 -1
- package/dist/common/exec/queue.d.cts +1 -1
- package/dist/common/exec/queue.d.mts +1 -1
- package/dist/common/exec/queue.mjs +124 -1
- package/dist/common/exec/queue.mjs.map +1 -1
- package/dist/common/exec/throttle-debounce.cjs +114 -1
- package/dist/common/exec/throttle-debounce.cjs.map +1 -1
- package/dist/common/exec/throttle-debounce.mjs +112 -1
- package/dist/common/exec/throttle-debounce.mjs.map +1 -1
- package/dist/common/global.cjs +22 -1
- package/dist/common/global.cjs.map +1 -1
- package/dist/common/global.mjs +19 -1
- package/dist/common/global.mjs.map +1 -1
- package/dist/common/index.cjs +559 -1
- package/dist/common/index.d.cts +1 -1
- package/dist/common/index.d.mts +1 -1
- package/dist/common/index.mjs +89 -1
- package/dist/common/localhost.cjs +16 -1
- package/dist/common/localhost.cjs.map +1 -1
- package/dist/common/localhost.mjs +14 -1
- package/dist/common/localhost.mjs.map +1 -1
- package/dist/common/log/index.cjs +34 -1
- package/dist/common/log/index.mjs +11 -1
- package/dist/common/log/log-base.cjs +40 -1
- package/dist/common/log/log-base.cjs.map +1 -1
- package/dist/common/log/log-base.mjs +31 -1
- package/dist/common/log/log-base.mjs.map +1 -1
- package/dist/common/log/log-colors.cjs +92 -1
- package/dist/common/log/log-colors.cjs.map +1 -1
- package/dist/common/log/log-colors.mjs +90 -1
- package/dist/common/log/log-colors.mjs.map +1 -1
- package/dist/common/log/log-config.cjs +15 -1
- package/dist/common/log/log-config.cjs.map +1 -1
- package/dist/common/log/log-config.mjs +14 -1
- package/dist/common/log/log-config.mjs.map +1 -1
- package/dist/common/log/log-console-capture.cjs +33 -1
- package/dist/common/log/log-console-capture.cjs.map +1 -1
- package/dist/common/log/log-console-capture.mjs +32 -1
- package/dist/common/log/log-console-capture.mjs.map +1 -1
- package/dist/common/log/log-console-original.cjs +27 -1
- package/dist/common/log/log-console-original.cjs.map +1 -1
- package/dist/common/log/log-console-original.mjs +26 -1
- package/dist/common/log/log-console-original.mjs.map +1 -1
- package/dist/common/log/log-console.cjs +39 -1
- package/dist/common/log/log-console.cjs.map +1 -1
- package/dist/common/log/log-console.mjs +38 -1
- package/dist/common/log/log-console.mjs.map +1 -1
- package/dist/common/log/log-context.cjs +109 -1
- package/dist/common/log/log-context.cjs.map +1 -1
- package/dist/common/log/log-context.mjs +108 -1
- package/dist/common/log/log-context.mjs.map +1 -1
- package/dist/common/log/log-filter.cjs +80 -1
- package/dist/common/log/log-filter.cjs.map +1 -1
- package/dist/common/log/log-filter.mjs +75 -1
- package/dist/common/log/log-filter.mjs.map +1 -1
- package/dist/common/log/log-memory.cjs +45 -1
- package/dist/common/log/log-memory.cjs.map +1 -1
- package/dist/common/log/log-memory.mjs +43 -1
- package/dist/common/log/log-memory.mjs.map +1 -1
- package/dist/common/log/log-noop.cjs +17 -1
- package/dist/common/log/log-noop.cjs.map +1 -1
- package/dist/common/log/log-noop.mjs +15 -1
- package/dist/common/log/log-noop.mjs.map +1 -1
- package/dist/common/log/log.cjs +46 -1
- package/dist/common/log/log.cjs.map +1 -1
- package/dist/common/log/log.mjs +43 -1
- package/dist/common/log/log.mjs.map +1 -1
- package/dist/common/msg/channel-debug.cjs +17 -1
- package/dist/common/msg/channel-debug.cjs.map +1 -1
- package/dist/common/msg/channel-debug.d.cts +1 -1
- package/dist/common/msg/channel-debug.d.mts +1 -1
- package/dist/common/msg/channel-debug.mjs +16 -1
- package/dist/common/msg/channel-debug.mjs.map +1 -1
- package/dist/common/msg/channel-local.cjs +28 -1
- package/dist/common/msg/channel-local.cjs.map +1 -1
- package/dist/common/msg/channel-local.d.cts +1 -1
- package/dist/common/msg/channel-local.d.mts +1 -1
- package/dist/common/msg/channel-local.mjs +26 -1
- package/dist/common/msg/channel-local.mjs.map +1 -1
- package/dist/common/msg/channel-resilient.cjs +63 -1
- package/dist/common/msg/channel-resilient.cjs.map +1 -1
- package/dist/common/msg/channel-resilient.d.cts +1 -1
- package/dist/common/msg/channel-resilient.d.mts +1 -1
- package/dist/common/msg/channel-resilient.mjs +62 -1
- package/dist/common/msg/channel-resilient.mjs.map +1 -1
- package/dist/common/msg/channel-wkwebview.cjs +35 -1
- package/dist/common/msg/channel-wkwebview.cjs.map +1 -1
- package/dist/common/msg/channel-wkwebview.d.cts +2 -1
- package/dist/common/msg/channel-wkwebview.d.mts +2 -1
- package/dist/common/msg/channel-wkwebview.mjs +34 -1
- package/dist/common/msg/channel-wkwebview.mjs.map +1 -1
- package/dist/common/msg/channel.cjs +23 -1
- package/dist/common/msg/channel.cjs.map +1 -1
- package/dist/common/msg/channel.d.cts +1 -1
- package/dist/common/msg/channel.d.mts +1 -1
- package/dist/common/msg/channel.mjs +22 -1
- package/dist/common/msg/channel.mjs.map +1 -1
- package/dist/common/msg/emitter.cjs +141 -1
- package/dist/common/msg/emitter.cjs.map +1 -1
- package/dist/common/msg/emitter.d.cts +1 -1
- package/dist/common/msg/emitter.d.mts +1 -1
- package/dist/common/msg/emitter.mjs +139 -1
- package/dist/common/msg/emitter.mjs.map +1 -1
- package/dist/common/msg/encoder.cjs +38 -1
- package/dist/common/msg/encoder.cjs.map +1 -1
- package/dist/common/msg/encoder.mjs +35 -1
- package/dist/common/msg/encoder.mjs.map +1 -1
- package/dist/common/msg/index.cjs +28 -1
- package/dist/common/msg/index.d.cts +1 -1
- package/dist/common/msg/index.d.mts +1 -1
- package/dist/common/msg/index.mjs +11 -1
- package/dist/common/msg/messages.cjs +135 -1
- package/dist/common/msg/messages.cjs.map +1 -1
- package/dist/common/msg/messages.d.cts +1 -1
- package/dist/common/msg/messages.d.mts +1 -1
- package/dist/common/msg/messages.mjs +133 -1
- package/dist/common/msg/messages.mjs.map +1 -1
- package/dist/common/msg/pipe.mjs +1 -1
- package/dist/common/msg/pubsub.cjs +78 -1
- package/dist/common/msg/pubsub.cjs.map +1 -1
- package/dist/common/msg/pubsub.d.cts +1 -1
- package/dist/common/msg/pubsub.d.mts +1 -1
- package/dist/common/msg/pubsub.mjs +76 -1
- package/dist/common/msg/pubsub.mjs.map +1 -1
- package/dist/common/msg/rpc.cjs +142 -1
- package/dist/common/msg/rpc.cjs.map +1 -1
- package/dist/common/msg/rpc.mjs +139 -1
- package/dist/common/msg/rpc.mjs.map +1 -1
- package/dist/common/network.cjs +129 -1
- package/dist/common/network.cjs.map +1 -1
- package/dist/common/network.mjs +122 -1
- package/dist/common/network.mjs.map +1 -1
- package/dist/common/platform.cjs +92 -1
- package/dist/common/platform.cjs.map +1 -1
- package/dist/common/platform.mjs +84 -1
- package/dist/common/platform.mjs.map +1 -1
- package/dist/common/schema/_sandbox/sandbox-inherit.mjs +1 -1
- package/dist/common/schema/_sandbox/sandbox.mjs +1 -1
- package/dist/common/schema/_sandbox/sandbox.xspec.mjs +1 -1
- package/dist/common/schema/export-json-schema.cjs +54 -1
- package/dist/common/schema/export-json-schema.cjs.map +1 -1
- package/dist/common/schema/export-json-schema.mjs +52 -1
- package/dist/common/schema/export-json-schema.mjs.map +1 -1
- package/dist/common/schema/export-swift.cjs +30 -2
- package/dist/common/schema/export-swift.cjs.map +1 -1
- package/dist/common/schema/export-swift.mjs +29 -2
- package/dist/common/schema/export-swift.mjs.map +1 -1
- package/dist/common/schema/export-typescript.cjs +20 -2
- package/dist/common/schema/export-typescript.cjs.map +1 -1
- package/dist/common/schema/export-typescript.mjs +19 -2
- package/dist/common/schema/export-typescript.mjs.map +1 -1
- package/dist/common/schema/index.cjs +55 -1
- package/dist/common/schema/index.mjs +12 -1
- package/dist/common/schema/parse-args.cjs +62 -2
- package/dist/common/schema/parse-args.cjs.map +1 -1
- package/dist/common/schema/parse-args.mjs +60 -2
- package/dist/common/schema/parse-args.mjs.map +1 -1
- package/dist/common/schema/parse-env.cjs +48 -3
- package/dist/common/schema/parse-env.cjs.map +1 -1
- package/dist/common/schema/parse-env.mjs +46 -3
- package/dist/common/schema/parse-env.mjs.map +1 -1
- package/dist/common/schema/parse-object.cjs +122 -1
- package/dist/common/schema/parse-object.cjs.map +1 -1
- package/dist/common/schema/parse-object.mjs +119 -1
- package/dist/common/schema/parse-object.mjs.map +1 -1
- package/dist/common/schema/schema-standard.mjs +1 -1
- package/dist/common/schema/schema.cjs +423 -1
- package/dist/common/schema/schema.cjs.map +1 -1
- package/dist/common/schema/schema.mjs +404 -1
- package/dist/common/schema/schema.mjs.map +1 -1
- package/dist/common/schema/serialize.cjs +109 -1
- package/dist/common/schema/serialize.cjs.map +1 -1
- package/dist/common/schema/serialize.mjs +107 -1
- package/dist/common/schema/serialize.mjs.map +1 -1
- package/dist/common/schema/type-test.mjs +1 -1
- package/dist/common/schema/utils.cjs +25 -1
- package/dist/common/schema/utils.cjs.map +1 -1
- package/dist/common/schema/utils.mjs +19 -1
- package/dist/common/schema/utils.mjs.map +1 -1
- package/dist/common/schema/z-collection.cjs +51 -1
- package/dist/common/schema/z-collection.mjs +27 -1
- package/dist/common/schema/z.cjs +9 -1
- package/dist/common/schema/z.mjs +3 -1
- package/dist/common/storage/index.cjs +4 -1
- package/dist/common/storage/index.mjs +3 -1
- package/dist/common/storage/memstorage.cjs +26 -1
- package/dist/common/storage/memstorage.cjs.map +1 -1
- package/dist/common/storage/memstorage.mjs +25 -1
- package/dist/common/storage/memstorage.mjs.map +1 -1
- package/dist/common/test.cjs +14 -1
- package/dist/common/test.cjs.map +1 -1
- package/dist/common/test.mjs +13 -1
- package/dist/common/test.mjs.map +1 -1
- package/dist/common/time.cjs +220 -1
- package/dist/common/time.cjs.map +1 -1
- package/dist/common/time.mjs +194 -1
- package/dist/common/time.mjs.map +1 -1
- package/dist/common/timeout.cjs +27 -1
- package/dist/common/timeout.cjs.map +1 -1
- package/dist/common/timeout.mjs +25 -1
- package/dist/common/timeout.mjs.map +1 -1
- package/dist/common/types.mjs +1 -1
- package/dist/common/utils.cjs +7 -1
- package/dist/common/utils.cjs.map +1 -1
- package/dist/common/utils.mjs +5 -1
- package/dist/common/utils.mjs.map +1 -1
- package/dist/common/uuid.cjs +307 -1
- package/dist/common/uuid.cjs.map +1 -1
- package/dist/common/uuid.mjs +284 -1
- package/dist/common/uuid.mjs.map +1 -1
- package/dist/{index-DHXVOH8h.d.cts → index-CFkMqHvX.d.cts} +1 -2
- package/dist/{index-DMaPyx9O.d.mts → index-C_3Y_s6f.d.mts} +1 -2
- package/dist/index.all.cjs +641 -1
- package/dist/index.all.d.cts +1 -1
- package/dist/index.all.d.mts +1 -1
- package/dist/index.all.mjs +113 -1
- package/dist/index.browser.cjs +576 -1
- package/dist/index.browser.d.cts +1 -1
- package/dist/index.browser.d.mts +1 -1
- package/dist/index.browser.mjs +98 -1
- package/dist/index.jsr.cjs +57 -1
- package/dist/index.jsr.mjs +6 -1
- package/dist/index.node.cjs +628 -1
- package/dist/index.node.d.cts +1 -1
- package/dist/index.node.d.mts +1 -1
- package/dist/index.node.mjs +106 -1
- package/dist/node/args.cjs +56 -1
- package/dist/node/args.cjs.map +1 -1
- package/dist/node/args.mjs +53 -1
- package/dist/node/args.mjs.map +1 -1
- package/dist/node/clipboard.cjs +18 -1
- package/dist/node/clipboard.cjs.map +1 -1
- package/dist/node/clipboard.mjs +16 -1
- package/dist/node/clipboard.mjs.map +1 -1
- package/dist/node/crypto.cjs +28 -1
- package/dist/node/crypto.cjs.map +1 -1
- package/dist/node/crypto.mjs +24 -1
- package/dist/node/crypto.mjs.map +1 -1
- package/dist/node/env.cjs +100 -4
- package/dist/node/env.cjs.map +1 -1
- package/dist/node/env.mjs +90 -4
- package/dist/node/env.mjs.map +1 -1
- package/dist/node/files-async.cjs +66 -1
- package/dist/node/files-async.cjs.map +1 -1
- package/dist/node/files-async.mjs +60 -1
- package/dist/node/files-async.mjs.map +1 -1
- package/dist/node/files.cjs +52 -1
- package/dist/node/files.cjs.map +1 -1
- package/dist/node/files.mjs +46 -1
- package/dist/node/files.mjs.map +1 -1
- package/dist/node/filestorage.cjs +100 -1
- package/dist/node/filestorage.cjs.map +1 -1
- package/dist/node/filestorage.mjs +97 -1
- package/dist/node/filestorage.mjs.map +1 -1
- package/dist/node/fs.cjs +119 -1
- package/dist/node/fs.cjs.map +1 -1
- package/dist/node/fs.mjs +101 -1
- package/dist/node/fs.mjs.map +1 -1
- package/dist/node/glob.cjs +75 -1
- package/dist/node/glob.cjs.map +1 -1
- package/dist/node/glob.mjs +73 -1
- package/dist/node/glob.mjs.map +1 -1
- package/dist/node/index.cjs +66 -1
- package/dist/node/index.mjs +16 -1
- package/dist/node/log/index.cjs +20 -1
- package/dist/node/log/index.mjs +7 -1
- package/dist/node/log/log-context-node.cjs +39 -1
- package/dist/node/log/log-context-node.cjs.map +1 -1
- package/dist/node/log/log-context-node.mjs +35 -1
- package/dist/node/log/log-context-node.mjs.map +1 -1
- package/dist/node/log/log-file-rotation.cjs +71 -1
- package/dist/node/log/log-file-rotation.cjs.map +1 -1
- package/dist/node/log/log-file-rotation.mjs +68 -1
- package/dist/node/log/log-file-rotation.mjs.map +1 -1
- package/dist/node/log/log-file.cjs +57 -1
- package/dist/node/log/log-file.cjs.map +1 -1
- package/dist/node/log/log-file.mjs +54 -1
- package/dist/node/log/log-file.mjs.map +1 -1
- package/dist/node/log/log-node.cjs +162 -1
- package/dist/node/log/log-node.cjs.map +1 -1
- package/dist/node/log/log-node.mjs +155 -1
- package/dist/node/log/log-node.mjs.map +1 -1
- package/dist/node/log/log-rotation.cjs +543 -3
- package/dist/node/log/log-rotation.cjs.map +1 -1
- package/dist/node/log/log-rotation.mjs +538 -3
- package/dist/node/log/log-rotation.mjs.map +1 -1
- package/dist/node/log/log-util.cjs +69 -3
- package/dist/node/log/log-util.cjs.map +1 -1
- package/dist/node/log/log-util.mjs +63 -3
- package/dist/node/log/log-util.mjs.map +1 -1
- package/dist/node/open-browser.cjs +20 -1
- package/dist/node/open-browser.cjs.map +1 -1
- package/dist/node/open-browser.mjs +18 -1
- package/dist/node/open-browser.mjs.map +1 -1
- package/package.json +15 -15
- package/src/common/schema/README.md +247 -66
- package/src/eslint-defaults.js +4 -0
- package/src/index.spec.ts +6 -6
- package/dist/bin-Ce3i6ABn.cjs +0 -3
- package/dist/bin-SPdenYkw.mjs +0 -3
- package/dist/chunk-0Lt9GpW0.mjs +0 -1
- package/dist/chunk-D-qHiVGv.cjs +0 -1
- package/src/common/schema/README-SCHEMA.md +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary.mjs","names":[],"sources":["../../../../src/common/bin/lib0/binary.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Binary data constants.\n */\n\n/**\n * n-th bit activated.\n */\nexport const BIT1 = 0b00000000000000000000000000000001\nexport const BIT2 = 0b00000000000000000000000000000010\nexport const BIT3 = 0b00000000000000000000000000000100\nexport const BIT4 = 0b00000000000000000000000000001000\nexport const BIT5 = 0b00000000000000000000000000010000\nexport const BIT6 = 0b00000000000000000000000000100000\nexport const BIT7 = 0b00000000000000000000000001000000\nexport const BIT8 = 0b00000000000000000000000010000000\nexport const BIT9 = 0b00000000000000000000000100000000\nexport const BIT10 = 0b00000000000000000000001000000000\nexport const BIT11 = 0b00000000000000000000010000000000\nexport const BIT12 = 0b00000000000000000000100000000000\nexport const BIT13 = 0b00000000000000000001000000000000\nexport const BIT14 = 0b00000000000000000010000000000000\nexport const BIT15 = 0b00000000000000000100000000000000\nexport const BIT16 = 0b00000000000000001000000000000000\nexport const BIT17 = 0b00000000000000010000000000000000\nexport const BIT18 = 0b00000000000000100000000000000000\nexport const BIT19 = 0b00000000000001000000000000000000\nexport const BIT20 = 0b00000000000010000000000000000000\nexport const BIT21 = 0b00000000000100000000000000000000\nexport const BIT22 = 0b00000000001000000000000000000000\nexport const BIT23 = 0b00000000010000000000000000000000\nexport const BIT24 = 0b00000000100000000000000000000000\nexport const BIT25 = 0b00000001000000000000000000000000\nexport const BIT26 = 0b00000010000000000000000000000000\nexport const BIT27 = 0b00000100000000000000000000000000\nexport const BIT28 = 0b00001000000000000000000000000000\nexport const BIT29 = 0b00010000000000000000000000000000\nexport const BIT30 = 0b00100000000000000000000000000000\nexport const BIT31 = 0b01000000000000000000000000000000\nexport const BIT32 = 0b10000000000000000000000000000000\n\n// for (let i = 0; i < 32; i++) {\n// let s = `export const BIT${i}= 0b`\n// for (let j = 0; j < 32; j++)\n// s += (31 - j) === i ? '1' : '0'\n// console.log(s)\n// }\n\n/**\n * First n bits activated.\n */\n\nexport const BITS0 = 0b00000000000000000000000000000000\nexport const BITS1 = 0b00000000000000000000000000000001\nexport const BITS2 = 0b00000000000000000000000000000011\nexport const BITS3 = 0b00000000000000000000000000000111\nexport const BITS4 = 0b00000000000000000000000000001111\nexport const BITS5 = 0b00000000000000000000000000011111\nexport const BITS6 = 0b00000000000000000000000000111111\nexport const BITS7 = 0b00000000000000000000000001111111\nexport const BITS8 = 0b00000000000000000000000011111111\nexport const BITS9 = 0b00000000000000000000000111111111\nexport const BITS10 = 0b00000000000000000000001111111111\nexport const BITS11 = 0b00000000000000000000011111111111\nexport const BITS12 = 0b00000000000000000000111111111111\nexport const BITS13 = 0b00000000000000000001111111111111\nexport const BITS14 = 0b00000000000000000011111111111111\nexport const BITS15 = 0b00000000000000000111111111111111\nexport const BITS16 = 0b00000000000000001111111111111111\nexport const BITS17 = 0b00000000000000011111111111111111\nexport const BITS18 = 0b00000000000000111111111111111111\nexport const BITS19 = 0b00000000000001111111111111111111\nexport const BITS20 = 0b00000000000011111111111111111111\nexport const BITS21 = 0b00000000000111111111111111111111\nexport const BITS22 = 0b00000000001111111111111111111111\nexport const BITS23 = 0b00000000011111111111111111111111\nexport const BITS24 = 0b00000000111111111111111111111111\nexport const BITS25 = 0b00000001111111111111111111111111\nexport const BITS26 = 0b00000011111111111111111111111111\nexport const BITS27 = 0b00000111111111111111111111111111\nexport const BITS28 = 0b00001111111111111111111111111111\nexport const BITS29 = 0b00011111111111111111111111111111\nexport const BITS30 = 0b00111111111111111111111111111111\nexport const BITS31 = 0b01111111111111111111111111111111\nexport const BITS32 = 0b11111111111111111111111111111111\n\n// for (let i = 0; i < 32; i++) {\n// let s = `export const BITS${i}= 0b`\n// for (let j = 0; j < 32; j++)\n// s += (32 - j) > i ? '0' : '1'\n// console.log(s)\n// }\n\n/*\nvar BIT0 = 1;\nvar BIT1 = 2;\nvar BIT2 = 4;\nvar BIT3 = 8;\nvar BIT4 = 16;\nvar BIT5 = 32;\nvar BIT6 = 64;\nvar BIT7 = 128;\nvar BIT8 = 256;\nvar BIT9 = 512;\nvar BIT10 = 1024;\nvar BIT11 = 2048;\nvar BIT12 = 4096;\nvar BIT13 = 8192;\nvar BIT14 = 16384;\nvar BIT15 = 32768;\nvar BIT16 = 65536;\nvar BIT17 = 131072;\nvar BIT18 = 262144;\nvar BIT19 = 524288;\nvar BIT20 = 1048576;\nvar BIT21 = 2097152;\nvar BIT22 = 4194304;\nvar BIT23 = 8388608;\nvar BIT24 = 16777216;\nvar BIT25 = 33554432;\nvar BIT26 = 67108864;\nvar BIT27 = 134217728;\nvar BIT28 = 268435456;\nvar BIT29 = 536870912;\nvar BIT30 = 1073741824;\nvar BIT31 = 2147483648;\nvar BITS0 = 0;\nvar BITS1 = 1;\nvar BITS2 = 3;\nvar BITS3 = 7;\nvar BITS4 = 15;\nvar BITS5 = 31;\nvar BITS6 = 63;\nvar BITS7 = 127;\nvar BITS8 = 255;\nvar BITS9 = 511;\nvar BITS10 = 1023;\nvar BITS11 = 2047;\nvar BITS12 = 4095;\nvar BITS13 = 8191;\nvar BITS14 = 16383;\nvar BITS15 = 32767;\nvar BITS16 = 65535;\nvar BITS17 = 131071;\nvar BITS18 = 262143;\nvar BITS19 = 524287;\nvar BITS20 = 1048575;\nvar BITS21 = 2097151;\nvar BITS22 = 4194303;\nvar BITS23 = 8388607;\nvar BITS24 = 16777215;\nvar BITS25 = 33554431;\nvar BITS26 = 67108863;\nvar BITS27 = 134217727;\nvar BITS28 = 268435455;\nvar BITS29 = 536870911;\nvar BITS30 = 1073741823;\nvar BITS31 = 2147483647;\nvar BITS32 = 4294967295;\n\n*/\n"],"mappings":"AASA,MAAa,
|
|
1
|
+
{"version":3,"file":"binary.mjs","names":[],"sources":["../../../../src/common/bin/lib0/binary.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Binary data constants.\n */\n\n/**\n * n-th bit activated.\n */\nexport const BIT1 = 0b00000000000000000000000000000001\nexport const BIT2 = 0b00000000000000000000000000000010\nexport const BIT3 = 0b00000000000000000000000000000100\nexport const BIT4 = 0b00000000000000000000000000001000\nexport const BIT5 = 0b00000000000000000000000000010000\nexport const BIT6 = 0b00000000000000000000000000100000\nexport const BIT7 = 0b00000000000000000000000001000000\nexport const BIT8 = 0b00000000000000000000000010000000\nexport const BIT9 = 0b00000000000000000000000100000000\nexport const BIT10 = 0b00000000000000000000001000000000\nexport const BIT11 = 0b00000000000000000000010000000000\nexport const BIT12 = 0b00000000000000000000100000000000\nexport const BIT13 = 0b00000000000000000001000000000000\nexport const BIT14 = 0b00000000000000000010000000000000\nexport const BIT15 = 0b00000000000000000100000000000000\nexport const BIT16 = 0b00000000000000001000000000000000\nexport const BIT17 = 0b00000000000000010000000000000000\nexport const BIT18 = 0b00000000000000100000000000000000\nexport const BIT19 = 0b00000000000001000000000000000000\nexport const BIT20 = 0b00000000000010000000000000000000\nexport const BIT21 = 0b00000000000100000000000000000000\nexport const BIT22 = 0b00000000001000000000000000000000\nexport const BIT23 = 0b00000000010000000000000000000000\nexport const BIT24 = 0b00000000100000000000000000000000\nexport const BIT25 = 0b00000001000000000000000000000000\nexport const BIT26 = 0b00000010000000000000000000000000\nexport const BIT27 = 0b00000100000000000000000000000000\nexport const BIT28 = 0b00001000000000000000000000000000\nexport const BIT29 = 0b00010000000000000000000000000000\nexport const BIT30 = 0b00100000000000000000000000000000\nexport const BIT31 = 0b01000000000000000000000000000000\nexport const BIT32 = 0b10000000000000000000000000000000\n\n// for (let i = 0; i < 32; i++) {\n// let s = `export const BIT${i}= 0b`\n// for (let j = 0; j < 32; j++)\n// s += (31 - j) === i ? '1' : '0'\n// console.log(s)\n// }\n\n/**\n * First n bits activated.\n */\n\nexport const BITS0 = 0b00000000000000000000000000000000\nexport const BITS1 = 0b00000000000000000000000000000001\nexport const BITS2 = 0b00000000000000000000000000000011\nexport const BITS3 = 0b00000000000000000000000000000111\nexport const BITS4 = 0b00000000000000000000000000001111\nexport const BITS5 = 0b00000000000000000000000000011111\nexport const BITS6 = 0b00000000000000000000000000111111\nexport const BITS7 = 0b00000000000000000000000001111111\nexport const BITS8 = 0b00000000000000000000000011111111\nexport const BITS9 = 0b00000000000000000000000111111111\nexport const BITS10 = 0b00000000000000000000001111111111\nexport const BITS11 = 0b00000000000000000000011111111111\nexport const BITS12 = 0b00000000000000000000111111111111\nexport const BITS13 = 0b00000000000000000001111111111111\nexport const BITS14 = 0b00000000000000000011111111111111\nexport const BITS15 = 0b00000000000000000111111111111111\nexport const BITS16 = 0b00000000000000001111111111111111\nexport const BITS17 = 0b00000000000000011111111111111111\nexport const BITS18 = 0b00000000000000111111111111111111\nexport const BITS19 = 0b00000000000001111111111111111111\nexport const BITS20 = 0b00000000000011111111111111111111\nexport const BITS21 = 0b00000000000111111111111111111111\nexport const BITS22 = 0b00000000001111111111111111111111\nexport const BITS23 = 0b00000000011111111111111111111111\nexport const BITS24 = 0b00000000111111111111111111111111\nexport const BITS25 = 0b00000001111111111111111111111111\nexport const BITS26 = 0b00000011111111111111111111111111\nexport const BITS27 = 0b00000111111111111111111111111111\nexport const BITS28 = 0b00001111111111111111111111111111\nexport const BITS29 = 0b00011111111111111111111111111111\nexport const BITS30 = 0b00111111111111111111111111111111\nexport const BITS31 = 0b01111111111111111111111111111111\nexport const BITS32 = 0b11111111111111111111111111111111\n\n// for (let i = 0; i < 32; i++) {\n// let s = `export const BITS${i}= 0b`\n// for (let j = 0; j < 32; j++)\n// s += (32 - j) > i ? '0' : '1'\n// console.log(s)\n// }\n\n/*\nvar BIT0 = 1;\nvar BIT1 = 2;\nvar BIT2 = 4;\nvar BIT3 = 8;\nvar BIT4 = 16;\nvar BIT5 = 32;\nvar BIT6 = 64;\nvar BIT7 = 128;\nvar BIT8 = 256;\nvar BIT9 = 512;\nvar BIT10 = 1024;\nvar BIT11 = 2048;\nvar BIT12 = 4096;\nvar BIT13 = 8192;\nvar BIT14 = 16384;\nvar BIT15 = 32768;\nvar BIT16 = 65536;\nvar BIT17 = 131072;\nvar BIT18 = 262144;\nvar BIT19 = 524288;\nvar BIT20 = 1048576;\nvar BIT21 = 2097152;\nvar BIT22 = 4194304;\nvar BIT23 = 8388608;\nvar BIT24 = 16777216;\nvar BIT25 = 33554432;\nvar BIT26 = 67108864;\nvar BIT27 = 134217728;\nvar BIT28 = 268435456;\nvar BIT29 = 536870912;\nvar BIT30 = 1073741824;\nvar BIT31 = 2147483648;\nvar BITS0 = 0;\nvar BITS1 = 1;\nvar BITS2 = 3;\nvar BITS3 = 7;\nvar BITS4 = 15;\nvar BITS5 = 31;\nvar BITS6 = 63;\nvar BITS7 = 127;\nvar BITS8 = 255;\nvar BITS9 = 511;\nvar BITS10 = 1023;\nvar BITS11 = 2047;\nvar BITS12 = 4095;\nvar BITS13 = 8191;\nvar BITS14 = 16383;\nvar BITS15 = 32767;\nvar BITS16 = 65535;\nvar BITS17 = 131071;\nvar BITS18 = 262143;\nvar BITS19 = 524287;\nvar BITS20 = 1048575;\nvar BITS21 = 2097151;\nvar BITS22 = 4194303;\nvar BITS23 = 8388607;\nvar BITS24 = 16777215;\nvar BITS25 = 33554431;\nvar BITS26 = 67108863;\nvar BITS27 = 134217727;\nvar BITS28 = 268435455;\nvar BITS29 = 536870911;\nvar BITS30 = 1073741823;\nvar BITS31 = 2147483647;\nvar BITS32 = 4294967295;\n\n*/\n"],"mappings":";;;;;;;;;AASA,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;;;;AAarB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,QAAQ;AACrB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,SAAS"}
|
|
@@ -1,2 +1,43 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_common_bin_lib0_decoding = require('./decoding.cjs');
|
|
3
|
+
const require_common_bin_lib0_encoding = require('./encoding.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/common/bin/lib0/buffer.ts
|
|
6
|
+
/**
|
|
7
|
+
* Original at https://github.com/dmonad/lib0
|
|
8
|
+
*
|
|
9
|
+
* Utility functions to work with buffers (Uint8Array).
|
|
10
|
+
*/
|
|
11
|
+
function createUint8ArrayFromLen(len) {
|
|
12
|
+
return new Uint8Array(len);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Copy the content of an Uint8Array view to a new ArrayBuffer.
|
|
16
|
+
*/
|
|
17
|
+
function copyUint8Array(uint8Array) {
|
|
18
|
+
const newBuf = createUint8ArrayFromLen(uint8Array.byteLength);
|
|
19
|
+
newBuf.set(uint8Array);
|
|
20
|
+
return newBuf;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Encode anything as a UInt8Array. It's a pun on typescripts's `any` type.
|
|
24
|
+
* See encoding.writeAny for more information.
|
|
25
|
+
*/
|
|
26
|
+
function encodeAny(data) {
|
|
27
|
+
const encoder = require_common_bin_lib0_encoding.createBinEncoder();
|
|
28
|
+
require_common_bin_lib0_encoding.writeAny(encoder, data);
|
|
29
|
+
return require_common_bin_lib0_encoding.encodeToUint8Array(encoder);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Decode an any-encoded value.
|
|
33
|
+
*/
|
|
34
|
+
function decodeAny(buf) {
|
|
35
|
+
return require_common_bin_lib0_decoding.readAny(require_common_bin_lib0_decoding.createDecoder(buf));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.copyUint8Array = copyUint8Array;
|
|
40
|
+
exports.createUint8ArrayFromLen = createUint8ArrayFromLen;
|
|
41
|
+
exports.decodeAny = decodeAny;
|
|
42
|
+
exports.encodeAny = encodeAny;
|
|
2
43
|
//# sourceMappingURL=buffer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.cjs","names":["createBinEncoder","encodeToUint8Array","readAny","createDecoder"],"sources":["../../../../src/common/bin/lib0/buffer.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Utility functions to work with buffers (Uint8Array).\n */\n\nimport { createDecoder, readAny } from './decoding'\nimport { createBinEncoder, encodeToUint8Array, writeAny } from './encoding'\n\nexport function createUint8ArrayFromLen(len: number): Uint8Array {\n return new Uint8Array(len)\n}\n\n/**\n * Copy the content of an Uint8Array view to a new ArrayBuffer.\n */\nexport function copyUint8Array(uint8Array: Uint8Array): Uint8Array {\n const newBuf = createUint8ArrayFromLen(uint8Array.byteLength)\n newBuf.set(uint8Array)\n return newBuf\n}\n\n/**\n * Encode anything as a UInt8Array. It's a pun on typescripts's `any` type.\n * See encoding.writeAny for more information.\n */\nexport function encodeAny(data: any): Uint8Array {\n const encoder = createBinEncoder()\n writeAny(encoder, data)\n return encodeToUint8Array(encoder)\n}\n\n/**\n * Decode an any-encoded value.\n */\nexport function decodeAny(buf: Uint8Array): any {\n return readAny(createDecoder(buf))\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"buffer.cjs","names":["createBinEncoder","encodeToUint8Array","readAny","createDecoder"],"sources":["../../../../src/common/bin/lib0/buffer.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Utility functions to work with buffers (Uint8Array).\n */\n\nimport { createDecoder, readAny } from './decoding'\nimport { createBinEncoder, encodeToUint8Array, writeAny } from './encoding'\n\nexport function createUint8ArrayFromLen(len: number): Uint8Array {\n return new Uint8Array(len)\n}\n\n/**\n * Copy the content of an Uint8Array view to a new ArrayBuffer.\n */\nexport function copyUint8Array(uint8Array: Uint8Array): Uint8Array {\n const newBuf = createUint8ArrayFromLen(uint8Array.byteLength)\n newBuf.set(uint8Array)\n return newBuf\n}\n\n/**\n * Encode anything as a UInt8Array. It's a pun on typescripts's `any` type.\n * See encoding.writeAny for more information.\n */\nexport function encodeAny(data: any): Uint8Array {\n const encoder = createBinEncoder()\n writeAny(encoder, data)\n return encodeToUint8Array(encoder)\n}\n\n/**\n * Decode an any-encoded value.\n */\nexport function decodeAny(buf: Uint8Array): any {\n return readAny(createDecoder(buf))\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,wBAAwB,KAAyB;AAC/D,QAAO,IAAI,WAAW,IAAI;;;;;AAM5B,SAAgB,eAAe,YAAoC;CACjE,MAAM,SAAS,wBAAwB,WAAW,WAAW;AAC7D,QAAO,IAAI,WAAW;AACtB,QAAO;;;;;;AAOT,SAAgB,UAAU,MAAuB;CAC/C,MAAM,UAAUA,mDAAkB;AAClC,2CAAS,SAAS,KAAK;AACvB,QAAOC,oDAAmB,QAAQ;;;;;AAMpC,SAAgB,UAAU,KAAsB;AAC9C,QAAOC,yCAAQC,+CAAc,IAAI,CAAC"}
|
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
import{createDecoder
|
|
1
|
+
import { createDecoder, readAny } from "./decoding.mjs";
|
|
2
|
+
import { createBinEncoder, encodeToUint8Array, writeAny } from "./encoding.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/common/bin/lib0/buffer.ts
|
|
5
|
+
/**
|
|
6
|
+
* Original at https://github.com/dmonad/lib0
|
|
7
|
+
*
|
|
8
|
+
* Utility functions to work with buffers (Uint8Array).
|
|
9
|
+
*/
|
|
10
|
+
function createUint8ArrayFromLen(len) {
|
|
11
|
+
return new Uint8Array(len);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Copy the content of an Uint8Array view to a new ArrayBuffer.
|
|
15
|
+
*/
|
|
16
|
+
function copyUint8Array(uint8Array) {
|
|
17
|
+
const newBuf = createUint8ArrayFromLen(uint8Array.byteLength);
|
|
18
|
+
newBuf.set(uint8Array);
|
|
19
|
+
return newBuf;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Encode anything as a UInt8Array. It's a pun on typescripts's `any` type.
|
|
23
|
+
* See encoding.writeAny for more information.
|
|
24
|
+
*/
|
|
25
|
+
function encodeAny(data) {
|
|
26
|
+
const encoder = createBinEncoder();
|
|
27
|
+
writeAny(encoder, data);
|
|
28
|
+
return encodeToUint8Array(encoder);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Decode an any-encoded value.
|
|
32
|
+
*/
|
|
33
|
+
function decodeAny(buf) {
|
|
34
|
+
return readAny(createDecoder(buf));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { copyUint8Array, createUint8ArrayFromLen, decodeAny, encodeAny };
|
|
2
39
|
//# sourceMappingURL=buffer.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.mjs","names":[],"sources":["../../../../src/common/bin/lib0/buffer.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Utility functions to work with buffers (Uint8Array).\n */\n\nimport { createDecoder, readAny } from './decoding'\nimport { createBinEncoder, encodeToUint8Array, writeAny } from './encoding'\n\nexport function createUint8ArrayFromLen(len: number): Uint8Array {\n return new Uint8Array(len)\n}\n\n/**\n * Copy the content of an Uint8Array view to a new ArrayBuffer.\n */\nexport function copyUint8Array(uint8Array: Uint8Array): Uint8Array {\n const newBuf = createUint8ArrayFromLen(uint8Array.byteLength)\n newBuf.set(uint8Array)\n return newBuf\n}\n\n/**\n * Encode anything as a UInt8Array. It's a pun on typescripts's `any` type.\n * See encoding.writeAny for more information.\n */\nexport function encodeAny(data: any): Uint8Array {\n const encoder = createBinEncoder()\n writeAny(encoder, data)\n return encodeToUint8Array(encoder)\n}\n\n/**\n * Decode an any-encoded value.\n */\nexport function decodeAny(buf: Uint8Array): any {\n return readAny(createDecoder(buf))\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"buffer.mjs","names":[],"sources":["../../../../src/common/bin/lib0/buffer.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Utility functions to work with buffers (Uint8Array).\n */\n\nimport { createDecoder, readAny } from './decoding'\nimport { createBinEncoder, encodeToUint8Array, writeAny } from './encoding'\n\nexport function createUint8ArrayFromLen(len: number): Uint8Array {\n return new Uint8Array(len)\n}\n\n/**\n * Copy the content of an Uint8Array view to a new ArrayBuffer.\n */\nexport function copyUint8Array(uint8Array: Uint8Array): Uint8Array {\n const newBuf = createUint8ArrayFromLen(uint8Array.byteLength)\n newBuf.set(uint8Array)\n return newBuf\n}\n\n/**\n * Encode anything as a UInt8Array. It's a pun on typescripts's `any` type.\n * See encoding.writeAny for more information.\n */\nexport function encodeAny(data: any): Uint8Array {\n const encoder = createBinEncoder()\n writeAny(encoder, data)\n return encodeToUint8Array(encoder)\n}\n\n/**\n * Decode an any-encoded value.\n */\nexport function decodeAny(buf: Uint8Array): any {\n return readAny(createDecoder(buf))\n}\n"],"mappings":";;;;;;;;;AASA,SAAgB,wBAAwB,KAAyB;AAC/D,QAAO,IAAI,WAAW,IAAI;;;;;AAM5B,SAAgB,eAAe,YAAoC;CACjE,MAAM,SAAS,wBAAwB,WAAW,WAAW;AAC7D,QAAO,IAAI,WAAW;AACtB,QAAO;;;;;;AAOT,SAAgB,UAAU,MAAuB;CAC/C,MAAM,UAAU,kBAAkB;AAClC,UAAS,SAAS,KAAK;AACvB,QAAO,mBAAmB,QAAQ;;;;;AAMpC,SAAgB,UAAU,KAAsB;AAC9C,QAAO,QAAQ,cAAc,IAAI,CAAC"}
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/common/bin/lib0/create.ts
|
|
4
|
+
/**
|
|
5
|
+
* Original at https://github.com/dmonad/lib0
|
|
6
|
+
*
|
|
7
|
+
* Utility functions to work with buffers (Uint8Array).
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Create Uint8Array with initial content from buffer
|
|
11
|
+
*/
|
|
12
|
+
function createUint8ArrayViewFromArrayBuffer(buffer, byteOffset, length) {
|
|
13
|
+
return new Uint8Array(buffer, byteOffset, length);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create Uint8Array with initial content from buffer
|
|
17
|
+
*/
|
|
18
|
+
function createUint8ArrayFromArrayBuffer(buffer) {
|
|
19
|
+
return new Uint8Array(buffer);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.createUint8ArrayFromArrayBuffer = createUint8ArrayFromArrayBuffer;
|
|
24
|
+
exports.createUint8ArrayViewFromArrayBuffer = createUint8ArrayViewFromArrayBuffer;
|
|
2
25
|
//# sourceMappingURL=create.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.cjs","names":[],"sources":["../../../../src/common/bin/lib0/create.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Utility functions to work with buffers (Uint8Array).\n */\n\n/**\n * Create Uint8Array with initial content from buffer\n */\nexport function createUint8ArrayViewFromArrayBuffer(buffer: ArrayBufferLike, byteOffset: number, length: number) {\n return new Uint8Array(buffer, byteOffset, length)\n}\n\n/**\n * Create Uint8Array with initial content from buffer\n */\nexport function createUint8ArrayFromArrayBuffer(buffer: ArrayBuffer) {\n return new Uint8Array(buffer)\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.cjs","names":[],"sources":["../../../../src/common/bin/lib0/create.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Utility functions to work with buffers (Uint8Array).\n */\n\n/**\n * Create Uint8Array with initial content from buffer\n */\nexport function createUint8ArrayViewFromArrayBuffer(buffer: ArrayBufferLike, byteOffset: number, length: number) {\n return new Uint8Array(buffer, byteOffset, length)\n}\n\n/**\n * Create Uint8Array with initial content from buffer\n */\nexport function createUint8ArrayFromArrayBuffer(buffer: ArrayBuffer) {\n return new Uint8Array(buffer)\n}\n"],"mappings":";;;;;;;;;;;AASA,SAAgB,oCAAoC,QAAyB,YAAoB,QAAgB;AAC/G,QAAO,IAAI,WAAW,QAAQ,YAAY,OAAO;;;;;AAMnD,SAAgB,gCAAgC,QAAqB;AACnE,QAAO,IAAI,WAAW,OAAO"}
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/common/bin/lib0/create.ts
|
|
2
|
+
/**
|
|
3
|
+
* Original at https://github.com/dmonad/lib0
|
|
4
|
+
*
|
|
5
|
+
* Utility functions to work with buffers (Uint8Array).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Create Uint8Array with initial content from buffer
|
|
9
|
+
*/
|
|
10
|
+
function createUint8ArrayViewFromArrayBuffer(buffer, byteOffset, length) {
|
|
11
|
+
return new Uint8Array(buffer, byteOffset, length);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create Uint8Array with initial content from buffer
|
|
15
|
+
*/
|
|
16
|
+
function createUint8ArrayFromArrayBuffer(buffer) {
|
|
17
|
+
return new Uint8Array(buffer);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { createUint8ArrayFromArrayBuffer, createUint8ArrayViewFromArrayBuffer };
|
|
2
22
|
//# sourceMappingURL=create.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.mjs","names":[],"sources":["../../../../src/common/bin/lib0/create.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Utility functions to work with buffers (Uint8Array).\n */\n\n/**\n * Create Uint8Array with initial content from buffer\n */\nexport function createUint8ArrayViewFromArrayBuffer(buffer: ArrayBufferLike, byteOffset: number, length: number) {\n return new Uint8Array(buffer, byteOffset, length)\n}\n\n/**\n * Create Uint8Array with initial content from buffer\n */\nexport function createUint8ArrayFromArrayBuffer(buffer: ArrayBuffer) {\n return new Uint8Array(buffer)\n}\n"],"mappings":"AASA,SAAgB,
|
|
1
|
+
{"version":3,"file":"create.mjs","names":[],"sources":["../../../../src/common/bin/lib0/create.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Utility functions to work with buffers (Uint8Array).\n */\n\n/**\n * Create Uint8Array with initial content from buffer\n */\nexport function createUint8ArrayViewFromArrayBuffer(buffer: ArrayBufferLike, byteOffset: number, length: number) {\n return new Uint8Array(buffer, byteOffset, length)\n}\n\n/**\n * Create Uint8Array with initial content from buffer\n */\nexport function createUint8ArrayFromArrayBuffer(buffer: ArrayBuffer) {\n return new Uint8Array(buffer)\n}\n"],"mappings":";;;;;;;;;AASA,SAAgB,oCAAoC,QAAyB,YAAoB,QAAgB;AAC/G,QAAO,IAAI,WAAW,QAAQ,YAAY,OAAO;;;;;AAMnD,SAAgB,gCAAgC,QAAqB;AACnE,QAAO,IAAI,WAAW,OAAO"}
|
|
@@ -1,2 +1,326 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_common_bin_lib0_binary = require('./binary.cjs');
|
|
3
|
+
const require_common_bin_lib0_create = require('./create.cjs');
|
|
4
|
+
const require_common_bin_lib0_string = require('./string.cjs');
|
|
5
|
+
|
|
6
|
+
//#region src/common/bin/lib0/decoding.ts
|
|
7
|
+
/**
|
|
8
|
+
* Original at https://github.com/dmonad/lib0
|
|
9
|
+
*
|
|
10
|
+
* Efficient schema-less binary decoding with support for variable length encoding.
|
|
11
|
+
*
|
|
12
|
+
* Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.
|
|
13
|
+
*
|
|
14
|
+
* Encodes numbers in little-endian order (least to most significant byte order)
|
|
15
|
+
* and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)
|
|
16
|
+
* which is also used in Protocol Buffers.
|
|
17
|
+
*
|
|
18
|
+
* ```js
|
|
19
|
+
* // encoding step
|
|
20
|
+
* const encoder = new encoding.createEncoder()
|
|
21
|
+
* encoding.writeVarUint(encoder, 256)
|
|
22
|
+
* encoding.writeVarString(encoder, 'Hello world!')
|
|
23
|
+
* const buf = encoding.toUint8Array(encoder)
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* ```js
|
|
27
|
+
* // decoding step
|
|
28
|
+
* const decoder = new decoding.createDecoder(buf)
|
|
29
|
+
* decoding.readVarUint(decoder) // => 256
|
|
30
|
+
* decoding.readVarString(decoder) // => 'Hello world!'
|
|
31
|
+
* decoding.hasContent(decoder) // => false - all data is read
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
const errorUnexpectedEndOfArray = "Unexpected end of array";
|
|
35
|
+
const errorIntegerOutOfRange = "Integer out of Range";
|
|
36
|
+
/**
|
|
37
|
+
* A BinDecoder handles the decoding of an Uint8Array.
|
|
38
|
+
*/
|
|
39
|
+
var BinDecoder = class {
|
|
40
|
+
/** Decoding target. */
|
|
41
|
+
arr;
|
|
42
|
+
/** Current decoding position. */
|
|
43
|
+
pos;
|
|
44
|
+
constructor(uint8Array) {
|
|
45
|
+
this.arr = uint8Array;
|
|
46
|
+
this.pos = 0;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
function createDecoder(uint8Array) {
|
|
50
|
+
return new BinDecoder(uint8Array);
|
|
51
|
+
}
|
|
52
|
+
function hasContent(decoder) {
|
|
53
|
+
return decoder.pos !== decoder.arr.length;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Clone a decoder instance.
|
|
57
|
+
* Optionally set a new position parameter.
|
|
58
|
+
*/
|
|
59
|
+
function clone(decoder, newPos = decoder.pos) {
|
|
60
|
+
const _decoder = createDecoder(decoder.arr);
|
|
61
|
+
_decoder.pos = newPos;
|
|
62
|
+
return _decoder;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Create an Uint8Array view of the next `len` bytes and advance the position by `len`.
|
|
66
|
+
*
|
|
67
|
+
* Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.
|
|
68
|
+
* Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.
|
|
69
|
+
*/
|
|
70
|
+
function readUint8Array(decoder, len) {
|
|
71
|
+
const view = require_common_bin_lib0_create.createUint8ArrayViewFromArrayBuffer(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len);
|
|
72
|
+
decoder.pos += len;
|
|
73
|
+
return view;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Read unsigned integer (32bit) with variable length.
|
|
77
|
+
* 1/8th of the storage is used as encoding overhead.
|
|
78
|
+
* numbers < 2^7 is stored in one bytlength
|
|
79
|
+
* numbers < 2^14 is stored in two bylength
|
|
80
|
+
*/
|
|
81
|
+
function readVarUint(decoder) {
|
|
82
|
+
let num = 0;
|
|
83
|
+
let mult = 1;
|
|
84
|
+
const len = decoder.arr.length;
|
|
85
|
+
while (decoder.pos < len) {
|
|
86
|
+
const r = decoder.arr[decoder.pos++];
|
|
87
|
+
num = num + (r & 127) * mult;
|
|
88
|
+
mult *= 128;
|
|
89
|
+
if (r < 128) return num;
|
|
90
|
+
if (num > Number.MAX_SAFE_INTEGER) throw new Error(errorIntegerOutOfRange);
|
|
91
|
+
}
|
|
92
|
+
throw new Error(errorUnexpectedEndOfArray);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Read variable length Uint8Array.
|
|
96
|
+
*
|
|
97
|
+
* Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.
|
|
98
|
+
* Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.
|
|
99
|
+
*/
|
|
100
|
+
function readVarUint8Array(decoder) {
|
|
101
|
+
return readUint8Array(decoder, readVarUint(decoder));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Read the rest of the content as an ArrayBuffer
|
|
105
|
+
*/
|
|
106
|
+
function readTailAsUint8Array(decoder) {
|
|
107
|
+
return readUint8Array(decoder, decoder.arr.length - decoder.pos);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Skip one byte, jump to the next position.
|
|
111
|
+
*/
|
|
112
|
+
function skip8(decoder) {
|
|
113
|
+
return decoder.pos++;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Read one byte as unsigned integer.
|
|
117
|
+
*/
|
|
118
|
+
function readUint8(decoder) {
|
|
119
|
+
return decoder.arr[decoder.pos++];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Read 2 bytes as unsigned integer.
|
|
123
|
+
*/
|
|
124
|
+
function readUint16(decoder) {
|
|
125
|
+
const uint = decoder.arr[decoder.pos] + (decoder.arr[decoder.pos + 1] << 8);
|
|
126
|
+
decoder.pos += 2;
|
|
127
|
+
return uint;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Read 4 bytes as unsigned integer.
|
|
131
|
+
*/
|
|
132
|
+
function readUint32(decoder) {
|
|
133
|
+
const uint = decoder.arr[decoder.pos] + (decoder.arr[decoder.pos + 1] << 8) + (decoder.arr[decoder.pos + 2] << 16) + (decoder.arr[decoder.pos + 3] << 24) >>> 0;
|
|
134
|
+
decoder.pos += 4;
|
|
135
|
+
return uint;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Read 4 bytes as unsigned integer in big endian order.
|
|
139
|
+
* (most significant byte first)
|
|
140
|
+
*/
|
|
141
|
+
function readUint32BigEndian(decoder) {
|
|
142
|
+
const uint = decoder.arr[decoder.pos + 3] + (decoder.arr[decoder.pos + 2] << 8) + (decoder.arr[decoder.pos + 1] << 16) + (decoder.arr[decoder.pos] << 24) >>> 0;
|
|
143
|
+
decoder.pos += 4;
|
|
144
|
+
return uint;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Look ahead without incrementing the position
|
|
148
|
+
* to the next byte and read it as unsigned integer.
|
|
149
|
+
*/
|
|
150
|
+
function peekUint8(decoder) {
|
|
151
|
+
return decoder.arr[decoder.pos];
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Look ahead without incrementing the position
|
|
155
|
+
* to the next byte and read it as unsigned integer.
|
|
156
|
+
*/
|
|
157
|
+
function peekUint16(decoder) {
|
|
158
|
+
return decoder.arr[decoder.pos] + (decoder.arr[decoder.pos + 1] << 8);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Look ahead without incrementing the position
|
|
162
|
+
* to the next byte and read it as unsigned integer.
|
|
163
|
+
*/
|
|
164
|
+
function peekUint32(decoder) {
|
|
165
|
+
return decoder.arr[decoder.pos] + (decoder.arr[decoder.pos + 1] << 8) + (decoder.arr[decoder.pos + 2] << 16) + (decoder.arr[decoder.pos + 3] << 24) >>> 0;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Read signed integer (32bit) with variable length.
|
|
169
|
+
* 1/8th of the storage is used as encoding overhead.
|
|
170
|
+
* numbers < 2^7 is stored in one bytlength
|
|
171
|
+
* numbers < 2^14 is stored in two bylength
|
|
172
|
+
* @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change.
|
|
173
|
+
*/
|
|
174
|
+
function readVarInt(decoder) {
|
|
175
|
+
let r = decoder.arr[decoder.pos++];
|
|
176
|
+
let num = r & 63;
|
|
177
|
+
let mult = 64;
|
|
178
|
+
const sign = (r & 64) > 0 ? -1 : 1;
|
|
179
|
+
if ((r & 128) === 0) return sign * num;
|
|
180
|
+
const len = decoder.arr.length;
|
|
181
|
+
while (decoder.pos < len) {
|
|
182
|
+
r = decoder.arr[decoder.pos++];
|
|
183
|
+
num = num + (r & 127) * mult;
|
|
184
|
+
mult *= 128;
|
|
185
|
+
if (r < 128) return sign * num;
|
|
186
|
+
if (num > Number.MAX_SAFE_INTEGER) throw new Error(errorIntegerOutOfRange);
|
|
187
|
+
}
|
|
188
|
+
throw new Error(errorUnexpectedEndOfArray);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Look ahead and read varUint without incrementing position
|
|
192
|
+
*/
|
|
193
|
+
function peekVarUint(decoder) {
|
|
194
|
+
const pos = decoder.pos;
|
|
195
|
+
const s = readVarUint(decoder);
|
|
196
|
+
decoder.pos = pos;
|
|
197
|
+
return s;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Look ahead and read varUint without incrementing position
|
|
201
|
+
*/
|
|
202
|
+
function peekVarInt(decoder) {
|
|
203
|
+
const pos = decoder.pos;
|
|
204
|
+
const s = readVarInt(decoder);
|
|
205
|
+
decoder.pos = pos;
|
|
206
|
+
return s;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* We don't test this function anymore as we use native decoding/encoding by default now.
|
|
210
|
+
* Better not modify this anymore..
|
|
211
|
+
*
|
|
212
|
+
* Transforming utf8 to a string is pretty expensive. The code performs 10x better
|
|
213
|
+
* when String.fromCodePoint is fed with all characters as arguments.
|
|
214
|
+
* But most environments have a maximum number of arguments per functions.
|
|
215
|
+
* For effiency reasons we apply a maximum of 10000 characters at once.
|
|
216
|
+
*/
|
|
217
|
+
function _readVarStringPolyfill(decoder) {
|
|
218
|
+
let remainingLen = readVarUint(decoder);
|
|
219
|
+
if (remainingLen === 0) return "";
|
|
220
|
+
else {
|
|
221
|
+
let encodedString = String.fromCodePoint(readUint8(decoder));
|
|
222
|
+
if (--remainingLen < 100) while (remainingLen--) encodedString += String.fromCodePoint(readUint8(decoder));
|
|
223
|
+
else while (remainingLen > 0) {
|
|
224
|
+
const nextLen = remainingLen < 1e4 ? remainingLen : 1e4;
|
|
225
|
+
const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen);
|
|
226
|
+
decoder.pos += nextLen;
|
|
227
|
+
encodedString += String.fromCodePoint(...bytes);
|
|
228
|
+
remainingLen -= nextLen;
|
|
229
|
+
}
|
|
230
|
+
return decodeURIComponent(escape(encodedString));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Read string of variable length
|
|
235
|
+
* varUint is used to store the length of the string
|
|
236
|
+
*/
|
|
237
|
+
function readVarString(decoder) {
|
|
238
|
+
const utf8TextDecoder = require_common_bin_lib0_string.getUtf8TextDecoder();
|
|
239
|
+
return utf8TextDecoder ? utf8TextDecoder.decode(readVarUint8Array(decoder)) : _readVarStringPolyfill(decoder);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Look ahead and read varString without incrementing position
|
|
243
|
+
*/
|
|
244
|
+
function peekVarString(decoder) {
|
|
245
|
+
const pos = decoder.pos;
|
|
246
|
+
const s = readVarString(decoder);
|
|
247
|
+
decoder.pos = pos;
|
|
248
|
+
return s;
|
|
249
|
+
}
|
|
250
|
+
function readFromDataView(decoder, len) {
|
|
251
|
+
const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len);
|
|
252
|
+
decoder.pos += len;
|
|
253
|
+
return dv;
|
|
254
|
+
}
|
|
255
|
+
function readFloat32(decoder) {
|
|
256
|
+
return readFromDataView(decoder, 4).getFloat32(0, false);
|
|
257
|
+
}
|
|
258
|
+
function readFloat64(decoder) {
|
|
259
|
+
return readFromDataView(decoder, 8).getFloat64(0, false);
|
|
260
|
+
}
|
|
261
|
+
function readBigInt64(decoder) {
|
|
262
|
+
return readFromDataView(decoder, 8).getBigInt64(0, false);
|
|
263
|
+
}
|
|
264
|
+
function readBigUint64(decoder) {
|
|
265
|
+
return readFromDataView(decoder, 8).getBigUint64(0, false);
|
|
266
|
+
}
|
|
267
|
+
const readAnyLookupTable = [
|
|
268
|
+
(_) => void 0,
|
|
269
|
+
(_) => null,
|
|
270
|
+
readVarInt,
|
|
271
|
+
readFloat32,
|
|
272
|
+
readFloat64,
|
|
273
|
+
readBigInt64,
|
|
274
|
+
(_) => false,
|
|
275
|
+
(_) => true,
|
|
276
|
+
readVarString,
|
|
277
|
+
(decoder) => {
|
|
278
|
+
const len = readVarUint(decoder);
|
|
279
|
+
const obj = {};
|
|
280
|
+
for (let i = 0; i < len; i++) {
|
|
281
|
+
const key = readVarString(decoder);
|
|
282
|
+
obj[key] = readAny(decoder);
|
|
283
|
+
}
|
|
284
|
+
return obj;
|
|
285
|
+
},
|
|
286
|
+
(decoder) => {
|
|
287
|
+
const len = readVarUint(decoder);
|
|
288
|
+
const arr = [];
|
|
289
|
+
for (let i = 0; i < len; i++) arr.push(readAny(decoder));
|
|
290
|
+
return arr;
|
|
291
|
+
},
|
|
292
|
+
readVarUint8Array
|
|
293
|
+
];
|
|
294
|
+
function readAny(decoder) {
|
|
295
|
+
return readAnyLookupTable[127 - readUint8(decoder)](decoder);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
//#endregion
|
|
299
|
+
exports.BinDecoder = BinDecoder;
|
|
300
|
+
exports.clone = clone;
|
|
301
|
+
exports.createDecoder = createDecoder;
|
|
302
|
+
exports.hasContent = hasContent;
|
|
303
|
+
exports.peekUint16 = peekUint16;
|
|
304
|
+
exports.peekUint32 = peekUint32;
|
|
305
|
+
exports.peekUint8 = peekUint8;
|
|
306
|
+
exports.peekVarInt = peekVarInt;
|
|
307
|
+
exports.peekVarString = peekVarString;
|
|
308
|
+
exports.peekVarUint = peekVarUint;
|
|
309
|
+
exports.readAny = readAny;
|
|
310
|
+
exports.readBigInt64 = readBigInt64;
|
|
311
|
+
exports.readBigUint64 = readBigUint64;
|
|
312
|
+
exports.readFloat32 = readFloat32;
|
|
313
|
+
exports.readFloat64 = readFloat64;
|
|
314
|
+
exports.readFromDataView = readFromDataView;
|
|
315
|
+
exports.readTailAsUint8Array = readTailAsUint8Array;
|
|
316
|
+
exports.readUint16 = readUint16;
|
|
317
|
+
exports.readUint32 = readUint32;
|
|
318
|
+
exports.readUint32BigEndian = readUint32BigEndian;
|
|
319
|
+
exports.readUint8 = readUint8;
|
|
320
|
+
exports.readUint8Array = readUint8Array;
|
|
321
|
+
exports.readVarInt = readVarInt;
|
|
322
|
+
exports.readVarString = readVarString;
|
|
323
|
+
exports.readVarUint = readVarUint;
|
|
324
|
+
exports.readVarUint8Array = readVarUint8Array;
|
|
325
|
+
exports.skip8 = skip8;
|
|
2
326
|
//# sourceMappingURL=decoding.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decoding.cjs","names":["createUint8ArrayViewFromArrayBuffer","getUtf8TextDecoder"],"sources":["../../../../src/common/bin/lib0/decoding.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Efficient schema-less binary decoding with support for variable length encoding.\n *\n * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = new encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = new decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n */\n\nimport { BIT7, BIT8, BITS6, BITS7 } from './binary'\nimport { createUint8ArrayViewFromArrayBuffer } from './create'\nimport { getUtf8TextDecoder } from './string'\n\nconst errorUnexpectedEndOfArray = 'Unexpected end of array'\nconst errorIntegerOutOfRange = 'Integer out of Range'\n\n/**\n * A BinDecoder handles the decoding of an Uint8Array.\n */\nexport class BinDecoder {\n /** Decoding target. */\n arr: Uint8Array\n /** Current decoding position. */\n pos: number\n\n constructor(uint8Array: Uint8Array) {\n this.arr = uint8Array\n this.pos = 0\n }\n}\n\nexport function createDecoder(uint8Array: Uint8Array): BinDecoder {\n return new BinDecoder(uint8Array)\n}\n\nexport function hasContent(decoder: BinDecoder): boolean {\n return decoder.pos !== decoder.arr.length\n}\n\n/**\n * Clone a decoder instance.\n * Optionally set a new position parameter.\n */\nexport function clone(decoder: BinDecoder, newPos: number = decoder.pos): BinDecoder {\n const _decoder = createDecoder(decoder.arr)\n _decoder.pos = newPos\n return _decoder\n}\n\n/**\n * Create an Uint8Array view of the next `len` bytes and advance the position by `len`.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n */\nexport function readUint8Array(decoder: BinDecoder, len: number): Uint8Array {\n const view = createUint8ArrayViewFromArrayBuffer(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len)\n decoder.pos += len\n return view\n}\n\n/**\n * Read unsigned integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * numbers < 2^7 is stored in one bytlength\n * numbers < 2^14 is stored in two bylength\n */\nexport function readVarUint(decoder: BinDecoder): number {\n let num = 0\n let mult = 1\n const len = decoder.arr.length\n while (decoder.pos < len) {\n const r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & BITS7) * mult // shift $r << (7*#iterations) and add it to num\n mult *= 128 // next iteration, shift 7 \"more\" to the left\n if (r < BIT8)\n return num\n if (num > Number.MAX_SAFE_INTEGER)\n throw new Error(errorIntegerOutOfRange)\n }\n throw new Error(errorUnexpectedEndOfArray)\n}\n\n/**\n * Read variable length Uint8Array.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n */\nexport function readVarUint8Array(decoder: BinDecoder): Uint8Array {\n return readUint8Array(decoder, readVarUint(decoder))\n}\n\n/**\n * Read the rest of the content as an ArrayBuffer\n */\nexport function readTailAsUint8Array(decoder: BinDecoder): Uint8Array {\n return readUint8Array(decoder, decoder.arr.length - decoder.pos)\n}\n\n/**\n * Skip one byte, jump to the next position.\n */\nexport function skip8(decoder: BinDecoder): number {\n return decoder.pos++\n}\n\n/**\n * Read one byte as unsigned integer.\n */\nexport function readUint8(decoder: BinDecoder): number {\n return decoder.arr[decoder.pos++]\n}\n\n/**\n * Read 2 bytes as unsigned integer.\n */\nexport function readUint16(decoder: BinDecoder): number {\n const uint = decoder.arr[decoder.pos]\n + (decoder.arr[decoder.pos + 1] << 8)\n decoder.pos += 2\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer.\n */\nexport function readUint32(decoder: BinDecoder): number {\n const uint = (decoder.arr[decoder.pos]\n + (decoder.arr[decoder.pos + 1] << 8)\n + (decoder.arr[decoder.pos + 2] << 16)\n + (decoder.arr[decoder.pos + 3] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer in big endian order.\n * (most significant byte first)\n */\nexport function readUint32BigEndian(decoder: BinDecoder): number {\n const uint = (decoder.arr[decoder.pos + 3]\n + (decoder.arr[decoder.pos + 2] << 8)\n + (decoder.arr[decoder.pos + 1] << 16)\n + (decoder.arr[decoder.pos] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n */\nexport function peekUint8(decoder: BinDecoder): number {\n return decoder.arr[decoder.pos]\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n */\nexport function peekUint16(decoder: BinDecoder): number {\n return decoder.arr[decoder.pos]\n + (decoder.arr[decoder.pos + 1] << 8)\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n */\nexport function peekUint32(decoder: BinDecoder): number {\n return (\n decoder.arr[decoder.pos]\n + (decoder.arr[decoder.pos + 1] << 8)\n + (decoder.arr[decoder.pos + 2] << 16)\n + (decoder.arr[decoder.pos + 3] << 24)\n ) >>> 0\n}\n\n/**\n * Read signed integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * numbers < 2^7 is stored in one bytlength\n * numbers < 2^14 is stored in two bylength\n * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change.\n */\nexport function readVarInt(decoder: BinDecoder): number {\n let r = decoder.arr[decoder.pos++]\n let num = r & BITS6\n let mult = 64\n const sign = (r & BIT7) > 0 ? -1 : 1 // use Math.sign(?) for performance?\n if ((r & BIT8) === 0) {\n // don't continue reading\n return sign * num\n }\n const len = decoder.arr.length\n while (decoder.pos < len) {\n r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & BITS7) * mult\n mult *= 128\n if (r < BIT8)\n return sign * num\n\n if (num > Number.MAX_SAFE_INTEGER)\n throw new Error(errorIntegerOutOfRange)\n }\n throw new Error(errorUnexpectedEndOfArray)\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n */\nexport function peekVarUint(decoder: BinDecoder): number {\n const pos = decoder.pos\n const s = readVarUint(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n */\nexport function peekVarInt(decoder: BinDecoder): number {\n const pos = decoder.pos\n const s = readVarInt(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * We don't test this function anymore as we use native decoding/encoding by default now.\n * Better not modify this anymore..\n *\n * Transforming utf8 to a string is pretty expensive. The code performs 10x better\n * when String.fromCodePoint is fed with all characters as arguments.\n * But most environments have a maximum number of arguments per functions.\n * For effiency reasons we apply a maximum of 10000 characters at once.\n */\nfunction _readVarStringPolyfill(decoder: BinDecoder): string {\n let remainingLen = readVarUint(decoder)\n if (remainingLen === 0) {\n return ''\n }\n else {\n let encodedString = String.fromCodePoint(readUint8(decoder)) // remember to decrease remainingLen\n if (--remainingLen < 100) { // do not create a Uint8Array for small strings\n while (remainingLen--)\n encodedString += String.fromCodePoint(readUint8(decoder))\n }\n else {\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n // this is dangerous, we create a fresh array view from the existing buffer\n const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen)\n decoder.pos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint(...bytes as any)\n remainingLen -= nextLen\n }\n }\n return decodeURIComponent(escape(encodedString))\n }\n}\n\n/**\n * Read string of variable length\n * varUint is used to store the length of the string\n */\nexport function readVarString(decoder: BinDecoder): string {\n const utf8TextDecoder = getUtf8TextDecoder()\n return utf8TextDecoder\n ? utf8TextDecoder.decode(readVarUint8Array(decoder))\n : _readVarStringPolyfill(decoder)\n}\n\n/**\n * Look ahead and read varString without incrementing position\n */\nexport function peekVarString(decoder: BinDecoder): string {\n const pos = decoder.pos\n const s = readVarString(decoder)\n decoder.pos = pos\n return s\n}\n\nexport function readFromDataView(decoder: BinDecoder, len: number): DataView {\n const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len)\n decoder.pos += len\n return dv\n}\n\nexport function readFloat32(decoder: BinDecoder) {\n return readFromDataView(decoder, 4).getFloat32(0, false)\n}\n\nexport function readFloat64(decoder: BinDecoder) {\n return readFromDataView(decoder, 8).getFloat64(0, false)\n}\n\nexport function readBigInt64(decoder: BinDecoder) {\n return (readFromDataView(decoder, 8)).getBigInt64(0, false)\n}\n\nexport function readBigUint64(decoder: BinDecoder) {\n return (readFromDataView(decoder, 8)).getBigUint64(0, false)\n}\n\nconst readAnyLookupTable: Array<((arg0: BinDecoder) => any)> = [\n _ => undefined, // CASE 127: undefined\n _ => null, // CASE 126: null\n readVarInt, // CASE 125: integer\n readFloat32, // CASE 124: float32\n readFloat64, // CASE 123: float64\n readBigInt64, // CASE 122: bigint\n _ => false, // CASE 121: boolean (false)\n _ => true, // CASE 120: boolean (true)\n readVarString, // CASE 119: string\n (decoder) => { // CASE 118: object<string,any>\n const len = readVarUint(decoder)\n const obj: { [s: string]: any } = {}\n for (let i = 0; i < len; i++) {\n const key = readVarString(decoder)\n obj[key] = readAny(decoder)\n }\n return obj\n },\n (decoder) => { // CASE 117: array<any>\n const len = readVarUint(decoder)\n const arr = []\n for (let i = 0; i < len; i++)\n\n arr.push(readAny(decoder))\n\n return arr\n },\n readVarUint8Array, // CASE 116: Uint8Array\n]\n\nexport function readAny(decoder: BinDecoder) {\n return readAnyLookupTable[127 - readUint8(decoder)](decoder)\n}\n"],"mappings":"qJAgCM,EAA4B,0BAC5B,EAAyB,uBAK/B,IAAa,EAAb,KAAwB,CAEtB,IAEA,IAEA,YAAY,EAAwB,CAClC,KAAK,IAAM,EACX,KAAK,IAAM,IAIf,SAAgB,EAAc,EAAoC,CAChE,OAAO,IAAI,EAAW,EAAW,CAGnC,SAAgB,EAAW,EAA8B,CACvD,OAAO,EAAQ,MAAQ,EAAQ,IAAI,OAOrC,SAAgB,EAAM,EAAqB,EAAiB,EAAQ,IAAiB,CACnF,IAAM,EAAW,EAAc,EAAQ,IAAI,CAE3C,MADA,GAAS,IAAM,EACR,EAST,SAAgB,EAAe,EAAqB,EAAyB,CAC3E,IAAM,EAAOA,EAAAA,oCAAoC,EAAQ,IAAI,OAAQ,EAAQ,IAAM,EAAQ,IAAI,WA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EAAK,IAEvB,EAAI,KAAK,EAAQ,EAAQ,CAAC,CAE5B,OAAO,GAET,EACD,CAED,SAAgB,EAAQ,EAAqB,CAC3C,OAAO,EAAmB,IAAM,EAAU,EAAQ,EAAE,EAAQ"}
|
|
1
|
+
{"version":3,"file":"decoding.cjs","names":["createUint8ArrayViewFromArrayBuffer","getUtf8TextDecoder"],"sources":["../../../../src/common/bin/lib0/decoding.ts"],"sourcesContent":["/**\n * Original at https://github.com/dmonad/lib0\n *\n * Efficient schema-less binary decoding with support for variable length encoding.\n *\n * Use [lib0/decoding] with [lib0/encoding]. Every encoding function has a corresponding decoding function.\n *\n * Encodes numbers in little-endian order (least to most significant byte order)\n * and is compatible with Golang's binary encoding (https://golang.org/pkg/encoding/binary/)\n * which is also used in Protocol Buffers.\n *\n * ```js\n * // encoding step\n * const encoder = new encoding.createEncoder()\n * encoding.writeVarUint(encoder, 256)\n * encoding.writeVarString(encoder, 'Hello world!')\n * const buf = encoding.toUint8Array(encoder)\n * ```\n *\n * ```js\n * // decoding step\n * const decoder = new decoding.createDecoder(buf)\n * decoding.readVarUint(decoder) // => 256\n * decoding.readVarString(decoder) // => 'Hello world!'\n * decoding.hasContent(decoder) // => false - all data is read\n * ```\n */\n\nimport { BIT7, BIT8, BITS6, BITS7 } from './binary'\nimport { createUint8ArrayViewFromArrayBuffer } from './create'\nimport { getUtf8TextDecoder } from './string'\n\nconst errorUnexpectedEndOfArray = 'Unexpected end of array'\nconst errorIntegerOutOfRange = 'Integer out of Range'\n\n/**\n * A BinDecoder handles the decoding of an Uint8Array.\n */\nexport class BinDecoder {\n /** Decoding target. */\n arr: Uint8Array\n /** Current decoding position. */\n pos: number\n\n constructor(uint8Array: Uint8Array) {\n this.arr = uint8Array\n this.pos = 0\n }\n}\n\nexport function createDecoder(uint8Array: Uint8Array): BinDecoder {\n return new BinDecoder(uint8Array)\n}\n\nexport function hasContent(decoder: BinDecoder): boolean {\n return decoder.pos !== decoder.arr.length\n}\n\n/**\n * Clone a decoder instance.\n * Optionally set a new position parameter.\n */\nexport function clone(decoder: BinDecoder, newPos: number = decoder.pos): BinDecoder {\n const _decoder = createDecoder(decoder.arr)\n _decoder.pos = newPos\n return _decoder\n}\n\n/**\n * Create an Uint8Array view of the next `len` bytes and advance the position by `len`.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n */\nexport function readUint8Array(decoder: BinDecoder, len: number): Uint8Array {\n const view = createUint8ArrayViewFromArrayBuffer(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len)\n decoder.pos += len\n return view\n}\n\n/**\n * Read unsigned integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * numbers < 2^7 is stored in one bytlength\n * numbers < 2^14 is stored in two bylength\n */\nexport function readVarUint(decoder: BinDecoder): number {\n let num = 0\n let mult = 1\n const len = decoder.arr.length\n while (decoder.pos < len) {\n const r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & BITS7) * mult // shift $r << (7*#iterations) and add it to num\n mult *= 128 // next iteration, shift 7 \"more\" to the left\n if (r < BIT8)\n return num\n if (num > Number.MAX_SAFE_INTEGER)\n throw new Error(errorIntegerOutOfRange)\n }\n throw new Error(errorUnexpectedEndOfArray)\n}\n\n/**\n * Read variable length Uint8Array.\n *\n * Important: The Uint8Array still points to the underlying ArrayBuffer. Make sure to discard the result as soon as possible to prevent any memory leaks.\n * Use `buffer.copyUint8Array` to copy the result into a new Uint8Array.\n */\nexport function readVarUint8Array(decoder: BinDecoder): Uint8Array {\n return readUint8Array(decoder, readVarUint(decoder))\n}\n\n/**\n * Read the rest of the content as an ArrayBuffer\n */\nexport function readTailAsUint8Array(decoder: BinDecoder): Uint8Array {\n return readUint8Array(decoder, decoder.arr.length - decoder.pos)\n}\n\n/**\n * Skip one byte, jump to the next position.\n */\nexport function skip8(decoder: BinDecoder): number {\n return decoder.pos++\n}\n\n/**\n * Read one byte as unsigned integer.\n */\nexport function readUint8(decoder: BinDecoder): number {\n return decoder.arr[decoder.pos++]\n}\n\n/**\n * Read 2 bytes as unsigned integer.\n */\nexport function readUint16(decoder: BinDecoder): number {\n const uint = decoder.arr[decoder.pos]\n + (decoder.arr[decoder.pos + 1] << 8)\n decoder.pos += 2\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer.\n */\nexport function readUint32(decoder: BinDecoder): number {\n const uint = (decoder.arr[decoder.pos]\n + (decoder.arr[decoder.pos + 1] << 8)\n + (decoder.arr[decoder.pos + 2] << 16)\n + (decoder.arr[decoder.pos + 3] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Read 4 bytes as unsigned integer in big endian order.\n * (most significant byte first)\n */\nexport function readUint32BigEndian(decoder: BinDecoder): number {\n const uint = (decoder.arr[decoder.pos + 3]\n + (decoder.arr[decoder.pos + 2] << 8)\n + (decoder.arr[decoder.pos + 1] << 16)\n + (decoder.arr[decoder.pos] << 24)) >>> 0\n decoder.pos += 4\n return uint\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n */\nexport function peekUint8(decoder: BinDecoder): number {\n return decoder.arr[decoder.pos]\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n */\nexport function peekUint16(decoder: BinDecoder): number {\n return decoder.arr[decoder.pos]\n + (decoder.arr[decoder.pos + 1] << 8)\n}\n\n/**\n * Look ahead without incrementing the position\n * to the next byte and read it as unsigned integer.\n */\nexport function peekUint32(decoder: BinDecoder): number {\n return (\n decoder.arr[decoder.pos]\n + (decoder.arr[decoder.pos + 1] << 8)\n + (decoder.arr[decoder.pos + 2] << 16)\n + (decoder.arr[decoder.pos + 3] << 24)\n ) >>> 0\n}\n\n/**\n * Read signed integer (32bit) with variable length.\n * 1/8th of the storage is used as encoding overhead.\n * numbers < 2^7 is stored in one bytlength\n * numbers < 2^14 is stored in two bylength\n * @todo This should probably create the inverse ~num if number is negative - but this would be a breaking change.\n */\nexport function readVarInt(decoder: BinDecoder): number {\n let r = decoder.arr[decoder.pos++]\n let num = r & BITS6\n let mult = 64\n const sign = (r & BIT7) > 0 ? -1 : 1 // use Math.sign(?) for performance?\n if ((r & BIT8) === 0) {\n // don't continue reading\n return sign * num\n }\n const len = decoder.arr.length\n while (decoder.pos < len) {\n r = decoder.arr[decoder.pos++]\n // num = num | ((r & binary.BITS7) << len)\n num = num + (r & BITS7) * mult\n mult *= 128\n if (r < BIT8)\n return sign * num\n\n if (num > Number.MAX_SAFE_INTEGER)\n throw new Error(errorIntegerOutOfRange)\n }\n throw new Error(errorUnexpectedEndOfArray)\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n */\nexport function peekVarUint(decoder: BinDecoder): number {\n const pos = decoder.pos\n const s = readVarUint(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * Look ahead and read varUint without incrementing position\n */\nexport function peekVarInt(decoder: BinDecoder): number {\n const pos = decoder.pos\n const s = readVarInt(decoder)\n decoder.pos = pos\n return s\n}\n\n/**\n * We don't test this function anymore as we use native decoding/encoding by default now.\n * Better not modify this anymore..\n *\n * Transforming utf8 to a string is pretty expensive. The code performs 10x better\n * when String.fromCodePoint is fed with all characters as arguments.\n * But most environments have a maximum number of arguments per functions.\n * For effiency reasons we apply a maximum of 10000 characters at once.\n */\nfunction _readVarStringPolyfill(decoder: BinDecoder): string {\n let remainingLen = readVarUint(decoder)\n if (remainingLen === 0) {\n return ''\n }\n else {\n let encodedString = String.fromCodePoint(readUint8(decoder)) // remember to decrease remainingLen\n if (--remainingLen < 100) { // do not create a Uint8Array for small strings\n while (remainingLen--)\n encodedString += String.fromCodePoint(readUint8(decoder))\n }\n else {\n while (remainingLen > 0) {\n const nextLen = remainingLen < 10000 ? remainingLen : 10000\n // this is dangerous, we create a fresh array view from the existing buffer\n const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen)\n decoder.pos += nextLen\n // Starting with ES5.1 we can supply a generic array-like object as arguments\n encodedString += String.fromCodePoint(...bytes as any)\n remainingLen -= nextLen\n }\n }\n return decodeURIComponent(escape(encodedString))\n }\n}\n\n/**\n * Read string of variable length\n * varUint is used to store the length of the string\n */\nexport function readVarString(decoder: BinDecoder): string {\n const utf8TextDecoder = getUtf8TextDecoder()\n return utf8TextDecoder\n ? utf8TextDecoder.decode(readVarUint8Array(decoder))\n : _readVarStringPolyfill(decoder)\n}\n\n/**\n * Look ahead and read varString without incrementing position\n */\nexport function peekVarString(decoder: BinDecoder): string {\n const pos = decoder.pos\n const s = readVarString(decoder)\n decoder.pos = pos\n return s\n}\n\nexport function readFromDataView(decoder: BinDecoder, len: number): DataView {\n const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len)\n decoder.pos += len\n return dv\n}\n\nexport function readFloat32(decoder: BinDecoder) {\n return readFromDataView(decoder, 4).getFloat32(0, false)\n}\n\nexport function readFloat64(decoder: BinDecoder) {\n return readFromDataView(decoder, 8).getFloat64(0, false)\n}\n\nexport function readBigInt64(decoder: BinDecoder) {\n return (readFromDataView(decoder, 8)).getBigInt64(0, false)\n}\n\nexport function readBigUint64(decoder: BinDecoder) {\n return (readFromDataView(decoder, 8)).getBigUint64(0, false)\n}\n\nconst readAnyLookupTable: Array<((arg0: BinDecoder) => any)> = [\n _ => undefined, // CASE 127: undefined\n _ => null, // CASE 126: null\n readVarInt, // CASE 125: integer\n readFloat32, // CASE 124: float32\n readFloat64, // CASE 123: float64\n readBigInt64, // CASE 122: bigint\n _ => false, // CASE 121: boolean (false)\n _ => true, // CASE 120: boolean (true)\n readVarString, // CASE 119: string\n (decoder) => { // CASE 118: object<string,any>\n const len = readVarUint(decoder)\n const obj: { [s: string]: any } = {}\n for (let i = 0; i < len; i++) {\n const key = readVarString(decoder)\n obj[key] = readAny(decoder)\n }\n return obj\n },\n (decoder) => { // CASE 117: array<any>\n const len = readVarUint(decoder)\n const arr = []\n for (let i = 0; i < len; i++)\n\n arr.push(readAny(decoder))\n\n return arr\n },\n readVarUint8Array, // CASE 116: Uint8Array\n]\n\nexport function readAny(decoder: BinDecoder) {\n return readAnyLookupTable[127 - readUint8(decoder)](decoder)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,4BAA4B;AAClC,MAAM,yBAAyB;;;;AAK/B,IAAa,aAAb,MAAwB;;CAEtB;;CAEA;CAEA,YAAY,YAAwB;AAClC,OAAK,MAAM;AACX,OAAK,MAAM;;;AAIf,SAAgB,cAAc,YAAoC;AAChE,QAAO,IAAI,WAAW,WAAW;;AAGnC,SAAgB,WAAW,SAA8B;AACvD,QAAO,QAAQ,QAAQ,QAAQ,IAAI;;;;;;AAOrC,SAAgB,MAAM,SAAqB,SAAiB,QAAQ,KAAiB;CACnF,MAAM,WAAW,cAAc,QAAQ,IAAI;AAC3C,UAAS,MAAM;AACf,QAAO;;;;;;;;AAST,SAAgB,eAAe,SAAqB,KAAyB;CAC3E,MAAM,OAAOA,mEAAoC,QAAQ,IAAI,QAAQ,QAAQ,MAAM,QAAQ,IAAI,YAAY,IAAI;AAC/G,SAAQ,OAAO;AACf,QAAO;;;;;;;;AAST,SAAgB,YAAY,SAA6B;CACvD,IAAI,MAAM;CACV,IAAI,OAAO;CACX,MAAM,MAAM,QAAQ,IAAI;AACxB,QAAO,QAAQ,MAAM,KAAK;EACxB,MAAM,IAAI,QAAQ,IAAI,QAAQ;AAE9B,QAAM,OAAO,WAAa;AAC1B,UAAQ;AACR,MAAI,QACF,QAAO;AACT,MAAI,MAAM,OAAO,iBACf,OAAM,IAAI,MAAM,uBAAuB;;AAE3C,OAAM,IAAI,MAAM,0BAA0B;;;;;;;;AAS5C,SAAgB,kBAAkB,SAAiC;AACjE,QAAO,eAAe,SAAS,YAAY,QAAQ,CAAC;;;;;AAMtD,SAAgB,qBAAqB,SAAiC;AACpE,QAAO,eAAe,SAAS,QAAQ,IAAI,SAAS,QAAQ,IAAI;;;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