@alipay/ams-checkout 0.0.1788166152-dev.0 → 0.0.1788166152-dev.2

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.
Files changed (52) hide show
  1. package/ams-checkout.js +3 -3
  2. package/dist/ams-checkout.min.js +1 -1
  3. package/dist/ams-checkout.min.js.map +1 -1
  4. package/esm/config/index.js +1 -1
  5. package/esm/core/component/ckp/index.js +21 -1
  6. package/esm/core/component/element/elementController/index.js +4 -3
  7. package/esm/core/component/element/modernElementController/adapter.js +3 -3
  8. package/esm/core/component/element/modernElementController/index.d.ts +6 -1
  9. package/esm/core/component/element/modernElementController/index.js +260 -189
  10. package/esm/core/component/element/type.d.ts +2 -2
  11. package/esm/foundation/service/log/keys.js +4 -0
  12. package/esm/index.d.ts +6 -7
  13. package/esm/index.js +9 -14
  14. package/esm/modern/core/component/element/modernElementController/index.d.ts +6 -1
  15. package/esm/modern/core/component/element/type.d.ts +2 -2
  16. package/esm/modern/index.js +1 -1
  17. package/esm/modern/loadAntomTracker.d.ts +7 -0
  18. package/esm/modern/loadAntomTracker.js +64 -0
  19. package/esm/modern/modern/loadAntomTracker.d.ts +7 -0
  20. package/esm/modern/modern/preload/preloadAntomElements.d.ts +1 -1
  21. package/esm/modern/modern/preload/startAntomPreload.d.ts +2 -0
  22. package/esm/modern/modern/sdk/applepay-core/ApplePayHostService.d.ts +1 -0
  23. package/esm/modern/modern/sdk/elements/CVVElement.d.ts +28 -23
  24. package/esm/modern/modern/sdk/elements/PaymentElement.d.ts +51 -12
  25. package/esm/modern/modern/sdk/elements/appearanceRules.d.ts +59 -0
  26. package/esm/modern/modern/sdk/elements/appearanceRulesDefaults.d.ts +2 -0
  27. package/esm/modern/modern/sdk/tools/expressElement/applePayHostToken.d.ts +6 -1
  28. package/esm/modern/modern/sdk/tools/expressElement/types.d.ts +25 -10
  29. package/esm/modern/modern/sdk/tools/getMetaData.d.ts +8 -1
  30. package/esm/modern/modern/sdk/tools/modalMessageMonitor.d.ts +41 -0
  31. package/esm/modern/modern/sdk/tools/paymentElement/applePayHostToken.d.ts +38 -0
  32. package/esm/modern/modern/sdk/tools/paymentElement/googlePayHostToken.d.ts +38 -0
  33. package/esm/modern/modern/sdk/tools/paymentElement/tracker.d.ts +16 -0
  34. package/esm/modern/modern/sdk/tools/paymentElement/walletHostListeners.d.ts +19 -0
  35. package/esm/modern/modern/sdk/tracking/elementTracker.d.ts +65 -0
  36. package/esm/modern/modern/sdk/types.d.ts +105 -10
  37. package/esm/modern/modern/tools.d.ts +3 -2
  38. package/esm/modern/preload/preloadAntomElements.d.ts +1 -1
  39. package/esm/modern/preload/sgPreconnection.d.ts +1 -1
  40. package/esm/modern/preload/startAntomPreload.d.ts +2 -0
  41. package/esm/modern/preload/startAntomPreload.js +9 -0
  42. package/esm/modern/sdk/elements/appearanceRules.d.ts +59 -0
  43. package/esm/modern/tools.js +1 -1
  44. package/esm/modern/util/timezone.d.ts +1 -0
  45. package/esm/modern/util/versionCompare.d.ts +1 -1
  46. package/esm/tsdoc-metadata.json +1 -1
  47. package/esm/util/logger.js +1 -1
  48. package/esm/util/timezone.d.ts +1 -0
  49. package/esm/util/timezone.js +8 -0
  50. package/package.json +14 -14
  51. package/types.d.ts +580 -71
  52. package/types.untrimmed.d.ts +603 -71
