@apps-in-toss/web-framework 1.12.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -153365,10 +153365,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
153365
153365
  "use strict";
153366
153366
 
153367
153367
  var _defineProperty = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/defineProperty");
153368
- var _classCallCheck = _$$_REQUIRE(_dependencyMap[1], "@babel/runtime/helpers/classCallCheck");
153369
- var _createClass = _$$_REQUIRE(_dependencyMap[2], "@babel/runtime/helpers/createClass");
153370
- var _toConsumableArray = _$$_REQUIRE(_dependencyMap[3], "@babel/runtime/helpers/toConsumableArray");
153371
- var _objectWithoutProperties = _$$_REQUIRE(_dependencyMap[4], "@babel/runtime/helpers/objectWithoutProperties");
153368
+ var _toConsumableArray = _$$_REQUIRE(_dependencyMap[1], "@babel/runtime/helpers/toConsumableArray");
153369
+ var _objectWithoutProperties = _$$_REQUIRE(_dependencyMap[2], "@babel/runtime/helpers/objectWithoutProperties");
153370
+ var _classCallCheck = _$$_REQUIRE(_dependencyMap[3], "@babel/runtime/helpers/classCallCheck");
153371
+ var _createClass = _$$_REQUIRE(_dependencyMap[4], "@babel/runtime/helpers/createClass");
153372
153372
  var _asyncToGenerator = _$$_REQUIRE(_dependencyMap[5], "@babel/runtime/helpers/asyncToGenerator");
153373
153373
  var _slicedToArray = _$$_REQUIRE(_dependencyMap[6], "@babel/runtime/helpers/slicedToArray");
153374
153374
  var _objectDestructuringEmpty = _$$_REQUIRE(_dependencyMap[7], "@babel/runtime/helpers/objectDestructuringEmpty");
@@ -153441,9 +153441,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
153441
153441
  env: function env() {
153442
153442
  return _env;
153443
153443
  },
153444
+ homeEvent: function homeEvent() {
153445
+ return _homeEvent;
153446
+ },
153444
153447
  loadFullScreenAd: function loadFullScreenAd() {
153445
153448
  return _loadFullScreenAd;
153446
153449
  },
153450
+ safeAreaInsetsChange: function safeAreaInsetsChange() {
153451
+ return _safeAreaInsetsChange;
153452
+ },
153447
153453
  showFullScreenAd: function showFullScreenAd() {
153448
153454
  return _showFullScreenAd;
153449
153455
  },
@@ -154159,6 +154165,71 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154159
154165
  };
154160
154166
  }(), [brandDisplayName, openConfirm]);
154161
154167
  }
154168
+ var EventEmitter = function () {
154169
+ function EventEmitter() {
154170
+ _classCallCheck(this, EventEmitter);
154171
+ this.listeners = {};
154172
+ }
154173
+ return _createClass(EventEmitter, [{
154174
+ key: "subscribe",
154175
+ value: function subscribe(event, listener) {
154176
+ var _this = this;
154177
+ if (!this.listeners[event]) {
154178
+ this.listeners[event] = [];
154179
+ }
154180
+ this.listeners[event].push(listener);
154181
+ return function () {
154182
+ var _this$listeners$event, _this$listeners$event2;
154183
+ _this.listeners[event] = (_this$listeners$event = (_this$listeners$event2 = _this.listeners[event]) == null ? void 0 : _this$listeners$event2.filter(function (l) {
154184
+ return l !== listener;
154185
+ })) != null ? _this$listeners$event : [];
154186
+ };
154187
+ }
154188
+ }, {
154189
+ key: "hasSubscriptions",
154190
+ value: function hasSubscriptions(event) {
154191
+ return this.listeners[event] != null && this.listeners[event].length > 0;
154192
+ }
154193
+ }, {
154194
+ key: "clearSubscriptions",
154195
+ value: function clearSubscriptions(event) {
154196
+ this.listeners[event] = [];
154197
+ }
154198
+ }, {
154199
+ key: "emit",
154200
+ value: function emit(event) {
154201
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
154202
+ args[_key - 1] = arguments[_key];
154203
+ }
154204
+ if (!this.listeners[event]) {
154205
+ return;
154206
+ }
154207
+ this.listeners[event].forEach(function (listener) {
154208
+ return listener.apply(void 0, args);
154209
+ });
154210
+ }
154211
+ }]);
154212
+ }();
154213
+ var eventEmitter = new EventEmitter();
154214
+ function createEvent(event) {
154215
+ return {
154216
+ name: event,
154217
+ subscribe: function subscribe(listener) {
154218
+ return eventEmitter.subscribe(event, listener);
154219
+ },
154220
+ hasSubscriptions: function hasSubscriptions() {
154221
+ return eventEmitter.hasSubscriptions(event);
154222
+ },
154223
+ clearSubscriptions: function clearSubscriptions() {
154224
+ return eventEmitter.clearSubscriptions(event);
154225
+ },
154226
+ emit: function emit(data) {
154227
+ return eventEmitter.emit(event, data);
154228
+ }
154229
+ };
154230
+ }
154231
+ var _homeEvent = createEvent("homeEvent");
154232
+ var _safeAreaInsetsChange = createEvent("safeAreaInsetsChange");
154162
154233
  var import_native_modules7 = _$$_REQUIRE(_dependencyMap[9], "@apps-in-toss/native-modules");
154163
154234
  var import_react_native13 = _$$_REQUIRE(_dependencyMap[10], "@granite-js/react-native");
154164
154235
  var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
@@ -154270,7 +154341,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154270
154341
  },
154271
154342
  handleHomeButtonClick: function handleHomeButtonClick() {
154272
154343
  logging.homeButtonClick();
154273
- navigation.navigate("/");
154344
+ if (_homeEvent.hasSubscriptions()) {
154345
+ _homeEvent.emit({});
154346
+ } else {
154347
+ navigation.navigate("/");
154348
+ }
154274
154349
  },
