@balancy/wasm 1.0.24 → 1.0.26

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.
@@ -381,6 +381,13 @@ var Balancy = function() {
381
381
  "__Z29jsbalancyGetDataObjectFullUrlNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
382
382
  "__Z24jsbalancyGetModelUnnyIdsNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEb",
383
383
  "__Z34jsbalancySystemProfileTrackRevenueidNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
384
+ "__Z23jsbalancyDataObjectLoadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
385
+ "__Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
386
+ "_balancySetUnzipCallback",
387
+ "__Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_",
388
+ "__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE",
389
+ "_balancySetDataRequestedCallback",
390
+ "_balancyViewAllowOptimization",
384
391
  "_balancyConfigLaunch",
385
392
  "_balancyConfigClose",
386
393
  "_jsbalancyConfigAuth",
@@ -407,6 +414,8 @@ var Balancy = function() {
407
414
  "__Z35jsbalancyDailyBonus_claimNextRewardPN7Balancy4Data8BaseDataE",
408
415
  "__Z38jsbalancyDailyBonus_canClaimNextRewardPN7Balancy4Data8BaseDataE",
409
416
  "__Z47jsbalancyDailyBonus_getSecondsTillTheNextRewardPN7Balancy4Data8BaseDataE",
417
+ "__Z31jsbalancyBattlePass_claimRewardPN7Balancy4Data8BaseDataEi",
418
+ "__Z35jsbalancyBattlePass_getRewardStatusPN7Balancy4Data8BaseDataEi",
410
419
  "__Z35jsbalancyOfferGroupInfo_CanPurchasePN7Balancy4Data8BaseDataEPNS_5Utils15JsonBasedObjectE",
411
420
  "__Z51jsbalancyOfferInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE",
412
421
  "__Z51jsbalancyEventInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE",
@@ -424,7 +433,12 @@ var Balancy = function() {
424
433
  "__Z18jsbalancyGetStatusv",
425
434
  "_balancyGetTimeOffset",
426
435
  "_balancySetTimeOffset",
427
- "__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEb",
436
+ "__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib",
437
+ "_emscripten_websocket_on_connection_status",
438
+ "_emscripten_websocket_on_socketio_event",
439
+ "_emscripten_websocket_on_socketio_error",
440
+ "_downloadSucceededBinary",
441
+ "_fetchSucceededBinary",
428
442
  "_js_fetch",
429
443
  "_balancySetLogCallback",
430
444
  "_balancySetInvokeInMainThreadCallback",
@@ -449,8 +463,6 @@ var Balancy = function() {
449
463
  "_balancyGetBoolArrayParam",
450
464
  "_balancyGetStringArrayParam",
451
465
  "_balancyFreeStringArray",
452
- "_balancySetDataRequestedCallback",
453
- "_balancyViewAllowOptimization",
454
466
  "_balancyConfigGetStatus",
455
467
  "_balancyConfigLoadListOfGames",
456
468
  "_balancyConfigAuth",
@@ -501,13 +513,23 @@ var Balancy = function() {
501
513
  "_balancyDailyBonus_claimNextReward",
502
514
  "_balancyDailyBonus_canClaimNextReward",
503
515
  "_balancyDailyBonus_getSecondsTillTheNextReward",
516
+ "_balancyBattlePass_claimReward",
517
+ "_balancyBattlePass_getRewardStatus",
504
518
  "_balancySoftPurchaseStoreItem",
505
519
  "_balancySoftPurchaseShopSlot",
506
520
  "_balancySoftPurchaseGameOffer",
507
521
  "_balancySoftPurchaseGameOfferGroup",
522
+ "__Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE",
508
523
  "_balancyWebViewRequest",
509
524
  "_balancyGetProductsIdAndType",
510
525
  "_balancyGetParsedObject",
526
+ "_js_call_typescript_bridge_connect",
527
+ "_js_call_typescript_bridge_disconnect",
528
+ "_js_call_typescript_bridge_is_connected",
529
+ "_js_call_typescript_bridge_subscribe",
530
+ "_js_call_typescript_bridge_send_message",
531
+ "_js_call_typescript_bridge_send_ack",
532
+ "_js_initialize_typescript_bridge",
511
533
  "_main",
512
534
  "onRuntimeInitialized"
513
535
  ].forEach(function(prop) {
@@ -1163,50 +1185,429 @@ var Balancy = function() {
1163
1185
  });
1164
1186
  }
1165
1187
  }
1166
- function js_fetch(url, bLoadFile, method, headers, headersCount, body, successCallbackPtr, errorCallbackPtr, callbackPtr) {
1188
+ function js_fetch(url, bLoadFile, method, headers, headersCount, body, successCallbackPtr, errorCallbackPtr, callbackPtr, binaryCallbackPtr) {
1189
+ var urlString = "";
1190
+ var methodString = "";
1191
+ var bodyString = null;
1192
+ try {
1193
+ if (!url) {
1194
+ console.error("❌ URL pointer is null");
1195
+ return;
1196
+ }
1197
+ if (!method) {
1198
+ console.error("❌ Method pointer is null");
1199
+ return;
1200
+ }
1201
+ urlString = UTF8ToString(url);
1202
+ methodString = UTF8ToString(method);
1203
+ if (body) {
1204
+ bodyString = UTF8ToString(body);
1205
+ }
1206
+ if (!urlString || urlString.length === 0) {
1207
+ console.error("❌ URL is empty or invalid");
1208
+ return;
1209
+ }
1210
+ if (urlString.includes("\0") || urlString.includes("€")) {
1211
+ console.error("❌ URL contains invalid characters:", urlString);
1212
+ return;
1213
+ }
1214
+ } catch (error) {
1215
+ console.error("❌ Error reading strings from WASM memory:", error);
1216
+ return;
1217
+ }
1167
1218
  var invokeErrorCallback = function(status, message, callbackPtr) {
1168
- var errorMessage = message || "Unknown error";
1169
- var errorLength = lengthBytesUTF8(errorMessage) + 1;
1170
- var errorPtr = Module._malloc(errorLength);
1171
- stringToUTF8(errorMessage, errorPtr, errorLength);
1172
- Module["dynCall_viii"](errorCallbackPtr, status, errorPtr, callbackPtr);
1173
- Module._free(errorPtr);
1219
+ console.log("❌ invokeErrorCallback:", status, message);
1220
+ try {
1221
+ var errorMessage = message || "Unknown error";
1222
+ var errorLength = lengthBytesUTF8(errorMessage) + 1;
1223
+ var errorPtr = Module._malloc(errorLength);
1224
+ stringToUTF8(errorMessage, errorPtr, errorLength);
1225
+ Module["dynCall_viii"](errorCallbackPtr, status, errorPtr, callbackPtr);
1226
+ Module._free(errorPtr);
1227
+ } catch (error) {
1228
+ console.error("❌ Error in error callback:", error);
1229
+ }
1174
1230
  };
1175
1231
  var headersObj = new Headers;
1176
1232
  var ptrSize = Module.HEAPU32.BYTES_PER_ELEMENT;
1177
- for(var i = 0; i < headersCount; i += 2){
1178
- var keyPtr = getValue(headers + i * ptrSize, "*");
1179
- var valuePtr = getValue(headers + (i + 1) * ptrSize, "*");
1180
- var key = UTF8ToString(keyPtr);
1181
- var value = UTF8ToString(valuePtr);
1182
- headersObj.append(key, value);
1183
- }
1184
- fetch(UTF8ToString(url), {
1185
- method: UTF8ToString(method),
1233
+ try {
1234
+ for(var i = 0; i < headersCount; i += 2){
1235
+ var keyPtr = getValue(headers + i * ptrSize, "*");
1236
+ var valuePtr = getValue(headers + (i + 1) * ptrSize, "*");
1237
+ if (!keyPtr || !valuePtr) {
1238
+ console.warn("⚠️ Skipping invalid header pointer at index", i);
1239
+ continue;
1240
+ }
1241
+ var key = UTF8ToString(keyPtr);
1242
+ var value = UTF8ToString(valuePtr);
1243
+ if (!key || !value) {
1244
+ console.warn("⚠️ Skipping empty header at index", i);
1245
+ continue;
1246
+ }
1247
+ headersObj.append(key, value);
1248
+ }
1249
+ } catch (error) {
1250
+ console.error("❌ Error processing headers:", error);
1251
+ invokeErrorCallback(-1, "Header processing error: " + error.message, callbackPtr);
1252
+ return;
1253
+ }
1254
+ var fetchOptions = {
1255
+ method: methodString,
1186
1256
  headers: headersObj,
1187
- body: body ? UTF8ToString(body) : null
1188
- }).then(function(response) {
1257
+ body: bodyString
1258
+ };
1259
+ fetch(urlString, fetchOptions).then(function(response) {
1189
1260
  if (!response.ok) {
1261
+ console.log("❌ Response not OK, reading error message");
1190
1262
  response.text().then(function(errorMessage) {
1263
+ console.log(" Error message:", errorMessage);
1191
1264
  invokeErrorCallback(response.status, errorMessage, callbackPtr);
1192
1265
  }).catch(function() {
1266
+ console.log(" Failed to read error message");
1193
1267
  invokeErrorCallback(response.status, null, callbackPtr);
1194
1268
  });
1195
1269
  return;
1196
1270
  }
1197
- response.text().then(function(data) {
1198
- var dataLength = lengthBytesUTF8(data);
1199
- var dataPtr = Module._malloc(dataLength + 1);
1200
- stringToUTF8(data, dataPtr, dataLength + 1);
1201
- Module["dynCall_viii"](successCallbackPtr, dataPtr, dataLength, callbackPtr);
1202
- Module._free(dataPtr);
1203
- }).catch(function(error) {
1204
- invokeErrorCallback(-1, error.message, callbackPtr);
1271
+ var contentType = response.headers.get("content-type") || "";
1272
+ var binaryExtensions = [
1273
+ ".png",
1274
+ ".jpg",
1275
+ ".jpeg",
1276
+ ".gif",
1277
+ ".bmp",
1278
+ ".webp",
1279
+ ".ico",
1280
+ ".mp3",
1281
+ ".mp4",
1282
+ ".wav",
1283
+ ".avi",
1284
+ ".mov",
1285
+ ".pdf",
1286
+ ".zip",
1287
+ ".rar",
1288
+ ".7z",
1289
+ ".exe",
1290
+ ".dll",
1291
+ ".so",
1292
+ ".dylib",
1293
+ ".ttf",
1294
+ ".otf",
1295
+ ".woff",
1296
+ ".woff2"
1297
+ ];
1298
+ var textMimeTypes = [
1299
+ "application/json",
1300
+ "text/",
1301
+ "application/xml",
1302
+ "application/javascript",
1303
+ "application/x-javascript"
1304
+ ];
1305
+ var hasBinaryExtension = binaryExtensions.some(function(ext) {
1306
+ return urlString.toLowerCase().includes(ext);
1307
+ });
1308
+ var isTextMimeType = textMimeTypes.some(function(type) {
1309
+ return contentType.toLowerCase().includes(type);
1205
1310
  });
1311
+ var isBinary = contentType.includes("application/octet-stream") || hasBinaryExtension || !isTextMimeType && !contentType.includes("charset");
1312
+ if (isBinary) {
1313
+ response.arrayBuffer().then(function(arrayBuffer) {
1314
+ var dataSize = arrayBuffer.byteLength;
1315
+ var dataPtr = Module._malloc(dataSize);
1316
+ var dataView = new Uint8Array(arrayBuffer);
1317
+ Module.HEAPU8.set(dataView, dataPtr);
1318
+ Module["dynCall_viii"](binaryCallbackPtr, dataPtr, dataSize, callbackPtr);
1319
+ Module._free(dataPtr);
1320
+ }).catch(function(error) {
1321
+ console.log("❌ Error reading binary data:", error);
1322
+ invokeErrorCallback(-1, error.message, callbackPtr);
1323
+ });
1324
+ } else {
1325
+ response.text().then(function(data) {
1326
+ var dataLength = lengthBytesUTF8(data);
1327
+ var dataPtr = Module._malloc(dataLength + 1);
1328
+ stringToUTF8(data, dataPtr, dataLength + 1);
1329
+ Module["dynCall_viii"](successCallbackPtr, dataPtr, dataLength, callbackPtr);
1330
+ Module._free(dataPtr);
1331
+ }).catch(function(error) {
1332
+ console.log("❌ Error reading text data:", error);
1333
+ invokeErrorCallback(-1, error.message, callbackPtr);
1334
+ });
1335
+ }
1206
1336
  }).catch(function(error) {
1337
+ console.log("❌ Fetch error:", error);
1207
1338
  invokeErrorCallback(-1, error.message, callbackPtr);
1208
1339
  });
1209
1340
  }
1341
+ function js_call_typescript_bridge_connect(connectionId, url, authData) {
1342
+ if (typeof Module !== "undefined" && Module.typescript_websocket_connect_request) {
1343
+ try {
1344
+ var urlStr = UTF8ToString(url);
1345
+ var authStr = UTF8ToString(authData);
1346
+ console.log("[C++ -> TS Bridge] Connect request", connectionId, urlStr);
1347
+ Module.typescript_websocket_connect_request(connectionId, urlStr, authStr);
1348
+ return true;
1349
+ } catch (error) {
1350
+ console.error("[ERROR] calling typescript_websocket_connect_request via Module:", error);
1351
+ }
1352
+ }
1353
+ if (typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_connect_request) {
1354
+ try {
1355
+ var urlStr1 = UTF8ToString(url);
1356
+ var authStr1 = UTF8ToString(authData);
1357
+ console.log("[C++ -> TS Bridge] Connect request via window.Module", connectionId, urlStr1);
1358
+ window.Module.typescript_websocket_connect_request(connectionId, urlStr1, authStr1);
1359
+ return true;
1360
+ } catch (error) {
1361
+ console.error("[ERROR] calling typescript_websocket_connect_request via window.Module:", error);
1362
+ }
1363
+ }
1364
+ if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_connect_request) {
1365
+ try {
1366
+ var urlStr2 = UTF8ToString(url);
1367
+ var authStr2 = UTF8ToString(authData);
1368
+ console.log("[C++ -> TS Bridge] Connect request via globalThis.Module", connectionId, urlStr2);
1369
+ globalThis.Module.typescript_websocket_connect_request(connectionId, urlStr2, authStr2);
1370
+ return true;
1371
+ } catch (error) {
1372
+ console.error("[ERROR] calling typescript_websocket_connect_request via globalThis.Module:", error);
1373
+ }
1374
+ }
1375
+ console.error("[ERROR] TypeScript WebSocket Bridge connect method not found. Available contexts:", {
1376
+ Module: typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
1377
+ return k.includes("websocket") || k.includes("typescript");
1378
+ }) : "undefined",
1379
+ windowModule: typeof window !== "undefined" && window.Module ? Object.keys(window.Module).filter(function(k) {
1380
+ return k.includes("websocket") || k.includes("typescript");
1381
+ }) : "undefined",
1382
+ globalThisModule: typeof globalThis !== "undefined" && globalThis.Module ? Object.keys(globalThis.Module).filter(function(k) {
1383
+ return k.includes("websocket") || k.includes("typescript");
1384
+ }) : "undefined"
1385
+ });
1386
+ return false;
1387
+ }
1388
+ function js_call_typescript_bridge_disconnect(connectionId) {
1389
+ var success = false;
1390
+ if (typeof Module !== "undefined" && Module.typescript_websocket_disconnect_request) {
1391
+ try {
1392
+ console.log("[C++ -> TS Bridge] Disconnect request", connectionId);
1393
+ Module.typescript_websocket_disconnect_request(connectionId);
1394
+ success = true;
1395
+ } catch (error) {
1396
+ console.error("[ERROR] calling typescript_websocket_disconnect_request via Module:", error);
1397
+ }
1398
+ }
1399
+ if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_disconnect_request) {
1400
+ try {
1401
+ console.log("[C++ -> TS Bridge] Disconnect request via window.Module", connectionId);
1402
+ window.Module.typescript_websocket_disconnect_request(connectionId);
1403
+ success = true;
1404
+ } catch (error) {
1405
+ console.error("[ERROR] calling typescript_websocket_disconnect_request via window.Module:", error);
1406
+ }
1407
+ }
1408
+ if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_disconnect_request) {
1409
+ try {
1410
+ console.log("[C++ -> TS Bridge] Disconnect request via globalThis.Module", connectionId);
1411
+ globalThis.Module.typescript_websocket_disconnect_request(connectionId);
1412
+ success = true;
1413
+ } catch (error) {
1414
+ console.error("[ERROR] calling typescript_websocket_disconnect_request via globalThis.Module:", error);
1415
+ }
1416
+ }
1417
+ if (!success) {
1418
+ console.error("[ERROR] TypeScript WebSocket Bridge disconnect method not found");
1419
+ }
1420
+ }
1421
+ function js_call_typescript_bridge_subscribe(connectionId, eventName) {
1422
+ var success = false;
1423
+ if (typeof Module !== "undefined" && Module.typescript_websocket_subscribe_event) {
1424
+ try {
1425
+ var eventStr = UTF8ToString(eventName);
1426
+ console.log("[C++ -> TS Bridge] Subscribe event", connectionId, eventStr);
1427
+ Module.typescript_websocket_subscribe_event(connectionId, eventStr);
1428
+ success = true;
1429
+ } catch (error) {
1430
+ console.error("[ERROR] calling typescript_websocket_subscribe_event via Module:", error);
1431
+ }
1432
+ }
1433
+ if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_subscribe_event) {
1434
+ try {
1435
+ var eventStr1 = UTF8ToString(eventName);
1436
+ console.log("[C++ -> TS Bridge] Subscribe event via window.Module", connectionId, eventStr1);
1437
+ window.Module.typescript_websocket_subscribe_event(connectionId, eventStr1);
1438
+ success = true;
1439
+ } catch (error) {
1440
+ console.error("[ERROR] calling typescript_websocket_subscribe_event via window.Module:", error);
1441
+ }
1442
+ }
1443
+ if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_subscribe_event) {
1444
+ try {
1445
+ var eventStr2 = UTF8ToString(eventName);
1446
+ console.log("[C++ -> TS Bridge] Subscribe event via globalThis.Module", connectionId, eventStr2);
1447
+ globalThis.Module.typescript_websocket_subscribe_event(connectionId, eventStr2);
1448
+ success = true;
1449
+ } catch (error) {
1450
+ console.error("[ERROR] calling typescript_websocket_subscribe_event via globalThis.Module:", error);
1451
+ }
1452
+ }
1453
+ if (!success) {
1454
+ console.error("[ERROR] TypeScript WebSocket Bridge subscribe method not found");
1455
+ }
1456
+ }
1457
+ function js_call_typescript_bridge_send_message(connectionId, eventName, data) {
1458
+ var success = false;
1459
+ if (typeof Module !== "undefined" && Module.typescript_websocket_send_message) {
1460
+ try {
1461
+ var eventStr = UTF8ToString(eventName);
1462
+ var dataStr = UTF8ToString(data);
1463
+ console.log("[C++ -> TS Bridge] Send message", connectionId, eventStr);
1464
+ Module.typescript_websocket_send_message(connectionId, eventStr, dataStr);
1465
+ success = true;
1466
+ } catch (error) {
1467
+ console.error("[ERROR] calling typescript_websocket_send_message via Module:", error);
1468
+ }
1469
+ }
1470
+ if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_send_message) {
1471
+ try {
1472
+ var eventStr1 = UTF8ToString(eventName);
1473
+ var dataStr1 = UTF8ToString(data);
1474
+ console.log("[C++ -> TS Bridge] Send message via window.Module", connectionId, eventStr1);
1475
+ window.Module.typescript_websocket_send_message(connectionId, eventStr1, dataStr1);
1476
+ success = true;
1477
+ } catch (error) {
1478
+ console.error("[ERROR] calling typescript_websocket_send_message via window.Module:", error);
1479
+ }
1480
+ }
1481
+ if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_send_message) {
1482
+ try {
1483
+ var eventStr2 = UTF8ToString(eventName);
1484
+ var dataStr2 = UTF8ToString(data);
1485
+ console.log("[C++ -> TS Bridge] Send message via globalThis.Module", connectionId, eventStr2);
1486
+ globalThis.Module.typescript_websocket_send_message(connectionId, eventStr2, dataStr2);
1487
+ success = true;
1488
+ } catch (error) {
1489
+ console.error("[ERROR] calling typescript_websocket_send_message via globalThis.Module:", error);
1490
+ }
1491
+ }
1492
+ if (!success) {
1493
+ console.error("[ERROR] TypeScript WebSocket Bridge send message method not found");
1494
+ }
1495
+ }
1496
+ function js_call_typescript_bridge_send_ack(connectionId, ackId, responseData) {
1497
+ var success = false;
1498
+ if (typeof Module !== "undefined" && Module.typescript_websocket_send_ack) {
1499
+ try {
1500
+ var responseStr = UTF8ToString(responseData);
1501
+ console.log("[C++ -> TS Bridge] Send ack", connectionId, ackId);
1502
+ Module.typescript_websocket_send_ack(connectionId, ackId, responseStr);
1503
+ success = true;
1504
+ } catch (error) {
1505
+ console.error("[ERROR] calling typescript_websocket_send_ack via Module:", error);
1506
+ }
1507
+ }
1508
+ if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_send_ack) {
1509
+ try {
1510
+ var responseStr1 = UTF8ToString(responseData);
1511
+ console.log("[C++ -> TS Bridge] Send ack via window.Module", connectionId, ackId);
1512
+ window.Module.typescript_websocket_send_ack(connectionId, ackId, responseStr1);
1513
+ success = true;
1514
+ } catch (error) {
1515
+ console.error("[ERROR] calling typescript_websocket_send_ack via window.Module:", error);
1516
+ }
1517
+ }
1518
+ if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_send_ack) {
1519
+ try {
1520
+ var responseStr2 = UTF8ToString(responseData);
1521
+ console.log("[C++ -> TS Bridge] Send ack via globalThis.Module", connectionId, ackId);
1522
+ globalThis.Module.typescript_websocket_send_ack(connectionId, ackId, responseStr2);
1523
+ success = true;
1524
+ } catch (error) {
1525
+ console.error("[ERROR] calling typescript_websocket_send_ack via globalThis.Module:", error);
1526
+ }
1527
+ }
1528
+ if (!success) {
1529
+ console.error("[ERROR] TypeScript WebSocket Bridge send ack method not found");
1530
+ }
1531
+ }
1532
+ function js_initialize_typescript_bridge() {
1533
+ console.log("[INIT] Initializing TypeScript WebSocket Bridge integration...");
1534
+ if (typeof window !== "undefined" && window.initializeTypeScriptWebSocketBridge) {
1535
+ try {
1536
+ window.initializeTypeScriptWebSocketBridge();
1537
+ console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via window");
1538
+ } catch (error) {
1539
+ console.warn("[WARNING] Failed to initialize bridge via window:", error);
1540
+ }
1541
+ }
1542
+ if (typeof globalThis !== "undefined" && globalThis.initializeTypeScriptWebSocketBridge) {
1543
+ try {
1544
+ globalThis.initializeTypeScriptWebSocketBridge();
1545
+ console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via globalThis");
1546
+ } catch (error) {
1547
+ console.warn("[WARNING] Failed to initialize bridge via globalThis:", error);
1548
+ }
1549
+ }
1550
+ var bridgeMethods = [
1551
+ "typescript_websocket_connect_request",
1552
+ "typescript_websocket_disconnect_request",
1553
+ "typescript_websocket_subscribe_event",
1554
+ "typescript_websocket_send_message",
1555
+ "typescript_websocket_send_ack"
1556
+ ];
1557
+ var bridgeFound = false;
1558
+ var contexts = [];
1559
+ if (typeof Module !== "undefined") {
1560
+ contexts.push({
1561
+ name: "Module",
1562
+ obj: Module
1563
+ });
1564
+ }
1565
+ if (typeof window !== "undefined" && window.Module) {
1566
+ contexts.push({
1567
+ name: "window.Module",
1568
+ obj: window.Module
1569
+ });
1570
+ }
1571
+ if (typeof globalThis !== "undefined" && globalThis.Module) {
1572
+ contexts.push({
1573
+ name: "globalThis.Module",
1574
+ obj: globalThis.Module
1575
+ });
1576
+ }
1577
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1578
+ try {
1579
+ var _loop = function() {
1580
+ var context = _step.value;
1581
+ var availableMethods = bridgeMethods.filter(function(method) {
1582
+ return typeof context.obj[method] === "function";
1583
+ });
1584
+ if (availableMethods.length > 0) {
1585
+ console.log("[SUCCESS] Bridge methods found in " + context.name + ": " + availableMethods.join(", "));
1586
+ bridgeFound = true;
1587
+ }
1588
+ };
1589
+ for(var _iterator = contexts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
1590
+ } catch (err) {
1591
+ _didIteratorError = true;
1592
+ _iteratorError = err;
1593
+ } finally{
1594
+ try {
1595
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1596
+ _iterator.return();
1597
+ }
1598
+ } finally{
1599
+ if (_didIteratorError) {
1600
+ throw _iteratorError;
1601
+ }
1602
+ }
1603
+ }
1604
+ if (!bridgeFound) {
1605
+ console.warn("[WARNING] No TypeScript WebSocket Bridge methods found in any context");
1606
+ console.log("Available in Module:", typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
1607
+ return k.includes("websocket") || k.includes("typescript");
1608
+ }) : "undefined");
1609
+ }
1610
+ }
1210
1611
  var ExitStatus = function ExitStatus(status) {
1211
1612
  _class_call_check(this, ExitStatus);
1212
1613
  _define_property(this, "name", "ExitStatus");
@@ -7124,7 +7525,13 @@ var Balancy = function() {
7124
7525
  invoke_viiiiiiiiii: invoke_viiiiiiiiii,
7125
7526
  invoke_viiiiiiiiiiiiiii: invoke_viiiiiiiiiiiiiii,
7126
7527
  invoke_viijii: invoke_viijii,
7528
+ js_call_typescript_bridge_connect: js_call_typescript_bridge_connect,
7529
+ js_call_typescript_bridge_disconnect: js_call_typescript_bridge_disconnect,
7530
+ js_call_typescript_bridge_send_ack: js_call_typescript_bridge_send_ack,
7531
+ js_call_typescript_bridge_send_message: js_call_typescript_bridge_send_message,
7532
+ js_call_typescript_bridge_subscribe: js_call_typescript_bridge_subscribe,
7127
7533
  js_fetch: js_fetch,
7534
+ js_initialize_typescript_bridge: js_initialize_typescript_bridge,
7128
7535
  random_get: _random_get
7129
7536
  };
7130
7537
  var wasmExports;
@@ -7171,6 +7578,13 @@ var Balancy = function() {
7171
7578
  Module["__Z29jsbalancyGetDataObjectFullUrlNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE"] = createExportWrapper("_Z29jsbalancyGetDataObjectFullUrlNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE", 2);
7172
7579
  Module["__Z24jsbalancyGetModelUnnyIdsNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEb"] = createExportWrapper("_Z24jsbalancyGetModelUnnyIdsNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEb", 3);
7173
7580
  Module["__Z34jsbalancySystemProfileTrackRevenueidNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE"] = createExportWrapper("_Z34jsbalancySystemProfileTrackRevenueidNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE", 3);
7581
+ Module["__Z23jsbalancyDataObjectLoadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z23jsbalancyDataObjectLoadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7582
+ Module["__Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z30jsbalancyDataObjectViewPreloadNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7583
+ Module["_balancySetUnzipCallback"] = createExportWrapper("balancySetUnzipCallback", 1);
7584
+ Module["__Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_"] = createExportWrapper("_Z23jsbalancyUnzipCompletedNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES5_", 2);
7585
+ Module["__Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE"] = createExportWrapper("_Z23jsbalancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEN10emscripten3valE", 2);
7586
+ Module["_balancySetDataRequestedCallback"] = createExportWrapper("balancySetDataRequestedCallback", 1);
7587
+ Module["_balancyViewAllowOptimization"] = createExportWrapper("balancyViewAllowOptimization", 1);
7174
7588
  Module["_balancyConfigLaunch"] = createExportWrapper("balancyConfigLaunch", 1);
7175
7589
  Module["_balancyConfigClose"] = createExportWrapper("balancyConfigClose", 0);
7176
7590
  Module["_jsbalancyConfigAuth"] = createExportWrapper("jsbalancyConfigAuth", 3);
@@ -7197,6 +7611,8 @@ var Balancy = function() {
7197
7611
  Module["__Z35jsbalancyDailyBonus_claimNextRewardPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z35jsbalancyDailyBonus_claimNextRewardPN7Balancy4Data8BaseDataE", 1);
7198
7612
  Module["__Z38jsbalancyDailyBonus_canClaimNextRewardPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z38jsbalancyDailyBonus_canClaimNextRewardPN7Balancy4Data8BaseDataE", 1);
7199
7613
  Module["__Z47jsbalancyDailyBonus_getSecondsTillTheNextRewardPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z47jsbalancyDailyBonus_getSecondsTillTheNextRewardPN7Balancy4Data8BaseDataE", 1);
7614
+ Module["__Z31jsbalancyBattlePass_claimRewardPN7Balancy4Data8BaseDataEi"] = createExportWrapper("_Z31jsbalancyBattlePass_claimRewardPN7Balancy4Data8BaseDataEi", 2);
7615
+ Module["__Z35jsbalancyBattlePass_getRewardStatusPN7Balancy4Data8BaseDataEi"] = createExportWrapper("_Z35jsbalancyBattlePass_getRewardStatusPN7Balancy4Data8BaseDataEi", 2);
7200
7616
  Module["__Z35jsbalancyOfferGroupInfo_CanPurchasePN7Balancy4Data8BaseDataEPNS_5Utils15JsonBasedObjectE"] = createExportWrapper("_Z35jsbalancyOfferGroupInfo_CanPurchasePN7Balancy4Data8BaseDataEPNS_5Utils15JsonBasedObjectE", 2);
7201
7617
  Module["__Z51jsbalancyOfferInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z51jsbalancyOfferInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE", 1);
7202
7618
  Module["__Z51jsbalancyEventInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE"] = createExportWrapper("_Z51jsbalancyEventInfo_GetSecondsLeftBeforeDeactivationPN7Balancy4Data8BaseDataE", 1);
@@ -7214,9 +7630,14 @@ var Balancy = function() {
7214
7630
  Module["__Z18jsbalancyGetStatusv"] = createExportWrapper("_Z18jsbalancyGetStatusv", 0);
7215
7631
  Module["_balancyGetTimeOffset"] = createExportWrapper("balancyGetTimeOffset", 0);
7216
7632
  Module["_balancySetTimeOffset"] = createExportWrapper("balancySetTimeOffset", 1);
7217
- Module["__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEb"] = createExportWrapper("_Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEb", 3);
7633
+ Module["__Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib"] = createExportWrapper("_Z24jsbalancyGetParsedObjectPN7Balancy5Utils15JsonBasedObjectEib", 4);
7634
+ Module["_emscripten_websocket_on_connection_status"] = createExportWrapper("emscripten_websocket_on_connection_status", 3);
7635
+ Module["_emscripten_websocket_on_socketio_event"] = createExportWrapper("emscripten_websocket_on_socketio_event", 5);
7636
+ Module["_emscripten_websocket_on_socketio_error"] = createExportWrapper("emscripten_websocket_on_socketio_error", 3);
7218
7637
  var _malloc = Module["_malloc"] = createExportWrapper("malloc", 1);
7219
7638
  var ___getTypeName = createExportWrapper("__getTypeName", 1);
7639
+ Module["_downloadSucceededBinary"] = createExportWrapper("downloadSucceededBinary", 3);
7640
+ Module["_fetchSucceededBinary"] = createExportWrapper("fetchSucceededBinary", 3);
7220
7641
  var _free = Module["_free"] = createExportWrapper("free", 1);
7221
7642
  Module["_balancySetLogCallback"] = createExportWrapper("balancySetLogCallback", 1);
7222
7643
  Module["_balancySetInvokeInMainThreadCallback"] = createExportWrapper("balancySetInvokeInMainThreadCallback", 1);
@@ -7241,8 +7662,6 @@ var Balancy = function() {
7241
7662
  Module["_balancyGetBoolArrayParam"] = createExportWrapper("balancyGetBoolArrayParam", 3);
7242
7663
  Module["_balancyGetStringArrayParam"] = createExportWrapper("balancyGetStringArrayParam", 3);
7243
7664
  Module["_balancyFreeStringArray"] = createExportWrapper("balancyFreeStringArray", 2);
7244
- Module["_balancySetDataRequestedCallback"] = createExportWrapper("balancySetDataRequestedCallback", 1);
7245
- Module["_balancyViewAllowOptimization"] = createExportWrapper("balancyViewAllowOptimization", 1);
7246
7665
  Module["_balancyConfigGetStatus"] = createExportWrapper("balancyConfigGetStatus", 0);
7247
7666
  Module["_balancyConfigLoadListOfGames"] = createExportWrapper("balancyConfigLoadListOfGames", 1);
7248
7667
  Module["_balancyConfigAuth"] = createExportWrapper("balancyConfigAuth", 3);
@@ -7293,13 +7712,16 @@ var Balancy = function() {
7293
7712
  Module["_balancyDailyBonus_claimNextReward"] = createExportWrapper("balancyDailyBonus_claimNextReward", 1);
7294
7713
  Module["_balancyDailyBonus_canClaimNextReward"] = createExportWrapper("balancyDailyBonus_canClaimNextReward", 1);
7295
7714
  Module["_balancyDailyBonus_getSecondsTillTheNextReward"] = createExportWrapper("balancyDailyBonus_getSecondsTillTheNextReward", 1);
7715
+ Module["_balancyBattlePass_claimReward"] = createExportWrapper("balancyBattlePass_claimReward", 2);
7716
+ Module["_balancyBattlePass_getRewardStatus"] = createExportWrapper("balancyBattlePass_getRewardStatus", 2);
7296
7717
  Module["_balancySoftPurchaseStoreItem"] = createExportWrapper("balancySoftPurchaseStoreItem", 1);
7297
7718
  Module["_balancySoftPurchaseShopSlot"] = createExportWrapper("balancySoftPurchaseShopSlot", 1);
7298
7719
  Module["_balancySoftPurchaseGameOffer"] = createExportWrapper("balancySoftPurchaseGameOffer", 1);
7299
7720
  Module["_balancySoftPurchaseGameOfferGroup"] = createExportWrapper("balancySoftPurchaseGameOfferGroup", 2);
7721
+ Module["__Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE"] = createExportWrapper("_Z22_balancyWebViewRequestNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_8functionIFvS5_EEE", 2);
7300
7722
  Module["_balancyWebViewRequest"] = createExportWrapper("balancyWebViewRequest", 1);
7301
7723
  Module["_balancyGetProductsIdAndType"] = createExportWrapper("balancyGetProductsIdAndType", 1);
7302
- Module["_balancyGetParsedObject"] = createExportWrapper("balancyGetParsedObject", 2);
7724
+ Module["_balancyGetParsedObject"] = createExportWrapper("balancyGetParsedObject", 3);
7303
7725
  var _fflush = createExportWrapper("fflush", 1);
7304
7726
  var _strerror = createExportWrapper("strerror", 1);
7305
7727
  var _setThrew = createExportWrapper("setThrew", 2);