@tma.js/bridge 2.1.3 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/env/isTMA.d.ts +2 -2
- package/dist/dts/errors.d.ts +6 -6
- package/dist/dts/index.d.ts +2 -1
- package/dist/dts/launch-params.d.ts +3 -3
- package/dist/dts/utils/invokeCustomMethod.d.ts +6 -6
- package/dist/dts/utils/request.d.ts +14 -2
- package/dist/dts/utils/request2.d.ts +62 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.iife.js +3 -3
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +374 -306
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { is as
|
|
2
|
-
import { throwifyFpFn as
|
|
3
|
-
import { createLogger as
|
|
4
|
-
import { BetterPromise as
|
|
5
|
-
import { CancelledError as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { signal as
|
|
9
|
-
import
|
|
10
|
-
function
|
|
11
|
-
return
|
|
12
|
-
|
|
1
|
+
import { is as R, looseObject as m, function as ee, nullish as E, boolean as G, number as V, string as P, optional as B, unknown as Me, parse as W, any as Ce } from "valibot";
|
|
2
|
+
import { throwifyFpFn as T, getStorageValue as Le, setStorageValue as te, createLogger as qe, throwifyAnyEither as $, createCbCollector as re, BetterTaskEither as ne } from "@tma.js/toolkit";
|
|
3
|
+
import { createLogger as fr, deepSnakeToCamelObjKeys as lr } from "@tma.js/toolkit";
|
|
4
|
+
import { BetterPromise as oe, TimeoutError as Fe } from "better-promises";
|
|
5
|
+
import { CancelledError as wr, TimeoutError as hr } from "better-promises";
|
|
6
|
+
import { errorClassWithData as We, errorClass as k } from "error-kid";
|
|
7
|
+
import { parseLaunchParamsQueryFp as ae, themeParams as Re, pipeJsonToSchema as se, miniAppsMessage as ie, serializeLaunchParamsQuery as Ue, parseLaunchParamsQuery as Ie } from "@tma.js/transformers";
|
|
8
|
+
import { signal as d, computed as ue } from "@tma.js/signals";
|
|
9
|
+
import Oe from "mitt";
|
|
10
|
+
function ce(e) {
|
|
11
|
+
return R(
|
|
12
|
+
m({ TelegramWebviewProxy: m({ postEvent: ee() }) }),
|
|
13
13
|
e
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function pe() {
|
|
17
17
|
try {
|
|
18
18
|
return window.self !== window.top;
|
|
19
19
|
} catch {
|
|
20
20
|
return !0;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
var
|
|
23
|
+
var je = function(e, t, r) {
|
|
24
24
|
if (r || arguments.length === 2) for (var n = 0, a = t.length, o; n < a; n++)
|
|
25
25
|
(o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
|
|
26
26
|
return e.concat(o || Array.prototype.slice.call(t));
|
|
27
27
|
};
|
|
28
|
-
function
|
|
28
|
+
function ze(e) {
|
|
29
29
|
return e;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function _e(e, t, r, n, a, o, s, i, c) {
|
|
32
32
|
switch (arguments.length) {
|
|
33
33
|
case 1:
|
|
34
34
|
return e;
|
|
@@ -66,7 +66,7 @@ function x(e, t, r, n, a, o, s, i, c) {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function f(e, t, r, n, a, o, s, i, c) {
|
|
70
70
|
switch (arguments.length) {
|
|
71
71
|
case 1:
|
|
72
72
|
return e;
|
|
@@ -93,91 +93,91 @@ function l(e, t, r, n, a, o, s, i, c) {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
var
|
|
96
|
+
var M = function(e, t) {
|
|
97
97
|
var r = typeof e == "number" ? function(n) {
|
|
98
98
|
return n.length >= e;
|
|
99
99
|
} : e;
|
|
100
100
|
return function() {
|
|
101
101
|
var n = Array.from(arguments);
|
|
102
102
|
return r(arguments) ? t.apply(this, n) : function(a) {
|
|
103
|
-
return t.apply(void 0,
|
|
103
|
+
return t.apply(void 0, je([a], n, !1));
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
-
},
|
|
106
|
+
}, Ge = { _tag: "None" }, Ve = function(e) {
|
|
107
107
|
return { _tag: "Some", value: e };
|
|
108
|
-
},
|
|
108
|
+
}, Be = function(e) {
|
|
109
109
|
return e._tag === "Left";
|
|
110
|
-
},
|
|
110
|
+
}, De = function(e) {
|
|
111
111
|
return { _tag: "Left", left: e };
|
|
112
|
-
},
|
|
112
|
+
}, Ne = function(e) {
|
|
113
113
|
return { _tag: "Right", right: e };
|
|
114
|
-
},
|
|
115
|
-
return
|
|
116
|
-
}),
|
|
114
|
+
}, w = De, _ = Ne, fe = /* @__PURE__ */ M(2, function(e, t) {
|
|
115
|
+
return v(e) ? e : t(e.right);
|
|
116
|
+
}), Je = function(e) {
|
|
117
117
|
return function(t) {
|
|
118
|
-
return
|
|
118
|
+
return v(t) ? t : _(e(t.right));
|
|
119
119
|
};
|
|
120
|
-
},
|
|
120
|
+
}, Qe = function(e, t) {
|
|
121
121
|
return function(r) {
|
|
122
|
-
return
|
|
122
|
+
return v(r) ? w(e(r.left)) : _(t(r.right));
|
|
123
123
|
};
|
|
124
|
-
},
|
|
124
|
+
}, He = function(e) {
|
|
125
125
|
return function(t) {
|
|
126
|
-
return
|
|
126
|
+
return v(t) ? w(e(t.left)) : t;
|
|
127
127
|
};
|
|
128
|
-
},
|
|
128
|
+
}, v = Be, le = function(e, t) {
|
|
129
129
|
return function(r) {
|
|
130
|
-
return
|
|
130
|
+
return v(r) ? e(r.left) : t(r.right);
|
|
131
131
|
};
|
|
132
|
-
},
|
|
132
|
+
}, Ke = le, U = le, Ye = U, I = function(e, t) {
|
|
133
133
|
try {
|
|
134
134
|
return _(e());
|
|
135
135
|
} catch (r) {
|
|
136
|
-
return
|
|
136
|
+
return w(t(r));
|
|
137
137
|
}
|
|
138
|
-
},
|
|
138
|
+
}, Xe = fe, Ze = fe, et = Ge, tt = Ve, rt = function(e) {
|
|
139
139
|
return e._tag === "None";
|
|
140
|
-
},
|
|
140
|
+
}, nt = function(e, t) {
|
|
141
141
|
return function(r) {
|
|
142
|
-
return
|
|
142
|
+
return rt(r) ? e() : t(r.value);
|
|
143
143
|
};
|
|
144
|
-
},
|
|
145
|
-
function
|
|
146
|
-
return
|
|
144
|
+
}, ot = nt;
|
|
145
|
+
function at(e) {
|
|
146
|
+
return _e(_, e.of);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
return
|
|
148
|
+
function st(e) {
|
|
149
|
+
return _e(w, e.of);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function it(e) {
|
|
152
152
|
return function(t, r) {
|
|
153
153
|
return e.chain(t, function(n) {
|
|
154
|
-
return
|
|
154
|
+
return v(n) ? e.of(n) : r(n.right);
|
|
155
155
|
});
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function ut(e) {
|
|
159
159
|
return function(t, r, n) {
|
|
160
|
-
return e.map(t,
|
|
160
|
+
return e.map(t, Qe(r, n));
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function ct(e) {
|
|
164
164
|
return function(t, r) {
|
|
165
165
|
return function(n) {
|
|
166
|
-
return e.map(n,
|
|
166
|
+
return e.map(n, U(t, r));
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
var
|
|
171
|
-
return
|
|
172
|
-
},
|
|
173
|
-
return
|
|
174
|
-
},
|
|
170
|
+
var me = function(e, t) {
|
|
171
|
+
return f(e, _t(t));
|
|
172
|
+
}, pt = function(e, t) {
|
|
173
|
+
return f(e, ft(t));
|
|
174
|
+
}, _t = function(e) {
|
|
175
175
|
return function(t) {
|
|
176
176
|
return function() {
|
|
177
177
|
return Promise.resolve().then(t).then(e);
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
|
-
},
|
|
180
|
+
}, ft = function(e) {
|
|
181
181
|
return function(t) {
|
|
182
182
|
return function() {
|
|
183
183
|
return Promise.all([Promise.resolve().then(t), Promise.resolve().then(e)]).then(function(r) {
|
|
@@ -186,37 +186,37 @@ var pe = function(e, t) {
|
|
|
186
186
|
});
|
|
187
187
|
};
|
|
188
188
|
};
|
|
189
|
-
},
|
|
189
|
+
}, we = function(e) {
|
|
190
190
|
return function() {
|
|
191
191
|
return Promise.resolve(e);
|
|
192
192
|
};
|
|
193
|
-
},
|
|
193
|
+
}, lt = /* @__PURE__ */ M(2, function(e, t) {
|
|
194
194
|
return function() {
|
|
195
195
|
return Promise.resolve().then(e).then(function(r) {
|
|
196
196
|
return t(r)();
|
|
197
197
|
});
|
|
198
198
|
};
|
|
199
|
-
}),
|
|
200
|
-
URI:
|
|
201
|
-
map:
|
|
202
|
-
},
|
|
203
|
-
of:
|
|
204
|
-
},
|
|
205
|
-
URI:
|
|
206
|
-
map:
|
|
207
|
-
of:
|
|
208
|
-
ap:
|
|
209
|
-
chain:
|
|
210
|
-
},
|
|
211
|
-
class gt extends
|
|
199
|
+
}), he = "Task", ge = {
|
|
200
|
+
URI: he,
|
|
201
|
+
map: me
|
|
202
|
+
}, de = {
|
|
203
|
+
of: we
|
|
204
|
+
}, mt = {
|
|
205
|
+
URI: he,
|
|
206
|
+
map: me,
|
|
207
|
+
of: we,
|
|
208
|
+
ap: pt,
|
|
209
|
+
chain: lt
|
|
210
|
+
}, wt = /* @__PURE__ */ st(de), ve = /* @__PURE__ */ at(de), be = /* @__PURE__ */ ct(ge), ye = /* @__PURE__ */ M(3, ut(ge)), Ee = /* @__PURE__ */ M(2, it(mt)), ht = Ee, Pe = Ee;
|
|
211
|
+
class gt extends (/* @__PURE__ */ k("MethodUnsupportedError", (t, r) => [
|
|
212
212
|
`Method "${t}" is unsupported in Mini Apps version ${r}`
|
|
213
|
-
]) {
|
|
213
|
+
])) {
|
|
214
214
|
}
|
|
215
|
-
class dt extends
|
|
215
|
+
class dt extends (/* @__PURE__ */ k("MethodParameterUnsupportedError", (t, r, n) => [
|
|
216
216
|
`Parameter "${r}" of "${t}" method is unsupported in Mini Apps version ${n}`
|
|
217
|
-
]) {
|
|
217
|
+
])) {
|
|
218
218
|
}
|
|
219
|
-
class vt extends
|
|
219
|
+
class vt extends (/* @__PURE__ */ We(
|
|
220
220
|
"LaunchParamsRetrieveError",
|
|
221
221
|
(t) => ({ errors: t }),
|
|
222
222
|
(t) => [
|
|
@@ -230,78 +230,93 @@ class vt extends Oe(
|
|
|
230
230
|
].join(`
|
|
231
231
|
`)
|
|
232
232
|
]
|
|
233
|
-
) {
|
|
233
|
+
)) {
|
|
234
234
|
}
|
|
235
|
-
class bt extends
|
|
235
|
+
class bt extends (/* @__PURE__ */ k("InvalidLaunchParamsError", (t, r) => [
|
|
236
236
|
`Invalid value for launch params: ${t}`,
|
|
237
237
|
{ cause: r }
|
|
238
|
-
]) {
|
|
238
|
+
])) {
|
|
239
239
|
}
|
|
240
|
-
class
|
|
240
|
+
class xe extends (/* @__PURE__ */ k("UnknownEnvError")) {
|
|
241
241
|
}
|
|
242
|
-
class yt extends
|
|
242
|
+
class yt extends (/* @__PURE__ */ k(
|
|
243
243
|
"InvokeCustomMethodError",
|
|
244
244
|
(t) => [`Server returned error: ${t}`]
|
|
245
|
-
) {
|
|
245
|
+
)) {
|
|
246
246
|
}
|
|
247
|
-
const
|
|
248
|
-
function
|
|
247
|
+
const D = "launchParams";
|
|
248
|
+
function N(e) {
|
|
249
249
|
return e.replace(/^[^?#]*[?#]/, "").replace(/[?#]/g, "&");
|
|
250
250
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
)
|
|
262
|
-
|
|
251
|
+
function Et() {
|
|
252
|
+
return f(
|
|
253
|
+
C(),
|
|
254
|
+
Xe(ae)
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
const Jt = T(Et);
|
|
258
|
+
function Pt() {
|
|
259
|
+
return f(
|
|
260
|
+
C(),
|
|
261
|
+
Je((e) => {
|
|
262
|
+
const t = new URLSearchParams(e).get("tgWebAppData");
|
|
263
|
+
return t ? tt(t) : et;
|
|
264
|
+
})
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
function Qt() {
|
|
268
|
+
return f(
|
|
269
|
+
Pt(),
|
|
270
|
+
Ye((e) => {
|
|
271
|
+
throw e;
|
|
272
|
+
}, (e) => e),
|
|
273
|
+
ot(() => {
|
|
274
|
+
}, (e) => e)
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
function C() {
|
|
263
278
|
const e = [];
|
|
264
279
|
for (const [t, r] of [
|
|
265
280
|
// Try to retrieve launch parameters from the current location. This method
|
|
266
281
|
// can return nothing in case, location was changed, and then the page was
|
|
267
282
|
// reloaded.
|
|
268
|
-
[() =>
|
|
283
|
+
[() => N(window.location.href), "window.location.href"],
|
|
269
284
|
// Then, try using the lower level API - window.performance.
|
|
270
285
|
[() => {
|
|
271
286
|
const n = performance.getEntriesByType("navigation")[0];
|
|
272
|
-
return n &&
|
|
287
|
+
return n && N(n.name);
|
|
273
288
|
}, "performance navigation entries"],
|
|
274
289
|
// Finally, try using the session storage.
|
|
275
|
-
[() =>
|
|
290
|
+
[() => Le(D), "local storage"]
|
|
276
291
|
]) {
|
|
277
292
|
const n = t();
|
|
278
293
|
if (!n) {
|
|
279
294
|
e.push({ source: r, error: new Error("Source is empty") });
|
|
280
295
|
continue;
|
|
281
296
|
}
|
|
282
|
-
const a =
|
|
283
|
-
|
|
284
|
-
|
|
297
|
+
const a = f(
|
|
298
|
+
ae(n),
|
|
299
|
+
Ke((o) => o, () => !0)
|
|
285
300
|
);
|
|
286
301
|
if (typeof a != "boolean") {
|
|
287
302
|
e.push({ source: r, error: a });
|
|
288
303
|
continue;
|
|
289
304
|
}
|
|
290
|
-
return
|
|
305
|
+
return te(D, n), _(n);
|
|
291
306
|
}
|
|
292
|
-
return
|
|
307
|
+
return w(new vt(e));
|
|
293
308
|
}
|
|
294
|
-
const
|
|
309
|
+
const Ht = T(C);
|
|
295
310
|
function xt(e, t) {
|
|
296
|
-
const r = /* @__PURE__ */ new Map(), n =
|
|
311
|
+
const r = /* @__PURE__ */ new Map(), n = Oe(), a = (o, s, i = !1) => {
|
|
297
312
|
const c = r.get(o) || /* @__PURE__ */ new Map();
|
|
298
313
|
r.set(o, c);
|
|
299
314
|
const u = c.get(s) || [];
|
|
300
315
|
c.set(s, u);
|
|
301
|
-
const p = u.findIndex((
|
|
316
|
+
const p = u.findIndex((l) => l[1] === i);
|
|
302
317
|
if (p >= 0 && (n.off(o, u[p][0]), u.splice(p, 1), !u.length && (c.delete(s), !c.size))) {
|
|
303
|
-
const
|
|
304
|
-
r.delete(o),
|
|
318
|
+
const l = r.size;
|
|
319
|
+
r.delete(o), l && !r.size && t();
|
|
305
320
|
}
|
|
306
321
|
};
|
|
307
322
|
return {
|
|
@@ -309,14 +324,14 @@ function xt(e, t) {
|
|
|
309
324
|
!r.size && e();
|
|
310
325
|
const c = () => {
|
|
311
326
|
a(o, s, i);
|
|
312
|
-
}, u = (...
|
|
313
|
-
i && c(), o === "*" ? s({ name:
|
|
327
|
+
}, u = (...h) => {
|
|
328
|
+
i && c(), o === "*" ? s({ name: h[0], payload: h[1] }) : s(...h);
|
|
314
329
|
};
|
|
315
330
|
n.on(o, u);
|
|
316
331
|
const p = r.get(o) || /* @__PURE__ */ new Map();
|
|
317
332
|
r.set(o, p);
|
|
318
|
-
const
|
|
319
|
-
return p.set(s,
|
|
333
|
+
const l = p.get(s) || [];
|
|
334
|
+
return p.set(s, l), l.push([u, i || !1]), c;
|
|
320
335
|
},
|
|
321
336
|
off: a,
|
|
322
337
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
@@ -327,7 +342,7 @@ function xt(e, t) {
|
|
|
327
342
|
}
|
|
328
343
|
};
|
|
329
344
|
}
|
|
330
|
-
function
|
|
345
|
+
function q(e, t) {
|
|
331
346
|
window.dispatchEvent(new MessageEvent("message", {
|
|
332
347
|
data: JSON.stringify({ eventType: e, eventData: t }),
|
|
333
348
|
// We specify this kind of source here in order to allow the package's "on" function to
|
|
@@ -336,7 +351,29 @@ function A(e, t) {
|
|
|
336
351
|
source: window.parent
|
|
337
352
|
}));
|
|
338
353
|
}
|
|
339
|
-
|
|
354
|
+
const A = d(!1), O = d("https://web.telegram.org"), kt = (e) => {
|
|
355
|
+
g().log("Event received:", e);
|
|
356
|
+
}, ke = ue(A);
|
|
357
|
+
function Kt(e) {
|
|
358
|
+
e !== A() && (A.set(e), (e ? j : At)("*", kt));
|
|
359
|
+
}
|
|
360
|
+
const Se = ue(O);
|
|
361
|
+
function Yt(e) {
|
|
362
|
+
O.set(e), g().log("New target origin set", e);
|
|
363
|
+
}
|
|
364
|
+
const x = d((...e) => {
|
|
365
|
+
window.parent.postMessage(...e);
|
|
366
|
+
}), g = d(qe("Bridge", {
|
|
367
|
+
bgColor: "#9147ff",
|
|
368
|
+
textColor: "white",
|
|
369
|
+
shouldLog: ke
|
|
370
|
+
}));
|
|
371
|
+
function Xt() {
|
|
372
|
+
$t(), [x, O, Se, A, ke, g].forEach((e) => {
|
|
373
|
+
e.unsubAll(), "reset" in e && e.reset();
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
function F(e, t, r) {
|
|
340
377
|
const n = [r], a = e[t];
|
|
341
378
|
typeof a == "function" && n.push(a);
|
|
342
379
|
const o = (...i) => {
|
|
@@ -352,28 +389,28 @@ function M(e, t, r) {
|
|
|
352
389
|
return;
|
|
353
390
|
}
|
|
354
391
|
if (i === 2) {
|
|
355
|
-
|
|
392
|
+
Q(e, t, n[1]);
|
|
356
393
|
return;
|
|
357
394
|
}
|
|
358
|
-
n.unshift(1),
|
|
395
|
+
n.unshift(1), Q(e, t, o);
|
|
359
396
|
}
|
|
360
397
|
});
|
|
361
|
-
|
|
398
|
+
Ae(
|
|
362
399
|
e,
|
|
363
400
|
t,
|
|
364
401
|
() => s,
|
|
365
402
|
(i) => n.push(i)
|
|
366
403
|
);
|
|
367
404
|
}
|
|
368
|
-
function
|
|
405
|
+
function J(e, t) {
|
|
369
406
|
const r = e[t];
|
|
370
|
-
|
|
407
|
+
Ae(e, t, () => r, (n) => {
|
|
371
408
|
Object.entries(n).forEach(([a, o]) => {
|
|
372
409
|
r[a] = o;
|
|
373
410
|
});
|
|
374
411
|
});
|
|
375
412
|
}
|
|
376
|
-
function
|
|
413
|
+
function Ae(e, t, r, n) {
|
|
377
414
|
Object.defineProperty(e, t, {
|
|
378
415
|
enumerable: !0,
|
|
379
416
|
configurable: !0,
|
|
@@ -381,7 +418,7 @@ function ve(e, t, r, n) {
|
|
|
381
418
|
set: n
|
|
382
419
|
});
|
|
383
420
|
}
|
|
384
|
-
function
|
|
421
|
+
function Q(e, t, r) {
|
|
385
422
|
Object.defineProperty(e, t, {
|
|
386
423
|
enumerable: !0,
|
|
387
424
|
configurable: !0,
|
|
@@ -389,27 +426,27 @@ function J(e, t, r) {
|
|
|
389
426
|
value: r
|
|
390
427
|
});
|
|
391
428
|
}
|
|
392
|
-
const
|
|
393
|
-
clipboard_text_received:
|
|
394
|
-
req_id:
|
|
395
|
-
data:
|
|
429
|
+
const St = {
|
|
430
|
+
clipboard_text_received: m({
|
|
431
|
+
req_id: P(),
|
|
432
|
+
data: E(P())
|
|
396
433
|
}),
|
|
397
|
-
custom_method_invoked:
|
|
398
|
-
req_id:
|
|
399
|
-
result:
|
|
400
|
-
error:
|
|
434
|
+
custom_method_invoked: m({
|
|
435
|
+
req_id: P(),
|
|
436
|
+
result: B(Me()),
|
|
437
|
+
error: B(P())
|
|
401
438
|
}),
|
|
402
|
-
popup_closed:
|
|
403
|
-
|
|
439
|
+
popup_closed: E(
|
|
440
|
+
m({ button_id: E(P(), () => {
|
|
404
441
|
}) }),
|
|
405
442
|
{}
|
|
406
443
|
),
|
|
407
|
-
viewport_changed:
|
|
408
|
-
|
|
409
|
-
height:
|
|
410
|
-
width:
|
|
411
|
-
is_state_stable:
|
|
412
|
-
is_expanded:
|
|
444
|
+
viewport_changed: E(
|
|
445
|
+
m({
|
|
446
|
+
height: V(),
|
|
447
|
+
width: E(V(), () => window.innerWidth),
|
|
448
|
+
is_state_stable: G(),
|
|
449
|
+
is_expanded: G()
|
|
413
450
|
}),
|
|
414
451
|
// TODO: At the moment, macOS has a bug with the invalid event payload - it is always equal to
|
|
415
452
|
// null. Leaving this default value until the bug is fixed.
|
|
@@ -419,25 +456,25 @@ const kt = {
|
|
|
419
456
|
is_expanded: !0
|
|
420
457
|
})
|
|
421
458
|
),
|
|
422
|
-
theme_changed:
|
|
423
|
-
theme_params:
|
|
459
|
+
theme_changed: m({
|
|
460
|
+
theme_params: Re()
|
|
424
461
|
})
|
|
425
462
|
};
|
|
426
|
-
function
|
|
463
|
+
function H(e) {
|
|
427
464
|
if (e.source !== window.parent)
|
|
428
465
|
return;
|
|
429
466
|
let t;
|
|
430
467
|
try {
|
|
431
|
-
t =
|
|
468
|
+
t = W(se(ie()), e.data);
|
|
432
469
|
} catch {
|
|
433
470
|
return;
|
|
434
471
|
}
|
|
435
|
-
const { eventType: r, eventData: n } = t, a =
|
|
472
|
+
const { eventType: r, eventData: n } = t, a = St[r];
|
|
436
473
|
let o;
|
|
437
474
|
try {
|
|
438
|
-
o = a ?
|
|
475
|
+
o = a ? W(a, n) : n;
|
|
439
476
|
} catch (s) {
|
|
440
|
-
return
|
|
477
|
+
return g().forceError(
|
|
441
478
|
[
|
|
442
479
|
`An error occurred processing the "${r}" event from the Telegram application.`,
|
|
443
480
|
"Please, file an issue here:",
|
|
@@ -451,14 +488,14 @@ function Q(e) {
|
|
|
451
488
|
Tt(r, o);
|
|
452
489
|
}
|
|
453
490
|
const {
|
|
454
|
-
on:
|
|
455
|
-
off:
|
|
491
|
+
on: j,
|
|
492
|
+
off: At,
|
|
456
493
|
emit: Tt,
|
|
457
494
|
clear: $t
|
|
458
495
|
} = xt(
|
|
459
496
|
() => {
|
|
460
497
|
const e = window;
|
|
461
|
-
!e.TelegramGameProxy && (e.TelegramGameProxy = {}),
|
|
498
|
+
!e.TelegramGameProxy && (e.TelegramGameProxy = {}), F(e.TelegramGameProxy, "receiveEvent", q), J(e, "TelegramGameProxy"), !e.Telegram && (e.Telegram = {}), !e.Telegram.WebView && (e.Telegram.WebView = {}), F(e.Telegram.WebView, "receiveEvent", q), J(e.Telegram, "WebView"), F(e, "TelegramGameProxy_receiveEvent", q), window.addEventListener("message", H);
|
|
462
499
|
},
|
|
463
500
|
() => {
|
|
464
501
|
[
|
|
@@ -473,143 +510,124 @@ const {
|
|
|
473
510
|
return;
|
|
474
511
|
const [n, a] = r;
|
|
475
512
|
"unwrap" in a && (a.unwrap(), n && n !== t && !Object.keys(n).length && delete t[e[0]]);
|
|
476
|
-
}), window.removeEventListener("message",
|
|
513
|
+
}), window.removeEventListener("message", H);
|
|
477
514
|
}
|
|
478
|
-
),
|
|
479
|
-
h().log("Event received:", e);
|
|
480
|
-
}, ye = ae(k);
|
|
481
|
-
function Ht(e) {
|
|
482
|
-
e !== k() && (k.set(e), (e ? be : St)("*", At));
|
|
483
|
-
}
|
|
484
|
-
const Ee = ae(O);
|
|
485
|
-
function Kt(e) {
|
|
486
|
-
O.set(e), h().log("New target origin set", e);
|
|
487
|
-
}
|
|
488
|
-
const y = P((...e) => {
|
|
489
|
-
window.parent.postMessage(...e);
|
|
490
|
-
}), h = P(Ae("Bridge", {
|
|
491
|
-
bgColor: "#9147ff",
|
|
492
|
-
textColor: "white",
|
|
493
|
-
shouldLog: ye
|
|
494
|
-
}));
|
|
495
|
-
function Yt() {
|
|
496
|
-
$t(), [y, O, Ee, k, ye, h].forEach((e) => {
|
|
497
|
-
e.unsubAll(), "reset" in e && e.reset();
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
const Mt = (...e) => y()(...e);
|
|
515
|
+
), Mt = (...e) => x()(...e);
|
|
501
516
|
function Ct(e, t) {
|
|
502
|
-
|
|
503
|
-
|
|
517
|
+
f(
|
|
518
|
+
S(
|
|
504
519
|
// @ts-expect-error It's ok, TS can't determine a specific override.
|
|
505
520
|
e,
|
|
506
521
|
t
|
|
507
522
|
),
|
|
508
|
-
|
|
523
|
+
He((r) => {
|
|
509
524
|
throw r;
|
|
510
525
|
})
|
|
511
526
|
);
|
|
512
527
|
}
|
|
513
|
-
function
|
|
514
|
-
|
|
528
|
+
function S(e, t) {
|
|
529
|
+
g().log("Posting event:", t ? { eventType: e, eventData: t } : { eventType: e });
|
|
515
530
|
const r = window, n = JSON.stringify({ eventType: e, eventData: t });
|
|
516
|
-
return
|
|
531
|
+
return pe() ? (Mt(n, Se()), _(void 0)) : ce(r) ? (r.TelegramWebviewProxy.postEvent(e, JSON.stringify(t)), _(void 0)) : R(m({ external: m({ notify: ee() }) }), r) ? (r.external.notify(n), _(void 0)) : w(new xe());
|
|
517
532
|
}
|
|
518
|
-
function
|
|
533
|
+
function z(e, t, r = {}) {
|
|
519
534
|
const {
|
|
520
535
|
// If no capture function was passed, we capture the first compatible event.
|
|
521
536
|
capture: n = () => !0,
|
|
522
|
-
postEvent: a =
|
|
523
|
-
} = r, o =
|
|
537
|
+
postEvent: a = S
|
|
538
|
+
} = r, o = d(), [s, i] = re();
|
|
524
539
|
(Array.isArray(t) ? t : [t]).forEach((u) => {
|
|
525
540
|
s(
|
|
526
|
-
|
|
527
|
-
|
|
541
|
+
j(u, (p) => {
|
|
542
|
+
const l = Array.isArray(t);
|
|
543
|
+
n(l ? { event: u, payload: p } : p) && o.set([
|
|
544
|
+
l ? { event: u, payload: p } : p
|
|
545
|
+
]);
|
|
528
546
|
})
|
|
529
547
|
);
|
|
530
548
|
});
|
|
531
549
|
const c = (u) => (i(), u);
|
|
532
|
-
return
|
|
550
|
+
return f(
|
|
533
551
|
async () => a(e, r.params),
|
|
534
|
-
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
537
|
-
return u(
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
},
|
|
541
|
-
o.unsub(
|
|
552
|
+
Pe(() => ne((u, p, l) => {
|
|
553
|
+
const h = o();
|
|
554
|
+
if (h)
|
|
555
|
+
return u(h[0]);
|
|
556
|
+
const b = (y) => {
|
|
557
|
+
y && u(y[0]);
|
|
558
|
+
}, L = () => {
|
|
559
|
+
o.unsub(b);
|
|
542
560
|
};
|
|
543
|
-
o.sub(
|
|
561
|
+
o.sub(b), l.on("finalized", L);
|
|
544
562
|
}, r)),
|
|
545
|
-
|
|
563
|
+
ye(c, c)
|
|
546
564
|
);
|
|
547
565
|
}
|
|
548
|
-
function
|
|
566
|
+
function Zt(e, t, r) {
|
|
549
567
|
const { postEvent: n } = r || {};
|
|
550
|
-
return
|
|
568
|
+
return $(
|
|
551
569
|
// @ts-expect-error TypeScript will not be able to handle our overrides here.
|
|
552
|
-
|
|
570
|
+
z(e, t, {
|
|
553
571
|
...r,
|
|
554
572
|
postEvent: n ? (...a) => {
|
|
555
573
|
try {
|
|
556
574
|
return n(...a), _(void 0);
|
|
557
575
|
} catch (o) {
|
|
558
|
-
return
|
|
576
|
+
return w(o);
|
|
559
577
|
}
|
|
560
|
-
} :
|
|
578
|
+
} : S
|
|
561
579
|
})
|
|
562
580
|
);
|
|
563
581
|
}
|
|
564
|
-
function
|
|
582
|
+
function er(e, t) {
|
|
565
583
|
const r = Lt(
|
|
566
584
|
// @ts-expect-error TS doesn't get what override we are going to use.
|
|
567
585
|
e,
|
|
568
586
|
t
|
|
569
587
|
);
|
|
570
|
-
return typeof r == "function" ?
|
|
588
|
+
return typeof r == "function" ? oe.fn(() => $(r)) : r;
|
|
571
589
|
}
|
|
572
590
|
function Lt(e, t) {
|
|
573
|
-
const r =
|
|
591
|
+
const r = ce(window);
|
|
574
592
|
if (!e)
|
|
575
|
-
return r ||
|
|
593
|
+
return r || f(C(), U(() => !1, () => !0));
|
|
576
594
|
if (r)
|
|
577
|
-
return
|
|
595
|
+
return ve(!0);
|
|
578
596
|
const { timeout: n = 100 } = t || {};
|
|
579
|
-
return
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
(a) =>
|
|
597
|
+
return f(
|
|
598
|
+
z("web_app_request_theme", "theme_changed", { ...t, timeout: n }),
|
|
599
|
+
be(
|
|
600
|
+
(a) => Fe.is(a) || xe.is(a) ? _(!1) : w(a),
|
|
583
601
|
() => _(!0)
|
|
584
602
|
)
|
|
585
603
|
);
|
|
586
604
|
}
|
|
587
|
-
function
|
|
605
|
+
function tr({ launchParams: e, onEvent: t, resetPostMessage: r } = {}) {
|
|
588
606
|
if (e) {
|
|
589
607
|
const o = typeof e == "string" || e instanceof URLSearchParams ? e.toString() : (
|
|
590
608
|
// Here we have to trick serializeLaunchParamsQuery into thinking, it serializes a valid
|
|
591
609
|
// value. We are doing it because we are working with tgWebAppData presented as a
|
|
592
610
|
// string, not an object as serializeLaunchParamsQuery requires.
|
|
593
|
-
|
|
611
|
+
Ue({ ...e, tgWebAppData: void 0 }) + (e.tgWebAppData ? `&tgWebAppData=${encodeURIComponent(e.tgWebAppData.toString())}` : "")
|
|
594
612
|
);
|
|
595
613
|
try {
|
|
596
|
-
|
|
614
|
+
Ie(o);
|
|
597
615
|
} catch (s) {
|
|
598
616
|
throw new bt(o, s);
|
|
599
617
|
}
|
|
600
|
-
|
|
618
|
+
te("launchParams", o);
|
|
601
619
|
}
|
|
602
|
-
if (
|
|
620
|
+
if (pe()) {
|
|
603
621
|
if (!t)
|
|
604
622
|
return;
|
|
605
|
-
r &&
|
|
606
|
-
const o =
|
|
607
|
-
|
|
623
|
+
r && x.reset();
|
|
624
|
+
const o = x();
|
|
625
|
+
x.set((...s) => {
|
|
608
626
|
const [i] = s, c = () => {
|
|
609
627
|
o(...s);
|
|
610
628
|
};
|
|
611
629
|
try {
|
|
612
|
-
const u =
|
|
630
|
+
const u = W(se(ie()), i);
|
|
613
631
|
t({ name: u.eventType, params: u.eventData }, c);
|
|
614
632
|
} catch {
|
|
615
633
|
c();
|
|
@@ -630,23 +648,11 @@ function er({ launchParams: e, onEvent: t, resetPostMessage: r } = {}) {
|
|
|
630
648
|
params: s ? JSON.parse(s) : void 0
|
|
631
649
|
}, i) : i();
|
|
632
650
|
}
|
|
633
|
-
},
|
|
651
|
+
}, g().log("Environment was mocked by the mockTelegramEnv function");
|
|
634
652
|
}
|
|
635
|
-
function
|
|
653
|
+
function qt(e) {
|
|
636
654
|
return ({ req_id: t }) => t === e;
|
|
637
655
|
}
|
|
638
|
-
function H(e) {
|
|
639
|
-
return e.split(".").map(Number);
|
|
640
|
-
}
|
|
641
|
-
function Ft(e, t) {
|
|
642
|
-
const r = H(e), n = H(t), a = Math.max(r.length, n.length);
|
|
643
|
-
for (let o = 0; o < a; o += 1) {
|
|
644
|
-
const s = r[o] || 0, i = n[o] || 0;
|
|
645
|
-
if (s !== i)
|
|
646
|
-
return s > i ? 1 : -1;
|
|
647
|
-
}
|
|
648
|
-
return 0;
|
|
649
|
-
}
|
|
650
656
|
const K = {
|
|
651
657
|
"6.0": [
|
|
652
658
|
"iframe_ready",
|
|
@@ -738,37 +744,49 @@ const K = {
|
|
|
738
744
|
function Y(e, t) {
|
|
739
745
|
return Object.keys(K).find((n) => K[n].some((a) => t ? typeof a == "object" && a.method === e && a.param === t : a === e)) || null;
|
|
740
746
|
}
|
|
741
|
-
function X(e
|
|
747
|
+
function X(e) {
|
|
748
|
+
return e.split(".").map(Number);
|
|
749
|
+
}
|
|
750
|
+
function Ft(e, t) {
|
|
751
|
+
const r = X(e), n = X(t), a = Math.max(r.length, n.length);
|
|
752
|
+
for (let o = 0; o < a; o += 1) {
|
|
753
|
+
const s = r[o] || 0, i = n[o] || 0;
|
|
754
|
+
if (s !== i)
|
|
755
|
+
return s > i ? 1 : -1;
|
|
756
|
+
}
|
|
757
|
+
return 0;
|
|
758
|
+
}
|
|
759
|
+
function Z(e, t, r) {
|
|
742
760
|
const n = r ? Y(
|
|
743
761
|
e,
|
|
744
762
|
t
|
|
745
763
|
) : Y(e);
|
|
746
764
|
return n ? Ft(n, r || t) <= 0 : !1;
|
|
747
765
|
}
|
|
748
|
-
function
|
|
766
|
+
function rr(e, t = "strict") {
|
|
749
767
|
const r = typeof t == "function" ? t : (n) => {
|
|
750
768
|
const { method: a, version: o } = n, s = "param" in n ? new dt(a, n.param, o) : new gt(a, o);
|
|
751
769
|
if (t === "strict")
|
|
752
770
|
throw s;
|
|
753
|
-
return
|
|
771
|
+
return g().forceWarn(s.message);
|
|
754
772
|
};
|
|
755
|
-
return (n, a) =>
|
|
773
|
+
return (n, a) => Z(n, e) ? n === "web_app_set_header_color" && R(m({ color: Ce() }), a) && !Z(n, "color", e) ? r({ version: e, method: n, param: "color" }) : Ct(n, a) : r({ version: e, method: n });
|
|
756
774
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
759
|
-
|
|
775
|
+
function Wt(e, t, r, n) {
|
|
776
|
+
return f(
|
|
777
|
+
z("web_app_invoke_custom_method", "custom_method_invoked", {
|
|
760
778
|
...n || {},
|
|
761
779
|
params: { method: e, params: t, req_id: r },
|
|
762
|
-
capture:
|
|
780
|
+
capture: qt(r)
|
|
763
781
|
}),
|
|
764
|
-
|
|
782
|
+
ht(({ result: a, error: o }) => o ? wt(new yt(o)) : ve(a))
|
|
765
783
|
);
|
|
766
784
|
}
|
|
767
|
-
function
|
|
768
|
-
return
|
|
785
|
+
function nr(e, t, r, n) {
|
|
786
|
+
return oe.fn(() => f(
|
|
769
787
|
// @ts-expect-error TypeScript is unable to determine required override.
|
|
770
|
-
|
|
771
|
-
|
|
788
|
+
Wt(e, t, r, n),
|
|
789
|
+
be(
|
|
772
790
|
(a) => {
|
|
773
791
|
throw a;
|
|
774
792
|
},
|
|
@@ -776,103 +794,153 @@ function rr(e, t, r, n) {
|
|
|
776
794
|
)
|
|
777
795
|
)());
|
|
778
796
|
}
|
|
779
|
-
function
|
|
797
|
+
function Rt(e, t, r = {}) {
|
|
798
|
+
const {
|
|
799
|
+
// If no capture function was passed, we capture the first compatible event.
|
|
800
|
+
capture: n = () => !0,
|
|
801
|
+
postEvent: a = S
|
|
802
|
+
} = r, o = d(), [s, i] = re();
|
|
803
|
+
(Array.isArray(t) ? t : [t]).forEach((u) => {
|
|
804
|
+
s(
|
|
805
|
+
j(u, (p) => {
|
|
806
|
+
(Array.isArray(t) ? n({ event: u, payload: p }) : n(p)) && o.set([p]);
|
|
807
|
+
})
|
|
808
|
+
);
|
|
809
|
+
});
|
|
810
|
+
const c = (u) => (i(), u);
|
|
811
|
+
return f(
|
|
812
|
+
async () => a(e, r.params),
|
|
813
|
+
Pe(() => ne((u, p, l) => {
|
|
814
|
+
const h = o();
|
|
815
|
+
if (h)
|
|
816
|
+
return u(h[0]);
|
|
817
|
+
const b = (y) => {
|
|
818
|
+
y && u(y[0]);
|
|
819
|
+
}, L = () => {
|
|
820
|
+
o.unsub(b);
|
|
821
|
+
};
|
|
822
|
+
o.sub(b), l.on("finalized", L);
|
|
823
|
+
}, r)),
|
|
824
|
+
ye(c, c)
|
|
825
|
+
);
|
|
826
|
+
}
|
|
827
|
+
function or(e, t, r) {
|
|
828
|
+
const { postEvent: n } = r || {};
|
|
829
|
+
return $(
|
|
830
|
+
// @ts-expect-error TypeScript will not be able to handle our overrides here.
|
|
831
|
+
Rt(e, t, {
|
|
832
|
+
...r,
|
|
833
|
+
postEvent: n ? (...a) => {
|
|
834
|
+
try {
|
|
835
|
+
return n(...a), _(void 0);
|
|
836
|
+
} catch (o) {
|
|
837
|
+
return w(o);
|
|
838
|
+
}
|
|
839
|
+
} : S
|
|
840
|
+
})
|
|
841
|
+
);
|
|
842
|
+
}
|
|
843
|
+
function ar() {
|
|
780
844
|
Object.hasOwn || (Object.hasOwn = function(e, t) {
|
|
781
845
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
782
846
|
});
|
|
783
847
|
}
|
|
784
|
-
function
|
|
785
|
-
return
|
|
786
|
-
atob(
|
|
848
|
+
function Te(e) {
|
|
849
|
+
return I(() => decodeURIComponent(
|
|
850
|
+
atob(
|
|
851
|
+
e.replace(/-/g, "+").replace(/_/g, "/")
|
|
852
|
+
).split("").map((t) => "%" + ("00" + t.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
787
853
|
), (t) => t);
|
|
788
854
|
}
|
|
789
|
-
const
|
|
790
|
-
function
|
|
855
|
+
const sr = T(Te);
|
|
856
|
+
function $e(e) {
|
|
791
857
|
return btoa(
|
|
792
858
|
encodeURIComponent(e).replace(/%([0-9A-F]{2})/g, (t, r) => String.fromCharCode(parseInt(`0x${r}`)))
|
|
793
859
|
).replace(/\+/g, "-").replace(/\//g, "_");
|
|
794
860
|
}
|
|
795
|
-
var
|
|
796
|
-
return
|
|
861
|
+
var Ut = function(e) {
|
|
862
|
+
return I(function() {
|
|
797
863
|
return JSON.parse(e);
|
|
798
|
-
},
|
|
864
|
+
}, ze);
|
|
799
865
|
};
|
|
800
|
-
function
|
|
801
|
-
const t =
|
|
802
|
-
return t.length > 512 ?
|
|
803
|
-
}
|
|
804
|
-
const
|
|
805
|
-
function
|
|
806
|
-
return
|
|
807
|
-
|
|
866
|
+
function It(e) {
|
|
867
|
+
const t = $e(typeof e == "string" ? e : JSON.stringify(e));
|
|
868
|
+
return t.length > 512 ? w(new Error("Value is too long for start parameter")) : _(t);
|
|
869
|
+
}
|
|
870
|
+
const ir = T(It);
|
|
871
|
+
function ur(e, t) {
|
|
872
|
+
return $(
|
|
873
|
+
Ot(
|
|
808
874
|
e,
|
|
809
875
|
// @ts-expect-error TypeScript is unable to detect a correct override.
|
|
810
|
-
typeof t == "function" ? (r) =>
|
|
876
|
+
typeof t == "function" ? (r) => I(() => t(r), (n) => n) : t
|
|
811
877
|
)
|
|
812
878
|
);
|
|
813
879
|
}
|
|
814
|
-
function
|
|
815
|
-
return
|
|
816
|
-
|
|
817
|
-
|
|
880
|
+
function Ot(e, t) {
|
|
881
|
+
return f(
|
|
882
|
+
Te(e),
|
|
883
|
+
Ze((r) => t ? typeof t == "function" ? t(r) : Ut(r) : _(r))
|
|
818
884
|
);
|
|
819
885
|
}
|
|
820
|
-
function
|
|
821
|
-
return
|
|
886
|
+
function cr(e) {
|
|
887
|
+
return $e(e).length <= 512;
|
|
822
888
|
}
|
|
823
889
|
export {
|
|
824
|
-
|
|
890
|
+
wr as CancelledError,
|
|
825
891
|
bt as InvalidLaunchParamsError,
|
|
826
892
|
yt as InvokeCustomMethodFailedError,
|
|
827
893
|
vt as LaunchParamsRetrieveError,
|
|
828
894
|
dt as MethodParameterUnsupportedError,
|
|
829
895
|
gt as MethodUnsupportedError,
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
896
|
+
hr as TimeoutError,
|
|
897
|
+
xe as UnknownEnvError,
|
|
898
|
+
ar as applyPolyfills,
|
|
899
|
+
qt as captureSameReq,
|
|
834
900
|
Ft as compareVersions,
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
901
|
+
fr as createLogger,
|
|
902
|
+
rr as createPostEvent,
|
|
903
|
+
ir as createStartParam,
|
|
904
|
+
It as createStartParamFp,
|
|
905
|
+
ke as debug,
|
|
906
|
+
sr as decodeBase64Url,
|
|
907
|
+
Te as decodeBase64UrlFp,
|
|
908
|
+
ur as decodeStartParam,
|
|
909
|
+
Ot as decodeStartParamFp,
|
|
910
|
+
lr as deepSnakeToCamelObjKeys,
|
|
911
|
+
q as emitEvent,
|
|
912
|
+
$e as encodeBase64Url,
|
|
847
913
|
Y as getReleaseVersion,
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
914
|
+
ce as hasWebviewProxy,
|
|
915
|
+
nr as invokeCustomMethod,
|
|
916
|
+
Wt as invokeCustomMethodFp,
|
|
917
|
+
pe as isIframe,
|
|
918
|
+
cr as isSafeToCreateStartParam,
|
|
919
|
+
er as isTMA,
|
|
854
920
|
Lt as isTMAFp,
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
921
|
+
g as logger,
|
|
922
|
+
tr as mockTelegramEnv,
|
|
923
|
+
At as off,
|
|
858
924
|
$t as offAll,
|
|
859
|
-
|
|
925
|
+
j as on,
|
|
860
926
|
Ct as postEvent,
|
|
861
|
-
|
|
927
|
+
S as postEventFp,
|
|
862
928
|
Mt as postMessage,
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
929
|
+
x as postMessageImpl,
|
|
930
|
+
or as request,
|
|
931
|
+
Zt as request2,
|
|
932
|
+
z as request2Fp,
|
|
933
|
+
Rt as requestFp,
|
|
934
|
+
Xt as resetGlobals,
|
|
935
|
+
Jt as retrieveLaunchParams,
|
|
868
936
|
Et as retrieveLaunchParamsFp,
|
|
869
|
-
|
|
937
|
+
Qt as retrieveRawInitData,
|
|
870
938
|
Pt as retrieveRawInitDataFp,
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
939
|
+
Ht as retrieveRawLaunchParams,
|
|
940
|
+
C as retrieveRawLaunchParamsFp,
|
|
941
|
+
Kt as setDebug,
|
|
942
|
+
Yt as setTargetOrigin,
|
|
943
|
+
Z as supports,
|
|
944
|
+
Se as targetOrigin
|
|
877
945
|
};
|
|
878
946
|
//# sourceMappingURL=index.js.map
|