@opexa/portal-sdk 0.59.11 → 0.59.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6355,24 +6355,24 @@ function parseFbCxd(input) {
|
|
|
6355
6355
|
return { cxd, fbAdditionalCxd };
|
|
6356
6356
|
}
|
|
6357
6357
|
var thumbmark_instance;
|
|
6358
|
-
async function getFingerprint() {
|
|
6358
|
+
async function getFingerprint(environment) {
|
|
6359
6359
|
if (typeof window === "undefined") return null;
|
|
6360
6360
|
if (!thumbmark_instance) {
|
|
6361
6361
|
thumbmark_instance = new Thumbmark({
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6362
|
+
logging: true,
|
|
6363
|
+
...environment === "production" && {
|
|
6364
|
+
api_key: "8294c227c5194f96e4deb022e8e76293",
|
|
6365
|
+
logging: false,
|
|
6366
|
+
timeout: 3e4,
|
|
6367
|
+
cache_lifetime_in_ms: 24 * 60 * 60 * 1e3
|
|
6368
|
+
}
|
|
6367
6369
|
});
|
|
6368
6370
|
}
|
|
6369
6371
|
try {
|
|
6370
|
-
const cached = sessionStorage.getItem("fingerprint");
|
|
6371
|
-
if (cached) return cached;
|
|
6372
6372
|
const result = await thumbmark_instance.get();
|
|
6373
|
-
sessionStorage.setItem("fingerprint", result.thumbmark);
|
|
6374
6373
|
return result.thumbmark;
|
|
6375
|
-
} catch {
|
|
6374
|
+
} catch (e) {
|
|
6375
|
+
console.warn(e);
|
|
6376
6376
|
return null;
|
|
6377
6377
|
}
|
|
6378
6378
|
}
|
|
@@ -9129,19 +9129,19 @@ var Sdk = class {
|
|
|
9129
9129
|
}
|
|
9130
9130
|
initMarketDomain() {
|
|
9131
9131
|
if (typeof window === "undefined") return;
|
|
9132
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
9133
|
+
const hostname = window.location.hostname;
|
|
9134
|
+
const market = searchParams.get("market");
|
|
9135
|
+
const adClickId = this.adManager.clickId;
|
|
9132
9136
|
if (Capacitor.isNativePlatform()) {
|
|
9133
9137
|
const platform = Capacitor.getPlatform();
|
|
9134
9138
|
if (platform === "ios") {
|
|
9135
|
-
sessionStorage.setItem("domain",
|
|
9139
|
+
sessionStorage.setItem("domain", `${hostname}/ios`);
|
|
9136
9140
|
} else {
|
|
9137
|
-
sessionStorage.setItem("domain",
|
|
9141
|
+
sessionStorage.setItem("domain", `${hostname}/android`);
|
|
9138
9142
|
}
|
|
9139
9143
|
return;
|
|
9140
9144
|
}
|
|
9141
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
9142
|
-
const hostname = window.location.hostname;
|
|
9143
|
-
const market = searchParams.get("market");
|
|
9144
|
-
const adClickId = this.adManager.clickId;
|
|
9145
9145
|
if (market) {
|
|
9146
9146
|
sessionStorage.setItem("domain", `${hostname}/${market}`);
|
|
9147
9147
|
} else if (adClickId) {
|
|
@@ -9252,7 +9252,7 @@ var Sdk = class {
|
|
|
9252
9252
|
};
|
|
9253
9253
|
}
|
|
9254
9254
|
async fingerprint() {
|
|
9255
|
-
return await getFingerprint();
|
|
9255
|
+
return await getFingerprint(this.config.environment ?? "development");
|
|
9256
9256
|
}
|
|
9257
9257
|
get miscMiddleware() {
|
|
9258
9258
|
return async (request) => {
|