@wix/ditto-codegen-public 1.0.276 → 1.0.277

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/out.js +2643 -7
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -14764,19 +14764,2655 @@ var require_dist5 = __commonJS({
14764
14764
  }
14765
14765
  });
14766
14766
 
14767
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/constants.js
14768
+ var require_constants6 = __commonJS({
14769
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/constants.js"(exports2) {
14770
+ "use strict";
14771
+ Object.defineProperty(exports2, "__esModule", { value: true });
14772
+ exports2.ORIGINAL_PROTOCOL_HEADER = exports2.ORIGINAL_HOST_HEADER = exports2.ORIGINAL_URL_HEADER = exports2.SSR_PROTOCOL = exports2.SSR_HOST = exports2.NO_SCENARIO_FOUND = void 0;
14773
+ exports2.NO_SCENARIO_FOUND = "NO_SCENARIO_FOUND";
14774
+ exports2.SSR_HOST = "www.wix.com";
14775
+ exports2.SSR_PROTOCOL = "http";
14776
+ exports2.ORIGINAL_URL_HEADER = "x-wix-metro-original-url";
14777
+ exports2.ORIGINAL_HOST_HEADER = "x-wix-metro-original-host";
14778
+ exports2.ORIGINAL_PROTOCOL_HEADER = "x-wix-metro-original-protocol";
14779
+ }
14780
+ });
14781
+
14782
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/globals.js
14783
+ var require_globals2 = __commonJS({
14784
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/globals.js"(exports2) {
14785
+ "use strict";
14786
+ exports2.__esModule = true;
14787
+ exports2.maybeGetDocument = maybeGetDocument;
14788
+ exports2.maybeGetGlobal = maybeGetGlobal;
14789
+ function maybeGetDocument() {
14790
+ if (typeof document === "object") {
14791
+ return document;
14792
+ }
14793
+ return void 0;
14794
+ }
14795
+ function maybeGetGlobal() {
14796
+ if (typeof self === "object") {
14797
+ return self;
14798
+ } else {
14799
+ return global;
14800
+ }
14801
+ }
14802
+ }
14803
+ });
14804
+
14805
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/cookies.js
14806
+ var require_cookies3 = __commonJS({
14807
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/cookies.js"(exports2) {
14808
+ "use strict";
14809
+ exports2.__esModule = true;
14810
+ exports2.readCookie = readCookie;
14811
+ var _globals = require_globals2();
14812
+ function readCookie(name) {
14813
+ const cookieValue = getCookieByName(name);
14814
+ if (cookieValue) {
14815
+ return cookieValue.split("=")[1];
14816
+ }
14817
+ return "";
14818
+ }
14819
+ function loadCookies() {
14820
+ const documentObj = (0, _globals.maybeGetDocument)();
14821
+ if (documentObj && documentObj.cookie) {
14822
+ return decodeURIComponent(documentObj.cookie).split(";");
14823
+ }
14824
+ return [];
14825
+ }
14826
+ function getCookieByName(name) {
14827
+ return loadCookies().filter((cookie) => name === cookie.split("=")[0].trim())[0];
14828
+ }
14829
+ }
14830
+ });
14831
+
14832
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/csrf.js
14833
+ var require_csrf2 = __commonJS({
14834
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/csrf.js"(exports2) {
14835
+ "use strict";
14836
+ exports2.__esModule = true;
14837
+ exports2.XSRF_TOKEN_COOKIE_NAME = exports2.XSRF_HEADER_NAME = void 0;
14838
+ exports2.csrf = csrf;
14839
+ var _cookies = require_cookies3();
14840
+ var XSRF_TOKEN_COOKIE_NAME = exports2.XSRF_TOKEN_COOKIE_NAME = "XSRF-TOKEN";
14841
+ var XSRF_HEADER_NAME = exports2.XSRF_HEADER_NAME = "x-xsrf-token";
14842
+ function csrf() {
14843
+ const value = (0, _cookies.readCookie)(XSRF_TOKEN_COOKIE_NAME);
14844
+ return {
14845
+ [XSRF_HEADER_NAME]: value
14846
+ };
14847
+ }
14848
+ }
14849
+ });
14850
+
14851
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/x-wix-brand.js
14852
+ var require_x_wix_brand2 = __commonJS({
14853
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/x-wix-brand.js"(exports2) {
14854
+ "use strict";
14855
+ exports2.__esModule = true;
14856
+ exports2.xWixBrand = xWixBrand;
14857
+ var _globals = require_globals2();
14858
+ var X_WIX_BRAND_NAME = "x-wix-brand";
14859
+ function xWixBrand() {
14860
+ const value = extractBrand();
14861
+ return {
14862
+ [X_WIX_BRAND_NAME]: value
14863
+ };
14864
+ }
14865
+ function extractBrand() {
14866
+ const globalObj = (0, _globals.maybeGetGlobal)();
14867
+ if (globalObj && globalObj.commonConfig && typeof globalObj.commonConfig.brand === "string") {
14868
+ return globalObj.commonConfig.brand;
14869
+ }
14870
+ return "";
14871
+ }
14872
+ }
14873
+ });
14874
+
14875
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/consent-policy.js
14876
+ var require_consent_policy3 = __commonJS({
14877
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/consent-policy.js"(exports2) {
14878
+ "use strict";
14879
+ exports2.__esModule = true;
14880
+ exports2.consentPolicy = consentPolicy;
14881
+ var _globals = require_globals2();
14882
+ function consentPolicy() {
14883
+ return tryResolveNativeAPI() || tryResolveJsSDK() || none();
14884
+ }
14885
+ function tryResolveJsSDK() {
14886
+ const globalObj = (0, _globals.maybeGetGlobal)();
14887
+ if (globalObj && globalObj.Wix && globalObj.Wix.Utils && typeof globalObj.Wix.Utils._getConsentPolicyHeader === "function") {
14888
+ return globalObj.Wix.Utils._getConsentPolicyHeader();
14889
+ }
14890
+ return void 0;
14891
+ }
14892
+ function tryResolveNativeAPI() {
14893
+ const globalObj = (0, _globals.maybeGetGlobal)();
14894
+ if (globalObj && globalObj.consentPolicyManager && typeof globalObj.consentPolicyManager._getConsentPolicyHeader === "function") {
14895
+ return globalObj.consentPolicyManager._getConsentPolicyHeader();
14896
+ }
14897
+ return void 0;
14898
+ }
14899
+ function none() {
14900
+ return {};
14901
+ }
14902
+ }
14903
+ });
14904
+
14905
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/authorization.js
14906
+ var require_authorization2 = __commonJS({
14907
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/authorization.js"(exports2) {
14908
+ "use strict";
14909
+ exports2.__esModule = true;
14910
+ exports2.authorization = authorization;
14911
+ function authorization(signedInstance) {
14912
+ return {
14913
+ authorization: signedInstance
14914
+ };
14915
+ }
14916
+ }
14917
+ });
14918
+
14919
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/utils.js
14920
+ var require_utils10 = __commonJS({
14921
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/utils.js"(exports2) {
14922
+ "use strict";
14923
+ exports2.__esModule = true;
14924
+ exports2.isCI = isCI;
14925
+ function isCI() {
14926
+ if (isNode()) {
14927
+ return !!process.env.TEAMCITY_VERSION || !!process.env.BUILDKITE;
14928
+ }
14929
+ return false;
14930
+ }
14931
+ function isNode() {
14932
+ var _process$versions;
14933
+ return typeof process !== "undefined" && ((_process$versions = process.versions) == null ? void 0 : _process$versions.node) != null;
14934
+ }
14935
+ }
14936
+ });
14937
+
14938
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/artifact-id.js
14939
+ var require_artifact_id2 = __commonJS({
14940
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/artifact-id.js"(exports2) {
14941
+ "use strict";
14942
+ exports2.__esModule = true;
14943
+ exports2.artifactId = artifactId;
14944
+ var _utils = require_utils10();
14945
+ function artifactId(override) {
14946
+ const artifactIdToUse = process.env.ARTIFACT_ID ?? process.env.APP_NAME ?? "";
14947
+ return {
14948
+ "X-Wix-Client-Artifact-Id": override ?? (!(0, _utils.isCI)() ? artifactIdToUse : "")
14949
+ };
14950
+ }
14951
+ }
14952
+ });
14953
+
14954
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/common-config.js
14955
+ var require_common_config2 = __commonJS({
14956
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/common-config.js"(exports2) {
14957
+ "use strict";
14958
+ exports2.__esModule = true;
14959
+ exports2.commonConfig = void 0;
14960
+ var _globals = require_globals2();
14961
+ var IGNORE_KEYS = ["consentPolicy", "consentPolicyHeader"];
14962
+ var COMMON_CONFIG_NAME = "commonConfig";
14963
+ var MAP_KEYS = {
14964
+ bsi: "BSI"
14965
+ };
14966
+ function extractCommonConfigValues() {
14967
+ const globalObj = (0, _globals.maybeGetGlobal)();
14968
+ const commonConfigObj = globalObj == null ? void 0 : globalObj.commonConfig;
14969
+ if (!commonConfigObj) {
14970
+ return null;
14971
+ }
14972
+ const res = {};
14973
+ let addedKeys = false;
14974
+ Object.keys(commonConfigObj).forEach((key) => {
14975
+ const newKey = MAP_KEYS[key];
14976
+ if (newKey) {
14977
+ res[newKey] = commonConfigObj[key];
14978
+ addedKeys = true;
14979
+ } else if (IGNORE_KEYS.indexOf(key) < 0 && typeof commonConfigObj[key] !== "function") {
14980
+ res[key] = commonConfigObj[key];
14981
+ addedKeys = true;
14982
+ }
14983
+ });
14984
+ return addedKeys ? res : null;
14985
+ }
14986
+ var commonConfig = () => {
14987
+ const commonConfigValues = extractCommonConfigValues();
14988
+ const value = commonConfigValues ? JSON.stringify(commonConfigValues) : "";
14989
+ return {
14990
+ [COMMON_CONFIG_NAME]: encodeURIComponent(value)
14991
+ };
14992
+ };
14993
+ exports2.commonConfig = commonConfig;
14994
+ }
14995
+ });
14996
+
14997
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/linguist.js
14998
+ var require_linguist2 = __commonJS({
14999
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/headers/linguist.js"(exports2) {
15000
+ "use strict";
15001
+ var _interopRequireDefault = require_interopRequireDefault();
15002
+ exports2.__esModule = true;
15003
+ exports2.linguistHeader = linguistHeader;
15004
+ var _base = _interopRequireDefault(require_base64());
15005
+ var LINGUIST_HEADER_KEY = "x-wix-linguist";
15006
+ function linguistHeader({
15007
+ lang,
15008
+ locale,
15009
+ isPrimaryLanguage,
15010
+ signedInstance
15011
+ }) {
15012
+ if (isMultilingualOptionsAreValid({
15013
+ lang,
15014
+ locale,
15015
+ isPrimaryLanguage
15016
+ })) {
15017
+ const instanceId = getInstanceIdFromSignedInstance(signedInstance);
15018
+ if (instanceId !== void 0) {
15019
+ return {
15020
+ [LINGUIST_HEADER_KEY]: [lang, locale, isPrimaryLanguage == null ? void 0 : isPrimaryLanguage.toString(), instanceId].join("|")
15021
+ };
15022
+ }
15023
+ }
15024
+ return {};
15025
+ }
15026
+ function isMultilingualOptionsAreValid({
15027
+ lang,
15028
+ locale,
15029
+ isPrimaryLanguage
15030
+ }) {
15031
+ return lang && locale && /^(true|false)$/.test((isPrimaryLanguage == null ? void 0 : isPrimaryLanguage.toString()) || "");
15032
+ }
15033
+ function getInstanceIdFromSignedInstance(signedInstance) {
15034
+ try {
15035
+ const encodedInstance = signedInstance != null && signedInstance.startsWith("wixcode") ? signedInstance == null ? void 0 : signedInstance.split(".")[2] : signedInstance == null ? void 0 : signedInstance.split(".")[1];
15036
+ if (encodedInstance) {
15037
+ return JSON.parse(_base.default.decode(encodedInstance)).instanceId;
15038
+ }
15039
+ } catch (e) {
15040
+ }
15041
+ }
15042
+ }
15043
+ });
15044
+
15045
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/domain.js
15046
+ var require_domain3 = __commonJS({
15047
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/domain.js"(exports2) {
15048
+ "use strict";
15049
+ exports2.__esModule = true;
15050
+ exports2.Brand = void 0;
15051
+ var Brand = exports2.Brand = /* @__PURE__ */ (function(Brand2) {
15052
+ Brand2[Brand2["wix"] = 0] = "wix";
15053
+ Brand2[Brand2["editorx"] = 1] = "editorx";
15054
+ Brand2[Brand2["dayful"] = 2] = "dayful";
15055
+ Brand2[Brand2["studio"] = 3] = "studio";
15056
+ return Brand2;
15057
+ })({});
15058
+ }
15059
+ });
15060
+
15061
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/errors.js
15062
+ var require_errors3 = __commonJS({
15063
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/errors.js"(exports2) {
15064
+ "use strict";
15065
+ exports2.__esModule = true;
15066
+ exports2.WixHeadersValidationError = exports2.WixHeadersParsingError = void 0;
15067
+ var WixHeadersParsingError = class extends Error {
15068
+ constructor(header, value) {
15069
+ super(`WixHeadersParsingError: ${header} evaluated with ${JSON.stringify(value)} but should be a string!`);
15070
+ }
15071
+ };
15072
+ exports2.WixHeadersParsingError = WixHeadersParsingError;
15073
+ var WixHeadersValidationError = class extends Error {
15074
+ constructor(type, key, value) {
15075
+ super(`WixHeadersValidationError: expected ${key} to be ${type} but got ${JSON.stringify(value)}`);
15076
+ }
15077
+ };
15078
+ exports2.WixHeadersValidationError = WixHeadersValidationError;
15079
+ }
15080
+ });
15081
+
15082
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/assert.js
15083
+ var require_assert3 = __commonJS({
15084
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/assert.js"(exports2) {
15085
+ "use strict";
15086
+ exports2.__esModule = true;
15087
+ exports2.assertBoolean = assertBoolean;
15088
+ exports2.assertString = assertString;
15089
+ var _errors = require_errors3();
15090
+ function assertBoolean(key, value) {
15091
+ if (typeof value !== "boolean") {
15092
+ throw new _errors.WixHeadersValidationError("boolean", key, value);
15093
+ }
15094
+ }
15095
+ function assertString(key, value) {
15096
+ if (typeof value !== "string") {
15097
+ throw new _errors.WixHeadersValidationError("string", key, value);
15098
+ }
15099
+ }
15100
+ }
15101
+ });
15102
+
15103
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/index.js
15104
+ var require_cjs4 = __commonJS({
15105
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/headers/dist/cjs/index.js"(exports2) {
15106
+ "use strict";
15107
+ exports2.__esModule = true;
15108
+ exports2.createHeaders = createHeaders;
15109
+ var _csrf = require_csrf2();
15110
+ var _xWixBrand = require_x_wix_brand2();
15111
+ var _consentPolicy = require_consent_policy3();
15112
+ var _authorization = require_authorization2();
15113
+ var _artifactId = require_artifact_id2();
15114
+ var _commonConfig = require_common_config2();
15115
+ var _linguist = require_linguist2();
15116
+ var _domain = require_domain3();
15117
+ exports2.MultilingualOptions = _domain.MultilingualOptions;
15118
+ var _assert = require_assert3();
15119
+ function createHeaders(opts = {}) {
15120
+ opts = {
15121
+ csrf: true,
15122
+ signedInstance: "",
15123
+ ...opts
15124
+ };
15125
+ verifyOptsOrThrow(opts);
15126
+ const headers = [(0, _xWixBrand.xWixBrand)(), (0, _consentPolicy.consentPolicy)(), (0, _authorization.authorization)(opts.signedInstance), (0, _artifactId.artifactId)(opts.artifactId), (0, _commonConfig.commonConfig)(), (0, _linguist.linguistHeader)({
15127
+ signedInstance: opts.signedInstance,
15128
+ ...opts.multilingualOptions
15129
+ })];
15130
+ if (opts.csrf) {
15131
+ headers.push((0, _csrf.csrf)());
15132
+ }
15133
+ return headers.filter((hdrs) => Object.values(hdrs).every((v) => v)).reduce((result, hdrs) => ({
15134
+ ...result,
15135
+ ...hdrs
15136
+ }), {});
15137
+ }
15138
+ function verifyOptsOrThrow(opts) {
15139
+ (0, _assert.assertBoolean)("opts.csrf", opts.csrf);
15140
+ (0, _assert.assertString)("opts.signedInstance", opts.signedInstance);
15141
+ }
15142
+ }
15143
+ });
15144
+
15145
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/env-util.js
15146
+ var require_env_util2 = __commonJS({
15147
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/env-util.js"(exports2) {
15148
+ "use strict";
15149
+ Object.defineProperty(exports2, "__esModule", { value: true });
15150
+ exports2.isNode = exports2.isWebWorker = exports2.isBrowser = void 0;
15151
+ function isBrowser() {
15152
+ return typeof window !== "undefined";
15153
+ }
15154
+ exports2.isBrowser = isBrowser;
15155
+ function isWebWorker() {
15156
+ var _a;
15157
+ return typeof self === "object" && ((_a = self === null || self === void 0 ? void 0 : self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope";
15158
+ }
15159
+ exports2.isWebWorker = isWebWorker;
15160
+ function isNode() {
15161
+ var _a;
15162
+ return typeof process !== "undefined" && ((_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) != null;
15163
+ }
15164
+ exports2.isNode = isNode;
15165
+ }
15166
+ });
15167
+
15168
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/utils.js
15169
+ var require_utils11 = __commonJS({
15170
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/utils.js"(exports2) {
15171
+ "use strict";
15172
+ Object.defineProperty(exports2, "__esModule", { value: true });
15173
+ exports2.toSearchQueryParams = exports2.shouldAllowUnmocked = exports2.isHttpMockServerEnabled = exports2.getGlobalConfig = exports2.changeHost = exports2.extractHost = exports2.extractProtocol = exports2.resolveProtocol = exports2.resolveHost = exports2.extractProp = exports2.silent = exports2.isAbsoluteUrl = void 0;
15174
+ var constants_1 = require_constants6();
15175
+ var env_util_1 = require_env_util2();
15176
+ function isAbsoluteUrl(url) {
15177
+ if (typeof url !== "string") {
15178
+ throw new TypeError(`Expected a \`string\`, got \`${typeof url}\``);
15179
+ }
15180
+ return /(^https?:)|(^\/\/)/.test(url);
15181
+ }
15182
+ exports2.isAbsoluteUrl = isAbsoluteUrl;
15183
+ async function silent(fn) {
15184
+ try {
15185
+ await fn();
15186
+ } catch (_a) {
15187
+ }
15188
+ }
15189
+ exports2.silent = silent;
15190
+ function extractProp(data, path) {
15191
+ return path.split(".").filter((prop) => prop).reduce((result, prop) => result[prop], data);
15192
+ }
15193
+ exports2.extractProp = extractProp;
15194
+ function resolveHost(opts) {
15195
+ if (opts.baseURL) {
15196
+ return extractHost(opts.baseURL);
15197
+ } else if (opts.isSSR) {
15198
+ return constants_1.SSR_HOST;
15199
+ } else if (typeof self !== "undefined" && !!self.location) {
15200
+ return self.location.host;
15201
+ } else {
15202
+ return "";
15203
+ }
15204
+ }
15205
+ exports2.resolveHost = resolveHost;
15206
+ function resolveProtocol(opts) {
15207
+ if (opts.baseURL) {
15208
+ return extractProtocol(opts.baseURL);
15209
+ } else if (opts.isSSR) {
15210
+ return constants_1.SSR_PROTOCOL;
15211
+ } else if (typeof self !== "undefined" && !!self.location) {
15212
+ return self.location.protocol;
15213
+ } else {
15214
+ return "";
15215
+ }
15216
+ }
15217
+ exports2.resolveProtocol = resolveProtocol;
15218
+ function extractProtocol(url) {
15219
+ try {
15220
+ const asUrl = new URL(url);
15221
+ return asUrl.protocol;
15222
+ } catch (_a) {
15223
+ const hostAndProtocol = extractHostAndProtocolUsingRegExp(url);
15224
+ return hostAndProtocol.protocol;
15225
+ }
15226
+ }
15227
+ exports2.extractProtocol = extractProtocol;
15228
+ function extractHost(url) {
15229
+ let asUrl;
15230
+ try {
15231
+ asUrl = new URL(url);
15232
+ } catch (_a) {
15233
+ asUrl = new URL(`http:${url}`);
15234
+ }
15235
+ try {
15236
+ return asUrl.host;
15237
+ } catch (_b) {
15238
+ const hostAndProtocol = extractHostAndProtocolUsingRegExp(url);
15239
+ return hostAndProtocol.host;
15240
+ }
15241
+ }
15242
+ exports2.extractHost = extractHost;
15243
+ function extractHostAndProtocolUsingRegExp(url) {
15244
+ const regExp = new RegExp("^(.*:)//([A-Za-z0-9-.]+)(:[0-9]+)?(.*)$");
15245
+ try {
15246
+ const urlOptions = regExp.exec(url);
15247
+ return { protocol: urlOptions[1], host: urlOptions[2] };
15248
+ } catch (_a) {
15249
+ return { protocol: "http:", host: "" };
15250
+ }
15251
+ }
15252
+ function changeHost(urlOrPath, host) {
15253
+ let url;
15254
+ try {
15255
+ url = new URL(urlOrPath);
15256
+ url.host = host;
15257
+ url.protocol = "http";
15258
+ } catch (_a) {
15259
+ url = new URL(`http://${host}`);
15260
+ url.pathname = urlOrPath;
15261
+ }
15262
+ return url.toString();
15263
+ }
15264
+ exports2.changeHost = changeHost;
15265
+ function getGlobalConfig() {
15266
+ const defaultConfig = { httpMockServer: { enabled: false } };
15267
+ let globalConfig;
15268
+ if ((0, env_util_1.isNode)() && process.env.HTTP_CLIENT_GLOBAL_CONFIG) {
15269
+ try {
15270
+ globalConfig = JSON.parse(process.env.HTTP_CLIENT_GLOBAL_CONFIG);
15271
+ } catch (e) {
15272
+ }
15273
+ }
15274
+ if (!globalConfig) {
15275
+ if ((0, env_util_1.isBrowser)()) {
15276
+ globalConfig = window._httpClientGlobalConfig;
15277
+ } else if ((0, env_util_1.isWebWorker)()) {
15278
+ }
15279
+ }
15280
+ return globalConfig || defaultConfig;
15281
+ }
15282
+ exports2.getGlobalConfig = getGlobalConfig;
15283
+ function isHttpMockServerEnabled() {
15284
+ const globalConfig = getGlobalConfig();
15285
+ return globalConfig.httpMockServer.enabled;
15286
+ }
15287
+ exports2.isHttpMockServerEnabled = isHttpMockServerEnabled;
15288
+ function shouldAllowUnmocked() {
15289
+ const globalConfig = getGlobalConfig();
15290
+ return globalConfig.httpMockServer.allowUnmocked;
15291
+ }
15292
+ exports2.shouldAllowUnmocked = shouldAllowUnmocked;
15293
+ function toSearchQueryParams(params) {
15294
+ return Object.entries(params).map(([key, value]) => `${key}=${encodeURIComponent(value)}`).flat().join("&");
15295
+ }
15296
+ exports2.toSearchQueryParams = toSearchQueryParams;
15297
+ }
15298
+ });
15299
+
15300
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/whitelist.json
15301
+ var require_whitelist2 = __commonJS({
15302
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/whitelist.json"(exports2, module2) {
15303
+ module2.exports = [
15304
+ "wix.com",
15305
+ "editorx.com",
15306
+ "wix-code.com",
15307
+ "wixapps.net",
15308
+ "wixprod.net"
15309
+ ];
15310
+ }
15311
+ });
15312
+
15313
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/headers.js
15314
+ var require_headers2 = __commonJS({
15315
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/headers.js"(exports2) {
15316
+ "use strict";
15317
+ Object.defineProperty(exports2, "__esModule", { value: true });
15318
+ exports2.isWixDomain = exports2.composeHeaders = exports2.requestIdOrEmptyString = void 0;
15319
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
15320
+ var headers_1 = require_cjs4();
15321
+ var utils_1 = require_utils11();
15322
+ var whitelist_json_1 = tslib_1.__importDefault(require_whitelist2());
15323
+ function requestIdOrEmptyString(response) {
15324
+ var _a;
15325
+ return ((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a["x-wix-request-id"]) || "";
15326
+ }
15327
+ exports2.requestIdOrEmptyString = requestIdOrEmptyString;
15328
+ var composeHeaders = ({ url, disableWixHeaders, wixHeadersOpts }) => {
15329
+ const shouldAssignWixHeaders = !disableWixHeaders && isWixDomain(url);
15330
+ return shouldAssignWixHeaders ? (0, headers_1.createHeaders)(wixHeadersOpts) : {};
15331
+ };
15332
+ exports2.composeHeaders = composeHeaders;
15333
+ function isWixDomain(url) {
15334
+ const isRelative = !(0, utils_1.isAbsoluteUrl)(url);
15335
+ if (isRelative) {
15336
+ return true;
15337
+ }
15338
+ const host = `.${(0, utils_1.extractHost)(url)}`;
15339
+ const isWhitelisted = whitelist_json_1.default.find((wixHost) => host.endsWith(`.${wixHost}`));
15340
+ return !!isWhitelisted;
15341
+ }
15342
+ exports2.isWixDomain = isWixDomain;
15343
+ }
15344
+ });
15345
+
15346
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/error.js
15347
+ var require_error2 = __commonJS({
15348
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/error.js"(exports2) {
15349
+ "use strict";
15350
+ Object.defineProperty(exports2, "__esModule", { value: true });
15351
+ exports2.createHttpError = exports2.HttpError = exports2.axiosErrorFields = void 0;
15352
+ var headers_1 = require_headers2();
15353
+ exports2.axiosErrorFields = [
15354
+ "code",
15355
+ "config",
15356
+ "request",
15357
+ "response",
15358
+ "toJSON",
15359
+ "__CANCEL__"
15360
+ ];
15361
+ var HttpError = class _HttpError extends Error {
15362
+ constructor(error) {
15363
+ super(error.message);
15364
+ this.isWixHttpError = true;
15365
+ Object.setPrototypeOf(this, _HttpError.prototype);
15366
+ exports2.axiosErrorFields.forEach((key) => {
15367
+ this[key] = error[key];
15368
+ });
15369
+ }
15370
+ get requestId() {
15371
+ return (0, headers_1.requestIdOrEmptyString)(this.response);
15372
+ }
15373
+ };
15374
+ exports2.HttpError = HttpError;
15375
+ function createHttpError(...args) {
15376
+ return new HttpError(...args);
15377
+ }
15378
+ exports2.createHttpError = createHttpError;
15379
+ }
15380
+ });
15381
+
15382
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/bind.js
15383
+ var require_bind2 = __commonJS({
15384
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/bind.js"(exports2, module2) {
15385
+ "use strict";
15386
+ module2.exports = function bind(fn, thisArg) {
15387
+ return function wrap() {
15388
+ var args = new Array(arguments.length);
15389
+ for (var i = 0; i < args.length; i++) {
15390
+ args[i] = arguments[i];
15391
+ }
15392
+ return fn.apply(thisArg, args);
15393
+ };
15394
+ };
15395
+ }
15396
+ });
15397
+
15398
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/utils.js
15399
+ var require_utils12 = __commonJS({
15400
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/utils.js"(exports2, module2) {
15401
+ "use strict";
15402
+ var bind = require_bind2();
15403
+ var toString = Object.prototype.toString;
15404
+ function isArray(val) {
15405
+ return toString.call(val) === "[object Array]";
15406
+ }
15407
+ function isUndefined(val) {
15408
+ return typeof val === "undefined";
15409
+ }
15410
+ function isBuffer(val) {
15411
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val);
15412
+ }
15413
+ function isArrayBuffer(val) {
15414
+ return toString.call(val) === "[object ArrayBuffer]";
15415
+ }
15416
+ function isFormData(val) {
15417
+ return typeof FormData !== "undefined" && val instanceof FormData;
15418
+ }
15419
+ function isArrayBufferView(val) {
15420
+ var result;
15421
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
15422
+ result = ArrayBuffer.isView(val);
15423
+ } else {
15424
+ result = val && val.buffer && val.buffer instanceof ArrayBuffer;
15425
+ }
15426
+ return result;
15427
+ }
15428
+ function isString(val) {
15429
+ return typeof val === "string";
15430
+ }
15431
+ function isNumber(val) {
15432
+ return typeof val === "number";
15433
+ }
15434
+ function isObject(val) {
15435
+ return val !== null && typeof val === "object";
15436
+ }
15437
+ function isPlainObject(val) {
15438
+ if (toString.call(val) !== "[object Object]") {
15439
+ return false;
15440
+ }
15441
+ var prototype = Object.getPrototypeOf(val);
15442
+ return prototype === null || prototype === Object.prototype;
15443
+ }
15444
+ function isDate(val) {
15445
+ return toString.call(val) === "[object Date]";
15446
+ }
15447
+ function isFile(val) {
15448
+ return toString.call(val) === "[object File]";
15449
+ }
15450
+ function isBlob(val) {
15451
+ return toString.call(val) === "[object Blob]";
15452
+ }
15453
+ function isFunction(val) {
15454
+ return toString.call(val) === "[object Function]";
15455
+ }
15456
+ function isStream(val) {
15457
+ return isObject(val) && isFunction(val.pipe);
15458
+ }
15459
+ function isURLSearchParams(val) {
15460
+ return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
15461
+ }
15462
+ function trim(str) {
15463
+ return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
15464
+ }
15465
+ function isStandardBrowserEnv() {
15466
+ if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) {
15467
+ return false;
15468
+ }
15469
+ return typeof window !== "undefined" && typeof document !== "undefined";
15470
+ }
15471
+ function forEach(obj, fn) {
15472
+ if (obj === null || typeof obj === "undefined") {
15473
+ return;
15474
+ }
15475
+ if (typeof obj !== "object") {
15476
+ obj = [obj];
15477
+ }
15478
+ if (isArray(obj)) {
15479
+ for (var i = 0, l = obj.length; i < l; i++) {
15480
+ fn.call(null, obj[i], i, obj);
15481
+ }
15482
+ } else {
15483
+ for (var key in obj) {
15484
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
15485
+ fn.call(null, obj[key], key, obj);
15486
+ }
15487
+ }
15488
+ }
15489
+ }
15490
+ function merge() {
15491
+ var result = {};
15492
+ function assignValue(val, key) {
15493
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
15494
+ result[key] = merge(result[key], val);
15495
+ } else if (isPlainObject(val)) {
15496
+ result[key] = merge({}, val);
15497
+ } else if (isArray(val)) {
15498
+ result[key] = val.slice();
15499
+ } else {
15500
+ result[key] = val;
15501
+ }
15502
+ }
15503
+ for (var i = 0, l = arguments.length; i < l; i++) {
15504
+ forEach(arguments[i], assignValue);
15505
+ }
15506
+ return result;
15507
+ }
15508
+ function extend(a, b, thisArg) {
15509
+ forEach(b, function assignValue(val, key) {
15510
+ if (thisArg && typeof val === "function") {
15511
+ a[key] = bind(val, thisArg);
15512
+ } else {
15513
+ a[key] = val;
15514
+ }
15515
+ });
15516
+ return a;
15517
+ }
15518
+ function stripBOM(content) {
15519
+ if (content.charCodeAt(0) === 65279) {
15520
+ content = content.slice(1);
15521
+ }
15522
+ return content;
15523
+ }
15524
+ module2.exports = {
15525
+ isArray,
15526
+ isArrayBuffer,
15527
+ isBuffer,
15528
+ isFormData,
15529
+ isArrayBufferView,
15530
+ isString,
15531
+ isNumber,
15532
+ isObject,
15533
+ isPlainObject,
15534
+ isUndefined,
15535
+ isDate,
15536
+ isFile,
15537
+ isBlob,
15538
+ isFunction,
15539
+ isStream,
15540
+ isURLSearchParams,
15541
+ isStandardBrowserEnv,
15542
+ forEach,
15543
+ merge,
15544
+ extend,
15545
+ trim,
15546
+ stripBOM
15547
+ };
15548
+ }
15549
+ });
15550
+
15551
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/enhanceError.js
15552
+ var require_enhanceError2 = __commonJS({
15553
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/enhanceError.js"(exports2, module2) {
15554
+ "use strict";
15555
+ module2.exports = function enhanceError(error, config, code, request, response) {
15556
+ error.config = config;
15557
+ if (code) {
15558
+ error.code = code;
15559
+ }
15560
+ error.request = request;
15561
+ error.response = response;
15562
+ error.isAxiosError = true;
15563
+ error.toJSON = function toJSON() {
15564
+ return {
15565
+ // Standard
15566
+ message: this.message,
15567
+ name: this.name,
15568
+ // Microsoft
15569
+ description: this.description,
15570
+ number: this.number,
15571
+ // Mozilla
15572
+ fileName: this.fileName,
15573
+ lineNumber: this.lineNumber,
15574
+ columnNumber: this.columnNumber,
15575
+ stack: this.stack,
15576
+ // Axios
15577
+ config: this.config,
15578
+ code: this.code
15579
+ };
15580
+ };
15581
+ return error;
15582
+ };
15583
+ }
15584
+ });
15585
+
15586
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/createError.js
15587
+ var require_createError2 = __commonJS({
15588
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/createError.js"(exports2, module2) {
15589
+ "use strict";
15590
+ var enhanceError = require_enhanceError2();
15591
+ module2.exports = function createError(message, config, code, request, response) {
15592
+ var error = new Error(message);
15593
+ return enhanceError(error, config, code, request, response);
15594
+ };
15595
+ }
15596
+ });
15597
+
15598
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/settle.js
15599
+ var require_settle2 = __commonJS({
15600
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/settle.js"(exports2, module2) {
15601
+ "use strict";
15602
+ var createError = require_createError2();
15603
+ module2.exports = function settle(resolve, reject, response) {
15604
+ var validateStatus = response.config.validateStatus;
15605
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
15606
+ resolve(response);
15607
+ } else {
15608
+ reject(createError(
15609
+ "Request failed with status code " + response.status,
15610
+ response.config,
15611
+ null,
15612
+ response.request,
15613
+ response
15614
+ ));
15615
+ }
15616
+ };
15617
+ }
15618
+ });
15619
+
15620
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/isAbsoluteURL.js
15621
+ var require_isAbsoluteURL2 = __commonJS({
15622
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports2, module2) {
15623
+ "use strict";
15624
+ module2.exports = function isAbsoluteURL(url) {
15625
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
15626
+ };
15627
+ }
15628
+ });
15629
+
15630
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/combineURLs.js
15631
+ var require_combineURLs2 = __commonJS({
15632
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/combineURLs.js"(exports2, module2) {
15633
+ "use strict";
15634
+ module2.exports = function combineURLs(baseURL, relativeURL) {
15635
+ return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
15636
+ };
15637
+ }
15638
+ });
15639
+
15640
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/buildFullPath.js
15641
+ var require_buildFullPath2 = __commonJS({
15642
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/buildFullPath.js"(exports2, module2) {
15643
+ "use strict";
15644
+ var isAbsoluteURL = require_isAbsoluteURL2();
15645
+ var combineURLs = require_combineURLs2();
15646
+ module2.exports = function buildFullPath(baseURL, requestedURL) {
15647
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
15648
+ return combineURLs(baseURL, requestedURL);
15649
+ }
15650
+ return requestedURL;
15651
+ };
15652
+ }
15653
+ });
15654
+
15655
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/buildURL.js
15656
+ var require_buildURL2 = __commonJS({
15657
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/buildURL.js"(exports2, module2) {
15658
+ "use strict";
15659
+ var utils = require_utils12();
15660
+ function encode(val) {
15661
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
15662
+ }
15663
+ module2.exports = function buildURL(url, params, paramsSerializer) {
15664
+ if (!params) {
15665
+ return url;
15666
+ }
15667
+ var serializedParams;
15668
+ if (paramsSerializer) {
15669
+ serializedParams = paramsSerializer(params);
15670
+ } else if (utils.isURLSearchParams(params)) {
15671
+ serializedParams = params.toString();
15672
+ } else {
15673
+ var parts = [];
15674
+ utils.forEach(params, function serialize(val, key) {
15675
+ if (val === null || typeof val === "undefined") {
15676
+ return;
15677
+ }
15678
+ if (utils.isArray(val)) {
15679
+ key = key + "[]";
15680
+ } else {
15681
+ val = [val];
15682
+ }
15683
+ utils.forEach(val, function parseValue(v) {
15684
+ if (utils.isDate(v)) {
15685
+ v = v.toISOString();
15686
+ } else if (utils.isObject(v)) {
15687
+ v = JSON.stringify(v);
15688
+ }
15689
+ parts.push(encode(key) + "=" + encode(v));
15690
+ });
15691
+ });
15692
+ serializedParams = parts.join("&");
15693
+ }
15694
+ if (serializedParams) {
15695
+ var hashmarkIndex = url.indexOf("#");
15696
+ if (hashmarkIndex !== -1) {
15697
+ url = url.slice(0, hashmarkIndex);
15698
+ }
15699
+ url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
15700
+ }
15701
+ return url;
15702
+ };
15703
+ }
15704
+ });
15705
+
15706
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/package.json
15707
+ var require_package3 = __commonJS({
15708
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/package.json"(exports2, module2) {
15709
+ module2.exports = {
15710
+ name: "axios",
15711
+ version: "0.21.4",
15712
+ description: "Promise based HTTP client for the browser and node.js",
15713
+ main: "index.js",
15714
+ scripts: {
15715
+ test: "grunt test",
15716
+ start: "node ./sandbox/server.js",
15717
+ build: "NODE_ENV=production grunt build",
15718
+ preversion: "npm test",
15719
+ version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",
15720
+ postversion: "git push && git push --tags",
15721
+ examples: "node ./examples/server.js",
15722
+ coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
15723
+ fix: "eslint --fix lib/**/*.js"
15724
+ },
15725
+ repository: {
15726
+ type: "git",
15727
+ url: "https://github.com/axios/axios.git"
15728
+ },
15729
+ keywords: [
15730
+ "xhr",
15731
+ "http",
15732
+ "ajax",
15733
+ "promise",
15734
+ "node"
15735
+ ],
15736
+ author: "Matt Zabriskie",
15737
+ license: "MIT",
15738
+ bugs: {
15739
+ url: "https://github.com/axios/axios/issues"
15740
+ },
15741
+ homepage: "https://axios-http.com",
15742
+ devDependencies: {
15743
+ coveralls: "^3.0.0",
15744
+ "es6-promise": "^4.2.4",
15745
+ grunt: "^1.3.0",
15746
+ "grunt-banner": "^0.6.0",
15747
+ "grunt-cli": "^1.2.0",
15748
+ "grunt-contrib-clean": "^1.1.0",
15749
+ "grunt-contrib-watch": "^1.0.0",
15750
+ "grunt-eslint": "^23.0.0",
15751
+ "grunt-karma": "^4.0.0",
15752
+ "grunt-mocha-test": "^0.13.3",
15753
+ "grunt-ts": "^6.0.0-beta.19",
15754
+ "grunt-webpack": "^4.0.2",
15755
+ "istanbul-instrumenter-loader": "^1.0.0",
15756
+ "jasmine-core": "^2.4.1",
15757
+ karma: "^6.3.2",
15758
+ "karma-chrome-launcher": "^3.1.0",
15759
+ "karma-firefox-launcher": "^2.1.0",
15760
+ "karma-jasmine": "^1.1.1",
15761
+ "karma-jasmine-ajax": "^0.1.13",
15762
+ "karma-safari-launcher": "^1.0.0",
15763
+ "karma-sauce-launcher": "^4.3.6",
15764
+ "karma-sinon": "^1.0.5",
15765
+ "karma-sourcemap-loader": "^0.3.8",
15766
+ "karma-webpack": "^4.0.2",
15767
+ "load-grunt-tasks": "^3.5.2",
15768
+ minimist: "^1.2.0",
15769
+ mocha: "^8.2.1",
15770
+ sinon: "^4.5.0",
15771
+ "terser-webpack-plugin": "^4.2.3",
15772
+ typescript: "^4.0.5",
15773
+ "url-search-params": "^0.10.0",
15774
+ webpack: "^4.44.2",
15775
+ "webpack-dev-server": "^3.11.0"
15776
+ },
15777
+ browser: {
15778
+ "./lib/adapters/http.js": "./lib/adapters/xhr.js"
15779
+ },
15780
+ jsdelivr: "dist/axios.min.js",
15781
+ unpkg: "dist/axios.min.js",
15782
+ typings: "./index.d.ts",
15783
+ dependencies: {
15784
+ "follow-redirects": "^1.14.0"
15785
+ },
15786
+ bundlesize: [
15787
+ {
15788
+ path: "./dist/axios.min.js",
15789
+ threshold: "5kB"
15790
+ }
15791
+ ]
15792
+ };
15793
+ }
15794
+ });
15795
+
15796
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/adapters/http.js
15797
+ var require_http2 = __commonJS({
15798
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/adapters/http.js"(exports2, module2) {
15799
+ "use strict";
15800
+ var utils = require_utils12();
15801
+ var settle = require_settle2();
15802
+ var buildFullPath = require_buildFullPath2();
15803
+ var buildURL = require_buildURL2();
15804
+ var http = require("http");
15805
+ var https = require("https");
15806
+ var httpFollow = require_follow_redirects().http;
15807
+ var httpsFollow = require_follow_redirects().https;
15808
+ var url = require("url");
15809
+ var zlib = require("zlib");
15810
+ var pkg = require_package3();
15811
+ var createError = require_createError2();
15812
+ var enhanceError = require_enhanceError2();
15813
+ var isHttps = /https:?/;
15814
+ function setProxy(options, proxy, location) {
15815
+ options.hostname = proxy.host;
15816
+ options.host = proxy.host;
15817
+ options.port = proxy.port;
15818
+ options.path = location;
15819
+ if (proxy.auth) {
15820
+ var base64 = Buffer.from(proxy.auth.username + ":" + proxy.auth.password, "utf8").toString("base64");
15821
+ options.headers["Proxy-Authorization"] = "Basic " + base64;
15822
+ }
15823
+ options.beforeRedirect = function beforeRedirect(redirection) {
15824
+ redirection.headers.host = redirection.host;
15825
+ setProxy(redirection, proxy, redirection.href);
15826
+ };
15827
+ }
15828
+ module2.exports = function httpAdapter(config) {
15829
+ return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
15830
+ var resolve = function resolve2(value) {
15831
+ resolvePromise(value);
15832
+ };
15833
+ var reject = function reject2(value) {
15834
+ rejectPromise(value);
15835
+ };
15836
+ var data = config.data;
15837
+ var headers = config.headers;
15838
+ if ("User-Agent" in headers || "user-agent" in headers) {
15839
+ if (!headers["User-Agent"] && !headers["user-agent"]) {
15840
+ delete headers["User-Agent"];
15841
+ delete headers["user-agent"];
15842
+ }
15843
+ } else {
15844
+ headers["User-Agent"] = "axios/" + pkg.version;
15845
+ }
15846
+ if (data && !utils.isStream(data)) {
15847
+ if (Buffer.isBuffer(data)) {
15848
+ } else if (utils.isArrayBuffer(data)) {
15849
+ data = Buffer.from(new Uint8Array(data));
15850
+ } else if (utils.isString(data)) {
15851
+ data = Buffer.from(data, "utf-8");
15852
+ } else {
15853
+ return reject(createError(
15854
+ "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
15855
+ config
15856
+ ));
15857
+ }
15858
+ headers["Content-Length"] = data.length;
15859
+ }
15860
+ var auth = void 0;
15861
+ if (config.auth) {
15862
+ var username = config.auth.username || "";
15863
+ var password = config.auth.password || "";
15864
+ auth = username + ":" + password;
15865
+ }
15866
+ var fullPath = buildFullPath(config.baseURL, config.url);
15867
+ var parsed = url.parse(fullPath);
15868
+ var protocol = parsed.protocol || "http:";
15869
+ if (!auth && parsed.auth) {
15870
+ var urlAuth = parsed.auth.split(":");
15871
+ var urlUsername = urlAuth[0] || "";
15872
+ var urlPassword = urlAuth[1] || "";
15873
+ auth = urlUsername + ":" + urlPassword;
15874
+ }
15875
+ if (auth) {
15876
+ delete headers.Authorization;
15877
+ }
15878
+ var isHttpsRequest = isHttps.test(protocol);
15879
+ var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
15880
+ var options = {
15881
+ path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ""),
15882
+ method: config.method.toUpperCase(),
15883
+ headers,
15884
+ agent,
15885
+ agents: { http: config.httpAgent, https: config.httpsAgent },
15886
+ auth
15887
+ };
15888
+ if (config.socketPath) {
15889
+ options.socketPath = config.socketPath;
15890
+ } else {
15891
+ options.hostname = parsed.hostname;
15892
+ options.port = parsed.port;
15893
+ }
15894
+ var proxy = config.proxy;
15895
+ if (!proxy && proxy !== false) {
15896
+ var proxyEnv = protocol.slice(0, -1) + "_proxy";
15897
+ var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
15898
+ if (proxyUrl) {
15899
+ var parsedProxyUrl = url.parse(proxyUrl);
15900
+ var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
15901
+ var shouldProxy = true;
15902
+ if (noProxyEnv) {
15903
+ var noProxy = noProxyEnv.split(",").map(function trim(s) {
15904
+ return s.trim();
15905
+ });
15906
+ shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
15907
+ if (!proxyElement) {
15908
+ return false;
15909
+ }
15910
+ if (proxyElement === "*") {
15911
+ return true;
15912
+ }
15913
+ if (proxyElement[0] === "." && parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
15914
+ return true;
15915
+ }
15916
+ return parsed.hostname === proxyElement;
15917
+ });
15918
+ }
15919
+ if (shouldProxy) {
15920
+ proxy = {
15921
+ host: parsedProxyUrl.hostname,
15922
+ port: parsedProxyUrl.port,
15923
+ protocol: parsedProxyUrl.protocol
15924
+ };
15925
+ if (parsedProxyUrl.auth) {
15926
+ var proxyUrlAuth = parsedProxyUrl.auth.split(":");
15927
+ proxy.auth = {
15928
+ username: proxyUrlAuth[0],
15929
+ password: proxyUrlAuth[1]
15930
+ };
15931
+ }
15932
+ }
15933
+ }
15934
+ }
15935
+ if (proxy) {
15936
+ options.headers.host = parsed.hostname + (parsed.port ? ":" + parsed.port : "");
15937
+ setProxy(options, proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
15938
+ }
15939
+ var transport;
15940
+ var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
15941
+ if (config.transport) {
15942
+ transport = config.transport;
15943
+ } else if (config.maxRedirects === 0) {
15944
+ transport = isHttpsProxy ? https : http;
15945
+ } else {
15946
+ if (config.maxRedirects) {
15947
+ options.maxRedirects = config.maxRedirects;
15948
+ }
15949
+ transport = isHttpsProxy ? httpsFollow : httpFollow;
15950
+ }
15951
+ if (config.maxBodyLength > -1) {
15952
+ options.maxBodyLength = config.maxBodyLength;
15953
+ }
15954
+ var req = transport.request(options, function handleResponse(res) {
15955
+ if (req.aborted) return;
15956
+ var stream = res;
15957
+ var lastRequest = res.req || req;
15958
+ if (res.statusCode !== 204 && lastRequest.method !== "HEAD" && config.decompress !== false) {
15959
+ switch (res.headers["content-encoding"]) {
15960
+ /*eslint default-case:0*/
15961
+ case "gzip":
15962
+ case "compress":
15963
+ case "deflate":
15964
+ stream = stream.pipe(zlib.createUnzip());
15965
+ delete res.headers["content-encoding"];
15966
+ break;
15967
+ }
15968
+ }
15969
+ var response = {
15970
+ status: res.statusCode,
15971
+ statusText: res.statusMessage,
15972
+ headers: res.headers,
15973
+ config,
15974
+ request: lastRequest
15975
+ };
15976
+ if (config.responseType === "stream") {
15977
+ response.data = stream;
15978
+ settle(resolve, reject, response);
15979
+ } else {
15980
+ var responseBuffer = [];
15981
+ var totalResponseBytes = 0;
15982
+ stream.on("data", function handleStreamData(chunk) {
15983
+ responseBuffer.push(chunk);
15984
+ totalResponseBytes += chunk.length;
15985
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
15986
+ stream.destroy();
15987
+ reject(createError(
15988
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
15989
+ config,
15990
+ null,
15991
+ lastRequest
15992
+ ));
15993
+ }
15994
+ });
15995
+ stream.on("error", function handleStreamError(err) {
15996
+ if (req.aborted) return;
15997
+ reject(enhanceError(err, config, null, lastRequest));
15998
+ });
15999
+ stream.on("end", function handleStreamEnd() {
16000
+ var responseData = Buffer.concat(responseBuffer);
16001
+ if (config.responseType !== "arraybuffer") {
16002
+ responseData = responseData.toString(config.responseEncoding);
16003
+ if (!config.responseEncoding || config.responseEncoding === "utf8") {
16004
+ responseData = utils.stripBOM(responseData);
16005
+ }
16006
+ }
16007
+ response.data = responseData;
16008
+ settle(resolve, reject, response);
16009
+ });
16010
+ }
16011
+ });
16012
+ req.on("error", function handleRequestError(err) {
16013
+ if (req.aborted && err.code !== "ERR_FR_TOO_MANY_REDIRECTS") return;
16014
+ reject(enhanceError(err, config, null, req));
16015
+ });
16016
+ if (config.timeout) {
16017
+ var timeout = parseInt(config.timeout, 10);
16018
+ if (isNaN(timeout)) {
16019
+ reject(createError(
16020
+ "error trying to parse `config.timeout` to int",
16021
+ config,
16022
+ "ERR_PARSE_TIMEOUT",
16023
+ req
16024
+ ));
16025
+ return;
16026
+ }
16027
+ req.setTimeout(timeout, function handleRequestTimeout() {
16028
+ req.abort();
16029
+ reject(createError(
16030
+ "timeout of " + timeout + "ms exceeded",
16031
+ config,
16032
+ config.transitional && config.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
16033
+ req
16034
+ ));
16035
+ });
16036
+ }
16037
+ if (config.cancelToken) {
16038
+ config.cancelToken.promise.then(function onCanceled(cancel) {
16039
+ if (req.aborted) return;
16040
+ req.abort();
16041
+ reject(cancel);
16042
+ });
16043
+ }
16044
+ if (utils.isStream(data)) {
16045
+ data.on("error", function handleStreamError(err) {
16046
+ reject(enhanceError(err, config, null, req));
16047
+ }).pipe(req);
16048
+ } else {
16049
+ req.end(data);
16050
+ }
16051
+ });
16052
+ };
16053
+ }
16054
+ });
16055
+
16056
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/InterceptorManager.js
16057
+ var require_InterceptorManager2 = __commonJS({
16058
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/InterceptorManager.js"(exports2, module2) {
16059
+ "use strict";
16060
+ var utils = require_utils12();
16061
+ function InterceptorManager() {
16062
+ this.handlers = [];
16063
+ }
16064
+ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
16065
+ this.handlers.push({
16066
+ fulfilled,
16067
+ rejected,
16068
+ synchronous: options ? options.synchronous : false,
16069
+ runWhen: options ? options.runWhen : null
16070
+ });
16071
+ return this.handlers.length - 1;
16072
+ };
16073
+ InterceptorManager.prototype.eject = function eject(id) {
16074
+ if (this.handlers[id]) {
16075
+ this.handlers[id] = null;
16076
+ }
16077
+ };
16078
+ InterceptorManager.prototype.forEach = function forEach(fn) {
16079
+ utils.forEach(this.handlers, function forEachHandler(h) {
16080
+ if (h !== null) {
16081
+ fn(h);
16082
+ }
16083
+ });
16084
+ };
16085
+ module2.exports = InterceptorManager;
16086
+ }
16087
+ });
16088
+
16089
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/normalizeHeaderName.js
16090
+ var require_normalizeHeaderName2 = __commonJS({
16091
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/normalizeHeaderName.js"(exports2, module2) {
16092
+ "use strict";
16093
+ var utils = require_utils12();
16094
+ module2.exports = function normalizeHeaderName(headers, normalizedName) {
16095
+ utils.forEach(headers, function processHeader(value, name) {
16096
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
16097
+ headers[normalizedName] = value;
16098
+ delete headers[name];
16099
+ }
16100
+ });
16101
+ };
16102
+ }
16103
+ });
16104
+
16105
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/cookies.js
16106
+ var require_cookies4 = __commonJS({
16107
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/cookies.js"(exports2, module2) {
16108
+ "use strict";
16109
+ var utils = require_utils12();
16110
+ module2.exports = utils.isStandardBrowserEnv() ? (
16111
+ // Standard browser envs support document.cookie
16112
+ /* @__PURE__ */ (function standardBrowserEnv() {
16113
+ return {
16114
+ write: function write(name, value, expires, path, domain, secure) {
16115
+ var cookie = [];
16116
+ cookie.push(name + "=" + encodeURIComponent(value));
16117
+ if (utils.isNumber(expires)) {
16118
+ cookie.push("expires=" + new Date(expires).toGMTString());
16119
+ }
16120
+ if (utils.isString(path)) {
16121
+ cookie.push("path=" + path);
16122
+ }
16123
+ if (utils.isString(domain)) {
16124
+ cookie.push("domain=" + domain);
16125
+ }
16126
+ if (secure === true) {
16127
+ cookie.push("secure");
16128
+ }
16129
+ document.cookie = cookie.join("; ");
16130
+ },
16131
+ read: function read(name) {
16132
+ var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
16133
+ return match ? decodeURIComponent(match[3]) : null;
16134
+ },
16135
+ remove: function remove(name) {
16136
+ this.write(name, "", Date.now() - 864e5);
16137
+ }
16138
+ };
16139
+ })()
16140
+ ) : (
16141
+ // Non standard browser env (web workers, react-native) lack needed support.
16142
+ /* @__PURE__ */ (function nonStandardBrowserEnv() {
16143
+ return {
16144
+ write: function write() {
16145
+ },
16146
+ read: function read() {
16147
+ return null;
16148
+ },
16149
+ remove: function remove() {
16150
+ }
16151
+ };
16152
+ })()
16153
+ );
16154
+ }
16155
+ });
16156
+
16157
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/parseHeaders.js
16158
+ var require_parseHeaders2 = __commonJS({
16159
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/parseHeaders.js"(exports2, module2) {
16160
+ "use strict";
16161
+ var utils = require_utils12();
16162
+ var ignoreDuplicateOf = [
16163
+ "age",
16164
+ "authorization",
16165
+ "content-length",
16166
+ "content-type",
16167
+ "etag",
16168
+ "expires",
16169
+ "from",
16170
+ "host",
16171
+ "if-modified-since",
16172
+ "if-unmodified-since",
16173
+ "last-modified",
16174
+ "location",
16175
+ "max-forwards",
16176
+ "proxy-authorization",
16177
+ "referer",
16178
+ "retry-after",
16179
+ "user-agent"
16180
+ ];
16181
+ module2.exports = function parseHeaders(headers) {
16182
+ var parsed = {};
16183
+ var key;
16184
+ var val;
16185
+ var i;
16186
+ if (!headers) {
16187
+ return parsed;
16188
+ }
16189
+ utils.forEach(headers.split("\n"), function parser(line) {
16190
+ i = line.indexOf(":");
16191
+ key = utils.trim(line.substr(0, i)).toLowerCase();
16192
+ val = utils.trim(line.substr(i + 1));
16193
+ if (key) {
16194
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
16195
+ return;
16196
+ }
16197
+ if (key === "set-cookie") {
16198
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
16199
+ } else {
16200
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
16201
+ }
16202
+ }
16203
+ });
16204
+ return parsed;
16205
+ };
16206
+ }
16207
+ });
16208
+
16209
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/isURLSameOrigin.js
16210
+ var require_isURLSameOrigin2 = __commonJS({
16211
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/isURLSameOrigin.js"(exports2, module2) {
16212
+ "use strict";
16213
+ var utils = require_utils12();
16214
+ module2.exports = utils.isStandardBrowserEnv() ? (
16215
+ // Standard browser envs have full support of the APIs needed to test
16216
+ // whether the request URL is of the same origin as current location.
16217
+ (function standardBrowserEnv() {
16218
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
16219
+ var urlParsingNode = document.createElement("a");
16220
+ var originURL;
16221
+ function resolveURL(url) {
16222
+ var href = url;
16223
+ if (msie) {
16224
+ urlParsingNode.setAttribute("href", href);
16225
+ href = urlParsingNode.href;
16226
+ }
16227
+ urlParsingNode.setAttribute("href", href);
16228
+ return {
16229
+ href: urlParsingNode.href,
16230
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
16231
+ host: urlParsingNode.host,
16232
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
16233
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
16234
+ hostname: urlParsingNode.hostname,
16235
+ port: urlParsingNode.port,
16236
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
16237
+ };
16238
+ }
16239
+ originURL = resolveURL(window.location.href);
16240
+ return function isURLSameOrigin(requestURL) {
16241
+ var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
16242
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
16243
+ };
16244
+ })()
16245
+ ) : (
16246
+ // Non standard browser envs (web workers, react-native) lack needed support.
16247
+ /* @__PURE__ */ (function nonStandardBrowserEnv() {
16248
+ return function isURLSameOrigin() {
16249
+ return true;
16250
+ };
16251
+ })()
16252
+ );
16253
+ }
16254
+ });
16255
+
16256
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/adapters/xhr.js
16257
+ var require_xhr2 = __commonJS({
16258
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/adapters/xhr.js"(exports2, module2) {
16259
+ "use strict";
16260
+ var utils = require_utils12();
16261
+ var settle = require_settle2();
16262
+ var cookies = require_cookies4();
16263
+ var buildURL = require_buildURL2();
16264
+ var buildFullPath = require_buildFullPath2();
16265
+ var parseHeaders = require_parseHeaders2();
16266
+ var isURLSameOrigin = require_isURLSameOrigin2();
16267
+ var createError = require_createError2();
16268
+ module2.exports = function xhrAdapter(config) {
16269
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
16270
+ var requestData = config.data;
16271
+ var requestHeaders = config.headers;
16272
+ var responseType = config.responseType;
16273
+ if (utils.isFormData(requestData)) {
16274
+ delete requestHeaders["Content-Type"];
16275
+ }
16276
+ var request = new XMLHttpRequest();
16277
+ if (config.auth) {
16278
+ var username = config.auth.username || "";
16279
+ var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
16280
+ requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
16281
+ }
16282
+ var fullPath = buildFullPath(config.baseURL, config.url);
16283
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
16284
+ request.timeout = config.timeout;
16285
+ function onloadend() {
16286
+ if (!request) {
16287
+ return;
16288
+ }
16289
+ var responseHeaders = "getAllResponseHeaders" in request ? parseHeaders(request.getAllResponseHeaders()) : null;
16290
+ var responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
16291
+ var response = {
16292
+ data: responseData,
16293
+ status: request.status,
16294
+ statusText: request.statusText,
16295
+ headers: responseHeaders,
16296
+ config,
16297
+ request
16298
+ };
16299
+ settle(resolve, reject, response);
16300
+ request = null;
16301
+ }
16302
+ if ("onloadend" in request) {
16303
+ request.onloadend = onloadend;
16304
+ } else {
16305
+ request.onreadystatechange = function handleLoad() {
16306
+ if (!request || request.readyState !== 4) {
16307
+ return;
16308
+ }
16309
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
16310
+ return;
16311
+ }
16312
+ setTimeout(onloadend);
16313
+ };
16314
+ }
16315
+ request.onabort = function handleAbort() {
16316
+ if (!request) {
16317
+ return;
16318
+ }
16319
+ reject(createError("Request aborted", config, "ECONNABORTED", request));
16320
+ request = null;
16321
+ };
16322
+ request.onerror = function handleError() {
16323
+ reject(createError("Network Error", config, null, request));
16324
+ request = null;
16325
+ };
16326
+ request.ontimeout = function handleTimeout() {
16327
+ var timeoutErrorMessage = "timeout of " + config.timeout + "ms exceeded";
16328
+ if (config.timeoutErrorMessage) {
16329
+ timeoutErrorMessage = config.timeoutErrorMessage;
16330
+ }
16331
+ reject(createError(
16332
+ timeoutErrorMessage,
16333
+ config,
16334
+ config.transitional && config.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
16335
+ request
16336
+ ));
16337
+ request = null;
16338
+ };
16339
+ if (utils.isStandardBrowserEnv()) {
16340
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : void 0;
16341
+ if (xsrfValue) {
16342
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
16343
+ }
16344
+ }
16345
+ if ("setRequestHeader" in request) {
16346
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
16347
+ if (typeof requestData === "undefined" && key.toLowerCase() === "content-type") {
16348
+ delete requestHeaders[key];
16349
+ } else {
16350
+ request.setRequestHeader(key, val);
16351
+ }
16352
+ });
16353
+ }
16354
+ if (!utils.isUndefined(config.withCredentials)) {
16355
+ request.withCredentials = !!config.withCredentials;
16356
+ }
16357
+ if (responseType && responseType !== "json") {
16358
+ request.responseType = config.responseType;
16359
+ }
16360
+ if (typeof config.onDownloadProgress === "function") {
16361
+ request.addEventListener("progress", config.onDownloadProgress);
16362
+ }
16363
+ if (typeof config.onUploadProgress === "function" && request.upload) {
16364
+ request.upload.addEventListener("progress", config.onUploadProgress);
16365
+ }
16366
+ if (config.cancelToken) {
16367
+ config.cancelToken.promise.then(function onCanceled(cancel) {
16368
+ if (!request) {
16369
+ return;
16370
+ }
16371
+ request.abort();
16372
+ reject(cancel);
16373
+ request = null;
16374
+ });
16375
+ }
16376
+ if (!requestData) {
16377
+ requestData = null;
16378
+ }
16379
+ request.send(requestData);
16380
+ });
16381
+ };
16382
+ }
16383
+ });
16384
+
16385
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/defaults.js
16386
+ var require_defaults2 = __commonJS({
16387
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/defaults.js"(exports2, module2) {
16388
+ "use strict";
16389
+ var utils = require_utils12();
16390
+ var normalizeHeaderName = require_normalizeHeaderName2();
16391
+ var enhanceError = require_enhanceError2();
16392
+ var DEFAULT_CONTENT_TYPE = {
16393
+ "Content-Type": "application/x-www-form-urlencoded"
16394
+ };
16395
+ function setContentTypeIfUnset(headers, value) {
16396
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers["Content-Type"])) {
16397
+ headers["Content-Type"] = value;
16398
+ }
16399
+ }
16400
+ function getDefaultAdapter() {
16401
+ var adapter;
16402
+ if (typeof XMLHttpRequest !== "undefined") {
16403
+ adapter = require_xhr2();
16404
+ } else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
16405
+ adapter = require_http2();
16406
+ }
16407
+ return adapter;
16408
+ }
16409
+ function stringifySafely(rawValue, parser, encoder) {
16410
+ if (utils.isString(rawValue)) {
16411
+ try {
16412
+ (parser || JSON.parse)(rawValue);
16413
+ return utils.trim(rawValue);
16414
+ } catch (e) {
16415
+ if (e.name !== "SyntaxError") {
16416
+ throw e;
16417
+ }
16418
+ }
16419
+ }
16420
+ return (encoder || JSON.stringify)(rawValue);
16421
+ }
16422
+ var defaults = {
16423
+ transitional: {
16424
+ silentJSONParsing: true,
16425
+ forcedJSONParsing: true,
16426
+ clarifyTimeoutError: false
16427
+ },
16428
+ adapter: getDefaultAdapter(),
16429
+ transformRequest: [function transformRequest(data, headers) {
16430
+ normalizeHeaderName(headers, "Accept");
16431
+ normalizeHeaderName(headers, "Content-Type");
16432
+ if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
16433
+ return data;
16434
+ }
16435
+ if (utils.isArrayBufferView(data)) {
16436
+ return data.buffer;
16437
+ }
16438
+ if (utils.isURLSearchParams(data)) {
16439
+ setContentTypeIfUnset(headers, "application/x-www-form-urlencoded;charset=utf-8");
16440
+ return data.toString();
16441
+ }
16442
+ if (utils.isObject(data) || headers && headers["Content-Type"] === "application/json") {
16443
+ setContentTypeIfUnset(headers, "application/json");
16444
+ return stringifySafely(data);
16445
+ }
16446
+ return data;
16447
+ }],
16448
+ transformResponse: [function transformResponse(data) {
16449
+ var transitional = this.transitional;
16450
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
16451
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
16452
+ var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
16453
+ if (strictJSONParsing || forcedJSONParsing && utils.isString(data) && data.length) {
16454
+ try {
16455
+ return JSON.parse(data);
16456
+ } catch (e) {
16457
+ if (strictJSONParsing) {
16458
+ if (e.name === "SyntaxError") {
16459
+ throw enhanceError(e, this, "E_JSON_PARSE");
16460
+ }
16461
+ throw e;
16462
+ }
16463
+ }
16464
+ }
16465
+ return data;
16466
+ }],
16467
+ /**
16468
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
16469
+ * timeout is not created.
16470
+ */
16471
+ timeout: 0,
16472
+ xsrfCookieName: "XSRF-TOKEN",
16473
+ xsrfHeaderName: "X-XSRF-TOKEN",
16474
+ maxContentLength: -1,
16475
+ maxBodyLength: -1,
16476
+ validateStatus: function validateStatus(status) {
16477
+ return status >= 200 && status < 300;
16478
+ }
16479
+ };
16480
+ defaults.headers = {
16481
+ common: {
16482
+ "Accept": "application/json, text/plain, */*"
16483
+ }
16484
+ };
16485
+ utils.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
16486
+ defaults.headers[method] = {};
16487
+ });
16488
+ utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
16489
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
16490
+ });
16491
+ module2.exports = defaults;
16492
+ }
16493
+ });
16494
+
16495
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/transformData.js
16496
+ var require_transformData2 = __commonJS({
16497
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/transformData.js"(exports2, module2) {
16498
+ "use strict";
16499
+ var utils = require_utils12();
16500
+ var defaults = require_defaults2();
16501
+ module2.exports = function transformData(data, headers, fns) {
16502
+ var context = this || defaults;
16503
+ utils.forEach(fns, function transform(fn) {
16504
+ data = fn.call(context, data, headers);
16505
+ });
16506
+ return data;
16507
+ };
16508
+ }
16509
+ });
16510
+
16511
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/cancel/isCancel.js
16512
+ var require_isCancel2 = __commonJS({
16513
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/cancel/isCancel.js"(exports2, module2) {
16514
+ "use strict";
16515
+ module2.exports = function isCancel(value) {
16516
+ return !!(value && value.__CANCEL__);
16517
+ };
16518
+ }
16519
+ });
16520
+
16521
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/dispatchRequest.js
16522
+ var require_dispatchRequest2 = __commonJS({
16523
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/dispatchRequest.js"(exports2, module2) {
16524
+ "use strict";
16525
+ var utils = require_utils12();
16526
+ var transformData = require_transformData2();
16527
+ var isCancel = require_isCancel2();
16528
+ var defaults = require_defaults2();
16529
+ function throwIfCancellationRequested(config) {
16530
+ if (config.cancelToken) {
16531
+ config.cancelToken.throwIfRequested();
16532
+ }
16533
+ }
16534
+ module2.exports = function dispatchRequest(config) {
16535
+ throwIfCancellationRequested(config);
16536
+ config.headers = config.headers || {};
16537
+ config.data = transformData.call(
16538
+ config,
16539
+ config.data,
16540
+ config.headers,
16541
+ config.transformRequest
16542
+ );
16543
+ config.headers = utils.merge(
16544
+ config.headers.common || {},
16545
+ config.headers[config.method] || {},
16546
+ config.headers
16547
+ );
16548
+ utils.forEach(
16549
+ ["delete", "get", "head", "post", "put", "patch", "common"],
16550
+ function cleanHeaderConfig(method) {
16551
+ delete config.headers[method];
16552
+ }
16553
+ );
16554
+ var adapter = config.adapter || defaults.adapter;
16555
+ return adapter(config).then(function onAdapterResolution(response) {
16556
+ throwIfCancellationRequested(config);
16557
+ response.data = transformData.call(
16558
+ config,
16559
+ response.data,
16560
+ response.headers,
16561
+ config.transformResponse
16562
+ );
16563
+ return response;
16564
+ }, function onAdapterRejection(reason) {
16565
+ if (!isCancel(reason)) {
16566
+ throwIfCancellationRequested(config);
16567
+ if (reason && reason.response) {
16568
+ reason.response.data = transformData.call(
16569
+ config,
16570
+ reason.response.data,
16571
+ reason.response.headers,
16572
+ config.transformResponse
16573
+ );
16574
+ }
16575
+ }
16576
+ return Promise.reject(reason);
16577
+ });
16578
+ };
16579
+ }
16580
+ });
16581
+
16582
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/mergeConfig.js
16583
+ var require_mergeConfig2 = __commonJS({
16584
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/mergeConfig.js"(exports2, module2) {
16585
+ "use strict";
16586
+ var utils = require_utils12();
16587
+ module2.exports = function mergeConfig(config1, config2) {
16588
+ config2 = config2 || {};
16589
+ var config = {};
16590
+ var valueFromConfig2Keys = ["url", "method", "data"];
16591
+ var mergeDeepPropertiesKeys = ["headers", "auth", "proxy", "params"];
16592
+ var defaultToConfig2Keys = [
16593
+ "baseURL",
16594
+ "transformRequest",
16595
+ "transformResponse",
16596
+ "paramsSerializer",
16597
+ "timeout",
16598
+ "timeoutMessage",
16599
+ "withCredentials",
16600
+ "adapter",
16601
+ "responseType",
16602
+ "xsrfCookieName",
16603
+ "xsrfHeaderName",
16604
+ "onUploadProgress",
16605
+ "onDownloadProgress",
16606
+ "decompress",
16607
+ "maxContentLength",
16608
+ "maxBodyLength",
16609
+ "maxRedirects",
16610
+ "transport",
16611
+ "httpAgent",
16612
+ "httpsAgent",
16613
+ "cancelToken",
16614
+ "socketPath",
16615
+ "responseEncoding"
16616
+ ];
16617
+ var directMergeKeys = ["validateStatus"];
16618
+ function getMergedValue(target, source) {
16619
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
16620
+ return utils.merge(target, source);
16621
+ } else if (utils.isPlainObject(source)) {
16622
+ return utils.merge({}, source);
16623
+ } else if (utils.isArray(source)) {
16624
+ return source.slice();
16625
+ }
16626
+ return source;
16627
+ }
16628
+ function mergeDeepProperties(prop) {
16629
+ if (!utils.isUndefined(config2[prop])) {
16630
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
16631
+ } else if (!utils.isUndefined(config1[prop])) {
16632
+ config[prop] = getMergedValue(void 0, config1[prop]);
16633
+ }
16634
+ }
16635
+ utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
16636
+ if (!utils.isUndefined(config2[prop])) {
16637
+ config[prop] = getMergedValue(void 0, config2[prop]);
16638
+ }
16639
+ });
16640
+ utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
16641
+ utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
16642
+ if (!utils.isUndefined(config2[prop])) {
16643
+ config[prop] = getMergedValue(void 0, config2[prop]);
16644
+ } else if (!utils.isUndefined(config1[prop])) {
16645
+ config[prop] = getMergedValue(void 0, config1[prop]);
16646
+ }
16647
+ });
16648
+ utils.forEach(directMergeKeys, function merge(prop) {
16649
+ if (prop in config2) {
16650
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
16651
+ } else if (prop in config1) {
16652
+ config[prop] = getMergedValue(void 0, config1[prop]);
16653
+ }
16654
+ });
16655
+ var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
16656
+ var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {
16657
+ return axiosKeys.indexOf(key) === -1;
16658
+ });
16659
+ utils.forEach(otherKeys, mergeDeepProperties);
16660
+ return config;
16661
+ };
16662
+ }
16663
+ });
16664
+
16665
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/validator.js
16666
+ var require_validator2 = __commonJS({
16667
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/validator.js"(exports2, module2) {
16668
+ "use strict";
16669
+ var pkg = require_package3();
16670
+ var validators = {};
16671
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
16672
+ validators[type] = function validator(thing) {
16673
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
16674
+ };
16675
+ });
16676
+ var deprecatedWarnings = {};
16677
+ var currentVerArr = pkg.version.split(".");
16678
+ function isOlderVersion(version2, thanVersion) {
16679
+ var pkgVersionArr = thanVersion ? thanVersion.split(".") : currentVerArr;
16680
+ var destVer = version2.split(".");
16681
+ for (var i = 0; i < 3; i++) {
16682
+ if (pkgVersionArr[i] > destVer[i]) {
16683
+ return true;
16684
+ } else if (pkgVersionArr[i] < destVer[i]) {
16685
+ return false;
16686
+ }
16687
+ }
16688
+ return false;
16689
+ }
16690
+ validators.transitional = function transitional(validator, version2, message) {
16691
+ var isDeprecated = version2 && isOlderVersion(version2);
16692
+ function formatMessage(opt, desc) {
16693
+ return "[Axios v" + pkg.version + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
16694
+ }
16695
+ return function(value, opt, opts) {
16696
+ if (validator === false) {
16697
+ throw new Error(formatMessage(opt, " has been removed in " + version2));
16698
+ }
16699
+ if (isDeprecated && !deprecatedWarnings[opt]) {
16700
+ deprecatedWarnings[opt] = true;
16701
+ console.warn(
16702
+ formatMessage(
16703
+ opt,
16704
+ " has been deprecated since v" + version2 + " and will be removed in the near future"
16705
+ )
16706
+ );
16707
+ }
16708
+ return validator ? validator(value, opt, opts) : true;
16709
+ };
16710
+ };
16711
+ function assertOptions(options, schema, allowUnknown) {
16712
+ if (typeof options !== "object") {
16713
+ throw new TypeError("options must be an object");
16714
+ }
16715
+ var keys = Object.keys(options);
16716
+ var i = keys.length;
16717
+ while (i-- > 0) {
16718
+ var opt = keys[i];
16719
+ var validator = schema[opt];
16720
+ if (validator) {
16721
+ var value = options[opt];
16722
+ var result = value === void 0 || validator(value, opt, options);
16723
+ if (result !== true) {
16724
+ throw new TypeError("option " + opt + " must be " + result);
16725
+ }
16726
+ continue;
16727
+ }
16728
+ if (allowUnknown !== true) {
16729
+ throw Error("Unknown option " + opt);
16730
+ }
16731
+ }
16732
+ }
16733
+ module2.exports = {
16734
+ isOlderVersion,
16735
+ assertOptions,
16736
+ validators
16737
+ };
16738
+ }
16739
+ });
16740
+
16741
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/Axios.js
16742
+ var require_Axios2 = __commonJS({
16743
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/core/Axios.js"(exports2, module2) {
16744
+ "use strict";
16745
+ var utils = require_utils12();
16746
+ var buildURL = require_buildURL2();
16747
+ var InterceptorManager = require_InterceptorManager2();
16748
+ var dispatchRequest = require_dispatchRequest2();
16749
+ var mergeConfig = require_mergeConfig2();
16750
+ var validator = require_validator2();
16751
+ var validators = validator.validators;
16752
+ function Axios(instanceConfig) {
16753
+ this.defaults = instanceConfig;
16754
+ this.interceptors = {
16755
+ request: new InterceptorManager(),
16756
+ response: new InterceptorManager()
16757
+ };
16758
+ }
16759
+ Axios.prototype.request = function request(config) {
16760
+ if (typeof config === "string") {
16761
+ config = arguments[1] || {};
16762
+ config.url = arguments[0];
16763
+ } else {
16764
+ config = config || {};
16765
+ }
16766
+ config = mergeConfig(this.defaults, config);
16767
+ if (config.method) {
16768
+ config.method = config.method.toLowerCase();
16769
+ } else if (this.defaults.method) {
16770
+ config.method = this.defaults.method.toLowerCase();
16771
+ } else {
16772
+ config.method = "get";
16773
+ }
16774
+ var transitional = config.transitional;
16775
+ if (transitional !== void 0) {
16776
+ validator.assertOptions(transitional, {
16777
+ silentJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
16778
+ forcedJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
16779
+ clarifyTimeoutError: validators.transitional(validators.boolean, "1.0.0")
16780
+ }, false);
16781
+ }
16782
+ var requestInterceptorChain = [];
16783
+ var synchronousRequestInterceptors = true;
16784
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
16785
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
16786
+ return;
16787
+ }
16788
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
16789
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
16790
+ });
16791
+ var responseInterceptorChain = [];
16792
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
16793
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
16794
+ });
16795
+ var promise;
16796
+ if (!synchronousRequestInterceptors) {
16797
+ var chain = [dispatchRequest, void 0];
16798
+ Array.prototype.unshift.apply(chain, requestInterceptorChain);
16799
+ chain = chain.concat(responseInterceptorChain);
16800
+ promise = Promise.resolve(config);
16801
+ while (chain.length) {
16802
+ promise = promise.then(chain.shift(), chain.shift());
16803
+ }
16804
+ return promise;
16805
+ }
16806
+ var newConfig = config;
16807
+ while (requestInterceptorChain.length) {
16808
+ var onFulfilled = requestInterceptorChain.shift();
16809
+ var onRejected = requestInterceptorChain.shift();
16810
+ try {
16811
+ newConfig = onFulfilled(newConfig);
16812
+ } catch (error) {
16813
+ onRejected(error);
16814
+ break;
16815
+ }
16816
+ }
16817
+ try {
16818
+ promise = dispatchRequest(newConfig);
16819
+ } catch (error) {
16820
+ return Promise.reject(error);
16821
+ }
16822
+ while (responseInterceptorChain.length) {
16823
+ promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
16824
+ }
16825
+ return promise;
16826
+ };
16827
+ Axios.prototype.getUri = function getUri(config) {
16828
+ config = mergeConfig(this.defaults, config);
16829
+ return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
16830
+ };
16831
+ utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
16832
+ Axios.prototype[method] = function(url, config) {
16833
+ return this.request(mergeConfig(config || {}, {
16834
+ method,
16835
+ url,
16836
+ data: (config || {}).data
16837
+ }));
16838
+ };
16839
+ });
16840
+ utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
16841
+ Axios.prototype[method] = function(url, data, config) {
16842
+ return this.request(mergeConfig(config || {}, {
16843
+ method,
16844
+ url,
16845
+ data
16846
+ }));
16847
+ };
16848
+ });
16849
+ module2.exports = Axios;
16850
+ }
16851
+ });
16852
+
16853
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/cancel/Cancel.js
16854
+ var require_Cancel2 = __commonJS({
16855
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/cancel/Cancel.js"(exports2, module2) {
16856
+ "use strict";
16857
+ function Cancel(message) {
16858
+ this.message = message;
16859
+ }
16860
+ Cancel.prototype.toString = function toString() {
16861
+ return "Cancel" + (this.message ? ": " + this.message : "");
16862
+ };
16863
+ Cancel.prototype.__CANCEL__ = true;
16864
+ module2.exports = Cancel;
16865
+ }
16866
+ });
16867
+
16868
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/cancel/CancelToken.js
16869
+ var require_CancelToken2 = __commonJS({
16870
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/cancel/CancelToken.js"(exports2, module2) {
16871
+ "use strict";
16872
+ var Cancel = require_Cancel2();
16873
+ function CancelToken(executor) {
16874
+ if (typeof executor !== "function") {
16875
+ throw new TypeError("executor must be a function.");
16876
+ }
16877
+ var resolvePromise;
16878
+ this.promise = new Promise(function promiseExecutor(resolve) {
16879
+ resolvePromise = resolve;
16880
+ });
16881
+ var token = this;
16882
+ executor(function cancel(message) {
16883
+ if (token.reason) {
16884
+ return;
16885
+ }
16886
+ token.reason = new Cancel(message);
16887
+ resolvePromise(token.reason);
16888
+ });
16889
+ }
16890
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
16891
+ if (this.reason) {
16892
+ throw this.reason;
16893
+ }
16894
+ };
16895
+ CancelToken.source = function source() {
16896
+ var cancel;
16897
+ var token = new CancelToken(function executor(c) {
16898
+ cancel = c;
16899
+ });
16900
+ return {
16901
+ token,
16902
+ cancel
16903
+ };
16904
+ };
16905
+ module2.exports = CancelToken;
16906
+ }
16907
+ });
16908
+
16909
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/spread.js
16910
+ var require_spread2 = __commonJS({
16911
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/spread.js"(exports2, module2) {
16912
+ "use strict";
16913
+ module2.exports = function spread(callback) {
16914
+ return function wrap(arr) {
16915
+ return callback.apply(null, arr);
16916
+ };
16917
+ };
16918
+ }
16919
+ });
16920
+
16921
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/isAxiosError.js
16922
+ var require_isAxiosError2 = __commonJS({
16923
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/helpers/isAxiosError.js"(exports2, module2) {
16924
+ "use strict";
16925
+ module2.exports = function isAxiosError(payload) {
16926
+ return typeof payload === "object" && payload.isAxiosError === true;
16927
+ };
16928
+ }
16929
+ });
16930
+
16931
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/axios.js
16932
+ var require_axios3 = __commonJS({
16933
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/lib/axios.js"(exports2, module2) {
16934
+ "use strict";
16935
+ var utils = require_utils12();
16936
+ var bind = require_bind2();
16937
+ var Axios = require_Axios2();
16938
+ var mergeConfig = require_mergeConfig2();
16939
+ var defaults = require_defaults2();
16940
+ function createInstance(defaultConfig) {
16941
+ var context = new Axios(defaultConfig);
16942
+ var instance = bind(Axios.prototype.request, context);
16943
+ utils.extend(instance, Axios.prototype, context);
16944
+ utils.extend(instance, context);
16945
+ return instance;
16946
+ }
16947
+ var axios = createInstance(defaults);
16948
+ axios.Axios = Axios;
16949
+ axios.create = function create(instanceConfig) {
16950
+ return createInstance(mergeConfig(axios.defaults, instanceConfig));
16951
+ };
16952
+ axios.Cancel = require_Cancel2();
16953
+ axios.CancelToken = require_CancelToken2();
16954
+ axios.isCancel = require_isCancel2();
16955
+ axios.all = function all(promises) {
16956
+ return Promise.all(promises);
16957
+ };
16958
+ axios.spread = require_spread2();
16959
+ axios.isAxiosError = require_isAxiosError2();
16960
+ module2.exports = axios;
16961
+ module2.exports.default = axios;
16962
+ }
16963
+ });
16964
+
16965
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/index.js
16966
+ var require_axios4 = __commonJS({
16967
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/axios/index.js"(exports2, module2) {
16968
+ module2.exports = require_axios3();
16969
+ }
16970
+ });
16971
+
16972
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/options.js
16973
+ var require_options2 = __commonJS({
16974
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/options.js"(exports2) {
16975
+ "use strict";
16976
+ Object.defineProperty(exports2, "__esModule", { value: true });
16977
+ exports2.getUrlHeaders = exports2.buildAllHeaders = exports2.buildOptions = void 0;
16978
+ var constants_1 = require_constants6();
16979
+ var headers_1 = require_headers2();
16980
+ var utils_1 = require_utils11();
16981
+ var buildOptions = ({ requestOptions, urlObject, headers, globalConfig = {
16982
+ httpMockServer: {
16983
+ enabled: false
16984
+ }
16985
+ } }) => {
16986
+ const { url, params } = requestOptions;
16987
+ if (params) {
16988
+ if (typeof params !== "object") {
16989
+ throw new Error("Search params must be an object");
16990
+ }
16991
+ }
16992
+ const localConfigOptions = maybeRedirectToMockServer(url, globalConfig);
16993
+ const newOptions = Object.assign(Object.assign(Object.assign({}, requestOptions), localConfigOptions), { headers });
16994
+ return newOptions;
16995
+ };
16996
+ exports2.buildOptions = buildOptions;
16997
+ var buildAllHeaders = (requestOptions, wixHeadersOpts, globalConfig = {
16998
+ httpMockServer: {
16999
+ enabled: false
17000
+ }
17001
+ }, urlObject) => {
17002
+ const { url, disableWixHeaders, headers } = requestOptions;
17003
+ const composedHeaders = (0, headers_1.composeHeaders)({
17004
+ url,
17005
+ disableWixHeaders,
17006
+ wixHeadersOpts
17007
+ });
17008
+ const originalUrlHeader = (0, exports2.getUrlHeaders)(globalConfig, requestOptions, urlObject);
17009
+ return Object.assign(Object.assign(Object.assign({}, composedHeaders), lowerAllJsonKeys(headers)), originalUrlHeader);
17010
+ };
17011
+ exports2.buildAllHeaders = buildAllHeaders;
17012
+ var getUrlHeaders = (globalConfig, requestOptions, urlObject) => {
17013
+ const { url, params } = requestOptions;
17014
+ const { host, protocol } = urlObject;
17015
+ const originalUrlHeader = globalConfig.httpMockServer.enabled ? {
17016
+ [constants_1.ORIGINAL_URL_HEADER]: buildUrlFromRequest(url, params),
17017
+ [constants_1.ORIGINAL_HOST_HEADER]: (0, utils_1.isAbsoluteUrl)(url) ? (0, utils_1.extractHost)(url) : host,
17018
+ [constants_1.ORIGINAL_PROTOCOL_HEADER]: (0, utils_1.isAbsoluteUrl)(url) ? (0, utils_1.extractProtocol)(url) : protocol
17019
+ } : {};
17020
+ return originalUrlHeader;
17021
+ };
17022
+ exports2.getUrlHeaders = getUrlHeaders;
17023
+ function maybeRedirectToMockServer(url, globalConfig) {
17024
+ if (globalConfig.httpMockServer.enabled) {
17025
+ const mockUrl = new URL(globalConfig.httpMockServer.mockServerUrl);
17026
+ return {
17027
+ url: (0, utils_1.changeHost)(url, mockUrl.host)
17028
+ };
17029
+ }
17030
+ return {};
17031
+ }
17032
+ function buildUrlFromRequest(url, requestParams) {
17033
+ const { pathname, searchParams } = new URL(url, "http://unused.com");
17034
+ requestParams = requestParams || searchParams;
17035
+ if (requestParams) {
17036
+ const params = (0, utils_1.toSearchQueryParams)(requestParams) || requestParams.toString();
17037
+ const paramsAsString = params ? `?${params}` : "";
17038
+ return `${pathname}${paramsAsString}`;
17039
+ }
17040
+ return pathname;
17041
+ }
17042
+ function lowerAllJsonKeys(objectToChange) {
17043
+ objectToChange = objectToChange || {};
17044
+ const result = Object.keys(objectToChange).reduce((prev, key) => Object.assign(Object.assign({}, prev), { [key.toLowerCase()]: objectToChange[key] }), {});
17045
+ return result;
17046
+ }
17047
+ }
17048
+ });
17049
+
17050
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/http-client.js
17051
+ var require_http_client2 = __commonJS({
17052
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/http-client.js"(exports2) {
17053
+ "use strict";
17054
+ Object.defineProperty(exports2, "__esModule", { value: true });
17055
+ exports2.createHttpClient = exports2.HttpClient = void 0;
17056
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
17057
+ var axios_1 = tslib_1.__importDefault(require_axios4());
17058
+ var xhr_1 = tslib_1.__importDefault(require_xhr2());
17059
+ var constants_1 = require_constants6();
17060
+ var env_util_1 = require_env_util2();
17061
+ var error_1 = require_error2();
17062
+ var headers_1 = require_headers2();
17063
+ var options_1 = require_options2();
17064
+ var utils_1 = require_utils11();
17065
+ var HttpClient = class {
17066
+ constructor(opts = {}) {
17067
+ this.opts = opts;
17068
+ this.opts = defaultClientOptions(this.opts);
17069
+ this.client = axios_1.default.create(this.opts);
17070
+ this.flags = {
17071
+ sanitizerPocEnabled: checkSanitizerPocEnabled()
17072
+ };
17073
+ }
17074
+ static isHttpError(payload) {
17075
+ return !!(payload === null || payload === void 0 ? void 0 : payload.isWixHttpError);
17076
+ }
17077
+ async request(requestOptionsOrFactory, overrides) {
17078
+ var _a, _b;
17079
+ const host = (0, utils_1.resolveHost)(this.opts);
17080
+ const protocol = (0, utils_1.resolveProtocol)(this.opts);
17081
+ const urlObject = { protocol, host };
17082
+ const requestOptions = typeof requestOptionsOrFactory === "function" ? requestOptionsOrFactory({ isSSR: this.opts.isSSR, host }) : requestOptionsOrFactory;
17083
+ const signedInstance = (overrides === null || overrides === void 0 ? void 0 : overrides.signedInstance) || await ((_b = (_a = this.opts).getAppToken) === null || _b === void 0 ? void 0 : _b.call(_a)) || "";
17084
+ const headers = this.getHeaders(requestOptions, signedInstance, urlObject);
17085
+ const options = (0, options_1.buildOptions)({
17086
+ requestOptions,
17087
+ urlObject,
17088
+ headers,
17089
+ globalConfig: (0, utils_1.getGlobalConfig)()
17090
+ });
17091
+ if (this.opts.isSSR) {
17092
+ options.baseURL = this.opts.baseURL ? this.opts.baseURL : `${constants_1.SSR_PROTOCOL}://${constants_1.SSR_HOST}`;
17093
+ }
17094
+ try {
17095
+ const res = await this.client.request(options).catch((err) => this.maybeFallbackRequest(err, requestOptions, urlObject, signedInstance));
17096
+ return this.transformResponse(res, requestOptions);
17097
+ } catch (e) {
17098
+ this.handleRequestError(e, options);
17099
+ }
17100
+ }
17101
+ async get(url, requestOptions) {
17102
+ const opts = Object.assign(Object.assign({}, requestOptions), { url, method: "GET" });
17103
+ return this.request(opts);
17104
+ }
17105
+ async delete(url, requestOptions) {
17106
+ const opts = Object.assign(Object.assign({}, requestOptions), { url, method: "DELETE" });
17107
+ return this.request(opts);
17108
+ }
17109
+ async head(url, requestOptions) {
17110
+ const opts = Object.assign(Object.assign({}, requestOptions), { url, method: "HEAD" });
17111
+ return this.request(opts);
17112
+ }
17113
+ async options(url, requestOptions) {
17114
+ const opts = Object.assign(Object.assign({}, requestOptions), { url, method: "OPTIONS" });
17115
+ return this.request(opts);
17116
+ }
17117
+ async post(url, data, requestOptions) {
17118
+ const opts = Object.assign(Object.assign({}, requestOptions), {
17119
+ url,
17120
+ data,
17121
+ method: "POST"
17122
+ });
17123
+ return this.request(opts);
17124
+ }
17125
+ async put(url, data, requestOptions) {
17126
+ const opts = Object.assign(Object.assign({}, requestOptions), {
17127
+ url,
17128
+ data,
17129
+ method: "PUT"
17130
+ });
17131
+ return this.request(opts);
17132
+ }
17133
+ async patch(url, data, requestOptions) {
17134
+ const opts = Object.assign(Object.assign({}, requestOptions), {
17135
+ url,
17136
+ data,
17137
+ method: "PATCH"
17138
+ });
17139
+ return this.request(opts);
17140
+ }
17141
+ get CancelToken() {
17142
+ return axios_1.default.CancelToken;
17143
+ }
17144
+ get isCancel() {
17145
+ return axios_1.default.isCancel;
17146
+ }
17147
+ getHeaders(requestOptions, signedInstance, urlObject) {
17148
+ if (typeof this.opts.createHeaders === "function") {
17149
+ return this.getCustomHeaders(requestOptions, signedInstance, urlObject);
17150
+ }
17151
+ const wixHeadersOpts = {
17152
+ signedInstance,
17153
+ artifactId: this.opts.artifactId,
17154
+ csrf: false,
17155
+ multilingualOptions: this.opts.multilingualOptions
17156
+ };
17157
+ return (0, options_1.buildAllHeaders)(requestOptions, wixHeadersOpts, (0, utils_1.getGlobalConfig)(), urlObject);
17158
+ }
17159
+ getCustomHeaders(requestOptions, signedInstance, urlObject) {
17160
+ const { url } = requestOptions;
17161
+ const authHeader = signedInstance && (0, headers_1.isWixDomain)(url) ? { authorization: signedInstance } : {};
17162
+ const customHeaders = this.opts.createHeaders();
17163
+ const originalUrlHeader = (0, options_1.getUrlHeaders)((0, utils_1.getGlobalConfig)(), requestOptions, urlObject);
17164
+ return Object.assign(Object.assign(Object.assign({}, originalUrlHeader), customHeaders), authHeader);
17165
+ }
17166
+ handleRequestError(error, requestOptions) {
17167
+ const requestError = (0, error_1.createHttpError)(error);
17168
+ (0, utils_1.silent)(() => {
17169
+ var _a;
17170
+ return (_a = requestOptions.onError) === null || _a === void 0 ? void 0 : _a.call(requestOptions, requestError);
17171
+ });
17172
+ throw requestError;
17173
+ }
17174
+ maybeFallbackRequest(err, requestOptions, urlObject, signedInstance) {
17175
+ var _a, _b, _c;
17176
+ const shouldFallbackRequest = (0, utils_1.isHttpMockServerEnabled)() && (0, utils_1.shouldAllowUnmocked)() && ((_a = err.response) === null || _a === void 0 ? void 0 : _a.status) === 404 && ((_c = (_b = err.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.msg) === constants_1.NO_SCENARIO_FOUND;
17177
+ if (shouldFallbackRequest) {
17178
+ const headers = this.getHeaders(requestOptions, signedInstance, urlObject);
17179
+ const prodOptions = (0, options_1.buildOptions)({
17180
+ requestOptions,
17181
+ urlObject,
17182
+ headers
17183
+ });
17184
+ return this.client.request(prodOptions);
17185
+ }
17186
+ throw err;
17187
+ }
17188
+ transformResponse(res, requestOptions) {
17189
+ const requestId = (0, headers_1.requestIdOrEmptyString)(res);
17190
+ const data = transformData(res, requestOptions, this.flags);
17191
+ return Object.assign(Object.assign({}, res), {
17192
+ data,
17193
+ requestId
17194
+ });
17195
+ }
17196
+ };
17197
+ exports2.HttpClient = HttpClient;
17198
+ HttpClient.CancelToken = axios_1.default.CancelToken;
17199
+ HttpClient.isCancel = axios_1.default.isCancel;
17200
+ function defaultClientOptions(opts) {
17201
+ let adapter = opts.adapter;
17202
+ if (!adapter) {
17203
+ adapter = xhr_1.default;
17204
+ if ((0, env_util_1.isNode)()) {
17205
+ adapter = getNodeAdapter();
17206
+ }
17207
+ }
17208
+ return Object.assign({ adapter, isSSR: false }, opts);
17209
+ }
17210
+ function getNodeAdapter() {
17211
+ if (typeof __webpack_require__ === "function") {
17212
+ return __non_webpack_require__("axios/lib/adapters/http");
17213
+ }
17214
+ return require_http2();
17215
+ }
17216
+ function transformData(res, requestOptions, flags) {
17217
+ let resData = sanitizeResponse(res, flags);
17218
+ if (requestOptions._pickResponseBody) {
17219
+ resData = (0, utils_1.extractProp)(res.data, requestOptions._pickResponseBody);
17220
+ }
17221
+ if (requestOptions._logs) {
17222
+ const logs = (0, utils_1.extractProp)(res.data, requestOptions._logs);
17223
+ if (logs === null || logs === void 0 ? void 0 : logs.length) {
17224
+ logs.map((log) => console.log(...log));
17225
+ }
17226
+ }
17227
+ return resData;
17228
+ }
17229
+ function sanitizeResponse(res, flags) {
17230
+ try {
17231
+ if (flags.sanitizerPocEnabled) {
17232
+ const start = performance.now();
17233
+ const sanitizer = new Sanitizer();
17234
+ if (res.headers["content-type"].includes("application/json")) {
17235
+ console.log("[+] JSON Response detected, sanitizing data");
17236
+ const sanitizeStringValue = function(jsonResponse) {
17237
+ try {
17238
+ Object.keys(jsonResponse).forEach((key) => {
17239
+ if (typeof jsonResponse[key] === "string") {
17240
+ jsonResponse[key] = sanitizer.sanitizeFor("span", jsonResponse[key]).innerHTML;
17241
+ } else if (typeof jsonResponse[key] === "object") {
17242
+ jsonResponse[key] = sanitizeStringValue(jsonResponse[key]);
17243
+ }
17244
+ });
17245
+ return jsonResponse;
17246
+ } catch (error) {
17247
+ console.log(error);
17248
+ }
17249
+ };
17250
+ const end = performance.now();
17251
+ console.log(`Time taken: ${end - start} milliseconds.`);
17252
+ return sanitizeStringValue(res.data);
17253
+ }
17254
+ }
17255
+ } catch (e) {
17256
+ console.log("[+] Sanitizer API not supported: %o", e);
17257
+ }
17258
+ return res.data;
17259
+ }
17260
+ function checkSanitizerPocEnabled() {
17261
+ var _a;
17262
+ try {
17263
+ return (0, env_util_1.isBrowser)() && new URLSearchParams(((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.hash) || "").get("sanitizerPOC") === "true";
17264
+ } catch (_b) {
17265
+ return false;
17266
+ }
17267
+ }
17268
+ function createHttpClient(...args) {
17269
+ return new HttpClient(...args);
17270
+ }
17271
+ exports2.createHttpClient = createHttpClient;
17272
+ }
17273
+ });
17274
+
17275
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/http-client-node.js
17276
+ var require_http_client_node2 = __commonJS({
17277
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/http-client-node.js"(exports2) {
17278
+ "use strict";
17279
+ Object.defineProperty(exports2, "__esModule", { value: true });
17280
+ exports2.HttpClient = exports2.createHttpClient = void 0;
17281
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
17282
+ var http_1 = tslib_1.__importDefault(require_http2());
17283
+ var http_client_1 = require_http_client2();
17284
+ var HttpClientNode = class extends http_client_1.HttpClient {
17285
+ constructor(opts = {}) {
17286
+ super(Object.assign({ adapter: http_1.default }, opts));
17287
+ }
17288
+ };
17289
+ exports2.HttpClient = HttpClientNode;
17290
+ function createHttpClientNode(...args) {
17291
+ return new HttpClientNode(...args);
17292
+ }
17293
+ exports2.createHttpClient = createHttpClientNode;
17294
+ }
17295
+ });
17296
+
17297
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/types.js
17298
+ var require_types5 = __commonJS({
17299
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/types.js"(exports2) {
17300
+ "use strict";
17301
+ Object.defineProperty(exports2, "__esModule", { value: true });
17302
+ }
17303
+ });
17304
+
17305
+ // ../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/index-node.js
17306
+ var require_index_node2 = __commonJS({
17307
+ "../../node_modules/@wix/standalone-node-bi-logger/node_modules/@wix/http-client/dist/src/index-node.js"(exports2) {
17308
+ "use strict";
17309
+ Object.defineProperty(exports2, "__esModule", { value: true });
17310
+ exports2.HttpClient = exports2.createHttpClient = exports2.HttpError = exports2.createHttpError = exports2.ORIGINAL_URL_HEADER = exports2.ORIGINAL_PROTOCOL_HEADER = exports2.ORIGINAL_HOST_HEADER = void 0;
17311
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
17312
+ var constants_1 = require_constants6();
17313
+ Object.defineProperty(exports2, "ORIGINAL_HOST_HEADER", { enumerable: true, get: function() {
17314
+ return constants_1.ORIGINAL_HOST_HEADER;
17315
+ } });
17316
+ Object.defineProperty(exports2, "ORIGINAL_PROTOCOL_HEADER", { enumerable: true, get: function() {
17317
+ return constants_1.ORIGINAL_PROTOCOL_HEADER;
17318
+ } });
17319
+ Object.defineProperty(exports2, "ORIGINAL_URL_HEADER", { enumerable: true, get: function() {
17320
+ return constants_1.ORIGINAL_URL_HEADER;
17321
+ } });
17322
+ var error_1 = require_error2();
17323
+ Object.defineProperty(exports2, "createHttpError", { enumerable: true, get: function() {
17324
+ return error_1.createHttpError;
17325
+ } });
17326
+ Object.defineProperty(exports2, "HttpError", { enumerable: true, get: function() {
17327
+ return error_1.HttpError;
17328
+ } });
17329
+ var http_client_node_1 = require_http_client_node2();
17330
+ Object.defineProperty(exports2, "createHttpClient", { enumerable: true, get: function() {
17331
+ return http_client_node_1.createHttpClient;
17332
+ } });
17333
+ Object.defineProperty(exports2, "HttpClient", { enumerable: true, get: function() {
17334
+ return http_client_node_1.HttpClient;
17335
+ } });
17336
+ tslib_1.__exportStar(require_types5(), exports2);
17337
+ }
17338
+ });
17339
+
17340
+ // ../../node_modules/@wix/standalone-node-bi-logger/dist/src/index.js
17341
+ var require_src2 = __commonJS({
17342
+ "../../node_modules/@wix/standalone-node-bi-logger/dist/src/index.js"(exports2) {
17343
+ "use strict";
17344
+ Object.defineProperty(exports2, "__esModule", { value: true });
17345
+ exports2.StandaloneNodeLogger = void 0;
17346
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
17347
+ var wix_bi_logger_client_1 = tslib_1.__importDefault(require_dist5());
17348
+ var http_client_1 = require_index_node2();
17349
+ var defaultOptions = {
17350
+ baseUrl: process.env.BI_BASE_URL || "https://frog.wix.com",
17351
+ endpoint: "",
17352
+ logError: false
17353
+ };
17354
+ var StandaloneNodeLogger = (
17355
+ /** @class */
17356
+ (function() {
17357
+ function StandaloneNodeLogger2() {
17358
+ }
17359
+ StandaloneNodeLogger2.prototype.factory = function(options) {
17360
+ var _this = this;
17361
+ if (options === void 0) {
17362
+ options = {};
17363
+ }
17364
+ var fullOptions = tslib_1.__assign(tslib_1.__assign({}, defaultOptions), options);
17365
+ var biLoggerFactory = wix_bi_logger_client_1.default.factory();
17366
+ if (fullOptions.onError) {
17367
+ biLoggerFactory.setPublisherFailHandler(fullOptions.onError);
17368
+ }
17369
+ biLoggerFactory.addPublisher(function(eventParams, context) {
17370
+ return tslib_1.__awaiter(_this, void 0, void 0, function() {
17371
+ var endpoint, baseUrl, userAgent, logError, headers;
17372
+ return tslib_1.__generator(this, function(_a) {
17373
+ switch (_a.label) {
17374
+ case 0:
17375
+ endpoint = context.endpoint || fullOptions.endpoint;
17376
+ baseUrl = fullOptions.baseUrl, userAgent = fullOptions.userAgent, logError = fullOptions.logError;
17377
+ headers = userAgent ? { headers: { "User-Agent": userAgent } } : {};
17378
+ return [4, new http_client_1.HttpClient({ baseURL: baseUrl }).get(endpoint, {
17379
+ headers,
17380
+ params: eventParams,
17381
+ timeout: 30 * 1e3
17382
+ }).catch(function(e) {
17383
+ return logError ? console.error(e.toJSON()) : Promise.reject(e);
17384
+ })];
17385
+ case 1:
17386
+ _a.sent();
17387
+ return [
17388
+ 2
17389
+ /*return*/
17390
+ ];
17391
+ }
17392
+ });
17393
+ });
17394
+ });
17395
+ return biLoggerFactory;
17396
+ };
17397
+ return StandaloneNodeLogger2;
17398
+ })()
17399
+ );
17400
+ exports2.StandaloneNodeLogger = StandaloneNodeLogger;
17401
+ exports2.default = new StandaloneNodeLogger();
17402
+ }
17403
+ });
17404
+
14767
17405
  // dist/biLogger.js
14768
17406
  var require_biLogger = __commonJS({
14769
17407
  "dist/biLogger.js"(exports2) {
14770
17408
  "use strict";
17409
+ var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
17410
+ return mod && mod.__esModule ? mod : { "default": mod };
17411
+ };
14771
17412
  Object.defineProperty(exports2, "__esModule", { value: true });
14772
17413
  exports2.biLogger = void 0;
14773
- var wix_bi_logger_client_1 = require_dist5();
14774
- var biPublisher = async (event) => {
14775
- const { src, evid, ...params } = event;
14776
- const queryString = Object.entries({ src, evid, ...params }).filter(([, v]) => v !== void 0 && v !== null).map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(String(v))}`).join("&");
14777
- await fetch(`https://frog.wix.com/code?${queryString}`);
14778
- };
14779
- exports2.biLogger = (0, wix_bi_logger_client_1.factory)().addPublisher(biPublisher).logger();
17414
+ var standalone_node_bi_logger_1 = __importDefault2(require_src2());
17415
+ exports2.biLogger = standalone_node_bi_logger_1.default.factory({ endpoint: "code" }).logger();
14780
17416
  }
14781
17417
  });
14782
17418