@apps-in-toss/framework 1.9.2 → 1.9.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.
package/dist/index.cjs CHANGED
@@ -50,10 +50,10 @@ var import_analytics2 = require("@apps-in-toss/analytics");
50
50
 
51
51
  // src/core/registerApp.tsx
52
52
  var import_analytics = require("@apps-in-toss/analytics");
53
- var import_native_modules13 = require("@apps-in-toss/native-modules");
54
- var import_react_native23 = require("@granite-js/react-native");
53
+ var import_native_modules14 = require("@apps-in-toss/native-modules");
54
+ var import_react_native24 = require("@granite-js/react-native");
55
55
  var import_tds_react_native10 = require("@toss/tds-react-native");
56
- var import_react_native24 = require("react-native");
56
+ var import_react_native25 = require("react-native");
57
57
 
58
58
  // src/core/components/AppEvent.tsx
59
59
  var import_native_modules2 = require("@apps-in-toss/native-modules");
@@ -62,7 +62,9 @@ var import_react3 = require("react");
62
62
 
63
63
  // src/env.ts
64
64
  var env = {
65
- getDeploymentId: () => __DEV__ ? "local" : global.__appsInToss?.deploymentId
65
+ getDeploymentId: () => __DEV__ ? "local" : global.__appsInToss?.deploymentId,
66
+ getWebViewType: () => global.__appsInToss.webViewType,
67
+ getAppName: () => global.__granite.app.name
66
68
  };
67
69
 
68
70
  // src/hooks/useCaptureExitLog.ts
@@ -251,9 +253,9 @@ function useNavigationBarContext() {
251
253
  }
252
254
 
253
255
  // src/components/RNAppContainer.tsx
254
- var import_native_modules12 = require("@apps-in-toss/native-modules");
256
+ var import_native_modules13 = require("@apps-in-toss/native-modules");
255
257
  var import_react17 = require("react");
256
- var import_react_native22 = require("react-native");
258
+ var import_react_native23 = require("react-native");
257
259
 
258
260
  // src/components/GameInitializer.tsx
259
261
  var import_native_modules6 = require("@apps-in-toss/native-modules");
@@ -863,8 +865,8 @@ function useNavigationEvent() {
863
865
  }
864
866
 
865
867
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
866
- var import_native_modules11 = require("@apps-in-toss/native-modules");
867
- var import_react_native20 = require("@granite-js/react-native");
868
+ var import_native_modules12 = require("@apps-in-toss/native-modules");
869
+ var import_react_native21 = require("@granite-js/react-native");
868
870
  var import_tds_react_native8 = require("@toss/tds-react-native");
869
871
  var import_private4 = require("@toss/tds-react-native/private");
870
872
  var import_react15 = require("react");
@@ -1053,22 +1055,49 @@ function AppShareListMenu() {
1053
1055
  );
1054
1056
  }
1055
1057
 
1056
- // src/core/hooks/useMoreButtonBottomSheet/PermissionsMenu.tsx
1058
+ // src/core/hooks/useMoreButtonBottomSheet/HomeShortcutMenu.tsx
1057
1059
  var import_native_modules10 = require("@apps-in-toss/native-modules");
1058
- var import_react_native19 = require("@granite-js/react-native");
1060
+ var import_react_native19 = require("react-native");
1059
1061
  var import_jsx_runtime7 = require("react/jsx-runtime");
1060
- function PermissionsMenu() {
1062
+ function HomeShortcutMenu() {
1063
+ const isSandbox = (0, import_native_modules10.getOperationalEnvironment)() === "sandbox";
1061
1064
  const globals = getAppsInTossGlobals();
1062
- if ((0, import_native_modules10.getOperationalEnvironment)() === "sandbox") {
1065
+ if (isSandbox) {
1063
1066
  return null;
1064
1067
  }
1065
1068
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1069
+ Menu,
1070
+ {
1071
+ title: "\uD648 \uD654\uBA74\uC5D0 \uCD94\uAC00",
1072
+ iconURL: "https://static.toss.im/icons/png/4x/icon-plus-circle-mono.png",
1073
+ onPress: () => {
1074
+ import_react_native19.NativeModules.AppsInTossModule.addMiniAppShortcut({
1075
+ title: globals.brandDisplayName,
1076
+ appName: global.__granite.app.name,
1077
+ iconUrl: globals.brandIcon,
1078
+ guideUrl: "https://service.toss.im/app-mini-home/shortcut"
1079
+ });
1080
+ }
1081
+ }
1082
+ );
1083
+ }
1084
+
1085
+ // src/core/hooks/useMoreButtonBottomSheet/PermissionsMenu.tsx
1086
+ var import_native_modules11 = require("@apps-in-toss/native-modules");
1087
+ var import_react_native20 = require("@granite-js/react-native");
1088
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1089
+ function PermissionsMenu() {
1090
+ const globals = getAppsInTossGlobals();
1091
+ if ((0, import_native_modules11.getOperationalEnvironment)() === "sandbox") {
1092
+ return null;
1093
+ }
1094
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1066
1095
  Menu,
1067
1096
  {
1068
1097
  title: "\uAD8C\uD55C \uC124\uC815",
1069
1098
  iconURL: "https://static.toss.im/icons/png/4x/icon-setting-mono.png",
1070
- onPress: () => (0, import_react_native19.openURL)(
1071
- `servicetoss://apps-in-toss-menu/permissions?appName=${import_react_native19.Granite.appName}&displayAppName=${globals.brandDisplayName}`
1099
+ onPress: () => (0, import_react_native20.openURL)(
1100
+ `servicetoss://apps-in-toss-menu/permissions?appName=${import_react_native20.Granite.appName}&displayAppName=${globals.brandDisplayName}`
1072
1101
  )
1073
1102
  }
1074
1103
  );
@@ -1083,7 +1112,7 @@ function ensureValue(value, name) {
1083
1112
  }
1084
1113
 
1085
1114
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
1086
- var import_jsx_runtime8 = require("react/jsx-runtime");
1115
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1087
1116
  var APP_BRIDGE_METHOD_NAME = "getMiniAppsSupportContact";
1088
1117
  var MIN_VERSION = {
1089
1118
  BOTTOM_SHEET: {
@@ -1094,6 +1123,10 @@ var MIN_VERSION = {
1094
1123
  android: "5.230.0",
1095
1124
  ios: "5.230.0"
1096
1125
  },
1126
+ HOME_SHORTCUT_MENU: {
1127
+ android: "5.246.0",
1128
+ ios: "5.246.0"
1129
+ },
1097
1130
  PERMISSIONS_MENU: {
1098
1131
  android: "5.238.0",
1099
1132
  ios: "5.237.0"
@@ -1107,14 +1140,15 @@ function useMoreButtonBottomSheet() {
1107
1140
  const logging = useMoreButtonBottomSheetLogging();
1108
1141
  const overlay = (0, import_private4.useOverlay)();
1109
1142
  const title = ensureValue(globals.brandDisplayName, "displayName");
1110
- const isBottomSheetSupported = (0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
1111
- const isShareListMenuSupported = (0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
1143
+ const isHomeShortcutSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.HOME_SHORTCUT_MENU);
1144
+ const isBottomSheetSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
1145
+ const isShareListMenuSupported = (0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
1112
1146
  const [isPermissionsMenuSupported, setIsPermissionsMenuSupported] = (0, import_react15.useState)(false);
1113
1147
  (0, import_react15.useEffect)(() => {
1114
1148
  if (!isBottomSheetSupported) {
1115
1149
  return;
1116
1150
  }
1117
- import_native_modules11.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1151
+ import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1118
1152
  APP_BRIDGE_METHOD_NAME,
1119
1153
  {},
1120
1154
  {
@@ -1122,8 +1156,8 @@ function useMoreButtonBottomSheet() {
1122
1156
  onError: (error) => console.error("\uBA54\uB274 \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error)
1123
1157
  }
1124
1158
  );
1125
- if ((0, import_native_modules11.isMinVersionSupported)(MIN_VERSION.PERMISSIONS_MENU)) {
1126
- import_native_modules11.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1159
+ if ((0, import_native_modules12.isMinVersionSupported)(MIN_VERSION.PERMISSIONS_MENU)) {
1160
+ import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1127
1161
  "getAllPermission",
1128
1162
  {},
1129
1163
  {
@@ -1147,17 +1181,17 @@ function useMoreButtonBottomSheet() {
1147
1181
  logging.close();
1148
1182
  close();
1149
1183
  };
1150
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BottomSheetImpressionArea, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1184
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BottomSheetImpressionArea, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1151
1185
  import_tds_react_native8.BottomSheet.Root,
1152
1186
  {
1153
- header: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1187
+ header: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1154
1188
  import_tds_react_native8.ListHeader,
1155
1189
  {
1156
- title: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tds_react_native8.ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
1190
+ title: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_tds_react_native8.ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
1157
1191
  }
1158
1192
  ),
1159
1193
  open: isOpen,
1160
- cta: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1194
+ cta: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1161
1195
  import_tds_react_native8.BottomSheet.CTA,
1162
1196
  {
1163
1197
  size: "large",
@@ -1171,18 +1205,19 @@ function useMoreButtonBottomSheet() {
1171
1205
  ),
1172
1206
  onClose: handleClose,
1173
1207
  onExited: exit,
1174
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_tds_react_native8.List, { rowSeparator: "none", children: [
1175
- itemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1208
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_tds_react_native8.List, { rowSeparator: "none", children: [
1209
+ itemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1176
1210
  Menu,
1177
1211
  {
1178
1212
  title: item.contactItemName,
1179
1213
  iconURL: item.contactIconUrl,
1180
- onPress: () => (0, import_react_native20.openURL)(item.contactUri)
1214
+ onPress: () => (0, import_react_native21.openURL)(item.contactUri)
1181
1215
  },
1182
1216
  item.contactItemName
1183
1217
  )),
1184
- isShareListMenuSupported && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AppShareListMenu, {}),
1185
- isPermissionsMenuSupported && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PermissionsMenu, {})
1218
+ isHomeShortcutSupported && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(HomeShortcutMenu, {}),
1219
+ isShareListMenuSupported && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AppShareListMenu, {}),
1220
+ isPermissionsMenuSupported && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PermissionsMenu, {})
1186
1221
  ] })
1187
1222
  }
1188
1223
  ) });
@@ -1195,7 +1230,7 @@ function BottomSheetImpressionArea({ children }) {
1195
1230
  (0, import_react15.useEffect)(() => {
1196
1231
  logging.show();
1197
1232
  }, [logging]);
1198
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children });
1233
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children });
1199
1234
  }
1200
1235
 
1201
1236
  // src/core/utils/toIcon.ts
@@ -1205,7 +1240,7 @@ function toIcon(source) {
1205
1240
 
1206
1241
  // src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
1207
1242
  var import_react16 = require("react");
1208
- var import_jsx_runtime9 = require("react/jsx-runtime");
1243
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1209
1244
  function NavigationBarImpressionArea({
1210
1245
  children,
1211
1246
  withHomeButton
@@ -1218,11 +1253,11 @@ function NavigationBarImpressionArea({
1218
1253
  hasLogged.current = true;
1219
1254
  }
1220
1255
  }, [logging, withHomeButton]);
1221
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children });
1256
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children });
1222
1257
  }