154275
154350
  handleCloseButtonClick: function handleCloseButtonClick() {
154276
154351
  logging.closeButtonClick();
@@ -154503,16 +154578,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154503
154578
  var import_native_modules11 = _$$_REQUIRE(_dependencyMap[9], "@apps-in-toss/native-modules");
154504
154579
  var import_react_native20 = _$$_REQUIRE(_dependencyMap[10], "@granite-js/react-native");
154505
154580
  var import_jsx_runtime8 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154506
- function PermissionsMenu() {
154581
+ function SettingsMenu() {
154507
154582
  var globals = getAppsInTossGlobals();
154508
154583
  if ((0, import_native_modules11.getOperationalEnvironment)() === "sandbox") {
154509
154584
  return null;
154510
154585
  }
154511
154586
  return (0, import_jsx_runtime8.jsx)(Menu, {
154512
- title: "\uAD8C\uD55C \uC124\uC815",
154587
+ title: "\uC124\uC815",
154513
154588
  iconURL: "https://static.toss.im/icons/png/4x/icon-setting-mono.png",
154514
154589
  onPress: function onPress() {
154515
- return (0, import_react_native20.openURL)(`servicetoss://apps-in-toss-menu/permissions?appName=${import_react_native20.Granite.appName}&displayAppName=${globals.brandDisplayName}`);
154590
+ return (0, import_react_native20.openURL)(`servicetoss://apps-in-toss-menu/settings?appName=${import_react_native20.Granite.appName}&displayAppName=${globals.brandDisplayName}`);
154516
154591
  }
154517
154592
  });
154518
154593
  }
@@ -154537,7 +154612,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154537
154612
  android: "5.246.0",
154538
154613
  ios: "5.246.0"
154539
154614
  },
154540
- PERMISSIONS_MENU: {
154615
+ SETTINGS_MENU: {
154541
154616
  android: "5.238.0",
154542
154617
  ios: "5.237.0"
154543
154618
  }
@@ -154556,36 +154631,23 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154556
154631
  var isHomeShortcutSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.HOME_SHORTCUT_MENU);
154557
154632
  var isBottomSheetSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
154558
154633
  var isShareListMenuSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
154559
- var _ref38 = (0, import_react15.useState)(false),
154560
- _ref39 = _slicedToArray(_ref38, 2),
154561
- isPermissionsMenuSupported = _ref39[0],
154562
- setIsPermissionsMenuSupported = _ref39[1];
154634
+ var isSettingsMenuSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.SETTINGS_MENU);
154563
154635
  (0, import_react15.useEffect)(function () {
154564
154636
  if (!isBottomSheetSupported) {
154565
154637
  return;
154566
154638
  }
154567
154639
  import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(APP_BRIDGE_METHOD_NAME, {}, {
154568
- onSuccess: function onSuccess(_ref40) {
154569
- var items = _ref40.items;
154640
+ onSuccess: function onSuccess(_ref38) {
154641
+ var items = _ref38.items;
154570
154642
  return setItemList(items);
154571
154643
  },
154572
154644
  onError: function onError(error) {
154573
154645
  return console.error("\uBA54\uB274 \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error);
154574
154646
  }
154575
154647
  });
154576
- if ((0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.PERMISSIONS_MENU)) {
154577
- import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("getAllPermission", {}, {
154578
- onSuccess: function onSuccess(permissions) {
154579
- return setIsPermissionsMenuSupported(permissions.length > 0);
154580
- },
154581
- onError: function onError(error) {
154582
- return console.error("\uAD8C\uD55C \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error);
154583
- }
154584
- });
154585
- }
154586
154648
  }, [isBottomSheetSupported]);
154587
154649
  var onClickHandler = function () {
154588
- var _ref41 = _asyncToGenerator(function* () {
154650
+ var _ref39 = _asyncToGenerator(function* () {
154589
154651
  logging.open();
154590
154652
  if (!isBottomSheetSupported) {
154591
154653
  yield appUpdateDialog.open({
@@ -154594,10 +154656,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154594
154656
  });
154595
154657
  return;
154596
154658
  }
154597
- overlay.open(function (_ref42) {
154598
- var isOpen = _ref42.isOpen,
154599
- exit = _ref42.exit,
154600
- close = _ref42.close;
154659
+ overlay.open(function (_ref40) {
154660
+ var isOpen = _ref40.isOpen,
154661
+ exit = _ref40.exit,
154662
+ close = _ref40.close;
154601
154663
  var handleClose = function handleClose() {
154602
154664
  logging.close();
154603
154665
  close();
@@ -154634,22 +154696,22 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154634
154696
  return (0, import_react_native21.openURL)(item.contactUri);
154635
154697
  }
154636
154698
  }, item.contactItemName);
154637
- }), isHomeShortcutSupported && (0, import_jsx_runtime9.jsx)(HomeShortcutMenu, {}), isShareListMenuSupported && (0, import_jsx_runtime9.jsx)(AppShareListMenu, {}), isPermissionsMenuSupported && (0, import_jsx_runtime9.jsx)(PermissionsMenu, {})]
154699
+ }), isHomeShortcutSupported && (0, import_jsx_runtime9.jsx)(HomeShortcutMenu, {}), isShareListMenuSupported && (0, import_jsx_runtime9.jsx)(AppShareListMenu, {}), isSettingsMenuSupported && (0, import_jsx_runtime9.jsx)(SettingsMenu, {})]
154638
154700
  })
154639
154701
  })
154640
154702
  });
154641
154703
  });
154642
154704
  });
154643
154705
  return function onClickHandler() {
154644
- return _ref41.apply(this, arguments);
154706
+ return _ref39.apply(this, arguments);
154645
154707
  };
154646
154708
  }();
154647
154709
  return {
154648
154710
  open: onClickHandler
154649
154711
  };
154650
154712
  }
