@ekhein/lamda-node-sdk 1.0.3 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/src/constants/activity.flag.d.ts +22 -0
  2. package/dist/src/constants/activity.flag.js +22 -0
  3. package/dist/src/constants/android.intent.d.ts +56 -0
  4. package/dist/src/constants/android.intent.js +56 -0
  5. package/dist/src/constants/android.permission.d.ts +30 -0
  6. package/dist/src/constants/android.permission.js +30 -0
  7. package/dist/src/constants/index.d.ts +3 -0
  8. package/dist/src/constants/index.js +3 -0
  9. package/dist/src/decorators/inject.decorator.d.ts +2 -0
  10. package/dist/src/decorators/inject.decorator.js +15 -0
  11. package/dist/src/exceptions/remoteCall.exception.d.ts +7 -0
  12. package/dist/src/exceptions/remoteCall.exception.js +12 -0
  13. package/dist/src/exceptions/timeout.exception.d.ts +4 -0
  14. package/dist/src/exceptions/timeout.exception.js +6 -0
  15. package/dist/src/interceptor/remoteException.Interceptor.d.ts +2 -0
  16. package/dist/src/interceptor/remoteException.Interceptor.js +13 -0
  17. package/dist/{main.d.ts → src/main.d.ts} +9 -21
  18. package/dist/src/main.js +135 -0
  19. package/dist/src/rpc/application.d.ts +136 -0
  20. package/dist/src/rpc/application.js +1537 -0
  21. package/dist/src/rpc/debug.d.ts +19 -0
  22. package/dist/src/rpc/debug.js +56 -0
  23. package/dist/{rpc → src/rpc}/file.d.ts +11 -13
  24. package/dist/src/rpc/file.js +373 -0
  25. package/dist/src/rpc/google/protobuf/any.d.ts +20 -0
  26. package/dist/src/rpc/google/protobuf/any.js +98 -0
  27. package/dist/src/rpc/google/protobuf/empty.d.ts +18 -0
  28. package/dist/src/rpc/google/protobuf/empty.js +39 -0
  29. package/dist/{rpc → src/rpc}/google/protobuf/struct.d.ts +19 -21
  30. package/dist/src/rpc/google/protobuf/struct.js +438 -0
  31. package/dist/src/rpc/policy.d.ts +22 -0
  32. package/dist/src/rpc/policy.js +103 -0
  33. package/dist/src/rpc/proxy.d.ts +106 -0
  34. package/dist/src/rpc/proxy.js +774 -0
  35. package/dist/{rpc → src/rpc}/services.d.ts +421 -424
  36. package/dist/src/rpc/services.js +1493 -0
  37. package/dist/src/rpc/settings.d.ts +29 -0
  38. package/dist/src/rpc/settings.js +125 -0
  39. package/dist/src/rpc/shell.d.ts +34 -0
  40. package/dist/src/rpc/shell.js +294 -0
  41. package/dist/{rpc → src/rpc}/status.d.ts +17 -19
  42. package/dist/src/rpc/status.js +896 -0
  43. package/dist/src/rpc/storage.d.ts +22 -0
  44. package/dist/src/rpc/storage.js +128 -0
  45. package/dist/src/rpc/types.d.ts +34 -0
  46. package/dist/src/rpc/types.js +281 -0
  47. package/dist/{rpc → src/rpc}/uiautomator.d.ts +87 -89
  48. package/dist/src/rpc/uiautomator.js +5350 -0
  49. package/dist/src/rpc/util.d.ts +101 -0
  50. package/dist/src/rpc/util.js +1158 -0
  51. package/dist/{rpc → src/rpc}/wifi.d.ts +23 -25
  52. package/dist/src/rpc/wifi.js +971 -0
  53. package/package.json +5 -10
  54. package/dist/chunk-3JBDAA2H.js +0 -439
  55. package/dist/chunk-4AHM55IO.js +0 -1172
  56. package/dist/chunk-4NKGYNMS.js +0 -116
  57. package/dist/chunk-6HD35RPW.js +0 -5370
  58. package/dist/chunk-76Y3OVVH.js +0 -1602
  59. package/dist/chunk-7XF22HAW.js +0 -907
  60. package/dist/chunk-7YGA6EOV.js +0 -109
  61. package/dist/chunk-ADS4GRIL.js +0 -14
  62. package/dist/chunk-FSLE4VGI.js +0 -48
  63. package/dist/chunk-H7Z6XFBF.js +0 -134
  64. package/dist/chunk-KJKSI2WL.js +0 -62
  65. package/dist/chunk-O52JGDU7.js +0 -800
  66. package/dist/chunk-ORXTTWPB.js +0 -379
  67. package/dist/chunk-OZJH6SR7.js +0 -20
  68. package/dist/chunk-P53F45YO.js +0 -64
  69. package/dist/chunk-QXMPY6EE.js +0 -289
  70. package/dist/chunk-SBFKX3ZY.js +0 -1554
  71. package/dist/chunk-WFQEBPE6.js +0 -300
  72. package/dist/chunk-X4LTH2UN.js +0 -983
  73. package/dist/chunk-XAX5BZL3.js +0 -132
  74. package/dist/chunk-ZXF5DGTC.js +0 -45
  75. package/dist/constants/activity.flag.cjs +0 -92
  76. package/dist/constants/activity.flag.d.cts +0 -24
  77. package/dist/constants/activity.flag.d.ts +0 -24
  78. package/dist/constants/activity.flag.js +0 -49
  79. package/dist/constants/android.intent.cjs +0 -194
  80. package/dist/constants/android.intent.d.cts +0 -58
  81. package/dist/constants/android.intent.d.ts +0 -58
  82. package/dist/constants/android.intent.js +0 -117
  83. package/dist/constants/android.permission.cjs +0 -116
  84. package/dist/constants/android.permission.d.cts +0 -32
  85. package/dist/constants/android.permission.d.ts +0 -32
  86. package/dist/constants/android.permission.js +0 -65
  87. package/dist/constants/index.cjs +0 -356
  88. package/dist/constants/index.d.cts +0 -3
  89. package/dist/constants/index.d.ts +0 -3
  90. package/dist/constants/index.js +0 -225
  91. package/dist/decorators/inject.decorator.cjs +0 -43
  92. package/dist/decorators/inject.decorator.d.cts +0 -5
  93. package/dist/decorators/inject.decorator.d.ts +0 -5
  94. package/dist/decorators/inject.decorator.js +0 -7
  95. package/dist/main.cjs +0 -11969
  96. package/dist/main.d.cts +0 -37
  97. package/dist/main.js +0 -112
  98. package/dist/rpc/application.cjs +0 -2019
  99. package/dist/rpc/application.d.cts +0 -138
  100. package/dist/rpc/application.d.ts +0 -138
  101. package/dist/rpc/application.js +0 -50
  102. package/dist/rpc/debug.cjs +0 -86
  103. package/dist/rpc/debug.d.cts +0 -21
  104. package/dist/rpc/debug.d.ts +0 -21
  105. package/dist/rpc/debug.js +0 -9
  106. package/dist/rpc/file.cjs +0 -405
  107. package/dist/rpc/file.d.cts +0 -40
  108. package/dist/rpc/file.js +0 -13
  109. package/dist/rpc/google/protobuf/any.cjs +0 -126
  110. package/dist/rpc/google/protobuf/any.d.cts +0 -22
  111. package/dist/rpc/google/protobuf/any.d.ts +0 -22
  112. package/dist/rpc/google/protobuf/any.js +0 -103
  113. package/dist/rpc/google/protobuf/empty.cjs +0 -69
  114. package/dist/rpc/google/protobuf/empty.d.cts +0 -20
  115. package/dist/rpc/google/protobuf/empty.d.ts +0 -20
  116. package/dist/rpc/google/protobuf/empty.js +0 -9
  117. package/dist/rpc/google/protobuf/struct.cjs +0 -469
  118. package/dist/rpc/google/protobuf/struct.d.cts +0 -65
  119. package/dist/rpc/google/protobuf/struct.js +0 -21
  120. package/dist/rpc/policy.cjs +0 -133
  121. package/dist/rpc/policy.d.cts +0 -24
  122. package/dist/rpc/policy.d.ts +0 -24
  123. package/dist/rpc/policy.js +0 -9
  124. package/dist/rpc/proxy.cjs +0 -1109
  125. package/dist/rpc/proxy.d.cts +0 -108
  126. package/dist/rpc/proxy.d.ts +0 -108
  127. package/dist/rpc/proxy.js +0 -49
  128. package/dist/rpc/services.cjs +0 -11898
  129. package/dist/rpc/services.d.cts +0 -1920
  130. package/dist/rpc/services.js +0 -48
  131. package/dist/rpc/settings.cjs +0 -161
  132. package/dist/rpc/settings.d.cts +0 -31
  133. package/dist/rpc/settings.d.ts +0 -31
  134. package/dist/rpc/settings.js +0 -15
  135. package/dist/rpc/shell.cjs +0 -326
  136. package/dist/rpc/shell.d.cts +0 -36
  137. package/dist/rpc/shell.d.ts +0 -36
  138. package/dist/rpc/shell.js +0 -13
  139. package/dist/rpc/status.cjs +0 -936
  140. package/dist/rpc/status.d.cts +0 -76
  141. package/dist/rpc/status.js +0 -19
  142. package/dist/rpc/storage.cjs +0 -156
  143. package/dist/rpc/storage.d.cts +0 -24
  144. package/dist/rpc/storage.d.ts +0 -24
  145. package/dist/rpc/storage.js +0 -9
  146. package/dist/rpc/types.cjs +0 -317
  147. package/dist/rpc/types.d.cts +0 -36
  148. package/dist/rpc/types.d.ts +0 -36
  149. package/dist/rpc/types.js +0 -17
  150. package/dist/rpc/uiautomator.cjs +0 -5446
  151. package/dist/rpc/uiautomator.d.cts +0 -618
  152. package/dist/rpc/uiautomator.js +0 -113
  153. package/dist/rpc/util.cjs +0 -1212
  154. package/dist/rpc/util.d.cts +0 -103
  155. package/dist/rpc/util.d.ts +0 -103
  156. package/dist/rpc/util.js +0 -41
  157. package/dist/rpc/wifi.cjs +0 -1015
  158. package/dist/rpc/wifi.d.cts +0 -84
  159. package/dist/rpc/wifi.js +0 -25