1223
1258
 
1224
1259
  // src/components/NavigationBar/RNNavigationBar/Default.tsx
1225
- var import_jsx_runtime10 = require("react/jsx-runtime");
1260
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1226
1261
  function DefaultNavigationBar() {
1227
1262
  const globals = getAppsInTossGlobals();
1228
1263
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
@@ -1232,7 +1267,7 @@ function DefaultNavigationBar() {
1232
1267
  const { navigationRightButton } = useNavigationBarContext();
1233
1268
  const navigationEvent = useNavigationEvent();
1234
1269
  useHardwareBackPress(navigationEvent.handleBack);
1235
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1270
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1236
1271
  import_private5.TopNavigation,
1237
1272
  {
1238
1273
  title: globals.brandDisplayName,
@@ -1244,7 +1279,7 @@ function DefaultNavigationBar() {
1244
1279
  withHome: withHomeButton,
1245
1280
  fixedRightButton: navigationRightButton,
1246
1281
  leftVisible: withBackButton,
1247
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_private5.NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_private5.NavigationBackButton, { onPress: navigationEvent.handleBack, canGoBack: false }) })
1282
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_private5.NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_private5.NavigationBackButton, { onPress: navigationEvent.handleBack, canGoBack: false }) })
1248
1283
  }
1249
1284
  ) });
1250
1285
  }
@@ -1253,8 +1288,8 @@ function DefaultNavigationBar() {
1253
1288
  var import_react_native_safe_area_context = require("@granite-js/native/react-native-safe-area-context");
1254
1289
  var import_tds_react_native9 = require("@toss/tds-react-native");
1255
1290
  var import_private6 = require("@toss/tds-react-native/private");
1256
- var import_react_native21 = require("react-native");
1257
- var import_jsx_runtime11 = require("react/jsx-runtime");
1291
+ var import_react_native22 = require("react-native");
1292
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1258
1293
  function GameNavigationBar() {
1259
1294
  const safeAreaTop = (0, import_private6.useSafeAreaTop)();
1260
1295
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
@@ -1262,15 +1297,15 @@ function GameNavigationBar() {
1262
1297
  const { navigationRightButton } = useNavigationBarContext();
1263
1298
  const { right: safeAreaRight } = (0, import_react_native_safe_area_context.useSafeAreaInsets)();
1264
1299
  useHardwareBackPress(navigationEvent.handleBack);
1265
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1266
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_tds_react_native9.PageNavbar, { preference: { type: "none" } }),
1267
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1268
- import_react_native21.View,
1300
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1301
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tds_react_native9.PageNavbar, { preference: { type: "none" } }),
1302
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1303
+ import_react_native22.View,
1269
1304
  {
1270
1305
  style: {
1271
1306
  width: "100%",
1272
1307
  // TODO: UI관련 스타일 설정은 TDS로 이관
1273
- height: import_react_native21.Platform.OS === "ios" ? 44 : 54,
1308
+ height: import_react_native22.Platform.OS === "ios" ? 44 : 54,
1274
1309
  flexDirection: "row",
1275
1310
  alignItems: "center",
1276
1311
  justifyContent: "flex-end",
@@ -1280,7 +1315,7 @@ function GameNavigationBar() {
1280
1315
  paddingRight: safeAreaRight + 10
1281
1316
  },
1282
1317
  pointerEvents: "box-none",
1283
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1318
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1284
1319
  import_private6.NavigationRightContent,
1285
1320
  {
1286
1321
  fixedRightButton: navigationRightButton,
@@ -1307,71 +1342,71 @@ __reExport(bridge_entry_exports, require("@apps-in-toss/native-modules/constant-
1307
1342
  __reExport(bridge_entry_exports, require("@apps-in-toss/native-modules/event-bridges"));
1308
1343
 
1309
1344
  // src/components/RNAppContainer.tsx
1310
- var import_jsx_runtime12 = require("react/jsx-runtime");
1345
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1311
1346
  function RNAppContainer({ children }) {
1312
1347
  const global2 = getAppsInTossGlobals();
1313
1348
  switch (global2.appType) {
1314
1349
  case "game":
1315
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameAppContainer, { children });
1350
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GameAppContainer, { children });
1316
1351
  case "general":
1317
1352
  default:
1318
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GeneralAppContainer, { children });
1353
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GeneralAppContainer, { children });
1319
1354
  }
1320
1355
  }
1321
1356
  function GameAppContainer({ children }) {
1322
1357
  (0, import_react17.useEffect)(() => {
1323
- if (import_react_native22.Platform.OS === "ios") {
1324
- (0, import_native_modules12.setIosSwipeGestureEnabled)({ isEnabled: false });
1358
+ if (import_react_native23.Platform.OS === "ios") {
1359
+ (0, import_native_modules13.setIosSwipeGestureEnabled)({ isEnabled: false });
1325
1360
  return () => {
1326
- (0, import_native_modules12.setIosSwipeGestureEnabled)({ isEnabled: true });
1361
+ (0, import_native_modules13.setIosSwipeGestureEnabled)({ isEnabled: true });
1327
1362
  };
1328
1363
  }
1329
1364
  return;
1330
1365
  }, []);
1331
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1332
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RNNavigationBar.Game, {}),
1333
- (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GameInitializer, { children }) : children
1366
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1367
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RNNavigationBar.Game, {}),
1368
+ (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GameInitializer, { children }) : children
1334
1369
  ] });
