@apps-in-toss/web-framework 1.4.2 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -154286,6 +154286,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154286
154286
  })
154287
154287
  });
154288
154288
  }
154289
+ var import_react_native_safe_area_context = _$$_REQUIRE(_dependencyMap[14], "@granite-js/native/react-native-safe-area-context");
154289
154290
  var import_tds_react_native9 = _$$_REQUIRE(_dependencyMap[8], "@toss/tds-react-native");
154290
154291
  var import_private6 = _$$_REQUIRE(_dependencyMap[13], "@toss/tds-react-native/private");
154291
154292
  var import_react_native19 = _$$_REQUIRE(_dependencyMap[9], "react-native");
@@ -154296,6 +154297,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154296
154297
  var _useMoreButtonBottomS2 = useMoreButtonBottomSheet(),
154297
154298
  openMoreButtonBottomSheet = _useMoreButtonBottomS2.open;
154298
154299
  var navigationEvent = useNavigationEvent();
154300
+ var _ref39 = (0, import_react_native_safe_area_context.useSafeAreaInsets)(),
154301
+ safeAreaRight = _ref39.right;
154299
154302
  useHardwareBackPress(navigationEvent.handleBack);
154300
154303
  var parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
154301
154304
  var initialAccessoryButton = parsedNavigationBar == null ? void 0 : parsedNavigationBar.initialAccessoryButton;
@@ -154314,7 +154317,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154314
154317
  position: "absolute",
154315
154318
  zIndex: Z_INDEX.CLOSE_BUTTON,
154316
154319
  marginTop: safeAreaTop,
154317
- paddingRight: 10
154320
+ paddingRight: safeAreaRight + 10
154318
154321
  },
154319
154322
  pointerEvents: "box-none",
154320
154323
  children: (0, import_jsx_runtime8.jsx)(import_private6.NavigationRightContent, {
@@ -154331,12 +154334,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154331
154334
  Game: GameNavigationBar
154332
154335
  };
154333
154336
  var bridge_entry_exports = {};
154334
- __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[14], "@apps-in-toss/native-modules/async-bridges"));
154335
- __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[15], "@apps-in-toss/native-modules/constant-bridges"));
154336
- __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[16], "@apps-in-toss/native-modules/event-bridges"));
154337
+ __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[15], "@apps-in-toss/native-modules/async-bridges"));
154338
+ __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[16], "@apps-in-toss/native-modules/constant-bridges"));
154339
+ __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[17], "@apps-in-toss/native-modules/event-bridges"));
154337
154340
  var import_jsx_runtime9 = _$$_REQUIRE(_dependencyMap[11], "react/jsx-runtime");
154338
- function RNAppContainer(_ref39) {
154339
- var children = _ref39.children;
154341
+ function RNAppContainer(_ref40) {
154342
+ var children = _ref40.children;
154340
154343
  var global2 = getAppsInTossGlobals();
154341
154344
  switch (global2.appType) {
154342
154345
  case "game":
@@ -154350,12 +154353,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154350
154353
  });
154351
154354
  }
154352
154355
  }
154353
- function GameAppContainer(_ref40) {
154354
- var children = _ref40.children;
154355
- var _ref41 = (0, import_react17.useState)(false),
154356
- _ref42 = _slicedToArray(_ref41, 2),
154357
- isEntryMessageExited = _ref42[0],
154358
- setIsEntryMessageExited = _ref42[1];
154356
+ function GameAppContainer(_ref41) {
154357
+ var children = _ref41.children;
154358
+ var _ref42 = (0, import_react17.useState)(false),
154359
+ _ref43 = _slicedToArray(_ref42, 2),
154360
+ isEntryMessageExited = _ref43[0],
154361
+ setIsEntryMessageExited = _ref43[1];
154359
154362
  (0, import_react17.useEffect)(function () {
154360
154363
  if (import_react_native20.Platform.OS === "ios") {
154361
154364
  (0, import_native_modules12.setIosSwipeGestureEnabled)({
@@ -154383,16 +154386,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154383
154386
  }) : children]
154384
154387
  });
154385
154388
  }
154386
- function GeneralAppContainer(_ref43) {
154387
- var children = _ref43.children;
154389
+ function GeneralAppContainer(_ref44) {
154390
+ var children = _ref44.children;
154388
154391
  return (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, {
154389
154392
  children: [(0, import_jsx_runtime9.jsx)(RNNavigationBar.Default, {}), children]
154390
154393
  });
154391
154394
  }
154392
154395
  var import_jsx_runtime10 = _$$_REQUIRE(_dependencyMap[11], "react/jsx-runtime");
154393
- function AppsInTossContainer(Container, _ref44) {
154394
- var children = _ref44.children,
154395
- initialProps = _objectWithoutProperties(_ref44, _excluded);
154396
+ function AppsInTossContainer(Container, _ref45) {
154397
+ var children = _ref45.children,
154398
+ initialProps = _objectWithoutProperties(_ref45, _excluded);
154396
154399
  if (!(0, import_native_modules13.isMinVersionSupported)({
154397
154400
  android: "5.220.0",
154398
154401
  ios: "5.221.0"
@@ -154417,16 +154420,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154417
154420
  }))]
154418
154421
  });
154419
154422
  }