@@ -0,0 +1,22 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "lamda.rpc";
3
+ export interface StorageRequest {
4
+ container: string;
5
+ key: string;
6
+ value: Uint8Array;
7
+ ttl: number;
8
+ }
9
+ export declare const StorageRequest: MessageFns<StorageRequest>;
10
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
11
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
12
+ [K in keyof T]?: DeepPartial<T[K]>;
13
+ } : Partial<T>;
14
+ export interface MessageFns<T> {
15
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
16
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
17
+ fromJSON(object: any): T;
18
+ toJSON(message: T): unknown;
19
+ create(base?: DeepPartial<T>): T;
20
+ fromPartial(object: DeepPartial<T>): T;
21
+ }
22
+ export {};
@@ -0,0 +1,128 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export const protobufPackage = "lamda.rpc";
3
+ function createBaseStorageRequest() {
4
+ return { container: "", key: "", value: new Uint8Array(0), ttl: 0 };
5
+ }
6
+ export const StorageRequest = {
7
+ encode(message, writer = new BinaryWriter()) {
8
+ if (message.container !== "") {
9
+ writer.uint32(10).string(message.container);
10
+ }
11
+ if (message.key !== "") {
12
+ writer.uint32(18).string(message.key);
13
+ }
14
+ if (message.value.length !== 0) {
15
+ writer.uint32(26).bytes(message.value);
16
+ }
17
+ if (message.ttl !== 0) {
18
+ writer.uint32(32).uint32(message.ttl);
19
+ }
20
+ return writer;
21
+ },
22
+ decode(input, length) {
23
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24
+ let end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBaseStorageRequest();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ case 1: {
30
+ if (tag !== 10) {
31
+ break;
32
+ }
33
+ message.container = reader.string();
34
+ continue;
35
+ }
36
+ case 2: {
37
+ if (tag !== 18) {
38
+ break;
39
+ }
40
+ message.key = reader.string();
41
+ continue;
42
+ }
43
+ case 3: {
44
+ if (tag !== 26) {
45
+ break;
46
+ }
47
+ message.value = reader.bytes();
48
+ continue;
49
+ }
50
+ case 4: {
51
+ if (tag !== 32) {
52
+ break;
53
+ }
54
+ message.ttl = reader.uint32();
55
+ continue;
56
+ }
57
+ }
58
+ if ((tag & 7) === 4 || tag === 0) {
59
+ break;
60
+ }
61
+ reader.skip(tag & 7);
62
+ }
63
+ return message;
64
+ },
65
+ fromJSON(object) {
66
+ return {
67
+ container: isSet(object.container) ? globalThis.String(object.container) : "",
68
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
69
+ value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
70
+ ttl: isSet(object.ttl) ? globalThis.Number(object.ttl) : 0,
71
+ };
72
+ },
73
+ toJSON(message) {
74
+ const obj = {};
75
+ if (message.container !== "") {
76
+ obj.container = message.container;
77
+ }
78
+ if (message.key !== "") {
79
+ obj.key = message.key;
80
+ }
81
+ if (message.value.length !== 0) {
82
+ obj.value = base64FromBytes(message.value);
83
+ }
84
+ if (message.ttl !== 0) {
85
+ obj.ttl = Math.round(message.ttl);
86
+ }
87
+ return obj;
88
+ },
89
+ create(base) {
90
+ return StorageRequest.fromPartial(base ?? {});
91
+ },
92
+ fromPartial(object) {
93
+ const message = createBaseStorageRequest();
94
+ message.container = object.container ?? "";
95
+ message.key = object.key ?? "";
96
+ message.value = object.value ?? new Uint8Array(0);
97
+ message.ttl = object.ttl ?? 0;
98
+ return message;
99
+ },
100
+ };
101
+ function bytesFromBase64(b64) {
102
+ if (globalThis.Buffer) {
103
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
104
+ }
105
+ else {
106
+ const bin = globalThis.atob(b64);
107
+ const arr = new Uint8Array(bin.length);
108
+ for (let i = 0; i < bin.length; ++i) {
109
+ arr[i] = bin.charCodeAt(i);
110
+ }
111
+ return arr;
112
+ }
113
+ }
114
+ function base64FromBytes(arr) {
115
+ if (globalThis.Buffer) {
116
+ return globalThis.Buffer.from(arr).toString("base64");
117
+ }
118
+ else {
119
+ const bin = [];
120
+ arr.forEach((byte) => {
121
+ bin.push(globalThis.String.fromCharCode(byte));
122
+ });
123
+ return globalThis.btoa(bin.join(""));
124
+ }
125
+ }
126
+ function isSet(value) {
127
+ return value !== null && value !== undefined;
128
+ }
@@ -0,0 +1,34 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "lamda.rpc";
3
+ export interface Boolean {
4
+ value: boolean;
5
+ }
6
+ export interface Integer {
7
+ value: number;
8
+ }
9
+ export interface String {
10
+ value: string;
11
+ }
12
+ export interface Bytes {
13
+ value: Uint8Array;
14
+ }
15
+ export interface Empty {
16
+ }
17
+ export declare const Boolean: MessageFns<Boolean>;
18
+ export declare const Integer: MessageFns<Integer>;
19
+ export declare const String: MessageFns<String>;
20
+ export declare const Bytes: MessageFns<Bytes>;
21
+ export declare const Empty: MessageFns<Empty>;
22
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
23
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
24
+ [K in keyof T]?: DeepPartial<T[K]>;
25
+ } : Partial<T>;
26
+ export interface MessageFns<T> {
27
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
28
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
29
+ fromJSON(object: any): T;
30
+ toJSON(message: T): unknown;
31
+ create(base?: DeepPartial<T>): T;
32
+ fromPartial(object: DeepPartial<T>): T;
33
+ }
34
+ export {};
@@ -0,0 +1,281 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export const protobufPackage = "lamda.rpc";
3
+ function createBaseBoolean() {
4
+ return { value: false };
5
+ }
6
+ export const Boolean = {
7
+ encode(message, writer = new BinaryWriter()) {
8
+ if (message.value !== false) {
9
+ writer.uint32(8).bool(message.value);
10
+ }
11
+ return writer;
12
+ },
13
+ decode(input, length) {
14
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
15
+ let end = length === undefined ? reader.len : reader.pos + length;
16
+ const message = createBaseBoolean();
17
+ while (reader.pos < end) {
18
+ const tag = reader.uint32();
19
+ switch (tag >>> 3) {
20
+ case 1: {
21
+ if (tag !== 8) {
22
+ break;
23
+ }
24
+ message.value = reader.bool();
25
+ continue;
26
+ }
27
+ }
28
+ if ((tag & 7) === 4 || tag === 0) {
29
+ break;
30
+ }
31
+ reader.skip(tag & 7);
32
+ }
33
+ return message;
34
+ },
35
+ fromJSON(object) {
36
+ return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false };
37
+ },
38
+ toJSON(message) {
39
+ const obj = {};
40
+ if (message.value !== false) {
41
+ obj.value = message.value;
42
+ }
43
+ return obj;
44
+ },
45
+ create(base) {
46
+ return Boolean.fromPartial(base ?? {});
47
+ },
48
+ fromPartial(object) {
49
+ const message = createBaseBoolean();
50
+ message.value = object.value ?? false;
51
+ return message;
52
+ },
53
+ };
54
+ function createBaseInteger() {
55
+ return { value: 0 };
56
+ }
57
+ export const Integer = {
58
+ encode(message, writer = new BinaryWriter()) {
59
+ if (message.value !== 0) {
60
+ writer.uint32(8).int64(message.value);
61
+ }
62
+ return writer;
63
+ },
64
+ decode(input, length) {
65
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
66
+ let end = length === undefined ? reader.len : reader.pos + length;
67
+ const message = createBaseInteger();
68
+ while (reader.pos < end) {
69
+ const tag = reader.uint32();
70
+ switch (tag >>> 3) {
71
+ case 1: {
72
+ if (tag !== 8) {
73
+ break;
74
+ }
75
+ message.value = longToNumber(reader.int64());
76
+ continue;
77
+ }
78
+ }
79
+ if ((tag & 7) === 4 || tag === 0) {
80
+ break;
81
+ }
82
+ reader.skip(tag & 7);
83
+ }
84
+ return message;
85
+ },
86
+ fromJSON(object) {
87
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
88
+ },
89
+ toJSON(message) {
90
+ const obj = {};
91
+ if (message.value !== 0) {
92
+ obj.value = Math.round(message.value);
93
+ }
94
+ return obj;
95
+ },
96
+ create(base) {
97
+ return Integer.fromPartial(base ?? {});
98
+ },
99
+ fromPartial(object) {
100
+ const message = createBaseInteger();
101
+ message.value = object.value ?? 0;
102
+ return message;
103
+ },
104
+ };
105
+ function createBaseString() {
106
+ return { value: "" };
107
+ }
108
+ export const String = {
109
+ encode(message, writer = new BinaryWriter()) {
110
+ if (message.value !== "") {
111
+ writer.uint32(10).string(message.value);
112
+ }
113
+ return writer;
114
+ },
115
+ decode(input, length) {
116
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
117
+ let end = length === undefined ? reader.len : reader.pos + length;
118
+ const message = createBaseString();
119
+ while (reader.pos < end) {
120
+ const tag = reader.uint32();
121
+ switch (tag >>> 3) {
122
+ case 1: {
123
+ if (tag !== 10) {
124
+ break;
125
+ }
126
+ message.value = reader.string();
127
+ continue;
128
+ }
129
+ }
130
+ if ((tag & 7) === 4 || tag === 0) {
131
+ break;
132
+ }
133
+ reader.skip(tag & 7);
134
+ }
135
+ return message;
136
+ },
137
+ fromJSON(object) {
138
+ return { value: isSet(object.value) ? globalThis.String(object.value) : "" };
139
+ },
140
+ toJSON(message) {
141
+ const obj = {};
142
+ if (message.value !== "") {
143
+ obj.value = message.value;
144
+ }
145
+ return obj;
146
+ },
147
+ create(base) {
148
+ return String.fromPartial(base ?? {});
149
+ },
150
+ fromPartial(object) {
151
+ const message = createBaseString();
152
+ message.value = object.value ?? "";
153
+ return message;
154
+ },
155
+ };
156
+ function createBaseBytes() {
157
+ return { value: new Uint8Array(0) };
158
+ }
159
+ export const Bytes = {
160
+ encode(message, writer = new BinaryWriter()) {
161
+ if (message.value.length !== 0) {
162
+ writer.uint32(10).bytes(message.value);
163
+ }
164
+ return writer;
165
+ },
166
+ decode(input, length) {
167
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
168
+ let end = length === undefined ? reader.len : reader.pos + length;
169
+ const message = createBaseBytes();
170
+ while (reader.pos < end) {
171
+ const tag = reader.uint32();
172
+ switch (tag >>> 3) {
173
+ case 1: {
174
+ if (tag !== 10) {
175
+ break;
176
+ }
177
+ message.value = reader.bytes();
178
+ continue;
179
+ }
180
+ }
181
+ if ((tag & 7) === 4 || tag === 0) {
182
+ break;
183
+ }
184
+ reader.skip(tag & 7);
185
+ }
186
+ return message;
187
+ },
188
+ fromJSON(object) {
189
+ return { value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0) };
190
+ },
191
+ toJSON(message) {
192
+ const obj = {};
193
+ if (message.value.length !== 0) {
194
+ obj.value = base64FromBytes(message.value);
195
+ }
196
+ return obj;
197
+ },
198
+ create(base) {
199
+ return Bytes.fromPartial(base ?? {});
200
+ },
201
+ fromPartial(object) {
202
+ const message = createBaseBytes();
203
+ message.value = object.value ?? new Uint8Array(0);
204
+ return message;
205
+ },
206
+ };
207
+ function createBaseEmpty() {
208
+ return {};
209
+ }
210
+ export const Empty = {
211
+ encode(_, writer = new BinaryWriter()) {
212
+ return writer;
213
+ },
214
+ decode(input, length) {
215
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
216
+ let end = length === undefined ? reader.len : reader.pos + length;
217
+ const message = createBaseEmpty();
218
+ while (reader.pos < end) {
219
+ const tag = reader.uint32();
220
+ switch (tag >>> 3) {
221
+ }
222
+ if ((tag & 7) === 4 || tag === 0) {
223
+ break;
224
+ }
225
+ reader.skip(tag & 7);
226
+ }
227
+ return message;
228
+ },
229
+ fromJSON(_) {
230
+ return {};
231
+ },
232
+ toJSON(_) {
233
+ const obj = {};
234
+ return obj;
235
+ },
236
+ create(base) {
237
+ return Empty.fromPartial(base ?? {});
238
+ },
239
+ fromPartial(_) {
240
+ const message = createBaseEmpty();
241
+ return message;
242
+ },
243
+ };
244
+ function bytesFromBase64(b64) {
245
+ if (globalThis.Buffer) {
246
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
247
+ }
248
+ else {
249
+ const bin = globalThis.atob(b64);
250
+ const arr = new Uint8Array(bin.length);
251
+ for (let i = 0; i < bin.length; ++i) {
252
+ arr[i] = bin.charCodeAt(i);
253
+ }
254
+ return arr;
255
+ }
256
+ }
257
+ function base64FromBytes(arr) {
258
+ if (globalThis.Buffer) {
259
+ return globalThis.Buffer.from(arr).toString("base64");
260
+ }
261
+ else {
262
+ const bin = [];
263
+ arr.forEach((byte) => {
264
+ bin.push(globalThis.String.fromCharCode(byte));
265
+ });
266
+ return globalThis.btoa(bin.join(""));
267
+ }
268
+ }
269
+ function longToNumber(int64) {
270
+ const num = globalThis.Number(int64.toString());
271
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
272
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
273
+ }
274
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
275
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
276
+ }
277
+ return num;
278
+ }
279
+ function isSet(value) {
280
+ return value !== null && value !== undefined;
281
+ }