1335
1370
  }
1336
1371
  function GeneralAppContainer({ children }) {
1337
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1338
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RNNavigationBar.Default, {}),
1372
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1373
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RNNavigationBar.Default, {}),
1339
1374
  children
1340
1375
  ] });
1341
1376
  }
1342
1377
 
1343
1378
  // src/core/registerApp.tsx
1344
- var import_jsx_runtime13 = require("react/jsx-runtime");
1379
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1345
1380
  function AppsInTossContainer(Container, { children, ...initialProps }) {
1346
- if (!(0, import_native_modules13.isMinVersionSupported)({
1381
+ if (!(0, import_native_modules14.isMinVersionSupported)({
1347
1382
  android: "5.220.0",
1348
1383
  ios: "5.221.0"
1349
1384
  })) {
1350
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1351
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.Entry, {}),
1352
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.System, { ...initialProps }),
1353
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppUpdate, {})
1385
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1386
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppEvent.Entry, {}),
1387
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppEvent.System, { ...initialProps }),
1388
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppUpdate, {})
1354
1389
  ] });
1355
1390
  }
1356
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1357
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.StayTime, {}),
1358
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.Entry, {}),
1359
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AppEvent.System, { ...initialProps }),
1360
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tds_react_native10.TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
1391
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1392
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppEvent.StayTime, {}),
1393
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppEvent.Entry, {}),
1394
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppEvent.System, { ...initialProps }),
1395
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native10.TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
1361
1396
  ] });
1362
1397
  }
1363
1398
  function registerApp(container, { context, analytics }) {
1364
1399
  const appName = getAppName();
1365
- const isRegistered = import_react_native24.AppRegistry.getAppKeys().includes(appName);
1400
+ const isRegistered = import_react_native25.AppRegistry.getAppKeys().includes(appName);
1366
1401
  if (!isRegistered) {
1367
1402
  import_analytics.Analytics.init({
1368
- logger: (params) => void (0, import_native_modules13.eventLog)(params),
1403
+ logger: (params) => void (0, import_native_modules14.eventLog)(params),
1369
1404
  debug: analytics?.debug ?? __DEV__
1370
1405
  });
1371
- const App = import_react_native23.Granite.registerApp(AppsInTossContainer.bind(null, container), {
1406
+ const App = import_react_native24.Granite.registerApp(AppsInTossContainer.bind(null, container), {
1372
1407
  appName,
1373
1408
  context,
1374
- setIosSwipeGestureEnabled: import_native_modules13.setIosSwipeGestureEnabled,
1409
+ setIosSwipeGestureEnabled: import_native_modules14.setIosSwipeGestureEnabled,
1375
1410
  router: {
1376
1411
  screenContainer: AppsInTossScreenContainer,
1377
1412
  defaultScreenOption: {
@@ -1385,7 +1420,7 @@ function registerApp(container, { context, analytics }) {
1385
1420
  }
1386
1421
  function AppsInTossScreenContainer({ children }) {
1387
1422
  const isRNApp = getAppsInTossGlobals().webViewType == null;
1388
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NavigationBarContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_analytics.Analytics.Screen, { children: isRNApp ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RNAppContainer, { children }) : children }) });
1423
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NavigationBarContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_analytics.Analytics.Screen, { children: isRNApp ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RNAppContainer, { children }) : children }) });
1389
1424
  }
