@apps-in-toss/web-framework 2.4.1 → 2.4.3
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/prebuilt/dev.android.rn84.js +566 -599
- package/dist/prebuilt/dev.ios.rn84.js +566 -599
- package/dist/prebuilt/prod.android.rn72.js +228 -272
- package/dist/prebuilt/prod.android.rn84.js +228 -272
- package/dist/prebuilt/prod.ios.rn72.js +228 -272
- package/dist/prebuilt/prod.ios.rn84.js +228 -272
- package/package.json +8 -8
|
@@ -137037,140 +137037,72 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137037
137037
|
module.exports = __toCommonJS(src_exports);
|
|
137038
137038
|
var import_analytics2 = _$$_REQUIRE(_dependencyMap[4], "@apps-in-toss/analytics");
|
|
137039
137039
|
var import_analytics = _$$_REQUIRE(_dependencyMap[4], "@apps-in-toss/analytics");
|
|
137040
|
-
var
|
|
137041
|
-
var
|
|
137040
|
+
var import_native_modules10 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137041
|
+
var import_react_native21 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137042
137042
|
var import_tds_react_native10 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137043
|
-
var
|
|
137044
|
-
var
|
|
137045
|
-
var
|
|
137046
|
-
var import_react3 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137043
|
+
var import_react_native22 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137044
|
+
var import_react_native2 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137045
|
+
var import_react = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137047
137046
|
var env = {
|
|
137048
137047
|
getDeploymentId: () => __DEV__ ? "local" : global.__appsInToss?.deploymentId,
|
|
137049
137048
|
getWebViewType: () => global.__appsInToss.webViewType,
|
|
137050
137049
|
getAppName: () => global.__granite.app.name
|
|
137051
137050
|
};
|
|
137052
|
-
var import_native_modules = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137053
|
-
var import_react_native3 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137054
|
-
var import_react2 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137055
137051
|
var import_react_native = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137056
|
-
var import_react = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137057
|
-
function useReferrer() {
|
|
137058
|
-
return (0, import_react.useMemo)(() => {
|
|
137059
|
-
try {
|
|
137060
|
-
return new URL((0, import_react_native.getSchemeUri)()).searchParams.get("referrer");
|
|
137061
|
-
} catch {
|
|
137062
|
-
return null;
|
|
137063
|
-
}
|
|
137064
|
-
}, []);
|
|
137065
|
-
}
|
|
137066
|
-
var import_react_native2 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137067
137052
|
function isPrivateScheme() {
|
|
137068
137053
|
try {
|
|
137069
|
-
return new URL((0,
|
|
137054
|
+
return new URL((0, import_react_native.getSchemeUri)()).protocol === "intoss-private:";
|
|
137070
137055
|
} catch {
|
|
137071
137056
|
return false;
|
|
137072
137057
|
}
|
|
137073
137058
|
}
|
|
137074
|
-
var
|
|
137075
|
-
var
|
|
137076
|
-
function
|
|
137077
|
-
var
|
|
137078
|
-
|
|
137079
|
-
|
|
137080
|
-
(
|
|
137081
|
-
|
|
137082
|
-
|
|
137083
|
-
|
|
137084
|
-
|
|
137085
|
-
|
|
137086
|
-
if (enterTime.current == null) {
|
|
137087
|
-
return;
|
|
137088
|
-
}
|
|
137089
|
-
var stayTime = Math.floor(exitTime - enterTime.current);
|
|
137090
|
-
import_native_modules.INTERNAL__module.tossCoreEventLog({
|
|
137091
|
-
log_name: EXIT_IMPRESSION_LOG_NAME,
|
|
137092
|
-
log_type: "event",
|
|
137093
|
-
params: {
|
|
137094
|
-
schema_id: EXIT_IMPRESSION_SCHEMA_ID,
|
|
137095
|
-
event_type: "impression",
|
|
137096
|
-
referrer,
|
|
137097
|
-
deployment_id: env.getDeploymentId(),
|
|
137098
|
-
app_name: import_react_native3.Granite.appName,
|
|
137099
|
-
is_private: isPrivateScheme(),
|
|
137100
|
-
stay_time: stayTime.toString(),
|
|
137101
|
-
exit_time: exitTime.toString()
|
|
137102
|
-
}
|
|
137103
|
-
});
|
|
137104
|
-
enterTime.current = void 0;
|
|
137105
|
-
}, [referrer]);
|
|
137106
|
-
return {
|
|
137107
|
-
captureExitLog
|
|
137108
|
-
};
|
|
137109
|
-
}
|
|
137110
|
-
var ENTRY_APP_EVENT_SCHEMA_ID = 1562181;
|
|
137111
|
-
function EntryAppEvent() {
|
|
137112
|
-
var referrer = useReferrer() ?? "";
|
|
137113
|
-
(0, import_react3.useEffect)(() => {
|
|
137114
|
-
import_native_modules2.INTERNAL__module.tossCoreEventLog({
|
|
137115
|
-
log_name: "appsintoss_app_visit::impression__enter_appsintoss",
|
|
137116
|
-
log_type: "info",
|
|
137117
|
-
params: {
|
|
137118
|
-
is_transform: true,
|
|
137119
|
-
schema_id: ENTRY_APP_EVENT_SCHEMA_ID,
|
|
137120
|
-
referrer,
|
|
137121
|
-
deployment_id: env.getDeploymentId(),
|
|
137122
|
-
app_name: import_react_native4.Granite.appName,
|
|
137123
|
-
is_private: isPrivateScheme()
|
|
137124
|
-
}
|
|
137125
|
-
});
|
|
137126
|
-
}, [referrer]);
|
|
137127
|
-
return null;
|
|
137059
|
+
var import_native_modules = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137060
|
+
var DEFAULT_PIPELINES = ["core", "partner"];
|
|
137061
|
+
function sendLog(logData, options) {
|
|
137062
|
+
var _ref = options ?? {},
|
|
137063
|
+
_ref$pipelines = _ref.pipelines,
|
|
137064
|
+
pipelines = _ref$pipelines === void 0 ? DEFAULT_PIPELINES : _ref$pipelines;
|
|
137065
|
+
if (pipelines.includes("core")) {
|
|
137066
|
+
import_native_modules.INTERNAL__module.tossCoreEventLog(logData);
|
|
137067
|
+
}
|
|
137068
|
+
if (pipelines.includes("partner")) {
|
|
137069
|
+
(0, import_native_modules.eventLog)(logData);
|
|
137070
|
+
}
|
|
137128
137071
|
}
|
|
137129
137072
|
function SystemAppEvent({
|
|
137130
137073
|
...initialProps
|
|
137131
137074
|
}) {
|
|
137132
|
-
(0,
|
|
137133
|
-
|
|
137075
|
+
(0, import_react.useEffect)(() => {
|
|
137076
|
+
sendLog({
|
|
137134
137077
|
log_name: "AppsInTossInitialProps",
|
|
137135
137078
|
log_type: "debug",
|
|
137136
137079
|
params: {
|
|
137137
137080
|
...initialProps,
|
|
137138
|
-
schemeUri: (0,
|
|
137081
|
+
schemeUri: (0, import_react_native2.getSchemeUri)(),
|
|
137139
137082
|
deployment_id: env.getDeploymentId(),
|
|
137140
|
-
app_name:
|
|
137083
|
+
app_name: import_react_native2.Granite.appName,
|
|
137141
137084
|
is_private: isPrivateScheme()
|
|
137142
137085
|
}
|
|
137086
|
+
}, {
|
|
137087
|
+
pipelines: ["core"]
|
|
137143
137088
|
});
|
|
137144
137089
|
}, [initialProps]);
|
|
137145
137090
|
return null;
|
|
137146
137091
|
}
|
|
137147
|
-
function StayTimeAppEvent() {
|
|
137148
|
-
var visible = (0, import_react_native4.useVisibility)();
|
|
137149
|
-
var _useCaptureExitLog = useCaptureExitLog(),
|
|
137150
|
-
captureExitLog = _useCaptureExitLog.captureExitLog;
|
|
137151
|
-
(0, import_react3.useEffect)(() => {
|
|
137152
|
-
if (visible === false) {
|
|
137153
|
-
captureExitLog(Date.now());
|
|
137154
|
-
}
|
|
137155
|
-
}, [visible, captureExitLog]);
|
|
137156
|
-
return null;
|
|
137157
|
-
}
|
|
137158
137092
|
var AppEvent = {
|
|
137159
|
-
|
|
137160
|
-
System: SystemAppEvent,
|
|
137161
|
-
StayTime: StayTimeAppEvent
|
|
137093
|
+
System: SystemAppEvent
|
|
137162
137094
|
};
|
|
137163
|
-
var
|
|
137164
|
-
var
|
|
137095
|
+
var import_react_native3 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137096
|
+
var import_react2 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137165
137097
|
var import_jsx_runtime = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
137166
137098
|
var UPDATE_SCHEME = "servicetoss://update/forced/j?updateType=required";
|
|
137167
137099
|
function AppUpdate() {
|
|
137168
|
-
(0,
|
|
137169
|
-
(0,
|
|
137100
|
+
(0, import_react2.useEffect)(() => {
|
|
137101
|
+
(0, import_react_native3.openURL)(`supertoss://closePage?url=${UPDATE_SCHEME}`);
|
|
137170
137102
|
}, []);
|
|
137171
137103
|
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
137172
137104
|
}
|
|
137173
|
-
var
|
|
137105
|
+
var import_react3 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137174
137106
|
function getAppsInTossGlobals() {
|
|
137175
137107
|
if (global.__appsInToss == null) {
|
|
137176
137108
|
throw new Error("invalid apps-in-toss globals");
|
|
@@ -137188,16 +137120,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137188
137120
|
}
|
|
137189
137121
|
}
|
|
137190
137122
|
var import_jsx_runtime2 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
137191
|
-
var NavigationBarContext = (0,
|
|
137123
|
+
var NavigationBarContext = (0, import_react3.createContext)(null);
|
|
137192
137124
|
function NavigationBarContextProvider({
|
|
137193
137125
|
children
|
|
137194
137126
|
}) {
|
|
137195
137127
|
var globals = getAppsInTossGlobals();
|
|
137196
137128
|
var parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
137197
|
-
var
|
|
137198
|
-
|
|
137199
|
-
navigationRightButton =
|
|
137200
|
-
setNavigationRightButton =
|
|
137129
|
+
var _ref2 = (0, import_react3.useState)(parsedNavigationBar?.initialAccessoryButton),
|
|
137130
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
137131
|
+
navigationRightButton = _ref3[0],
|
|
137132
|
+
setNavigationRightButton = _ref3[1];
|
|
137201
137133
|
var addNavigationRightButton = button => {
|
|
137202
137134
|
setNavigationRightButton(button);
|
|
137203
137135
|
};
|
|
@@ -137214,42 +137146,52 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137214
137146
|
});
|
|
137215
137147
|
}
|
|
137216
137148
|
function useNavigationBarContext() {
|
|
137217
|
-
var context = (0,
|
|
137149
|
+
var context = (0, import_react3.useContext)(NavigationBarContext);
|
|
137218
137150
|
if (context == null) {
|
|
137219
137151
|
throw Error("useNavigationBarContext must be used within NavigationBarContextProvider");
|
|
137220
137152
|
}
|
|
137221
137153
|
return context;
|
|
137222
137154
|
}
|
|
137223
|
-
var
|
|
137224
|
-
var
|
|
137225
|
-
var
|
|
137226
|
-
var
|
|
137227
|
-
var
|
|
137155
|
+
var import_native_modules9 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137156
|
+
var import_react16 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137157
|
+
var import_react_native20 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137158
|
+
var import_native_modules4 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137159
|
+
var import_react_native9 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137228
137160
|
var import_tds_react_native4 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137229
137161
|
var import_es_hangul = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
137230
|
-
var
|
|
137231
|
-
var
|
|
137162
|
+
var import_react10 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137163
|
+
var import_react_native10 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137232
137164
|
var GAME_PROFILE_WEBVIEW_URL = "servicetoss://game-center/profile";
|
|
137233
137165
|
var GAME_MIN_VERSION = {
|
|
137234
137166
|
android: "5.232.0",
|
|
137235
137167
|
ios: "5.232.0"
|
|
137236
137168
|
};
|
|
137237
|
-
var
|
|
137238
|
-
var import_react_native7 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137169
|
+
var import_react_native6 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137239
137170
|
var import_tds_react_native = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137240
|
-
var
|
|
137241
|
-
var
|
|
137171
|
+
var import_react5 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137172
|
+
var import_react_native4 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137173
|
+
var import_react4 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137174
|
+
function useReferrer() {
|
|
137175
|
+
return (0, import_react4.useMemo)(() => {
|
|
137176
|
+
try {
|
|
137177
|
+
return new URL((0, import_react_native4.getSchemeUri)()).searchParams.get("referrer");
|
|
137178
|
+
} catch {
|
|
137179
|
+
return null;
|
|
137180
|
+
}
|
|
137181
|
+
}, []);
|
|
137182
|
+
}
|
|
137183
|
+
var import_react_native5 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137242
137184
|
var PLAYSTORE_LINK = "https://play.google.com/store/apps/details?id=viva.republica.toss";
|
|
137243
137185
|
var APPSTORE_LINK = "https://itunes.apple.com/app/id839333328";
|
|
137244
137186
|
var getMarketLink = () => {
|
|
137245
|
-
return
|
|
137187
|
+
return import_react_native5.Platform.OS === "android" ? PLAYSTORE_LINK : APPSTORE_LINK;
|
|
137246
137188
|
};
|
|
137247
137189
|
function useAppUpdateDialog() {
|
|
137248
|
-
var
|
|
137249
|
-
openConfirm =
|
|
137190
|
+
var _ref4 = (0, import_tds_react_native.useDialog)(),
|
|
137191
|
+
openConfirm = _ref4.openConfirm;
|
|
137250
137192
|
var logging = useAppUpdateDialogLogging();
|
|
137251
|
-
var openAppUpdateDialog = (0,
|
|
137252
|
-
var
|
|
137193
|
+
var openAppUpdateDialog = (0, import_react5.useCallback)(function () {
|
|
137194
|
+
var _ref5 = _asyncToGenerator(function* ({
|
|
137253
137195
|
title,
|
|
137254
137196
|
description,
|
|
137255
137197
|
leftButton = "\uB2EB\uAE30",
|
|
@@ -137271,10 +137213,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137271
137213
|
}
|
|
137272
137214
|
logging.update();
|
|
137273
137215
|
var STORE_SCHEME = getMarketLink();
|
|
137274
|
-
(0,
|
|
137216
|
+
(0, import_react_native6.openURL)(`supertoss://web?url=${STORE_SCHEME}&external=browser`);
|
|
137275
137217
|
});
|
|
137276
137218
|
return function (_x) {
|
|
137277
|
-
return
|
|
137219
|
+
return _ref5.apply(this, arguments);
|
|
137278
137220
|
};
|
|
137279
137221
|
}(), [logging, openConfirm]);
|
|
137280
137222
|
return {
|
|
@@ -137289,10 +137231,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137289
137231
|
var referrer = useReferrer();
|
|
137290
137232
|
var baseParams = {
|
|
137291
137233
|
referrer,
|
|
137292
|
-
app_name:
|
|
137234
|
+
app_name: import_react_native6.Granite.appName
|
|
137293
137235
|
};
|
|
137294
137236
|
var logUpdateClick = () => {
|
|
137295
|
-
|
|
137237
|
+
sendLog({
|
|
137296
137238
|
log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
|
|
137297
137239
|
log_type: "event",
|
|
137298
137240
|
params: {
|
|
@@ -137304,7 +137246,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137304
137246
|
});
|
|
137305
137247
|
};
|
|
137306
137248
|
var logCloseClick = () => {
|
|
137307
|
-
|
|
137249
|
+
sendLog({
|
|
137308
137250
|
log_name: UPDATE_DIALOG_CTA_CLICK_LOG_NAME,
|
|
137309
137251
|
log_type: "event",
|
|
137310
137252
|
params: {
|
|
@@ -137316,7 +137258,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137316
137258
|
});
|
|
137317
137259
|
};
|
|
137318
137260
|
var logDialogShow = () => {
|
|
137319
|
-
|
|
137261
|
+
sendLog({
|
|
137320
137262
|
log_name: UPDATE_DIALOG_LOG_NAME,
|
|
137321
137263
|
log_type: "popup",
|
|
137322
137264
|
params: {
|
|
@@ -137331,33 +137273,33 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137331
137273
|
show: logDialogShow
|
|
137332
137274
|
};
|
|
137333
137275
|
}
|
|
137334
|
-
var
|
|
137335
|
-
var
|
|
137336
|
-
var
|
|
137276
|
+
var import_native_modules3 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137277
|
+
var import_react9 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137278
|
+
var import_react_native7 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137337
137279
|
var import_tds_react_native2 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137338
|
-
var
|
|
137280
|
+
var import_react6 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137339
137281
|
var DEFAULT_ERROR = {
|
|
137340
137282
|
title: "\uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694",
|
|
137341
137283
|
description: "\uBB38\uC81C\uAC00 \uACC4\uC18D\uB418\uBA74 \uD1A0\uC2A4 \uACE0\uAC1D\uC13C\uD130(1599-4905)\uB85C \uBB38\uC758\uD574\uC8FC\uC138\uC694."
|
|
137342
137284
|
};
|
|
137343
137285
|
var useErrorAlert = () => {
|
|
137344
|
-
var
|
|
137345
|
-
openAlert =
|
|
137346
|
-
var openErrorAlert = (0,
|
|
137286
|
+
var _ref6 = (0, import_tds_react_native2.useDialog)(),
|
|
137287
|
+
openAlert = _ref6.openAlert;
|
|
137288
|
+
var openErrorAlert = (0, import_react6.useCallback)(_asyncToGenerator(function* () {
|
|
137347
137289
|
yield openAlert({
|
|
137348
137290
|
title: DEFAULT_ERROR.title,
|
|
137349
137291
|
description: DEFAULT_ERROR.description
|
|
137350
137292
|
});
|
|
137351
|
-
(0,
|
|
137293
|
+
(0, import_react_native7.closeView)();
|
|
137352
137294
|
}), [openAlert]);
|
|
137353
137295
|
return {
|
|
137354
137296
|
open: openErrorAlert
|
|
137355
137297
|
};
|
|
137356
137298
|
};
|
|
137357
|
-
var
|
|
137358
|
-
var
|
|
137359
|
-
var
|
|
137360
|
-
var INTERNAL__onVisibilityChangedByTransparentServiceWeb =
|
|
137299
|
+
var import_react7 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137300
|
+
var import_react_native8 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137301
|
+
var import_native_modules2 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137302
|
+
var INTERNAL__onVisibilityChangedByTransparentServiceWeb = import_native_modules2.onVisibilityChangedByTransparentServiceWeb;
|
|
137361
137303
|
var openTransparentWebView = ({
|
|
137362
137304
|
webUrl,
|
|
137363
137305
|
cleanupWhenDismissed = true,
|
|
@@ -137387,16 +137329,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137387
137329
|
}
|
|
137388
137330
|
}
|
|
137389
137331
|
});
|
|
137390
|
-
(0,
|
|
137332
|
+
(0, import_react_native8.openURL)(url.toString());
|
|
137391
137333
|
};
|
|
137392
137334
|
var useTransparentWebview = () => {
|
|
137393
|
-
var
|
|
137394
|
-
|
|
137395
|
-
isWebviewLoading =
|
|
137396
|
-
setIsWebviewLoading =
|
|
137335
|
+
var _ref8 = (0, import_react7.useState)(false),
|
|
137336
|
+
_ref9 = _slicedToArray(_ref8, 2),
|
|
137337
|
+
isWebviewLoading = _ref9[0],
|
|
137338
|
+
setIsWebviewLoading = _ref9[1];
|
|
137397
137339
|
var _useErrorAlert = useErrorAlert(),
|
|
137398
137340
|
openErrorAlert = _useErrorAlert.open;
|
|
137399
|
-
var _openTransparentWebview = (0,
|
|
137341
|
+
var _openTransparentWebview = (0, import_react7.useCallback)(({
|
|
137400
137342
|
webUrl,
|
|
137401
137343
|
onClose,
|
|
137402
137344
|
onError
|
|
@@ -137408,14 +137350,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137408
137350
|
openTransparentWebView({
|
|
137409
137351
|
webUrl,
|
|
137410
137352
|
onEvent: function () {
|
|
137411
|
-
var
|
|
137353
|
+
var _ref0 = _asyncToGenerator(function* (isClosedTransparentWebView) {
|
|
137412
137354
|
if (isClosedTransparentWebView) {
|
|
137413
137355
|
setIsWebviewLoading(false);
|
|
137414
137356
|
onClose?.();
|
|
137415
137357
|
}
|
|
137416
137358
|
});
|
|
137417
137359
|
return function onEvent(_x2) {
|
|
137418
|
-
return
|
|
137360
|
+
return _ref0.apply(this, arguments);
|
|
137419
137361
|
};
|
|
137420
137362
|
}(),
|
|
137421
137363
|
onError: error => {
|
|
@@ -137434,11 +137376,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137434
137376
|
};
|
|
137435
137377
|
var import_tds_react_native3 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137436
137378
|
var import_private2 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
137437
|
-
var
|
|
137379
|
+
var import_react8 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137438
137380
|
var import_jsx_runtime3 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
137439
137381
|
var useGameProfileToast = () => {
|
|
137440
137382
|
var overlay = (0, import_private2.useOverlay)();
|
|
137441
|
-
var openGameProfileToast = (0,
|
|
137383
|
+
var openGameProfileToast = (0, import_react8.useCallback)((nickname, profileImageUri) => {
|
|
137442
137384
|
return new Promise(resolve => {
|
|
137443
137385
|
overlay.open(({
|
|
137444
137386
|
isOpen,
|
|
@@ -137478,18 +137420,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137478
137420
|
};
|
|
137479
137421
|
};
|
|
137480
137422
|
var useGameCenterProfile = () => {
|
|
137481
|
-
var
|
|
137482
|
-
|
|
137483
|
-
profileData =
|
|
137484
|
-
setProfileData =
|
|
137485
|
-
var
|
|
137486
|
-
|
|
137487
|
-
isProfileDataLoading =
|
|
137488
|
-
setIsProfileDataLoading =
|
|
137489
|
-
var
|
|
137490
|
-
|
|
137491
|
-
isProfileDataRefetching =
|
|
137492
|
-
setIsProfileDataRefetching =
|
|
137423
|
+
var _ref1 = (0, import_react9.useState)(void 0),
|
|
137424
|
+
_ref10 = _slicedToArray(_ref1, 2),
|
|
137425
|
+
profileData = _ref10[0],
|
|
137426
|
+
setProfileData = _ref10[1];
|
|
137427
|
+
var _ref11 = (0, import_react9.useState)(true),
|
|
137428
|
+
_ref12 = _slicedToArray(_ref11, 2),
|
|
137429
|
+
isProfileDataLoading = _ref12[0],
|
|
137430
|
+
setIsProfileDataLoading = _ref12[1];
|
|
137431
|
+
var _ref13 = (0, import_react9.useState)(false),
|
|
137432
|
+
_ref14 = _slicedToArray(_ref13, 2),
|
|
137433
|
+
isProfileDataRefetching = _ref14[0],
|
|
137434
|
+
setIsProfileDataRefetching = _ref14[1];
|
|
137493
137435
|
var shouldShowProfileLoadingOverlay = isProfileDataLoading || isProfileDataRefetching;
|
|
137494
137436
|
var shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && !isProfileDataRefetching;
|
|
137495
137437
|
var canShowBottomSheetOrToast = !isProfileDataLoading;
|
|
@@ -137499,9 +137441,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137499
137441
|
openErrorAlert = _useErrorAlert2.open;
|
|
137500
137442
|
var _useTransparentWebvie = useTransparentWebview(),
|
|
137501
137443
|
openTransparentWebView2 = _useTransparentWebvie.open;
|
|
137502
|
-
var fetchProfileData = (0,
|
|
137444
|
+
var fetchProfileData = (0, import_react9.useCallback)(_asyncToGenerator(function* () {
|
|
137503
137445
|
try {
|
|
137504
|
-
var data = yield (0,
|
|
137446
|
+
var data = yield (0, import_native_modules3.getGameCenterGameProfile)();
|
|
137505
137447
|
setProfileData(data);
|
|
137506
137448
|
setIsProfileDataLoading(false);
|
|
137507
137449
|
} catch (_) {
|
|
@@ -137509,10 +137451,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137509
137451
|
setIsProfileDataLoading(false);
|
|
137510
137452
|
}
|
|
137511
137453
|
}), [openErrorAlert]);
|
|
137512
|
-
var refetchProfileData = (0,
|
|
137454
|
+
var refetchProfileData = (0, import_react9.useCallback)(_asyncToGenerator(function* () {
|
|
137513
137455
|
try {
|
|
137514
137456
|
setIsProfileDataRefetching(true);
|
|
137515
|
-
var data = yield (0,
|
|
137457
|
+
var data = yield (0, import_native_modules3.getGameCenterGameProfile)();
|
|
137516
137458
|
setProfileData(data);
|
|
137517
137459
|
setIsProfileDataRefetching(false);
|
|
137518
137460
|
if (data?.statusCode === "SUCCESS") {
|
|
@@ -137523,15 +137465,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137523
137465
|
openErrorAlert();
|
|
137524
137466
|
}
|
|
137525
137467
|
}), [openErrorAlert, openGameProfileToast]);
|
|
137526
|
-
var openProfileWebview = (0,
|
|
137468
|
+
var openProfileWebview = (0, import_react9.useCallback)(() => {
|
|
137527
137469
|
openTransparentWebView2({
|
|
137528
137470
|
webUrl: `${GAME_PROFILE_WEBVIEW_URL}?appName=${getAppName()}&referrer=appsintoss.${getAppName()}`,
|
|
137529
137471
|
onClose: function () {
|
|
137530
|
-
var
|
|
137472
|
+
var _ref17 = _asyncToGenerator(function* () {
|
|
137531
137473
|
refetchProfileData();
|
|
137532
137474
|
});
|
|
137533
137475
|
return function onClose() {
|
|
137534
|
-
return
|
|
137476
|
+
return _ref17.apply(this, arguments);
|
|
137535
137477
|
};
|
|
137536
137478
|
}()
|
|
137537
137479
|
});
|
|
@@ -137566,15 +137508,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137566
137508
|
openProfileWebview = _useGameCenterProfile.openProfileWebview,
|
|
137567
137509
|
openGameProfileToast = _useGameCenterProfile.openGameProfileToast,
|
|
137568
137510
|
fetchProfileData = _useGameCenterProfile.fetchProfileData;
|
|
137569
|
-
var isCompletedFlow = (0,
|
|
137511
|
+
var isCompletedFlow = (0, import_react10.useRef)(false);
|
|
137570
137512
|
var _useAppUpdateDialog = useAppUpdateDialog(),
|
|
137571
137513
|
openAppUpdateDialog = _useAppUpdateDialog.open;
|
|
137572
|
-
(0,
|
|
137514
|
+
(0, import_react10.useEffect)(() => {
|
|
137573
137515
|
fetchProfileData();
|
|
137574
137516
|
}, []);
|
|
137575
|
-
(0,
|
|
137517
|
+
(0, import_react10.useEffect)(() => {
|
|
137576
137518
|
var handleGameProfileFlow = function () {
|
|
137577
|
-
var
|
|
137519
|
+
var _ref18 = _asyncToGenerator(function* () {
|
|
137578
137520
|
if (!canShowBottomSheetOrToast) {
|
|
137579
137521
|
return;
|
|
137580
137522
|
}
|
|
@@ -137582,12 +137524,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137582
137524
|
return;
|
|
137583
137525
|
}
|
|
137584
137526
|
isCompletedFlow.current = true;
|
|
137585
|
-
if (!(0,
|
|
137527
|
+
if (!(0, import_native_modules4.isMinVersionSupported)(GAME_MIN_VERSION)) {
|
|
137586
137528
|
openAppUpdateDialog({
|
|
137587
137529
|
title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
|
|
137588
137530
|
\uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
|
|
137589
137531
|
onDismiss: () => {
|
|
137590
|
-
(0,
|
|
137532
|
+
(0, import_react_native9.closeView)();
|
|
137591
137533
|
}
|
|
137592
137534
|
});
|
|
137593
137535
|
return;
|
|
@@ -137601,20 +137543,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137601
137543
|
}
|
|
137602
137544
|
});
|
|
137603
137545
|
return function handleGameProfileFlow() {
|
|
137604
|
-
return
|
|
137546
|
+
return _ref18.apply(this, arguments);
|
|
137605
137547
|
};
|
|
137606
137548
|
}();
|
|
137607
137549
|
handleGameProfileFlow();
|
|
137608
137550
|
}, [canShowBottomSheetOrToast, isCompletedFlow, openAppUpdateDialog, openGameProfileToast, openProfileWebview, profileData]);
|
|
137609
|
-
if (!(0,
|
|
137551
|
+
if (!(0, import_native_modules4.isMinVersionSupported)(GAME_MIN_VERSION)) {
|
|
137610
137552
|
return (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, {
|
|
137611
|
-
children: [(0, import_jsx_runtime4.jsx)(
|
|
137553
|
+
children: [(0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137612
137554
|
style: {
|
|
137613
137555
|
flex: 1,
|
|
137614
137556
|
position: "relative"
|
|
137615
137557
|
},
|
|
137616
137558
|
children
|
|
137617
|
-
}), (0, import_jsx_runtime4.jsx)(
|
|
137559
|
+
}), (0, import_jsx_runtime4.jsx)(import_react_native10.Pressable, {
|
|
137618
137560
|
style: {
|
|
137619
137561
|
...overlayStyle
|
|
137620
137562
|
},
|
|
@@ -137623,7 +137565,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137623
137565
|
title: `${(0, import_es_hangul.josa)(getAppsInTossGlobals().brandDisplayName, "\uC744/\uB97C")} \uD558\uB824\uBA74
|
|
137624
137566
|
\uC571\uC744 \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694`,
|
|
137625
137567
|
onDismiss: () => {
|
|
137626
|
-
(0,
|
|
137568
|
+
(0, import_react_native9.closeView)();
|
|
137627
137569
|
}
|
|
137628
137570
|
});
|
|
137629
137571
|
}
|
|
@@ -137632,13 +137574,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137632
137574
|
}
|
|
137633
137575
|
if (shouldShowProfileLoadingOverlay) {
|
|
137634
137576
|
return (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, {
|
|
137635
|
-
children: [(0, import_jsx_runtime4.jsx)(
|
|
137577
|
+
children: [(0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137636
137578
|
style: {
|
|
137637
137579
|
flex: 1,
|
|
137638
137580
|
position: "relative"
|
|
137639
137581
|
},
|
|
137640
137582
|
children
|
|
137641
|
-
}), (0, import_jsx_runtime4.jsx)(
|
|
137583
|
+
}), (0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137642
137584
|
style: {
|
|
137643
137585
|
...overlayStyle,
|
|
137644
137586
|
justifyContent: "center",
|
|
@@ -137654,13 +137596,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137654
137596
|
}
|
|
137655
137597
|
if (shouldShowProfileNotFoundOverlay) {
|
|
137656
137598
|
return (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, {
|
|
137657
|
-
children: [(0, import_jsx_runtime4.jsx)(
|
|
137599
|
+
children: [(0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137658
137600
|
style: {
|
|
137659
137601
|
flex: 1,
|
|
137660
137602
|
position: "relative"
|
|
137661
137603
|
},
|
|
137662
137604
|
children
|
|
137663
|
-
}), shouldShowProfileNotFoundOverlay && (0, import_jsx_runtime4.jsx)(
|
|
137605
|
+
}), shouldShowProfileNotFoundOverlay && (0, import_jsx_runtime4.jsx)(import_react_native10.Pressable, {
|
|
137664
137606
|
style: {
|
|
137665
137607
|
...overlayStyle
|
|
137666
137608
|
},
|
|
@@ -137671,7 +137613,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137671
137613
|
});
|
|
137672
137614
|
}
|
|
137673
137615
|
return (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {
|
|
137674
|
-
children: (0, import_jsx_runtime4.jsx)(
|
|
137616
|
+
children: (0, import_jsx_runtime4.jsx)(import_react_native10.View, {
|
|
137675
137617
|
style: {
|
|
137676
137618
|
flex: 1,
|
|
137677
137619
|
position: "relative"
|
|
@@ -137689,30 +137631,30 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137689
137631
|
zIndex: Z_INDEX.PROFILE_OVERLAY
|
|
137690
137632
|
};
|
|
137691
137633
|
var import_private5 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
137692
|
-
var
|
|
137693
|
-
var
|
|
137634
|
+
var import_react11 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137635
|
+
var import_react_native11 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137694
137636
|
function useHardwareBackPress(handler) {
|
|
137695
|
-
(0,
|
|
137637
|
+
(0, import_react11.useEffect)(() => {
|
|
137696
137638
|
var handleBackPress = () => {
|
|
137697
137639
|
handler();
|
|
137698
137640
|
return true;
|
|
137699
137641
|
};
|
|
137700
|
-
var backHandler =
|
|
137642
|
+
var backHandler = import_react_native11.BackHandler.addEventListener("hardwareBackPress", handleBackPress);
|
|
137701
137643
|
return () => backHandler.remove();
|
|
137702
137644
|
}, [handler]);
|
|
137703
137645
|
}
|
|
137704
|
-
var
|
|
137705
|
-
var
|
|
137646
|
+
var import_react_native13 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137647
|
+
var import_react13 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137706
137648
|
var import_tds_react_native5 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137707
137649
|
var import_es_hangul2 = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
137708
|
-
var
|
|
137650
|
+
var import_react12 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137709
137651
|
function useCloseConfirm() {
|
|
137710
137652
|
var _getAppsInTossGlobals = getAppsInTossGlobals(),
|
|
137711
137653
|
brandDisplayName = _getAppsInTossGlobals.brandDisplayName;
|
|
137712
|
-
var
|
|
137713
|
-
openConfirm =
|
|
137714
|
-
return (0,
|
|
137715
|
-
var
|
|
137654
|
+
var _ref19 = (0, import_tds_react_native5.useDialog)(),
|
|
137655
|
+
openConfirm = _ref19.openConfirm;
|
|
137656
|
+
return (0, import_react12.useCallback)(function () {
|
|
137657
|
+
var _ref20 = _asyncToGenerator(function* ({
|
|
137716
137658
|
onEntered
|
|
137717
137659
|
}) {
|
|
137718
137660
|
return yield openConfirm({
|
|
@@ -137724,7 +137666,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137724
137666
|
});
|
|
137725
137667
|
});
|
|
137726
137668
|
return function (_x3) {
|
|
137727
|
-
return
|
|
137669
|
+
return _ref20.apply(this, arguments);
|
|
137728
137670
|
};
|
|
137729
137671
|
}(), [brandDisplayName, openConfirm]);
|
|
137730
137672
|
}
|
|
@@ -137776,8 +137718,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137776
137718
|
}
|
|
137777
137719
|
var homeEvent = createEvent("homeEvent");
|
|
137778
137720
|
var safeAreaInsetsChange = createEvent("safeAreaInsetsChange");
|
|
137779
|
-
var
|
|
137780
|
-
var import_react_native13 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137721
|
+
var import_react_native12 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137781
137722
|
var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
|
|
137782
137723
|
var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
|
|
137783
137724
|
var CLOSE_POPUP_SHOW_SCHEMA_ID = 1644490;
|
|
@@ -137792,10 +137733,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137792
137733
|
var referrer = useReferrer();
|
|
137793
137734
|
var baseParams = {
|
|
137794
137735
|
referrer,
|
|
137795
|
-
app_name:
|
|
137736
|
+
app_name: import_react_native12.Granite.appName
|
|
137796
137737
|
};
|
|
137797
137738
|
var logNavBarImpression = naviBarConfig => {
|
|
137798
|
-
|
|
137739
|
+
sendLog({
|
|
137799
137740
|
log_name: NAVI_BAR_IMPRESSION_LOG_NAME,
|
|
137800
137741
|
log_type: "event",
|
|
137801
137742
|
params: {
|
|
@@ -137807,7 +137748,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137807
137748
|
});
|
|
137808
137749
|
};
|
|
137809
137750
|
var logHomeButtonClick = () => {
|
|
137810
|
-
|
|
137751
|
+
sendLog({
|
|
137811
137752
|
log_name: HOME_BUTTON_CLICK_LOG_NAME,
|
|
137812
137753
|
log_type: "event",
|
|
137813
137754
|
params: {
|
|
@@ -137818,7 +137759,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137818
137759
|
});
|
|
137819
137760
|
};
|
|
137820
137761
|
var logCloseButtonClick = () => {
|
|
137821
|
-
|
|
137762
|
+
sendLog({
|
|
137822
137763
|
log_name: CLOSE_BUTTON_CLICK_LOG_NAME,
|
|
137823
137764
|
log_type: "event",
|
|
137824
137765
|
params: {
|
|
@@ -137829,7 +137770,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137829
137770
|
});
|
|
137830
137771
|
};
|
|
137831
137772
|
var logClosePopupShow = () => {
|
|
137832
|
-
|
|
137773
|
+
sendLog({
|
|
137833
137774
|
log_name: CLOSE_POPUP_SHOW_LOG_NAME,
|
|
137834
137775
|
log_type: "popup",
|
|
137835
137776
|
params: {
|
|
@@ -137839,7 +137780,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137839
137780
|
});
|
|
137840
137781
|
};
|
|
137841
137782
|
var logClosePopupCtaClick = confirm => {
|
|
137842
|
-
|
|
137783
|
+
sendLog({
|
|
137843
137784
|
log_name: CLOSE_POPUP_CTA_CLICK_LOG_NAME,
|
|
137844
137785
|
log_type: "event",
|
|
137845
137786
|
params: {
|
|
@@ -137859,26 +137800,23 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137859
137800
|
};
|
|
137860
137801
|
}
|
|
137861
137802
|
function useNavigationEvent() {
|
|
137862
|
-
var backEventContext = (0,
|
|
137803
|
+
var backEventContext = (0, import_react_native13.useBackEventContext)();
|
|
137863
137804
|
var logging = useNavigationBarLogging();
|
|
137864
|
-
var navigation = (0,
|
|
137805
|
+
var navigation = (0, import_react_native13.useNavigation)();
|
|
137865
137806
|
var closeConfirm = useCloseConfirm();
|
|
137866
|
-
|
|
137867
|
-
captureExitLog = _useCaptureExitLog2.captureExitLog;
|
|
137868
|
-
return (0, import_react14.useMemo)(() => {
|
|
137807
|
+
return (0, import_react13.useMemo)(() => {
|
|
137869
137808
|
var close = function () {
|
|
137870
|
-
var
|
|
137809
|
+
var _ref21 = _asyncToGenerator(function* () {
|
|
137871
137810
|
var hasConfirmed = yield closeConfirm({
|
|
137872
137811
|
onEntered: logging.closePopupShow
|
|
137873
137812
|
});
|
|
137874
137813
|
logging.closePopupCtaClick(hasConfirmed);
|
|
137875
137814
|
if (hasConfirmed) {
|
|
137876
|
-
|
|
137877
|
-
(0, import_react_native14.closeView)();
|
|
137815
|
+
(0, import_react_native13.closeView)();
|
|
137878
137816
|
}
|
|
137879
137817
|
});
|
|
137880
137818
|
return function close() {
|
|
137881
|
-
return
|
|
137819
|
+
return _ref21.apply(this, arguments);
|
|
137882
137820
|
};
|
|
137883
137821
|
}();
|
|
137884
137822
|
return {
|
|
@@ -137904,21 +137842,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137904
137842
|
close();
|
|
137905
137843
|
}
|
|
137906
137844
|
};
|
|
137907
|
-
}, [backEventContext, navigation, closeConfirm, logging
|
|
137845
|
+
}, [backEventContext, navigation, closeConfirm, logging]);
|
|
137908
137846
|
}
|
|
137909
|
-
var
|
|
137910
|
-
var
|
|
137847
|
+
var import_native_modules8 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137848
|
+
var import_react_native18 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137911
137849
|
var import_tds_react_native8 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137912
137850
|
var import_private4 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
137913
|
-
var
|
|
137914
|
-
var
|
|
137915
|
-
var
|
|
137851
|
+
var import_react14 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
137852
|
+
var import_native_modules5 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
137853
|
+
var import_react_native16 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137916
137854
|
var import_tds_react_native7 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137917
137855
|
var import_tds_react_native6 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
137918
137856
|
var import_private3 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
137919
|
-
var
|
|
137920
|
-
var
|
|
137921
|
-
var import_react_native15 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137857
|
+
var import_react_native15 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
137858
|
+
var import_react_native14 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
137922
137859
|
var BOTTOM_SHEET_SCHEMA_ID = 1596825;
|
|
137923
137860
|
var BOTTOM_SHEET_LOG_NAME = "appsintoss_app_visit__common_module::bottomsheet__more";
|
|
137924
137861
|
var BOTTOM_SHEET_OPEN_SCHEMA_ID = 1596829;
|
|
@@ -137931,10 +137868,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137931
137868
|
var referrer = useReferrer();
|
|
137932
137869
|
var baseParams = {
|
|
137933
137870
|
referrer,
|
|
137934
|
-
app_name:
|
|
137871
|
+
app_name: import_react_native14.Granite.appName
|
|
137935
137872
|
};
|
|
137936
137873
|
var logBottomSheetShow = () => {
|
|
137937
|
-
|
|
137874
|
+
sendLog({
|
|
137938
137875
|
log_name: BOTTOM_SHEET_LOG_NAME,
|
|
137939
137876
|
log_type: "popup",
|
|
137940
137877
|
params: {
|
|
@@ -137944,7 +137881,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137944
137881
|
});
|
|
137945
137882
|
};
|
|
137946
137883
|
var logBottomSheetOpen = () => {
|
|
137947
|
-
|
|
137884
|
+
sendLog({
|
|
137948
137885
|
log_name: BOTTOM_SHEET_OPEN_LOG_NAME,
|
|
137949
137886
|
log_type: "event",
|
|
137950
137887
|
params: {
|
|
@@ -137955,7 +137892,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137955
137892
|
});
|
|
137956
137893
|
};
|
|
137957
137894
|
var logBottomSheetCloseClick = () => {
|
|
137958
|
-
|
|
137895
|
+
sendLog({
|
|
137959
137896
|
log_name: BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME,
|
|
137960
137897
|
log_type: "event",
|
|
137961
137898
|
params: {
|
|
@@ -137968,7 +137905,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137968
137905
|
var logBottomSheetMenuClick = ({
|
|
137969
137906
|
title
|
|
137970
137907
|
}) => {
|
|
137971
|
-
|
|
137908
|
+
sendLog({
|
|
137972
137909
|
log_name: BOTTOM_SHEET_MENU_CLICK_LOG_NAME,
|
|
137973
137910
|
log_type: "event",
|
|
137974
137911
|
params: {
|
|
@@ -137999,7 +137936,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
137999
137936
|
var brandPrimaryColorRGB = hexToRGB(globals.brandPrimaryColor);
|
|
138000
137937
|
var iconBackgroundColor = brandPrimaryColorRGB ? `rgba(${brandPrimaryColorRGB.join(",")},0.1)` : adaptive.grey100;
|
|
138001
137938
|
return (0, import_jsx_runtime5.jsx)(import_tds_react_native6.ListRow, {
|
|
138002
|
-
left: (0, import_jsx_runtime5.jsx)(
|
|
137939
|
+
left: (0, import_jsx_runtime5.jsx)(import_react_native15.View, {
|
|
138003
137940
|
style: {
|
|
138004
137941
|
width: 30,
|
|
138005
137942
|
height: 30,
|
|
@@ -138063,10 +138000,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138063
138000
|
}
|
|
138064
138001
|
function addParamsToUrl(url, params) {
|
|
138065
138002
|
var urlObj = new URL(url);
|
|
138066
|
-
for (var
|
|
138067
|
-
var
|
|
138068
|
-
var key =
|
|
138069
|
-
var value =
|
|
138003
|
+
for (var _ref22 of Object.entries(params)) {
|
|
138004
|
+
var _ref23 = _slicedToArray(_ref22, 2);
|
|
138005
|
+
var key = _ref23[0];
|
|
138006
|
+
var value = _ref23[1];
|
|
138070
138007
|
urlObj.searchParams.set(key, value);
|
|
138071
138008
|
}
|
|
138072
138009
|
return urlObj.toString();
|
|
@@ -138078,10 +138015,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138078
138015
|
contactIconUrl: "https://static.toss.im/icons/png/4x/icon-share-dots-mono.png"
|
|
138079
138016
|
};
|
|
138080
138017
|
function AppShareListMenu() {
|
|
138081
|
-
var initialScheme = (0,
|
|
138082
|
-
var isSandbox = (0,
|
|
138083
|
-
var
|
|
138084
|
-
openConfirm =
|
|
138018
|
+
var initialScheme = (0, import_react_native16.getSchemeUri)();
|
|
138019
|
+
var isSandbox = (0, import_native_modules5.getOperationalEnvironment)() === "sandbox";
|
|
138020
|
+
var _ref24 = (0, import_tds_react_native7.useDialog)(),
|
|
138021
|
+
openConfirm = _ref24.openConfirm;
|
|
138085
138022
|
var schemeForShare = addParamsToUrl(initialScheme, {
|
|
138086
138023
|
referrer: SHARE_SCHEME_REFERRER
|
|
138087
138024
|
});
|
|
@@ -138098,16 +138035,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138098
138035
|
});
|
|
138099
138036
|
return;
|
|
138100
138037
|
}
|
|
138101
|
-
(0,
|
|
138038
|
+
(0, import_native_modules5.shareWithScheme)({
|
|
138102
138039
|
schemeURL: schemeForShare
|
|
138103
138040
|
});
|
|
138104
138041
|
}
|
|
138105
138042
|
});
|
|
138106
138043
|
}
|
|
138107
|
-
var
|
|
138044
|
+
var import_native_modules6 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138108
138045
|
var import_jsx_runtime7 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138109
138046
|
function HomeShortcutMenu() {
|
|
138110
|
-
var isSandbox = (0,
|
|
138047
|
+
var isSandbox = (0, import_native_modules6.getOperationalEnvironment)() === "sandbox";
|
|
138111
138048
|
var globals = getAppsInTossGlobals();
|
|
138112
138049
|
if (isSandbox) {
|
|
138113
138050
|
return null;
|
|
@@ -138116,7 +138053,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138116
138053
|
title: "\uD648 \uD654\uBA74\uC5D0 \uCD94\uAC00",
|
|
138117
138054
|
iconURL: "https://static.toss.im/icons/png/4x/icon-plus-circle-mono.png",
|
|
138118
138055
|
onPress: () => {
|
|
138119
|
-
|
|
138056
|
+
import_native_modules6.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("addMiniAppShortcut", {
|
|
138120
138057
|
title: globals.brandDisplayName,
|
|
138121
138058
|
appName: global.__granite.app.name,
|
|
138122
138059
|
iconUrl: globals.brandIcon,
|
|
@@ -138128,18 +138065,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138128
138065
|
}
|
|
138129
138066
|
});
|
|
138130
138067
|
}
|
|
138131
|
-
var
|
|
138132
|
-
var
|
|
138068
|
+
var import_native_modules7 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138069
|
+
var import_react_native17 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138133
138070
|
var import_jsx_runtime8 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138134
138071
|
function SettingsMenu() {
|
|
138135
138072
|
var globals = getAppsInTossGlobals();
|
|
138136
|
-
if ((0,
|
|
138073
|
+
if ((0, import_native_modules7.getOperationalEnvironment)() === "sandbox") {
|
|
138137
138074
|
return null;
|
|
138138
138075
|
}
|
|
138139
138076
|
return (0, import_jsx_runtime8.jsx)(Menu, {
|
|
138140
138077
|
title: "\uC124\uC815",
|
|
138141
138078
|
iconURL: "https://static.toss.im/icons/png/4x/icon-setting-mono.png",
|
|
138142
|
-
onPress: () => (0,
|
|
138079
|
+
onPress: () => (0, import_react_native17.openURL)(`servicetoss://apps-in-toss-menu/settings?appName=${import_react_native17.Granite.appName}&displayAppName=${globals.brandDisplayName}`)
|
|
138143
138080
|
});
|
|
138144
138081
|
}
|
|
138145
138082
|
function ensureValue(value, name) {
|
|
@@ -138171,23 +138108,23 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138171
138108
|
function useMoreButtonBottomSheet() {
|
|
138172
138109
|
var globals = getAppsInTossGlobals();
|
|
138173
138110
|
var adaptive = (0, import_private4.useAdaptive)();
|
|
138174
|
-
var
|
|
138175
|
-
|
|
138176
|
-
itemList =
|
|
138177
|
-
setItemList =
|
|
138111
|
+
var _ref25 = (0, import_react14.useState)([]),
|
|
138112
|
+
_ref26 = _slicedToArray(_ref25, 2),
|
|
138113
|
+
itemList = _ref26[0],
|
|
138114
|
+
setItemList = _ref26[1];
|
|
138178
138115
|
var appUpdateDialog = useAppUpdateDialog();
|
|
138179
138116
|
var logging = useMoreButtonBottomSheetLogging();
|
|
138180
138117
|
var overlay = (0, import_private4.useOverlay)();
|
|
138181
138118
|
var title = ensureValue(globals.brandDisplayName, "displayName");
|
|
138182
|
-
var isHomeShortcutSupported = (0,
|
|
138183
|
-
var isBottomSheetSupported = (0,
|
|
138184
|
-
var isShareListMenuSupported = (0,
|
|
138185
|
-
var isSettingsMenuSupported = (0,
|
|
138186
|
-
(0,
|
|
138119
|
+
var isHomeShortcutSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.HOME_SHORTCUT_MENU);
|
|
138120
|
+
var isBottomSheetSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
|
|
138121
|
+
var isShareListMenuSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
|
|
138122
|
+
var isSettingsMenuSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.SETTINGS_MENU);
|
|
138123
|
+
(0, import_react14.useEffect)(() => {
|
|
138187
138124
|
if (!isBottomSheetSupported) {
|
|
138188
138125
|
return;
|
|
138189
138126
|
}
|
|
138190
|
-
|
|
138127
|
+
import_native_modules8.INTERNAL__appBridgeHandler.invokeAppBridgeMethod(APP_BRIDGE_METHOD_NAME, {}, {
|
|
138191
138128
|
onSuccess: ({
|
|
138192
138129
|
items
|
|
138193
138130
|
}) => setItemList(items),
|
|
@@ -138195,7 +138132,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138195
138132
|
});
|
|
138196
138133
|
}, [isBottomSheetSupported]);
|
|
138197
138134
|
var onClickHandler = function () {
|
|
138198
|
-
var
|
|
138135
|
+
var _ref27 = _asyncToGenerator(function* () {
|
|
138199
138136
|
logging.open();
|
|
138200
138137
|
if (!isBottomSheetSupported) {
|
|
138201
138138
|
yield appUpdateDialog.open({
|
|
@@ -138240,7 +138177,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138240
138177
|
children: [itemList.map(item => (0, import_jsx_runtime9.jsx)(Menu, {
|
|
138241
138178
|
title: item.contactItemName,
|
|
138242
138179
|
iconURL: item.contactIconUrl,
|
|
138243
|
-
onPress: () => (0,
|
|
138180
|
+
onPress: () => (0, import_react_native18.openURL)(item.contactUri)
|
|
138244
138181
|
}, item.contactItemName)), isHomeShortcutSupported && (0, import_jsx_runtime9.jsx)(HomeShortcutMenu, {}), isShareListMenuSupported && (0, import_jsx_runtime9.jsx)(AppShareListMenu, {}), isSettingsMenuSupported && (0, import_jsx_runtime9.jsx)(SettingsMenu, {})]
|
|
138245
138182
|
})
|
|
138246
138183
|
})
|
|
@@ -138248,7 +138185,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138248
138185
|
});
|
|
138249
138186
|
});
|
|
138250
138187
|
return function onClickHandler() {
|
|
138251
|
-
return
|
|
138188
|
+
return _ref27.apply(this, arguments);
|
|
138252
138189
|
};
|
|
138253
138190
|
}();
|
|
138254
138191
|
return {
|
|
@@ -138259,7 +138196,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138259
138196
|
children
|
|
138260
138197
|
}) {
|
|
138261
138198
|
var logging = useMoreButtonBottomSheetLogging();
|
|
138262
|
-
(0,
|
|
138199
|
+
(0, import_react14.useEffect)(() => {
|
|
138263
138200
|
logging.show();
|
|
138264
138201
|
}, [logging]);
|
|
138265
138202
|
return (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, {
|
|
@@ -138275,15 +138212,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138275
138212
|
name: source
|
|
138276
138213
|
};
|
|
138277
138214
|
}
|
|
138278
|
-
var
|
|
138215
|
+
var import_react15 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138279
138216
|
var import_jsx_runtime10 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138280
138217
|
function NavigationBarImpressionArea({
|
|
138281
138218
|
children,
|
|
138282
138219
|
withHomeButton
|
|
138283
138220
|
}) {
|
|
138284
|
-
var hasLogged = (0,
|
|
138221
|
+
var hasLogged = (0, import_react15.useRef)(false);
|
|
138285
138222
|
var logging = useNavigationBarLogging();
|
|
138286
|
-
(0,
|
|
138223
|
+
(0, import_react15.useEffect)(() => {
|
|
138287
138224
|
if (hasLogged.current === false) {
|
|
138288
138225
|
logging.navBarImpression({
|
|
138289
138226
|
home_icon_yn: withHomeButton ? "Y" : "N"
|
|
@@ -138332,7 +138269,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138332
138269
|
var import_react_native_safe_area_context = _$$_REQUIRE(_dependencyMap[13], "@granite-js/native/react-native-safe-area-context");
|
|
138333
138270
|
var import_tds_react_native9 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
138334
138271
|
var import_private6 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
138335
|
-
var
|
|
138272
|
+
var import_react_native19 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
138336
138273
|
var import_jsx_runtime12 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138337
138274
|
function GameNavigationBar() {
|
|
138338
138275
|
var safeAreaTop = (0, import_private6.useSafeAreaTop)();
|
|
@@ -138341,18 +138278,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138341
138278
|
var navigationEvent = useNavigationEvent();
|
|
138342
138279
|
var _useNavigationBarCont2 = useNavigationBarContext(),
|
|
138343
138280
|
navigationRightButton = _useNavigationBarCont2.navigationRightButton;
|
|
138344
|
-
var
|
|
138345
|
-
safeAreaRight =
|
|
138281
|
+
var _ref28 = (0, import_react_native_safe_area_context.useSafeAreaInsets)(),
|
|
138282
|
+
safeAreaRight = _ref28.right;
|
|
138346
138283
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
138347
138284
|
return (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, {
|
|
138348
138285
|
children: [(0, import_jsx_runtime12.jsx)(import_tds_react_native9.PageNavbar, {
|
|
138349
138286
|
preference: {
|
|
138350
138287
|
type: "none"
|
|
138351
138288
|
}
|
|
138352
|
-
}), (0, import_jsx_runtime12.jsx)(
|
|
138289
|
+
}), (0, import_jsx_runtime12.jsx)(import_react_native19.View, {
|
|
138353
138290
|
style: {
|
|
138354
138291
|
width: "100%",
|
|
138355
|
-
height:
|
|
138292
|
+
height: import_react_native19.Platform.OS === "ios" ? 44 : 54,
|
|
138356
138293
|
flexDirection: "row",
|
|
138357
138294
|
alignItems: "center",
|
|
138358
138295
|
justifyContent: "flex-end",
|
|
@@ -138399,13 +138336,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138399
138336
|
function GameAppContainer({
|
|
138400
138337
|
children
|
|
138401
138338
|
}) {
|
|
138402
|
-
(0,
|
|
138403
|
-
if (
|
|
138404
|
-
(0,
|
|
138339
|
+
(0, import_react16.useEffect)(() => {
|
|
138340
|
+
if (import_react_native20.Platform.OS === "ios") {
|
|
138341
|
+
(0, import_native_modules9.setIosSwipeGestureEnabled)({
|
|
138405
138342
|
isEnabled: false
|
|
138406
138343
|
});
|
|
138407
138344
|
return () => {
|
|
138408
|
-
(0,
|
|
138345
|
+
(0, import_native_modules9.setIosSwipeGestureEnabled)({
|
|
138409
138346
|
isEnabled: true
|
|
138410
138347
|
});
|
|
138411
138348
|
};
|
|
@@ -138430,18 +138367,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138430
138367
|
children,
|
|
138431
138368
|
...initialProps
|
|
138432
138369
|
}) {
|
|
138433
|
-
if (!(0,
|
|
138370
|
+
if (!(0, import_native_modules10.isMinVersionSupported)({
|
|
138434
138371
|
android: "5.220.0",
|
|
138435
138372
|
ios: "5.221.0"
|
|
138436
138373
|
})) {
|
|
138437
138374
|
return (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, {
|
|
138438
|
-
children: [(0, import_jsx_runtime14.jsx)(AppEvent.
|
|
138375
|
+
children: [(0, import_jsx_runtime14.jsx)(AppEvent.System, {
|
|
138439
138376
|
...initialProps
|
|
138440
138377
|
}), (0, import_jsx_runtime14.jsx)(AppUpdate, {})]
|
|
138441
138378
|
});
|
|
138442
138379
|
}
|
|
138443
138380
|
return (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, {
|
|
138444
|
-
children: [(0, import_jsx_runtime14.jsx)(AppEvent.
|
|
138381
|
+
children: [(0, import_jsx_runtime14.jsx)(AppEvent.System, {
|
|
138445
138382
|
...initialProps
|
|
138446
138383
|
}), (0, import_jsx_runtime14.jsx)(Container, {
|
|
138447
138384
|
...initialProps,
|
|
@@ -138462,17 +138399,17 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138462
138399
|
analytics
|
|
138463
138400
|
}) {
|
|
138464
138401
|
var appName = getAppName();
|
|
138465
|
-
var isRegistered =
|
|
138402
|
+
var isRegistered = import_react_native22.AppRegistry.getAppKeys().includes(appName);
|
|
138466
138403
|
if (!isRegistered) {
|
|
138467
138404
|
import_analytics.Analytics.init({
|
|
138468
|
-
logger: params => void (0,
|
|
138405
|
+
logger: params => void (0, import_native_modules10.eventLog)(params),
|
|
138469
138406
|
debug: analytics?.debug ?? __DEV__
|
|
138470
138407
|
});
|
|
138471
|
-
var App =
|
|
138408
|
+
var App = import_react_native21.Granite.registerApp(AppsInTossContainer.bind(null, container), {
|
|
138472
138409
|
appName,
|
|
138473
138410
|
context,
|
|
138474
|
-
initialScheme: (0,
|
|
138475
|
-
setIosSwipeGestureEnabled:
|
|
138411
|
+
initialScheme: (0, import_native_modules10.getSchemeUri)(),
|
|
138412
|
+
setIosSwipeGestureEnabled: import_native_modules10.setIosSwipeGestureEnabled,
|
|
138476
138413
|
router: {
|
|
138477
138414
|
screenContainer: AppsInTossScreenContainer,
|
|
138478
138415
|
defaultScreenOption: {
|
|
@@ -138507,44 +138444,42 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138507
138444
|
var AppsInToss = {
|
|
138508
138445
|
registerApp
|
|
138509
138446
|
};
|
|
138510
|
-
var
|
|
138447
|
+
var import_native_modules19 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138511
138448
|
var appsInTossAsyncBridges = __toESM(_$$_REQUIRE(_dependencyMap[14], "@apps-in-toss/native-modules/async-bridges"), 1);
|
|
138512
138449
|
var appsInTossConstantBridges = __toESM(_$$_REQUIRE(_dependencyMap[15], "@apps-in-toss/native-modules/constant-bridges"), 1);
|
|
138513
138450
|
var appsInTossEventBridges = __toESM(_$$_REQUIRE(_dependencyMap[16], "@apps-in-toss/native-modules/event-bridges"), 1);
|
|
138514
138451
|
var import_user_scripts = _$$_REQUIRE(_dependencyMap[17], "@apps-in-toss/user-scripts");
|
|
138515
138452
|
var import_react_native_safe_area_context4 = _$$_REQUIRE(_dependencyMap[13], "@granite-js/native/react-native-safe-area-context");
|
|
138516
|
-
var
|
|
138453
|
+
var import_react_native36 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138517
138454
|
var import_tds_react_native15 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
138518
138455
|
var import_private9 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
138519
|
-
var
|
|
138520
|
-
var
|
|
138521
|
-
var
|
|
138456
|
+
var import_react27 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138457
|
+
var import_react_native37 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
138458
|
+
var import_native_modules11 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138522
138459
|
var import_react_native_webview = _$$_REQUIRE(_dependencyMap[18], "@granite-js/native/react-native-webview");
|
|
138523
|
-
var
|
|
138524
|
-
var
|
|
138460
|
+
var import_react18 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138461
|
+
var import_react_native25 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
138525
138462
|
var import_react_native_safe_area_context2 = _$$_REQUIRE(_dependencyMap[13], "@granite-js/native/react-native-safe-area-context");
|
|
138526
|
-
var
|
|
138463
|
+
var import_react_native23 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138527
138464
|
var import_tds_react_native11 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
138528
138465
|
var import_private7 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
138529
138466
|
var import_es_hangul3 = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
138530
|
-
var
|
|
138531
|
-
var
|
|
138467
|
+
var import_react17 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138468
|
+
var import_react_native24 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
138532
138469
|
var import_jsx_runtime15 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138533
138470
|
function GameWebviewNavigationBar() {
|
|
138534
138471
|
var safeAreaTop = (0, import_private7.useSafeAreaTop)();
|
|
138535
|
-
var
|
|
138536
|
-
openConfirm =
|
|
138537
|
-
var _useCaptureExitLog3 = useCaptureExitLog(),
|
|
138538
|
-
captureExitLog = _useCaptureExitLog3.captureExitLog;
|
|
138472
|
+
var _ref29 = (0, import_tds_react_native11.useDialog)(),
|
|
138473
|
+
openConfirm = _ref29.openConfirm;
|
|
138539
138474
|
var global2 = getAppsInTossGlobals();
|
|
138540
138475
|
var logging = useNavigationBarLogging();
|
|
138541
138476
|
var _useMoreButtonBottomS3 = useMoreButtonBottomSheet(),
|
|
138542
138477
|
openMoreButtonBottomSheet = _useMoreButtonBottomS3.open;
|
|
138543
138478
|
var _useNavigationBarCont3 = useNavigationBarContext(),
|
|
138544
138479
|
navigationRightButton = _useNavigationBarCont3.navigationRightButton;
|
|
138545
|
-
var
|
|
138546
|
-
safeAreaRight =
|
|
138547
|
-
var handleGameWebviewClose = (0,
|
|
138480
|
+
var _ref30 = (0, import_react_native_safe_area_context2.useSafeAreaInsets)(),
|
|
138481
|
+
safeAreaRight = _ref30.right;
|
|
138482
|
+
var handleGameWebviewClose = (0, import_react17.useCallback)(_asyncToGenerator(function* () {
|
|
138548
138483
|
logging.closeButtonClick();
|
|
138549
138484
|
var isConfirmed = yield openConfirm({
|
|
138550
138485
|
title: `${(0, import_es_hangul3.josa)(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
|
|
@@ -138555,19 +138490,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138555
138490
|
});
|
|
138556
138491
|
logging.closePopupCtaClick(isConfirmed);
|
|
138557
138492
|
if (isConfirmed) {
|
|
138558
|
-
|
|
138559
|
-
(0, import_react_native24.closeView)();
|
|
138493
|
+
(0, import_react_native23.closeView)();
|
|
138560
138494
|
}
|
|
138561
|
-
}), [
|
|
138495
|
+
}), [global2.brandDisplayName, logging, openConfirm]);
|
|
138562
138496
|
return (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, {
|
|
138563
138497
|
children: [(0, import_jsx_runtime15.jsx)(import_tds_react_native11.PageNavbar, {
|
|
138564
138498
|
preference: {
|
|
138565
138499
|
type: "none"
|
|
138566
138500
|
}
|
|
138567
|
-
}), (0, import_jsx_runtime15.jsx)(
|
|
138501
|
+
}), (0, import_jsx_runtime15.jsx)(import_react_native24.View, {
|
|
138568
138502
|
style: {
|
|
138569
138503
|
width: "100%",
|
|
138570
|
-
height:
|
|
138504
|
+
height: import_react_native24.Platform.OS === "ios" ? 44 : 54,
|
|
138571
138505
|
flexDirection: "row",
|
|
138572
138506
|
alignItems: "center",
|
|
138573
138507
|
justifyContent: "flex-end",
|
|
@@ -138589,14 +138523,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138589
138523
|
});
|
|
138590
138524
|
}
|
|
138591
138525
|
var import_jsx_runtime16 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138592
|
-
var GameWebView = (0,
|
|
138593
|
-
(0,
|
|
138594
|
-
if (
|
|
138595
|
-
(0,
|
|
138526
|
+
var GameWebView = (0, import_react18.forwardRef)(function GameWebView2(props, ref) {
|
|
138527
|
+
(0, import_react18.useEffect)(() => {
|
|
138528
|
+
if (import_react_native25.Platform.OS === "ios") {
|
|
138529
|
+
(0, import_native_modules11.setIosSwipeGestureEnabled)({
|
|
138596
138530
|
isEnabled: false
|
|
138597
138531
|
});
|
|
138598
138532
|
return () => {
|
|
138599
|
-
(0,
|
|
138533
|
+
(0, import_native_modules11.setIosSwipeGestureEnabled)({
|
|
138600
138534
|
isEnabled: true
|
|
138601
138535
|
});
|
|
138602
138536
|
};
|
|
@@ -138604,7 +138538,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138604
138538
|
return;
|
|
138605
138539
|
}, []);
|
|
138606
138540
|
return (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, {
|
|
138607
|
-
children: [(0, import_jsx_runtime16.jsx)(GameWebviewNavigationBar, {}), (0,
|
|
138541
|
+
children: [(0, import_jsx_runtime16.jsx)(GameWebviewNavigationBar, {}), (0, import_native_modules11.getOperationalEnvironment)() === "toss" ? (0, import_jsx_runtime16.jsx)(GameInitializer, {
|
|
138608
138542
|
children: (0, import_jsx_runtime16.jsx)(import_react_native_webview.WebView, {
|
|
138609
138543
|
ref,
|
|
138610
138544
|
...props
|
|
@@ -138616,23 +138550,21 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138616
138550
|
});
|
|
138617
138551
|
});
|
|
138618
138552
|
var import_react_native_webview2 = _$$_REQUIRE(_dependencyMap[18], "@granite-js/native/react-native-webview");
|
|
138619
|
-
var
|
|
138620
|
-
var
|
|
138553
|
+
var import_react20 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138554
|
+
var import_react_native26 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138621
138555
|
var import_tds_react_native12 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
138622
138556
|
var import_private8 = _$$_REQUIRE(_dependencyMap[12], "@toss/tds-react-native/private");
|
|
138623
138557
|
var import_es_hangul4 = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
138624
|
-
var
|
|
138558
|
+
var import_react19 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
138625
138559
|
var import_jsx_runtime17 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138626
138560
|
function PartnerWebviewNavigationBar({
|
|
138627
138561
|
onBackButtonClick,
|
|
138628
138562
|
onHomeButtonClick
|
|
138629
138563
|
}) {
|
|
138630
138564
|
var globals = getAppsInTossGlobals();
|
|
138631
|
-
var _useCaptureExitLog4 = useCaptureExitLog(),
|
|
138632
|
-
captureExitLog = _useCaptureExitLog4.captureExitLog;
|
|
138633
138565
|
var logging = useNavigationBarLogging();
|
|
138634
|
-
var
|
|
138635
|
-
openConfirm =
|
|
138566
|
+
var _ref32 = (0, import_tds_react_native12.useDialog)(),
|
|
138567
|
+
openConfirm = _ref32.openConfirm;
|
|
138636
138568
|
var _useMoreButtonBottomS4 = useMoreButtonBottomSheet(),
|
|
138637
138569
|
openMoreButtonBottomSheet = _useMoreButtonBottomS4.open;
|
|
138638
138570
|
var parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
@@ -138640,7 +138572,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138640
138572
|
var withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
138641
138573
|
var _useNavigationBarCont4 = useNavigationBarContext(),
|
|
138642
138574
|
navigationRightButton = _useNavigationBarCont4.navigationRightButton;
|
|
138643
|
-
var handleClose = (0,
|
|
138575
|
+
var handleClose = (0, import_react19.useCallback)(_asyncToGenerator(function* () {
|
|
138644
138576
|
logging.closeButtonClick();
|
|
138645
138577
|
var isConfirmed = yield openConfirm({
|
|
138646
138578
|
title: `${(0, import_es_hangul4.josa)(globals.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
|
|
@@ -138651,10 +138583,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138651
138583
|
});
|
|
138652
138584
|
logging.closePopupCtaClick(isConfirmed);
|
|
138653
138585
|
if (isConfirmed) {
|
|
138654
|
-
|
|
138655
|
-
(0, import_react_native27.closeView)();
|
|
138586
|
+
(0, import_react_native26.closeView)();
|
|
138656
138587
|
}
|
|
138657
|
-
}), [
|
|
138588
|
+
}), [globals.brandDisplayName, logging, openConfirm]);
|
|
138658
138589
|
return (0, import_jsx_runtime17.jsx)(NavigationBarImpressionArea, {
|
|
138659
138590
|
withHomeButton,
|
|
138660
138591
|
children: (0, import_jsx_runtime17.jsx)(import_private8.TopNavigation, {
|
|
@@ -138678,7 +138609,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138678
138609
|
});
|
|
138679
138610
|
}
|
|
138680
138611
|
var import_jsx_runtime18 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
138681
|
-
var PartnerWebView = (0,
|
|
138612
|
+
var PartnerWebView = (0, import_react20.forwardRef)(function PartnerWebViewScreen({
|
|
138682
138613
|
onBackButtonClick,
|
|
138683
138614
|
onHomeButtonClick,
|
|
138684
138615
|
...webViewProps
|
|
@@ -138707,8 +138638,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138707
138638
|
}
|
|
138708
138639
|
return `${scheme}://${url.hostname}${url.pathname}${url.search}`;
|
|
138709
138640
|
}
|
|
138710
|
-
var
|
|
138641
|
+
var import_native_modules12 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138711
138642
|
function noop() {}
|
|
138643
|
+
var INVALID_AD_GROUP_ID_ERROR_MESSAGE = "\uC798\uBABB\uB41C \uC694\uCCAD\uC774\uC5D0\uC694. \uD544\uC694\uD55C \uAC12\uC774 \uBE44\uC5B4 \uC788\uC5B4\uC694.";
|
|
138644
|
+
function normalizeAdGroupId(adGroupId) {
|
|
138645
|
+
return adGroupId.trim();
|
|
138646
|
+
}
|
|
138647
|
+
function createInvalidAdGroupIdError() {
|
|
138648
|
+
return new Error(INVALID_AD_GROUP_ID_ERROR_MESSAGE);
|
|
138649
|
+
}
|
|
138712
138650
|
function generateSessionId() {
|
|
138713
138651
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
|
|
138714
138652
|
var r = Math.random() * 16 | 0;
|
|
@@ -138720,7 +138658,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138720
138658
|
var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
|
|
138721
138659
|
var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
|
|
138722
138660
|
var UNSUPPORTED_ERROR_MESSAGE = "This feature is not supported in the current environment";
|
|
138723
|
-
var ENVIRONMENT = (0,
|
|
138661
|
+
var ENVIRONMENT = (0, import_native_modules12.getOperationalEnvironment)();
|
|
138724
138662
|
function fetchTossAd(params) {
|
|
138725
138663
|
if (!fetchTossAd.isSupported()) {
|
|
138726
138664
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE));
|
|
@@ -138729,8 +138667,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138729
138667
|
var onEvent = params.onEvent,
|
|
138730
138668
|
onError = params.onError,
|
|
138731
138669
|
options = params.options;
|
|
138732
|
-
var adGroupId = options.adGroupId;
|
|
138733
|
-
|
|
138670
|
+
var adGroupId = normalizeAdGroupId(options.adGroupId);
|
|
138671
|
+
if (adGroupId.length === 0) {
|
|
138672
|
+
params.onError(createInvalidAdGroupIdError());
|
|
138673
|
+
return noop;
|
|
138674
|
+
}
|
|
138675
|
+
var unregisterCallbacks = import_native_modules12.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("fetchTossAd", {
|
|
138734
138676
|
spaceUnitId: adGroupId,
|
|
138735
138677
|
sessionId,
|
|
138736
138678
|
sdkId: options.sdkId,
|
|
@@ -138749,37 +138691,37 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138749
138691
|
if (ENVIRONMENT !== "toss") {
|
|
138750
138692
|
return false;
|
|
138751
138693
|
}
|
|
138752
|
-
return (0,
|
|
138694
|
+
return (0, import_native_modules12.isMinVersionSupported)({
|
|
138753
138695
|
android: ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION,
|
|
138754
138696
|
ios: IOS_FETCH_TOSS_AD_SUPPORTED_VERSION
|
|
138755
138697
|
});
|
|
138756
138698
|
};
|
|
138757
|
-
var
|
|
138699
|
+
var import_native_modules14 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138758
138700
|
function generateRequestId() {
|
|
138759
138701
|
var timestamp = Date.now().toString(36).toUpperCase();
|
|
138760
138702
|
var random = Math.random().toString(36).substring(2, 7).toUpperCase();
|
|
138761
138703
|
return `ait-${timestamp}${random}`;
|
|
138762
138704
|
}
|
|
138763
|
-
var
|
|
138705
|
+
var import_react_native27 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138764
138706
|
function getReferrer() {
|
|
138765
138707
|
try {
|
|
138766
|
-
return new URL((0,
|
|
138708
|
+
return new URL((0, import_react_native27.getSchemeUri)()).searchParams.get("referrer");
|
|
138767
138709
|
} catch {
|
|
138768
138710
|
return null;
|
|
138769
138711
|
}
|
|
138770
138712
|
}
|
|
138771
|
-
var
|
|
138772
|
-
var
|
|
138713
|
+
var import_native_modules13 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
138714
|
+
var import_react_native28 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
138773
138715
|
function getIsDev() {
|
|
138774
138716
|
try {
|
|
138775
|
-
return new URL((0,
|
|
138717
|
+
return new URL((0, import_react_native28.getSchemeUri)()).searchParams.get("isDev") === "true";
|
|
138776
138718
|
} catch {
|
|
138777
138719
|
return false;
|
|
138778
138720
|
}
|
|
138779
138721
|
}
|
|
138780
|
-
var OPERATIONAL_ENVIRONMENT = (0,
|
|
138781
|
-
var OS = (0,
|
|
138782
|
-
var APP_VER = (0,
|
|
138722
|
+
var OPERATIONAL_ENVIRONMENT = (0, import_native_modules13.getOperationalEnvironment)();
|
|
138723
|
+
var OS = (0, import_native_modules13.getPlatformOS)();
|
|
138724
|
+
var APP_VER = (0, import_native_modules13.getTossAppVersion)();
|
|
138783
138725
|
var ALPHA_EVENT_TRACKER_HTTP_ENDPOINT = "https://alpha-trillion.toss.im/trk/sdk-mediation/event";
|
|
138784
138726
|
var LIVE_EVENT_TRACKER_HTTP_ENDPOINT = "https://trillion.toss.im/trk/sdk-mediation/event";
|
|
138785
138727
|
function getPostEventTrackingUrl() {
|
|
@@ -138807,32 +138749,44 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138807
138749
|
}).catch(noop);
|
|
138808
138750
|
}
|
|
138809
138751
|
var INTEGRATED_AD_SDK_VERSION = "0.0.0";
|
|
138810
|
-
var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.
|
|
138811
|
-
var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.
|
|
138752
|
+
var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.247.0";
|
|
138753
|
+
var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.247.0";
|
|
138812
138754
|
var UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
|
|
138813
138755
|
var INTG_AD_ADM_FALLBACK_RID_MAP = {};
|
|
138814
138756
|
function integratedAdIsSupported() {
|
|
138815
|
-
return (0,
|
|
138757
|
+
return (0, import_native_modules14.isMinVersionSupported)({
|
|
138816
138758
|
android: ANDROID_INTEGRATED_AD_SUPPORTED_VERSION,
|
|
138817
138759
|
ios: IOS_INTEGRATED_AD_SUPPORTED_VERSION
|
|
138818
138760
|
});
|
|
138819
138761
|
}
|
|
138820
138762
|
function generateLoadFullScreenAd(sdkId) {
|
|
138821
138763
|
var fn = params => {
|
|
138822
|
-
if (!
|
|
138764
|
+
if (!import_native_modules14.GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
|
|
138823
138765
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
|
|
138824
138766
|
return noop;
|
|
138825
138767
|
}
|
|
138768
|
+
var normalizedAdGroupId = normalizeAdGroupId(params.options.adGroupId);
|
|
138769
|
+
if (normalizedAdGroupId.length === 0) {
|
|
138770
|
+
params.onError(createInvalidAdGroupIdError());
|
|
138771
|
+
return noop;
|
|
138772
|
+
}
|
|
138773
|
+
var normalizedParams = {
|
|
138774
|
+
...params,
|
|
138775
|
+
options: {
|
|
138776
|
+
...params.options,
|
|
138777
|
+
adGroupId: normalizedAdGroupId
|
|
138778
|
+
}
|
|
138779
|
+
};
|
|
138826
138780
|
if (!integratedAdIsSupported()) {
|
|
138827
|
-
return
|
|
138828
|
-
...
|
|
138781
|
+
return import_native_modules14.GoogleAdMob.loadAppsInTossAdMob({
|
|
138782
|
+
...normalizedParams,
|
|
138829
138783
|
onEvent: event => {
|
|
138830
138784
|
if (event.type === "loaded") {
|
|
138831
138785
|
var requestId = generateRequestId();
|
|
138832
|
-
INTG_AD_ADM_FALLBACK_RID_MAP[
|
|
138786
|
+
INTG_AD_ADM_FALLBACK_RID_MAP[normalizedAdGroupId] = requestId;
|
|
138833
138787
|
postEventTracking({
|
|
138834
138788
|
eventName: "LOAD",
|
|
138835
|
-
spaceUnitId:
|
|
138789
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138836
138790
|
requestId,
|
|
138837
138791
|
responseId: event.data.responseInfo.responseId,
|
|
138838
138792
|
mediationType: "ADMOB",
|
|
@@ -138841,13 +138795,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138841
138795
|
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
138842
138796
|
});
|
|
138843
138797
|
}
|
|
138844
|
-
return
|
|
138798
|
+
return normalizedParams.onEvent(event);
|
|
138845
138799
|
},
|
|
138846
138800
|
onError: error => {
|
|
138847
|
-
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[
|
|
138801
|
+
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[normalizedAdGroupId] ?? "";
|
|
138848
138802
|
postEventTracking({
|
|
138849
138803
|
eventName: "FAILED_TO_LOAD",
|
|
138850
|
-
spaceUnitId:
|
|
138804
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138851
138805
|
requestId,
|
|
138852
138806
|
responseId: "",
|
|
138853
138807
|
mediationType: "ADMOB",
|
|
@@ -138855,16 +138809,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138855
138809
|
adSourceName: "",
|
|
138856
138810
|
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
138857
138811
|
});
|
|
138858
|
-
return
|
|
138812
|
+
return normalizedParams.onError(error);
|
|
138859
138813
|
}
|
|
138860
138814
|
});
|
|
138861
138815
|
}
|
|
138862
|
-
var onEvent =
|
|
138863
|
-
onError =
|
|
138864
|
-
options =
|
|
138816
|
+
var onEvent = normalizedParams.onEvent,
|
|
138817
|
+
onError = normalizedParams.onError,
|
|
138818
|
+
options = normalizedParams.options;
|
|
138865
138819
|
var adGroupId = options.adGroupId;
|
|
138866
138820
|
var referrer = getReferrer();
|
|
138867
|
-
var unregisterCallbacks =
|
|
138821
|
+
var unregisterCallbacks = import_native_modules14.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("loadTossAdOrAdmob", {
|
|
138868
138822
|
spaceUnitId: adGroupId,
|
|
138869
138823
|
referrer,
|
|
138870
138824
|
sessionId,
|
|
@@ -138881,26 +138835,38 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138881
138835
|
});
|
|
138882
138836
|
return unregisterCallbacks;
|
|
138883
138837
|
};
|
|
138884
|
-
fn.isSupported =
|
|
138838
|
+
fn.isSupported = import_native_modules14.GoogleAdMob.loadAppsInTossAdMob.isSupported;
|
|
138885
138839
|
return fn;
|
|
138886
138840
|
}
|
|
138887
138841
|
var loadFullScreenAd = generateLoadFullScreenAd("107");
|
|
138888
138842
|
var loadFullScreenAdForWeb = generateLoadFullScreenAd("107");
|
|
138889
138843
|
function showFullScreenAd(params) {
|
|
138890
|
-
if (!
|
|
138844
|
+
if (!import_native_modules14.GoogleAdMob.showAppsInTossAdMob.isSupported()) {
|
|
138891
138845
|
params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
|
|
138892
138846
|
return noop;
|
|
138893
138847
|
}
|
|
138848
|
+
var normalizedAdGroupId = normalizeAdGroupId(params.options.adGroupId);
|
|
138849
|
+
if (normalizedAdGroupId.length === 0) {
|
|
138850
|
+
params.onError(createInvalidAdGroupIdError());
|
|
138851
|
+
return noop;
|
|
138852
|
+
}
|
|
138853
|
+
var normalizedParams = {
|
|
138854
|
+
...params,
|
|
138855
|
+
options: {
|
|
138856
|
+
...params.options,
|
|
138857
|
+
adGroupId: normalizedAdGroupId
|
|
138858
|
+
}
|
|
138859
|
+
};
|
|
138894
138860
|
if (!integratedAdIsSupported()) {
|
|
138895
|
-
return
|
|
138896
|
-
...
|
|
138861
|
+
return import_native_modules14.GoogleAdMob.showAppsInTossAdMob({
|
|
138862
|
+
...normalizedParams,
|
|
138897
138863
|
onEvent: event => {
|
|
138898
|
-
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[
|
|
138864
|
+
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[normalizedAdGroupId] ?? "";
|
|
138899
138865
|
switch (event.type) {
|
|
138900
138866
|
case "show":
|
|
138901
138867
|
postEventTracking({
|
|
138902
138868
|
eventName: "SHOW",
|
|
138903
|
-
spaceUnitId:
|
|
138869
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138904
138870
|
requestId,
|
|
138905
138871
|
responseId: "",
|
|
138906
138872
|
mediationType: "ADMOB",
|
|
@@ -138912,7 +138878,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138912
138878
|
case "failedToShow":
|
|
138913
138879
|
postEventTracking({
|
|
138914
138880
|
eventName: "FAILED_TO_SHOW",
|
|
138915
|
-
spaceUnitId:
|
|
138881
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138916
138882
|
requestId,
|
|
138917
138883
|
responseId: "",
|
|
138918
138884
|
mediationType: "ADMOB",
|
|
@@ -138924,7 +138890,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138924
138890
|
case "impression":
|
|
138925
138891
|
postEventTracking({
|
|
138926
138892
|
eventName: "IMP",
|
|
138927
|
-
spaceUnitId:
|
|
138893
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138928
138894
|
requestId,
|
|
138929
138895
|
responseId: "",
|
|
138930
138896
|
mediationType: "ADMOB",
|
|
@@ -138936,7 +138902,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138936
138902
|
case "clicked":
|
|
138937
138903
|
postEventTracking({
|
|
138938
138904
|
eventName: "CLICK",
|
|
138939
|
-
spaceUnitId:
|
|
138905
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138940
138906
|
requestId,
|
|
138941
138907
|
responseId: "",
|
|
138942
138908
|
mediationType: "ADMOB",
|
|
@@ -138948,7 +138914,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138948
138914
|
case "dismissed":
|
|
138949
138915
|
postEventTracking({
|
|
138950
138916
|
eventName: "DISMISS",
|
|
138951
|
-
spaceUnitId:
|
|
138917
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138952
138918
|
requestId,
|
|
138953
138919
|
responseId: "",
|
|
138954
138920
|
mediationType: "ADMOB",
|
|
@@ -138960,7 +138926,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138960
138926
|
case "userEarnedReward":
|
|
138961
138927
|
postEventTracking({
|
|
138962
138928
|
eventName: "USER_EARNED_REWARD",
|
|
138963
|
-
spaceUnitId:
|
|
138929
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138964
138930
|
requestId,
|
|
138965
138931
|
responseId: "",
|
|
138966
138932
|
mediationType: "ADMOB",
|
|
@@ -138970,13 +138936,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138970
138936
|
});
|
|
138971
138937
|
break;
|
|
138972
138938
|
}
|
|
138973
|
-
return
|
|
138939
|
+
return normalizedParams.onEvent(event);
|
|
138974
138940
|
},
|
|
138975
138941
|
onError: error => {
|
|
138976
|
-
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[
|
|
138942
|
+
var requestId = INTG_AD_ADM_FALLBACK_RID_MAP[normalizedAdGroupId] ?? "";
|
|
138977
138943
|
postEventTracking({
|
|
138978
138944
|
eventName: "FAILED_TO_SHOW",
|
|
138979
|
-
spaceUnitId:
|
|
138945
|
+
spaceUnitId: normalizedAdGroupId,
|
|
138980
138946
|
requestId,
|
|
138981
138947
|
responseId: "",
|
|
138982
138948
|
mediationType: "ADMOB",
|
|
@@ -138984,16 +138950,16 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
138984
138950
|
adSourceName: "",
|
|
138985
138951
|
sdkVer: INTEGRATED_AD_SDK_VERSION
|
|
138986
138952
|
});
|
|
138987
|
-
return
|
|
138953
|
+
return normalizedParams.onError(error);
|
|
138988
138954
|
}
|
|
138989
138955
|
});
|
|
138990
138956
|
}
|
|
138991
|
-
var onEvent =
|
|
138992
|
-
onError =
|
|
138993
|
-
options =
|
|
138957
|
+
var onEvent = normalizedParams.onEvent,
|
|
138958
|
+
onError = normalizedParams.onError,
|
|
138959
|
+
options = normalizedParams.options;
|
|
138994
138960
|
var adGroupId = options.adGroupId;
|
|
138995
138961
|
var referrer = getReferrer();
|
|
138996
|
-
var unregisterCallbacks =
|
|
138962
|
+
var unregisterCallbacks = import_native_modules14.INTERNAL__appBridgeHandler.invokeAppBridgeMethod("showTossAdOrAdmob", {
|
|
138997
138963
|
spaceUnitId: adGroupId,
|
|
138998
138964
|
referrer,
|
|
138999
138965
|
sessionId
|
|
@@ -139040,16 +139006,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139040
139006
|
});
|
|
139041
139007
|
return unregisterCallbacks;
|
|
139042
139008
|
}
|
|
139043
|
-
showFullScreenAd.isSupported =
|
|
139044
|
-
var
|
|
139045
|
-
var import_react_native30 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139009
|
+
showFullScreenAd.isSupported = import_native_modules14.GoogleAdMob.showAppsInTossAdMob.isSupported;
|
|
139010
|
+
var import_react_native29 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139046
139011
|
function tossAdEventLog(_x4) {
|
|
139047
139012
|
return _tossAdEventLog.apply(this, arguments);
|
|
139048
139013
|
}
|
|
139049
139014
|
function _tossAdEventLog() {
|
|
139050
139015
|
_tossAdEventLog = _asyncToGenerator(function* (params) {
|
|
139051
139016
|
var referrer = getReferrer();
|
|
139052
|
-
var appName =
|
|
139017
|
+
var appName = import_react_native29.Granite.appName;
|
|
139053
139018
|
var eventLogParams = {
|
|
139054
139019
|
...params,
|
|
139055
139020
|
params: {
|
|
@@ -139058,11 +139023,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139058
139023
|
app_name: appName
|
|
139059
139024
|
}
|
|
139060
139025
|
};
|
|
139061
|
-
return
|
|
139026
|
+
return sendLog(eventLogParams, {
|
|
139027
|
+
pipelines: ["core"]
|
|
139028
|
+
});
|
|
139062
139029
|
});
|
|
139063
139030
|
return _tossAdEventLog.apply(this, arguments);
|
|
139064
139031
|
}
|
|
139065
|
-
var
|
|
139032
|
+
var import_react21 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139066
139033
|
function serializeError(error) {
|
|
139067
139034
|
return JSON.stringify(error, (_, value) => {
|
|
139068
139035
|
if (value instanceof Error) {
|
|
@@ -139093,12 +139060,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139093
139060
|
return;
|
|
139094
139061
|
}
|
|
139095
139062
|
var wrappedFunc = function () {
|
|
139096
|
-
var
|
|
139063
|
+
var _ref34 = _asyncToGenerator(function* (...args2) {
|
|
139097
139064
|
var result = yield func(...args2);
|
|
139098
139065
|
return result;
|
|
139099
139066
|
});
|
|
139100
139067
|
return function wrappedFunc() {
|
|
139101
|
-
return
|
|
139068
|
+
return _ref34.apply(this, arguments);
|
|
139102
139069
|
};
|
|
139103
139070
|
}();
|
|
139104
139071
|
wrappedFunc(...args).then(result => {
|
|
@@ -139119,12 +139086,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139119
139086
|
asyncHandlerMap,
|
|
139120
139087
|
eventListenerMap
|
|
139121
139088
|
}) {
|
|
139122
|
-
var ref = (0,
|
|
139123
|
-
var injectedJavaScript = (0,
|
|
139089
|
+
var ref = (0, import_react21.useRef)(null);
|
|
139090
|
+
var injectedJavaScript = (0, import_react21.useMemo)(() => `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(Object.entries(constantHandlerMap).reduce((acc, [key, value]) => {
|
|
139124
139091
|
acc[key] = typeof value === "function" ? value() : value;
|
|
139125
139092
|
return acc;
|
|
139126
139093
|
}, {}))};`, [constantHandlerMap]);
|
|
139127
|
-
(0,
|
|
139094
|
+
(0, import_react21.useEffect)(() => {
|
|
139128
139095
|
ref.current?.injectJavaScript(injectedJavaScript);
|
|
139129
139096
|
}, [injectedJavaScript]);
|
|
139130
139097
|
var createHandleOnEvent = (functionName, eventId) => response => {
|
|
@@ -139138,8 +139105,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139138
139105
|
window.__GRANITE_NATIVE_EMITTER.emit('${functionName}/onError/${eventId}', ${serializedError});
|
|
139139
139106
|
`);
|
|
139140
139107
|
};
|
|
139141
|
-
var $onMessage = (0,
|
|
139142
|
-
var
|
|
139108
|
+
var $onMessage = (0, import_react21.useCallback)(function () {
|
|
139109
|
+
var _ref35 = _asyncToGenerator(function* (e) {
|
|
139143
139110
|
onMessage?.(e);
|
|
139144
139111
|
var data = parseNativeEventData(e.nativeEvent.data);
|
|
139145
139112
|
if (typeof data !== "object" || data === null || typeof data.functionName !== "string" || typeof data.eventId !== "string" || typeof data.type !== "string" || !["addEventListener", "removeEventListener", "method"].includes(data.type)) {
|
|
@@ -139182,7 +139149,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139182
139149
|
}
|
|
139183
139150
|
});
|
|
139184
139151
|
return function (_x5) {
|
|
139185
|
-
return
|
|
139152
|
+
return _ref35.apply(this, arguments);
|
|
139186
139153
|
};
|
|
139187
139154
|
}(), [onMessage]);
|
|
139188
139155
|
return {
|
|
@@ -139200,22 +139167,22 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139200
139167
|
}
|
|
139201
139168
|
}
|
|
139202
139169
|
var import_react_native_safe_area_context3 = _$$_REQUIRE(_dependencyMap[13], "@granite-js/native/react-native-safe-area-context");
|
|
139203
|
-
var
|
|
139170
|
+
var import_react22 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139204
139171
|
function useSafeAreaInsetsEvent() {
|
|
139205
139172
|
var insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
|
|
139206
|
-
(0,
|
|
139173
|
+
(0, import_react22.useEffect)(() => {
|
|
139207
139174
|
safeAreaInsetsChange.emit(insets);
|
|
139208
139175
|
}, [insets]);
|
|
139209
|
-
(0,
|
|
139176
|
+
(0, import_react22.useEffect)(() => {
|
|
139210
139177
|
return () => safeAreaInsetsChange.clearSubscriptions();
|
|
139211
139178
|
}, []);
|
|
139212
139179
|
return safeAreaInsetsChange;
|
|
139213
139180
|
}
|
|
139214
|
-
var
|
|
139181
|
+
var import_react_native30 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139215
139182
|
var import_tds_react_native13 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
139216
139183
|
var import_es_hangul5 = _$$_REQUIRE(_dependencyMap[11], "es-hangul");
|
|
139217
|
-
var import_react25 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139218
139184
|
var import_react24 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139185
|
+
var import_react23 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139219
139186
|
var INITIAL_STATE = {
|
|
139220
139187
|
stack: [],
|
|
139221
139188
|
index: -1
|
|
@@ -139264,11 +139231,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139264
139231
|
}
|
|
139265
139232
|
}
|
|
139266
139233
|
function useWebViewHistory() {
|
|
139267
|
-
var
|
|
139268
|
-
|
|
139269
|
-
state =
|
|
139270
|
-
dispatch =
|
|
139271
|
-
var onNavigationStateChange = (0,
|
|
139234
|
+
var _ref36 = (0, import_react23.useReducer)(reducer, INITIAL_STATE),
|
|
139235
|
+
_ref37 = _slicedToArray(_ref36, 2),
|
|
139236
|
+
state = _ref37[0],
|
|
139237
|
+
dispatch = _ref37[1];
|
|
139238
|
+
var onNavigationStateChange = (0, import_react23.useCallback)(({
|
|
139272
139239
|
url,
|
|
139273
139240
|
canGoForward: canGoForward2
|
|
139274
139241
|
}) => {
|
|
@@ -139278,7 +139245,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139278
139245
|
canGoForward: canGoForward2
|
|
139279
139246
|
});
|
|
139280
139247
|
}, []);
|
|
139281
|
-
var
|
|
139248
|
+
var _ref38 = (0, import_react23.useMemo)(() => {
|
|
139282
139249
|
var canBack = state.index > 0;
|
|
139283
139250
|
var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
|
|
139284
139251
|
return {
|
|
@@ -139286,8 +139253,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139286
139253
|
canGoForward: canFwd
|
|
139287
139254
|
};
|
|
139288
139255
|
}, [state.index, state.stack.length]),
|
|
139289
|
-
canGoBack =
|
|
139290
|
-
canGoForward =
|
|
139256
|
+
canGoBack = _ref38.canGoBack,
|
|
139257
|
+
canGoForward = _ref38.canGoForward;
|
|
139291
139258
|
return {
|
|
139292
139259
|
onNavigationStateChange,
|
|
139293
139260
|
hasHistory: canGoBack,
|
|
@@ -139295,27 +139262,25 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139295
139262
|
};
|
|
139296
139263
|
}
|
|
139297
139264
|
function useWebBackHandler(webViewInitialURL, webViewRef) {
|
|
139298
|
-
var _useCaptureExitLog5 = useCaptureExitLog(),
|
|
139299
|
-
captureExitLog = _useCaptureExitLog5.captureExitLog;
|
|
139300
139265
|
var _useWebViewHistory = useWebViewHistory(),
|
|
139301
139266
|
hasHistory = _useWebViewHistory.hasHistory,
|
|
139302
139267
|
onNavigationStateChange = _useWebViewHistory.onNavigationStateChange;
|
|
139303
|
-
var
|
|
139304
|
-
webBackHandlersRef =
|
|
139305
|
-
hasWebBackEvent =
|
|
139306
|
-
addWebBackEventListener =
|
|
139307
|
-
removeWebBackEventListener =
|
|
139268
|
+
var _ref39 = (0, import_react_native30.useBackEventState)(),
|
|
139269
|
+
webBackHandlersRef = _ref39.handlersRef,
|
|
139270
|
+
hasWebBackEvent = _ref39.hasBackEvent,
|
|
139271
|
+
addWebBackEventListener = _ref39.addEventListener,
|
|
139272
|
+
removeWebBackEventListener = _ref39.removeEventListener;
|
|
139308
139273
|
var logging = useNavigationBarLogging();
|
|
139309
|
-
var
|
|
139310
|
-
openConfirm =
|
|
139274
|
+
var _ref40 = (0, import_tds_react_native13.useDialog)(),
|
|
139275
|
+
openConfirm = _ref40.openConfirm;
|
|
139311
139276
|
var global2 = getAppsInTossGlobals();
|
|
139312
|
-
var addEventListener = (0,
|
|
139277
|
+
var addEventListener = (0, import_react24.useCallback)(handler => {
|
|
139313
139278
|
addWebBackEventListener(handler);
|
|
139314
139279
|
}, [addWebBackEventListener]);
|
|
139315
|
-
var removeEventListener = (0,
|
|
139280
|
+
var removeEventListener = (0, import_react24.useCallback)(handler => {
|
|
139316
139281
|
removeWebBackEventListener(handler);
|
|
139317
139282
|
}, [removeWebBackEventListener]);
|
|
139318
|
-
var handleWebBack = (0,
|
|
139283
|
+
var handleWebBack = (0, import_react24.useCallback)(_asyncToGenerator(function* () {
|
|
139319
139284
|
if (hasWebBackEvent) {
|
|
139320
139285
|
for (var handler of webBackHandlersRef) {
|
|
139321
139286
|
handler();
|
|
@@ -139334,12 +139299,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139334
139299
|
});
|
|
139335
139300
|
logging.closePopupCtaClick(isConfirmed);
|
|
139336
139301
|
if (isConfirmed) {
|
|
139337
|
-
|
|
139338
|
-
(0, import_react_native31.closeView)();
|
|
139302
|
+
(0, import_react_native30.closeView)();
|
|
139339
139303
|
}
|
|
139340
139304
|
}
|
|
139341
|
-
}), [
|
|
139342
|
-
var handleWebHome = (0,
|
|
139305
|
+
}), [global2.brandDisplayName, hasHistory, hasWebBackEvent, webBackHandlersRef, logging, openConfirm, webViewRef]);
|
|
139306
|
+
var handleWebHome = (0, import_react24.useCallback)(() => {
|
|
139343
139307
|
logging.homeButtonClick();
|
|
139344
139308
|
if (homeEvent.hasSubscriptions()) {
|
|
139345
139309
|
homeEvent.emit({});
|
|
@@ -139352,7 +139316,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139352
139316
|
})();
|
|
139353
139317
|
`);
|
|
139354
139318
|
}, [hasWebBackEvent, webBackHandlersRef, logging, webViewInitialURL, webViewRef]);
|
|
139355
|
-
return (0,
|
|
139319
|
+
return (0, import_react24.useMemo)(() => ({
|
|
139356
139320
|
addEventListener,
|
|
139357
139321
|
removeEventListener,
|
|
139358
139322
|
handleWebBack,
|
|
@@ -139371,8 +139335,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139371
139335
|
});
|
|
139372
139336
|
};
|
|
139373
139337
|
}
|
|
139374
|
-
var
|
|
139375
|
-
var
|
|
139338
|
+
var import_native_modules15 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
139339
|
+
var import_react_native31 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
139376
139340
|
var FontA11yCategory = {
|
|
139377
139341
|
Large: "Large",
|
|
139378
139342
|
xLarge: "xLarge",
|
|
@@ -139505,33 +139469,33 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139505
139469
|
safeArea,
|
|
139506
139470
|
safeAreaBottomTransparency
|
|
139507
139471
|
}) {
|
|
139508
|
-
var platform = (0,
|
|
139509
|
-
var appVersion = (0,
|
|
139510
|
-
var
|
|
139511
|
-
fontScale =
|
|
139472
|
+
var platform = (0, import_native_modules15.getPlatformOS)();
|
|
139473
|
+
var appVersion = (0, import_native_modules15.getTossAppVersion)();
|
|
139474
|
+
var _ref42 = (0, import_react_native31.useWindowDimensions)(),
|
|
139475
|
+
fontScale = _ref42.fontScale;
|
|
139512
139476
|
var platformString = platform === "ios" ? "iPhone" : "Android phone";
|
|
139513
139477
|
var fontA11y = mapFontScaleToCategory(fontScale, platform);
|
|
139514
139478
|
var normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
|
|
139515
139479
|
return ["AppsInToss", `TossApp/${appVersion}`, batteryModePreference && `TossBatteryModePreference/${batteryModePreference}`, colorPreference && `TossColorPreference/${colorPreference}`, `TossFontAccessibility/${fontA11y}`, `TossFontScale/${normalizedFontScale}`, locale && `TossLocale/${locale}`, navbarPreference && `TossNavbarPreference/${navbarPreference}`, pureSafeArea && `TossPureSafeArea/${pureSafeArea}`, safeArea && `TossSafeArea/${safeArea}`, safeAreaBottomTransparency && `TossSafeAreaBottomTransparency/${safeAreaBottomTransparency}`, platformString].filter(Boolean).join(" ");
|
|
139516
139480
|
}
|
|
139517
|
-
var
|
|
139518
|
-
var
|
|
139519
|
-
var
|
|
139481
|
+
var import_native_modules16 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
139482
|
+
var import_react_native32 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139483
|
+
var import_react25 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139520
139484
|
function useGeolocation({
|
|
139521
139485
|
accuracy,
|
|
139522
139486
|
distanceInterval,
|
|
139523
139487
|
timeInterval
|
|
139524
139488
|
}) {
|
|
139525
|
-
var isVisible = (0,
|
|
139526
|
-
var
|
|
139527
|
-
|
|
139528
|
-
location =
|
|
139529
|
-
setLocation =
|
|
139530
|
-
(0,
|
|
139489
|
+
var isVisible = (0, import_react_native32.useVisibility)();
|
|
139490
|
+
var _ref43 = (0, import_react25.useState)(null),
|
|
139491
|
+
_ref44 = _slicedToArray(_ref43, 2),
|
|
139492
|
+
location = _ref44[0],
|
|
139493
|
+
setLocation = _ref44[1];
|
|
139494
|
+
(0, import_react25.useEffect)(() => {
|
|
139531
139495
|
if (!isVisible) {
|
|
139532
139496
|
return;
|
|
139533
139497
|
}
|
|
139534
|
-
return (0,
|
|
139498
|
+
return (0, import_native_modules16.startUpdateLocation)({
|
|
139535
139499
|
options: {
|
|
139536
139500
|
accuracy,
|
|
139537
139501
|
distanceInterval,
|
|
@@ -139543,18 +139507,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139543
139507
|
}, [accuracy, distanceInterval, timeInterval, isVisible]);
|
|
139544
139508
|
return location;
|
|
139545
139509
|
}
|
|
139546
|
-
var
|
|
139547
|
-
var
|
|
139510
|
+
var import_react_native33 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139511
|
+
var import_react26 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139548
139512
|
function useWaitForReturnNavigator() {
|
|
139549
|
-
var callbacks = (0,
|
|
139550
|
-
var navigation = (0,
|
|
139551
|
-
var startNavigating = (0,
|
|
139513
|
+
var callbacks = (0, import_react26.useRef)([]).current;
|
|
139514
|
+
var navigation = (0, import_react_native33.useNavigation)();
|
|
139515
|
+
var startNavigating = (0, import_react26.useCallback)((route, params) => {
|
|
139552
139516
|
return new Promise(resolve => {
|
|
139553
139517
|
callbacks.push(resolve);
|
|
139554
139518
|
navigation.navigate(route, params);
|
|
139555
139519
|
});
|
|
139556
139520
|
}, [callbacks, navigation]);
|
|
139557
|
-
var handleVisibilityChange = (0,
|
|
139521
|
+
var handleVisibilityChange = (0, import_react26.useCallback)(state => {
|
|
139558
139522
|
if (state === "visible" && callbacks.length > 0) {
|
|
139559
139523
|
for (var callback of callbacks) {
|
|
139560
139524
|
callback();
|
|
@@ -139562,7 +139526,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139562
139526
|
callbacks.splice(0, callbacks.length);
|
|
139563
139527
|
}
|
|
139564
139528
|
}, [callbacks]);
|
|
139565
|
-
(0,
|
|
139529
|
+
(0, import_react_native33.useVisibilityChange)(handleVisibilityChange);
|
|
139566
139530
|
return startNavigating;
|
|
139567
139531
|
}
|
|
139568
139532
|
function useTopNavigation() {
|
|
@@ -139574,8 +139538,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139574
139538
|
removeAccessoryButton: removeNavigationRightButton
|
|
139575
139539
|
};
|
|
139576
139540
|
}
|
|
139577
|
-
var
|
|
139578
|
-
var
|
|
139541
|
+
var import_native_modules17 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
139542
|
+
var import_react_native34 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139579
139543
|
var import_tds_react_native14 = _$$_REQUIRE(_dependencyMap[7], "@toss/tds-react-native");
|
|
139580
139544
|
function useHandleWebViewProcessDidTerminate(webViewRef) {
|
|
139581
139545
|
var toast = (0, import_tds_react_native14.useToast)();
|
|
@@ -139604,18 +139568,20 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139604
139568
|
log_type: "debug",
|
|
139605
139569
|
params: {
|
|
139606
139570
|
...params,
|
|
139607
|
-
app_name:
|
|
139571
|
+
app_name: import_react_native34.Granite.appName,
|
|
139608
139572
|
deployment_id: global2.deploymentId
|
|
139609
139573
|
}
|
|
139610
139574
|
};
|
|
139611
|
-
if ((0,
|
|
139612
|
-
|
|
139575
|
+
if ((0, import_native_modules17.getOperationalEnvironment)() === "toss") {
|
|
139576
|
+
sendLog(event, {
|
|
139577
|
+
pipelines: ["core"]
|
|
139578
|
+
});
|
|
139613
139579
|
} else {
|
|
139614
139580
|
console.log("[webViewDebugLog]", event);
|
|
139615
139581
|
}
|
|
139616
139582
|
}
|
|
139617
|
-
var
|
|
139618
|
-
var
|
|
139583
|
+
var import_native_modules18 = _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules");
|
|
139584
|
+
var import_react_native35 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139619
139585
|
var extractDateFromUUIDv7 = uuid => {
|
|
139620
139586
|
var timestampHex = uuid.split("-").join("").slice(0, 12);
|
|
139621
139587
|
var timestamp = Number.parseInt(timestampHex, 16);
|
|
@@ -139637,7 +139603,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139637
139603
|
};
|
|
139638
139604
|
var getReferrer2 = () => {
|
|
139639
139605
|
try {
|
|
139640
|
-
var referrer = new URL((0,
|
|
139606
|
+
var referrer = new URL((0, import_react_native35.getSchemeUri)());
|
|
139641
139607
|
return referrer.searchParams.get("referrer");
|
|
139642
139608
|
} catch {
|
|
139643
139609
|
return "";
|
|
@@ -139658,7 +139624,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139658
139624
|
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
139659
139625
|
}
|
|
139660
139626
|
};
|
|
139661
|
-
return (0,
|
|
139627
|
+
return (0, import_native_modules18.eventLog)(log);
|
|
139662
139628
|
};
|
|
139663
139629
|
var import_jsx_runtime19 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
139664
139630
|
var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
|
|
@@ -139670,18 +139636,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139670
139636
|
};
|
|
139671
139637
|
function mergeSchemeQueryParamsInto(url) {
|
|
139672
139638
|
var baseUrl = new URL(url);
|
|
139673
|
-
var schemeUrl = new URL((0,
|
|
139639
|
+
var schemeUrl = new URL((0, import_react_native36.getSchemeUri)());
|
|
139674
139640
|
var resultUrl = new URL(schemeUrl.pathname, baseUrl.origin);
|
|
139675
|
-
for (var
|
|
139676
|
-
var
|
|
139677
|
-
var key =
|
|
139678
|
-
var value =
|
|
139641
|
+
for (var _ref45 of baseUrl.searchParams.entries()) {
|
|
139642
|
+
var _ref46 = _slicedToArray(_ref45, 2);
|
|
139643
|
+
var key = _ref46[0];
|
|
139644
|
+
var value = _ref46[1];
|
|
139679
139645
|
resultUrl.searchParams.set(key, value);
|
|
139680
139646
|
}
|
|
139681
|
-
for (var
|
|
139682
|
-
var
|
|
139683
|
-
var _key =
|
|
139684
|
-
var _value =
|
|
139647
|
+
for (var _ref47 of schemeUrl.searchParams.entries()) {
|
|
139648
|
+
var _ref48 = _slicedToArray(_ref47, 2);
|
|
139649
|
+
var _key = _ref48[0];
|
|
139650
|
+
var _value = _ref48[1];
|
|
139685
139651
|
resultUrl.searchParams.set(_key, _value);
|
|
139686
139652
|
}
|
|
139687
139653
|
return resultUrl;
|
|
@@ -139691,8 +139657,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139691
139657
|
var devUrl = `http://${local.host}:${local.port}`;
|
|
139692
139658
|
return mergeSchemeQueryParamsInto(devUrl);
|
|
139693
139659
|
}
|
|
139694
|
-
var
|
|
139695
|
-
rawUrl =
|
|
139660
|
+
var _ref49 = (0, import_native_modules19.safeSyncPostMessage)("getWebBundleURL", {}),
|
|
139661
|
+
rawUrl = _ref49.url;
|
|
139696
139662
|
var url = mergeSchemeQueryParamsInto(rawUrl);
|
|
139697
139663
|
var deploymentId = env.getDeploymentId();
|
|
139698
139664
|
if (deploymentId) {
|
|
@@ -139709,8 +139675,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139709
139675
|
if (!TYPES.includes(type)) {
|
|
139710
139676
|
throw new Error(`Invalid WebView type: '${type}'`);
|
|
139711
139677
|
}
|
|
139712
|
-
var webViewRef = (0,
|
|
139713
|
-
var url = (0,
|
|
139678
|
+
var webViewRef = (0, import_react27.useRef)(null);
|
|
139679
|
+
var url = (0, import_react27.useMemo)(() => getWebViewURL(local), [local]);
|
|
139714
139680
|
var webBackHandler = useWebBackHandler(url, webViewRef);
|
|
139715
139681
|
var top = (0, import_private9.useSafeAreaTop)();
|
|
139716
139682
|
var bottom = (0, import_private9.useSafeAreaBottom)();
|
|
@@ -139718,10 +139684,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139718
139684
|
var global2 = getAppsInTossGlobals();
|
|
139719
139685
|
var navigationBarContext = useNavigationBarContext();
|
|
139720
139686
|
var safeAreaInsetsEvent = useSafeAreaInsetsEvent();
|
|
139721
|
-
var
|
|
139722
|
-
|
|
139723
|
-
allowsBackForwardNavigationGestures =
|
|
139724
|
-
setAllowsBackForwardNavigationGestures =
|
|
139687
|
+
var _ref50 = (0, import_react27.useState)(props.allowsBackForwardNavigationGestures),
|
|
139688
|
+
_ref51 = _slicedToArray(_ref50, 2),
|
|
139689
|
+
allowsBackForwardNavigationGestures = _ref51[0],
|
|
139690
|
+
setAllowsBackForwardNavigationGestures = _ref51[1];
|
|
139725
139691
|
var handler = useBridgeHandler({
|
|
139726
139692
|
onMessage,
|
|
139727
139693
|
eventListenerMap: {
|
|
@@ -139748,7 +139714,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139748
139714
|
onEvent,
|
|
139749
139715
|
onError,
|
|
139750
139716
|
options
|
|
139751
|
-
}) =>
|
|
139717
|
+
}) => import_native_modules19.appsInTossEvent.addEventListener("updateLocationEvent", {
|
|
139752
139718
|
onEvent,
|
|
139753
139719
|
onError,
|
|
139754
139720
|
options
|
|
@@ -139760,19 +139726,19 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139760
139726
|
onEvent,
|
|
139761
139727
|
onError,
|
|
139762
139728
|
options
|
|
139763
|
-
}) =>
|
|
139729
|
+
}) => import_native_modules19.appsInTossEvent.addEventListener("appBridgeCallbackEvent", {
|
|
139764
139730
|
onEvent,
|
|
139765
139731
|
onError,
|
|
139766
139732
|
options
|
|
139767
139733
|
}),
|
|
139768
|
-
loadAppsInTossAdMob:
|
|
139769
|
-
showAppsInTossAdMob:
|
|
139734
|
+
loadAppsInTossAdMob: import_native_modules19.GoogleAdMob.loadAppsInTossAdMob,
|
|
139735
|
+
showAppsInTossAdMob: import_native_modules19.GoogleAdMob.showAppsInTossAdMob,
|
|
139770
139736
|
loadFullScreenAd: loadFullScreenAdForWeb,
|
|
139771
139737
|
showFullScreenAd,
|
|
139772
139738
|
fetchTossAd,
|
|
139773
|
-
iapCreateOneTimePurchaseOrder:
|
|
139774
|
-
requestSubscriptionPurchase:
|
|
139775
|
-
requestOneTimePurchase:
|
|
139739
|
+
iapCreateOneTimePurchaseOrder: import_native_modules19.IAP.createOneTimePurchaseOrder,
|
|
139740
|
+
requestSubscriptionPurchase: import_native_modules19.IAP.createSubscriptionPurchaseOrder,
|
|
139741
|
+
requestOneTimePurchase: import_native_modules19.requestOneTimePurchase
|
|
139776
139742
|
},
|
|
139777
139743
|
constantHandlerMap: {
|
|
139778
139744
|
...appsInTossConstantBridges,
|
|
@@ -139783,11 +139749,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139783
139749
|
right: insets.right
|
|
139784
139750
|
}),
|
|
139785
139751
|
...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
|
|
139786
|
-
getServerTime_isSupported:
|
|
139787
|
-
requestReview_isSupported:
|
|
139788
|
-
loadAppsInTossAdMob_isSupported:
|
|
139789
|
-
showAppsInTossAdMob_isSupported:
|
|
139790
|
-
isAppsInTossAdMobLoaded_isSupported:
|
|
139752
|
+
getServerTime_isSupported: import_native_modules19.getServerTime.isSupported,
|
|
139753
|
+
requestReview_isSupported: import_native_modules19.requestReview.isSupported,
|
|
139754
|
+
loadAppsInTossAdMob_isSupported: import_native_modules19.GoogleAdMob.loadAppsInTossAdMob.isSupported,
|
|
139755
|
+
showAppsInTossAdMob_isSupported: import_native_modules19.GoogleAdMob.showAppsInTossAdMob.isSupported,
|
|
139756
|
+
isAppsInTossAdMobLoaded_isSupported: import_native_modules19.GoogleAdMob.isAppsInTossAdMobLoaded.isSupported,
|
|
139791
139757
|
loadFullScreenAd_isSupported: loadFullScreenAdForWeb.isSupported,
|
|
139792
139758
|
showFullScreenAd_isSupported: showFullScreenAd.isSupported,
|
|
139793
139759
|
fetchTossAd_isSupported: fetchTossAd.isSupported,
|
|
@@ -139797,25 +139763,25 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139797
139763
|
},
|
|
139798
139764
|
asyncHandlerMap: {
|
|
139799
139765
|
...appsInTossAsyncBridges,
|
|
139800
|
-
getServerTime:
|
|
139766
|
+
getServerTime: import_native_modules19.getServerTime,
|
|
139801
139767
|
setIosSwipeGestureEnabled: options => {
|
|
139802
139768
|
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
139803
139769
|
return appsInTossAsyncBridges.setIosSwipeGestureEnabled(options);
|
|
139804
139770
|
},
|
|
139805
139771
|
addAccessoryButton: function () {
|
|
139806
|
-
var
|
|
139772
|
+
var _ref52 = _asyncToGenerator(function* (params) {
|
|
139807
139773
|
return navigationBarContext.addNavigationRightButton(params);
|
|
139808
139774
|
});
|
|
139809
139775
|
return function addAccessoryButton(_x7) {
|
|
139810
|
-
return
|
|
139776
|
+
return _ref52.apply(this, arguments);
|
|
139811
139777
|
};
|
|
139812
139778
|
}(),
|
|
139813
139779
|
removeAccessoryButton: function () {
|
|
139814
|
-
var
|
|
139780
|
+
var _ref53 = _asyncToGenerator(function* () {
|
|
139815
139781
|
return navigationBarContext.removeNavigationRightButton();
|
|
139816
139782
|
});
|
|
139817
139783
|
return function removeAccessoryButton() {
|
|
139818
|
-
return
|
|
139784
|
+
return _ref53.apply(this, arguments);
|
|
139819
139785
|
};
|
|
139820
139786
|
}(),
|
|
139821
139787
|
requestPermission: appsInTossAsyncBridges.requestPermission,
|
|
@@ -139827,32 +139793,31 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139827
139793
|
fetchContacts: appsInTossAsyncBridges.fetchContacts,
|
|
139828
139794
|
getCurrentLocation: appsInTossAsyncBridges.getCurrentLocation,
|
|
139829
139795
|
openCamera: appsInTossAsyncBridges.openCamera,
|
|
139830
|
-
getStorageItem:
|
|
139831
|
-
setStorageItem:
|
|
139832
|
-
removeStorageItem:
|
|
139833
|
-
clearItems:
|
|
139834
|
-
iapGetProductItemList:
|
|
139835
|
-
iapCreateOneTimePurchaseOrder:
|
|
139836
|
-
processProductGrant:
|
|
139837
|
-
getPendingOrders:
|
|
139838
|
-
getCompletedOrRefundedOrders:
|
|
139839
|
-
completeProductGrant:
|
|
139840
|
-
getSubscriptionInfo:
|
|
139841
|
-
isAppsInTossAdMobLoaded:
|
|
139796
|
+
getStorageItem: import_native_modules19.Storage.getItem,
|
|
139797
|
+
setStorageItem: import_native_modules19.Storage.setItem,
|
|
139798
|
+
removeStorageItem: import_native_modules19.Storage.removeItem,
|
|
139799
|
+
clearItems: import_native_modules19.Storage.clearItems,
|
|
139800
|
+
iapGetProductItemList: import_native_modules19.IAP.getProductItemList,
|
|
139801
|
+
iapCreateOneTimePurchaseOrder: import_native_modules19.iapCreateOneTimePurchaseOrder,
|
|
139802
|
+
processProductGrant: import_native_modules19.processProductGrant,
|
|
139803
|
+
getPendingOrders: import_native_modules19.IAP.getPendingOrders,
|
|
139804
|
+
getCompletedOrRefundedOrders: import_native_modules19.IAP.getCompletedOrRefundedOrders,
|
|
139805
|
+
completeProductGrant: import_native_modules19.IAP.completeProductGrant,
|
|
139806
|
+
getSubscriptionInfo: import_native_modules19.IAP.getSubscriptionInfo,
|
|
139807
|
+
isAppsInTossAdMobLoaded: import_native_modules19.GoogleAdMob.isAppsInTossAdMobLoaded,
|
|
139842
139808
|
tossAdEventLog,
|
|
139843
139809
|
memoryDebugLog: webViewMemoryDebugLog,
|
|
139844
139810
|
debugLog: function () {
|
|
139845
|
-
var
|
|
139846
|
-
(
|
|
139847
|
-
import_native_modules24.INTERNAL__module.tossCoreEventLog(event);
|
|
139811
|
+
var _ref54 = _asyncToGenerator(function* (event) {
|
|
139812
|
+
sendLog(event);
|
|
139848
139813
|
});
|
|
139849
139814
|
return function debugLog(_x8) {
|
|
139850
|
-
return
|
|
139815
|
+
return _ref54.apply(this, arguments);
|
|
139851
139816
|
};
|
|
139852
139817
|
}()
|
|
139853
139818
|
}
|
|
139854
139819
|
});
|
|
139855
|
-
var headerPropForExternalWebView = (0,
|
|
139820
|
+
var headerPropForExternalWebView = (0, import_react27.useMemo)(() => {
|
|
139856
139821
|
var parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
|
|
139857
139822
|
var initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
|
|
139858
139823
|
var withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
@@ -139873,12 +139838,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139873
139838
|
colorPreference: "light"
|
|
139874
139839
|
});
|
|
139875
139840
|
var refs = mergeRefs(handler.ref, webViewRef);
|
|
139876
|
-
(0,
|
|
139841
|
+
(0, import_react27.useEffect)(() => {
|
|
139877
139842
|
var callback = () => {
|
|
139878
139843
|
webBackHandler.handleWebBack();
|
|
139879
139844
|
return true;
|
|
139880
139845
|
};
|
|
139881
|
-
var subscription =
|
|
139846
|
+
var subscription = import_react_native37.BackHandler.addEventListener("hardwareBackPress", callback);
|
|
139882
139847
|
return () => subscription.remove();
|
|
139883
139848
|
}, [webBackHandler]);
|
|
139884
139849
|
var handleWebViewProcessDidTerminate = useHandleWebViewProcessDidTerminate(webViewRef);
|
|
@@ -139902,14 +139867,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139902
139867
|
webBackHandler.onNavigationStateChange(event);
|
|
139903
139868
|
},
|
|
139904
139869
|
textZoom: 100,
|
|
139905
|
-
userAgent:
|
|
139870
|
+
userAgent: import_react_native37.Platform.OS === "ios" ? userAgent : void 0,
|
|
139906
139871
|
sharedCookiesEnabled: true,
|
|
139907
139872
|
webviewDebuggingEnabled: webViewDebuggingEnabled,
|
|
139908
139873
|
thirdPartyCookiesEnabled: true,
|
|
139909
139874
|
onMessage: handler.onMessage,
|
|
139910
139875
|
injectedJavaScript: import_user_scripts.afterDocumentLoad,
|
|
139911
139876
|
injectedJavaScriptBeforeContentLoaded: [handler.injectedJavaScript, import_user_scripts.beforeDocumentLoad].join("\n"),
|
|
139912
|
-
decelerationRate:
|
|
139877
|
+
decelerationRate: import_react_native37.Platform.OS === "ios" ? 1 : void 0,
|
|
139913
139878
|
allowsBackForwardNavigationGestures,
|
|
139914
139879
|
onShouldStartLoadWithRequest: event => {
|
|
139915
139880
|
try {
|
|
@@ -139917,7 +139882,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139917
139882
|
if (["https:", "http:"].includes(url2.protocol) || url2.href === "about:blank") {
|
|
139918
139883
|
return true;
|
|
139919
139884
|
} else {
|
|
139920
|
-
|
|
139885
|
+
import_react_native37.Linking.openURL(convertIntentURL(url2) ?? url2.href);
|
|
139921
139886
|
return false;
|
|
139922
139887
|
}
|
|
139923
139888
|
} catch (error) {
|
|
@@ -139935,9 +139900,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139935
139900
|
__reExport(src_exports, _$$_REQUIRE(_dependencyMap[5], "@apps-in-toss/native-modules"), module.exports);
|
|
139936
139901
|
__reExport(src_exports, _$$_REQUIRE(_dependencyMap[19], "@apps-in-toss/types"), module.exports);
|
|
139937
139902
|
var import_types = _$$_REQUIRE(_dependencyMap[19], "@apps-in-toss/types");
|
|
139938
|
-
var
|
|
139939
|
-
var
|
|
139940
|
-
var
|
|
139903
|
+
var import_react_native41 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
139904
|
+
var import_react30 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
139905
|
+
var import_react_native42 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
139941
139906
|
var SDK_ID = "106";
|
|
139942
139907
|
var LIST_BANNER_STYLE_ID = "1";
|
|
139943
139908
|
var NATIVE_IMAGE_STYLE_ID = "2";
|
|
@@ -140128,10 +140093,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140128
140093
|
}
|
|
140129
140094
|
function _loadAd() {
|
|
140130
140095
|
_loadAd = _asyncToGenerator(function* (adGroupId) {
|
|
140131
|
-
|
|
140096
|
+
var normalizedAdGroupId = normalizeAdGroupId(adGroupId);
|
|
140097
|
+
if (normalizedAdGroupId.length === 0) {
|
|
140132
140098
|
return {
|
|
140133
140099
|
type: "error",
|
|
140134
|
-
error: createError(ERROR_CODES.INVALID_SPACE,
|
|
140100
|
+
error: createError(ERROR_CODES.INVALID_SPACE, INVALID_AD_GROUP_ID_ERROR_MESSAGE)
|
|
140135
140101
|
};
|
|
140136
140102
|
}
|
|
140137
140103
|
if (!fetchTossAd.isSupported()) {
|
|
@@ -140143,7 +140109,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140143
140109
|
var response;
|
|
140144
140110
|
try {
|
|
140145
140111
|
var raw = yield fetchTossAdPromise({
|
|
140146
|
-
adGroupId,
|
|
140112
|
+
adGroupId: normalizedAdGroupId,
|
|
140147
140113
|
sdkId: SDK_ID,
|
|
140148
140114
|
availableStyleIds: AVAILABLE_STYLE_IDS
|
|
140149
140115
|
});
|
|
@@ -140214,7 +140180,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140214
140180
|
});
|
|
140215
140181
|
return _loadAd.apply(this, arguments);
|
|
140216
140182
|
}
|
|
140217
|
-
var
|
|
140183
|
+
var import_react_native38 = _$$_REQUIRE(_dependencyMap[6], "@granite-js/react-native");
|
|
140218
140184
|
function isSafeUrl(url) {
|
|
140219
140185
|
try {
|
|
140220
140186
|
var parsed = new URL(url);
|
|
@@ -140230,7 +140196,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140230
140196
|
return;
|
|
140231
140197
|
}
|
|
140232
140198
|
try {
|
|
140233
|
-
(0,
|
|
140199
|
+
(0, import_react_native38.openURL)(getWebSchemeOrUri(url));
|
|
140234
140200
|
} catch (error) {
|
|
140235
140201
|
console.error("[InlineAd] Failed to open landing URL:", error);
|
|
140236
140202
|
}
|
|
@@ -140338,8 +140304,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140338
140304
|
}]);
|
|
140339
140305
|
}();
|
|
140340
140306
|
var import_react_native_svg = _$$_REQUIRE(_dependencyMap[20], "@granite-js/native/react-native-svg");
|
|
140341
|
-
var
|
|
140342
|
-
var
|
|
140307
|
+
var import_react28 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
140308
|
+
var import_react_native39 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
140343
140309
|
var import_jsx_runtime20 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
140344
140310
|
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";
|
|
140345
140311
|
function FeedBannerAdView({
|
|
@@ -140357,12 +140323,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140357
140323
|
paddingStyle,
|
|
140358
140324
|
onPress
|
|
140359
140325
|
}) {
|
|
140360
|
-
var scale = (0,
|
|
140326
|
+
var scale = (0, import_react28.useRef)(new import_react_native39.Animated.Value(1)).current;
|
|
140361
140327
|
var animateScale = toValue => {
|
|
140362
|
-
|
|
140328
|
+
import_react_native39.Animated.timing(scale, {
|
|
140363
140329
|
toValue,
|
|
140364
140330
|
duration: 100,
|
|
140365
|
-
easing:
|
|
140331
|
+
easing: import_react_native39.Easing.inOut(import_react_native39.Easing.ease),
|
|
140366
140332
|
useNativeDriver: true
|
|
140367
140333
|
}).start();
|
|
140368
140334
|
};
|
|
@@ -140374,52 +140340,52 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140374
140340
|
};
|
|
140375
140341
|
var resolvedCtaBackground = ctaBackgroundColor ?? "#3081F9";
|
|
140376
140342
|
var resolvedCtaTextColor = ctaTextColor ?? "#ffffff";
|
|
140377
|
-
return (0, import_jsx_runtime20.jsx)(
|
|
140343
|
+
return (0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
140378
140344
|
accessibilityRole: "button",
|
|
140379
140345
|
onPress: () => onPress(null),
|
|
140380
140346
|
onPressIn: handlePressIn,
|
|
140381
140347
|
onPressOut: handlePressOut,
|
|
140382
140348
|
style: styles.pressable,
|
|
140383
|
-
children: (0, import_jsx_runtime20.jsxs)(
|
|
140349
|
+
children: (0, import_jsx_runtime20.jsxs)(import_react_native39.Animated.View, {
|
|
140384
140350
|
style: [styles.container, paddingStyle, {
|
|
140385
140351
|
transform: [{
|
|
140386
140352
|
scale
|
|
140387
140353
|
}]
|
|
140388
140354
|
}],
|
|
140389
|
-
children: [(0, import_jsx_runtime20.jsxs)(
|
|
140355
|
+
children: [(0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
140390
140356
|
style: styles.profileContainer,
|
|
140391
|
-
children: [(0, import_jsx_runtime20.jsxs)(
|
|
140357
|
+
children: [(0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
140392
140358
|
style: styles.brandArea,
|
|
140393
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
140359
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
140394
140360
|
accessibilityRole: "button",
|
|
140395
140361
|
onPress: () => onPress("202"),
|
|
140396
140362
|
onPressIn: handlePressIn,
|
|
140397
140363
|
onPressOut: handlePressOut,
|
|
140398
140364
|
style: styles.logoContainer,
|
|
140399
|
-
children: (0, import_jsx_runtime20.jsxs)(
|
|
140365
|
+
children: (0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
140400
140366
|
style: [styles.logoWrapper, {
|
|
140401
140367
|
backgroundColor: colors.brandLogoBg
|
|
140402
140368
|
}],
|
|
140403
|
-
children: [brandLogoUri ? (0, import_jsx_runtime20.jsx)(
|
|
140369
|
+
children: [brandLogoUri ? (0, import_jsx_runtime20.jsx)(import_react_native39.Image, {
|
|
140404
140370
|
source: {
|
|
140405
140371
|
uri: brandLogoUri
|
|
140406
140372
|
},
|
|
140407
140373
|
style: styles.logoImage,
|
|
140408
140374
|
resizeMode: "cover"
|
|
140409
|
-
}) : null, (0, import_jsx_runtime20.jsx)(
|
|
140375
|
+
}) : null, (0, import_jsx_runtime20.jsx)(import_react_native39.View, {
|
|
140410
140376
|
style: [styles.logoOverlay, {
|
|
140411
140377
|
borderColor: colors.brandLogoBorder
|
|
140412
140378
|
}]
|
|
140413
140379
|
})]
|
|
140414
140380
|
})
|
|
140415
|
-
}), (0, import_jsx_runtime20.jsxs)(
|
|
140381
|
+
}), (0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
140416
140382
|
style: styles.brandTextContainer,
|
|
140417
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
140383
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
140418
140384
|
accessibilityRole: "button",
|
|
140419
140385
|
onPress: () => onPress("103"),
|
|
140420
140386
|
onPressIn: handlePressIn,
|
|
140421
140387
|
onPressOut: handlePressOut,
|
|
140422
|
-
children: (0, import_jsx_runtime20.jsx)(
|
|
140388
|
+
children: (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
140423
140389
|
allowFontScaling: false,
|
|
140424
140390
|
numberOfLines: 1,
|
|
140425
140391
|
style: [styles.brandName, {
|
|
@@ -140427,7 +140393,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140427
140393
|
}],
|
|
140428
140394
|
children: brandName
|
|
140429
140395
|
})
|
|
140430
|
-
}), isAdBadgeEnabled ? (0, import_jsx_runtime20.jsx)(
|
|
140396
|
+
}), isAdBadgeEnabled ? (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
140431
140397
|
allowFontScaling: false,
|
|
140432
140398
|
numberOfLines: 1,
|
|
140433
140399
|
style: [styles.adBadge, {
|
|
@@ -140436,26 +140402,26 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140436
140402
|
children: "\uAD11\uACE0"
|
|
140437
140403
|
}) : null]
|
|
140438
140404
|
})]
|
|
140439
|
-
}), (0, import_jsx_runtime20.jsxs)(
|
|
140405
|
+
}), (0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
140440
140406
|
style: styles.textArea,
|
|
140441
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
140407
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
140442
140408
|
accessibilityRole: "button",
|
|
140443
140409
|
onPress: () => onPress("101"),
|
|
140444
140410
|
onPressIn: handlePressIn,
|
|
140445
140411
|
onPressOut: handlePressOut,
|
|
140446
|
-
children: (0, import_jsx_runtime20.jsx)(
|
|
140412
|
+
children: (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
140447
140413
|
allowFontScaling: false,
|
|
140448
140414
|
style: [styles.title, {
|
|
140449
140415
|
color: colors.title
|
|
140450
140416
|
}],
|
|
140451
140417
|
children: title
|
|
140452
140418
|
})
|
|
140453
|
-
}), (0, import_jsx_runtime20.jsx)(
|
|
140419
|
+
}), (0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
140454
140420
|
accessibilityRole: "button",
|
|
140455
140421
|
onPress: () => onPress("102"),
|
|
140456
140422
|
onPressIn: handlePressIn,
|
|
140457
140423
|
onPressOut: handlePressOut,
|
|
140458
|
-
children: (0, import_jsx_runtime20.jsx)(
|
|
140424
|
+
children: (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
140459
140425
|
allowFontScaling: false,
|
|
140460
140426
|
style: [styles.subtitle, {
|
|
140461
140427
|
color: colors.subtitle
|
|
@@ -140464,17 +140430,17 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140464
140430
|
})
|
|
140465
140431
|
})]
|
|
140466
140432
|
})]
|
|
140467
|
-
}), (0, import_jsx_runtime20.jsxs)(
|
|
140433
|
+
}), (0, import_jsx_runtime20.jsxs)(import_react_native39.View, {
|
|
140468
140434
|
style: styles.card,
|
|
140469
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
140435
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Pressable, {
|
|
140470
140436
|
accessibilityRole: "button",
|
|
140471
140437
|
onPress: () => onPress("201"),
|
|
140472
140438
|
onPressIn: handlePressIn,
|
|
140473
140439
|
onPressOut: handlePressOut,
|
|
140474
140440
|
style: styles.imageButton,
|
|
140475
|
-
children: (0, import_jsx_runtime20.jsx)(
|
|
140441
|
+
children: (0, import_jsx_runtime20.jsx)(import_react_native39.View, {
|
|
140476
140442
|
style: styles.imageContainer,
|
|
140477
|
-
children: mainImageUri ? (0, import_jsx_runtime20.jsx)(
|
|
140443
|
+
children: mainImageUri ? (0, import_jsx_runtime20.jsx)(import_react_native39.Image, {
|
|
140478
140444
|
source: {
|
|
140479
140445
|
uri: mainImageUri
|
|
140480
140446
|
},
|
|
@@ -140482,7 +140448,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140482
140448
|
resizeMode: "cover"
|
|
140483
140449
|
}) : null
|
|
140484
140450
|
})
|
|
140485
|
-
}), (0, import_jsx_runtime20.jsxs)(
|
|
140451
|
+
}), (0, import_jsx_runtime20.jsxs)(import_react_native39.Pressable, {
|
|
140486
140452
|
accessibilityRole: "button",
|
|
140487
140453
|
onPress: () => onPress("0"),
|
|
140488
140454
|
onPressIn: handlePressIn,
|
|
@@ -140490,7 +140456,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140490
140456
|
style: [styles.cta, {
|
|
140491
140457
|
backgroundColor: resolvedCtaBackground
|
|
140492
140458
|
}],
|
|
140493
|
-
children: [(0, import_jsx_runtime20.jsx)(
|
|
140459
|
+
children: [(0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
140494
140460
|
allowFontScaling: false,
|
|
140495
140461
|
style: [styles.ctaText, {
|
|
140496
140462
|
color: resolvedCtaTextColor
|
|
@@ -140505,12 +140471,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140505
140471
|
fill: resolvedCtaTextColor
|
|
140506
140472
|
})
|
|
140507
140473
|
})]
|
|
140508
|
-
}), (0, import_jsx_runtime20.jsx)(
|
|
140474
|
+
}), (0, import_jsx_runtime20.jsx)(import_react_native39.View, {
|
|
140509
140475
|
style: [styles.cardOverlay, {
|
|
140510
140476
|
borderColor: colors.imageOverlayBorder
|
|
140511
140477
|
}]
|
|
140512
140478
|
})]
|
|
140513
|
-
}), adClearanceText ? (0, import_jsx_runtime20.jsx)(
|
|
140479
|
+
}), adClearanceText ? (0, import_jsx_runtime20.jsx)(import_react_native39.Text, {
|
|
140514
140480
|
allowFontScaling: false,
|
|
140515
140481
|
style: [styles.adClearance, {
|
|
140516
140482
|
color: colors.adClearance
|
|
@@ -140520,7 +140486,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140520
140486
|
})
|
|
140521
140487
|
});
|
|
140522
140488
|
}
|
|
140523
|
-
var styles =
|
|
140489
|
+
var styles = import_react_native39.StyleSheet.create({
|
|
140524
140490
|
pressable: {
|
|
140525
140491
|
width: "100%"
|
|
140526
140492
|
},
|
|
@@ -140559,7 +140525,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140559
140525
|
borderRadius: 18
|
|
140560
140526
|
},
|
|
140561
140527
|
logoOverlay: {
|
|
140562
|
-
...
|
|
140528
|
+
...import_react_native39.StyleSheet.absoluteFillObject,
|
|
140563
140529
|
borderWidth: 1,
|
|
140564
140530
|
borderRadius: 18
|
|
140565
140531
|
},
|
|
@@ -140622,7 +140588,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140622
140588
|
lineHeight: 22.5
|
|
140623
140589
|
},
|
|
140624
140590
|
cardOverlay: {
|
|
140625
|
-
...
|
|
140591
|
+
...import_react_native39.StyleSheet.absoluteFillObject,
|
|
140626
140592
|
borderWidth: 2,
|
|
140627
140593
|
borderRadius: 12,
|
|
140628
140594
|
pointerEvents: "none"
|
|
@@ -140634,8 +140600,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140634
140600
|
}
|
|
140635
140601
|
});
|
|
140636
140602
|
var import_react_native_svg2 = _$$_REQUIRE(_dependencyMap[20], "@granite-js/native/react-native-svg");
|
|
140637
|
-
var
|
|
140638
|
-
var
|
|
140603
|
+
var import_react29 = _$$_REQUIRE(_dependencyMap[9], "react");
|
|
140604
|
+
var import_react_native40 = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
|
140639
140605
|
var import_jsx_runtime21 = _$$_REQUIRE(_dependencyMap[10], "react/jsx-runtime");
|
|
140640
140606
|
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";
|
|
140641
140607
|
function ListBannerAdView({
|
|
@@ -140648,13 +140614,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140648
140614
|
colors,
|
|
140649
140615
|
onPress
|
|
140650
140616
|
}) {
|
|
140651
|
-
var scale = (0,
|
|
140652
|
-
var clipIdRef = (0,
|
|
140617
|
+
var scale = (0, import_react29.useRef)(new import_react_native40.Animated.Value(1)).current;
|
|
140618
|
+
var clipIdRef = (0, import_react29.useRef)(`clip-${Math.random().toString(36).slice(2)}`);
|
|
140653
140619
|
var animateScale = toValue => {
|
|
140654
|
-
|
|
140620
|
+
import_react_native40.Animated.timing(scale, {
|
|
140655
140621
|
toValue,
|
|
140656
140622
|
duration: 100,
|
|
140657
|
-
easing:
|
|
140623
|
+
easing: import_react_native40.Easing.inOut(import_react_native40.Easing.ease),
|
|
140658
140624
|
useNativeDriver: true
|
|
140659
140625
|
}).start();
|
|
140660
140626
|
};
|
|
@@ -140664,21 +140630,21 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140664
140630
|
var handlePressOut = () => {
|
|
140665
140631
|
animateScale(1);
|
|
140666
140632
|
};
|
|
140667
|
-
return (0, import_jsx_runtime21.jsx)(
|
|
140633
|
+
return (0, import_jsx_runtime21.jsx)(import_react_native40.Pressable, {
|
|
140668
140634
|
accessibilityRole: "button",
|
|
140669
140635
|
onPress: () => onPress(null),
|
|
140670
140636
|
onPressIn: handlePressIn,
|
|
140671
140637
|
onPressOut: handlePressOut,
|
|
140672
140638
|
style: styles2.pressable,
|
|
140673
|
-
children: (0, import_jsx_runtime21.jsxs)(
|
|
140639
|
+
children: (0, import_jsx_runtime21.jsxs)(import_react_native40.Animated.View, {
|
|
140674
140640
|
style: [styles2.container, paddingStyle, {
|
|
140675
140641
|
transform: [{
|
|
140676
140642
|
scale
|
|
140677
140643
|
}]
|
|
140678
140644
|
}],
|
|
140679
|
-
children: [(0, import_jsx_runtime21.jsxs)(
|
|
140645
|
+
children: [(0, import_jsx_runtime21.jsxs)(import_react_native40.View, {
|
|
140680
140646
|
style: styles2.titleRow,
|
|
140681
|
-
children: [(0, import_jsx_runtime21.jsx)(
|
|
140647
|
+
children: [(0, import_jsx_runtime21.jsx)(import_react_native40.Pressable, {
|
|
140682
140648
|
accessibilityRole: "button",
|
|
140683
140649
|
onPress: () => onPress("202"),
|
|
140684
140650
|
onPressIn: handlePressIn,
|
|
@@ -140714,26 +140680,26 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140714
140680
|
clipPath: `url(#${clipIdRef.current})`
|
|
140715
140681
|
})]
|
|
140716
140682
|
})
|
|
140717
|
-
}), (0, import_jsx_runtime21.jsxs)(
|
|
140683
|
+
}), (0, import_jsx_runtime21.jsxs)(import_react_native40.View, {
|
|
140718
140684
|
style: styles2.textWrapper,
|
|
140719
|
-
children: [(0, import_jsx_runtime21.jsx)(
|
|
140685
|
+
children: [(0, import_jsx_runtime21.jsx)(import_react_native40.Pressable, {
|
|
140720
140686
|
accessibilityRole: "button",
|
|
140721
140687
|
onPress: () => onPress("101"),
|
|
140722
140688
|
onPressIn: handlePressIn,
|
|
140723
140689
|
onPressOut: handlePressOut,
|
|
140724
|
-
children: (0, import_jsx_runtime21.jsx)(
|
|
140690
|
+
children: (0, import_jsx_runtime21.jsx)(import_react_native40.Text, {
|
|
140725
140691
|
allowFontScaling: false,
|
|
140726
140692
|
style: [styles2.title, {
|
|
140727
140693
|
color: colors.title
|
|
140728
140694
|
}],
|
|
140729
140695
|
children: title
|
|
140730
140696
|
})
|
|
140731
|
-
}), (0, import_jsx_runtime21.jsx)(
|
|
140697
|
+
}), (0, import_jsx_runtime21.jsx)(import_react_native40.Pressable, {
|
|
140732
140698
|
accessibilityRole: "button",
|
|
140733
140699
|
onPress: () => onPress("102"),
|
|
140734
140700
|
onPressIn: handlePressIn,
|
|
140735
140701
|
onPressOut: handlePressOut,
|
|
140736
|
-
children: (0, import_jsx_runtime21.jsx)(
|
|
140702
|
+
children: (0, import_jsx_runtime21.jsx)(import_react_native40.Text, {
|
|
140737
140703
|
allowFontScaling: false,
|
|
140738
140704
|
style: [styles2.subtitle, {
|
|
140739
140705
|
color: colors.subtitle
|
|
@@ -140742,7 +140708,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140742
140708
|
})
|
|
140743
140709
|
})]
|
|
140744
140710
|
})]
|
|
140745
|
-
}), adClearanceText ? (0, import_jsx_runtime21.jsx)(
|
|
140711
|
+
}), adClearanceText ? (0, import_jsx_runtime21.jsx)(import_react_native40.Text, {
|
|
140746
140712
|
allowFontScaling: false,
|
|
140747
140713
|
style: [styles2.adClearance, {
|
|
140748
140714
|
color: colors.adClearance,
|
|
@@ -140754,7 +140720,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140754
140720
|
})
|
|
140755
140721
|
});
|
|
140756
140722
|
}
|
|
140757
|
-
var styles2 =
|
|
140723
|
+
var styles2 = import_react_native40.StyleSheet.create({
|
|
140758
140724
|
pressable: {
|
|
140759
140725
|
width: "100%"
|
|
140760
140726
|
},
|
|
@@ -140962,27 +140928,27 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140962
140928
|
onAdImpression = props.onAdImpression,
|
|
140963
140929
|
onAdFailedToRender = props.onAdFailedToRender,
|
|
140964
140930
|
onNoFill = props.onNoFill;
|
|
140965
|
-
var slotIdRef = (0,
|
|
140966
|
-
var
|
|
140967
|
-
|
|
140968
|
-
ad =
|
|
140969
|
-
setAd =
|
|
140970
|
-
var
|
|
140971
|
-
|
|
140972
|
-
isAdBadgeEnabled =
|
|
140973
|
-
setIsAdBadgeEnabled =
|
|
140974
|
-
var eventTrackerRef = (0,
|
|
140975
|
-
var eventPayloadRef = (0,
|
|
140976
|
-
var hasRenderedRef = (0,
|
|
140977
|
-
var hasLoggedImp1pxRef = (0,
|
|
140978
|
-
var hasLoggedImp100pRef = (0,
|
|
140979
|
-
var hasNotifiedViewableRef = (0,
|
|
140980
|
-
var viewableTimerRef = (0,
|
|
140981
|
-
var refetchIntervalMsRef = (0,
|
|
140982
|
-
var lastImp1pxAtRef = (0,
|
|
140983
|
-
var loadingRef = (0,
|
|
140984
|
-
var loadRef = (0,
|
|
140985
|
-
var callbacksRef = (0,
|
|
140931
|
+
var slotIdRef = (0, import_react30.useRef)(createSlotId());
|
|
140932
|
+
var _ref55 = (0, import_react30.useState)(null),
|
|
140933
|
+
_ref56 = _slicedToArray(_ref55, 2),
|
|
140934
|
+
ad = _ref56[0],
|
|
140935
|
+
setAd = _ref56[1];
|
|
140936
|
+
var _ref57 = (0, import_react30.useState)(true),
|
|
140937
|
+
_ref58 = _slicedToArray(_ref57, 2),
|
|
140938
|
+
isAdBadgeEnabled = _ref58[0],
|
|
140939
|
+
setIsAdBadgeEnabled = _ref58[1];
|
|
140940
|
+
var eventTrackerRef = (0, import_react30.useRef)(null);
|
|
140941
|
+
var eventPayloadRef = (0, import_react30.useRef)(null);
|
|
140942
|
+
var hasRenderedRef = (0, import_react30.useRef)(false);
|
|
140943
|
+
var hasLoggedImp1pxRef = (0, import_react30.useRef)(false);
|
|
140944
|
+
var hasLoggedImp100pRef = (0, import_react30.useRef)(false);
|
|
140945
|
+
var hasNotifiedViewableRef = (0, import_react30.useRef)(false);
|
|
140946
|
+
var viewableTimerRef = (0, import_react30.useRef)(null);
|
|
140947
|
+
var refetchIntervalMsRef = (0, import_react30.useRef)(null);
|
|
140948
|
+
var lastImp1pxAtRef = (0, import_react30.useRef)(null);
|
|
140949
|
+
var loadingRef = (0, import_react30.useRef)(false);
|
|
140950
|
+
var loadRef = (0, import_react30.useRef)(null);
|
|
140951
|
+
var callbacksRef = (0, import_react30.useRef)({
|
|
140986
140952
|
onAdRendered,
|
|
140987
140953
|
onAdViewable,
|
|
140988
140954
|
onAdClicked,
|
|
@@ -140990,8 +140956,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
140990
140956
|
onAdFailedToRender,
|
|
140991
140957
|
onNoFill
|
|
140992
140958
|
});
|
|
140993
|
-
var isMountedRef = (0,
|
|
140994
|
-
var colorScheme = (0,
|
|
140959
|
+
var isMountedRef = (0, import_react30.useRef)(false);
|
|
140960
|
+
var colorScheme = (0, import_react_native42.useColorScheme)();
|
|
140995
140961
|
var selectedTheme = theme ?? DEFAULT_INLINE_AD_THEME;
|
|
140996
140962
|
var resolvedTheme = selectedTheme === "auto" ? colorScheme === "dark" ? "dark" : "light" : selectedTheme;
|
|
140997
140963
|
var resolvedTone = tone ?? DEFAULT_INLINE_AD_TONE;
|
|
@@ -141007,7 +140973,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
141007
140973
|
onAdFailedToRender,
|
|
141008
140974
|
onNoFill
|
|
141009
140975
|
};
|
|
141010
|
-
(0,
|
|
140976
|
+
(0, import_react30.useEffect)(() => {
|
|
141011
140977
|
isMountedRef.current = true;
|
|
141012
140978
|
return () => {
|
|
141013
140979
|
isMountedRef.current = false;
|
|
@@ -141017,30 +140983,31 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
141017
140983
|
}
|
|
141018
140984
|
};
|
|
141019
140985
|
}, []);
|
|
141020
|
-
(0,
|
|
140986
|
+
(0, import_react30.useEffect)(() => {
|
|
140987
|
+
var normalizedAdGroupId = normalizeAdGroupId(adGroupId);
|
|
141021
140988
|
var loadAdRequest = () => {
|
|
141022
140989
|
if (loadingRef.current) {
|
|
141023
140990
|
return;
|
|
141024
140991
|
}
|
|
141025
|
-
if (
|
|
141026
|
-
var error = createError2(ERROR_CODES.INVALID_SPACE,
|
|
141027
|
-
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current,
|
|
140992
|
+
if (normalizedAdGroupId.length === 0) {
|
|
140993
|
+
var error = createError2(ERROR_CODES.INVALID_SPACE, INVALID_AD_GROUP_ID_ERROR_MESSAGE);
|
|
140994
|
+
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current, normalizedAdGroupId, error));
|
|
141028
140995
|
return;
|
|
141029
140996
|
}
|
|
141030
140997
|
loadingRef.current = true;
|
|
141031
|
-
loadAd(
|
|
140998
|
+
loadAd(normalizedAdGroupId).then(result => {
|
|
141032
140999
|
if (!isMountedRef.current) return;
|
|
141033
141000
|
if (result.type === "noFill") {
|
|
141034
|
-
callbacksRef.current.onNoFill?.(buildNoFillPayload(slotIdRef.current,
|
|
141001
|
+
callbacksRef.current.onNoFill?.(buildNoFillPayload(slotIdRef.current, normalizedAdGroupId));
|
|
141035
141002
|
return;
|
|
141036
141003
|
}
|
|
141037
141004
|
if (result.type === "error") {
|
|
141038
|
-
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current,
|
|
141005
|
+
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current, normalizedAdGroupId, result.error));
|
|
141039
141006
|
return;
|
|
141040
141007
|
}
|
|
141041
141008
|
if (!isValidCreative(result.ad)) {
|
|
141042
141009
|
var invalidError = createError2(ERROR_CODES.INTERNAL_ERROR, "Invalid creative payload");
|
|
141043
|
-
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current,
|
|
141010
|
+
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current, normalizedAdGroupId, invalidError));
|
|
141044
141011
|
return;
|
|
141045
141012
|
}
|
|
141046
141013
|
if (result.responseExt?.refetchSeconds !== void 0) {
|
|
@@ -141055,7 +141022,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
141055
141022
|
clearTimeout(viewableTimerRef.current);
|
|
141056
141023
|
viewableTimerRef.current = null;
|
|
141057
141024
|
}
|
|
141058
|
-
var payload = buildBannerEventPayload(slotIdRef.current,
|
|
141025
|
+
var payload = buildBannerEventPayload(slotIdRef.current, normalizedAdGroupId, result.ad);
|
|
141059
141026
|
eventPayloadRef.current = payload;
|
|
141060
141027
|
eventTrackerRef.current = new EventTracker(result.ad.eventTrackingUrls ?? [], result.ad.eventTypes ?? [], result.ad.eventPayload ?? "", result.requestId, result.ad.creative?.id);
|
|
141061
141028
|
setIsAdBadgeEnabled(result.responseExt?.isAdBadgeEnabled !== false);
|
|
@@ -141063,7 +141030,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
141063
141030
|
}).catch(error => {
|
|
141064
141031
|
if (!isMountedRef.current) return;
|
|
141065
141032
|
var adError = error instanceof Error ? createError2(ERROR_CODES.INTERNAL_ERROR, error.message) : createError2(ERROR_CODES.INTERNAL_ERROR, "Unknown error");
|
|
141066
|
-
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current,
|
|
141033
|
+
callbacksRef.current.onAdFailedToRender?.(buildBannerErrorPayload(slotIdRef.current, normalizedAdGroupId, adError));
|
|
141067
141034
|
}).finally(() => {
|
|
141068
141035
|
loadingRef.current = false;
|
|
141069
141036
|
});
|
|
@@ -141074,7 +141041,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
141074
141041
|
loadRef.current = null;
|
|
141075
141042
|
};
|
|
141076
141043
|
}, [adGroupId]);
|
|
141077
|
-
(0,
|
|
141044
|
+
(0, import_react_native41.useVisibilityChange)(documentVisibility => {
|
|
141078
141045
|
if (documentVisibility !== "visible") {
|
|
141079
141046
|
return;
|
|
141080
141047
|
}
|
|
@@ -141087,7 +141054,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
141087
141054
|
loadRef.current?.();
|
|
141088
141055
|
}
|
|
141089
141056
|
});
|
|
141090
|
-
(0,
|
|
141057
|
+
(0, import_react30.useEffect)(() => {
|
|
141091
141058
|
if (!ad || hasRenderedRef.current) {
|
|
141092
141059
|
return;
|
|
141093
141060
|
}
|
|
@@ -141172,23 +141139,23 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
141172
141139
|
callbacksRef.current.onAdClicked?.(basePayload);
|
|
141173
141140
|
}
|
|
141174
141141
|
};
|
|
141175
|
-
return (0, import_jsx_runtime22.jsx)(
|
|
141142
|
+
return (0, import_jsx_runtime22.jsx)(import_react_native41.ImpressionArea, {
|
|
141176
141143
|
style: styles3.impressionArea,
|
|
141177
141144
|
onImpressionStart: handleImpression1px,
|
|
141178
141145
|
areaThreshold: 0,
|
|
141179
141146
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
141180
|
-
children: (0, import_jsx_runtime22.jsx)(
|
|
141147
|
+
children: (0, import_jsx_runtime22.jsx)(import_react_native41.ImpressionArea, {
|
|
141181
141148
|
onImpressionStart: handleImpression100p,
|
|
141182
141149
|
areaThreshold: 1,
|
|
141183
141150
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
141184
|
-
children: (0, import_jsx_runtime22.jsx)(
|
|
141151
|
+
children: (0, import_jsx_runtime22.jsx)(import_react_native41.ImpressionArea, {
|
|
141185
141152
|
onImpressionStart: handleViewableStart,
|
|
141186
141153
|
onImpressionEnd: handleViewableEnd,
|
|
141187
141154
|
areaThreshold: 0.5,
|
|
141188
141155
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
141189
|
-
children: (0, import_jsx_runtime22.jsx)(
|
|
141156
|
+
children: (0, import_jsx_runtime22.jsx)(import_react_native42.View, {
|
|
141190
141157
|
style: [styles3.wrapper, resolvedVariant === "card" && styles3.cardWrapper],
|
|
141191
|
-
children: (0, import_jsx_runtime22.jsxs)(
|
|
141158
|
+
children: (0, import_jsx_runtime22.jsxs)(import_react_native42.View, {
|
|
141192
141159
|
style: [styles3.surface, {
|
|
141193
141160
|
backgroundColor
|
|
141194
141161
|
}, resolvedVariant === "card" && styles3.cardSurface],
|
|
@@ -141222,7 +141189,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
141222
141189
|
})
|
|
141223
141190
|
}, impressionKey);
|
|
141224
141191
|
}
|
|
141225
|
-
var styles3 =
|
|
141192
|
+
var styles3 = import_react_native42.StyleSheet.create({
|
|
141226
141193
|
impressionArea: {
|
|
141227
141194
|
width: "100%"
|
|
141228
141195
|
},
|
|
@@ -214025,7 +213992,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
214025
213992
|
}
|
|
214026
213993
|
\`;document.head.appendChild(e);})();
|
|
214027
213994
|
`,
|
|
214028
|
-
m = '"use strict";(()=>{var de=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},w=new de,O=()=>Math.random().toString(36).substring(2,15),B=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function d(e){return(...t)=>{let r=O(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(w.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(w.on(`${e}/reject/${r}`,i=>{o(),a(B(i))})),w.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function R(e){return t=>{let r=O(),n=[w.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),w.on(`${e}/onError/${r}`,o=>{t.onError(B(o))})];return w.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{w.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function g(e){return()=>w.getConstant(e)}var ue=function(){return{emit:function(t,r){for(var n=this.events[t]||[],o=0,s=n.length;o<s;o++)n[o](r)},events:{},on:function(t,r){var n=this,o,s;return((o=this.events)[s=t]||(o[s]=[])).push(r),function(){var a;n.events[t]=(a=n.events[t])===null||a===void 0?void 0:a.filter(function(i){return r!==i})}}}};typeof window<"u"&&(window.__GRANITE_NATIVE_EMITTER=ue());var Xe=d("closeView"),Ye=d("generateHapticFeedback"),Ze=d("share"),Qe=d("setSecureScreen"),et=d("setScreenAwakeMode"),tt=d("getNetworkStatus"),rt=d("setIosSwipeGestureEnabled"),nt=d("openURL"),ot=d("openPermissionDialog"),st=d("getPermission"),at=d("requestPermission"),it=g("setClipboardText"),ct=g("getClipboardText"),dt=g("fetchContacts"),ut=g("fetchAlbumPhotos"),pt=g("getCurrentLocation"),mt=g("openCamera"),lt=d("appLogin"),gt=d("eventLog"),ft=d("getTossShareLink"),vt=d("setDeviceOrientation"),wt=d("checkoutPayment"),ht=d("saveBase64Data"),Et=d("appsInTossSignTossCert"),bt=d("getGameCenterGameProfile"),At=d("openGameCenterLeaderboard"),_t=d("submitGameCenterLeaderBoardScore"),St=d("getUserKeyForGame"),Ct=d("grantPromotionReward"),It=d("grantPromotionRewardForGame"),Tt=d("getIsTossLoginIntegratedService"),yt=d("getServerTime"),Lt=d("requestReview"),Rt=g("getLocale"),Pt=g("getSchemeUri"),xt=g("getPlatformOS"),Dt=g("getOperationalEnvironment"),Nt=g("getTossAppVersion"),Mt=g("getDeviceId"),Ft=g("getGroupId"),kt=R("contactsViral"),Gt=R("startUpdateLocation"),Ot=R("onVisibilityChangedByTransparentServiceWeb");var S=class extends Error{constructor({methodName:e,message:t}){super(),this.name=`${e} permission error`,this.message=t}},V=class extends S{constructor(){super({methodName:"fetchAlbumPhotos",message:"\\uC0AC\\uC9C4\\uCCA9 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},H=class extends S{constructor(){super({methodName:"fetchContacts",message:"\\uC5F0\\uB77D\\uCC98 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},q=class extends S{constructor(){super({methodName:"openCamera",message:"\\uCE74\\uBA54\\uB77C \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var k=class extends S{constructor(){super({methodName:"getCurrentLocation",message:"\\uC704\\uCE58 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},U=k,W=class extends S{constructor(){super({methodName:"getClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC77D\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},z=class extends S{constructor(){super({methodName:"setClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC4F0\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var pe=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},h=new pe,te=()=>Math.random().toString(36).substring(2,15),re=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function c(e){return(...t)=>{let r=te(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(h.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(h.on(`${e}/reject/${r}`,i=>{o(),a(re(i))})),h.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function E(e){return t=>{let r=te(),n=[h.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),h.on(`${e}/onError/${r}`,o=>{t.onError(re(o))})];return h.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{h.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function p(e){return()=>h.getConstant(e)}var Kt={getItem:c("getStorageItem"),setItem:c("setStorageItem"),removeItem:c("removeStorageItem"),clearItems:c("clearItems")},me=/^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*))?(?:\\+[\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*)?)?)?$/i,$=e=>["*","x","X"].includes(e),j=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},le=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],ge=(e,t)=>{if($(e)||$(t))return 0;let[r,n]=le(j(e),j(t));return r>n?1:r<n?-1:0},K=e=>{if(typeof e!="string")throw new TypeError("Invalid argument: expected a string");let t=e.match(me);if(!t)throw new Error(`Invalid semver: \'${e}\'`);let[,r,n,o,s,a]=t;return[r,n,o,s,a]},J=(e,t)=>{let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let o=e[n]??"0",s=t[n]??"0",a=ge(o,s);if(a!==0)return a}return 0},fe=(e,t)=>{let r=K(e),n=K(t),o=r.pop(),s=n.pop(),a=J(r,n);return a!==0?a:o&&s?J(o.split("."),s.split(".")):o?-1:s?1:0};function G(e){if(p("getOperationalEnvironment")()==="sandbox")return!0;let r=p("getTossAppVersion")(),o=p("getPlatformOS")()==="ios"?e.ios:e.android;return o===void 0?!1:o==="always"?!0:o==="never"?!1:fe(r,o)>=0}function X(e){return c("processProductGrant")(e)}var Jt={createOneTimePurchaseOrder:e=>{let t=G({android:"5.219.0",ios:"5.219.0"}),r=()=>{};if(!t)return r;let n=G({android:"5.231.1",ios:"5.230.0"}),{options:o,onEvent:s,onError:a}=e,i=o.sku??o.productId;return n?E("requestOneTimePurchase")({options:{sku:i},onEvent:async l=>{if(l.type==="purchased"){let m=await o.processProductGrant({orderId:l.data.orderId});await X({orderId:l.data.orderId,isProductGranted:m}).catch(a)}else s(l)},onError:l=>{a(l)}}):(c("iapCreateOneTimePurchaseOrder")({productId:i}).then(m=>{Promise.resolve(o.processProductGrant({orderId:m.orderId})).then(()=>{s({type:"success",data:m})}).catch(f=>{a(f)})}).catch(m=>{a(m)}),r)},createSubscriptionPurchaseOrder:e=>{let t=G({android:"5.248.0",ios:"5.249.0"}),r=()=>{};if(!t)return r;let{options:n,onEvent:o,onError:s}=e,{sku:a,offerId:i,processProductGrant:u}=n;return E("requestSubscriptionPurchase")({options:{sku:a,offerId:i??null},onEvent:async m=>{if(m.type==="purchased"){let f=await u({orderId:m.data.orderId,subscriptionId:m.data.subscriptionId});await X({orderId:m.data.orderId,isProductGranted:f}).catch(s)}else o(m)},onError:m=>{s(m)}})},getProductItemList:c("iapGetProductItemList"),getPendingOrders:c("getPendingOrders"),getCompletedOrRefundedOrders:c("getCompletedOrRefundedOrders"),completeProductGrant:c("completeProductGrant"),getSubscriptionInfo:c("getSubscriptionInfo")},Xt=p("getSafeAreaInsets");var Yt=p("getSafeAreaInsets");var Zt={loadAppsInTossAdMob:Object.assign(E("loadAppsInTossAdMob"),{isSupported:p("loadAppsInTossAdMob_isSupported")}),showAppsInTossAdMob:Object.assign(E("showAppsInTossAdMob"),{isSupported:p("showAppsInTossAdMob_isSupported")}),isAppsInTossAdMobLoaded:Object.assign(c("isAppsInTossAdMobLoaded"),{isSupported:p("isAppsInTossAdMobLoaded_isSupported")})};var Qt={getDeploymentId:p("getDeploymentId")},er=p("deploymentId"),tr=p("brandDisplayName"),rr=p("brandIcon"),nr=p("brandPrimaryColor");var or={addAccessoryButton:c("addAccessoryButton"),removeAccessoryButton:c("removeAccessoryButton")},ve=c("requestPermission"),we=c("getPermission"),he=c("openPermissionDialog");function C({permission:e,handler:t,error:r}){let n=async(...o)=>{if(await ve(e)==="denied")throw new r;return t(...o)};return n.getPermission=()=>we(e),n.openPermissionDialog=()=>he(e),n}var ar=C({handler:e=>c("fetchAlbumPhotos")(e),permission:{name:"photos",access:"read"},error:V}),cr=C({handler:e=>c("fetchContacts")(e),permission:{name:"contacts",access:"read"},error:H}),ur=C({handler:e=>c("getCurrentLocation")(e),permission:{name:"geolocation",access:"access"},error:k}),mr=C({handler:e=>c("openCamera")(e),permission:{name:"camera",access:"access"},error:q}),gr=C({handler:e=>c("setClipboardText")(e),permission:{name:"clipboard",access:"write"},error:z}),vr=C({handler:()=>c("getClipboardText")(),permission:{name:"clipboard",access:"read"},error:W}),Ee=c("getPermission"),be=c("openPermissionDialog"),ne=e=>E("updateLocationEvent")({...e,onError:t=>{let r=new U;return t instanceof Error&&t.name===r.name?e.onError(r):e.onError(t)}});ne.getPermission=()=>Ee({name:"geolocation",access:"access"});ne.openPermissionDialog=()=>be({name:"geolocation",access:"access"});var hr=Object.assign(E("loadFullScreenAd"),{isSupported:p("loadFullScreenAd_isSupported")}),Er=Object.assign(E("showFullScreenAd"),{isSupported:p("showFullScreenAd_isSupported")}),Ae=c("openURL");function _e(e){let t=Se(e);return Ae(t)}function Se(e){return["http://","https://"].some(r=>e.startsWith(r))?Ce(e):e}function Ce(e){return`supertoss://web?url=${encodeURIComponent(e)}&external=true`}var Y="https://static.toss.im/ads/sdk/toss-ads-space-kit-1.3.0.js",Z=15e3,P=null;function _(){if(!(typeof window>"u"))return window.TossAdsSpaceKit}function Ie(){if(typeof window>"u"||typeof document>"u")return Promise.reject(new Error("Ads SDK can only be loaded in a browser environment."));let e=_();if(e)return Promise.resolve(e);if(P)return P;let t=new Promise((r,n)=>{let o=document.createElement("script"),s=()=>{o.removeEventListener("load",a),o.removeEventListener("error",i),window.clearTimeout(u),P=null},a=()=>{let l=_();if(l){s(),r(l);return}s(),n(new Error("Ads SDK script loaded but window.TossAdsSpaceKit was not exposed."))},i=()=>{s(),n(new Error(`Failed to load Ads SDK script from ${Y}.`))},u=window.setTimeout(()=>{s(),n(new Error(`Loading Ads SDK timed out after ${Z}ms.`))},Z);o.addEventListener("load",a),o.addEventListener("error",i),o.async=!0,o.src=Y,document.head.appendChild(o)});return P=t,t}var A=Object.assign(E("fetchTossAd"),{isSupported:p("fetchTossAd_isSupported")}),Te=c("tossAdEventLog"),ye=new Set(["1","2"]);function Le(e){return new Promise((t,r)=>{if(!A.isSupported()){r(new Error("fetchTossAd is not supported in this environment."));return}return A({options:e,onEvent:t,onError:r})})}function Q(e){let t=Array.isArray(e.ads)?e.ads.filter(r=>ye.has(String(r.styleId))):[];return{requestId:e.requestId??"",status:e.status??"OK",ads:t,ext:e.ext}}function Re(e){return Pe(e)?e.resultType!=="SUCCESS"?e:e.success?{...e,success:Q(e.success)}:{resultType:"FAIL",error:{reason:"fetchTossAd returned SUCCESS without payload"}}:xe(e)?{resultType:"SUCCESS",success:Q(e)}:{resultType:"FAIL",error:{reason:"Invalid response from fetchTossAd"}}}function Pe(e){return!!(e&&typeof e=="object"&&"resultType"in e)}function xe(e){return!!(e&&typeof e=="object"&&"ads"in e)}function De(){return async(e,t)=>{try{let r=await Le({adGroupId:t.spaceUnitId,sdkId:"108",availableStyleIds:["1","2"]});return Re(r)}catch(r){return{resultType:"FAIL",error:{reason:r instanceof Error?r.message:"Unknown fetchTossAd error"}}}}}var L=null;function Ne(e){let{callbacks:t}=e,r=()=>t?.onInitialized?.(),n=a=>{let i=a instanceof Error?a:new Error(String(a));t?.onInitializationFailed?.(i)};if(_()?.isInitialized()){r();return}if(L!=null){L.then(r).catch(n);return}let s=Ie().then(a=>{if(a.isInitialized())return;let u={environment:"live",customAdFetcher:De(),opener:_e};a.init(u)});L=s,s.then(r).catch(n).finally(()=>{L===s&&(L=null)})}function Me(e,t,r={}){let{callbacks:n}=r,o=s=>{let a=s instanceof Error?s:new Error(String(s));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:a.message}})};try{let s=e,a=_();if(!a)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!a.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let i=typeof t=="string"?document.querySelector(t):t;if(!i)throw new Error(`[toss-ad] Failed to find target element: ${t}`);let u={spaceId:s,autoLoad:!0,theme:r.theme,padding:r.padding,callbacks:oe(e,r.callbacks)};a.banner.createSlot(i,u)}catch(s){o(s)}}var Fe="16px 20px",ke="20px",Ge="auto",Oe="blackAndWhite",Be="expanded",v="toss-ads-attach",ee="toss-ads-attach-style";function Ve(e){let t=e.ownerDocument;if(!t||t.getElementById(ee))return;let r=t.createElement("style");r.id=ee,r.textContent=`\n .${v} { background: #ffffff; }\n .${v}.toss-ads-tone-grey { background: #f2f4f7; }\n @media (prefers-color-scheme: dark) {\n .${v} { background: #17171c; }\n .${v}.toss-ads-tone-grey { background: #101013; }\n }\n .${v}.toss-ads-theme-light { background: #ffffff; }\n .${v}.toss-ads-theme-light.toss-ads-tone-grey { background: #f2f4f7; }\n .${v}.toss-ads-theme-dark { background: #17171c; }\n .${v}.toss-ads-theme-dark.toss-ads-tone-grey { background: #101013; }\n `;let n=t.head??t.body??t.documentElement;n&&n.appendChild(r)}function He(e,t,r={}){let{callbacks:n,theme:o=Ge,tone:s=Oe,variant:a=Be}=r,i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.boxSizing="border-box",i.style.display="flex",i.style.flexDirection="column",i.style.justifyContent="center",i.style.overflow="hidden",a==="card"&&(i.style.padding="0 10px");let u=document.createElement("div");u.classList.add(v),s==="grey"&&u.classList.add("toss-ads-tone-grey"),o==="light"?u.classList.add("toss-ads-theme-light"):o==="dark"&&u.classList.add("toss-ads-theme-dark"),a==="card"&&(u.style.borderRadius="16px",u.style.overflow="hidden"),i.appendChild(u);let l=!1,m=null,f=b=>{let y=b instanceof Error?b:new Error(String(b));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:y.message}})},ae=oe(e,n);try{let b=e,y=_();if(!y)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!y.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let F=typeof t=="string"?document.querySelector(t):t;if(!F)throw new Error(`[toss-ad] Failed to find target element: ${t}`);Ve(F),F.appendChild(i),l=!0;let ie={spaceId:b,autoLoad:!0,theme:o==="auto"?void 0:o,renderPadding:ce=>ce==="1"?Fe:ke,callbacks:ae};m=y.banner.createSlot(u,ie)}catch(b){l&&i.parentNode&&i.parentNode.removeChild(i),f(b)}return{destroy(){m?.destroy(),l&&i.parentNode&&i.parentNode.removeChild(i)}}}function qe(e){let t=_();t?.banner&&t.banner.destroy(e)}function Ue(){let e=_();e?.banner&&e.banner.destroyAll()}function oe(e,t){if(!t)return;let r=n=>{let o={...n??{}};return o.adGroupId=o.adGroupId??o.spaceId??e,delete o.spaceId,o};return{onAdRendered:n=>t.onAdRendered?.(r(n)),onAdViewable:n=>t.onAdViewable?.(r(n)),onAdClicked:n=>t.onAdClicked?.(r(n)),onAdImpression:n=>{Te({log_name:"display_ads_all::impression__1px_banner",log_type:"event",params:{event_type:"impression",schema_id:1812034,request_id:n?.adMetadata?.requestId??""}}),t.onAdImpression?.(r(n))},onAdFailedToRender:n=>t.onAdFailedToRender?.({...r(n),error:n?.error??{code:0,message:"UNKNOWN"}}),onNoFill:n=>t.onNoFill?.(r(n))}}var br={initialize:Object.assign(Ne,{isSupported:A.isSupported}),attach:Object.assign(Me,{isSupported:A.isSupported}),attachBanner:Object.assign(He,{isSupported:A.isSupported}),destroy:Object.assign(qe,{isSupported:A.isSupported}),destroyAll:Object.assign(Ue,{isSupported:A.isSupported})},Ar=Object.assign(c("getServerTime"),{isSupported:p("getServerTime_isSupported")}),_r=Object.assign(c("requestReview"),{isSupported:p("requestReview_isSupported")});var x=class{_log=c("debugLog");log(t,r){try{this._log({log_name:`apps_in_toss_webview_${t}`,log_type:"debug",params:{...r,...this.getCommonParams()}})}catch{}}getCommonParams(){return{...this.getLocationInfo(),...this.getNavigatorInfo(),...this.getScreenInfo(),appName:window.__appsInToss.appName,deploymentId:window.__appsInToss.deploymentId,sessionId:window.__appsInToss.sessionId,isGame:window.__appsInToss.webViewType==="game",timestampMs:Date.now()}}getLocationInfo(){return{url:window.location.href,urlOrigin:window.location.origin,urlHost:window.location.hostname,urlPath:window.location.pathname,urlSearch:window.location.search}}getNavigatorInfo(){return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,hardwareConcurrency:navigator.hardwareConcurrency,deviceMemory:navigator.deviceMemory?navigator.deviceMemory*1024*1024:void 0,maxTouchPoints:navigator.maxTouchPoints}}getScreenInfo(){return{screenWidth:screen.width,screenHeight:screen.height,availableScreenWidth:screen.availWidth,availableScreenHeight:screen.availHeight,devicePixelRatio:window.devicePixelRatio,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}};var D=class{callbacks={};on(t,r){return typeof this.callbacks[t]>"u"&&(this.callbacks[t]=[]),this.callbacks[t].push(r),()=>{this.callbacks[t]=this.callbacks[t]?.filter(n=>n!==r)??[]}}emit(t,r){this.callbacks[t]?.forEach(n=>n(r))}};window.__appsInToss={appName:p("getAppName")(),deploymentId:p("getDeploymentId")(),webViewType:p("getWebViewType")(),sessionId:Math.random().toString(36).substring(2),eventEmitter:new D,debugLogger:new x};var I=/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/;function N(e){window.fetch=new Proxy(window.fetch,{apply:e})}(()=>{if(window.__appsInToss.webViewType!=="game"||typeof caches>"u")return;let e="@apps-in-toss/caches/",t=`${e}${window.__appsInToss.deploymentId}`;window.addEventListener("load",async()=>{let r=await caches.keys();for(let n of r)n.startsWith(e)&&n!==t&&await caches.delete(n)}),N(async(r,n,o)=>{let s=new Request(o[0],o[1]);if(!I.test(s.url))return await r.call(n,s);let a=await caches.open(t),i=await a.match(s);if(i){let l=i.headers.get("ETag"),m=i.headers.get("Last-Modified");l&&s.headers.set("If-None-Match",l),m&&s.headers.set("If-Modified-Since",m);let f=await r.call(n,s);return f.status===304?(i.__revalidateResponse=f,i):(a.put(s,f.clone()),f)}let u=await r.call(n,s);return a.put(s,u.clone()),u})})();N(async(e,t,r)=>{let n=new Request(r[0],r[1]),o=Date.now();window.__appsInToss.eventEmitter.emit("fetchRequest",{request:n});try{let s=await e.call(t,n);return window.__appsInToss.eventEmitter.emit("fetchResponse",{request:n,response:s,requestAt:o}),s}catch(s){throw window.__appsInToss.eventEmitter.emit("fetchError",{request:n,requestAt:o,error:s}),s}});HTMLCanvasElement.prototype.getContext=new Proxy(HTMLCanvasElement.prototype.getContext,{apply:(e,t,r)=>{let n=e.apply(t,r);return(n instanceof WebGL2RenderingContext||n instanceof WebGLRenderingContext)&&window.__appsInToss.eventEmitter.emit("webglGetContext",{canvas:t,context:n}),n}});var se=window.__appsInToss.debugLogger;se.log("load_start",{});window.addEventListener("load",()=>{let e=performance.timeOrigin,t=performance.getEntriesByType?.("navigation")[0]??null,r=typeof e<"u"&&t!==null,n=r?{navigationStartAtMs:e+t.startTime,navigationRedirectStartAtMs:e+t.redirectStart,navigationRedirectEndAtMs:e+t.redirectEnd,navigationRedirectCount:t.redirectCount,navigationServiceWorkerStartAtMs:e+t.workerStart,navigationFetchStartAtMs:e+t.fetchStart,navigationDomainLookupStartAtMs:e+t.domainLookupStart,navigationDomainLookupEndAtMs:e+t.domainLookupEnd,navigationConnectStartAtMs:e+t.connectStart,navigationSecureConnectStartAtMs:e+t.secureConnectionStart,navigationConnectEndAtMs:e+t.connectEnd,navigationRequestStartAtMs:e+t.requestStart,navigationResponseStartAtMs:e+t.responseStart,navigationResponseEndAtMs:e+t.responseEnd,navigationDomInteractiveAtMs:e+t.domInteractive,navigationDomContentLoadedEventStartAtMs:e+t.domContentLoadedEventStart,navigationDomContentLoadedEventEndAtMs:e+t.domContentLoadedEventEnd,navigationDomCompleteAtMs:e+t.domComplete}:{};se.log("load_complete",{isNavigationDebugSupported:r,...n})});function T(e,t){return parseFloat(e.toFixed(t))}(()=>{if(typeof performance.memory>"u"||typeof performance.memory.usedJSHeapSize>"u"||typeof performance.memory.totalJSHeapSize>"u"||typeof performance.memory.jsHeapSizeLimit>"u")return;function e(t){window.__appsInToss.debugLogger.log(t,{usedJSHeapSize:T(performance.memory.usedJSHeapSize/1024,2),totalJSHeapSize:T(performance.memory.totalJSHeapSize/1024,2),jsHeapSizeLimit:T(performance.memory.jsHeapSizeLimit/1024,2)})}e("memory_usage_first_0s"),setTimeout(()=>e("memory_usage_first_1s"),1e3),setTimeout(()=>e("memory_usage_first_10s"),1e4),setTimeout(()=>e("memory_usage_first_30s"),3e4),setTimeout(()=>e("memory_usage_first_60s"),6e4),setInterval(()=>e("memory_usage_every_180s"),18e4)})();(()=>{let e=window.__appsInToss.debugLogger,t=performance.timeOrigin;if(typeof t>"u"||typeof PerformanceObserver>"u")return;new PerformanceObserver(o=>{o.getEntries().forEach(a=>{a.name==="first-paint"?e.log("first_paint",{fpStartAtMs:t+a.startTime}):a.name==="first-contentful-paint"&&e.log("first_contentful_paint",{fcpStartAtMs:t+a.startTime})})}).observe({type:"paint"}),new PerformanceObserver(o=>{o.getEntries().forEach(a=>{e.log("largest_contentful_paint",{lcpStartAtMs:t+a.startTime,lcpRenderSize:a.size})})}).observe({type:"largest-contentful-paint"})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.eventEmitter.on("webglGetContext",({canvas:t,context:r})=>{if(t.getAttribute("id")!=="unity-canvas")return;e();let n=r.getExtension("WEBGL_debug_renderer_info"),o=r.getParameter(r.MAX_VIEWPORT_DIMS),s={webGLRenderer:r.getParameter(r.RENDERER),webGLVendor:r.getParameter(r.VENDOR),webGLVersion:r.getParameter(r.VERSION),webGLShadingLanguageVersion:r.getParameter(r.SHADING_LANGUAGE_VERSION),webGLMaxTextureSize:r.getParameter(r.MAX_TEXTURE_SIZE),webGLMaxViewportWidth:o[0],webGLMaxViewportHeight:o[1],webGLMaxRenderbufferSize:r.getParameter(r.MAX_RENDERBUFFER_SIZE)},a=n?{webGLUnmaskedVendor:r.getParameter(n.UNMASKED_VENDOR_WEBGL),webGLUnmaskedRenderer:r.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{};window.__appsInToss.debugLogger.log("unity_webgl_info",{...s,...a})})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.debugLogger,t=window.__appsInToss.eventEmitter;t.on("fetchRequest",({request:n})=>{I.test(n.url)&&e.log("game_resource_download_start",{gameResourceRequestURL:n.url})});function r({request:n,requestAt:o,error:s}){e.log("game_resource_download_error",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceError:s instanceof Error?s.message:"Unknown Error"})}t.on("fetchResponse",async({request:n,requestAt:o,response:s})=>{if(!I.test(n.url))return;let a=await s.clone().blob().then(u=>T(u.size/1024,2)).catch(u=>(r({request:n,requestAt:o,error:u}),null));if(a===null)return;let i=Date.now();e.log("game_resource_download_end",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceResponseAtMs:i,gameResourceResponseSize:a,gameResourceResponseStatus:s.__revalidateResponse?.status??s.status,gameResourceDownloadDurationMs:i-o})}),t.on("fetchError",async({request:n,requestAt:o,error:s})=>{I.test(n.url)&&r({request:n,requestAt:o,error:s})})})();var M=[];function We(){let e=0;function t(r){let n=performance.now();if(r<n-1e3){M.push(e);return}e+=1,window.requestAnimationFrame(()=>t(r))}window.requestAnimationFrame(()=>t(performance.now()))}function ze(){if(M.length===0)return;let e=M;M=[];let t=$e(e).toSorted(),r={};for(let o=0;o<=100;o+=10){let s=t[Math.floor((t.length-1)*(o/100))];s&&(r[`fpsP${o}`]=s)}let n=t.reduce((o,s)=>o+s,0);r.fpsAverage=n/t.length,window.__appsInToss.debugLogger.log("fps_every_300s",r)}function $e(e){let t=new Set(e);return Array.from(t.values())}setInterval(()=>We(),1e3);setInterval(()=>ze(),3e5);})();\n';
|
|
213995
|
+
m = '"use strict";(()=>{var fe=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},E=new fe,q=()=>Math.random().toString(36).substring(2,15),z=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function c(e){return(...t)=>{let r=q(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(E.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(E.on(`${e}/reject/${r}`,i=>{o(),a(z(i))})),E.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function D(e){return t=>{let r=q(),n=[E.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),E.on(`${e}/onError/${r}`,o=>{t.onError(z(o))})];return E.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{E.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function v(e){return()=>E.getConstant(e)}var ve=function(){return{emit:function(t,r){for(var n=this.events[t]||[],o=0,s=n.length;o<s;o++)n[o](r)},events:{},on:function(t,r){var n=this,o,s;return((o=this.events)[s=t]||(o[s]=[])).push(r),function(){var a;n.events[t]=(a=n.events[t])===null||a===void 0?void 0:a.filter(function(i){return r!==i})}}}};typeof window<"u"&&(window.__GRANITE_NATIVE_EMITTER=ve());var at=c("closeView"),it=c("generateHapticFeedback"),dt=c("share"),ct=c("setSecureScreen"),ut=c("setScreenAwakeMode"),pt=c("getNetworkStatus"),mt=c("setIosSwipeGestureEnabled"),lt=c("openURL"),gt=c("openPermissionDialog"),ft=c("getPermission"),vt=c("requestPermission"),ht=v("setClipboardText"),wt=v("getClipboardText"),Et=v("fetchContacts"),bt=v("fetchAlbumPhotos"),At=v("getCurrentLocation"),_t=v("openCamera"),Ct=c("appLogin"),St=c("eventLog"),It=c("getTossShareLink"),Tt=c("setDeviceOrientation"),yt=c("checkoutPayment"),Rt=c("saveBase64Data"),Lt=c("appsInTossSignTossCert"),Pt=c("getGameCenterGameProfile"),xt=c("openGameCenterLeaderboard"),Dt=c("submitGameCenterLeaderBoardScore"),Nt=c("getUserKeyForGame"),Mt=c("grantPromotionReward"),Ft=c("grantPromotionRewardForGame"),Gt=c("getIsTossLoginIntegratedService"),Bt=c("getServerTime"),kt=c("requestReview"),Ot=v("getLocale"),Vt=v("getSchemeUri"),Ht=v("getPlatformOS"),Ut=v("getOperationalEnvironment"),Wt=v("getTossAppVersion"),qt=v("getDeviceId"),zt=v("getGroupId"),$t=D("contactsViral"),jt=D("startUpdateLocation"),Kt=D("onVisibilityChangedByTransparentServiceWeb");var S=class extends Error{constructor({methodName:e,message:t}){super(),this.name=`${e} permission error`,this.message=t}},$=class extends S{constructor(){super({methodName:"fetchAlbumPhotos",message:"\\uC0AC\\uC9C4\\uCCA9 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},j=class extends S{constructor(){super({methodName:"fetchContacts",message:"\\uC5F0\\uB77D\\uCC98 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},K=class extends S{constructor(){super({methodName:"openCamera",message:"\\uCE74\\uBA54\\uB77C \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var V=class extends S{constructor(){super({methodName:"getCurrentLocation",message:"\\uC704\\uCE58 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},J=V,X=class extends S{constructor(){super({methodName:"getClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC77D\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},Y=class extends S{constructor(){super({methodName:"setClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC4F0\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var he=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},b=new he,ie=()=>Math.random().toString(36).substring(2,15),de=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function d(e){return(...t)=>{let r=ie(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(b.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(b.on(`${e}/reject/${r}`,i=>{o(),a(de(i))})),b.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function A(e){return t=>{let r=ie(),n=[b.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),b.on(`${e}/onError/${r}`,o=>{t.onError(de(o))})];return b.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{b.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function p(e){return()=>b.getConstant(e)}var or={getItem:d("getStorageItem"),setItem:d("setStorageItem"),removeItem:d("removeStorageItem"),clearItems:d("clearItems")},we=/^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*))?(?:\\+[\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*)?)?)?$/i,Z=e=>["*","x","X"].includes(e),Q=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},Ee=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],be=(e,t)=>{if(Z(e)||Z(t))return 0;let[r,n]=Ee(Q(e),Q(t));return r>n?1:r<n?-1:0},ee=e=>{if(typeof e!="string")throw new TypeError("Invalid argument: expected a string");let t=e.match(we);if(!t)throw new Error(`Invalid semver: \'${e}\'`);let[,r,n,o,s,a]=t;return[r,n,o,s,a]},te=(e,t)=>{let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let o=e[n]??"0",s=t[n]??"0",a=be(o,s);if(a!==0)return a}return 0},Ae=(e,t)=>{let r=ee(e),n=ee(t),o=r.pop(),s=n.pop(),a=te(r,n);return a!==0?a:o&&s?te(o.split("."),s.split(".")):o?-1:s?1:0};function H(e){if(p("getOperationalEnvironment")()==="sandbox")return!0;let r=p("getTossAppVersion")(),o=p("getPlatformOS")()==="ios"?e.ios:e.android;return o===void 0?!1:o==="always"?!0:o==="never"?!1:Ae(r,o)>=0}function re(e){return d("processProductGrant")(e)}var sr={createOneTimePurchaseOrder:e=>{let t=H({android:"5.219.0",ios:"5.219.0"}),r=()=>{};if(!t)return r;let n=H({android:"5.231.1",ios:"5.230.0"}),{options:o,onEvent:s,onError:a}=e,i=o.sku??o.productId;return n?A("requestOneTimePurchase")({options:{sku:i},onEvent:async l=>{if(l.type==="purchased"){let u=await o.processProductGrant({orderId:l.data.orderId});await re({orderId:l.data.orderId,isProductGranted:u}).catch(a)}else s(l)},onError:l=>{a(l)}}):(d("iapCreateOneTimePurchaseOrder")({productId:i}).then(u=>{Promise.resolve(o.processProductGrant({orderId:u.orderId})).then(()=>{s({type:"success",data:u})}).catch(f=>{a(f)})}).catch(u=>{a(u)}),r)},createSubscriptionPurchaseOrder:e=>{let t=H({android:"5.248.0",ios:"5.249.0"}),r=()=>{};if(!t)return r;let{options:n,onEvent:o,onError:s}=e,{sku:a,offerId:i,processProductGrant:m}=n;return A("requestSubscriptionPurchase")({options:{sku:a,offerId:i??null},onEvent:async u=>{if(u.type==="purchased"){let f=await m({orderId:u.data.orderId,subscriptionId:u.data.subscriptionId});await re({orderId:u.data.orderId,isProductGranted:f}).catch(s)}else o(u)},onError:u=>{s(u)}})},getProductItemList:d("iapGetProductItemList"),getPendingOrders:d("getPendingOrders"),getCompletedOrRefundedOrders:d("getCompletedOrRefundedOrders"),completeProductGrant:d("completeProductGrant"),getSubscriptionInfo:d("getSubscriptionInfo")},ar=p("getSafeAreaInsets");var ir=p("getSafeAreaInsets");var dr={loadAppsInTossAdMob:Object.assign(A("loadAppsInTossAdMob"),{isSupported:p("loadAppsInTossAdMob_isSupported")}),showAppsInTossAdMob:Object.assign(A("showAppsInTossAdMob"),{isSupported:p("showAppsInTossAdMob_isSupported")}),isAppsInTossAdMobLoaded:Object.assign(d("isAppsInTossAdMobLoaded"),{isSupported:p("isAppsInTossAdMobLoaded_isSupported")})};var cr={getDeploymentId:p("getDeploymentId")},ur=p("deploymentId"),pr=p("brandDisplayName"),mr=p("brandIcon"),lr=p("brandPrimaryColor");var gr={addAccessoryButton:d("addAccessoryButton"),removeAccessoryButton:d("removeAccessoryButton")},_e=d("requestPermission"),Ce=d("getPermission"),Se=d("openPermissionDialog");function I({permission:e,handler:t,error:r}){let n=async(...o)=>{if(await _e(e)==="denied")throw new r;return t(...o)};return n.getPermission=()=>Ce(e),n.openPermissionDialog=()=>Se(e),n}var vr=I({handler:e=>d("fetchAlbumPhotos")(e),permission:{name:"photos",access:"read"},error:$}),wr=I({handler:e=>d("fetchContacts")(e),permission:{name:"contacts",access:"read"},error:j}),br=I({handler:e=>d("getCurrentLocation")(e),permission:{name:"geolocation",access:"access"},error:V}),_r=I({handler:e=>d("openCamera")(e),permission:{name:"camera",access:"access"},error:K}),Sr=I({handler:e=>d("setClipboardText")(e),permission:{name:"clipboard",access:"write"},error:Y}),Tr=I({handler:()=>d("getClipboardText")(),permission:{name:"clipboard",access:"read"},error:X}),Ie=d("getPermission"),Te=d("openPermissionDialog"),ce=e=>A("updateLocationEvent")({...e,onError:t=>{let r=new J;return t instanceof Error&&t.name===r.name?e.onError(r):e.onError(t)}});ce.getPermission=()=>Ie({name:"geolocation",access:"access"});ce.openPermissionDialog=()=>Te({name:"geolocation",access:"access"});var Rr=Object.assign(A("loadFullScreenAd"),{isSupported:p("loadFullScreenAd_isSupported")}),Lr=Object.assign(A("showFullScreenAd"),{isSupported:p("showFullScreenAd_isSupported")}),P=new WeakMap;function ye(e,t){let r=P.get(e);if(r)return r;let n=t(),o=!1,s={destroy(){o||(o=!0,P.get(e)===s&&P.delete(e),n.destroy())}};return P.set(e,s),s}function Re(){P=new WeakMap}var Le=d("openURL");function Pe(e){let t=xe(e);return Le(t)}function xe(e){return["http://","https://"].some(r=>e.startsWith(r))?De(e):e}function De(e){return`supertoss://web?url=${encodeURIComponent(e)}&external=true`}var ne="https://static.toss.im/ads/sdk/toss-ads-space-kit-1.3.0.js",oe=15e3,N=null;function C(){if(!(typeof window>"u"))return window.TossAdsSpaceKit}function Ne(){if(typeof window>"u"||typeof document>"u")return Promise.reject(new Error("Ads SDK can only be loaded in a browser environment."));let e=C();if(e)return Promise.resolve(e);if(N)return N;let t=new Promise((r,n)=>{let o=document.createElement("script"),s=()=>{o.removeEventListener("load",a),o.removeEventListener("error",i),window.clearTimeout(m),N=null},a=()=>{let l=C();if(l){s(),r(l);return}s(),n(new Error("Ads SDK script loaded but window.TossAdsSpaceKit was not exposed."))},i=()=>{s(),n(new Error(`Failed to load Ads SDK script from ${ne}.`))},m=window.setTimeout(()=>{s(),n(new Error(`Loading Ads SDK timed out after ${oe}ms.`))},oe);o.addEventListener("load",a),o.addEventListener("error",i),o.async=!0,o.src=ne,document.head.appendChild(o)});return N=t,t}var _=Object.assign(A("fetchTossAd"),{isSupported:p("fetchTossAd_isSupported")}),Me=d("tossAdEventLog"),Fe=new Set(["1","2"]),ue="\\uC798\\uBABB\\uB41C \\uC694\\uCCAD\\uC774\\uC5D0\\uC694. \\uD544\\uC694\\uD55C \\uAC12\\uC774 \\uBE44\\uC5B4 \\uC788\\uC5B4\\uC694.";function M(e){return e.trim()}function U(){return new Error(ue)}function Ge(){return{resultType:"FAIL",error:{reason:ue}}}function Be(e){return new Promise((t,r)=>{if(!_.isSupported()){r(new Error("fetchTossAd is not supported in this environment."));return}let n=M(e.adGroupId);if(n.length===0){r(U());return}return _({options:{...e,adGroupId:n},onEvent:t,onError:r})})}function se(e){let t=Array.isArray(e.ads)?e.ads.filter(r=>Fe.has(String(r.styleId))):[];return{requestId:e.requestId??"",status:e.status??"OK",ads:t,ext:e.ext}}function ke(e){return Oe(e)?e.resultType!=="SUCCESS"?e:e.success?{...e,success:se(e.success)}:{resultType:"FAIL",error:{reason:"fetchTossAd returned SUCCESS without payload"}}:Ve(e)?{resultType:"SUCCESS",success:se(e)}:{resultType:"FAIL",error:{reason:"Invalid response from fetchTossAd"}}}function Oe(e){return!!(e&&typeof e=="object"&&"resultType"in e)}function Ve(e){return!!(e&&typeof e=="object"&&"ads"in e)}function He(){return async(e,t)=>{let r=M(t.spaceUnitId);if(r.length===0)return Ge();try{let n=await Be({adGroupId:r,sdkId:"108",availableStyleIds:["1","2"]});return ke(n)}catch(n){return{resultType:"FAIL",error:{reason:n instanceof Error?n.message:"Unknown fetchTossAd error"}}}}}var L=null;function Ue(e){let{callbacks:t}=e,r=()=>t?.onInitialized?.(),n=a=>{let i=a instanceof Error?a:new Error(String(a));t?.onInitializationFailed?.(i)};if(C()?.isInitialized()){r();return}if(L!=null){L.then(r).catch(n);return}let s=Ne().then(a=>{if(a.isInitialized())return;let m={environment:"live",customAdFetcher:He(),opener:Pe};a.init(m)});L=s,s.then(r).catch(n).finally(()=>{L===s&&(L=null)})}function We(e,t,r={}){let{callbacks:n}=r,o=M(e),s=a=>{let i=a instanceof Error?a:new Error(String(a));n?.onAdFailedToRender?.({slotId:"",adGroupId:o,adMetadata:{},error:{code:0,message:i.message}})};try{let a=o;if(a.length===0)throw U();let i=C();if(!i)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!i.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let m=typeof t=="string"?document.querySelector(t):t;if(!m)throw new Error(`[toss-ad] Failed to find target element: ${t}`);let l={spaceId:a,autoLoad:!0,theme:r.theme,padding:r.padding,callbacks:me(o,r.callbacks)};i.banner.createSlot(m,l)}catch(a){s(a)}}var qe="16px 20px",ze="20px",$e="auto",je="blackAndWhite",Ke="expanded",h="toss-ads-attach",ae="toss-ads-attach-style",pe="data-toss-ads-attach-banner-wrapper";function Je(e){let t=e.ownerDocument;if(!t||t.getElementById(ae))return;let r=t.createElement("style");r.id=ae,r.textContent=`\n .${h} { background: #ffffff; }\n .${h}.toss-ads-tone-grey { background: #f2f4f7; }\n @media (prefers-color-scheme: dark) {\n .${h} { background: #17171c; }\n .${h}.toss-ads-tone-grey { background: #101013; }\n }\n .${h}.toss-ads-theme-light { background: #ffffff; }\n .${h}.toss-ads-theme-light.toss-ads-tone-grey { background: #f2f4f7; }\n .${h}.toss-ads-theme-dark { background: #17171c; }\n .${h}.toss-ads-theme-dark.toss-ads-tone-grey { background: #101013; }\n `;let n=t.head??t.body??t.documentElement;n&&n.appendChild(r)}function Xe(e){Array.from(e.children).forEach(t=>{t instanceof HTMLElement&&t.getAttribute(pe)==="true"&&e.removeChild(t)})}function Ye(e,t,r={}){let{callbacks:n,theme:o=$e,tone:s=je,variant:a=Ke}=r,i=M(e),m=u=>{let f=u instanceof Error?u:new Error(String(u));n?.onAdFailedToRender?.({slotId:"",adGroupId:i,adMetadata:{},error:{code:0,message:f.message}})},l=me(i,n);try{let u=i;if(u.length===0)throw U();let f=C();if(!f)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!f.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let R=typeof t=="string"?document.querySelector(t):t;if(!R)throw new Error(`[toss-ad] Failed to find target element: ${t}`);return ye(R,()=>{let g=document.createElement("div");g.style.width="100%",g.style.height="100%",g.style.boxSizing="border-box",g.style.display="flex",g.style.flexDirection="column",g.style.justifyContent="center",g.style.overflow="hidden",g.setAttribute(pe,"true"),a==="card"&&(g.style.padding="0 10px");let w=document.createElement("div");w.classList.add(h),s==="grey"&&w.classList.add("toss-ads-tone-grey"),o==="light"?w.classList.add("toss-ads-theme-light"):o==="dark"&&w.classList.add("toss-ads-theme-dark"),a==="card"&&(w.style.borderRadius="16px",w.style.overflow="hidden"),g.appendChild(w);let x=!1,W=null;try{Je(R),Xe(R),R.appendChild(g),x=!0;let O={spaceId:u,autoLoad:!0,theme:o==="auto"?void 0:o,renderPadding:ge=>ge==="1"?qe:ze,callbacks:l};W=f.banner.createSlot(w,O)}catch(O){throw x&&g.parentNode&&g.parentNode.removeChild(g),O}return{destroy(){W?.destroy(),x&&g.parentNode&&g.parentNode.removeChild(g),x=!1}}})}catch(u){return m(u),{destroy(){}}}}function Ze(e){let t=C();t?.banner&&t.banner.destroy(e)}function Qe(){let e=C();e?.banner&&(e.banner.destroyAll(),Re())}function me(e,t){if(!t)return;let r=n=>{let o={...n??{}};return o.adGroupId=o.adGroupId??o.spaceId??e,delete o.spaceId,o};return{onAdRendered:n=>t.onAdRendered?.(r(n)),onAdViewable:n=>t.onAdViewable?.(r(n)),onAdClicked:n=>t.onAdClicked?.(r(n)),onAdImpression:n=>{Me({log_name:"display_ads_all::impression__1px_banner",log_type:"event",params:{event_type:"impression",schema_id:1812034,request_id:n?.adMetadata?.requestId??""}}),t.onAdImpression?.(r(n))},onAdFailedToRender:n=>t.onAdFailedToRender?.({...r(n),error:n?.error??{code:0,message:"UNKNOWN"}}),onNoFill:n=>t.onNoFill?.(r(n))}}var Pr={initialize:Object.assign(Ue,{isSupported:_.isSupported}),attach:Object.assign(We,{isSupported:_.isSupported}),attachBanner:Object.assign(Ye,{isSupported:_.isSupported}),destroy:Object.assign(Ze,{isSupported:_.isSupported}),destroyAll:Object.assign(Qe,{isSupported:_.isSupported})},xr=Object.assign(d("getServerTime"),{isSupported:p("getServerTime_isSupported")}),Dr=Object.assign(d("requestReview"),{isSupported:p("requestReview_isSupported")});var F=class{_log=d("debugLog");log(t,r){try{this._log({log_name:`apps_in_toss_webview_${t}`,log_type:"debug",params:{...r,...this.getCommonParams()}})}catch{}}getCommonParams(){return{...this.getLocationInfo(),...this.getNavigatorInfo(),...this.getScreenInfo(),appName:window.__appsInToss.appName,deploymentId:window.__appsInToss.deploymentId,sessionId:window.__appsInToss.sessionId,isGame:window.__appsInToss.webViewType==="game",timestampMs:Date.now()}}getLocationInfo(){return{url:window.location.href,urlOrigin:window.location.origin,urlHost:window.location.hostname,urlPath:window.location.pathname,urlSearch:window.location.search}}getNavigatorInfo(){return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,hardwareConcurrency:navigator.hardwareConcurrency,deviceMemory:navigator.deviceMemory?navigator.deviceMemory*1024*1024:void 0,maxTouchPoints:navigator.maxTouchPoints}}getScreenInfo(){return{screenWidth:screen.width,screenHeight:screen.height,availableScreenWidth:screen.availWidth,availableScreenHeight:screen.availHeight,devicePixelRatio:window.devicePixelRatio,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}};var G=class{callbacks={};on(t,r){return typeof this.callbacks[t]>"u"&&(this.callbacks[t]=[]),this.callbacks[t].push(r),()=>{this.callbacks[t]=this.callbacks[t]?.filter(n=>n!==r)??[]}}emit(t,r){this.callbacks[t]?.forEach(n=>n(r))}};window.__appsInToss={appName:p("getAppName")(),deploymentId:p("getDeploymentId")(),webViewType:p("getWebViewType")(),sessionId:Math.random().toString(36).substring(2),eventEmitter:new G,debugLogger:new F};var T=/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/;function B(e){window.fetch=new Proxy(window.fetch,{apply:e})}(()=>{if(window.__appsInToss.webViewType!=="game"||typeof caches>"u")return;let e="@apps-in-toss/caches/",t=`${e}${window.__appsInToss.deploymentId}`;window.addEventListener("load",async()=>{let r=await caches.keys();for(let n of r)n.startsWith(e)&&n!==t&&await caches.delete(n)}),B(async(r,n,o)=>{let s=new Request(o[0],o[1]);if(!T.test(s.url))return await r.call(n,s);let a=await caches.open(t),i=await a.match(s);if(i){let l=i.headers.get("ETag"),u=i.headers.get("Last-Modified");l&&s.headers.set("If-None-Match",l),u&&s.headers.set("If-Modified-Since",u);let f=await r.call(n,s);return f.status===304?(i.__revalidateResponse=f,i):(a.put(s,f.clone()),f)}let m=await r.call(n,s);return a.put(s,m.clone()),m})})();B(async(e,t,r)=>{let n=new Request(r[0],r[1]),o=Date.now();window.__appsInToss.eventEmitter.emit("fetchRequest",{request:n});try{let s=await e.call(t,n);return window.__appsInToss.eventEmitter.emit("fetchResponse",{request:n,response:s,requestAt:o}),s}catch(s){throw window.__appsInToss.eventEmitter.emit("fetchError",{request:n,requestAt:o,error:s}),s}});HTMLCanvasElement.prototype.getContext=new Proxy(HTMLCanvasElement.prototype.getContext,{apply:(e,t,r)=>{let n=e.apply(t,r);return(n instanceof WebGL2RenderingContext||n instanceof WebGLRenderingContext)&&window.__appsInToss.eventEmitter.emit("webglGetContext",{canvas:t,context:n}),n}});var le=window.__appsInToss.debugLogger;le.log("load_start",{});window.addEventListener("load",()=>{let e=performance.timeOrigin,t=performance.getEntriesByType?.("navigation")[0]??null,r=typeof e<"u"&&t!==null,n=r?{navigationStartAtMs:e+t.startTime,navigationRedirectStartAtMs:e+t.redirectStart,navigationRedirectEndAtMs:e+t.redirectEnd,navigationRedirectCount:t.redirectCount,navigationServiceWorkerStartAtMs:e+t.workerStart,navigationFetchStartAtMs:e+t.fetchStart,navigationDomainLookupStartAtMs:e+t.domainLookupStart,navigationDomainLookupEndAtMs:e+t.domainLookupEnd,navigationConnectStartAtMs:e+t.connectStart,navigationSecureConnectStartAtMs:e+t.secureConnectionStart,navigationConnectEndAtMs:e+t.connectEnd,navigationRequestStartAtMs:e+t.requestStart,navigationResponseStartAtMs:e+t.responseStart,navigationResponseEndAtMs:e+t.responseEnd,navigationDomInteractiveAtMs:e+t.domInteractive,navigationDomContentLoadedEventStartAtMs:e+t.domContentLoadedEventStart,navigationDomContentLoadedEventEndAtMs:e+t.domContentLoadedEventEnd,navigationDomCompleteAtMs:e+t.domComplete}:{};le.log("load_complete",{isNavigationDebugSupported:r,...n})});function y(e,t){return parseFloat(e.toFixed(t))}(()=>{if(typeof performance.memory>"u"||typeof performance.memory.usedJSHeapSize>"u"||typeof performance.memory.totalJSHeapSize>"u"||typeof performance.memory.jsHeapSizeLimit>"u")return;function e(t){window.__appsInToss.debugLogger.log(t,{usedJSHeapSize:y(performance.memory.usedJSHeapSize/1024,2),totalJSHeapSize:y(performance.memory.totalJSHeapSize/1024,2),jsHeapSizeLimit:y(performance.memory.jsHeapSizeLimit/1024,2)})}e("memory_usage_first_0s"),setTimeout(()=>e("memory_usage_first_1s"),1e3),setTimeout(()=>e("memory_usage_first_10s"),1e4),setTimeout(()=>e("memory_usage_first_30s"),3e4),setTimeout(()=>e("memory_usage_first_60s"),6e4),setInterval(()=>e("memory_usage_every_180s"),18e4)})();(()=>{let e=window.__appsInToss.debugLogger,t=performance.timeOrigin;if(typeof t>"u"||typeof PerformanceObserver>"u")return;new PerformanceObserver(o=>{o.getEntries().forEach(a=>{a.name==="first-paint"?e.log("first_paint",{fpStartAtMs:t+a.startTime}):a.name==="first-contentful-paint"&&e.log("first_contentful_paint",{fcpStartAtMs:t+a.startTime})})}).observe({type:"paint"}),new PerformanceObserver(o=>{o.getEntries().forEach(a=>{e.log("largest_contentful_paint",{lcpStartAtMs:t+a.startTime,lcpRenderSize:a.size})})}).observe({type:"largest-contentful-paint"})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.eventEmitter.on("webglGetContext",({canvas:t,context:r})=>{if(t.getAttribute("id")!=="unity-canvas")return;e();let n=r.getExtension("WEBGL_debug_renderer_info"),o=r.getParameter(r.MAX_VIEWPORT_DIMS),s={webGLRenderer:r.getParameter(r.RENDERER),webGLVendor:r.getParameter(r.VENDOR),webGLVersion:r.getParameter(r.VERSION),webGLShadingLanguageVersion:r.getParameter(r.SHADING_LANGUAGE_VERSION),webGLMaxTextureSize:r.getParameter(r.MAX_TEXTURE_SIZE),webGLMaxViewportWidth:o[0],webGLMaxViewportHeight:o[1],webGLMaxRenderbufferSize:r.getParameter(r.MAX_RENDERBUFFER_SIZE)},a=n?{webGLUnmaskedVendor:r.getParameter(n.UNMASKED_VENDOR_WEBGL),webGLUnmaskedRenderer:r.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{};window.__appsInToss.debugLogger.log("unity_webgl_info",{...s,...a})})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.debugLogger,t=window.__appsInToss.eventEmitter;t.on("fetchRequest",({request:n})=>{T.test(n.url)&&e.log("game_resource_download_start",{gameResourceRequestURL:n.url})});function r({request:n,requestAt:o,error:s}){e.log("game_resource_download_error",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceError:s instanceof Error?s.message:"Unknown Error"})}t.on("fetchResponse",async({request:n,requestAt:o,response:s})=>{if(!T.test(n.url))return;let a=await s.clone().blob().then(m=>y(m.size/1024,2)).catch(m=>(r({request:n,requestAt:o,error:m}),null));if(a===null)return;let i=Date.now();e.log("game_resource_download_end",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceResponseAtMs:i,gameResourceResponseSize:a,gameResourceResponseStatus:s.__revalidateResponse?.status??s.status,gameResourceDownloadDurationMs:i-o})}),t.on("fetchError",async({request:n,requestAt:o,error:s})=>{T.test(n.url)&&r({request:n,requestAt:o,error:s})})})();var k=[];function et(){let e=0;function t(r){let n=performance.now();if(r<n-1e3){k.push(e);return}e+=1,window.requestAnimationFrame(()=>t(r))}window.requestAnimationFrame(()=>t(performance.now()))}function tt(){if(k.length===0)return;let e=k;k=[];let t=rt(e).toSorted(),r={};for(let o=0;o<=100;o+=10){let s=t[Math.floor((t.length-1)*(o/100))];s&&(r[`fpsP${o}`]=s)}let n=t.reduce((o,s)=>o+s,0);r.fpsAverage=n/t.length,window.__appsInToss.debugLogger.log("fps_every_300s",r)}function rt(e){let t=new Set(e);return Array.from(t.values())}setInterval(()=>et(),1e3);setInterval(()=>tt(),3e5);})();\n';
|
|
214029
213996
|
0 && (module.exports = {
|
|
214030
213997
|
afterDocumentLoad,
|
|
214031
213998
|
beforeDocumentLoad
|