@@ -333,8 +333,8 @@ export interface SubmitFuncParams {
333
333
  /**
334
334
  * Pre-confirmation callback. Executed after user authorization but before actual charge,
335
335
  * allowing merchant to create order at this point.
336
- * - Only effective when payment method is Apple Pay
337
- * - Invoked via event bridge after user FaceID/TouchID authorization on the payment sheet
336
+ * - Apple Pay: invoked via event bridge after user FaceID/TouchID authorization
337
+ * - Other payment methods: invoked before the submit message is sent
338
338
  * - Return true: proceed with charge
339
339
  * - Return false / throw error: abort payment, returns MERCHANT_CONFIRM_ABORT error code
340
340
  * - Timeout: abort payment, returns MERCHANT_CONFIRM_TIMEOUT error code
@@ -93,6 +93,10 @@ _defineProperty(LogComplianceExtendKeys, "complianceExtParams", {
93
93
  // 用来标记行为是否成功
94
94
  startTime: 'D',
95
95
  endTime: 'D',
96
+ theme: 'D',
97
+ // Element 生效主题,含自助化运营模版 ID(APR_ 前缀)
98
+ variables: 'D',
99
+ // 商户是否传入自定义 appearance.variables
96
100
  // M 数字类型
97
101
  timeCost: 'M',
98
102
  pageLoadProgress: 'M',
package/esm/index.d.ts CHANGED
@@ -1,14 +1,13 @@
1
1
  import { AMSCheckout } from './main';
2
2
  export { AMSEasyPayWrapper as AMSEasyPay, // 异步加载动态更新 - 代扣
3
- AMSElementWrapper as AMSElement } from './loader/index';
4
- export { AMSCashierPayment, // 线上使用率最大的,老的卡支付SDK
3
+ AMSElementWrapper as AMSElement, } from './loader/index';
4
+ export { AddressElement, // 为超类,理论不需要导出
5
+ AMSAutoDebit, // 被EasyPay代替,已废弃
6
+ AMSAutoDebitPay, AMSCashierPayment, // 最早版本的element,未在商户使用,只在测试中使用
7
+ AMSCheckout, // 线上使用率最大的,老的卡支付SDK
5
8
  AMSCheckoutPage, // 嵌入式CKP
6
9
  AMSVaulting, // 老的绑卡,与AMSCashierPayment代码复用率到95%
7
- AntomElement, // 最早版本的element,未在商户使用,只在测试中使用
8
- AMSCheckout, // 为超类,理论不需要导出
9
- AMSAutoDebit, // 被EasyPay代替,已废弃
10
- AMSAutoDebitPay, // 被EasyPay代替,已废弃
11
- AddressElement, } from './main';
10
+ AntomElement, } from './main';
12
11
  export * from './types';
13
12
  export { loadAntom } from './modern/index';
14
13
  export default AMSCheckout;
package/esm/index.js CHANGED
@@ -3,25 +3,20 @@ import { injectAntomSDKIntegrationType } from "./util/integrationType";
3
3
  injectAntomSDKIntegrationType('NPM');
4
4
  export { AMSEasyPayWrapper as AMSEasyPay,
5
5
  // 异步加载动态更新 - 代扣
6
- AMSElementWrapper as AMSElement // 异步加载动态更新 - element
7
- } from "./loader/index";
8
- export { AMSCashierPayment,
6
+ AMSElementWrapper as AMSElement } from "./loader/index";
7
+ export { AddressElement,
8
+ // 为超类,理论不需要导出
9
+ AMSAutoDebit,
10
+ // 被EasyPay代替,已废弃
11
+ AMSAutoDebitPay, AMSCashierPayment,
12
+ // 最早版本的element,未在商户使用,只在测试中使用
13
+ AMSCheckout,
9
14
  // 线上使用率最大的,老的卡支付SDK
10
15
  AMSCheckoutPage,
11
16
  // 嵌入式CKP
12
17
  AMSVaulting,
13
18
  // 老的绑卡,与AMSCashierPayment代码复用率到95%
14
-
15
- AntomElement,
16
- // 最早版本的element,未在商户使用,只在测试中使用
17
- AMSCheckout,
18
- // 为超类,理论不需要导出
19
- AMSAutoDebit,
20
- // 被EasyPay代替,已废弃
21
- AMSAutoDebitPay,
22
- // 被EasyPay代替,已废弃
23
- AddressElement // 未使用
24
- } from "./main";
19
+ AntomElement } from "./main";
25
20
  export * from "./types";
26
21
  export { loadAntom } from "./modern/index";
27
22
  export default AMSCheckout;
@@ -1,4 +1,4 @@
1
- import type { IElementController, IElementOptions, ICommonApiResponse, IPaymentApiResponse, PaymentMountOptions, SubmitFuncParams, EventDataMap } from '../type';
1
+ import type { EventDataMap, ICommonApiResponse, IElementController, IElementOptions, IPaymentApiResponse, PaymentMountOptions, SubmitFuncParams } from '../type';
2
2
  import { EVENTNAME } from '../type';
3
3
  type ModernElementStatus = 'initialized' | 'mounting' | 'mounted' | 'ready' | 'destroyed';
4
4
  interface ModernElementControllerOptions extends IElementOptions {
@@ -38,6 +38,8 @@ export declare class ModernElementController implements IElementController {
38
38
  private _merchantCurrency;
39
39
  /** 当前选中的支付方式类型(如 'APPLEPAY', 'CARD'),通过 paymentMethodChanged 事件更新 */
40
40
  private currentPaymentMethodType;
41
+ /** Removes the passive host-window modal monitor for this controller. */
42
+ private readonly stopModalMessageMonitor;
41
43
  /** 提交进行中标志:submitPayment 执行期间为 true,用于拒绝并发重入,避免旧闭包串扰/重复拉起钱包 */
42
44
  private isSubmitting;
43
45
  /**
@@ -45,11 +47,14 @@ export declare class ModernElementController implements IElementController {
45
47
  * 实例隔离:多实例并发 mount 时各自持有,避免原模块级 _merchantId 的共享竞争。
46
48
  */
47
49
  private merchantId;
50
+ /** session 中的真实业务场景,仅作为埋点公共维度,不参与业务判断。 */
51
+ private productScene;
48
52
  private track;
49
53
  private trackMount;
50
54
  private trackHandshake;
51
55
  private trackElement;
52
56
  private trackError;
57
+ private createRequestTracker;
53
58
  constructor({ onStatusChange, ...options }: ModernElementControllerOptions);
54
59
  mount(renderOptions: PaymentMountOptions, sdkSelector: string): Promise<ICommonApiResponse>;
55
60
  private doMount;
@@ -333,8 +333,8 @@ export interface SubmitFuncParams {
333
333
  /**
334
334
  * Pre-confirmation callback. Executed after user authorization but before actual charge,
335
335
  * allowing merchant to create order at this point.
336
- * - Only effective when payment method is Apple Pay
337
- * - Invoked via event bridge after user FaceID/TouchID authorization on the payment sheet
336
+ * - Apple Pay: invoked via event bridge after user FaceID/TouchID authorization
337
+ * - Other payment methods: invoked before the submit message is sent
338
338
  * - Return true: proceed with charge
339
339
  * - Return false / throw error: abort payment, returns MERCHANT_CONFIRM_ABORT error code
340
340
  * - Timeout: abort payment, returns MERCHANT_CONFIRM_TIMEOUT error code
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return function(){var e={381:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.loadScript=void 0,t.createSingletonInstance=c,t.createInstance=s,t.createLoader=function(e){var t=this,r=e.sdkURL,u=e.globalName,l=e.timeout,f=void 0===l?2e4:l,p=e.onLoadComplete,d=e.onError,h=e.onLoadStart,v=e.onInitialized,m=e.single,y=void 0===m||m,w=e.namespace;return function(e){return n(t,void 0,void 0,(function(){var t,l,m=this;return o(this,(function(g){var b,x;return null==h||h(),t=Date.now(),i.tracker.log({code:"7988",msg:w,d1:"loadStart",d2:"无",d3:"无",d4:"无",d5:"npm",m1:0,m2:0}),b=function(){return(0,a.loadScriptClass)(r,u)},x=f,l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Promise.race([new Promise((function(e,t){setTimeout((function(){t(new a.LoaderError("LOAD_TIMEOUT","Load timeout: ".concat(x)))}),x)})),b.apply(void 0,e)])},[2,l().then((function(r){return n(m,[r],void 0,(function(r){var n,l,f,d=r.variable,h=r.cache;return o(this,(function(r){switch(r.label){case 0:if(n=Date.now(),h||i.tracker.log({code:"7988",msg:w,d1:"loadComplete",d2:"无",d3:"无",d4:(null==d?void 0:d.version)||"无",d5:"npm",m1:Math.round(Date.now()-t),m2:0}),null==p||p(),!d)throw new a.LoaderError("NO_REMOTE_CLASS","No variables ".concat(u," were found. Cannot be initialized the Class ").concat(u));r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(y?c:s)(d,e,void 0)];case 2:return l=r.sent(),i.tracker.log({code:"7988",msg:w,d1:"initialized",d2:"无",d3:"无",d4:l.version||"无版本号",d5:"npm",m1:Math.round(Date.now()-t),m2:Math.round(Date.now()-n)}),null==v||v(l,window.location.href),[2,l];case 3:throw f=r.sent(),new a.LoaderError("INIT_ERROR","Initialize Class ".concat(u," failed: ").concat(f.message));case 4:return[2]}}))}))})).catch((function(e){var r=a.LoaderError.unificationError(e);return i.tracker.log({code:"7988",msg:w,d1:"createError",d2:r.code,d3:r.message,d4:"无",d5:"npm",m1:Math.round(Date.now()-t),m2:0}),null==d||d(r),Promise.reject(e)}))]}))}))}};var i=r(159),a=r(858);Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return a.loadScript}});var u=null;function c(e,t,r){return u=u?u.then((function(n){return n.isDestroyed?s(e,t,r):n})):s(e,t,r)}function s(e,t,r){var n=new e(t),o=Date.now();return n.init().then((function(e){return r&&i.tracker.log({code:"7988",msg:r,d1:"initialized",d2:"无",d3:"无",d4:n.version||"无版本号",d5:"umd",m1:Math.round(Date.now()-o),m2:Math.round(Date.now()-o)}),e})).catch((function(e){var t=new a.LoaderError("INIT_ERROR","Initialize Class failed: ".concat(e.message));throw r&&i.tracker.log({code:"7988",msg:r,d1:"createError",d2:t.code,d3:t.message,d4:"无",d5:"umd",m1:Math.round(Date.now()-o),m2:0}),t}))}},159:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.tracker=t.ScriptTracker=void 0;var a=r(858),u=function(){function e(e){Object.defineProperty(this,"initOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tracker",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.initOptions=e}return Object.defineProperty(e.prototype,"loadTacker",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return(0,a.loadScript)("https://cdn.marmot-cloud.com/tnpm-package/@antintl-intl-tracker/1.3.0/dist/common.min.js","CompatibleTrackerFull").then((function(t){var r=null==t?void 0:t.variable;if(r)return new r(n({compactExtraInfo:!0,appId:"180020050100012557"},e.initOptions))})).catch((function(){}))}}),Object.defineProperty(e.prototype,"getTracker",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.tracker?[2,this.tracker]:[4,this.loadTacker()];case 1:return(e=t.sent())&&(e.set({keyFormat:"origin",userPathAuto:!1}),this.tracker=e),[2,e]}}))}))}}),Object.defineProperty(e.prototype,"safeCall",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.getTracker().then(e)}}),Object.defineProperty(e.prototype,"log",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.safeCall((function(t){return null==t?void 0:t.log.apply(t,e)}))}}),e}();t.ScriptTracker=u;var c=(null==="DEV"?void 0:"DEV".toUpperCase())||"PROD",s=["DEV","SIT","PRE","PROD","LOCAL"].includes(c)?c:"PROD";t.tracker=new u({appId:"180020050100012557",env:s,server:"sg",performance:!1,error:!1})},858:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LoaderError=void 0,t.loadScriptClass=function(e,t){return i(e,t)},t.loadScript=i;var o=function(e){function t(t,r){var n=e.call(this,r)||this;return Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n.name="LoaderError",n.code=t,n}return n(t,e),Object.defineProperty(t,"unificationError",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e instanceof t||e instanceof Error&&"LoaderError"===e.name?e:new t("UNKNOWN_ERROR",e instanceof Error?e.message:"An unknown error occurred.")}}),t}(Error);function i(e,t){var r=function(){if("function"==typeof t)return t();var e=window[t];return(null==e?void 0:e.default)||e};return new Promise((function(t,n){var i=r();if(i)return t({cache:!0,variable:i});var a=document.querySelector('script[src="'.concat(e,'"]')),u=a||document.createElement("script");u.src=e,u.async=!0,u.addEventListener("load",(function(){t({cache:!1,variable:r()})})),u.addEventListener("error",(function(t){n(new o("LOAD_ERROR","Load script ".concat(e," failed: ").concat(t.message)))})),a||document.head.appendChild(u)}))}t.LoaderError=o},820:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},748:function(e,t,r){var n=r(820);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},842:function(e){function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},286:function(e,t,r){var n=r(617);e.exports=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},762:function(e,t,r){var n=r(893);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},454:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},928:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},212:function(e,t,r){var n=r(762);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},578:function(e,t,r){var n=r(710);e.exports=function(e,t){if(null==e)return{};var r,o,i=n(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},e.exports.__esModule=!0,e.exports.default=e.exports},710:function(e){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},650:function(e,t,r){var n=r(65).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new D(n||[]);return u(i,"_invoke",{value:j(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",m="executing",y="completed",w={};function g(){}function b(){}function x(){}var O={};p(O,s,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(A([])));_&&_!==i&&a.call(_,s)&&(O=_);var k=x.prototype=g.prototype=Object.create(O);function P(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function j(e,r,n){var o=v;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=L(u,n);if(c){if(c===w)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?y:"suspendedYield",s.arg===w)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,w;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,w):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=x,u(k,"constructor",{value:x,configurable:!0}),u(x,"constructor",{value:b,configurable:!0}),b.displayName=p(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,p(e,f,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},P(S.prototype),p(S.prototype,l,(function(){return this})),r.AsyncIterator=S,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new S(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(k),p(k,f,"Generator"),p(k,s,(function(){return this})),p(k,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=A,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,w):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),w},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),w}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),w}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},705:function(e,t,r){var n=r(748),o=r(454),i=r(617),a=r(928);e.exports=function(e){return n(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},952:function(e,t,r){var n=r(65).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},893:function(e,t,r){var n=r(65).default,o=r(952);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},65:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},617:function(e,t,r){var n=r(820);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{loadAntom:function(){return ve}});var e=r(650),t=r.n(e),o=r(212),i=r.n(o),a=r(578),u=r.n(a),c=r(842),s=r.n(c),l=r(381),f=r(762),p=r.n(f),d=r(65);function h(e){return"object"===d(e)&&null!==e}function v(e){return"string"==typeof e&&e.length>0&&e.length<=128}function m(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0}var y=Symbol.for("@antintl/opensdk-preload.registry.v1");function w(){var e,t=globalThis;return null!==(e=t[y])&&void 0!==e||(t[y]={controllers:new Map,resources:new Set}),t[y]}function g(e){var t=w();return e.filter((function(e){return!t.resources.has(e)&&(t.resources.add(e),!0)}))}function b(e){var t=w();e.forEach((function(e){return t.resources.delete(e)}))}var x=r(705),O=r.n(x),E=r(286),_=new Set(["shared","element","deferred"]),k=new Set(["document","script","style","font","image","other"]);function P(e){if(!(0===e.length||e.length>2048))try{var t=new URL(e);if("https:"!==t.protocol&&"http:"!==t.protocol)return;if(t.username||t.password)return;return t.hash="",t.href}catch(e){return}}function S(e){if("object"!==d(e)||null===e)return!1;var t=e;return"string"==typeof t.url&&"string"==typeof t.priority&&_.has(t.priority)&&"string"==typeof t.type&&k.has(t.type)&&(void 0===t.owner||"string"==typeof t.owner)}function j(e){var t,r={deferred:0,element:1,shared:2},n=new Map,i=E(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(S(a)){var u=P(a.url);if(u){var c=n.get(u);(!c||r[a.priority]>r[c.priority])&&n.set(u,o(o({},a),{},{url:u}))}}}}catch(e){i.e(e)}finally{i.f()}return x(n.values())}function L(t){var r,n,i,a,u,s,l=!1,p=Promise.resolve(),d=R(),y=new URL(t.runnerUrl).origin,w=new Map,x=function(e){var r;u=e,null===(r=t.onStateChange)||void 0===r||r.call(t,o({},e))},O=function(e){var t,n,o,a;e.origin===y&&e.source===(null===(t=r)||void 0===t?void 0:t.contentWindow)&&(h(a=e.data)&&"OPENSDK_PRELOAD_READY"===a.type&&1===a.protocolVersion&&v(a.nonce)&&e.data.nonce===d?null===(o=i)||void 0===o||o():function(e){return!!h(e)&&"OPENSDK_PRELOAD_DONE"===e.type&&1===e.protocolVersion&&v(e.taskId)&&v(e.nonce)&&("critical"===e.phase||"deferred"===e.phase)&&m(e.total)&&m(e.success)&&m(e.failed)&&m(e.duration)}(e.data)&&e.data.nonce===d&&(null===(n=w.get("".concat(e.data.taskId,":").concat(e.data.phase)))||void 0===n||n(e.data)))},E=function(){var o=c(e().mark((function o(){var u,c,l;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s&&(clearTimeout(s),s=void 0),!n){e.next=3;break}return e.abrupt("return",n);case 3:return n=new Promise((function(e,t){i=e,a=t})),window.addEventListener("message",O),(r=document.createElement("iframe")).setAttribute("aria-hidden","true"),r.tabIndex=-1,r.style.cssText="position:absolute;width:0;height:0;border:0;visibility:hidden;pointer-events:none",(c=new URL(t.runnerUrl)).hash=new URLSearchParams(f({},"opensdkPreloadNonce",d)).toString(),r.src=c.href,r.addEventListener("error",(function(){var e;return null===(e=a)||void 0===e?void 0:e(new Error("Preload runner failed to load"))}),{once:!0}),e.next=15,A(r);case 15:return l=setTimeout((function(){var e;return null===(e=a)||void 0===e?void 0:e(new Error("Preload runner ready timeout"))}),null!==(u=t.iframeTimeoutMs)&&void 0!==u?u:5e3),e.prev=16,e.next=19,n;case 19:return e.prev=19,clearTimeout(l),e.finish(19);case 22:case"end":return e.stop()}}),o,null,[[16,,19,22]])})));return function(){return o.apply(this,arguments)}}(),_=function(){var e;s&&clearTimeout(s),s=void 0,"undefined"!=typeof window&&window.removeEventListener("message",O),w.clear(),null===(e=r)||void 0===e||e.remove(),r=void 0,n=void 0,i=void 0,a=void 0},k=function(){var t=c(e().mark((function t(n,o,i){var a,u,c,s;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u="".concat(n,":").concat(o),c=new Promise((function(e){return w.set(u,e)})),s={type:"OPENSDK_PRELOAD_START",protocolVersion:1,taskId:n,nonce:d,phase:o,resources:i},null===(a=r)||void 0===a||null===(a=a.contentWindow)||void 0===a||a.postMessage(s,y),e.prev=4,e.next=7,c;case 7:return e.abrupt("return",e.sent);case 8:return e.prev=8,w.delete(u),e.finish(8);case 11:case"end":return e.stop()}}),t,null,[[4,,8,11]])})));return function(e,r,n){return t.apply(this,arguments)}}(),P=function(){var r=c(e().mark((function r(n){var i,a,u,c,l,f,p,d,h,v,m,y,w,O,P,S;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=R(),a=Date.now(),x(u={taskId:i,state:"requested",requestedAt:a}),!(c=M())){e.next=9;break}return u=o(o({},u),{},{state:"skipped",completedAt:Date.now(),reason:c}),x(u),e.abrupt("return",u);case 9:if(u=o(o({},u),{},{state:"resolving"}),x(u),l=j(n.resources),f=g(l.map((function(e){return e.url}))),p=new Set(f),0!==(d=l.filter((function(e){return p.has(e.url)}))).length){e.next=19;break}return u=o(o({},u),{},{state:"skipped",completedAt:Date.now(),reason:"already_preloaded"}),x(u),e.abrupt("return",u);case 19:return h=d.filter((function(e){return"deferred"!==e.priority})),v=D(),m="3g"===(null==v?void 0:v.effectiveType)?[]:d.filter((function(e){return"deferred"===e.priority})),e.prev=22,u=o(o({},u),{},{state:"waiting_runner"}),x(u),e.next=27,I(E(),null!==(y=t.taskTimeoutMs)&&void 0!==y?y:3e4,"Preload task timeout");case 27:if(!(h.length>0)){e.next=37;break}return u=o(o({},u),{},{state:"running_critical"}),x(u),e.next=32,I(k(i,"critical",h),null!==(w=t.taskTimeoutMs)&&void 0!==w?w:3e4,"Critical preload timeout");case 32:O=e.sent,u=o(o({},u),{},{state:"critical_completed",criticalCompletedAt:Date.now(),critical:C(O)}),x(u),e.next=39;break;case 37:u=o(o({},u),{},{state:"critical_completed",criticalCompletedAt:Date.now()}),x(u);case 39:if(!(m.length>0)){e.next=48;break}return e.next=42,new Promise((function(e){"requestIdleCallback"in window?window.requestIdleCallback((function(){return e()}),{timeout:1e3}):setTimeout(e,50)}));case 42:return u=o(o({},u),{},{state:"running_deferred"}),x(u),e.next=46,I(k(i,"deferred",m),null!==(P=t.taskTimeoutMs)&&void 0!==P?P:3e4,"Deferred preload timeout");case 46:S=e.sent,u=o(o({},u),{},{deferred:C(S)});case 48:return u=o(o({},u),{},{state:"completed",completedAt:Date.now()}),x(u),s=setTimeout(_,1e3),e.abrupt("return",u);case 54:return e.prev=54,e.t0=e.catch(22),b(f),_(),u=o(o({},u),{},{state:"failed",completedAt:Date.now(),reason:e.t0 instanceof Error?e.t0.message:"Unknown preload error"}),x(u),e.abrupt("return",u);case 61:case"end":return e.stop()}}),r,null,[[22,54]])})));return function(e){return r.apply(this,arguments)}}();return{run:function(e){if(l||"undefined"==typeof window||"undefined"==typeof document){var t={taskId:R(),state:"skipped",requestedAt:Date.now(),completedAt:Date.now(),reason:l?"destroyed":"ssr"};return x(t),Promise.resolve(t)}var r=p.then((function(){return P(e)}));return p=r.then((function(){}),(function(){})),r},getSnapshot:function(){return u?o({},u):void 0},destroy:function(){l=!0,_()}}}function T(e){var t=w(),r="".concat(e.product,"|").concat(new URL(e.runnerUrl).origin),n=t.controllers.get(r);if(n)return n;var o=L(e);return t.controllers.set(r,o),o}function M(){var e=D();return null!=e&&e.saveData?"save_data":"slow-2g"===(null==e?void 0:e.effectiveType)||"2g"===(null==e?void 0:e.effectiveType)?"slow_network":void 0}function D(){return navigator.connection}function A(e){return document.body?(document.body.appendChild(e),Promise.resolve()):new Promise((function(t){document.addEventListener("DOMContentLoaded",(function(){document.body.appendChild(e),t()}),{once:!0})}))}function R(){return"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():"".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2))}function I(e,t,r){return new Promise((function(n,o){var i=setTimeout((function(){return o(new Error(r))}),t);e.then((function(e){clearTimeout(i),n(e)}),(function(e){clearTimeout(i),o(e)}))}))}function C(e){return{total:e.total,success:e.success,failed:e.failed,duration:e.duration}}function U(e){if("object"!==d(e)||null===e)throw new Error("Invalid preload Manifest");var t=e,r=t.offlineResources;if("string"!=typeof t.version||0===t.version.length||"object"!==d(r)||null===r||"force-cache"!==r.cacheControl||!q(r.sync)||!q(r.async)||"object"!==d(r.elements)||null===r.elements||!Object.values(r.elements).every(q))throw new Error("Invalid preload Manifest schema");return t}function N(e,t){var r,n=U(e),o=n.offlineResources,i=[].concat(x(o.sync),x(o.async),x(Object.values(o.elements).flat()));if(i.length>(null!==(r=t.maxResources)&&void 0!==r?r:200))throw new Error("Preload Manifest resource limit exceeded");if(!i.every((function(e){var r;return function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=P(e);if(!n)return!1;var o=new URL(n);return(!r||"https:"===o.protocol)&&t.some((function(e){try{var t=new URL(e.origin).origin,r=e.pathnamePrefix.startsWith("/")?e.pathnamePrefix:"/".concat(e.pathnamePrefix);return o.origin===t&&o.pathname.startsWith(r)}catch(e){return!1}}))}(e,t.resourceRules,null===(r=t.requireHttps)||void 0===r||r)})))throw new Error("Preload Manifest contains disallowed resource URL");var a,u=x(new Set(t.elements)),c=o.sync.map((function(e){return{url:e,priority:"shared",type:W(e)}})),s=E(u);try{var l=function(){var e=a.value,t=o.elements[e];if(!t)throw new Error('Preload Manifest does not contain element "'.concat(e,'"'));c.push.apply(c,x(t.map((function(t){return{url:t,priority:"element",type:W(t),owner:e}}))))};for(s.s();!(a=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}return c.push.apply(c,x(o.async.map((function(e){return{url:e,priority:"deferred",type:W(e)}})))),{product:t.product,version:n.version,resources:j(c),metadata:{elementCount:u.length}}}function q(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}function W(e){var t=new URL(e).pathname.toLowerCase();return t.endsWith(".html")?"document":t.endsWith(".js")?"script":t.endsWith(".css")?"style":/\.(woff2?|ttf|otf)$/.test(t)?"font":/\.(png|jpe?g|gif|webp|svg|ico|avif)$/.test(t)?"image":"other"}var G="/elements2/manifest.json";function V(){return"undefined"!=typeof window?{manifestOrigin:window.location.origin,runnerUrl:"".concat(window.location.origin,"/elements2/preload/index.html"),requireHttps:!1,resourceRules:[{origin:window.location.origin,pathnamePrefix:"/elements2/"},{origin:"http://page.alipay.net",pathnamePrefix:"/page/antom-web-checkout-v2/elements2/"},{origin:"https://marmot-local-pre.oss-accelerate.aliyuncs.com",pathnamePrefix:"/page/antom-web-checkout-v2/elements2/"}]}:{manifestOrigin:"https://checkout.antom.com",runnerUrl:"https://checkout.antom.com/elements2/preload/index.html",requireHttps:!0,resourceRules:[{origin:"https://checkout.antom.com",pathnamePrefix:"/elements2/"},{origin:"https://cdn.marmot-cloud.com",pathnamePrefix:"/page/antom-web-checkout-v2/elements2/"}]}}var F=Symbol.for("@antom/web-sdk.preload-manifest.v2"),z=new Set(["payment","express","vaulting","CVV"]);function H(e){return K.apply(this,arguments)}function K(){return(K=s()(t()().mark((function e(r){var n,o,i;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(n=O()(new Set(r.elements)).filter((function(e){return z.has(e)}))).length){e.next=3;break}throw new Error("No valid Elements2 preload element");case 3:return o=new URL(G,r.manifestOrigin).href,e.next=6,Y(o);case 6:return i=e.sent,e.abrupt("return",B(i,n,r));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e,t,r){return N(e,{product:"antom-elements2",elements:t,resourceRules:r.resourceRules,requireHttps:r.requireHttps})}function Y(e){var t,r=globalThis;null!==(t=r[F])&&void 0!==t||(r[F]=new Map);var n=r[F],o=n.get(e);if(o)return o;var i=function(e){return J.apply(this,arguments)}(e).catch((function(t){throw n.delete(e),t}));return n.set(e,i),i}function J(){return(J=s()(t()().mark((function e(r){var n,o,i;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new AbortController,o=setTimeout((function(){return n.abort()}),5e3),e.prev=2,e.next=5,fetch(r,{mode:"cors",credentials:"omit",cache:"no-cache",redirect:"error",signal:n.signal});case 5:if((i=e.sent).ok&&!i.redirected){e.next=8;break}throw new Error("Manifest request failed: ".concat(i.status));case 8:return e.t0=U,e.next=11,i.json();case 11:return e.t1=e.sent,e.abrupt("return",(0,e.t0)(e.t1));case 13:return e.prev=13,clearTimeout(o),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,,13,16]])})))).apply(this,arguments)}var $=Symbol.for("@antom/web-sdk.elements2-preload.v1");function Z(){var e,t=globalThis;return null!==(e=t[$])&&void 0!==e||(t[$]={elements:new Set}),t[$]}function Q(e){return X.apply(this,arguments)}function X(){return(X=s()(t()().mark((function e(r){var n,o,i,a,u;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof window&&"undefined"!=typeof document&&0!==r.length){e.next=2;break}return e.abrupt("return");case 2:return o=Z(),null!==(n=o.requestedAt)&&void 0!==n||(o.requestedAt=Date.now()),r.forEach((function(e){return o.elements.add(e)})),o.phase="resolving",i=V(),e.prev=7,e.next=10,H({elements:r,manifestOrigin:i.manifestOrigin,resourceRules:i.resourceRules,requireHttps:i.requireHttps});case 10:return a=e.sent,u=T({product:"antom-elements2",runnerUrl:i.runnerUrl,protocolVersion:1,onStateChange:function(e){o.snapshot=e}}),e.next=14,u.run(a);case 14:o.snapshot=e.sent,e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(7),o.phase="failed",e.t0;case 21:case"end":return e.stop()}}),e,null,[[7,17]])})))).apply(this,arguments)}var ee="com.ipay.iexpfront.preConnection",te="ANTOM_PAYMENT_WEB",re="ALIPW3SG",ne={prod:"https://imgs-sea-global.alipay.com/mgw.htm",sandbox:"https://imgs-sea-global.alipay.com/mgw.htm"};function oe(){try{var e,t;return(null===(e=(t=navigator).javaEnabled)||void 0===e?void 0:e.call(t))||!1}catch(e){return!1}}var ie="https://imgs-sea-global.alipay.com",ae=Symbol.for("@antom/web-sdk.sg-preconnection.v1"),ue="SG";function ce(){var e,t=globalThis;return null!==(e=t[ae])&&void 0!==e||(t[ae]={snapshots:new Map,promises:new Map}),t[ae]}function se(e){var r=ce(),n=r.promises.get(e);if(n)return n;var o={predictedRegion:ue,status:"running",preconnectionStartTime:fe()};r.snapshots.set(e,o);var a=Promise.resolve().then((function(){if("undefined"==typeof window||"undefined"==typeof navigator||"undefined"==typeof screen||"undefined"==typeof fetch)throw new Error("SG preConnection is unavailable outside the browser");return function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="sandbox"===n.env?"sandbox":"prod",a=new AbortController,u=null!==(e=n.timeout)&&void 0!==e?e:5e3,c=setTimeout((function(){return a.abort()}),u),l=navigator.language,f=navigator.userAgent,d=/Android|iPhone|iPad|iPod|Mobile|SymbianOS|Windows Phone/i.test(f),h=[i()(i()({},r),{},{envInfo:i()(i()({terminalType:d?"WAP":"WEB"},d?{osType:/iPhone|iPad|iPod/i.test(f)?"IOS":"ANDROID"}:{}),{},{browserInfo:{browserJavaScriptEnabled:!0,browserJavaEnabled:oe(),browserLanguage:l,browserUserAgent:f,browserColorDepth:screen.colorDepth},deviceLanguage:l,screenWidth:screen.width,screenHeight:screen.height,timeZoneOffset:(new Date).getTimezoneOffset(),locale:l}),extParams:{refUrl:window.location.href}})];return fetch(ne[o],{method:"POST",mode:"cors",credentials:!1===n.withCredentials?"omit":"include",redirect:"error",signal:a.signal,headers:p()(p()(p()(p()(p()(p()(p()({"Content-Type":"application/json",appId:te,workspaceId:"default"},"x-cors-".concat(te.toLowerCase(),"-default"),"1"),"version","2.0"),"Operation-Type",ee),"Client-Time",String(Date.now()+60*(new Date).getTimezoneOffset()*1e3)),"tntInstId",re),"x-mago-timeout",String(u)),"sdk-version","0.0.1788166152-dev.0"),body:JSON.stringify(h)}).then(function(){var e=s()(t()().mark((function e(r){return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.ok&&!r.redirected){e.next=2;break}throw new Error("preConnection failed: ".concat(r.status));case 2:return e.abrupt("return",r.json().catch((function(){return{}})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).finally((function(){return clearTimeout(c)}))}({},{env:e,hostSign:ue,timeout:5e3,withCredentials:!0})})).then((function(){return le(e,"completed")}),(function(){return le(e,"failed")}));return r.promises.set(e,a),a}function le(e,t){var r=ce().snapshots.get(e);return r.status=t,r.preconnectionEndTime=fe(),void 0!==r.firstRpcStartTime&&(r.preconnectionLeadTimeMs=r.firstRpcStartTime-r.preconnectionEndTime,r.preconnectionReadyBeforeFirstRpc=r.preconnectionLeadTimeMs>=0),Object.assign(r,function(){if("undefined"==typeof performance||!performance.getEntriesByType)return{};var e=performance.getEntriesByType("resource"),t=O()(e).reverse().find((function(e){return e.name.startsWith(ie)}));return t?{dnsDurationMs:Math.max(0,t.domainLookupEnd-t.domainLookupStart),tcpDurationMs:Math.max(0,t.connectEnd-t.connectStart),tlsDurationMs:t.secureConnectionStart>0?Math.max(0,t.connectEnd-t.secureConnectionStart):0}:{}}()),i()({},r)}function fe(){return Date.now()}var pe=["env","environment","preload"],de={DEV:"https://sdk-dev.marmot-cloud.com/package/ams-checkout/".concat("dev-1788166152","/ams-checkout.js"),LOCAL:"http://localhost:3000/ams-checkout.min.js",PROD:"https://js.antom.com/v2/ams-checkout.js"},he=(0,l.createLoader)({sdkURL:de.DEV,globalName:"AntomSDK",namespace:"AntomSDK"}),ve=function(){var e=s()(t()().mark((function e(r){var n,o,a,c,s,l,f,p;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(o=r||{}).env,c=o.environment,s=o.preload,l=u()(o,pe),f=a||c||"prod",p=he(i()(i()({},l),{},{env:f})),se(f),null!=s&&null!==(n=s.elements)&&void 0!==n&&n.length&&Q(s.elements).catch((function(){})),e.abrupt("return",p);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}(),n}()}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return function(){var e={381:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.loadScript=void 0,t.createSingletonInstance=c,t.createInstance=s,t.createLoader=function(e){var t=this,r=e.sdkURL,u=e.globalName,l=e.timeout,f=void 0===l?2e4:l,d=e.onLoadComplete,p=e.onError,h=e.onLoadStart,v=e.onInitialized,m=e.single,y=void 0===m||m,w=e.namespace;return function(e){return n(t,void 0,void 0,(function(){var t,l,m=this;return o(this,(function(g){var b,x;return null==h||h(),t=Date.now(),i.tracker.log({code:"7988",msg:w,d1:"loadStart",d2:"无",d3:"无",d4:"无",d5:"npm",m1:0,m2:0}),b=function(){return(0,a.loadScriptClass)(r,u)},x=f,l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Promise.race([new Promise((function(e,t){setTimeout((function(){t(new a.LoaderError("LOAD_TIMEOUT","Load timeout: ".concat(x)))}),x)})),b.apply(void 0,e)])},[2,l().then((function(r){return n(m,[r],void 0,(function(r){var n,l,f,p=r.variable,h=r.cache;return o(this,(function(r){switch(r.label){case 0:if(n=Date.now(),h||i.tracker.log({code:"7988",msg:w,d1:"loadComplete",d2:"无",d3:"无",d4:(null==p?void 0:p.version)||"无",d5:"npm",m1:Math.round(Date.now()-t),m2:0}),null==d||d(),!p)throw new a.LoaderError("NO_REMOTE_CLASS","No variables ".concat(u," were found. Cannot be initialized the Class ").concat(u));r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(y?c:s)(p,e,void 0)];case 2:return l=r.sent(),i.tracker.log({code:"7988",msg:w,d1:"initialized",d2:"无",d3:"无",d4:l.version||"无版本号",d5:"npm",m1:Math.round(Date.now()-t),m2:Math.round(Date.now()-n)}),null==v||v(l,window.location.href),[2,l];case 3:throw f=r.sent(),new a.LoaderError("INIT_ERROR","Initialize Class ".concat(u," failed: ").concat(f.message));case 4:return[2]}}))}))})).catch((function(e){var r=a.LoaderError.unificationError(e);return i.tracker.log({code:"7988",msg:w,d1:"createError",d2:r.code,d3:r.message,d4:"无",d5:"npm",m1:Math.round(Date.now()-t),m2:0}),null==p||p(r),Promise.reject(e)}))]}))}))}};var i=r(159),a=r(858);Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return a.loadScript}});var u=null;function c(e,t,r){return u=u?u.then((function(n){return n.isDestroyed?s(e,t,r):n})):s(e,t,r)}function s(e,t,r){var n=new e(t),o=Date.now();return n.init().then((function(e){return r&&i.tracker.log({code:"7988",msg:r,d1:"initialized",d2:"无",d3:"无",d4:n.version||"无版本号",d5:"umd",m1:Math.round(Date.now()-o),m2:Math.round(Date.now()-o)}),e})).catch((function(e){var t=new a.LoaderError("INIT_ERROR","Initialize Class failed: ".concat(e.message));throw r&&i.tracker.log({code:"7988",msg:r,d1:"createError",d2:t.code,d3:t.message,d4:"无",d5:"umd",m1:Math.round(Date.now()-o),m2:0}),t}))}},159:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.tracker=t.ScriptTracker=void 0;var a=r(858),u=function(){function e(e){Object.defineProperty(this,"initOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tracker",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.initOptions=e}return Object.defineProperty(e.prototype,"loadTacker",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return(0,a.loadScript)("https://cdn.marmot-cloud.com/tnpm-package/@antintl-intl-tracker/1.3.0/dist/common.min.js","CompatibleTrackerFull").then((function(t){var r=null==t?void 0:t.variable;if(r)return new r(n({compactExtraInfo:!0,appId:"180020050100012557"},e.initOptions))})).catch((function(){}))}}),Object.defineProperty(e.prototype,"getTracker",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.tracker?[2,this.tracker]:[4,this.loadTacker()];case 1:return(e=t.sent())&&(e.set({keyFormat:"origin",userPathAuto:!1}),this.tracker=e),[2,e]}}))}))}}),Object.defineProperty(e.prototype,"safeCall",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.getTracker().then(e)}}),Object.defineProperty(e.prototype,"log",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.safeCall((function(t){return null==t?void 0:t.log.apply(t,e)}))}}),e}();t.ScriptTracker=u;var c=(null==="DEV"?void 0:"DEV".toUpperCase())||"PROD",s=["DEV","SIT","PRE","PROD","LOCAL"].includes(c)?c:"PROD";t.tracker=new u({appId:"180020050100012557",env:s,server:"sg",performance:!1,error:!1})},858:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LoaderError=void 0,t.loadScriptClass=function(e,t){return i(e,t)},t.loadScript=i;var o=function(e){function t(t,r){var n=e.call(this,r)||this;return Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n.name="LoaderError",n.code=t,n}return n(t,e),Object.defineProperty(t,"unificationError",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e instanceof t||e instanceof Error&&"LoaderError"===e.name?e:new t("UNKNOWN_ERROR",e instanceof Error?e.message:"An unknown error occurred.")}}),t}(Error);function i(e,t){var r=function(){if("function"==typeof t)return t();var e=window[t];return(null==e?void 0:e.default)||e};return new Promise((function(t,n){var i=r();if(i)return t({cache:!0,variable:i});var a=document.querySelector('script[src="'.concat(e,'"]')),u=a||document.createElement("script");u.src=e,u.async=!0,u.addEventListener("load",(function(){t({cache:!1,variable:r()})})),u.addEventListener("error",(function(t){n(new o("LOAD_ERROR","Load script ".concat(e," failed: ").concat(t.message)))})),a||document.head.appendChild(u)}))}t.LoaderError=o},820:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},748:function(e,t,r){var n=r(820);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},842:function(e){function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},286:function(e,t,r){var n=r(617);e.exports=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},762:function(e,t,r){var n=r(893);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},454:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},928:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},212:function(e,t,r){var n=r(762);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},578:function(e,t,r){var n=r(710);e.exports=function(e,t){if(null==e)return{};var r,o,i=n(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},e.exports.__esModule=!0,e.exports.default=e.exports},710:function(e){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},650:function(e,t,r){var n=r(65).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new M(n||[]);return u(i,"_invoke",{value:j(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var v="suspendedStart",m="executing",y="completed",w={};function g(){}function b(){}function x(){}var O={};d(O,s,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(A([])));_&&_!==i&&a.call(_,s)&&(O=_);var k=x.prototype=g.prototype=Object.create(O);function S(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function j(e,r,n){var o=v;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=L(u,n);if(c){if(c===w)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?y:"suspendedYield",s.arg===w)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,w;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,w):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=x,u(k,"constructor",{value:x,configurable:!0}),u(x,"constructor",{value:b,configurable:!0}),b.displayName=d(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,f,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},S(P.prototype),d(P.prototype,l,(function(){return this})),r.AsyncIterator=P,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new P(p(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),d(k,f,"Generator"),d(k,s,(function(){return this})),d(k,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=A,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,w):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),w},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),w}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;D(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),w}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},705:function(e,t,r){var n=r(748),o=r(454),i=r(617),a=r(928);e.exports=function(e){return n(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},952:function(e,t,r){var n=r(65).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},893:function(e,t,r){var n=r(65).default,o=r(952);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},65:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},617:function(e,t,r){var n=r(820);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{loadAntom:function(){return be}});var e=r(650),t=r.n(e),o=r(212),i=r.n(o),a=r(578),u=r.n(a),c=r(842),s=r.n(c),l=r(381),f=r(159),d=function(e){try{var t,r=e;return(null==r?void 0:r.code)||(null==r||null===(t=r.error)||void 0===t?void 0:t.code)||"UNKNOWN"}catch(e){return"UNKNOWN"}},p=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";try{f.tracker.log({code:"7882api",msg:"loadAntom",d1:r,d2:n,d3:"",d4:"",d5:"loadAntom",d6:e.env,d7:String(void 0!==e.locale),d8:void 0===e.debug?"":String(e.debug),m1:Date.now()-t})}catch(e){}};function h(e,t){return v.apply(this,arguments)}function v(){return(v=s()(t()().mark((function e(r,n){var o,i;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Date.now(),e.prev=1,e.next=4,n();case 4:return i=e.sent,p(r,o,"success"),e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(1),p(r,o,"error",d(e.t0)),e.t0;case 13:case"end":return e.stop()}}),e,null,[[1,9]])})))).apply(this,arguments)}var m=r(762),y=r.n(m),w=r(65);function g(e){return"object"===w(e)&&null!==e}function b(e){return"string"==typeof e&&e.length>0&&e.length<=128}function x(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0}var O=Symbol.for("@antintl/opensdk-preload.registry.v1");function E(){var e,t=globalThis;return null!==(e=t[O])&&void 0!==e||(t[O]={controllers:new Map,resources:new Set}),t[O]}function _(e){var t=E();return e.filter((function(e){return!t.resources.has(e)&&(t.resources.add(e),!0)}))}function k(e){var t=E();e.forEach((function(e){return t.resources.delete(e)}))}var S=r(705),P=r.n(S),j=r(286),L=new Set(["shared","element","deferred"]),T=new Set(["document","script","style","font","image","other"]);function D(e){if(!(0===e.length||e.length>2048))try{var t=new URL(e);if("https:"!==t.protocol&&"http:"!==t.protocol)return;if(t.username||t.password)return;return t.hash="",t.href}catch(e){return}}function M(e){if("object"!==w(e)||null===e)return!1;var t=e;return"string"==typeof t.url&&"string"==typeof t.priority&&L.has(t.priority)&&"string"==typeof t.type&&T.has(t.type)&&(void 0===t.owner||"string"==typeof t.owner)}function A(e){var t,r={deferred:0,element:1,shared:2},n=new Map,i=j(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(M(a)){var u=D(a.url);if(u){var c=n.get(u);(!c||r[a.priority]>r[c.priority])&&n.set(u,o(o({},a),{},{url:u}))}}}}catch(e){i.e(e)}finally{i.f()}return S(n.values())}function R(t){var r,n,i,a,u,s,l=!1,f=Promise.resolve(),d=W(),p=new URL(t.runnerUrl).origin,h=new Map,v=function(e){var r;u=e,null===(r=t.onStateChange)||void 0===r||r.call(t,o({},e))},y=function(e){var t,n,o,a;e.origin===p&&e.source===(null===(t=r)||void 0===t?void 0:t.contentWindow)&&(g(a=e.data)&&"OPENSDK_PRELOAD_READY"===a.type&&1===a.protocolVersion&&b(a.nonce)&&e.data.nonce===d?null===(o=i)||void 0===o||o():function(e){return!!g(e)&&"OPENSDK_PRELOAD_DONE"===e.type&&1===e.protocolVersion&&b(e.taskId)&&b(e.nonce)&&("critical"===e.phase||"deferred"===e.phase)&&x(e.total)&&x(e.success)&&x(e.failed)&&x(e.duration)}(e.data)&&e.data.nonce===d&&(null===(n=h.get("".concat(e.data.taskId,":").concat(e.data.phase)))||void 0===n||n(e.data)))},w=function(){var o=c(e().mark((function o(){var u,c,l;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s&&(clearTimeout(s),s=void 0),!n){e.next=3;break}return e.abrupt("return",n);case 3:return n=new Promise((function(e,t){i=e,a=t})),window.addEventListener("message",y),(r=document.createElement("iframe")).setAttribute("aria-hidden","true"),r.tabIndex=-1,r.style.cssText="position:absolute;width:0;height:0;border:0;visibility:hidden;pointer-events:none",(c=new URL(t.runnerUrl)).hash=new URLSearchParams(m({},"opensdkPreloadNonce",d)).toString(),r.src=c.href,r.addEventListener("error",(function(){var e;return null===(e=a)||void 0===e?void 0:e(new Error("Preload runner failed to load"))}),{once:!0}),e.next=15,U(r);case 15:return l=setTimeout((function(){var e;return null===(e=a)||void 0===e?void 0:e(new Error("Preload runner ready timeout"))}),null!==(u=t.iframeTimeoutMs)&&void 0!==u?u:5e3),e.prev=16,e.next=19,n;case 19:return e.prev=19,clearTimeout(l),e.finish(19);case 22:case"end":return e.stop()}}),o,null,[[16,,19,22]])})));return function(){return o.apply(this,arguments)}}(),O=function(){var e;s&&clearTimeout(s),s=void 0,"undefined"!=typeof window&&window.removeEventListener("message",y),h.clear(),null===(e=r)||void 0===e||e.remove(),r=void 0,n=void 0,i=void 0,a=void 0},E=function(){var t=c(e().mark((function t(n,o,i){var a,u,c,s;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u="".concat(n,":").concat(o),c=new Promise((function(e){return h.set(u,e)})),s={type:"OPENSDK_PRELOAD_START",protocolVersion:1,taskId:n,nonce:d,phase:o,resources:i},null===(a=r)||void 0===a||null===(a=a.contentWindow)||void 0===a||a.postMessage(s,p),e.prev=4,e.next=7,c;case 7:return e.abrupt("return",e.sent);case 8:return e.prev=8,h.delete(u),e.finish(8);case 11:case"end":return e.stop()}}),t,null,[[4,,8,11]])})));return function(e,r,n){return t.apply(this,arguments)}}(),S=function(){var r=c(e().mark((function r(n){var i,a,u,c,l,f,d,p,h,m,y,g,b,x,S,P;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=W(),a=Date.now(),v(u={taskId:i,state:"requested",requestedAt:a}),!(c=C())){e.next=9;break}return u=o(o({},u),{},{state:"skipped",completedAt:Date.now(),reason:c}),v(u),e.abrupt("return",u);case 9:if(u=o(o({},u),{},{state:"resolving"}),v(u),l=A(n.resources),f=_(l.map((function(e){return e.url}))),d=new Set(f),0!==(p=l.filter((function(e){return d.has(e.url)}))).length){e.next=19;break}return u=o(o({},u),{},{state:"skipped",completedAt:Date.now(),reason:"already_preloaded"}),v(u),e.abrupt("return",u);case 19:return h=p.filter((function(e){return"deferred"!==e.priority})),m=N(),y="3g"===(null==m?void 0:m.effectiveType)?[]:p.filter((function(e){return"deferred"===e.priority})),e.prev=22,u=o(o({},u),{},{state:"waiting_runner"}),v(u),e.next=27,q(w(),null!==(g=t.taskTimeoutMs)&&void 0!==g?g:3e4,"Preload task timeout");case 27:if(!(h.length>0)){e.next=37;break}return u=o(o({},u),{},{state:"running_critical"}),v(u),e.next=32,q(E(i,"critical",h),null!==(b=t.taskTimeoutMs)&&void 0!==b?b:3e4,"Critical preload timeout");case 32:x=e.sent,u=o(o({},u),{},{state:"critical_completed",criticalCompletedAt:Date.now(),critical:G(x)}),v(u),e.next=39;break;case 37:u=o(o({},u),{},{state:"critical_completed",criticalCompletedAt:Date.now()}),v(u);case 39:if(!(y.length>0)){e.next=48;break}return e.next=42,new Promise((function(e){"requestIdleCallback"in window?window.requestIdleCallback((function(){return e()}),{timeout:1e3}):setTimeout(e,50)}));case 42:return u=o(o({},u),{},{state:"running_deferred"}),v(u),e.next=46,q(E(i,"deferred",y),null!==(S=t.taskTimeoutMs)&&void 0!==S?S:3e4,"Deferred preload timeout");case 46:P=e.sent,u=o(o({},u),{},{deferred:G(P)});case 48:return u=o(o({},u),{},{state:"completed",completedAt:Date.now()}),v(u),s=setTimeout(O,1e3),e.abrupt("return",u);case 54:return e.prev=54,e.t0=e.catch(22),k(f),O(),u=o(o({},u),{},{state:"failed",completedAt:Date.now(),reason:e.t0 instanceof Error?e.t0.message:"Unknown preload error"}),v(u),e.abrupt("return",u);case 61:case"end":return e.stop()}}),r,null,[[22,54]])})));return function(e){return r.apply(this,arguments)}}();return{run:function(e){if(l||"undefined"==typeof window||"undefined"==typeof document){var t={taskId:W(),state:"skipped",requestedAt:Date.now(),completedAt:Date.now(),reason:l?"destroyed":"ssr"};return v(t),Promise.resolve(t)}var r=f.then((function(){return S(e)}));return f=r.then((function(){}),(function(){})),r},getSnapshot:function(){return u?o({},u):void 0},destroy:function(){l=!0,O()}}}function I(e){var t=E(),r="".concat(e.product,"|").concat(new URL(e.runnerUrl).origin),n=t.controllers.get(r);if(n)return n;var o=R(e);return t.controllers.set(r,o),o}function C(){var e=N();return null!=e&&e.saveData?"save_data":"slow-2g"===(null==e?void 0:e.effectiveType)||"2g"===(null==e?void 0:e.effectiveType)?"slow_network":void 0}function N(){return navigator.connection}function U(e){return document.body?(document.body.appendChild(e),Promise.resolve()):new Promise((function(t){document.addEventListener("DOMContentLoaded",(function(){document.body.appendChild(e),t()}),{once:!0})}))}function W(){return"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():"".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2))}function q(e,t,r){return new Promise((function(n,o){var i=setTimeout((function(){return o(new Error(r))}),t);e.then((function(e){clearTimeout(i),n(e)}),(function(e){clearTimeout(i),o(e)}))}))}function G(e){return{total:e.total,success:e.success,failed:e.failed,duration:e.duration}}function V(e){if("object"!==w(e)||null===e)throw new Error("Invalid preload Manifest");var t=e,r=t.offlineResources;if("string"!=typeof t.version||0===t.version.length||"object"!==w(r)||null===r||"force-cache"!==r.cacheControl||!z(r.sync)||!z(r.async)||"object"!==w(r.elements)||null===r.elements||!Object.values(r.elements).every(z))throw new Error("Invalid preload Manifest schema");return t}function F(e,t){var r,n=V(e),o=n.offlineResources,i=[].concat(S(o.sync),S(o.async),S(Object.values(o.elements).flat()));if(i.length>(null!==(r=t.maxResources)&&void 0!==r?r:200))throw new Error("Preload Manifest resource limit exceeded");if(!i.every((function(e){var r;return function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=D(e);if(!n)return!1;var o=new URL(n);return(!r||"https:"===o.protocol)&&t.some((function(e){try{var t=new URL(e.origin).origin,r=e.pathnamePrefix.startsWith("/")?e.pathnamePrefix:"/".concat(e.pathnamePrefix);return o.origin===t&&o.pathname.startsWith(r)}catch(e){return!1}}))}(e,t.resourceRules,null===(r=t.requireHttps)||void 0===r||r)})))throw new Error("Preload Manifest contains disallowed resource URL");var a,u=S(new Set(t.elements)),c=o.sync.map((function(e){return{url:e,priority:"shared",type:H(e)}})),s=j(u);try{var l=function(){var e=a.value,t=o.elements[e];if(!t)throw new Error('Preload Manifest does not contain element "'.concat(e,'"'));c.push.apply(c,S(t.map((function(t){return{url:t,priority:"element",type:H(t),owner:e}}))))};for(s.s();!(a=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}return c.push.apply(c,S(o.async.map((function(e){return{url:e,priority:"deferred",type:H(e)}})))),{product:t.product,version:n.version,resources:A(c),metadata:{elementCount:u.length}}}function z(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}function H(e){var t=new URL(e).pathname.toLowerCase();return t.endsWith(".html")?"document":t.endsWith(".js")?"script":t.endsWith(".css")?"style":/\.(woff2?|ttf|otf)$/.test(t)?"font":/\.(png|jpe?g|gif|webp|svg|ico|avif)$/.test(t)?"image":"other"}var K="/elements2/manifest.json";function B(){return"undefined"!=typeof window?{manifestOrigin:window.location.origin,runnerUrl:"".concat(window.location.origin,"/elements2/preload/index.html"),requireHttps:!1,resourceRules:[{origin:window.location.origin,pathnamePrefix:"/elements2/"},{origin:"http://page.alipay.net",pathnamePrefix:"/page/antom-web-checkout-v2/elements2/"},{origin:"https://marmot-local-pre.oss-accelerate.aliyuncs.com",pathnamePrefix:"/page/antom-web-checkout-v2/elements2/"}]}:{manifestOrigin:"https://checkout.antom.com",runnerUrl:"https://checkout.antom.com/elements2/preload/index.html",requireHttps:!0,resourceRules:[{origin:"https://checkout.antom.com",pathnamePrefix:"/elements2/"},{origin:"https://cdn.marmot-cloud.com",pathnamePrefix:"/page/antom-web-checkout-v2/elements2/"}]}}var Y=Symbol.for("@antom/web-sdk.preload-manifest.v2"),J=new Set(["payment","express","vaulting","CVV"]);function $(e){return Z.apply(this,arguments)}function Z(){return(Z=s()(t()().mark((function e(r){var n,o,i;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(n=P()(new Set(r.elements)).filter((function(e){return J.has(e)}))).length){e.next=3;break}throw new Error("No valid Elements2 preload element");case 3:return o=new URL(K,r.manifestOrigin).href,e.next=6,X(o);case 6:return i=e.sent,e.abrupt("return",Q(i,n,r));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Q(e,t,r){return F(e,{product:"antom-elements2",elements:t,resourceRules:r.resourceRules,requireHttps:r.requireHttps})}function X(e){var t,r=globalThis;null!==(t=r[Y])&&void 0!==t||(r[Y]=new Map);var n=r[Y],o=n.get(e);if(o)return o;var i=function(e){return ee.apply(this,arguments)}(e).catch((function(t){throw n.delete(e),t}));return n.set(e,i),i}function ee(){return(ee=s()(t()().mark((function e(r){var n,o,i;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new AbortController,o=setTimeout((function(){return n.abort()}),5e3),e.prev=2,e.next=5,fetch(r,{mode:"cors",credentials:"omit",cache:"no-cache",redirect:"error",signal:n.signal});case 5:if((i=e.sent).ok&&!i.redirected){e.next=8;break}throw new Error("Manifest request failed: ".concat(i.status));case 8:return e.t0=V,e.next=11,i.json();case 11:return e.t1=e.sent,e.abrupt("return",(0,e.t0)(e.t1));case 13:return e.prev=13,clearTimeout(o),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,,13,16]])})))).apply(this,arguments)}var te=Symbol.for("@antom/web-sdk.elements2-preload.v1");function re(){var e,t=globalThis;return null!==(e=t[te])&&void 0!==e||(t[te]={elements:new Set}),t[te]}function ne(){return(ne=s()(t()().mark((function e(r){var n,o,i,a,u;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof window&&"undefined"!=typeof document&&0!==r.length){e.next=2;break}return e.abrupt("return");case 2:return o=re(),null!==(n=o.requestedAt)&&void 0!==n||(o.requestedAt=Date.now()),r.forEach((function(e){return o.elements.add(e)})),o.phase="resolving",i=B(),e.prev=7,e.next=10,$({elements:r,manifestOrigin:i.manifestOrigin,resourceRules:i.resourceRules,requireHttps:i.requireHttps});case 10:return a=e.sent,u=I({product:"antom-elements2",runnerUrl:i.runnerUrl,protocolVersion:1,onStateChange:function(e){o.snapshot=e}}),e.next=14,u.run(a);case 14:o.snapshot=e.sent,e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(7),o.phase="failed",e.t0;case 21:case"end":return e.stop()}}),e,null,[[7,17]])})))).apply(this,arguments)}var oe="com.ipay.iexpfront.preConnection",ie="ANTOM_PAYMENT_WEB",ae="ALIPW3SG",ue={prod:"https://imgs-sea-global.alipay.com/mgw.htm",sandbox:"https://imgs-sea-global.alipay.com/mgw.htm"};function ce(){try{var e,t;return(null===(e=(t=navigator).javaEnabled)||void 0===e?void 0:e.call(t))||!1}catch(e){return!1}}var se="https://imgs-sea-global.alipay.com",le=Symbol.for("@antom/web-sdk.sg-preconnection.v1"),fe="SG";function de(){var e,t=globalThis;return null!==(e=t[le])&&void 0!==e||(t[le]={snapshots:new Map,promises:new Map}),t[le]}function pe(e){var r=de(),n=r.promises.get(e);if(n)return n;var o={predictedRegion:fe,status:"running",preconnectionStartTime:ve()};r.snapshots.set(e,o);var a=Promise.resolve().then((function(){if("undefined"==typeof window||"undefined"==typeof navigator||"undefined"==typeof screen||"undefined"==typeof fetch)throw new Error("SG preConnection is unavailable outside the browser");return function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="sandbox"===n.env?"sandbox":"prod",a=new AbortController,u=null!==(e=n.timeout)&&void 0!==e?e:5e3,c=setTimeout((function(){return a.abort()}),u),l=navigator.language,f=navigator.userAgent,d=/Android|iPhone|iPad|iPod|Mobile|SymbianOS|Windows Phone/i.test(f),p=[i()(i()({},r),{},{envInfo:i()(i()({terminalType:d?"WAP":"WEB"},d?{osType:/iPhone|iPad|iPod/i.test(f)?"IOS":"ANDROID"}:{}),{},{browserInfo:{browserJavaScriptEnabled:!0,browserJavaEnabled:ce(),browserLanguage:l,browserUserAgent:f,browserColorDepth:screen.colorDepth},deviceLanguage:l,screenWidth:screen.width,screenHeight:screen.height,timeZoneOffset:(new Date).getTimezoneOffset(),locale:l}),extParams:{refUrl:window.location.href}})];return fetch(ue[o],{method:"POST",mode:"cors",credentials:!1===n.withCredentials?"omit":"include",redirect:"error",signal:a.signal,headers:y()(y()(y()(y()(y()(y()(y()({"Content-Type":"application/json",appId:ie,workspaceId:"default"},"x-cors-".concat(ie.toLowerCase(),"-default"),"1"),"version","2.0"),"Operation-Type",oe),"Client-Time",String(Date.now()+60*(new Date).getTimezoneOffset()*1e3)),"tntInstId",ae),"x-mago-timeout",String(u)),"sdk-version","0.0.1788166152-dev.2"),body:JSON.stringify(p)}).then(function(){var e=s()(t()().mark((function e(r){return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.ok&&!r.redirected){e.next=2;break}throw new Error("preConnection failed: ".concat(r.status));case 2:return e.abrupt("return",r.json().catch((function(){return{}})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).finally((function(){return clearTimeout(c)}))}({},{env:e,hostSign:fe,timeout:5e3,withCredentials:!0})})).then((function(){return he(e,"completed")}),(function(){return he(e,"failed")}));return r.promises.set(e,a),a}function he(e,t){var r=de().snapshots.get(e);return r.status=t,r.preconnectionEndTime=ve(),void 0!==r.firstRpcStartTime&&(r.preconnectionLeadTimeMs=r.firstRpcStartTime-r.preconnectionEndTime,r.preconnectionReadyBeforeFirstRpc=r.preconnectionLeadTimeMs>=0),Object.assign(r,function(){if("undefined"==typeof performance||!performance.getEntriesByType)return{};var e=performance.getEntriesByType("resource"),t=P()(e).reverse().find((function(e){return e.name.startsWith(se)}));return t?{dnsDurationMs:Math.max(0,t.domainLookupEnd-t.domainLookupStart),tcpDurationMs:Math.max(0,t.connectEnd-t.connectStart),tlsDurationMs:t.secureConnectionStart>0?Math.max(0,t.connectEnd-t.secureConnectionStart):0}:{}}()),i()({},r)}function ve(){return Date.now()}function me(e,t){null!=t&&t.length&&(pe(e),function(e){return ne.apply(this,arguments)}(t).catch((function(){})))}var ye=["env","environment","preload"],we={DEV:"https://sdk-dev.marmot-cloud.com/package/ams-checkout/".concat("dev-1788166152","/ams-checkout.js"),LOCAL:"http://localhost:3000/ams-checkout.min.js",PROD:"https://js.antom.com/v2/ams-checkout.js"},ge=(0,l.createLoader)({sdkURL:we.DEV,globalName:"AntomSDK",namespace:"AntomSDK"}),be=function(){var e=s()(t()().mark((function e(r){var n,o,a,c,s,l,f;return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=(n=r||{}).env,a=n.environment,c=n.preload,s=u()(n,ye),l=o||a||"prod",f=i()(i()({},s),{},{env:l}),e.abrupt("return",h(f,(function(){var e=ge(f);return me(l,null==c?void 0:c.elements),e})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}(),n}()}));
@@ -0,0 +1,7 @@
1
+ interface LoadAntomTrackingConfig {
2
+ env: string;
3
+ locale?: string;
4
+ debug?: boolean;
5
+ }
6
+ export declare function runTrackedLoadAntom<T>(config: LoadAntomTrackingConfig, action: () => Promise<T>): Promise<T>;
7
+ export {};
@@ -0,0 +1,64 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ import { tracker as loaderTracker } from '@antglobal/create-sdk-loader/lib/tracker';
6
+ var getErrorCode = function getErrorCode(error) {
7
+ try {
8
+ var _value$error;
9
+ var value = error;
10
+ return (value === null || value === void 0 ? void 0 : value.code) || (value === null || value === void 0 || (_value$error = value.error) === null || _value$error === void 0 ? void 0 : _value$error.code) || 'UNKNOWN';
11
+ } catch (_unused) {
12
+ return 'UNKNOWN';
13
+ }
14
+ };
15
+ var reportLoadAntom = function reportLoadAntom(config, startedAt, outcome) {
16
+ var errorCode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
17
+ try {
18
+ loaderTracker.log({
19
+ code: '7882api',
20
+ msg: 'loadAntom',
21
+ d1: outcome,
22
+ d2: errorCode,
23
+ d3: '',
24
+ d4: '',
25
+ d5: 'loadAntom',
26
+ d6: config.env,
27
+ d7: String(config.locale !== undefined),
28
+ d8: config.debug === undefined ? '' : String(config.debug),
29
+ m1: Date.now() - startedAt
30
+ });
31
+ } catch (_unused2) {
32
+ // Loader diagnostics must never affect SDK loading.
33
+ }
34
+ };
35
+ export function runTrackedLoadAntom(_x, _x2) {
36
+ return _runTrackedLoadAntom.apply(this, arguments);
37
+ }
38
+ function _runTrackedLoadAntom() {
39
+ _runTrackedLoadAntom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, action) {
40
+ var startedAt, result;
41
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
42
+ while (1) switch (_context.prev = _context.next) {
43
+ case 0:
44
+ startedAt = Date.now();
45
+ _context.prev = 1;
46
+ _context.next = 4;
47
+ return action();
48
+ case 4:
49
+ result = _context.sent;
50
+ reportLoadAntom(config, startedAt, 'success');
51
+ return _context.abrupt("return", result);
52
+ case 9:
53
+ _context.prev = 9;
54
+ _context.t0 = _context["catch"](1);
55
+ reportLoadAntom(config, startedAt, 'error', getErrorCode(_context.t0));
56
+ throw _context.t0;
57
+ case 13:
58
+ case "end":
59
+ return _context.stop();
60
+ }
61
+ }, _callee, null, [[1, 9]]);
62
+ }));
63
+ return _runTrackedLoadAntom.apply(this, arguments);
64
+ }
@@ -0,0 +1,7 @@
1
+ interface LoadAntomTrackingConfig {
2
+ env: string;
3
+ locale?: string;
4
+ debug?: boolean;
5
+ }
6
+ export declare function runTrackedLoadAntom<T>(config: LoadAntomTrackingConfig, action: () => Promise<T>): Promise<T>;
7
+ export {};
@@ -2,7 +2,7 @@ import type { AntomPreloadElement } from './config';
2
2
  export declare function preloadAntomElements(elements: readonly AntomPreloadElement[]): Promise<void>;
3
3
  export declare function getAntomPreloadTelemetry(element: AntomPreloadElement): {
4
4
  requested: boolean;
5
- phaseAtElementCreate: "failed" | "resolving" | "critical_completed" | "skipped" | "not_requested" | "running";
5
+ phaseAtElementCreate: "resolving" | "failed" | "critical_completed" | "skipped" | "not_requested" | "running";
6
6
  leadTimeMs: number;
7
7
  criticalDurationMs: number;
8
8
  taskId: string;
@@ -0,0 +1,2 @@
1
+ import type { AntomPreloadElement } from './config';
2
+ export declare function startAntomPreload(env: 'sandbox' | 'prod', elements?: readonly AntomPreloadElement[]): void;
@@ -69,6 +69,7 @@ export declare class ApplePayHostService {
69
69
  * oncancel 原因标记:区分商户通过 onBeforeConfirm 中止 vs 其他。
70
70
  * - null: 默认(非商户中止,即用户取消或其他原因)
71
71
  * - 'MERCHANT_ABORT': 商户 onBeforeConfirm 返回 false 或异常导致中止
72
+ * - 'MERCHANT_TIMEOUT': 商户 onBeforeConfirm 超时导致中止
72
73
  */
73
74
  private cancelReason;
74
75
  private modalCloseHandler;
@@ -1,23 +1,27 @@
1
- import type { AntomBridgeEventMap, AntomTheme, AntomVariables, PreloadTelemetryContext } from '../types';
2
1
  import { type RequestOptions } from '@antintl/antom-toolset';
3
2
  import { type FontSource } from '@antintl/opensdk-bridge';
4
- import { type BaseAppearance, type BaseElementAppConfig, BaseMainElement, type PickAppearance, type BaseElementConfig } from '@antintl/opensdk-core';
3
+ import { type BaseElementAppConfig, type BaseElementConfig, BaseMainElement } from '@antintl/opensdk-core';
5
4
  import type { CashierSdkActionQueryResult, PaymentSessionConfig } from '../oneapi/iexpfront/definitions';
5
+ import { type AntomBridgeEventMap, type AntomTheme, type AntomVariables, type AppearanceVariables, type PreloadTelemetryContext } from '../types';
6
+ import { type AppearanceRuleSelector, type PickAntomAppearance } from './appearanceRules';
6
7
  export type CVVAppearanceProps = {
7
8
  theme: AntomTheme;
8
- variables: AntomVariables;
9
+ variables: AppearanceVariables | AntomVariables;
9
10
  fonts?: FontSource[];
11
+ rules: AppearanceRuleSelector<string>;
10
12
  };
11
- export type CVVAppearance = PickAppearance<CVVAppearanceProps>;
13
+ export type CVVAppearance = PickAntomAppearance<CVVAppearanceProps>;
12
14
  /**
13
15
  * @public
14
16
  * @description CVV element app config type
15
17
  */
16
- export interface CVVAppConfig extends BaseAppearance<CVVAppearance>, BaseElementAppConfig {
18
+ export interface CVVAppConfig extends BaseElementAppConfig {
19
+ /** CVV appearance configuration including optional alias-only Rules. */
20
+ appearance?: CVVAppearance;
17
21
  /**
18
- * @description sessionData
22
+ * @description 创建时必填的支付会话;不可通过 updateConfig 或 submit 替换
19
23
  */
20
- sessionData?: string;
24
+ sessionData: string;
21
25
  /**
22
26
  * @internal sessionConfig 渲染数据,内部使用,无需用户传递
23
27
  */
@@ -83,10 +87,6 @@ export interface CVVSubmitError {
83
87
  * @description CVV 支付提交参数
84
88
  */
85
89
  export interface CVVSubmitParams {
86
- /**
87
- * 支付会话数据
88
- */
89
- sessionData?: string;
90
90
  /**
91
91
  * 重定向策略
92
92
  */
@@ -96,18 +96,7 @@ export interface CVVSubmitParams {
96
96
  */
97
97
  params?: Record<string, unknown>;
98
98
  }
99
- export interface CVVElementEvents extends AntomBridgeEventMap<CVVAppConfig, CVVSubmitParams> {
100
- /**
101
- * @description Emitted event about form
102
- */
103
- form: {
104
- errors?: Array<{
105
- field: string | number;
106
- message: string;
107
- currentValue: any;
108
- }>;
109
- message: string;
110
- };
99
+ export interface CVVElementEvents extends AntomBridgeEventMap<CVVAppConfig, CVVSubmitParams & Pick<CVVAppConfig, 'sessionData'>> {
111
100
  /**
112
101
  * @description Emitted when the element is destroy
113
102
  */
@@ -118,21 +107,37 @@ export interface CVVElementEvents extends AntomBridgeEventMap<CVVAppConfig, CVVS
118
107
  * @description CVV element config type
119
108
  */
120
109
  export interface CVVElementConfig extends BaseElementConfig<CVVAppConfig> {
110
+ appConfig: CVVAppConfig;
121
111
  }
122
112
  /**
123
113
  * @description CVV element
124
114
  */
125
115
  export declare class CVVElement extends BaseMainElement<CVVElementConfig, CVVElementEvents> {
126
116
  static elementType: string;
117
+ private readonly sessionData;
118
+ private readonly elementTracker;
119
+ private _mountInProgress;
120
+ private _destroyInProgress;
127
121
  constructor(name: string, config: CVVElementConfig);
128
122
  /**
129
123
  * @internal
130
124
  */
131
125
  setup(): Promise<Partial<CVVAppConfig> | undefined>;
126
+ /**
127
+ * @internal Not supported by the public CVV integration API.
128
+ * Updates appearance only, preserving the Rules clear semantics.
129
+ * @param newConfig Appearance configuration patch.
130
+ * @returns The WebApp update acknowledgement.
131
+ */
132
+ updateConfig(newConfig: Pick<CVVAppConfig, 'appearance'>): Promise<CVVElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
132
133
  /**
133
134
  * @internal
134
135
  */
135
136
  submit(data?: CVVSubmitParams): Promise<import("../types").SubmitResult>;
137
+ mount(container: HTMLElement): Promise<void>;
138
+ on<T extends keyof CVVElementEvents>(event: T, handler: (payload: CVVElementEvents[T]) => void): void;
139
+ unmount(): void;
140
+ destroy(): void;
136
141
  protected focus(): void;
137
142
  protected blur(): void;
138
143
  protected clear(): void;