@roomle/embedding-lib 5.15.0-alpha.3 → 5.15.0-alpha.5

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 (35) hide show
  1. package/docs/md/web/embedding/CHANGELOG.md +7 -4
  2. package/package.json +2 -2
  3. package/packages/common/src/utils/init-data.d.ts +1 -0
  4. package/roomle-embedding-lib.es.js +7 -6
  5. package/roomle-embedding-lib.es.min.js +1 -1
  6. package/roomle-embedding-lib.umd.js +4 -4
  7. package/roomle-embedding-lib.umd.min.js +3 -3
  8. package/src/common/components/collection-view/CollectionViewElement.vue.d.ts +9 -0
  9. package/src/common/components/drawer-layout/DrawerElement.vue.d.ts +5 -0
  10. package/src/common/components/overlays/bottom-bar/CloseView.vue.d.ts +3 -1
  11. package/src/{configurator/components/ActionButtonsParameterGroups.vue.d.ts → common/components/parameters/VisibilityParameter.vue.d.ts} +4 -2
  12. package/src/common/composables/use-event-emitter-listener.d.ts +3 -2
  13. package/src/common/composables/use-planner-actions-visibility.d.ts +1 -0
  14. package/src/common/utils/ui-actions.d.ts +0 -1
  15. package/src/configurator/components/Overlays.vue.d.ts +18 -6
  16. package/src/configurator/components/grid-view/-utils/GridViewElement.vue.d.ts +1 -1
  17. package/src/configurator/components/overlays/DeleteWarning.vue.d.ts +3 -1
  18. package/src/configurator/components/overlays/ElementDisabled.vue.d.ts +3 -1
  19. package/src/configurator/components/overlays/GenericError.vue.d.ts +3 -1
  20. package/src/configurator/components/overlays/NoDocking.vue.d.ts +3 -1
  21. package/src/configurator/components/overlays/VariantWarning.vue.d.ts +3 -1
  22. package/src/configurator/components/parameters/ParameterGroupButton.vue.d.ts +55 -40
  23. package/src/configurator/components/parameters/ParameterGroups.vue.d.ts +11 -6
  24. package/src/configurator/components/parameters/types/ParameterGroupPills.vue.d.ts +31 -0
  25. package/src/configurator/components/utils/PopUp.vue.d.ts +3 -1
  26. package/src/configurator/embedding/exposed-callbacks.d.ts +1 -1
  27. package/src/configurator/embedding/types.d.ts +5 -0
  28. package/src/planner/business-logic/general-room-parameters.d.ts +4 -0
  29. package/src/planner/components/overlays/rooms/DoorParametersSetting.vue.d.ts +19 -0
  30. package/src/planner/components/overlays/rooms/FloorColor.vue.d.ts +19 -0
  31. package/src/planner/utils/interaction.d.ts +2 -0
  32. package/src/viewer/components/ViewerMain.vue.d.ts +26 -5
  33. package/src/common/components/ActionButtons.vue.d.ts +0 -8
  34. package/src/configurator/components/parameters/ParameterGroupArrowButton.vue.d.ts +0 -10
  35. package/src/configurator/components/utils/ScrollHint.vue.d.ts +0 -31