1390
1425
  function getAppName() {
1391
1426
  try {
@@ -1402,32 +1437,33 @@ var AppsInToss = {
1402
1437
  };
1403
1438
 
1404
1439
  // src/components/WebView.tsx
1405
- var import_native_modules23 = require("@apps-in-toss/native-modules");
1440
+ var import_native_modules24 = require("@apps-in-toss/native-modules");
1406
1441
  var appsInTossAsyncBridges = __toESM(require("@apps-in-toss/native-modules/async-bridges"), 1);
1407
1442
  var appsInTossConstantBridges = __toESM(require("@apps-in-toss/native-modules/constant-bridges"), 1);
1408
1443
  var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event-bridges"), 1);
1444
+ var import_user_scripts = require("@apps-in-toss/user-scripts");
1409
1445
  var import_react_native_safe_area_context4 = require("@granite-js/native/react-native-safe-area-context");
1410
- var import_react_native38 = require("@granite-js/react-native");
1446
+ var import_react_native39 = require("@granite-js/react-native");
1411
1447
  var import_tds_react_native15 = require("@toss/tds-react-native");
1412
1448
  var import_private9 = require("@toss/tds-react-native/private");
1413
1449
  var import_react28 = require("react");
1414
- var import_react_native39 = require("react-native");
1450
+ var import_react_native40 = require("react-native");
1415
1451
 
1416
1452
  // src/components/GameWebView.tsx
1417
- var import_native_modules14 = require("@apps-in-toss/native-modules");
1453
+ var import_native_modules15 = require("@apps-in-toss/native-modules");
1418
1454
  var import_react_native_webview = require("@granite-js/native/react-native-webview");
1419
1455
  var import_react19 = require("react");
1420
- var import_react_native27 = require("react-native");
1456
+ var import_react_native28 = require("react-native");
1421
1457
 
1422
1458
  // src/components/NavigationBar/GameWebviewNavigationBar.tsx
1423
1459
  var import_react_native_safe_area_context2 = require("@granite-js/native/react-native-safe-area-context");
1424
- var import_react_native25 = require("@granite-js/react-native");
1460
+ var import_react_native26 = require("@granite-js/react-native");
1425
1461
  var import_tds_react_native11 = require("@toss/tds-react-native");
1426
1462
  var import_private7 = require("@toss/tds-react-native/private");
1427
1463
  var import_es_hangul3 = require("es-hangul");
1428
1464
  var import_react18 = require("react");
1429
- var import_react_native26 = require("react-native");
1430
- var import_jsx_runtime14 = require("react/jsx-runtime");
1465
+ var import_react_native27 = require("react-native");
1466
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1431
1467
  function GameWebviewNavigationBar() {
1432
1468
  const safeAreaTop = (0, import_private7.useSafeAreaTop)();
1433
1469
  const { openConfirm } = (0, import_tds_react_native11.useDialog)();
@@ -1449,18 +1485,18 @@ function GameWebviewNavigationBar() {
1449
1485
  logging.closePopupCtaClick(isConfirmed);
1450
1486
  if (isConfirmed) {
1451
1487
  captureExitLog(Date.now());
1452
- (0, import_react_native25.closeView)();
1488
+ (0, import_react_native26.closeView)();
1453
1489
  }
1454
1490
  }, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
1455
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1456
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native11.PageNavbar, { preference: { type: "none" } }),
1457
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1458
- import_react_native26.View,
1491
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
1492
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_tds_react_native11.PageNavbar, { preference: { type: "none" } }),
1493
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1494
+ import_react_native27.View,
1459
1495
  {
1460
1496
  style: {
1461
1497
  width: "100%",
1462
1498
  // TODO: UI관련 스타일 설정은 TDS로 이관
1463
- height: import_react_native26.Platform.OS === "ios" ? 44 : 54,
1499
+ height: import_react_native27.Platform.OS === "ios" ? 44 : 54,
1464
1500
  flexDirection: "row",
1465
1501
  alignItems: "center",
1466
1502
  justifyContent: "flex-end",
@@ -1470,7 +1506,7 @@ function GameWebviewNavigationBar() {
1470
1506
  paddingRight: safeAreaRight + 10
1471
1507
  },
1472
1508
  pointerEvents: "box-none",
1473
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1509
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1474
1510
  import_private7.NavigationRightContent,
1475
1511
  {
1476
1512
  fixedRightButton: navigationRightButton,
@@ -1487,20 +1523,20 @@ function GameWebviewNavigationBar() {
1487
1523
  }
1488
1524
 
1489
1525
  // src/components/GameWebView.tsx
1490
- var import_jsx_runtime15 = require("react/jsx-runtime");
1526
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1491
1527
  var GameWebView = (0, import_react19.forwardRef)(function GameWebView2(props, ref) {
1492
1528
  (0, import_react19.useEffect)(() => {
1493
- if (import_react_native27.Platform.OS === "ios") {
1494
- (0, import_native_modules14.setIosSwipeGestureEnabled)({ isEnabled: false });
1529
+ if (import_react_native28.Platform.OS === "ios") {
1530
+ (0, import_native_modules15.setIosSwipeGestureEnabled)({ isEnabled: false });
1495
1531
  return () => {
1496
- (0, import_native_modules14.setIosSwipeGestureEnabled)({ isEnabled: true });
1532
+ (0, import_native_modules15.setIosSwipeGestureEnabled)({ isEnabled: true });
1497
1533
  };
1498
1534
  }
1499
1535
  return;
1500
1536
  }, []);
1501
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
1502
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GameWebviewNavigationBar, {}),
1503
- (0, import_native_modules14.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GameInitializer, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_webview.WebView, { ref, ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native_webview.WebView, { ref, ...props })
1537
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1538
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GameWebviewNavigationBar, {}),
1539
+ (0, import_native_modules15.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GameInitializer, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native_webview.WebView, { ref, ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native_webview.WebView, { ref, ...props })
1504
1540
  ] });
1505
1541
  });
1506
1542
 
@@ -1509,12 +1545,12 @@ var import_react_native_webview2 = require("@granite-js/native/react-native-webv
1509
1545
  var import_react21 = require("react");
1510
1546
 
1511
1547
  // src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
1512
- var import_react_native28 = require("@granite-js/react-native");
1548
+ var import_react_native29 = require("@granite-js/react-native");
1513
1549
  var import_tds_react_native12 = require("@toss/tds-react-native");
1514
1550
  var import_private8 = require("@toss/tds-react-native/private");
1515
1551
  var import_es_hangul4 = require("es-hangul");
1516
1552
  var import_react20 = require("react");
1517
- var import_jsx_runtime16 = require("react/jsx-runtime");
1553
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1518
1554
  function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1519
1555
  const globals = getAppsInTossGlobals();
1520
1556
  const { captureExitLog } = useCaptureExitLog();
@@ -1537,10 +1573,10 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1537
1573
  logging.closePopupCtaClick(isConfirmed);
1538
1574
  if (isConfirmed) {
1539
1575
  captureExitLog(Date.now());
1540
- (0, import_react_native28.closeView)();
1576
+ (0, import_react_native29.closeView)();
1541
1577
  }
1542
1578
  }, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
1543
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1579
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1544
1580
  import_private8.TopNavigation,
1545
1581
  {
1546
1582
  title: globals.brandDisplayName,
@@ -1552,17 +1588,17 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1552
1588
  withHome: withHomeButton,
1553
1589
  fixedRightButton: navigationRightButton,
1554
1590
  leftVisible: withBackButton,
1555
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_private8.NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_private8.NavigationBackButton, { onPress: onBackButtonClick, canGoBack: false }) })
1591
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_private8.NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_private8.NavigationBackButton, { onPress: onBackButtonClick, canGoBack: false }) })
1556
1592
  }
1557
1593
  ) });
1558
1594
  }
1559
1595
 
1560
1596
  // src/components/PartnerWebView.tsx
1561
- var import_jsx_runtime17 = require("react/jsx-runtime");
1597
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1562
1598
  var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
1563
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1564
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
1565
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native_webview2.WebView, { ref, ...webViewProps, style: { flex: 1 } })
1599
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
1600
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
1601
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native_webview2.WebView, { ref, ...webViewProps, style: { flex: 1 } })
1566
1602
  ] });
1567
1603
  });
1568
1604
 
@@ -1580,7 +1616,7 @@ function convertIntentURL(url) {
1580
1616
  }
1581
1617
 
1582
1618
  // src/ads/fetchTossAd.ts
1583
- var import_native_modules15 = require("@apps-in-toss/native-modules");
1619
+ var import_native_modules16 = require("@apps-in-toss/native-modules");
1584
1620
 
1585
1621
  // ../../../.yarn/cache/es-toolkit-npm-1.34.1-4cd6371dcb-aab6d07be3.zip/node_modules/es-toolkit/dist/function/noop.mjs
