@codebards/ik-embeddable-form 0.0.2677686331-qa → 0.0.2678302598-qa
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/embed.js +202 -39
- package/dist/embed.js.map +1 -1
- package/package.json +1 -1
package/dist/embed.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
var IKEmbeddableFormBundle = function(exports) {
|
|
2
2
|
"use strict";
|
|
3
|
+
function logWebinarType(source, data = {}) {
|
|
4
|
+
console.log(`[IKForm][webinarType] ${source}`, data);
|
|
5
|
+
}
|
|
3
6
|
var n, l$1, u$2, i$1, r$1, o$1, e$1, f$2, c$1, a$1, s$1, h$1, p$1, v$1, y$1, d$1 = {}, w$2 = [], _$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, g$2 = Array.isArray;
|
|
4
7
|
function m$1(n2, l2) {
|
|
5
8
|
for (var u2 in l2) n2[u2] = l2[u2];
|
|
@@ -851,9 +854,26 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
851
854
|
};
|
|
852
855
|
function resolveWebinarTypeFromPrimaryGoal(primaryGoal, currentWebinarType) {
|
|
853
856
|
const goal = primaryGoal.trim();
|
|
854
|
-
if (!goal || goal === "exploring")
|
|
857
|
+
if (!goal || goal === "exploring") {
|
|
858
|
+
logWebinarType("qualifier.resolveFromPrimaryGoal (unchanged)", {
|
|
859
|
+
primaryGoal: goal,
|
|
860
|
+
webinarType: currentWebinarType
|
|
861
|
+
});
|
|
862
|
+
return currentWebinarType;
|
|
863
|
+
}
|
|
855
864
|
const mapped = PRIMARY_GOAL_WEBINAR_TYPE[goal];
|
|
856
|
-
if (mapped === null || mapped === void 0)
|
|
865
|
+
if (mapped === null || mapped === void 0) {
|
|
866
|
+
logWebinarType("qualifier.resolveFromPrimaryGoal (no mapping)", {
|
|
867
|
+
primaryGoal: goal,
|
|
868
|
+
webinarType: currentWebinarType
|
|
869
|
+
});
|
|
870
|
+
return currentWebinarType;
|
|
871
|
+
}
|
|
872
|
+
logWebinarType("qualifier.resolveFromPrimaryGoal (mapped)", {
|
|
873
|
+
primaryGoal: goal,
|
|
874
|
+
from: currentWebinarType,
|
|
875
|
+
webinarType: mapped
|
|
876
|
+
});
|
|
857
877
|
return mapped;
|
|
858
878
|
}
|
|
859
879
|
function resolveLandingWebinarType(formData, fallbackWebinarType) {
|
|
@@ -866,11 +886,29 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
866
886
|
const primaryGoal = String(formData.primaryGoal ?? "").trim();
|
|
867
887
|
if (!primaryGoal) {
|
|
868
888
|
const assigned = formData.assignedWebinarType;
|
|
869
|
-
if (assigned != null && String(assigned).trim())
|
|
870
|
-
|
|
889
|
+
if (assigned != null && String(assigned).trim()) {
|
|
890
|
+
logWebinarType("qualifier.resolveEffective (assigned)", {
|
|
891
|
+
webinarType: String(assigned),
|
|
892
|
+
fallbackWebinarType
|
|
893
|
+
});
|
|
894
|
+
return String(assigned);
|
|
895
|
+
}
|
|
896
|
+
const landing = resolveLandingWebinarType(formData, fallbackWebinarType);
|
|
897
|
+
logWebinarType("qualifier.resolveEffective (landing)", {
|
|
898
|
+
webinarType: landing,
|
|
899
|
+
fallbackWebinarType
|
|
900
|
+
});
|
|
901
|
+
return landing;
|
|
871
902
|
}
|
|
872
903
|
const landingType = resolveLandingWebinarType(formData, fallbackWebinarType);
|
|
873
|
-
|
|
904
|
+
const resolved = resolveWebinarTypeFromPrimaryGoal(primaryGoal, landingType);
|
|
905
|
+
logWebinarType("qualifier.resolveEffective (with goal)", {
|
|
906
|
+
primaryGoal,
|
|
907
|
+
landingType,
|
|
908
|
+
webinarType: resolved,
|
|
909
|
+
fallbackWebinarType
|
|
910
|
+
});
|
|
911
|
+
return resolved;
|
|
874
912
|
}
|
|
875
913
|
class StepResolver {
|
|
876
914
|
resolveVisibleSteps(steps, formData) {
|
|
@@ -1098,15 +1136,15 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1098
1136
|
const ga = getCookie("_ga") ?? "";
|
|
1099
1137
|
return `${visitorId}${ga}:${vCountry}`;
|
|
1100
1138
|
}
|
|
1101
|
-
function persistContactCookies(data) {
|
|
1102
|
-
setCookie("ik_email", data.email, 30, "functional");
|
|
1103
|
-
setCookie("ik_phone", data.phone, 30, "functional");
|
|
1104
|
-
setCookie("ik_phone_code", data.phoneCode, 30, "functional");
|
|
1105
|
-
}
|
|
1106
1139
|
function persistProfileCookies(data) {
|
|
1107
1140
|
setCookie("ik_experience", data.experience, 30, "functional");
|
|
1108
1141
|
setCookie("ik_domain", data.domain, 30, "functional");
|
|
1109
1142
|
}
|
|
1143
|
+
function clearContactPrefillCookies() {
|
|
1144
|
+
deleteCookie("ik_email");
|
|
1145
|
+
deleteCookie("ik_phone");
|
|
1146
|
+
deleteCookie("ik_phone_code");
|
|
1147
|
+
}
|
|
1110
1148
|
function markRegistered() {
|
|
1111
1149
|
setCookie("ik_registered", "1", 30, "functional");
|
|
1112
1150
|
}
|
|
@@ -1138,22 +1176,14 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1138
1176
|
);
|
|
1139
1177
|
}
|
|
1140
1178
|
function clearPrefillCookies() {
|
|
1141
|
-
|
|
1142
|
-
deleteCookie("ik_phone");
|
|
1143
|
-
deleteCookie("ik_phone_code");
|
|
1179
|
+
clearContactPrefillCookies();
|
|
1144
1180
|
deleteCookie("ik_experience");
|
|
1145
1181
|
deleteCookie("ik_domain");
|
|
1146
1182
|
}
|
|
1147
1183
|
function getPrefillFromCookies() {
|
|
1148
1184
|
const prefill = {};
|
|
1149
|
-
const email = getCookie("ik_email");
|
|
1150
|
-
const phone = getCookie("ik_phone");
|
|
1151
|
-
const phoneCode = getCookie("ik_phone_code");
|
|
1152
1185
|
const experience = getCookie("ik_experience");
|
|
1153
1186
|
const domain = getCookie("ik_domain");
|
|
1154
|
-
if (email) prefill.email = email;
|
|
1155
|
-
if (phone) prefill.phone = phone;
|
|
1156
|
-
if (phoneCode) prefill.phoneCode = phoneCode;
|
|
1157
1187
|
if (experience) prefill.experience = experience;
|
|
1158
1188
|
if (domain) prefill.domain = domain;
|
|
1159
1189
|
return prefill;
|
|
@@ -1247,10 +1277,12 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1247
1277
|
let slotsPrefetchPromise = null;
|
|
1248
1278
|
function startSlotsPrefetch(openConfig) {
|
|
1249
1279
|
if (slotsPrefetchPromise) return;
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1280
|
+
const webinarType = openConfig.webinarType || "REGULAR";
|
|
1281
|
+
logWebinarType("startSlotsPrefetch", {
|
|
1282
|
+
webinarType,
|
|
1283
|
+
openConfigWebinarType: openConfig.webinarType
|
|
1284
|
+
});
|
|
1285
|
+
slotsPrefetchPromise = fetchWebinarSlots(webinarType, openConfig);
|
|
1254
1286
|
}
|
|
1255
1287
|
function getSlotsPrefetchPromise() {
|
|
1256
1288
|
return slotsPrefetchPromise;
|
|
@@ -1266,6 +1298,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1266
1298
|
const vCountry = vCountryFromCookie ?? geo.countryName;
|
|
1267
1299
|
const vCountryCode = geo.countryCode || vCountryFromCookie && countryNameToCode(vCountryFromCookie) || "";
|
|
1268
1300
|
persistVisitorCountryCookieIfAbsent(geo.countryName);
|
|
1301
|
+
clearContactPrefillCookies();
|
|
1269
1302
|
const cookiePrefill = getPrefillFromCookies();
|
|
1270
1303
|
openConfig.prefilledValues = {
|
|
1271
1304
|
...cookiePrefill,
|
|
@@ -1278,7 +1311,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1278
1311
|
openConfig,
|
|
1279
1312
|
vCountry,
|
|
1280
1313
|
vCountryCode,
|
|
1281
|
-
userTimezone:
|
|
1314
|
+
userTimezone: geo.timezone || browserTz,
|
|
1282
1315
|
city: geo.city ?? "",
|
|
1283
1316
|
region: geo.region ?? "",
|
|
1284
1317
|
device: getDeviceType(),
|
|
@@ -1291,6 +1324,13 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1291
1324
|
isExitIntentPopup: openConfig.isExitIntentPopup ?? false,
|
|
1292
1325
|
ready: true
|
|
1293
1326
|
};
|
|
1327
|
+
logWebinarType("initWebinarContext", {
|
|
1328
|
+
webinarType: contextInstance.webinarType,
|
|
1329
|
+
openConfigWebinarType: openConfig.webinarType,
|
|
1330
|
+
vCountry: contextInstance.vCountry,
|
|
1331
|
+
vCountryCode: contextInstance.vCountryCode,
|
|
1332
|
+
userTimezone: contextInstance.userTimezone
|
|
1333
|
+
});
|
|
1294
1334
|
setClarityContext(attribution.visitorId);
|
|
1295
1335
|
setUserContext(attribution.visitorId);
|
|
1296
1336
|
startSlotsPrefetch(openConfig);
|
|
@@ -1417,16 +1457,35 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1417
1457
|
type: webinarType
|
|
1418
1458
|
});
|
|
1419
1459
|
const url = `${base}/api/webinar-slot/upcoming-slots/?${params.toString()}`;
|
|
1460
|
+
logWebinarType("fetchSlotsFromApi request", {
|
|
1461
|
+
webinarType,
|
|
1462
|
+
country,
|
|
1463
|
+
timezone,
|
|
1464
|
+
url
|
|
1465
|
+
});
|
|
1420
1466
|
const headers = { Accept: "application/json" };
|
|
1421
1467
|
{
|
|
1422
1468
|
headers.Authorization = "1Cgx6oYXkOlWkNDn7_tXO";
|
|
1423
1469
|
}
|
|
1424
1470
|
const res = await fetch(url, { method: "GET", headers });
|
|
1425
1471
|
if (!res.ok) {
|
|
1472
|
+
logWebinarType("fetchSlotsFromApi failed", {
|
|
1473
|
+
webinarType,
|
|
1474
|
+
country,
|
|
1475
|
+
status: res.status,
|
|
1476
|
+
url
|
|
1477
|
+
});
|
|
1426
1478
|
throw new Error(`Slot API failed: ${res.status}`);
|
|
1427
1479
|
}
|
|
1428
1480
|
const data = await res.json();
|
|
1429
|
-
|
|
1481
|
+
const slots = Array.isArray(data) ? data : [];
|
|
1482
|
+
logWebinarType("fetchSlotsFromApi response", {
|
|
1483
|
+
webinarType,
|
|
1484
|
+
country,
|
|
1485
|
+
timezone,
|
|
1486
|
+
count: slots.length
|
|
1487
|
+
});
|
|
1488
|
+
return slots;
|
|
1430
1489
|
}
|
|
1431
1490
|
function getStaticSlots(openConfig) {
|
|
1432
1491
|
const custom = openConfig == null ? void 0 : openConfig.staticSlots;
|
|
@@ -1456,11 +1515,29 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1456
1515
|
const country = resolveSlotApiCountry(openConfig, slotApiConfig);
|
|
1457
1516
|
const timezone = resolveSlotApiTimezone();
|
|
1458
1517
|
const l2Type = (slotApiConfig == null ? void 0 : slotApiConfig.fallbackType) ?? "REGULAR";
|
|
1518
|
+
logWebinarType("fetchWebinarSlots start", {
|
|
1519
|
+
webinarType,
|
|
1520
|
+
l2FallbackType: l2Type,
|
|
1521
|
+
country,
|
|
1522
|
+
timezone,
|
|
1523
|
+
openConfigWebinarType: openConfig == null ? void 0 : openConfig.webinarType,
|
|
1524
|
+
slotApiCountryOverride: (openConfig == null ? void 0 : openConfig.slotApiCountry) ?? (slotApiConfig == null ? void 0 : slotApiConfig.country)
|
|
1525
|
+
});
|
|
1459
1526
|
try {
|
|
1460
1527
|
const l1 = limitDisplaySlots(
|
|
1461
1528
|
filterFutureSlots(await fetchSlotsFromApi(country, webinarType, timezone))
|
|
1462
1529
|
);
|
|
1530
|
+
logWebinarType("fetchWebinarSlots L1 result", {
|
|
1531
|
+
webinarType,
|
|
1532
|
+
country,
|
|
1533
|
+
count: l1.length
|
|
1534
|
+
});
|
|
1463
1535
|
if (l1.length > 0) {
|
|
1536
|
+
logWebinarType("fetchWebinarSlots using L1", {
|
|
1537
|
+
assignedWebinarType: webinarType,
|
|
1538
|
+
source: "api-l1",
|
|
1539
|
+
count: l1.length
|
|
1540
|
+
});
|
|
1464
1541
|
return {
|
|
1465
1542
|
slots: l1.map(apiSlotToWebinarSlot),
|
|
1466
1543
|
rawSlots: l1,
|
|
@@ -1471,7 +1548,18 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1471
1548
|
const l2 = limitDisplaySlots(
|
|
1472
1549
|
filterFutureSlots(await fetchSlotsFromApi(country, l2Type, timezone))
|
|
1473
1550
|
);
|
|
1551
|
+
logWebinarType("fetchWebinarSlots L2 result", {
|
|
1552
|
+
webinarType: l2Type,
|
|
1553
|
+
country,
|
|
1554
|
+
count: l2.length,
|
|
1555
|
+
reason: "L1 empty — falling back"
|
|
1556
|
+
});
|
|
1474
1557
|
if (l2.length > 0) {
|
|
1558
|
+
logWebinarType("fetchWebinarSlots using L2", {
|
|
1559
|
+
assignedWebinarType: "REGULAR",
|
|
1560
|
+
source: "api-l2",
|
|
1561
|
+
count: l2.length
|
|
1562
|
+
});
|
|
1475
1563
|
return {
|
|
1476
1564
|
slots: l2.map(apiSlotToWebinarSlot),
|
|
1477
1565
|
rawSlots: l2,
|
|
@@ -1479,12 +1567,22 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1479
1567
|
source: "api-l2"
|
|
1480
1568
|
};
|
|
1481
1569
|
}
|
|
1482
|
-
} catch {
|
|
1570
|
+
} catch (err) {
|
|
1571
|
+
logWebinarType("fetchWebinarSlots API error — static fallback", {
|
|
1572
|
+
webinarType,
|
|
1573
|
+
country,
|
|
1574
|
+
error: err instanceof Error ? err.message : String(err)
|
|
1575
|
+
});
|
|
1483
1576
|
}
|
|
1484
1577
|
const staticSlots = filterFutureSlots(getStaticSlots(openConfig));
|
|
1485
1578
|
const fallback = limitDisplaySlots(
|
|
1486
1579
|
staticSlots.length > 0 ? staticSlots : filterFutureSlots(createFutureStaticSlots())
|
|
1487
1580
|
);
|
|
1581
|
+
logWebinarType("fetchWebinarSlots using static", {
|
|
1582
|
+
assignedWebinarType: webinarType,
|
|
1583
|
+
source: "static",
|
|
1584
|
+
count: fallback.length
|
|
1585
|
+
});
|
|
1488
1586
|
return {
|
|
1489
1587
|
slots: fallback.map(apiSlotToWebinarSlot),
|
|
1490
1588
|
rawSlots: fallback,
|
|
@@ -1665,6 +1763,12 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
1665
1763
|
const webinarLeadType = String(
|
|
1666
1764
|
formData.webinarLeadType ?? formData.assignedWebinarType ?? webinarType
|
|
1667
1765
|
);
|
|
1766
|
+
logWebinarType("clickstream.leadPayload", {
|
|
1767
|
+
webinarType,
|
|
1768
|
+
webinarLeadType,
|
|
1769
|
+
assignedWebinarType: formData.assignedWebinarType,
|
|
1770
|
+
contextWebinarType: ctx == null ? void 0 : ctx.webinarType
|
|
1771
|
+
});
|
|
1668
1772
|
return {
|
|
1669
1773
|
Lead_Created_Time: leadCreatedTime,
|
|
1670
1774
|
Lead_Name: leadName,
|
|
@@ -2096,6 +2200,12 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2096
2200
|
});
|
|
2097
2201
|
}
|
|
2098
2202
|
async loadSlotsIntoFormData() {
|
|
2203
|
+
var _a;
|
|
2204
|
+
logWebinarType("FormEngine.loadSlotsIntoFormData", {
|
|
2205
|
+
webinarType: this.openConfig.webinarType,
|
|
2206
|
+
configWebinarType: this.config.webinarType,
|
|
2207
|
+
fallbackType: (_a = this.config.slotApi) == null ? void 0 : _a.fallbackType
|
|
2208
|
+
});
|
|
2099
2209
|
const result = await fetchWebinarSlots(
|
|
2100
2210
|
this.openConfig.webinarType,
|
|
2101
2211
|
this.openConfig,
|
|
@@ -2104,6 +2214,12 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2104
2214
|
this.applySlotFetchResult(result);
|
|
2105
2215
|
}
|
|
2106
2216
|
applySlotFetchResult(result) {
|
|
2217
|
+
logWebinarType("FormEngine.applySlotFetchResult", {
|
|
2218
|
+
assignedWebinarType: result.assignedWebinarType,
|
|
2219
|
+
source: result.source,
|
|
2220
|
+
slotCount: result.slots.length,
|
|
2221
|
+
openConfigWebinarType: this.openConfig.webinarType
|
|
2222
|
+
});
|
|
2107
2223
|
this.mergeFormData({
|
|
2108
2224
|
slots: result.slots,
|
|
2109
2225
|
assignedWebinarType: result.assignedWebinarType,
|
|
@@ -2140,12 +2256,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2140
2256
|
}
|
|
2141
2257
|
async runBeforeNext(step) {
|
|
2142
2258
|
if (step.beforeNext !== "fetch-slots") return;
|
|
2143
|
-
const {
|
|
2144
|
-
persistContactCookies({
|
|
2145
|
-
email: String(email ?? ""),
|
|
2146
|
-
phone: String(phone ?? ""),
|
|
2147
|
-
phoneCode: String(phoneCode ?? "+1")
|
|
2148
|
-
});
|
|
2259
|
+
const { phone } = this.state.formData;
|
|
2149
2260
|
const phoneNumberFull = String(this.state.formData.phoneNumberFull ?? phone ?? "");
|
|
2150
2261
|
this.mergeFormData({ phoneNumberFull });
|
|
2151
2262
|
await this.ensureSlotsReady(step);
|
|
@@ -2212,6 +2323,12 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2212
2323
|
);
|
|
2213
2324
|
const primaryGoal = String(this.state.formData.primaryGoal ?? "");
|
|
2214
2325
|
const newType = resolveWebinarTypeFromPrimaryGoal(primaryGoal, oldType);
|
|
2326
|
+
logWebinarType("FormEngine.qualifier remap", {
|
|
2327
|
+
oldType,
|
|
2328
|
+
primaryGoal,
|
|
2329
|
+
newType,
|
|
2330
|
+
openConfigWebinarType: this.openConfig.webinarType
|
|
2331
|
+
});
|
|
2215
2332
|
this.mergeFormData({
|
|
2216
2333
|
assignedWebinarType: newType,
|
|
2217
2334
|
qualifierOldWebinarType: oldType
|
|
@@ -2416,9 +2533,15 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2416
2533
|
return visible[0];
|
|
2417
2534
|
}
|
|
2418
2535
|
buildInitialFormData() {
|
|
2536
|
+
const originalLandingWebinarType = this.openConfig.webinarType ?? this.config.webinarType ?? "REGULAR";
|
|
2537
|
+
logWebinarType("FormEngine.buildInitialFormData", {
|
|
2538
|
+
originalLandingWebinarType,
|
|
2539
|
+
openConfigWebinarType: this.openConfig.webinarType,
|
|
2540
|
+
configWebinarType: this.config.webinarType
|
|
2541
|
+
});
|
|
2419
2542
|
const data = {
|
|
2420
2543
|
_variant: this.openConfig.variant ?? this.config.defaultVariant,
|
|
2421
|
-
originalLandingWebinarType
|
|
2544
|
+
originalLandingWebinarType
|
|
2422
2545
|
};
|
|
2423
2546
|
if (this.openConfig.prefilledValues) {
|
|
2424
2547
|
Object.assign(data, this.openConfig.prefilledValues);
|
|
@@ -2581,6 +2704,11 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2581
2704
|
const utm = context.utm;
|
|
2582
2705
|
const { firstName, lastName } = resolveName(formData);
|
|
2583
2706
|
const webinarType = resolveEffectiveWebinarType(formData, context.webinarType);
|
|
2707
|
+
logWebinarType("payloads.buildRegisterPayload", {
|
|
2708
|
+
webinarType,
|
|
2709
|
+
contextWebinarType: context.webinarType,
|
|
2710
|
+
assignedWebinarType: formData.assignedWebinarType
|
|
2711
|
+
});
|
|
2584
2712
|
return {
|
|
2585
2713
|
"First Name": firstName,
|
|
2586
2714
|
"Last Name": lastName,
|
|
@@ -2628,9 +2756,18 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
2628
2756
|
function resolveProfileApiFields(formData, context) {
|
|
2629
2757
|
const experience = str(formData.experience);
|
|
2630
2758
|
const isStudent = experience === "student" || experience.toLowerCase().includes("student") || bool(formData.isStudent);
|
|
2759
|
+
const webinarType = resolveEffectiveWebinarType(formData, context.webinarType);
|
|
2760
|
+
const oldWebinarType = resolveLandingWebinarType(formData, context.webinarType);
|
|
2761
|
+
logWebinarType("payloads.resolveProfileApiFields", {
|
|
2762
|
+
webinarType,
|
|
2763
|
+
oldWebinarType,
|
|
2764
|
+
contextWebinarType: context.webinarType,
|
|
2765
|
+
assignedWebinarType: formData.assignedWebinarType,
|
|
2766
|
+
primaryGoal: formData.primaryGoal
|
|
2767
|
+
});
|
|
2631
2768
|
return {
|
|
2632
|
-
"webinar-type":
|
|
2633
|
-
"old-webinar-type":
|
|
2769
|
+
"webinar-type": webinarType,
|
|
2770
|
+
"old-webinar-type": oldWebinarType,
|
|
2634
2771
|
primary_goal: resolvePrimaryGoalForApi(str(formData.primaryGoal)),
|
|
2635
2772
|
"Work Experience": normalizeExperienceForApi(experience),
|
|
2636
2773
|
"Role Domain": resolveDomainForApi(str(formData.domain)),
|
|
@@ -6921,6 +7058,12 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
6921
7058
|
getResolveContext(openConfig) {
|
|
6922
7059
|
const webinarType = openConfig.webinarType || "REGULAR";
|
|
6923
7060
|
const base = this.findBaseConfig(webinarType);
|
|
7061
|
+
logWebinarType("ConfigResolver.getResolveContext", {
|
|
7062
|
+
webinarType,
|
|
7063
|
+
openConfigWebinarType: openConfig.webinarType,
|
|
7064
|
+
resolvedBaseWebinarType: base == null ? void 0 : base.webinarType,
|
|
7065
|
+
registeredTypes: Object.keys(this.registry)
|
|
7066
|
+
});
|
|
6924
7067
|
if (!base) {
|
|
6925
7068
|
throw new Error(
|
|
6926
7069
|
`[ConfigResolver] No config found for webinarType "${webinarType}". Registered types: ${Object.keys(this.registry).join(", ")}`
|
|
@@ -6932,6 +7075,12 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
6932
7075
|
buildResolvedConfig(base, openConfig, requestedVariantId, effectiveVariantId, overrides) {
|
|
6933
7076
|
let resolved = this.deepClone(base);
|
|
6934
7077
|
resolved.webinarType = openConfig.webinarType || "REGULAR";
|
|
7078
|
+
logWebinarType("ConfigResolver.buildResolvedConfig", {
|
|
7079
|
+
resolvedWebinarType: resolved.webinarType,
|
|
7080
|
+
openConfigWebinarType: openConfig.webinarType,
|
|
7081
|
+
baseWebinarType: base.webinarType,
|
|
7082
|
+
effectiveVariantId
|
|
7083
|
+
});
|
|
6935
7084
|
const layeredOverrides = mergeOverrideSpecs(
|
|
6936
7085
|
overrides,
|
|
6937
7086
|
openConfig.configOverrides
|
|
@@ -7382,6 +7531,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
7382
7531
|
required,
|
|
7383
7532
|
leftIcon,
|
|
7384
7533
|
variant = "default",
|
|
7534
|
+
autocomplete,
|
|
7385
7535
|
id,
|
|
7386
7536
|
class: className,
|
|
7387
7537
|
"data-testid": dataTestId,
|
|
@@ -7450,6 +7600,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
7450
7600
|
...props,
|
|
7451
7601
|
id: inputId,
|
|
7452
7602
|
ref,
|
|
7603
|
+
autocomplete,
|
|
7453
7604
|
"data-testid": dataTestId,
|
|
7454
7605
|
class: [
|
|
7455
7606
|
"w-full transition-colors duration-150",
|
|
@@ -14855,6 +15006,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
14855
15006
|
onFocus,
|
|
14856
15007
|
placeholder,
|
|
14857
15008
|
name,
|
|
15009
|
+
autocomplete = "off",
|
|
14858
15010
|
variant = "default",
|
|
14859
15011
|
"data-testid": dataTestId
|
|
14860
15012
|
}, ref) => {
|
|
@@ -14904,6 +15056,7 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
14904
15056
|
const input = document.createElement("input");
|
|
14905
15057
|
input.type = "tel";
|
|
14906
15058
|
input.id = String(inputId);
|
|
15059
|
+
input.setAttribute("autocomplete", String(autocomplete));
|
|
14907
15060
|
if (placeholder) input.placeholder = String(placeholder);
|
|
14908
15061
|
if (name) input.name = String(name);
|
|
14909
15062
|
if (disabled) input.disabled = true;
|
|
@@ -18139,7 +18292,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
18139
18292
|
...withFieldInteract({ ...commonProps, ...rhfField }),
|
|
18140
18293
|
type: field.type,
|
|
18141
18294
|
value: String(rhfField.value ?? ""),
|
|
18142
|
-
variant: inputVariant
|
|
18295
|
+
variant: inputVariant,
|
|
18296
|
+
autocomplete: field.type === "email" ? "off" : void 0
|
|
18143
18297
|
}
|
|
18144
18298
|
);
|
|
18145
18299
|
case "tel":
|
|
@@ -18153,7 +18307,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
18153
18307
|
value: String(rhfField.value ?? ""),
|
|
18154
18308
|
variant: inputVariant,
|
|
18155
18309
|
initialCountryIso: phoneFieldProps == null ? void 0 : phoneFieldProps.initialCountryIso,
|
|
18156
|
-
onCountryChange: phoneFieldProps == null ? void 0 : phoneFieldProps.onCountryChange
|
|
18310
|
+
onCountryChange: phoneFieldProps == null ? void 0 : phoneFieldProps.onCountryChange,
|
|
18311
|
+
autocomplete: "off"
|
|
18157
18312
|
}
|
|
18158
18313
|
);
|
|
18159
18314
|
}
|
|
@@ -18163,7 +18318,8 @@ var IKEmbeddableFormBundle = function(exports) {
|
|
|
18163
18318
|
...withFieldInteract({ ...commonProps, ...rhfField }),
|
|
18164
18319
|
type: "tel",
|
|
18165
18320
|
value: String(rhfField.value ?? ""),
|
|
18166
|
-
variant: inputVariant
|
|
18321
|
+
variant: inputVariant,
|
|
18322
|
+
autocomplete: "off"
|
|
18167
18323
|
}
|
|
18168
18324
|
);
|
|
18169
18325
|
case "textarea":
|
|
@@ -20606,6 +20762,13 @@ ${intlTelStyles}`;
|
|
|
20606
20762
|
if (isOpen) {
|
|
20607
20763
|
unmount();
|
|
20608
20764
|
}
|
|
20765
|
+
logWebinarType("IKForm.open()", {
|
|
20766
|
+
webinarType: config.webinarType,
|
|
20767
|
+
eventName: config.eventName,
|
|
20768
|
+
variant: config.variant,
|
|
20769
|
+
site: config.site,
|
|
20770
|
+
slotApiCountry: config.slotApiCountry
|
|
20771
|
+
});
|
|
20609
20772
|
if (config.displayMode === "inline" && !config.container) {
|
|
20610
20773
|
console.error('IKForm.open: container is required when displayMode is "inline"');
|
|
20611
20774
|
(_a = config.onError) == null ? void 0 : _a.call(config, { code: "INVALID_CONFIG", message: "container is required for inline displayMode" });
|
|
@@ -20643,7 +20806,7 @@ ${intlTelStyles}`;
|
|
|
20643
20806
|
destroy();
|
|
20644
20807
|
},
|
|
20645
20808
|
getVersion() {
|
|
20646
|
-
return "1.0.
|
|
20809
|
+
return "1.0.23";
|
|
20647
20810
|
}
|
|
20648
20811
|
};
|
|
20649
20812
|
if (typeof window !== "undefined") {
|