@hiroosy/baileys-lite 0.3.4 → 0.3.6
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/WAProto/index.js +231 -113252
- package/WAProto/parts/ADVDeviceIdentity.part +201 -0
- package/WAProto/parts/ADVEncryptionType.part +6 -0
- package/WAProto/parts/ADVKeyIndexList.part +201 -0
- package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
- package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
- package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
- package/WAProto/parts/AIHomeState.part +405 -0
- package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
- package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
- package/WAProto/parts/AIMetadataOperation.part +83 -0
- package/WAProto/parts/AIQueryFanout.part +133 -0
- package/WAProto/parts/AIRegenerateMetadata.part +112 -0
- package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
- package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
- package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
- package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
- package/WAProto/parts/AIRichResponseImageURL.part +119 -0
- package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
- package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMessage.part +167 -0
- package/WAProto/parts/AIRichResponseMessageType.part +5 -0
- package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
- package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
- package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
- package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
- package/WAProto/parts/AISubscriptionRequestType.part +7 -0
- package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
- package/WAProto/parts/AIThreadInfo.part +316 -0
- package/WAProto/parts/Account.part +138 -0
- package/WAProto/parts/ActionLink.part +100 -0
- package/WAProto/parts/AutoDownloadSettings.part +138 -0
- package/WAProto/parts/AvatarUserSettings.part +100 -0
- package/WAProto/parts/BizAccountLinkInfo.part +210 -0
- package/WAProto/parts/BizAccountPayload.part +105 -0
- package/WAProto/parts/BizIdentityInfo.part +298 -0
- package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
- package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
- package/WAProto/parts/BotAgentMetadata.part +83 -0
- package/WAProto/parts/BotCapabilityMetadata.part +437 -0
- package/WAProto/parts/BotCommandMetadata.part +119 -0
- package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
- package/WAProto/parts/BotFeedbackMessage.part +1366 -0
- package/WAProto/parts/BotGroupMetadata.part +92 -0
- package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
- package/WAProto/parts/BotImagineMetadata.part +134 -0
- package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
- package/WAProto/parts/BotLinkedAccount.part +95 -0
- package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
- package/WAProto/parts/BotMediaMetadata.part +229 -0
- package/WAProto/parts/BotMemoryFact.part +100 -0
- package/WAProto/parts/BotMemoryMetadata.part +141 -0
- package/WAProto/parts/BotMemuMetadata.part +92 -0
- package/WAProto/parts/BotMessageOrigin.part +95 -0
- package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
- package/WAProto/parts/BotMessageSharingInfo.part +297 -0
- package/WAProto/parts/BotMetadata.part +934 -0
- package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
- package/WAProto/parts/BotMetricsMetadata.part +341 -0
- package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
- package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
- package/WAProto/parts/BotModelMetadata.part +167 -0
- package/WAProto/parts/BotPluginMetadata.part +379 -0
- package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
- package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
- package/WAProto/parts/BotPromptSuggestion.part +100 -0
- package/WAProto/parts/BotPromptSuggestions.part +92 -0
- package/WAProto/parts/BotPttPromptMetadata.part +81 -0
- package/WAProto/parts/BotQuotaMetadata.part +241 -0
- package/WAProto/parts/BotReminderMetadata.part +232 -0
- package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
- package/WAProto/parts/BotRenderingMetadata.part +203 -0
- package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
- package/WAProto/parts/BotSessionMetadata.part +137 -0
- package/WAProto/parts/BotSessionSource.part +11 -0
- package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
- package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
- package/WAProto/parts/BotSourcesMetadata.part +322 -0
- package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
- package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
- package/WAProto/parts/CallLogRecord.part +646 -0
- package/WAProto/parts/CertChain.part +392 -0
- package/WAProto/parts/ChatLockSettings.part +102 -0
- package/WAProto/parts/ChatRowOpaqueData.part +712 -0
- package/WAProto/parts/Citation.part +119 -0
- package/WAProto/parts/ClientPairingProps.part +160 -0
- package/WAProto/parts/ClientPayload.part +2892 -0
- package/WAProto/parts/CollectionName.part +9 -0
- package/WAProto/parts/CommentMetadata.part +102 -0
- package/WAProto/parts/CompanionCommitment.part +84 -0
- package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
- package/WAProto/parts/Config.part +136 -0
- package/WAProto/parts/ContextInfo.part +4137 -0
- package/WAProto/parts/Conversation.part +1472 -0
- package/WAProto/parts/DeviceCapabilities.part +670 -0
- package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
- package/WAProto/parts/DeviceListMetadata.part +306 -0
- package/WAProto/parts/DeviceProps.part +982 -0
- package/WAProto/parts/DisappearingMode.part +206 -0
- package/WAProto/parts/EmbeddedContent.part +100 -0
- package/WAProto/parts/EmbeddedMessage.part +102 -0
- package/WAProto/parts/EmbeddedMusic.part +370 -0
- package/WAProto/parts/EncryptedPairingRequest.part +106 -0
- package/WAProto/parts/EphemeralSetting.part +110 -0
- package/WAProto/parts/EventAdditionalMetadata.part +81 -0
- package/WAProto/parts/EventResponse.part +152 -0
- package/WAProto/parts/ExitCode.part +110 -0
- package/WAProto/parts/ExternalBlobReference.part +195 -0
- package/WAProto/parts/Field.part +193 -0
- package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
- package/WAProto/parts/GlobalSettings.part +497 -0
- package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
- package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
- package/WAProto/parts/GroupMention.part +100 -0
- package/WAProto/parts/GroupParticipant.part +142 -0
- package/WAProto/parts/GroupRootKeyShare.part +92 -0
- package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
- package/WAProto/parts/HandshakeMessage.part +815 -0
- package/WAProto/parts/HatchMetadataSync.part +132 -0
- package/WAProto/parts/HistorySync.part +605 -0
- package/WAProto/parts/HistorySyncMsg.part +112 -0
- package/WAProto/parts/HydratedTemplateButton.part +501 -0
- package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
- package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
- package/WAProto/parts/InlineContact.part +157 -0
- package/WAProto/parts/InteractiveAnnotation.part +246 -0
- package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
- package/WAProto/parts/KeepInChat.part +225 -0
- package/WAProto/parts/KeepType.part +6 -0
- package/WAProto/parts/KeyExchangeMessage.part +169 -0
- package/WAProto/parts/KeyId.part +84 -0
- package/WAProto/parts/LIDMigrationMapping.part +149 -0
- package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
- package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
- package/WAProto/parts/LegacyMessage.part +104 -0
- package/WAProto/parts/LimitSharing.part +177 -0
- package/WAProto/parts/LocalizedName.part +119 -0
- package/WAProto/parts/Location.part +119 -0
- package/WAProto/parts/MediaData.part +81 -0
- package/WAProto/parts/MediaDomainInfo.part +120 -0
- package/WAProto/parts/MediaKeyDomain.part +6 -0
- package/WAProto/parts/MediaNotifyMessage.part +132 -0
- package/WAProto/parts/MediaRetryNotification.part +170 -0
- package/WAProto/parts/MediaVisibility.part +6 -0
- package/WAProto/parts/MemberLabel.part +110 -0
- package/WAProto/parts/Message.part +32376 -0
- package/WAProto/parts/MessageAddOn.part +305 -0
- package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
- package/WAProto/parts/MessageAssociation.part +235 -0
- package/WAProto/parts/MessageContextInfo.part +451 -0
- package/WAProto/parts/MessageKey.part +138 -0
- package/WAProto/parts/MessageSecretMessage.part +125 -0
- package/WAProto/parts/Money.part +129 -0
- package/WAProto/parts/MsgOpaqueData.part +1732 -0
- package/WAProto/parts/MsgRowOpaqueData.part +104 -0
- package/WAProto/parts/MutationProps.part +89 -0
- package/WAProto/parts/NoiseCertificate.part +277 -0
- package/WAProto/parts/NotificationMessageInfo.part +152 -0
- package/WAProto/parts/NotificationSettings.part +176 -0
- package/WAProto/parts/PairingRequest.part +128 -0
- package/WAProto/parts/PastParticipant.part +148 -0
- package/WAProto/parts/PastParticipants.part +112 -0
- package/WAProto/parts/PatchDebugData.part +358 -0
- package/WAProto/parts/PaymentBackground.part +460 -0
- package/WAProto/parts/PaymentInfo.part +602 -0
- package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
- package/WAProto/parts/PhotoChange.part +125 -0
- package/WAProto/parts/PinInChat.part +205 -0
- package/WAProto/parts/Point.part +138 -0
- package/WAProto/parts/PollAdditionalMetadata.part +216 -0
- package/WAProto/parts/PollEncValue.part +106 -0
- package/WAProto/parts/PollUpdate.part +202 -0
- package/WAProto/parts/PreKeyRecordStructure.part +125 -0
- package/WAProto/parts/PreKeySignalMessage.part +185 -0
- package/WAProto/parts/PremiumMessageInfo.part +81 -0
- package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
- package/WAProto/parts/PrivacySystemMessage.part +6 -0
- package/WAProto/parts/ProcessedVideo.part +266 -0
- package/WAProto/parts/ProloguePayload.part +105 -0
- package/WAProto/parts/Pushname.part +100 -0
- package/WAProto/parts/QuarantinedMessage.part +103 -0
- package/WAProto/parts/Reaction.part +169 -0
- package/WAProto/parts/RecentEmojiWeight.part +100 -0
- package/WAProto/parts/RecordStructure.part +114 -0
- package/WAProto/parts/Reportable.part +138 -0
- package/WAProto/parts/ReportingTokenInfo.part +84 -0
- package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
- package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
- package/WAProto/parts/SenderKeyMessage.part +122 -0
- package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
- package/WAProto/parts/SenderKeyStateStructure.part +469 -0
- package/WAProto/parts/ServerErrorReceipt.part +81 -0
- package/WAProto/parts/SessionStructure.part +1087 -0
- package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
- package/WAProto/parts/SessionTransparencyType.part +5 -0
- package/WAProto/parts/SignalMessage.part +144 -0
- package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
- package/WAProto/parts/StatusAttribution.part +1235 -0
- package/WAProto/parts/StatusMentionMessage.part +83 -0
- package/WAProto/parts/StatusPSA.part +121 -0
- package/WAProto/parts/StickerMetadata.part +357 -0
- package/WAProto/parts/SyncActionData.part +146 -0
- package/WAProto/parts/SyncActionValue.part +12959 -0
- package/WAProto/parts/SyncdIndex.part +84 -0
- package/WAProto/parts/SyncdMutation.part +121 -0
- package/WAProto/parts/SyncdMutations.part +92 -0
- package/WAProto/parts/SyncdPatch.part +262 -0
- package/WAProto/parts/SyncdRecord.part +125 -0
- package/WAProto/parts/SyncdSnapshot.part +157 -0
- package/WAProto/parts/SyncdValue.part +84 -0
- package/WAProto/parts/SyncdVersion.part +91 -0
- package/WAProto/parts/TapLinkAction.part +100 -0
- package/WAProto/parts/TemplateButton.part +449 -0
- package/WAProto/parts/ThreadID.part +126 -0
- package/WAProto/parts/UrlTrackingMap.part +231 -0
- package/WAProto/parts/UserPassword.part +399 -0
- package/WAProto/parts/UserReceipt.part +221 -0
- package/WAProto/parts/VerifiedNameCertificate.part +318 -0
- package/WAProto/parts/WallpaperSettings.part +119 -0
- package/WAProto/parts/WebFeatures.part +1870 -0
- package/WAProto/parts/WebLinkRenderConfig.part +5 -0
- package/WAProto/parts/WebMessageInfo.part +2851 -0
- package/WAProto/parts/WebNotificationsInfo.part +160 -0
- package/package.json +1 -1
- package/src/socket/messages-recv.js +3 -1
- package/src/socket/messages-send.js +25 -10
- package/src/socket/socket-core.js +53 -57
- package/src/utils/wa-protocol-core.js +3 -9
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function AIRichResponseImageURL(p) {
|
|
3
|
+
if (p)
|
|
4
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
5
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
6
|
+
this[ks[i]] = p[ks[i]];
|
|
7
|
+
}
|
|
8
|
+
AIRichResponseImageURL.prototype.imagePreviewUrl = null;
|
|
9
|
+
AIRichResponseImageURL.prototype.imageHighResUrl = null;
|
|
10
|
+
AIRichResponseImageURL.prototype.sourceUrl = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(AIRichResponseImageURL.prototype, "_imagePreviewUrl", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["imagePreviewUrl"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(AIRichResponseImageURL.prototype, "_imageHighResUrl", {
|
|
17
|
+
get: $util.oneOfGetter($oneOfFields = ["imageHighResUrl"]),
|
|
18
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(AIRichResponseImageURL.prototype, "_sourceUrl", {
|
|
21
|
+
get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
|
|
22
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23
|
+
});
|
|
24
|
+
AIRichResponseImageURL.create = function create(properties) {
|
|
25
|
+
return new AIRichResponseImageURL(properties);
|
|
26
|
+
};
|
|
27
|
+
AIRichResponseImageURL.encode = function encode(m, w) {
|
|
28
|
+
if (!w)
|
|
29
|
+
w = $Writer.create();
|
|
30
|
+
if (m.imagePreviewUrl != null && Object.hasOwnProperty.call(m, "imagePreviewUrl"))
|
|
31
|
+
w.uint32(10).string(m.imagePreviewUrl);
|
|
32
|
+
if (m.imageHighResUrl != null && Object.hasOwnProperty.call(m, "imageHighResUrl"))
|
|
33
|
+
w.uint32(18).string(m.imageHighResUrl);
|
|
34
|
+
if (m.sourceUrl != null && Object.hasOwnProperty.call(m, "sourceUrl"))
|
|
35
|
+
w.uint32(26).string(m.sourceUrl);
|
|
36
|
+
return w;
|
|
37
|
+
};
|
|
38
|
+
AIRichResponseImageURL.decode = function decode(r, l, e, n) {
|
|
39
|
+
if (!(r instanceof $Reader))
|
|
40
|
+
r = $Reader.create(r);
|
|
41
|
+
if (n === undefined)
|
|
42
|
+
n = 0;
|
|
43
|
+
if (n > $Reader.recursionLimit)
|
|
44
|
+
throw Error("maximum nesting depth exceeded");
|
|
45
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseImageURL();
|
|
46
|
+
while (r.pos < c) {
|
|
47
|
+
var t = r.uint32();
|
|
48
|
+
if (t === e)
|
|
49
|
+
break;
|
|
50
|
+
switch (t >>> 3) {
|
|
51
|
+
case 1: {
|
|
52
|
+
m.imagePreviewUrl = r.string();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case 2: {
|
|
56
|
+
m.imageHighResUrl = r.string();
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 3: {
|
|
60
|
+
m.sourceUrl = r.string();
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
default:
|
|
64
|
+
r.skipType(t & 7, n);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return m;
|
|
69
|
+
};
|
|
70
|
+
AIRichResponseImageURL.fromObject = function fromObject(d, n) {
|
|
71
|
+
if (d instanceof $root.proto.AIRichResponseImageURL)
|
|
72
|
+
return d;
|
|
73
|
+
if (n === undefined)
|
|
74
|
+
n = 0;
|
|
75
|
+
if (n > $util.recursionLimit)
|
|
76
|
+
throw Error("maximum nesting depth exceeded");
|
|
77
|
+
var m = new $root.proto.AIRichResponseImageURL();
|
|
78
|
+
if (d.imagePreviewUrl != null) {
|
|
79
|
+
m.imagePreviewUrl = String(d.imagePreviewUrl);
|
|
80
|
+
}
|
|
81
|
+
if (d.imageHighResUrl != null) {
|
|
82
|
+
m.imageHighResUrl = String(d.imageHighResUrl);
|
|
83
|
+
}
|
|
84
|
+
if (d.sourceUrl != null) {
|
|
85
|
+
m.sourceUrl = String(d.sourceUrl);
|
|
86
|
+
}
|
|
87
|
+
return m;
|
|
88
|
+
};
|
|
89
|
+
AIRichResponseImageURL.toObject = function toObject(m, o) {
|
|
90
|
+
if (!o)
|
|
91
|
+
o = {};
|
|
92
|
+
var d = {};
|
|
93
|
+
if (m.imagePreviewUrl != null && m.hasOwnProperty("imagePreviewUrl")) {
|
|
94
|
+
d.imagePreviewUrl = m.imagePreviewUrl;
|
|
95
|
+
if (o.oneofs)
|
|
96
|
+
d._imagePreviewUrl = "imagePreviewUrl";
|
|
97
|
+
}
|
|
98
|
+
if (m.imageHighResUrl != null && m.hasOwnProperty("imageHighResUrl")) {
|
|
99
|
+
d.imageHighResUrl = m.imageHighResUrl;
|
|
100
|
+
if (o.oneofs)
|
|
101
|
+
d._imageHighResUrl = "imageHighResUrl";
|
|
102
|
+
}
|
|
103
|
+
if (m.sourceUrl != null && m.hasOwnProperty("sourceUrl")) {
|
|
104
|
+
d.sourceUrl = m.sourceUrl;
|
|
105
|
+
if (o.oneofs)
|
|
106
|
+
d._sourceUrl = "sourceUrl";
|
|
107
|
+
}
|
|
108
|
+
return d;
|
|
109
|
+
};
|
|
110
|
+
AIRichResponseImageURL.prototype.toJSON = function toJSON() {
|
|
111
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
112
|
+
};
|
|
113
|
+
AIRichResponseImageURL.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
114
|
+
if (typeUrlPrefix === undefined) {
|
|
115
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
116
|
+
}
|
|
117
|
+
return typeUrlPrefix + "/proto.AIRichResponseImageURL";
|
|
118
|
+
};
|
|
119
|
+
return AIRichResponseImageURL;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function AIRichResponseInlineImageMetadata(p) {
|
|
3
|
+
if (p)
|
|
4
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
5
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
6
|
+
this[ks[i]] = p[ks[i]];
|
|
7
|
+
}
|
|
8
|
+
AIRichResponseInlineImageMetadata.prototype.imageUrl = null;
|
|
9
|
+
AIRichResponseInlineImageMetadata.prototype.imageText = null;
|
|
10
|
+
AIRichResponseInlineImageMetadata.prototype.alignment = null;
|
|
11
|
+
AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = null;
|
|
12
|
+
let $oneOfFields;
|
|
13
|
+
Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageUrl", {
|
|
14
|
+
get: $util.oneOfGetter($oneOfFields = ["imageUrl"]),
|
|
15
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageText", {
|
|
18
|
+
get: $util.oneOfGetter($oneOfFields = ["imageText"]),
|
|
19
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_alignment", {
|
|
22
|
+
get: $util.oneOfGetter($oneOfFields = ["alignment"]),
|
|
23
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_tapLinkUrl", {
|
|
26
|
+
get: $util.oneOfGetter($oneOfFields = ["tapLinkUrl"]),
|
|
27
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28
|
+
});
|
|
29
|
+
AIRichResponseInlineImageMetadata.create = function create(properties) {
|
|
30
|
+
return new AIRichResponseInlineImageMetadata(properties);
|
|
31
|
+
};
|
|
32
|
+
AIRichResponseInlineImageMetadata.encode = function encode(m, w) {
|
|
33
|
+
if (!w)
|
|
34
|
+
w = $Writer.create();
|
|
35
|
+
if (m.imageUrl != null && Object.hasOwnProperty.call(m, "imageUrl"))
|
|
36
|
+
$root.proto.AIRichResponseImageURL.encode(m.imageUrl, w.uint32(10).fork()).ldelim();
|
|
37
|
+
if (m.imageText != null && Object.hasOwnProperty.call(m, "imageText"))
|
|
38
|
+
w.uint32(18).string(m.imageText);
|
|
39
|
+
if (m.alignment != null && Object.hasOwnProperty.call(m, "alignment"))
|
|
40
|
+
w.uint32(24).int32(m.alignment);
|
|
41
|
+
if (m.tapLinkUrl != null && Object.hasOwnProperty.call(m, "tapLinkUrl"))
|
|
42
|
+
w.uint32(34).string(m.tapLinkUrl);
|
|
43
|
+
return w;
|
|
44
|
+
};
|
|
45
|
+
AIRichResponseInlineImageMetadata.decode = function decode(r, l, e, n) {
|
|
46
|
+
if (!(r instanceof $Reader))
|
|
47
|
+
r = $Reader.create(r);
|
|
48
|
+
if (n === undefined)
|
|
49
|
+
n = 0;
|
|
50
|
+
if (n > $Reader.recursionLimit)
|
|
51
|
+
throw Error("maximum nesting depth exceeded");
|
|
52
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseInlineImageMetadata();
|
|
53
|
+
while (r.pos < c) {
|
|
54
|
+
var t = r.uint32();
|
|
55
|
+
if (t === e)
|
|
56
|
+
break;
|
|
57
|
+
switch (t >>> 3) {
|
|
58
|
+
case 1: {
|
|
59
|
+
m.imageUrl = $root.proto.AIRichResponseImageURL.decode(r, r.uint32(), undefined, n + 1);
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 2: {
|
|
63
|
+
m.imageText = r.string();
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
case 3: {
|
|
67
|
+
m.alignment = r.int32();
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case 4: {
|
|
71
|
+
m.tapLinkUrl = r.string();
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
default:
|
|
75
|
+
r.skipType(t & 7, n);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return m;
|
|
80
|
+
};
|
|
81
|
+
AIRichResponseInlineImageMetadata.fromObject = function fromObject(d, n) {
|
|
82
|
+
if (d instanceof $root.proto.AIRichResponseInlineImageMetadata)
|
|
83
|
+
return d;
|
|
84
|
+
if (n === undefined)
|
|
85
|
+
n = 0;
|
|
86
|
+
if (n > $util.recursionLimit)
|
|
87
|
+
throw Error("maximum nesting depth exceeded");
|
|
88
|
+
var m = new $root.proto.AIRichResponseInlineImageMetadata();
|
|
89
|
+
if (d.imageUrl != null) {
|
|
90
|
+
if (typeof d.imageUrl !== "object")
|
|
91
|
+
throw TypeError(".proto.AIRichResponseInlineImageMetadata.imageUrl: object expected");
|
|
92
|
+
m.imageUrl = $root.proto.AIRichResponseImageURL.fromObject(d.imageUrl, n + 1);
|
|
93
|
+
}
|
|
94
|
+
if (d.imageText != null) {
|
|
95
|
+
m.imageText = String(d.imageText);
|
|
96
|
+
}
|
|
97
|
+
switch (d.alignment) {
|
|
98
|
+
default:
|
|
99
|
+
if (typeof d.alignment === "number") {
|
|
100
|
+
m.alignment = d.alignment;
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED":
|
|
105
|
+
case 0:
|
|
106
|
+
m.alignment = 0;
|
|
107
|
+
break;
|
|
108
|
+
case "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED":
|
|
109
|
+
case 1:
|
|
110
|
+
m.alignment = 1;
|
|
111
|
+
break;
|
|
112
|
+
case "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED":
|
|
113
|
+
case 2:
|
|
114
|
+
m.alignment = 2;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
if (d.tapLinkUrl != null) {
|
|
118
|
+
m.tapLinkUrl = String(d.tapLinkUrl);
|
|
119
|
+
}
|
|
120
|
+
return m;
|
|
121
|
+
};
|
|
122
|
+
AIRichResponseInlineImageMetadata.toObject = function toObject(m, o) {
|
|
123
|
+
if (!o)
|
|
124
|
+
o = {};
|
|
125
|
+
var d = {};
|
|
126
|
+
if (m.imageUrl != null && m.hasOwnProperty("imageUrl")) {
|
|
127
|
+
d.imageUrl = $root.proto.AIRichResponseImageURL.toObject(m.imageUrl, o);
|
|
128
|
+
if (o.oneofs)
|
|
129
|
+
d._imageUrl = "imageUrl";
|
|
130
|
+
}
|
|
131
|
+
if (m.imageText != null && m.hasOwnProperty("imageText")) {
|
|
132
|
+
d.imageText = m.imageText;
|
|
133
|
+
if (o.oneofs)
|
|
134
|
+
d._imageText = "imageText";
|
|
135
|
+
}
|
|
136
|
+
if (m.alignment != null && m.hasOwnProperty("alignment")) {
|
|
137
|
+
d.alignment = o.enums === String ? $root.proto.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[m.alignment] === undefined ? m.alignment : $root.proto.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[m.alignment] : m.alignment;
|
|
138
|
+
if (o.oneofs)
|
|
139
|
+
d._alignment = "alignment";
|
|
140
|
+
}
|
|
141
|
+
if (m.tapLinkUrl != null && m.hasOwnProperty("tapLinkUrl")) {
|
|
142
|
+
d.tapLinkUrl = m.tapLinkUrl;
|
|
143
|
+
if (o.oneofs)
|
|
144
|
+
d._tapLinkUrl = "tapLinkUrl";
|
|
145
|
+
}
|
|
146
|
+
return d;
|
|
147
|
+
};
|
|
148
|
+
AIRichResponseInlineImageMetadata.prototype.toJSON = function toJSON() {
|
|
149
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
150
|
+
};
|
|
151
|
+
AIRichResponseInlineImageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
152
|
+
if (typeUrlPrefix === undefined) {
|
|
153
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
154
|
+
}
|
|
155
|
+
return typeUrlPrefix + "/proto.AIRichResponseInlineImageMetadata";
|
|
156
|
+
};
|
|
157
|
+
$lazy(AIRichResponseInlineImageMetadata, "AIRichResponseImageAlignment", function() {
|
|
158
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
159
|
+
values[valuesById[0] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED"] = 0;
|
|
160
|
+
values[valuesById[1] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED"] = 1;
|
|
161
|
+
values[valuesById[2] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED"] = 2;
|
|
162
|
+
return values;
|
|
163
|
+
});
|
|
164
|
+
return AIRichResponseInlineImageMetadata;
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function AIRichResponseLatexMetadata(p) {
|
|
3
|
+
this.expressions = [];
|
|
4
|
+
if (p)
|
|
5
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
6
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
7
|
+
this[ks[i]] = p[ks[i]];
|
|
8
|
+
}
|
|
9
|
+
AIRichResponseLatexMetadata.prototype.text = null;
|
|
10
|
+
AIRichResponseLatexMetadata.prototype.expressions = $util.emptyArray;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(AIRichResponseLatexMetadata.prototype, "_text", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["text"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
AIRichResponseLatexMetadata.create = function create(properties) {
|
|
17
|
+
return new AIRichResponseLatexMetadata(properties);
|
|
18
|
+
};
|
|
19
|
+
AIRichResponseLatexMetadata.encode = function encode(m, w) {
|
|
20
|
+
if (!w)
|
|
21
|
+
w = $Writer.create();
|
|
22
|
+
if (m.text != null && Object.hasOwnProperty.call(m, "text"))
|
|
23
|
+
w.uint32(10).string(m.text);
|
|
24
|
+
if (m.expressions != null && m.expressions.length) {
|
|
25
|
+
for (var i = 0; i < m.expressions.length; ++i)
|
|
26
|
+
$root.proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.encode(m.expressions[i], w.uint32(18).fork()).ldelim();
|
|
27
|
+
}
|
|
28
|
+
return w;
|
|
29
|
+
};
|
|
30
|
+
AIRichResponseLatexMetadata.decode = function decode(r, l, e, n) {
|
|
31
|
+
if (!(r instanceof $Reader))
|
|
32
|
+
r = $Reader.create(r);
|
|
33
|
+
if (n === undefined)
|
|
34
|
+
n = 0;
|
|
35
|
+
if (n > $Reader.recursionLimit)
|
|
36
|
+
throw Error("maximum nesting depth exceeded");
|
|
37
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseLatexMetadata();
|
|
38
|
+
while (r.pos < c) {
|
|
39
|
+
var t = r.uint32();
|
|
40
|
+
if (t === e)
|
|
41
|
+
break;
|
|
42
|
+
switch (t >>> 3) {
|
|
43
|
+
case 1: {
|
|
44
|
+
m.text = r.string();
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case 2: {
|
|
48
|
+
if (!(m.expressions && m.expressions.length))
|
|
49
|
+
m.expressions = [];
|
|
50
|
+
m.expressions.push($root.proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.decode(r, r.uint32(), undefined, n + 1));
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
default:
|
|
54
|
+
r.skipType(t & 7, n);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return m;
|
|
59
|
+
};
|
|
60
|
+
AIRichResponseLatexMetadata.fromObject = function fromObject(d, n) {
|
|
61
|
+
if (d instanceof $root.proto.AIRichResponseLatexMetadata)
|
|
62
|
+
return d;
|
|
63
|
+
if (n === undefined)
|
|
64
|
+
n = 0;
|
|
65
|
+
if (n > $util.recursionLimit)
|
|
66
|
+
throw Error("maximum nesting depth exceeded");
|
|
67
|
+
var m = new $root.proto.AIRichResponseLatexMetadata();
|
|
68
|
+
if (d.text != null) {
|
|
69
|
+
m.text = String(d.text);
|
|
70
|
+
}
|
|
71
|
+
if (d.expressions) {
|
|
72
|
+
if (!Array.isArray(d.expressions))
|
|
73
|
+
throw TypeError(".proto.AIRichResponseLatexMetadata.expressions: array expected");
|
|
74
|
+
m.expressions = [];
|
|
75
|
+
for (var i = 0; i < d.expressions.length; ++i) {
|
|
76
|
+
if (typeof d.expressions[i] !== "object")
|
|
77
|
+
throw TypeError(".proto.AIRichResponseLatexMetadata.expressions: object expected");
|
|
78
|
+
m.expressions[i] = $root.proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.fromObject(d.expressions[i], n + 1);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return m;
|
|
82
|
+
};
|
|
83
|
+
AIRichResponseLatexMetadata.toObject = function toObject(m, o) {
|
|
84
|
+
if (!o)
|
|
85
|
+
o = {};
|
|
86
|
+
var d = {};
|
|
87
|
+
if (o.arrays || o.defaults) {
|
|
88
|
+
d.expressions = [];
|
|
89
|
+
}
|
|
90
|
+
if (m.text != null && m.hasOwnProperty("text")) {
|
|
91
|
+
d.text = m.text;
|
|
92
|
+
if (o.oneofs)
|
|
93
|
+
d._text = "text";
|
|
94
|
+
}
|
|
95
|
+
if (m.expressions && m.expressions.length) {
|
|
96
|
+
d.expressions = [];
|
|
97
|
+
for (var j = 0; j < m.expressions.length; ++j) {
|
|
98
|
+
d.expressions[j] = $root.proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.toObject(m.expressions[j], o);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return d;
|
|
102
|
+
};
|
|
103
|
+
AIRichResponseLatexMetadata.prototype.toJSON = function toJSON() {
|
|
104
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
105
|
+
};
|
|
106
|
+
AIRichResponseLatexMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
107
|
+
if (typeUrlPrefix === undefined) {
|
|
108
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
109
|
+
}
|
|
110
|
+
return typeUrlPrefix + "/proto.AIRichResponseLatexMetadata";
|
|
111
|
+
};
|
|
112
|
+
$lazy(AIRichResponseLatexMetadata, "AIRichResponseLatexExpression", function() {
|
|
113
|
+
function AIRichResponseLatexExpression(p) {
|
|
114
|
+
if (p)
|
|
115
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
116
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
117
|
+
this[ks[i]] = p[ks[i]];
|
|
118
|
+
}
|
|
119
|
+
AIRichResponseLatexExpression.prototype.latexExpression = null;
|
|
120
|
+
AIRichResponseLatexExpression.prototype.url = null;
|
|
121
|
+
AIRichResponseLatexExpression.prototype.width = null;
|
|
122
|
+
AIRichResponseLatexExpression.prototype.height = null;
|
|
123
|
+
AIRichResponseLatexExpression.prototype.fontHeight = null;
|
|
124
|
+
AIRichResponseLatexExpression.prototype.imageTopPadding = null;
|
|
125
|
+
AIRichResponseLatexExpression.prototype.imageLeadingPadding = null;
|
|
126
|
+
AIRichResponseLatexExpression.prototype.imageBottomPadding = null;
|
|
127
|
+
AIRichResponseLatexExpression.prototype.imageTrailingPadding = null;
|
|
128
|
+
let $oneOfFields;
|
|
129
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_latexExpression", {
|
|
130
|
+
get: $util.oneOfGetter($oneOfFields = ["latexExpression"]),
|
|
131
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_url", {
|
|
134
|
+
get: $util.oneOfGetter($oneOfFields = ["url"]),
|
|
135
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_width", {
|
|
138
|
+
get: $util.oneOfGetter($oneOfFields = ["width"]),
|
|
139
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
140
|
+
});
|
|
141
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_height", {
|
|
142
|
+
get: $util.oneOfGetter($oneOfFields = ["height"]),
|
|
143
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_fontHeight", {
|
|
146
|
+
get: $util.oneOfGetter($oneOfFields = ["fontHeight"]),
|
|
147
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
148
|
+
});
|
|
149
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageTopPadding", {
|
|
150
|
+
get: $util.oneOfGetter($oneOfFields = ["imageTopPadding"]),
|
|
151
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
152
|
+
});
|
|
153
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageLeadingPadding", {
|
|
154
|
+
get: $util.oneOfGetter($oneOfFields = ["imageLeadingPadding"]),
|
|
155
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
156
|
+
});
|
|
157
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageBottomPadding", {
|
|
158
|
+
get: $util.oneOfGetter($oneOfFields = ["imageBottomPadding"]),
|
|
159
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageTrailingPadding", {
|
|
162
|
+
get: $util.oneOfGetter($oneOfFields = ["imageTrailingPadding"]),
|
|
163
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
164
|
+
});
|
|
165
|
+
AIRichResponseLatexExpression.create = function create(properties) {
|
|
166
|
+
return new AIRichResponseLatexExpression(properties);
|
|
167
|
+
};
|
|
168
|
+
AIRichResponseLatexExpression.encode = function encode(m, w) {
|
|
169
|
+
if (!w)
|
|
170
|
+
w = $Writer.create();
|
|
171
|
+
if (m.latexExpression != null && Object.hasOwnProperty.call(m, "latexExpression"))
|
|
172
|
+
w.uint32(10).string(m.latexExpression);
|
|
173
|
+
if (m.url != null && Object.hasOwnProperty.call(m, "url"))
|
|
174
|
+
w.uint32(18).string(m.url);
|
|
175
|
+
if (m.width != null && Object.hasOwnProperty.call(m, "width"))
|
|
176
|
+
w.uint32(25).double(m.width);
|
|
177
|
+
if (m.height != null && Object.hasOwnProperty.call(m, "height"))
|
|
178
|
+
w.uint32(33).double(m.height);
|
|
179
|
+
if (m.fontHeight != null && Object.hasOwnProperty.call(m, "fontHeight"))
|
|
180
|
+
w.uint32(41).double(m.fontHeight);
|
|
181
|
+
if (m.imageTopPadding != null && Object.hasOwnProperty.call(m, "imageTopPadding"))
|
|
182
|
+
w.uint32(49).double(m.imageTopPadding);
|
|
183
|
+
if (m.imageLeadingPadding != null && Object.hasOwnProperty.call(m, "imageLeadingPadding"))
|
|
184
|
+
w.uint32(57).double(m.imageLeadingPadding);
|
|
185
|
+
if (m.imageBottomPadding != null && Object.hasOwnProperty.call(m, "imageBottomPadding"))
|
|
186
|
+
w.uint32(65).double(m.imageBottomPadding);
|
|
187
|
+
if (m.imageTrailingPadding != null && Object.hasOwnProperty.call(m, "imageTrailingPadding"))
|
|
188
|
+
w.uint32(73).double(m.imageTrailingPadding);
|
|
189
|
+
return w;
|
|
190
|
+
};
|
|
191
|
+
AIRichResponseLatexExpression.decode = function decode(r, l, e, n) {
|
|
192
|
+
if (!(r instanceof $Reader))
|
|
193
|
+
r = $Reader.create(r);
|
|
194
|
+
if (n === undefined)
|
|
195
|
+
n = 0;
|
|
196
|
+
if (n > $Reader.recursionLimit)
|
|
197
|
+
throw Error("maximum nesting depth exceeded");
|
|
198
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression();
|
|
199
|
+
while (r.pos < c) {
|
|
200
|
+
var t = r.uint32();
|
|
201
|
+
if (t === e)
|
|
202
|
+
break;
|
|
203
|
+
switch (t >>> 3) {
|
|
204
|
+
case 1: {
|
|
205
|
+
m.latexExpression = r.string();
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
case 2: {
|
|
209
|
+
m.url = r.string();
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
case 3: {
|
|
213
|
+
m.width = r.double();
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
case 4: {
|
|
217
|
+
m.height = r.double();
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
case 5: {
|
|
221
|
+
m.fontHeight = r.double();
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
case 6: {
|
|
225
|
+
m.imageTopPadding = r.double();
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
case 7: {
|
|
229
|
+
m.imageLeadingPadding = r.double();
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
case 8: {
|
|
233
|
+
m.imageBottomPadding = r.double();
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
case 9: {
|
|
237
|
+
m.imageTrailingPadding = r.double();
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
default:
|
|
241
|
+
r.skipType(t & 7, n);
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return m;
|
|
246
|
+
};
|
|
247
|
+
AIRichResponseLatexExpression.fromObject = function fromObject(d, n) {
|
|
248
|
+
if (d instanceof $root.proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression)
|
|
249
|
+
return d;
|
|
250
|
+
if (n === undefined)
|
|
251
|
+
n = 0;
|
|
252
|
+
if (n > $util.recursionLimit)
|
|
253
|
+
throw Error("maximum nesting depth exceeded");
|
|
254
|
+
var m = new $root.proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression();
|
|
255
|
+
if (d.latexExpression != null) {
|
|
256
|
+
m.latexExpression = String(d.latexExpression);
|
|
257
|
+
}
|
|
258
|
+
if (d.url != null) {
|
|
259
|
+
m.url = String(d.url);
|
|
260
|
+
}
|
|
261
|
+
if (d.width != null) {
|
|
262
|
+
m.width = Number(d.width);
|
|
263
|
+
}
|
|
264
|
+
if (d.height != null) {
|
|
265
|
+
m.height = Number(d.height);
|
|
266
|
+
}
|
|
267
|
+
if (d.fontHeight != null) {
|
|
268
|
+
m.fontHeight = Number(d.fontHeight);
|
|
269
|
+
}
|
|
270
|
+
if (d.imageTopPadding != null) {
|
|
271
|
+
m.imageTopPadding = Number(d.imageTopPadding);
|
|
272
|
+
}
|
|
273
|
+
if (d.imageLeadingPadding != null) {
|
|
274
|
+
m.imageLeadingPadding = Number(d.imageLeadingPadding);
|
|
275
|
+
}
|
|
276
|
+
if (d.imageBottomPadding != null) {
|
|
277
|
+
m.imageBottomPadding = Number(d.imageBottomPadding);
|
|
278
|
+
}
|
|
279
|
+
if (d.imageTrailingPadding != null) {
|
|
280
|
+
m.imageTrailingPadding = Number(d.imageTrailingPadding);
|
|
281
|
+
}
|
|
282
|
+
return m;
|
|
283
|
+
};
|
|
284
|
+
AIRichResponseLatexExpression.toObject = function toObject(m, o) {
|
|
285
|
+
if (!o)
|
|
286
|
+
o = {};
|
|
287
|
+
var d = {};
|
|
288
|
+
if (m.latexExpression != null && m.hasOwnProperty("latexExpression")) {
|
|
289
|
+
d.latexExpression = m.latexExpression;
|
|
290
|
+
if (o.oneofs)
|
|
291
|
+
d._latexExpression = "latexExpression";
|
|
292
|
+
}
|
|
293
|
+
if (m.url != null && m.hasOwnProperty("url")) {
|
|
294
|
+
d.url = m.url;
|
|
295
|
+
if (o.oneofs)
|
|
296
|
+
d._url = "url";
|
|
297
|
+
}
|
|
298
|
+
if (m.width != null && m.hasOwnProperty("width")) {
|
|
299
|
+
d.width = o.json && !isFinite(m.width) ? String(m.width) : m.width;
|
|
300
|
+
if (o.oneofs)
|
|
301
|
+
d._width = "width";
|
|
302
|
+
}
|
|
303
|
+
if (m.height != null && m.hasOwnProperty("height")) {
|
|
304
|
+
d.height = o.json && !isFinite(m.height) ? String(m.height) : m.height;
|
|
305
|
+
if (o.oneofs)
|
|
306
|
+
d._height = "height";
|
|
307
|
+
}
|
|
308
|
+
if (m.fontHeight != null && m.hasOwnProperty("fontHeight")) {
|
|
309
|
+
d.fontHeight = o.json && !isFinite(m.fontHeight) ? String(m.fontHeight) : m.fontHeight;
|
|
310
|
+
if (o.oneofs)
|
|
311
|
+
d._fontHeight = "fontHeight";
|
|
312
|
+
}
|
|
313
|
+
if (m.imageTopPadding != null && m.hasOwnProperty("imageTopPadding")) {
|
|
314
|
+
d.imageTopPadding = o.json && !isFinite(m.imageTopPadding) ? String(m.imageTopPadding) : m.imageTopPadding;
|
|
315
|
+
if (o.oneofs)
|
|
316
|
+
d._imageTopPadding = "imageTopPadding";
|
|
317
|
+
}
|
|
318
|
+
if (m.imageLeadingPadding != null && m.hasOwnProperty("imageLeadingPadding")) {
|
|
319
|
+
d.imageLeadingPadding = o.json && !isFinite(m.imageLeadingPadding) ? String(m.imageLeadingPadding) : m.imageLeadingPadding;
|
|
320
|
+
if (o.oneofs)
|
|
321
|
+
d._imageLeadingPadding = "imageLeadingPadding";
|
|
322
|
+
}
|
|
323
|
+
if (m.imageBottomPadding != null && m.hasOwnProperty("imageBottomPadding")) {
|
|
324
|
+
d.imageBottomPadding = o.json && !isFinite(m.imageBottomPadding) ? String(m.imageBottomPadding) : m.imageBottomPadding;
|
|
325
|
+
if (o.oneofs)
|
|
326
|
+
d._imageBottomPadding = "imageBottomPadding";
|
|
327
|
+
}
|
|
328
|
+
if (m.imageTrailingPadding != null && m.hasOwnProperty("imageTrailingPadding")) {
|
|
329
|
+
d.imageTrailingPadding = o.json && !isFinite(m.imageTrailingPadding) ? String(m.imageTrailingPadding) : m.imageTrailingPadding;
|
|
330
|
+
if (o.oneofs)
|
|
331
|
+
d._imageTrailingPadding = "imageTrailingPadding";
|
|
332
|
+
}
|
|
333
|
+
return d;
|
|
334
|
+
};
|
|
335
|
+
AIRichResponseLatexExpression.prototype.toJSON = function toJSON() {
|
|
336
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
337
|
+
};
|
|
338
|
+
AIRichResponseLatexExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
339
|
+
if (typeUrlPrefix === undefined) {
|
|
340
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
341
|
+
}
|
|
342
|
+
return typeUrlPrefix + "/proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression";
|
|
343
|
+
};
|
|
344
|
+
return AIRichResponseLatexExpression;
|
|
345
|
+
});
|
|
346
|
+
return AIRichResponseLatexMetadata;
|