1586
1622
  function noop() {
@@ -1602,7 +1638,7 @@ var sessionId = generateSessionId();
1602
1638
  var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
1603
1639
  var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
1604
1640
  var UNSUPPORTED_ERROR_MESSAGE = "This feature is not supported in the current environment";
1605
- var ENVIRONMENT = (0, import_native_modules15.getOperationalEnvironment)();
1641
+ var ENVIRONMENT = (0, import_native_modules16.getOperationalEnvironment)();
1606
1642
  function fetchTossAd(params) {
1607
1643
  if (!fetchTossAd.isSupported()) {
1608
1644
  params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE));
@@ -1610,7 +1646,7 @@ function fetchTossAd(params) {
1610
1646
  }
1611
1647
  const { onEvent, onError, options } = params;
1612
1648
  const { adGroupId } = options;
1613
- const unregisterCallbacks = import_native_modules15.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1649
+ const unregisterCallbacks = import_native_modules16.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1614
1650
  "fetchTossAd",
1615
1651
  { spaceUnitId: adGroupId, sessionId, sdkId: options.sdkId, availableStyleIds: options.availableStyleIds },
1616
1652
  {
@@ -1628,14 +1664,14 @@ fetchTossAd.isSupported = () => {
1628
1664
  if (ENVIRONMENT !== "toss") {
1629
1665
  return false;
1630
1666
  }
1631
- return (0, import_native_modules15.isMinVersionSupported)({
1667
+ return (0, import_native_modules16.isMinVersionSupported)({
1632
1668
  android: ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION,
1633
1669
  ios: IOS_FETCH_TOSS_AD_SUPPORTED_VERSION
1634
1670
  });
1635
1671
  };
1636
1672
 
1637
1673
  // src/ads/integratedAd.ts
1638
- var import_native_modules17 = require("@apps-in-toss/native-modules");
1674
+ var import_native_modules18 = require("@apps-in-toss/native-modules");
1639
1675
 
1640
1676
  // src/ads/generateRequestId.ts
1641
1677
  function generateRequestId() {
@@ -1645,32 +1681,32 @@ function generateRequestId() {
1645
1681
  }
1646
1682
 
1647
1683
  // src/ads/getReferrer.ts
1648
- var import_react_native29 = require("@granite-js/react-native");
1684
+ var import_react_native30 = require("@granite-js/react-native");
1649
1685
  function getReferrer() {
1650
1686
  try {
1651
- return new URL((0, import_react_native29.getSchemeUri)()).searchParams.get("referrer");
1687
+ return new URL((0, import_react_native30.getSchemeUri)()).searchParams.get("referrer");
1652
1688
  } catch {
1653
1689
  return null;
1654
1690
  }
1655
1691
  }
1656
1692
 
1657
1693
  // src/ads/remotes.ts
1658
- var import_native_modules16 = require("@apps-in-toss/native-modules");
1694
+ var import_native_modules17 = require("@apps-in-toss/native-modules");
1659
1695
 
1660
1696
  // src/ads/getIsDev.ts
1661
- var import_react_native30 = require("@granite-js/react-native");
1697
+ var import_react_native31 = require("@granite-js/react-native");
1662
1698
  function getIsDev() {
1663
1699
  try {
1664
- return new URL((0, import_react_native30.getSchemeUri)()).searchParams.get("isDev") === "true";
1700
+ return new URL((0, import_react_native31.getSchemeUri)()).searchParams.get("isDev") === "true";
1665
1701
  } catch {
1666
1702
  return false;
1667
1703
  }
1668
1704
  }
1669
1705
 
1670
1706
  // src/ads/remotes.ts
1671
- var OPERATIONAL_ENVIRONMENT = (0, import_native_modules16.getOperationalEnvironment)();
1672
- var OS = (0, import_native_modules16.getPlatformOS)();
1673
- var APP_VER = (0, import_native_modules16.getTossAppVersion)();
1707
+ var OPERATIONAL_ENVIRONMENT = (0, import_native_modules17.getOperationalEnvironment)();
1708
+ var OS = (0, import_native_modules17.getPlatformOS)();
1709
+ var APP_VER = (0, import_native_modules17.getTossAppVersion)();
1674
1710
  var ALPHA_EVENT_TRACKER_HTTP_ENDPOINT = "https://alpha-trillion.toss.im/trk/sdk-mediation/event";
1675
1711
  var LIVE_EVENT_TRACKER_HTTP_ENDPOINT = "https://trillion.toss.im/trk/sdk-mediation/event";
1676
1712
  function getPostEventTrackingUrl() {
@@ -1705,19 +1741,19 @@ var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.244.1";
1705
1741
  var UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
1706
1742
  var INTG_AD_ADM_FALLBACK_RID_MAP = {};
1707
1743
  function integratedAdIsSupported() {
1708
- return (0, import_native_modules17.isMinVersionSupported)({
1744
+ return (0, import_native_modules18.isMinVersionSupported)({
1709
1745
  android: ANDROID_INTEGRATED_AD_SUPPORTED_VERSION,
1710
1746
  ios: IOS_INTEGRATED_AD_SUPPORTED_VERSION
1711
1747
  });
1712
1748
  }
1713
1749
  function generateLoadFullScreenAd(sdkId) {
1714
1750
  const fn = (params) => {
1715
- if (!import_native_modules17.GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
1751
+ if (!import_native_modules18.GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
1716
1752
  params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
1717
1753
  return noop;
1718
1754
  }
1719
1755
  if (!integratedAdIsSupported()) {
1720
- return import_native_modules17.GoogleAdMob.loadAppsInTossAdMob({
1756
+ return import_native_modules18.GoogleAdMob.loadAppsInTossAdMob({
1721
1757
  ...params,
1722
1758
  onEvent: (event) => {
1723
1759
  if (event.type === "loaded") {
@@ -1755,7 +1791,7 @@ function generateLoadFullScreenAd(sdkId) {
1755
1791
  const { onEvent, onError, options } = params;
1756
1792
  const { adGroupId } = options;
1757
1793
  const referrer = getReferrer();
1758
- const unregisterCallbacks = import_native_modules17.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1794
+ const unregisterCallbacks = import_native_modules18.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1759
1795
  "loadTossAdOrAdmob",
1760
1796
  { spaceUnitId: adGroupId, referrer, sessionId, sdkId },
1761
1797
  {
@@ -1769,18 +1805,18 @@ function generateLoadFullScreenAd(sdkId) {
1769
1805
  );
1770
1806
  return unregisterCallbacks;
1771
1807
  };
1772
- fn.isSupported = import_native_modules17.GoogleAdMob.loadAppsInTossAdMob.isSupported;
1808
+ fn.isSupported = import_native_modules18.GoogleAdMob.loadAppsInTossAdMob.isSupported;
1773
1809
  return fn;
1774
1810
  }
1775
1811
  var loadFullScreenAd = generateLoadFullScreenAd("107");
1776
1812
  var loadFullScreenAdForWeb = generateLoadFullScreenAd("107");
1777
1813
  function showFullScreenAd(params) {
1778
- if (!import_native_modules17.GoogleAdMob.showAppsInTossAdMob.isSupported()) {
1814
+ if (!import_native_modules18.GoogleAdMob.showAppsInTossAdMob.isSupported()) {
1779
1815
  params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
1780
1816
  return noop;
1781
1817
  }
1782
1818
  if (!integratedAdIsSupported()) {
1783
- return import_native_modules17.GoogleAdMob.showAppsInTossAdMob({
1819
+ return import_native_modules18.GoogleAdMob.showAppsInTossAdMob({
1784
1820
  ...params,
1785
1821
  onEvent: (event) => {
1786
1822
  const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
@@ -1879,7 +1915,7 @@ function showFullScreenAd(params) {
1879
1915
  const { onEvent, onError, options } = params;
1880
1916
  const { adGroupId } = options;
1881
1917
  const referrer = getReferrer();
1882
- const unregisterCallbacks = import_native_modules17.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1918
+ const unregisterCallbacks = import_native_modules18.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
1883
1919
  "showTossAdOrAdmob",
1884
1920
  { spaceUnitId: adGroupId, referrer, sessionId },
1885
1921
  {
@@ -1911,14 +1947,14 @@ function showFullScreenAd(params) {
1911
1947
  );
1912
1948
  return unregisterCallbacks;
1913
1949
  }
1914
- showFullScreenAd.isSupported = import_native_modules17.GoogleAdMob.showAppsInTossAdMob.isSupported;
1950
+ showFullScreenAd.isSupported = import_native_modules18.GoogleAdMob.showAppsInTossAdMob.isSupported;
1915
1951
 
1916
1952
  // src/ads/tossAdEventLog.ts
1917
- var import_native_modules18 = require("@apps-in-toss/native-modules");
1918
- var import_react_native31 = require("@granite-js/react-native");
1953
+ var import_native_modules19 = require("@apps-in-toss/native-modules");
1954
+ var import_react_native32 = require("@granite-js/react-native");
1919
1955
  async function tossAdEventLog(params) {
1920
1956
  const referrer = getReferrer();
1921
- const appName = import_react_native31.Granite.appName;
1957
+ const appName = import_react_native32.Granite.appName;
1922
1958
  const eventLogParams = {
1923
1959
  ...params,
1924
1960
  params: {
@@ -1927,7 +1963,7 @@ async function tossAdEventLog(params) {
1927
1963
  app_name: appName
1928
1964
  }
1929
1965
  };
1930
- return import_native_modules18.INTERNAL__module.tossCoreEventLog(eventLogParams);
1966
+ return import_native_modules19.INTERNAL__module.tossCoreEventLog(eventLogParams);
1931
1967
  }
1932
1968
 
1933
1969
  // src/bridge-handler/useBridgeHandler.tsx
@@ -2105,7 +2141,7 @@ function useSafeAreaInsetsEmitter() {
2105
2141
  }
2106
2142
 
2107
2143
  // src/core/hooks/useWebBackHandler.tsx
2108
- var import_react_native32 = require("@granite-js/react-native");
2144
+ var import_react_native33 = require("@granite-js/react-native");
2109
2145
  var import_tds_react_native13 = require("@toss/tds-react-native");
2110
2146
  var import_es_hangul5 = require("es-hangul");
2111
2147
  var import_react25 = require("react");
@@ -2163,7 +2199,7 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
2163
2199
  hasBackEvent: hasWebBackEvent,
2164
2200
  addEventListener: addWebBackEventListener,
2165
2201
  removeEventListener: removeWebBackEventListener
2166
- } = (0, import_react_native32.useBackEventState)();
2202
+ } = (0, import_react_native33.useBackEventState)();
2167
2203
  const logging = useNavigationBarLogging();
2168
2204
  const { openConfirm } = (0, import_tds_react_native13.useDialog)();
2169
2205
  const global2 = getAppsInTossGlobals();
@@ -2199,7 +2235,7 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
2199
2235
  logging.closePopupCtaClick(isConfirmed);
2200
2236
  if (isConfirmed) {
2201
2237
  captureExitLog(Date.now());
2202
- (0, import_react_native32.closeView)();
2238
+ (0, import_react_native33.closeView)();
2203
2239
  }
2204
2240
  }
2205
2241
  }, [
@@ -2247,8 +2283,8 @@ function mergeRefs(...refs) {
2247
2283
  }
2248
2284
 
2249
2285
  // src/hooks/useCreateUserAgent.ts
2250
- var import_native_modules19 = require("@apps-in-toss/native-modules");
2251
- var import_react_native33 = require("react-native");
2286
+ var import_native_modules20 = require("@apps-in-toss/native-modules");
2287
+ var import_react_native34 = require("react-native");
2252
2288
  var FontA11yCategory = {
2253
2289
  Large: "Large",
2254
2290
  xLarge: "xLarge",
@@ -2381,9 +2417,9 @@ function useCreateUserAgent({
2381
2417
  safeArea,
2382
2418
  safeAreaBottomTransparency
2383
2419
  }) {
2384
- const platform = (0, import_native_modules19.getPlatformOS)();
2385
- const appVersion = (0, import_native_modules19.getTossAppVersion)();
2386
- const { fontScale } = (0, import_react_native33.useWindowDimensions)();
2420
+ const platform = (0, import_native_modules20.getPlatformOS)();
2421
+ const appVersion = (0, import_native_modules20.getTossAppVersion)();
2422
+ const { fontScale } = (0, import_react_native34.useWindowDimensions)();
2387
2423
  const platformString = platform === "ios" ? "iPhone" : "Android phone";
2388
2424
  const fontA11y = mapFontScaleToCategory(fontScale, platform);
2389
2425
  const normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
@@ -2404,17 +2440,17 @@ function useCreateUserAgent({
2404
2440
  }
2405
2441
 
2406
2442
  // src/hooks/useGeolocation.ts
2407
- var import_native_modules20 = require("@apps-in-toss/native-modules");
2408
- var import_react_native34 = require("@granite-js/react-native");
2443
+ var import_native_modules21 = require("@apps-in-toss/native-modules");
2444
+ var import_react_native35 = require("@granite-js/react-native");
2409
2445
  var import_react26 = require("react");
2410
2446
  function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2411
- const isVisible = (0, import_react_native34.useVisibility)();
2447
+ const isVisible = (0, import_react_native35.useVisibility)();
2412
2448
  const [location, setLocation] = (0, import_react26.useState)(null);
2413
2449
  (0, import_react26.useEffect)(() => {
2414
2450
  if (!isVisible) {
2415
2451
  return;
2416
2452
  }
2417
- return (0, import_native_modules20.startUpdateLocation)({
2453
+ return (0, import_native_modules21.startUpdateLocation)({
2418
2454
  options: {
2419
2455
  accuracy,
2420
2456
  distanceInterval,
@@ -2428,11 +2464,11 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2428
2464
  }
2429
2465
 
2430
2466
  // src/hooks/useWaitForReturnNavigator.tsx
2431
- var import_react_native35 = require("@granite-js/react-native");
2467
+ var import_react_native36 = require("@granite-js/react-native");
2432
2468
  var import_react27 = require("react");
2433
2469
  function useWaitForReturnNavigator() {
2434
2470
  const callbacks = (0, import_react27.useRef)([]).current;
2435
- const navigation = (0, import_react_native35.useNavigation)();
2471
+ const navigation = (0, import_react_native36.useNavigation)();
2436
2472
  const startNavigating = (0, import_react27.useCallback)(
2437
2473
  (route, params) => {
2438
2474
  return new Promise((resolve) => {
@@ -2453,7 +2489,7 @@ function useWaitForReturnNavigator() {
2453
2489
  },
2454
2490
  [callbacks]
2455
2491
  );
2456
- (0, import_react_native35.useVisibilityChange)(handleVisibilityChange);
2492
+ (0, import_react_native36.useVisibilityChange)(handleVisibilityChange);
2457
2493
  return startNavigating;
2458
2494
  }
2459
2495
 
@@ -2467,8 +2503,8 @@ function useTopNavigation() {
2467
2503
  }
2468
2504
 
2469
2505
  // src/hooks/useWebViewMemoryDebug.tsx
2470
- var import_native_modules21 = require("@apps-in-toss/native-modules");
2471
- var import_react_native36 = require("@granite-js/react-native");
2506
+ var import_native_modules22 = require("@apps-in-toss/native-modules");
2507
+ var import_react_native37 = require("@granite-js/react-native");
2472
2508
  var import_tds_react_native14 = require("@toss/tds-react-native");
2473
2509
  function useHandleWebViewProcessDidTerminate(webViewRef) {
2474
2510
  const toast = (0, import_tds_react_native14.useToast)();
@@ -2491,20 +2527,20 @@ function webViewDebugLog(logName, params) {
2491
2527
  log_type: "debug",
2492
2528
  params: {
2493
2529
  ...params,
2494
- app_name: import_react_native36.Granite.appName,
2530
+ app_name: import_react_native37.Granite.appName,
2495
2531
  deployment_id: global2.deploymentId
2496
2532
  }
2497
2533
  };
2498
- if ((0, import_native_modules21.getOperationalEnvironment)() === "toss") {
2499
- import_native_modules21.INTERNAL__module.tossCoreEventLog(event);
2534
+ if ((0, import_native_modules22.getOperationalEnvironment)() === "toss") {
2535
+ import_native_modules22.INTERNAL__module.tossCoreEventLog(event);
2500
2536
  } else {
2501
2537
  console.log("[webViewDebugLog]", event);
2502
2538
  }
2503
2539
  }
2504
2540
 
2505
2541
  // src/utils/log.ts
2506
- var import_native_modules22 = require("@apps-in-toss/native-modules");
2507
- var import_react_native37 = require("@granite-js/react-native");
2542
+ var import_native_modules23 = require("@apps-in-toss/native-modules");
2543
+ var import_react_native38 = require("@granite-js/react-native");
2508
2544
 
2509
2545
  // src/utils/extractDateFromUUIDv7.ts
2510
2546
  var extractDateFromUUIDv7 = (uuid) => {
@@ -2530,7 +2566,7 @@ var getGroupId = (url) => {
2530
2566
  };
2531
2567
  var getReferrer2 = () => {
2532
2568
  try {
2533
- const referrer = new URL((0, import_react_native37.getSchemeUri)());
2569
+ const referrer = new URL((0, import_react_native38.getSchemeUri)());
2534
2570
  return referrer.searchParams.get("referrer");
2535
2571
  } catch {
2536
2572
  return "";
@@ -2548,11 +2584,11 @@ var trackScreen = (url) => {
2548
2584
  deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
2549
2585
  }
2550
2586
  };
2551
- return (0, import_native_modules22.eventLog)(log);
2587
+ return (0, import_native_modules23.eventLog)(log);
2552
2588
  };
2553
2589
 
2554
2590
  // src/components/WebView.tsx
2555
- var import_jsx_runtime18 = require("react/jsx-runtime");
2591
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2556
2592
  var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
2557
2593
  var TYPES = ["partner", "external", "game"];
2558
2594
  var WEBVIEW_TYPES = {
@@ -2562,7 +2598,7 @@ var WEBVIEW_TYPES = {
2562
2598
  };
2563
2599
  function mergeSchemeQueryParamsInto(url) {
2564
2600
  const baseUrl = new URL(url);
2565
- const schemeUrl = new URL((0, import_react_native38.getSchemeUri)());
2601
+ const schemeUrl = new URL((0, import_react_native39.getSchemeUri)());
2566
2602
  baseUrl.pathname = schemeUrl.pathname;
2567
2603
  for (const [key, value] of schemeUrl.searchParams.entries()) {
2568
2604
  baseUrl.searchParams.set(key, value);
@@ -2574,7 +2610,7 @@ function getWebViewURL(local) {
2574
2610
  const devUrl = `http://${local.host}:${local.port}`;
2575
2611
  return mergeSchemeQueryParamsInto(devUrl);
2576
2612
  }
2577
- const { url: rawUrl } = import_native_modules23.AppsInTossModule.getWebBundleURL({});
2613
+ const { url: rawUrl } = import_native_modules24.AppsInTossModule.getWebBundleURL({});
2578
2614
  const url = mergeSchemeQueryParamsInto(rawUrl);
2579
2615
  const deploymentId = env.getDeploymentId();
2580
2616
  if (deploymentId) {
@@ -2609,7 +2645,7 @@ function WebView({ type, local, onMessage, ...props }) {
2609
2645
  webBackHandler.removeEventListener(onEvent);
2610
2646
  };
2611
2647
  },
2612
- updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules23.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
2648
+ updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules24.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
2613
2649
  safeAreaInsetsChange: ({ onEvent }) => {
2614
2650
  safeAreaInsetsEmitter.on("safeAreaInsetsChange", onEvent);
2615
2651
  return () => {
@@ -2617,18 +2653,18 @@ function WebView({ type, local, onMessage, ...props }) {
2617
2653
  };
2618
2654
  },
2619
2655
  /** @internal */
2620
- appBridgeCallbackEvent: ({ onEvent, onError, options }) => import_native_modules23.appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
2656
+ appBridgeCallbackEvent: ({ onEvent, onError, options }) => import_native_modules24.appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
2621
2657
  /** AdMobV2 */
2622
- loadAppsInTossAdMob: import_native_modules23.GoogleAdMob.loadAppsInTossAdMob,
2623
- showAppsInTossAdMob: import_native_modules23.GoogleAdMob.showAppsInTossAdMob,
2658
+ loadAppsInTossAdMob: import_native_modules24.GoogleAdMob.loadAppsInTossAdMob,
2659
+ showAppsInTossAdMob: import_native_modules24.GoogleAdMob.showAppsInTossAdMob,
2624
2660
  /** IntegratedAd */
2625
2661
  loadFullScreenAd: loadFullScreenAdForWeb,
2626
2662
  showFullScreenAd,
2627
2663
  /** TossAd */
2628
2664
  fetchTossAd,
2629
2665
  /** IAP */
2630
- iapCreateOneTimePurchaseOrder: import_native_modules23.IAP.createOneTimePurchaseOrder,
2631
- requestOneTimePurchase: import_native_modules23.requestOneTimePurchase
2666
+ iapCreateOneTimePurchaseOrder: import_native_modules24.IAP.createOneTimePurchaseOrder,
2667
+ requestOneTimePurchase: import_native_modules24.requestOneTimePurchase
2632
2668
  },
2633
2669
  constantHandlerMap: {
2634
2670
  ...appsInTossConstantBridges,
@@ -2639,22 +2675,24 @@ function WebView({ type, local, onMessage, ...props }) {
2639
2675
  right: insets.right
2640
2676
  }),
2641
2677
  ...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
2642
- getServerTime_isSupported: import_native_modules23.getServerTime.isSupported,
2678
+ getServerTime_isSupported: import_native_modules24.getServerTime.isSupported,
2643
2679
  /** AdMobV2 */
2644
- loadAppsInTossAdMob_isSupported: import_native_modules23.GoogleAdMob.loadAppsInTossAdMob.isSupported,
2645
- showAppsInTossAdMob_isSupported: import_native_modules23.GoogleAdMob.showAppsInTossAdMob.isSupported,
2646
- isAppsInTossAdMobLoaded_isSupported: import_native_modules23.GoogleAdMob.isAppsInTossAdMobLoaded.isSupported,
2680
+ loadAppsInTossAdMob_isSupported: import_native_modules24.GoogleAdMob.loadAppsInTossAdMob.isSupported,
2681
+ showAppsInTossAdMob_isSupported: import_native_modules24.GoogleAdMob.showAppsInTossAdMob.isSupported,
2682
+ isAppsInTossAdMobLoaded_isSupported: import_native_modules24.GoogleAdMob.isAppsInTossAdMobLoaded.isSupported,
2647
2683
  /** IntegratedAd */
2648
2684
  loadFullScreenAd_isSupported: loadFullScreenAdForWeb.isSupported,
2649
2685
  showFullScreenAd_isSupported: showFullScreenAd.isSupported,
2650
2686
  /** TossAd */
2651
2687
  fetchTossAd_isSupported: fetchTossAd.isSupported,
2652
2688
  /** env */
2653
- getDeploymentId: env.getDeploymentId
2689
+ getDeploymentId: env.getDeploymentId,
2690
+ getWebViewType: env.getWebViewType,
2691
+ getAppName: env.getAppName
2654
2692
  },
2655
2693
  asyncHandlerMap: {
2656
2694
  ...appsInTossAsyncBridges,
2657
- getServerTime: import_native_modules23.getServerTime,
2695
+ getServerTime: import_native_modules24.getServerTime,
2658
2696
  setIosSwipeGestureEnabled: (options) => {
2659
2697
  setAllowsBackForwardNavigationGestures(options.isEnabled);
2660
2698
  return appsInTossAsyncBridges.setIosSwipeGestureEnabled(options);
@@ -2672,23 +2710,27 @@ function WebView({ type, local, onMessage, ...props }) {
2672
2710
  getCurrentLocation: appsInTossAsyncBridges.getCurrentLocation,
2673
2711
  openCamera: appsInTossAsyncBridges.openCamera,
2674
2712
  /** Storage */
2675
- getStorageItem: import_native_modules23.Storage.getItem,
2676
- setStorageItem: import_native_modules23.Storage.setItem,
2677
- removeStorageItem: import_native_modules23.Storage.removeItem,
2678
- clearItems: import_native_modules23.Storage.clearItems,
2713
+ getStorageItem: import_native_modules24.Storage.getItem,
2714
+ setStorageItem: import_native_modules24.Storage.setItem,
2715
+ removeStorageItem: import_native_modules24.Storage.removeItem,
2716
+ clearItems: import_native_modules24.Storage.clearItems,
2679
2717
  /** IAP */
2680
- iapGetProductItemList: import_native_modules23.IAP.getProductItemList,
2681
- iapCreateOneTimePurchaseOrder: import_native_modules23.iapCreateOneTimePurchaseOrder,
2682
- processProductGrant: import_native_modules23.processProductGrant,
2683
- getPendingOrders: import_native_modules23.IAP.getPendingOrders,
2684
- getCompletedOrRefundedOrders: import_native_modules23.IAP.getCompletedOrRefundedOrders,
2685
- completeProductGrant: import_native_modules23.IAP.completeProductGrant,
2718
+ iapGetProductItemList: import_native_modules24.IAP.getProductItemList,
2719
+ iapCreateOneTimePurchaseOrder: import_native_modules24.iapCreateOneTimePurchaseOrder,
2720
+ processProductGrant: import_native_modules24.processProductGrant,
2721
+ getPendingOrders: import_native_modules24.IAP.getPendingOrders,
2722
+ getCompletedOrRefundedOrders: import_native_modules24.IAP.getCompletedOrRefundedOrders,
2723
+ completeProductGrant: import_native_modules24.IAP.completeProductGrant,
2686
2724
  /** AdMobV2 */
2687
- isAppsInTossAdMobLoaded: import_native_modules23.GoogleAdMob.isAppsInTossAdMobLoaded,
2725
+ isAppsInTossAdMobLoaded: import_native_modules24.GoogleAdMob.isAppsInTossAdMobLoaded,
2688
2726
  /** Toss Ads */
2689
2727
  tossAdEventLog,
2690
2728
  /** Private */
2691
- memoryDebugLog: webViewMemoryDebugLog
2729
+ memoryDebugLog: webViewMemoryDebugLog,
2730
+ debugLog: async (event) => {
2731
+ import_react_native40.NativeModules.AppsInTossModule?.eventLog(event);
2732
+ import_react_native40.NativeModules.TossCoreModule?.eventLog(event);
2733
+ }
2692
2734
  }
2693
2735
  });
2694
2736
  const headerPropForExternalWebView = (0, import_react28.useMemo)(() => {
@@ -2717,12 +2759,11 @@ function WebView({ type, local, onMessage, ...props }) {
2717
2759
  webBackHandler.handleWebBack();
2718
2760
  return true;
2719
2761
  };
2720
- import_react_native39.BackHandler.addEventListener("hardwareBackPress", callback);
2721
- return () => import_react_native39.BackHandler.removeEventListener("hardwareBackPress", callback);
2762
+ import_react_native40.BackHandler.addEventListener("hardwareBackPress", callback);
2763
+ return () => import_react_native40.BackHandler.removeEventListener("hardwareBackPress", callback);
2722
2764
  }, [webBackHandler]);
2723
- const globalScripts = useGlobalScripts();
2724
2765
  const handleWebViewProcessDidTerminate = useHandleWebViewProcessDidTerminate(webViewRef);
2725
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2766
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2726
2767
  BaseWebView,
2727
2768
  {
2728
2769
  ref: refs,
@@ -2744,14 +2785,14 @@ function WebView({ type, local, onMessage, ...props }) {
2744
2785
  props.onNavigationStateChange?.(event);
2745
2786
  webBackHandler.onNavigationStateChange(event);
2746
2787
  },
2747
- userAgent: import_react_native39.Platform.OS === "ios" ? userAgent : void 0,
2788
+ userAgent: import_react_native40.Platform.OS === "ios" ? userAgent : void 0,
2748
2789
  sharedCookiesEnabled: true,
2749
2790
  webviewDebuggingEnabled: webViewDebuggingEnabled,
2750
2791
  thirdPartyCookiesEnabled: true,
2751
2792
  onMessage: handler.onMessage,
2752
- injectedJavaScript: globalScripts.afterLoad,
2753
- injectedJavaScriptBeforeContentLoaded: mergeScripts(handler.injectedJavaScript, globalScripts.beforeLoad),
2754
- decelerationRate: import_react_native39.Platform.OS === "ios" ? 1 : void 0,
2793
+ injectedJavaScript: import_user_scripts.afterDocumentLoad,
2794
+ injectedJavaScriptBeforeContentLoaded: [handler.injectedJavaScript, import_user_scripts.beforeDocumentLoad].join("\n"),
2795
+ decelerationRate: import_react_native40.Platform.OS === "ios" ? 1 : void 0,
2755
2796
  allowsBackForwardNavigationGestures,
2756
2797
  onShouldStartLoadWithRequest: (event) => {
2757
2798
  try {
@@ -2759,7 +2800,7 @@ function WebView({ type, local, onMessage, ...props }) {
2759
2800
  if (["https:", "http:"].includes(url2.protocol) || url2.href === "about:blank") {
2760
2801
  return true;
2761
2802
  } else {
2762
- import_react_native39.Linking.openURL(convertIntentURL(url2) ?? url2.href);
2803
+ import_react_native40.Linking.openURL(convertIntentURL(url2) ?? url2.href);
2763
2804
  return false;
2764
2805
  }
2765
2806
  } catch (error) {
@@ -2781,67 +2822,6 @@ function WebView({ type, local, onMessage, ...props }) {
2781
2822
  }
2782
2823
  );
2783
2824
  }
2784
- function useGlobalScripts() {
2785
- const global2 = getAppsInTossGlobals();
2786
- const disableTextSelectionCSS = `
2787
- const style = document.createElement('style');
2788
- 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; }';
2789
- document.head.appendChild(style);
2790
- `;
2791
- const applyGameResourcesCache = `
2792
- (function () {
2793
- if (typeof caches === 'undefined') {
2794
- return;
2795
- }
2796
- const cacheKeyPrefix = '@apps-in-toss/caches/';
2797
- const cacheKey = \`\${cacheKeyPrefix}${global2.deploymentId}\`;
2798
- window.addEventListener('load', async () => {
2799
- const keys = await caches.keys();
2800
- for (const key of keys) {
2801
- if (key.startsWith(cacheKeyPrefix) && key !== cacheKey) {
2802
- await caches.delete(key);
2803
- }
2804
- }
2805
- });
2806
- window.fetch = new Proxy(window.fetch, {
2807
- async apply(originalFetch, thisArg, args) {
2808
- const request = new Request(args[0], args[1]);
2809
- if (!/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/.test(request.url)) {
2810
- return await originalFetch.call(thisArg, request);
2811
- }
2812
- const cache = await caches.open(cacheKey);
2813
- const cached = await cache.match(request);
2814
- if (cached) {
2815
- const eTag = cached.headers.get('ETag');
2816
- const lastModified = cached.headers.get('Last-Modified');
2817
- if (eTag) {
2818
- request.headers.set('If-None-Match', eTag);
2819
- }
2820
- if (lastModified) {
2821
- request.headers.set('If-Modified-Since', lastModified);
2822
- }
2823
- const revalidated = await originalFetch.call(thisArg, request);
2824
- if (revalidated.status === 304) {
2825
- return cached;
2826
- }
2827
- cache.put(request, revalidated.clone());
2828
- return revalidated;
2829
- }
2830
- const response = await originalFetch.call(thisArg, request);
2831
- cache.put(request, response.clone());
2832
- return response;
2833
- },
2834
- });
2835
- })();
2836
- `;
2837
- return {
2838
- beforeLoad: mergeScripts(global2.webViewType === "game" && applyGameResourcesCache),
2839
- afterLoad: mergeScripts(disableTextSelectionCSS)
2840
- };
2841
- }
2842
- function mergeScripts(...scripts) {
2843
- return scripts.filter((script) => typeof script === "string").join("\n");
2844
- }
2845
2825
 
2846
2826
  // src/index.ts
2847
2827
  __reExport(src_exports, require("@apps-in-toss/analytics"), module.exports);