154651
- function BottomSheetImpressionArea(_ref43) {
154652
- var children = _ref43.children;
154713
+ function BottomSheetImpressionArea(_ref41) {
154714
+ var children = _ref41.children;
154653
154715
  var logging = useMoreButtonBottomSheetLogging();
154654
154716
  (0, import_react15.useEffect)(function () {
154655
154717
  logging.show();
@@ -154669,9 +154731,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154669
154731
  }
154670
154732
  var import_react16 = _$$_REQUIRE(_dependencyMap[13], "react");
154671
154733
  var import_jsx_runtime10 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154672
- function NavigationBarImpressionArea(_ref44) {
154673
- var children = _ref44.children,
154674
- withHomeButton = _ref44.withHomeButton;
154734
+ function NavigationBarImpressionArea(_ref42) {
154735
+ var children = _ref42.children,
154736
+ withHomeButton = _ref42.withHomeButton;
154675
154737
  var hasLogged = (0, import_react16.useRef)(false);
154676
154738
  var logging = useNavigationBarLogging();
154677
154739
  (0, import_react16.useEffect)(function () {
@@ -154733,8 +154795,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154733
154795
  var navigationEvent = useNavigationEvent();
154734
154796
  var _useNavigationBarCont2 = useNavigationBarContext(),
154735
154797
  navigationRightButton = _useNavigationBarCont2.navigationRightButton;
154736
- var _ref45 = (0, import_react_native_safe_area_context.useSafeAreaInsets)(),
154737
- safeAreaRight = _ref45.right;
154798
+ var _ref43 = (0, import_react_native_safe_area_context.useSafeAreaInsets)(),
154799
+ safeAreaRight = _ref43.right;
154738
154800
  useHardwareBackPress(navigationEvent.handleBack);
154739
154801
  return (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, {
154740
154802
  children: [(0, import_jsx_runtime12.jsx)(import_tds_react_native9.PageNavbar, {
@@ -154772,8 +154834,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154772
154834
  __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[19], "@apps-in-toss/native-modules/constant-bridges"));
154773
154835
  __reExport(bridge_entry_exports, _$$_REQUIRE(_dependencyMap[20], "@apps-in-toss/native-modules/event-bridges"));
154774
154836
  var import_jsx_runtime13 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154775
- function RNAppContainer(_ref46) {
154776
- var children = _ref46.children;
154837
+ function RNAppContainer(_ref44) {
154838
+ var children = _ref44.children;
154777
154839
  var global2 = getAppsInTossGlobals();
154778
154840
  switch (global2.appType) {
154779
154841
  case "game":
@@ -154787,8 +154849,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154787
154849
  });
154788
154850
  }
154789
154851
  }
154790
- function GameAppContainer(_ref47) {
154791
- var children = _ref47.children;
154852
+ function GameAppContainer(_ref45) {
154853
+ var children = _ref45.children;
154792
154854
  (0, import_react17.useEffect)(function () {
154793
154855
  if (import_react_native23.Platform.OS === "ios") {
154794
154856
  (0, import_native_modules13.setIosSwipeGestureEnabled)({
@@ -154808,16 +154870,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154808
154870
  }) : children]
154809
154871
  });
154810
154872
  }
154811
- function GeneralAppContainer(_ref48) {
154812
- var children = _ref48.children;
154873
+ function GeneralAppContainer(_ref46) {
154874
+ var children = _ref46.children;
154813
154875
  return (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, {
154814
154876
  children: [(0, import_jsx_runtime13.jsx)(RNNavigationBar.Default, {}), children]
154815
154877
  });
154816
154878
  }
154817
154879
  var import_jsx_runtime14 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154818
- function AppsInTossContainer(Container, _ref49) {
154819
- var children = _ref49.children,
154820
- initialProps = _objectWithoutProperties(_ref49, _excluded);
154880
+ function AppsInTossContainer(Container, _ref47) {
154881
+ var children = _ref47.children,
154882
+ initialProps = _objectWithoutProperties(_ref47, _excluded);
154821
154883
  if (!(0, import_native_modules14.isMinVersionSupported)({
154822
154884
  android: "5.220.0",
154823
154885
  ios: "5.221.0"
@@ -154840,9 +154902,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154840
154902
  }))]
154841
154903
  });
154842
154904
  }
154843
- function registerApp(container, _ref50) {
154844
- var context = _ref50.context,
154845
- analytics = _ref50.analytics;
154905
+ function registerApp(container, _ref48) {
154906
+ var context = _ref48.context,
154907
+ analytics = _ref48.analytics;
154846
154908
  var appName = getAppName();
154847
154909
  var isRegistered = import_react_native25.AppRegistry.getAppKeys().includes(appName);
154848
154910
  if (!isRegistered) {
@@ -154868,8 +154930,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154868
154930
  }
154869
154931
  return global.Page;
154870
154932
  }
154871
- function AppsInTossScreenContainer(_ref51) {
154872
- var children = _ref51.children;
154933
+ function AppsInTossScreenContainer(_ref49) {
154934
+ var children = _ref49.children;
154873
154935
  var isRNApp = getAppsInTossGlobals().webViewType == null;
154874
154936
  return (0, import_jsx_runtime14.jsx)(NavigationBarContextProvider, {
154875
154937
  children: (0, import_jsx_runtime14.jsx)(import_analytics.Analytics.Screen, {
@@ -154915,8 +154977,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154915
154977
  var import_jsx_runtime15 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
154916
154978
  function GameWebviewNavigationBar() {
154917
154979
  var safeAreaTop = (0, import_private7.useSafeAreaTop)();
154918
- var _ref52 = (0, import_tds_react_native11.useDialog)(),
154919
- openConfirm = _ref52.openConfirm;
154980
+ var _ref50 = (0, import_tds_react_native11.useDialog)(),
154981
+ openConfirm = _ref50.openConfirm;
154920
154982
  var _useCaptureExitLog3 = useCaptureExitLog(),
154921
154983
  captureExitLog = _useCaptureExitLog3.captureExitLog;
154922
154984
  var global2 = getAppsInTossGlobals();
@@ -154925,8 +154987,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154925
154987
  openMoreButtonBottomSheet = _useMoreButtonBottomS3.open;
154926
154988
  var _useNavigationBarCont3 = useNavigationBarContext(),
154927
154989
  navigationRightButton = _useNavigationBarCont3.navigationRightButton;
154928
- var _ref53 = (0, import_react_native_safe_area_context2.useSafeAreaInsets)(),
154929
- safeAreaRight = _ref53.right;
154990
+ var _ref51 = (0, import_react_native_safe_area_context2.useSafeAreaInsets)(),
154991
+ safeAreaRight = _ref51.right;
154930
154992
  var handleGameWebviewClose = (0, import_react18.useCallback)(_asyncToGenerator(function* () {
154931
154993
  logging.closeButtonClick();
154932
154994
  var isConfirmed = yield openConfirm({
@@ -155004,16 +155066,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155004
155066
  var import_es_hangul4 = _$$_REQUIRE(_dependencyMap[15], "es-hangul");
155005
155067
  var import_react20 = _$$_REQUIRE(_dependencyMap[13], "react");
155006
155068
  var import_jsx_runtime17 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
155007
- function PartnerWebviewNavigationBar(_ref55) {
155069
+ function PartnerWebviewNavigationBar(_ref53) {
155008
155070
  var _parsedNavigationBar$3, _parsedNavigationBar$4;
155009
- var onBackButtonClick = _ref55.onBackButtonClick,
155010
- onHomeButtonClick = _ref55.onHomeButtonClick;
155071
+ var onBackButtonClick = _ref53.onBackButtonClick,
155072
+ onHomeButtonClick = _ref53.onHomeButtonClick;
155011
155073
  var globals = getAppsInTossGlobals();
155012
155074
  var _useCaptureExitLog4 = useCaptureExitLog(),
155013
155075
  captureExitLog = _useCaptureExitLog4.captureExitLog;
155014
155076
  var logging = useNavigationBarLogging();
155015
- var _ref56 = (0, import_tds_react_native12.useDialog)(),
155016
- openConfirm = _ref56.openConfirm;
155077
+ var _ref54 = (0, import_tds_react_native12.useDialog)(),
155078
+ openConfirm = _ref54.openConfirm;
155017
155079
  var _useMoreButtonBottomS4 = useMoreButtonBottomSheet(),
155018
155080
  openMoreButtonBottomSheet = _useMoreButtonBottomS4.open;
155019
155081
  var parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
@@ -155059,10 +155121,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155059
155121
  });
155060
155122
  }
155061
155123
  var import_jsx_runtime18 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
155062
- var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen(_ref58, ref) {
155063
- var onBackButtonClick = _ref58.onBackButtonClick,
155064
- onHomeButtonClick = _ref58.onHomeButtonClick,
155065
- webViewProps = _objectWithoutProperties(_ref58, _excluded2);
155124
+ var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen(_ref56, ref) {
155125
+ var onBackButtonClick = _ref56.onBackButtonClick,
155126
+ onHomeButtonClick = _ref56.onHomeButtonClick,
155127
+ webViewProps = _objectWithoutProperties(_ref56, _excluded2);
155066
155128
  return (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, {
155067
155129
  children: [(0, import_jsx_runtime18.jsx)(PartnerWebviewNavigationBar, {
155068
155130
  onBackButtonClick: onBackButtonClick,
@@ -155084,9 +155146,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155084
155146
  var components = url.hash.replace("#Intent;", "").split(";").map(function (component) {
155085
155147
  return component.split("=");
155086
155148
  });
155087
- var scheme = (_components$find = components.find(function (_ref59) {
155088
- var _ref60 = _slicedToArray(_ref59, 1),
155089
- key = _ref60[0];
155149
+ var scheme = (_components$find = components.find(function (_ref57) {
155150
+ var _ref58 = _slicedToArray(_ref57, 1),
155151
+ key = _ref58[0];
155090
155152
  return key === "scheme";
155091
155153
  })) == null ? void 0 : _components$find[1];
155092
155154
  if (!scheme) {
@@ -155452,10 +155514,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155452
155514
  function serializeError(error) {
155453
155515
  return JSON.stringify(error, function (_, value) {
155454
155516
  if (value instanceof Error) {
155455
- return Object.assign({}, Object.entries(value).reduce(function (acc, _ref61) {
155456
- var _ref62 = _slicedToArray(_ref61, 2),
155457
- key = _ref62[0],
155458
- value2 = _ref62[1];
155517
+ return Object.assign({}, Object.entries(value).reduce(function (acc, _ref59) {
155518
+ var _ref60 = _slicedToArray(_ref59, 2),
155519
+ key = _ref60[0],
155520
+ value2 = _ref60[1];
155459
155521
  acc[key] = value2;
155460
155522
  return acc;
155461
155523
  }, {}), {
@@ -155468,24 +155530,24 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155468
155530
  return value;
155469
155531
  });
155470
155532
  }
155471
- function methodHandler(_ref63) {
155472
- var args = _ref63.args,
155473
- eventId = _ref63.eventId,
155474
- functionName = _ref63.functionName,
155475
- handlerMap = _ref63.handlerMap,
155476
- injectJavaScript = _ref63.injectJavaScript;
155533
+ function methodHandler(_ref61) {
155534
+ var args = _ref61.args,
155535
+ eventId = _ref61.eventId,
155536
+ functionName = _ref61.functionName,
155537
+ handlerMap = _ref61.handlerMap,
155538
+ injectJavaScript = _ref61.injectJavaScript;
155477
155539
  var func = handlerMap[functionName];
155478
155540
  if (!func) {
155479
155541
  console.error(`${functionName} is not a function`);
155480
155542
  return;
155481
155543
  }
155482
155544
  var wrappedFunc = function () {
155483
- var _ref64 = _asyncToGenerator(function* () {
155545
+ var _ref62 = _asyncToGenerator(function* () {
155484
155546
  var result = yield func.apply(void 0, arguments);
155485
155547
  return result;
155486
155548
  });
155487
155549
  return function wrappedFunc() {
155488
- return _ref64.apply(this, arguments);
155550
+ return _ref62.apply(this, arguments);
155489
155551
  };
155490
155552
  }();
155491
155553
  wrappedFunc.apply(void 0, _toConsumableArray(args)).then(function (result) {
@@ -155500,17 +155562,17 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155500
155562
  });
155501
155563
  }
155502
155564
  var globalEventListenerMap = new Map();
155503
- function useBridgeHandler(_ref65) {
155504
- var onMessage = _ref65.onMessage,
155505
- constantHandlerMap = _ref65.constantHandlerMap,
155506
- asyncHandlerMap = _ref65.asyncHandlerMap,
155507
- eventListenerMap = _ref65.eventListenerMap;
155565
+ function useBridgeHandler(_ref63) {
155566
+ var onMessage = _ref63.onMessage,
155567
+ constantHandlerMap = _ref63.constantHandlerMap,
155568
+ asyncHandlerMap = _ref63.asyncHandlerMap,
155569
+ eventListenerMap = _ref63.eventListenerMap;
155508
155570
  var ref = (0, import_react22.useRef)(null);
155509
155571
  var injectedJavaScript = (0, import_react22.useMemo)(function () {
155510
- return `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(Object.entries(constantHandlerMap).reduce(function (acc, _ref66) {
155511
- var _ref67 = _slicedToArray(_ref66, 2),
155512
- key = _ref67[0],
155513
- value = _ref67[1];
155572
+ return `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(Object.entries(constantHandlerMap).reduce(function (acc, _ref64) {
155573
+ var _ref65 = _slicedToArray(_ref64, 2),
155574
+ key = _ref65[0],
155575
+ value = _ref65[1];
155514
155576
  acc[key] = typeof value === "function" ? value() : value;
155515
155577
  return acc;
155516
155578
  }, {}))};`;
@@ -155537,7 +155599,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155537
155599
  };
155538
155600
  };
155539
155601
  var $onMessage = (0, import_react22.useCallback)(function () {
155540
- var _ref68 = _asyncToGenerator(function* (e) {
155602
+ var _ref66 = _asyncToGenerator(function* (e) {
155541
155603
  onMessage == null ? void 0 : onMessage(e);
155542
155604
  var data = parseNativeEventData(e.nativeEvent.data);
155543
155605
  if (typeof data !== "object" || data === null || typeof data.functionName !== "string" || typeof data.eventId !== "string" || typeof data.type !== "string" || !["addEventListener", "removeEventListener", "method"].includes(data.type)) {
@@ -155582,7 +155644,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155582
155644
  }
155583
155645
  });
155584
155646
  return function (_x5) {
155585
- return _ref68.apply(this, arguments);
155647
+ return _ref66.apply(this, arguments);
155586
155648
  };
155587
155649
  }(), [onMessage]);
155588
155650
  return {
@@ -155601,58 +155663,17 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155601
155663
  }
155602
155664
  var import_react_native_safe_area_context3 = _$$_REQUIRE(_dependencyMap[17], "@granite-js/native/react-native-safe-area-context");
155603
155665
  var import_react23 = _$$_REQUIRE(_dependencyMap[13], "react");
155604
- var EventEmitter = function () {
155605
- function EventEmitter() {
155606
- _classCallCheck(this, EventEmitter);
155607
- this.listeners = {};
155608
- }
155609
- return _createClass(EventEmitter, [{
155610
- key: "on",
155611
- value: function on(event, listener) {
155612
- if (!this.listeners[event]) {
155613
- this.listeners[event] = [];
155614
- }
155615
- this.listeners[event].push(listener);
155616
- }
155617
- }, {
155618
- key: "emit",
155619
- value: function emit(event) {
155620
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
155621
- args[_key - 1] = arguments[_key];
155622
- }
155623
- if (!this.listeners[event]) {
155624
- return;
155625
- }
155626
- this.listeners[event].forEach(function (listener) {
155627
- return listener.apply(void 0, args);
155628
- });
155629
- }
155630
- }, {
155631
- key: "off",
155632
- value: function off(event, listener) {
155633
- if (!this.listeners[event]) {
155634
- return;
155635
- }
155636
- this.listeners[event] = this.listeners[event].filter(function (l) {
155637
- return l !== listener;
155638
- });
155639
- }
155640
- }]);
155641
- }();
155642
- function useSafeAreaInsetsEmitter() {
155666
+ function useSafeAreaInsetsEvent() {
155643
155667
  var insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
155644
- var emitter = (0, import_react23.useMemo)(function () {
155645
- return new EventEmitter();
155646
- }, []);
155647
155668
  (0, import_react23.useEffect)(function () {
155648
- emitter.emit("safeAreaInsetsChange", insets);
155669
+ _safeAreaInsetsChange.emit(insets);
155670
+ }, [insets]);
155671
+ (0, import_react23.useEffect)(function () {
155649
155672
  return function () {
155650
- emitter.off("safeAreaInsetsChange", function (listener) {
155651
- return listener(insets);
155652
- });
155673
+ return _safeAreaInsetsChange.clearSubscriptions();
155653
155674
  };
155654
- }, [emitter, insets]);
155655
- return emitter;
155675
+ }, []);
155676
+ return _safeAreaInsetsChange;
155656
155677
  }
155657
155678
  var import_react_native33 = _$$_REQUIRE(_dependencyMap[10], "@granite-js/react-native");
155658
155679
  var import_tds_react_native13 = _$$_REQUIRE(_dependencyMap[11], "@toss/tds-react-native");
@@ -155705,20 +155726,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155705
155726
  }
155706
155727
  }
155707
155728
  function useWebViewHistory() {
155708
- var _ref69 = (0, import_react24.useReducer)(reducer, INITIAL_STATE),
155709
- _ref70 = _slicedToArray(_ref69, 2),
155710
- state = _ref70[0],
155711
- dispatch = _ref70[1];
155712
- var onNavigationStateChange = (0, import_react24.useCallback)(function (_ref71) {
155713
- var url = _ref71.url,
155714
- canGoForward2 = _ref71.canGoForward;
155729
+ var _ref67 = (0, import_react24.useReducer)(reducer, INITIAL_STATE),
155730
+ _ref68 = _slicedToArray(_ref67, 2),
155731
+ state = _ref68[0],
155732
+ dispatch = _ref68[1];
155733
+ var onNavigationStateChange = (0, import_react24.useCallback)(function (_ref69) {
155734
+ var url = _ref69.url,
155735
+ canGoForward2 = _ref69.canGoForward;
155715
155736
  dispatch({
155716
155737
  type: "NAVIGATION_CHANGE",
155717
155738
  url: url,
155718
155739
  canGoForward: canGoForward2
155719
155740
  });
155720
155741
  }, []);
155721
- var _ref72 = (0, import_react24.useMemo)(function () {
155742
+ var _ref70 = (0, import_react24.useMemo)(function () {
155722
155743
  var canBack = state.index > 0;
155723
155744
  var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
155724
155745
  return {
@@ -155726,8 +155747,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155726
155747
  canGoForward: canFwd
155727
155748
  };
155728
155749
  }, [state.index, state.stack.length]),
155729
- canGoBack = _ref72.canGoBack,
155730
- canGoForward = _ref72.canGoForward;
155750
+ canGoBack = _ref70.canGoBack,
155751
+ canGoForward = _ref70.canGoForward;
155731
155752
  return {
155732
155753
  onNavigationStateChange: onNavigationStateChange,
155733
155754
  hasHistory: canGoBack,
@@ -155740,14 +155761,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155740
155761
  var _useWebViewHistory = useWebViewHistory(),
155741
155762
  hasHistory = _useWebViewHistory.hasHistory,
155742
155763
  onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
155743
- var _ref73 = (0, import_react_native33.useBackEventState)(),
155744
- webBackHandlersRef = _ref73.handlersRef,
155745
- hasWebBackEvent = _ref73.hasBackEvent,
155746
- addWebBackEventListener = _ref73.addEventListener,
155747
- removeWebBackEventListener = _ref73.removeEventListener;
155764
+ var _ref71 = (0, import_react_native33.useBackEventState)(),
155765
+ webBackHandlersRef = _ref71.handlersRef,
155766
+ hasWebBackEvent = _ref71.hasBackEvent,
155767
+ addWebBackEventListener = _ref71.addEventListener,
155768
+ removeWebBackEventListener = _ref71.removeEventListener;
155748
155769
  var logging = useNavigationBarLogging();
155749
- var _ref74 = (0, import_tds_react_native13.useDialog)(),
155750
- openConfirm = _ref74.openConfirm;
155770
+ var _ref72 = (0, import_tds_react_native13.useDialog)(),
155771
+ openConfirm = _ref72.openConfirm;
155751
155772
  var global2 = getAppsInTossGlobals();
155752
155773
  var addEventListener = (0, import_react25.useCallback)(function (handler) {
155753
155774
  addWebBackEventListener(handler);
@@ -155783,10 +155804,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155783
155804
  var handleWebHome = (0, import_react25.useCallback)(function () {
155784
155805
  var _webViewRef$current2;
155785
155806
  logging.homeButtonClick();
155786
- if (hasWebBackEvent) {
155787
- for (var handler of webBackHandlersRef) {
155788
- handler();
155789
- }
155807
+ if (_homeEvent.hasSubscriptions()) {
155808
+ _homeEvent.emit({});
155790
155809
  return;
155791
155810
  }
155792
155811
  (_webViewRef$current2 = webViewRef.current) == null ? void 0 : _webViewRef$current2.injectJavaScript(`
@@ -155949,18 +155968,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155949
155968
  function mapFontScaleToCategory(fontScale, platform) {
155950
155969
  return platform === "ios" ? mapIOSFontScaleToCategory(fontScale) : mapAndroidFontScaleToCategory(fontScale);
155951
155970
  }
155952
- function _useCreateUserAgent(_ref76) {
155953
- var batteryModePreference = _ref76.batteryModePreference,
155954
- colorPreference = _ref76.colorPreference,
155955
- locale = _ref76.locale,
155956
- navbarPreference = _ref76.navbarPreference,
155957
- pureSafeArea = _ref76.pureSafeArea,
155958
- safeArea = _ref76.safeArea,
155959
- safeAreaBottomTransparency = _ref76.safeAreaBottomTransparency;
155971
+ function _useCreateUserAgent(_ref74) {
155972
+ var batteryModePreference = _ref74.batteryModePreference,
155973
+ colorPreference = _ref74.colorPreference,
155974
+ locale = _ref74.locale,
155975
+ navbarPreference = _ref74.navbarPreference,
155976
+ pureSafeArea = _ref74.pureSafeArea,
155977
+ safeArea = _ref74.safeArea,
155978
+ safeAreaBottomTransparency = _ref74.safeAreaBottomTransparency;
155960
155979
  var platform = (0, import_native_modules20.getPlatformOS)();
155961
155980
  var appVersion = (0, import_native_modules20.getTossAppVersion)();
155962
- var _ref77 = (0, import_react_native34.useWindowDimensions)(),
155963
- fontScale = _ref77.fontScale;
155981
+ var _ref75 = (0, import_react_native34.useWindowDimensions)(),
155982
+ fontScale = _ref75.fontScale;
155964
155983
  var platformString = platform === "ios" ? "iPhone" : "Android phone";
155965
155984
  var fontA11y = mapFontScaleToCategory(fontScale, platform);
155966
155985
  var normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
@@ -155969,15 +155988,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
155969
155988
  var import_native_modules21 = _$$_REQUIRE(_dependencyMap[9], "@apps-in-toss/native-modules");
155970
155989
  var import_react_native35 = _$$_REQUIRE(_dependencyMap[10], "@granite-js/react-native");
155971
155990
  var import_react26 = _$$_REQUIRE(_dependencyMap[13], "react");
155972
- function _useGeolocation(_ref78) {
155973
- var accuracy = _ref78.accuracy,
155974
- distanceInterval = _ref78.distanceInterval,
155975
- timeInterval = _ref78.timeInterval;
155991
+ function _useGeolocation(_ref76) {
155992
+ var accuracy = _ref76.accuracy,
155993
+ distanceInterval = _ref76.distanceInterval,
155994
+ timeInterval = _ref76.timeInterval;
155976
155995
  var isVisible = (0, import_react_native35.useVisibility)();
155977
- var _ref79 = (0, import_react26.useState)(null),
155978
- _ref80 = _slicedToArray(_ref79, 2),
155979
- location = _ref80[0],
155980
- setLocation = _ref80[1];
155996
+ var _ref77 = (0, import_react26.useState)(null),
155997
+ _ref78 = _slicedToArray(_ref77, 2),
155998
+ location = _ref78[0],
155999
+ setLocation = _ref78[1];
155981
156000
  (0, import_react26.useEffect)(function () {
155982
156001
  if (!isVisible) {
155983
156002
  return;
@@ -156122,10 +156141,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156122
156141
  var baseUrl = new URL(url);
156123
156142
  var schemeUrl = new URL((0, import_react_native39.getSchemeUri)());
156124
156143
  baseUrl.pathname = schemeUrl.pathname;
156125
- for (var _ref81 of schemeUrl.searchParams.entries()) {
156126
- var _ref82 = _slicedToArray(_ref81, 2);
156127
- var key = _ref82[0];
156128
- var value = _ref82[1];
156144
+ for (var _ref79 of schemeUrl.searchParams.entries()) {
156145
+ var _ref80 = _slicedToArray(_ref79, 2);
156146
+ var key = _ref80[0];
156147
+ var value = _ref80[1];
156129
156148
  baseUrl.searchParams.set(key, value);
156130
156149
  }
156131
156150
  return baseUrl;
@@ -156144,11 +156163,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156144
156163
  }
156145
156164
  return url;
156146
156165
  }
156147
- function _WebView(_ref83) {
156148
- var type = _ref83.type,
156149
- local = _ref83.local,
156150
- onMessage = _ref83.onMessage,
156151
- props = _objectWithoutProperties(_ref83, _excluded3);
156166
+ function _WebView(_ref81) {
156167
+ var type = _ref81.type,
156168
+ local = _ref81.local,
156169
+ onMessage = _ref81.onMessage,
156170
+ props = _objectWithoutProperties(_ref81, _excluded3);
156152
156171
  if (!TYPES.includes(type)) {
156153
156172
  throw new Error(`Invalid WebView type: '${type}'`);
156154
156173
  }
@@ -156162,50 +156181,51 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156162
156181
  var insets = (0, import_react_native_safe_area_context4.useSafeAreaInsets)();
156163
156182
  var global2 = getAppsInTossGlobals();
156164
156183
  var navigationBarContext = useNavigationBarContext();
156165
- var safeAreaInsetsEmitter = useSafeAreaInsetsEmitter();
156166
- var _ref84 = (0, import_react28.useState)(props.allowsBackForwardNavigationGestures),
156167
- _ref85 = _slicedToArray(_ref84, 2),
156168
- allowsBackForwardNavigationGestures = _ref85[0],
156169
- setAllowsBackForwardNavigationGestures = _ref85[1];
156184
+ var safeAreaInsetsEvent = useSafeAreaInsetsEvent();
156185
+ var _ref82 = (0, import_react28.useState)(props.allowsBackForwardNavigationGestures),
156186
+ _ref83 = _slicedToArray(_ref82, 2),
156187
+ allowsBackForwardNavigationGestures = _ref83[0],
156188
+ setAllowsBackForwardNavigationGestures = _ref83[1];
156170
156189
  var handler = useBridgeHandler({
156171
156190
  onMessage: onMessage,
156172
156191
  eventListenerMap: Object.assign({}, appsInTossEventBridges, {
156173
- navigationAccessoryEvent: function navigationAccessoryEvent(_ref86) {
156174
- var onEvent = _ref86.onEvent,
156175
- onError = _ref86.onError;
156192
+ navigationAccessoryEvent: function navigationAccessoryEvent(_ref84) {
156193
+ var onEvent = _ref84.onEvent,
156194
+ onError = _ref84.onError;
156176
156195
  return import_tds_react_native15.tdsEvent.addEventListener("navigationAccessoryEvent", {
156177
156196
  onEvent: onEvent,
156178
156197
  onError: onError
156179
156198
  });
156180
156199
  },
156181
- backEvent: function backEvent(_ref87) {
156182
- var onEvent = _ref87.onEvent;
156200
+ backEvent: function backEvent(_ref85) {
156201
+ var onEvent = _ref85.onEvent;
156183
156202
  webBackHandler.addEventListener(onEvent);
156184
156203
  return function () {
156185
156204
  webBackHandler.removeEventListener(onEvent);
156186
156205
  };
156187
156206
  },
156188
- updateLocationEvent: function updateLocationEvent(_ref88) {
156189
- var onEvent = _ref88.onEvent,
156190
- onError = _ref88.onError,
156191
- options = _ref88.options;
156207
+ homeEvent: function homeEvent(_ref86) {
156208
+ var onEvent = _ref86.onEvent;
156209
+ return _homeEvent.subscribe(onEvent);
156210
+ },
156211
+ updateLocationEvent: function updateLocationEvent(_ref87) {
156212
+ var onEvent = _ref87.onEvent,
156213
+ onError = _ref87.onError,
156214
+ options = _ref87.options;
156192
156215
  return import_native_modules24.appsInTossEvent.addEventListener("updateLocationEvent", {
156193
156216
  onEvent: onEvent,
156194
156217
  onError: onError,
156195
156218
  options: options
156196
156219
  });
156197
156220
  },
156198
- safeAreaInsetsChange: function safeAreaInsetsChange(_ref89) {
156199
- var onEvent = _ref89.onEvent;
156200
- safeAreaInsetsEmitter.on("safeAreaInsetsChange", onEvent);
156201
- return function () {
156202
- safeAreaInsetsEmitter.off("safeAreaInsetsChange", onEvent);
156203
- };
156221
+ safeAreaInsetsChange: function safeAreaInsetsChange(_ref88) {
156222
+ var onEvent = _ref88.onEvent;
156223
+ return safeAreaInsetsEvent.subscribe(onEvent);
156204
156224
  },
156205
- appBridgeCallbackEvent: function appBridgeCallbackEvent(_ref90) {
156206
- var onEvent = _ref90.onEvent,
156207
- onError = _ref90.onError,
156208
- options = _ref90.options;
156225
+ appBridgeCallbackEvent: function appBridgeCallbackEvent(_ref89) {
156226
+ var onEvent = _ref89.onEvent,
156227
+ onError = _ref89.onError,
156228
+ options = _ref89.options;
156209
156229
  return import_native_modules24.appsInTossEvent.addEventListener("appBridgeCallbackEvent", {
156210
156230
  onEvent: onEvent,
156211
156231
  onError: onError,
@@ -156230,10 +156250,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156230
156250
  right: insets.right
156231
156251
  };
156232
156252
  }
156233
- }, Object.fromEntries(Object.entries(global2).map(function (_ref91) {
156234
- var _ref92 = _slicedToArray(_ref91, 2),
156235
- key = _ref92[0],
156236
- value = _ref92[1];
156253
+ }, Object.fromEntries(Object.entries(global2).map(function (_ref90) {
156254
+ var _ref91 = _slicedToArray(_ref90, 2),
156255
+ key = _ref91[0],
156256
+ value = _ref91[1];
156237
156257
  return [key, function () {
156238
156258
  return value;
156239
156259
  }];
@@ -156609,9 +156629,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156609
156629
  };
156610
156630
  }
156611
156631
  if (response.resultType !== "SUCCESS") {
156612
- var _ref100, _response$error$reaso, _response$error, _mappedError$code;
156632
+ var _ref99, _response$error$reaso, _response$error, _mappedError$code;
156613
156633
  var mappedError = API_RESULT_ERROR_MAP[response.resultType];
156614
- var errorMessage = (_ref100 = (_response$error$reaso = (_response$error = response.error) == null ? void 0 : _response$error.reason) != null ? _response$error$reaso : mappedError == null ? void 0 : mappedError.message) != null ? _ref100 : ERROR_MESSAGES[ERROR_CODES.INTERNAL_ERROR];
156634
+ var errorMessage = (_ref99 = (_response$error$reaso = (_response$error = response.error) == null ? void 0 : _response$error.reason) != null ? _response$error$reaso : mappedError == null ? void 0 : mappedError.message) != null ? _ref99 : ERROR_MESSAGES[ERROR_CODES.INTERNAL_ERROR];
156615
156635
  var errorCode = (_mappedError$code = mappedError == null ? void 0 : mappedError.code) != null ? _mappedError$code : ERROR_CODES.INTERNAL_ERROR;
156616
156636
  return {
156617
156637
  type: "error",
@@ -156743,7 +156763,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156743
156763
  key: "track",
156744
156764
  value: function () {
156745
156765
  var _track = _asyncToGenerator(function* (eventType) {
156746
- var _this = this;
156766
+ var _this2 = this;
156747
156767
  if (!this.eventTypes.has(eventType)) {
156748
156768
  return;
156749
156769
  }
@@ -156762,7 +156782,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156762
156782
  data: this.eventPayload
156763
156783
  };
156764
156784
  yield Promise.allSettled(this.eventTrackingUrls.map(function (url) {
156765
- return _this.sendTrackingRequest(url, payload);
156785
+ return _this2.sendTrackingRequest(url, payload);
156766
156786
  }));
156767
156787
  if (!this.repeatableEvents.has(eventType) && this.requestId && this.creativeId) {
156768
156788
  globalEventDeduplicator.markTracked(this.requestId, this.creativeId, eventType);
@@ -156802,20 +156822,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
156802
156822
  var import_react_native42 = _$$_REQUIRE(_dependencyMap[12], "react-native");
156803
156823
  var import_jsx_runtime20 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
156804
156824
  var ARROW_PATH = "m7.5 20.4c-.5-.5-.5-1.2 0-1.7l6.7-6.7-6.8-6.7c-.5-.5-.5-1.2 0-1.7s1.2-.5 1.7 0l7.5 7.5c.5.5.5 1.2 0 1.7l-7.5 7.5c-.2.3-.5.4-.8.4s-.6-.1-.8-.3z";
156805
- function FeedBannerAdView(_ref93) {
156806
- var brandName = _ref93.brandName,
156807
- brandLogoUri = _ref93.brandLogoUri,
156808
- title = _ref93.title,
156809
- subtitle = _ref93.subtitle,
156810
- mainImageUri = _ref93.mainImageUri,
156811
- ctaText = _ref93.ctaText,
156812
- ctaTextColor = _ref93.ctaTextColor,
156813
- ctaBackgroundColor = _ref93.ctaBackgroundColor,
156814
- adClearanceText = _ref93.adClearanceText,
156815
- colors = _ref93.colors,
156816
- isAdBadgeEnabled = _ref93.isAdBadgeEnabled,
156817
- paddingStyle = _ref93.paddingStyle,
156818
- _onPress2 = _ref93.onPress;
156825
+ function FeedBannerAdView(_ref92) {
156826
+ var brandName = _ref92.brandName,
156827
+ brandLogoUri = _ref92.brandLogoUri,
156828
+ title = _ref92.title,
156829
+ subtitle = _ref92.subtitle,
156830
+ mainImageUri = _ref92.mainImageUri,
156831
+ ctaText = _ref92.ctaText,
156832
+ ctaTextColor = _ref92.ctaTextColor,
156833
+ ctaBackgroundColor = _ref92.ctaBackgroundColor,
156834
+ adClearanceText = _ref92.adClearanceText,
156835
+ colors = _ref92.colors,
156836
+ isAdBadgeEnabled = _ref92.isAdBadgeEnabled,
156837
+ paddingStyle = _ref92.paddingStyle,
156838
+ _onPress2 = _ref92.onPress;
156819
156839
  var scale = (0, import_react29.useRef)(new import_react_native42.Animated.Value(1)).current;
156820
156840
  var animateScale = function animateScale(toValue) {
156821
156841
  import_react_native42.Animated.timing(scale, {
@@ -157103,15 +157123,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157103
157123
  var import_react_native43 = _$$_REQUIRE(_dependencyMap[12], "react-native");
157104
157124
  var import_jsx_runtime21 = _$$_REQUIRE(_dependencyMap[14], "react/jsx-runtime");
157105
157125
  var SQUIRCLE_PATH = "M0 17.352C0 3.564 3.564 0 17.352 0H18.648C32.436 0 36 3.564 36 17.352V18.648C36 32.436 32.436 36 18.648 36H17.352C3.564 36 0 32.436 0 18.648V17.352Z";
157106
- function ListBannerAdView(_ref94) {
157107
- var title = _ref94.title,
157108
- subtitle = _ref94.subtitle,
157109
- adClearanceText = _ref94.adClearanceText,
157110
- adClearanceFontSize = _ref94.adClearanceFontSize,
157111
- imageUri = _ref94.imageUri,
157112
- paddingStyle = _ref94.paddingStyle,
157113
- colors = _ref94.colors,
157114
- _onPress3 = _ref94.onPress;
157126
+ function ListBannerAdView(_ref93) {
157127
+ var title = _ref93.title,
157128
+ subtitle = _ref93.subtitle,
157129
+ adClearanceText = _ref93.adClearanceText,
157130
+ adClearanceFontSize = _ref93.adClearanceFontSize,
157131
+ imageUri = _ref93.imageUri,
157132
+ paddingStyle = _ref93.paddingStyle,
157133
+ colors = _ref93.colors,
157134
+ _onPress3 = _ref93.onPress;
157115
157135
  var scale = (0, import_react30.useRef)(new import_react_native43.Animated.Value(1)).current;
157116
157136
  var clipIdRef = (0, import_react30.useRef)(`clip-${Math.random().toString(36).slice(2)}`);
157117
157137
  var animateScale = function animateScale(toValue) {
@@ -157423,7 +157443,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157423
157443
  return false;
157424
157444
  }
157425
157445
  function _InlineAd(props) {
157426
- var _ad$requestId3, _ad$creative$id2, _ad$creative2, _listCreative$subTitl, _ref99, _listCreative$adClear;
157446
+ var _ad$requestId3, _ad$creative$id2, _ad$creative2, _listCreative$subTitl, _ref98, _listCreative$adClear;
157427
157447
  var adGroupId = props.adGroupId,
157428
157448
  theme = props.theme,
157429
157449
  tone = props.tone,
@@ -157436,14 +157456,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157436
157456
  onAdFailedToRender = props.onAdFailedToRender,
157437
157457
  onNoFill = props.onNoFill;
157438
157458
  var slotIdRef = (0, import_react31.useRef)(createSlotId());
157439
- var _ref95 = (0, import_react31.useState)(null),
157440
- _ref96 = _slicedToArray(_ref95, 2),
157441
- ad = _ref96[0],
157442
- setAd = _ref96[1];
157443
- var _ref97 = (0, import_react31.useState)(true),
157444
- _ref98 = _slicedToArray(_ref97, 2),
157445
- isAdBadgeEnabled = _ref98[0],
157446
- setIsAdBadgeEnabled = _ref98[1];
157459
+ var _ref94 = (0, import_react31.useState)(null),
157460
+ _ref95 = _slicedToArray(_ref94, 2),
157461
+ ad = _ref95[0],
157462
+ setAd = _ref95[1];
157463
+ var _ref96 = (0, import_react31.useState)(true),
157464
+ _ref97 = _slicedToArray(_ref96, 2),
157465
+ isAdBadgeEnabled = _ref97[0],
157466
+ setIsAdBadgeEnabled = _ref97[1];
157447
157467
  var eventTrackerRef = (0, import_react31.useRef)(null);
157448
157468
  var eventPayloadRef = (0, import_react31.useRef)(null);
157449
157469
  var hasRenderedRef = (0, import_react31.useRef)(false);
@@ -157583,7 +157603,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157583
157603
  var listCreative = isListBanner ? ad.creative : null;
157584
157604
  var feedCreative = isFeedBanner ? ad.creative : null;
157585
157605
  var subtitleText = listCreative && isAdBadgeEnabled ? `${listCreative.subTitle} \u2022 AD` : (_listCreative$subTitl = listCreative == null ? void 0 : listCreative.subTitle) != null ? _listCreative$subTitl : "";
157586
- var adClearanceText = (_ref99 = (_listCreative$adClear = listCreative == null ? void 0 : listCreative.adClearanceText) != null ? _listCreative$adClear : feedCreative == null ? void 0 : feedCreative.adClearanceText) != null ? _ref99 : void 0;
157606
+ var adClearanceText = (_ref98 = (_listCreative$adClear = listCreative == null ? void 0 : listCreative.adClearanceText) != null ? _listCreative$adClear : feedCreative == null ? void 0 : feedCreative.adClearanceText) != null ? _ref98 : void 0;
157587
157607
  var adClearanceFontSize = adClearanceText && adClearanceText.length >= 60 ? 6 : 8;
157588
157608
  var imageUri = listCreative != null && listCreative.imageUrl && isSafeUrl(listCreative.imageUrl) ? listCreative.imageUrl : null;
157589
157609
  var brandLogoUri = feedCreative != null && feedCreative.brandLogoUrl && isSafeUrl(feedCreative.brandLogoUrl) ? feedCreative.brandLogoUrl : null;
@@ -157730,7 +157750,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157730
157750
  OverlayProvider: OverlayProvider,
157731
157751
  WebView: _WebView,
157732
157752
  env: _env,
157753
+ homeEvent: _homeEvent,
157733
157754
  loadFullScreenAd: _loadFullScreenAd,
157755
+ safeAreaInsetsChange: _safeAreaInsetsChange,
157734
157756
  showFullScreenAd: _showFullScreenAd,
157735
157757
  useCreateUserAgent: _useCreateUserAgent,
157736
157758
  useGeolocation: _useGeolocation,
@@ -157738,7 +157760,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
157738
157760
  useTopNavigation: _useTopNavigation,
157739
157761
  useWaitForReturnNavigator: _useWaitForReturnNavigator
157740
157762
  }, _$$_REQUIRE(_dependencyMap[8], "@apps-in-toss/analytics"), _$$_REQUIRE(_dependencyMap[9], "@apps-in-toss/native-modules"), _$$_REQUIRE(_dependencyMap[23], "@apps-in-toss/types")));
157741
- },1256,[93,24,25,32,207,16,61,1257,1258,1259,2,1446,18,6,9,2468,2568,534,2569,2607,2614,2630,2477,1260,644],"../../../.yarn/__virtual__/@apps-in-toss-framework-virtual-afbad361af/1/packages/apps-in-toss/framework/dist/index.cjs");
157763
+ },1256,[93,32,207,24,25,16,61,1257,1258,1259,2,1446,18,6,9,2468,2568,534,2569,2607,2614,2630,2477,1260,644],"../../../.yarn/__virtual__/@apps-in-toss-framework-virtual-afbad361af/1/packages/apps-in-toss/framework/dist/index.cjs");
157742
157764
  __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
157743
157765
  function _objectDestructuringEmpty(obj) {
157744
157766
  if (obj == null) throw new TypeError("Cannot destructure undefined");