@roomle/embedding-lib 8.2.0-alpha.7 → 8.2.0-alpha.8

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.
@@ -1,27 +1,7 @@
1
- ## 8.2.0-alpha.7 (2026-10-16)
1
+ ## 8.2.0-alpha.8 (2026-10-20)
2
2
 
3
- * Merge branch 'master' into fix/hi-mcp-api-and-tools ([df80bd5](https://github.com/roomle-dev/roomle-ui/commit/df80bd5))
4
- * Merge branch 'master' into fix/hi-mcp-api-and-tools ([ae2cdff](https://github.com/roomle-dev/roomle-ui/commit/ae2cdff))
5
- * Merge pull request #3101 from roomle-dev/fix/hi-mcp-api-and-tools ([4963a40](https://github.com/roomle-dev/roomle-ui/commit/4963a40)), closes [#3101](https://github.com/roomle-dev/roomle-ui/issues/3101)
6
- * Merge pull request #3112 from roomle-dev/feat/delete-external-object-sub-article-RML-18144 ([93ef7b6](https://github.com/roomle-dev/roomle-ui/commit/93ef7b6)), closes [#3112](https://github.com/roomle-dev/roomle-ui/issues/3112)
7
- * Merge pull request #3116 from roomle-dev/chore/hi-tools-split-RML-18145 ([d861c79](https://github.com/roomle-dev/roomle-ui/commit/d861c79)), closes [#3116](https://github.com/roomle-dev/roomle-ui/issues/3116)
8
- * Merge pull request #3120 from roomle-dev/upgraded-by-ci/core-3.1.0-alpha.8 ([d26f38b](https://github.com/roomle-dev/roomle-ui/commit/d26f38b)), closes [#3120](https://github.com/roomle-dev/roomle-ui/issues/3120)
9
- * feat(sdk): add deleteExternalObjectSubArticle planner api ([3d4f7dc](https://github.com/roomle-dev/roomle-ui/commit/3d4f7dc))
10
- * feat: add the hi group operation change-attributes ([3a1ea13](https://github.com/roomle-dev/roomle-ui/commit/3a1ea13))
11
- * feat(core): upgrade to version 3.1.0-alpha.8 ([6a11237](https://github.com/roomle-dev/roomle-ui/commit/6a11237))
12
- * refactor: assemble the hi plan context in hi-plan-context ([9bde9aa](https://github.com/roomle-dev/roomle-ui/commit/9bde9aa))
13
- * refactor: drop the underscore of the glue logic members hi tools uses ([381f4b9](https://github.com/roomle-dev/roomle-ui/commit/381f4b9))
14
- * refactor: move the docking helpers shared by glue logic and hi tools ([d495fab](https://github.com/roomle-dev/roomle-ui/commit/d495fab))
15
- * refactor: move the hi mcp api implementation into hi-tools ([ff26809](https://github.com/roomle-dev/roomle-ui/commit/ff26809))
16
- * refactor: split the pos group helpers by domain ([492c528](https://github.com/roomle-dev/roomle-ui/commit/492c528))
17
- * fix: await attribute planning updates before returning groups ([dc96fa1](https://github.com/roomle-dev/roomle-ui/commit/dc96fa1))
18
- * fix: identify articles in row removal corrections ([b09c1ca](https://github.com/roomle-dev/roomle-ui/commit/b09c1ca))
19
- * fix: keep the offset in the mirrored hi docking entry ([83d5ab1](https://github.com/roomle-dev/roomle-ui/commit/83d5ab1))
20
- * fix: name the hi group settings and give a new root module its neighbour's attributes ([e55be7a](https://github.com/roomle-dev/roomle-ui/commit/e55be7a))
21
- * fix: name the unit above that a kept unit overlaps after a remove ([c8fb936](https://github.com/roomle-dev/roomle-ui/commit/c8fb936))
22
- * fix: preserve compound room contour subpaths in hi walls ([f1dc5fd](https://github.com/roomle-dev/roomle-ui/commit/f1dc5fd))
23
- * fix: set an hi root module attribute on its sub modules that carry it ([328dea0](https://github.com/roomle-dev/roomle-ui/commit/328dea0))
24
- * fix: set changed attributes on the root modules the library can calculate ([fda0053](https://github.com/roomle-dev/roomle-ui/commit/fda0053))
25
- * fix: set no attribute when a failed root module fails again without the values ([dbb1534](https://github.com/roomle-dev/roomle-ui/commit/dbb1534))
26
- * fix: set no attribute when a failed root module fails again without the values ([1359dcf](https://github.com/roomle-dev/roomle-ui/commit/1359dcf))
27
- * test: shorten glue-logic-test without losing a test or an assertion ([0fbb334](https://github.com/roomle-dev/roomle-ui/commit/0fbb334))
3
+ * Merge pull request #3131 from roomle-dev/chore/rapi-v2-fallback ([a2d87cc](https://github.com/roomle-dev/roomle-ui/commit/a2d87cc)), closes [#3131](https://github.com/roomle-dev/roomle-ui/issues/3131)
4
+ * Merge pull request #3135 from roomle-dev/hotfix/rapi-v2-fallback-release ([620b91f](https://github.com/roomle-dev/roomle-ui/commit/620b91f)), closes [#3135](https://github.com/roomle-dev/roomle-ui/issues/3135)
5
+ * fix(rapi): release temporary RAPI v2 fallback ([c37a192](https://github.com/roomle-dev/roomle-ui/commit/c37a192)), closes [#3131](https://github.com/roomle-dev/roomle-ui/issues/3131)
6
+ * test(e2e): restore v2 RAPI mocks for v3 paths ([8bd1087](https://github.com/roomle-dev/roomle-ui/commit/8bd1087))
7
+ * chore: temporarily route all RAPI requests to v2 via RAPI_V3_ENABLED flag ([3b891a2](https://github.com/roomle-dev/roomle-ui/commit/3b891a2))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "8.2.0-alpha.7",
3
+ "version": "8.2.0-alpha.8",
4
4
  "description": "This is a small library which can be used to communicate with the Roomle Configurator. ES modules only (browser-compatible).",
5
5
  "type": "module",
6
6
  "main": "./roomle-embedding-lib.js",
@@ -225,14 +225,11 @@ var t = class {
225
225
  resolve: e,
226
226
  reject: t
227
227
  };
228
- }, C = (/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$")), w = /\/v[23]\/?$/, T = (e) => {
229
- let t = e.split("?")[0];
230
- return C.some((e) => e.test(t));
231
- }, E = (e, t) => {
232
- if (!w.test(e)) return e + t;
233
- let n = T(t) ? "v3" : "v2";
234
- return e.replace(w, "/" + n) + t;
235
- }, D = {
228
+ };
229
+ //#endregion
230
+ //#region packages/common/src/utils/rapi-version.ts
231
+ (/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$"));
232
+ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t, T = {
236
233
  SDK: "extended",
237
234
  CONFIGURATOR_SDK: "configurator",
238
235
  CALLBACKS: "callbacks",
@@ -240,22 +237,22 @@ var t = class {
240
237
  ANALYTICS: "analytics",
241
238
  GLOBAL: "global",
242
239
  RAPI: "rapi"
243
- }, O = ".", k = D.SDK + "." + D.CALLBACKS, A = {
240
+ }, E = ".", D = T.SDK + "." + T.CALLBACKS, O = {
244
241
  REQUEST_BOOT: "requestBoot",
245
242
  SETUP: "setup",
246
243
  WEBSITE_READY: "websiteReady"
247
- }, j = {
244
+ }, k = {
248
245
  GET_METHODS: "getMethods",
249
246
  RETURN_METHODS: "returnMethods",
250
247
  REGISTER_CUSTOM_VIEW: "registerCustomView",
251
248
  REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
252
- }, M = ["constructor", "callbacks"], N = (e) => e[0] !== "_" && !M.includes(e), P = (e, t, n = !1) => {
249
+ }, A = ["constructor", "callbacks"], j = (e) => e[0] !== "_" && !A.includes(e), M = (e, t, n = !1) => {
253
250
  if (!e) return [];
254
- let r = Object.getOwnPropertyNames(e), i = n ? D.CALLBACKS + "." : "";
255
- return r.filter(N).map((e) => t + "." + i + e);
256
- }, F = async (e, t) => {
251
+ let r = Object.getOwnPropertyNames(e), i = n ? T.CALLBACKS + "." : "";
252
+ return r.filter(j).map((e) => t + "." + i + e);
253
+ }, N = async (e, t) => {
257
254
  if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
258
- let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = E(n, "/configurators/" + e), a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
255
+ let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = w(n, "/configurators/" + e), a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
259
256
  method: "GET",
260
257
  headers: new Headers({
261
258
  apiKey: "roomle_portal_v2",
@@ -270,7 +267,7 @@ var t = class {
270
267
  cache: "default"
271
268
  }), { configurator: s } = await (await fetch(o)).json();
272
269
  return s;
273
- }, I = "data-rml-interaction-container", L = (e, t, n) => {
270
+ }, P = "data-rml-interaction-container", F = (e, t, n) => {
274
271
  let r = null;
275
272
  Object.defineProperty(e, t, {
276
273
  get() {
@@ -280,16 +277,16 @@ var t = class {
280
277
  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);
281
278
  }
282
279
  });
283
- }, R = () => window.innerHeight * .01 + "px", z = (e) => {
284
- e && setTimeout(() => e.style.setProperty(H, R()), 0);
285
- }, B = "rml-styles", V = 450, H = "--rml-full-height", U = {
280
+ }, I = () => window.innerHeight * .01 + "px", L = (e) => {
281
+ e && setTimeout(() => e.style.setProperty(B, I()), 0);
282
+ }, R = "rml-styles", z = 450, B = "--rml-full-height", V = {
286
283
  CONTAINER: "rml-container",
287
284
  FILL: "rml-fill",
288
285
  POSITION: "rml-pos",
289
286
  TRANSITION: "rml-transition",
290
287
  ANDROID_HEIGHT: "rml-android-height",
291
288
  OVERFLOW_HIDDEN: "rml-overflow-hidden"
292
- }, W = /* @__PURE__ */ new Map(), G = class extends x {
289
+ }, H = /* @__PURE__ */ new Map(), U = class extends x {
293
290
  static createPlanner(e, t, n, r = []) {
294
291
  return this._create(e, t, n, r);
295
292
  }
@@ -298,10 +295,10 @@ var t = class {
298
295
  r.viewName = e;
299
296
  let { resolve: i, promise: a } = S(), { resolve: o, promise: s } = S(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
300
297
  switch (e) {
301
- case j.REGISTER_CUSTOM_VIEW_DONE:
298
+ case k.REGISTER_CUSTOM_VIEW_DONE:
302
299
  i();
303
300
  break;
304
- case j.RETURN_METHODS:
301
+ case k.RETURN_METHODS:
305
302
  r.handleSetup(t[0]), o();
306
303
  break;
307
304
  default: if (r.isSetupDone) return r.executeMessage({
@@ -312,7 +309,7 @@ var t = class {
312
309
  });
313
310
  r.setMessageHandler(c);
314
311
  let l = [e];
315
- return c.sendMessage(j.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(j.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
312
+ return c.sendMessage(k.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(k.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
316
313
  }
317
314
  static createConfigurator(e, t, n, r = []) {
318
315
  return this._create(e, t, n, r);
@@ -328,7 +325,7 @@ var t = class {
328
325
  try {
329
326
  let a = d(n), s = m();
330
327
  v(s);
331
- let c = await F(e, o(s, a));
328
+ let c = await N(e, o(s, a));
332
329
  n = y(c, a);
333
330
  let l = new this(c, t, n, r, i);
334
331
  return await Promise.allSettled(l.pluginsLoaded), l;
@@ -344,51 +341,51 @@ var t = class {
344
341
  _iframe;
345
342
  constructor(e, n, r, i, a) {
346
343
  if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
347
- if (W.has(n)) throw Error("There is already an instance on this DOM element");
348
- if (!document.getElementById(B)) {
344
+ if (H.has(n)) throw Error("There is already an instance on this DOM element");
345
+ if (!document.getElementById(R)) {
349
346
  let e = r.zIndex || 9999999, t = document.createElement("style");
350
- t.type = "text/css", t.id = B;
351
- let n = "transition:all ease-in-out " + V + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = R();
347
+ t.type = "text/css", t.id = R;
348
+ let n = "transition:all ease-in-out " + z + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = I();
352
349
  t.innerHTML = `
353
- .${U.CONTAINER}{${H}:${a};}
354
- .${U.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
355
- .${U.TRANSITION}{${i}}
356
- .${U.FILL}{width:100%;height:100%;opacity:1}
357
- .${U.ANDROID_HEIGHT}{height:calc(var(${H},1vh)*100)}
358
- .${U.OVERFLOW_HIDDEN}{overflow:hidden}
350
+ .${V.CONTAINER}{${B}:${a};}
351
+ .${V.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
352
+ .${V.TRANSITION}{${i}}
353
+ .${V.FILL}{width:100%;height:100%;opacity:1}
354
+ .${V.ANDROID_HEIGHT}{height:calc(var(${B},1vh)*100)}
355
+ .${V.OVERFLOW_HIDDEN}{overflow:hidden}
359
356
  `, document.head.appendChild(t);
360
357
  }
361
358
  this._executeMessage = this._executeMessage.bind(this);
362
359
  let o = new t("website", window, null, this._executeMessage);
363
360
  this.setMessageHandler(o), this._onResize = this._onResize.bind(this), b() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
364
361
  let s = this._createIframe();
365
- 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), W.set(n, !0);
362
+ 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), H.set(n, !0);
366
363
  }
367
364
  teardown() {
368
- this._container && W.delete(this._container);
365
+ this._container && H.delete(this._container);
369
366
  let e = this._container.querySelector("iframe");
370
367
  e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
371
368
  }
372
369
  _createIframe() {
373
370
  let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
374
- 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(U.CONTAINER), e.classList.add(U.FILL), e;
371
+ 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(V.CONTAINER), e.classList.add(V.FILL), e;
375
372
  }
376
373
  _onResize() {
377
- z(this._iframe);
374
+ L(this._iframe);
378
375
  }
379
376
  _onUseFullPage() {
380
- this._iframe.classList.add(U.POSITION), document.documentElement.classList.add(U.OVERFLOW_HIDDEN), window.document.body.classList.add(U.OVERFLOW_HIDDEN), b() && (z(this._iframe), this._iframe.classList.add(U.ANDROID_HEIGHT));
377
+ this._iframe.classList.add(V.POSITION), document.documentElement.classList.add(V.OVERFLOW_HIDDEN), window.document.body.classList.add(V.OVERFLOW_HIDDEN), b() && (L(this._iframe), this._iframe.classList.add(V.ANDROID_HEIGHT));
381
378
  }
382
379
  _onBackToWebsite() {
383
- this._iframe.classList.remove(U.POSITION), this._iframe.classList.remove(U.ANDROID_HEIGHT), document.documentElement.classList.remove(U.OVERFLOW_HIDDEN), window.document.body.classList.remove(U.OVERFLOW_HIDDEN);
380
+ this._iframe.classList.remove(V.POSITION), this._iframe.classList.remove(V.ANDROID_HEIGHT), document.documentElement.classList.remove(V.OVERFLOW_HIDDEN), window.document.body.classList.remove(V.OVERFLOW_HIDDEN);
384
381
  }
385
382
  _executeMessage({ message: e, args: t }, n) {
386
- if (n.source && n.source === this._iframe?.contentWindow) return e === A.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 === A.SETUP ? (this.handleSetup(t[0]), L(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), L(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
383
+ if (n.source && n.source === this._iframe?.contentWindow) return e === O.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 === O.SETUP ? (this.handleSetup(t[0]), F(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), F(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
387
384
  if (!this._messageHandler) {
388
385
  console.error("MessageHandler not set");
389
386
  return;
390
387
  }
391
- this._messageHandler.sendMessage(A.WEBSITE_READY);
388
+ this._messageHandler.sendMessage(O.WEBSITE_READY);
392
389
  }, 0), Promise.resolve({ result: null })) : this.executeMessage({
393
390
  message: e,
394
391
  args: t
@@ -396,4 +393,4 @@ var t = class {
396
393
  }
397
394
  };
398
395
  //#endregion
399
- export { A as HANDSHAKE_MESSAGES, I as INTERACTION_CONTAINER_SELECTOR, D as NAMESPACE, O as NAMESPACE_SEPARATOR, k as SDK_CALLBACK, j as WELL_KNOWN_MESSAGES, G as default, F as getConfiguratorSettings, P as getMethodNames, N as isExposable };
396
+ export { O as HANDSHAKE_MESSAGES, P as INTERACTION_CONTAINER_SELECTOR, T as NAMESPACE, E as NAMESPACE_SEPARATOR, D as SDK_CALLBACK, k as WELL_KNOWN_MESSAGES, U as default, N as getConfiguratorSettings, M as getMethodNames, j as isExposable };
@@ -206,7 +206,9 @@ var t = class {
206
206
  resolve: e,
207
207
  reject: t
208
208
  };
209
- }, h = (/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$")), g = /\/v[23]\/?$/, _ = {
209
+ };
210
+ (/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$"));
211
+ var h = /\/v[23]\/?$/, g = {
210
212
  SDK: "extended",
211
213
  CONFIGURATOR_SDK: "configurator",
212
214
  CALLBACKS: "callbacks",
@@ -214,29 +216,24 @@ var t = class {
214
216
  ANALYTICS: "analytics",
215
217
  GLOBAL: "global",
216
218
  RAPI: "rapi"
217
- }, v = ".", y = _.SDK + "." + _.CALLBACKS, b = {
219
+ }, _ = ".", v = g.SDK + "." + g.CALLBACKS, y = {
218
220
  REQUEST_BOOT: "requestBoot",
219
221
  SETUP: "setup",
220
222
  WEBSITE_READY: "websiteReady"
221
- }, x = {
223
+ }, b = {
222
224
  GET_METHODS: "getMethods",
223
225
  RETURN_METHODS: "returnMethods",
224
226
  REGISTER_CUSTOM_VIEW: "registerCustomView",
225
227
  REGISTER_CUSTOM_VIEW_DONE: "registerCustomViewDone"
226
- }, S = ["constructor", "callbacks"], C = (e) => e[0] !== "_" && !S.includes(e), w = (e, t, n = !1) => {
228
+ }, x = ["constructor", "callbacks"], S = (e) => e[0] !== "_" && !x.includes(e), C = (e, t, n = !1) => {
227
229
  if (!e) return [];
228
- let r = Object.getOwnPropertyNames(e), i = n ? _.CALLBACKS + "." : "";
229
- return r.filter(C).map((e) => t + "." + i + e);
230
- }, T = async (e, t) => {
230
+ let r = Object.getOwnPropertyNames(e), i = n ? g.CALLBACKS + "." : "";
231
+ return r.filter(S).map((e) => t + "." + i + e);
232
+ }, w = async (e, t) => {
231
233
  if (typeof e != "string") throw Error("Configurator ID is not a string type: \"" + typeof e + "\"");
232
- let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = ((e, t) => {
233
- if (!g.test(e)) return e + t;
234
- let n = ((e) => {
235
- let t = e.split("?")[0];
236
- return h.some((e) => e.test(t));
237
- })(t) ? "v3" : "v2";
238
- return e.replace(g, "/" + n) + t;
239
- })(n, "/configurators/" + e), a = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), o = new Request(i, {
234
+ let n = t.customApiUrl ? t.customApiUrl : "https://api.roomle.com/v2", r = t.overrideTenant || 9, i = (a = n, o = "/configurators/" + e, h.test(a) ? a.replace(h, "/v2") + o : a + o);
235
+ var a, o;
236
+ let s = "03-" + window.btoa((/* @__PURE__ */ new Date()).toISOString() + ";anonymous;roomle_portal_v2"), c = new Request(i, {
240
237
  method: "GET",
241
238
  headers: new Headers({
242
239
  apiKey: "roomle_portal_v2",
@@ -244,14 +241,14 @@ var t = class {
244
241
  locale: "en",
245
242
  language: "en",
246
243
  device: 1,
247
- token: a,
244
+ token: s,
248
245
  platform: "web"
249
246
  }),
250
247
  mode: "cors",
251
248
  cache: "default"
252
- }), { configurator: s } = await (await fetch(o)).json();
253
- return s;
254
- }, E = "data-rml-interaction-container", D = (e, t, n) => {
249
+ }), { configurator: l } = await (await fetch(c)).json();
250
+ return l;
251
+ }, T = "data-rml-interaction-container", E = (e, t, n) => {
255
252
  let r = null;
256
253
  Object.defineProperty(e, t, {
257
254
  get: () => r || n,
@@ -259,9 +256,9 @@ var t = class {
259
256
  r = e?.mute ? e.value : e;
260
257
  }
261
258
  });
262
- }, O = () => .01 * window.innerHeight + "px", k = (e) => {
263
- e && setTimeout(() => e.style.setProperty(j, O()), 0);
264
- }, A = "rml-styles", j = "--rml-full-height", M = "rml-container", N = "rml-fill", P = "rml-pos", F = "rml-android-height", I = "rml-overflow-hidden", L = /* @__PURE__ */ new Map(), R = class extends p {
259
+ }, D = () => .01 * window.innerHeight + "px", O = (e) => {
260
+ e && setTimeout(() => e.style.setProperty(A, D()), 0);
261
+ }, k = "rml-styles", A = "--rml-full-height", j = "rml-container", M = "rml-fill", N = "rml-pos", P = "rml-android-height", F = "rml-overflow-hidden", I = /* @__PURE__ */ new Map(), L = class extends p {
265
262
  static createPlanner(e, t, n, r = []) {
266
263
  return this._create(e, t, n, r);
267
264
  }
@@ -270,10 +267,10 @@ var t = class {
270
267
  r.viewName = e;
271
268
  let { resolve: i, promise: a } = m(), { resolve: o, promise: s } = m(), c = new t("custom-view-" + e, window, window.parent, ({ message: e, args: t }) => {
272
269
  switch (e) {
273
- case x.REGISTER_CUSTOM_VIEW_DONE:
270
+ case b.REGISTER_CUSTOM_VIEW_DONE:
274
271
  i();
275
272
  break;
276
- case x.RETURN_METHODS:
273
+ case b.RETURN_METHODS:
277
274
  r.handleSetup(t[0]), o();
278
275
  break;
279
276
  default: if (r.isSetupDone) return r.executeMessage({
@@ -284,7 +281,7 @@ var t = class {
284
281
  });
285
282
  r.setMessageHandler(c);
286
283
  let l = [e];
287
- return c.sendMessage(x.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(x.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
284
+ return c.sendMessage(b.REGISTER_CUSTOM_VIEW, l), await a, c.sendMessage(b.GET_METHODS, l), await s, r.setupPlugins(n, document.body, "custom-view"), await Promise.allSettled(r.pluginsLoaded), r;
288
285
  }
289
286
  static createConfigurator(e, t, n, r = []) {
290
287
  return this._create(e, t, n, r);
@@ -300,7 +297,7 @@ var t = class {
300
297
  try {
301
298
  let s = ((e) => (l(e), e?.customApiUrl && (e.customApiUrl = decodeURIComponent(e.customApiUrl)), e.shareUrl && (e.deeplink = e.shareUrl.replace("<CONF_ID>", "#CONFIGURATIONID#")), e))(n), c = u();
302
299
  d(c);
303
- let f = await T(e, r(c, s));
300
+ let f = await w(e, r(c, s));
304
301
  n = ((e, t) => {
305
302
  let n = o(t), i = u();
306
303
  d(i);
@@ -326,44 +323,44 @@ var t = class {
326
323
  _iframe;
327
324
  constructor(e, n, r, i, a) {
328
325
  if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
329
- if (L.has(n)) throw Error("There is already an instance on this DOM element");
330
- if (!document.getElementById(A)) {
326
+ if (I.has(n)) throw Error("There is already an instance on this DOM element");
327
+ if (!document.getElementById(k)) {
331
328
  let e = r.zIndex || 9999999, t = document.createElement("style");
332
- t.type = "text/css", t.id = A;
329
+ t.type = "text/css", t.id = k;
333
330
  let n = "transition:all ease-in-out 450ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e + (t + n), "") + n;
334
- t.innerHTML = `\n .${M}{${j}:${O()};}\n .${P}{position:fixed;top:0;left:0;z-index:${e};opacity:0}\n .rml-transition{${i}}\n .${N}{width:100%;height:100%;opacity:1}\n .${F}{height:calc(var(${j},1vh)*100)}\n .${I}{overflow:hidden}\n `, document.head.appendChild(t);
331
+ t.innerHTML = `\n .${j}{${A}:${D()};}\n .${N}{position:fixed;top:0;left:0;z-index:${e};opacity:0}\n .rml-transition{${i}}\n .${M}{width:100%;height:100%;opacity:1}\n .${P}{height:calc(var(${A},1vh)*100)}\n .${F}{overflow:hidden}\n `, document.head.appendChild(t);
335
332
  }
336
333
  this._executeMessage = this._executeMessage.bind(this);
337
334
  let o = new t("website", window, null, this._executeMessage);
338
335
  this.setMessageHandler(o), this._onResize = this._onResize.bind(this), f() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
339
336
  let s = this._createIframe();
340
- 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), L.set(n, !0);
337
+ 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), I.set(n, !0);
341
338
  }
342
339
  teardown() {
343
- this._container && L.delete(this._container);
340
+ this._container && I.delete(this._container);
344
341
  let e = this._container.querySelector("iframe");
345
342
  e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
346
343
  }
347
344
  _createIframe() {
348
345
  let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
349
- 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(M), e.classList.add(N), e;
346
+ 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(j), e.classList.add(M), e;
350
347
  }
351
348
  _onResize() {
352
- k(this._iframe);
349
+ O(this._iframe);
353
350
  }
354
351
  _onUseFullPage() {
355
- this._iframe.classList.add(P), document.documentElement.classList.add(I), window.document.body.classList.add(I), f() && (k(this._iframe), this._iframe.classList.add(F));
352
+ this._iframe.classList.add(N), document.documentElement.classList.add(F), window.document.body.classList.add(F), f() && (O(this._iframe), this._iframe.classList.add(P));
356
353
  }
357
354
  _onBackToWebsite() {
358
- this._iframe.classList.remove(P), this._iframe.classList.remove(F), document.documentElement.classList.remove(I), window.document.body.classList.remove(I);
355
+ this._iframe.classList.remove(N), this._iframe.classList.remove(P), document.documentElement.classList.remove(F), window.document.body.classList.remove(F);
359
356
  }
360
357
  _executeMessage({ message: e, args: t }, n) {
361
- if (n.source && n.source === this._iframe?.contentWindow) return e === b.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : Promise.resolve({ error: "MessageHandler not set" }) : e === b.SETUP ? (this.handleSetup(t[0]), D(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), D(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
362
- this._messageHandler && this._messageHandler.sendMessage(b.WEBSITE_READY);
358
+ if (n.source && n.source === this._iframe?.contentWindow) return e === y.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : Promise.resolve({ error: "MessageHandler not set" }) : e === y.SETUP ? (this.handleSetup(t[0]), E(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), E(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
359
+ this._messageHandler && this._messageHandler.sendMessage(y.WEBSITE_READY);
363
360
  }, 0), Promise.resolve({ result: null })) : this.executeMessage({
364
361
  message: e,
365
362
  args: t
366
363
  });
367
364
  }
368
365
  };
369
- export { b as HANDSHAKE_MESSAGES, E as INTERACTION_CONTAINER_SELECTOR, _ as NAMESPACE, v as NAMESPACE_SEPARATOR, y as SDK_CALLBACK, x as WELL_KNOWN_MESSAGES, R as default, T as getConfiguratorSettings, w as getMethodNames, C as isExposable };
366
+ export { y as HANDSHAKE_MESSAGES, T as INTERACTION_CONTAINER_SELECTOR, g as NAMESPACE, _ as NAMESPACE_SEPARATOR, v as SDK_CALLBACK, b as WELL_KNOWN_MESSAGES, L as default, w as getConfiguratorSettings, C as getMethodNames, S as isExposable };