PageSourceSearch

https://apimax.io/static/js/async/845.4caef78cb8.js

js apimax.io collected 2026-10-08 11:37:03 UTC 41,001 bytes, 1 lines download raw bytes

1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[845],{20108(e,n,t){function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function o(e,n,t,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){t(e);return}s.done?n(c):Promise.resolve(c).then(r,o)}function i(e){return function(){var n=this,t=arguments;return new Promise(function(r,i){var a=e.apply(n,t);function s(e){o(a,r,i,s,c,"next",e)}function c(e){o(a,r,i,s,c,"throw",e)}s(void 0)})}}function a(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}function s(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,n,t){return n&&s(e.prototype,n),t&&s(e,t),e}function u(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){return null!=n&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){u(e,n,t[n])})}return e}function p(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):(function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n})(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e}function d(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(t=o.next()).done)&&(i.push(t.value),!n||i.length!==n);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,n)||h(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function h(e,n){if(e){if("string"==typeof e)return r(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,n)}}function y(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var c=[i,s];if(t)throw TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}t.d(n,{init:()=>no});var g,w,b,x,k,S,D,E,P,_,L,T,I,C,N=((k=N||{}).production="prod",k.demo="demo",k.staging="staging",k),O="airTracker_unknown",M={appName:O,appVersion:O,env:"staging",isWebappContainer:!1,delay:2e3,errorRepeatTime:3,enableErrorMonitoring:!1,assetSpeedMonitoringWhiteList:[],enableDetectPageChange:!1,enableRecordPageRetention:!1,hideSearchParams:!1,useSessionStorageForSessionId:!1,assetSpeedMonitoringWhiteListByMFE:{}},A={appName:O,env:"staging",sessionId:O,deviceId:O},R=function(){var e=new WeakSet;return function(n,t){if(l(t,Error))return"Error.message: ".concat(t.message," \n  Error.stack: ").concat(t.stack);if((void 0===t?"undefined":v(t))==="object"&&null!==t){if(e.has(t))return"[Circular ".concat(n||"root","]");e.add(t)}return"function"==typeof t?"function":(void 0===t?"undefined":v(t))==="symbol"?"symbol":void 0===t?null:t}},j=function(e){if("string"==typeof e)return e;try{if(l(e,Error))return(JSON.stringify(e,R())||"undefined").replace(/"/gim,"");return JSON.stringify(e,R())}catch(e){return'{"error":"error happen when airTracker stringify"}'}},K=function(e){var n,t=e.method,r=e.url,o=e.data,i=e.success,a=e.fail;if(!(!(n=o)||/^\s*$/.test(n))&&(n=(n=(n=n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@")).replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]")).replace(/(?:^|:|,)(?:\s*\[)+/g,""),/^[\],:{}\s]*$/.test(n))){var s=new XMLHttpRequest;s.addEventListener("readystatechange",function(){4===s.readyState&&(s.status>=400||0===s.status?null==a||a(s.response):null==i||i(s.response))}),s.open(void 0===t?"post":t,r),s.setRequestHeader("Content-Type","application/json"),s.send(o)}},F="onCommonUpdated",W="AIR_ANALYTICS_DEVICE_ID",B="AIR_ANALYTICS_SESSION_ID",U=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},q=function(e){var n,t,r;return e.config.getMFEName?e.config.getMFEName():(null==(r=location)||null==(t=r.pathname)||null==(n=t.split("/"))?void 0:n[2])||"unknown"},H=function(){try{var e=window.sessionStorage.getItem(B);return e||(e=U(),window.sessionStorage.setItem(B,e)),e}catch(e){return U()}},V=function(){try{var e=window.localStorage.getItem(W);return e||(e=U(),window.localStorage.setItem(W,e)),e}catch(e){}},X=function(){try{return window.localStorage.getItem("AWX_RISK_ID")||void 0}catch(e){}},z=function(){var e,n,t,r,o,i="",a=navigator.userAgent.match(/NetType\/(\w+)/);return a?i=d(a,2)[1]:(null==(e=navigator)?void 0:e.connection)&&(i=(null==(t=navigator)||null==(n=t.connection)?void 0:n.effectiveType)||(null==(o=navigator)||null==(r=o.connection)?void 0:r.type)),i||(i="unknown"),$(i)},$=function(e){return(e=String(e).toLowerCase()).indexOf("4g")>=0?"net4g":e.indexOf("wifi")>=0?"wifi":e.indexOf("5g")>=0?"net5g":e.indexOf("3g")>=0?"net3g":e.indexOf("2g")>=0?"net2g":"unknown"},J=function(e,n){return"number"==typeof e||"string"==typeof e?e:n?"":-1},G=function(e,n){var t,r=!1;if(!n.config.isWebappContainer)return Y(e,n.config.assetSpeedMonitoringWhiteList);var o=q(n);return r||Y(e,null==(t=n.config.assetSpeedMonitoringWhiteListByMFE)?void 0:t[o])},Y=function(e,n){if(!(null==n?void 0:n.length))return!1;for(var t=0;t<n.length;t++){var r=n[t];if(l(r,RegExp)&&r.test(e)||"string"==typeof r&&e.includes(r))return!0}return!1},Q=function(e,n){return Math.round((e-n)*100)/100},Z=function(e){return function(n){var t,r,o=q(e),i=e.config.isWebappContainer?f({},e.commonData||{},(null==(t=e.MFECommonDataMap)?void 0:t[o])||{}):e.commonData,a=Array.isArray(n)?n:[n];if(0!==a.length){var s,c=j({commonData:i,data:a}),u={method:"post",url:"prod"==(s=e.commonData.env)?"https://o11y.airwallex.com/airtracker/logs":"demo"==s?"https://o11y-demo.airwallex.com/airtracker/logs":"https://o11y-staging.airwallex.com/airtracker/logs",data:c};"function"==typeof(null==(r=navigator)?void 0:r.sendBeacon)&&navigator.sendBeacon(u.url,c)||K(u)}}},ee=function(e,n){var t,r=[],o=e.config;return window.addEventListener("beforeunload",function(){r.length>0&&(e.immediateSendPipe(r.splice(0,r.length)),t&&clearTimeout(t))}),function(i,a){if(r.push(i),e.lifeCycle.on(F,function(){r.length>0&&(null==a||a(r.splice(0,r.length)),e.lifeCycle.remove(F),t&&clearTimeout(t))}),n&&r.length>=n){null==a||a(r.splice(0,r.length)),t&&clearTimeout(t);return}t&&clearTimeout(t),t=setTimeout(function(){t=null,r.length>0&&(null==a||a(r.splice(0,r.length)),e.lifeCycle.remove(F))},o.delay)}},en=function(e){var n={};return function(t,r){var o="number"==typeof e.config.errorRepeatTime?e.config.errorRepeatTime:5;if(0===o)return null==r?void 0:r(t);null==r||r(t.filter(function(e){return("autoDetectError"!=e.severity||(n[e.error]=n[e.error]||0,n[e.error]+=1,!(n[e.error]>o)))&&!0}))}},et=function(){},er=function(e){if(!e||!e.reduce||!e.length)throw TypeError("createPipeline need at least one function param");return 1===e.length?function(n,t){e[0](n,t||et)}:e.reduce(function(e,n){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:et;return e(t,function(e){return null==n?void 0:n(e,r)})}})},eo=function(){function e(){var n=this;a(this,e),this.emit=function(e,t){if(n){var r,o=n.eventsList[e];if(null==o?void 0:o.length){o=o.slice();for(var i=0;i<o.length;i++){r=o[i];try{var a=r.callback.apply(n,[t]);if(1===r.type&&n.remove(e,r.callback),!1===a)break}catch(e){throw e}}}return n}},this.eventsList={}}return c(e,[{key:"indexOf",value:function(e,n){for(var t=0;t<e.length;t++)if(e[t].callback===n)return t;return -1}},{key:"on",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this){var r=this.eventsList[e];return r||(this.eventsList[e]=[],r=this.eventsList[e]),-1===this.indexOf(r,n)&&r.push({name:e,type:t||0,callback:n}),this}}},{key:"one",value:function(e,n){this.on(e,n,1)}},{key:"remove",value:function(e,n){if(this){var t=this.eventsList[e];if(!t)return null;if(!n){try{delete this.eventsList[e]}catch(e){}return null}if(t.length){var r=this.indexOf(t,n);t.splice(r,1)}return this}}},{key:"clear",value:function(){this.eventsList={}}}]),e}(),ei=function(){function e(n){a(this,e),this.name="",this.isInit=!1,this.name=n.name,this.option=n}return c(e,[{key:"patch",value:function(e){if(!this.isInit){var n,t;this.isInit=!0,null==(t=this.option)||null==(n=t.setUp)||n.call(this.option,e)}}},{key:"uninstall",value:function(){var e,n;null==(n=this.option)||null==(e=n.destroy)||e.apply(this),this.isInit=!1}}]),e}(),ea=function(e){var n="".concat(j(e.message)||""," @ (").concat(j(e.filename)||"",":").concat(e.lineno||0,":").concat(e.colno||0,")\n").concat(j(e.error||""));S.normalLogPipeLine({severity:"autoDetectError",eventName:"windowOnError",extraInfo:{error:n}})},es=function(e){var n=e&&j(e.reason);S.normalLogPipeLine({severity:"autoDetectError",eventName:"promiseError",extraInfo:{error:n}})},ec=function(e){var n=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement);if(n){var t=(null==n?void 0:n.src)||(null==n?void 0:n.href),r=n.tagName,o="unknown";if("string"==typeof t&&r){if(window.location.href.indexOf(t)>-1)return;if(/\.js$/.test(t))o="script";else if(/\.css$/.test(t))o="css";else switch(r.toLowerCase()){case"script":o="script";break;case"link":o="css";break;case"img":o="image";break;case"audio":case"video":o="media";break;default:return}S.normalLogPipeLine({severity:"autoDetectError",eventName:"staticFileLoadError",extraInfo:{staticFileType:o,error:"".concat(r," load fail
1: ").concat(t)}})}}},eu=new ei({name:"errorDetectionPlugin",setUp:function(e){S=e,window.addEventListener("error",ea),window.addEventListener("unhandledrejection",es),window.document.addEventListener("error",ec,!0)},destroy:function(){window.removeEventListener("unhandledrejection",es),window.document.removeEventListener("error",ec,!0),window.removeEventListener("error",ea)}}),el=["img","css","script","link","audio","video","iframe"],ef="resource",ep=function(e){var n=e.name;return{url:"string"==typeof n?(n.split("?")[0]||"").slice(0,200):n,method:"get",duration:Number(e.duration.toFixed(2)),type:"static",isHttps:"string"==typeof n&&n.startsWith("//")?"u">typeof location&&"https:"===location.protocol:/^https/.test(n),urlQuery:"string"==typeof n?n.split("?")[1]||"":n,domainLookup:J(e.domainLookupEnd-e.domainLookupStart),connectTime:J(e.connectEnd-e.connectStart)}},ed=function(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];-1!==el.indexOf(o.initiatorType)&&G(o.name,n)&&n.normalLogPipeLine({severity:"performance",eventName:"assets_speed",extraInfo:{log:ep(o)}})}},em=new ei({name:"assetsSpeedPlugin",setUp:function(e){if(void 0!==window.performance&&"function"==typeof window.performance.clearResourceTimings&&"function"==typeof window.performance.getEntriesByType&&"function"==typeof window.performance.now){var n=0;window.performance.onresourcetimingbufferfull=function(){n=0,window.performance.clearResourceTimings()},"function"==typeof window.PerformanceObserver?(ed(window.performance.getEntriesByType(ef),e),(E=new window.PerformanceObserver(function(n){ed(n.getEntries(),e)})).observe({entryTypes:[ef]})):D=setInterval(function(){var t=window.performance.getEntriesByType(ef),r=t.slice(n);n=t.length,ed(r,e)},3e3)}},destroy:function(){null==E||E.disconnect(),D&&clearInterval(D)}}),ev=new ei({name:"onPageChangePlugin",setUp:(g=i(function(e){var n,t,r,o,i;return y(this,function(a){return t=null==(n=location)?void 0:n.href,r=document.querySelector("body"),(o=function(n){var t,r,o,i,a,s=n.prevHref;e.normalLogPipeLine({severity:"autoDetectEvent",eventName:"onPageChange",extraInfo:{prevHref:s,href:(null==(t=location)?void 0:t.href)||"",hostname:null==(r=location)?void 0:r.hostname,pathName:null==(o=location)?void 0:o.pathname,protocol:null==(i=location)?void 0:i.protocol,search:null==(a=location)?void 0:a.search}})})({prevHref:""}),P=new MutationObserver(function(){if(location.href!==t){var e=t;t=location.href,o({prevHref:e})}}),i={subtree:!0,childList:!0},P.observe(r||document,i),[2]})}),function(e){return g.apply(this,arguments)}),destroy:function(){null==P||P.disconnect()}}),eh=new ei({name:"onPageRetentionPlugin",setUp:(w=i(function(e){var n,t,r,o,i,a,s;return y(this,function(c){return void 0===document.visibilityState||(t=null==(n=location)?void 0:n.href,r=document.querySelector("body"),(i=function(){o=Date.now()})(),document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState?a({href:location.href,leftReason:"visibilityChange"}):"visible"===document.visibilityState&&i()}),window.addEventListener("beforeunload",function(){a({href:location.href,sendImmediate:!0,leftReason:"pageClose"})}),a=function(n){var t=n.href,r=n.sendImmediate,i=n.leftReason;if(o){var a=Date.now()-o;if(0!==a){o=void 0;var s={severity:"autoDetectEvent",eventName:"onPageRetention",extraInfo:{href:t,duration:a,leftReason:i}};if(r)return void e.ImmediatePipeline(s);e.normalLogPipeLine(s)}}},_=new MutationObserver(function(){if(location.href!==t){var e=t;t=location.href,a({href:e,leftReason:"nextPage"}),i()}}),s={subtree:!0,childList:!0},_.observe(r||document,s)),[2]})}),function(e){return w.apply(this,arguments)}),destroy:function(){null==_||_.disconnect()}}),ey=function(){return Date.now().toString(36)+Math.random().toString(36).substring(2,15)},eg=function(e,n){return![/authenticate\/heartbeat/,/papluginlogs\/.*/,/airtracker\/.*/,/o11y(-staging|-demo)?\.airwallex\.com/,/\.(png|jpe?g|gif|svg|ico|webp|avif|css|js|json|woff2?|ttf|eot|map|txt|csv|xml)(\?.*)?(#.*)?$/i].some(function(n){return n.test(e)})&&Y(e,n||[/^https?:\/\/[^\/]*\.airwallex\.com($|\/)/])},ew=function(e){var n=e.startTime,t=e.endTime,r=e.entries;if(0!==r.length){if(1===r.length)return r[0];var o=r.filter(function(e){return e.startTime>=n&&t&&e.responseEnd<=t}).sort(function(e,n){return e.startTime-n.startTime});return null==o?void 0:o[0]}},eb=function(e){return Math.round(100*e)/100},ex=function(e){var n=e.startTime,t=e.duration,r=e.responseStart,o=e.connectEnd,i=e.connectStart,a=e.domainLookupEnd,s=e.domainLookupStart,c=e.requestStart,u=e.secureConnectionStart,l=e.redirectEnd,f=e.redirectStart,p=e.responseStatus,d=e.responseEnd,m=e.encodedBodySize,v=e.decodedBodySize,h=e.transferSize,y=e.deliveryType,g=e.initiatorType;return{startTime:eb(n),totalDuration:eb(t),timeToFirstByte:Q(r,n),tcpDuration:Q(o,i),dnsDuration:Q(a,s),tlsDuration:Q(c,u),redirectDuration:Q(l,f),responseDuration:Q(d,r),encodeResponseSize:m,decodeResponseSize:v,transferSize:h,deliveryType:y,statusCode:p,initiatorType:g}}
1,ek=function(e,n){var t=e.url,r=e.method,o=e.errorType,i=e.errorDetail,a=ew(e),s=new URL(t,window.location.href),c=s.href,u=s.protocol,l=a?ex(a):{};return{severity:"autoDetectEvent",eventName:"httpClientMetrics",extraInfo:f(p(f({httpUrl:c,method:r,scheme:u},o&&{errorType:o},i&&{errorDetail:i},l),{statusCode:(null==l?void 0:l.statusCode)||(null==e?void 0:e.responseStatus),startTime:(null==l?void 0:l.startTime)||(null==e?void 0:e.startTime),initiatorType:(null==l?void 0:l.initiatorType)||(null==e?void 0:e.initiatorType)}),n)}},eS=function(e){return e&&(void 0===e?"undefined":v(e))==="object"&&"errors"in e&&Array.isArray(e.errors)&&e.errors.every(function(e){return e&&(void 0===e?"undefined":v(e))==="object"&&"message"in e})},eD="awx_airtracker_api_performance_queue",eE="awx_airtracker_api_performance_plugin_loaded",eP="u">typeof window?window:"u">typeof global?global:{};eP[eD]=eP[eD]||[];var e_=function(e,n,t){setTimeout(function(){var r=ek(e,t);n.observerPipeline(r),eP[eD]=eP[eD].filter(function(n){return n.id!==e.id})},300)},eL=function(e,n){setTimeout(function(){var t=eP[eD].find(function(n){return n.id===e});if(t){var r=ek(t,{exceptionType:"timeout-without-response"});n.observerPipeline(r),eP[eD]=eP[eD].filter(function(n){return n.id!==e})}},1e4)},eT=function(e){var n=XMLHttpRequest.prototype.open,t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(t,r,o,i,a){try{var s,c=ey();this.__requestId=c;var u=l(r,URL)?r.href:new URL(r,window.location.href).href;if(!eg(u,null==(s=e.config)?void 0:s.enableRecordAPIPerformanceWhitelist))return n.call(this,t,r,null==o||o,i,a);var f={id:c,startTime:performance.now(),method:t,url:u,entries:[],initiatorType:"xmlhttprequest"};return eP[eD].push(f),eL(c,e),n.call(this,t,r,null==o||o,i,a)}catch(s){return e.normalLogPipeLine({severity:"warn",eventName:"apiPerformancePluginError",extraInfo:{message:"Inject XHR open error",error:s}}),n.call(this,t,r,null==o||o,i,a)}},XMLHttpRequest.prototype.send=function(){for(var n=this,r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];try{var s=eP[eD].find(function(e){return e.id===n.__requestId});if(!s)return t.apply(this,o);var c=this;return this.addEventListener("loadend",i(function(){var n,t,r,o,i,a,u;return y(this,function(l){switch(l.label){case 0:if(t=(n=performance.now())-s.startTime,r=c.status,0===r)return[2];s.endTime=n,s.duration=t,s.responseStatus=r,l.label=1;case 1:if(l.trys.push([1,6,,7]),""!==c.responseType&&"text"!==c.responseType)return[3,2];return o=c.responseText,[3,5];case 2:if("json"!==c.responseType)return[3,3];return o=c.response,[3,5];case 3:if("blob"!==c.responseType||(null==(i=c.response)?void 0:i.type)!=="application/json")return[3,5];return[4,i.text()];case 4:o=l.sent(),l.label=5;case 5:return(a=o&&"string"==typeof o?JSON.parse(o):o)&&eS(a)&&(s.errorType="graphqlError",s.errorDetail=a.errors),[3,7];case 6:return u=l.sent(),e.normalLogPipeLine({severity:"warn",eventName:"apiPerformancePluginError",extraInfo:{message:"Parse response body error in XHR",url:null==s?void 0:s.url,error:u}}),[3,7];case 7:return e_(s,e),[2]}})})),this.addEventListener("error",function(){e_(s,e,{exceptionType:"network-error"})}),this.addEventListener("abort",function(){e_(s,e,{exceptionType:"abort-error"})}),this.addEventListener("timeout",function(){e_(s,e,{exceptionType:"timeout-error"})}),t.apply(this,o)}catch(n){throw e.normalLogPipeLine({severity:"warn",eventName:"apiPerformancePluginError",extraInfo:{message:"InjectXHR send error",error:n}}),n}}},eI=function(e){var n=window.fetch;window.fetch=i(function(){var t,r,o,i,a,s,c,u,f,p,d,m,v,h,g,w,b=arguments;return y(this,function(y){switch(y.label){case 0:for(r=Array(t=b.length),o=0;o<t;o++)r[o]=b[o];if(eg(s=new URL(l(r[0],Request)?r[0].url:String(r[0]),window.location.href).href,null==(i=e.config)?void 0:i.enableRecordAPIPerformanceWhitelist))return[3,2];return[4,n.apply(this,r)];case 1:return[2,y.sent()];case 2:return y.trys.push([2,9,,10]),u=performance.now(),a={id:f=ey(),startTime:u,method:(null==(c=l(r[0],Request)?r[0]:r[1])?void 0:c.method)||"GET",url:s,entries:[],initiatorType:"fetch"},eP[eD].push(a),eL(f,e),[4,n.apply(this,r)];case 3:p=y.sent(),d=performance.now(),a.endTime=d,a.duration=d-u,a.responseStatus=p.status,m=p.clone(),y.label=4;case 4:if(y.trys.push([4,7,,8]),!m.ok)return[3,6];return[4,m.json()];case 5:(v=y.sent())&&eS(v)&&(a.errorType="graphqlError",a.errorDetail=v.errors),y.label=6;case 6:return[3,8];case 7:return h=y.sent(),e.normalLogPipeLine({severity:"warn",eventName:"apiPerformancePluginError",extraInfo:{message:"Parse response body error in fetch",url:null==a?void 0:a.url,error:h}}),[3,8];case 8:return e_(a,e),[2,p];case 9:throw g=y.sent(),a&&a.id&&eP[eD].find(function(e){return e.id===(null==a?void 0:a.id)})?(w="fetch-error",l(g,TypeError)?w="network-error":l(g,DOMException)&&"AbortError"===g.name&&(w="abort-error"),e_(a,e,{exceptionType:w})):e.normalLogPipeLine({severity:"warn",eventName:"apiPerformancePluginError",extraInfo:{message:"Inject fetch error",error:g}}),g;case 10:return[2]}})})},eC=function(e){var n;eT(e),eI(e),(null==(n=window)?void 0:n.PerformanceObserver)?new window.PerformanceObserver(function(e){e.getEntries().forEac
1h(function(e){("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)&&eP[eD].filter(function(n){return n.url===e.name}).forEach(function(n){n.entries.push(e)})})}).observe({entryTypes:["resource"],buffered:!0}):e.normalLogPipeLine({severity:"warn",eventName:"apiPerformancePluginError",extraInfo:{error:"PerformanceObserver Not Supported"}})},eN=new ei({name:"apiPerformancePlugin",setUp:(b=i(function(e){var n,t;return y(this,function(r){return eP[eE]||(null==(n=e.config)?void 0:n.enableRecordAPIPerformance)&&Math.random()<((null==(t=e.config)?void 0:t.enableRecordAPIPerformancePercentage)||0)&&(eP[eE]=!0,eC(e)),[2]})}),function(e){return b.apply(this,arguments)})}),eO=function(){function e(n){var t,r=this,o=n.config,i=n.plugins;a(this,e),this.config=M,this.lifeCycle=new eo,this.plugins=[],this._commonData=A,this._MFECommonDataMap={},this.timeMap={},this.packedDataConvert=function(e){var n,t,o=e.severity,i=e.eventName,a=e.extraInfo,s=f({severity:o,eventName:i,currentHref:r.config.hideSearchParams?((null==(n=location)?void 0:n.href)||"").split("?")[0]||"":(null==(t=location)?void 0:t.href)||""},a);return r.config.isWebappContainer&&(s.MFEName=q(r)),s},this.normalPipelineObj=er([ee(this,8),en(this),Z(this)]),this.observerPipelineObj=er([ee(this,8),(t=this,function(e){var n,r,o,i=q(t),a=j({commonData:t.config.isWebappContainer?f({},t.commonData||{},(null==(r=t.MFECommonDataMap)?void 0:r[i])||{}):t.commonData,data:Array.isArray(e)?e:[e]}),s={method:"post",url:"prod"==(n=t.commonData.env)?"https://o11y.airwallex.com/airtracker/metrics":"demo"==n?"https://o11y-demo.airwallex.com/airtracker/metrics":"https://o11y-staging.airwallex.com/airtracker/metrics",data:a};"function"==typeof(null==(o=navigator)?void 0:o.sendBeacon)&&navigator.sendBeacon(s.url,a)||K(s)})]),this.immediateSendPipe=Z(this),this.observerPipeline=function(e){var n=e.severity,t=e.eventName,o=e.extraInfo,i=r.packedDataConvert({severity:n,eventName:t,extraInfo:o});return r.observerPipelineObj(i)},this.normalLogPipeLine=function(e){var n=e.severity,t=e.eventName,o=e.extraInfo,i=r.packedDataConvert({severity:n,eventName:t,extraInfo:o});return r.config.disableThrottle?r.immediateSendPipe(i):r.normalPipelineObj(i)},this.ImmediatePipeline=function(e){var n=e.severity,t=e.eventName,o=e.extraInfo,i=r.packedDataConvert({severity:n,eventName:t,extraInfo:o});return r.immediateSendPipe(i)},this.plugins=m(void 0===i?[]:i),this.setConfig(o),this.initCommonData(o),this.lifeCycle.emit("onInit"),o.enableErrorMonitoring&&this.plugins.push(eu),((null==o?void 0:o.assetSpeedMonitoringWhiteList)&&o.assetSpeedMonitoringWhiteList.length>0||o.isWebappContainer)&&this.plugins.push(em),(null==o?void 0:o.enableDetectPageChange)&&this.plugins.push(ev),(null==o?void 0:o.enableRecordPageRetention)&&this.plugins.push(eh),(null==o?void 0:o.enableRecordAPIPerformance)&&(null==o?void 0:o.enableRecordAPIPerformancePercentage)&&o.enableRecordAPIPerformancePercentage>0&&o.enableRecordAPIPerformancePercentage<=1&&this.plugins.push(eN),this.installPlugins()}return c(e,[{key:"installPlugins",value:function(){var e=this;this.plugins.forEach(function(n){n.patch(e)})}},{key:"commonData",get:function(){return this._commonData}},{key:"MFECommonDataMap",get:function(){return this._MFECommonDataMap}},{key:"initCommonData",value:function(e){this._commonData.sessionId=e.useSessionStorageForSessionId?H():U(),this._commonData.deviceId=V()||O,this._commonData.riskDeviceId=X(),this._commonData.networkType=z()||"unknown",this._commonData.env=e.env||this._commonData.env,this._commonData.accountId=e.accountId||O,this._commonData.appVersion=e.appVersion,this._commonData.appName=e.appName,this._commonData.sdkVersion="3.1.0",this.lifeCycle.emit("onCommonDataInit",this.commonData)}},{key:"updateCommonDataBasedOnConfig",value:function(e){this.lifeCycle.emit(F,this._commonData),this._commonData.env=e.env||this._commonData.env,this._commonData.appName=e.appName||this._commonData.appName,this._commonData.env=e.env||this._commonData.env,this._commonData.accountId=e.accountId||this._commonData.accountId,this._commonData.appVersion=e.appVersion||this._commonData.appVersion}},{key:"updateCommonData",value:function(e){this.lifeCycle.emit(F,this._commonData),this._commonData=f({},this._commonData,e)}},{key:"removeCommonDataByKey",value:function(e){var n=this;this.lifeCycle.emit(F,this._commonData),setTimeout(function(){e.forEach(function(e){delete n._commonData[e]})},1e3)}},{key:"addToMFECommonData",value:function(e){var n,t=e.MFEName,r=e.MFECommonData;!this.config.isWebappContainer||t&&r&&(this._MFECommonDataMap=p(f({},this._MFECommonDataMap||{}),u({},t,f({},(null==(n=this._MFECommonDataMap)?void 0:n[t])||{},r))))}},{key:"setConfig",value:function(e){var n=this;if(!this.config.isWebappContainer){var t=function(e,t){n.config[e]=t};Object.entries(e).forEach(function(e){var n=d(e,2),r=n[0],o=n[1];(void 0===o?"undefined":v(o))!==void 0&&t(r,o)}),this.lifeCycle.emit("onConfigInit",this.config),this.updateCommonDataBasedOnConfig(e)}}},{key:"verbose",value:function(e,n){this.normalLogPipeLine({severity:"verbose",eventName:e,extraInfo:n})}},{key:"httpLog",value:function(e,n){this.normalLogPipeLine({severity:"http",eventName:e,extraInfo:n})}},{key:"info",value:function(e,n){this.normalLogPipeLine({severity:"info",eventName:e,extraInfo:n})}},{key:"warn",value:function(e,n){this.normalLogPipeLine({severity:"warn",eventName:e,extraInfo:n})}},{key:"error",value:function(e,n){console.error("error",e),this.normalLogPipeLine({severity:"error",eventName:e,extraInfo:n})}},{key:"businessLog",value:function(e,n){this.normalLogPipeLine({severity:"info",eventName:e,extraInfo:p(f({},n),{isBusinessLog:!0})})}},{key:"reportDuration",value:function(e,n,t){"string"!=typeof e?console.warn("reportDuration: eventName (first param) must be a string"):"number"!=typeof n?console.warn("reportDuration: duration (second param) must be number"):n<0||n>6e4?console.warn("reportDuration: duration (second param) must between 0 and 60000"):this.normalLogPipeLine({severity:"speed",eventName:e,extraInfo:f({duration:n},t)})}},{key:"getTimerKey",value:function(e){var n=q(this);return this.config.isWebappContainer?"".concat(n,"_").concat(e):e}},{key:"timeStart",value:function(e){"string"!=typeof e?console.warn("time: first param must be a string"):(this.timeMap[this.getTimerKey(e)]&&console.warn("Timer ".concat(e," already exists")),this.timeMap[this.getTimerKey(e)]=Date.now())}},{key:"timeEnd",value:function(e,n){if("string"!=typeof e)return void console.warn("timeEnd: first param must be a string");if(this.timeMap[this.getTimerKey(e)]){var t=Date.now()-this.timeMap[this.getTimerKey(e)]+(n||0);this.normalLogPipeLine({severity:"speed",eventName:e,extraInfo:{duration:t}}),delete this.timeMap[this.getTimerKey(e)]}else console.warn("Timer key :".concat(e," does not exist"))}},{key:"addToAssetSpeedWhiteListByMFE",value:function(e){var n,t,r,o=e.MFEName,i=e.whiteList;!this.config.isWebappContainer||o&&(null==i?void 0:i.length)&&(this.config.assetSpeedMonitoringWhiteListByMFE||(this.config.assetSpeedMonitoringWhiteListByMFE={}),(null==(n=this.config.assetSpeedMonitoringWhiteListByMFE)?void 0:n[o])?null==(r=this.config.assetSpeedMonitoringWhiteListByMFE)||null==(t=r[o])||t.pu
1sh.apply(t,m(i)):this.config.assetSpeedMonitoringWhiteListByMFE=p(f({},this.config.assetSpeedMonitoringWhiteListByMFE),u({},o,i)))}},{key:"destroy",value:function(){this.config.isWebappContainer||this.plugins.forEach(function(e){e.uninstall()})}}]),e}(),eM=function(e,n){return(eM=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)};function eA(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}eM(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var eR=function(){return(eR=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function ej(e,n,t,r){return new(t||(t=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):((n=e.value)instanceof t?n:new t(function(e){e(n)})).then(a,s)}c((r=r.apply(e,n||[])).next())})}function eK(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){var u=[s,c];if(t)throw TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=n.call(e,a)}catch(e){u=[6,e],r=0}finally{t=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function eF(e,n,t){if(t||2==arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var eW={dev:N.staging,staging:N.staging,demo:N.demo,prod:N.production},eB=function(e){if("object"!=typeof e)return e;try{var n=JSON.parse(JSON.stringify(e));return Object.keys(n).forEach(function(e){"string"==typeof e&&["auth","code"].some(function(n){return e.includes(n)})&&(n[e]="***")}),n}catch(n){return e}},eU=function(e,n){var t,r;null==(r=null==(t=window._AirwallexSDKs)?void 0:t.airTracker)||r.error(e,eR(eR({},n),{context:"components-sdk"}))},eq=function(e,n){var t;null==(t=window._AirwallexSDKs.airTracker)||t.warn(e,eR(eR({},n),{context:"components-sdk"}))},eH=function(e,n){var t;null==(t=window._AirwallexSDKs.airTracker)||t.info(e,eR(eR({},n),{context:"components-sdk"}))},eV=function(e){function n(n){var t=e.call(this,n)||this;return t.code="LOAD_SCRIPT_ERROR",t}return eA(n,e),n}(Error);(x=I||(I={})).dev="dev",x.staging="staging",x.demo="demo",x.prod="prod",x.sandbox="sandbox";var eX=((L={})[I.dev]="https://checkout-staging.airwallex.com",L[I.staging]="https://checkout-staging.airwallex.com",L[I.demo]="https://checkout-demo.airwallex.com",L[I.prod]="https://checkout.airwallex.com",L[I.sandbox]="https://checkout.sandbox.airwallex.com",L),ez=((T={})[I.dev]="https://static-staging.airwallex.com",T[I.staging]="https://static-staging.airwallex.com",T[I.demo]="https://static-demo.airwallex.com",T[I.prod]="https://static.airwallex.com",T[I.sandbox]="https://static.sandbox.airwallex.com",T),e$="sdkController",eJ="payments",eG={kyc:"/widgets/kyc/sdk/v1/index.js",rfi:"/widgets/kycRfi/sdk/v1/index.js",paymentsKyb:"/widgets/paymentsKyb/sdk/v1/index.js",sdkController:"/widgets/sdk-controller/sdk/v1/index.js",payouts:"/widgets/payouts/sdk/v1/index.js",payments:"/assets/elements.bundle.min.js",sca:"/hosted-sca/sdk/v1/index.js",taxForm:"/widgets/taxForm/sdk/v1/index.js",billing:"/widgets/checkout/sdk/v1/index.js"},eY={kyc:"kyc",paymentsKyb:"paymentsKyb",kycRfi:"rfi",transactionRfi:"rfi",paymentEnablementRfi:"rfi",lendingRfi:"rfi",mrmRfi:"rfi",payoutForm:"payouts",beneficiaryForm:"payouts",hpp:"payments",cvc:"payments",card:"payments",expiry:"payments",dropIn:"payments",cardNumber:"payments",applePayButton:"payments",googlePayButton:"payments",krCardNumber:"payments",krCardIdentifier:"payments",krCardExpiry:"payments",krCardPswFirstTwo:"payments",scaSetup:"sca",scaVerify:"sca",scaManagement:"sca",taxForm:"taxForm",embeddedCheckout:"billing"},eQ={payments:["hpp","cvc","card","expiry","dropIn","cardNumber","applePayButton","googlePayButton","krCardNumber","krCardIdentifier","krCardExpiry","krCardPswFirstTwo"],payouts:["payoutForm","beneficiaryForm"],onboarding:["kyc","paymentsKyb"],risk:["scaSetup","scaVerify","scaManagement","transactionRfi","kycRfi","paymentEnablementRfi","lendingRfi","mrmRfi"],billing:["embeddedCheckout"]},eZ={billing:["payments"]},e0=["payments","sca"],e1=function(e){function n(n){var t=e.call(this,n)||this;return t.code="INVALID_STATIC_RESOURCE_ERROR",t}return eA(n,e),n}(Error),e2=Date.now(),e3=function(e){return eY[e]},e4=function(e,n){var t=e===eJ?eX:ez;return t[n]||t.prod},e6=function(e){return Array.from(new Set(e.reduce(function(e,n){return e.concat(Object.keys(eQ).includes(n)?eQ[n]:n)},[]))).map(function(e){return{elementName:e,sdkName:e3(e)}})},e5=function(e){return"payments"===e?"payment":e},e7=function(e){var n=e.name,t=e.env,r=e4(n,void 0===t?I.prod:t),o=eG[n];if(!o)throw eU("[components-sdk] Element static resource not found",{sdkName:n}
1),new e1("Element ".concat(n," static resource URL is invalid."));return"".concat(r).concat(o,"?ts=").concat(e2)},e8=function(){return Math.floor(performance.now())},e9=function(e){var n=document.createElement("script");return n.src=e,n.type="module",(document.head||document.body).appendChild(n),n},ne=function(e){function n(n){var t=e.call(this,n)||this;return t.code="INSTANCE_NOT_FOUND_ERROR",t}return eA(n,e),n}(Error),nn=new Map,nt=function(e){var n,t=e.env,r=e.scriptName,o=e7({name:r,env:t}),i=nn.get(r);if(i)return i;var a=(n=o,ej(void 0,void 0,void 0,function(){var e,t;return eK(this,function(r){switch(r.label){case 0:if("u"<typeof window)throw Error("Please load script in browser environment");e=0,t=function(){return ej(void 0,void 0,void 0,function(){var t,r,o;return eK(this,function(i){return t=e8(),e>0&&n.includes("?ts=")&&((r=new URL(n,window.location.href)).searchParams.set("ts","".concat(Date.now())),n=r.toString()),o=e9(n),[2,new Promise(function(r,i){o.addEventListener("load",function(){var o=e8();eH("[components-sdk] SDK script loaded",{scriptUrl:n,start:t,latency:o-t,end:o,retryCount:e}),r(!0)}),o.addEventListener("error",function(r){o.remove(),console.error(r);var a=e8();eU("[components-sdk] Failed to load script",{scriptUrl:n,error:r,start:t,latency:a-t,end:a,retryCount:e}),i(new eV("Failed to load Airwallex SDK scripts: ".concat(n)))})})]})})},r.label=1;case 1:if(!(e<3))return[3,7];r.label=2;case 2:return r.trys.push([2,4,,6]),[4,t()];case 3:return[2,r.sent()];case 4:var o;return r.sent(),e++,[4,(void 0===o&&(o=500),new Promise(function(e){return window.setTimeout(e,o)}))];case 5:return r.sent(),[3,6];case 6:return[3,1];case 7:throw eU("[components-sdk] Failed to load script after retry",{scriptUrl:n,retryCount:e}),new eV("Failed to load Airwallex SDK scripts: ".concat(n))}})}));return nn.set(r,a),a},nr=function(e){var n=e.env,t=e.scriptName;return ej(void 0,void 0,void 0,function(){var e;return eK(this,function(r){switch(r.label){case 0:if(!((e=eZ[t]||[]).length>0))return[3,2];return[4,Promise.all(e.map(function(e){return nt({env:n,scriptName:e})}))];case 1:r.sent(),r.label=2;case 2:return[2,nt({env:n,scriptName:t})]}})})},no=function(e){return ej(void 0,void 0,void 0,function(){return eK(this,function(n){var t,r;if("u"<typeof window)throw Error("Please call the `init()` function in a browser environment.");return t=e.env,r=e.clientId,void 0===t&&(t=N.production),window._AirwallexSDKs.airTracker||(window._AirwallexSDKs.airTracker=new eO({config:{appName:"components-sdk",appVersion:"1.30.2",env:eW[t]||N.production}}),window._AirwallexSDKs.airTracker.updateCommonData({clientId:r})),window._AirwallexSDKs.airTracker,eH("[components-sdk] SDK init start",{options:eB(e),start:e8()}),[2,C=new Promise(function(n,t){var r,o=eR(eR({},e),{env:e.env&&I[e.env]?e.env:I.prod});window.AirwallexComponentsSDK.__env__=o.env;var i=nt({env:o.env,scriptName:e$}).then(function(){return window._AirwallexSDKs.__controller__.init(o)}),a=null!=(r=e.enabledElements)?r:[],s=Array.from(new Set(e6(a).map(function(e){return e.sdkName}).filter(function(e){return e0.includes(e)}))).map(function(e){return nt({env:o.env,scriptName:e}).then(function(){return i}).then(function(){var n=window._AirwallexSDKs[e5(e)];if(!n)throw eU("[components-sdk] SDK instance not found",{functionsNamespace:e,windowSDKInstanceName:e5(e)}),new ne("SDK instance not found");return window._AirwallexSDKs.__controller__.registerFunctions({functionsNamespace:e,instance:n})})}),c=e6(a).map(function(e){var n=e.sdkName,t=e.elementName;return nr({scriptName:n,env:o.env}).then(function(){return i}).then(function(){var e=window._AirwallexSDKs[e5(n)];if(!e)throw eU("[components-sdk] SDK instance not found",{sdkName:n,windowSDKInstanceName:e5(n)}),new ne("SDK instance not found");return window._AirwallexSDKs.__controller__.registerElement({sdkName:n,elementName:t,instance:e})})});Promise.all(eF(eF([i],s,!0),c,!0)).then(function(){eH("[components-sdk] SDK initialized",{options:eB(e),start:e8()}),n(e0.reduce(function(e,n){var t;return eR(eR({},e),((t={})[n]=window._AirwallexSDKs.__controller__.internalSDKs[n],t))},{}))}).catch(function(e){e.code||eU("[components-sdk] Unexpected errors when init",{error:e}),t(e)})})]})})},ni=[e$,eJ],na=function(){ni.forEach(function(e){var n=e7({name:e,env:I.prod}),t=document.createElement("link");t.href=n,t.rel="modulepreload",t.as="script",(document.head||document.body).appendChild(t)})};"u"<typeof document||"u"<typeof window||("loading"===document.readyState?document.addEventListener("DOMContentLoaded",na):na()),"u">typeof window&&(window.AirwallexComponentsSDK||Object.defineProperties(window,{AirwallexComponentsSDK:{value:{},writable:!1},_AirwallexSDKs:{value:{},writable:!1}}),window.AirwallexComponentsSDK.init=no,window.AirwallexComponentsSDK.createElement=function(e,n){return ej(void 0,void 0,void 0,function(){var t,r,o,i,a;return eK(this,function(s){switch(s.label){case 0:if(!e)throw Error("Element type is missing. Please specify a valid element.");if(eH("[components-sdk] SDK createElement start",{elementName:e,options:eB(n),timestamp:e8()}),!C)throw eq("[components-sdk] Did not call init before createElement"),Error("Please initialize the Element before creating it.");return[4,C];case 1:if(s.sent(),!(t=e3(e)))throw Error("`createElement()` with type `".concat(e,"` is not supported. Please specify a valid Element type."));r=e8(),s.label=2;case 2:return s.trys.push([2,6,,7]),[4,nr({scriptName:t,env:window.AirwallexComponentsSDK.__env__||I.prod})];case 3:return s.sent(),[4,window._AirwallexSDKs.__controller__.registerElement({sdkName:t,elementName:e,instance:window._AirwallexSDKs[e5(t)]})];case 4:return s.sent(),[4,window._AirwallexSDKs.__controller__.createElement(e,n)];case 5:return o=s.sent(),i=e8(),eH("[components-sdk] SDK createElement being called",{elementName:e,options:eB(n),start:r,latency:i-r,end:i}),[3,7];case 6:if((a=s.sent()).code)throw a;return eU("[components-sdk] Unexpected errors when createElement",{error:a}),[3,7];case 7:return[2,o]}})})})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.