154420
- function TDSContainer(_ref45) {
154421
- var children = _ref45.children;
154423
+ function TDSContainer(_ref46) {
154424
+ var children = _ref46.children;
154422
154425
  useAppsInTossBridge();
154423
154426
  return (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, {
154424
154427
  children: children
154425
154428
  });
154426
154429
  }
154427
- function registerApp(container, _ref46) {
154428
- var context = _ref46.context,
154429
- analytics = _ref46.analytics;
154430
+ function registerApp(container, _ref47) {
154431
+ var context = _ref47.context,
154432
+ analytics = _ref47.analytics;
154430
154433
  var appName = getAppName();
154431
154434
  var isRegistered = import_react_native22.AppRegistry.getAppKeys().includes(appName);
154432
154435
  if (!isRegistered) {
@@ -154452,8 +154455,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154452
154455
  }
154453
154456
  return global.Page;
154454
154457
  }
154455
- function AppsInTossScreenContainer(_ref47) {
154456
- var children = _ref47.children;
154458
+ function AppsInTossScreenContainer(_ref48) {
154459
+ var children = _ref48.children;
154457
154460
  var isRNApp = getAppsInTossGlobals().webViewType == null;
154458
154461
  return (0, import_jsx_runtime10.jsx)(import_analytics.Analytics.Screen, {
154459
154462
  children: isRNApp ? (0, import_jsx_runtime10.jsx)(RNAppContainer, {
@@ -154473,18 +154476,19 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154473
154476
  registerApp: registerApp
154474
154477
  };
154475
154478
  var import_native_modules18 = _$$_REQUIRE(_dependencyMap[6], "@apps-in-toss/native-modules");
154476
- var appsInTossAsyncBridges = __toESM(_$$_REQUIRE(_dependencyMap[14], "@apps-in-toss/native-modules/async-bridges"), 1);
154477
- var appsInTossConstantBridges = __toESM(_$$_REQUIRE(_dependencyMap[15], "@apps-in-toss/native-modules/constant-bridges"), 1);
154478
- var appsInTossEventBridges = __toESM(_$$_REQUIRE(_dependencyMap[16], "@apps-in-toss/native-modules/event-bridges"), 1);
154479
+ var appsInTossAsyncBridges = __toESM(_$$_REQUIRE(_dependencyMap[15], "@apps-in-toss/native-modules/async-bridges"), 1);
154480
+ var appsInTossConstantBridges = __toESM(_$$_REQUIRE(_dependencyMap[16], "@apps-in-toss/native-modules/constant-bridges"), 1);
154481
+ var appsInTossEventBridges = __toESM(_$$_REQUIRE(_dependencyMap[17], "@apps-in-toss/native-modules/event-bridges"), 1);
154479
154482
  var import_react_native32 = _$$_REQUIRE(_dependencyMap[7], "@granite-js/react-native");
154480
154483
  var import_tds_react_native14 = _$$_REQUIRE(_dependencyMap[8], "@toss/tds-react-native");
154481
154484
  var import_private9 = _$$_REQUIRE(_dependencyMap[13], "@toss/tds-react-native/private");
154482
154485
  var import_react27 = _$$_REQUIRE(_dependencyMap[10], "react");
154483
154486
  var import_react_native33 = _$$_REQUIRE(_dependencyMap[9], "react-native");
154484
154487
  var import_native_modules14 = _$$_REQUIRE(_dependencyMap[6], "@apps-in-toss/native-modules");
154485
- var import_react_native_webview = _$$_REQUIRE(_dependencyMap[17], "@granite-js/native/react-native-webview");
154488
+ var import_react_native_webview = _$$_REQUIRE(_dependencyMap[18], "@granite-js/native/react-native-webview");
154486
154489
  var import_react19 = _$$_REQUIRE(_dependencyMap[10], "react");
154487
154490
  var import_react_native25 = _$$_REQUIRE(_dependencyMap[9], "react-native");
154491
+ var import_react_native_safe_area_context2 = _$$_REQUIRE(_dependencyMap[14], "@granite-js/native/react-native-safe-area-context");
154488
154492
  var import_react_native23 = _$$_REQUIRE(_dependencyMap[7], "@granite-js/react-native");
154489
154493
  var import_tds_react_native11 = _$$_REQUIRE(_dependencyMap[8], "@toss/tds-react-native");
154490
154494
  var import_private7 = _$$_REQUIRE(_dependencyMap[13], "@toss/tds-react-native/private");
@@ -154494,14 +154498,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154494
154498
  var import_jsx_runtime11 = _$$_REQUIRE(_dependencyMap[11], "react/jsx-runtime");
154495
154499
  function GameWebviewNavigationBar() {
154496
154500
  var safeAreaTop = (0, import_private7.useSafeAreaTop)();
154497
- var _ref48 = (0, import_tds_react_native11.useDialog)(),
154498
- openConfirm = _ref48.openConfirm;
154501
+ var _ref49 = (0, import_tds_react_native11.useDialog)(),
154502
+ openConfirm = _ref49.openConfirm;
154499
154503
  var _useCaptureExitLog3 = useCaptureExitLog(),
154500
154504
  captureExitLog = _useCaptureExitLog3.captureExitLog;
154501
154505
  var global2 = getAppsInTossGlobals();
154502
154506
  var logging = useNavigationBarLogging();
154503
154507
  var _useMoreButtonBottomS3 = useMoreButtonBottomSheet(),
154504
154508
  openMoreButtonBottomSheet = _useMoreButtonBottomS3.open;
154509
+ var _ref50 = (0, import_react_native_safe_area_context2.useSafeAreaInsets)(),
154510
+ safeAreaRight = _ref50.right;
154505
154511
  var parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
154506
154512
  var initialAccessoryButton = parsedNavigationBar == null ? void 0 : parsedNavigationBar.initialAccessoryButton;
154507
154513
  var handleGameWebviewClose = (0, import_react18.useCallback)(_asyncToGenerator(function* () {
@@ -154534,7 +154540,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154534
154540
  position: "absolute",
154535
154541
  zIndex: Z_INDEX.CLOSE_BUTTON,
154536
154542
  marginTop: safeAreaTop,
154537
- paddingRight: 10
154543
+ paddingRight: safeAreaRight + 10
154538
154544
  },
154539
154545
  pointerEvents: "box-none",
154540
154546
  children: (0, import_jsx_runtime11.jsx)(import_private7.NavigationRightContent, {
@@ -154550,10 +154556,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154550
154556
  }
154551
154557
  var import_jsx_runtime12 = _$$_REQUIRE(_dependencyMap[11], "react/jsx-runtime");
154552
154558
  var GameWebView = (0, import_react19.forwardRef)(function GameWebView2(props, ref) {
154553
- var _ref50 = (0, import_react19.useState)(false),
154554
- _ref51 = _slicedToArray(_ref50, 2),
154555
- isEntryMessageExited = _ref51[0],
154556
- setIsEntryMessageExited = _ref51[1];
154559
+ var _ref52 = (0, import_react19.useState)(false),
154560
+ _ref53 = _slicedToArray(_ref52, 2),
154561
+ isEntryMessageExited = _ref53[0],
154562
+ setIsEntryMessageExited = _ref53[1];
154557
154563
  (0, import_react19.useEffect)(function () {
154558
154564
  if (import_react_native25.Platform.OS === "ios") {
154559
154565
  (0, import_native_modules14.setIosSwipeGestureEnabled)({
@@ -154585,7 +154591,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154585
154591
  }, props))]
154586
154592
  });
154587
154593
  });
154588
- var import_react_native_webview2 = _$$_REQUIRE(_dependencyMap[17], "@granite-js/native/react-native-webview");
154594
+ var import_react_native_webview2 = _$$_REQUIRE(_dependencyMap[18], "@granite-js/native/react-native-webview");
154589
154595
  var import_react21 = _$$_REQUIRE(_dependencyMap[10], "react");
154590
154596
  var import_react_native26 = _$$_REQUIRE(_dependencyMap[7], "@granite-js/react-native");
154591
154597
  var import_tds_react_native12 = _$$_REQUIRE(_dependencyMap[8], "@toss/tds-react-native");
@@ -154593,16 +154599,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154593
154599
  var import_es_hangul4 = _$$_REQUIRE(_dependencyMap[12], "es-hangul");
154594
154600
  var import_react20 = _$$_REQUIRE(_dependencyMap[10], "react");
154595
154601
  var import_jsx_runtime13 = _$$_REQUIRE(_dependencyMap[11], "react/jsx-runtime");
154596
- function PartnerWebviewNavigationBar(_ref52) {
154602
+ function PartnerWebviewNavigationBar(_ref54) {
154597
154603
  var _parsedNavigationBar$3, _parsedNavigationBar$4;
154598
- var onBackButtonClick = _ref52.onBackButtonClick,
154599
- onHomeButtonClick = _ref52.onHomeButtonClick;
154604
+ var onBackButtonClick = _ref54.onBackButtonClick,
154605
+ onHomeButtonClick = _ref54.onHomeButtonClick;
154600
154606
  var globals = getAppsInTossGlobals();
154601
154607
  var _useCaptureExitLog4 = useCaptureExitLog(),
154602
154608
  captureExitLog = _useCaptureExitLog4.captureExitLog;
154603
154609
  var logging = useNavigationBarLogging();
154604
- var _ref53 = (0, import_tds_react_native12.useDialog)(),
154605
- openConfirm = _ref53.openConfirm;
154610
+ var _ref55 = (0, import_tds_react_native12.useDialog)(),
154611
+ openConfirm = _ref55.openConfirm;
154606
154612
  var _useMoreButtonBottomS4 = useMoreButtonBottomSheet(),
154607
154613
  openMoreButtonBottomSheet = _useMoreButtonBottomS4.open;
154608
154614
  var parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
@@ -154646,10 +154652,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154646
154652
  });
154647
154653
  }
154648
154654
  var import_jsx_runtime14 = _$$_REQUIRE(_dependencyMap[11], "react/jsx-runtime");
154649
- var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen(_ref55, ref) {
154650
- var onBackButtonClick = _ref55.onBackButtonClick,
154651
- onHomeButtonClick = _ref55.onHomeButtonClick,
154652
- webViewProps = _objectWithoutProperties(_ref55, _excluded2);
154655
+ var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen(_ref57, ref) {
154656
+ var onBackButtonClick = _ref57.onBackButtonClick,
154657
+ onHomeButtonClick = _ref57.onHomeButtonClick,
154658
+ webViewProps = _objectWithoutProperties(_ref57, _excluded2);
154653
154659
  return (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, {
154654
154660
  children: [(0, import_jsx_runtime14.jsx)(PartnerWebviewNavigationBar, {
154655
154661
  onBackButtonClick: onBackButtonClick,
@@ -154667,10 +154673,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154667
154673
  function serializeError(error) {
154668
154674
  return JSON.stringify(error, function (_, value) {
154669
154675
  if (value instanceof Error) {
154670
- return Object.assign({}, Object.entries(value).reduce(function (acc, _ref56) {
154671
- var _ref57 = _slicedToArray(_ref56, 2),
154672
- key = _ref57[0],
154673
- value2 = _ref57[1];
154676
+ return Object.assign({}, Object.entries(value).reduce(function (acc, _ref58) {
154677
+ var _ref59 = _slicedToArray(_ref58, 2),
154678
+ key = _ref59[0],
154679
+ value2 = _ref59[1];
154674
154680
  acc[key] = value2;
154675
154681
  return acc;
154676
154682
  }, {}), {
@@ -154683,24 +154689,24 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154683
154689
  return value;
154684
154690
  });
154685
154691
  }
154686
- function methodHandler(_ref58) {
154687
- var args = _ref58.args,
154688
- eventId = _ref58.eventId,
154689
- functionName = _ref58.functionName,
154690
- handlerMap = _ref58.handlerMap,
154691
- injectJavaScript = _ref58.injectJavaScript;
154692
+ function methodHandler(_ref60) {
154693
+ var args = _ref60.args,
154694
+ eventId = _ref60.eventId,
154695
+ functionName = _ref60.functionName,
154696
+ handlerMap = _ref60.handlerMap,
154697
+ injectJavaScript = _ref60.injectJavaScript;
154692
154698
  var func = handlerMap[functionName];
154693
154699
  if (!func) {
154694
154700
  console.error(functionName + " is not a function");
154695
154701
  return;
154696
154702
  }
154697
154703
  var wrappedFunc = function () {
154698
- var _ref59 = _asyncToGenerator(function* () {
154704
+ var _ref61 = _asyncToGenerator(function* () {
154699
154705
  var result = yield func.apply(void 0, arguments);
154700
154706
  return result;
154701
154707
  });
154702
154708
  return function wrappedFunc() {
154703
- return _ref59.apply(this, arguments);
154709
+ return _ref61.apply(this, arguments);
154704
154710
  };
154705
154711
  }();
154706
154712
  wrappedFunc.apply(void 0, _toConsumableArray(args)).then(function (result) {
@@ -154711,18 +154717,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154711
154717
  });
154712
154718
  }
154713
154719
  var globalEventListenerMap = new Map();
154714
- function useBridgeHandler(_ref60) {
154715
- var onMessage = _ref60.onMessage,
154716
- constantHandlerMap = _ref60.constantHandlerMap,
154717
- asyncHandlerMap = _ref60.asyncHandlerMap,
154718
- eventListenerMap = _ref60.eventListenerMap,
154719
- originalInjectedJavaScript = _ref60.injectedJavaScript;
154720
+ function useBridgeHandler(_ref62) {
154721
+ var onMessage = _ref62.onMessage,
154722
+ constantHandlerMap = _ref62.constantHandlerMap,
154723
+ asyncHandlerMap = _ref62.asyncHandlerMap,
154724
+ eventListenerMap = _ref62.eventListenerMap,
154725
+ originalInjectedJavaScript = _ref62.injectedJavaScript;
154720
154726
  var ref = (0, import_react22.useRef)(null);
154721
154727
  var injectedJavaScript = (0, import_react22.useMemo)(function () {
154722
- return ["window.__CONSTANT_HANDLER_MAP = " + JSON.stringify(Object.entries(constantHandlerMap).reduce(function (acc, _ref61) {
154723
- var _ref62 = _slicedToArray(_ref61, 2),
154724
- key = _ref62[0],
154725
- value = _ref62[1];
154728
+ return ["window.__CONSTANT_HANDLER_MAP = " + JSON.stringify(Object.entries(constantHandlerMap).reduce(function (acc, _ref63) {
154729
+ var _ref64 = _slicedToArray(_ref63, 2),
154730
+ key = _ref64[0],
154731
+ value = _ref64[1];
154726
154732
  acc[key] = typeof value === "function" ? value() : value;
154727
154733
  return acc;
154728
154734
  }, {})) + ";", originalInjectedJavaScript, "true"].join("\n");
@@ -154741,7 +154747,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154741
154747
  };
154742
154748
  };
154743
154749
  var $onMessage = (0, import_react22.useCallback)(function () {
154744
- var _ref63 = _asyncToGenerator(function* (e) {
154750
+ var _ref65 = _asyncToGenerator(function* (e) {
154745
154751
  onMessage == null ? void 0 : onMessage(e);
154746
154752
  var data = JSON.parse(e.nativeEvent.data);
154747
154753
  if (typeof data !== "object" || data === null || typeof data.functionName !== "string" || typeof data.eventId !== "string" || typeof data.type !== "string" || !["addEventListener", "removeEventListener", "method"].includes(data.type)) {
@@ -154786,7 +154792,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154786
154792
  }
154787
154793
  });
154788
154794
  return function (_x4) {
154789
- return _ref63.apply(this, arguments);
154795
+ return _ref65.apply(this, arguments);
154790
154796
  };
154791
154797
  }(), [onMessage]);
154792
154798
  return {
@@ -154846,20 +154852,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154846
154852
  }
154847
154853
  }
154848
154854
  function useWebViewHistory() {
154849
- var _ref64 = (0, import_react23.useReducer)(reducer, INITIAL_STATE),
154850
- _ref65 = _slicedToArray(_ref64, 2),
154851
- state = _ref65[0],
154852
- dispatch = _ref65[1];
154853
- var onNavigationStateChange = (0, import_react23.useCallback)(function (_ref66) {
154854
- var url = _ref66.url,
154855
- canGoForward2 = _ref66.canGoForward;
154855
+ var _ref66 = (0, import_react23.useReducer)(reducer, INITIAL_STATE),
154856
+ _ref67 = _slicedToArray(_ref66, 2),
154857
+ state = _ref67[0],
154858
+ dispatch = _ref67[1];
154859
+ var onNavigationStateChange = (0, import_react23.useCallback)(function (_ref68) {
154860
+ var url = _ref68.url,
154861
+ canGoForward2 = _ref68.canGoForward;
154856
154862
  dispatch({
154857
154863
  type: "NAVIGATION_CHANGE",
154858
154864
  url: url,
154859
154865
  canGoForward: canGoForward2
154860
154866
  });
154861
154867
  }, []);
154862
- var _ref67 = (0, import_react23.useMemo)(function () {
154868
+ var _ref69 = (0, import_react23.useMemo)(function () {
154863
154869
  var canBack = state.index > 0;
154864
154870
  var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
154865
154871
  return {
@@ -154867,8 +154873,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154867
154873
  canGoForward: canFwd
154868
154874
  };
154869
154875
  }, [state.index, state.stack.length]),
154870
- canGoBack = _ref67.canGoBack,
154871
- canGoForward = _ref67.canGoForward;
154876
+ canGoBack = _ref69.canGoBack,
154877
+ canGoForward = _ref69.canGoForward;
154872
154878
  return {
154873
154879
  onNavigationStateChange: onNavigationStateChange,
154874
154880
  hasHistory: canGoBack,
@@ -154883,14 +154889,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154883
154889
  var _useWebViewHistory = useWebViewHistory(),
154884
154890
  hasHistory = _useWebViewHistory.hasHistory,
154885
154891
  onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
154886
- var _ref68 = (0, import_react_native27.useBackEventState)(),
154887
- webBackHandlersRef = _ref68.handlersRef,
154888
- hasWebBackEvent = _ref68.hasBackEvent,
154889
- addWebBackEventListener = _ref68.addEventListener,
154890
- removeWebBackEventListener = _ref68.removeEventListener;
154892
+ var _ref70 = (0, import_react_native27.useBackEventState)(),
154893
+ webBackHandlersRef = _ref70.handlersRef,
154894
+ hasWebBackEvent = _ref70.hasBackEvent,
154895
+ addWebBackEventListener = _ref70.addEventListener,
154896
+ removeWebBackEventListener = _ref70.removeEventListener;
154891
154897
  var logging = useNavigationBarLogging();
154892
- var _ref69 = (0, import_tds_react_native13.useDialog)(),
154893
- openConfirm = _ref69.openConfirm;
154898
+ var _ref71 = (0, import_tds_react_native13.useDialog)(),
154899
+ openConfirm = _ref71.openConfirm;
154894
154900
  var global2 = getAppsInTossGlobals();
154895
154901
  var addEventListener = (0, import_react24.useCallback)(function (handler) {
154896
154902
  addWebBackEventListener(handler);
@@ -155087,19 +155093,19 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155087
155093
  function mapFontScaleToCategory(fontScale, platform) {
155088
155094
  return platform === "ios" ? mapIOSFontScaleToCategory(fontScale) : mapAndroidFontScaleToCategory(fontScale);
155089
155095
  }
155090
- function _useCreateUserAgent(_ref71) {
155091
- var batteryModePreference = _ref71.batteryModePreference,
155092
- colorPreference = _ref71.colorPreference,
155093
- locale = _ref71.locale,
155094
- navbarPreference = _ref71.navbarPreference,
155095
- pureSafeArea = _ref71.pureSafeArea,
155096
- safeArea = _ref71.safeArea,
155097
- safeAreaBottomTransparency = _ref71.safeAreaBottomTransparency;
155096
+ function _useCreateUserAgent(_ref73) {
155097
+ var batteryModePreference = _ref73.batteryModePreference,
155098
+ colorPreference = _ref73.colorPreference,
155099
+ locale = _ref73.locale,
155100
+ navbarPreference = _ref73.navbarPreference,
155101
+ pureSafeArea = _ref73.pureSafeArea,
155102
+ safeArea = _ref73.safeArea,
155103
+ safeAreaBottomTransparency = _ref73.safeAreaBottomTransparency;
155098
155104
  var platform = (0, import_native_modules15.getPlatformOS)();
155099
155105
  var appVersion = (0, import_native_modules15.getTossAppVersion)();
155100
- var _ref72 = (0, import_react_native28.useWindowDimensions)(),
155101
- fontScale = _ref72.fontScale;
155102
- var platformString = platform === "ios" ? "iPhone" : "Android";
155106
+ var _ref74 = (0, import_react_native28.useWindowDimensions)(),
155107
+ fontScale = _ref74.fontScale;
155108
+ var platformString = platform === "ios" ? "iPhone" : "Android phone";
155103
155109
  var fontA11y = mapFontScaleToCategory(fontScale, platform);
155104
155110
  var normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
155105
155111
  return ["TossApp/" + appVersion, batteryModePreference && "TossBatteryModePreference/" + batteryModePreference, colorPreference && "TossColorPreference/" + colorPreference, "TossFontAccessibility/" + fontA11y, "TossFontScale/" + normalizedFontScale, locale && "TossLocale/" + locale, navbarPreference && "TossNavbarPreference/" + navbarPreference, pureSafeArea && "TossPureSafeArea/" + pureSafeArea, safeArea && "TossSafeArea/" + safeArea, safeAreaBottomTransparency && "TossSafeAreaBottomTransparency/" + safeAreaBottomTransparency, platformString].filter(Boolean).join(" ");
@@ -155107,15 +155113,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155107
155113
  var import_native_modules16 = _$$_REQUIRE(_dependencyMap[6], "@apps-in-toss/native-modules");
155108
155114
  var import_react_native29 = _$$_REQUIRE(_dependencyMap[7], "@granite-js/react-native");
155109
155115
  var import_react25 = _$$_REQUIRE(_dependencyMap[10], "react");
155110
- function _useGeolocation(_ref73) {
155111
- var accuracy = _ref73.accuracy,
155112
- distanceInterval = _ref73.distanceInterval,
155113
- timeInterval = _ref73.timeInterval;
155116
+ function _useGeolocation(_ref75) {
155117
+ var accuracy = _ref75.accuracy,
155118
+ distanceInterval = _ref75.distanceInterval,
155119
+ timeInterval = _ref75.timeInterval;
155114
155120
  var isVisible = (0, import_react_native29.useVisibility)();
155115
- var _ref74 = (0, import_react25.useState)(null),
155116
- _ref75 = _slicedToArray(_ref74, 2),
155117
- location = _ref75[0],
155118
- setLocation = _ref75[1];
155121
+ var _ref76 = (0, import_react25.useState)(null),
155122
+ _ref77 = _slicedToArray(_ref76, 2),
155123
+ location = _ref77[0],
155124
+ setLocation = _ref77[1];
155119
155125
  (0, import_react25.useEffect)(function () {
155120
155126
  if (!isVisible) {
155121
155127
  return;
@@ -155211,10 +155217,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155211
155217
  var baseUrl = new URL(url);
155212
155218
  var schemeUrl = new URL((0, import_react_native32.getSchemeUri)());
155213
155219
  baseUrl.pathname = schemeUrl.pathname;
155214
- for (var _ref76 of schemeUrl.searchParams.entries()) {
155215
- var _ref77 = _slicedToArray(_ref76, 2);
155216
- var key = _ref77[0];
155217
- var value = _ref77[1];
155220
+ for (var _ref78 of schemeUrl.searchParams.entries()) {
155221
+ var _ref79 = _slicedToArray(_ref78, 2);
155222
+ var key = _ref79[0];
155223
+ var value = _ref79[1];
155218
155224
  baseUrl.searchParams.set(key, value);
155219
155225
  }
155220
155226
  return baseUrl;
@@ -155233,11 +155239,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155233
155239
  }
155234
155240
  return url.toString();
155235
155241
  }
155236
- function _WebView(_ref78) {
155237
- var type = _ref78.type,
155238
- local = _ref78.local,
155239
- onMessage = _ref78.onMessage,
155240
- props = _objectWithoutProperties(_ref78, _excluded3);
155242
+ function _WebView(_ref80) {
155243
+ var type = _ref80.type,
155244
+ local = _ref80.local,
155245
+ onMessage = _ref80.onMessage,
155246
+ props = _objectWithoutProperties(_ref80, _excluded3);
155241
155247
  if (!TYPES.includes(type)) {
155242
155248
  throw new Error("Invalid WebView type: '" + type + "'");
155243
155249
  }
@@ -155251,51 +155257,51 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155251
155257
  var global2 = getAppsInTossGlobals();
155252
155258
  var topNavigation = (0, import_private9.useTopNavigation)();
155253
155259
  var disableTextSelectionCSS = "\n (function() {\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n })();\n ";
155254
- var _ref79 = (0, import_react27.useState)(props.allowsBackForwardNavigationGestures),
155255
- _ref80 = _slicedToArray(_ref79, 2),
155256
- allowsBackForwardNavigationGestures = _ref80[0],
155257
- setAllowsBackForwardNavigationGestures = _ref80[1];
155260
+ var _ref81 = (0, import_react27.useState)(props.allowsBackForwardNavigationGestures),
155261
+ _ref82 = _slicedToArray(_ref81, 2),
155262
+ allowsBackForwardNavigationGestures = _ref82[0],
155263
+ setAllowsBackForwardNavigationGestures = _ref82[1];
155258
155264
  var handler = useBridgeHandler({
155259
155265
  onMessage: onMessage,
155260
155266
  injectedJavaScript: [disableTextSelectionCSS].join("\n"),
155261
155267
  eventListenerMap: Object.assign({}, appsInTossEventBridges, {
155262
- navigationAccessoryEvent: function navigationAccessoryEvent(_ref81) {
155263
- var onEvent = _ref81.onEvent,
155264
- onError = _ref81.onError;
155268
+ navigationAccessoryEvent: function navigationAccessoryEvent(_ref83) {
155269
+ var onEvent = _ref83.onEvent,
155270
+ onError = _ref83.onError;
155265
155271
  return import_tds_react_native14.tdsEvent.addEventListener("navigationAccessoryEvent", {
155266
155272
  onEvent: onEvent,
155267
155273
  onError: onError
155268
155274
  });
155269
155275
  },
155270
- backEvent: function backEvent(_ref82) {
155271
- var onEvent = _ref82.onEvent;
155276
+ backEvent: function backEvent(_ref84) {
155277
+ var onEvent = _ref84.onEvent;
155272
155278
  webBackHandler.addEventListener(onEvent);
155273
155279
  return function () {
155274
155280
  webBackHandler.removeEventListener(onEvent);
155275
155281
  };
155276
155282
  },
155277
- entryMessageExited: function entryMessageExited(_ref83) {
155278
- var onEvent = _ref83.onEvent,
155279
- onError = _ref83.onError;
155283
+ entryMessageExited: function entryMessageExited(_ref85) {
155284
+ var onEvent = _ref85.onEvent,
155285
+ onError = _ref85.onError;
155280
155286
  return import_native_modules18.appsInTossEvent.addEventListener("entryMessageExited", {
155281
155287
  onEvent: onEvent,
155282
155288
  onError: onError
155283
155289
  });
155284
155290
  },
155285
- updateLocationEvent: function updateLocationEvent(_ref84) {
155286
- var onEvent = _ref84.onEvent,
155287
- onError = _ref84.onError,
155288
- options = _ref84.options;
155291
+ updateLocationEvent: function updateLocationEvent(_ref86) {
155292
+ var onEvent = _ref86.onEvent,
155293
+ onError = _ref86.onError,
155294
+ options = _ref86.options;
155289
155295
  return import_native_modules18.appsInTossEvent.addEventListener("updateLocationEvent", {
155290
155296
  onEvent: onEvent,
155291
155297
  onError: onError,
155292
155298
  options: options
155293
155299
  });
155294
155300
  },
155295
- appBridgeCallbackEvent: function appBridgeCallbackEvent(_ref85) {
155296
- var onEvent = _ref85.onEvent,
155297
- onError = _ref85.onError,
155298
- options = _ref85.options;
155301
+ appBridgeCallbackEvent: function appBridgeCallbackEvent(_ref87) {
155302
+ var onEvent = _ref87.onEvent,
155303
+ onError = _ref87.onError,
155304
+ options = _ref87.options;
155299
155305
  return import_native_modules18.appsInTossEvent.addEventListener("appBridgeCallbackEvent", {
155300
155306
  onEvent: onEvent,
155301
155307
  onError: onError,
@@ -155318,10 +155324,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155318
155324
  getSafeAreaBottom: function getSafeAreaBottom() {
155319
155325
  return bottom;
155320
155326
  }
155321
- }, Object.fromEntries(Object.entries(global2).map(function (_ref86) {
155322
- var _ref87 = _slicedToArray(_ref86, 2),
155323
- key = _ref87[0],
155324
- value = _ref87[1];
155327
+ }, Object.fromEntries(Object.entries(global2).map(function (_ref88) {
155328
+ var _ref89 = _slicedToArray(_ref88, 2),
155329
+ key = _ref89[0],
155330
+ value = _ref89[1];
155325
155331
  return [key, function () {
155326
155332
  return value;
155327
155333
  }];
@@ -155442,7 +155448,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155442
155448
  __reExport(src_exports, _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/analytics"), module.exports);
155443
155449
  var import_private10 = _$$_REQUIRE(_dependencyMap[13], "@toss/tds-react-native/private");
155444
155450
  __reExport(src_exports, _$$_REQUIRE(_dependencyMap[6], "@apps-in-toss/native-modules"), module.exports);
155445
- __reExport(src_exports, _$$_REQUIRE(_dependencyMap[18], "@apps-in-toss/types"), module.exports);
155451
+ __reExport(src_exports, _$$_REQUIRE(_dependencyMap[19], "@apps-in-toss/types"), module.exports);
155446
155452
  var Analytics2 = {
155447
155453
  init: import_analytics2.Analytics.init,
155448
155454
  Impression: import_analytics2.Analytics.Impression,
@@ -155461,8 +155467,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155461
155467
  useOverlay: useOverlay,
155462
155468
  useTopNavigation: useTopNavigation,
155463
155469
  useWaitForReturnNavigator: _useWaitForReturnNavigator
155464
- }, _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/analytics"), _$$_REQUIRE(_dependencyMap[6], "@apps-in-toss/native-modules"), _$$_REQUIRE(_dependencyMap[18], "@apps-in-toss/types")));
155465
- },1254,[32,207,61,16,1255,1256,1257,2,1444,18,6,9,2465,2565,2566,2602,2609,2474,1258],"../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.cjs");
155470
+ }, _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/analytics"), _$$_REQUIRE(_dependencyMap[6], "@apps-in-toss/native-modules"), _$$_REQUIRE(_dependencyMap[19], "@apps-in-toss/types")));
155471
+ },1254,[32,207,61,16,1255,1256,1257,2,1444,18,6,9,2465,2565,532,2566,2602,2609,2474,1258],"../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.cjs");
155466
155472
  __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
155467
155473
  function _objectDestructuringEmpty(obj) {
155468
155474
  if (obj == null) throw new TypeError("Cannot destructure undefined");
@@ -46165,6 +46165,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46165
46165
  var global2 = getAppsInTossGlobals();
46166
46166
  var _useMoreButtonBottomSheet = useMoreButtonBottomSheet(), openMoreButtonBottomSheet = _useMoreButtonBottomSheet.open;
46167
46167
  var navigationEvent = useNavigationEvent();
46168
+ var _useSafeAreaInsets = (0, react_native_safe_area_context_exports.useSafeAreaInsets)(), safeAreaRight = _useSafeAreaInsets.right;
46168
46169
  useHardwareBackPress(navigationEvent.handleBack);
46169
46170
  var parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
46170
46171
  var initialAccessoryButton = parsedNavigationBar === null || parsedNavigationBar === void 0 ? void 0 : parsedNavigationBar.initialAccessoryButton;
@@ -46186,7 +46187,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46186
46187
  position: "absolute",
46187
46188
  zIndex: Z_INDEX.CLOSE_BUTTON,
46188
46189
  marginTop: safeAreaTop,
46189
- paddingRight: 10
46190
+ paddingRight: safeAreaRight + 10
46190
46191
  },
46191
46192
  pointerEvents: "box-none",
46192
46193
  children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(NavigationRightContent, {
@@ -46351,6 +46352,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46351
46352
  var global2 = getAppsInTossGlobals();
46352
46353
  var logging = useNavigationBarLogging();
46353
46354
  var _useMoreButtonBottomSheet = useMoreButtonBottomSheet(), openMoreButtonBottomSheet = _useMoreButtonBottomSheet.open;
46355
+ var _useSafeAreaInsets2 = (0, react_native_safe_area_context_exports.useSafeAreaInsets)(), safeAreaRight = _useSafeAreaInsets2.right;
46354
46356
  var parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
46355
46357
  var initialAccessoryButton = parsedNavigationBar === null || parsedNavigationBar === void 0 ? void 0 : parsedNavigationBar.initialAccessoryButton;
46356
46358
  var handleGameWebviewClose = (0, import_react227.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
@@ -46405,7 +46407,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46405
46407
  position: "absolute",
46406
46408
  zIndex: Z_INDEX.CLOSE_BUTTON,
46407
46409
  marginTop: safeAreaTop,
46408
- paddingRight: 10
46410
+ paddingRight: safeAreaRight + 10
46409
46411
  },
46410
46412
  pointerEvents: "box-none",
46411
46413
  children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(NavigationRightContent, {
@@ -47016,7 +47018,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47016
47018
  var platform = getPlatformOS();
47017
47019
  var appVersion = getTossAppVersion();
47018
47020
  var fontScale = (0, import_react_native227.useWindowDimensions)().fontScale;
47019
- var platformString = platform === "ios" ? "iPhone" : "Android";
47021
+ var platformString = platform === "ios" ? "iPhone" : "Android phone";
47020
47022
  var fontA11y = mapFontScaleToCategory(fontScale, platform);
47021
47023
  var normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
47022
47024
  return [
@@ -47386,6 +47388,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47386
47388
  import_react224 = __toESM(require_react(), 1);
47387
47389
  import_jsx_runtime222 = __toESM(require_jsx_runtime(), 1);
47388
47390
  import_jsx_runtime223 = __toESM(require_jsx_runtime(), 1);
47391
+ init_react_native_safe_area_context();
47389
47392
  init_esm8();
47390
47393
  init_private2();
47391
47394
  import_react_native219 = __toESM(require_react_native(), 1);
@@ -47408,6 +47411,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47408
47411
  init_react_native_webview();
47409
47412
  import_react226 = __toESM(require_react(), 1);
47410
47413
  import_react_native222 = __toESM(require_react_native(), 1);
47414
+ init_react_native_safe_area_context();
47411
47415
  init_src3();
47412
47416
  init_esm8();
47413
47417
  init_private2();