@paypay/mini-app-js-sdk 1.37.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jsbridge-core/lib/reconstructParams.d.ts +4 -1
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +1190 -1039
- package/dist/model/bridge/checkPaymentMethod.d.ts +1 -1
- package/dist/model/bridge/closeApp.d.ts +1 -1
- package/dist/model/bridge/copyToClipboard.d.ts +1 -1
- package/dist/model/bridge/getSessionData.d.ts +1 -1
- package/dist/model/bridge/getStorageData.d.ts +1 -1
- package/dist/model/bridge/getUserLocation.d.ts +1 -1
- package/dist/model/bridge/openApp.d.ts +1 -1
- package/dist/model/bridge/openMiniApp.d.ts +1 -1
- package/dist/model/bridge/openWebview.d.ts +1 -1
- package/dist/model/bridge/request.d.ts +1 -1
- package/dist/model/bridge/requestInternal.d.ts +1 -1
- package/dist/model/bridge/scanCode.d.ts +1 -1
- package/dist/model/bridge/setSessionData.d.ts +1 -1
- package/dist/model/bridge/setStorageData.d.ts +1 -1
- package/dist/model/bridge/setTitle.d.ts +1 -1
- package/dist/model/bridge/share.d.ts +1 -1
- package/dist/model/bridge/showAlert.d.ts +1 -1
- package/dist/model/bridge/showErrorSheet.d.ts +1 -1
- package/dist/model/bridge/takePhoto.d.ts +1 -1
- package/dist/model/makePayment.d.ts +7 -9
- package/dist/package/action-sheet/index.d.ts +51 -27
- package/dist/package/banner-header/index.vue.d.ts +29 -14
- package/dist/package/button/LoadingIndicator.vue.d.ts +1 -1
- package/dist/package/button/index.d.ts +42 -26
- package/dist/package/charge-amount-list/index.vue.d.ts +38 -19
- package/dist/package/charge-amount-more-list/index.vue.d.ts +7 -5
- package/dist/package/date-button/index.vue.d.ts +7 -5
- package/dist/package/desktop-header/index.d.ts +12 -7
- package/dist/package/divider/index.d.ts +10 -7
- package/dist/package/header/index.d.ts +42 -19
- package/dist/package/input/index.d.ts +124 -53
- package/dist/package/lottie/index.d.ts +35 -16
- package/dist/package/overlay/index.d.ts +20 -13
- package/dist/package/payment-method/Bank.vue.d.ts +11 -7
- package/dist/package/payment-method/CreditCard.vue.d.ts +11 -7
- package/dist/package/payment-method/PayLaterCC.vue.d.ts +6 -5
- package/dist/package/payment-method/SbidBank.vue.d.ts +6 -5
- package/dist/package/payment-method/Wallet.vue.d.ts +6 -5
- package/dist/package/payment-method/index.d.ts +7 -5
- package/dist/package/payment-method-list/index.vue.d.ts +17 -9
- package/dist/package/payment-type/Bank.vue.d.ts +16 -9
- package/dist/package/payment-type/CreditCard.vue.d.ts +11 -7
- package/dist/package/payment-type/PayLaterCC.vue.d.ts +11 -7
- package/dist/package/payment-type/Sbid.vue.d.ts +11 -7
- package/dist/package/payment-type/Wallet.vue.d.ts +11 -7
- package/dist/package/payment-type/index.d.ts +12 -7
- package/dist/package/select-list/Components.d.ts +50 -25
- package/dist/package/select-list/index.d.ts +49 -22
- package/dist/package/skeleton-loader/SkeletonLoader.vue.d.ts +7 -5
- package/dist/package/switch/index.d.ts +11 -10
- package/dist/package/wallet-breakdown/WalletBreakdown.vue.d.ts +6 -5
- package/dist/types.d.ts +35 -3
- package/dist/utils/api.d.ts +56 -9
- package/dist/utils/fetch.d.ts +13 -1
- package/dist/utils/helper.d.ts +1 -0
- package/dist/views/email-registration/App.vue.d.ts +13 -11
- package/dist/views/email-registration/parts/AuthMailNotFoundSheet.vue.d.ts +11 -8
- package/dist/views/email-registration/parts/RegisterEmail.vue.d.ts +17 -11
- package/dist/views/email-registration/parts/SentEmailAuthDoneSheet.vue.d.ts +6 -5
- package/dist/views/email-registration/parts/SentEmailSheet.vue.d.ts +10 -7
- package/dist/views/error-sheet/Index.vue.d.ts +33 -17
- package/dist/views/get-bank-info/GetBankInfoWrapper.vue.d.ts +12 -8
- package/dist/views/get-bank-info/components/GetBankInfoPopup.vue.d.ts +17 -9
- package/dist/views/get-bank-info/components/PayoutMethodList.vue.d.ts +12 -7
- package/dist/views/get-bank-info/components/PayoutMethodView.vue.d.ts +6 -5
- package/dist/views/get-user-address/App.vue.d.ts +27 -13
- package/dist/views/get-user-address/Sheet/AddSheet/Contents.vue.d.ts +44 -19
- package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +12 -7
- package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +34 -16
- package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +15 -8
- package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +36 -19
- package/dist/views/get-user-address/Sheet/App.vue.d.ts +22 -14
- package/dist/views/get-user-address/Sheet/DisplaySheet/Address.vue.d.ts +22 -11
- package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +12 -7
- package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +17 -9
- package/dist/views/get-user-address/Sheet/SelectedAddress/NoRegisteredAddressMessage.vue.d.ts +6 -5
- package/dist/views/get-user-address/Sheet/SelectedAddress/SelectedAddress.vue.d.ts +12 -7
- package/dist/views/get-user-address/Sheet/SelectedAddress/components/AddressInfo.vue.d.ts +12 -7
- package/dist/views/get-user-address/Sheet/SelectedAddress/components/Footer.vue.d.ts +12 -7
- package/dist/views/input-address/App.vue.d.ts +14 -9
- package/dist/views/input-address/hook/app.d.ts +2 -2
- package/dist/views/make-payment/App.vue.d.ts +21 -13
- package/dist/views/make-payment/Main.vue.d.ts +31 -21
- package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +7 -5
- package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +10 -6
- package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +7 -5
- package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +6 -5
- package/dist/views/make-payment/Sheets/CashBackDetails/FloatingButton.vue.d.ts +12 -7
- package/dist/views/make-payment/Sheets/CashBackDetails/hooks.d.ts +1 -1
- package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +11 -8
- package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +17 -9
- package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +74 -33
- package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +22 -12
- package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +79 -59
- package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +22 -11
- package/dist/views/make-payment/Sheets/CloseConfirmation.vue.d.ts +1 -1
- package/dist/views/make-payment/Sheets/Consult.vue.d.ts +7 -5
- package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +12 -7
- package/dist/views/make-payment/Sheets/PayMethod.vue.d.ts +37 -17
- package/dist/views/make-payment/Sheets/Payment.vue.d.ts +76 -33
- package/dist/views/make-payment/Sheets/PaymentCompletion/CashBackDetailRow.vue.d.ts +12 -7
- package/dist/views/make-payment/Sheets/PaymentCompletion/index.vue.d.ts +41 -20
- package/dist/views/make-payment/hooks/app-hooks.d.ts +23 -23
- package/dist/views/make-payment/store/handle-error.d.ts +2 -2
- package/dist/views/make-payment/store/util-for-handle-error.d.ts +2 -2
- package/dist/views/open-app/App.vue.d.ts +10 -8
- package/dist/views/open-map/App.vue.d.ts +11 -9
- package/dist/views/register-user-info/RegisterUserInfoCancelConfirmationSheet.vue.d.ts +1 -1
- package/dist/views/register-user-info/RegisterUserInfoCategoryView.vue.d.ts +6 -5
- package/dist/views/register-user-info/RegisterUserInfoDataPointGroup.vue.d.ts +6 -5
- package/dist/views/register-user-info/RegisterUserInfoErrorSheet.vue.d.ts +1 -1
- package/dist/views/register-user-info/RegisterUserInfoFooterView.vue.d.ts +1 -1
- package/dist/views/register-user-info/RegisterUserInfoKycInfoSheet.vue.d.ts +1 -1
- package/dist/views/register-user-info/RegisterUserInfoMailInfoSheet.vue.d.ts +1 -1
- package/dist/views/register-user-info/RegisterUserInfoProgressView.vue.d.ts +1 -1
- package/dist/views/register-user-info/RegisterUserInfoRootView.vue.d.ts +6 -5
- package/dist/views/register-user-info/RegisterUserInfoUneditableDataView.vue.d.ts +6 -5
- package/dist/views/register-user-info/input/RegisterUserInfoEmailInput.vue.d.ts +6 -5
- package/dist/views/register-user-info/input/RegisterUserInfoSelectionButtonInput.vue.d.ts +6 -5
- package/dist/views/register-user-info/input/RegisterUserInfoSimpleInput.vue.d.ts +6 -5
- package/dist/views/show-alert/App.vue.d.ts +18 -12
- package/dist/views/show-update-warning/App.vue.d.ts +7 -7
- package/dist/views/smart-button/App.vue.d.ts +39 -23
- package/dist/views/take-photo/App.vue.d.ts +10 -8
- package/dist/views/three-d-secure-sheet/ThreeDSecureSheet.vue.d.ts +10 -7
- package/dist/views/topup/App.vue.d.ts +13 -11
- package/dist/views/topup/BannerInfo.vue.d.ts +11 -6
- package/dist/views/topup/CashbackInfo.vue.d.ts +25 -12
- package/dist/views/topup/TopupCompletion.vue.d.ts +9 -6
- package/package.json +4 -6
- package/dist/views/register-user-info/RegisterUserInfoFormView.vue.d.ts +0 -11
|
@@ -65,8 +65,8 @@ function normalizeNativeResponseData(data2) {
|
|
|
65
65
|
}
|
|
66
66
|
class JsBridge {
|
|
67
67
|
constructor(global2) {
|
|
68
|
-
this.version = "1.
|
|
69
|
-
this.revision = "
|
|
68
|
+
this.version = "1.40.0";
|
|
69
|
+
this.revision = "413a0f6";
|
|
70
70
|
this.messageHandlers = new Map();
|
|
71
71
|
this.responseCallbacks = new Map();
|
|
72
72
|
this.global = global2;
|
|
@@ -1308,13 +1308,6 @@ var status;
|
|
|
1308
1308
|
status2["BUSY"] = "\u5229\u7528\u4E0D\u53EF";
|
|
1309
1309
|
status2["SUSPENDED"] = "\u5229\u7528\u4E0D\u53EF";
|
|
1310
1310
|
})(status || (status = {}));
|
|
1311
|
-
const getPaymentMethods = (params) => {
|
|
1312
|
-
return ppFetch({
|
|
1313
|
-
method: "GET",
|
|
1314
|
-
url: "web-api/app/v2/payment/methods",
|
|
1315
|
-
params
|
|
1316
|
-
});
|
|
1317
|
-
};
|
|
1318
1311
|
const getPaymentMethods2 = (params) => {
|
|
1319
1312
|
return ppFetch2({
|
|
1320
1313
|
method: "GET",
|
|
@@ -1323,35 +1316,31 @@ const getPaymentMethods2 = (params) => {
|
|
|
1323
1316
|
});
|
|
1324
1317
|
};
|
|
1325
1318
|
const makePayment$2 = async (queryParams, body2, isAuthorization) => {
|
|
1326
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1327
1320
|
const url = isAuthorization ? "web-api/app/v1/payment/preauthorize" : "web-api/app/v1/payment";
|
|
1328
|
-
const res = await
|
|
1321
|
+
const res = await ppFetch2({
|
|
1329
1322
|
method: "POST",
|
|
1330
1323
|
url,
|
|
1331
1324
|
params: queryParams,
|
|
1332
1325
|
data: body2
|
|
1333
1326
|
});
|
|
1334
|
-
if (
|
|
1335
|
-
return
|
|
1336
|
-
isSuccess: false
|
|
1337
|
-
});
|
|
1327
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
1328
|
+
return __spreadValues({}, res);
|
|
1338
1329
|
}
|
|
1339
|
-
const isSuccess = ((_b = (_a = res.
|
|
1330
|
+
const isSuccess = ((_c = (_b = (_a = res == null ? void 0 : res.body) == null ? void 0 : _a.unsigned) == null ? void 0 : _b.resultInfo) == null ? void 0 : _c.code) === "SUCCESS" && ["COMPLETED", "AUTHORIZED"].includes((_f = (_e = (_d = res == null ? void 0 : res.body) == null ? void 0 : _d.unsigned) == null ? void 0 : _e.data) == null ? void 0 : _f.status);
|
|
1340
1331
|
if (isSuccess) {
|
|
1341
1332
|
savePayment({
|
|
1342
|
-
price: (
|
|
1333
|
+
price: (_j = (_i = (_h = (_g = res == null ? void 0 : res.body) == null ? void 0 : _g.unsigned) == null ? void 0 : _h.data) == null ? void 0 : _i.amount) == null ? void 0 : _j.amount
|
|
1343
1334
|
});
|
|
1344
1335
|
}
|
|
1345
|
-
return
|
|
1346
|
-
isSuccess
|
|
1347
|
-
});
|
|
1336
|
+
return __spreadValues({}, res);
|
|
1348
1337
|
};
|
|
1349
1338
|
const getConsult = ({
|
|
1350
1339
|
merchant: merchant2,
|
|
1351
1340
|
amount: amount2,
|
|
1352
1341
|
productType
|
|
1353
1342
|
}) => {
|
|
1354
|
-
return
|
|
1343
|
+
return ppFetch2({
|
|
1355
1344
|
method: "POST",
|
|
1356
1345
|
url: "web-api/app/v2/payment/consult",
|
|
1357
1346
|
params: { merchant: merchant2, productType },
|
|
@@ -1365,7 +1354,7 @@ var CashBackAnimationType;
|
|
|
1365
1354
|
CashBackAnimationType2["TIER_CAMPAIGN_FULL"] = "TIER_CAMPAIGN_FULL";
|
|
1366
1355
|
})(CashBackAnimationType || (CashBackAnimationType = {}));
|
|
1367
1356
|
const getCashBackDetails = (paymentId2) => {
|
|
1368
|
-
return
|
|
1357
|
+
return ppFetch2({
|
|
1369
1358
|
method: "GET",
|
|
1370
1359
|
url: "web-api/app/v1/payment/cashbackDetail",
|
|
1371
1360
|
params: {
|
|
@@ -1374,7 +1363,7 @@ const getCashBackDetails = (paymentId2) => {
|
|
|
1374
1363
|
});
|
|
1375
1364
|
};
|
|
1376
1365
|
const sendAge = (payload) => {
|
|
1377
|
-
return
|
|
1366
|
+
return ppFetch2({
|
|
1378
1367
|
method: "POST",
|
|
1379
1368
|
url: "web-api/app/v1/confirmAgeForCashback",
|
|
1380
1369
|
data: payload
|
|
@@ -1392,26 +1381,26 @@ var UIComponentsButtonType;
|
|
|
1392
1381
|
UIComponentsButtonType2["WHITE"] = "WHITE";
|
|
1393
1382
|
})(UIComponentsButtonType || (UIComponentsButtonType = {}));
|
|
1394
1383
|
async function topup$3(queryParams, body2) {
|
|
1395
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1396
|
-
const res = await
|
|
1384
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1385
|
+
const res = await ppFetch2({
|
|
1397
1386
|
method: "POST",
|
|
1398
1387
|
url: "web-api/app/v1/payment/topup",
|
|
1399
1388
|
params: queryParams,
|
|
1400
1389
|
data: body2
|
|
1401
1390
|
});
|
|
1402
|
-
if (
|
|
1391
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
1403
1392
|
return res;
|
|
1404
1393
|
}
|
|
1405
|
-
const isSuccess = ((_b = (_a = res.
|
|
1394
|
+
const isSuccess = ((_c = (_b = (_a = res == null ? void 0 : res.body) == null ? void 0 : _a.unsigned) == null ? void 0 : _b.resultInfo) == null ? void 0 : _c.code) === "SUCCESS" && ["COMPLETED"].includes((_f = (_e = (_d = res == null ? void 0 : res.body) == null ? void 0 : _d.unsigned) == null ? void 0 : _e.data) == null ? void 0 : _f.status);
|
|
1406
1395
|
if (isSuccess) {
|
|
1407
1396
|
saveTopup({
|
|
1408
|
-
amount: (
|
|
1397
|
+
amount: (_j = (_i = (_h = (_g = res == null ? void 0 : res.body) == null ? void 0 : _g.unsigned) == null ? void 0 : _h.data) == null ? void 0 : _i.amount) == null ? void 0 : _j.amount
|
|
1409
1398
|
});
|
|
1410
1399
|
}
|
|
1411
1400
|
return res;
|
|
1412
1401
|
}
|
|
1413
1402
|
async function getCashBackInfo() {
|
|
1414
|
-
return await
|
|
1403
|
+
return await ppFetch2({
|
|
1415
1404
|
method: "GET",
|
|
1416
1405
|
url: "/web-api/app/platform/v1/balance",
|
|
1417
1406
|
headers: {
|
|
@@ -1462,7 +1451,7 @@ async function setSelectedAddress(addressId) {
|
|
|
1462
1451
|
});
|
|
1463
1452
|
}
|
|
1464
1453
|
async function getUserProfileData() {
|
|
1465
|
-
return
|
|
1454
|
+
return ppFetch2({
|
|
1466
1455
|
url: "web-api/app/v1/users/profile",
|
|
1467
1456
|
method: "GET"
|
|
1468
1457
|
});
|
|
@@ -1474,7 +1463,7 @@ async function getUserProfileDataV2() {
|
|
|
1474
1463
|
});
|
|
1475
1464
|
}
|
|
1476
1465
|
async function registerEmail$1(email2) {
|
|
1477
|
-
return
|
|
1466
|
+
return ppFetch2({
|
|
1478
1467
|
url: "web-api/app/v1/users/email",
|
|
1479
1468
|
method: "POST",
|
|
1480
1469
|
data: {
|
|
@@ -1489,7 +1478,7 @@ async function resendEmail() {
|
|
|
1489
1478
|
});
|
|
1490
1479
|
}
|
|
1491
1480
|
function getUserLocationRequest(params) {
|
|
1492
|
-
return
|
|
1481
|
+
return ppFetch2({
|
|
1493
1482
|
url: "web-api/app/v1/location",
|
|
1494
1483
|
method: "GET",
|
|
1495
1484
|
params: {
|
|
@@ -1710,6 +1699,18 @@ function filterErrorButtonList(buttonList) {
|
|
|
1710
1699
|
}
|
|
1711
1700
|
});
|
|
1712
1701
|
}
|
|
1702
|
+
function getFailErrorCode(ppFetchResult) {
|
|
1703
|
+
switch (ppFetchResult) {
|
|
1704
|
+
case "notAuthorized":
|
|
1705
|
+
return MiniAppErrorType.notAuthorized;
|
|
1706
|
+
case "timeout":
|
|
1707
|
+
return MiniAppErrorType.timeOut;
|
|
1708
|
+
case "tokenExpired":
|
|
1709
|
+
return MiniAppErrorType.tokenExpired;
|
|
1710
|
+
default:
|
|
1711
|
+
return MiniAppErrorType.serverError;
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1713
1714
|
const opaUrl = () => {
|
|
1714
1715
|
switch (getEnv()) {
|
|
1715
1716
|
case "staging":
|
|
@@ -1728,7 +1729,7 @@ const opaUrl = () => {
|
|
|
1728
1729
|
const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
|
|
1729
1730
|
let headers = new Headers(__spreadValues({
|
|
1730
1731
|
"Content-Type": "application/json",
|
|
1731
|
-
"Client-Version": "1.
|
|
1732
|
+
"Client-Version": "1.40.0",
|
|
1732
1733
|
"Client-OS-Type": getRuntime()
|
|
1733
1734
|
}, customHeaders));
|
|
1734
1735
|
if (urlEndpoint === "web-api/app/v2/payment/methods" || urlEndpoint === "web-api/app/v2/payment/consult" || urlEndpoint === "web-api/app/v1/payment/cashbackDetail" || urlEndpoint === "web-api/app/v1/confirmAgeForCashback" || urlEndpoint === "web-api/app/v1/internal/request" || urlEndpoint === "web-api/app/v1/addressbyzip" || urlEndpoint === "/web-api/app/platform/v1/balance") {
|
|
@@ -1781,44 +1782,14 @@ function ppFetchPrepare(options) {
|
|
|
1781
1782
|
}
|
|
1782
1783
|
return { requestInfo, requestInit };
|
|
1783
1784
|
}
|
|
1784
|
-
async function ppFetch(options) {
|
|
1785
|
-
const fetchParams = ppFetchPrepare(options);
|
|
1786
|
-
if (!fetchParams) {
|
|
1787
|
-
const msg = "PayPay Mini App JS SDK is not initialized";
|
|
1788
|
-
console.warn(msg);
|
|
1789
|
-
return Promise.resolve({
|
|
1790
|
-
error: {
|
|
1791
|
-
message: msg
|
|
1792
|
-
}
|
|
1793
|
-
});
|
|
1794
|
-
}
|
|
1795
|
-
const { requestInfo, requestInit } = fetchParams;
|
|
1796
|
-
try {
|
|
1797
|
-
const response = await fetch(requestInfo, requestInit);
|
|
1798
|
-
const res = await response.json();
|
|
1799
|
-
if (res.error === "invalid_token" && !options.suppressRefresh) {
|
|
1800
|
-
if (await refreshToken()) {
|
|
1801
|
-
return ppFetch(__spreadProps(__spreadValues({}, options), { suppressRefresh: true }));
|
|
1802
|
-
}
|
|
1803
|
-
}
|
|
1804
|
-
return __spreadProps(__spreadValues({}, res), { statusCode: response == null ? void 0 : response.status });
|
|
1805
|
-
} catch (error2) {
|
|
1806
|
-
if (error2 instanceof Error && error2.name === "AbortError") {
|
|
1807
|
-
return {
|
|
1808
|
-
error: { message: MiniAppErrorType.timeOut }
|
|
1809
|
-
};
|
|
1810
|
-
}
|
|
1811
|
-
return { error: { message: "Request failed." } };
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
1785
|
async function ppFetch2(options) {
|
|
1815
1786
|
var _a, _b, _c, _d, _e;
|
|
1816
1787
|
const fetchParams = ppFetchPrepare(options);
|
|
1817
1788
|
if (!fetchParams) {
|
|
1818
|
-
const msg = "PayPay Mini App JS SDK is not
|
|
1789
|
+
const msg = "PayPay Mini App JS SDK is not authorized";
|
|
1819
1790
|
console.warn(msg);
|
|
1820
1791
|
return Promise.resolve({
|
|
1821
|
-
ppFetchResult: "
|
|
1792
|
+
ppFetchResult: "notAuthorized",
|
|
1822
1793
|
body: null
|
|
1823
1794
|
});
|
|
1824
1795
|
}
|
|
@@ -1827,11 +1798,24 @@ async function ppFetch2(options) {
|
|
|
1827
1798
|
const response = await fetch(requestInfo, requestInit);
|
|
1828
1799
|
const res = await response.json();
|
|
1829
1800
|
const tokenResponse = res;
|
|
1830
|
-
if (tokenResponse.error === "invalid_token"
|
|
1831
|
-
if (await refreshToken()) {
|
|
1801
|
+
if ((tokenResponse == null ? void 0 : tokenResponse.error) === "invalid_token") {
|
|
1802
|
+
if (!options.suppressRefresh && await refreshToken()) {
|
|
1832
1803
|
return ppFetch2(__spreadProps(__spreadValues({}, options), { suppressRefresh: true }));
|
|
1804
|
+
} else {
|
|
1805
|
+
return {
|
|
1806
|
+
ppFetchResult: "tokenExpired",
|
|
1807
|
+
statusCode: response.status,
|
|
1808
|
+
body: null
|
|
1809
|
+
};
|
|
1833
1810
|
}
|
|
1834
1811
|
}
|
|
1812
|
+
if (options.skipResultCodeCheck && response.status >= 200 && response.status < 300) {
|
|
1813
|
+
return {
|
|
1814
|
+
ppFetchResult: "success",
|
|
1815
|
+
statusCode: response.status,
|
|
1816
|
+
body: res
|
|
1817
|
+
};
|
|
1818
|
+
}
|
|
1835
1819
|
const opaResponse = res;
|
|
1836
1820
|
if (opaResponse.unsigned) {
|
|
1837
1821
|
if (((_a = opaResponse.unsigned.resultInfo) == null ? void 0 : _a.code) !== "SUCCESS") {
|
|
@@ -1893,24 +1877,24 @@ async function refreshToken() {
|
|
|
1893
1877
|
return false;
|
|
1894
1878
|
}
|
|
1895
1879
|
async function initAppDetail(accessToken) {
|
|
1896
|
-
var _a;
|
|
1897
|
-
const res = await
|
|
1880
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
1881
|
+
const res = await ppFetch2({
|
|
1898
1882
|
method: "GET",
|
|
1899
1883
|
url: "web-api/app/v1/apps/detail",
|
|
1900
1884
|
headers: { Authorization: `Bearer ${accessToken}` }
|
|
1901
1885
|
});
|
|
1902
|
-
if (
|
|
1886
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !((_b = (_a = res == null ? void 0 : res.body) == null ? void 0 : _a.unsigned) == null ? void 0 : _b.data)) {
|
|
1903
1887
|
removeAppDetail();
|
|
1904
1888
|
return false;
|
|
1905
1889
|
}
|
|
1906
1890
|
saveAppDetail(JSON.stringify({
|
|
1907
|
-
appLogo: res.unsigned.data.appLogo,
|
|
1908
|
-
appName: res.unsigned.data.appName,
|
|
1909
|
-
openUrl: res.unsigned.data.openUrl,
|
|
1910
|
-
whiteListDomains: res.unsigned.data.whiteListDomains,
|
|
1911
|
-
isInternal: res.unsigned.data.isInternal,
|
|
1912
|
-
window: res.unsigned.data.window,
|
|
1913
|
-
subdomainCookieSharing: res.unsigned.data.subdomainCookieSharing
|
|
1891
|
+
appLogo: (_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.appLogo,
|
|
1892
|
+
appName: (_h = (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.unsigned) == null ? void 0 : _g.data) == null ? void 0 : _h.appName,
|
|
1893
|
+
openUrl: (_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.data) == null ? void 0 : _k.openUrl,
|
|
1894
|
+
whiteListDomains: (_n = (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.unsigned) == null ? void 0 : _m.data) == null ? void 0 : _n.whiteListDomains,
|
|
1895
|
+
isInternal: (_q = (_p = (_o = res == null ? void 0 : res.body) == null ? void 0 : _o.unsigned) == null ? void 0 : _p.data) == null ? void 0 : _q.isInternal,
|
|
1896
|
+
window: (_t = (_s = (_r = res == null ? void 0 : res.body) == null ? void 0 : _r.unsigned) == null ? void 0 : _s.data) == null ? void 0 : _t.window,
|
|
1897
|
+
subdomainCookieSharing: (_w = (_v = (_u = res == null ? void 0 : res.body) == null ? void 0 : _u.unsigned) == null ? void 0 : _v.data) == null ? void 0 : _w.subdomainCookieSharing
|
|
1914
1898
|
}));
|
|
1915
1899
|
return true;
|
|
1916
1900
|
}
|
|
@@ -1922,18 +1906,20 @@ function getAppDetail() {
|
|
|
1922
1906
|
return null;
|
|
1923
1907
|
}
|
|
1924
1908
|
async function initAppConfiguration() {
|
|
1925
|
-
|
|
1909
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1910
|
+
const res = await ppFetch2({
|
|
1926
1911
|
method: "GET",
|
|
1927
1912
|
url: "web-api/app/platform/v1/configuration",
|
|
1928
|
-
params: { filePath: "globalServiceStatus.json" }
|
|
1913
|
+
params: { filePath: "globalServiceStatus.json" },
|
|
1914
|
+
skipResultCodeCheck: true
|
|
1929
1915
|
});
|
|
1930
|
-
if (
|
|
1916
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !((_a = res == null ? void 0 : res.body) == null ? void 0 : _a.variables)) {
|
|
1931
1917
|
return false;
|
|
1932
1918
|
}
|
|
1933
1919
|
saveAppConfig(JSON.stringify({
|
|
1934
|
-
topupButtonsAmount: res.variables.topupButtonsAmount,
|
|
1935
|
-
topupHalfSheetAmount: res.variables.topupHalfSheetAmount,
|
|
1936
|
-
topupHalfSheetRecommendedAmount: res.variables.topupHalfSheetRecommendedAmount
|
|
1920
|
+
topupButtonsAmount: (_c = (_b = res == null ? void 0 : res.body) == null ? void 0 : _b.variables) == null ? void 0 : _c.topupButtonsAmount,
|
|
1921
|
+
topupHalfSheetAmount: (_e = (_d = res == null ? void 0 : res.body) == null ? void 0 : _d.variables) == null ? void 0 : _e.topupHalfSheetAmount,
|
|
1922
|
+
topupHalfSheetRecommendedAmount: (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.variables) == null ? void 0 : _g.topupHalfSheetRecommendedAmount
|
|
1937
1923
|
}));
|
|
1938
1924
|
return true;
|
|
1939
1925
|
}
|
|
@@ -1946,24 +1932,26 @@ function getAppConfig() {
|
|
|
1946
1932
|
}
|
|
1947
1933
|
function reconstructParams(params) {
|
|
1948
1934
|
if (!params)
|
|
1949
|
-
return;
|
|
1950
|
-
const { success: success2, complete, fail } =
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1935
|
+
return params;
|
|
1936
|
+
const _a = params, { success: success2, complete, fail } = _a, data2 = __objRest(_a, ["success", "complete", "fail"]);
|
|
1937
|
+
return __spreadProps(__spreadValues({}, data2), {
|
|
1938
|
+
success: (result2) => {
|
|
1939
|
+
setTimeout(() => {
|
|
1940
|
+
success2 == null ? void 0 : success2(result2);
|
|
1941
|
+
}, 0);
|
|
1942
|
+
setTimeout(() => {
|
|
1943
|
+
complete == null ? void 0 : complete();
|
|
1944
|
+
}, 0);
|
|
1945
|
+
},
|
|
1946
|
+
fail: (result2) => {
|
|
1947
|
+
setTimeout(() => {
|
|
1948
|
+
fail == null ? void 0 : fail(result2);
|
|
1949
|
+
}, 0);
|
|
1950
|
+
setTimeout(() => {
|
|
1951
|
+
complete == null ? void 0 : complete();
|
|
1952
|
+
}, 0);
|
|
1953
|
+
}
|
|
1954
|
+
});
|
|
1967
1955
|
}
|
|
1968
1956
|
var MiniAppStatusType;
|
|
1969
1957
|
(function(MiniAppStatusType2) {
|
|
@@ -1976,25 +1964,25 @@ var MiniAppStatusType;
|
|
|
1976
1964
|
MiniAppStatusType2["connected"] = "CONNECTED";
|
|
1977
1965
|
})(MiniAppStatusType || (MiniAppStatusType = {}));
|
|
1978
1966
|
function getUAID(params) {
|
|
1979
|
-
reconstructParams(params);
|
|
1980
|
-
execute$f(
|
|
1967
|
+
const newParams = reconstructParams(params);
|
|
1968
|
+
execute$f(newParams).catch(() => {
|
|
1981
1969
|
});
|
|
1982
1970
|
}
|
|
1983
1971
|
async function execute$f(params) {
|
|
1984
|
-
var _a, _b, _c, _d;
|
|
1985
|
-
const res = await
|
|
1972
|
+
var _a, _b, _c, _d, _e;
|
|
1973
|
+
const res = await ppFetch2({
|
|
1986
1974
|
method: "GET",
|
|
1987
1975
|
url: "web-api/app/v1/users/id"
|
|
1988
1976
|
});
|
|
1989
|
-
if (
|
|
1990
|
-
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode:
|
|
1977
|
+
if (res.ppFetchResult !== "success") {
|
|
1978
|
+
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
1991
1979
|
}
|
|
1992
|
-
const userId = (_b = res == null ? void 0 : res.
|
|
1993
|
-
(userId == null ? void 0 : userId.length) ? (
|
|
1980
|
+
const userId = (_c = (_b = res == null ? void 0 : res.body) == null ? void 0 : _b.signed) == null ? void 0 : _c.jws;
|
|
1981
|
+
(userId == null ? void 0 : userId.length) ? (_d = params == null ? void 0 : params.success) == null ? void 0 : _d.call(params, { jws: userId }) : (_e = params == null ? void 0 : params.fail) == null ? void 0 : _e.call(params, { errorCode: MiniAppErrorType.serverError });
|
|
1994
1982
|
}
|
|
1995
1983
|
function checkAccessToken(params) {
|
|
1996
|
-
reconstructParams(params);
|
|
1997
|
-
execute$e(
|
|
1984
|
+
const newParams = reconstructParams(params);
|
|
1985
|
+
execute$e(newParams);
|
|
1998
1986
|
}
|
|
1999
1987
|
function execute$e(params) {
|
|
2000
1988
|
var _a, _b;
|
|
@@ -2020,8 +2008,8 @@ function execute$e(params) {
|
|
|
2020
2008
|
}
|
|
2021
2009
|
}
|
|
2022
2010
|
async function getUserProfile(params) {
|
|
2023
|
-
reconstructParams(params);
|
|
2024
|
-
await execute$d(
|
|
2011
|
+
const newParams = reconstructParams(params);
|
|
2012
|
+
await execute$d(newParams);
|
|
2025
2013
|
}
|
|
2026
2014
|
async function execute$d(params) {
|
|
2027
2015
|
var _a, _b;
|
|
@@ -2030,8 +2018,7 @@ async function execute$d(params) {
|
|
|
2030
2018
|
url: "web-api/app/v2/users/profile"
|
|
2031
2019
|
});
|
|
2032
2020
|
if (res.ppFetchResult !== "success") {
|
|
2033
|
-
(_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode:
|
|
2034
|
-
return;
|
|
2021
|
+
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
2035
2022
|
}
|
|
2036
2023
|
const data2 = __spreadProps(__spreadValues({}, res.body.unsigned.data), {
|
|
2037
2024
|
jws: res.body.signed.jws
|
|
@@ -2149,7 +2136,7 @@ function looseIndexOf(arr, val2) {
|
|
|
2149
2136
|
return arr.findIndex((item) => looseEqual(item, val2));
|
|
2150
2137
|
}
|
|
2151
2138
|
const toDisplayString = (val2) => {
|
|
2152
|
-
return val2 == null ? "" : isArray(val2) || isObject(val2) && (val2.toString === objectToString || !isFunction(val2.toString)) ? JSON.stringify(val2, replacer, 2) : String(val2);
|
|
2139
|
+
return isString(val2) ? val2 : val2 == null ? "" : isArray(val2) || isObject(val2) && (val2.toString === objectToString || !isFunction(val2.toString)) ? JSON.stringify(val2, replacer, 2) : String(val2);
|
|
2153
2140
|
};
|
|
2154
2141
|
const replacer = (_key, val2) => {
|
|
2155
2142
|
if (val2 && val2.__v_isRef) {
|
|
@@ -2205,7 +2192,7 @@ const toRawType = (value2) => {
|
|
|
2205
2192
|
};
|
|
2206
2193
|
const isPlainObject$1 = (val2) => toTypeString(val2) === "[object Object]";
|
|
2207
2194
|
const isIntegerKey = (key2) => isString(key2) && key2 !== "NaN" && key2[0] !== "-" && "" + parseInt(key2, 10) === key2;
|
|
2208
|
-
const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
2195
|
+
const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
2209
2196
|
const cacheStringFunction = (fn) => {
|
|
2210
2197
|
const cache = Object.create(null);
|
|
2211
2198
|
return (str) => {
|
|
@@ -2243,7 +2230,6 @@ const getGlobalThis = () => {
|
|
|
2243
2230
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
2244
2231
|
};
|
|
2245
2232
|
let activeEffectScope;
|
|
2246
|
-
const effectScopeStack = [];
|
|
2247
2233
|
class EffectScope {
|
|
2248
2234
|
constructor(detached = false) {
|
|
2249
2235
|
this.active = true;
|
|
@@ -2256,32 +2242,34 @@ class EffectScope {
|
|
|
2256
2242
|
}
|
|
2257
2243
|
run(fn) {
|
|
2258
2244
|
if (this.active) {
|
|
2245
|
+
const currentEffectScope = activeEffectScope;
|
|
2259
2246
|
try {
|
|
2260
|
-
this
|
|
2247
|
+
activeEffectScope = this;
|
|
2261
2248
|
return fn();
|
|
2262
2249
|
} finally {
|
|
2263
|
-
|
|
2250
|
+
activeEffectScope = currentEffectScope;
|
|
2264
2251
|
}
|
|
2265
2252
|
}
|
|
2266
2253
|
}
|
|
2267
2254
|
on() {
|
|
2268
|
-
|
|
2269
|
-
effectScopeStack.push(this);
|
|
2270
|
-
activeEffectScope = this;
|
|
2271
|
-
}
|
|
2255
|
+
activeEffectScope = this;
|
|
2272
2256
|
}
|
|
2273
2257
|
off() {
|
|
2274
|
-
|
|
2275
|
-
effectScopeStack.pop();
|
|
2276
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
2277
|
-
}
|
|
2258
|
+
activeEffectScope = this.parent;
|
|
2278
2259
|
}
|
|
2279
2260
|
stop(fromParent) {
|
|
2280
2261
|
if (this.active) {
|
|
2281
|
-
|
|
2282
|
-
this.
|
|
2262
|
+
let i2, l;
|
|
2263
|
+
for (i2 = 0, l = this.effects.length; i2 < l; i2++) {
|
|
2264
|
+
this.effects[i2].stop();
|
|
2265
|
+
}
|
|
2266
|
+
for (i2 = 0, l = this.cleanups.length; i2 < l; i2++) {
|
|
2267
|
+
this.cleanups[i2]();
|
|
2268
|
+
}
|
|
2283
2269
|
if (this.scopes) {
|
|
2284
|
-
this.scopes.
|
|
2270
|
+
for (i2 = 0, l = this.scopes.length; i2 < l; i2++) {
|
|
2271
|
+
this.scopes[i2].stop(true);
|
|
2272
|
+
}
|
|
2285
2273
|
}
|
|
2286
2274
|
if (this.parent && !fromParent) {
|
|
2287
2275
|
const last = this.parent.scopes.pop();
|
|
@@ -2297,8 +2285,7 @@ class EffectScope {
|
|
|
2297
2285
|
function effectScope(detached) {
|
|
2298
2286
|
return new EffectScope(detached);
|
|
2299
2287
|
}
|
|
2300
|
-
function recordEffectScope(effect2, scope) {
|
|
2301
|
-
scope = scope || activeEffectScope;
|
|
2288
|
+
function recordEffectScope(effect2, scope = activeEffectScope) {
|
|
2302
2289
|
if (scope && scope.active) {
|
|
2303
2290
|
scope.effects.push(effect2);
|
|
2304
2291
|
}
|
|
@@ -2339,7 +2326,6 @@ const targetMap = new WeakMap();
|
|
|
2339
2326
|
let effectTrackDepth = 0;
|
|
2340
2327
|
let trackOpBit = 1;
|
|
2341
2328
|
const maxMarkerBits = 30;
|
|
2342
|
-
const effectStack = [];
|
|
2343
2329
|
let activeEffect;
|
|
2344
2330
|
const ITERATE_KEY = Symbol("");
|
|
2345
2331
|
const MAP_KEY_ITERATE_KEY = Symbol("");
|
|
@@ -2349,37 +2335,49 @@ class ReactiveEffect {
|
|
|
2349
2335
|
this.scheduler = scheduler;
|
|
2350
2336
|
this.active = true;
|
|
2351
2337
|
this.deps = [];
|
|
2338
|
+
this.parent = void 0;
|
|
2352
2339
|
recordEffectScope(this, scope);
|
|
2353
2340
|
}
|
|
2354
2341
|
run() {
|
|
2355
2342
|
if (!this.active) {
|
|
2356
2343
|
return this.fn();
|
|
2357
2344
|
}
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2345
|
+
let parent2 = activeEffect;
|
|
2346
|
+
let lastShouldTrack = shouldTrack;
|
|
2347
|
+
while (parent2) {
|
|
2348
|
+
if (parent2 === this) {
|
|
2349
|
+
return;
|
|
2350
|
+
}
|
|
2351
|
+
parent2 = parent2.parent;
|
|
2352
|
+
}
|
|
2353
|
+
try {
|
|
2354
|
+
this.parent = activeEffect;
|
|
2355
|
+
activeEffect = this;
|
|
2356
|
+
shouldTrack = true;
|
|
2357
|
+
trackOpBit = 1 << ++effectTrackDepth;
|
|
2358
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
2359
|
+
initDepMarkers(this);
|
|
2360
|
+
} else {
|
|
2361
|
+
cleanupEffect(this);
|
|
2362
|
+
}
|
|
2363
|
+
return this.fn();
|
|
2364
|
+
} finally {
|
|
2365
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
2366
|
+
finalizeDepMarkers(this);
|
|
2367
|
+
}
|
|
2368
|
+
trackOpBit = 1 << --effectTrackDepth;
|
|
2369
|
+
activeEffect = this.parent;
|
|
2370
|
+
shouldTrack = lastShouldTrack;
|
|
2371
|
+
this.parent = void 0;
|
|
2372
|
+
if (this.deferStop) {
|
|
2373
|
+
this.stop();
|
|
2378
2374
|
}
|
|
2379
2375
|
}
|
|
2380
2376
|
}
|
|
2381
2377
|
stop() {
|
|
2382
|
-
if (this
|
|
2378
|
+
if (activeEffect === this) {
|
|
2379
|
+
this.deferStop = true;
|
|
2380
|
+
} else if (this.active) {
|
|
2383
2381
|
cleanupEffect(this);
|
|
2384
2382
|
if (this.onStop) {
|
|
2385
2383
|
this.onStop();
|
|
@@ -2403,30 +2401,22 @@ function pauseTracking() {
|
|
|
2403
2401
|
trackStack.push(shouldTrack);
|
|
2404
2402
|
shouldTrack = false;
|
|
2405
2403
|
}
|
|
2406
|
-
function enableTracking() {
|
|
2407
|
-
trackStack.push(shouldTrack);
|
|
2408
|
-
shouldTrack = true;
|
|
2409
|
-
}
|
|
2410
2404
|
function resetTracking() {
|
|
2411
2405
|
const last = trackStack.pop();
|
|
2412
2406
|
shouldTrack = last === void 0 ? true : last;
|
|
2413
2407
|
}
|
|
2414
2408
|
function track(target, type, key2) {
|
|
2415
|
-
if (
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2409
|
+
if (shouldTrack && activeEffect) {
|
|
2410
|
+
let depsMap = targetMap.get(target);
|
|
2411
|
+
if (!depsMap) {
|
|
2412
|
+
targetMap.set(target, depsMap = new Map());
|
|
2413
|
+
}
|
|
2414
|
+
let dep = depsMap.get(key2);
|
|
2415
|
+
if (!dep) {
|
|
2416
|
+
depsMap.set(key2, dep = createDep());
|
|
2417
|
+
}
|
|
2418
|
+
trackEffects(dep);
|
|
2425
2419
|
}
|
|
2426
|
-
trackEffects(dep);
|
|
2427
|
-
}
|
|
2428
|
-
function isTracking() {
|
|
2429
|
-
return shouldTrack && activeEffect !== void 0;
|
|
2430
2420
|
}
|
|
2431
2421
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
2432
2422
|
let shouldTrack2 = false;
|
|
@@ -2517,7 +2507,7 @@ function triggerEffects(dep, debuggerEventExtraInfo) {
|
|
|
2517
2507
|
}
|
|
2518
2508
|
}
|
|
2519
2509
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
2520
|
-
const builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key2) => Symbol[key2]).filter(isSymbol));
|
|
2510
|
+
const builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).map((key2) => Symbol[key2]).filter(isSymbol));
|
|
2521
2511
|
const get = /* @__PURE__ */ createGetter();
|
|
2522
2512
|
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
2523
2513
|
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
@@ -2554,6 +2544,8 @@ function createGetter(isReadonly2 = false, shallow = false) {
|
|
|
2554
2544
|
return !isReadonly2;
|
|
2555
2545
|
} else if (key2 === "__v_isReadonly") {
|
|
2556
2546
|
return isReadonly2;
|
|
2547
|
+
} else if (key2 === "__v_isShallow") {
|
|
2548
|
+
return shallow;
|
|
2557
2549
|
} else if (key2 === "__v_raw" && receiver2 === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
|
|
2558
2550
|
return target;
|
|
2559
2551
|
}
|
|
@@ -2586,9 +2578,14 @@ const shallowSet = /* @__PURE__ */ createSetter(true);
|
|
|
2586
2578
|
function createSetter(shallow = false) {
|
|
2587
2579
|
return function set2(target, key2, value2, receiver2) {
|
|
2588
2580
|
let oldValue = target[key2];
|
|
2581
|
+
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value2)) {
|
|
2582
|
+
return false;
|
|
2583
|
+
}
|
|
2589
2584
|
if (!shallow && !isReadonly(value2)) {
|
|
2590
|
-
|
|
2591
|
-
|
|
2585
|
+
if (!isShallow(value2)) {
|
|
2586
|
+
value2 = toRaw(value2);
|
|
2587
|
+
oldValue = toRaw(oldValue);
|
|
2588
|
+
}
|
|
2592
2589
|
if (!isArray(target) && isRef(oldValue) && !isRef(value2)) {
|
|
2593
2590
|
oldValue.value = value2;
|
|
2594
2591
|
return true;
|
|
@@ -2648,7 +2645,7 @@ const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, {
|
|
|
2648
2645
|
});
|
|
2649
2646
|
const toShallow = (value2) => value2;
|
|
2650
2647
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
2651
|
-
function get$1(target, key2, isReadonly2 = false,
|
|
2648
|
+
function get$1(target, key2, isReadonly2 = false, isShallow2 = false) {
|
|
2652
2649
|
target = target["__v_raw"];
|
|
2653
2650
|
const rawTarget = toRaw(target);
|
|
2654
2651
|
const rawKey = toRaw(key2);
|
|
@@ -2657,7 +2654,7 @@ function get$1(target, key2, isReadonly2 = false, isShallow = false) {
|
|
|
2657
2654
|
}
|
|
2658
2655
|
!isReadonly2 && track(rawTarget, "get", rawKey);
|
|
2659
2656
|
const { has: has2 } = getProto(rawTarget);
|
|
2660
|
-
const wrap =
|
|
2657
|
+
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
2661
2658
|
if (has2.call(rawTarget, key2)) {
|
|
2662
2659
|
return wrap(target.get(key2));
|
|
2663
2660
|
} else if (has2.call(rawTarget, rawKey)) {
|
|
@@ -2734,19 +2731,19 @@ function clear() {
|
|
|
2734
2731
|
}
|
|
2735
2732
|
return result2;
|
|
2736
2733
|
}
|
|
2737
|
-
function createForEach(isReadonly2,
|
|
2734
|
+
function createForEach(isReadonly2, isShallow2) {
|
|
2738
2735
|
return function forEach(callback, thisArg) {
|
|
2739
2736
|
const observed = this;
|
|
2740
2737
|
const target = observed["__v_raw"];
|
|
2741
2738
|
const rawTarget = toRaw(target);
|
|
2742
|
-
const wrap =
|
|
2739
|
+
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
2743
2740
|
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
2744
2741
|
return target.forEach((value2, key2) => {
|
|
2745
2742
|
return callback.call(thisArg, wrap(value2), wrap(key2), observed);
|
|
2746
2743
|
});
|
|
2747
2744
|
};
|
|
2748
2745
|
}
|
|
2749
|
-
function createIterableMethod(method, isReadonly2,
|
|
2746
|
+
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
2750
2747
|
return function(...args) {
|
|
2751
2748
|
const target = this["__v_raw"];
|
|
2752
2749
|
const rawTarget = toRaw(target);
|
|
@@ -2754,7 +2751,7 @@ function createIterableMethod(method, isReadonly2, isShallow) {
|
|
|
2754
2751
|
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
|
|
2755
2752
|
const isKeyOnly = method === "keys" && targetIsMap;
|
|
2756
2753
|
const innerIterator = target[method](...args);
|
|
2757
|
-
const wrap =
|
|
2754
|
+
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
2758
2755
|
!isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
|
|
2759
2756
|
return {
|
|
2760
2757
|
next() {
|
|
@@ -2895,7 +2892,7 @@ function getTargetType(value2) {
|
|
|
2895
2892
|
return value2["__v_skip"] || !Object.isExtensible(value2) ? 0 : targetTypeMap(toRawType(value2));
|
|
2896
2893
|
}
|
|
2897
2894
|
function reactive(target) {
|
|
2898
|
-
if (target
|
|
2895
|
+
if (isReadonly(target)) {
|
|
2899
2896
|
return target;
|
|
2900
2897
|
}
|
|
2901
2898
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -2934,6 +2931,9 @@ function isReactive(value2) {
|
|
|
2934
2931
|
function isReadonly(value2) {
|
|
2935
2932
|
return !!(value2 && value2["__v_isReadonly"]);
|
|
2936
2933
|
}
|
|
2934
|
+
function isShallow(value2) {
|
|
2935
|
+
return !!(value2 && value2["__v_isShallow"]);
|
|
2936
|
+
}
|
|
2937
2937
|
function isProxy(value2) {
|
|
2938
2938
|
return isReactive(value2) || isReadonly(value2);
|
|
2939
2939
|
}
|
|
@@ -2948,13 +2948,10 @@ function markRaw(value2) {
|
|
|
2948
2948
|
const toReactive = (value2) => isObject(value2) ? reactive(value2) : value2;
|
|
2949
2949
|
const toReadonly = (value2) => isObject(value2) ? readonly(value2) : value2;
|
|
2950
2950
|
function trackRefValue(ref2) {
|
|
2951
|
-
if (
|
|
2951
|
+
if (shouldTrack && activeEffect) {
|
|
2952
2952
|
ref2 = toRaw(ref2);
|
|
2953
|
-
if (!ref2.dep) {
|
|
2954
|
-
ref2.dep = createDep();
|
|
2955
|
-
}
|
|
2956
2953
|
{
|
|
2957
|
-
trackEffects(ref2.dep);
|
|
2954
|
+
trackEffects(ref2.dep || (ref2.dep = createDep()));
|
|
2958
2955
|
}
|
|
2959
2956
|
}
|
|
2960
2957
|
}
|
|
@@ -2967,7 +2964,7 @@ function triggerRefValue(ref2, newVal) {
|
|
|
2967
2964
|
}
|
|
2968
2965
|
}
|
|
2969
2966
|
function isRef(r) {
|
|
2970
|
-
return
|
|
2967
|
+
return !!(r && r.__v_isRef === true);
|
|
2971
2968
|
}
|
|
2972
2969
|
function ref(value2) {
|
|
2973
2970
|
return createRef(value2, false);
|
|
@@ -2979,22 +2976,22 @@ function createRef(rawValue, shallow) {
|
|
|
2979
2976
|
return new RefImpl(rawValue, shallow);
|
|
2980
2977
|
}
|
|
2981
2978
|
class RefImpl {
|
|
2982
|
-
constructor(value2,
|
|
2983
|
-
this.
|
|
2979
|
+
constructor(value2, __v_isShallow) {
|
|
2980
|
+
this.__v_isShallow = __v_isShallow;
|
|
2984
2981
|
this.dep = void 0;
|
|
2985
2982
|
this.__v_isRef = true;
|
|
2986
|
-
this._rawValue =
|
|
2987
|
-
this._value =
|
|
2983
|
+
this._rawValue = __v_isShallow ? value2 : toRaw(value2);
|
|
2984
|
+
this._value = __v_isShallow ? value2 : toReactive(value2);
|
|
2988
2985
|
}
|
|
2989
2986
|
get value() {
|
|
2990
2987
|
trackRefValue(this);
|
|
2991
2988
|
return this._value;
|
|
2992
2989
|
}
|
|
2993
2990
|
set value(newVal) {
|
|
2994
|
-
newVal = this.
|
|
2991
|
+
newVal = this.__v_isShallow ? newVal : toRaw(newVal);
|
|
2995
2992
|
if (hasChanged(newVal, this._rawValue)) {
|
|
2996
2993
|
this._rawValue = newVal;
|
|
2997
|
-
this._value = this.
|
|
2994
|
+
this._value = this.__v_isShallow ? newVal : toReactive(newVal);
|
|
2998
2995
|
triggerRefValue(this);
|
|
2999
2996
|
}
|
|
3000
2997
|
}
|
|
@@ -3025,40 +3022,44 @@ function toRefs(object) {
|
|
|
3025
3022
|
return ret;
|
|
3026
3023
|
}
|
|
3027
3024
|
class ObjectRefImpl {
|
|
3028
|
-
constructor(_object, _key) {
|
|
3025
|
+
constructor(_object, _key, _defaultValue) {
|
|
3029
3026
|
this._object = _object;
|
|
3030
3027
|
this._key = _key;
|
|
3028
|
+
this._defaultValue = _defaultValue;
|
|
3031
3029
|
this.__v_isRef = true;
|
|
3032
3030
|
}
|
|
3033
3031
|
get value() {
|
|
3034
|
-
|
|
3032
|
+
const val2 = this._object[this._key];
|
|
3033
|
+
return val2 === void 0 ? this._defaultValue : val2;
|
|
3035
3034
|
}
|
|
3036
3035
|
set value(newVal) {
|
|
3037
3036
|
this._object[this._key] = newVal;
|
|
3038
3037
|
}
|
|
3039
3038
|
}
|
|
3040
|
-
function toRef(object, key2) {
|
|
3039
|
+
function toRef(object, key2, defaultValue) {
|
|
3041
3040
|
const val2 = object[key2];
|
|
3042
|
-
return isRef(val2) ? val2 : new ObjectRefImpl(object, key2);
|
|
3041
|
+
return isRef(val2) ? val2 : new ObjectRefImpl(object, key2, defaultValue);
|
|
3043
3042
|
}
|
|
3044
3043
|
class ComputedRefImpl {
|
|
3045
|
-
constructor(getter, _setter, isReadonly2) {
|
|
3044
|
+
constructor(getter, _setter, isReadonly2, isSSR) {
|
|
3046
3045
|
this._setter = _setter;
|
|
3047
3046
|
this.dep = void 0;
|
|
3048
|
-
this._dirty = true;
|
|
3049
3047
|
this.__v_isRef = true;
|
|
3048
|
+
this._dirty = true;
|
|
3050
3049
|
this.effect = new ReactiveEffect(getter, () => {
|
|
3051
3050
|
if (!this._dirty) {
|
|
3052
3051
|
this._dirty = true;
|
|
3053
3052
|
triggerRefValue(this);
|
|
3054
3053
|
}
|
|
3055
3054
|
});
|
|
3055
|
+
this.effect.computed = this;
|
|
3056
|
+
this.effect.active = this._cacheable = !isSSR;
|
|
3056
3057
|
this["__v_isReadonly"] = isReadonly2;
|
|
3057
3058
|
}
|
|
3058
3059
|
get value() {
|
|
3059
3060
|
const self2 = toRaw(this);
|
|
3060
3061
|
trackRefValue(self2);
|
|
3061
|
-
if (self2._dirty) {
|
|
3062
|
+
if (self2._dirty || !self2._cacheable) {
|
|
3062
3063
|
self2._dirty = false;
|
|
3063
3064
|
self2._value = self2.effect.run();
|
|
3064
3065
|
}
|
|
@@ -3068,7 +3069,7 @@ class ComputedRefImpl {
|
|
|
3068
3069
|
this._setter(newValue);
|
|
3069
3070
|
}
|
|
3070
3071
|
}
|
|
3071
|
-
function computed(getterOrOptions, debugOptions) {
|
|
3072
|
+
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
3072
3073
|
let getter;
|
|
3073
3074
|
let setter;
|
|
3074
3075
|
const onlyGetter = isFunction(getterOrOptions);
|
|
@@ -3079,11 +3080,190 @@ function computed(getterOrOptions, debugOptions) {
|
|
|
3079
3080
|
getter = getterOrOptions.get;
|
|
3080
3081
|
setter = getterOrOptions.set;
|
|
3081
3082
|
}
|
|
3082
|
-
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter);
|
|
3083
|
+
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
|
|
3083
3084
|
return cRef;
|
|
3084
3085
|
}
|
|
3085
|
-
|
|
3086
|
+
function callWithErrorHandling(fn, instance, type, args) {
|
|
3087
|
+
let res;
|
|
3088
|
+
try {
|
|
3089
|
+
res = args ? fn(...args) : fn();
|
|
3090
|
+
} catch (err) {
|
|
3091
|
+
handleError(err, instance, type);
|
|
3092
|
+
}
|
|
3093
|
+
return res;
|
|
3094
|
+
}
|
|
3095
|
+
function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
3096
|
+
if (isFunction(fn)) {
|
|
3097
|
+
const res = callWithErrorHandling(fn, instance, type, args);
|
|
3098
|
+
if (res && isPromise(res)) {
|
|
3099
|
+
res.catch((err) => {
|
|
3100
|
+
handleError(err, instance, type);
|
|
3101
|
+
});
|
|
3102
|
+
}
|
|
3103
|
+
return res;
|
|
3104
|
+
}
|
|
3105
|
+
const values = [];
|
|
3106
|
+
for (let i2 = 0; i2 < fn.length; i2++) {
|
|
3107
|
+
values.push(callWithAsyncErrorHandling(fn[i2], instance, type, args));
|
|
3108
|
+
}
|
|
3109
|
+
return values;
|
|
3110
|
+
}
|
|
3111
|
+
function handleError(err, instance, type, throwInDev = true) {
|
|
3112
|
+
const contextVNode = instance ? instance.vnode : null;
|
|
3113
|
+
if (instance) {
|
|
3114
|
+
let cur = instance.parent;
|
|
3115
|
+
const exposedInstance = instance.proxy;
|
|
3116
|
+
const errorInfo = type;
|
|
3117
|
+
while (cur) {
|
|
3118
|
+
const errorCapturedHooks = cur.ec;
|
|
3119
|
+
if (errorCapturedHooks) {
|
|
3120
|
+
for (let i2 = 0; i2 < errorCapturedHooks.length; i2++) {
|
|
3121
|
+
if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) {
|
|
3122
|
+
return;
|
|
3123
|
+
}
|
|
3124
|
+
}
|
|
3125
|
+
}
|
|
3126
|
+
cur = cur.parent;
|
|
3127
|
+
}
|
|
3128
|
+
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
3129
|
+
if (appErrorHandler) {
|
|
3130
|
+
callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
|
|
3131
|
+
return;
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
logError(err, type, contextVNode, throwInDev);
|
|
3135
|
+
}
|
|
3136
|
+
function logError(err, type, contextVNode, throwInDev = true) {
|
|
3137
|
+
{
|
|
3138
|
+
console.error(err);
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
let isFlushing = false;
|
|
3142
|
+
let isFlushPending = false;
|
|
3143
|
+
const queue = [];
|
|
3144
|
+
let flushIndex = 0;
|
|
3145
|
+
const pendingPreFlushCbs = [];
|
|
3146
|
+
let activePreFlushCbs = null;
|
|
3147
|
+
let preFlushIndex = 0;
|
|
3148
|
+
const pendingPostFlushCbs = [];
|
|
3149
|
+
let activePostFlushCbs = null;
|
|
3150
|
+
let postFlushIndex = 0;
|
|
3151
|
+
const resolvedPromise = /* @__PURE__ */ Promise.resolve();
|
|
3152
|
+
let currentFlushPromise = null;
|
|
3153
|
+
let currentPreFlushParentJob = null;
|
|
3154
|
+
function nextTick(fn) {
|
|
3155
|
+
const p2 = currentFlushPromise || resolvedPromise;
|
|
3156
|
+
return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
|
|
3157
|
+
}
|
|
3158
|
+
function findInsertionIndex(id) {
|
|
3159
|
+
let start = flushIndex + 1;
|
|
3160
|
+
let end = queue.length;
|
|
3161
|
+
while (start < end) {
|
|
3162
|
+
const middle = start + end >>> 1;
|
|
3163
|
+
const middleJobId = getId(queue[middle]);
|
|
3164
|
+
middleJobId < id ? start = middle + 1 : end = middle;
|
|
3165
|
+
}
|
|
3166
|
+
return start;
|
|
3167
|
+
}
|
|
3168
|
+
function queueJob(job) {
|
|
3169
|
+
if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) {
|
|
3170
|
+
if (job.id == null) {
|
|
3171
|
+
queue.push(job);
|
|
3172
|
+
} else {
|
|
3173
|
+
queue.splice(findInsertionIndex(job.id), 0, job);
|
|
3174
|
+
}
|
|
3175
|
+
queueFlush();
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3178
|
+
function queueFlush() {
|
|
3179
|
+
if (!isFlushing && !isFlushPending) {
|
|
3180
|
+
isFlushPending = true;
|
|
3181
|
+
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
function invalidateJob(job) {
|
|
3185
|
+
const i2 = queue.indexOf(job);
|
|
3186
|
+
if (i2 > flushIndex) {
|
|
3187
|
+
queue.splice(i2, 1);
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
function queueCb(cb, activeQueue, pendingQueue, index2) {
|
|
3191
|
+
if (!isArray(cb)) {
|
|
3192
|
+
if (!activeQueue || !activeQueue.includes(cb, cb.allowRecurse ? index2 + 1 : index2)) {
|
|
3193
|
+
pendingQueue.push(cb);
|
|
3194
|
+
}
|
|
3195
|
+
} else {
|
|
3196
|
+
pendingQueue.push(...cb);
|
|
3197
|
+
}
|
|
3198
|
+
queueFlush();
|
|
3199
|
+
}
|
|
3200
|
+
function queuePreFlushCb(cb) {
|
|
3201
|
+
queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);
|
|
3202
|
+
}
|
|
3203
|
+
function queuePostFlushCb(cb) {
|
|
3204
|
+
queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);
|
|
3205
|
+
}
|
|
3206
|
+
function flushPreFlushCbs(seen, parentJob = null) {
|
|
3207
|
+
if (pendingPreFlushCbs.length) {
|
|
3208
|
+
currentPreFlushParentJob = parentJob;
|
|
3209
|
+
activePreFlushCbs = [...new Set(pendingPreFlushCbs)];
|
|
3210
|
+
pendingPreFlushCbs.length = 0;
|
|
3211
|
+
for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {
|
|
3212
|
+
activePreFlushCbs[preFlushIndex]();
|
|
3213
|
+
}
|
|
3214
|
+
activePreFlushCbs = null;
|
|
3215
|
+
preFlushIndex = 0;
|
|
3216
|
+
currentPreFlushParentJob = null;
|
|
3217
|
+
flushPreFlushCbs(seen, parentJob);
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
function flushPostFlushCbs(seen) {
|
|
3221
|
+
if (pendingPostFlushCbs.length) {
|
|
3222
|
+
const deduped = [...new Set(pendingPostFlushCbs)];
|
|
3223
|
+
pendingPostFlushCbs.length = 0;
|
|
3224
|
+
if (activePostFlushCbs) {
|
|
3225
|
+
activePostFlushCbs.push(...deduped);
|
|
3226
|
+
return;
|
|
3227
|
+
}
|
|
3228
|
+
activePostFlushCbs = deduped;
|
|
3229
|
+
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
3230
|
+
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
3231
|
+
activePostFlushCbs[postFlushIndex]();
|
|
3232
|
+
}
|
|
3233
|
+
activePostFlushCbs = null;
|
|
3234
|
+
postFlushIndex = 0;
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
const getId = (job) => job.id == null ? Infinity : job.id;
|
|
3238
|
+
function flushJobs(seen) {
|
|
3239
|
+
isFlushPending = false;
|
|
3240
|
+
isFlushing = true;
|
|
3241
|
+
flushPreFlushCbs(seen);
|
|
3242
|
+
queue.sort((a, b) => getId(a) - getId(b));
|
|
3243
|
+
const check = NOOP;
|
|
3244
|
+
try {
|
|
3245
|
+
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
3246
|
+
const job = queue[flushIndex];
|
|
3247
|
+
if (job && job.active !== false) {
|
|
3248
|
+
if (false)
|
|
3249
|
+
;
|
|
3250
|
+
callWithErrorHandling(job, null, 14);
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
} finally {
|
|
3254
|
+
flushIndex = 0;
|
|
3255
|
+
queue.length = 0;
|
|
3256
|
+
flushPostFlushCbs();
|
|
3257
|
+
isFlushing = false;
|
|
3258
|
+
currentFlushPromise = null;
|
|
3259
|
+
if (queue.length || pendingPreFlushCbs.length || pendingPostFlushCbs.length) {
|
|
3260
|
+
flushJobs(seen);
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3086
3264
|
function emit$1(instance, event, ...rawArgs) {
|
|
3265
|
+
if (instance.isUnmounted)
|
|
3266
|
+
return;
|
|
3087
3267
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
3088
3268
|
let args = rawArgs;
|
|
3089
3269
|
const isModelListener2 = event.startsWith("update:");
|
|
@@ -3366,6 +3546,186 @@ function inject(key2, defaultValue, treatDefaultAsFactory = false) {
|
|
|
3366
3546
|
;
|
|
3367
3547
|
}
|
|
3368
3548
|
}
|
|
3549
|
+
const INITIAL_WATCHER_VALUE = {};
|
|
3550
|
+
function watch(source, cb, options) {
|
|
3551
|
+
return doWatch(source, cb, options);
|
|
3552
|
+
}
|
|
3553
|
+
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
|
|
3554
|
+
const instance = currentInstance;
|
|
3555
|
+
let getter;
|
|
3556
|
+
let forceTrigger = false;
|
|
3557
|
+
let isMultiSource = false;
|
|
3558
|
+
if (isRef(source)) {
|
|
3559
|
+
getter = () => source.value;
|
|
3560
|
+
forceTrigger = isShallow(source);
|
|
3561
|
+
} else if (isReactive(source)) {
|
|
3562
|
+
getter = () => source;
|
|
3563
|
+
deep = true;
|
|
3564
|
+
} else if (isArray(source)) {
|
|
3565
|
+
isMultiSource = true;
|
|
3566
|
+
forceTrigger = source.some(isReactive);
|
|
3567
|
+
getter = () => source.map((s) => {
|
|
3568
|
+
if (isRef(s)) {
|
|
3569
|
+
return s.value;
|
|
3570
|
+
} else if (isReactive(s)) {
|
|
3571
|
+
return traverse(s);
|
|
3572
|
+
} else if (isFunction(s)) {
|
|
3573
|
+
return callWithErrorHandling(s, instance, 2);
|
|
3574
|
+
} else
|
|
3575
|
+
;
|
|
3576
|
+
});
|
|
3577
|
+
} else if (isFunction(source)) {
|
|
3578
|
+
if (cb) {
|
|
3579
|
+
getter = () => callWithErrorHandling(source, instance, 2);
|
|
3580
|
+
} else {
|
|
3581
|
+
getter = () => {
|
|
3582
|
+
if (instance && instance.isUnmounted) {
|
|
3583
|
+
return;
|
|
3584
|
+
}
|
|
3585
|
+
if (cleanup) {
|
|
3586
|
+
cleanup();
|
|
3587
|
+
}
|
|
3588
|
+
return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]);
|
|
3589
|
+
};
|
|
3590
|
+
}
|
|
3591
|
+
} else {
|
|
3592
|
+
getter = NOOP;
|
|
3593
|
+
}
|
|
3594
|
+
if (cb && deep) {
|
|
3595
|
+
const baseGetter = getter;
|
|
3596
|
+
getter = () => traverse(baseGetter());
|
|
3597
|
+
}
|
|
3598
|
+
let cleanup;
|
|
3599
|
+
let onCleanup = (fn) => {
|
|
3600
|
+
cleanup = effect2.onStop = () => {
|
|
3601
|
+
callWithErrorHandling(fn, instance, 4);
|
|
3602
|
+
};
|
|
3603
|
+
};
|
|
3604
|
+
if (isInSSRComponentSetup) {
|
|
3605
|
+
onCleanup = NOOP;
|
|
3606
|
+
if (!cb) {
|
|
3607
|
+
getter();
|
|
3608
|
+
} else if (immediate) {
|
|
3609
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
3610
|
+
getter(),
|
|
3611
|
+
isMultiSource ? [] : void 0,
|
|
3612
|
+
onCleanup
|
|
3613
|
+
]);
|
|
3614
|
+
}
|
|
3615
|
+
return NOOP;
|
|
3616
|
+
}
|
|
3617
|
+
let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
|
|
3618
|
+
const job = () => {
|
|
3619
|
+
if (!effect2.active) {
|
|
3620
|
+
return;
|
|
3621
|
+
}
|
|
3622
|
+
if (cb) {
|
|
3623
|
+
const newValue = effect2.run();
|
|
3624
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i2) => hasChanged(v, oldValue[i2])) : hasChanged(newValue, oldValue)) || false) {
|
|
3625
|
+
if (cleanup) {
|
|
3626
|
+
cleanup();
|
|
3627
|
+
}
|
|
3628
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
3629
|
+
newValue,
|
|
3630
|
+
oldValue === INITIAL_WATCHER_VALUE ? void 0 : oldValue,
|
|
3631
|
+
onCleanup
|
|
3632
|
+
]);
|
|
3633
|
+
oldValue = newValue;
|
|
3634
|
+
}
|
|
3635
|
+
} else {
|
|
3636
|
+
effect2.run();
|
|
3637
|
+
}
|
|
3638
|
+
};
|
|
3639
|
+
job.allowRecurse = !!cb;
|
|
3640
|
+
let scheduler;
|
|
3641
|
+
if (flush === "sync") {
|
|
3642
|
+
scheduler = job;
|
|
3643
|
+
} else if (flush === "post") {
|
|
3644
|
+
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
3645
|
+
} else {
|
|
3646
|
+
scheduler = () => {
|
|
3647
|
+
if (!instance || instance.isMounted) {
|
|
3648
|
+
queuePreFlushCb(job);
|
|
3649
|
+
} else {
|
|
3650
|
+
job();
|
|
3651
|
+
}
|
|
3652
|
+
};
|
|
3653
|
+
}
|
|
3654
|
+
const effect2 = new ReactiveEffect(getter, scheduler);
|
|
3655
|
+
if (cb) {
|
|
3656
|
+
if (immediate) {
|
|
3657
|
+
job();
|
|
3658
|
+
} else {
|
|
3659
|
+
oldValue = effect2.run();
|
|
3660
|
+
}
|
|
3661
|
+
} else if (flush === "post") {
|
|
3662
|
+
queuePostRenderEffect(effect2.run.bind(effect2), instance && instance.suspense);
|
|
3663
|
+
} else {
|
|
3664
|
+
effect2.run();
|
|
3665
|
+
}
|
|
3666
|
+
return () => {
|
|
3667
|
+
effect2.stop();
|
|
3668
|
+
if (instance && instance.scope) {
|
|
3669
|
+
remove(instance.scope.effects, effect2);
|
|
3670
|
+
}
|
|
3671
|
+
};
|
|
3672
|
+
}
|
|
3673
|
+
function instanceWatch(source, value2, options) {
|
|
3674
|
+
const publicThis = this.proxy;
|
|
3675
|
+
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
3676
|
+
let cb;
|
|
3677
|
+
if (isFunction(value2)) {
|
|
3678
|
+
cb = value2;
|
|
3679
|
+
} else {
|
|
3680
|
+
cb = value2.handler;
|
|
3681
|
+
options = value2;
|
|
3682
|
+
}
|
|
3683
|
+
const cur = currentInstance;
|
|
3684
|
+
setCurrentInstance(this);
|
|
3685
|
+
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3686
|
+
if (cur) {
|
|
3687
|
+
setCurrentInstance(cur);
|
|
3688
|
+
} else {
|
|
3689
|
+
unsetCurrentInstance();
|
|
3690
|
+
}
|
|
3691
|
+
return res;
|
|
3692
|
+
}
|
|
3693
|
+
function createPathGetter(ctx, path) {
|
|
3694
|
+
const segments = path.split(".");
|
|
3695
|
+
return () => {
|
|
3696
|
+
let cur = ctx;
|
|
3697
|
+
for (let i2 = 0; i2 < segments.length && cur; i2++) {
|
|
3698
|
+
cur = cur[segments[i2]];
|
|
3699
|
+
}
|
|
3700
|
+
return cur;
|
|
3701
|
+
};
|
|
3702
|
+
}
|
|
3703
|
+
function traverse(value2, seen) {
|
|
3704
|
+
if (!isObject(value2) || value2["__v_skip"]) {
|
|
3705
|
+
return value2;
|
|
3706
|
+
}
|
|
3707
|
+
seen = seen || new Set();
|
|
3708
|
+
if (seen.has(value2)) {
|
|
3709
|
+
return value2;
|
|
3710
|
+
}
|
|
3711
|
+
seen.add(value2);
|
|
3712
|
+
if (isRef(value2)) {
|
|
3713
|
+
traverse(value2.value, seen);
|
|
3714
|
+
} else if (isArray(value2)) {
|
|
3715
|
+
for (let i2 = 0; i2 < value2.length; i2++) {
|
|
3716
|
+
traverse(value2[i2], seen);
|
|
3717
|
+
}
|
|
3718
|
+
} else if (isSet(value2) || isMap(value2)) {
|
|
3719
|
+
value2.forEach((v) => {
|
|
3720
|
+
traverse(v, seen);
|
|
3721
|
+
});
|
|
3722
|
+
} else if (isPlainObject$1(value2)) {
|
|
3723
|
+
for (const key2 in value2) {
|
|
3724
|
+
traverse(value2[key2], seen);
|
|
3725
|
+
}
|
|
3726
|
+
}
|
|
3727
|
+
return value2;
|
|
3728
|
+
}
|
|
3369
3729
|
function useTransitionState() {
|
|
3370
3730
|
const state = {
|
|
3371
3731
|
isMounted: false,
|
|
@@ -3410,9 +3770,17 @@ const BaseTransitionImpl = {
|
|
|
3410
3770
|
if (!children || !children.length) {
|
|
3411
3771
|
return;
|
|
3412
3772
|
}
|
|
3773
|
+
let child = children[0];
|
|
3774
|
+
if (children.length > 1) {
|
|
3775
|
+
for (const c of children) {
|
|
3776
|
+
if (c.type !== Comment) {
|
|
3777
|
+
child = c;
|
|
3778
|
+
break;
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
}
|
|
3413
3782
|
const rawProps = toRaw(props);
|
|
3414
3783
|
const { mode } = rawProps;
|
|
3415
|
-
const child = children[0];
|
|
3416
3784
|
if (state.isLeaving) {
|
|
3417
3785
|
return emptyPlaceholder(child);
|
|
3418
3786
|
}
|
|
@@ -3598,17 +3966,18 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
3598
3966
|
vnode.transition = hooks;
|
|
3599
3967
|
}
|
|
3600
3968
|
}
|
|
3601
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
3969
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
3602
3970
|
let ret = [];
|
|
3603
3971
|
let keyedFragmentCount = 0;
|
|
3604
3972
|
for (let i2 = 0; i2 < children.length; i2++) {
|
|
3605
|
-
|
|
3973
|
+
let child = children[i2];
|
|
3974
|
+
const key2 = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i2);
|
|
3606
3975
|
if (child.type === Fragment) {
|
|
3607
3976
|
if (child.patchFlag & 128)
|
|
3608
3977
|
keyedFragmentCount++;
|
|
3609
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
3978
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key2));
|
|
3610
3979
|
} else if (keepComment || child.type !== Comment) {
|
|
3611
|
-
ret.push(child);
|
|
3980
|
+
ret.push(key2 != null ? cloneVNode(child, { key: key2 }) : child);
|
|
3612
3981
|
}
|
|
3613
3982
|
}
|
|
3614
3983
|
if (keyedFragmentCount > 1) {
|
|
@@ -4022,6 +4391,9 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
4022
4391
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
4023
4392
|
for (let i2 = 0; i2 < propsToUpdate.length; i2++) {
|
|
4024
4393
|
let key2 = propsToUpdate[i2];
|
|
4394
|
+
if (isEmitListener(instance.emitsOptions, key2)) {
|
|
4395
|
+
continue;
|
|
4396
|
+
}
|
|
4025
4397
|
const value2 = rawProps[key2];
|
|
4026
4398
|
if (options) {
|
|
4027
4399
|
if (hasOwn(attrs, key2)) {
|
|
@@ -4059,7 +4431,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
4059
4431
|
}
|
|
4060
4432
|
if (attrs !== rawCurrentProps) {
|
|
4061
4433
|
for (const key2 in attrs) {
|
|
4062
|
-
if (!rawProps || !hasOwn(rawProps, key2)) {
|
|
4434
|
+
if (!rawProps || !hasOwn(rawProps, key2) && true) {
|
|
4063
4435
|
delete attrs[key2];
|
|
4064
4436
|
hasAttrsChanged = true;
|
|
4065
4437
|
}
|
|
@@ -4088,7 +4460,7 @@ function setFullProps(instance, rawProps, props, attrs) {
|
|
|
4088
4460
|
(rawCastValues || (rawCastValues = {}))[camelKey] = value2;
|
|
4089
4461
|
}
|
|
4090
4462
|
} else if (!isEmitListener(instance.emitsOptions, key2)) {
|
|
4091
|
-
if (value2 !== attrs[key2]) {
|
|
4463
|
+
if (!(key2 in attrs) || value2 !== attrs[key2]) {
|
|
4092
4464
|
attrs[key2] = value2;
|
|
4093
4465
|
hasAttrsChanged = true;
|
|
4094
4466
|
}
|
|
@@ -4297,7 +4669,7 @@ function withDirectives(vnode, directives) {
|
|
|
4297
4669
|
if (internalInstance === null) {
|
|
4298
4670
|
return vnode;
|
|
4299
4671
|
}
|
|
4300
|
-
const instance = internalInstance.proxy;
|
|
4672
|
+
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
|
4301
4673
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
4302
4674
|
for (let i2 = 0; i2 < directives.length; i2++) {
|
|
4303
4675
|
let [dir, value2, arg, modifiers = EMPTY_OBJ] = directives[i2];
|
|
@@ -4366,6 +4738,9 @@ function createAppContext() {
|
|
|
4366
4738
|
let uid = 0;
|
|
4367
4739
|
function createAppAPI(render2, hydrate) {
|
|
4368
4740
|
return function createApp2(rootComponent, rootProps = null) {
|
|
4741
|
+
if (!isFunction(rootComponent)) {
|
|
4742
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
4743
|
+
}
|
|
4369
4744
|
if (rootProps != null && !isObject(rootProps)) {
|
|
4370
4745
|
rootProps = null;
|
|
4371
4746
|
}
|
|
@@ -4449,6 +4824,78 @@ function createAppAPI(render2, hydrate) {
|
|
|
4449
4824
|
return app;
|
|
4450
4825
|
};
|
|
4451
4826
|
}
|
|
4827
|
+
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
4828
|
+
if (isArray(rawRef)) {
|
|
4829
|
+
rawRef.forEach((r, i2) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i2] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
4830
|
+
return;
|
|
4831
|
+
}
|
|
4832
|
+
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
4833
|
+
return;
|
|
4834
|
+
}
|
|
4835
|
+
const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
|
|
4836
|
+
const value2 = isUnmount ? null : refValue;
|
|
4837
|
+
const { i: owner, r: ref2 } = rawRef;
|
|
4838
|
+
const oldRef = oldRawRef && oldRawRef.r;
|
|
4839
|
+
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
4840
|
+
const setupState = owner.setupState;
|
|
4841
|
+
if (oldRef != null && oldRef !== ref2) {
|
|
4842
|
+
if (isString(oldRef)) {
|
|
4843
|
+
refs[oldRef] = null;
|
|
4844
|
+
if (hasOwn(setupState, oldRef)) {
|
|
4845
|
+
setupState[oldRef] = null;
|
|
4846
|
+
}
|
|
4847
|
+
} else if (isRef(oldRef)) {
|
|
4848
|
+
oldRef.value = null;
|
|
4849
|
+
}
|
|
4850
|
+
}
|
|
4851
|
+
if (isFunction(ref2)) {
|
|
4852
|
+
callWithErrorHandling(ref2, owner, 12, [value2, refs]);
|
|
4853
|
+
} else {
|
|
4854
|
+
const _isString = isString(ref2);
|
|
4855
|
+
const _isRef = isRef(ref2);
|
|
4856
|
+
if (_isString || _isRef) {
|
|
4857
|
+
const doSet = () => {
|
|
4858
|
+
if (rawRef.f) {
|
|
4859
|
+
const existing = _isString ? refs[ref2] : ref2.value;
|
|
4860
|
+
if (isUnmount) {
|
|
4861
|
+
isArray(existing) && remove(existing, refValue);
|
|
4862
|
+
} else {
|
|
4863
|
+
if (!isArray(existing)) {
|
|
4864
|
+
if (_isString) {
|
|
4865
|
+
refs[ref2] = [refValue];
|
|
4866
|
+
if (hasOwn(setupState, ref2)) {
|
|
4867
|
+
setupState[ref2] = refs[ref2];
|
|
4868
|
+
}
|
|
4869
|
+
} else {
|
|
4870
|
+
ref2.value = [refValue];
|
|
4871
|
+
if (rawRef.k)
|
|
4872
|
+
refs[rawRef.k] = ref2.value;
|
|
4873
|
+
}
|
|
4874
|
+
} else if (!existing.includes(refValue)) {
|
|
4875
|
+
existing.push(refValue);
|
|
4876
|
+
}
|
|
4877
|
+
}
|
|
4878
|
+
} else if (_isString) {
|
|
4879
|
+
refs[ref2] = value2;
|
|
4880
|
+
if (hasOwn(setupState, ref2)) {
|
|
4881
|
+
setupState[ref2] = value2;
|
|
4882
|
+
}
|
|
4883
|
+
} else if (isRef(ref2)) {
|
|
4884
|
+
ref2.value = value2;
|
|
4885
|
+
if (rawRef.k)
|
|
4886
|
+
refs[rawRef.k] = value2;
|
|
4887
|
+
} else
|
|
4888
|
+
;
|
|
4889
|
+
};
|
|
4890
|
+
if (value2) {
|
|
4891
|
+
doSet.id = -1;
|
|
4892
|
+
queuePostRenderEffect(doSet, parentSuspense);
|
|
4893
|
+
} else {
|
|
4894
|
+
doSet();
|
|
4895
|
+
}
|
|
4896
|
+
}
|
|
4897
|
+
}
|
|
4898
|
+
}
|
|
4452
4899
|
const queuePostRenderEffect = queueEffectWithSuspense;
|
|
4453
4900
|
function createRenderer(options) {
|
|
4454
4901
|
return baseCreateRenderer(options);
|
|
@@ -4520,7 +4967,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4520
4967
|
}
|
|
4521
4968
|
};
|
|
4522
4969
|
const mountStaticNode = (n2, container2, anchor, isSVG) => {
|
|
4523
|
-
[n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container2, anchor, isSVG);
|
|
4970
|
+
[n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container2, anchor, isSVG, n2.el, n2.anchor);
|
|
4524
4971
|
};
|
|
4525
4972
|
const moveStaticNode = ({ el, anchor }, container2, nextSibling) => {
|
|
4526
4973
|
let next2;
|
|
@@ -4625,12 +5072,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4625
5072
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
4626
5073
|
const newProps = n2.props || EMPTY_OBJ;
|
|
4627
5074
|
let vnodeHook;
|
|
5075
|
+
parentComponent && toggleRecurse(parentComponent, false);
|
|
4628
5076
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) {
|
|
4629
5077
|
invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
4630
5078
|
}
|
|
4631
5079
|
if (dirs) {
|
|
4632
5080
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
4633
5081
|
}
|
|
5082
|
+
parentComponent && toggleRecurse(parentComponent, true);
|
|
4634
5083
|
const areChildrenSVG = isSVG && n2.type !== "foreignObject";
|
|
4635
5084
|
if (dynamicChildren) {
|
|
4636
5085
|
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
@@ -4783,14 +5232,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4783
5232
|
const { el, props } = initialVNode;
|
|
4784
5233
|
const { bm, m, parent: parent2 } = instance;
|
|
4785
5234
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
4786
|
-
|
|
5235
|
+
toggleRecurse(instance, false);
|
|
4787
5236
|
if (bm) {
|
|
4788
5237
|
invokeArrayFns(bm);
|
|
4789
5238
|
}
|
|
4790
5239
|
if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
4791
5240
|
invokeVNodeHook(vnodeHook, parent2, initialVNode);
|
|
4792
5241
|
}
|
|
4793
|
-
|
|
5242
|
+
toggleRecurse(instance, true);
|
|
4794
5243
|
if (el && hydrateNode) {
|
|
4795
5244
|
const hydrateSubTree = () => {
|
|
4796
5245
|
instance.subTree = renderComponentRoot(instance);
|
|
@@ -4822,7 +5271,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4822
5271
|
let { next: next2, bu, u, parent: parent2, vnode } = instance;
|
|
4823
5272
|
let originNext = next2;
|
|
4824
5273
|
let vnodeHook;
|
|
4825
|
-
|
|
5274
|
+
toggleRecurse(instance, false);
|
|
4826
5275
|
if (next2) {
|
|
4827
5276
|
next2.el = vnode.el;
|
|
4828
5277
|
updateComponentPreRender(instance, next2, optimized);
|
|
@@ -4835,7 +5284,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4835
5284
|
if (vnodeHook = next2.props && next2.props.onVnodeBeforeUpdate) {
|
|
4836
5285
|
invokeVNodeHook(vnodeHook, parent2, next2, vnode);
|
|
4837
5286
|
}
|
|
4838
|
-
|
|
5287
|
+
toggleRecurse(instance, true);
|
|
4839
5288
|
const nextTree = renderComponentRoot(instance);
|
|
4840
5289
|
const prevTree = instance.subTree;
|
|
4841
5290
|
instance.subTree = nextTree;
|
|
@@ -4852,10 +5301,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4852
5301
|
}
|
|
4853
5302
|
}
|
|
4854
5303
|
};
|
|
4855
|
-
const effect2 = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope);
|
|
5304
|
+
const effect2 = instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope);
|
|
4856
5305
|
const update = instance.update = effect2.run.bind(effect2);
|
|
4857
5306
|
update.id = instance.uid;
|
|
4858
|
-
|
|
5307
|
+
toggleRecurse(instance, true);
|
|
4859
5308
|
update();
|
|
4860
5309
|
};
|
|
4861
5310
|
const updateComponentPreRender = (instance, nextVNode, optimized) => {
|
|
@@ -5127,7 +5576,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5127
5576
|
const remove2 = (vnode) => {
|
|
5128
5577
|
const { type, el, anchor, transition } = vnode;
|
|
5129
5578
|
if (type === Fragment) {
|
|
5130
|
-
|
|
5579
|
+
{
|
|
5580
|
+
removeFragment(el, anchor);
|
|
5581
|
+
}
|
|
5131
5582
|
return;
|
|
5132
5583
|
}
|
|
5133
5584
|
if (type === Static) {
|
|
@@ -5232,65 +5683,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5232
5683
|
createApp: createAppAPI(render2, hydrate)
|
|
5233
5684
|
};
|
|
5234
5685
|
}
|
|
5235
|
-
function
|
|
5236
|
-
|
|
5237
|
-
rawRef.forEach((r, i2) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i2] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
5238
|
-
return;
|
|
5239
|
-
}
|
|
5240
|
-
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
5241
|
-
return;
|
|
5242
|
-
}
|
|
5243
|
-
const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
|
|
5244
|
-
const value2 = isUnmount ? null : refValue;
|
|
5245
|
-
const { i: owner, r: ref2 } = rawRef;
|
|
5246
|
-
const oldRef = oldRawRef && oldRawRef.r;
|
|
5247
|
-
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
5248
|
-
const setupState = owner.setupState;
|
|
5249
|
-
if (oldRef != null && oldRef !== ref2) {
|
|
5250
|
-
if (isString(oldRef)) {
|
|
5251
|
-
refs[oldRef] = null;
|
|
5252
|
-
if (hasOwn(setupState, oldRef)) {
|
|
5253
|
-
setupState[oldRef] = null;
|
|
5254
|
-
}
|
|
5255
|
-
} else if (isRef(oldRef)) {
|
|
5256
|
-
oldRef.value = null;
|
|
5257
|
-
}
|
|
5258
|
-
}
|
|
5259
|
-
if (isString(ref2)) {
|
|
5260
|
-
const doSet = () => {
|
|
5261
|
-
{
|
|
5262
|
-
refs[ref2] = value2;
|
|
5263
|
-
}
|
|
5264
|
-
if (hasOwn(setupState, ref2)) {
|
|
5265
|
-
setupState[ref2] = value2;
|
|
5266
|
-
}
|
|
5267
|
-
};
|
|
5268
|
-
if (value2) {
|
|
5269
|
-
doSet.id = -1;
|
|
5270
|
-
queuePostRenderEffect(doSet, parentSuspense);
|
|
5271
|
-
} else {
|
|
5272
|
-
doSet();
|
|
5273
|
-
}
|
|
5274
|
-
} else if (isRef(ref2)) {
|
|
5275
|
-
const doSet = () => {
|
|
5276
|
-
ref2.value = value2;
|
|
5277
|
-
};
|
|
5278
|
-
if (value2) {
|
|
5279
|
-
doSet.id = -1;
|
|
5280
|
-
queuePostRenderEffect(doSet, parentSuspense);
|
|
5281
|
-
} else {
|
|
5282
|
-
doSet();
|
|
5283
|
-
}
|
|
5284
|
-
} else if (isFunction(ref2)) {
|
|
5285
|
-
callWithErrorHandling(ref2, owner, 12, [value2, refs]);
|
|
5286
|
-
} else
|
|
5287
|
-
;
|
|
5288
|
-
}
|
|
5289
|
-
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
5290
|
-
callWithAsyncErrorHandling(hook, instance, 7, [
|
|
5291
|
-
vnode,
|
|
5292
|
-
prevVNode
|
|
5293
|
-
]);
|
|
5686
|
+
function toggleRecurse({ effect: effect2, update }, allowed) {
|
|
5687
|
+
effect2.allowRecurse = update.allowRecurse = allowed;
|
|
5294
5688
|
}
|
|
5295
5689
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
5296
5690
|
const ch1 = n1.children;
|
|
@@ -5548,8 +5942,8 @@ function isSameVNodeType(n1, n2) {
|
|
|
5548
5942
|
}
|
|
5549
5943
|
const InternalObjectKey = `__vInternal`;
|
|
5550
5944
|
const normalizeKey = ({ key: key2 }) => key2 != null ? key2 : null;
|
|
5551
|
-
const normalizeRef = ({ ref: ref2 }) => {
|
|
5552
|
-
return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2 } : ref2 : null;
|
|
5945
|
+
const normalizeRef = ({ ref: ref2, ref_key, ref_for }) => {
|
|
5946
|
+
return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
|
|
5553
5947
|
};
|
|
5554
5948
|
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
5555
5949
|
const vnode = {
|
|
@@ -5739,7 +6133,7 @@ function mergeProps(...args) {
|
|
|
5739
6133
|
} else if (isOn(key2)) {
|
|
5740
6134
|
const existing = ret[key2];
|
|
5741
6135
|
const incoming = toMerge[key2];
|
|
5742
|
-
if (existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
6136
|
+
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
5743
6137
|
ret[key2] = existing ? [].concat(existing, incoming) : incoming;
|
|
5744
6138
|
}
|
|
5745
6139
|
} else if (key2 !== "") {
|
|
@@ -5749,6 +6143,12 @@ function mergeProps(...args) {
|
|
|
5749
6143
|
}
|
|
5750
6144
|
return ret;
|
|
5751
6145
|
}
|
|
6146
|
+
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
6147
|
+
callWithAsyncErrorHandling(hook, instance, 7, [
|
|
6148
|
+
vnode,
|
|
6149
|
+
prevVNode
|
|
6150
|
+
]);
|
|
6151
|
+
}
|
|
5752
6152
|
function renderList(source, renderItem, cache, index2) {
|
|
5753
6153
|
let ret;
|
|
5754
6154
|
const cached = cache && cache[index2];
|
|
@@ -5782,7 +6182,7 @@ function renderList(source, renderItem, cache, index2) {
|
|
|
5782
6182
|
return ret;
|
|
5783
6183
|
}
|
|
5784
6184
|
function renderSlot(slots, name2, props = {}, fallback, noSlotted) {
|
|
5785
|
-
if (currentRenderingInstance.isCE) {
|
|
6185
|
+
if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
|
|
5786
6186
|
return createVNode("slot", name2 === "default" ? null : { name: name2 }, fallback && fallback());
|
|
5787
6187
|
}
|
|
5788
6188
|
let slot = slots[name2];
|
|
@@ -5818,7 +6218,7 @@ const getPublicInstance = (i2) => {
|
|
|
5818
6218
|
return getExposeProxy(i2) || i2.proxy;
|
|
5819
6219
|
return getPublicInstance(i2.parent);
|
|
5820
6220
|
};
|
|
5821
|
-
const publicPropertiesMap = extend(Object.create(null), {
|
|
6221
|
+
const publicPropertiesMap = /* @__PURE__ */ extend(Object.create(null), {
|
|
5822
6222
|
$: (i2) => i2,
|
|
5823
6223
|
$el: (i2) => i2.vnode.el,
|
|
5824
6224
|
$data: (i2) => i2.data,
|
|
@@ -5890,8 +6290,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
5890
6290
|
const { data: data2, setupState, ctx } = instance;
|
|
5891
6291
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key2)) {
|
|
5892
6292
|
setupState[key2] = value2;
|
|
6293
|
+
return true;
|
|
5893
6294
|
} else if (data2 !== EMPTY_OBJ && hasOwn(data2, key2)) {
|
|
5894
6295
|
data2[key2] = value2;
|
|
6296
|
+
return true;
|
|
5895
6297
|
} else if (hasOwn(instance.props, key2)) {
|
|
5896
6298
|
return false;
|
|
5897
6299
|
}
|
|
@@ -5907,6 +6309,14 @@ const PublicInstanceProxyHandlers = {
|
|
|
5907
6309
|
has({ _: { data: data2, setupState, accessCache, ctx, appContext, propsOptions } }, key2) {
|
|
5908
6310
|
let normalizedProps;
|
|
5909
6311
|
return !!accessCache[key2] || data2 !== EMPTY_OBJ && hasOwn(data2, key2) || setupState !== EMPTY_OBJ && hasOwn(setupState, key2) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key2) || hasOwn(ctx, key2) || hasOwn(publicPropertiesMap, key2) || hasOwn(appContext.config.globalProperties, key2);
|
|
6312
|
+
},
|
|
6313
|
+
defineProperty(target, key2, descriptor) {
|
|
6314
|
+
if (descriptor.get != null) {
|
|
6315
|
+
target._.accessCache[key2] = 0;
|
|
6316
|
+
} else if (hasOwn(descriptor, "value")) {
|
|
6317
|
+
this.set(target, key2, descriptor.value, null);
|
|
6318
|
+
}
|
|
6319
|
+
return Reflect.defineProperty(target, key2, descriptor);
|
|
5910
6320
|
}
|
|
5911
6321
|
};
|
|
5912
6322
|
const emptyAppContext = createAppContext();
|
|
@@ -5923,6 +6333,7 @@ function createComponentInstance(vnode, parent2, suspense) {
|
|
|
5923
6333
|
root: null,
|
|
5924
6334
|
next: null,
|
|
5925
6335
|
subTree: null,
|
|
6336
|
+
effect: null,
|
|
5926
6337
|
update: null,
|
|
5927
6338
|
scope: new EffectScope(true),
|
|
5928
6339
|
render: null,
|
|
@@ -6117,364 +6528,9 @@ function getComponentName(Component) {
|
|
|
6117
6528
|
function isClassComponent(value2) {
|
|
6118
6529
|
return isFunction(value2) && "__vccOpts" in value2;
|
|
6119
6530
|
}
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
res = args ? fn(...args) : fn();
|
|
6124
|
-
} catch (err) {
|
|
6125
|
-
handleError(err, instance, type);
|
|
6126
|
-
}
|
|
6127
|
-
return res;
|
|
6128
|
-
}
|
|
6129
|
-
function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
6130
|
-
if (isFunction(fn)) {
|
|
6131
|
-
const res = callWithErrorHandling(fn, instance, type, args);
|
|
6132
|
-
if (res && isPromise(res)) {
|
|
6133
|
-
res.catch((err) => {
|
|
6134
|
-
handleError(err, instance, type);
|
|
6135
|
-
});
|
|
6136
|
-
}
|
|
6137
|
-
return res;
|
|
6138
|
-
}
|
|
6139
|
-
const values = [];
|
|
6140
|
-
for (let i2 = 0; i2 < fn.length; i2++) {
|
|
6141
|
-
values.push(callWithAsyncErrorHandling(fn[i2], instance, type, args));
|
|
6142
|
-
}
|
|
6143
|
-
return values;
|
|
6144
|
-
}
|
|
6145
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
6146
|
-
const contextVNode = instance ? instance.vnode : null;
|
|
6147
|
-
if (instance) {
|
|
6148
|
-
let cur = instance.parent;
|
|
6149
|
-
const exposedInstance = instance.proxy;
|
|
6150
|
-
const errorInfo = type;
|
|
6151
|
-
while (cur) {
|
|
6152
|
-
const errorCapturedHooks = cur.ec;
|
|
6153
|
-
if (errorCapturedHooks) {
|
|
6154
|
-
for (let i2 = 0; i2 < errorCapturedHooks.length; i2++) {
|
|
6155
|
-
if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) {
|
|
6156
|
-
return;
|
|
6157
|
-
}
|
|
6158
|
-
}
|
|
6159
|
-
}
|
|
6160
|
-
cur = cur.parent;
|
|
6161
|
-
}
|
|
6162
|
-
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
6163
|
-
if (appErrorHandler) {
|
|
6164
|
-
callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
|
|
6165
|
-
return;
|
|
6166
|
-
}
|
|
6167
|
-
}
|
|
6168
|
-
logError(err, type, contextVNode, throwInDev);
|
|
6169
|
-
}
|
|
6170
|
-
function logError(err, type, contextVNode, throwInDev = true) {
|
|
6171
|
-
{
|
|
6172
|
-
console.error(err);
|
|
6173
|
-
}
|
|
6174
|
-
}
|
|
6175
|
-
let isFlushing = false;
|
|
6176
|
-
let isFlushPending = false;
|
|
6177
|
-
const queue = [];
|
|
6178
|
-
let flushIndex = 0;
|
|
6179
|
-
const pendingPreFlushCbs = [];
|
|
6180
|
-
let activePreFlushCbs = null;
|
|
6181
|
-
let preFlushIndex = 0;
|
|
6182
|
-
const pendingPostFlushCbs = [];
|
|
6183
|
-
let activePostFlushCbs = null;
|
|
6184
|
-
let postFlushIndex = 0;
|
|
6185
|
-
const resolvedPromise = Promise.resolve();
|
|
6186
|
-
let currentFlushPromise = null;
|
|
6187
|
-
let currentPreFlushParentJob = null;
|
|
6188
|
-
function nextTick(fn) {
|
|
6189
|
-
const p2 = currentFlushPromise || resolvedPromise;
|
|
6190
|
-
return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
|
|
6191
|
-
}
|
|
6192
|
-
function findInsertionIndex(id) {
|
|
6193
|
-
let start = flushIndex + 1;
|
|
6194
|
-
let end = queue.length;
|
|
6195
|
-
while (start < end) {
|
|
6196
|
-
const middle = start + end >>> 1;
|
|
6197
|
-
const middleJobId = getId(queue[middle]);
|
|
6198
|
-
middleJobId < id ? start = middle + 1 : end = middle;
|
|
6199
|
-
}
|
|
6200
|
-
return start;
|
|
6201
|
-
}
|
|
6202
|
-
function queueJob(job) {
|
|
6203
|
-
if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) {
|
|
6204
|
-
if (job.id == null) {
|
|
6205
|
-
queue.push(job);
|
|
6206
|
-
} else {
|
|
6207
|
-
queue.splice(findInsertionIndex(job.id), 0, job);
|
|
6208
|
-
}
|
|
6209
|
-
queueFlush();
|
|
6210
|
-
}
|
|
6211
|
-
}
|
|
6212
|
-
function queueFlush() {
|
|
6213
|
-
if (!isFlushing && !isFlushPending) {
|
|
6214
|
-
isFlushPending = true;
|
|
6215
|
-
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
6216
|
-
}
|
|
6217
|
-
}
|
|
6218
|
-
function invalidateJob(job) {
|
|
6219
|
-
const i2 = queue.indexOf(job);
|
|
6220
|
-
if (i2 > flushIndex) {
|
|
6221
|
-
queue.splice(i2, 1);
|
|
6222
|
-
}
|
|
6223
|
-
}
|
|
6224
|
-
function queueCb(cb, activeQueue, pendingQueue, index2) {
|
|
6225
|
-
if (!isArray(cb)) {
|
|
6226
|
-
if (!activeQueue || !activeQueue.includes(cb, cb.allowRecurse ? index2 + 1 : index2)) {
|
|
6227
|
-
pendingQueue.push(cb);
|
|
6228
|
-
}
|
|
6229
|
-
} else {
|
|
6230
|
-
pendingQueue.push(...cb);
|
|
6231
|
-
}
|
|
6232
|
-
queueFlush();
|
|
6233
|
-
}
|
|
6234
|
-
function queuePreFlushCb(cb) {
|
|
6235
|
-
queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);
|
|
6236
|
-
}
|
|
6237
|
-
function queuePostFlushCb(cb) {
|
|
6238
|
-
queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);
|
|
6239
|
-
}
|
|
6240
|
-
function flushPreFlushCbs(seen, parentJob = null) {
|
|
6241
|
-
if (pendingPreFlushCbs.length) {
|
|
6242
|
-
currentPreFlushParentJob = parentJob;
|
|
6243
|
-
activePreFlushCbs = [...new Set(pendingPreFlushCbs)];
|
|
6244
|
-
pendingPreFlushCbs.length = 0;
|
|
6245
|
-
for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {
|
|
6246
|
-
activePreFlushCbs[preFlushIndex]();
|
|
6247
|
-
}
|
|
6248
|
-
activePreFlushCbs = null;
|
|
6249
|
-
preFlushIndex = 0;
|
|
6250
|
-
currentPreFlushParentJob = null;
|
|
6251
|
-
flushPreFlushCbs(seen, parentJob);
|
|
6252
|
-
}
|
|
6253
|
-
}
|
|
6254
|
-
function flushPostFlushCbs(seen) {
|
|
6255
|
-
if (pendingPostFlushCbs.length) {
|
|
6256
|
-
const deduped = [...new Set(pendingPostFlushCbs)];
|
|
6257
|
-
pendingPostFlushCbs.length = 0;
|
|
6258
|
-
if (activePostFlushCbs) {
|
|
6259
|
-
activePostFlushCbs.push(...deduped);
|
|
6260
|
-
return;
|
|
6261
|
-
}
|
|
6262
|
-
activePostFlushCbs = deduped;
|
|
6263
|
-
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
6264
|
-
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
6265
|
-
activePostFlushCbs[postFlushIndex]();
|
|
6266
|
-
}
|
|
6267
|
-
activePostFlushCbs = null;
|
|
6268
|
-
postFlushIndex = 0;
|
|
6269
|
-
}
|
|
6270
|
-
}
|
|
6271
|
-
const getId = (job) => job.id == null ? Infinity : job.id;
|
|
6272
|
-
function flushJobs(seen) {
|
|
6273
|
-
isFlushPending = false;
|
|
6274
|
-
isFlushing = true;
|
|
6275
|
-
flushPreFlushCbs(seen);
|
|
6276
|
-
queue.sort((a, b) => getId(a) - getId(b));
|
|
6277
|
-
const check = NOOP;
|
|
6278
|
-
try {
|
|
6279
|
-
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
6280
|
-
const job = queue[flushIndex];
|
|
6281
|
-
if (job && job.active !== false) {
|
|
6282
|
-
if (false)
|
|
6283
|
-
;
|
|
6284
|
-
callWithErrorHandling(job, null, 14);
|
|
6285
|
-
}
|
|
6286
|
-
}
|
|
6287
|
-
} finally {
|
|
6288
|
-
flushIndex = 0;
|
|
6289
|
-
queue.length = 0;
|
|
6290
|
-
flushPostFlushCbs();
|
|
6291
|
-
isFlushing = false;
|
|
6292
|
-
currentFlushPromise = null;
|
|
6293
|
-
if (queue.length || pendingPreFlushCbs.length || pendingPostFlushCbs.length) {
|
|
6294
|
-
flushJobs(seen);
|
|
6295
|
-
}
|
|
6296
|
-
}
|
|
6297
|
-
}
|
|
6298
|
-
const INITIAL_WATCHER_VALUE = {};
|
|
6299
|
-
function watch(source, cb, options) {
|
|
6300
|
-
return doWatch(source, cb, options);
|
|
6301
|
-
}
|
|
6302
|
-
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
|
|
6303
|
-
const instance = currentInstance;
|
|
6304
|
-
let getter;
|
|
6305
|
-
let forceTrigger = false;
|
|
6306
|
-
let isMultiSource = false;
|
|
6307
|
-
if (isRef(source)) {
|
|
6308
|
-
getter = () => source.value;
|
|
6309
|
-
forceTrigger = !!source._shallow;
|
|
6310
|
-
} else if (isReactive(source)) {
|
|
6311
|
-
getter = () => source;
|
|
6312
|
-
deep = true;
|
|
6313
|
-
} else if (isArray(source)) {
|
|
6314
|
-
isMultiSource = true;
|
|
6315
|
-
forceTrigger = source.some(isReactive);
|
|
6316
|
-
getter = () => source.map((s) => {
|
|
6317
|
-
if (isRef(s)) {
|
|
6318
|
-
return s.value;
|
|
6319
|
-
} else if (isReactive(s)) {
|
|
6320
|
-
return traverse(s);
|
|
6321
|
-
} else if (isFunction(s)) {
|
|
6322
|
-
return callWithErrorHandling(s, instance, 2);
|
|
6323
|
-
} else
|
|
6324
|
-
;
|
|
6325
|
-
});
|
|
6326
|
-
} else if (isFunction(source)) {
|
|
6327
|
-
if (cb) {
|
|
6328
|
-
getter = () => callWithErrorHandling(source, instance, 2);
|
|
6329
|
-
} else {
|
|
6330
|
-
getter = () => {
|
|
6331
|
-
if (instance && instance.isUnmounted) {
|
|
6332
|
-
return;
|
|
6333
|
-
}
|
|
6334
|
-
if (cleanup) {
|
|
6335
|
-
cleanup();
|
|
6336
|
-
}
|
|
6337
|
-
return callWithAsyncErrorHandling(source, instance, 3, [onInvalidate]);
|
|
6338
|
-
};
|
|
6339
|
-
}
|
|
6340
|
-
} else {
|
|
6341
|
-
getter = NOOP;
|
|
6342
|
-
}
|
|
6343
|
-
if (cb && deep) {
|
|
6344
|
-
const baseGetter = getter;
|
|
6345
|
-
getter = () => traverse(baseGetter());
|
|
6346
|
-
}
|
|
6347
|
-
let cleanup;
|
|
6348
|
-
let onInvalidate = (fn) => {
|
|
6349
|
-
cleanup = effect2.onStop = () => {
|
|
6350
|
-
callWithErrorHandling(fn, instance, 4);
|
|
6351
|
-
};
|
|
6352
|
-
};
|
|
6353
|
-
if (isInSSRComponentSetup) {
|
|
6354
|
-
onInvalidate = NOOP;
|
|
6355
|
-
if (!cb) {
|
|
6356
|
-
getter();
|
|
6357
|
-
} else if (immediate) {
|
|
6358
|
-
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
6359
|
-
getter(),
|
|
6360
|
-
isMultiSource ? [] : void 0,
|
|
6361
|
-
onInvalidate
|
|
6362
|
-
]);
|
|
6363
|
-
}
|
|
6364
|
-
return NOOP;
|
|
6365
|
-
}
|
|
6366
|
-
let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
|
|
6367
|
-
const job = () => {
|
|
6368
|
-
if (!effect2.active) {
|
|
6369
|
-
return;
|
|
6370
|
-
}
|
|
6371
|
-
if (cb) {
|
|
6372
|
-
const newValue = effect2.run();
|
|
6373
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i2) => hasChanged(v, oldValue[i2])) : hasChanged(newValue, oldValue)) || false) {
|
|
6374
|
-
if (cleanup) {
|
|
6375
|
-
cleanup();
|
|
6376
|
-
}
|
|
6377
|
-
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
6378
|
-
newValue,
|
|
6379
|
-
oldValue === INITIAL_WATCHER_VALUE ? void 0 : oldValue,
|
|
6380
|
-
onInvalidate
|
|
6381
|
-
]);
|
|
6382
|
-
oldValue = newValue;
|
|
6383
|
-
}
|
|
6384
|
-
} else {
|
|
6385
|
-
effect2.run();
|
|
6386
|
-
}
|
|
6387
|
-
};
|
|
6388
|
-
job.allowRecurse = !!cb;
|
|
6389
|
-
let scheduler;
|
|
6390
|
-
if (flush === "sync") {
|
|
6391
|
-
scheduler = job;
|
|
6392
|
-
} else if (flush === "post") {
|
|
6393
|
-
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
6394
|
-
} else {
|
|
6395
|
-
scheduler = () => {
|
|
6396
|
-
if (!instance || instance.isMounted) {
|
|
6397
|
-
queuePreFlushCb(job);
|
|
6398
|
-
} else {
|
|
6399
|
-
job();
|
|
6400
|
-
}
|
|
6401
|
-
};
|
|
6402
|
-
}
|
|
6403
|
-
const effect2 = new ReactiveEffect(getter, scheduler);
|
|
6404
|
-
if (cb) {
|
|
6405
|
-
if (immediate) {
|
|
6406
|
-
job();
|
|
6407
|
-
} else {
|
|
6408
|
-
oldValue = effect2.run();
|
|
6409
|
-
}
|
|
6410
|
-
} else if (flush === "post") {
|
|
6411
|
-
queuePostRenderEffect(effect2.run.bind(effect2), instance && instance.suspense);
|
|
6412
|
-
} else {
|
|
6413
|
-
effect2.run();
|
|
6414
|
-
}
|
|
6415
|
-
return () => {
|
|
6416
|
-
effect2.stop();
|
|
6417
|
-
if (instance && instance.scope) {
|
|
6418
|
-
remove(instance.scope.effects, effect2);
|
|
6419
|
-
}
|
|
6420
|
-
};
|
|
6421
|
-
}
|
|
6422
|
-
function instanceWatch(source, value2, options) {
|
|
6423
|
-
const publicThis = this.proxy;
|
|
6424
|
-
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
6425
|
-
let cb;
|
|
6426
|
-
if (isFunction(value2)) {
|
|
6427
|
-
cb = value2;
|
|
6428
|
-
} else {
|
|
6429
|
-
cb = value2.handler;
|
|
6430
|
-
options = value2;
|
|
6431
|
-
}
|
|
6432
|
-
const cur = currentInstance;
|
|
6433
|
-
setCurrentInstance(this);
|
|
6434
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
6435
|
-
if (cur) {
|
|
6436
|
-
setCurrentInstance(cur);
|
|
6437
|
-
} else {
|
|
6438
|
-
unsetCurrentInstance();
|
|
6439
|
-
}
|
|
6440
|
-
return res;
|
|
6441
|
-
}
|
|
6442
|
-
function createPathGetter(ctx, path) {
|
|
6443
|
-
const segments = path.split(".");
|
|
6444
|
-
return () => {
|
|
6445
|
-
let cur = ctx;
|
|
6446
|
-
for (let i2 = 0; i2 < segments.length && cur; i2++) {
|
|
6447
|
-
cur = cur[segments[i2]];
|
|
6448
|
-
}
|
|
6449
|
-
return cur;
|
|
6450
|
-
};
|
|
6451
|
-
}
|
|
6452
|
-
function traverse(value2, seen) {
|
|
6453
|
-
if (!isObject(value2) || value2["__v_skip"]) {
|
|
6454
|
-
return value2;
|
|
6455
|
-
}
|
|
6456
|
-
seen = seen || new Set();
|
|
6457
|
-
if (seen.has(value2)) {
|
|
6458
|
-
return value2;
|
|
6459
|
-
}
|
|
6460
|
-
seen.add(value2);
|
|
6461
|
-
if (isRef(value2)) {
|
|
6462
|
-
traverse(value2.value, seen);
|
|
6463
|
-
} else if (isArray(value2)) {
|
|
6464
|
-
for (let i2 = 0; i2 < value2.length; i2++) {
|
|
6465
|
-
traverse(value2[i2], seen);
|
|
6466
|
-
}
|
|
6467
|
-
} else if (isSet(value2) || isMap(value2)) {
|
|
6468
|
-
value2.forEach((v) => {
|
|
6469
|
-
traverse(v, seen);
|
|
6470
|
-
});
|
|
6471
|
-
} else if (isPlainObject$1(value2)) {
|
|
6472
|
-
for (const key2 in value2) {
|
|
6473
|
-
traverse(value2[key2], seen);
|
|
6474
|
-
}
|
|
6475
|
-
}
|
|
6476
|
-
return value2;
|
|
6477
|
-
}
|
|
6531
|
+
const computed = (getterOrOptions, debugOptions) => {
|
|
6532
|
+
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
6533
|
+
};
|
|
6478
6534
|
function h(type, propsOrChildren, children) {
|
|
6479
6535
|
const l = arguments.length;
|
|
6480
6536
|
if (l === 2) {
|
|
@@ -6495,10 +6551,10 @@ function h(type, propsOrChildren, children) {
|
|
|
6495
6551
|
return createVNode(type, propsOrChildren, children);
|
|
6496
6552
|
}
|
|
6497
6553
|
}
|
|
6498
|
-
const version = "3.2.
|
|
6554
|
+
const version = "3.2.33";
|
|
6499
6555
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
6500
6556
|
const doc = typeof document !== "undefined" ? document : null;
|
|
6501
|
-
const
|
|
6557
|
+
const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
|
|
6502
6558
|
const nodeOps = {
|
|
6503
6559
|
insert: (child, parent2, anchor) => {
|
|
6504
6560
|
parent2.insertBefore(child, anchor || null);
|
|
@@ -6537,13 +6593,17 @@ const nodeOps = {
|
|
|
6537
6593
|
}
|
|
6538
6594
|
return cloned;
|
|
6539
6595
|
},
|
|
6540
|
-
insertStaticContent(content2, parent2, anchor, isSVG) {
|
|
6596
|
+
insertStaticContent(content2, parent2, anchor, isSVG, start, end) {
|
|
6541
6597
|
const before = anchor ? anchor.previousSibling : parent2.lastChild;
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6598
|
+
if (start && (start === end || start.nextSibling)) {
|
|
6599
|
+
while (true) {
|
|
6600
|
+
parent2.insertBefore(start.cloneNode(true), anchor);
|
|
6601
|
+
if (start === end || !(start = start.nextSibling))
|
|
6602
|
+
break;
|
|
6603
|
+
}
|
|
6604
|
+
} else {
|
|
6605
|
+
templateContainer.innerHTML = isSVG ? `<svg>${content2}</svg>` : content2;
|
|
6606
|
+
const template = templateContainer.content;
|
|
6547
6607
|
if (isSVG) {
|
|
6548
6608
|
const wrapper = template.firstChild;
|
|
6549
6609
|
while (wrapper.firstChild) {
|
|
@@ -6551,9 +6611,8 @@ const nodeOps = {
|
|
|
6551
6611
|
}
|
|
6552
6612
|
template.removeChild(wrapper);
|
|
6553
6613
|
}
|
|
6554
|
-
|
|
6614
|
+
parent2.insertBefore(template, anchor);
|
|
6555
6615
|
}
|
|
6556
|
-
parent2.insertBefore(template.cloneNode(true), anchor);
|
|
6557
6616
|
return [
|
|
6558
6617
|
before ? before.nextSibling : parent2.firstChild,
|
|
6559
6618
|
anchor ? anchor.previousSibling : parent2.lastChild
|
|
@@ -6606,6 +6665,8 @@ function setStyle(style, name2, val2) {
|
|
|
6606
6665
|
if (isArray(val2)) {
|
|
6607
6666
|
val2.forEach((v) => setStyle(style, name2, v));
|
|
6608
6667
|
} else {
|
|
6668
|
+
if (val2 == null)
|
|
6669
|
+
val2 = "";
|
|
6609
6670
|
if (name2.startsWith("--")) {
|
|
6610
6671
|
style.setProperty(name2, val2);
|
|
6611
6672
|
} else {
|
|
@@ -6674,40 +6735,39 @@ function patchDOMProp(el, key2, value2, prevChildren, parentComponent, parentSus
|
|
|
6674
6735
|
}
|
|
6675
6736
|
return;
|
|
6676
6737
|
}
|
|
6738
|
+
let needRemove = false;
|
|
6677
6739
|
if (value2 === "" || value2 == null) {
|
|
6678
6740
|
const type = typeof el[key2];
|
|
6679
6741
|
if (type === "boolean") {
|
|
6680
|
-
|
|
6681
|
-
return;
|
|
6742
|
+
value2 = includeBooleanAttr(value2);
|
|
6682
6743
|
} else if (value2 == null && type === "string") {
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
return;
|
|
6744
|
+
value2 = "";
|
|
6745
|
+
needRemove = true;
|
|
6686
6746
|
} else if (type === "number") {
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
} catch (_a) {
|
|
6690
|
-
}
|
|
6691
|
-
el.removeAttribute(key2);
|
|
6692
|
-
return;
|
|
6747
|
+
value2 = 0;
|
|
6748
|
+
needRemove = true;
|
|
6693
6749
|
}
|
|
6694
6750
|
}
|
|
6695
6751
|
try {
|
|
6696
6752
|
el[key2] = value2;
|
|
6697
6753
|
} catch (e) {
|
|
6698
6754
|
}
|
|
6755
|
+
needRemove && el.removeAttribute(key2);
|
|
6699
6756
|
}
|
|
6700
|
-
|
|
6701
|
-
let
|
|
6702
|
-
|
|
6703
|
-
if (
|
|
6704
|
-
|
|
6757
|
+
const [_getNow, skipTimestampCheck] = /* @__PURE__ */ (() => {
|
|
6758
|
+
let _getNow2 = Date.now;
|
|
6759
|
+
let skipTimestampCheck2 = false;
|
|
6760
|
+
if (typeof window !== "undefined") {
|
|
6761
|
+
if (Date.now() > document.createEvent("Event").timeStamp) {
|
|
6762
|
+
_getNow2 = () => performance.now();
|
|
6763
|
+
}
|
|
6764
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
6765
|
+
skipTimestampCheck2 = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
6705
6766
|
}
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
}
|
|
6767
|
+
return [_getNow2, skipTimestampCheck2];
|
|
6768
|
+
})();
|
|
6709
6769
|
let cachedNow = 0;
|
|
6710
|
-
const p = Promise.resolve();
|
|
6770
|
+
const p = /* @__PURE__ */ Promise.resolve();
|
|
6711
6771
|
const reset$1 = () => {
|
|
6712
6772
|
cachedNow = 0;
|
|
6713
6773
|
};
|
|
@@ -6765,7 +6825,7 @@ function patchStopImmediatePropagation(e, value2) {
|
|
|
6765
6825
|
originalStop.call(e);
|
|
6766
6826
|
e._stopped = true;
|
|
6767
6827
|
};
|
|
6768
|
-
return value2.map((fn) => (e2) => !e2._stopped && fn(e2));
|
|
6828
|
+
return value2.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
6769
6829
|
} else {
|
|
6770
6830
|
return value2;
|
|
6771
6831
|
}
|
|
@@ -6801,7 +6861,7 @@ function shouldSetAsProp(el, key2, value2, isSVG) {
|
|
|
6801
6861
|
}
|
|
6802
6862
|
return false;
|
|
6803
6863
|
}
|
|
6804
|
-
if (key2 === "spellcheck" || key2 === "draggable") {
|
|
6864
|
+
if (key2 === "spellcheck" || key2 === "draggable" || key2 === "translate") {
|
|
6805
6865
|
return false;
|
|
6806
6866
|
}
|
|
6807
6867
|
if (key2 === "form") {
|
|
@@ -7348,7 +7408,7 @@ const vShow = {
|
|
|
7348
7408
|
function setDisplay(el, value2) {
|
|
7349
7409
|
el.style.display = value2 ? el._vod : "none";
|
|
7350
7410
|
}
|
|
7351
|
-
const rendererOptions = extend({ patchProp }, nodeOps);
|
|
7411
|
+
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
7352
7412
|
let renderer;
|
|
7353
7413
|
function ensureRenderer() {
|
|
7354
7414
|
return renderer || (renderer = createRenderer(rendererOptions));
|
|
@@ -7613,11 +7673,11 @@ const OTTLoginState = reactive({
|
|
|
7613
7673
|
}
|
|
7614
7674
|
});
|
|
7615
7675
|
async function init(params) {
|
|
7616
|
-
reconstructParams(params);
|
|
7617
|
-
await execute$c(
|
|
7676
|
+
const newParams = reconstructParams(params);
|
|
7677
|
+
await execute$c(newParams);
|
|
7618
7678
|
}
|
|
7619
7679
|
async function execute$c(params) {
|
|
7620
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
7680
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
7621
7681
|
try {
|
|
7622
7682
|
saveEnv((_a = params == null ? void 0 : params.env) != null ? _a : "");
|
|
7623
7683
|
saveClientId((_b = params == null ? void 0 : params.clientId) != null ? _b : "");
|
|
@@ -7647,28 +7707,29 @@ async function execute$c(params) {
|
|
|
7647
7707
|
const newUrlParams = urlParams.toString().length ? "?" + urlParams.toString() : "";
|
|
7648
7708
|
const newUrl = location.pathname + newUrlParams + location.hash;
|
|
7649
7709
|
history.replaceState(null, "", newUrl);
|
|
7650
|
-
const res = await
|
|
7710
|
+
const res = await ppFetch2({
|
|
7651
7711
|
method: "POST",
|
|
7652
7712
|
url: "web-api/app/token/v1/issue",
|
|
7653
7713
|
data: { ott: token, opaClientId: params == null ? void 0 : params.clientId }
|
|
7654
7714
|
});
|
|
7655
|
-
if (
|
|
7656
|
-
|
|
7715
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
7716
|
+
failedAuth(params, getFailErrorCode(res == null ? void 0 : res.ppFetchResult));
|
|
7717
|
+
return;
|
|
7657
7718
|
}
|
|
7658
|
-
if (((_c = res == null ? void 0 : res.
|
|
7659
|
-
const appDetailResult = await initAppDetail((
|
|
7719
|
+
if (((_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.resultInfo) == null ? void 0 : _d.code) === "SUCCESS") {
|
|
7720
|
+
const appDetailResult = await initAppDetail((_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.data) == null ? void 0 : _f.accessToken) != null ? _g : "");
|
|
7660
7721
|
if (!appDetailResult) {
|
|
7661
7722
|
throw Error();
|
|
7662
7723
|
}
|
|
7663
|
-
saveEnv((
|
|
7664
|
-
saveAccessToken((
|
|
7665
|
-
saveRefreshToken((
|
|
7724
|
+
saveEnv((_h = params == null ? void 0 : params.env) != null ? _h : "");
|
|
7725
|
+
saveAccessToken((_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.data) == null ? void 0 : _j.accessToken) != null ? _k : "");
|
|
7726
|
+
saveRefreshToken((_n = (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.data) == null ? void 0 : _m.refreshToken) != null ? _n : "");
|
|
7666
7727
|
OTTLoginState.setLoginState(true);
|
|
7667
7728
|
setTimeout(() => {
|
|
7668
7729
|
OTTLoginState.setLoginState(false);
|
|
7669
7730
|
}, 5e3);
|
|
7670
7731
|
saveUserData();
|
|
7671
|
-
saveClientId((
|
|
7732
|
+
saveClientId((_o = params == null ? void 0 : params.clientId) != null ? _o : "");
|
|
7672
7733
|
const configResult = await initAppConfiguration();
|
|
7673
7734
|
if (!configResult) {
|
|
7674
7735
|
throw Error();
|
|
@@ -7680,7 +7741,7 @@ async function execute$c(params) {
|
|
|
7680
7741
|
failedAuth(params, MiniAppErrorType.serverError);
|
|
7681
7742
|
return;
|
|
7682
7743
|
}
|
|
7683
|
-
(
|
|
7744
|
+
(_p = params == null ? void 0 : params.success) == null ? void 0 : _p.call(params, {
|
|
7684
7745
|
statusCode: MiniAppStatusType.initialized
|
|
7685
7746
|
});
|
|
7686
7747
|
}
|
|
@@ -7704,9 +7765,9 @@ function saveUserData() {
|
|
|
7704
7765
|
}).catch(() => {
|
|
7705
7766
|
});
|
|
7706
7767
|
}
|
|
7707
|
-
function copyToClipboard(
|
|
7768
|
+
function copyToClipboard(copyTextParams) {
|
|
7708
7769
|
var _a, _b;
|
|
7709
|
-
reconstructParams(
|
|
7770
|
+
const params = reconstructParams(copyTextParams);
|
|
7710
7771
|
let textarea = document.createElement("textarea");
|
|
7711
7772
|
textarea.setAttribute("readonly", "true");
|
|
7712
7773
|
textarea.setAttribute("contenteditable", "true");
|
|
@@ -7754,19 +7815,19 @@ const checkPermission = async (permissionNames) => {
|
|
|
7754
7815
|
return PermissionStatus.granted;
|
|
7755
7816
|
};
|
|
7756
7817
|
async function getUserGrantedPermission() {
|
|
7757
|
-
var _a, _b, _c;
|
|
7758
|
-
const response = await
|
|
7818
|
+
var _a, _b, _c, _d;
|
|
7819
|
+
const response = await ppFetch2({
|
|
7759
7820
|
method: "GET",
|
|
7760
7821
|
url: "web-api/app/v1/users/permissions/granted"
|
|
7761
7822
|
});
|
|
7762
|
-
return (_c = (_b = (_a = response == null ? void 0 : response.
|
|
7823
|
+
return (response == null ? void 0 : response.ppFetchResult) === "success" ? (_d = (_c = (_b = (_a = response == null ? void 0 : response.body) == null ? void 0 : _a.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.scopes) != null ? _d : [] : [];
|
|
7763
7824
|
}
|
|
7764
7825
|
async function getBalance(params) {
|
|
7765
|
-
reconstructParams(params);
|
|
7766
|
-
await execute$b(
|
|
7826
|
+
const newParams = reconstructParams(params);
|
|
7827
|
+
await execute$b(newParams);
|
|
7767
7828
|
}
|
|
7768
7829
|
async function execute$b(params) {
|
|
7769
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
7830
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7770
7831
|
try {
|
|
7771
7832
|
const grantStatus = await checkPermission(PermissionName.mini_app_payment_balance);
|
|
7772
7833
|
if (grantStatus !== PermissionStatus.granted) {
|
|
@@ -7776,25 +7837,24 @@ async function execute$b(params) {
|
|
|
7776
7837
|
payload.merchant = params.merchant;
|
|
7777
7838
|
payload.productType = params.productType;
|
|
7778
7839
|
payload.sourceInfoApp = params.sourceInfoApp;
|
|
7779
|
-
const res = await
|
|
7840
|
+
const res = await ppFetch2({
|
|
7780
7841
|
method: "GET",
|
|
7781
7842
|
url: "web-api/app/v1/payment/balance",
|
|
7782
7843
|
params: payload
|
|
7783
7844
|
});
|
|
7784
|
-
if (
|
|
7785
|
-
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode:
|
|
7786
|
-
}
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
return (_h = params == null ? void 0 : params.success) == null ? void 0 : _h.call(params, { balance: newBalance });
|
|
7845
|
+
if (res.ppFetchResult !== "success") {
|
|
7846
|
+
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
7847
|
+
} else {
|
|
7848
|
+
const newBalance = (_f = (_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.totalBalance) == null ? void 0 : _f.amount;
|
|
7849
|
+
return (_g = params == null ? void 0 : params.success) == null ? void 0 : _g.call(params, { balance: newBalance });
|
|
7790
7850
|
}
|
|
7791
7851
|
} finally {
|
|
7792
7852
|
}
|
|
7793
|
-
return (
|
|
7853
|
+
return (_h = params == null ? void 0 : params.fail) == null ? void 0 : _h.call(params, { errorCode: MiniAppErrorType.serverError });
|
|
7794
7854
|
}
|
|
7795
7855
|
async function getKycInformation(params) {
|
|
7796
|
-
reconstructParams(params);
|
|
7797
|
-
await execute$a(
|
|
7856
|
+
const newParams = reconstructParams(params);
|
|
7857
|
+
await execute$a(newParams);
|
|
7798
7858
|
}
|
|
7799
7859
|
async function execute$a(params) {
|
|
7800
7860
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -7812,7 +7872,7 @@ async function execute$a(params) {
|
|
|
7812
7872
|
}
|
|
7813
7873
|
});
|
|
7814
7874
|
if (res.ppFetchResult !== "success") {
|
|
7815
|
-
return (_c = params == null ? void 0 : params.fail) == null ? void 0 : _c.call(params, { errorCode:
|
|
7875
|
+
return (_c = params == null ? void 0 : params.fail) == null ? void 0 : _c.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
7816
7876
|
}
|
|
7817
7877
|
if ((_d = res.body.unsigned) == null ? void 0 : _d.data) {
|
|
7818
7878
|
let response = res.body.unsigned.data;
|
|
@@ -7826,8 +7886,8 @@ async function execute$a(params) {
|
|
|
7826
7886
|
}
|
|
7827
7887
|
}
|
|
7828
7888
|
async function getPermissionStatus(params) {
|
|
7829
|
-
reconstructParams(params);
|
|
7830
|
-
await execute$9(
|
|
7889
|
+
const newParams = reconstructParams(params);
|
|
7890
|
+
await execute$9(newParams);
|
|
7831
7891
|
}
|
|
7832
7892
|
async function execute$9(params) {
|
|
7833
7893
|
var _a, _b, _c, _d;
|
|
@@ -7909,13 +7969,13 @@ function useGetHeightProperties() {
|
|
|
7909
7969
|
}
|
|
7910
7970
|
function getTopBarHeight(params) {
|
|
7911
7971
|
var _a;
|
|
7912
|
-
reconstructParams(params);
|
|
7972
|
+
const newParams = reconstructParams(params);
|
|
7913
7973
|
const { headerHeight } = useGetHeightProperties();
|
|
7914
|
-
(_a =
|
|
7974
|
+
(_a = newParams == null ? void 0 : newParams.success) == null ? void 0 : _a.call(newParams, { height: headerHeight });
|
|
7915
7975
|
}
|
|
7916
7976
|
async function getPlatformInformation(params) {
|
|
7917
|
-
reconstructParams(params);
|
|
7918
|
-
await execute$8(
|
|
7977
|
+
const newParams = reconstructParams(params);
|
|
7978
|
+
await execute$8(newParams);
|
|
7919
7979
|
}
|
|
7920
7980
|
async function execute$8(params) {
|
|
7921
7981
|
var _a, _b;
|
|
@@ -7945,8 +8005,8 @@ async function execute$8(params) {
|
|
|
7945
8005
|
});
|
|
7946
8006
|
}
|
|
7947
8007
|
function getDeviceInformation(params) {
|
|
7948
|
-
reconstructParams(params);
|
|
7949
|
-
execute$7(
|
|
8008
|
+
const newParams = reconstructParams(params);
|
|
8009
|
+
execute$7(newParams);
|
|
7950
8010
|
}
|
|
7951
8011
|
function execute$7(params) {
|
|
7952
8012
|
var _a;
|
|
@@ -8119,10 +8179,10 @@ const ActionSheet = defineComponent({
|
|
|
8119
8179
|
default: ""
|
|
8120
8180
|
}
|
|
8121
8181
|
},
|
|
8122
|
-
emits:
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8182
|
+
emits: {
|
|
8183
|
+
close: () => true,
|
|
8184
|
+
afterLeave: () => true
|
|
8185
|
+
},
|
|
8126
8186
|
setup(props, {
|
|
8127
8187
|
slots,
|
|
8128
8188
|
emit
|
|
@@ -8343,13 +8403,15 @@ const Button = defineComponent({
|
|
|
8343
8403
|
default: false
|
|
8344
8404
|
}
|
|
8345
8405
|
},
|
|
8346
|
-
emits:
|
|
8406
|
+
emits: {
|
|
8407
|
+
click: () => true
|
|
8408
|
+
},
|
|
8347
8409
|
setup(props, {
|
|
8348
8410
|
emit
|
|
8349
8411
|
}) {
|
|
8350
|
-
const onClick = (
|
|
8412
|
+
const onClick = () => {
|
|
8351
8413
|
if (!props.loading && !props.disabled) {
|
|
8352
|
-
emit("click"
|
|
8414
|
+
emit("click");
|
|
8353
8415
|
}
|
|
8354
8416
|
};
|
|
8355
8417
|
return {
|
|
@@ -8561,7 +8623,13 @@ const Input = defineComponent({
|
|
|
8561
8623
|
default: ""
|
|
8562
8624
|
}
|
|
8563
8625
|
},
|
|
8564
|
-
emits:
|
|
8626
|
+
emits: {
|
|
8627
|
+
"update:modelValue": (_value) => true,
|
|
8628
|
+
blur: (_p) => true,
|
|
8629
|
+
input: (_p) => true,
|
|
8630
|
+
focus: (_p) => true,
|
|
8631
|
+
validate: (_p) => true
|
|
8632
|
+
},
|
|
8565
8633
|
setup(props, {
|
|
8566
8634
|
emit
|
|
8567
8635
|
}) {
|
|
@@ -8774,7 +8842,9 @@ defineComponent({
|
|
|
8774
8842
|
checked: Boolean,
|
|
8775
8843
|
disabled: Boolean
|
|
8776
8844
|
},
|
|
8777
|
-
emits:
|
|
8845
|
+
emits: {
|
|
8846
|
+
toggleSwitch: (_p) => true
|
|
8847
|
+
},
|
|
8778
8848
|
setup(props, {
|
|
8779
8849
|
emit,
|
|
8780
8850
|
slots
|
|
@@ -21511,7 +21581,9 @@ const Lottie = defineComponent({
|
|
|
21511
21581
|
required: false
|
|
21512
21582
|
}
|
|
21513
21583
|
},
|
|
21514
|
-
emits:
|
|
21584
|
+
emits: {
|
|
21585
|
+
"create-lottie": (_p) => true
|
|
21586
|
+
},
|
|
21515
21587
|
setup(props, {
|
|
21516
21588
|
emit
|
|
21517
21589
|
}) {
|
|
@@ -21599,7 +21671,10 @@ const Header = defineComponent({
|
|
|
21599
21671
|
required: false
|
|
21600
21672
|
}
|
|
21601
21673
|
},
|
|
21602
|
-
emits:
|
|
21674
|
+
emits: {
|
|
21675
|
+
click: () => true,
|
|
21676
|
+
"right-click": () => true
|
|
21677
|
+
},
|
|
21603
21678
|
setup(props, {
|
|
21604
21679
|
emit
|
|
21605
21680
|
}) {
|
|
@@ -23663,7 +23738,9 @@ const SelectList = defineComponent({
|
|
|
23663
23738
|
default: false
|
|
23664
23739
|
}
|
|
23665
23740
|
},
|
|
23666
|
-
emits:
|
|
23741
|
+
emits: {
|
|
23742
|
+
"update:modelValue": (_value) => true
|
|
23743
|
+
},
|
|
23667
23744
|
setup(props, {
|
|
23668
23745
|
emit
|
|
23669
23746
|
}) {
|
|
@@ -23722,7 +23799,9 @@ const _sfc_main$1b = defineComponent({
|
|
|
23722
23799
|
default: "1995-01-01"
|
|
23723
23800
|
}
|
|
23724
23801
|
},
|
|
23725
|
-
emits:
|
|
23802
|
+
emits: {
|
|
23803
|
+
selected: (_value) => true
|
|
23804
|
+
},
|
|
23726
23805
|
setup(props, { emit }) {
|
|
23727
23806
|
const value2 = ref(props.defaultValue);
|
|
23728
23807
|
const id = computed(() => `date-label-${Date.now()}`);
|
|
@@ -23808,7 +23887,9 @@ const _sfc_main$1a = defineComponent({
|
|
|
23808
23887
|
default: false
|
|
23809
23888
|
}
|
|
23810
23889
|
},
|
|
23811
|
-
emits:
|
|
23890
|
+
emits: {
|
|
23891
|
+
show: (_p) => true
|
|
23892
|
+
},
|
|
23812
23893
|
setup(props, { emit }) {
|
|
23813
23894
|
const style = useCssModule();
|
|
23814
23895
|
const show2 = () => {
|
|
@@ -23934,7 +24015,11 @@ const _sfc_main$19 = defineComponent({
|
|
|
23934
24015
|
default: false
|
|
23935
24016
|
}
|
|
23936
24017
|
},
|
|
23937
|
-
emits:
|
|
24018
|
+
emits: {
|
|
24019
|
+
setmoney: (_p) => true,
|
|
24020
|
+
switchinput: () => true,
|
|
24021
|
+
selectmoremoney: () => true
|
|
24022
|
+
},
|
|
23938
24023
|
setup(props, { emit }) {
|
|
23939
24024
|
const style = useCssModule();
|
|
23940
24025
|
const { isMobile, isDesktop } = useBreakpoints();
|
|
@@ -24565,7 +24650,10 @@ const _sfc_main$13 = defineComponent({
|
|
|
24565
24650
|
default: false
|
|
24566
24651
|
}
|
|
24567
24652
|
},
|
|
24568
|
-
emits:
|
|
24653
|
+
emits: {
|
|
24654
|
+
edit: (_address) => true,
|
|
24655
|
+
select: () => true
|
|
24656
|
+
},
|
|
24569
24657
|
setup(props, { emit }) {
|
|
24570
24658
|
const lg2 = getLanguage();
|
|
24571
24659
|
const style = useCssModule();
|
|
@@ -24814,7 +24902,10 @@ const _sfc_main$11 = defineComponent({
|
|
|
24814
24902
|
}
|
|
24815
24903
|
}
|
|
24816
24904
|
},
|
|
24817
|
-
emits:
|
|
24905
|
+
emits: {
|
|
24906
|
+
confirm: () => true,
|
|
24907
|
+
close: () => true
|
|
24908
|
+
},
|
|
24818
24909
|
setup() {
|
|
24819
24910
|
const lg2 = getLanguage();
|
|
24820
24911
|
const style = useCssModule();
|
|
@@ -25436,7 +25527,7 @@ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25436
25527
|
key: 0,
|
|
25437
25528
|
class: normalizeClass(_ctx.style.desktopTitle)
|
|
25438
25529
|
}, toDisplayString(_ctx.lg.userAddress.address), 3)) : createCommentVNode("", true),
|
|
25439
|
-
withDirectives(
|
|
25530
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
25440
25531
|
class: normalizeClass({
|
|
25441
25532
|
[_ctx.style.container]: true,
|
|
25442
25533
|
[_ctx.style.contentContainer]: _ctx.addresses.length > 0 && !_ctx.isMakepayment,
|
|
@@ -25460,7 +25551,7 @@ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25460
25551
|
class: normalizeClass(_ctx.$style.noAddressMessage),
|
|
25461
25552
|
"shows-add-address-button": false
|
|
25462
25553
|
}, null, 8, ["class"])) : createCommentVNode("", true)
|
|
25463
|
-
], 2), [
|
|
25554
|
+
], 2)), [
|
|
25464
25555
|
[_directive_vertical_scroll]
|
|
25465
25556
|
]),
|
|
25466
25557
|
createVNode(_component_Footer, {
|
|
@@ -25552,7 +25643,11 @@ const _sfc_main$Y = defineComponent({
|
|
|
25552
25643
|
default: false
|
|
25553
25644
|
}
|
|
25554
25645
|
},
|
|
25555
|
-
emits:
|
|
25646
|
+
emits: {
|
|
25647
|
+
close: () => true,
|
|
25648
|
+
submit: () => true,
|
|
25649
|
+
openDeleteSheet: () => true
|
|
25650
|
+
},
|
|
25556
25651
|
setup(props) {
|
|
25557
25652
|
const lg2 = getLanguage();
|
|
25558
25653
|
const state = reactive({
|
|
@@ -25684,7 +25779,9 @@ const _sfc_main$X = defineComponent({
|
|
|
25684
25779
|
default: false
|
|
25685
25780
|
}
|
|
25686
25781
|
},
|
|
25687
|
-
emits:
|
|
25782
|
+
emits: {
|
|
25783
|
+
"update:modelValue": (_p) => true
|
|
25784
|
+
},
|
|
25688
25785
|
setup(props, { emit }) {
|
|
25689
25786
|
const style = useCssModule();
|
|
25690
25787
|
const lg2 = getLanguage();
|
|
@@ -25913,7 +26010,11 @@ const _sfc_main$W = defineComponent({
|
|
|
25913
26010
|
required: true
|
|
25914
26011
|
}
|
|
25915
26012
|
},
|
|
25916
|
-
emits:
|
|
26013
|
+
emits: {
|
|
26014
|
+
submit: (_p) => true,
|
|
26015
|
+
close: () => true,
|
|
26016
|
+
openDeleteSheet: () => true
|
|
26017
|
+
},
|
|
25917
26018
|
setup(props, { emit }) {
|
|
25918
26019
|
const style = useCssModule();
|
|
25919
26020
|
const state = reactive(__spreadProps(__spreadValues({}, createInitialState$1(props.address)), {
|
|
@@ -25928,7 +26029,7 @@ const _sfc_main$W = defineComponent({
|
|
|
25928
26029
|
const res = await getAddressByZip({
|
|
25929
26030
|
zipcode: (_b = state.zip) == null ? void 0 : _b.replace(/-/g, "")
|
|
25930
26031
|
});
|
|
25931
|
-
if (res.ppFetchResult === "success" && ((_f = (_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.payload) == null ? void 0 : _f.addressList)) {
|
|
26032
|
+
if ((res == null ? void 0 : res.ppFetchResult) === "success" && ((_f = (_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.payload) == null ? void 0 : _f.addressList)) {
|
|
25932
26033
|
const zipAddress2 = (_k = (_j = (_i = (_h = (_g = res == null ? void 0 : res.body) == null ? void 0 : _g.unsigned) == null ? void 0 : _h.data) == null ? void 0 : _i.payload) == null ? void 0 : _j.addressList) == null ? void 0 : _k[0];
|
|
25933
26034
|
const { cityAndOaza, prefecture } = zipAddress2 || {};
|
|
25934
26035
|
if (cityAndOaza)
|
|
@@ -25993,7 +26094,7 @@ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25993
26094
|
const _component_Footer = resolveComponent("Footer");
|
|
25994
26095
|
const _directive_vertical_scroll = resolveDirective("vertical-scroll");
|
|
25995
26096
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
25996
|
-
withDirectives(
|
|
26097
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
25997
26098
|
class: normalizeClass(_ctx.style.root),
|
|
25998
26099
|
style: normalizeStyle(_ctx.rootStyle)
|
|
25999
26100
|
}, [
|
|
@@ -26099,7 +26200,7 @@ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
26099
26200
|
createBaseVNode("div", {
|
|
26100
26201
|
class: normalizeClass(_ctx.style.spacer)
|
|
26101
26202
|
}, null, 2)
|
|
26102
|
-
], 6), [
|
|
26203
|
+
], 6)), [
|
|
26103
26204
|
[_directive_vertical_scroll]
|
|
26104
26205
|
]),
|
|
26105
26206
|
!_ctx.kyc ? (openBlock(), createBlock(_component_Footer, {
|
|
@@ -26141,7 +26242,10 @@ const _sfc_main$V = defineComponent({
|
|
|
26141
26242
|
default: false
|
|
26142
26243
|
}
|
|
26143
26244
|
},
|
|
26144
|
-
emits:
|
|
26245
|
+
emits: {
|
|
26246
|
+
close: () => true,
|
|
26247
|
+
del: () => true
|
|
26248
|
+
},
|
|
26145
26249
|
setup(_, { emit }) {
|
|
26146
26250
|
const lg2 = getLanguage();
|
|
26147
26251
|
const style = useCssModule();
|
|
@@ -26491,7 +26595,11 @@ const _sfc_main$T = defineComponent({
|
|
|
26491
26595
|
default: false
|
|
26492
26596
|
}
|
|
26493
26597
|
},
|
|
26494
|
-
emits:
|
|
26598
|
+
emits: {
|
|
26599
|
+
click: () => true,
|
|
26600
|
+
back: () => true,
|
|
26601
|
+
chooseAddress: () => true
|
|
26602
|
+
},
|
|
26495
26603
|
setup(props) {
|
|
26496
26604
|
const { handleError: handleError2 } = getErrorHandling$1();
|
|
26497
26605
|
const { pageTransition, headerHeight } = useUIControl$1();
|
|
@@ -26619,10 +26727,11 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
26619
26727
|
const cssModules$M = {};
|
|
26620
26728
|
cssModules$M["$style"] = style0$M;
|
|
26621
26729
|
var App = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$T], ["__cssModules", cssModules$M]]);
|
|
26622
|
-
function closeApp(
|
|
26730
|
+
function closeApp(closeAppParams) {
|
|
26623
26731
|
var _a;
|
|
26624
|
-
|
|
26625
|
-
|
|
26732
|
+
let params = null;
|
|
26733
|
+
if (closeAppParams) {
|
|
26734
|
+
params = reconstructParams(closeAppParams);
|
|
26626
26735
|
}
|
|
26627
26736
|
if (isPayPayMiniApp()) {
|
|
26628
26737
|
if ((_a = params == null ? void 0 : params.options) == null ? void 0 : _a.deeplink) {
|
|
@@ -26636,9 +26745,9 @@ function closeApp(params) {
|
|
|
26636
26745
|
(_a2 = params == null ? void 0 : params.fail) == null ? void 0 : _a2.call(params, { errorCode: MiniAppErrorType.deeplinkUnavailable });
|
|
26637
26746
|
}, 300);
|
|
26638
26747
|
}
|
|
26639
|
-
function openWebview(
|
|
26748
|
+
function openWebview(openWebviewParams) {
|
|
26640
26749
|
var _a, _b, _c, _d;
|
|
26641
|
-
reconstructParams(
|
|
26750
|
+
const params = reconstructParams(openWebviewParams);
|
|
26642
26751
|
let url;
|
|
26643
26752
|
let openUrl = null;
|
|
26644
26753
|
const appDetail = getAppDetail();
|
|
@@ -26753,11 +26862,13 @@ const _sfc_main$S = defineComponent({
|
|
|
26753
26862
|
type: Object,
|
|
26754
26863
|
default: () => ({
|
|
26755
26864
|
height: "50px",
|
|
26756
|
-
width: "
|
|
26865
|
+
width: "auto"
|
|
26757
26866
|
})
|
|
26758
26867
|
}
|
|
26759
26868
|
},
|
|
26760
|
-
emits:
|
|
26869
|
+
emits: {
|
|
26870
|
+
"close-click": () => true
|
|
26871
|
+
},
|
|
26761
26872
|
setup() {
|
|
26762
26873
|
const style = useCssModule();
|
|
26763
26874
|
return {
|
|
@@ -26795,7 +26906,7 @@ const _sfc_main$S = defineComponent({
|
|
|
26795
26906
|
methods: {
|
|
26796
26907
|
buttonClick(buttonInfo) {
|
|
26797
26908
|
var _a;
|
|
26798
|
-
if (buttonInfo.actionType) {
|
|
26909
|
+
if (buttonInfo == null ? void 0 : buttonInfo.actionType) {
|
|
26799
26910
|
if ((buttonInfo == null ? void 0 : buttonInfo.actionType) === UIComponentsButtonActionType.DEEPLINK) {
|
|
26800
26911
|
if ((buttonInfo == null ? void 0 : buttonInfo.deeplink) && isValidUrl(buttonInfo.deeplink)) {
|
|
26801
26912
|
openWebviewInternal({ url: buttonInfo == null ? void 0 : buttonInfo.deeplink });
|
|
@@ -26813,7 +26924,7 @@ const _sfc_main$S = defineComponent({
|
|
|
26813
26924
|
return;
|
|
26814
26925
|
}
|
|
26815
26926
|
}
|
|
26816
|
-
} else if (buttonInfo.onClick) {
|
|
26927
|
+
} else if (buttonInfo == null ? void 0 : buttonInfo.onClick) {
|
|
26817
26928
|
buttonInfo.onClick();
|
|
26818
26929
|
return;
|
|
26819
26930
|
}
|
|
@@ -26838,7 +26949,7 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
26838
26949
|
return openBlock(), createBlock(_component_ActionSheet, {
|
|
26839
26950
|
show: _ctx.show,
|
|
26840
26951
|
type: "alert",
|
|
26841
|
-
onClose: _cache[
|
|
26952
|
+
onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close-click"))
|
|
26842
26953
|
}, {
|
|
26843
26954
|
default: withCtx(() => [
|
|
26844
26955
|
createBaseVNode("div", {
|
|
@@ -26888,13 +26999,13 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
26888
26999
|
"data-test": "error-sheet-close",
|
|
26889
27000
|
class: normalizeClass(_ctx.style.closeBtn),
|
|
26890
27001
|
"data-testid": "error-btn",
|
|
26891
|
-
onClick: _ctx.buttonClick
|
|
27002
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.buttonClick())
|
|
26892
27003
|
}, {
|
|
26893
27004
|
default: withCtx(() => [
|
|
26894
27005
|
createTextVNode(toDisplayString(_ctx.lg.errorSheet.title), 1)
|
|
26895
27006
|
]),
|
|
26896
27007
|
_: 1
|
|
26897
|
-
}, 8, ["class"
|
|
27008
|
+
}, 8, ["class"])
|
|
26898
27009
|
], 2))
|
|
26899
27010
|
], 2)
|
|
26900
27011
|
]),
|
|
@@ -26937,7 +27048,13 @@ const _sfc_main$R = defineComponent({
|
|
|
26937
27048
|
default: null
|
|
26938
27049
|
}
|
|
26939
27050
|
},
|
|
26940
|
-
emits:
|
|
27051
|
+
emits: {
|
|
27052
|
+
click: () => true,
|
|
27053
|
+
back: () => true,
|
|
27054
|
+
chooseAddress: () => true,
|
|
27055
|
+
layoutupdate: () => true,
|
|
27056
|
+
updateAddress: () => true
|
|
27057
|
+
},
|
|
26941
27058
|
setup(props, context) {
|
|
26942
27059
|
initRoot$1(props, context);
|
|
26943
27060
|
const { errorShow, errorDescription, errorIcon: errorIcon2, errorTitle: errorTitle2, closeError } = initErrorHandling$1();
|
|
@@ -27562,7 +27679,10 @@ const _sfc_main$P = defineComponent({
|
|
|
27562
27679
|
default: ""
|
|
27563
27680
|
}
|
|
27564
27681
|
},
|
|
27565
|
-
emits:
|
|
27682
|
+
emits: {
|
|
27683
|
+
back: () => true,
|
|
27684
|
+
select: (_index) => true
|
|
27685
|
+
},
|
|
27566
27686
|
setup(props, { emit }) {
|
|
27567
27687
|
const lg2 = getLanguage();
|
|
27568
27688
|
const openBreakDown = ref(false);
|
|
@@ -27597,7 +27717,7 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27597
27717
|
fixed: "",
|
|
27598
27718
|
onClick: _ctx.back
|
|
27599
27719
|
}, null, 8, ["title", "onClick"]),
|
|
27600
|
-
withDirectives(
|
|
27720
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
27601
27721
|
class: normalizeClass(_ctx.style.contentContainer)
|
|
27602
27722
|
}, [
|
|
27603
27723
|
createVNode(_component_PaymentMethodList, {
|
|
@@ -27605,7 +27725,7 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27605
27725
|
"select-payment-index": _ctx.selectPaymentIndex,
|
|
27606
27726
|
onSelect: _ctx.select
|
|
27607
27727
|
}, null, 8, ["payment-methods", "select-payment-index", "onSelect"])
|
|
27608
|
-
], 2), [
|
|
27728
|
+
], 2)), [
|
|
27609
27729
|
[_directive_vertical_scroll]
|
|
27610
27730
|
])
|
|
27611
27731
|
], 2);
|
|
@@ -27638,7 +27758,10 @@ const _sfc_main$O = defineComponent({
|
|
|
27638
27758
|
default: "makePayment"
|
|
27639
27759
|
}
|
|
27640
27760
|
},
|
|
27641
|
-
emits:
|
|
27761
|
+
emits: {
|
|
27762
|
+
cancel: () => true,
|
|
27763
|
+
proceed: () => true
|
|
27764
|
+
},
|
|
27642
27765
|
setup(props) {
|
|
27643
27766
|
const lg2 = getLanguage();
|
|
27644
27767
|
const style = useCssModule();
|
|
@@ -27758,7 +27881,9 @@ const _sfc_main$N = defineComponent({
|
|
|
27758
27881
|
default: null
|
|
27759
27882
|
}
|
|
27760
27883
|
},
|
|
27761
|
-
emits:
|
|
27884
|
+
emits: {
|
|
27885
|
+
close: () => true
|
|
27886
|
+
},
|
|
27762
27887
|
setup() {
|
|
27763
27888
|
const lg2 = getLanguage();
|
|
27764
27889
|
const showDeepLink = isPayPayMiniApp();
|
|
@@ -27897,7 +28022,9 @@ const _sfc_main$M = defineComponent({
|
|
|
27897
28022
|
default: false
|
|
27898
28023
|
}
|
|
27899
28024
|
},
|
|
27900
|
-
emits:
|
|
28025
|
+
emits: {
|
|
28026
|
+
click: () => true
|
|
28027
|
+
},
|
|
27901
28028
|
setup(props, { emit }) {
|
|
27902
28029
|
const images2 = getImages();
|
|
27903
28030
|
const click = () => emit("click");
|
|
@@ -28081,7 +28208,9 @@ const _sfc_main$L = defineComponent({
|
|
|
28081
28208
|
default: false
|
|
28082
28209
|
}
|
|
28083
28210
|
},
|
|
28084
|
-
emits:
|
|
28211
|
+
emits: {
|
|
28212
|
+
success: () => true
|
|
28213
|
+
},
|
|
28085
28214
|
setup(props, context) {
|
|
28086
28215
|
var _a;
|
|
28087
28216
|
const { isMobile, isDesktop } = useBreakpoints();
|
|
@@ -28396,7 +28525,10 @@ const _sfc_main$K = defineComponent({
|
|
|
28396
28525
|
components: {
|
|
28397
28526
|
Button
|
|
28398
28527
|
},
|
|
28399
|
-
emits:
|
|
28528
|
+
emits: {
|
|
28529
|
+
confirm: () => true,
|
|
28530
|
+
cancel: () => true
|
|
28531
|
+
},
|
|
28400
28532
|
setup(_, context) {
|
|
28401
28533
|
const confirmAlert = () => {
|
|
28402
28534
|
return context.emit("confirm");
|
|
@@ -28483,7 +28615,9 @@ const _sfc_main$J = defineComponent({
|
|
|
28483
28615
|
default: () => ({})
|
|
28484
28616
|
}
|
|
28485
28617
|
},
|
|
28486
|
-
emits:
|
|
28618
|
+
emits: {
|
|
28619
|
+
close: () => true
|
|
28620
|
+
},
|
|
28487
28621
|
setup(props, context) {
|
|
28488
28622
|
const getButtonType = (type) => {
|
|
28489
28623
|
var _a;
|
|
@@ -28604,7 +28738,9 @@ const _sfc_main$I = defineComponent({
|
|
|
28604
28738
|
default: false
|
|
28605
28739
|
}
|
|
28606
28740
|
},
|
|
28607
|
-
emits:
|
|
28741
|
+
emits: {
|
|
28742
|
+
complete: (_p) => true
|
|
28743
|
+
},
|
|
28608
28744
|
setup(props, { emit }) {
|
|
28609
28745
|
const lg2 = getLanguage();
|
|
28610
28746
|
const images2 = getImages();
|
|
@@ -28758,7 +28894,9 @@ const _sfc_main$H = defineComponent({
|
|
|
28758
28894
|
required: true
|
|
28759
28895
|
}
|
|
28760
28896
|
},
|
|
28761
|
-
emits:
|
|
28897
|
+
emits: {
|
|
28898
|
+
close: () => true
|
|
28899
|
+
},
|
|
28762
28900
|
setup(props, { emit }) {
|
|
28763
28901
|
const lg2 = getLanguage();
|
|
28764
28902
|
const images2 = getImages();
|
|
@@ -28852,7 +28990,7 @@ var BirthdayConfirmError = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render",
|
|
|
28852
28990
|
const KEY$2 = "makepayment_age_confirm";
|
|
28853
28991
|
function initAgeConfirm(props) {
|
|
28854
28992
|
const postAgeConfirm = async (sendAgePayload, dateString) => {
|
|
28855
|
-
var _a, _b, _c, _d;
|
|
28993
|
+
var _a, _b, _c, _d, _e;
|
|
28856
28994
|
const _date = dateString.split("-");
|
|
28857
28995
|
const year = parseInt(_date[0]);
|
|
28858
28996
|
const month = parseInt(_date[1]);
|
|
@@ -28868,9 +29006,9 @@ function initAgeConfirm(props) {
|
|
|
28868
29006
|
api: "ageConfirm",
|
|
28869
29007
|
dryRun: true
|
|
28870
29008
|
});
|
|
28871
|
-
if (
|
|
29009
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !errorHappen)
|
|
28872
29010
|
return false;
|
|
28873
|
-
return (_d = (_c = (_b = (_a = res == null ? void 0 : res.
|
|
29011
|
+
return (_e = (_d = (_c = (_b = (_a = res == null ? void 0 : res.body) == null ? void 0 : _a.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.payload) == null ? void 0 : _d.isEligibleForCashBack) != null ? _e : false;
|
|
28874
29012
|
};
|
|
28875
29013
|
const store = {
|
|
28876
29014
|
postAgeConfirm
|
|
@@ -29033,7 +29171,9 @@ const _sfc_main$F = defineComponent({
|
|
|
29033
29171
|
default: ""
|
|
29034
29172
|
}
|
|
29035
29173
|
},
|
|
29036
|
-
emits:
|
|
29174
|
+
emits: {
|
|
29175
|
+
close: () => true
|
|
29176
|
+
},
|
|
29037
29177
|
setup(props, { emit }) {
|
|
29038
29178
|
const cashback2 = ref();
|
|
29039
29179
|
const { animation, uiState, type } = useData$1(props);
|
|
@@ -29694,7 +29834,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
29694
29834
|
]),
|
|
29695
29835
|
createVNode(_component_Divider)
|
|
29696
29836
|
], 2),
|
|
29697
|
-
withDirectives(
|
|
29837
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
29698
29838
|
class: normalizeClass([_ctx.containerClass, _ctx.style.desktopUi])
|
|
29699
29839
|
}, [
|
|
29700
29840
|
_ctx.available && _ctx.isMobile ? (openBlock(), createElementBlock("div", {
|
|
@@ -29817,7 +29957,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
29817
29957
|
onCreateLottie: _cache[0] || (_cache[0] = ($event) => _ctx.createAnime($event))
|
|
29818
29958
|
}, null, 8, ["path"])
|
|
29819
29959
|
], 2)) : createCommentVNode("", true)
|
|
29820
|
-
], 2), [
|
|
29960
|
+
], 2)), [
|
|
29821
29961
|
[_directive_vertical_scroll]
|
|
29822
29962
|
])
|
|
29823
29963
|
]);
|
|
@@ -29901,7 +30041,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
29901
30041
|
fixed: "",
|
|
29902
30042
|
onClick: _ctx.back
|
|
29903
30043
|
}, null, 8, ["title", "onClick"]),
|
|
29904
|
-
withDirectives(
|
|
30044
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
29905
30045
|
class: normalizeClass({ [_ctx.style.paymentList]: true, [_ctx.style.payment]: !_ctx.isTopup })
|
|
29906
30046
|
}, [
|
|
29907
30047
|
createVNode(_component_PaymentMethodList, {
|
|
@@ -29910,7 +30050,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
29910
30050
|
"is-topup": _ctx.isTopup,
|
|
29911
30051
|
onSelect: _ctx.select
|
|
29912
30052
|
}, null, 8, ["select-payment-index", "payment-methods", "is-topup", "onSelect"])
|
|
29913
|
-
], 2), [
|
|
30053
|
+
], 2)), [
|
|
29914
30054
|
[_directive_vertical_scroll]
|
|
29915
30055
|
]),
|
|
29916
30056
|
createBaseVNode("div", {
|
|
@@ -30137,15 +30277,15 @@ const _sfc_main$B = defineComponent({
|
|
|
30137
30277
|
}
|
|
30138
30278
|
}
|
|
30139
30279
|
},
|
|
30140
|
-
emits:
|
|
30141
|
-
|
|
30142
|
-
"open-consult",
|
|
30143
|
-
|
|
30144
|
-
|
|
30145
|
-
|
|
30146
|
-
|
|
30147
|
-
|
|
30148
|
-
|
|
30280
|
+
emits: {
|
|
30281
|
+
back: () => true,
|
|
30282
|
+
"open-consult": (_p) => true,
|
|
30283
|
+
charge: (_p) => true,
|
|
30284
|
+
animationEnd: (_p) => true,
|
|
30285
|
+
chooseAddress: (_p) => true,
|
|
30286
|
+
updateAddress: (_p) => true,
|
|
30287
|
+
layoutUpdate: () => true
|
|
30288
|
+
},
|
|
30149
30289
|
setup(props, context) {
|
|
30150
30290
|
var _a, _b;
|
|
30151
30291
|
const { emit } = context;
|
|
@@ -30474,14 +30614,13 @@ function createErrorFromErrorCodeAndType(type, code) {
|
|
|
30474
30614
|
}
|
|
30475
30615
|
}
|
|
30476
30616
|
function createErrorCodeForFailCallBack(res, api2) {
|
|
30477
|
-
var _a;
|
|
30478
30617
|
switch (api2) {
|
|
30479
30618
|
case "consult":
|
|
30480
30619
|
return MiniAppErrorType.paymentFail;
|
|
30481
30620
|
case "topup":
|
|
30482
30621
|
return MiniAppErrorType.topupFail;
|
|
30483
30622
|
case "payment": {
|
|
30484
|
-
const timeOut =
|
|
30623
|
+
const timeOut = res.ppFetchResult === "timeout";
|
|
30485
30624
|
return timeOut ? MiniAppErrorType.timeOut : MiniAppErrorType.paymentFail;
|
|
30486
30625
|
}
|
|
30487
30626
|
default:
|
|
@@ -30536,11 +30675,23 @@ function initErrorHandling(props) {
|
|
|
30536
30675
|
return false;
|
|
30537
30676
|
};
|
|
30538
30677
|
const handleError2 = (res, options) => {
|
|
30539
|
-
var _a, _b, _c, _d, _e, _f;
|
|
30678
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
30540
30679
|
const errorCodeForFailBack = createErrorCodeForFailCallBack(res, options == null ? void 0 : options.api);
|
|
30541
|
-
if ("
|
|
30680
|
+
if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && options.api === "consult") {
|
|
30681
|
+
return true;
|
|
30682
|
+
}
|
|
30683
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
30542
30684
|
if (!options.dryRun) {
|
|
30543
30685
|
const { errorDescription, errorIcon: errorIcon2, errorTitle: errorTitle2 } = createErrorFromType(options.type);
|
|
30686
|
+
if ((_b = (_a = res == null ? void 0 : res.body) == null ? void 0 : _a.uiComponents) == null ? void 0 : _b.displayErrorResponse) {
|
|
30687
|
+
if (!options.dryRun) {
|
|
30688
|
+
errorState.consultError = (_c = res.body.uiComponents) == null ? void 0 : _c.displayErrorResponse;
|
|
30689
|
+
errorState.showConsultError = true;
|
|
30690
|
+
errorState.errorCode = errorCodeForFailBack;
|
|
30691
|
+
preFail(errorCodeForFailBack, (_d = res == null ? void 0 : res.body.signed) == null ? void 0 : _d.jws);
|
|
30692
|
+
}
|
|
30693
|
+
return false;
|
|
30694
|
+
}
|
|
30544
30695
|
errorState.visible = true;
|
|
30545
30696
|
errorState.errorCode = errorCodeForFailBack;
|
|
30546
30697
|
errorState.errorTitle = errorTitle2;
|
|
@@ -30550,16 +30701,7 @@ function initErrorHandling(props) {
|
|
|
30550
30701
|
}
|
|
30551
30702
|
return false;
|
|
30552
30703
|
}
|
|
30553
|
-
|
|
30554
|
-
if (!options.dryRun) {
|
|
30555
|
-
errorState.consultError = (_b = res.uiComponents) == null ? void 0 : _b.displayErrorResponse;
|
|
30556
|
-
errorState.showConsultError = true;
|
|
30557
|
-
errorState.errorCode = errorCodeForFailBack;
|
|
30558
|
-
preFail(errorCodeForFailBack, (_c = res == null ? void 0 : res.signed) == null ? void 0 : _c.jws);
|
|
30559
|
-
}
|
|
30560
|
-
return false;
|
|
30561
|
-
}
|
|
30562
|
-
const errorCode = (_e = (_d = res.unsigned) == null ? void 0 : _d.resultInfo) == null ? void 0 : _e.code;
|
|
30704
|
+
const errorCode = (_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.unsigned) == null ? void 0 : _f.resultInfo) == null ? void 0 : _g.code;
|
|
30563
30705
|
if (![MiniAppErrorType.success].includes(errorCode)) {
|
|
30564
30706
|
if (!options.dryRun) {
|
|
30565
30707
|
const { errorTitle: errorTitle2, errorDescription, errorIcon: errorIcon2 } = createErrorFromErrorCodeAndType(options.type, errorCode);
|
|
@@ -30568,7 +30710,7 @@ function initErrorHandling(props) {
|
|
|
30568
30710
|
errorState.errorTitle = errorTitle2;
|
|
30569
30711
|
errorState.errorDescription = errorDescription;
|
|
30570
30712
|
errorState.errorIcon = errorIcon2;
|
|
30571
|
-
preFail(errorCodeForFailBack, (
|
|
30713
|
+
preFail(errorCodeForFailBack, (_i = (_h = res == null ? void 0 : res.body) == null ? void 0 : _h.signed) == null ? void 0 : _i.jws);
|
|
30572
30714
|
}
|
|
30573
30715
|
return false;
|
|
30574
30716
|
}
|
|
@@ -30670,22 +30812,22 @@ function usePaymentMethod(props) {
|
|
|
30670
30812
|
const showPaymentMethod = () => {
|
|
30671
30813
|
paymentState.showPaymentMethodList = true;
|
|
30672
30814
|
};
|
|
30673
|
-
const getPaymentMethods
|
|
30674
|
-
var _a, _b, _c, _d;
|
|
30675
|
-
const res = await
|
|
30815
|
+
const getPaymentMethods = async (dryRun) => {
|
|
30816
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
30817
|
+
const res = await getPaymentMethods2({
|
|
30676
30818
|
merchant: (_a = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a.merchantAlias,
|
|
30677
30819
|
type: ((_b = props.paymentParams) == null ? void 0 : _b.isAuthorization) ? "PRE_AUTH" : "ACQUIRING",
|
|
30678
30820
|
productType: (_c = props == null ? void 0 : props.paymentParams) == null ? void 0 : _c.productType,
|
|
30679
30821
|
sourceInfoApp: (_d = props == null ? void 0 : props.paymentParams) == null ? void 0 : _d.sourceInfoApp
|
|
30680
30822
|
});
|
|
30681
30823
|
const result2 = handleError2(res, { api: "paymentMethod", dryRun });
|
|
30682
|
-
if (!result2 ||
|
|
30824
|
+
if (!result2 || (res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
30683
30825
|
return {
|
|
30684
30826
|
res,
|
|
30685
30827
|
result: false
|
|
30686
30828
|
};
|
|
30687
30829
|
}
|
|
30688
|
-
const paymentMethodList = res.unsigned.data.payload.paymentMethodList;
|
|
30830
|
+
const paymentMethodList = (_h = (_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.unsigned) == null ? void 0 : _f.data) == null ? void 0 : _g.payload) == null ? void 0 : _h.paymentMethodList;
|
|
30689
30831
|
paymentState.paymentMethods = paymentMethodList;
|
|
30690
30832
|
const walletPaymentMethod = paymentMethodList.find((elem2) => elem2.paymentMethodType === PaymentMethodType.WALLET) || null;
|
|
30691
30833
|
if (walletPaymentMethod && walletPaymentMethod.descriptionBannerInfo) {
|
|
@@ -30704,7 +30846,7 @@ function usePaymentMethod(props) {
|
|
|
30704
30846
|
paymentState.showPaymentMethodList = false;
|
|
30705
30847
|
};
|
|
30706
30848
|
return {
|
|
30707
|
-
getPaymentMethods
|
|
30849
|
+
getPaymentMethods,
|
|
30708
30850
|
showPaymentMethod,
|
|
30709
30851
|
selectPayment,
|
|
30710
30852
|
paymentMethod: computed(() => paymentState.paymentMethods[paymentState.selectPaymentIndex]),
|
|
@@ -30731,32 +30873,26 @@ function useConsult(props) {
|
|
|
30731
30873
|
productType: (_d = props.paymentParams) == null ? void 0 : _d.productType
|
|
30732
30874
|
});
|
|
30733
30875
|
const errorHandled = handleError2(res, { api: "consult" });
|
|
30734
|
-
if ("
|
|
30735
|
-
|
|
30736
|
-
if ((_f = (_e = res.unsigned.data) == null ? void 0 : _e.error) == null ? void 0 : _f.displayErrorResponse) {
|
|
30737
|
-
consultState.consultInfo = res.unsigned.data.error.displayErrorResponse;
|
|
30738
|
-
consultState.showConsult = true;
|
|
30739
|
-
consultState.errorType = true;
|
|
30740
|
-
return false;
|
|
30741
|
-
}
|
|
30742
|
-
if ((_h = (_g = res.unsigned.data) == null ? void 0 : _g.error) == null ? void 0 : _h.insufficientBalanceInfo) {
|
|
30743
|
-
consultState.insufficientBalanceInfo = res.unsigned.data.error.insufficientBalanceInfo;
|
|
30876
|
+
if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && ((_h = (_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.unsigned) == null ? void 0 : _f.data) == null ? void 0 : _g.error) == null ? void 0 : _h.insufficientBalanceInfo)) {
|
|
30877
|
+
consultState.insufficientBalanceInfo = res.body.unsigned.data.error.insufficientBalanceInfo;
|
|
30744
30878
|
return true;
|
|
30745
30879
|
}
|
|
30880
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !errorHandled)
|
|
30881
|
+
return false;
|
|
30746
30882
|
return true;
|
|
30747
30883
|
};
|
|
30748
30884
|
const getConsultForTopup = async (_retryCount = 4) => {
|
|
30749
|
-
var _a, _b;
|
|
30885
|
+
var _a, _b, _c, _d;
|
|
30750
30886
|
let retryCount = _retryCount;
|
|
30751
30887
|
const retryFunctions = async () => {
|
|
30752
|
-
var _a2, _b2,
|
|
30888
|
+
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
30753
30889
|
const res = await getConsult({
|
|
30754
30890
|
merchant: (_a2 = props.paymentParams) == null ? void 0 : _a2.merchantAlias,
|
|
30755
|
-
amount: (
|
|
30756
|
-
productType: (
|
|
30891
|
+
amount: (_c2 = (_b2 = props.paymentParams) == null ? void 0 : _b2.amount) == null ? void 0 : _c2.amount,
|
|
30892
|
+
productType: (_d2 = props.paymentParams) == null ? void 0 : _d2.productType
|
|
30757
30893
|
});
|
|
30758
30894
|
const noError = handleError2(res, { dryRun: true, api: "consult" });
|
|
30759
|
-
if (!noError ||
|
|
30895
|
+
if (!noError || (res == null ? void 0 : res.ppFetchResult) !== "success" || ((_h = (_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.unsigned) == null ? void 0 : _f.data) == null ? void 0 : _g.error) == null ? void 0 : _h.insufficientBalanceInfo) || ((_l = (_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.data) == null ? void 0 : _k.header) == null ? void 0 : _l.resultCode) !== "S0000") {
|
|
30760
30896
|
retryCount = retryCount - 1;
|
|
30761
30897
|
if (retryCount <= 0) {
|
|
30762
30898
|
return {
|
|
@@ -30775,7 +30911,7 @@ function useConsult(props) {
|
|
|
30775
30911
|
if (retryResult.result) {
|
|
30776
30912
|
return retryResult.res;
|
|
30777
30913
|
}
|
|
30778
|
-
const jws =
|
|
30914
|
+
const jws = ((_a = retryResult == null ? void 0 : retryResult.res) == null ? void 0 : _a.ppFetchResult) !== "success" ? null : (_d = (_c = (_b = retryResult == null ? void 0 : retryResult.res) == null ? void 0 : _b.body) == null ? void 0 : _c.signed) == null ? void 0 : _d.jws;
|
|
30779
30915
|
openLogicError({ type: "topupSuccessButNotAddToBalance" }, jws);
|
|
30780
30916
|
return false;
|
|
30781
30917
|
};
|
|
@@ -30811,7 +30947,7 @@ function usePayment(props, {
|
|
|
30811
30947
|
paymentId: ""
|
|
30812
30948
|
});
|
|
30813
30949
|
const pay2 = async () => {
|
|
30814
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
30950
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
30815
30951
|
state.paymentId = "";
|
|
30816
30952
|
const requestBody = __spreadProps(__spreadValues({
|
|
30817
30953
|
merchantPaymentId: (_a = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a.merchantPaymentId
|
|
@@ -30840,12 +30976,12 @@ function usePayment(props, {
|
|
|
30840
30976
|
});
|
|
30841
30977
|
const res = await makePayment$2(requestParams, requestBody, (_r = (_q = props == null ? void 0 : props.paymentParams) == null ? void 0 : _q.isAuthorization) != null ? _r : false);
|
|
30842
30978
|
saveLastPaymentMethod(paymentMethod2.value.paymentMethodId);
|
|
30843
|
-
if (
|
|
30979
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
30844
30980
|
handleError2(res, { type: "pay", api: "payment" });
|
|
30845
30981
|
return;
|
|
30846
30982
|
}
|
|
30847
|
-
state.paymentId = (_s = res == null ? void 0 : res.
|
|
30848
|
-
return res;
|
|
30983
|
+
state.paymentId = (_t = (_s = res == null ? void 0 : res.body) == null ? void 0 : _s.unsigned) == null ? void 0 : _t.data.paymentId;
|
|
30984
|
+
return res == null ? void 0 : res.body;
|
|
30849
30985
|
};
|
|
30850
30986
|
return {
|
|
30851
30987
|
pay: pay2,
|
|
@@ -30864,25 +31000,25 @@ function useCashBackDetail(props) {
|
|
|
30864
31000
|
const getCashBackDetail = async ({
|
|
30865
31001
|
paymentId: paymentId2
|
|
30866
31002
|
}) => {
|
|
30867
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
31003
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
30868
31004
|
state.calculated = false;
|
|
30869
31005
|
await delay(300);
|
|
30870
31006
|
let res = await getCashBackDetails(paymentId2);
|
|
30871
|
-
const cashBackInfo2 =
|
|
30872
|
-
if (!(cashBackInfo2 == null ? void 0 : cashBackInfo2.cashBackAmount) && !((
|
|
31007
|
+
const cashBackInfo2 = (res == null ? void 0 : res.ppFetchResult) !== "success" ? null : (_c = (_b = (_a = res == null ? void 0 : res.body) == null ? void 0 : _a.unsigned) == null ? void 0 : _b.data) == null ? void 0 : _c.payload;
|
|
31008
|
+
if (!(cashBackInfo2 == null ? void 0 : cashBackInfo2.cashBackAmount) && !((_d = cashBackInfo2 == null ? void 0 : cashBackInfo2.animationInfoList) == null ? void 0 : _d.length)) {
|
|
30873
31009
|
await delay(1100);
|
|
30874
31010
|
res = await getCashBackDetails(paymentId2);
|
|
30875
31011
|
}
|
|
30876
31012
|
const errorHandled = handleError2(res, { dryRun: true, api: "cashback" });
|
|
30877
|
-
if (
|
|
31013
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !errorHandled) {
|
|
30878
31014
|
return {
|
|
30879
31015
|
cashBackDetail: null,
|
|
30880
31016
|
shouldShowPaymentCompletion: false
|
|
30881
31017
|
};
|
|
30882
31018
|
}
|
|
30883
|
-
const cashBackDetail = (
|
|
30884
|
-
const cashBackIsExist = (cashBackDetail == null ? void 0 : cashBackDetail.cashBackAmount) > 0 && ((
|
|
30885
|
-
const shouldShowPaymentCompletion = ((
|
|
31019
|
+
const cashBackDetail = (_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.unsigned) == null ? void 0 : _f.data) == null ? void 0 : _g.payload;
|
|
31020
|
+
const cashBackIsExist = (cashBackDetail == null ? void 0 : cashBackDetail.cashBackAmount) > 0 && ((_h = cashBackDetail == null ? void 0 : cashBackDetail.cashBackDetailList) == null ? void 0 : _h.length) > 0;
|
|
31021
|
+
const shouldShowPaymentCompletion = ((_i = props == null ? void 0 : props.paymentParams) == null ? void 0 : _i.alwaysDisplayCompletionScreen) || ((_j = props == null ? void 0 : props.paymentParams) == null ? void 0 : _j.isAuthorization) || cashBackIsExist && !((_k = props == null ? void 0 : props.paymentParams) == null ? void 0 : _k.isAuthorization);
|
|
30886
31022
|
state.calculated = true;
|
|
30887
31023
|
return {
|
|
30888
31024
|
cashBackDetail,
|
|
@@ -30942,7 +31078,7 @@ function useCharge(props) {
|
|
|
30942
31078
|
saveLastTopupPayMethod(paymentMethodId);
|
|
30943
31079
|
const res = await topup$3(query, body2);
|
|
30944
31080
|
const errorHandled = handleError2(res, { type: "topup", api: "topup" });
|
|
30945
|
-
if (
|
|
31081
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success" || !errorHandled) {
|
|
30946
31082
|
return false;
|
|
30947
31083
|
}
|
|
30948
31084
|
return true;
|
|
@@ -31300,7 +31436,9 @@ const _sfc_main$z = defineComponent({
|
|
|
31300
31436
|
default: false
|
|
31301
31437
|
}
|
|
31302
31438
|
},
|
|
31303
|
-
emits:
|
|
31439
|
+
emits: {
|
|
31440
|
+
click: () => true
|
|
31441
|
+
},
|
|
31304
31442
|
setup(props) {
|
|
31305
31443
|
const {
|
|
31306
31444
|
cancel: cancelRoot,
|
|
@@ -31349,7 +31487,7 @@ const _sfc_main$z = defineComponent({
|
|
|
31349
31487
|
updateAddressList
|
|
31350
31488
|
} = useAddressControl();
|
|
31351
31489
|
const {
|
|
31352
|
-
getPaymentMethods
|
|
31490
|
+
getPaymentMethods,
|
|
31353
31491
|
selectPayment,
|
|
31354
31492
|
paymentMethod: paymentMethod2,
|
|
31355
31493
|
paymentMethods,
|
|
@@ -31390,7 +31528,7 @@ const _sfc_main$z = defineComponent({
|
|
|
31390
31528
|
} = useCloseConfirmation();
|
|
31391
31529
|
onMounted(async () => {
|
|
31392
31530
|
startLoading();
|
|
31393
|
-
const res = await Promise.all([
|
|
31531
|
+
const res = await Promise.all([getPaymentMethods(true), getConsult2()]);
|
|
31394
31532
|
const paymentMethodResult = res[0];
|
|
31395
31533
|
const consultResult = res[1];
|
|
31396
31534
|
if (consultResult === true && paymentMethodResult.result === false) {
|
|
@@ -31408,17 +31546,10 @@ const _sfc_main$z = defineComponent({
|
|
|
31408
31546
|
}
|
|
31409
31547
|
});
|
|
31410
31548
|
const _pay = async () => {
|
|
31411
|
-
var _a
|
|
31412
|
-
if (selectedCardMethod.value) {
|
|
31413
|
-
const isAuthenticated = (_a = selectedCardMethod.value.creditCardInfo) == null ? void 0 : _a.isAuthenticated;
|
|
31414
|
-
if (!isAuthenticated) {
|
|
31415
|
-
show3DSecureSheet.value = true;
|
|
31416
|
-
return;
|
|
31417
|
-
}
|
|
31418
|
-
}
|
|
31549
|
+
var _a;
|
|
31419
31550
|
startPaying();
|
|
31420
31551
|
if (props.showUserAddress && (selectedAddress == null ? void 0 : selectedAddress.value))
|
|
31421
|
-
setSelectedAddress((
|
|
31552
|
+
setSelectedAddress((_a = selectedAddress == null ? void 0 : selectedAddress.value) == null ? void 0 : _a.id).catch(() => {
|
|
31422
31553
|
});
|
|
31423
31554
|
const res = await pay2();
|
|
31424
31555
|
if (!res)
|
|
@@ -31426,13 +31557,13 @@ const _sfc_main$z = defineComponent({
|
|
|
31426
31557
|
const address2 = (selectedAddress == null ? void 0 : selectedAddress.value) ? __spreadValues({}, selectedAddress.value) : null;
|
|
31427
31558
|
paymentSuccess(res, address2);
|
|
31428
31559
|
watch(() => paymentHandler.value, async () => {
|
|
31429
|
-
var _a2,
|
|
31560
|
+
var _a2, _b;
|
|
31430
31561
|
if (!(paymentHandler == null ? void 0 : paymentHandler.value))
|
|
31431
31562
|
return;
|
|
31432
31563
|
const cashBack2 = getCashBackDetail({
|
|
31433
31564
|
paymentId: res.unsigned.data.paymentId
|
|
31434
31565
|
});
|
|
31435
|
-
const alwaysDisplay = ((_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.alwaysDisplayCompletionScreen) || ((
|
|
31566
|
+
const alwaysDisplay = ((_a2 = props == null ? void 0 : props.paymentParams) == null ? void 0 : _a2.alwaysDisplayCompletionScreen) || ((_b = props == null ? void 0 : props.paymentParams) == null ? void 0 : _b.isAuthorization);
|
|
31436
31567
|
endPayment();
|
|
31437
31568
|
if (alwaysDisplay) {
|
|
31438
31569
|
showPaymentResult(res.unsigned.data);
|
|
@@ -31450,6 +31581,15 @@ const _sfc_main$z = defineComponent({
|
|
|
31450
31581
|
const paymentMethodForTopup = ref();
|
|
31451
31582
|
const amountForTopup = ref(0);
|
|
31452
31583
|
const beforeTopupAndPay = (beforeTopupAndPayParams) => {
|
|
31584
|
+
var _a;
|
|
31585
|
+
if (beforeTopupAndPayParams.paymentMethod.creditCardInfo) {
|
|
31586
|
+
selectedTopupMethod.value = beforeTopupAndPayParams.paymentMethod;
|
|
31587
|
+
const isAuthenticated = (_a = selectedTopupMethod.value.creditCardInfo) == null ? void 0 : _a.isAuthenticated;
|
|
31588
|
+
if (!isAuthenticated) {
|
|
31589
|
+
show3DSecureSheet.value = true;
|
|
31590
|
+
return;
|
|
31591
|
+
}
|
|
31592
|
+
}
|
|
31453
31593
|
amountForTopup.value = beforeTopupAndPayParams.amount;
|
|
31454
31594
|
paymentMethodForTopup.value = beforeTopupAndPayParams.paymentMethod;
|
|
31455
31595
|
const isDuplicateTopup = checkDuplicateTopup2(amountForTopup.value);
|
|
@@ -31505,16 +31645,10 @@ const _sfc_main$z = defineComponent({
|
|
|
31505
31645
|
}
|
|
31506
31646
|
};
|
|
31507
31647
|
const show3DSecureSheet = ref(false);
|
|
31508
|
-
const
|
|
31509
|
-
var _a;
|
|
31510
|
-
if ((_a = paymentMethod2.value) == null ? void 0 : _a.creditCardInfo) {
|
|
31511
|
-
return paymentMethod2.value;
|
|
31512
|
-
}
|
|
31513
|
-
return void 0;
|
|
31514
|
-
});
|
|
31648
|
+
const selectedTopupMethod = ref(void 0);
|
|
31515
31649
|
const selectedCCType = computed(() => {
|
|
31516
31650
|
var _a, _b;
|
|
31517
|
-
return (_b = (_a =
|
|
31651
|
+
return (_b = (_a = selectedTopupMethod.value) == null ? void 0 : _a.creditCardInfo) == null ? void 0 : _b.ccType;
|
|
31518
31652
|
});
|
|
31519
31653
|
const close3DSecureSheet = () => {
|
|
31520
31654
|
show3DSecureSheet.value = false;
|
|
@@ -31589,9 +31723,9 @@ const _sfc_main$z = defineComponent({
|
|
|
31589
31723
|
confirmCloseConfirmation,
|
|
31590
31724
|
cancelCloseConfirmation,
|
|
31591
31725
|
show3DSecureSheet,
|
|
31592
|
-
|
|
31593
|
-
|
|
31594
|
-
|
|
31726
|
+
selectedTopupMethod,
|
|
31727
|
+
close3DSecureSheet,
|
|
31728
|
+
selectedCCType
|
|
31595
31729
|
};
|
|
31596
31730
|
}
|
|
31597
31731
|
});
|
|
@@ -31828,7 +31962,9 @@ const _sfc_main$y = defineComponent({
|
|
|
31828
31962
|
default: false
|
|
31829
31963
|
}
|
|
31830
31964
|
},
|
|
31831
|
-
emits:
|
|
31965
|
+
emits: {
|
|
31966
|
+
click: () => true
|
|
31967
|
+
},
|
|
31832
31968
|
setup(props, context) {
|
|
31833
31969
|
const root2 = initRoot(props, context);
|
|
31834
31970
|
const { endApplication } = root2;
|
|
@@ -31873,7 +32009,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
31873
32009
|
createVNode(_component_ActionSheet, {
|
|
31874
32010
|
show: _ctx.showConsultError,
|
|
31875
32011
|
type: "alert",
|
|
31876
|
-
onClose: _ctx.closeError
|
|
32012
|
+
onClose: _cache[0] || (_cache[0] = ($event) => _ctx.closeError(false))
|
|
31877
32013
|
}, {
|
|
31878
32014
|
default: withCtx(() => [
|
|
31879
32015
|
_ctx.consultError ? (openBlock(), createBlock(_component_Consult, {
|
|
@@ -31883,13 +32019,13 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
31883
32019
|
}, null, 8, ["consult-info", "onClose"])) : createCommentVNode("", true)
|
|
31884
32020
|
]),
|
|
31885
32021
|
_: 1
|
|
31886
|
-
}, 8, ["show"
|
|
32022
|
+
}, 8, ["show"]),
|
|
31887
32023
|
createVNode(_component_ErrorSheet, {
|
|
31888
32024
|
"error-title": _ctx.errorTitle,
|
|
31889
32025
|
"icon-url": _ctx.errorIcon,
|
|
31890
32026
|
"error-text": _ctx.errorDescription,
|
|
31891
32027
|
show: _ctx.isError || _ctx.isErrorOverlay,
|
|
31892
|
-
onCloseClick: _cache[
|
|
32028
|
+
onCloseClick: _cache[1] || (_cache[1] = ($event) => _ctx.closeError(true))
|
|
31893
32029
|
}, null, 8, ["error-title", "icon-url", "error-text", "show"])
|
|
31894
32030
|
], 64);
|
|
31895
32031
|
}
|
|
@@ -31963,9 +32099,9 @@ const initMakePayment = async (initMakePayment2) => {
|
|
|
31963
32099
|
let showUserAddress;
|
|
31964
32100
|
if ((_d = (_c = initMakePayment2 == null ? void 0 : initMakePayment2.additionalUserInfo) == null ? void 0 : _c.userAddress) == null ? void 0 : _d.visible) {
|
|
31965
32101
|
const res = await getAddressList();
|
|
31966
|
-
if (res.ppFetchResult !== "success") {
|
|
32102
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
31967
32103
|
(_e = initMakePayment2 == null ? void 0 : initMakePayment2.fail) == null ? void 0 : _e.call(initMakePayment2, {
|
|
31968
|
-
errorCode:
|
|
32104
|
+
errorCode: getFailErrorCode(res == null ? void 0 : res.ppFetchResult)
|
|
31969
32105
|
});
|
|
31970
32106
|
(_f = initMakePayment2 == null ? void 0 : initMakePayment2.complete) == null ? void 0 : _f.call(initMakePayment2);
|
|
31971
32107
|
return;
|
|
@@ -32081,9 +32217,9 @@ const initErrorSheet = (initErrorSheet2) => {
|
|
|
32081
32217
|
app.mount(container2);
|
|
32082
32218
|
document.body.appendChild(container2);
|
|
32083
32219
|
};
|
|
32084
|
-
function showErrorSheet(
|
|
32220
|
+
function showErrorSheet(errorSheetParams) {
|
|
32085
32221
|
var _a;
|
|
32086
|
-
reconstructParams(
|
|
32222
|
+
const params = reconstructParams(errorSheetParams);
|
|
32087
32223
|
try {
|
|
32088
32224
|
initErrorSheet(params);
|
|
32089
32225
|
} catch {
|
|
@@ -32136,7 +32272,9 @@ const _sfc_main$x = defineComponent({
|
|
|
32136
32272
|
default: "Ok"
|
|
32137
32273
|
}
|
|
32138
32274
|
},
|
|
32139
|
-
emits:
|
|
32275
|
+
emits: {
|
|
32276
|
+
"close-click": () => true
|
|
32277
|
+
},
|
|
32140
32278
|
setup(props, { emit }) {
|
|
32141
32279
|
const onClick = () => emit("close-click");
|
|
32142
32280
|
const style = useCssModule();
|
|
@@ -32230,9 +32368,9 @@ const initAlertSheet = (initAlertSheet2) => {
|
|
|
32230
32368
|
app.mount(container2);
|
|
32231
32369
|
document.body.appendChild(container2);
|
|
32232
32370
|
};
|
|
32233
|
-
function showAlert(
|
|
32371
|
+
function showAlert(showAlertParams) {
|
|
32234
32372
|
var _a;
|
|
32235
|
-
reconstructParams(
|
|
32373
|
+
const params = reconstructParams(showAlertParams);
|
|
32236
32374
|
try {
|
|
32237
32375
|
initAlertSheet(params);
|
|
32238
32376
|
} catch {
|
|
@@ -32266,7 +32404,9 @@ const _sfc_main$w = defineComponent({
|
|
|
32266
32404
|
}
|
|
32267
32405
|
}
|
|
32268
32406
|
},
|
|
32269
|
-
emits:
|
|
32407
|
+
emits: {
|
|
32408
|
+
click: (_item, _index) => true
|
|
32409
|
+
},
|
|
32270
32410
|
setup(props, { emit }) {
|
|
32271
32411
|
const style = useCssModule();
|
|
32272
32412
|
const click = (item, index2) => {
|
|
@@ -32368,7 +32508,9 @@ const _sfc_main$v = defineComponent({
|
|
|
32368
32508
|
required: true
|
|
32369
32509
|
}
|
|
32370
32510
|
},
|
|
32371
|
-
emits:
|
|
32511
|
+
emits: {
|
|
32512
|
+
click: () => true
|
|
32513
|
+
},
|
|
32372
32514
|
setup(props) {
|
|
32373
32515
|
const lg2 = getLanguage();
|
|
32374
32516
|
const style = useCssModule();
|
|
@@ -32447,7 +32589,9 @@ const _sfc_main$u = defineComponent({
|
|
|
32447
32589
|
}
|
|
32448
32590
|
}
|
|
32449
32591
|
},
|
|
32450
|
-
emits:
|
|
32592
|
+
emits: {
|
|
32593
|
+
close: () => true
|
|
32594
|
+
},
|
|
32451
32595
|
setup(props) {
|
|
32452
32596
|
const style = useCssModule();
|
|
32453
32597
|
return {
|
|
@@ -32669,7 +32813,9 @@ const _sfc_main$t = defineComponent({
|
|
|
32669
32813
|
default: () => ({})
|
|
32670
32814
|
}
|
|
32671
32815
|
},
|
|
32672
|
-
emits:
|
|
32816
|
+
emits: {
|
|
32817
|
+
click: () => true
|
|
32818
|
+
},
|
|
32673
32819
|
data() {
|
|
32674
32820
|
return {
|
|
32675
32821
|
loading: false,
|
|
@@ -32815,22 +32961,22 @@ const _sfc_main$t = defineComponent({
|
|
|
32815
32961
|
}
|
|
32816
32962
|
},
|
|
32817
32963
|
async switchInput() {
|
|
32818
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
32964
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
32819
32965
|
this.isInput = true;
|
|
32820
32966
|
const cashbackInfo2 = await getCashBackInfo();
|
|
32821
|
-
if (!cashbackInfo2 ||
|
|
32822
|
-
this.errorCode = MiniAppErrorType.serverError;
|
|
32967
|
+
if (!cashbackInfo2 || (cashbackInfo2 == null ? void 0 : cashbackInfo2.ppFetchResult) !== "success") {
|
|
32968
|
+
this.errorCode = (cashbackInfo2 == null ? void 0 : cashbackInfo2.ppFetchResult) === "notAuthorized" ? MiniAppErrorType.notAuthorized : (cashbackInfo2 == null ? void 0 : cashbackInfo2.ppFetchResult) === "timeout" ? MiniAppErrorType.timeOut : MiniAppErrorType.serverError;
|
|
32823
32969
|
this.showError();
|
|
32824
32970
|
return;
|
|
32825
32971
|
}
|
|
32826
|
-
this.cashbackData = (_a = cashbackInfo2 == null ? void 0 : cashbackInfo2.
|
|
32972
|
+
this.cashbackData = (_b = (_a = cashbackInfo2 == null ? void 0 : cashbackInfo2.body) == null ? void 0 : _a.data) == null ? void 0 : _b.payload;
|
|
32827
32973
|
this.inputMoney = 0;
|
|
32828
32974
|
this.minAmountUnmet = false;
|
|
32829
32975
|
this.maxAmountExceeded = false;
|
|
32830
|
-
this.fixBalMoney = (_f = (_e = (_d = (_c =
|
|
32976
|
+
this.fixBalMoney = (_h = (_g = (_f = (_e = (_d = (_c = cashbackInfo2 == null ? void 0 : cashbackInfo2.body) == null ? void 0 : _c.data) == null ? void 0 : _d.payload) == null ? void 0 : _e.walletSummary) == null ? void 0 : _f.totalBalanceInfo) == null ? void 0 : _g.balance) != null ? _h : 0;
|
|
32831
32977
|
this.balMoney = formatCurrency(this.inputMoney + this.fixBalMoney, 0);
|
|
32832
|
-
this.fixCashbackBalance = (
|
|
32833
|
-
this.totalCashbackBalance = (
|
|
32978
|
+
this.fixCashbackBalance = (_n = (_m = (_l = (_k = (_j = (_i = cashbackInfo2 == null ? void 0 : cashbackInfo2.body) == null ? void 0 : _i.data) == null ? void 0 : _j.payload) == null ? void 0 : _k.walletSummary) == null ? void 0 : _l.allTotalBalanceInfo) == null ? void 0 : _m.balance) != null ? _n : 0;
|
|
32979
|
+
this.totalCashbackBalance = (_o = formatCurrency(this.inputMoney + this.fixCashbackBalance, 0)) != null ? _o : "0";
|
|
32834
32980
|
setTimeout(() => {
|
|
32835
32981
|
var _a2;
|
|
32836
32982
|
(_a2 = document.getElementById("inputmoney")) == null ? void 0 : _a2.focus();
|
|
@@ -32870,7 +33016,7 @@ const _sfc_main$t = defineComponent({
|
|
|
32870
33016
|
this.bannerInfoVisible = true;
|
|
32871
33017
|
},
|
|
32872
33018
|
bannerBtnClick(item, index2) {
|
|
32873
|
-
if (item == null ? void 0 : item.deeplink) {
|
|
33019
|
+
if ((item == null ? void 0 : item.deeplink) && index2 !== void 0) {
|
|
32874
33020
|
if (isValidUrl(item == null ? void 0 : item.deeplink)) {
|
|
32875
33021
|
openWebviewInternal({ url: item == null ? void 0 : item.deeplink });
|
|
32876
33022
|
document.getElementsByName("listbtn_".concat(String(index2 + 1)))[0].focus();
|
|
@@ -32924,7 +33070,7 @@ const _sfc_main$t = defineComponent({
|
|
|
32924
33070
|
this.$emit("click");
|
|
32925
33071
|
},
|
|
32926
33072
|
async clickTopup(agreeSimilarTransaction) {
|
|
32927
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
|
|
33073
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P;
|
|
32928
33074
|
if (this.selectedCardMethod) {
|
|
32929
33075
|
const isAuthenticated = (_a = this.selectedCardMethod.creditCardInfo) == null ? void 0 : _a.isAuthenticated;
|
|
32930
33076
|
if (!isAuthenticated) {
|
|
@@ -32964,38 +33110,37 @@ const _sfc_main$t = defineComponent({
|
|
|
32964
33110
|
},
|
|
32965
33111
|
requestedAt: (_h = (_g = this.topupParams) == null ? void 0 : _g.requestedAt) != null ? _h : 0
|
|
32966
33112
|
});
|
|
32967
|
-
if (
|
|
32968
|
-
|
|
33113
|
+
if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && ((_i = res == null ? void 0 : res.body) == null ? void 0 : _i.uiComponents)) {
|
|
33114
|
+
if ((_k = (_j = res == null ? void 0 : res.body) == null ? void 0 : _j.uiComponents) == null ? void 0 : _k.displayErrorResponse) {
|
|
33115
|
+
this.errorInfo.iconUrl = (_o = (_n = (_m = (_l = res == null ? void 0 : res.body) == null ? void 0 : _l.uiComponents) == null ? void 0 : _m.displayErrorResponse) == null ? void 0 : _n.iconUrl) != null ? _o : "";
|
|
33116
|
+
this.errorInfo.title = (_r = (_q = (_p = res == null ? void 0 : res.body) == null ? void 0 : _p.uiComponents) == null ? void 0 : _q.displayErrorResponse) == null ? void 0 : _r.title;
|
|
33117
|
+
this.errorInfo.desc = (_u = (_t = (_s = res == null ? void 0 : res.body) == null ? void 0 : _s.uiComponents) == null ? void 0 : _t.displayErrorResponse) == null ? void 0 : _u.description;
|
|
33118
|
+
this.errorInfo.buttonList = (_x = (_w = (_v = res == null ? void 0 : res.body) == null ? void 0 : _v.uiComponents) == null ? void 0 : _w.displayErrorResponse) == null ? void 0 : _x.buttonList;
|
|
33119
|
+
}
|
|
33120
|
+
this.errorCode = MiniAppErrorType.topupFail;
|
|
33121
|
+
this.jws = ((_z = (_y = res == null ? void 0 : res.body) == null ? void 0 : _y.signed) == null ? void 0 : _z.jws) || "";
|
|
33122
|
+
this.showError();
|
|
33123
|
+
} else if (!res || (res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
33124
|
+
this.errorCode = (res == null ? void 0 : res.ppFetchResult) === "notAuthorized" ? MiniAppErrorType.notAuthorized : (res == null ? void 0 : res.ppFetchResult) === "timeout" ? MiniAppErrorType.timeOut : MiniAppErrorType.serverError;
|
|
32969
33125
|
this.errorShow = true;
|
|
32970
33126
|
return;
|
|
32971
|
-
}
|
|
32972
|
-
if (((_j = (_i = res == null ? void 0 : res.unsigned) == null ? void 0 : _i.resultInfo) == null ? void 0 : _j.code) === "SUCCESS" && ((_l = (_k = res == null ? void 0 : res.unsigned) == null ? void 0 : _k.data) == null ? void 0 : _l.status) === "COMPLETED") {
|
|
33127
|
+
} else if (((_C = (_B = (_A = res == null ? void 0 : res.body) == null ? void 0 : _A.unsigned) == null ? void 0 : _B.resultInfo) == null ? void 0 : _C.code) === "SUCCESS" && ((_F = (_E = (_D = res == null ? void 0 : res.body) == null ? void 0 : _D.unsigned) == null ? void 0 : _E.data) == null ? void 0 : _F.status) === "COMPLETED") {
|
|
32973
33128
|
this.loading = false;
|
|
32974
|
-
this.completionData.unsignedData = (
|
|
32975
|
-
this.completionData.jws = ((
|
|
33129
|
+
this.completionData.unsignedData = (_H = (_G = res == null ? void 0 : res.body) == null ? void 0 : _G.unsigned) == null ? void 0 : _H.data;
|
|
33130
|
+
this.completionData.jws = ((_J = (_I = res == null ? void 0 : res.body) == null ? void 0 : _I.signed) == null ? void 0 : _J.jws) || "";
|
|
32976
33131
|
this.done = true;
|
|
32977
33132
|
setTimeout(() => {
|
|
32978
33133
|
this.isInput = false;
|
|
32979
33134
|
this.done = false;
|
|
32980
33135
|
this.complete = true;
|
|
32981
33136
|
}, 1500);
|
|
32982
|
-
} else if (res.
|
|
32983
|
-
if ((_o = res.uiComponents) == null ? void 0 : _o.displayErrorResponse) {
|
|
32984
|
-
this.errorInfo.iconUrl = (_r = (_q = (_p = res.uiComponents) == null ? void 0 : _p.displayErrorResponse) == null ? void 0 : _q.iconUrl) != null ? _r : "";
|
|
32985
|
-
this.errorInfo.title = (_t = (_s = res.uiComponents) == null ? void 0 : _s.displayErrorResponse) == null ? void 0 : _t.title;
|
|
32986
|
-
this.errorInfo.desc = (_v = (_u = res.uiComponents) == null ? void 0 : _u.displayErrorResponse) == null ? void 0 : _v.description;
|
|
32987
|
-
this.errorInfo.buttonList = (_x = (_w = res.uiComponents) == null ? void 0 : _w.displayErrorResponse) == null ? void 0 : _x.buttonList;
|
|
32988
|
-
}
|
|
32989
|
-
this.errorCode = MiniAppErrorType.topupFail;
|
|
32990
|
-
this.jws = ((_y = res == null ? void 0 : res.signed) == null ? void 0 : _y.jws) || "";
|
|
32991
|
-
this.showError();
|
|
32992
|
-
} else if (res.status === 401 || res.status === 400) {
|
|
33137
|
+
} else if (((_K = res == null ? void 0 : res.body) == null ? void 0 : _K.status) === 401 || ((_L = res == null ? void 0 : res.body) == null ? void 0 : _L.status) === 400) {
|
|
32993
33138
|
this.errorCode = MiniAppErrorType.invalidHeader;
|
|
32994
|
-
this.jws = ((
|
|
33139
|
+
this.jws = ((_N = (_M = res == null ? void 0 : res.body) == null ? void 0 : _M.signed) == null ? void 0 : _N.jws) || "";
|
|
32995
33140
|
this.showError();
|
|
32996
33141
|
} else {
|
|
32997
33142
|
this.errorCode = MiniAppErrorType.topupFail;
|
|
32998
|
-
this.jws = ((
|
|
33143
|
+
this.jws = ((_P = (_O = res == null ? void 0 : res.body) == null ? void 0 : _O.signed) == null ? void 0 : _P.jws) || "";
|
|
32999
33144
|
this.showError();
|
|
33000
33145
|
}
|
|
33001
33146
|
} catch (error2) {
|
|
@@ -33303,7 +33448,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33303
33448
|
createVNode(_component_ActionSheet, {
|
|
33304
33449
|
show: _ctx.bannerInfoVisible,
|
|
33305
33450
|
type: "alert",
|
|
33306
|
-
onClose: _ctx.bannerBtnClick
|
|
33451
|
+
onClose: _cache[7] || (_cache[7] = ($event) => _ctx.bannerBtnClick())
|
|
33307
33452
|
}, {
|
|
33308
33453
|
default: withCtx(() => [
|
|
33309
33454
|
createVNode(_component_BannerInfo, {
|
|
@@ -33312,7 +33457,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33312
33457
|
}, null, 8, ["selected-payment-method", "onClick"])
|
|
33313
33458
|
]),
|
|
33314
33459
|
_: 1
|
|
33315
|
-
}, 8, ["show"
|
|
33460
|
+
}, 8, ["show"]),
|
|
33316
33461
|
createVNode(_component_ActionSheet, {
|
|
33317
33462
|
show: _ctx.complete,
|
|
33318
33463
|
"no-overlay": ""
|
|
@@ -33331,7 +33476,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33331
33476
|
"error-text": _ctx.errorInfo.desc,
|
|
33332
33477
|
"button-list": _ctx.errorInfo.buttonList,
|
|
33333
33478
|
show: _ctx.errorShow || _ctx.errorOverlay,
|
|
33334
|
-
onCloseClick: _cache[
|
|
33479
|
+
onCloseClick: _cache[8] || (_cache[8] = ($event) => _ctx.closeErrorSheet())
|
|
33335
33480
|
}, null, 8, ["error-title", "icon-url", "error-text", "button-list", "show"]),
|
|
33336
33481
|
createVNode(_component_ThreeDSecureSheet, {
|
|
33337
33482
|
show: _ctx.show3DSecureSheet,
|
|
@@ -33372,8 +33517,8 @@ const initTopup = (topupParams) => {
|
|
|
33372
33517
|
document.body.appendChild(container2);
|
|
33373
33518
|
};
|
|
33374
33519
|
function topup$1(params) {
|
|
33375
|
-
reconstructParams(params);
|
|
33376
|
-
initTopup(
|
|
33520
|
+
const newParams = reconstructParams(params);
|
|
33521
|
+
initTopup(newParams);
|
|
33377
33522
|
}
|
|
33378
33523
|
const showUpdateWarningModal = "_showUpdateWarningModal_ukaz2_2";
|
|
33379
33524
|
const updateBody = "_updateBody_ukaz2_12";
|
|
@@ -33549,11 +33694,10 @@ const initShowUpdateWarning = (params) => {
|
|
|
33549
33694
|
document.body.appendChild(container2);
|
|
33550
33695
|
};
|
|
33551
33696
|
function showUpdateWarning$1(params) {
|
|
33552
|
-
reconstructParams(params);
|
|
33553
|
-
initShowUpdateWarning(
|
|
33697
|
+
const newParams = reconstructParams(params);
|
|
33698
|
+
initShowUpdateWarning(newParams);
|
|
33554
33699
|
}
|
|
33555
|
-
function scanCode(
|
|
33556
|
-
reconstructParams(params);
|
|
33700
|
+
function scanCode(_params) {
|
|
33557
33701
|
if (isPayPayMiniApp()) {
|
|
33558
33702
|
closeApp({
|
|
33559
33703
|
options: {
|
|
@@ -33656,7 +33800,9 @@ const _sfc_main$r = defineComponent({
|
|
|
33656
33800
|
}
|
|
33657
33801
|
}
|
|
33658
33802
|
},
|
|
33659
|
-
emits:
|
|
33803
|
+
emits: {
|
|
33804
|
+
click: () => true
|
|
33805
|
+
},
|
|
33660
33806
|
data() {
|
|
33661
33807
|
return {
|
|
33662
33808
|
lg: getLanguage()
|
|
@@ -33749,9 +33895,9 @@ const initTakePhoto = (initTakePhoto2) => {
|
|
|
33749
33895
|
app.mount(container2);
|
|
33750
33896
|
document.body.appendChild(container2);
|
|
33751
33897
|
};
|
|
33752
|
-
async function takePhoto$1(
|
|
33898
|
+
async function takePhoto$1(takePhotoParams) {
|
|
33753
33899
|
var _a, _b;
|
|
33754
|
-
reconstructParams(
|
|
33900
|
+
const params = reconstructParams(takePhotoParams);
|
|
33755
33901
|
try {
|
|
33756
33902
|
const grantStatus = await checkPermission([
|
|
33757
33903
|
PermissionName.mini_app_user_phone_album,
|
|
@@ -33771,15 +33917,15 @@ async function takePhoto$1(params) {
|
|
|
33771
33917
|
takePhotoInternal(params, TakePhotoMode.album);
|
|
33772
33918
|
}
|
|
33773
33919
|
}
|
|
33774
|
-
function setTitle(
|
|
33920
|
+
function setTitle(setTitleParams) {
|
|
33775
33921
|
var _a;
|
|
33776
|
-
reconstructParams(
|
|
33922
|
+
const params = reconstructParams(setTitleParams);
|
|
33777
33923
|
document.title = (params == null ? void 0 : params.title) || "";
|
|
33778
33924
|
(_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params);
|
|
33779
33925
|
}
|
|
33780
|
-
async function getUserLocation(
|
|
33781
|
-
var _a, _b, _c;
|
|
33782
|
-
reconstructParams(
|
|
33926
|
+
async function getUserLocation(getUserLocationParams) {
|
|
33927
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
33928
|
+
const params = reconstructParams(getUserLocationParams);
|
|
33783
33929
|
try {
|
|
33784
33930
|
const grantStatus = await checkPermission(PermissionName.mini_app_user_location);
|
|
33785
33931
|
if (grantStatus !== PermissionStatus.granted) {
|
|
@@ -33792,10 +33938,10 @@ async function getUserLocation(params) {
|
|
|
33792
33938
|
}
|
|
33793
33939
|
if (validTimeMinutes > 0) {
|
|
33794
33940
|
const resp = await getUserLocationRequest({ validTimeMinutes });
|
|
33795
|
-
if (
|
|
33796
|
-
const lat = Number.parseFloat(resp.unsigned.data.location.lat);
|
|
33797
|
-
const long = Number.parseFloat(resp.unsigned.data.location.lon);
|
|
33798
|
-
(
|
|
33941
|
+
if ((resp == null ? void 0 : resp.ppFetchResult) === "success" && ((_d = (_c = (_b = resp == null ? void 0 : resp.body) == null ? void 0 : _b.unsigned) == null ? void 0 : _c.data) == null ? void 0 : _d.location)) {
|
|
33942
|
+
const lat = Number.parseFloat((_h = (_g = (_f = (_e = resp == null ? void 0 : resp.body) == null ? void 0 : _e.unsigned) == null ? void 0 : _f.data) == null ? void 0 : _g.location) == null ? void 0 : _h.lat);
|
|
33943
|
+
const long = Number.parseFloat((_l = (_k = (_j = (_i = resp == null ? void 0 : resp.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.data) == null ? void 0 : _k.location) == null ? void 0 : _l.lon);
|
|
33944
|
+
(_m = params == null ? void 0 : params.success) == null ? void 0 : _m.call(params, {
|
|
33799
33945
|
result: {
|
|
33800
33946
|
lat,
|
|
33801
33947
|
long
|
|
@@ -33838,7 +33984,7 @@ async function getUserLocation(params) {
|
|
|
33838
33984
|
}
|
|
33839
33985
|
});
|
|
33840
33986
|
} catch {
|
|
33841
|
-
(
|
|
33987
|
+
(_n = params == null ? void 0 : params.fail) == null ? void 0 : _n.call(params, { errorCode: MiniAppErrorType.other });
|
|
33842
33988
|
}
|
|
33843
33989
|
}
|
|
33844
33990
|
const initGetUserAddress = async (params) => {
|
|
@@ -33852,9 +33998,9 @@ const initGetUserAddress = async (params) => {
|
|
|
33852
33998
|
const container2 = document.createElement("div");
|
|
33853
33999
|
container2.className = "ppmna-reset-css";
|
|
33854
34000
|
const res = await getAddressList();
|
|
33855
|
-
if (res.ppFetchResult !== "success") {
|
|
34001
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success") {
|
|
33856
34002
|
(_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, {
|
|
33857
|
-
errorCode:
|
|
34003
|
+
errorCode: getFailErrorCode(res == null ? void 0 : res.ppFetchResult)
|
|
33858
34004
|
});
|
|
33859
34005
|
return;
|
|
33860
34006
|
}
|
|
@@ -33893,8 +34039,8 @@ const initGetUserAddress = async (params) => {
|
|
|
33893
34039
|
document.body.appendChild(container2);
|
|
33894
34040
|
};
|
|
33895
34041
|
function getUserAddress(params) {
|
|
33896
|
-
reconstructParams(params);
|
|
33897
|
-
initGetUserAddress(
|
|
34042
|
+
const newParams = reconstructParams(params);
|
|
34043
|
+
initGetUserAddress(newParams).catch(() => {
|
|
33898
34044
|
});
|
|
33899
34045
|
}
|
|
33900
34046
|
function useRoot(props, { emit }) {
|
|
@@ -34001,7 +34147,9 @@ const _sfc_main$q = defineComponent({
|
|
|
34001
34147
|
default: false
|
|
34002
34148
|
}
|
|
34003
34149
|
},
|
|
34004
|
-
emits:
|
|
34150
|
+
emits: {
|
|
34151
|
+
click: () => true
|
|
34152
|
+
},
|
|
34005
34153
|
setup(props, context) {
|
|
34006
34154
|
const { cancel: cancel2, success: success2 } = useRoot(props, context);
|
|
34007
34155
|
const {
|
|
@@ -34094,8 +34242,8 @@ const initInputAddress = (params) => {
|
|
|
34094
34242
|
document.body.appendChild(container2);
|
|
34095
34243
|
};
|
|
34096
34244
|
function inputAddress(params) {
|
|
34097
|
-
reconstructParams(params);
|
|
34098
|
-
initInputAddress(
|
|
34245
|
+
const newParams = reconstructParams(params);
|
|
34246
|
+
initInputAddress(newParams);
|
|
34099
34247
|
}
|
|
34100
34248
|
const openMapActionsheetContainer = "_openMapActionsheetContainer_rokvr_2";
|
|
34101
34249
|
const mapList = "_mapList_rokvr_8";
|
|
@@ -34129,7 +34277,9 @@ const _sfc_main$p = defineComponent({
|
|
|
34129
34277
|
}
|
|
34130
34278
|
}
|
|
34131
34279
|
},
|
|
34132
|
-
emits:
|
|
34280
|
+
emits: {
|
|
34281
|
+
click: () => true
|
|
34282
|
+
},
|
|
34133
34283
|
data() {
|
|
34134
34284
|
var _a, _b;
|
|
34135
34285
|
return {
|
|
@@ -34260,8 +34410,8 @@ const initOpenMap = (initOpenMap2) => {
|
|
|
34260
34410
|
document.body.appendChild(container2);
|
|
34261
34411
|
};
|
|
34262
34412
|
function openMap$1(params) {
|
|
34263
|
-
reconstructParams(params);
|
|
34264
|
-
initOpenMap(
|
|
34413
|
+
const newParams = reconstructParams(params);
|
|
34414
|
+
initOpenMap(newParams);
|
|
34265
34415
|
}
|
|
34266
34416
|
const root$1 = "_root_cejvg_2";
|
|
34267
34417
|
const appIcon = "_appIcon_cejvg_11";
|
|
@@ -34291,7 +34441,9 @@ const _sfc_main$o = defineComponent({
|
|
|
34291
34441
|
}
|
|
34292
34442
|
}
|
|
34293
34443
|
},
|
|
34294
|
-
emits:
|
|
34444
|
+
emits: {
|
|
34445
|
+
click: () => true
|
|
34446
|
+
},
|
|
34295
34447
|
setup(props, { emit }) {
|
|
34296
34448
|
const state = reactive({
|
|
34297
34449
|
errorShow: false
|
|
@@ -34424,9 +34576,9 @@ const initOpenApp = (initOpenApp2) => {
|
|
|
34424
34576
|
app.mount(container2);
|
|
34425
34577
|
document.body.appendChild(container2);
|
|
34426
34578
|
};
|
|
34427
|
-
function openApp$1(
|
|
34579
|
+
function openApp$1(openAppParams) {
|
|
34428
34580
|
var _a, _b, _c, _d;
|
|
34429
|
-
reconstructParams(
|
|
34581
|
+
const params = reconstructParams(openAppParams);
|
|
34430
34582
|
let url;
|
|
34431
34583
|
try {
|
|
34432
34584
|
url = new URL((_c = (_b = params == null ? void 0 : params.url) != null ? _b : (_a = params == null ? void 0 : params.ios) == null ? void 0 : _a.link) != null ? _c : "");
|
|
@@ -34438,10 +34590,11 @@ function openApp$1(params) {
|
|
|
34438
34590
|
}
|
|
34439
34591
|
initOpenApp(params);
|
|
34440
34592
|
}
|
|
34441
|
-
function openMiniApp(
|
|
34593
|
+
function openMiniApp(openMiniappParams) {
|
|
34442
34594
|
var _a, _b;
|
|
34443
|
-
|
|
34444
|
-
|
|
34595
|
+
let params = null;
|
|
34596
|
+
if (openMiniappParams) {
|
|
34597
|
+
params = reconstructParams(openMiniappParams);
|
|
34445
34598
|
}
|
|
34446
34599
|
const clientId = getClientId();
|
|
34447
34600
|
if (!clientId) {
|
|
@@ -34451,15 +34604,15 @@ function openMiniApp(params) {
|
|
|
34451
34604
|
window.location.href = appUrl;
|
|
34452
34605
|
(_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params);
|
|
34453
34606
|
}
|
|
34454
|
-
async function checkPaymentMethod(
|
|
34455
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
34456
|
-
reconstructParams(
|
|
34607
|
+
async function checkPaymentMethod(checkPayMethodParams) {
|
|
34608
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
34609
|
+
const params = reconstructParams(checkPayMethodParams);
|
|
34457
34610
|
try {
|
|
34458
34611
|
const grantStatus = await checkPermission(PermissionName.mini_app_check_payment_method);
|
|
34459
34612
|
if (grantStatus !== PermissionStatus.granted) {
|
|
34460
34613
|
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.insufficientScope });
|
|
34461
34614
|
}
|
|
34462
|
-
let result2 = await
|
|
34615
|
+
let result2 = await ppFetch2({
|
|
34463
34616
|
method: "GET",
|
|
34464
34617
|
url: "web-api/app/v2/payment/methods",
|
|
34465
34618
|
params: {
|
|
@@ -34471,28 +34624,30 @@ async function checkPaymentMethod(params) {
|
|
|
34471
34624
|
sourceInfoApp: params == null ? void 0 : params.sourceInfoApp
|
|
34472
34625
|
}
|
|
34473
34626
|
});
|
|
34474
|
-
|
|
34627
|
+
if (result2.ppFetchResult !== "success") {
|
|
34628
|
+
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: getFailErrorCode(result2.ppFetchResult) });
|
|
34629
|
+
}
|
|
34630
|
+
let paymentMethodList = (_e = (_d = (_c = result2 == null ? void 0 : result2.body.unsigned) == null ? void 0 : _c.data) == null ? void 0 : _d.payload) == null ? void 0 : _e.paymentMethodList;
|
|
34475
34631
|
if (!paymentMethodList) {
|
|
34476
|
-
(
|
|
34632
|
+
return (_f = params == null ? void 0 : params.fail) == null ? void 0 : _f.call(params, { errorCode: MiniAppErrorType.serverError });
|
|
34477
34633
|
} else if (paymentMethodList.length > 0) {
|
|
34478
|
-
(
|
|
34634
|
+
return (_g = params == null ? void 0 : params.success) == null ? void 0 : _g.call(params, { status: "AVAILABLE" });
|
|
34479
34635
|
} else {
|
|
34480
|
-
(
|
|
34636
|
+
return (_h = params == null ? void 0 : params.success) == null ? void 0 : _h.call(params, { status: "UNAVAILABLE" });
|
|
34481
34637
|
}
|
|
34482
34638
|
} catch {
|
|
34483
|
-
(
|
|
34639
|
+
return (_i = params == null ? void 0 : params.fail) == null ? void 0 : _i.call(params, { errorCode: MiniAppErrorType.serverError });
|
|
34484
34640
|
}
|
|
34485
34641
|
}
|
|
34486
|
-
async function requestInternal(
|
|
34487
|
-
var _a, _b, _c, _d;
|
|
34488
|
-
reconstructParams(
|
|
34642
|
+
async function requestInternal(requestInternalParams) {
|
|
34643
|
+
var _a, _b, _c, _d, _e, _f;
|
|
34644
|
+
const params = reconstructParams(requestInternalParams);
|
|
34489
34645
|
try {
|
|
34490
34646
|
const appDetail = getAppDetail();
|
|
34491
34647
|
if (!(appDetail == null ? void 0 : appDetail.isInternal)) {
|
|
34492
|
-
(_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.insufficientScope });
|
|
34493
|
-
return;
|
|
34648
|
+
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.insufficientScope });
|
|
34494
34649
|
}
|
|
34495
|
-
const response = await
|
|
34650
|
+
const response = await ppFetch2({
|
|
34496
34651
|
method: "POST",
|
|
34497
34652
|
url: "web-api/app/v1/internal/request",
|
|
34498
34653
|
data: {
|
|
@@ -34503,27 +34658,27 @@ async function requestInternal(params) {
|
|
|
34503
34658
|
},
|
|
34504
34659
|
headers: params == null ? void 0 : params.header
|
|
34505
34660
|
});
|
|
34506
|
-
if (
|
|
34507
|
-
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode:
|
|
34661
|
+
if (response.ppFetchResult !== "success") {
|
|
34662
|
+
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: getFailErrorCode(response.ppFetchResult) });
|
|
34508
34663
|
}
|
|
34509
|
-
const statusCode = response.statusCode;
|
|
34510
|
-
|
|
34511
|
-
(
|
|
34664
|
+
const statusCode = (_c = response == null ? void 0 : response.body) == null ? void 0 : _c.statusCode;
|
|
34665
|
+
(_d = response == null ? void 0 : response.body) == null ? true : delete _d.statusCode;
|
|
34666
|
+
return (_e = params == null ? void 0 : params.success) == null ? void 0 : _e.call(params, {
|
|
34512
34667
|
statusCode,
|
|
34513
|
-
data: JSON.stringify(response)
|
|
34668
|
+
data: JSON.stringify(response == null ? void 0 : response.body)
|
|
34514
34669
|
});
|
|
34515
34670
|
} catch (error2) {
|
|
34516
|
-
(
|
|
34671
|
+
return (_f = params == null ? void 0 : params.fail) == null ? void 0 : _f.call(params, { errorCode: MiniAppErrorType.statusCodeError });
|
|
34517
34672
|
}
|
|
34518
34673
|
}
|
|
34519
34674
|
function debug(params) {
|
|
34520
|
-
reconstructParams(params);
|
|
34521
|
-
execute$6(
|
|
34675
|
+
const newParams = reconstructParams(params);
|
|
34676
|
+
execute$6(newParams);
|
|
34522
34677
|
}
|
|
34523
34678
|
function execute$6(params) {
|
|
34524
34679
|
var _a;
|
|
34525
34680
|
(_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, {
|
|
34526
|
-
v: "1.
|
|
34681
|
+
v: "1.40.0"
|
|
34527
34682
|
});
|
|
34528
34683
|
}
|
|
34529
34684
|
function useCallBack(props, ctx) {
|
|
@@ -34554,15 +34709,17 @@ const defaultError = {
|
|
|
34554
34709
|
description: lg$1.registerEmail.errorDescription
|
|
34555
34710
|
};
|
|
34556
34711
|
const createErrorMessage = (res) => {
|
|
34557
|
-
|
|
34558
|
-
|
|
34559
|
-
if (res.statusCode !== 200 && res.uiComponents)
|
|
34712
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
34713
|
+
if ((res == null ? void 0 : res.ppFetchResult) === "apiError" && ((_a = res == null ? void 0 : res.body) == null ? void 0 : _a.uiComponents)) {
|
|
34560
34714
|
return {
|
|
34561
34715
|
open: true,
|
|
34562
|
-
iconUrl: res.uiComponents.displayErrorResponse.iconUrl,
|
|
34563
|
-
title: res.uiComponents.displayErrorResponse.title,
|
|
34564
|
-
description: res.uiComponents.displayErrorResponse.description
|
|
34716
|
+
iconUrl: (_d = (_c = (_b = res == null ? void 0 : res.body) == null ? void 0 : _b.uiComponents) == null ? void 0 : _c.displayErrorResponse) == null ? void 0 : _d.iconUrl,
|
|
34717
|
+
title: (_h = (_g = (_f = (_e = res == null ? void 0 : res.body) == null ? void 0 : _e.uiComponents) == null ? void 0 : _f.displayErrorResponse) == null ? void 0 : _g.title) != null ? _h : lg$1.registerEmail.errorTitle,
|
|
34718
|
+
description: (_l = (_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.uiComponents) == null ? void 0 : _j.displayErrorResponse) == null ? void 0 : _k.description) != null ? _l : lg$1.registerEmail.errorDescription
|
|
34565
34719
|
};
|
|
34720
|
+
}
|
|
34721
|
+
if ((res == null ? void 0 : res.ppFetchResult) !== "success")
|
|
34722
|
+
return defaultError;
|
|
34566
34723
|
return {
|
|
34567
34724
|
open: false,
|
|
34568
34725
|
title: "",
|
|
@@ -34926,9 +35083,10 @@ const _sfc_main$l = defineComponent({
|
|
|
34926
35083
|
});
|
|
34927
35084
|
};
|
|
34928
35085
|
const checkEmailAuth = async () => {
|
|
35086
|
+
var _a, _b, _c, _d, _e, _f;
|
|
34929
35087
|
try {
|
|
34930
35088
|
const res = await getUserProfileData();
|
|
34931
|
-
if (res.signed.result_info.code === "SUCCESS" && res.unsigned.data.emailStatus === "VERIFIED") {
|
|
35089
|
+
if ((res == null ? void 0 : res.ppFetchResult) === "success" && ((_c = (_b = (_a = res == null ? void 0 : res.body) == null ? void 0 : _a.signed) == null ? void 0 : _b.result_info) == null ? void 0 : _c.code) === "SUCCESS" && ((_f = (_e = (_d = res == null ? void 0 : res.body) == null ? void 0 : _d.unsigned) == null ? void 0 : _e.data) == null ? void 0 : _f.emailStatus) === "VERIFIED") {
|
|
34932
35090
|
toggleIsSentEmailDoneSheetVisible(true);
|
|
34933
35091
|
} else {
|
|
34934
35092
|
state.error = true;
|
|
@@ -35478,13 +35636,13 @@ async function initRegisterEmail(initRegisterEmail2, allowsUpdate) {
|
|
|
35478
35636
|
document.body.appendChild(container2);
|
|
35479
35637
|
}
|
|
35480
35638
|
function registerEmail(params, allowsUpdate = false) {
|
|
35481
|
-
reconstructParams(params);
|
|
35482
|
-
initRegisterEmail(
|
|
35639
|
+
const newParams = reconstructParams(params);
|
|
35640
|
+
initRegisterEmail(newParams, allowsUpdate).catch(() => {
|
|
35483
35641
|
});
|
|
35484
35642
|
}
|
|
35485
35643
|
function registerKyc(params) {
|
|
35486
|
-
reconstructParams(params);
|
|
35487
|
-
execute$5(
|
|
35644
|
+
const newParams = reconstructParams(params);
|
|
35645
|
+
execute$5(newParams);
|
|
35488
35646
|
}
|
|
35489
35647
|
function execute$5(params) {
|
|
35490
35648
|
var _a;
|
|
@@ -35523,28 +35681,28 @@ function execute$5(params) {
|
|
|
35523
35681
|
}
|
|
35524
35682
|
}
|
|
35525
35683
|
async function startMultiFactorAuth(params) {
|
|
35526
|
-
reconstructParams(params);
|
|
35527
|
-
await execute$4(
|
|
35684
|
+
const newParams = reconstructParams(params);
|
|
35685
|
+
await execute$4(newParams);
|
|
35528
35686
|
}
|
|
35529
35687
|
function validType(params) {
|
|
35530
35688
|
const authTypes = ["BIOMETRIC"];
|
|
35531
35689
|
return authTypes.includes(params == null ? void 0 : params.type);
|
|
35532
35690
|
}
|
|
35533
35691
|
async function execute$4(params) {
|
|
35534
|
-
var _a, _b, _c;
|
|
35692
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
35535
35693
|
if (!validType(params)) {
|
|
35536
35694
|
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.invalidType });
|
|
35537
35695
|
}
|
|
35538
35696
|
try {
|
|
35539
|
-
const res = await
|
|
35697
|
+
const res = await ppFetch2({
|
|
35540
35698
|
method: "GET",
|
|
35541
35699
|
url: "/web-api/app/v1/authentication/sessionId"
|
|
35542
35700
|
});
|
|
35543
|
-
if (
|
|
35544
|
-
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode:
|
|
35701
|
+
if (res.ppFetchResult !== "success") {
|
|
35702
|
+
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
35545
35703
|
}
|
|
35546
|
-
if (res.unsigned.data.sessionId) {
|
|
35547
|
-
const sessionId = res.unsigned.data.sessionId;
|
|
35704
|
+
if ((_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.data) == null ? void 0 : _e.sessionId) {
|
|
35705
|
+
const sessionId = (_h = (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.unsigned) == null ? void 0 : _g.data) == null ? void 0 : _h.sessionId;
|
|
35548
35706
|
const deeplink = `paypay://miniAppMFA?ppSessionId=${sessionId}&type=${params.type}&callbackUrl=${params == null ? void 0 : params.callbackUrl}`;
|
|
35549
35707
|
closeApp({
|
|
35550
35708
|
options: {
|
|
@@ -35555,12 +35713,12 @@ async function execute$4(params) {
|
|
|
35555
35713
|
throw new Error();
|
|
35556
35714
|
}
|
|
35557
35715
|
} catch {
|
|
35558
|
-
return (
|
|
35716
|
+
return (_i = params == null ? void 0 : params.fail) == null ? void 0 : _i.call(params, { errorCode: MiniAppErrorType.serverError });
|
|
35559
35717
|
}
|
|
35560
35718
|
}
|
|
35561
35719
|
function logout(params) {
|
|
35562
|
-
reconstructParams(params);
|
|
35563
|
-
execute$3(
|
|
35720
|
+
const newParams = reconstructParams(params);
|
|
35721
|
+
execute$3(newParams);
|
|
35564
35722
|
}
|
|
35565
35723
|
function execute$3(params) {
|
|
35566
35724
|
var _a, _b;
|
|
@@ -35576,50 +35734,50 @@ function execute$3(params) {
|
|
|
35576
35734
|
}
|
|
35577
35735
|
}
|
|
35578
35736
|
async function verifyMultiFactorAuthResult(params) {
|
|
35579
|
-
reconstructParams(params);
|
|
35580
|
-
await execute$2(
|
|
35737
|
+
const newParams = reconstructParams(params);
|
|
35738
|
+
await execute$2(newParams);
|
|
35581
35739
|
}
|
|
35582
35740
|
async function execute$2(params) {
|
|
35583
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
35741
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
35584
35742
|
const urlParams = new URLSearchParams(window.location.search);
|
|
35585
35743
|
const sessionId = urlParams == null ? void 0 : urlParams.get("ppSessionId");
|
|
35586
35744
|
if (!sessionId || sessionId.length < 1) {
|
|
35587
35745
|
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.sessionNotFound });
|
|
35588
35746
|
}
|
|
35589
35747
|
try {
|
|
35590
|
-
const res = await
|
|
35748
|
+
const res = await ppFetch2({
|
|
35591
35749
|
method: "GET",
|
|
35592
35750
|
url: "/web-api/app/v1/authentication/status",
|
|
35593
35751
|
params: {
|
|
35594
35752
|
sessionId
|
|
35595
35753
|
}
|
|
35596
35754
|
});
|
|
35597
|
-
if (
|
|
35598
|
-
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode:
|
|
35755
|
+
if (res.ppFetchResult !== "success") {
|
|
35756
|
+
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
35599
35757
|
}
|
|
35600
|
-
const isSuccess = ((_d = (_c = res == null ? void 0 : res.
|
|
35758
|
+
const isSuccess = ((_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.resultInfo) == null ? void 0 : _e.code) === MiniAppStatusType.success;
|
|
35601
35759
|
if (isSuccess) {
|
|
35602
|
-
const data2 = (
|
|
35760
|
+
const data2 = (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.unsigned) == null ? void 0 : _g.data;
|
|
35603
35761
|
if (data2) {
|
|
35604
|
-
return (
|
|
35762
|
+
return (_h = params == null ? void 0 : params.success) == null ? void 0 : _h.call(params, data2);
|
|
35605
35763
|
} else {
|
|
35606
35764
|
throw Error();
|
|
35607
35765
|
}
|
|
35608
35766
|
} else {
|
|
35609
|
-
throw Error(((
|
|
35767
|
+
throw Error(((_k = (_j = (_i = res == null ? void 0 : res.body) == null ? void 0 : _i.unsigned) == null ? void 0 : _j.resultInfo) == null ? void 0 : _k.code) || MiniAppErrorType.serverError);
|
|
35610
35768
|
}
|
|
35611
35769
|
} catch (e) {
|
|
35612
|
-
return (
|
|
35770
|
+
return (_l = params == null ? void 0 : params.fail) == null ? void 0 : _l.call(params, {
|
|
35613
35771
|
errorCode: (e == null ? void 0 : e.message) || MiniAppErrorType.serverError
|
|
35614
35772
|
});
|
|
35615
35773
|
}
|
|
35616
35774
|
}
|
|
35617
35775
|
async function getAuthStatus(params) {
|
|
35618
|
-
reconstructParams(params);
|
|
35619
|
-
await execute$1(
|
|
35776
|
+
const newParams = reconstructParams(params);
|
|
35777
|
+
await execute$1(newParams);
|
|
35620
35778
|
}
|
|
35621
35779
|
async function execute$1(params) {
|
|
35622
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k
|
|
35780
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
35623
35781
|
try {
|
|
35624
35782
|
const clientId = getClientId();
|
|
35625
35783
|
if (!clientId) {
|
|
@@ -35630,31 +35788,24 @@ async function execute$1(params) {
|
|
|
35630
35788
|
url: "/web-api/app/v1/smartpayment/auth/status",
|
|
35631
35789
|
params: {}
|
|
35632
35790
|
});
|
|
35633
|
-
if (res.ppFetchResult === "notInitialized") {
|
|
35634
|
-
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: MiniAppErrorType.sdkNotInitialized });
|
|
35635
|
-
}
|
|
35636
35791
|
if (res.ppFetchResult !== "success") {
|
|
35637
|
-
return (
|
|
35792
|
+
return (_b = params == null ? void 0 : params.fail) == null ? void 0 : _b.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
35638
35793
|
}
|
|
35639
|
-
const isSuccess = ((
|
|
35794
|
+
const isSuccess = ((_e = (_d = (_c = res == null ? void 0 : res.body) == null ? void 0 : _c.unsigned) == null ? void 0 : _d.resultInfo) == null ? void 0 : _e.code) === MiniAppStatusType.success;
|
|
35640
35795
|
if (isSuccess) {
|
|
35641
|
-
const data2 = (
|
|
35796
|
+
const data2 = (_g = (_f = res == null ? void 0 : res.body) == null ? void 0 : _f.unsigned) == null ? void 0 : _g.data;
|
|
35642
35797
|
if (!(data2 == null ? void 0 : data2.isActive)) {
|
|
35643
|
-
return (
|
|
35798
|
+
return (_h = params == null ? void 0 : params.fail) == null ? void 0 : _h.call(params, { errorCode: MiniAppErrorType.notAuthorized });
|
|
35644
35799
|
} else if (data2 == null ? void 0 : data2.showPermission) {
|
|
35645
|
-
return (
|
|
35800
|
+
return (_i = params == null ? void 0 : params.fail) == null ? void 0 : _i.call(params, {
|
|
35646
35801
|
errorCode: MiniAppErrorType.permissionRequired
|
|
35647
35802
|
});
|
|
35648
35803
|
} else if ((data2 == null ? void 0 : data2.isActive) && !(data2 == null ? void 0 : data2.showPermission)) {
|
|
35649
|
-
return (
|
|
35804
|
+
return (_j = params == null ? void 0 : params.success) == null ? void 0 : _j.call(params, { statusCode: MiniAppStatusType.connected });
|
|
35650
35805
|
}
|
|
35651
|
-
} else if (((_l = getRefreshToken()) == null ? void 0 : _l.length) > 0) {
|
|
35652
|
-
return (_m = params == null ? void 0 : params.fail) == null ? void 0 : _m.call(params, { errorCode: MiniAppErrorType.tokenExpired });
|
|
35653
|
-
} else {
|
|
35654
|
-
return (_n = params == null ? void 0 : params.fail) == null ? void 0 : _n.call(params, { errorCode: MiniAppErrorType.notAuthorized });
|
|
35655
35806
|
}
|
|
35656
35807
|
} catch (e) {
|
|
35657
|
-
return (
|
|
35808
|
+
return (_k = params == null ? void 0 : params.fail) == null ? void 0 : _k.call(params, {
|
|
35658
35809
|
errorCode: (e == null ? void 0 : e.message) || MiniAppErrorType.serverError
|
|
35659
35810
|
});
|
|
35660
35811
|
}
|
|
@@ -36280,7 +36431,7 @@ function render(params) {
|
|
|
36280
36431
|
}
|
|
36281
36432
|
}
|
|
36282
36433
|
async function renderPay(params, smartPay2, preferredLanguage, loggedIn) {
|
|
36283
|
-
var _a, _b, _c;
|
|
36434
|
+
var _a, _b, _c, _d, _e;
|
|
36284
36435
|
if ((params == null ? void 0 : params.orderInfo) && loggedIn) {
|
|
36285
36436
|
const { orderInfo } = params;
|
|
36286
36437
|
const query = {
|
|
@@ -36295,18 +36446,18 @@ async function renderPay(params, smartPay2, preferredLanguage, loggedIn) {
|
|
|
36295
36446
|
storeId: orderInfo == null ? void 0 : orderInfo.storeId,
|
|
36296
36447
|
merchantPaymentId: orderInfo == null ? void 0 : orderInfo.merchantPaymentId
|
|
36297
36448
|
};
|
|
36298
|
-
const res = await
|
|
36449
|
+
const res = await ppFetch2({
|
|
36299
36450
|
method: "POST",
|
|
36300
36451
|
url: "web-api/app/v1/smartpayment/cashback/expected",
|
|
36301
36452
|
params: query,
|
|
36302
36453
|
data: body2
|
|
36303
36454
|
});
|
|
36304
|
-
if (
|
|
36305
|
-
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode:
|
|
36455
|
+
if (res.ppFetchResult !== "success") {
|
|
36456
|
+
return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: getFailErrorCode(res.ppFetchResult) });
|
|
36306
36457
|
}
|
|
36307
36458
|
let cashbackInfo2 = "";
|
|
36308
|
-
if ((_b = res == null ? void 0 : res.
|
|
36309
|
-
const { normalCashbackPercentage, lotteryCashbackPercentage } = (
|
|
36459
|
+
if ((_c = (_b = res == null ? void 0 : res.body) == null ? void 0 : _b.unsigned) == null ? void 0 : _c.data) {
|
|
36460
|
+
const { normalCashbackPercentage, lotteryCashbackPercentage } = (_e = (_d = res == null ? void 0 : res.body) == null ? void 0 : _d.unsigned) == null ? void 0 : _e.data;
|
|
36310
36461
|
if (normalCashbackPercentage || lotteryCashbackPercentage) {
|
|
36311
36462
|
let tempCashback = Number((parseFloat(normalCashbackPercentage != null ? normalCashbackPercentage : "0") + parseFloat(lotteryCashbackPercentage != null ? lotteryCashbackPercentage : "0")).toFixed(1));
|
|
36312
36463
|
cashbackInfo2 = tempCashback ? tempCashback.toString() : "";
|
|
@@ -36329,35 +36480,35 @@ function callbackHandler(params, callback) {
|
|
|
36329
36480
|
(_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.unknown });
|
|
36330
36481
|
}
|
|
36331
36482
|
}
|
|
36332
|
-
function setSessionData(
|
|
36483
|
+
function setSessionData(setDataParams) {
|
|
36333
36484
|
var _a, _b;
|
|
36334
|
-
reconstructParams(
|
|
36485
|
+
const params = reconstructParams(setDataParams);
|
|
36335
36486
|
sessionStorage.setItem(params == null ? void 0 : params.key, (_a = params == null ? void 0 : params.value) != null ? _a : "");
|
|
36336
36487
|
(_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params);
|
|
36337
36488
|
}
|
|
36338
|
-
function getSessionData(
|
|
36489
|
+
function getSessionData(getDataParams) {
|
|
36339
36490
|
var _a;
|
|
36340
|
-
reconstructParams(
|
|
36491
|
+
const params = reconstructParams(getDataParams);
|
|
36341
36492
|
const value2 = sessionStorage.getItem(params == null ? void 0 : params.key);
|
|
36342
36493
|
(_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, { [params == null ? void 0 : params.key]: value2 != null ? value2 : "" });
|
|
36343
36494
|
}
|
|
36344
|
-
function setStorageData(
|
|
36495
|
+
function setStorageData(setDataParams) {
|
|
36345
36496
|
var _a, _b;
|
|
36346
|
-
reconstructParams(
|
|
36497
|
+
const params = reconstructParams(setDataParams);
|
|
36347
36498
|
localStorage.setItem(params == null ? void 0 : params.key, (_a = params == null ? void 0 : params.value) != null ? _a : "");
|
|
36348
36499
|
(_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params);
|
|
36349
36500
|
}
|
|
36350
|
-
function getStorageData(
|
|
36501
|
+
function getStorageData(getDataParams) {
|
|
36351
36502
|
var _a;
|
|
36352
|
-
reconstructParams(
|
|
36503
|
+
const params = reconstructParams(getDataParams);
|
|
36353
36504
|
const value2 = localStorage.getItem(params == null ? void 0 : params.key);
|
|
36354
36505
|
(_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, { [params == null ? void 0 : params.key]: value2 != null ? value2 : "" });
|
|
36355
36506
|
}
|
|
36356
36507
|
function removeStorageData(params) {
|
|
36357
36508
|
var _a;
|
|
36358
|
-
reconstructParams(params);
|
|
36359
|
-
localStorage.removeItem(
|
|
36360
|
-
(_a =
|
|
36509
|
+
const newParams = reconstructParams(params);
|
|
36510
|
+
localStorage.removeItem(newParams == null ? void 0 : newParams.key);
|
|
36511
|
+
(_a = newParams == null ? void 0 : newParams.success) == null ? void 0 : _a.call(newParams);
|
|
36361
36512
|
}
|
|
36362
36513
|
const errorCodes = new Map();
|
|
36363
36514
|
errorCodes.set(414, MiniAppErrorType.invalidUrl);
|
|
@@ -36365,9 +36516,9 @@ errorCodes.set(413, MiniAppErrorType.invalidData);
|
|
|
36365
36516
|
errorCodes.set(400, MiniAppErrorType.invalidHeader);
|
|
36366
36517
|
errorCodes.set(405, MiniAppErrorType.invalidMethod);
|
|
36367
36518
|
errorCodes.set(502, MiniAppErrorType.invalidResponse);
|
|
36368
|
-
async function request(
|
|
36519
|
+
async function request(requestParams) {
|
|
36369
36520
|
var _a, _b, _c, _d;
|
|
36370
|
-
reconstructParams(
|
|
36521
|
+
const params = reconstructParams(requestParams);
|
|
36371
36522
|
try {
|
|
36372
36523
|
const response = await fetch(params == null ? void 0 : params.url, {
|
|
36373
36524
|
method: params == null ? void 0 : params.method,
|
|
@@ -36398,9 +36549,9 @@ function handleResponse(response) {
|
|
|
36398
36549
|
return { error: { message: "Request failed due to server error" } };
|
|
36399
36550
|
}
|
|
36400
36551
|
}
|
|
36401
|
-
async function share(
|
|
36552
|
+
async function share(shareParams) {
|
|
36402
36553
|
var _a, _b;
|
|
36403
|
-
reconstructParams(
|
|
36554
|
+
const params = reconstructParams(shareParams);
|
|
36404
36555
|
if (!(navigator == null ? void 0 : navigator.share)) {
|
|
36405
36556
|
console.warn("navigator object is not supported in this environment.");
|
|
36406
36557
|
(_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.notAvailable });
|
|
@@ -38587,7 +38738,7 @@ const _sfc_main = defineComponent({
|
|
|
38587
38738
|
url: "web-api/app/v1/users/payout/methods"
|
|
38588
38739
|
});
|
|
38589
38740
|
if (result2.ppFetchResult !== "success") {
|
|
38590
|
-
const errorCode = (_c = (_b = (_a = result2
|
|
38741
|
+
const errorCode = (_c = (_b = (_a = result2.body) == null ? void 0 : _a.unsigned) == null ? void 0 : _b.resultInfo) == null ? void 0 : _c.code;
|
|
38591
38742
|
handleError2(errorCode);
|
|
38592
38743
|
return;
|
|
38593
38744
|
}
|
|
@@ -38660,8 +38811,8 @@ const cssModules = {};
|
|
|
38660
38811
|
cssModules["$style"] = style0;
|
|
38661
38812
|
var GetBankInfoWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__cssModules", cssModules]]);
|
|
38662
38813
|
function getBankInfo(params) {
|
|
38663
|
-
reconstructParams(params);
|
|
38664
|
-
execute(
|
|
38814
|
+
const newParams = reconstructParams(params);
|
|
38815
|
+
execute(newParams);
|
|
38665
38816
|
}
|
|
38666
38817
|
function execute(params) {
|
|
38667
38818
|
var _a;
|
|
@@ -38792,7 +38943,7 @@ class MiniAppModule extends JsBridgeModule {
|
|
|
38792
38943
|
});
|
|
38793
38944
|
}
|
|
38794
38945
|
scanCode(params) {
|
|
38795
|
-
scanCode(
|
|
38946
|
+
scanCode();
|
|
38796
38947
|
}
|
|
38797
38948
|
showAlert(params) {
|
|
38798
38949
|
this.detectMode() === RuntimeEnv.JS ? showAlert(params) : this.jsBridge.callNative("showAlert", params);
|