@paypay/mini-app-js-sdk 2.69.0 → 2.70.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/client/clientUtils.d.ts +1 -0
- package/dist/client/communicationWithCore.d.ts +2 -0
- package/dist/client/functions/logPageNav.d.ts +2 -0
- package/dist/client/functions/logPerf.d.ts +2 -0
- package/dist/client/observeTtid.d.ts +2 -0
- package/dist/client/supportedFunctionsList.d.ts +1 -1
- package/dist/client/types.d.ts +3 -1
- package/dist/core/coreFunctions/index.d.ts +4 -0
- package/dist/core/coreFunctions/logPageNav.d.ts +6 -0
- package/dist/core/coreFunctions/logPerf.d.ts +6 -0
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +215 -43
- package/dist/resources/images.d.ts +3 -0
- package/dist/types/init.d.ts +5 -0
- package/dist/types/makePayment.d.ts +8 -0
- package/dist/utils/helper.d.ts +3 -1
- package/dist/utils/openTelemetry/index.d.ts +4 -0
- package/dist/utils/openTelemetry/openTelemetry.d.ts +5 -0
- package/dist/utils/openTelemetry/types.d.ts +21 -0
- package/dist/views/coupon/components/CouponAction/index.d.ts +4 -0
- package/dist/views/coupon/index.d.ts +4 -0
- package/dist/views/make-payment/store.d.ts +39 -0
- package/package.json +7 -1
|
@@ -12,3 +12,4 @@ export declare function isSupportedMiniapp(functionName: string): boolean;
|
|
|
12
12
|
export declare function isSupportedSmartpayment(functionName: string): boolean;
|
|
13
13
|
export declare function promiseToCallback<T, S, E extends MiniAppErrorResultType = MiniAppErrorResultType>(functionName: string, target: (params: T) => Promise<S>, getLoggingParams?: (params: T) => Partial<Parameters<CoreFunctions['logEvent']>[0]>): (params: T & NativeParams<S, E>) => Promise<S>;
|
|
14
14
|
export declare function callbackToPromise<R, E extends MiniAppErrorResultType = MiniAppErrorResultType, P extends NativeParams<R, E> = NativeParams<R, E>>(target: (params: P) => unknown, functionName: string): (params: P) => Promise<R>;
|
|
15
|
+
export declare function getPageLoadStartTime(): number;
|
|
@@ -11,6 +11,8 @@ export declare const coreFunctions: WindowBridgeFunctions<{
|
|
|
11
11
|
getLoginUrl: typeof import("../core/coreFunctions/getLoginUrl").getLoginUrl;
|
|
12
12
|
getPaymentSettings: typeof import("../core/coreFunctions/getPaymentSettings").getPaymentSettings;
|
|
13
13
|
logEvent: typeof import("../core/coreFunctions/logEvent").logEvent;
|
|
14
|
+
logPerf: typeof import("../core/coreFunctions/logPerf").logPerf;
|
|
15
|
+
logPageNav: typeof import("../core/coreFunctions/logPageNav").logPageNav;
|
|
14
16
|
logout: typeof import("../core/coreFunctions/logout").logout;
|
|
15
17
|
markAsReady: typeof import("../core/coreFunctions/markAsReady").markAsReady;
|
|
16
18
|
renderButton: typeof import("../core/coreFunctions/renderButton").renderButton;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { LogPageNavParams } from '../../utils/openTelemetry/types';
|
|
2
|
+
export declare const logPageNav: (params: Pick<Partial<LogPageNavParams>, "url" | "startTime"> & Omit<LogPageNavParams, "url" | "startTime"> & import("../../jsbridge-core/jsbridge").NativeParams<void, import("../../types").MiniAppErrorResultType>) => Promise<void>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { LogPerfParams } from '../../utils/openTelemetry/types';
|
|
2
|
+
export declare const logPerf: (params: Pick<Partial<LogPerfParams>, "endTime"> & Omit<LogPerfParams, "endTime"> & import("../../jsbridge-core/jsbridge").NativeParams<void, import("../../types").MiniAppErrorResultType>) => Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const miniAppSupportedFunctions: readonly ["init", "openWebview", "openAuthSession", "openMap", "closeApp", "makePayment", "topup", "setSessionData", "getSessionData", "setStorageData", "getStorageData", "removeStorageData", "getPermissionStatus", "scanCode", "showAlert", "showErrorSheet", "getTopBarHeight", "setTitle", "showUpdateWarning", "getPlatformInformation", "openApp", "share", "getKycInformation", "getUserLocation", "checkPaymentMethod", "registerKyc", "startMultiFactorAuth", "verifyMultiFactorAuthResult", "getBankInfo", "logout", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "copyToClipboard", "registerUserInfo", "setEnablePullDownRefresh", "registerEmail", "inputAddress", "getDeviceInformation", "request", "requestInternal", "registerPaymentFeatures", "initKycPassport", "getKycPassportInfo", "shortcutExists", "addShortcut", "getAllUserAddresses", "getUserPaymentFeatureSettings", "getPaymentSettings", "getTransactionInfo", "getTransactions", "getPayPayCardInfo", "getExternalLinkageInformation", "markAsReady", "renderCoupons"];
|
|
1
|
+
export declare const miniAppSupportedFunctions: readonly ["init", "openWebview", "openAuthSession", "openMap", "closeApp", "makePayment", "topup", "setSessionData", "getSessionData", "setStorageData", "getStorageData", "removeStorageData", "getPermissionStatus", "scanCode", "showAlert", "showErrorSheet", "getTopBarHeight", "setTitle", "showUpdateWarning", "getPlatformInformation", "openApp", "share", "getKycInformation", "getUserLocation", "checkPaymentMethod", "registerKyc", "startMultiFactorAuth", "verifyMultiFactorAuthResult", "getBankInfo", "logout", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "copyToClipboard", "registerUserInfo", "setEnablePullDownRefresh", "registerEmail", "inputAddress", "getDeviceInformation", "request", "requestInternal", "registerPaymentFeatures", "initKycPassport", "getKycPassportInfo", "shortcutExists", "addShortcut", "getAllUserAddresses", "getUserPaymentFeatureSettings", "getPaymentSettings", "getTransactionInfo", "getTransactions", "getPayPayCardInfo", "getExternalLinkageInformation", "markAsReady", "renderCoupons", "logPageNav", "logPerf"];
|
|
2
2
|
export declare const smartPaymentSupportedFunctions: readonly ["init", "createOrder", "makePayment", "render", "logout", "getAuthStatus", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "renderCoupons", "getLoginUrl", "renderButton"];
|
package/dist/client/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { miniAppSupportedFunctions } from '../client/supportedFunctionsList';
|
|
2
|
+
import { MiniAppModule } from '../mini-app-api';
|
|
2
3
|
import { copyToClipboard } from './functions/copyToClipboard';
|
|
3
4
|
import { getKycPassportInfo } from './functions/getKycPassportInfo';
|
|
4
5
|
import { scanCode } from './functions/scanCode';
|
|
@@ -6,7 +7,6 @@ import { setTitle } from './functions/setTitle';
|
|
|
6
7
|
import { share } from './functions/share';
|
|
7
8
|
import { getSessionData, getStorageData, removeStorageData, setSessionData, setStorageData } from './functions/storageFunctions';
|
|
8
9
|
import { verifyMultiFactorAuthResult } from './functions/verifyMultiFactorAuthResult';
|
|
9
|
-
import { MiniAppModule } from '../mini-app-api';
|
|
10
10
|
declare const clientFunctions: {
|
|
11
11
|
verifyMultiFactorAuthResult: typeof verifyMultiFactorAuthResult;
|
|
12
12
|
share: typeof share;
|
|
@@ -27,6 +27,8 @@ declare const clientFunctions: {
|
|
|
27
27
|
}>;
|
|
28
28
|
getPaymentSettings: (params: import("../jsbridge-core/jsbridge").NativeParams<import("../core/coreFunctions/getPaymentSettings").PaymentSettingsType, import('../types').MiniAppErrorResultType>) => Promise<import("../core/coreFunctions/getPaymentSettings").PaymentSettingsType>;
|
|
29
29
|
markAsReady: (params: import("../jsbridge-core/jsbridge").NativeParams<void, import('../types').MiniAppErrorResultType>) => Promise<void>;
|
|
30
|
+
logPageNav: (params: Pick<Partial<import("../utils/openTelemetry/types").LogPageNavParams>, "url" | "startTime"> & Omit<import("../utils/openTelemetry/types").LogPageNavParams, "url" | "startTime"> & import("../jsbridge-core/jsbridge").NativeParams<void, import('../types').MiniAppErrorResultType>) => Promise<void>;
|
|
31
|
+
logPerf: (params: Pick<Partial<import("../utils/openTelemetry/types").LogPerfParams>, "endTime"> & Omit<import("../utils/openTelemetry/types").LogPerfParams, "endTime"> & import("../jsbridge-core/jsbridge").NativeParams<void, import('../types').MiniAppErrorResultType>) => Promise<void>;
|
|
30
32
|
};
|
|
31
33
|
declare type ClientFunctionsType = typeof clientFunctions;
|
|
32
34
|
declare type AllSdkFunctionsType = Omit<MiniAppModule, keyof ClientFunctionsType> & ClientFunctionsType;
|
|
@@ -5,6 +5,8 @@ import { getLoginUrl } from './getLoginUrl';
|
|
|
5
5
|
import { getPaymentSettings } from './getPaymentSettings';
|
|
6
6
|
import { logEvent } from './logEvent';
|
|
7
7
|
import { logout } from './logout';
|
|
8
|
+
import { logPageNav } from './logPageNav';
|
|
9
|
+
import { logPerf } from './logPerf';
|
|
8
10
|
import { markAsReady } from './markAsReady';
|
|
9
11
|
import { renderButton } from './renderButton';
|
|
10
12
|
declare const coreFunctions: {
|
|
@@ -14,6 +16,8 @@ declare const coreFunctions: {
|
|
|
14
16
|
getLoginUrl: typeof getLoginUrl;
|
|
15
17
|
getPaymentSettings: typeof getPaymentSettings;
|
|
16
18
|
logEvent: typeof logEvent;
|
|
19
|
+
logPerf: typeof logPerf;
|
|
20
|
+
logPageNav: typeof logPageNav;
|
|
17
21
|
logout: typeof logout;
|
|
18
22
|
markAsReady: typeof markAsReady;
|
|
19
23
|
renderButton: typeof renderButton;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LogPageNavParams } from '../../utils/openTelemetry/types';
|
|
2
|
+
import { initRequired } from './middlewares/initRequired';
|
|
3
|
+
export declare function logPageNav(params: LogPageNavParams): void;
|
|
4
|
+
export declare namespace logPageNav {
|
|
5
|
+
var middlewares: (typeof initRequired)[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LogPerfParams } from '../../utils/openTelemetry/types';
|
|
2
|
+
import { initRequired } from './middlewares/initRequired';
|
|
3
|
+
export declare function logPerf(params: LogPerfParams): void;
|
|
4
|
+
export declare namespace logPerf {
|
|
5
|
+
var middlewares: (typeof initRequired)[];
|
|
6
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
!function(){"use strict";try{if("undefined"!=typeof document){var p=document.createElement("style");p.appendChild(document.createTextNode('.ppmna-reset-css{all:initial}.ppmna-reset-css *{text-align:unset;color:unset;background:initial;background-color:transparent;margin:revert;padding:revert;font-weight:revert;font-style:unset;font-size:unset;-webkit-user-select:none;user-select:none;border:unset;border-radius:revert;vertical-align:unset;word-break:unset;outline:none;box-sizing:content-box}.ppmna-reset-css * img{display:inline-block}.ppmna-reset-css * input,.ppmna-reset-css * select{-webkit-user-select:auto;user-select:auto}.ppmna-reset-css * li{list-style:none}.ppmna-reset-css * :where(*:not(svg,svg *)){all:revert}@font-face{font-family:Graphik;font-weight:400;font-display:swap;src:url(https://static.paypay.ne.jp/font/Graphik-Regular-Web.woff2) format("woff2"),url(https://static.paypay.ne.jp/font/Graphik-Regular-Web.woff) format("woff")}@font-face{font-family:Graphik;font-weight:600;font-display:swap;src:url(https://static.paypay.ne.jp/font/Graphik-Semibold-Web.woff2) format("woff2"),url(https://static.paypay.ne.jp/font/Graphik-Semibold-Web.woff) format("woff")}.pp-smartButtonWrapper .pp-smartBtn{display:flex;align-items:center;border-radius:8px;border:none;font-size:14px;font-weight:600;line-height:22px;color:#fff;padding:0;width:100%;height:44px;margin:auto;-webkit-tap-highlight-color:transparent;text-decoration:none;box-sizing:border-box}.pp-smartButtonWrapper .pp-smartBtn.pp-sm .pp-leftSection .pp-btnContent{flex-direction:column}.pp-smartButtonWrapper .pp-smartBtn.pp-light{background:#fff;color:#242323}.pp-smartButtonWrapper .pp-smartBtn.pp-dark{background:#000}.pp-smartButtonWrapper .pp-smartBtn.pp-red{background:#f03}.pp-smartButtonWrapper .pp-smartBtn.pp-login{min-width:180px}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-sm{width:180px!important}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-light{border:1px solid #e4e4e8}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-light .pp-userProfile{margin-right:4px}.pp-smartButtonWrapper .pp-smartBtn.pp-login .pp-leftSection .pp-btnContent{display:grid}.pp-smartButtonWrapper .pp-smartBtn.pp-pay{min-width:160px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-light{border:1px solid #dddddd}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-light .pp-cashbackInfo{color:#ff954c;background:#fff0e5}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-red .pp-cashbackInfo{color:#f03}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-ja .pp-cashbackInfo{padding:2px 16px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm{width:160px!important}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm.pp-cashback{height:66px;flex-direction:column;justify-content:center}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm .pp-cashbackInfo{margin:8px 0 0}.pp-smartButtonWrapper .pp-smartBtn.pp-pay .pp-leftSection .pp-img{width:24px;height:24px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-shortText{font-size:16px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm .pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-cashback .pp-leftSection .pp-btnContent,.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-shortText .pp-leftSection .pp-btnContent{margin-left:4px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection{display:flex;justify-content:center;align-items:center;width:100%;box-sizing:border-box;padding:0 8px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-img{width:20px;height:20px;display:inline-block}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-btnContent{margin-left:8px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-btnContent .pp-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-smartButtonWrapper .pp-smartBtn .pp-cashbackInfo{font-size:12px;color:#242323;background:#fff;line-height:14px;padding:2px 8px;border-radius:9px;margin-left:8px}.pp-smartButtonWrapper .pp-smartBtn .pp-userProfile{width:34px;height:34px;border-radius:50%;margin-right:5px}.pp-smartButtonWrapper.pp-button{padding:0;margin:0;background:none;border:none;width:100%;border-radius:8px;-webkit-tap-highlight-color:transparent;font-family:revert!important}.pp-smartButtonWrapper.pp-button *{font-family:revert!important}')),document.head.appendChild(p)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
-
var pp=function(){"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,i=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,a=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&i(e,n,t[n]);if(o)for(var n of o(t))s.call(t,n)&&i(e,n,t[n]);return e},l=(e,o)=>t(e,n(o)),c=(e,t,n)=>new Promise(((o,r)=>{var s=e=>{try{a(n.next(e))}catch(t){r(t)}},i=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=e=>e.done?o(e.value):Promise.resolve(e.value).then(s,i);a((n=n.apply(e,t)).next())}));function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var d=function e(t,n){function o(e,o,r){if("undefined"!=typeof document){"number"==typeof(r=u({},n,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var i in r)r[i]&&(s+="; "+i,!0!==r[i]&&(s+="="+r[i].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],o={},r=0;r<n.length;r++){var s=n[r].split("="),i=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(o[a]=t.read(i,a),e===a)break}catch(l){}}return e?o[e]:o}},remove:function(e,t){o(e,"",u({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,u({},this.attributes,t))},withConverter:function(t){return e(u({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const g="_PayPayJsBridge",f=["init","openWebview","openAuthSession","openMap","closeApp","makePayment","topup","setSessionData","getSessionData","setStorageData","getStorageData","removeStorageData","getPermissionStatus","scanCode","showAlert","showErrorSheet","getTopBarHeight","setTitle","showUpdateWarning","getPlatformInformation","openApp","share","getKycInformation","getUserLocation","checkPaymentMethod","registerKyc","startMultiFactorAuth","verifyMultiFactorAuthResult","getBankInfo","logout","getUserProfile","getBalance","getUserAddress","getUAID","copyToClipboard","registerUserInfo","setEnablePullDownRefresh","registerEmail","inputAddress","getDeviceInformation","request","requestInternal","registerPaymentFeatures","initKycPassport","getKycPassportInfo","shortcutExists","addShortcut","getAllUserAddresses","getUserPaymentFeatureSettings","getPaymentSettings","getTransactionInfo","getTransactions","getPayPayCardInfo","getExternalLinkageInformation","markAsReady","renderCoupons"],m=["init","createOrder","makePayment","render","logout","getAuthStatus","getUserProfile","getBalance","getUserAddress","getUAID","renderCoupons","getLoginUrl","renderButton"],p="2.69.0",v=new URL("https://mini-app-sdk-core.paypay.ne.jp/"),h=v.origin,y=new URL(`./iframe.html?v=${p}&rev=5bf6512`,v).href,w=new URL(`./coupon/iframe.html?v=${p}`,v).href;new URL(`./button/iframe.html?v=${p}`,v).href;const b="BAD_REQUEST_INSUFFICIENT_PARAMETER",S="UNKNOWN",E="SDK_NOT_INITIALIZED",I="TOKEN_NOT_FOUND",k="TOKEN_EXPIRED",C="AUTHORIZATION_NEEDED",P="ppjssdk.refreshToken";class O extends Error{constructor(e,t){super(e),this.errorCode=t}}const _=Object.freeze(Object.defineProperty({__proto__:null,getCookie:function({name:e}){return d.get(e)},getLocalStorage:function({name:e}){return localStorage.getItem(e)},getSessionStorage:function({name:e}){return sessionStorage.getItem(e)},getUrl:function(){return window.location.href},insertIframe:function(e){var{containerSelector:t,attributes:n}=e,i=n,{styles:a}=i,l=((e,t)=>{var n={};for(var i in e)r.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&o)for(var i of o(e))t.indexOf(i)<0&&s.call(e,i)&&(n[i]=e[i]);return n})(i,["styles"]);return new Promise(((e,n)=>{const o=document.querySelector(t);if(!o)return void n(new O(`Container with selector "${t}" not found.`,b));const r=document.createElement("iframe");r.onload=()=>{e(!0)},r.onerror=()=>{n(new O("Failed to load iframe.","NOT_REACHABLE"))},Object.assign(r.style,a),Object.entries(l).forEach((([e,t])=>{r.setAttribute(e,t)})),o.innerHTML="",o.appendChild(r)}))},removeCookie:function({name:e,options:t}){return d.remove(e,t)},removeElement:function({selector:e}){const t=document.querySelector(e);return!!t&&(t.remove(),!0)},removeLocalStorage:function({name:e}){return localStorage.removeItem(e)},removeQueryParametersFromUrl:function(e){const t=new URL(window.location.href);e.forEach((e=>t.searchParams.delete(e)));const n=t.toString().replace(t.origin,"");history.replaceState(history.state,"",n)},removeSessionStorage:function({name:e}){return sessionStorage.removeItem(e)},setCookie:function({name:e,value:t,options:n}){return d.set(e,t,n)},setLocalStorage:function({name:e,value:t}){return localStorage.setItem(e,t)},setSessionStorage:function({name:e,value:t}){return sessionStorage.setItem(e,t)},updateElementStyle:function({selector:e,styles:t}){const n=document.querySelector(e);return!!n&&(Object.assign(n.style,t),!0)}},Symbol.toStringTag,{value:"Module"})),R="success",A="fail",T="complete";var L=(e=>(e.MiniApp="MiniApp",e.SmartPayment="SmartPayment",e))(L||{});function N(e=6){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>(e%36).toString(36))).join("")}const U=e=>"object"!=typeof e||null===e?e:JSON.parse(JSON.stringify(e)),D=e=>{var t;const n=null==(t=e[0])?void 0:t.callbacks;return"object"==typeof n&&null!==n},x=e=>Object.keys(e).reduce(((e,t)=>(e[t]=!0,e)),{});class M{constructor(e,t,n=[],o){this.deferredPromises={},this.functions=e,this.allowedOrigins=t,this.middlewares=n,this.registeredCallbacks={},this.messageEventHandler=this.messageEventHandler.bind(this),this.errorLogger=o,this.subscribeToMessageEvent()}subscribeToMessageEvent(){window.addEventListener("message",this.messageEventHandler)}unsubscribeToMessageEvent(){window.removeEventListener("message",this.messageEventHandler)}messageEventHandler(e){var t;if(null==(t=e.data)?void 0:t.forWindowBridge)return this.allowedOrigins&&"request"===e.data.type&&!this.allowedOrigins.includes(e.origin)?this.sendErrorResponse(e,`${e.origin} is not allowed to make requests`,"ORIGIN_NOT_ALLOWED"):void("request"===e.data.type?this.handleRequest(e):"response"===e.data.type?this.handleResponse(e):"callback"===e.data.type&&this.handleCallback(e))}handleRequest(e){return c(this,null,(function*(){var t;const n=e.data.functionName,o=this.functions[n];if(!o)return void this.sendErrorResponse(e,`Function '${n}' does not exists on the target window`,"FUNCTION_NOT_FOUND");const r=U(e.data.params);D(r)&&(r[0].callbacks=Object.keys(r[0].callbacks).reduce(((t,n)=>(t[n]=(...t)=>{this.invokeCallback(e,n,t)},t)),{}));try{this.sendSuccessResponse(e,yield function(e,t,n,o){let r=-1;const s=o=>c(this,null,(function*(){if(++r,r<e.length){const n=e[r];return yield n(t,o,s)}return n(...o)}));return s(o)}([...this.middlewares,...null!=(t=o.middlewares)?t:[]],e,o,r))}catch(s){let t="Some error occurred while processing the request",n=S;s instanceof O?(t=s.message,n=s.errorCode):console.error(s),this.sendErrorResponse(e,t,n,s instanceof O?void 0:s)}}))}handleResponse(e){if(!this.deferredPromises[e.data.key])return void console.warn(`Promise for ${e.data.functionName} not found`);const[t,n]=this.deferredPromises[e.data.key];delete this.deferredPromises[e.data.key],"success"===e.data.status?t(e.data.result):(delete this.registeredCallbacks[e.data.key],n(new O(e.data.message,e.data.errorCode)))}handleCallback(e){var t;const{key:n,callbackName:o,args:r}=e.data,s=null==(t=this.registeredCallbacks[n])?void 0:t[o];s?s(...r):console.warn(`Callback with key ${n} and name ${o} not found.`)}sendErrorResponse(e,t,n,o){this.errorLogger&&this.errorLogger(e.data.functionName,t,n,o),this.sendResponse(e,{status:"failure",message:t,errorCode:n})}sendSuccessResponse(e,t){this.sendResponse(e,{status:"success",result:t})}sendResponse(e,t){this.sendMessage(e.source,e.origin,a({type:"response",key:e.data.key,functionName:e.data.functionName},t))}invokeCallback(e,t,n){this.sendMessage(e.source,e.origin,{type:"callback",key:e.data.key,functionName:e.data.functionName,callbackName:t,args:n})}sendMessage(e,t,n){e.postMessage(a({forWindowBridge:!0},U(n)),t)}sendRequest(e,t,n,o){const r=`${n}--${N()}`;return new Promise(((s,i)=>{this.deferredPromises[r]=[s,i],this.setupRequest(e,t,n,o,r).catch((e=>{delete this.deferredPromises[r],delete this.registeredCallbacks[r],i(new O(e.message,"MESSAGE_SENDING_FAILED"))}))}))}setupRequest(e,t,n,o,r){return c(this,null,(function*(){const s=yield e();if(!s)throw new Error("Target window is undefined");let i=o[0];if(D(o)){const e=o[0].callbacks;this.addFunctionCallbacks(r,e),i=l(a({},o[0]),{callbacks:x(e)})}this.sendMessage(s,t,{type:"request",key:r,functionName:n,params:[i]})}))}addFunctionCallbacks(e,t){Object.keys(t).forEach((e=>{if("function"!=typeof t[e])throw new Error(`Callback ${e} is not a function`)})),this.registeredCallbacks[e]=a({},t)}static init(e,t,n=[],o){if(this._instance)throw new Error("WindowBridge already initialized, you can't call WindowBridge.init more than once");return this._instance=new this(e,t,n,o),this._instance}static destroy(){this._instance&&(this._instance.unsubscribeToMessageEvent(),this._instance=void 0)}static getBridge(){if(!this._instance)throw new Error("WindowBridge not initialized, please call WindowBridge.init before calling WindowBridge.getBridge");return this._instance}static getTargetWindowFunctionProxy(e,t){return M.getBridge().getTargetWindowFunctionProxy(e,t)}getTargetWindowFunctionProxy(e,t){return new Proxy(this,{get:(n,o)=>(...r)=>n.sendRequest(e,t,o.toString(),r)})}}const F="ppmna-iframe",B="ppsdk-container";let $;function j(){return $||($=function(){if(document.getElementById(F))return;const e=document.createElement("div");return document.createElement("div"),e.setAttribute("id",B),e.setAttribute("class",B),e.style.all="initial",e.style.display="none",e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.top="0",e.style.left="0",e.style.zIndex="2147483637",document.body.appendChild(e),e}()),$}let W,q=!1,K=null;function H(e){const t=j();t&&(t.style.display=e?"initial":"none",e?null!==K||q||(K=document.body.style.overflow,document.body.style.overflow="hidden"):null!==K&&(document.body.style.overflow=K,K=null))}function J(){return W||(W=new Promise(((e,t)=>{function n(){const n=document.createElement("iframe");n.setAttribute("src",y),n.setAttribute("name",F),n.setAttribute("id",F),n.setAttribute("class",F),n.setAttribute("allow","geolocation"),n.onload=()=>{e(n),n.onerror=null},n.onerror=t,n.style.all="initial",n.style.width="100%",n.style.height="100%",n.style.border="none";const o=j();o&&(o.innerHTML="",o.append(n))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{n()})):n()}))),W}M.init(_,[h]);const z=M.getTargetWindowFunctionProxy((function(){return J().then((e=>null==e?void 0:e.contentWindow)).catch((()=>null))}),h);function G(e,t,n){const o=N(),r=n=>{V(n.origin)&&n.data.name===e&&n.data.messageId===o&&function(e,t,n){var o,r,s;e.result===A&&(null==(o=null==t?void 0:t.fail)||o.call(t,e.data)),e.result===R&&(null==(r=null==t?void 0:t.success)||r.call(t,null==e?void 0:e.data)),e.result===T&&(null==(s=null==t?void 0:t.complete)||s.call(t),removeEventListener("message",n))}(n.data,t,r)};addEventListener("message",r),function(e){c(this,null,(function*(){var t;const n=yield J().catch((()=>{}));null==(t=null==n?void 0:n.contentWindow)||t.postMessage(JSON.parse(JSON.stringify(e)),h)}))}({name:e,params:n,messageId:o})}function V(e){return e===h}function Z(e){return f.includes(e)}function Q(e){return m.includes(e)}function X(e,t,n){return function(o={}){const r=null==n?void 0:n(o);z.logEvent(a({event_action:`pp_${e}_called`,event_category_suffix:e},r));const s=t(o);return s.then((t=>{var n;z.logEvent(a({event_action:`pp_${e}_success`,event_category_suffix:e},r)),null==(n=o.success)||n.call(o,t)})).catch((t=>{var n;console.error(t.message),z.logEvent(a({event_action:`pp_${e}_fail`,event_category_suffix:e,error_value:t.errorCode},r)),null==(n=o.fail)||n.call(o,{errorCode:t.errorCode})})).finally((()=>{var e;null==(e=o.complete)||e.call(o)})),s}}const Y={[E]:C,[I]:C,[k]:k};let ee,te;J(),te=Promise.resolve(!1);function ne(e){const t=function(e,t){if(t){const t=localStorage.getItem(`${P}.${e}`);if(t)return t}return d.get(`${P}.${e}`)||d.get(P)||""}(e.clientId,e.useLocalStorage),n=l(a({},e),{refreshToken:t,clientVersion:"2.69.0",clientSdkType:ee,clientUrl:window.location.href});var o;let r;null!=e.disableBackgroundScrollLock&&(o=!!e.disableBackgroundScrollLock,q=o);const s=new Promise((e=>r=e)),i=()=>{var t;r(!0),null==(t=e.complete)||t.call(e)};te.then((()=>J())).then((()=>{G("init",l(a({},e),{complete:i}),n)})).catch((()=>{var t;null==(t=e.fail)||t.call(e,{errorCode:E}),i()})),te=s}addEventListener("message",(e=>{var t;if(!(null==(t=e.data)?void 0:t.forWindowBridge)&&V(e.origin))if("reload"===e.data.name&&window.location.reload(),"makeVisible"!==e.data.name)if("showIframe"!==e.data.name)if("hideIframe"!==e.data.name){if("link"===e.data.name){const t=e.data.data;"_blank"===t.target?window.open(t.url,"_blank"):window.location.href=t.url}if("consoleDebugInfo"===e.data.name){const{params:t}=e.data.data;!function(e){console.debug(...e)}(t)}}else H(!1);else H(!0);else H(!0)})),addEventListener("popstate",(()=>{J().then((e=>{var t;const n={name:"clientPopState"};null==(t=null==e?void 0:e.contentWindow)||t.postMessage(n,h)})).catch((e=>console.warn(e)))}));var oe;oe={_handleMessageFromNative:e=>{J().then((t=>{var n;null==(n=null==t?void 0:t.contentWindow)||n.postMessage(JSON.parse(JSON.stringify({name:"handleMessageFromNative",params:{json:e}})),h)}))}},(!window.hasOwnProperty(g)||window[g]!==oe)&&(window[g]=oe);const re=["init","setTitle","copyToClipboard","getSessionData","setSessionData","getStorageData","setStorageData","removeStorageData","getLoginUrl"],se=["renderCoupons"];const ie={version:"2.69.0",revision:"5bf6512"};X("getLoginUrl",z.getLoginUrl);const ae=X("getPaymentSettings",z.getPaymentSettings),le=X("markAsReady",z.markAsReady);X("renderButton",z.renderButton);var ce=(e=>(e.validToken="TOKEN_VALID",e.initialized="INITIALIZED",e.emailRegistered="EMAIL_REGISTERED",e.emailNotVerified="EMAIL_NOT_VERIFIED",e.success="SUCCESS",e.loggedOut="LOGGED_OUT",e.connected="CONNECTED",e))(ce||{});const ue=X("logout",(()=>c(this,null,(function*(){return yield z.logout(),{statusCode:ce.loggedOut}}))));const de={verifyMultiFactorAuthResult:function(e){const t=new URL(window.location.href);G("verifyMultiFactorAuthResult",e,l(a({},e),{sessionId:t.searchParams.get("ppSessionId")}))},share:function(e){if(!(null==navigator?void 0:navigator.share))return void G("share",e,e);const t={text:null==e?void 0:e.text};navigator.share(t).then((()=>{var t,n;null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)})).catch((()=>{var t,n;null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:S}),null==(n=null==e?void 0:e.complete)||n.call(e)}))},setTitle:function(e){var t,n,o;document.title=null!=(t=null==e?void 0:e.title)?t:"",null==(n=null==e?void 0:e.success)||n.call(e),null==(o=null==e?void 0:e.complete)||o.call(e)},renderCoupons:X("renderCoupons",(e=>c(this,null,(function*(){const{merchant:t,couponId:n,containerId:o,postLoginRedirectUrl:r=window.location.href,postLoginRedirectType:s,locale:i}=e,a=document.getElementById(o);if(!a)throw new O("Invalid coupon container Id",b);const l=yield z.fetchCoupons({merchantId:t,couponId:n,postLoginRedirectUrl:r,postLoginRedirectType:s});try{const e=document.createElement("iframe");e.src=w,e.style.cssText="width:100%;height: 0;border: none;transition: height 300ms ease-in;display: block;",yield new Promise(((t,n)=>{e.onload=()=>t(!0),e.onerror=()=>n(new Error("Failed to load coupon iframe")),a.innerHTML="",a.append(e)})),e.onload=null,e.onerror=null,window.addEventListener("message",(({data:t,source:n})=>{"update-iframe-height"===(null==t?void 0:t.eventName)&&e.contentWindow===n&&(e.style.height=`${t.height}px`)}));const n=M.getTargetWindowFunctionProxy((()=>e.contentWindow),h);yield n.renderCoupons({coupons:l,merchantId:t,locale:i,postLoginRedirectUrl:r,postLoginRedirectType:s})}catch(c){throw new O(`An error occurred while displaying coupons, merchantId=${t}, couponId=${n}, error=${c}`,S)}}))),(e=>({event_label2:e.couponId,merchant_id:e.merchant}))),scanCode:function(e){var t;G("scanCode",e,l(a({},e),{redirectUrlOnCancel:null!=(t=null==e?void 0:e.redirectUrlOnCancel)?t:window.location.href}))},copyToClipboard:function(e){var t,n,o;const r=document.createElement("textarea");r.setAttribute("readonly","true"),r.setAttribute("contenteditable","true"),r.value=e.value,document.body.appendChild(r),r.select(),r.setSelectionRange(0,r.value.length);const s=document.execCommand("copy");document.body.removeChild(r),s?null==(t=null==e?void 0:e.success)||t.call(e):null==(n=null==e?void 0:e.fail)||n.call(e,{errorCode:"other"}),null==(o=e.complete)||o.call(e)},getSessionData:function(e){var t,n;const o=sessionStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=o?o:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setSessionData:function(e){var t,n,o;sessionStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(o=null==e?void 0:e.complete)||o.call(e)},getStorageData:function(e){var t,n;const o=localStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=o?o:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setStorageData:function(e){var t,n,o;localStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(o=null==e?void 0:e.complete)||o.call(e)},removeStorageData:function(e){var t,n;localStorage.removeItem(null==e?void 0:e.key),null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},getKycPassportInfo:function(e){const t=window.location.href;G("getKycPassportInfo",e,l(a({},e),{url:t}))},logout:ue,getPaymentSettings:ae,markAsReady:le};return function({sdkType:e,clientFunctions:t}){ee=e;const n=e===L.MiniApp?Z:Q,o=new Proxy(l(a({},t),{init:ne}),{get(t,o){if(o in ie)return ie[o];const r=o;if(!n(r))throw new Error(`${r} is not supported by ${e} JS SDK`);return function(e,t){return(n={})=>{const o=new Promise(((o,r)=>{let s,i;e(l(a({},n),{success:e=>{var t;i=e,null==(t=n.success)||t.call(n,e)},fail:e=>{var o;"init"===t&&Y[e.errorCode]?i={statusCode:Y[e.errorCode]}:s=e,null==(o=n.fail)||o.call(n,e)},complete:()=>{var e;s?r(s):o(i),null==(e=n.complete)||e.call(n)}}))}));return n.fail&&o.catch((()=>{})),o}}((function(e){return c(this,null,(function*(){var n,s;if(!re.includes(r)&&!(yield te)){if(!se.includes(r)||!function(e){return void 0!==e.clientId}(e))return null==(n=e.fail)||n.call(e,{errorCode:E}),void(null==(s=e.complete)||s.call(e));ne({clientId:e.clientId,env:e.env}),yield te}const i=t[r];if(i&&"function"==typeof i)return i(e);G(o,e,e)}))}),r)}});return window._pp=o,function(e){const t=window._ppcs;if(t){window._ppcs=void 0;for(const[n,o,r]of t){const t=e[n](o);r&&r(t)}}}(o),o}({sdkType:L.MiniApp,clientFunctions:de})}();
|
|
2
|
+
var pp=function(){"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&a(e,n,t[n]);if(o)for(var n of o(t))i.call(t,n)&&a(e,n,t[n]);return e},l=(e,o)=>t(e,n(o)),c=(e,t)=>{var n={};for(var a in e)r.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&o)for(var a of o(e))t.indexOf(a)<0&&i.call(e,a)&&(n[a]=e[a]);return n},d=(e,t,n)=>new Promise(((o,r)=>{var i=e=>{try{s(n.next(e))}catch(re){r(re)}},a=e=>{try{s(n.throw(e))}catch(re){r(re)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(i,a);s((n=n.apply(e,t)).next())}));function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var g=function e(t,n){function o(e,o,r){if("undefined"!=typeof document){"number"==typeof(r=u({},n,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var a in r)r[a]&&(i+="; "+a,!0!==r[a]&&(i+="="+r[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+i}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],o={},r=0;r<n.length;r++){var i=n[r].split("="),a=i.slice(1).join("=");try{var s=decodeURIComponent(i[0]);if(o[s]=t.read(a,s),e===s)break}catch(l){}}return e?o[e]:o}},remove:function(e,t){o(e,"",u({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,u({},this.attributes,t))},withConverter:function(t){return e(u({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const m="_PayPayJsBridge",f=["init","openWebview","openAuthSession","openMap","closeApp","makePayment","topup","setSessionData","getSessionData","setStorageData","getStorageData","removeStorageData","getPermissionStatus","scanCode","showAlert","showErrorSheet","getTopBarHeight","setTitle","showUpdateWarning","getPlatformInformation","openApp","share","getKycInformation","getUserLocation","checkPaymentMethod","registerKyc","startMultiFactorAuth","verifyMultiFactorAuthResult","getBankInfo","logout","getUserProfile","getBalance","getUserAddress","getUAID","copyToClipboard","registerUserInfo","setEnablePullDownRefresh","registerEmail","inputAddress","getDeviceInformation","request","requestInternal","registerPaymentFeatures","initKycPassport","getKycPassportInfo","shortcutExists","addShortcut","getAllUserAddresses","getUserPaymentFeatureSettings","getPaymentSettings","getTransactionInfo","getTransactions","getPayPayCardInfo","getExternalLinkageInformation","markAsReady","renderCoupons","logPageNav","logPerf"],p=["init","createOrder","makePayment","render","logout","getAuthStatus","getUserProfile","getBalance","getUserAddress","getUAID","renderCoupons","getLoginUrl","renderButton"],v="2.70.0",h=new URL("https://mini-app-sdk-core.paypay.ne.jp/"),y=h.origin,w=new URL(`./iframe.html?v=${v}&rev=5fda1d5`,h).href,b=new URL(`./coupon/iframe.html?v=${v}`,h).href;new URL(`./button/iframe.html?v=${v}`,h).href;const S="BAD_REQUEST_INSUFFICIENT_PARAMETER",I="UNKNOWN",E="SDK_NOT_INITIALIZED",T="TOKEN_NOT_FOUND",k="TOKEN_EXPIRED",C="AUTHORIZATION_NEEDED",P="ppjssdk.refreshToken";class O extends Error{constructor(e,t){super(e),this.errorCode=t}}const A=Object.freeze(Object.defineProperty({__proto__:null,getCookie:function({name:e}){return g.get(e)},getLocalStorage:function({name:e}){return localStorage.getItem(e)},getSessionStorage:function({name:e}){return sessionStorage.getItem(e)},getUrl:function(){return window.location.href},insertIframe:function(e){var{containerSelector:t,attributes:n}=e,o=n,{styles:r}=o,i=c(o,["styles"]);return new Promise(((e,n)=>{const o=document.querySelector(t);if(!o)return void n(new O(`Container with selector "${t}" not found.`,S));const a=document.createElement("iframe");a.onload=()=>{e(!0)},a.onerror=()=>{n(new O("Failed to load iframe.","NOT_REACHABLE"))},Object.assign(a.style,r),Object.entries(i).forEach((([e,t])=>{a.setAttribute(e,t)})),o.innerHTML="",o.appendChild(a)}))},removeCookie:function({name:e,options:t}){return g.remove(e,t)},removeElement:function({selector:e}){const t=document.querySelector(e);return!!t&&(t.remove(),!0)},removeLocalStorage:function({name:e}){return localStorage.removeItem(e)},removeQueryParametersFromUrl:function(e){const t=new URL(window.location.href);e.forEach((e=>t.searchParams.delete(e)));const n=t.toString().replace(t.origin,"");history.replaceState(history.state,"",n)},removeSessionStorage:function({name:e}){return sessionStorage.removeItem(e)},setCookie:function({name:e,value:t,options:n}){return g.set(e,t,n)},setLocalStorage:function({name:e,value:t}){return localStorage.setItem(e,t)},setSessionStorage:function({name:e,value:t}){return sessionStorage.setItem(e,t)},updateElementStyle:function({selector:e,styles:t}){const n=document.querySelector(e);return!!n&&(Object.assign(n.style,t),!0)}},Symbol.toStringTag,{value:"Module"})),_="success",L="fail",R="complete";var N=(e=>(e.MiniApp="MiniApp",e.SmartPayment="SmartPayment",e))(N||{});function D(e=6){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>(e%36).toString(36))).join("")}const U=e=>"object"!=typeof e||null===e?e:JSON.parse(JSON.stringify(e)),M=e=>{var t;const n=null==(t=e[0])?void 0:t.callbacks;return"object"==typeof n&&null!==n},F=e=>Object.keys(e).reduce(((e,t)=>(e[t]=!0,e)),{});class x{constructor(e,t,n=[],o){this.deferredPromises={},this.functions=e,this.allowedOrigins=t,this.middlewares=n,this.registeredCallbacks={},this.messageEventHandler=this.messageEventHandler.bind(this),this.errorLogger=o,this.subscribeToMessageEvent()}subscribeToMessageEvent(){window.addEventListener("message",this.messageEventHandler)}unsubscribeToMessageEvent(){window.removeEventListener("message",this.messageEventHandler)}messageEventHandler(e){var t;if(null==(t=e.data)?void 0:t.forWindowBridge)return this.allowedOrigins&&"request"===e.data.type&&!this.allowedOrigins.includes(e.origin)?this.sendErrorResponse(e,`${e.origin} is not allowed to make requests`,"ORIGIN_NOT_ALLOWED"):void("request"===e.data.type?this.handleRequest(e):"response"===e.data.type?this.handleResponse(e):"callback"===e.data.type&&this.handleCallback(e))}handleRequest(e){return d(this,null,(function*(){var t;const n=e.data.functionName,o=this.functions[n];if(!o)return void this.sendErrorResponse(e,`Function '${n}' does not exists on the target window`,"FUNCTION_NOT_FOUND");const r=U(e.data.params);M(r)&&(r[0].callbacks=Object.keys(r[0].callbacks).reduce(((t,n)=>(t[n]=(...t)=>{this.invokeCallback(e,n,t)},t)),{}));try{this.sendSuccessResponse(e,yield function(e,t,n,o){let r=-1;const i=o=>d(this,null,(function*(){if(++r,r<e.length){const n=e[r];return yield n(t,o,i)}return n(...o)}));return i(o)}([...this.middlewares,...null!=(t=o.middlewares)?t:[]],e,o,r))}catch(i){let t="Some error occurred while processing the request",n=I;i instanceof O?(t=i.message,n=i.errorCode):console.error(i),this.sendErrorResponse(e,t,n,i instanceof O?void 0:i)}}))}handleResponse(e){if(!this.deferredPromises[e.data.key])return void console.warn(`Promise for ${e.data.functionName} not found`);const[t,n]=this.deferredPromises[e.data.key];delete this.deferredPromises[e.data.key],"success"===e.data.status?t(e.data.result):(delete this.registeredCallbacks[e.data.key],n(new O(e.data.message,e.data.errorCode)))}handleCallback(e){var t;const{key:n,callbackName:o,args:r}=e.data,i=null==(t=this.registeredCallbacks[n])?void 0:t[o];i?i(...r):console.warn(`Callback with key ${n} and name ${o} not found.`)}sendErrorResponse(e,t,n,o){this.errorLogger&&this.errorLogger(e.data.functionName,t,n,o),this.sendResponse(e,{status:"failure",message:t,errorCode:n})}sendSuccessResponse(e,t){this.sendResponse(e,{status:"success",result:t})}sendResponse(e,t){this.sendMessage(e.source,e.origin,s({type:"response",key:e.data.key,functionName:e.data.functionName},t))}invokeCallback(e,t,n){this.sendMessage(e.source,e.origin,{type:"callback",key:e.data.key,functionName:e.data.functionName,callbackName:t,args:n})}sendMessage(e,t,n){e.postMessage(s({forWindowBridge:!0},U(n)),t)}sendRequest(e,t,n,o){const r=`${n}--${D()}`;return new Promise(((i,a)=>{this.deferredPromises[r]=[i,a],this.setupRequest(e,t,n,o,r).catch((e=>{delete this.deferredPromises[r],delete this.registeredCallbacks[r],a(new O(e.message,"MESSAGE_SENDING_FAILED"))}))}))}setupRequest(e,t,n,o,r){return d(this,null,(function*(){const i=yield e();if(!i)throw new Error("Target window is undefined");let a=o[0];if(M(o)){const e=o[0].callbacks;this.addFunctionCallbacks(r,e),a=l(s({},o[0]),{callbacks:F(e)})}this.sendMessage(i,t,{type:"request",key:r,functionName:n,params:[a]})}))}addFunctionCallbacks(e,t){Object.keys(t).forEach((e=>{if("function"!=typeof t[e])throw new Error(`Callback ${e} is not a function`)})),this.registeredCallbacks[e]=s({},t)}static init(e,t,n=[],o){if(this._instance)throw new Error("WindowBridge already initialized, you can't call WindowBridge.init more than once");return this._instance=new this(e,t,n,o),this._instance}static destroy(){this._instance&&(this._instance.unsubscribeToMessageEvent(),this._instance=void 0)}static getBridge(){if(!this._instance)throw new Error("WindowBridge not initialized, please call WindowBridge.init before calling WindowBridge.getBridge");return this._instance}static getTargetWindowFunctionProxy(e,t){return x.getBridge().getTargetWindowFunctionProxy(e,t)}getTargetWindowFunctionProxy(e,t){return new Proxy(this,{get:(n,o)=>(...r)=>n.sendRequest(e,t,o.toString(),r)})}}const B="ppmna-iframe",$="ppsdk-container";let W;function j(){return W||(W=function(){if(document.getElementById(B))return;const e=document.createElement("div");return document.createElement("div"),e.setAttribute("id",$),e.setAttribute("class",$),e.style.all="initial",e.style.display="none",e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.top="0",e.style.left="0",e.style.zIndex="2147483637",document.body.appendChild(e),e}()),W}let q,H=!1,K=null;function z(e){const t=j();t&&(t.style.display=e?"initial":"none",e?null!==K||H||(K=document.body.style.overflow,document.body.style.overflow="hidden"):null!==K&&(document.body.style.overflow=K,K=null))}function J(){return q||(q=new Promise(((e,t)=>{function n(){const n=document.createElement("iframe");n.setAttribute("src",w),n.setAttribute("name",B),n.setAttribute("id",B),n.setAttribute("class",B),n.setAttribute("allow","geolocation"),n.onload=()=>{e(n),n.onerror=null},n.onerror=t,n.style.all="initial",n.style.width="100%",n.style.height="100%",n.style.border="none";const o=j();o&&(o.innerHTML="",o.append(n))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{n()})):n()}))),q}x.init(A,[y]);const G=x.getTargetWindowFunctionProxy((function(){return J().then((e=>null==e?void 0:e.contentWindow)).catch((()=>null))}),y);function V(e,t,n){const o=D(),r=n=>{Z(n.origin)&&n.data.name===e&&n.data.messageId===o&&function(e,t,n){var o,r,i;e.result===L&&(null==(o=null==t?void 0:t.fail)||o.call(t,e.data)),e.result===_&&(null==(r=null==t?void 0:t.success)||r.call(t,null==e?void 0:e.data)),e.result===R&&(null==(i=null==t?void 0:t.complete)||i.call(t),removeEventListener("message",n))}(n.data,t,r)};addEventListener("message",r),function(e){d(this,null,(function*(){var t;const n=yield J().catch((()=>{}));null==(t=null==n?void 0:n.contentWindow)||t.postMessage(JSON.parse(JSON.stringify(e)),y)}))}({name:e,params:n,messageId:o})}function Z(e){return e===y}function Q(e){return f.includes(e)}function X(e){return p.includes(e)}function Y(e,t,n){return function(o={}){const r=null==n?void 0:n(o);G.logEvent(s({event_action:`pp_${e}_called`,event_category_suffix:e},r));const i=t(o);return i.then((t=>{var n;G.logEvent(s({event_action:`pp_${e}_success`,event_category_suffix:e},r)),null==(n=o.success)||n.call(o,t)})).catch((t=>{var n;console.error(t.message),G.logEvent(s({event_action:`pp_${e}_fail`,event_category_suffix:e,error_value:t.errorCode},r)),null==(n=o.fail)||n.call(o,{errorCode:t.errorCode})})).finally((()=>{var e;null==(e=o.complete)||e.call(o)})),i}}const ee={[E]:C,[T]:C,[k]:k};function te(){var e;return performance.timeOrigin?performance.timeOrigin:(null==(e=performance.timing)?void 0:e.navigationStart)?performance.timing.navigationStart:Date.now()-performance.now()}let ne=-1;const oe=()=>ne,re=e=>{addEventListener("pageshow",(t=>{t.persisted&&(ne=t.timeStamp,e(t))}),!0)},ie=(e,t,n,o)=>{let r,i;return a=>{var s,l;t.value>=0&&(a||o)&&(i=t.value-(null!=r?r:0),(i||void 0===r)&&(r=t.value,t.delta=i,t.rating=(s=t.value)>(l=n)[1]?"poor":s>l[0]?"needs-improvement":"good",e(t)))}},ae=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},se=()=>{var e,t;return null!=(t=null==(e=ae())?void 0:e.activationStart)?t:0};let le=-1;const ce=new Set,de=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,ue=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of ce)e();isFinite(le)||(le="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",ue,!0))}},ge=(e,t=-1,n,o=0,r,i,a)=>{const s=ae(),l=(null==s?void 0:s.navigationId)||0;let c="navigate";return n?c=n:oe()>=0?c="back-forward-cache":s&&(document.prerendering||se()>0?c="prerender":document.wasDiscarded?c="restore":s.type&&(c=s.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:c,navigationId:o||l,navigationInteractionId:r,navigationURL:i||(null==s?void 0:s.name),navigationStartTime:a||0}},me=new WeakMap;const fe=(e,t,n={})=>{try{const o=e.filter((e=>PerformanceObserver.supportedEntryTypes.includes(e)));if(o.length>0){const e=new PerformanceObserver((e=>{queueMicrotask((()=>{const n=e.getEntries();o.length>1&&n.sort(((e,t)=>e.startTime+e.duration-(t.startTime+t.duration))),t(n)}))}));for(const t of o)e.observe(s({type:t,buffered:!0},n));return e}}catch(o){}};class pe{constructor(){var e,t;a(this,"symbol"!=typeof(e="l")?e+"":e,t)}}const ve=[1800,3e3],he=(e,t={})=>{const n=(e=>{var t,n,o;return(null==(t=globalThis.PerformanceObserver)?void 0:t.supportedEntryTypes.includes("soft-navigation"))&&"function"==typeof(null==(o=null==(n=globalThis.PerformanceSoftNavigation)?void 0:n.prototype)?void 0:o.getLargestInteractionContentfulPaint)&&e&&e.reportSoftNavs})(t);(e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()})((()=>{const o=function(e,t){let n=me.get(t);return n||(n=new WeakMap,me.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}(t,pe),r=((e=!1)=>{var t;if(e&&(le=1/0),le<0){const e=se(),n=document.prerendering||null==(t=globalThis.performance.getEntriesByType("visibility-state").find((t=>"hidden"===t.name&&t.startTime>=e)))?void 0:t.startTime;le=null!=n?n:de(),addEventListener("visibilitychange",ue,!0),addEventListener("prerenderingchange",ue,!0),re((()=>{setTimeout((()=>{le=de()}))}))}return{get firstHiddenTime(){return le},onHidden(e){ce.add(e)}}})();let i,a=ge("FCP");const s=fe(["paint"],(e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<r.firstHiddenTime&&(a.value=Math.max(t.startTime-se(),0),a.entries.push(t),a.navigationId=t.navigationId||a.navigationId,i(!0)))}));s&&(i=ie(e,a,ve,t.reportAllChanges),re((n=>{a=ge("FCP",-1,"back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,oe()),i=ie(e,a,ve,t.reportAllChanges),(e=>{requestAnimationFrame((()=>requestAnimationFrame(e)))})((()=>{a.value=performance.now()-n.timeStamp,i(!0)}))}))),n&&fe(["soft-navigation"],(n=>{n.forEach((n=>{o.l&&n.navigationId&&((e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}})(o.l,n);const r=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);a=ge("FCP",r,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),i=ie(e,a,ve,t.reportAllChanges),i(!0)}))}),t)}))};let ye,we,be=!1,Se=!1;J(),we=Promise.resolve(!1);function Ie(e){const t=function(e,t){if(t){const t=localStorage.getItem(`${P}.${e}`);if(t)return t}return g.get(`${P}.${e}`)||g.get(P)||""}(e.clientId,e.useLocalStorage),n=l(s({},e),{refreshToken:t,clientVersion:"2.70.0",clientSdkType:ye,clientUrl:window.location.href,clientPageLoadStartTime:te()});var o;let r;null!=e.disableBackgroundScrollLock&&(o=!!e.disableBackgroundScrollLock,H=o);const i=new Promise((e=>r=e)),a=()=>{var t;r(!0),null==(t=e.complete)||t.call(e),e.pageName&&function(){if(be)return;be=!0;const e=te();he((t=>{Se||(Se=!0,G.logPerf({type:"TTID",startTime:e,endTime:e+t.value}))}))}()};we.then((()=>J())).then((()=>{V("init",l(s({},e),{complete:a}),n)})).catch((()=>{var t;null==(t=e.fail)||t.call(e,{errorCode:E}),a()})),we=i}addEventListener("message",(e=>{var t;if(!(null==(t=e.data)?void 0:t.forWindowBridge)&&Z(e.origin))if("reload"===e.data.name&&window.location.reload(),"makeVisible"!==e.data.name)if("showIframe"!==e.data.name)if("hideIframe"!==e.data.name){if("link"===e.data.name){const t=e.data.data;"_blank"===t.target?window.open(t.url,"_blank"):window.location.href=t.url}if("consoleDebugInfo"===e.data.name){const{params:t}=e.data.data;!function(e){console.debug(...e)}(t)}}else z(!1);else z(!0);else z(!0)})),addEventListener("popstate",(()=>{J().then((e=>{var t;const n={name:"clientPopState"};null==(t=null==e?void 0:e.contentWindow)||t.postMessage(n,y)})).catch((e=>console.warn(e)))}));var Ee;Ee={_handleMessageFromNative:e=>{J().then((t=>{var n;null==(n=null==t?void 0:t.contentWindow)||n.postMessage(JSON.parse(JSON.stringify({name:"handleMessageFromNative",params:{json:e}})),y)}))}},(!window.hasOwnProperty(m)||window[m]!==Ee)&&(window[m]=Ee);const Te=["init","setTitle","copyToClipboard","getSessionData","setSessionData","getStorageData","setStorageData","removeStorageData","getLoginUrl"],ke=["renderCoupons"];const Ce={version:"2.70.0",revision:"5fda1d5"};Y("getLoginUrl",G.getLoginUrl);const Pe=Y("getPaymentSettings",G.getPaymentSettings),Oe=Y("markAsReady",G.markAsReady);Y("renderButton",G.renderButton);var Ae=(e=>(e.validToken="TOKEN_VALID",e.initialized="INITIALIZED",e.emailRegistered="EMAIL_REGISTERED",e.emailNotVerified="EMAIL_NOT_VERIFIED",e.success="SUCCESS",e.loggedOut="LOGGED_OUT",e.connected="CONNECTED",e))(Ae||{});const _e=Y("logout",(()=>d(this,null,(function*(){return yield G.logout(),{statusCode:Ae.loggedOut}})))),Le=Y("logPageNav",(e=>{var t=e,{startTime:n,url:o}=t,r=c(t,["startTime","url"]);return Se=!0,G.logPageNav(s({startTime:null!=n?n:te()+performance.now(),url:null!=o?o:window.location.href},r))})),Re=Y("logPerf",(e=>{var t=e,{endTime:n}=t,o=c(t,["endTime"]);return G.logPerf(s({endTime:null!=n?n:te()+performance.now()},o))}));const Ne={verifyMultiFactorAuthResult:function(e){const t=new URL(window.location.href);V("verifyMultiFactorAuthResult",e,l(s({},e),{sessionId:t.searchParams.get("ppSessionId")}))},share:function(e){if(!(null==navigator?void 0:navigator.share))return void V("share",e,e);const t={text:null==e?void 0:e.text};navigator.share(t).then((()=>{var t,n;null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)})).catch((()=>{var t,n;null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:I}),null==(n=null==e?void 0:e.complete)||n.call(e)}))},setTitle:function(e){var t,n,o;document.title=null!=(t=null==e?void 0:e.title)?t:"",null==(n=null==e?void 0:e.success)||n.call(e),null==(o=null==e?void 0:e.complete)||o.call(e)},renderCoupons:Y("renderCoupons",(e=>d(this,null,(function*(){const{merchant:t,couponId:n,containerId:o,postLoginRedirectUrl:r=window.location.href,postLoginRedirectType:i,locale:a}=e,s=document.getElementById(o);if(!s)throw new O("Invalid coupon container Id",S);const l=yield G.fetchCoupons({merchantId:t,couponId:n,postLoginRedirectUrl:r,postLoginRedirectType:i});try{const e=document.createElement("iframe");e.src=b,e.style.cssText="width:100%;height: 0;border: none;transition: height 300ms ease-in;display: block;",yield new Promise(((t,n)=>{e.onload=()=>t(!0),e.onerror=()=>n(new Error("Failed to load coupon iframe")),s.innerHTML="",s.append(e)})),e.onload=null,e.onerror=null,window.addEventListener("message",(({data:t,source:n})=>{"update-iframe-height"===(null==t?void 0:t.eventName)&&e.contentWindow===n&&(e.style.height=`${t.height}px`)}));const n=x.getTargetWindowFunctionProxy((()=>e.contentWindow),y);yield n.renderCoupons({coupons:l,merchantId:t,locale:a,postLoginRedirectUrl:r,postLoginRedirectType:i})}catch(c){throw new O(`An error occurred while displaying coupons, merchantId=${t}, couponId=${n}, error=${c}`,I)}}))),(e=>({event_label2:e.couponId,merchant_id:e.merchant}))),scanCode:function(e){var t;V("scanCode",e,l(s({},e),{redirectUrlOnCancel:null!=(t=null==e?void 0:e.redirectUrlOnCancel)?t:window.location.href}))},copyToClipboard:function(e){var t,n,o;const r=document.createElement("textarea");r.setAttribute("readonly","true"),r.setAttribute("contenteditable","true"),r.value=e.value,document.body.appendChild(r),r.select(),r.setSelectionRange(0,r.value.length);const i=document.execCommand("copy");document.body.removeChild(r),i?null==(t=null==e?void 0:e.success)||t.call(e):null==(n=null==e?void 0:e.fail)||n.call(e,{errorCode:"other"}),null==(o=e.complete)||o.call(e)},getSessionData:function(e){var t,n;const o=sessionStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=o?o:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setSessionData:function(e){var t,n,o;sessionStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(o=null==e?void 0:e.complete)||o.call(e)},getStorageData:function(e){var t,n;const o=localStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=o?o:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setStorageData:function(e){var t,n,o;localStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(o=null==e?void 0:e.complete)||o.call(e)},removeStorageData:function(e){var t,n;localStorage.removeItem(null==e?void 0:e.key),null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},getKycPassportInfo:function(e){const t=window.location.href;V("getKycPassportInfo",e,l(s({},e),{url:t}))},logout:_e,getPaymentSettings:Pe,markAsReady:Oe,logPageNav:Le,logPerf:Re};return function({sdkType:e,clientFunctions:t}){ye=e;const n=e===N.MiniApp?Q:X,o=new Proxy(l(s({},t),{init:Ie}),{get(t,o){if(o in Ce)return Ce[o];const r=o;if(!n(r))throw new Error(`${r} is not supported by ${e} JS SDK`);return function(e,t){return(n={})=>{const o=new Promise(((o,r)=>{let i,a;e(l(s({},n),{success:e=>{var t;a=e,null==(t=n.success)||t.call(n,e)},fail:e=>{var o;"init"===t&&ee[e.errorCode]?a={statusCode:ee[e.errorCode]}:i=e,null==(o=n.fail)||o.call(n,e)},complete:()=>{var e;i?r(i):o(a),null==(e=n.complete)||e.call(n)}}))}));return n.fail&&o.catch((()=>{})),o}}((function(e){return d(this,null,(function*(){var n,i;if(!Te.includes(r)&&!(yield we)){if(!ke.includes(r)||!function(e){return void 0!==e.clientId}(e))return null==(n=e.fail)||n.call(e,{errorCode:E}),void(null==(i=e.complete)||i.call(e));Ie({clientId:e.clientId,env:e.env}),yield we}const a=t[r];if(a&&"function"==typeof a)return a(e);V(o,e,e)}))}),r)}});return window._pp=o,function(e){const t=window._ppcs;if(t){window._ppcs=void 0;for(const[n,o,r]of t){const t=e[n](o);r&&r(t)}}}(o),o}({sdkType:N.MiniApp,clientFunctions:Ne})}();
|
|
@@ -6,18 +6,18 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
8
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (
|
|
10
|
-
for (var prop in
|
|
11
|
-
if (__hasOwnProp.call(
|
|
12
|
-
__defNormalProp(
|
|
9
|
+
var __spreadValues = (a2, b2) => {
|
|
10
|
+
for (var prop in b2 || (b2 = {}))
|
|
11
|
+
if (__hasOwnProp.call(b2, prop))
|
|
12
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
13
13
|
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(
|
|
15
|
-
if (__propIsEnum.call(
|
|
16
|
-
__defNormalProp(
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b2)) {
|
|
15
|
+
if (__propIsEnum.call(b2, prop))
|
|
16
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return a2;
|
|
19
19
|
};
|
|
20
|
-
var __spreadProps = (
|
|
20
|
+
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
21
21
|
var __objRest = (source, exclude) => {
|
|
22
22
|
var target = {};
|
|
23
23
|
for (var prop in source)
|
|
@@ -30,20 +30,21 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
}
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
33
34
|
var __async = (__this, __arguments, generator) => {
|
|
34
35
|
return new Promise((resolve, reject) => {
|
|
35
36
|
var fulfilled = (value) => {
|
|
36
37
|
try {
|
|
37
38
|
step(generator.next(value));
|
|
38
|
-
} catch (
|
|
39
|
-
reject(
|
|
39
|
+
} catch (e2) {
|
|
40
|
+
reject(e2);
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
var rejected = (value) => {
|
|
43
44
|
try {
|
|
44
45
|
step(generator.throw(value));
|
|
45
|
-
} catch (
|
|
46
|
-
reject(
|
|
46
|
+
} catch (e2) {
|
|
47
|
+
reject(e2);
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
@@ -52,8 +53,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
52
53
|
};
|
|
53
54
|
/*! js-cookie v3.0.5 | MIT */
|
|
54
55
|
function assign(target) {
|
|
55
|
-
for (var
|
|
56
|
-
var source = arguments[
|
|
56
|
+
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
57
|
+
var source = arguments[i2];
|
|
57
58
|
for (var key in source) {
|
|
58
59
|
target[key] = source[key];
|
|
59
60
|
}
|
|
@@ -106,8 +107,8 @@ function init$2(converter, defaultAttributes) {
|
|
|
106
107
|
}
|
|
107
108
|
var cookies = document.cookie ? document.cookie.split("; ") : [];
|
|
108
109
|
var jar = {};
|
|
109
|
-
for (var
|
|
110
|
-
var parts = cookies[
|
|
110
|
+
for (var i2 = 0; i2 < cookies.length; i2++) {
|
|
111
|
+
var parts = cookies[i2].split("=");
|
|
111
112
|
var value = parts.slice(1).join("=");
|
|
112
113
|
try {
|
|
113
114
|
var found = decodeURIComponent(parts[0]);
|
|
@@ -115,7 +116,7 @@ function init$2(converter, defaultAttributes) {
|
|
|
115
116
|
if (name === found) {
|
|
116
117
|
break;
|
|
117
118
|
}
|
|
118
|
-
} catch (
|
|
119
|
+
} catch (e2) {
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
return name ? jar[name] : jar;
|
|
@@ -204,7 +205,9 @@ const miniAppSupportedFunctions = [
|
|
|
204
205
|
"getPayPayCardInfo",
|
|
205
206
|
"getExternalLinkageInformation",
|
|
206
207
|
"markAsReady",
|
|
207
|
-
"renderCoupons"
|
|
208
|
+
"renderCoupons",
|
|
209
|
+
"logPageNav",
|
|
210
|
+
"logPerf"
|
|
208
211
|
];
|
|
209
212
|
const smartPaymentSupportedFunctions = [
|
|
210
213
|
"init",
|
|
@@ -221,8 +224,8 @@ const smartPaymentSupportedFunctions = [
|
|
|
221
224
|
"getLoginUrl",
|
|
222
225
|
"renderButton"
|
|
223
226
|
];
|
|
224
|
-
const JS_SDK_VERSION = "2.
|
|
225
|
-
const REVISION = "
|
|
227
|
+
const JS_SDK_VERSION = "2.70.0";
|
|
228
|
+
const REVISION = "5fda1d5";
|
|
226
229
|
const coreBaseUrl = new URL("https://mini-app-sdk-core.paypay.ne.jp/");
|
|
227
230
|
const CORE_IFRAME_ORIGIN = coreBaseUrl.origin;
|
|
228
231
|
const CORE_IFRAME_URL = new URL(
|
|
@@ -372,7 +375,7 @@ function isFunction(val) {
|
|
|
372
375
|
function getRandomString(length = 6) {
|
|
373
376
|
const randomValues = new Uint8Array(length);
|
|
374
377
|
crypto.getRandomValues(randomValues);
|
|
375
|
-
return Array.from(randomValues, (
|
|
378
|
+
return Array.from(randomValues, (n2) => (n2 % 36).toString(36)).join("");
|
|
376
379
|
}
|
|
377
380
|
function middlewareHandler(middlewares, message, messageHandler, params) {
|
|
378
381
|
let index = -1;
|
|
@@ -845,13 +848,13 @@ function postMessageToCore(messageData) {
|
|
|
845
848
|
}
|
|
846
849
|
function triggerPostMessageToCore(type, params, postMessageParams) {
|
|
847
850
|
const messageId = getRandomString();
|
|
848
|
-
const fnMessageHandler = (
|
|
849
|
-
if (!checkIFrameOrigin(
|
|
851
|
+
const fnMessageHandler = (e2) => {
|
|
852
|
+
if (!checkIFrameOrigin(e2.origin)) {
|
|
850
853
|
return;
|
|
851
854
|
}
|
|
852
|
-
if (
|
|
853
|
-
if (
|
|
854
|
-
receiveMessageFromIframe(
|
|
855
|
+
if (e2.data.name === type) {
|
|
856
|
+
if (e2.data.messageId === messageId) {
|
|
857
|
+
receiveMessageFromIframe(e2.data, params, fnMessageHandler);
|
|
855
858
|
}
|
|
856
859
|
}
|
|
857
860
|
};
|
|
@@ -973,6 +976,143 @@ function callbackToPromise(target, functionName) {
|
|
|
973
976
|
return promise;
|
|
974
977
|
};
|
|
975
978
|
}
|
|
979
|
+
function getPageLoadStartTime() {
|
|
980
|
+
var _a;
|
|
981
|
+
if (performance.timeOrigin) {
|
|
982
|
+
return performance.timeOrigin;
|
|
983
|
+
}
|
|
984
|
+
if ((_a = performance.timing) == null ? void 0 : _a.navigationStart) {
|
|
985
|
+
return performance.timing.navigationStart;
|
|
986
|
+
}
|
|
987
|
+
return Date.now() - performance.now();
|
|
988
|
+
}
|
|
989
|
+
let t = -1;
|
|
990
|
+
const n = () => t, e = (n2) => {
|
|
991
|
+
addEventListener("pageshow", (e2) => {
|
|
992
|
+
e2.persisted && (t = e2.timeStamp, n2(e2));
|
|
993
|
+
}, true);
|
|
994
|
+
}, i = (t2, n2, e2, i2) => {
|
|
995
|
+
let o2, s2;
|
|
996
|
+
return (a2) => {
|
|
997
|
+
n2.value >= 0 && (a2 || i2) && (s2 = n2.value - (o2 != null ? o2 : 0), (s2 || void 0 === o2) && (o2 = n2.value, n2.delta = s2, n2.rating = ((t3, n3) => t3 > n3[1] ? "poor" : t3 > n3[0] ? "needs-improvement" : "good")(n2.value, e2), t2(n2)));
|
|
998
|
+
};
|
|
999
|
+
}, o = (t2) => {
|
|
1000
|
+
requestAnimationFrame(() => requestAnimationFrame(t2));
|
|
1001
|
+
}, s = () => {
|
|
1002
|
+
const t2 = performance.getEntriesByType("navigation")[0];
|
|
1003
|
+
if (t2 && t2.responseStart > 0 && t2.responseStart < performance.now()) return t2;
|
|
1004
|
+
}, a = () => {
|
|
1005
|
+
var _a, _b;
|
|
1006
|
+
return (_b = (_a = s()) == null ? void 0 : _a.activationStart) != null ? _b : 0;
|
|
1007
|
+
};
|
|
1008
|
+
let r = -1;
|
|
1009
|
+
const c = /* @__PURE__ */ new Set(), f = () => "hidden" !== document.visibilityState || document.prerendering ? 1 / 0 : 0, d = (t2) => {
|
|
1010
|
+
if ("hidden" === document.visibilityState) {
|
|
1011
|
+
if ("visibilitychange" === t2.type) for (const t3 of c) t3();
|
|
1012
|
+
isFinite(r) || (r = "visibilitychange" === t2.type ? t2.timeStamp : 0, removeEventListener("prerenderingchange", d, true));
|
|
1013
|
+
}
|
|
1014
|
+
}, h = (t2 = false) => {
|
|
1015
|
+
var _a;
|
|
1016
|
+
if (t2 && (r = 1 / 0), r < 0) {
|
|
1017
|
+
const t3 = a(), n2 = document.prerendering ? void 0 : (_a = globalThis.performance.getEntriesByType("visibility-state").find((n3) => "hidden" === n3.name && n3.startTime >= t3)) == null ? void 0 : _a.startTime;
|
|
1018
|
+
r = n2 != null ? n2 : f(), addEventListener("visibilitychange", d, true), addEventListener("prerenderingchange", d, true), e(() => {
|
|
1019
|
+
setTimeout(() => {
|
|
1020
|
+
r = f();
|
|
1021
|
+
});
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
return { get firstHiddenTime() {
|
|
1025
|
+
return r;
|
|
1026
|
+
}, onHidden(t3) {
|
|
1027
|
+
c.add(t3);
|
|
1028
|
+
} };
|
|
1029
|
+
}, l = (t2, e2 = -1, i2, o2 = 0, r2, c2, f2) => {
|
|
1030
|
+
const d2 = s(), h2 = (d2 == null ? void 0 : d2.navigationId) || 0;
|
|
1031
|
+
let l2 = "navigate";
|
|
1032
|
+
i2 ? l2 = i2 : n() >= 0 ? l2 = "back-forward-cache" : d2 && (document.prerendering || a() > 0 ? l2 = "prerender" : document.wasDiscarded ? l2 = "restore" : d2.type && (l2 = d2.type.replace(/_/g, "-")));
|
|
1033
|
+
return { name: t2, value: e2, rating: "good", delta: 0, entries: [], id: `v6-${Date.now()}-${Math.floor(8999999999999 * Math.random()) + 1e12}`, navigationType: l2, navigationId: o2 || h2, navigationInteractionId: r2, navigationURL: c2 || (d2 == null ? void 0 : d2.name), navigationStartTime: f2 || 0 };
|
|
1034
|
+
}, g = /* @__PURE__ */ new WeakMap();
|
|
1035
|
+
function u(t2, n2) {
|
|
1036
|
+
let e2 = g.get(n2);
|
|
1037
|
+
return e2 || (e2 = /* @__PURE__ */ new WeakMap(), g.set(n2, e2)), e2.get(t2) || e2.set(t2, new n2()), e2.get(t2);
|
|
1038
|
+
}
|
|
1039
|
+
const m = (t2, n2, e2 = {}) => {
|
|
1040
|
+
try {
|
|
1041
|
+
const i2 = t2.filter((t3) => PerformanceObserver.supportedEntryTypes.includes(t3));
|
|
1042
|
+
if (i2.length > 0) {
|
|
1043
|
+
const t3 = new PerformanceObserver((t4) => {
|
|
1044
|
+
queueMicrotask(() => {
|
|
1045
|
+
const e3 = t4.getEntries();
|
|
1046
|
+
i2.length > 1 && e3.sort((t5, n3) => t5.startTime + t5.duration - (n3.startTime + n3.duration)), n2(e3);
|
|
1047
|
+
});
|
|
1048
|
+
});
|
|
1049
|
+
for (const n3 of i2) t3.observe(__spreadValues({ type: n3, buffered: true }, e2));
|
|
1050
|
+
return t3;
|
|
1051
|
+
}
|
|
1052
|
+
} catch (e3) {
|
|
1053
|
+
}
|
|
1054
|
+
}, p = (t2) => {
|
|
1055
|
+
var _a, _b, _c;
|
|
1056
|
+
return ((_a = globalThis.PerformanceObserver) == null ? void 0 : _a.supportedEntryTypes.includes("soft-navigation")) && "function" == typeof ((_c = (_b = globalThis.PerformanceSoftNavigation) == null ? void 0 : _b.prototype) == null ? void 0 : _c.getLargestInteractionContentfulPaint) && t2 && t2.reportSoftNavs;
|
|
1057
|
+
}, b = (t2, n2) => {
|
|
1058
|
+
if (t2.set(n2.navigationId, n2), t2.size > 2) {
|
|
1059
|
+
const n3 = t2.keys().next().value;
|
|
1060
|
+
void 0 !== n3 && t2.delete(n3);
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
class y {
|
|
1064
|
+
constructor() {
|
|
1065
|
+
__publicField(this, "l");
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
const E = (t2) => {
|
|
1069
|
+
document.prerendering ? addEventListener("prerenderingchange", t2, true) : t2();
|
|
1070
|
+
}, M = [1800, 3e3], _ = (t2, s2 = {}) => {
|
|
1071
|
+
const r2 = p(s2);
|
|
1072
|
+
E(() => {
|
|
1073
|
+
const c2 = u(s2, y), f2 = h();
|
|
1074
|
+
let d2, g2 = l("FCP");
|
|
1075
|
+
const v = m(["paint"], (t3) => {
|
|
1076
|
+
for (const n2 of t3) "first-contentful-paint" === n2.name && (v.disconnect(), n2.startTime < f2.firstHiddenTime && (g2.value = Math.max(n2.startTime - a(), 0), g2.entries.push(n2), g2.navigationId = n2.navigationId || g2.navigationId, d2(true)));
|
|
1077
|
+
});
|
|
1078
|
+
if (v && (d2 = i(t2, g2, M, s2.reportAllChanges), e((e2) => {
|
|
1079
|
+
g2 = l("FCP", -1, "back-forward-cache", g2.navigationId, g2.navigationInteractionId, g2.navigationURL, n()), d2 = i(t2, g2, M, s2.reportAllChanges), o(() => {
|
|
1080
|
+
g2.value = performance.now() - e2.timeStamp, d2(true);
|
|
1081
|
+
});
|
|
1082
|
+
})), r2) {
|
|
1083
|
+
m(["soft-navigation"], (n2) => {
|
|
1084
|
+
n2.forEach((n3) => {
|
|
1085
|
+
c2.l && n3.navigationId && b(c2.l, n3);
|
|
1086
|
+
const e2 = Math.max((n3.presentationTime || n3.paintTime || 0) - n3.startTime, 0);
|
|
1087
|
+
g2 = l("FCP", e2, "soft-navigation", n3.navigationId, n3.interactionId, n3.name, n3.startTime), d2 = i(t2, g2, M, s2.reportAllChanges), d2(true);
|
|
1088
|
+
});
|
|
1089
|
+
}, s2);
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
};
|
|
1093
|
+
let observing = false;
|
|
1094
|
+
let stopObserving = false;
|
|
1095
|
+
function stopObservingTtid() {
|
|
1096
|
+
stopObserving = true;
|
|
1097
|
+
}
|
|
1098
|
+
function observeTtid() {
|
|
1099
|
+
if (observing) {
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
observing = true;
|
|
1103
|
+
const pageLoadStartTime = getPageLoadStartTime();
|
|
1104
|
+
_((metric) => {
|
|
1105
|
+
if (stopObserving) {
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
stopObserving = true;
|
|
1109
|
+
void coreFunctions.logPerf({
|
|
1110
|
+
type: "TTID",
|
|
1111
|
+
startTime: pageLoadStartTime,
|
|
1112
|
+
endTime: pageLoadStartTime + metric.value
|
|
1113
|
+
});
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
976
1116
|
let clientSdkType;
|
|
977
1117
|
let initDonePromise;
|
|
978
1118
|
void getCoreIframe();
|
|
@@ -980,39 +1120,39 @@ function clearInternalInitSyncState() {
|
|
|
980
1120
|
initDonePromise = Promise.resolve(false);
|
|
981
1121
|
}
|
|
982
1122
|
clearInternalInitSyncState();
|
|
983
|
-
const commonMessageHandler = (
|
|
1123
|
+
const commonMessageHandler = (e2) => {
|
|
984
1124
|
var _a;
|
|
985
|
-
if ((_a =
|
|
1125
|
+
if ((_a = e2.data) == null ? void 0 : _a.forWindowBridge) {
|
|
986
1126
|
return;
|
|
987
1127
|
}
|
|
988
|
-
if (!checkIFrameOrigin(
|
|
1128
|
+
if (!checkIFrameOrigin(e2.origin)) {
|
|
989
1129
|
return;
|
|
990
1130
|
}
|
|
991
|
-
if (
|
|
1131
|
+
if (e2.data.name === reload) {
|
|
992
1132
|
window.location.reload();
|
|
993
1133
|
}
|
|
994
|
-
if (
|
|
1134
|
+
if (e2.data.name === makeVisible) {
|
|
995
1135
|
showCoreIframe(true);
|
|
996
1136
|
return;
|
|
997
1137
|
}
|
|
998
|
-
if (
|
|
1138
|
+
if (e2.data.name === showIframe) {
|
|
999
1139
|
showCoreIframe(true);
|
|
1000
1140
|
return;
|
|
1001
1141
|
}
|
|
1002
|
-
if (
|
|
1142
|
+
if (e2.data.name === hideIframe) {
|
|
1003
1143
|
showCoreIframe(false);
|
|
1004
1144
|
return;
|
|
1005
1145
|
}
|
|
1006
|
-
if (
|
|
1007
|
-
const linkOption =
|
|
1146
|
+
if (e2.data.name === link) {
|
|
1147
|
+
const linkOption = e2.data.data;
|
|
1008
1148
|
if (linkOption.target === "_blank") {
|
|
1009
1149
|
window.open(linkOption.url, "_blank");
|
|
1010
1150
|
} else {
|
|
1011
1151
|
window.location.href = linkOption.url;
|
|
1012
1152
|
}
|
|
1013
1153
|
}
|
|
1014
|
-
if (
|
|
1015
|
-
const { params } =
|
|
1154
|
+
if (e2.data.name === consoleDebugInfo$1) {
|
|
1155
|
+
const { params } = e2.data.data;
|
|
1016
1156
|
consoleDebugInfo(params);
|
|
1017
1157
|
}
|
|
1018
1158
|
};
|
|
@@ -1028,12 +1168,13 @@ addEventListener("popstate", () => {
|
|
|
1028
1168
|
});
|
|
1029
1169
|
function init(params) {
|
|
1030
1170
|
const refreshToken2 = getRefreshToken(params.clientId, params.useLocalStorage);
|
|
1031
|
-
const clientVersion = "2.
|
|
1171
|
+
const clientVersion = "2.70.0";
|
|
1032
1172
|
const initParams = __spreadProps(__spreadValues({}, params), {
|
|
1033
1173
|
refreshToken: refreshToken2,
|
|
1034
1174
|
clientVersion,
|
|
1035
1175
|
clientSdkType,
|
|
1036
|
-
clientUrl: window.location.href
|
|
1176
|
+
clientUrl: window.location.href,
|
|
1177
|
+
clientPageLoadStartTime: getPageLoadStartTime()
|
|
1037
1178
|
});
|
|
1038
1179
|
if (params.disableBackgroundScrollLock != null) {
|
|
1039
1180
|
setDisableBackgroundScrollLock(!!params.disableBackgroundScrollLock);
|
|
@@ -1046,6 +1187,9 @@ function init(params) {
|
|
|
1046
1187
|
var _a;
|
|
1047
1188
|
initDonePromiseResolve(true);
|
|
1048
1189
|
(_a = params.complete) == null ? void 0 : _a.call(params);
|
|
1190
|
+
if (params.pageName) {
|
|
1191
|
+
observeTtid();
|
|
1192
|
+
}
|
|
1049
1193
|
};
|
|
1050
1194
|
initDonePromise.then(() => getCoreIframe()).then(() => {
|
|
1051
1195
|
triggerPostMessageToCore(
|
|
@@ -1105,8 +1249,8 @@ function executePendingFunctionCalls(client2) {
|
|
|
1105
1249
|
}
|
|
1106
1250
|
}
|
|
1107
1251
|
const clientProperties = {
|
|
1108
|
-
version: "2.
|
|
1109
|
-
revision: "
|
|
1252
|
+
version: "2.70.0",
|
|
1253
|
+
revision: "5fda1d5"
|
|
1110
1254
|
};
|
|
1111
1255
|
function isInitClientParams(params) {
|
|
1112
1256
|
return params.clientId !== void 0;
|
|
@@ -1221,6 +1365,32 @@ const logout = promiseToCallback("logout", () => __async(void 0, null, function*
|
|
|
1221
1365
|
yield coreFunctions.logout();
|
|
1222
1366
|
return { statusCode: MiniAppStatusType.loggedOut };
|
|
1223
1367
|
}));
|
|
1368
|
+
const logPageNav = promiseToCallback(
|
|
1369
|
+
"logPageNav",
|
|
1370
|
+
(_d) => {
|
|
1371
|
+
var _e = _d, {
|
|
1372
|
+
startTime,
|
|
1373
|
+
url
|
|
1374
|
+
} = _e, params = __objRest(_e, [
|
|
1375
|
+
"startTime",
|
|
1376
|
+
"url"
|
|
1377
|
+
]);
|
|
1378
|
+
stopObservingTtid();
|
|
1379
|
+
return coreFunctions.logPageNav(__spreadValues({
|
|
1380
|
+
startTime: startTime != null ? startTime : getPageLoadStartTime() + performance.now(),
|
|
1381
|
+
url: url != null ? url : window.location.href
|
|
1382
|
+
}, params));
|
|
1383
|
+
}
|
|
1384
|
+
);
|
|
1385
|
+
const logPerf = promiseToCallback(
|
|
1386
|
+
"logPerf",
|
|
1387
|
+
(_f) => {
|
|
1388
|
+
var _g = _f, { endTime } = _g, params = __objRest(_g, ["endTime"]);
|
|
1389
|
+
return coreFunctions.logPerf(__spreadValues({
|
|
1390
|
+
endTime: endTime != null ? endTime : getPageLoadStartTime() + performance.now()
|
|
1391
|
+
}, params));
|
|
1392
|
+
}
|
|
1393
|
+
);
|
|
1224
1394
|
const renderCoupons = promiseToCallback(
|
|
1225
1395
|
"renderCoupons",
|
|
1226
1396
|
(params) => __async(void 0, null, function* () {
|
|
@@ -1372,7 +1542,9 @@ const clientFunctions = {
|
|
|
1372
1542
|
getKycPassportInfo,
|
|
1373
1543
|
logout,
|
|
1374
1544
|
getPaymentSettings,
|
|
1375
|
-
markAsReady
|
|
1545
|
+
markAsReady,
|
|
1546
|
+
logPageNav,
|
|
1547
|
+
logPerf
|
|
1376
1548
|
};
|
|
1377
1549
|
const client = getClient({ sdkType: SdkType.MiniApp, clientFunctions });
|
|
1378
1550
|
const miniAppSdk = client;
|
|
@@ -51,6 +51,9 @@ export declare const img_mobileIcon: string;
|
|
|
51
51
|
export declare const img_exclaimIcon: string;
|
|
52
52
|
export declare const img_iconPpcdGold: string;
|
|
53
53
|
export declare const img_iconPpcd: string;
|
|
54
|
+
export declare const img_iconPpcdPink: string;
|
|
55
|
+
export declare const img_iconPpcdBlue: string;
|
|
56
|
+
export declare const img_iconPpcdLavender: string;
|
|
54
57
|
export declare const img_kyc: string;
|
|
55
58
|
export declare const img_ppCredit: string;
|
|
56
59
|
export declare const qr_kyc: string;
|
package/dist/types/init.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface InitClientParams extends NativeParams<InitResult> {
|
|
|
7
7
|
debugMode?: boolean;
|
|
8
8
|
useLocalStorage?: boolean;
|
|
9
9
|
disableBackgroundScrollLock?: boolean;
|
|
10
|
+
pageName?: string;
|
|
11
|
+
otelEndpoint?: string;
|
|
10
12
|
}
|
|
11
13
|
export interface InitParams extends NativeParams<InitResult> {
|
|
12
14
|
clientId: string;
|
|
@@ -21,6 +23,9 @@ export interface InitParams extends NativeParams<InitResult> {
|
|
|
21
23
|
clientSdkType?: SdkType;
|
|
22
24
|
clientUrl?: string;
|
|
23
25
|
useLocalStorage?: boolean;
|
|
26
|
+
pageName?: string;
|
|
27
|
+
clientPageLoadStartTime?: number;
|
|
28
|
+
otelEndpoint?: string;
|
|
24
29
|
}
|
|
25
30
|
export declare const PPEnv: {
|
|
26
31
|
readonly staging: "staging";
|
|
@@ -183,6 +183,13 @@ export declare enum PayPayCardType {
|
|
|
183
183
|
GOLD = "GOLD",
|
|
184
184
|
REGULAR = "REGULAR"
|
|
185
185
|
}
|
|
186
|
+
export declare enum PayPayCardFaceCode {
|
|
187
|
+
BLACK = "BLACK",
|
|
188
|
+
PINK = "PINK",
|
|
189
|
+
BLUE = "BLUE",
|
|
190
|
+
LAVENDER = "LAVENDER",
|
|
191
|
+
GOLD = "GOLD"
|
|
192
|
+
}
|
|
186
193
|
export declare type CreditCardInfo = {
|
|
187
194
|
brand?: CreditTypes;
|
|
188
195
|
isAuthenticated?: boolean;
|
|
@@ -260,6 +267,7 @@ export declare type PayLaterCCInfo = {
|
|
|
260
267
|
last4digits?: string;
|
|
261
268
|
linkedCardBrand?: Exclude<CreditTypes, CreditTypes.AMEX | CreditTypes.DINERS | CreditTypes.OTHER>;
|
|
262
269
|
linkedCardType?: PayPayCardType;
|
|
270
|
+
faceCode?: PayPayCardFaceCode;
|
|
263
271
|
availableAmount?: number;
|
|
264
272
|
paymentMethodStatus?: PaymentMethodStatus;
|
|
265
273
|
paymentMethodStatusLabel?: string;
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { UIComponentsErrorButton } from '../model/uiComponents';
|
|
|
3
3
|
import { ErrorSheetButton, PaymentLabelType, SmartPayParams } from '../types';
|
|
4
4
|
import { FontSize } from '../types/getPlatformInformation';
|
|
5
5
|
import { InitParams } from '../types/init';
|
|
6
|
-
import { BankInfo, CreditCardInfo, InfoBanner, MakePaymentParams, OrderType, PayLaterCCInfo, PaymentMethod, SbidBankInfo } from '../types/makePayment';
|
|
6
|
+
import { BankInfo, CreditCardInfo, InfoBanner, MakePaymentParams, OrderType, PayLaterCCInfo, PayPayCardFaceCode, PaymentMethod, SbidBankInfo } from '../types/makePayment';
|
|
7
7
|
import { PPFetchResult } from './fetch';
|
|
8
8
|
export declare function isDef<T>(val: T): val is NonNullable<T>;
|
|
9
9
|
export declare function isNumeric(val: string | number): val is string;
|
|
@@ -83,6 +83,8 @@ export declare function makeDefaultErrorHandler(params: {
|
|
|
83
83
|
}) => void;
|
|
84
84
|
} | undefined, onComplete: () => void, reportException?: (error: unknown) => void): (err: unknown) => void;
|
|
85
85
|
export declare function getCardBrandImage(brandName: string): string;
|
|
86
|
+
export declare const PAYPAY_CARD_FACE_IMAGE_MAP: Record<PayPayCardFaceCode, string>;
|
|
87
|
+
export declare function getPayPayCardFaceImage(payLaterCcInfo?: Pick<PayLaterCCInfo, 'faceCode' | 'linkedCardType'>): string | undefined;
|
|
86
88
|
export declare function hasMultiplePPCD(paymentMethods: PaymentMethod[] | undefined): boolean;
|
|
87
89
|
export declare function addAdditionalInfoForMultiplePPCD(paymentMethods: PaymentMethod[]): void;
|
|
88
90
|
declare type OrderInfo = SmartPayParams | MakePaymentParams;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InitOpenTelemetryParams, LogPageNavParams, LogPerfParams } from './types';
|
|
2
|
+
export declare function initOpenTelemetry(params: InitOpenTelemetryParams): void;
|
|
3
|
+
export declare function logPageNav(params: LogPageNavParams): void;
|
|
4
|
+
export declare function logPerf(params: LogPerfParams): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InitOpenTelemetryParams, LogPageNavParams, LogPerfParams } from './types';
|
|
2
|
+
export declare function initOpenTelemetry({ clientId, otelEndpoint, pageName, clientPageLoadStartTime: _clientPageLoadStartTime, clientPageUrl, environmentName, }: InitOpenTelemetryParams): void;
|
|
3
|
+
export declare function removeEventListeners(): void;
|
|
4
|
+
export declare function logPageNav({ startTime, pageName, url, navigationType, }: LogPageNavParams): void;
|
|
5
|
+
export declare function logPerf({ type, startTime, endTime, featureName, }: LogPerfParams): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface InitOpenTelemetryParams {
|
|
2
|
+
clientId: string;
|
|
3
|
+
pageName: string;
|
|
4
|
+
otelEndpoint?: string;
|
|
5
|
+
clientPageLoadStartTime: number;
|
|
6
|
+
clientPageUrl: string;
|
|
7
|
+
environmentName: string;
|
|
8
|
+
}
|
|
9
|
+
export interface LogPageNavParams {
|
|
10
|
+
startTime: number;
|
|
11
|
+
pageName: string;
|
|
12
|
+
url: string;
|
|
13
|
+
navigationType?: 'page-load' | 'spa-navigation';
|
|
14
|
+
}
|
|
15
|
+
export declare type MeasurementType = 'TTID' | 'TTKI' | 'TTMI' | 'TTFD';
|
|
16
|
+
export interface LogPerfParams {
|
|
17
|
+
type: MeasurementType;
|
|
18
|
+
startTime?: number;
|
|
19
|
+
endTime: number;
|
|
20
|
+
featureName?: string;
|
|
21
|
+
}
|
|
@@ -18,6 +18,8 @@ declare const CouponAction: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
18
18
|
getLoginUrl: typeof import("../../../../core/coreFunctions/getLoginUrl").getLoginUrl;
|
|
19
19
|
getPaymentSettings: typeof import("../../../../core/coreFunctions/getPaymentSettings").getPaymentSettings;
|
|
20
20
|
logEvent: typeof import("../../../../core/coreFunctions/logEvent").logEvent;
|
|
21
|
+
logPerf: typeof import("../../../../core/coreFunctions/logPerf").logPerf;
|
|
22
|
+
logPageNav: typeof import("../../../../core/coreFunctions/logPageNav").logPageNav;
|
|
21
23
|
logout: typeof import("../../../../core/coreFunctions/logout").logout;
|
|
22
24
|
markAsReady: typeof import("../../../../core/coreFunctions/markAsReady").markAsReady;
|
|
23
25
|
renderButton: typeof import("../../../../core/coreFunctions/renderButton").renderButton;
|
|
@@ -54,6 +56,8 @@ declare const CouponAction: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
54
56
|
getLoginUrl: typeof import("../../../../core/coreFunctions/getLoginUrl").getLoginUrl;
|
|
55
57
|
getPaymentSettings: typeof import("../../../../core/coreFunctions/getPaymentSettings").getPaymentSettings;
|
|
56
58
|
logEvent: typeof import("../../../../core/coreFunctions/logEvent").logEvent;
|
|
59
|
+
logPerf: typeof import("../../../../core/coreFunctions/logPerf").logPerf;
|
|
60
|
+
logPageNav: typeof import("../../../../core/coreFunctions/logPageNav").logPageNav;
|
|
57
61
|
logout: typeof import("../../../../core/coreFunctions/logout").logout;
|
|
58
62
|
markAsReady: typeof import("../../../../core/coreFunctions/markAsReady").markAsReady;
|
|
59
63
|
renderButton: typeof import("../../../../core/coreFunctions/renderButton").renderButton;
|
|
@@ -22,6 +22,8 @@ export declare const CouponView: import("vue").DefineComponent<import("vue").Ext
|
|
|
22
22
|
getLoginUrl: typeof import("../../core/coreFunctions/getLoginUrl").getLoginUrl;
|
|
23
23
|
getPaymentSettings: typeof import("../../core/coreFunctions/getPaymentSettings").getPaymentSettings;
|
|
24
24
|
logEvent: typeof import("../../core/coreFunctions/logEvent").logEvent;
|
|
25
|
+
logPerf: typeof import("../../core/coreFunctions/logPerf").logPerf;
|
|
26
|
+
logPageNav: typeof import("../../core/coreFunctions/logPageNav").logPageNav;
|
|
25
27
|
logout: typeof import("../../core/coreFunctions/logout").logout;
|
|
26
28
|
markAsReady: typeof import("../../core/coreFunctions/markAsReady").markAsReady;
|
|
27
29
|
renderButton: typeof import("../../core/coreFunctions/renderButton").renderButton;
|
|
@@ -66,6 +68,8 @@ export declare const CouponView: import("vue").DefineComponent<import("vue").Ext
|
|
|
66
68
|
getLoginUrl: typeof import("../../core/coreFunctions/getLoginUrl").getLoginUrl;
|
|
67
69
|
getPaymentSettings: typeof import("../../core/coreFunctions/getPaymentSettings").getPaymentSettings;
|
|
68
70
|
logEvent: typeof import("../../core/coreFunctions/logEvent").logEvent;
|
|
71
|
+
logPerf: typeof import("../../core/coreFunctions/logPerf").logPerf;
|
|
72
|
+
logPageNav: typeof import("../../core/coreFunctions/logPageNav").logPageNav;
|
|
69
73
|
logout: typeof import("../../core/coreFunctions/logout").logout;
|
|
70
74
|
markAsReady: typeof import("../../core/coreFunctions/markAsReady").markAsReady;
|
|
71
75
|
renderButton: typeof import("../../core/coreFunctions/renderButton").renderButton;
|
|
@@ -622,6 +622,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
622
622
|
last4digits?: string | undefined;
|
|
623
623
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
624
624
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
625
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
625
626
|
availableAmount?: number | undefined;
|
|
626
627
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
627
628
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -1354,6 +1355,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
1354
1355
|
last4digits?: string | undefined;
|
|
1355
1356
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
1356
1357
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
1358
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
1357
1359
|
availableAmount?: number | undefined;
|
|
1358
1360
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
1359
1361
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -2104,6 +2106,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
2104
2106
|
last4digits?: string | undefined;
|
|
2105
2107
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
2106
2108
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
2109
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
2107
2110
|
availableAmount?: number | undefined;
|
|
2108
2111
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
2109
2112
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -3116,6 +3119,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
3116
3119
|
last4digits?: string | undefined;
|
|
3117
3120
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
3118
3121
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
3122
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
3119
3123
|
availableAmount?: number | undefined;
|
|
3120
3124
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
3121
3125
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -3848,6 +3852,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
3848
3852
|
last4digits?: string | undefined;
|
|
3849
3853
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
3850
3854
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
3855
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
3851
3856
|
availableAmount?: number | undefined;
|
|
3852
3857
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
3853
3858
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -4598,6 +4603,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
4598
4603
|
last4digits?: string | undefined;
|
|
4599
4604
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
4600
4605
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
4606
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
4601
4607
|
availableAmount?: number | undefined;
|
|
4602
4608
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
4603
4609
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -5610,6 +5616,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
5610
5616
|
last4digits?: string | undefined;
|
|
5611
5617
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
5612
5618
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
5619
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
5613
5620
|
availableAmount?: number | undefined;
|
|
5614
5621
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
5615
5622
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -6342,6 +6349,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
6342
6349
|
last4digits?: string | undefined;
|
|
6343
6350
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
6344
6351
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
6352
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
6345
6353
|
availableAmount?: number | undefined;
|
|
6346
6354
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
6347
6355
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -7092,6 +7100,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
7092
7100
|
last4digits?: string | undefined;
|
|
7093
7101
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
7094
7102
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
7103
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
7095
7104
|
availableAmount?: number | undefined;
|
|
7096
7105
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
7097
7106
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -8104,6 +8113,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
8104
8113
|
last4digits?: string | undefined;
|
|
8105
8114
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
8106
8115
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
8116
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
8107
8117
|
availableAmount?: number | undefined;
|
|
8108
8118
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
8109
8119
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -8836,6 +8846,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
8836
8846
|
last4digits?: string | undefined;
|
|
8837
8847
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
8838
8848
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
8849
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
8839
8850
|
availableAmount?: number | undefined;
|
|
8840
8851
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
8841
8852
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -9586,6 +9597,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
9586
9597
|
last4digits?: string | undefined;
|
|
9587
9598
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
9588
9599
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
9600
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
9589
9601
|
availableAmount?: number | undefined;
|
|
9590
9602
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
9591
9603
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -10600,6 +10612,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
10600
10612
|
last4digits?: string | undefined;
|
|
10601
10613
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
10602
10614
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
10615
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
10603
10616
|
availableAmount?: number | undefined;
|
|
10604
10617
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
10605
10618
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -11332,6 +11345,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
11332
11345
|
last4digits?: string | undefined;
|
|
11333
11346
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
11334
11347
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
11348
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
11335
11349
|
availableAmount?: number | undefined;
|
|
11336
11350
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
11337
11351
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -12082,6 +12096,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
12082
12096
|
last4digits?: string | undefined;
|
|
12083
12097
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
12084
12098
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
12099
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
12085
12100
|
availableAmount?: number | undefined;
|
|
12086
12101
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
12087
12102
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -13094,6 +13109,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
13094
13109
|
last4digits?: string | undefined;
|
|
13095
13110
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
13096
13111
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
13112
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
13097
13113
|
availableAmount?: number | undefined;
|
|
13098
13114
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
13099
13115
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -13826,6 +13842,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
13826
13842
|
last4digits?: string | undefined;
|
|
13827
13843
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
13828
13844
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
13845
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
13829
13846
|
availableAmount?: number | undefined;
|
|
13830
13847
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
13831
13848
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -14576,6 +14593,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
14576
14593
|
last4digits?: string | undefined;
|
|
14577
14594
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
14578
14595
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
14596
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
14579
14597
|
availableAmount?: number | undefined;
|
|
14580
14598
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
14581
14599
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -15588,6 +15606,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
15588
15606
|
last4digits?: string | undefined;
|
|
15589
15607
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
15590
15608
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
15609
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
15591
15610
|
availableAmount?: number | undefined;
|
|
15592
15611
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
15593
15612
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -16320,6 +16339,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
16320
16339
|
last4digits?: string | undefined;
|
|
16321
16340
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
16322
16341
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
16342
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
16323
16343
|
availableAmount?: number | undefined;
|
|
16324
16344
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
16325
16345
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -17070,6 +17090,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
17070
17090
|
last4digits?: string | undefined;
|
|
17071
17091
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
17072
17092
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
17093
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
17073
17094
|
availableAmount?: number | undefined;
|
|
17074
17095
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
17075
17096
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -18082,6 +18103,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
18082
18103
|
last4digits?: string | undefined;
|
|
18083
18104
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
18084
18105
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
18106
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
18085
18107
|
availableAmount?: number | undefined;
|
|
18086
18108
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
18087
18109
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -18814,6 +18836,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
18814
18836
|
last4digits?: string | undefined;
|
|
18815
18837
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
18816
18838
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
18839
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
18817
18840
|
availableAmount?: number | undefined;
|
|
18818
18841
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
18819
18842
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -19564,6 +19587,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
19564
19587
|
last4digits?: string | undefined;
|
|
19565
19588
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
19566
19589
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
19590
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
19567
19591
|
availableAmount?: number | undefined;
|
|
19568
19592
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
19569
19593
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -20579,6 +20603,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
20579
20603
|
last4digits?: string | undefined;
|
|
20580
20604
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
20581
20605
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
20606
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
20582
20607
|
availableAmount?: number | undefined;
|
|
20583
20608
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
20584
20609
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -21311,6 +21336,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
21311
21336
|
last4digits?: string | undefined;
|
|
21312
21337
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
21313
21338
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
21339
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
21314
21340
|
availableAmount?: number | undefined;
|
|
21315
21341
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
21316
21342
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -22061,6 +22087,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
22061
22087
|
last4digits?: string | undefined;
|
|
22062
22088
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
22063
22089
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
22090
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
22064
22091
|
availableAmount?: number | undefined;
|
|
22065
22092
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
22066
22093
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -23073,6 +23100,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
23073
23100
|
last4digits?: string | undefined;
|
|
23074
23101
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
23075
23102
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
23103
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
23076
23104
|
availableAmount?: number | undefined;
|
|
23077
23105
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
23078
23106
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -23805,6 +23833,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
23805
23833
|
last4digits?: string | undefined;
|
|
23806
23834
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
23807
23835
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
23836
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
23808
23837
|
availableAmount?: number | undefined;
|
|
23809
23838
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
23810
23839
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -24555,6 +24584,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
24555
24584
|
last4digits?: string | undefined;
|
|
24556
24585
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
24557
24586
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
24587
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
24558
24588
|
availableAmount?: number | undefined;
|
|
24559
24589
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
24560
24590
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -25567,6 +25597,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
25567
25597
|
last4digits?: string | undefined;
|
|
25568
25598
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
25569
25599
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
25600
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
25570
25601
|
availableAmount?: number | undefined;
|
|
25571
25602
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
25572
25603
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -26299,6 +26330,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
26299
26330
|
last4digits?: string | undefined;
|
|
26300
26331
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
26301
26332
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
26333
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
26302
26334
|
availableAmount?: number | undefined;
|
|
26303
26335
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
26304
26336
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -27049,6 +27081,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
27049
27081
|
last4digits?: string | undefined;
|
|
27050
27082
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
27051
27083
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
27084
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
27052
27085
|
availableAmount?: number | undefined;
|
|
27053
27086
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
27054
27087
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -28065,6 +28098,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
28065
28098
|
last4digits?: string | undefined;
|
|
28066
28099
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
28067
28100
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
28101
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
28068
28102
|
availableAmount?: number | undefined;
|
|
28069
28103
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
28070
28104
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -28797,6 +28831,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
28797
28831
|
last4digits?: string | undefined;
|
|
28798
28832
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
28799
28833
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
28834
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
28800
28835
|
availableAmount?: number | undefined;
|
|
28801
28836
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
28802
28837
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -29547,6 +29582,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
29547
29582
|
last4digits?: string | undefined;
|
|
29548
29583
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
29549
29584
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
29585
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
29550
29586
|
availableAmount?: number | undefined;
|
|
29551
29587
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
29552
29588
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -30559,6 +30595,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
30559
30595
|
last4digits?: string | undefined;
|
|
30560
30596
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
30561
30597
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
30598
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
30562
30599
|
availableAmount?: number | undefined;
|
|
30563
30600
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
30564
30601
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -31291,6 +31328,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
31291
31328
|
last4digits?: string | undefined;
|
|
31292
31329
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
31293
31330
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
31331
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
31294
31332
|
availableAmount?: number | undefined;
|
|
31295
31333
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
31296
31334
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -32041,6 +32079,7 @@ export declare const useMakePaymentStore: import("pinia").StoreDefinition<"makeP
|
|
|
32041
32079
|
last4digits?: string | undefined;
|
|
32042
32080
|
linkedCardBrand?: import('../../types/makePayment').CreditTypes.VISA | import('../../types/makePayment').CreditTypes.MASTER | import('../../types/makePayment').CreditTypes.JCB | undefined;
|
|
32043
32081
|
linkedCardType?: import('../../types/makePayment').PayPayCardType | undefined;
|
|
32082
|
+
faceCode?: import('../../types/makePayment').PayPayCardFaceCode | undefined;
|
|
32044
32083
|
availableAmount?: number | undefined;
|
|
32045
32084
|
paymentMethodStatus?: import('../../types/makePayment').PaymentMethodStatus | undefined;
|
|
32046
32085
|
paymentMethodStatusLabel?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paypay/mini-app-js-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.70.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn build:client && yarn build:core",
|
|
@@ -41,6 +41,11 @@
|
|
|
41
41
|
"js-cookie": "^3.0.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@opentelemetry/api": "^1.9.1",
|
|
45
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.221.0",
|
|
46
|
+
"@opentelemetry/resources": "^2.10.0",
|
|
47
|
+
"@opentelemetry/sdk-trace-web": "^2.10.0",
|
|
48
|
+
"@opentelemetry/semantic-conventions": "^1.43.0",
|
|
44
49
|
"@paypay/avalanche": "^0.1.2",
|
|
45
50
|
"@pinia/testing": "0.1.7",
|
|
46
51
|
"@playwright/test": "^1.49.1",
|
|
@@ -96,6 +101,7 @@
|
|
|
96
101
|
"vitest": "^2.1.8",
|
|
97
102
|
"vitest-canvas-mock": "^0.3.3",
|
|
98
103
|
"vitest-fetch-mock": "^0.4.3",
|
|
104
|
+
"web-vitals": "^6.0.1",
|
|
99
105
|
"vue": "~3.5.13",
|
|
100
106
|
"vue-eslint-parser": "^9.4.3",
|
|
101
107
|
"vue-tsc": "^2.2.0"
|