@origonai/web-sdk 0.1.2 → 0.1.4
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/README.md +15 -0
- package/dist/index.d.ts +79 -0
- package/dist/origon-web-sdk.js +1079 -845
- package/dist/origon-web-sdk.js.map +1 -1
- package/docs/backend-integration.md +17 -30
- package/docs/contract.md +21 -0
- package/docs/voice.md +12 -1
- package/package.json +1 -1
package/dist/origon-web-sdk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class ds {
|
|
2
2
|
constructor() {
|
|
3
3
|
this.callbacks = {};
|
|
4
4
|
}
|
|
@@ -51,181 +51,181 @@ class h extends Error {
|
|
|
51
51
|
return new h({ kind: "session", message: t });
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function un(e) {
|
|
55
55
|
return typeof e == "object" && e !== null && "error" in e && typeof e.error == "object" && e.error !== null && "message" in e.error;
|
|
56
56
|
}
|
|
57
|
-
const k = 8,
|
|
57
|
+
const k = 8, ln = 1048576, L = {
|
|
58
58
|
REQUEST: 1,
|
|
59
59
|
DATA: 2,
|
|
60
60
|
ERROR: 3,
|
|
61
61
|
CANCEL: 4
|
|
62
|
-
},
|
|
63
|
-
class
|
|
62
|
+
}, dn = 0;
|
|
63
|
+
class g extends Error {
|
|
64
64
|
constructor(t) {
|
|
65
65
|
super(t), this.name = "OrpcCodecError";
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
class
|
|
68
|
+
class hn extends g {
|
|
69
69
|
constructor(t) {
|
|
70
|
-
super(`frame payload too large: ${t} > ${
|
|
70
|
+
super(`frame payload too large: ${t} > ${ln}`), this.name = "OrpcFrameTooLargeError", this.declaredLength = t;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
const
|
|
74
|
-
function
|
|
75
|
-
const r =
|
|
76
|
-
([d, f]) => [
|
|
73
|
+
const Ie = new TextEncoder(), fn = new TextDecoder("utf-8", { fatal: !0 });
|
|
74
|
+
function hs(e, t, n, s) {
|
|
75
|
+
const r = Ie.encode(e), i = Object.entries(n).map(
|
|
76
|
+
([d, f]) => [Ie.encode(d), Ie.encode(f)]
|
|
77
77
|
);
|
|
78
78
|
let a = 2 + r.length + 8 + 1 + 2 + s.length;
|
|
79
79
|
for (const [d, f] of i) a += 2 + d.length + 2 + f.length;
|
|
80
|
-
const o =
|
|
80
|
+
const o = Ge(L.REQUEST, a), l = new DataView(o.buffer);
|
|
81
81
|
let u = k;
|
|
82
|
-
l.setUint16(u, r.length), u += 2, o.set(r, u), u += r.length, l.setBigUint64(u, BigInt(t)), u += 8, o[u++] =
|
|
82
|
+
l.setUint16(u, r.length), u += 2, o.set(r, u), u += r.length, l.setBigUint64(u, BigInt(t)), u += 8, o[u++] = dn, l.setUint16(u, i.length), u += 2;
|
|
83
83
|
for (const [d, f] of i)
|
|
84
84
|
l.setUint16(u, d.length), u += 2, o.set(d, u), u += d.length, l.setUint16(u, f.length), u += 2, o.set(f, u), u += f.length;
|
|
85
85
|
return o.set(s, u), o;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
const t =
|
|
87
|
+
function fs(e) {
|
|
88
|
+
const t = Ge(L.DATA, e.length);
|
|
89
89
|
return t.set(e, k), t;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function mn() {
|
|
92
|
+
return Ge(L.CANCEL, 0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ms(e) {
|
|
95
95
|
if (e.length < k)
|
|
96
|
-
throw new
|
|
96
|
+
throw new g(`frame shorter than header: ${e.length} < ${k}`);
|
|
97
97
|
const t = e[0];
|
|
98
98
|
if (!Object.values(L).includes(t))
|
|
99
|
-
throw new
|
|
99
|
+
throw new g(`unexpected frame type 0x${t.toString(16)}`);
|
|
100
100
|
const n = new DataView(e.buffer, e.byteOffset, k), s = n.getUint16(2);
|
|
101
|
-
if (s !== 0) throw new
|
|
101
|
+
if (s !== 0) throw new g(`non-zero reserved field: ${s}`);
|
|
102
102
|
const r = n.getUint32(4);
|
|
103
|
-
if (r >
|
|
103
|
+
if (r > ln) throw new hn(r);
|
|
104
104
|
if (t === L.CANCEL && r !== 0)
|
|
105
|
-
throw new
|
|
105
|
+
throw new g(`CANCEL payload must be empty: ${r}`);
|
|
106
106
|
return { frameType: t, payloadLen: r };
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function ps(e, t) {
|
|
109
109
|
switch (e) {
|
|
110
110
|
case L.REQUEST: {
|
|
111
|
-
const { path: n, body: s } =
|
|
111
|
+
const { path: n, body: s } = gs(t);
|
|
112
112
|
return { type: "response", path: n, body: s };
|
|
113
113
|
}
|
|
114
114
|
case L.DATA:
|
|
115
115
|
return { type: "data", body: t };
|
|
116
116
|
case L.ERROR: {
|
|
117
117
|
if (t.length < 4)
|
|
118
|
-
throw new
|
|
118
|
+
throw new g(`ERROR frame too short for code: ${t.length}`);
|
|
119
119
|
const n = new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
120
120
|
let s;
|
|
121
121
|
try {
|
|
122
|
-
s =
|
|
122
|
+
s = fn.decode(t.subarray(4));
|
|
123
123
|
} catch {
|
|
124
|
-
throw new
|
|
124
|
+
throw new g("ERROR reason is not valid UTF-8");
|
|
125
125
|
}
|
|
126
126
|
return { type: "error", code: n.getUint32(0), reason: s };
|
|
127
127
|
}
|
|
128
128
|
case L.CANCEL:
|
|
129
129
|
return { type: "cancel" };
|
|
130
130
|
default:
|
|
131
|
-
throw new
|
|
131
|
+
throw new g(`unexpected frame type 0x${e.toString(16)}`);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Ge(e, t) {
|
|
135
135
|
if (!Number.isSafeInteger(t) || t < 0 || t > 4294967295)
|
|
136
|
-
throw new
|
|
136
|
+
throw new g(`payload length is outside u32: ${t}`);
|
|
137
137
|
const n = new Uint8Array(k + t), s = new DataView(n.buffer);
|
|
138
138
|
return n[0] = e, n[1] = 0, s.setUint16(2, 0), s.setUint32(4, t), n;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function gs(e) {
|
|
141
141
|
const t = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
142
142
|
let n = 0;
|
|
143
|
-
if (e.length < 2) throw new
|
|
143
|
+
if (e.length < 2) throw new g("REQUEST payload too short for path_len");
|
|
144
144
|
const s = t.getUint16(n);
|
|
145
|
-
if (n += 2, s === 0) throw new
|
|
146
|
-
if (s > 4096) throw new
|
|
147
|
-
if (n + s > e.length) throw new
|
|
145
|
+
if (n += 2, s === 0) throw new g("empty path");
|
|
146
|
+
if (s > 4096) throw new g(`path too long: ${s}`);
|
|
147
|
+
if (n + s > e.length) throw new g("path_len overflows payload");
|
|
148
148
|
const r = e.subarray(n, n + s);
|
|
149
149
|
for (const l of r)
|
|
150
|
-
if (!(l >= 65 && l <= 90 || l >= 97 && l <= 122 || l >= 48 && l <= 57 || l === 46 || l === 95 || l === 47)) throw new
|
|
151
|
-
const i =
|
|
152
|
-
if (n += s, n + 11 > e.length) throw new
|
|
150
|
+
if (!(l >= 65 && l <= 90 || l >= 97 && l <= 122 || l >= 48 && l <= 57 || l === 46 || l === 95 || l === 47)) throw new g("REQUEST path contains an invalid byte");
|
|
151
|
+
const i = fn.decode(r);
|
|
152
|
+
if (n += s, n + 11 > e.length) throw new g("REQUEST payload missing fixed tail");
|
|
153
153
|
n += 8;
|
|
154
154
|
const a = e[n++];
|
|
155
|
-
if (a !==
|
|
156
|
-
throw new
|
|
155
|
+
if (a !== dn)
|
|
156
|
+
throw new g(`unsupported response encoding: ${a}`);
|
|
157
157
|
const o = t.getUint16(n);
|
|
158
158
|
n += 2;
|
|
159
159
|
for (let l = 0; l < o; l++) {
|
|
160
160
|
if (n + 2 > e.length)
|
|
161
|
-
throw new
|
|
161
|
+
throw new g(`truncated metadata key_len at ${l}`);
|
|
162
162
|
const u = t.getUint16(n);
|
|
163
163
|
if (n += 2, n + u > e.length)
|
|
164
|
-
throw new
|
|
164
|
+
throw new g(`truncated metadata key at ${l}`);
|
|
165
165
|
if (n += u, n + 2 > e.length)
|
|
166
|
-
throw new
|
|
166
|
+
throw new g(`truncated metadata val_len at ${l}`);
|
|
167
167
|
const d = t.getUint16(n);
|
|
168
168
|
if (n += 2, n + d > e.length)
|
|
169
|
-
throw new
|
|
169
|
+
throw new g(`truncated metadata val at ${l}`);
|
|
170
170
|
n += d;
|
|
171
171
|
}
|
|
172
172
|
return { path: i, body: e.subarray(n) };
|
|
173
173
|
}
|
|
174
|
-
const
|
|
175
|
-
function
|
|
176
|
-
const t =
|
|
174
|
+
const ue = /* @__PURE__ */ new Map();
|
|
175
|
+
function ct(e) {
|
|
176
|
+
const t = ue.get(e);
|
|
177
177
|
if (t && !t.dead) return t;
|
|
178
178
|
const n = new WebTransport(e), s = { transport: n, dead: !1 };
|
|
179
179
|
return n.closed.then(
|
|
180
|
-
() =>
|
|
181
|
-
() =>
|
|
182
|
-
),
|
|
180
|
+
() => le(e, s),
|
|
181
|
+
() => le(e, s)
|
|
182
|
+
), ue.set(e, s), s;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
t.dead = !0,
|
|
184
|
+
function le(e, t) {
|
|
185
|
+
t.dead = !0, ue.get(e) === t && ue.delete(e);
|
|
186
186
|
}
|
|
187
|
-
async function
|
|
187
|
+
async function ut(e) {
|
|
188
188
|
return await e.transport.ready, e.transport.createBidirectionalStream();
|
|
189
189
|
}
|
|
190
|
-
async function
|
|
191
|
-
let n =
|
|
190
|
+
async function bs(e, t) {
|
|
191
|
+
let n = ct(e), s, r = !1;
|
|
192
192
|
try {
|
|
193
|
-
s = await
|
|
193
|
+
s = await ut(n);
|
|
194
194
|
} catch {
|
|
195
|
-
|
|
195
|
+
le(e, n), r = !0, n = ct(e), s = await ut(n);
|
|
196
196
|
}
|
|
197
197
|
const i = s.writable.getWriter(), a = s.readable.getReader();
|
|
198
198
|
try {
|
|
199
199
|
await i.write(t);
|
|
200
200
|
} catch (o) {
|
|
201
|
-
throw
|
|
201
|
+
throw lt(e, n, o), o;
|
|
202
202
|
}
|
|
203
203
|
return {
|
|
204
204
|
reader: a,
|
|
205
205
|
writer: i,
|
|
206
206
|
reconnected: r,
|
|
207
|
-
sessionFailed: (o) =>
|
|
207
|
+
sessionFailed: (o) => lt(e, n, o)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
typeof n != "object" && typeof n != "function" || n === null || n.source === "session" &&
|
|
210
|
+
function lt(e, t, n) {
|
|
211
|
+
typeof n != "object" && typeof n != "function" || n === null || n.source === "session" && le(e, t);
|
|
212
212
|
}
|
|
213
|
-
class
|
|
213
|
+
class dt {
|
|
214
214
|
constructor(t) {
|
|
215
215
|
this.reader = t, this.chunks = [], this.available = 0, this.ended = !1;
|
|
216
216
|
}
|
|
217
217
|
async readFrame() {
|
|
218
218
|
if (await this.ensure(k), this.available === 0 && this.ended) return null;
|
|
219
219
|
if (this.available < k)
|
|
220
|
-
throw new
|
|
220
|
+
throw new g(
|
|
221
221
|
`response FIN truncated frame header: have ${this.available}, need ${k}`
|
|
222
222
|
);
|
|
223
|
-
const t =
|
|
223
|
+
const t = ms(this.peek(k)), n = k + t.payloadLen;
|
|
224
224
|
if (await this.ensure(n), this.available < n)
|
|
225
|
-
throw new
|
|
225
|
+
throw new g(
|
|
226
226
|
`response FIN truncated frame payload: have ${this.available - k}, need ${t.payloadLen}`
|
|
227
227
|
);
|
|
228
|
-
return this.take(k),
|
|
228
|
+
return this.take(k), ps(t.frameType, this.take(t.payloadLen));
|
|
229
229
|
}
|
|
230
230
|
async cancel(t) {
|
|
231
231
|
await this.reader.cancel(t);
|
|
@@ -277,134 +277,134 @@ const Q = {
|
|
|
277
277
|
STALE: 4098,
|
|
278
278
|
/** session logged out / user deleted / banned → logout */
|
|
279
279
|
REVOKED: 4099
|
|
280
|
-
},
|
|
280
|
+
}, Y = {
|
|
281
281
|
INVALID_ARGUMENT: 2,
|
|
282
282
|
CANCELLED: 4,
|
|
283
283
|
/** Streaming DATA exceeds the ingress cap. */
|
|
284
284
|
MESSAGE_TOO_LARGE: 12
|
|
285
|
-
},
|
|
286
|
-
class
|
|
285
|
+
}, Es = "DATA frame too large";
|
|
286
|
+
class S extends Error {
|
|
287
287
|
constructor(t, n) {
|
|
288
288
|
super(`orpc error 0x${t.toString(16)}${n ? `: ${n}` : ""}`), this.name = "OrpcError", this.code = t, this.reason = n;
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function ys(e) {
|
|
292
292
|
if (typeof e != "object" && typeof e != "function" || e === null) return !1;
|
|
293
293
|
const t = e;
|
|
294
294
|
return t.source === "stream" && Number.isInteger(t.streamErrorCode) && t.streamErrorCode >= 0 && t.streamErrorCode <= 255;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
if (!
|
|
296
|
+
function ws(e) {
|
|
297
|
+
if (!ys(e))
|
|
298
298
|
return e instanceof Error || typeof e == "object" && e !== null && "message" in e ? e : new Error(String(e));
|
|
299
|
-
const t = e.streamErrorCode ===
|
|
300
|
-
return new
|
|
299
|
+
const t = e.streamErrorCode === Y.MESSAGE_TOO_LARGE ? Es : `WebTransport stream aborted with code 0x${e.streamErrorCode.toString(16)}`;
|
|
300
|
+
return new S(e.streamErrorCode, t);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function pn(e, t = "orpc stream cancelled") {
|
|
303
303
|
if (typeof WebTransportError < "u")
|
|
304
304
|
return new WebTransportError(t, { source: "stream", streamErrorCode: e });
|
|
305
305
|
const n = new Error(t);
|
|
306
306
|
return n.name = "WebTransportError", n.source = "stream", n.streamErrorCode = e, n;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const Is = {
|
|
309
309
|
event() {
|
|
310
310
|
}
|
|
311
|
-
},
|
|
312
|
-
function
|
|
313
|
-
return
|
|
311
|
+
}, Ns = [];
|
|
312
|
+
function Ts() {
|
|
313
|
+
return Ns.slice();
|
|
314
314
|
}
|
|
315
|
-
typeof window < "u" && (window.__orpcDebug =
|
|
316
|
-
function
|
|
317
|
-
const s = n.logger ??
|
|
315
|
+
typeof window < "u" && (window.__orpcDebug = Ts);
|
|
316
|
+
function Ss(e, t, n = {}) {
|
|
317
|
+
const s = n.logger ?? Is, r = n.transport ?? bs, i = { ...n.metadata };
|
|
318
318
|
delete i.authorization;
|
|
319
319
|
async function a(d, f) {
|
|
320
|
-
const p = t.getToken(), m = p ? { ...i, authorization: `Bearer ${p}` } : { ...i },
|
|
321
|
-
s.event({ kind: "request", path: d, reqBytes:
|
|
322
|
-
const E = await r(e,
|
|
320
|
+
const p = t.getToken(), m = p ? { ...i, authorization: `Bearer ${p}` } : { ...i }, b = hs(d, 0, m, f);
|
|
321
|
+
s.event({ kind: "request", path: d, reqBytes: b.length });
|
|
322
|
+
const E = await r(e, b);
|
|
323
323
|
return E.reconnected && s.event({ kind: "transport", path: d, event: "reconnect" }), E;
|
|
324
324
|
}
|
|
325
325
|
async function o(d, f, p) {
|
|
326
|
-
const m =
|
|
326
|
+
const m = Ne(), b = await a(d, f), E = new dt(b.reader), x = b.writer.close().then(
|
|
327
327
|
() => null,
|
|
328
|
-
(
|
|
328
|
+
(_) => V(b, _)
|
|
329
329
|
);
|
|
330
|
-
let
|
|
330
|
+
let T;
|
|
331
331
|
try {
|
|
332
|
-
|
|
333
|
-
} catch (
|
|
334
|
-
throw await O(
|
|
332
|
+
T = await E.readFrame();
|
|
333
|
+
} catch (_) {
|
|
334
|
+
throw await O(b, E, _), V(b, _);
|
|
335
335
|
}
|
|
336
|
-
if (
|
|
337
|
-
if (
|
|
336
|
+
if (T === null) throw new g("response FIN before unary reply");
|
|
337
|
+
if (T.type === "data" || T.type === "cancel")
|
|
338
338
|
throw await O(
|
|
339
|
-
|
|
339
|
+
b,
|
|
340
340
|
E,
|
|
341
|
-
new
|
|
342
|
-
), new
|
|
343
|
-
let
|
|
341
|
+
new g(`unexpected ${T.type} frame`)
|
|
342
|
+
), new g(`unexpected ${T.type} frame before unary reply`);
|
|
343
|
+
let at;
|
|
344
344
|
try {
|
|
345
|
-
|
|
346
|
-
} catch (
|
|
347
|
-
throw await O(
|
|
345
|
+
at = await E.readFrame();
|
|
346
|
+
} catch (_) {
|
|
347
|
+
throw await O(b, E, _), V(b, _);
|
|
348
348
|
}
|
|
349
|
-
if (
|
|
350
|
-
const
|
|
351
|
-
throw await O(
|
|
349
|
+
if (at !== null) {
|
|
350
|
+
const _ = new g("trailing frame after unary terminal");
|
|
351
|
+
throw await O(b, E, _), _;
|
|
352
352
|
}
|
|
353
|
-
if (
|
|
353
|
+
if (T.type === "error")
|
|
354
354
|
return s.event({
|
|
355
355
|
kind: "error",
|
|
356
356
|
path: d,
|
|
357
|
-
code:
|
|
358
|
-
reason:
|
|
359
|
-
ms:
|
|
360
|
-
}), u(
|
|
361
|
-
if (
|
|
362
|
-
throw new
|
|
363
|
-
const
|
|
364
|
-
if (
|
|
365
|
-
return s.event({ kind: "response", path: d, respBytes:
|
|
357
|
+
code: T.code,
|
|
358
|
+
reason: T.reason,
|
|
359
|
+
ms: Ne() - m
|
|
360
|
+
}), u(T.code, T.reason, d, f, p);
|
|
361
|
+
if (T.path !== d)
|
|
362
|
+
throw new g(`response path mismatch: expected ${d}, got ${T.path}`);
|
|
363
|
+
const ot = await x;
|
|
364
|
+
if (ot) throw ot;
|
|
365
|
+
return s.event({ kind: "response", path: d, respBytes: T.body.length, ms: Ne() - m }), T.body;
|
|
366
366
|
}
|
|
367
367
|
async function l(d, f) {
|
|
368
|
-
const p = await a(d, f), m = new
|
|
369
|
-
let
|
|
368
|
+
const p = await a(d, f), m = new dt(p.reader);
|
|
369
|
+
let b;
|
|
370
370
|
try {
|
|
371
|
-
|
|
371
|
+
b = await m.readFrame();
|
|
372
372
|
} catch (E) {
|
|
373
373
|
throw await O(p, m, E), V(p, E);
|
|
374
374
|
}
|
|
375
|
-
if (
|
|
376
|
-
const E = new
|
|
375
|
+
if (b === null) {
|
|
376
|
+
const E = new g("response FIN before streaming REQUEST echo");
|
|
377
377
|
throw await O(p, m, E), E;
|
|
378
378
|
}
|
|
379
|
-
if (
|
|
380
|
-
throw await
|
|
381
|
-
if (
|
|
382
|
-
const E = new
|
|
383
|
-
`unexpected ${
|
|
379
|
+
if (b.type === "error")
|
|
380
|
+
throw await gn(p), new S(b.code, b.reason);
|
|
381
|
+
if (b.type !== "response") {
|
|
382
|
+
const E = new g(
|
|
383
|
+
`unexpected ${b.type} frame before streaming REQUEST echo`
|
|
384
384
|
);
|
|
385
385
|
throw await O(p, m, E), E;
|
|
386
386
|
}
|
|
387
|
-
if (
|
|
388
|
-
const E = new
|
|
389
|
-
`response path mismatch: expected ${d}, got ${
|
|
387
|
+
if (b.path !== d) {
|
|
388
|
+
const E = new g(
|
|
389
|
+
`response path mismatch: expected ${d}, got ${b.path}`
|
|
390
390
|
);
|
|
391
391
|
throw await O(p, m, E), E;
|
|
392
392
|
}
|
|
393
|
-
return new
|
|
393
|
+
return new ks(b.body, p, m);
|
|
394
394
|
}
|
|
395
|
-
async function u(d, f, p, m,
|
|
395
|
+
async function u(d, f, p, m, b) {
|
|
396
396
|
switch (d) {
|
|
397
397
|
case Q.INVALID:
|
|
398
398
|
case Q.EXPIRED:
|
|
399
|
-
if (
|
|
400
|
-
throw t.logout(), new
|
|
399
|
+
if (b)
|
|
400
|
+
throw t.logout(), new S(d, f);
|
|
401
401
|
return await t.refresh(), o(p, m, !0);
|
|
402
402
|
case Q.STALE:
|
|
403
|
-
throw await t.refresh(), typeof window < "u" && window.location.reload(), new
|
|
403
|
+
throw await t.refresh(), typeof window < "u" && window.location.reload(), new S(d, f);
|
|
404
404
|
case Q.REVOKED:
|
|
405
|
-
throw t.logout(), new
|
|
405
|
+
throw t.logout(), new S(d, f);
|
|
406
406
|
default:
|
|
407
|
-
throw new
|
|
407
|
+
throw new S(d, f);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
return {
|
|
@@ -412,14 +412,14 @@ function hs(e, t, n = {}) {
|
|
|
412
412
|
stream: l
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
|
-
class
|
|
415
|
+
class ks {
|
|
416
416
|
constructor(t, n, s) {
|
|
417
417
|
this.channel = n, this.frames = s, this.terminal = "open", this.terminalError = null, this.upload = "open", this.uploadError = null, this.finishPromise = null, this.cancelPromise = null, this.nextTail = Promise.resolve(), this.initial = t;
|
|
418
418
|
}
|
|
419
419
|
async send(t) {
|
|
420
420
|
this.assertWritable();
|
|
421
421
|
try {
|
|
422
|
-
await this.channel.writer.write(
|
|
422
|
+
await this.channel.writer.write(fs(t));
|
|
423
423
|
} catch (n) {
|
|
424
424
|
throw this.upload = "stopped", this.uploadError = V(this.channel, n), this.uploadError;
|
|
425
425
|
}
|
|
@@ -429,7 +429,7 @@ class fs {
|
|
|
429
429
|
if (this.finishPromise) return this.finishPromise;
|
|
430
430
|
if (!(this.terminal === "cancelled" || this.terminal === "error")) {
|
|
431
431
|
if (this.upload === "stopped")
|
|
432
|
-
throw this.uploadError ?? new
|
|
432
|
+
throw this.uploadError ?? new S(Y.CANCELLED, "upload stopped");
|
|
433
433
|
return this.upload = "closing", this.finishPromise = this.channel.writer.close().then(
|
|
434
434
|
() => {
|
|
435
435
|
this.upload = "closed";
|
|
@@ -441,11 +441,11 @@ class fs {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
async cancel(t =
|
|
445
|
-
if (
|
|
444
|
+
async cancel(t = Y.CANCELLED) {
|
|
445
|
+
if (As(t), this.cancelPromise) return this.cancelPromise;
|
|
446
446
|
if (this.terminal !== "open") return;
|
|
447
|
-
this.terminal = "cancelled", this.terminalError = new
|
|
448
|
-
const n =
|
|
447
|
+
this.terminal = "cancelled", this.terminalError = new S(t, "stream cancelled");
|
|
448
|
+
const n = pn(t);
|
|
449
449
|
return this.cancelPromise = Promise.allSettled([
|
|
450
450
|
this.cancelUpload(),
|
|
451
451
|
this.frames.cancel(n).catch((s) => this.channel.sessionFailed?.(s))
|
|
@@ -476,22 +476,22 @@ class fs {
|
|
|
476
476
|
} catch (s) {
|
|
477
477
|
if (this.terminalError) throw this.terminalError;
|
|
478
478
|
const r = V(this.channel, s);
|
|
479
|
-
throw this.terminal = "error", this.terminalError = r, s instanceof
|
|
479
|
+
throw this.terminal = "error", this.terminalError = r, s instanceof g && await O(this.channel, this.frames, s), r;
|
|
480
480
|
}
|
|
481
481
|
if (this.terminalError) throw this.terminalError;
|
|
482
482
|
if (t === null)
|
|
483
483
|
return this.terminal = "clean", { done: !0, value: void 0 };
|
|
484
484
|
if (t.type === "data") return { done: !1, value: t.body };
|
|
485
485
|
if (t.type === "error")
|
|
486
|
-
throw this.terminal = "error", this.terminalError = new
|
|
487
|
-
const n = new
|
|
486
|
+
throw this.terminal = "error", this.terminalError = new S(t.code, t.reason), gn(this.channel), this.terminalError;
|
|
487
|
+
const n = new g(`unexpected ${t.type} frame after streaming REQUEST echo`);
|
|
488
488
|
throw this.terminal = "error", this.terminalError = n, await O(this.channel, this.frames, n), n;
|
|
489
489
|
}
|
|
490
490
|
assertWritable() {
|
|
491
491
|
if (this.terminalError) throw this.terminalError;
|
|
492
|
-
if (this.terminal !== "open") throw new
|
|
492
|
+
if (this.terminal !== "open") throw new S(Y.CANCELLED, "stream is terminal");
|
|
493
493
|
if (this.upload !== "open")
|
|
494
|
-
throw this.uploadError ?? new
|
|
494
|
+
throw this.uploadError ?? new g("stream upload is already finished");
|
|
495
495
|
}
|
|
496
496
|
async cancelUpload() {
|
|
497
497
|
if (this.upload === "closing") {
|
|
@@ -501,7 +501,7 @@ class fs {
|
|
|
501
501
|
if (this.upload === "open") {
|
|
502
502
|
this.upload = "closing";
|
|
503
503
|
try {
|
|
504
|
-
await this.channel.writer.write(
|
|
504
|
+
await this.channel.writer.write(mn()), await this.channel.writer.close(), this.upload = "closed";
|
|
505
505
|
} catch (t) {
|
|
506
506
|
this.upload = "stopped", this.channel.sessionFailed?.(t);
|
|
507
507
|
}
|
|
@@ -509,12 +509,12 @@ class fs {
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
async function O(e, t, n) {
|
|
512
|
-
if (!(n instanceof
|
|
513
|
-
const s = n instanceof
|
|
512
|
+
if (!(n instanceof g)) return;
|
|
513
|
+
const s = n instanceof hn ? Y.MESSAGE_TOO_LARGE : Y.INVALID_ARGUMENT, r = pn(s, n.message);
|
|
514
514
|
await Promise.allSettled([
|
|
515
515
|
(async () => {
|
|
516
516
|
try {
|
|
517
|
-
await e.writer.write(
|
|
517
|
+
await e.writer.write(mn()), await e.writer.close();
|
|
518
518
|
} catch (i) {
|
|
519
519
|
e.sessionFailed?.(i);
|
|
520
520
|
}
|
|
@@ -522,7 +522,7 @@ async function O(e, t, n) {
|
|
|
522
522
|
t.cancel(r).catch((i) => e.sessionFailed?.(i))
|
|
523
523
|
]);
|
|
524
524
|
}
|
|
525
|
-
async function
|
|
525
|
+
async function gn(e) {
|
|
526
526
|
try {
|
|
527
527
|
await e.writer.close();
|
|
528
528
|
} catch (t) {
|
|
@@ -530,19 +530,19 @@ async function dn(e) {
|
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
function V(e, t) {
|
|
533
|
-
return e.sessionFailed?.(t),
|
|
533
|
+
return e.sessionFailed?.(t), ws(t);
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function As(e) {
|
|
536
536
|
if (!Number.isInteger(e) || e < 0 || e > 255)
|
|
537
537
|
throw new RangeError(`WebTransport stream error code must be an integer in 0..255: ${e}`);
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function Ne() {
|
|
540
540
|
return typeof performance < "u" ? performance.now() : Date.now();
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function j(e) {
|
|
543
543
|
return new Promise((t) => setTimeout(t, e));
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function bn() {
|
|
546
546
|
const e = Date.now(), t = new Uint8Array(16);
|
|
547
547
|
crypto.getRandomValues(t), t[0] = e >> 40 & 255, t[1] = e >> 32 & 255, t[2] = e >> 24 & 255, t[3] = e >> 16 & 255, t[4] = e >> 8 & 255, t[5] = e & 255, t[6] = t[6] & 15 | 112, t[8] = t[8] & 63 | 128;
|
|
548
548
|
const n = [...t].map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
@@ -551,14 +551,14 @@ function hn() {
|
|
|
551
551
|
20
|
|
552
552
|
)}-${n.slice(20)}`;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Be(e, t) {
|
|
555
555
|
return e !== null && typeof e == "object" && "$typeName" in e && typeof e.$typeName == "string" ? t === void 0 ? !0 : t.typeName === e.$typeName : !1;
|
|
556
556
|
}
|
|
557
557
|
var c;
|
|
558
558
|
(function(e) {
|
|
559
559
|
e[e.DOUBLE = 1] = "DOUBLE", e[e.FLOAT = 2] = "FLOAT", e[e.INT64 = 3] = "INT64", e[e.UINT64 = 4] = "UINT64", e[e.INT32 = 5] = "INT32", e[e.FIXED64 = 6] = "FIXED64", e[e.FIXED32 = 7] = "FIXED32", e[e.BOOL = 8] = "BOOL", e[e.STRING = 9] = "STRING", e[e.BYTES = 12] = "BYTES", e[e.UINT32 = 13] = "UINT32", e[e.SFIXED32 = 15] = "SFIXED32", e[e.SFIXED64 = 16] = "SFIXED64", e[e.SINT32 = 17] = "SINT32", e[e.SINT64 = 18] = "SINT64";
|
|
560
560
|
})(c || (c = {}));
|
|
561
|
-
function
|
|
561
|
+
function vs() {
|
|
562
562
|
let e = 0, t = 0;
|
|
563
563
|
for (let s = 0; s < 28; s += 7) {
|
|
564
564
|
let r = this.buf[this.pos++];
|
|
@@ -575,7 +575,7 @@ function ps() {
|
|
|
575
575
|
}
|
|
576
576
|
throw new Error("invalid varint");
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Te(e, t, n) {
|
|
579
579
|
for (let i = 0; i < 28; i = i + 7) {
|
|
580
580
|
const a = e >>> i, o = !(!(a >>> 7) && t == 0), l = (o ? a | 128 : a) & 255;
|
|
581
581
|
if (n.push(l), !o)
|
|
@@ -592,7 +592,7 @@ function Ne(e, t, n) {
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
const ae = 4294967296;
|
|
595
|
-
function
|
|
595
|
+
function ht(e) {
|
|
596
596
|
const t = e[0] === "-";
|
|
597
597
|
t && (e = e.slice(1));
|
|
598
598
|
const n = 1e6;
|
|
@@ -601,37 +601,37 @@ function lt(e) {
|
|
|
601
601
|
const l = Number(e.slice(a, o));
|
|
602
602
|
r *= n, s = s * n + l, s >= ae && (r = r + (s / ae | 0), s = s % ae);
|
|
603
603
|
}
|
|
604
|
-
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), t ?
|
|
604
|
+
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), t ? yn(s, r) : Ye(s, r);
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
let n =
|
|
606
|
+
function Rs(e, t) {
|
|
607
|
+
let n = Ye(e, t);
|
|
608
608
|
const s = n.hi & 2147483648;
|
|
609
|
-
s && (n =
|
|
610
|
-
const r =
|
|
609
|
+
s && (n = yn(n.lo, n.hi));
|
|
610
|
+
const r = En(n.lo, n.hi);
|
|
611
611
|
return s ? "-" + r : r;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
if ({ lo: e, hi: t } =
|
|
613
|
+
function En(e, t) {
|
|
614
|
+
if ({ lo: e, hi: t } = _s(e, t), t <= 2097151)
|
|
615
615
|
return String(ae * t + e);
|
|
616
616
|
const n = e & 16777215, s = (e >>> 24 | t << 8) & 16777215, r = t >> 16 & 65535;
|
|
617
617
|
let i = n + s * 6777216 + r * 6710656, a = s + r * 8147497, o = r * 2;
|
|
618
618
|
const l = 1e7;
|
|
619
|
-
return i >= l && (a += Math.floor(i / l), i %= l), a >= l && (o += Math.floor(a / l), a %= l), o.toString() +
|
|
619
|
+
return i >= l && (a += Math.floor(i / l), i %= l), a >= l && (o += Math.floor(a / l), a %= l), o.toString() + ft(a) + ft(i);
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function _s(e, t) {
|
|
622
622
|
return { lo: e >>> 0, hi: t >>> 0 };
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function Ye(e, t) {
|
|
625
625
|
return { lo: e | 0, hi: t | 0 };
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
return t = ~t, e ? e = ~e + 1 : t += 1,
|
|
627
|
+
function yn(e, t) {
|
|
628
|
+
return t = ~t, e ? e = ~e + 1 : t += 1, Ye(e, t);
|
|
629
629
|
}
|
|
630
|
-
const
|
|
630
|
+
const ft = (e) => {
|
|
631
631
|
const t = String(e);
|
|
632
632
|
return "0000000".slice(t.length) + t;
|
|
633
633
|
};
|
|
634
|
-
function
|
|
634
|
+
function Ue(e, t) {
|
|
635
635
|
if (e >= 0) {
|
|
636
636
|
for (; e > 127; )
|
|
637
637
|
t.push(e & 127 | 128), e = e >>> 7;
|
|
@@ -642,7 +642,7 @@ function Ce(e, t) {
|
|
|
642
642
|
t.push(1);
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function Os() {
|
|
646
646
|
let e = this.buf[this.pos++], t = e & 127;
|
|
647
647
|
if ((e & 128) == 0)
|
|
648
648
|
return this.assertBounds(), t;
|
|
@@ -659,8 +659,8 @@ function Es() {
|
|
|
659
659
|
throw new Error("invalid varint");
|
|
660
660
|
return this.assertBounds(), t >>> 0;
|
|
661
661
|
}
|
|
662
|
-
const w = /* @__PURE__ */
|
|
663
|
-
function
|
|
662
|
+
const w = /* @__PURE__ */ Cs();
|
|
663
|
+
function Cs() {
|
|
664
664
|
const e = new DataView(new ArrayBuffer(8));
|
|
665
665
|
if (typeof BigInt == "function" && typeof e.getBigInt64 == "function" && typeof e.getBigUint64 == "function" && typeof e.setBigInt64 == "function" && typeof e.setBigUint64 == "function" && (!!globalThis.Deno || !!globalThis.Bun || typeof process != "object" || typeof process.env != "object" || process.env.BUF_BIGINT_DISABLE !== "1")) {
|
|
666
666
|
const n = BigInt("-9223372036854775808"), s = BigInt("9223372036854775807"), r = BigInt("0"), i = BigInt("18446744073709551615");
|
|
@@ -703,30 +703,30 @@ function ys() {
|
|
|
703
703
|
zero: "0",
|
|
704
704
|
supported: !1,
|
|
705
705
|
parse(n) {
|
|
706
|
-
return typeof n != "string" && (n = n.toString()),
|
|
706
|
+
return typeof n != "string" && (n = n.toString()), mt(n), n;
|
|
707
707
|
},
|
|
708
708
|
uParse(n) {
|
|
709
|
-
return typeof n != "string" && (n = n.toString()),
|
|
709
|
+
return typeof n != "string" && (n = n.toString()), pt(n), n;
|
|
710
710
|
},
|
|
711
711
|
enc(n) {
|
|
712
|
-
return typeof n != "string" && (n = n.toString()),
|
|
712
|
+
return typeof n != "string" && (n = n.toString()), mt(n), ht(n);
|
|
713
713
|
},
|
|
714
714
|
uEnc(n) {
|
|
715
|
-
return typeof n != "string" && (n = n.toString()),
|
|
715
|
+
return typeof n != "string" && (n = n.toString()), pt(n), ht(n);
|
|
716
716
|
},
|
|
717
717
|
dec(n, s) {
|
|
718
|
-
return
|
|
718
|
+
return Rs(n, s);
|
|
719
719
|
},
|
|
720
720
|
uDec(n, s) {
|
|
721
|
-
return
|
|
721
|
+
return En(n, s);
|
|
722
722
|
}
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function mt(e) {
|
|
726
726
|
if (!/^-?[0-9]+$/.test(e))
|
|
727
727
|
throw new Error("invalid int64: " + e);
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function pt(e) {
|
|
730
730
|
if (!/^[0-9]+$/.test(e))
|
|
731
731
|
throw new Error("invalid uint64: " + e);
|
|
732
732
|
}
|
|
@@ -751,7 +751,7 @@ function q(e, t) {
|
|
|
751
751
|
return 0;
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function Ds(e, t) {
|
|
755
755
|
switch (e) {
|
|
756
756
|
case c.BOOL:
|
|
757
757
|
return t === !1;
|
|
@@ -766,16 +766,16 @@ function ws(e, t) {
|
|
|
766
766
|
return t == 0;
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
|
-
const
|
|
770
|
-
function
|
|
769
|
+
const wn = 2, M = Symbol.for("reflect unsafe local");
|
|
770
|
+
function In(e, t) {
|
|
771
771
|
const n = e[t.localName].case;
|
|
772
772
|
return n === void 0 ? n : t.fields.find((s) => s.localName === n);
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Us(e, t) {
|
|
775
775
|
const n = t.localName;
|
|
776
776
|
if (t.oneof)
|
|
777
777
|
return e[t.oneof.localName].case === n;
|
|
778
|
-
if (t.presence !=
|
|
778
|
+
if (t.presence != wn)
|
|
779
779
|
return e[n] !== void 0 && Object.prototype.hasOwnProperty.call(e, n);
|
|
780
780
|
switch (t.fieldKind) {
|
|
781
781
|
case "list":
|
|
@@ -783,7 +783,7 @@ function Is(e, t) {
|
|
|
783
783
|
case "map":
|
|
784
784
|
return Object.keys(e[n]).length > 0;
|
|
785
785
|
case "scalar":
|
|
786
|
-
return !
|
|
786
|
+
return !Ds(t.scalar, e[n]);
|
|
787
787
|
case "enum":
|
|
788
788
|
return e[n] !== t.enum.values[0].number;
|
|
789
789
|
}
|
|
@@ -792,25 +792,25 @@ function Is(e, t) {
|
|
|
792
792
|
function H(e, t) {
|
|
793
793
|
return Object.prototype.hasOwnProperty.call(e, t) && e[t] !== void 0;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function Nn(e, t) {
|
|
796
796
|
if (t.oneof) {
|
|
797
797
|
const n = e[t.oneof.localName];
|
|
798
798
|
return n.case === t.localName ? n.value : void 0;
|
|
799
799
|
}
|
|
800
800
|
return e[t.localName];
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function Tn(e, t, n) {
|
|
803
803
|
t.oneof ? e[t.oneof.localName] = {
|
|
804
804
|
case: t.localName,
|
|
805
805
|
value: n
|
|
806
806
|
} : e[t.localName] = n;
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function Ls(e, t) {
|
|
809
809
|
const n = t.localName;
|
|
810
810
|
if (t.oneof) {
|
|
811
811
|
const s = t.oneof.localName;
|
|
812
812
|
e[s].case === n && (e[s] = { case: void 0 });
|
|
813
|
-
} else if (t.presence !=
|
|
813
|
+
} else if (t.presence != wn)
|
|
814
814
|
delete e[n];
|
|
815
815
|
else
|
|
816
816
|
switch (t.fieldKind) {
|
|
@@ -831,7 +831,7 @@ function Ns(e, t) {
|
|
|
831
831
|
function P(e) {
|
|
832
832
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function $e(e, t) {
|
|
835
835
|
var n, s, r, i;
|
|
836
836
|
if (P(e) && M in e && "add" in e && "field" in e && typeof e.field == "function") {
|
|
837
837
|
if (t !== void 0) {
|
|
@@ -842,7 +842,7 @@ function Be(e, t) {
|
|
|
842
842
|
}
|
|
843
843
|
return !1;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function Xe(e, t) {
|
|
846
846
|
var n, s, r, i;
|
|
847
847
|
if (P(e) && M in e && "has" in e && "field" in e && typeof e.field == "function") {
|
|
848
848
|
if (t !== void 0) {
|
|
@@ -853,17 +853,17 @@ function Ye(e, t) {
|
|
|
853
853
|
}
|
|
854
854
|
return !1;
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function Ke(e, t) {
|
|
857
857
|
return P(e) && M in e && "desc" in e && P(e.desc) && e.desc.kind === "message" && (t === void 0 || e.desc.typeName == t.typeName);
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
return
|
|
859
|
+
function Ms(e) {
|
|
860
|
+
return kn(e.$typeName);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function Sn(e) {
|
|
863
863
|
const t = e.fields[0];
|
|
864
|
-
return
|
|
864
|
+
return kn(e.typeName) && t !== void 0 && t.fieldKind == "scalar" && t.name == "value" && t.number == 1;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function kn(e) {
|
|
867
867
|
return e.startsWith("google.protobuf.") && [
|
|
868
868
|
"DoubleValue",
|
|
869
869
|
"FloatValue",
|
|
@@ -876,122 +876,122 @@ function wn(e) {
|
|
|
876
876
|
"BytesValue"
|
|
877
877
|
].includes(e.substring(16));
|
|
878
878
|
}
|
|
879
|
-
const
|
|
879
|
+
const xs = 999, Ps = 998, oe = 2;
|
|
880
880
|
function C(e, t) {
|
|
881
|
-
if (
|
|
881
|
+
if (Be(t, e))
|
|
882
882
|
return t;
|
|
883
|
-
const n =
|
|
884
|
-
return t !== void 0 &&
|
|
883
|
+
const n = Ys(e);
|
|
884
|
+
return t !== void 0 && Vs(e, n, t), n;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function Vs(e, t, n) {
|
|
887
887
|
for (const s of e.members) {
|
|
888
888
|
let r = n[s.localName];
|
|
889
889
|
if (r == null)
|
|
890
890
|
continue;
|
|
891
891
|
let i;
|
|
892
892
|
if (s.kind == "oneof") {
|
|
893
|
-
const a =
|
|
893
|
+
const a = In(n, s);
|
|
894
894
|
if (!a)
|
|
895
895
|
continue;
|
|
896
|
-
i = a, r =
|
|
896
|
+
i = a, r = Nn(n, a);
|
|
897
897
|
} else
|
|
898
898
|
i = s;
|
|
899
899
|
switch (i.fieldKind) {
|
|
900
900
|
case "message":
|
|
901
|
-
r =
|
|
901
|
+
r = je(i, r);
|
|
902
902
|
break;
|
|
903
903
|
case "scalar":
|
|
904
|
-
r =
|
|
904
|
+
r = An(i, r);
|
|
905
905
|
break;
|
|
906
906
|
case "list":
|
|
907
|
-
r =
|
|
907
|
+
r = Gs(i, r);
|
|
908
908
|
break;
|
|
909
909
|
case "map":
|
|
910
|
-
r =
|
|
910
|
+
r = Fs(i, r);
|
|
911
911
|
break;
|
|
912
912
|
}
|
|
913
|
-
|
|
913
|
+
Tn(t, i, r);
|
|
914
914
|
}
|
|
915
915
|
return t;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
918
|
-
return e.scalar == c.BYTES ?
|
|
917
|
+
function An(e, t) {
|
|
918
|
+
return e.scalar == c.BYTES ? We(t) : t;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function Fs(e, t) {
|
|
921
921
|
if (P(t)) {
|
|
922
922
|
if (e.scalar == c.BYTES)
|
|
923
|
-
return
|
|
923
|
+
return gt(t, We);
|
|
924
924
|
if (e.mapKind == "message")
|
|
925
|
-
return
|
|
925
|
+
return gt(t, (n) => je(e, n));
|
|
926
926
|
}
|
|
927
927
|
return t;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Gs(e, t) {
|
|
930
930
|
if (Array.isArray(t)) {
|
|
931
931
|
if (e.scalar == c.BYTES)
|
|
932
|
-
return t.map(
|
|
932
|
+
return t.map(We);
|
|
933
933
|
if (e.listKind == "message")
|
|
934
|
-
return t.map((n) =>
|
|
934
|
+
return t.map((n) => je(e, n));
|
|
935
935
|
}
|
|
936
936
|
return t;
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
if (e.fieldKind == "message" && !e.oneof &&
|
|
940
|
-
return
|
|
938
|
+
function je(e, t) {
|
|
939
|
+
if (e.fieldKind == "message" && !e.oneof && Sn(e.message))
|
|
940
|
+
return An(e.message.fields[0], t);
|
|
941
941
|
if (P(t)) {
|
|
942
942
|
if (e.message.typeName == "google.protobuf.Struct" && e.parent.typeName !== "google.protobuf.Value")
|
|
943
943
|
return t;
|
|
944
|
-
if (!
|
|
944
|
+
if (!Be(t, e.message))
|
|
945
945
|
return C(e.message, t);
|
|
946
946
|
}
|
|
947
947
|
return t;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function We(e) {
|
|
950
950
|
return Array.isArray(e) ? new Uint8Array(e) : e;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function gt(e, t) {
|
|
953
953
|
const n = {};
|
|
954
954
|
for (const s of Object.entries(e))
|
|
955
955
|
n[s[0]] = t(s[1]);
|
|
956
956
|
return n;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
959
|
-
function
|
|
958
|
+
const Bs = Symbol(), bt = /* @__PURE__ */ new WeakMap();
|
|
959
|
+
function Ys(e) {
|
|
960
960
|
let t;
|
|
961
|
-
if (
|
|
962
|
-
const n =
|
|
961
|
+
if ($s(e)) {
|
|
962
|
+
const n = bt.get(e);
|
|
963
963
|
let s, r;
|
|
964
964
|
if (n)
|
|
965
965
|
({ prototype: s, members: r } = n);
|
|
966
966
|
else {
|
|
967
967
|
s = {}, r = /* @__PURE__ */ new Set();
|
|
968
968
|
for (const i of e.members)
|
|
969
|
-
i.kind != "oneof" && (i.fieldKind != "scalar" && i.fieldKind != "enum" || i.presence != oe && (r.add(i), s[i.localName] =
|
|
970
|
-
|
|
969
|
+
i.kind != "oneof" && (i.fieldKind != "scalar" && i.fieldKind != "enum" || i.presence != oe && (r.add(i), s[i.localName] = Se(i)));
|
|
970
|
+
bt.set(e, { prototype: s, members: r });
|
|
971
971
|
}
|
|
972
972
|
t = Object.create(s), t.$typeName = e.typeName;
|
|
973
973
|
for (const i of e.members)
|
|
974
|
-
r.has(i) || i.kind == "field" && (i.fieldKind == "message" || (i.fieldKind == "scalar" || i.fieldKind == "enum") && i.presence != oe) || (t[i.localName] =
|
|
974
|
+
r.has(i) || i.kind == "field" && (i.fieldKind == "message" || (i.fieldKind == "scalar" || i.fieldKind == "enum") && i.presence != oe) || (t[i.localName] = Se(i));
|
|
975
975
|
} else {
|
|
976
976
|
t = {
|
|
977
977
|
$typeName: e.typeName
|
|
978
978
|
};
|
|
979
979
|
for (const n of e.members)
|
|
980
|
-
(n.kind == "oneof" || n.presence == oe) && (t[n.localName] =
|
|
980
|
+
(n.kind == "oneof" || n.presence == oe) && (t[n.localName] = Se(n));
|
|
981
981
|
}
|
|
982
982
|
return t;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function $s(e) {
|
|
985
985
|
switch (e.file.edition) {
|
|
986
|
-
case
|
|
986
|
+
case xs:
|
|
987
987
|
return !1;
|
|
988
|
-
case
|
|
988
|
+
case Ps:
|
|
989
989
|
return !0;
|
|
990
990
|
default:
|
|
991
991
|
return e.fields.some((t) => t.presence != oe && t.fieldKind != "message" && !t.oneof);
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Se(e) {
|
|
995
995
|
if (e.kind == "oneof")
|
|
996
996
|
return { case: void 0 };
|
|
997
997
|
if (e.fieldKind == "list")
|
|
@@ -999,21 +999,21 @@ function Te(e) {
|
|
|
999
999
|
if (e.fieldKind == "map")
|
|
1000
1000
|
return {};
|
|
1001
1001
|
if (e.fieldKind == "message")
|
|
1002
|
-
return
|
|
1002
|
+
return Bs;
|
|
1003
1003
|
const t = e.getDefaultValue();
|
|
1004
1004
|
return t !== void 0 ? e.fieldKind == "scalar" && e.longAsString ? t.toString() : t : e.fieldKind == "scalar" ? q(e.scalar, e.longAsString) : e.enum.values[0].number;
|
|
1005
1005
|
}
|
|
1006
|
-
class
|
|
1006
|
+
class $ extends Error {
|
|
1007
1007
|
constructor(t, n, s = "FieldValueInvalidError") {
|
|
1008
1008
|
super(n), this.name = s, this.field = () => t;
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1012
|
-
function
|
|
1013
|
-
if (globalThis[
|
|
1011
|
+
const ke = Symbol.for("@bufbuild/protobuf/text-encoding");
|
|
1012
|
+
function qe() {
|
|
1013
|
+
if (globalThis[ke] == null) {
|
|
1014
1014
|
const e = new globalThis.TextEncoder(), t = new globalThis.TextDecoder();
|
|
1015
1015
|
let n;
|
|
1016
|
-
globalThis[
|
|
1016
|
+
globalThis[ke] = {
|
|
1017
1017
|
encodeUtf8(s) {
|
|
1018
1018
|
return e.encode(s);
|
|
1019
1019
|
},
|
|
@@ -1029,15 +1029,15 @@ function We() {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
|
-
return globalThis[
|
|
1032
|
+
return globalThis[ke];
|
|
1033
1033
|
}
|
|
1034
1034
|
var I;
|
|
1035
1035
|
(function(e) {
|
|
1036
1036
|
e[e.Varint = 0] = "Varint", e[e.Bit64 = 1] = "Bit64", e[e.LengthDelimited = 2] = "LengthDelimited", e[e.StartGroup = 3] = "StartGroup", e[e.EndGroup = 4] = "EndGroup", e[e.Bit32 = 5] = "Bit32";
|
|
1037
1037
|
})(I || (I = {}));
|
|
1038
|
-
const
|
|
1039
|
-
class
|
|
1040
|
-
constructor(t =
|
|
1038
|
+
const vn = 34028234663852886e22, Rn = -34028234663852886e22, _n = 4294967295, On = 2147483647, Cn = -2147483648;
|
|
1039
|
+
class Xs {
|
|
1040
|
+
constructor(t = qe().encodeUtf8) {
|
|
1041
1041
|
this.encodeUtf8 = t, this.stack = [], this.chunks = [], this.buf = [];
|
|
1042
1042
|
}
|
|
1043
1043
|
/**
|
|
@@ -1092,7 +1092,7 @@ class Ds {
|
|
|
1092
1092
|
* Write a `uint32` value, an unsigned 32 bit varint.
|
|
1093
1093
|
*/
|
|
1094
1094
|
uint32(t) {
|
|
1095
|
-
for (
|
|
1095
|
+
for (Et(t); t > 127; )
|
|
1096
1096
|
this.buf.push(t & 127 | 128), t = t >>> 7;
|
|
1097
1097
|
return this.buf.push(t), this;
|
|
1098
1098
|
}
|
|
@@ -1100,7 +1100,7 @@ class Ds {
|
|
|
1100
1100
|
* Write a `int32` value, a signed 32 bit varint.
|
|
1101
1101
|
*/
|
|
1102
1102
|
int32(t) {
|
|
1103
|
-
return
|
|
1103
|
+
return Ae(t), Ue(t, this.buf), this;
|
|
1104
1104
|
}
|
|
1105
1105
|
/**
|
|
1106
1106
|
* Write a `bool` value, a varint.
|
|
@@ -1125,7 +1125,7 @@ class Ds {
|
|
|
1125
1125
|
* Write a `float` value, 32-bit floating point number.
|
|
1126
1126
|
*/
|
|
1127
1127
|
float(t) {
|
|
1128
|
-
|
|
1128
|
+
js(t);
|
|
1129
1129
|
let n = new Uint8Array(4);
|
|
1130
1130
|
return new DataView(n.buffer).setFloat32(0, t, !0), this.raw(n);
|
|
1131
1131
|
}
|
|
@@ -1140,7 +1140,7 @@ class Ds {
|
|
|
1140
1140
|
* Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
|
|
1141
1141
|
*/
|
|
1142
1142
|
fixed32(t) {
|
|
1143
|
-
|
|
1143
|
+
Et(t);
|
|
1144
1144
|
let n = new Uint8Array(4);
|
|
1145
1145
|
return new DataView(n.buffer).setUint32(0, t, !0), this.raw(n);
|
|
1146
1146
|
}
|
|
@@ -1148,7 +1148,7 @@ class Ds {
|
|
|
1148
1148
|
* Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
|
|
1149
1149
|
*/
|
|
1150
1150
|
sfixed32(t) {
|
|
1151
|
-
|
|
1151
|
+
Ae(t);
|
|
1152
1152
|
let n = new Uint8Array(4);
|
|
1153
1153
|
return new DataView(n.buffer).setInt32(0, t, !0), this.raw(n);
|
|
1154
1154
|
}
|
|
@@ -1156,7 +1156,7 @@ class Ds {
|
|
|
1156
1156
|
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
|
|
1157
1157
|
*/
|
|
1158
1158
|
sint32(t) {
|
|
1159
|
-
return
|
|
1159
|
+
return Ae(t), t = (t << 1 ^ t >> 31) >>> 0, Ue(t, this.buf), this;
|
|
1160
1160
|
}
|
|
1161
1161
|
/**
|
|
1162
1162
|
* Write a `sfixed64` value, a signed, fixed-length 64-bit integer.
|
|
@@ -1177,26 +1177,26 @@ class Ds {
|
|
|
1177
1177
|
*/
|
|
1178
1178
|
int64(t) {
|
|
1179
1179
|
let n = w.enc(t);
|
|
1180
|
-
return
|
|
1180
|
+
return Te(n.lo, n.hi, this.buf), this;
|
|
1181
1181
|
}
|
|
1182
1182
|
/**
|
|
1183
1183
|
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
|
|
1184
1184
|
*/
|
|
1185
1185
|
sint64(t) {
|
|
1186
1186
|
const n = w.enc(t), s = n.hi >> 31, r = n.lo << 1 ^ s, i = (n.hi << 1 | n.lo >>> 31) ^ s;
|
|
1187
|
-
return
|
|
1187
|
+
return Te(r, i, this.buf), this;
|
|
1188
1188
|
}
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Write a `uint64` value, an unsigned 64-bit varint.
|
|
1191
1191
|
*/
|
|
1192
1192
|
uint64(t) {
|
|
1193
1193
|
const n = w.uEnc(t);
|
|
1194
|
-
return
|
|
1194
|
+
return Te(n.lo, n.hi, this.buf), this;
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
class
|
|
1198
|
-
constructor(t, n =
|
|
1199
|
-
this.decodeUtf8 = n, this.varint64 =
|
|
1197
|
+
class Ks {
|
|
1198
|
+
constructor(t, n = qe().decodeUtf8) {
|
|
1199
|
+
this.decodeUtf8 = n, this.varint64 = vs, this.uint32 = Os, this.buf = t, this.len = t.length, this.pos = 0, this.view = new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
1200
1200
|
}
|
|
1201
1201
|
/**
|
|
1202
1202
|
* Reads a tag - field number and wire type. Tags are uint32 varints; values
|
|
@@ -1351,82 +1351,82 @@ class Us {
|
|
|
1351
1351
|
return this.decodeUtf8(this.bytes(), t);
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function Ae(e) {
|
|
1355
1355
|
if (typeof e == "string")
|
|
1356
1356
|
e = Number(e);
|
|
1357
1357
|
else if (typeof e != "number")
|
|
1358
1358
|
throw new Error("invalid int32: " + typeof e);
|
|
1359
|
-
if (!Number.isInteger(e) || e >
|
|
1359
|
+
if (!Number.isInteger(e) || e > On || e < Cn)
|
|
1360
1360
|
throw new Error("invalid int32: " + e);
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function Et(e) {
|
|
1363
1363
|
if (typeof e == "string")
|
|
1364
1364
|
e = Number(e);
|
|
1365
1365
|
else if (typeof e != "number")
|
|
1366
1366
|
throw new Error("invalid uint32: " + typeof e);
|
|
1367
|
-
if (!Number.isInteger(e) || e >
|
|
1367
|
+
if (!Number.isInteger(e) || e > _n || e < 0)
|
|
1368
1368
|
throw new Error("invalid uint32: " + e);
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function js(e) {
|
|
1371
1371
|
if (typeof e == "string") {
|
|
1372
1372
|
const t = e;
|
|
1373
1373
|
if (e = Number(e), Number.isNaN(e) && t !== "NaN")
|
|
1374
1374
|
throw new Error("invalid float32: " + t);
|
|
1375
1375
|
} else if (typeof e != "number")
|
|
1376
1376
|
throw new Error("invalid float32: " + typeof e);
|
|
1377
|
-
if (Number.isFinite(e) && (e >
|
|
1377
|
+
if (Number.isFinite(e) && (e > vn || e < Rn))
|
|
1378
1378
|
throw new Error("invalid float32: " + e);
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1381
|
-
const n = e.fieldKind == "list" ?
|
|
1380
|
+
function Ws(e, t) {
|
|
1381
|
+
const n = e.fieldKind == "list" ? $e(t, e) : e.fieldKind == "map" ? Xe(t, e) : He(e, t);
|
|
1382
1382
|
if (n === !0)
|
|
1383
1383
|
return;
|
|
1384
1384
|
let s;
|
|
1385
1385
|
switch (e.fieldKind) {
|
|
1386
1386
|
case "list":
|
|
1387
|
-
s = `expected ${
|
|
1387
|
+
s = `expected ${Un(e)}, got ${he(t)}`;
|
|
1388
1388
|
break;
|
|
1389
1389
|
case "map":
|
|
1390
|
-
s = `expected ${
|
|
1390
|
+
s = `expected ${Ln(e)}, got ${he(t)}`;
|
|
1391
1391
|
break;
|
|
1392
1392
|
default:
|
|
1393
|
-
s =
|
|
1393
|
+
s = de(e, t, n);
|
|
1394
1394
|
}
|
|
1395
|
-
return new
|
|
1395
|
+
return new $(e, s);
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1398
|
-
const s =
|
|
1397
|
+
function yt(e, t, n) {
|
|
1398
|
+
const s = He(e, n);
|
|
1399
1399
|
if (s !== !0)
|
|
1400
|
-
return new
|
|
1400
|
+
return new $(e, `list item #${t + 1}: ${de(e, n, s)}`);
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1403
|
-
const s =
|
|
1402
|
+
function qs(e, t, n) {
|
|
1403
|
+
const s = Le(t, e.mapKey);
|
|
1404
1404
|
if (s !== !0)
|
|
1405
|
-
return new
|
|
1406
|
-
const r =
|
|
1405
|
+
return new $(e, `invalid map key: ${de({ scalar: e.mapKey }, t, s)}`);
|
|
1406
|
+
const r = He(e, n);
|
|
1407
1407
|
if (r !== !0)
|
|
1408
|
-
return new
|
|
1408
|
+
return new $(e, `map entry ${he(t)}: ${de(e, n, r)}`);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1411
|
-
return e.scalar !== void 0 ?
|
|
1410
|
+
function He(e, t) {
|
|
1411
|
+
return e.scalar !== void 0 ? Le(t, e.scalar) : e.enum !== void 0 ? e.enum.open ? Le(t, c.INT32) : e.enum.values.some((n) => n.number === t) : Ke(t, e.message);
|
|
1412
1412
|
}
|
|
1413
|
-
function
|
|
1413
|
+
function Le(e, t) {
|
|
1414
1414
|
switch (t) {
|
|
1415
1415
|
case c.DOUBLE:
|
|
1416
1416
|
return typeof e == "number";
|
|
1417
1417
|
case c.FLOAT:
|
|
1418
|
-
return typeof e != "number" ? !1 : Number.isNaN(e) || !Number.isFinite(e) ? !0 : e >
|
|
1418
|
+
return typeof e != "number" ? !1 : Number.isNaN(e) || !Number.isFinite(e) ? !0 : e > vn || e < Rn ? `${e.toFixed()} out of range` : !0;
|
|
1419
1419
|
case c.INT32:
|
|
1420
1420
|
case c.SFIXED32:
|
|
1421
1421
|
case c.SINT32:
|
|
1422
|
-
return typeof e != "number" || !Number.isInteger(e) ? !1 : e >
|
|
1422
|
+
return typeof e != "number" || !Number.isInteger(e) ? !1 : e > On || e < Cn ? `${e.toFixed()} out of range` : !0;
|
|
1423
1423
|
case c.FIXED32:
|
|
1424
1424
|
case c.UINT32:
|
|
1425
|
-
return typeof e != "number" || !Number.isInteger(e) ? !1 : e >
|
|
1425
|
+
return typeof e != "number" || !Number.isInteger(e) ? !1 : e > _n || e < 0 ? `${e.toFixed()} out of range` : !0;
|
|
1426
1426
|
case c.BOOL:
|
|
1427
1427
|
return typeof e == "boolean";
|
|
1428
1428
|
case c.STRING:
|
|
1429
|
-
return typeof e != "string" ? !1 :
|
|
1429
|
+
return typeof e != "string" ? !1 : qe().checkUtf8(e) || "invalid UTF8";
|
|
1430
1430
|
case c.BYTES:
|
|
1431
1431
|
return e instanceof Uint8Array;
|
|
1432
1432
|
case c.INT64:
|
|
@@ -1450,13 +1450,13 @@ function De(e, t) {
|
|
|
1450
1450
|
return !1;
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1454
|
-
return n = typeof n == "string" ? `: ${n}` : `, got ${
|
|
1453
|
+
function de(e, t, n) {
|
|
1454
|
+
return n = typeof n == "string" ? `: ${n}` : `, got ${he(t)}`, e.scalar !== void 0 ? `expected ${Hs(e.scalar)}` + n : e.enum !== void 0 ? `expected ${e.enum.toString()}` + n : `expected ${Dn(e.message)}` + n;
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function he(e) {
|
|
1457
1457
|
switch (typeof e) {
|
|
1458
1458
|
case "object":
|
|
1459
|
-
return e === null ? "null" : e instanceof Uint8Array ? `Uint8Array(${e.length})` : Array.isArray(e) ? `Array(${e.length})` :
|
|
1459
|
+
return e === null ? "null" : e instanceof Uint8Array ? `Uint8Array(${e.length})` : Array.isArray(e) ? `Array(${e.length})` : $e(e) ? Un(e.field()) : Xe(e) ? Ln(e.field()) : Ke(e) ? Dn(e.desc) : Be(e) ? `message ${e.$typeName}` : "object";
|
|
1460
1460
|
case "string":
|
|
1461
1461
|
return e.length > 30 ? "string" : `"${e.split('"').join('\\"')}"`;
|
|
1462
1462
|
case "boolean":
|
|
@@ -1469,10 +1469,10 @@ function de(e) {
|
|
|
1469
1469
|
return typeof e;
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function Dn(e) {
|
|
1473
1473
|
return `ReflectMessage (${e.typeName})`;
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1475
|
+
function Un(e) {
|
|
1476
1476
|
switch (e.listKind) {
|
|
1477
1477
|
case "message":
|
|
1478
1478
|
return `ReflectList (${e.message.toString()})`;
|
|
@@ -1482,7 +1482,7 @@ function _n(e) {
|
|
|
1482
1482
|
return `ReflectList (${c[e.scalar]})`;
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function Ln(e) {
|
|
1486
1486
|
switch (e.mapKind) {
|
|
1487
1487
|
case "message":
|
|
1488
1488
|
return `ReflectMap (${c[e.mapKey]}, ${e.message.toString()})`;
|
|
@@ -1492,7 +1492,7 @@ function vn(e) {
|
|
|
1492
1492
|
return `ReflectMap (${c[e.mapKey]}, ${c[e.scalar]})`;
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function Hs(e) {
|
|
1496
1496
|
switch (e) {
|
|
1497
1497
|
case c.STRING:
|
|
1498
1498
|
return "string";
|
|
@@ -1520,18 +1520,18 @@ function Ps(e) {
|
|
|
1520
1520
|
return "number (int32)";
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
|
-
const
|
|
1524
|
-
function
|
|
1525
|
-
return new
|
|
1523
|
+
const Zs = 0;
|
|
1524
|
+
function Ee(e, t, n = !0) {
|
|
1525
|
+
return new Mn(e, t, n);
|
|
1526
1526
|
}
|
|
1527
|
-
const
|
|
1528
|
-
class
|
|
1527
|
+
const wt = /* @__PURE__ */ new WeakMap();
|
|
1528
|
+
class Mn {
|
|
1529
1529
|
get sortedFields() {
|
|
1530
|
-
const t =
|
|
1530
|
+
const t = wt.get(this.desc);
|
|
1531
1531
|
if (t)
|
|
1532
1532
|
return t;
|
|
1533
1533
|
const n = this.desc.fields.concat().sort((s, r) => s.number - r.number);
|
|
1534
|
-
return
|
|
1534
|
+
return wt.set(this.desc, n), n;
|
|
1535
1535
|
}
|
|
1536
1536
|
constructor(t, n, s = !0) {
|
|
1537
1537
|
this.lists = /* @__PURE__ */ new Map(), this.maps = /* @__PURE__ */ new Map(), this.check = s, this.desc = t, this.message = this[M] = n ?? C(t), this.fields = t.fields, this.oneofs = t.oneofs, this.members = t.members;
|
|
@@ -1540,48 +1540,48 @@ class On {
|
|
|
1540
1540
|
return this._fieldsByNumber || (this._fieldsByNumber = new Map(this.desc.fields.map((n) => [n.number, n]))), this._fieldsByNumber.get(t);
|
|
1541
1541
|
}
|
|
1542
1542
|
oneofCase(t) {
|
|
1543
|
-
return K(this.message, t),
|
|
1543
|
+
return K(this.message, t), In(this.message, t);
|
|
1544
1544
|
}
|
|
1545
1545
|
isSet(t) {
|
|
1546
|
-
return K(this.message, t),
|
|
1546
|
+
return K(this.message, t), Us(this.message, t);
|
|
1547
1547
|
}
|
|
1548
1548
|
clear(t) {
|
|
1549
|
-
K(this.message, t),
|
|
1549
|
+
K(this.message, t), Ls(this.message, t);
|
|
1550
1550
|
}
|
|
1551
1551
|
get(t) {
|
|
1552
1552
|
K(this.message, t);
|
|
1553
|
-
const n =
|
|
1553
|
+
const n = Nn(this.message, t);
|
|
1554
1554
|
switch (t.fieldKind) {
|
|
1555
1555
|
case "list":
|
|
1556
1556
|
let s = this.lists.get(t);
|
|
1557
1557
|
return (!s || s[M] !== n) && this.lists.set(
|
|
1558
1558
|
t,
|
|
1559
1559
|
// biome-ignore lint/suspicious/noAssignInExpressions: no
|
|
1560
|
-
s = new
|
|
1560
|
+
s = new zs(t, n, this.check)
|
|
1561
1561
|
), s;
|
|
1562
1562
|
case "map":
|
|
1563
1563
|
let r = this.maps.get(t);
|
|
1564
1564
|
return (!r || r[M] !== n) && this.maps.set(
|
|
1565
1565
|
t,
|
|
1566
1566
|
// biome-ignore lint/suspicious/noAssignInExpressions: no
|
|
1567
|
-
r = new
|
|
1567
|
+
r = new Qs(t, n, this.check)
|
|
1568
1568
|
), r;
|
|
1569
1569
|
case "message":
|
|
1570
|
-
return
|
|
1570
|
+
return ze(t, n, this.check);
|
|
1571
1571
|
case "scalar":
|
|
1572
|
-
return n === void 0 ? q(t.scalar, !1) :
|
|
1572
|
+
return n === void 0 ? q(t.scalar, !1) : Qe(t, n);
|
|
1573
1573
|
case "enum":
|
|
1574
1574
|
return n ?? t.enum.values[0].number;
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
1577
|
set(t, n) {
|
|
1578
1578
|
if (K(this.message, t), this.check) {
|
|
1579
|
-
const r =
|
|
1579
|
+
const r = Ws(t, n);
|
|
1580
1580
|
if (r)
|
|
1581
1581
|
throw r;
|
|
1582
1582
|
}
|
|
1583
1583
|
let s;
|
|
1584
|
-
t.fieldKind == "message" ? s =
|
|
1584
|
+
t.fieldKind == "message" ? s = Ze(t, n) : Xe(n) || $e(n) ? s = n[M] : s = Je(t, n), Tn(this.message, t, s);
|
|
1585
1585
|
}
|
|
1586
1586
|
getUnknown() {
|
|
1587
1587
|
return this.message.$unknown;
|
|
@@ -1592,9 +1592,9 @@ class On {
|
|
|
1592
1592
|
}
|
|
1593
1593
|
function K(e, t) {
|
|
1594
1594
|
if (t.parent.typeName !== e.$typeName)
|
|
1595
|
-
throw new
|
|
1595
|
+
throw new $(t, `cannot use ${t.toString()} with message ${e.$typeName}`, "ForeignFieldError");
|
|
1596
1596
|
}
|
|
1597
|
-
class
|
|
1597
|
+
class zs {
|
|
1598
1598
|
field() {
|
|
1599
1599
|
return this._field;
|
|
1600
1600
|
}
|
|
@@ -1606,25 +1606,25 @@ class Fs {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
get(t) {
|
|
1608
1608
|
const n = this._arr[t];
|
|
1609
|
-
return n === void 0 ? void 0 :
|
|
1609
|
+
return n === void 0 ? void 0 : ve(this._field, n, this.check);
|
|
1610
1610
|
}
|
|
1611
1611
|
set(t, n) {
|
|
1612
1612
|
if (t < 0 || t >= this._arr.length)
|
|
1613
|
-
throw new
|
|
1613
|
+
throw new $(this._field, `list item #${t + 1}: out of range`);
|
|
1614
1614
|
if (this.check) {
|
|
1615
|
-
const s =
|
|
1615
|
+
const s = yt(this._field, t, n);
|
|
1616
1616
|
if (s)
|
|
1617
1617
|
throw s;
|
|
1618
1618
|
}
|
|
1619
|
-
this._arr[t] =
|
|
1619
|
+
this._arr[t] = It(this._field, n);
|
|
1620
1620
|
}
|
|
1621
1621
|
add(t) {
|
|
1622
1622
|
if (this.check) {
|
|
1623
|
-
const n =
|
|
1623
|
+
const n = yt(this._field, this._arr.length, t);
|
|
1624
1624
|
if (n)
|
|
1625
1625
|
throw n;
|
|
1626
1626
|
}
|
|
1627
|
-
this._arr.push(
|
|
1627
|
+
this._arr.push(It(this._field, t));
|
|
1628
1628
|
}
|
|
1629
1629
|
clear() {
|
|
1630
1630
|
this._arr.splice(0, this._arr.length);
|
|
@@ -1637,14 +1637,14 @@ class Fs {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
*values() {
|
|
1639
1639
|
for (const t of this._arr)
|
|
1640
|
-
yield
|
|
1640
|
+
yield ve(this._field, t, this.check);
|
|
1641
1641
|
}
|
|
1642
1642
|
*entries() {
|
|
1643
1643
|
for (let t = 0; t < this._arr.length; t++)
|
|
1644
|
-
yield [t,
|
|
1644
|
+
yield [t, ve(this._field, this._arr[t], this.check)];
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
class
|
|
1647
|
+
class Qs {
|
|
1648
1648
|
constructor(t, n, s = !0) {
|
|
1649
1649
|
this.obj = this[M] = n ?? {}, this.check = s, this._field = t;
|
|
1650
1650
|
}
|
|
@@ -1653,11 +1653,11 @@ class Gs {
|
|
|
1653
1653
|
}
|
|
1654
1654
|
set(t, n) {
|
|
1655
1655
|
if (this.check) {
|
|
1656
|
-
const s =
|
|
1656
|
+
const s = qs(this._field, t, n);
|
|
1657
1657
|
if (s)
|
|
1658
1658
|
throw s;
|
|
1659
1659
|
}
|
|
1660
|
-
return this.obj[J(t)] =
|
|
1660
|
+
return this.obj[J(t)] = Js(this._field, n), this;
|
|
1661
1661
|
}
|
|
1662
1662
|
delete(t) {
|
|
1663
1663
|
const n = J(t), s = Object.prototype.hasOwnProperty.call(this.obj, n);
|
|
@@ -1676,12 +1676,12 @@ class Gs {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
*keys() {
|
|
1678
1678
|
for (const t of Object.keys(this.obj))
|
|
1679
|
-
yield
|
|
1679
|
+
yield Nt(t, this._field.mapKey);
|
|
1680
1680
|
}
|
|
1681
1681
|
*entries() {
|
|
1682
1682
|
for (const t of Object.entries(this.obj))
|
|
1683
1683
|
yield [
|
|
1684
|
-
|
|
1684
|
+
Nt(t[0], this._field.mapKey),
|
|
1685
1685
|
Re(this._field, t[1], this.check)
|
|
1686
1686
|
];
|
|
1687
1687
|
}
|
|
@@ -1700,31 +1700,31 @@ class Gs {
|
|
|
1700
1700
|
t.call(n, s[1], s[0], this);
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1704
|
-
return
|
|
1703
|
+
function Ze(e, t) {
|
|
1704
|
+
return Ke(t) ? Ms(t.message) && !e.oneof && e.fieldKind == "message" ? t.message.value : t.desc.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" ? Pn(t.message) : t.message : t;
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1707
|
-
return t !== void 0 && (
|
|
1706
|
+
function ze(e, t, n) {
|
|
1707
|
+
return t !== void 0 && (Sn(e.message) && !e.oneof && e.fieldKind == "message" ? t = {
|
|
1708
1708
|
$typeName: e.message.typeName,
|
|
1709
|
-
value:
|
|
1710
|
-
} : e.message.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" && P(t) && (t =
|
|
1709
|
+
value: Qe(e.message.fields[0], t)
|
|
1710
|
+
} : e.message.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" && P(t) && (t = xn(t))), new Mn(e.message, t, n);
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1713
|
-
return e.listKind == "message" ?
|
|
1712
|
+
function It(e, t) {
|
|
1713
|
+
return e.listKind == "message" ? Ze(e, t) : Je(e, t);
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return e.listKind == "message" ?
|
|
1715
|
+
function ve(e, t, n) {
|
|
1716
|
+
return e.listKind == "message" ? ze(e, t, n) : Qe(e, t);
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1719
|
-
return e.mapKind == "message" ?
|
|
1718
|
+
function Js(e, t) {
|
|
1719
|
+
return e.mapKind == "message" ? Ze(e, t) : Je(e, t);
|
|
1720
1720
|
}
|
|
1721
1721
|
function Re(e, t, n) {
|
|
1722
|
-
return e.mapKind == "message" ?
|
|
1722
|
+
return e.mapKind == "message" ? ze(e, t, n) : t;
|
|
1723
1723
|
}
|
|
1724
1724
|
function J(e) {
|
|
1725
1725
|
return typeof e == "string" || typeof e == "number" ? e : String(e);
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function Nt(e, t) {
|
|
1728
1728
|
switch (t) {
|
|
1729
1729
|
case c.STRING:
|
|
1730
1730
|
return e;
|
|
@@ -1762,7 +1762,7 @@ function wt(e, t) {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
return e;
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function Qe(e, t) {
|
|
1766
1766
|
switch (e.scalar) {
|
|
1767
1767
|
case c.INT64:
|
|
1768
1768
|
case c.SFIXED64:
|
|
@@ -1776,7 +1776,7 @@ function Ze(e, t) {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
return t;
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1779
|
+
function Je(e, t) {
|
|
1780
1780
|
switch (e.scalar) {
|
|
1781
1781
|
case c.INT64:
|
|
1782
1782
|
case c.SFIXED64:
|
|
@@ -1790,28 +1790,28 @@ function ze(e, t) {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
return t;
|
|
1792
1792
|
}
|
|
1793
|
-
function
|
|
1793
|
+
function xn(e) {
|
|
1794
1794
|
const t = {
|
|
1795
1795
|
$typeName: "google.protobuf.Struct",
|
|
1796
1796
|
fields: {}
|
|
1797
1797
|
};
|
|
1798
1798
|
if (P(e))
|
|
1799
1799
|
for (const [n, s] of Object.entries(e))
|
|
1800
|
-
t.fields[n] =
|
|
1800
|
+
t.fields[n] = Fn(s);
|
|
1801
1801
|
return t;
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function Pn(e) {
|
|
1804
1804
|
const t = {};
|
|
1805
1805
|
for (const [n, s] of Object.entries(e.fields))
|
|
1806
|
-
t[n] =
|
|
1806
|
+
t[n] = Vn(s);
|
|
1807
1807
|
return t;
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1809
|
+
function Vn(e) {
|
|
1810
1810
|
switch (e.kind.case) {
|
|
1811
1811
|
case "structValue":
|
|
1812
|
-
return
|
|
1812
|
+
return Pn(e.kind.value);
|
|
1813
1813
|
case "listValue":
|
|
1814
|
-
return e.kind.value.values.map(
|
|
1814
|
+
return e.kind.value.values.map(Vn);
|
|
1815
1815
|
case "nullValue":
|
|
1816
1816
|
case void 0:
|
|
1817
1817
|
return null;
|
|
@@ -1819,7 +1819,7 @@ function Un(e) {
|
|
|
1819
1819
|
return e.kind.value;
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function Fn(e) {
|
|
1823
1823
|
const t = {
|
|
1824
1824
|
$typeName: "google.protobuf.Value",
|
|
1825
1825
|
kind: { case: void 0 }
|
|
@@ -1836,7 +1836,7 @@ function Ln(e) {
|
|
|
1836
1836
|
break;
|
|
1837
1837
|
case "object":
|
|
1838
1838
|
if (e === null)
|
|
1839
|
-
t.kind = { case: "nullValue", value:
|
|
1839
|
+
t.kind = { case: "nullValue", value: Zs };
|
|
1840
1840
|
else if (Array.isArray(e)) {
|
|
1841
1841
|
const n = {
|
|
1842
1842
|
$typeName: "google.protobuf.ListValue",
|
|
@@ -1844,7 +1844,7 @@ function Ln(e) {
|
|
|
1844
1844
|
};
|
|
1845
1845
|
if (Array.isArray(e))
|
|
1846
1846
|
for (const s of e)
|
|
1847
|
-
n.values.push(
|
|
1847
|
+
n.values.push(Fn(s));
|
|
1848
1848
|
t.kind = {
|
|
1849
1849
|
case: "listValue",
|
|
1850
1850
|
value: n
|
|
@@ -1852,14 +1852,14 @@ function Ln(e) {
|
|
|
1852
1852
|
} else
|
|
1853
1853
|
t.kind = {
|
|
1854
1854
|
case: "structValue",
|
|
1855
|
-
value:
|
|
1855
|
+
value: xn(e)
|
|
1856
1856
|
};
|
|
1857
1857
|
break;
|
|
1858
1858
|
}
|
|
1859
1859
|
return t;
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1862
|
-
const t =
|
|
1861
|
+
function er(e) {
|
|
1862
|
+
const t = nr();
|
|
1863
1863
|
let n = e.length * 3 / 4;
|
|
1864
1864
|
e[e.length - 2] == "=" ? n -= 2 : e[e.length - 1] == "=" && (n -= 1);
|
|
1865
1865
|
let s = new Uint8Array(n), r = 0, i = 0, a, o = 0;
|
|
@@ -1899,21 +1899,21 @@ function Ys(e) {
|
|
|
1899
1899
|
throw Error("invalid base64 string");
|
|
1900
1900
|
return s.subarray(0, r);
|
|
1901
1901
|
}
|
|
1902
|
-
let ee,
|
|
1903
|
-
function
|
|
1902
|
+
let ee, B;
|
|
1903
|
+
function tr(e) {
|
|
1904
1904
|
return ee || (ee = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), ee.slice(0, -2).concat("-", "_")), ee;
|
|
1905
1905
|
}
|
|
1906
|
-
function
|
|
1907
|
-
if (!
|
|
1908
|
-
|
|
1909
|
-
const e =
|
|
1906
|
+
function nr() {
|
|
1907
|
+
if (!B) {
|
|
1908
|
+
B = [];
|
|
1909
|
+
const e = tr();
|
|
1910
1910
|
for (let t = 0; t < e.length; t++)
|
|
1911
|
-
|
|
1912
|
-
|
|
1911
|
+
B[e[t].charCodeAt(0)] = t;
|
|
1912
|
+
B[45] = e.indexOf("+"), B[95] = e.indexOf("/");
|
|
1913
1913
|
}
|
|
1914
|
-
return
|
|
1914
|
+
return B;
|
|
1915
1915
|
}
|
|
1916
|
-
function
|
|
1916
|
+
function fe(e) {
|
|
1917
1917
|
let t = !1;
|
|
1918
1918
|
const n = [];
|
|
1919
1919
|
for (let s = 0; s < e.length; s++) {
|
|
@@ -1941,7 +1941,7 @@ function he(e) {
|
|
|
1941
1941
|
}
|
|
1942
1942
|
return n.join("");
|
|
1943
1943
|
}
|
|
1944
|
-
const
|
|
1944
|
+
const sr = /* @__PURE__ */ new Set([
|
|
1945
1945
|
// names reserved by JavaScript
|
|
1946
1946
|
"constructor",
|
|
1947
1947
|
"toString",
|
|
@@ -1949,25 +1949,25 @@ const Ks = /* @__PURE__ */ new Set([
|
|
|
1949
1949
|
"valueOf"
|
|
1950
1950
|
]);
|
|
1951
1951
|
function Z(e) {
|
|
1952
|
-
return
|
|
1952
|
+
return sr.has(e) ? e + "$" : e;
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1954
|
+
function et(e) {
|
|
1955
1955
|
for (const t of e.field)
|
|
1956
|
-
H(t, "jsonName") || (t.jsonName =
|
|
1957
|
-
e.nestedType.forEach(
|
|
1956
|
+
H(t, "jsonName") || (t.jsonName = fe(t.name));
|
|
1957
|
+
e.nestedType.forEach(et);
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function rr(e, t) {
|
|
1960
1960
|
const n = e.values.find((s) => s.name === t);
|
|
1961
1961
|
if (!n)
|
|
1962
1962
|
throw new Error(`cannot parse ${e} default value: ${t}`);
|
|
1963
1963
|
return n.number;
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function ir(e, t) {
|
|
1966
1966
|
switch (e) {
|
|
1967
1967
|
case c.STRING:
|
|
1968
1968
|
return t;
|
|
1969
1969
|
case c.BYTES: {
|
|
1970
|
-
const n =
|
|
1970
|
+
const n = ar(t);
|
|
1971
1971
|
if (n === !1)
|
|
1972
1972
|
throw new Error(`cannot parse ${c[e]} default value: ${t}`);
|
|
1973
1973
|
return n;
|
|
@@ -2001,7 +2001,7 @@ function js(e, t) {
|
|
|
2001
2001
|
return parseInt(t, 10);
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function ar(e) {
|
|
2005
2005
|
const t = [], n = {
|
|
2006
2006
|
tail: e,
|
|
2007
2007
|
c: "",
|
|
@@ -2095,27 +2095,27 @@ function qs(e) {
|
|
|
2095
2095
|
}
|
|
2096
2096
|
return new Uint8Array(t);
|
|
2097
2097
|
}
|
|
2098
|
-
function*
|
|
2098
|
+
function* Me(e) {
|
|
2099
2099
|
switch (e.kind) {
|
|
2100
2100
|
case "file":
|
|
2101
2101
|
for (const t of e.messages)
|
|
2102
|
-
yield t, yield*
|
|
2102
|
+
yield t, yield* Me(t);
|
|
2103
2103
|
yield* e.enums, yield* e.services, yield* e.extensions;
|
|
2104
2104
|
break;
|
|
2105
2105
|
case "message":
|
|
2106
2106
|
for (const t of e.nestedMessages)
|
|
2107
|
-
yield t, yield*
|
|
2107
|
+
yield t, yield* Me(t);
|
|
2108
2108
|
yield* e.nestedEnums, yield* e.nestedExtensions;
|
|
2109
2109
|
break;
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
|
-
function
|
|
2113
|
-
const t =
|
|
2112
|
+
function Gn(...e) {
|
|
2113
|
+
const t = or();
|
|
2114
2114
|
if (!e.length)
|
|
2115
2115
|
return t;
|
|
2116
2116
|
if ("$typeName" in e[0] && e[0].$typeName == "google.protobuf.FileDescriptorSet") {
|
|
2117
2117
|
for (const n of e[0].file)
|
|
2118
|
-
|
|
2118
|
+
At(n, t);
|
|
2119
2119
|
return t;
|
|
2120
2120
|
}
|
|
2121
2121
|
if ("$typeName" in e[0]) {
|
|
@@ -2133,14 +2133,14 @@ function Mn(...e) {
|
|
|
2133
2133
|
};
|
|
2134
2134
|
const n = e[0], s = e[1], r = /* @__PURE__ */ new Set();
|
|
2135
2135
|
for (const a of [n, ...i(n)].reverse())
|
|
2136
|
-
|
|
2136
|
+
At(a, t);
|
|
2137
2137
|
} else
|
|
2138
2138
|
for (const n of e)
|
|
2139
2139
|
for (const s of n.files)
|
|
2140
2140
|
t.addFile(s);
|
|
2141
2141
|
return t;
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function or() {
|
|
2144
2144
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
2145
2145
|
return {
|
|
2146
2146
|
kind: "registry",
|
|
@@ -2154,7 +2154,7 @@ function Hs() {
|
|
|
2154
2154
|
},
|
|
2155
2155
|
addFile(s, r, i) {
|
|
2156
2156
|
if (n.set(s.proto.name, s), !r)
|
|
2157
|
-
for (const a of
|
|
2157
|
+
for (const a of Me(s))
|
|
2158
2158
|
this.add(a);
|
|
2159
2159
|
if (i)
|
|
2160
2160
|
for (const a of s.dependencies)
|
|
@@ -2199,7 +2199,7 @@ function Hs() {
|
|
|
2199
2199
|
}
|
|
2200
2200
|
};
|
|
2201
2201
|
}
|
|
2202
|
-
const
|
|
2202
|
+
const cr = 998, ur = 999, lr = 9999, dr = 9, z = 10, W = 11, hr = 12, Tt = 14, tt = 3, fr = 2, St = 1, mr = 0, _e = 1, kt = 2, pr = 3, gr = 1, br = 2, Er = 1, yr = 2, wr = 1001, Bn = {
|
|
2203
2203
|
// EDITION_PROTO2
|
|
2204
2204
|
998: {
|
|
2205
2205
|
fieldPresence: 1,
|
|
@@ -2277,15 +2277,15 @@ const Zs = 998, zs = 999, Qs = 9999, Js = 9, z = 10, j = 11, er = 12, It = 14, J
|
|
|
2277
2277
|
// EXPORT_TOP_LEVEL,
|
|
2278
2278
|
}
|
|
2279
2279
|
};
|
|
2280
|
-
function
|
|
2280
|
+
function At(e, t) {
|
|
2281
2281
|
var n, s;
|
|
2282
2282
|
const r = {
|
|
2283
2283
|
kind: "file",
|
|
2284
2284
|
proto: e,
|
|
2285
2285
|
deprecated: (s = (n = e.options) === null || n === void 0 ? void 0 : n.deprecated) !== null && s !== void 0 ? s : !1,
|
|
2286
|
-
edition:
|
|
2286
|
+
edition: Sr(e),
|
|
2287
2287
|
name: e.name.replace(/\.proto$/, ""),
|
|
2288
|
-
dependencies:
|
|
2288
|
+
dependencies: kr(e, t),
|
|
2289
2289
|
enums: [],
|
|
2290
2290
|
messages: [],
|
|
2291
2291
|
extensions: [],
|
|
@@ -2303,50 +2303,50 @@ function St(e, t) {
|
|
|
2303
2303
|
}
|
|
2304
2304
|
};
|
|
2305
2305
|
for (const o of e.enumType)
|
|
2306
|
-
|
|
2306
|
+
Yn(o, r, void 0, t);
|
|
2307
2307
|
for (const o of e.messageType)
|
|
2308
|
-
|
|
2308
|
+
$n(o, r, void 0, t, a);
|
|
2309
2309
|
for (const o of e.service)
|
|
2310
|
-
|
|
2311
|
-
|
|
2310
|
+
Ir(o, r, t);
|
|
2311
|
+
xe(r, t);
|
|
2312
2312
|
for (const o of i.values())
|
|
2313
|
-
|
|
2313
|
+
Pe(o, t, a);
|
|
2314
2314
|
for (const o of r.messages)
|
|
2315
|
-
|
|
2315
|
+
Pe(o, t, a), xe(o, t);
|
|
2316
2316
|
t.addFile(r, !0);
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function xe(e, t) {
|
|
2319
2319
|
switch (e.kind) {
|
|
2320
2320
|
case "file":
|
|
2321
2321
|
for (const n of e.proto.extension) {
|
|
2322
|
-
const s =
|
|
2322
|
+
const s = Ve(n, e, t);
|
|
2323
2323
|
e.extensions.push(s), t.add(s);
|
|
2324
2324
|
}
|
|
2325
2325
|
break;
|
|
2326
2326
|
case "message":
|
|
2327
2327
|
for (const n of e.proto.extension) {
|
|
2328
|
-
const s =
|
|
2328
|
+
const s = Ve(n, e, t);
|
|
2329
2329
|
e.nestedExtensions.push(s), t.add(s);
|
|
2330
2330
|
}
|
|
2331
2331
|
for (const n of e.nestedMessages)
|
|
2332
|
-
|
|
2332
|
+
xe(n, t);
|
|
2333
2333
|
break;
|
|
2334
2334
|
}
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2337
|
-
const s = e.proto.oneofDecl.map((i) =>
|
|
2336
|
+
function Pe(e, t, n) {
|
|
2337
|
+
const s = e.proto.oneofDecl.map((i) => Tr(i, e)), r = /* @__PURE__ */ new Set();
|
|
2338
2338
|
for (const i of e.proto.field) {
|
|
2339
|
-
const a =
|
|
2339
|
+
const a = Rr(i, s), o = Ve(i, e, t, a, n);
|
|
2340
2340
|
e.fields.push(o), e.field[o.localName] = o, a === void 0 ? e.members.push(o) : (a.fields.push(o), r.has(a) || (r.add(a), e.members.push(a)));
|
|
2341
2341
|
}
|
|
2342
2342
|
for (const i of s.filter((a) => r.has(a)))
|
|
2343
2343
|
e.oneofs.push(i);
|
|
2344
2344
|
for (const i of e.nestedMessages)
|
|
2345
|
-
|
|
2345
|
+
Pe(i, t, n);
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function Yn(e, t, n, s) {
|
|
2348
2348
|
var r, i, a, o, l;
|
|
2349
|
-
const u =
|
|
2349
|
+
const u = Ar(e.name, e.value), d = {
|
|
2350
2350
|
kind: "enum",
|
|
2351
2351
|
proto: e,
|
|
2352
2352
|
deprecated: (i = (r = e.options) === null || r === void 0 ? void 0 : r.deprecated) !== null && i !== void 0 ? i : !1,
|
|
@@ -2354,7 +2354,7 @@ function Pn(e, t, n, s) {
|
|
|
2354
2354
|
parent: n,
|
|
2355
2355
|
open: !0,
|
|
2356
2356
|
name: e.name,
|
|
2357
|
-
typeName:
|
|
2357
|
+
typeName: ye(e, n, t),
|
|
2358
2358
|
value: {},
|
|
2359
2359
|
values: [],
|
|
2360
2360
|
sharedPrefix: u,
|
|
@@ -2362,7 +2362,7 @@ function Pn(e, t, n, s) {
|
|
|
2362
2362
|
return `enum ${this.typeName}`;
|
|
2363
2363
|
}
|
|
2364
2364
|
};
|
|
2365
|
-
d.open =
|
|
2365
|
+
d.open = Dr(d), s.add(d);
|
|
2366
2366
|
for (const f of e.value) {
|
|
2367
2367
|
const p = f.name;
|
|
2368
2368
|
d.values.push(
|
|
@@ -2383,7 +2383,7 @@ function Pn(e, t, n, s) {
|
|
|
2383
2383
|
}
|
|
2384
2384
|
((l = n?.nestedEnums) !== null && l !== void 0 ? l : t.enums).push(d);
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2386
|
+
function $n(e, t, n, s, r) {
|
|
2387
2387
|
var i, a, o, l;
|
|
2388
2388
|
const u = {
|
|
2389
2389
|
kind: "message",
|
|
@@ -2392,7 +2392,7 @@ function Vn(e, t, n, s, r) {
|
|
|
2392
2392
|
file: t,
|
|
2393
2393
|
parent: n,
|
|
2394
2394
|
name: e.name,
|
|
2395
|
-
typeName:
|
|
2395
|
+
typeName: ye(e, n, t),
|
|
2396
2396
|
fields: [],
|
|
2397
2397
|
field: {},
|
|
2398
2398
|
oneofs: [],
|
|
@@ -2406,11 +2406,11 @@ function Vn(e, t, n, s, r) {
|
|
|
2406
2406
|
};
|
|
2407
2407
|
((o = e.options) === null || o === void 0 ? void 0 : o.mapEntry) === !0 ? r.add(u) : (((l = n?.nestedMessages) !== null && l !== void 0 ? l : t.messages).push(u), s.add(u));
|
|
2408
2408
|
for (const d of e.enumType)
|
|
2409
|
-
|
|
2409
|
+
Yn(d, t, u, s);
|
|
2410
2410
|
for (const d of e.nestedType)
|
|
2411
|
-
|
|
2411
|
+
$n(d, t, u, s, r);
|
|
2412
2412
|
}
|
|
2413
|
-
function
|
|
2413
|
+
function Ir(e, t, n) {
|
|
2414
2414
|
var s, r;
|
|
2415
2415
|
const i = {
|
|
2416
2416
|
kind: "service",
|
|
@@ -2418,7 +2418,7 @@ function ur(e, t, n) {
|
|
|
2418
2418
|
deprecated: (r = (s = e.options) === null || s === void 0 ? void 0 : s.deprecated) !== null && r !== void 0 ? r : !1,
|
|
2419
2419
|
file: t,
|
|
2420
2420
|
name: e.name,
|
|
2421
|
-
typeName:
|
|
2421
|
+
typeName: ye(e, void 0, t),
|
|
2422
2422
|
methods: [],
|
|
2423
2423
|
method: {},
|
|
2424
2424
|
toString() {
|
|
@@ -2427,11 +2427,11 @@ function ur(e, t, n) {
|
|
|
2427
2427
|
};
|
|
2428
2428
|
t.services.push(i), n.add(i);
|
|
2429
2429
|
for (const a of e.method) {
|
|
2430
|
-
const o =
|
|
2430
|
+
const o = Nr(a, i, n);
|
|
2431
2431
|
i.methods.push(o), i.method[o.localName] = o;
|
|
2432
2432
|
}
|
|
2433
2433
|
}
|
|
2434
|
-
function
|
|
2434
|
+
function Nr(e, t, n) {
|
|
2435
2435
|
var s, r, i, a;
|
|
2436
2436
|
let o;
|
|
2437
2437
|
e.clientStreaming && e.serverStreaming ? o = "bidi_streaming" : e.clientStreaming ? o = "client_streaming" : e.serverStreaming ? o = "server_streaming" : o = "unary";
|
|
@@ -2448,13 +2448,13 @@ function lr(e, t, n) {
|
|
|
2448
2448
|
methodKind: o,
|
|
2449
2449
|
input: l,
|
|
2450
2450
|
output: u,
|
|
2451
|
-
idempotency: (a = (i = e.options) === null || i === void 0 ? void 0 : i.idempotencyLevel) !== null && a !== void 0 ? a :
|
|
2451
|
+
idempotency: (a = (i = e.options) === null || i === void 0 ? void 0 : i.idempotencyLevel) !== null && a !== void 0 ? a : mr,
|
|
2452
2452
|
toString() {
|
|
2453
2453
|
return `rpc ${t.typeName}.${d}`;
|
|
2454
2454
|
}
|
|
2455
2455
|
};
|
|
2456
2456
|
}
|
|
2457
|
-
function
|
|
2457
|
+
function Tr(e, t) {
|
|
2458
2458
|
return {
|
|
2459
2459
|
kind: "oneof",
|
|
2460
2460
|
proto: e,
|
|
@@ -2462,13 +2462,13 @@ function dr(e, t) {
|
|
|
2462
2462
|
parent: t,
|
|
2463
2463
|
fields: [],
|
|
2464
2464
|
name: e.name,
|
|
2465
|
-
localName: Z(
|
|
2465
|
+
localName: Z(fe(e.name)),
|
|
2466
2466
|
toString() {
|
|
2467
2467
|
return `oneof ${t.typeName}.${this.name}`;
|
|
2468
2468
|
}
|
|
2469
2469
|
};
|
|
2470
2470
|
}
|
|
2471
|
-
function
|
|
2471
|
+
function Ve(e, t, n, s, r) {
|
|
2472
2472
|
var i, a, o;
|
|
2473
2473
|
const l = r === void 0, u = {
|
|
2474
2474
|
kind: "field",
|
|
@@ -2479,8 +2479,8 @@ function xe(e, t, n, s, r) {
|
|
|
2479
2479
|
scalar: void 0,
|
|
2480
2480
|
message: void 0,
|
|
2481
2481
|
enum: void 0,
|
|
2482
|
-
presence:
|
|
2483
|
-
utf8Validation:
|
|
2482
|
+
presence: _r(e, s, l, t),
|
|
2483
|
+
utf8Validation: Ur(e, t),
|
|
2484
2484
|
listKind: void 0,
|
|
2485
2485
|
mapKind: void 0,
|
|
2486
2486
|
mapKey: void 0,
|
|
@@ -2490,72 +2490,72 @@ function xe(e, t, n, s, r) {
|
|
|
2490
2490
|
getDefaultValue: void 0
|
|
2491
2491
|
};
|
|
2492
2492
|
if (l) {
|
|
2493
|
-
const m = t.kind == "file" ? t : t.file,
|
|
2494
|
-
u.kind = "extension", u.file = m, u.parent =
|
|
2493
|
+
const m = t.kind == "file" ? t : t.file, b = t.kind == "file" ? void 0 : t, E = ye(e, b, m);
|
|
2494
|
+
u.kind = "extension", u.file = m, u.parent = b, u.oneof = void 0, u.typeName = E, u.jsonName = `[${E}]`, u.toString = () => `extension ${E}`;
|
|
2495
2495
|
const x = n.getMessage(D(e.extendee));
|
|
2496
2496
|
A(x, `invalid FieldDescriptorProto: extendee ${e.extendee} not found`), u.extendee = x;
|
|
2497
2497
|
} else {
|
|
2498
2498
|
const m = t;
|
|
2499
|
-
A(m.kind == "message"), u.parent = m, u.oneof = s, u.localName = s ?
|
|
2499
|
+
A(m.kind == "message"), u.parent = m, u.oneof = s, u.localName = s ? fe(e.name) : Z(fe(e.name)), u.jsonName = e.jsonName, u.toString = () => `field ${m.typeName}.${e.name}`;
|
|
2500
2500
|
}
|
|
2501
2501
|
const d = e.label, f = e.type, p = (o = e.options) === null || o === void 0 ? void 0 : o.jstype;
|
|
2502
|
-
if (d ===
|
|
2503
|
-
const m = f ==
|
|
2502
|
+
if (d === tt) {
|
|
2503
|
+
const m = f == W ? r?.get(D(e.typeName)) : void 0;
|
|
2504
2504
|
if (m) {
|
|
2505
2505
|
u.fieldKind = "map";
|
|
2506
|
-
const { key:
|
|
2507
|
-
return u.mapKey =
|
|
2506
|
+
const { key: b, value: E } = Cr(m);
|
|
2507
|
+
return u.mapKey = b.scalar, u.mapKind = E.fieldKind, u.message = E.message, u.delimitedEncoding = !1, u.enum = E.enum, u.scalar = E.scalar, u;
|
|
2508
2508
|
}
|
|
2509
2509
|
switch (u.fieldKind = "list", f) {
|
|
2510
|
-
case
|
|
2510
|
+
case W:
|
|
2511
2511
|
case z:
|
|
2512
|
-
u.listKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message), u.delimitedEncoding =
|
|
2512
|
+
u.listKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message), u.delimitedEncoding = vt(e, t);
|
|
2513
2513
|
break;
|
|
2514
|
-
case
|
|
2514
|
+
case Tt:
|
|
2515
2515
|
u.listKind = "enum", u.enum = n.getEnum(D(e.typeName)), A(u.enum);
|
|
2516
2516
|
break;
|
|
2517
2517
|
default:
|
|
2518
|
-
u.listKind = "scalar", u.scalar = f, u.longAsString = p ==
|
|
2518
|
+
u.listKind = "scalar", u.scalar = f, u.longAsString = p == St;
|
|
2519
2519
|
break;
|
|
2520
2520
|
}
|
|
2521
|
-
return u.packed =
|
|
2521
|
+
return u.packed = Or(e, t), u;
|
|
2522
2522
|
}
|
|
2523
2523
|
switch (f) {
|
|
2524
|
-
case
|
|
2524
|
+
case W:
|
|
2525
2525
|
case z:
|
|
2526
|
-
u.fieldKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.delimitedEncoding =
|
|
2526
|
+
u.fieldKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.delimitedEncoding = vt(e, t), u.getDefaultValue = () => {
|
|
2527
2527
|
};
|
|
2528
2528
|
break;
|
|
2529
|
-
case
|
|
2529
|
+
case Tt: {
|
|
2530
2530
|
const m = n.getEnum(D(e.typeName));
|
|
2531
|
-
A(m !== void 0, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.fieldKind = "enum", u.enum = n.getEnum(D(e.typeName)), u.getDefaultValue = () => H(e, "defaultValue") ?
|
|
2531
|
+
A(m !== void 0, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.fieldKind = "enum", u.enum = n.getEnum(D(e.typeName)), u.getDefaultValue = () => H(e, "defaultValue") ? rr(m, e.defaultValue) : void 0;
|
|
2532
2532
|
break;
|
|
2533
2533
|
}
|
|
2534
2534
|
default: {
|
|
2535
|
-
u.fieldKind = "scalar", u.scalar = f, u.longAsString = p ==
|
|
2535
|
+
u.fieldKind = "scalar", u.scalar = f, u.longAsString = p == St, u.getDefaultValue = () => H(e, "defaultValue") ? ir(f, e.defaultValue) : void 0;
|
|
2536
2536
|
break;
|
|
2537
2537
|
}
|
|
2538
2538
|
}
|
|
2539
2539
|
return u;
|
|
2540
2540
|
}
|
|
2541
|
-
function
|
|
2541
|
+
function Sr(e) {
|
|
2542
2542
|
switch (e.syntax) {
|
|
2543
2543
|
case "":
|
|
2544
2544
|
case "proto2":
|
|
2545
|
-
return
|
|
2545
|
+
return cr;
|
|
2546
2546
|
case "proto3":
|
|
2547
|
-
return
|
|
2547
|
+
return ur;
|
|
2548
2548
|
case "editions":
|
|
2549
|
-
if (e.edition ===
|
|
2550
|
-
return
|
|
2551
|
-
if (e.edition in
|
|
2549
|
+
if (e.edition === lr)
|
|
2550
|
+
return wr;
|
|
2551
|
+
if (e.edition in Bn)
|
|
2552
2552
|
return e.edition;
|
|
2553
2553
|
throw new Error(`${e.name}: unsupported edition`);
|
|
2554
2554
|
default:
|
|
2555
2555
|
throw new Error(`${e.name}: unsupported syntax "${e.syntax}"`);
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
|
-
function
|
|
2558
|
+
function kr(e, t) {
|
|
2559
2559
|
return e.dependency.map((n) => {
|
|
2560
2560
|
const s = t.getFile(n);
|
|
2561
2561
|
if (!s)
|
|
@@ -2563,8 +2563,8 @@ function fr(e, t) {
|
|
|
2563
2563
|
return s;
|
|
2564
2564
|
});
|
|
2565
2565
|
}
|
|
2566
|
-
function
|
|
2567
|
-
const n =
|
|
2566
|
+
function Ar(e, t) {
|
|
2567
|
+
const n = vr(e) + "_";
|
|
2568
2568
|
for (const s of t) {
|
|
2569
2569
|
if (!s.name.toLowerCase().startsWith(n))
|
|
2570
2570
|
return;
|
|
@@ -2574,67 +2574,67 @@ function mr(e, t) {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
return n;
|
|
2576
2576
|
}
|
|
2577
|
-
function
|
|
2577
|
+
function vr(e) {
|
|
2578
2578
|
return (e.substring(0, 1) + e.substring(1).replace(/[A-Z]/g, (t) => "_" + t)).toLowerCase();
|
|
2579
2579
|
}
|
|
2580
|
-
function
|
|
2580
|
+
function ye(e, t, n) {
|
|
2581
2581
|
let s;
|
|
2582
2582
|
return t ? s = `${t.typeName}.${e.name}` : n.proto.package.length > 0 ? s = `${n.proto.package}.${e.name}` : s = `${e.name}`, s;
|
|
2583
2583
|
}
|
|
2584
2584
|
function D(e) {
|
|
2585
2585
|
return e.startsWith(".") ? e.substring(1) : e;
|
|
2586
2586
|
}
|
|
2587
|
-
function
|
|
2587
|
+
function Rr(e, t) {
|
|
2588
2588
|
if (!H(e, "oneofIndex") || e.proto3Optional)
|
|
2589
2589
|
return;
|
|
2590
2590
|
const n = t[e.oneofIndex];
|
|
2591
2591
|
return A(n, `invalid FieldDescriptorProto: oneof #${e.oneofIndex} for field #${e.number} not found`), n;
|
|
2592
2592
|
}
|
|
2593
|
-
function
|
|
2594
|
-
if (e.label ==
|
|
2595
|
-
return
|
|
2596
|
-
if (e.label ==
|
|
2597
|
-
return
|
|
2593
|
+
function _r(e, t, n, s) {
|
|
2594
|
+
if (e.label == fr)
|
|
2595
|
+
return pr;
|
|
2596
|
+
if (e.label == tt)
|
|
2597
|
+
return kt;
|
|
2598
2598
|
if (t || e.proto3Optional || n)
|
|
2599
2599
|
return _e;
|
|
2600
2600
|
const r = F("fieldPresence", { proto: e, parent: s });
|
|
2601
|
-
return r ==
|
|
2601
|
+
return r == kt && (e.type == W || e.type == z) ? _e : r;
|
|
2602
2602
|
}
|
|
2603
|
-
function
|
|
2604
|
-
if (e.label !=
|
|
2603
|
+
function Or(e, t) {
|
|
2604
|
+
if (e.label != tt)
|
|
2605
2605
|
return !1;
|
|
2606
2606
|
switch (e.type) {
|
|
2607
|
-
case
|
|
2608
|
-
case
|
|
2607
|
+
case dr:
|
|
2608
|
+
case hr:
|
|
2609
2609
|
case z:
|
|
2610
|
-
case
|
|
2610
|
+
case W:
|
|
2611
2611
|
return !1;
|
|
2612
2612
|
}
|
|
2613
2613
|
const n = e.options;
|
|
2614
|
-
return n && H(n, "packed") ? n.packed :
|
|
2614
|
+
return n && H(n, "packed") ? n.packed : gr == F("repeatedFieldEncoding", {
|
|
2615
2615
|
proto: e,
|
|
2616
2616
|
parent: t
|
|
2617
2617
|
});
|
|
2618
2618
|
}
|
|
2619
|
-
function
|
|
2619
|
+
function Cr(e) {
|
|
2620
2620
|
const t = e.fields.find((s) => s.number === 1), n = e.fields.find((s) => s.number === 2);
|
|
2621
2621
|
return A(t && t.fieldKind == "scalar" && t.scalar != c.BYTES && t.scalar != c.FLOAT && t.scalar != c.DOUBLE && n && n.fieldKind != "list" && n.fieldKind != "map"), { key: t, value: n };
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function Dr(e) {
|
|
2624
2624
|
var t;
|
|
2625
|
-
return
|
|
2625
|
+
return Er == F("enumType", {
|
|
2626
2626
|
proto: e.proto,
|
|
2627
2627
|
parent: (t = e.parent) !== null && t !== void 0 ? t : e.file
|
|
2628
2628
|
});
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2631
|
-
return e.type == z ? !0 :
|
|
2630
|
+
function vt(e, t) {
|
|
2631
|
+
return e.type == z ? !0 : br == F("messageEncoding", {
|
|
2632
2632
|
proto: e,
|
|
2633
2633
|
parent: t
|
|
2634
2634
|
});
|
|
2635
2635
|
}
|
|
2636
|
-
function
|
|
2637
|
-
return
|
|
2636
|
+
function Ur(e, t) {
|
|
2637
|
+
return yr == F("utf8Validation", {
|
|
2638
2638
|
proto: e,
|
|
2639
2639
|
parent: t
|
|
2640
2640
|
});
|
|
@@ -2650,7 +2650,7 @@ function F(e, t) {
|
|
|
2650
2650
|
if ("kind" in t) {
|
|
2651
2651
|
if (t.kind == "message")
|
|
2652
2652
|
return F(e, (s = t.parent) !== null && s !== void 0 ? s : t.file);
|
|
2653
|
-
const i =
|
|
2653
|
+
const i = Bn[t.edition];
|
|
2654
2654
|
if (!i)
|
|
2655
2655
|
throw new Error(`feature default for edition ${t.edition} not found`);
|
|
2656
2656
|
return i[e];
|
|
@@ -2661,35 +2661,35 @@ function A(e, t) {
|
|
|
2661
2661
|
if (!e)
|
|
2662
2662
|
throw new Error(t);
|
|
2663
2663
|
}
|
|
2664
|
-
function
|
|
2665
|
-
const t =
|
|
2666
|
-
return t.messageType.forEach(
|
|
2664
|
+
function Lr(e) {
|
|
2665
|
+
const t = Mr(e);
|
|
2666
|
+
return t.messageType.forEach(et), Gn(t, () => {
|
|
2667
2667
|
}).getFile(t.name);
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2669
|
+
function Mr(e) {
|
|
2670
2670
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2671
2671
|
syntax: "",
|
|
2672
2672
|
edition: 0
|
|
2673
|
-
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FileDescriptorProto", dependency: [], publicDependency: [], weakDependency: [], optionDependency: [], service: [], extension: [] }, e), { messageType: e.messageType.map(
|
|
2673
|
+
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FileDescriptorProto", dependency: [], publicDependency: [], weakDependency: [], optionDependency: [], service: [], extension: [] }, e), { messageType: e.messageType.map(Xn), enumType: e.enumType.map(Kn) }));
|
|
2674
2674
|
}
|
|
2675
|
-
function
|
|
2675
|
+
function Xn(e) {
|
|
2676
2676
|
var t, n, s, r, i, a, o, l;
|
|
2677
2677
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2678
2678
|
visibility: 0
|
|
2679
2679
|
}), {
|
|
2680
2680
|
$typeName: "google.protobuf.DescriptorProto",
|
|
2681
2681
|
name: e.name,
|
|
2682
|
-
field: (n = (t = e.field) === null || t === void 0 ? void 0 : t.map(
|
|
2682
|
+
field: (n = (t = e.field) === null || t === void 0 ? void 0 : t.map(xr)) !== null && n !== void 0 ? n : [],
|
|
2683
2683
|
extension: [],
|
|
2684
|
-
nestedType: (r = (s = e.nestedType) === null || s === void 0 ? void 0 : s.map(
|
|
2685
|
-
enumType: (a = (i = e.enumType) === null || i === void 0 ? void 0 : i.map(
|
|
2684
|
+
nestedType: (r = (s = e.nestedType) === null || s === void 0 ? void 0 : s.map(Xn)) !== null && r !== void 0 ? r : [],
|
|
2685
|
+
enumType: (a = (i = e.enumType) === null || i === void 0 ? void 0 : i.map(Kn)) !== null && a !== void 0 ? a : [],
|
|
2686
2686
|
extensionRange: (l = (o = e.extensionRange) === null || o === void 0 ? void 0 : o.map((d) => Object.assign({ $typeName: "google.protobuf.DescriptorProto.ExtensionRange" }, d))) !== null && l !== void 0 ? l : [],
|
|
2687
2687
|
oneofDecl: [],
|
|
2688
2688
|
reservedRange: [],
|
|
2689
2689
|
reservedName: []
|
|
2690
2690
|
});
|
|
2691
2691
|
}
|
|
2692
|
-
function
|
|
2692
|
+
function xr(e) {
|
|
2693
2693
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2694
2694
|
label: 1,
|
|
2695
2695
|
typeName: "",
|
|
@@ -2698,9 +2698,9 @@ function Sr(e) {
|
|
|
2698
2698
|
oneofIndex: 0,
|
|
2699
2699
|
jsonName: "",
|
|
2700
2700
|
proto3Optional: !1
|
|
2701
|
-
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldDescriptorProto" }, e), { options: e.options ?
|
|
2701
|
+
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldDescriptorProto" }, e), { options: e.options ? Pr(e.options) : void 0 }));
|
|
2702
2702
|
}
|
|
2703
|
-
function
|
|
2703
|
+
function Pr(e) {
|
|
2704
2704
|
var t, n, s;
|
|
2705
2705
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2706
2706
|
ctype: 0,
|
|
@@ -2714,7 +2714,7 @@ function kr(e) {
|
|
|
2714
2714
|
retention: 0
|
|
2715
2715
|
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldOptions" }, e), { targets: (t = e.targets) !== null && t !== void 0 ? t : [], editionDefaults: (s = (n = e.editionDefaults) === null || n === void 0 ? void 0 : n.map((i) => Object.assign({ $typeName: "google.protobuf.FieldOptions.EditionDefault" }, i))) !== null && s !== void 0 ? s : [], uninterpretedOption: [] }));
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2717
|
+
function Kn(e) {
|
|
2718
2718
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2719
2719
|
visibility: 0
|
|
2720
2720
|
}), {
|
|
@@ -2725,98 +2725,98 @@ function Gn(e) {
|
|
|
2725
2725
|
value: e.value.map((n) => Object.assign({ $typeName: "google.protobuf.EnumValueDescriptorProto" }, n))
|
|
2726
2726
|
});
|
|
2727
2727
|
}
|
|
2728
|
-
function
|
|
2728
|
+
function v(e, t, ...n) {
|
|
2729
2729
|
return n.reduce((s, r) => s.nestedMessages[r], e.messages[t]);
|
|
2730
2730
|
}
|
|
2731
|
-
const Ar = /* @__PURE__ */ Nr({ name: "google/protobuf/descriptor.proto", package: "google.protobuf", messageType: [{ name: "FileDescriptorSet", field: [{ name: "file", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FileDescriptorProto" }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "FileDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "package", number: 2, type: 9, label: 1 }, { name: "dependency", number: 3, type: 9, label: 3 }, { name: "public_dependency", number: 10, type: 5, label: 3 }, { name: "weak_dependency", number: 11, type: 5, label: 3 }, { name: "option_dependency", number: 15, type: 9, label: 3 }, { name: "message_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 5, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "service", number: 6, type: 11, label: 3, typeName: ".google.protobuf.ServiceDescriptorProto" }, { name: "extension", number: 7, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FileOptions" }, { name: "source_code_info", number: 9, type: 11, label: 1, typeName: ".google.protobuf.SourceCodeInfo" }, { name: "syntax", number: 12, type: 9, label: 1 }, { name: "edition", number: 14, type: 14, label: 1, typeName: ".google.protobuf.Edition" }] }, { name: "DescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "field", number: 2, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "extension", number: 6, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "nested_type", number: 3, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "extension_range", number: 5, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ExtensionRange" }, { name: "oneof_decl", number: 8, type: 11, label: 3, typeName: ".google.protobuf.OneofDescriptorProto" }, { name: "options", number: 7, type: 11, label: 1, typeName: ".google.protobuf.MessageOptions" }, { name: "reserved_range", number: 9, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ReservedRange" }, { name: "reserved_name", number: 10, type: 9, label: 3 }, { name: "visibility", number: 11, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "ExtensionRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions" }] }, { name: "ReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "ExtensionRangeOptions", field: [{ name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }, { name: "declaration", number: 2, type: 11, label: 3, typeName: ".google.protobuf.ExtensionRangeOptions.Declaration", options: { retention: 2 } }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "verification", number: 3, type: 14, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions.VerificationState", defaultValue: "UNVERIFIED", options: { retention: 2 } }], nestedType: [{ name: "Declaration", field: [{ name: "number", number: 1, type: 5, label: 1 }, { name: "full_name", number: 2, type: 9, label: 1 }, { name: "type", number: 3, type: 9, label: 1 }, { name: "reserved", number: 5, type: 8, label: 1 }, { name: "repeated", number: 6, type: 8, label: 1 }] }], enumType: [{ name: "VerificationState", value: [{ name: "DECLARATION", number: 0 }, { name: "UNVERIFIED", number: 1 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 3, type: 5, label: 1 }, { name: "label", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Label" }, { name: "type", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Type" }, { name: "type_name", number: 6, type: 9, label: 1 }, { name: "extendee", number: 2, type: 9, label: 1 }, { name: "default_value", number: 7, type: 9, label: 1 }, { name: "oneof_index", number: 9, type: 5, label: 1 }, { name: "json_name", number: 10, type: 9, label: 1 }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions" }, { name: "proto3_optional", number: 17, type: 8, label: 1 }], enumType: [{ name: "Type", value: [{ name: "TYPE_DOUBLE", number: 1 }, { name: "TYPE_FLOAT", number: 2 }, { name: "TYPE_INT64", number: 3 }, { name: "TYPE_UINT64", number: 4 }, { name: "TYPE_INT32", number: 5 }, { name: "TYPE_FIXED64", number: 6 }, { name: "TYPE_FIXED32", number: 7 }, { name: "TYPE_BOOL", number: 8 }, { name: "TYPE_STRING", number: 9 }, { name: "TYPE_GROUP", number: 10 }, { name: "TYPE_MESSAGE", number: 11 }, { name: "TYPE_BYTES", number: 12 }, { name: "TYPE_UINT32", number: 13 }, { name: "TYPE_ENUM", number: 14 }, { name: "TYPE_SFIXED32", number: 15 }, { name: "TYPE_SFIXED64", number: 16 }, { name: "TYPE_SINT32", number: 17 }, { name: "TYPE_SINT64", number: 18 }] }, { name: "Label", value: [{ name: "LABEL_OPTIONAL", number: 1 }, { name: "LABEL_REPEATED", number: 3 }, { name: "LABEL_REQUIRED", number: 2 }] }] }, { name: "OneofDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "options", number: 2, type: 11, label: 1, typeName: ".google.protobuf.OneofOptions" }] }, { name: "EnumDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "value", number: 2, type: 11, label: 3, typeName: ".google.protobuf.EnumValueDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumOptions" }, { name: "reserved_range", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto.EnumReservedRange" }, { name: "reserved_name", number: 5, type: 9, label: 3 }, { name: "visibility", number: 6, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "EnumReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "EnumValueDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumValueOptions" }] }, { name: "ServiceDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "method", number: 2, type: 11, label: 3, typeName: ".google.protobuf.MethodDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ServiceOptions" }] }, { name: "MethodDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "input_type", number: 2, type: 9, label: 1 }, { name: "output_type", number: 3, type: 9, label: 1 }, { name: "options", number: 4, type: 11, label: 1, typeName: ".google.protobuf.MethodOptions" }, { name: "client_streaming", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "server_streaming", number: 6, type: 8, label: 1, defaultValue: "false" }] }, { name: "FileOptions", field: [{ name: "java_package", number: 1, type: 9, label: 1 }, { name: "java_outer_classname", number: 8, type: 9, label: 1 }, { name: "java_multiple_files", number: 10, type: 8, label: 1, defaultValue: "false", options: {} }, { name: "java_generate_equals_and_hash", number: 20, type: 8, label: 1, options: { deprecated: !0 } }, { name: "java_string_check_utf8", number: 27, type: 8, label: 1, defaultValue: "false" }, { name: "optimize_for", number: 9, type: 14, label: 1, typeName: ".google.protobuf.FileOptions.OptimizeMode", defaultValue: "SPEED" }, { name: "go_package", number: 11, type: 9, label: 1 }, { name: "cc_generic_services", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "java_generic_services", number: 17, type: 8, label: 1, defaultValue: "false" }, { name: "py_generic_services", number: 18, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 23, type: 8, label: 1, defaultValue: "false" }, { name: "cc_enable_arenas", number: 31, type: 8, label: 1, defaultValue: "true" }, { name: "objc_class_prefix", number: 36, type: 9, label: 1 }, { name: "csharp_namespace", number: 37, type: 9, label: 1 }, { name: "swift_prefix", number: 39, type: 9, label: 1 }, { name: "php_class_prefix", number: 40, type: 9, label: 1 }, { name: "php_namespace", number: 41, type: 9, label: 1 }, { name: "php_metadata_namespace", number: 44, type: 9, label: 1 }, { name: "ruby_package", number: 45, type: 9, label: 1 }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "OptimizeMode", value: [{ name: "SPEED", number: 1 }, { name: "CODE_SIZE", number: 2 }, { name: "LITE_RUNTIME", number: 3 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MessageOptions", field: [{ name: "message_set_wire_format", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "no_standard_descriptor_accessor", number: 2, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "map_entry", number: 7, type: 8, label: 1 }, { name: "deprecated_legacy_json_field_conflicts", number: 11, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 12, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldOptions", field: [{ name: "ctype", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.CType", defaultValue: "STRING" }, { name: "packed", number: 2, type: 8, label: 1 }, { name: "jstype", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.JSType", defaultValue: "JS_NORMAL" }, { name: "lazy", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "unverified_lazy", number: 15, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "weak", number: 10, type: 8, label: 1, defaultValue: "false", options: { deprecated: !0 } }, { name: "debug_redact", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "retention", number: 17, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.OptionRetention" }, { name: "targets", number: 19, type: 14, label: 3, typeName: ".google.protobuf.FieldOptions.OptionTargetType" }, { name: "edition_defaults", number: 20, type: 11, label: 3, typeName: ".google.protobuf.FieldOptions.EditionDefault" }, { name: "features", number: 21, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "feature_support", number: 22, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], nestedType: [{ name: "EditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "value", number: 2, type: 9, label: 1 }] }, { name: "FeatureSupport", field: [{ name: "edition_introduced", number: 1, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "edition_deprecated", number: 2, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "deprecation_warning", number: 3, type: 9, label: 1 }, { name: "edition_removed", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "removal_error", number: 5, type: 9, label: 1 }] }], enumType: [{ name: "CType", value: [{ name: "STRING", number: 0 }, { name: "CORD", number: 1 }, { name: "STRING_PIECE", number: 2 }] }, { name: "JSType", value: [{ name: "JS_NORMAL", number: 0 }, { name: "JS_STRING", number: 1 }, { name: "JS_NUMBER", number: 2 }] }, { name: "OptionRetention", value: [{ name: "RETENTION_UNKNOWN", number: 0 }, { name: "RETENTION_RUNTIME", number: 1 }, { name: "RETENTION_SOURCE", number: 2 }] }, { name: "OptionTargetType", value: [{ name: "TARGET_TYPE_UNKNOWN", number: 0 }, { name: "TARGET_TYPE_FILE", number: 1 }, { name: "TARGET_TYPE_EXTENSION_RANGE", number: 2 }, { name: "TARGET_TYPE_MESSAGE", number: 3 }, { name: "TARGET_TYPE_FIELD", number: 4 }, { name: "TARGET_TYPE_ONEOF", number: 5 }, { name: "TARGET_TYPE_ENUM", number: 6 }, { name: "TARGET_TYPE_ENUM_ENTRY", number: 7 }, { name: "TARGET_TYPE_SERVICE", number: 8 }, { name: "TARGET_TYPE_METHOD", number: 9 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "OneofOptions", field: [{ name: "features", number: 1, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumOptions", field: [{ name: "allow_alias", number: 2, type: 8, label: 1 }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated_legacy_json_field_conflicts", number: 6, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 7, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumValueOptions", field: [{ name: "deprecated", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "features", number: 2, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "debug_redact", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "feature_support", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "ServiceOptions", field: [{ name: "features", number: 34, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MethodOptions", field: [{ name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "idempotency_level", number: 34, type: 14, label: 1, typeName: ".google.protobuf.MethodOptions.IdempotencyLevel", defaultValue: "IDEMPOTENCY_UNKNOWN" }, { name: "features", number: 35, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "IdempotencyLevel", value: [{ name: "IDEMPOTENCY_UNKNOWN", number: 0 }, { name: "NO_SIDE_EFFECTS", number: 1 }, { name: "IDEMPOTENT", number: 2 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "UninterpretedOption", field: [{ name: "name", number: 2, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption.NamePart" }, { name: "identifier_value", number: 3, type: 9, label: 1 }, { name: "positive_int_value", number: 4, type: 4, label: 1 }, { name: "negative_int_value", number: 5, type: 3, label: 1 }, { name: "double_value", number: 6, type: 1, label: 1 }, { name: "string_value", number: 7, type: 12, label: 1 }, { name: "aggregate_value", number: 8, type: 9, label: 1 }], nestedType: [{ name: "NamePart", field: [{ name: "name_part", number: 1, type: 9, label: 2 }, { name: "is_extension", number: 2, type: 8, label: 2 }] }] }, { name: "FeatureSet", field: [{ name: "field_presence", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.FieldPresence", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPLICIT", edition: 900 }, { value: "IMPLICIT", edition: 999 }, { value: "EXPLICIT", edition: 1e3 }] } }, { name: "enum_type", number: 2, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnumType", options: { retention: 1, targets: [6, 1], editionDefaults: [{ value: "CLOSED", edition: 900 }, { value: "OPEN", edition: 999 }] } }, { name: "repeated_field_encoding", number: 3, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.RepeatedFieldEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPANDED", edition: 900 }, { value: "PACKED", edition: 999 }] } }, { name: "utf8_validation", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.Utf8Validation", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "NONE", edition: 900 }, { value: "VERIFY", edition: 999 }] } }, { name: "message_encoding", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.MessageEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "LENGTH_PREFIXED", edition: 900 }] } }, { name: "json_format", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.JsonFormat", options: { retention: 1, targets: [3, 6, 1], editionDefaults: [{ value: "LEGACY_BEST_EFFORT", edition: 900 }, { value: "ALLOW", edition: 999 }] } }, { name: "enforce_naming_style", number: 7, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnforceNamingStyle", options: { retention: 2, targets: [1, 2, 3, 4, 5, 6, 7, 8, 9], editionDefaults: [{ value: "STYLE_LEGACY", edition: 900 }, { value: "STYLE2024", edition: 1001 }] } }, { name: "default_symbol_visibility", number: 8, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility", options: { retention: 2, targets: [1], editionDefaults: [{ value: "EXPORT_ALL", edition: 900 }, { value: "EXPORT_TOP_LEVEL", edition: 1001 }] } }], nestedType: [{ name: "VisibilityFeature", enumType: [{ name: "DefaultSymbolVisibility", value: [{ name: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", number: 0 }, { name: "EXPORT_ALL", number: 1 }, { name: "EXPORT_TOP_LEVEL", number: 2 }, { name: "LOCAL_ALL", number: 3 }, { name: "STRICT", number: 4 }] }] }], enumType: [{ name: "FieldPresence", value: [{ name: "FIELD_PRESENCE_UNKNOWN", number: 0 }, { name: "EXPLICIT", number: 1 }, { name: "IMPLICIT", number: 2 }, { name: "LEGACY_REQUIRED", number: 3 }] }, { name: "EnumType", value: [{ name: "ENUM_TYPE_UNKNOWN", number: 0 }, { name: "OPEN", number: 1 }, { name: "CLOSED", number: 2 }] }, { name: "RepeatedFieldEncoding", value: [{ name: "REPEATED_FIELD_ENCODING_UNKNOWN", number: 0 }, { name: "PACKED", number: 1 }, { name: "EXPANDED", number: 2 }] }, { name: "Utf8Validation", value: [{ name: "UTF8_VALIDATION_UNKNOWN", number: 0 }, { name: "VERIFY", number: 2 }, { name: "NONE", number: 3 }] }, { name: "MessageEncoding", value: [{ name: "MESSAGE_ENCODING_UNKNOWN", number: 0 }, { name: "LENGTH_PREFIXED", number: 1 }, { name: "DELIMITED", number: 2 }] }, { name: "JsonFormat", value: [{ name: "JSON_FORMAT_UNKNOWN", number: 0 }, { name: "ALLOW", number: 1 }, { name: "LEGACY_BEST_EFFORT", number: 2 }] }, { name: "EnforceNamingStyle", value: [{ name: "ENFORCE_NAMING_STYLE_UNKNOWN", number: 0 }, { name: "STYLE2024", number: 1 }, { name: "STYLE_LEGACY", number: 2 }] }], extensionRange: [{ start: 1e3, end: 9995 }, { start: 9995, end: 1e4 }, { start: 1e4, end: 10001 }] }, { name: "FeatureSetDefaults", field: [{ name: "defaults", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" }, { name: "minimum_edition", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "maximum_edition", number: 5, type: 14, label: 1, typeName: ".google.protobuf.Edition" }], nestedType: [{ name: "FeatureSetEditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "overridable_features", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "fixed_features", number: 5, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }] }] }, { name: "SourceCodeInfo", field: [{ name: "location", number: 1, type: 11, label: 3, typeName: ".google.protobuf.SourceCodeInfo.Location" }], nestedType: [{ name: "Location", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "span", number: 2, type: 5, label: 3, options: { packed: !0 } }, { name: "leading_comments", number: 3, type: 9, label: 1 }, { name: "trailing_comments", number: 4, type: 9, label: 1 }, { name: "leading_detached_comments", number: 6, type: 9, label: 3 }] }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "GeneratedCodeInfo", field: [{ name: "annotation", number: 1, type: 11, label: 3, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation" }], nestedType: [{ name: "Annotation", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "source_file", number: 2, type: 9, label: 1 }, { name: "begin", number: 3, type: 5, label: 1 }, { name: "end", number: 4, type: 5, label: 1 }, { name: "semantic", number: 5, type: 14, label: 1, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation.Semantic" }], enumType: [{ name: "Semantic", value: [{ name: "NONE", number: 0 }, { name: "SET", number: 1 }, { name: "ALIAS", number: 2 }] }] }] }], enumType: [{ name: "Edition", value: [{ name: "EDITION_UNKNOWN", number: 0 }, { name: "EDITION_LEGACY", number: 900 }, { name: "EDITION_PROTO2", number: 998 }, { name: "EDITION_PROTO3", number: 999 }, { name: "EDITION_2023", number: 1e3 }, { name: "EDITION_2024", number: 1001 }, { name: "EDITION_UNSTABLE", number: 9999 }, { name: "EDITION_1_TEST_ONLY", number: 1 }, { name: "EDITION_2_TEST_ONLY", number: 2 }, { name: "EDITION_99997_TEST_ONLY", number: 99997 }, { name: "EDITION_99998_TEST_ONLY", number: 99998 }, { name: "EDITION_99999_TEST_ONLY", number: 99999 }, { name: "EDITION_MAX", number: 2147483647 }] }, { name: "SymbolVisibility", value: [{ name: "VISIBILITY_UNSET", number: 0 }, { name: "VISIBILITY_LOCAL", number: 1 }, { name: "VISIBILITY_EXPORT", number: 2 }] }] }), Rr = /* @__PURE__ */ R(Ar, 1);
|
|
2732
|
-
var At;
|
|
2733
|
-
(function(e) {
|
|
2734
|
-
e[e.DECLARATION = 0] = "DECLARATION", e[e.UNVERIFIED = 1] = "UNVERIFIED";
|
|
2735
|
-
})(At || (At = {}));
|
|
2731
|
+
const Vr = /* @__PURE__ */ Lr({ name: "google/protobuf/descriptor.proto", package: "google.protobuf", messageType: [{ name: "FileDescriptorSet", field: [{ name: "file", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FileDescriptorProto" }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "FileDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "package", number: 2, type: 9, label: 1 }, { name: "dependency", number: 3, type: 9, label: 3 }, { name: "public_dependency", number: 10, type: 5, label: 3 }, { name: "weak_dependency", number: 11, type: 5, label: 3 }, { name: "option_dependency", number: 15, type: 9, label: 3 }, { name: "message_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 5, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "service", number: 6, type: 11, label: 3, typeName: ".google.protobuf.ServiceDescriptorProto" }, { name: "extension", number: 7, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FileOptions" }, { name: "source_code_info", number: 9, type: 11, label: 1, typeName: ".google.protobuf.SourceCodeInfo" }, { name: "syntax", number: 12, type: 9, label: 1 }, { name: "edition", number: 14, type: 14, label: 1, typeName: ".google.protobuf.Edition" }] }, { name: "DescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "field", number: 2, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "extension", number: 6, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "nested_type", number: 3, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "extension_range", number: 5, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ExtensionRange" }, { name: "oneof_decl", number: 8, type: 11, label: 3, typeName: ".google.protobuf.OneofDescriptorProto" }, { name: "options", number: 7, type: 11, label: 1, typeName: ".google.protobuf.MessageOptions" }, { name: "reserved_range", number: 9, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ReservedRange" }, { name: "reserved_name", number: 10, type: 9, label: 3 }, { name: "visibility", number: 11, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "ExtensionRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions" }] }, { name: "ReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "ExtensionRangeOptions", field: [{ name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }, { name: "declaration", number: 2, type: 11, label: 3, typeName: ".google.protobuf.ExtensionRangeOptions.Declaration", options: { retention: 2 } }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "verification", number: 3, type: 14, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions.VerificationState", defaultValue: "UNVERIFIED", options: { retention: 2 } }], nestedType: [{ name: "Declaration", field: [{ name: "number", number: 1, type: 5, label: 1 }, { name: "full_name", number: 2, type: 9, label: 1 }, { name: "type", number: 3, type: 9, label: 1 }, { name: "reserved", number: 5, type: 8, label: 1 }, { name: "repeated", number: 6, type: 8, label: 1 }] }], enumType: [{ name: "VerificationState", value: [{ name: "DECLARATION", number: 0 }, { name: "UNVERIFIED", number: 1 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 3, type: 5, label: 1 }, { name: "label", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Label" }, { name: "type", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Type" }, { name: "type_name", number: 6, type: 9, label: 1 }, { name: "extendee", number: 2, type: 9, label: 1 }, { name: "default_value", number: 7, type: 9, label: 1 }, { name: "oneof_index", number: 9, type: 5, label: 1 }, { name: "json_name", number: 10, type: 9, label: 1 }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions" }, { name: "proto3_optional", number: 17, type: 8, label: 1 }], enumType: [{ name: "Type", value: [{ name: "TYPE_DOUBLE", number: 1 }, { name: "TYPE_FLOAT", number: 2 }, { name: "TYPE_INT64", number: 3 }, { name: "TYPE_UINT64", number: 4 }, { name: "TYPE_INT32", number: 5 }, { name: "TYPE_FIXED64", number: 6 }, { name: "TYPE_FIXED32", number: 7 }, { name: "TYPE_BOOL", number: 8 }, { name: "TYPE_STRING", number: 9 }, { name: "TYPE_GROUP", number: 10 }, { name: "TYPE_MESSAGE", number: 11 }, { name: "TYPE_BYTES", number: 12 }, { name: "TYPE_UINT32", number: 13 }, { name: "TYPE_ENUM", number: 14 }, { name: "TYPE_SFIXED32", number: 15 }, { name: "TYPE_SFIXED64", number: 16 }, { name: "TYPE_SINT32", number: 17 }, { name: "TYPE_SINT64", number: 18 }] }, { name: "Label", value: [{ name: "LABEL_OPTIONAL", number: 1 }, { name: "LABEL_REPEATED", number: 3 }, { name: "LABEL_REQUIRED", number: 2 }] }] }, { name: "OneofDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "options", number: 2, type: 11, label: 1, typeName: ".google.protobuf.OneofOptions" }] }, { name: "EnumDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "value", number: 2, type: 11, label: 3, typeName: ".google.protobuf.EnumValueDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumOptions" }, { name: "reserved_range", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto.EnumReservedRange" }, { name: "reserved_name", number: 5, type: 9, label: 3 }, { name: "visibility", number: 6, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "EnumReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "EnumValueDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumValueOptions" }] }, { name: "ServiceDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "method", number: 2, type: 11, label: 3, typeName: ".google.protobuf.MethodDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ServiceOptions" }] }, { name: "MethodDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "input_type", number: 2, type: 9, label: 1 }, { name: "output_type", number: 3, type: 9, label: 1 }, { name: "options", number: 4, type: 11, label: 1, typeName: ".google.protobuf.MethodOptions" }, { name: "client_streaming", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "server_streaming", number: 6, type: 8, label: 1, defaultValue: "false" }] }, { name: "FileOptions", field: [{ name: "java_package", number: 1, type: 9, label: 1 }, { name: "java_outer_classname", number: 8, type: 9, label: 1 }, { name: "java_multiple_files", number: 10, type: 8, label: 1, defaultValue: "false", options: {} }, { name: "java_generate_equals_and_hash", number: 20, type: 8, label: 1, options: { deprecated: !0 } }, { name: "java_string_check_utf8", number: 27, type: 8, label: 1, defaultValue: "false" }, { name: "optimize_for", number: 9, type: 14, label: 1, typeName: ".google.protobuf.FileOptions.OptimizeMode", defaultValue: "SPEED" }, { name: "go_package", number: 11, type: 9, label: 1 }, { name: "cc_generic_services", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "java_generic_services", number: 17, type: 8, label: 1, defaultValue: "false" }, { name: "py_generic_services", number: 18, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 23, type: 8, label: 1, defaultValue: "false" }, { name: "cc_enable_arenas", number: 31, type: 8, label: 1, defaultValue: "true" }, { name: "objc_class_prefix", number: 36, type: 9, label: 1 }, { name: "csharp_namespace", number: 37, type: 9, label: 1 }, { name: "swift_prefix", number: 39, type: 9, label: 1 }, { name: "php_class_prefix", number: 40, type: 9, label: 1 }, { name: "php_namespace", number: 41, type: 9, label: 1 }, { name: "php_metadata_namespace", number: 44, type: 9, label: 1 }, { name: "ruby_package", number: 45, type: 9, label: 1 }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "OptimizeMode", value: [{ name: "SPEED", number: 1 }, { name: "CODE_SIZE", number: 2 }, { name: "LITE_RUNTIME", number: 3 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MessageOptions", field: [{ name: "message_set_wire_format", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "no_standard_descriptor_accessor", number: 2, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "map_entry", number: 7, type: 8, label: 1 }, { name: "deprecated_legacy_json_field_conflicts", number: 11, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 12, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldOptions", field: [{ name: "ctype", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.CType", defaultValue: "STRING" }, { name: "packed", number: 2, type: 8, label: 1 }, { name: "jstype", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.JSType", defaultValue: "JS_NORMAL" }, { name: "lazy", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "unverified_lazy", number: 15, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "weak", number: 10, type: 8, label: 1, defaultValue: "false", options: { deprecated: !0 } }, { name: "debug_redact", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "retention", number: 17, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.OptionRetention" }, { name: "targets", number: 19, type: 14, label: 3, typeName: ".google.protobuf.FieldOptions.OptionTargetType" }, { name: "edition_defaults", number: 20, type: 11, label: 3, typeName: ".google.protobuf.FieldOptions.EditionDefault" }, { name: "features", number: 21, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "feature_support", number: 22, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], nestedType: [{ name: "EditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "value", number: 2, type: 9, label: 1 }] }, { name: "FeatureSupport", field: [{ name: "edition_introduced", number: 1, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "edition_deprecated", number: 2, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "deprecation_warning", number: 3, type: 9, label: 1 }, { name: "edition_removed", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "removal_error", number: 5, type: 9, label: 1 }] }], enumType: [{ name: "CType", value: [{ name: "STRING", number: 0 }, { name: "CORD", number: 1 }, { name: "STRING_PIECE", number: 2 }] }, { name: "JSType", value: [{ name: "JS_NORMAL", number: 0 }, { name: "JS_STRING", number: 1 }, { name: "JS_NUMBER", number: 2 }] }, { name: "OptionRetention", value: [{ name: "RETENTION_UNKNOWN", number: 0 }, { name: "RETENTION_RUNTIME", number: 1 }, { name: "RETENTION_SOURCE", number: 2 }] }, { name: "OptionTargetType", value: [{ name: "TARGET_TYPE_UNKNOWN", number: 0 }, { name: "TARGET_TYPE_FILE", number: 1 }, { name: "TARGET_TYPE_EXTENSION_RANGE", number: 2 }, { name: "TARGET_TYPE_MESSAGE", number: 3 }, { name: "TARGET_TYPE_FIELD", number: 4 }, { name: "TARGET_TYPE_ONEOF", number: 5 }, { name: "TARGET_TYPE_ENUM", number: 6 }, { name: "TARGET_TYPE_ENUM_ENTRY", number: 7 }, { name: "TARGET_TYPE_SERVICE", number: 8 }, { name: "TARGET_TYPE_METHOD", number: 9 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "OneofOptions", field: [{ name: "features", number: 1, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumOptions", field: [{ name: "allow_alias", number: 2, type: 8, label: 1 }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated_legacy_json_field_conflicts", number: 6, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 7, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumValueOptions", field: [{ name: "deprecated", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "features", number: 2, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "debug_redact", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "feature_support", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "ServiceOptions", field: [{ name: "features", number: 34, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MethodOptions", field: [{ name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "idempotency_level", number: 34, type: 14, label: 1, typeName: ".google.protobuf.MethodOptions.IdempotencyLevel", defaultValue: "IDEMPOTENCY_UNKNOWN" }, { name: "features", number: 35, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "IdempotencyLevel", value: [{ name: "IDEMPOTENCY_UNKNOWN", number: 0 }, { name: "NO_SIDE_EFFECTS", number: 1 }, { name: "IDEMPOTENT", number: 2 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "UninterpretedOption", field: [{ name: "name", number: 2, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption.NamePart" }, { name: "identifier_value", number: 3, type: 9, label: 1 }, { name: "positive_int_value", number: 4, type: 4, label: 1 }, { name: "negative_int_value", number: 5, type: 3, label: 1 }, { name: "double_value", number: 6, type: 1, label: 1 }, { name: "string_value", number: 7, type: 12, label: 1 }, { name: "aggregate_value", number: 8, type: 9, label: 1 }], nestedType: [{ name: "NamePart", field: [{ name: "name_part", number: 1, type: 9, label: 2 }, { name: "is_extension", number: 2, type: 8, label: 2 }] }] }, { name: "FeatureSet", field: [{ name: "field_presence", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.FieldPresence", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPLICIT", edition: 900 }, { value: "IMPLICIT", edition: 999 }, { value: "EXPLICIT", edition: 1e3 }] } }, { name: "enum_type", number: 2, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnumType", options: { retention: 1, targets: [6, 1], editionDefaults: [{ value: "CLOSED", edition: 900 }, { value: "OPEN", edition: 999 }] } }, { name: "repeated_field_encoding", number: 3, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.RepeatedFieldEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPANDED", edition: 900 }, { value: "PACKED", edition: 999 }] } }, { name: "utf8_validation", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.Utf8Validation", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "NONE", edition: 900 }, { value: "VERIFY", edition: 999 }] } }, { name: "message_encoding", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.MessageEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "LENGTH_PREFIXED", edition: 900 }] } }, { name: "json_format", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.JsonFormat", options: { retention: 1, targets: [3, 6, 1], editionDefaults: [{ value: "LEGACY_BEST_EFFORT", edition: 900 }, { value: "ALLOW", edition: 999 }] } }, { name: "enforce_naming_style", number: 7, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnforceNamingStyle", options: { retention: 2, targets: [1, 2, 3, 4, 5, 6, 7, 8, 9], editionDefaults: [{ value: "STYLE_LEGACY", edition: 900 }, { value: "STYLE2024", edition: 1001 }] } }, { name: "default_symbol_visibility", number: 8, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility", options: { retention: 2, targets: [1], editionDefaults: [{ value: "EXPORT_ALL", edition: 900 }, { value: "EXPORT_TOP_LEVEL", edition: 1001 }] } }], nestedType: [{ name: "VisibilityFeature", enumType: [{ name: "DefaultSymbolVisibility", value: [{ name: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", number: 0 }, { name: "EXPORT_ALL", number: 1 }, { name: "EXPORT_TOP_LEVEL", number: 2 }, { name: "LOCAL_ALL", number: 3 }, { name: "STRICT", number: 4 }] }] }], enumType: [{ name: "FieldPresence", value: [{ name: "FIELD_PRESENCE_UNKNOWN", number: 0 }, { name: "EXPLICIT", number: 1 }, { name: "IMPLICIT", number: 2 }, { name: "LEGACY_REQUIRED", number: 3 }] }, { name: "EnumType", value: [{ name: "ENUM_TYPE_UNKNOWN", number: 0 }, { name: "OPEN", number: 1 }, { name: "CLOSED", number: 2 }] }, { name: "RepeatedFieldEncoding", value: [{ name: "REPEATED_FIELD_ENCODING_UNKNOWN", number: 0 }, { name: "PACKED", number: 1 }, { name: "EXPANDED", number: 2 }] }, { name: "Utf8Validation", value: [{ name: "UTF8_VALIDATION_UNKNOWN", number: 0 }, { name: "VERIFY", number: 2 }, { name: "NONE", number: 3 }] }, { name: "MessageEncoding", value: [{ name: "MESSAGE_ENCODING_UNKNOWN", number: 0 }, { name: "LENGTH_PREFIXED", number: 1 }, { name: "DELIMITED", number: 2 }] }, { name: "JsonFormat", value: [{ name: "JSON_FORMAT_UNKNOWN", number: 0 }, { name: "ALLOW", number: 1 }, { name: "LEGACY_BEST_EFFORT", number: 2 }] }, { name: "EnforceNamingStyle", value: [{ name: "ENFORCE_NAMING_STYLE_UNKNOWN", number: 0 }, { name: "STYLE2024", number: 1 }, { name: "STYLE_LEGACY", number: 2 }] }], extensionRange: [{ start: 1e3, end: 9995 }, { start: 9995, end: 1e4 }, { start: 1e4, end: 10001 }] }, { name: "FeatureSetDefaults", field: [{ name: "defaults", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" }, { name: "minimum_edition", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "maximum_edition", number: 5, type: 14, label: 1, typeName: ".google.protobuf.Edition" }], nestedType: [{ name: "FeatureSetEditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "overridable_features", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "fixed_features", number: 5, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }] }] }, { name: "SourceCodeInfo", field: [{ name: "location", number: 1, type: 11, label: 3, typeName: ".google.protobuf.SourceCodeInfo.Location" }], nestedType: [{ name: "Location", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "span", number: 2, type: 5, label: 3, options: { packed: !0 } }, { name: "leading_comments", number: 3, type: 9, label: 1 }, { name: "trailing_comments", number: 4, type: 9, label: 1 }, { name: "leading_detached_comments", number: 6, type: 9, label: 3 }] }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "GeneratedCodeInfo", field: [{ name: "annotation", number: 1, type: 11, label: 3, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation" }], nestedType: [{ name: "Annotation", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "source_file", number: 2, type: 9, label: 1 }, { name: "begin", number: 3, type: 5, label: 1 }, { name: "end", number: 4, type: 5, label: 1 }, { name: "semantic", number: 5, type: 14, label: 1, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation.Semantic" }], enumType: [{ name: "Semantic", value: [{ name: "NONE", number: 0 }, { name: "SET", number: 1 }, { name: "ALIAS", number: 2 }] }] }] }], enumType: [{ name: "Edition", value: [{ name: "EDITION_UNKNOWN", number: 0 }, { name: "EDITION_LEGACY", number: 900 }, { name: "EDITION_PROTO2", number: 998 }, { name: "EDITION_PROTO3", number: 999 }, { name: "EDITION_2023", number: 1e3 }, { name: "EDITION_2024", number: 1001 }, { name: "EDITION_UNSTABLE", number: 9999 }, { name: "EDITION_1_TEST_ONLY", number: 1 }, { name: "EDITION_2_TEST_ONLY", number: 2 }, { name: "EDITION_99997_TEST_ONLY", number: 99997 }, { name: "EDITION_99998_TEST_ONLY", number: 99998 }, { name: "EDITION_99999_TEST_ONLY", number: 99999 }, { name: "EDITION_MAX", number: 2147483647 }] }, { name: "SymbolVisibility", value: [{ name: "VISIBILITY_UNSET", number: 0 }, { name: "VISIBILITY_LOCAL", number: 1 }, { name: "VISIBILITY_EXPORT", number: 2 }] }] }), Fr = /* @__PURE__ */ v(Vr, 1);
|
|
2736
2732
|
var Rt;
|
|
2737
2733
|
(function(e) {
|
|
2738
|
-
e[e.
|
|
2734
|
+
e[e.DECLARATION = 0] = "DECLARATION", e[e.UNVERIFIED = 1] = "UNVERIFIED";
|
|
2739
2735
|
})(Rt || (Rt = {}));
|
|
2740
2736
|
var _t;
|
|
2741
2737
|
(function(e) {
|
|
2742
|
-
e[e.
|
|
2738
|
+
e[e.DOUBLE = 1] = "DOUBLE", e[e.FLOAT = 2] = "FLOAT", e[e.INT64 = 3] = "INT64", e[e.UINT64 = 4] = "UINT64", e[e.INT32 = 5] = "INT32", e[e.FIXED64 = 6] = "FIXED64", e[e.FIXED32 = 7] = "FIXED32", e[e.BOOL = 8] = "BOOL", e[e.STRING = 9] = "STRING", e[e.GROUP = 10] = "GROUP", e[e.MESSAGE = 11] = "MESSAGE", e[e.BYTES = 12] = "BYTES", e[e.UINT32 = 13] = "UINT32", e[e.ENUM = 14] = "ENUM", e[e.SFIXED32 = 15] = "SFIXED32", e[e.SFIXED64 = 16] = "SFIXED64", e[e.SINT32 = 17] = "SINT32", e[e.SINT64 = 18] = "SINT64";
|
|
2743
2739
|
})(_t || (_t = {}));
|
|
2744
|
-
var vt;
|
|
2745
|
-
(function(e) {
|
|
2746
|
-
e[e.SPEED = 1] = "SPEED", e[e.CODE_SIZE = 2] = "CODE_SIZE", e[e.LITE_RUNTIME = 3] = "LITE_RUNTIME";
|
|
2747
|
-
})(vt || (vt = {}));
|
|
2748
2740
|
var Ot;
|
|
2749
2741
|
(function(e) {
|
|
2750
|
-
e[e.
|
|
2742
|
+
e[e.OPTIONAL = 1] = "OPTIONAL", e[e.REPEATED = 3] = "REPEATED", e[e.REQUIRED = 2] = "REQUIRED";
|
|
2751
2743
|
})(Ot || (Ot = {}));
|
|
2752
2744
|
var Ct;
|
|
2753
2745
|
(function(e) {
|
|
2754
|
-
e[e.
|
|
2746
|
+
e[e.SPEED = 1] = "SPEED", e[e.CODE_SIZE = 2] = "CODE_SIZE", e[e.LITE_RUNTIME = 3] = "LITE_RUNTIME";
|
|
2755
2747
|
})(Ct || (Ct = {}));
|
|
2756
2748
|
var Dt;
|
|
2757
2749
|
(function(e) {
|
|
2758
|
-
e[e.
|
|
2750
|
+
e[e.STRING = 0] = "STRING", e[e.CORD = 1] = "CORD", e[e.STRING_PIECE = 2] = "STRING_PIECE";
|
|
2759
2751
|
})(Dt || (Dt = {}));
|
|
2760
2752
|
var Ut;
|
|
2761
2753
|
(function(e) {
|
|
2762
|
-
e[e.
|
|
2754
|
+
e[e.JS_NORMAL = 0] = "JS_NORMAL", e[e.JS_STRING = 1] = "JS_STRING", e[e.JS_NUMBER = 2] = "JS_NUMBER";
|
|
2763
2755
|
})(Ut || (Ut = {}));
|
|
2764
2756
|
var Lt;
|
|
2765
2757
|
(function(e) {
|
|
2766
|
-
e[e.
|
|
2758
|
+
e[e.RETENTION_UNKNOWN = 0] = "RETENTION_UNKNOWN", e[e.RETENTION_RUNTIME = 1] = "RETENTION_RUNTIME", e[e.RETENTION_SOURCE = 2] = "RETENTION_SOURCE";
|
|
2767
2759
|
})(Lt || (Lt = {}));
|
|
2768
2760
|
var Mt;
|
|
2769
2761
|
(function(e) {
|
|
2770
|
-
e[e.
|
|
2762
|
+
e[e.TARGET_TYPE_UNKNOWN = 0] = "TARGET_TYPE_UNKNOWN", e[e.TARGET_TYPE_FILE = 1] = "TARGET_TYPE_FILE", e[e.TARGET_TYPE_EXTENSION_RANGE = 2] = "TARGET_TYPE_EXTENSION_RANGE", e[e.TARGET_TYPE_MESSAGE = 3] = "TARGET_TYPE_MESSAGE", e[e.TARGET_TYPE_FIELD = 4] = "TARGET_TYPE_FIELD", e[e.TARGET_TYPE_ONEOF = 5] = "TARGET_TYPE_ONEOF", e[e.TARGET_TYPE_ENUM = 6] = "TARGET_TYPE_ENUM", e[e.TARGET_TYPE_ENUM_ENTRY = 7] = "TARGET_TYPE_ENUM_ENTRY", e[e.TARGET_TYPE_SERVICE = 8] = "TARGET_TYPE_SERVICE", e[e.TARGET_TYPE_METHOD = 9] = "TARGET_TYPE_METHOD";
|
|
2771
2763
|
})(Mt || (Mt = {}));
|
|
2772
2764
|
var xt;
|
|
2773
2765
|
(function(e) {
|
|
2774
|
-
e[e.
|
|
2766
|
+
e[e.IDEMPOTENCY_UNKNOWN = 0] = "IDEMPOTENCY_UNKNOWN", e[e.NO_SIDE_EFFECTS = 1] = "NO_SIDE_EFFECTS", e[e.IDEMPOTENT = 2] = "IDEMPOTENT";
|
|
2775
2767
|
})(xt || (xt = {}));
|
|
2776
2768
|
var Pt;
|
|
2777
2769
|
(function(e) {
|
|
2778
|
-
e[e.
|
|
2770
|
+
e[e.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", e[e.EXPORT_ALL = 1] = "EXPORT_ALL", e[e.EXPORT_TOP_LEVEL = 2] = "EXPORT_TOP_LEVEL", e[e.LOCAL_ALL = 3] = "LOCAL_ALL", e[e.STRICT = 4] = "STRICT";
|
|
2779
2771
|
})(Pt || (Pt = {}));
|
|
2780
2772
|
var Vt;
|
|
2781
2773
|
(function(e) {
|
|
2782
|
-
e[e.
|
|
2774
|
+
e[e.FIELD_PRESENCE_UNKNOWN = 0] = "FIELD_PRESENCE_UNKNOWN", e[e.EXPLICIT = 1] = "EXPLICIT", e[e.IMPLICIT = 2] = "IMPLICIT", e[e.LEGACY_REQUIRED = 3] = "LEGACY_REQUIRED";
|
|
2783
2775
|
})(Vt || (Vt = {}));
|
|
2784
2776
|
var Ft;
|
|
2785
2777
|
(function(e) {
|
|
2786
|
-
e[e.
|
|
2778
|
+
e[e.ENUM_TYPE_UNKNOWN = 0] = "ENUM_TYPE_UNKNOWN", e[e.OPEN = 1] = "OPEN", e[e.CLOSED = 2] = "CLOSED";
|
|
2787
2779
|
})(Ft || (Ft = {}));
|
|
2788
2780
|
var Gt;
|
|
2789
2781
|
(function(e) {
|
|
2790
|
-
e[e.
|
|
2782
|
+
e[e.REPEATED_FIELD_ENCODING_UNKNOWN = 0] = "REPEATED_FIELD_ENCODING_UNKNOWN", e[e.PACKED = 1] = "PACKED", e[e.EXPANDED = 2] = "EXPANDED";
|
|
2791
2783
|
})(Gt || (Gt = {}));
|
|
2792
2784
|
var Bt;
|
|
2793
2785
|
(function(e) {
|
|
2794
|
-
e[e.
|
|
2786
|
+
e[e.UTF8_VALIDATION_UNKNOWN = 0] = "UTF8_VALIDATION_UNKNOWN", e[e.VERIFY = 2] = "VERIFY", e[e.NONE = 3] = "NONE";
|
|
2795
2787
|
})(Bt || (Bt = {}));
|
|
2796
2788
|
var Yt;
|
|
2797
2789
|
(function(e) {
|
|
2798
|
-
e[e.
|
|
2790
|
+
e[e.MESSAGE_ENCODING_UNKNOWN = 0] = "MESSAGE_ENCODING_UNKNOWN", e[e.LENGTH_PREFIXED = 1] = "LENGTH_PREFIXED", e[e.DELIMITED = 2] = "DELIMITED";
|
|
2799
2791
|
})(Yt || (Yt = {}));
|
|
2800
2792
|
var $t;
|
|
2801
2793
|
(function(e) {
|
|
2802
|
-
e[e.
|
|
2794
|
+
e[e.JSON_FORMAT_UNKNOWN = 0] = "JSON_FORMAT_UNKNOWN", e[e.ALLOW = 1] = "ALLOW", e[e.LEGACY_BEST_EFFORT = 2] = "LEGACY_BEST_EFFORT";
|
|
2803
2795
|
})($t || ($t = {}));
|
|
2804
2796
|
var Xt;
|
|
2805
2797
|
(function(e) {
|
|
2806
|
-
e[e.
|
|
2798
|
+
e[e.ENFORCE_NAMING_STYLE_UNKNOWN = 0] = "ENFORCE_NAMING_STYLE_UNKNOWN", e[e.STYLE2024 = 1] = "STYLE2024", e[e.STYLE_LEGACY = 2] = "STYLE_LEGACY";
|
|
2807
2799
|
})(Xt || (Xt = {}));
|
|
2808
2800
|
var Kt;
|
|
2809
2801
|
(function(e) {
|
|
2810
|
-
e[e.
|
|
2802
|
+
e[e.NONE = 0] = "NONE", e[e.SET = 1] = "SET", e[e.ALIAS = 2] = "ALIAS";
|
|
2811
2803
|
})(Kt || (Kt = {}));
|
|
2812
|
-
|
|
2804
|
+
var jt;
|
|
2805
|
+
(function(e) {
|
|
2806
|
+
e[e.EDITION_UNKNOWN = 0] = "EDITION_UNKNOWN", e[e.EDITION_LEGACY = 900] = "EDITION_LEGACY", e[e.EDITION_PROTO2 = 998] = "EDITION_PROTO2", e[e.EDITION_PROTO3 = 999] = "EDITION_PROTO3", e[e.EDITION_2023 = 1e3] = "EDITION_2023", e[e.EDITION_2024 = 1001] = "EDITION_2024", e[e.EDITION_UNSTABLE = 9999] = "EDITION_UNSTABLE", e[e.EDITION_1_TEST_ONLY = 1] = "EDITION_1_TEST_ONLY", e[e.EDITION_2_TEST_ONLY = 2] = "EDITION_2_TEST_ONLY", e[e.EDITION_99997_TEST_ONLY = 99997] = "EDITION_99997_TEST_ONLY", e[e.EDITION_99998_TEST_ONLY = 99998] = "EDITION_99998_TEST_ONLY", e[e.EDITION_99999_TEST_ONLY = 99999] = "EDITION_99999_TEST_ONLY", e[e.EDITION_MAX = 2147483647] = "EDITION_MAX";
|
|
2807
|
+
})(jt || (jt = {}));
|
|
2808
|
+
var Wt;
|
|
2809
|
+
(function(e) {
|
|
2810
|
+
e[e.VISIBILITY_UNSET = 0] = "VISIBILITY_UNSET", e[e.VISIBILITY_LOCAL = 1] = "VISIBILITY_LOCAL", e[e.VISIBILITY_EXPORT = 2] = "VISIBILITY_EXPORT";
|
|
2811
|
+
})(Wt || (Wt = {}));
|
|
2812
|
+
function Gr(e) {
|
|
2813
2813
|
return Object.assign(Object.assign({ readUnknownFields: !0, recursionLimit: 100 }, e), { depth: 0 });
|
|
2814
2814
|
}
|
|
2815
|
-
function
|
|
2816
|
-
const s =
|
|
2817
|
-
return
|
|
2815
|
+
function me(e, t, n) {
|
|
2816
|
+
const s = Ee(e, void 0, !1);
|
|
2817
|
+
return jn(s, new Ks(t), Gr(n), !1, t.byteLength), s.message;
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function jn(e, t, n, s, r) {
|
|
2820
2820
|
var i;
|
|
2821
2821
|
if (++n.depth > n.recursionLimit)
|
|
2822
2822
|
throw new Error(`cannot decode ${e.desc} from binary: maximum recursion depth of ${n.recursionLimit} reached`);
|
|
@@ -2830,27 +2830,27 @@ function Bn(e, t, n, s, r) {
|
|
|
2830
2830
|
n.readUnknownFields && u.push({ no: o, wireType: l, data: p });
|
|
2831
2831
|
continue;
|
|
2832
2832
|
}
|
|
2833
|
-
|
|
2833
|
+
Br(e, t, d, l, n);
|
|
2834
2834
|
}
|
|
2835
2835
|
if (s && (l != I.EndGroup || o !== r))
|
|
2836
2836
|
throw new Error("invalid end group tag");
|
|
2837
2837
|
u.length > 0 && e.setUnknown(u), n.depth--;
|
|
2838
2838
|
}
|
|
2839
|
-
function
|
|
2839
|
+
function Br(e, t, n, s, r) {
|
|
2840
2840
|
var i;
|
|
2841
2841
|
switch (n.fieldKind) {
|
|
2842
2842
|
case "scalar":
|
|
2843
|
-
e.set(n,
|
|
2843
|
+
e.set(n, X(t, n.scalar, n.utf8Validation));
|
|
2844
2844
|
break;
|
|
2845
2845
|
case "enum":
|
|
2846
|
-
const a =
|
|
2846
|
+
const a = X(t, c.INT32);
|
|
2847
2847
|
if (n.enum.open)
|
|
2848
2848
|
e.set(n, a);
|
|
2849
2849
|
else if (n.enum.values.some((l) => l.number === a))
|
|
2850
2850
|
e.set(n, a);
|
|
2851
2851
|
else if (r.readUnknownFields) {
|
|
2852
2852
|
const l = [];
|
|
2853
|
-
|
|
2853
|
+
Ue(a, l);
|
|
2854
2854
|
const u = (i = e.getUnknown()) !== null && i !== void 0 ? i : [];
|
|
2855
2855
|
u.push({
|
|
2856
2856
|
no: n.number,
|
|
@@ -2860,17 +2860,17 @@ function vr(e, t, n, s, r) {
|
|
|
2860
2860
|
}
|
|
2861
2861
|
break;
|
|
2862
2862
|
case "message":
|
|
2863
|
-
e.set(n,
|
|
2863
|
+
e.set(n, nt(t, r, n, e.get(n)));
|
|
2864
2864
|
break;
|
|
2865
2865
|
case "list":
|
|
2866
|
-
|
|
2866
|
+
$r(t, s, e.get(n), r);
|
|
2867
2867
|
break;
|
|
2868
2868
|
case "map":
|
|
2869
|
-
|
|
2869
|
+
Yr(t, e.get(n), r);
|
|
2870
2870
|
break;
|
|
2871
2871
|
}
|
|
2872
2872
|
}
|
|
2873
|
-
function
|
|
2873
|
+
function Yr(e, t, n) {
|
|
2874
2874
|
const s = t.field();
|
|
2875
2875
|
let r, i;
|
|
2876
2876
|
const a = e.uint32(), o = e.pos + a;
|
|
@@ -2878,18 +2878,18 @@ function Or(e, t, n) {
|
|
|
2878
2878
|
const [l] = e.tag();
|
|
2879
2879
|
switch (l) {
|
|
2880
2880
|
case 1:
|
|
2881
|
-
r =
|
|
2881
|
+
r = X(e, s.mapKey, s.utf8Validation);
|
|
2882
2882
|
break;
|
|
2883
2883
|
case 2:
|
|
2884
2884
|
switch (s.mapKind) {
|
|
2885
2885
|
case "scalar":
|
|
2886
|
-
i =
|
|
2886
|
+
i = X(e, s.scalar, s.utf8Validation);
|
|
2887
2887
|
break;
|
|
2888
2888
|
case "enum":
|
|
2889
2889
|
i = e.int32();
|
|
2890
2890
|
break;
|
|
2891
2891
|
case "message":
|
|
2892
|
-
i =
|
|
2892
|
+
i = nt(e, n, s);
|
|
2893
2893
|
break;
|
|
2894
2894
|
}
|
|
2895
2895
|
break;
|
|
@@ -2904,32 +2904,32 @@ function Or(e, t, n) {
|
|
|
2904
2904
|
i = s.enum.values[0].number;
|
|
2905
2905
|
break;
|
|
2906
2906
|
case "message":
|
|
2907
|
-
i =
|
|
2907
|
+
i = Ee(s.message, void 0, !1);
|
|
2908
2908
|
break;
|
|
2909
2909
|
}
|
|
2910
2910
|
t.set(r, i);
|
|
2911
2911
|
}
|
|
2912
|
-
function
|
|
2912
|
+
function $r(e, t, n, s) {
|
|
2913
2913
|
var r;
|
|
2914
2914
|
const i = n.field();
|
|
2915
2915
|
if (i.listKind === "message") {
|
|
2916
|
-
n.add(
|
|
2916
|
+
n.add(nt(e, s, i));
|
|
2917
2917
|
return;
|
|
2918
2918
|
}
|
|
2919
2919
|
const a = (r = i.scalar) !== null && r !== void 0 ? r : c.INT32;
|
|
2920
2920
|
if (!(t == I.LengthDelimited && a != c.STRING && a != c.BYTES)) {
|
|
2921
|
-
n.add(
|
|
2921
|
+
n.add(X(e, a, i.utf8Validation));
|
|
2922
2922
|
return;
|
|
2923
2923
|
}
|
|
2924
2924
|
const l = e.uint32() + e.pos;
|
|
2925
2925
|
for (; e.pos < l; )
|
|
2926
|
-
n.add(
|
|
2926
|
+
n.add(X(e, a, i.utf8Validation));
|
|
2927
2927
|
}
|
|
2928
|
-
function
|
|
2929
|
-
const r = n.delimitedEncoding, i = s ??
|
|
2930
|
-
return
|
|
2928
|
+
function nt(e, t, n, s) {
|
|
2929
|
+
const r = n.delimitedEncoding, i = s ?? Ee(n.message, void 0, !1);
|
|
2930
|
+
return jn(i, e, t, r, r ? n.number : e.uint32()), i;
|
|
2931
2931
|
}
|
|
2932
|
-
function
|
|
2932
|
+
function X(e, t, n = !1) {
|
|
2933
2933
|
switch (t) {
|
|
2934
2934
|
case c.STRING:
|
|
2935
2935
|
return e.string(n);
|
|
@@ -2963,66 +2963,66 @@ function $(e, t, n = !1) {
|
|
|
2963
2963
|
return e.sint32();
|
|
2964
2964
|
}
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function Xr(e, t) {
|
|
2967
2967
|
var n;
|
|
2968
|
-
const s =
|
|
2969
|
-
return s.messageType.forEach(
|
|
2968
|
+
const s = me(Fr, er(e));
|
|
2969
|
+
return s.messageType.forEach(et), s.dependency = (n = void 0) !== null && n !== void 0 ? n : [], Gn(s, (i) => {
|
|
2970
2970
|
}).getFile(s.name);
|
|
2971
2971
|
}
|
|
2972
|
-
const
|
|
2972
|
+
const Kr = 3, qt = {
|
|
2973
2973
|
writeUnknownFields: !0
|
|
2974
2974
|
};
|
|
2975
|
-
function
|
|
2976
|
-
return e ? Object.assign(Object.assign({},
|
|
2975
|
+
function jr(e) {
|
|
2976
|
+
return e ? Object.assign(Object.assign({}, qt), e) : qt;
|
|
2977
2977
|
}
|
|
2978
2978
|
function te(e, t, n) {
|
|
2979
|
-
return
|
|
2979
|
+
return pe(new Xs(), jr(n), Ee(e, t)).finish();
|
|
2980
2980
|
}
|
|
2981
|
-
function
|
|
2981
|
+
function pe(e, t, n) {
|
|
2982
2982
|
var s;
|
|
2983
2983
|
for (const r of n.sortedFields) {
|
|
2984
2984
|
if (!n.isSet(r)) {
|
|
2985
|
-
if (r.presence ==
|
|
2985
|
+
if (r.presence == Kr)
|
|
2986
2986
|
throw new Error(`cannot encode ${r} to binary: required field not set`);
|
|
2987
2987
|
continue;
|
|
2988
2988
|
}
|
|
2989
|
-
|
|
2989
|
+
Wr(e, t, n, r);
|
|
2990
2990
|
}
|
|
2991
2991
|
if (t.writeUnknownFields)
|
|
2992
2992
|
for (const { no: r, wireType: i, data: a } of (s = n.getUnknown()) !== null && s !== void 0 ? s : [])
|
|
2993
2993
|
e.tag(r, i).raw(a);
|
|
2994
2994
|
return e;
|
|
2995
2995
|
}
|
|
2996
|
-
function
|
|
2996
|
+
function Wr(e, t, n, s) {
|
|
2997
2997
|
var r;
|
|
2998
2998
|
switch (s.fieldKind) {
|
|
2999
2999
|
case "scalar":
|
|
3000
3000
|
case "enum":
|
|
3001
|
-
|
|
3001
|
+
ge(e, n.desc.typeName, s.name, (r = s.scalar) !== null && r !== void 0 ? r : c.INT32, s.number, n.get(s));
|
|
3002
3002
|
break;
|
|
3003
3003
|
case "list":
|
|
3004
|
-
|
|
3004
|
+
qr(e, t, s, n.get(s));
|
|
3005
3005
|
break;
|
|
3006
3006
|
case "message":
|
|
3007
|
-
|
|
3007
|
+
Wn(e, t, s, n.get(s));
|
|
3008
3008
|
break;
|
|
3009
3009
|
case "map":
|
|
3010
3010
|
for (const [i, a] of n.get(s))
|
|
3011
|
-
|
|
3011
|
+
Hr(e, t, s, i, a);
|
|
3012
3012
|
break;
|
|
3013
3013
|
}
|
|
3014
3014
|
}
|
|
3015
|
-
function
|
|
3016
|
-
|
|
3015
|
+
function ge(e, t, n, s, r, i) {
|
|
3016
|
+
qn(e.tag(r, Zr(s)), t, n, s, i);
|
|
3017
3017
|
}
|
|
3018
|
-
function
|
|
3019
|
-
n.delimitedEncoding ?
|
|
3018
|
+
function Wn(e, t, n, s) {
|
|
3019
|
+
n.delimitedEncoding ? pe(e.tag(n.number, I.StartGroup), t, s).tag(n.number, I.EndGroup) : pe(e.tag(n.number, I.LengthDelimited).fork(), t, s).join();
|
|
3020
3020
|
}
|
|
3021
|
-
function
|
|
3021
|
+
function qr(e, t, n, s) {
|
|
3022
3022
|
var r;
|
|
3023
3023
|
if (n.listKind == "message") {
|
|
3024
3024
|
for (const a of s)
|
|
3025
|
-
|
|
3025
|
+
Wn(e, t, n, a);
|
|
3026
3026
|
return;
|
|
3027
3027
|
}
|
|
3028
3028
|
const i = (r = n.scalar) !== null && r !== void 0 ? r : c.INT32;
|
|
@@ -3031,27 +3031,27 @@ function xr(e, t, n, s) {
|
|
|
3031
3031
|
return;
|
|
3032
3032
|
e.tag(n.number, I.LengthDelimited).fork();
|
|
3033
3033
|
for (const a of s)
|
|
3034
|
-
|
|
3034
|
+
qn(e, n.parent.typeName, n.name, i, a);
|
|
3035
3035
|
e.join();
|
|
3036
3036
|
return;
|
|
3037
3037
|
}
|
|
3038
3038
|
for (const a of s)
|
|
3039
|
-
|
|
3039
|
+
ge(e, n.parent.typeName, n.name, i, n.number, a);
|
|
3040
3040
|
}
|
|
3041
|
-
function
|
|
3041
|
+
function Hr(e, t, n, s, r) {
|
|
3042
3042
|
var i;
|
|
3043
|
-
switch (e.tag(n.number, I.LengthDelimited).fork(),
|
|
3043
|
+
switch (e.tag(n.number, I.LengthDelimited).fork(), ge(e, n.parent.typeName, n.name, n.mapKey, 1, s), n.mapKind) {
|
|
3044
3044
|
case "scalar":
|
|
3045
3045
|
case "enum":
|
|
3046
|
-
|
|
3046
|
+
ge(e, n.parent.typeName, n.name, (i = n.scalar) !== null && i !== void 0 ? i : c.INT32, 2, r);
|
|
3047
3047
|
break;
|
|
3048
3048
|
case "message":
|
|
3049
|
-
|
|
3049
|
+
pe(e.tag(2, I.LengthDelimited).fork(), t, r).join();
|
|
3050
3050
|
break;
|
|
3051
3051
|
}
|
|
3052
3052
|
e.join();
|
|
3053
3053
|
}
|
|
3054
|
-
function
|
|
3054
|
+
function qn(e, t, n, s, r) {
|
|
3055
3055
|
try {
|
|
3056
3056
|
switch (s) {
|
|
3057
3057
|
case c.STRING:
|
|
@@ -3104,7 +3104,7 @@ function $n(e, t, n, s, r) {
|
|
|
3104
3104
|
throw i instanceof Error ? new Error(`cannot encode field ${t}.${n} to binary: ${i.message}`) : i;
|
|
3105
3105
|
}
|
|
3106
3106
|
}
|
|
3107
|
-
function
|
|
3107
|
+
function Zr(e) {
|
|
3108
3108
|
switch (e) {
|
|
3109
3109
|
case c.BYTES:
|
|
3110
3110
|
case c.STRING:
|
|
@@ -3121,13 +3121,13 @@ function Vr(e) {
|
|
|
3121
3121
|
return I.Varint;
|
|
3122
3122
|
}
|
|
3123
3123
|
}
|
|
3124
|
-
function
|
|
3124
|
+
function zr(e, t, ...n) {
|
|
3125
3125
|
if (n.length > 0)
|
|
3126
3126
|
throw new Error();
|
|
3127
3127
|
return e.services[t];
|
|
3128
3128
|
}
|
|
3129
|
-
const
|
|
3130
|
-
function
|
|
3129
|
+
const R = /* @__PURE__ */ Xr("CgpjaGF0LnByb3RvEgdjaGF0LnYxIkkKCkF0dGFjaG1lbnQSCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCRIUCgxjb250ZW50X3R5cGUYAyABKAkSCwoDdXJsGAQgASgJIkEKBkJ1dHRvbhINCgVsYWJlbBgBIAEoCRINCgV2YWx1ZRgCIAEoCRIZCgtidXR0b25fdHlwZRgDIAEoCVIEdHlwZSJ/CgRDYXJkEg0KBXRpdGxlGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEicKBWltYWdlGAMgASgLMhMuY2hhdC52MS5BdHRhY2htZW50SACIAQESIAoHYnV0dG9ucxgEIAMoCzIPLmNoYXQudjEuQnV0dG9uQggKBl9pbWFnZSIjCg9NZXNzYWdlTWV0YWRhdGESEAoIYXVkaWVuY2UYASABKAkiIgoOVHlwaW5nTWV0YWRhdGESEAoIYXVkaWVuY2UYASABKAki7QIKB01lc3NhZ2USCgoCaWQYASABKAkSDAoEcm9sZRgCIAEoCRIRCgR0ZXh0GAMgASgJSACIAQESEQoEaHRtbBgEIAEoCUgBiAEBEigKC2F0dGFjaG1lbnRzGAUgAygLMhMuY2hhdC52MS5BdHRhY2htZW50EiAKB2J1dHRvbnMYBiADKAsyDy5jaGF0LnYxLkJ1dHRvbhIeCgdnYWxsZXJ5GAcgAygLMg0uY2hhdC52MS5DYXJkEhEKCXRpbWVzdGFtcBgIIAEoCRIYCgd1c2VyX2lkGAkgASgJUgd1c2VyX2lkEhwKCXVzZXJfbmFtZRgKIAEoCVIJdXNlcl9uYW1lEg0KBXN0YXRlGAsgASgJEhMKBmFjdGlvbhgMIAEoCUgCiAEBEioKCG1ldGFkYXRhGA0gASgLMhguY2hhdC52MS5NZXNzYWdlTWV0YWRhdGFCBwoFX3RleHRCBwoFX2h0bWxCCQoHX2FjdGlvbiKRAQoLVHlwaW5nRXZlbnQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSDQoFc3RhdGUYAiABKAkSDAoEcm9sZRgDIAEoCRIPCgd1c2VyX2lkGAQgASgJEhEKCXVzZXJfbmFtZRgFIAEoCRIpCghtZXRhZGF0YRgGIAEoCzIXLmNoYXQudjEuVHlwaW5nTWV0YWRhdGEiXQoRUGFydGljaXBhbnRKb2luZWQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSDAoEcm9sZRgCIAEoCRIPCgd1c2VyX2lkGAMgASgJEhEKCXVzZXJfbmFtZRgEIAEoCSJJCg9QYXJ0aWNpcGFudExlZnQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSEwoGcmVhc29uGAIgASgJSACIAQFCCQoHX3JlYXNvbiJjCgNBY3cSDwoHZW5hYmxlZBgBIAEoCBIQCghkdXJhdGlvbhgCIAEoAxIPCgdlbmZvcmNlGAMgASgIEhIKCnN0YXJ0ZWRfYXQYBCABKAkSFAoMZGlzcG9zaXRpb25zGAUgAygJIkYKDFNlc3Npb25FbmRlZBIOCgZyZWFzb24YASABKAkSHgoDYWN3GAIgASgLMgwuY2hhdC52MS5BY3dIAIgBAUIGCgRfYWN3IhwKCUhlYXJ0YmVhdBIPCgd1bml4X21zGAEgASgDIqkCCglDaGF0RXZlbnQSIwoHbWVzc2FnZRgBIAEoCzIQLmNoYXQudjEuTWVzc2FnZUgAEiYKBnR5cGluZxgCIAEoCzIULmNoYXQudjEuVHlwaW5nRXZlbnRIABI4ChJwYXJ0aWNpcGFudF9qb2luZWQYAyABKAsyGi5jaGF0LnYxLlBhcnRpY2lwYW50Sm9pbmVkSAASNAoQcGFydGljaXBhbnRfbGVmdBgEIAEoCzIYLmNoYXQudjEuUGFydGljaXBhbnRMZWZ0SAASLgoNc2Vzc2lvbl9lbmRlZBgFIAEoCzIVLmNoYXQudjEuU2Vzc2lvbkVuZGVkSAASJwoJaGVhcnRiZWF0GAYgASgLMhIuY2hhdC52MS5IZWFydGJlYXRIAEIGCgRraW5kIg8KDUF0dGFjaFJlcXVlc3QiNgoOQXR0YWNoUmVzcG9uc2USFgoOcGFydGljaXBhbnRfaWQYASABKAkSDAoEcm9sZRgCIAEoCSKFAgoOTWVzc2FnZVJlcXVlc3QSGQoRY2xpZW50X21lc3NhZ2VfaWQYASABKAkSEQoEdGV4dBgCIAEoCUgAiAEBEigKC2F0dGFjaG1lbnRzGAMgAygLMhMuY2hhdC52MS5BdHRhY2htZW50EhIKBXZhbHVlGAQgASgJSAGIAQESGgoNZ2FsbGVyeV9sYWJlbBgFIAEoCUgCiAEBEhEKBGh0bWwYBiABKAlIA4gBARIqCghtZXRhZGF0YRgHIAEoCzIYLmNoYXQudjEuTWVzc2FnZU1ldGFkYXRhQgcKBV90ZXh0QggKBl92YWx1ZUIQCg5fZ2FsbGVyeV9sYWJlbEIHCgVfaHRtbCI0Cg9NZXNzYWdlUmVzcG9uc2USIQoHbWVzc2FnZRgBIAEoCzIQLmNoYXQudjEuTWVzc2FnZSJJCg1UeXBpbmdSZXF1ZXN0Eg0KBXN0YXRlGAEgASgJEikKCG1ldGFkYXRhGAIgASgLMhcuY2hhdC52MS5UeXBpbmdNZXRhZGF0YSIQCg5UeXBpbmdSZXNwb25zZSIOCgxMZWF2ZVJlcXVlc3QiDwoNTGVhdmVSZXNwb25zZTLyAQoHU2Vzc2lvbhI2CgZBdHRhY2gSFi5jaGF0LnYxLkF0dGFjaFJlcXVlc3QaEi5jaGF0LnYxLkNoYXRFdmVudDABEjwKB01lc3NhZ2USFy5jaGF0LnYxLk1lc3NhZ2VSZXF1ZXN0GhguY2hhdC52MS5NZXNzYWdlUmVzcG9uc2USOQoGVHlwaW5nEhYuY2hhdC52MS5UeXBpbmdSZXF1ZXN0GhcuY2hhdC52MS5UeXBpbmdSZXNwb25zZRI2CgVMZWF2ZRIVLmNoYXQudjEuTGVhdmVSZXF1ZXN0GhYuY2hhdC52MS5MZWF2ZVJlc3BvbnNlYgZwcm90bzM"), Qr = /* @__PURE__ */ v(R, 0), Jr = /* @__PURE__ */ v(R, 3), ei = /* @__PURE__ */ v(R, 4), ti = /* @__PURE__ */ v(R, 12), Ht = /* @__PURE__ */ v(R, 13), ni = /* @__PURE__ */ v(R, 14), Zt = /* @__PURE__ */ v(R, 15), si = /* @__PURE__ */ v(R, 16), zt = /* @__PURE__ */ v(R, 17), Qt = /* @__PURE__ */ v(R, 19), ne = /* @__PURE__ */ zr(R, 0);
|
|
3130
|
+
function st(e, t) {
|
|
3131
3131
|
if (e == null) return;
|
|
3132
3132
|
if (typeof e != "object" || Array.isArray(e))
|
|
3133
3133
|
throw h.session(`${t} carried invalid metadata`);
|
|
@@ -3136,7 +3136,7 @@ function tt(e, t) {
|
|
|
3136
3136
|
if (n === "internal" || n === "all") return { audience: n };
|
|
3137
3137
|
throw h.session(`${t} carried invalid metadata.audience`);
|
|
3138
3138
|
}
|
|
3139
|
-
const
|
|
3139
|
+
const ri = "x-origon-client-id", ii = "stream_overflow", U = {
|
|
3140
3140
|
/** session_not_found — terminal */
|
|
3141
3141
|
NOT_FOUND: 1,
|
|
3142
3142
|
/** bad request (e.g. missing client id at gw) — terminal */
|
|
@@ -3164,7 +3164,7 @@ function se(e) {
|
|
|
3164
3164
|
return "terminal";
|
|
3165
3165
|
}
|
|
3166
3166
|
}
|
|
3167
|
-
function
|
|
3167
|
+
function Jt(e) {
|
|
3168
3168
|
let t;
|
|
3169
3169
|
try {
|
|
3170
3170
|
t = new URL(e);
|
|
@@ -3180,11 +3180,11 @@ function zt(e) {
|
|
|
3180
3180
|
`chat session url carries no client id (want /chat/api/<id>/live, got "${t.pathname}")`
|
|
3181
3181
|
);
|
|
3182
3182
|
}
|
|
3183
|
-
function
|
|
3184
|
-
const t =
|
|
3183
|
+
function ai(e) {
|
|
3184
|
+
const t = me(ti, e);
|
|
3185
3185
|
switch (t.kind.case) {
|
|
3186
3186
|
case "message":
|
|
3187
|
-
return { kind: "message", message:
|
|
3187
|
+
return { kind: "message", message: Hn(t.kind.value) };
|
|
3188
3188
|
case "typing": {
|
|
3189
3189
|
const n = t.kind.value;
|
|
3190
3190
|
if (n.state !== "on" && n.state !== "off")
|
|
@@ -3197,20 +3197,20 @@ function qr(e) {
|
|
|
3197
3197
|
userId: n.userId,
|
|
3198
3198
|
userName: n.userName,
|
|
3199
3199
|
state: n.state,
|
|
3200
|
-
metadata:
|
|
3200
|
+
metadata: li(n.metadata?.audience)
|
|
3201
3201
|
}
|
|
3202
3202
|
};
|
|
3203
3203
|
}
|
|
3204
3204
|
case "sessionEnded": {
|
|
3205
3205
|
const n = t.kind.value.reason;
|
|
3206
|
-
return { kind: "ended", reason: n, replay: n ===
|
|
3206
|
+
return { kind: "ended", reason: n, replay: n === ii };
|
|
3207
3207
|
}
|
|
3208
3208
|
default:
|
|
3209
3209
|
return { kind: "ignore" };
|
|
3210
3210
|
}
|
|
3211
3211
|
}
|
|
3212
|
-
function
|
|
3213
|
-
const t = e.role === "ai" || e.role === "user" || e.role === "system" ? e.role : "external", n =
|
|
3212
|
+
function Hn(e) {
|
|
3213
|
+
const t = e.role === "ai" || e.role === "user" || e.role === "system" ? e.role : "external", n = st(e.metadata, "chat message");
|
|
3214
3214
|
return {
|
|
3215
3215
|
role: t,
|
|
3216
3216
|
id: e.id,
|
|
@@ -3229,18 +3229,18 @@ function Xn(e) {
|
|
|
3229
3229
|
...e.userId !== "" ? { userId: e.userId } : {},
|
|
3230
3230
|
...e.userName !== "" ? { userName: e.userName } : {},
|
|
3231
3231
|
...e.action !== void 0 ? { action: e.action } : {},
|
|
3232
|
-
...e.buttons.length > 0 ? { buttons: e.buttons.map(
|
|
3233
|
-
...e.gallery.length > 0 ? { gallery: e.gallery.map(
|
|
3232
|
+
...e.buttons.length > 0 ? { buttons: e.buttons.map(Zn) } : {},
|
|
3233
|
+
...e.gallery.length > 0 ? { gallery: e.gallery.map(oi) } : {}
|
|
3234
3234
|
};
|
|
3235
3235
|
}
|
|
3236
|
-
function
|
|
3236
|
+
function Zn(e) {
|
|
3237
3237
|
return { label: e.label, value: e.value, type: e.buttonType };
|
|
3238
3238
|
}
|
|
3239
|
-
function
|
|
3239
|
+
function oi(e) {
|
|
3240
3240
|
return {
|
|
3241
3241
|
title: e.title,
|
|
3242
3242
|
description: e.description,
|
|
3243
|
-
buttons: e.buttons.map(
|
|
3243
|
+
buttons: e.buttons.map(Zn),
|
|
3244
3244
|
...e.image !== void 0 ? {
|
|
3245
3245
|
image: {
|
|
3246
3246
|
id: e.image.id,
|
|
@@ -3251,9 +3251,9 @@ function Hr(e) {
|
|
|
3251
3251
|
} : {}
|
|
3252
3252
|
};
|
|
3253
3253
|
}
|
|
3254
|
-
class
|
|
3254
|
+
class ci {
|
|
3255
3255
|
constructor(t, n) {
|
|
3256
|
-
this.url = t.url, this.token = t.token, this.clientId =
|
|
3256
|
+
this.url = t.url, this.token = t.token, this.clientId = Jt(t.url), this.opts = n, this.client = this.createClient();
|
|
3257
3257
|
}
|
|
3258
3258
|
get credentials() {
|
|
3259
3259
|
return { url: this.url, token: this.token };
|
|
@@ -3266,7 +3266,7 @@ class Zr {
|
|
|
3266
3266
|
*/
|
|
3267
3267
|
setCredentials(t) {
|
|
3268
3268
|
const n = t.url !== this.url;
|
|
3269
|
-
this.url = t.url, this.token = t.token, n && (this.clientId =
|
|
3269
|
+
this.url = t.url, this.token = t.token, n && (this.clientId = Jt(t.url), this.client = this.createClient());
|
|
3270
3270
|
}
|
|
3271
3271
|
createClient() {
|
|
3272
3272
|
const t = {
|
|
@@ -3275,18 +3275,18 @@ class Zr {
|
|
|
3275
3275
|
logout: () => {
|
|
3276
3276
|
}
|
|
3277
3277
|
};
|
|
3278
|
-
return
|
|
3279
|
-
metadata: { [
|
|
3278
|
+
return Ss(this.url, t, {
|
|
3279
|
+
metadata: { [ri]: this.clientId },
|
|
3280
3280
|
...this.opts.transport !== void 0 ? { transport: this.opts.transport } : {},
|
|
3281
3281
|
...this.opts.logger !== void 0 ? { logger: this.opts.logger } : {}
|
|
3282
3282
|
});
|
|
3283
3283
|
}
|
|
3284
3284
|
/** Attach — join the room. The `initial` frame is the `AttachResponse`. */
|
|
3285
3285
|
async attach() {
|
|
3286
|
-
const t = te(
|
|
3286
|
+
const t = te(Ht, C(Ht)), n = await this.client.stream(re(ne.method.attach), t);
|
|
3287
3287
|
let s;
|
|
3288
3288
|
try {
|
|
3289
|
-
s =
|
|
3289
|
+
s = me(ni, n.initial);
|
|
3290
3290
|
} catch (r) {
|
|
3291
3291
|
throw n.cancel(), r;
|
|
3292
3292
|
}
|
|
@@ -3297,10 +3297,10 @@ class Zr {
|
|
|
3297
3297
|
* timestamp, rewritten attachment URLs) — the former POST echo.
|
|
3298
3298
|
*/
|
|
3299
3299
|
async message(t) {
|
|
3300
|
-
const n = C(
|
|
3300
|
+
const n = C(Zt, {
|
|
3301
3301
|
clientMessageId: t.clientMessageId,
|
|
3302
3302
|
attachments: (t.attachments ?? []).map(
|
|
3303
|
-
(i) => C(
|
|
3303
|
+
(i) => C(Qr, {
|
|
3304
3304
|
id: i.id,
|
|
3305
3305
|
name: i.name,
|
|
3306
3306
|
contentType: i.contentType,
|
|
@@ -3312,48 +3312,48 @@ class Zr {
|
|
|
3312
3312
|
...t.html !== void 0 ? { html: t.html } : {},
|
|
3313
3313
|
...t.value !== void 0 ? { value: t.value } : {},
|
|
3314
3314
|
...t.galleryLabel !== void 0 ? { galleryLabel: t.galleryLabel } : {},
|
|
3315
|
-
...t.metadata?.audience !== void 0 ? { metadata: C(
|
|
3315
|
+
...t.metadata?.audience !== void 0 ? { metadata: C(Jr, t.metadata) } : {}
|
|
3316
3316
|
}), s = await this.client.call(
|
|
3317
3317
|
re(ne.method.message),
|
|
3318
|
-
te(
|
|
3319
|
-
), r =
|
|
3318
|
+
te(Zt, n)
|
|
3319
|
+
), r = me(si, s);
|
|
3320
3320
|
if (r.message === void 0)
|
|
3321
3321
|
throw h.session("chat message response carried no message");
|
|
3322
|
-
return
|
|
3322
|
+
return Hn(r.message);
|
|
3323
3323
|
}
|
|
3324
3324
|
/** Typing — on/off indicator. Unary; the response is empty. */
|
|
3325
3325
|
async typing(t, n) {
|
|
3326
|
-
const s = C(
|
|
3326
|
+
const s = C(zt, {
|
|
3327
3327
|
state: t,
|
|
3328
|
-
...n?.audience !== void 0 ? { metadata: C(
|
|
3328
|
+
...n?.audience !== void 0 ? { metadata: C(ei, n) } : {}
|
|
3329
3329
|
});
|
|
3330
3330
|
await this.client.call(
|
|
3331
3331
|
re(ne.method.typing),
|
|
3332
|
-
te(
|
|
3332
|
+
te(zt, s)
|
|
3333
3333
|
);
|
|
3334
3334
|
}
|
|
3335
3335
|
/** Leave — explicit participant leave (immediate finalize, idempotent). */
|
|
3336
3336
|
async leave() {
|
|
3337
3337
|
await this.client.call(
|
|
3338
3338
|
re(ne.method.leave),
|
|
3339
|
-
te(
|
|
3339
|
+
te(Qt, C(Qt))
|
|
3340
3340
|
);
|
|
3341
3341
|
}
|
|
3342
3342
|
}
|
|
3343
|
-
function
|
|
3343
|
+
function ui(e, t) {
|
|
3344
3344
|
if (e === "internal" || e === "all") return e;
|
|
3345
3345
|
throw h.session(`${t} carried invalid or missing metadata.audience`);
|
|
3346
3346
|
}
|
|
3347
|
-
function
|
|
3348
|
-
return { audience:
|
|
3347
|
+
function li(e) {
|
|
3348
|
+
return { audience: ui(e, "chat typing event") };
|
|
3349
3349
|
}
|
|
3350
3350
|
function re(e) {
|
|
3351
3351
|
return `${e.parent.typeName}/${e.name}`;
|
|
3352
3352
|
}
|
|
3353
|
-
const
|
|
3354
|
-
class
|
|
3353
|
+
const di = 3e3, hi = 6e3, fi = 3, mi = 500, pi = 2e3;
|
|
3354
|
+
class gi {
|
|
3355
3355
|
constructor(t, n) {
|
|
3356
|
-
this.stream = null, this.terminalFired = !1, this.reattaching = !1, this.provisionedRecoveryPromise = null, this.recoveryGeneration = 0, this.knownMessageIds = /* @__PURE__ */ new Set(), this.outboundOffTimer = null, this.outboundTypingMetadata = null, this.inboundTyping = /* @__PURE__ */ new Map(), this.sessionId = t.sessionId, this.lane = new
|
|
3356
|
+
this.stream = null, this.terminalFired = !1, this.reattaching = !1, this.provisionedRecoveryPromise = null, this.recoveryGeneration = 0, this.knownMessageIds = /* @__PURE__ */ new Set(), this.outboundOffTimer = null, this.outboundTypingMetadata = null, this.inboundTyping = /* @__PURE__ */ new Map(), this.sessionId = t.sessionId, this.lane = new ci(
|
|
3357
3357
|
{ url: t.url.replace(/\/$/, ""), token: t.token },
|
|
3358
3358
|
{ remint: () => this.remint() }
|
|
3359
3359
|
), this.sessionHttp = n.sessionHttp, this.provisionedRecovery = n.provisionedRecovery, this.dispatcher = n.dispatcher, this.onTerminal = n.onTerminal;
|
|
@@ -3374,12 +3374,12 @@ class ri {
|
|
|
3374
3374
|
if (s)
|
|
3375
3375
|
throw this.fireTerminal(s), n;
|
|
3376
3376
|
if (await this.beginProvisionedRecovery(
|
|
3377
|
-
n instanceof
|
|
3377
|
+
n instanceof S && se(n.code) === "remint" ? "unauthenticated" : "transportError"
|
|
3378
3378
|
)) return;
|
|
3379
3379
|
throw n;
|
|
3380
3380
|
}
|
|
3381
3381
|
throw this.fireTerminal(
|
|
3382
|
-
n instanceof
|
|
3382
|
+
n instanceof S ? { kind: "serverClosed", code: n.code, reason: n.reason } : { kind: "networkLoss" }
|
|
3383
3383
|
), n;
|
|
3384
3384
|
}
|
|
3385
3385
|
if (this.terminalFired)
|
|
@@ -3389,7 +3389,7 @@ class ri {
|
|
|
3389
3389
|
// ── Outbound API ─────────────────────────────────────────────────────
|
|
3390
3390
|
async sendMessage(t) {
|
|
3391
3391
|
this.cancelOutboundDebounce({ flushOff: !0 });
|
|
3392
|
-
const n =
|
|
3392
|
+
const n = bn(), s = st(t.metadata, "chat message request"), r = {
|
|
3393
3393
|
role: t.role ?? "external",
|
|
3394
3394
|
id: "",
|
|
3395
3395
|
localId: n,
|
|
@@ -3442,7 +3442,7 @@ class ri {
|
|
|
3442
3442
|
this.outboundOffTimer = null;
|
|
3443
3443
|
const n = this.outboundTypingMetadata;
|
|
3444
3444
|
this.outboundTypingMetadata = null, this.sendTyping("off", n ?? void 0);
|
|
3445
|
-
},
|
|
3445
|
+
}, di);
|
|
3446
3446
|
}
|
|
3447
3447
|
stopTyping() {
|
|
3448
3448
|
this.cancelOutboundDebounce({ flushOff: !0 });
|
|
@@ -3453,7 +3453,7 @@ class ri {
|
|
|
3453
3453
|
this.fireTerminal({ kind: "localClose" }), n && await Promise.race([
|
|
3454
3454
|
this.lane.leave().catch((s) => {
|
|
3455
3455
|
}),
|
|
3456
|
-
|
|
3456
|
+
j(pi)
|
|
3457
3457
|
]);
|
|
3458
3458
|
}
|
|
3459
3459
|
/**
|
|
@@ -3481,7 +3481,7 @@ class ri {
|
|
|
3481
3481
|
if (this.terminalFired || this.stream !== t) continue;
|
|
3482
3482
|
let r;
|
|
3483
3483
|
try {
|
|
3484
|
-
r =
|
|
3484
|
+
r = ai(s);
|
|
3485
3485
|
} catch {
|
|
3486
3486
|
this.fireTerminal({ kind: "protocolViolation" });
|
|
3487
3487
|
return;
|
|
@@ -3550,7 +3550,7 @@ class ri {
|
|
|
3550
3550
|
if (!n) return null;
|
|
3551
3551
|
let s = t;
|
|
3552
3552
|
for (let r = 0; r < n.delaysMs.length; r++) {
|
|
3553
|
-
if (await
|
|
3553
|
+
if (await j(n.delaysMs[r]), this.terminalFired) return null;
|
|
3554
3554
|
const i = ++this.recoveryGeneration;
|
|
3555
3555
|
let a;
|
|
3556
3556
|
try {
|
|
@@ -3579,13 +3579,13 @@ class ri {
|
|
|
3579
3579
|
const l = this.provisionedTerminalFromRefusal(o);
|
|
3580
3580
|
if (l)
|
|
3581
3581
|
return this.fireTerminal(l), null;
|
|
3582
|
-
o instanceof
|
|
3582
|
+
o instanceof S && se(o.code) === "remint" && (s = "unauthenticated");
|
|
3583
3583
|
}
|
|
3584
3584
|
}
|
|
3585
3585
|
return this.fireTerminal({ kind: "replayLost" }), null;
|
|
3586
3586
|
}
|
|
3587
3587
|
provisionedTerminalFromRefusal(t) {
|
|
3588
|
-
if (!(t instanceof
|
|
3588
|
+
if (!(t instanceof S)) return null;
|
|
3589
3589
|
switch (t.code) {
|
|
3590
3590
|
case U.NOT_FOUND:
|
|
3591
3591
|
return { kind: "sessionEnded" };
|
|
@@ -3634,8 +3634,8 @@ class ri {
|
|
|
3634
3634
|
this.reattaching = !0;
|
|
3635
3635
|
try {
|
|
3636
3636
|
let t = !1;
|
|
3637
|
-
for (let n = 0; n <
|
|
3638
|
-
if (await
|
|
3637
|
+
for (let n = 0; n < fi; n++) {
|
|
3638
|
+
if (await j(mi * 2 ** n), this.terminalFired) return;
|
|
3639
3639
|
try {
|
|
3640
3640
|
const { stream: s } = await this.lane.attach();
|
|
3641
3641
|
if (this.terminalFired) {
|
|
@@ -3645,7 +3645,7 @@ class ri {
|
|
|
3645
3645
|
this.stream = s, this.pump(s), await this.replayHistory();
|
|
3646
3646
|
return;
|
|
3647
3647
|
} catch (s) {
|
|
3648
|
-
if (s instanceof
|
|
3648
|
+
if (s instanceof S) {
|
|
3649
3649
|
const r = se(s.code);
|
|
3650
3650
|
if (r === "remint" && !t) {
|
|
3651
3651
|
t = !0;
|
|
@@ -3726,7 +3726,7 @@ class ri {
|
|
|
3726
3726
|
...t,
|
|
3727
3727
|
state: "off"
|
|
3728
3728
|
});
|
|
3729
|
-
},
|
|
3729
|
+
}, hi);
|
|
3730
3730
|
this.inboundTyping.set(t.participantId, { timer: n, update: t });
|
|
3731
3731
|
}
|
|
3732
3732
|
clearInboundWatchdog(t) {
|
|
@@ -3767,7 +3767,7 @@ class ri {
|
|
|
3767
3767
|
this.stream = null, n && n.cancel(), this.clearAllInboundWatchdogs({ notify: this.provisionedRecovery !== void 0 }), this.outboundOffTimer && (clearTimeout(this.outboundOffTimer), this.outboundOffTimer = null), this.outboundTypingMetadata = null, this.onTerminal(t, this.sessionId);
|
|
3768
3768
|
}
|
|
3769
3769
|
}
|
|
3770
|
-
class
|
|
3770
|
+
class bi {
|
|
3771
3771
|
constructor(t) {
|
|
3772
3772
|
this.endpoint = t.endpoint.replace(/\/$/, ""), this.defaultHeaders = {}, t.token && (this.defaultHeaders.Authorization = `Bearer ${t.token}`);
|
|
3773
3773
|
}
|
|
@@ -3797,7 +3797,7 @@ class ii {
|
|
|
3797
3797
|
} catch (a) {
|
|
3798
3798
|
throw h.other(`fetch failed: ${a.message}`);
|
|
3799
3799
|
}
|
|
3800
|
-
return
|
|
3800
|
+
return en(i);
|
|
3801
3801
|
}
|
|
3802
3802
|
async getJsonAbsolute(t, n) {
|
|
3803
3803
|
const s = {
|
|
@@ -3811,7 +3811,7 @@ class ii {
|
|
|
3811
3811
|
} catch (i) {
|
|
3812
3812
|
throw h.other(`fetch failed: ${i.message}`);
|
|
3813
3813
|
}
|
|
3814
|
-
return
|
|
3814
|
+
return en(r);
|
|
3815
3815
|
}
|
|
3816
3816
|
async deleteAbsolute(t, n) {
|
|
3817
3817
|
const s = {
|
|
@@ -3827,7 +3827,7 @@ class ii {
|
|
|
3827
3827
|
}
|
|
3828
3828
|
if (!r.ok) {
|
|
3829
3829
|
const i = await r.text().catch(() => ""), a = n?.bearer;
|
|
3830
|
-
throw
|
|
3830
|
+
throw rt(
|
|
3831
3831
|
r.status,
|
|
3832
3832
|
a ? i.split(a).join("[REDACTED]") : i
|
|
3833
3833
|
);
|
|
@@ -3837,10 +3837,10 @@ class ii {
|
|
|
3837
3837
|
return this.url(t);
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
|
-
async function
|
|
3840
|
+
async function en(e) {
|
|
3841
3841
|
const t = await e.text();
|
|
3842
3842
|
if (!e.ok)
|
|
3843
|
-
throw
|
|
3843
|
+
throw rt(e.status, t);
|
|
3844
3844
|
let n;
|
|
3845
3845
|
if (t.length !== 0) {
|
|
3846
3846
|
try {
|
|
@@ -3848,28 +3848,28 @@ async function Qt(e) {
|
|
|
3848
3848
|
} catch (s) {
|
|
3849
3849
|
throw h.other(`decode response: ${s.message}`);
|
|
3850
3850
|
}
|
|
3851
|
-
if (
|
|
3851
|
+
if (un(n))
|
|
3852
3852
|
throw h.http(e.status, n.error.code, n.error.message);
|
|
3853
3853
|
return n;
|
|
3854
3854
|
}
|
|
3855
3855
|
}
|
|
3856
|
-
function
|
|
3856
|
+
function rt(e, t) {
|
|
3857
3857
|
if (e >= 500)
|
|
3858
3858
|
return h.serverUnavailable(e);
|
|
3859
3859
|
if (t.length === 0)
|
|
3860
3860
|
return h.http(e, "", `HTTP ${e}`);
|
|
3861
3861
|
try {
|
|
3862
3862
|
const n = JSON.parse(t);
|
|
3863
|
-
if (
|
|
3863
|
+
if (un(n))
|
|
3864
3864
|
return h.http(e, n.error.code, n.error.message);
|
|
3865
3865
|
} catch {
|
|
3866
3866
|
}
|
|
3867
3867
|
return h.http(e, "", t.slice(0, 200));
|
|
3868
3868
|
}
|
|
3869
|
-
function
|
|
3869
|
+
function Oe(e, t) {
|
|
3870
3870
|
return t ? `${e}?userId=${encodeURIComponent(t)}` : e;
|
|
3871
3871
|
}
|
|
3872
|
-
class
|
|
3872
|
+
class Ei {
|
|
3873
3873
|
constructor(t, n) {
|
|
3874
3874
|
this.http = t, this.userId = n;
|
|
3875
3875
|
}
|
|
@@ -3881,24 +3881,54 @@ class ai {
|
|
|
3881
3881
|
startSession(t) {
|
|
3882
3882
|
const n = { channel: t.channel };
|
|
3883
3883
|
return t.sessionId && (n.sessionId = t.sessionId), t.data && (n.data = t.data), this.http.postJson(
|
|
3884
|
-
|
|
3884
|
+
Oe("/session/start", this.userId),
|
|
3885
3885
|
n
|
|
3886
3886
|
);
|
|
3887
3887
|
}
|
|
3888
3888
|
/** `GET /sessions` — list prior sessions (matches `client-sdk/session`). */
|
|
3889
3889
|
async listSessions() {
|
|
3890
|
-
const t = await this.http.getJson(
|
|
3891
|
-
return
|
|
3890
|
+
const t = await this.http.getJson(Oe("/sessions", this.userId));
|
|
3891
|
+
return zn(t);
|
|
3892
3892
|
}
|
|
3893
3893
|
/** `GET /session/{id}` — fetch transcript + control (matches `client-sdk/session`). */
|
|
3894
3894
|
async getSession(t) {
|
|
3895
3895
|
const n = await this.http.getJson(
|
|
3896
|
-
|
|
3896
|
+
Oe(`/session/${encodeURIComponent(t)}`, this.userId)
|
|
3897
|
+
);
|
|
3898
|
+
return Qn(n);
|
|
3899
|
+
}
|
|
3900
|
+
async listSessionsPage(t = {}) {
|
|
3901
|
+
const n = tn(t.pageSize, 50, 100, "directory"), s = await this.http.getJson(
|
|
3902
|
+
nn("/sessions", this.userId, n, t.cursor, t.search),
|
|
3903
|
+
{ signal: t.signal }
|
|
3904
|
+
);
|
|
3905
|
+
return yi(s);
|
|
3906
|
+
}
|
|
3907
|
+
async getSessionPage(t, n = {}) {
|
|
3908
|
+
const s = tn(n.pageSize, 100, 250, "history"), r = await this.http.getJson(
|
|
3909
|
+
nn(
|
|
3910
|
+
`/session/${encodeURIComponent(t)}`,
|
|
3911
|
+
this.userId,
|
|
3912
|
+
s,
|
|
3913
|
+
n.cursor
|
|
3914
|
+
),
|
|
3915
|
+
{ signal: n.signal }
|
|
3897
3916
|
);
|
|
3898
|
-
return
|
|
3917
|
+
return wi(r);
|
|
3899
3918
|
}
|
|
3900
3919
|
}
|
|
3901
|
-
function
|
|
3920
|
+
function tn(e, t, n, s) {
|
|
3921
|
+
const r = e ?? t;
|
|
3922
|
+
if (!Number.isInteger(r) || r < 1 || r > n)
|
|
3923
|
+
throw h.other(`${s} page size must be between 1 and ${n}`);
|
|
3924
|
+
return r;
|
|
3925
|
+
}
|
|
3926
|
+
function nn(e, t, n, s, r) {
|
|
3927
|
+
if (s === "") throw h.other("page cursor must not be empty");
|
|
3928
|
+
const i = new URLSearchParams();
|
|
3929
|
+
return t && i.set("userId", t), i.set("pageSize", String(n)), s !== void 0 && i.set("cursor", s), r !== void 0 && i.set("search", r), `${e}?${i.toString()}`;
|
|
3930
|
+
}
|
|
3931
|
+
function zn(e) {
|
|
3902
3932
|
if (!Array.isArray(e))
|
|
3903
3933
|
throw h.other("decode sessions: expected an array");
|
|
3904
3934
|
return e.forEach((t, n) => {
|
|
@@ -3910,11 +3940,11 @@ function oi(e) {
|
|
|
3910
3940
|
const s = t;
|
|
3911
3941
|
return s.lastMessage === void 0 || s.lastMessage === null ? s : {
|
|
3912
3942
|
...s,
|
|
3913
|
-
lastMessage:
|
|
3943
|
+
lastMessage: es(s.lastMessage, `decode sessions[${n}].lastMessage`)
|
|
3914
3944
|
};
|
|
3915
3945
|
});
|
|
3916
3946
|
}
|
|
3917
|
-
function
|
|
3947
|
+
function Qn(e) {
|
|
3918
3948
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
3919
3949
|
throw h.other("decode session: expected an object");
|
|
3920
3950
|
const t = e.history;
|
|
@@ -3923,14 +3953,39 @@ function ci(e) {
|
|
|
3923
3953
|
return {
|
|
3924
3954
|
...e,
|
|
3925
3955
|
history: t.map(
|
|
3926
|
-
(n, s) =>
|
|
3956
|
+
(n, s) => es(n, `decode session.history[${s}]`)
|
|
3927
3957
|
)
|
|
3928
3958
|
};
|
|
3929
3959
|
}
|
|
3930
|
-
function
|
|
3960
|
+
function yi(e) {
|
|
3961
|
+
const t = Jn(e, ["nextCursor", "sessions"], "decode sessions page");
|
|
3962
|
+
if (t.nextCursor !== null && typeof t.nextCursor != "string")
|
|
3963
|
+
throw h.other("decode sessions page.nextCursor: expected string or null");
|
|
3964
|
+
return {
|
|
3965
|
+
sessions: zn(t.sessions),
|
|
3966
|
+
nextCursor: t.nextCursor
|
|
3967
|
+
};
|
|
3968
|
+
}
|
|
3969
|
+
function wi(e) {
|
|
3970
|
+
const t = Jn(e, ["control", "history", "nextCursor"], "decode session page");
|
|
3971
|
+
if (t.nextCursor !== null && typeof t.nextCursor != "string")
|
|
3972
|
+
throw h.other("decode session page.nextCursor: expected string or null");
|
|
3973
|
+
if (t.control !== "ai" && t.control !== "user")
|
|
3974
|
+
throw h.other("decode session page.control: expected ai or user");
|
|
3975
|
+
return { ...Qn({ history: t.history, control: t.control }), nextCursor: t.nextCursor };
|
|
3976
|
+
}
|
|
3977
|
+
function Jn(e, t, n) {
|
|
3978
|
+
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
3979
|
+
throw h.other(`${n}: expected an object`);
|
|
3980
|
+
const s = e, r = Object.keys(s).sort();
|
|
3981
|
+
if (r.length !== t.length || r.some((i, a) => i !== t[a]))
|
|
3982
|
+
throw h.other(`${n}: unexpected envelope keys`);
|
|
3983
|
+
return s;
|
|
3984
|
+
}
|
|
3985
|
+
function es(e, t) {
|
|
3931
3986
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
3932
3987
|
throw h.other(`${t}: expected an object`);
|
|
3933
|
-
const n = e, s =
|
|
3988
|
+
const n = e, s = st(
|
|
3934
3989
|
e.metadata,
|
|
3935
3990
|
t
|
|
3936
3991
|
);
|
|
@@ -3940,7 +3995,7 @@ function Wn(e, t) {
|
|
|
3940
3995
|
}
|
|
3941
3996
|
return { ...n, metadata: s };
|
|
3942
3997
|
}
|
|
3943
|
-
function
|
|
3998
|
+
function Ii(e, t, n, s) {
|
|
3944
3999
|
return new Promise((r, i) => {
|
|
3945
4000
|
const a = new XMLHttpRequest();
|
|
3946
4001
|
a.open("POST", e, !0), s && a.setRequestHeader("Authorization", `Bearer ${s}`);
|
|
@@ -3948,20 +4003,20 @@ function ui(e, t, n, s) {
|
|
|
3948
4003
|
o.append("file", t, t.name);
|
|
3949
4004
|
let l = -1, u = 0;
|
|
3950
4005
|
if (n.onProgress && (a.upload.onprogress = (d) => {
|
|
3951
|
-
const f = d.lengthComputable ? d.total : void 0, p = d.loaded, m = f !== void 0 ? Math.min(100, Math.floor(p / f * 100)) : void 0,
|
|
3952
|
-
if (m !== void 0 ? m !== l :
|
|
3953
|
-
m !== void 0 && (l = m), u =
|
|
4006
|
+
const f = d.lengthComputable ? d.total : void 0, p = d.loaded, m = f !== void 0 ? Math.min(100, Math.floor(p / f * 100)) : void 0, b = Date.now();
|
|
4007
|
+
if (m !== void 0 ? m !== l : b - u >= 100) {
|
|
4008
|
+
m !== void 0 && (l = m), u = b;
|
|
3954
4009
|
const x = { bytesUploaded: p };
|
|
3955
4010
|
f !== void 0 && (x.totalBytes = f), m !== void 0 && (x.percent = m), n.onProgress?.(x);
|
|
3956
4011
|
}
|
|
3957
4012
|
}), a.onload = () => {
|
|
3958
4013
|
const d = a.status, f = a.responseText ?? "";
|
|
3959
4014
|
if (d < 200 || d >= 300) {
|
|
3960
|
-
i(
|
|
4015
|
+
i(rt(d, Si(f, s)));
|
|
3961
4016
|
return;
|
|
3962
4017
|
}
|
|
3963
4018
|
try {
|
|
3964
|
-
const p =
|
|
4019
|
+
const p = Ni(JSON.parse(f));
|
|
3965
4020
|
if (n.onProgress && t.size > 0) {
|
|
3966
4021
|
const m = {
|
|
3967
4022
|
bytesUploaded: t.size,
|
|
@@ -3988,8 +4043,8 @@ function ui(e, t, n, s) {
|
|
|
3988
4043
|
a.send(o);
|
|
3989
4044
|
});
|
|
3990
4045
|
}
|
|
3991
|
-
function
|
|
3992
|
-
if (!
|
|
4046
|
+
function Ni(e) {
|
|
4047
|
+
if (!Ti(e)) throw h.other("decode response: attachment must be an object");
|
|
3993
4048
|
const { id: t, name: n, contentType: s, url: r } = e;
|
|
3994
4049
|
if (typeof t != "string" || typeof n != "string" || typeof s != "string")
|
|
3995
4050
|
throw h.other("decode response: attachment id, name, and contentType must be strings");
|
|
@@ -3997,17 +4052,17 @@ function li(e) {
|
|
|
3997
4052
|
throw h.other("decode response: attachment url must be a string when present");
|
|
3998
4053
|
return { id: t, name: n, contentType: s, ...r !== void 0 ? { url: r } : {} };
|
|
3999
4054
|
}
|
|
4000
|
-
function
|
|
4055
|
+
function Ti(e) {
|
|
4001
4056
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
4002
4057
|
}
|
|
4003
|
-
function
|
|
4058
|
+
function Si(e, t) {
|
|
4004
4059
|
return t ? e.split(t).join("[REDACTED]") : e;
|
|
4005
4060
|
}
|
|
4006
|
-
function
|
|
4061
|
+
function ki(e, t) {
|
|
4007
4062
|
if (e.size === 0)
|
|
4008
4063
|
return { ok: !1, error: h.attachment("EMPTY_FILE", `Empty file: ${e.name}`) };
|
|
4009
4064
|
if (!t) return { ok: !0 };
|
|
4010
|
-
const n =
|
|
4065
|
+
const n = Ai(e.type);
|
|
4011
4066
|
if (!n)
|
|
4012
4067
|
return {
|
|
4013
4068
|
ok: !1,
|
|
@@ -4031,31 +4086,31 @@ function fi(e, t) {
|
|
|
4031
4086
|
)
|
|
4032
4087
|
} : { ok: !0 };
|
|
4033
4088
|
}
|
|
4034
|
-
function
|
|
4089
|
+
function Ai(e) {
|
|
4035
4090
|
return e ? e.startsWith("image/") ? "images" : e.startsWith("video/") ? "videos" : e.startsWith("audio/") ? "audio" : e.startsWith("application/") || e.startsWith("text/") || e === "application/pdf" ? "documents" : null : null;
|
|
4036
4091
|
}
|
|
4037
|
-
const
|
|
4038
|
-
function
|
|
4039
|
-
const e = localStorage.getItem(
|
|
4092
|
+
const sn = "origonWebSdkUserId";
|
|
4093
|
+
function vi() {
|
|
4094
|
+
const e = localStorage.getItem(sn);
|
|
4040
4095
|
if (e) return e;
|
|
4041
|
-
const t =
|
|
4042
|
-
return localStorage.setItem(
|
|
4096
|
+
const t = bn();
|
|
4097
|
+
return localStorage.setItem(sn, t), t;
|
|
4043
4098
|
}
|
|
4044
|
-
const
|
|
4099
|
+
const Ri = (1n << 62n) - 1n;
|
|
4045
4100
|
class y extends Error {
|
|
4046
4101
|
constructor(t) {
|
|
4047
4102
|
super(t), this.name = "CodecError";
|
|
4048
4103
|
}
|
|
4049
4104
|
}
|
|
4050
|
-
function
|
|
4105
|
+
function _i(e) {
|
|
4051
4106
|
if (e < 0n) throw new y(`negative varint: ${e}`);
|
|
4052
4107
|
if (e <= 63n) return 1;
|
|
4053
4108
|
if (e <= 16383n) return 2;
|
|
4054
4109
|
if (e <= 1073741823n) return 4;
|
|
4055
|
-
if (e <=
|
|
4110
|
+
if (e <= Ri) return 8;
|
|
4056
4111
|
throw new y(`varint overflow: ${e}`);
|
|
4057
4112
|
}
|
|
4058
|
-
class
|
|
4113
|
+
class G {
|
|
4059
4114
|
constructor() {
|
|
4060
4115
|
this.chunks = [], this.len = 0;
|
|
4061
4116
|
}
|
|
@@ -4077,7 +4132,7 @@ class X {
|
|
|
4077
4132
|
this.chunks.push(t), this.len += t.length;
|
|
4078
4133
|
}
|
|
4079
4134
|
putVarint(t) {
|
|
4080
|
-
const n = typeof t == "number" ? BigInt(t) : t, s =
|
|
4135
|
+
const n = typeof t == "number" ? BigInt(t) : t, s = _i(n);
|
|
4081
4136
|
switch (s) {
|
|
4082
4137
|
case 1:
|
|
4083
4138
|
this.putU8(Number(n));
|
|
@@ -4116,7 +4171,7 @@ class X {
|
|
|
4116
4171
|
return t;
|
|
4117
4172
|
}
|
|
4118
4173
|
}
|
|
4119
|
-
class
|
|
4174
|
+
class we {
|
|
4120
4175
|
constructor(t) {
|
|
4121
4176
|
this.buf = t, this.offset = 0;
|
|
4122
4177
|
}
|
|
@@ -4197,9 +4252,9 @@ class ye {
|
|
|
4197
4252
|
return new TextDecoder("utf-8", { fatal: !0 }).decode(this.getLengthPrefixedBytes());
|
|
4198
4253
|
}
|
|
4199
4254
|
}
|
|
4200
|
-
function
|
|
4255
|
+
function Oi(e) {
|
|
4201
4256
|
try {
|
|
4202
|
-
const t = new
|
|
4257
|
+
const t = new we(e);
|
|
4203
4258
|
t.getVarint();
|
|
4204
4259
|
const n = t.getVarint();
|
|
4205
4260
|
return t.position() + Number(n);
|
|
@@ -4207,16 +4262,16 @@ function Ei(e) {
|
|
|
4207
4262
|
return null;
|
|
4208
4263
|
}
|
|
4209
4264
|
}
|
|
4210
|
-
const
|
|
4211
|
-
function
|
|
4212
|
-
const t = new
|
|
4265
|
+
const Ci = 1, ts = 2, Di = 4, Ui = 8, Li = 32;
|
|
4266
|
+
function Mi(e) {
|
|
4267
|
+
const t = new G(), n = e.endOfGroup ? ts : 0;
|
|
4213
4268
|
return t.putVarint(n), t.putVarint(e.trackAlias), t.putVarint(e.groupId), t.putVarint(e.objectId), t.putU8(e.publisherPriority & 255), t.putBytes(e.payload), t.toUint8Array();
|
|
4214
4269
|
}
|
|
4215
|
-
function
|
|
4216
|
-
const t = new
|
|
4270
|
+
function xi(e) {
|
|
4271
|
+
const t = new we(e), n = Number(t.getVarint());
|
|
4217
4272
|
if (!(n >= 0 && n <= 15 || n >= 32 && n <= 47))
|
|
4218
4273
|
throw new y(`invalid ObjectDatagram type byte 0x${n.toString(16)}`);
|
|
4219
|
-
const s = (n &
|
|
4274
|
+
const s = (n & Ci) !== 0, r = (n & ts) !== 0, i = (n & Di) !== 0, a = (n & Ui) !== 0, o = (n & Li) !== 0;
|
|
4220
4275
|
if (o && r)
|
|
4221
4276
|
throw new y("status datagram cannot also be end-of-group");
|
|
4222
4277
|
const l = t.getVarint(), u = t.getVarint(), d = i ? 1n : t.getVarint(), f = a ? 0 : t.getU8();
|
|
@@ -4248,15 +4303,15 @@ const ie = {
|
|
|
4248
4303
|
AudioObject: 0,
|
|
4249
4304
|
AudioFeedback: 1
|
|
4250
4305
|
};
|
|
4251
|
-
function
|
|
4306
|
+
function rn(e, t) {
|
|
4252
4307
|
const n = new Uint8Array(t.length + 1);
|
|
4253
4308
|
return n[0] = e, n.set(t, 1), n;
|
|
4254
4309
|
}
|
|
4255
|
-
function
|
|
4310
|
+
function Pi(e) {
|
|
4256
4311
|
if (e.length === 0) throw new y("empty datagram envelope");
|
|
4257
4312
|
return { cls: e[0], body: e.subarray(1) };
|
|
4258
4313
|
}
|
|
4259
|
-
const
|
|
4314
|
+
const Fe = 64 * 1024, N = {
|
|
4260
4315
|
CONNECT: 0x40n,
|
|
4261
4316
|
CONNECT_OK: 0x41n,
|
|
4262
4317
|
NEGOTIATE_MEDIA: 0x42n,
|
|
@@ -4269,45 +4324,54 @@ const Pe = 64 * 1024, S = {
|
|
|
4269
4324
|
// 0x4A-0x4B = Hangup / HangupOk — removed upstream
|
|
4270
4325
|
RESUME: 0x4cn,
|
|
4271
4326
|
RESUME_OK: 0x4dn,
|
|
4272
|
-
// 0x4E-0x4F =
|
|
4327
|
+
// 0x4E-0x4F = abandoned draft SendDtmf ids; reserved
|
|
4273
4328
|
// 0x50 = EndpointHeld — intentionally not implemented
|
|
4274
4329
|
ENDPOINT_MUTED: 0x51n,
|
|
4275
4330
|
ENDPOINT_HANGUP: 0x52n,
|
|
4276
4331
|
PEER_STATE_CHANGED: 0x53n,
|
|
4277
|
-
// 0x54 =
|
|
4278
|
-
MOQ_ERROR: 0x55n
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4332
|
+
// 0x54 = retired legacy DTMF server push; permanently reserved
|
|
4333
|
+
MOQ_ERROR: 0x55n,
|
|
4334
|
+
// 0x56-0x57 = feedback verbs moved to datagrams; reserved
|
|
4335
|
+
SEND_DTMF: 0x58n,
|
|
4336
|
+
SEND_DTMF_OK: 0x59n
|
|
4337
|
+
}, Vi = "0123456789*#ABCD";
|
|
4338
|
+
function ns(e) {
|
|
4339
|
+
return e.length === 1 && Vi.includes(e);
|
|
4340
|
+
}
|
|
4341
|
+
function Fi(e) {
|
|
4342
|
+
const t = new G(), { msgType: n, payload: s } = Bi(e);
|
|
4343
|
+
if (s.length > Fe)
|
|
4344
|
+
throw new y(`control frame payload ${s.length} > ${Fe}`);
|
|
4284
4345
|
return t.putVarint(n), t.putVarint(s.length), t.putBytes(s), t.toUint8Array();
|
|
4285
4346
|
}
|
|
4286
|
-
function
|
|
4287
|
-
const t =
|
|
4347
|
+
function Gi(e) {
|
|
4348
|
+
const t = Oi(e);
|
|
4288
4349
|
if (t === null || t > e.length) return null;
|
|
4289
|
-
const n = new
|
|
4290
|
-
if (r >
|
|
4350
|
+
const n = new we(e), s = n.getVarint(), r = Number(n.getVarint());
|
|
4351
|
+
if (r > Fe)
|
|
4291
4352
|
throw new y(`oversized payload ${r}`);
|
|
4292
4353
|
const i = n.getBytes(r);
|
|
4293
|
-
return { msg:
|
|
4354
|
+
return { msg: Yi(s, i), consumed: t };
|
|
4294
4355
|
}
|
|
4295
|
-
function
|
|
4356
|
+
function Bi(e) {
|
|
4296
4357
|
switch (e.type) {
|
|
4297
4358
|
case "connect":
|
|
4298
|
-
return { msgType:
|
|
4359
|
+
return { msgType: N.CONNECT, payload: sa(e.data) };
|
|
4299
4360
|
case "negotiateMedia":
|
|
4300
|
-
return { msgType:
|
|
4361
|
+
return { msgType: N.NEGOTIATE_MEDIA, payload: ra(e.data) };
|
|
4301
4362
|
case "mute":
|
|
4302
|
-
return { msgType:
|
|
4363
|
+
return { msgType: N.MUTE, payload: ia(e.data) };
|
|
4303
4364
|
case "resume":
|
|
4304
|
-
return { msgType:
|
|
4365
|
+
return { msgType: N.RESUME, payload: aa(e.data) };
|
|
4366
|
+
case "sendDtmf":
|
|
4367
|
+
return { msgType: N.SEND_DTMF, payload: oa(e.data) };
|
|
4305
4368
|
// The remaining variants are server-emitted; we never encode them
|
|
4306
4369
|
// outbound. Including the cases keeps the union exhaustive.
|
|
4307
4370
|
case "connectOk":
|
|
4308
4371
|
case "negotiateMediaOk":
|
|
4309
4372
|
case "muteOk":
|
|
4310
4373
|
case "resumeOk":
|
|
4374
|
+
case "sendDtmfOk":
|
|
4311
4375
|
case "peerAttached":
|
|
4312
4376
|
case "peerDetached":
|
|
4313
4377
|
case "endpointMuted":
|
|
@@ -4317,39 +4381,42 @@ function _i(e) {
|
|
|
4317
4381
|
throw new y(`refusing to encode server-emitted variant '${e.type}'`);
|
|
4318
4382
|
}
|
|
4319
4383
|
}
|
|
4320
|
-
function
|
|
4321
|
-
const n = new
|
|
4384
|
+
function Yi(e, t) {
|
|
4385
|
+
const n = new we(t);
|
|
4322
4386
|
let s;
|
|
4323
4387
|
switch (e) {
|
|
4324
|
-
case
|
|
4325
|
-
s = { type: "connectOk", data:
|
|
4388
|
+
case N.CONNECT_OK:
|
|
4389
|
+
s = { type: "connectOk", data: ca(n) };
|
|
4326
4390
|
break;
|
|
4327
|
-
case
|
|
4328
|
-
s = { type: "negotiateMediaOk", data:
|
|
4391
|
+
case N.NEGOTIATE_MEDIA_OK:
|
|
4392
|
+
s = { type: "negotiateMediaOk", data: ua(n) };
|
|
4329
4393
|
break;
|
|
4330
|
-
case
|
|
4331
|
-
s = { type: "muteOk", data:
|
|
4394
|
+
case N.MUTE_OK:
|
|
4395
|
+
s = { type: "muteOk", data: an(n) };
|
|
4332
4396
|
break;
|
|
4333
|
-
case
|
|
4334
|
-
s = { type: "resumeOk", data:
|
|
4397
|
+
case N.RESUME_OK:
|
|
4398
|
+
s = { type: "resumeOk", data: la(n) };
|
|
4335
4399
|
break;
|
|
4336
|
-
case
|
|
4337
|
-
s = { type: "
|
|
4400
|
+
case N.SEND_DTMF_OK:
|
|
4401
|
+
s = { type: "sendDtmfOk", data: an(n) };
|
|
4338
4402
|
break;
|
|
4339
|
-
case
|
|
4340
|
-
s = { type: "
|
|
4403
|
+
case N.PEER_ATTACHED:
|
|
4404
|
+
s = { type: "peerAttached", data: da(n) };
|
|
4341
4405
|
break;
|
|
4342
|
-
case
|
|
4343
|
-
s = { type: "
|
|
4406
|
+
case N.PEER_DETACHED:
|
|
4407
|
+
s = { type: "peerDetached", data: ha(n) };
|
|
4344
4408
|
break;
|
|
4345
|
-
case
|
|
4346
|
-
s = { type: "
|
|
4409
|
+
case N.ENDPOINT_MUTED:
|
|
4410
|
+
s = { type: "endpointMuted", data: fa(n) };
|
|
4347
4411
|
break;
|
|
4348
|
-
case
|
|
4349
|
-
s = { type: "
|
|
4412
|
+
case N.ENDPOINT_HANGUP:
|
|
4413
|
+
s = { type: "endpointHangup", data: ma(n) };
|
|
4350
4414
|
break;
|
|
4351
|
-
case
|
|
4352
|
-
s = { type: "
|
|
4415
|
+
case N.PEER_STATE_CHANGED:
|
|
4416
|
+
s = { type: "peerStateChanged", data: pa(n) };
|
|
4417
|
+
break;
|
|
4418
|
+
case N.MOQ_ERROR:
|
|
4419
|
+
s = { type: "moqError", data: ga(n) };
|
|
4353
4420
|
break;
|
|
4354
4421
|
default:
|
|
4355
4422
|
throw new y(`unknown control message type 0x${e.toString(16)}`);
|
|
@@ -4360,17 +4427,17 @@ function vi(e, t) {
|
|
|
4360
4427
|
);
|
|
4361
4428
|
return s;
|
|
4362
4429
|
}
|
|
4363
|
-
function
|
|
4430
|
+
function $i(e) {
|
|
4364
4431
|
switch (e) {
|
|
4365
4432
|
case "audio":
|
|
4366
4433
|
return 1n;
|
|
4367
4434
|
}
|
|
4368
4435
|
}
|
|
4369
|
-
function
|
|
4436
|
+
function Xi(e) {
|
|
4370
4437
|
if (e === 1n) return "audio";
|
|
4371
4438
|
throw new y(`unknown EncodingClass id ${e}`);
|
|
4372
4439
|
}
|
|
4373
|
-
function
|
|
4440
|
+
function Ki(e) {
|
|
4374
4441
|
switch (e) {
|
|
4375
4442
|
case "primary":
|
|
4376
4443
|
return 1n;
|
|
@@ -4378,12 +4445,12 @@ function Di(e) {
|
|
|
4378
4445
|
return 2n;
|
|
4379
4446
|
}
|
|
4380
4447
|
}
|
|
4381
|
-
function
|
|
4448
|
+
function ji(e) {
|
|
4382
4449
|
if (e === 1n) return "primary";
|
|
4383
4450
|
if (e === 2n) return "captions";
|
|
4384
4451
|
throw new y(`unknown TrackPurpose id ${e}`);
|
|
4385
4452
|
}
|
|
4386
|
-
function
|
|
4453
|
+
function Wi(e) {
|
|
4387
4454
|
switch (e) {
|
|
4388
4455
|
case "opus":
|
|
4389
4456
|
return 1n;
|
|
@@ -4393,13 +4460,13 @@ function Li(e) {
|
|
|
4393
4460
|
return 3n;
|
|
4394
4461
|
}
|
|
4395
4462
|
}
|
|
4396
|
-
function
|
|
4463
|
+
function it(e) {
|
|
4397
4464
|
if (e === 1n) return "opus";
|
|
4398
4465
|
if (e === 2n) return "pcmu";
|
|
4399
4466
|
if (e === 3n) return "pcma";
|
|
4400
4467
|
throw new y(`unknown AudioCodec id ${e}`);
|
|
4401
4468
|
}
|
|
4402
|
-
function
|
|
4469
|
+
function qi(e) {
|
|
4403
4470
|
switch (e) {
|
|
4404
4471
|
case "none":
|
|
4405
4472
|
return 0n;
|
|
@@ -4411,165 +4478,171 @@ function Mi(e) {
|
|
|
4411
4478
|
return 3n;
|
|
4412
4479
|
}
|
|
4413
4480
|
}
|
|
4414
|
-
function
|
|
4481
|
+
function ss(e) {
|
|
4415
4482
|
if (e === 0n) return "none";
|
|
4416
4483
|
if (e === 1n) return "uplink";
|
|
4417
4484
|
if (e === 2n) return "downlink";
|
|
4418
4485
|
if (e === 3n) return "both";
|
|
4419
4486
|
throw new y(`unknown MuteScope id ${e}`);
|
|
4420
4487
|
}
|
|
4421
|
-
function
|
|
4488
|
+
function Hi(e) {
|
|
4422
4489
|
if (e === 1n) return "normal";
|
|
4423
4490
|
if (e === 2n) return "userCancel";
|
|
4424
4491
|
if (e === 3n) return "error";
|
|
4425
4492
|
throw new y(`unknown HangupReason id ${e}`);
|
|
4426
4493
|
}
|
|
4427
|
-
function
|
|
4494
|
+
function rs(e) {
|
|
4428
4495
|
if (e === 1n) return "client";
|
|
4429
4496
|
if (e === 2n) return "controller";
|
|
4430
4497
|
if (e === 3n) return "engine";
|
|
4431
4498
|
if (e === 4n) return "networkLost";
|
|
4432
4499
|
throw new y(`unknown Origin id ${e}`);
|
|
4433
4500
|
}
|
|
4434
|
-
function
|
|
4501
|
+
function Zi(e) {
|
|
4435
4502
|
if (e === 1n) return "active";
|
|
4436
4503
|
if (e === 2n) return "held";
|
|
4437
4504
|
if (e === 3n) return "muted";
|
|
4438
4505
|
if (e === 4n) return "hangup";
|
|
4439
4506
|
throw new y(`unknown PeerState id ${e}`);
|
|
4440
4507
|
}
|
|
4441
|
-
function
|
|
4508
|
+
function zi(e) {
|
|
4442
4509
|
if (e === 1n) return "codecMismatch";
|
|
4443
4510
|
if (e === 2n) return "unsupportedClass";
|
|
4444
4511
|
if (e === 3n) return "capacityExceeded";
|
|
4445
4512
|
throw new y(`unknown TrackRejectionReason id ${e}`);
|
|
4446
4513
|
}
|
|
4447
|
-
function
|
|
4448
|
-
t.putVarint(
|
|
4449
|
-
for (const n of e.codecs) t.putVarint(
|
|
4514
|
+
function Qi(e, t) {
|
|
4515
|
+
t.putVarint($i(e.class)), t.putVarint(Ki(e.purpose)), t.putVarint(e.codecs.length);
|
|
4516
|
+
for (const n of e.codecs) t.putVarint(Wi(n));
|
|
4450
4517
|
}
|
|
4451
|
-
function
|
|
4518
|
+
function is(e, t) {
|
|
4452
4519
|
t.putVarint(e.length);
|
|
4453
|
-
for (const n of e)
|
|
4520
|
+
for (const n of e) Qi(n, t);
|
|
4454
4521
|
}
|
|
4455
|
-
function
|
|
4522
|
+
function Ji(e) {
|
|
4456
4523
|
return {
|
|
4457
4524
|
offerIndex: Number(e.getVarint()),
|
|
4458
4525
|
alias: e.getVarint(),
|
|
4459
|
-
codec:
|
|
4526
|
+
codec: it(e.getVarint()),
|
|
4460
4527
|
frameSizeMs: Number(e.getVarint())
|
|
4461
4528
|
};
|
|
4462
4529
|
}
|
|
4463
|
-
function
|
|
4530
|
+
function as(e) {
|
|
4464
4531
|
const t = Number(e.getVarint()), n = [];
|
|
4465
|
-
for (let s = 0; s < t; s++) n.push(
|
|
4532
|
+
for (let s = 0; s < t; s++) n.push(Ji(e));
|
|
4466
4533
|
return n;
|
|
4467
4534
|
}
|
|
4468
|
-
function
|
|
4535
|
+
function ea(e) {
|
|
4469
4536
|
return {
|
|
4470
4537
|
offerIndex: Number(e.getVarint()),
|
|
4471
|
-
reason:
|
|
4538
|
+
reason: zi(e.getVarint())
|
|
4472
4539
|
};
|
|
4473
4540
|
}
|
|
4474
|
-
function
|
|
4541
|
+
function os(e) {
|
|
4475
4542
|
const t = Number(e.getVarint()), n = [];
|
|
4476
|
-
for (let s = 0; s < t; s++) n.push(
|
|
4543
|
+
for (let s = 0; s < t; s++) n.push(ea(e));
|
|
4477
4544
|
return n;
|
|
4478
4545
|
}
|
|
4479
|
-
function
|
|
4546
|
+
function ta(e) {
|
|
4480
4547
|
return {
|
|
4481
4548
|
peerEndpointId: e.getString(),
|
|
4482
4549
|
alias: e.getVarint(),
|
|
4483
|
-
codec:
|
|
4550
|
+
codec: it(e.getVarint())
|
|
4484
4551
|
};
|
|
4485
4552
|
}
|
|
4486
|
-
function
|
|
4487
|
-
const t = e.getVarint(), n =
|
|
4488
|
-
for (let a = 0; a < r; a++) i.push(
|
|
4553
|
+
function na(e) {
|
|
4554
|
+
const t = e.getVarint(), n = ss(e.getVarint()), s = e.getVarint() !== 0n, r = Number(e.getVarint()), i = [];
|
|
4555
|
+
for (let a = 0; a < r; a++) i.push(ta(e));
|
|
4489
4556
|
return { sessionSeq: t, mute: n, held: s, peers: i };
|
|
4490
4557
|
}
|
|
4491
|
-
function
|
|
4492
|
-
const t = new
|
|
4493
|
-
return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putString(e.sdkName), t.putString(e.sdkVersion),
|
|
4558
|
+
function sa(e) {
|
|
4559
|
+
const t = new G();
|
|
4560
|
+
return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putString(e.sdkName), t.putString(e.sdkVersion), is(e.offers, t), t.putVarint(e.frameSizeMs), t.toUint8Array();
|
|
4494
4561
|
}
|
|
4495
|
-
function
|
|
4496
|
-
const t = new
|
|
4497
|
-
return t.putVarint(e.requestId),
|
|
4562
|
+
function ra(e) {
|
|
4563
|
+
const t = new G();
|
|
4564
|
+
return t.putVarint(e.requestId), is(e.offers, t), t.putVarint(e.frameSizeMs), t.toUint8Array();
|
|
4498
4565
|
}
|
|
4499
|
-
function
|
|
4500
|
-
const t = new
|
|
4501
|
-
return t.putVarint(e.requestId), t.putVarint(
|
|
4566
|
+
function ia(e) {
|
|
4567
|
+
const t = new G();
|
|
4568
|
+
return t.putVarint(e.requestId), t.putVarint(qi(e.scope)), t.toUint8Array();
|
|
4502
4569
|
}
|
|
4503
|
-
function
|
|
4504
|
-
const t = new
|
|
4570
|
+
function aa(e) {
|
|
4571
|
+
const t = new G();
|
|
4505
4572
|
return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putVarint(e.lastEventSeq), t.toUint8Array();
|
|
4506
4573
|
}
|
|
4507
|
-
function
|
|
4574
|
+
function oa(e) {
|
|
4575
|
+
if (!ns(e.digit))
|
|
4576
|
+
throw new y("invalid DTMF symbol");
|
|
4577
|
+
const t = new G();
|
|
4578
|
+
return t.putVarint(e.requestId), t.putU8(e.digit.charCodeAt(0)), t.toUint8Array();
|
|
4579
|
+
}
|
|
4580
|
+
function ca(e) {
|
|
4508
4581
|
return {
|
|
4509
4582
|
requestId: e.getVarint(),
|
|
4510
4583
|
serverEpochUnix: e.getVarint(),
|
|
4511
4584
|
canonicalPcmRate: Number(e.getVarint()),
|
|
4512
|
-
bindings:
|
|
4513
|
-
rejected:
|
|
4585
|
+
bindings: as(e),
|
|
4586
|
+
rejected: os(e)
|
|
4514
4587
|
};
|
|
4515
4588
|
}
|
|
4516
|
-
function
|
|
4589
|
+
function ua(e) {
|
|
4517
4590
|
return {
|
|
4518
4591
|
requestId: e.getVarint(),
|
|
4519
|
-
bindings:
|
|
4520
|
-
rejected:
|
|
4592
|
+
bindings: as(e),
|
|
4593
|
+
rejected: os(e)
|
|
4521
4594
|
};
|
|
4522
4595
|
}
|
|
4523
|
-
function
|
|
4596
|
+
function an(e) {
|
|
4524
4597
|
return { requestId: e.getVarint() };
|
|
4525
4598
|
}
|
|
4526
|
-
function
|
|
4599
|
+
function la(e) {
|
|
4527
4600
|
return {
|
|
4528
4601
|
requestId: e.getVarint(),
|
|
4529
|
-
state:
|
|
4602
|
+
state: na(e)
|
|
4530
4603
|
};
|
|
4531
4604
|
}
|
|
4532
|
-
function
|
|
4605
|
+
function da(e) {
|
|
4533
4606
|
return {
|
|
4534
4607
|
requestId: e.getVarint(),
|
|
4535
4608
|
peerEndpointId: e.getString(),
|
|
4536
4609
|
alias: e.getVarint(),
|
|
4537
|
-
class:
|
|
4538
|
-
purpose:
|
|
4539
|
-
codec:
|
|
4610
|
+
class: Xi(e.getVarint()),
|
|
4611
|
+
purpose: ji(e.getVarint()),
|
|
4612
|
+
codec: it(e.getVarint()),
|
|
4540
4613
|
frameSizeMs: Number(e.getVarint())
|
|
4541
4614
|
};
|
|
4542
4615
|
}
|
|
4543
|
-
function
|
|
4616
|
+
function ha(e) {
|
|
4544
4617
|
return {
|
|
4545
4618
|
requestId: e.getVarint(),
|
|
4546
4619
|
peerEndpointId: e.getString()
|
|
4547
4620
|
};
|
|
4548
4621
|
}
|
|
4549
|
-
function
|
|
4622
|
+
function fa(e) {
|
|
4550
4623
|
return {
|
|
4551
4624
|
requestId: e.getVarint(),
|
|
4552
4625
|
endpointId: e.getString(),
|
|
4553
|
-
scope:
|
|
4554
|
-
origin:
|
|
4626
|
+
scope: ss(e.getVarint()),
|
|
4627
|
+
origin: rs(e.getVarint())
|
|
4555
4628
|
};
|
|
4556
4629
|
}
|
|
4557
|
-
function
|
|
4630
|
+
function ma(e) {
|
|
4558
4631
|
return {
|
|
4559
4632
|
requestId: e.getVarint(),
|
|
4560
4633
|
endpointId: e.getString(),
|
|
4561
|
-
reason:
|
|
4562
|
-
origin:
|
|
4634
|
+
reason: Hi(e.getVarint()),
|
|
4635
|
+
origin: rs(e.getVarint())
|
|
4563
4636
|
};
|
|
4564
4637
|
}
|
|
4565
|
-
function
|
|
4638
|
+
function pa(e) {
|
|
4566
4639
|
return {
|
|
4567
4640
|
requestId: e.getVarint(),
|
|
4568
4641
|
peerEndpointId: e.getString(),
|
|
4569
|
-
state:
|
|
4642
|
+
state: Zi(e.getVarint())
|
|
4570
4643
|
};
|
|
4571
4644
|
}
|
|
4572
|
-
function
|
|
4645
|
+
function ga(e) {
|
|
4573
4646
|
const t = e.getVarint();
|
|
4574
4647
|
let n;
|
|
4575
4648
|
if (t === 0n)
|
|
@@ -4579,9 +4652,9 @@ function sa(e) {
|
|
|
4579
4652
|
else
|
|
4580
4653
|
throw new y(`MoqError.request_id present tag ${t} not in {0,1}`);
|
|
4581
4654
|
const s = e.getVarint(), r = e.getString();
|
|
4582
|
-
return { requestId: n, code:
|
|
4655
|
+
return { requestId: n, code: ba(s), rawCode: s, detail: r };
|
|
4583
4656
|
}
|
|
4584
|
-
function
|
|
4657
|
+
function ba(e) {
|
|
4585
4658
|
switch (e) {
|
|
4586
4659
|
case 0x1001n:
|
|
4587
4660
|
return "endpointNotProvisioned";
|
|
@@ -4609,7 +4682,7 @@ function ra(e) {
|
|
|
4609
4682
|
return null;
|
|
4610
4683
|
}
|
|
4611
4684
|
}
|
|
4612
|
-
const
|
|
4685
|
+
const Ea = /* @__PURE__ */ new Set([
|
|
4613
4686
|
"sessionEnded",
|
|
4614
4687
|
"tokenInvalid",
|
|
4615
4688
|
"tokenExpired",
|
|
@@ -4647,7 +4720,7 @@ class be {
|
|
|
4647
4720
|
}
|
|
4648
4721
|
/** Encode + write one control frame. Honours WT backpressure. */
|
|
4649
4722
|
async sendControl(t) {
|
|
4650
|
-
const n =
|
|
4723
|
+
const n = Fi(t);
|
|
4651
4724
|
await this.controlWriter.ready, await this.controlWriter.write(n);
|
|
4652
4725
|
}
|
|
4653
4726
|
/**
|
|
@@ -4659,7 +4732,7 @@ class be {
|
|
|
4659
4732
|
let t = new Uint8Array(0);
|
|
4660
4733
|
for (; ; ) {
|
|
4661
4734
|
for (; ; ) {
|
|
4662
|
-
const i =
|
|
4735
|
+
const i = Gi(t);
|
|
4663
4736
|
if (!i) break;
|
|
4664
4737
|
yield i.msg, t = t.subarray(i.consumed);
|
|
4665
4738
|
}
|
|
@@ -4734,8 +4807,8 @@ class be {
|
|
|
4734
4807
|
}
|
|
4735
4808
|
}
|
|
4736
4809
|
}
|
|
4737
|
-
const
|
|
4738
|
-
class
|
|
4810
|
+
const ya = 2e3;
|
|
4811
|
+
class wa {
|
|
4739
4812
|
constructor(t) {
|
|
4740
4813
|
this.ctx = null, this.node = null, this.micStream = null, this.micSource = null, this.silenceSource = null, this.micDiagAnalyser = null, this.micDiagTimer = null, this.outboundCallback = null, this.downlinkFeedbackCallback = null, this.captureGeneration = 0, this.outboundCaptureGeneration = null, this.outputGateEpoch = 0, this.captureCommandId = 0, this.captureAcks = /* @__PURE__ */ new Map(), this.options = {
|
|
4741
4814
|
wasmUrl: t.wasmUrl,
|
|
@@ -4945,7 +5018,7 @@ class oa {
|
|
|
4945
5018
|
const n = ++this.captureCommandId, s = new Promise((r, i) => {
|
|
4946
5019
|
const a = setTimeout(() => {
|
|
4947
5020
|
this.captureAcks.get(n)?.expected === t && (this.captureAcks.delete(n), i(new Error(`${t} acknowledgement timed out`)));
|
|
4948
|
-
},
|
|
5021
|
+
}, ya);
|
|
4949
5022
|
this.captureAcks.set(n, { expected: t, resolve: r, reject: i, timeout: a });
|
|
4950
5023
|
});
|
|
4951
5024
|
return { commandId: n, ack: s };
|
|
@@ -4972,16 +5045,16 @@ class oa {
|
|
|
4972
5045
|
}
|
|
4973
5046
|
}
|
|
4974
5047
|
}
|
|
4975
|
-
const
|
|
4976
|
-
function
|
|
5048
|
+
const on = [100, 250, 500, 1e3], Ia = 1e4, Na = 50;
|
|
5049
|
+
function cn(e, t) {
|
|
4977
5050
|
return new URL(t, e.endsWith("/") ? e : `${e}/`).href;
|
|
4978
5051
|
}
|
|
4979
|
-
const
|
|
4980
|
-
class
|
|
5052
|
+
const Ta = new URL("./audio/wasm-gen/origon_web_audio_bg.wasm?no-inline", import.meta.url).href, Sa = new URL("./audio/audio-processor.js?no-inline", import.meta.url).href;
|
|
5053
|
+
class ka {
|
|
4981
5054
|
constructor(t, n) {
|
|
4982
|
-
this.transport = null, this.requestIdCtr = 1n, this.uplinkAlias = null, this.peerAliasByEndpoint = /* @__PURE__ */ new Map(), this.pendingRequests = /* @__PURE__ */ new Map(), this.closedTransports = /* @__PURE__ */ new WeakSet(), this.lastEventSeq = 0n, this.terminalReason = null, this.statsSubscriberCount = 0, this.latestStats = null, this.statsSubscribers = /* @__PURE__ */ new Set(), this.currentMuteScope = "none", this.startGeneration = 0, this.captureTransition = Promise.resolve(), this.captureGeneration = 0, this.localCaptureEnabled = !1, this.desiredCoach = !1, this.diagTx = 0, this.diagRx = 0, this.diagLastStatsLog = 0, this.sessionId = t.sessionId, this.url = `${t.url.replace(/\/$/, "")}/web`, this.callToken = t.token, this.dispatcher = n.dispatcher, this.onTerminal = n.onTerminal;
|
|
4983
|
-
const s = n.assetBaseUrl ?
|
|
4984
|
-
this.host = new
|
|
5055
|
+
this.transport = null, this.requestIdCtr = 1n, this.uplinkAlias = null, this.peerAliasByEndpoint = /* @__PURE__ */ new Map(), this.pendingRequests = /* @__PURE__ */ new Map(), this.closedTransports = /* @__PURE__ */ new WeakSet(), this.lastEventSeq = 0n, this.terminalReason = null, this.controlReady = !1, this.statsSubscriberCount = 0, this.latestStats = null, this.statsSubscribers = /* @__PURE__ */ new Set(), this.currentMuteScope = "none", this.startGeneration = 0, this.captureTransition = Promise.resolve(), this.captureGeneration = 0, this.localCaptureEnabled = !1, this.desiredCoach = !1, this.diagTx = 0, this.diagRx = 0, this.diagLastStatsLog = 0, this.sessionId = t.sessionId, this.url = `${t.url.replace(/\/$/, "")}/web`, this.callToken = t.token, this.dispatcher = n.dispatcher, this.onTerminal = n.onTerminal;
|
|
5056
|
+
const s = n.assetBaseUrl ? cn(n.assetBaseUrl, "audio/wasm-gen/origon_web_audio_bg.wasm") : Ta, r = n.assetBaseUrl ? cn(n.assetBaseUrl, "audio/audio-processor.js") : Sa;
|
|
5057
|
+
this.host = new wa({
|
|
4985
5058
|
wasmUrl: s,
|
|
4986
5059
|
processorUrl: r,
|
|
4987
5060
|
onStats: (i) => this.handleHostStats(i),
|
|
@@ -4996,7 +5069,7 @@ class ha {
|
|
|
4996
5069
|
const n = this.startGeneration;
|
|
4997
5070
|
this.assertStartActive(n), await this.host.start(), this.assertStartActive(n), this.host.onOutboundDatagram((s) => {
|
|
4998
5071
|
this.diagTx += 1, this.diagTx === 1 || this.diagTx % 100;
|
|
4999
|
-
const r =
|
|
5072
|
+
const r = rn(ie.AudioObject, s);
|
|
5000
5073
|
this.transport?.sendDatagram(r).catch(() => {
|
|
5001
5074
|
});
|
|
5002
5075
|
}), this.host.onDownlinkFeedback((s) => {
|
|
@@ -5006,7 +5079,7 @@ class ha {
|
|
|
5006
5079
|
if (r += 2, r + i > s.length) break;
|
|
5007
5080
|
const a = s.subarray(r, r + i);
|
|
5008
5081
|
r += i;
|
|
5009
|
-
const o =
|
|
5082
|
+
const o = rn(ie.AudioFeedback, a);
|
|
5010
5083
|
this.transport?.sendDatagram(o).catch(() => {
|
|
5011
5084
|
});
|
|
5012
5085
|
}
|
|
@@ -5017,7 +5090,7 @@ class ha {
|
|
|
5017
5090
|
}
|
|
5018
5091
|
/** Graceful local close. */
|
|
5019
5092
|
async disconnect() {
|
|
5020
|
-
this.startGeneration += 1, this.captureGeneration += 1, this.host.closeCapture(), this.localCaptureEnabled = !1, this.desiredCoach = !1, this.terminalReason === null && (this.terminalReason = { kind: "localClose" }), this.rejectPendingRequests(new Error("voice session disconnected")), this.transport?.close({ closeCode: 0, reason: "" }), await this.host.dispose();
|
|
5093
|
+
this.startGeneration += 1, this.captureGeneration += 1, this.controlReady = !1, this.host.closeCapture(), this.localCaptureEnabled = !1, this.desiredCoach = !1, this.terminalReason === null && (this.terminalReason = { kind: "localClose" }), this.rejectPendingRequests(new Error("voice session disconnected")), this.transport?.close({ closeCode: 0, reason: "" }), await this.host.dispose();
|
|
5021
5094
|
}
|
|
5022
5095
|
/**
|
|
5023
5096
|
* Re-tag this session's id in place. The media transport is keyed by
|
|
@@ -5037,6 +5110,19 @@ class ha {
|
|
|
5037
5110
|
throw new Error(`expected MuteOk, got ${s.type}`);
|
|
5038
5111
|
this.currentMuteScope = t;
|
|
5039
5112
|
}
|
|
5113
|
+
/** Send one DTMF symbol to the active CX flow. Never queued across Resume. */
|
|
5114
|
+
async sendDtmf(t) {
|
|
5115
|
+
if (!ns(t))
|
|
5116
|
+
throw new Error("invalid DTMF digit");
|
|
5117
|
+
if (!this.controlReady)
|
|
5118
|
+
throw new Error("DTMF is unavailable while voice transport is not connected");
|
|
5119
|
+
const n = this.nextRequestId(), s = await this.sendRequest(n, {
|
|
5120
|
+
type: "sendDtmf",
|
|
5121
|
+
data: { requestId: n, digit: t }
|
|
5122
|
+
});
|
|
5123
|
+
if (s.type !== "sendDtmfOk")
|
|
5124
|
+
throw new Error(`expected SendDtmfOk, got ${s.type}`);
|
|
5125
|
+
}
|
|
5040
5126
|
/** Listen → Coach: acquire/enable locally while muted, then unmute. */
|
|
5041
5127
|
enableCapture() {
|
|
5042
5128
|
const t = ++this.captureGeneration;
|
|
@@ -5116,7 +5202,7 @@ class ha {
|
|
|
5116
5202
|
const a = i.data, o = a.bindings[0];
|
|
5117
5203
|
if (!o)
|
|
5118
5204
|
throw new Error("ConnectOk has no track bindings");
|
|
5119
|
-
this.uplinkAlias = o.alias, this.host.setServerEpochUnix(a.serverEpochUnix), t ? (this.desiredCoach = !1, await this.setMute("uplink")) : (this.desiredCoach = !0, await this.host.enableCapture(o.alias), this.localCaptureEnabled = !0, await this.host.openCapture()), this.assertStartActive(n), this.dispatcher.fire("onConnected", this.sessionId, "voice"), this.watchTransportClosed();
|
|
5205
|
+
this.uplinkAlias = o.alias, this.host.setServerEpochUnix(a.serverEpochUnix), t ? (this.desiredCoach = !1, await this.setMute("uplink")) : (this.desiredCoach = !0, await this.host.enableCapture(o.alias), this.localCaptureEnabled = !0, await this.host.openCapture()), this.assertStartActive(n), this.controlReady = !0, this.dispatcher.fire("onConnected", this.sessionId, "voice"), this.watchTransportClosed();
|
|
5120
5206
|
}
|
|
5121
5207
|
startReadLoops() {
|
|
5122
5208
|
this.controlReadLoop(), this.datagramReadLoop();
|
|
@@ -5137,7 +5223,7 @@ class ha {
|
|
|
5137
5223
|
for await (const n of t.readDatagrams()) {
|
|
5138
5224
|
let s;
|
|
5139
5225
|
try {
|
|
5140
|
-
const r =
|
|
5226
|
+
const r = Pi(n);
|
|
5141
5227
|
if (r.cls === ie.AudioFeedback) {
|
|
5142
5228
|
this.host.pushUplinkFeedback(r.body);
|
|
5143
5229
|
continue;
|
|
@@ -5149,7 +5235,7 @@ class ha {
|
|
|
5149
5235
|
continue;
|
|
5150
5236
|
}
|
|
5151
5237
|
try {
|
|
5152
|
-
const r =
|
|
5238
|
+
const r = xi(s);
|
|
5153
5239
|
this.diagRx += 1, this.diagRx === 1 || this.diagRx % 100;
|
|
5154
5240
|
} catch {
|
|
5155
5241
|
}
|
|
@@ -5160,7 +5246,7 @@ class ha {
|
|
|
5160
5246
|
}
|
|
5161
5247
|
dispatchInbound(t, n) {
|
|
5162
5248
|
if (n === this.transport) {
|
|
5163
|
-
if (t.type === "connectOk" || t.type === "muteOk" || t.type === "resumeOk" || t.type === "negotiateMediaOk") {
|
|
5249
|
+
if (t.type === "connectOk" || t.type === "muteOk" || t.type === "resumeOk" || t.type === "sendDtmfOk" || t.type === "negotiateMediaOk") {
|
|
5164
5250
|
const s = t.data.requestId, r = this.pendingRequests.get(s);
|
|
5165
5251
|
if (r) {
|
|
5166
5252
|
this.pendingRequests.delete(s), r.resolve(t);
|
|
@@ -5170,7 +5256,7 @@ class ha {
|
|
|
5170
5256
|
}
|
|
5171
5257
|
if ("requestId" in t.data) {
|
|
5172
5258
|
const s = t.data.requestId;
|
|
5173
|
-
s !== null && s !== 0n && (this.lastEventSeq =
|
|
5259
|
+
s !== null && s !== 0n && (this.lastEventSeq = Aa(this.lastEventSeq, s));
|
|
5174
5260
|
}
|
|
5175
5261
|
switch (t.type) {
|
|
5176
5262
|
case "peerAttached": {
|
|
@@ -5203,10 +5289,10 @@ class ha {
|
|
|
5203
5289
|
}
|
|
5204
5290
|
case "moqError": {
|
|
5205
5291
|
const s = t.data.code;
|
|
5206
|
-
if (s === null ||
|
|
5292
|
+
if (s === null || Ea.has(s)) {
|
|
5207
5293
|
const i = s ?? "unknown";
|
|
5208
5294
|
this.enterTerminalState(
|
|
5209
|
-
s === null ? { kind: "protocolViolation" } :
|
|
5295
|
+
s === null ? { kind: "protocolViolation" } : va(s),
|
|
5210
5296
|
new Error(`terminal MoqError ${i}`),
|
|
5211
5297
|
`terminal MoqError ${i}`
|
|
5212
5298
|
);
|
|
@@ -5214,7 +5300,9 @@ class ha {
|
|
|
5214
5300
|
const r = t.data.requestId;
|
|
5215
5301
|
if (r !== null) {
|
|
5216
5302
|
const i = this.pendingRequests.get(r);
|
|
5217
|
-
i && (this.pendingRequests.delete(r), i.reject(new Error(
|
|
5303
|
+
i && (this.pendingRequests.delete(r), i.reject(new Error(
|
|
5304
|
+
i.requestType === "sendDtmf" ? `DTMF request failed: MoqError ${s ?? "unknown"}` : `MoqError ${s ?? "unknown"}: ${t.data.detail}`
|
|
5305
|
+
)));
|
|
5218
5306
|
} else
|
|
5219
5307
|
this.dispatcher.fire(
|
|
5220
5308
|
"onCallError",
|
|
@@ -5236,23 +5324,23 @@ class ha {
|
|
|
5236
5324
|
await t.closed;
|
|
5237
5325
|
} catch {
|
|
5238
5326
|
}
|
|
5239
|
-
if (this.rejectPendingRequestsForTransport(
|
|
5327
|
+
if (this.controlReady = !1, this.rejectPendingRequestsForTransport(
|
|
5240
5328
|
t,
|
|
5241
5329
|
new Error("voice transport closed before control acknowledgement")
|
|
5242
|
-
), this.closedTransports.add(t), this.host.cancelCaptureTransition(!1), this.localCaptureEnabled || (this.captureGeneration += 1, this.host.cancelCaptureTransition(!0)), await
|
|
5330
|
+
), this.closedTransports.add(t), this.host.cancelCaptureTransition(!1), this.localCaptureEnabled || (this.captureGeneration += 1, this.host.cancelCaptureTransition(!0)), await j(Na), this.terminalReason) {
|
|
5243
5331
|
this.host.dispose().catch(() => {
|
|
5244
5332
|
}), this.onTerminal(this.terminalReason, this.sessionId);
|
|
5245
5333
|
return;
|
|
5246
5334
|
}
|
|
5247
5335
|
this.transport === t && (this.transport = null);
|
|
5248
|
-
for (let r = 1; r <=
|
|
5249
|
-
const i =
|
|
5336
|
+
for (let r = 1; r <= on.length && this.isStartActive(n); r++) {
|
|
5337
|
+
const i = on[r - 1];
|
|
5250
5338
|
this.dispatcher.fire("onReconnecting", this.sessionId, "voice", {
|
|
5251
5339
|
attempt: r,
|
|
5252
5340
|
reason: { kind: "networkLoss" }
|
|
5253
5341
|
});
|
|
5254
5342
|
try {
|
|
5255
|
-
await
|
|
5343
|
+
await j(i), this.assertStartActive(n), await this.attemptResume(n), this.assertStartActive(n), this.dispatcher.fire("onReconnected", this.sessionId, "voice"), this.watchTransportClosed();
|
|
5256
5344
|
return;
|
|
5257
5345
|
} catch {
|
|
5258
5346
|
if (this.terminalReason)
|
|
@@ -5278,7 +5366,7 @@ class ha {
|
|
|
5278
5366
|
});
|
|
5279
5367
|
if (r.type !== "resumeOk")
|
|
5280
5368
|
throw new Error(`expected ResumeOk, got ${r.type}`);
|
|
5281
|
-
this.assertStartActive(t), this.restoreFromSnapshot(r.data.state), await this.reopenCaptureAfterResume();
|
|
5369
|
+
this.assertStartActive(t), this.restoreFromSnapshot(r.data.state), await this.reopenCaptureAfterResume(), this.assertStartActive(t), this.controlReady = !0;
|
|
5282
5370
|
}
|
|
5283
5371
|
restoreFromSnapshot(t) {
|
|
5284
5372
|
const n = new Set(t.peers.map((s) => s.peerEndpointId));
|
|
@@ -5327,7 +5415,7 @@ class ha {
|
|
|
5327
5415
|
this.pendingRequests.delete(n), s.reject(t);
|
|
5328
5416
|
}
|
|
5329
5417
|
enterTerminalState(t, n, s) {
|
|
5330
|
-
this.terminalReason = t, this.startGeneration += 1, this.captureGeneration += 1, this.host.cancelCaptureTransition(!0), this.localCaptureEnabled = !1, this.desiredCoach = !1, this.rejectPendingRequests(n), this.transport?.close({ closeCode: 0, reason: s });
|
|
5418
|
+
this.terminalReason = t, this.controlReady = !1, this.startGeneration += 1, this.captureGeneration += 1, this.host.cancelCaptureTransition(!0), this.localCaptureEnabled = !1, this.desiredCoach = !1, this.rejectPendingRequests(n), this.transport?.close({ closeCode: 0, reason: s });
|
|
5331
5419
|
}
|
|
5332
5420
|
rejectPendingRequestsForTransport(t, n) {
|
|
5333
5421
|
for (const [s, r] of this.pendingRequests)
|
|
@@ -5350,9 +5438,10 @@ class ha {
|
|
|
5350
5438
|
}
|
|
5351
5439
|
const a = setTimeout(() => {
|
|
5352
5440
|
this.pendingRequests.delete(t) && r(new Error(`request ${t} timed out`));
|
|
5353
|
-
},
|
|
5441
|
+
}, Ia);
|
|
5354
5442
|
this.pendingRequests.set(t, {
|
|
5355
5443
|
transport: i,
|
|
5444
|
+
requestType: n.type,
|
|
5356
5445
|
resolve: (o) => {
|
|
5357
5446
|
clearTimeout(a), s(o);
|
|
5358
5447
|
},
|
|
@@ -5375,7 +5464,7 @@ class ha {
|
|
|
5375
5464
|
/** Outbound datagram payload — for tests / external pumps. */
|
|
5376
5465
|
encodeAudioObject(t) {
|
|
5377
5466
|
if (this.uplinkAlias === null) throw new Error("uplink alias not negotiated");
|
|
5378
|
-
return
|
|
5467
|
+
return Mi({
|
|
5379
5468
|
trackAlias: this.uplinkAlias,
|
|
5380
5469
|
groupId: t.groupId,
|
|
5381
5470
|
objectId: t.objectId,
|
|
@@ -5388,10 +5477,10 @@ class ha {
|
|
|
5388
5477
|
return this.currentMuteScope;
|
|
5389
5478
|
}
|
|
5390
5479
|
}
|
|
5391
|
-
function
|
|
5480
|
+
function Aa(e, t) {
|
|
5392
5481
|
return e > t ? e : t;
|
|
5393
5482
|
}
|
|
5394
|
-
function
|
|
5483
|
+
function va(e) {
|
|
5395
5484
|
switch (e) {
|
|
5396
5485
|
case "sessionEnded":
|
|
5397
5486
|
return { kind: "sessionEnded" };
|
|
@@ -5417,20 +5506,20 @@ function ma(e) {
|
|
|
5417
5506
|
return { kind: "replayLost" };
|
|
5418
5507
|
}
|
|
5419
5508
|
}
|
|
5420
|
-
class
|
|
5509
|
+
class Ra {
|
|
5421
5510
|
constructor() {
|
|
5422
|
-
this.config = null, this.http = null, this.sessionHttp = null, this.dispatcher = new
|
|
5511
|
+
this.config = null, this.http = null, this.sessionHttp = null, this.dispatcher = new ds(), this.sessions = /* @__PURE__ */ new Map(), this.pendingUploads = /* @__PURE__ */ new Map();
|
|
5423
5512
|
}
|
|
5424
5513
|
// ── Lifecycle ────────────────────────────────────────────────────────
|
|
5425
5514
|
initialize(t) {
|
|
5426
5515
|
if (!t.endpoint) throw h.missingField("endpoint");
|
|
5427
|
-
const n = t.attachmentBaseUrl === void 0 ? void 0 :
|
|
5516
|
+
const n = t.attachmentBaseUrl === void 0 ? void 0 : Ca(t.endpoint, t.attachmentBaseUrl);
|
|
5428
5517
|
if (n !== void 0 && !t.token)
|
|
5429
5518
|
throw h.missingField("token");
|
|
5430
|
-
this.attributes = t.attributes ? { ...t.attributes } : void 0, this.assetBaseUrl = t.assetBaseUrl, this.attachmentBaseUrl = n, this.attachmentBearer = n === void 0 ? void 0 : t.token, this.userId = t.userId ??
|
|
5519
|
+
this.attributes = t.attributes ? { ...t.attributes } : void 0, this.assetBaseUrl = t.assetBaseUrl, this.attachmentBaseUrl = n, this.attachmentBearer = n === void 0 ? void 0 : t.token, this.userId = t.userId ?? vi(), this.http = new bi({
|
|
5431
5520
|
endpoint: t.endpoint,
|
|
5432
5521
|
...t.token ? { token: t.token } : {}
|
|
5433
|
-
}), this.sessionHttp = new
|
|
5522
|
+
}), this.sessionHttp = new Ei(this.http, this.userId);
|
|
5434
5523
|
}
|
|
5435
5524
|
async authenticate() {
|
|
5436
5525
|
const n = await this.requireSessionHttp().postConfig();
|
|
@@ -5461,12 +5550,18 @@ class pa {
|
|
|
5461
5550
|
async getSession(t) {
|
|
5462
5551
|
return this.requireSessionHttp().getSession(t);
|
|
5463
5552
|
}
|
|
5553
|
+
async getSessionsPage(t = {}) {
|
|
5554
|
+
return this.requireSessionHttp().listSessionsPage(t);
|
|
5555
|
+
}
|
|
5556
|
+
async getSessionPage(t, n = {}) {
|
|
5557
|
+
return this.requireSessionHttp().getSessionPage(t, n);
|
|
5558
|
+
}
|
|
5464
5559
|
// ── Start / end ──────────────────────────────────────────────────────
|
|
5465
5560
|
async startSession(t) {
|
|
5466
5561
|
const n = this.requireSessionHttp();
|
|
5467
5562
|
if (t.sessionId && this.sessions.has(t.sessionId))
|
|
5468
5563
|
throw h.other(`session already active: ${t.sessionId}`);
|
|
5469
|
-
const s =
|
|
5564
|
+
const s = _a(this.attributes, t.data), r = { channel: t.channel };
|
|
5470
5565
|
t.sessionId && (r.sessionId = t.sessionId), s && (r.data = s);
|
|
5471
5566
|
const i = await n.startSession(r);
|
|
5472
5567
|
return t.channel, await this.attachSession(i, t.channel), { sessionId: i.sessionId };
|
|
@@ -5486,7 +5581,7 @@ class pa {
|
|
|
5486
5581
|
throw h.other('chat join options require channel "chat"');
|
|
5487
5582
|
if (t.channel === "chat" && t.voice !== void 0)
|
|
5488
5583
|
throw h.other('voice join options require channel "voice"');
|
|
5489
|
-
const n = t.channel === "chat" ?
|
|
5584
|
+
const n = t.channel === "chat" ? Oa(t.chat?.recovery) : void 0, s = {
|
|
5490
5585
|
sessionId: t.sessionId,
|
|
5491
5586
|
url: t.url,
|
|
5492
5587
|
token: t.token
|
|
@@ -5510,7 +5605,7 @@ class pa {
|
|
|
5510
5605
|
*/
|
|
5511
5606
|
async attachSession(t, n, s = !1, r) {
|
|
5512
5607
|
if (n === "voice") {
|
|
5513
|
-
const a = new
|
|
5608
|
+
const a = new ka(t, {
|
|
5514
5609
|
dispatcher: this.dispatcher,
|
|
5515
5610
|
// `sessionId` is the session's *current* id (post-`rename()`), not the
|
|
5516
5611
|
// one captured at construction — so a migrated session tears down its
|
|
@@ -5539,7 +5634,7 @@ class pa {
|
|
|
5539
5634
|
}
|
|
5540
5635
|
return;
|
|
5541
5636
|
}
|
|
5542
|
-
const i = new
|
|
5637
|
+
const i = new gi(t, {
|
|
5543
5638
|
sessionHttp: this.requireSessionHttp(),
|
|
5544
5639
|
provisionedRecovery: r,
|
|
5545
5640
|
dispatcher: this.dispatcher,
|
|
@@ -5593,6 +5688,10 @@ class pa {
|
|
|
5593
5688
|
setMute(t, n) {
|
|
5594
5689
|
return this.requireVoiceSession(t).setMute(n);
|
|
5595
5690
|
}
|
|
5691
|
+
/** Send one DTMF symbol to the active CX flow for a voice session. */
|
|
5692
|
+
sendDtmf(t, n) {
|
|
5693
|
+
return this.requireVoiceSession(t).sendDtmf(n);
|
|
5694
|
+
}
|
|
5596
5695
|
/** Enable microphone coaching on a receive-only voice join. */
|
|
5597
5696
|
enableCapture(t) {
|
|
5598
5697
|
return this.requireVoiceSession(t).enableCapture();
|
|
@@ -5625,13 +5724,13 @@ class pa {
|
|
|
5625
5724
|
* defers the whole decision to the server).
|
|
5626
5725
|
*/
|
|
5627
5726
|
async uploadAttachment(t, n) {
|
|
5628
|
-
const s = this.requireHttp(), r = this.config?.attachmentPolicy, i =
|
|
5727
|
+
const s = this.requireHttp(), r = this.config?.attachmentPolicy, i = ki(t, r);
|
|
5629
5728
|
if (!i.ok) throw i.error;
|
|
5630
5729
|
const a = new AbortController();
|
|
5631
5730
|
this.pendingUploads.set(n.uploadId, a);
|
|
5632
5731
|
try {
|
|
5633
|
-
const o =
|
|
5634
|
-
return await
|
|
5732
|
+
const o = Ua(a.signal, n.signal), l = this.attachmentBaseUrl ?? s.buildAbsoluteUrl("/attachment");
|
|
5733
|
+
return await Ii(
|
|
5635
5734
|
`${l}/upload`,
|
|
5636
5735
|
t,
|
|
5637
5736
|
{ ...n, signal: o },
|
|
@@ -5684,15 +5783,15 @@ class pa {
|
|
|
5684
5783
|
return this.http;
|
|
5685
5784
|
}
|
|
5686
5785
|
}
|
|
5687
|
-
let
|
|
5688
|
-
function
|
|
5689
|
-
return
|
|
5786
|
+
let Ce = null;
|
|
5787
|
+
function Ma() {
|
|
5788
|
+
return Ce || (Ce = new Ra()), Ce;
|
|
5690
5789
|
}
|
|
5691
|
-
function
|
|
5790
|
+
function _a(e, t) {
|
|
5692
5791
|
if (!(!e && !t))
|
|
5693
5792
|
return e ? t ? { ...t, attributes: { ...e, ...t.attributes } } : { attributes: e } : t;
|
|
5694
5793
|
}
|
|
5695
|
-
function
|
|
5794
|
+
function Oa(e) {
|
|
5696
5795
|
if (e !== void 0) {
|
|
5697
5796
|
if (e.replay !== "server")
|
|
5698
5797
|
throw h.other('provisioned chat recovery requires replay "server"');
|
|
@@ -5703,18 +5802,18 @@ function ga(e) {
|
|
|
5703
5802
|
return { ...e, delaysMs: [...e.delaysMs] };
|
|
5704
5803
|
}
|
|
5705
5804
|
}
|
|
5706
|
-
function
|
|
5805
|
+
function Ca(e, t) {
|
|
5707
5806
|
let n, s;
|
|
5708
5807
|
try {
|
|
5709
5808
|
n = new URL(e), s = new URL(t, n);
|
|
5710
5809
|
} catch {
|
|
5711
5810
|
throw h.other("invalid attachmentBaseUrl");
|
|
5712
5811
|
}
|
|
5713
|
-
if (t.trim() === "" || t.trim() !== t || !t.startsWith("/") && !/^https?:\/\//.test(t) ||
|
|
5812
|
+
if (t.trim() === "" || t.trim() !== t || !t.startsWith("/") && !/^https?:\/\//.test(t) || Da(t) || s.protocol !== "https:" && s.protocol !== "http:" || s.origin !== n.origin || s.username !== "" || s.password !== "" || s.search !== "" || s.hash !== "" || s.pathname === "/")
|
|
5714
5813
|
throw h.other("attachmentBaseUrl must be an HTTP(S) path on the endpoint origin");
|
|
5715
5814
|
return s.toString().replace(/\/$/, "");
|
|
5716
5815
|
}
|
|
5717
|
-
function
|
|
5816
|
+
function Da(e) {
|
|
5718
5817
|
let t = e;
|
|
5719
5818
|
for (let r = e.length + 1; r > 0; r -= 1) {
|
|
5720
5819
|
if (t.includes("\\")) return !0;
|
|
@@ -5749,12 +5848,142 @@ function ya(e) {
|
|
|
5749
5848
|
}
|
|
5750
5849
|
return !0;
|
|
5751
5850
|
}
|
|
5752
|
-
function
|
|
5851
|
+
function Ua(e, t) {
|
|
5753
5852
|
if (!t) return e;
|
|
5754
5853
|
const n = new AbortController(), s = () => n.abort();
|
|
5755
5854
|
return e.aborted || t.aborted ? (n.abort(), n.signal) : (e.addEventListener("abort", s, { once: !0 }), t.addEventListener("abort", s, { once: !0 }), n.signal);
|
|
5756
5855
|
}
|
|
5757
|
-
const
|
|
5856
|
+
const cs = 8;
|
|
5857
|
+
class xa {
|
|
5858
|
+
constructor() {
|
|
5859
|
+
this.generationValue = 0, this.query = null, this.live = /* @__PURE__ */ new Map(), this.value = {
|
|
5860
|
+
sessions: [],
|
|
5861
|
+
nextCursor: null,
|
|
5862
|
+
emptyContinuations: 0
|
|
5863
|
+
};
|
|
5864
|
+
}
|
|
5865
|
+
get generation() {
|
|
5866
|
+
return this.generationValue;
|
|
5867
|
+
}
|
|
5868
|
+
get search() {
|
|
5869
|
+
return this.query;
|
|
5870
|
+
}
|
|
5871
|
+
get state() {
|
|
5872
|
+
return this.value;
|
|
5873
|
+
}
|
|
5874
|
+
begin(t, n = []) {
|
|
5875
|
+
this.generationValue = this.generationValue + 1 >>> 0 || 1;
|
|
5876
|
+
const s = us(t ?? "");
|
|
5877
|
+
return this.query = s || null, this.live.clear(), this.value = {
|
|
5878
|
+
sessions: this.query === null ? [...n] : [],
|
|
5879
|
+
nextCursor: null,
|
|
5880
|
+
emptyContinuations: 0
|
|
5881
|
+
}, this.generationValue;
|
|
5882
|
+
}
|
|
5883
|
+
applyLive(t) {
|
|
5884
|
+
this.live.delete(t.sessionId);
|
|
5885
|
+
const n = this.value.sessions.filter((s) => s.sessionId !== t.sessionId);
|
|
5886
|
+
(this.query === null || La(t, this.query)) && (this.live.set(t.sessionId, t), n.push(t)), n.sort((s, r) => r.updatedAt.localeCompare(s.updatedAt)), this.value = { ...this.value, sessions: n };
|
|
5887
|
+
}
|
|
5888
|
+
merge(t, n, s) {
|
|
5889
|
+
if (t !== this.generationValue) return !1;
|
|
5890
|
+
const r = /* @__PURE__ */ new Map();
|
|
5891
|
+
if (!s)
|
|
5892
|
+
for (const a of this.value.sessions) r.set(a.sessionId, a);
|
|
5893
|
+
for (const a of n.sessions) r.set(a.sessionId, a);
|
|
5894
|
+
for (const a of this.live.values()) r.set(a.sessionId, a);
|
|
5895
|
+
const i = [...r.values()].sort((a, o) => o.updatedAt.localeCompare(a.updatedAt));
|
|
5896
|
+
return this.value = {
|
|
5897
|
+
sessions: i,
|
|
5898
|
+
nextCursor: n.nextCursor,
|
|
5899
|
+
emptyContinuations: n.sessions.length === 0 && n.nextCursor !== null ? this.value.emptyContinuations + 1 : 0
|
|
5900
|
+
}, !0;
|
|
5901
|
+
}
|
|
5902
|
+
canLoadMore() {
|
|
5903
|
+
return this.value.nextCursor !== null && this.value.emptyContinuations < cs;
|
|
5904
|
+
}
|
|
5905
|
+
}
|
|
5906
|
+
class Pa {
|
|
5907
|
+
constructor() {
|
|
5908
|
+
this.generationValue = 0, this.live = /* @__PURE__ */ new Map(), this.value = {
|
|
5909
|
+
history: [],
|
|
5910
|
+
control: "ai",
|
|
5911
|
+
nextCursor: null,
|
|
5912
|
+
emptyContinuations: 0
|
|
5913
|
+
};
|
|
5914
|
+
}
|
|
5915
|
+
get generation() {
|
|
5916
|
+
return this.generationValue;
|
|
5917
|
+
}
|
|
5918
|
+
get state() {
|
|
5919
|
+
return this.value;
|
|
5920
|
+
}
|
|
5921
|
+
begin(t) {
|
|
5922
|
+
return this.generationValue = this.generationValue + 1 >>> 0 || 1, this.live.clear(), this.value = {
|
|
5923
|
+
history: [...t?.history ?? []],
|
|
5924
|
+
control: t?.control ?? "ai",
|
|
5925
|
+
nextCursor: null,
|
|
5926
|
+
emptyContinuations: 0
|
|
5927
|
+
}, this.generationValue;
|
|
5928
|
+
}
|
|
5929
|
+
applyLive(t) {
|
|
5930
|
+
for (const [s, r] of this.live)
|
|
5931
|
+
ce(r, t) && this.live.delete(s);
|
|
5932
|
+
const n = ls(t);
|
|
5933
|
+
n && this.live.set(n, t), this.value = { ...this.value, history: De(this.value.history, [t]) };
|
|
5934
|
+
}
|
|
5935
|
+
removeLive(t) {
|
|
5936
|
+
for (const [n, s] of this.live)
|
|
5937
|
+
ce(s, t) && this.live.delete(n);
|
|
5938
|
+
this.value = {
|
|
5939
|
+
...this.value,
|
|
5940
|
+
history: this.value.history.filter((n) => !ce(n, t))
|
|
5941
|
+
};
|
|
5942
|
+
}
|
|
5943
|
+
merge(t, n, s) {
|
|
5944
|
+
if (t !== this.generationValue) return !1;
|
|
5945
|
+
let r = s ? [...n.history] : De(n.history, this.value.history);
|
|
5946
|
+
return r = De(r, [...this.live.values()]), this.value = {
|
|
5947
|
+
history: r,
|
|
5948
|
+
control: n.control,
|
|
5949
|
+
nextCursor: n.nextCursor,
|
|
5950
|
+
emptyContinuations: n.history.length === 0 && n.nextCursor !== null ? this.value.emptyContinuations + 1 : 0
|
|
5951
|
+
}, !0;
|
|
5952
|
+
}
|
|
5953
|
+
canLoadMore() {
|
|
5954
|
+
return this.value.nextCursor !== null && this.value.emptyContinuations < cs;
|
|
5955
|
+
}
|
|
5956
|
+
}
|
|
5957
|
+
function us(e) {
|
|
5958
|
+
let t = "", n = !1;
|
|
5959
|
+
for (const s of e) {
|
|
5960
|
+
if (/\p{White_Space}/u.test(s)) {
|
|
5961
|
+
n = t.length > 0;
|
|
5962
|
+
continue;
|
|
5963
|
+
}
|
|
5964
|
+
/\p{Cc}/u.test(s) || (n && (t += " ", n = !1), t += s.toLowerCase());
|
|
5965
|
+
}
|
|
5966
|
+
return t;
|
|
5967
|
+
}
|
|
5968
|
+
function La(e, t) {
|
|
5969
|
+
const n = (s) => s !== void 0 && us(s).includes(t);
|
|
5970
|
+
return n(e.subject) || n(e.contact?.name) || n(e.lastMessage?.text) || (e.lastMessage?.attachments ?? []).some((s) => n(s.name));
|
|
5971
|
+
}
|
|
5972
|
+
function ls(e) {
|
|
5973
|
+
return e.id || e.localId || null;
|
|
5974
|
+
}
|
|
5975
|
+
function ce(e, t) {
|
|
5976
|
+
return !!(t.id && (e.id === t.id || e.localId === t.id) || t.localId && (e.id === t.localId || e.localId === t.localId));
|
|
5977
|
+
}
|
|
5978
|
+
function De(e, t) {
|
|
5979
|
+
const n = [...e];
|
|
5980
|
+
for (const s of t) {
|
|
5981
|
+
const i = ls(s) ? n.findIndex((a) => ce(a, s)) : -1;
|
|
5982
|
+
i >= 0 ? n[i] = s : n.push(s);
|
|
5983
|
+
}
|
|
5984
|
+
return n;
|
|
5985
|
+
}
|
|
5986
|
+
const Va = {
|
|
5758
5987
|
AI: "ai",
|
|
5759
5988
|
EXTERNAL: "external",
|
|
5760
5989
|
USER: "user",
|
|
@@ -5762,9 +5991,14 @@ const Na = {
|
|
|
5762
5991
|
};
|
|
5763
5992
|
export {
|
|
5764
5993
|
h as ClientError,
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5994
|
+
cs as MAX_EMPTY_PAGE_CONTINUATIONS,
|
|
5995
|
+
Va as MESSAGE_ROLES,
|
|
5996
|
+
S as OrpcError,
|
|
5997
|
+
xa as SessionDirectoryPager,
|
|
5998
|
+
Pa as SessionHistoryPager,
|
|
5999
|
+
Ra as SessionManager,
|
|
6000
|
+
Ma as getSessionManager,
|
|
6001
|
+
us as normalizeSearchField,
|
|
6002
|
+
La as sessionMatchesSearch
|
|
5769
6003
|
};
|
|
5770
6004
|
//# sourceMappingURL=origon-web-sdk.js.map
|