@apps-in-toss/web-framework 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/chunk-AZQN2M6D.js +63 -0
- package/dist/cli/chunk-PT6B3KQJ.js +209904 -0
- package/dist/cli/lib-GNFDOQZX.js +1007 -0
- package/dist/cli/typescript-WPGJO2BO.js +6 -0
- package/dist/prebuilt/dev.android.js +601 -536
- package/dist/prebuilt/dev.ios.js +599 -534
- package/dist/prebuilt/prod.android.js +337 -433
- package/dist/prebuilt/prod.ios.js +337 -433
- package/dist/prebuilt/prod.json +14 -0
- package/package.json +8 -8
|
@@ -1462,136 +1462,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
1462
1462
|
]);
|
|
1463
1463
|
return backEvent;
|
|
1464
1464
|
}
|
|
1465
|
-
function useBackEvent() {
|
|
1466
|
-
var context2 = (0, import_react9.useContext)(BackEventContext);
|
|
1467
|
-
var handlersRef = (0, import_react9.useRef)(/* @__PURE__ */ new Set()).current;
|
|
1468
|
-
var isVisible = useVisibility();
|
|
1469
|
-
if (context2 == null) {
|
|
1470
|
-
throw new Error("useBackEvent must be used within a BackEventProvider");
|
|
1471
|
-
}
|
|
1472
|
-
var contextAddEventListener = context2.addEventListener;
|
|
1473
|
-
var contextRemoveEventListener = context2.removeEventListener;
|
|
1474
|
-
var addEventListener = (0, import_react9.useCallback)(function() {
|
|
1475
|
-
for (var _len = arguments.length, handlers = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1476
|
-
handlers[_key] = arguments[_key];
|
|
1477
|
-
}
|
|
1478
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1479
|
-
try {
|
|
1480
|
-
for (var _iterator = handlers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1481
|
-
var handler = _step.value;
|
|
1482
|
-
handlersRef.add(handler);
|
|
1483
|
-
contextAddEventListener(handler);
|
|
1484
|
-
}
|
|
1485
|
-
} catch (err) {
|
|
1486
|
-
_didIteratorError = true;
|
|
1487
|
-
_iteratorError = err;
|
|
1488
|
-
} finally {
|
|
1489
|
-
try {
|
|
1490
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1491
|
-
_iterator.return();
|
|
1492
|
-
}
|
|
1493
|
-
} finally {
|
|
1494
|
-
if (_didIteratorError) {
|
|
1495
|
-
throw _iteratorError;
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
}, [
|
|
1500
|
-
contextAddEventListener,
|
|
1501
|
-
handlersRef
|
|
1502
|
-
]);
|
|
1503
|
-
var removeEventListener = (0, import_react9.useCallback)(function() {
|
|
1504
|
-
for (var _len = arguments.length, handlers = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1505
|
-
handlers[_key] = arguments[_key];
|
|
1506
|
-
}
|
|
1507
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1508
|
-
try {
|
|
1509
|
-
for (var _iterator = handlers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1510
|
-
var handler = _step.value;
|
|
1511
|
-
handlersRef.delete(handler);
|
|
1512
|
-
contextRemoveEventListener(handler);
|
|
1513
|
-
}
|
|
1514
|
-
} catch (err) {
|
|
1515
|
-
_didIteratorError = true;
|
|
1516
|
-
_iteratorError = err;
|
|
1517
|
-
} finally {
|
|
1518
|
-
try {
|
|
1519
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1520
|
-
_iterator.return();
|
|
1521
|
-
}
|
|
1522
|
-
} finally {
|
|
1523
|
-
if (_didIteratorError) {
|
|
1524
|
-
throw _iteratorError;
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
}, [
|
|
1529
|
-
contextRemoveEventListener,
|
|
1530
|
-
handlersRef
|
|
1531
|
-
]);
|
|
1532
|
-
(0, import_react9.useEffect)(function() {
|
|
1533
|
-
if (!isVisible) {
|
|
1534
|
-
return;
|
|
1535
|
-
}
|
|
1536
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1537
|
-
try {
|
|
1538
|
-
for (var _iterator = handlersRef[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1539
|
-
var handler = _step.value;
|
|
1540
|
-
contextAddEventListener(handler);
|
|
1541
|
-
}
|
|
1542
|
-
} catch (err) {
|
|
1543
|
-
_didIteratorError = true;
|
|
1544
|
-
_iteratorError = err;
|
|
1545
|
-
} finally {
|
|
1546
|
-
try {
|
|
1547
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1548
|
-
_iterator.return();
|
|
1549
|
-
}
|
|
1550
|
-
} finally {
|
|
1551
|
-
if (_didIteratorError) {
|
|
1552
|
-
throw _iteratorError;
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
return function() {
|
|
1557
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
1558
|
-
try {
|
|
1559
|
-
for (var _iterator2 = handlersRef[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
1560
|
-
var handler2 = _step2.value;
|
|
1561
|
-
contextRemoveEventListener(handler2);
|
|
1562
|
-
}
|
|
1563
|
-
} catch (err) {
|
|
1564
|
-
_didIteratorError2 = true;
|
|
1565
|
-
_iteratorError2 = err;
|
|
1566
|
-
} finally {
|
|
1567
|
-
try {
|
|
1568
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
1569
|
-
_iterator2.return();
|
|
1570
|
-
}
|
|
1571
|
-
} finally {
|
|
1572
|
-
if (_didIteratorError2) {
|
|
1573
|
-
throw _iteratorError2;
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
};
|
|
1578
|
-
}, [
|
|
1579
|
-
contextAddEventListener,
|
|
1580
|
-
contextRemoveEventListener,
|
|
1581
|
-
handlersRef,
|
|
1582
|
-
isVisible
|
|
1583
|
-
]);
|
|
1584
|
-
var backEvent = (0, import_react9.useMemo)(function() {
|
|
1585
|
-
return {
|
|
1586
|
-
addEventListener,
|
|
1587
|
-
removeEventListener
|
|
1588
|
-
};
|
|
1589
|
-
}, [
|
|
1590
|
-
addEventListener,
|
|
1591
|
-
removeEventListener
|
|
1592
|
-
]);
|
|
1593
|
-
return backEvent;
|
|
1594
|
-
}
|
|
1595
1465
|
function useBackEventContext() {
|
|
1596
1466
|
var context2 = (0, import_react9.useContext)(BackEventContext);
|
|
1597
1467
|
if (context2 == null) {
|
|
@@ -10272,18 +10142,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
10272
10142
|
});
|
|
10273
10143
|
|
|
10274
10144
|
// ../../.yarn/__virtual__/@granite-js-react-native-virtual-3bd9b9ab6b/0/cache/@granite-js-react-native-npm-0.1.22-f7a1f119e2-ae5bd16544.zip/node_modules/@granite-js/react-native/src/event/useGraniteEvent.ts
|
|
10275
|
-
|
|
10276
|
-
var backEvent = useBackEvent();
|
|
10277
|
-
var event = (0, import_react58.useMemo)(function() {
|
|
10278
|
-
return new GraniteEvent([
|
|
10279
|
-
new BackEvent(backEvent)
|
|
10280
|
-
]);
|
|
10281
|
-
}, [
|
|
10282
|
-
backEvent
|
|
10283
|
-
]);
|
|
10284
|
-
return event;
|
|
10285
|
-
}
|
|
10286
|
-
var import_react58, BackEvent;
|
|
10145
|
+
var import_react58;
|
|
10287
10146
|
var init_useGraniteEvent = __esm({
|
|
10288
10147
|
"../../.yarn/__virtual__/@granite-js-react-native-virtual-3bd9b9ab6b/0/cache/@granite-js-react-native-npm-0.1.22-f7a1f119e2-ae5bd16544.zip/node_modules/@granite-js/react-native/src/event/useGraniteEvent.ts"() {
|
|
10289
10148
|
init_class_call_check();
|
|
@@ -10293,42 +10152,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
10293
10152
|
import_react58 = __toESM(require_react());
|
|
10294
10153
|
init_abstract();
|
|
10295
10154
|
init_useBackEvent();
|
|
10296
|
-
BackEvent = /* @__PURE__ */ function(GraniteEventDefinition3) {
|
|
10297
|
-
"use strict";
|
|
10298
|
-
_inherits(BackEvent2, GraniteEventDefinition3);
|
|
10299
|
-
var _super = _create_super(BackEvent2);
|
|
10300
|
-
function BackEvent2(backEventControls) {
|
|
10301
|
-
_class_call_check(this, BackEvent2);
|
|
10302
|
-
var _this;
|
|
10303
|
-
_this = _super.call(this);
|
|
10304
|
-
_this.backEventControls = backEventControls;
|
|
10305
|
-
_this.name = "backEvent";
|
|
10306
|
-
_this.ref = {
|
|
10307
|
-
remove: function() {
|
|
10308
|
-
}
|
|
10309
|
-
};
|
|
10310
|
-
return _this;
|
|
10311
|
-
}
|
|
10312
|
-
_create_class(BackEvent2, [
|
|
10313
|
-
{
|
|
10314
|
-
key: "remove",
|
|
10315
|
-
value: function remove() {
|
|
10316
|
-
this.ref.remove();
|
|
10317
|
-
}
|
|
10318
|
-
},
|
|
10319
|
-
{
|
|
10320
|
-
key: "listener",
|
|
10321
|
-
value: function listener(_17, onEvent) {
|
|
10322
|
-
var _this = this;
|
|
10323
|
-
this.backEventControls.addEventListener(onEvent);
|
|
10324
|
-
this.ref.remove = function() {
|
|
10325
|
-
return _this.backEventControls.removeEventListener(onEvent);
|
|
10326
|
-
};
|
|
10327
|
-
}
|
|
10328
|
-
}
|
|
10329
|
-
]);
|
|
10330
|
-
return BackEvent2;
|
|
10331
|
-
}(GraniteEventDefinition);
|
|
10332
10155
|
}
|
|
10333
10156
|
});
|
|
10334
10157
|
|
|
@@ -11930,21 +11753,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
11930
11753
|
function onVisibilityChangedByTransparentServiceWeb(eventParams) {
|
|
11931
11754
|
return appsInTossEvent.addEventListener("onVisibilityChangedByTransparentServiceWeb", eventParams);
|
|
11932
11755
|
}
|
|
11933
|
-
function closeView2() {
|
|
11934
|
-
return _closeView2.apply(this, arguments);
|
|
11935
|
-
}
|
|
11936
|
-
function _closeView2() {
|
|
11937
|
-
_closeView2 = // src/BedrockModule/native-modules/natives/closeView.ts
|
|
11938
|
-
_async_to_generator(function() {
|
|
11939
|
-
return __generator(this, function(_state) {
|
|
11940
|
-
return [
|
|
11941
|
-
2,
|
|
11942
|
-
BedrockModule.closeView()
|
|
11943
|
-
];
|
|
11944
|
-
});
|
|
11945
|
-
});
|
|
11946
|
-
return _closeView2.apply(this, arguments);
|
|
11947
|
-
}
|
|
11948
11756
|
function setIosSwipeGestureEnabled(options) {
|
|
11949
11757
|
return _setIosSwipeGestureEnabled.apply(this, arguments);
|
|
11950
11758
|
}
|
|
@@ -43537,11 +43345,11 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
43537
43345
|
});
|
|
43538
43346
|
|
|
43539
43347
|
// ../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/BedrockModule/native-modules/natives/closeView.ts
|
|
43540
|
-
function
|
|
43541
|
-
return
|
|
43348
|
+
function closeView2() {
|
|
43349
|
+
return _closeView2.apply(this, arguments);
|
|
43542
43350
|
}
|
|
43543
|
-
function
|
|
43544
|
-
|
|
43351
|
+
function _closeView2() {
|
|
43352
|
+
_closeView2 = _async_to_generator(function() {
|
|
43545
43353
|
return __generator(this, function(_state) {
|
|
43546
43354
|
return [
|
|
43547
43355
|
2,
|
|
@@ -43549,7 +43357,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
43549
43357
|
];
|
|
43550
43358
|
});
|
|
43551
43359
|
});
|
|
43552
|
-
return
|
|
43360
|
+
return _closeView2.apply(this, arguments);
|
|
43553
43361
|
}
|
|
43554
43362
|
var init_closeView2 = __esm({
|
|
43555
43363
|
"../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/BedrockModule/native-modules/natives/closeView.ts"() {
|
|
@@ -44486,7 +44294,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
44486
44294
|
return checkoutPayment;
|
|
44487
44295
|
},
|
|
44488
44296
|
closeView: function() {
|
|
44489
|
-
return
|
|
44297
|
+
return closeView2;
|
|
44490
44298
|
},
|
|
44491
44299
|
eventLog: function() {
|
|
44492
44300
|
return eventLog2;
|
|
@@ -46292,6 +46100,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46292
46100
|
return __generator(this, function(_state) {
|
|
46293
46101
|
switch (_state.label) {
|
|
46294
46102
|
case 0:
|
|
46103
|
+
logging.closeButtonClick();
|
|
46295
46104
|
return [
|
|
46296
46105
|
4,
|
|
46297
46106
|
openConfirm({
|
|
@@ -46320,18 +46129,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46320
46129
|
logging,
|
|
46321
46130
|
openConfirm
|
|
46322
46131
|
]);
|
|
46323
|
-
(0, import_react222.useEffect)(function() {
|
|
46324
|
-
var handleAndroidBackEvent = function() {
|
|
46325
|
-
handleGameWebviewClose();
|
|
46326
|
-
return true;
|
|
46327
|
-
};
|
|
46328
|
-
import_react_native229.BackHandler.addEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
46329
|
-
return function() {
|
|
46330
|
-
return import_react_native229.BackHandler.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
46331
|
-
};
|
|
46332
|
-
}, [
|
|
46333
|
-
handleGameWebviewClose
|
|
46334
|
-
]);
|
|
46335
46132
|
return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(import_jsx_runtime226.Fragment, {
|
|
46336
46133
|
children: [
|
|
46337
46134
|
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)(PageNavbar, {
|
|
@@ -46357,7 +46154,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46357
46154
|
fixedRightButton: initialAccessoryButton,
|
|
46358
46155
|
onPressDots: openMoreButtonBottomSheet,
|
|
46359
46156
|
onPressClose: function() {
|
|
46360
|
-
logging.closeButtonClick();
|
|
46361
46157
|
handleGameWebviewClose();
|
|
46362
46158
|
},
|
|
46363
46159
|
theme: "dark"
|
|
@@ -46367,7 +46163,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46367
46163
|
});
|
|
46368
46164
|
}
|
|
46369
46165
|
function PartnerWebviewNavigationBar(param) {
|
|
46370
|
-
var
|
|
46166
|
+
var onBackButtonClick = param.onBackButtonClick, onHomeButtonClick = param.onHomeButtonClick;
|
|
46371
46167
|
var globals = getAppsInTossGlobals();
|
|
46372
46168
|
var captureExitLog = useCaptureExitLog().captureExitLog;
|
|
46373
46169
|
var logging = useNavigationBarLogging();
|
|
@@ -46379,13 +46175,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46379
46175
|
var _parsedNavigationBar_withBackButton;
|
|
46380
46176
|
var withBackButton = (_parsedNavigationBar_withBackButton = parsedNavigationBar === null || parsedNavigationBar === void 0 ? void 0 : parsedNavigationBar.withBackButton) !== null && _parsedNavigationBar_withBackButton !== void 0 ? _parsedNavigationBar_withBackButton : true;
|
|
46381
46177
|
var initialAccessoryButton = parsedNavigationBar === null || parsedNavigationBar === void 0 ? void 0 : parsedNavigationBar.initialAccessoryButton;
|
|
46382
|
-
var handlePressTitle = (0, import_react224.useCallback)(function() {
|
|
46383
|
-
logging.homeButtonClick();
|
|
46384
|
-
handleHomeIconButtonClick();
|
|
46385
|
-
}, [
|
|
46386
|
-
handleHomeIconButtonClick,
|
|
46387
|
-
logging
|
|
46388
|
-
]);
|
|
46389
46178
|
var handleClose = (0, import_react224.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
|
|
46390
46179
|
var isConfirmed;
|
|
46391
46180
|
return __generator(this, function(_state) {
|
|
@@ -46427,103 +46216,20 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46427
46216
|
icon: toIcon(globals.brandIcon),
|
|
46428
46217
|
onPressDots: openMoreButtonBottomSheet,
|
|
46429
46218
|
contentVisible: true,
|
|
46430
|
-
onPressTitle: withHomeButton ?
|
|
46219
|
+
onPressTitle: withHomeButton ? onHomeButtonClick : void 0,
|
|
46431
46220
|
onPressClose: handleClose,
|
|
46432
46221
|
withHome: withHomeButton,
|
|
46433
46222
|
fixedRightButton: initialAccessoryButton,
|
|
46434
46223
|
children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(NavigationLeft2, {
|
|
46435
46224
|
visible: withBackButton,
|
|
46436
46225
|
children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(NavigationBackButton2, {
|
|
46437
|
-
onPress:
|
|
46226
|
+
onPress: onBackButtonClick,
|
|
46438
46227
|
canGoBack: false
|
|
46439
46228
|
})
|
|
46440
46229
|
})
|
|
46441
46230
|
})
|
|
46442
46231
|
});
|
|
46443
46232
|
}
|
|
46444
|
-
function mergeRefs4() {
|
|
46445
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46446
|
-
refs[_key] = arguments[_key];
|
|
46447
|
-
}
|
|
46448
|
-
return function(value) {
|
|
46449
|
-
refs.forEach(function(ref) {
|
|
46450
|
-
if (typeof ref === "function") {
|
|
46451
|
-
ref(value);
|
|
46452
|
-
} else if (ref != null) {
|
|
46453
|
-
ref.current = value;
|
|
46454
|
-
}
|
|
46455
|
-
});
|
|
46456
|
-
};
|
|
46457
|
-
}
|
|
46458
|
-
function reducer(state, action) {
|
|
46459
|
-
switch (action.type) {
|
|
46460
|
-
case "NAVIGATION_CHANGE": {
|
|
46461
|
-
var url = action.url, canGoForward = action.canGoForward;
|
|
46462
|
-
if (state.stack.length === 0) {
|
|
46463
|
-
return {
|
|
46464
|
-
stack: [
|
|
46465
|
-
url
|
|
46466
|
-
],
|
|
46467
|
-
index: 0
|
|
46468
|
-
};
|
|
46469
|
-
}
|
|
46470
|
-
var stack = state.stack, index = state.index;
|
|
46471
|
-
var cur = stack[index];
|
|
46472
|
-
if (url === cur) {
|
|
46473
|
-
return state;
|
|
46474
|
-
}
|
|
46475
|
-
var prev = index > 0 ? stack[index - 1] : void 0;
|
|
46476
|
-
var next = index < stack.length - 1 ? stack[index + 1] : void 0;
|
|
46477
|
-
if (prev && url === prev && canGoForward) {
|
|
46478
|
-
return _object_spread_props(_object_spread({}, state), {
|
|
46479
|
-
index: index - 1
|
|
46480
|
-
});
|
|
46481
|
-
}
|
|
46482
|
-
if (next && url === next) {
|
|
46483
|
-
return _object_spread_props(_object_spread({}, state), {
|
|
46484
|
-
index: index + 1
|
|
46485
|
-
});
|
|
46486
|
-
}
|
|
46487
|
-
var base = stack.slice(0, index + 1);
|
|
46488
|
-
var nextStack = _to_consumable_array(base).concat([
|
|
46489
|
-
url
|
|
46490
|
-
]);
|
|
46491
|
-
return {
|
|
46492
|
-
stack: nextStack,
|
|
46493
|
-
index: nextStack.length - 1
|
|
46494
|
-
};
|
|
46495
|
-
}
|
|
46496
|
-
default:
|
|
46497
|
-
return state;
|
|
46498
|
-
}
|
|
46499
|
-
}
|
|
46500
|
-
function useWebViewHistory() {
|
|
46501
|
-
var _useReducer = _sliced_to_array((0, import_react225.useReducer)(reducer, INITIAL_STATE), 2), state = _useReducer[0], dispatch = _useReducer[1];
|
|
46502
|
-
var onNavigationStateChange = (0, import_react225.useCallback)(function(param) {
|
|
46503
|
-
var url = param.url, canGoForward2 = param.canGoForward;
|
|
46504
|
-
dispatch({
|
|
46505
|
-
type: "NAVIGATION_CHANGE",
|
|
46506
|
-
url,
|
|
46507
|
-
canGoForward: canGoForward2
|
|
46508
|
-
});
|
|
46509
|
-
}, []);
|
|
46510
|
-
var _useMemo2 = (0, import_react225.useMemo)(function() {
|
|
46511
|
-
var canBack = state.index > 0;
|
|
46512
|
-
var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
|
|
46513
|
-
return {
|
|
46514
|
-
canGoBack: canBack,
|
|
46515
|
-
canGoForward: canFwd
|
|
46516
|
-
};
|
|
46517
|
-
}, [
|
|
46518
|
-
state.index,
|
|
46519
|
-
state.stack.length
|
|
46520
|
-
]), canGoBack = _useMemo2.canGoBack, canGoForward = _useMemo2.canGoForward;
|
|
46521
|
-
return {
|
|
46522
|
-
onNavigationStateChange,
|
|
46523
|
-
canGoBack,
|
|
46524
|
-
canGoForward
|
|
46525
|
-
};
|
|
46526
|
-
}
|
|
46527
46233
|
function serializeError(error) {
|
|
46528
46234
|
return JSON.stringify(error, function(_17, value) {
|
|
46529
46235
|
if (_instanceof1(value, Error)) {
|
|
@@ -46584,8 +46290,8 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46584
46290
|
}
|
|
46585
46291
|
function useBridgeHandler(param) {
|
|
46586
46292
|
var onMessage = param.onMessage, constantHandlerMap = param.constantHandlerMap, asyncHandlerMap = param.asyncHandlerMap, eventListenerMap = param.eventListenerMap, originalInjectedJavaScript = param.injectedJavaScript;
|
|
46587
|
-
var ref = (0,
|
|
46588
|
-
var injectedJavaScript = (0,
|
|
46293
|
+
var ref = (0, import_react225.useRef)(null);
|
|
46294
|
+
var injectedJavaScript = (0, import_react225.useMemo)(function() {
|
|
46589
46295
|
return [
|
|
46590
46296
|
"window.__CONSTANT_HANDLER_MAP = ".concat(JSON.stringify(Object.entries(constantHandlerMap).reduce(function(acc, param2) {
|
|
46591
46297
|
var _param = _sliced_to_array(param2, 2), key = _param[0], value = _param[1];
|
|
@@ -46612,7 +46318,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46612
46318
|
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.injectJavaScript("\n window.__GRANITE_NATIVE_EMITTER.emit('".concat(functionName, "/onError/").concat(eventId, "', ").concat(serializedError, ");\n "));
|
|
46613
46319
|
};
|
|
46614
46320
|
};
|
|
46615
|
-
var $onMessage = (0,
|
|
46321
|
+
var $onMessage = (0, import_react225.useCallback)(
|
|
46616
46322
|
function() {
|
|
46617
46323
|
var _ref = _async_to_generator(function(e62) {
|
|
46618
46324
|
var data, _eventListenerMap_data_functionName, handleOnEvent, handleOnError, remove, key, remove1, _ref_current;
|
|
@@ -46682,6 +46388,229 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46682
46388
|
onMessage: $onMessage
|
|
46683
46389
|
};
|
|
46684
46390
|
}
|
|
46391
|
+
function reducer(state, action) {
|
|
46392
|
+
switch (action.type) {
|
|
46393
|
+
case "NAVIGATION_CHANGE": {
|
|
46394
|
+
var url = action.url, canGoForward = action.canGoForward;
|
|
46395
|
+
if (state.stack.length === 0) {
|
|
46396
|
+
return {
|
|
46397
|
+
stack: [
|
|
46398
|
+
url
|
|
46399
|
+
],
|
|
46400
|
+
index: 0
|
|
46401
|
+
};
|
|
46402
|
+
}
|
|
46403
|
+
var stack = state.stack, index = state.index;
|
|
46404
|
+
var cur = stack[index];
|
|
46405
|
+
if (url === cur) {
|
|
46406
|
+
return state;
|
|
46407
|
+
}
|
|
46408
|
+
var prev = index > 0 ? stack[index - 1] : void 0;
|
|
46409
|
+
var next = index < stack.length - 1 ? stack[index + 1] : void 0;
|
|
46410
|
+
if (prev && url === prev && canGoForward) {
|
|
46411
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
46412
|
+
index: index - 1
|
|
46413
|
+
});
|
|
46414
|
+
}
|
|
46415
|
+
if (next && url === next) {
|
|
46416
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
46417
|
+
index: index + 1
|
|
46418
|
+
});
|
|
46419
|
+
}
|
|
46420
|
+
var base = stack.slice(0, index + 1);
|
|
46421
|
+
var nextStack = _to_consumable_array(base).concat([
|
|
46422
|
+
url
|
|
46423
|
+
]);
|
|
46424
|
+
return {
|
|
46425
|
+
stack: nextStack,
|
|
46426
|
+
index: nextStack.length - 1
|
|
46427
|
+
};
|
|
46428
|
+
}
|
|
46429
|
+
default:
|
|
46430
|
+
return state;
|
|
46431
|
+
}
|
|
46432
|
+
}
|
|
46433
|
+
function useWebViewHistory() {
|
|
46434
|
+
var _useReducer = _sliced_to_array((0, import_react227.useReducer)(reducer, INITIAL_STATE), 2), state = _useReducer[0], dispatch = _useReducer[1];
|
|
46435
|
+
var onNavigationStateChange = (0, import_react227.useCallback)(function(param) {
|
|
46436
|
+
var url = param.url, canGoForward2 = param.canGoForward;
|
|
46437
|
+
dispatch({
|
|
46438
|
+
type: "NAVIGATION_CHANGE",
|
|
46439
|
+
url,
|
|
46440
|
+
canGoForward: canGoForward2
|
|
46441
|
+
});
|
|
46442
|
+
}, []);
|
|
46443
|
+
var _useMemo3 = (0, import_react227.useMemo)(function() {
|
|
46444
|
+
var canBack = state.index > 0;
|
|
46445
|
+
var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
|
|
46446
|
+
return {
|
|
46447
|
+
canGoBack: canBack,
|
|
46448
|
+
canGoForward: canFwd
|
|
46449
|
+
};
|
|
46450
|
+
}, [
|
|
46451
|
+
state.index,
|
|
46452
|
+
state.stack.length
|
|
46453
|
+
]), canGoBack = _useMemo3.canGoBack, canGoForward = _useMemo3.canGoForward;
|
|
46454
|
+
return {
|
|
46455
|
+
onNavigationStateChange,
|
|
46456
|
+
hasHistory: canGoBack,
|
|
46457
|
+
canGoForward
|
|
46458
|
+
};
|
|
46459
|
+
}
|
|
46460
|
+
function useWebBackHandler(webViewRef) {
|
|
46461
|
+
var captureExitLog = useCaptureExitLog().captureExitLog;
|
|
46462
|
+
var _useWebViewHistory = useWebViewHistory(), hasHistory = _useWebViewHistory.hasHistory, onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
|
|
46463
|
+
var _useBackEventState = useBackEventState(), webBackHandlersRef = _useBackEventState.handlersRef, hasWebBackEvent = _useBackEventState.hasBackEvent, addWebBackEventListener = _useBackEventState.addEventListener, removeWebBackEventListener = _useBackEventState.removeEventListener;
|
|
46464
|
+
var logging = useNavigationBarLogging();
|
|
46465
|
+
var openConfirm = useDialog().openConfirm;
|
|
46466
|
+
var global2 = getAppsInTossGlobals();
|
|
46467
|
+
var addEventListener = (0, import_react226.useCallback)(function(handler) {
|
|
46468
|
+
addWebBackEventListener(handler);
|
|
46469
|
+
}, [
|
|
46470
|
+
addWebBackEventListener
|
|
46471
|
+
]);
|
|
46472
|
+
var removeEventListener = (0, import_react226.useCallback)(function(handler) {
|
|
46473
|
+
removeWebBackEventListener(handler);
|
|
46474
|
+
}, [
|
|
46475
|
+
removeWebBackEventListener
|
|
46476
|
+
]);
|
|
46477
|
+
var handleWebBack = (0, import_react226.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
|
|
46478
|
+
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, handler, _webViewRef_current, isConfirmed;
|
|
46479
|
+
return __generator(this, function(_state) {
|
|
46480
|
+
switch (_state.label) {
|
|
46481
|
+
case 0:
|
|
46482
|
+
if (hasWebBackEvent) {
|
|
46483
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
46484
|
+
try {
|
|
46485
|
+
for (_iterator = webBackHandlersRef[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
46486
|
+
handler = _step.value;
|
|
46487
|
+
handler();
|
|
46488
|
+
}
|
|
46489
|
+
} catch (err) {
|
|
46490
|
+
_didIteratorError = true;
|
|
46491
|
+
_iteratorError = err;
|
|
46492
|
+
} finally {
|
|
46493
|
+
try {
|
|
46494
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
46495
|
+
_iterator.return();
|
|
46496
|
+
}
|
|
46497
|
+
} finally {
|
|
46498
|
+
if (_didIteratorError) {
|
|
46499
|
+
throw _iteratorError;
|
|
46500
|
+
}
|
|
46501
|
+
}
|
|
46502
|
+
}
|
|
46503
|
+
return [
|
|
46504
|
+
2
|
|
46505
|
+
];
|
|
46506
|
+
}
|
|
46507
|
+
if (!hasHistory) return [
|
|
46508
|
+
3,
|
|
46509
|
+
1
|
|
46510
|
+
];
|
|
46511
|
+
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(HISTORY_BACK_SCRIPT);
|
|
46512
|
+
return [
|
|
46513
|
+
3,
|
|
46514
|
+
3
|
|
46515
|
+
];
|
|
46516
|
+
case 1:
|
|
46517
|
+
return [
|
|
46518
|
+
4,
|
|
46519
|
+
openConfirm({
|
|
46520
|
+
title: "".concat(josa(global2.brandDisplayName, "\uC744/\uB97C"), " \uC885\uB8CC\uD560\uAE4C\uC694?"),
|
|
46521
|
+
leftButton: "\uCDE8\uC18C",
|
|
46522
|
+
rightButton: "\uC885\uB8CC\uD558\uAE30",
|
|
46523
|
+
closeOnDimmerClick: true,
|
|
46524
|
+
onEntered: logging.closePopupShow
|
|
46525
|
+
})
|
|
46526
|
+
];
|
|
46527
|
+
case 2:
|
|
46528
|
+
isConfirmed = _state.sent();
|
|
46529
|
+
logging.closePopupCtaClick(isConfirmed);
|
|
46530
|
+
if (isConfirmed) {
|
|
46531
|
+
captureExitLog(Date.now());
|
|
46532
|
+
closeView();
|
|
46533
|
+
}
|
|
46534
|
+
_state.label = 3;
|
|
46535
|
+
case 3:
|
|
46536
|
+
return [
|
|
46537
|
+
2
|
|
46538
|
+
];
|
|
46539
|
+
}
|
|
46540
|
+
});
|
|
46541
|
+
}), [
|
|
46542
|
+
captureExitLog,
|
|
46543
|
+
global2.brandDisplayName,
|
|
46544
|
+
hasHistory,
|
|
46545
|
+
hasWebBackEvent,
|
|
46546
|
+
webBackHandlersRef,
|
|
46547
|
+
logging,
|
|
46548
|
+
openConfirm,
|
|
46549
|
+
webViewRef
|
|
46550
|
+
]);
|
|
46551
|
+
var handleWebHome = (0, import_react226.useCallback)(function() {
|
|
46552
|
+
var _webViewRef_current;
|
|
46553
|
+
logging.homeButtonClick();
|
|
46554
|
+
if (hasWebBackEvent) {
|
|
46555
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
46556
|
+
try {
|
|
46557
|
+
for (var _iterator = webBackHandlersRef[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
46558
|
+
var handler = _step.value;
|
|
46559
|
+
handler();
|
|
46560
|
+
}
|
|
46561
|
+
} catch (err) {
|
|
46562
|
+
_didIteratorError = true;
|
|
46563
|
+
_iteratorError = err;
|
|
46564
|
+
} finally {
|
|
46565
|
+
try {
|
|
46566
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
46567
|
+
_iterator.return();
|
|
46568
|
+
}
|
|
46569
|
+
} finally {
|
|
46570
|
+
if (_didIteratorError) {
|
|
46571
|
+
throw _iteratorError;
|
|
46572
|
+
}
|
|
46573
|
+
}
|
|
46574
|
+
}
|
|
46575
|
+
return;
|
|
46576
|
+
}
|
|
46577
|
+
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(HISTORY_HOME_SCRIPT);
|
|
46578
|
+
}, [
|
|
46579
|
+
hasWebBackEvent,
|
|
46580
|
+
webBackHandlersRef,
|
|
46581
|
+
logging,
|
|
46582
|
+
webViewRef
|
|
46583
|
+
]);
|
|
46584
|
+
return (0, import_react226.useMemo)(function() {
|
|
46585
|
+
return {
|
|
46586
|
+
addEventListener,
|
|
46587
|
+
removeEventListener,
|
|
46588
|
+
handleWebBack,
|
|
46589
|
+
handleWebHome,
|
|
46590
|
+
onNavigationStateChange
|
|
46591
|
+
};
|
|
46592
|
+
}, [
|
|
46593
|
+
addEventListener,
|
|
46594
|
+
removeEventListener,
|
|
46595
|
+
handleWebBack,
|
|
46596
|
+
handleWebHome,
|
|
46597
|
+
onNavigationStateChange
|
|
46598
|
+
]);
|
|
46599
|
+
}
|
|
46600
|
+
function mergeRefs4() {
|
|
46601
|
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46602
|
+
refs[_key] = arguments[_key];
|
|
46603
|
+
}
|
|
46604
|
+
return function(value) {
|
|
46605
|
+
refs.forEach(function(ref) {
|
|
46606
|
+
if (typeof ref === "function") {
|
|
46607
|
+
ref(value);
|
|
46608
|
+
} else if (ref != null) {
|
|
46609
|
+
ref.current = value;
|
|
46610
|
+
}
|
|
46611
|
+
});
|
|
46612
|
+
};
|
|
46613
|
+
}
|
|
46685
46614
|
function convertToAndroidStyleScale(fontScale, platform) {
|
|
46686
46615
|
if (platform === "android") {
|
|
46687
46616
|
if (fontScale <= 1) {
|
|
@@ -46828,7 +46757,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46828
46757
|
var batteryModePreference = param.batteryModePreference, colorPreference = param.colorPreference, locale = param.locale, navbarPreference = param.navbarPreference, pureSafeArea = param.pureSafeArea, safeArea = param.safeArea, safeAreaBottomTransparency = param.safeAreaBottomTransparency;
|
|
46829
46758
|
var platform = getPlatformOS();
|
|
46830
46759
|
var appVersion = getTossAppVersion();
|
|
46831
|
-
var fontScale = (0,
|
|
46760
|
+
var fontScale = (0, import_react_native232.useWindowDimensions)().fontScale;
|
|
46832
46761
|
var platformString = platform === "ios" ? "iPhone" : "Android";
|
|
46833
46762
|
var fontA11y = mapFontScaleToCategory(fontScale, platform);
|
|
46834
46763
|
var normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
|
|
@@ -46894,7 +46823,8 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46894
46823
|
if (!TYPES.includes(type)) {
|
|
46895
46824
|
throw new Error("Invalid WebView type: '".concat(type, "'"));
|
|
46896
46825
|
}
|
|
46897
|
-
var
|
|
46826
|
+
var webViewRef = (0, import_react218.useRef)(null);
|
|
46827
|
+
var webBackHandler = useWebBackHandler(webViewRef);
|
|
46898
46828
|
var uri = (0, import_react218.useMemo)(function() {
|
|
46899
46829
|
return getWebViewUri(local);
|
|
46900
46830
|
}, [
|
|
@@ -46921,12 +46851,11 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
46921
46851
|
});
|
|
46922
46852
|
},
|
|
46923
46853
|
backEvent: function(param) {
|
|
46924
|
-
var onEvent = param.onEvent
|
|
46925
|
-
|
|
46926
|
-
|
|
46927
|
-
|
|
46928
|
-
|
|
46929
|
-
});
|
|
46854
|
+
var onEvent = param.onEvent;
|
|
46855
|
+
webBackHandler.addEventListener(onEvent);
|
|
46856
|
+
return function() {
|
|
46857
|
+
webBackHandler.removeEventListener(onEvent);
|
|
46858
|
+
};
|
|
46930
46859
|
},
|
|
46931
46860
|
entryMessageExited: function(param) {
|
|
46932
46861
|
var onEvent = param.onEvent, onError2 = param.onError;
|
|
@@ -47064,8 +46993,21 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47064
46993
|
var userAgent = useCreateUserAgent({
|
|
47065
46994
|
colorPreference: "light"
|
|
47066
46995
|
});
|
|
46996
|
+
var refs = mergeRefs4(handler.ref, webViewRef);
|
|
46997
|
+
(0, import_react218.useEffect)(function() {
|
|
46998
|
+
var callback = function() {
|
|
46999
|
+
webBackHandler.handleWebBack();
|
|
47000
|
+
return true;
|
|
47001
|
+
};
|
|
47002
|
+
import_react_native223.BackHandler.addEventListener("hardwareBackPress", callback);
|
|
47003
|
+
return function() {
|
|
47004
|
+
return import_react_native223.BackHandler.removeEventListener("hardwareBackPress", callback);
|
|
47005
|
+
};
|
|
47006
|
+
}, [
|
|
47007
|
+
webBackHandler
|
|
47008
|
+
]);
|
|
47067
47009
|
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(BaseWebView, _object_spread_props(_object_spread({
|
|
47068
|
-
ref:
|
|
47010
|
+
ref: refs
|
|
47069
47011
|
}, props, headerPropForExternalWebView), {
|
|
47070
47012
|
source: {
|
|
47071
47013
|
uri,
|
|
@@ -47074,6 +47016,16 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47074
47016
|
"User-Agent": userAgent
|
|
47075
47017
|
}
|
|
47076
47018
|
},
|
|
47019
|
+
onHomeButtonClick: webBackHandler.handleWebHome,
|
|
47020
|
+
onBackButtonClick: webBackHandler.handleWebBack,
|
|
47021
|
+
onNavigationStateChange: function(event) {
|
|
47022
|
+
var _props_onNavigationStateChange;
|
|
47023
|
+
if (event.url) {
|
|
47024
|
+
trackScreen(event.url);
|
|
47025
|
+
}
|
|
47026
|
+
(_props_onNavigationStateChange = props.onNavigationStateChange) === null || _props_onNavigationStateChange === void 0 ? void 0 : _props_onNavigationStateChange.call(props, event);
|
|
47027
|
+
webBackHandler.onNavigationStateChange(event);
|
|
47028
|
+
},
|
|
47077
47029
|
userAgent: import_react_native223.Platform.OS === "ios" ? userAgent : void 0,
|
|
47078
47030
|
sharedCookiesEnabled: true,
|
|
47079
47031
|
webviewDebuggingEnabled: webViewDebuggingEnabled,
|
|
@@ -47085,7 +47037,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47085
47037
|
allowsBackForwardNavigationGestures
|
|
47086
47038
|
}));
|
|
47087
47039
|
}
|
|
47088
|
-
var import_react_native207, import_react209, import_react210, import_react211, import_react212, import_jsx_runtime218, import_react213, import_react214, import_react_native214, import_react215, import_jsx_runtime219, import_react216, import_react_native218, import_jsx_runtime220, import_react217, import_react_native221, import_jsx_runtime221, import_jsx_runtime222, import_jsx_runtime223, import_react218, import_react_native223, import_react219, import_react_native224, import_react220, import_react_native225, import_react221, import_jsx_runtime224, import_jsx_runtime225, import_react222, import_react_native229, import_jsx_runtime226, import_jsx_runtime227, import_react223,
|
|
47040
|
+
var import_react_native207, import_react209, import_react210, import_react211, import_react212, import_jsx_runtime218, import_react213, import_react214, import_react_native214, import_react215, import_jsx_runtime219, import_react216, import_react_native218, import_jsx_runtime220, import_react217, import_react_native221, import_jsx_runtime221, import_jsx_runtime222, import_jsx_runtime223, import_react218, import_react_native223, import_react219, import_react_native224, import_react220, import_react_native225, import_react221, import_jsx_runtime224, import_jsx_runtime225, import_react222, import_react_native229, import_jsx_runtime226, import_jsx_runtime227, import_react223, import_react224, import_jsx_runtime228, import_jsx_runtime229, import_react225, import_react226, import_react227, import_react_native232, import_react228, import_react229, import_jsx_runtime230, env, EXIT_IMPRESSION_LOG_NAME, EXIT_IMPRESSION_SCHEMA_ID, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, UPDATE_SCHEME, NAVI_BAR_IMPRESSION_SCHEMA_ID, NAVI_BAR_IMPRESSION_LOG_NAME, CLOSE_POPUP_SHOW_SCHEMA_ID, CLOSE_POPUP_SHOW_LOG_NAME, CLOSE_BUTTON_CLICK_SCHEMA_ID, CLOSE_BUTTON_CLICK_LOG_NAME, CLOSE_POPUP_CTA_CLICK_SCHEMA_ID, CLOSE_POPUP_CTA_CLICK_LOG_NAME, HOME_BUTTON_CLICK_SCHEMA_ID, HOME_BUTTON_CLICK_LOG_NAME, BOTTOM_SHEET_SCHEMA_ID, BOTTOM_SHEET_LOG_NAME, BOTTOM_SHEET_OPEN_SCHEMA_ID, BOTTOM_SHEET_OPEN_LOG_NAME, BOTTOM_SHEET_CLOSE_CLICK_SCHEMA_ID, BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME, BOTTOM_SHEET_MENU_CLICK_SCHEMA_ID, BOTTOM_SHEET_MENU_CLICK_LOG_NAME, SHARE_SCHEME_REFERRER, APP_SHARE_MENU_INFO, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, UPDATE_DIALOG_SCHEMA_ID, UPDATE_DIALOG_LOG_NAME, UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID, UPDATE_DIALOG_CTA_CLICK_LOG_NAME, APP_BRIDGE_METHOD_NAME, MIN_VERSION, AppsInToss, GAME_PROFILE_WEBVIEW_URL, GAME_CENTER_MIN_VERSION3, useGameProfileToast, DEFAULT_ERROR, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useGameCenterProfile, Z_INDEX, GameProfile, overlayStyle, GameWebView, PartnerWebView, globalEventListenerMap, INITIAL_STATE, HISTORY_BACK_SCRIPT, HISTORY_HOME_SCRIPT, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer3, trackScreen, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
|
|
47089
47041
|
var init_dist8 = __esm({
|
|
47090
47042
|
"../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.js"() {
|
|
47091
47043
|
"use strict";
|
|
@@ -47188,26 +47140,30 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47188
47140
|
import_react_native229 = __toESM(require_react_native(), 1);
|
|
47189
47141
|
import_jsx_runtime226 = __toESM(require_jsx_runtime(), 1);
|
|
47190
47142
|
import_jsx_runtime227 = __toESM(require_jsx_runtime(), 1);
|
|
47191
|
-
init_dist6();
|
|
47192
47143
|
init_react_native_webview();
|
|
47193
47144
|
import_react223 = __toESM(require_react(), 1);
|
|
47194
|
-
import_react_native230 = __toESM(require_react_native(), 1);
|
|
47195
47145
|
init_src3();
|
|
47196
47146
|
init_esm8();
|
|
47197
47147
|
init_private2();
|
|
47198
47148
|
init_dist7();
|
|
47199
47149
|
import_react224 = __toESM(require_react(), 1);
|
|
47200
47150
|
import_jsx_runtime228 = __toESM(require_jsx_runtime(), 1);
|
|
47151
|
+
import_jsx_runtime229 = __toESM(require_jsx_runtime(), 1);
|
|
47201
47152
|
import_react225 = __toESM(require_react(), 1);
|
|
47202
|
-
init_dist6();
|
|
47203
47153
|
init_src3();
|
|
47204
|
-
|
|
47154
|
+
init_esm8();
|
|
47155
|
+
init_dist7();
|
|
47205
47156
|
import_react226 = __toESM(require_react(), 1);
|
|
47157
|
+
import_react227 = __toESM(require_react(), 1);
|
|
47206
47158
|
init_dist6();
|
|
47207
|
-
|
|
47159
|
+
import_react_native232 = __toESM(require_react_native(), 1);
|
|
47160
|
+
init_dist6();
|
|
47161
|
+
init_src3();
|
|
47162
|
+
import_react228 = __toESM(require_react(), 1);
|
|
47163
|
+
init_src3();
|
|
47164
|
+
import_react229 = __toESM(require_react(), 1);
|
|
47208
47165
|
init_dist6();
|
|
47209
47166
|
init_src3();
|
|
47210
|
-
import_react227 = __toESM(require_react(), 1);
|
|
47211
47167
|
import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
|
|
47212
47168
|
init_dist3();
|
|
47213
47169
|
init_dist6();
|
|
@@ -47709,127 +47665,34 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47709
47665
|
]
|
|
47710
47666
|
});
|
|
47711
47667
|
});
|
|
47712
|
-
|
|
47713
|
-
|
|
47714
|
-
|
|
47715
|
-
|
|
47716
|
-
extractDateFromUUIDv7 = function(uuid) {
|
|
47717
|
-
var timestampHex = uuid.split("-").join("").slice(0, 12);
|
|
47718
|
-
var timestamp = Number.parseInt(timestampHex, 16);
|
|
47719
|
-
return new Date(timestamp);
|
|
47720
|
-
};
|
|
47721
|
-
getGroupId = function(url) {
|
|
47722
|
-
try {
|
|
47723
|
-
var urlObject = new URL(url);
|
|
47724
|
-
return {
|
|
47725
|
-
groupId: urlObject.pathname,
|
|
47726
|
-
search: urlObject.search.startsWith("?") ? urlObject.search.substring(1) : urlObject.search
|
|
47727
|
-
};
|
|
47728
|
-
} catch (e62) {
|
|
47729
|
-
return {
|
|
47730
|
-
groupId: "unknown",
|
|
47731
|
-
search: "unknown"
|
|
47732
|
-
};
|
|
47733
|
-
}
|
|
47734
|
-
};
|
|
47735
|
-
getReferrer3 = function() {
|
|
47736
|
-
try {
|
|
47737
|
-
var referrer2 = new URL(getSchemeUri());
|
|
47738
|
-
return referrer2.searchParams.get("referrer");
|
|
47739
|
-
} catch (e62) {
|
|
47740
|
-
return "";
|
|
47741
|
-
}
|
|
47742
|
-
};
|
|
47743
|
-
trackScreen = function(url) {
|
|
47744
|
-
var _getGroupId = getGroupId(url), groupId = _getGroupId.groupId, search = _getGroupId.search;
|
|
47745
|
-
var log = {
|
|
47746
|
-
log_type: "screen",
|
|
47747
|
-
log_name: "".concat(groupId, "::screen"),
|
|
47748
|
-
params: {
|
|
47749
|
-
search,
|
|
47750
|
-
referrer: getReferrer3(),
|
|
47751
|
-
deployment_id: env.getDeploymentId(),
|
|
47752
|
-
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
47753
|
-
}
|
|
47754
|
-
};
|
|
47755
|
-
return eventLog(log);
|
|
47756
|
-
};
|
|
47757
|
-
PartnerWebView = /* @__PURE__ */ (0, import_react223.forwardRef)(function PartnerWebViewScreen(webViewProps, ref) {
|
|
47758
|
-
var webViewRef = (0, import_react223.useRef)(null);
|
|
47759
|
-
var refs = mergeRefs4(ref, webViewRef);
|
|
47760
|
-
var captureExitLog = useCaptureExitLog().captureExitLog;
|
|
47761
|
-
var _useWebViewHistory = useWebViewHistory(), canGoBack = _useWebViewHistory.canGoBack, onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
|
|
47762
|
-
var historyBackScript = "\n (function() {\n window.history.back();\n true;\n })();\n ";
|
|
47763
|
-
var historyHomeScript = "\n (function() {\n window.location.href = '/';\n true;\n })();\n ";
|
|
47764
|
-
var handleBackEvent = (0, import_react223.useCallback)(function() {
|
|
47765
|
-
if (canGoBack) {
|
|
47766
|
-
var _webViewRef_current;
|
|
47767
|
-
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(historyBackScript);
|
|
47768
|
-
} else {
|
|
47769
|
-
captureExitLog(Date.now());
|
|
47770
|
-
closeView2();
|
|
47771
|
-
}
|
|
47772
|
-
}, [
|
|
47773
|
-
canGoBack,
|
|
47774
|
-
captureExitLog,
|
|
47775
|
-
historyBackScript
|
|
47776
|
-
]);
|
|
47777
|
-
(0, import_react223.useEffect)(function() {
|
|
47778
|
-
var handleAndroidBackEvent = function() {
|
|
47779
|
-
if (canGoBack) {
|
|
47780
|
-
var _webViewRef_current;
|
|
47781
|
-
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(historyBackScript);
|
|
47782
|
-
return true;
|
|
47783
|
-
} else {
|
|
47784
|
-
captureExitLog(Date.now());
|
|
47785
|
-
return false;
|
|
47786
|
-
}
|
|
47787
|
-
};
|
|
47788
|
-
import_react_native230.BackHandler.addEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
47789
|
-
return function() {
|
|
47790
|
-
return import_react_native230.BackHandler.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
|
|
47791
|
-
};
|
|
47792
|
-
}, [
|
|
47793
|
-
canGoBack,
|
|
47794
|
-
captureExitLog,
|
|
47795
|
-
historyBackScript
|
|
47796
|
-
]);
|
|
47797
|
-
var handleHomeIconButtonClick = (0, import_react223.useCallback)(function() {
|
|
47798
|
-
var _webViewRef_current;
|
|
47799
|
-
(_webViewRef_current = webViewRef.current) === null || _webViewRef_current === void 0 ? void 0 : _webViewRef_current.injectJavaScript(historyHomeScript);
|
|
47800
|
-
}, [
|
|
47801
|
-
historyHomeScript
|
|
47802
|
-
]);
|
|
47803
|
-
var handleNavigationStateChange = (0, import_react223.useCallback)(function(event) {
|
|
47804
|
-
if (event.url) {
|
|
47805
|
-
trackScreen(event.url);
|
|
47806
|
-
}
|
|
47807
|
-
onNavigationStateChange(event);
|
|
47808
|
-
}, [
|
|
47809
|
-
onNavigationStateChange
|
|
47668
|
+
PartnerWebView = /* @__PURE__ */ (0, import_react223.forwardRef)(function PartnerWebViewScreen(_param, ref) {
|
|
47669
|
+
var onBackButtonClick = _param.onBackButtonClick, onHomeButtonClick = _param.onHomeButtonClick, webViewProps = _object_without_properties(_param, [
|
|
47670
|
+
"onBackButtonClick",
|
|
47671
|
+
"onHomeButtonClick"
|
|
47810
47672
|
]);
|
|
47811
47673
|
return /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(import_jsx_runtime229.Fragment, {
|
|
47812
47674
|
children: [
|
|
47813
47675
|
/* @__PURE__ */ (0, import_jsx_runtime229.jsx)(PartnerWebviewNavigationBar, {
|
|
47814
|
-
|
|
47815
|
-
|
|
47676
|
+
onBackButtonClick,
|
|
47677
|
+
onHomeButtonClick
|
|
47816
47678
|
}),
|
|
47817
47679
|
/* @__PURE__ */ (0, import_jsx_runtime229.jsx)(react_native_webview_exports.WebView, _object_spread_props(_object_spread({
|
|
47818
|
-
ref
|
|
47680
|
+
ref
|
|
47819
47681
|
}, webViewProps), {
|
|
47820
47682
|
style: {
|
|
47821
47683
|
flex: 1
|
|
47822
|
-
},
|
|
47823
|
-
onNavigationStateChange: function(event) {
|
|
47824
|
-
var _webViewProps_onNavigationStateChange;
|
|
47825
|
-
webViewProps === null || webViewProps === void 0 ? void 0 : (_webViewProps_onNavigationStateChange = webViewProps.onNavigationStateChange) === null || _webViewProps_onNavigationStateChange === void 0 ? void 0 : _webViewProps_onNavigationStateChange.call(webViewProps, event);
|
|
47826
|
-
handleNavigationStateChange(event);
|
|
47827
47684
|
}
|
|
47828
47685
|
}))
|
|
47829
47686
|
]
|
|
47830
47687
|
});
|
|
47831
47688
|
});
|
|
47832
47689
|
globalEventListenerMap = /* @__PURE__ */ new Map();
|
|
47690
|
+
INITIAL_STATE = {
|
|
47691
|
+
stack: [],
|
|
47692
|
+
index: -1
|
|
47693
|
+
};
|
|
47694
|
+
HISTORY_BACK_SCRIPT = "\n(function() {\n window.history.back();\n true;\n})();\n";
|
|
47695
|
+
HISTORY_HOME_SCRIPT = "\n (function() {\n window.location.href = '/';\n true;\n })();\n";
|
|
47833
47696
|
FontA11yCategory = {
|
|
47834
47697
|
Large: "Large",
|
|
47835
47698
|
xLarge: "xLarge",
|
|
@@ -47866,6 +47729,47 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47866
47729
|
3.143: 275,
|
|
47867
47730
|
3.571: 310
|
|
47868
47731
|
};
|
|
47732
|
+
extractDateFromUUIDv7 = function(uuid) {
|
|
47733
|
+
var timestampHex = uuid.split("-").join("").slice(0, 12);
|
|
47734
|
+
var timestamp = Number.parseInt(timestampHex, 16);
|
|
47735
|
+
return new Date(timestamp);
|
|
47736
|
+
};
|
|
47737
|
+
getGroupId = function(url) {
|
|
47738
|
+
try {
|
|
47739
|
+
var urlObject = new URL(url);
|
|
47740
|
+
return {
|
|
47741
|
+
groupId: urlObject.pathname,
|
|
47742
|
+
search: urlObject.search.startsWith("?") ? urlObject.search.substring(1) : urlObject.search
|
|
47743
|
+
};
|
|
47744
|
+
} catch (e62) {
|
|
47745
|
+
return {
|
|
47746
|
+
groupId: "unknown",
|
|
47747
|
+
search: "unknown"
|
|
47748
|
+
};
|
|
47749
|
+
}
|
|
47750
|
+
};
|
|
47751
|
+
getReferrer3 = function() {
|
|
47752
|
+
try {
|
|
47753
|
+
var referrer2 = new URL(getSchemeUri());
|
|
47754
|
+
return referrer2.searchParams.get("referrer");
|
|
47755
|
+
} catch (e62) {
|
|
47756
|
+
return "";
|
|
47757
|
+
}
|
|
47758
|
+
};
|
|
47759
|
+
trackScreen = function(url) {
|
|
47760
|
+
var _getGroupId = getGroupId(url), groupId = _getGroupId.groupId, search = _getGroupId.search;
|
|
47761
|
+
var log = {
|
|
47762
|
+
log_type: "screen",
|
|
47763
|
+
log_name: "".concat(groupId, "::screen"),
|
|
47764
|
+
params: {
|
|
47765
|
+
search,
|
|
47766
|
+
referrer: getReferrer3(),
|
|
47767
|
+
deployment_id: env.getDeploymentId(),
|
|
47768
|
+
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
47769
|
+
}
|
|
47770
|
+
};
|
|
47771
|
+
return eventLog(log);
|
|
47772
|
+
};
|
|
47869
47773
|
operationalEnvironment = getOperationalEnvironment2();
|
|
47870
47774
|
TYPES = [
|
|
47871
47775
|
"partner",
|
|
@@ -47894,7 +47798,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47894
47798
|
}
|
|
47895
47799
|
});
|
|
47896
47800
|
function Index() {
|
|
47897
|
-
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
47801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(import_react_native236.View, {
|
|
47898
47802
|
style: {
|
|
47899
47803
|
flex: 1
|
|
47900
47804
|
},
|
|
@@ -47916,13 +47820,13 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
|
|
|
47916
47820
|
})
|
|
47917
47821
|
});
|
|
47918
47822
|
}
|
|
47919
|
-
var import_jsx_runtime231,
|
|
47823
|
+
var import_jsx_runtime231, import_react_native236;
|
|
47920
47824
|
var init_pages = __esm({
|
|
47921
47825
|
"react-native/pages/index.tsx"() {
|
|
47922
47826
|
"use strict";
|
|
47923
47827
|
import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
|
|
47924
47828
|
init_dist8();
|
|
47925
|
-
|
|
47829
|
+
import_react_native236 = __toESM(require_react_native(), 1);
|
|
47926
47830
|
}
|
|
47927
47831
|
});
|
|
47928
47832
|
|