@roomle/embedding-lib 7.3.0-alpha.4 → 8.0.0-alpha.2
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/comlink-B2Kj_5Ge.mjs +206 -0
- package/comlink-B5lV2OWp.mjs +226 -0
- package/docs/md/web/embedding/CHANGELOG.md +43 -34
- package/{drag-ghost-DqF-SGUQ.mjs → drag-ghost-BxqPJdhq.mjs} +1 -1
- package/{drag-ghost-Rbgko27K.mjs → drag-ghost-CDFtC1pd.mjs} +1 -1
- package/{drag-in-DDGopCLr.mjs → drag-in-CV1E-DO6.mjs} +15 -9
- package/{drag-in-BCnrHxxt.mjs → drag-in-ClPpCYyi.mjs} +20 -14
- package/embedding-plugins.js +1 -1
- package/embedding-plugins.min.js +1 -1
- package/{from-custom-view-BxJkoaTB.mjs → from-custom-view-Q9A-J7qV.mjs} +31 -31
- package/{from-custom-view-CbO74qvE.mjs → from-custom-view-Sx6P6iDI.mjs} +30 -30
- package/{from-website-W-UZ3lee.mjs → from-website-BmCO2xli.mjs} +23 -23
- package/{from-website-D07qrmeq.mjs → from-website-DZJy_l42.mjs} +23 -23
- package/hi.js +3 -3
- package/hi.min.js +3 -3
- package/package.json +1 -1
- package/packages/embedding-lib/src/roomle-embedding-lib.d.ts +0 -3
- package/roomle-embedding-lib.js +84 -94
- package/roomle-embedding-lib.min.js +76 -86
- package/comlink-BipJ8Ikr.mjs +0 -237
- package/comlink-Dds_bpug.mjs +0 -220
- package/rolldown-runtime-C-QNzSnW.mjs +0 -11
- package/rolldown-runtime-C017PlDO.mjs +0 -9
- /package/{browser-DRgK3Fk8.mjs → browser-BxG7yIaK.mjs} +0 -0
- /package/{browser-C_Dfiou7.mjs → browser-CW9o-dtT.mjs} +0 -0
- /package/{utils-i2eOrtnv.mjs → utils-DxJ3PcKe.mjs} +0 -0
- /package/{utils-Co3lE-Ji.mjs → utils-wJ80awOA.mjs} +0 -0
package/roomle-embedding-lib.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./browser-C_Dfiou7.mjs";
|
|
3
|
-
import { t as n } from "./utils-i2eOrtnv.mjs";
|
|
1
|
+
import { t as e } from "./browser-CW9o-dtT.mjs";
|
|
4
2
|
//#region packages/common/src/utils/message-handler.ts
|
|
5
|
-
var
|
|
3
|
+
var t = class {
|
|
6
4
|
_side;
|
|
7
5
|
_incomingMessageBus = null;
|
|
8
6
|
_outgoingMessageBus = null;
|
|
@@ -68,37 +66,37 @@ var r = class {
|
|
|
68
66
|
}
|
|
69
67
|
return e.message = this._side + ": " + e.message, console.error(e), e.message;
|
|
70
68
|
}
|
|
71
|
-
},
|
|
69
|
+
}, n = () => {
|
|
72
70
|
try {
|
|
73
71
|
return window.self !== window.top;
|
|
74
72
|
} catch {
|
|
75
73
|
return !0;
|
|
76
74
|
}
|
|
77
|
-
},
|
|
75
|
+
}, r = [
|
|
78
76
|
"127.0.0.1",
|
|
79
77
|
"localhost",
|
|
80
78
|
"0.0.0.0"
|
|
81
|
-
],
|
|
82
|
-
let e =
|
|
79
|
+
], i = () => {
|
|
80
|
+
let e = n(), t = window.location.href;
|
|
83
81
|
if (e) {
|
|
84
82
|
if (!document.referrer) return null;
|
|
85
83
|
t = document.referrer;
|
|
86
84
|
}
|
|
87
|
-
let { hostname:
|
|
88
|
-
return
|
|
89
|
-
},
|
|
85
|
+
let { hostname: r } = new URL(t);
|
|
86
|
+
return r;
|
|
87
|
+
}, a = (e) => {
|
|
90
88
|
let t = /* @__PURE__ */ new RegExp(/^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/);
|
|
91
|
-
return !!(
|
|
92
|
-
},
|
|
89
|
+
return !!(r.includes(e) || t.test(e) || e.endsWith("roomle.com") || e.endsWith("gitlab.io") || e.endsWith("gitlab.com"));
|
|
90
|
+
}, o = (e, t) => s(JSON.parse(JSON.stringify(e)), t), s = (e, t) => {
|
|
93
91
|
for (let n in t) try {
|
|
94
|
-
t[n].constructor === Object ? e[n] =
|
|
92
|
+
t[n].constructor === Object ? e[n] = s(e[n], t[n]) : e[n] = t[n];
|
|
95
93
|
} catch {
|
|
96
94
|
e[n] = t[n];
|
|
97
95
|
}
|
|
98
96
|
return e;
|
|
99
|
-
},
|
|
97
|
+
}, c = /* @__PURE__ */ function(e) {
|
|
100
98
|
return e.BOTTOM_BAR = "bottom_bar", e.PARTLIST_BOUNDS = "partlist_bounds", e.INTERACTION_NOTES = "interaction_notes", e.PARAMETER_GROUPS = "parameter_groups", e;
|
|
101
|
-
}({}),
|
|
99
|
+
}({}), l = (e) => JSON.parse(JSON.stringify(e)), u = {
|
|
102
100
|
mobileLandscape: !0,
|
|
103
101
|
floorMaterialRootTag: "materials_root",
|
|
104
102
|
buttons: {
|
|
@@ -108,7 +106,7 @@ var r = class {
|
|
|
108
106
|
load_product: !0,
|
|
109
107
|
partlist_print: !0
|
|
110
108
|
},
|
|
111
|
-
elements: { [
|
|
109
|
+
elements: { [c.INTERACTION_NOTES]: !0 },
|
|
112
110
|
helpcenter: {
|
|
113
111
|
roomdesigner: !0,
|
|
114
112
|
configurator: !1,
|
|
@@ -125,34 +123,35 @@ var r = class {
|
|
|
125
123
|
openCloseAnimation: !0,
|
|
126
124
|
localExport3d: !1
|
|
127
125
|
},
|
|
126
|
+
configuratorZoom: !1,
|
|
128
127
|
rotationSnapDegrees: 10,
|
|
129
128
|
interactionsCollapsed: !1
|
|
130
|
-
},
|
|
129
|
+
}, d = (e) => (p(e), e?.customApiUrl && (e.customApiUrl = decodeURIComponent(e.customApiUrl)), e.shareUrl && (e.deeplink = e.shareUrl.replace(h, g)), e), f = (e) => e.trim() !== "" && Number.isFinite(Number(e.trim())), p = (e) => {
|
|
131
130
|
if (!e || typeof e != "object") return;
|
|
132
131
|
let t = Object.keys(e);
|
|
133
132
|
for (let n of t) {
|
|
134
133
|
let t = e[n];
|
|
135
|
-
if (!Array.isArray(t) && typeof t == "object" && t &&
|
|
136
|
-
t === "true" || t === "false" ? e[n] = t === "true" : typeof t == "string" &&
|
|
134
|
+
if (!Array.isArray(t) && typeof t == "object" && t && p(t), Array.isArray(t)) for (let e of t) p(e);
|
|
135
|
+
t === "true" || t === "false" ? e[n] = t === "true" : typeof t == "string" && f(t) && (e[n] = Number(t));
|
|
137
136
|
}
|
|
138
|
-
},
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
let n =
|
|
142
|
-
return n &&
|
|
143
|
-
},
|
|
137
|
+
}, m = () => {
|
|
138
|
+
let t = l(u);
|
|
139
|
+
t.locale ||= e(null, !0), t.id === "(idle)" && delete t.id;
|
|
140
|
+
let n = i();
|
|
141
|
+
return n && a(n) && (t.configuratorId = "demoConfigurator"), t.customApiUrl = "https://rubens.alpha.roomle.com/api/v2", t.emails = !1, t;
|
|
142
|
+
}, h = "<CONF_ID>", g = "#CONFIGURATIONID#", _ = (e) => {
|
|
144
143
|
let t = e.featureFlags;
|
|
145
144
|
if (!t || typeof t != "object" || Array.isArray(t)) return;
|
|
146
145
|
let n = t;
|
|
147
146
|
"enableTwoLevelCatalog" in n && typeof n.enableTwoLevelCatalog == "boolean" && (e.enableTwoLevelCatalog === !1 || e.enableTwoLevelCatalog === void 0) && (e.enableTwoLevelCatalog = n.enableTwoLevelCatalog), "webGpu" in n && typeof n.webGpu == "boolean" && (e.webGpu === !1 || e.webGpu === void 0) && (e.webGpu = n.webGpu);
|
|
148
|
-
},
|
|
147
|
+
}, v = (e) => {
|
|
149
148
|
e.featureFlags ||= {}, typeof e.featureFlags.realPartList != "boolean" && (e.featureFlags.realPartList = !0), typeof e.featureFlags.globalCallbacks != "boolean" && (e.featureFlags.globalCallbacks = !0), typeof e.featureFlags.mocAr != "boolean" && (e.featureFlags.mocAr = !1);
|
|
150
|
-
},
|
|
151
|
-
let n =
|
|
152
|
-
|
|
153
|
-
let i =
|
|
154
|
-
return i.configuratorId = e.id, !i.overrideTenant && e.tenant && (i.overrideTenant = e.tenant),
|
|
155
|
-
},
|
|
149
|
+
}, y = (e, t) => {
|
|
150
|
+
let n = l(t), r = m();
|
|
151
|
+
v(r);
|
|
152
|
+
let i = o(o(r, e.settings || {}), n);
|
|
153
|
+
return i.configuratorId = e.id, !i.overrideTenant && e.tenant && (i.overrideTenant = e.tenant), _(i), i;
|
|
154
|
+
}, b = () => /(android)/i.test(navigator.userAgent), x = class {
|
|
156
155
|
_messageHandler = null;
|
|
157
156
|
isSetupDone = !1;
|
|
158
157
|
viewName = "main";
|
|
@@ -194,7 +193,7 @@ var r = class {
|
|
|
194
193
|
setupPlugins(e, t, n = "website") {
|
|
195
194
|
for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
|
|
196
195
|
try {
|
|
197
|
-
import("./drag-in-
|
|
196
|
+
import("./drag-in-ClPpCYyi.mjs").then((e) => e.n).then(({ DragIn: i }) => {
|
|
198
197
|
let a = new i(this.ui, t, n, this.viewName);
|
|
199
198
|
a.init().then(() => {
|
|
200
199
|
this.plugins.dragIn = a, e();
|
|
@@ -216,7 +215,7 @@ var r = class {
|
|
|
216
215
|
}
|
|
217
216
|
}));
|
|
218
217
|
}
|
|
219
|
-
},
|
|
218
|
+
}, S = () => {
|
|
220
219
|
let e, t;
|
|
221
220
|
return {
|
|
222
221
|
promise: new Promise((n, r) => {
|
|
@@ -225,7 +224,7 @@ var r = class {
|
|
|
225
224
|
resolve: e,
|
|
226
225
|
reject: t
|
|
227
226
|
};
|
|
228
|
-
},
|
|
227
|
+
}, C = {
|
|
229
228
|
SDK: "extended",
|
|
230
229
|
CONFIGURATOR_SDK: "configurator",
|
|
231
230
|
CALLBACKS: "callbacks",
|
|
@@ -233,20 +232,20 @@ var r = class {
|
|
|
233
232
|
ANALYTICS: "analytics",
|
|
234
233
|
GLOBAL: "global",
|
|
235
234
|
RAPI: "rapi"
|
|
236
|
-
},
|
|
235
|
+
}, w = ".", T = C.SDK + "." + C.CALLBACKS, E = {
|
|
237
236
|
REQUEST_BOOT: "requestBoot",
|
|
238
237
|
SETUP: "setup",
|
|
239
238
|
WEBSITE_READY: "websiteReady"
|
|
240
|
-
},
|
|
239
|
+
}, D = {
|
|
241
240
|
GET_METHODS: "getMethods",
|
|
242
241
|
RETURN_METHODS: "returnMethods",
|
|
243
242
|
REGISTER_CUSTOM_VIEW: "registerCustomView",
|
|
244
243
|
REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
|
|
245
|
-
},
|
|
244
|
+
}, O = ["constructor", "callbacks"], k = (e) => e[0] !== "_" && !O.includes(e), A = (e, t, n = !1) => {
|
|
246
245
|
if (!e) return [];
|
|
247
|
-
let r = Object.getOwnPropertyNames(e), i = n ?
|
|
248
|
-
return r.filter(
|
|
249
|
-
},
|
|
246
|
+
let r = Object.getOwnPropertyNames(e), i = n ? C.CALLBACKS + "." : "";
|
|
247
|
+
return r.filter(k).map((e) => t + "." + i + e);
|
|
248
|
+
}, j = async (e, t) => {
|
|
250
249
|
if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
|
|
251
250
|
let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = n + "/configurators/" + e, a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
|
|
252
251
|
method: "GET",
|
|
@@ -263,7 +262,7 @@ var r = class {
|
|
|
263
262
|
cache: "default"
|
|
264
263
|
}), { configurator: s } = await (await fetch(o)).json();
|
|
265
264
|
return s;
|
|
266
|
-
},
|
|
265
|
+
}, M = "data-rml-interaction-container", N = (e, t, n) => {
|
|
267
266
|
let r = null;
|
|
268
267
|
Object.defineProperty(e, t, {
|
|
269
268
|
get() {
|
|
@@ -273,39 +272,39 @@ var r = class {
|
|
|
273
272
|
e?.mute ? r = e.value : (console.warn("You override Roomle defined behaviour. To disalbe this warning pass in an object with the following properties"), console.warn("{ mute: true, value: () => void }"), r = e);
|
|
274
273
|
}
|
|
275
274
|
});
|
|
276
|
-
},
|
|
277
|
-
e && setTimeout(() => e.style.setProperty(
|
|
278
|
-
},
|
|
275
|
+
}, P = () => window.innerHeight * .01 + "px", F = (e) => {
|
|
276
|
+
e && setTimeout(() => e.style.setProperty(R, P()), 0);
|
|
277
|
+
}, I = "rml-styles", L = 450, R = "--rml-full-height", z = {
|
|
279
278
|
CONTAINER: "rml-container",
|
|
280
279
|
FILL: "rml-fill",
|
|
281
280
|
POSITION: "rml-pos",
|
|
282
281
|
TRANSITION: "rml-transition",
|
|
283
282
|
ANDROID_HEIGHT: "rml-android-height",
|
|
284
283
|
OVERFLOW_HIDDEN: "rml-overflow-hidden"
|
|
285
|
-
},
|
|
284
|
+
}, B = /* @__PURE__ */ new Map(), V = class extends x {
|
|
286
285
|
static createPlanner(e, t, n, r = []) {
|
|
287
286
|
return this._create(e, t, n, r);
|
|
288
287
|
}
|
|
289
|
-
static async connect(e,
|
|
290
|
-
let
|
|
291
|
-
|
|
292
|
-
let { resolve: i, promise: a } =
|
|
288
|
+
static async connect(e, n = []) {
|
|
289
|
+
let r = new x();
|
|
290
|
+
r.viewName = e;
|
|
291
|
+
let { resolve: i, promise: a } = S(), { resolve: o, promise: s } = S(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
|
|
293
292
|
switch (e) {
|
|
294
|
-
case
|
|
293
|
+
case D.REGISTER_CUSTOM_VIEW_DONE:
|
|
295
294
|
i();
|
|
296
295
|
break;
|
|
297
|
-
case
|
|
298
|
-
|
|
296
|
+
case D.RETURN_METHODS:
|
|
297
|
+
r.handleSetup(t[0]), o();
|
|
299
298
|
break;
|
|
300
|
-
default: if (
|
|
299
|
+
default: if (r.isSetupDone) return r.executeMessage({
|
|
301
300
|
message: e,
|
|
302
301
|
args: t
|
|
303
302
|
});
|
|
304
303
|
}
|
|
305
304
|
});
|
|
306
|
-
|
|
305
|
+
r.setMessageHandler(c);
|
|
307
306
|
let l = [e];
|
|
308
|
-
return c.sendMessage(
|
|
307
|
+
return c.sendMessage(D.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(D.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
|
|
309
308
|
}
|
|
310
309
|
static createConfigurator(e, t, n, r = []) {
|
|
311
310
|
return this._create(e, t, n, r);
|
|
@@ -316,23 +315,14 @@ var r = class {
|
|
|
316
315
|
static createViewer(e, t, n, r = []) {
|
|
317
316
|
return this._create(e, t, n, r);
|
|
318
317
|
}
|
|
319
|
-
static hiMessageHandler = null;
|
|
320
|
-
static setupHi(t) {
|
|
321
|
-
console.warn("[DEPRECATED] RoomleEmbeddingApi.setupHi() is deprecated and will be removed.\nMigration: import { setupHi } from '@roomle/embedding-lib/hi'; setupHi(libraryIdOrOptions, callbacks);"), this.hiMessageHandler && window.removeEventListener("message", this.hiMessageHandler), this.hiMessageHandler = (r) => {
|
|
322
|
-
if (r.data.type === "connect_hi" && r.data.port) {
|
|
323
|
-
let i = r.data.port;
|
|
324
|
-
i.start?.(), e(n(t), i);
|
|
325
|
-
}
|
|
326
|
-
}, window.addEventListener("message", this.hiMessageHandler);
|
|
327
|
-
}
|
|
328
318
|
static async _create(e, t, n, r) {
|
|
329
319
|
return new Promise(async (i, a) => {
|
|
330
320
|
try {
|
|
331
|
-
let a =
|
|
332
|
-
|
|
333
|
-
let
|
|
334
|
-
n =
|
|
335
|
-
let l = new this(
|
|
321
|
+
let a = d(n), s = m();
|
|
322
|
+
v(s);
|
|
323
|
+
let c = await j(e, o(s, a));
|
|
324
|
+
n = y(c, a);
|
|
325
|
+
let l = new this(c, t, n, r, i);
|
|
336
326
|
return await Promise.allSettled(l.pluginsLoaded), l;
|
|
337
327
|
} catch (e) {
|
|
338
328
|
return a(e);
|
|
@@ -344,53 +334,53 @@ var r = class {
|
|
|
344
334
|
_configuratorSettings;
|
|
345
335
|
_initData = {};
|
|
346
336
|
_iframe;
|
|
347
|
-
constructor(e,
|
|
337
|
+
constructor(e, n, r, i, a) {
|
|
348
338
|
if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
|
|
349
|
-
if (
|
|
350
|
-
if (!document.getElementById(
|
|
351
|
-
let e =
|
|
352
|
-
t.type = "text/css", t.id =
|
|
353
|
-
let
|
|
339
|
+
if (B.has(n)) throw Error("There is already an instance on this DOM element");
|
|
340
|
+
if (!document.getElementById(I)) {
|
|
341
|
+
let e = r.zIndex || 9999999, t = document.createElement("style");
|
|
342
|
+
t.type = "text/css", t.id = I;
|
|
343
|
+
let n = "transition:all ease-in-out " + L + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = P();
|
|
354
344
|
t.innerHTML = `
|
|
355
|
-
.${
|
|
356
|
-
.${
|
|
357
|
-
.${
|
|
358
|
-
.${
|
|
359
|
-
.${
|
|
360
|
-
.${
|
|
345
|
+
.${z.CONTAINER}{${R}:${a};}
|
|
346
|
+
.${z.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
|
|
347
|
+
.${z.TRANSITION}{${i}}
|
|
348
|
+
.${z.FILL}{width:100%;height:100%;opacity:1}
|
|
349
|
+
.${z.ANDROID_HEIGHT}{height:calc(var(${R},1vh)*100)}
|
|
350
|
+
.${z.OVERFLOW_HIDDEN}{overflow:hidden}
|
|
361
351
|
`, document.head.appendChild(t);
|
|
362
352
|
}
|
|
363
353
|
this._executeMessage = this._executeMessage.bind(this);
|
|
364
|
-
let o = new
|
|
365
|
-
this.setMessageHandler(o), this._onResize = this._onResize.bind(this),
|
|
354
|
+
let o = new t("website", window, null, this._executeMessage);
|
|
355
|
+
this.setMessageHandler(o), this._onResize = this._onResize.bind(this), b() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
|
|
366
356
|
let s = this._createIframe();
|
|
367
|
-
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe),
|
|
357
|
+
this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), B.set(n, !0);
|
|
368
358
|
}
|
|
369
359
|
teardown() {
|
|
370
|
-
this._container &&
|
|
360
|
+
this._container && B.delete(this._container);
|
|
371
361
|
let e = this._container.querySelector("iframe");
|
|
372
362
|
e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
|
|
373
363
|
}
|
|
374
364
|
_createIframe() {
|
|
375
365
|
let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
|
|
376
|
-
return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.classList.add(
|
|
366
|
+
return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.classList.add(z.CONTAINER), e.classList.add(z.FILL), e;
|
|
377
367
|
}
|
|
378
368
|
_onResize() {
|
|
379
|
-
|
|
369
|
+
F(this._iframe);
|
|
380
370
|
}
|
|
381
371
|
_onUseFullPage() {
|
|
382
|
-
this._iframe.classList.add(
|
|
372
|
+
this._iframe.classList.add(z.POSITION), document.documentElement.classList.add(z.OVERFLOW_HIDDEN), window.document.body.classList.add(z.OVERFLOW_HIDDEN), b() && (F(this._iframe), this._iframe.classList.add(z.ANDROID_HEIGHT));
|
|
383
373
|
}
|
|
384
374
|
_onBackToWebsite() {
|
|
385
|
-
this._iframe.classList.remove(
|
|
375
|
+
this._iframe.classList.remove(z.POSITION), this._iframe.classList.remove(z.ANDROID_HEIGHT), document.documentElement.classList.remove(z.OVERFLOW_HIDDEN), window.document.body.classList.remove(z.OVERFLOW_HIDDEN);
|
|
386
376
|
}
|
|
387
377
|
_executeMessage({ message: e, args: t }, n) {
|
|
388
|
-
if (n.source && n.source === this._iframe?.contentWindow) return e ===
|
|
378
|
+
if (n.source && n.source === this._iframe?.contentWindow) return e === E.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : (console.error("MessageHandler not set"), Promise.resolve({ error: "MessageHandler not set" })) : e === E.SETUP ? (this.handleSetup(t[0]), N(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), N(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
|
|
389
379
|
if (!this._messageHandler) {
|
|
390
380
|
console.error("MessageHandler not set");
|
|
391
381
|
return;
|
|
392
382
|
}
|
|
393
|
-
this._messageHandler.sendMessage(
|
|
383
|
+
this._messageHandler.sendMessage(E.WEBSITE_READY);
|
|
394
384
|
}, 0), Promise.resolve({ result: null })) : this.executeMessage({
|
|
395
385
|
message: e,
|
|
396
386
|
args: t
|
|
@@ -398,4 +388,4 @@ var r = class {
|
|
|
398
388
|
}
|
|
399
389
|
};
|
|
400
390
|
//#endregion
|
|
401
|
-
export {
|
|
391
|
+
export { E as HANDSHAKE_MESSAGES, M as INTERACTION_CONTAINER_SELECTOR, C as NAMESPACE, w as NAMESPACE_SEPARATOR, T as SDK_CALLBACK, D as WELL_KNOWN_MESSAGES, V as default, j as getConfiguratorSettings, A as getMethodNames, k as isExposable };
|