@openclaw/whatsapp 2026.8.1-beta.3 → 2026.8.2
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/dist/{accounts-BX2fZUyR.js → accounts-CeKQbu_s.js} +9 -26
- package/dist/{action-runtime-pM-ExU0l.js → action-runtime-Bw0loEdy.js} +2 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{call-tool-api.js → agent-tools-api.js} +13 -6
- package/dist/{agent-tools-login-BjRpD-JQ.js → agent-tools-login-B-2qZPzc.js} +12 -3
- package/dist/api.js +10 -10
- package/dist/{approval-handler.runtime-CkMMvUjk.js → approval-handler.runtime-DeyPb57-.js} +3 -3
- package/dist/{approval-reactions-Jyr1JaAK.js → approval-reactions-DGDA6hQ7.js} +7 -5
- package/dist/{auth-store-CtpBqH5S.js → auth-store-DTj1H9pv.js} +5 -3
- package/dist/{channel-DRMYRfZ8.js → channel-DxMmDjqK.js} +26 -24
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-CstrR0CT.js → channel-react-action-BUp7Wbfr.js} +3 -3
- package/dist/{channel.runtime-X3JC2gaq.js → channel.runtime-BwSnyXRX.js} +4 -4
- package/dist/{channel.setup-DhBBhbQv.js → channel.setup-aOFLSQyw.js} +1 -1
- package/dist/{config-schema-BQP5YCeK.js → config-schema-BYA6e_Ii.js} +6 -4
- package/dist/{connection-controller-CIYuBJrs.js → connection-controller-BvkxsbWi.js} +2 -2
- package/dist/{constants-HU41RHGI.js → constants-C7m81BNe.js} +1 -1
- package/dist/{directory-config-P7_3U73Z.js → directory-config-LgxYJLWY.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/{group-session-key-DmFc_Cqi.js → group-session-key-KUguLmSZ.js} +4 -4
- package/dist/index.js +4 -4
- package/dist/light-runtime-api.js +2 -2
- package/dist/{login-BkpKpndm.js → login-Bk_jiXKD.js} +6 -5
- package/dist/{login-qr-1dpv6jjT.js → login-qr-B3m61NqA.js} +43 -20
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-IzwQKizW.js → monitor-CTsyo-HE.js} +185 -162
- package/dist/{question-reactions-D3eAeB0i.js → question-reactions-B9D6MHXZ.js} +1 -1
- package/dist/runtime-api.js +9 -9
- package/dist/{send-CwvTU4RI.js → send-DiPjiygK.js} +54 -29
- package/dist/{send-api-obOSm2cC.js → send-api-kFcuhSiY.js} +43 -41
- package/dist/{setup-finalize-n4K2I2gJ.js → setup-finalize-CqH5wTK5.js} +7 -6
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-Cwn3zyxK.js → setup-surface-Dm3T6S8t.js} +3 -3
- package/dist/{shared-wg42NKFB.js → shared-DDjonGys.js} +7 -6
- package/dist/{socket-close-2T0_jZTN.js → socket-close-CpkkJZCU.js} +9 -6
- package/dist/{targets-runtime-TMk0lGuy.js → targets-runtime-RBjx3pg_.js} +1 -2
- package/dist/{text-runtime-CaKLhowd.js → text-runtime-DyfmcATV.js} +1 -1
- package/node_modules/baileys/lib/Defaults/index.js +1 -1
- package/node_modules/baileys/lib/Socket/business.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/chats.d.ts +1 -0
- package/node_modules/baileys/lib/Socket/chats.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/chats.js +10 -5
- package/node_modules/baileys/lib/Socket/chats.js.map +1 -1
- package/node_modules/baileys/lib/Socket/communities.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/groups.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/index.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/messages-recv.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/messages-send.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/newsletter.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/socket.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/socket.js +3 -0
- package/node_modules/baileys/lib/Socket/socket.js.map +1 -1
- package/node_modules/baileys/lib/Types/index.d.ts +1 -0
- package/node_modules/baileys/lib/Types/index.d.ts.map +1 -1
- package/node_modules/baileys/lib/Types/index.js.map +1 -1
- package/node_modules/baileys/lib/Utils/browser-utils.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/browser-utils.js +1 -0
- package/node_modules/baileys/lib/Utils/browser-utils.js.map +1 -1
- package/node_modules/baileys/lib/Utils/generics.d.ts +1 -0
- package/node_modules/baileys/lib/Utils/generics.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/generics.js +1 -1
- package/node_modules/baileys/lib/Utils/generics.js.map +1 -1
- package/node_modules/baileys/lib/Utils/tc-token-utils.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/tc-token-utils.js +3 -2
- package/node_modules/baileys/lib/Utils/tc-token-utils.js.map +1 -1
- package/node_modules/baileys/lib/Utils/validate-connection.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/validate-connection.js +9 -2
- package/node_modules/baileys/lib/Utils/validate-connection.js.map +1 -1
- package/node_modules/baileys/node_modules/content-type/README.md +2 -0
- package/node_modules/baileys/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/baileys/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/baileys/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/baileys/node_modules/content-type/package.json +1 -1
- package/node_modules/baileys/node_modules/file-type/package.json +1 -1
- package/node_modules/baileys/node_modules/file-type/readme.md +3 -0
- package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +6 -1
- package/node_modules/baileys/node_modules/file-type/source/index.d.ts +3 -0
- package/node_modules/baileys/node_modules/file-type/source/index.js +25 -13
- package/node_modules/baileys/node_modules/music-metadata/LICENSE.txt +9 -9
- package/node_modules/baileys/node_modules/music-metadata/README.md +878 -878
- package/node_modules/baileys/node_modules/music-metadata/lib/ParseError.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ParseError.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfObject.d.ts +1 -4
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfObject.js +66 -30
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfParser.d.ts +5 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfParser.js +94 -25
- package/node_modules/baileys/node_modules/music-metadata/lib/dsf/DsfChunk.js +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/dsf/DsfParser.js +38 -13
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/AtomToken.js +2 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/MP4Parser.js +34 -7
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +7 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +13 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/riff/RiffChunk.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/package.json +156 -156
- package/node_modules/baileys/node_modules/process-warning/.github/dependabot.yml +42 -2
- package/node_modules/baileys/node_modules/process-warning/.github/workflows/ci.yml +12 -1
- package/node_modules/baileys/node_modules/process-warning/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/baileys/node_modules/process-warning/LICENSE +1 -1
- package/node_modules/baileys/node_modules/process-warning/README.md +41 -2
- package/node_modules/baileys/node_modules/process-warning/index.js +85 -17
- package/node_modules/baileys/node_modules/process-warning/package.json +6 -7
- package/node_modules/baileys/node_modules/process-warning/test/emit-once-only.test.js +3 -3
- package/node_modules/baileys/node_modules/process-warning/test/emit-reset.test.js +4 -4
- package/node_modules/baileys/node_modules/process-warning/test/emit-unlimited.test.js +2 -2
- package/node_modules/baileys/node_modules/process-warning/test/spy-warning.test.js +143 -0
- package/node_modules/baileys/node_modules/process-warning/types/index.d.ts +15 -1
- package/node_modules/baileys/node_modules/process-warning/types/index.tst.ts +48 -0
- package/node_modules/baileys/node_modules/protobufjs/README.md +61 -84
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js +66 -45
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js +47 -40
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js +92 -68
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.js +26 -10
- package/node_modules/baileys/node_modules/protobufjs/index.d.ts +3 -0
- package/node_modules/baileys/node_modules/protobufjs/package.json +1 -1
- package/node_modules/baileys/node_modules/protobufjs/src/converter.js +5 -1
- package/node_modules/baileys/node_modules/protobufjs/src/enum.js +5 -2
- package/node_modules/baileys/node_modules/protobufjs/src/field.js +6 -1
- package/node_modules/baileys/node_modules/protobufjs/src/parse.js +26 -23
- package/node_modules/baileys/node_modules/protobufjs/src/reader.js +36 -9
- package/node_modules/baileys/node_modules/protobufjs/src/util/codegen.js +3 -1
- package/node_modules/baileys/node_modules/protobufjs/src/util/utf8.js +2 -28
- package/node_modules/baileys/node_modules/protobufjs/src/writer.js +7 -1
- package/node_modules/baileys/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/baileys/node_modules/ws/package.json +1 -1
- package/node_modules/baileys/package.json +1 -1
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +41 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/openclaw.plugin.json +2 -1
- package/package.json +6 -6
- package/node_modules/baileys/node_modules/process-warning/types/index.test-d.ts +0 -36
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v8.7.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v8.7.2 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled sat, 08 aug 2026 13:15:56 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -345,7 +345,11 @@ converter.toObject = function toObject(mtype) {
|
|
|
345
345
|
("d%s=%j", prop, arrayDefault)
|
|
346
346
|
("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop)
|
|
347
347
|
("}");
|
|
348
|
-
} else
|
|
348
|
+
} else if ((field.type === "double" || field.type === "float") && typeof field.typeDefault === "number"
|
|
349
|
+
&& (!isFinite(field.typeDefault) || Object.is(field.typeDefault, -0))) gen
|
|
350
|
+
("d%s=%f", prop, field.typeDefault)
|
|
351
|
+
("if(o.json&&!isFinite(d%s))d%s=String(d%s)", prop, prop, prop);
|
|
352
|
+
else gen
|
|
349
353
|
("d%s=%j", prop, field.typeDefault); // also messages (=null)
|
|
350
354
|
} gen
|
|
351
355
|
("}");
|
|
@@ -884,8 +888,11 @@ function Enum(name, values, options, comment, comments, valuesOptions) {
|
|
|
884
888
|
|
|
885
889
|
if (values)
|
|
886
890
|
for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)
|
|
887
|
-
if (keys[i] !== "__proto__" && typeof values[keys[i]] === "number") // use forward entries only
|
|
888
|
-
this.
|
|
891
|
+
if (keys[i] !== "__proto__" && typeof values[keys[i]] === "number") { // use forward entries only
|
|
892
|
+
this.values[keys[i]] = values[keys[i]];
|
|
893
|
+
if (this.valuesById[values[keys[i]]] === undefined)
|
|
894
|
+
this.valuesById[values[keys[i]]] = keys[i];
|
|
895
|
+
}
|
|
889
896
|
}
|
|
890
897
|
|
|
891
898
|
/**
|
|
@@ -1414,12 +1421,17 @@ Field.prototype.resolve = function resolve() {
|
|
|
1414
1421
|
|
|
1415
1422
|
// convert to internal data type if necesssary
|
|
1416
1423
|
if (this.long) {
|
|
1417
|
-
|
|
1424
|
+
var unsigned = this.type === "uint64" || this.type === "fixed64";
|
|
1425
|
+
this.typeDefault = typeof this.typeDefault === "string"
|
|
1426
|
+
? util.Long.fromString(this.typeDefault, unsigned)
|
|
1427
|
+
: util.Long.fromNumber(this.typeDefault, unsigned);
|
|
1418
1428
|
|
|
1419
1429
|
/* istanbul ignore else */
|
|
1420
1430
|
if (Object.freeze)
|
|
1421
1431
|
Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)
|
|
1422
1432
|
|
|
1433
|
+
} else if (types.long[this.type] !== undefined && typeof this.typeDefault === "string") {
|
|
1434
|
+
this.typeDefault = parseInt(this.typeDefault, 10);
|
|
1423
1435
|
} else if (this.bytes && typeof this.typeDefault === "string") {
|
|
1424
1436
|
var buf;
|
|
1425
1437
|
if (util.base64.test(this.typeDefault))
|
|
@@ -3763,9 +3775,18 @@ Reader.prototype.double = function read_double() {
|
|
|
3763
3775
|
*/
|
|
3764
3776
|
Reader.prototype.uint32s = function read_uint32s(array) {
|
|
3765
3777
|
if (array === undefined) array = [];
|
|
3766
|
-
var end = this.uint32() + this.pos;
|
|
3767
|
-
while (
|
|
3768
|
-
|
|
3778
|
+
var end = this.uint32() + this.pos, buf = this.buf, pos = this.pos, value;
|
|
3779
|
+
while (pos < end) {
|
|
3780
|
+
value = buf[pos++];
|
|
3781
|
+
if (value < 128)
|
|
3782
|
+
array.push(value);
|
|
3783
|
+
else {
|
|
3784
|
+
this.pos = pos - 1;
|
|
3785
|
+
array.push(this.uint32());
|
|
3786
|
+
pos = this.pos;
|
|
3787
|
+
}
|
|
3788
|
+
}
|
|
3789
|
+
this.pos = pos;
|
|
3769
3790
|
return array;
|
|
3770
3791
|
};
|
|
3771
3792
|
|
|
@@ -3776,9 +3797,18 @@ Reader.prototype.uint32s = function read_uint32s(array) {
|
|
|
3776
3797
|
*/
|
|
3777
3798
|
Reader.prototype.int32s = function read_int32s(array) {
|
|
3778
3799
|
if (array === undefined) array = [];
|
|
3779
|
-
var end = this.uint32() + this.pos;
|
|
3780
|
-
while (
|
|
3781
|
-
|
|
3800
|
+
var end = this.uint32() + this.pos, buf = this.buf, pos = this.pos, value;
|
|
3801
|
+
while (pos < end) {
|
|
3802
|
+
value = buf[pos++];
|
|
3803
|
+
if (value < 128)
|
|
3804
|
+
array.push(value);
|
|
3805
|
+
else {
|
|
3806
|
+
this.pos = pos - 1;
|
|
3807
|
+
array.push(this.int32());
|
|
3808
|
+
pos = this.pos;
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
this.pos = pos;
|
|
3782
3812
|
return array;
|
|
3783
3813
|
};
|
|
3784
3814
|
|
|
@@ -3802,9 +3832,18 @@ Reader.prototype.sint32s = function read_sint32s(array) {
|
|
|
3802
3832
|
*/
|
|
3803
3833
|
Reader.prototype.bools = function read_bools(array) {
|
|
3804
3834
|
if (array === undefined) array = [];
|
|
3805
|
-
var end = this.uint32() + this.pos;
|
|
3806
|
-
while (
|
|
3807
|
-
|
|
3835
|
+
var end = this.uint32() + this.pos, buf = this.buf, pos = this.pos, value;
|
|
3836
|
+
while (pos < end) {
|
|
3837
|
+
value = buf[pos++];
|
|
3838
|
+
if (value < 128)
|
|
3839
|
+
array.push(value !== 0);
|
|
3840
|
+
else {
|
|
3841
|
+
this.pos = pos - 1;
|
|
3842
|
+
array.push(this.bool());
|
|
3843
|
+
pos = this.pos;
|
|
3844
|
+
}
|
|
3845
|
+
}
|
|
3846
|
+
this.pos = pos;
|
|
3808
3847
|
return array;
|
|
3809
3848
|
};
|
|
3810
3849
|
|
|
@@ -6494,7 +6533,9 @@ function codegen(functionParams, functionName) {
|
|
|
6494
6533
|
formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {
|
|
6495
6534
|
var value = formatParams[formatOffset++];
|
|
6496
6535
|
switch ($1) {
|
|
6497
|
-
case "d": case "f":
|
|
6536
|
+
case "d": case "f":
|
|
6537
|
+
value = Number(value);
|
|
6538
|
+
return Object.is(value, -0) ? "-0" : String(value);
|
|
6498
6539
|
case "i": return String(Math.floor(value));
|
|
6499
6540
|
case "j": return JSON.stringify(value);
|
|
6500
6541
|
case "s": return String(value);
|
|
@@ -7988,7 +8029,6 @@ function pool(alloc, slice, size) {
|
|
|
7988
8029
|
* @namespace
|
|
7989
8030
|
*/
|
|
7990
8031
|
var utf8 = exports,
|
|
7991
|
-
replacementChar = "\ufffd",
|
|
7992
8032
|
looseDecoder = new TextDecoder("utf-8", { ignoreBOM: true }),
|
|
7993
8033
|
strictDecoder;
|
|
7994
8034
|
var TEXT_DECODER_MIN_LENGTH = 64;
|
|
@@ -8023,31 +8063,6 @@ utf8.length = function utf8_length(string) {
|
|
|
8023
8063
|
return len;
|
|
8024
8064
|
};
|
|
8025
8065
|
|
|
8026
|
-
function utf8_read_js(buffer, start, end, str) {
|
|
8027
|
-
for (var i = start; i < end;) {
|
|
8028
|
-
var t = buffer[i++];
|
|
8029
|
-
if (t <= 0x7F) {
|
|
8030
|
-
str += String.fromCharCode(t);
|
|
8031
|
-
} else if (t >= 0xC0 && t < 0xE0) {
|
|
8032
|
-
var c2 = (t & 0x1F) << 6 | buffer[i++] & 0x3F;
|
|
8033
|
-
str += c2 >= 0x80 ? String.fromCharCode(c2) : replacementChar;
|
|
8034
|
-
} else if (t >= 0xE0 && t < 0xF0) {
|
|
8035
|
-
var c3 = (t & 0xF) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;
|
|
8036
|
-
str += c3 >= 0x800 ? String.fromCharCode(c3) : replacementChar;
|
|
8037
|
-
} else if (t >= 0xF0) {
|
|
8038
|
-
var t2 = (t & 7) << 18 | (buffer[i++] & 0x3F) << 12 | (buffer[i++] & 0x3F) << 6 | buffer[i++] & 0x3F;
|
|
8039
|
-
if (t2 < 0x10000 || t2 > 0x10FFFF)
|
|
8040
|
-
str += replacementChar;
|
|
8041
|
-
else {
|
|
8042
|
-
t2 -= 0x10000;
|
|
8043
|
-
str += String.fromCharCode(0xD800 + (t2 >> 10));
|
|
8044
|
-
str += String.fromCharCode(0xDC00 + (t2 & 0x3FF));
|
|
8045
|
-
}
|
|
8046
|
-
}
|
|
8047
|
-
}
|
|
8048
|
-
return str;
|
|
8049
|
-
}
|
|
8050
|
-
|
|
8051
8066
|
function utf8_read_decoder(decoder, buffer, start, end) {
|
|
8052
8067
|
var source = start === 0 && end === buffer.length
|
|
8053
8068
|
? buffer
|
|
@@ -8082,14 +8097,14 @@ utf8.read = function utf8_read_loose(buffer, start, end) {
|
|
|
8082
8097
|
c7 = buffer[i + 6];
|
|
8083
8098
|
c8 = buffer[i + 7];
|
|
8084
8099
|
if ((c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8) & 0x80)
|
|
8085
|
-
return
|
|
8100
|
+
return str + utf8_read_decoder(looseDecoder, buffer, i, end);
|
|
8086
8101
|
str += String.fromCharCode(c1, c2, c3, c4, c5, c6, c7, c8);
|
|
8087
8102
|
}
|
|
8088
8103
|
|
|
8089
8104
|
for (; i < end; ++i) {
|
|
8090
8105
|
c1 = buffer[i];
|
|
8091
8106
|
if (c1 & 0x80)
|
|
8092
|
-
return
|
|
8107
|
+
return str + utf8_read_decoder(looseDecoder, buffer, i, end);
|
|
8093
8108
|
str += String.fromCharCode(c1);
|
|
8094
8109
|
}
|
|
8095
8110
|
|
|
@@ -8495,7 +8510,7 @@ function Writer() {
|
|
|
8495
8510
|
* Backing buffer.
|
|
8496
8511
|
* @type {Uint8Array}
|
|
8497
8512
|
*/
|
|
8498
|
-
this.buf = this.constructor.alloc(
|
|
8513
|
+
this.buf = this.constructor.alloc(Writer.initialBufferSize);
|
|
8499
8514
|
|
|
8500
8515
|
/**
|
|
8501
8516
|
* Cached DataView over {@link Writer#buf}.
|
|
@@ -8510,6 +8525,12 @@ function Writer() {
|
|
|
8510
8525
|
this.states = null;
|
|
8511
8526
|
}
|
|
8512
8527
|
|
|
8528
|
+
/**
|
|
8529
|
+
* Initial backing buffer size in bytes. Defaults to 128.
|
|
8530
|
+
* @type {number}
|
|
8531
|
+
*/
|
|
8532
|
+
Writer.initialBufferSize = 128;
|
|
8533
|
+
|
|
8513
8534
|
/**
|
|
8514
8535
|
* Current write position.
|
|
8515
8536
|
* @name Writer#len
|