@vbotma/sdk 3.3.9 → 5.0.0
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 +0 -13
- package/dist/dts/init.d.ts +1 -1
- package/dist/index.cjs +1 -1
- 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 +731 -732
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (n, e, s) =>
|
|
1
|
+
var ct = Object.defineProperty;
|
|
2
|
+
var pt = (n, e, s) => e in n ? ct(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s;
|
|
3
|
+
var t = (n, e, s) => pt(n, typeof e != "symbol" ? e + "" : e, s);
|
|
4
4
|
import { batch as ue, signal as O, computed as S } from "@vbotma/signals";
|
|
5
|
-
import { supports as te, isVBmaFp as
|
|
6
|
-
import { CancelledError as
|
|
7
|
-
import { throwifyFpFn as he, throwifyAnyEither as We, setStorageValue as
|
|
8
|
-
import { BetterPromise as
|
|
9
|
-
import { toRGBFullFp as
|
|
10
|
-
import { isAnyRGB as
|
|
5
|
+
import { supports as te, isVBmaFp as ut, postEventFp as ye, off as ne, on as j, request2Fp as Ge, requestFp as lt, invokeCustomMethodFp as dt, retrieveLaunchParamsFp as le, retrieveRawInitDataFp as ht, captureSameReq as _t, getHostBridge as d, LATEST_VERSION as bt, logger as He } from "@vbotma/bridge";
|
|
6
|
+
import { CancelledError as Ri, InvalidLaunchParamsError as Ti, InvokeCustomMethodFailedError as Vi, LaunchParamsRetrieveError as Li, MethodParameterUnsupportedError as $i, MethodUnsupportedError as Pi, TimeoutError as Hi, UnknownEnvError as Oi, applyPolyfills as Di, createLogger as ji, createPostEvent as Gi, createStartParam as Wi, createStartParamFp as Ui, debug as Qi, decodeBase64Url as Ki, decodeBase64UrlFp as Ni, decodeStartParam as zi, decodeStartParamFp as Ji, deepSnakeToCamelObjKeys as Yi, defineHostBridge as Zi, defineWebComponentBridge as Xi, emitEvent as eo, encodeBase64Url as to, getHostBridge as so, getReleaseVersion as ro, isSafeToCreateStartParam as no, isVBma as io, isVBmaFp as oo, logger as ao, mockVBotEnv as co, off as po, offAll as uo, on as lo, retrieveLaunchParams as ho, retrieveLaunchParamsFp as _o, retrieveRawInitData as bo, retrieveRawInitDataFp as fo, retrieveRawLaunchParams as go, retrieveRawLaunchParamsFp as mo, setDebug as wo, setLaunchParams as Fo, setTargetOrigin as So, supports as Co, targetOrigin as vo } from "@vbotma/bridge";
|
|
7
|
+
import { throwifyFpFn as he, throwifyAnyEither as We, setStorageValue as ft, getStorageValue as gt, snakeToKebab as mt, createCbCollector as qe, camelToKebab as Ue, BetterTaskEither as we } from "@vbotma/toolkit";
|
|
8
|
+
import { BetterPromise as Qe } from "better-promises";
|
|
9
|
+
import { toRGBFullFp as wt, isRGB as be, pipeQueryToSchema as Ft, pipeJsonToSchema as St } from "@vbotma/transformers";
|
|
10
|
+
import { isAnyRGB as yo, isRGB as qo, isRGBA as Io, isRGBAShort as Eo, isRGBShort as Bo, parseInitDataQuery as Ao, parseInitDataQueryFp as xo, parseLaunchParamsQuery as Mo, parseLaunchParamsQueryFp as Ro, serializeInitDataQuery as To, serializeLaunchParamsQuery as Vo, toRGB as Lo, toRGBFp as $o, toRGBFull as Po, toRGBFullFp as Ho } from "@vbotma/transformers";
|
|
11
11
|
import { either as m, function as p, option as z, taskEither as u } from "fp-ts";
|
|
12
|
-
import { errorClass as G, errorClassWithData as
|
|
13
|
-
import { parse as Oe, record as
|
|
12
|
+
import { errorClass as G, errorClassWithData as Ie } from "error-kid";
|
|
13
|
+
import { parse as Oe, record as Ct, string as N, array as vt, safeParse as Fe, looseObject as De, pipe as Ke, transform as Ne, date as ze, optional as kt, number as Je, integer as yt } from "valibot";
|
|
14
14
|
function P(n) {
|
|
15
15
|
return typeof n == "function" ? n() : n;
|
|
16
16
|
}
|
|
@@ -51,7 +51,7 @@ class ie {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Se(n) {
|
|
55
55
|
const e = {};
|
|
56
56
|
for (const s in n) {
|
|
57
57
|
const r = n[s];
|
|
@@ -59,7 +59,7 @@ function ve(n) {
|
|
|
59
59
|
}
|
|
60
60
|
return e;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function fe(n, e) {
|
|
63
63
|
const s = Object.keys(n), r = Object.keys(e);
|
|
64
64
|
return s.length !== r.length ? !1 : s.every((i) => Object.prototype.hasOwnProperty.call(e, i) && n[i] === e[i]);
|
|
65
65
|
}
|
|
@@ -75,10 +75,10 @@ class Y {
|
|
|
75
75
|
* @param state - updates to apply.
|
|
76
76
|
*/
|
|
77
77
|
t(this, "setState", (e) => {
|
|
78
|
-
const s = { ...this.state(), ...
|
|
79
|
-
|
|
78
|
+
const s = { ...this.state(), ...Se(e) };
|
|
79
|
+
fe(s, this.state()) || this._state.set(s);
|
|
80
80
|
});
|
|
81
|
-
this._state = O(e, { equals:
|
|
81
|
+
this._state = O(e, { equals: fe }), this.state = S(this._state), this.state.sub(s);
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Creates a computed signal based on the state.
|
|
@@ -92,7 +92,7 @@ class Y {
|
|
|
92
92
|
* @param state
|
|
93
93
|
*/
|
|
94
94
|
hasDiff(e) {
|
|
95
|
-
return !
|
|
95
|
+
return !fe({ ...this.state(), ...Se(e) }, this.state());
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
function W(n, e) {
|
|
@@ -118,47 +118,47 @@ function h(n) {
|
|
|
118
118
|
function ee(n) {
|
|
119
119
|
return [n];
|
|
120
120
|
}
|
|
121
|
-
class pe extends (/* @__PURE__ */
|
|
121
|
+
class pe extends (/* @__PURE__ */ Ie(
|
|
122
122
|
"ValidationError",
|
|
123
123
|
(e, s) => ({ input: e, issues: s }),
|
|
124
124
|
"Validation error"
|
|
125
125
|
)) {
|
|
126
126
|
}
|
|
127
|
-
class
|
|
127
|
+
class Ee extends (/* @__PURE__ */ G(
|
|
128
128
|
"CSSVarsBoundError",
|
|
129
129
|
"CSS variables are already bound"
|
|
130
130
|
)) {
|
|
131
131
|
}
|
|
132
|
-
class
|
|
132
|
+
class qt extends (/* @__PURE__ */ Ie("DeviceStorageMethodError", (e) => ({ error: e }), (e) => [e])) {
|
|
133
133
|
}
|
|
134
|
-
class
|
|
134
|
+
class It extends (/* @__PURE__ */ Ie("SecureStorageMethodError", (e) => ({ error: e }), (e) => [e])) {
|
|
135
135
|
}
|
|
136
|
-
class
|
|
136
|
+
class Et extends (/* @__PURE__ */ G(
|
|
137
137
|
"NotAvailableError",
|
|
138
138
|
ee
|
|
139
139
|
)) {
|
|
140
140
|
}
|
|
141
|
-
class
|
|
141
|
+
class bn extends (/* @__PURE__ */ G(
|
|
142
142
|
"InvalidEnvError",
|
|
143
143
|
ee
|
|
144
144
|
)) {
|
|
145
145
|
}
|
|
146
|
-
class
|
|
146
|
+
class Bt extends (/* @__PURE__ */ G(
|
|
147
147
|
"FunctionNotAvailableError",
|
|
148
148
|
ee
|
|
149
149
|
)) {
|
|
150
150
|
}
|
|
151
|
-
class
|
|
151
|
+
class Q extends (/* @__PURE__ */ G(
|
|
152
152
|
"InvalidArgumentsError",
|
|
153
153
|
(e, s) => [e, { cause: s }]
|
|
154
154
|
)) {
|
|
155
155
|
}
|
|
156
|
-
class
|
|
156
|
+
class Be extends (/* @__PURE__ */ G(
|
|
157
157
|
"ConcurrentCallError",
|
|
158
158
|
ee
|
|
159
159
|
)) {
|
|
160
160
|
}
|
|
161
|
-
class
|
|
161
|
+
class At extends (/* @__PURE__ */ G(
|
|
162
162
|
"SetEmojiStatusError",
|
|
163
163
|
(e) => [`Failed to set emoji status: ${e}`]
|
|
164
164
|
)) {
|
|
@@ -168,17 +168,17 @@ class Ye extends (/* @__PURE__ */ G(
|
|
|
168
168
|
ee
|
|
169
169
|
)) {
|
|
170
170
|
}
|
|
171
|
-
class
|
|
171
|
+
class xt extends (/* @__PURE__ */ G(
|
|
172
172
|
"FullscreenFailedError",
|
|
173
173
|
ee
|
|
174
174
|
)) {
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class Mt extends (/* @__PURE__ */ G(
|
|
177
177
|
"ShareMessageError",
|
|
178
178
|
ee
|
|
179
179
|
)) {
|
|
180
180
|
}
|
|
181
|
-
class
|
|
181
|
+
class Rt extends (/* @__PURE__ */ G(
|
|
182
182
|
"UnknownThemeParamsKeyError",
|
|
183
183
|
(e) => [`Unknown theme params key passed: ${e}`]
|
|
184
184
|
)) {
|
|
@@ -193,37 +193,37 @@ function A(n, e) {
|
|
|
193
193
|
if (!c)
|
|
194
194
|
return;
|
|
195
195
|
const [g, w] = "every" in c ? ["every", c.every] : ["some", c.some];
|
|
196
|
-
for (let
|
|
197
|
-
const x = w[
|
|
198
|
-
if (
|
|
199
|
-
return
|
|
196
|
+
for (let _ = 0; _ < w.length; _++) {
|
|
197
|
+
const x = w[_], V = typeof x == "function" ? x() : te(x, s()) ? void 0 : `it is unsupported in Mini Apps version ${s()}`;
|
|
198
|
+
if (V && (g === "every" || _ === w.length - 1))
|
|
199
|
+
return V;
|
|
200
200
|
}
|
|
201
|
-
},
|
|
201
|
+
}, f = (...g) => {
|
|
202
202
|
for (const w in e.supports)
|
|
203
203
|
if (e.supports[w].shouldCheck(...g) && !a(w))
|
|
204
204
|
return `option ${w} is not supported in Mini Apps version ${s()}`;
|
|
205
|
-
}, F = S(() => !l()),
|
|
206
|
-
() => r() &&
|
|
205
|
+
}, F = S(() => !l()), b = S(() => s() !== "0.0"), k = S(() => e.isMounted ? e.isMounted() : !0), C = S(
|
|
206
|
+
() => r() && b() && F() && k()
|
|
207
207
|
), q = (g) => {
|
|
208
|
-
const w = new
|
|
208
|
+
const w = new Bt(g);
|
|
209
209
|
return ["task", "promise"].includes(e.returns) ? u.left(w) : m.left(w);
|
|
210
210
|
}, I = (...g) => o === "plain" ? m.tryCatch(() => n(...g), (w) => w) : o === "promise" ? u.tryCatch(() => n(...g), (w) => w) : n(...g);
|
|
211
211
|
return Object.assign(
|
|
212
212
|
(...g) => {
|
|
213
|
-
var
|
|
213
|
+
var V;
|
|
214
214
|
const w = "Unable to call function:";
|
|
215
215
|
if (!r())
|
|
216
216
|
return q(`${w} it can't be called outside Mini Apps`);
|
|
217
|
-
if (!
|
|
217
|
+
if (!b())
|
|
218
218
|
return q(`${w} the SDK was not initialized. Use the SDK init() function`);
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
221
|
-
return q(`${w} ${
|
|
222
|
-
const x =
|
|
219
|
+
const _ = l();
|
|
220
|
+
if (_)
|
|
221
|
+
return q(`${w} ${_}`);
|
|
222
|
+
const x = f(...g);
|
|
223
223
|
if (x)
|
|
224
224
|
return q(`${w} ${x}`);
|
|
225
225
|
if (!k()) {
|
|
226
|
-
const R = (
|
|
226
|
+
const R = (V = e.isMounting) != null && V.call(e) ? "mounting. Wait for the mount completion" : "unmounted. Use the mount() method";
|
|
227
227
|
return q(`${w} the component is ${R}`);
|
|
228
228
|
}
|
|
229
229
|
return I(...g);
|
|
@@ -252,7 +252,7 @@ class _e {
|
|
|
252
252
|
isPageReload: c,
|
|
253
253
|
postEvent: a,
|
|
254
254
|
payload: l,
|
|
255
|
-
method:
|
|
255
|
+
method: f,
|
|
256
256
|
version: F
|
|
257
257
|
}) {
|
|
258
258
|
/**
|
|
@@ -334,7 +334,7 @@ class _e {
|
|
|
334
334
|
* @see onClick
|
|
335
335
|
*/
|
|
336
336
|
t(this, "unmount");
|
|
337
|
-
const
|
|
337
|
+
const b = new Y({
|
|
338
338
|
initialState: o,
|
|
339
339
|
onChange(g) {
|
|
340
340
|
s.set(g);
|
|
@@ -342,9 +342,9 @@ class _e {
|
|
|
342
342
|
}), k = new ie({
|
|
343
343
|
initialState: o,
|
|
344
344
|
isPageReload: c,
|
|
345
|
-
onMounted:
|
|
345
|
+
onMounted: b.setState,
|
|
346
346
|
restoreState: s.get
|
|
347
|
-
}), C = { version: F, requires:
|
|
347
|
+
}), C = { version: F, requires: f, isVBma: e }, q = E({
|
|
348
348
|
...C,
|
|
349
349
|
returns: "plain"
|
|
350
350
|
}), I = E({
|
|
@@ -352,12 +352,12 @@ class _e {
|
|
|
352
352
|
returns: "either",
|
|
353
353
|
isMounted: k.isMounted
|
|
354
354
|
});
|
|
355
|
-
this.isMounted = k.isMounted, this.isSupported = W(
|
|
356
|
-
const w = { ...this.state(), ...
|
|
357
|
-
return
|
|
358
|
-
a(
|
|
355
|
+
this.isMounted = k.isMounted, this.isSupported = W(f, F), this.state = b.state, this.setStateFp = I((g) => {
|
|
356
|
+
const w = { ...this.state(), ...Se(g) };
|
|
357
|
+
return b.hasDiff(w) ? p.pipe(
|
|
358
|
+
a(f, l(w)),
|
|
359
359
|
m.map(() => {
|
|
360
|
-
|
|
360
|
+
b.setState(w);
|
|
361
361
|
})
|
|
362
362
|
) : m.right(void 0);
|
|
363
363
|
}), this.setState = /* @__PURE__ */ h(this.setStateFp), this.onClickFp = q(r), this.onClick = /* @__PURE__ */ h(this.onClickFp), this.offClickFp = q(i), this.offClick = /* @__PURE__ */ h(this.offClickFp), this.mountFp = q(() => {
|
|
@@ -365,12 +365,12 @@ class _e {
|
|
|
365
365
|
};
|
|
366
366
|
return p.pipe(k.mount(), m.match(g, g));
|
|
367
367
|
}), this.mount = /* @__PURE__ */ h(this.mountFp), this.unmount = k.unmount, this.stateSetters = (g) => {
|
|
368
|
-
const w = I((
|
|
368
|
+
const w = I((_) => this.setStateFp({ [g]: _ }));
|
|
369
369
|
return [/* @__PURE__ */ h(w), w];
|
|
370
370
|
}, this.stateBoolSetters = (g) => {
|
|
371
|
-
const [, w] = this.stateSetters(g),
|
|
371
|
+
const [, w] = this.stateSetters(g), _ = I(() => w(!1)), x = I(() => w(!0));
|
|
372
372
|
return [
|
|
373
|
-
[/* @__PURE__ */ h(
|
|
373
|
+
[/* @__PURE__ */ h(_), _],
|
|
374
374
|
[/* @__PURE__ */ h(x), x]
|
|
375
375
|
];
|
|
376
376
|
};
|
|
@@ -476,7 +476,7 @@ class Tt {
|
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
function v() {
|
|
479
|
-
return { isVBma: S(() =>
|
|
479
|
+
return { isVBma: S(() => ut()) };
|
|
480
480
|
}
|
|
481
481
|
function se(n) {
|
|
482
482
|
return (e) => ({ ...e, ...P(n) });
|
|
@@ -485,37 +485,37 @@ function se(n) {
|
|
|
485
485
|
function oe(n, e) {
|
|
486
486
|
return O(n, e);
|
|
487
487
|
}
|
|
488
|
-
const Ze = /* @__PURE__ */ oe(
|
|
488
|
+
const Ze = /* @__PURE__ */ oe(ye), re = (...n) => Ze()(...n), Vt = (...n) => We(re(...n)), T = se({
|
|
489
489
|
postEvent: re
|
|
490
490
|
});
|
|
491
|
-
function
|
|
491
|
+
function Lt(n) {
|
|
492
492
|
return {
|
|
493
|
-
get: () =>
|
|
493
|
+
get: () => gt(n),
|
|
494
494
|
set(e) {
|
|
495
|
-
|
|
495
|
+
ft(n, e);
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function $t() {
|
|
500
500
|
return performance.getEntriesByType("navigation")[0];
|
|
501
501
|
}
|
|
502
|
-
function
|
|
503
|
-
const n =
|
|
502
|
+
function Pt() {
|
|
503
|
+
const n = $t();
|
|
504
504
|
return !!n && n.type === "reload";
|
|
505
505
|
}
|
|
506
506
|
function Z(n) {
|
|
507
507
|
return se({
|
|
508
|
-
storage:
|
|
509
|
-
isPageReload:
|
|
508
|
+
storage: Lt(n),
|
|
509
|
+
isPageReload: Pt
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
|
-
const
|
|
512
|
+
const Ce = /* @__PURE__ */ oe("0.0"), y = se({ version: Ce });
|
|
513
513
|
// @__NO_SIDE_EFFECTS__
|
|
514
|
-
function
|
|
514
|
+
function Ae(n, e) {
|
|
515
515
|
return {
|
|
516
516
|
...p.pipe(
|
|
517
517
|
v(),
|
|
518
|
-
|
|
518
|
+
T,
|
|
519
519
|
y,
|
|
520
520
|
Z(n)
|
|
521
521
|
),
|
|
@@ -527,10 +527,10 @@ function xe(n, e) {
|
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
const
|
|
531
|
-
/* @__PURE__ */
|
|
530
|
+
const fn = /* @__PURE__ */ new Tt(
|
|
531
|
+
/* @__PURE__ */ Ae("backButton", "back_button_pressed")
|
|
532
532
|
);
|
|
533
|
-
class
|
|
533
|
+
class xe {
|
|
534
534
|
constructor({
|
|
535
535
|
initialState: e,
|
|
536
536
|
onMounted: s,
|
|
@@ -572,13 +572,13 @@ class Me {
|
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
function je() {
|
|
575
|
-
return new
|
|
575
|
+
return new Et("Biometry is not available");
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function ge(n) {
|
|
578
578
|
let e = !1, s = !1, r = "", i = !1, o = "", c = !1;
|
|
579
579
|
return n.available && (e = !0, s = n.token_saved, r = n.device_id, i = n.access_requested, o = n.type, c = n.access_granted), { available: e, tokenSaved: s, deviceId: r, type: o, accessGranted: c, accessRequested: i };
|
|
580
580
|
}
|
|
581
|
-
class
|
|
581
|
+
class Ht {
|
|
582
582
|
constructor({
|
|
583
583
|
version: e,
|
|
584
584
|
request: s,
|
|
@@ -676,8 +676,8 @@ class Ot {
|
|
|
676
676
|
* Unmounts the component.
|
|
677
677
|
*/
|
|
678
678
|
t(this, "unmount");
|
|
679
|
-
const
|
|
680
|
-
F.setState(
|
|
679
|
+
const f = (g) => {
|
|
680
|
+
F.setState(ge(g));
|
|
681
681
|
}, F = new Y({
|
|
682
682
|
initialState: {
|
|
683
683
|
available: !1,
|
|
@@ -688,19 +688,19 @@ class Ot {
|
|
|
688
688
|
tokenSaved: !1
|
|
689
689
|
},
|
|
690
690
|
onChange: i.set
|
|
691
|
-
}),
|
|
691
|
+
}), b = new xe({
|
|
692
692
|
initialState(g) {
|
|
693
693
|
return p.pipe(
|
|
694
694
|
s("web_app_biometry_get_info", "biometry_info_received", g),
|
|
695
|
-
u.map(
|
|
695
|
+
u.map(ge)
|
|
696
696
|
);
|
|
697
697
|
},
|
|
698
698
|
isPageReload: l,
|
|
699
699
|
onMounted(g) {
|
|
700
|
-
F.setState(g), o(
|
|
700
|
+
F.setState(g), o(f);
|
|
701
701
|
},
|
|
702
702
|
onUnmounted() {
|
|
703
|
-
c(
|
|
703
|
+
c(f);
|
|
704
704
|
},
|
|
705
705
|
restoreState: i.get
|
|
706
706
|
}), k = { version: e, requires: "web_app_biometry_request_auth", isVBma: a }, C = E({
|
|
@@ -711,10 +711,10 @@ class Ot {
|
|
|
711
711
|
returns: "task"
|
|
712
712
|
}), I = E({
|
|
713
713
|
...k,
|
|
714
|
-
isMounted:
|
|
714
|
+
isMounted: b.isMounted,
|
|
715
715
|
returns: "task"
|
|
716
716
|
});
|
|
717
|
-
this.isAvailable = F.getter("available"), this.isMounted =
|
|
717
|
+
this.isAvailable = F.getter("available"), this.isMounted = b.isMounted, this.isSupported = W("web_app_biometry_request_auth", e), this.state = F.state, this.unmount = b.unmount, this.mountFp = q(b.mount), this.authenticateFp = I((g) => this.isAvailable() ? p.pipe(
|
|
718
718
|
s("web_app_biometry_request_auth", "biometry_auth_requested", {
|
|
719
719
|
...g,
|
|
720
720
|
params: { reason: ((g || {}).reason || "").trim() }
|
|
@@ -726,8 +726,8 @@ class Ot {
|
|
|
726
726
|
params: { reason: ((g || {}).reason || "").trim() }
|
|
727
727
|
}),
|
|
728
728
|
u.chain((w) => {
|
|
729
|
-
const
|
|
730
|
-
return
|
|
729
|
+
const _ = ge(w);
|
|
730
|
+
return _.available ? (F.setState(_), u.right(_.accessRequested)) : u.left(je());
|
|
731
731
|
})
|
|
732
732
|
)), this.updateTokenFp = I((g = {}) => {
|
|
733
733
|
var w;
|
|
@@ -736,23 +736,23 @@ class Ot {
|
|
|
736
736
|
...g,
|
|
737
737
|
params: { token: g.token || "", reason: (w = g.reason) == null ? void 0 : w.trim() }
|
|
738
738
|
}),
|
|
739
|
-
u.map((
|
|
739
|
+
u.map((_) => _.status)
|
|
740
740
|
);
|
|
741
741
|
}), this.authenticate = /* @__PURE__ */ h(this.authenticateFp), this.openSettings = /* @__PURE__ */ h(this.openSettingsFp), this.requestAccess = /* @__PURE__ */ h(this.requestAccessFp), this.updateToken = /* @__PURE__ */ h(this.updateTokenFp), this.mount = /* @__PURE__ */ h(this.mountFp);
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
const
|
|
744
|
+
const Ot = (n, e, s) => lt(n, e, {
|
|
745
745
|
postEvent: re,
|
|
746
746
|
...s
|
|
747
|
-
}),
|
|
747
|
+
}), Xe = (n, e, s) => Ge(n, e, {
|
|
748
748
|
postEvent: re,
|
|
749
749
|
...s
|
|
750
|
-
}),
|
|
751
|
-
function
|
|
752
|
-
return new
|
|
750
|
+
}), gn = (...n) => Qe.fn(() => Ot(...n)()), mn = (...n) => Qe.fn(() => Xe(...n)()), L = se({ request: Xe });
|
|
751
|
+
function Dt() {
|
|
752
|
+
return new Ht({
|
|
753
753
|
...p.pipe(
|
|
754
754
|
v(),
|
|
755
|
-
|
|
755
|
+
T,
|
|
756
756
|
y,
|
|
757
757
|
L,
|
|
758
758
|
Z("biometry")
|
|
@@ -765,8 +765,8 @@ function jt() {
|
|
|
765
765
|
}
|
|
766
766
|
});
|
|
767
767
|
}
|
|
768
|
-
const
|
|
769
|
-
class
|
|
768
|
+
const wn = /* @__PURE__ */ Dt();
|
|
769
|
+
class jt {
|
|
770
770
|
constructor({ postEvent: e, storage: s, isVBma: r, isPageReload: i }) {
|
|
771
771
|
/**
|
|
772
772
|
* Signal indicating if closing confirmation dialog is currently enabled.
|
|
@@ -806,8 +806,8 @@ class Gt {
|
|
|
806
806
|
t(this, "enableConfirmation");
|
|
807
807
|
const o = new Y({
|
|
808
808
|
initialState: { isConfirmationEnabled: !1 },
|
|
809
|
-
onChange(
|
|
810
|
-
s.set(
|
|
809
|
+
onChange(b) {
|
|
810
|
+
s.set(b);
|
|
811
811
|
}
|
|
812
812
|
}), c = new ie({
|
|
813
813
|
onMounted: o.setState,
|
|
@@ -817,29 +817,29 @@ class Gt {
|
|
|
817
817
|
}), a = { requires: "web_app_setup_closing_behavior", isVBma: r }, l = E({
|
|
818
818
|
...a,
|
|
819
819
|
returns: "plain"
|
|
820
|
-
}),
|
|
820
|
+
}), f = E({
|
|
821
821
|
...a,
|
|
822
822
|
returns: "either",
|
|
823
823
|
isMounted: c.isMounted
|
|
824
|
-
}), F = (
|
|
825
|
-
need_confirmation:
|
|
824
|
+
}), F = (b) => b === this.isConfirmationEnabled() ? m.right(void 0) : (o.setState({ isConfirmationEnabled: b }), e("web_app_setup_closing_behavior", {
|
|
825
|
+
need_confirmation: b
|
|
826
826
|
}));
|
|
827
|
-
this.isConfirmationEnabled = o.getter("isConfirmationEnabled"), this.isMounted = c.isMounted, this.disableConfirmationFp =
|
|
828
|
-
const
|
|
827
|
+
this.isConfirmationEnabled = o.getter("isConfirmationEnabled"), this.isMounted = c.isMounted, this.disableConfirmationFp = f(() => F(!1)), this.enableConfirmationFp = f(() => F(!0)), this.mountFp = l(() => {
|
|
828
|
+
const b = () => {
|
|
829
829
|
};
|
|
830
|
-
return p.pipe(c.mount(), m.match(
|
|
830
|
+
return p.pipe(c.mount(), m.match(b, b));
|
|
831
831
|
}), this.unmount = c.unmount, this.disableConfirmation = /* @__PURE__ */ h(this.disableConfirmationFp), this.enableConfirmation = /* @__PURE__ */ h(this.enableConfirmationFp), this.mount = /* @__PURE__ */ h(this.mountFp);
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
|
-
function
|
|
835
|
-
return new
|
|
834
|
+
function Gt() {
|
|
835
|
+
return new jt(p.pipe(
|
|
836
836
|
v(),
|
|
837
837
|
Z("closingBehavior"),
|
|
838
|
-
|
|
838
|
+
T
|
|
839
839
|
));
|
|
840
840
|
}
|
|
841
|
-
const
|
|
842
|
-
class
|
|
841
|
+
const Fn = /* @__PURE__ */ Gt();
|
|
842
|
+
class Wt {
|
|
843
843
|
constructor({ version: e, isVBma: s, invokeCustomMethod: r }) {
|
|
844
844
|
/**
|
|
845
845
|
* Signal indicating if the component is supported.
|
|
@@ -930,12 +930,12 @@ class Ut {
|
|
|
930
930
|
o.length ? r("getStorageValues", { keys: o }, c) : u.right({}),
|
|
931
931
|
u.map((a) => ({
|
|
932
932
|
// Fulfill the response with probably missing keys.
|
|
933
|
-
...o.reduce((l,
|
|
934
|
-
...Oe(
|
|
933
|
+
...o.reduce((l, f) => (l[f] = "", l), {}),
|
|
934
|
+
...Oe(Ct(N(), N()), a)
|
|
935
935
|
}))
|
|
936
936
|
)), this.getKeysFp = i((o) => p.pipe(
|
|
937
937
|
r("getStorageKeys", {}, o),
|
|
938
|
-
u.map((c) => Oe(
|
|
938
|
+
u.map((c) => Oe(vt(N()), c))
|
|
939
939
|
)), this.setItemFp = i((o, c, a) => p.pipe(
|
|
940
940
|
r("saveStorageValue", { key: o, value: c }, a),
|
|
941
941
|
u.map(() => {
|
|
@@ -943,28 +943,28 @@ class Ut {
|
|
|
943
943
|
)), this.clearFp = i((o) => p.pipe(this.getKeysFp(o), u.chain(this.deleteItemFp))), this.deleteItem = /* @__PURE__ */ h(this.deleteItemFp), this.getItem = /* @__PURE__ */ h(this.getItemFp), this.getItems = /* @__PURE__ */ h(this.getItemsFp), this.getKeys = /* @__PURE__ */ h(this.getKeysFp), this.setItem = /* @__PURE__ */ h(this.setItemFp), this.clear = /* @__PURE__ */ h(this.clearFp);
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
const
|
|
947
|
-
function
|
|
948
|
-
return
|
|
946
|
+
const me = /* @__PURE__ */ oe(0);
|
|
947
|
+
function Me() {
|
|
948
|
+
return me.set(me() + 1), me().toString();
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
return
|
|
950
|
+
function Ut(n, e, s) {
|
|
951
|
+
return dt(n, e, Me(), {
|
|
952
952
|
...s || {},
|
|
953
953
|
postEvent: re
|
|
954
954
|
});
|
|
955
955
|
}
|
|
956
|
-
const
|
|
957
|
-
invokeCustomMethod:
|
|
956
|
+
const Re = se({
|
|
957
|
+
invokeCustomMethod: Ut
|
|
958
958
|
});
|
|
959
959
|
function Qt() {
|
|
960
|
-
return new
|
|
960
|
+
return new Wt(p.pipe(
|
|
961
961
|
v(),
|
|
962
962
|
y,
|
|
963
|
-
|
|
963
|
+
Re
|
|
964
964
|
));
|
|
965
965
|
}
|
|
966
|
-
const
|
|
967
|
-
class
|
|
966
|
+
const Sn = /* @__PURE__ */ Qt();
|
|
967
|
+
class Kt {
|
|
968
968
|
constructor({ isVBma: e, request: s, version: r, createRequestId: i }) {
|
|
969
969
|
/**
|
|
970
970
|
* Retrieves an item using its key.
|
|
@@ -1007,14 +1007,14 @@ class Nt {
|
|
|
1007
1007
|
requires: "web_app_device_storage_get_key",
|
|
1008
1008
|
isVBma: e,
|
|
1009
1009
|
returns: "task"
|
|
1010
|
-
}), c = (a, l,
|
|
1010
|
+
}), c = (a, l, f) => {
|
|
1011
1011
|
const F = i();
|
|
1012
1012
|
return p.pipe(
|
|
1013
1013
|
s(a, ["device_storage_failed", l], {
|
|
1014
|
-
params: { ...
|
|
1015
|
-
capture: ((
|
|
1014
|
+
params: { ...f, req_id: F },
|
|
1015
|
+
capture: ((b) => "payload" in b ? b.payload.req_id === F : !0)
|
|
1016
1016
|
}),
|
|
1017
|
-
u.chain((
|
|
1017
|
+
u.chain((b) => b.event === "device_storage_failed" ? u.left(new qt(b.payload.error || "UNKNOWN_ERROR")) : u.right(b.payload))
|
|
1018
1018
|
);
|
|
1019
1019
|
};
|
|
1020
1020
|
this.getItemFp = o((a) => p.pipe(
|
|
@@ -1031,32 +1031,32 @@ class Nt {
|
|
|
1031
1031
|
)), this.getItem = /* @__PURE__ */ h(this.getItemFp), this.setItem = /* @__PURE__ */ h(this.setItemFp), this.deleteItem = /* @__PURE__ */ h(this.deleteItemFp), this.clear = /* @__PURE__ */ h(this.clearFp);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
|
-
const
|
|
1035
|
-
function
|
|
1036
|
-
return new
|
|
1034
|
+
const et = se({ createRequestId: Me });
|
|
1035
|
+
function Nt() {
|
|
1036
|
+
return new Kt(p.pipe(
|
|
1037
1037
|
v(),
|
|
1038
1038
|
y,
|
|
1039
1039
|
L,
|
|
1040
|
-
|
|
1040
|
+
et
|
|
1041
1041
|
));
|
|
1042
1042
|
}
|
|
1043
|
-
const
|
|
1044
|
-
function
|
|
1043
|
+
const Cn = /* @__PURE__ */ Nt();
|
|
1044
|
+
function zt({ request: n, ...e }) {
|
|
1045
1045
|
return A((s) => p.pipe(
|
|
1046
1046
|
n("web_app_request_emoji_status_access", "emoji_status_access_requested", s),
|
|
1047
1047
|
u.map((r) => r.status)
|
|
1048
1048
|
), { ...e, requires: "web_app_request_emoji_status_access", returns: "task" });
|
|
1049
1049
|
}
|
|
1050
1050
|
// @__NO_SIDE_EFFECTS__
|
|
1051
|
-
function
|
|
1052
|
-
return
|
|
1051
|
+
function Jt() {
|
|
1052
|
+
return zt(p.pipe(
|
|
1053
1053
|
v(),
|
|
1054
1054
|
y,
|
|
1055
1055
|
L
|
|
1056
1056
|
));
|
|
1057
1057
|
}
|
|
1058
|
-
const
|
|
1059
|
-
function
|
|
1058
|
+
const Yt = /* @__PURE__ */ Jt(), vn = /* @__PURE__ */ h(Yt);
|
|
1059
|
+
function Zt({ request: n, ...e }) {
|
|
1060
1060
|
return A((s, r) => p.pipe(
|
|
1061
1061
|
n("web_app_set_emoji_status", ["emoji_status_set", "emoji_status_failed"], {
|
|
1062
1062
|
params: {
|
|
@@ -1065,7 +1065,7 @@ function Xt({ request: n, ...e }) {
|
|
|
1065
1065
|
},
|
|
1066
1066
|
...r
|
|
1067
1067
|
}),
|
|
1068
|
-
u.chainW((i) => i.event === "emoji_status_failed" ? u.left(new
|
|
1068
|
+
u.chainW((i) => i.event === "emoji_status_failed" ? u.left(new At(i.payload.error)) : u.right(void 0))
|
|
1069
1069
|
), {
|
|
1070
1070
|
...e,
|
|
1071
1071
|
requires: "web_app_set_emoji_status",
|
|
@@ -1073,15 +1073,15 @@ function Xt({ request: n, ...e }) {
|
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
1075
|
// @__NO_SIDE_EFFECTS__
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1076
|
+
function Xt() {
|
|
1077
|
+
return Zt(p.pipe(
|
|
1078
1078
|
v(),
|
|
1079
1079
|
L,
|
|
1080
1080
|
y
|
|
1081
1081
|
));
|
|
1082
1082
|
}
|
|
1083
|
-
const
|
|
1084
|
-
class
|
|
1083
|
+
const es = /* @__PURE__ */ Xt(), kn = /* @__PURE__ */ h(es);
|
|
1084
|
+
class ts {
|
|
1085
1085
|
constructor({ postEvent: e, isVBma: s, version: r }) {
|
|
1086
1086
|
/**
|
|
1087
1087
|
* Signal indicating if the component is supported.
|
|
@@ -1132,42 +1132,42 @@ class ss {
|
|
|
1132
1132
|
this.isSupported = W(i, r), this.impactOccurredFp = o((c) => e(i, { type: "impact", impact_style: c })), this.notificationOccurredFp = o((c) => e(i, { type: "notification", notification_type: c })), this.selectionChangedFp = o(() => e(i, { type: "selection_change" })), this.impactOccurred = /* @__PURE__ */ h(this.impactOccurredFp), this.notificationOccurred = /* @__PURE__ */ h(this.notificationOccurredFp), this.selectionChanged = /* @__PURE__ */ h(this.selectionChangedFp);
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return new
|
|
1135
|
+
function ss() {
|
|
1136
|
+
return new ts(p.pipe(
|
|
1137
1137
|
v(),
|
|
1138
|
-
|
|
1138
|
+
T,
|
|
1139
1139
|
y
|
|
1140
1140
|
));
|
|
1141
1141
|
}
|
|
1142
|
-
const
|
|
1143
|
-
function
|
|
1142
|
+
const yn = /* @__PURE__ */ ss();
|
|
1143
|
+
function rs({ postEvent: n, ...e }) {
|
|
1144
1144
|
return A(() => n("web_app_add_to_home_screen"), { ...e, requires: "web_app_add_to_home_screen", returns: "either" });
|
|
1145
1145
|
}
|
|
1146
1146
|
// @__NO_SIDE_EFFECTS__
|
|
1147
|
-
function
|
|
1148
|
-
return
|
|
1147
|
+
function ns() {
|
|
1148
|
+
return rs(p.pipe(
|
|
1149
1149
|
v(),
|
|
1150
1150
|
y,
|
|
1151
|
-
|
|
1151
|
+
T
|
|
1152
1152
|
));
|
|
1153
1153
|
}
|
|
1154
|
-
const
|
|
1155
|
-
function
|
|
1154
|
+
const is = /* @__PURE__ */ ns(), qn = /* @__PURE__ */ h(is);
|
|
1155
|
+
function os({ request: n, ...e }) {
|
|
1156
1156
|
return A((s) => p.pipe(
|
|
1157
1157
|
n("web_app_check_home_screen", "home_screen_checked", s),
|
|
1158
1158
|
u.map((r) => r.status || "unknown")
|
|
1159
1159
|
), { ...e, requires: "web_app_check_home_screen", returns: "task" });
|
|
1160
1160
|
}
|
|
1161
1161
|
// @__NO_SIDE_EFFECTS__
|
|
1162
|
-
function
|
|
1163
|
-
return
|
|
1162
|
+
function as() {
|
|
1163
|
+
return os(p.pipe(
|
|
1164
1164
|
v(),
|
|
1165
1165
|
y,
|
|
1166
1166
|
L
|
|
1167
1167
|
));
|
|
1168
1168
|
}
|
|
1169
|
-
const
|
|
1170
|
-
class
|
|
1169
|
+
const cs = /* @__PURE__ */ as(), In = /* @__PURE__ */ h(cs);
|
|
1170
|
+
class ps {
|
|
1171
1171
|
constructor({ retrieveInitData: e }) {
|
|
1172
1172
|
t(this, "_state", O());
|
|
1173
1173
|
t(this, "_raw", O());
|
|
@@ -1257,8 +1257,8 @@ class us {
|
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return new
|
|
1260
|
+
function us() {
|
|
1261
|
+
return new ps({
|
|
1262
1262
|
retrieveInitData() {
|
|
1263
1263
|
return p.pipe(
|
|
1264
1264
|
m.Do,
|
|
@@ -1266,7 +1266,7 @@ function ls() {
|
|
|
1266
1266
|
le(),
|
|
1267
1267
|
m.map(({ vbWebAppData: n }) => n ? z.some(n) : z.none)
|
|
1268
1268
|
)),
|
|
1269
|
-
m.bindW("raw",
|
|
1269
|
+
m.bindW("raw", ht),
|
|
1270
1270
|
m.map(({ obj: n, raw: e }) => p.pipe(
|
|
1271
1271
|
z.Do,
|
|
1272
1272
|
z.bind("obj", () => n),
|
|
@@ -1276,8 +1276,8 @@ function ls() {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
});
|
|
1278
1278
|
}
|
|
1279
|
-
const
|
|
1280
|
-
class
|
|
1279
|
+
const En = /* @__PURE__ */ us();
|
|
1280
|
+
class ls {
|
|
1281
1281
|
constructor({ version: e, request: s, isVBma: r }) {
|
|
1282
1282
|
/**
|
|
1283
1283
|
* Signal indicating if any invoice is currently opened.
|
|
@@ -1322,35 +1322,35 @@ class ds {
|
|
|
1322
1322
|
o.set(!1);
|
|
1323
1323
|
};
|
|
1324
1324
|
this.isSupported = W("web_app_open_invoice", e), this.isOpened = S(o), this.openSlugFp = i((a, l) => p.pipe(
|
|
1325
|
-
this.isOpened() ? u.left(new
|
|
1325
|
+
this.isOpened() ? u.left(new Be("Invoice is already opened")) : u.right(void 0),
|
|
1326
1326
|
u.chain(() => (o.set(!0), s("web_app_open_invoice", "invoice_closed", {
|
|
1327
1327
|
...l,
|
|
1328
1328
|
params: { slug: a },
|
|
1329
|
-
capture: (
|
|
1329
|
+
capture: (f) => a === f.slug
|
|
1330
1330
|
}))),
|
|
1331
|
-
u.mapBoth((
|
|
1331
|
+
u.mapBoth((f) => (c(), f), (f) => (c(), f.status))
|
|
1332
1332
|
)), this.openUrlFp = i((a, l) => {
|
|
1333
|
-
const { hostname:
|
|
1334
|
-
if (
|
|
1335
|
-
return u.left(new
|
|
1336
|
-
const
|
|
1337
|
-
return
|
|
1333
|
+
const { hostname: f, pathname: F } = new URL(a, window.location.href);
|
|
1334
|
+
if (f !== "vbot.vn")
|
|
1335
|
+
return u.left(new Q(`Link has unexpected hostname: ${f}`));
|
|
1336
|
+
const b = F.match(/^\/(\$|invoice\/)([A-Za-z0-9\-_=]+)$/);
|
|
1337
|
+
return b ? this.openSlugFp(b[2], l) : u.left(new Q(
|
|
1338
1338
|
'Expected to receive a link with a pathname in format "/invoice/{slug}" or "/${slug}"'
|
|
1339
1339
|
));
|
|
1340
1340
|
}), this.openUrl = /* @__PURE__ */ h(this.openUrlFp), this.openSlug = /* @__PURE__ */ h(this.openSlugFp);
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1344
|
-
return new
|
|
1343
|
+
function ds() {
|
|
1344
|
+
return new ls(p.pipe(v(), L, y));
|
|
1345
1345
|
}
|
|
1346
|
-
const
|
|
1347
|
-
function
|
|
1346
|
+
const Bn = /* @__PURE__ */ ds();
|
|
1347
|
+
function hs({ postEvent: n, ...e }) {
|
|
1348
1348
|
return A((s, r = {}) => {
|
|
1349
1349
|
if (typeof s == "string")
|
|
1350
1350
|
try {
|
|
1351
1351
|
s = new URL(s);
|
|
1352
1352
|
} catch (i) {
|
|
1353
|
-
return m.left(new
|
|
1353
|
+
return m.left(new Q(`"${s.toString()}" is invalid URL`, i));
|
|
1354
1354
|
}
|
|
1355
1355
|
return n("web_app_open_link", {
|
|
1356
1356
|
url: s.toString(),
|
|
@@ -1360,39 +1360,39 @@ function _s({ postEvent: n, ...e }) {
|
|
|
1360
1360
|
}, { ...e, returns: "either" });
|
|
1361
1361
|
}
|
|
1362
1362
|
// @__NO_SIDE_EFFECTS__
|
|
1363
|
-
function
|
|
1364
|
-
return
|
|
1363
|
+
function _s() {
|
|
1364
|
+
return hs(p.pipe(v(), T));
|
|
1365
1365
|
}
|
|
1366
|
-
const
|
|
1367
|
-
function
|
|
1366
|
+
const bs = /* @__PURE__ */ _s(), An = /* @__PURE__ */ h(bs);
|
|
1367
|
+
function fs({ postEvent: n, version: e, ...s }) {
|
|
1368
1368
|
return A((r) => {
|
|
1369
1369
|
const i = r.toString();
|
|
1370
|
-
return i.match(/^https:\/\/vbot\.vn\/.+/) ? te("web_app_open_vb_link", P(e)) ? (r = new URL(r), n("web_app_open_vb_link", { path_full: r.pathname + r.search })) : (window.location.href = i, m.right(void 0)) : m.left(new
|
|
1370
|
+
return i.match(/^https:\/\/vbot\.vn\/.+/) ? te("web_app_open_vb_link", P(e)) ? (r = new URL(r), n("web_app_open_vb_link", { path_full: r.pathname + r.search })) : (window.location.href = i, m.right(void 0)) : m.left(new Q(`"${i}" is invalid URL`));
|
|
1371
1371
|
}, { ...s, returns: "either" });
|
|
1372
1372
|
}
|
|
1373
1373
|
// @__NO_SIDE_EFFECTS__
|
|
1374
|
-
function
|
|
1375
|
-
return
|
|
1374
|
+
function gs() {
|
|
1375
|
+
return fs(p.pipe(
|
|
1376
1376
|
v(),
|
|
1377
|
-
|
|
1377
|
+
T,
|
|
1378
1378
|
y
|
|
1379
1379
|
));
|
|
1380
1380
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1381
|
+
const tt = /* @__PURE__ */ gs(), xn = /* @__PURE__ */ h(tt);
|
|
1382
|
+
function ms({ openVbotLink: n, ...e }) {
|
|
1383
1383
|
return A((s, r) => n(
|
|
1384
1384
|
"https://vbot.vn/share/url?" + new URLSearchParams({ url: s, text: r || "" }).toString().replace(/\+/g, "%20")
|
|
1385
1385
|
), { ...e, returns: "either" });
|
|
1386
1386
|
}
|
|
1387
1387
|
// @__NO_SIDE_EFFECTS__
|
|
1388
|
-
function
|
|
1389
|
-
return
|
|
1388
|
+
function ws() {
|
|
1389
|
+
return ms({
|
|
1390
1390
|
...v(),
|
|
1391
|
-
openVbotLink:
|
|
1391
|
+
openVbotLink: tt
|
|
1392
1392
|
});
|
|
1393
1393
|
}
|
|
1394
|
-
const
|
|
1395
|
-
function
|
|
1394
|
+
const Fs = /* @__PURE__ */ ws(), Mn = /* @__PURE__ */ h(Fs);
|
|
1395
|
+
function Ss(n) {
|
|
1396
1396
|
let e = !1, s, r;
|
|
1397
1397
|
return n.available && (e = !0, s = n.access_requested, r = n.access_granted), {
|
|
1398
1398
|
available: e,
|
|
@@ -1400,7 +1400,7 @@ function Cs(n) {
|
|
|
1400
1400
|
accessRequested: s || !1
|
|
1401
1401
|
};
|
|
1402
1402
|
}
|
|
1403
|
-
class
|
|
1403
|
+
class Cs {
|
|
1404
1404
|
constructor({
|
|
1405
1405
|
version: e,
|
|
1406
1406
|
request: s,
|
|
@@ -1476,28 +1476,28 @@ class vs {
|
|
|
1476
1476
|
accessRequested: !1
|
|
1477
1477
|
},
|
|
1478
1478
|
onChange: i.set
|
|
1479
|
-
}), l = new
|
|
1479
|
+
}), l = new xe({
|
|
1480
1480
|
isPageReload: c,
|
|
1481
1481
|
restoreState: i.get,
|
|
1482
1482
|
onMounted: a.setState,
|
|
1483
1483
|
initialState(C) {
|
|
1484
1484
|
return p.pipe(
|
|
1485
1485
|
s("web_app_check_location", "location_checked", C),
|
|
1486
|
-
u.map(
|
|
1486
|
+
u.map(Ss)
|
|
1487
1487
|
);
|
|
1488
1488
|
}
|
|
1489
|
-
}),
|
|
1490
|
-
...
|
|
1489
|
+
}), f = { version: e, requires: "web_app_check_location", isVBma: o }, F = E({
|
|
1490
|
+
...f,
|
|
1491
1491
|
returns: "either"
|
|
1492
|
-
}),
|
|
1493
|
-
...
|
|
1492
|
+
}), b = E({
|
|
1493
|
+
...f,
|
|
1494
1494
|
returns: "task"
|
|
1495
1495
|
}), k = E({
|
|
1496
|
-
...
|
|
1496
|
+
...f,
|
|
1497
1497
|
returns: "task",
|
|
1498
1498
|
isMounted: l.isMounted
|
|
1499
1499
|
});
|
|
1500
|
-
this.isAvailable = a.getter("available"), this.isAccessRequested = a.getter("accessRequested"), this.isAccessGranted = a.getter("accessGranted"), this.isSupported = W("web_app_check_location", e), this.isMounted = l.isMounted, this.state = a.state, this.unmount = l.unmount, this.mountFp =
|
|
1500
|
+
this.isAvailable = a.getter("available"), this.isAccessRequested = a.getter("accessRequested"), this.isAccessGranted = a.getter("accessGranted"), this.isSupported = W("web_app_check_location", e), this.isMounted = l.isMounted, this.state = a.state, this.unmount = l.unmount, this.mountFp = b(l.mount), this.openSettingsFp = F(() => r("web_app_open_location_settings")), this.requestLocationFp = k((C) => p.pipe(
|
|
1501
1501
|
s("web_app_request_location", "location_requested", C),
|
|
1502
1502
|
u.map((q) => {
|
|
1503
1503
|
if (!q.available)
|
|
@@ -1508,17 +1508,17 @@ class vs {
|
|
|
1508
1508
|
)), this.mount = /* @__PURE__ */ h(this.mountFp), this.openSettings = /* @__PURE__ */ h(this.openSettingsFp), this.requestLocation = /* @__PURE__ */ h(this.requestLocationFp);
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1512
|
-
return new
|
|
1511
|
+
function vs() {
|
|
1512
|
+
return new Cs(p.pipe(
|
|
1513
1513
|
v(),
|
|
1514
|
-
|
|
1514
|
+
T,
|
|
1515
1515
|
y,
|
|
1516
1516
|
L,
|
|
1517
1517
|
Z("locationManager")
|
|
1518
1518
|
));
|
|
1519
1519
|
}
|
|
1520
|
-
const
|
|
1521
|
-
class
|
|
1520
|
+
const Rn = /* @__PURE__ */ vs();
|
|
1521
|
+
class ks {
|
|
1522
1522
|
constructor({ defaults: e, ...s }) {
|
|
1523
1523
|
//#region Properties.
|
|
1524
1524
|
/**
|
|
@@ -1747,12 +1747,12 @@ class ys {
|
|
|
1747
1747
|
function Te(n, e) {
|
|
1748
1748
|
document.documentElement.style.setProperty(n, e);
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function Ve(n) {
|
|
1751
1751
|
document.documentElement.style.removeProperty(n);
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function ys(n) {
|
|
1754
1754
|
return p.pipe(
|
|
1755
|
-
|
|
1755
|
+
wt(n),
|
|
1756
1756
|
m.map((e) => Math.sqrt(
|
|
1757
1757
|
[0.299, 0.587, 0.114].reduce((s, r, i) => {
|
|
1758
1758
|
const o = parseInt(e.slice(1 + i * 2, 1 + (i + 1) * 2), 16);
|
|
@@ -1761,8 +1761,8 @@ function qs(n) {
|
|
|
1761
1761
|
) < 120)
|
|
1762
1762
|
);
|
|
1763
1763
|
}
|
|
1764
|
-
const
|
|
1765
|
-
class
|
|
1764
|
+
const st = he(ys);
|
|
1765
|
+
class qs {
|
|
1766
1766
|
constructor({
|
|
1767
1767
|
initialState: e,
|
|
1768
1768
|
onChange: s,
|
|
@@ -1851,7 +1851,7 @@ class Is {
|
|
|
1851
1851
|
*/
|
|
1852
1852
|
t(this, "isDark", S(() => {
|
|
1853
1853
|
const e = this.bgColor();
|
|
1854
|
-
return !e ||
|
|
1854
|
+
return !e || st(e);
|
|
1855
1855
|
}));
|
|
1856
1856
|
//#endregion
|
|
1857
1857
|
//#region Mounting.
|
|
@@ -1876,7 +1876,7 @@ class Is {
|
|
|
1876
1876
|
onChange: o.set
|
|
1877
1877
|
}), l = (C) => {
|
|
1878
1878
|
a.setState(C.theme_params);
|
|
1879
|
-
},
|
|
1879
|
+
}, f = new ie({
|
|
1880
1880
|
initialState: () => m.right(P(e)),
|
|
1881
1881
|
isPageReload: c,
|
|
1882
1882
|
onMounted(C) {
|
|
@@ -1886,17 +1886,17 @@ class Is {
|
|
|
1886
1886
|
r(l);
|
|
1887
1887
|
},
|
|
1888
1888
|
restoreState: o.get
|
|
1889
|
-
}), F = { isVBma: i, returns: "either" },
|
|
1889
|
+
}), F = { isVBma: i, returns: "either" }, b = E(F), k = E({
|
|
1890
1890
|
...F,
|
|
1891
|
-
isMounted:
|
|
1891
|
+
isMounted: f.isMounted
|
|
1892
1892
|
});
|
|
1893
|
-
this.accentTextColor = a.getter("accent_text_color"), this.bgColor = a.getter("bg_color"), this.buttonColor = a.getter("button_color"), this.buttonTextColor = a.getter("button_text_color"), this.bottomBarBgColor = a.getter("bottom_bar_bg_color"), this.destructiveTextColor = a.getter("destructive_text_color"), this.headerBgColor = a.getter("header_bg_color"), this.hintColor = a.getter("hint_color"), this.linkColor = a.getter("link_color"), this.secondaryBgColor = a.getter("secondary_bg_color"), this.sectionBgColor = a.getter("section_bg_color"), this.sectionHeaderTextColor = a.getter("section_header_text_color"), this.sectionSeparatorColor = a.getter("section_separator_color"), this.subtitleTextColor = a.getter("subtitle_text_color"), this.textColor = a.getter("text_color"), this.state = a.state, this.isMounted =
|
|
1893
|
+
this.accentTextColor = a.getter("accent_text_color"), this.bgColor = a.getter("bg_color"), this.buttonColor = a.getter("button_color"), this.buttonTextColor = a.getter("button_text_color"), this.bottomBarBgColor = a.getter("bottom_bar_bg_color"), this.destructiveTextColor = a.getter("destructive_text_color"), this.headerBgColor = a.getter("header_bg_color"), this.hintColor = a.getter("hint_color"), this.linkColor = a.getter("link_color"), this.secondaryBgColor = a.getter("secondary_bg_color"), this.sectionBgColor = a.getter("section_bg_color"), this.sectionHeaderTextColor = a.getter("section_header_text_color"), this.sectionSeparatorColor = a.getter("section_separator_color"), this.subtitleTextColor = a.getter("subtitle_text_color"), this.textColor = a.getter("text_color"), this.state = a.state, this.isMounted = f.isMounted, this.bindCssVarsFp = k((C) => {
|
|
1894
1894
|
if (this._isCssVarsBound())
|
|
1895
|
-
return m.left(new
|
|
1896
|
-
C || (C = (g) => `--vb-theme-${
|
|
1895
|
+
return m.left(new Ee());
|
|
1896
|
+
C || (C = (g) => `--vb-theme-${mt(g)}`);
|
|
1897
1897
|
const q = (g) => {
|
|
1898
|
-
Object.entries(a.state()).forEach(([w,
|
|
1899
|
-
|
|
1898
|
+
Object.entries(a.state()).forEach(([w, _]) => {
|
|
1899
|
+
_ && g(w, _);
|
|
1900
1900
|
});
|
|
1901
1901
|
}, I = () => {
|
|
1902
1902
|
q((g, w) => {
|
|
@@ -1904,15 +1904,15 @@ class Is {
|
|
|
1904
1904
|
});
|
|
1905
1905
|
};
|
|
1906
1906
|
return I(), a.state.sub(I), this._isCssVarsBound.set(!0), m.right(() => {
|
|
1907
|
-
q(
|
|
1907
|
+
q(Ve), a.state.unsub(I), this._isCssVarsBound.set(!1);
|
|
1908
1908
|
});
|
|
1909
|
-
}), this.mountFp = f
|
|
1909
|
+
}), this.mountFp = b(f.mount), this.unmount = f.unmount, this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp), this.mount = /* @__PURE__ */ h(this.mountFp);
|
|
1910
1910
|
}
|
|
1911
1911
|
//#endregion
|
|
1912
1912
|
}
|
|
1913
|
-
const
|
|
1914
|
-
function
|
|
1915
|
-
return new
|
|
1913
|
+
const ve = /* @__PURE__ */ oe({});
|
|
1914
|
+
function Is() {
|
|
1915
|
+
return new qs({
|
|
1916
1916
|
...p.pipe(
|
|
1917
1917
|
v(),
|
|
1918
1918
|
Z("themeParams")
|
|
@@ -1923,24 +1923,24 @@ function Es() {
|
|
|
1923
1923
|
onChange(n) {
|
|
1924
1924
|
j("theme_changed", n);
|
|
1925
1925
|
},
|
|
1926
|
-
initialState:
|
|
1926
|
+
initialState: ve
|
|
1927
1927
|
});
|
|
1928
1928
|
}
|
|
1929
|
-
const de = /* @__PURE__ */
|
|
1929
|
+
const de = /* @__PURE__ */ Is();
|
|
1930
1930
|
// @__NO_SIDE_EFFECTS__
|
|
1931
|
-
function
|
|
1931
|
+
function rt(n, e, s) {
|
|
1932
1932
|
return p.pipe(
|
|
1933
|
-
/* @__PURE__ */
|
|
1933
|
+
/* @__PURE__ */ Ae(n, e),
|
|
1934
1934
|
(r) => ({ ...r, defaults: s })
|
|
1935
1935
|
);
|
|
1936
1936
|
}
|
|
1937
|
-
const Tn = /* @__PURE__ */ new
|
|
1938
|
-
/* @__PURE__ */
|
|
1937
|
+
const Tn = /* @__PURE__ */ new ks(
|
|
1938
|
+
/* @__PURE__ */ rt("mainButton", "main_button_pressed", {
|
|
1939
1939
|
bgColor: S(() => de.buttonColor() || "#2481cc"),
|
|
1940
1940
|
textColor: S(() => de.buttonTextColor() || "#ffffff")
|
|
1941
1941
|
})
|
|
1942
1942
|
);
|
|
1943
|
-
class
|
|
1943
|
+
class Es {
|
|
1944
1944
|
constructor({
|
|
1945
1945
|
storage: e,
|
|
1946
1946
|
isPageReload: s,
|
|
@@ -1961,7 +1961,7 @@ class Bs {
|
|
|
1961
1961
|
*/
|
|
1962
1962
|
t(this, "isDark", S(() => {
|
|
1963
1963
|
const e = this.bgColorRgb();
|
|
1964
|
-
return e ?
|
|
1964
|
+
return e ? st(e) : !1;
|
|
1965
1965
|
}));
|
|
1966
1966
|
/**
|
|
1967
1967
|
* Signal indicating if the mini app is currently active.
|
|
@@ -2119,21 +2119,21 @@ class Bs {
|
|
|
2119
2119
|
* @see readyFp
|
|
2120
2120
|
*/
|
|
2121
2121
|
t(this, "ready");
|
|
2122
|
-
const
|
|
2123
|
-
k.setState({ isActive:
|
|
2124
|
-
}, F = (
|
|
2122
|
+
const f = (_) => {
|
|
2123
|
+
k.setState({ isActive: _.is_visible });
|
|
2124
|
+
}, F = (_) => {
|
|
2125
2125
|
[
|
|
2126
2126
|
[this.headerColor, "web_app_set_header_color"],
|
|
2127
2127
|
[this.bgColor, "web_app_set_background_color"],
|
|
2128
2128
|
[this.bottomBarColor, "web_app_set_bottom_bar_color"]
|
|
2129
|
-
].forEach(([x,
|
|
2129
|
+
].forEach(([x, V]) => {
|
|
2130
2130
|
const R = x();
|
|
2131
|
-
if (!
|
|
2132
|
-
const H =
|
|
2133
|
-
H && i(
|
|
2131
|
+
if (!be(R) && (V !== "web_app_set_header_color" || !["bg_color", "secondary_bg_color"].includes(R))) {
|
|
2132
|
+
const H = _[R];
|
|
2133
|
+
H && i(V, { color: H });
|
|
2134
2134
|
}
|
|
2135
2135
|
});
|
|
2136
|
-
},
|
|
2136
|
+
}, b = new ie({
|
|
2137
2137
|
initialState() {
|
|
2138
2138
|
return m.right({
|
|
2139
2139
|
bgColor: "bg_color",
|
|
@@ -2143,19 +2143,19 @@ class Bs {
|
|
|
2143
2143
|
});
|
|
2144
2144
|
},
|
|
2145
2145
|
isPageReload: s,
|
|
2146
|
-
onMounted: (
|
|
2147
|
-
a(
|
|
2146
|
+
onMounted: (_) => {
|
|
2147
|
+
a(f), c.sub(F), k.setState(_);
|
|
2148
2148
|
},
|
|
2149
2149
|
onUnmounted() {
|
|
2150
|
-
l(
|
|
2150
|
+
l(f), c.unsub(F);
|
|
2151
2151
|
},
|
|
2152
2152
|
restoreState: e.get
|
|
2153
2153
|
});
|
|
2154
|
-
this.isMounted =
|
|
2155
|
-
const
|
|
2154
|
+
this.isMounted = b.isMounted, this.mountFp = A(() => {
|
|
2155
|
+
const _ = () => {
|
|
2156
2156
|
};
|
|
2157
|
-
return p.pipe(
|
|
2158
|
-
}, { isVBma: o, returns: "plain" }), this.mount = /* @__PURE__ */ h(this.mountFp), this.unmount =
|
|
2157
|
+
return p.pipe(b.mount(), m.match(_, _));
|
|
2158
|
+
}, { isVBma: o, returns: "plain" }), this.mount = /* @__PURE__ */ h(this.mountFp), this.unmount = b.unmount;
|
|
2159
2159
|
const k = new Y({
|
|
2160
2160
|
initialState: {
|
|
2161
2161
|
bgColor: "bg_color",
|
|
@@ -2166,32 +2166,32 @@ class Bs {
|
|
|
2166
2166
|
onChange: e.set
|
|
2167
2167
|
});
|
|
2168
2168
|
this.state = k.state;
|
|
2169
|
-
const C = (
|
|
2169
|
+
const C = (_) => be(_) ? _ : P(c)[_], q = (_) => S(() => C(_()));
|
|
2170
2170
|
this.isActive = k.getter("isActive"), this.isSupported = S(() => [
|
|
2171
2171
|
"web_app_set_header_color",
|
|
2172
2172
|
"web_app_set_background_color",
|
|
2173
2173
|
"web_app_set_bottom_bar_color"
|
|
2174
|
-
].some((
|
|
2174
|
+
].some((_) => te(_, P(r))));
|
|
2175
2175
|
const I = O(!1);
|
|
2176
|
-
this.isCssVarsBound = S(I), this.bindCssVarsFp = A((
|
|
2176
|
+
this.isCssVarsBound = S(I), this.bindCssVarsFp = A((_) => {
|
|
2177
2177
|
if (I())
|
|
2178
|
-
return m.left(new
|
|
2179
|
-
const [x,
|
|
2178
|
+
return m.left(new Ee());
|
|
2179
|
+
const [x, V] = qe(() => {
|
|
2180
2180
|
I.set(!1);
|
|
2181
2181
|
}), R = (H, $) => {
|
|
2182
2182
|
const U = () => {
|
|
2183
2183
|
Te(H, $() || null);
|
|
2184
2184
|
};
|
|
2185
|
-
U(), x($.sub(U),
|
|
2185
|
+
U(), x($.sub(U), Ve.bind(null, H));
|
|
2186
2186
|
};
|
|
2187
|
-
return
|
|
2187
|
+
return _ || (_ = (H) => `--tg-${Ue(H)}`), R(_("bgColor"), this.bgColorRgb), R(_("bottomBarColor"), this.bottomBarColorRgb), R(_("headerColor"), this.headerColorRgb), I.set(!0), m.right(V);
|
|
2188
2188
|
}, { isVBma: o, returns: "either", isMounted: this.isMounted }), this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp);
|
|
2189
|
-
const g = (
|
|
2190
|
-
const x = k.getter(
|
|
2189
|
+
const g = (_) => {
|
|
2190
|
+
const x = k.getter(_), V = q(x), R = {
|
|
2191
2191
|
headerColor: "web_app_set_header_color",
|
|
2192
2192
|
bgColor: "web_app_set_background_color",
|
|
2193
2193
|
bottomBarColor: "web_app_set_bottom_bar_color"
|
|
2194
|
-
}[
|
|
2194
|
+
}[_], H = A(
|
|
2195
2195
|
($) => {
|
|
2196
2196
|
if ($ === x())
|
|
2197
2197
|
return m.right(void 0);
|
|
@@ -2199,14 +2199,14 @@ class Bs {
|
|
|
2199
2199
|
return p.pipe(
|
|
2200
2200
|
i("web_app_set_header_color", { color_key: $ }),
|
|
2201
2201
|
m.map(() => {
|
|
2202
|
-
k.setState({ [
|
|
2202
|
+
k.setState({ [_]: $ });
|
|
2203
2203
|
})
|
|
2204
2204
|
);
|
|
2205
2205
|
const U = C($);
|
|
2206
2206
|
return p.pipe(
|
|
2207
|
-
U ? i(R, { color: U }) : m.left(new
|
|
2207
|
+
U ? i(R, { color: U }) : m.left(new Rt($)),
|
|
2208
2208
|
m.map(() => {
|
|
2209
|
-
k.setState({ [
|
|
2209
|
+
k.setState({ [_]: $ });
|
|
2210
2210
|
})
|
|
2211
2211
|
);
|
|
2212
2212
|
},
|
|
@@ -2216,16 +2216,16 @@ class Bs {
|
|
|
2216
2216
|
requires: R,
|
|
2217
2217
|
isMounted: this.isMounted,
|
|
2218
2218
|
returns: "either",
|
|
2219
|
-
supports:
|
|
2219
|
+
supports: _ === "headerColor" ? {
|
|
2220
2220
|
rgb: {
|
|
2221
2221
|
method: "web_app_set_header_color",
|
|
2222
2222
|
param: "color",
|
|
2223
|
-
shouldCheck:
|
|
2223
|
+
shouldCheck: be
|
|
2224
2224
|
}
|
|
2225
2225
|
} : void 0
|
|
2226
2226
|
}
|
|
2227
2227
|
);
|
|
2228
|
-
return [x,
|
|
2228
|
+
return [x, V, /* @__PURE__ */ h(H), H];
|
|
2229
2229
|
};
|
|
2230
2230
|
[
|
|
2231
2231
|
this.bgColor,
|
|
@@ -2244,15 +2244,15 @@ class Bs {
|
|
|
2244
2244
|
this.setBottomBarColorFp
|
|
2245
2245
|
] = g("bottomBarColor");
|
|
2246
2246
|
const w = E({ isVBma: o, returns: "either" });
|
|
2247
|
-
this.closeFp = w((
|
|
2247
|
+
this.closeFp = w((_) => i("web_app_close", { return_back: _ })), this.close = /* @__PURE__ */ h(this.closeFp), this.readyFp = w(() => i("web_app_ready")), this.ready = /* @__PURE__ */ h(this.readyFp);
|
|
2248
2248
|
}
|
|
2249
2249
|
//#endregion
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2252
|
-
return new
|
|
2251
|
+
function Bs() {
|
|
2252
|
+
return new Es({
|
|
2253
2253
|
...p.pipe(
|
|
2254
2254
|
v(),
|
|
2255
|
-
|
|
2255
|
+
T,
|
|
2256
2256
|
y,
|
|
2257
2257
|
Z("miniApp")
|
|
2258
2258
|
),
|
|
@@ -2265,12 +2265,12 @@ function As() {
|
|
|
2265
2265
|
theme: de.state
|
|
2266
2266
|
});
|
|
2267
2267
|
}
|
|
2268
|
-
const
|
|
2269
|
-
function
|
|
2268
|
+
const As = /* @__PURE__ */ Bs();
|
|
2269
|
+
function xs() {
|
|
2270
2270
|
const n = Date.now(), e = Math.random().toString(36).substring(2, 9);
|
|
2271
2271
|
return `notif_${n}_${e}`;
|
|
2272
2272
|
}
|
|
2273
|
-
class
|
|
2273
|
+
class Ms {
|
|
2274
2274
|
constructor({ version: e, isVBma: s }) {
|
|
2275
2275
|
/**
|
|
2276
2276
|
* Signal indicating if the component is supported.
|
|
@@ -2293,8 +2293,8 @@ class Rs {
|
|
|
2293
2293
|
returns: "task"
|
|
2294
2294
|
});
|
|
2295
2295
|
this.isSupported = W("web_app_send_notification", e), this.sendFp = r((i) => p.pipe(
|
|
2296
|
-
u.fromEither(
|
|
2297
|
-
id:
|
|
2296
|
+
u.fromEither(ye("web_app_send_notification", {
|
|
2297
|
+
id: xs(),
|
|
2298
2298
|
message: i.message,
|
|
2299
2299
|
title: i.title,
|
|
2300
2300
|
type: i.type ?? "default"
|
|
@@ -2308,18 +2308,18 @@ class Rs {
|
|
|
2308
2308
|
});
|
|
2309
2309
|
}
|
|
2310
2310
|
}
|
|
2311
|
-
function
|
|
2312
|
-
return new
|
|
2311
|
+
function Rs() {
|
|
2312
|
+
return new Ms(y(v()));
|
|
2313
2313
|
}
|
|
2314
|
-
const
|
|
2314
|
+
const Vn = /* @__PURE__ */ Rs();
|
|
2315
2315
|
function Ts(n) {
|
|
2316
2316
|
const e = n.message.trim(), s = (n.title || "").trim(), r = n.buttons || [];
|
|
2317
2317
|
if (s.length > 64)
|
|
2318
|
-
return m.left(new
|
|
2318
|
+
return m.left(new Q(`Invalid title: ${s}`));
|
|
2319
2319
|
if (!e || e.length > 256)
|
|
2320
|
-
return m.left(new
|
|
2320
|
+
return m.left(new Q(`Invalid message: ${e}`));
|
|
2321
2321
|
if (r.length > 3)
|
|
2322
|
-
return m.left(new
|
|
2322
|
+
return m.left(new Q(`Invalid buttons count: ${r.length}`));
|
|
2323
2323
|
const i = [];
|
|
2324
2324
|
if (!r.length)
|
|
2325
2325
|
i.push({ type: "close", id: "" });
|
|
@@ -2327,18 +2327,18 @@ function Ts(n) {
|
|
|
2327
2327
|
for (let o = 0; o < r.length; o++) {
|
|
2328
2328
|
const c = r[o], a = c.id || "";
|
|
2329
2329
|
if (a.length > 64)
|
|
2330
|
-
return m.left(new
|
|
2330
|
+
return m.left(new Q(`Button with index ${o} has invalid id: ${a}`));
|
|
2331
2331
|
if (!c.type || c.type === "default" || c.type === "destructive") {
|
|
2332
2332
|
const l = c.text.trim();
|
|
2333
2333
|
if (!l || l.length > 64)
|
|
2334
|
-
return m.left(new
|
|
2334
|
+
return m.left(new Q(`Button with index ${o} has invalid text: ${l}`));
|
|
2335
2335
|
i.push({ type: c.type, text: l, id: a });
|
|
2336
2336
|
} else
|
|
2337
2337
|
i.push({ type: c.type, id: a });
|
|
2338
2338
|
}
|
|
2339
2339
|
return m.right({ title: s, message: e, buttons: i });
|
|
2340
2340
|
}
|
|
2341
|
-
class
|
|
2341
|
+
class Vs {
|
|
2342
2342
|
constructor({ version: e, isVBma: s, request: r }) {
|
|
2343
2343
|
/**
|
|
2344
2344
|
* Signal indicating if any popup is currently opened.
|
|
@@ -2387,7 +2387,7 @@ class Ls {
|
|
|
2387
2387
|
returns: "task"
|
|
2388
2388
|
});
|
|
2389
2389
|
this.isSupported = W("web_app_open_popup", e), this.isOpened = S(i), this.showFp = c((a) => p.pipe(
|
|
2390
|
-
this.isOpened() ? u.left(new
|
|
2390
|
+
this.isOpened() ? u.left(new Be("A popup is already opened")) : u.right(void 0),
|
|
2391
2391
|
u.chainW(() => u.fromEither(Ts(a))),
|
|
2392
2392
|
u.chain((l) => (i.set(!0), r("web_app_open_popup", "popup_closed", {
|
|
2393
2393
|
...a,
|
|
@@ -2400,26 +2400,26 @@ class Ls {
|
|
|
2400
2400
|
)), this.show = /* @__PURE__ */ h(this.showFp);
|
|
2401
2401
|
}
|
|
2402
2402
|
}
|
|
2403
|
-
function
|
|
2404
|
-
return new
|
|
2403
|
+
function Ls() {
|
|
2404
|
+
return new Vs(p.pipe(v(), L, y));
|
|
2405
2405
|
}
|
|
2406
|
-
const
|
|
2407
|
-
function
|
|
2406
|
+
const Ln = /* @__PURE__ */ Ls();
|
|
2407
|
+
function $s({ request: n, ...e }) {
|
|
2408
2408
|
return A((s) => p.pipe(
|
|
2409
2409
|
n("web_app_request_phone", "phone_requested", s),
|
|
2410
2410
|
u.map((r) => r.status)
|
|
2411
2411
|
), { ...e, requires: "web_app_request_phone", returns: "task" });
|
|
2412
2412
|
}
|
|
2413
2413
|
// @__NO_SIDE_EFFECTS__
|
|
2414
|
-
function
|
|
2415
|
-
return
|
|
2414
|
+
function Ps() {
|
|
2415
|
+
return $s(p.pipe(
|
|
2416
2416
|
v(),
|
|
2417
2417
|
y,
|
|
2418
2418
|
L
|
|
2419
2419
|
));
|
|
2420
2420
|
}
|
|
2421
|
-
const
|
|
2422
|
-
function
|
|
2421
|
+
const nt = /* @__PURE__ */ Ps(), $n = /* @__PURE__ */ h(nt);
|
|
2422
|
+
function Hs({
|
|
2423
2423
|
invokeCustomMethod: n,
|
|
2424
2424
|
requestPhoneAccess: e,
|
|
2425
2425
|
...s
|
|
@@ -2430,21 +2430,21 @@ function Os({
|
|
|
2430
2430
|
timeout: (c || {}).timeout || 5e3
|
|
2431
2431
|
}),
|
|
2432
2432
|
u.chainW((a) => {
|
|
2433
|
-
const l =
|
|
2433
|
+
const l = Fe(N(), a);
|
|
2434
2434
|
if (!l.success)
|
|
2435
2435
|
return u.left(new pe(a, l.issues));
|
|
2436
2436
|
if (!l.output)
|
|
2437
2437
|
return u.right(void 0);
|
|
2438
|
-
const
|
|
2439
|
-
|
|
2438
|
+
const f = Fe(
|
|
2439
|
+
Ft(
|
|
2440
2440
|
De({
|
|
2441
|
-
contact:
|
|
2441
|
+
contact: St(De({
|
|
2442
2442
|
user_id: Je(),
|
|
2443
2443
|
phone_number: N(),
|
|
2444
2444
|
first_name: N(),
|
|
2445
|
-
last_name:
|
|
2445
|
+
last_name: kt(N())
|
|
2446
2446
|
})),
|
|
2447
|
-
auth_date:
|
|
2447
|
+
auth_date: Ke(
|
|
2448
2448
|
N(),
|
|
2449
2449
|
Ne((F) => new Date(Number(F) * 1e3)),
|
|
2450
2450
|
ze()
|
|
@@ -2454,7 +2454,7 @@ function Os({
|
|
|
2454
2454
|
),
|
|
2455
2455
|
l.output
|
|
2456
2456
|
);
|
|
2457
|
-
return
|
|
2457
|
+
return f.success ? u.right({ raw: l.output, parsed: f.output }) : u.left(new pe(l.output, f.issues));
|
|
2458
2458
|
})
|
|
2459
2459
|
), i = (c) => p.pipe(
|
|
2460
2460
|
r(c),
|
|
@@ -2465,71 +2465,71 @@ function Os({
|
|
|
2465
2465
|
(a) => pe.is(a) ? m.left(a) : m.right(void 0),
|
|
2466
2466
|
(a) => m.right(a)
|
|
2467
2467
|
)
|
|
2468
|
-
), o = (c) =>
|
|
2469
|
-
async (a, l,
|
|
2468
|
+
), o = (c) => we(
|
|
2469
|
+
async (a, l, f) => {
|
|
2470
2470
|
let F = 50;
|
|
2471
|
-
for (; !
|
|
2472
|
-
const
|
|
2473
|
-
if (
|
|
2474
|
-
return l(
|
|
2475
|
-
if (
|
|
2476
|
-
return a(
|
|
2471
|
+
for (; !f.isRejected; ) {
|
|
2472
|
+
const b = await i(f)();
|
|
2473
|
+
if (b._tag === "Left")
|
|
2474
|
+
return l(b.left);
|
|
2475
|
+
if (b.right)
|
|
2476
|
+
return a(b.right);
|
|
2477
2477
|
await new Promise((k) => setTimeout(k, F)), F += 50;
|
|
2478
2478
|
}
|
|
2479
2479
|
},
|
|
2480
2480
|
c
|
|
2481
2481
|
);
|
|
2482
|
-
return A((c) =>
|
|
2482
|
+
return A((c) => we.fn((a) => p.pipe(
|
|
2483
2483
|
// Try to get the requested contact. Probably, we already requested it before.
|
|
2484
2484
|
i(a),
|
|
2485
2485
|
u.chain((l) => l ? u.right(l) : p.pipe(
|
|
2486
2486
|
e(a),
|
|
2487
|
-
u.chainW((
|
|
2487
|
+
u.chainW((f) => f === "sent" ? o(a) : u.left(new Ye("User denied access")))
|
|
2488
2488
|
))
|
|
2489
2489
|
), c), { ...s, returns: "task", requires: "web_app_request_phone" });
|
|
2490
2490
|
}
|
|
2491
2491
|
// @__NO_SIDE_EFFECTS__
|
|
2492
|
-
function
|
|
2493
|
-
return
|
|
2494
|
-
...p.pipe(v(),
|
|
2495
|
-
requestPhoneAccess:
|
|
2492
|
+
function Os() {
|
|
2493
|
+
return Hs({
|
|
2494
|
+
...p.pipe(v(), Re, y),
|
|
2495
|
+
requestPhoneAccess: nt
|
|
2496
2496
|
});
|
|
2497
2497
|
}
|
|
2498
|
-
function
|
|
2498
|
+
function Ds({ requestContact: n, ...e }) {
|
|
2499
2499
|
return A(
|
|
2500
2500
|
n,
|
|
2501
2501
|
{ ...e, returns: "task", requires: "web_app_request_phone" }
|
|
2502
2502
|
);
|
|
2503
2503
|
}
|
|
2504
2504
|
// @__NO_SIDE_EFFECTS__
|
|
2505
|
-
function
|
|
2506
|
-
return
|
|
2505
|
+
function js() {
|
|
2506
|
+
return Ds({
|
|
2507
2507
|
...p.pipe(v(), y),
|
|
2508
2508
|
requestContact(n) {
|
|
2509
2509
|
return p.pipe(
|
|
2510
|
-
|
|
2510
|
+
it(n),
|
|
2511
2511
|
u.map((e) => e.parsed)
|
|
2512
2512
|
);
|
|
2513
2513
|
}
|
|
2514
2514
|
});
|
|
2515
2515
|
}
|
|
2516
|
-
const
|
|
2517
|
-
function
|
|
2516
|
+
const it = /* @__PURE__ */ Os(), Pn = /* @__PURE__ */ h(it), Gs = /* @__PURE__ */ js(), Hn = /* @__PURE__ */ h(Gs);
|
|
2517
|
+
function Ws({ request: n, ...e }) {
|
|
2518
2518
|
return A((s) => p.pipe(
|
|
2519
2519
|
n("web_app_request_write_access", "write_access_requested", s),
|
|
2520
2520
|
u.map((r) => r.status)
|
|
2521
2521
|
), { ...e, requires: "web_app_request_write_access", returns: "task" });
|
|
2522
2522
|
}
|
|
2523
2523
|
// @__NO_SIDE_EFFECTS__
|
|
2524
|
-
function
|
|
2525
|
-
return
|
|
2524
|
+
function Us() {
|
|
2525
|
+
return Ws(p.pipe(
|
|
2526
2526
|
v(),
|
|
2527
2527
|
y,
|
|
2528
2528
|
L
|
|
2529
2529
|
));
|
|
2530
2530
|
}
|
|
2531
|
-
const Qs = /* @__PURE__ */
|
|
2532
|
-
class
|
|
2531
|
+
const Qs = /* @__PURE__ */ Us(), On = /* @__PURE__ */ h(Qs);
|
|
2532
|
+
class Ks {
|
|
2533
2533
|
constructor({
|
|
2534
2534
|
version: e,
|
|
2535
2535
|
onClosed: s,
|
|
@@ -2616,46 +2616,46 @@ class Ns {
|
|
|
2616
2616
|
* @see openFp
|
|
2617
2617
|
*/
|
|
2618
2618
|
t(this, "open");
|
|
2619
|
-
const c = { version: e, requires: "web_app_open_scan_qr_popup", isVBma: i }, a = E({ ...c, returns: "either" }), l = E({ ...c, returns: "task" }),
|
|
2620
|
-
|
|
2619
|
+
const c = { version: e, requires: "web_app_open_scan_qr_popup", isVBma: i }, a = E({ ...c, returns: "either" }), l = E({ ...c, returns: "task" }), f = O(!1), F = () => {
|
|
2620
|
+
f.set(!1);
|
|
2621
2621
|
};
|
|
2622
|
-
this.isSupported = W("web_app_open_scan_qr_popup", e), this.isOpened = S(
|
|
2622
|
+
this.isSupported = W("web_app_open_scan_qr_popup", e), this.isOpened = S(f), this.captureFp = l((b) => {
|
|
2623
2623
|
let k;
|
|
2624
2624
|
return p.pipe(
|
|
2625
2625
|
this.openFp({
|
|
2626
|
-
...
|
|
2626
|
+
...b,
|
|
2627
2627
|
onCaptured: (C) => {
|
|
2628
|
-
|
|
2628
|
+
b.capture(C) && (k = C, this.close());
|
|
2629
2629
|
}
|
|
2630
2630
|
}),
|
|
2631
2631
|
u.map(() => k)
|
|
2632
2632
|
);
|
|
2633
|
-
}), this.closeFp = a(() => p.pipe(o("web_app_close_scan_qr_popup"), m.map(F))), this.openFp = l((
|
|
2634
|
-
|
|
2633
|
+
}), this.closeFp = a(() => p.pipe(o("web_app_close_scan_qr_popup"), m.map(F))), this.openFp = l((b) => p.pipe(
|
|
2634
|
+
f() ? u.left(new Be("The QR Scanner is already opened")) : async () => o("web_app_open_scan_qr_popup", { text: b.text }),
|
|
2635
2635
|
u.chainW(() => {
|
|
2636
|
-
|
|
2637
|
-
const [k, C] =
|
|
2636
|
+
f.set(!0);
|
|
2637
|
+
const [k, C] = qe(), q = (I) => (C(), f.set(!1), I);
|
|
2638
2638
|
return p.pipe(
|
|
2639
|
-
|
|
2639
|
+
we((I) => {
|
|
2640
2640
|
k(
|
|
2641
2641
|
// The scanner was closed externally.
|
|
2642
2642
|
s(I),
|
|
2643
2643
|
// The scanner was closed internally.
|
|
2644
|
-
|
|
2644
|
+
f.sub((g) => {
|
|
2645
2645
|
g || I();
|
|
2646
2646
|
}),
|
|
2647
|
-
r(
|
|
2647
|
+
r(b.onCaptured)
|
|
2648
2648
|
);
|
|
2649
|
-
},
|
|
2649
|
+
}, b),
|
|
2650
2650
|
u.mapBoth(q, q)
|
|
2651
2651
|
);
|
|
2652
2652
|
})
|
|
2653
2653
|
)), this.open = /* @__PURE__ */ h(this.openFp), this.capture = /* @__PURE__ */ h(this.captureFp), this.close = /* @__PURE__ */ h(this.closeFp);
|
|
2654
2654
|
}
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2657
|
-
return new
|
|
2658
|
-
...p.pipe(v(),
|
|
2656
|
+
function Ns() {
|
|
2657
|
+
return new Ks({
|
|
2658
|
+
...p.pipe(v(), T, y),
|
|
2659
2659
|
onClosed(n) {
|
|
2660
2660
|
return j("scan_qr_popup_closed", n);
|
|
2661
2661
|
},
|
|
@@ -2666,8 +2666,8 @@ function zs() {
|
|
|
2666
2666
|
}
|
|
2667
2667
|
});
|
|
2668
2668
|
}
|
|
2669
|
-
const
|
|
2670
|
-
class
|
|
2669
|
+
const Dn = /* @__PURE__ */ Ns();
|
|
2670
|
+
class zs {
|
|
2671
2671
|
constructor({}) {
|
|
2672
2672
|
/**
|
|
2673
2673
|
* Signal indicating if refresh is currently in progress.
|
|
@@ -2700,7 +2700,7 @@ class Js {
|
|
|
2700
2700
|
j("refresh_requested", () => {
|
|
2701
2701
|
e.set(!0);
|
|
2702
2702
|
}), this.isRefreshing = S(e), this.finishRefreshFp = () => p.pipe(
|
|
2703
|
-
u.fromEither(
|
|
2703
|
+
u.fromEither(ye("web_app_finish_refresh")),
|
|
2704
2704
|
u.map(() => {
|
|
2705
2705
|
e.set(!1);
|
|
2706
2706
|
})
|
|
@@ -2713,11 +2713,11 @@ class Js {
|
|
|
2713
2713
|
});
|
|
2714
2714
|
}
|
|
2715
2715
|
}
|
|
2716
|
-
function
|
|
2717
|
-
return new
|
|
2716
|
+
function Js() {
|
|
2717
|
+
return new zs(p.pipe(v()));
|
|
2718
2718
|
}
|
|
2719
|
-
const
|
|
2720
|
-
class
|
|
2719
|
+
const jn = /* @__PURE__ */ Js();
|
|
2720
|
+
class Ys {
|
|
2721
2721
|
constructor({ defaults: e, ...s }) {
|
|
2722
2722
|
//#region Properties.
|
|
2723
2723
|
/**
|
|
@@ -2979,16 +2979,16 @@ class Zs {
|
|
|
2979
2979
|
}
|
|
2980
2980
|
//#endregion
|
|
2981
2981
|
}
|
|
2982
|
-
function
|
|
2983
|
-
return new
|
|
2984
|
-
/* @__PURE__ */
|
|
2985
|
-
bgColor: S(() =>
|
|
2982
|
+
function Zs() {
|
|
2983
|
+
return new Ys(
|
|
2984
|
+
/* @__PURE__ */ rt("secondaryButton", "secondary_button_pressed", {
|
|
2985
|
+
bgColor: S(() => As.bottomBarColorRgb() || "#000000"),
|
|
2986
2986
|
textColor: S(() => de.buttonColor() || "#2481cc")
|
|
2987
2987
|
})
|
|
2988
2988
|
);
|
|
2989
2989
|
}
|
|
2990
|
-
const
|
|
2991
|
-
class
|
|
2990
|
+
const Gn = /* @__PURE__ */ Zs();
|
|
2991
|
+
class Xs {
|
|
2992
2992
|
constructor({ isVBma: e, request: s, version: r, createRequestId: i }) {
|
|
2993
2993
|
/**
|
|
2994
2994
|
* Retrieves an item using its key.
|
|
@@ -3040,14 +3040,14 @@ class er {
|
|
|
3040
3040
|
requires: "web_app_secure_storage_get_key",
|
|
3041
3041
|
isVBma: e,
|
|
3042
3042
|
returns: "task"
|
|
3043
|
-
}), c = (a, l,
|
|
3043
|
+
}), c = (a, l, f) => {
|
|
3044
3044
|
const F = i();
|
|
3045
3045
|
return p.pipe(
|
|
3046
3046
|
s(a, ["secure_storage_failed", l], {
|
|
3047
|
-
params: { ...
|
|
3048
|
-
capture: ((
|
|
3047
|
+
params: { ...f, req_id: F },
|
|
3048
|
+
capture: ((b) => "payload" in b ? b.payload.req_id === F : !0)
|
|
3049
3049
|
}),
|
|
3050
|
-
u.chain((
|
|
3050
|
+
u.chain((b) => b.event === "secure_storage_failed" ? u.left(new It(b.payload.error || "UNKNOWN_ERROR")) : u.right(b.payload))
|
|
3051
3051
|
);
|
|
3052
3052
|
};
|
|
3053
3053
|
this.getItemFp = o((a) => p.pipe(
|
|
@@ -3070,16 +3070,16 @@ class er {
|
|
|
3070
3070
|
)), this.getItem = /* @__PURE__ */ h(this.getItemFp), this.setItem = /* @__PURE__ */ h(this.setItemFp), this.deleteItem = /* @__PURE__ */ h(this.deleteItemFp), this.clear = /* @__PURE__ */ h(this.clearFp), this.restoreItem = /* @__PURE__ */ h(this.restoreItemFp);
|
|
3071
3071
|
}
|
|
3072
3072
|
}
|
|
3073
|
-
function
|
|
3074
|
-
return new
|
|
3073
|
+
function er() {
|
|
3074
|
+
return new Xs(p.pipe(
|
|
3075
3075
|
v(),
|
|
3076
3076
|
y,
|
|
3077
3077
|
L,
|
|
3078
|
-
|
|
3078
|
+
et
|
|
3079
3079
|
));
|
|
3080
3080
|
}
|
|
3081
|
-
const
|
|
3082
|
-
class
|
|
3081
|
+
const Wn = /* @__PURE__ */ er();
|
|
3082
|
+
class tr {
|
|
3083
3083
|
constructor(e) {
|
|
3084
3084
|
/**
|
|
3085
3085
|
* Signal indicating if the component is currently visible.
|
|
@@ -3171,10 +3171,10 @@ class sr {
|
|
|
3171
3171
|
this.isVisible = s.stateGetter("isVisible"), this.isMounted = s.isMounted, this.isSupported = s.isSupported, [[this.hide, this.hideFp], [this.show, this.showFp]] = s.stateBoolSetters("isVisible"), this.onClick = s.onClick, this.onClickFp = s.onClickFp, this.offClick = s.offClick, this.offClickFp = s.offClickFp, this.mount = s.mount, this.mountFp = s.mountFp, this.unmount = s.unmount;
|
|
3172
3172
|
}
|
|
3173
3173
|
}
|
|
3174
|
-
const
|
|
3175
|
-
/* @__PURE__ */
|
|
3174
|
+
const Un = /* @__PURE__ */ new tr(
|
|
3175
|
+
/* @__PURE__ */ Ae("settingsButton", "settings_button_pressed")
|
|
3176
3176
|
);
|
|
3177
|
-
class
|
|
3177
|
+
class sr {
|
|
3178
3178
|
constructor({ postEvent: e, storage: s, isVBma: r, isPageReload: i, version: o }) {
|
|
3179
3179
|
/**
|
|
3180
3180
|
* Signal indicating if the component is supported.
|
|
@@ -3229,11 +3229,11 @@ class rr {
|
|
|
3229
3229
|
isPageReload: i,
|
|
3230
3230
|
onMounted: a.setState,
|
|
3231
3231
|
restoreState: s.get
|
|
3232
|
-
}),
|
|
3233
|
-
...
|
|
3232
|
+
}), f = { requires: "web_app_setup_swipe_behavior", isVBma: r, version: o }, F = E({
|
|
3233
|
+
...f,
|
|
3234
3234
|
returns: "plain"
|
|
3235
|
-
}),
|
|
3236
|
-
...
|
|
3235
|
+
}), b = E({
|
|
3236
|
+
...f,
|
|
3237
3237
|
isMounted: l.isMounted,
|
|
3238
3238
|
returns: "either"
|
|
3239
3239
|
}), k = (C) => {
|
|
@@ -3245,23 +3245,23 @@ class rr {
|
|
|
3245
3245
|
})
|
|
3246
3246
|
) : m.right(void 0);
|
|
3247
3247
|
};
|
|
3248
|
-
this.isSupported = W("web_app_setup_swipe_behavior", o), this.isVerticalEnabled = a.getter("isVerticalEnabled"), this.isMounted = l.isMounted, this.disableVerticalFp =
|
|
3248
|
+
this.isSupported = W("web_app_setup_swipe_behavior", o), this.isVerticalEnabled = a.getter("isVerticalEnabled"), this.isMounted = l.isMounted, this.disableVerticalFp = b(() => k(!1)), this.enableVerticalFp = b(() => k(!0)), this.mountFp = F(() => {
|
|
3249
3249
|
const C = () => {
|
|
3250
3250
|
};
|
|
3251
3251
|
return p.pipe(l.mount(), m.match(C, C));
|
|
3252
3252
|
}), this.unmount = l.unmount, this.disableVertical = /* @__PURE__ */ h(this.disableVerticalFp), this.enableVertical = /* @__PURE__ */ h(this.enableVerticalFp), this.mount = /* @__PURE__ */ h(this.mountFp);
|
|
3253
3253
|
}
|
|
3254
3254
|
}
|
|
3255
|
-
function
|
|
3256
|
-
return new
|
|
3255
|
+
function rr() {
|
|
3256
|
+
return new sr(p.pipe(
|
|
3257
3257
|
v(),
|
|
3258
|
-
|
|
3258
|
+
T,
|
|
3259
3259
|
y,
|
|
3260
3260
|
Z("swipeBehavior")
|
|
3261
3261
|
));
|
|
3262
3262
|
}
|
|
3263
|
-
const Qn = /* @__PURE__ */
|
|
3264
|
-
async function
|
|
3263
|
+
const Qn = /* @__PURE__ */ rr();
|
|
3264
|
+
async function Kn(n) {
|
|
3265
3265
|
try {
|
|
3266
3266
|
const { clipboard: s } = navigator;
|
|
3267
3267
|
if (s)
|
|
@@ -3276,7 +3276,7 @@ async function Nn(n) {
|
|
|
3276
3276
|
document.body.removeChild(e);
|
|
3277
3277
|
}
|
|
3278
3278
|
}
|
|
3279
|
-
function
|
|
3279
|
+
function nr({ request: n, ...e }) {
|
|
3280
3280
|
return A((s, r, i) => p.pipe(
|
|
3281
3281
|
n(
|
|
3282
3282
|
"web_app_request_file_download",
|
|
@@ -3287,20 +3287,20 @@ function ir({ request: n, ...e }) {
|
|
|
3287
3287
|
), { ...e, requires: "web_app_request_file_download", returns: "task" });
|
|
3288
3288
|
}
|
|
3289
3289
|
// @__NO_SIDE_EFFECTS__
|
|
3290
|
-
function
|
|
3291
|
-
return
|
|
3290
|
+
function ir() {
|
|
3291
|
+
return nr(p.pipe(
|
|
3292
3292
|
v(),
|
|
3293
3293
|
L,
|
|
3294
3294
|
y
|
|
3295
3295
|
));
|
|
3296
3296
|
}
|
|
3297
|
-
const
|
|
3298
|
-
function
|
|
3297
|
+
const or = /* @__PURE__ */ ir(), Nn = /* @__PURE__ */ h(or);
|
|
3298
|
+
function ar({ invokeCustomMethod: n, ...e }) {
|
|
3299
3299
|
return A((s) => p.pipe(
|
|
3300
3300
|
n("getCurrentTime", {}, s),
|
|
3301
3301
|
u.chain((r) => {
|
|
3302
|
-
const i =
|
|
3303
|
-
|
|
3302
|
+
const i = Fe(
|
|
3303
|
+
Ke(Je(), yt(), Ne((o) => new Date(o * 1e3)), ze()),
|
|
3304
3304
|
r
|
|
3305
3305
|
);
|
|
3306
3306
|
return i.success ? u.right(i.output) : u.left(new pe(r, i.issues));
|
|
@@ -3308,52 +3308,52 @@ function cr({ invokeCustomMethod: n, ...e }) {
|
|
|
3308
3308
|
), { ...e, requires: "web_app_invoke_custom_method", returns: "task" });
|
|
3309
3309
|
}
|
|
3310
3310
|
// @__NO_SIDE_EFFECTS__
|
|
3311
|
-
function
|
|
3312
|
-
return
|
|
3311
|
+
function cr() {
|
|
3312
|
+
return ar(p.pipe(
|
|
3313
3313
|
v(),
|
|
3314
|
-
|
|
3314
|
+
Re,
|
|
3315
3315
|
y
|
|
3316
3316
|
));
|
|
3317
3317
|
}
|
|
3318
|
-
const
|
|
3319
|
-
function
|
|
3318
|
+
const pr = /* @__PURE__ */ cr(), zn = /* @__PURE__ */ h(pr);
|
|
3319
|
+
function ur({ postEvent: n, ...e }) {
|
|
3320
3320
|
return A(() => n("web_app_hide_keyboard"), { ...e, returns: "either", requires: "web_app_hide_keyboard" });
|
|
3321
3321
|
}
|
|
3322
3322
|
// @__NO_SIDE_EFFECTS__
|
|
3323
|
-
function
|
|
3324
|
-
return
|
|
3323
|
+
function lr() {
|
|
3324
|
+
return ur(p.pipe(
|
|
3325
3325
|
v(),
|
|
3326
|
-
|
|
3326
|
+
T,
|
|
3327
3327
|
y
|
|
3328
3328
|
));
|
|
3329
3329
|
}
|
|
3330
|
-
const
|
|
3331
|
-
function
|
|
3330
|
+
const dr = /* @__PURE__ */ lr(), Jn = /* @__PURE__ */ h(dr);
|
|
3331
|
+
function hr({ request: n, createRequestId: e, ...s }) {
|
|
3332
3332
|
return A((r) => {
|
|
3333
3333
|
const i = e();
|
|
3334
3334
|
return p.pipe(
|
|
3335
3335
|
n("web_app_read_text_from_clipboard", "clipboard_text_received", {
|
|
3336
3336
|
...r,
|
|
3337
3337
|
params: { req_id: i },
|
|
3338
|
-
capture:
|
|
3338
|
+
capture: _t(i)
|
|
3339
3339
|
}),
|
|
3340
3340
|
u.map(({ data: o = null }) => o)
|
|
3341
3341
|
);
|
|
3342
3342
|
}, { ...s, requires: "web_app_read_text_from_clipboard", returns: "task" });
|
|
3343
3343
|
}
|
|
3344
3344
|
// @__NO_SIDE_EFFECTS__
|
|
3345
|
-
function
|
|
3346
|
-
return
|
|
3345
|
+
function _r() {
|
|
3346
|
+
return hr({
|
|
3347
3347
|
...p.pipe(
|
|
3348
3348
|
v(),
|
|
3349
3349
|
y,
|
|
3350
3350
|
L
|
|
3351
3351
|
),
|
|
3352
|
-
createRequestId:
|
|
3352
|
+
createRequestId: Me
|
|
3353
3353
|
});
|
|
3354
3354
|
}
|
|
3355
|
-
const
|
|
3356
|
-
function
|
|
3355
|
+
const br = /* @__PURE__ */ _r(), Yn = /* @__PURE__ */ h(br);
|
|
3356
|
+
function fr(n) {
|
|
3357
3357
|
const e = {}, s = n.match(/VBot-Android(?:\/([^ ]+))?(?: (\([^)]+\))?|$)/);
|
|
3358
3358
|
if (s) {
|
|
3359
3359
|
const [, r, i] = s;
|
|
@@ -3369,23 +3369,23 @@ function gr(n) {
|
|
|
3369
3369
|
}
|
|
3370
3370
|
return e;
|
|
3371
3371
|
}
|
|
3372
|
-
function
|
|
3373
|
-
return
|
|
3372
|
+
function Zn() {
|
|
3373
|
+
return fr(navigator.userAgent);
|
|
3374
3374
|
}
|
|
3375
|
-
function
|
|
3375
|
+
function gr({ postEvent: n, ...e }) {
|
|
3376
3376
|
return A((s) => {
|
|
3377
3377
|
const { size: r } = new Blob([s]);
|
|
3378
3378
|
return !r || r > 4096 ? m.left(
|
|
3379
|
-
new
|
|
3379
|
+
new Q(r ? "Maximum size of data to send is 4096 bytes" : "Attempted to send empty data")
|
|
3380
3380
|
) : n("web_app_data_send", { data: s });
|
|
3381
3381
|
}, { ...e, returns: "either" });
|
|
3382
3382
|
}
|
|
3383
3383
|
// @__NO_SIDE_EFFECTS__
|
|
3384
|
-
function
|
|
3385
|
-
return
|
|
3384
|
+
function mr() {
|
|
3385
|
+
return gr(p.pipe(v(), T));
|
|
3386
3386
|
}
|
|
3387
|
-
const
|
|
3388
|
-
function
|
|
3387
|
+
const wr = /* @__PURE__ */ mr(), Xn = /* @__PURE__ */ h(wr);
|
|
3388
|
+
function Fr({ request: n, ...e }) {
|
|
3389
3389
|
return A((s, r) => p.pipe(
|
|
3390
3390
|
n(
|
|
3391
3391
|
"web_app_send_prepared_message",
|
|
@@ -3395,19 +3395,19 @@ function Sr({ request: n, ...e }) {
|
|
|
3395
3395
|
params: { id: s }
|
|
3396
3396
|
}
|
|
3397
3397
|
),
|
|
3398
|
-
u.chain((i) => i.event === "prepared_message_failed" ? u.left(new
|
|
3398
|
+
u.chain((i) => i.event === "prepared_message_failed" ? u.left(new Mt(i.payload.error)) : u.right(void 0))
|
|
3399
3399
|
), { ...e, requires: "web_app_send_prepared_message", returns: "task" });
|
|
3400
3400
|
}
|
|
3401
3401
|
// @__NO_SIDE_EFFECTS__
|
|
3402
|
-
function
|
|
3403
|
-
return
|
|
3402
|
+
function Sr() {
|
|
3403
|
+
return Fr(p.pipe(
|
|
3404
3404
|
v(),
|
|
3405
3405
|
L,
|
|
3406
3406
|
y
|
|
3407
3407
|
));
|
|
3408
3408
|
}
|
|
3409
|
-
const
|
|
3410
|
-
function
|
|
3409
|
+
const Cr = /* @__PURE__ */ Sr(), ei = /* @__PURE__ */ h(Cr);
|
|
3410
|
+
function vr({ postEvent: n, ...e }) {
|
|
3411
3411
|
return A((s, r = {}) => n("web_app_share_to_story", {
|
|
3412
3412
|
text: r.text,
|
|
3413
3413
|
media_url: s,
|
|
@@ -3415,15 +3415,15 @@ function kr({ postEvent: n, ...e }) {
|
|
|
3415
3415
|
}), { ...e, requires: "web_app_share_to_story", returns: "either" });
|
|
3416
3416
|
}
|
|
3417
3417
|
// @__NO_SIDE_EFFECTS__
|
|
3418
|
-
function
|
|
3419
|
-
return
|
|
3418
|
+
function kr() {
|
|
3419
|
+
return vr(p.pipe(
|
|
3420
3420
|
v(),
|
|
3421
|
-
|
|
3421
|
+
T,
|
|
3422
3422
|
y
|
|
3423
3423
|
));
|
|
3424
3424
|
}
|
|
3425
|
-
const
|
|
3426
|
-
function
|
|
3425
|
+
const yr = /* @__PURE__ */ kr(), ti = /* @__PURE__ */ h(yr), ke = /* @__PURE__ */ oe(!1);
|
|
3426
|
+
function qr({ isInlineMode: n, postEvent: e, ...s }) {
|
|
3427
3427
|
return A((r, i) => e("web_app_switch_inline_query", {
|
|
3428
3428
|
query: r,
|
|
3429
3429
|
chat_types: i || []
|
|
@@ -3436,18 +3436,18 @@ function Ir({ isInlineMode: n, postEvent: e, ...s }) {
|
|
|
3436
3436
|
});
|
|
3437
3437
|
}
|
|
3438
3438
|
// @__NO_SIDE_EFFECTS__
|
|
3439
|
-
function
|
|
3440
|
-
return
|
|
3439
|
+
function Ir() {
|
|
3440
|
+
return qr({
|
|
3441
3441
|
...p.pipe(
|
|
3442
3442
|
v(),
|
|
3443
|
-
|
|
3443
|
+
T,
|
|
3444
3444
|
y
|
|
3445
3445
|
),
|
|
3446
|
-
isInlineMode:
|
|
3446
|
+
isInlineMode: ke
|
|
3447
3447
|
});
|
|
3448
3448
|
}
|
|
3449
|
-
const
|
|
3450
|
-
class
|
|
3449
|
+
const Er = /* @__PURE__ */ Ir(), si = /* @__PURE__ */ h(Er);
|
|
3450
|
+
class Br {
|
|
3451
3451
|
constructor({
|
|
3452
3452
|
storage: e,
|
|
3453
3453
|
isPageReload: s,
|
|
@@ -3457,9 +3457,9 @@ class Ar {
|
|
|
3457
3457
|
onFullscreenChanged: c,
|
|
3458
3458
|
offContentSafeAreaInsetsChanged: a,
|
|
3459
3459
|
offFullscreenChanged: l,
|
|
3460
|
-
offSafeAreaInsetsChanged:
|
|
3460
|
+
offSafeAreaInsetsChanged: f,
|
|
3461
3461
|
offViewportChanged: F,
|
|
3462
|
-
request:
|
|
3462
|
+
request: b,
|
|
3463
3463
|
isViewportStable: k,
|
|
3464
3464
|
isFullscreen: C,
|
|
3465
3465
|
isVBma: q,
|
|
@@ -3653,7 +3653,7 @@ class Ar {
|
|
|
3653
3653
|
* @see expandFp
|
|
3654
3654
|
*/
|
|
3655
3655
|
t(this, "expand");
|
|
3656
|
-
const w = { top: 0, right: 0, left: 0, bottom: 0 },
|
|
3656
|
+
const w = { top: 0, right: 0, left: 0, bottom: 0 }, _ = new Y({
|
|
3657
3657
|
initialState: {
|
|
3658
3658
|
contentSafeAreaInsets: w,
|
|
3659
3659
|
height: 0,
|
|
@@ -3665,38 +3665,38 @@ class Ar {
|
|
|
3665
3665
|
},
|
|
3666
3666
|
onChange: e.set
|
|
3667
3667
|
}), x = (B) => {
|
|
3668
|
-
|
|
3668
|
+
_.setState({
|
|
3669
3669
|
isExpanded: B.is_expanded,
|
|
3670
3670
|
height: B.height,
|
|
3671
3671
|
width: B.width,
|
|
3672
3672
|
stableHeight: B.is_state_stable ? B.height : void 0
|
|
3673
3673
|
});
|
|
3674
|
-
},
|
|
3675
|
-
|
|
3674
|
+
}, V = (B) => {
|
|
3675
|
+
_.setState({ isFullscreen: B.is_fullscreen });
|
|
3676
3676
|
}, R = (B) => {
|
|
3677
|
-
|
|
3677
|
+
_.setState({ safeAreaInsets: B });
|
|
3678
3678
|
}, H = (B) => {
|
|
3679
|
-
|
|
3680
|
-
}, $ = new
|
|
3679
|
+
_.setState({ contentSafeAreaInsets: B });
|
|
3680
|
+
}, $ = new xe({
|
|
3681
3681
|
initialState(B) {
|
|
3682
|
-
const X = (
|
|
3683
|
-
const [J, D] =
|
|
3684
|
-
return te(J, P(I)) ?
|
|
3685
|
-
}, M = (
|
|
3682
|
+
const X = (K) => () => {
|
|
3683
|
+
const [J, D] = K === "safe-area" ? ["web_app_request_safe_area", "safe_area_changed"] : ["web_app_request_content_safe_area", "content_safe_area_changed"];
|
|
3684
|
+
return te(J, P(I)) ? b(J, D, B) : u.right({ top: 0, left: 0, right: 0, bottom: 0 });
|
|
3685
|
+
}, M = (K) => () => typeof K == "boolean" ? u.right(K) : u.fromEither(K());
|
|
3686
3686
|
return p.pipe(
|
|
3687
3687
|
u.Do,
|
|
3688
3688
|
u.bindW("safeAreaInsets", X("safe-area")),
|
|
3689
3689
|
u.bindW("contentSafeAreaInsets", X("content-safe-area")),
|
|
3690
3690
|
u.bindW("isFullscreen", M(C)),
|
|
3691
3691
|
u.bindW("isViewportStable", M(k)),
|
|
3692
|
-
u.chainW(({ isViewportStable:
|
|
3692
|
+
u.chainW(({ isViewportStable: K, ...J }) => K ? u.right({
|
|
3693
3693
|
...J,
|
|
3694
3694
|
height: window.innerHeight,
|
|
3695
3695
|
isExpanded: !0,
|
|
3696
3696
|
stableHeight: window.innerHeight,
|
|
3697
3697
|
width: window.innerWidth
|
|
3698
3698
|
}) : p.pipe(
|
|
3699
|
-
|
|
3699
|
+
b("web_app_request_viewport", "viewport_changed", B),
|
|
3700
3700
|
u.map((D) => ({
|
|
3701
3701
|
...J,
|
|
3702
3702
|
height: D.height,
|
|
@@ -3709,38 +3709,38 @@ class Ar {
|
|
|
3709
3709
|
},
|
|
3710
3710
|
isPageReload: s,
|
|
3711
3711
|
onMounted(B) {
|
|
3712
|
-
o(x), c(
|
|
3712
|
+
o(x), c(V), i(R), r(H), _.setState(B);
|
|
3713
3713
|
},
|
|
3714
3714
|
onUnmounted() {
|
|
3715
|
-
F(x), l(
|
|
3715
|
+
F(x), l(V), f(R), a(H);
|
|
3716
3716
|
},
|
|
3717
3717
|
restoreState: e.get
|
|
3718
3718
|
}), U = (B) => S(() => this.safeAreaInsets()[B]), ae = (B) => S(() => this.contentSafeAreaInsets()[B]);
|
|
3719
|
-
this.state =
|
|
3720
|
-
const
|
|
3719
|
+
this.state = _.state, this.height = _.getter("height"), this.stableHeight = _.getter("stableHeight"), this.width = _.getter("width"), this.isExpanded = _.getter("isExpanded"), this.safeAreaInsets = _.getter("safeAreaInsets"), this.safeAreaInsetTop = U("top"), this.safeAreaInsetBottom = U("bottom"), this.safeAreaInsetLeft = U("left"), this.safeAreaInsetRight = U("right"), this.contentSafeAreaInsets = _.getter("contentSafeAreaInsets"), this.contentSafeAreaInsetTop = ae("top"), this.contentSafeAreaInsetBottom = ae("bottom"), this.contentSafeAreaInsetLeft = ae("left"), this.contentSafeAreaInsetRight = ae("right");
|
|
3720
|
+
const ot = E({ isVBma: q, returns: "task" }), Le = E({
|
|
3721
3721
|
isVBma: q,
|
|
3722
3722
|
returns: "either"
|
|
3723
|
-
}),
|
|
3723
|
+
}), at = E({
|
|
3724
3724
|
isVBma: q,
|
|
3725
3725
|
requires: "web_app_request_fullscreen",
|
|
3726
3726
|
version: I,
|
|
3727
3727
|
returns: "task"
|
|
3728
|
-
}),
|
|
3729
|
-
|
|
3728
|
+
}), $e = (B) => at((X) => p.pipe(
|
|
3729
|
+
b(
|
|
3730
3730
|
B ? "web_app_request_fullscreen" : "web_app_exit_fullscreen",
|
|
3731
3731
|
["fullscreen_changed", "fullscreen_failed"],
|
|
3732
3732
|
X
|
|
3733
3733
|
),
|
|
3734
|
-
u.chain((M) => M.event === "fullscreen_failed" && M.payload.error !== "ALREADY_FULLSCREEN" ? u.left(new
|
|
3734
|
+
u.chain((M) => M.event === "fullscreen_failed" && M.payload.error !== "ALREADY_FULLSCREEN" ? u.left(new xt(M.payload.error)) : (_.setState({
|
|
3735
3735
|
isFullscreen: "is_fullscreen" in M.payload ? M.payload.is_fullscreen : !0
|
|
3736
3736
|
}), u.right(void 0)))
|
|
3737
3737
|
));
|
|
3738
|
-
this.isMounted = $.isMounted, this.mountFp =
|
|
3738
|
+
this.isMounted = $.isMounted, this.mountFp = ot($.mount), this.mount = /* @__PURE__ */ h(this.mountFp), this.isFullscreen = _.getter("isFullscreen"), this.requestFullscreenFp = $e(!0), this.requestFullscreen = /* @__PURE__ */ h(this.requestFullscreenFp), this.exitFullscreenFp = $e(!1), this.exitFullscreen = /* @__PURE__ */ h(this.exitFullscreenFp);
|
|
3739
3739
|
const ce = O(!1);
|
|
3740
|
-
this.isCssVarsBound = S(ce), this.bindCssVarsFp =
|
|
3740
|
+
this.isCssVarsBound = S(ce), this.bindCssVarsFp = Le(
|
|
3741
3741
|
(B) => {
|
|
3742
3742
|
if (ce())
|
|
3743
|
-
return m.left(new
|
|
3743
|
+
return m.left(new Ee());
|
|
3744
3744
|
B || (B = (M) => `--vb-viewport-${Ue(M)}`);
|
|
3745
3745
|
const X = [
|
|
3746
3746
|
["height", this.height],
|
|
@@ -3754,13 +3754,13 @@ class Ar {
|
|
|
3754
3754
|
["contentSafeAreaInsetBottom", this.contentSafeAreaInsetBottom],
|
|
3755
3755
|
["contentSafeAreaInsetLeft", this.contentSafeAreaInsetLeft],
|
|
3756
3756
|
["contentSafeAreaInsetRight", this.contentSafeAreaInsetRight]
|
|
3757
|
-
].reduce((M, [
|
|
3758
|
-
const D = B(
|
|
3757
|
+
].reduce((M, [K, J]) => {
|
|
3758
|
+
const D = B(K);
|
|
3759
3759
|
if (D) {
|
|
3760
|
-
const
|
|
3760
|
+
const Pe = () => {
|
|
3761
3761
|
Te(D, `${J()}px`);
|
|
3762
3762
|
};
|
|
3763
|
-
M.push({ update:
|
|
3763
|
+
M.push({ update: Pe, removeListener: J.sub(Pe), cssVar: D });
|
|
3764
3764
|
}
|
|
3765
3765
|
return M;
|
|
3766
3766
|
}, []);
|
|
@@ -3768,15 +3768,15 @@ class Ar {
|
|
|
3768
3768
|
M.update();
|
|
3769
3769
|
}), ce.set(!0), m.right(() => {
|
|
3770
3770
|
X.forEach((M) => {
|
|
3771
|
-
M.removeListener(),
|
|
3771
|
+
M.removeListener(), Ve(M.cssVar);
|
|
3772
3772
|
}), ce.set(!1);
|
|
3773
3773
|
});
|
|
3774
3774
|
}
|
|
3775
|
-
), this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp), this.expandFp =
|
|
3775
|
+
), this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp), this.expandFp = Le(() => g("web_app_expand")), this.expand = /* @__PURE__ */ h(this.expandFp);
|
|
3776
3776
|
}
|
|
3777
3777
|
//#endregion
|
|
3778
3778
|
}
|
|
3779
|
-
function
|
|
3779
|
+
function Ar() {
|
|
3780
3780
|
const n = (o) => ({
|
|
3781
3781
|
on: (c) => {
|
|
3782
3782
|
j(o, c);
|
|
@@ -3785,12 +3785,12 @@ function xr() {
|
|
|
3785
3785
|
ne(o, c);
|
|
3786
3786
|
}
|
|
3787
3787
|
}), e = n("viewport_changed"), s = n("fullscreen_changed"), r = n("safe_area_changed"), i = n("content_safe_area_changed");
|
|
3788
|
-
return new
|
|
3788
|
+
return new Br({
|
|
3789
3789
|
...p.pipe(
|
|
3790
3790
|
v(),
|
|
3791
3791
|
Z("viewport"),
|
|
3792
3792
|
y,
|
|
3793
|
-
|
|
3793
|
+
T,
|
|
3794
3794
|
L
|
|
3795
3795
|
),
|
|
3796
3796
|
isFullscreen() {
|
|
@@ -3809,8 +3809,8 @@ function xr() {
|
|
|
3809
3809
|
onViewportChanged: e.on
|
|
3810
3810
|
});
|
|
3811
3811
|
}
|
|
3812
|
-
const
|
|
3813
|
-
class
|
|
3812
|
+
const ri = /* @__PURE__ */ Ar();
|
|
3813
|
+
class xr {
|
|
3814
3814
|
constructor({ request: e }) {
|
|
3815
3815
|
/**
|
|
3816
3816
|
* Requests storage access with specified options.
|
|
@@ -3875,13 +3875,13 @@ class Mr {
|
|
|
3875
3875
|
});
|
|
3876
3876
|
}
|
|
3877
3877
|
}
|
|
3878
|
-
function
|
|
3879
|
-
return new
|
|
3878
|
+
function Mr() {
|
|
3879
|
+
return new xr({
|
|
3880
3880
|
request: Ge
|
|
3881
3881
|
});
|
|
3882
3882
|
}
|
|
3883
|
-
const
|
|
3884
|
-
class
|
|
3883
|
+
const ni = /* @__PURE__ */ Mr();
|
|
3884
|
+
class Rr {
|
|
3885
3885
|
/**
|
|
3886
3886
|
* Listens to 'web_app_setup_back_button' methods calls from Mini App.
|
|
3887
3887
|
*/
|
|
@@ -3898,7 +3898,7 @@ class Vr {
|
|
|
3898
3898
|
d().send("back_button_pressed");
|
|
3899
3899
|
}
|
|
3900
3900
|
}
|
|
3901
|
-
const
|
|
3901
|
+
const ii = new Rr();
|
|
3902
3902
|
class Tr {
|
|
3903
3903
|
/**
|
|
3904
3904
|
* Listens to 'web_app_setup_main_button' methods calls from Mini App.
|
|
@@ -3916,8 +3916,8 @@ class Tr {
|
|
|
3916
3916
|
d().send("main_button_pressed");
|
|
3917
3917
|
}
|
|
3918
3918
|
}
|
|
3919
|
-
const
|
|
3920
|
-
class
|
|
3919
|
+
const oi = new Tr();
|
|
3920
|
+
class Vr {
|
|
3921
3921
|
/**
|
|
3922
3922
|
* Listens to 'web_app_setup_secondary_button' methods calls from Mini App.
|
|
3923
3923
|
*/
|
|
@@ -3934,8 +3934,8 @@ class Lr {
|
|
|
3934
3934
|
d().send("secondary_button_pressed");
|
|
3935
3935
|
}
|
|
3936
3936
|
}
|
|
3937
|
-
const
|
|
3938
|
-
class
|
|
3937
|
+
const ai = new Vr();
|
|
3938
|
+
class Lr {
|
|
3939
3939
|
/**
|
|
3940
3940
|
* Listens to 'web_app_setup_settings_button' methods calls from Mini App.
|
|
3941
3941
|
*/
|
|
@@ -3952,8 +3952,8 @@ class $r {
|
|
|
3952
3952
|
d().send("settings_button_pressed");
|
|
3953
3953
|
}
|
|
3954
3954
|
}
|
|
3955
|
-
const
|
|
3956
|
-
class
|
|
3955
|
+
const ci = new Lr();
|
|
3956
|
+
class $r {
|
|
3957
3957
|
/**
|
|
3958
3958
|
* Listens to 'web_app_open_popup' methods calls from Mini App.
|
|
3959
3959
|
*/
|
|
@@ -3971,8 +3971,8 @@ class Pr {
|
|
|
3971
3971
|
d().send("popup_closed", { button_id: e });
|
|
3972
3972
|
}
|
|
3973
3973
|
}
|
|
3974
|
-
const
|
|
3975
|
-
class
|
|
3974
|
+
const pi = new $r();
|
|
3975
|
+
class Pr {
|
|
3976
3976
|
/**
|
|
3977
3977
|
* Listens to 'web_app_expand' methods calls from Mini App.
|
|
3978
3978
|
*/
|
|
@@ -4060,8 +4060,8 @@ class Hr {
|
|
|
4060
4060
|
d().send("viewport_changed", e);
|
|
4061
4061
|
}
|
|
4062
4062
|
}
|
|
4063
|
-
const
|
|
4064
|
-
class
|
|
4063
|
+
const ui = new Pr();
|
|
4064
|
+
class Hr {
|
|
4065
4065
|
/**
|
|
4066
4066
|
* Listens to 'iframe_ready' methods calls from Mini App.
|
|
4067
4067
|
*/
|
|
@@ -4153,8 +4153,8 @@ class Or {
|
|
|
4153
4153
|
d().send("visibility_changed", { is_visible: e });
|
|
4154
4154
|
}
|
|
4155
4155
|
}
|
|
4156
|
-
const
|
|
4157
|
-
class
|
|
4156
|
+
const li = new Hr();
|
|
4157
|
+
class Or {
|
|
4158
4158
|
/**
|
|
4159
4159
|
* Listens to 'web_app_trigger_haptic_feedback' methods calls from Mini App.
|
|
4160
4160
|
*/
|
|
@@ -4164,8 +4164,8 @@ class Dr {
|
|
|
4164
4164
|
});
|
|
4165
4165
|
}
|
|
4166
4166
|
}
|
|
4167
|
-
const
|
|
4168
|
-
class
|
|
4167
|
+
const di = new Or();
|
|
4168
|
+
class Dr {
|
|
4169
4169
|
/**
|
|
4170
4170
|
* Listens to 'web_app_biometry_get_info' methods calls from Mini App.
|
|
4171
4171
|
*/
|
|
@@ -4225,8 +4225,8 @@ class jr {
|
|
|
4225
4225
|
d().send("biometry_token_updated", e);
|
|
4226
4226
|
}
|
|
4227
4227
|
}
|
|
4228
|
-
const
|
|
4229
|
-
class
|
|
4228
|
+
const hi = new Dr();
|
|
4229
|
+
class jr {
|
|
4230
4230
|
/**
|
|
4231
4231
|
* Listens to 'web_app_open_invoice' methods calls from Mini App.
|
|
4232
4232
|
*/
|
|
@@ -4242,8 +4242,8 @@ class Gr {
|
|
|
4242
4242
|
d().send("invoice_closed", e);
|
|
4243
4243
|
}
|
|
4244
4244
|
}
|
|
4245
|
-
const
|
|
4246
|
-
class
|
|
4245
|
+
const _i = new jr();
|
|
4246
|
+
class Gr {
|
|
4247
4247
|
/**
|
|
4248
4248
|
* Listens to 'web_app_open_scan_qr_popup' methods calls from Mini App.
|
|
4249
4249
|
*/
|
|
@@ -4273,8 +4273,8 @@ class Wr {
|
|
|
4273
4273
|
d().send("scan_qr_popup_closed");
|
|
4274
4274
|
}
|
|
4275
4275
|
}
|
|
4276
|
-
const
|
|
4277
|
-
class
|
|
4276
|
+
const bi = new Gr();
|
|
4277
|
+
class Wr {
|
|
4278
4278
|
/**
|
|
4279
4279
|
* Listens to 'web_app_check_location' methods calls from Mini App.
|
|
4280
4280
|
*/
|
|
@@ -4312,8 +4312,8 @@ class Ur {
|
|
|
4312
4312
|
d().send("location_requested", e);
|
|
4313
4313
|
}
|
|
4314
4314
|
}
|
|
4315
|
-
const
|
|
4316
|
-
class
|
|
4315
|
+
const fi = new Wr();
|
|
4316
|
+
class Ur {
|
|
4317
4317
|
/**
|
|
4318
4318
|
* Listens to 'web_app_open_link' methods calls from Mini App.
|
|
4319
4319
|
*/
|
|
@@ -4331,7 +4331,7 @@ class Kr {
|
|
|
4331
4331
|
});
|
|
4332
4332
|
}
|
|
4333
4333
|
}
|
|
4334
|
-
const
|
|
4334
|
+
const gi = new Ur();
|
|
4335
4335
|
class Qr {
|
|
4336
4336
|
/**
|
|
4337
4337
|
* Listens to 'web_app_request_emoji_status_access' methods calls from Mini App.
|
|
@@ -4368,8 +4368,8 @@ class Qr {
|
|
|
4368
4368
|
d().send("emoji_status_failed", e);
|
|
4369
4369
|
}
|
|
4370
4370
|
}
|
|
4371
|
-
const
|
|
4372
|
-
class
|
|
4371
|
+
const mi = new Qr();
|
|
4372
|
+
class Kr {
|
|
4373
4373
|
/**
|
|
4374
4374
|
* Listens to 'web_app_add_to_home_screen' methods calls from Mini App.
|
|
4375
4375
|
*/
|
|
@@ -4405,8 +4405,8 @@ class Nr {
|
|
|
4405
4405
|
d().send("home_screen_failed", e);
|
|
4406
4406
|
}
|
|
4407
4407
|
}
|
|
4408
|
-
const
|
|
4409
|
-
class
|
|
4408
|
+
const wi = new Kr();
|
|
4409
|
+
class Nr {
|
|
4410
4410
|
/**
|
|
4411
4411
|
* Listens to 'web_app_request_phone' methods calls from Mini App.
|
|
4412
4412
|
*/
|
|
@@ -4436,8 +4436,8 @@ class zr {
|
|
|
4436
4436
|
d().send("write_access_requested", e);
|
|
4437
4437
|
}
|
|
4438
4438
|
}
|
|
4439
|
-
const
|
|
4440
|
-
class
|
|
4439
|
+
const Fi = new Nr();
|
|
4440
|
+
class zr {
|
|
4441
4441
|
/**
|
|
4442
4442
|
* Listens to 'web_app_setup_closing_behavior' methods calls from Mini App.
|
|
4443
4443
|
*/
|
|
@@ -4447,8 +4447,8 @@ class Jr {
|
|
|
4447
4447
|
});
|
|
4448
4448
|
}
|
|
4449
4449
|
}
|
|
4450
|
-
const
|
|
4451
|
-
class
|
|
4450
|
+
const Si = new zr();
|
|
4451
|
+
class Jr {
|
|
4452
4452
|
/**
|
|
4453
4453
|
* Listens to 'web_app_setup_swipe_behavior' methods calls from Mini App.
|
|
4454
4454
|
*/
|
|
@@ -4458,8 +4458,8 @@ class Yr {
|
|
|
4458
4458
|
});
|
|
4459
4459
|
}
|
|
4460
4460
|
}
|
|
4461
|
-
const
|
|
4462
|
-
class
|
|
4461
|
+
const Ci = new Jr();
|
|
4462
|
+
class Yr {
|
|
4463
4463
|
/**
|
|
4464
4464
|
* Listens to 'web_app_read_text_from_clipboard' methods calls from Mini App.
|
|
4465
4465
|
*/
|
|
@@ -4475,8 +4475,8 @@ class Zr {
|
|
|
4475
4475
|
d().send("clipboard_text_received", e);
|
|
4476
4476
|
}
|
|
4477
4477
|
}
|
|
4478
|
-
const
|
|
4479
|
-
class
|
|
4478
|
+
const vi = new Yr();
|
|
4479
|
+
class Zr {
|
|
4480
4480
|
/**
|
|
4481
4481
|
* Listens to 'web_app_request_file_download' methods calls from Mini App.
|
|
4482
4482
|
*/
|
|
@@ -4492,8 +4492,8 @@ class Xr {
|
|
|
4492
4492
|
d().send("file_download_requested", e);
|
|
4493
4493
|
}
|
|
4494
4494
|
}
|
|
4495
|
-
const
|
|
4496
|
-
class
|
|
4495
|
+
const ki = new Zr();
|
|
4496
|
+
class Xr {
|
|
4497
4497
|
/**
|
|
4498
4498
|
* Listens to 'web_app_send_prepared_message' methods calls from Mini App.
|
|
4499
4499
|
*/
|
|
@@ -4523,8 +4523,8 @@ class en {
|
|
|
4523
4523
|
d().send("prepared_message_sent");
|
|
4524
4524
|
}
|
|
4525
4525
|
}
|
|
4526
|
-
const
|
|
4527
|
-
class
|
|
4526
|
+
const yi = new Xr();
|
|
4527
|
+
class en {
|
|
4528
4528
|
/**
|
|
4529
4529
|
* Listens to 'web_app_data_send' methods calls from Mini App.
|
|
4530
4530
|
*/
|
|
@@ -4542,8 +4542,8 @@ class tn {
|
|
|
4542
4542
|
});
|
|
4543
4543
|
}
|
|
4544
4544
|
}
|
|
4545
|
-
const
|
|
4546
|
-
class
|
|
4545
|
+
const qi = new en();
|
|
4546
|
+
class tn {
|
|
4547
4547
|
/**
|
|
4548
4548
|
* Listens to 'web_app_invoke_custom_method' methods calls from Mini App.
|
|
4549
4549
|
*/
|
|
@@ -4559,8 +4559,8 @@ class sn {
|
|
|
4559
4559
|
d().send("custom_method_invoked", e);
|
|
4560
4560
|
}
|
|
4561
4561
|
}
|
|
4562
|
-
const
|
|
4563
|
-
class
|
|
4562
|
+
const Ii = new tn();
|
|
4563
|
+
class sn {
|
|
4564
4564
|
/**
|
|
4565
4565
|
* Listens to 'web_app_send_notification' method call from Mini App.
|
|
4566
4566
|
*/
|
|
@@ -4570,8 +4570,8 @@ class rn {
|
|
|
4570
4570
|
});
|
|
4571
4571
|
}
|
|
4572
4572
|
}
|
|
4573
|
-
const
|
|
4574
|
-
class
|
|
4573
|
+
const Ei = new sn();
|
|
4574
|
+
class rn {
|
|
4575
4575
|
/**
|
|
4576
4576
|
* Sets the theme params of the Mini App.
|
|
4577
4577
|
* Sends 'theme_changed' event to the Mini App.
|
|
@@ -4588,269 +4588,268 @@ class nn {
|
|
|
4588
4588
|
});
|
|
4589
4589
|
}
|
|
4590
4590
|
}
|
|
4591
|
-
const
|
|
4592
|
-
function
|
|
4591
|
+
const Bi = new rn();
|
|
4592
|
+
function nn(n = {}) {
|
|
4593
4593
|
const {
|
|
4594
4594
|
version: e,
|
|
4595
4595
|
isInlineMode: s,
|
|
4596
4596
|
themeParams: r
|
|
4597
4597
|
} = n;
|
|
4598
|
-
let i = "0.0";
|
|
4599
4598
|
if (e && typeof s == "boolean" && r)
|
|
4600
|
-
|
|
4599
|
+
Ce.set(e), ke.set(s), ve.set(r);
|
|
4601
4600
|
else {
|
|
4602
|
-
const
|
|
4603
|
-
(
|
|
4604
|
-
(
|
|
4605
|
-
|
|
4601
|
+
const a = p.pipe(le(), m.matchW(
|
|
4602
|
+
(l) => l,
|
|
4603
|
+
(l) => {
|
|
4604
|
+
Ce.set(e || l.vbWebAppVersion || (l.vbWebAppPlatform === "web" ? bt : "0.0")), ke.set(typeof s == "boolean" ? s : !!l.vbWebAppBotInline), ve.set(r || l.vbWebAppThemeParams);
|
|
4606
4605
|
}
|
|
4607
4606
|
));
|
|
4608
|
-
if (
|
|
4609
|
-
return m.left(
|
|
4607
|
+
if (a)
|
|
4608
|
+
return m.left(a);
|
|
4610
4609
|
}
|
|
4611
|
-
|
|
4612
|
-
const [
|
|
4610
|
+
n.postEvent && Ze.set(n.postEvent);
|
|
4611
|
+
const [i, o] = qe(
|
|
4613
4612
|
j("reload_iframe", () => {
|
|
4614
|
-
|
|
4613
|
+
He().log("Received a request to reload the page"), Vt("iframe_will_reload"), window.location.reload();
|
|
4615
4614
|
})
|
|
4616
|
-
), { acceptCustomStyles:
|
|
4617
|
-
if (
|
|
4618
|
-
const
|
|
4619
|
-
|
|
4620
|
-
j("set_custom_style", (
|
|
4621
|
-
|
|
4615
|
+
), { acceptCustomStyles: c = !0 } = n;
|
|
4616
|
+
if (c) {
|
|
4617
|
+
const a = document.createElement("style");
|
|
4618
|
+
a.id = "vbot-custom-styles", document.head.appendChild(a), i(
|
|
4619
|
+
j("set_custom_style", (l) => {
|
|
4620
|
+
a.innerHTML = l;
|
|
4622
4621
|
}),
|
|
4623
4622
|
() => {
|
|
4624
|
-
document.head.removeChild(
|
|
4623
|
+
document.head.removeChild(a);
|
|
4625
4624
|
}
|
|
4626
4625
|
);
|
|
4627
4626
|
}
|
|
4628
4627
|
return p.pipe(
|
|
4629
4628
|
re("iframe_ready", { reload_supported: !0 }),
|
|
4630
|
-
m.map(() => (
|
|
4629
|
+
m.map(() => (He().log("The package was initialized"), o))
|
|
4631
4630
|
);
|
|
4632
4631
|
}
|
|
4633
|
-
const
|
|
4632
|
+
const Ai = he(nn);
|
|
4634
4633
|
export {
|
|
4635
4634
|
Ye as AccessDeniedError,
|
|
4636
4635
|
Tt as BackButton,
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4636
|
+
Ht as Biometry,
|
|
4637
|
+
Ee as CSSVarsBoundError,
|
|
4638
|
+
Ri as CancelledError,
|
|
4639
|
+
jt as ClosingBehavior,
|
|
4640
|
+
Wt as CloudStorage,
|
|
4641
|
+
Be as ConcurrentCallError,
|
|
4642
|
+
Kt as DeviceStorage,
|
|
4643
|
+
qt as DeviceStorageMethodError,
|
|
4644
|
+
xt as FullscreenFailedError,
|
|
4645
|
+
Bt as FunctionUnavailableError,
|
|
4646
|
+
ts as HapticFeedback,
|
|
4647
|
+
Rr as HostBackButton,
|
|
4648
|
+
Dr as HostBiometry,
|
|
4649
|
+
en as HostChat,
|
|
4650
|
+
Yr as HostClipboard,
|
|
4651
|
+
zr as HostClosingBehavior,
|
|
4652
|
+
tn as HostCustomMethod,
|
|
4654
4653
|
Qr as HostEmojiStatus,
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4654
|
+
Zr as HostFiles,
|
|
4655
|
+
Or as HostHapticFeedback,
|
|
4656
|
+
Kr as HostHomeScreen,
|
|
4657
|
+
jr as HostInvoice,
|
|
4658
|
+
Ur as HostLink,
|
|
4659
|
+
Wr as HostLocationManager,
|
|
4661
4660
|
Tr as HostMainButton,
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4661
|
+
Hr as HostMiniApp,
|
|
4662
|
+
sn as HostNotification,
|
|
4663
|
+
$r as HostPopup,
|
|
4664
|
+
Nr as HostPrivacy,
|
|
4665
|
+
Gr as HostQrScanner,
|
|
4666
|
+
Vr as HostSecondaryButton,
|
|
4667
|
+
Lr as HostSettingsButton,
|
|
4668
|
+
Xr as HostSharing,
|
|
4669
|
+
Jr as HostSwipeBehavior,
|
|
4670
|
+
rn as HostThemeParams,
|
|
4671
|
+
Pr as HostViewport,
|
|
4672
|
+
ps as InitData,
|
|
4673
|
+
Q as InvalidArgumentsError,
|
|
4674
|
+
bn as InvalidEnvError,
|
|
4676
4675
|
Ti as InvalidLaunchParamsError,
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4676
|
+
ls as Invoice,
|
|
4677
|
+
Vi as InvokeCustomMethodFailedError,
|
|
4678
|
+
Li as LaunchParamsRetrieveError,
|
|
4679
|
+
Cs as LocationManager,
|
|
4680
|
+
ks as MainButton,
|
|
4681
|
+
$i as MethodParameterUnsupportedError,
|
|
4682
|
+
Pi as MethodUnsupportedError,
|
|
4683
|
+
Es as MiniApp,
|
|
4684
|
+
Et as NotAvailableError,
|
|
4685
|
+
Ms as Notification,
|
|
4686
|
+
Vs as Popup,
|
|
4687
|
+
Ks as QrScanner,
|
|
4688
|
+
zs as Refresh,
|
|
4689
|
+
Ys as SecondaryButton,
|
|
4690
|
+
Xs as SecureStorage,
|
|
4691
|
+
It as SecureStorageMethodError,
|
|
4692
|
+
At as SetEmojiStatusError,
|
|
4693
|
+
tr as SettingsButton,
|
|
4694
|
+
Mt as ShareMessageError,
|
|
4695
|
+
xr as StoragePermission,
|
|
4696
|
+
sr as SwipeBehavior,
|
|
4697
|
+
qs as ThemeParams,
|
|
4698
|
+
Hi as TimeoutError,
|
|
4699
|
+
Oi as UnknownEnvError,
|
|
4700
|
+
Rt as UnknownThemeParamsKeyError,
|
|
4702
4701
|
pe as ValidationError,
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4702
|
+
Br as Viewport,
|
|
4703
|
+
qn as addToHomeScreen,
|
|
4704
|
+
is as addToHomeScreenFp,
|
|
4705
|
+
Di as applyPolyfills,
|
|
4706
|
+
fn as backButton,
|
|
4707
|
+
wn as biometry,
|
|
4708
|
+
In as checkHomeScreenStatus,
|
|
4709
|
+
cs as checkHomeScreenStatusFp,
|
|
4710
|
+
Fn as closingBehavior,
|
|
4711
|
+
Sn as cloudStorage,
|
|
4712
|
+
Kn as copyTextToClipboard,
|
|
4713
|
+
ji as createLogger,
|
|
4714
|
+
Gi as createPostEvent,
|
|
4715
|
+
Me as createRequestId,
|
|
4716
|
+
Wi as createStartParam,
|
|
4717
|
+
Ui as createStartParamFp,
|
|
4719
4718
|
Qi as debug,
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4719
|
+
Ki as decodeBase64Url,
|
|
4720
|
+
Ni as decodeBase64UrlFp,
|
|
4721
|
+
zi as decodeStartParam,
|
|
4722
|
+
Ji as decodeStartParamFp,
|
|
4723
|
+
Yi as deepSnakeToCamelObjKeys,
|
|
4724
|
+
Zi as defineHostBridge,
|
|
4725
|
+
Xi as defineWebComponentBridge,
|
|
4726
|
+
Cn as deviceStorage,
|
|
4727
|
+
Nn as downloadFile,
|
|
4728
|
+
or as downloadFileFp,
|
|
4729
|
+
eo as emitEvent,
|
|
4730
|
+
to as encodeBase64Url,
|
|
4731
|
+
zn as getCurrentTime,
|
|
4732
|
+
pr as getCurrentTimeFp,
|
|
4733
|
+
so as getHostBridge,
|
|
4734
|
+
ro as getReleaseVersion,
|
|
4735
|
+
yn as hapticFeedback,
|
|
4736
|
+
Jn as hideKeyboard,
|
|
4737
|
+
dr as hideKeyboardFp,
|
|
4738
|
+
ii as hostBackButton,
|
|
4739
|
+
hi as hostBiometry,
|
|
4740
|
+
qi as hostChat,
|
|
4741
|
+
vi as hostClipboard,
|
|
4742
|
+
Si as hostClosingBehavior,
|
|
4743
|
+
Ii as hostCustomMethod,
|
|
4744
|
+
mi as hostEmojiStatus,
|
|
4745
|
+
ki as hostFiles,
|
|
4746
|
+
di as hostHapticFeedback,
|
|
4747
|
+
wi as hostHomeScreen,
|
|
4748
|
+
_i as hostInvoice,
|
|
4749
|
+
gi as hostLink,
|
|
4750
|
+
fi as hostLocationManager,
|
|
4751
|
+
oi as hostMainButton,
|
|
4752
|
+
li as hostMiniApp,
|
|
4753
|
+
Ei as hostNotification,
|
|
4754
|
+
pi as hostPopup,
|
|
4755
|
+
Fi as hostPrivacy,
|
|
4756
|
+
bi as hostQrScanner,
|
|
4757
|
+
ai as hostSecondaryButton,
|
|
4758
|
+
ci as hostSettingsButton,
|
|
4759
|
+
yi as hostSharing,
|
|
4760
|
+
Ci as hostSwipeBehavior,
|
|
4761
|
+
Bi as hostThemeParams,
|
|
4762
|
+
ui as hostViewport,
|
|
4763
|
+
Ai as init,
|
|
4764
|
+
En as initData,
|
|
4765
|
+
nn as initFp,
|
|
4766
|
+
Bn as invoice,
|
|
4767
|
+
Ut as invokeCustomMethod,
|
|
4768
|
+
yo as isAnyRGB,
|
|
4769
|
+
st as isColorDark,
|
|
4770
|
+
ys as isColorDarkFp,
|
|
4771
|
+
qo as isRGB,
|
|
4772
|
+
Io as isRGBA,
|
|
4773
|
+
Eo as isRGBAShort,
|
|
4774
|
+
Bo as isRGBShort,
|
|
4775
|
+
no as isSafeToCreateStartParam,
|
|
4776
|
+
io as isVBma,
|
|
4777
|
+
oo as isVBmaFp,
|
|
4778
|
+
Rn as locationManager,
|
|
4779
|
+
ao as logger,
|
|
4781
4780
|
Tn as mainButton,
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4781
|
+
As as miniApp,
|
|
4782
|
+
co as mockVBotEnv,
|
|
4783
|
+
Vn as notification,
|
|
4784
|
+
po as off,
|
|
4785
|
+
uo as offAll,
|
|
4786
|
+
lo as on,
|
|
4787
|
+
An as openLink,
|
|
4788
|
+
bs as openLinkFp,
|
|
4789
|
+
xn as openVBotLink,
|
|
4790
|
+
tt as openVBotLinkFp,
|
|
4791
|
+
Ao as parseInitDataQuery,
|
|
4792
|
+
xo as parseInitDataQueryFp,
|
|
4793
|
+
Mo as parseLaunchParamsQuery,
|
|
4794
|
+
Ro as parseLaunchParamsQueryFp,
|
|
4795
|
+
Ln as popup,
|
|
4796
|
+
Vt as postEvent,
|
|
4798
4797
|
re as postEventFp,
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4798
|
+
Dn as qrScanner,
|
|
4799
|
+
Yn as readTextFromClipboard,
|
|
4800
|
+
br as readTextFromClipboardFp,
|
|
4801
|
+
jn as refresh,
|
|
4802
|
+
gn as request,
|
|
4803
|
+
mn as request2,
|
|
4804
|
+
Xe as request2Fp,
|
|
4805
|
+
Hn as requestContact,
|
|
4806
|
+
Pn as requestContactComplete,
|
|
4807
|
+
it as requestContactCompleteFp,
|
|
4808
|
+
Gs as requestContactFp,
|
|
4809
|
+
vn as requestEmojiStatusAccess,
|
|
4810
|
+
Yt as requestEmojiStatusAccessFp,
|
|
4811
|
+
Ot as requestFp,
|
|
4812
|
+
$n as requestPhoneAccess,
|
|
4813
|
+
nt as requestPhoneAccessFp,
|
|
4814
|
+
On as requestWriteAccess,
|
|
4816
4815
|
Qs as requestWriteAccessFp,
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4816
|
+
Zn as retrieveAndroidDeviceData,
|
|
4817
|
+
fr as retrieveAndroidDeviceDataFrom,
|
|
4818
|
+
ho as retrieveLaunchParams,
|
|
4819
|
+
_o as retrieveLaunchParamsFp,
|
|
4820
|
+
bo as retrieveRawInitData,
|
|
4821
|
+
fo as retrieveRawInitDataFp,
|
|
4822
|
+
go as retrieveRawLaunchParams,
|
|
4823
|
+
mo as retrieveRawLaunchParamsFp,
|
|
4824
|
+
Gn as secondaryButton,
|
|
4825
|
+
Wn as secureStorage,
|
|
4826
|
+
Xn as sendData,
|
|
4827
|
+
wr as sendDataFp,
|
|
4829
4828
|
To as serializeInitDataQuery,
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4829
|
+
Vo as serializeLaunchParamsQuery,
|
|
4830
|
+
wo as setDebug,
|
|
4831
|
+
kn as setEmojiStatus,
|
|
4832
|
+
es as setEmojiStatusFp,
|
|
4833
|
+
Fo as setLaunchParams,
|
|
4834
|
+
So as setTargetOrigin,
|
|
4835
|
+
Un as settingsButton,
|
|
4836
|
+
ei as shareMessage,
|
|
4837
|
+
Cr as shareMessageFp,
|
|
4838
|
+
ti as shareStory,
|
|
4839
|
+
yr as shareStoryFp,
|
|
4840
|
+
Mn as shareURL,
|
|
4841
|
+
Fs as shareURLFp,
|
|
4842
|
+
ni as storagePermission,
|
|
4843
|
+
Co as supports,
|
|
4845
4844
|
Qn as swipeBehavior,
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4845
|
+
si as switchInlineQuery,
|
|
4846
|
+
Er as switchInlineQueryFp,
|
|
4847
|
+
vo as targetOrigin,
|
|
4849
4848
|
de as themeParams,
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4849
|
+
Lo as toRGB,
|
|
4850
|
+
$o as toRGBFp,
|
|
4851
|
+
Po as toRGBFull,
|
|
4852
|
+
Ho as toRGBFullFp,
|
|
4853
|
+
ri as viewport
|
|
4855
4854
|
};
|
|
4856
4855
|
//# sourceMappingURL=index.js.map
|