@@ -1,12 +1,15 @@
1
- ## [5.15.0-alpha.3](https://github.com/roomle-dev/roomle-ui/compare/embedding-lib-v5.15.0-alpha.2...embedding-lib-v5.15.0-alpha.3) (2025-03-28)
1
+ ## [5.15.0-alpha.5](https://github.com/roomle-dev/roomle-ui/compare/embedding-lib-v5.15.0-alpha.4...embedding-lib-v5.15.0-alpha.5) (2025-04-09)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * **SDK:** upgrade to version 2.97.0-alpha.4 ([#1570](https://github.com/roomle-dev/roomle-ui/issues/1570)) ([b06abd3](https://github.com/roomle-dev/roomle-ui/commit/b06abd3c9bb79ff06c054b0d8ddedf4db720d20c))
7
- * **SDK:** upgrade to version 2.97.0-alpha.5 ([#1571](https://github.com/roomle-dev/roomle-ui/issues/1571)) ([e84b9c1](https://github.com/roomle-dev/roomle-ui/commit/e84b9c19e9fc40bc57b2ee25f801609c0784bbcb))
6
+ * **SDK:** upgrade to version 2.97.0-alpha.19 ([#1595](https://github.com/roomle-dev/roomle-ui/issues/1595)) ([f67f2b4](https://github.com/roomle-dev/roomle-ui/commit/f67f2b4e3a59adbe1aa2c319c27560a7964504c8))
7
+ * **SDK:** upgrade to version 2.97.0-alpha.20 ([#1596](https://github.com/roomle-dev/roomle-ui/issues/1596)) ([64463bb](https://github.com/roomle-dev/roomle-ui/commit/64463bbff266e0ced8f8dc766a76571fd8112161))
8
+ * **SDK:** upgrade to version 2.97.0-alpha.21 ([#1597](https://github.com/roomle-dev/roomle-ui/issues/1597)) ([c87e8bc](https://github.com/roomle-dev/roomle-ui/commit/c87e8bc12e93ca7833f5bd565aa6b483b993e36e))
9
+ * **SDK:** upgrade to version 2.97.0-alpha.22 ([#1603](https://github.com/roomle-dev/roomle-ui/issues/1603)) ([b3a2a34](https://github.com/roomle-dev/roomle-ui/commit/b3a2a342c93378b9f098b1070d58f5004bb8c6dc))
8
10
 
9
11
 
10
12
  ### Bug Fixes
11
13
 
12
- * sloping wall mm values are overwritten ([5e58659](https://github.com/roomle-dev/roomle-ui/commit/5e586594ec4e0fc92159d78c7e8312fcc5298800))
14
+ * correctly export SKIP_SDK_VERSION_CHECK ([2c014ca](https://github.com/roomle-dev/roomle-ui/commit/2c014ca0bbe9c5d50d2d80b8e620a4664ffa95c1))
15
+ * stuff ([9080f22](https://github.com/roomle-dev/roomle-ui/commit/9080f227145a33c6d25181677b4a4af2e0dced5d))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "5.15.0-alpha.3",
3
+ "version": "5.15.0-alpha.5",
4
4
  "description": "This is a small library which can be used to communicate with the Roomle Configurator",
5
5
  "type": "module",
6
6
  "main": "./roomle-embedding-lib.umd.js",
@@ -29,7 +29,7 @@
29
29
  "npm": "8.3.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@roomle/web-sdk": "2.97.0-alpha.7"
32
+ "@roomle/web-sdk": "2.97.0-alpha.22"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",
@@ -29,6 +29,7 @@ export declare const FALLBACK_INIT_DATA: {
29
29
  mocAr: boolean;
30
30
  wallAutoHeight: boolean;
31
31
  openCloseAnimation: boolean;
32
+ showWallVisibilityToggle: boolean;
32
33
  };
33
34
  rotationSnapDegrees: number;
34
35
  interactionsCollapsed: boolean;
@@ -207,7 +207,8 @@ const z = {
207
207
  featureFlags: {
208
208
  mocAr: !0,
209
209
  wallAutoHeight: !1,
210
- openCloseAnimation: !1
210
+ openCloseAnimation: !1,
211
+ showWallVisibilityToggle: !1
211
212
  },
212
213
  rotationSnapDegrees: 10,
213
214
  interactionsCollapsed: !1
@@ -239,7 +240,7 @@ const z = {
239
240
  }, X = "<CONF_ID>", Z = "#CONFIGURATIONID#", j = (e) => {
240
241
  e.featureFlags || (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);
241
242
  }, M = () => /(android)/i.test(navigator.userAgent);
242
- class A {
243
+ class y {
243
244
  constructor() {
244
245
  c(this, "_messageHandler", null);
245
246
  c(this, "isSetupDone", !1);
@@ -335,7 +336,7 @@ class A {
335
336
  );
336
337
  }
337
338
  }
338
- const y = () => {
339
+ const A = () => {
339
340
  let e, t;
340
341
  return { promise: new Promise((o, r) => {
341
342
  e = o, t = r;
@@ -365,7 +366,7 @@ const y = () => {
365
366
  ANDROID_HEIGHT: "rml-android-height",
366
367
  OVERFLOW_HIDDEN: "rml-overflow-hidden"
367
368
  }, w = /* @__PURE__ */ new Map();
368
- class te extends A {
369
+ class te extends y {
369
370
  constructor(s, o, r, n, a) {
370
371
  super();
371
372
  c(this, "_waitForIframe");
@@ -415,9 +416,9 @@ class te extends A {
415
416
  );
416
417
  }
417
418
  static async connect(s, o = []) {
418
- const r = new A();
419
+ const r = new y();
419
420
  r.viewName = s;
420
- const { resolve: n, promise: a } = y(), { resolve: i, promise: l } = y(), d = ({
421
+ const { resolve: n, promise: a } = A(), { resolve: i, promise: l } = A(), d = ({
421
422
  message: m,
422
423
  args: f
423
424
  }) => {
@@ -1,4 +1,4 @@
1
- var H=Object.defineProperty,U=(s,e,t)=>e in s?H(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,c=(s,e,t)=>U(s,typeof e!="symbol"?e+"":e,t);class I{constructor(e,t,r,i){c(this,"_side"),c(this,"_incomingMessageBus",null),c(this,"_outgoingMessageBus",null),c(this,"_execMessage",null),this._side=e,this._incomingMessageBus=t,this._outgoingMessageBus=r,this._execMessage=i,this._incomingMessageBus&&this._incomingMessageBus.addEventListener("message",this._handleMessage.bind(this))}setOutgoingMessageBus(e){this._outgoingMessageBus=e}setMessageExecution(e){this._execMessage=e}sendMessage(e,t=[]){return new Promise((r,i)=>{if(this._incomingMessageBus===this._outgoingMessageBus)return r(void 0);const o=new MessageChannel;o.port1.onmessage=n=>{if(!n||!n.data)return o.port1.close(),o.port2.close(),i(new Error(this._side+" received message but response can not be interpreted"));let l;try{l=JSON.parse(n.data)}catch(u){return o.port1.close(),o.port2.close(),this._prepareError(u),i(u)}l.error?i(l.error):l.result!==void 0?r(l.result):r(void 0),o.port1.close(),o.port2.close()};let a="";try{a=JSON.stringify({message:e,args:t})}catch{return i(new Error(this._side+": can not create command because it is not JSON.stringify able"))}if(!this._outgoingMessageBus)return i(new Error(this._side+": outgoing bus not set yet"));this._outgoingMessageBus.postMessage(a,"*",[o.port2])})}_handleMessage(e){const t=e.ports&&Array.isArray(e.ports)&&e.ports.length>0?e.ports[0]:null;if(e.data&&t)try{const r=JSON.parse(e.data);if(!this._execMessage)return t.postMessage(JSON.stringify({error:this._side+" is not ready to handle messages"}));Array.isArray(r.args)||(r.args=[r.args]);const i=this._execMessage(r,e);if(i===void 0)return;i.then((o={})=>{let a,n;typeof o=="object"&&o!==null&&(a=o.error,n=o.result),a?t.postMessage(JSON.stringify({error:a})):n!==void 0?t.postMessage(JSON.stringify({result:n})):t.postMessage(JSON.stringify({result:o}))},o=>{t.postMessage(JSON.stringify({error:this._prepareError(o)}))})}catch(r){t.postMessage(JSON.stringify({error:this._prepareError(r)}))}}_prepareError(e){if(typeof e=="string"){const t=this._side+": "+e;return console.error(t),t}return e.message=this._side+": "+e.message,console.error(e),e.message}}const p=".",f={REQUEST_BOOT:"requestBoot",SETUP:"setup",WEBSITE_READY:"websiteReady"},_={GET_METHODS:"getMethods",RETURN_METHODS:"returnMethods",REGISTER_CUSTOM_VIEW:"registerCustomView",REGISTER_CUSTOM_VIEW_DONE:"registerCustomViewDone"},B=async(s,e)=>{if(typeof s!="string")throw new Error('Configurator ID is not a string type: "'+typeof s+'"');const t=e.customApiUrl?e.customApiUrl:"https://api.roomle.com/v2",r=e.overrideTenant||9,i=t+"/configurators/"+s,o="roomle_portal_v2",a="03-"+window.btoa(new Date().toISOString()+";anonymous;"+o),n=()=>{const d={apiKey:o,currentTenant:r,locale:"en",language:"en",device:1,token:a,platform:"web"};return new Headers(d)},l=new Request(i,{method:"GET",headers:n(),mode:"cors",cache:"default"}),u=await fetch(l),{configurator:h}=await u.json();return h},F=()=>{try{return window.self!==window.top}catch{return!0}},C=["127.0.0.1","localhost","0.0.0.0"],k=()=>{const s=F();let e=window.location.href;if(s){if(!document.referrer)return null;e=document.referrer}const{hostname:t}=new URL(e);return t},x=s=>!!(C.includes(s)||s.endsWith("roomle.com")||s.endsWith("gitlab.io")||s.endsWith("gitlab.com")),y=["language","browserLanguage","userLanguage","systemLanguage"],W=(s=null)=>{const e=window.navigator;if(s)return s.substr(0,2);if(Array.isArray(e.languages)&&e.languages.length>0)return e.languages[0].substr(0,2);for(let t=0,r=y.length;t<r;t++){const i=e[y[t]];if(i)return i.substr(0,2)}return"en"},V=(s,e)=>{const t=JSON.parse(JSON.stringify(s));return w(t,e)},w=(s,e)=>{for(const t in e)try{e[t].constructor===Object?s[t]=w(s[t],e[t]):s[t]=e[t]}catch{s[t]=e[t]}return s};var T=(s=>(s.BOTTOM_BAR="bottom_bar",s.PARTLIST_BOUNDS="partlist_bounds",s.INTERACTION_NOTES="interaction_notes",s))(T||{}),G={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const J={mobileLandscape:!0,floorMaterialRootTag:"materials_root",buttons:{renderimage:!0,requestproduct:!0,requestplan:!0,load_product:!0,partlist_print:!0},elements:{[T.INTERACTION_NOTES]:!0},helpcenter:{roomdesigner:!0,configurator:!1,disable:!1},firstPersonView:!0,saveToIdb:!0,featureFlags:{mocAr:!0,wallAutoHeight:!1,openCloseAnimation:!1},rotationSnapDegrees:10,interactionsCollapsed:!1},$="(idle)",j=s=>(E(s),s!=null&&s.customApiUrl&&(s.customApiUrl=decodeURIComponent(s.customApiUrl)),s.shareUrl&&(s.deeplink=s.shareUrl.replace(Y,Q)),s),E=s=>{if(!s)return;const e=Object.keys(s);for(const t of e){const r=s[t];if(!Array.isArray(r)&&typeof r=="object"&&r!==null&&E(r),Array.isArray(r))for(const i of r)E(i);(r==="true"||r==="false")&&(s[t]=r==="true")}},z=(s,e)=>{e.configuratorId=s.id;const t=s.settings||{};return!e.overrideTenant&&s.tenant&&(e.overrideTenant=s.tenant),V(t,e)},q=()=>{const s={...J};s.locale||(s.locale=W()),s.id===$&&delete s.id;const e=k();return e&&x(e)&&(s.configuratorId="demoConfigurator"),s.customApiUrl=G.VITE_RAPI_URL,s.emails=!1,s},Y="<CONF_ID>",Q="#CONFIGURATIONID#",K=s=>{s.featureFlags||(s.featureFlags={}),typeof s.featureFlags.realPartList!="boolean"&&(s.featureFlags.realPartList=!0),typeof s.featureFlags.globalCallbacks!="boolean"&&(s.featureFlags.globalCallbacks=!0),typeof s.featureFlags.mocAr!="boolean"&&(s.featureFlags.mocAr=!1)},M=()=>/(android)/i.test(navigator.userAgent);class v{constructor(){c(this,"_messageHandler",null),c(this,"isSetupDone",!1),c(this,"viewName","main"),c(this,"plugins",{}),c(this,"pluginsLoaded",[]),c(this,"ui",{callbacks:null}),c(this,"extended",{callbacks:null}),c(this,"configurator",{callbacks:null}),c(this,"analytics",{callbacks:{}}),c(this,"global",{callbacks:{}})}setMessageHandler(e){this._messageHandler=e}handleSetup(e){const{methods:t,callbacks:r}=e;t.forEach(i=>{const o=i.split(p),a=o[0],n=o[1];this[a]||(this[a]={}),this[a][n]=function(){if(!this._messageHandler){console.error("MessageHandler not set");return}return this._messageHandler.sendMessage(i,[...arguments])}.bind(this)}),r.forEach(i=>{const o=i.split(p),a=o[0],n=o[1],l=o[2];this[a]||(this[a]={}),this[a][n]||(this[a][n]={}),this[a][n][l]=()=>{}}),this.isSetupDone=!0}executeMessage({message:e,args:t}){const r=e.split(p),i=r[0],o=r[1],a=r.length===3?r[2]:null;if(a&&this[i][o][a]){const n=this[i][o][a](...t);return n instanceof Promise?n.then(l=>({result:l})):n!==void 0?Promise.resolve({result:n}):Promise.resolve({result:null})}return Promise.reject('Message "'+e+'" is unkown')}setupPlugins(e,t,r="website"){for(const i of e)typeof i=="string"&&i==="dragIn"?this.pluginsLoaded.push(new Promise((o,a)=>{try{import("./drag-in-w_TrusdP.mjs").then(n=>n.l).then(({DragIn:n})=>{const l=new n(this.ui,t,r,this.viewName);l.init().then(()=>{this.plugins.dragIn=l,o()},a)})}catch(n){a(n)}})):i.name&&i.loader&&this.pluginsLoaded.push(new Promise((o,a)=>{try{i.loader().then(n=>{const l=new n(this.ui,t,r,this.viewName);l.init().then(()=>{this.plugins[i.name]=l,o()},a)})}catch(n){a(n)}}))}}const S=()=>{let s,e;return{promise:new Promise((t,r)=>{s=t,e=r}),resolve:s,reject:e}},N=(s,e,t)=>{let r=null;Object.defineProperty(s,e,{get(){return r||t},set(i){i!=null&&i.mute?r=i.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=i)}})},R=()=>window.innerHeight*.01+"px",D=s=>{s&&setTimeout(()=>s.style.setProperty(O,R()),0)},L="rml-styles",X=450,O="--rml-full-height",g={CONTAINER:"rml-container",FILL:"rml-fill",POSITION:"rml-pos",TRANSITION:"rml-transition",ANDROID_HEIGHT:"rml-android-height",OVERFLOW_HIDDEN:"rml-overflow-hidden"},b=new Map;class Z extends v{constructor(e,t,r,i,o){if(super(),c(this,"_waitForIframe"),c(this,"_container"),c(this,"_configuratorSettings"),c(this,"_initData",{}),c(this,"_iframe"),!e||typeof e.id!="string")throw new Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");if(b.has(t))throw new Error("There is already an instance on this DOM element");if(!document.getElementById(L)){const l=r.zIndex||9999999,u=document.createElement("style");u.type="text/css",u.id=L;const h="transition:all ease-in-out "+X+"ms;",d=["-webkit-","-o-"].reduce((A,P)=>A+=P+h,"")+h,m=R();u.innerHTML=`
1
+ var H=Object.defineProperty,U=(s,e,t)=>e in s?H(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,c=(s,e,t)=>U(s,typeof e!="symbol"?e+"":e,t);class I{constructor(e,t,r,i){c(this,"_side"),c(this,"_incomingMessageBus",null),c(this,"_outgoingMessageBus",null),c(this,"_execMessage",null),this._side=e,this._incomingMessageBus=t,this._outgoingMessageBus=r,this._execMessage=i,this._incomingMessageBus&&this._incomingMessageBus.addEventListener("message",this._handleMessage.bind(this))}setOutgoingMessageBus(e){this._outgoingMessageBus=e}setMessageExecution(e){this._execMessage=e}sendMessage(e,t=[]){return new Promise((r,i)=>{if(this._incomingMessageBus===this._outgoingMessageBus)return r(void 0);const o=new MessageChannel;o.port1.onmessage=n=>{if(!n||!n.data)return o.port1.close(),o.port2.close(),i(new Error(this._side+" received message but response can not be interpreted"));let l;try{l=JSON.parse(n.data)}catch(u){return o.port1.close(),o.port2.close(),this._prepareError(u),i(u)}l.error?i(l.error):l.result!==void 0?r(l.result):r(void 0),o.port1.close(),o.port2.close()};let a="";try{a=JSON.stringify({message:e,args:t})}catch{return i(new Error(this._side+": can not create command because it is not JSON.stringify able"))}if(!this._outgoingMessageBus)return i(new Error(this._side+": outgoing bus not set yet"));this._outgoingMessageBus.postMessage(a,"*",[o.port2])})}_handleMessage(e){const t=e.ports&&Array.isArray(e.ports)&&e.ports.length>0?e.ports[0]:null;if(e.data&&t)try{const r=JSON.parse(e.data);if(!this._execMessage)return t.postMessage(JSON.stringify({error:this._side+" is not ready to handle messages"}));Array.isArray(r.args)||(r.args=[r.args]);const i=this._execMessage(r,e);if(i===void 0)return;i.then((o={})=>{let a,n;typeof o=="object"&&o!==null&&(a=o.error,n=o.result),a?t.postMessage(JSON.stringify({error:a})):n!==void 0?t.postMessage(JSON.stringify({result:n})):t.postMessage(JSON.stringify({result:o}))},o=>{t.postMessage(JSON.stringify({error:this._prepareError(o)}))})}catch(r){t.postMessage(JSON.stringify({error:this._prepareError(r)}))}}_prepareError(e){if(typeof e=="string"){const t=this._side+": "+e;return console.error(t),t}return e.message=this._side+": "+e.message,console.error(e),e.message}}const p=".",f={REQUEST_BOOT:"requestBoot",SETUP:"setup",WEBSITE_READY:"websiteReady"},_={GET_METHODS:"getMethods",RETURN_METHODS:"returnMethods",REGISTER_CUSTOM_VIEW:"registerCustomView",REGISTER_CUSTOM_VIEW_DONE:"registerCustomViewDone"},B=async(s,e)=>{if(typeof s!="string")throw new Error('Configurator ID is not a string type: "'+typeof s+'"');const t=e.customApiUrl?e.customApiUrl:"https://api.roomle.com/v2",r=e.overrideTenant||9,i=t+"/configurators/"+s,o="roomle_portal_v2",a="03-"+window.btoa(new Date().toISOString()+";anonymous;"+o),n=()=>{const d={apiKey:o,currentTenant:r,locale:"en",language:"en",device:1,token:a,platform:"web"};return new Headers(d)},l=new Request(i,{method:"GET",headers:n(),mode:"cors",cache:"default"}),u=await fetch(l),{configurator:h}=await u.json();return h},F=()=>{try{return window.self!==window.top}catch{return!0}},C=["127.0.0.1","localhost","0.0.0.0"],k=()=>{const s=F();let e=window.location.href;if(s){if(!document.referrer)return null;e=document.referrer}const{hostname:t}=new URL(e);return t},x=s=>!!(C.includes(s)||s.endsWith("roomle.com")||s.endsWith("gitlab.io")||s.endsWith("gitlab.com")),y=["language","browserLanguage","userLanguage","systemLanguage"],W=(s=null)=>{const e=window.navigator;if(s)return s.substr(0,2);if(Array.isArray(e.languages)&&e.languages.length>0)return e.languages[0].substr(0,2);for(let t=0,r=y.length;t<r;t++){const i=e[y[t]];if(i)return i.substr(0,2)}return"en"},V=(s,e)=>{const t=JSON.parse(JSON.stringify(s));return w(t,e)},w=(s,e)=>{for(const t in e)try{e[t].constructor===Object?s[t]=w(s[t],e[t]):s[t]=e[t]}catch{s[t]=e[t]}return s};var T=(s=>(s.BOTTOM_BAR="bottom_bar",s.PARTLIST_BOUNDS="partlist_bounds",s.INTERACTION_NOTES="interaction_notes",s))(T||{}),G={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const J={mobileLandscape:!0,floorMaterialRootTag:"materials_root",buttons:{renderimage:!0,requestproduct:!0,requestplan:!0,load_product:!0,partlist_print:!0},elements:{[T.INTERACTION_NOTES]:!0},helpcenter:{roomdesigner:!0,configurator:!1,disable:!1},firstPersonView:!0,saveToIdb:!0,featureFlags:{mocAr:!0,wallAutoHeight:!1,openCloseAnimation:!1,showWallVisibilityToggle:!1},rotationSnapDegrees:10,interactionsCollapsed:!1},$="(idle)",j=s=>(E(s),s!=null&&s.customApiUrl&&(s.customApiUrl=decodeURIComponent(s.customApiUrl)),s.shareUrl&&(s.deeplink=s.shareUrl.replace(Y,Q)),s),E=s=>{if(!s)return;const e=Object.keys(s);for(const t of e){const r=s[t];if(!Array.isArray(r)&&typeof r=="object"&&r!==null&&E(r),Array.isArray(r))for(const i of r)E(i);(r==="true"||r==="false")&&(s[t]=r==="true")}},z=(s,e)=>{e.configuratorId=s.id;const t=s.settings||{};return!e.overrideTenant&&s.tenant&&(e.overrideTenant=s.tenant),V(t,e)},q=()=>{const s={...J};s.locale||(s.locale=W()),s.id===$&&delete s.id;const e=k();return e&&x(e)&&(s.configuratorId="demoConfigurator"),s.customApiUrl=G.VITE_RAPI_URL,s.emails=!1,s},Y="<CONF_ID>",Q="#CONFIGURATIONID#",K=s=>{s.featureFlags||(s.featureFlags={}),typeof s.featureFlags.realPartList!="boolean"&&(s.featureFlags.realPartList=!0),typeof s.featureFlags.globalCallbacks!="boolean"&&(s.featureFlags.globalCallbacks=!0),typeof s.featureFlags.mocAr!="boolean"&&(s.featureFlags.mocAr=!1)},M=()=>/(android)/i.test(navigator.userAgent);class v{constructor(){c(this,"_messageHandler",null),c(this,"isSetupDone",!1),c(this,"viewName","main"),c(this,"plugins",{}),c(this,"pluginsLoaded",[]),c(this,"ui",{callbacks:null}),c(this,"extended",{callbacks:null}),c(this,"configurator",{callbacks:null}),c(this,"analytics",{callbacks:{}}),c(this,"global",{callbacks:{}})}setMessageHandler(e){this._messageHandler=e}handleSetup(e){const{methods:t,callbacks:r}=e;t.forEach(i=>{const o=i.split(p),a=o[0],n=o[1];this[a]||(this[a]={}),this[a][n]=function(){if(!this._messageHandler){console.error("MessageHandler not set");return}return this._messageHandler.sendMessage(i,[...arguments])}.bind(this)}),r.forEach(i=>{const o=i.split(p),a=o[0],n=o[1],l=o[2];this[a]||(this[a]={}),this[a][n]||(this[a][n]={}),this[a][n][l]=()=>{}}),this.isSetupDone=!0}executeMessage({message:e,args:t}){const r=e.split(p),i=r[0],o=r[1],a=r.length===3?r[2]:null;if(a&&this[i][o][a]){const n=this[i][o][a](...t);return n instanceof Promise?n.then(l=>({result:l})):n!==void 0?Promise.resolve({result:n}):Promise.resolve({result:null})}return Promise.reject('Message "'+e+'" is unkown')}setupPlugins(e,t,r="website"){for(const i of e)typeof i=="string"&&i==="dragIn"?this.pluginsLoaded.push(new Promise((o,a)=>{try{import("./drag-in-w_TrusdP.mjs").then(n=>n.l).then(({DragIn:n})=>{const l=new n(this.ui,t,r,this.viewName);l.init().then(()=>{this.plugins.dragIn=l,o()},a)})}catch(n){a(n)}})):i.name&&i.loader&&this.pluginsLoaded.push(new Promise((o,a)=>{try{i.loader().then(n=>{const l=new n(this.ui,t,r,this.viewName);l.init().then(()=>{this.plugins[i.name]=l,o()},a)})}catch(n){a(n)}}))}}const S=()=>{let s,e;return{promise:new Promise((t,r)=>{s=t,e=r}),resolve:s,reject:e}},N=(s,e,t)=>{let r=null;Object.defineProperty(s,e,{get(){return r||t},set(i){i!=null&&i.mute?r=i.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=i)}})},R=()=>window.innerHeight*.01+"px",D=s=>{s&&setTimeout(()=>s.style.setProperty(O,R()),0)},L="rml-styles",X=450,O="--rml-full-height",g={CONTAINER:"rml-container",FILL:"rml-fill",POSITION:"rml-pos",TRANSITION:"rml-transition",ANDROID_HEIGHT:"rml-android-height",OVERFLOW_HIDDEN:"rml-overflow-hidden"},b=new Map;class Z extends v{constructor(e,t,r,i,o){if(super(),c(this,"_waitForIframe"),c(this,"_container"),c(this,"_configuratorSettings"),c(this,"_initData",{}),c(this,"_iframe"),!e||typeof e.id!="string")throw new Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");if(b.has(t))throw new Error("There is already an instance on this DOM element");if(!document.getElementById(L)){const l=r.zIndex||9999999,u=document.createElement("style");u.type="text/css",u.id=L;const h="transition:all ease-in-out "+X+"ms;",d=["-webkit-","-o-"].reduce((A,P)=>A+=P+h,"")+h,m=R();u.innerHTML=`
2
2
  .${g.CONTAINER}{${O}:${m};}
3
3
  .${g.POSITION}{position:fixed;top:0;left:0;z-index:${l};opacity:0}
4
4
  .${g.TRANSITION}{${d}}
@@ -1,17 +1,17 @@
1
- (function(_,p){typeof exports=="object"&&typeof module<"u"?module.exports=p():typeof define=="function"&&define.amd?define(p):(_=typeof globalThis<"u"?globalThis:_||self,_["roomle-embedding-lib"]=_["roomle-embedding-lib"]||{},_["roomle-embedding-lib"].umd=_["roomle-embedding-lib"].umd||{},_["roomle-embedding-lib"].umd.js=p())})(this,function(){"use strict";var te=Object.defineProperty;var ee=(_,p,E)=>p in _?te(_,p,{enumerable:!0,configurable:!0,writable:!0,value:E}):_[p]=E;var c=(_,p,E)=>ee(_,typeof p!="symbol"?p+"":p,E);class _{constructor(e,t,s,n){c(this,"_side");c(this,"_incomingMessageBus",null);c(this,"_outgoingMessageBus",null);c(this,"_execMessage",null);this._side=e,this._incomingMessageBus=t,this._outgoingMessageBus=s,this._execMessage=n,this._incomingMessageBus&&this._incomingMessageBus.addEventListener("message",this._handleMessage.bind(this))}setOutgoingMessageBus(e){this._outgoingMessageBus=e}setMessageExecution(e){this._execMessage=e}sendMessage(e,t=[]){return new Promise((s,n)=>{if(this._incomingMessageBus===this._outgoingMessageBus)return s(void 0);const i=new MessageChannel;i.port1.onmessage=a=>{if(!a||!a.data)return i.port1.close(),i.port2.close(),n(new Error(this._side+" received message but response can not be interpreted"));let l;try{l=JSON.parse(a.data)}catch(d){return i.port1.close(),i.port2.close(),this._prepareError(d),n(d)}l.error?n(l.error):l.result!==void 0?s(l.result):s(void 0),i.port1.close(),i.port2.close()};let o="";try{o=JSON.stringify({message:e,args:t})}catch{return n(new Error(this._side+": can not create command because it is not JSON.stringify able"))}if(!this._outgoingMessageBus)return n(new Error(this._side+": outgoing bus not set yet"));this._outgoingMessageBus.postMessage(o,"*",[i.port2])})}_handleMessage(e){const t=e.ports&&Array.isArray(e.ports)&&e.ports.length>0?e.ports[0]:null;if(e.data&&t)try{const s=JSON.parse(e.data);if(!this._execMessage)return t.postMessage(JSON.stringify({error:this._side+" is not ready to handle messages"}));Array.isArray(s.args)||(s.args=[s.args]);const n=this._execMessage(s,e);if(n===void 0)return;n.then((i={})=>{let o,a;typeof i=="object"&&i!==null&&(o=i.error,a=i.result),o?t.postMessage(JSON.stringify({error:o})):a!==void 0?t.postMessage(JSON.stringify({result:a})):t.postMessage(JSON.stringify({result:i}))},i=>{t.postMessage(JSON.stringify({error:this._prepareError(i)}))})}catch(s){t.postMessage(JSON.stringify({error:this._prepareError(s)}))}}_prepareError(e){if(typeof e=="string"){const t=this._side+": "+e;return console.error(t),t}return e.message=this._side+": "+e.message,console.error(e),e.message}}const p=".",E={REQUEST_BOOT:"requestBoot",SETUP:"setup",WEBSITE_READY:"websiteReady"},w={GET_METHODS:"getMethods",RETURN_METHODS:"returnMethods",REGISTER_CUSTOM_VIEW:"registerCustomView",REGISTER_CUSTOM_VIEW_DONE:"registerCustomViewDone"},pt=async(r,e)=>{if(typeof r!="string")throw new Error('Configurator ID is not a string type: "'+typeof r+'"');const t=e.customApiUrl?e.customApiUrl:"https://api.roomle.com/v2",s=e.overrideTenant||9,n=t+"/configurators/"+r,i="roomle_portal_v2",o="03-"+window.btoa(new Date().toISOString()+";anonymous;"+i),a=()=>{const u={apiKey:i,currentTenant:s,locale:"en",language:"en",device:1,token:o,platform:"web"};return new Headers(u)},l=new Request(n,{method:"GET",headers:a(),mode:"cors",cache:"default"}),d=await fetch(l),{configurator:h}=await d.json();return h},yt=()=>{try{return window.self!==window.top}catch{return!0}},Et=["127.0.0.1","localhost","0.0.0.0"],Dt=()=>{const r=yt();let e=window.location.href;if(r){if(!document.referrer)return null;e=document.referrer}const{hostname:t}=new URL(e);return t},Tt=r=>!!(Et.includes(r)||r.endsWith("roomle.com")||r.endsWith("gitlab.io")||r.endsWith("gitlab.com")),k=["language","browserLanguage","userLanguage","systemLanguage"],St=(r=null)=>{const e=window.navigator;if(r)return r.substr(0,2);if(Array.isArray(e.languages)&&e.languages.length>0)return e.languages[0].substr(0,2);for(let t=0,s=k.length;t<s;t++){const n=e[k[t]];if(n)return n.substr(0,2)}return"en"},It=(r,e)=>{const t=JSON.parse(JSON.stringify(r));return C(t,e)},C=(r,e)=>{for(const t in e)try{e[t].constructor===Object?r[t]=C(r[t],e[t]):r[t]=e[t]}catch{r[t]=e[t]}return r};var z=(r=>(r.BOTTOM_BAR="bottom_bar",r.PARTLIST_BOUNDS="partlist_bounds",r.INTERACTION_NOTES="interaction_notes",r))(z||{}),wt={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const At={mobileLandscape:!0,floorMaterialRootTag:"materials_root",buttons:{renderimage:!0,requestproduct:!0,requestplan:!0,load_product:!0,partlist_print:!0},elements:{[z.INTERACTION_NOTES]:!0},helpcenter:{roomdesigner:!0,configurator:!1,disable:!1},firstPersonView:!0,saveToIdb:!0,featureFlags:{mocAr:!0,wallAutoHeight:!1,openCloseAnimation:!1},rotationSnapDegrees:10,interactionsCollapsed:!1},bt="(idle)",Ot=r=>(L(r),r!=null&&r.customApiUrl&&(r.customApiUrl=decodeURIComponent(r.customApiUrl)),r.shareUrl&&(r.deeplink=r.shareUrl.replace(Mt,Ct)),r),L=r=>{if(!r)return;const e=Object.keys(r);for(const t of e){const s=r[t];if(!Array.isArray(s)&&typeof s=="object"&&s!==null&&L(s),Array.isArray(s))for(const n of s)L(n);(s==="true"||s==="false")&&(r[t]=s==="true")}},vt=(r,e)=>{e.configuratorId=r.id;const t=r.settings||{};return!e.overrideTenant&&r.tenant&&(e.overrideTenant=r.tenant),It(t,e)},Rt=()=>{const r={...At};r.locale||(r.locale=St()),r.id===bt&&delete r.id;const e=Dt();return e&&Tt(e)&&(r.configuratorId="demoConfigurator"),r.customApiUrl=wt.VITE_RAPI_URL,r.emails=!1,r},Mt="<CONF_ID>",Ct="#CONFIGURATIONID#",Lt=r=>{r.featureFlags||(r.featureFlags={}),typeof r.featureFlags.realPartList!="boolean"&&(r.featureFlags.realPartList=!0),typeof r.featureFlags.globalCallbacks!="boolean"&&(r.featureFlags.globalCallbacks=!0),typeof r.featureFlags.mocAr!="boolean"&&(r.featureFlags.mocAr=!1)},V=()=>/(android)/i.test(navigator.userAgent);class q{constructor(){c(this,"_messageHandler",null);c(this,"isSetupDone",!1);c(this,"viewName","main");c(this,"plugins",{});c(this,"pluginsLoaded",[]);c(this,"ui",{callbacks:null});c(this,"extended",{callbacks:null});c(this,"configurator",{callbacks:null});c(this,"analytics",{callbacks:{}});c(this,"global",{callbacks:{}})}setMessageHandler(e){this._messageHandler=e}handleSetup(e){const{methods:t,callbacks:s}=e;t.forEach(n=>{const i=n.split(p),o=i[0],a=i[1];this[o]||(this[o]={}),this[o][a]=(function(){if(!this._messageHandler){console.error("MessageHandler not set");return}return this._messageHandler.sendMessage(n,[...arguments])}).bind(this)}),s.forEach(n=>{const i=n.split(p),o=i[0],a=i[1],l=i[2];this[o]||(this[o]={}),this[o][a]||(this[o][a]={}),this[o][a][l]=()=>{}}),this.isSetupDone=!0}executeMessage({message:e,args:t}){const s=e.split(p),n=s[0],i=s[1],o=s.length===3?s[2]:null;if(o&&this[n][i][o]){const a=this[n][i][o](...t);return a instanceof Promise?a.then(l=>({result:l})):a!==void 0?Promise.resolve({result:a}):Promise.resolve({result:null})}return Promise.reject('Message "'+e+'" is unkown')}setupPlugins(e,t,s="website"){for(const n of e)typeof n=="string"&&n==="dragIn"?this.pluginsLoaded.push(new Promise((i,o)=>{try{Promise.resolve().then(()=>Pt).then(({DragIn:a})=>{const l=new a(this.ui,t,s,this.viewName);l.init().then(()=>{this.plugins.dragIn=l,i()},o)})}catch(a){o(a)}})):n.name&&n.loader&&this.pluginsLoaded.push(new Promise((i,o)=>{try{n.loader().then(a=>{const l=new a(this.ui,t,s,this.viewName);l.init().then(()=>{this.plugins[n.name]=l,i()},o)})}catch(a){o(a)}}))}}const K=()=>{let r,e;return{promise:new Promise((s,n)=>{r=s,e=n}),resolve:r,reject:e}},J=(r,e,t)=>{let s=null;Object.defineProperty(r,e,{get(){return s||t},set(n){n!=null&&n.mute?s=n.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 }"),s=n)}})},j=()=>window.innerHeight*.01+"px",Q=r=>{r&&setTimeout(()=>r.style.setProperty(N,j()),0)},Z="rml-styles",Nt=450,N="--rml-full-height",m={CONTAINER:"rml-container",FILL:"rml-fill",POSITION:"rml-pos",TRANSITION:"rml-transition",ANDROID_HEIGHT:"rml-android-height",OVERFLOW_HIDDEN:"rml-overflow-hidden"},x=new Map;class xt extends q{constructor(t,s,n,i,o){super();c(this,"_waitForIframe");c(this,"_container");c(this,"_configuratorSettings");c(this,"_initData",{});c(this,"_iframe");if(!t||typeof t.id!="string")throw new Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");if(x.has(s))throw new Error("There is already an instance on this DOM element");if(!!!document.getElementById(Z)){const h=n.zIndex||9999999,u=document.createElement("style");u.type="text/css",u.id=Z;const g="transition:all ease-in-out "+Nt+"ms;",f=["-webkit-","-o-"].reduce((D,y)=>D+=y+g,"")+g,S=j();u.innerHTML=`
1
+ (function(_,p){typeof exports=="object"&&typeof module<"u"?module.exports=p():typeof define=="function"&&define.amd?define(p):(_=typeof globalThis<"u"?globalThis:_||self,_["roomle-embedding-lib"]=_["roomle-embedding-lib"]||{},_["roomle-embedding-lib"].umd=_["roomle-embedding-lib"].umd||{},_["roomle-embedding-lib"].umd.js=p())})(this,function(){"use strict";var te=Object.defineProperty;var ee=(_,p,E)=>p in _?te(_,p,{enumerable:!0,configurable:!0,writable:!0,value:E}):_[p]=E;var c=(_,p,E)=>ee(_,typeof p!="symbol"?p+"":p,E);class _{constructor(e,t,s,n){c(this,"_side");c(this,"_incomingMessageBus",null);c(this,"_outgoingMessageBus",null);c(this,"_execMessage",null);this._side=e,this._incomingMessageBus=t,this._outgoingMessageBus=s,this._execMessage=n,this._incomingMessageBus&&this._incomingMessageBus.addEventListener("message",this._handleMessage.bind(this))}setOutgoingMessageBus(e){this._outgoingMessageBus=e}setMessageExecution(e){this._execMessage=e}sendMessage(e,t=[]){return new Promise((s,n)=>{if(this._incomingMessageBus===this._outgoingMessageBus)return s(void 0);const i=new MessageChannel;i.port1.onmessage=a=>{if(!a||!a.data)return i.port1.close(),i.port2.close(),n(new Error(this._side+" received message but response can not be interpreted"));let l;try{l=JSON.parse(a.data)}catch(d){return i.port1.close(),i.port2.close(),this._prepareError(d),n(d)}l.error?n(l.error):l.result!==void 0?s(l.result):s(void 0),i.port1.close(),i.port2.close()};let o="";try{o=JSON.stringify({message:e,args:t})}catch{return n(new Error(this._side+": can not create command because it is not JSON.stringify able"))}if(!this._outgoingMessageBus)return n(new Error(this._side+": outgoing bus not set yet"));this._outgoingMessageBus.postMessage(o,"*",[i.port2])})}_handleMessage(e){const t=e.ports&&Array.isArray(e.ports)&&e.ports.length>0?e.ports[0]:null;if(e.data&&t)try{const s=JSON.parse(e.data);if(!this._execMessage)return t.postMessage(JSON.stringify({error:this._side+" is not ready to handle messages"}));Array.isArray(s.args)||(s.args=[s.args]);const n=this._execMessage(s,e);if(n===void 0)return;n.then((i={})=>{let o,a;typeof i=="object"&&i!==null&&(o=i.error,a=i.result),o?t.postMessage(JSON.stringify({error:o})):a!==void 0?t.postMessage(JSON.stringify({result:a})):t.postMessage(JSON.stringify({result:i}))},i=>{t.postMessage(JSON.stringify({error:this._prepareError(i)}))})}catch(s){t.postMessage(JSON.stringify({error:this._prepareError(s)}))}}_prepareError(e){if(typeof e=="string"){const t=this._side+": "+e;return console.error(t),t}return e.message=this._side+": "+e.message,console.error(e),e.message}}const p=".",E={REQUEST_BOOT:"requestBoot",SETUP:"setup",WEBSITE_READY:"websiteReady"},w={GET_METHODS:"getMethods",RETURN_METHODS:"returnMethods",REGISTER_CUSTOM_VIEW:"registerCustomView",REGISTER_CUSTOM_VIEW_DONE:"registerCustomViewDone"},pt=async(r,e)=>{if(typeof r!="string")throw new Error('Configurator ID is not a string type: "'+typeof r+'"');const t=e.customApiUrl?e.customApiUrl:"https://api.roomle.com/v2",s=e.overrideTenant||9,n=t+"/configurators/"+r,i="roomle_portal_v2",o="03-"+window.btoa(new Date().toISOString()+";anonymous;"+i),a=()=>{const u={apiKey:i,currentTenant:s,locale:"en",language:"en",device:1,token:o,platform:"web"};return new Headers(u)},l=new Request(n,{method:"GET",headers:a(),mode:"cors",cache:"default"}),d=await fetch(l),{configurator:h}=await d.json();return h},yt=()=>{try{return window.self!==window.top}catch{return!0}},Et=["127.0.0.1","localhost","0.0.0.0"],Dt=()=>{const r=yt();let e=window.location.href;if(r){if(!document.referrer)return null;e=document.referrer}const{hostname:t}=new URL(e);return t},Tt=r=>!!(Et.includes(r)||r.endsWith("roomle.com")||r.endsWith("gitlab.io")||r.endsWith("gitlab.com")),k=["language","browserLanguage","userLanguage","systemLanguage"],St=(r=null)=>{const e=window.navigator;if(r)return r.substr(0,2);if(Array.isArray(e.languages)&&e.languages.length>0)return e.languages[0].substr(0,2);for(let t=0,s=k.length;t<s;t++){const n=e[k[t]];if(n)return n.substr(0,2)}return"en"},It=(r,e)=>{const t=JSON.parse(JSON.stringify(r));return C(t,e)},C=(r,e)=>{for(const t in e)try{e[t].constructor===Object?r[t]=C(r[t],e[t]):r[t]=e[t]}catch{r[t]=e[t]}return r};var V=(r=>(r.BOTTOM_BAR="bottom_bar",r.PARTLIST_BOUNDS="partlist_bounds",r.INTERACTION_NOTES="interaction_notes",r))(V||{}),wt={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const At={mobileLandscape:!0,floorMaterialRootTag:"materials_root",buttons:{renderimage:!0,requestproduct:!0,requestplan:!0,load_product:!0,partlist_print:!0},elements:{[V.INTERACTION_NOTES]:!0},helpcenter:{roomdesigner:!0,configurator:!1,disable:!1},firstPersonView:!0,saveToIdb:!0,featureFlags:{mocAr:!0,wallAutoHeight:!1,openCloseAnimation:!1,showWallVisibilityToggle:!1},rotationSnapDegrees:10,interactionsCollapsed:!1},bt="(idle)",Ot=r=>(L(r),r!=null&&r.customApiUrl&&(r.customApiUrl=decodeURIComponent(r.customApiUrl)),r.shareUrl&&(r.deeplink=r.shareUrl.replace(Mt,Ct)),r),L=r=>{if(!r)return;const e=Object.keys(r);for(const t of e){const s=r[t];if(!Array.isArray(s)&&typeof s=="object"&&s!==null&&L(s),Array.isArray(s))for(const n of s)L(n);(s==="true"||s==="false")&&(r[t]=s==="true")}},vt=(r,e)=>{e.configuratorId=r.id;const t=r.settings||{};return!e.overrideTenant&&r.tenant&&(e.overrideTenant=r.tenant),It(t,e)},Rt=()=>{const r={...At};r.locale||(r.locale=St()),r.id===bt&&delete r.id;const e=Dt();return e&&Tt(e)&&(r.configuratorId="demoConfigurator"),r.customApiUrl=wt.VITE_RAPI_URL,r.emails=!1,r},Mt="<CONF_ID>",Ct="#CONFIGURATIONID#",Lt=r=>{r.featureFlags||(r.featureFlags={}),typeof r.featureFlags.realPartList!="boolean"&&(r.featureFlags.realPartList=!0),typeof r.featureFlags.globalCallbacks!="boolean"&&(r.featureFlags.globalCallbacks=!0),typeof r.featureFlags.mocAr!="boolean"&&(r.featureFlags.mocAr=!1)},z=()=>/(android)/i.test(navigator.userAgent);class q{constructor(){c(this,"_messageHandler",null);c(this,"isSetupDone",!1);c(this,"viewName","main");c(this,"plugins",{});c(this,"pluginsLoaded",[]);c(this,"ui",{callbacks:null});c(this,"extended",{callbacks:null});c(this,"configurator",{callbacks:null});c(this,"analytics",{callbacks:{}});c(this,"global",{callbacks:{}})}setMessageHandler(e){this._messageHandler=e}handleSetup(e){const{methods:t,callbacks:s}=e;t.forEach(n=>{const i=n.split(p),o=i[0],a=i[1];this[o]||(this[o]={}),this[o][a]=(function(){if(!this._messageHandler){console.error("MessageHandler not set");return}return this._messageHandler.sendMessage(n,[...arguments])}).bind(this)}),s.forEach(n=>{const i=n.split(p),o=i[0],a=i[1],l=i[2];this[o]||(this[o]={}),this[o][a]||(this[o][a]={}),this[o][a][l]=()=>{}}),this.isSetupDone=!0}executeMessage({message:e,args:t}){const s=e.split(p),n=s[0],i=s[1],o=s.length===3?s[2]:null;if(o&&this[n][i][o]){const a=this[n][i][o](...t);return a instanceof Promise?a.then(l=>({result:l})):a!==void 0?Promise.resolve({result:a}):Promise.resolve({result:null})}return Promise.reject('Message "'+e+'" is unkown')}setupPlugins(e,t,s="website"){for(const n of e)typeof n=="string"&&n==="dragIn"?this.pluginsLoaded.push(new Promise((i,o)=>{try{Promise.resolve().then(()=>Pt).then(({DragIn:a})=>{const l=new a(this.ui,t,s,this.viewName);l.init().then(()=>{this.plugins.dragIn=l,i()},o)})}catch(a){o(a)}})):n.name&&n.loader&&this.pluginsLoaded.push(new Promise((i,o)=>{try{n.loader().then(a=>{const l=new a(this.ui,t,s,this.viewName);l.init().then(()=>{this.plugins[n.name]=l,i()},o)})}catch(a){o(a)}}))}}const K=()=>{let r,e;return{promise:new Promise((s,n)=>{r=s,e=n}),resolve:r,reject:e}},J=(r,e,t)=>{let s=null;Object.defineProperty(r,e,{get(){return s||t},set(n){n!=null&&n.mute?s=n.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 }"),s=n)}})},j=()=>window.innerHeight*.01+"px",Q=r=>{r&&setTimeout(()=>r.style.setProperty(N,j()),0)},Z="rml-styles",Nt=450,N="--rml-full-height",m={CONTAINER:"rml-container",FILL:"rml-fill",POSITION:"rml-pos",TRANSITION:"rml-transition",ANDROID_HEIGHT:"rml-android-height",OVERFLOW_HIDDEN:"rml-overflow-hidden"},x=new Map;class xt extends q{constructor(t,s,n,i,o){super();c(this,"_waitForIframe");c(this,"_container");c(this,"_configuratorSettings");c(this,"_initData",{});c(this,"_iframe");if(!t||typeof t.id!="string")throw new Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");if(x.has(s))throw new Error("There is already an instance on this DOM element");if(!!!document.getElementById(Z)){const h=n.zIndex||9999999,u=document.createElement("style");u.type="text/css",u.id=Z;const g="transition:all ease-in-out "+Nt+"ms;",f=["-webkit-","-o-"].reduce((D,y)=>D+=y+g,"")+g,S=j();u.innerHTML=`
2
2
  .${m.CONTAINER}{${N}:${S};}
3
3
  .${m.POSITION}{position:fixed;top:0;left:0;z-index:${h};opacity:0}
4
4
  .${m.TRANSITION}{${f}}
5
5
  .${m.FILL}{width:100%;height:100%;opacity:1}
6
6
  .${m.ANDROID_HEIGHT}{height:calc(var(${N},1vh)*100)}
7
7
  .${m.OVERFLOW_HIDDEN}{overflow:hidden}
8
- `,document.head.appendChild(u)}this._executeMessage=this._executeMessage.bind(this);const l=new _("website",window,null,this._executeMessage);this.setMessageHandler(l),this._onResize=this._onResize.bind(this),V()&&window.addEventListener("resize",this._onResize),this._container=s,this._initData=n,this._configuratorSettings=t;const d=this._createIframe();this._onUseFullPage=this._onUseFullPage.bind(this),this._onBackToWebsite=this._onBackToWebsite.bind(this),this._waitForIframe=o,this._container.appendChild(d),this._iframe=d,this.setupPlugins(i,this._iframe),x.set(s,!0)}static createPlanner(t,s,n,i=[]){return this._create(t,s,n,i)}static async connect(t,s=[]){const n=new q;n.viewName=t;const{resolve:i,promise:o}=K(),{resolve:a,promise:l}=K(),d=({message:g,args:f})=>{switch(g){case w.REGISTER_CUSTOM_VIEW_DONE:i();break;case w.RETURN_METHODS:n.handleSetup(f[0]),a();break;default:if(n.isSetupDone)return n.executeMessage({message:g,args:f})}},h=new _("custom-view-"+t,window,window.parent,d);n.setMessageHandler(h);const u=[t];return h.sendMessage(w.REGISTER_CUSTOM_VIEW,u),await o,h.sendMessage(w.GET_METHODS,u),await l,n.setupPlugins(s,document.body,"custom-view"),await Promise.allSettled(n.pluginsLoaded),n}static createConfigurator(t,s,n,i=[]){return this._create(t,s,n,i)}static create(t,s,n,i){return this._create(t,s,n,i)}static createViewer(t,s,n,i=[]){return this._create(t,s,n,i)}static async _create(t,s,n,i){return new Promise(async(o,a)=>{try{const l=C(Rt(),Ot(n));Lt(l);const d=await pt(t,l);n=vt(d,l);const h=new this(d,s,n,i,o);return await Promise.allSettled(h.pluginsLoaded),h}catch(l){return a(l)}})}teardown(){this._container&&x.delete(this._container);const t=this._container.querySelector("iframe");t&&this._container.removeChild(t),window.removeEventListener("resize",this._onResize)}_createIframe(){var n;const t=document.createElement("iframe");let s=((n=this._configuratorSettings)==null?void 0:n.url)||"https://www.roomle.com/t/cp/";return this._initData.useLocalRoomle&&(s=location.href.replace("embedding.html","")),location.href.includes("roomle.gitlab.io")&&(s=location.href.replace("embedding.html","index.html")),this._initData.overrideServerUrl&&(s=this._initData.overrideServerUrl),t.src=s,t.classList.add(m.CONTAINER),t.classList.add(m.FILL),t}_onResize(){Q(this._iframe)}_onUseFullPage(){this._iframe.classList.add(m.POSITION),document.documentElement.classList.add(m.OVERFLOW_HIDDEN),window.document.body.classList.add(m.OVERFLOW_HIDDEN),V()&&(Q(this._iframe),this._iframe.classList.add(m.ANDROID_HEIGHT))}_onBackToWebsite(){this._iframe.classList.remove(m.POSITION),this._iframe.classList.remove(m.ANDROID_HEIGHT),document.documentElement.classList.remove(m.OVERFLOW_HIDDEN),window.document.body.classList.remove(m.OVERFLOW_HIDDEN)}_executeMessage({message:t,args:s},n){var i;if(n.source&&n.source===((i=this._iframe)==null?void 0:i.contentWindow))return t===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"})):t===E.SETUP?(this.handleSetup(s[0]),J(this.ui.callbacks,"onUseFullPage",this._onUseFullPage),J(this.ui.callbacks,"onBackToWebsite",this._onBackToWebsite),this._waitForIframe(this),setTimeout(()=>{if(!this._messageHandler){console.error("MessageHandler not set");return}this._messageHandler.sendMessage(E.WEBSITE_READY)},0),Promise.resolve({result:null})):this.executeMessage({message:t,args:s})}}class Gt{constructor(e,t,s,n){c(this,"_mainDomElement");c(this,"_instance");c(this,"_mode","website");c(this,"_viewName","main");this._instance=e,this._mainDomElement=t,this._mode=s,this._viewName=n}async init(){return Promise.resolve()}}const A="rml-drag-in-styles",b="rml-drag-in-drag-element",O="rml-drag-in-overlay",v="rml-drag-in-drag-ghost",tt="rml-drag-in-fade-in",et="rml-drag-in-fade-out",G={DISPLAY_NONE:"rml-display-none"},st=.5,rt="250ms",nt="forwards",it=`@keyframes ${tt} {from{opacity: 0;}to {opacity: ${st};}}`,ot=`@keyframes ${et} {from{opacity: ${st};}to {opacity: 0;}}`,at=`${tt} ${rt} ${nt}`,ct=`${et} ${rt} ${nt}`,R="https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",F=112,P=112;class Ft extends Gt{constructor(t,s,n,i){super(t,s,n,i);c(this,"options",{});c(this,"_customDragSignal",new AbortController);this._mainDomElement=s,this._injectStyles(),this._initializeDragGhost()}_injectStyles(){if(!!!document.getElementById(A)){const s=document.createElement("style");s.type="text/css",s.id=A,s.innerHTML=`
8
+ `,document.head.appendChild(u)}this._executeMessage=this._executeMessage.bind(this);const l=new _("website",window,null,this._executeMessage);this.setMessageHandler(l),this._onResize=this._onResize.bind(this),z()&&window.addEventListener("resize",this._onResize),this._container=s,this._initData=n,this._configuratorSettings=t;const d=this._createIframe();this._onUseFullPage=this._onUseFullPage.bind(this),this._onBackToWebsite=this._onBackToWebsite.bind(this),this._waitForIframe=o,this._container.appendChild(d),this._iframe=d,this.setupPlugins(i,this._iframe),x.set(s,!0)}static createPlanner(t,s,n,i=[]){return this._create(t,s,n,i)}static async connect(t,s=[]){const n=new q;n.viewName=t;const{resolve:i,promise:o}=K(),{resolve:a,promise:l}=K(),d=({message:g,args:f})=>{switch(g){case w.REGISTER_CUSTOM_VIEW_DONE:i();break;case w.RETURN_METHODS:n.handleSetup(f[0]),a();break;default:if(n.isSetupDone)return n.executeMessage({message:g,args:f})}},h=new _("custom-view-"+t,window,window.parent,d);n.setMessageHandler(h);const u=[t];return h.sendMessage(w.REGISTER_CUSTOM_VIEW,u),await o,h.sendMessage(w.GET_METHODS,u),await l,n.setupPlugins(s,document.body,"custom-view"),await Promise.allSettled(n.pluginsLoaded),n}static createConfigurator(t,s,n,i=[]){return this._create(t,s,n,i)}static create(t,s,n,i){return this._create(t,s,n,i)}static createViewer(t,s,n,i=[]){return this._create(t,s,n,i)}static async _create(t,s,n,i){return new Promise(async(o,a)=>{try{const l=C(Rt(),Ot(n));Lt(l);const d=await pt(t,l);n=vt(d,l);const h=new this(d,s,n,i,o);return await Promise.allSettled(h.pluginsLoaded),h}catch(l){return a(l)}})}teardown(){this._container&&x.delete(this._container);const t=this._container.querySelector("iframe");t&&this._container.removeChild(t),window.removeEventListener("resize",this._onResize)}_createIframe(){var n;const t=document.createElement("iframe");let s=((n=this._configuratorSettings)==null?void 0:n.url)||"https://www.roomle.com/t/cp/";return this._initData.useLocalRoomle&&(s=location.href.replace("embedding.html","")),location.href.includes("roomle.gitlab.io")&&(s=location.href.replace("embedding.html","index.html")),this._initData.overrideServerUrl&&(s=this._initData.overrideServerUrl),t.src=s,t.classList.add(m.CONTAINER),t.classList.add(m.FILL),t}_onResize(){Q(this._iframe)}_onUseFullPage(){this._iframe.classList.add(m.POSITION),document.documentElement.classList.add(m.OVERFLOW_HIDDEN),window.document.body.classList.add(m.OVERFLOW_HIDDEN),z()&&(Q(this._iframe),this._iframe.classList.add(m.ANDROID_HEIGHT))}_onBackToWebsite(){this._iframe.classList.remove(m.POSITION),this._iframe.classList.remove(m.ANDROID_HEIGHT),document.documentElement.classList.remove(m.OVERFLOW_HIDDEN),window.document.body.classList.remove(m.OVERFLOW_HIDDEN)}_executeMessage({message:t,args:s},n){var i;if(n.source&&n.source===((i=this._iframe)==null?void 0:i.contentWindow))return t===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"})):t===E.SETUP?(this.handleSetup(s[0]),J(this.ui.callbacks,"onUseFullPage",this._onUseFullPage),J(this.ui.callbacks,"onBackToWebsite",this._onBackToWebsite),this._waitForIframe(this),setTimeout(()=>{if(!this._messageHandler){console.error("MessageHandler not set");return}this._messageHandler.sendMessage(E.WEBSITE_READY)},0),Promise.resolve({result:null})):this.executeMessage({message:t,args:s})}}class Gt{constructor(e,t,s,n){c(this,"_mainDomElement");c(this,"_instance");c(this,"_mode","website");c(this,"_viewName","main");this._instance=e,this._mainDomElement=t,this._mode=s,this._viewName=n}async init(){return Promise.resolve()}}const A="rml-drag-in-styles",b="rml-drag-in-drag-element",O="rml-drag-in-overlay",v="rml-drag-in-drag-ghost",tt="rml-drag-in-fade-in",et="rml-drag-in-fade-out",G={DISPLAY_NONE:"rml-display-none"},st=.5,rt="250ms",nt="forwards",it=`@keyframes ${tt} {from{opacity: 0;}to {opacity: ${st};}}`,ot=`@keyframes ${et} {from{opacity: ${st};}to {opacity: 0;}}`,at=`${tt} ${rt} ${nt}`,ct=`${et} ${rt} ${nt}`,R="https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",F=112,P=112;class Ft extends Gt{constructor(t,s,n,i){super(t,s,n,i);c(this,"options",{});c(this,"_customDragSignal",new AbortController);this._mainDomElement=s,this._injectStyles(),this._initializeDragGhost()}_injectStyles(){if(!!!document.getElementById(A)){const s=document.createElement("style");s.type="text/css",s.id=A,s.innerHTML=`
9
9
  .${G.DISPLAY_NONE}{display:none}
10
10
  .${O}{position:absolute;top:0;left:0;width:100%;height:100%;z-index:999;}
11
11
  .${v}{position:absolute;top:0;left:0;width:1px;height:1px;z-index:999;pointer-events:none;background-color:transparent;}
12
12
  ${it}
13
13
  ${ot}
14
- `,document.head.appendChild(s)}}_initializeDragGhost(){const t=this._mainDomElement.parentNode;let s=t.querySelector("."+v);s||(s=document.createElement("div"),s.classList.add(v),s.innerText=" ",t.appendChild(s))}async init(){if(await super.init(),this._mode==="website")try{const{DragInFromWebsiteStrategy:t}=await Promise.resolve().then(()=>zt);this._strategy=new t(this._instance,this._mainDomElement,{settings:this.options,mode:"website"})}catch(t){throw console.error('Could not load Dragin strategy "FromWebsite"'),t}else if(this._mode==="custom-view")try{const{DragInFromCustomViewStrategy:t}=await Promise.resolve().then(()=>Zt);this._strategy=new t(this._instance,this.options,this._viewName)}catch(t){throw console.error('Could not load Dragin strategy "FromCustomView"'),t}else throw new Error("Unsupported mode")}get isDragging(){return this._strategy.isDragging}dragStart(t,s,n="rml_id"){this._strategy.dragStart(t,s,n)}dragUpdate(t){this._strategy.dragUpdate(t)}dragEnd(){this._strategy.dragEnd()}touchStart(t,s,n="rml_id"){this._strategy.touchStart(t,s,n)}touchMove(t){this._strategy.touchMove(t)}touchEnd(){this._strategy.touchEnd()}dispose(){this._strategy.dispose()}beforeUpdateGhost(t){this._strategy.beforeUpdateGhost(t)}registerCustomDrag({customDragStart:t,customDragEnd:s,customDragUpdate:n,beforeUpdateGhost:i}){i&&this._strategy.beforeUpdateGhost(i);const o=this._customDragSignal.signal,a=h=>{h.target.getAttribute("data-rml-draggable")==="true"&&t(h)},l=h=>{this._strategy.releaseInput(h),this._strategy.isDragging&&s(h)},d=h=>{n(h)};document.querySelectorAll('[data-rml-draggable="true"]').forEach(h=>{h.draggable=!1}),document.addEventListener("mousedown",a,{signal:o}),document.addEventListener("mouseup",l,{signal:o}),document.addEventListener("mousemove",d,{signal:o}),document.addEventListener("mouseleave",l,{signal:o}),document.addEventListener("touchstart",a,{signal:o}),document.addEventListener("touchend",l,{signal:o}),document.addEventListener("touchmove",d,{signal:o})}unregisterCustomDrag(){this._customDragSignal.abort(),this._customDragSignal=new AbortController}releaseInput(t){this._strategy.releaseInput(t)}}const Pt=Object.freeze(Object.defineProperty({__proto__:null,DragIn:Ft},Symbol.toStringTag,{value:"Module"}));class Ht{constructor(e=16){c(this,"_computedStyleCache",new Map);c(this,"_maxLifetime",16);c(this,"_cacheCleanInterval",null);this._maxLifetime=e}get(e){const t=this._computedStyleCache.get(e),s=Date.now();if(t&&s-t.updated<this._maxLifetime)return t.style;const n=getComputedStyle(e);return this._computedStyleCache.set(e,{style:n,updated:s}),this._cacheCleanInterval||(this._cacheCleanInterval=setInterval(()=>this._cleanUpCache,Math.max(this._maxLifetime*1e3,5e3))),n}_cleanUpCache(){const e=Date.now();for(const[t,{updated:s}]of this._computedStyleCache.entries())e-s>=this._maxLifetime&&this._computedStyleCache.delete(t);this._computedStyleCache.size===0&&this._cacheCleanInterval&&(clearInterval(this._cacheCleanInterval),this._cacheCleanInterval=null)}}const T=r=>window.TouchEvent&&r instanceof window.TouchEvent;let H;const M=r=>(H||(H=new Ht),H.get(r)),lt=(r,e,t)=>{const s=parseFloat(r),n=window.devicePixelRatio||1;if(e==="px")return s;if(e==="%"){const o=t===document.documentElement?window.innerWidth:t.offsetWidth;return s/100*o}if(e==="rem"){const o=parseFloat(M(document.documentElement).fontSize);return s*o}if(e==="em"){const o=parseFloat(M(t).fontSize);return s*o}if(e==="vh"||e==="vw"||e==="vmin"||e==="vmax"){const o={vh:window.innerHeight,vw:window.innerWidth,vmin:Math.min(window.innerWidth,window.innerHeight),vmax:Math.max(window.innerWidth,window.innerHeight)};return s/100*o[e]}const i={cm:37.7952755906,mm:3.77952755906,in:96};return e in i?s*i[e]*n:(console.warn("Unable to determine coordinates for drag-in. Therefore drag-in is not possible. Check the CSS that positions the iframe of Roomle"),0)},ht=(r,e,t={x:0,y:0})=>{const s=r.getBoundingClientRect(),i=M(r).transform;let o=0,a=0;if(i!=="none"){const g=/translate\(\s*([-+]?\d*\.?\d+|\d+)(px|%)?,?\s*([-+]?\d*\.?\d+|\d+)?(px|%)?\s*\)/,f=i.match(g);f&&(o=lt(f[1],f[2],r),a=lt(f[3],f[4],r))}const{clientX:l,clientY:d}=I(e,t),h=l-s.left-o+r.scrollLeft,u=d-s.top-a+r.scrollTop;return{x:h,y:u}},I=(r,e=null)=>{const{clientX:t,clientY:s}=T(r)?Ut(r):r,n=t>0?t:e?e.x:t,i=s>0?s:e?e.y:s;return{clientX:n,clientY:i}},Ut=r=>{if(r.touches.length){let{clientX:t,clientY:s}=r.touches[0];if(r.touches.length>1){const n=r.touches[1],i=n.clientX,o=n.clientY;t=(t+i)/2,s=(s+o)/2}return{clientX:t,clientY:s}}const e=r.changedTouches[0];return{clientX:e.clientX,clientY:e.clientY}},U=500,B=10,Bt=100,dt=15,Y=(r,e=0)=>T(r)?{clientX:r.touches[e].clientX,clientY:r.touches[e].clientY}:{clientX:r.clientX,clientY:r.clientY},ut=r=>r&&T(r)?r.touches.length>0:!0;class gt{constructor(e,{onTouchDragStart:t},s={}){c(this,"_touchDragTimeOut");c(this,"_onTouchDragStart");c(this,"_payload",null);c(this,"_delay",U);c(this,"_firstTouch",null);c(this,"_lastTouch",null);c(this,"_epsilon",B);this._payload=e,this._onTouchDragStart=t,this._delay=typeof s.delay=="number"?s.delay:U,this._epsilon=typeof s.epsilon=="number"?s.epsilon:B}onStart(e){ut(e)&&(this._touchDragTimeOut||(this._firstTouch=Y(e,T(e)?e.touches.length-1:0),this._touchDragTimeOut=setTimeout(()=>{this._clearTimeout(),this._lastTouch||(this._lastTouch=Y(e)),this._checkXDistance(e)()},this._delay)))}onEnd(){this._resetTouches()}onMove(e){ut(e)&&(this._lastTouch=Y(e))}_clearTimeout(){this._touchDragTimeOut&&(clearTimeout(this._touchDragTimeOut),this._touchDragTimeOut=null)}_resetTouches(){this._clearTimeout(),this._lastTouch=null,this._firstTouch=null,this._payload=null}_checkXDistance(e){return()=>{if(!this._firstTouch||!this._lastTouch)return;let t=!1;t=Math.abs(this._firstTouch.clientX-this._lastTouch.clientX)<this._epsilon,t&&(this._onTouchDragStart(this._payload,e),this._resetTouches())}}}const _t=(r,e,t=0,s=0)=>{const n=e.x+e.width+t,i=e.x-t,o=e.y+e.height+s,a=e.y-s,{x:l,y:d}=r;return l>=i&&l<=n&&d>=a&&d<=o},mt=(r,e,t,s=0,n=0)=>{if(!(!t||!t.hiddenIn&&!t.visibleIn))return t.visibleIn?_t({x:r,y:e},t.visibleIn,s,n):t.hiddenIn?!_t({x:r,y:e},t.hiddenIn,-s,-n):!1},Yt=()=>{if(!!!document.getElementById(A)){const e=document.createElement("style");e.type="text/css",e.id=A,e.innerHTML=`
14
+ `,document.head.appendChild(s)}}_initializeDragGhost(){const t=this._mainDomElement.parentNode;let s=t.querySelector("."+v);s||(s=document.createElement("div"),s.classList.add(v),s.innerText=" ",t.appendChild(s))}async init(){if(await super.init(),this._mode==="website")try{const{DragInFromWebsiteStrategy:t}=await Promise.resolve().then(()=>Vt);this._strategy=new t(this._instance,this._mainDomElement,{settings:this.options,mode:"website"})}catch(t){throw console.error('Could not load Dragin strategy "FromWebsite"'),t}else if(this._mode==="custom-view")try{const{DragInFromCustomViewStrategy:t}=await Promise.resolve().then(()=>Zt);this._strategy=new t(this._instance,this.options,this._viewName)}catch(t){throw console.error('Could not load Dragin strategy "FromCustomView"'),t}else throw new Error("Unsupported mode")}get isDragging(){return this._strategy.isDragging}dragStart(t,s,n="rml_id"){this._strategy.dragStart(t,s,n)}dragUpdate(t){this._strategy.dragUpdate(t)}dragEnd(){this._strategy.dragEnd()}touchStart(t,s,n="rml_id"){this._strategy.touchStart(t,s,n)}touchMove(t){this._strategy.touchMove(t)}touchEnd(){this._strategy.touchEnd()}dispose(){this._strategy.dispose()}beforeUpdateGhost(t){this._strategy.beforeUpdateGhost(t)}registerCustomDrag({customDragStart:t,customDragEnd:s,customDragUpdate:n,beforeUpdateGhost:i}){i&&this._strategy.beforeUpdateGhost(i);const o=this._customDragSignal.signal,a=h=>{h.target.getAttribute("data-rml-draggable")==="true"&&t(h)},l=h=>{this._strategy.releaseInput(h),this._strategy.isDragging&&s(h)},d=h=>{n(h)};document.querySelectorAll('[data-rml-draggable="true"]').forEach(h=>{h.draggable=!1}),document.addEventListener("mousedown",a,{signal:o}),document.addEventListener("mouseup",l,{signal:o}),document.addEventListener("mousemove",d,{signal:o}),document.addEventListener("mouseleave",l,{signal:o}),document.addEventListener("touchstart",a,{signal:o}),document.addEventListener("touchend",l,{signal:o}),document.addEventListener("touchmove",d,{signal:o})}unregisterCustomDrag(){this._customDragSignal.abort(),this._customDragSignal=new AbortController}releaseInput(t){this._strategy.releaseInput(t)}}const Pt=Object.freeze(Object.defineProperty({__proto__:null,DragIn:Ft},Symbol.toStringTag,{value:"Module"}));class Ht{constructor(e=16){c(this,"_computedStyleCache",new Map);c(this,"_maxLifetime",16);c(this,"_cacheCleanInterval",null);this._maxLifetime=e}get(e){const t=this._computedStyleCache.get(e),s=Date.now();if(t&&s-t.updated<this._maxLifetime)return t.style;const n=getComputedStyle(e);return this._computedStyleCache.set(e,{style:n,updated:s}),this._cacheCleanInterval||(this._cacheCleanInterval=setInterval(()=>this._cleanUpCache,Math.max(this._maxLifetime*1e3,5e3))),n}_cleanUpCache(){const e=Date.now();for(const[t,{updated:s}]of this._computedStyleCache.entries())e-s>=this._maxLifetime&&this._computedStyleCache.delete(t);this._computedStyleCache.size===0&&this._cacheCleanInterval&&(clearInterval(this._cacheCleanInterval),this._cacheCleanInterval=null)}}const T=r=>window.TouchEvent&&r instanceof window.TouchEvent;let H;const M=r=>(H||(H=new Ht),H.get(r)),lt=(r,e,t)=>{const s=parseFloat(r),n=window.devicePixelRatio||1;if(e==="px")return s;if(e==="%"){const o=t===document.documentElement?window.innerWidth:t.offsetWidth;return s/100*o}if(e==="rem"){const o=parseFloat(M(document.documentElement).fontSize);return s*o}if(e==="em"){const o=parseFloat(M(t).fontSize);return s*o}if(e==="vh"||e==="vw"||e==="vmin"||e==="vmax"){const o={vh:window.innerHeight,vw:window.innerWidth,vmin:Math.min(window.innerWidth,window.innerHeight),vmax:Math.max(window.innerWidth,window.innerHeight)};return s/100*o[e]}const i={cm:37.7952755906,mm:3.77952755906,in:96};return e in i?s*i[e]*n:(console.warn("Unable to determine coordinates for drag-in. Therefore drag-in is not possible. Check the CSS that positions the iframe of Roomle"),0)},ht=(r,e,t={x:0,y:0})=>{const s=r.getBoundingClientRect(),i=M(r).transform;let o=0,a=0;if(i!=="none"){const g=/translate\(\s*([-+]?\d*\.?\d+|\d+)(px|%)?,?\s*([-+]?\d*\.?\d+|\d+)?(px|%)?\s*\)/,f=i.match(g);f&&(o=lt(f[1],f[2],r),a=lt(f[3],f[4],r))}const{clientX:l,clientY:d}=I(e,t),h=l-s.left-o+r.scrollLeft,u=d-s.top-a+r.scrollTop;return{x:h,y:u}},I=(r,e=null)=>{const{clientX:t,clientY:s}=T(r)?Ut(r):r,n=t>0?t:e?e.x:t,i=s>0?s:e?e.y:s;return{clientX:n,clientY:i}},Ut=r=>{if(r.touches.length){let{clientX:t,clientY:s}=r.touches[0];if(r.touches.length>1){const n=r.touches[1],i=n.clientX,o=n.clientY;t=(t+i)/2,s=(s+o)/2}return{clientX:t,clientY:s}}const e=r.changedTouches[0];return{clientX:e.clientX,clientY:e.clientY}},U=500,B=10,Bt=100,dt=15,Y=(r,e=0)=>T(r)?{clientX:r.touches[e].clientX,clientY:r.touches[e].clientY}:{clientX:r.clientX,clientY:r.clientY},ut=r=>r&&T(r)?r.touches.length>0:!0;class gt{constructor(e,{onTouchDragStart:t},s={}){c(this,"_touchDragTimeOut");c(this,"_onTouchDragStart");c(this,"_payload",null);c(this,"_delay",U);c(this,"_firstTouch",null);c(this,"_lastTouch",null);c(this,"_epsilon",B);this._payload=e,this._onTouchDragStart=t,this._delay=typeof s.delay=="number"?s.delay:U,this._epsilon=typeof s.epsilon=="number"?s.epsilon:B}onStart(e){ut(e)&&(this._touchDragTimeOut||(this._firstTouch=Y(e,T(e)?e.touches.length-1:0),this._touchDragTimeOut=setTimeout(()=>{this._clearTimeout(),this._lastTouch||(this._lastTouch=Y(e)),this._checkXDistance(e)()},this._delay)))}onEnd(){this._resetTouches()}onMove(e){ut(e)&&(this._lastTouch=Y(e))}_clearTimeout(){this._touchDragTimeOut&&(clearTimeout(this._touchDragTimeOut),this._touchDragTimeOut=null)}_resetTouches(){this._clearTimeout(),this._lastTouch=null,this._firstTouch=null,this._payload=null}_checkXDistance(e){return()=>{if(!this._firstTouch||!this._lastTouch)return;let t=!1;t=Math.abs(this._firstTouch.clientX-this._lastTouch.clientX)<this._epsilon,t&&(this._onTouchDragStart(this._payload,e),this._resetTouches())}}}const _t=(r,e,t=0,s=0)=>{const n=e.x+e.width+t,i=e.x-t,o=e.y+e.height+s,a=e.y-s,{x:l,y:d}=r;return l>=i&&l<=n&&d>=a&&d<=o},mt=(r,e,t,s=0,n=0)=>{if(!(!t||!t.hiddenIn&&!t.visibleIn))return t.visibleIn?_t({x:r,y:e},t.visibleIn,s,n):t.hiddenIn?!_t({x:r,y:e},t.hiddenIn,-s,-n):!1},Yt=()=>{if(!!!document.getElementById(A)){const e=document.createElement("style");e.type="text/css",e.id=A,e.innerHTML=`
15
15
  ${it}
16
16
  ${ot}
17
- `,document.head.appendChild(e)}},Xt=({x:r,y:e},t)=>{var n,i,o,a,l,d;let s=document.getElementById(b);if(!s){if(s=document.createElement("div"),(n=t.ghost)!=null&&n.element)s.appendChild(t.ghost.element);else{const h=document.createElement("img");h.src=((i=t.ghost)==null?void 0:i.url)||R,h.width=((o=t.ghost)==null?void 0:o.width)||F,h.height=((a=t.ghost)==null?void 0:a.height)||P,s.appendChild(h)}s.id=b,s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.willChange="transform",s.style.transform="translate3d(0, 0, 0)",s.style.zIndex="9999",s.style.opacity="0.5",mt(r,e,t.ghost||{},(l=t.settings)==null?void 0:l.dragInOverlapX,(d=t.settings)==null?void 0:d.dragInOverlapY)||(s.style.display="none"),s.style.pointerEvents="none",document.body.appendChild(s)}},Wt=({x:r,y:e},t)=>{var l,d,h,u;const s=document.getElementById(b);if(!s)return;let n=(l=t.ghost)==null?void 0:l.width,i=(d=t.ghost)==null?void 0:d.height;typeof n>"u"&&(n=s.getBoundingClientRect().width||F),typeof i>"u"&&(i=s.getBoundingClientRect().height||P);const o=r-n/2,a=e-i/2;s.style.transform=`translate3d(${o}px, ${a}px, 0)`,t.ghost&&(mt(r,e,t.ghost,(h=t.settings)==null?void 0:h.dragInOverlapX,(u=t.settings)==null?void 0:u.dragInOverlapY)?s.style.animation!=at&&(s.style.animation=at):s.style.animation!=ct&&(s.style.animation=ct))};class $t{constructor(e=null){c(this,"_dragGhostAnimationFrameId",null);c(this,"_dragGhostRemoveAnimationFrameId",null);c(this,"_dragGhostElement",null);this._dragGhostElement=e}updateDragGhost(e,t,s){var n;this._dragGhostRemoveAnimationFrameId&&(cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId),this._dragGhostRemoveAnimationFrameId=null),!((n=s.ghost)!=null&&n.external)&&s.ghost&&(this._dragGhostAnimationFrameId||(this._dragGhostAnimationFrameId=requestAnimationFrame(()=>{Yt();const i={x:e,y:t};!s.ghost&&this._dragGhostElement&&(s.ghost={}),s.ghost&&!s.ghost.element&&this._dragGhostElement&&(s.ghost.element=this._dragGhostElement),Xt(i,s),Wt(i,s),this._dragGhostAnimationFrameId=null})))}removeDragGhost(){this._dragGhostAnimationFrameId&&(cancelAnimationFrame(this._dragGhostAnimationFrameId),this._dragGhostAnimationFrameId=null),this._dragGhostRemoveAnimationFrameId||(this._dragGhostRemoveAnimationFrameId=requestAnimationFrame(()=>{const e=document.getElementById(b);e&&document.body.removeChild(e),this._dragGhostRemoveAnimationFrameId=null}))}}class kt{constructor(e,t,s){c(this,"_options",{});c(this,"_instance");c(this,"_mainDomElement");c(this,"_currentDrag",{});c(this,"_currentTouch",null);c(this,"_firefoxDragPosition",{x:0,y:0});c(this,"_onBeforeUpdateDrag",()=>({}));c(this,"isDragging",!1);c(this,"_firefoxFallback",e=>{if(!this._currentDrag.event)return;e.preventDefault();const t=e||window.event;this._firefoxDragPosition.x=t.pageX||0,this._firefoxDragPosition.y=t.pageY||0});this._instance=e,this._mainDomElement=t,this._options=s||{},this._firefoxFallback=this._firefoxFallback.bind(this),document.addEventListener("dragover",this._firefoxFallback)}beforeUpdateGhost(e){this._onBeforeUpdateDrag=e}dragStart(e,t,s="rml_id"){const n=this._mainDomElement.parentNode;if(M(n).position!=="relative"){console.warn("Parent of iframe should have position relative, otherwise drag-in can not detect the x/y coordinates correctly");return}this._mainDomElement.style.pointerEvents="none";let o=n.querySelector("."+O);o||(o=document.createElement("div"),o.classList.add(O),n.appendChild(o)),o.classList.remove(G.DISPLAY_NONE),t.target.getAttribute("draggable")||console.warn(`Draggable not detected correctly! Did you add draggable="true" to the element? In Sarafi only 'draggable' is too less`);const l=n.querySelector("."+v);this._currentDrag.event=t;const d=t.target,h=d.cloneNode(),u=d.getBoundingClientRect();h.style.width=`${u.width}px`,h.style.height=`${u.height}px`,this._currentDrag.ghost=new $t(h),this._currentDrag.offset||(this._currentDrag.offset={x:0,y:0});const{clientX:g,clientY:f}=I(t,this._firefoxDragPosition);this._currentDrag.offset.x=g-u.left,this._currentDrag.offset.y=f-u.top,t instanceof DragEvent&&t.dataTransfer&&t.dataTransfer.setDragImage&&t.dataTransfer.setDragImage(l,0,0);const{x:S,y:D}=ht(n,this._currentDrag.event||t,this._firefoxDragPosition),y=Math.max(1,S),$=Math.max(1,D);this.isDragging=!0,this._instance.dragInObject(e,y,$,s)}dragUpdate(e){var D;const t=this._mainDomElement.parentNode,{x:s,y:n}=ht(t,e,this._firefoxDragPosition);if(s===0&&n===0)return;const i=Math.max(1,s),o=Math.max(1,n);if(i===1&&o===1)return;let a=i,l=o;if(T(e)){const y=((D=this._options.settings)==null?void 0:D.fingerSize)||0;a=Math.max(2,i+y),l=Math.max(2,o-y)}const{x:d,y:h,options:u}=this._onBeforeUpdateDrag(a,l,{}),g=u||{settings:{},ghost:{}};g.ghost||(g.ghost={}),g.ghost.visibleIn&&g.ghost.hiddenIn||(g.ghost.hiddenIn=this._mainDomElement.getBoundingClientRect());const f=typeof d=="number"?d:a,S=typeof h=="number"?h:l;if(this._currentDrag.ghost){const{clientX:y,clientY:$}=I(e,this._firefoxDragPosition);this._currentDrag.ghost.updateDragGhost(y,$,g)}this._instance.updateDrag(f,S,{})}dragEnd(){this._mainDomElement.style.pointerEvents="all";const e=this._mainDomElement.parentNode;this.isDragging=!1,this._instance.dragInObjectEnd(),this._currentDrag.ghost&&(this._currentDrag.ghost.removeDragGhost(),this._currentDrag.ghost=null),this._currentDrag={},this._firefoxDragPosition={x:0,y:0};const t=e.querySelector("."+O);t&&t.classList.add(G.DISPLAY_NONE)}touchStart(e,t,s="rml_id"){var o,a,l,d;t.preventDefault();const n=(h,u)=>{this.dragStart(e,u,s)},i={};typeof((a=(o=this._options)==null?void 0:o.settings)==null?void 0:a.touchDragDelay)=="number"&&(i.delay=this._options.settings.touchDragDelay),(d=(l=this._options)==null?void 0:l.settings)!=null&&d.touchDragEpsilon&&(i.epsilon=this._options.settings.touchDragEpsilon),this._currentTouch=new gt(void 0,{onTouchDragStart:n},i),this._currentTouch.onStart(t)}touchMove(e){this._currentTouch&&this._currentTouch.onMove(e),this._currentDrag.event&&this.dragUpdate(e)}touchEnd(){this._currentTouch&&this._currentTouch.onEnd(),this._currentTouch=null,this.dragEnd()}dispose(){document.removeEventListener("dragover",this._firefoxFallback)}releaseInput(e){}}const zt=Object.freeze(Object.defineProperty({__proto__:null,DragInFromWebsiteStrategy:kt},Symbol.toStringTag,{value:"Module"})),Vt=r=>`[data-rml-custom-view="${r}"]`,X=r=>{r.preventDefault(),r.stopPropagation()},qt=(r,e,t,s)=>{const n=t-r,i=s-e;return Math.sqrt(n*n+i*i)};class Kt{constructor({onCustomDragStart:e},t={}){c(this,"_startX",0);c(this,"_startY",0);c(this,"_lastX",0);c(this,"_lastY",0);c(this,"_epsilon");c(this,"_isWaiting",!1);c(this,"_onCustomDragStart");this._epsilon=typeof t.epsilon=="number"?t.epsilon:dt,this._onCustomDragStart=e}onMove(e){this._lastX=e.clientX,this._lastY=e.clientY,this._isWaiting&&qt(this._startX,this._startY,this._lastX,this._lastY)>this._epsilon&&(this._onCustomDragStart(e),this._isWaiting=!1)}onStart(e){this._startX=e.clientX,this._startY=e.clientY,this.onMove(e),this._isWaiting=!0}onEnd(){this._reset()}_reset(){this._startX=0,this._startY=0,this._lastX=0,this._lastY=0,this._isWaiting=!1}}const W="data-rml-old-draggable",Jt=void 0,ft=(r,e)=>{const t=T(r),s={delay:t?U:Bt,epsilon:t?B:dt};if(!e)return s;if(!t&&!(r instanceof MouseEvent))return console.warn("Unsupported event! It is not TouchEvent and also not MouseEvent"),s;const{delayKey:n,epsilonKey:i}=t?{delayKey:"touchDragDelay",epsilonKey:"touchDragEpsilon"}:{delayKey:"customDragDelay",epsilonKey:"customDragEpsilon"};return typeof e[n]=="number"&&(s.delay=e.touchDragDelay),typeof e[i]=="number"&&(s.epsilon=e.touchDragEpsilon),s},jt=r=>{let e="",t=F,s=P;if(!r)return{url:R,width:t,height:s};const n=r;if(n instanceof HTMLElement){const i=n.getBoundingClientRect(),o=n.getAttribute("data-rml-ghost-url"),a=n.getAttribute("data-rml-ghost-width"),l=n.getAttribute("data-rml-ghost-height");o?e=o:!o&&n instanceof HTMLImageElement&&n.src&&(e=n.src),e?(t=i.width,s=i.height):e=R,t=a?parseInt(a,10):t,s=l?parseInt(l,10):s}return{url:e||R,width:t,height:s}};class Qt{constructor(e,t,s){c(this,"_options",{});c(this,"_instance");c(this,"_viewName");c(this,"_currentCustomDrag",null);c(this,"_currentBb",null);c(this,"_startTarget",null);c(this,"_onBeforeUpdateDrag",()=>({}));c(this,"isDragging",!1);this._instance=e,this._options=t||{},this._viewName=s}beforeUpdateGhost(e){this._onBeforeUpdateDrag=e}async _dragStart(e,t,s="rml_id"){this._startTarget&&(this._startTarget.style.pointerEvents="none",this._startTarget.style.userSelect="none",this._startTarget.setAttribute(W,this._startTarget.draggable.toString()),this._startTarget.draggable=!1,this._startTarget.removeEventListener("dragstart",X),this._startTarget.addEventListener("dragstart",X)),this._currentBb=await this._instance.getBoundingClientRect(Vt(this._viewName));const{clientX:n,clientY:i}=I(t),o=this._currentBb.x+n,a=this._currentBb.y+i;this.isDragging=!0,this._instance.dragInObject(e,o,a,s)}_dragUpdate(e){if(document.body.focus(),this._currentCustomDrag&&this._currentCustomDrag.onMove(e),!this._currentBb||!this.isDragging)return;const{clientX:t,clientY:s}=I(e),{url:n,width:i,height:o}=jt(this._startTarget),a=this._currentBb.x+t,l=this._currentBb.y+s,d=this._options||{},h={ghost:{visibleIn:{x:this._currentBb.x-(d.dragInOverlapX||0),y:this._currentBb.y+(d.dragInOverlapY||0),width:this._currentBb.width+(d.dragInOverlapX||0),height:this._currentBb.height+(d.dragInOverlapY||0)},url:n,width:i,height:o},mode:"custom-view"},{x:u,y:g,options:f}=this._onBeforeUpdateDrag(a,l,h),S=typeof u=="number"?u:a,D=typeof g=="number"?g:l,y=f||h;this._instance.updateDrag(S,D,y)}_dragEnd(){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._currentCustomDrag=null,this.isDragging=!1,this._currentBb=null,this._resetStartTarget(),this._instance.enableEvents(),this._instance.dragInObjectEnd()}dragStart(e,t,s){this._instance.disableEvents(),this._startTarget=t.target;const n=(i,o)=>{this._dragStart(e,o,s)};this._currentCustomDrag=T(t)?new gt(Jt,{onTouchDragStart:n},ft(t,this._options)):new Kt({onCustomDragStart:i=>this._dragStart(e,i,s)},ft(t,this._options)),this._currentCustomDrag.onStart(t)}dragEnd(){this._dragEnd()}dragUpdate(e){this._dragUpdate(e)}touchStart(e,t,s="rml_id"){this.dragStart(e,t,s)}touchMove(e){this.dragUpdate(e)}touchEnd(){this.dragEnd()}dispose(){}_resetStartTarget(){this._startTarget&&(this._startTarget.style.pointerEvents="",this._startTarget.style.userSelect="",this._startTarget.draggable=this._startTarget.getAttribute(W)==="true",this._startTarget.removeAttribute(W),this._startTarget.removeEventListener("dragstart",X))}releaseInput(e){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._resetStartTarget()}}const Zt=Object.freeze(Object.defineProperty({__proto__:null,DragInFromCustomViewStrategy:Qt},Symbol.toStringTag,{value:"Module"}));return xt});
17
+ `,document.head.appendChild(e)}},Xt=({x:r,y:e},t)=>{var n,i,o,a,l,d;let s=document.getElementById(b);if(!s){if(s=document.createElement("div"),(n=t.ghost)!=null&&n.element)s.appendChild(t.ghost.element);else{const h=document.createElement("img");h.src=((i=t.ghost)==null?void 0:i.url)||R,h.width=((o=t.ghost)==null?void 0:o.width)||F,h.height=((a=t.ghost)==null?void 0:a.height)||P,s.appendChild(h)}s.id=b,s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.willChange="transform",s.style.transform="translate3d(0, 0, 0)",s.style.zIndex="9999",s.style.opacity="0.5",mt(r,e,t.ghost||{},(l=t.settings)==null?void 0:l.dragInOverlapX,(d=t.settings)==null?void 0:d.dragInOverlapY)||(s.style.display="none"),s.style.pointerEvents="none",document.body.appendChild(s)}},Wt=({x:r,y:e},t)=>{var l,d,h,u;const s=document.getElementById(b);if(!s)return;let n=(l=t.ghost)==null?void 0:l.width,i=(d=t.ghost)==null?void 0:d.height;typeof n>"u"&&(n=s.getBoundingClientRect().width||F),typeof i>"u"&&(i=s.getBoundingClientRect().height||P);const o=r-n/2,a=e-i/2;s.style.transform=`translate3d(${o}px, ${a}px, 0)`,t.ghost&&(mt(r,e,t.ghost,(h=t.settings)==null?void 0:h.dragInOverlapX,(u=t.settings)==null?void 0:u.dragInOverlapY)?s.style.animation!=at&&(s.style.animation=at):s.style.animation!=ct&&(s.style.animation=ct))};class $t{constructor(e=null){c(this,"_dragGhostAnimationFrameId",null);c(this,"_dragGhostRemoveAnimationFrameId",null);c(this,"_dragGhostElement",null);this._dragGhostElement=e}updateDragGhost(e,t,s){var n;this._dragGhostRemoveAnimationFrameId&&(cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId),this._dragGhostRemoveAnimationFrameId=null),!((n=s.ghost)!=null&&n.external)&&s.ghost&&(this._dragGhostAnimationFrameId||(this._dragGhostAnimationFrameId=requestAnimationFrame(()=>{Yt();const i={x:e,y:t};!s.ghost&&this._dragGhostElement&&(s.ghost={}),s.ghost&&!s.ghost.element&&this._dragGhostElement&&(s.ghost.element=this._dragGhostElement),Xt(i,s),Wt(i,s),this._dragGhostAnimationFrameId=null})))}removeDragGhost(){this._dragGhostAnimationFrameId&&(cancelAnimationFrame(this._dragGhostAnimationFrameId),this._dragGhostAnimationFrameId=null),this._dragGhostRemoveAnimationFrameId||(this._dragGhostRemoveAnimationFrameId=requestAnimationFrame(()=>{const e=document.getElementById(b);e&&document.body.removeChild(e),this._dragGhostRemoveAnimationFrameId=null}))}}class kt{constructor(e,t,s){c(this,"_options",{});c(this,"_instance");c(this,"_mainDomElement");c(this,"_currentDrag",{});c(this,"_currentTouch",null);c(this,"_firefoxDragPosition",{x:0,y:0});c(this,"_onBeforeUpdateDrag",()=>({}));c(this,"isDragging",!1);c(this,"_firefoxFallback",e=>{if(!this._currentDrag.event)return;e.preventDefault();const t=e||window.event;this._firefoxDragPosition.x=t.pageX||0,this._firefoxDragPosition.y=t.pageY||0});this._instance=e,this._mainDomElement=t,this._options=s||{},this._firefoxFallback=this._firefoxFallback.bind(this),document.addEventListener("dragover",this._firefoxFallback)}beforeUpdateGhost(e){this._onBeforeUpdateDrag=e}dragStart(e,t,s="rml_id"){const n=this._mainDomElement.parentNode;if(M(n).position!=="relative"){console.warn("Parent of iframe should have position relative, otherwise drag-in can not detect the x/y coordinates correctly");return}this._mainDomElement.style.pointerEvents="none";let o=n.querySelector("."+O);o||(o=document.createElement("div"),o.classList.add(O),n.appendChild(o)),o.classList.remove(G.DISPLAY_NONE),t.target.getAttribute("draggable")||console.warn(`Draggable not detected correctly! Did you add draggable="true" to the element? In Sarafi only 'draggable' is too less`);const l=n.querySelector("."+v);this._currentDrag.event=t;const d=t.target,h=d.cloneNode(),u=d.getBoundingClientRect();h.style.width=`${u.width}px`,h.style.height=`${u.height}px`,this._currentDrag.ghost=new $t(h),this._currentDrag.offset||(this._currentDrag.offset={x:0,y:0});const{clientX:g,clientY:f}=I(t,this._firefoxDragPosition);this._currentDrag.offset.x=g-u.left,this._currentDrag.offset.y=f-u.top,t instanceof DragEvent&&t.dataTransfer&&t.dataTransfer.setDragImage&&t.dataTransfer.setDragImage(l,0,0);const{x:S,y:D}=ht(n,this._currentDrag.event||t,this._firefoxDragPosition),y=Math.max(1,S),$=Math.max(1,D);this.isDragging=!0,this._instance.dragInObject(e,y,$,s)}dragUpdate(e){var D;const t=this._mainDomElement.parentNode,{x:s,y:n}=ht(t,e,this._firefoxDragPosition);if(s===0&&n===0)return;const i=Math.max(1,s),o=Math.max(1,n);if(i===1&&o===1)return;let a=i,l=o;if(T(e)){const y=((D=this._options.settings)==null?void 0:D.fingerSize)||0;a=Math.max(2,i+y),l=Math.max(2,o-y)}const{x:d,y:h,options:u}=this._onBeforeUpdateDrag(a,l,{}),g=u||{settings:{},ghost:{}};g.ghost||(g.ghost={}),g.ghost.visibleIn&&g.ghost.hiddenIn||(g.ghost.hiddenIn=this._mainDomElement.getBoundingClientRect());const f=typeof d=="number"?d:a,S=typeof h=="number"?h:l;if(this._currentDrag.ghost){const{clientX:y,clientY:$}=I(e,this._firefoxDragPosition);this._currentDrag.ghost.updateDragGhost(y,$,g)}this._instance.updateDrag(f,S,{})}dragEnd(){this._mainDomElement.style.pointerEvents="all";const e=this._mainDomElement.parentNode;this.isDragging=!1,this._instance.dragInObjectEnd(),this._currentDrag.ghost&&(this._currentDrag.ghost.removeDragGhost(),this._currentDrag.ghost=null),this._currentDrag={},this._firefoxDragPosition={x:0,y:0};const t=e.querySelector("."+O);t&&t.classList.add(G.DISPLAY_NONE)}touchStart(e,t,s="rml_id"){var o,a,l,d;t.preventDefault();const n=(h,u)=>{this.dragStart(e,u,s)},i={};typeof((a=(o=this._options)==null?void 0:o.settings)==null?void 0:a.touchDragDelay)=="number"&&(i.delay=this._options.settings.touchDragDelay),(d=(l=this._options)==null?void 0:l.settings)!=null&&d.touchDragEpsilon&&(i.epsilon=this._options.settings.touchDragEpsilon),this._currentTouch=new gt(void 0,{onTouchDragStart:n},i),this._currentTouch.onStart(t)}touchMove(e){this._currentTouch&&this._currentTouch.onMove(e),this._currentDrag.event&&this.dragUpdate(e)}touchEnd(){this._currentTouch&&this._currentTouch.onEnd(),this._currentTouch=null,this.dragEnd()}dispose(){document.removeEventListener("dragover",this._firefoxFallback)}releaseInput(e){}}const Vt=Object.freeze(Object.defineProperty({__proto__:null,DragInFromWebsiteStrategy:kt},Symbol.toStringTag,{value:"Module"})),zt=r=>`[data-rml-custom-view="${r}"]`,X=r=>{r.preventDefault(),r.stopPropagation()},qt=(r,e,t,s)=>{const n=t-r,i=s-e;return Math.sqrt(n*n+i*i)};class Kt{constructor({onCustomDragStart:e},t={}){c(this,"_startX",0);c(this,"_startY",0);c(this,"_lastX",0);c(this,"_lastY",0);c(this,"_epsilon");c(this,"_isWaiting",!1);c(this,"_onCustomDragStart");this._epsilon=typeof t.epsilon=="number"?t.epsilon:dt,this._onCustomDragStart=e}onMove(e){this._lastX=e.clientX,this._lastY=e.clientY,this._isWaiting&&qt(this._startX,this._startY,this._lastX,this._lastY)>this._epsilon&&(this._onCustomDragStart(e),this._isWaiting=!1)}onStart(e){this._startX=e.clientX,this._startY=e.clientY,this.onMove(e),this._isWaiting=!0}onEnd(){this._reset()}_reset(){this._startX=0,this._startY=0,this._lastX=0,this._lastY=0,this._isWaiting=!1}}const W="data-rml-old-draggable",Jt=void 0,ft=(r,e)=>{const t=T(r),s={delay:t?U:Bt,epsilon:t?B:dt};if(!e)return s;if(!t&&!(r instanceof MouseEvent))return console.warn("Unsupported event! It is not TouchEvent and also not MouseEvent"),s;const{delayKey:n,epsilonKey:i}=t?{delayKey:"touchDragDelay",epsilonKey:"touchDragEpsilon"}:{delayKey:"customDragDelay",epsilonKey:"customDragEpsilon"};return typeof e[n]=="number"&&(s.delay=e.touchDragDelay),typeof e[i]=="number"&&(s.epsilon=e.touchDragEpsilon),s},jt=r=>{let e="",t=F,s=P;if(!r)return{url:R,width:t,height:s};const n=r;if(n instanceof HTMLElement){const i=n.getBoundingClientRect(),o=n.getAttribute("data-rml-ghost-url"),a=n.getAttribute("data-rml-ghost-width"),l=n.getAttribute("data-rml-ghost-height");o?e=o:!o&&n instanceof HTMLImageElement&&n.src&&(e=n.src),e?(t=i.width,s=i.height):e=R,t=a?parseInt(a,10):t,s=l?parseInt(l,10):s}return{url:e||R,width:t,height:s}};class Qt{constructor(e,t,s){c(this,"_options",{});c(this,"_instance");c(this,"_viewName");c(this,"_currentCustomDrag",null);c(this,"_currentBb",null);c(this,"_startTarget",null);c(this,"_onBeforeUpdateDrag",()=>({}));c(this,"isDragging",!1);this._instance=e,this._options=t||{},this._viewName=s}beforeUpdateGhost(e){this._onBeforeUpdateDrag=e}async _dragStart(e,t,s="rml_id"){this._startTarget&&(this._startTarget.style.pointerEvents="none",this._startTarget.style.userSelect="none",this._startTarget.setAttribute(W,this._startTarget.draggable.toString()),this._startTarget.draggable=!1,this._startTarget.removeEventListener("dragstart",X),this._startTarget.addEventListener("dragstart",X)),this._currentBb=await this._instance.getBoundingClientRect(zt(this._viewName));const{clientX:n,clientY:i}=I(t),o=this._currentBb.x+n,a=this._currentBb.y+i;this.isDragging=!0,this._instance.dragInObject(e,o,a,s)}_dragUpdate(e){if(document.body.focus(),this._currentCustomDrag&&this._currentCustomDrag.onMove(e),!this._currentBb||!this.isDragging)return;const{clientX:t,clientY:s}=I(e),{url:n,width:i,height:o}=jt(this._startTarget),a=this._currentBb.x+t,l=this._currentBb.y+s,d=this._options||{},h={ghost:{visibleIn:{x:this._currentBb.x-(d.dragInOverlapX||0),y:this._currentBb.y+(d.dragInOverlapY||0),width:this._currentBb.width+(d.dragInOverlapX||0),height:this._currentBb.height+(d.dragInOverlapY||0)},url:n,width:i,height:o},mode:"custom-view"},{x:u,y:g,options:f}=this._onBeforeUpdateDrag(a,l,h),S=typeof u=="number"?u:a,D=typeof g=="number"?g:l,y=f||h;this._instance.updateDrag(S,D,y)}_dragEnd(){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._currentCustomDrag=null,this.isDragging=!1,this._currentBb=null,this._resetStartTarget(),this._instance.enableEvents(),this._instance.dragInObjectEnd()}dragStart(e,t,s){this._instance.disableEvents(),this._startTarget=t.target;const n=(i,o)=>{this._dragStart(e,o,s)};this._currentCustomDrag=T(t)?new gt(Jt,{onTouchDragStart:n},ft(t,this._options)):new Kt({onCustomDragStart:i=>this._dragStart(e,i,s)},ft(t,this._options)),this._currentCustomDrag.onStart(t)}dragEnd(){this._dragEnd()}dragUpdate(e){this._dragUpdate(e)}touchStart(e,t,s="rml_id"){this.dragStart(e,t,s)}touchMove(e){this.dragUpdate(e)}touchEnd(){this.dragEnd()}dispose(){}_resetStartTarget(){this._startTarget&&(this._startTarget.style.pointerEvents="",this._startTarget.style.userSelect="",this._startTarget.draggable=this._startTarget.getAttribute(W)==="true",this._startTarget.removeAttribute(W),this._startTarget.removeEventListener("dragstart",X))}releaseInput(e){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._resetStartTarget()}}const Zt=Object.freeze(Object.defineProperty({__proto__:null,DragInFromCustomViewStrategy:Qt},Symbol.toStringTag,{value:"Module"}));return xt});
@@ -1,4 +1,4 @@
1
- (function(p,D){typeof exports=="object"&&typeof module<"u"?module.exports=D():typeof define=="function"&&define.amd?define(D):(p=typeof globalThis<"u"?globalThis:p||self,p["roomle-embedding-lib"]=p["roomle-embedding-lib"]||{},p["roomle-embedding-lib"].umd=p["roomle-embedding-lib"].umd||{},p["roomle-embedding-lib"].umd.min=p["roomle-embedding-lib"].umd.min||{},p["roomle-embedding-lib"].umd.min.js=D())})(this,function(){"use strict";var p=Object.defineProperty,D=(i,t,e)=>t in i?p(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,h=(i,t,e)=>D(i,typeof t!="symbol"?t+"":t,e);class ${constructor(t,e,s,n){h(this,"_side"),h(this,"_incomingMessageBus",null),h(this,"_outgoingMessageBus",null),h(this,"_execMessage",null),this._side=t,this._incomingMessageBus=e,this._outgoingMessageBus=s,this._execMessage=n,this._incomingMessageBus&&this._incomingMessageBus.addEventListener("message",this._handleMessage.bind(this))}setOutgoingMessageBus(t){this._outgoingMessageBus=t}setMessageExecution(t){this._execMessage=t}sendMessage(t,e=[]){return new Promise((s,n)=>{if(this._incomingMessageBus===this._outgoingMessageBus)return s(void 0);const r=new MessageChannel;r.port1.onmessage=a=>{if(!a||!a.data)return r.port1.close(),r.port2.close(),n(new Error(this._side+" received message but response can not be interpreted"));let c;try{c=JSON.parse(a.data)}catch(l){return r.port1.close(),r.port2.close(),this._prepareError(l),n(l)}c.error?n(c.error):c.result!==void 0?s(c.result):s(void 0),r.port1.close(),r.port2.close()};let o="";try{o=JSON.stringify({message:t,args:e})}catch{return n(new Error(this._side+": can not create command because it is not JSON.stringify able"))}if(!this._outgoingMessageBus)return n(new Error(this._side+": outgoing bus not set yet"));this._outgoingMessageBus.postMessage(o,"*",[r.port2])})}_handleMessage(t){const e=t.ports&&Array.isArray(t.ports)&&t.ports.length>0?t.ports[0]:null;if(t.data&&e)try{const s=JSON.parse(t.data);if(!this._execMessage)return e.postMessage(JSON.stringify({error:this._side+" is not ready to handle messages"}));Array.isArray(s.args)||(s.args=[s.args]);const n=this._execMessage(s,t);if(n===void 0)return;n.then((r={})=>{let o,a;typeof r=="object"&&r!==null&&(o=r.error,a=r.result),o?e.postMessage(JSON.stringify({error:o})):a!==void 0?e.postMessage(JSON.stringify({result:a})):e.postMessage(JSON.stringify({result:r}))},r=>{e.postMessage(JSON.stringify({error:this._prepareError(r)}))})}catch(s){e.postMessage(JSON.stringify({error:this._prepareError(s)}))}}_prepareError(t){if(typeof t=="string"){const e=this._side+": "+t;return console.error(e),e}return t.message=this._side+": "+t.message,console.error(t),t.message}}const C=".",A={REQUEST_BOOT:"requestBoot",SETUP:"setup",WEBSITE_READY:"websiteReady"},E={GET_METHODS:"getMethods",RETURN_METHODS:"returnMethods",REGISTER_CUSTOM_VIEW:"registerCustomView",REGISTER_CUSTOM_VIEW_DONE:"registerCustomViewDone"},yt=async(i,t)=>{if(typeof i!="string")throw new Error('Configurator ID is not a string type: "'+typeof i+'"');const e=t.customApiUrl?t.customApiUrl:"https://api.roomle.com/v2",s=t.overrideTenant||9,n=e+"/configurators/"+i,r="roomle_portal_v2",o="03-"+window.btoa(new Date().toISOString()+";anonymous;"+r),a=()=>{const u={apiKey:r,currentTenant:s,locale:"en",language:"en",device:1,token:o,platform:"web"};return new Headers(u)},c=new Request(n,{method:"GET",headers:a(),mode:"cors",cache:"default"}),l=await fetch(c),{configurator:d}=await l.json();return d},vt=()=>{try{return window.self!==window.top}catch{return!0}},Dt=["127.0.0.1","localhost","0.0.0.0"],bt=()=>{const i=vt();let t=window.location.href;if(i){if(!document.referrer)return null;t=document.referrer}const{hostname:e}=new URL(t);return e},wt=i=>!!(Dt.includes(i)||i.endsWith("roomle.com")||i.endsWith("gitlab.io")||i.endsWith("gitlab.com")),j=["language","browserLanguage","userLanguage","systemLanguage"],Et=(i=null)=>{const t=window.navigator;if(i)return i.substr(0,2);if(Array.isArray(t.languages)&&t.languages.length>0)return t.languages[0].substr(0,2);for(let e=0,s=j.length;e<s;e++){const n=t[j[e]];if(n)return n.substr(0,2)}return"en"},Tt=(i,t)=>{const e=JSON.parse(JSON.stringify(i));return N(e,t)},N=(i,t)=>{for(const e in t)try{t[e].constructor===Object?i[e]=N(i[e],t[e]):i[e]=t[e]}catch{i[e]=t[e]}return i};var z=(i=>(i.BOTTOM_BAR="bottom_bar",i.PARTLIST_BOUNDS="partlist_bounds",i.INTERACTION_NOTES="interaction_notes",i))(z||{}),It={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const St={mobileLandscape:!0,floorMaterialRootTag:"materials_root",buttons:{renderimage:!0,requestproduct:!0,requestplan:!0,load_product:!0,partlist_print:!0},elements:{[z.INTERACTION_NOTES]:!0},helpcenter:{roomdesigner:!0,configurator:!1,disable:!1},firstPersonView:!0,saveToIdb:!0,featureFlags:{mocAr:!0,wallAutoHeight:!1,openCloseAnimation:!1},rotationSnapDegrees:10,interactionsCollapsed:!1},Ot="(idle)",xt=i=>(L(i),i!=null&&i.customApiUrl&&(i.customApiUrl=decodeURIComponent(i.customApiUrl)),i.shareUrl&&(i.deeplink=i.shareUrl.replace(At,Nt)),i),L=i=>{if(!i)return;const t=Object.keys(i);for(const e of t){const s=i[e];if(!Array.isArray(s)&&typeof s=="object"&&s!==null&&L(s),Array.isArray(s))for(const n of s)L(n);(s==="true"||s==="false")&&(i[e]=s==="true")}},Mt=(i,t)=>{t.configuratorId=i.id;const e=i.settings||{};return!t.overrideTenant&&i.tenant&&(t.overrideTenant=i.tenant),Tt(e,t)},Ct=()=>{const i={...St};i.locale||(i.locale=Et()),i.id===Ot&&delete i.id;const t=bt();return t&&wt(t)&&(i.configuratorId="demoConfigurator"),i.customApiUrl=It.VITE_RAPI_URL,i.emails=!1,i},At="<CONF_ID>",Nt="#CONFIGURATIONID#",Lt=i=>{i.featureFlags||(i.featureFlags={}),typeof i.featureFlags.realPartList!="boolean"&&(i.featureFlags.realPartList=!0),typeof i.featureFlags.globalCallbacks!="boolean"&&(i.featureFlags.globalCallbacks=!0),typeof i.featureFlags.mocAr!="boolean"&&(i.featureFlags.mocAr=!1)},V=()=>/(android)/i.test(navigator.userAgent);class q{constructor(){h(this,"_messageHandler",null),h(this,"isSetupDone",!1),h(this,"viewName","main"),h(this,"plugins",{}),h(this,"pluginsLoaded",[]),h(this,"ui",{callbacks:null}),h(this,"extended",{callbacks:null}),h(this,"configurator",{callbacks:null}),h(this,"analytics",{callbacks:{}}),h(this,"global",{callbacks:{}})}setMessageHandler(t){this._messageHandler=t}handleSetup(t){const{methods:e,callbacks:s}=t;e.forEach(n=>{const r=n.split(C),o=r[0],a=r[1];this[o]||(this[o]={}),this[o][a]=function(){if(!this._messageHandler){console.error("MessageHandler not set");return}return this._messageHandler.sendMessage(n,[...arguments])}.bind(this)}),s.forEach(n=>{const r=n.split(C),o=r[0],a=r[1],c=r[2];this[o]||(this[o]={}),this[o][a]||(this[o][a]={}),this[o][a][c]=()=>{}}),this.isSetupDone=!0}executeMessage({message:t,args:e}){const s=t.split(C),n=s[0],r=s[1],o=s.length===3?s[2]:null;if(o&&this[n][r][o]){const a=this[n][r][o](...e);return a instanceof Promise?a.then(c=>({result:c})):a!==void 0?Promise.resolve({result:a}):Promise.resolve({result:null})}return Promise.reject('Message "'+t+'" is unkown')}setupPlugins(t,e,s="website"){for(const n of t)typeof n=="string"&&n==="dragIn"?this.pluginsLoaded.push(new Promise((r,o)=>{try{Promise.resolve().then(()=>Ut).then(({DragIn:a})=>{const c=new a(this.ui,e,s,this.viewName);c.init().then(()=>{this.plugins.dragIn=c,r()},o)})}catch(a){o(a)}})):n.name&&n.loader&&this.pluginsLoaded.push(new Promise((r,o)=>{try{n.loader().then(a=>{const c=new a(this.ui,e,s,this.viewName);c.init().then(()=>{this.plugins[n.name]=c,r()},o)})}catch(a){o(a)}}))}}const J=()=>{let i,t;return{promise:new Promise((e,s)=>{i=e,t=s}),resolve:i,reject:t}},K=(i,t,e)=>{let s=null;Object.defineProperty(i,t,{get(){return s||e},set(n){n!=null&&n.mute?s=n.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 }"),s=n)}})},Q=()=>window.innerHeight*.01+"px",Z=i=>{i&&setTimeout(()=>i.style.setProperty(R,Q()),0)},tt="rml-styles",Rt=450,R="--rml-full-height",m={CONTAINER:"rml-container",FILL:"rml-fill",POSITION:"rml-pos",TRANSITION:"rml-transition",ANDROID_HEIGHT:"rml-android-height",OVERFLOW_HIDDEN:"rml-overflow-hidden"},P=new Map;class Pt extends q{constructor(t,e,s,n,r){if(super(),h(this,"_waitForIframe"),h(this,"_container"),h(this,"_configuratorSettings"),h(this,"_initData",{}),h(this,"_iframe"),!t||typeof t.id!="string")throw new Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");if(P.has(e))throw new Error("There is already an instance on this DOM element");if(!document.getElementById(tt)){const c=s.zIndex||9999999,l=document.createElement("style");l.type="text/css",l.id=tt;const d="transition:all ease-in-out "+Rt+"ms;",u=["-webkit-","-o-"].reduce((_,y)=>_+=y+d,"")+d,g=Q();l.innerHTML=`
1
+ (function(p,D){typeof exports=="object"&&typeof module<"u"?module.exports=D():typeof define=="function"&&define.amd?define(D):(p=typeof globalThis<"u"?globalThis:p||self,p["roomle-embedding-lib"]=p["roomle-embedding-lib"]||{},p["roomle-embedding-lib"].umd=p["roomle-embedding-lib"].umd||{},p["roomle-embedding-lib"].umd.min=p["roomle-embedding-lib"].umd.min||{},p["roomle-embedding-lib"].umd.min.js=D())})(this,function(){"use strict";var p=Object.defineProperty,D=(i,t,e)=>t in i?p(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,h=(i,t,e)=>D(i,typeof t!="symbol"?t+"":t,e);class ${constructor(t,e,s,n){h(this,"_side"),h(this,"_incomingMessageBus",null),h(this,"_outgoingMessageBus",null),h(this,"_execMessage",null),this._side=t,this._incomingMessageBus=e,this._outgoingMessageBus=s,this._execMessage=n,this._incomingMessageBus&&this._incomingMessageBus.addEventListener("message",this._handleMessage.bind(this))}setOutgoingMessageBus(t){this._outgoingMessageBus=t}setMessageExecution(t){this._execMessage=t}sendMessage(t,e=[]){return new Promise((s,n)=>{if(this._incomingMessageBus===this._outgoingMessageBus)return s(void 0);const r=new MessageChannel;r.port1.onmessage=a=>{if(!a||!a.data)return r.port1.close(),r.port2.close(),n(new Error(this._side+" received message but response can not be interpreted"));let c;try{c=JSON.parse(a.data)}catch(l){return r.port1.close(),r.port2.close(),this._prepareError(l),n(l)}c.error?n(c.error):c.result!==void 0?s(c.result):s(void 0),r.port1.close(),r.port2.close()};let o="";try{o=JSON.stringify({message:t,args:e})}catch{return n(new Error(this._side+": can not create command because it is not JSON.stringify able"))}if(!this._outgoingMessageBus)return n(new Error(this._side+": outgoing bus not set yet"));this._outgoingMessageBus.postMessage(o,"*",[r.port2])})}_handleMessage(t){const e=t.ports&&Array.isArray(t.ports)&&t.ports.length>0?t.ports[0]:null;if(t.data&&e)try{const s=JSON.parse(t.data);if(!this._execMessage)return e.postMessage(JSON.stringify({error:this._side+" is not ready to handle messages"}));Array.isArray(s.args)||(s.args=[s.args]);const n=this._execMessage(s,t);if(n===void 0)return;n.then((r={})=>{let o,a;typeof r=="object"&&r!==null&&(o=r.error,a=r.result),o?e.postMessage(JSON.stringify({error:o})):a!==void 0?e.postMessage(JSON.stringify({result:a})):e.postMessage(JSON.stringify({result:r}))},r=>{e.postMessage(JSON.stringify({error:this._prepareError(r)}))})}catch(s){e.postMessage(JSON.stringify({error:this._prepareError(s)}))}}_prepareError(t){if(typeof t=="string"){const e=this._side+": "+t;return console.error(e),e}return t.message=this._side+": "+t.message,console.error(t),t.message}}const C=".",A={REQUEST_BOOT:"requestBoot",SETUP:"setup",WEBSITE_READY:"websiteReady"},E={GET_METHODS:"getMethods",RETURN_METHODS:"returnMethods",REGISTER_CUSTOM_VIEW:"registerCustomView",REGISTER_CUSTOM_VIEW_DONE:"registerCustomViewDone"},yt=async(i,t)=>{if(typeof i!="string")throw new Error('Configurator ID is not a string type: "'+typeof i+'"');const e=t.customApiUrl?t.customApiUrl:"https://api.roomle.com/v2",s=t.overrideTenant||9,n=e+"/configurators/"+i,r="roomle_portal_v2",o="03-"+window.btoa(new Date().toISOString()+";anonymous;"+r),a=()=>{const u={apiKey:r,currentTenant:s,locale:"en",language:"en",device:1,token:o,platform:"web"};return new Headers(u)},c=new Request(n,{method:"GET",headers:a(),mode:"cors",cache:"default"}),l=await fetch(c),{configurator:d}=await l.json();return d},vt=()=>{try{return window.self!==window.top}catch{return!0}},Dt=["127.0.0.1","localhost","0.0.0.0"],bt=()=>{const i=vt();let t=window.location.href;if(i){if(!document.referrer)return null;t=document.referrer}const{hostname:e}=new URL(t);return e},wt=i=>!!(Dt.includes(i)||i.endsWith("roomle.com")||i.endsWith("gitlab.io")||i.endsWith("gitlab.com")),j=["language","browserLanguage","userLanguage","systemLanguage"],Et=(i=null)=>{const t=window.navigator;if(i)return i.substr(0,2);if(Array.isArray(t.languages)&&t.languages.length>0)return t.languages[0].substr(0,2);for(let e=0,s=j.length;e<s;e++){const n=t[j[e]];if(n)return n.substr(0,2)}return"en"},Tt=(i,t)=>{const e=JSON.parse(JSON.stringify(i));return N(e,t)},N=(i,t)=>{for(const e in t)try{t[e].constructor===Object?i[e]=N(i[e],t[e]):i[e]=t[e]}catch{i[e]=t[e]}return i};var z=(i=>(i.BOTTOM_BAR="bottom_bar",i.PARTLIST_BOUNDS="partlist_bounds",i.INTERACTION_NOTES="interaction_notes",i))(z||{}),It={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const St={mobileLandscape:!0,floorMaterialRootTag:"materials_root",buttons:{renderimage:!0,requestproduct:!0,requestplan:!0,load_product:!0,partlist_print:!0},elements:{[z.INTERACTION_NOTES]:!0},helpcenter:{roomdesigner:!0,configurator:!1,disable:!1},firstPersonView:!0,saveToIdb:!0,featureFlags:{mocAr:!0,wallAutoHeight:!1,openCloseAnimation:!1,showWallVisibilityToggle:!1},rotationSnapDegrees:10,interactionsCollapsed:!1},Ot="(idle)",xt=i=>(L(i),i!=null&&i.customApiUrl&&(i.customApiUrl=decodeURIComponent(i.customApiUrl)),i.shareUrl&&(i.deeplink=i.shareUrl.replace(At,Nt)),i),L=i=>{if(!i)return;const t=Object.keys(i);for(const e of t){const s=i[e];if(!Array.isArray(s)&&typeof s=="object"&&s!==null&&L(s),Array.isArray(s))for(const n of s)L(n);(s==="true"||s==="false")&&(i[e]=s==="true")}},Mt=(i,t)=>{t.configuratorId=i.id;const e=i.settings||{};return!t.overrideTenant&&i.tenant&&(t.overrideTenant=i.tenant),Tt(e,t)},Ct=()=>{const i={...St};i.locale||(i.locale=Et()),i.id===Ot&&delete i.id;const t=bt();return t&&wt(t)&&(i.configuratorId="demoConfigurator"),i.customApiUrl=It.VITE_RAPI_URL,i.emails=!1,i},At="<CONF_ID>",Nt="#CONFIGURATIONID#",Lt=i=>{i.featureFlags||(i.featureFlags={}),typeof i.featureFlags.realPartList!="boolean"&&(i.featureFlags.realPartList=!0),typeof i.featureFlags.globalCallbacks!="boolean"&&(i.featureFlags.globalCallbacks=!0),typeof i.featureFlags.mocAr!="boolean"&&(i.featureFlags.mocAr=!1)},V=()=>/(android)/i.test(navigator.userAgent);class q{constructor(){h(this,"_messageHandler",null),h(this,"isSetupDone",!1),h(this,"viewName","main"),h(this,"plugins",{}),h(this,"pluginsLoaded",[]),h(this,"ui",{callbacks:null}),h(this,"extended",{callbacks:null}),h(this,"configurator",{callbacks:null}),h(this,"analytics",{callbacks:{}}),h(this,"global",{callbacks:{}})}setMessageHandler(t){this._messageHandler=t}handleSetup(t){const{methods:e,callbacks:s}=t;e.forEach(n=>{const r=n.split(C),o=r[0],a=r[1];this[o]||(this[o]={}),this[o][a]=function(){if(!this._messageHandler){console.error("MessageHandler not set");return}return this._messageHandler.sendMessage(n,[...arguments])}.bind(this)}),s.forEach(n=>{const r=n.split(C),o=r[0],a=r[1],c=r[2];this[o]||(this[o]={}),this[o][a]||(this[o][a]={}),this[o][a][c]=()=>{}}),this.isSetupDone=!0}executeMessage({message:t,args:e}){const s=t.split(C),n=s[0],r=s[1],o=s.length===3?s[2]:null;if(o&&this[n][r][o]){const a=this[n][r][o](...e);return a instanceof Promise?a.then(c=>({result:c})):a!==void 0?Promise.resolve({result:a}):Promise.resolve({result:null})}return Promise.reject('Message "'+t+'" is unkown')}setupPlugins(t,e,s="website"){for(const n of t)typeof n=="string"&&n==="dragIn"?this.pluginsLoaded.push(new Promise((r,o)=>{try{Promise.resolve().then(()=>Ut).then(({DragIn:a})=>{const c=new a(this.ui,e,s,this.viewName);c.init().then(()=>{this.plugins.dragIn=c,r()},o)})}catch(a){o(a)}})):n.name&&n.loader&&this.pluginsLoaded.push(new Promise((r,o)=>{try{n.loader().then(a=>{const c=new a(this.ui,e,s,this.viewName);c.init().then(()=>{this.plugins[n.name]=c,r()},o)})}catch(a){o(a)}}))}}const J=()=>{let i,t;return{promise:new Promise((e,s)=>{i=e,t=s}),resolve:i,reject:t}},K=(i,t,e)=>{let s=null;Object.defineProperty(i,t,{get(){return s||e},set(n){n!=null&&n.mute?s=n.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 }"),s=n)}})},Q=()=>window.innerHeight*.01+"px",Z=i=>{i&&setTimeout(()=>i.style.setProperty(R,Q()),0)},tt="rml-styles",Rt=450,R="--rml-full-height",m={CONTAINER:"rml-container",FILL:"rml-fill",POSITION:"rml-pos",TRANSITION:"rml-transition",ANDROID_HEIGHT:"rml-android-height",OVERFLOW_HIDDEN:"rml-overflow-hidden"},P=new Map;class Pt extends q{constructor(t,e,s,n,r){if(super(),h(this,"_waitForIframe"),h(this,"_container"),h(this,"_configuratorSettings"),h(this,"_initData",{}),h(this,"_iframe"),!t||typeof t.id!="string")throw new Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");if(P.has(e))throw new Error("There is already an instance on this DOM element");if(!document.getElementById(tt)){const c=s.zIndex||9999999,l=document.createElement("style");l.type="text/css",l.id=tt;const d="transition:all ease-in-out "+Rt+"ms;",u=["-webkit-","-o-"].reduce((_,y)=>_+=y+d,"")+d,g=Q();l.innerHTML=`
2
2
  .${m.CONTAINER}{${R}:${g};}
3
3
  .${m.POSITION}{position:fixed;top:0;left:0;z-index:${c};opacity:0}
4
4
  .${m.TRANSITION}{${u}}
@@ -11,7 +11,7 @@
11
11
  .${O}{position:absolute;top:0;left:0;width:1px;height:1px;z-index:999;pointer-events:none;background-color:transparent;}
12
12
  ${ot}
13
13
  ${at}
14
- `,document.head.appendChild(t)}}_initializeDragGhost(){const t=this._mainDomElement.parentNode;let e=t.querySelector("."+O);e||(e=document.createElement("div"),e.classList.add(O),e.innerText=" ",t.appendChild(e))}async init(){if(await super.init(),this._mode==="website")try{const{DragInFromWebsiteStrategy:t}=await Promise.resolve().then(()=>zt);this._strategy=new t(this._instance,this._mainDomElement,{settings:this.options,mode:"website"})}catch(t){throw console.error('Could not load Dragin strategy "FromWebsite"'),t}else if(this._mode==="custom-view")try{const{DragInFromCustomViewStrategy:t}=await Promise.resolve().then(()=>te);this._strategy=new t(this._instance,this.options,this._viewName)}catch(t){throw console.error('Could not load Dragin strategy "FromCustomView"'),t}else throw new Error("Unsupported mode")}get isDragging(){return this._strategy.isDragging}dragStart(t,e,s="rml_id"){this._strategy.dragStart(t,e,s)}dragUpdate(t){this._strategy.dragUpdate(t)}dragEnd(){this._strategy.dragEnd()}touchStart(t,e,s="rml_id"){this._strategy.touchStart(t,e,s)}touchMove(t){this._strategy.touchMove(t)}touchEnd(){this._strategy.touchEnd()}dispose(){this._strategy.dispose()}beforeUpdateGhost(t){this._strategy.beforeUpdateGhost(t)}registerCustomDrag({customDragStart:t,customDragEnd:e,customDragUpdate:s,beforeUpdateGhost:n}){n&&this._strategy.beforeUpdateGhost(n);const r=this._customDragSignal.signal,o=l=>{l.target.getAttribute("data-rml-draggable")==="true"&&t(l)},a=l=>{this._strategy.releaseInput(l),this._strategy.isDragging&&e(l)},c=l=>{s(l)};document.querySelectorAll('[data-rml-draggable="true"]').forEach(l=>{l.draggable=!1}),document.addEventListener("mousedown",o,{signal:r}),document.addEventListener("mouseup",a,{signal:r}),document.addEventListener("mousemove",c,{signal:r}),document.addEventListener("mouseleave",a,{signal:r}),document.addEventListener("touchstart",o,{signal:r}),document.addEventListener("touchend",a,{signal:r}),document.addEventListener("touchmove",c,{signal:r})}unregisterCustomDrag(){this._customDragSignal.abort(),this._customDragSignal=new AbortController}releaseInput(t){this._strategy.releaseInput(t)}}const Ut=Object.freeze(Object.defineProperty({__proto__:null,DragIn:Bt},Symbol.toStringTag,{value:"Module"}));class Ht{constructor(t=16){h(this,"_computedStyleCache",new Map),h(this,"_maxLifetime",16),h(this,"_cacheCleanInterval",null),this._maxLifetime=t}get(t){const e=this._computedStyleCache.get(t),s=Date.now();if(e&&s-e.updated<this._maxLifetime)return e.style;const n=getComputedStyle(t);return this._computedStyleCache.set(t,{style:n,updated:s}),this._cacheCleanInterval||(this._cacheCleanInterval=setInterval(()=>this._cleanUpCache,Math.max(this._maxLifetime*1e3,5e3))),n}_cleanUpCache(){const t=Date.now();for(const[e,{updated:s}]of this._computedStyleCache.entries())t-s>=this._maxLifetime&&this._computedStyleCache.delete(e);this._computedStyleCache.size===0&&this._cacheCleanInterval&&(clearInterval(this._cacheCleanInterval),this._cacheCleanInterval=null)}}const f=i=>window.TouchEvent&&i instanceof window.TouchEvent;let H;const M=i=>(H||(H=new Ht),H.get(i)),ct=(i,t,e)=>{const s=parseFloat(i),n=window.devicePixelRatio||1;if(t==="px")return s;if(t==="%"){const o=e===document.documentElement?window.innerWidth:e.offsetWidth;return s/100*o}if(t==="rem"){const o=parseFloat(M(document.documentElement).fontSize);return s*o}if(t==="em"){const o=parseFloat(M(e).fontSize);return s*o}if(t==="vh"||t==="vw"||t==="vmin"||t==="vmax"){const o={vh:window.innerHeight,vw:window.innerWidth,vmin:Math.min(window.innerWidth,window.innerHeight),vmax:Math.max(window.innerWidth,window.innerHeight)};return s/100*o[t]}const r={cm:37.7952755906,mm:3.77952755906,in:96};return t in r?s*r[t]*n:(console.warn("Unable to determine coordinates for drag-in. Therefore drag-in is not possible. Check the CSS that positions the iframe of Roomle"),0)},dt=(i,t,e={x:0,y:0})=>{const s=i.getBoundingClientRect(),n=M(i).transform;let r=0,o=0;if(n!=="none"){const u=/translate\(\s*([-+]?\d*\.?\d+|\d+)(px|%)?,?\s*([-+]?\d*\.?\d+|\d+)?(px|%)?\s*\)/,g=n.match(u);g&&(r=ct(g[1],g[2],i),o=ct(g[3],g[4],i))}const{clientX:a,clientY:c}=b(t,e),l=a-s.left-r+i.scrollLeft,d=c-s.top-o+i.scrollTop;return{x:l,y:d}},b=(i,t=null)=>{const{clientX:e,clientY:s}=f(i)?Gt(i):i,n=e>0?e:t?t.x:e,r=s>0?s:t?t.y:s;return{clientX:n,clientY:r}},Gt=i=>{if(i.touches.length){let{clientX:e,clientY:s}=i.touches[0];if(i.touches.length>1){const n=i.touches[1],r=n.clientX,o=n.clientY;e=(e+r)/2,s=(s+o)/2}return{clientX:e,clientY:s}}const t=i.changedTouches[0];return{clientX:t.clientX,clientY:t.clientY}},G=500,Y=10,Yt=100,ut=15,X=(i,t=0)=>f(i)?{clientX:i.touches[t].clientX,clientY:i.touches[t].clientY}:{clientX:i.clientX,clientY:i.clientY},gt=i=>i&&f(i)?i.touches.length>0:!0;class mt{constructor(t,{onTouchDragStart:e},s={}){h(this,"_touchDragTimeOut"),h(this,"_onTouchDragStart"),h(this,"_payload",null),h(this,"_delay",G),h(this,"_firstTouch",null),h(this,"_lastTouch",null),h(this,"_epsilon",Y),this._payload=t,this._onTouchDragStart=e,this._delay=typeof s.delay=="number"?s.delay:G,this._epsilon=typeof s.epsilon=="number"?s.epsilon:Y}onStart(t){gt(t)&&(this._touchDragTimeOut||(this._firstTouch=X(t,f(t)?t.touches.length-1:0),this._touchDragTimeOut=setTimeout(()=>{this._clearTimeout(),this._lastTouch||(this._lastTouch=X(t)),this._checkXDistance(t)()},this._delay)))}onEnd(){this._resetTouches()}onMove(t){gt(t)&&(this._lastTouch=X(t))}_clearTimeout(){this._touchDragTimeOut&&(clearTimeout(this._touchDragTimeOut),this._touchDragTimeOut=null)}_resetTouches(){this._clearTimeout(),this._lastTouch=null,this._firstTouch=null,this._payload=null}_checkXDistance(t){return()=>{if(!this._firstTouch||!this._lastTouch)return;let e=!1;e=Math.abs(this._firstTouch.clientX-this._lastTouch.clientX)<this._epsilon,e&&(this._onTouchDragStart(this._payload,t),this._resetTouches())}}}const _t=(i,t,e=0,s=0)=>{const n=t.x+t.width+e,r=t.x-e,o=t.y+t.height+s,a=t.y-s,{x:c,y:l}=i;return c>=r&&c<=n&&l>=a&&l<=o},pt=(i,t,e,s=0,n=0)=>{if(!(!e||!e.hiddenIn&&!e.visibleIn))return e.visibleIn?_t({x:i,y:t},e.visibleIn,s,n):e.hiddenIn?!_t({x:i,y:t},e.hiddenIn,-s,-n):!1},Xt=()=>{if(!document.getElementById(T)){const i=document.createElement("style");i.type="text/css",i.id=T,i.innerHTML=`
14
+ `,document.head.appendChild(t)}}_initializeDragGhost(){const t=this._mainDomElement.parentNode;let e=t.querySelector("."+O);e||(e=document.createElement("div"),e.classList.add(O),e.innerText=" ",t.appendChild(e))}async init(){if(await super.init(),this._mode==="website")try{const{DragInFromWebsiteStrategy:t}=await Promise.resolve().then(()=>zt);this._strategy=new t(this._instance,this._mainDomElement,{settings:this.options,mode:"website"})}catch(t){throw console.error('Could not load Dragin strategy "FromWebsite"'),t}else if(this._mode==="custom-view")try{const{DragInFromCustomViewStrategy:t}=await Promise.resolve().then(()=>te);this._strategy=new t(this._instance,this.options,this._viewName)}catch(t){throw console.error('Could not load Dragin strategy "FromCustomView"'),t}else throw new Error("Unsupported mode")}get isDragging(){return this._strategy.isDragging}dragStart(t,e,s="rml_id"){this._strategy.dragStart(t,e,s)}dragUpdate(t){this._strategy.dragUpdate(t)}dragEnd(){this._strategy.dragEnd()}touchStart(t,e,s="rml_id"){this._strategy.touchStart(t,e,s)}touchMove(t){this._strategy.touchMove(t)}touchEnd(){this._strategy.touchEnd()}dispose(){this._strategy.dispose()}beforeUpdateGhost(t){this._strategy.beforeUpdateGhost(t)}registerCustomDrag({customDragStart:t,customDragEnd:e,customDragUpdate:s,beforeUpdateGhost:n}){n&&this._strategy.beforeUpdateGhost(n);const r=this._customDragSignal.signal,o=l=>{l.target.getAttribute("data-rml-draggable")==="true"&&t(l)},a=l=>{this._strategy.releaseInput(l),this._strategy.isDragging&&e(l)},c=l=>{s(l)};document.querySelectorAll('[data-rml-draggable="true"]').forEach(l=>{l.draggable=!1}),document.addEventListener("mousedown",o,{signal:r}),document.addEventListener("mouseup",a,{signal:r}),document.addEventListener("mousemove",c,{signal:r}),document.addEventListener("mouseleave",a,{signal:r}),document.addEventListener("touchstart",o,{signal:r}),document.addEventListener("touchend",a,{signal:r}),document.addEventListener("touchmove",c,{signal:r})}unregisterCustomDrag(){this._customDragSignal.abort(),this._customDragSignal=new AbortController}releaseInput(t){this._strategy.releaseInput(t)}}const Ut=Object.freeze(Object.defineProperty({__proto__:null,DragIn:Bt},Symbol.toStringTag,{value:"Module"}));class Ht{constructor(t=16){h(this,"_computedStyleCache",new Map),h(this,"_maxLifetime",16),h(this,"_cacheCleanInterval",null),this._maxLifetime=t}get(t){const e=this._computedStyleCache.get(t),s=Date.now();if(e&&s-e.updated<this._maxLifetime)return e.style;const n=getComputedStyle(t);return this._computedStyleCache.set(t,{style:n,updated:s}),this._cacheCleanInterval||(this._cacheCleanInterval=setInterval(()=>this._cleanUpCache,Math.max(this._maxLifetime*1e3,5e3))),n}_cleanUpCache(){const t=Date.now();for(const[e,{updated:s}]of this._computedStyleCache.entries())t-s>=this._maxLifetime&&this._computedStyleCache.delete(e);this._computedStyleCache.size===0&&this._cacheCleanInterval&&(clearInterval(this._cacheCleanInterval),this._cacheCleanInterval=null)}}const f=i=>window.TouchEvent&&i instanceof window.TouchEvent;let H;const M=i=>(H||(H=new Ht),H.get(i)),ct=(i,t,e)=>{const s=parseFloat(i),n=window.devicePixelRatio||1;if(t==="px")return s;if(t==="%"){const o=e===document.documentElement?window.innerWidth:e.offsetWidth;return s/100*o}if(t==="rem"){const o=parseFloat(M(document.documentElement).fontSize);return s*o}if(t==="em"){const o=parseFloat(M(e).fontSize);return s*o}if(t==="vh"||t==="vw"||t==="vmin"||t==="vmax"){const o={vh:window.innerHeight,vw:window.innerWidth,vmin:Math.min(window.innerWidth,window.innerHeight),vmax:Math.max(window.innerWidth,window.innerHeight)};return s/100*o[t]}const r={cm:37.7952755906,mm:3.77952755906,in:96};return t in r?s*r[t]*n:(console.warn("Unable to determine coordinates for drag-in. Therefore drag-in is not possible. Check the CSS that positions the iframe of Roomle"),0)},dt=(i,t,e={x:0,y:0})=>{const s=i.getBoundingClientRect(),n=M(i).transform;let r=0,o=0;if(n!=="none"){const u=/translate\(\s*([-+]?\d*\.?\d+|\d+)(px|%)?,?\s*([-+]?\d*\.?\d+|\d+)?(px|%)?\s*\)/,g=n.match(u);g&&(r=ct(g[1],g[2],i),o=ct(g[3],g[4],i))}const{clientX:a,clientY:c}=b(t,e),l=a-s.left-r+i.scrollLeft,d=c-s.top-o+i.scrollTop;return{x:l,y:d}},b=(i,t=null)=>{const{clientX:e,clientY:s}=f(i)?Gt(i):i,n=e>0?e:t?t.x:e,r=s>0?s:t?t.y:s;return{clientX:n,clientY:r}},Gt=i=>{if(i.touches.length){let{clientX:e,clientY:s}=i.touches[0];if(i.touches.length>1){const n=i.touches[1],r=n.clientX,o=n.clientY;e=(e+r)/2,s=(s+o)/2}return{clientX:e,clientY:s}}const t=i.changedTouches[0];return{clientX:t.clientX,clientY:t.clientY}},G=500,Y=10,Yt=100,ut=15,W=(i,t=0)=>f(i)?{clientX:i.touches[t].clientX,clientY:i.touches[t].clientY}:{clientX:i.clientX,clientY:i.clientY},gt=i=>i&&f(i)?i.touches.length>0:!0;class mt{constructor(t,{onTouchDragStart:e},s={}){h(this,"_touchDragTimeOut"),h(this,"_onTouchDragStart"),h(this,"_payload",null),h(this,"_delay",G),h(this,"_firstTouch",null),h(this,"_lastTouch",null),h(this,"_epsilon",Y),this._payload=t,this._onTouchDragStart=e,this._delay=typeof s.delay=="number"?s.delay:G,this._epsilon=typeof s.epsilon=="number"?s.epsilon:Y}onStart(t){gt(t)&&(this._touchDragTimeOut||(this._firstTouch=W(t,f(t)?t.touches.length-1:0),this._touchDragTimeOut=setTimeout(()=>{this._clearTimeout(),this._lastTouch||(this._lastTouch=W(t)),this._checkXDistance(t)()},this._delay)))}onEnd(){this._resetTouches()}onMove(t){gt(t)&&(this._lastTouch=W(t))}_clearTimeout(){this._touchDragTimeOut&&(clearTimeout(this._touchDragTimeOut),this._touchDragTimeOut=null)}_resetTouches(){this._clearTimeout(),this._lastTouch=null,this._firstTouch=null,this._payload=null}_checkXDistance(t){return()=>{if(!this._firstTouch||!this._lastTouch)return;let e=!1;e=Math.abs(this._firstTouch.clientX-this._lastTouch.clientX)<this._epsilon,e&&(this._onTouchDragStart(this._payload,t),this._resetTouches())}}}const _t=(i,t,e=0,s=0)=>{const n=t.x+t.width+e,r=t.x-e,o=t.y+t.height+s,a=t.y-s,{x:c,y:l}=i;return c>=r&&c<=n&&l>=a&&l<=o},pt=(i,t,e,s=0,n=0)=>{if(!(!e||!e.hiddenIn&&!e.visibleIn))return e.visibleIn?_t({x:i,y:t},e.visibleIn,s,n):e.hiddenIn?!_t({x:i,y:t},e.hiddenIn,-s,-n):!1},Wt=()=>{if(!document.getElementById(T)){const i=document.createElement("style");i.type="text/css",i.id=T,i.innerHTML=`
15
15
  ${ot}
16
16
  ${at}
17
- `,document.head.appendChild(i)}},kt=({x:i,y:t},e)=>{var s,n,r,o,a,c;let l=document.getElementById(I);if(!l){if(l=document.createElement("div"),(s=e.ghost)!=null&&s.element)l.appendChild(e.ghost.element);else{const d=document.createElement("img");d.src=((n=e.ghost)==null?void 0:n.url)||x,d.width=((r=e.ghost)==null?void 0:r.width)||B,d.height=((o=e.ghost)==null?void 0:o.height)||U,l.appendChild(d)}l.id=I,l.style.position="fixed",l.style.top="0",l.style.left="0",l.style.willChange="transform",l.style.transform="translate3d(0, 0, 0)",l.style.zIndex="9999",l.style.opacity="0.5",pt(i,t,e.ghost||{},(a=e.settings)==null?void 0:a.dragInOverlapX,(c=e.settings)==null?void 0:c.dragInOverlapY)||(l.style.display="none"),l.style.pointerEvents="none",document.body.appendChild(l)}},Wt=({x:i,y:t},e)=>{var s,n,r,o;const a=document.getElementById(I);if(!a)return;let c=(s=e.ghost)==null?void 0:s.width,l=(n=e.ghost)==null?void 0:n.height;typeof c>"u"&&(c=a.getBoundingClientRect().width||B),typeof l>"u"&&(l=a.getBoundingClientRect().height||U);const d=i-c/2,u=t-l/2;a.style.transform=`translate3d(${d}px, ${u}px, 0)`,e.ghost&&(pt(i,t,e.ghost,(r=e.settings)==null?void 0:r.dragInOverlapX,(o=e.settings)==null?void 0:o.dragInOverlapY)?a.style.animation!=lt&&(a.style.animation=lt):a.style.animation!=ht&&(a.style.animation=ht))};class $t{constructor(t=null){h(this,"_dragGhostAnimationFrameId",null),h(this,"_dragGhostRemoveAnimationFrameId",null),h(this,"_dragGhostElement",null),this._dragGhostElement=t}updateDragGhost(t,e,s){var n;this._dragGhostRemoveAnimationFrameId&&(cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId),this._dragGhostRemoveAnimationFrameId=null),!((n=s.ghost)!=null&&n.external)&&s.ghost&&(this._dragGhostAnimationFrameId||(this._dragGhostAnimationFrameId=requestAnimationFrame(()=>{Xt();const r={x:t,y:e};!s.ghost&&this._dragGhostElement&&(s.ghost={}),s.ghost&&!s.ghost.element&&this._dragGhostElement&&(s.ghost.element=this._dragGhostElement),kt(r,s),Wt(r,s),this._dragGhostAnimationFrameId=null})))}removeDragGhost(){this._dragGhostAnimationFrameId&&(cancelAnimationFrame(this._dragGhostAnimationFrameId),this._dragGhostAnimationFrameId=null),this._dragGhostRemoveAnimationFrameId||(this._dragGhostRemoveAnimationFrameId=requestAnimationFrame(()=>{const t=document.getElementById(I);t&&document.body.removeChild(t),this._dragGhostRemoveAnimationFrameId=null}))}}class jt{constructor(t,e,s){h(this,"_options",{}),h(this,"_instance"),h(this,"_mainDomElement"),h(this,"_currentDrag",{}),h(this,"_currentTouch",null),h(this,"_firefoxDragPosition",{x:0,y:0}),h(this,"_onBeforeUpdateDrag",()=>({})),h(this,"isDragging",!1),h(this,"_firefoxFallback",n=>{if(!this._currentDrag.event)return;n.preventDefault();const r=n||window.event;this._firefoxDragPosition.x=r.pageX||0,this._firefoxDragPosition.y=r.pageY||0}),this._instance=t,this._mainDomElement=e,this._options=s||{},this._firefoxFallback=this._firefoxFallback.bind(this),document.addEventListener("dragover",this._firefoxFallback)}beforeUpdateGhost(t){this._onBeforeUpdateDrag=t}dragStart(t,e,s="rml_id"){const n=this._mainDomElement.parentNode;if(M(n).position!=="relative"){console.warn("Parent of iframe should have position relative, otherwise drag-in can not detect the x/y coordinates correctly");return}this._mainDomElement.style.pointerEvents="none";let r=n.querySelector("."+S);r||(r=document.createElement("div"),r.classList.add(S),n.appendChild(r)),r.classList.remove(F.DISPLAY_NONE),e.target.getAttribute("draggable")||console.warn(`Draggable not detected correctly! Did you add draggable="true" to the element? In Sarafi only 'draggable' is too less`);const o=n.querySelector("."+O);this._currentDrag.event=e;const a=e.target,c=a.cloneNode(),l=a.getBoundingClientRect();c.style.width=`${l.width}px`,c.style.height=`${l.height}px`,this._currentDrag.ghost=new $t(c),this._currentDrag.offset||(this._currentDrag.offset={x:0,y:0});const{clientX:d,clientY:u}=b(e,this._firefoxDragPosition);this._currentDrag.offset.x=d-l.left,this._currentDrag.offset.y=u-l.top,e instanceof DragEvent&&e.dataTransfer&&e.dataTransfer.setDragImage&&e.dataTransfer.setDragImage(o,0,0);const{x:g,y:_}=dt(n,this._currentDrag.event||e,this._firefoxDragPosition),y=Math.max(1,g),w=Math.max(1,_);this.isDragging=!0,this._instance.dragInObject(t,y,w,s)}dragUpdate(t){var e;const s=this._mainDomElement.parentNode,{x:n,y:r}=dt(s,t,this._firefoxDragPosition);if(n===0&&r===0)return;const o=Math.max(1,n),a=Math.max(1,r);if(o===1&&a===1)return;let c=o,l=a;if(f(t)){const v=((e=this._options.settings)==null?void 0:e.fingerSize)||0;c=Math.max(2,o+v),l=Math.max(2,a-v)}const{x:d,y:u,options:g}=this._onBeforeUpdateDrag(c,l,{}),_=g||{settings:{},ghost:{}};_.ghost||(_.ghost={}),_.ghost.visibleIn&&_.ghost.hiddenIn||(_.ghost.hiddenIn=this._mainDomElement.getBoundingClientRect());const y=typeof d=="number"?d:c,w=typeof u=="number"?u:l;if(this._currentDrag.ghost){const{clientX:v,clientY:ee}=b(t,this._firefoxDragPosition);this._currentDrag.ghost.updateDragGhost(v,ee,_)}this._instance.updateDrag(y,w,{})}dragEnd(){this._mainDomElement.style.pointerEvents="all";const t=this._mainDomElement.parentNode;this.isDragging=!1,this._instance.dragInObjectEnd(),this._currentDrag.ghost&&(this._currentDrag.ghost.removeDragGhost(),this._currentDrag.ghost=null),this._currentDrag={},this._firefoxDragPosition={x:0,y:0};const e=t.querySelector("."+S);e&&e.classList.add(F.DISPLAY_NONE)}touchStart(t,e,s="rml_id"){var n,r,o,a;e.preventDefault();const c=(d,u)=>{this.dragStart(t,u,s)},l={};typeof((r=(n=this._options)==null?void 0:n.settings)==null?void 0:r.touchDragDelay)=="number"&&(l.delay=this._options.settings.touchDragDelay),(a=(o=this._options)==null?void 0:o.settings)!=null&&a.touchDragEpsilon&&(l.epsilon=this._options.settings.touchDragEpsilon),this._currentTouch=new mt(void 0,{onTouchDragStart:c},l),this._currentTouch.onStart(e)}touchMove(t){this._currentTouch&&this._currentTouch.onMove(t),this._currentDrag.event&&this.dragUpdate(t)}touchEnd(){this._currentTouch&&this._currentTouch.onEnd(),this._currentTouch=null,this.dragEnd()}dispose(){document.removeEventListener("dragover",this._firefoxFallback)}releaseInput(t){}}const zt=Object.freeze(Object.defineProperty({__proto__:null,DragInFromWebsiteStrategy:jt},Symbol.toStringTag,{value:"Module"})),Vt=i=>`[data-rml-custom-view="${i}"]`,k=i=>{i.preventDefault(),i.stopPropagation()},qt=(i,t,e,s)=>{const n=e-i,r=s-t;return Math.sqrt(n*n+r*r)};class Jt{constructor({onCustomDragStart:t},e={}){h(this,"_startX",0),h(this,"_startY",0),h(this,"_lastX",0),h(this,"_lastY",0),h(this,"_epsilon"),h(this,"_isWaiting",!1),h(this,"_onCustomDragStart"),this._epsilon=typeof e.epsilon=="number"?e.epsilon:ut,this._onCustomDragStart=t}onMove(t){this._lastX=t.clientX,this._lastY=t.clientY,this._isWaiting&&qt(this._startX,this._startY,this._lastX,this._lastY)>this._epsilon&&(this._onCustomDragStart(t),this._isWaiting=!1)}onStart(t){this._startX=t.clientX,this._startY=t.clientY,this.onMove(t),this._isWaiting=!0}onEnd(){this._reset()}_reset(){this._startX=0,this._startY=0,this._lastX=0,this._lastY=0,this._isWaiting=!1}}const W="data-rml-old-draggable",Kt=void 0,ft=(i,t)=>{const e=f(i),s={delay:e?G:Yt,epsilon:e?Y:ut};if(!t)return s;if(!e&&!(i instanceof MouseEvent))return console.warn("Unsupported event! It is not TouchEvent and also not MouseEvent"),s;const{delayKey:n,epsilonKey:r}=e?{delayKey:"touchDragDelay",epsilonKey:"touchDragEpsilon"}:{delayKey:"customDragDelay",epsilonKey:"customDragEpsilon"};return typeof t[n]=="number"&&(s.delay=t.touchDragDelay),typeof t[r]=="number"&&(s.epsilon=t.touchDragEpsilon),s},Qt=i=>{let t="",e=B,s=U;if(!i)return{url:x,width:e,height:s};const n=i;if(n instanceof HTMLElement){const r=n.getBoundingClientRect(),o=n.getAttribute("data-rml-ghost-url"),a=n.getAttribute("data-rml-ghost-width"),c=n.getAttribute("data-rml-ghost-height");o?t=o:!o&&n instanceof HTMLImageElement&&n.src&&(t=n.src),t?(e=r.width,s=r.height):t=x,e=a?parseInt(a,10):e,s=c?parseInt(c,10):s}return{url:t||x,width:e,height:s}};class Zt{constructor(t,e,s){h(this,"_options",{}),h(this,"_instance"),h(this,"_viewName"),h(this,"_currentCustomDrag",null),h(this,"_currentBb",null),h(this,"_startTarget",null),h(this,"_onBeforeUpdateDrag",()=>({})),h(this,"isDragging",!1),this._instance=t,this._options=e||{},this._viewName=s}beforeUpdateGhost(t){this._onBeforeUpdateDrag=t}async _dragStart(t,e,s="rml_id"){this._startTarget&&(this._startTarget.style.pointerEvents="none",this._startTarget.style.userSelect="none",this._startTarget.setAttribute(W,this._startTarget.draggable.toString()),this._startTarget.draggable=!1,this._startTarget.removeEventListener("dragstart",k),this._startTarget.addEventListener("dragstart",k)),this._currentBb=await this._instance.getBoundingClientRect(Vt(this._viewName));const{clientX:n,clientY:r}=b(e),o=this._currentBb.x+n,a=this._currentBb.y+r;this.isDragging=!0,this._instance.dragInObject(t,o,a,s)}_dragUpdate(t){if(document.body.focus(),this._currentCustomDrag&&this._currentCustomDrag.onMove(t),!this._currentBb||!this.isDragging)return;const{clientX:e,clientY:s}=b(t),{url:n,width:r,height:o}=Qt(this._startTarget),a=this._currentBb.x+e,c=this._currentBb.y+s,l=this._options||{},d={ghost:{visibleIn:{x:this._currentBb.x-(l.dragInOverlapX||0),y:this._currentBb.y+(l.dragInOverlapY||0),width:this._currentBb.width+(l.dragInOverlapX||0),height:this._currentBb.height+(l.dragInOverlapY||0)},url:n,width:r,height:o},mode:"custom-view"},{x:u,y:g,options:_}=this._onBeforeUpdateDrag(a,c,d),y=typeof u=="number"?u:a,w=typeof g=="number"?g:c,v=_||d;this._instance.updateDrag(y,w,v)}_dragEnd(){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._currentCustomDrag=null,this.isDragging=!1,this._currentBb=null,this._resetStartTarget(),this._instance.enableEvents(),this._instance.dragInObjectEnd()}dragStart(t,e,s){this._instance.disableEvents(),this._startTarget=e.target;const n=(r,o)=>{this._dragStart(t,o,s)};this._currentCustomDrag=f(e)?new mt(Kt,{onTouchDragStart:n},ft(e,this._options)):new Jt({onCustomDragStart:r=>this._dragStart(t,r,s)},ft(e,this._options)),this._currentCustomDrag.onStart(e)}dragEnd(){this._dragEnd()}dragUpdate(t){this._dragUpdate(t)}touchStart(t,e,s="rml_id"){this.dragStart(t,e,s)}touchMove(t){this.dragUpdate(t)}touchEnd(){this.dragEnd()}dispose(){}_resetStartTarget(){this._startTarget&&(this._startTarget.style.pointerEvents="",this._startTarget.style.userSelect="",this._startTarget.draggable=this._startTarget.getAttribute(W)==="true",this._startTarget.removeAttribute(W),this._startTarget.removeEventListener("dragstart",k))}releaseInput(t){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._resetStartTarget()}}const te=Object.freeze(Object.defineProperty({__proto__:null,DragInFromCustomViewStrategy:Zt},Symbol.toStringTag,{value:"Module"}));return Pt});
17
+ `,document.head.appendChild(i)}},Xt=({x:i,y:t},e)=>{var s,n,r,o,a,c;let l=document.getElementById(I);if(!l){if(l=document.createElement("div"),(s=e.ghost)!=null&&s.element)l.appendChild(e.ghost.element);else{const d=document.createElement("img");d.src=((n=e.ghost)==null?void 0:n.url)||x,d.width=((r=e.ghost)==null?void 0:r.width)||B,d.height=((o=e.ghost)==null?void 0:o.height)||U,l.appendChild(d)}l.id=I,l.style.position="fixed",l.style.top="0",l.style.left="0",l.style.willChange="transform",l.style.transform="translate3d(0, 0, 0)",l.style.zIndex="9999",l.style.opacity="0.5",pt(i,t,e.ghost||{},(a=e.settings)==null?void 0:a.dragInOverlapX,(c=e.settings)==null?void 0:c.dragInOverlapY)||(l.style.display="none"),l.style.pointerEvents="none",document.body.appendChild(l)}},kt=({x:i,y:t},e)=>{var s,n,r,o;const a=document.getElementById(I);if(!a)return;let c=(s=e.ghost)==null?void 0:s.width,l=(n=e.ghost)==null?void 0:n.height;typeof c>"u"&&(c=a.getBoundingClientRect().width||B),typeof l>"u"&&(l=a.getBoundingClientRect().height||U);const d=i-c/2,u=t-l/2;a.style.transform=`translate3d(${d}px, ${u}px, 0)`,e.ghost&&(pt(i,t,e.ghost,(r=e.settings)==null?void 0:r.dragInOverlapX,(o=e.settings)==null?void 0:o.dragInOverlapY)?a.style.animation!=lt&&(a.style.animation=lt):a.style.animation!=ht&&(a.style.animation=ht))};class $t{constructor(t=null){h(this,"_dragGhostAnimationFrameId",null),h(this,"_dragGhostRemoveAnimationFrameId",null),h(this,"_dragGhostElement",null),this._dragGhostElement=t}updateDragGhost(t,e,s){var n;this._dragGhostRemoveAnimationFrameId&&(cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId),this._dragGhostRemoveAnimationFrameId=null),!((n=s.ghost)!=null&&n.external)&&s.ghost&&(this._dragGhostAnimationFrameId||(this._dragGhostAnimationFrameId=requestAnimationFrame(()=>{Wt();const r={x:t,y:e};!s.ghost&&this._dragGhostElement&&(s.ghost={}),s.ghost&&!s.ghost.element&&this._dragGhostElement&&(s.ghost.element=this._dragGhostElement),Xt(r,s),kt(r,s),this._dragGhostAnimationFrameId=null})))}removeDragGhost(){this._dragGhostAnimationFrameId&&(cancelAnimationFrame(this._dragGhostAnimationFrameId),this._dragGhostAnimationFrameId=null),this._dragGhostRemoveAnimationFrameId||(this._dragGhostRemoveAnimationFrameId=requestAnimationFrame(()=>{const t=document.getElementById(I);t&&document.body.removeChild(t),this._dragGhostRemoveAnimationFrameId=null}))}}class jt{constructor(t,e,s){h(this,"_options",{}),h(this,"_instance"),h(this,"_mainDomElement"),h(this,"_currentDrag",{}),h(this,"_currentTouch",null),h(this,"_firefoxDragPosition",{x:0,y:0}),h(this,"_onBeforeUpdateDrag",()=>({})),h(this,"isDragging",!1),h(this,"_firefoxFallback",n=>{if(!this._currentDrag.event)return;n.preventDefault();const r=n||window.event;this._firefoxDragPosition.x=r.pageX||0,this._firefoxDragPosition.y=r.pageY||0}),this._instance=t,this._mainDomElement=e,this._options=s||{},this._firefoxFallback=this._firefoxFallback.bind(this),document.addEventListener("dragover",this._firefoxFallback)}beforeUpdateGhost(t){this._onBeforeUpdateDrag=t}dragStart(t,e,s="rml_id"){const n=this._mainDomElement.parentNode;if(M(n).position!=="relative"){console.warn("Parent of iframe should have position relative, otherwise drag-in can not detect the x/y coordinates correctly");return}this._mainDomElement.style.pointerEvents="none";let r=n.querySelector("."+S);r||(r=document.createElement("div"),r.classList.add(S),n.appendChild(r)),r.classList.remove(F.DISPLAY_NONE),e.target.getAttribute("draggable")||console.warn(`Draggable not detected correctly! Did you add draggable="true" to the element? In Sarafi only 'draggable' is too less`);const o=n.querySelector("."+O);this._currentDrag.event=e;const a=e.target,c=a.cloneNode(),l=a.getBoundingClientRect();c.style.width=`${l.width}px`,c.style.height=`${l.height}px`,this._currentDrag.ghost=new $t(c),this._currentDrag.offset||(this._currentDrag.offset={x:0,y:0});const{clientX:d,clientY:u}=b(e,this._firefoxDragPosition);this._currentDrag.offset.x=d-l.left,this._currentDrag.offset.y=u-l.top,e instanceof DragEvent&&e.dataTransfer&&e.dataTransfer.setDragImage&&e.dataTransfer.setDragImage(o,0,0);const{x:g,y:_}=dt(n,this._currentDrag.event||e,this._firefoxDragPosition),y=Math.max(1,g),w=Math.max(1,_);this.isDragging=!0,this._instance.dragInObject(t,y,w,s)}dragUpdate(t){var e;const s=this._mainDomElement.parentNode,{x:n,y:r}=dt(s,t,this._firefoxDragPosition);if(n===0&&r===0)return;const o=Math.max(1,n),a=Math.max(1,r);if(o===1&&a===1)return;let c=o,l=a;if(f(t)){const v=((e=this._options.settings)==null?void 0:e.fingerSize)||0;c=Math.max(2,o+v),l=Math.max(2,a-v)}const{x:d,y:u,options:g}=this._onBeforeUpdateDrag(c,l,{}),_=g||{settings:{},ghost:{}};_.ghost||(_.ghost={}),_.ghost.visibleIn&&_.ghost.hiddenIn||(_.ghost.hiddenIn=this._mainDomElement.getBoundingClientRect());const y=typeof d=="number"?d:c,w=typeof u=="number"?u:l;if(this._currentDrag.ghost){const{clientX:v,clientY:ee}=b(t,this._firefoxDragPosition);this._currentDrag.ghost.updateDragGhost(v,ee,_)}this._instance.updateDrag(y,w,{})}dragEnd(){this._mainDomElement.style.pointerEvents="all";const t=this._mainDomElement.parentNode;this.isDragging=!1,this._instance.dragInObjectEnd(),this._currentDrag.ghost&&(this._currentDrag.ghost.removeDragGhost(),this._currentDrag.ghost=null),this._currentDrag={},this._firefoxDragPosition={x:0,y:0};const e=t.querySelector("."+S);e&&e.classList.add(F.DISPLAY_NONE)}touchStart(t,e,s="rml_id"){var n,r,o,a;e.preventDefault();const c=(d,u)=>{this.dragStart(t,u,s)},l={};typeof((r=(n=this._options)==null?void 0:n.settings)==null?void 0:r.touchDragDelay)=="number"&&(l.delay=this._options.settings.touchDragDelay),(a=(o=this._options)==null?void 0:o.settings)!=null&&a.touchDragEpsilon&&(l.epsilon=this._options.settings.touchDragEpsilon),this._currentTouch=new mt(void 0,{onTouchDragStart:c},l),this._currentTouch.onStart(e)}touchMove(t){this._currentTouch&&this._currentTouch.onMove(t),this._currentDrag.event&&this.dragUpdate(t)}touchEnd(){this._currentTouch&&this._currentTouch.onEnd(),this._currentTouch=null,this.dragEnd()}dispose(){document.removeEventListener("dragover",this._firefoxFallback)}releaseInput(t){}}const zt=Object.freeze(Object.defineProperty({__proto__:null,DragInFromWebsiteStrategy:jt},Symbol.toStringTag,{value:"Module"})),Vt=i=>`[data-rml-custom-view="${i}"]`,X=i=>{i.preventDefault(),i.stopPropagation()},qt=(i,t,e,s)=>{const n=e-i,r=s-t;return Math.sqrt(n*n+r*r)};class Jt{constructor({onCustomDragStart:t},e={}){h(this,"_startX",0),h(this,"_startY",0),h(this,"_lastX",0),h(this,"_lastY",0),h(this,"_epsilon"),h(this,"_isWaiting",!1),h(this,"_onCustomDragStart"),this._epsilon=typeof e.epsilon=="number"?e.epsilon:ut,this._onCustomDragStart=t}onMove(t){this._lastX=t.clientX,this._lastY=t.clientY,this._isWaiting&&qt(this._startX,this._startY,this._lastX,this._lastY)>this._epsilon&&(this._onCustomDragStart(t),this._isWaiting=!1)}onStart(t){this._startX=t.clientX,this._startY=t.clientY,this.onMove(t),this._isWaiting=!0}onEnd(){this._reset()}_reset(){this._startX=0,this._startY=0,this._lastX=0,this._lastY=0,this._isWaiting=!1}}const k="data-rml-old-draggable",Kt=void 0,ft=(i,t)=>{const e=f(i),s={delay:e?G:Yt,epsilon:e?Y:ut};if(!t)return s;if(!e&&!(i instanceof MouseEvent))return console.warn("Unsupported event! It is not TouchEvent and also not MouseEvent"),s;const{delayKey:n,epsilonKey:r}=e?{delayKey:"touchDragDelay",epsilonKey:"touchDragEpsilon"}:{delayKey:"customDragDelay",epsilonKey:"customDragEpsilon"};return typeof t[n]=="number"&&(s.delay=t.touchDragDelay),typeof t[r]=="number"&&(s.epsilon=t.touchDragEpsilon),s},Qt=i=>{let t="",e=B,s=U;if(!i)return{url:x,width:e,height:s};const n=i;if(n instanceof HTMLElement){const r=n.getBoundingClientRect(),o=n.getAttribute("data-rml-ghost-url"),a=n.getAttribute("data-rml-ghost-width"),c=n.getAttribute("data-rml-ghost-height");o?t=o:!o&&n instanceof HTMLImageElement&&n.src&&(t=n.src),t?(e=r.width,s=r.height):t=x,e=a?parseInt(a,10):e,s=c?parseInt(c,10):s}return{url:t||x,width:e,height:s}};class Zt{constructor(t,e,s){h(this,"_options",{}),h(this,"_instance"),h(this,"_viewName"),h(this,"_currentCustomDrag",null),h(this,"_currentBb",null),h(this,"_startTarget",null),h(this,"_onBeforeUpdateDrag",()=>({})),h(this,"isDragging",!1),this._instance=t,this._options=e||{},this._viewName=s}beforeUpdateGhost(t){this._onBeforeUpdateDrag=t}async _dragStart(t,e,s="rml_id"){this._startTarget&&(this._startTarget.style.pointerEvents="none",this._startTarget.style.userSelect="none",this._startTarget.setAttribute(k,this._startTarget.draggable.toString()),this._startTarget.draggable=!1,this._startTarget.removeEventListener("dragstart",X),this._startTarget.addEventListener("dragstart",X)),this._currentBb=await this._instance.getBoundingClientRect(Vt(this._viewName));const{clientX:n,clientY:r}=b(e),o=this._currentBb.x+n,a=this._currentBb.y+r;this.isDragging=!0,this._instance.dragInObject(t,o,a,s)}_dragUpdate(t){if(document.body.focus(),this._currentCustomDrag&&this._currentCustomDrag.onMove(t),!this._currentBb||!this.isDragging)return;const{clientX:e,clientY:s}=b(t),{url:n,width:r,height:o}=Qt(this._startTarget),a=this._currentBb.x+e,c=this._currentBb.y+s,l=this._options||{},d={ghost:{visibleIn:{x:this._currentBb.x-(l.dragInOverlapX||0),y:this._currentBb.y+(l.dragInOverlapY||0),width:this._currentBb.width+(l.dragInOverlapX||0),height:this._currentBb.height+(l.dragInOverlapY||0)},url:n,width:r,height:o},mode:"custom-view"},{x:u,y:g,options:_}=this._onBeforeUpdateDrag(a,c,d),y=typeof u=="number"?u:a,w=typeof g=="number"?g:c,v=_||d;this._instance.updateDrag(y,w,v)}_dragEnd(){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._currentCustomDrag=null,this.isDragging=!1,this._currentBb=null,this._resetStartTarget(),this._instance.enableEvents(),this._instance.dragInObjectEnd()}dragStart(t,e,s){this._instance.disableEvents(),this._startTarget=e.target;const n=(r,o)=>{this._dragStart(t,o,s)};this._currentCustomDrag=f(e)?new mt(Kt,{onTouchDragStart:n},ft(e,this._options)):new Jt({onCustomDragStart:r=>this._dragStart(t,r,s)},ft(e,this._options)),this._currentCustomDrag.onStart(e)}dragEnd(){this._dragEnd()}dragUpdate(t){this._dragUpdate(t)}touchStart(t,e,s="rml_id"){this.dragStart(t,e,s)}touchMove(t){this.dragUpdate(t)}touchEnd(){this.dragEnd()}dispose(){}_resetStartTarget(){this._startTarget&&(this._startTarget.style.pointerEvents="",this._startTarget.style.userSelect="",this._startTarget.draggable=this._startTarget.getAttribute(k)==="true",this._startTarget.removeAttribute(k),this._startTarget.removeEventListener("dragstart",X))}releaseInput(t){this._currentCustomDrag&&this._currentCustomDrag.onEnd(),this._resetStartTarget()}}const te=Object.freeze(Object.defineProperty({__proto__:null,DragInFromCustomViewStrategy:Zt},Symbol.toStringTag,{value:"Module"}));return Pt});
@@ -61,6 +61,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
61
61
  default: boolean;
62
62
  };
63
63
  noHeightWrapper: BooleanConstructor;
64
+ disabled: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
64
68
  }>, {}, {
65
69
  toggleReason: string;
66
70
  customTooltipStyle: CSSProperties;
@@ -133,7 +137,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
133
137
  default: boolean;
134
138
  };
135
139
  noHeightWrapper: BooleanConstructor;
140
+ disabled: {
141
+ type: BooleanConstructor;
142
+ default: boolean;
143
+ };
136
144
  }>> & Readonly<{}>, {
145
+ disabled: boolean;
137
146
  noHeightWrapper: boolean;
138
147
  isLast: boolean;
139
148
  }, {}, {
@@ -28,6 +28,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
28
28
  onGridExpand?: () => void;
29
29
  payload?: UiPossibleChildTag;
30
30
  getTemplate?: (element: CollectionViewElement<CollectionViewElementPossibleTypes>) => string;
31
+ disabled?: boolean;
31
32
  }>, {
32
33
  label: any;
33
34
  elemKey: string;
@@ -35,6 +36,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
35
36
  isLast: boolean;
36
37
  hideBottomBorder: boolean;
37
38
  element: any;
39
+ disabled: boolean;
38
40
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
39
41
  label?: string;
40
42
  svgIcon?: string;
@@ -61,6 +63,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
61
63
  onGridExpand?: () => void;
62
64
  payload?: UiPossibleChildTag;
63
65
  getTemplate?: (element: CollectionViewElement<CollectionViewElementPossibleTypes>) => string;
66
+ disabled?: boolean;
64
67
  }>, {
65
68
  label: any;
66
69
  elemKey: string;
@@ -68,10 +71,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
68
71
  isLast: boolean;
69
72
  hideBottomBorder: boolean;
70
73
  element: any;
74
+ disabled: boolean;
71
75
  }>>> & Readonly<{}>, {
72
76
  label: string;
73
77
  type: string;
74
78
  element: CollectionViewElement<CollectionViewElementPossibleTypes>;
79
+ disabled: boolean;
75
80
  isLast: boolean;
76
81
  elemKey: string;
77
82
  hideBottomBorder: boolean;
@@ -121,7 +121,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
121
121
  isLightTheme: boolean;
122
122
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
123
123
  $slots: {
124
- content?(_: {}): any;
124
+ content?(_: {
125
+ alignToScene: boolean;
126
+ }): any;
125
127
  };
126
128
  });
127
129
  GoBack: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -1,6 +1,8 @@
1
1
  declare const _default: import('vue').DefineComponent<{
2
- onChangeParameterGroup: () => void;
2
+ isVisible: boolean;
3
+ onToggleVisibility: (visible: boolean) => void;
3
4
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
4
- onChangeParameterGroup: () => void;
5
+ isVisible: boolean;
6
+ onToggleVisibility: (visible: boolean) => void;
5
7
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
8
  export default _default;
@@ -24,6 +24,7 @@ export declare const SIDEBAR_EVENTS: {
24
24
  readonly POP_SIDEBAR: "pop-sidebar";
25
25
  readonly TOGGLE_SIDEBAR: "toggle-sidebar";
26
26
  readonly ACTIVATE_SIDEBAR: "activate-sidebar";
27
+ readonly REVALIDATE_WALL_PARAMS: "revalidate-wall-params";
27
28
  };
28
29
  export interface SidebarEventTypes {
29
30
  [SIDEBAR_EVENTS.SET_SIDEBAR]: SidebarType;
@@ -38,10 +39,10 @@ export interface NotificationEventTypes {
38
39
  [NOTIFICATION_EVENTS.SET_NOTIFICATION_STATE]: NotificationData;
39
40
  }
40
41
  export declare const UPDATE_EVENTS: {
41
- readonly WALL_LENGTH: "update-wall-length";
42
+ readonly WALL_PARAMS: "update-wall-params";
42
43
  };
43
44
  export interface UpdateEventTypes {
44
- [UPDATE_EVENTS.WALL_LENGTH]: void;
45
+ [UPDATE_EVENTS.WALL_PARAMS]: void;
45
46
  }
46
47
  export declare const CUSTOM_VIEW_EVENTS: {
47
48
  readonly SHOW: "show-custom-view";
@@ -9,4 +9,5 @@ export declare const usePlannerActionsVisibility: () => {
9
9
  showProductFlip: import('vue').ComputedRef<boolean>;
10
10
  selectionIsConstructionElement: import('vue').ComputedRef<boolean>;
11
11
  showSlopingButton: import('vue').ComputedRef<boolean>;
12
+ showWallVisibilityButton: import('vue').ComputedRef<boolean>;
12
13
  };
@@ -7,7 +7,6 @@ import { default as PlanElementViewModel } from '@roomle/web-sdk/lib/definitions
7
7
  import { SidebarType } from '../composables/use-event-emitter-listener';
8
8
  import { default as EventEmitter } from '../business-logic/event-emitter';
9
9
 
10
- export declare const scrollToSelectedGroup: (selectedKey: string, direction?: string) => void;
11
10
  export declare const isConstructionProduct: (selectionElement: PlanElementViewModel) => boolean;
12
11
  export default class UiActions {
13
12
  private _sdkConnector;
@@ -212,7 +212,9 @@ declare const _default: import('vue').DefineComponent<{}, {
212
212
  isLightTheme: boolean;
213
213
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
214
214
  $slots: {
215
- content?(_: {}): any;
215
+ content?(_: {
216
+ alignToScene: boolean;
217
+ }): any;
216
218
  };
217
219
  });
218
220
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -343,7 +345,9 @@ declare const _default: import('vue').DefineComponent<{}, {
343
345
  isLightTheme: boolean;
344
346
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
345
347
  $slots: {
346
- content?(_: {}): any;
348
+ content?(_: {
349
+ alignToScene: boolean;
350
+ }): any;
347
351
  };
348
352
  });
349
353
  SvgIcon: import('vue').DefineComponent<{
@@ -523,7 +527,9 @@ declare const _default: import('vue').DefineComponent<{}, {
523
527
  isLightTheme: boolean;
524
528
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
525
529
  $slots: {
526
- content?(_: {}): any;
530
+ content?(_: {
531
+ alignToScene: boolean;
532
+ }): any;
527
533
  };
528
534
  });
529
535
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -650,7 +656,9 @@ declare const _default: import('vue').DefineComponent<{}, {
650
656
  isLightTheme: boolean;
651
657
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
652
658
  $slots: {
653
- content?(_: {}): any;
659
+ content?(_: {
660
+ alignToScene: boolean;
661
+ }): any;
654
662
  };
655
663
  });
656
664
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -793,7 +801,9 @@ declare const _default: import('vue').DefineComponent<{}, {
793
801
  isLightTheme: boolean;
794
802
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
795
803
  $slots: {
796
- content?(_: {}): any;
804
+ content?(_: {
805
+ alignToScene: boolean;
806
+ }): any;
797
807
  };
798
808
  });
799
809
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -918,7 +928,9 @@ declare const _default: import('vue').DefineComponent<{}, {
918
928
  isLightTheme: boolean;
919
929
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
920
930
  $slots: {
921
- content?(_: {}): any;
931
+ content?(_: {
932
+ alignToScene: boolean;
933
+ }): any;
922
934
  };
923
935
  });
924
936
  GoBack: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -40,8 +40,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
40
40
  state: PropType<GridViewUiState>;
41
41
  }>> & Readonly<{}>, {
42
42
  isDesktop: boolean;
43
- selected: boolean;
44
43
  expanded: boolean;
44
+ selected: boolean;
45
45
  }, {}, {
46
46
  WordWrap: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
47
47
  text: StringConstructor;
@@ -123,7 +123,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
123
123
  isLightTheme: boolean;
124
124
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
125
125
  $slots: {
126
- content?(_: {}): any;
126
+ content?(_: {
127
+ alignToScene: boolean;
128
+ }): any;
127
129
  };
128
130
  });
129
131
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -119,7 +119,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
119
119
  isLightTheme: boolean;
120
120
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
121
121
  $slots: {
122
- content?(_: {}): any;
122
+ content?(_: {
123
+ alignToScene: boolean;
124
+ }): any;
123
125
  };
124
126
  });
125
127
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -140,7 +140,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
140
140
  isLightTheme: boolean;
141
141
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
142
142
  $slots: {
143
- content?(_: {}): any;
143
+ content?(_: {
144
+ alignToScene: boolean;
145
+ }): any;
144
146
  };
145
147
  });
146
148
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -119,7 +119,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
119
119
  isLightTheme: boolean;
120
120
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
121
121
  $slots: {
122
- content?(_: {}): any;
122
+ content?(_: {
123
+ alignToScene: boolean;
124
+ }): any;
123
125
  };
124
126
  });
125
127
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -128,7 +128,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
128
128
  isLightTheme: boolean;
129
129
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
130
130
  $slots: {
131
- content?(_: {}): any;
131
+ content?(_: {
132
+ alignToScene: boolean;
133
+ }): any;
132
134
  };
133
135
  });
134
136
  SvgIcon: import('vue').DefineComponent<{
@@ -1,45 +1,60 @@
1
- import { PropType } from 'vue';
2
-
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
- showText: BooleanConstructor;
5
- text: StringConstructor;
6
- isVisible: BooleanConstructor;
7
- onClick: {
8
- type: FunctionConstructor;
9
- required: true;
10
- };
11
- icon: {
12
- type: PropType<string>;
13
- required: true;
14
- };
15
- adjustIcon: BooleanConstructor;
16
- isSelected: BooleanConstructor;
17
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
18
- showText: BooleanConstructor;
19
- text: StringConstructor;
20
- isVisible: BooleanConstructor;
21
- onClick: {
22
- type: FunctionConstructor;
23
- required: true;
24
- };
25
- icon: {
26
- type: PropType<string>;
27
- required: true;
28
- };
29
- adjustIcon: BooleanConstructor;
30
- isSelected: BooleanConstructor;
31
- }>> & Readonly<{}>, {
1
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
2
+ showText?: boolean;
3
+ text?: string;
4
+ isVisible?: boolean;
5
+ onClick?: () => void;
6
+ icon?: string;
7
+ adjustIcon?: boolean;
8
+ isSelected?: boolean;
9
+ }>, {
10
+ showText: boolean;
11
+ isVisible: boolean;
12
+ adjustIcon: boolean;
32
13
  isSelected: boolean;
14
+ onClick: () => any;
15
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
16
+ showText?: boolean;
17
+ text?: string;
18
+ isVisible?: boolean;
19
+ onClick?: () => void;
20
+ icon?: string;
21
+ adjustIcon?: boolean;
22
+ isSelected?: boolean;
23
+ }>, {
33
24
  showText: boolean;
34
25
  isVisible: boolean;
35
26
  adjustIcon: boolean;
36
- }, {}, {
37
- SvgIcon: import('vue').DefineComponent<{
38
- icon: string;
39
- }, {
40
- svgIcon: import('vue').Ref<HTMLOrSVGElement, HTMLOrSVGElement>;
41
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
42
- icon: string;
43
- }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
44
- }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
27
+ isSelected: boolean;
28
+ onClick: () => any;
29
+ }>>> & Readonly<{}>, {
30
+ onClick: () => void;
31
+ isSelected: boolean;
32
+ isVisible: boolean;
33
+ showText: boolean;
34
+ adjustIcon: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
36
+ default?(_: {}): any;
37
+ }>;
45
38
  export default _default;
39
+ type __VLS_WithDefaults<P, D> = {
40
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
41
+ default: D[K];
42
+ }> : P[K];
43
+ };
44
+ type __VLS_Prettify<T> = {
45
+ [K in keyof T]: T[K];
46
+ } & {};
47
+ type __VLS_WithTemplateSlots<T, S> = T & {
48
+ new (): {
49
+ $slots: S;
50
+ };
51
+ };
52
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
53
+ type __VLS_TypePropsToOption<T> = {
54
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
55
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
56
+ } : {
57
+ type: import('vue').PropType<T[K]>;
58
+ required: true;
59
+ };
60
+ };
@@ -1,8 +1,13 @@
1
- declare const _default: import('vue').DefineComponent<{
2
- onChangeParameterGroup: () => void;
3
- avoidSidebar?: boolean;
1
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
2
+ onChange: () => void;
4
3
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
5
- onChangeParameterGroup: () => void;
6
- avoidSidebar?: boolean;
7
- }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
+ onChange: () => void;
5
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
6
+ "auxiliary-button"?(_: {}): any;
7
+ }>;
8
8
  export default _default;
9
+ type __VLS_WithTemplateSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,31 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
2
+ entries: {
3
+ key: string;
4
+ label: string;
5
+ }[];
6
+ activeIndex: number;
7
+ onChange: (index: number) => void;
8
+ hidePills?: boolean;
9
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
10
+ entries: {
11
+ key: string;
12
+ label: string;
13
+ }[];
14
+ activeIndex: number;
15
+ onChange: (index: number) => void;
16
+ hidePills?: boolean;
17
+ }> & Readonly<{}>, {
18
+ activeIndex: number;
19
+ hidePills: boolean;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
21
+ "auxiliary-button"?(_: {}): any;
22
+ "first-auxiliary-pill"?(_: {
23
+ class: string;
24
+ }): any;
25
+ }>;
26
+ export default _default;
27
+ type __VLS_WithTemplateSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -22,7 +22,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
22
22
  displayCloseButton: boolean;
23
23
  isLightTheme: boolean;
24
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
25
- content?(_: {}): any;
25
+ content?(_: {
26
+ alignToScene: boolean;
27
+ }): any;
26
28
  }>;
27
29
  export default _default;
28
30
  type __VLS_WithDefaults<P, D> = {
@@ -42,7 +42,7 @@ export declare class ExposedCallbacks {
42
42
  * @return overrideEventBehaviour true if the event has been consumed and it should not trigger default behaviour, undefined or false otherwise
43
43
  */
44
44
  onButtonClicked: <K extends keyof ButtonCallbackPayloads>(name: K, args?: ButtonCallbackPayloads[K]) => Promise<boolean> | boolean | void;
45
- onRequestPlan: (planId: string, image: Base64Image, items: any[]) => void;
45
+ onRequestPlan: (planId: string, image: Base64Image, items: any[], plan: RapiPlanSnapshotGetData | RapiPlan) => void;
46
46
  /**
47
47
  * Gets called if a plan object gets added, changed or removed and returns all objects of the plan
48
48
  * @param objects -- all objects in the plan
@@ -82,6 +82,11 @@ interface UiFeatureFlags extends FeatureFlags {
82
82
  * @description Enables the open/close animation button in the flying menu - RML-13533
83
83
  */
84
84
  openCloseAnimation?: boolean;
85
+ /**
86
+ * @hidden
87
+ * @description Enables the show/hide wall toggle button in the flying menu and wall settings panel - RML-13046
88
+ */
89
+ showWallVisibilityToggle?: boolean;
85
90
  }
86
91
  export interface VariantsMap {
87
92
  [key: string]: RapiId;
@@ -20,6 +20,10 @@ export declare const DEFAULT_MIN_RANGE: {
20
20
  readonly parapetHeight: 10;
21
21
  readonly thickness: 10;
22
22
  };
23
+ export declare const DEFAULT_WALL_RANGE: {
24
+ readonly height: 2800;
25
+ readonly thickness: 250;
26
+ };
23
27
  export declare const TABBED_NAV_MENU_CONSTRUCTION: {
24
28
  key: "tabbed-nav-menu-construction";
25
29
  label: string;
@@ -2400,6 +2400,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2400
2400
  onSelect: {
2401
2401
  type: PropType<(element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>) => void>;
2402
2402
  };
2403
+ disabled: {
2404
+ type: PropType<boolean>;
2405
+ default: boolean;
2406
+ };
2403
2407
  selectedElement: {
2404
2408
  type: PropType<import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>>;
2405
2409
  };
@@ -2482,6 +2486,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2482
2486
  onSelect: {
2483
2487
  type: PropType<(element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>) => void>;
2484
2488
  };
2489
+ disabled: {
2490
+ type: PropType<boolean>;
2491
+ default: boolean;
2492
+ };
2485
2493
  selectedElement: {
2486
2494
  type: PropType<import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>>;
2487
2495
  };
@@ -2540,6 +2548,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2540
2548
  label: string;
2541
2549
  type: string;
2542
2550
  element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>;
2551
+ disabled: boolean;
2543
2552
  isLast: boolean;
2544
2553
  elemKey: string;
2545
2554
  hideBottomBorder: boolean;
@@ -2578,6 +2587,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2578
2587
  onSelect: {
2579
2588
  type: PropType<(element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>) => void>;
2580
2589
  };
2590
+ disabled: {
2591
+ type: PropType<boolean>;
2592
+ default: boolean;
2593
+ };
2581
2594
  selectedElement: {
2582
2595
  type: PropType<import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>>;
2583
2596
  };
@@ -2636,6 +2649,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2636
2649
  label: string;
2637
2650
  type: string;
2638
2651
  element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>;
2652
+ disabled: boolean;
2639
2653
  isLast: boolean;
2640
2654
  elemKey: string;
2641
2655
  hideBottomBorder: boolean;
@@ -2671,6 +2685,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2671
2685
  onSelect: {
2672
2686
  type: PropType<(element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>) => void>;
2673
2687
  };
2688
+ disabled: {
2689
+ type: PropType<boolean>;
2690
+ default: boolean;
2691
+ };
2674
2692
  selectedElement: {
2675
2693
  type: PropType<import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>>;
2676
2694
  };
@@ -2729,6 +2747,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2729
2747
  label: string;
2730
2748
  type: string;
2731
2749
  element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>;
2750
+ disabled: boolean;
2732
2751
  isLast: boolean;
2733
2752
  elemKey: string;
2734
2753
  hideBottomBorder: boolean;
@@ -1272,6 +1272,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1272
1272
  onSelect: {
1273
1273
  type: PropType<(element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>) => void>;
1274
1274
  };
1275
+ disabled: {
1276
+ type: PropType<boolean>;
1277
+ default: boolean;
1278
+ };
1275
1279
  selectedElement: {
1276
1280
  type: PropType<import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>>;
1277
1281
  };
@@ -1354,6 +1358,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1354
1358
  onSelect: {
1355
1359
  type: PropType<(element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>) => void>;
1356
1360
  };
1361
+ disabled: {
1362
+ type: PropType<boolean>;
1363
+ default: boolean;
1364
+ };
1357
1365
  selectedElement: {
1358
1366
  type: PropType<import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>>;
1359
1367
  };
@@ -1412,6 +1420,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1412
1420
  label: string;
1413
1421
  type: string;
1414
1422
  element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>;
1423
+ disabled: boolean;
1415
1424
  isLast: boolean;
1416
1425
  elemKey: string;
1417
1426
  hideBottomBorder: boolean;
@@ -1450,6 +1459,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1450
1459
  onSelect: {
1451
1460
  type: PropType<(element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>) => void>;
1452
1461
  };
1462
+ disabled: {
1463
+ type: PropType<boolean>;
1464
+ default: boolean;
1465
+ };
1453
1466
  selectedElement: {
1454
1467
  type: PropType<import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>>;
1455
1468
  };
@@ -1508,6 +1521,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1508
1521
  label: string;
1509
1522
  type: string;
1510
1523
  element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>;
1524
+ disabled: boolean;
1511
1525
  isLast: boolean;
1512
1526
  elemKey: string;
1513
1527
  hideBottomBorder: boolean;
@@ -1543,6 +1557,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1543
1557
  onSelect: {
1544
1558
  type: PropType<(element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>) => void>;
1545
1559
  };
1560
+ disabled: {
1561
+ type: PropType<boolean>;
1562
+ default: boolean;
1563
+ };
1546
1564
  selectedElement: {
1547
1565
  type: PropType<import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>>;
1548
1566
  };
@@ -1601,6 +1619,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1601
1619
  label: string;
1602
1620
  type: string;
1603
1621
  element: import('../../../../common/components/collection-view/-utils/types').CollectionViewElement<import('../../../../common/components/collection-view/-utils/types').CollectionViewElementPossibleTypes>;
1622
+ disabled: boolean;
1604
1623
  isLast: boolean;
1605
1624
  elemKey: string;
1606
1625
  hideBottomBorder: boolean;
@@ -1,4 +1,6 @@
1
1
  import { Nullable } from '../../common/utils/types';
2
2
  import { SelectionPayload } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
3
+ import { default as PlanElementViewModel } from '@roomle/web-sdk/lib/definitions/common-core/src/view-model/plan-element-view-model';
3
4
 
4
5
  export declare const isCorrectSelectionPayload: (currentlySelected: Nullable<SelectionPayload>, asyncSelectionData: SelectionPayload) => boolean;
6
+ export declare const isWallVisible: (wall: PlanElementViewModel) => boolean;
@@ -17,6 +17,32 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
17
17
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
18
18
  objectId: StringConstructor;
19
19
  }>> & Readonly<{}>, {}, {}, {
20
+ ParameterGroups: {
21
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
22
+ onChange: () => void;
23
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{
24
+ onChange: () => void;
25
+ }> & Readonly<{}>, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
26
+ P: {};
27
+ B: {};
28
+ D: {};
29
+ C: {};
30
+ M: {};
31
+ Defaults: {};
32
+ }, Readonly<{
33
+ onChange: () => void;
34
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
35
+ __isFragment?: never;
36
+ __isTeleport?: never;
37
+ __isSuspense?: never;
38
+ } & import('vue').ComponentOptionsBase<Readonly<{
39
+ onChange: () => void;
40
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
41
+ $slots: {
42
+ "auxiliary-button"?(_: {}): any;
43
+ };
44
+ });
45
+ StopConfiguringButton: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
46
  Layout: {
21
47
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
22
48
  environment: string;
@@ -119,11 +145,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
119
145
  hideCloseButton?: boolean;
120
146
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
121
147
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
122
- ActionButtonsParameterGroups: import('vue').DefineComponent<{
123
- onChangeParameterGroup: () => void;
124
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
125
- onChangeParameterGroup: () => void;
126
- }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
127
148
  BottomBar: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
128
149
  BottomButtons: import('vue').DefineComponent<{}, {}, {}, {
129
150
  sharedUiState(): import('../../common/store').SharedUiState;
@@ -1,8 +0,0 @@
1
- import { SharedUiState } from '../store';
2
-
3
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {
4
- sharedUiState(): SharedUiState;
5
- isDesktop(): boolean;
6
- isExpanded(): boolean;
7
- }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
- export default _default;
@@ -1,10 +0,0 @@
1
- import { PropType } from 'vue';
2
-
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
- onClick: PropType<(_payload: MouseEvent) => void>;
5
- direction: StringConstructor;
6
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
7
- onClick: PropType<(_payload: MouseEvent) => void>;
8
- direction: StringConstructor;
9
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
- export default _default;
@@ -1,31 +0,0 @@
1
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, Readonly<{
2
- 'scroll-content'(_props: {
3
- setTarget: (el: HTMLElement) => void;
4
- }): any;
5
- 'left-indicator'(_props: {
6
- hint: Record<string, boolean>;
7
- scrollLeft: () => void;
8
- }): any;
9
- 'right-indicator'(_props: {
10
- hint: Record<string, boolean>;
11
- scrollRight: () => void;
12
- }): any;
13
- }> & {
14
- 'scroll-content'(_props: {
15
- setTarget: (el: HTMLElement) => void;
16
- }): any;
17
- 'left-indicator'(_props: {
18
- hint: Record<string, boolean>;
19
- scrollLeft: () => void;
20
- }): any;
21
- 'right-indicator'(_props: {
22
- hint: Record<string, boolean>;
23
- scrollRight: () => void;
24
- }): any;
25
- }>;
26
- export default _default;
27
- type __VLS_WithTemplateSlots<T, S> = T & {
28
- new (): {
29
- $slots: S;
30
- };
31
- };