// Module ID: 4028
// Function ID: 4029
// Name: r
// Dependencies: []
// Module 4028 (r)
let fn = () => {
let fn = function r(arg0, _exports2, firstResult2) {
let fn;
let _exports = arg0;
let closure_1 = _exports2;
let closure_2 = firstResult2;
let tmp = typeof fn === "function";
if (typeof fn === "function") {
tmp = fn;
}
let closure_3 = tmp;
let num = 0;
if (0 < firstResult2.length) {
_exports = firstResult2[num];
_exports2 = _exports2[_exports];
while (!_exports2) {
if (arg0[_exports]) {
let obj = { exports: null };
obj[0] = {};
_exports2[_exports] = obj;
let first = arg0[_exports][0];
let call = first.call;
let _exports3 = obj.exports;
fn = (arg0) => {
let closure_0 = tmp2;
let tmp3 = outer1_1;
if (outer1_1[outer1_0[closure_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: null };
obj[0] = {};
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = (arg0) => {
let closure_0 = tmp2;
let tmp3 = outer1_1;
if (outer1_1[outer1_0[closure_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: null };
obj[0] = {};
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = (arg0) => {
let closure_0 = tmp2;
let tmp3 = outer1_1;
if (outer1_1[outer1_0[closure_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: null };
obj[0] = {};
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = () => { ... };
let _exports2 = obj.exports;
let firstResult = outer1_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof outer2_0 === "function";
if (typeof outer2_0 === "function") {
tmp4 = outer2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (outer1_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
let _exports2 = obj.exports;
let firstResult = outer1_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof outer2_0 === "function";
if (typeof outer2_0 === "function") {
tmp4 = outer2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (outer1_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
let _exports2 = obj.exports;
let firstResult = outer1_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof outer2_0 === "function";
if (typeof outer2_0 === "function") {
tmp4 = outer2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (outer1_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
_exports2 = obj.exports;
let firstResult = _exports;
if (typeof call === "unknown") {
let tmp12 = _exports3;
let tmp13 = fn;
let tmp14 = obj;
let tmp15 = _exports2;
let tmp16 = firstResult;
let tmp17 = arg0;
let tmp18 = _exports2;
let tmp19 = firstResult2;
firstResult = first(fn, obj, _exports2, firstResult, arg0, _exports2, firstResult2);
break;
} else {
let tmp20 = first;
let tmp21 = _exports3;
let tmp22 = fn;
let tmp23 = obj;
let tmp24 = _exports2;
let tmp25 = firstResult;
let tmp26 = arg0;
let tmp27 = _exports2;
let tmp28 = firstResult2;
let callResult = call(_exports3, fn, obj, _exports2, firstResult, arg0, _exports2, firstResult2);
break;
}
break;
} else {
let tmp3 = typeof fn === "function";
if (typeof fn === "function") {
tmp3 = fn;
}
if (tmp3) {
let tmp3Result = tmp3(_exports, true);
} else if (tmp) {
fn = tmp(_exports, true);
} else {
let tmp4 = globalThis;
let _Error = Error;
let str = "Cannot find module '";
let tmp5 = new.target;
let str2 = "'";
let tmp6 = new.target;
let error = new Error("Cannot find module '" + _exports + "'");
let tmp8 = error;
let str3 = "MODULE_NOT_FOUND";
error.code = "MODULE_NOT_FOUND";
throw error;
}
num = num + 1;
}
_exports = _exports2[_exports].exports;
}
}
return function o(arg0, arg1) {
const table = arg0;
if (!table2[arg0]) {
if (table[arg0]) {
const obj = { exports: null };
obj[0] = {};
tmp[arg0] = obj;
const first = tmp2[arg0][0];
const call = first.call;
const _exports = obj.exports;
const fn = (arg0) => {
let closure_0 = tmp2;
let tmp3 = outer1_1;
if (outer1_1[outer1_0[closure_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: null };
obj[0] = {};
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = (arg0) => {
let closure_0 = tmp2;
let tmp3 = outer1_1;
if (outer1_1[outer1_0[closure_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: null };
obj[0] = {};
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = () => { ... };
let _exports2 = obj.exports;
let firstResult = outer1_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof outer2_0 === "function";
if (typeof outer2_0 === "function") {
tmp4 = outer2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (outer1_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
let _exports2 = obj.exports;
let firstResult = outer1_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof outer2_0 === "function";
if (typeof outer2_0 === "function") {
tmp4 = outer2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (outer1_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
const _exports2 = obj.exports;
if (typeof call === "unknown") {
first(fn, obj, _exports2, tmp12, tmp2, tmp, tmp13);
} else {
call(_exports, fn, obj, _exports2, tmp12, tmp2, tmp, tmp13);
}
} else {
let tmp3 = typeof fn === "function";
if (typeof fn === "function") {
tmp3 = fn;
}
if (!arg1) {
if (tmp3) {
return tmp3(arg0, true);
}
}
if (closure_3) {
return tmp5(arg0, true);
} else {
const _Error = Error;
const error = new Error("Cannot find module '" + arg0 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
}
}
return table2[arg0].exports;
};
};
let obj = { 1: null, 2: items, 3: items1, 4: items2, 5: items3, 6: items4, 7: items5, 8: items6, 9: items7, 10: items8, 11: items9, 12: items10, 13: items11, 14: items12, 15: items13, 16: items14, 17: items15, 18: items16, 19: items17, 20: items18, 21: items19, 22: items20, 23: items21, 24: items22, 25: items23, 26: items24, 27: items25, 28: items26, 29: items27, 30: items28, 31: items29, 32: items30, 33: items31, 34: items32, 35: items33, 36: items34, 37: items35, 38: items36, 39: items37, 40: items38, 41: items39, 42: items40, 43: items41, 44: items42, 45: items43, 46: items44, 47: items45, 48: items46, 49: items47, 50: items48, 51: items49, 52: items50, 53: items51, 54: items52, 55: items53, 56: items54, 57: items55, 58: items56, 59: items57, 60: items58, 61: items59, 62: items60, 63: items61, 64: items62, 65: items63, 66: items64, 67: items65, 68: items66, 69: items67, 70: items68, 71: items69, 72: items70, 73: items71, 74: items72, 75: items73, 76: items74, 77: items75, 78: items76, 79: items77, 80: items78, 81: items79, 82: items80, 83: items81, 84: items82, 85: items83, 86: items84, 87: items85, 88: items86, 89: items87, 90: items88, 91: items89, 92: items90, 93: items91, 94: items92, 95: items93, 96: items94, 97: items95, 98: items96, 99: items97, 100: items98, 101: items, 102: items, 103: items, 104: items, 105: items, 106: items, 107: items, 108: items, 109: items, 110: items, 111: items, 112: items, 113: items, 114: items, 115: items, 116: items, 117: items, 118: items, 119: items, 120: items, 121: items, 122: items, 123: items, 124: items, 125: items, 126: items, 127: items, 128: items, 129: items, 130: items, 131: items, 132: items, 133: items, 134: items, 135: items, 136: items, 137: items, 138: items, 139: items, 140: items, 141: items, 142: items, 143: items, 144: items, 145: items, 146: items, 147: items, 148: items, 149: items, 150: items, 151: items, 152: items, 153: items, 154: items, 155: items, 156: items, 157: items, 158: items, 159: items, 160: items, 161: items, 162: items, 163: items, 164: items, 165: items, 166: items, 167: items, 168: items, 169: items, 170: items, 171: items, 172: items, 173: items, 174: items, 175: items, 176: items, 177: items, 178: items, 179: items, 180: items, 181: items, 182: items, 183: items, 184: items, 185: items, 186: items, 187: items, 188: items, 189: items, 190: items, 191: items, 192: items, 193: items, 194: items, 195: items, 196: items, 197: items, 198: items, 199: items, 200: items, 201: items, 202: items, 203: items, 204: items, 205: items, 206: items, 207: items, 208: items, 209: items, 210: items, 211: items, 212: items, 213: items, 214: items, 215: items, 216: items, 217: items, 218: items, 219: items, 220: items, 221: items, 222: items, 223: items, 224: items, 225: items, 226: items, 227: items, 228: items, 229: items, 230: items, 231: items, 232: items, 233: items, 234: items, 235: items, 236: items, 237: items, 238: items, 239: items, 240: items, 241: items, 242: items, 243: items, 244: items, 245: items, 246: items, 247: items, 248: items };
items = [
(arg0, arg1, arg2) => {
function loadScript(forceScriptReload) {
const table = forceScriptReload;
const json = JSON.stringify(forceScriptReload);
if (!forceScriptReload.forceScriptReload) {
if (table[json]) {
return tmp3;
}
}
let element = ;
const tmp4 = forceScriptReload.dataAttributes || {};
let closure_2 = tmp4;
let head = forceScriptReload.container;
if (!head) {
const _document = document;
head = document.head;
}
element.src = forceScriptReload.src;
element.id = forceScriptReload.id || "";
element.async = true;
if (forceScriptReload.type) {
const concat = "".concat;
let attr = element.setAttribute("type", "".concat(forceScriptReload.type));
}
if (forceScriptReload.crossorigin) {
const concat2 = "".concat;
const attr1 = element.setAttribute("crossorigin", "".concat(forceScriptReload.crossorigin));
}
const keys = Object.keys(tmp4);
const item = keys.forEach((arg0) => {
const combined = "data-".concat(arg0);
const attr = element.setAttribute(combined, "".concat(tmp4[arg0]));
});
const promise = new Promise((arg0, arg1) => {
let closure_0 = arg0;
const element = arg1;
const listener = element.addEventListener("load", () => {
lib(closure_1);
});
const listener1 = element.addEventListener("error", () => {
const error = new Error("".concat(lib.src, " failed to load."));
callback(error);
});
const listener2 = element.addEventListener("abort", () => {
const error = new Error("".concat(lib.src, " has aborted."));
callback(error);
});
head.appendChild(element);
});
table[json] = promise;
return promise;
}
let closure_0 = {};
loadScript.clearCache = () => {
let closure_0 = {};
};
module.exports = loadScript;
},
{}
];
items1 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/load-script");
},
{ "./dist/load-script": 1 }
];
items2 = [
(arg0, arg1, arg2) => {
module.exports = function isAndroid(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /Android/i.test(userAgent);
};
},
{}
];
items3 = [
(arg0, arg1, arg2) => {
module.exports = function isChromeOS(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /CrOS/i.test(userAgent);
};
},
{}
];
items4 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./is-edge");
let closure_1 = global("./is-samsung");
let closure_2 = global("./is-duckduckgo");
let closure_3 = global("./is-opera");
let closure_4 = global("./is-silk");
module.exports = function isChrome(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = -1 === userAgent.indexOf("Chrome");
if (tmp2) {
tmp2 = -1 === userAgent.indexOf("CriOS");
}
if (!tmp2) {
tmp2 = callback(userAgent);
}
if (!tmp2) {
tmp2 = callback2(userAgent);
}
if (!tmp2) {
tmp2 = callback3(userAgent);
}
if (!tmp2) {
tmp2 = callback4(userAgent);
}
if (!tmp2) {
tmp2 = callback5(userAgent);
}
return !tmp2;
};
},
{ "./is-duckduckgo": 6, "./is-edge": 7, "./is-opera": 16, "./is-samsung": 17, "./is-silk": 18 }
];
items5 = [
(arg0, arg1, arg2) => {
module.exports = function isDuckDuckGo(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return -1 !== userAgent.indexOf("DuckDuckGo/");
};
},
{}
];
items6 = [
(arg0, arg1, arg2) => {
module.exports = function isEdge(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = -1 !== userAgent.indexOf("Edge/");
if (!tmp2) {
tmp2 = -1 !== userAgent.indexOf("Edg/");
}
return tmp2;
};
},
{}
];
items7 = [
(arg0, arg1, arg2) => {
module.exports = function isFirefox(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /Firefox/i.test(userAgent);
};
},
{}
];
items8 = [
(arg0, arg1, arg2) => {
module.exports = function isIosFirefox(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /FxiOS/i.test(userAgent);
};
},
{}
];
items9 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./is-ios");
module.exports = function isIosGoogleSearchApp(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let isMatch = callback(userAgent);
if (isMatch) {
isMatch = /\bGSA\b/.test(userAgent);
const obj = /\bGSA\b/;
}
return isMatch;
};
},
{ "./is-ios": 14 }
];
items10 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./is-ios");
let closure_1 = global("./is-ios-firefox");
const re2 = /webkit/i;
module.exports = function isIosSafari(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let isMatch = callback(userAgent);
if (isMatch) {
isMatch = regex.test(userAgent);
}
if (isMatch) {
isMatch = userAgent.indexOf("CriOS") <= -1;
}
if (isMatch) {
isMatch = !callback2(userAgent);
}
if (isMatch) {
isMatch = userAgent.indexOf("FBAN") <= -1;
}
return isMatch;
};
},
{ "./is-ios": 14, "./is-ios-firefox": 9 }
];
items11 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./is-ios");
let closure_1 = global("./is-ios-google-search-app");
module.exports = function isIosWebview(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = callback(userAgent);
if (tmp2) {
let isMatch = callback2(userAgent);
if (!isMatch) {
isMatch = /.+AppleWebKit(?!.*Safari)/i.test(userAgent);
const obj = /.+AppleWebKit(?!.*Safari)/i;
}
tmp2 = isMatch;
}
return tmp2;
};
},
{ "./is-ios": 14, "./is-ios-google-search-app": 10 }
];
items12 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./is-ios-webview");
module.exports = function isIosWKWebview(arg0, arg1) {
let visible = arg1;
if (undefined === arg1) {
const _window = window;
visible = window.statusbar.visible;
}
return callback(arg0) && visible;
};
},
{ "./is-ios-webview": 12 }
];
items13 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./is-ipados");
module.exports = function isIos(arg0, arg1, arg2) {
let flag = arg1;
if (undefined === arg1) {
flag = true;
}
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
const isMatch = /iPhone|iPod|iPad/i.test(userAgent);
let tmp3 = isMatch;
if (flag) {
let tmp4 = isMatch;
if (!isMatch) {
tmp4 = callback(userAgent, arg2);
}
tmp3 = tmp4;
}
return tmp3;
};
},
{ "./is-ipados": 15 }
];
items14 = [
(arg0, arg1, arg2) => {
module.exports = function isIpadOS(arg0, arg1) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let _document = arg1;
if (!arg1) {
const _window2 = window;
_document = window.document;
}
let isMatch = /Mac|iPad/i.test(userAgent);
if (isMatch) {
isMatch = "ontouchend" in _document;
}
return isMatch;
};
},
{}
];
items15 = [
(arg0, arg1, arg2) => {
module.exports = function isOpera(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = -1 !== userAgent.indexOf("OPR/");
if (!tmp2) {
tmp2 = -1 !== userAgent.indexOf("Opera/");
}
if (!tmp2) {
tmp2 = -1 !== userAgent.indexOf("OPT/");
}
return tmp2;
};
},
{}
];
items16 = [
(arg0, arg1, arg2) => {
module.exports = function isSamsungBrowser(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /SamsungBrowser/i.test(userAgent);
};
},
{}
];
items17 = [
(arg0, arg1, arg2) => {
module.exports = function isSilk(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return -1 !== userAgent.indexOf("Silk/");
};
},
{}
];
items18 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./is-android");
let closure_1 = global("./is-ios-firefox");
let closure_2 = global("./is-ios-webview");
let closure_3 = global("./is-chrome");
let closure_4 = global("./is-samsung");
let closure_5 = global("./is-duckduckgo");
module.exports = function supportsPopups(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = callback3(userAgent);
if (!tmp2) {
tmp2 = callback2(userAgent);
}
if (!tmp2) {
let userAgent2 = userAgent;
if (!userAgent) {
const _window2 = window;
userAgent2 = window.navigator.userAgent;
}
let isMatch = callback(userAgent2);
if (isMatch) {
isMatch = /Version\/[\d.]+/i.test(userAgent2);
const obj = /Version\/[\d.]+/i;
}
if (isMatch) {
userAgent = userAgent2;
if (!userAgent2) {
const _window3 = window;
userAgent = window.navigator.userAgent;
}
isMatch = userAgent.indexOf("Opera Mini") <= -1;
}
if (isMatch) {
isMatch = !callback6(userAgent2);
}
tmp2 = isMatch;
}
if (!tmp2) {
let userAgent1 = userAgent;
if (!userAgent) {
const _window4 = window;
userAgent1 = window.navigator.userAgent;
}
tmp2 = userAgent1.indexOf("Opera Mini") > -1;
}
if (!tmp2) {
let str3 = userAgent;
if (!userAgent) {
const _window5 = window;
str3 = window.navigator.userAgent;
}
const match = str3.match(/CriOS\/(\d+)\./);
let tmp13 = match;
if (tmp13) {
const _parseInt = parseInt;
tmp13 = parseInt(match[1], 10) < 48;
}
tmp2 = tmp13;
}
if (!tmp2) {
const tmp16 = callback4(userAgent);
let isMatch1 = !tmp16;
if (!tmp16) {
isMatch1 = !callback5(userAgent);
}
if (isMatch1) {
isMatch1 = /samsung/i.test(userAgent);
const obj2 = /samsung/i;
}
tmp2 = isMatch1;
}
return !tmp2;
};
},
{ "./is-android": 3, "./is-chrome": 5, "./is-duckduckgo": 6, "./is-ios-firefox": 9, "./is-ios-webview": 12, "./is-samsung": 17 }
];
items19 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-android");
},
{ "./dist/is-android": 3 }
];
items20 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-chrome-os");
},
{ "./dist/is-chrome-os": 4 }
];
items21 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-chrome");
},
{ "./dist/is-chrome": 5 }
];
items22 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-firefox");
},
{ "./dist/is-firefox": 8 }
];
items23 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ios-safari");
},
{ "./dist/is-ios-safari": 11 }
];
items24 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ios-webview");
},
{ "./dist/is-ios-webview": 12 }
];
items25 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ios-wkwebview");
},
{ "./dist/is-ios-wkwebview": 13 }
];
items26 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ios");
},
{ "./dist/is-ios": 14 }
];
items27 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-samsung");
},
{ "./dist/is-samsung": 17 }
];
items28 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/supports-popups");
},
{ "./dist/supports-popups": 19 }
];
items29 = [
(arg0, arg1, arg2) => {
class EventEmitter {
constructor() {
this._events = {};
return;
}
on(arg0, arg1) {
_events = this._events;
if (this._events[global]) {
arr2 = _events[global];
arr = arr2.push(module);
} else {
items = [];
items[0] = module;
_events[global] = items;
}
return;
}
off(arg0, arg1) {
arr = this._events[global];
if (arr) {
tmp = module;
num = 1;
spliceResult = arr.splice(arr.indexOf(module), 1);
}
return;
}
_emit(arg0) {
items = [];
EventEmitter = items;
num = 1;
if (1 < arguments.length) {
do {
items[num - 1] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
arr2 = this._events[global];
if (arr2) {
item = arr2.forEach(() => { ... });
}
return;
}
hasListener(arg0) {
arr = this._events[global];
tmp = arr;
if (tmp) {
num = 0;
tmp = arr.length > 0;
}
return tmp;
}
static createChild(arg0) {
obj = { constructor: global };
global.prototype = Object.create(EventEmitter.prototype, obj);
return;
}
}
module.exports = EventEmitter;
},
{}
];
items30 = [
(arg0, arg1, arg2) => {
let _Promise = null;
if (typeof Promise !== "undefined") {
_Promise = Promise;
}
class ExtendedPromise {
constructor(arg0) {
self = this;
self = this;
if (typeof global !== "function") {
obj = self;
tmp = new.target;
tmp2 = new.target;
promise = new self.Promise(() => { ... });
tmp4 = promise;
self._promise = promise;
obj = global;
if (!global) {
obj = {};
}
self._onResolve = obj.onResolve || obj.defaultOnResolve;
self._onReject = obj.onReject || obj.defaultOnReject;
if (obj.shouldCatchExceptions(obj)) {
_promise = self._promise;
catchPromise = _promise.catch(/* F119313 */ function() { ... });
}
_resetStateResult = self._resetState();
} else {
tmp7 = self;
tmp8 = new.target;
tmp9 = new.target;
tmp10 = global;
promise1 = new self.Promise(global);
tmp12 = promise1;
self._promise = promise1;
}
return;
}
static defaultOnResolve(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.resolve(global);
}
static defaultOnReject(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.reject(global);
}
static setPromise(arg0) {
ExtendedPromise.Promise = global;
return;
}
static shouldCatchExceptions(arg0) {
_Boolean = Boolean;
if (global.hasOwnProperty("suppressUnhandledPromiseMessage")) {
_BooleanResult = _Boolean(global.suppressUnhandledPromiseMessage);
} else {
tmp = ExtendedPromise;
_BooleanResult = _Boolean(ExtendedPromise.suppressUnhandledPromiseMessage);
}
return _BooleanResult;
}
static all(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.all(global);
}
static allSettled(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.allSettled(global);
}
static race(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.race(global);
}
static reject(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.reject(global);
}
static resolve(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.resolve(global);
}
then() {
items = [];
num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
_promise = this._promise;
then = _promise.then;
return then.apply(_promise, items);
}
catch() {
items = [];
num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
_promise = this._promise;
_catch = _promise.catch;
return _catch.apply(_promise, items);
}
resolve(arg0) {
self = this;
closure_0 = global;
self = this;
if (!this.isFulfilled) {
_setResolvedResult = self._setResolved();
tmp2 = closure_0;
_Promise = closure_0.Promise;
resolveResult = _Promise.resolve();
nextPromise = resolveResult.then(() => { ... });
nextPromise1 = nextPromise.then(() => { ... });
catchPromise = nextPromise1.catch(() => { ... });
}
return self;
}
reject(arg0) {
self = this;
closure_0 = global;
self = this;
if (!this.isFulfilled) {
_setRejectedResult = self._setRejected();
tmp2 = closure_0;
_Promise = closure_0.Promise;
resolveResult = _Promise.resolve();
nextPromise = resolveResult.then(() => { ... });
nextPromise1 = nextPromise.then(() => { ... });
catchPromise = nextPromise1.catch(() => { ... });
}
return self;
}
_resetState() {
return;
}
_setResolved() {
return;
}
_setRejected() {
return;
}
}
ExtendedPromise.Promise = _Promise;
module.exports = ExtendedPromise;
},
{}
];
items31 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./lib/set-attributes");
let closure_1 = global("./lib/default-attributes");
let closure_2 = global("./lib/assign");
module.exports = function createFrame(arg0) {
let obj = arg0;
if (undefined === arg0) {
obj = {};
}
const element = ;
obj = closure_2.assign({}, defaultAttributes.defaultAttributes, obj);
if (tmp4) {
obj = closure_2.assign(element.style, obj.style);
delete tmp[tmp2];
}
attributes.setAttributes(element, obj);
if (!element.getAttribute("id")) {
element.id = element.name;
}
return element;
};
},
{ "./lib/assign": 33, "./lib/default-attributes": 34, "./lib/set-attributes": 35 }
];
items32 = [
(arg0, arg1, arg2) => {
arg2.assign = function assign(arg0) {
let length;
let closure_0 = arg0;
const items = [];
let num = 1;
if (1 < arguments.length) {
do {
items[num - 1] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
let item = items.forEach((obj) => {
let closure_0 = obj;
if (typeof obj === "object") {
const _Object = Object;
const keys = Object.keys(obj);
const item = keys.forEach((arg0) => {
obj[arg0] = obj[arg0];
});
}
});
return arg0;
};
},
{}
];
items33 = [
(arg0, arg1, arg2) => {
arg2.defaultAttributes = { src: "about:blank", frameBorder: 0, allowtransparency: true, scrolling: "no" };
},
{}
];
items34 = [
(arg0, arg1, arg2) => {
arg2.setAttributes = function setAttributes(removeAttribute, obj) {
for (const key10005 in arg1) {
let tmp4 = key10005;
if (!arg1.hasOwnProperty(key10005)) {
continue;
} else {
let tmp = arg1[key10005];
if (null == tmp) {
let removeAttributeResult = arg0.removeAttribute(key10005);
continue;
} else {
let attr = arg0.setAttribute(key10005, tmp);
continue;
}
continue;
}
continue;
}
};
},
{}
];
items35 = [
(arg0, arg1, arg2) => {
module.exports = function uuid() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (arg0) => {
const tmp = 16 * Math.random() | 0;
let str = tmp;
if ("x" !== arg0) {
str = 3 & tmp | 8;
}
return str.toString(16);
});
};
},
{}
];
items36 = [
(arg0, arg1, arg2) => {
arg2.deferred = function deferred(items) {
let closure_0 = items;
return () => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
const timerId = setTimeout(() => {
try {
items.apply(undefined, items);
} catch (tmp4) {
const _console = console;
console.log("Error in callback function");
const _console2 = console;
console.log(tmp4);
}
}, 1);
};
};
},
{}
];
items37 = [
(arg0, arg1, arg2) => {
arg2.once = function once(arg0) {
let closure_0 = arg0;
let c1 = false;
return () => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
if (!c1) {
c1 = true;
callback.apply(undefined, items);
}
};
};
},
{}
];
items38 = [
(arg0, arg1, arg2) => {
arg2.promiseOrCallback = function promiseOrCallback(closure_0, onceResult) {
closure_0 = onceResult;
if (onceResult) {
closure_0.then((arg0) => onceResult(null, arg0)).catch((arg0) => onceResult(arg0));
} else {
return closure_0;
}
};
},
{}
];
items39 = [
(arg0, arg1, arg2) => {
function wrapPromise(arg0) {
let closure_0 = arg0;
return function() {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
let onceResult;
if (typeof items[items.length - 1] === "function") {
onceResult = outer1_1.once(lib.deferred(items.pop()));
}
return outer1_2.promiseOrCallback(lib.apply(this, items), onceResult);
};
}
let closure_0 = global("./lib/deferred");
let closure_1 = global("./lib/once");
let closure_2 = global("./lib/promise-or-callback");
wrapPromise.wrapPrototype = (arg0, arg1) => {
let closure_0 = arg0;
let obj = arg1;
if (undefined === arg1) {
obj = {};
}
let closure_1 = obj.ignoreMethods || [];
let closure_2 = true === obj.transformPrivateMethods;
const ownPropertyNames = Object.getOwnPropertyNames(arg0.prototype);
const found = ownPropertyNames.filter((str) => {
let tmp = "constructor" !== str;
if (tmp) {
tmp = typeof ctor.prototype[str] === "function";
}
let tmp4 = closure_2;
const index = closure_1.indexOf(str);
if (!tmp4) {
tmp4 = "_" !== str.charAt(0);
}
if (tmp) {
tmp = tmp4;
}
if (tmp) {
tmp = -1 === index;
}
return tmp;
});
const item = found.forEach((arg0) => {
ctor = ctor.prototype[arg0];
ctor.prototype[arg0] = function() {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
let onceResult;
if (typeof items[items.length - 1] === "function") {
onceResult = outer1_1.once(lib.deferred(items.pop()));
}
return outer1_2.promiseOrCallback(lib.apply(this, items), onceResult);
};
});
return arg0;
};
module.exports = wrapPromise;
},
{ "./lib/deferred": 37, "./lib/once": 38, "./lib/promise-or-callback": 39 }
];
items40 = [
function(arg0, arg1, obj) {
const fn = (arg0) => {
let concat;
let concat2;
function loadScript$1(forceScriptReload) {
const table = forceScriptReload;
const json = JSON.stringify(forceScriptReload);
if (!forceScriptReload.forceScriptReload) {
if (table[json]) {
return tmp3;
}
}
let element = ;
const tmp4 = forceScriptReload.dataAttributes || {};
const fastlane = tmp4;
let head = forceScriptReload.container;
if (!head) {
const _document = document;
head = document.head;
}
element.src = forceScriptReload.src;
element.id = forceScriptReload.id || "";
element.async = true;
if (forceScriptReload.type) {
const concat = "".concat;
let attr = element.setAttribute("type", "".concat(forceScriptReload.type));
}
if (forceScriptReload.crossorigin) {
const concat2 = "".concat;
const attr1 = element.setAttribute("crossorigin", "".concat(forceScriptReload.crossorigin));
}
const keys = Object.keys(tmp4);
const item = keys.forEach((arg0) => {
const combined = "data-".concat(arg0);
const attr = element.setAttribute(combined, "".concat(tmp4[arg0]));
});
const promise = new Promise((arg0, arg1) => {
let closure_0 = arg0;
const element = arg1;
const listener = element.addEventListener("load", () => { ... });
const listener1 = element.addEventListener("error", () => { ... });
const listener2 = element.addEventListener("abort", () => { ... });
head.appendChild(element);
});
table[json] = promise;
return promise;
}
function loadAXOScript(arg0, arg1) {
let flag = arg1;
if (undefined === arg1) {
flag = true;
}
let amd = typeof define === "function";
if (typeof define === "function") {
const _window4 = window;
amd = window.define.amd;
}
if (amd) {
const _window = window;
let amd1 = typeof define2 === "function";
if (typeof define2 === "function") {
const _window5 = window;
amd1 = window.define.amd;
}
if (amd1) {
const _window2 = window;
amd1 = typeof window.requirejs === "function";
}
if (amd1) {
const _window3 = window;
amd1 = typeof window.requirejs.config === "function";
}
if (amd1) {
let obj = { paths: null };
obj = {};
obj[fastlane] = arg0;
obj[0] = obj;
globalThis.requirejs.config(obj);
}
const concat = "".concat;
const combined = "".concat(fastlane, "/");
const AXO_ASSET_NAME = obj.AXO_ASSET_NAME;
let closure_0 = combined.concat(flag ? AXO_ASSET_NAME.minified : AXO_ASSET_NAME.unminified);
const promise = new Promise((arg0, arg1) => {
const items = [closure_0];
const _module = window.require(items, arg0, arg1);
});
return promise;
} else {
obj = { id: "axo-id", src: null, forceScriptReload: true };
obj[1] = arg0;
return loadScript$1(obj);
}
}
let obj = {};
let closure_0 = {};
loadScript$1.clearCache = () => {
let closure_0 = {};
};
obj.loadScript = undefined;
loadScript$1 = undefined;
obj.loadStylesheet = undefined;
obj.loadScript = loadScript$1;
obj.loadStylesheet = function loadStylesheet(href) {
const element = document.querySelector("link[href=\"".concat(href.href, "\"]"));
if (element) {
return Promise.resolve(element);
} else {
const _document = document;
const element1 = ;
let head = href.container;
if (!head) {
const _document2 = document;
head = document.head;
}
const attr = element1.setAttribute("rel", "stylesheet");
const attr1 = element1.setAttribute("type", "text/css");
const attr2 = element1.setAttribute("href", href.href);
const attr3 = element1.setAttribute("id", href.id);
if (head.firstChild) {
head.insertBefore(element1, head.firstChild);
} else {
head.appendChild(element1);
}
return Promise.resolve(element1);
}
};
let fastlane = "fastlane";
obj = { AXO_ASSET_NAME: { minified: "axo.min", unminified: "axo" }, AXO_ASSET_PATH: "connect-boba", LOCALE_PATH: "".concat("connect-boba", "/locales/"), CDNX_PROD: "https://www.paypalobjects.com" };
const BT = "BT";
const PPCP = "PPCP";
obj = { client: "client", hostedFields: "hosted-fields" };
const obj1 = {};
const obj2 = { id: "client", module: "client", amdModule: null, script: null };
const obj3 = { unminified: null, minified: null };
let combined = "".concat("braintree", "/");
obj3[0] = combined.concat(obj.client);
let combined1 = "".concat("braintree", "/");
obj3[1] = combined1.concat(obj.client, ".min");
obj2[2] = obj3;
obj2[3] = { unminified: "".concat(obj.client, ".js"), minified: "".concat(obj.client, ".min.js") };
obj1.client = obj2;
const obj5 = { id: "hcf", module: "hostedFields", amdModule: null, script: null };
const obj6 = { unminified: null, minified: null };
let combined2 = "".concat("braintree", "/");
obj6[0] = combined2.concat(obj.hostedFields);
let combined3 = "".concat("braintree", "/");
obj6[1] = combined3.concat(obj.hostedFields, ".min");
obj5[2] = obj6;
const obj4 = { unminified: "".concat(obj.client, ".js"), minified: "".concat(obj.client, ".min.js") };
({ concat, concat: concat2 } = "");
obj5[3] = { unminified: "".concat(obj.hostedFields, ".js"), minified: "".concat(obj.hostedFields, ".min.js") };
obj1.hostedFields = obj5;
arg0.constants = obj;
arg0.loadAxo = function loadAxo(arg0) {
let self = arg0;
self = this;
const f119330 = function() {
let c0 = this;
const f120296 = () => { ... };
let closure_5 = { label: 0, sent() { ... }, trys: [], ops: [] };
let obj = { next: () => { ... }, throw: () => { ... }, return: () => { ... } };
c0 = 0;
c0 = 1;
c0 = 2;
if (typeof Symbol === "function") {
let _Symbol = Symbol;
obj[Symbol.iterator] = /* F119324 */ function() { ... };
}
return obj;
};
return new Promise((arg0, arg1) => {
let closure_0 = arg0;
let closure_1 = arg1;
function fulfilled() { ... }
let iter = fulfilled;
function rejected() { ... }
function step() { ... }
iter = iter.apply(closure_0, []);
const iter2 = iter.next();
const value = iter2.value;
if (iter2.done) {
arg0(value);
} else {
closure_0 = value;
let tmp = value;
if (!(value instanceof closure_1)) {
tmp = new tmp(() => { ... });
}
tmp.then(fulfilled, rejected);
}
});
};
};
if (typeof obj === "object") {
if (undefined !== arg1) {
fn(obj);
}
}
let self = this;
if (typeof globalThis !== "undefined") {
self = globalThis;
}
obj = {};
self.loadAxo = obj;
fn(obj);
},
{}
];
items41 = [
function(arg0, arg1, arg2) {
let fn = this;
if (this) {
fn = this.__assign;
}
if (!fn) {
fn = function() {
let tmp = Object.assign || ((arg0) => {
for (let num = 1; num < length; num = num + 1) {
let tmp = arguments[num];
let tmp2 = tmp;
let tmp3 = num;
for (const key10012 in tmp) {
let tmp5 = key10012;
let _Object = Object;
let call = hasOwnProperty.call;
if (typeof call === "unknown") {
let hasOwnPropertyResult = hasOwnProperty(key10012);
} else {
hasOwnPropertyResult = call(tmp, key10012);
}
if (!hasOwnPropertyResult) {
continue;
} else {
arg0[key10012] = tmp[key10012];
continue;
}
continue;
}
}
return arg0;
});
const self = this;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};
}
function creditCardType(arg0) {
let closure_0 = arg0;
let items = [];
if (validInputType.isValidInputType(arg0)) {
if (0 === arg0.length) {
return arr.map((arg0) => {
let tmp = table[arg0];
if (!tmp) {
tmp = items[arg0];
}
return closure_5.clone(tmp);
});
} else {
const item = arr.forEach((arg0) => {
let tmp = outer1_6[arg0];
if (!tmp) {
tmp = items[arg0];
}
const result = outer1_2.addMatchingCardsToResults(closure_0, tmp, items);
});
const findBestMatchResult = closure_4.findBestMatch(items);
if (findBestMatchResult) {
const items1 = [findBestMatchResult];
items = items1;
}
return items;
}
} else {
return items;
}
}
let closure_1 = global("./lib/card-types");
let closure_2 = global("./lib/add-matching-cards-to-results");
let closure_3 = global("./lib/is-valid-input-type");
let closure_4 = global("./lib/find-best-match");
const globalResult = global("./lib/clone");
let closure_5 = globalResult;
let closure_6 = {};
const obj = { VISA: "visa", MASTERCARD: "mastercard", AMERICAN_EXPRESS: "american-express", DINERS_CLUB: "diners-club", DISCOVER: "discover", JCB: "jcb", UNIONPAY: "unionpay", MAESTRO: "maestro", ELO: "elo", MIR: "mir", HIPER: "hiper", HIPERCARD: "hipercard" };
let items = [, , , , , , , , , , , ];
({ VISA: arr[0], MASTERCARD: arr[1], AMERICAN_EXPRESS: arr[2], DINERS_CLUB: arr[3], DISCOVER: arr[4], JCB: arr[5], UNIONPAY: arr[6], MAESTRO: arr[7], ELO: arr[8], MIR: arr[9], HIPER: arr[10], HIPERCARD: arr[11] } = obj);
let closure_8 = globalResult.clone(items);
creditCardType.getTypeInfo = (arg0) => {
let tmp = dependencyMap2[arg0];
if (!tmp) {
tmp = dependencyMap[arg0];
}
return globalResult.clone(tmp);
};
creditCardType.removeCard = (arg0) => {
const index = arr.indexOf(arg0);
if (-1 === index) {
const _Error = Error;
const error = new Error("\"" + arg0 + "\" is not a supported card type.");
throw error;
} else {
arr.splice(index, 1);
}
};
creditCardType.addCard = (type) => {
closure_6[type.type] = type;
if (-1 === arr.indexOf(type.type)) {
arr = arr.push(type.type);
}
};
creditCardType.updateCard = (arg0, type) => {
let tmp = dependencyMap2[arg0];
if (!tmp) {
tmp = dependencyMap[arg0];
}
if (tmp) {
if (type.type) {
if (tmp.type !== type.type) {
const _Error2 = Error;
const error = new Error("Cannot overwrite type parameter.");
throw error;
}
}
const tmp11 = fn(fn({}, globalResult.clone(tmp)), type);
dependencyMap2[tmp11.type] = tmp11;
} else {
const _Error = Error;
const concat = "\"".concat;
const error1 = new Error("\"".concat(arg0, "\" is not a recognized type. Use `addCard` instead.'"));
throw error1;
}
};
creditCardType.changeOrder = (arg0, arg1) => {
const index = arr.indexOf(arg0);
if (-1 === index) {
const _Error = Error;
const error = new Error("\"" + arg0 + "\" is not a supported card type.");
throw error;
} else {
arr.splice(index, 1);
arr.splice(arg1, 0, arg0);
}
};
creditCardType.resetModifications = () => {
let closure_8 = globalResult.clone(items);
let closure_6 = {};
};
creditCardType.types = obj;
module.exports = creditCardType;
},
{ "./lib/add-matching-cards-to-results": 43, "./lib/card-types": 44, "./lib/clone": 45, "./lib/find-best-match": 46, "./lib/is-valid-input-type": 47 }
];
items42 = [
(arg0, arg1, arg2) => {
arg2.addMatchingCardsToResults = undefined;
let closure_0 = arg0("./clone");
let closure_1 = arg0("./matches");
arg2.addMatchingCardsToResults = function addMatchingCardsToResults(closure_0, patterns, items) {
let num = 0;
if (0 < patterns.patterns.length) {
while (!closure_1.matches(closure_0, patterns.patterns[num])) {
num = num + 1;
}
const cloneResult = closure_0.clone(patterns);
const _Array = Array;
const _String = String;
if (Array.isArray(patterns.patterns[num])) {
let length = _String(tmp[0]).length;
} else {
length = _String(tmp).length;
}
if (closure_0.length >= length) {
cloneResult.matchStrength = length;
}
items.push(cloneResult);
}
};
},
{ "./clone": 45, "./matches": 48 }
];
items43 = [
(arg0, arg1, arg2) => {
const items = [[51, 55], [2221, 2229], [223, 229], [23, 26], [270, 271], 2720];
const items1 = [[300, 305], 36, 38, 39];
const items2 = [6011, [644, 649], 65];
const items3 = [2131, 1800, [3528, 3589]];
const items4 = [620, [62100, 62182], [62184, 62187], [62185, 62197], [62200, 62205], [622010, 622999], 622018, [62207, 62209], [623, 626], 6270, 6272, 6276, [627700, 627779], [627781, 627799], [6282, 6289], 6291, 6292, 810, [8110, 8131], [8132, 8151], [8152, 8163], [8164, 8171]];
const items5 = [493698, [500000, 504174], [504176, 506698], [506779, 508999], [56, 59], 63, 67, 6];
const items6 = [401178, 401179, 438935, 457631, 457632, 431274, 451416, 457393, 504175, [506699, 506778], [509000, 509999], 627780, 636297, 636368, [650031, 650033], [650035, 650051], [650405, 650439], [650485, 650538], [650541, 650598], [650700, 650718], [650720, 650727], [650901, 650978], [651652, 651679], [655000, 655019], [655021, 655058]];
const items7 = [[2200, 2204]];
module.exports = { visa: { niceType: "Visa", type: "visa", patterns: [4], gaps: [4, 8, 12], lengths: [16, 18, 19], code: { name: "CVV", size: 3 } }, mastercard: { niceType: "Mastercard", type: "mastercard", patterns: items, gaps: [4, 8, 12], lengths: [16], code: { name: "CVC", size: 3 } }, "american-express": { niceType: "American Express", type: "american-express", patterns: [34, 37], gaps: [4, 10], lengths: [15], code: { name: "CID", size: 4 } }, "diners-club": { niceType: "Diners Club", type: "diners-club", patterns: items1, gaps: [4, 10], lengths: [14, 16, 19], code: { name: "CVV", size: 3 } }, discover: { niceType: "Discover", type: "discover", patterns: items2, gaps: [4, 8, 12], lengths: [16, 19], code: { name: "CID", size: 3 } }, jcb: { niceType: "JCB", type: "jcb", patterns: items3, gaps: [4, 8, 12], lengths: [16, 17, 18, 19], code: { name: "CVV", size: 3 } }, unionpay: { niceType: "UnionPay", type: "unionpay", patterns: items4, gaps: [4, 8, 12], lengths: [14, 15, 16, 17, 18, 19], code: { name: "CVN", size: 3 } }, maestro: { niceType: "Maestro", type: "maestro", patterns: items5, gaps: [4, 8, 12], lengths: [12, 13, 14, 15, 16, 17, 18, 19], code: { name: "CVC", size: 3 } }, elo: { niceType: "Elo", type: "elo", patterns: items6, gaps: [4, 8, 12], lengths: [16], code: { name: "CVE", size: 3 } }, mir: { niceType: "Mir", type: "mir", patterns: items7, gaps: [4, 8, 12], lengths: [16, 17, 18, 19], code: { name: "CVP2", size: 3 } }, hiper: { niceType: "Hiper", type: "hiper", patterns: [637095, 63737423, 63743358, 637568, 637599, 637609, 637612], gaps: [4, 8, 12], lengths: [16], code: { name: "CVC", size: 3 } }, hipercard: { niceType: "Hipercard", type: "hipercard", patterns: [606282], gaps: [4, 8, 12], lengths: [16], code: { name: "CVC", size: 3 } } };
},
{}
];
items44 = [
(arg0, arg1, arg2) => {
arg2.clone = function clone(arg0) {
let parsed = null;
if (arg0) {
const _JSON = JSON;
const _JSON2 = JSON;
parsed = JSON.parse(JSON.stringify(arg0));
}
return parsed;
};
},
{}
];
items45 = [
(arg0, arg1, arg2) => {
arg2.findBestMatch = function findBestMatch(arr) {
const length = arr.filter((matchStrength) => matchStrength.matchStrength).length;
let reduced = null;
if (tmp) {
reduced = arr.reduce((arg0, matchStrength) => {
let tmp = arg0;
let tmp2 = matchStrength;
if (arg0) {
const _Number = Number;
const _Number2 = Number;
if (NumberResult < Number(matchStrength.matchStrength)) {
tmp = matchStrength;
}
tmp2 = tmp;
NumberResult = Number(tmp.matchStrength);
}
return tmp2;
});
}
return reduced;
};
},
{}
];
items46 = [
(arg0, arg1, arg2) => {
arg2.isValidInputType = function isValidInputType(str) {
let tmp = typeof str === "string";
if (typeof str !== "string") {
const _String = String;
tmp = str instanceof String;
}
return tmp;
};
},
{}
];
items47 = [
(arg0, arg1, arg2) => {
arg2.matches = function matches(str) {
if (Array.isArray(arg1)) {
const first = arg1[0];
const _String2 = String;
const substr = str.substr(0, String(first).length);
const _parseInt = parseInt;
const parsed = parseInt(substr, 10);
const _parseInt2 = parseInt;
const _String3 = String;
const _parseInt3 = parseInt;
const _String4 = String;
const parsed1 = parseInt(String(first).substr(0, substr.length), 10);
const str2 = String(first);
const str3 = String(arg1[1]);
let tmp2 = parsed >= parsed1 && parsed <= parseInt(String(arg1[1]).substr(0, substr.length), 10);
const tmp6 = parsed >= parsed1 && parsed <= parseInt(String(arg1[1]).substr(0, substr.length), 10);
} else {
const _String = String;
str = String(arg1);
const substr1 = str.substring(0, str.length);
tmp2 = substr1 === str.substring(0, str.length);
}
return tmp2;
};
},
{}
];
items48 = [
(arg0, arg1, arg2) => {
arg2.Framebus = undefined;
let Framebus = arg0("./lib");
let _Promise = typeof window !== "undefined";
if (typeof window !== "undefined") {
let _window = window;
_Promise = window.Promise;
}
class Framebus {
constructor(arg0) {
obj = {};
obj = arg0;
if (undefined === arg0) {
obj = {};
}
obj.origin = obj.origin || "*";
obj.channel = obj.channel || "";
obj.verifyDomain = obj.verifyDomain;
obj.targetFrames = obj.targetFrames || [];
obj.limitBroadcastToFramesArray = Boolean(obj.targetFrames);
obj.isDestroyed = false;
obj.listeners = [];
limitBroadcastToFramesArray = obj.verifyDomain;
if (!limitBroadcastToFramesArray) {
limitBroadcastToFramesArray = obj.limitBroadcastToFramesArray;
}
obj.hasAdditionalChecksForOnListeners = Boolean(limitBroadcastToFramesArray);
return;
}
static setPromise(arg0) {
Framebus.Promise = arg0;
return;
}
static target(arg0) {
obj = arg0;
obj = Object.create(Framebus.prototype);
obj1 = {};
if (undefined === arg0) {
obj = {};
}
obj1.origin = obj.origin || "*";
obj1.channel = obj.channel || "";
obj1.verifyDomain = obj.verifyDomain;
obj1.targetFrames = obj.targetFrames || [];
obj1.limitBroadcastToFramesArray = Boolean(obj.targetFrames);
obj1.isDestroyed = false;
obj1.listeners = [];
limitBroadcastToFramesArray = obj1.verifyDomain;
if (!limitBroadcastToFramesArray) {
limitBroadcastToFramesArray = obj1.limitBroadcastToFramesArray;
}
obj1.hasAdditionalChecksForOnListeners = Boolean(limitBroadcastToFramesArray);
return obj1;
}
addTargetFrame(arg0) {
if (this.limitBroadcastToFramesArray) {
tmp2 = arg0;
targetFrames = tmp.targetFrames;
arr = targetFrames.push(arg0);
}
return;
}
include(arg0) {
tmp = null != arg0;
if (tmp) {
tmp2 = null != arg0.Window;
if (tmp2) {
flag = arg0.constructor === arg0.Window;
if (flag) {
tmp3 = Framebus;
childWindows = Framebus.childWindows;
arr = childWindows.push(arg0);
flag = true;
}
tmp2 = flag;
}
tmp = tmp2;
}
return tmp;
}
target(arg0) {
return Framebus.target(arg0);
}
emit(arg0, arg1, arg2) {
self = this;
if (this.isDestroyed) {
flag4 = false;
return false;
} else {
tmp = arg0;
origin = self.origin;
namespaceEventResult = self.namespaceEvent(arg0);
obj = origin;
if (origin.isntString(namespaceEventResult)) {
flag3 = false;
return false;
} else if (obj.isntString(origin)) {
flag2 = false;
return false;
} else {
tmp3 = arg1;
tmp4 = arg2;
tmp5 = arg1;
if (typeof arg1 === "function") {
tmp4 = arg1;
}
tmp6 = namespaceEventResult;
tmp7 = origin;
tmp8 = tmp5;
tmp9 = tmp4;
packagePayloadResult = obj.packagePayload(namespaceEventResult, origin, tmp5, tmp4);
c1 = packagePayloadResult;
flag = packagePayloadResult;
if (flag) {
if (self.limitBroadcastToFramesArray) {
result = self.targetFramesAsWindows();
item = result.forEach(() => { ... });
flag = true;
} else {
obj = { origin: null, frame: null };
obj[0] = origin;
tmp11 = globalThis;
_window = window;
_self = window.top;
if (!_self) {
_window2 = window;
_self = window.self;
}
obj[1] = _self;
broadcastResult = obj.broadcast(packagePayloadResult, obj);
flag = true;
}
}
return flag;
}
}
}
emitAsPromise(arg0, arg1) {
closure_0 = arg0;
closure_1 = arg1;
self = this;
promise = new closure_0.Promise(() => { ... });
return promise;
}
on(arg0, arg1) {
self = this;
closure_0 = arg1;
if (this.isDestroyed) {
flag2 = false;
return false;
} else {
tmp = arg0;
origin = self.origin;
namespaceEventResult = self.namespaceEvent(arg0);
tmp3 = closure_0;
result = closure_0.subscriptionArgsInvalid(namespaceEventResult, arg1, origin);
flag = !result;
if (!result) {
fn = arg1;
if (self.hasAdditionalChecksForOnListeners) {
fn = function d() { ... };
}
listeners = self.listeners;
obj = { eventName: null, handler: null, originalHandler: null };
obj[0] = namespaceEventResult;
obj[1] = fn;
obj[2] = arg1;
arr = listeners.push(obj);
obj = tmp3.subscribers[origin];
if (!obj) {
obj = {};
}
tmp3.subscribers[origin] = obj;
items = tmp3.subscribers[origin][namespaceEventResult];
if (!items) {
items = [];
}
tmp3.subscribers[origin][namespaceEventResult] = items;
arr3 = tmp3.subscribers[origin][namespaceEventResult];
arr1 = arr3.push(fn);
flag = true;
}
return flag;
}
}
off(arg0, arg1) {
self = this;
if (this.isDestroyed) {
flag5 = false;
return false;
} else {
tmp = arg1;
tmp2 = arg1;
if (self.verifyDomain) {
num = 0;
num2 = 1;
tmp3 = arg1;
tmp2 = arg1;
if (0 < self.listeners.length) {
do {
tmp4 = self.listeners[num];
tmp5 = num;
handler = tmp3;
if (tmp4.originalHandler === arg1) {
handler = tmp4.handler;
}
num = num + 1;
tmp3 = handler;
tmp2 = handler;
} while (num < self.listeners.length);
}
}
tmp6 = arg0;
namespaceEventResult = self.namespaceEvent(arg0);
origin = self.origin;
tmp8 = Framebus;
if (Framebus.subscriptionArgsInvalid(namespaceEventResult, tmp2, origin)) {
flag4 = false;
return false;
} else {
arr = tmp8.subscribers[origin] && tmp8.subscribers[origin][namespaceEventResult];
if (arr) {
num3 = 0;
num4 = 1;
if (0 < arr.length) {
tmp9 = num3;
while (arr[num3] !== tmp2) {
num3 = num3 + 1;
}
spliceResult = arr.splice(num3, 1);
flag3 = true;
return true;
}
flag2 = false;
return false;
} else {
flag = false;
return false;
}
}
}
}
teardown() {
self = this;
if (!this.isDestroyed) {
flag = true;
self.isDestroyed = true;
num = 0;
num2 = 1;
num3 = 0;
if (0 < self.listeners.length) {
do {
tmp = self.listeners[num3];
offResult = self.off(tmp.eventName, tmp.handler);
num3 = num3 + 1;
length = self.listeners.length;
} while (num3 < length);
}
self.listeners.length = 0;
}
return;
}
passesVerifyDomainCheck(arg0) {
self = this;
verifyDomain = this.verifyDomain;
checkOriginResult = !verifyDomain;
if (verifyDomain) {
tmp2 = arg0;
checkOriginResult = self.checkOrigin(arg0);
}
return checkOriginResult;
}
targetFramesAsWindows() {
if (this.limitBroadcastToFramesArray) {
targetFrames = this.targetFrames;
mapped = targetFrames.map(() => { ... });
found = mapped.filter(/* F119337 */ function() { ... });
} else {
found = [];
}
return found;
}
hasMatchingTargetFrame(arg0) {
self = this;
closure_0 = arg0;
if (this.limitBroadcastToFramesArray) {
result = self.targetFramesAsWindows();
tmp = globalThis;
_Boolean = Boolean;
return Boolean(result.find(/* F119338 */ function() { ... }));
} else {
flag = true;
return true;
}
}
checkOrigin(arg0) {
url = document.createElement("a");
url.href = location.href;
if ("https:" === url.protocol) {
str4 = url.host;
str5 = "";
host = str4.replace(/:443$/, "");
} else {
str = "http:";
if ("http:" === url.protocol) {
str2 = url.host;
str3 = "";
host = str2.replace(/:80$/, "");
} else {
host = url.host;
}
}
tmp = `${url.protocol}//${host}` === arg0;
if (!tmp) {
self = this;
verifyDomain = this.verifyDomain;
verifyDomainResult = !verifyDomain;
if (verifyDomain) {
verifyDomainResult = self.verifyDomain(arg0);
}
tmp = verifyDomainResult;
}
return tmp;
}
namespaceEvent(arg0) {
combined1 = arg0;
if (this.channel) {
str = "";
concat = "".concat;
str2 = ":";
combined = "".concat(tmp.channel, ":");
combined1 = combined.concat(arg0);
}
return combined1;
}
}
Framebus.Promise = _Promise;
arg2.Framebus = Framebus;
},
{ "./lib": 57 }
];
items49 = [
(arg0, arg1, arg2) => {
const globalResult = global("./lib");
globalResult.attach();
module.exports = global("./framebus").Framebus;
},
{ "./framebus": 49, "./lib": 57 }
];
items50 = [
(arg0, arg1, arg2) => {
arg2.attach = undefined;
arg2.detach = undefined;
let closure_0 = arg0("./");
let c1 = false;
arg2.attach = function attach() {
let tmp = c1;
if (!c1) {
const _window = window;
tmp = typeof window === "undefined";
}
if (!tmp) {
c1 = true;
const _window2 = window;
const listener = window.addEventListener("message", closure_0.onMessage, false);
}
};
arg2.detach = function detach() {
let c1 = false;
const removed = window.removeEventListener("message", closure_0.onMessage, false);
};
},
{ "./": 57 }
];
items51 = [
(arg0, arg1, arg2) => {
arg2.broadcastToChildWindows = undefined;
let closure_0 = arg0("./");
arg2.broadcastToChildWindows = function broadcastToChildWindows(data, origin, source) {
let diff = closure_0.childWindows.length - 1;
if (0 <= diff) {
do {
let obj = closure_0;
let tmp2 = closure_0.childWindows[diff];
let tmp3 = diff;
if (tmp2.closed) {
let childWindows = obj.childWindows;
let spliceResult = childWindows.splice(diff, 1);
} else if (source !== tmp2) {
obj = { origin: null, frame: null };
obj[0] = origin;
obj[1] = tmp2.top;
let broadcastResult = obj.broadcast(data, obj);
}
diff = diff - 1;
} while (0 <= diff);
}
};
},
{ "./": 57 }
];
items52 = [
(arg0, arg1, arg2) => {
arg2.broadcast = undefined;
let closure_0 = arg0("./");
function broadcast(packagePayloadResult, arg1) {
let frame;
let origin;
let num = 0;
({ origin, frame } = arg1);
try {
frame.postMessage(packagePayloadResult, origin);
let hasOpenerResult = closure_0.hasOpener(frame);
if (hasOpenerResult) {
const _window = window;
hasOpenerResult = frame.opener.top !== window.top;
}
if (hasOpenerResult) {
let obj = { origin: null, frame: null };
obj[0] = origin;
obj[1] = frame.opener.top;
broadcast(packagePayloadResult, obj);
}
let tmp10 = tmp9;
if (frame.frames[num]) {
do {
let tmp11 = broadcast;
obj = { origin: null, frame: null };
obj[0] = origin;
let tmp12 = tmp10;
obj[1] = tmp10;
let tmp13 = broadcast(packagePayloadResult, obj);
let tmp14 = num;
let sum = num + 1;
num = sum;
tmp10 = frame.frames[sum];
} while (tmp16);
}
} catch (err) {
}
}
arg2.broadcast = broadcast;
},
{ "./": 57 }
];
items53 = [
(arg0, arg1, arg2) => {
arg2.prefix = undefined;
arg2.childWindows = undefined;
arg2.subscribers = undefined;
arg2.prefix = "/*framebus*/";
arg2.childWindows = [];
arg2.subscribers = {};
},
{}
];
items54 = [
(arg0, arg1, arg2) => {
arg2.dispatch = undefined;
let closure_0 = arg0("./");
arg2.dispatch = function dispatch(arg0, arg1, arg2, arg3, arg4) {
let length;
if (closure_0.subscribers[arg0]) {
if (tmp.subscribers[arg0][arg1]) {
const items = [];
if (arg2) {
items.push(arg2);
}
if (arg3) {
items.push(arg3);
}
let num = 0;
if (0 < tmp.subscribers[arg0][arg1].length) {
do {
let tmp7 = closure_0;
let obj = closure_0.subscribers[arg0][arg1][num];
let applyResult = obj.apply(arg4, items);
num = num + 1;
length = closure_0.subscribers[arg0][arg1].length;
} while (num < length);
}
}
}
};
},
{ "./": 57 }
];
items55 = [
(arg0, arg1, arg2) => {
arg2.hasOpener = function hasOpener(frame) {
let tmp = frame.top === frame;
if (tmp) {
let tmp3 = null != frame.opener;
if (tmp3) {
let tmp4 = frame.opener !== frame;
if (tmp4) {
tmp4 = true !== frame.opener.closed;
}
tmp3 = tmp4;
}
tmp = tmp3;
}
return tmp;
};
},
{}
];
items56 = [
function(arg0, arg1, arg2) {
const self = this;
let self2 = this;
if (this) {
self2 = self.__createBinding;
}
if (self2) {
let fn = self;
if (self) {
fn = self.__exportStar;
}
if (!fn) {
fn = (obj, arg1) => {
for (const key10007 in arg0) {
let tmp5 = key10007;
let tmp6 = "default" === key10007;
if (tmp6) {
if (tmp6) {
continue;
} else {
let tmp3 = self2;
let tmp4 = self2(arg1, arg0, key10007);
continue;
}
continue;
} else {
let _Object = Object;
let call = hasOwnProperty.call;
if (typeof call === "unknown") {
let hasOwnPropertyResult = hasOwnProperty(key10007);
} else {
hasOwnPropertyResult = call(arg1, key10007);
}
let tmp2 = hasOwnPropertyResult;
}
}
};
}
const _Object2 = Object;
fn(arg0("./attach"), arg2);
fn(arg0("./broadcast-to-child-windows"), arg2);
fn(arg0("./broadcast"), arg2);
fn(arg0("./constants"), arg2);
fn(arg0("./dispatch"), arg2);
fn(arg0("./has-opener"), arg2);
fn(arg0("./is-not-string"), arg2);
fn(arg0("./message"), arg2);
fn(arg0("./package-payload"), arg2);
fn(arg0("./send-message"), arg2);
fn(arg0("./subscribe-replier"), arg2);
fn(arg0("./subscription-args-invalid"), arg2);
fn(arg0("./types"), arg2);
fn(arg0("./unpack-payload"), arg2);
} else {
let _Object = Object;
}
},
{ "./attach": 51, "./broadcast": 53, "./broadcast-to-child-windows": 52, "./constants": 54, "./dispatch": 55, "./has-opener": 56, "./is-not-string": 58, "./message": 59, "./package-payload": 60, "./send-message": 61, "./subscribe-replier": 62, "./subscription-args-invalid": 63, "./types": 64, "./unpack-payload": 65 }
];
items57 = [
(arg0, arg1, arg2) => {
arg2.isntString = function isntString(data) {
return typeof data !== "string";
};
},
{}
];
items58 = [
(arg0, arg1, arg2) => {
arg2.onMessage = undefined;
let closure_0 = arg0("./");
arg2.onMessage = function onMessage(data) {
let eventData;
let reply;
if (!closure_0.isntString(data.data)) {
const unpackPayloadResult = obj.unpackPayload(data);
if (unpackPayloadResult) {
({ eventData, reply } = unpackPayloadResult);
obj.dispatch("*", unpackPayloadResult.event, eventData, reply, data);
obj.dispatch(data.origin, unpackPayloadResult.event, eventData, reply, data);
const result = obj.broadcastToChildWindows(data.data, unpackPayloadResult.origin, data.source);
}
}
};
},
{ "./": 57 }
];
items59 = [
(arg0, arg1, arg2) => {
arg2.packagePayload = undefined;
let closure_0 = arg0("./");
arg2.packagePayload = function packagePayload(namespaceEventResult, closure_0, eventData, fn) {
const obj = { event: namespaceEventResult, origin: closure_0 };
if (typeof fn === "function") {
obj.reply = closure_0.subscribeReplier(fn, closure_0);
}
obj.eventData = eventData;
try {
const _JSON = JSON;
return closure_0.prefix + JSON.stringify(obj);
} catch (tmp3) {
const _Error = Error;
const concat = "Could not stringify event: ".concat;
const error = new Error("Could not stringify event: ".concat(tmp3.message));
throw error;
}
};
},
{ "./": 57 }
];
items60 = [
(arg0, arg1, arg2) => {
arg2.sendMessage = function sendMessage(postMessage) {
try {
postMessage.postMessage(arg1, arg2);
} catch (err) {
}
};
},
{}
];
items61 = [
function(arg0, arg1, arg2) {
let fn = this;
if (this) {
fn = this.__importDefault;
}
if (!fn) {
fn = (__esModule) => {
if (!__esModule) {
const obj = { default: null };
obj[0] = __esModule;
let tmp = obj;
} else {
tmp = __esModule;
}
return tmp;
};
}
arg2.subscribeReplier = undefined;
let closure_0 = arg0("../framebus");
let closure_1 = fn(arg0("@braintree/uuid"));
arg2.subscribeReplier = function subscribeReplier(fn, origin) {
let Framebus = fn;
let closure_1 = origin;
const defaultResult = closure_1.default();
let closure_2 = defaultResult;
Framebus = Framebus.Framebus;
function replier(arg0, arg1) {
lib(arg0, arg1);
const Framebus = lib.Framebus;
Framebus.target({ origin: closure_1 }).off(closure_2, replier);
}
Framebus.target({ origin }).on(defaultResult, replier);
return defaultResult;
};
},
{ "../framebus": 49, "@braintree/uuid": 66 }
];
items62 = [
(arg0, arg1, arg2) => {
arg2.subscriptionArgsInvalid = undefined;
let closure_0 = arg0("./");
arg2.subscriptionArgsInvalid = function subscriptionArgsInvalid(namespaceEventResult, fn, origin) {
let isntStringResult = closure_0.isntString(namespaceEventResult);
if (!isntStringResult) {
isntStringResult = typeof fn !== "function";
if (typeof fn === "function") {
isntStringResult = closure_0.isntString(origin);
}
}
return isntStringResult;
};
},
{ "./": 57 }
];
items63 = [
(arg0, arg1, arg2) => {
},
{}
];
items64 = [
(arg0, arg1, arg2) => {
arg2.unpackPayload = undefined;
let closure_0 = arg0("./");
arg2.unpackPayload = function unpackPayload(data) {
let closure_0;
let closure_1;
data = data.data;
if (data.slice(0, closure_0.prefix.length) !== closure_0.prefix) {
return false;
} else {
try {
const _JSON = JSON;
const data1 = data.data;
const parsed = JSON.parse(data1.slice(closure_0.prefix.length));
if (parsed.reply) {
({ origin: closure_0, source: closure_1 } = data);
const reply = parsed.reply;
parsed.reply = function reply(eventData) {
if (closure_1) {
const packagePayloadResult = outer1_0.packagePayload(reply, closure_0, eventData);
if (packagePayloadResult) {
closure_1.postMessage(packagePayloadResult, tmp4);
}
tmp4 = closure_0;
}
};
}
return parsed;
} catch (err) {
return false;
}
}
};
},
{ "./": 57 }
];
items65 = [
(arg0, arg1, arg2) => {
module.exports = function uuid() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (arg0) => {
const tmp = 16 * Math.random() | 0;
let str = tmp;
if ("x" !== arg0) {
str = 3 & tmp | 8;
}
return str.toString(16);
});
};
},
{}
];
items66 = [
(arg0, arg1, arg2) => {
arg2.isKitKatWebview = undefined;
arg2.isAndroidChrome = undefined;
arg2.isSamsungBrowser = undefined;
arg2.isIE9 = undefined;
arg2.isIos = undefined;
let userAgent = typeof window !== "undefined";
if (typeof window !== "undefined") {
const _window2 = window;
userAgent = window.navigator;
}
if (userAgent) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let closure_1 = arg0("@braintree/browser-detection/is-android");
let closure_2 = arg0("@braintree/browser-detection/is-chrome-os");
let closure_3 = arg0("@braintree/browser-detection/is-chrome");
arg2.isIos = arg0("@braintree/browser-detection/is-ios");
arg2.isIE9 = arg0("@braintree/browser-detection/is-ie9");
const re4 = /Version\/\d\.\d* Chrome\/\d*\.0\.0\.0/;
arg2.isKitKatWebview = function isKitKatWebview(arg0) {
let tmp = arg0;
if (undefined === arg0) {
tmp = userAgent;
}
let isMatch = callback(tmp);
if (isMatch) {
isMatch = regex.test(tmp);
}
return isMatch;
};
arg2.isAndroidChrome = function isAndroidChrome(arg0) {
let tmp = arg0;
if (undefined === arg0) {
tmp = userAgent;
}
let tmp2 = callback(tmp);
if (!tmp2) {
tmp2 = callback2(tmp);
}
if (tmp2) {
tmp2 = callback3(tmp);
}
return tmp2;
};
arg2.isSamsungBrowser = function isSamsungBrowser(arg0) {
let arr = arg0;
if (undefined === arg0) {
arr = userAgent;
}
let isMatch = /SamsungBrowser/.test(arr);
if (!isMatch) {
const tmp3 = callback3(arr);
let tmp4 = !tmp3;
if (!tmp3) {
tmp4 = arr.indexOf("Samsung") > -1;
}
isMatch = tmp4;
}
return isMatch;
};
},
{ "@braintree/browser-detection/is-android": 80, "@braintree/browser-detection/is-chrome": 82, "@braintree/browser-detection/is-chrome-os": 81, "@braintree/browser-detection/is-ie9": 83, "@braintree/browser-detection/is-ios": 84 }
];
items67 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./lib/device");
module.exports = function supportsInputFormatting() {
return !samsungBrowser.isSamsungBrowser();
};
},
{ "./lib/device": 67 }
];
items68 = [
(arg0, arg1, arg2) => {
const first = arguments[4][3][0];
first(...arguments);
},
{ dup: 3 }
];
items69 = [
(arg0, arg1, arg2) => {
const first = arguments[4][4][0];
first(...arguments);
},
{ dup: 4 }
];
items70 = [
(arg0, arg1, arg2) => {
const first = arguments[4][5][0];
first(...arguments);
},
{ "./is-duckduckgo": 72, "./is-edge": 73, "./is-opera": 77, "./is-samsung": 78, "./is-silk": 79, dup: 5 }
];
items71 = [
(arg0, arg1, arg2) => {
const first = arguments[4][6][0];
first(...arguments);
},
{ dup: 6 }
];
items72 = [
(arg0, arg1, arg2) => {
const first = arguments[4][7][0];
first(...arguments);
},
{ dup: 7 }
];
items73 = [
(arg0, arg1, arg2) => {
module.exports = function isIe9(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return -1 !== userAgent.indexOf("MSIE 9");
};
},
{}
];
items74 = [
(arg0, arg1, arg2) => {
const first = arguments[4][14][0];
first(...arguments);
},
{ "./is-ipados": 76, dup: 14 }
];
items75 = [
(arg0, arg1, arg2) => {
const first = arguments[4][15][0];
first(...arguments);
},
{ dup: 15 }
];
items76 = [
(arg0, arg1, arg2) => {
const first = arguments[4][16][0];
first(...arguments);
},
{ dup: 16 }
];
items77 = [
(arg0, arg1, arg2) => {
const first = arguments[4][17][0];
first(...arguments);
},
{ dup: 17 }
];
items78 = [
(arg0, arg1, arg2) => {
const first = arguments[4][18][0];
first(...arguments);
},
{ dup: 18 }
];
items79 = [
(arg0, arg1, arg2) => {
const first = arguments[4][20][0];
first(...arguments);
},
{ "./dist/is-android": 69, dup: 20 }
];
items80 = [
(arg0, arg1, arg2) => {
const first = arguments[4][21][0];
first(...arguments);
},
{ "./dist/is-chrome-os": 70, dup: 21 }
];
items81 = [
(arg0, arg1, arg2) => {
const first = arguments[4][22][0];
first(...arguments);
},
{ "./dist/is-chrome": 71, dup: 22 }
];
items82 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ie9");
},
{ "./dist/is-ie9": 74 }
];
items83 = [
(arg0, arg1, arg2) => {
const first = arguments[4][27][0];
first(...arguments);
},
{ "./dist/is-ios": 75, dup: 27 }
];
items84 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/supports-input-formatting");
},
{ "./dist/supports-input-formatting": 68 }
];
items85 = [
(arg0, arg1, arg2) => {
class AmericanExpress {
constructor(arg0) {
this._client = global.client;
return;
}
getRewardsBalance(arg0) {
nonce = global.nonce;
if (nonce) {
self = this;
tmp12 = assign;
obj = { _meta: null, paymentMethodNonce: null };
obj[0] = { source: "american-express" };
obj[1] = nonce;
str = "nonce";
tmp13 = assign(obj, global);
delete tmp2[tmp];
_client = this._client;
obj1 = { method: "get", endpoint: "payment_methods/amex_rewards_balance", data: null };
obj1[2] = tmp13;
requestResult = _client.request(obj1);
catchPromise = requestResult.catch(() => { ... });
} else {
tmp3 = globalThis;
_Promise = Promise;
tmp4 = c0;
obj = { type: null, code: null, message: "getRewardsBalance must be called with a nonce." };
tmp5 = c1;
obj[0] = c1.AMEX_NONCE_REQUIRED.type;
obj[1] = c1.AMEX_NONCE_REQUIRED.code;
tmp6 = new.target;
tmp7 = new.target;
tmp8 = obj;
tmp9 = new c0(obj);
tmp10 = tmp9;
catchPromise = Promise.reject(tmp9);
}
return catchPromise;
}
getExpressCheckoutProfile(arg0) {
if (global.nonce) {
self = this;
_client = this._client;
obj = { method: "get", endpoint: null, data: null };
str = "payment_methods/amex_express_checkout_cards/";
obj[1] = `payment_methods/amex_express_checkout_cards/${global.nonce}`;
obj1 = { _meta: null, paymentMethodNonce: null };
obj1[0] = { source: "american-express" };
obj1[1] = global.nonce;
obj[2] = obj1;
requestResult = _client.request(obj);
catchPromise = requestResult.catch(() => { ... });
} else {
tmp = globalThis;
_Promise = Promise;
tmp2 = c0;
obj = { type: null, code: null, message: "getExpressCheckoutProfile must be called with a nonce." };
tmp3 = c1;
obj[0] = c1.AMEX_NONCE_REQUIRED.type;
obj[1] = c1.AMEX_NONCE_REQUIRED.code;
tmp4 = new.target;
tmp5 = new.target;
tmp6 = obj;
tmp7 = new c0(obj);
tmp8 = tmp7;
catchPromise = Promise.reject(tmp7);
}
return catchPromise;
}
teardown() {
tmp = c4(this, c3(AmericanExpress.prototype));
return Promise.resolve();
}
}
let closure_0 = global("../lib/braintree-error");
let closure_1 = global("./errors");
const assign = global("../lib/assign").assign;
let closure_3 = global("../lib/methods");
let closure_4 = global("../lib/convert-methods-to-error");
module.exports = global("@braintree/wrap-promise").wrapPrototype(AmericanExpress);
},
{ "../lib/assign": 140, "../lib/braintree-error": 143, "../lib/convert-methods-to-error": 146, "../lib/methods": 175, "./errors": 87, "@braintree/wrap-promise": 40 }
];
items86 = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
let obj = { type: globalResult.types.MERCHANT, code: "AMEX_NONCE_REQUIRED" };
obj = { type: globalResult.types.NETWORK, code: "AMEX_NETWORK_ERROR" };
module.exports = { AMEX_NONCE_REQUIRED: obj, AMEX_NETWORK_ERROR: obj };
},
{ "../lib/braintree-error": 143 }
];
items87 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./american-express");
let closure_1 = global("../lib/basic-component-verification");
let closure_2 = global("../lib/create-deferred-client");
let closure_3 = global("../lib/create-assets-url");
module.exports = {
create: global("@braintree/wrap-promise")(function create(client) {
let closure_0 = client;
const obj = { name: "American Express", client: client.client, authorization: client.authorization };
const verifyResult = closure_1.verify({ name: "American Express", client: client.client, authorization: client.authorization });
return closure_1.verify({ name: "American Express", client: client.client, authorization: client.authorization }).then(() => outer1_2.create({ authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: outer1_3.create(client.authorization), name: "American Express" })).then((client) => {
closure_0.client = client;
return new closure_0(closure_0);
});
}),
VERSION: "3.112.1"
};
},
{ "../lib/basic-component-verification": 141, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "./american-express": 86, "@braintree/wrap-promise": 40 }
];
items88 = [
(arg0, arg1, arg2) => {
class ApplePay {
constructor(arg0) {
obj = { _instantiatedWithClient: Boolean(!global.useDeferredClient), _client: global.client, _createPromise: global.createPromise };
if (obj._client) {
result = obj._setMerchantIdentifier();
}
return;
}
_waitForClient() {
self = this;
if (this._client) {
tmp2 = globalThis;
_Promise = Promise;
resolved = Promise.resolve();
} else {
_createPromise = self._createPromise;
fn = () => { ... };
resolved = _createPromise.then(fn.bind(self));
}
return resolved;
}
_setMerchantIdentifier() {
_client = this._client;
applePayWeb = _client.getConfiguration().gatewayConfiguration.applePayWeb;
if (applePayWeb) {
tmp = globalThis;
_Object = Object;
obj = { value: null, configurable: false, writable: false };
obj[0] = applePayWeb.merchantIdentifier;
str = "merchantIdentifier";
definePropertyResult = Object.defineProperty(this, "merchantIdentifier", obj);
}
return;
}
createPaymentRequest(arg0) {
self = this;
closure_0 = global;
if (this._instantiatedWithClient) {
result = self._createPaymentRequestSynchronously(global);
} else {
_waitForClientResult = self._waitForClient();
fn = () => { ... };
result = _waitForClientResult.then(fn.bind(self));
}
return result;
}
_createPaymentRequestSynchronously(arg0) {
_client = this._client;
applePayWeb = _client.getConfiguration().gatewayConfiguration.applePayWeb;
obj = { countryCode: applePayWeb.countryCode, currencyCode: applePayWeb.currencyCode, merchantCapabilities: tmp, supportedNetworks: supportedNetworks.map(/* F115659 */ function() { ... }) };
tmp = applePayWeb.merchantCapabilities || ["supports3DS"];
supportedNetworks = applePayWeb.supportedNetworks;
return Object.assign({}, obj, global);
}
performValidation(arg0) {
self = this;
closure_0 = global;
self = this;
if (global) {
if (global.validationURL) {
_waitForClientResult = self._waitForClient();
nextPromise = _waitForClientResult.then(() => { ... });
nextPromise1 = nextPromise.then(() => { ... });
catchPromise = nextPromise1.catch(() => { ... });
}
return catchPromise;
}
tmp = new closure_0(c2.APPLE_PAY_VALIDATION_URL_REQUIRED);
catchPromise = Promise.reject(tmp);
return;
}
tokenize(arg0) {
self = this;
closure_0 = global;
self = this;
if (global.token) {
_waitForClientResult = self._waitForClient();
nextPromise = _waitForClientResult.then(() => { ... });
nextPromise1 = nextPromise.then(() => { ... });
catchPromise = nextPromise1.catch(() => { ... });
} else {
tmp = globalThis;
_Promise = Promise;
tmp2 = closure_0;
tmp3 = c2;
tmp4 = new.target;
tmp5 = new.target;
tmp6 = new closure_0(c2.APPLE_PAY_PAYMENT_TOKEN_REQUIRED);
tmp7 = tmp6;
catchPromise = Promise.reject(tmp6);
}
return catchPromise;
}
teardown() {
tmp = c4(this, c3(ApplePay.prototype));
return Promise.resolve();
}
}
let closure_0 = global("../lib/braintree-error");
let closure_1 = global("../lib/analytics");
let closure_2 = global("./errors");
let closure_3 = global("../lib/methods");
let closure_4 = global("../lib/convert-methods-to-error");
module.exports = global("@braintree/wrap-promise").wrapPrototype(ApplePay);
},
{ "../lib/analytics": 138, "../lib/braintree-error": 143, "../lib/convert-methods-to-error": 146, "../lib/methods": 175, "./errors": 90, "@braintree/wrap-promise": 40 }
];
items89 = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
let obj = { type: globalResult.types.MERCHANT, code: "APPLE_PAY_NOT_ENABLED", message: "Apple Pay is not enabled for this merchant." };
obj = { type: globalResult.types.MERCHANT, code: "APPLE_PAY_VALIDATION_URL_REQUIRED", message: "performValidation must be called with a validationURL." };
obj = { type: globalResult.types.NETWORK, code: "APPLE_PAY_MERCHANT_VALIDATION_NETWORK", message: "A network error occurred when validating the Apple Pay merchant." };
module.exports = { APPLE_PAY_NOT_ENABLED: obj, APPLE_PAY_VALIDATION_URL_REQUIRED: obj, APPLE_PAY_MERCHANT_VALIDATION_NETWORK: obj, APPLE_PAY_MERCHANT_VALIDATION_FAILED: { type: globalResult.types.MERCHANT, code: "APPLE_PAY_MERCHANT_VALIDATION_FAILED", message: "Make sure you have registered your domain name in the Braintree Control Panel." }, APPLE_PAY_PAYMENT_TOKEN_REQUIRED: { type: globalResult.types.MERCHANT, code: "APPLE_PAY_PAYMENT_TOKEN_REQUIRED", message: "tokenize must be called with a payment token." }, APPLE_PAY_TOKENIZATION: { type: globalResult.types.NETWORK, code: "APPLE_PAY_TOKENIZATION", message: "A network error occurred when processing the Apple Pay payment." } };
},
{ "../lib/braintree-error": 143 }
];
items90 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./apple-pay");
let closure_1 = global("../lib/analytics");
let closure_2 = global("../lib/braintree-error");
let closure_3 = global("../lib/basic-component-verification");
let closure_4 = global("../lib/create-assets-url");
let closure_5 = global("../lib/create-deferred-client");
let closure_6 = global("./errors");
module.exports = {
create: global("@braintree/wrap-promise")(function create(client) {
let closure_0 = client;
return closure_3.verify({ name: "Apple Pay", client: client.client, authorization: client.authorization }).then(() => {
let obj = { authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: outer1_4.create(client.authorization), name: "Apple Pay" };
obj = outer1_5.create(obj);
const nextPromise = obj.then((getConfiguration) => {
if (getConfiguration.getConfiguration().gatewayConfiguration.applePayWeb) {
closure_1.sendEvent(getConfiguration, "applepay.initialized");
let rejectResult = getConfiguration;
} else {
const tmp6 = new closure_2(constants.APPLE_PAY_NOT_ENABLED);
rejectResult = Promise.reject(tmp6);
}
return rejectResult;
});
client.createPromise = nextPromise;
const tmp = new client(client);
let nextPromise1 = tmp;
client = tmp;
if (!client.useDeferredClient) {
nextPromise1 = nextPromise.then((_client) => {
closure_0._client = _client;
return closure_0;
});
}
return nextPromise1;
});
}),
VERSION: "3.112.1"
};
},
{ "../lib/analytics": 138, "../lib/basic-component-verification": 141, "../lib/braintree-error": 143, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "./apple-pay": 89, "./errors": 90, "@braintree/wrap-promise": 40 }
];
items91 = [
(arg0, arg1, arg2) => {
class Client {
constructor(arg0) {
obj = {};
obj = global;
if (!global) {
obj = {};
}
stringify = JSON.stringify(obj);
gatewayConfiguration = obj.gatewayConfiguration;
if (gatewayConfiguration) {
items = ["assetsUrl", "clientApiUrl", "configUrl"];
item = items.forEach((arg0) => {
if (arg0 in gatewayConfiguration) {
if (!outer1_3(tmp[arg0])) {
const obj = { type: null, code: null, message: null };
obj[0] = outer1_13.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type;
obj[1] = outer1_13.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code;
obj[2] = `${arg0} property is on an invalid domain.`;
const tmp8 = new outer1_4(obj);
throw tmp8;
}
}
});
obj.getConfiguration = () => JSON.parse(closure_0);
tmp8 = c2;
obj._request = c2;
obj._configuration = obj.getConfiguration();
str = "/v1/";
obj._clientApiBaseUrl = `${gatewayConfiguration.clientApiUrl}/v1/`;
if (gatewayConfiguration.graphQL) {
tmp9 = c3;
if (c3(gatewayConfiguration.graphQL.url)) {
tmp17 = gatewayConfiguration;
obj1 = { graphQL: null };
obj1[0] = gatewayConfiguration.graphQL;
tmp18 = new.target;
tmp19 = new.target;
tmp20 = obj1;
tmp21 = new gatewayConfiguration(obj1);
tmp22 = tmp21;
obj._graphQL = tmp21;
} else {
tmp10 = c4;
obj2 = { type: null, code: null, message: "graphQL.url property is on an invalid domain." };
tmp11 = c13;
obj2[0] = c13.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type;
obj2[1] = c13.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code;
tmp12 = new.target;
tmp13 = new.target;
tmp14 = obj2;
tmp15 = new c4(obj2);
tmp16 = tmp15;
throw tmp15;
}
}
return;
} else {
tmp = c4;
tmp2 = c13;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = new c4(c13.CLIENT_MISSING_GATEWAY_CONFIGURATION);
tmp6 = tmp5;
throw tmp5;
}
}
static initialize(arg0) {
closure_0 = global;
tmp = FRAUDNET_URL[global.authorization];
if (tmp) {
tmp16 = c12;
str2 = "custom.client.load.cached";
sendEventResult = c12.sendEvent(tmp, "custom.client.load.cached");
return tmp;
} else {
try {
tmp2 = c7;
tmp3 = c7(global.authorization);
tmp4 = getConfiguration;
tmp5 = tmp3;
promise = getConfiguration(tmp3, global.sessionId);
nextPromise = promise.then((arg0) => {
if (authorization.debug) {
arg0.isDebug = true;
}
arg0.authorization = authorization.authorization;
const obj = Object.create(outer1_23.prototype);
new outer1_23(arg0);
return obj;
});
tmp6 = FRAUDNET_URL;
FRAUDNET_URL[global.authorization] = nextPromise;
tmp7 = c12;
str = "custom.client.load.initialized";
sendEventResult1 = c12.sendEvent(nextPromise, "custom.client.load.initialized");
nextPromise1 = nextPromise.then((arg0) => {
outer1_12.sendEvent(closure_1, "custom.client.load.succeeded");
return arg0;
});
return nextPromise1.catch((arg0) => {
delete tmp2[tmp];
return Promise.reject(arg0);
});
} catch (err) {
tmp9 = globalThis;
_Promise = Promise;
tmp10 = c4;
tmp11 = c13;
tmp12 = new.target;
tmp13 = new.target;
tmp14 = new c4(c13.CLIENT_INVALID_AUTHORIZATION);
tmp15 = tmp14;
return Promise.reject(tmp14);
}
}
return;
}
static clearCache() {
FRAUDNET_URL = {};
return;
}
_findOrCreateFraudnetJSON(arg0) {
tmp = FRAUDNET_FNCLS;
element = document.querySelector(`script[fncls="${FRAUDNET_FNCLS}"]`);
if (!element) {
_document = document;
body = document.body;
_document2 = document;
str = "script";
appendChildResult = body.appendChild(document.createElement("script"));
str2 = "application/json";
appendChildResult.type = "application/json";
str3 = "fncls";
attr = appendChildResult.setAttribute("fncls", tmp);
element = appendChildResult;
}
configuration = this.getConfiguration();
obj = { rda_tenant: "bt_card", mid: configuration.gatewayConfiguration.merchantId };
getConfiguration = obj;
str4 = configuration.authorizationFingerprint;
if (str4) {
str5 = "&";
parts = str4.split("&");
item = parts.forEach((str) => {
const parts = str.split("=");
let tmp = "customer_id" === parts[0];
if (tmp) {
tmp = parts.length > 1;
}
if (tmp) {
obj.cid = parts[1];
}
});
}
obj1 = { f: global.substr(0, 32), fp: obj, bu: false, s: FRAUDNET_SOURCE };
element.text = JSON.stringify(obj1);
return;
}
request(arg0, arg1) {
closure_0 = global;
closure_1 = module;
self = this;
promise = new Promise((arg0, arg1) => {
const endpoint = arg0;
let closure_1 = arg1;
let collectDeviceData = "payment_methods/credit_cards" === endpoint.endpoint;
if (collectDeviceData) {
collectDeviceData = str5.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData;
}
let closure_3 = Boolean(collectDeviceData);
let tmp3;
if ("graphQLApi" !== endpoint.api) {
let str = "options.method";
if (tmp.method) {
let str2;
if (!tmp.endpoint) {
str2 = "options.endpoint";
}
str = str2;
}
tmp3 = str;
}
if (tmp3) {
let obj = { type: null, code: null, message: null };
obj[0] = outer1_13.CLIENT_OPTION_REQUIRED.type;
obj[1] = outer1_13.CLIENT_OPTION_REQUIRED.code;
obj[2] = `${tmp3} is required when making a request.`;
const tmp22 = new outer1_4(obj);
throw tmp22;
} else {
str5 = "clientApi";
if ("api" in tmp) {
str5 = tmp.api;
}
obj = { method: null, graphQL: null, timeout: null, metadata: null };
obj[0] = tmp.method;
let obj1 = str5;
obj[1] = str5._graphQL;
obj[2] = tmp.timeout;
obj[3] = str5._configuration.analyticsMetadata;
if ("clientApi" === str5) {
let _clientApiBaseUrl = obj1._clientApiBaseUrl;
obj.data = outer1_8.addMetadata(obj1._configuration, tmp.data);
} else if ("graphQLApi" !== str5) {
obj = { type: null, code: null, message: "options.api is invalid." };
obj[0] = outer1_13.CLIENT_OPTION_INVALID.type;
obj[1] = outer1_13.CLIENT_OPTION_INVALID.code;
const tmp12 = new outer1_4(obj);
throw tmp12;
} else {
_clientApiBaseUrl = outer1_15[obj1._configuration.gatewayConfiguration.environment];
tmp.endpoint = "";
obj.method = "post";
obj1 = { clientSdkMetadata: null };
const obj2 = { platform: null, source: null, integration: null, sessionId: null, version: null };
obj2[0] = obj1._configuration.analyticsMetadata.platform;
obj2[1] = obj1._configuration.analyticsMetadata.source;
obj2[2] = obj1._configuration.analyticsMetadata.integration;
obj2[3] = obj1._configuration.analyticsMetadata.sessionId;
obj2[4] = outer1_14;
obj1[0] = obj2;
obj.data = outer1_11(obj1, tmp.data);
const _configuration = obj1._configuration;
const obj3 = { Authorization: null, "Braintree-Version": null };
obj3[0] = `Bearer ${_configuration.authorizationFingerprint || _configuration.authorization}`;
obj3[1] = endpoint;
obj.headers = obj3;
const tmp4 = _configuration.authorizationFingerprint || _configuration.authorization;
}
obj.url = _clientApiBaseUrl + tmp.endpoint;
obj.sendAnalyticsEvent = function sendAnalyticsEvent() { ... };
obj1._request(obj, () => { ... });
}
});
tmp = promise;
if (typeof module === "function") {
tmp2 = c9;
tmp3 = c10;
closure_1 = c9(c10(module));
nextPromise = promise.then((_httpStatus) => {
callback(null, _httpStatus, _httpStatus._httpStatus);
});
catchPromise = nextPromise.catch((details) => {
let httpStatus = details;
if (details) {
httpStatus = details.details;
}
if (httpStatus) {
httpStatus = details.details.httpStatus;
}
callback(details, null, httpStatus);
});
}
return tmp;
}
toJSON() {
return this.getConfiguration();
}
getVersion() {
return VERSION;
}
}
const BRAINTREE_VERSION = global("./constants").BRAINTREE_VERSION;
let closure_1 = global("./request/graphql");
let closure_2 = global("./request");
let closure_3 = global("../lib/is-verified-domain");
let closure_4 = global("../lib/braintree-error");
let closure_5 = global("../lib/convert-to-braintree-error");
const getConfiguration = global("./get-configuration").getConfiguration;
let closure_7 = global("../lib/create-authorization-data");
let closure_8 = global("../lib/add-metadata");
let closure_9 = global("../lib/once");
let closure_10 = global("../lib/deferred");
const assign = global("../lib/assign").assign;
let closure_12 = global("../lib/analytics");
let closure_13 = global("./errors");
const VERSION = global("../lib/constants").VERSION;
const GRAPHQL_URLS = global("../lib/constants").GRAPHQL_URLS;
let closure_16 = global("../lib/methods");
let closure_17 = global("../lib/convert-methods-to-error");
let closure_18 = global("../lib/assets");
const FRAUDNET_FNCLS = global("../lib/constants").FRAUDNET_FNCLS;
const FRAUDNET_SOURCE = global("../lib/constants").FRAUDNET_SOURCE;
const FRAUDNET_URL = global("../lib/constants").FRAUDNET_URL;
let closure_22 = {};
Client.prototype.teardown = global("@braintree/wrap-promise")(function() {
const authorization = this.getConfiguration().authorization;
delete tmp2[tmp];
callback6(this, callback5(Client.prototype));
return Promise.resolve();
});
module.exports = Client;
},
{ "../lib/add-metadata": 137, "../lib/analytics": 138, "../lib/assets": 139, "../lib/assign": 140, "../lib/braintree-error": 143, "../lib/constants": 145, "../lib/convert-methods-to-error": 146, "../lib/convert-to-braintree-error": 147, "../lib/create-authorization-data": 149, "../lib/deferred": 151, "../lib/is-verified-domain": 173, "../lib/methods": 175, "../lib/once": 176, "./constants": 93, "./errors": 94, "./get-configuration": 95, "./request": 108, "./request/graphql": 106, "@braintree/wrap-promise": 40 }
];
items92 = [
(arg0, arg1, arg2) => {
module.exports = { BRAINTREE_VERSION: "2018-05-10" };
},
{}
];
items93 = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
let obj = { type: globalResult.types.MERCHANT, code: "CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN" };
obj = { type: globalResult.types.MERCHANT, code: "CLIENT_OPTION_REQUIRED" };
obj = { type: globalResult.types.MERCHANT, code: "CLIENT_OPTION_INVALID" };
module.exports = { CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN: obj, CLIENT_OPTION_REQUIRED: obj, CLIENT_OPTION_INVALID: obj, CLIENT_MISSING_GATEWAY_CONFIGURATION: { type: globalResult.types.INTERNAL, code: "CLIENT_MISSING_GATEWAY_CONFIGURATION", message: "Missing gatewayConfiguration." }, CLIENT_INVALID_AUTHORIZATION: { type: globalResult.types.MERCHANT, code: "CLIENT_INVALID_AUTHORIZATION", message: "Authorization is invalid. Make sure your client token or tokenization key is valid." }, CLIENT_GATEWAY_NETWORK: { type: globalResult.types.NETWORK, code: "CLIENT_GATEWAY_NETWORK", message: "Cannot contact the gateway at this time." }, CLIENT_REQUEST_TIMEOUT: { type: globalResult.types.NETWORK, code: "CLIENT_REQUEST_TIMEOUT", message: "Request timed out waiting for a reply." }, CLIENT_REQUEST_ERROR: { type: globalResult.types.NETWORK, code: "CLIENT_REQUEST_ERROR", message: "There was a problem with your request." }, CLIENT_GRAPHQL_REQUEST_ERROR: { type: globalResult.types.NETWORK, code: "CLIENT_GRAPHQL_REQUEST_ERROR", message: "There was a problem with your request." }, CLIENT_RATE_LIMITED: { type: globalResult.types.MERCHANT, code: "CLIENT_RATE_LIMITED", message: "You are being rate-limited; please try again in a few minutes." }, CLIENT_AUTHORIZATION_INSUFFICIENT: { type: globalResult.types.MERCHANT, code: "CLIENT_AUTHORIZATION_INSUFFICIENT", message: "The authorization used has insufficient privileges." }, CLIENT_AUTHORIZATION_INVALID: { type: globalResult.types.MERCHANT, code: "CLIENT_AUTHORIZATION_INVALID", message: "Either the client token has expired and a new one should be generated or the tokenization key has been deactivated or deleted." } };
},
{ "../lib/braintree-error": 143 }
];
items94 = [
(arg0, arg1, arg2) => {
let closure_0 = global("../lib/braintree-error");
let closure_1 = global("./request");
let closure_2 = global("@braintree/uuid");
let closure_3 = global("../lib/constants");
let closure_4 = global("./errors");
let closure_5 = global("./request/graphql");
const GRAPHQL_URLS = global("../lib/constants").GRAPHQL_URLS;
let closure_7 = global("../lib/is-date-string-before-or-on");
const BRAINTREE_VERSION = global("./constants").BRAINTREE_VERSION;
const globalResult = global("@braintree/wrap-promise");
module.exports = {
getConfiguration: global("@braintree/wrap-promise")(function getConfiguration(arg0, sessionId) {
let closure_0 = arg0;
let closure_1 = sessionId;
return new Promise((arg0, arg1) => {
let closure_0 = arg0;
const sessionId = arg1;
let tmp = sessionId;
if (!sessionId) {
tmp = outer1_2();
}
let obj = { merchantAppId: window.location.host, platform: outer1_3.PLATFORM, sdkVersion: outer1_3.VERSION, source: outer1_3.SOURCE, integration: outer1_3.INTEGRATION, integrationType: outer1_3.INTEGRATION, sessionId: tmp };
const attrs = closure_0.attrs;
attrs._meta = obj;
attrs.braintreeLibraryVersion = outer1_3.BRAINTREE_LIBRARY_VERSION;
attrs.configVersion = "3";
obj = { url: closure_0.configUrl, method: "GET", data: attrs };
if (attrs.authorizationFingerprint) {
if (tmp3.graphQL) {
if (outer1_7(tmp3.graphQL.date, outer1_8)) {
obj = { graphQL: null };
const obj1 = { url: null, features: null };
obj1[0] = tmp3.graphQL.url;
obj1[1] = ["configuration"];
obj[0] = obj1;
const tmp17 = new outer1_5(obj);
obj.graphQL = tmp17;
}
obj.metadata = obj;
}
sessionId(obj, (arg0, arg1, arg2) => {
if (arg0) {
if (403 === arg2) {
let CLIENT_GATEWAY_NETWORK = outer1_4.CLIENT_AUTHORIZATION_INSUFFICIENT;
} else if (401 === arg2) {
CLIENT_GATEWAY_NETWORK = outer1_4.CLIENT_AUTHORIZATION_INVALID;
} else {
CLIENT_GATEWAY_NETWORK = outer1_4.CLIENT_GATEWAY_NETWORK;
}
let obj = { type: null, code: null, message: null, details: null };
({ type: obj2[0], code: obj2[1], message: obj2[2] } = CLIENT_GATEWAY_NETWORK);
obj = { originalError: null };
obj[0] = arg0;
obj[3] = obj;
const tmp15 = new callback(obj);
callback2(tmp15);
} else {
let str = "CLIENT_TOKEN";
if (attrs.tokenizationKey) {
str = "TOKENIZATION_KEY";
}
obj = { authorizationType: null, authorizationFingerprint: null, analyticsMetadata: null, gatewayConfiguration: null };
obj[0] = str;
obj[1] = attrs.authorizationFingerprint;
obj[2] = obj;
obj[3] = arg1;
callback(obj);
}
});
}
if (attrs.tokenizationKey) {
const obj2 = { graphQL: null };
const obj3 = { url: null, features: null };
obj3[0] = outer1_6[tmp3.environment];
obj3[1] = ["configuration"];
obj2[0] = obj3;
const tmp9 = new outer1_5(obj2);
obj.graphQL = tmp9;
obj.metadata = obj;
}
});
})
};
},
{ "../lib/braintree-error": 143, "../lib/constants": 145, "../lib/is-date-string-before-or-on": 170, "./constants": 93, "./errors": 94, "./request": 108, "./request/graphql": 106, "@braintree/uuid": 36, "@braintree/wrap-promise": 40 }
];
items95 = [
(arg0, arg1, arg2) => {
let closure_0 = global("../lib/braintree-error");
let closure_1 = global("./client");
let closure_2 = global("../lib/errors");
const globalResult = global("@braintree/wrap-promise");
module.exports = {
create: global("@braintree/wrap-promise")(function create(authorization) {
if (authorization.authorization) {
let initializeResult = closure_1.initialize(authorization);
} else {
const obj = { type: null, code: null, message: "options.authorization is required when instantiating a client." };
obj[0] = constants.INSTANTIATION_OPTION_REQUIRED.type;
obj[1] = constants.INSTANTIATION_OPTION_REQUIRED.code;
const tmp7 = new closure_0(obj);
initializeResult = Promise.reject(tmp7);
}
return initializeResult;
}),
VERSION: "3.112.1"
};
},
{ "../lib/braintree-error": 143, "../lib/errors": 154, "./client": 92, "@braintree/wrap-promise": 40 }
];
items96 = [
(arg0, arg1, arg2) => {
function _requestWithRetry(url, arg1, arg2) {
let graphQL;
let timeout;
let closure_0 = url;
const assign = arg1;
let closure_2 = arg2;
({ graphQL, timeout } = url);
const requestObject = globalResult.getRequestObject();
let closure_9 = arg2;
let isGraphQLRequestResult = graphQL;
if (graphQL) {
isGraphQLRequestResult = graphQL.isGraphQLRequest(url.url, url.data);
}
const BooleanResult = Boolean(isGraphQLRequestResult);
let closure_10 = BooleanResult;
url.headers = assign({ "Content-Type": "application/json" }, url.headers);
if (BooleanResult) {
let obj2 = new headers(url);
} else {
obj2 = new closure_7(url);
}
url = obj2.getUrl();
const body = obj2.getBody();
const method = obj2.getMethod();
headers = obj2.getHeaders();
let queryifyResult = url;
if ("GET" === method) {
queryifyResult = closure_0.queryify(url, body);
}
if (obj2) {
requestObject.onreadystatechange = () => {
if (4 === requestObject.readyState) {
if (0 === tmp4.status) {
if (closure_10) {
delete tmp2[tmp];
requestObject(closure_0, closure_1, closure_2);
}
}
let data = outer1_3(tmp4.responseText);
let closure_4 = obj2.adaptResponseBody(data);
const determineStatusResult = obj2.determineStatus(tmp4.status, data);
let closure_3 = determineStatusResult;
if (determineStatusResult < 400) {
if (closure_3 >= 200) {
callback(null, closure_4, closure_3);
}
}
if (closure_10) {
data = data.data;
let errorClass = !data;
if (!data) {
errorClass = tmp18.errors;
}
if (errorClass) {
errorClass = tmp18.errors[0];
}
if (errorClass) {
errorClass = tmp18.errors[0].extensions;
}
if (errorClass) {
errorClass = tmp18.errors[0].extensions.errorClass;
}
let tmp19 = "UNKNOWN" === errorClass;
if (!tmp19) {
tmp19 = "INTERNAL" === errorClass;
}
if (tmp19) {
delete tmp3[tmp2];
requestObject(closure_0, closure_1, closure_2);
}
}
if (closure_1 < 1) {
let tmp22 = !closure_3;
if (closure_3) {
tmp22 = 408 === tmp21;
}
if (tmp22) {
const sum = closure_1 + 1;
closure_1 = sum;
requestObject(closure_0, sum, closure_2);
}
}
let str3 = closure_4;
if (!closure_4) {
str3 = "error";
}
let num5 = closure_3;
if (!closure_3) {
num5 = 500;
}
callback(str3, null, num5);
const tmp23 = callback;
}
};
let queryifyResult1 = queryifyResult;
} else {
queryifyResult1 = queryifyResult;
if (url.headers) {
queryifyResult1 = closure_0.queryify(queryifyResult, headers);
}
requestObject.onload = () => {
callback(null, outer1_3(requestObject.responseText), requestObject.status);
};
requestObject.onerror = () => {
callback("error", null, 500);
};
requestObject.onprogress = () => {
};
requestObject.ontimeout = () => {
callback("timeout", null, -1);
};
}
try {
queryifyResult = requestObject.open(method, queryifyResult1, true);
} catch (tmp24) {
if (tmp4) {
delete tmp3[tmp];
requestObject(tmp3, assign, tmp2);
} else {
throw tmp24;
}
}
}
let closure_0 = global("../../lib/querystring");
let assign = global("../../lib/assign").assign;
let closure_2 = global("./prep-body");
let closure_3 = global("./parse-body");
const globalResult = global("./xhr");
let closure_4 = globalResult;
const isAvailable = globalResult.isAvailable;
let closure_6 = global("./graphql/request");
let closure_7 = global("./default-request");
module.exports = {
request(url) {
_requestWithRetry(url, 0, arg1);
}
};
},
{ "../../lib/assign": 140, "../../lib/querystring": 177, "./default-request": 98, "./graphql/request": 107, "./parse-body": 109, "./prep-body": 110, "./xhr": 111 }
];
items97 = [
(arg0, arg1, arg2) => {
class DefaultRequest {
constructor(arg0) {
return;
}
getUrl() {
return this._url;
}
getBody() {
return this._data;
}
getMethod() {
return this._method;
}
getHeaders() {
return this._headers;
}
adaptResponseBody(arg0) {
return global;
}
determineStatus(arg0) {
return global;
}
}
module.exports = DefaultRequest;
},
{}
];
items98 = [
(arg0, arg1, arg2) => {
let closure_0 = global("./error");
const assign = global("../../../../lib/assign").assign;
let closure_2 = { AMERICAN_EXPRESS: "American Express", DISCOVER: "Discover", INTERNATIONAL_MAESTRO: "Maestro", JCB: "JCB", MASTERCARD: "MasterCard", SOLO: "Solo", UK_MAESTRO: "UK Maestro", UNION_PAY: "UnionPay", VISA: "Visa", ELO: "Elo", HIPER: "Hiper", HIPERCARD: "Hipercard" };
let closure_3 = { VISA: "visa", MASTERCARD: "mastercard", DISCOVER: "discover", AMERICAN_EXPRESS: "amex", INTERNATIONAL_MAESTRO: "maestro", ELO: "elo" };
let closure_4 = { VISA: "Visa", MASTERCARD: "MasterCard", DISCOVER: "Discover", AMERICAN_EXPRESS: "American Express" };
let closure_5 = { VISA: "visa", MASTERCARD: "mastercard", DISCOVER: "discover", AMERICAN_EXPRESS: "amex", INTERNATIONAL_MAESTRO: "maestro", ELO: "elo" };
let closure_6 = { VISA: "visa", MASTERCARD: "master", DISCOVER: "discover", AMERICAN_EXPRESS: "amex", DINERS: "diners", INTERNATIONAL_MAESTRO: "maestro", JCB: "jcb" };
module.exports = function configurationResponseAdapter(data, _graphQL) {
if (data.data) {
if (!data.errors) {
const clientConfiguration = data.data.clientConfiguration;
let obj = { environment: null, clientApiUrl: null, assetsUrl: null, analytics: null, merchantId: null, venmo: "off" };
obj[0] = clientConfiguration.environment.toLowerCase();
({ clientApiUrl: obj[1], assetsUrl: obj[2] } = clientConfiguration);
obj = { url: null };
obj[0] = clientConfiguration.analyticsUrl;
obj[3] = obj;
obj[4] = clientConfiguration.merchantId;
if (clientConfiguration.supportedFeatures) {
obj = { url: null, features: null };
obj[0] = _graphQL._graphQL._config.url;
const supportedFeatures = clientConfiguration.supportedFeatures;
obj[1] = supportedFeatures.map((str) => str.toLowerCase());
obj.graphQL = obj;
}
if (clientConfiguration.braintreeApi) {
obj.braintreeApi = clientConfiguration.braintreeApi;
}
if (clientConfiguration.applePayWeb) {
obj.applePayWeb = clientConfiguration.applePayWeb;
const supportedCardBrands = clientConfiguration.applePayWeb.supportedCardBrands;
let callback = closure_3;
obj.applePayWeb.supportedNetworks = supportedCardBrands.reduce((arr, key10009) => {
let combined = arr;
if (closure_0.hasOwnProperty(key10009)) {
combined = arr.concat(closure_0[key10009]);
}
return combined;
}, []);
const applePayWeb = obj.applePayWeb;
delete tmp2[tmp];
}
if (clientConfiguration.fastlane) {
obj.fastlane = clientConfiguration.fastlane;
}
if (clientConfiguration.ideal) {
obj.ideal = clientConfiguration.ideal;
}
if (clientConfiguration.kount) {
const obj1 = { kountMerchantId: null };
obj1[0] = clientConfiguration.kount.merchantId;
obj.kount = obj1;
}
if (clientConfiguration.creditCard) {
const challenges = clientConfiguration.creditCard.challenges;
obj.challenges = challenges.map((str) => str.toLowerCase());
const obj2 = { supportedCardTypes: null };
const supportedCardBrands1 = clientConfiguration.creditCard.supportedCardBrands;
callback = closure_2;
obj2[0] = supportedCardBrands1.reduce((arr, key10009) => {
let combined = arr;
if (closure_0.hasOwnProperty(key10009)) {
combined = arr.concat(closure_0[key10009]);
}
return combined;
}, []);
obj.creditCards = obj2;
obj.threeDSecureEnabled = clientConfiguration.creditCard.threeDSecureEnabled;
obj.threeDSecure = clientConfiguration.creditCard.threeDSecure;
} else {
obj.challenges = [];
const obj3 = { supportedCardTypes: null };
obj3[0] = [];
obj.creditCards = obj3;
obj.threeDSecureEnabled = false;
}
if (clientConfiguration.googlePay) {
const obj4 = { displayName: null, enabled: true, environment: null, googleAuthorizationFingerprint: null, paypalClientId: null, supportedNetworks: null };
obj4[0] = clientConfiguration.googlePay.displayName;
obj4[2] = clientConfiguration.googlePay.environment.toLowerCase();
obj4[3] = clientConfiguration.googlePay.googleAuthorization;
obj4[4] = clientConfiguration.googlePay.paypalClientId;
const supportedCardBrands2 = clientConfiguration.googlePay.supportedCardBrands;
callback = closure_5;
obj4[5] = supportedCardBrands2.reduce((arr, key10009) => {
let combined = arr;
if (closure_0.hasOwnProperty(key10009)) {
combined = arr.concat(closure_0[key10009]);
}
return combined;
}, []);
obj.androidPay = obj4;
const str3 = clientConfiguration.googlePay.environment;
}
if (clientConfiguration.venmo) {
const obj5 = { merchantId: null, accessToken: null, environment: null, enrichedCustomerDataEnabled: null };
obj5[0] = clientConfiguration.venmo.merchantId;
obj5[1] = clientConfiguration.venmo.accessToken;
obj5[2] = clientConfiguration.venmo.environment.toLowerCase();
obj5[3] = clientConfiguration.venmo.enrichedCustomerDataEnabled;
obj.payWithVenmo = obj5;
const str4 = clientConfiguration.venmo.environment;
}
if (clientConfiguration.paypal) {
obj.paypalEnabled = true;
obj.paypal = assign({}, clientConfiguration.paypal);
obj.paypal.currencyIsoCode = obj.paypal.currencyCode;
obj.paypal.environment = obj.paypal.environment.toLowerCase();
const paypal = obj.paypal;
delete tmp2[tmp];
const str5 = obj.paypal.environment;
} else {
obj.paypalEnabled = false;
}
if (clientConfiguration.unionPay) {
const obj6 = { enabled: true, merchantAccountId: null };
obj6[1] = clientConfiguration.unionPay.merchantAccountId;
obj.unionPay = obj6;
}
if (clientConfiguration.visaCheckout) {
const obj7 = { apikey: null, encryptionKey: null, externalClientId: null, supportedCardTypes: null };
obj7[0] = clientConfiguration.visaCheckout.apiKey;
obj7[1] = clientConfiguration.visaCheckout.encryptionKey;
obj7[2] = clientConfiguration.visaCheckout.externalClientId;
const supportedCardBrands3 = clientConfiguration.visaCheckout.supportedCardBrands;
callback = closure_4;
obj7[3] = supportedCardBrands3.reduce((arr, key10009) => {
let combined = arr;
if (closure_0.hasOwnProperty(key10009)) {
combined = arr.concat(closure_0[key10009]);
}
return combined;
}, []);
obj.visaCheckout = obj7;
}
if (clientConfiguration.masterpass) {
const obj8 = { merchantCheckoutId: null, supportedNetworks: null };
obj8[0] = clientConfiguration.masterpass.merchantCheckoutId;
const supportedCardBrands4 = clientConfiguration.masterpass.supportedCardBrands;
callback = closure_6;
obj8[1] = supportedCardBrands4.reduce((arr, key10009) => {
let combined = arr;
if (closure_0.hasOwnProperty(key10009)) {
combined = arr.concat(closure_0[key10009]);
}
return combined;
}, []);
obj.masterpass = obj8;
}
let tmp10 = obj;
if (clientConfiguration.usBankAccount) {
const obj9 = { routeId: null, plaid: null };
obj9[0] = clientConfiguration.usBankAccount.routeId;
const obj10 = { publicKey: null };
obj10[0] = clientConfiguration.usBankAccount.plaidPublicKey;
obj9[1] = obj10;
obj.usBankAccount = obj9;
tmp10 = obj;
}
const str = clientConfiguration.environment;
}
return tmp10;
}
tmp10 = callback(data);
};
},
{ "../../../../lib/assign": 140, "./error": 102 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("./error");
let closure_1 = { AMERICAN_EXPRESS: "American Express", DINERS: "Discover", DISCOVER: "Discover", ELO: "Elo", HIPER: "Hiper", HIPERCARD: "Hipercard", INTERNATIONAL_MAESTRO: "Maestro", JCB: "JCB", MASTERCARD: "MasterCard", UK_MAESTRO: "Maestro", UNION_PAY: "UnionPay", VISA: "Visa" };
let closure_2 = { YES: "Yes", NO: "No", UNKNOWN: "Unknown" };
let closure_3 = { PSDTWO: "psd2" };
module.exports = function creditCardTokenizationFastlaneResponseAdapter(data) {
if (data.data) {
if (!data.errors) {
const tokenizeCreditCardForPayPalConnect = data.data.tokenizeCreditCardForPayPalConnect;
const details = tokenizeCreditCardForPayPalConnect.paymentMethod.details;
let str2 = "";
if (details.last4) {
str2 = details.last4.substr(2, 4);
const str3 = details.last4;
}
const binData = details.binData;
if (binData) {
const items = ["commercial", "debit", "durbinRegulated", "healthcare", "payroll", "prepaid"];
const item = items.forEach((arg0) => {
if (binData[arg0]) {
tmp[arg0] = outer1_2[tmp[arg0]];
} else {
tmp[arg0] = "Unknown";
}
});
const items1 = ["issuingBank", "countryOfIssuance", "productId"];
const item1 = items1.forEach((arg0) => {
if (!binData[arg0]) {
tmp[arg0] = "Unknown";
}
});
}
let obj = { binData: null, consumed: false, description: null, nonce: null, details: null, type: "CreditCard", threeDSecureInfo: null };
obj[0] = binData;
let str4 = "";
if (str2) {
str4 = `ending in ${str2}`;
}
obj[2] = str4;
obj[3] = tokenizeCreditCardForPayPalConnect.paymentMethod.id;
obj = { cardholderName: null, expirationMonth: null, expirationYear: null, bin: null, cardType: null, lastFour: null, lastTwo: null };
({ cardholderName: obj2[0], expirationMonth: obj2[1], expirationYear: obj2[2] } = details);
obj[3] = details.bin || "";
obj[4] = table[details.brandCode] || "Unknown";
obj = { creditCards: null };
obj[5] = details.last4 || "";
obj[6] = str2;
obj[4] = obj;
const items2 = [obj];
obj[0] = items2;
let tmp5 = obj;
if (tokenizeCreditCardForPayPalConnect.authenticationInsight) {
let formatted = table2[str6];
if (!formatted) {
formatted = str6.toLowerCase();
}
const obj1 = { regulationEnvironment: null };
obj1[0] = formatted;
obj.creditCards[0].authenticationInsight = obj1;
tmp5 = obj;
}
const tmp4 = details.last4 || "";
}
return tmp5;
}
tmp5 = binData(data);
};
},
{ "./error": 102 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("./error");
let closure_1 = { AMERICAN_EXPRESS: "American Express", DINERS: "Discover", DISCOVER: "Discover", ELO: "Elo", HIPER: "Hiper", HIPERCARD: "Hipercard", INTERNATIONAL_MAESTRO: "Maestro", JCB: "JCB", MASTERCARD: "MasterCard", UK_MAESTRO: "Maestro", UNION_PAY: "UnionPay", VISA: "Visa" };
let closure_2 = { YES: "Yes", NO: "No", UNKNOWN: "Unknown" };
let closure_3 = { PSDTWO: "psd2" };
module.exports = function creditCardTokenizationResponseAdapter(data) {
if (data.data) {
if (!data.errors) {
const tokenizeCreditCard = data.data.tokenizeCreditCard;
const creditCard = tokenizeCreditCard.creditCard;
let str2 = "";
if (creditCard.last4) {
str2 = creditCard.last4.substr(2, 4);
const str3 = creditCard.last4;
}
const binData = creditCard.binData;
if (binData) {
const items = ["commercial", "debit", "durbinRegulated", "healthcare", "payroll", "prepaid"];
const item = items.forEach((arg0) => {
if (binData[arg0]) {
tmp[arg0] = outer1_2[tmp[arg0]];
} else {
tmp[arg0] = "Unknown";
}
});
const items1 = ["issuingBank", "countryOfIssuance", "productId"];
const item1 = items1.forEach((arg0) => {
if (!binData[arg0]) {
tmp[arg0] = "Unknown";
}
});
}
let obj = { binData: null, consumed: false, description: null, nonce: null, details: null, type: "CreditCard", threeDSecureInfo: null };
obj[0] = binData;
let str4 = "";
if (str2) {
str4 = `ending in ${str2}`;
}
obj[2] = str4;
obj[3] = tokenizeCreditCard.token;
obj = { cardholderName: null, expirationMonth: null, expirationYear: null, bin: null, cardType: null, lastFour: null, lastTwo: null };
({ cardholderName: obj2[0], expirationMonth: obj2[1], expirationYear: obj2[2] } = creditCard);
obj[3] = creditCard.bin || "";
obj[4] = table[creditCard.brandCode] || "Unknown";
obj = { creditCards: null };
obj[5] = creditCard.last4 || "";
obj[6] = str2;
obj[4] = obj;
const items2 = [obj];
obj[0] = items2;
let tmp5 = obj;
if (tokenizeCreditCard.authenticationInsight) {
let formatted = table2[str6];
if (!formatted) {
formatted = str6.toLowerCase();
}
const obj1 = { regulationEnvironment: null };
obj1[0] = formatted;
obj.creditCards[0].authenticationInsight = obj1;
tmp5 = obj;
}
const tmp4 = creditCard.last4 || "";
}
return tmp5;
}
tmp5 = binData(data);
};
},
{ "./error": 102 }
];
items = [
(arg0, arg1, arg2) => {
function addFieldError(arr, message, arr2) {
const first = arr[0];
if (1 !== arr.length) {
const item = arr2.forEach((field) => {
if (field.field === first1) {
let closure_0 = field;
}
});
if (!obj) {
obj = { field: null, fieldErrors: null };
obj[0] = first;
obj[1] = [];
arr2.push(obj);
}
obj(arr.slice(1), message, obj.fieldErrors);
} else {
obj = { code: null, field: null, message: null };
obj[0] = tmp;
obj[1] = first;
obj[2] = message.message;
arr2.push(obj);
}
}
module.exports = function errorResponseAdapter(errors) {
let message = errors;
const tmp = errors.errors && message.errors[0] && message.errors[0].extensions && message.errors[0].extensions.errorClass;
if ("VALIDATION" === tmp) {
errors = message.errors;
const items = [];
let item = errors.forEach((extensions) => {
if (tmp) {
const inputPath = extensions.extensions.inputPath;
const substr = inputPath.slice(1);
let arr2 = obj;
obj = undefined;
let first1;
const first = substr[0];
first1 = first;
if (1 !== substr.length) {
const item = arr2.forEach((field) => {
if (field.field === first1) {
let closure_0 = field;
}
});
if (!obj) {
obj = { field: null, fieldErrors: null };
obj[0] = first;
obj[1] = [];
arr2.push(obj);
}
const substr1 = substr.slice(1);
const fieldErrors = obj.fieldErrors;
obj = undefined;
first1 = undefined;
first1 = substr1[0];
if (1 !== substr1.length) {
const item1 = fieldErrors.forEach((field) => {
if (field.field === first1) {
let closure_0 = field;
}
});
if (!obj) {
obj = { field: null, fieldErrors: null };
obj[0] = first1;
obj[1] = [];
fieldErrors.push(obj);
}
items(substr1.slice(1), extensions, obj.fieldErrors);
} else {
const obj1 = { code: null, field: null, message: null };
obj1[0] = tmp10;
obj1[1] = first1;
obj1[2] = extensions.message;
fieldErrors.push(obj1);
}
} else {
obj = { code: null, field: null, message: null };
obj[0] = tmp2;
obj[1] = first;
obj[2] = extensions.message;
arr2 = arr2.push(obj);
}
}
});
if (0 === items.length) {
let obj = { error: null };
obj = { message: null };
message = message.errors[0].message;
obj[0] = message;
obj[0] = obj;
let obj1 = obj;
} else {
obj1 = { error: null, fieldErrors: null };
const obj2 = { message: null };
obj2[0] = { creditCard: "Credit card is invalid" }[items[0].field];
obj1[0] = obj2;
obj1[1] = items;
}
} else {
obj = { error: null, fieldErrors: null };
if (tmp) {
const obj3 = { message: null };
obj3[0] = message.errors[0].message;
obj[0] = obj3;
obj[1] = [];
let tmp2 = obj;
} else {
obj[0] = { message: "There was a problem serving your request" };
obj[1] = [];
tmp2 = obj;
}
return tmp2;
}
};
},
{}
];
items = [
(arg0, arg1, arg2) => {
module.exports = function configuration() {
return { query: "query ClientConfiguration { clientConfiguration { analyticsUrl environment merchantId assetsUrl clientApiUrl creditCard { supportedCardBrands challenges threeDSecureEnabled threeDSecure { cardinalAuthenticationJWT } } applePayWeb { countryCode currencyCode merchantIdentifier supportedCardBrands } fastlane { enabled } googlePay { displayName supportedCardBrands environment googleAuthorization paypalClientId } ideal { routeId assetsUrl } kount { merchantId } masterpass { merchantCheckoutId supportedCardBrands } paypal { displayName clientId assetsUrl environment environmentNoNetwork unvettedMerchant braintreeClientId billingAgreementsEnabled merchantAccountId currencyCode payeeEmail } unionPay { merchantAccountId } usBankAccount { routeId plaidPublicKey } venmo { merchantId accessToken environment enrichedCustomerDataEnabled } visaCheckout { apiKey externalClientId supportedCardBrands } braintreeApi { accessToken url } supportedFeatures } }", operationName: "ClientConfiguration" };
};
},
{}
];
items = [
(arg0, arg1, arg2) => {
const assign = global("../../../../lib/assign").assign;
module.exports = function creditCardForFastlaneTokenization(authenticationInsight) {
let merchantAccountId = authenticationInsight.authenticationInsight;
if (merchantAccountId) {
merchantAccountId = authenticationInsight.merchantAccountId;
}
const BooleanResult = Boolean(merchantAccountId);
let str = "mutation TokenizeCreditCardForPayPalConnect($input: TokenizeCreditCardForPayPalConnectInput!";
if (BooleanResult) {
str = "mutation TokenizeCreditCardForPayPalConnect($input: TokenizeCreditCardForPayPalConnectInput!, $authenticationInsightInput: AuthenticationInsightInput!";
}
const text = `${str}) { tokenizeCreditCardForPayPalConnect(input: $input) { clientMutationId paymentMethod { id details { ... on CreditCardDetails { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } } }`;
let text1 = text;
if (BooleanResult) {
text1 = `${str}) { tokenizeCreditCardForPayPalConnect(input: $input) { clientMutationId paymentMethod { id details { ... on CreditCardDetails { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } } } authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }`;
}
let obj = { query: `${tmp3} } }`, variables: null, operationName: "TokenizeCreditCardForPayPalConnect" };
const creditCard = authenticationInsight.creditCard;
const tmp4 = creditCard.fastlane || {};
let termsAndConditionsVersion = "fastlane" in creditCard;
if (termsAndConditionsVersion) {
termsAndConditionsVersion = "termsAndConditionsVersion" in creditCard.fastlane;
}
if (termsAndConditionsVersion) {
termsAndConditionsVersion = creditCard.fastlane.termsAndConditionsVersion;
}
let hasBuyerConsent = "hasBuyerConsent" in tmp4;
if (hasBuyerConsent) {
hasBuyerConsent = tmp4.hasBuyerConsent;
}
const shippingAddress = creditCard.shippingAddress;
const creditCard2 = authenticationInsight.creditCard;
let billingAddress = creditCard2;
if (creditCard2) {
billingAddress = creditCard2.billingAddress;
}
let str4 = creditCard2;
if (creditCard2) {
str4 = creditCard2.expirationDate;
}
let tmp5 = creditCard2;
if (creditCard2) {
let expirationMonth = creditCard2.expirationMonth;
if (!expirationMonth) {
let trimmed = str4;
if (str4) {
trimmed = str4.split("/")[0].trim();
const str6 = str4.split("/")[0];
}
expirationMonth = trimmed;
}
tmp5 = expirationMonth;
}
let tmp7 = creditCard2;
if (creditCard2) {
let expirationYear = creditCard2.expirationYear;
if (!expirationYear) {
let trimmed1 = str4;
if (str4) {
trimmed1 = str4.split("/")[1].trim();
const str8 = str4.split("/")[1];
}
expirationYear = trimmed1;
}
tmp7 = expirationYear;
}
let number = creditCard2;
if (creditCard2) {
number = creditCard2.number;
}
obj = { number, expirationMonth: tmp5, expirationYear: tmp7, cvv: null, cardholderName: null };
let cvv = creditCard2;
if (creditCard2) {
cvv = creditCard2.cvv;
}
obj[3] = cvv;
let cardholderName = creditCard2;
if (creditCard2) {
cardholderName = creditCard2.cardholderName;
}
obj = { input: { creditCard: obj, options: {} } };
obj[4] = cardholderName;
if (BooleanResult) {
const obj1 = { merchantAccountId: null };
obj1[0] = authenticationInsight.merchantAccountId;
obj.authenticationInsightInput = obj1;
}
if (billingAddress) {
obj.input.creditCard.billingAddress = billingAddress;
}
const input = obj.input;
if (authenticationInsight.creditCard) {
if (authenticationInsight.creditCard.options) {
if (typeof authenticationInsight.creditCard.options.validate === "boolean") {
let flag = authenticationInsight.creditCard.options.validate;
}
if (typeof flag === "boolean") {
const obj2 = { validate: null };
obj2[0] = flag;
input.options = assign(obj2, input.options);
}
obj.input = input;
const obj3 = { email: null, optIn: null, phone: null, termsAndConditionsVersion: null };
obj3[0] = creditCard.email;
obj3[1] = hasBuyerConsent;
obj3[2] = creditCard.phone;
obj3[3] = termsAndConditionsVersion;
const tmp10 = assign({}, obj.input, obj3);
if ("authAssertion" in tmp4) {
tmp10.authAssertion = tmp4.authAssertion;
}
if (shippingAddress) {
tmp10.shippingAddress = shippingAddress;
}
const obj4 = { input: null };
obj4[0] = tmp10;
obj[1] = obj4;
return obj;
}
}
if (!authenticationInsight.authorizationFingerprint) {
flag = true;
if (!authenticationInsight.authorizationFingerprint) {
if (authenticationInsight.tokenizationKey) {
flag = false;
}
}
} else {
flag = true;
}
};
},
{ "../../../../lib/assign": 140 }
];
items = [
(arg0, arg1, arg2) => {
const assign = global("../../../../lib/assign").assign;
module.exports = function creditCardTokenization(authenticationInsight) {
let merchantAccountId = authenticationInsight.authenticationInsight;
if (merchantAccountId) {
merchantAccountId = authenticationInsight.merchantAccountId;
}
const BooleanResult = Boolean(merchantAccountId);
let str = "mutation TokenizeCreditCard($input: TokenizeCreditCardInput!";
if (BooleanResult) {
str = "mutation TokenizeCreditCard($input: TokenizeCreditCardInput!, $authenticationInsightInput: AuthenticationInsightInput!";
}
const text = `${str}) { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } `;
let text1 = text;
if (BooleanResult) {
text1 = `${str}) { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }`;
}
let obj = { query: `${tmp3} } }`, variables: null, operationName: "TokenizeCreditCard" };
const creditCard = authenticationInsight.creditCard;
let billingAddress = creditCard;
if (creditCard) {
billingAddress = creditCard.billingAddress;
}
let str3 = creditCard;
if (creditCard) {
str3 = creditCard.expirationDate;
}
let tmp4 = creditCard;
if (creditCard) {
let expirationMonth = creditCard.expirationMonth;
if (!expirationMonth) {
let trimmed = str3;
if (str3) {
trimmed = str3.split("/")[0].trim();
const str5 = str3.split("/")[0];
}
expirationMonth = trimmed;
}
tmp4 = expirationMonth;
}
let tmp6 = creditCard;
if (creditCard) {
let expirationYear = creditCard.expirationYear;
if (!expirationYear) {
let trimmed1 = str3;
if (str3) {
trimmed1 = str3.split("/")[1].trim();
const str7 = str3.split("/")[1];
}
expirationYear = trimmed1;
}
tmp6 = expirationYear;
}
let number = creditCard;
if (creditCard) {
number = creditCard.number;
}
obj = { number, expirationMonth: tmp4, expirationYear: tmp6, cvv: null, cardholderName: null };
let cvv = creditCard;
if (creditCard) {
cvv = creditCard.cvv;
}
obj[3] = cvv;
let cardholderName = creditCard;
if (creditCard) {
cardholderName = creditCard.cardholderName;
}
obj = { input: { creditCard: obj, options: {} } };
obj[4] = cardholderName;
if (BooleanResult) {
const obj1 = { merchantAccountId: null };
obj1[0] = authenticationInsight.merchantAccountId;
obj.authenticationInsightInput = obj1;
}
if (billingAddress) {
obj.input.creditCard.billingAddress = billingAddress;
}
const input = obj.input;
if (authenticationInsight.creditCard) {
if (authenticationInsight.creditCard.options) {
if (typeof authenticationInsight.creditCard.options.validate === "boolean") {
let flag = authenticationInsight.creditCard.options.validate;
}
if (typeof flag === "boolean") {
const obj2 = { validate: null };
obj2[0] = flag;
input.options = assign(obj2, input.options);
}
obj.input = input;
obj[1] = obj;
return obj;
}
}
if (!authenticationInsight.authorizationFingerprint) {
flag = true;
if (!authenticationInsight.authorizationFingerprint) {
if (authenticationInsight.tokenizationKey) {
flag = false;
}
}
} else {
flag = true;
}
};
},
{ "../../../../lib/assign": 140 }
];
items = [
(arg0, arg1, arg2) => {
class GraphQL {
constructor(arg0) {
this._config = global.graphQL;
return;
}
getGraphQLEndpoint() {
return this._config.url;
}
isGraphQLRequest(arg0, arg1) {
clientApiPath = this.getClientApiPath(global);
closure_0 = clientApiPath;
_isGraphQLEnabledResult = this._isGraphQLEnabled();
tmp3 = !_isGraphQLEnabledResult;
if (_isGraphQLEnabledResult) {
tmp3 = !clientApiPath;
}
tmp4 = !tmp3;
if (!tmp3) {
tmp5 = module;
features = this._config.features;
closure_0 = module;
tmp7 = closure_1;
someResult = features.some(() => { ... });
someResult1 = closure_1.some(() => { ... });
tmp9 = !someResult1;
if (!someResult1) {
tmp9 = someResult;
}
tmp4 = tmp9;
}
return tmp4;
}
getClientApiPath(arg0) {
parts = global.split("/client_api/v1/");
first = undefined;
if (parts.length > 1) {
str = parts[1];
str2 = "?";
first = str.split("?")[0];
}
return first;
}
_isGraphQLEnabled() {
return Boolean(this._config);
}
}
let closure_0 = { tokenize_credit_cards: "payment_methods/credit_cards", configuration: "configuration" };
let closure_1 = ["creditCard.options.unionPayEnrollment"];
module.exports = GraphQL;
},
{}
];
items = [
(arg0, arg1, arg2) => {
class GraphQLRequest {
constructor(arg0) {
obj = {};
graphQL = global.graphQL;
clientApiPath = graphQL.getClientApiPath(global.url);
({ graphQL: obj._graphQL, data: obj._data, method: obj._method, headers: obj._headers } = global);
obj._clientSdkMetadata = { source: global.metadata.source, integration: global.metadata.integration, sessionId: global.metadata.sessionId };
prototype = global.sendAnalyticsEvent;
if (!prototype) {
tmp2 = globalThis;
_Function = Function;
prototype = Function.prototype;
}
obj._sendAnalyticsEvent = prototype;
obj._generator = c8[clientApiPath];
obj._adapter = c9[clientApiPath];
_sendAnalyticsEventResult = obj._sendAnalyticsEvent("graphql.init");
return;
}
getUrl() {
_graphQL = this._graphQL;
return _graphQL.getGraphQLEndpoint();
}
getBody() {
_data = this._data;
obj = {};
assign = obj;
keys = Object.keys(_data);
item = keys.forEach((arg0) => {
let tmp = outer1_2(arg0);
if (typeof tmp6[arg0] === "object") {
tmp6 = tmp2[arg0];
let obj = {};
let _Object = Object;
let keys = Object.keys(tmp6);
let item = keys.forEach(() => { ... });
obj[tmp] = obj;
} else if (typeof tmp2[arg0] === "number") {
let _String = String;
obj[tmp] = String(tmp2[arg0]);
} else {
obj[tmp] = tmp2[arg0];
}
});
obj = { clientSdkMetadata: this._clientSdkMetadata };
return JSON.stringify(assign(obj, this._generator(obj, c3(this._data.creditCard))));
}
getMethod() {
return "POST";
}
getHeaders() {
self = this;
_sendAnalyticsEvent = this._sendAnalyticsEvent;
if (this._data.authorizationFingerprint) {
str2 = "graphql.authorization-fingerprint";
_sendAnalyticsEventResult = _sendAnalyticsEvent("graphql.authorization-fingerprint");
tokenizationKey = self._data.authorizationFingerprint;
} else {
str = "graphql.tokenization-key";
_sendAnalyticsEventResult1 = _sendAnalyticsEvent("graphql.tokenization-key");
tokenizationKey = self._data.tokenizationKey;
}
obj = { Authorization: `Bearer ${tokenizationKey}`, "Braintree-Version": BRAINTREE_VERSION };
return assign({}, self._headers, obj);
}
adaptResponseBody(arg0) {
self = this;
tmp = "creditCard" in this._data;
if (tmp) {
tmp2 = c3;
tmp = c3(self._data.creditCard);
}
return this._adapter(global, self, tmp);
}
determineStatus(arg0, arg1) {
num = 200;
if (200 === global) {
tmp = module;
tmp2 = module.errors && module.errors[0] && module.errors[0].extensions && module.errors[0].extensions.errorClass;
if (!module.data) {
num3 = 422;
str = "VALIDATION";
if ("VALIDATION" !== tmp2) {
num4 = 403;
str2 = "AUTHORIZATION";
num5 = 403;
if ("AUTHORIZATION" !== tmp2) {
num6 = 401;
str3 = "AUTHENTICATION";
if ("AUTHENTICATION" !== tmp2) {
message = !tmp2;
if (!tmp2) {
message = module.errors[0].message;
}
num7 = 500;
if (message) {
num7 = 403;
}
num6 = num7;
}
num5 = num6;
}
num3 = num5;
}
num = num3;
}
num2 = num;
} else {
num2 = global;
if (!global) {
num2 = 500;
}
}
_sendAnalyticsEventResult = this._sendAnalyticsEvent(`graphql.status.${global}`);
_sendAnalyticsEventResult1 = this._sendAnalyticsEvent(`graphql.determinedStatus.${num2}`);
return num2;
}
}
const BRAINTREE_VERSION = global("../../constants").BRAINTREE_VERSION;
const assign = global("../../../lib/assign").assign;
let closure_2 = global("../../../lib/snake-case-to-camel-case");
let closure_3 = global("../../../lib/is-fastlane-checkout");
let closure_4 = global("./generators/credit-card-tokenization");
let closure_5 = global("./adapters/credit-card-tokenization");
let closure_6 = global("./adapters/credit-card-tokenization-fastlane");
let closure_7 = global("./generators/credit-card-for-fastlane-tokenization");
let closure_8 = {
(arg0, arg1) => {
if (arg1) {
let tmp2 = callback5(arg0);
} else {
tmp2 = callback2(arg0);
}
return tmp2;
},
configuration: global("./generators/configuration")
};
let obj = {
(arg0, arg1, arg2) => {
if (arg2) {
let tmp2 = callback4(arg0, arg1);
} else {
tmp2 = callback3(arg0, arg1);
}
return tmp2;
},
configuration: global("./adapters/configuration")
};
module.exports = GraphQLRequest;
},
{ "../../../lib/assign": 140, "../../../lib/is-fastlane-checkout": 171, "../../../lib/snake-case-to-camel-case": 179, "../../constants": 93, "./adapters/configuration": 99, "./adapters/credit-card-tokenization": 101, "./adapters/credit-card-tokenization-fastlane": 100, "./generators/configuration": 103, "./generators/credit-card-for-fastlane-tokenization": 104, "./generators/credit-card-tokenization": 105 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("../../lib/once");
let closure_1 = global("./ajax-driver");
module.exports = (method) => {
let prototype = arg1;
if (!arg1) {
const _Function = Function;
prototype = Function.prototype;
}
let str = method.method;
if (!str) {
str = "GET";
}
method.method = str.toUpperCase();
let num = 60000;
if (null != method.timeout) {
num = method.timeout;
}
method.timeout = num;
method.data = method.data || {};
closure_1.request(method, closure_0(prototype));
};
},
{ "../../lib/once": 176, "./ajax-driver": 97 }
];
items = [
(arg0, arg1, arg2) => {
module.exports = (arg0) => {
try {
const _JSON = JSON;
return JSON.parse(arg0);
} catch (err) {
}
};
},
{}
];
items = [
(arg0, arg1, arg2) => {
module.exports = (str, str2) => {
if (typeof str !== "string") {
const _Error = Error;
const error = new Error("Method must be a string");
throw error;
} else {
let tmp2 = "get" !== str.toLowerCase();
if (tmp2) {
tmp2 = null != str2;
}
let tmp3 = str2;
if (tmp2) {
let json = str2;
if (typeof str2 !== "string") {
const _JSON = JSON;
json = JSON.stringify(str2);
}
tmp3 = json;
}
return tmp3;
}
};
},
{}
];
items = [
(arg0, arg1, arg2) => {
let _XMLHttpRequest = typeof window !== "undefined";
if (typeof window !== "undefined") {
const _window2 = window;
_XMLHttpRequest = window.XMLHttpRequest;
}
if (_XMLHttpRequest) {
let _window = window;
let xMLHttpRequest = new window.XMLHttpRequest();
_XMLHttpRequest = "withCredentials" in xMLHttpRequest;
}
module.exports = {
isAvailable: _XMLHttpRequest,
getRequestObject() {
const _window = window;
if (_XMLHttpRequest) {
let xMLHttpRequest = new _window.XMLHttpRequest();
} else {
xMLHttpRequest = new _window.XDomainRequest();
}
return xMLHttpRequest;
}
};
},
{}
];
items = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
let obj = { type: globalResult.types.MERCHANT, code: "DATA_COLLECTOR_KOUNT_NOT_ENABLED", message: "Kount is not enabled for this merchant." };
obj = { type: globalResult.types.MERCHANT, code: "DATA_COLLECTOR_KOUNT_ERROR" };
obj = { type: globalResult.types.MERCHANT, code: "DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS", message: "Data Collector must be created with Kount and/or PayPal." };
module.exports = { DATA_COLLECTOR_KOUNT_NOT_ENABLED: obj, DATA_COLLECTOR_KOUNT_ERROR: obj, DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS: obj };
},
{ "../lib/braintree-error": 143 }
];
items = [
(arg0, arg1, arg2) => {
class Fraudnet {
constructor() {
return;
}
initialize(arg0) {
self = this;
sessionId = this;
({ sessionId, environment } = global);
if (!sessionId) {
sessionId = global.clientSessionId;
}
self.sessionId = sessionId;
if (self.sessionId) {
str = self.sessionId;
num = 32;
num2 = 0;
self.sessionId = str.substring(0, 32);
}
if (!global.sessionId) {
sessionId = self.sessionId;
}
date = new Date();
self._beaconId = `https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p=${tmp}&t=${obj.getTime() / 1000}&a=14`;
body = document.body;
({ sessionId: sessionId2, _beaconId } = self);
appendChildResult = body.appendChild(document.createElement("script"));
obj = { f: sessionId2, s: FRAUDNET_SOURCE, b: _beaconId };
if ("production" !== environment) {
flag = true;
obj.sandbox = true;
}
appendChildResult.type = "application/json";
attr = appendChildResult.setAttribute("fncls", FRAUDNET_FNCLS);
appendChildResult.text = JSON.stringify(obj);
self._parameterBlock = appendChildResult;
obj1 = { src: FRAUDNET_URL };
promise = loadScript(obj1);
nextPromise = promise.then((_thirdPartyBlock) => {
sessionId._thirdPartyBlock = _thirdPartyBlock;
return sessionId;
});
return nextPromise.catch(() => null);
}
teardown() {
element = document.querySelector("iframe[title=\"ppfniframe\"]");
parentNode = element;
if (element) {
parentNode = element.parentNode;
}
if (parentNode) {
parentNode2 = element.parentNode;
removeChildResult = parentNode2.removeChild(element);
}
element1 = document.querySelector("iframe[title=\"pbf\"]");
parentNode3 = element1;
if (element1) {
parentNode3 = element1.parentNode;
}
if (parentNode3) {
parentNode4 = element1.parentNode;
removeChildResult1 = parentNode4.removeChild(element1);
}
_parameterBlock = this._parameterBlock;
parentNode5 = _parameterBlock;
if (_parameterBlock) {
parentNode5 = _parameterBlock.parentNode;
}
if (parentNode5) {
parentNode6 = _parameterBlock.parentNode;
removeChildResult2 = parentNode6.removeChild(_parameterBlock);
}
_thirdPartyBlock = this._thirdPartyBlock;
parentNode7 = _thirdPartyBlock;
if (_thirdPartyBlock) {
parentNode7 = _thirdPartyBlock.parentNode;
}
if (parentNode7) {
parentNode8 = _thirdPartyBlock.parentNode;
removeChildResult3 = parentNode8.removeChild(_thirdPartyBlock);
}
return;
}
}
const FRAUDNET_FNCLS = global("../lib/constants").FRAUDNET_FNCLS;
const FRAUDNET_SOURCE = global("../lib/constants").FRAUDNET_SOURCE;
const FRAUDNET_URL = global("../lib/constants").FRAUDNET_URL;
const loadScript = global("../lib/assets").loadScript;
module.exports = {
setup(arg0) {
let obj = arg0;
if (!arg0) {
obj = {};
}
obj = Object.create(Fraudnet.prototype);
if (!obj.sessionId) {
if (closure_0) {
obj.sessionId = closure_0;
let resolved = Promise.resolve(obj);
}
return resolved;
}
resolved = obj.initialize(obj);
},
clearSessionIdCache() {
let c0 = null;
}
};
},
{ "../lib/assets": 139, "../lib/constants": 145 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("./kount");
let closure_1 = global("./fraudnet");
let closure_2 = global("../lib/braintree-error");
let closure_3 = global("../lib/basic-component-verification");
let closure_4 = global("../lib/create-deferred-client");
let closure_5 = global("../lib/create-assets-url");
let closure_6 = global("../lib/methods");
let closure_7 = global("../lib/convert-methods-to-error");
const globalResult = global("@braintree/wrap-promise");
let closure_8 = globalResult;
let closure_9 = global("./errors");
module.exports = {
create: globalResult(function create(client) {
let closure_0 = client;
let closure_2 = { _instances: [] };
return closure_3.verify({ name: "Data Collector", client: client.client, authorization: client.authorization }).then(() => {
obj._instantiatedWithAClient = !client.useDeferredClient;
obj = { authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: outer1_5.create(client.authorization), name: "Data Collector" };
obj = outer1_4.create(obj);
const nextPromise = obj.then((getConfiguration) => {
const configuration = getConfiguration.getConfiguration();
if (true === closure_0.kount) {
if (configuration.gatewayConfiguration.kount) {
try {
let obj = { environment: null, merchantId: null };
obj[0] = configuration.gatewayConfiguration.environment;
obj[1] = configuration.gatewayConfiguration.kount.kountMerchantId;
const setupResult = closure_0.setup(obj);
let deviceData = setupResult.deviceData;
const _instances = closure_2._instances;
_instances.push(setupResult);
} catch (tmp8) {
obj = { type: null, code: null, message: null };
obj[0] = outer1_9.DATA_COLLECTOR_KOUNT_ERROR.type;
obj[1] = outer1_9.DATA_COLLECTOR_KOUNT_ERROR.code;
obj[2] = tmp8.message;
const tmp15 = new outer1_2(obj);
return Promise.reject(tmp15);
}
}
return Promise.resolve(getConfiguration);
}
deviceData = {};
});
const tmp = obj;
obj._createPromise = obj.then((getConfiguration) => {
const configuration = getConfiguration.getConfiguration();
if (true === closure_0.kount) {
if (configuration.gatewayConfiguration.kount) {
try {
let obj = { environment: null, merchantId: null };
obj[0] = configuration.gatewayConfiguration.environment;
obj[1] = configuration.gatewayConfiguration.kount.kountMerchantId;
const setupResult = closure_0.setup(obj);
let deviceData = setupResult.deviceData;
const _instances = closure_2._instances;
_instances.push(setupResult);
} catch (tmp8) {
obj = { type: null, code: null, message: null };
obj[0] = outer1_9.DATA_COLLECTOR_KOUNT_ERROR.type;
obj[1] = outer1_9.DATA_COLLECTOR_KOUNT_ERROR.code;
obj[2] = tmp8.message;
const tmp15 = new outer1_2(obj);
return Promise.reject(tmp15);
}
}
return Promise.resolve(getConfiguration);
}
deviceData = {};
}).then((getConfiguration) => {
const configuration = getConfiguration.getConfiguration();
let correlationId = closure_0.riskCorrelationId;
if (!correlationId) {
correlationId = tmp3.clientMetadataId;
}
if (!correlationId) {
correlationId = tmp3.correlationId;
}
return outer1_1.setup({ sessionId: correlationId, clientSessionId: configuration.analyticsMetadata.sessionId, environment: configuration.gatewayConfiguration.environment }).then(() => { ... });
}).then(() => {
let rejectResult = closure_2;
if (0 === closure_2._instances.length) {
const tmp10 = new outer1_2(outer1_9.DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS);
rejectResult = Promise.reject(tmp10);
} else {
const _JSON = JSON;
rejectResult.deviceData = JSON.stringify(closure_1);
rejectResult.rawDeviceData = closure_1;
}
return rejectResult;
});
client = obj;
obj.teardown = outer1_8(function teardown() {
return closure_0._createPromise.then(() => { ... });
});
client = obj;
obj.getDeviceData = outer1_8(function getDeviceData(arg0) {
let obj = arg0;
obj = arg0;
if (!arg0) {
obj = {};
}
return obj._createPromise.then(() => { ... });
});
let _createPromise = obj;
if (obj._instantiatedWithAClient) {
_createPromise = tmp._createPromise;
}
return _createPromise;
});
}),
VERSION: "3.112.1"
};
},
{ "../lib/basic-component-verification": 141, "../lib/braintree-error": 143, "../lib/convert-methods-to-error": 146, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "../lib/methods": 175, "./errors": 112, "./fraudnet": 113, "./kount": 115, "@braintree/wrap-promise": 40 }
];
items = [
(arg0, arg1, arg2) => {
class Kount {
constructor(arg0) {
self = this;
obj = Kount;
cachedDeviceData = Kount.getCachedDeviceData(global.merchantId);
if (cachedDeviceData) {
self.deviceData = cachedDeviceData;
flag = true;
self._isCached = true;
return;
} else {
self._currentEnvironment = self._initializeEnvironment(global);
tmp2 = c0;
random = c0.random;
startCollectorsResult = random.startCollectors();
self._deviceSessionId = self._generateDeviceSessionId();
self.deviceData = self._getDeviceData();
setCachedDeviceDataResult = obj.setCachedDeviceData(global.merchantId, self.deviceData);
self._iframe = self._setupIFrame();
return;
}
}
static getCachedDeviceData(arg0) {
return closure_3[global];
}
static setCachedDeviceData(arg0, arg1) {
closure_3[global] = module;
return;
}
teardown() {
self = this;
if (!this._isCached) {
tmp = c0;
random = c0.random;
stopCollectorsResult = random.stopCollectors();
_removeIframeResult = self._removeIframe();
}
return;
}
_removeIframe() {
parentNode = this._iframe.parentNode;
removeChildResult = parentNode.removeChild(this._iframe);
return;
}
_getDeviceData() {
obj = { deviceSessionId: this._deviceSessionId, fraudMerchantId: this._currentEnvironment.id };
return c1(obj);
}
_generateDeviceSessionId() {
random = c0.random;
hex = c0.codec.hex;
return hex.fromBits(random.randomWords(4, 0));
}
_setupIFrame() {
self = this;
c0 = `?m=${this._currentEnvironment.id}&s=${this._deviceSessionId}`;
element = document.createElement("iframe");
iframe = element;
element.width = 1;
element.id = `braintreeDataFrame-${this._deviceSessionId}`;
element.height = 1;
element.frameBorder = 0;
element.scrolling = "no";
element.style.position = "fixed";
element.style.left = "-999999px";
element.style.top = "-999999px";
element.title = "Braintree-Kount-iframe";
attr = element.setAttribute("aria-hidden", "true");
body = document.body;
appendChildResult = body.appendChild(element);
timerId = setTimeout(() => {
element.src = `${self._currentEnvironment.url}/logo.htm${closure_0}`;
element.innerHTML = `
`;
}, 10);
return element;
}
_initializeEnvironment(arg0) {
tmp = c2[global.environment];
if (null == tmp) {
tmp2 = globalThis;
_Error = Error;
str = " is not a valid environment for kount.environment";
tmp3 = new.target;
tmp4 = new.target;
error = new Error(global.environment + " is not a valid environment for kount.environment");
tmp6 = error;
throw error;
} else {
obj = { url: null, name: null, id: null };
obj[0] = tmp;
({ environment: obj[1], merchantId: obj[2] } = global);
return obj;
}
}
}
let closure_0 = global("./vendor/sjcl");
let closure_1 = global("../lib/camel-case-to-snake-case");
let obj = { development: "https://assets.qa.braintreepayments.com/data", qa: "https://assets.qa.braintreepayments.com/data", sandbox: "https://assets.braintreegateway.com/sandbox/data", production: "https://assets.braintreegateway.com/data" };
let closure_3 = {};
obj = {
setup(arg0) {
let obj = arg0;
if (null == arg0) {
obj = {};
}
obj = Object.create(obj2.prototype);
const cachedDeviceData = obj2.getCachedDeviceData(obj.merchantId);
if (cachedDeviceData) {
obj.deviceData = cachedDeviceData;
obj._isCached = true;
} else {
obj._currentEnvironment = obj._initializeEnvironment(obj);
const random = closure_0.random;
random.startCollectors();
obj._deviceSessionId = obj._generateDeviceSessionId();
obj.deviceData = obj._getDeviceData();
obj2.setCachedDeviceData(obj.merchantId, obj.deviceData);
obj._iframe = obj._setupIFrame();
}
return obj;
},
Kount,
environmentUrls: obj
};
module.exports = obj;
},
{ "../lib/camel-case-to-snake-case": 144, "./vendor/sjcl": 116 }
];
items = [
(arg0, arg1, arg2) => {
function t(arg0, arg1, arg2) {
let tmp5;
let tmp6;
let tmp7;
let tmp8;
let tmp9;
if (4 !== arg1.length) {
const invalid = new obj.exception.invalid("invalid aes block size");
throw invalid;
} else {
let num = 1;
if (arg2) {
num = 3;
}
let num3 = 3;
if (arg2) {
num3 = 1;
}
let tmp3 = arg1[num3] ^ arr2[3];
const diff = arr2.length / 4 - 2;
const items = [0, 0, 0, 0];
[tmp5, tmp6, tmp7, tmp8, tmp9] = arg0.l[arg2];
let num10 = 4;
let num11 = 0;
let tmp10 = tmp2;
let tmp11 = tmp;
let tmp12 = tmp34;
let num12 = 4;
let tmp13 = tmp2;
let tmp14 = tmp;
let tmp15 = tmp34;
let tmp16 = tmp3;
if (0 < diff) {
do {
let tmp17 = tmp5[tmp12 >>> 24] ^ tmp6[tmp11 >> 16 & 255] ^ tmp7[tmp10 >> 8 & 255] ^ tmp8[255 & tmp3] ^ arr2[num10];
let tmp18 = tmp5[tmp11 >>> 24] ^ tmp6[tmp10 >> 16 & 255] ^ tmp7[tmp3 >> 8 & 255] ^ tmp8[255 & tmp12] ^ arr2[num10 + 1];
let tmp19 = tmp5[tmp10 >>> 24] ^ tmp6[tmp3 >> 16 & 255] ^ tmp7[tmp12 >> 8 & 255] ^ tmp8[255 & tmp11] ^ arr2[num10 + 2];
tmp3 = tmp5[tmp3 >>> 24] ^ tmp6[tmp12 >> 16 & 255] ^ tmp7[tmp11 >> 8 & 255] ^ tmp8[255 & tmp10] ^ arr2[num10 + 3];
num10 = num10 + 4;
num11 = num11 + 1;
tmp10 = tmp19;
tmp11 = tmp18;
tmp12 = tmp17;
num12 = num10;
tmp13 = tmp19;
tmp14 = tmp18;
tmp15 = tmp17;
tmp16 = tmp3;
} while (num11 < diff);
}
let num13 = 0;
do {
let tmp21 = num13;
let tmp25 = tmp16;
let tmp26 = num13;
let tmp20 = num12;
let tmp22 = tmp13;
let tmp23 = tmp14;
let tmp24 = tmp15;
if (arg2) {
tmp26 = 3 & -num13;
}
num12 = num12 + 1;
items[tmp26] = tmp9[tmp15 >>> 24] << 24 ^ tmp9[tmp14 >> 16 & 255] << 16 ^ tmp9[tmp13 >> 8 & 255] << 8 ^ tmp9[255 & tmp16] ^ arr2[tmp20];
num13 = num13 + 1;
tmp13 = tmp16;
tmp14 = tmp22;
tmp15 = tmp23;
tmp16 = tmp24;
} while (num13 < 4);
return items;
}
}
function u(u) {
let tmp11;
let tmp12;
let tmp13;
let tmp15;
let tmp16;
let tmp17;
let tmp2;
let tmp21;
let tmp22;
let tmp3;
let tmp4;
let tmp5;
let tmp6;
let tmp7;
let tmp8;
let tmp9;
u = u.u;
[tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9] = u;
let num = 0;
do {
let tmp10 = tmp9;
let tmp14 = tmp5;
let tmp18 = num;
tmp11 = tmp8;
tmp12 = tmp7;
tmp13 = tmp6;
tmp15 = tmp4;
tmp16 = tmp3;
tmp17 = tmp2;
if (num < 16) {
let tmp19 = arg1[num];
} else {
let tmp23 = arg1[num + 1 & 15];
let tmp24 = arg1[num + 14 & 15];
let tmp25 = 15 & num;
tmp19 = (tmp23 >>> 7 ^ tmp23 >>> 18 ^ tmp23 >>> 3 ^ tmp23 << 25 ^ tmp23 << 14) + (tmp24 >>> 17 ^ tmp24 >>> 19 ^ tmp24 >>> 10 ^ tmp24 << 15 ^ tmp24 << 13) + arg1[tmp25] + arg1[num + 9 & 15] | 0;
arg1[tmp25] = tmp19;
}
let sum = tmp19 + tmp9 + (tmp6 >>> 6 ^ tmp6 >>> 11 ^ tmp6 >>> 25 ^ tmp6 << 26 ^ tmp6 << 21 ^ tmp6 << 7) + (tmp8 ^ tmp6 & (tmp7 ^ tmp8)) + tmp[num];
tmp21 = tmp5 + sum | 0;
tmp22 = sum + (tmp2 & tmp3 ^ tmp4 & (tmp2 ^ tmp3)) + (tmp2 >>> 2 ^ tmp2 >>> 13 ^ tmp2 >>> 22 ^ tmp2 << 30 ^ tmp2 << 19 ^ tmp2 << 10) | 0;
num = num + 1;
tmp9 = tmp8;
tmp8 = tmp7;
tmp7 = tmp6;
tmp6 = tmp21;
tmp5 = tmp4;
tmp4 = tmp3;
tmp3 = tmp2;
tmp2 = tmp22;
} while (num < 64);
u[0] = u[0] + tmp22 | 0;
u[1] = u[1] + tmp17 | 0;
u[2] = u[2] + tmp16 | 0;
u[3] = u[3] + tmp15 | 0;
u[4] = u[4] + tmp21 | 0;
u[5] = u[5] + tmp13 | 0;
u[6] = u[6] + tmp12 | 0;
u[7] = u[7] + tmp11 | 0;
}
function C(addEntropy) {
if (typeof window !== "undefined") {
const _window3 = window;
if (window.performance) {
const _window = window;
if (typeof window.performance.now === "function") {
const _window2 = window;
const _performance = window.performance;
addEntropy.addEntropy(_performance.now(), 0, "loadtime");
}
}
}
addEntropy.addEntropy(new Date().valueOf(), 0, "loadtime");
}
function y(g) {
g.g[0] = g.g[0] + 1 | 0;
let num = 0;
if (!g.g[0]) {
const sum = num + 1;
while (sum < 4) {
g.g[sum] = g.g[sum] + 1 | 0;
num = sum;
if (g.g[sum]) {
break;
}
}
}
const C = g.C;
g.g[0] = g.g[0] + 1 | 0;
let num2 = 0;
if (!g.g[0]) {
const sum1 = num2 + 1;
while (sum1 < 4) {
g.g[sum1] = g.g[sum1] + 1 | 0;
num2 = sum1;
if (g.g[sum1]) {
break;
}
}
}
const C2 = g.C;
g.b = C.encrypt(g.g).concat(C2.encrypt(g.g));
const aes = new obj.cipher.aes(g.b);
g.C = aes;
}
obj = { cipher: {}, hash: {}, keyexchange: {}, mode: {}, misc: {}, codec: {}, exception: obj };
obj = {
corrupt(arg0) {
},
invalid(arg0) {
},
bug(arg0) {
},
notReady(arg0) {
}
};
obj.cipher.aes = function(arr) {
const self = this;
if (!this.l[0][0][0]) {
self.G();
}
if (4 !== arr.length) {
if (6 !== length) {
if (8 !== length) {
const invalid = new obj.exception.invalid("invalid aes key size");
throw invalid;
}
}
}
const substr = arr.slice(0);
const items = [substr, ];
const items1 = [];
items[1] = items1;
self.b = items;
let num3 = 1;
let sum = length;
let diff1 = length;
if (arr.length < 4 * arr.length + 28) {
do {
let tmp8 = substr[sum - 1];
let tmp9 = 0 == sum % length;
let tmp10 = num3;
let tmp11 = sum;
if (!tmp9) {
let tmp12 = tmp5;
if (tmp5) {
tmp12 = 4 == sum % length;
}
tmp9 = tmp12;
}
let tmp13 = num3;
let tmp14 = tmp8;
if (tmp9) {
let tmp15 = tmp2[tmp8 >>> 24] << 24 ^ tmp2[tmp8 >> 16 & 255] << 16 ^ tmp2[tmp8 >> 8 & 255] << 8 ^ tmp2[255 & tmp8];
let tmp16 = num3;
let tmp17 = tmp15;
if (0 == sum % length) {
tmp17 = tmp15 << 8 ^ tmp15 >>> 24 ^ num3 << 24;
tmp16 = num3 << 1 ^ 283 * (num3 >> 7);
}
tmp13 = tmp16;
tmp14 = tmp17;
}
substr[sum] = substr[sum - length] ^ tmp14;
sum = sum + 1;
num3 = tmp13;
diff1 = sum;
} while (sum < 4 * length + 28);
}
let num4 = 0;
while (diff1) {
let tmp18 = num4;
let tmp19 = diff1;
let diff = diff1;
if (!(3 & num4)) {
diff = diff1 - 4;
}
let tmp21 = substr[diff];
let tmp22 = tmp21;
if (4 < diff1) {
tmp22 = tmp21;
if (num4 >= 4) {
tmp22 = tmp3[0][tmp2[tmp21 >>> 24]] ^ tmp3[1][tmp2[tmp21 >> 16 & 255]] ^ tmp3[2][tmp2[tmp21 >> 8 & 255]] ^ tmp3[3][tmp2[255 & tmp21]];
}
}
items1[num4] = tmp22;
num4 = num4 + 1;
diff1 = diff1 - 1;
}
};
obj = {
encrypt(g) {
return t(this, g, 0);
},
decrypt(c0) {
return t(this, c0, 1);
},
l: items1,
G() {
let tmp14;
const first = this.l[0];
const items = [];
const items1 = [];
let num = 0;
do {
let tmp4 = num << 1 ^ 283 * (num >> 7);
items[num] = tmp4;
items1[tmp4 ^ num] = num;
num = num + 1;
} while (num < 256);
let num2 = 0;
let num3 = 0;
let num4 = 0;
if (!first[4][0]) {
const tmp5 = num2 ^ num2 << 1 ^ num2 << 2 ^ num2 << 3 ^ num2 << 4;
tmp3[num3] = tmp5 >> 8 ^ 255 & tmp5 ^ 99;
tmp2[4][tmp5 >> 8 ^ 255 & tmp5 ^ 99] = num3;
let num5 = items[num3];
let tmp8 = 16843009 * items[tmp7] ^ 65537 * tmp7 ^ 257 * num5 ^ 16843008 * num3;
let tmp9 = 257 * items[tmp6] ^ 16843008 * tmp6;
let num6 = 0;
do {
do {
let tmp12 = tmp9 << 24 ^ tmp9 >>> 8;
first[num6][num3] = tmp12;
let tmp13 = tmp8 << 24 ^ tmp8 >>> 8;
tmp2[num6][tmp6] = tmp13;
num6 = num6 + 1;
tmp8 = tmp13;
tmp9 = tmp12;
} while (num6 < 4);
if (!num5) {
num5 = 1;
}
tmp14 = num3 ^ num5;
let tmp15 = items1[num2] || 1;
num2 = tmp15;
num3 = tmp14;
num4 = 0;
} while (!tmp3[tmp14]);
}
do {
let arr3 = first[num4];
first[num4] = arr3.slice(0);
let arr4 = tmp2[num4];
tmp2[num4] = arr4.slice(0);
num4 = num4 + 1;
let num7 = 5;
} while (num4 < 5);
}
};
let items = [[], [], [], [], []];
items1 = [items, ];
let items2 = [[], [], [], [], []];
items1[1] = items2;
obj.cipher.aes.prototype = obj;
obj.bitArray = {
bitSlice(arr) {
const bitArray = obj.bitArray;
const substr = bitArray.M(arr.slice(arg1 / 32), 32 - (31 & arg1)).slice(1);
let clampResult = substr;
if (undefined !== arg2) {
const bitArray2 = obj.bitArray;
clampResult = bitArray2.clamp(substr, arg2 - arg1);
}
return clampResult;
},
extract(arg0, arg1, arg2) {
const rounded = Math.floor(-arg1 - arg2 & 31);
if (-32 & (arg1 + arg2 - 1 ^ arg1)) {
let tmp3 = tmp2 << 32 - rounded ^ arg0[arg1 / 32 + 1 | 0] >>> rounded;
} else {
tmp3 = tmp2 >>> rounded;
}
return tmp3 & (1 << arg2) - 1;
},
concat(arr) {
if (0 !== arr.length) {
if (0 !== arg1.length) {
const bitArray = obj.bitArray;
const partial = bitArray.getPartial(tmp);
if (32 === partial) {
let combined = arr.concat(arg1);
} else {
const bitArray2 = obj.bitArray;
combined = bitArray2.M(arg1, partial, tmp | 0, arr.slice(0, arr.length - 1));
const tmp4 = tmp | 0;
}
return combined;
}
}
return arr.concat(arg1);
},
bitLength(toBitsResult) {
let num = 0;
if (0 !== toBitsResult.length) {
const bitArray = obj.bitArray;
const diff = length - 1;
num = 32 * diff + bitArray.getPartial(toBitsResult[length - 1]);
}
return num;
},
clamp(arr) {
if (32 * arr.length < arg1) {
return arr;
} else {
const _Math = Math;
const substr = arr.slice(0, Math.ceil(arg1 / 32));
if (tmp) {
const bitArray = obj.bitArray;
const diff = length - 1;
substr[diff] = bitArray.partial(tmp5, substr[length - 1] & 2147483648 >> tmp5 - 1, 1);
}
return substr;
}
},
partial(arg0, arg1, arg2) {
if (32 === arg0) {
return arg1;
} else {
if (arg2) {
let tmp2 = arg1 | 0;
} else {
tmp2 = arg1 << 32 - arg0;
}
const sum = tmp2 + 1099511627776 * arg0;
}
},
getPartial(arr) {
return Math.round(arr / 1099511627776) || 32;
},
equal(toBitsResult, toBitsResult) {
let bitArray;
let bitArray2;
let length;
({ bitArray, bitArray: bitArray2 } = obj);
if (bitLengthResult !== bitArray2.bitLength(toBitsResult)) {
return false;
} else {
let num3 = 0;
let num4 = 0;
let num5 = 0;
if (0 < toBitsResult.length) {
do {
num3 = num3 | toBitsResult[num4] ^ toBitsResult[num4];
num4 = num4 + 1;
num5 = num3;
length = toBitsResult.length;
} while (num4 < length);
}
return 0 === num5;
}
bitLengthResult = bitArray.bitLength(toBitsResult);
},
M(arr) {
let length;
let items = arg3;
if (undefined === arg3) {
items = [];
}
let diff = arg1;
let num = arg2;
let num2 = arg2;
let tmp2 = arg1;
if (32 <= arg1) {
do {
arr = items.push(num);
diff = diff - 32;
num = 0;
num2 = 0;
tmp2 = diff;
} while (32 <= diff);
}
if (0 === tmp2) {
return items.concat(arr);
} else {
let num3 = 0;
let tmp5 = num2;
let arr1 = num2;
if (0 < arr.length) {
do {
arr = items.push(tmp5 | arr[num3] >>> tmp2);
tmp5 = arr[num3] << 32 - tmp2;
num3 = num3 + 1;
arr1 = tmp5;
length = arr.length;
} while (num3 < length);
}
let num4 = 0;
if (arr.length) {
num4 = arr[arr.length - 1];
}
const bitArray = obj.bitArray;
const partial = bitArray.getPartial(num4);
const bitArray2 = obj.bitArray;
if (32 >= tmp2 + partial) {
arr1 = items.pop();
}
items.push(bitArray2.partial(tmp2 + partial & 31, arr1, 1));
return items;
}
},
Y(arg0, arg1) {
const items = [arg0[0] ^ arg1[0], arg0[1] ^ arg1[1], arg0[2] ^ arg1[2], arg0[3] ^ arg1[3]];
return items;
},
byteswapM(arg0) {
let length;
let num = 0;
if (0 < arg0.length) {
do {
let tmp = arg0[num];
arg0[num] = tmp >>> 24 | tmp >>> 8 & 65280 | (65280 & tmp) << 8 | tmp << 24;
num = num + 1;
length = arg0.length;
} while (num < length);
}
return arg0;
}
};
obj.codec.utf8String = {
fromBits(toBitsResult) {
const bitArray = obj.bitArray;
const bitLengthResult = bitArray.bitLength(toBitsResult);
let str = "";
let str2 = "";
let num = 0;
if (0 < bitLengthResult / 8) {
do {
let tmp3 = str;
let tmp4 = tmp2;
let tmp5 = num;
if (!(3 & num)) {
tmp4 = toBitsResult[num / 4];
}
let _String = String;
str = str + String.fromCharCode(tmp4 >>> 8 >>> 8 >>> 8);
tmp2 = tmp4 << 8;
num = num + 1;
str2 = str;
} while (num < bitLengthResult / 8);
}
return decodeURIComponent(escape(str2));
},
toBits(arg0) {
const unescapeResult = unescape(encodeURIComponent(arg0));
const items = [];
let num = 0;
let num2 = 0;
let num3 = 0;
let num4 = 0;
if (0 < unescapeResult.length) {
do {
let tmp = num << 8 | unescapeResult.charCodeAt(num2);
let tmp2 = num2;
let num5 = tmp;
if (!(3 & ~num2)) {
let arr = items.push(tmp);
num5 = 0;
}
num2 = num2 + 1;
num = num5;
num3 = num5;
num4 = num2;
} while (num2 < unescapeResult.length);
}
if (3 & num4) {
const bitArray = obj.bitArray;
items.push(bitArray.partial(8 * tmp4, num3));
}
return items;
}
};
obj.codec.hex = {
fromBits(toBitsResult) {
let length;
let str = "";
let num = 0;
let str2 = "";
if (0 < toBitsResult.length) {
do {
let str3 = 263882790666240 + (toBitsResult[num] | 0);
let str4 = str3.toString(16);
str = `${str4.substr(4)}`;
num = num + 1;
str2 = str;
length = toBitsResult.length;
} while (num < length);
}
const bitArray = obj.bitArray;
return str2.substr(0, bitArray.bitLength(toBitsResult) / 4);
},
toBits(str) {
let length;
const items = [];
const replaced = str.replace(/\s|0x/g, "");
let num = 0;
if (0 < `${arr2}00000000`.length) {
do {
let _parseInt = parseInt;
let arr = items.push(0 ^ parseInt(`${arr2}00000000`.substr(num, 8), 16));
num = num + 8;
length = `${arr2}00000000`.length;
} while (num < length);
}
const bitArray = obj.bitArray;
return bitArray.clamp(items, 4 * replaced.length);
}
};
obj.hash.sha256 = function(u) {
const self = this;
if (!this.b[0]) {
self.G();
}
if (u) {
u = u.u;
self.u = u.slice(0);
const o = u.o;
self.o = o.slice(0);
self.h = u.h;
} else {
self.reset();
}
};
obj.hash.sha256.hash = (arg0) => {
const sha256 = new obj.hash.sha256();
return sha256.update(arg0).finalize();
};
obj.hash.sha256.prototype = {
blockSize: 512,
reset() {
const K = this.K;
this.u = K.slice(0);
this.o = [];
this.h = 0;
return this;
},
update(toBitsResult) {
if (typeof toBitsResult === "string") {
const utf8String = obj.codec.utf8String;
toBitsResult = utf8String.toBits(toBitsResult);
}
const self = this;
const bitArray = obj.bitArray;
const combined = bitArray.concat(this.o, toBitsResult);
this.o = combined;
const h = this.h;
const bitArray2 = obj.bitArray;
const sum = h + bitArray2.bitLength(toBitsResult);
this.h = sum;
if (9007199254740991 < sum) {
const invalid = new tmp2.exception.invalid("Cannot hash more than 2^53 - 1 bits");
throw invalid;
} else {
const _Uint32Array2 = Uint32Array;
if (typeof Uint32Array !== "undefined") {
const _Uint32Array = Uint32Array;
const uint32Array = new Uint32Array(combined);
let diff = 512 + h - (512 + h & 511);
let num6 = 0;
let num7 = 0;
if (diff <= sum) {
do {
let tmp12 = u;
let sum1 = num6 + 1;
let tmp14 = u(self, uint32Array.subarray(16 * num6, 16 * sum1));
diff = diff + 512;
num6 = sum1;
num7 = sum1;
} while (diff <= sum);
}
combined.splice(0, 16 * num7);
} else {
let diff1 = 512 + h - (512 + h & 511);
if (diff1 <= sum) {
do {
let tmp4 = u;
let tmp5 = u(self, combined.splice(0, 16));
diff1 = diff1 + 512;
} while (diff1 <= sum);
}
}
return self;
}
tmp2 = obj;
},
finalize() {
let bitArray;
let bitArray2;
let length;
let o;
let tmp4;
let u;
const self = this;
({ bitArray, bitArray: bitArray2 } = obj);
({ o, u } = this);
const items = [bitArray2.partial(1, 1)];
const combined = bitArray.concat(o, items);
let sum = combined.length + 2;
if (15 & sum) {
do {
let arr = combined.push(0);
let sum1 = sum + 1;
sum = sum1;
tmp4 = 15 & sum1;
} while (tmp4);
}
combined.push(Math.floor(self.h / 4294967296));
combined.push(self.h | 0);
if (combined.length) {
do {
let tmp7 = u;
let tmp8 = u(self, combined.splice(0, 16));
length = combined.length;
} while (length);
}
self.reset();
return u;
},
K: [],
b: [],
G() {
let sum1;
const self = this;
let num = 2;
let num2 = 0;
do {
let tmp = num;
let tmp2 = num2;
let num3 = 2;
let flag = true;
if (4 <= num) {
let tmp3 = num3;
flag = false;
while (0 !== num % num3) {
let sum = num3 + 1;
num3 = sum;
flag = true;
if (sum * sum > num) {
break;
}
}
}
sum1 = num2;
if (flag) {
if (num2 < 8) {
let _Math = Math;
let powResult = Math.pow(num, 0.5);
let _Math2 = Math;
self.K[num2] = 4294967296 * (powResult - Math.floor(powResult)) | 0;
}
let _Math3 = Math;
let powResult1 = Math.pow(num, 0.3333333333333333);
let _Math4 = Math;
self.b[num2] = 4294967296 * (powResult1 - Math.floor(powResult1)) | 0;
sum1 = num2 + 1;
}
num = num + 1;
num2 = sum1;
} while (sum1 < 64);
}
};
obj.prng = (D) => {
const obj = {};
const sha256 = new obj.hash.sha256();
const items = [sha256];
obj.c = items;
obj.i = [0];
obj.H = 0;
obj.v = {};
obj.F = 0;
obj.J = {};
obj.T = 0;
obj.j = 0;
obj.f = 0;
obj.L = 0;
obj.b = [0, 0, 0, 0, 0, 0, 0, 0];
obj.g = [0, 0, 0, 0];
obj.C = undefined;
obj.D = D;
obj.s = false;
obj.B = { progress: {}, seeded: {} };
obj.S = 0;
obj.m = 0;
obj.w = 1;
obj.A = 2;
obj.O = 65536;
obj.I = [0, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024];
obj.P = 30000;
obj.N = 80;
};
obj.prng.prototype = {
randomWords(arg0, arg1) {
const self = this;
const isReadyResult = this.isReady(arg1);
if (isReadyResult === this.m) {
const notReady = new obj.exception.notReady("generator isn't seeded");
throw notReady;
} else {
if (isReadyResult & self.A) {
const items = [];
const _Date = Date;
const date = new Date();
const sum = date.valueOf() + self.P;
items[0] = sum;
self.L = sum;
let num5 = 0;
do {
let _Math = Math;
let arr = items.push(4294967296 * Math.random() | 0);
num5 = num5 + 1;
} while (num5 < 16);
let num6 = 0;
let tmp9 = items;
if (0 < self.c.length) {
const first = self.c[0];
const combined = items.concat(first.finalize());
const first1 = self.i[0];
self.i[0] = 0;
let tmp13 = first1;
let num7 = 0;
let obj3 = combined;
if (!tmp2) {
const sum1 = num7 + 1;
num6 = tmp13;
tmp9 = obj3;
while (sum1 < self.c.length) {
let obj4 = self.c[sum1];
let combined1 = obj3.concat(obj4.finalize());
let sum2 = tmp13 + self.i[sum1];
self.i[sum1] = 0;
tmp13 = sum2;
num7 = sum1;
obj3 = combined1;
if (tmp10) {
continue;
} else {
tmp13 = sum2;
num7 = sum1;
obj3 = combined1;
num6 = sum2;
tmp9 = combined1;
if (self.H & 1 << sum1) {
break;
}
}
continue;
}
} else {
tmp13 = first1;
num7 = 0;
obj3 = combined;
num6 = first1;
tmp9 = combined;
}
}
if (self.H >= 1 << self.c.length) {
const c = self.c;
let sha256 = new obj.hash.sha256();
c.push(sha256);
const i = self.i;
i.push(0);
}
self.f = self.f - num6;
if (num6 > self.j) {
self.j = num6;
}
self.H = self.H + 1;
sha256 = obj.hash.sha256;
const b = self.b;
self.b = sha256.hash(b.concat(tmp9));
const aes = new obj.cipher.aes(self.b);
self.C = aes;
self.g[0] = self.g[0] + 1 | 0;
let num9 = 0;
if (!self.g[0]) {
const sum3 = num9 + 1;
while (sum3 < 4) {
self.g[sum3] = self.g[sum3] + 1 | 0;
num9 = sum3;
if (self.g[sum3]) {
break;
}
}
}
tmp2 = isReadyResult & self.w;
}
const items1 = [];
for (let num13 = 0; num13 < arg0; num13 = num13 + 4) {
let tmp33 = num13;
if (0 === (num13 + 1) % self.O) {
let tmp34 = y;
let tmp35 = y(self);
}
self.g[0] = self.g[0] + 1 | 0;
let num14 = 0;
if (!self.g[0]) {
let sum4 = num14 + 1;
while (sum4 < 4) {
self.g[sum4] = self.g[sum4] + 1 | 0;
num14 = sum4;
if (self.g[sum4]) {
break;
}
}
}
let C = self.C;
let encryptResult = C.encrypt(self.g);
let tmp38 = items1;
let arr2 = items1.push(encryptResult[0], encryptResult[1], encryptResult[2], encryptResult[3]);
}
y(self);
return items1.slice(0, arg0);
}
},
setDefaultParanoia(D) {
if (0 === D) {
if ("Setting paranoia=0 will ruin your security; use it only for testing" !== arg1) {
const invalid = new obj.exception.invalid("Setting paranoia=0 will ruin your security; use it only for testing");
throw invalid;
}
}
this.D = D;
},
addEntropy(_performance, arg1, loadtime) {
let length2;
let length3;
let tmp16;
let str = loadtime;
if (!loadtime) {
str = "user";
}
const self = this;
const valueOfResult = new Date().valueOf();
let num = this.v[str];
let tmp3 = this.J[str];
const date = new Date();
if (undefined === tmp3) {
self.T = +self.T + 1;
self.J[str] = +self.T;
tmp3 = tmp4;
}
if (undefined === num) {
self.v[str] = 0;
num = 0;
}
self.v[str] = (self.v[str] + 1) % self.c.length;
if ("number" === typeof _performance) {
let num16 = arg1;
if (undefined === arg1) {
num16 = 1;
}
const items = [tmp3, , , , , , ];
self.F = +self.F + 1;
items[1] = +self.F;
items[2] = 1;
items[3] = num16;
items[4] = valueOfResult;
items[5] = 1;
let num3 = _performance | 0;
items[6] = num3;
self.c[num].update(items);
let num4 = 0;
let tmp9 = num16;
const obj5 = self.c[num];
} else if ("object" === tmp5) {
const _Object = Object;
const call = toString.call;
const tmp10 = typeof call === "unknown" ? toString() : call(_performance);
if ("[object Uint32Array]" === tmp10) {
const items1 = [];
let num10 = 0;
num3 = 0;
let arr1 = items1;
if (0 < _performance.length) {
do {
let arr = items1.push(_performance[num10]);
let sum = num10 + 1;
num10 = sum;
num3 = 0;
arr1 = items1;
tmp16 = sum < _performance.length;
} while (tmp16);
}
} else {
let num6 = 0;
if ("[object Array]" !== tmp10) {
num6 = 1;
}
num3 = num6;
arr1 = _performance;
if (0 < _performance.length) {
let tmp13 = num6;
let num8 = 0;
arr1 = _performance;
num3 = num6;
if (!num6) {
while (true) {
let num7 = tmp13;
let tmp11 = num8;
if (typeof _performance[num8] !== "number") {
num7 = 1;
}
let sum1 = num8 + 1;
num3 = num7;
arr1 = _performance;
if (sum1 >= _performance.length) {
break;
} else {
tmp13 = num7;
num8 = sum1;
num3 = num7;
arr1 = _performance;
if (num7) {
break;
}
}
}
}
}
}
tmp9 = arg1;
num4 = num3;
if (!num3) {
let num11 = arg1;
if (undefined === arg1) {
let num13 = 0;
let num14 = 0;
num11 = 0;
if (0 < arr1.length) {
do {
let tmp17 = arr1[num13];
let tmp18 = num13;
let sum2 = num14;
let tmp20 = num14;
if (0 < tmp17) {
do {
sum2 = sum2 + 1;
tmp17 = tmp17 >>> 1;
tmp20 = sum2;
} while (0 < tmp17);
}
num13 = num13 + 1;
num14 = tmp20;
num11 = tmp20;
} while (num13 < arr1.length);
}
}
const items2 = [tmp3, , , , , ];
self.F = +self.F + 1;
items2[1] = +self.F;
items2[2] = 2;
items2[3] = num11;
items2[4] = valueOfResult;
items2[5] = arr1.length;
self.c[num].update(items2.concat(arr1));
tmp9 = num11;
num4 = num3;
const obj4 = self.c[num];
}
} else {
num4 = 1;
tmp9 = arg1;
if ("string" === tmp5) {
let length = arg1;
if (undefined === arg1) {
length = _performance.length;
}
const items3 = [tmp3, , , , , ];
self.F = +self.F + 1;
items3[1] = +self.F;
num3 = 3;
items3[2] = 3;
items3[3] = length;
items3[4] = valueOfResult;
items3[5] = _performance.length;
self.c[num].update(items3);
self.c[num].update(_performance);
num4 = 0;
tmp9 = length;
const obj2 = self.c[num];
const obj3 = self.c[num];
}
}
if (num4) {
const bug = new obj.exception.bug("random: addEntropy only supports number, array of numbers or string");
throw bug;
} else {
const i = self.i;
i[num] = i[num] + tmp9;
self.f = self.f + tmp9;
if (isReadyResult === self.m) {
if (self.isReady() !== self.m) {
const _Math = Math;
const seeded = obj.random.B.seeded;
const items4 = [];
const bound = Math.max(self.j, self.f);
for (const key10119 in seeded) {
let tmp40 = key10119;
if (!seeded.hasOwnProperty(key10119)) {
continue;
} else {
arr = items4.push(seeded[key10119]);
continue;
}
continue;
}
let num17 = 0;
if (0 < items4.length) {
do {
let tmp26 = items4[num17](bound);
num17 = num17 + 1;
length2 = items4.length;
} while (num17 < length2);
}
}
let progress = obj.random.B.progress;
const items5 = [];
progress = self.getProgress();
for (const key10138 in progress) {
let tmp41 = key10138;
if (!progress.hasOwnProperty(key10138)) {
continue;
} else {
arr1 = items5.push(progress[key10138]);
continue;
}
continue;
}
let num18 = 0;
if (0 < items5.length) {
do {
let tmp31 = items5[num18](progress);
num18 = num18 + 1;
length3 = items5.length;
} while (num18 < length3);
}
}
}
isReadyResult = this.isReady();
},
isReady(arg0) {
let A;
let w;
w = this;
let D = arg0;
if (undefined === arg0) {
D = w.D;
}
if (w.j) {
if (w.j >= tmp) {
if (w.i[0] <= w.N) {
const w2 = w.w;
} else {
const _Date = Date;
const date = new Date();
}
({ A, w } = w);
}
}
if (w.f >= this.I[D]) {
let m = w.A | w.m;
} else {
m = w.m;
}
return m;
},
getProgress(arg0) {
const self = this;
let D = arg0;
if (!arg0) {
D = self.D;
}
let num = 1;
if (self.j < this.I[D]) {
num = 1;
if (self.f <= tmp) {
num = self.f / tmp;
}
}
return num;
},
startCollectors() {
const self = this;
if (!this.s) {
const obj = { loadTimeCollector: null, mouseCollector: null, keyboardCollector: null, accelerometerCollector: null, touchCollector: null };
let V = self.V;
obj[0] = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
V = self.W;
obj[1] = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
V = self.U;
obj[2] = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
V = self.R;
obj[3] = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
V = self.X;
obj[4] = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
self.a = obj;
let listener4 = globalThis;
const _window = window;
if (window.addEventListener) {
const _window2 = listener4.window;
const listener = _window2.addEventListener("load", self.a.loadTimeCollector, false);
const _window3 = listener4.window;
const listener1 = _window3.addEventListener("mousemove", self.a.mouseCollector, false);
const _window4 = listener4.window;
const listener2 = _window4.addEventListener("keypress", self.a.keyboardCollector, false);
const _window5 = listener4.window;
const listener3 = _window5.addEventListener("devicemotion", self.a.accelerometerCollector, false);
const _window6 = listener4.window;
listener4 = _window6.addEventListener("touchmove", self.a.touchCollector, false);
} else {
const _document = document;
if (document.attachEvent) {
const _document2 = document;
document.attachEvent("onload", self.a.loadTimeCollector);
const _document3 = document;
document.attachEvent("onmousemove", self.a.mouseCollector);
const _document4 = document;
document.attachEvent("keypress", self.a.keyboardCollector);
} else {
const bug = new self.exception.bug("can't attach event");
throw bug;
}
}
self.s = true;
}
},
stopCollectors() {
const self = this;
if (this.s) {
let removed4 = globalThis;
const _window = window;
if (window.removeEventListener) {
const _window2 = removed4.window;
const removed = _window2.removeEventListener("load", self.a.loadTimeCollector, false);
const _window3 = removed4.window;
const removed1 = _window3.removeEventListener("mousemove", self.a.mouseCollector, false);
const _window4 = removed4.window;
const removed2 = _window4.removeEventListener("keypress", self.a.keyboardCollector, false);
const _window5 = removed4.window;
const removed3 = _window5.removeEventListener("devicemotion", self.a.accelerometerCollector, false);
const _window6 = removed4.window;
removed4 = _window6.removeEventListener("touchmove", self.a.touchCollector, false);
} else {
const _document = document;
if (document.detachEvent) {
const _document2 = document;
document.detachEvent("onload", self.a.loadTimeCollector);
const _document3 = document;
document.detachEvent("onmousemove", self.a.mouseCollector);
const _document4 = document;
document.detachEvent("keypress", self.a.keyboardCollector);
}
}
self.s = false;
}
},
addEventListener(arg0, arg1) {
this.S = +this.S + 1;
this.B[arg0][+this.S] = arg1;
},
removeEventListener(arg0, arg1) {
let length;
const items = [];
for (const key10008 in obj) {
let tmp6 = key10008;
let hasOwnPropertyResult = obj.hasOwnProperty(key10008);
if (hasOwnPropertyResult) {
hasOwnPropertyResult = obj[key10008] === arg1;
}
if (!hasOwnPropertyResult) {
continue;
} else {
let arr = items.push(key10008);
continue;
}
continue;
}
let num = 0;
if (0 < items.length) {
do {
let tmp5 = items[num];
delete tmp2[tmp];
num = num + 1;
length = items.length;
} while (num < length);
}
},
U() {
const self = this;
if (typeof window !== "undefined") {
const _window3 = window;
if (window.performance) {
const _window = window;
if (typeof window.performance.now === "function") {
const _window2 = window;
const _performance = window.performance;
self.addEntropy(_performance.now(), 1, "loadtime");
}
}
}
self.addEntropy(new Date().valueOf(), 1, "loadtime");
},
W(arg0) {
try {
let num = arg0.x;
if (!num) {
num = arg0.clientX;
}
if (!num) {
num = arg0.offsetX;
}
if (!num) {
num = 0;
}
let num2 = num;
let num3 = arg0.y;
if (!num3) {
num3 = arg0.clientY;
}
if (!num3) {
num3 = arg0.offsetY;
}
if (!num3) {
num3 = 0;
}
let num4 = num3;
let tmp3 = 0 != num2;
if (tmp3) {
tmp3 = 0 != num4;
}
const self = this;
if (tmp3) {
const items = [num2, num4];
self.addEntropy(items, 2, "mouse");
}
C(self, 0);
} catch (err) {
num2 = 0;
num4 = 0;
}
},
X(arg0) {
const self = this;
let clientX = tmp.pageX;
if (!clientX) {
clientX = tmp.clientX;
}
const items = [clientX, arg0.touches[0] || arg0.changedTouches[0].pageY || arg0.touches[0] || arg0.changedTouches[0].clientY];
this.addEntropy(items, 1, "touch");
if (typeof window !== "undefined") {
const _window3 = window;
if (window.performance) {
const _window = window;
if (typeof window.performance.now === "function") {
const _window2 = window;
const _performance = window.performance;
self.addEntropy(_performance.now(), 0, "loadtime");
}
}
}
self.addEntropy(new Date().valueOf(), 0, "loadtime");
},
V() {
const self = this;
if (typeof window !== "undefined") {
const _window3 = window;
if (window.performance) {
const _window = window;
if (typeof window.performance.now === "function") {
const _window2 = window;
const _performance = window.performance;
self.addEntropy(_performance.now(), 2, "loadtime");
}
}
}
self.addEntropy(new Date().valueOf(), 2, "loadtime");
},
R(accelerationIncludingGravity) {
const self = this;
if (window.orientation) {
const _window = window;
if (typeof orientation === "number") {
self.addEntropy(orientation, 1, "accelerometer");
}
}
if (accelerationIncludingGravity.accelerationIncludingGravity.x || accelerationIncludingGravity.accelerationIncludingGravity.y || accelerationIncludingGravity.accelerationIncludingGravity.z) {
self.addEntropy(tmp, 2, "accelerometer");
}
if (typeof window !== "undefined") {
const _window4 = window;
if (window.performance) {
const _window2 = window;
if (typeof window.performance.now === "function") {
const _window3 = window;
const _performance = window.performance;
self.addEntropy(_performance.now(), 0, "loadtime");
}
}
}
self.addEntropy(new Date().valueOf(), 0, "loadtime");
}
};
const prng = new obj.prng(6);
obj.random = prng;
try {
let _exports = undefined !== module;
if (_exports) {
_exports = module.exports;
}
if (!_exports) {
if (_exports) {
if (undefined.randomBytes) {
let _Uint32Array = Uint32Array;
const _Uint8Array = Uint8Array;
const uint8Array = new Uint8Array(undefined.randomBytes(128));
let uint32Array = new Uint32Array(uint8Array.buffer);
const random2 = obj.random;
random2.addEntropy(uint32Array, 1024, "crypto['randomBytes']");
}
let _exports2 = undefined !== module;
if (_exports2) {
_exports2 = module.exports;
}
if (_exports2) {
module.exports = obj;
}
}
let _window = window;
if (typeof window !== "undefined") {
let _Uint32Array2 = Uint32Array;
if (typeof Uint32Array !== "undefined") {
const _Uint32Array3 = Uint32Array;
const uint32Array1 = new Uint32Array(32);
const _window8 = window;
if (window.crypto) {
let _window2 = window;
if (window.crypto.getRandomValues) {
let _window6 = window;
const _crypto = window.crypto;
const randomValues = _crypto.getRandomValues(tmp31);
const random = obj.random;
random.addEntropy(tmp31, 1024, "crypto['getRandomValues']");
}
}
let _window3 = window;
if (window.msCrypto) {
let _window4 = window;
if (window.msCrypto.getRandomValues) {
let _window5 = window;
const randomValues1 = msCrypto.getRandomValues(tmp31);
}
}
}
}
} else {
try {
let globalResult = global("crypto");
} catch (err) {
globalResult = null;
}
}
} catch (tmp24) {
const _window7 = window;
let _console = typeof window !== "undefined";
if (typeof window !== "undefined") {
const _window9 = window;
_console = window.console;
}
if (_console) {
const _console2 = console;
console.log("There was an error collecting entropy from the browser:");
const _console3 = console;
console.log(tmp24);
}
}
},
{ crypto: "Array" }
];
items = [
(arg0, arg1, arg2) => {
let obj = { FASTLANE_SDK_LOAD_ERROR: null };
obj = { type: global("../lib/braintree-error").types.MERCHANT, code: "FASTLANE_SDK_LOAD_ERROR" };
obj[0] = obj;
module.exports = obj;
},
{ "../lib/braintree-error": 143 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("../lib/braintree-error");
let closure_1 = global("./errors");
const loadFastlane = global("../lib/assets").loadFastlane;
const assign = global("../lib/assign").assign;
module.exports = global("@braintree/wrap-promise")(function fastlane(arg0) {
let client;
let client2;
let closure_0 = arg0;
({ client, client: client2 } = arg0);
const configuration = client.getConfiguration();
let flag = true;
const version = client2.getVersion();
if ("production" !== configuration.gatewayConfiguration.environment) {
flag = false;
}
const promise = loadFastlane(assign({ platform: "BT", btSdkVersion: version, minified: flag }, arg0));
return loadFastlane(assign({ platform: "BT", btSdkVersion: version, minified: flag }, arg0)).then((metadata) => {
const platformOptions = { platform: "BT", authorization: closure_0.authorization, client: closure_0.client, deviceData: closure_0.deviceData };
delete tmp2[tmp];
delete tmp2[tmp];
delete tmp2[tmp];
delete tmp2[tmp];
delete tmp2[tmp];
return fastlane.create(outer1_3({ platformOptions }, closure_0, metadata.metadata));
}).catch((message) => Promise.reject(new closure_0({ type: constants.FASTLANE_SDK_LOAD_ERROR.type, code: constants.FASTLANE_SDK_LOAD_ERROR.code, message: message.message })));
});
},
{ "../lib/assets": 139, "../lib/assign": 140, "../lib/braintree-error": 143, "./errors": 117, "@braintree/wrap-promise": 40 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("../lib/basic-component-verification");
let closure_1 = global("./fastlane");
let closure_2 = global("../lib/create-assets-url");
let closure_3 = global("../lib/create-deferred-client");
const assign = global("../lib/assign").assign;
const globalResult = global("@braintree/wrap-promise");
module.exports = {
create: global("@braintree/wrap-promise")(function create(client) {
let closure_0 = client;
const obj = { name: "fastlane", client: client.client, authorization: client.authorization };
const verifyResult = closure_0.verify({ name: "fastlane", client: client.client, authorization: client.authorization });
return closure_0.verify({ name: "fastlane", client: client.client, authorization: client.authorization }).then(() => outer1_3.create({ authorization: client.authorization, client: client.client, assetsUrl: outer1_2.create(client.authorization), name: "fastlane" })).then((client) => outer1_1(outer1_4({ client, deviceData: client.deviceData }, client)));
}),
VERSION: "3.112.1"
};
},
{ "../lib/assign": 140, "../lib/basic-component-verification": 141, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "./fastlane": 118, "@braintree/wrap-promise": 40 }
];
items = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
let obj = { type: globalResult.types.MERCHANT, code: "GOOGLE_PAYMENT_NOT_ENABLED", message: "Google Pay is not enabled for this merchant." };
obj = { code: "GOOGLE_PAYMENT_GATEWAY_ERROR", message: "There was an error when tokenizing the Google Pay payment method.", type: globalResult.types.UNKNOWN };
obj = { code: "GOOGLE_PAYMENT_UNSUPPORTED_VERSION", type: globalResult.types.MERCHANT };
module.exports = { GOOGLE_PAYMENT_NOT_ENABLED: obj, GOOGLE_PAYMENT_GATEWAY_ERROR: obj, GOOGLE_PAYMENT_UNSUPPORTED_VERSION: obj };
},
{ "../lib/braintree-error": 143 }
];
items = [
(arg0, arg1, arg2) => {
class GooglePayment {
constructor(arg0) {
obj = { _createPromise: global.createPromise, _client: global.client, _useDeferredClient: global.useDeferredClient, _googlePayVersion: tmp, _googleMerchantId: global.googleMerchantId };
tmp = global.googlePayVersion || 1;
if (obj._isUnsupportedGooglePayAPIVersion()) {
tmp2 = c5;
obj = { code: null, message: null, type: null };
tmp3 = c6;
obj[0] = c6.GOOGLE_PAYMENT_UNSUPPORTED_VERSION.code;
str = "The Braintree SDK does not support Google Pay version ";
str2 = ". Please upgrade the version of your Braintree SDK and contact support if this error persists.";
obj[1] = `The Braintree SDK does not support Google Pay version ${obj._googlePayVersion}. Please upgrade the version of your Braintree SDK and contact support if this error persists.`;
obj[2] = c6.GOOGLE_PAYMENT_UNSUPPORTED_VERSION.type;
tmp4 = new.target;
tmp5 = new.target;
tmp6 = obj;
tmp7 = new c5(obj);
tmp8 = tmp7;
throw tmp7;
} else {
return;
}
}
_waitForClient() {
self = this;
if (this._client) {
tmp2 = globalThis;
_Promise = Promise;
resolved = Promise.resolve();
} else {
_createPromise = self._createPromise;
fn = () => { ... };
resolved = _createPromise.then(fn.bind(self));
}
return resolved;
}
_isUnsupportedGooglePayAPIVersion() {
return !(this._googlePayVersion in closure_8);
}
_getDefaultConfig() {
self = this;
if (!this._defaultConfig) {
tmp = c4;
_client = self._client;
self._defaultConfig = c4(_client.getConfiguration(), self._googlePayVersion, self._googleMerchantId);
}
return self._defaultConfig;
}
_createV1PaymentDataRequest(arg0) {
_getDefaultConfigResult = this._getDefaultConfig();
tmp2 = global.cardRequirements && global.cardRequirements.allowedCardNetworks || _getDefaultConfigResult.cardRequirements.allowedCardNetworks;
tmp3 = assign({}, _getDefaultConfigResult, global);
tmp3.cardRequirements.allowedCardNetworks = tmp2;
return tmp3;
}
_createV2PaymentDataRequest(arg0) {
_getDefaultConfigResult = this._getDefaultConfig();
self = _getDefaultConfigResult;
if (global.allowedPaymentMethods) {
prop = global.allowedPaymentMethods;
item = prop.forEach(() => { ... });
}
return assign({}, _getDefaultConfigResult, global);
}
createPaymentDataRequest(arg0) {
self = this;
closure_0 = global;
if (this._useDeferredClient) {
_waitForClientResult = self._waitForClient();
fn = () => { ... };
nextPromise = _waitForClientResult.then(fn.bind(self));
} else {
nextPromise = self._createPaymentDataRequestSyncronously(global);
}
return nextPromise;
}
_createPaymentDataRequestSyncronously(arg0) {
self = this;
tmp = assign({}, global);
_googlePayVersion = this._googlePayVersion;
totalPrice = tmp.transactionInfo;
if (totalPrice) {
totalPrice = tmp.transactionInfo.totalPrice;
}
if (totalPrice) {
str = tmp.transactionInfo.totalPrice;
tmp.transactionInfo.totalPrice = str.toString();
}
sendEventResult = c0.sendEvent(self._createPromise, `google-payment.v${_googlePayVersion}.createPaymentDataRequest`);
return self[closure_8[_googlePayVersion]](tmp);
}
parseResponse(arg0) {
closure_0 = global;
self = this;
resolved = Promise.resolve();
nextPromise = resolved.then(() => { ... });
return nextPromise.catch(() => { ... });
}
teardown() {
tmp = c2(this, c7(GooglePayment.prototype));
return Promise.resolve();
}
}
let closure_0 = global("../lib/analytics");
const assign = global("../lib/assign").assign;
let closure_2 = global("../lib/convert-methods-to-error");
let closure_3 = global("../lib/find");
let closure_4 = global("../lib/generate-google-pay-configuration");
let closure_5 = global("../lib/braintree-error");
let closure_6 = global("./errors");
let closure_7 = global("../lib/methods");
let closure_8 = { 1: "_createV1PaymentDataRequest", 2: "_createV2PaymentDataRequest" };
module.exports = global("@braintree/wrap-promise").wrapPrototype(GooglePayment);
},
{ "../lib/analytics": 138, "../lib/assign": 140, "../lib/braintree-error": 143, "../lib/convert-methods-to-error": 146, "../lib/find": 156, "../lib/generate-google-pay-configuration": 168, "../lib/methods": 175, "./errors": 120, "@braintree/wrap-promise": 40 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("./google-payment");
let closure_1 = global("../lib/braintree-error");
let closure_2 = global("../lib/create-assets-url");
let closure_3 = global("../lib/create-deferred-client");
let closure_4 = global("../lib/basic-component-verification");
let closure_5 = global("./errors");
const globalResult = global("@braintree/wrap-promise");
module.exports = {
create: global("@braintree/wrap-promise")(function create(client) {
let closure_0 = client;
return closure_4.verify({ name: "Google Pay", client: client.client, authorization: client.authorization }).then(() => {
let obj = { authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: outer1_2.create(client.authorization), name: "Google Pay" };
obj = outer1_3.create(obj);
const nextPromise = obj.then((client) => {
let rejectResult = client;
closure_0.client = client;
if (!client.getConfiguration().gatewayConfiguration.androidPay) {
const tmp7 = new outer1_1(outer1_5.GOOGLE_PAYMENT_NOT_ENABLED);
rejectResult = Promise.reject(tmp7);
}
return rejectResult;
});
client.createPromise = nextPromise;
const tmp = new client(client);
let nextPromise1 = tmp;
client = tmp;
if (!client.useDeferredClient) {
nextPromise1 = nextPromise.then((_client) => {
closure_0._client = _client;
return closure_0;
});
}
return nextPromise1;
});
}),
VERSION: "3.112.1"
};
},
{ "../lib/basic-component-verification": 141, "../lib/braintree-error": 143, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "./errors": 120, "./google-payment": 121, "@braintree/wrap-promise": 40 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("../../lib/braintree-error");
let closure_1 = global("../shared/errors");
const allowedAttributes = global("../shared/constants").allowedAttributes;
module.exports = function attributeValidationError(key10009, str) {
if (allowedAttributes.hasOwnProperty(key10009)) {
if (null == str) {
if (!tmp10) {
let obj = { type: null, code: null, message: null };
obj[0] = constants.HOSTED_FIELDS_ATTRIBUTE_VALUE_NOT_ALLOWED.type;
obj[1] = constants.HOSTED_FIELDS_ATTRIBUTE_VALUE_NOT_ALLOWED.code;
obj[2] = `Value "${str}" is not allowed for "${key10009}" attribute.`;
let tmp7 = new closure_0(obj);
}
} else if ("string" === tmp[key10009]) {
let tmp13 = typeof str === "string";
if (typeof str !== "string") {
tmp13 = typeof str === "number";
}
let flag = tmp13;
} else {
flag = false;
if ("boolean" === tmp[key10009]) {
const _String = String;
let tmp12 = "true" === String(str);
if (!tmp12) {
const _String2 = String;
tmp12 = "false" === String(str);
}
flag = tmp12;
}
}
} else {
obj = { type: null, code: null, message: null };
obj[0] = constants.HOSTED_FIELDS_ATTRIBUTE_NOT_SUPPORTED.type;
obj[1] = constants.HOSTED_FIELDS_ATTRIBUTE_NOT_SUPPORTED.code;
obj[2] = `The "${key10009}" attribute is not supported in Hosted Fields.`;
tmp7 = new closure_0(obj);
}
return tmp7;
};
},
{ "../../lib/braintree-error": 143, "../shared/constants": 131, "../shared/errors": 132 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("../shared/constants");
let closure_1 = global("../../lib/use-min");
module.exports = function composeUrl(arg0, arg1, arg2) {
const text = `${arg0}/web/${closure_0.VERSION}`;
return text + "/html/hosted-fields-frame" + callback(arg2) + ".html#" + arg1;
};
},
{ "../../lib/use-min": 181, "../shared/constants": 131 }
];
items = [
(arg0, arg1, arg2) => {
const navigationDirections = global("../shared/constants").navigationDirections;
let closure_1 = global("../shared/browser-detection");
let closure_2 = global("../shared/focus-intercept");
let closure_3 = global("../shared/find-parent-tags");
let closure_4 = ["INPUT", "SELECT", "TEXTAREA"];
let closure_5 = ["hidden", "button", "reset", "submit", "checkbox", "radio", "file"];
module.exports = {
removeExtraFocusElements(first, fn) {
let closure_0 = fn;
const call = slice.call;
const elements = first.elements;
const arr = typeof call === "unknown" ? slice() : call(elements);
let num = 0;
let tmp = null;
if (0 < arr.length) {
while (true) {
let tmp2 = arr[num];
let tmp3 = closure_1;
let tmp4 = num;
if (closure_1.hasSoftwareKeyboard()) {
let tmp6 = closure_4;
let tmp7 = closure_4.indexOf(tmp2.tagName) > -1;
if (tmp7) {
let tmp8 = closure_5;
tmp7 = closure_5.indexOf(tmp2.type) < 0;
}
let tmp5 = tmp7;
} else {
tmp5 = "hidden" !== tmp2.type;
}
tmp = tmp2;
if (tmp5) {
break;
} else {
let sum = num + 1;
num = sum;
tmp = null;
if (sum >= arr.length) {
break;
}
}
}
}
const items = [tmp, ];
const reversed = arr.reverse();
let num2 = 0;
let tmp10 = null;
if (0 < reversed.length) {
while (true) {
let tmp11 = reversed[num2];
let tmp12 = closure_1;
let tmp13 = num2;
if (closure_1.hasSoftwareKeyboard()) {
let tmp15 = closure_4;
let tmp16 = closure_4.indexOf(tmp11.tagName) > -1;
if (tmp16) {
let tmp17 = closure_5;
tmp16 = closure_5.indexOf(tmp11.type) < 0;
}
let tmp14 = tmp16;
} else {
tmp14 = "hidden" !== tmp11.type;
}
tmp10 = tmp11;
if (tmp14) {
break;
} else {
let sum1 = num2 + 1;
num2 = sum1;
tmp10 = null;
if (sum1 >= reversed.length) {
break;
}
}
}
}
items[1] = tmp10;
const item = items.forEach((getAttribute) => {
let matchFocusElementResult = getAttribute;
if (getAttribute) {
matchFocusElementResult = outer1_2.matchFocusElement(getAttribute.getAttribute("id"));
}
if (matchFocusElementResult) {
callback(getAttribute.getAttribute("id"));
}
});
},
createFocusChangeHandler(arg0, arg1) {
let closure_0 = arg0;
let closure_1 = arg1;
return (direction) => {
const element = document.getElementById(`bt-${direction.field}-${direction.direction}-${length}`);
if (element) {
const first = outer1_3(element, "form")[0];
const _document = document;
if (document.forms.length >= 1) {
if (first) {
const slice = [].slice;
const call = slice.call;
const elements = first.elements;
const arr = typeof call === "unknown" ? slice() : call(elements);
const index = arr.indexOf(element);
direction = direction.direction;
if (constants.BACK === direction) {
let obj = { checkIndexBounds: null, indexChange: -1 };
obj[0] = function checkIndexBounds(arg0) {
return arg0 < 0;
};
} else if (tmp5.FORWARD !== direction) {
obj = {};
}
obj = { checkIndexBounds: null, indexChange: 1 };
obj[0] = function checkIndexBounds(arg0) {
return arg0 > length - 1;
};
length = arr.length;
}
}
const result = closure_1.onRemoveFocusIntercepts();
}
};
}
};
},
{ "../shared/browser-detection": 130, "../shared/constants": 131, "../shared/find-parent-tags": 133, "../shared/focus-intercept": 134 }
];
items = [
(arg0, arg1, arg2) => {
let allowedStyles = global("../shared/constants").allowedStyles;
module.exports = function getStylesFromClass(str) {
const element = ;
const obj = {};
let substr = str;
if ("." === str[0]) {
substr = str.substring(1);
}
element.className = substr;
element.style.display = "none !important";
element.style.position = "fixed !important";
element.style.left = "-99999px !important";
element.style.top = "-99999px !important";
body.appendChild(element);
const allowedStyles = window.getComputedStyle(element);
const item = allowedStyles.forEach((arg0) => {
if (table[arg0]) {
obj[arg0] = tmp;
}
});
body2.removeChild(element);
return obj;
};
},
{ "../shared/constants": 131 }
];
items = [
(arg0, arg1, arg2) => {
class HostedFields {
constructor(arg0) {
self = this;
closure_0 = global;
self = this;
obj = {};
c4 = obj;
framebus = {};
items = [];
c6 = items;
tmp = c13();
c7 = tmp;
sessionId = global.sessionId;
this._merchantConfigurationOptions = closure_0({}, global);
if (global.client) {
client = global.client;
configuration = client.getConfiguration(undefined, sessionId);
assetsUrl = configuration.gatewayConfiguration.assetsUrl;
isDebug = configuration.isDebug;
} else {
tmp2 = f115718;
tmp4 = globalThis;
_Boolean = Boolean;
obj = f115718.create(global.authorization);
isDebug = Boolean(global.isDebug);
assetsUrl = obj;
}
obj1 = { client: global.client, authorization: global.authorization, debug: isDebug, assetsUrl, name: "Hosted Fields", sessionId };
self._clientPromise = c6.create(obj1);
authorization = c8(assetsUrl, tmp, isDebug);
if (global.fields) {
tmp6 = globalThis;
_Object = Object;
num = 0;
if (0 !== Object.keys(global.fields).length) {
tmp42 = closure_17;
call = closure_17.call;
if (typeof call === "unknown") {
tmp42Result = tmp42();
} else {
callResult = call(self);
}
self._injectedNodes = [];
tmp8 = self;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = new self();
tmp12 = tmp11;
self._destructor = tmp11;
self._fields = obj;
obj2 = { fields: null, cards: null };
obj2[0] = {};
tmp13 = c26;
str = "";
obj2[1] = c26("");
self._state = obj2;
tmp14 = framebus;
obj3 = { channel: null, verifyDomain: null, targetFrames: null };
obj3[0] = tmp;
tmp15 = authorization;
obj3[1] = authorization;
_window = window;
items1 = [];
items1[0] = window;
obj3[2] = items1;
tmp16 = new.target;
tmp17 = new.target;
tmp18 = obj3;
tmp19 = new framebus(obj3);
tmp20 = tmp19;
self._bus = tmp19;
_destructor = self._destructor;
result = _destructor.registerFunctionForTeardown(() => { ... });
tmp22 = c19;
sendEvent = c19.sendEvent;
_clientPromise = self._clientPromise;
if (global.client) {
str3 = "custom.hosted-fields.initialized";
sendEventResult = sendEvent(_clientPromise, "custom.hosted-fields.initialized");
} else {
str2 = "custom.hosted-fields.initialized.deferred-client";
sendEventResult1 = sendEvent(_clientPromise, "custom.hosted-fields.initialized.deferred-client");
}
_Object2 = Object;
keys = Object.keys(global.fields);
fn = () => { ... };
item = keys.forEach(fn.bind(self));
if (self._merchantConfigurationOptions.styles) {
_Object3 = Object;
keys1 = Object.keys(self._merchantConfigurationOptions.styles);
item1 = keys1.forEach(() => { ... });
}
_bus = self._bus;
tmp27 = events;
onResult = _bus.on(events.REMOVE_FOCUS_INTERCEPTS, () => { ... });
_bus2 = self._bus;
tmp29 = c28;
obj4 = { onRemoveFocusIntercepts: null, onTriggerInputFocus: null };
obj4[0] = function onRemoveFocusIntercepts() { ... };
obj4[1] = function onTriggerInputFocus() { ... };
onResult1 = _bus2.on(events.TRIGGER_FOCUS_CHANGE, c28.createFocusChangeHandler(tmp, obj4));
_bus3 = self._bus;
onResult2 = _bus3.on(events.READY_FOR_CLIENT, () => { ... });
_bus4 = self._bus;
onResult3 = _bus4.on(events.CARD_FORM_ENTRY_HAS_BEGUN, () => { ... });
_bus5 = self._bus;
onResult4 = _bus5.on(events.BIN_AVAILABLE, () => { ... });
_setTimeout = setTimeout;
tmp34 = INTEGRATION_TIMEOUT_MS;
f115718 = setTimeout(() => { ... }, INTEGRATION_TIMEOUT_MS);
_Promise = Promise;
allPromises = Promise.all(items);
nextPromise = allPromises.then(() => { ... });
_bus6 = self._bus;
onResult5 = _bus6.on(events.FRAME_READY, () => { ... });
_bus7 = self._bus;
closure_0 = obj;
fn2 = () => { ... };
onResult6 = _bus7.on(events.INPUT_EVENT, fn2.bind(self));
_destructor2 = self._destructor;
result1 = _destructor2.registerFunctionForTeardown(() => { ... });
_destructor3 = self._destructor;
result2 = _destructor3.registerFunctionForTeardown(() => { ... });
_destructor4 = self._destructor;
result3 = _destructor4.registerFunctionForTeardown(() => { ... });
return;
}
}
obj5 = { type: c25.INSTANTIATION_OPTION_REQUIRED.type, code: c25.INSTANTIATION_OPTION_REQUIRED.code, message: "options.fields is required when instantiating Hosted Fields." };
tmp41 = new c7(obj5);
throw tmp41;
}
_setupLabelFocus(arg0, arg1) {
closure_0 = global;
triggerFocus = function triggerFocus() { ... };
self = this;
obj = c23(module);
if (null != module.id) {
tmp11 = globalThis;
_Array2 = Array;
slice2 = Array.prototype.slice;
call2 = slice2.call;
_document2 = document;
str3 = "label[for=\"";
str4 = "\"]";
elements = document.querySelectorAll(`label[for="${module.id}"]`);
obj2 = typeof call2 === "unknown" ? slice2() : call2(elements);
call = obj2;
_document = document;
tmp = obj2;
if (obj === document) {
tmp5 = c14;
str = "label";
combined = obj2.concat(c14(module, "label"));
call = combined;
found = combined.filter(() => { ... });
call = found;
num = 0;
c2 = 0;
flag = false;
str2 = "click";
if (0 < found.length) {
do {
tmp6 = c2;
obj3 = found[c2];
listener = obj3.addEventListener("click", triggerFocus, false);
tmp8 = c2;
sum = c2 + 1;
c2 = sum;
length = found.length;
} while (sum < length);
}
_destructor = this._destructor;
result = _destructor.registerFunctionForTeardown(() => { ... });
} else {
_Array = Array;
slice = Array.prototype.slice;
call = slice.call;
elements1 = obj.querySelectorAll(`label[for="${module.id}"]`);
combined1 = obj2.concat(typeof call === "unknown" ? slice() : call(elements1));
call = combined1;
tmp4 = combined1;
}
}
return;
}
_getAnyFieldContainer() {
self = this;
keys = Object.keys(this._fields);
return keys.reduce(() => { ... }, null);
}
_cleanUpFocusIntercepts() {
self = this;
if (document.forms.length < 1) {
_bus2 = self._bus;
tmp7 = events;
emitResult = _bus2.emit(events.REMOVE_FOCUS_INTERCEPTS);
} else {
tmp = c14;
str = "form";
first = c14(self._getAnyFieldContainer(), "form")[0];
if (first) {
tmp5 = c28;
fn = () => { ... };
result = c28.removeExtraFocusElements(first, fn.bind(self));
} else {
_bus = self._bus;
tmp3 = events;
emitResult1 = _bus.emit(events.REMOVE_FOCUS_INTERCEPTS);
}
}
return;
}
_attachInvalidFieldContainersToError(arg0) {
closure_0 = global;
tmp = global.details && global.details.invalidFieldKeys;
if (tmp) {
num = 0;
tmp = global.details.invalidFieldKeys.length > 0;
}
if (tmp) {
self = this;
global.details.invalidFields = {};
invalidFieldKeys = global.details.invalidFieldKeys;
fn = () => { ... };
item = invalidFieldKeys.forEach(fn.bind(this));
}
return;
}
getChallenges() {
_clientPromise = this._clientPromise;
return _clientPromise.then(() => { ... });
}
getSupportedCardTypes() {
_clientPromise = this._clientPromise;
return _clientPromise.then(() => { ... });
}
teardown() {
self = this;
promise = new Promise(() => { ... });
return promise;
}
tokenize(arg0) {
closure_0 = global;
self = this;
if (!global) {
closure_0 = {};
}
promise = new Promise(() => { ... });
return promise;
}
addClass(arg0, arg1) {
if (allowedFields.hasOwnProperty(global)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global)) {
tmp12 = module;
_bus = self._bus;
tmp13 = events;
obj = { field: null, classname: null };
obj[0] = global;
obj[1] = module;
emitResult = _bus.emit(events.ADD_CLASS, obj);
} else {
tmp7 = c7;
obj1 = { type: null, code: null, message: null };
tmp8 = c11;
obj1[0] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj1[1] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot add class to \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj1[2] = `Cannot add class to "${global}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj1;
tmp6 = new c7(obj1);
}
} else {
tmp = c7;
obj = { type: null, code: null, message: null };
tmp2 = c11;
obj[0] = c11.HOSTED_FIELDS_FIELD_INVALID.type;
obj[1] = c11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when adding a class.";
obj[2] = `"${global}" is not a valid field. You must use a valid field option when adding a class.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new c7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
removeClass(arg0, arg1) {
if (allowedFields.hasOwnProperty(global)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global)) {
tmp12 = module;
_bus = self._bus;
tmp13 = events;
obj = { field: null, classname: null };
obj[0] = global;
obj[1] = module;
emitResult = _bus.emit(events.REMOVE_CLASS, obj);
} else {
tmp7 = c7;
obj1 = { type: null, code: null, message: null };
tmp8 = c11;
obj1[0] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj1[1] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot remove class from \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj1[2] = `Cannot remove class from "${global}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj1;
tmp6 = new c7(obj1);
}
} else {
tmp = c7;
obj = { type: null, code: null, message: null };
tmp2 = c11;
obj[0] = c11.HOSTED_FIELDS_FIELD_INVALID.type;
obj[1] = c11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when removing a class.";
obj[2] = `"${global}" is not a valid field. You must use a valid field option when removing a class.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new c7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
setAttribute(arg0) {
if (allowedFields.hasOwnProperty(global.field)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global.field)) {
tmp12 = c27;
tmp6 = c27(global.attribute, global.value);
if (!tmp6) {
_bus = self._bus;
tmp13 = events;
obj = { field: null, attribute: null, value: null };
({ field: obj3[0], attribute: obj3[1], value: obj3[2] } = global);
emitResult = _bus.emit(events.SET_ATTRIBUTE, obj);
}
} else {
tmp7 = c7;
obj1 = { type: null, code: null, message: null };
tmp8 = c11;
obj1[0] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj1[1] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot set attribute for \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj1[2] = `Cannot set attribute for "${global.field}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj1;
tmp6 = new c7(obj1);
}
} else {
tmp = c7;
obj = { type: null, code: null, message: null };
tmp2 = c11;
obj[0] = c11.HOSTED_FIELDS_FIELD_INVALID.type;
obj[1] = c11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when setting an attribute.";
obj[2] = `"${global.field}" is not a valid field. You must use a valid field option when setting an attribute.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new c7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
setMonthOptions(arg0) {
closure_0 = global;
self = this;
fields = this._merchantConfigurationOptions.fields;
str = "Expiration month field must exist to use setMonthOptions.";
if (fields.expirationMonth) {
if (!fields.expirationMonth.select) {
str = "Expiration month field must be a select element.";
}
}
_Promise = Promise;
if (str) {
tmp4 = c7;
obj = { type: null, code: null, message: null };
tmp5 = c11;
obj[0] = c11.HOSTED_FIELDS_FIELD_PROPERTY_INVALID.type;
obj[1] = c11.HOSTED_FIELDS_FIELD_PROPERTY_INVALID.code;
obj[2] = str;
tmp6 = new.target;
tmp7 = new.target;
tmp8 = obj;
tmp9 = new c7(obj);
tmp10 = tmp9;
rejectResult = _Promise.reject(tmp9);
} else {
tmp = new.target;
tmp2 = new.target;
rejectResult = new _Promise(() => { ... });
}
return rejectResult;
}
setMessage(arg0) {
_bus = this._bus;
obj = { field: global.field, message: global.message };
emitResult = _bus.emit(events.SET_MESSAGE, obj);
return;
}
removeAttribute(arg0) {
if (allowedFields.hasOwnProperty(global.field)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global.field)) {
tmp12 = c27;
tmp6 = c27(global.attribute);
if (!tmp6) {
_bus = self._bus;
tmp13 = events;
obj = { field: null, attribute: null };
({ field: obj3[0], attribute: obj3[1] } = global);
emitResult = _bus.emit(events.REMOVE_ATTRIBUTE, obj);
}
} else {
tmp7 = c7;
obj1 = { type: null, code: null, message: null };
tmp8 = c11;
obj1[0] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj1[1] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot remove attribute for \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj1[2] = `Cannot remove attribute for "${global.field}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj1;
tmp6 = new c7(obj1);
}
} else {
tmp = c7;
obj = { type: null, code: null, message: null };
tmp2 = c11;
obj[0] = c11.HOSTED_FIELDS_FIELD_INVALID.type;
obj[1] = c11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when removing an attribute.";
obj[2] = `"${global.field}" is not a valid field. You must use a valid field option when removing an attribute.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new c7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
setPlaceholder(arg0, arg1) {
obj = { field: global, attribute: "placeholder", value: module };
return this.setAttribute(obj);
}
clear(arg0) {
if (allowedFields.hasOwnProperty(global)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global)) {
_bus = self._bus;
tmp12 = events;
obj = { field: null };
obj[0] = global;
emitResult = _bus.emit(events.CLEAR_FIELD, obj);
} else {
tmp7 = c7;
obj1 = { type: null, code: null, message: null };
tmp8 = c11;
obj1[0] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj1[1] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot clear \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj1[2] = `Cannot clear "${global}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj1;
tmp6 = new c7(obj1);
}
} else {
tmp = c7;
obj = { type: null, code: null, message: null };
tmp2 = c11;
obj[0] = c11.HOSTED_FIELDS_FIELD_INVALID.type;
obj[1] = c11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when clearing a field.";
obj[2] = `"${global}" is not a valid field. You must use a valid field option when clearing a field.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new c7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
focus(arg0) {
self = this;
tmp = this._fields[global];
assign = tmp;
if (allowedFields.hasOwnProperty(global)) {
_fields = self._fields;
if (_fields.hasOwnProperty(global)) {
frameElement = tmp.frameElement;
focusResult = frameElement.focus();
_bus = self._bus;
tmp14 = events;
obj = { field: null };
obj[0] = global;
emitResult = _bus.emit(events.TRIGGER_INPUT_FOCUS, obj);
tmp16 = c15;
if (c15.isIos()) {
tmp17 = globalThis;
_setTimeout = setTimeout;
num = 5;
timerId = setTimeout(() => { ... }, 5);
}
} else {
tmp8 = c7;
obj1 = { type: null, code: null, message: null };
tmp9 = c11;
obj1[0] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj1[1] = c11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot focus \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj1[2] = `Cannot focus "${global}" field because it is not part of the current Hosted Fields options.`;
tmp10 = new.target;
tmp11 = new.target;
tmp12 = obj1;
tmp7 = new c7(obj1);
}
} else {
tmp2 = c7;
obj = { type: null, code: null, message: null };
tmp3 = c11;
obj[0] = c11.HOSTED_FIELDS_FIELD_INVALID.type;
obj[1] = c11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when focusing a field.";
obj[2] = `"${global}" is not a valid field. You must use a valid field option when focusing a field.`;
tmp4 = new.target;
tmp5 = new.target;
tmp6 = obj;
tmp7 = new c7(obj);
}
_Promise = Promise;
if (tmp7) {
rejectResult = _Promise.reject(tmp7);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
getState() {
return this._state;
}
}
let assign = global("../../lib/assign").assign;
let closure_1 = global("../../lib/create-assets-url");
let closure_2 = global("../../lib/is-verified-domain");
let closure_3 = global("../../lib/destructor");
let closure_4 = global("@braintree/iframer");
let closure_5 = global("framebus");
let closure_6 = global("../../lib/create-deferred-client");
let closure_7 = global("../../lib/braintree-error");
let closure_8 = global("./compose-url");
let closure_9 = global("./get-styles-from-class");
const globalResult = global("../shared/constants");
let closure_10 = globalResult;
let closure_11 = global("../shared/errors");
const INTEGRATION_TIMEOUT_MS = global("../../lib/constants").INTEGRATION_TIMEOUT_MS;
let closure_13 = global("@braintree/uuid");
let closure_14 = global("../shared/find-parent-tags");
let closure_15 = global("../shared/browser-detection");
const events = globalResult.events;
const globalResult1 = global("@braintree/event-emitter");
let closure_18 = global("./inject-frame");
let closure_19 = global("../../lib/analytics");
let allowedFields = globalResult.allowedFields;
let closure_21 = global("../../lib/methods");
let closure_22 = global("../../lib/shadow");
let closure_23 = global("../../lib/find-root-node");
let closure_24 = global("../../lib/convert-methods-to-error");
let closure_25 = global("../../lib/errors");
let closure_26 = global("../shared/get-card-types");
let closure_27 = global("./attribute-validation-error");
let closure_28 = global("./focus-change");
const destroy = global("../shared/focus-intercept").destroy;
const child = globalResult1.createChild(HostedFields);
module.exports = global("@braintree/wrap-promise").wrapPrototype(HostedFields);
},
{ "../../lib/analytics": 138, "../../lib/assign": 140, "../../lib/braintree-error": 143, "../../lib/constants": 145, "../../lib/convert-methods-to-error": 146, "../../lib/create-assets-url": 148, "../../lib/create-deferred-client": 150, "../../lib/destructor": 152, "../../lib/errors": 154, "../../lib/find-root-node": 155, "../../lib/is-verified-domain": 173, "../../lib/methods": 175, "../../lib/shadow": 178, "../shared/browser-detection": 130, "../shared/constants": 131, "../shared/errors": 132, "../shared/find-parent-tags": 133, "../shared/focus-intercept": 134, "../shared/get-card-types": 135, "./attribute-validation-error": 123, "./compose-url": 124, "./focus-change": 125, "./get-styles-from-class": 126, "./inject-frame": 128, "@braintree/event-emitter": 30, "@braintree/iframer": 32, "@braintree/uuid": 36, "@braintree/wrap-promise": 40, framebus: 50 }
];
items = [
(arg0, arg1, arg2) => {
let closure_0 = global("../shared/focus-intercept");
const navigationDirections = global("../shared/constants").navigationDirections;
module.exports = function injectFrame(arg0, getAttribute, appendChild) {
const attr = getAttribute.getAttribute("type");
const element =