diff --git a/examples/AngleMeasurement/index.html b/examples/AngleMeasurement/index.html index efef3cf3..53bd8306 100644 --- a/examples/AngleMeasurement/index.html +++ b/examples/AngleMeasurement/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/AreaMeasurement/index.html b/examples/AreaMeasurement/index.html index b08101b1..e5513091 100644 --- a/examples/AreaMeasurement/index.html +++ b/examples/AreaMeasurement/index.html @@ -62,7 +62,7 @@ - + diff --git a/examples/Civil3DNavigator/index.html b/examples/Civil3DNavigator/index.html index 526026d0..88611ee1 100644 --- a/examples/Civil3DNavigator/index.html +++ b/examples/Civil3DNavigator/index.html @@ -62,7 +62,7 @@ - + diff --git a/examples/CivilCrossSectionNavigator/index.html b/examples/CivilCrossSectionNavigator/index.html index 91c03868..6e913f33 100644 --- a/examples/CivilCrossSectionNavigator/index.html +++ b/examples/CivilCrossSectionNavigator/index.html @@ -79,8 +79,8 @@ - - + + diff --git a/examples/CivilElevationNavigator/index.html b/examples/CivilElevationNavigator/index.html index 698f5429..e6ec9e3e 100644 --- a/examples/CivilElevationNavigator/index.html +++ b/examples/CivilElevationNavigator/index.html @@ -79,9 +79,9 @@ - + - + diff --git a/examples/CivilPlanNavigator/index.html b/examples/CivilPlanNavigator/index.html index 740f22ce..ac2e07b9 100644 --- a/examples/CivilPlanNavigator/index.html +++ b/examples/CivilPlanNavigator/index.html @@ -68,9 +68,9 @@ - + - + diff --git a/examples/ClipEdges/index.html b/examples/ClipEdges/index.html index cd3eca2c..09fac88c 100644 --- a/examples/ClipEdges/index.html +++ b/examples/ClipEdges/index.html @@ -63,7 +63,7 @@ - + diff --git a/examples/EdgeMeasurement/index.html b/examples/EdgeMeasurement/index.html index d4d0c827..89fef940 100644 --- a/examples/EdgeMeasurement/index.html +++ b/examples/EdgeMeasurement/index.html @@ -62,7 +62,7 @@ - + diff --git a/examples/FaceMeasurement/index.html b/examples/FaceMeasurement/index.html index bd6cb53a..a0bb5b69 100644 --- a/examples/FaceMeasurement/index.html +++ b/examples/FaceMeasurement/index.html @@ -62,7 +62,7 @@ - + diff --git a/examples/Highlighter/index.html b/examples/Highlighter/index.html index ab3c8c85..082ca4c3 100644 --- a/examples/Highlighter/index.html +++ b/examples/Highlighter/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/IfcStreamer/index.html b/examples/IfcStreamer/index.html index 3e216b54..7ec8108b 100644 --- a/examples/IfcStreamer/index.html +++ b/examples/IfcStreamer/index.html @@ -62,7 +62,7 @@ - + diff --git a/examples/LengthMeasurement/index.html b/examples/LengthMeasurement/index.html index b0bec86a..76966af2 100644 --- a/examples/LengthMeasurement/index.html +++ b/examples/LengthMeasurement/index.html @@ -63,7 +63,7 @@ - + diff --git a/examples/Marker/index.html b/examples/Marker/index.html index 1d2a629a..df41aa5e 100644 --- a/examples/Marker/index.html +++ b/examples/Marker/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/Plans/index.html b/examples/Plans/index.html index dc94a548..1514a44d 100644 --- a/examples/Plans/index.html +++ b/examples/Plans/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/PostproductionRenderer/index.html b/examples/PostproductionRenderer/index.html index 9e5a761a..e7e89bc2 100644 --- a/examples/PostproductionRenderer/index.html +++ b/examples/PostproductionRenderer/index.html @@ -63,7 +63,7 @@ - + diff --git a/examples/Sections/index.html b/examples/Sections/index.html index b2fe9d1a..9370e6d6 100644 --- a/examples/Sections/index.html +++ b/examples/Sections/index.html @@ -63,7 +63,7 @@ - + diff --git a/examples/ShadowDropper/index.html b/examples/ShadowDropper/index.html index d80b1020..03b7fe62 100644 --- a/examples/ShadowDropper/index.html +++ b/examples/ShadowDropper/index.html @@ -63,7 +63,7 @@ - + diff --git a/examples/VolumeMeasurement/index.html b/examples/VolumeMeasurement/index.html index 92077e48..1384449f 100644 --- a/examples/VolumeMeasurement/index.html +++ b/examples/VolumeMeasurement/index.html @@ -62,7 +62,7 @@ - + diff --git a/examples/assets/angleMeasurement.js b/examples/assets/angleMeasurement.js index 4d206302..bfb9bcaf 100644 --- a/examples/assets/angleMeasurement.js +++ b/examples/assets/angleMeasurement.js @@ -1 +1 @@ -import{B as d,M as c,a as l}from"./web-ifc-api-CKmHUvxw.js";import{C as m,W as i,S as p,a as w,G as u}from"./index-7--X2BWW.js";import{W as b,w as f}from"./index-BIn5csQH.js";import{S as g}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),o=new m,y=o.get(i),e=y.create();e.scene=new p(o);e.renderer=new b(o,r);e.camera=new w(o);o.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const S=o.get(u);S.create(e);e.scene.three.background=null;const h=new d(3,3,3),k=new c({color:"#6528D7"}),s=new l(h,k);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const t=o.get(f);t.world=e;t.enabled=!0;r.ondblclick=()=>t.create();window.onkeydown=a=>{(a.code==="Delete"||a.code==="Backspace")&&t.deleteAll()};const n=new g;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import{B as d,M as c,a as l}from"./web-ifc-api-CKmHUvxw.js";import{C as m,W as i,S as p,a as w,G as u}from"./index-7--X2BWW.js";import{L as b,l as f}from"./index-DHdXOf4g.js";import{S as g}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),o=new m,y=o.get(i),e=y.create();e.scene=new p(o);e.renderer=new b(o,r);e.camera=new w(o);o.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const S=o.get(u);S.create(e);e.scene.three.background=null;const h=new d(3,3,3),k=new c({color:"#6528D7"}),s=new l(h,k);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const t=o.get(f);t.world=e;t.enabled=!0;r.ondblclick=()=>t.create();window.onkeydown=a=>{(a.code==="Delete"||a.code==="Backspace")&&t.deleteAll()};const n=new g;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/areaMeasurement.js b/examples/assets/areaMeasurement.js index 52c22790..8326fd30 100644 --- a/examples/assets/areaMeasurement.js +++ b/examples/assets/areaMeasurement.js @@ -1 +1 @@ -import{B as d,M as c,a as m}from"./web-ifc-api-CKmHUvxw.js";import{S as l}from"./stats.min-GTpOrGrX.js";import{C as i,W as p,S as w,a as u,G as b}from"./index-7--X2BWW.js";import{W as f,v as g}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const s=document.getElementById("container"),n=new i,y=n.get(p),e=y.create();e.scene=new w(n);e.renderer=new f(n,s);e.camera=new u(n);n.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const S=n.get(b);S.create(e);e.scene.three.background=null;const h=new d(3,3,3),k=new c({color:"#6528D7"}),a=new m(h,k);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const t=n.get(g);t.world=e;t.enabled=!0;s.ondblclick=()=>t.create();s.oncontextmenu=()=>t.endCreation();window.onkeydown=r=>{(r.code==="Delete"||r.code==="Backspace")&&t.deleteAll()};const o=new l;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end()); +import{B as c,M as d,a as m}from"./web-ifc-api-CKmHUvxw.js";import{S as l}from"./stats.min-GTpOrGrX.js";import{C as i,W as p,S as w,a as u,G as b}from"./index-7--X2BWW.js";import{L as f,c as g}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const s=document.getElementById("container"),n=new i,y=n.get(p),e=y.create();e.scene=new w(n);e.renderer=new f(n,s);e.camera=new u(n);n.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const S=n.get(b);S.create(e);e.scene.three.background=null;const h=new c(3,3,3),k=new d({color:"#6528D7"}),a=new m(h,k);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const t=n.get(g);t.world=e;t.enabled=!0;s.ondblclick=()=>t.create();s.oncontextmenu=()=>t.endCreation();window.onkeydown=r=>{(r.code==="Delete"||r.code==="Backspace")&&t.deleteAll()};const o=new l;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end()); diff --git a/examples/assets/civil3DNavigator.js b/examples/assets/civil3DNavigator.js index cf363331..1761a061 100644 --- a/examples/assets/civil3DNavigator.js +++ b/examples/assets/civil3DNavigator.js @@ -1 +1 @@ -import{s as i,S as l}from"./web-ifc-api-CKmHUvxw.js";import{C as p,W as m,S as h,a as f,G as g,F as u,b as w}from"./index-7--X2BWW.js";import{S}from"./stats.min-GTpOrGrX.js";import{X as b,A as y}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const c=document.getElementById("container"),t=new p,A=t.get(m),e=A.create();e.scene=new h(t);e.renderer=new b(t,c);e.camera=new f(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);c.appendChild(e.renderer.three2D.domElement);const C=t.get(g);C.create(e);e.scene.three.background=null;const U=t.get(u),v=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),B=await v.arrayBuffer(),E=new Uint8Array(B),r=await U.load(E);e.scene.three.add(r);const I=await fetch("https://thatopen.github.io/engine_components/resources/road.json");r.setLocalProperties(await I.json());const a=t.get(y);a.world=e;a.draw(r);const L=t.get(w),s=L.create(e);s.threshold=10;for(const o of r.children)o instanceof i&&s.add(o);s.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{s.needsUpdate=!0});const d=new l(void 0,20);a.onHighlight.add(({point:o})=>{d.center.copy(o),e.camera.controls.fitToSphere(d,!0)});const n=new S;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import{s as i,S as l}from"./web-ifc-api-CKmHUvxw.js";import{C as p,W as m,S as h,a as f,G as g,F as u,b as w}from"./index-7--X2BWW.js";import{S}from"./stats.min-GTpOrGrX.js";import{j as b,o as y}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const d=document.getElementById("container"),t=new p,C=t.get(m),e=C.create();e.scene=new h(t);e.renderer=new b(t,d);e.camera=new f(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);d.appendChild(e.renderer.three2D.domElement);const U=t.get(g);U.create(e);e.scene.three.background=null;const j=t.get(u),v=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),A=await v.arrayBuffer(),B=new Uint8Array(A),r=await j.load(B);e.scene.three.add(r);const E=await fetch("https://thatopen.github.io/engine_components/resources/road.json");r.setLocalProperties(await E.json());const a=t.get(y);a.world=e;a.draw(r);const I=t.get(w),s=I.create(e);s.threshold=10;for(const o of r.children)o instanceof i&&s.add(o);s.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{s.needsUpdate=!0});const c=new l(void 0,20);a.onHighlight.add(({point:o})=>{c.center.copy(o),e.camera.controls.fitToSphere(c,!0)});const n=new S;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/civilCrossSectionNavigator.js b/examples/assets/civilCrossSectionNavigator.js index 8fa7df1e..c3c11758 100644 --- a/examples/assets/civilCrossSectionNavigator.js +++ b/examples/assets/civilCrossSectionNavigator.js @@ -1 +1 @@ -import{C as M,L as S}from"./web-ifc-api-CKmHUvxw.js";import{C,W as x,S as B,O as E,G as k,F as v,c as A}from"./index-7--X2BWW.js";import{T as D}from"./index-ByMLC5eT.js";import{w as F}from"./index-Bq6zc5aT.js";import{S as I}from"./stats.min-GTpOrGrX.js";import{X as L,y as P,A as W,F as T,x as U}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";D.init();F.init();const y=document.getElementById("container"),e=new C,j=e.get(x),t=j.create();t.scene=new B(e);t.renderer=new L(e,y);t.camera=new E(e);e.init();t.scene.setup();t.camera.controls.setLookAt(5,5,5,0,0,0);y.appendChild(t.renderer.three2D.domElement);const G=e.get(k);G.create(t);t.scene.three.background=null;const b=e.get(v),H=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),N=await H.arrayBuffer(),O=new Uint8Array(N),d=b.load(O);t.scene.three.add(d);const X=await fetch("https://thatopen.github.io/engine_components/resources/road.json");d.setLocalProperties(await X.json());const f=document.getElementById("scene-2d-left");f.components=e;if(!f.world)throw new Error("World not found!");const c=e.get(P);c.world=f.world;await c.draw(d);const l=e.get(W);l.world=t;l.draw(d);const g=document.getElementById("scene-2d-right");g.components=e;if(!g.world)throw new Error("World not found!");const p=e.get(T);p.world=g.world;p.world3D=t;c.onMarkerChange.add(({alignment:o,percentage:n,type:r,curve:s})=>{if(l.setMarker(o,n,r),r==="select"){const i=s.alignment.absolute[s.index].mesh,m=o.getPointAt(n,"absolute");p.set(i,m)}});c.onHighlight.add(({mesh:o})=>{l.highlighter.select(o);const n=o.curve.index,r=o.curve.alignment.absolute[n];r.mesh.geometry.computeBoundingSphere();const s=r.mesh.geometry.boundingSphere;s&&t.camera.controls.fitToSphere(s,!0)});c.onMarkerHidden.add(({type:o})=>{l.hideMarker(o)});const h=e.get(A);h.byEntity(d);const _=h.list,w=e.get(U),u=w.styles.list;for(const o in _.entities){const n=h.find({entities:[o]}),r=new M(Math.random(),Math.random(),Math.random()),s=new S({color:r});w.styles.create(o,new Set,g.world,s);for(const i in n){const m=b.list.get(i);m&&(u[o].fragments[i]=new Set(n[i]),u[o].meshes.add(m.mesh))}}w.update(!0);const a=new I;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end()); +import{C as M,L as S}from"./web-ifc-api-CKmHUvxw.js";import{C as v,W as C,S as B,O as E,G as k,F as D,c as x}from"./index-7--X2BWW.js";import{T as I}from"./index-ByMLC5eT.js";import{w as L}from"./index-D2VaW7VV.js";import{S as j}from"./stats.min-GTpOrGrX.js";import{j as A,n as P,o as W,b as F,v as T}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";I.init();L.init();const y=document.getElementById("container"),e=new v,U=e.get(C),t=U.create();t.scene=new B(e);t.renderer=new A(e,y);t.camera=new E(e);e.init();t.scene.setup();t.camera.controls.setLookAt(5,5,5,0,0,0);y.appendChild(t.renderer.three2D.domElement);const G=e.get(k);G.create(t);t.scene.three.background=null;const b=e.get(D),H=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),N=await H.arrayBuffer(),O=new Uint8Array(N),d=b.load(O);t.scene.three.add(d);const _=await fetch("https://thatopen.github.io/engine_components/resources/road.json");d.setLocalProperties(await _.json());const f=document.getElementById("scene-2d-left");f.components=e;if(!f.world)throw new Error("World not found!");const c=e.get(P);c.world=f.world;await c.draw(d);const l=e.get(W);l.world=t;l.draw(d);const g=document.getElementById("scene-2d-right");g.components=e;if(!g.world)throw new Error("World not found!");const p=e.get(F);p.world=g.world;p.world3D=t;c.onMarkerChange.add(({alignment:o,percentage:n,type:r,curve:s})=>{if(l.setMarker(o,n,r),r==="select"){const i=s.alignment.absolute[s.index].mesh,m=o.getPointAt(n,"absolute");p.set(i,m)}});c.onHighlight.add(({mesh:o})=>{l.highlighter.select(o);const n=o.curve.index,r=o.curve.alignment.absolute[n];r.mesh.geometry.computeBoundingSphere();const s=r.mesh.geometry.boundingSphere;s&&t.camera.controls.fitToSphere(s,!0)});c.onMarkerHidden.add(({type:o})=>{l.hideMarker(o)});const h=e.get(x);h.byEntity(d);const z=h.list,w=e.get(T),u=w.styles.list;for(const o in z.entities){const n=h.find({entities:[o]}),r=new M(Math.random(),Math.random(),Math.random()),s=new S({color:r});w.styles.create(o,new Set,g.world,s);for(const i in n){const m=b.list.get(i);m&&(u[o].fragments[i]=new Set(n[i]),u[o].meshes.add(m.mesh))}}w.update(!0);const a=new j;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end()); diff --git a/examples/assets/civilElevationNavigator.js b/examples/assets/civilElevationNavigator.js index 83f097b1..bcfcfd30 100644 --- a/examples/assets/civilElevationNavigator.js +++ b/examples/assets/civilElevationNavigator.js @@ -1 +1 @@ -import"./web-ifc-api-CKmHUvxw.js";import{C as S,W as v,S as b,O as A,G as B,F as k}from"./index-7--X2BWW.js";import{X as C,A as E,y as M,S as I}from"./index-BIn5csQH.js";import{T}from"./index-ByMLC5eT.js";import{w as W}from"./index-Bq6zc5aT.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";T.init();W.init();const f=document.getElementById("container"),t=new S,D=t.get(v),e=D.create();e.scene=new b(t);e.renderer=new C(t,f);e.camera=new A(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);f.appendChild(e.renderer.three2D.domElement);const P=t.get(B);P.create(e);e.scene.three.background=null;const U=t.get(k),z=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),F=await z.arrayBuffer(),G=new Uint8Array(F),c=U.load(G);e.scene.three.add(c);const i=t.get(E);i.world=e;i.draw(c);const g=document.getElementById("scene-2d-left");g.components=t;if(!g.world)throw new Error("World not found!");const l=new M(t);l.world=g.world;l.draw(c);const a=document.getElementById("scene-2d-right");a.components=t;if(!a.world)throw new Error("World not found!");const s=t.get(I);s.world=a.world;s.draw(c);l.onMarkerChange.add(({alignment:r,percentage:d})=>{s.setMarker(r,d,"hover"),i.setMarker(r,d,"hover")});l.onHighlight.add(({mesh:r,point:d})=>{const{index:y,alignment:h}=r.curve,m=h.getPercentageAt(d,"horizontal");if(m===null)return;const{curve:n}=h.getCurveAt(m,"vertical");if(s.highlighter.select(n.mesh),s.setMarker(n.alignment,m,"select"),a.world){n.mesh.geometry.boundingSphere||n.mesh.geometry.computeBoundingSphere();const w=n.mesh.geometry.boundingSphere.clone();w.radius*=1.5,a.world.camera.controls.fitToSphere(w,!0)}i.highlighter.select(r);const p=r.curve.alignment.absolute[y];p.mesh.geometry.computeBoundingSphere();const u=p.mesh.geometry.boundingSphere;u&&e.camera.controls.fitToSphere(u,!0)});const o=new x;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end()); +import"./web-ifc-api-CKmHUvxw.js";import{C as y,W as S,S as b,O as B,G as k,F as C}from"./index-7--X2BWW.js";import{j as E,o as A,n as M,r as I}from"./index-DHdXOf4g.js";import{T}from"./index-ByMLC5eT.js";import{w as W}from"./index-D2VaW7VV.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";T.init();W.init();const f=document.getElementById("container"),t=new y,D=t.get(S),e=D.create();e.scene=new b(t);e.renderer=new E(t,f);e.camera=new B(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);f.appendChild(e.renderer.three2D.domElement);const P=t.get(k);P.create(e);e.scene.three.background=null;const U=t.get(C),j=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),z=await j.arrayBuffer(),F=new Uint8Array(z),c=U.load(F);e.scene.three.add(c);const i=t.get(A);i.world=e;i.draw(c);const g=document.getElementById("scene-2d-left");g.components=t;if(!g.world)throw new Error("World not found!");const l=new M(t);l.world=g.world;l.draw(c);const a=document.getElementById("scene-2d-right");a.components=t;if(!a.world)throw new Error("World not found!");const s=t.get(I);s.world=a.world;s.draw(c);l.onMarkerChange.add(({alignment:r,percentage:d})=>{s.setMarker(r,d,"hover"),i.setMarker(r,d,"hover")});l.onHighlight.add(({mesh:r,point:d})=>{const{index:v,alignment:h}=r.curve,m=h.getPercentageAt(d,"horizontal");if(m===null)return;const{curve:n}=h.getCurveAt(m,"vertical");if(s.highlighter.select(n.mesh),s.setMarker(n.alignment,m,"select"),a.world){n.mesh.geometry.boundingSphere||n.mesh.geometry.computeBoundingSphere();const w=n.mesh.geometry.boundingSphere.clone();w.radius*=1.5,a.world.camera.controls.fitToSphere(w,!0)}i.highlighter.select(r);const p=r.curve.alignment.absolute[v];p.mesh.geometry.computeBoundingSphere();const u=p.mesh.geometry.boundingSphere;u&&e.camera.controls.fitToSphere(u,!0)});const o=new x;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end()); diff --git a/examples/assets/civilPlanNavigator.js b/examples/assets/civilPlanNavigator.js index 82f0b7b5..4016bbe3 100644 --- a/examples/assets/civilPlanNavigator.js +++ b/examples/assets/civilPlanNavigator.js @@ -1 +1 @@ -import"./web-ifc-api-CKmHUvxw.js";import{C as p,W as g,S as h,O as w,G as u,F as f}from"./index-7--X2BWW.js";import{X as y,A as S,y as b}from"./index-BIn5csQH.js";import{T as v}from"./index-ByMLC5eT.js";import{w as A}from"./index-Bq6zc5aT.js";import{S as B}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";v.init();A.init();const i=document.getElementById("container"),t=new p,x=t.get(g),e=x.create();e.scene=new h(t);e.renderer=new y(t,i);e.camera=new w(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);i.appendChild(e.renderer.three2D.domElement);const C=t.get(u);C.create(e);e.scene.three.background=null;const E=t.get(f),I=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),T=await I.arrayBuffer(),U=new Uint8Array(T),r=E.load(U);e.scene.three.add(r);const a=t.get(S);a.world=e;a.draw(r);const m=document.getElementById("scene-2d"),s=t.get(b);m.components=t;s.world=m.world;await s.draw(r);s.onHighlight.add(({mesh:o})=>{a.highlighter.select(o);const l=o.curve.index,d=o.curve.alignment.absolute[l];d.mesh.geometry.computeBoundingSphere();const c=d.mesh.geometry.boundingSphere;c&&e.camera.controls.fitToSphere(c,!0)});const n=new B;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import"./web-ifc-api-CKmHUvxw.js";import{C as p,W as g,S as h,O as w,G as f,F as u}from"./index-7--X2BWW.js";import{j as y,o as S,n as b}from"./index-DHdXOf4g.js";import{T as v}from"./index-ByMLC5eT.js";import{w as B}from"./index-D2VaW7VV.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";v.init();B.init();const i=document.getElementById("container"),t=new p,C=t.get(g),e=C.create();e.scene=new h(t);e.renderer=new y(t,i);e.camera=new w(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);i.appendChild(e.renderer.three2D.domElement);const A=t.get(f);A.create(e);e.scene.three.background=null;const E=t.get(u),I=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),T=await I.arrayBuffer(),U=new Uint8Array(T),r=E.load(U);e.scene.three.add(r);const a=t.get(S);a.world=e;a.draw(r);const m=document.getElementById("scene-2d"),s=t.get(b);m.components=t;s.world=m.world;await s.draw(r);s.onHighlight.add(({mesh:o})=>{a.highlighter.select(o);const l=o.curve.index,d=o.curve.alignment.absolute[l];d.mesh.geometry.computeBoundingSphere();const c=d.mesh.geometry.boundingSphere;c&&e.camera.controls.fitToSphere(c,!0)});const n=new x;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/clipEdges.js b/examples/assets/clipEdges.js index de063fa6..4c059268 100644 --- a/examples/assets/clipEdges.js +++ b/examples/assets/clipEdges.js @@ -1,4 +1,4 @@ -import{B as M,M as y,a as d,b as c,L as b}from"./web-ifc-api-CKmHUvxw.js";import{S as f}from"./stats.min-GTpOrGrX.js";import{T as x,L as m,m as p}from"./index-ByMLC5eT.js";import{C as k,W as v,S as C,a as L,G as P,R as S,e as B}from"./index-7--X2BWW.js";import{W as I,x as $,C as D}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const u=document.getElementById("container"),o=new k,W=o.get(v),e=W.create();e.scene=new C(o);e.renderer=new I(o,u);e.camera=new L(o);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;o.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const z=o.get(P),h=z.create(e);h.config.color.setHex(6710886);e.renderer.postproduction.customEffects.excludedMeshes.push(h.three);e.scene.three.background=null;const g=new M(3,3,3),w=new y({color:"#6528D7"}),a=new d(g,w);a.position.set(-2,1.5,0);e.scene.three.add(a);e.meshes.add(a);const l=new d(g,w);l.position.set(2,1.5,0);e.scene.three.add(l);e.meshes.add(l);const E=o.get(S);E.get(e);const n=o.get(B);n.enabled=!0;const r=o.get($);n.Type=D;const G=new c({color:"lightblue",side:2}),R=new b({color:"blue"}),T=new c({color:"blue",opacity:.5,side:2,transparent:!0});r.styles.create("Red lines",new Set([a]),e,R,G,T);const A=new c({color:"salmon",side:2}),O=new b({color:"red"}),F=new c({color:"red",opacity:.5,side:2,transparent:!0});r.styles.create("Blue lines",new Set([l]),e,O,A,F);u.ondblclick=()=>{n.enabled&&n.create(e)};window.onkeydown=t=>{(t.code==="Delete"||t.code==="Backspace")&&n.enabled&&n.delete(e)};const s=new f;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());x.init();const i=m.create(()=>p` +import{B as M,M as y,a as d,b as c,L as b}from"./web-ifc-api-CKmHUvxw.js";import{S as f}from"./stats.min-GTpOrGrX.js";import{T as k,L as m,m as p}from"./index-ByMLC5eT.js";import{C as v,W as x,S as L,a as C,G as P,R as S,e as B}from"./index-7--X2BWW.js";import{L as I,v as $,a as D}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const u=document.getElementById("container"),o=new v,z=o.get(x),e=z.create();e.scene=new L(o);e.renderer=new I(o,u);e.camera=new C(o);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;o.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const E=o.get(P),h=E.create(e);h.config.color.setHex(6710886);e.renderer.postproduction.customEffects.excludedMeshes.push(h.three);e.scene.three.background=null;const g=new M(3,3,3),w=new y({color:"#6528D7"}),a=new d(g,w);a.position.set(-2,1.5,0);e.scene.three.add(a);e.meshes.add(a);const l=new d(g,w);l.position.set(2,1.5,0);e.scene.three.add(l);e.meshes.add(l);const G=o.get(S);G.get(e);const n=o.get(B);n.enabled=!0;const r=o.get($);n.Type=D;const R=new c({color:"lightblue",side:2}),T=new b({color:"blue"}),W=new c({color:"blue",opacity:.5,side:2,transparent:!0});r.styles.create("Red lines",new Set([a]),e,T,R,W);const A=new c({color:"salmon",side:2}),O=new b({color:"red"}),F=new c({color:"red",opacity:.5,side:2,transparent:!0});r.styles.create("Blue lines",new Set([l]),e,O,A,F);u.ondblclick=()=>{n.enabled&&n.create(e)};window.onkeydown=t=>{(t.code==="Delete"||t.code==="Backspace")&&n.enabled&&n.delete(e)};const s=new f;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());k.init();const i=m.create(()=>p` diff --git a/examples/assets/edgeMeasurement.js b/examples/assets/edgeMeasurement.js index b638fa8e..4a3f1a8c 100644 --- a/examples/assets/edgeMeasurement.js +++ b/examples/assets/edgeMeasurement.js @@ -1 +1 @@ -import{a as c}from"./web-ifc-api-CKmHUvxw.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as f,a as p,G as w,F as g}from"./index-7--X2BWW.js";import{W as h,N as u}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new p(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(w);b.create(e);e.scene.three.background=null;const S=new g(t),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),A=await k.arrayBuffer(),W=new Uint8Array(A),d=S.load(W);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); +import{a as c}from"./web-ifc-api-CKmHUvxw.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as f,a as p,G as w,F as g}from"./index-7--X2BWW.js";import{L as h,f as u}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new p(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(w);b.create(e);e.scene.three.background=null;const S=new g(t),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await L.arrayBuffer(),A=new Uint8Array(k),d=S.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); diff --git a/examples/assets/faceMeasurement.js b/examples/assets/faceMeasurement.js index 6e1cfef8..b534374b 100644 --- a/examples/assets/faceMeasurement.js +++ b/examples/assets/faceMeasurement.js @@ -1 +1 @@ -import{a as c}from"./web-ifc-api-CKmHUvxw.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as f,a as p,G as w,F as g}from"./index-7--X2BWW.js";import{W as h,P as u}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new p(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(w);b.create(e);e.scene.three.background=null;const S=new g(t),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),A=await k.arrayBuffer(),W=new Uint8Array(A),d=S.load(W);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); +import{a as c}from"./web-ifc-api-CKmHUvxw.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as f,a as p,G as w,F as g}from"./index-7--X2BWW.js";import{L as u,u as h}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new u(t,r);e.camera=new p(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(w);b.create(e);e.scene.three.background=null;const S=new g(t),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await L.arrayBuffer(),A=new Uint8Array(k),d=S.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(h);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); diff --git a/examples/assets/highlighter.js b/examples/assets/highlighter.js index 52242de9..4577a86a 100644 --- a/examples/assets/highlighter.js +++ b/examples/assets/highlighter.js @@ -1 +1 @@ -import{b as s}from"./web-ifc-api-CKmHUvxw.js";import{C as c,W as d,S as l,a as i,G as m,F as p}from"./index-7--X2BWW.js";import{W as u,L as g,k as f}from"./index-BIn5csQH.js";import{S as h}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const w=document.getElementById("container"),t=new c,b=t.get(d),e=b.create();e.scene=new l(t);e.renderer=new u(t,w);e.camera=new i(t);t.init();e.renderer.postproduction.enabled=!0;e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const x=t.get(m),y=x.create(e);e.renderer.postproduction.customEffects.excludedMeshes.push(y.three);e.scene.three.background=null;const S=new p(t),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),B=await k.arrayBuffer(),C=new Uint8Array(B),M=S.load(C);e.scene.three.add(M);const o=t.get(g);o.setup({world:e});o.zoomToSelection=!0;const n=t.get(f);n.world=e;n.enabled=!0;n.create("example",new s({color:12382500,transparent:!0,opacity:.5}));o.events.select.onHighlight.add(a=>{n.clear("example"),n.add("example",a)});o.events.select.onClear.add(()=>{n.clear("example")});const r=new h;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>r.begin());e.renderer.onAfterUpdate.add(()=>r.end()); +import{b as s}from"./web-ifc-api-CKmHUvxw.js";import{C as c,W as d,S as l,a as i,G as m,F as p}from"./index-7--X2BWW.js";import{L as u,p as g,Y as f}from"./index-DHdXOf4g.js";import{S as h}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const w=document.getElementById("container"),t=new c,b=t.get(d),e=b.create();e.scene=new l(t);e.renderer=new u(t,w);e.camera=new i(t);t.init();e.renderer.postproduction.enabled=!0;e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const x=t.get(m),y=x.create(e);e.renderer.postproduction.customEffects.excludedMeshes.push(y.three);e.scene.three.background=null;const S=new p(t),B=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),C=await B.arrayBuffer(),M=new Uint8Array(C),A=S.load(M);e.scene.three.add(A);const o=t.get(g);o.setup({world:e});o.zoomToSelection=!0;const n=t.get(f);n.world=e;n.enabled=!0;n.create("example",new s({color:12382500,transparent:!0,opacity:.5}));o.events.select.onHighlight.add(a=>{n.clear("example"),n.add("example",a)});o.events.select.onClear.add(()=>{n.clear("example")});const r=new h;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>r.begin());e.renderer.onAfterUpdate.add(()=>r.end()); diff --git a/examples/assets/ifcStreamer.js b/examples/assets/ifcStreamer.js index 24400a10..e0250ced 100644 --- a/examples/assets/ifcStreamer.js +++ b/examples/assets/ifcStreamer.js @@ -1 +1 @@ -import"./web-ifc-api-CKmHUvxw.js";import{S as d}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as p,d as u,a as w,G as g}from"./index-7--X2BWW.js";import{b as h}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const f=document.getElementById("container"),o=new l,y=o.get(m),e=y.create();e.scene=new p(o);e.renderer=new u(o,f);e.camera=new w(o);o.init();e.scene.setup();e.camera.controls.setLookAt(12,6,8,0,0,-10);const b=o.get(g);b.create(e);e.scene.three.background=null;const t=o.get(h);t.world=e;t.url="https://thatopen.github.io/engine_components/resources/streaming/";async function S(r,s){const c=await(await fetch(r)).json();let a;a=await(await fetch(s)).json();const i=await t.load(c,!0,a);console.log(i)}await S("https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed.json","https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed-properties.json");e.camera.controls.addEventListener("sleep",()=>{t.culler.needsUpdate=!0});t.useCache=!0;t.culler.threshold=10;t.culler.maxHiddenTime=1e3;t.culler.maxLostTime=3e3;const n=new d;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import"./web-ifc-api-CKmHUvxw.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as p,d as u,a as w,G as g}from"./index-7--X2BWW.js";import{d as h}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const f=document.getElementById("container"),o=new l,y=o.get(m),e=y.create();e.scene=new p(o);e.renderer=new u(o,f);e.camera=new w(o);o.init();e.scene.setup();e.camera.controls.setLookAt(12,6,8,0,0,-10);const S=o.get(g);S.create(e);e.scene.three.background=null;const t=o.get(h);t.world=e;t.url="https://thatopen.github.io/engine_components/resources/streaming/";async function b(r,s){const c=await(await fetch(r)).json();let a;a=await(await fetch(s)).json();const d=await t.load(c,!0,a);console.log(d)}await b("https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed.json","https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed-properties.json");e.camera.controls.addEventListener("sleep",()=>{t.culler.needsUpdate=!0});t.useCache=!0;t.culler.threshold=10;t.culler.maxHiddenTime=1e3;t.culler.maxLostTime=3e3;const n=new i;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/index-Bq6zc5aT.js b/examples/assets/index-D2VaW7VV.js similarity index 99% rename from examples/assets/index-Bq6zc5aT.js rename to examples/assets/index-D2VaW7VV.js index 6300c4da..17c73629 100644 --- a/examples/assets/index-Bq6zc5aT.js +++ b/examples/assets/index-D2VaW7VV.js @@ -1,4 +1,4 @@ -import{W as ki,S as Vo,O as Wo,G as Go,F as Vt,I as ht,B as Oi,V as vn,f as Qr,H as Yo,g as Zr,c as Kr,h as ta,i as mi,T as yt}from"./index-7--X2BWW.js";import{V as yn,c as Ti,C as ue,G as Fn,F as ea,L as ia,d as Bn,e as na,f as oa,P as ri,g as Ce,D as sa,A as ra,O as aa,h as la,I as ca,R as da,i as qo,j as Xo,k as ua,l as Jo,m as ha,n as pa,o as Qo,p as Zo,q as ma,r as fa}from"./web-ifc-api-CKmHUvxw.js";import{X as ba,W as P,L as ga}from"./index-BIn5csQH.js";var va=Object.defineProperty,ya=(e,t,i)=>t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Nt=(e,t,i)=>(ya(e,typeof t!="symbol"?t+"":t,i),i);const te=Math.min,mt=Math.max,fi=Math.round,Ct=e=>({x:e,y:e}),_a={left:"right",right:"left",bottom:"top",top:"bottom"},$a={start:"end",end:"start"};function Un(e,t,i){return mt(e,te(t,i))}function Ge(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function Ii(e){return e.split("-")[1]}function Ko(e){return e==="x"?"y":"x"}function ts(e){return e==="y"?"height":"width"}function Ht(e){return["top","bottom"].includes(ft(e))?"y":"x"}function es(e){return Ko(Ht(e))}function xa(e,t,i){i===void 0&&(i=!1);const n=Ii(e),o=es(e),s=ts(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=bi(r)),[r,bi(r)]}function wa(e){const t=bi(e);return[en(e),t,en(t)]}function en(e){return e.replace(/start|end/g,t=>$a[t])}function Ca(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function Aa(e,t,i,n){const o=Ii(e);let s=Ca(ft(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(en)))),s}function bi(e){return e.replace(/left|right|bottom|top/g,t=>_a[t])}function Ea(e){return{top:0,right:0,bottom:0,left:0,...e}}function is(e){return typeof e!="number"?Ea(e):{top:e,right:e,bottom:e,left:e}}function ee(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function Vn(e,t,i){let{reference:n,floating:o}=e;const s=Ht(t),r=es(t),l=ts(r),a=ft(t),d=s==="y",u=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-o.width,y:c};break;default:p={x:n.x,y:n.y}}switch(Ii(t)){case"start":p[r]-=h*(i&&d?-1:1);break;case"end":p[r]+=h*(i&&d?-1:1);break}return p}const Sa=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=Vn(d,n,a),h=n,p={},b=0;for(let $=0;$w<=0)){var B,q;const w=(((B=s.flip)==null?void 0:B.index)||0)+1,L=T[w];if(L)return{data:{index:w,overflows:E},reset:{placement:L}};let V=(q=E.filter(K=>K.overflows[0]<=0).sort((K,tt)=>K.overflows[1]-tt.overflows[1])[0])==null?void 0:q.placement;if(!V)switch(p){case"bestFit":{var G;const K=(G=E.filter(tt=>{if(C){const ct=Ht(tt.placement);return ct===y||ct==="y"}return!0}).map(tt=>[tt.placement,tt.overflows.filter(ct=>ct>0).reduce((ct,xe)=>ct+xe,0)]).sort((tt,ct)=>tt[1]-ct[1])[0])==null?void 0:G[0];K&&(V=K);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function os(e){const t=te(...e.map(s=>s.left)),i=te(...e.map(s=>s.top)),n=mt(...e.map(s=>s.right)),o=mt(...e.map(s=>s.bottom));return{x:t,y:i,width:n-t,height:o-i}}function Oa(e){const t=e.slice().sort((o,s)=>o.y-s.y),i=[];let n=null;for(let o=0;on.height/2?i.push([s]):i[i.length-1].push(s),n=s}return i.map(o=>ee(os(o)))}const Ta=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:s,strategy:r}=t,{padding:l=2,x:a,y:d}=Ge(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),c=Oa(u),h=ee(os(u)),p=is(l);function b(){if(c.length===2&&c[0].left>c[1].right&&a!=null&&d!=null)return c.find(v=>a>v.left-p.left&&av.top-p.top&&d=2){if(Ht(i)==="y"){const E=c[0],B=c[c.length-1],q=ft(i)==="top",G=E.top,w=B.bottom,L=q?E.left:B.left,V=q?E.right:B.right,K=V-L,tt=w-G;return{top:G,bottom:w,left:L,right:V,width:K,height:tt,x:L,y:G}}const v=ft(i)==="left",f=mt(...c.map(E=>E.right)),y=te(...c.map(E=>E.left)),_=c.filter(E=>v?E.left===y:E.right===f),x=_[0].top,A=_[_.length-1].bottom,C=y,T=f,M=T-C,S=A-x;return{top:x,bottom:A,left:C,right:T,width:M,height:S,x:C,y:x}}return h}const $=await s.getElementRects({reference:{getBoundingClientRect:b},floating:n.floating,strategy:r});return o.reference.x!==$.reference.x||o.reference.y!==$.reference.y||o.reference.width!==$.reference.width||o.reference.height!==$.reference.height?{reset:{rects:$}}:{}}}};async function Ia(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=ft(i),l=Ii(i),a=Ht(i)==="y",d=["left","top"].includes(r)?-1:1,u=s&&a?-1:1,c=Ge(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof b=="number"&&(p=l==="end"?b*-1:b),a?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const ss=function(e){return{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Ia(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Na=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:f,y}=v;return{x:f,y}}},...a}=Ge(e,t),d={x:i,y:n},u=await ns(t,a),c=Ht(ft(o)),h=Ko(c);let p=d[h],b=d[c];if(s){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",y=p+u[v],_=p-u[f];p=Un(y,p,_)}if(r){const v=c==="y"?"top":"left",f=c==="y"?"bottom":"right",y=b+u[v],_=b-u[f];b=Un(y,b,_)}const $=l.fn({...t,[h]:p,[c]:b});return{...$,data:{x:$.x-i,y:$.y-n,enabled:{[h]:s,[c]:r}}}}}};function Ni(){return typeof window<"u"}function At(e){return rs(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(rs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rs(e){return Ni()?e instanceof Node||e instanceof Q(e).Node:!1}function dt(e){return Ni()?e instanceof Element||e instanceof Q(e).Element:!1}function ut(e){return Ni()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Wn(e){return!Ni()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ye(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Ma(e){return["table","td","th"].includes(At(e))}function Pa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function _n(e){const t=$n(),i=dt(e)?it(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function Ra(e){let t=ie(e);for(;ut(t)&&!Mi(t);){if(_n(t))return t;if(Pa(t))return null;t=ie(t)}return null}function $n(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Mi(e){return["html","body","#document"].includes(At(e))}function it(e){return Q(e).getComputedStyle(e)}function Pi(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ie(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wn(e)&&e.host||St(e);return Wn(t)?t.host:t}function as(e){const t=ie(e);return Mi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&Ye(t)?t:as(t)}function ls(e,t,i){var n;t===void 0&&(t=[]);const o=as(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Q(o);return s?(La(r),t.concat(r,r.visualViewport||[],Ye(o)?o:[],[])):t.concat(o,ls(o,[]))}function La(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){const t=it(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ut(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=fi(i)!==s||fi(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function ds(e){return dt(e)?e:e.contextElement}function Qt(e){const t=ds(e);if(!ut(t))return Ct(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=cs(t);let r=(s?fi(i.width):i.width)/n,l=(s?fi(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ja=Ct(0);function us(e){const t=Q(e);return!$n()||!t.visualViewport?ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function za(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==Q(e)?!1:t}function Re(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=ds(e);let r=Ct(1);t&&(n?dt(n)&&(r=Qt(n)):r=Qt(e));const l=za(s,i,n)?us(s):Ct(0);let a=(o.left+l.x)/r.x,d=(o.top+l.y)/r.y,u=o.width/r.x,c=o.height/r.y;if(s){const h=Q(s),p=n&&dt(n)?Q(n):n;let b=h,$=b.frameElement;for(;$&&n&&p!==b;){const v=Qt($),f=$.getBoundingClientRect(),y=it($),_=f.left+($.clientLeft+parseFloat(y.paddingLeft))*v.x,x=f.top+($.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,d*=v.y,u*=v.x,c*=v.y,a+=_,d+=x,b=Q($),$=b.frameElement}}return ee({width:u,height:c,x:a,y:d})}const Da=[":popover-open",":modal"];function hs(e){return Da.some(t=>{try{return e.matches(t)}catch{return!1}})}function Ha(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=St(n),l=t?hs(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},d=Ct(1);const u=Ct(0),c=ut(n);if((c||!c&&!s)&&((At(n)!=="body"||Ye(r))&&(a=Pi(n)),ut(n))){const h=Re(n);d=Qt(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+u.x,y:i.y*d.y-a.scrollTop*d.y+u.y}}function Fa(e){return Array.from(e.getClientRects())}function ps(e){return Re(St(e)).left+Pi(e).scrollLeft}function Ba(e){const t=St(e),i=Pi(e),n=e.ownerDocument.body,o=mt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=mt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+ps(e);const l=-i.scrollTop;return it(n).direction==="rtl"&&(r+=mt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function Ua(e,t){const i=Q(e),n=St(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const d=$n();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Va(e,t){const i=Re(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=ut(e)?Qt(e):Ct(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,d=n*s.y;return{width:r,height:l,x:a,y:d}}function Gn(e,t,i){let n;if(t==="viewport")n=Ua(e,i);else if(t==="document")n=Ba(St(e));else if(dt(t))n=Va(t,i);else{const o=us(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ee(n)}function ms(e,t){const i=ie(e);return i===t||!dt(i)||Mi(i)?!1:it(i).position==="fixed"||ms(i,t)}function Wa(e,t){const i=t.get(e);if(i)return i;let n=ls(e,[]).filter(l=>dt(l)&&At(l)!=="body"),o=null;const s=it(e).position==="fixed";let r=s?ie(e):e;for(;dt(r)&&!Mi(r);){const l=it(r),a=_n(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&o&&["absolute","fixed"].includes(o.position)||Ye(r)&&!a&&ms(e,r))?n=n.filter(d=>d!==r):o=l,r=ie(r)}return t.set(e,n),n}function Ga(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?Wa(t,this._c):[].concat(i),n],r=s[0],l=s.reduce((a,d)=>{const u=Gn(t,d,o);return a.top=mt(u.top,a.top),a.right=te(u.right,a.right),a.bottom=te(u.bottom,a.bottom),a.left=mt(u.left,a.left),a},Gn(t,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ya(e){const{width:t,height:i}=cs(e);return{width:t,height:i}}function qa(e,t,i){const n=ut(t),o=St(t),s=i==="fixed",r=Re(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=Ct(0);if(n||!n&&!s)if((At(t)!=="body"||Ye(o))&&(l=Pi(t)),n){const c=Re(t,!0,s,t);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=ps(o));const d=r.left+l.scrollLeft-a.x,u=r.top+l.scrollTop-a.y;return{x:d,y:u,width:r.width,height:r.height}}function Yn(e,t){return!ut(e)||it(e).position==="fixed"?null:t?t(e):e.offsetParent}function fs(e,t){const i=Q(e);if(!ut(e)||hs(e))return i;let n=Yn(e,t);for(;n&&Ma(n)&&it(n).position==="static";)n=Yn(n,t);return n&&(At(n)==="html"||At(n)==="body"&&it(n).position==="static"&&!_n(n))?i:n||Ra(e)||i}const Xa=async function(e){const t=this.getOffsetParent||fs,i=this.getDimensions;return{reference:qa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}};function Ja(e){return it(e).direction==="rtl"}const Qa={convertOffsetParentRelativeRectToViewportRelativeRect:Ha,getDocumentElement:St,getClippingRect:Ga,getOffsetParent:fs,getElementRects:Xa,getClientRects:Fa,getDimensions:Ya,getScale:Qt,isElement:dt,isRTL:Ja},bs=Na,gs=ka,vs=Ta,ys=(e,t,i)=>{const n=new Map,o={platform:Qa,...i},s={...o.platform,_c:n};return Sa(e,t,{...o,platform:s})};/** +import{W as ki,S as Vo,O as Wo,G as Go,F as Vt,I as ht,B as Oi,V as vn,f as Qr,H as Yo,g as Zr,c as Kr,h as ta,i as mi,T as yt}from"./index-7--X2BWW.js";import{V as yn,c as Ti,C as ue,G as Fn,F as ea,L as ia,d as Bn,e as na,f as oa,P as ri,g as Ce,D as sa,A as ra,O as aa,h as la,I as ca,R as da,i as qo,j as Xo,k as ua,l as Jo,m as ha,n as pa,o as Qo,p as Zo,q as ma,r as fa}from"./web-ifc-api-CKmHUvxw.js";import{j as ba,L as P,p as ga}from"./index-DHdXOf4g.js";var va=Object.defineProperty,ya=(e,t,i)=>t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Nt=(e,t,i)=>(ya(e,typeof t!="symbol"?t+"":t,i),i);const te=Math.min,mt=Math.max,fi=Math.round,Ct=e=>({x:e,y:e}),_a={left:"right",right:"left",bottom:"top",top:"bottom"},$a={start:"end",end:"start"};function Un(e,t,i){return mt(e,te(t,i))}function Ge(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function Ii(e){return e.split("-")[1]}function Ko(e){return e==="x"?"y":"x"}function ts(e){return e==="y"?"height":"width"}function Ht(e){return["top","bottom"].includes(ft(e))?"y":"x"}function es(e){return Ko(Ht(e))}function xa(e,t,i){i===void 0&&(i=!1);const n=Ii(e),o=es(e),s=ts(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=bi(r)),[r,bi(r)]}function wa(e){const t=bi(e);return[en(e),t,en(t)]}function en(e){return e.replace(/start|end/g,t=>$a[t])}function Ca(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function Aa(e,t,i,n){const o=Ii(e);let s=Ca(ft(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(en)))),s}function bi(e){return e.replace(/left|right|bottom|top/g,t=>_a[t])}function Ea(e){return{top:0,right:0,bottom:0,left:0,...e}}function is(e){return typeof e!="number"?Ea(e):{top:e,right:e,bottom:e,left:e}}function ee(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function Vn(e,t,i){let{reference:n,floating:o}=e;const s=Ht(t),r=es(t),l=ts(r),a=ft(t),d=s==="y",u=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-o.width,y:c};break;default:p={x:n.x,y:n.y}}switch(Ii(t)){case"start":p[r]-=h*(i&&d?-1:1);break;case"end":p[r]+=h*(i&&d?-1:1);break}return p}const Sa=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=Vn(d,n,a),h=n,p={},b=0;for(let $=0;$w<=0)){var B,q;const w=(((B=s.flip)==null?void 0:B.index)||0)+1,L=T[w];if(L)return{data:{index:w,overflows:E},reset:{placement:L}};let V=(q=E.filter(K=>K.overflows[0]<=0).sort((K,tt)=>K.overflows[1]-tt.overflows[1])[0])==null?void 0:q.placement;if(!V)switch(p){case"bestFit":{var G;const K=(G=E.filter(tt=>{if(C){const ct=Ht(tt.placement);return ct===y||ct==="y"}return!0}).map(tt=>[tt.placement,tt.overflows.filter(ct=>ct>0).reduce((ct,xe)=>ct+xe,0)]).sort((tt,ct)=>tt[1]-ct[1])[0])==null?void 0:G[0];K&&(V=K);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function os(e){const t=te(...e.map(s=>s.left)),i=te(...e.map(s=>s.top)),n=mt(...e.map(s=>s.right)),o=mt(...e.map(s=>s.bottom));return{x:t,y:i,width:n-t,height:o-i}}function Oa(e){const t=e.slice().sort((o,s)=>o.y-s.y),i=[];let n=null;for(let o=0;on.height/2?i.push([s]):i[i.length-1].push(s),n=s}return i.map(o=>ee(os(o)))}const Ta=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:s,strategy:r}=t,{padding:l=2,x:a,y:d}=Ge(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),c=Oa(u),h=ee(os(u)),p=is(l);function b(){if(c.length===2&&c[0].left>c[1].right&&a!=null&&d!=null)return c.find(v=>a>v.left-p.left&&av.top-p.top&&d=2){if(Ht(i)==="y"){const E=c[0],B=c[c.length-1],q=ft(i)==="top",G=E.top,w=B.bottom,L=q?E.left:B.left,V=q?E.right:B.right,K=V-L,tt=w-G;return{top:G,bottom:w,left:L,right:V,width:K,height:tt,x:L,y:G}}const v=ft(i)==="left",f=mt(...c.map(E=>E.right)),y=te(...c.map(E=>E.left)),_=c.filter(E=>v?E.left===y:E.right===f),x=_[0].top,A=_[_.length-1].bottom,C=y,T=f,M=T-C,S=A-x;return{top:x,bottom:A,left:C,right:T,width:M,height:S,x:C,y:x}}return h}const $=await s.getElementRects({reference:{getBoundingClientRect:b},floating:n.floating,strategy:r});return o.reference.x!==$.reference.x||o.reference.y!==$.reference.y||o.reference.width!==$.reference.width||o.reference.height!==$.reference.height?{reset:{rects:$}}:{}}}};async function Ia(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=ft(i),l=Ii(i),a=Ht(i)==="y",d=["left","top"].includes(r)?-1:1,u=s&&a?-1:1,c=Ge(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof b=="number"&&(p=l==="end"?b*-1:b),a?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const ss=function(e){return{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Ia(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Na=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:f,y}=v;return{x:f,y}}},...a}=Ge(e,t),d={x:i,y:n},u=await ns(t,a),c=Ht(ft(o)),h=Ko(c);let p=d[h],b=d[c];if(s){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",y=p+u[v],_=p-u[f];p=Un(y,p,_)}if(r){const v=c==="y"?"top":"left",f=c==="y"?"bottom":"right",y=b+u[v],_=b-u[f];b=Un(y,b,_)}const $=l.fn({...t,[h]:p,[c]:b});return{...$,data:{x:$.x-i,y:$.y-n,enabled:{[h]:s,[c]:r}}}}}};function Ni(){return typeof window<"u"}function At(e){return rs(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(rs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rs(e){return Ni()?e instanceof Node||e instanceof Q(e).Node:!1}function dt(e){return Ni()?e instanceof Element||e instanceof Q(e).Element:!1}function ut(e){return Ni()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Wn(e){return!Ni()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ye(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Ma(e){return["table","td","th"].includes(At(e))}function Pa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function _n(e){const t=$n(),i=dt(e)?it(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function Ra(e){let t=ie(e);for(;ut(t)&&!Mi(t);){if(_n(t))return t;if(Pa(t))return null;t=ie(t)}return null}function $n(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Mi(e){return["html","body","#document"].includes(At(e))}function it(e){return Q(e).getComputedStyle(e)}function Pi(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ie(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wn(e)&&e.host||St(e);return Wn(t)?t.host:t}function as(e){const t=ie(e);return Mi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&Ye(t)?t:as(t)}function ls(e,t,i){var n;t===void 0&&(t=[]);const o=as(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Q(o);return s?(La(r),t.concat(r,r.visualViewport||[],Ye(o)?o:[],[])):t.concat(o,ls(o,[]))}function La(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){const t=it(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ut(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=fi(i)!==s||fi(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function ds(e){return dt(e)?e:e.contextElement}function Qt(e){const t=ds(e);if(!ut(t))return Ct(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=cs(t);let r=(s?fi(i.width):i.width)/n,l=(s?fi(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ja=Ct(0);function us(e){const t=Q(e);return!$n()||!t.visualViewport?ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function za(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==Q(e)?!1:t}function Re(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=ds(e);let r=Ct(1);t&&(n?dt(n)&&(r=Qt(n)):r=Qt(e));const l=za(s,i,n)?us(s):Ct(0);let a=(o.left+l.x)/r.x,d=(o.top+l.y)/r.y,u=o.width/r.x,c=o.height/r.y;if(s){const h=Q(s),p=n&&dt(n)?Q(n):n;let b=h,$=b.frameElement;for(;$&&n&&p!==b;){const v=Qt($),f=$.getBoundingClientRect(),y=it($),_=f.left+($.clientLeft+parseFloat(y.paddingLeft))*v.x,x=f.top+($.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,d*=v.y,u*=v.x,c*=v.y,a+=_,d+=x,b=Q($),$=b.frameElement}}return ee({width:u,height:c,x:a,y:d})}const Da=[":popover-open",":modal"];function hs(e){return Da.some(t=>{try{return e.matches(t)}catch{return!1}})}function Ha(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=St(n),l=t?hs(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},d=Ct(1);const u=Ct(0),c=ut(n);if((c||!c&&!s)&&((At(n)!=="body"||Ye(r))&&(a=Pi(n)),ut(n))){const h=Re(n);d=Qt(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+u.x,y:i.y*d.y-a.scrollTop*d.y+u.y}}function Fa(e){return Array.from(e.getClientRects())}function ps(e){return Re(St(e)).left+Pi(e).scrollLeft}function Ba(e){const t=St(e),i=Pi(e),n=e.ownerDocument.body,o=mt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=mt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+ps(e);const l=-i.scrollTop;return it(n).direction==="rtl"&&(r+=mt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function Ua(e,t){const i=Q(e),n=St(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const d=$n();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Va(e,t){const i=Re(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=ut(e)?Qt(e):Ct(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,d=n*s.y;return{width:r,height:l,x:a,y:d}}function Gn(e,t,i){let n;if(t==="viewport")n=Ua(e,i);else if(t==="document")n=Ba(St(e));else if(dt(t))n=Va(t,i);else{const o=us(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ee(n)}function ms(e,t){const i=ie(e);return i===t||!dt(i)||Mi(i)?!1:it(i).position==="fixed"||ms(i,t)}function Wa(e,t){const i=t.get(e);if(i)return i;let n=ls(e,[]).filter(l=>dt(l)&&At(l)!=="body"),o=null;const s=it(e).position==="fixed";let r=s?ie(e):e;for(;dt(r)&&!Mi(r);){const l=it(r),a=_n(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&o&&["absolute","fixed"].includes(o.position)||Ye(r)&&!a&&ms(e,r))?n=n.filter(d=>d!==r):o=l,r=ie(r)}return t.set(e,n),n}function Ga(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?Wa(t,this._c):[].concat(i),n],r=s[0],l=s.reduce((a,d)=>{const u=Gn(t,d,o);return a.top=mt(u.top,a.top),a.right=te(u.right,a.right),a.bottom=te(u.bottom,a.bottom),a.left=mt(u.left,a.left),a},Gn(t,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ya(e){const{width:t,height:i}=cs(e);return{width:t,height:i}}function qa(e,t,i){const n=ut(t),o=St(t),s=i==="fixed",r=Re(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=Ct(0);if(n||!n&&!s)if((At(t)!=="body"||Ye(o))&&(l=Pi(t)),n){const c=Re(t,!0,s,t);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=ps(o));const d=r.left+l.scrollLeft-a.x,u=r.top+l.scrollTop-a.y;return{x:d,y:u,width:r.width,height:r.height}}function Yn(e,t){return!ut(e)||it(e).position==="fixed"?null:t?t(e):e.offsetParent}function fs(e,t){const i=Q(e);if(!ut(e)||hs(e))return i;let n=Yn(e,t);for(;n&&Ma(n)&&it(n).position==="static";)n=Yn(n,t);return n&&(At(n)==="html"||At(n)==="body"&&it(n).position==="static"&&!_n(n))?i:n||Ra(e)||i}const Xa=async function(e){const t=this.getOffsetParent||fs,i=this.getDimensions;return{reference:qa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}};function Ja(e){return it(e).direction==="rtl"}const Qa={convertOffsetParentRelativeRectToViewportRelativeRect:Ha,getDocumentElement:St,getClippingRect:Ga,getOffsetParent:fs,getElementRects:Xa,getClientRects:Fa,getDimensions:Ya,getScale:Qt,isElement:dt,isRTL:Ja},bs=Na,gs=ka,vs=Ta,ys=(e,t,i)=>{const n=new Map,o={platform:Qa,...i},s={...o.platform,_c:n};return Sa(e,t,{...o,platform:s})};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause diff --git a/examples/assets/index-BIn5csQH.js b/examples/assets/index-DHdXOf4g.js similarity index 60% rename from examples/assets/index-BIn5csQH.js rename to examples/assets/index-DHdXOf4g.js index c62c999c..ee132cfe 100644 --- a/examples/assets/index-BIn5csQH.js +++ b/examples/assets/index-DHdXOf4g.js @@ -1,13 +1,13 @@ -import{t as Je,U as no,u as vn,v as si,e as Ce,d as et,S as Ri,V as L,h as ve,w as Xt,T as ui,x as we,a as ee,y as kn,c as ne,P as Qa,z as qi,E as vi,H as Xi,s as ft,J as qa,W as bn,b as nt,K as Ze,O as Zi,N as Vn,C as Ue,Q as Ms,X as fi,Y as ji,Z as Ln,_ as Ja,$ as kt,a0 as yi,a1 as xn,a2 as Ft,i as Wi,a3 as Ds,a4 as qt,a5 as hc,a6 as Yn,a7 as ro,a8 as oo,a9 as ao,aa as lo,ab as ho,ac as Gn,ad as co,ae as uo,af as fo,ag as po,ah as mo,ai as Io,aj as Eo,ak as $a,B as ze,al as el,am as cc,an as dc,ao as Ki,ap as tl,aq as gi,ar as uc,as as fc,at as Nt,au as pc,av as mc,f as Ic,aw as il,G as Mn,ax as We,ay as sl,az as De,L as ni,aA as Ec,aB as Hn,aC as gc,aD as lt,aE as Cc,aF as Ut,aG as ks,aH as Tc,aI as ns,j as yn,aJ as Rc,aK as vc,aL as yc,aM as Sc,aN as wc,aO as Fc,I as go,aP as Co,aQ as To,k as Lt,aR as Si,aS as Ac,aT as Oc,aU as zo,aV as ko,aW as Sn,aX as Ro,aY as Nc,aZ as rs,a_ as _t,a$ as Pc,b0 as bc,b1 as Lc,b2 as xc,b3 as Mc,b4 as Vo,b5 as Dc,b6 as _c,b7 as Uc,b8 as nl,b9 as Bc,ba as zc,bb as Yo,bc as kc,r as Vc,bd as Yc,be as Gc,bf as Hc,bg as Wc,bh as Xc,bi as Fr,bj as Vi,bk as Zc,bl as jc}from"./web-ifc-api-CKmHUvxw.js";var Kc=Object.defineProperty,Qc=(l,e,t)=>e in l?Kc(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,w=(l,e,t)=>(Qc(l,typeof e!="symbol"?e+"":e,t),t),qc=Object.defineProperty,Jc=(l,e,t)=>e in l?qc(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,T=(l,e,t)=>(Jc(l,typeof e!="symbol"?e+"":e,t),t);const rl=0,$c=1,ed=2,Go=2,ir=1.25,Ho=1,wn=6*4+4+4,Wn=65535,td=Math.pow(2,-24),sr=Symbol("SKIP_GENERATION");function id(l){return l.index?l.index.count:l.attributes.position.count}function Ji(l){return id(l)/3}function sd(l,e=ArrayBuffer){return l>65535?new Uint32Array(new e(4*l)):new Uint16Array(new e(2*l))}function nd(l,e){if(!l.index){const t=l.attributes.position.count,i=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,s=sd(t,i);l.setIndex(new et(s,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),i=t[t.length-1];i.count=Math.min(e-i.offset,i.count);let s=0;return t.forEach(({count:n})=>s+=n),e!==s}function Ne(l,e,t){return t.min.x=e[l],t.min.y=e[l+1],t.min.z=e[l+2],t.max.x=e[l+3],t.max.y=e[l+4],t.max.z=e[l+5],t}function od(l){l[0]=l[1]=l[2]=1/0,l[3]=l[4]=l[5]=-1/0}function Wo(l){let e=-1,t=-1/0;for(let i=0;i<3;i++){const s=l[i+3]-l[i];s>t&&(t=s,e=i)}return e}function Xo(l,e){e.set(l)}function Zo(l,e,t){let i,s;for(let n=0;n<3;n++){const r=n+3;i=l[n],s=e[n],t[n]=is?i:s}}function Vs(l,e,t){for(let i=0;i<3;i++){const s=e[l+2*i],n=e[l+2*i+1],r=s-n,o=s+n;rt[i+3]&&(t[i+3]=o)}}function os(l){const e=l[3]-l[0],t=l[4]-l[1],i=l[5]-l[2];return 2*(e*t+t*i+i*e)}function nr(l,e,t,i,s=null){let n=1/0,r=1/0,o=1/0,a=-1/0,h=-1/0,c=-1/0,u=1/0,d=1/0,f=1/0,m=-1/0,p=-1/0,I=-1/0;const E=s!==null;for(let C=e*6,v=(e+t)*6;Ca&&(a=A),E&&gm&&(m=g);const b=l[C+2],N=l[C+3],M=b-N,_=b+N;Mh&&(h=_),E&&bp&&(p=b);const F=l[C+4],D=l[C+5],R=F-D,B=F+D;Rc&&(c=B),E&&FI&&(I=F)}i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=h,i[5]=c,E&&(s[0]=u,s[1]=d,s[2]=f,s[3]=m,s[4]=p,s[5]=I)}function ad(l,e,t,i){let s=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,h=-1/0;for(let c=e*6,u=(e+t)*6;co&&(o=d);const f=l[c+2];fa&&(a=f);const m=l[c+4];mh&&(h=m)}i[0]=s,i[1]=n,i[2]=r,i[3]=o,i[4]=a,i[5]=h}function ld(l,e){od(e);const t=l.attributes.position,i=l.index?l.index.array:null,s=Ji(l),n=new Float32Array(s*6),r=t.normalized,o=t.array,a=t.offset||0;let h=3;t.isInterleavedBufferAttribute&&(h=t.data.stride);const c=["getX","getY","getZ"];for(let u=0;uO&&(O=v),g>O&&(O=g);const A=(O-S)/2,b=E*2;n[f+b+0]=S+A,n[f+b+1]=A+(Math.abs(S)+A)*td,Se[E+3]&&(e[E+3]=O)}}return n}const xt=32,hd=(l,e)=>l.candidate-e.candidate,Zt=new Array(xt).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Ys=new Float32Array(6);function cd(l,e,t,i,s,n){let r=-1,o=0;if(n===rl)r=Wo(e),r!==-1&&(o=(e[r]+e[r+3])/2);else if(n===$c)r=Wo(l),r!==-1&&(o=dd(t,i,s,r));else if(n===ed){const a=os(l);let h=ir*s;const c=i*6,u=(i+s)*6;for(let d=0;d<3;d++){const f=e[d],m=(e[d+3]-f)/xt;if(s=S.candidate?Vs(C,t,S.rightCacheBounds):(Vs(C,t,S.leftCacheBounds),S.count++)}}for(let C=0;C=xt&&(C=xt-1);const v=Zt[C];v.count++,Vs(E,t,v.bounds)}const p=Zt[xt-1];Xo(p.bounds,p.rightCacheBounds);for(let E=xt-2;E>=0;E--){const C=Zt[E],v=Zt[E+1];Zo(C.bounds,v.rightCacheBounds,C.rightCacheBounds)}let I=0;for(let E=0;E=a;)o--;if(r=a;)o--;if(r2**16,s=i?4:2,n=e?new SharedArrayBuffer(t*s):new ArrayBuffer(t*s),r=i?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=s&&(u=!0,n&&(console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),O<=r||b>=s)return C(S+O),g.offset=S,g.count=O,g;const N=cd(g.boundingData,A,m,S,O,o);if(N.axis===-1)return C(S+O),g.offset=S,g.count=O,g;const M=p(c,i,m,S,O,N);if(M===S||M===S+O)C(S+O),g.offset=S,g.count=O;else{g.splitAxis=N.axis;const _=new Gs,F=S,D=M-S;g.left=_,_.boundingData=new Float32Array(6),nr(m,F,D,_.boundingData,f),v(_,F,D,f,b+1);const R=new Gs,B=M,k=O-D;g.right=R,R.boundingData=new Float32Array(6),nr(m,B,k,R.boundingData,f),v(R,B,k,f,b+1)}return g}}function Id(l,e){const t=l.geometry;e.indirect&&(l._indirectBuffer=pd(t,e.useSharedArrayBuffer),rd(t)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),l._indirectBuffer||nd(t,e);const i=md(l,e);let s,n,r;const o=[],a=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let u=0;uMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[f+6]=g/4,g=c(g,C),n[f+7]=v,g}}}class Ht{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let i=1/0,s=-1/0;for(let n=0,r=e.length;ns?o:s}this.min=i,this.max=s}setFromPoints(e,t){let i=1/0,s=-1/0;for(let n=0,r=t.length;ns?a:s}this.min=i,this.max=s}isSeparated(e){return this.min>e.max||e.min>this.max}}Ht.prototype.setFromBox=function(){const l=new L;return function(e,t){const i=t.min,s=t.max;let n=1/0,r=-1/0;for(let o=0;o<=1;o++)for(let a=0;a<=1;a++)for(let h=0;h<=1;h++){l.x=i.x*o+s.x*(1-o),l.y=i.y*a+s.y*(1-a),l.z=i.z*h+s.z*(1-h);const c=e.dot(l);n=Math.min(c,n),r=Math.max(c,r)}this.min=n,this.max=r}}();const Ed=function(){const l=new L,e=new L,t=new L;return function(i,s,n){const r=i.start,o=l,a=s.start,h=e;t.subVectors(r,a),l.subVectors(i.end,i.start),e.subVectors(s.end,s.start);const c=t.dot(h),u=h.dot(o),d=h.dot(h),f=t.dot(o),m=o.dot(o)*d-u*u;let p,I;m!==0?p=(c*u-f*d)/m:p=0,I=(c+p*u)/d,n.x=p,n.y=I}}(),vo=function(){const l=new ve,e=new L,t=new L;return function(i,s,n,r){Ed(i,s,l);let o=l.x,a=l.y;if(o>=0&&o<=1&&a>=0&&a<=1){i.at(o,n),s.at(a,r);return}else if(o>=0&&o<=1){a<0?s.at(0,r):s.at(1,r),i.closestPointToPoint(r,!0,n);return}else if(a>=0&&a<=1){o<0?i.at(0,n):i.at(1,n),s.closestPointToPoint(n,!0,r);return}else{let h;o<0?h=i.start:h=i.end;let c;a<0?c=s.start:c=s.end;const u=e,d=t;if(i.closestPointToPoint(c,!0,e),s.closestPointToPoint(h,!0,t),u.distanceToSquared(c)<=d.distanceToSquared(h)){n.copy(u),r.copy(c);return}else{n.copy(h),r.copy(d);return}}}}(),gd=function(){const l=new L,e=new L,t=new Xt,i=new Je;return function(s,n){const{radius:r,center:o}=s,{a,b:h,c}=n;if(i.start=a,i.end=h,i.closestPointToPoint(o,!0,l).distanceTo(o)<=r||(i.start=a,i.end=c,i.closestPointToPoint(o,!0,l).distanceTo(o)<=r)||(i.start=h,i.end=c,i.closestPointToPoint(o,!0,l).distanceTo(o)<=r))return!0;const u=n.getPlane(t);if(Math.abs(u.distanceToPoint(o))<=r){const d=u.projectPoint(o,e);if(n.containsPoint(d))return!0}return!1}}(),Cd=1e-15;function rr(l){return Math.abs(l)new L),this.satBounds=new Array(4).fill().map(()=>new Ht),this.points=[this.a,this.b,this.c],this.sphere=new Ri,this.plane=new Xt,this.needsUpdate=!0}intersectsSphere(e){return gd(e,this)}update(){const e=this.a,t=this.b,i=this.c,s=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,s);const h=n[1],c=r[1];h.subVectors(e,t),c.setFromPoints(h,s);const u=n[2],d=r[2];u.subVectors(t,i),d.setFromPoints(u,s);const f=n[3],m=r[3];f.subVectors(i,e),m.setFromPoints(f,s),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,e),this.needsUpdate=!1}}gt.prototype.closestPointToSegment=function(){const l=new L,e=new L,t=new Je;return function(i,s=null,n=null){const{start:r,end:o}=i,a=this.points;let h,c=1/0;for(let u=0;u<3;u++){const d=(u+1)%3;t.start.copy(a[u]),t.end.copy(a[d]),vo(t,i,l,e),h=l.distanceToSquared(e),h=2){(g===1?E.start:E.end).copy(f),v=2;break}if(v++,v===2&&g===-1)break}}return v}return function(p,I=null,E=!1){this.needsUpdate&&this.update(),p.isExtendedTriangle?p.needsUpdate&&p.update():(l.copy(p),l.update(),p=l);const C=this.plane,v=p.plane;if(Math.abs(C.normal.dot(v.normal))>1-1e-10){const g=this.satBounds,S=this.satAxes;t[0]=p.a,t[1]=p.b,t[2]=p.c;for(let b=0;b<4;b++){const N=g[b],M=S[b];if(i.setFromPoints(M,t),N.isSeparated(i))return!1}const O=p.satBounds,A=p.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let b=0;b<4;b++){const N=O[b],M=A[b];if(i.setFromPoints(M,e),N.isSeparated(i))return!1}for(let b=0;b<4;b++){const N=S[b];for(let M=0;M<4;M++){const _=A[M];if(n.crossVectors(N,_),i.setFromPoints(n,e),s.setFromPoints(n,t),i.isSeparated(s))return!1}}return I&&(E||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),I.start.set(0,0,0),I.end.set(0,0,0)),!0}else{const g=m(this,v,u);if(g===1&&p.containsPoint(u.end))return I&&(I.start.copy(u.end),I.end.copy(u.end)),!0;if(g!==2)return!1;const S=m(p,C,d);if(S===1&&this.containsPoint(d.end))return I&&(I.start.copy(d.end),I.end.copy(d.end)),!0;if(S!==2)return!1;if(u.delta(o),d.delta(a),o.dot(a)<0){let F=d.start;d.start=d.end,d.end=F}const O=u.start.dot(o),A=u.end.dot(o),b=d.start.dot(o),N=d.end.dot(o),M=A0?I.start.copy(u.start):I.start.copy(d.start),h.subVectors(u.end,d.end),h.dot(o)<0?I.end.copy(u.end):I.end.copy(d.end)),!0)}}}();gt.prototype.distanceToPoint=function(){const l=new L;return function(e){return this.closestPointToPoint(e,l),e.distanceTo(l)}}();gt.prototype.distanceToTriangle=function(){const l=new L,e=new L,t=["a","b","c"],i=new Je,s=new Je;return function(n,r=null,o=null){const a=r||o?i:null;if(this.intersectsTriangle(n,a))return(r||o)&&(r&&a.getCenter(r),o&&a.getCenter(o)),0;let h=1/0;for(let c=0;c<3;c++){let u;const d=t[c],f=n[d];this.closestPointToPoint(f,l),u=f.distanceToSquared(l),unew L),this.satAxes=new Array(3).fill().map(()=>new L),this.satBounds=new Array(3).fill().map(()=>new Ht),this.alignedSatBounds=new Array(3).fill().map(()=>new Ht),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),i&&this.matrix.copy(i)}set(e,t,i){this.min.copy(e),this.max.copy(t),this.matrix.copy(i),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Qe.prototype.update=function(){return function(){const l=this.matrix,e=this.min,t=this.max,i=this.points;for(let a=0;a<=1;a++)for(let h=0;h<=1;h++)for(let c=0;c<=1;c++){const u=1*a|2*h|4*c,d=i[u];d.x=a?t.x:e.x,d.y=h?t.y:e.y,d.z=c?t.z:e.z,d.applyMatrix4(l)}const s=this.satBounds,n=this.satAxes,r=i[0];for(let a=0;a<3;a++){const h=n[a],c=s[a],u=1<new Je),t=new Array(12).fill().map(()=>new Je),i=new L,s=new L;return function(n,r=0,o=null,a=null){if(this.needsUpdate&&this.update(),this.intersectsBox(n))return(o||a)&&(n.getCenter(s),this.closestPointToPoint(s,i),n.closestPointToPoint(i,s),o&&o.copy(i),a&&a.copy(s)),0;const h=r*r,c=n.min,u=n.max,d=this.points;let f=1/0;for(let p=0;p<8;p++){const I=d[p];s.copy(I).clamp(c,u);const E=I.distanceToSquared(s);if(Enew gt)}}const ht=new Td;function tt(l,e){return e[l+15]===65535}function it(l,e){return e[l+6]}function ct(l,e){return e[l+14]}function dt(l){return l+8}function ut(l,e){return e[l+6]}function ll(l,e){return e[l+7]}class Rd{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let t=null;this.setBuffer=i=>{t&&e.push(t),t=i,this.float32Array=new Float32Array(i),this.uint16Array=new Uint16Array(i),this.uint32Array=new Uint32Array(i)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const Fe=new Rd;let $t,Yi;const wi=[],Hs=new yo(()=>new we);function vd(l,e,t,i,s,n){$t=Hs.getPrimitive(),Yi=Hs.getPrimitive(),wi.push($t,Yi),Fe.setBuffer(l._roots[e]);const r=Ar(0,l.geometry,t,i,s,n);Fe.clearBuffer(),Hs.releasePrimitive($t),Hs.releasePrimitive(Yi),wi.pop(),wi.pop();const o=wi.length;return o>0&&(Yi=wi[o-1],$t=wi[o-2]),r}function Ar(l,e,t,i,s=null,n=0,r=0){const{float32Array:o,uint16Array:a,uint32Array:h}=Fe;let c=l*2;if(tt(c,a)){const u=it(l,h),d=ct(c,a);return Ne(l,o,$t),i(u,d,!1,r,n+l,$t)}else{let u=function(_){const{uint16Array:F,uint32Array:D}=Fe;let R=_*2;for(;!tt(R,F);)_=dt(_),R=_*2;return it(_,D)},d=function(_){const{uint16Array:F,uint32Array:D}=Fe;let R=_*2;for(;!tt(R,F);)_=ut(_,D),R=_*2;return it(_,D)+ct(R,F)};const f=dt(l),m=ut(l,h);let p=f,I=m,E,C,v,g;if(s&&(v=$t,g=Yi,Ne(p,o,v),Ne(I,o,g),E=s(v),C=s(g),C(as.copy(e).clamp(c.min,c.max),as.distanceToSquared(e)),intersectsBounds:(c,u,d)=>d{c.closestPointToPoint(e,as);const d=e.distanceToSquared(as);return d0&&h.normal.multiplyScalar(-1));const c={a:n,b:r,c:o,normal:new L,materialIndex:0};ui.getNormal(Fi,Ai,Oi,c.normal),h.face=c,h.faceIndex=n}return h}function Xn(l,e,t,i,s){const n=i*3;let r=n+0,o=n+1,a=n+2;const h=l.index;l.index&&(r=h.getX(r),o=h.getX(o),a=h.getX(a));const{position:c,normal:u,uv:d,uv1:f}=l.attributes,m=wd(t,c,u,d,f,r,o,a,e);return m?(m.faceIndex=i,s&&s.push(m),m):null}function _e(l,e,t,i){const s=l.a,n=l.b,r=l.c;let o=e,a=e+1,h=e+2;t&&(o=t.getX(o),a=t.getX(a),h=t.getX(h)),s.x=i.getX(o),s.y=i.getY(o),s.z=i.getZ(o),n.x=i.getX(a),n.y=i.getY(a),n.z=i.getZ(a),r.x=i.getX(h),r.y=i.getY(h),r.z=i.getZ(h)}function Fd(l,e,t,i,s,n){const{geometry:r,_indirectBuffer:o}=l;for(let a=i,h=i+s;aS&&(S=_),FO&&(O=F),DA&&(A=D)}return a[d+0]!==C||a[d+1]!==v||a[d+2]!==g||a[d+3]!==S||a[d+4]!==O||a[d+5]!==A?(a[d+0]=C,a[d+1]=v,a[d+2]=g,a[d+3]=S,a[d+4]=O,a[d+5]=A,!0):!1}else{const I=d+8,E=r[d+6],C=I+f,v=E+f;let g=m,S=!1,O=!1;e?g||(S=e.has(C),O=e.has(v),g=!S&&!O):(S=!0,O=!0);const A=g||S,b=g||O;let N=!1;A&&(N=u(I,f,g));let M=!1;b&&(M=u(E,f,g));const _=N||M;if(_)for(let F=0;F<3;F++){const D=I+F,R=E+F,B=a[D],k=a[D+3],U=a[R],K=a[R+3];a[d+F]=BK?k:K}return _}}}const qo=new we;function ti(l,e,t,i){return Ne(l,e,qo),t.intersectBox(qo,i)}function Pd(l,e,t,i,s,n){const{geometry:r,_indirectBuffer:o}=l;for(let a=i,h=i+s;a=0;let u,d;c?(u=dt(l),d=ut(l,r)):(u=ut(l,r),d=dt(l));const f=ti(u,s,i,$o)?Nr(u,e,t,i):null;if(f){const p=f.point[h];if(c?p<=s[d+a]:p>=s[d+a+3])return f}const m=ti(d,s,i,$o)?Nr(d,e,t,i):null;return f&&m?f.distance<=m.distance?f:m:f||m||null}}const Ks=new we,Ni=new gt,Pi=new gt,ls=new ne,ea=new Qe,Qs=new Qe;function _d(l,e,t,i){Fe.setBuffer(l._roots[e]);const s=Pr(0,l,t,i);return Fe.clearBuffer(),s}function Pr(l,e,t,i,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe;let a=l*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),ea.set(t.boundingBox.min,t.boundingBox.max,i),s=ea),tt(a,r)){const h=e.geometry,c=h.index,u=h.attributes.position,d=t.index,f=t.attributes.position,m=it(l,o),p=ct(a,r);if(ls.copy(i).invert(),t.boundsTree)return Ne(l,n,Qs),Qs.matrix.copy(ls),Qs.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:I=>Qs.intersectsBox(I),intersectsTriangle:I=>{I.a.applyMatrix4(i),I.b.applyMatrix4(i),I.c.applyMatrix4(i),I.needsUpdate=!0;for(let E=m*3,C=(p+m)*3;Ear.distanceToBox(S),intersectsBounds:(S,O,A)=>A{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:A=>hs.distanceToBox(A),intersectsBounds:(A,b,N)=>N{for(let N=A,M=A+b;NS&&(S=D),RO&&(O=R),BA&&(A=B)}}return a[d+0]!==C||a[d+1]!==v||a[d+2]!==g||a[d+3]!==S||a[d+4]!==O||a[d+5]!==A?(a[d+0]=C,a[d+1]=v,a[d+2]=g,a[d+3]=S,a[d+4]=O,a[d+5]=A,!0):!1}else{const I=d+8,E=r[d+6],C=I+f,v=E+f;let g=m,S=!1,O=!1;e?g||(S=e.has(C),O=e.has(v),g=!S&&!O):(S=!0,O=!0);const A=g||S,b=g||O;let N=!1;A&&(N=u(I,f,g));let M=!1;b&&(M=u(E,f,g));const _=N||M;if(_)for(let F=0;F<3;F++){const D=I+F,R=E+F,B=a[D],k=a[D+3],U=a[R],K=a[R+3];a[d+F]=BK?k:K}return _}}}const ta=new L;function Gd(l,e,t,i,s){Fe.setBuffer(l._roots[e]),br(0,l,t,i,s),Fe.clearBuffer()}function br(l,e,t,i,s){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe,a=l*2;if(tt(a,r)){const h=it(l,o),c=ct(a,r);Pd(e,t,i,h,c,s)}else{const h=dt(l);ti(h,n,i,ta)&&br(h,e,t,i,s);const c=ut(l,o);ti(c,n,i,ta)&&br(c,e,t,i,s)}}const ia=new L,Hd=["x","y","z"];function Wd(l,e,t,i){Fe.setBuffer(l._roots[e]);const s=Lr(0,l,t,i);return Fe.clearBuffer(),s}function Lr(l,e,t,i){const{float32Array:s,uint16Array:n,uint32Array:r}=Fe;let o=l*2;if(tt(o,n)){const a=it(l,r),h=ct(o,n);return bd(e,t,i,a,h)}else{const a=ll(l,r),h=Hd[a],c=i.direction[h]>=0;let u,d;c?(u=dt(l),d=ut(l,r)):(u=ut(l,r),d=dt(l));const f=ti(u,s,i,ia)?Lr(u,e,t,i):null;if(f){const p=f.point[h];if(c?p<=s[d+a]:p>=s[d+a+3])return f}const m=ti(d,s,i,ia)?Lr(d,e,t,i):null;return f&&m?f.distance<=m.distance?f:m:f||m||null}}const Js=new we,bi=new gt,Li=new gt,cs=new ne,sa=new Qe,$s=new Qe;function Xd(l,e,t,i){Fe.setBuffer(l._roots[e]);const s=xr(0,l,t,i);return Fe.clearBuffer(),s}function xr(l,e,t,i,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe;let a=l*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),sa.set(t.boundingBox.min,t.boundingBox.max,i),s=sa),tt(a,r)){const h=e.geometry,c=h.index,u=h.attributes.position,d=t.index,f=t.attributes.position,m=it(l,o),p=ct(a,r);if(cs.copy(i).invert(),t.boundsTree)return Ne(l,n,$s),$s.matrix.copy(cs),$s.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:I=>$s.intersectsBox(I),intersectsTriangle:I=>{I.a.applyMatrix4(i),I.b.applyMatrix4(i),I.c.applyMatrix4(i),I.needsUpdate=!0;for(let E=m,C=p+m;Elr.distanceToBox(S),intersectsBounds:(S,O,A)=>A{if(e.boundsTree){const A=e.boundsTree;return A.shapecast({boundsTraverseOrder:b=>ds.distanceToBox(b),intersectsBounds:(b,N,M)=>M{for(let M=b,_=b+N;M<_;M++){const F=A.resolveTriangleIndex(M);_e(f,3*F,u,c),f.a.applyMatrix4(t),f.b.applyMatrix4(t),f.c.applyMatrix4(t),f.needsUpdate=!0;for(let D=S,R=S+O;Dnew we),xi=new we,Mi=new we,hr=new we,cr=new we;let dr=!1;function $d(l,e,t,i){if(dr)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");dr=!0;const s=l._roots,n=e._roots;let r,o=0,a=0;const h=new ne().copy(t).invert();for(let c=0,u=s.length;ca.slice()),index:r.array.slice(),indirectBuffer:n?n.slice():null}:o={roots:s,index:r.array,indirectBuffer:n},o}static deserialize(e,t,i={}){i={setIndex:!0,indirect:!!e.indirectBuffer,...i};const{index:s,roots:n,indirectBuffer:r}=e,o=new So(t,{...i,[sr]:!0});if(o._roots=n,o._indirectBuffer=r||null,i.setIndex){const a=t.getIndex();if(a===null){const h=new et(e.index,1,!1);t.setIndex(h)}else a.array!==s&&(a.array.set(s),a.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(e,t={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({strategy:rl,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[sr]:!1},t),t.useSharedArrayBuffer&&!Jd())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,t[sr]||(Id(this,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new we)));const{_indirectBuffer:i}=this;this.resolveTriangleIndex=t.indirect?s=>i[s]:s=>s}refit(e=null){return(this.indirect?Yd:Nd)(this,e)}traverse(e,t=0){const i=this._roots[t],s=new Uint32Array(i),n=new Uint16Array(i);r(0);function r(o,a=0){const h=o*2,c=n[h+15]===Wn;if(c){const u=s[o+6],d=n[h+14];e(a,c,new Float32Array(i,o*4,6),u,d)}else{const u=o+wn/4,d=s[o+6],f=s[o+7];e(a,c,new Float32Array(i,o*4,6),f)||(r(u,a+1),r(d,a+1))}}}raycast(e,t=Yo){const i=this._roots,s=this.geometry,n=[],r=t.isMaterial,o=Array.isArray(t),a=s.groups,h=r?t.side:t,c=this.indirect?Gd:xd;for(let u=0,d=i.length;uu(d,f,m,p,I)?!0:i(d,f,this,o,m,p,t)}else r||(o?r=(u,d,f,m)=>i(u,d,this,o,f,m,t):r=(u,d,f)=>f);let a=!1,h=0;const c=this._roots;for(let u=0,d=c.length;u{const p=this.resolveTriangleIndex(m);_e(r,p*3,o,a)}:m=>{_e(r,m*3,o,a)},c=ht.getPrimitive(),u=e.geometry.index,d=e.geometry.attributes.position,f=e.indirect?m=>{const p=e.resolveTriangleIndex(m);_e(c,p*3,u,d)}:m=>{_e(c,m*3,u,d)};if(n){const m=(p,I,E,C,v,g,S,O)=>{for(let A=E,b=E+C;Atn.intersectsBox(i),intersectsTriangle:i=>tn.intersectsTriangle(i)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,i={},s={},n=0,r=1/0){return(this.indirect?qd:Vd)(this,e,t,i,s,n,r)}closestPointToPoint(e,t={},i=0,s=1/0){return yd(this,e,t,i,s)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(t=>{Ne(0,new Float32Array(t),na),e.union(na)}),e}}function ra(l,e,t){return l===null||(l.point.applyMatrix4(e.matrixWorld),l.distance=l.point.distanceTo(t.ray.origin),l.object=e,l.distancet.far)?null:l}const ur=new kc,oa=new ne,eu=ee.prototype.raycast;function tu(l,e){if(this.geometry.boundsTree){if(this.material===void 0)return;oa.copy(this.matrixWorld).invert(),ur.copy(l.ray).applyMatrix4(oa);const t=this.geometry.boundsTree;if(l.firstHitOnly===!0){const i=ra(t.raycastFirst(ur,this.material),this,l);i&&e.push(i)}else{const i=t.raycast(ur,this.material);for(let s=0,n=i.length;s{if(!this.enabled)return;const e=this.handlers.slice(0);for(const t of e)t(l)}),T(this,"handlers",[])}add(l){this.handlers.push(l)}remove(l){this.handlers=this.handlers.filter(e=>e!==l)}reset(){this.handlers.length=0}};class Bt{constructor(){T(this,"enabled",!0),T(this,"trigger",async e=>{if(!this.enabled)return;const t=this.handlers.slice(0);for(const i of t)await i(e)}),T(this,"handlers",[])}add(e){this.handlers.push(e)}remove(e){this.handlers=this.handlers.filter(t=>t!==e)}reset(){this.handlers.length=0}}class wo{constructor(e){T(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this),T(this,"isResizeable",()=>"resize"in this&&"getSize"in this),T(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this),T(this,"isHideable",()=>"visible"in this),T(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this),this.components=e}}class de extends wo{}class hl extends wo{constructor(e){super(e),T(this,"worlds",new Map),T(this,"onWorldChanged",new H),T(this,"currentWorld",null),this.onWorldChanged.add(({world:t,action:i})=>{i==="removed"&&this.worlds.delete(t.uuid)})}}class nu extends hl{constructor(){super(...arguments),T(this,"hasCameraControls",()=>"controls"in this)}}class ru extends hl{constructor(){super(...arguments),T(this,"onAfterUpdate",new H),T(this,"onBeforeUpdate",new H),T(this,"onDisposed",new H),T(this,"onResize",new H),T(this,"onClippingPlanesUpdated",new H),T(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(e,t,i){t.isLocal=i;const s=this.clippingPlanes.indexOf(t);e&&s===-1?this.clippingPlanes.push(t):!e&&s>-1&&this.clippingPlanes.splice(s,1),this.three.clippingPlanes=this.clippingPlanes.filter(n=>!n.isLocal)}}const cl=class Mr extends de{constructor(e){super(e),T(this,"_disposedComponents",new Set),T(this,"enabled",!0),e.add(Mr.uuid,this)}get(){return this._disposedComponents}destroy(e,t=!0,i=!0){e.removeFromParent();const s=e;s.dispose&&s.dispose(),this.disposeGeometryAndMaterials(e,t),i&&s.children&&s.children.length&&this.disposeChildren(s),e.children.length=0}disposeGeometry(e){e.boundsTree&&e.disposeBoundsTree&&e.disposeBoundsTree(),e.dispose()}disposeGeometryAndMaterials(e,t){const i=e;i.geometry&&this.disposeGeometry(i.geometry),t&&i.material&&Mr.disposeMaterial(i),i.material=[],i.geometry=null}disposeChildren(e){for(const t of e.children)this.destroy(t)}static disposeMaterial(e){if(e.material)if(Array.isArray(e.material))for(const t of e.material)t.dispose();else e.material.dispose()}};T(cl,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let Pt=cl;class ei extends Set{constructor(e){super(e),T(this,"onItemAdded",new H),T(this,"onItemDeleted",new H),T(this,"onCleared",new H),T(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}add(...e){for(const t of e)this.has(t)||!this.guard(t)||(super.add(t),this.onItemAdded||(this.onItemAdded=new H),this.onItemAdded.trigger(t));return this}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(),t}dispose(){this.clear(),this.onItemAdded.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class Ct extends Map{constructor(e){super(e),T(this,"onItemSet",new H),T(this,"onItemUpdated",new H),T(this,"onItemDeleted",new H),T(this,"onCleared",new H),T(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}set(e,t){const i=this.has(e);if(!(this.guard??(()=>!0))(e,t))return this;const s=super.set(e,t);return i?(this.onItemUpdated||(this.onItemUpdated=new H),this.onItemUpdated.trigger({key:e,value:t})):(this.onItemSet||(this.onItemSet=new H),this.onItemSet.trigger({key:e,value:t})),s}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(e),t}dispose(){this.clear(),this.onItemSet.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class fr{static isEntry(e){return new Set(["Boolean","Color","Text","Number","Select","Vector3","TextSet","None"]).has(e.type)}static copySchema(e,t={}){for(const i in e){const s=e[i];this.isEntry(s)?t[i]=this.copyEntry(s):(t[i]={},this.copySchema(s,t[i]))}return t}static copyEntry(e){if(e.type==="Boolean"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Color"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="Text"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Number"){const t=e;return{type:t.type,value:t.value,min:t.min,max:t.max,interpolable:t.interpolable}}if(e.type==="Select"){const t=e;return{type:t.type,value:t.value,multiple:t.multiple,options:new Set(t.options)}}if(e.type==="Vector3"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="TextSet"){const t=e;return{type:t.type,value:new Set(t.value)}}if(e.type==="None"){const t=e;return{type:t.type,value:t.value}}throw new Error("Invalid entry!")}}class ou{constructor(){T(this,"list",new Set)}add(e){for(const t of e)this.list.add(t)}remove(e){for(const t of e)this.list.delete(t)}set(e){for(const t of this.list)t.enabled=e}reset(){for(const e of this.list)e.reset()}}const Fn=0,au=1,lu=new L,aa=new Je,pr=new Xt,la=new L,sn=new ui;class hu{constructor(){this.tolerance=-1,this.faces=[],this.newFaces=[],this.assigned=new ha,this.unassigned=new ha,this.vertices=[]}setFromPoints(e){if(e.length>=4){this.makeEmpty();for(let t=0,i=e.length;tthis.tolerance)return!1;return!0}intersectRay(e,t){const i=this.faces;let s=-1/0,n=1/0;for(let r=0,o=i.length;r0&&c>=0)return null;const u=c!==0?-h/c:0;if(!(u<=0)&&(c>0?n=Math.min(u,n):s=Math.max(u,s),s>n))return null}return s!==-1/0?e.at(s,t):e.at(n,t),t}intersectsRay(e){return this.intersectRay(e,lu)!==null}makeEmpty(){return this.faces=[],this.vertices=[],this}addVertexToFace(e,t){return e.face=t,t.outside===null?this.assigned.append(e):this.assigned.insertBefore(t.outside,e),t.outside=e,this}removeVertexFromFace(e,t){return e===t.outside&&(e.next!==null&&e.next.face===t?t.outside=e.next:t.outside=null),this.assigned.remove(e),this}removeAllVerticesFromFace(e){if(e.outside!==null){const t=e.outside;let i=e.outside;for(;i.next!==null&&i.next.face===e;)i=i.next;return this.assigned.removeSubList(t,i),t.prev=i.next=null,e.outside=null,t}}deleteFaceVertices(e,t){const i=this.removeAllVerticesFromFace(e);if(i!==void 0)if(t===void 0)this.unassigned.appendChain(i);else{let s=i;do{const n=s.next;t.distanceToPoint(s.point)>this.tolerance?this.addVertexToFace(s,t):this.unassigned.append(s),s=n}while(s!==null)}return this}resolveUnassignedPoints(e){if(this.unassigned.isEmpty()===!1){let t=this.unassigned.first();do{const i=t.next;let s=this.tolerance,n=null;for(let r=0;rs&&(s=a,n=o),s>1e3*this.tolerance)break}}n!==null&&this.addVertexToFace(t,n),t=i}while(t!==null)}return this}computeExtremes(){const e=new L,t=new L,i=[],s=[];for(let n=0;n<3;n++)i[n]=s[n]=this.vertices[0];e.copy(this.vertices[0].point),t.copy(this.vertices[0].point);for(let n=0,r=this.vertices.length;nt.getComponent(h)&&(t.setComponent(h,a.getComponent(h)),s[h]=o)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(e.x),Math.abs(t.x))+Math.max(Math.abs(e.y),Math.abs(t.y))+Math.max(Math.abs(e.z),Math.abs(t.z))),{min:i,max:s}}computeInitialHull(){const e=this.vertices,t=this.computeExtremes(),i=t.min,s=t.max;let n=0,r=0;for(let d=0;d<3;d++){const f=s[d].point.getComponent(d)-i[d].point.getComponent(d);f>n&&(n=f,r=d)}const o=i[r],a=s[r];let h,c;n=0,aa.set(o.point,a.point);for(let d=0,f=this.vertices.length;dn&&(n=p,h=m)}}n=-1,pr.setFromCoplanarPoints(o.point,a.point,h.point);for(let d=0,f=this.vertices.length;dn&&(n=p,c=m)}}const u=[];if(pr.distanceToPoint(c.point)<0){u.push(Et.create(o,a,h),Et.create(c,a,o),Et.create(c,h,a),Et.create(c,o,h));for(let d=0;d<3;d++){const f=(d+1)%3;u[d+1].getEdge(2).setTwin(u[0].getEdge(f)),u[d+1].getEdge(1).setTwin(u[f+1].getEdge(0))}}else{u.push(Et.create(o,h,a),Et.create(c,o,a),Et.create(c,a,h),Et.create(c,h,o));for(let d=0;d<3;d++){const f=(d+1)%3;u[d+1].getEdge(2).setTwin(u[0].getEdge((3-d)%3)),u[d+1].getEdge(0).setTwin(u[f+1].getEdge(1))}}for(let d=0;d<4;d++)this.faces.push(u[d]);for(let d=0,f=e.length;dn&&(n=E,p=this.faces[I])}p!==null&&this.addVertexToFace(m,p)}}return this}reindexFaces(){const e=[];for(let t=0;tt&&(t=n,e=s),s=s.next}while(s!==null&&s.face===i);return e}}computeHorizon(e,t,i,s){this.deleteFaceVertices(i),i.mark=au;let n;t===null?n=t=i.getEdge(0):n=t.next;do{const r=n.twin,o=r.face;o.mark===Fn&&(o.distanceToPoint(e)>this.tolerance?this.computeHorizon(e,r,o,s):s.push(n)),n=n.next}while(n!==t);return this}addAdjoiningFace(e,t){const i=Et.create(e,t.tail(),t.head());return this.faces.push(i),i.getEdge(-1).setTwin(t.twin),i.getEdge(0)}addNewFaces(e,t){this.newFaces=[];let i=null,s=null;for(let n=0;n0;)t=t.next,e--;for(;e<0;)t=t.prev,e++;return t}compute(){const e=this.edge.tail(),t=this.edge.head(),i=this.edge.next.head();return sn.set(e.point,t.point,i.point),sn.getNormal(this.normal),sn.getMidpoint(this.midpoint),this.area=sn.getArea(),this.constant=this.normal.dot(this.midpoint),this}distanceToPoint(e){return this.normal.dot(e)-this.constant}}class mr{constructor(e,t){this.vertex=e,this.prev=null,this.next=null,this.twin=null,this.face=t}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceTo(e.point):-1}lengthSquared(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceToSquared(e.point):-1}setTwin(e){return this.twin=e,e.twin=this,this}}class cu{constructor(e){this.point=e,this.prev=null,this.next=null,this.face=null}}class ha{constructor(){this.head=null,this.tail=null}first(){return this.head}last(){return this.tail}clear(){return this.head=this.tail=null,this}insertBefore(e,t){return t.prev=e.prev,t.next=e,t.prev===null?this.head=t:t.prev.next=t,e.prev=t,this}insertAfter(e,t){return t.prev=e,t.next=e.next,t.next===null?this.tail=t:t.next.prev=t,e.next=t,this}append(e){return this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e,this}appendChain(e){for(this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail;e.next!==null;)e=e.next;return this.tail=e,this}remove(e){return e.prev===null?this.head=e.next:e.prev.next=e.next,e.next===null?this.tail=e.prev:e.next.prev=e.prev,this}removeSubList(e,t){return e.prev===null?this.head=t.next:e.prev.next=t.next,t.next===null?this.tail=e.prev:t.next.prev=e.prev,this}isEmpty(){return this.head===null}}const Dr=[2,2,1],_r=[1,0,0];function At(l,e){return l*3+e}function du(l){const e=l.elements;let t=0;for(let i=0;i<9;i++)t+=e[i]*e[i];return Math.sqrt(t)}function uu(l){const e=l.elements;let t=0;for(let i=0;i<3;i++){const s=e[At(Dr[i],_r[i])];t+=2*s*s}return Math.sqrt(t)}function fu(l,e){let t=0,i=1;const s=l.elements;for(let h=0;h<3;h++){const c=Math.abs(s[At(Dr[h],_r[h])]);c>t&&(t=c,i=h)}let n=1,r=0;const o=_r[i],a=Dr[i];if(Math.abs(s[At(a,o)])>Number.EPSILON){const h=s[At(a,a)],c=s[At(o,o)],u=s[At(a,o)],d=(h-c)/2/u;let f;d<0?f=-1/(-d+Math.sqrt(1+d*d)):f=1/(d+Math.sqrt(1+d*d)),n=1/Math.sqrt(1+f*f),r=f*n}return e.identity(),e.elements[At(o,o)]=n,e.elements[At(a,a)]=n,e.elements[At(a,o)]=r,e.elements[At(o,a)]=-r,e}function pu(l,e){let t=0,i=0;const s=10;e.unitary.identity(),e.diagonal.copy(l);const n=e.unitary,r=e.diagonal,o=new fi,a=new fi,h=Number.EPSILON*du(r);for(;ih;)fu(r,o),a.copy(o).transpose(),r.multiply(o),r.premultiply(a),n.multiply(o),++t>2&&(i++,t=0);return e}function mu(l){const e=[];for(let ae=0;ae>8&255]+Be._lut[e>>16&255]+Be._lut[e>>24&255]}-${Be._lut[t&255]}${Be._lut[t>>8&255]}-${Be._lut[t>>16&15|64]}${Be._lut[t>>24&255]}-${Be._lut[i&63|128]}${Be._lut[i>>8&255]}-${Be._lut[i>>16&255]}${Be._lut[i>>24&255]}${Be._lut[s&255]}${Be._lut[s>>8&255]}${Be._lut[s>>16&255]}${Be._lut[s>>24&255]}`.toLowerCase()}static validate(e){if(!Be._pattern.test(e))throw new Error(`${e} is not a valid UUID v4. +import{t as tt,U as Hr,u as fn,v as ti,e as Ce,d as Je,S as gi,V as x,h as Se,w as ii,T as hi,x as ye,a as ee,y as bn,c as ne,P as xa,z as Zi,E as Ci,H as Yi,J as Ma,W as Sn,b as st,K as Xe,O as Gi,N as xn,C as _e,Q as As,s as It,X as di,Y as Hi,Z as wn,_ as La,$ as zt,a0 as Ti,a1 as vn,a2 as yt,i as Vi,a3 as Os,a4 as Qt,a5 as kc,a6 as Mn,a7 as Wr,a8 as Xr,a9 as Zr,aa as jr,ab as Qr,ac as Ln,ad as Kr,ae as qr,af as Jr,ag as $r,ah as eo,ai as to,aj as io,ak as Da,B as Be,al as _a,am as Vc,an as Yc,ao as Wi,ap as Ua,aq as Ii,ar as Gc,as as Hc,at as Ot,au as Wc,av as Xc,f as Zc,aw as Ba,G as yn,ax as He,ay as za,az as Le,L as si,aA as jc,aB as Dn,aC as Qc,aD as at,aE as Kc,aF as _t,aG as Ms,aH as qc,aI as es,j as pn,aJ as Jc,aK as $c,aL as eh,aM as th,aN as ih,aO as sh,I as so,aP as no,aQ as ro,k as bt,aR as Ri,aS as nh,aT as rh,aU as wo,aV as vo,aW as mn,aX as oo,aY as oh,aZ as ts,a_ as Dt,a$ as ah,b0 as lh,b1 as ch,b2 as hh,b3 as dh,b4 as yo,b5 as uh,b6 as fh,b7 as ph,b8 as ka,b9 as mh,ba as Ih,bb as Fo,bc as Eh,r as gh,bd as Ch,be as Th,bf as Rh,bg as Sh,bh as wh,bi as mr,bj as Bi,bk as vh,bl as yh}from"./web-ifc-api-CKmHUvxw.js";var Fh=Object.defineProperty,Ah=(c,e,t)=>e in c?Fh(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t,y=(c,e,t)=>(Ah(c,typeof e!="symbol"?e+"":e,t),t),Oh=Object.defineProperty,Nh=(c,e,t)=>e in c?Oh(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t,T=(c,e,t)=>(Nh(c,typeof e!="symbol"?e+"":e,t),t);const Va=0,Ph=1,bh=2,Ao=2,Wn=1.25,Oo=1,In=6*4+4+4,_n=65535,xh=Math.pow(2,-24),Xn=Symbol("SKIP_GENERATION");function Mh(c){return c.index?c.index.count:c.attributes.position.count}function ji(c){return Mh(c)/3}function Lh(c,e=ArrayBuffer){return c>65535?new Uint32Array(new e(4*c)):new Uint16Array(new e(2*c))}function Dh(c,e){if(!c.index){const t=c.attributes.position.count,i=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,s=Lh(t,i);c.setIndex(new Je(s,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),i=t[t.length-1];i.count=Math.min(e-i.offset,i.count);let s=0;return t.forEach(({count:n})=>s+=n),e!==s}function Ne(c,e,t){return t.min.x=e[c],t.min.y=e[c+1],t.min.z=e[c+2],t.max.x=e[c+3],t.max.y=e[c+4],t.max.z=e[c+5],t}function Uh(c){c[0]=c[1]=c[2]=1/0,c[3]=c[4]=c[5]=-1/0}function No(c){let e=-1,t=-1/0;for(let i=0;i<3;i++){const s=c[i+3]-c[i];s>t&&(t=s,e=i)}return e}function Po(c,e){e.set(c)}function bo(c,e,t){let i,s;for(let n=0;n<3;n++){const r=n+3;i=c[n],s=e[n],t[n]=is?i:s}}function Ls(c,e,t){for(let i=0;i<3;i++){const s=e[c+2*i],n=e[c+2*i+1],r=s-n,o=s+n;rt[i+3]&&(t[i+3]=o)}}function is(c){const e=c[3]-c[0],t=c[4]-c[1],i=c[5]-c[2];return 2*(e*t+t*i+i*e)}function Zn(c,e,t,i,s=null){let n=1/0,r=1/0,o=1/0,a=-1/0,l=-1/0,h=-1/0,d=1/0,u=1/0,f=1/0,m=-1/0,p=-1/0,E=-1/0;const I=s!==null;for(let g=e*6,w=(e+t)*6;ga&&(a=A),I&&Cm&&(m=C);const b=c[g+2],N=c[g+3],D=b-N,_=b+N;Dl&&(l=_),I&&bp&&(p=b);const F=c[g+4],L=c[g+5],R=F-L,U=F+L;Rh&&(h=U),I&&FE&&(E=F)}i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=l,i[5]=h,I&&(s[0]=d,s[1]=u,s[2]=f,s[3]=m,s[4]=p,s[5]=E)}function Bh(c,e,t,i){let s=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,l=-1/0;for(let h=e*6,d=(e+t)*6;ho&&(o=u);const f=c[h+2];fa&&(a=f);const m=c[h+4];ml&&(l=m)}i[0]=s,i[1]=n,i[2]=r,i[3]=o,i[4]=a,i[5]=l}function zh(c,e){Uh(e);const t=c.attributes.position,i=c.index?c.index.array:null,s=ji(c),n=new Float32Array(s*6),r=t.normalized,o=t.array,a=t.offset||0;let l=3;t.isInterleavedBufferAttribute&&(l=t.data.stride);const h=["getX","getY","getZ"];for(let d=0;dO&&(O=w),C>O&&(O=C);const A=(O-v)/2,b=I*2;n[f+b+0]=v+A,n[f+b+1]=A+(Math.abs(v)+A)*xh,ve[I+3]&&(e[I+3]=O)}}return n}const xt=32,kh=(c,e)=>c.candidate-e.candidate,Wt=new Array(xt).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Ds=new Float32Array(6);function Vh(c,e,t,i,s,n){let r=-1,o=0;if(n===Va)r=No(e),r!==-1&&(o=(e[r]+e[r+3])/2);else if(n===Ph)r=No(c),r!==-1&&(o=Yh(t,i,s,r));else if(n===bh){const a=is(c);let l=Wn*s;const h=i*6,d=(i+s)*6;for(let u=0;u<3;u++){const f=e[u],m=(e[u+3]-f)/xt;if(s=v.candidate?Ls(g,t,v.rightCacheBounds):(Ls(g,t,v.leftCacheBounds),v.count++)}}for(let g=0;g=xt&&(g=xt-1);const w=Wt[g];w.count++,Ls(I,t,w.bounds)}const p=Wt[xt-1];Po(p.bounds,p.rightCacheBounds);for(let I=xt-2;I>=0;I--){const g=Wt[I],w=Wt[I+1];bo(g.bounds,w.rightCacheBounds,g.rightCacheBounds)}let E=0;for(let I=0;I=a;)o--;if(r=a;)o--;if(r2**16,s=i?4:2,n=e?new SharedArrayBuffer(t*s):new ArrayBuffer(t*s),r=i?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=s&&(d=!0,n&&(console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),O<=r||b>=s)return g(v+O),C.offset=v,C.count=O,C;const N=Vh(C.boundingData,A,m,v,O,o);if(N.axis===-1)return g(v+O),C.offset=v,C.count=O,C;const D=p(h,i,m,v,O,N);if(D===v||D===v+O)g(v+O),C.offset=v,C.count=O;else{C.splitAxis=N.axis;const _=new _s,F=v,L=D-v;C.left=_,_.boundingData=new Float32Array(6),Zn(m,F,L,_.boundingData,f),w(_,F,L,f,b+1);const R=new _s,U=D,W=O-L;C.right=R,R.boundingData=new Float32Array(6),Zn(m,U,W,R.boundingData,f),w(R,U,W,f,b+1)}return C}}function Zh(c,e){const t=c.geometry;e.indirect&&(c._indirectBuffer=Wh(t,e.useSharedArrayBuffer),_h(t)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),c._indirectBuffer||Dh(t,e);const i=Xh(c,e);let s,n,r;const o=[],a=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let d=0;dMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[f+6]=C/4,C=h(C,g),n[f+7]=w,C}}}class Gt{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let i=1/0,s=-1/0;for(let n=0,r=e.length;ns?o:s}this.min=i,this.max=s}setFromPoints(e,t){let i=1/0,s=-1/0;for(let n=0,r=t.length;ns?a:s}this.min=i,this.max=s}isSeparated(e){return this.min>e.max||e.min>this.max}}Gt.prototype.setFromBox=function(){const c=new x;return function(e,t){const i=t.min,s=t.max;let n=1/0,r=-1/0;for(let o=0;o<=1;o++)for(let a=0;a<=1;a++)for(let l=0;l<=1;l++){c.x=i.x*o+s.x*(1-o),c.y=i.y*a+s.y*(1-a),c.z=i.z*l+s.z*(1-l);const h=e.dot(c);n=Math.min(h,n),r=Math.max(h,r)}this.min=n,this.max=r}}();const jh=function(){const c=new x,e=new x,t=new x;return function(i,s,n){const r=i.start,o=c,a=s.start,l=e;t.subVectors(r,a),c.subVectors(i.end,i.start),e.subVectors(s.end,s.start);const h=t.dot(l),d=l.dot(o),u=l.dot(l),f=t.dot(o),m=o.dot(o)*u-d*d;let p,E;m!==0?p=(h*d-f*u)/m:p=0,E=(h+p*d)/u,n.x=p,n.y=E}}(),ao=function(){const c=new Se,e=new x,t=new x;return function(i,s,n,r){jh(i,s,c);let o=c.x,a=c.y;if(o>=0&&o<=1&&a>=0&&a<=1){i.at(o,n),s.at(a,r);return}else if(o>=0&&o<=1){a<0?s.at(0,r):s.at(1,r),i.closestPointToPoint(r,!0,n);return}else if(a>=0&&a<=1){o<0?i.at(0,n):i.at(1,n),s.closestPointToPoint(n,!0,r);return}else{let l;o<0?l=i.start:l=i.end;let h;a<0?h=s.start:h=s.end;const d=e,u=t;if(i.closestPointToPoint(h,!0,e),s.closestPointToPoint(l,!0,t),d.distanceToSquared(h)<=u.distanceToSquared(l)){n.copy(d),r.copy(h);return}else{n.copy(l),r.copy(u);return}}}}(),Qh=function(){const c=new x,e=new x,t=new ii,i=new tt;return function(s,n){const{radius:r,center:o}=s,{a,b:l,c:h}=n;if(i.start=a,i.end=l,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r||(i.start=a,i.end=h,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r)||(i.start=l,i.end=h,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r))return!0;const d=n.getPlane(t);if(Math.abs(d.distanceToPoint(o))<=r){const u=d.projectPoint(o,e);if(n.containsPoint(u))return!0}return!1}}(),Kh=1e-15;function jn(c){return Math.abs(c)new x),this.satBounds=new Array(4).fill().map(()=>new Gt),this.points=[this.a,this.b,this.c],this.sphere=new gi,this.plane=new ii,this.needsUpdate=!0}intersectsSphere(e){return Qh(e,this)}update(){const e=this.a,t=this.b,i=this.c,s=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,s);const l=n[1],h=r[1];l.subVectors(e,t),h.setFromPoints(l,s);const d=n[2],u=r[2];d.subVectors(t,i),u.setFromPoints(d,s);const f=n[3],m=r[3];f.subVectors(i,e),m.setFromPoints(f,s),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,e),this.needsUpdate=!1}}Et.prototype.closestPointToSegment=function(){const c=new x,e=new x,t=new tt;return function(i,s=null,n=null){const{start:r,end:o}=i,a=this.points;let l,h=1/0;for(let d=0;d<3;d++){const u=(d+1)%3;t.start.copy(a[d]),t.end.copy(a[u]),ao(t,i,c,e),l=c.distanceToSquared(e),l=2){(C===1?I.start:I.end).copy(f),w=2;break}if(w++,w===2&&C===-1)break}}return w}return function(p,E=null,I=!1){this.needsUpdate&&this.update(),p.isExtendedTriangle?p.needsUpdate&&p.update():(c.copy(p),c.update(),p=c);const g=this.plane,w=p.plane;if(Math.abs(g.normal.dot(w.normal))>1-1e-10){const C=this.satBounds,v=this.satAxes;t[0]=p.a,t[1]=p.b,t[2]=p.c;for(let b=0;b<4;b++){const N=C[b],D=v[b];if(i.setFromPoints(D,t),N.isSeparated(i))return!1}const O=p.satBounds,A=p.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let b=0;b<4;b++){const N=O[b],D=A[b];if(i.setFromPoints(D,e),N.isSeparated(i))return!1}for(let b=0;b<4;b++){const N=v[b];for(let D=0;D<4;D++){const _=A[D];if(n.crossVectors(N,_),i.setFromPoints(n,e),s.setFromPoints(n,t),i.isSeparated(s))return!1}}return E&&(I||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),E.start.set(0,0,0),E.end.set(0,0,0)),!0}else{const C=m(this,w,d);if(C===1&&p.containsPoint(d.end))return E&&(E.start.copy(d.end),E.end.copy(d.end)),!0;if(C!==2)return!1;const v=m(p,g,u);if(v===1&&this.containsPoint(u.end))return E&&(E.start.copy(u.end),E.end.copy(u.end)),!0;if(v!==2)return!1;if(d.delta(o),u.delta(a),o.dot(a)<0){let F=u.start;u.start=u.end,u.end=F}const O=d.start.dot(o),A=d.end.dot(o),b=u.start.dot(o),N=u.end.dot(o),D=A0?E.start.copy(d.start):E.start.copy(u.start),l.subVectors(d.end,u.end),l.dot(o)<0?E.end.copy(d.end):E.end.copy(u.end)),!0)}}}();Et.prototype.distanceToPoint=function(){const c=new x;return function(e){return this.closestPointToPoint(e,c),e.distanceTo(c)}}();Et.prototype.distanceToTriangle=function(){const c=new x,e=new x,t=["a","b","c"],i=new tt,s=new tt;return function(n,r=null,o=null){const a=r||o?i:null;if(this.intersectsTriangle(n,a))return(r||o)&&(r&&a.getCenter(r),o&&a.getCenter(o)),0;let l=1/0;for(let h=0;h<3;h++){let d;const u=t[h],f=n[u];this.closestPointToPoint(f,c),d=f.distanceToSquared(c),dnew x),this.satAxes=new Array(3).fill().map(()=>new x),this.satBounds=new Array(3).fill().map(()=>new Gt),this.alignedSatBounds=new Array(3).fill().map(()=>new Gt),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),i&&this.matrix.copy(i)}set(e,t,i){this.min.copy(e),this.max.copy(t),this.matrix.copy(i),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Qe.prototype.update=function(){return function(){const c=this.matrix,e=this.min,t=this.max,i=this.points;for(let a=0;a<=1;a++)for(let l=0;l<=1;l++)for(let h=0;h<=1;h++){const d=1*a|2*l|4*h,u=i[d];u.x=a?t.x:e.x,u.y=l?t.y:e.y,u.z=h?t.z:e.z,u.applyMatrix4(c)}const s=this.satBounds,n=this.satAxes,r=i[0];for(let a=0;a<3;a++){const l=n[a],h=s[a],d=1<new tt),t=new Array(12).fill().map(()=>new tt),i=new x,s=new x;return function(n,r=0,o=null,a=null){if(this.needsUpdate&&this.update(),this.intersectsBox(n))return(o||a)&&(n.getCenter(s),this.closestPointToPoint(s,i),n.closestPointToPoint(i,s),o&&o.copy(i),a&&a.copy(s)),0;const l=r*r,h=n.min,d=n.max,u=this.points;let f=1/0;for(let p=0;p<8;p++){const E=u[p];s.copy(E).clamp(h,d);const I=E.distanceToSquared(s);if(Inew Et)}}const lt=new qh;function $e(c,e){return e[c+15]===65535}function et(c,e){return e[c+6]}function ct(c,e){return e[c+14]}function ht(c){return c+8}function dt(c,e){return e[c+6]}function Ha(c,e){return e[c+7]}class Jh{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let t=null;this.setBuffer=i=>{t&&e.push(t),t=i,this.float32Array=new Float32Array(i),this.uint16Array=new Uint16Array(i),this.uint32Array=new Uint32Array(i)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const Fe=new Jh;let qt,zi;const Si=[],Us=new lo(()=>new ye);function $h(c,e,t,i,s,n){qt=Us.getPrimitive(),zi=Us.getPrimitive(),Si.push(qt,zi),Fe.setBuffer(c._roots[e]);const r=Ir(0,c.geometry,t,i,s,n);Fe.clearBuffer(),Us.releasePrimitive(qt),Us.releasePrimitive(zi),Si.pop(),Si.pop();const o=Si.length;return o>0&&(zi=Si[o-1],qt=Si[o-2]),r}function Ir(c,e,t,i,s=null,n=0,r=0){const{float32Array:o,uint16Array:a,uint32Array:l}=Fe;let h=c*2;if($e(h,a)){const d=et(c,l),u=ct(h,a);return Ne(c,o,qt),i(d,u,!1,r,n+c,qt)}else{let d=function(_){const{uint16Array:F,uint32Array:L}=Fe;let R=_*2;for(;!$e(R,F);)_=ht(_),R=_*2;return et(_,L)},u=function(_){const{uint16Array:F,uint32Array:L}=Fe;let R=_*2;for(;!$e(R,F);)_=dt(_,L),R=_*2;return et(_,L)+ct(R,F)};const f=ht(c),m=dt(c,l);let p=f,E=m,I,g,w,C;if(s&&(w=qt,C=zi,Ne(p,o,w),Ne(E,o,C),I=s(w),g=s(C),g(ss.copy(e).clamp(h.min,h.max),ss.distanceToSquared(e)),intersectsBounds:(h,d,u)=>u{h.closestPointToPoint(e,ss);const u=e.distanceToSquared(ss);return u0&&l.normal.multiplyScalar(-1));const h={a:n,b:r,c:o,normal:new x,materialIndex:0};hi.getNormal(wi,vi,yi,h.normal),l.face=h,l.faceIndex=n}return l}function Un(c,e,t,i,s){const n=i*3;let r=n+0,o=n+1,a=n+2;const l=c.index;c.index&&(r=l.getX(r),o=l.getX(o),a=l.getX(a));const{position:h,normal:d,uv:u,uv1:f}=c.attributes,m=id(t,h,d,u,f,r,o,a,e);return m?(m.faceIndex=i,s&&s.push(m),m):null}function De(c,e,t,i){const s=c.a,n=c.b,r=c.c;let o=e,a=e+1,l=e+2;t&&(o=t.getX(o),a=t.getX(a),l=t.getX(l)),s.x=i.getX(o),s.y=i.getY(o),s.z=i.getZ(o),n.x=i.getX(a),n.y=i.getY(a),n.z=i.getZ(a),r.x=i.getX(l),r.y=i.getY(l),r.z=i.getZ(l)}function sd(c,e,t,i,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=i,l=i+s;av&&(v=_),FO&&(O=F),LA&&(A=L)}return a[u+0]!==g||a[u+1]!==w||a[u+2]!==C||a[u+3]!==v||a[u+4]!==O||a[u+5]!==A?(a[u+0]=g,a[u+1]=w,a[u+2]=C,a[u+3]=v,a[u+4]=O,a[u+5]=A,!0):!1}else{const E=u+8,I=r[u+6],g=E+f,w=I+f;let C=m,v=!1,O=!1;e?C||(v=e.has(g),O=e.has(w),C=!v&&!O):(v=!0,O=!0);const A=C||v,b=C||O;let N=!1;A&&(N=d(E,f,C));let D=!1;b&&(D=d(I,f,C));const _=N||D;if(_)for(let F=0;F<3;F++){const L=E+F,R=I+F,U=a[L],W=a[L+3],z=a[R],q=a[R+3];a[u+F]=Uq?W:q}return _}}}const Do=new ye;function $t(c,e,t,i){return Ne(c,e,Do),t.intersectBox(Do,i)}function ad(c,e,t,i,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=i,l=i+s;a=0;let d,u;h?(d=ht(c),u=dt(c,r)):(d=dt(c,r),u=ht(c));const f=$t(d,s,i,Uo)?gr(d,e,t,i):null;if(f){const p=f.point[l];if(h?p<=s[u+a]:p>=s[u+a+3])return f}const m=$t(u,s,i,Uo)?gr(u,e,t,i):null;return f&&m?f.distance<=m.distance?f:m:f||m||null}}const Ys=new ye,Fi=new Et,Ai=new Et,ns=new ne,Bo=new Qe,Gs=new Qe;function fd(c,e,t,i){Fe.setBuffer(c._roots[e]);const s=Cr(0,c,t,i);return Fe.clearBuffer(),s}function Cr(c,e,t,i,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),Bo.set(t.boundingBox.min,t.boundingBox.max,i),s=Bo),$e(a,r)){const l=e.geometry,h=l.index,d=l.attributes.position,u=t.index,f=t.attributes.position,m=et(c,o),p=ct(a,r);if(ns.copy(i).invert(),t.boundsTree)return Ne(c,n,Gs),Gs.matrix.copy(ns),Gs.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:E=>Gs.intersectsBox(E),intersectsTriangle:E=>{E.a.applyMatrix4(i),E.b.applyMatrix4(i),E.c.applyMatrix4(i),E.needsUpdate=!0;for(let I=m*3,g=(p+m)*3;IKn.distanceToBox(v),intersectsBounds:(v,O,A)=>A{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:A=>rs.distanceToBox(A),intersectsBounds:(A,b,N)=>N{for(let N=A,D=A+b;Nv&&(v=L),RO&&(O=R),UA&&(A=U)}}return a[u+0]!==g||a[u+1]!==w||a[u+2]!==C||a[u+3]!==v||a[u+4]!==O||a[u+5]!==A?(a[u+0]=g,a[u+1]=w,a[u+2]=C,a[u+3]=v,a[u+4]=O,a[u+5]=A,!0):!1}else{const E=u+8,I=r[u+6],g=E+f,w=I+f;let C=m,v=!1,O=!1;e?C||(v=e.has(g),O=e.has(w),C=!v&&!O):(v=!0,O=!0);const A=C||v,b=C||O;let N=!1;A&&(N=d(E,f,C));let D=!1;b&&(D=d(I,f,C));const _=N||D;if(_)for(let F=0;F<3;F++){const L=E+F,R=I+F,U=a[L],W=a[L+3],z=a[R],q=a[R+3];a[u+F]=Uq?W:q}return _}}}const zo=new x;function Td(c,e,t,i,s){Fe.setBuffer(c._roots[e]),Tr(0,c,t,i,s),Fe.clearBuffer()}function Tr(c,e,t,i,s){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe,a=c*2;if($e(a,r)){const l=et(c,o),h=ct(a,r);ad(e,t,i,l,h,s)}else{const l=ht(c);$t(l,n,i,zo)&&Tr(l,e,t,i,s);const h=dt(c,o);$t(h,n,i,zo)&&Tr(h,e,t,i,s)}}const ko=new x,Rd=["x","y","z"];function Sd(c,e,t,i){Fe.setBuffer(c._roots[e]);const s=Rr(0,c,t,i);return Fe.clearBuffer(),s}function Rr(c,e,t,i){const{float32Array:s,uint16Array:n,uint32Array:r}=Fe;let o=c*2;if($e(o,n)){const a=et(c,r),l=ct(o,n);return ld(e,t,i,a,l)}else{const a=Ha(c,r),l=Rd[a],h=i.direction[l]>=0;let d,u;h?(d=ht(c),u=dt(c,r)):(d=dt(c,r),u=ht(c));const f=$t(d,s,i,ko)?Rr(d,e,t,i):null;if(f){const p=f.point[l];if(h?p<=s[u+a]:p>=s[u+a+3])return f}const m=$t(u,s,i,ko)?Rr(u,e,t,i):null;return f&&m?f.distance<=m.distance?f:m:f||m||null}}const Ws=new ye,Oi=new Et,Ni=new Et,os=new ne,Vo=new Qe,Xs=new Qe;function wd(c,e,t,i){Fe.setBuffer(c._roots[e]);const s=Sr(0,c,t,i);return Fe.clearBuffer(),s}function Sr(c,e,t,i,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),Vo.set(t.boundingBox.min,t.boundingBox.max,i),s=Vo),$e(a,r)){const l=e.geometry,h=l.index,d=l.attributes.position,u=t.index,f=t.attributes.position,m=et(c,o),p=ct(a,r);if(os.copy(i).invert(),t.boundsTree)return Ne(c,n,Xs),Xs.matrix.copy(os),Xs.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:E=>Xs.intersectsBox(E),intersectsTriangle:E=>{E.a.applyMatrix4(i),E.b.applyMatrix4(i),E.c.applyMatrix4(i),E.needsUpdate=!0;for(let I=m,g=p+m;Iqn.distanceToBox(v),intersectsBounds:(v,O,A)=>A{if(e.boundsTree){const A=e.boundsTree;return A.shapecast({boundsTraverseOrder:b=>as.distanceToBox(b),intersectsBounds:(b,N,D)=>D{for(let D=b,_=b+N;D<_;D++){const F=A.resolveTriangleIndex(D);De(f,3*F,d,h),f.a.applyMatrix4(t),f.b.applyMatrix4(t),f.c.applyMatrix4(t),f.needsUpdate=!0;for(let L=v,R=v+O;Lnew ye),Pi=new ye,bi=new ye,Jn=new ye,$n=new ye;let er=!1;function Pd(c,e,t,i){if(er)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");er=!0;const s=c._roots,n=e._roots;let r,o=0,a=0;const l=new ne().copy(t).invert();for(let h=0,d=s.length;ha.slice()),index:r.array.slice(),indirectBuffer:n?n.slice():null}:o={roots:s,index:r.array,indirectBuffer:n},o}static deserialize(e,t,i={}){i={setIndex:!0,indirect:!!e.indirectBuffer,...i};const{index:s,roots:n,indirectBuffer:r}=e,o=new co(t,{...i,[Xn]:!0});if(o._roots=n,o._indirectBuffer=r||null,i.setIndex){const a=t.getIndex();if(a===null){const l=new Je(e.index,1,!1);t.setIndex(l)}else a.array!==s&&(a.array.set(s),a.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(e,t={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({strategy:Va,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[Xn]:!1},t),t.useSharedArrayBuffer&&!Nd())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,t[Xn]||(Zh(this,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new ye)));const{_indirectBuffer:i}=this;this.resolveTriangleIndex=t.indirect?s=>i[s]:s=>s}refit(e=null){return(this.indirect?Cd:od)(this,e)}traverse(e,t=0){const i=this._roots[t],s=new Uint32Array(i),n=new Uint16Array(i);r(0);function r(o,a=0){const l=o*2,h=n[l+15]===_n;if(h){const d=s[o+6],u=n[l+14];e(a,h,new Float32Array(i,o*4,6),d,u)}else{const d=o+In/4,u=s[o+6],f=s[o+7];e(a,h,new Float32Array(i,o*4,6),f)||(r(d,a+1),r(u,a+1))}}}raycast(e,t=Fo){const i=this._roots,s=this.geometry,n=[],r=t.isMaterial,o=Array.isArray(t),a=s.groups,l=r?t.side:t,h=this.indirect?Td:hd;for(let d=0,u=i.length;dd(u,f,m,p,E)?!0:i(u,f,this,o,m,p,t)}else r||(o?r=(d,u,f,m)=>i(d,u,this,o,f,m,t):r=(d,u,f)=>f);let a=!1,l=0;const h=this._roots;for(let d=0,u=h.length;d{const p=this.resolveTriangleIndex(m);De(r,p*3,o,a)}:m=>{De(r,m*3,o,a)},h=lt.getPrimitive(),d=e.geometry.index,u=e.geometry.attributes.position,f=e.indirect?m=>{const p=e.resolveTriangleIndex(m);De(h,p*3,d,u)}:m=>{De(h,m*3,d,u)};if(n){const m=(p,E,I,g,w,C,v,O)=>{for(let A=I,b=I+g;Ajs.intersectsBox(i),intersectsTriangle:i=>js.intersectsTriangle(i)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,i={},s={},n=0,r=1/0){return(this.indirect?Od:gd)(this,e,t,i,s,n,r)}closestPointToPoint(e,t={},i=0,s=1/0){return ed(this,e,t,i,s)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(t=>{Ne(0,new Float32Array(t),Yo),e.union(Yo)}),e}}function Go(c,e,t){return c===null||(c.point.applyMatrix4(e.matrixWorld),c.distance=c.point.distanceTo(t.ray.origin),c.object=e,c.distancet.far)?null:c}const tr=new Eh,Ho=new ne,bd=ee.prototype.raycast;function xd(c,e){if(this.geometry.boundsTree){if(this.material===void 0)return;Ho.copy(this.matrixWorld).invert(),tr.copy(c.ray).applyMatrix4(Ho);const t=this.geometry.boundsTree;if(c.firstHitOnly===!0){const i=Go(t.raycastFirst(tr,this.material),this,c);i&&e.push(i)}else{const i=t.raycast(tr,this.material);for(let s=0,n=i.length;s{if(!this.enabled)return;const e=this.handlers.slice(0);for(const t of e)t(c)}),T(this,"handlers",[])}add(c){this.handlers.push(c)}remove(c){this.handlers=this.handlers.filter(e=>e!==c)}reset(){this.handlers.length=0}};class Ut{constructor(){T(this,"enabled",!0),T(this,"trigger",async e=>{if(!this.enabled)return;const t=this.handlers.slice(0);for(const i of t)await i(e)}),T(this,"handlers",[])}add(e){this.handlers.push(e)}remove(e){this.handlers=this.handlers.filter(t=>t!==e)}reset(){this.handlers.length=0}}class ho{constructor(e){T(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this),T(this,"isResizeable",()=>"resize"in this&&"getSize"in this),T(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this),T(this,"isHideable",()=>"visible"in this),T(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this),this.components=e}}class de extends ho{}class Wa extends ho{constructor(e){super(e),T(this,"worlds",new Map),T(this,"onWorldChanged",new Y),T(this,"currentWorld",null),this.onWorldChanged.add(({world:t,action:i})=>{i==="removed"&&this.worlds.delete(t.uuid)})}}class Dd extends Wa{constructor(){super(...arguments),T(this,"hasCameraControls",()=>"controls"in this)}}class _d extends Wa{constructor(){super(...arguments),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"onResize",new Y),T(this,"onClippingPlanesUpdated",new Y),T(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(e,t,i){t.isLocal=i;const s=this.clippingPlanes.indexOf(t);e&&s===-1?this.clippingPlanes.push(t):!e&&s>-1&&this.clippingPlanes.splice(s,1),this.three.clippingPlanes=this.clippingPlanes.filter(n=>!n.isLocal)}}const Xa=class wr extends de{constructor(e){super(e),T(this,"_disposedComponents",new Set),T(this,"enabled",!0),e.add(wr.uuid,this)}get(){return this._disposedComponents}destroy(e,t=!0,i=!0){e.removeFromParent();const s=e;s.dispose&&s.dispose(),this.disposeGeometryAndMaterials(e,t),i&&s.children&&s.children.length&&this.disposeChildren(s),e.children.length=0}disposeGeometry(e){e.boundsTree&&e.disposeBoundsTree&&e.disposeBoundsTree(),e.dispose()}disposeGeometryAndMaterials(e,t){const i=e;i.geometry&&this.disposeGeometry(i.geometry),t&&i.material&&wr.disposeMaterial(i),i.material=[],i.geometry=null}disposeChildren(e){for(const t of e.children)this.destroy(t)}static disposeMaterial(e){if(e.material)if(Array.isArray(e.material))for(const t of e.material)t.dispose();else e.material.dispose()}};T(Xa,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let Nt=Xa;class Jt extends Set{constructor(e){super(e),T(this,"onItemAdded",new Y),T(this,"onItemDeleted",new Y),T(this,"onCleared",new Y),T(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}add(...e){for(const t of e)this.has(t)||!this.guard(t)||(super.add(t),this.onItemAdded||(this.onItemAdded=new Y),this.onItemAdded.trigger(t));return this}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(),t}dispose(){this.clear(),this.onItemAdded.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class gt extends Map{constructor(e){super(e),T(this,"onItemSet",new Y),T(this,"onItemUpdated",new Y),T(this,"onItemDeleted",new Y),T(this,"onCleared",new Y),T(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}set(e,t){const i=this.has(e);if(!(this.guard??(()=>!0))(e,t))return this;const s=super.set(e,t);return i?(this.onItemUpdated||(this.onItemUpdated=new Y),this.onItemUpdated.trigger({key:e,value:t})):(this.onItemSet||(this.onItemSet=new Y),this.onItemSet.trigger({key:e,value:t})),s}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(e),t}dispose(){this.clear(),this.onItemSet.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class ir{static isEntry(e){return new Set(["Boolean","Color","Text","Number","Select","Vector3","TextSet","None"]).has(e.type)}static copySchema(e,t={}){for(const i in e){const s=e[i];this.isEntry(s)?t[i]=this.copyEntry(s):(t[i]={},this.copySchema(s,t[i]))}return t}static copyEntry(e){if(e.type==="Boolean"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Color"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="Text"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Number"){const t=e;return{type:t.type,value:t.value,min:t.min,max:t.max,interpolable:t.interpolable}}if(e.type==="Select"){const t=e;return{type:t.type,value:t.value,multiple:t.multiple,options:new Set(t.options)}}if(e.type==="Vector3"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="TextSet"){const t=e;return{type:t.type,value:new Set(t.value)}}if(e.type==="None"){const t=e;return{type:t.type,value:t.value}}throw new Error("Invalid entry!")}}class Ud{constructor(){T(this,"list",new Set)}add(e){for(const t of e)this.list.add(t)}remove(e){for(const t of e)this.list.delete(t)}set(e){for(const t of this.list)t.enabled=e}reset(){for(const e of this.list)e.reset()}}const En=0,Bd=1,zd=new x,Wo=new tt,sr=new ii,Xo=new x,Qs=new hi;class kd{constructor(){this.tolerance=-1,this.faces=[],this.newFaces=[],this.assigned=new Zo,this.unassigned=new Zo,this.vertices=[]}setFromPoints(e){if(e.length>=4){this.makeEmpty();for(let t=0,i=e.length;tthis.tolerance)return!1;return!0}intersectRay(e,t){const i=this.faces;let s=-1/0,n=1/0;for(let r=0,o=i.length;r0&&h>=0)return null;const d=h!==0?-l/h:0;if(!(d<=0)&&(h>0?n=Math.min(d,n):s=Math.max(d,s),s>n))return null}return s!==-1/0?e.at(s,t):e.at(n,t),t}intersectsRay(e){return this.intersectRay(e,zd)!==null}makeEmpty(){return this.faces=[],this.vertices=[],this}addVertexToFace(e,t){return e.face=t,t.outside===null?this.assigned.append(e):this.assigned.insertBefore(t.outside,e),t.outside=e,this}removeVertexFromFace(e,t){return e===t.outside&&(e.next!==null&&e.next.face===t?t.outside=e.next:t.outside=null),this.assigned.remove(e),this}removeAllVerticesFromFace(e){if(e.outside!==null){const t=e.outside;let i=e.outside;for(;i.next!==null&&i.next.face===e;)i=i.next;return this.assigned.removeSubList(t,i),t.prev=i.next=null,e.outside=null,t}}deleteFaceVertices(e,t){const i=this.removeAllVerticesFromFace(e);if(i!==void 0)if(t===void 0)this.unassigned.appendChain(i);else{let s=i;do{const n=s.next;t.distanceToPoint(s.point)>this.tolerance?this.addVertexToFace(s,t):this.unassigned.append(s),s=n}while(s!==null)}return this}resolveUnassignedPoints(e){if(this.unassigned.isEmpty()===!1){let t=this.unassigned.first();do{const i=t.next;let s=this.tolerance,n=null;for(let r=0;rs&&(s=a,n=o),s>1e3*this.tolerance)break}}n!==null&&this.addVertexToFace(t,n),t=i}while(t!==null)}return this}computeExtremes(){const e=new x,t=new x,i=[],s=[];for(let n=0;n<3;n++)i[n]=s[n]=this.vertices[0];e.copy(this.vertices[0].point),t.copy(this.vertices[0].point);for(let n=0,r=this.vertices.length;nt.getComponent(l)&&(t.setComponent(l,a.getComponent(l)),s[l]=o)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(e.x),Math.abs(t.x))+Math.max(Math.abs(e.y),Math.abs(t.y))+Math.max(Math.abs(e.z),Math.abs(t.z))),{min:i,max:s}}computeInitialHull(){const e=this.vertices,t=this.computeExtremes(),i=t.min,s=t.max;let n=0,r=0;for(let u=0;u<3;u++){const f=s[u].point.getComponent(u)-i[u].point.getComponent(u);f>n&&(n=f,r=u)}const o=i[r],a=s[r];let l,h;n=0,Wo.set(o.point,a.point);for(let u=0,f=this.vertices.length;un&&(n=p,l=m)}}n=-1,sr.setFromCoplanarPoints(o.point,a.point,l.point);for(let u=0,f=this.vertices.length;un&&(n=p,h=m)}}const d=[];if(sr.distanceToPoint(h.point)<0){d.push(mt.create(o,a,l),mt.create(h,a,o),mt.create(h,l,a),mt.create(h,o,l));for(let u=0;u<3;u++){const f=(u+1)%3;d[u+1].getEdge(2).setTwin(d[0].getEdge(f)),d[u+1].getEdge(1).setTwin(d[f+1].getEdge(0))}}else{d.push(mt.create(o,l,a),mt.create(h,o,a),mt.create(h,a,l),mt.create(h,l,o));for(let u=0;u<3;u++){const f=(u+1)%3;d[u+1].getEdge(2).setTwin(d[0].getEdge((3-u)%3)),d[u+1].getEdge(0).setTwin(d[f+1].getEdge(1))}}for(let u=0;u<4;u++)this.faces.push(d[u]);for(let u=0,f=e.length;un&&(n=I,p=this.faces[E])}p!==null&&this.addVertexToFace(m,p)}}return this}reindexFaces(){const e=[];for(let t=0;tt&&(t=n,e=s),s=s.next}while(s!==null&&s.face===i);return e}}computeHorizon(e,t,i,s){this.deleteFaceVertices(i),i.mark=Bd;let n;t===null?n=t=i.getEdge(0):n=t.next;do{const r=n.twin,o=r.face;o.mark===En&&(o.distanceToPoint(e)>this.tolerance?this.computeHorizon(e,r,o,s):s.push(n)),n=n.next}while(n!==t);return this}addAdjoiningFace(e,t){const i=mt.create(e,t.tail(),t.head());return this.faces.push(i),i.getEdge(-1).setTwin(t.twin),i.getEdge(0)}addNewFaces(e,t){this.newFaces=[];let i=null,s=null;for(let n=0;n0;)t=t.next,e--;for(;e<0;)t=t.prev,e++;return t}compute(){const e=this.edge.tail(),t=this.edge.head(),i=this.edge.next.head();return Qs.set(e.point,t.point,i.point),Qs.getNormal(this.normal),Qs.getMidpoint(this.midpoint),this.area=Qs.getArea(),this.constant=this.normal.dot(this.midpoint),this}distanceToPoint(e){return this.normal.dot(e)-this.constant}}class nr{constructor(e,t){this.vertex=e,this.prev=null,this.next=null,this.twin=null,this.face=t}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceTo(e.point):-1}lengthSquared(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceToSquared(e.point):-1}setTwin(e){return this.twin=e,e.twin=this,this}}class Vd{constructor(e){this.point=e,this.prev=null,this.next=null,this.face=null}}class Zo{constructor(){this.head=null,this.tail=null}first(){return this.head}last(){return this.tail}clear(){return this.head=this.tail=null,this}insertBefore(e,t){return t.prev=e.prev,t.next=e,t.prev===null?this.head=t:t.prev.next=t,e.prev=t,this}insertAfter(e,t){return t.prev=e,t.next=e.next,t.next===null?this.tail=t:t.next.prev=t,e.next=t,this}append(e){return this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e,this}appendChain(e){for(this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail;e.next!==null;)e=e.next;return this.tail=e,this}remove(e){return e.prev===null?this.head=e.next:e.prev.next=e.next,e.next===null?this.tail=e.prev:e.next.prev=e.prev,this}removeSubList(e,t){return e.prev===null?this.head=t.next:e.prev.next=t.next,t.next===null?this.tail=e.prev:t.next.prev=e.prev,this}isEmpty(){return this.head===null}}const vr=[2,2,1],yr=[1,0,0];function Ft(c,e){return c*3+e}function Yd(c){const e=c.elements;let t=0;for(let i=0;i<9;i++)t+=e[i]*e[i];return Math.sqrt(t)}function Gd(c){const e=c.elements;let t=0;for(let i=0;i<3;i++){const s=e[Ft(vr[i],yr[i])];t+=2*s*s}return Math.sqrt(t)}function Hd(c,e){let t=0,i=1;const s=c.elements;for(let l=0;l<3;l++){const h=Math.abs(s[Ft(vr[l],yr[l])]);h>t&&(t=h,i=l)}let n=1,r=0;const o=yr[i],a=vr[i];if(Math.abs(s[Ft(a,o)])>Number.EPSILON){const l=s[Ft(a,a)],h=s[Ft(o,o)],d=s[Ft(a,o)],u=(l-h)/2/d;let f;u<0?f=-1/(-u+Math.sqrt(1+u*u)):f=1/(u+Math.sqrt(1+u*u)),n=1/Math.sqrt(1+f*f),r=f*n}return e.identity(),e.elements[Ft(o,o)]=n,e.elements[Ft(a,a)]=n,e.elements[Ft(a,o)]=r,e.elements[Ft(o,a)]=-r,e}function Wd(c,e){let t=0,i=0;const s=10;e.unitary.identity(),e.diagonal.copy(c);const n=e.unitary,r=e.diagonal,o=new di,a=new di,l=Number.EPSILON*Yd(r);for(;il;)Hd(r,o),a.copy(o).transpose(),r.multiply(o),r.premultiply(a),n.multiply(o),++t>2&&(i++,t=0);return e}function Xd(c){const e=[];for(let ae=0;ae>8&255]+Ue._lut[e>>16&255]+Ue._lut[e>>24&255]}-${Ue._lut[t&255]}${Ue._lut[t>>8&255]}-${Ue._lut[t>>16&15|64]}${Ue._lut[t>>24&255]}-${Ue._lut[i&63|128]}${Ue._lut[i>>8&255]}-${Ue._lut[i>>16&255]}${Ue._lut[i>>24&255]}${Ue._lut[s&255]}${Ue._lut[s>>8&255]}${Ue._lut[s>>16&255]}${Ue._lut[s>>24&255]}`.toLowerCase()}static validate(e){if(!Ue._pattern.test(e))throw new Error(`${e} is not a valid UUID v4. - If you're the tool creator, you can take one from https://www.uuidgenerator.net/. -- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};T(Fo,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/);T(Fo,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let Wt=Fo;class Iu extends de{constructor(e,t){super(e),T(this,"onDisposed",new H),T(this,"onVertexFound",new H),T(this,"onVertexLost",new H),T(this,"onEnabled",new H),T(this,"components"),T(this,"workingPlane",null),T(this,"_pickedPoint",null),T(this,"_config"),T(this,"_enabled",!1),this.components=e,this.config={snapDistance:.25,showOnlyVertex:!1,...t},this.enabled=!1}set enabled(e){this._enabled=e,e||(this._pickedPoint=null),this.onEnabled.trigger(e)}get enabled(){return this._enabled}set config(e){this._config={...this._config,...e}}get config(){return this._config}dispose(){this.onVertexFound.reset(),this.onVertexLost.reset(),this.components=null,this.onDisposed.trigger(),this.onDisposed.reset()}get(e){if(!this.enabled)return this._pickedPoint;const t=this.components.get(pt).get(e).castRay();if(!t)return this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint;const i=this.getClosestVertex(t);return i?!this.workingPlane||Math.abs(this.workingPlane.distanceToPoint(i))<.001?((this._pickedPoint===null||!this._pickedPoint.equals(i))&&(this._pickedPoint=i.clone(),this.onVertexFound.trigger(this._pickedPoint)),this._pickedPoint):(this._pickedPoint=null,this._pickedPoint):(this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint)}getClosestVertex(e){let t=new L,i=!1,s=Number.MAX_SAFE_INTEGER;const n=this.getVertices(e);if(n===null)return null;for(const r of n){if(!r)continue;const o=e.point.distanceTo(r);o>s||o>this._config.snapDistance||(i=!0,t=r,s=e.point.distanceTo(r))}return i?t:this.config.showOnlyVertex?null:e.point}getVertices(e){const t=e.object;if(!e.face||!t)return null;const i=t.geometry,s=new ne,{instanceId:n}=e,r=n!==void 0,o=t instanceof ft;return o&&r&&t.getMatrixAt(n,s),[this.getVertex(e.face.a,i),this.getVertex(e.face.b,i),this.getVertex(e.face.c,i)].map(a=>(a&&(o&&r&&a.applyMatrix4(s),a.applyMatrix4(t.matrixWorld)),a))}getVertex(e,t){if(e===void 0)return null;const i=t.attributes.position;return new L(i.getX(e),i.getY(e),i.getZ(e))}}var nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dl(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Ao={exports:{}};Ao.exports=Zn;Ao.exports.default=Zn;function Zn(l,e,t){t=t||2;var i=e&&e.length,s=i?e[0]*t:l.length,n=ul(l,0,s,t,!0),r=[];if(!n||n.next===n.prev)return r;var o,a,h,c,u,d,f;if(i&&(n=Ru(l,e,n,t)),l.length>80*t){o=h=l[0],a=c=l[1];for(var m=t;mh&&(h=u),d>c&&(c=d);f=Math.max(h-o,c-a),f=f!==0?32767/f:0}return As(n,r,t,o,a,f,0),r}function ul(l,e,t,i,s){var n,r;if(s===zr(l,e,t,i)>0)for(n=e;n=e;n-=i)r=da(n,l[n],l[n+1],r);return r&&jn(r,r.next)&&(Ns(r),r=r.next),r}function Ci(l,e){if(!l)return l;e||(e=l);var t=l,i;do if(i=!1,!t.steiner&&(jn(t,t.next)||Pe(t.prev,t,t.next)===0)){if(Ns(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function As(l,e,t,i,s,n,r){if(l){!r&&n&&Fu(l,i,s,n);for(var o=l,a,h;l.prev!==l.next;){if(a=l.prev,h=l.next,n?gu(l,i,s,n):Eu(l)){e.push(a.i/t|0),e.push(l.i/t|0),e.push(h.i/t|0),Ns(l),l=h.next,o=h.next;continue}if(l=h,l===o){r?r===1?(l=Cu(Ci(l),e,t),As(l,e,t,i,s,n,2)):r===2&&Tu(l,e,t,i,s,n):As(Ci(l),e,t,i,s,n,1);break}}}}function Eu(l){var e=l.prev,t=l,i=l.next;if(Pe(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,r=i.x,o=e.y,a=t.y,h=i.y,c=sn?s>r?s:r:n>r?n:r,f=o>a?o>h?o:h:a>h?a:h,m=i.next;m!==e;){if(m.x>=c&&m.x<=d&&m.y>=u&&m.y<=f&&Gi(s,o,n,a,r,h,m.x,m.y)&&Pe(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function gu(l,e,t,i){var s=l.prev,n=l,r=l.next;if(Pe(s,n,r)>=0)return!1;for(var o=s.x,a=n.x,h=r.x,c=s.y,u=n.y,d=r.y,f=oa?o>h?o:h:a>h?a:h,I=c>u?c>d?c:d:u>d?u:d,E=Ur(f,m,e,t,i),C=Ur(p,I,e,t,i),v=l.prevZ,g=l.nextZ;v&&v.z>=E&&g&&g.z<=C;){if(v.x>=f&&v.x<=p&&v.y>=m&&v.y<=I&&v!==s&&v!==r&&Gi(o,c,a,u,h,d,v.x,v.y)&&Pe(v.prev,v,v.next)>=0||(v=v.prevZ,g.x>=f&&g.x<=p&&g.y>=m&&g.y<=I&&g!==s&&g!==r&&Gi(o,c,a,u,h,d,g.x,g.y)&&Pe(g.prev,g,g.next)>=0))return!1;g=g.nextZ}for(;v&&v.z>=E;){if(v.x>=f&&v.x<=p&&v.y>=m&&v.y<=I&&v!==s&&v!==r&&Gi(o,c,a,u,h,d,v.x,v.y)&&Pe(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;g&&g.z<=C;){if(g.x>=f&&g.x<=p&&g.y>=m&&g.y<=I&&g!==s&&g!==r&&Gi(o,c,a,u,h,d,g.x,g.y)&&Pe(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function Cu(l,e,t){var i=l;do{var s=i.prev,n=i.next.next;!jn(s,n)&&fl(s,i,i.next,n)&&Os(s,n)&&Os(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),Ns(i),Ns(i.next),i=l=n),i=i.next}while(i!==l);return Ci(i)}function Tu(l,e,t,i,s,n){var r=l;do{for(var o=r.next.next;o!==r.prev;){if(r.i!==o.i&&Nu(r,o)){var a=pl(r,o);r=Ci(r,r.next),a=Ci(a,a.next),As(r,e,t,i,s,n,0),As(a,e,t,i,s,n,0);return}o=o.next}r=r.next}while(r!==l)}function Ru(l,e,t,i){var s=[],n,r,o,a,h;for(n=0,r=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,r=t.x=t.x&&t.x>=h&&i!==t.x&&Gi(sr.x||t.x===r.x&&wu(r,t)))&&(r=t,u=d)),t=t.next;while(t!==a);return r}function wu(l,e){return Pe(l.prev,l,e.prev)<0&&Pe(e.next,l,l.next)<0}function Fu(l,e,t,i){var s=l;do s.z===0&&(s.z=Ur(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==l);s.prevZ.nextZ=null,s.prevZ=null,Au(s)}function Au(l){var e,t,i,s,n,r,o,a,h=1;do{for(t=l,l=null,n=null,r=0;t;){for(r++,i=t,o=0,e=0;e0||a>0&&i;)o!==0&&(a===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,a--),n?n.nextZ=s:l=s,s.prevZ=n,n=s;t=i}n.nextZ=null,h*=2}while(r>1);return l}function Ur(l,e,t,i,s){return l=(l-t)*s|0,e=(e-i)*s|0,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,l|e<<1}function Ou(l){var e=l,t=l;do(e.x=(l-r)*(n-o)&&(l-r)*(i-o)>=(t-r)*(e-o)&&(t-r)*(n-o)>=(s-r)*(i-o)}function Nu(l,e){return l.next.i!==e.i&&l.prev.i!==e.i&&!Pu(l,e)&&(Os(l,e)&&Os(e,l)&&bu(l,e)&&(Pe(l.prev,l,e.prev)||Pe(l,e.prev,e))||jn(l,e)&&Pe(l.prev,l,l.next)>0&&Pe(e.prev,e,e.next)>0)}function Pe(l,e,t){return(e.y-l.y)*(t.x-e.x)-(e.x-l.x)*(t.y-e.y)}function jn(l,e){return l.x===e.x&&l.y===e.y}function fl(l,e,t,i){var s=on(Pe(l,e,t)),n=on(Pe(l,e,i)),r=on(Pe(t,i,l)),o=on(Pe(t,i,e));return!!(s!==n&&r!==o||s===0&&rn(l,t,e)||n===0&&rn(l,i,e)||r===0&&rn(t,l,i)||o===0&&rn(t,e,i))}function rn(l,e,t){return e.x<=Math.max(l.x,t.x)&&e.x>=Math.min(l.x,t.x)&&e.y<=Math.max(l.y,t.y)&&e.y>=Math.min(l.y,t.y)}function on(l){return l>0?1:l<0?-1:0}function Pu(l,e){var t=l;do{if(t.i!==l.i&&t.next.i!==l.i&&t.i!==e.i&&t.next.i!==e.i&&fl(t,t.next,l,e))return!0;t=t.next}while(t!==l);return!1}function Os(l,e){return Pe(l.prev,l,l.next)<0?Pe(l,e,l.next)>=0&&Pe(l,l.prev,e)>=0:Pe(l,e,l.prev)<0||Pe(l,l.next,e)<0}function bu(l,e){var t=l,i=!1,s=(l.x+e.x)/2,n=(l.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==l);return i}function pl(l,e){var t=new Br(l.i,l.x,l.y),i=new Br(e.i,e.x,e.y),s=l.next,n=e.prev;return l.next=e,e.prev=l,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function da(l,e,t,i){var s=new Br(l,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Ns(l){l.next.prev=l.prev,l.prev.next=l.next,l.prevZ&&(l.prevZ.nextZ=l.nextZ),l.nextZ&&(l.nextZ.prevZ=l.prevZ)}function Br(l,e,t){this.i=l,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Zn.deviation=function(l,e,t,i){var s=e&&e.length,n=s?e[0]*t:l.length,r=Math.abs(zr(l,0,n,t));if(s)for(var o=0,a=e.length;o0&&(i+=l[s-1].length,t.holes.push(i))}return t};var Lu=Ao.exports;const xu=dl(Lu);class Mu extends de{constructor(){super(...arguments),T(this,"enabled",!0),T(this,"_inverseMatrix",new ne),T(this,"_localPlane",new Xt),T(this,"_tempLine",new Je),T(this,"_tempVector",new L),T(this,"_plane"),T(this,"_plane2DCoordinateSystem",new ne),T(this,"_precission",1e4),T(this,"_planeAxis")}get plane(){if(!this._plane)throw new Error("Plane not set");return this._plane}set plane(e){this._plane=e}createEdges(e){const{meshes:t,posAttr:i}=e;let s=0;i.array.fill(0);const n=[];let r=0;const o=new ee;for(const a of t)if(a.geometry){if(a.geometry.boundsTree||a.geometry.computeBoundsTree(),!a.geometry.boundsTree)throw new Error("Bounds tree not found for edges generation.");if(a instanceof ft){if(a.count===0)continue;const h=a;for(let c=0;cthis._localPlane.intersectsBox(s),intersectsTriangle:s=>{let n=0;if(this._tempLine.start.copy(s.a),this._tempLine.end.copy(s.b),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.b),this._tempLine.end.copy(s.c),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.c),this._tempLine.end.copy(s.a),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}n!==2&&(i-=n)}}),i}}T(Mu,"uuid","1a193b87-6376-46c8-9e65-62a1576fdb64");const ml=class Il{constructor(){T(this,"onDisposed",new H),T(this,"list",new Map),T(this,"enabled",!1),T(this,"_clock"),T(this,"onInit",new H),T(this,"update",()=>{if(!this.enabled)return;const e=this._clock.getDelta();for(const[t,i]of this.list)i.enabled&&i.isUpdateable()&&i.update(e);requestAnimationFrame(this.update)}),this._clock=new qa,Il.setupBVH()}add(e,t){if(this.list.has(e))throw new Error("You're trying to add a component that already exists in the components instance. Use Components.get() instead.");Wt.validate(e),this.list.set(e,t)}get(e){const t=e.uuid;if(!this.list.has(t)){const i=new e(this);return this.list.has(t)||this.add(t,i),i}return this.list.get(t)}init(){this.enabled=!0,this._clock.start(),this.update(),this.onInit.trigger()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.enabled=!1,t.isDisposeable()&&t.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){Ce.prototype.computeBoundsTree=iu,Ce.prototype.disposeBoundsTree=su,ee.prototype.raycast=tu}};T(ml,"release","2.4.3");let El=ml;class Du extends wo{constructor(){super(...arguments),T(this,"meshes",new Set),T(this,"onAfterUpdate",new H),T(this,"onBeforeUpdate",new H),T(this,"onDisposed",new H),T(this,"isDisposing",!1),T(this,"enabled",!0),T(this,"uuid",Wt.create()),T(this,"name"),T(this,"_scene"),T(this,"_camera"),T(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(e){this._scene=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(e){this._camera=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(e){this._renderer=e,e&&(e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"}))}update(e){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(e),this.camera.isUpdateable()&&this.camera.update(e),this.renderer&&this.renderer.update(e),this.onAfterUpdate.trigger()))}dispose(e=!0){if(this.enabled=!1,this.isDisposing=!0,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),e){const t=this.components.get(Pt);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const i of this.meshes)t.destroy(i);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.components.get(Sl).list.delete(this.uuid),this.onDisposed.trigger(),this.onDisposed.reset()}}class $i{constructor(e,t,i,s){T(this,"_component"),T(this,"name"),T(this,"uuid"),this._component=e,this.name=i,this.uuid=s??Wt.create(),t.get(Kn).list.set(this.uuid,this)}get controls(){return fr.copySchema(this._config)}set(e){for(const t in e)if(t in this){const i=t;this[i]=e[t].value}}export(e=this._config,t={}){for(const i in e){const s=e[i];if(fr.isEntry(s))if(s.type==="Color"){const{r:n,g:r,b:o}=s.value;t[i]={...s,value:{r:n,g:r,b:o}}}else if(s.type==="Vector3"){const{x:n,y:r,z:o}=s.value;t[i]={...s,value:{x:n,y:r,z:o}}}else if(s.type==="TextSet"){const n=Array.from(s.value);t[i]={...s,value:n}}else if(s.type==="Select"){const n=Array.from(s.options);t[i]={...s,options:n}}else t[i]={...s};else t[i]={},this.export(s,t[i])}return t}import(e,t={},i=!0){for(const s in e){const n=e[s];if(fr.isEntry(n))if(n.type==="Color"){const{r,g:o,b:a}=n.value;t[s]={...n,value:new Ue(r,o,a)}}else if(n.type==="Vector3"){const{x:r,y:o,z:a}=n.value;t[s]={...n,value:new L(r,o,a)}}else n.type==="TextSet"?t[s]={...n,value:new Set(n.value)}:n.type==="Select"?t[s]={...n,options:new Set(n.options)}:t[s]={...n};else t[s]={},this.import(n,t[s],!1)}i&&this.set(t)}}const gl=class Cl extends de{constructor(e){super(e),T(this,"list",new Ct),T(this,"enabled",!0),e.add(Cl.uuid,this)}};T(gl,"uuid","b8c764e0-6b24-4e77-9a32-35fa728ee5b4");let Kn=gl;class _u extends ru{constructor(e,t,i){super(e),T(this,"enabled",!0),T(this,"container"),T(this,"three"),T(this,"_canvas"),T(this,"_parameters"),T(this,"_resizeObserver",null),T(this,"onContainerUpdated",new H),T(this,"_resizing",!1),T(this,"resize",r=>{if(this._resizing)return;this._resizing=!0,this.onContainerUpdated.trigger();const o=r?r.x:this.container.clientWidth,a=r?r.y:this.container.clientHeight;this.three.setSize(o,a),this.onResize.trigger(new ve(o,a)),this._resizing=!1}),T(this,"resizeEvent",()=>{this.resize()}),T(this,"onContextLost",r=>{r.preventDefault(),this.enabled=!1}),T(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new bn({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0}),this.container=t,this._parameters=i,this.three=new bn({antialias:!0,alpha:!0,...i}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const s=this.three.getContext(),{canvas:n}=s;n.addEventListener("webglcontextlost",this.onContextLost,!1),n.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.three.render(e,t),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.forceContextLoss(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new ve(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(e){const t=this.three.domElement.parentElement;if(!t)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),e&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(t),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}/*! +- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};T(uo,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/);T(uo,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let Ht=uo;class Zd extends de{constructor(e,t){super(e),T(this,"onDisposed",new Y),T(this,"onVertexFound",new Y),T(this,"onVertexLost",new Y),T(this,"onEnabled",new Y),T(this,"components"),T(this,"workingPlane",null),T(this,"_pickedPoint",null),T(this,"_config"),T(this,"_enabled",!1),this.components=e,this.config={snapDistance:.25,showOnlyVertex:!1,...t},this.enabled=!1}set enabled(e){this._enabled=e,e||(this._pickedPoint=null),this.onEnabled.trigger(e)}get enabled(){return this._enabled}set config(e){this._config={...this._config,...e}}get config(){return this._config}dispose(){this.onVertexFound.reset(),this.onVertexLost.reset(),this.components=null,this.onDisposed.trigger(),this.onDisposed.reset()}get(e){if(!this.enabled)return this._pickedPoint;const t=this.components.get(ut).get(e).castRay();if(!t)return this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint;const i=this.getClosestVertex(t);return i?!this.workingPlane||Math.abs(this.workingPlane.distanceToPoint(i))<.001?((this._pickedPoint===null||!this._pickedPoint.equals(i))&&(this._pickedPoint=i.clone(),this.onVertexFound.trigger(this._pickedPoint)),this._pickedPoint):(this._pickedPoint=null,this._pickedPoint):(this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint)}getClosestVertex(e){let t=new x,i=!1,s=Number.MAX_SAFE_INTEGER;const n=this.getVertices(e);if(n===null)return null;for(const r of n){if(!r)continue;const o=e.point.distanceTo(r);o>s||o>this._config.snapDistance||(i=!0,t=r,s=e.point.distanceTo(r))}return i?t:this.config.showOnlyVertex?null:e.point}getVertices(e){const t=e.object;if(!e.face||!t)return null;const i=t.geometry,s=new ne,{instanceId:n}=e,r=n!==void 0,o=t instanceof It;return o&&r&&t.getMatrixAt(n,s),[this.getVertex(e.face.a,i),this.getVertex(e.face.b,i),this.getVertex(e.face.c,i)].map(a=>(a&&(o&&r&&a.applyMatrix4(s),a.applyMatrix4(t.matrixWorld)),a))}getVertex(e,t){if(e===void 0)return null;const i=t.attributes.position;return new x(i.getX(e),i.getY(e),i.getZ(e))}}const Za=class ja{constructor(){T(this,"onDisposed",new Y),T(this,"list",new Map),T(this,"enabled",!1),T(this,"_clock"),T(this,"onInit",new Y),T(this,"update",()=>{if(!this.enabled)return;const e=this._clock.getDelta();for(const[t,i]of this.list)i.enabled&&i.isUpdateable()&&i.update(e);requestAnimationFrame(this.update)}),this._clock=new Ma,ja.setupBVH()}add(e,t){if(this.list.has(e))throw new Error("You're trying to add a component that already exists in the components instance. Use Components.get() instead.");Ht.validate(e),this.list.set(e,t)}get(e){const t=e.uuid;if(!this.list.has(t)){const i=new e(this);return this.list.has(t)||this.add(t,i),i}return this.list.get(t)}init(){this.enabled=!0,this._clock.start(),this.update(),this.onInit.trigger()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.enabled=!1,t.isDisposeable()&&t.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){Ce.prototype.computeBoundsTree=Md,Ce.prototype.disposeBoundsTree=Ld,ee.prototype.raycast=xd}};T(Za,"release","2.4.2");let Qa=Za;class jd extends ho{constructor(){super(...arguments),T(this,"meshes",new Set),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"isDisposing",!1),T(this,"enabled",!0),T(this,"uuid",Ht.create()),T(this,"name"),T(this,"_scene"),T(this,"_camera"),T(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(e){this._scene=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(e){this._camera=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(e){this._renderer=e,e&&(e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"}))}update(e){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(e),this.camera.isUpdateable()&&this.camera.update(e),this.renderer&&this.renderer.update(e),this.onAfterUpdate.trigger()))}dispose(e=!0){if(this.enabled=!1,this.isDisposing=!0,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),e){const t=this.components.get(Nt);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const i of this.meshes)t.destroy(i);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.components.get(il).list.delete(this.uuid),this.onDisposed.trigger(),this.onDisposed.reset()}}class Qi{constructor(e,t,i,s){T(this,"_component"),T(this,"name"),T(this,"uuid"),this._component=e,this.name=i,this.uuid=s??Ht.create(),t.get(Bn).list.set(this.uuid,this)}get controls(){return ir.copySchema(this._config)}set(e){for(const t in e)if(t in this){const i=t;this[i]=e[t].value}}export(e=this._config,t={}){for(const i in e){const s=e[i];if(ir.isEntry(s))if(s.type==="Color"){const{r:n,g:r,b:o}=s.value;t[i]={...s,value:{r:n,g:r,b:o}}}else if(s.type==="Vector3"){const{x:n,y:r,z:o}=s.value;t[i]={...s,value:{x:n,y:r,z:o}}}else if(s.type==="TextSet"){const n=Array.from(s.value);t[i]={...s,value:n}}else if(s.type==="Select"){const n=Array.from(s.options);t[i]={...s,options:n}}else t[i]={...s};else t[i]={},this.export(s,t[i])}return t}import(e,t={},i=!0){for(const s in e){const n=e[s];if(ir.isEntry(n))if(n.type==="Color"){const{r,g:o,b:a}=n.value;t[s]={...n,value:new _e(r,o,a)}}else if(n.type==="Vector3"){const{x:r,y:o,z:a}=n.value;t[s]={...n,value:new x(r,o,a)}}else n.type==="TextSet"?t[s]={...n,value:new Set(n.value)}:n.type==="Select"?t[s]={...n,options:new Set(n.options)}:t[s]={...n};else t[s]={},this.import(n,t[s],!1)}i&&this.set(t)}}const Ka=class qa extends de{constructor(e){super(e),T(this,"list",new gt),T(this,"enabled",!0),e.add(qa.uuid,this)}};T(Ka,"uuid","b8c764e0-6b24-4e77-9a32-35fa728ee5b4");let Bn=Ka;class Qd extends _d{constructor(e,t,i){super(e),T(this,"enabled",!0),T(this,"container"),T(this,"three"),T(this,"_canvas"),T(this,"_parameters"),T(this,"_resizeObserver",null),T(this,"onContainerUpdated",new Y),T(this,"_resizing",!1),T(this,"resize",r=>{if(this._resizing)return;this._resizing=!0,this.onContainerUpdated.trigger();const o=r?r.x:this.container.clientWidth,a=r?r.y:this.container.clientHeight;this.three.setSize(o,a),this.onResize.trigger(new Se(o,a)),this._resizing=!1}),T(this,"resizeEvent",()=>{this.resize()}),T(this,"onContextLost",r=>{r.preventDefault(),this.enabled=!1}),T(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new Sn({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0}),this.container=t,this._parameters=i,this.three=new Sn({antialias:!0,alpha:!0,...i}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const s=this.three.getContext(),{canvas:n}=s;n.addEventListener("webglcontextlost",this.onContextLost,!1),n.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.three.render(e,t),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.forceContextLoss(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new Se(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(e){const t=this.three.domElement.parentElement;if(!t)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),e&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(t),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}/*! * camera-controls * https://github.com/yomotsu/camera-controls * (c) 2017 @yomotsu * Released under the MIT License. - */const ce={LEFT:1,RIGHT:2,MIDDLE:4},Z=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),Di={NONE:0,IN:1,OUT:-1};function oi(l){return l.isPerspectiveCamera}function Kt(l){return l.isOrthographicCamera}const _i=Math.PI*2,ua=Math.PI/2,Tl=1e-5,us=Math.PI/180;function It(l,e,t){return Math.max(e,Math.min(t,l))}function Se(l,e=Tl){return Math.abs(l)0==f>c&&(f=c,t.value=(f-c)/n),f}function pa(l,e,t,i,s=1/0,n,r){i=Math.max(1e-4,i);const o=2/i,a=o*n,h=1/(1+a+.48*a*a+.235*a*a*a);let c=e.x,u=e.y,d=e.z,f=l.x-c,m=l.y-u,p=l.z-d;const I=c,E=u,C=d,v=s*i,g=v*v,S=f*f+m*m+p*p;if(S>g){const B=Math.sqrt(S);f=f/B*v,m=m/B*v,p=p/B*v}c=l.x-f,u=l.y-m,d=l.z-p;const O=(t.x+o*f)*n,A=(t.y+o*m)*n,b=(t.z+o*p)*n;t.x=(t.x-o*O)*h,t.y=(t.y-o*A)*h,t.z=(t.z-o*b)*h,r.x=c+(f+O)*h,r.y=u+(m+A)*h,r.z=d+(p+b)*h;const N=I-l.x,M=E-l.y,_=C-l.z,F=r.x-I,D=r.y-E,R=r.z-C;return N*F+M*D+_*R>0&&(r.x=I,r.y=E,r.z=C,t.x=(r.x-I)/n,t.y=(r.y-E)/n,t.z=(r.z-C)/n),r}function Ir(l,e){e.set(0,0),l.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=l.length,e.y/=l.length}function Er(l,e){return Kt(l)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class Uu{constructor(){this._listeners={}}addEventListener(e,t){const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const t=this._listeners[e.type];if(t!==void 0){e.target=this;const i=t.slice(0);for(let s=0,n=i.length;s{},this._enabled=!0,this._state=Z.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=Di.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new he.Vector3,this._focalOffsetVelocity=new he.Vector3,this._zoomVelocity={value:0},this._truckInternal=(g,S,O)=>{let A,b;if(oi(this._camera)){const N=fe.copy(this._camera.position).sub(this._target),M=this._camera.getEffectiveFOV()*us,_=N.length()*Math.tan(M*.5);A=this.truckSpeed*g*_/this._elementRect.height,b=this.truckSpeed*S*_/this._elementRect.height}else if(Kt(this._camera)){const N=this._camera;A=g*(N.right-N.left)/N.zoom/this._elementRect.width,b=S*(N.top-N.bottom)/N.zoom/this._elementRect.height}else return;this.verticalDragToForward?(O?this.setFocalOffset(this._focalOffsetEnd.x+A,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(A,0,!0),this.forward(-b,!0)):O?this.setFocalOffset(this._focalOffsetEnd.x+A,this._focalOffsetEnd.y+b,this._focalOffsetEnd.z,!0):this.truck(A,b,!0)},this._rotateInternal=(g,S)=>{const O=_i*this.azimuthRotateSpeed*g/this._elementRect.height,A=_i*this.polarRotateSpeed*S/this._elementRect.height;this.rotate(O,A,!0)},this._dollyInternal=(g,S,O)=>{const A=Math.pow(.95,-g*this.dollySpeed),b=this._sphericalEnd.radius,N=this._sphericalEnd.radius*A,M=It(N,this.minDistance,this.maxDistance),_=M-N;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(N,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(_,!0),this._dollyToNoClamp(M,!0)):this._dollyToNoClamp(M,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?N:M)-b,this._dollyControlCoord.set(S,O)),this._lastDollyDirection=Math.sign(-g)},this._zoomInternal=(g,S,O)=>{const A=Math.pow(.95,g*this.dollySpeed),b=this._zoom,N=this._zoom*A;this.zoomTo(N,!0),this.dollyToCursor&&(this._changedZoom+=N-b,this._dollyControlCoord.set(S,O))},typeof he>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new he.Quaternion().setFromUnitVectors(this._camera.up,hn),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=Z.NONE,this._target=new he.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new he.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new he.Spherical().setFromVector3(fe.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new he.Vector3,new he.Vector3,new he.Vector3,new he.Vector3],this._updateNearPlaneCorners(),this._boundary=new he.Box3(new he.Vector3(-1/0,-1/0,-1/0),new he.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new he.Vector2,this.mouseButtons={left:Z.ROTATE,middle:Z.DOLLY,right:Z.TRUCK,wheel:oi(this._camera)?Z.DOLLY:Kt(this._camera)?Z.ZOOM:Z.NONE},this.touches={one:Z.TOUCH_ROTATE,two:oi(this._camera)?Z.TOUCH_DOLLY_TRUCK:Kt(this._camera)?Z.TOUCH_ZOOM_TRUCK:Z.NONE,three:Z.TOUCH_TRUCK};const i=new he.Vector2,s=new he.Vector2,n=new he.Vector2,r=g=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const A=this._domElement.getBoundingClientRect(),b=g.clientX/A.width,N=g.clientY/A.height;if(bthis._interactiveArea.right||Nthis._interactiveArea.bottom)return}const S=g.pointerType!=="mouse"?null:(g.buttons&ce.LEFT)===ce.LEFT?ce.LEFT:(g.buttons&ce.MIDDLE)===ce.MIDDLE?ce.MIDDLE:(g.buttons&ce.RIGHT)===ce.RIGHT?ce.RIGHT:null;if(S!==null){const A=this._findPointerByMouseButton(S);A&&this._disposePointer(A)}if((g.buttons&ce.LEFT)===ce.LEFT&&this._lockedPointer)return;const O={pointerId:g.pointerId,clientX:g.clientX,clientY:g.clientY,deltaX:0,deltaY:0,mouseButton:S};this._activePointers.push(O),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",c),this._isDragging=!0,p(g)},o=g=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const A=this._domElement.getBoundingClientRect(),b=g.clientX/A.width,N=g.clientY/A.height;if(bthis._interactiveArea.right||Nthis._interactiveArea.bottom)return}const S=(g.buttons&ce.LEFT)===ce.LEFT?ce.LEFT:(g.buttons&ce.MIDDLE)===ce.MIDDLE?ce.MIDDLE:(g.buttons&ce.RIGHT)===ce.RIGHT?ce.RIGHT:null;if(S!==null){const A=this._findPointerByMouseButton(S);A&&this._disposePointer(A)}const O={pointerId:1,clientX:g.clientX,clientY:g.clientY,deltaX:0,deltaY:0,mouseButton:(g.buttons&ce.LEFT)===ce.LEFT?ce.LEFT:(g.buttons&ce.MIDDLE)===ce.LEFT?ce.MIDDLE:(g.buttons&ce.RIGHT)===ce.LEFT?ce.RIGHT:null};this._activePointers.push(O),this._domElement.ownerDocument.removeEventListener("mousemove",h),this._domElement.ownerDocument.removeEventListener("mouseup",u),this._domElement.ownerDocument.addEventListener("mousemove",h),this._domElement.ownerDocument.addEventListener("mouseup",u),this._isDragging=!0,p(g)},a=g=>{g.cancelable&&g.preventDefault();const S=g.pointerId,O=this._lockedPointer||this._findPointerById(S);if(O){if(O.clientX=g.clientX,O.clientY=g.clientY,O.deltaX=g.movementX,O.deltaY=g.movementY,this._state=0,g.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(g.buttons&ce.LEFT)===ce.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(g.buttons&ce.MIDDLE)===ce.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(g.buttons&ce.RIGHT)===ce.RIGHT&&(this._state=this._state|this.mouseButtons.right);I()}},h=g=>{const S=this._lockedPointer||this._findPointerById(1);S&&(S.clientX=g.clientX,S.clientY=g.clientY,S.deltaX=g.movementX,S.deltaY=g.movementY,this._state=0,(this._lockedPointer||(g.buttons&ce.LEFT)===ce.LEFT)&&(this._state=this._state|this.mouseButtons.left),(g.buttons&ce.MIDDLE)===ce.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(g.buttons&ce.RIGHT)===ce.RIGHT&&(this._state=this._state|this.mouseButtons.right),I())},c=g=>{const S=this._findPointerById(g.pointerId);if(!(S&&S===this._lockedPointer)){if(S&&this._disposePointer(S),g.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=Z.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=Z.NONE;E()}},u=()=>{const g=this._findPointerById(1);g&&g===this._lockedPointer||(g&&this._disposePointer(g),this._state=Z.NONE,E())};let d=-1;const f=g=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===Z.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const N=this._domElement.getBoundingClientRect(),M=g.clientX/N.width,_=g.clientY/N.height;if(Mthis._interactiveArea.right||_this._interactiveArea.bottom)return}if(g.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===Z.ROTATE||this.mouseButtons.wheel===Z.TRUCK){const N=performance.now();d-N<1e3&&this._getClientRect(this._elementRect),d=N}const S=zu?-1:-3,O=g.deltaMode===1?g.deltaY/S:g.deltaY/(S*10),A=this.dollyToCursor?(g.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,b=this.dollyToCursor?(g.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case Z.ROTATE:{this._rotateInternal(g.deltaX,g.deltaY),this._isUserControllingRotate=!0;break}case Z.TRUCK:{this._truckInternal(g.deltaX,g.deltaY,!1),this._isUserControllingTruck=!0;break}case Z.OFFSET:{this._truckInternal(g.deltaX,g.deltaY,!0),this._isUserControllingOffset=!0;break}case Z.DOLLY:{this._dollyInternal(-O,A,b),this._isUserControllingDolly=!0;break}case Z.ZOOM:{this._zoomInternal(-O,A,b),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=g=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===Xe.ACTION.NONE){const S=g instanceof PointerEvent?g.pointerId:0,O=this._findPointerById(S);O&&this._disposePointer(O),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.ownerDocument.removeEventListener("mousemove",h),this._domElement.ownerDocument.removeEventListener("mouseup",u);return}g.preventDefault()}},p=g=>{if(this._enabled){if(Ir(this._activePointers,qe),this._getClientRect(this._elementRect),i.copy(qe),s.copy(qe),this._activePointers.length>=2){const S=qe.x-this._activePointers[1].clientX,O=qe.y-this._activePointers[1].clientY,A=Math.sqrt(S*S+O*O);n.set(0,A);const b=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,N=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;s.set(b,N)}if(this._state=0,!g)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in g&&g.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(g.buttons&ce.LEFT)===ce.LEFT&&(this._state=this._state|this.mouseButtons.left),(g.buttons&ce.MIDDLE)===ce.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(g.buttons&ce.RIGHT)===ce.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&Z.ROTATE)===Z.ROTATE||(this._state&Z.TOUCH_ROTATE)===Z.TOUCH_ROTATE||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&Z.TRUCK)===Z.TRUCK||(this._state&Z.TOUCH_TRUCK)===Z.TOUCH_TRUCK||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&Z.DOLLY)===Z.DOLLY||(this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&Z.ZOOM)===Z.ZOOM||(this._state&Z.TOUCH_ZOOM)===Z.TOUCH_ZOOM||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&Z.OFFSET)===Z.OFFSET||(this._state&Z.TOUCH_OFFSET)===Z.TOUCH_OFFSET||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})}},I=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,Ir(this._activePointers,qe);const g=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,S=g?-g.deltaX:s.x-qe.x,O=g?-g.deltaY:s.y-qe.y;if(s.copy(qe),((this._state&Z.ROTATE)===Z.ROTATE||(this._state&Z.TOUCH_ROTATE)===Z.TOUCH_ROTATE||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(S,O),this._isUserControllingRotate=!0),(this._state&Z.DOLLY)===Z.DOLLY||(this._state&Z.ZOOM)===Z.ZOOM){const A=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,b=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0,N=this.dollyDragInverted?-1:1;(this._state&Z.DOLLY)===Z.DOLLY?(this._dollyInternal(N*O*ln,A,b),this._isUserControllingDolly=!0):(this._zoomInternal(N*O*ln,A,b),this._isUserControllingZoom=!0)}if((this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_ZOOM)===Z.TOUCH_ZOOM||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE){const A=qe.x-this._activePointers[1].clientX,b=qe.y-this._activePointers[1].clientY,N=Math.sqrt(A*A+b*b),M=n.y-N;n.set(0,N);const _=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,F=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET?(this._dollyInternal(M*ln,_,F),this._isUserControllingDolly=!0):(this._zoomInternal(M*ln,_,F),this._isUserControllingZoom=!0)}((this._state&Z.TRUCK)===Z.TRUCK||(this._state&Z.TOUCH_TRUCK)===Z.TOUCH_TRUCK||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(S,O,!1),this._isUserControllingTruck=!0),((this._state&Z.OFFSET)===Z.OFFSET||(this._state&Z.TOUCH_OFFSET)===Z.TOUCH_OFFSET||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(S,O,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},E=()=>{Ir(this._activePointers,qe),s.copy(qe),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",h),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.ownerDocument.removeEventListener("mouseup",u),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",C),this._domElement.ownerDocument.addEventListener("pointerlockerror",v),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",c),p())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",C),this._domElement.ownerDocument.removeEventListener("pointerlockerror",v))};const C=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},v=()=>{this.unlockPointer()};this._addAllEventListeners=g=>{this._domElement=g,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",r),ku&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",c),this._domElement.addEventListener("wheel",f,{passive:!1}),this._domElement.addEventListener("contextmenu",m)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",r),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",c),this._domElement.removeEventListener("wheel",f,{passive:!1}),this._domElement.removeEventListener("contextmenu",m),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",h),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.ownerDocument.removeEventListener("mouseup",u),this._domElement.ownerDocument.removeEventListener("pointerlockchange",C),this._domElement.ownerDocument.removeEventListener("pointerlockerror",v))},this.cancel=()=>{this._state!==Z.NONE&&(this._state=Z.NONE,this._activePointers.length=0,E())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=It(e.width,0,1),this._interactiveArea.height=It(e.height,0,1),this._interactiveArea.x=It(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=It(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,i=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,i)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,i=!1){this._isUserControllingRotate=!1;const s=It(e,this.minAzimuthAngle,this.maxAzimuthAngle),n=It(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,i||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const r=!i||ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(r)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Di.NONE,this._changedDolly=0,this._dollyToNoClamp(It(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const i=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const n=this._collisionTest(),r=ge(n,this._spherical.radius);if(!(i>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,n)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const s=!t||ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(s)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(ms).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const i=!t||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=It(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const i=!t||ge(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(i)}pan(e,t,i=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,i)}truck(e,t,i=!1){this._camera.updateMatrix(),Rt.setFromMatrixColumn(this._camera.matrix,0),vt.setFromMatrixColumn(this._camera.matrix,1),Rt.multiplyScalar(e),vt.multiplyScalar(-t);const s=fe.copy(Rt).add(vt),n=Ee.copy(this._targetEnd).add(s);return this.moveTo(n.x,n.y,n.z,i)}forward(e,t=!1){fe.setFromMatrixColumn(this._camera.matrix,0),fe.crossVectors(this._camera.up,fe),fe.multiplyScalar(e);const i=Ee.copy(this._targetEnd).add(fe);return this.moveTo(i.x,i.y,i.z,t)}elevate(e,t=!1){return fe.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+fe.x,this._targetEnd.y+fe.y,this._targetEnd.z+fe.z,t)}moveTo(e,t,i,s=!1){this._isUserControllingTruck=!1;const n=fe.set(e,t,i).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const r=!s||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}lookInDirectionOf(e,t,i,s=!1){const n=fe.set(e,t,i).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(n.x,n.y,n.z,s)}fitToBox(e,t,{cover:i=!1,paddingLeft:s=0,paddingRight:n=0,paddingBottom:r=0,paddingTop:o=0}={}){const a=[],h=e.isBox3?Bi.copy(e):Bi.setFromObject(e);h.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const c=fa(this._sphericalEnd.theta,ua),u=fa(this._sphericalEnd.phi,ua);a.push(this.rotateTo(c,u,t));const d=fe.setFromSpherical(this._sphericalEnd).normalize(),f=Ca.setFromUnitVectors(d,gr),m=ge(Math.abs(d.y),1);m&&f.multiply(Tr.setFromAxisAngle(hn,c)),f.multiply(this._yAxisUpSpaceInverse);const p=ga.makeEmpty();Ee.copy(h.min).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(h.min).setX(h.max.x).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(h.min).setY(h.max.y).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(h.max).setZ(h.min.z).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(h.min).setZ(h.max.z).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(h.max).setY(h.min.y).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(h.max).setX(h.min.x).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(h.max).applyQuaternion(f),p.expandByPoint(Ee),p.min.x-=s,p.min.y-=r,p.max.x+=n,p.max.y+=o,f.setFromUnitVectors(gr,d),m&&f.premultiply(Tr.invert()),f.premultiply(this._yAxisUpSpace);const I=p.getSize(fe),E=p.getCenter(Ee).applyQuaternion(f);if(oi(this._camera)){const C=this.getDistanceToFitBox(I.x,I.y,I.z,i);a.push(this.moveTo(E.x,E.y,E.z,t)),a.push(this.dollyTo(C,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(Kt(this._camera)){const C=this._camera,v=C.right-C.left,g=C.top-C.bottom,S=i?Math.max(v/I.x,g/I.y):Math.min(v/I.x,g/I.y);a.push(this.moveTo(E.x,E.y,E.z,t)),a.push(this.zoomTo(S,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(e,t){const i=[],s=e instanceof he.Sphere?Cr.copy(e):Xe.createBoundingSphere(e,Cr);if(i.push(this.moveTo(s.center.x,s.center.y,s.center.z,t)),oi(this._camera)){const n=this.getDistanceToFitSphere(s.radius);i.push(this.dollyTo(n,t))}else if(Kt(this._camera)){const n=this._camera.right-this._camera.left,r=this._camera.top-this._camera.bottom,o=2*s.radius,a=Math.min(n/o,r/o);i.push(this.zoomTo(a,t))}return i.push(this.setFocalOffset(0,0,0,t)),Promise.all(i)}setLookAt(e,t,i,s,n,r,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Di.NONE,this._changedDolly=0;const a=Ee.set(s,n,r),h=fe.set(e,t,i);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(h.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const c=!o||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold)&&ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(c)}lerpLookAt(e,t,i,s,n,r,o,a,h,c,u,d,f,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Di.NONE,this._changedDolly=0;const p=fe.set(s,n,r),I=Ee.set(e,t,i);at.setFromVector3(I.sub(p).applyQuaternion(this._yAxisUpSpace));const E=Ui.set(c,u,d),C=Ee.set(o,a,h);Is.setFromVector3(C.sub(E).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(E,f));const v=Is.theta-at.theta,g=Is.phi-at.phi,S=Is.radius-at.radius;this._sphericalEnd.set(at.radius+S*f,at.phi+g*f,at.theta+v*f),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const O=!m||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold)&&ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(O)}setPosition(e,t,i,s=!1){return this.setLookAt(e,t,i,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(e,t,i,s=!1){const n=this.getPosition(fe),r=this.setLookAt(n.x,n.y,n.z,e,t,i,s);return this._sphericalEnd.phi=It(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),r}setFocalOffset(e,t,i,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,i),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const n=!s||ge(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&ge(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&ge(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(e,t,i){this._camera.updateMatrixWorld(),Rt.setFromMatrixColumn(this._camera.matrixWorldInverse,0),vt.setFromMatrixColumn(this._camera.matrixWorldInverse,1),ai.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=fe.set(e,t,i),n=s.distanceTo(this._camera.position),r=s.sub(this._camera.position);Rt.multiplyScalar(r.x),vt.multiplyScalar(r.y),ai.multiplyScalar(r.z),fe.copy(Rt).add(vt).add(ai),fe.z=fe.z+n,this.dollyTo(n,!1),this.setFocalOffset(-fe.x,fe.y,-fe.z,!1),this.moveTo(e,t,i,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,i,s){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new he.Vector4,typeof e=="number"?this._viewport.set(e,t,i,s):this._viewport.copy(e)}getDistanceToFitBox(e,t,i,s=!1){if(Er(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=e/t,r=this._camera.getEffectiveFOV()*us,o=this._camera.aspect;return((s?n>o:nt.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,i){const s=t.lengthSq();if(s===0)return e;const n=Ee.copy(t).add(e),r=this._boundary.clampPoint(n,Ui).sub(n),o=r.lengthSq();if(o===0)return e.add(t);if(o===s)return e;if(i===0)return e.add(t).add(r);{const a=1+i*o/t.dot(r);return e.add(Ee.copy(t).multiplyScalar(a)).add(r.multiplyScalar(1-i))}}_updateNearPlaneCorners(){if(oi(this._camera)){const e=this._camera,t=e.near,i=e.getEffectiveFOV()*us,s=Math.tan(i*.5)*t,n=s*e.aspect;this._nearPlaneCorners[0].set(-n,-s,0),this._nearPlaneCorners[1].set(n,-s,0),this._nearPlaneCorners[2].set(n,s,0),this._nearPlaneCorners[3].set(-n,s,0)}else if(Kt(this._camera)){const e=this._camera,t=1/e.zoom,i=e.left*t,s=e.right*t,n=e.top*t,r=e.bottom*t;this._nearPlaneCorners[0].set(i,n,0),this._nearPlaneCorners[1].set(s,n,0),this._nearPlaneCorners[2].set(s,r,0),this._nearPlaneCorners[3].set(i,r,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||Er(this._camera,"_collisionTest"))return e;const t=this._getTargetDirection(ms);Rr.lookAt(ma,t,this._camera.up);for(let i=0;i<4;i++){const s=Ee.copy(this._nearPlaneCorners[i]);s.applyMatrix4(Rr);const n=Ui.addVectors(this._target,s);cn.set(n,t),cn.far=this._spherical.radius+1;const r=cn.intersectObjects(this.colliderMeshes);r.length!==0&&r[0].distance{const i=()=>{this.removeEventListener("rest",i),t()};this.addEventListener("rest",i)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new he.Sphere){const i=t,s=i.center;Bi.makeEmpty(),e.traverseVisible(r=>{r.isMesh&&Bi.expandByObject(r)}),Bi.getCenter(s);let n=0;return e.traverseVisible(r=>{if(!r.isMesh)return;const o=r,a=o.geometry.clone();a.applyMatrix4(o.matrixWorld);const h=a.attributes.position;for(let c=0,u=h.count;c{var t;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof si){this.onAspectUpdated.trigger();return}if((t=this.currentWorld.renderer)!=null&&t.isResizeable()){const i=this.currentWorld.renderer.getSize();this.three.aspect=i.width/i.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}}),this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:t,world:i})=>{if(t==="added"){const s=this.newCameraControls();this._allControls.set(i.uuid,s)}if(t==="removed"){const s=this._allControls.get(i.uuid);s&&(s.dispose(),this._allControls.delete(i.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const e=this._allControls.get(this.currentWorld.uuid);if(!e)throw new Error("Controls not found!");return e}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(e){this.currentWorld!==null&&(this.controls.enabled=e)}dispose(){this.setupEvents(!1),this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[e,t]of this._allControls)t.dispose()}update(e){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(e),this.onAfterUpdate.trigger(this))}setupCamera(){const e=window.innerWidth/window.innerHeight,t=new Qa(60,e,1,1e3);return t.position.set(50,50,50),t.lookAt(new L(0,0,0)),t}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");Xe.install({THREE:Ps.getSubsetOfThree()});const{domElement:e}=this.currentWorld.renderer.three,t=new Xe(this.three,e);return t.smoothTime=.2,t.dollyToCursor=!0,t.infinityDolly=!0,t.minDistance=6,t}setupEvents(e){e?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:gc,Vector2:ve,Vector3:L,Vector4:qi,Quaternion:lt,Matrix4:ne,Spherical:Cc,Box3:we,Sphere:Ri,Raycaster:kn,MathUtils:gi}}}const vl=class yl extends de{constructor(e){super(e),T(this,"onAfterUpdate",new H),T(this,"onBeforeUpdate",new H),T(this,"onDisposed",new H),T(this,"list",new Ct),T(this,"enabled",!0),e.add(yl.uuid,this)}create(){const e=new Du(this.components),t=e.uuid;if(this.list.has(t))throw new Error("There is already a world with this name!");return this.list.set(t,e),e}delete(e){if(!this.list.has(e.uuid))throw new Error("The provided world is not found in the list!");this.list.delete(e.uuid),e.dispose()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(e){if(this.enabled)for(const[t,i]of this.list)i.update(e)}};T(vl,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let Sl=vl;function Vu(l,e,t,i){return new Promise((s,n)=>{function r(){const o=l.clientWaitSync(e,t,0);if(o===l.WAIT_FAILED){n();return}if(o===l.TIMEOUT_EXPIRED){setTimeout(r,i);return}s()}r()})}async function Yu(l,e,t,i,s,n,r){const o=l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE,0);l.flush(),await Vu(l,o,0,10),l.deleteSync(o),l.bindBuffer(e,t),l.getBufferSubData(e,i,s,n,r),l.bindBuffer(e,null)}async function Gu(l,e,t,i,s,n,r,o){const a=l.createBuffer();return l.bindBuffer(l.PIXEL_PACK_BUFFER,a),l.bufferData(l.PIXEL_PACK_BUFFER,o.byteLength,l.STREAM_READ),l.readPixels(e,t,i,s,n,r,0),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),await Yu(l,l.PIXEL_PACK_BUFFER,a,0,o),l.deleteBuffer(a),o}class Hu extends $i{constructor(){super(...arguments),T(this,"_config",{enabled:{value:!0,type:"Boolean"},width:{type:"Number",interpolable:!0,value:512,min:32,max:1024},height:{type:"Number",interpolable:!0,value:512,min:32,max:1024},autoUpdate:{value:!0,type:"Boolean"},renderDebugFrame:{value:!1,type:"Boolean"},updateInterval:{type:"Number",interpolable:!0,value:1,min:0,max:1},threshold:{type:"Number",interpolable:!0,value:100,min:1,max:512}}),T(this,"_interval",null)}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get width(){return this._config.width.value}set width(e){this.setWidthHeight(e,this.height)}get height(){return this._config.height.value}set height(e){this.setWidthHeight(this.width,e)}get autoUpdate(){return this._config.autoUpdate.value}set autoUpdate(e){this.setAutoAndInterval(e,this.updateInterval)}get updateInterval(){return this._config.updateInterval.value}set updateInterval(e){this.setAutoAndInterval(this.autoUpdate,e)}get renderDebugFrame(){return this._config.renderDebugFrame.value}set renderDebugFrame(e){this._config.renderDebugFrame.value=e}get threshold(){return this._config.threshold.value}set threshold(e){this._config.threshold.value=e}setWidthHeight(e,t){if(e<=0||t<=0)throw new Error("The width and height of the culler renderer must be more than 0!");this._config.width.value=e,this._config.height.value=t,this.resetRenderTarget()}setAutoAndInterval(e,t){if(t<=0)throw new Error("The updateInterval of the culler renderer must be more than 0!");this._config.autoUpdate.value=e,this._config.updateInterval.value=t,this.resetInterval(e)}resetRenderTarget(){this._component.renderTarget.dispose(),this._component.renderTarget=new Nt(this.width,this.height),this._component.bufferSize=this.width*this.height*4,this._component.buffer=new Uint8Array(this._component.bufferSize)}resetInterval(e){this._interval!==null&&window.clearInterval(this._interval),e&&(this._interval=window.setInterval(async()=>{this._component.preventUpdate||await this._component.updateVisibility()},this.updateInterval))}}class wl{constructor(e,t){if(T(this,"onSetup",new H),T(this,"onDisposed",new H),T(this,"onViewUpdated",new Bt),T(this,"enabled",!0),T(this,"needsUpdate",!1),T(this,"components"),T(this,"renderTarget",new Nt),T(this,"bufferSize",1),T(this,"buffer",new Uint8Array),T(this,"preventUpdate",!1),T(this,"config"),T(this,"isSetup",!1),T(this,"world"),T(this,"renderer"),T(this,"_defaultConfig",{enabled:!0,height:512,width:512,updateInterval:1e3,autoUpdate:!0,renderDebugFrame:!1,threshold:100}),T(this,"worker"),T(this,"scene",new vi),T(this,"_availableColor",1),T(this,"_isWorkerBusy",!1),T(this,"updateVisibility",async n=>{if(!this.enabled||!this.needsUpdate&&!n||this._isWorkerBusy)return;this._isWorkerBusy=!0;const r=this.world.camera.three;r.updateMatrix();const{width:o,height:a}=this.config;this.renderer.setSize(o,a),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,r);const h=this.renderer.getContext();await Gu(h,0,0,o,a,h.RGBA,h.UNSIGNED_BYTE,this.buffer),this.renderer.setRenderTarget(null),this.config.renderDebugFrame&&this.renderer.render(this.scene,r),this.worker.postMessage({buffer:this.buffer}),this.needsUpdate=!1}),!t.renderer)throw new Error("The given world must have a renderer!");this.components=e,this.config=new Hu(this,this.components,"Culler renderer"),this.world=t,this.renderer=new bn,this.renderer.clippingPlanes=t.renderer.clippingPlanes;const i=` + */const he={LEFT:1,RIGHT:2,MIDDLE:4},Z=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),xi={NONE:0,IN:1,OUT:-1};function ni(c){return c.isPerspectiveCamera}function Zt(c){return c.isOrthographicCamera}const Mi=Math.PI*2,Qo=Math.PI/2,Ja=1e-5,ls=Math.PI/180;function pt(c,e,t){return Math.max(e,Math.min(t,c))}function ve(c,e=Ja){return Math.abs(c)0==f>h&&(f=h,t.value=(f-h)/n),f}function qo(c,e,t,i,s=1/0,n,r){i=Math.max(1e-4,i);const o=2/i,a=o*n,l=1/(1+a+.48*a*a+.235*a*a*a);let h=e.x,d=e.y,u=e.z,f=c.x-h,m=c.y-d,p=c.z-u;const E=h,I=d,g=u,w=s*i,C=w*w,v=f*f+m*m+p*p;if(v>C){const U=Math.sqrt(v);f=f/U*w,m=m/U*w,p=p/U*w}h=c.x-f,d=c.y-m,u=c.z-p;const O=(t.x+o*f)*n,A=(t.y+o*m)*n,b=(t.z+o*p)*n;t.x=(t.x-o*O)*l,t.y=(t.y-o*A)*l,t.z=(t.z-o*b)*l,r.x=h+(f+O)*l,r.y=d+(m+A)*l,r.z=u+(p+b)*l;const N=E-c.x,D=I-c.y,_=g-c.z,F=r.x-E,L=r.y-I,R=r.z-g;return N*F+D*L+_*R>0&&(r.x=E,r.y=I,r.z=g,t.x=(r.x-E)/n,t.y=(r.y-I)/n,t.z=(r.z-g)/n),r}function rr(c,e){e.set(0,0),c.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=c.length,e.y/=c.length}function or(c,e){return Zt(c)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class Kd{constructor(){this._listeners={}}addEventListener(e,t){const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const t=this._listeners[e.type];if(t!==void 0){e.target=this;const i=t.slice(0);for(let s=0,n=i.length;s{},this._enabled=!0,this._state=Z.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=xi.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ce.Vector3,this._focalOffsetVelocity=new ce.Vector3,this._zoomVelocity={value:0},this._truckInternal=(C,v,O)=>{let A,b;if(ni(this._camera)){const N=fe.copy(this._camera.position).sub(this._target),D=this._camera.getEffectiveFOV()*ls,_=N.length()*Math.tan(D*.5);A=this.truckSpeed*C*_/this._elementRect.height,b=this.truckSpeed*v*_/this._elementRect.height}else if(Zt(this._camera)){const N=this._camera;A=C*(N.right-N.left)/N.zoom/this._elementRect.width,b=v*(N.top-N.bottom)/N.zoom/this._elementRect.height}else return;this.verticalDragToForward?(O?this.setFocalOffset(this._focalOffsetEnd.x+A,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(A,0,!0),this.forward(-b,!0)):O?this.setFocalOffset(this._focalOffsetEnd.x+A,this._focalOffsetEnd.y+b,this._focalOffsetEnd.z,!0):this.truck(A,b,!0)},this._rotateInternal=(C,v)=>{const O=Mi*this.azimuthRotateSpeed*C/this._elementRect.height,A=Mi*this.polarRotateSpeed*v/this._elementRect.height;this.rotate(O,A,!0)},this._dollyInternal=(C,v,O)=>{const A=Math.pow(.95,-C*this.dollySpeed),b=this._sphericalEnd.radius,N=this._sphericalEnd.radius*A,D=pt(N,this.minDistance,this.maxDistance),_=D-N;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(N,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(_,!0),this._dollyToNoClamp(D,!0)):this._dollyToNoClamp(D,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?N:D)-b,this._dollyControlCoord.set(v,O)),this._lastDollyDirection=Math.sign(-C)},this._zoomInternal=(C,v,O)=>{const A=Math.pow(.95,C*this.dollySpeed),b=this._zoom,N=this._zoom*A;this.zoomTo(N,!0),this.dollyToCursor&&(this._changedZoom+=N-b,this._dollyControlCoord.set(v,O))},typeof ce>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new ce.Quaternion().setFromUnitVectors(this._camera.up,Js),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=Z.NONE,this._target=new ce.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ce.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ce.Spherical().setFromVector3(fe.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ce.Vector3,new ce.Vector3,new ce.Vector3,new ce.Vector3],this._updateNearPlaneCorners(),this._boundary=new ce.Box3(new ce.Vector3(-1/0,-1/0,-1/0),new ce.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ce.Vector2,this.mouseButtons={left:Z.ROTATE,middle:Z.DOLLY,right:Z.TRUCK,wheel:ni(this._camera)?Z.DOLLY:Zt(this._camera)?Z.ZOOM:Z.NONE},this.touches={one:Z.TOUCH_ROTATE,two:ni(this._camera)?Z.TOUCH_DOLLY_TRUCK:Zt(this._camera)?Z.TOUCH_ZOOM_TRUCK:Z.NONE,three:Z.TOUCH_TRUCK};const i=new ce.Vector2,s=new ce.Vector2,n=new ce.Vector2,r=C=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const A=this._domElement.getBoundingClientRect(),b=C.clientX/A.width,N=C.clientY/A.height;if(bthis._interactiveArea.right||Nthis._interactiveArea.bottom)return}const v=C.pointerType!=="mouse"?null:(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.MIDDLE?he.MIDDLE:(C.buttons&he.RIGHT)===he.RIGHT?he.RIGHT:null;if(v!==null){const A=this._findPointerByMouseButton(v);A&&this._disposePointer(A)}if((C.buttons&he.LEFT)===he.LEFT&&this._lockedPointer)return;const O={pointerId:C.pointerId,clientX:C.clientX,clientY:C.clientY,deltaX:0,deltaY:0,mouseButton:v};this._activePointers.push(O),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),this._isDragging=!0,p(C)},o=C=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const A=this._domElement.getBoundingClientRect(),b=C.clientX/A.width,N=C.clientY/A.height;if(bthis._interactiveArea.right||Nthis._interactiveArea.bottom)return}const v=(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.MIDDLE?he.MIDDLE:(C.buttons&he.RIGHT)===he.RIGHT?he.RIGHT:null;if(v!==null){const A=this._findPointerByMouseButton(v);A&&this._disposePointer(A)}const O={pointerId:1,clientX:C.clientX,clientY:C.clientY,deltaX:0,deltaY:0,mouseButton:(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.LEFT?he.MIDDLE:(C.buttons&he.RIGHT)===he.LEFT?he.RIGHT:null};this._activePointers.push(O),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",d),this._isDragging=!0,p(C)},a=C=>{C.cancelable&&C.preventDefault();const v=C.pointerId,O=this._lockedPointer||this._findPointerById(v);if(O){if(O.clientX=C.clientX,O.clientY=C.clientY,O.deltaX=C.movementX,O.deltaY=C.movementY,this._state=0,C.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(C.buttons&he.LEFT)===he.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right);E()}},l=C=>{const v=this._lockedPointer||this._findPointerById(1);v&&(v.clientX=C.clientX,v.clientY=C.clientY,v.deltaX=C.movementX,v.deltaY=C.movementY,this._state=0,(this._lockedPointer||(C.buttons&he.LEFT)===he.LEFT)&&(this._state=this._state|this.mouseButtons.left),(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right),E())},h=C=>{const v=this._findPointerById(C.pointerId);if(!(v&&v===this._lockedPointer)){if(v&&this._disposePointer(v),C.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=Z.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=Z.NONE;I()}},d=()=>{const C=this._findPointerById(1);C&&C===this._lockedPointer||(C&&this._disposePointer(C),this._state=Z.NONE,I())};let u=-1;const f=C=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===Z.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const N=this._domElement.getBoundingClientRect(),D=C.clientX/N.width,_=C.clientY/N.height;if(Dthis._interactiveArea.right||_this._interactiveArea.bottom)return}if(C.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===Z.ROTATE||this.mouseButtons.wheel===Z.TRUCK){const N=performance.now();u-N<1e3&&this._getClientRect(this._elementRect),u=N}const v=Jd?-1:-3,O=C.deltaMode===1?C.deltaY/v:C.deltaY/(v*10),A=this.dollyToCursor?(C.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,b=this.dollyToCursor?(C.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case Z.ROTATE:{this._rotateInternal(C.deltaX,C.deltaY),this._isUserControllingRotate=!0;break}case Z.TRUCK:{this._truckInternal(C.deltaX,C.deltaY,!1),this._isUserControllingTruck=!0;break}case Z.OFFSET:{this._truckInternal(C.deltaX,C.deltaY,!0),this._isUserControllingOffset=!0;break}case Z.DOLLY:{this._dollyInternal(-O,A,b),this._isUserControllingDolly=!0;break}case Z.ZOOM:{this._zoomInternal(-O,A,b),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=C=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===We.ACTION.NONE){const v=C instanceof PointerEvent?C.pointerId:0,O=this._findPointerById(v);O&&this._disposePointer(O),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",d);return}C.preventDefault()}},p=C=>{if(this._enabled){if(rr(this._activePointers,Ke),this._getClientRect(this._elementRect),i.copy(Ke),s.copy(Ke),this._activePointers.length>=2){const v=Ke.x-this._activePointers[1].clientX,O=Ke.y-this._activePointers[1].clientY,A=Math.sqrt(v*v+O*O);n.set(0,A);const b=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,N=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;s.set(b,N)}if(this._state=0,!C)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in C&&C.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(C.buttons&he.LEFT)===he.LEFT&&(this._state=this._state|this.mouseButtons.left),(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&Z.ROTATE)===Z.ROTATE||(this._state&Z.TOUCH_ROTATE)===Z.TOUCH_ROTATE||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&Z.TRUCK)===Z.TRUCK||(this._state&Z.TOUCH_TRUCK)===Z.TOUCH_TRUCK||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&Z.DOLLY)===Z.DOLLY||(this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&Z.ZOOM)===Z.ZOOM||(this._state&Z.TOUCH_ZOOM)===Z.TOUCH_ZOOM||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&Z.OFFSET)===Z.OFFSET||(this._state&Z.TOUCH_OFFSET)===Z.TOUCH_OFFSET||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})}},E=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,rr(this._activePointers,Ke);const C=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,v=C?-C.deltaX:s.x-Ke.x,O=C?-C.deltaY:s.y-Ke.y;if(s.copy(Ke),((this._state&Z.ROTATE)===Z.ROTATE||(this._state&Z.TOUCH_ROTATE)===Z.TOUCH_ROTATE||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(v,O),this._isUserControllingRotate=!0),(this._state&Z.DOLLY)===Z.DOLLY||(this._state&Z.ZOOM)===Z.ZOOM){const A=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,b=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0,N=this.dollyDragInverted?-1:1;(this._state&Z.DOLLY)===Z.DOLLY?(this._dollyInternal(N*O*qs,A,b),this._isUserControllingDolly=!0):(this._zoomInternal(N*O*qs,A,b),this._isUserControllingZoom=!0)}if((this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_ZOOM)===Z.TOUCH_ZOOM||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE){const A=Ke.x-this._activePointers[1].clientX,b=Ke.y-this._activePointers[1].clientY,N=Math.sqrt(A*A+b*b),D=n.y-N;n.set(0,N);const _=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,F=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET?(this._dollyInternal(D*qs,_,F),this._isUserControllingDolly=!0):(this._zoomInternal(D*qs,_,F),this._isUserControllingZoom=!0)}((this._state&Z.TRUCK)===Z.TRUCK||(this._state&Z.TOUCH_TRUCK)===Z.TOUCH_TRUCK||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(v,O,!1),this._isUserControllingTruck=!0),((this._state&Z.OFFSET)===Z.OFFSET||(this._state&Z.TOUCH_OFFSET)===Z.TOUCH_OFFSET||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(v,O,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},I=()=>{rr(this._activePointers,Ke),s.copy(Ke),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",g),this._domElement.ownerDocument.addEventListener("pointerlockerror",w),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),p())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",w))};const g=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},w=()=>{this.unlockPointer()};this._addAllEventListeners=C=>{this._domElement=C,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",r),$d&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",h),this._domElement.addEventListener("wheel",f,{passive:!1}),this._domElement.addEventListener("contextmenu",m)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",r),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",h),this._domElement.removeEventListener("wheel",f,{passive:!1}),this._domElement.removeEventListener("contextmenu",m),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",w))},this.cancel=()=>{this._state!==Z.NONE&&(this._state=Z.NONE,this._activePointers.length=0,I())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=pt(e.width,0,1),this._interactiveArea.height=pt(e.height,0,1),this._interactiveArea.x=pt(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=pt(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,i=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,i)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,i=!1){this._isUserControllingRotate=!1;const s=pt(e,this.minAzimuthAngle,this.maxAzimuthAngle),n=pt(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,i||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const r=!i||ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(r)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=xi.NONE,this._changedDolly=0,this._dollyToNoClamp(pt(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const i=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const n=this._collisionTest(),r=ge(n,this._spherical.radius);if(!(i>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,n)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const s=!t||ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(s)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(ds).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const i=!t||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=pt(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const i=!t||ge(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(i)}pan(e,t,i=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,i)}truck(e,t,i=!1){this._camera.updateMatrix(),Tt.setFromMatrixColumn(this._camera.matrix,0),Rt.setFromMatrixColumn(this._camera.matrix,1),Tt.multiplyScalar(e),Rt.multiplyScalar(-t);const s=fe.copy(Tt).add(Rt),n=Ee.copy(this._targetEnd).add(s);return this.moveTo(n.x,n.y,n.z,i)}forward(e,t=!1){fe.setFromMatrixColumn(this._camera.matrix,0),fe.crossVectors(this._camera.up,fe),fe.multiplyScalar(e);const i=Ee.copy(this._targetEnd).add(fe);return this.moveTo(i.x,i.y,i.z,t)}elevate(e,t=!1){return fe.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+fe.x,this._targetEnd.y+fe.y,this._targetEnd.z+fe.z,t)}moveTo(e,t,i,s=!1){this._isUserControllingTruck=!1;const n=fe.set(e,t,i).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const r=!s||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}lookInDirectionOf(e,t,i,s=!1){const n=fe.set(e,t,i).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(n.x,n.y,n.z,s)}fitToBox(e,t,{cover:i=!1,paddingLeft:s=0,paddingRight:n=0,paddingBottom:r=0,paddingTop:o=0}={}){const a=[],l=e.isBox3?Di.copy(e):Di.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const h=Ko(this._sphericalEnd.theta,Qo),d=Ko(this._sphericalEnd.phi,Qo);a.push(this.rotateTo(h,d,t));const u=fe.setFromSpherical(this._sphericalEnd).normalize(),f=ia.setFromUnitVectors(u,ar),m=ge(Math.abs(u.y),1);m&&f.multiply(cr.setFromAxisAngle(Js,h)),f.multiply(this._yAxisUpSpaceInverse);const p=ta.makeEmpty();Ee.copy(l.min).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setX(l.max.x).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setY(l.max.y).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setZ(l.min.z).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setZ(l.max.z).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setY(l.min.y).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setX(l.min.x).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).applyQuaternion(f),p.expandByPoint(Ee),p.min.x-=s,p.min.y-=r,p.max.x+=n,p.max.y+=o,f.setFromUnitVectors(ar,u),m&&f.premultiply(cr.invert()),f.premultiply(this._yAxisUpSpace);const E=p.getSize(fe),I=p.getCenter(Ee).applyQuaternion(f);if(ni(this._camera)){const g=this.getDistanceToFitBox(E.x,E.y,E.z,i);a.push(this.moveTo(I.x,I.y,I.z,t)),a.push(this.dollyTo(g,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(Zt(this._camera)){const g=this._camera,w=g.right-g.left,C=g.top-g.bottom,v=i?Math.max(w/E.x,C/E.y):Math.min(w/E.x,C/E.y);a.push(this.moveTo(I.x,I.y,I.z,t)),a.push(this.zoomTo(v,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(e,t){const i=[],s=e instanceof ce.Sphere?lr.copy(e):We.createBoundingSphere(e,lr);if(i.push(this.moveTo(s.center.x,s.center.y,s.center.z,t)),ni(this._camera)){const n=this.getDistanceToFitSphere(s.radius);i.push(this.dollyTo(n,t))}else if(Zt(this._camera)){const n=this._camera.right-this._camera.left,r=this._camera.top-this._camera.bottom,o=2*s.radius,a=Math.min(n/o,r/o);i.push(this.zoomTo(a,t))}return i.push(this.setFocalOffset(0,0,0,t)),Promise.all(i)}setLookAt(e,t,i,s,n,r,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=xi.NONE,this._changedDolly=0;const a=Ee.set(s,n,r),l=fe.set(e,t,i);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const h=!o||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold)&&ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerpLookAt(e,t,i,s,n,r,o,a,l,h,d,u,f,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=xi.NONE,this._changedDolly=0;const p=fe.set(s,n,r),E=Ee.set(e,t,i);ot.setFromVector3(E.sub(p).applyQuaternion(this._yAxisUpSpace));const I=Li.set(h,d,u),g=Ee.set(o,a,l);us.setFromVector3(g.sub(I).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(I,f));const w=us.theta-ot.theta,C=us.phi-ot.phi,v=us.radius-ot.radius;this._sphericalEnd.set(ot.radius+v*f,ot.phi+C*f,ot.theta+w*f),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const O=!m||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold)&&ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(O)}setPosition(e,t,i,s=!1){return this.setLookAt(e,t,i,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(e,t,i,s=!1){const n=this.getPosition(fe),r=this.setLookAt(n.x,n.y,n.z,e,t,i,s);return this._sphericalEnd.phi=pt(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),r}setFocalOffset(e,t,i,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,i),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const n=!s||ge(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&ge(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&ge(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(e,t,i){this._camera.updateMatrixWorld(),Tt.setFromMatrixColumn(this._camera.matrixWorldInverse,0),Rt.setFromMatrixColumn(this._camera.matrixWorldInverse,1),ri.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=fe.set(e,t,i),n=s.distanceTo(this._camera.position),r=s.sub(this._camera.position);Tt.multiplyScalar(r.x),Rt.multiplyScalar(r.y),ri.multiplyScalar(r.z),fe.copy(Tt).add(Rt).add(ri),fe.z=fe.z+n,this.dollyTo(n,!1),this.setFocalOffset(-fe.x,fe.y,-fe.z,!1),this.moveTo(e,t,i,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,i,s){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new ce.Vector4,typeof e=="number"?this._viewport.set(e,t,i,s):this._viewport.copy(e)}getDistanceToFitBox(e,t,i,s=!1){if(or(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=e/t,r=this._camera.getEffectiveFOV()*ls,o=this._camera.aspect;return((s?n>o:nt.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,i){const s=t.lengthSq();if(s===0)return e;const n=Ee.copy(t).add(e),r=this._boundary.clampPoint(n,Li).sub(n),o=r.lengthSq();if(o===0)return e.add(t);if(o===s)return e;if(i===0)return e.add(t).add(r);{const a=1+i*o/t.dot(r);return e.add(Ee.copy(t).multiplyScalar(a)).add(r.multiplyScalar(1-i))}}_updateNearPlaneCorners(){if(ni(this._camera)){const e=this._camera,t=e.near,i=e.getEffectiveFOV()*ls,s=Math.tan(i*.5)*t,n=s*e.aspect;this._nearPlaneCorners[0].set(-n,-s,0),this._nearPlaneCorners[1].set(n,-s,0),this._nearPlaneCorners[2].set(n,s,0),this._nearPlaneCorners[3].set(-n,s,0)}else if(Zt(this._camera)){const e=this._camera,t=1/e.zoom,i=e.left*t,s=e.right*t,n=e.top*t,r=e.bottom*t;this._nearPlaneCorners[0].set(i,n,0),this._nearPlaneCorners[1].set(s,n,0),this._nearPlaneCorners[2].set(s,r,0),this._nearPlaneCorners[3].set(i,r,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||or(this._camera,"_collisionTest"))return e;const t=this._getTargetDirection(ds);hr.lookAt(Jo,t,this._camera.up);for(let i=0;i<4;i++){const s=Ee.copy(this._nearPlaneCorners[i]);s.applyMatrix4(hr);const n=Li.addVectors(this._target,s);$s.set(n,t),$s.far=this._spherical.radius+1;const r=$s.intersectObjects(this.colliderMeshes);r.length!==0&&r[0].distance{const i=()=>{this.removeEventListener("rest",i),t()};this.addEventListener("rest",i)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new ce.Sphere){const i=t,s=i.center;Di.makeEmpty(),e.traverseVisible(r=>{r.isMesh&&Di.expandByObject(r)}),Di.getCenter(s);let n=0;return e.traverseVisible(r=>{if(!r.isMesh)return;const o=r,a=o.geometry.clone();a.applyMatrix4(o.matrixWorld);const l=a.attributes.position;for(let h=0,d=l.count;h{var t;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof ti){this.onAspectUpdated.trigger();return}if((t=this.currentWorld.renderer)!=null&&t.isResizeable()){const i=this.currentWorld.renderer.getSize();this.three.aspect=i.width/i.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}}),this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:t,world:i})=>{if(t==="added"){const s=this.newCameraControls();this._allControls.set(i.uuid,s)}if(t==="removed"){const s=this._allControls.get(i.uuid);s&&(s.dispose(),this._allControls.delete(i.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const e=this._allControls.get(this.currentWorld.uuid);if(!e)throw new Error("Controls not found!");return e}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(e){this.currentWorld!==null&&(this.controls.enabled=e)}dispose(){this.setupEvents(!1),this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[e,t]of this._allControls)t.dispose()}update(e){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(e),this.onAfterUpdate.trigger(this))}setupCamera(){const e=window.innerWidth/window.innerHeight,t=new xa(60,e,1,1e3);return t.position.set(50,50,50),t.lookAt(new x(0,0,0)),t}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");We.install({THREE:ws.getSubsetOfThree()});const{domElement:e}=this.currentWorld.renderer.three,t=new We(this.three,e);return t.smoothTime=.2,t.dollyToCursor=!0,t.infinityDolly=!0,t.minDistance=6,t}setupEvents(e){e?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:Qc,Vector2:Se,Vector3:x,Vector4:Zi,Quaternion:at,Matrix4:ne,Spherical:Kc,Box3:ye,Sphere:gi,Raycaster:bn,MathUtils:Ii}}}const el=class tl extends de{constructor(e){super(e),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"list",new gt),T(this,"enabled",!0),e.add(tl.uuid,this)}create(){const e=new jd(this.components),t=e.uuid;if(this.list.has(t))throw new Error("There is already a world with this name!");return this.list.set(t,e),e}delete(e){if(!this.list.has(e.uuid))throw new Error("The provided world is not found in the list!");this.list.delete(e.uuid),e.dispose()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(e){if(this.enabled)for(const[t,i]of this.list)i.update(e)}};T(el,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let il=el;function eu(c,e,t,i){return new Promise((s,n)=>{function r(){const o=c.clientWaitSync(e,t,0);if(o===c.WAIT_FAILED){n();return}if(o===c.TIMEOUT_EXPIRED){setTimeout(r,i);return}s()}r()})}async function tu(c,e,t,i,s,n,r){const o=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);c.flush(),await eu(c,o,0,10),c.deleteSync(o),c.bindBuffer(e,t),c.getBufferSubData(e,i,s,n,r),c.bindBuffer(e,null)}async function iu(c,e,t,i,s,n,r,o){const a=c.createBuffer();return c.bindBuffer(c.PIXEL_PACK_BUFFER,a),c.bufferData(c.PIXEL_PACK_BUFFER,o.byteLength,c.STREAM_READ),c.readPixels(e,t,i,s,n,r,0),c.bindBuffer(c.PIXEL_PACK_BUFFER,null),await tu(c,c.PIXEL_PACK_BUFFER,a,0,o),c.deleteBuffer(a),o}class su extends Qi{constructor(){super(...arguments),T(this,"_config",{enabled:{value:!0,type:"Boolean"},width:{type:"Number",interpolable:!0,value:512,min:32,max:1024},height:{type:"Number",interpolable:!0,value:512,min:32,max:1024},autoUpdate:{value:!0,type:"Boolean"},renderDebugFrame:{value:!1,type:"Boolean"},updateInterval:{type:"Number",interpolable:!0,value:1,min:0,max:1},threshold:{type:"Number",interpolable:!0,value:100,min:1,max:512}}),T(this,"_interval",null)}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get width(){return this._config.width.value}set width(e){this.setWidthHeight(e,this.height)}get height(){return this._config.height.value}set height(e){this.setWidthHeight(this.width,e)}get autoUpdate(){return this._config.autoUpdate.value}set autoUpdate(e){this.setAutoAndInterval(e,this.updateInterval)}get updateInterval(){return this._config.updateInterval.value}set updateInterval(e){this.setAutoAndInterval(this.autoUpdate,e)}get renderDebugFrame(){return this._config.renderDebugFrame.value}set renderDebugFrame(e){this._config.renderDebugFrame.value=e}get threshold(){return this._config.threshold.value}set threshold(e){this._config.threshold.value=e}setWidthHeight(e,t){if(e<=0||t<=0)throw new Error("The width and height of the culler renderer must be more than 0!");this._config.width.value=e,this._config.height.value=t,this.resetRenderTarget()}setAutoAndInterval(e,t){if(t<=0)throw new Error("The updateInterval of the culler renderer must be more than 0!");this._config.autoUpdate.value=e,this._config.updateInterval.value=t,this.resetInterval(e)}resetRenderTarget(){this._component.renderTarget.dispose(),this._component.renderTarget=new Ot(this.width,this.height),this._component.bufferSize=this.width*this.height*4,this._component.buffer=new Uint8Array(this._component.bufferSize)}resetInterval(e){this._interval!==null&&window.clearInterval(this._interval),e&&(this._interval=window.setInterval(async()=>{this._component.preventUpdate||await this._component.updateVisibility()},this.updateInterval))}}class sl{constructor(e,t){if(T(this,"onSetup",new Y),T(this,"onDisposed",new Y),T(this,"onViewUpdated",new Ut),T(this,"enabled",!0),T(this,"needsUpdate",!1),T(this,"components"),T(this,"renderTarget",new Ot),T(this,"bufferSize",1),T(this,"buffer",new Uint8Array),T(this,"preventUpdate",!1),T(this,"config"),T(this,"isSetup",!1),T(this,"world"),T(this,"renderer"),T(this,"_defaultConfig",{enabled:!0,height:512,width:512,updateInterval:1e3,autoUpdate:!0,renderDebugFrame:!1,threshold:100}),T(this,"worker"),T(this,"scene",new Ci),T(this,"_availableColor",1),T(this,"_isWorkerBusy",!1),T(this,"updateVisibility",async n=>{if(!this.enabled||!this.needsUpdate&&!n||this._isWorkerBusy)return;this._isWorkerBusy=!0;const r=this.world.camera.three;r.updateMatrix();const{width:o,height:a}=this.config;this.renderer.setSize(o,a),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,r);const l=this.renderer.getContext();await iu(l,0,0,o,a,l.RGBA,l.UNSIGNED_BYTE,this.buffer),this.renderer.setRenderTarget(null),this.config.renderDebugFrame&&this.renderer.render(this.scene,r),this.worker.postMessage({buffer:this.buffer}),this.needsUpdate=!1}),!t.renderer)throw new Error("The given world must have a renderer!");this.components=e,this.config=new su(this,this.components,"Culler renderer"),this.world=t,this.renderer=new Sn,this.renderer.clippingPlanes=t.renderer.clippingPlanes;const i=` addEventListener("message", (event) => { const { buffer } = event.data; const colors = new Map(); @@ -24,7 +24,7 @@ import{t as Je,U as no,u as vn,v as si,e as Ce,d as et,S as Ri,V as L,h as ve,w } postMessage({ colors }); }); - `,s=new Blob([i],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(s)),this.setup()}dispose(){this.enabled=!1,this.config.autoUpdate=!1,this.components.get(Kn).list.delete(this.config.uuid);for(const e of this.scene.children)e.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.renderTarget.dispose(),this.buffer=null,this.onDisposed.reset()}setup(e){const t={...this._defaultConfig,...e},{width:i,height:s}=t;this.config.setWidthHeight(i,s);const{updateInterval:n,autoUpdate:r}=t;this.config.setAutoAndInterval(r,n),this.config.threshold=t.threshold,this.isSetup=!0,this.onSetup.trigger()}getAvailableColor(){let e=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(e%256n)),e/=256n;while(e);for(;t.length!==3;)t.unshift(0);const[i,s,n]=t,r=`${i}-${s}-${n}`;return{r:i,g:s,b:n,code:r}}increaseColor(){if(this._availableColor===256*256*256){console.warn("Color can't be increased over 256 x 256 x 256!");return}this._availableColor++}decreaseColor(){if(this._availableColor===1){console.warn("Color can't be decreased under 0!");return}this._availableColor--}}class Wu extends wl{constructor(e,t){super(e,t),T(this,"onViewUpdated",new H),T(this,"colorMeshes",new Map),T(this,"_colorCodeMeshMap",new Map),T(this,"_meshIDColorCodeMap",new Map),T(this,"_currentVisibleMeshes",new Set),T(this,"_recentlyHiddenMeshes",new Set),T(this,"_transparentMat",new nt({transparent:!0,opacity:0})),T(this,"handleWorkerMessage",async i=>{if(this.preventUpdate)return;const s=i.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[n,r]of s){if(r{for(const n of i)n.visible=!0;for(const n of s)n.visible=!1})}get threshold(){return this.config.threshold}set threshold(e){this.config.threshold=e}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const e=this.components.get(Pt);for(const t in this.colorMeshes){const i=this.colorMeshes.get(t);i&&e.destroy(i,!0)}this.colorMeshes.clear()}add(e){if(!this.enabled)return;if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=e instanceof ft,{geometry:i,material:s}=e,{colorMaterial:n,code:r}=this.getAvailableMaterial();let o;if(Array.isArray(s)){let c=!0;const u=[];for(const d of s)ca.isTransparent(d)?u.push(this._transparentMat):(c=!1,u.push(n));if(c){n.dispose(),this.preventUpdate=!1;return}o=u}else if(ca.isTransparent(s)){n.dispose(),this.preventUpdate=!1;return}else o=n;this._colorCodeMeshMap.set(r,e),this._meshIDColorCodeMap.set(e.uuid,r);const a=t?e.count:1,h=new ft(i,o,a);t?h.instanceMatrix=e.instanceMatrix:h.setMatrixAt(0,new ne),e.visible=!1,e.updateWorldMatrix(!0,!1),h.applyMatrix4(e.matrixWorld),h.updateMatrix(),this.scene.add(h),this.colorMeshes.set(e.uuid,h),this.increaseColor(),this.preventUpdate=!1}remove(e){if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=this.components.get(Pt);this._currentVisibleMeshes.delete(e),this._recentlyHiddenMeshes.delete(e);const i=this.colorMeshes.get(e.uuid),s=this._meshIDColorCodeMap.get(e.uuid);if(!i||!s){this.preventUpdate=!1;return}this._colorCodeMeshMap.delete(s),this._meshIDColorCodeMap.delete(e.uuid),this.colorMeshes.delete(e.uuid),i.geometry=void 0,i.material=[],t.destroy(i,!0),this._recentlyHiddenMeshes.delete(e),this._currentVisibleMeshes.delete(e),this.preventUpdate=!1}updateInstanced(e){for(const t of e){const i=this.colorMeshes.get(t.uuid);i&&(i.count=t.count)}}getAvailableMaterial(){const{r:e,g:t,b:i,code:s}=this.getAvailableColor(),n=Ut.enabled;Ut.enabled=!1;const r=new Ue(`rgb(${e}, ${t}, ${i})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const o=this.world.renderer.clippingPlanes,a=new nt({color:r,clippingPlanes:o,side:Ms});return Ut.enabled=n,{colorMaterial:a,code:s}}}const Fl=class kr extends de{constructor(e){super(e),T(this,"onDisposed",new H),T(this,"_enabled",!0),T(this,"list",new Map),e.add(kr.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const[t,i]of this.list)i.enabled=e}create(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new Wu(this.components,e);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(kr.uuid),this.onDisposed.reset();for(const[e,t]of this.list)t.dispose();this.list.clear()}updateInstanced(e){for(const[,t]of this.list)t.updateInstanced(e)}};T(Fl,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let Xu=Fl;class Zu{constructor(e){T(this,"_event"),T(this,"_position",new ve),T(this,"onDisposed",new H),T(this,"updateMouseInfo",t=>{this._event=t}),this.dom=e,this.setupEvents(!0)}get position(){if(this._event){const e=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(e,this._event),this._position.y=this.getPositionY(e,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(e,t){return-((this.getDataObject(t).clientY-e.top)/(e.bottom-e.top))*2+1}getPositionX(e,t){return(this.getDataObject(t).clientX-e.left)/(e.right-e.left)*2-1}getDataObject(e){return e instanceof MouseEvent?e:e.touches[0]}setupEvents(e){e?(this.dom.addEventListener("pointermove",this.updateMouseInfo),this.dom.addEventListener("touchstart",this.updateMouseInfo)):(this.dom.removeEventListener("pointermove",this.updateMouseInfo),this.dom.removeEventListener("touchstart",this.updateMouseInfo))}}class ju{constructor(e,t){T(this,"enabled",!0),T(this,"components"),T(this,"onDisposed",new H),T(this,"mouse"),T(this,"three",new kn),T(this,"world");const i=t.renderer;if(!i)throw new Error("A renderer is needed for the raycaster to work!");this.world=t,this.mouse=new Zu(i.three.domElement),this.components=e}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(e=Array.from(this.world.meshes),t=this.mouse.position){if(!this.world)throw new Error("A world is needed to cast rays!");const i=this.world.camera.three;return this.three.setFromCamera(t,i),this.intersect(e)}castRayFromVector(e,t,i=Array.from(this.world.meshes)){return this.three.set(e,t),this.intersect(i)}intersect(e=Array.from(this.world.meshes)){const t=this.three.intersectObjects(e),i=this.filterClippingPlanes(t);return i.length>0?i[0]:null}filterClippingPlanes(e){if(!this.world.renderer)throw new Error("Renderer not found!");const t=this.world.renderer.three;if(!t.clippingPlanes)return e;const i=t.clippingPlanes;return e.length<=0||!i||(i==null?void 0:i.length)<=0?e:e.filter(s=>i.every(n=>n.distanceToPoint(s.point)>0))}}const Al=class Ol extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Map),T(this,"onDisposed",new H),e.add(Ol.uuid,this)}get(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new ju(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}};T(Al,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let pt=Al;class Ku extends $i{constructor(){super(...arguments),T(this,"_config",{visible:{value:!0,type:"Boolean"},color:{value:new Ue,type:"Color"},primarySize:{type:"Number",interpolable:!0,value:1,min:0,max:1e3},secondarySize:{type:"Number",interpolable:!0,value:10,min:0,max:1e3},distance:{type:"Number",interpolable:!0,value:500,min:0,max:500}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.uniforms.uColor.value=e,this._component.material.uniformsNeedUpdate=!0}get primarySize(){return this._config.primarySize.value}set primarySize(e){this._config.primarySize.value=e,this._component.material.uniforms.uSize1.value=e,this._component.material.uniformsNeedUpdate=!0}get secondarySize(){return this._config.secondarySize.value}set secondarySize(e){this._config.secondarySize.value=e,this._component.material.uniforms.uSize2.value=e,this._component.material.uniformsNeedUpdate=!0}get distance(){return this._config.distance.value}set distance(e){this._config.distance.value=e,this._component.material.uniforms.uDistance.value=e,this._component.material.uniformsNeedUpdate=!0}}class Qu{constructor(e,t){T(this,"onDisposed",new H),T(this,"onSetup",new H),T(this,"isSetup",!1),T(this,"world"),T(this,"components"),T(this,"config"),T(this,"_defaultConfig",{visible:!0,color:new Ue(12303291),primarySize:1,secondarySize:10,distance:500}),T(this,"three"),T(this,"_fade",3),T(this,"updateZoom",()=>{this.world.camera instanceof Ps&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)}),this.world=t;const{color:i,primarySize:s,secondarySize:n,distance:r}=this._defaultConfig;this.components=e,this.config=new Ku(this,this.components,"Grid");const o=new Vn(2,2,1,1),a=new We({side:Ms,uniforms:{uSize1:{value:s},uSize2:{value:n},uColor:{value:i},uDistance:{value:r},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` + `,s=new Blob([i],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(s)),this.setup()}dispose(){this.enabled=!1,this.config.autoUpdate=!1,this.components.get(Bn).list.delete(this.config.uuid);for(const e of this.scene.children)e.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.renderTarget.dispose(),this.buffer=null,this.onDisposed.reset()}setup(e){const t={...this._defaultConfig,...e},{width:i,height:s}=t;this.config.setWidthHeight(i,s);const{updateInterval:n,autoUpdate:r}=t;this.config.setAutoAndInterval(r,n),this.config.threshold=t.threshold,this.isSetup=!0,this.onSetup.trigger()}getAvailableColor(){let e=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(e%256n)),e/=256n;while(e);for(;t.length!==3;)t.unshift(0);const[i,s,n]=t,r=`${i}-${s}-${n}`;return{r:i,g:s,b:n,code:r}}increaseColor(){if(this._availableColor===256*256*256){console.warn("Color can't be increased over 256 x 256 x 256!");return}this._availableColor++}decreaseColor(){if(this._availableColor===1){console.warn("Color can't be decreased under 0!");return}this._availableColor--}}class nu extends sl{constructor(e,t){super(e,t),T(this,"onViewUpdated",new Y),T(this,"colorMeshes",new Map),T(this,"_colorCodeMeshMap",new Map),T(this,"_meshIDColorCodeMap",new Map),T(this,"_currentVisibleMeshes",new Set),T(this,"_recentlyHiddenMeshes",new Set),T(this,"_transparentMat",new st({transparent:!0,opacity:0})),T(this,"handleWorkerMessage",async i=>{if(this.preventUpdate)return;const s=i.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[n,r]of s){if(r{for(const n of i)n.visible=!0;for(const n of s)n.visible=!1})}get threshold(){return this.config.threshold}set threshold(e){this.config.threshold=e}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const e=this.components.get(Nt);for(const t in this.colorMeshes){const i=this.colorMeshes.get(t);i&&e.destroy(i,!0)}this.colorMeshes.clear()}add(e){if(!this.enabled)return;if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=e instanceof It,{geometry:i,material:s}=e,{colorMaterial:n,code:r}=this.getAvailableMaterial();let o;if(Array.isArray(s)){let h=!0;const d=[];for(const u of s)jo.isTransparent(u)?d.push(this._transparentMat):(h=!1,d.push(n));if(h){n.dispose(),this.preventUpdate=!1;return}o=d}else if(jo.isTransparent(s)){n.dispose(),this.preventUpdate=!1;return}else o=n;this._colorCodeMeshMap.set(r,e),this._meshIDColorCodeMap.set(e.uuid,r);const a=t?e.count:1,l=new It(i,o,a);t?l.instanceMatrix=e.instanceMatrix:l.setMatrixAt(0,new ne),e.visible=!1,e.updateWorldMatrix(!0,!1),l.applyMatrix4(e.matrixWorld),l.updateMatrix(),this.scene.add(l),this.colorMeshes.set(e.uuid,l),this.increaseColor(),this.preventUpdate=!1}remove(e){if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=this.components.get(Nt);this._currentVisibleMeshes.delete(e),this._recentlyHiddenMeshes.delete(e);const i=this.colorMeshes.get(e.uuid),s=this._meshIDColorCodeMap.get(e.uuid);if(!i||!s){this.preventUpdate=!1;return}this._colorCodeMeshMap.delete(s),this._meshIDColorCodeMap.delete(e.uuid),this.colorMeshes.delete(e.uuid),i.geometry=void 0,i.material=[],t.destroy(i,!0),this._recentlyHiddenMeshes.delete(e),this._currentVisibleMeshes.delete(e),this.preventUpdate=!1}updateInstanced(e){for(const t of e){const i=this.colorMeshes.get(t.uuid);i&&(i.count=t.count)}}getAvailableMaterial(){const{r:e,g:t,b:i,code:s}=this.getAvailableColor(),n=_t.enabled;_t.enabled=!1;const r=new _e(`rgb(${e}, ${t}, ${i})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const o=this.world.renderer.clippingPlanes,a=new st({color:r,clippingPlanes:o,side:As});return _t.enabled=n,{colorMaterial:a,code:s}}}const nl=class Fr extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"_enabled",!0),T(this,"list",new Map),e.add(Fr.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const[t,i]of this.list)i.enabled=e}create(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new nu(this.components,e);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(Fr.uuid),this.onDisposed.reset();for(const[e,t]of this.list)t.dispose();this.list.clear()}updateInstanced(e){for(const[,t]of this.list)t.updateInstanced(e)}};T(nl,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let ru=nl;class ou{constructor(e){T(this,"_event"),T(this,"_position",new Se),T(this,"onDisposed",new Y),T(this,"updateMouseInfo",t=>{this._event=t}),this.dom=e,this.setupEvents(!0)}get position(){if(this._event){const e=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(e,this._event),this._position.y=this.getPositionY(e,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(e,t){return-((this.getDataObject(t).clientY-e.top)/(e.bottom-e.top))*2+1}getPositionX(e,t){return(this.getDataObject(t).clientX-e.left)/(e.right-e.left)*2-1}getDataObject(e){return e instanceof MouseEvent?e:e.touches[0]}setupEvents(e){e?(this.dom.addEventListener("pointermove",this.updateMouseInfo),this.dom.addEventListener("touchstart",this.updateMouseInfo)):(this.dom.removeEventListener("pointermove",this.updateMouseInfo),this.dom.removeEventListener("touchstart",this.updateMouseInfo))}}class au{constructor(e,t){T(this,"enabled",!0),T(this,"components"),T(this,"onDisposed",new Y),T(this,"mouse"),T(this,"three",new bn),T(this,"world");const i=t.renderer;if(!i)throw new Error("A renderer is needed for the raycaster to work!");this.world=t,this.mouse=new ou(i.three.domElement),this.components=e}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(e=Array.from(this.world.meshes),t=this.mouse.position){if(!this.world)throw new Error("A world is needed to cast rays!");const i=this.world.camera.three;return this.three.setFromCamera(t,i),this.intersect(e)}castRayFromVector(e,t,i=Array.from(this.world.meshes)){return this.three.set(e,t),this.intersect(i)}intersect(e=Array.from(this.world.meshes)){const t=this.three.intersectObjects(e),i=this.filterClippingPlanes(t);return i.length>0?i[0]:null}filterClippingPlanes(e){if(!this.world.renderer)throw new Error("Renderer not found!");const t=this.world.renderer.three;if(!t.clippingPlanes)return e;const i=t.clippingPlanes;return e.length<=0||!i||(i==null?void 0:i.length)<=0?e:e.filter(s=>i.every(n=>n.distanceToPoint(s.point)>0))}}const rl=class ol extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Map),T(this,"onDisposed",new Y),e.add(ol.uuid,this)}get(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new au(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}};T(rl,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let ut=rl;class lu extends Qi{constructor(){super(...arguments),T(this,"_config",{visible:{value:!0,type:"Boolean"},color:{value:new _e,type:"Color"},primarySize:{type:"Number",interpolable:!0,value:1,min:0,max:1e3},secondarySize:{type:"Number",interpolable:!0,value:10,min:0,max:1e3},distance:{type:"Number",interpolable:!0,value:500,min:0,max:500}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.uniforms.uColor.value=e,this._component.material.uniformsNeedUpdate=!0}get primarySize(){return this._config.primarySize.value}set primarySize(e){this._config.primarySize.value=e,this._component.material.uniforms.uSize1.value=e,this._component.material.uniformsNeedUpdate=!0}get secondarySize(){return this._config.secondarySize.value}set secondarySize(e){this._config.secondarySize.value=e,this._component.material.uniforms.uSize2.value=e,this._component.material.uniformsNeedUpdate=!0}get distance(){return this._config.distance.value}set distance(e){this._config.distance.value=e,this._component.material.uniforms.uDistance.value=e,this._component.material.uniformsNeedUpdate=!0}}class cu{constructor(e,t){T(this,"onDisposed",new Y),T(this,"onSetup",new Y),T(this,"isSetup",!1),T(this,"world"),T(this,"components"),T(this,"config"),T(this,"_defaultConfig",{visible:!0,color:new _e(12303291),primarySize:1,secondarySize:10,distance:500}),T(this,"three"),T(this,"_fade",3),T(this,"updateZoom",()=>{this.world.camera instanceof ws&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)}),this.world=t;const{color:i,primarySize:s,secondarySize:n,distance:r}=this._defaultConfig;this.components=e,this.config=new lu(this,this.components,"Grid");const o=new xn(2,2,1,1),a=new He({side:As,uniforms:{uSize1:{value:s},uSize2:{value:n},uColor:{value:i},uDistance:{value:r},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` varying vec3 worldPosition; @@ -85,7 +85,7 @@ import{t as Je,U as no,u as vn,v as si,e as Ce,d as et,S as Ri,V as L,h as ve,w } - `,extensions:{derivatives:!0}});this.three=new ee(o,a),this.three.frustumCulled=!1,t.scene.three.add(this.three),this.setupEvents(!0)}get visible(){return this.three.visible}set visible(e){e?this.world.scene.three.add(this.three):this.three.removeFromParent()}get material(){return this.three.material}get fade(){return this._fade===3}set fade(e){this._fade=e?3:0,this.material.uniforms.uFade.value=this._fade}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.color=t.color,this.config.primarySize=t.primarySize,this.config.secondarySize=t.secondarySize,this.config.distance=t.distance,this.isSetup=!0,this.onSetup.trigger()}dispose(){this.setupEvents(!1),this.components.get(Kn).list.delete(this.config.uuid),this.components.get(Pt).destroy(this.three),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(e){if(this.world.isDisposing||!(this.world.camera instanceof Ps))return;const t=this.world.camera.controls;e?t.addEventListener("update",this.updateZoom):t.removeEventListener("update",this.updateZoom)}}const qu=class Nl extends de{constructor(e){super(e),T(this,"list",new Map),T(this,"onDisposed",new H),T(this,"enabled",!0),e.add(Nl.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a grid!");const t=new Qu(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}};T(qu,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");const li=new kn,He=new L,jt=new L,Oe=new lt,Ta={X:new L(1,0,0),Y:new L(0,1,0),Z:new L(0,0,1)},vr={type:"change"},Ra={type:"mouseDown"},va={type:"mouseUp",mode:null},ya={type:"objectChange"};class Ju extends Zi{constructor(e,t){super(),t===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),t=document),this.isTransformControls=!0,this.visible=!1,this.domElement=t,this.domElement.style.touchAction="none";const i=new rf;this._gizmo=i,this.add(i);const s=new of;this._plane=s,this.add(s);const n=this;function r(C,v){let g=v;Object.defineProperty(n,C,{get:function(){return g!==void 0?g:v},set:function(S){g!==S&&(g=S,s[C]=S,i[C]=S,n.dispatchEvent({type:C+"-changed",value:S}),n.dispatchEvent(vr))}}),n[C]=v,s[C]=v,i[C]=v}r("camera",e),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0);const o=new L,a=new L,h=new lt,c=new lt,u=new L,d=new lt,f=new L,m=new L,p=new L,I=0,E=new L;r("worldPosition",o),r("worldPositionStart",a),r("worldQuaternion",h),r("worldQuaternionStart",c),r("cameraPosition",u),r("cameraQuaternion",d),r("pointStart",f),r("pointEnd",m),r("rotationAxis",p),r("rotationAngle",I),r("eye",E),this._offset=new L,this._startNorm=new L,this._endNorm=new L,this._cameraScale=new L,this._parentPosition=new L,this._parentQuaternion=new lt,this._parentQuaternionInv=new lt,this._parentScale=new L,this._worldScaleStart=new L,this._worldQuaternionInv=new lt,this._worldScale=new L,this._positionStart=new L,this._quaternionStart=new lt,this._scaleStart=new L,this._getPointer=$u.bind(this),this._onPointerDown=tf.bind(this),this._onPointerHover=ef.bind(this),this._onPointerMove=sf.bind(this),this._onPointerUp=nf.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(e){if(this.object===void 0||this.dragging===!0)return;li.setFromCamera(e,this.camera);const t=yr(this._gizmo.picker[this.mode],li);t?this.axis=t.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){li.setFromCamera(e,this.camera);const t=yr(this._plane,li,!0);t&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)),this.dragging=!0,Ra.mode=this.mode,this.dispatchEvent(Ra)}}pointerMove(e){const t=this.axis,i=this.mode,s=this.object;let n=this.space;if(i==="scale"?n="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(n="world"),s===void 0||t===null||this.dragging===!1||e.button!==-1)return;li.setFromCamera(e,this.camera);const r=yr(this._plane,li,!0);if(r){if(this.pointEnd.copy(r.point).sub(this.worldPositionStart),i==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="local"&&t!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),t.indexOf("X")===-1&&(this._offset.x=0),t.indexOf("Y")===-1&&(this._offset.y=0),t.indexOf("Z")===-1&&(this._offset.z=0),n==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(n==="local"&&(s.position.applyQuaternion(Oe.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),n==="world"&&(s.parent&&s.position.add(He.setFromMatrixPosition(s.parent.matrixWorld)),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(He.setFromMatrixPosition(s.parent.matrixWorld))));else if(i==="scale"){if(t.search("XYZ")!==-1){let o=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(o*=-1),jt.set(o,o,o)}else He.copy(this.pointStart),jt.copy(this.pointEnd),He.applyQuaternion(this._worldQuaternionInv),jt.applyQuaternion(this._worldQuaternionInv),jt.divide(He),t.search("X")===-1&&(jt.x=1),t.search("Y")===-1&&(jt.y=1),t.search("Z")===-1&&(jt.z=1);s.scale.copy(this._scaleStart).multiply(jt),this.scaleSnap&&(t.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(i==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const o=20/this.worldPosition.distanceTo(He.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(He.copy(this.rotationAxis).cross(this.eye))*o):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(Ta[t]),He.copy(Ta[t]),n==="local"&&He.applyQuaternion(this.worldQuaternion),He.cross(this.eye),He.length()===0?a=!0:this.rotationAngle=this._offset.dot(He.normalize())*o),(t==="E"||a)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),n==="local"&&t!=="E"&&t!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(Oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(Oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(vr),this.dispatchEvent(ya)}}pointerUp(e){e.button===0&&(this.dragging&&this.axis!==null&&(va.mode=this.mode,this.dispatchEvent(va)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}attach(e){return this.object=e,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(vr),this.dispatchEvent(ya),this.pointStart.copy(this.pointEnd))}getRaycaster(){return li}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}}function $u(l){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:l.button};{const e=this.domElement.getBoundingClientRect();return{x:(l.clientX-e.left)/e.width*2-1,y:-(l.clientY-e.top)/e.height*2+1,button:l.button}}}function ef(l){if(this.enabled)switch(l.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(l));break}}function tf(l){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(l.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(l)),this.pointerDown(this._getPointer(l)))}function sf(l){this.enabled&&this.pointerMove(this._getPointer(l))}function nf(l){this.enabled&&(this.domElement.releasePointerCapture(l.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(l)))}function yr(l,e,t){const i=e.intersectObject(l,!0);for(let s=0;s.9&&(n.visible=!1)),this.axis==="Y"&&(Oe.setFromEuler(dn.set(0,0,Math.PI/2)),n.quaternion.copy(t).multiply(Oe),Math.abs(Re.copy(ci).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(Oe.setFromEuler(dn.set(0,Math.PI/2,0)),n.quaternion.copy(t).multiply(Oe),Math.abs(Re.copy(ys).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(Oe.setFromEuler(dn.set(0,Math.PI/2,0)),Re.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(wa.lookAt(Sa,Re,ci)),n.quaternion.multiply(Oe),n.visible=this.dragging),this.axis==="E"&&(n.visible=!1)):n.name==="START"?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):n.name==="END"?(n.position.copy(this.worldPosition),n.visible=this.dragging):n.name==="DELTA"?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),He.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),He.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(He),n.visible=this.dragging):(n.quaternion.copy(t),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=this.axis.search(n.name)!==-1));continue}n.quaternion.copy(t),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(Re.copy(vs).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(Re.copy(ci).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(Re.copy(ys).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(Re.copy(ys).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(Re.copy(vs).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(Re.copy(ci).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(un.copy(t),Re.copy(this.eye).applyQuaternion(Oe.copy(t).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(wa.lookAt(this.eye,Sa,ci)),n.name==="X"&&(Oe.setFromAxisAngle(vs,Math.atan2(-Re.y,Re.z)),Oe.multiplyQuaternions(un,Oe),n.quaternion.copy(Oe)),n.name==="Y"&&(Oe.setFromAxisAngle(ci,Math.atan2(Re.x,Re.z)),Oe.multiplyQuaternions(un,Oe),n.quaternion.copy(Oe)),n.name==="Z"&&(Oe.setFromAxisAngle(ys,Math.atan2(Re.y,Re.x)),Oe.multiplyQuaternions(un,Oe),n.quaternion.copy(Oe))),n.visible=n.visible&&(n.name.indexOf("X")===-1||this.showX),n.visible=n.visible&&(n.name.indexOf("Y")===-1||this.showY),n.visible=n.visible&&(n.name.indexOf("Z")===-1||this.showZ),n.visible=n.visible&&(n.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis||this.axis.split("").some(function(o){return n.name===o}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}super.updateMatrixWorld(e)}}class of extends ee{constructor(){super(new Vn(1e5,1e5,2,2),new nt({visible:!1,wireframe:!0,side:Ms,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),fn.copy(vs).applyQuaternion(t==="local"?this.worldQuaternion:An),Es.copy(ci).applyQuaternion(t==="local"?this.worldQuaternion:An),gs.copy(ys).applyQuaternion(t==="local"?this.worldQuaternion:An),Re.copy(Es),this.mode){case"translate":case"scale":switch(this.axis){case"X":Re.copy(this.eye).cross(fn),yt.copy(fn).cross(Re);break;case"Y":Re.copy(this.eye).cross(Es),yt.copy(Es).cross(Re);break;case"Z":Re.copy(this.eye).cross(gs),yt.copy(gs).cross(Re);break;case"XY":yt.copy(gs);break;case"YZ":yt.copy(fn);break;case"XZ":Re.copy(gs),yt.copy(Es);break;case"XYZ":case"E":yt.set(0,0,0);break}break;case"rotate":default:yt.set(0,0,0)}yt.length()===0?this.quaternion.copy(this.cameraQuaternion):(Fa.lookAt(He.set(0,0,0),yt,Re),this.quaternion.setFromRotationMatrix(Fa)),super.updateMatrixWorld(e)}}class Qn{constructor(e,t,i,s,n,r=5,o=!0){if(T(this,"onDraggingStarted",new H),T(this,"onDraggingEnded",new H),T(this,"onDisposed",new H),T(this,"normal"),T(this,"origin"),T(this,"three",new Xt),T(this,"components"),T(this,"world"),T(this,"type","default"),T(this,"_helper"),T(this,"_visible",!0),T(this,"_enabled",!0),T(this,"_controlsActive",!1),T(this,"_arrowBoundBox",new ee),T(this,"_planeMesh"),T(this,"_controls"),T(this,"_hiddenMaterial",new nt({visible:!1})),T(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)}),T(this,"changeDrag",a=>{this._visible=!a.value,this.preventCameraMovement(),this.notifyDraggingChanged(a)}),this.components=e,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=s,this.origin=i,t.renderer.setPlane(!0,this.three),this._planeMesh=Qn.newPlaneMesh(r,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(s,i),o&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(e){if(!this.world.isDisposing){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=e,this.world.renderer.setPlane(e,this.three)}}get visible(){return this._visible}set visible(e){this._visible=e,this._controls.visible=e,this._helper.visible=e,this.toggleControls(e)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(e){this._planeMesh.material=e}get size(){return this._planeMesh.scale.x}set size(e){this._planeMesh.scale.set(e,e,e)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(e,t){this.reset(),this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),this.update()}dispose(){this._enabled=!1,this.onDraggingStarted.reset(),this.onDraggingEnded.reset(),this._helper.removeFromParent(),this.world.renderer&&this.world.renderer.setPlane(!1,this.three),this._arrowBoundBox.removeFromParent(),this._arrowBoundBox.geometry.dispose(),this._planeMesh.geometry.dispose(),this._controls.removeFromParent(),this._controls.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}reset(){const e=new L(1,0,0),t=new L;this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(e){if(e){if(this._controlsActive)return;this._controls.addEventListener("change",this.update),this._controls.addEventListener("dragging-changed",this.changeDrag)}else this._controls.removeEventListener("change",this.update),this._controls.removeEventListener("dragging-changed",this.changeDrag);this._controlsActive=e}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const e=this.world.camera.three,t=this.world.renderer.three.domElement,i=new Ju(e,t);return this.initializeControls(i),this.world.scene.three.add(i),i}initializeControls(e){e.attach(this._helper),e.showX=!1,e.showY=!1,e.setSpace("local"),this.createArrowBoundingBox(),e.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new Ze(.18,.18,1.2),this._arrowBoundBox.material=this._hiddenMaterial,this._arrowBoundBox.rotateX(Math.PI/2),this._arrowBoundBox.updateMatrix(),this._arrowBoundBox.geometry.applyMatrix4(this._arrowBoundBox.matrix)}notifyDraggingChanged(e){e.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const e=new Zi;return e.lookAt(this.normal),e.position.copy(this.origin),this._planeMesh.position.z+=.01,e.add(this._planeMesh),this.world.scene.three.add(e),e}static newPlaneMesh(e,t){const i=new Vn(1),s=new ee(i,t);return s.scale.set(e,e,e),s}}class af extends $i{constructor(){super(...arguments),T(this,"_config",{enabled:{value:!0,type:"Boolean"},visible:{value:!0,type:"Boolean"},color:{value:new Ue,type:"Color"},opacity:{type:"Number",interpolable:!0,value:1,min:0,max:1},size:{type:"Number",interpolable:!0,value:2,min:0,max:100}})}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.color.copy(e)}get opacity(){return this._config.opacity.value}set opacity(e){this._config.opacity.value=e,this._component.material.opacity=e}get size(){return this._config.size.value}set size(e){this._config.size.value=e,this._component.size=e}}const Pl=class On extends de{constructor(e){super(e),T(this,"onSetup",new H),T(this,"onBeforeDrag",new H),T(this,"onAfterDrag",new H),T(this,"onBeforeCreate",new H),T(this,"onBeforeCancel",new H),T(this,"onAfterCancel",new H),T(this,"onBeforeDelete",new H),T(this,"onAfterCreate",new H),T(this,"onAfterDelete",new H),T(this,"onDisposed",new H),T(this,"isSetup",!1),T(this,"orthogonalY",!1),T(this,"toleranceOrthogonalY",.7),T(this,"Type",Qn),T(this,"list",[]),T(this,"config",new af(this,this.components,"Clipper",On.uuid)),T(this,"_defaultConfig",{color:new Ue(12255487),opacity:.2,size:2}),T(this,"_material",new nt({color:12255487,side:Ms,transparent:!0,opacity:.2})),T(this,"_size",5),T(this,"_enabled",!1),T(this,"_visible",!0),T(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()}),T(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()}),this.components.add(On.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const t of this.list)t.enabled=e;this.updateMaterialsAndPlanes()}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get material(){return this._material}set material(e){this._material=e;for(const t of this.list)t.planeMaterial=e}get size(){return this._size}set size(e){this._size=e;for(const t of this.list)t.size=e}dispose(){this._enabled=!1,this.components.get(Kn).list.delete(this.config.uuid);for(const e of this.list)e.dispose();this.list.length=0,this._material.dispose(),this.onBeforeCreate.reset(),this.onBeforeCancel.reset(),this.onBeforeDelete.reset(),this.onBeforeDrag.reset(),this.onAfterCreate.reset(),this.onAfterCancel.reset(),this.onAfterDelete.reset(),this.onAfterDrag.reset(),this.onDisposed.trigger(On.uuid),this.onDisposed.reset()}create(e){const t=this.components.get(pt).get(e).castRay();return t?this.createPlaneFromIntersection(e,t):null}createFromNormalAndCoplanarPoint(e,t,i){const s=this.newPlane(e,i,t);return this.updateMaterialsAndPlanes(),s}delete(e,t){t||(t=this.pickPlane(e)),t&&this.deletePlane(t)}deleteAll(e){const t=[...this.list];for(const i of t)if(!e||e.has(i.type)){this.delete(i.world,i);const s=this.list.indexOf(i);s!==-1&&this.list.splice(s,1)}}setup(e){const t={...this._defaultConfig,...e};this.config.color=t.color,this.config.opacity=t.opacity,this.config.size=t.size,this.isSetup=!0,this.onSetup.trigger()}deletePlane(e){const t=this.list.indexOf(e);if(t!==-1){if(this.list.splice(t,1),!e.world.renderer)throw new Error("Renderer not found for this plane's world!");e.world.renderer.setPlane(!1,e.three),e.dispose(),this.updateMaterialsAndPlanes(),this.onAfterDelete.trigger(e)}}pickPlane(e){const t=this.components.get(pt).get(e),i=this.getAllPlaneMeshes(),s=t.castRay(i);if(s){const n=s.object;return this.list.find(r=>r.meshes.includes(n))}}getAllPlaneMeshes(){const e=[];for(const t of this.list)e.push(...t.meshes);return e}createPlaneFromIntersection(e,t){var i;if(!e.renderer)throw new Error("The given world must have a renderer!");const s=t.point.distanceTo(new L(0,0,0)),n=(i=t.face)==null?void 0:i.normal;if(!s||!n)return null;const r=this.getWorldNormal(t,n),o=this.newPlane(e,t.point,r.negate());return o.visible=this._visible,o.size=this._size,e.renderer.setPlane(!0,o.three),this.updateMaterialsAndPlanes(),o}getWorldNormal(e,t){const i=e.object;let s=e.object.matrixWorld.clone();if(i instanceof ft&&e.instanceId!==void 0){const o=new ne;i.getMatrixAt(e.instanceId,o),s=o.multiply(s)}const n=new fi().getNormalMatrix(s),r=t.clone().applyMatrix3(n).normalize();return this.normalizePlaneDirectionY(r),r}normalizePlaneDirectionY(e){this.orthogonalY&&(e.y>this.toleranceOrthogonalY&&(e.x=0,e.y=1,e.z=0),e.y<-this.toleranceOrthogonalY&&(e.x=0,e.y=-1,e.z=0))}newPlane(e,t,i){const s=new this.Type(this.components,e,t,i,this._material);return s.onDraggingStarted.add(this._onStartDragging),s.onDraggingEnded.add(this._onEndDragging),this.list.push(s),this.onAfterCreate.trigger(s),s}updateMaterialsAndPlanes(){const e=this.components.get(Sl);for(const[t,i]of e.list){if(!i.renderer)continue;i.renderer.updateClippingPlanes();const{clippingPlanes:s}=i.renderer;for(const n of i.meshes)if(n.material)if(Array.isArray(n.material))for(const r of n.material)r.clippingPlanes=s;else n.material.clippingPlanes=s}}};T(Pl,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let Qi=Pl;class lf{constructor(e){T(this,"enabled",!1),T(this,"id","FirstPerson"),this.camera=e}set(e){if(this.enabled=e,e){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const e=this.camera.controls,t=new L;e.distance--,e.getPosition(t),e.minDistance=1,e.maxDistance=1,e.distance=1,e.moveTo(t.x,t.y,t.z),e.truckSpeed=50,e.mouseButtons.wheel=Xe.ACTION.DOLLY,e.touches.two=Xe.ACTION.TOUCH_ZOOM_TRUCK}}class hf{constructor(e){T(this,"enabled",!0),T(this,"id","Orbit"),this.camera=e,this.activateOrbitControls()}set(e){this.enabled=e,e&&this.activateOrbitControls()}activateOrbitControls(){const e=this.camera.controls;e.minDistance=1,e.maxDistance=300;const t=new L;e.getPosition(t);const i=t.length();e.distance=i,e.truckSpeed=2;const{rotation:s}=this.camera.three,n=new L(0,0,-1).applyEuler(s),r=t.addScaledVector(n,i);e.moveTo(r.x,r.y,r.z)}}class cf{constructor(e){T(this,"enabled",!1),T(this,"id","Plan"),T(this,"mouseAction1"),T(this,"mouseAction2"),T(this,"mouseInitialized",!1),T(this,"defaultAzimuthSpeed"),T(this,"defaultPolarSpeed"),this.camera=e,this.defaultAzimuthSpeed=e.controls.azimuthRotateSpeed,this.defaultPolarSpeed=e.controls.polarRotateSpeed}set(e){this.enabled=e;const t=this.camera.controls;t.azimuthRotateSpeed=e?0:this.defaultAzimuthSpeed,t.polarRotateSpeed=e?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=t.touches.one,this.mouseAction2=t.touches.two,this.mouseInitialized=!0),e?(t.mouseButtons.left=Xe.ACTION.TRUCK,t.touches.one=Xe.ACTION.TOUCH_TRUCK,t.touches.two=Xe.ACTION.TOUCH_ZOOM):(t.mouseButtons.left=Xe.ACTION.ROTATE,t.touches.one=this.mouseAction1,t.touches.two=this.mouseAction2)}}class df{constructor(e){T(this,"onChanged",new H),T(this,"current","Perspective"),T(this,"camera"),T(this,"matchOrthoDistanceEnabled",!1),T(this,"_component"),T(this,"_previousDistance",-1),this._component=e,this.camera=e.three}async set(e){this.current!==e&&(e==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const e=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(e)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const e=this.getPerspectiveDims();if(!e)return;const{width:t,height:i}=e;this.setupOrthoCamera(i,t),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const e=this._component.currentWorld;if(!e||!e.renderer)return null;const t=new L;this._component.threePersp.getWorldDirection(t);const i=new L;this._component.controls.getTarget(i);const s=i.clone().sub(this._component.threePersp.position).dot(t),n=e.renderer.getSize(),r=n.x/n.y,o=this._component.threePersp,a=s*2*Math.atan(o.fov*(Math.PI/180)/2);return{width:a*r,height:a}}setupOrthoCamera(e,t){this._component.controls.mouseButtons.wheel=Xe.ACTION.ZOOM,this._component.controls.mouseButtons.middle=Xe.ACTION.ZOOM;const i=this._component.threePersp,s=this._component.threeOrtho;s.zoom=1,s.left=t/-2,s.right=t/2,s.top=e/2,s.bottom=e/-2,s.updateProjectionMatrix(),s.position.copy(i.position),s.quaternion.copy(i.quaternion),this._component.controls.camera=s}getDistance(){const e=this._component.threePersp,t=this._component.threeOrtho;return(t.top-t.bottom)/t.zoom/(2*Math.atan(e.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=Xe.ACTION.DOLLY,this._component.controls.mouseButtons.middle=Xe.ACTION.DOLLY;const e=this._component.threePersp,t=this._component.threeOrtho;e.position.copy(t.position),e.quaternion.copy(t.quaternion),this._component.controls.mouseButtons.wheel=Xe.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),e.updateProjectionMatrix(),this._component.controls.camera=e,this.camera=e,this.current="Perspective"}}class uf extends Ps{constructor(e){super(e),T(this,"projection"),T(this,"threeOrtho"),T(this,"threePersp"),T(this,"_userInputButtons",{}),T(this,"_frustumSize",50),T(this,"_navigationModes",new Map),T(this,"_mode",null),T(this,"previousSize",null),this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new df(this),this.onAspectUpdated.add(()=>{this.setOrthoPerspCameraAspect()}),this.projection.onChanged.add(t=>{this.three=t,this.updateAspect()}),this.onWorldChanged.add(({action:t})=>{t==="added"&&(this._navigationModes.clear(),this._navigationModes.set("Orbit",new hf(this)),this._navigationModes.set("FirstPerson",new lf(this)),this._navigationModes.set("Plan",new cf(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0}),this.currentWorld&&this.currentWorld.renderer&&(this.previousSize=this.currentWorld.renderer.getSize().clone()))})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(e){if(this.mode!==null&&this.mode.id!==e){if(this.mode.set(!1),!this._navigationModes.has(e))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(e),this.mode.set(!0)}}async fit(e,t=1.5){if(!this.enabled)return;const i=Number.MAX_VALUE,s=Number.MIN_VALUE,n=new L(i,i,i),r=new L(s,s,s);for(const d of e){const f=new we().setFromObject(d);f.min.xr.x&&(r.x=f.max.x),f.max.y>r.y&&(r.y=f.max.y),f.max.z>r.z&&(r.z=f.max.z)}const o=new we(n,r),a=new L;o.getSize(a);const h=new L;o.getCenter(h);const c=Math.max(a.x,a.y,a.z)*t,u=new Ri(h,c);await this.controls.fitToSphere(u,!0)}setUserInput(e){e?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const e=window.innerWidth/window.innerHeight;return new si(this._frustumSize*e/-2,this._frustumSize*e/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoPerspCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer||!this.previousSize)return;const e=this.currentWorld.renderer.getSize(),t=this.threeOrtho.top,i=this.threeOrtho.right,s=e.y/this.previousSize.y,n=e.x/this.previousSize.x,r=t*s,o=i*n;this.threeOrtho.left=-o,this.threeOrtho.right=o,this.threeOrtho.top=r,this.threeOrtho.bottom=-r,this.threeOrtho.updateProjectionMatrix(),this.previousSize.copy(e)}}const Aa=new Map([[Yn,{forRelated:"Decomposes",forRelating:"IsDecomposedBy"}],[ro,{forRelated:"HasAssociations",forRelating:"AssociatedTo"}],[oo,{forRelated:"HasAssociations",forRelating:"ClassificationForObjects"}],[ao,{forRelated:"HasAssignments",forRelating:"IsGroupedBy"}],[Ds,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[lo,{forRelated:"IsTypedBy",forRelating:"Types"}],[ho,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[Gn,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}],[co,{forRelated:"AssignedToFlowElement",forRelating:"HasControlElements"}],[uo,{forRelated:"ConnectedFrom",forRelating:"ConnectedTo"}],[fo,{forRelated:"HasAssignments",forRelating:"ReferencedBy"}],[po,{forRelated:"HasContext",forRelating:"Declares"}],[mo,{forRelated:"HasAssignments",forRelating:"Controls"}],[Io,{forRelated:"Nests",forRelating:"IsNestedBy"}],[Eo,{forRelated:"HasAssociations",forRelating:"DocumentRefForObjects"}]]),_n={950732822:"IFCURIREFERENCE",4075327185:"IFCTIME",1209108979:"IFCTEMPERATURERATEOFCHANGEMEASURE",3457685358:"IFCSOUNDPRESSURELEVELMEASURE",4157543285:"IFCSOUNDPOWERLEVELMEASURE",2798247006:"IFCPROPERTYSETDEFINITIONSET",1790229001:"IFCPOSITIVEINTEGER",525895558:"IFCNONNEGATIVELENGTHMEASURE",1774176899:"IFCLINEINDEX",1275358634:"IFCLANGUAGEID",2541165894:"IFCDURATION",3701338814:"IFCDAYINWEEKNUMBER",2195413836:"IFCDATETIME",937566702:"IFCDATE",1683019596:"IFCCARDINALPOINTREFERENCE",2314439260:"IFCBINARY",1500781891:"IFCAREADENSITYMEASURE",3683503648:"IFCARCINDEX",4065007721:"IFCYEARNUMBER",1718600412:"IFCWARPINGMOMENTMEASURE",51269191:"IFCWARPINGCONSTANTMEASURE",2593997549:"IFCVOLUMETRICFLOWRATEMEASURE",3458127941:"IFCVOLUMEMEASURE",3345633955:"IFCVAPORPERMEABILITYMEASURE",1278329552:"IFCTORQUEMEASURE",2591213694:"IFCTIMESTAMP",2726807636:"IFCTIMEMEASURE",743184107:"IFCTHERMODYNAMICTEMPERATUREMEASURE",2016195849:"IFCTHERMALTRANSMITTANCEMEASURE",857959152:"IFCTHERMALRESISTANCEMEASURE",2281867870:"IFCTHERMALEXPANSIONCOEFFICIENTMEASURE",2645777649:"IFCTHERMALCONDUCTIVITYMEASURE",232962298:"IFCTHERMALADMITTANCEMEASURE",296282323:"IFCTEXTTRANSFORMATION",603696268:"IFCTEXTFONTNAME",3490877962:"IFCTEXTDECORATION",1460886941:"IFCTEXTALIGNMENT",2801250643:"IFCTEXT",58845555:"IFCTEMPERATUREGRADIENTMEASURE",361837227:"IFCSPECULARROUGHNESS",2757832317:"IFCSPECULAREXPONENT",3477203348:"IFCSPECIFICHEATCAPACITYMEASURE",993287707:"IFCSOUNDPRESSUREMEASURE",846465480:"IFCSOUNDPOWERMEASURE",3471399674:"IFCSOLIDANGLEMEASURE",408310005:"IFCSHEARMODULUSMEASURE",2190458107:"IFCSECTIONALAREAINTEGRALMEASURE",3467162246:"IFCSECTIONMODULUSMEASURE",2766185779:"IFCSECONDINMINUTE",3211557302:"IFCROTATIONALSTIFFNESSMEASURE",1755127002:"IFCROTATIONALMASSMEASURE",2133746277:"IFCROTATIONALFREQUENCYMEASURE",200335297:"IFCREAL",96294661:"IFCRATIOMEASURE",3972513137:"IFCRADIOACTIVITYMEASURE",3665567075:"IFCPRESSUREMEASURE",2169031380:"IFCPRESENTABLETEXT",1364037233:"IFCPOWERMEASURE",1245737093:"IFCPOSITIVERATIOMEASURE",3054510233:"IFCPOSITIVEPLANEANGLEMEASURE",2815919920:"IFCPOSITIVELENGTHMEASURE",4042175685:"IFCPLANEANGLEMEASURE",2642773653:"IFCPLANARFORCEMEASURE",2260317790:"IFCPARAMETERVALUE",929793134:"IFCPHMEASURE",2395907400:"IFCNUMERICMEASURE",2095195183:"IFCNORMALISEDRATIOMEASURE",765770214:"IFCMONTHINYEARNUMBER",2615040989:"IFCMONETARYMEASURE",3114022597:"IFCMOMENTOFINERTIAMEASURE",1648970520:"IFCMOLECULARWEIGHTMEASURE",3177669450:"IFCMOISTUREDIFFUSIVITYMEASURE",1753493141:"IFCMODULUSOFSUBGRADEREACTIONMEASURE",1052454078:"IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE",2173214787:"IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE",3341486342:"IFCMODULUSOFELASTICITYMEASURE",102610177:"IFCMINUTEINHOUR",3531705166:"IFCMASSPERLENGTHMEASURE",3124614049:"IFCMASSMEASURE",4017473158:"IFCMASSFLOWRATEMEASURE",1477762836:"IFCMASSDENSITYMEASURE",2486716878:"IFCMAGNETICFLUXMEASURE",286949696:"IFCMAGNETICFLUXDENSITYMEASURE",151039812:"IFCLUMINOUSINTENSITYMEASURE",2755797622:"IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE",2095003142:"IFCLUMINOUSFLUXMEASURE",503418787:"IFCLOGICAL",3086160713:"IFCLINEARVELOCITYMEASURE",1307019551:"IFCLINEARSTIFFNESSMEASURE",2128979029:"IFCLINEARMOMENTMEASURE",191860431:"IFCLINEARFORCEMEASURE",1243674935:"IFCLENGTHMEASURE",3258342251:"IFCLABEL",2054016361:"IFCKINEMATICVISCOSITYMEASURE",3192672207:"IFCISOTHERMALMOISTURECAPACITYMEASURE",3686016028:"IFCIONCONCENTRATIONMEASURE",3809634241:"IFCINTEGERCOUNTRATEMEASURE",1939436016:"IFCINTEGER",2679005408:"IFCINDUCTANCEMEASURE",3358199106:"IFCILLUMINANCEMEASURE",983778844:"IFCIDENTIFIER",2589826445:"IFCHOURINDAY",1158859006:"IFCHEATINGVALUEMEASURE",3113092358:"IFCHEATFLUXDENSITYMEASURE",3064340077:"IFCGLOBALLYUNIQUEID",3044325142:"IFCFREQUENCYMEASURE",1361398929:"IFCFORCEMEASURE",2590844177:"IFCFONTWEIGHT",2715512545:"IFCFONTVARIANT",1102727119:"IFCFONTSTYLE",2078135608:"IFCENERGYMEASURE",2506197118:"IFCELECTRICVOLTAGEMEASURE",2951915441:"IFCELECTRICRESISTANCEMEASURE",3790457270:"IFCELECTRICCURRENTMEASURE",2093906313:"IFCELECTRICCONDUCTANCEMEASURE",3818826038:"IFCELECTRICCHARGEMEASURE",1827137117:"IFCELECTRICCAPACITANCEMEASURE",69416015:"IFCDYNAMICVISCOSITYMEASURE",524656162:"IFCDOSEEQUIVALENTMEASURE",4134073009:"IFCDIMENSIONCOUNT",1514641115:"IFCDESCRIPTIVEMEASURE",300323983:"IFCDAYLIGHTSAVINGHOUR",86635668:"IFCDAYINMONTHNUMBER",94842927:"IFCCURVATUREMEASURE",1778710042:"IFCCOUNTMEASURE",3238673880:"IFCCONTEXTDEPENDENTMEASURE",3812528620:"IFCCOMPOUNDPLANEANGLEMEASURE",2991860651:"IFCCOMPLEXNUMBER",1867003952:"IFCBOXALIGNMENT",2735952531:"IFCBOOLEAN",2650437152:"IFCAREAMEASURE",632304761:"IFCANGULARVELOCITYMEASURE",360377573:"IFCAMOUNTOFSUBSTANCEMEASURE",4182062534:"IFCACCELERATIONMEASURE",3699917729:"IFCABSORBEDDOSEMEASURE",1971632696:"IFCGEOSLICE",2680139844:"IFCGEOMODEL",24726584:"IFCELECTRICFLOWTREATMENTDEVICE",3693000487:"IFCDISTRIBUTIONBOARD",3460952963:"IFCCONVEYORSEGMENT",3999819293:"IFCCAISSONFOUNDATION",3314249567:"IFCBOREHOLE",4196446775:"IFCBEARING",325726236:"IFCALIGNMENT",3425753595:"IFCTRACKELEMENT",991950508:"IFCSIGNAL",3798194928:"IFCREINFORCEDSOIL",3290496277:"IFCRAIL",1383356374:"IFCPAVEMENT",2182337498:"IFCNAVIGATIONELEMENT",234836483:"IFCMOORINGDEVICE",2078563270:"IFCMOBILETELECOMMUNICATIONSAPPLIANCE",1638804497:"IFCLIQUIDTERMINAL",1154579445:"IFCLINEARPOSITIONINGELEMENT",2696325953:"IFCKERB",2713699986:"IFCGEOTECHNICALASSEMBLY",2142170206:"IFCELECTRICFLOWTREATMENTDEVICETYPE",3376911765:"IFCEARTHWORKSFILL",1077100507:"IFCEARTHWORKSELEMENT",3071239417:"IFCEARTHWORKSCUT",479945903:"IFCDISTRIBUTIONBOARDTYPE",3426335179:"IFCDEEPFOUNDATION",1502416096:"IFCCOURSE",2940368186:"IFCCONVEYORSEGMENTTYPE",3203706013:"IFCCAISSONFOUNDATIONTYPE",3862327254:"IFCBUILTSYSTEM",1876633798:"IFCBUILTELEMENT",963979645:"IFCBRIDGEPART",644574406:"IFCBRIDGE",3649138523:"IFCBEARINGTYPE",1662888072:"IFCALIGNMENTVERTICAL",317615605:"IFCALIGNMENTSEGMENT",1545765605:"IFCALIGNMENTHORIZONTAL",4266260250:"IFCALIGNMENTCANT",3956297820:"IFCVIBRATIONDAMPERTYPE",1530820697:"IFCVIBRATIONDAMPER",840318589:"IFCVEHICLE",1953115116:"IFCTRANSPORTATIONDEVICE",618700268:"IFCTRACKELEMENTTYPE",2281632017:"IFCTENDONCONDUITTYPE",3663046924:"IFCTENDONCONDUIT",42703149:"IFCSINESPIRAL",1894708472:"IFCSIGNALTYPE",3599934289:"IFCSIGNTYPE",33720170:"IFCSIGN",1027922057:"IFCSEVENTHORDERPOLYNOMIALSPIRAL",544395925:"IFCSEGMENTEDREFERENCECURVE",3649235739:"IFCSECONDORDERPOLYNOMIALSPIRAL",550521510:"IFCROADPART",146592293:"IFCROAD",3818125796:"IFCRELADHERESTOELEMENT",4021432810:"IFCREFERENT",1891881377:"IFCRAILWAYPART",3992365140:"IFCRAILWAY",1763565496:"IFCRAILTYPE",1946335990:"IFCPOSITIONINGELEMENT",514975943:"IFCPAVEMENTTYPE",506776471:"IFCNAVIGATIONELEMENTTYPE",710110818:"IFCMOORINGDEVICETYPE",1950438474:"IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE",976884017:"IFCMARINEPART",525669439:"IFCMARINEFACILITY",1770583370:"IFCLIQUIDTERMINALTYPE",2176059722:"IFCLINEARELEMENT",679976338:"IFCKERBTYPE",3948183225:"IFCIMPACTPROTECTIONDEVICETYPE",2568555532:"IFCIMPACTPROTECTIONDEVICE",2898700619:"IFCGRADIENTCURVE",1594536857:"IFCGEOTECHNICALSTRATUM",4230923436:"IFCGEOTECHNICALELEMENT",4228831410:"IFCFACILITYPARTCOMMON",1310830890:"IFCFACILITYPART",24185140:"IFCFACILITY",4234616927:"IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID",1306400036:"IFCDEEPFOUNDATIONTYPE",4189326743:"IFCCOURSETYPE",2000195564:"IFCCOSINESPIRAL",3497074424:"IFCCLOTHOID",1626504194:"IFCBUILTELEMENTTYPE",3651464721:"IFCVEHICLETYPE",1229763772:"IFCTRIANGULATEDIRREGULARNETWORK",3665877780:"IFCTRANSPORTATIONDEVICETYPE",782932809:"IFCTHIRDORDERPOLYNOMIALSPIRAL",2735484536:"IFCSPIRAL",1356537516:"IFCSECTIONEDSURFACE",1290935644:"IFCSECTIONEDSOLIDHORIZONTAL",1862484736:"IFCSECTIONEDSOLID",1441486842:"IFCRELPOSITIONS",1033248425:"IFCRELASSOCIATESPROFILEDEF",3381221214:"IFCPOLYNOMIALCURVE",2485787929:"IFCOFFSETCURVEBYDISTANCES",590820931:"IFCOFFSETCURVE",3465909080:"IFCINDEXEDPOLYGONALTEXTUREMAP",593015953:"IFCDIRECTRIXCURVESWEPTAREASOLID",4212018352:"IFCCURVESEGMENT",3425423356:"IFCAXIS2PLACEMENTLINEAR",823603102:"IFCSEGMENT",2165702409:"IFCPOINTBYDISTANCEEXPRESSION",182550632:"IFCOPENCROSSPROFILEDEF",388784114:"IFCLINEARPLACEMENT",536804194:"IFCALIGNMENTHORIZONTALSEGMENT",3752311538:"IFCALIGNMENTCANTSEGMENT",1010789467:"IFCTEXTURECOORDINATEINDICESWITHVOIDS",222769930:"IFCTEXTURECOORDINATEINDICES",2691318326:"IFCQUANTITYNUMBER",3633395639:"IFCALIGNMENTVERTICALSEGMENT",2879124712:"IFCALIGNMENTPARAMETERSEGMENT",25142252:"IFCCONTROLLER",3087945054:"IFCALARM",4288193352:"IFCACTUATOR",630975310:"IFCUNITARYCONTROLELEMENT",4086658281:"IFCSENSOR",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",182646315:"IFCFLOWINSTRUMENT",1426591983:"IFCFIRESUPPRESSIONTERMINAL",819412036:"IFCFILTER",3415622556:"IFCFAN",1003880860:"IFCELECTRICTIMECONTROL",402227799:"IFCELECTRICMOTOR",264262732:"IFCELECTRICGENERATOR",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",862014818:"IFCELECTRICDISTRIBUTIONBOARD",1904799276:"IFCELECTRICAPPLIANCE",1360408905:"IFCDUCTSILENCER",3518393246:"IFCDUCTSEGMENT",342316401:"IFCDUCTFITTING",562808652:"IFCDISTRIBUTIONCIRCUIT",4074379575:"IFCDAMPER",3640358203:"IFCCOOLINGTOWER",4136498852:"IFCCOOLEDBEAM",2272882330:"IFCCONDENSER",3571504051:"IFCCOMPRESSOR",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",639361253:"IFCCOIL",3902619387:"IFCCHILLER",4217484030:"IFCCABLESEGMENT",1051757585:"IFCCABLEFITTING",3758799889:"IFCCABLECARRIERSEGMENT",635142910:"IFCCABLECARRIERFITTING",2938176219:"IFCBURNER",32344328:"IFCBOILER",2906023776:"IFCBEAMSTANDARDCASE",277319702:"IFCAUDIOVISUALAPPLIANCE",2056796094:"IFCAIRTOAIRHEATRECOVERY",177149247:"IFCAIRTERMINALBOX",1634111441:"IFCAIRTERMINAL",486154966:"IFCWINDOWSTANDARDCASE",4237592921:"IFCWASTETERMINAL",4156078855:"IFCWALLELEMENTEDCASE",4207607924:"IFCVALVE",4292641817:"IFCUNITARYEQUIPMENT",3179687236:"IFCUNITARYCONTROLELEMENTTYPE",3026737570:"IFCTUBEBUNDLE",3825984169:"IFCTRANSFORMER",812556717:"IFCTANK",1162798199:"IFCSWITCHINGDEVICE",385403989:"IFCSTRUCTURALLOADCASE",1404847402:"IFCSTACKTERMINAL",1999602285:"IFCSPACEHEATER",3420628829:"IFCSOLARDEVICE",3027962421:"IFCSLABSTANDARDCASE",3127900445:"IFCSLABELEMENTEDCASE",1329646415:"IFCSHADINGDEVICE",3053780830:"IFCSANITARYTERMINAL",2572171363:"IFCREINFORCINGBARTYPE",1232101972:"IFCRATIONALBSPLINECURVEWITHKNOTS",90941305:"IFCPUMP",655969474:"IFCPROTECTIVEDEVICETRIPPINGUNITTYPE",738039164:"IFCPROTECTIVEDEVICE",1156407060:"IFCPLATESTANDARDCASE",3612865200:"IFCPIPESEGMENT",310824031:"IFCPIPEFITTING",3694346114:"IFCOUTLET",144952367:"IFCOUTERBOUNDARYCURVE",2474470126:"IFCMOTORCONNECTION",1911478936:"IFCMEMBERSTANDARDCASE",1437502449:"IFCMEDICALDEVICE",629592764:"IFCLIGHTFIXTURE",76236018:"IFCLAMP",2176052936:"IFCJUNCTIONBOX",4175244083:"IFCINTERCEPTOR",2068733104:"IFCHUMIDIFIER",3319311131:"IFCHEATEXCHANGER",2188021234:"IFCFLOWMETER",1209101575:"IFCEXTERNALSPATIALELEMENT",484807127:"IFCEVAPORATOR",3747195512:"IFCEVAPORATIVECOOLER",2814081492:"IFCENGINE",2417008758:"IFCELECTRICDISTRIBUTIONBOARDTYPE",3242481149:"IFCDOORSTANDARDCASE",3205830791:"IFCDISTRIBUTIONSYSTEM",400855858:"IFCCOMMUNICATIONSAPPLIANCETYPE",905975707:"IFCCOLUMNSTANDARDCASE",1677625105:"IFCCIVILELEMENT",3296154744:"IFCCHIMNEY",2674252688:"IFCCABLEFITTINGTYPE",2188180465:"IFCBURNERTYPE",1177604601:"IFCBUILDINGSYSTEM",39481116:"IFCBUILDINGELEMENTPARTTYPE",1136057603:"IFCBOUNDARYCURVE",2461110595:"IFCBSPLINECURVEWITHKNOTS",1532957894:"IFCAUDIOVISUALAPPLIANCETYPE",4088093105:"IFCWORKCALENDAR",4009809668:"IFCWINDOWTYPE",926996030:"IFCVOIDINGFEATURE",2391383451:"IFCVIBRATIONISOLATOR",2415094496:"IFCTENDONTYPE",3081323446:"IFCTENDONANCHORTYPE",413509423:"IFCSYSTEMFURNITUREELEMENT",3101698114:"IFCSURFACEFEATURE",3657597509:"IFCSTRUCTURALSURFACEACTION",2757150158:"IFCSTRUCTURALCURVEREACTION",1004757350:"IFCSTRUCTURALCURVEACTION",338393293:"IFCSTAIRTYPE",1072016465:"IFCSOLARDEVICETYPE",4074543187:"IFCSHADINGDEVICETYPE",2157484638:"IFCSEAMCURVE",2781568857:"IFCROOFTYPE",2310774935:"IFCREINFORCINGMESHTYPE",964333572:"IFCREINFORCINGELEMENTTYPE",683857671:"IFCRATIONALBSPLINESURFACEWITHKNOTS",1469900589:"IFCRAMPTYPE",2839578677:"IFCPOLYGONALFACESET",1158309216:"IFCPILETYPE",3079942009:"IFCOPENINGSTANDARDCASE",1114901282:"IFCMEDICALDEVICETYPE",3113134337:"IFCINTERSECTIONCURVE",3946677679:"IFCINTERCEPTORTYPE",2571569899:"IFCINDEXEDPOLYCURVE",3493046030:"IFCGEOGRAPHICELEMENT",1509553395:"IFCFURNITURE",1893162501:"IFCFOOTINGTYPE",2853485674:"IFCEXTERNALSPATIALSTRUCTUREELEMENT",4148101412:"IFCEVENT",132023988:"IFCENGINETYPE",2397081782:"IFCELEMENTASSEMBLYTYPE",2323601079:"IFCDOORTYPE",1213902940:"IFCCYLINDRICALSURFACE",1525564444:"IFCCONSTRUCTIONPRODUCTRESOURCETYPE",4105962743:"IFCCONSTRUCTIONMATERIALRESOURCETYPE",2185764099:"IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE",15328376:"IFCCOMPOSITECURVEONSURFACE",3875453745:"IFCCOMPLEXPROPERTYTEMPLATE",3893394355:"IFCCIVILELEMENTTYPE",2197970202:"IFCCHIMNEYTYPE",167062518:"IFCBSPLINESURFACEWITHKNOTS",2887950389:"IFCBSPLINESURFACE",2603310189:"IFCADVANCEDBREPWITHVOIDS",1635779807:"IFCADVANCEDBREP",2916149573:"IFCTRIANGULATEDFACESET",1935646853:"IFCTOROIDALSURFACE",2387106220:"IFCTESSELLATEDFACESET",3206491090:"IFCTASKTYPE",699246055:"IFCSURFACECURVE",4095615324:"IFCSUBCONTRACTRESOURCETYPE",603775116:"IFCSTRUCTURALSURFACEREACTION",4015995234:"IFCSPHERICALSURFACE",2481509218:"IFCSPATIALZONETYPE",463610769:"IFCSPATIALZONE",710998568:"IFCSPATIALELEMENTTYPE",1412071761:"IFCSPATIALELEMENT",3663146110:"IFCSIMPLEPROPERTYTEMPLATE",3243963512:"IFCREVOLVEDAREASOLIDTAPERED",816062949:"IFCREPARAMETRISEDCOMPOSITECURVESEGMENT",1521410863:"IFCRELSPACEBOUNDARY2NDLEVEL",3523091289:"IFCRELSPACEBOUNDARY1STLEVEL",427948657:"IFCRELINTERFERESELEMENTS",307848117:"IFCRELDEFINESBYTEMPLATE",1462361463:"IFCRELDEFINESBYOBJECT",2565941209:"IFCRELDECLARES",1027710054:"IFCRELASSIGNSTOGROUPBYFACTOR",3521284610:"IFCPROPERTYTEMPLATE",492091185:"IFCPROPERTYSETTEMPLATE",653396225:"IFCPROJECTLIBRARY",569719735:"IFCPROCEDURETYPE",3967405729:"IFCPREDEFINEDPROPERTYSET",1682466193:"IFCPCURVE",428585644:"IFCLABORRESOURCETYPE",2294589976:"IFCINDEXEDPOLYGONALFACEWITHVOIDS",178912537:"IFCINDEXEDPOLYGONALFACE",4095422895:"IFCGEOGRAPHICELEMENTTYPE",2652556860:"IFCFIXEDREFERENCESWEPTAREASOLID",2804161546:"IFCEXTRUDEDAREASOLIDTAPERED",4024345920:"IFCEVENTTYPE",2629017746:"IFCCURVEBOUNDEDSURFACE",1815067380:"IFCCREWRESOURCETYPE",3419103109:"IFCCONTEXT",2574617495:"IFCCONSTRUCTIONRESOURCETYPE",2059837836:"IFCCARTESIANPOINTLIST3D",1675464909:"IFCCARTESIANPOINTLIST2D",574549367:"IFCCARTESIANPOINTLIST",3406155212:"IFCADVANCEDFACE",3698973494:"IFCTYPERESOURCE",3736923433:"IFCTYPEPROCESS",901063453:"IFCTESSELLATEDITEM",1096409881:"IFCSWEPTDISKSOLIDPOLYGONAL",1042787934:"IFCRESOURCETIME",1608871552:"IFCRESOURCECONSTRAINTRELATIONSHIP",2943643501:"IFCRESOURCEAPPROVALRELATIONSHIP",2090586900:"IFCQUANTITYSET",1482703590:"IFCPROPERTYTEMPLATEDEFINITION",3778827333:"IFCPREDEFINEDPROPERTIES",2998442950:"IFCMIRROREDPROFILEDEF",853536259:"IFCMATERIALRELATIONSHIP",3404854881:"IFCMATERIALPROFILESETUSAGETAPERING",3079605661:"IFCMATERIALPROFILESETUSAGE",2852063980:"IFCMATERIALCONSTITUENTSET",3708119e3:"IFCMATERIALCONSTITUENT",1585845231:"IFCLAGTIME",2133299955:"IFCINDEXEDTRIANGLETEXTUREMAP",1437953363:"IFCINDEXEDTEXTUREMAP",3570813810:"IFCINDEXEDCOLOURMAP",1437805879:"IFCEXTERNALREFERENCERELATIONSHIP",297599258:"IFCEXTENDEDPROPERTIES",211053100:"IFCEVENTTIME",2713554722:"IFCCONVERSIONBASEDUNITWITHOFFSET",3285139300:"IFCCOLOURRGBLIST",1236880293:"IFCWORKTIME",1199560280:"IFCTIMEPERIOD",3611470254:"IFCTEXTUREVERTEXLIST",2771591690:"IFCTASKTIMERECURRING",1549132990:"IFCTASKTIME",2043862942:"IFCTABLECOLUMN",2934153892:"IFCSURFACEREINFORCEMENTAREA",609421318:"IFCSTRUCTURALLOADORRESULT",3478079324:"IFCSTRUCTURALLOADCONFIGURATION",1054537805:"IFCSCHEDULINGTIME",2439245199:"IFCRESOURCELEVELRELATIONSHIP",2433181523:"IFCREFERENCE",3915482550:"IFCRECURRENCEPATTERN",986844984:"IFCPROPERTYABSTRACTION",3843373140:"IFCPROJECTEDCRS",677532197:"IFCPRESENTATIONITEM",1507914824:"IFCMATERIALUSAGEDEFINITION",552965576:"IFCMATERIALPROFILEWITHOFFSETS",164193824:"IFCMATERIALPROFILESET",2235152071:"IFCMATERIALPROFILE",1847252529:"IFCMATERIALLAYERWITHOFFSETS",760658860:"IFCMATERIALDEFINITION",3057273783:"IFCMAPCONVERSION",4294318154:"IFCEXTERNALINFORMATION",1466758467:"IFCCOORDINATEREFERENCESYSTEM",1785450214:"IFCCOORDINATEOPERATION",775493141:"IFCCONNECTIONVOLUMEGEOMETRY",979691226:"IFCREINFORCINGBAR",3700593921:"IFCELECTRICDISTRIBUTIONPOINT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",578613899:"IFCCONTROLLERTYPE",2454782716:"IFCCHAMFEREDGEFEATURE",753842376:"IFCBEAM",3001207471:"IFCALARMTYPE",2874132201:"IFCACTUATORTYPE",3304561284:"IFCWINDOW",3512223829:"IFCWALLSTANDARDCASE",2391406946:"IFCWALL",3313531582:"IFCVIBRATIONISOLATORTYPE",2347447852:"IFCTENDONANCHOR",3824725483:"IFCTENDON",2515109513:"IFCSTRUCTURALANALYSISMODEL",4252922144:"IFCSTAIRFLIGHT",331165859:"IFCSTAIR",1529196076:"IFCSLAB",1783015770:"IFCSENSORTYPE",1376911519:"IFCROUNDEDEDGEFEATURE",2016517767:"IFCROOF",2320036040:"IFCREINFORCINGMESH",3027567501:"IFCREINFORCINGELEMENT",3055160366:"IFCRATIONALBEZIERCURVE",3283111854:"IFCRAMPFLIGHT",3024970846:"IFCRAMP",2262370178:"IFCRAILING",3171933400:"IFCPLATE",1687234759:"IFCPILE",1073191201:"IFCMEMBER",900683007:"IFCFOOTING",3508470533:"IFCFLOWTREATMENTDEVICE",2223149337:"IFCFLOWTERMINAL",707683696:"IFCFLOWSTORAGEDEVICE",987401354:"IFCFLOWSEGMENT",3132237377:"IFCFLOWMOVINGDEVICE",4037862832:"IFCFLOWINSTRUMENTTYPE",4278956645:"IFCFLOWFITTING",2058353004:"IFCFLOWCONTROLLER",4222183408:"IFCFIRESUPPRESSIONTERMINALTYPE",1810631287:"IFCFILTERTYPE",346874300:"IFCFANTYPE",1658829314:"IFCENERGYCONVERSIONDEVICE",857184966:"IFCELECTRICALELEMENT",1634875225:"IFCELECTRICALCIRCUIT",712377611:"IFCELECTRICTIMECONTROLTYPE",1217240411:"IFCELECTRICMOTORTYPE",1365060375:"IFCELECTRICHEATERTYPE",1534661035:"IFCELECTRICGENERATORTYPE",3277789161:"IFCELECTRICFLOWSTORAGEDEVICETYPE",663422040:"IFCELECTRICAPPLIANCETYPE",855621170:"IFCEDGEFEATURE",2030761528:"IFCDUCTSILENCERTYPE",3760055223:"IFCDUCTSEGMENTTYPE",869906466:"IFCDUCTFITTINGTYPE",395920057:"IFCDOOR",3041715199:"IFCDISTRIBUTIONPORT",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",1945004755:"IFCDISTRIBUTIONELEMENT",2063403501:"IFCDISTRIBUTIONCONTROLELEMENTTYPE",1599208980:"IFCDISTRIBUTIONCHAMBERELEMENTTYPE",2635815018:"IFCDISCRETEACCESSORYTYPE",1335981549:"IFCDISCRETEACCESSORY",4147604152:"IFCDIAMETERDIMENSION",3961806047:"IFCDAMPERTYPE",3495092785:"IFCCURTAINWALL",1973544240:"IFCCOVERING",2954562838:"IFCCOOLINGTOWERTYPE",335055490:"IFCCOOLEDBEAMTYPE",488727124:"IFCCONSTRUCTIONPRODUCTRESOURCE",1060000209:"IFCCONSTRUCTIONMATERIALRESOURCE",3898045240:"IFCCONSTRUCTIONEQUIPMENTRESOURCE",1163958913:"IFCCONDITIONCRITERION",2188551683:"IFCCONDITION",2816379211:"IFCCONDENSERTYPE",3850581409:"IFCCOMPRESSORTYPE",843113511:"IFCCOLUMN",2301859152:"IFCCOILTYPE",2611217952:"IFCCIRCLE",2951183804:"IFCCHILLERTYPE",1285652485:"IFCCABLESEGMENTTYPE",3293546465:"IFCCABLECARRIERSEGMENTTYPE",395041908:"IFCCABLECARRIERFITTINGTYPE",1909888760:"IFCBUILDINGELEMENTPROXYTYPE",1095909175:"IFCBUILDINGELEMENTPROXY",2979338954:"IFCBUILDINGELEMENTPART",52481810:"IFCBUILDINGELEMENTCOMPONENT",3299480353:"IFCBUILDINGELEMENT",231477066:"IFCBOILERTYPE",1916977116:"IFCBEZIERCURVE",819618141:"IFCBEAMTYPE",1967976161:"IFCBSPLINECURVE",3460190687:"IFCASSET",2470393545:"IFCANGULARDIMENSION",1871374353:"IFCAIRTOAIRHEATRECOVERYTYPE",3352864051:"IFCAIRTERMINALTYPE",1411407467:"IFCAIRTERMINALBOXTYPE",3821786052:"IFCACTIONREQUEST",1213861670:"IFC2DCOMPOSITECURVE",1033361043:"IFCZONE",3342526732:"IFCWORKSCHEDULE",4218914973:"IFCWORKPLAN",1028945134:"IFCWORKCONTROL",1133259667:"IFCWASTETERMINALTYPE",1898987631:"IFCWALLTYPE",2769231204:"IFCVIRTUALELEMENT",728799441:"IFCVALVETYPE",1911125066:"IFCUNITARYEQUIPMENTTYPE",1600972822:"IFCTUBEBUNDLETYPE",3593883385:"IFCTRIMMEDCURVE",1620046519:"IFCTRANSPORTELEMENT",1692211062:"IFCTRANSFORMERTYPE",1637806684:"IFCTIMESERIESSCHEDULE",5716631:"IFCTANKTYPE",2254336722:"IFCSYSTEM",2315554128:"IFCSWITCHINGDEVICETYPE",148013059:"IFCSUBCONTRACTRESOURCE",1975003073:"IFCSTRUCTURALSURFACECONNECTION",2986769608:"IFCSTRUCTURALRESULTGROUP",1235345126:"IFCSTRUCTURALPOINTREACTION",734778138:"IFCSTRUCTURALPOINTCONNECTION",2082059205:"IFCSTRUCTURALPOINTACTION",3987759626:"IFCSTRUCTURALPLANARACTIONVARYING",1621171031:"IFCSTRUCTURALPLANARACTION",1252848954:"IFCSTRUCTURALLOADGROUP",1721250024:"IFCSTRUCTURALLINEARACTIONVARYING",1807405624:"IFCSTRUCTURALLINEARACTION",2445595289:"IFCSTRUCTURALCURVEMEMBERVARYING",214636428:"IFCSTRUCTURALCURVEMEMBER",4243806635:"IFCSTRUCTURALCURVECONNECTION",1179482911:"IFCSTRUCTURALCONNECTION",682877961:"IFCSTRUCTURALACTION",1039846685:"IFCSTAIRFLIGHTTYPE",3112655638:"IFCSTACKTERMINALTYPE",3812236995:"IFCSPACETYPE",652456506:"IFCSPACEPROGRAM",1305183839:"IFCSPACEHEATERTYPE",3856911033:"IFCSPACE",2533589738:"IFCSLABTYPE",4097777520:"IFCSITE",4105383287:"IFCSERVICELIFE",3517283431:"IFCSCHEDULETIMECONTROL",1768891740:"IFCSANITARYTERMINALTYPE",2863920197:"IFCRELASSIGNSTASKS",160246688:"IFCRELAGGREGATES",2324767716:"IFCRAMPFLIGHTTYPE",2893384427:"IFCRAILINGTYPE",3248260540:"IFCRADIUSDIMENSION",2250791053:"IFCPUMPTYPE",1842657554:"IFCPROTECTIVEDEVICETYPE",3651124850:"IFCPROJECTIONELEMENT",3642467123:"IFCPROJECTORDERRECORD",2904328755:"IFCPROJECTORDER",2744685151:"IFCPROCEDURE",3740093272:"IFCPORT",3724593414:"IFCPOLYLINE",4017108033:"IFCPLATETYPE",4231323485:"IFCPIPESEGMENTTYPE",804291784:"IFCPIPEFITTINGTYPE",3327091369:"IFCPERMIT",2382730787:"IFCPERFORMANCEHISTORY",2837617999:"IFCOUTLETTYPE",3425660407:"IFCORDERACTION",3588315303:"IFCOPENINGELEMENT",4143007308:"IFCOCCUPANT",1916936684:"IFCMOVE",977012517:"IFCMOTORCONNECTIONTYPE",3181161470:"IFCMEMBERTYPE",2108223431:"IFCMECHANICALFASTENERTYPE",377706215:"IFCMECHANICALFASTENER",2506943328:"IFCLINEARDIMENSION",1161773419:"IFCLIGHTFIXTURETYPE",1051575348:"IFCLAMPTYPE",3827777499:"IFCLABORRESOURCE",4288270099:"IFCJUNCTIONBOXTYPE",2391368822:"IFCINVENTORY",1806887404:"IFCHUMIDIFIERTYPE",1251058090:"IFCHEATEXCHANGERTYPE",2706460486:"IFCGROUP",3009204131:"IFCGRID",200128114:"IFCGASTERMINALTYPE",814719939:"IFCFURNITURESTANDARD",263784265:"IFCFURNISHINGELEMENT",3009222698:"IFCFLOWTREATMENTDEVICETYPE",2297155007:"IFCFLOWTERMINALTYPE",1339347760:"IFCFLOWSTORAGEDEVICETYPE",1834744321:"IFCFLOWSEGMENTTYPE",1482959167:"IFCFLOWMOVINGDEVICETYPE",3815607619:"IFCFLOWMETERTYPE",3198132628:"IFCFLOWFITTINGTYPE",3907093117:"IFCFLOWCONTROLLERTYPE",1287392070:"IFCFEATUREELEMENTSUBTRACTION",2143335405:"IFCFEATUREELEMENTADDITION",2827207264:"IFCFEATUREELEMENT",2489546625:"IFCFASTENERTYPE",647756555:"IFCFASTENER",3737207727:"IFCFACETEDBREPWITHVOIDS",807026263:"IFCFACETEDBREP",3390157468:"IFCEVAPORATORTYPE",3174744832:"IFCEVAPORATIVECOOLERTYPE",3272907226:"IFCEQUIPMENTSTANDARD",1962604670:"IFCEQUIPMENTELEMENT",2107101300:"IFCENERGYCONVERSIONDEVICETYPE",1704287377:"IFCELLIPSE",2590856083:"IFCELEMENTCOMPONENTTYPE",1623761950:"IFCELEMENTCOMPONENT",4123344466:"IFCELEMENTASSEMBLY",1758889154:"IFCELEMENT",360485395:"IFCELECTRICALBASEPROPERTIES",3849074793:"IFCDISTRIBUTIONFLOWELEMENTTYPE",3256556792:"IFCDISTRIBUTIONELEMENTTYPE",681481545:"IFCDIMENSIONCURVEDIRECTEDCALLOUT",1457835157:"IFCCURTAINWALLTYPE",3295246426:"IFCCREWRESOURCE",1916426348:"IFCCOVERINGTYPE",1419761937:"IFCCOSTSCHEDULE",3895139033:"IFCCOSTITEM",3293443760:"IFCCONTROL",2559216714:"IFCCONSTRUCTIONRESOURCE",2510884976:"IFCCONIC",3732776249:"IFCCOMPOSITECURVE",300633059:"IFCCOLUMNTYPE",2937912522:"IFCCIRCLEHOLLOWPROFILEDEF",3124254112:"IFCBUILDINGSTOREY",1950629157:"IFCBUILDINGELEMENTTYPE",4031249490:"IFCBUILDING",1260505505:"IFCBOUNDEDCURVE",3649129432:"IFCBOOLEANCLIPPINGRESULT",1334484129:"IFCBLOCK",3207858831:"IFCASYMMETRICISHAPEPROFILEDEF",1674181508:"IFCANNOTATION",2296667514:"IFCACTOR",2097647324:"IFCTRANSPORTELEMENTTYPE",3473067441:"IFCTASK",1580310250:"IFCSYSTEMFURNITUREELEMENTTYPE",4124788165:"IFCSURFACEOFREVOLUTION",2809605785:"IFCSURFACEOFLINEAREXTRUSION",2028607225:"IFCSURFACECURVESWEPTAREASOLID",4070609034:"IFCSTRUCTUREDDIMENSIONCALLOUT",2218152070:"IFCSTRUCTURALSURFACEMEMBERVARYING",3979015343:"IFCSTRUCTURALSURFACEMEMBER",3689010777:"IFCSTRUCTURALREACTION",530289379:"IFCSTRUCTURALMEMBER",3136571912:"IFCSTRUCTURALITEM",3544373492:"IFCSTRUCTURALACTIVITY",451544542:"IFCSPHERE",3893378262:"IFCSPATIALSTRUCTUREELEMENTTYPE",2706606064:"IFCSPATIALSTRUCTUREELEMENT",3626867408:"IFCRIGHTCIRCULARCYLINDER",4158566097:"IFCRIGHTCIRCULARCONE",1856042241:"IFCREVOLVEDAREASOLID",2914609552:"IFCRESOURCE",1401173127:"IFCRELVOIDSELEMENT",3451746338:"IFCRELSPACEBOUNDARY",366585022:"IFCRELSERVICESBUILDINGS",4122056220:"IFCRELSEQUENCE",1058617721:"IFCRELSCHEDULESCOSTITEMS",1245217292:"IFCRELREFERENCEDINSPATIALSTRUCTURE",750771296:"IFCRELPROJECTSELEMENT",202636808:"IFCRELOVERRIDESPROPERTIES",2051452291:"IFCRELOCCUPIESSPACES",3268803585:"IFCRELNESTS",4189434867:"IFCRELINTERACTIONREQUIREMENTS",279856033:"IFCRELFLOWCONTROLELEMENTS",3940055652:"IFCRELFILLSELEMENT",781010003:"IFCRELDEFINESBYTYPE",4186316022:"IFCRELDEFINESBYPROPERTIES",693640335:"IFCRELDEFINES",2551354335:"IFCRELDECOMPOSES",2802773753:"IFCRELCOVERSSPACES",886880790:"IFCRELCOVERSBLDGELEMENTS",3242617779:"IFCRELCONTAINEDINSPATIALSTRUCTURE",3678494232:"IFCRELCONNECTSWITHREALIZINGELEMENTS",504942748:"IFCRELCONNECTSWITHECCENTRICITY",1638771189:"IFCRELCONNECTSSTRUCTURALMEMBER",3912681535:"IFCRELCONNECTSSTRUCTURALELEMENT",2127690289:"IFCRELCONNECTSSTRUCTURALACTIVITY",3190031847:"IFCRELCONNECTSPORTS",4201705270:"IFCRELCONNECTSPORTTOELEMENT",3945020480:"IFCRELCONNECTSPATHELEMENTS",1204542856:"IFCRELCONNECTSELEMENTS",826625072:"IFCRELCONNECTS",2851387026:"IFCRELASSOCIATESPROFILEPROPERTIES",2655215786:"IFCRELASSOCIATESMATERIAL",3840914261:"IFCRELASSOCIATESLIBRARY",982818633:"IFCRELASSOCIATESDOCUMENT",2728634034:"IFCRELASSOCIATESCONSTRAINT",919958153:"IFCRELASSOCIATESCLASSIFICATION",4095574036:"IFCRELASSOCIATESAPPROVAL",1327628568:"IFCRELASSOCIATESAPPLIEDVALUE",1865459582:"IFCRELASSOCIATES",205026976:"IFCRELASSIGNSTORESOURCE",3372526763:"IFCRELASSIGNSTOPROJECTORDER",2857406711:"IFCRELASSIGNSTOPRODUCT",4278684876:"IFCRELASSIGNSTOPROCESS",1307041759:"IFCRELASSIGNSTOGROUP",2495723537:"IFCRELASSIGNSTOCONTROL",1683148259:"IFCRELASSIGNSTOACTOR",3939117080:"IFCRELASSIGNS",3454111270:"IFCRECTANGULARTRIMMEDSURFACE",2798486643:"IFCRECTANGULARPYRAMID",2770003689:"IFCRECTANGLEHOLLOWPROFILEDEF",3219374653:"IFCPROXY",1451395588:"IFCPROPERTYSET",4194566429:"IFCPROJECTIONCURVE",103090709:"IFCPROJECT",4208778838:"IFCPRODUCT",2945172077:"IFCPROCESS",220341763:"IFCPLANE",603570806:"IFCPLANARBOX",3566463478:"IFCPERMEABLECOVERINGPROPERTIES",3505215534:"IFCOFFSETCURVE3D",3388369263:"IFCOFFSETCURVE2D",3888040117:"IFCOBJECT",1425443689:"IFCMANIFOLDSOLIDBREP",1281925730:"IFCLINE",572779678:"IFCLSHAPEPROFILEDEF",1484403080:"IFCISHAPEPROFILEDEF",987898635:"IFCGEOMETRICCURVESET",1268542332:"IFCFURNITURETYPE",4238390223:"IFCFURNISHINGELEMENTTYPE",3455213021:"IFCFLUIDFLOWPROPERTIES",315944413:"IFCFILLAREASTYLETILES",4203026998:"IFCFILLAREASTYLETILESYMBOLWITHSTYLE",374418227:"IFCFILLAREASTYLEHATCHING",2047409740:"IFCFACEBASEDSURFACEMODEL",477187591:"IFCEXTRUDEDAREASOLID",80994333:"IFCENERGYPROPERTIES",2835456948:"IFCELLIPSEPROFILEDEF",2777663545:"IFCELEMENTARYSURFACE",339256511:"IFCELEMENTTYPE",1883228015:"IFCELEMENTQUANTITY",1472233963:"IFCEDGELOOP",4006246654:"IFCDRAUGHTINGPREDEFINEDCURVEFONT",445594917:"IFCDRAUGHTINGPREDEFINEDCOLOUR",3073041342:"IFCDRAUGHTINGCALLOUT",526551008:"IFCDOORSTYLE",1714330368:"IFCDOORPANELPROPERTIES",2963535650:"IFCDOORLININGPROPERTIES",32440307:"IFCDIRECTION",4054601972:"IFCDIMENSIONCURVETERMINATOR",606661476:"IFCDIMENSIONCURVE",693772133:"IFCDEFINEDSYMBOL",2827736869:"IFCCURVEBOUNDEDPLANE",2601014836:"IFCCURVE",2147822146:"IFCCSGSOLID",2506170314:"IFCCSGPRIMITIVE3D",194851669:"IFCCRANERAILFSHAPEPROFILEDEF",4133800736:"IFCCRANERAILASHAPEPROFILEDEF",2485617015:"IFCCOMPOSITECURVESEGMENT",2205249479:"IFCCLOSEDSHELL",1383045692:"IFCCIRCLEPROFILEDEF",1416205885:"IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM",3331915920:"IFCCARTESIANTRANSFORMATIONOPERATOR3D",3486308946:"IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM",3749851601:"IFCCARTESIANTRANSFORMATIONOPERATOR2D",59481748:"IFCCARTESIANTRANSFORMATIONOPERATOR",1123145078:"IFCCARTESIANPOINT",2898889636:"IFCCSHAPEPROFILEDEF",2713105998:"IFCBOXEDHALFSPACE",2581212453:"IFCBOUNDINGBOX",4182860854:"IFCBOUNDEDSURFACE",2736907675:"IFCBOOLEANRESULT",2740243338:"IFCAXIS2PLACEMENT3D",3125803723:"IFCAXIS2PLACEMENT2D",4261334040:"IFCAXIS1PLACEMENT",1302238472:"IFCANNOTATIONSURFACE",2265737646:"IFCANNOTATIONFILLAREAOCCURRENCE",669184980:"IFCANNOTATIONFILLAREA",3288037868:"IFCANNOTATIONCURVEOCCURRENCE",2543172580:"IFCZSHAPEPROFILEDEF",1299126871:"IFCWINDOWSTYLE",512836454:"IFCWINDOWPANELPROPERTIES",336235671:"IFCWINDOWLININGPROPERTIES",2759199220:"IFCVERTEXLOOP",1417489154:"IFCVECTOR",427810014:"IFCUSHAPEPROFILEDEF",2347495698:"IFCTYPEPRODUCT",1628702193:"IFCTYPEOBJECT",1345879162:"IFCTWODIRECTIONREPEATFACTOR",2715220739:"IFCTRAPEZIUMPROFILEDEF",3124975700:"IFCTEXTLITERALWITHEXTENT",4282788508:"IFCTEXTLITERAL",3028897424:"IFCTERMINATORSYMBOL",3071757647:"IFCTSHAPEPROFILEDEF",230924584:"IFCSWEPTSURFACE",1260650574:"IFCSWEPTDISKSOLID",2247615214:"IFCSWEPTAREASOLID",1878645084:"IFCSURFACESTYLERENDERING",2513912981:"IFCSURFACE",2233826070:"IFCSUBEDGE",3653947884:"IFCSTRUCTURALSTEELPROFILEPROPERTIES",3843319758:"IFCSTRUCTURALPROFILEPROPERTIES",1190533807:"IFCSTRUCTURALLOADSINGLEFORCEWARPING",1597423693:"IFCSTRUCTURALLOADSINGLEFORCE",1973038258:"IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION",2473145415:"IFCSTRUCTURALLOADSINGLEDISPLACEMENT",2668620305:"IFCSTRUCTURALLOADPLANARFORCE",1595516126:"IFCSTRUCTURALLOADLINEARFORCE",390701378:"IFCSPACETHERMALLOADPROPERTIES",1202362311:"IFCSOUNDVALUE",2485662743:"IFCSOUNDPROPERTIES",723233188:"IFCSOLIDMODEL",2609359061:"IFCSLIPPAGECONNECTIONCONDITION",4124623270:"IFCSHELLBASEDSURFACEMODEL",2411513650:"IFCSERVICELIFEFACTOR",1509187699:"IFCSECTIONEDSPINE",2778083089:"IFCROUNDEDRECTANGLEPROFILEDEF",478536968:"IFCRELATIONSHIP",3765753017:"IFCREINFORCEMENTDEFINITIONPROPERTIES",3413951693:"IFCREGULARTIMESERIES",3615266464:"IFCRECTANGLEPROFILEDEF",110355661:"IFCPROPERTYTABLEVALUE",3650150729:"IFCPROPERTYSINGLEVALUE",3357820518:"IFCPROPERTYSETDEFINITION",941946838:"IFCPROPERTYREFERENCEVALUE",2752243245:"IFCPROPERTYLISTVALUE",4166981789:"IFCPROPERTYENUMERATEDVALUE",1680319473:"IFCPROPERTYDEFINITION",871118103:"IFCPROPERTYBOUNDEDVALUE",673634403:"IFCPRODUCTDEFINITIONSHAPE",179317114:"IFCPREDEFINEDPOINTMARKERSYMBOL",433424934:"IFCPREDEFINEDDIMENSIONSYMBOL",2559016684:"IFCPREDEFINEDCURVEFONT",759155922:"IFCPREDEFINEDCOLOUR",2775532180:"IFCPOLYGONALBOUNDEDHALFSPACE",2924175390:"IFCPOLYLOOP",1423911732:"IFCPOINTONSURFACE",4022376103:"IFCPOINTONCURVE",2067069095:"IFCPOINT",1663979128:"IFCPLANAREXTENT",2004835150:"IFCPLACEMENT",597895409:"IFCPIXELTEXTURE",3021840470:"IFCPHYSICALCOMPLEXQUANTITY",2519244187:"IFCPATH",2529465313:"IFCPARAMETERIZEDPROFILEDEF",1029017970:"IFCORIENTEDEDGE",2665983363:"IFCOPENSHELL",2833995503:"IFCONEDIRECTIONREPEATFACTOR",219451334:"IFCOBJECTDEFINITION",1430189142:"IFCMECHANICALCONCRETEMATERIALPROPERTIES",2022407955:"IFCMATERIALDEFINITIONREPRESENTATION",2347385850:"IFCMAPPEDITEM",1008929658:"IFCLOOP",2624227202:"IFCLOCALPLACEMENT",3422422726:"IFCLIGHTSOURCESPOT",1520743889:"IFCLIGHTSOURCEPOSITIONAL",4266656042:"IFCLIGHTSOURCEGONIOMETRIC",2604431987:"IFCLIGHTSOURCEDIRECTIONAL",125510826:"IFCLIGHTSOURCEAMBIENT",1402838566:"IFCLIGHTSOURCE",3741457305:"IFCIRREGULARTIMESERIES",3905492369:"IFCIMAGETEXTURE",2445078500:"IFCHYGROSCOPICMATERIALPROPERTIES",812098782:"IFCHALFSPACESOLID",178086475:"IFCGRIDPLACEMENT",3590301190:"IFCGEOMETRICSET",4142052618:"IFCGEOMETRICREPRESENTATIONSUBCONTEXT",2453401579:"IFCGEOMETRICREPRESENTATIONITEM",3448662350:"IFCGEOMETRICREPRESENTATIONCONTEXT",1446786286:"IFCGENERALPROFILEPROPERTIES",803998398:"IFCGENERALMATERIALPROPERTIES",3857492461:"IFCFUELPROPERTIES",738692330:"IFCFILLAREASTYLE",4219587988:"IFCFAILURECONNECTIONCONDITION",3008276851:"IFCFACESURFACE",803316827:"IFCFACEOUTERBOUND",1809719519:"IFCFACEBOUND",2556980723:"IFCFACE",1860660968:"IFCEXTENDEDMATERIALPROPERTIES",476780140:"IFCEDGECURVE",3900360178:"IFCEDGE",4170525392:"IFCDRAUGHTINGPREDEFINEDTEXTFONT",3732053477:"IFCDOCUMENTREFERENCE",1694125774:"IFCDIMENSIONPAIR",2273265877:"IFCDIMENSIONCALLOUTRELATIONSHIP",3632507154:"IFCDERIVEDPROFILEDEF",3800577675:"IFCCURVESTYLE",2889183280:"IFCCONVERSIONBASEDUNIT",3050246964:"IFCCONTEXTDEPENDENTUNIT",45288368:"IFCCONNECTIONPOINTECCENTRICITY",1981873012:"IFCCONNECTIONCURVEGEOMETRY",370225590:"IFCCONNECTEDFACESET",1485152156:"IFCCOMPOSITEPROFILEDEF",2542286263:"IFCCOMPLEXPROPERTY",776857604:"IFCCOLOURRGB",647927063:"IFCCLASSIFICATIONREFERENCE",3150382593:"IFCCENTERLINEPROFILEDEF",616511568:"IFCBLOBTEXTURE",2705031697:"IFCARBITRARYPROFILEDEFWITHVOIDS",1310608509:"IFCARBITRARYOPENPROFILEDEF",3798115385:"IFCARBITRARYCLOSEDPROFILEDEF",2297822566:"IFCANNOTATIONTEXTOCCURRENCE",3612888222:"IFCANNOTATIONSYMBOLOCCURRENCE",962685235:"IFCANNOTATIONSURFACEOCCURRENCE",2442683028:"IFCANNOTATIONOCCURRENCE",1065908215:"IFCWATERPROPERTIES",891718957:"IFCVIRTUALGRIDINTERSECTION",1907098498:"IFCVERTEXPOINT",3304826586:"IFCVERTEXBASEDTEXTUREMAP",2799835756:"IFCVERTEX",180925521:"IFCUNITASSIGNMENT",1735638870:"IFCTOPOLOGYREPRESENTATION",1377556343:"IFCTOPOLOGICALREPRESENTATIONITEM",581633288:"IFCTIMESERIESVALUE",1718945513:"IFCTIMESERIESREFERENCERELATIONSHIP",3101149627:"IFCTIMESERIES",3317419933:"IFCTHERMALMATERIALPROPERTIES",1210645708:"IFCTEXTUREVERTEX",2552916305:"IFCTEXTUREMAP",1742049831:"IFCTEXTURECOORDINATEGENERATOR",280115917:"IFCTEXTURECOORDINATE",1484833681:"IFCTEXTSTYLEWITHBOXCHARACTERISTICS",1640371178:"IFCTEXTSTYLETEXTMODEL",2636378356:"IFCTEXTSTYLEFORDEFINEDFONT",1983826977:"IFCTEXTSTYLEFONTMODEL",1447204868:"IFCTEXTSTYLE",912023232:"IFCTELECOMADDRESS",531007025:"IFCTABLEROW",985171141:"IFCTABLE",1290481447:"IFCSYMBOLSTYLE",626085974:"IFCSURFACETEXTURE",1351298697:"IFCSURFACESTYLEWITHTEXTURES",846575682:"IFCSURFACESTYLESHADING",1607154358:"IFCSURFACESTYLEREFRACTION",3303107099:"IFCSURFACESTYLELIGHTING",1300840506:"IFCSURFACESTYLE",3049322572:"IFCSTYLEDREPRESENTATION",3958052878:"IFCSTYLEDITEM",2830218821:"IFCSTYLEMODEL",3408363356:"IFCSTRUCTURALLOADTEMPERATURE",2525727697:"IFCSTRUCTURALLOADSTATIC",2162789131:"IFCSTRUCTURALLOAD",2273995522:"IFCSTRUCTURALCONNECTIONCONDITION",3692461612:"IFCSIMPLEPROPERTY",4240577450:"IFCSHAPEREPRESENTATION",3982875396:"IFCSHAPEMODEL",867548509:"IFCSHAPEASPECT",4165799628:"IFCSECTIONREINFORCEMENTPROPERTIES",2042790032:"IFCSECTIONPROPERTIES",448429030:"IFCSIUNIT",2341007311:"IFCROOT",3679540991:"IFCRIBPLATEPROFILEPROPERTIES",1660063152:"IFCREPRESENTATIONMAP",3008791417:"IFCREPRESENTATIONITEM",3377609919:"IFCREPRESENTATIONCONTEXT",1076942058:"IFCREPRESENTATION",1222501353:"IFCRELAXATION",1580146022:"IFCREINFORCEMENTBARPROPERTIES",2692823254:"IFCREFERENCESVALUEDOCUMENT",825690147:"IFCQUANTITYWEIGHT",2405470396:"IFCQUANTITYVOLUME",3252649465:"IFCQUANTITYTIME",931644368:"IFCQUANTITYLENGTH",2093928680:"IFCQUANTITYCOUNT",2044713172:"IFCQUANTITYAREA",3710013099:"IFCPROPERTYENUMERATION",148025276:"IFCPROPERTYDEPENDENCYRELATIONSHIP",3896028662:"IFCPROPERTYCONSTRAINTRELATIONSHIP",2598011224:"IFCPROPERTY",2802850158:"IFCPROFILEPROPERTIES",3958567839:"IFCPROFILEDEF",2267347899:"IFCPRODUCTSOFCOMBUSTIONPROPERTIES",2095639259:"IFCPRODUCTREPRESENTATION",2417041796:"IFCPRESENTATIONSTYLEASSIGNMENT",3119450353:"IFCPRESENTATIONSTYLE",1304840413:"IFCPRESENTATIONLAYERWITHSTYLE",2022622350:"IFCPRESENTATIONLAYERASSIGNMENT",1775413392:"IFCPREDEFINEDTEXTFONT",3213052703:"IFCPREDEFINEDTERMINATORSYMBOL",990879717:"IFCPREDEFINEDSYMBOL",3727388367:"IFCPREDEFINEDITEM",3355820592:"IFCPOSTALADDRESS",2226359599:"IFCPHYSICALSIMPLEQUANTITY",2483315170:"IFCPHYSICALQUANTITY",101040310:"IFCPERSONANDORGANIZATION",2077209135:"IFCPERSON",1207048766:"IFCOWNERHISTORY",1411181986:"IFCORGANIZATIONRELATIONSHIP",4251960020:"IFCORGANIZATION",1227763645:"IFCOPTICALMATERIALPROPERTIES",2251480897:"IFCOBJECTIVE",3701648758:"IFCOBJECTPLACEMENT",1918398963:"IFCNAMEDUNIT",2706619895:"IFCMONETARYUNIT",3368373690:"IFCMETRIC",677618848:"IFCMECHANICALSTEELMATERIALPROPERTIES",4256014907:"IFCMECHANICALMATERIALPROPERTIES",2597039031:"IFCMEASUREWITHUNIT",3265635763:"IFCMATERIALPROPERTIES",2199411900:"IFCMATERIALLIST",1303795690:"IFCMATERIALLAYERSETUSAGE",3303938423:"IFCMATERIALLAYERSET",248100487:"IFCMATERIALLAYER",1847130766:"IFCMATERIALCLASSIFICATIONRELATIONSHIP",1838606355:"IFCMATERIAL",30780891:"IFCLOCALTIME",1566485204:"IFCLIGHTINTENSITYDISTRIBUTION",4162380809:"IFCLIGHTDISTRIBUTIONDATA",3452421091:"IFCLIBRARYREFERENCE",2655187982:"IFCLIBRARYINFORMATION",3020489413:"IFCIRREGULARTIMESERIESVALUE",852622518:"IFCGRIDAXIS",3548104201:"IFCEXTERNALLYDEFINEDTEXTFONT",3207319532:"IFCEXTERNALLYDEFINEDSYMBOL",1040185647:"IFCEXTERNALLYDEFINEDSURFACESTYLE",2242383968:"IFCEXTERNALLYDEFINEDHATCHSTYLE",3200245327:"IFCEXTERNALREFERENCE",1648886627:"IFCENVIRONMENTALIMPACTVALUE",3796139169:"IFCDRAUGHTINGCALLOUTRELATIONSHIP",770865208:"IFCDOCUMENTINFORMATIONRELATIONSHIP",1154170062:"IFCDOCUMENTINFORMATION",1376555844:"IFCDOCUMENTELECTRONICFORMAT",2949456006:"IFCDIMENSIONALEXPONENTS",1045800335:"IFCDERIVEDUNITELEMENT",1765591967:"IFCDERIVEDUNIT",1072939445:"IFCDATEANDTIME",3510044353:"IFCCURVESTYLEFONTPATTERN",2367409068:"IFCCURVESTYLEFONTANDSCALING",1105321065:"IFCCURVESTYLEFONT",539742890:"IFCCURRENCYRELATIONSHIP",602808272:"IFCCOSTVALUE",1065062679:"IFCCOORDINATEDUNIVERSALTIMEOFFSET",347226245:"IFCCONSTRAINTRELATIONSHIP",613356794:"IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP",1658513725:"IFCCONSTRAINTAGGREGATIONRELATIONSHIP",1959218052:"IFCCONSTRAINT",2732653382:"IFCCONNECTIONSURFACEGEOMETRY",4257277454:"IFCCONNECTIONPORTGEOMETRY",2614616156:"IFCCONNECTIONPOINTGEOMETRY",2859738748:"IFCCONNECTIONGEOMETRY",3264961684:"IFCCOLOURSPECIFICATION",3639012971:"IFCCLASSIFICATIONNOTATIONFACET",938368621:"IFCCLASSIFICATIONNOTATION",1098599126:"IFCCLASSIFICATIONITEMRELATIONSHIP",1767535486:"IFCCLASSIFICATIONITEM",747523909:"IFCCLASSIFICATION",622194075:"IFCCALENDARDATE",2069777674:"IFCBOUNDARYNODECONDITIONWARPING",1387855156:"IFCBOUNDARYNODECONDITION",3367102660:"IFCBOUNDARYFACECONDITION",1560379544:"IFCBOUNDARYEDGECONDITION",4037036970:"IFCBOUNDARYCONDITION",3869604511:"IFCAPPROVALRELATIONSHIP",390851274:"IFCAPPROVALPROPERTYRELATIONSHIP",2080292479:"IFCAPPROVALACTORRELATIONSHIP",130549933:"IFCAPPROVAL",1110488051:"IFCAPPLIEDVALUERELATIONSHIP",411424972:"IFCAPPLIEDVALUE",639542469:"IFCAPPLICATION",618182010:"IFCADDRESS",3630933823:"IFCACTORROLE",599546466:"FILE_DESCRIPTION",1390159747:"FILE_NAME",1109904537:"FILE_SCHEMA"};class mi{static async getUnits(e){var t,i,s;const{IFCUNITASSIGNMENT:n}=Ft,r=await e.getAllPropertiesOfType(n);if(!r)return 1;const o=Object.keys(r),a=r[parseInt(o[0],10)];for(const h of a.Units){if(h.value===void 0||h.value===null)continue;const c=await e.getProperties(h.value);if(!c||!c.UnitType||!c.UnitType.value||c.UnitType.value!=="LENGTHUNIT")continue;let u=1,d=1;return c.Name.value==="METRE"&&(d=1),c.Name.value==="FOOT"&&(d=.3048),((t=c.Prefix)==null?void 0:t.value)==="MILLI"?u=.001:((i=c.Prefix)==null?void 0:i.value)==="CENTI"?u=.01:((s=c.Prefix)==null?void 0:s.value)==="DECI"&&(u=.1),d*u}return 1}static async findItemByGuid(e,t){var i;const s=e.getAllPropertiesIDs();for(const n of s){const r=await e.getProperties(n);if(r&&((i=r.GlobalId)==null?void 0:i.value)===t)return r}return null}static async getRelationMap(e,t,i){var s;const n=i??(async()=>{}),r={},o=e.getAllPropertiesIDs();for(const a of o){const h=await e.getProperties(a);if(!h)continue;const c=h.type===t,u=Object.keys(h).find(I=>I.startsWith("Relating")),d=Object.keys(h).find(I=>I.startsWith("Related"));if(!(c&&u&&d))continue;const f=await e.getProperties((s=h[u])==null?void 0:s.value),m=h[d];if(!f||!m||!(m&&Array.isArray(m)))continue;const p=m.map(I=>I.value);await n(f.expressID,p),r[f.expressID]=p}return r}static async getQsetQuantities(e,t,i){const s=i??(()=>{}),n=await e.getProperties(t);return!n||n.type!==yn?null:(n.Quantities??[{}]).map(r=>(r.value&&s(r.value),r.value)).filter(r=>r!==null)}static async getPsetProps(e,t,i){const s=i??(()=>{}),n=await e.getProperties(t);return!n||n.type!==Wi?null:(n.HasProperties??[{}]).map(r=>(r.value&&s(r.value),r.value)).filter(r=>r!==null)}static async getPsetRel(e,t){var i;if(!await e.getProperties(t))return null;const s=await e.getAllPropertiesOfType(Ds);if(!s)return null;const n=Object.values(s);let r=null;for(const o of n)((i=o.RelatingPropertyDefinition)==null?void 0:i.value)===t&&(r=o.expressID);return r}static async getQsetRel(e,t){return mi.getPsetRel(e,t)}static async getEntityName(e,t){var i;const s=await e.getProperties(t);if(!s)return{key:null,name:null};const n=Object.keys(s).find(o=>o.endsWith("Name"))??null,r=n?(i=s[n])==null?void 0:i.value:null;return{key:n,name:r}}static async getQuantityValue(e,t){const i=await e.getProperties(t);if(!i)return{key:null,value:null};const s=Object.keys(i).find(r=>r.endsWith("Value"))??null;let n;return s===null||i[s]===void 0||i[s]===null?n=null:n=i[s].value,{key:s,value:n}}static isRel(e){return _n[e].startsWith("IFCREL")}static async attributeExists(e,t,i){const s=await e.getProperties(t);return s?Object.keys(s).includes(i):!1}static async groupEntitiesByType(e,t){var i;const s=new Map;for(const n of t){const r=await e.getProperties(n);if(!r)continue;const o=r.type;s.get(o)||s.set(o,new Set),(i=s.get(o))==null||i.add(n)}return s}}const ff={IFCURIREFERENCE:"IfcUriReference",IFCTIME:"IfcTime",IFCTEMPERATURERATEOFCHANGEMEASURE:"IfcTemperatureRateOfChangeMeasure",IFCSOUNDPRESSURELEVELMEASURE:"IfcSoundPressureLevelMeasure",IFCSOUNDPOWERLEVELMEASURE:"IfcSoundPowerLevelMeasure",IFCPROPERTYSETDEFINITIONSET:"IfcPropertySetDefinitionSet",IFCPOSITIVEINTEGER:"IfcPositiveInteger",IFCNONNEGATIVELENGTHMEASURE:"IfcNonNegativeLengthMeasure",IFCLINEINDEX:"IfcLineIndex",IFCLANGUAGEID:"IfcLanguageId",IFCDURATION:"IfcDuration",IFCDAYINWEEKNUMBER:"IfcDayInWeekNumber",IFCDATETIME:"IfcDateTime",IFCDATE:"IfcDate",IFCCARDINALPOINTREFERENCE:"IfcCardinalPointReference",IFCBINARY:"IfcBinary",IFCAREADENSITYMEASURE:"IfcAreaDensityMeasure",IFCARCINDEX:"IfcArcIndex",IFCYEARNUMBER:"IfcYearNumber",IFCWARPINGMOMENTMEASURE:"IfcWarpingMomentMeasure",IFCWARPINGCONSTANTMEASURE:"IfcWarpingConstantMeasure",IFCVOLUMETRICFLOWRATEMEASURE:"IfcVolumetricFlowRateMeasure",IFCVOLUMEMEASURE:"IfcVolumeMeasure",IFCVAPORPERMEABILITYMEASURE:"IfcVaporPermeabilityMeasure",IFCTORQUEMEASURE:"IfcTorqueMeasure",IFCTIMESTAMP:"IfcTimestamp",IFCTIMEMEASURE:"IfcTimeMeasure",IFCTHERMODYNAMICTEMPERATUREMEASURE:"IfcThermodynamicTemperatureMeasure",IFCTHERMALTRANSMITTANCEMEASURE:"IfcThermalTransmittanceMeasure",IFCTHERMALRESISTANCEMEASURE:"IfcThermalResistanceMeasure",IFCTHERMALEXPANSIONCOEFFICIENTMEASURE:"IfcThermalExpansionCoefficientMeasure",IFCTHERMALCONDUCTIVITYMEASURE:"IfcThermalConductivityMeasure",IFCTHERMALADMITTANCEMEASURE:"IfcThermalAdmittanceMeasure",IFCTEXTTRANSFORMATION:"IfcTextTransformation",IFCTEXTFONTNAME:"IfcTextFontName",IFCTEXTDECORATION:"IfcTextDecoration",IFCTEXTALIGNMENT:"IfcTextAlignment",IFCTEXT:"IfcText",IFCTEMPERATUREGRADIENTMEASURE:"IfcTemperatureGradientMeasure",IFCSPECULARROUGHNESS:"IfcSpecularRoughness",IFCSPECULAREXPONENT:"IfcSpecularExponent",IFCSPECIFICHEATCAPACITYMEASURE:"IfcSpecificHeatCapacityMeasure",IFCSOUNDPRESSUREMEASURE:"IfcSoundPressureMeasure",IFCSOUNDPOWERMEASURE:"IfcSoundPowerMeasure",IFCSOLIDANGLEMEASURE:"IfcSolidAngleMeasure",IFCSHEARMODULUSMEASURE:"IfcShearModulusMeasure",IFCSECTIONALAREAINTEGRALMEASURE:"IfcSectionalAreaIntegralMeasure",IFCSECTIONMODULUSMEASURE:"IfcSectionModulusMeasure",IFCSECONDINMINUTE:"IfcSecondInMinute",IFCROTATIONALSTIFFNESSMEASURE:"IfcRotationalStiffnessMeasure",IFCROTATIONALMASSMEASURE:"IfcRotationalMassMeasure",IFCROTATIONALFREQUENCYMEASURE:"IfcRotationalFrequencyMeasure",IFCREAL:"IfcReal",IFCRATIOMEASURE:"IfcRatioMeasure",IFCRADIOACTIVITYMEASURE:"IfcRadioactivityMeasure",IFCPRESSUREMEASURE:"IfcPressureMeasure",IFCPRESENTABLETEXT:"IfcPresentableText",IFCPOWERMEASURE:"IfcPowerMeasure",IFCPOSITIVERATIOMEASURE:"IfcPositiveRatioMeasure",IFCPOSITIVEPLANEANGLEMEASURE:"IfcPositivePlaneAngleMeasure",IFCPOSITIVELENGTHMEASURE:"IfcPositiveLengthMeasure",IFCPLANEANGLEMEASURE:"IfcPlaneAngleMeasure",IFCPLANARFORCEMEASURE:"IfcPlanarForceMeasure",IFCPARAMETERVALUE:"IfcParameterValue",IFCPHMEASURE:"IfcPhMeasure",IFCNUMERICMEASURE:"IfcNumericMeasure",IFCNORMALISEDRATIOMEASURE:"IfcNormalisedRatioMeasure",IFCMONTHINYEARNUMBER:"IfcMonthInYearNumber",IFCMONETARYMEASURE:"IfcMonetaryMeasure",IFCMOMENTOFINERTIAMEASURE:"IfcMomentOfInertiaMeasure",IFCMOLECULARWEIGHTMEASURE:"IfcMolecularWeightMeasure",IFCMOISTUREDIFFUSIVITYMEASURE:"IfcMoistureDiffusivityMeasure",IFCMODULUSOFSUBGRADEREACTIONMEASURE:"IfcModulusOfSubgradeReactionMeasure",IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE:"IfcModulusOfRotationalSubgradeReactionMeasure",IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE:"IfcModulusOfLinearSubgradeReactionMeasure",IFCMODULUSOFELASTICITYMEASURE:"IfcModulusOfElasticityMeasure",IFCMINUTEINHOUR:"IfcMinuteInHour",IFCMASSPERLENGTHMEASURE:"IfcMassPerLengthMeasure",IFCMASSMEASURE:"IfcMassMeasure",IFCMASSFLOWRATEMEASURE:"IfcMassFlowRateMeasure",IFCMASSDENSITYMEASURE:"IfcMassDensityMeasure",IFCMAGNETICFLUXMEASURE:"IfcMagneticFluxMeasure",IFCMAGNETICFLUXDENSITYMEASURE:"IfcMagneticFluxDensityMeasure",IFCLUMINOUSINTENSITYMEASURE:"IfcLuminousIntensityMeasure",IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE:"IfcLuminousIntensityDistributionMeasure",IFCLUMINOUSFLUXMEASURE:"IfcLuminousFluxMeasure",IFCLOGICAL:"IfcLogical",IFCLINEARVELOCITYMEASURE:"IfcLinearVelocityMeasure",IFCLINEARSTIFFNESSMEASURE:"IfcLinearStiffnessMeasure",IFCLINEARMOMENTMEASURE:"IfcLinearMomentMeasure",IFCLINEARFORCEMEASURE:"IfcLinearForceMeasure",IFCLENGTHMEASURE:"IfcLengthMeasure",IFCLABEL:"IfcLabel",IFCKINEMATICVISCOSITYMEASURE:"IfcKinematicViscosityMeasure",IFCISOTHERMALMOISTURECAPACITYMEASURE:"IfcIsothermalMoistureCapacityMeasure",IFCIONCONCENTRATIONMEASURE:"IfcIonConcentrationMeasure",IFCINTEGERCOUNTRATEMEASURE:"IfcIntegerCountRateMeasure",IFCINTEGER:"IfcInteger",IFCINDUCTANCEMEASURE:"IfcInductanceMeasure",IFCILLUMINANCEMEASURE:"IfcIlluminanceMeasure",IFCIDENTIFIER:"IfcIdentifier",IFCHOURINDAY:"IfcHourInDay",IFCHEATINGVALUEMEASURE:"IfcHeatingValueMeasure",IFCHEATFLUXDENSITYMEASURE:"IfcHeatFluxDensityMeasure",IFCGLOBALLYUNIQUEID:"IfcGloballyUniqueId",IFCFREQUENCYMEASURE:"IfcFrequencyMeasure",IFCFORCEMEASURE:"IfcForceMeasure",IFCFONTWEIGHT:"IfcFontWeight",IFCFONTVARIANT:"IfcFontVariant",IFCFONTSTYLE:"IfcFontStyle",IFCENERGYMEASURE:"IfcEnergyMeasure",IFCELECTRICVOLTAGEMEASURE:"IfcElectricVoltageMeasure",IFCELECTRICRESISTANCEMEASURE:"IfcElectricResistanceMeasure",IFCELECTRICCURRENTMEASURE:"IfcElectricCurrentMeasure",IFCELECTRICCONDUCTANCEMEASURE:"IfcElectricConductanceMeasure",IFCELECTRICCHARGEMEASURE:"IfcElectricChargeMeasure",IFCELECTRICCAPACITANCEMEASURE:"IfcElectricCapacitanceMeasure",IFCDYNAMICVISCOSITYMEASURE:"IfcDynamicViscosityMeasure",IFCDOSEEQUIVALENTMEASURE:"IfcDoseEquivalentMeasure",IFCDIMENSIONCOUNT:"IfcDimensionCount",IFCDESCRIPTIVEMEASURE:"IfcDescriptiveMeasure",IFCDAYLIGHTSAVINGHOUR:"IfcDaylightSavingHour",IFCDAYINMONTHNUMBER:"IfcDayInMonthNumber",IFCCURVATUREMEASURE:"IfcCurvatureMeasure",IFCCOUNTMEASURE:"IfcCountMeasure",IFCCONTEXTDEPENDENTMEASURE:"IfcContextDependentMeasure",IFCCOMPOUNDPLANEANGLEMEASURE:"IfcCompoundPlaneAngleMeasure",IFCCOMPLEXNUMBER:"IfcComplexNumber",IFCBOXALIGNMENT:"IfcBoxAlignment",IFCBOOLEAN:"IfcBoolean",IFCAREAMEASURE:"IfcAreaMeasure",IFCANGULARVELOCITYMEASURE:"IfcAngularVelocityMeasure",IFCAMOUNTOFSUBSTANCEMEASURE:"IfcAmountOfSubstanceMeasure",IFCACCELERATIONMEASURE:"IfcAccelerationMeasure",IFCABSORBEDDOSEMEASURE:"IfcAbsorbedDoseMeasure",IFCGEOSLICE:"IfcGeoSlice",IFCGEOMODEL:"IfcGeoModel",IFCELECTRICFLOWTREATMENTDEVICE:"IfcElectricFlowTreatmentDevice",IFCDISTRIBUTIONBOARD:"IfcDistributionBoard",IFCCONVEYORSEGMENT:"IfcConveyorSegment",IFCCAISSONFOUNDATION:"IfcCaissonFoundation",IFCBOREHOLE:"IfcBorehole",IFCBEARING:"IfcBearing",IFCALIGNMENT:"IfcAlignment",IFCTRACKELEMENT:"IfcTrackElement",IFCSIGNAL:"IfcSignal",IFCREINFORCEDSOIL:"IfcReinforcedSoil",IFCRAIL:"IfcRail",IFCPAVEMENT:"IfcPavement",IFCNAVIGATIONELEMENT:"IfcNavigationElement",IFCMOORINGDEVICE:"IfcMooringDevice",IFCMOBILETELECOMMUNICATIONSAPPLIANCE:"IfcMobileTelecommunicationsAppliance",IFCLIQUIDTERMINAL:"IfcLiquidTerminal",IFCLINEARPOSITIONINGELEMENT:"IfcLinearPositioningElement",IFCKERB:"IfcKerb",IFCGEOTECHNICALASSEMBLY:"IfcGeotechnicalAssembly",IFCELECTRICFLOWTREATMENTDEVICETYPE:"IfcElectricFlowTreatmentDeviceType",IFCEARTHWORKSFILL:"IfcEarthworksFill",IFCEARTHWORKSELEMENT:"IfcEarthworksElement",IFCEARTHWORKSCUT:"IfcEarthworksCut",IFCDISTRIBUTIONBOARDTYPE:"IfcDistributionBoardType",IFCDEEPFOUNDATION:"IfcDeepFoundation",IFCCOURSE:"IfcCourse",IFCCONVEYORSEGMENTTYPE:"IfcConveyorSegmentType",IFCCAISSONFOUNDATIONTYPE:"IfcCaissonFoundationType",IFCBUILTSYSTEM:"IfcBuiltSystem",IFCBUILTELEMENT:"IfcBuiltElement",IFCBRIDGEPART:"IfcBridgePart",IFCBRIDGE:"IfcBridge",IFCBEARINGTYPE:"IfcBearingType",IFCALIGNMENTVERTICAL:"IfcAlignmentVertical",IFCALIGNMENTSEGMENT:"IfcAlignmentSegment",IFCALIGNMENTHORIZONTAL:"IfcAlignmentHorizontal",IFCALIGNMENTCANT:"IfcAlignmentCant",IFCVIBRATIONDAMPERTYPE:"IfcVibrationDamperType",IFCVIBRATIONDAMPER:"IfcVibrationDamper",IFCVEHICLE:"IfcVehicle",IFCTRANSPORTATIONDEVICE:"IfcTransportationDevice",IFCTRACKELEMENTTYPE:"IfcTrackElementType",IFCTENDONCONDUITTYPE:"IfcTendonConduitType",IFCTENDONCONDUIT:"IfcTendonConduit",IFCSINESPIRAL:"IfcSineSpiral",IFCSIGNALTYPE:"IfcSignalType",IFCSIGNTYPE:"IfcSignType",IFCSIGN:"IfcSign",IFCSEVENTHORDERPOLYNOMIALSPIRAL:"IfcSeventhOrderPolynomialSpiral",IFCSEGMENTEDREFERENCECURVE:"IfcSegmentedReferenceCurve",IFCSECONDORDERPOLYNOMIALSPIRAL:"IfcSecondOrderPolynomialSpiral",IFCROADPART:"IfcRoadPart",IFCROAD:"IfcRoad",IFCRELADHERESTOELEMENT:"IfcRelAdheresToElement",IFCREFERENT:"IfcReferent",IFCRAILWAYPART:"IfcRailwayPart",IFCRAILWAY:"IfcRailway",IFCRAILTYPE:"IfcRailType",IFCPOSITIONINGELEMENT:"IfcPositioningElement",IFCPAVEMENTTYPE:"IfcPavementType",IFCNAVIGATIONELEMENTTYPE:"IfcNavigationElementType",IFCMOORINGDEVICETYPE:"IfcMooringDeviceType",IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE:"IfcMobileTelecommunicationsApplianceType",IFCMARINEPART:"IfcMarinePart",IFCMARINEFACILITY:"IfcMarineFacility",IFCLIQUIDTERMINALTYPE:"IfcLiquidTerminalType",IFCLINEARELEMENT:"IfcLinearElement",IFCKERBTYPE:"IfcKerbType",IFCIMPACTPROTECTIONDEVICETYPE:"IfcImpactProtectionDeviceType",IFCIMPACTPROTECTIONDEVICE:"IfcImpactProtectionDevice",IFCGRADIENTCURVE:"IfcGradientCurve",IFCGEOTECHNICALSTRATUM:"IfcGeotechnicalStratum",IFCGEOTECHNICALELEMENT:"IfcGeotechnicalElement",IFCFACILITYPARTCOMMON:"IfcFacilityPartCommon",IFCFACILITYPART:"IfcFacilityPart",IFCFACILITY:"IfcFacility",IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID:"IfcDirectrixDerivedReferenceSweptAreaSolid",IFCDEEPFOUNDATIONTYPE:"IfcDeepFoundationType",IFCCOURSETYPE:"IfcCourseType",IFCCOSINESPIRAL:"IfcCosineSpiral",IFCCLOTHOID:"IfcClothoid",IFCBUILTELEMENTTYPE:"IfcBuiltElementType",IFCVEHICLETYPE:"IfcVehicleType",IFCTRIANGULATEDIRREGULARNETWORK:"IfcTriangulatedIrregularNetwork",IFCTRANSPORTATIONDEVICETYPE:"IfcTransportationDeviceType",IFCTHIRDORDERPOLYNOMIALSPIRAL:"IfcThirdOrderPolynomialSpiral",IFCSPIRAL:"IfcSpiral",IFCSECTIONEDSURFACE:"IfcSectionedSurface",IFCSECTIONEDSOLIDHORIZONTAL:"IfcSectionedSolidHorizontal",IFCSECTIONEDSOLID:"IfcSectionedSolid",IFCRELPOSITIONS:"IfcRelPositions",IFCRELASSOCIATESPROFILEDEF:"IfcRelAssociatesProfileDef",IFCPOLYNOMIALCURVE:"IfcPolynomialCurve",IFCOFFSETCURVEBYDISTANCES:"IfcOffsetCurveByDistances",IFCOFFSETCURVE:"IfcOffsetCurve",IFCINDEXEDPOLYGONALTEXTUREMAP:"IfcIndexedPolygonalTextureMap",IFCDIRECTRIXCURVESWEPTAREASOLID:"IfcDirectrixCurveSweptAreaSolid",IFCCURVESEGMENT:"IfcCurveSegment",IFCAXIS2PLACEMENTLINEAR:"IfcAxis2PlacementLinear",IFCSEGMENT:"IfcSegment",IFCPOINTBYDISTANCEEXPRESSION:"IfcPointByDistanceExpression",IFCOPENCROSSPROFILEDEF:"IfcOpenCrossProfileDef",IFCLINEARPLACEMENT:"IfcLinearPlacement",IFCALIGNMENTHORIZONTALSEGMENT:"IfcAlignmentHorizontalSegment",IFCALIGNMENTCANTSEGMENT:"IfcAlignmentCantSegment",IFCTEXTURECOORDINATEINDICESWITHVOIDS:"IfcTextureCoordinateIndicesWithVoids",IFCTEXTURECOORDINATEINDICES:"IfcTextureCoordinateIndices",IFCQUANTITYNUMBER:"IfcQuantityNumber",IFCALIGNMENTVERTICALSEGMENT:"IfcAlignmentVerticalSegment",IFCALIGNMENTPARAMETERSEGMENT:"IfcAlignmentParameterSegment",IFCCONTROLLER:"IfcController",IFCALARM:"IfcAlarm",IFCACTUATOR:"IfcActuator",IFCUNITARYCONTROLELEMENT:"IfcUnitaryControlElement",IFCSENSOR:"IfcSensor",IFCPROTECTIVEDEVICETRIPPINGUNIT:"IfcProtectiveDeviceTrippingUnit",IFCFLOWINSTRUMENT:"IfcFlowInstrument",IFCFIRESUPPRESSIONTERMINAL:"IfcFireSuppressionTerminal",IFCFILTER:"IfcFilter",IFCFAN:"IfcFan",IFCELECTRICTIMECONTROL:"IfcElectricTimeControl",IFCELECTRICMOTOR:"IfcElectricMotor",IFCELECTRICGENERATOR:"IfcElectricGenerator",IFCELECTRICFLOWSTORAGEDEVICE:"IfcElectricFlowStorageDevice",IFCELECTRICDISTRIBUTIONBOARD:"IfcElectricDistributionBoard",IFCELECTRICAPPLIANCE:"IfcElectricAppliance",IFCDUCTSILENCER:"IfcDuctSilencer",IFCDUCTSEGMENT:"IfcDuctSegment",IFCDUCTFITTING:"IfcDuctFitting",IFCDISTRIBUTIONCIRCUIT:"IfcDistributionCircuit",IFCDAMPER:"IfcDamper",IFCCOOLINGTOWER:"IfcCoolingTower",IFCCOOLEDBEAM:"IfcCooledBeam",IFCCONDENSER:"IfcCondenser",IFCCOMPRESSOR:"IfcCompressor",IFCCOMMUNICATIONSAPPLIANCE:"IfcCommunicationsAppliance",IFCCOIL:"IfcCoil",IFCCHILLER:"IfcChiller",IFCCABLESEGMENT:"IfcCableSegment",IFCCABLEFITTING:"IfcCableFitting",IFCCABLECARRIERSEGMENT:"IfcCableCarrierSegment",IFCCABLECARRIERFITTING:"IfcCableCarrierFitting",IFCBURNER:"IfcBurner",IFCBOILER:"IfcBoiler",IFCBEAMSTANDARDCASE:"IfcBeamStandardCase",IFCAUDIOVISUALAPPLIANCE:"IfcAudioVisualAppliance",IFCAIRTOAIRHEATRECOVERY:"IfcAirToAirHeatRecovery",IFCAIRTERMINALBOX:"IfcAirTerminalBox",IFCAIRTERMINAL:"IfcAirTerminal",IFCWINDOWSTANDARDCASE:"IfcWindowStandardCase",IFCWASTETERMINAL:"IfcWasteTerminal",IFCWALLELEMENTEDCASE:"IfcWallElementedCase",IFCVALVE:"IfcValve",IFCUNITARYEQUIPMENT:"IfcUnitaryEquipment",IFCUNITARYCONTROLELEMENTTYPE:"IfcUnitaryControlElementType",IFCTUBEBUNDLE:"IfcTubeBundle",IFCTRANSFORMER:"IfcTransformer",IFCTANK:"IfcTank",IFCSWITCHINGDEVICE:"IfcSwitchingDevice",IFCSTRUCTURALLOADCASE:"IfcStructuralLoadCase",IFCSTACKTERMINAL:"IfcStackTerminal",IFCSPACEHEATER:"IfcSpaceHeater",IFCSOLARDEVICE:"IfcSolarDevice",IFCSLABSTANDARDCASE:"IfcSlabStandardCase",IFCSLABELEMENTEDCASE:"IfcSlabElementedCase",IFCSHADINGDEVICE:"IfcShadingDevice",IFCSANITARYTERMINAL:"IfcSanitaryTerminal",IFCREINFORCINGBARTYPE:"IfcReinforcingBarType",IFCRATIONALBSPLINECURVEWITHKNOTS:"IfcRationalBSplineCurveWithKnots",IFCPUMP:"IfcPump",IFCPROTECTIVEDEVICETRIPPINGUNITTYPE:"IfcProtectiveDeviceTrippingUnitType",IFCPROTECTIVEDEVICE:"IfcProtectiveDevice",IFCPLATESTANDARDCASE:"IfcPlateStandardCase",IFCPIPESEGMENT:"IfcPipeSegment",IFCPIPEFITTING:"IfcPipeFitting",IFCOUTLET:"IfcOutlet",IFCOUTERBOUNDARYCURVE:"IfcOuterBoundaryCurve",IFCMOTORCONNECTION:"IfcMotorConnection",IFCMEMBERSTANDARDCASE:"IfcMemberStandardCase",IFCMEDICALDEVICE:"IfcMedicalDevice",IFCLIGHTFIXTURE:"IfcLightFixture",IFCLAMP:"IfcLamp",IFCJUNCTIONBOX:"IfcJunctionBox",IFCINTERCEPTOR:"IfcInterceptor",IFCHUMIDIFIER:"IfcHumidifier",IFCHEATEXCHANGER:"IfcHeatExchanger",IFCFLOWMETER:"IfcFlowMeter",IFCEXTERNALSPATIALELEMENT:"IfcExternalSpatialElement",IFCEVAPORATOR:"IfcEvaporator",IFCEVAPORATIVECOOLER:"IfcEvaporativeCooler",IFCENGINE:"IfcEngine",IFCELECTRICDISTRIBUTIONBOARDTYPE:"IfcElectricDistributionBoardType",IFCDOORSTANDARDCASE:"IfcDoorStandardCase",IFCDISTRIBUTIONSYSTEM:"IfcDistributionSystem",IFCCOMMUNICATIONSAPPLIANCETYPE:"IfcCommunicationsApplianceType",IFCCOLUMNSTANDARDCASE:"IfcColumnStandardCase",IFCCIVILELEMENT:"IfcCivilElement",IFCCHIMNEY:"IfcChimney",IFCCABLEFITTINGTYPE:"IfcCableFittingType",IFCBURNERTYPE:"IfcBurnerType",IFCBUILDINGSYSTEM:"IfcBuildingSystem",IFCBUILDINGELEMENTPARTTYPE:"IfcBuildingElementPartType",IFCBOUNDARYCURVE:"IfcBoundaryCurve",IFCBSPLINECURVEWITHKNOTS:"IfcBSplineCurveWithKnots",IFCAUDIOVISUALAPPLIANCETYPE:"IfcAudioVisualApplianceType",IFCWORKCALENDAR:"IfcWorkCalendar",IFCWINDOWTYPE:"IfcWindowType",IFCVOIDINGFEATURE:"IfcVoidingFeature",IFCVIBRATIONISOLATOR:"IfcVibrationIsolator",IFCTENDONTYPE:"IfcTendonType",IFCTENDONANCHORTYPE:"IfcTendonAnchorType",IFCSYSTEMFURNITUREELEMENT:"IfcSystemFurnitureElement",IFCSURFACEFEATURE:"IfcSurfaceFeature",IFCSTRUCTURALSURFACEACTION:"IfcStructuralSurfaceAction",IFCSTRUCTURALCURVEREACTION:"IfcStructuralCurveReaction",IFCSTRUCTURALCURVEACTION:"IfcStructuralCurveAction",IFCSTAIRTYPE:"IfcStairType",IFCSOLARDEVICETYPE:"IfcSolarDeviceType",IFCSHADINGDEVICETYPE:"IfcShadingDeviceType",IFCSEAMCURVE:"IfcSeamCurve",IFCROOFTYPE:"IfcRoofType",IFCREINFORCINGMESHTYPE:"IfcReinforcingMeshType",IFCREINFORCINGELEMENTTYPE:"IfcReinforcingElementType",IFCRATIONALBSPLINESURFACEWITHKNOTS:"IfcRationalBSplineSurfaceWithKnots",IFCRAMPTYPE:"IfcRampType",IFCPOLYGONALFACESET:"IfcPolygonalFaceSet",IFCPILETYPE:"IfcPileType",IFCOPENINGSTANDARDCASE:"IfcOpeningStandardCase",IFCMEDICALDEVICETYPE:"IfcMedicalDeviceType",IFCINTERSECTIONCURVE:"IfcIntersectionCurve",IFCINTERCEPTORTYPE:"IfcInterceptorType",IFCINDEXEDPOLYCURVE:"IfcIndexedPolyCurve",IFCGEOGRAPHICELEMENT:"IfcGeographicElement",IFCFURNITURE:"IfcFurniture",IFCFOOTINGTYPE:"IfcFootingType",IFCEXTERNALSPATIALSTRUCTUREELEMENT:"IfcExternalSpatialStructureElement",IFCEVENT:"IfcEvent",IFCENGINETYPE:"IfcEngineType",IFCELEMENTASSEMBLYTYPE:"IfcElementAssemblyType",IFCDOORTYPE:"IfcDoorType",IFCCYLINDRICALSURFACE:"IfcCylindricalSurface",IFCCONSTRUCTIONPRODUCTRESOURCETYPE:"IfcConstructionProductResourceType",IFCCONSTRUCTIONMATERIALRESOURCETYPE:"IfcConstructionMaterialResourceType",IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE:"IfcConstructionEquipmentResourceType",IFCCOMPOSITECURVEONSURFACE:"IfcCompositeCurveOnSurface",IFCCOMPLEXPROPERTYTEMPLATE:"IfcComplexPropertyTemplate",IFCCIVILELEMENTTYPE:"IfcCivilElementType",IFCCHIMNEYTYPE:"IfcChimneyType",IFCBSPLINESURFACEWITHKNOTS:"IfcBSplineSurfaceWithKnots",IFCBSPLINESURFACE:"IfcBSplineSurface",IFCADVANCEDBREPWITHVOIDS:"IfcAdvancedBrepWithVoids",IFCADVANCEDBREP:"IfcAdvancedBrep",IFCTRIANGULATEDFACESET:"IfcTriangulatedFaceSet",IFCTOROIDALSURFACE:"IfcToroidalSurface",IFCTESSELLATEDFACESET:"IfcTessellatedFaceSet",IFCTASKTYPE:"IfcTaskType",IFCSURFACECURVE:"IfcSurfaceCurve",IFCSUBCONTRACTRESOURCETYPE:"IfcSubContractResourceType",IFCSTRUCTURALSURFACEREACTION:"IfcStructuralSurfaceReaction",IFCSPHERICALSURFACE:"IfcSphericalSurface",IFCSPATIALZONETYPE:"IfcSpatialZoneType",IFCSPATIALZONE:"IfcSpatialZone",IFCSPATIALELEMENTTYPE:"IfcSpatialElementType",IFCSPATIALELEMENT:"IfcSpatialElement",IFCSIMPLEPROPERTYTEMPLATE:"IfcSimplePropertyTemplate",IFCREVOLVEDAREASOLIDTAPERED:"IfcRevolvedAreaSolidTapered",IFCREPARAMETRISEDCOMPOSITECURVESEGMENT:"IfcReparametrisedCompositeCurveSegment",IFCRELSPACEBOUNDARY2NDLEVEL:"IfcRelSpaceBoundary2ndLevel",IFCRELSPACEBOUNDARY1STLEVEL:"IfcRelSpaceBoundary1stLevel",IFCRELINTERFERESELEMENTS:"IfcRelInterferesElements",IFCRELDEFINESBYTEMPLATE:"IfcRelDefinesByTemplate",IFCRELDEFINESBYOBJECT:"IfcRelDefinesByObject",IFCRELDECLARES:"IfcRelDeclares",IFCRELASSIGNSTOGROUPBYFACTOR:"IfcRelAssignsToGroupByFactor",IFCPROPERTYTEMPLATE:"IfcPropertyTemplate",IFCPROPERTYSETTEMPLATE:"IfcPropertySetTemplate",IFCPROJECTLIBRARY:"IfcProjectLibrary",IFCPROCEDURETYPE:"IfcProcedureType",IFCPREDEFINEDPROPERTYSET:"IfcPredefinedPropertySet",IFCPCURVE:"IfcPCurve",IFCLABORRESOURCETYPE:"IfcLaborResourceType",IFCINDEXEDPOLYGONALFACEWITHVOIDS:"IfcIndexedPolygonalFaceWithVoids",IFCINDEXEDPOLYGONALFACE:"IfcIndexedPolygonalFace",IFCGEOGRAPHICELEMENTTYPE:"IfcGeographicElementType",IFCFIXEDREFERENCESWEPTAREASOLID:"IfcFixedReferenceSweptAreaSolid",IFCEXTRUDEDAREASOLIDTAPERED:"IfcExtrudedAreaSolidTapered",IFCEVENTTYPE:"IfcEventType",IFCCURVEBOUNDEDSURFACE:"IfcCurveBoundedSurface",IFCCREWRESOURCETYPE:"IfcCrewResourceType",IFCCONTEXT:"IfcContext",IFCCONSTRUCTIONRESOURCETYPE:"IfcConstructionResourceType",IFCCARTESIANPOINTLIST3D:"IfcCartesianPointList3D",IFCCARTESIANPOINTLIST2D:"IfcCartesianPointList2D",IFCCARTESIANPOINTLIST:"IfcCartesianPointList",IFCADVANCEDFACE:"IfcAdvancedFace",IFCTYPERESOURCE:"IfcTypeResource",IFCTYPEPROCESS:"IfcTypeProcess",IFCTESSELLATEDITEM:"IfcTessellatedItem",IFCSWEPTDISKSOLIDPOLYGONAL:"IfcSweptDiskSolidPolygonal",IFCRESOURCETIME:"IfcResourceTime",IFCRESOURCECONSTRAINTRELATIONSHIP:"IfcResourceConstraintRelationship",IFCRESOURCEAPPROVALRELATIONSHIP:"IfcResourceApprovalRelationship",IFCQUANTITYSET:"IfcQuantitySet",IFCPROPERTYTEMPLATEDEFINITION:"IfcPropertyTemplateDefinition",IFCPREDEFINEDPROPERTIES:"IfcPredefinedProperties",IFCMIRROREDPROFILEDEF:"IfcMirroredProfileDef",IFCMATERIALRELATIONSHIP:"IfcMaterialRelationship",IFCMATERIALPROFILESETUSAGETAPERING:"IfcMaterialProfileSetUsageTapering",IFCMATERIALPROFILESETUSAGE:"IfcMaterialProfileSetUsage",IFCMATERIALCONSTITUENTSET:"IfcMaterialConstituentSet",IFCMATERIALCONSTITUENT:"IfcMaterialConstituent",IFCLAGTIME:"IfcLagTime",IFCINDEXEDTRIANGLETEXTUREMAP:"IfcIndexedTriangleTextureMap",IFCINDEXEDTEXTUREMAP:"IfcIndexedTextureMap",IFCINDEXEDCOLOURMAP:"IfcIndexedColourMap",IFCEXTERNALREFERENCERELATIONSHIP:"IfcExternalReferenceRelationship",IFCEXTENDEDPROPERTIES:"IfcExtendedProperties",IFCEVENTTIME:"IfcEventTime",IFCCONVERSIONBASEDUNITWITHOFFSET:"IfcConversionBasedUnitWithOffset",IFCCOLOURRGBLIST:"IfcColourRgbList",IFCWORKTIME:"IfcWorkTime",IFCTIMEPERIOD:"IfcTimePeriod",IFCTEXTUREVERTEXLIST:"IfcTextureVertexList",IFCTASKTIMERECURRING:"IfcTaskTimeRecurring",IFCTASKTIME:"IfcTaskTime",IFCTABLECOLUMN:"IfcTableColumn",IFCSURFACEREINFORCEMENTAREA:"IfcSurfaceReinforcementArea",IFCSTRUCTURALLOADORRESULT:"IfcStructuralLoadOrResult",IFCSTRUCTURALLOADCONFIGURATION:"IfcStructuralLoadConfiguration",IFCSCHEDULINGTIME:"IfcSchedulingTime",IFCRESOURCELEVELRELATIONSHIP:"IfcResourceLevelRelationship",IFCREFERENCE:"IfcReference",IFCRECURRENCEPATTERN:"IfcRecurrencePattern",IFCPROPERTYABSTRACTION:"IfcPropertyAbstraction",IFCPROJECTEDCRS:"IfcProjectedCrs",IFCPRESENTATIONITEM:"IfcPresentationItem",IFCMATERIALUSAGEDEFINITION:"IfcMaterialUsageDefinition",IFCMATERIALPROFILEWITHOFFSETS:"IfcMaterialProfileWithOffsets",IFCMATERIALPROFILESET:"IfcMaterialProfileSet",IFCMATERIALPROFILE:"IfcMaterialProfile",IFCMATERIALLAYERWITHOFFSETS:"IfcMaterialLayerWithOffsets",IFCMATERIALDEFINITION:"IfcMaterialDefinition",IFCMAPCONVERSION:"IfcMapConversion",IFCEXTERNALINFORMATION:"IfcExternalInformation",IFCCOORDINATEREFERENCESYSTEM:"IfcCoordinateReferenceSystem",IFCCOORDINATEOPERATION:"IfcCoordinateOperation",IFCCONNECTIONVOLUMEGEOMETRY:"IfcConnectionVolumeGeometry",IFCREINFORCINGBAR:"IfcReinforcingBar",IFCELECTRICDISTRIBUTIONPOINT:"IfcElectricDistributionPoint",IFCDISTRIBUTIONCONTROLELEMENT:"IfcDistributionControlElement",IFCDISTRIBUTIONCHAMBERELEMENT:"IfcDistributionChamberElement",IFCCONTROLLERTYPE:"IfcControllerType",IFCCHAMFEREDGEFEATURE:"IfcChamferEdgeFeature",IFCBEAM:"IfcBeam",IFCALARMTYPE:"IfcAlarmType",IFCACTUATORTYPE:"IfcActuatorType",IFCWINDOW:"IfcWindow",IFCWALLSTANDARDCASE:"IfcWallStandardCase",IFCWALL:"IfcWall",IFCVIBRATIONISOLATORTYPE:"IfcVibrationIsolatorType",IFCTENDONANCHOR:"IfcTendonAnchor",IFCTENDON:"IfcTendon",IFCSTRUCTURALANALYSISMODEL:"IfcStructuralAnalysisModel",IFCSTAIRFLIGHT:"IfcStairFlight",IFCSTAIR:"IfcStair",IFCSLAB:"IfcSlab",IFCSENSORTYPE:"IfcSensorType",IFCROUNDEDEDGEFEATURE:"IfcRoundedEdgeFeature",IFCROOF:"IfcRoof",IFCREINFORCINGMESH:"IfcReinforcingMesh",IFCREINFORCINGELEMENT:"IfcReinforcingElement",IFCRATIONALBEZIERCURVE:"IfcRationalBezierCurve",IFCRAMPFLIGHT:"IfcRampFlight",IFCRAMP:"IfcRamp",IFCRAILING:"IfcRailing",IFCPLATE:"IfcPlate",IFCPILE:"IfcPile",IFCMEMBER:"IfcMember",IFCFOOTING:"IfcFooting",IFCFLOWTREATMENTDEVICE:"IfcFlowTreatmentDevice",IFCFLOWTERMINAL:"IfcFlowTerminal",IFCFLOWSTORAGEDEVICE:"IfcFlowStorageDevice",IFCFLOWSEGMENT:"IfcFlowSegment",IFCFLOWMOVINGDEVICE:"IfcFlowMovingDevice",IFCFLOWINSTRUMENTTYPE:"IfcFlowInstrumentType",IFCFLOWFITTING:"IfcFlowFitting",IFCFLOWCONTROLLER:"IfcFlowController",IFCFIRESUPPRESSIONTERMINALTYPE:"IfcFireSuppressionTerminalType",IFCFILTERTYPE:"IfcFilterType",IFCFANTYPE:"IfcFanType",IFCENERGYCONVERSIONDEVICE:"IfcEnergyConversionDevice",IFCELECTRICALELEMENT:"IfcElectricalElement",IFCELECTRICALCIRCUIT:"IfcElectricalCircuit",IFCELECTRICTIMECONTROLTYPE:"IfcElectricTimeControlType",IFCELECTRICMOTORTYPE:"IfcElectricMotorType",IFCELECTRICHEATERTYPE:"IfcElectricHeaterType",IFCELECTRICGENERATORTYPE:"IfcElectricGeneratorType",IFCELECTRICFLOWSTORAGEDEVICETYPE:"IfcElectricFlowStorageDeviceType",IFCELECTRICAPPLIANCETYPE:"IfcElectricApplianceType",IFCEDGEFEATURE:"IfcEdgeFeature",IFCDUCTSILENCERTYPE:"IfcDuctSilencerType",IFCDUCTSEGMENTTYPE:"IfcDuctSegmentType",IFCDUCTFITTINGTYPE:"IfcDuctFittingType",IFCDOOR:"IfcDoor",IFCDISTRIBUTIONPORT:"IfcDistributionPort",IFCDISTRIBUTIONFLOWELEMENT:"IfcDistributionFlowElement",IFCDISTRIBUTIONELEMENT:"IfcDistributionElement",IFCDISTRIBUTIONCONTROLELEMENTTYPE:"IfcDistributionControlElementType",IFCDISTRIBUTIONCHAMBERELEMENTTYPE:"IfcDistributionChamberElementType",IFCDISCRETEACCESSORYTYPE:"IfcDiscreteAccessoryType",IFCDISCRETEACCESSORY:"IfcDiscreteAccessory",IFCDIAMETERDIMENSION:"IfcDiameterDimension",IFCDAMPERTYPE:"IfcDamperType",IFCCURTAINWALL:"IfcCurtainWall",IFCCOVERING:"IfcCovering",IFCCOOLINGTOWERTYPE:"IfcCoolingTowerType",IFCCOOLEDBEAMTYPE:"IfcCooledBeamType",IFCCONSTRUCTIONPRODUCTRESOURCE:"IfcConstructionProductResource",IFCCONSTRUCTIONMATERIALRESOURCE:"IfcConstructionMaterialResource",IFCCONSTRUCTIONEQUIPMENTRESOURCE:"IfcConstructionEquipmentResource",IFCCONDITIONCRITERION:"IfcConditionCriterion",IFCCONDITION:"IfcCondition",IFCCONDENSERTYPE:"IfcCondenserType",IFCCOMPRESSORTYPE:"IfcCompressorType",IFCCOLUMN:"IfcColumn",IFCCOILTYPE:"IfcCoilType",IFCCIRCLE:"IfcCircle",IFCCHILLERTYPE:"IfcChillerType",IFCCABLESEGMENTTYPE:"IfcCableSegmentType",IFCCABLECARRIERSEGMENTTYPE:"IfcCableCarrierSegmentType",IFCCABLECARRIERFITTINGTYPE:"IfcCableCarrierFittingType",IFCBUILDINGELEMENTPROXYTYPE:"IfcBuildingElementProxyType",IFCBUILDINGELEMENTPROXY:"IfcBuildingElementProxy",IFCBUILDINGELEMENTPART:"IfcBuildingElementPart",IFCBUILDINGELEMENTCOMPONENT:"IfcBuildingElementComponent",IFCBUILDINGELEMENT:"IfcBuildingElement",IFCBOILERTYPE:"IfcBoilerType",IFCBEZIERCURVE:"IfcBezierCurve",IFCBEAMTYPE:"IfcBeamType",IFCBSPLINECURVE:"IfcBSplineCurve",IFCASSET:"IfcAsset",IFCANGULARDIMENSION:"IfcAngularDimension",IFCAIRTOAIRHEATRECOVERYTYPE:"IfcAirToAirHeatRecoveryType",IFCAIRTERMINALTYPE:"IfcAirTerminalType",IFCAIRTERMINALBOXTYPE:"IfcAirTerminalBoxType",IFCACTIONREQUEST:"IfcActionRequest",IFC2DCOMPOSITECURVE:"Ifc2DCompositeCurve",IFCZONE:"IfcZone",IFCWORKSCHEDULE:"IfcWorkSchedule",IFCWORKPLAN:"IfcWorkPlan",IFCWORKCONTROL:"IfcWorkControl",IFCWASTETERMINALTYPE:"IfcWasteTerminalType",IFCWALLTYPE:"IfcWallType",IFCVIRTUALELEMENT:"IfcVirtualElement",IFCVALVETYPE:"IfcValveType",IFCUNITARYEQUIPMENTTYPE:"IfcUnitaryEquipmentType",IFCTUBEBUNDLETYPE:"IfcTubeBundleType",IFCTRIMMEDCURVE:"IfcTrimmedCurve",IFCTRANSPORTELEMENT:"IfcTransportElement",IFCTRANSFORMERTYPE:"IfcTransformerType",IFCTIMESERIESSCHEDULE:"IfcTimeSeriesSchedule",IFCTANKTYPE:"IfcTankType",IFCSYSTEM:"IfcSystem",IFCSWITCHINGDEVICETYPE:"IfcSwitchingDeviceType",IFCSUBCONTRACTRESOURCE:"IfcSubContractResource",IFCSTRUCTURALSURFACECONNECTION:"IfcStructuralSurfaceConnection",IFCSTRUCTURALRESULTGROUP:"IfcStructuralResultGroup",IFCSTRUCTURALPOINTREACTION:"IfcStructuralPointReaction",IFCSTRUCTURALPOINTCONNECTION:"IfcStructuralPointConnection",IFCSTRUCTURALPOINTACTION:"IfcStructuralPointAction",IFCSTRUCTURALPLANARACTIONVARYING:"IfcStructuralPlanarActionVarying",IFCSTRUCTURALPLANARACTION:"IfcStructuralPlanarAction",IFCSTRUCTURALLOADGROUP:"IfcStructuralLoadGroup",IFCSTRUCTURALLINEARACTIONVARYING:"IfcStructuralLinearActionVarying",IFCSTRUCTURALLINEARACTION:"IfcStructuralLinearAction",IFCSTRUCTURALCURVEMEMBERVARYING:"IfcStructuralCurveMemberVarying",IFCSTRUCTURALCURVEMEMBER:"IfcStructuralCurveMember",IFCSTRUCTURALCURVECONNECTION:"IfcStructuralCurveConnection",IFCSTRUCTURALCONNECTION:"IfcStructuralConnection",IFCSTRUCTURALACTION:"IfcStructuralAction",IFCSTAIRFLIGHTTYPE:"IfcStairFlightType",IFCSTACKTERMINALTYPE:"IfcStackTerminalType",IFCSPACETYPE:"IfcSpaceType",IFCSPACEPROGRAM:"IfcSpaceProgram",IFCSPACEHEATERTYPE:"IfcSpaceHeaterType",IFCSPACE:"IfcSpace",IFCSLABTYPE:"IfcSlabType",IFCSITE:"IfcSite",IFCSERVICELIFE:"IfcServiceLife",IFCSCHEDULETIMECONTROL:"IfcScheduleTimeControl",IFCSANITARYTERMINALTYPE:"IfcSanitaryTerminalType",IFCRELASSIGNSTASKS:"IfcRelAssignsTasks",IFCRELAGGREGATES:"IfcRelAggregates",IFCRAMPFLIGHTTYPE:"IfcRampFlightType",IFCRAILINGTYPE:"IfcRailingType",IFCRADIUSDIMENSION:"IfcRadiusDimension",IFCPUMPTYPE:"IfcPumpType",IFCPROTECTIVEDEVICETYPE:"IfcProtectiveDeviceType",IFCPROJECTIONELEMENT:"IfcProjectionElement",IFCPROJECTORDERRECORD:"IfcProjectOrderRecord",IFCPROJECTORDER:"IfcProjectOrder",IFCPROCEDURE:"IfcProcedure",IFCPORT:"IfcPort",IFCPOLYLINE:"IfcPolyline",IFCPLATETYPE:"IfcPlateType",IFCPIPESEGMENTTYPE:"IfcPipeSegmentType",IFCPIPEFITTINGTYPE:"IfcPipeFittingType",IFCPERMIT:"IfcPermit",IFCPERFORMANCEHISTORY:"IfcPerformanceHistory",IFCOUTLETTYPE:"IfcOutletType",IFCORDERACTION:"IfcOrderAction",IFCOPENINGELEMENT:"IfcOpeningElement",IFCOCCUPANT:"IfcOccupant",IFCMOVE:"IfcMove",IFCMOTORCONNECTIONTYPE:"IfcMotorConnectionType",IFCMEMBERTYPE:"IfcMemberType",IFCMECHANICALFASTENERTYPE:"IfcMechanicalFastenerType",IFCMECHANICALFASTENER:"IfcMechanicalFastener",IFCLINEARDIMENSION:"IfcLinearDimension",IFCLIGHTFIXTURETYPE:"IfcLightFixtureType",IFCLAMPTYPE:"IfcLampType",IFCLABORRESOURCE:"IfcLaborResource",IFCJUNCTIONBOXTYPE:"IfcJunctionBoxType",IFCINVENTORY:"IfcInventory",IFCHUMIDIFIERTYPE:"IfcHumidifierType",IFCHEATEXCHANGERTYPE:"IfcHeatExchangerType",IFCGROUP:"IfcGroup",IFCGRID:"IfcGrid",IFCGASTERMINALTYPE:"IfcGasTerminalType",IFCFURNITURESTANDARD:"IfcFurnitureStandard",IFCFURNISHINGELEMENT:"IfcFurnishingElement",IFCFLOWTREATMENTDEVICETYPE:"IfcFlowTreatmentDeviceType",IFCFLOWTERMINALTYPE:"IfcFlowTerminalType",IFCFLOWSTORAGEDEVICETYPE:"IfcFlowStorageDeviceType",IFCFLOWSEGMENTTYPE:"IfcFlowSegmentType",IFCFLOWMOVINGDEVICETYPE:"IfcFlowMovingDeviceType",IFCFLOWMETERTYPE:"IfcFlowMeterType",IFCFLOWFITTINGTYPE:"IfcFlowFittingType",IFCFLOWCONTROLLERTYPE:"IfcFlowControllerType",IFCFEATUREELEMENTSUBTRACTION:"IfcFeatureElementSubtraction",IFCFEATUREELEMENTADDITION:"IfcFeatureElementAddition",IFCFEATUREELEMENT:"IfcFeatureElement",IFCFASTENERTYPE:"IfcFastenerType",IFCFASTENER:"IfcFastener",IFCFACETEDBREPWITHVOIDS:"IfcFacetedBrepWithVoids",IFCFACETEDBREP:"IfcFacetedBrep",IFCEVAPORATORTYPE:"IfcEvaporatorType",IFCEVAPORATIVECOOLERTYPE:"IfcEvaporativeCoolerType",IFCEQUIPMENTSTANDARD:"IfcEquipmentStandard",IFCEQUIPMENTELEMENT:"IfcEquipmentElement",IFCENERGYCONVERSIONDEVICETYPE:"IfcEnergyConversionDeviceType",IFCELLIPSE:"IfcEllipse",IFCELEMENTCOMPONENTTYPE:"IfcElementComponentType",IFCELEMENTCOMPONENT:"IfcElementComponent",IFCELEMENTASSEMBLY:"IfcElementAssembly",IFCELEMENT:"IfcElement",IFCELECTRICALBASEPROPERTIES:"IfcElectricalBaseProperties",IFCDISTRIBUTIONFLOWELEMENTTYPE:"IfcDistributionFlowElementType",IFCDISTRIBUTIONELEMENTTYPE:"IfcDistributionElementType",IFCDIMENSIONCURVEDIRECTEDCALLOUT:"IfcDimensionCurveDirectedCallout",IFCCURTAINWALLTYPE:"IfcCurtainWallType",IFCCREWRESOURCE:"IfcCrewResource",IFCCOVERINGTYPE:"IfcCoveringType",IFCCOSTSCHEDULE:"IfcCostSchedule",IFCCOSTITEM:"IfcCostItem",IFCCONTROL:"IfcControl",IFCCONSTRUCTIONRESOURCE:"IfcConstructionResource",IFCCONIC:"IfcConic",IFCCOMPOSITECURVE:"IfcCompositeCurve",IFCCOLUMNTYPE:"IfcColumnType",IFCCIRCLEHOLLOWPROFILEDEF:"IfcCircleHollowProfileDef",IFCBUILDINGSTOREY:"IfcBuildingStorey",IFCBUILDINGELEMENTTYPE:"IfcBuildingElementType",IFCBUILDING:"IfcBuilding",IFCBOUNDEDCURVE:"IfcBoundedCurve",IFCBOOLEANCLIPPINGRESULT:"IfcBooleanClippingResult",IFCBLOCK:"IfcBlock",IFCASYMMETRICISHAPEPROFILEDEF:"IfcAsymmetricIShapeProfileDef",IFCANNOTATION:"IfcAnnotation",IFCACTOR:"IfcActor",IFCTRANSPORTELEMENTTYPE:"IfcTransportElementType",IFCTASK:"IfcTask",IFCSYSTEMFURNITUREELEMENTTYPE:"IfcSystemFurnitureElementType",IFCSURFACEOFREVOLUTION:"IfcSurfaceOfRevolution",IFCSURFACEOFLINEAREXTRUSION:"IfcSurfaceOfLinearExtrusion",IFCSURFACECURVESWEPTAREASOLID:"IfcSurfaceCurveSweptAreaSolid",IFCSTRUCTUREDDIMENSIONCALLOUT:"IfcStructuredDimensionCallout",IFCSTRUCTURALSURFACEMEMBERVARYING:"IfcStructuralSurfaceMemberVarying",IFCSTRUCTURALSURFACEMEMBER:"IfcStructuralSurfaceMember",IFCSTRUCTURALREACTION:"IfcStructuralReaction",IFCSTRUCTURALMEMBER:"IfcStructuralMember",IFCSTRUCTURALITEM:"IfcStructuralItem",IFCSTRUCTURALACTIVITY:"IfcStructuralActivity",IFCSPHERE:"IfcSphere",IFCSPATIALSTRUCTUREELEMENTTYPE:"IfcSpatialStructureElementType",IFCSPATIALSTRUCTUREELEMENT:"IfcSpatialStructureElement",IFCRIGHTCIRCULARCYLINDER:"IfcRightCircularCylinder",IFCRIGHTCIRCULARCONE:"IfcRightCircularCone",IFCREVOLVEDAREASOLID:"IfcRevolvedAreaSolid",IFCRESOURCE:"IfcResource",IFCRELVOIDSELEMENT:"IfcRelVoidsElement",IFCRELSPACEBOUNDARY:"IfcRelSpaceBoundary",IFCRELSERVICESBUILDINGS:"IfcRelServicesBuildings",IFCRELSEQUENCE:"IfcRelSequence",IFCRELSCHEDULESCOSTITEMS:"IfcRelSchedulesCostItems",IFCRELREFERENCEDINSPATIALSTRUCTURE:"IfcRelReferencedInSpatialStructure",IFCRELPROJECTSELEMENT:"IfcRelProjectsElement",IFCRELOVERRIDESPROPERTIES:"IfcRelOverridesProperties",IFCRELOCCUPIESSPACES:"IfcRelOccupiesSpaces",IFCRELNESTS:"IfcRelNests",IFCRELINTERACTIONREQUIREMENTS:"IfcRelInteractionRequirements",IFCRELFLOWCONTROLELEMENTS:"IfcRelFlowControlElements",IFCRELFILLSELEMENT:"IfcRelFillsElement",IFCRELDEFINESBYTYPE:"IfcRelDefinesByType",IFCRELDEFINESBYPROPERTIES:"IfcRelDefinesByProperties",IFCRELDEFINES:"IfcRelDefines",IFCRELDECOMPOSES:"IfcRelDecomposes",IFCRELCOVERSSPACES:"IfcRelCoversSpaces",IFCRELCOVERSBLDGELEMENTS:"IfcRelCoversBldgElements",IFCRELCONTAINEDINSPATIALSTRUCTURE:"IfcRelContainedInSpatialStructure",IFCRELCONNECTSWITHREALIZINGELEMENTS:"IfcRelConnectsWithRealizingElements",IFCRELCONNECTSWITHECCENTRICITY:"IfcRelConnectsWithEccentricity",IFCRELCONNECTSSTRUCTURALMEMBER:"IfcRelConnectsStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT:"IfcRelConnectsStructuralElement",IFCRELCONNECTSSTRUCTURALACTIVITY:"IfcRelConnectsStructuralActivity",IFCRELCONNECTSPORTS:"IfcRelConnectsPorts",IFCRELCONNECTSPORTTOELEMENT:"IfcRelConnectsPortToElement",IFCRELCONNECTSPATHELEMENTS:"IfcRelConnectsPathElements",IFCRELCONNECTSELEMENTS:"IfcRelConnectsElements",IFCRELCONNECTS:"IfcRelConnects",IFCRELASSOCIATESPROFILEPROPERTIES:"IfcRelAssociatesProfileProperties",IFCRELASSOCIATESMATERIAL:"IfcRelAssociatesMaterial",IFCRELASSOCIATESLIBRARY:"IfcRelAssociatesLibrary",IFCRELASSOCIATESDOCUMENT:"IfcRelAssociatesDocument",IFCRELASSOCIATESCONSTRAINT:"IfcRelAssociatesConstraint",IFCRELASSOCIATESCLASSIFICATION:"IfcRelAssociatesClassification",IFCRELASSOCIATESAPPROVAL:"IfcRelAssociatesApproval",IFCRELASSOCIATESAPPLIEDVALUE:"IfcRelAssociatesAppliedValue",IFCRELASSOCIATES:"IfcRelAssociates",IFCRELASSIGNSTORESOURCE:"IfcRelAssignsToResource",IFCRELASSIGNSTOPROJECTORDER:"IfcRelAssignsToProjectOrder",IFCRELASSIGNSTOPRODUCT:"IfcRelAssignsToProduct",IFCRELASSIGNSTOPROCESS:"IfcRelAssignsToProcess",IFCRELASSIGNSTOGROUP:"IfcRelAssignsToGroup",IFCRELASSIGNSTOCONTROL:"IfcRelAssignsToControl",IFCRELASSIGNSTOACTOR:"IfcRelAssignsToActor",IFCRELASSIGNS:"IfcRelAssigns",IFCRECTANGULARTRIMMEDSURFACE:"IfcRectangularTrimmedSurface",IFCRECTANGULARPYRAMID:"IfcRectangularPyramid",IFCRECTANGLEHOLLOWPROFILEDEF:"IfcRectangleHollowProfileDef",IFCPROXY:"IfcProxy",IFCPROPERTYSET:"IfcPropertySet",IFCPROJECTIONCURVE:"IfcProjectionCurve",IFCPROJECT:"IfcProject",IFCPRODUCT:"IfcProduct",IFCPROCESS:"IfcProcess",IFCPLANE:"IfcPlane",IFCPLANARBOX:"IfcPlanarBox",IFCPERMEABLECOVERINGPROPERTIES:"IfcPermeableCoveringProperties",IFCOFFSETCURVE3D:"IfcOffsetCurve3D",IFCOFFSETCURVE2D:"IfcOffsetCurve2D",IFCOBJECT:"IfcObject",IFCMANIFOLDSOLIDBREP:"IfcManifoldSolidBrep",IFCLINE:"IfcLine",IFCLSHAPEPROFILEDEF:"IfcLShapeProfileDef",IFCISHAPEPROFILEDEF:"IfcIShapeProfileDef",IFCGEOMETRICCURVESET:"IfcGeometricCurveSet",IFCFURNITURETYPE:"IfcFurnitureType",IFCFURNISHINGELEMENTTYPE:"IfcFurnishingElementType",IFCFLUIDFLOWPROPERTIES:"IfcFluidFlowProperties",IFCFILLAREASTYLETILES:"IfcFillAreaStyleTiles",IFCFILLAREASTYLETILESYMBOLWITHSTYLE:"IfcFillAreaStyleTileSymbolWithStyle",IFCFILLAREASTYLEHATCHING:"IfcFillAreaStyleHatching",IFCFACEBASEDSURFACEMODEL:"IfcFaceBasedSurfaceModel",IFCEXTRUDEDAREASOLID:"IfcExtrudedAreaSolid",IFCENERGYPROPERTIES:"IfcEnergyProperties",IFCELLIPSEPROFILEDEF:"IfcEllipseProfileDef",IFCELEMENTARYSURFACE:"IfcElementarySurface",IFCELEMENTTYPE:"IfcElementType",IFCELEMENTQUANTITY:"IfcElementQuantity",IFCEDGELOOP:"IfcEdgeLoop",IFCDRAUGHTINGPREDEFINEDCURVEFONT:"IfcDraughtingPredefinedCurveFont",IFCDRAUGHTINGPREDEFINEDCOLOUR:"IfcDraughtingPredefinedColour",IFCDRAUGHTINGCALLOUT:"IfcDraughtingCallout",IFCDOORSTYLE:"IfcDoorStyle",IFCDOORPANELPROPERTIES:"IfcDoorPanelProperties",IFCDOORLININGPROPERTIES:"IfcDoorLiningProperties",IFCDIRECTION:"IfcDirection",IFCDIMENSIONCURVETERMINATOR:"IfcDimensionCurveTerminator",IFCDIMENSIONCURVE:"IfcDimensionCurve",IFCDEFINEDSYMBOL:"IfcDefinedSymbol",IFCCURVEBOUNDEDPLANE:"IfcCurveBoundedPlane",IFCCURVE:"IfcCurve",IFCCSGSOLID:"IfcCsgSolid",IFCCSGPRIMITIVE3D:"IfcCsgPrimitive3D",IFCCRANERAILFSHAPEPROFILEDEF:"IfcCraneRailFShapeProfileDef",IFCCRANERAILASHAPEPROFILEDEF:"IfcCraneRailAShapeProfileDef",IFCCOMPOSITECURVESEGMENT:"IfcCompositeCurveSegment",IFCCLOSEDSHELL:"IfcClosedShell",IFCCIRCLEPROFILEDEF:"IfcCircleProfileDef",IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM:"IfcCartesianTransformationOperator3DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR3D:"IfcCartesianTransformationOperator3D",IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM:"IfcCartesianTransformationOperator2DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR2D:"IfcCartesianTransformationOperator2D",IFCCARTESIANTRANSFORMATIONOPERATOR:"IfcCartesianTransformationOperator",IFCCARTESIANPOINT:"IfcCartesianPoint",IFCCSHAPEPROFILEDEF:"IfcCShapeProfileDef",IFCBOXEDHALFSPACE:"IfcBoxedHalfSpace",IFCBOUNDINGBOX:"IfcBoundingBox",IFCBOUNDEDSURFACE:"IfcBoundedSurface",IFCBOOLEANRESULT:"IfcBooleanResult",IFCAXIS2PLACEMENT3D:"IfcAxis2Placement3D",IFCAXIS2PLACEMENT2D:"IfcAxis2Placement2D",IFCAXIS1PLACEMENT:"IfcAxis1Placement",IFCANNOTATIONSURFACE:"IfcAnnotationSurface",IFCANNOTATIONFILLAREAOCCURRENCE:"IfcAnnotationFillAreaOccurrence",IFCANNOTATIONFILLAREA:"IfcAnnotationFillArea",IFCANNOTATIONCURVEOCCURRENCE:"IfcAnnotationCurveOccurrence",IFCZSHAPEPROFILEDEF:"IfcZShapeProfileDef",IFCWINDOWSTYLE:"IfcWindowStyle",IFCWINDOWPANELPROPERTIES:"IfcWindowPanelProperties",IFCWINDOWLININGPROPERTIES:"IfcWindowLiningProperties",IFCVERTEXLOOP:"IfcVertexLoop",IFCVECTOR:"IfcVector",IFCUSHAPEPROFILEDEF:"IfcUShapeProfileDef",IFCTYPEPRODUCT:"IfcTypeProduct",IFCTYPEOBJECT:"IfcTypeObject",IFCTWODIRECTIONREPEATFACTOR:"IfcTwoDirectionRepeatFactor",IFCTRAPEZIUMPROFILEDEF:"IfcTrapeziumProfileDef",IFCTEXTLITERALWITHEXTENT:"IfcTextLiteralWithExtent",IFCTEXTLITERAL:"IfcTextLiteral",IFCTERMINATORSYMBOL:"IfcTerminatorSymbol",IFCTSHAPEPROFILEDEF:"IfcTShapeProfileDef",IFCSWEPTSURFACE:"IfcSweptSurface",IFCSWEPTDISKSOLID:"IfcSweptDiskSolid",IFCSWEPTAREASOLID:"IfcSweptAreaSolid",IFCSURFACESTYLERENDERING:"IfcSurfaceStyleRendering",IFCSURFACE:"IfcSurface",IFCSUBEDGE:"IfcSubedge",IFCSTRUCTURALSTEELPROFILEPROPERTIES:"IfcStructuralSteelProfileProperties",IFCSTRUCTURALPROFILEPROPERTIES:"IfcStructuralProfileProperties",IFCSTRUCTURALLOADSINGLEFORCEWARPING:"IfcStructuralLoadSingleForceWarping",IFCSTRUCTURALLOADSINGLEFORCE:"IfcStructuralLoadSingleForce",IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION:"IfcStructuralLoadSingleDisplacementDistortion",IFCSTRUCTURALLOADSINGLEDISPLACEMENT:"IfcStructuralLoadSingleDisplacement",IFCSTRUCTURALLOADPLANARFORCE:"IfcStructuralLoadPlanarForce",IFCSTRUCTURALLOADLINEARFORCE:"IfcStructuralLoadLinearForce",IFCSPACETHERMALLOADPROPERTIES:"IfcSpaceThermalLoadProperties",IFCSOUNDVALUE:"IfcSoundValue",IFCSOUNDPROPERTIES:"IfcSoundProperties",IFCSOLIDMODEL:"IfcSolidModel",IFCSLIPPAGECONNECTIONCONDITION:"IfcSlippageConnectionCondition",IFCSHELLBASEDSURFACEMODEL:"IfcShellBasedSurfaceModel",IFCSERVICELIFEFACTOR:"IfcServiceLifeFactor",IFCSECTIONEDSPINE:"IfcSectionedSpine",IFCROUNDEDRECTANGLEPROFILEDEF:"IfcRoundedRectangleProfileDef",IFCRELATIONSHIP:"IfcRelationship",IFCREINFORCEMENTDEFINITIONPROPERTIES:"IfcReinforcementDefinitionProperties",IFCREGULARTIMESERIES:"IfcRegularTimeSeries",IFCRECTANGLEPROFILEDEF:"IfcRectangleProfileDef",IFCPROPERTYTABLEVALUE:"IfcPropertyTableValue",IFCPROPERTYSINGLEVALUE:"IfcPropertySingleValue",IFCPROPERTYSETDEFINITION:"IfcPropertySetDefinition",IFCPROPERTYREFERENCEVALUE:"IfcPropertyReferenceValue",IFCPROPERTYLISTVALUE:"IfcPropertyListValue",IFCPROPERTYENUMERATEDVALUE:"IfcPropertyEnumeratedValue",IFCPROPERTYDEFINITION:"IfcPropertyDefinition",IFCPROPERTYBOUNDEDVALUE:"IfcPropertyBoundedValue",IFCPRODUCTDEFINITIONSHAPE:"IfcProductDefinitionShape",IFCPREDEFINEDPOINTMARKERSYMBOL:"IfcPredefinedPointMarkerSymbol",IFCPREDEFINEDDIMENSIONSYMBOL:"IfcPredefinedDimensionSymbol",IFCPREDEFINEDCURVEFONT:"IfcPredefinedCurveFont",IFCPREDEFINEDCOLOUR:"IfcPredefinedColour",IFCPOLYGONALBOUNDEDHALFSPACE:"IfcPolygonalBoundedHalfSpace",IFCPOLYLOOP:"IfcPolyLoop",IFCPOINTONSURFACE:"IfcPointOnSurface",IFCPOINTONCURVE:"IfcPointOnCurve",IFCPOINT:"IfcPoint",IFCPLANAREXTENT:"IfcPlanarExtent",IFCPLACEMENT:"IfcPlacement",IFCPIXELTEXTURE:"IfcPixelTexture",IFCPHYSICALCOMPLEXQUANTITY:"IfcPhysicalComplexQuantity",IFCPATH:"IfcPath",IFCPARAMETERIZEDPROFILEDEF:"IfcParameterizedProfileDef",IFCORIENTEDEDGE:"IfcOrientedEdge",IFCOPENSHELL:"IfcOpenShell",IFCONEDIRECTIONREPEATFACTOR:"IfcOneDirectionRepeatFactor",IFCOBJECTDEFINITION:"IfcObjectDefinition",IFCMECHANICALCONCRETEMATERIALPROPERTIES:"IfcMechanicalConcreteMaterialProperties",IFCMATERIALDEFINITIONREPRESENTATION:"IfcMaterialDefinitionRepresentation",IFCMAPPEDITEM:"IfcMappedItem",IFCLOOP:"IfcLoop",IFCLOCALPLACEMENT:"IfcLocalPlacement",IFCLIGHTSOURCESPOT:"IfcLightSourceSpot",IFCLIGHTSOURCEPOSITIONAL:"IfcLightSourcePositional",IFCLIGHTSOURCEGONIOMETRIC:"IfcLightSourceGoniometric",IFCLIGHTSOURCEDIRECTIONAL:"IfcLightSourceDirectional",IFCLIGHTSOURCEAMBIENT:"IfcLightSourceAmbient",IFCLIGHTSOURCE:"IfcLightSource",IFCIRREGULARTIMESERIES:"IfcIrregularTimeSeries",IFCIMAGETEXTURE:"IfcImageTexture",IFCHYGROSCOPICMATERIALPROPERTIES:"IfcHygroscopicMaterialProperties",IFCHALFSPACESOLID:"IfcHalfSpaceSolid",IFCGRIDPLACEMENT:"IfcGridPlacement",IFCGEOMETRICSET:"IfcGeometricSet",IFCGEOMETRICREPRESENTATIONSUBCONTEXT:"IfcGeometricRepresentationSubContext",IFCGEOMETRICREPRESENTATIONITEM:"IfcGeometricRepresentationItem",IFCGEOMETRICREPRESENTATIONCONTEXT:"IfcGeometricRepresentationContext",IFCGENERALPROFILEPROPERTIES:"IfcGeneralProfileProperties",IFCGENERALMATERIALPROPERTIES:"IfcGeneralMaterialProperties",IFCFUELPROPERTIES:"IfcFuelProperties",IFCFILLAREASTYLE:"IfcFillAreaStyle",IFCFAILURECONNECTIONCONDITION:"IfcFailureConnectionCondition",IFCFACESURFACE:"IfcFaceSurface",IFCFACEOUTERBOUND:"IfcFaceOuterBound",IFCFACEBOUND:"IfcFaceBound",IFCFACE:"IfcFace",IFCEXTENDEDMATERIALPROPERTIES:"IfcExtendedMaterialProperties",IFCEDGECURVE:"IfcEdgeCurve",IFCEDGE:"IfcEdge",IFCDRAUGHTINGPREDEFINEDTEXTFONT:"IfcDraughtingPredefinedTextFont",IFCDOCUMENTREFERENCE:"IfcDocumentReference",IFCDIMENSIONPAIR:"IfcDimensionPair",IFCDIMENSIONCALLOUTRELATIONSHIP:"IfcDimensionCalloutRelationship",IFCDERIVEDPROFILEDEF:"IfcDerivedProfileDef",IFCCURVESTYLE:"IfcCurveStyle",IFCCONVERSIONBASEDUNIT:"IfcConversionBasedUnit",IFCCONTEXTDEPENDENTUNIT:"IfcContextDependentUnit",IFCCONNECTIONPOINTECCENTRICITY:"IfcConnectionPointEccentricity",IFCCONNECTIONCURVEGEOMETRY:"IfcConnectionCurveGeometry",IFCCONNECTEDFACESET:"IfcConnectedFaceSet",IFCCOMPOSITEPROFILEDEF:"IfcCompositeProfileDef",IFCCOMPLEXPROPERTY:"IfcComplexProperty",IFCCOLOURRGB:"IfcColourRgb",IFCCLASSIFICATIONREFERENCE:"IfcClassificationReference",IFCCENTERLINEPROFILEDEF:"IfcCenterLineProfileDef",IFCBLOBTEXTURE:"IfcBlobTexture",IFCARBITRARYPROFILEDEFWITHVOIDS:"IfcArbitraryProfileDefWithVoids",IFCARBITRARYOPENPROFILEDEF:"IfcArbitraryOpenProfileDef",IFCARBITRARYCLOSEDPROFILEDEF:"IfcArbitraryClosedProfileDef",IFCANNOTATIONTEXTOCCURRENCE:"IfcAnnotationTextOccurrence",IFCANNOTATIONSYMBOLOCCURRENCE:"IfcAnnotationSymbolOccurrence",IFCANNOTATIONSURFACEOCCURRENCE:"IfcAnnotationSurfaceOccurrence",IFCANNOTATIONOCCURRENCE:"IfcAnnotationOccurrence",IFCWATERPROPERTIES:"IfcWaterProperties",IFCVIRTUALGRIDINTERSECTION:"IfcVirtualGridIntersection",IFCVERTEXPOINT:"IfcVertexPoint",IFCVERTEXBASEDTEXTUREMAP:"IfcVertexBasedTextureMap",IFCVERTEX:"IfcVertex",IFCUNITASSIGNMENT:"IfcUnitAssignment",IFCTOPOLOGYREPRESENTATION:"IfcTopologyRepresentation",IFCTOPOLOGICALREPRESENTATIONITEM:"IfcTopologicalRepresentationItem",IFCTIMESERIESVALUE:"IfcTimeSeriesValue",IFCTIMESERIESREFERENCERELATIONSHIP:"IfcTimeSeriesReferenceRelationship",IFCTIMESERIES:"IfcTimeSeries",IFCTHERMALMATERIALPROPERTIES:"IfcThermalMaterialProperties",IFCTEXTUREVERTEX:"IfcTextureVertex",IFCTEXTUREMAP:"IfcTextureMap",IFCTEXTURECOORDINATEGENERATOR:"IfcTextureCoordinateGenerator",IFCTEXTURECOORDINATE:"IfcTextureCoordinate",IFCTEXTSTYLEWITHBOXCHARACTERISTICS:"IfcTextStyleWithBoxCharacteristics",IFCTEXTSTYLETEXTMODEL:"IfcTextStyleTextModel",IFCTEXTSTYLEFORDEFINEDFONT:"IfcTextStyleForDefinedFont",IFCTEXTSTYLEFONTMODEL:"IfcTextStyleFontModel",IFCTEXTSTYLE:"IfcTextStyle",IFCTELECOMADDRESS:"IfcTelecomAddress",IFCTABLEROW:"IfcTableRow",IFCTABLE:"IfcTable",IFCSYMBOLSTYLE:"IfcSymbolStyle",IFCSURFACETEXTURE:"IfcSurfaceTexture",IFCSURFACESTYLEWITHTEXTURES:"IfcSurfaceStyleWithTextures",IFCSURFACESTYLESHADING:"IfcSurfaceStyleShading",IFCSURFACESTYLEREFRACTION:"IfcSurfaceStyleRefraction",IFCSURFACESTYLELIGHTING:"IfcSurfaceStyleLighting",IFCSURFACESTYLE:"IfcSurfaceStyle",IFCSTYLEDREPRESENTATION:"IfcStyledRepresentation",IFCSTYLEDITEM:"IfcStyledItem",IFCSTYLEMODEL:"IfcStyleModel",IFCSTRUCTURALLOADTEMPERATURE:"IfcStructuralLoadTemperature",IFCSTRUCTURALLOADSTATIC:"IfcStructuralLoadStatic",IFCSTRUCTURALLOAD:"IfcStructuralLoad",IFCSTRUCTURALCONNECTIONCONDITION:"IfcStructuralConnectionCondition",IFCSIMPLEPROPERTY:"IfcSimpleProperty",IFCSHAPEREPRESENTATION:"IfcShapeRepresentation",IFCSHAPEMODEL:"IfcShapeModel",IFCSHAPEASPECT:"IfcShapeAspect",IFCSECTIONREINFORCEMENTPROPERTIES:"IfcSectionReinforcementProperties",IFCSECTIONPROPERTIES:"IfcSectionProperties",IFCSIUNIT:"IfcSIUnit",IFCROOT:"IfcRoot",IFCRIBPLATEPROFILEPROPERTIES:"IfcRibPlateProfileProperties",IFCREPRESENTATIONMAP:"IfcRepresentationMap",IFCREPRESENTATIONITEM:"IfcRepresentationItem",IFCREPRESENTATIONCONTEXT:"IfcRepresentationContext",IFCREPRESENTATION:"IfcRepresentation",IFCRELAXATION:"IfcRelaxation",IFCREINFORCEMENTBARPROPERTIES:"IfcReinforcementBarProperties",IFCREFERENCESVALUEDOCUMENT:"IfcReferencesValueDocument",IFCQUANTITYWEIGHT:"IfcQuantityWeight",IFCQUANTITYVOLUME:"IfcQuantityVolume",IFCQUANTITYTIME:"IfcQuantityTime",IFCQUANTITYLENGTH:"IfcQuantityLength",IFCQUANTITYCOUNT:"IfcQuantityCount",IFCQUANTITYAREA:"IfcQuantityArea",IFCPROPERTYENUMERATION:"IfcPropertyEnumeration",IFCPROPERTYDEPENDENCYRELATIONSHIP:"IfcPropertyDependencyRelationship",IFCPROPERTYCONSTRAINTRELATIONSHIP:"IfcPropertyConstraintRelationship",IFCPROPERTY:"IfcProperty",IFCPROFILEPROPERTIES:"IfcProfileProperties",IFCPROFILEDEF:"IfcProfileDef",IFCPRODUCTSOFCOMBUSTIONPROPERTIES:"IfcProductsOfCombustionProperties",IFCPRODUCTREPRESENTATION:"IfcProductRepresentation",IFCPRESENTATIONSTYLEASSIGNMENT:"IfcPresentationStyleAssignment",IFCPRESENTATIONSTYLE:"IfcPresentationStyle",IFCPRESENTATIONLAYERWITHSTYLE:"IfcPresentationLayerWithStyle",IFCPRESENTATIONLAYERASSIGNMENT:"IfcPresentationLayerAssignment",IFCPREDEFINEDTEXTFONT:"IfcPredefinedTextFont",IFCPREDEFINEDTERMINATORSYMBOL:"IfcPredefinedTerminatorSymbol",IFCPREDEFINEDSYMBOL:"IfcPredefinedSymbol",IFCPREDEFINEDITEM:"IfcPredefinedItem",IFCPOSTALADDRESS:"IfcPostalAddress",IFCPHYSICALSIMPLEQUANTITY:"IfcPhysicalSimpleQuantity",IFCPHYSICALQUANTITY:"IfcPhysicalQuantity",IFCPERSONANDORGANIZATION:"IfcPersonAndOrganization",IFCPERSON:"IfcPerson",IFCOWNERHISTORY:"IfcOwnerHistory",IFCORGANIZATIONRELATIONSHIP:"IfcOrganizationRelationship",IFCORGANIZATION:"IfcOrganization",IFCOPTICALMATERIALPROPERTIES:"IfcOpticalMaterialProperties",IFCOBJECTIVE:"IfcObjective",IFCOBJECTPLACEMENT:"IfcObjectPlacement",IFCNAMEDUNIT:"IfcNamedUnit",IFCMONETARYUNIT:"IfcMonetaryUnit",IFCMETRIC:"IfcMetric",IFCMECHANICALSTEELMATERIALPROPERTIES:"IfcMechanicalSteelMaterialProperties",IFCMECHANICALMATERIALPROPERTIES:"IfcMechanicalMaterialProperties",IFCMEASUREWITHUNIT:"IfcMeasureWithUnit",IFCMATERIALPROPERTIES:"IfcMaterialProperties",IFCMATERIALLIST:"IfcMaterialList",IFCMATERIALLAYERSETUSAGE:"IfcMaterialLayerSetUsage",IFCMATERIALLAYERSET:"IfcMaterialLayerSet",IFCMATERIALLAYER:"IfcMaterialLayer",IFCMATERIALCLASSIFICATIONRELATIONSHIP:"IfcMaterialClassificationRelationship",IFCMATERIAL:"IfcMaterial",IFCLOCALTIME:"IfcLocalTime",IFCLIGHTINTENSITYDISTRIBUTION:"IfcLightIntensityDistribution",IFCLIGHTDISTRIBUTIONDATA:"IfcLightDistributionData",IFCLIBRARYREFERENCE:"IfcLibraryReference",IFCLIBRARYINFORMATION:"IfcLibraryInformation",IFCIRREGULARTIMESERIESVALUE:"IfcIrregularTimeSeriesValue",IFCGRIDAXIS:"IfcGridAxis",IFCEXTERNALLYDEFINEDTEXTFONT:"IfcExternallyDefinedTextFont",IFCEXTERNALLYDEFINEDSYMBOL:"IfcExternallyDefinedSymbol",IFCEXTERNALLYDEFINEDSURFACESTYLE:"IfcExternallyDefinedSurfaceStyle",IFCEXTERNALLYDEFINEDHATCHSTYLE:"IfcExternallyDefinedHatchStyle",IFCEXTERNALREFERENCE:"IfcExternalReference",IFCENVIRONMENTALIMPACTVALUE:"IfcEnvironmentalImpactValue",IFCDRAUGHTINGCALLOUTRELATIONSHIP:"IfcDraughtingCalloutRelationship",IFCDOCUMENTINFORMATIONRELATIONSHIP:"IfcDocumentInformationRelationship",IFCDOCUMENTINFORMATION:"IfcDocumentInformation",IFCDOCUMENTELECTRONICFORMAT:"IfcDocumentElectronicFormat",IFCDIMENSIONALEXPONENTS:"IfcDimensionalExponents",IFCDERIVEDUNITELEMENT:"IfcDerivedUnitElement",IFCDERIVEDUNIT:"IfcDerivedUnit",IFCDATEANDTIME:"IfcDateAndTime",IFCCURVESTYLEFONTPATTERN:"IfcCurveStyleFontPattern",IFCCURVESTYLEFONTANDSCALING:"IfcCurveStyleFontAndScaling",IFCCURVESTYLEFONT:"IfcCurveStyleFont",IFCCURRENCYRELATIONSHIP:"IfcCurrencyRelationship",IFCCOSTVALUE:"IfcCostValue",IFCCOORDINATEDUNIVERSALTIMEOFFSET:"IfcCoordinatedUniversalTimeOffset",IFCCONSTRAINTRELATIONSHIP:"IfcConstraintRelationship",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP:"IfcConstraintClassificationRelationship",IFCCONSTRAINTAGGREGATIONRELATIONSHIP:"IfcConstraintAggregationRelationship",IFCCONSTRAINT:"IfcConstraint",IFCCONNECTIONSURFACEGEOMETRY:"IfcConnectionSurfaceGeometry",IFCCONNECTIONPORTGEOMETRY:"IfcConnectionPortGeometry",IFCCONNECTIONPOINTGEOMETRY:"IfcConnectionPointGeometry",IFCCONNECTIONGEOMETRY:"IfcConnectionGeometry",IFCCOLOURSPECIFICATION:"IfcColourSpecification",IFCCLASSIFICATIONNOTATIONFACET:"IfcClassificationNotationFacet",IFCCLASSIFICATIONNOTATION:"IfcClassificationNotation",IFCCLASSIFICATIONITEMRELATIONSHIP:"IfcClassificationItemRelationship",IFCCLASSIFICATIONITEM:"IfcClassificationItem",IFCCLASSIFICATION:"IfcClassification",IFCCALENDARDATE:"IfcCalendarDate",IFCBOUNDARYNODECONDITIONWARPING:"IfcBoundaryNodeConditionWarping",IFCBOUNDARYNODECONDITION:"IfcBoundaryNodeCondition",IFCBOUNDARYFACECONDITION:"IfcBoundaryFaceCondition",IFCBOUNDARYEDGECONDITION:"IfcBoundaryEdgeCondition",IFCBOUNDARYCONDITION:"IfcBoundaryCondition",IFCAPPROVALRELATIONSHIP:"IfcApprovalRelationship",IFCAPPROVALPROPERTYRELATIONSHIP:"IfcApprovalPropertyRelationship",IFCAPPROVALACTORRELATIONSHIP:"IfcApprovalActorRelationship",IFCAPPROVAL:"IfcApproval",IFCAPPLIEDVALUERELATIONSHIP:"IfcAppliedValueRelationship",IFCAPPLIEDVALUE:"IfcAppliedValue",IFCAPPLICATION:"IfcApplication",IFCADDRESS:"IfcAddress",IFCACTORROLE:"IfcActorRole"};class pf{constructor(){T(this,"factor",1),T(this,"complement",1)}apply(e){const t=this.getScaleMatrix().multiply(e);e.copy(t)}setUp(e){var t,i,s;this.factor=1;const n=this.getLengthUnits(e);if(!n)return;const r=n==null,o=n.Name===void 0||n.Name===null;r||o||(n.Name.value==="FOOT"&&(this.factor=.3048),((t=n.Prefix)==null?void 0:t.value)==="MILLI"?this.complement=.001:((i=n.Prefix)==null?void 0:i.value)==="CENTI"?this.complement=.01:((s=n.Prefix)==null?void 0:s.value)==="DECI"&&(this.complement=.01))}getLengthUnits(e){try{const t=e.GetLineIDsWithType(0,Vc).get(0),i=e.GetLine(0,t);for(const s of i.Units){if(!s||s.value===null||s.value===void 0)continue;const n=e.GetLine(0,s.value);if(n.UnitType&&n.UnitType.value==="LENGTHUNIT")return n}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const e=this.factor;return new ne().fromArray([e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1])}}class bl{constructor(){T(this,"itemsByFloor",{}),T(this,"_units",new pf)}setUp(e){this._units.setUp(e),this.cleanUp();try{const t=e.GetLineIDsWithType(0,Gn),i=new Set,s=e.GetLineIDsWithType(0,yi);for(let h=0;h0&&!r.has(n)||this.settings.excludedCategories.has(n))continue;const o=this.webIfc.GetLineIDsWithType(0,n),a=o.size();for(let h=0;h{this.getMesh(n,t)});for(const n of this._visitedFragments){const{index:r,fragment:o}=n[1];t.keyFragments.set(r,o.id)}for(const n of t.items){const r=this._fragmentInstances.get(n.id);if(!r)throw new Error("Fragment not found!");const o=[];for(const[a,h]of r)o.push(h);n.add(o)}const s=this.webIfc.GetCoordinationMatrix(0);return t.coordinationMatrix.fromArray(s),t.civilData=this._civil.read(this.webIfc),t}getMesh(e,t){const i=e.geometries.size(),s=e.expressID;for(let n=0;nr.value!==i),await e.setProperties(i,null),this.registerChange(e,t,i))}addElementToPset(e,t,...i){this.components.get(st).addEntitiesRelation(e,t,{type:Ds,inv:"DefinesOcurrence"},...i)}async addPropToPset(e,t,...i){const s=await e.getProperties(t);if(s){for(const n of i){if(s.HasProperties.includes(n))continue;const r=new qt(n);s.HasProperties.push(r),this.onPropToPset.trigger({model:e,psetID:t,propID:n})}this.registerChange(e,t)}}async createIfcRel(e,t,i,s){const n=gf[t];if(!n)throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const r=di.getIFCSchema(e),o=Ef[n],a=Ft[r][n];if(!(o&&a))throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const h=[new Ft[r].IfcGloballyUniqueId(Wt.create())],{related:c,relating:u}=o,d=[...new Set(s)].map(p=>new qt(p)),f=(p,I)=>{for(let E=p;EparseInt(r,10)),s=t[i[0]],n=new qt(s.expressID);return{entity:s,handle:n}}registerChange(e,...t){this.changeMap[e.uuid]||(this.changeMap[e.uuid]=new Set);for(const i of t)this.changeMap[e.uuid].add(i),this.onDataChanged.trigger({model:e,expressID:i})}async newSingleProperty(e,t,i,s){const n=di.getIFCSchema(e),r=new Ft[n].IfcIdentifier(i),o=new Ft[n][t](s),a=new Ft[n].IfcPropertySingleValue(r,null,o,null);return a.expressID=this.getNewExpressID(e),await this.setData(e,a),a}};T(zl,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let Cf=zl;const kl=class Yr extends de{constructor(e){super(e),T(this,"onDisposed",new H),T(this,"onRelationsIndexed",new H),T(this,"relationMaps",{}),T(this,"enabled",!0),T(this,"_relToAttributesMap",Aa),T(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements","HasControlElements","AssignedToFlowElement","ConnectedTo","ConnectedFrom","ReferencedBy","Declares","HasContext","Controls","IsNestedBy","Nests","DocumentRefForObjects"]),T(this,"_ifcRels",[Yn,ro,oo,ao,Ds,lo,ho,Gn,co,uo,fo,po,mo,Io,Eo]),T(this,"onFragmentsDisposed",t=>{delete this.relationMaps[t.groupID]}),T(this,"_changeMap",{}),T(this,"onEntitiesRelated",new H),this.components.add(Yr.uuid,this),e.get(ue).onFragmentsDisposed.add(this.onFragmentsDisposed)}indexRelations(e,t,i,s){const n=Object.keys(t).find(c=>c.startsWith("Relating")),r=Object.keys(t).find(c=>c.startsWith("Related"));if(!(n&&r))return;const o=t[n].value,a=t[r].map(c=>c.value),h=this.getEntityRelations(e,o,s);for(const c of a)h.push(c);for(const c of a)this.getEntityRelations(e,c,i).push(o)}getAttributeIndex(e){const t=this._inverseAttributes.indexOf(e);if(t===-1)throw new Error(`IfcRelationsIndexer: ${e} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`);return t}setRelationMap(e,t){this.relationMaps[e.uuid]=t,this.onRelationsIndexed.trigger({modelID:e.uuid,relationsMap:t})}async process(e,t){if(!e.hasProperties)throw new Error("FragmentsGroup properties not found");let i=this.relationMaps[e.uuid];i||(i=new Map,this.relationMaps[e.uuid]=i);const s=e.getLocalProperties();if(!s)return i;const n=(t==null?void 0:t.relationsToProcess)??this._ifcRels;for(const[r,o]of Object.entries(s)){if(!n.includes(o.type))continue;const a=this._relToAttributesMap.get(o.type);if(!a)continue;const{forRelated:h,forRelating:c}=a;this.indexRelations(i,o,h,c)}return this.setRelationMap(e,i),i}async processFromWebIfc(e,t){const i=new Map;for(const s of this._ifcRels){const n=this._relToAttributesMap.get(s);if(!n)continue;const{forRelated:r,forRelating:o}=n,a=e.GetLineIDsWithType(t,s);for(let h=0;hI.startsWith("Related")),p=f.find(I=>I.startsWith("Relating"));if(!(m&&p))continue;d[m]=[...c].map(I=>new qt(I)),d[p]=new qt(a),await t.setData(s,d)}else{const d=await t.createIfcRel(s,r,a,[...c]);if(!d)continue;h.relID=d.expressID}}}}addEntitiesRelation(e,t,i,...s){const{type:n,inv:r}=i;let o=this.relationMaps[e.uuid];if(o||(o=new Map,this.relationMaps[e.uuid]=o),!this._ifcRels.includes(n))return;const a=Aa.get(n);if(!a)return;const{forRelated:h,forRelating:c}=a;if(!(h===r||c===r))return;let u=this._changeMap[e.uuid];u||(u=new Ct,this._changeMap[e.uuid]=u);const d=c===r?[t]:s,f=h===r?[t]:s;let m=u.get(n);m||(m=new Ct,m.onItemSet.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:d,relatedIDs:f})),m.onItemUpdated.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:d,relatedIDs:f})),u.set(n,m));for(const p of d){let I=m.get(p);I||(I={related:new ei},m.set(p,I)),I.related.add(...f)}for(const p of d)this.getEntityRelations(e,p,c).push(...f);for(const p of f)this.getEntityRelations(e,p,h).push(...d)}getEntityChildren(e,t,i=new Set){if(i.add(t),this.relationMaps[e.uuid]===void 0)throw new Error("The provided model has no indices. You have to generate them first.");const s=this.getEntityRelations(e,t,"IsDecomposedBy");if(s)for(const r of s)this.getEntityChildren(e,r,i);const n=this.getEntityRelations(e,t,"ContainsElements");if(n)for(const r of n)this.getEntityChildren(e,r,i);return i}};T(kl,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let st=kl;const Vl=class Yl extends de{constructor(e){super(e),T(this,"onDisposed",new H),T(this,"onFragmentsLoaded",new H),T(this,"onFragmentsDisposed",new H),T(this,"list",new Ct),T(this,"groups",new Ct),T(this,"baseCoordinationModel",""),T(this,"baseCoordinationMatrix",new ne),T(this,"enabled",!0),T(this,"_loader",new $a),this.components.add(Yl.uuid,this)}get meshes(){const e=[];for(const[t,i]of this.list)e.push(i.mesh);return e}dispose(){for(const[e,t]of this.groups)t.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(e){const{uuid:t}=e,i=[];for(const s of e.items)i.push(s.id),this.list.delete(s.id);e.dispose(!0),this.groups.delete(e.uuid),this.groups.size===0&&(this.baseCoordinationModel="",this.baseCoordinationMatrix=new ne),this.onFragmentsDisposed.trigger({groupID:t,fragmentIDs:i})}load(e,t){const i={coordinate:!0,...t},{coordinate:s,name:n,properties:r,relationsMap:o}=i,a=this._loader.import(e);t&&(a.isStreamed=t.isStreamed||!1),n&&(a.name=n);for(const h of a.items)h.group=a,this.list.set(h.id,h);return s&&this.coordinate([a]),this.groups.set(a.uuid,a),r&&a.setLocalProperties(r),o&&this.components.get(st).setRelationMap(a,o),this.onFragmentsLoaded.trigger(a),a}export(e){return this._loader.export(e)}getModelIdMap(e){const t={};for(const i in e){const s=this.list.get(i);if(!(s&&s.group))continue;const n=s.group;n.uuid in t||(t[n.uuid]=new Set);const r=e[i];for(const o of r)t[n.uuid].add(o)}return t}modelIdToFragmentIdMap(e){let t={};for(const i in e){const s=this.groups.get(i);if(!s)continue;const n=e[i],r=s.getFragmentMap(n);t={...t,...r}}return t}guidToFragmentIdMap(e){const t={};for(const[i,s]of this.groups){i in t||(t[i]=new Set);for(const n of e){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return this.modelIdToFragmentIdMap(t)}fragmentIdMapToGuids(e){const t=[],i=this.getModelIdMap(e);for(const s in i){const n=this.groups.get(s);if(!n)continue;const r=i[s];for(const o of r)for(const[a,h]of n.globalToExpressIDs.entries())if(h===o){t.push(a);break}}return t}coordinate(e=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const t=e.pop();if(!t)return;this.baseCoordinationModel=t.uuid,this.baseCoordinationMatrix=t.coordinationMatrix.clone()}if(e.length)for(const t of e)t.coordinationMatrix.equals(this.baseCoordinationMatrix)||(t.position.set(0,0,0),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.updateMatrix(),this.applyBaseCoordinateSystem(t,t.coordinationMatrix))}applyBaseCoordinateSystem(e,t){t&&e.applyMatrix4(t.clone().invert()),e.applyMatrix4(this.baseCoordinationMatrix)}clone(e,t){const i=e.cloneGroup(t);this.groups.set(i.uuid,i);for(const s of i.items)this.list.set(s.id,s);return i}};T(Vl,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let ue=Vl;function pn(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Gl={exports:{}};/*! + `,extensions:{derivatives:!0}});this.three=new ee(o,a),this.three.frustumCulled=!1,t.scene.three.add(this.three),this.setupEvents(!0)}get visible(){return this.three.visible}set visible(e){e?this.world.scene.three.add(this.three):this.three.removeFromParent()}get material(){return this.three.material}get fade(){return this._fade===3}set fade(e){this._fade=e?3:0,this.material.uniforms.uFade.value=this._fade}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.color=t.color,this.config.primarySize=t.primarySize,this.config.secondarySize=t.secondarySize,this.config.distance=t.distance,this.isSetup=!0,this.onSetup.trigger()}dispose(){this.setupEvents(!1),this.components.get(Bn).list.delete(this.config.uuid),this.components.get(Nt).destroy(this.three),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(e){if(this.world.isDisposing||!(this.world.camera instanceof ws))return;const t=this.world.camera.controls;e?t.addEventListener("update",this.updateZoom):t.removeEventListener("update",this.updateZoom)}}const hu=class al extends de{constructor(e){super(e),T(this,"list",new Map),T(this,"onDisposed",new Y),T(this,"enabled",!0),e.add(al.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a grid!");const t=new cu(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}};T(hu,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");const oi=new bn,Ge=new x,Xt=new x,Oe=new at,sa={X:new x(1,0,0),Y:new x(0,1,0),Z:new x(0,0,1)},dr={type:"change"},na={type:"mouseDown"},ra={type:"mouseUp",mode:null},oa={type:"objectChange"};class du extends Gi{constructor(e,t){super(),t===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),t=document),this.isTransformControls=!0,this.visible=!1,this.domElement=t,this.domElement.style.touchAction="none";const i=new Eu;this._gizmo=i,this.add(i);const s=new gu;this._plane=s,this.add(s);const n=this;function r(g,w){let C=w;Object.defineProperty(n,g,{get:function(){return C!==void 0?C:w},set:function(v){C!==v&&(C=v,s[g]=v,i[g]=v,n.dispatchEvent({type:g+"-changed",value:v}),n.dispatchEvent(dr))}}),n[g]=w,s[g]=w,i[g]=w}r("camera",e),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0);const o=new x,a=new x,l=new at,h=new at,d=new x,u=new at,f=new x,m=new x,p=new x,E=0,I=new x;r("worldPosition",o),r("worldPositionStart",a),r("worldQuaternion",l),r("worldQuaternionStart",h),r("cameraPosition",d),r("cameraQuaternion",u),r("pointStart",f),r("pointEnd",m),r("rotationAxis",p),r("rotationAngle",E),r("eye",I),this._offset=new x,this._startNorm=new x,this._endNorm=new x,this._cameraScale=new x,this._parentPosition=new x,this._parentQuaternion=new at,this._parentQuaternionInv=new at,this._parentScale=new x,this._worldScaleStart=new x,this._worldQuaternionInv=new at,this._worldScale=new x,this._positionStart=new x,this._quaternionStart=new at,this._scaleStart=new x,this._getPointer=uu.bind(this),this._onPointerDown=pu.bind(this),this._onPointerHover=fu.bind(this),this._onPointerMove=mu.bind(this),this._onPointerUp=Iu.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(e){if(this.object===void 0||this.dragging===!0)return;oi.setFromCamera(e,this.camera);const t=ur(this._gizmo.picker[this.mode],oi);t?this.axis=t.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){oi.setFromCamera(e,this.camera);const t=ur(this._plane,oi,!0);t&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)),this.dragging=!0,na.mode=this.mode,this.dispatchEvent(na)}}pointerMove(e){const t=this.axis,i=this.mode,s=this.object;let n=this.space;if(i==="scale"?n="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(n="world"),s===void 0||t===null||this.dragging===!1||e.button!==-1)return;oi.setFromCamera(e,this.camera);const r=ur(this._plane,oi,!0);if(r){if(this.pointEnd.copy(r.point).sub(this.worldPositionStart),i==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="local"&&t!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),t.indexOf("X")===-1&&(this._offset.x=0),t.indexOf("Y")===-1&&(this._offset.y=0),t.indexOf("Z")===-1&&(this._offset.z=0),n==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(n==="local"&&(s.position.applyQuaternion(Oe.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),n==="world"&&(s.parent&&s.position.add(Ge.setFromMatrixPosition(s.parent.matrixWorld)),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(Ge.setFromMatrixPosition(s.parent.matrixWorld))));else if(i==="scale"){if(t.search("XYZ")!==-1){let o=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(o*=-1),Xt.set(o,o,o)}else Ge.copy(this.pointStart),Xt.copy(this.pointEnd),Ge.applyQuaternion(this._worldQuaternionInv),Xt.applyQuaternion(this._worldQuaternionInv),Xt.divide(Ge),t.search("X")===-1&&(Xt.x=1),t.search("Y")===-1&&(Xt.y=1),t.search("Z")===-1&&(Xt.z=1);s.scale.copy(this._scaleStart).multiply(Xt),this.scaleSnap&&(t.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(i==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const o=20/this.worldPosition.distanceTo(Ge.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Ge.copy(this.rotationAxis).cross(this.eye))*o):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(sa[t]),Ge.copy(sa[t]),n==="local"&&Ge.applyQuaternion(this.worldQuaternion),Ge.cross(this.eye),Ge.length()===0?a=!0:this.rotationAngle=this._offset.dot(Ge.normalize())*o),(t==="E"||a)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),n==="local"&&t!=="E"&&t!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(Oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(Oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(dr),this.dispatchEvent(oa)}}pointerUp(e){e.button===0&&(this.dragging&&this.axis!==null&&(ra.mode=this.mode,this.dispatchEvent(ra)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}attach(e){return this.object=e,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(dr),this.dispatchEvent(oa),this.pointStart.copy(this.pointEnd))}getRaycaster(){return oi}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}}function uu(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const e=this.domElement.getBoundingClientRect();return{x:(c.clientX-e.left)/e.width*2-1,y:-(c.clientY-e.top)/e.height*2+1,button:c.button}}}function fu(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function pu(c){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(c.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(c)),this.pointerDown(this._getPointer(c)))}function mu(c){this.enabled&&this.pointerMove(this._getPointer(c))}function Iu(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function ur(c,e,t){const i=e.intersectObject(c,!0);for(let s=0;s.9&&(n.visible=!1)),this.axis==="Y"&&(Oe.setFromEuler(en.set(0,0,Math.PI/2)),n.quaternion.copy(t).multiply(Oe),Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(Oe.setFromEuler(en.set(0,Math.PI/2,0)),n.quaternion.copy(t).multiply(Oe),Math.abs(Re.copy(Cs).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(Oe.setFromEuler(en.set(0,Math.PI/2,0)),Re.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(la.lookAt(aa,Re,li)),n.quaternion.multiply(Oe),n.visible=this.dragging),this.axis==="E"&&(n.visible=!1)):n.name==="START"?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):n.name==="END"?(n.position.copy(this.worldPosition),n.visible=this.dragging):n.name==="DELTA"?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),Ge.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Ge.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(Ge),n.visible=this.dragging):(n.quaternion.copy(t),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=this.axis.search(n.name)!==-1));continue}n.quaternion.copy(t),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(Re.copy(gs).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(Re.copy(Cs).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(Re.copy(Cs).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(Re.copy(gs).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(tn.copy(t),Re.copy(this.eye).applyQuaternion(Oe.copy(t).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(la.lookAt(this.eye,aa,li)),n.name==="X"&&(Oe.setFromAxisAngle(gs,Math.atan2(-Re.y,Re.z)),Oe.multiplyQuaternions(tn,Oe),n.quaternion.copy(Oe)),n.name==="Y"&&(Oe.setFromAxisAngle(li,Math.atan2(Re.x,Re.z)),Oe.multiplyQuaternions(tn,Oe),n.quaternion.copy(Oe)),n.name==="Z"&&(Oe.setFromAxisAngle(Cs,Math.atan2(Re.y,Re.x)),Oe.multiplyQuaternions(tn,Oe),n.quaternion.copy(Oe))),n.visible=n.visible&&(n.name.indexOf("X")===-1||this.showX),n.visible=n.visible&&(n.name.indexOf("Y")===-1||this.showY),n.visible=n.visible&&(n.name.indexOf("Z")===-1||this.showZ),n.visible=n.visible&&(n.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis||this.axis.split("").some(function(o){return n.name===o}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}super.updateMatrixWorld(e)}}class gu extends ee{constructor(){super(new xn(1e5,1e5,2,2),new st({visible:!1,wireframe:!0,side:As,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),sn.copy(gs).applyQuaternion(t==="local"?this.worldQuaternion:gn),fs.copy(li).applyQuaternion(t==="local"?this.worldQuaternion:gn),ps.copy(Cs).applyQuaternion(t==="local"?this.worldQuaternion:gn),Re.copy(fs),this.mode){case"translate":case"scale":switch(this.axis){case"X":Re.copy(this.eye).cross(sn),St.copy(sn).cross(Re);break;case"Y":Re.copy(this.eye).cross(fs),St.copy(fs).cross(Re);break;case"Z":Re.copy(this.eye).cross(ps),St.copy(ps).cross(Re);break;case"XY":St.copy(ps);break;case"YZ":St.copy(sn);break;case"XZ":Re.copy(ps),St.copy(fs);break;case"XYZ":case"E":St.set(0,0,0);break}break;case"rotate":default:St.set(0,0,0)}St.length()===0?this.quaternion.copy(this.cameraQuaternion):(ca.lookAt(Ge.set(0,0,0),St,Re),this.quaternion.setFromRotationMatrix(ca)),super.updateMatrixWorld(e)}}class zn{constructor(e,t,i,s,n,r=5,o=!0){if(T(this,"onDraggingStarted",new Y),T(this,"onDraggingEnded",new Y),T(this,"onDisposed",new Y),T(this,"normal"),T(this,"origin"),T(this,"three",new ii),T(this,"components"),T(this,"world"),T(this,"type","default"),T(this,"_helper"),T(this,"_visible",!0),T(this,"_enabled",!0),T(this,"_controlsActive",!1),T(this,"_arrowBoundBox",new ee),T(this,"_planeMesh"),T(this,"_controls"),T(this,"_hiddenMaterial",new st({visible:!1})),T(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)}),T(this,"changeDrag",a=>{this._visible=!a.value,this.preventCameraMovement(),this.notifyDraggingChanged(a)}),this.components=e,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=s,this.origin=i,t.renderer.setPlane(!0,this.three),this._planeMesh=zn.newPlaneMesh(r,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(s,i),o&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(e){if(!this.world.isDisposing){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=e,this.world.renderer.setPlane(e,this.three)}}get visible(){return this._visible}set visible(e){this._visible=e,this._controls.visible=e,this._helper.visible=e,this.toggleControls(e)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(e){this._planeMesh.material=e}get size(){return this._planeMesh.scale.x}set size(e){this._planeMesh.scale.set(e,e,e)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(e,t){this.reset(),this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),this.update()}dispose(){this._enabled=!1,this.onDraggingStarted.reset(),this.onDraggingEnded.reset(),this._helper.removeFromParent(),this.world.renderer&&this.world.renderer.setPlane(!1,this.three),this._arrowBoundBox.removeFromParent(),this._arrowBoundBox.geometry.dispose(),this._planeMesh.geometry.dispose(),this._controls.removeFromParent(),this._controls.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}reset(){const e=new x(1,0,0),t=new x;this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(e){if(e){if(this._controlsActive)return;this._controls.addEventListener("change",this.update),this._controls.addEventListener("dragging-changed",this.changeDrag)}else this._controls.removeEventListener("change",this.update),this._controls.removeEventListener("dragging-changed",this.changeDrag);this._controlsActive=e}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const e=this.world.camera.three,t=this.world.renderer.three.domElement,i=new du(e,t);return this.initializeControls(i),this.world.scene.three.add(i),i}initializeControls(e){e.attach(this._helper),e.showX=!1,e.showY=!1,e.setSpace("local"),this.createArrowBoundingBox(),e.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new Xe(.18,.18,1.2),this._arrowBoundBox.material=this._hiddenMaterial,this._arrowBoundBox.rotateX(Math.PI/2),this._arrowBoundBox.updateMatrix(),this._arrowBoundBox.geometry.applyMatrix4(this._arrowBoundBox.matrix)}notifyDraggingChanged(e){e.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const e=new Gi;return e.lookAt(this.normal),e.position.copy(this.origin),this._planeMesh.position.z+=.01,e.add(this._planeMesh),this.world.scene.three.add(e),e}static newPlaneMesh(e,t){const i=new xn(1),s=new ee(i,t);return s.scale.set(e,e,e),s}}class Cu extends Qi{constructor(){super(...arguments),T(this,"_config",{enabled:{value:!0,type:"Boolean"},visible:{value:!0,type:"Boolean"},color:{value:new _e,type:"Color"},opacity:{type:"Number",interpolable:!0,value:1,min:0,max:1},size:{type:"Number",interpolable:!0,value:2,min:0,max:100}})}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.color.copy(e)}get opacity(){return this._config.opacity.value}set opacity(e){this._config.opacity.value=e,this._component.material.opacity=e}get size(){return this._config.size.value}set size(e){this._config.size.value=e,this._component.size=e}}const ll=class Cn extends de{constructor(e){super(e),T(this,"onSetup",new Y),T(this,"onBeforeDrag",new Y),T(this,"onAfterDrag",new Y),T(this,"onBeforeCreate",new Y),T(this,"onBeforeCancel",new Y),T(this,"onAfterCancel",new Y),T(this,"onBeforeDelete",new Y),T(this,"onAfterCreate",new Y),T(this,"onAfterDelete",new Y),T(this,"onDisposed",new Y),T(this,"isSetup",!1),T(this,"orthogonalY",!1),T(this,"toleranceOrthogonalY",.7),T(this,"Type",zn),T(this,"list",[]),T(this,"config",new Cu(this,this.components,"Clipper",Cn.uuid)),T(this,"_defaultConfig",{color:new _e(12255487),opacity:.2,size:2}),T(this,"_material",new st({color:12255487,side:As,transparent:!0,opacity:.2})),T(this,"_size",5),T(this,"_enabled",!1),T(this,"_visible",!0),T(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()}),T(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()}),this.components.add(Cn.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const t of this.list)t.enabled=e;this.updateMaterialsAndPlanes()}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get material(){return this._material}set material(e){this._material=e;for(const t of this.list)t.planeMaterial=e}get size(){return this._size}set size(e){this._size=e;for(const t of this.list)t.size=e}dispose(){this._enabled=!1,this.components.get(Bn).list.delete(this.config.uuid);for(const e of this.list)e.dispose();this.list.length=0,this._material.dispose(),this.onBeforeCreate.reset(),this.onBeforeCancel.reset(),this.onBeforeDelete.reset(),this.onBeforeDrag.reset(),this.onAfterCreate.reset(),this.onAfterCancel.reset(),this.onAfterDelete.reset(),this.onAfterDrag.reset(),this.onDisposed.trigger(Cn.uuid),this.onDisposed.reset()}create(e){const t=this.components.get(ut).get(e).castRay();return t?this.createPlaneFromIntersection(e,t):null}createFromNormalAndCoplanarPoint(e,t,i){const s=this.newPlane(e,i,t);return this.updateMaterialsAndPlanes(),s}delete(e,t){t||(t=this.pickPlane(e)),t&&this.deletePlane(t)}deleteAll(e){const t=[...this.list];for(const i of t)if(!e||e.has(i.type)){this.delete(i.world,i);const s=this.list.indexOf(i);s!==-1&&this.list.splice(s,1)}}setup(e){const t={...this._defaultConfig,...e};this.config.color=t.color,this.config.opacity=t.opacity,this.config.size=t.size,this.isSetup=!0,this.onSetup.trigger()}deletePlane(e){const t=this.list.indexOf(e);if(t!==-1){if(this.list.splice(t,1),!e.world.renderer)throw new Error("Renderer not found for this plane's world!");e.world.renderer.setPlane(!1,e.three),e.dispose(),this.updateMaterialsAndPlanes(),this.onAfterDelete.trigger(e)}}pickPlane(e){const t=this.components.get(ut).get(e),i=this.getAllPlaneMeshes(),s=t.castRay(i);if(s){const n=s.object;return this.list.find(r=>r.meshes.includes(n))}}getAllPlaneMeshes(){const e=[];for(const t of this.list)e.push(...t.meshes);return e}createPlaneFromIntersection(e,t){var i;if(!e.renderer)throw new Error("The given world must have a renderer!");const s=t.point.distanceTo(new x(0,0,0)),n=(i=t.face)==null?void 0:i.normal;if(!s||!n)return null;const r=this.getWorldNormal(t,n),o=this.newPlane(e,t.point,r.negate());return o.visible=this._visible,o.size=this._size,e.renderer.setPlane(!0,o.three),this.updateMaterialsAndPlanes(),o}getWorldNormal(e,t){const i=e.object;let s=e.object.matrixWorld.clone();if(i instanceof It&&e.instanceId!==void 0){const o=new ne;i.getMatrixAt(e.instanceId,o),s=o.multiply(s)}const n=new di().getNormalMatrix(s),r=t.clone().applyMatrix3(n).normalize();return this.normalizePlaneDirectionY(r),r}normalizePlaneDirectionY(e){this.orthogonalY&&(e.y>this.toleranceOrthogonalY&&(e.x=0,e.y=1,e.z=0),e.y<-this.toleranceOrthogonalY&&(e.x=0,e.y=-1,e.z=0))}newPlane(e,t,i){const s=new this.Type(this.components,e,t,i,this._material);return s.onDraggingStarted.add(this._onStartDragging),s.onDraggingEnded.add(this._onEndDragging),this.list.push(s),this.onAfterCreate.trigger(s),s}updateMaterialsAndPlanes(){const e=this.components.get(il);for(const[t,i]of e.list){if(!i.renderer)continue;i.renderer.updateClippingPlanes();const{clippingPlanes:s}=i.renderer;for(const n of i.meshes)if(n.material)if(Array.isArray(n.material))for(const r of n.material)r.clippingPlanes=s;else n.material.clippingPlanes=s}}};T(ll,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let Xi=ll;class Tu{constructor(e){T(this,"enabled",!1),T(this,"id","FirstPerson"),this.camera=e}set(e){if(this.enabled=e,e){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const e=this.camera.controls,t=new x;e.distance--,e.getPosition(t),e.minDistance=1,e.maxDistance=1,e.distance=1,e.moveTo(t.x,t.y,t.z),e.truckSpeed=50,e.mouseButtons.wheel=We.ACTION.DOLLY,e.touches.two=We.ACTION.TOUCH_ZOOM_TRUCK}}class Ru{constructor(e){T(this,"enabled",!0),T(this,"id","Orbit"),this.camera=e,this.activateOrbitControls()}set(e){this.enabled=e,e&&this.activateOrbitControls()}activateOrbitControls(){const e=this.camera.controls;e.minDistance=1,e.maxDistance=300;const t=new x;e.getPosition(t);const i=t.length();e.distance=i,e.truckSpeed=2;const{rotation:s}=this.camera.three,n=new x(0,0,-1).applyEuler(s),r=t.addScaledVector(n,i);e.moveTo(r.x,r.y,r.z)}}class Su{constructor(e){T(this,"enabled",!1),T(this,"id","Plan"),T(this,"mouseAction1"),T(this,"mouseAction2"),T(this,"mouseInitialized",!1),T(this,"defaultAzimuthSpeed"),T(this,"defaultPolarSpeed"),this.camera=e,this.defaultAzimuthSpeed=e.controls.azimuthRotateSpeed,this.defaultPolarSpeed=e.controls.polarRotateSpeed}set(e){this.enabled=e;const t=this.camera.controls;t.azimuthRotateSpeed=e?0:this.defaultAzimuthSpeed,t.polarRotateSpeed=e?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=t.touches.one,this.mouseAction2=t.touches.two,this.mouseInitialized=!0),e?(t.mouseButtons.left=We.ACTION.TRUCK,t.touches.one=We.ACTION.TOUCH_TRUCK,t.touches.two=We.ACTION.TOUCH_ZOOM):(t.mouseButtons.left=We.ACTION.ROTATE,t.touches.one=this.mouseAction1,t.touches.two=this.mouseAction2)}}class wu{constructor(e){T(this,"onChanged",new Y),T(this,"current","Perspective"),T(this,"camera"),T(this,"matchOrthoDistanceEnabled",!1),T(this,"_component"),T(this,"_previousDistance",-1),this._component=e,this.camera=e.three}async set(e){this.current!==e&&(e==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const e=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(e)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const e=this.getPerspectiveDims();if(!e)return;const{width:t,height:i}=e;this.setupOrthoCamera(i,t),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const e=this._component.currentWorld;if(!e||!e.renderer)return null;const t=new x;this._component.threePersp.getWorldDirection(t);const i=new x;this._component.controls.getTarget(i);const s=i.clone().sub(this._component.threePersp.position).dot(t),n=e.renderer.getSize(),r=n.x/n.y,o=this._component.threePersp,a=s*2*Math.atan(o.fov*(Math.PI/180)/2);return{width:a*r,height:a}}setupOrthoCamera(e,t){this._component.controls.mouseButtons.wheel=We.ACTION.ZOOM,this._component.controls.mouseButtons.middle=We.ACTION.ZOOM;const i=this._component.threePersp,s=this._component.threeOrtho;s.zoom=1,s.left=t/-2,s.right=t/2,s.top=e/2,s.bottom=e/-2,s.updateProjectionMatrix(),s.position.copy(i.position),s.quaternion.copy(i.quaternion),this._component.controls.camera=s}getDistance(){const e=this._component.threePersp,t=this._component.threeOrtho;return(t.top-t.bottom)/t.zoom/(2*Math.atan(e.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=We.ACTION.DOLLY,this._component.controls.mouseButtons.middle=We.ACTION.DOLLY;const e=this._component.threePersp,t=this._component.threeOrtho;e.position.copy(t.position),e.quaternion.copy(t.quaternion),this._component.controls.mouseButtons.wheel=We.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),e.updateProjectionMatrix(),this._component.controls.camera=e,this.camera=e,this.current="Perspective"}}class vu extends ws{constructor(e){super(e),T(this,"projection"),T(this,"threeOrtho"),T(this,"threePersp"),T(this,"_userInputButtons",{}),T(this,"_frustumSize",50),T(this,"_navigationModes",new Map),T(this,"_mode",null),T(this,"previousSize",null),this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new wu(this),this.onAspectUpdated.add(()=>{this.setOrthoPerspCameraAspect()}),this.projection.onChanged.add(t=>{this.three=t,this.updateAspect()}),this.onWorldChanged.add(({action:t})=>{t==="added"&&(this._navigationModes.clear(),this._navigationModes.set("Orbit",new Ru(this)),this._navigationModes.set("FirstPerson",new Tu(this)),this._navigationModes.set("Plan",new Su(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0}),this.currentWorld&&this.currentWorld.renderer&&(this.previousSize=this.currentWorld.renderer.getSize().clone()))})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(e){if(this.mode!==null&&this.mode.id!==e){if(this.mode.set(!1),!this._navigationModes.has(e))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(e),this.mode.set(!0)}}async fit(e,t=1.5){if(!this.enabled)return;const i=Number.MAX_VALUE,s=Number.MIN_VALUE,n=new x(i,i,i),r=new x(s,s,s);for(const u of e){const f=new ye().setFromObject(u);f.min.xr.x&&(r.x=f.max.x),f.max.y>r.y&&(r.y=f.max.y),f.max.z>r.z&&(r.z=f.max.z)}const o=new ye(n,r),a=new x;o.getSize(a);const l=new x;o.getCenter(l);const h=Math.max(a.x,a.y,a.z)*t,d=new gi(l,h);await this.controls.fitToSphere(d,!0)}setUserInput(e){e?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const e=window.innerWidth/window.innerHeight;return new ti(this._frustumSize*e/-2,this._frustumSize*e/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoPerspCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer||!this.previousSize)return;const e=this.currentWorld.renderer.getSize(),t=this.threeOrtho.top,i=this.threeOrtho.right,s=e.y/this.previousSize.y,n=e.x/this.previousSize.x,r=t*s,o=i*n;this.threeOrtho.left=-o,this.threeOrtho.right=o,this.threeOrtho.top=r,this.threeOrtho.bottom=-r,this.threeOrtho.updateProjectionMatrix(),this.previousSize.copy(e)}}const ha=new Map([[Mn,{forRelated:"Decomposes",forRelating:"IsDecomposedBy"}],[Wr,{forRelated:"HasAssociations",forRelating:"AssociatedTo"}],[Xr,{forRelated:"HasAssociations",forRelating:"ClassificationForObjects"}],[Zr,{forRelated:"HasAssignments",forRelating:"IsGroupedBy"}],[Os,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[jr,{forRelated:"IsTypedBy",forRelating:"Types"}],[Qr,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[Ln,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}],[Kr,{forRelated:"AssignedToFlowElement",forRelating:"HasControlElements"}],[qr,{forRelated:"ConnectedFrom",forRelating:"ConnectedTo"}],[Jr,{forRelated:"HasAssignments",forRelating:"ReferencedBy"}],[$r,{forRelated:"HasContext",forRelating:"Declares"}],[eo,{forRelated:"HasAssignments",forRelating:"Controls"}],[to,{forRelated:"Nests",forRelating:"IsNestedBy"}],[io,{forRelated:"HasAssociations",forRelating:"DocumentRefForObjects"}]]),An={950732822:"IFCURIREFERENCE",4075327185:"IFCTIME",1209108979:"IFCTEMPERATURERATEOFCHANGEMEASURE",3457685358:"IFCSOUNDPRESSURELEVELMEASURE",4157543285:"IFCSOUNDPOWERLEVELMEASURE",2798247006:"IFCPROPERTYSETDEFINITIONSET",1790229001:"IFCPOSITIVEINTEGER",525895558:"IFCNONNEGATIVELENGTHMEASURE",1774176899:"IFCLINEINDEX",1275358634:"IFCLANGUAGEID",2541165894:"IFCDURATION",3701338814:"IFCDAYINWEEKNUMBER",2195413836:"IFCDATETIME",937566702:"IFCDATE",1683019596:"IFCCARDINALPOINTREFERENCE",2314439260:"IFCBINARY",1500781891:"IFCAREADENSITYMEASURE",3683503648:"IFCARCINDEX",4065007721:"IFCYEARNUMBER",1718600412:"IFCWARPINGMOMENTMEASURE",51269191:"IFCWARPINGCONSTANTMEASURE",2593997549:"IFCVOLUMETRICFLOWRATEMEASURE",3458127941:"IFCVOLUMEMEASURE",3345633955:"IFCVAPORPERMEABILITYMEASURE",1278329552:"IFCTORQUEMEASURE",2591213694:"IFCTIMESTAMP",2726807636:"IFCTIMEMEASURE",743184107:"IFCTHERMODYNAMICTEMPERATUREMEASURE",2016195849:"IFCTHERMALTRANSMITTANCEMEASURE",857959152:"IFCTHERMALRESISTANCEMEASURE",2281867870:"IFCTHERMALEXPANSIONCOEFFICIENTMEASURE",2645777649:"IFCTHERMALCONDUCTIVITYMEASURE",232962298:"IFCTHERMALADMITTANCEMEASURE",296282323:"IFCTEXTTRANSFORMATION",603696268:"IFCTEXTFONTNAME",3490877962:"IFCTEXTDECORATION",1460886941:"IFCTEXTALIGNMENT",2801250643:"IFCTEXT",58845555:"IFCTEMPERATUREGRADIENTMEASURE",361837227:"IFCSPECULARROUGHNESS",2757832317:"IFCSPECULAREXPONENT",3477203348:"IFCSPECIFICHEATCAPACITYMEASURE",993287707:"IFCSOUNDPRESSUREMEASURE",846465480:"IFCSOUNDPOWERMEASURE",3471399674:"IFCSOLIDANGLEMEASURE",408310005:"IFCSHEARMODULUSMEASURE",2190458107:"IFCSECTIONALAREAINTEGRALMEASURE",3467162246:"IFCSECTIONMODULUSMEASURE",2766185779:"IFCSECONDINMINUTE",3211557302:"IFCROTATIONALSTIFFNESSMEASURE",1755127002:"IFCROTATIONALMASSMEASURE",2133746277:"IFCROTATIONALFREQUENCYMEASURE",200335297:"IFCREAL",96294661:"IFCRATIOMEASURE",3972513137:"IFCRADIOACTIVITYMEASURE",3665567075:"IFCPRESSUREMEASURE",2169031380:"IFCPRESENTABLETEXT",1364037233:"IFCPOWERMEASURE",1245737093:"IFCPOSITIVERATIOMEASURE",3054510233:"IFCPOSITIVEPLANEANGLEMEASURE",2815919920:"IFCPOSITIVELENGTHMEASURE",4042175685:"IFCPLANEANGLEMEASURE",2642773653:"IFCPLANARFORCEMEASURE",2260317790:"IFCPARAMETERVALUE",929793134:"IFCPHMEASURE",2395907400:"IFCNUMERICMEASURE",2095195183:"IFCNORMALISEDRATIOMEASURE",765770214:"IFCMONTHINYEARNUMBER",2615040989:"IFCMONETARYMEASURE",3114022597:"IFCMOMENTOFINERTIAMEASURE",1648970520:"IFCMOLECULARWEIGHTMEASURE",3177669450:"IFCMOISTUREDIFFUSIVITYMEASURE",1753493141:"IFCMODULUSOFSUBGRADEREACTIONMEASURE",1052454078:"IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE",2173214787:"IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE",3341486342:"IFCMODULUSOFELASTICITYMEASURE",102610177:"IFCMINUTEINHOUR",3531705166:"IFCMASSPERLENGTHMEASURE",3124614049:"IFCMASSMEASURE",4017473158:"IFCMASSFLOWRATEMEASURE",1477762836:"IFCMASSDENSITYMEASURE",2486716878:"IFCMAGNETICFLUXMEASURE",286949696:"IFCMAGNETICFLUXDENSITYMEASURE",151039812:"IFCLUMINOUSINTENSITYMEASURE",2755797622:"IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE",2095003142:"IFCLUMINOUSFLUXMEASURE",503418787:"IFCLOGICAL",3086160713:"IFCLINEARVELOCITYMEASURE",1307019551:"IFCLINEARSTIFFNESSMEASURE",2128979029:"IFCLINEARMOMENTMEASURE",191860431:"IFCLINEARFORCEMEASURE",1243674935:"IFCLENGTHMEASURE",3258342251:"IFCLABEL",2054016361:"IFCKINEMATICVISCOSITYMEASURE",3192672207:"IFCISOTHERMALMOISTURECAPACITYMEASURE",3686016028:"IFCIONCONCENTRATIONMEASURE",3809634241:"IFCINTEGERCOUNTRATEMEASURE",1939436016:"IFCINTEGER",2679005408:"IFCINDUCTANCEMEASURE",3358199106:"IFCILLUMINANCEMEASURE",983778844:"IFCIDENTIFIER",2589826445:"IFCHOURINDAY",1158859006:"IFCHEATINGVALUEMEASURE",3113092358:"IFCHEATFLUXDENSITYMEASURE",3064340077:"IFCGLOBALLYUNIQUEID",3044325142:"IFCFREQUENCYMEASURE",1361398929:"IFCFORCEMEASURE",2590844177:"IFCFONTWEIGHT",2715512545:"IFCFONTVARIANT",1102727119:"IFCFONTSTYLE",2078135608:"IFCENERGYMEASURE",2506197118:"IFCELECTRICVOLTAGEMEASURE",2951915441:"IFCELECTRICRESISTANCEMEASURE",3790457270:"IFCELECTRICCURRENTMEASURE",2093906313:"IFCELECTRICCONDUCTANCEMEASURE",3818826038:"IFCELECTRICCHARGEMEASURE",1827137117:"IFCELECTRICCAPACITANCEMEASURE",69416015:"IFCDYNAMICVISCOSITYMEASURE",524656162:"IFCDOSEEQUIVALENTMEASURE",4134073009:"IFCDIMENSIONCOUNT",1514641115:"IFCDESCRIPTIVEMEASURE",300323983:"IFCDAYLIGHTSAVINGHOUR",86635668:"IFCDAYINMONTHNUMBER",94842927:"IFCCURVATUREMEASURE",1778710042:"IFCCOUNTMEASURE",3238673880:"IFCCONTEXTDEPENDENTMEASURE",3812528620:"IFCCOMPOUNDPLANEANGLEMEASURE",2991860651:"IFCCOMPLEXNUMBER",1867003952:"IFCBOXALIGNMENT",2735952531:"IFCBOOLEAN",2650437152:"IFCAREAMEASURE",632304761:"IFCANGULARVELOCITYMEASURE",360377573:"IFCAMOUNTOFSUBSTANCEMEASURE",4182062534:"IFCACCELERATIONMEASURE",3699917729:"IFCABSORBEDDOSEMEASURE",1971632696:"IFCGEOSLICE",2680139844:"IFCGEOMODEL",24726584:"IFCELECTRICFLOWTREATMENTDEVICE",3693000487:"IFCDISTRIBUTIONBOARD",3460952963:"IFCCONVEYORSEGMENT",3999819293:"IFCCAISSONFOUNDATION",3314249567:"IFCBOREHOLE",4196446775:"IFCBEARING",325726236:"IFCALIGNMENT",3425753595:"IFCTRACKELEMENT",991950508:"IFCSIGNAL",3798194928:"IFCREINFORCEDSOIL",3290496277:"IFCRAIL",1383356374:"IFCPAVEMENT",2182337498:"IFCNAVIGATIONELEMENT",234836483:"IFCMOORINGDEVICE",2078563270:"IFCMOBILETELECOMMUNICATIONSAPPLIANCE",1638804497:"IFCLIQUIDTERMINAL",1154579445:"IFCLINEARPOSITIONINGELEMENT",2696325953:"IFCKERB",2713699986:"IFCGEOTECHNICALASSEMBLY",2142170206:"IFCELECTRICFLOWTREATMENTDEVICETYPE",3376911765:"IFCEARTHWORKSFILL",1077100507:"IFCEARTHWORKSELEMENT",3071239417:"IFCEARTHWORKSCUT",479945903:"IFCDISTRIBUTIONBOARDTYPE",3426335179:"IFCDEEPFOUNDATION",1502416096:"IFCCOURSE",2940368186:"IFCCONVEYORSEGMENTTYPE",3203706013:"IFCCAISSONFOUNDATIONTYPE",3862327254:"IFCBUILTSYSTEM",1876633798:"IFCBUILTELEMENT",963979645:"IFCBRIDGEPART",644574406:"IFCBRIDGE",3649138523:"IFCBEARINGTYPE",1662888072:"IFCALIGNMENTVERTICAL",317615605:"IFCALIGNMENTSEGMENT",1545765605:"IFCALIGNMENTHORIZONTAL",4266260250:"IFCALIGNMENTCANT",3956297820:"IFCVIBRATIONDAMPERTYPE",1530820697:"IFCVIBRATIONDAMPER",840318589:"IFCVEHICLE",1953115116:"IFCTRANSPORTATIONDEVICE",618700268:"IFCTRACKELEMENTTYPE",2281632017:"IFCTENDONCONDUITTYPE",3663046924:"IFCTENDONCONDUIT",42703149:"IFCSINESPIRAL",1894708472:"IFCSIGNALTYPE",3599934289:"IFCSIGNTYPE",33720170:"IFCSIGN",1027922057:"IFCSEVENTHORDERPOLYNOMIALSPIRAL",544395925:"IFCSEGMENTEDREFERENCECURVE",3649235739:"IFCSECONDORDERPOLYNOMIALSPIRAL",550521510:"IFCROADPART",146592293:"IFCROAD",3818125796:"IFCRELADHERESTOELEMENT",4021432810:"IFCREFERENT",1891881377:"IFCRAILWAYPART",3992365140:"IFCRAILWAY",1763565496:"IFCRAILTYPE",1946335990:"IFCPOSITIONINGELEMENT",514975943:"IFCPAVEMENTTYPE",506776471:"IFCNAVIGATIONELEMENTTYPE",710110818:"IFCMOORINGDEVICETYPE",1950438474:"IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE",976884017:"IFCMARINEPART",525669439:"IFCMARINEFACILITY",1770583370:"IFCLIQUIDTERMINALTYPE",2176059722:"IFCLINEARELEMENT",679976338:"IFCKERBTYPE",3948183225:"IFCIMPACTPROTECTIONDEVICETYPE",2568555532:"IFCIMPACTPROTECTIONDEVICE",2898700619:"IFCGRADIENTCURVE",1594536857:"IFCGEOTECHNICALSTRATUM",4230923436:"IFCGEOTECHNICALELEMENT",4228831410:"IFCFACILITYPARTCOMMON",1310830890:"IFCFACILITYPART",24185140:"IFCFACILITY",4234616927:"IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID",1306400036:"IFCDEEPFOUNDATIONTYPE",4189326743:"IFCCOURSETYPE",2000195564:"IFCCOSINESPIRAL",3497074424:"IFCCLOTHOID",1626504194:"IFCBUILTELEMENTTYPE",3651464721:"IFCVEHICLETYPE",1229763772:"IFCTRIANGULATEDIRREGULARNETWORK",3665877780:"IFCTRANSPORTATIONDEVICETYPE",782932809:"IFCTHIRDORDERPOLYNOMIALSPIRAL",2735484536:"IFCSPIRAL",1356537516:"IFCSECTIONEDSURFACE",1290935644:"IFCSECTIONEDSOLIDHORIZONTAL",1862484736:"IFCSECTIONEDSOLID",1441486842:"IFCRELPOSITIONS",1033248425:"IFCRELASSOCIATESPROFILEDEF",3381221214:"IFCPOLYNOMIALCURVE",2485787929:"IFCOFFSETCURVEBYDISTANCES",590820931:"IFCOFFSETCURVE",3465909080:"IFCINDEXEDPOLYGONALTEXTUREMAP",593015953:"IFCDIRECTRIXCURVESWEPTAREASOLID",4212018352:"IFCCURVESEGMENT",3425423356:"IFCAXIS2PLACEMENTLINEAR",823603102:"IFCSEGMENT",2165702409:"IFCPOINTBYDISTANCEEXPRESSION",182550632:"IFCOPENCROSSPROFILEDEF",388784114:"IFCLINEARPLACEMENT",536804194:"IFCALIGNMENTHORIZONTALSEGMENT",3752311538:"IFCALIGNMENTCANTSEGMENT",1010789467:"IFCTEXTURECOORDINATEINDICESWITHVOIDS",222769930:"IFCTEXTURECOORDINATEINDICES",2691318326:"IFCQUANTITYNUMBER",3633395639:"IFCALIGNMENTVERTICALSEGMENT",2879124712:"IFCALIGNMENTPARAMETERSEGMENT",25142252:"IFCCONTROLLER",3087945054:"IFCALARM",4288193352:"IFCACTUATOR",630975310:"IFCUNITARYCONTROLELEMENT",4086658281:"IFCSENSOR",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",182646315:"IFCFLOWINSTRUMENT",1426591983:"IFCFIRESUPPRESSIONTERMINAL",819412036:"IFCFILTER",3415622556:"IFCFAN",1003880860:"IFCELECTRICTIMECONTROL",402227799:"IFCELECTRICMOTOR",264262732:"IFCELECTRICGENERATOR",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",862014818:"IFCELECTRICDISTRIBUTIONBOARD",1904799276:"IFCELECTRICAPPLIANCE",1360408905:"IFCDUCTSILENCER",3518393246:"IFCDUCTSEGMENT",342316401:"IFCDUCTFITTING",562808652:"IFCDISTRIBUTIONCIRCUIT",4074379575:"IFCDAMPER",3640358203:"IFCCOOLINGTOWER",4136498852:"IFCCOOLEDBEAM",2272882330:"IFCCONDENSER",3571504051:"IFCCOMPRESSOR",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",639361253:"IFCCOIL",3902619387:"IFCCHILLER",4217484030:"IFCCABLESEGMENT",1051757585:"IFCCABLEFITTING",3758799889:"IFCCABLECARRIERSEGMENT",635142910:"IFCCABLECARRIERFITTING",2938176219:"IFCBURNER",32344328:"IFCBOILER",2906023776:"IFCBEAMSTANDARDCASE",277319702:"IFCAUDIOVISUALAPPLIANCE",2056796094:"IFCAIRTOAIRHEATRECOVERY",177149247:"IFCAIRTERMINALBOX",1634111441:"IFCAIRTERMINAL",486154966:"IFCWINDOWSTANDARDCASE",4237592921:"IFCWASTETERMINAL",4156078855:"IFCWALLELEMENTEDCASE",4207607924:"IFCVALVE",4292641817:"IFCUNITARYEQUIPMENT",3179687236:"IFCUNITARYCONTROLELEMENTTYPE",3026737570:"IFCTUBEBUNDLE",3825984169:"IFCTRANSFORMER",812556717:"IFCTANK",1162798199:"IFCSWITCHINGDEVICE",385403989:"IFCSTRUCTURALLOADCASE",1404847402:"IFCSTACKTERMINAL",1999602285:"IFCSPACEHEATER",3420628829:"IFCSOLARDEVICE",3027962421:"IFCSLABSTANDARDCASE",3127900445:"IFCSLABELEMENTEDCASE",1329646415:"IFCSHADINGDEVICE",3053780830:"IFCSANITARYTERMINAL",2572171363:"IFCREINFORCINGBARTYPE",1232101972:"IFCRATIONALBSPLINECURVEWITHKNOTS",90941305:"IFCPUMP",655969474:"IFCPROTECTIVEDEVICETRIPPINGUNITTYPE",738039164:"IFCPROTECTIVEDEVICE",1156407060:"IFCPLATESTANDARDCASE",3612865200:"IFCPIPESEGMENT",310824031:"IFCPIPEFITTING",3694346114:"IFCOUTLET",144952367:"IFCOUTERBOUNDARYCURVE",2474470126:"IFCMOTORCONNECTION",1911478936:"IFCMEMBERSTANDARDCASE",1437502449:"IFCMEDICALDEVICE",629592764:"IFCLIGHTFIXTURE",76236018:"IFCLAMP",2176052936:"IFCJUNCTIONBOX",4175244083:"IFCINTERCEPTOR",2068733104:"IFCHUMIDIFIER",3319311131:"IFCHEATEXCHANGER",2188021234:"IFCFLOWMETER",1209101575:"IFCEXTERNALSPATIALELEMENT",484807127:"IFCEVAPORATOR",3747195512:"IFCEVAPORATIVECOOLER",2814081492:"IFCENGINE",2417008758:"IFCELECTRICDISTRIBUTIONBOARDTYPE",3242481149:"IFCDOORSTANDARDCASE",3205830791:"IFCDISTRIBUTIONSYSTEM",400855858:"IFCCOMMUNICATIONSAPPLIANCETYPE",905975707:"IFCCOLUMNSTANDARDCASE",1677625105:"IFCCIVILELEMENT",3296154744:"IFCCHIMNEY",2674252688:"IFCCABLEFITTINGTYPE",2188180465:"IFCBURNERTYPE",1177604601:"IFCBUILDINGSYSTEM",39481116:"IFCBUILDINGELEMENTPARTTYPE",1136057603:"IFCBOUNDARYCURVE",2461110595:"IFCBSPLINECURVEWITHKNOTS",1532957894:"IFCAUDIOVISUALAPPLIANCETYPE",4088093105:"IFCWORKCALENDAR",4009809668:"IFCWINDOWTYPE",926996030:"IFCVOIDINGFEATURE",2391383451:"IFCVIBRATIONISOLATOR",2415094496:"IFCTENDONTYPE",3081323446:"IFCTENDONANCHORTYPE",413509423:"IFCSYSTEMFURNITUREELEMENT",3101698114:"IFCSURFACEFEATURE",3657597509:"IFCSTRUCTURALSURFACEACTION",2757150158:"IFCSTRUCTURALCURVEREACTION",1004757350:"IFCSTRUCTURALCURVEACTION",338393293:"IFCSTAIRTYPE",1072016465:"IFCSOLARDEVICETYPE",4074543187:"IFCSHADINGDEVICETYPE",2157484638:"IFCSEAMCURVE",2781568857:"IFCROOFTYPE",2310774935:"IFCREINFORCINGMESHTYPE",964333572:"IFCREINFORCINGELEMENTTYPE",683857671:"IFCRATIONALBSPLINESURFACEWITHKNOTS",1469900589:"IFCRAMPTYPE",2839578677:"IFCPOLYGONALFACESET",1158309216:"IFCPILETYPE",3079942009:"IFCOPENINGSTANDARDCASE",1114901282:"IFCMEDICALDEVICETYPE",3113134337:"IFCINTERSECTIONCURVE",3946677679:"IFCINTERCEPTORTYPE",2571569899:"IFCINDEXEDPOLYCURVE",3493046030:"IFCGEOGRAPHICELEMENT",1509553395:"IFCFURNITURE",1893162501:"IFCFOOTINGTYPE",2853485674:"IFCEXTERNALSPATIALSTRUCTUREELEMENT",4148101412:"IFCEVENT",132023988:"IFCENGINETYPE",2397081782:"IFCELEMENTASSEMBLYTYPE",2323601079:"IFCDOORTYPE",1213902940:"IFCCYLINDRICALSURFACE",1525564444:"IFCCONSTRUCTIONPRODUCTRESOURCETYPE",4105962743:"IFCCONSTRUCTIONMATERIALRESOURCETYPE",2185764099:"IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE",15328376:"IFCCOMPOSITECURVEONSURFACE",3875453745:"IFCCOMPLEXPROPERTYTEMPLATE",3893394355:"IFCCIVILELEMENTTYPE",2197970202:"IFCCHIMNEYTYPE",167062518:"IFCBSPLINESURFACEWITHKNOTS",2887950389:"IFCBSPLINESURFACE",2603310189:"IFCADVANCEDBREPWITHVOIDS",1635779807:"IFCADVANCEDBREP",2916149573:"IFCTRIANGULATEDFACESET",1935646853:"IFCTOROIDALSURFACE",2387106220:"IFCTESSELLATEDFACESET",3206491090:"IFCTASKTYPE",699246055:"IFCSURFACECURVE",4095615324:"IFCSUBCONTRACTRESOURCETYPE",603775116:"IFCSTRUCTURALSURFACEREACTION",4015995234:"IFCSPHERICALSURFACE",2481509218:"IFCSPATIALZONETYPE",463610769:"IFCSPATIALZONE",710998568:"IFCSPATIALELEMENTTYPE",1412071761:"IFCSPATIALELEMENT",3663146110:"IFCSIMPLEPROPERTYTEMPLATE",3243963512:"IFCREVOLVEDAREASOLIDTAPERED",816062949:"IFCREPARAMETRISEDCOMPOSITECURVESEGMENT",1521410863:"IFCRELSPACEBOUNDARY2NDLEVEL",3523091289:"IFCRELSPACEBOUNDARY1STLEVEL",427948657:"IFCRELINTERFERESELEMENTS",307848117:"IFCRELDEFINESBYTEMPLATE",1462361463:"IFCRELDEFINESBYOBJECT",2565941209:"IFCRELDECLARES",1027710054:"IFCRELASSIGNSTOGROUPBYFACTOR",3521284610:"IFCPROPERTYTEMPLATE",492091185:"IFCPROPERTYSETTEMPLATE",653396225:"IFCPROJECTLIBRARY",569719735:"IFCPROCEDURETYPE",3967405729:"IFCPREDEFINEDPROPERTYSET",1682466193:"IFCPCURVE",428585644:"IFCLABORRESOURCETYPE",2294589976:"IFCINDEXEDPOLYGONALFACEWITHVOIDS",178912537:"IFCINDEXEDPOLYGONALFACE",4095422895:"IFCGEOGRAPHICELEMENTTYPE",2652556860:"IFCFIXEDREFERENCESWEPTAREASOLID",2804161546:"IFCEXTRUDEDAREASOLIDTAPERED",4024345920:"IFCEVENTTYPE",2629017746:"IFCCURVEBOUNDEDSURFACE",1815067380:"IFCCREWRESOURCETYPE",3419103109:"IFCCONTEXT",2574617495:"IFCCONSTRUCTIONRESOURCETYPE",2059837836:"IFCCARTESIANPOINTLIST3D",1675464909:"IFCCARTESIANPOINTLIST2D",574549367:"IFCCARTESIANPOINTLIST",3406155212:"IFCADVANCEDFACE",3698973494:"IFCTYPERESOURCE",3736923433:"IFCTYPEPROCESS",901063453:"IFCTESSELLATEDITEM",1096409881:"IFCSWEPTDISKSOLIDPOLYGONAL",1042787934:"IFCRESOURCETIME",1608871552:"IFCRESOURCECONSTRAINTRELATIONSHIP",2943643501:"IFCRESOURCEAPPROVALRELATIONSHIP",2090586900:"IFCQUANTITYSET",1482703590:"IFCPROPERTYTEMPLATEDEFINITION",3778827333:"IFCPREDEFINEDPROPERTIES",2998442950:"IFCMIRROREDPROFILEDEF",853536259:"IFCMATERIALRELATIONSHIP",3404854881:"IFCMATERIALPROFILESETUSAGETAPERING",3079605661:"IFCMATERIALPROFILESETUSAGE",2852063980:"IFCMATERIALCONSTITUENTSET",3708119e3:"IFCMATERIALCONSTITUENT",1585845231:"IFCLAGTIME",2133299955:"IFCINDEXEDTRIANGLETEXTUREMAP",1437953363:"IFCINDEXEDTEXTUREMAP",3570813810:"IFCINDEXEDCOLOURMAP",1437805879:"IFCEXTERNALREFERENCERELATIONSHIP",297599258:"IFCEXTENDEDPROPERTIES",211053100:"IFCEVENTTIME",2713554722:"IFCCONVERSIONBASEDUNITWITHOFFSET",3285139300:"IFCCOLOURRGBLIST",1236880293:"IFCWORKTIME",1199560280:"IFCTIMEPERIOD",3611470254:"IFCTEXTUREVERTEXLIST",2771591690:"IFCTASKTIMERECURRING",1549132990:"IFCTASKTIME",2043862942:"IFCTABLECOLUMN",2934153892:"IFCSURFACEREINFORCEMENTAREA",609421318:"IFCSTRUCTURALLOADORRESULT",3478079324:"IFCSTRUCTURALLOADCONFIGURATION",1054537805:"IFCSCHEDULINGTIME",2439245199:"IFCRESOURCELEVELRELATIONSHIP",2433181523:"IFCREFERENCE",3915482550:"IFCRECURRENCEPATTERN",986844984:"IFCPROPERTYABSTRACTION",3843373140:"IFCPROJECTEDCRS",677532197:"IFCPRESENTATIONITEM",1507914824:"IFCMATERIALUSAGEDEFINITION",552965576:"IFCMATERIALPROFILEWITHOFFSETS",164193824:"IFCMATERIALPROFILESET",2235152071:"IFCMATERIALPROFILE",1847252529:"IFCMATERIALLAYERWITHOFFSETS",760658860:"IFCMATERIALDEFINITION",3057273783:"IFCMAPCONVERSION",4294318154:"IFCEXTERNALINFORMATION",1466758467:"IFCCOORDINATEREFERENCESYSTEM",1785450214:"IFCCOORDINATEOPERATION",775493141:"IFCCONNECTIONVOLUMEGEOMETRY",979691226:"IFCREINFORCINGBAR",3700593921:"IFCELECTRICDISTRIBUTIONPOINT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",578613899:"IFCCONTROLLERTYPE",2454782716:"IFCCHAMFEREDGEFEATURE",753842376:"IFCBEAM",3001207471:"IFCALARMTYPE",2874132201:"IFCACTUATORTYPE",3304561284:"IFCWINDOW",3512223829:"IFCWALLSTANDARDCASE",2391406946:"IFCWALL",3313531582:"IFCVIBRATIONISOLATORTYPE",2347447852:"IFCTENDONANCHOR",3824725483:"IFCTENDON",2515109513:"IFCSTRUCTURALANALYSISMODEL",4252922144:"IFCSTAIRFLIGHT",331165859:"IFCSTAIR",1529196076:"IFCSLAB",1783015770:"IFCSENSORTYPE",1376911519:"IFCROUNDEDEDGEFEATURE",2016517767:"IFCROOF",2320036040:"IFCREINFORCINGMESH",3027567501:"IFCREINFORCINGELEMENT",3055160366:"IFCRATIONALBEZIERCURVE",3283111854:"IFCRAMPFLIGHT",3024970846:"IFCRAMP",2262370178:"IFCRAILING",3171933400:"IFCPLATE",1687234759:"IFCPILE",1073191201:"IFCMEMBER",900683007:"IFCFOOTING",3508470533:"IFCFLOWTREATMENTDEVICE",2223149337:"IFCFLOWTERMINAL",707683696:"IFCFLOWSTORAGEDEVICE",987401354:"IFCFLOWSEGMENT",3132237377:"IFCFLOWMOVINGDEVICE",4037862832:"IFCFLOWINSTRUMENTTYPE",4278956645:"IFCFLOWFITTING",2058353004:"IFCFLOWCONTROLLER",4222183408:"IFCFIRESUPPRESSIONTERMINALTYPE",1810631287:"IFCFILTERTYPE",346874300:"IFCFANTYPE",1658829314:"IFCENERGYCONVERSIONDEVICE",857184966:"IFCELECTRICALELEMENT",1634875225:"IFCELECTRICALCIRCUIT",712377611:"IFCELECTRICTIMECONTROLTYPE",1217240411:"IFCELECTRICMOTORTYPE",1365060375:"IFCELECTRICHEATERTYPE",1534661035:"IFCELECTRICGENERATORTYPE",3277789161:"IFCELECTRICFLOWSTORAGEDEVICETYPE",663422040:"IFCELECTRICAPPLIANCETYPE",855621170:"IFCEDGEFEATURE",2030761528:"IFCDUCTSILENCERTYPE",3760055223:"IFCDUCTSEGMENTTYPE",869906466:"IFCDUCTFITTINGTYPE",395920057:"IFCDOOR",3041715199:"IFCDISTRIBUTIONPORT",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",1945004755:"IFCDISTRIBUTIONELEMENT",2063403501:"IFCDISTRIBUTIONCONTROLELEMENTTYPE",1599208980:"IFCDISTRIBUTIONCHAMBERELEMENTTYPE",2635815018:"IFCDISCRETEACCESSORYTYPE",1335981549:"IFCDISCRETEACCESSORY",4147604152:"IFCDIAMETERDIMENSION",3961806047:"IFCDAMPERTYPE",3495092785:"IFCCURTAINWALL",1973544240:"IFCCOVERING",2954562838:"IFCCOOLINGTOWERTYPE",335055490:"IFCCOOLEDBEAMTYPE",488727124:"IFCCONSTRUCTIONPRODUCTRESOURCE",1060000209:"IFCCONSTRUCTIONMATERIALRESOURCE",3898045240:"IFCCONSTRUCTIONEQUIPMENTRESOURCE",1163958913:"IFCCONDITIONCRITERION",2188551683:"IFCCONDITION",2816379211:"IFCCONDENSERTYPE",3850581409:"IFCCOMPRESSORTYPE",843113511:"IFCCOLUMN",2301859152:"IFCCOILTYPE",2611217952:"IFCCIRCLE",2951183804:"IFCCHILLERTYPE",1285652485:"IFCCABLESEGMENTTYPE",3293546465:"IFCCABLECARRIERSEGMENTTYPE",395041908:"IFCCABLECARRIERFITTINGTYPE",1909888760:"IFCBUILDINGELEMENTPROXYTYPE",1095909175:"IFCBUILDINGELEMENTPROXY",2979338954:"IFCBUILDINGELEMENTPART",52481810:"IFCBUILDINGELEMENTCOMPONENT",3299480353:"IFCBUILDINGELEMENT",231477066:"IFCBOILERTYPE",1916977116:"IFCBEZIERCURVE",819618141:"IFCBEAMTYPE",1967976161:"IFCBSPLINECURVE",3460190687:"IFCASSET",2470393545:"IFCANGULARDIMENSION",1871374353:"IFCAIRTOAIRHEATRECOVERYTYPE",3352864051:"IFCAIRTERMINALTYPE",1411407467:"IFCAIRTERMINALBOXTYPE",3821786052:"IFCACTIONREQUEST",1213861670:"IFC2DCOMPOSITECURVE",1033361043:"IFCZONE",3342526732:"IFCWORKSCHEDULE",4218914973:"IFCWORKPLAN",1028945134:"IFCWORKCONTROL",1133259667:"IFCWASTETERMINALTYPE",1898987631:"IFCWALLTYPE",2769231204:"IFCVIRTUALELEMENT",728799441:"IFCVALVETYPE",1911125066:"IFCUNITARYEQUIPMENTTYPE",1600972822:"IFCTUBEBUNDLETYPE",3593883385:"IFCTRIMMEDCURVE",1620046519:"IFCTRANSPORTELEMENT",1692211062:"IFCTRANSFORMERTYPE",1637806684:"IFCTIMESERIESSCHEDULE",5716631:"IFCTANKTYPE",2254336722:"IFCSYSTEM",2315554128:"IFCSWITCHINGDEVICETYPE",148013059:"IFCSUBCONTRACTRESOURCE",1975003073:"IFCSTRUCTURALSURFACECONNECTION",2986769608:"IFCSTRUCTURALRESULTGROUP",1235345126:"IFCSTRUCTURALPOINTREACTION",734778138:"IFCSTRUCTURALPOINTCONNECTION",2082059205:"IFCSTRUCTURALPOINTACTION",3987759626:"IFCSTRUCTURALPLANARACTIONVARYING",1621171031:"IFCSTRUCTURALPLANARACTION",1252848954:"IFCSTRUCTURALLOADGROUP",1721250024:"IFCSTRUCTURALLINEARACTIONVARYING",1807405624:"IFCSTRUCTURALLINEARACTION",2445595289:"IFCSTRUCTURALCURVEMEMBERVARYING",214636428:"IFCSTRUCTURALCURVEMEMBER",4243806635:"IFCSTRUCTURALCURVECONNECTION",1179482911:"IFCSTRUCTURALCONNECTION",682877961:"IFCSTRUCTURALACTION",1039846685:"IFCSTAIRFLIGHTTYPE",3112655638:"IFCSTACKTERMINALTYPE",3812236995:"IFCSPACETYPE",652456506:"IFCSPACEPROGRAM",1305183839:"IFCSPACEHEATERTYPE",3856911033:"IFCSPACE",2533589738:"IFCSLABTYPE",4097777520:"IFCSITE",4105383287:"IFCSERVICELIFE",3517283431:"IFCSCHEDULETIMECONTROL",1768891740:"IFCSANITARYTERMINALTYPE",2863920197:"IFCRELASSIGNSTASKS",160246688:"IFCRELAGGREGATES",2324767716:"IFCRAMPFLIGHTTYPE",2893384427:"IFCRAILINGTYPE",3248260540:"IFCRADIUSDIMENSION",2250791053:"IFCPUMPTYPE",1842657554:"IFCPROTECTIVEDEVICETYPE",3651124850:"IFCPROJECTIONELEMENT",3642467123:"IFCPROJECTORDERRECORD",2904328755:"IFCPROJECTORDER",2744685151:"IFCPROCEDURE",3740093272:"IFCPORT",3724593414:"IFCPOLYLINE",4017108033:"IFCPLATETYPE",4231323485:"IFCPIPESEGMENTTYPE",804291784:"IFCPIPEFITTINGTYPE",3327091369:"IFCPERMIT",2382730787:"IFCPERFORMANCEHISTORY",2837617999:"IFCOUTLETTYPE",3425660407:"IFCORDERACTION",3588315303:"IFCOPENINGELEMENT",4143007308:"IFCOCCUPANT",1916936684:"IFCMOVE",977012517:"IFCMOTORCONNECTIONTYPE",3181161470:"IFCMEMBERTYPE",2108223431:"IFCMECHANICALFASTENERTYPE",377706215:"IFCMECHANICALFASTENER",2506943328:"IFCLINEARDIMENSION",1161773419:"IFCLIGHTFIXTURETYPE",1051575348:"IFCLAMPTYPE",3827777499:"IFCLABORRESOURCE",4288270099:"IFCJUNCTIONBOXTYPE",2391368822:"IFCINVENTORY",1806887404:"IFCHUMIDIFIERTYPE",1251058090:"IFCHEATEXCHANGERTYPE",2706460486:"IFCGROUP",3009204131:"IFCGRID",200128114:"IFCGASTERMINALTYPE",814719939:"IFCFURNITURESTANDARD",263784265:"IFCFURNISHINGELEMENT",3009222698:"IFCFLOWTREATMENTDEVICETYPE",2297155007:"IFCFLOWTERMINALTYPE",1339347760:"IFCFLOWSTORAGEDEVICETYPE",1834744321:"IFCFLOWSEGMENTTYPE",1482959167:"IFCFLOWMOVINGDEVICETYPE",3815607619:"IFCFLOWMETERTYPE",3198132628:"IFCFLOWFITTINGTYPE",3907093117:"IFCFLOWCONTROLLERTYPE",1287392070:"IFCFEATUREELEMENTSUBTRACTION",2143335405:"IFCFEATUREELEMENTADDITION",2827207264:"IFCFEATUREELEMENT",2489546625:"IFCFASTENERTYPE",647756555:"IFCFASTENER",3737207727:"IFCFACETEDBREPWITHVOIDS",807026263:"IFCFACETEDBREP",3390157468:"IFCEVAPORATORTYPE",3174744832:"IFCEVAPORATIVECOOLERTYPE",3272907226:"IFCEQUIPMENTSTANDARD",1962604670:"IFCEQUIPMENTELEMENT",2107101300:"IFCENERGYCONVERSIONDEVICETYPE",1704287377:"IFCELLIPSE",2590856083:"IFCELEMENTCOMPONENTTYPE",1623761950:"IFCELEMENTCOMPONENT",4123344466:"IFCELEMENTASSEMBLY",1758889154:"IFCELEMENT",360485395:"IFCELECTRICALBASEPROPERTIES",3849074793:"IFCDISTRIBUTIONFLOWELEMENTTYPE",3256556792:"IFCDISTRIBUTIONELEMENTTYPE",681481545:"IFCDIMENSIONCURVEDIRECTEDCALLOUT",1457835157:"IFCCURTAINWALLTYPE",3295246426:"IFCCREWRESOURCE",1916426348:"IFCCOVERINGTYPE",1419761937:"IFCCOSTSCHEDULE",3895139033:"IFCCOSTITEM",3293443760:"IFCCONTROL",2559216714:"IFCCONSTRUCTIONRESOURCE",2510884976:"IFCCONIC",3732776249:"IFCCOMPOSITECURVE",300633059:"IFCCOLUMNTYPE",2937912522:"IFCCIRCLEHOLLOWPROFILEDEF",3124254112:"IFCBUILDINGSTOREY",1950629157:"IFCBUILDINGELEMENTTYPE",4031249490:"IFCBUILDING",1260505505:"IFCBOUNDEDCURVE",3649129432:"IFCBOOLEANCLIPPINGRESULT",1334484129:"IFCBLOCK",3207858831:"IFCASYMMETRICISHAPEPROFILEDEF",1674181508:"IFCANNOTATION",2296667514:"IFCACTOR",2097647324:"IFCTRANSPORTELEMENTTYPE",3473067441:"IFCTASK",1580310250:"IFCSYSTEMFURNITUREELEMENTTYPE",4124788165:"IFCSURFACEOFREVOLUTION",2809605785:"IFCSURFACEOFLINEAREXTRUSION",2028607225:"IFCSURFACECURVESWEPTAREASOLID",4070609034:"IFCSTRUCTUREDDIMENSIONCALLOUT",2218152070:"IFCSTRUCTURALSURFACEMEMBERVARYING",3979015343:"IFCSTRUCTURALSURFACEMEMBER",3689010777:"IFCSTRUCTURALREACTION",530289379:"IFCSTRUCTURALMEMBER",3136571912:"IFCSTRUCTURALITEM",3544373492:"IFCSTRUCTURALACTIVITY",451544542:"IFCSPHERE",3893378262:"IFCSPATIALSTRUCTUREELEMENTTYPE",2706606064:"IFCSPATIALSTRUCTUREELEMENT",3626867408:"IFCRIGHTCIRCULARCYLINDER",4158566097:"IFCRIGHTCIRCULARCONE",1856042241:"IFCREVOLVEDAREASOLID",2914609552:"IFCRESOURCE",1401173127:"IFCRELVOIDSELEMENT",3451746338:"IFCRELSPACEBOUNDARY",366585022:"IFCRELSERVICESBUILDINGS",4122056220:"IFCRELSEQUENCE",1058617721:"IFCRELSCHEDULESCOSTITEMS",1245217292:"IFCRELREFERENCEDINSPATIALSTRUCTURE",750771296:"IFCRELPROJECTSELEMENT",202636808:"IFCRELOVERRIDESPROPERTIES",2051452291:"IFCRELOCCUPIESSPACES",3268803585:"IFCRELNESTS",4189434867:"IFCRELINTERACTIONREQUIREMENTS",279856033:"IFCRELFLOWCONTROLELEMENTS",3940055652:"IFCRELFILLSELEMENT",781010003:"IFCRELDEFINESBYTYPE",4186316022:"IFCRELDEFINESBYPROPERTIES",693640335:"IFCRELDEFINES",2551354335:"IFCRELDECOMPOSES",2802773753:"IFCRELCOVERSSPACES",886880790:"IFCRELCOVERSBLDGELEMENTS",3242617779:"IFCRELCONTAINEDINSPATIALSTRUCTURE",3678494232:"IFCRELCONNECTSWITHREALIZINGELEMENTS",504942748:"IFCRELCONNECTSWITHECCENTRICITY",1638771189:"IFCRELCONNECTSSTRUCTURALMEMBER",3912681535:"IFCRELCONNECTSSTRUCTURALELEMENT",2127690289:"IFCRELCONNECTSSTRUCTURALACTIVITY",3190031847:"IFCRELCONNECTSPORTS",4201705270:"IFCRELCONNECTSPORTTOELEMENT",3945020480:"IFCRELCONNECTSPATHELEMENTS",1204542856:"IFCRELCONNECTSELEMENTS",826625072:"IFCRELCONNECTS",2851387026:"IFCRELASSOCIATESPROFILEPROPERTIES",2655215786:"IFCRELASSOCIATESMATERIAL",3840914261:"IFCRELASSOCIATESLIBRARY",982818633:"IFCRELASSOCIATESDOCUMENT",2728634034:"IFCRELASSOCIATESCONSTRAINT",919958153:"IFCRELASSOCIATESCLASSIFICATION",4095574036:"IFCRELASSOCIATESAPPROVAL",1327628568:"IFCRELASSOCIATESAPPLIEDVALUE",1865459582:"IFCRELASSOCIATES",205026976:"IFCRELASSIGNSTORESOURCE",3372526763:"IFCRELASSIGNSTOPROJECTORDER",2857406711:"IFCRELASSIGNSTOPRODUCT",4278684876:"IFCRELASSIGNSTOPROCESS",1307041759:"IFCRELASSIGNSTOGROUP",2495723537:"IFCRELASSIGNSTOCONTROL",1683148259:"IFCRELASSIGNSTOACTOR",3939117080:"IFCRELASSIGNS",3454111270:"IFCRECTANGULARTRIMMEDSURFACE",2798486643:"IFCRECTANGULARPYRAMID",2770003689:"IFCRECTANGLEHOLLOWPROFILEDEF",3219374653:"IFCPROXY",1451395588:"IFCPROPERTYSET",4194566429:"IFCPROJECTIONCURVE",103090709:"IFCPROJECT",4208778838:"IFCPRODUCT",2945172077:"IFCPROCESS",220341763:"IFCPLANE",603570806:"IFCPLANARBOX",3566463478:"IFCPERMEABLECOVERINGPROPERTIES",3505215534:"IFCOFFSETCURVE3D",3388369263:"IFCOFFSETCURVE2D",3888040117:"IFCOBJECT",1425443689:"IFCMANIFOLDSOLIDBREP",1281925730:"IFCLINE",572779678:"IFCLSHAPEPROFILEDEF",1484403080:"IFCISHAPEPROFILEDEF",987898635:"IFCGEOMETRICCURVESET",1268542332:"IFCFURNITURETYPE",4238390223:"IFCFURNISHINGELEMENTTYPE",3455213021:"IFCFLUIDFLOWPROPERTIES",315944413:"IFCFILLAREASTYLETILES",4203026998:"IFCFILLAREASTYLETILESYMBOLWITHSTYLE",374418227:"IFCFILLAREASTYLEHATCHING",2047409740:"IFCFACEBASEDSURFACEMODEL",477187591:"IFCEXTRUDEDAREASOLID",80994333:"IFCENERGYPROPERTIES",2835456948:"IFCELLIPSEPROFILEDEF",2777663545:"IFCELEMENTARYSURFACE",339256511:"IFCELEMENTTYPE",1883228015:"IFCELEMENTQUANTITY",1472233963:"IFCEDGELOOP",4006246654:"IFCDRAUGHTINGPREDEFINEDCURVEFONT",445594917:"IFCDRAUGHTINGPREDEFINEDCOLOUR",3073041342:"IFCDRAUGHTINGCALLOUT",526551008:"IFCDOORSTYLE",1714330368:"IFCDOORPANELPROPERTIES",2963535650:"IFCDOORLININGPROPERTIES",32440307:"IFCDIRECTION",4054601972:"IFCDIMENSIONCURVETERMINATOR",606661476:"IFCDIMENSIONCURVE",693772133:"IFCDEFINEDSYMBOL",2827736869:"IFCCURVEBOUNDEDPLANE",2601014836:"IFCCURVE",2147822146:"IFCCSGSOLID",2506170314:"IFCCSGPRIMITIVE3D",194851669:"IFCCRANERAILFSHAPEPROFILEDEF",4133800736:"IFCCRANERAILASHAPEPROFILEDEF",2485617015:"IFCCOMPOSITECURVESEGMENT",2205249479:"IFCCLOSEDSHELL",1383045692:"IFCCIRCLEPROFILEDEF",1416205885:"IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM",3331915920:"IFCCARTESIANTRANSFORMATIONOPERATOR3D",3486308946:"IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM",3749851601:"IFCCARTESIANTRANSFORMATIONOPERATOR2D",59481748:"IFCCARTESIANTRANSFORMATIONOPERATOR",1123145078:"IFCCARTESIANPOINT",2898889636:"IFCCSHAPEPROFILEDEF",2713105998:"IFCBOXEDHALFSPACE",2581212453:"IFCBOUNDINGBOX",4182860854:"IFCBOUNDEDSURFACE",2736907675:"IFCBOOLEANRESULT",2740243338:"IFCAXIS2PLACEMENT3D",3125803723:"IFCAXIS2PLACEMENT2D",4261334040:"IFCAXIS1PLACEMENT",1302238472:"IFCANNOTATIONSURFACE",2265737646:"IFCANNOTATIONFILLAREAOCCURRENCE",669184980:"IFCANNOTATIONFILLAREA",3288037868:"IFCANNOTATIONCURVEOCCURRENCE",2543172580:"IFCZSHAPEPROFILEDEF",1299126871:"IFCWINDOWSTYLE",512836454:"IFCWINDOWPANELPROPERTIES",336235671:"IFCWINDOWLININGPROPERTIES",2759199220:"IFCVERTEXLOOP",1417489154:"IFCVECTOR",427810014:"IFCUSHAPEPROFILEDEF",2347495698:"IFCTYPEPRODUCT",1628702193:"IFCTYPEOBJECT",1345879162:"IFCTWODIRECTIONREPEATFACTOR",2715220739:"IFCTRAPEZIUMPROFILEDEF",3124975700:"IFCTEXTLITERALWITHEXTENT",4282788508:"IFCTEXTLITERAL",3028897424:"IFCTERMINATORSYMBOL",3071757647:"IFCTSHAPEPROFILEDEF",230924584:"IFCSWEPTSURFACE",1260650574:"IFCSWEPTDISKSOLID",2247615214:"IFCSWEPTAREASOLID",1878645084:"IFCSURFACESTYLERENDERING",2513912981:"IFCSURFACE",2233826070:"IFCSUBEDGE",3653947884:"IFCSTRUCTURALSTEELPROFILEPROPERTIES",3843319758:"IFCSTRUCTURALPROFILEPROPERTIES",1190533807:"IFCSTRUCTURALLOADSINGLEFORCEWARPING",1597423693:"IFCSTRUCTURALLOADSINGLEFORCE",1973038258:"IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION",2473145415:"IFCSTRUCTURALLOADSINGLEDISPLACEMENT",2668620305:"IFCSTRUCTURALLOADPLANARFORCE",1595516126:"IFCSTRUCTURALLOADLINEARFORCE",390701378:"IFCSPACETHERMALLOADPROPERTIES",1202362311:"IFCSOUNDVALUE",2485662743:"IFCSOUNDPROPERTIES",723233188:"IFCSOLIDMODEL",2609359061:"IFCSLIPPAGECONNECTIONCONDITION",4124623270:"IFCSHELLBASEDSURFACEMODEL",2411513650:"IFCSERVICELIFEFACTOR",1509187699:"IFCSECTIONEDSPINE",2778083089:"IFCROUNDEDRECTANGLEPROFILEDEF",478536968:"IFCRELATIONSHIP",3765753017:"IFCREINFORCEMENTDEFINITIONPROPERTIES",3413951693:"IFCREGULARTIMESERIES",3615266464:"IFCRECTANGLEPROFILEDEF",110355661:"IFCPROPERTYTABLEVALUE",3650150729:"IFCPROPERTYSINGLEVALUE",3357820518:"IFCPROPERTYSETDEFINITION",941946838:"IFCPROPERTYREFERENCEVALUE",2752243245:"IFCPROPERTYLISTVALUE",4166981789:"IFCPROPERTYENUMERATEDVALUE",1680319473:"IFCPROPERTYDEFINITION",871118103:"IFCPROPERTYBOUNDEDVALUE",673634403:"IFCPRODUCTDEFINITIONSHAPE",179317114:"IFCPREDEFINEDPOINTMARKERSYMBOL",433424934:"IFCPREDEFINEDDIMENSIONSYMBOL",2559016684:"IFCPREDEFINEDCURVEFONT",759155922:"IFCPREDEFINEDCOLOUR",2775532180:"IFCPOLYGONALBOUNDEDHALFSPACE",2924175390:"IFCPOLYLOOP",1423911732:"IFCPOINTONSURFACE",4022376103:"IFCPOINTONCURVE",2067069095:"IFCPOINT",1663979128:"IFCPLANAREXTENT",2004835150:"IFCPLACEMENT",597895409:"IFCPIXELTEXTURE",3021840470:"IFCPHYSICALCOMPLEXQUANTITY",2519244187:"IFCPATH",2529465313:"IFCPARAMETERIZEDPROFILEDEF",1029017970:"IFCORIENTEDEDGE",2665983363:"IFCOPENSHELL",2833995503:"IFCONEDIRECTIONREPEATFACTOR",219451334:"IFCOBJECTDEFINITION",1430189142:"IFCMECHANICALCONCRETEMATERIALPROPERTIES",2022407955:"IFCMATERIALDEFINITIONREPRESENTATION",2347385850:"IFCMAPPEDITEM",1008929658:"IFCLOOP",2624227202:"IFCLOCALPLACEMENT",3422422726:"IFCLIGHTSOURCESPOT",1520743889:"IFCLIGHTSOURCEPOSITIONAL",4266656042:"IFCLIGHTSOURCEGONIOMETRIC",2604431987:"IFCLIGHTSOURCEDIRECTIONAL",125510826:"IFCLIGHTSOURCEAMBIENT",1402838566:"IFCLIGHTSOURCE",3741457305:"IFCIRREGULARTIMESERIES",3905492369:"IFCIMAGETEXTURE",2445078500:"IFCHYGROSCOPICMATERIALPROPERTIES",812098782:"IFCHALFSPACESOLID",178086475:"IFCGRIDPLACEMENT",3590301190:"IFCGEOMETRICSET",4142052618:"IFCGEOMETRICREPRESENTATIONSUBCONTEXT",2453401579:"IFCGEOMETRICREPRESENTATIONITEM",3448662350:"IFCGEOMETRICREPRESENTATIONCONTEXT",1446786286:"IFCGENERALPROFILEPROPERTIES",803998398:"IFCGENERALMATERIALPROPERTIES",3857492461:"IFCFUELPROPERTIES",738692330:"IFCFILLAREASTYLE",4219587988:"IFCFAILURECONNECTIONCONDITION",3008276851:"IFCFACESURFACE",803316827:"IFCFACEOUTERBOUND",1809719519:"IFCFACEBOUND",2556980723:"IFCFACE",1860660968:"IFCEXTENDEDMATERIALPROPERTIES",476780140:"IFCEDGECURVE",3900360178:"IFCEDGE",4170525392:"IFCDRAUGHTINGPREDEFINEDTEXTFONT",3732053477:"IFCDOCUMENTREFERENCE",1694125774:"IFCDIMENSIONPAIR",2273265877:"IFCDIMENSIONCALLOUTRELATIONSHIP",3632507154:"IFCDERIVEDPROFILEDEF",3800577675:"IFCCURVESTYLE",2889183280:"IFCCONVERSIONBASEDUNIT",3050246964:"IFCCONTEXTDEPENDENTUNIT",45288368:"IFCCONNECTIONPOINTECCENTRICITY",1981873012:"IFCCONNECTIONCURVEGEOMETRY",370225590:"IFCCONNECTEDFACESET",1485152156:"IFCCOMPOSITEPROFILEDEF",2542286263:"IFCCOMPLEXPROPERTY",776857604:"IFCCOLOURRGB",647927063:"IFCCLASSIFICATIONREFERENCE",3150382593:"IFCCENTERLINEPROFILEDEF",616511568:"IFCBLOBTEXTURE",2705031697:"IFCARBITRARYPROFILEDEFWITHVOIDS",1310608509:"IFCARBITRARYOPENPROFILEDEF",3798115385:"IFCARBITRARYCLOSEDPROFILEDEF",2297822566:"IFCANNOTATIONTEXTOCCURRENCE",3612888222:"IFCANNOTATIONSYMBOLOCCURRENCE",962685235:"IFCANNOTATIONSURFACEOCCURRENCE",2442683028:"IFCANNOTATIONOCCURRENCE",1065908215:"IFCWATERPROPERTIES",891718957:"IFCVIRTUALGRIDINTERSECTION",1907098498:"IFCVERTEXPOINT",3304826586:"IFCVERTEXBASEDTEXTUREMAP",2799835756:"IFCVERTEX",180925521:"IFCUNITASSIGNMENT",1735638870:"IFCTOPOLOGYREPRESENTATION",1377556343:"IFCTOPOLOGICALREPRESENTATIONITEM",581633288:"IFCTIMESERIESVALUE",1718945513:"IFCTIMESERIESREFERENCERELATIONSHIP",3101149627:"IFCTIMESERIES",3317419933:"IFCTHERMALMATERIALPROPERTIES",1210645708:"IFCTEXTUREVERTEX",2552916305:"IFCTEXTUREMAP",1742049831:"IFCTEXTURECOORDINATEGENERATOR",280115917:"IFCTEXTURECOORDINATE",1484833681:"IFCTEXTSTYLEWITHBOXCHARACTERISTICS",1640371178:"IFCTEXTSTYLETEXTMODEL",2636378356:"IFCTEXTSTYLEFORDEFINEDFONT",1983826977:"IFCTEXTSTYLEFONTMODEL",1447204868:"IFCTEXTSTYLE",912023232:"IFCTELECOMADDRESS",531007025:"IFCTABLEROW",985171141:"IFCTABLE",1290481447:"IFCSYMBOLSTYLE",626085974:"IFCSURFACETEXTURE",1351298697:"IFCSURFACESTYLEWITHTEXTURES",846575682:"IFCSURFACESTYLESHADING",1607154358:"IFCSURFACESTYLEREFRACTION",3303107099:"IFCSURFACESTYLELIGHTING",1300840506:"IFCSURFACESTYLE",3049322572:"IFCSTYLEDREPRESENTATION",3958052878:"IFCSTYLEDITEM",2830218821:"IFCSTYLEMODEL",3408363356:"IFCSTRUCTURALLOADTEMPERATURE",2525727697:"IFCSTRUCTURALLOADSTATIC",2162789131:"IFCSTRUCTURALLOAD",2273995522:"IFCSTRUCTURALCONNECTIONCONDITION",3692461612:"IFCSIMPLEPROPERTY",4240577450:"IFCSHAPEREPRESENTATION",3982875396:"IFCSHAPEMODEL",867548509:"IFCSHAPEASPECT",4165799628:"IFCSECTIONREINFORCEMENTPROPERTIES",2042790032:"IFCSECTIONPROPERTIES",448429030:"IFCSIUNIT",2341007311:"IFCROOT",3679540991:"IFCRIBPLATEPROFILEPROPERTIES",1660063152:"IFCREPRESENTATIONMAP",3008791417:"IFCREPRESENTATIONITEM",3377609919:"IFCREPRESENTATIONCONTEXT",1076942058:"IFCREPRESENTATION",1222501353:"IFCRELAXATION",1580146022:"IFCREINFORCEMENTBARPROPERTIES",2692823254:"IFCREFERENCESVALUEDOCUMENT",825690147:"IFCQUANTITYWEIGHT",2405470396:"IFCQUANTITYVOLUME",3252649465:"IFCQUANTITYTIME",931644368:"IFCQUANTITYLENGTH",2093928680:"IFCQUANTITYCOUNT",2044713172:"IFCQUANTITYAREA",3710013099:"IFCPROPERTYENUMERATION",148025276:"IFCPROPERTYDEPENDENCYRELATIONSHIP",3896028662:"IFCPROPERTYCONSTRAINTRELATIONSHIP",2598011224:"IFCPROPERTY",2802850158:"IFCPROFILEPROPERTIES",3958567839:"IFCPROFILEDEF",2267347899:"IFCPRODUCTSOFCOMBUSTIONPROPERTIES",2095639259:"IFCPRODUCTREPRESENTATION",2417041796:"IFCPRESENTATIONSTYLEASSIGNMENT",3119450353:"IFCPRESENTATIONSTYLE",1304840413:"IFCPRESENTATIONLAYERWITHSTYLE",2022622350:"IFCPRESENTATIONLAYERASSIGNMENT",1775413392:"IFCPREDEFINEDTEXTFONT",3213052703:"IFCPREDEFINEDTERMINATORSYMBOL",990879717:"IFCPREDEFINEDSYMBOL",3727388367:"IFCPREDEFINEDITEM",3355820592:"IFCPOSTALADDRESS",2226359599:"IFCPHYSICALSIMPLEQUANTITY",2483315170:"IFCPHYSICALQUANTITY",101040310:"IFCPERSONANDORGANIZATION",2077209135:"IFCPERSON",1207048766:"IFCOWNERHISTORY",1411181986:"IFCORGANIZATIONRELATIONSHIP",4251960020:"IFCORGANIZATION",1227763645:"IFCOPTICALMATERIALPROPERTIES",2251480897:"IFCOBJECTIVE",3701648758:"IFCOBJECTPLACEMENT",1918398963:"IFCNAMEDUNIT",2706619895:"IFCMONETARYUNIT",3368373690:"IFCMETRIC",677618848:"IFCMECHANICALSTEELMATERIALPROPERTIES",4256014907:"IFCMECHANICALMATERIALPROPERTIES",2597039031:"IFCMEASUREWITHUNIT",3265635763:"IFCMATERIALPROPERTIES",2199411900:"IFCMATERIALLIST",1303795690:"IFCMATERIALLAYERSETUSAGE",3303938423:"IFCMATERIALLAYERSET",248100487:"IFCMATERIALLAYER",1847130766:"IFCMATERIALCLASSIFICATIONRELATIONSHIP",1838606355:"IFCMATERIAL",30780891:"IFCLOCALTIME",1566485204:"IFCLIGHTINTENSITYDISTRIBUTION",4162380809:"IFCLIGHTDISTRIBUTIONDATA",3452421091:"IFCLIBRARYREFERENCE",2655187982:"IFCLIBRARYINFORMATION",3020489413:"IFCIRREGULARTIMESERIESVALUE",852622518:"IFCGRIDAXIS",3548104201:"IFCEXTERNALLYDEFINEDTEXTFONT",3207319532:"IFCEXTERNALLYDEFINEDSYMBOL",1040185647:"IFCEXTERNALLYDEFINEDSURFACESTYLE",2242383968:"IFCEXTERNALLYDEFINEDHATCHSTYLE",3200245327:"IFCEXTERNALREFERENCE",1648886627:"IFCENVIRONMENTALIMPACTVALUE",3796139169:"IFCDRAUGHTINGCALLOUTRELATIONSHIP",770865208:"IFCDOCUMENTINFORMATIONRELATIONSHIP",1154170062:"IFCDOCUMENTINFORMATION",1376555844:"IFCDOCUMENTELECTRONICFORMAT",2949456006:"IFCDIMENSIONALEXPONENTS",1045800335:"IFCDERIVEDUNITELEMENT",1765591967:"IFCDERIVEDUNIT",1072939445:"IFCDATEANDTIME",3510044353:"IFCCURVESTYLEFONTPATTERN",2367409068:"IFCCURVESTYLEFONTANDSCALING",1105321065:"IFCCURVESTYLEFONT",539742890:"IFCCURRENCYRELATIONSHIP",602808272:"IFCCOSTVALUE",1065062679:"IFCCOORDINATEDUNIVERSALTIMEOFFSET",347226245:"IFCCONSTRAINTRELATIONSHIP",613356794:"IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP",1658513725:"IFCCONSTRAINTAGGREGATIONRELATIONSHIP",1959218052:"IFCCONSTRAINT",2732653382:"IFCCONNECTIONSURFACEGEOMETRY",4257277454:"IFCCONNECTIONPORTGEOMETRY",2614616156:"IFCCONNECTIONPOINTGEOMETRY",2859738748:"IFCCONNECTIONGEOMETRY",3264961684:"IFCCOLOURSPECIFICATION",3639012971:"IFCCLASSIFICATIONNOTATIONFACET",938368621:"IFCCLASSIFICATIONNOTATION",1098599126:"IFCCLASSIFICATIONITEMRELATIONSHIP",1767535486:"IFCCLASSIFICATIONITEM",747523909:"IFCCLASSIFICATION",622194075:"IFCCALENDARDATE",2069777674:"IFCBOUNDARYNODECONDITIONWARPING",1387855156:"IFCBOUNDARYNODECONDITION",3367102660:"IFCBOUNDARYFACECONDITION",1560379544:"IFCBOUNDARYEDGECONDITION",4037036970:"IFCBOUNDARYCONDITION",3869604511:"IFCAPPROVALRELATIONSHIP",390851274:"IFCAPPROVALPROPERTYRELATIONSHIP",2080292479:"IFCAPPROVALACTORRELATIONSHIP",130549933:"IFCAPPROVAL",1110488051:"IFCAPPLIEDVALUERELATIONSHIP",411424972:"IFCAPPLIEDVALUE",639542469:"IFCAPPLICATION",618182010:"IFCADDRESS",3630933823:"IFCACTORROLE",599546466:"FILE_DESCRIPTION",1390159747:"FILE_NAME",1109904537:"FILE_SCHEMA"};class fi{static async getUnits(e){var t,i,s;const{IFCUNITASSIGNMENT:n}=yt,r=await e.getAllPropertiesOfType(n);if(!r)return 1;const o=Object.keys(r),a=r[parseInt(o[0],10)];for(const l of a.Units){if(l.value===void 0||l.value===null)continue;const h=await e.getProperties(l.value);if(!h||!h.UnitType||!h.UnitType.value||h.UnitType.value!=="LENGTHUNIT")continue;let d=1,u=1;return h.Name.value==="METRE"&&(u=1),h.Name.value==="FOOT"&&(u=.3048),((t=h.Prefix)==null?void 0:t.value)==="MILLI"?d=.001:((i=h.Prefix)==null?void 0:i.value)==="CENTI"?d=.01:((s=h.Prefix)==null?void 0:s.value)==="DECI"&&(d=.1),u*d}return 1}static async findItemByGuid(e,t){var i;const s=e.getAllPropertiesIDs();for(const n of s){const r=await e.getProperties(n);if(r&&((i=r.GlobalId)==null?void 0:i.value)===t)return r}return null}static async getRelationMap(e,t,i){var s;const n=i??(async()=>{}),r={},o=e.getAllPropertiesIDs();for(const a of o){const l=await e.getProperties(a);if(!l)continue;const h=l.type===t,d=Object.keys(l).find(E=>E.startsWith("Relating")),u=Object.keys(l).find(E=>E.startsWith("Related"));if(!(h&&d&&u))continue;const f=await e.getProperties((s=l[d])==null?void 0:s.value),m=l[u];if(!f||!m||!(m&&Array.isArray(m)))continue;const p=m.map(E=>E.value);await n(f.expressID,p),r[f.expressID]=p}return r}static async getQsetQuantities(e,t,i){const s=i??(()=>{}),n=await e.getProperties(t);return!n||n.type!==pn?null:(n.Quantities??[{}]).map(r=>(r.value&&s(r.value),r.value)).filter(r=>r!==null)}static async getPsetProps(e,t,i){const s=i??(()=>{}),n=await e.getProperties(t);return!n||n.type!==Vi?null:(n.HasProperties??[{}]).map(r=>(r.value&&s(r.value),r.value)).filter(r=>r!==null)}static async getPsetRel(e,t){var i;if(!await e.getProperties(t))return null;const s=await e.getAllPropertiesOfType(Os);if(!s)return null;const n=Object.values(s);let r=null;for(const o of n)((i=o.RelatingPropertyDefinition)==null?void 0:i.value)===t&&(r=o.expressID);return r}static async getQsetRel(e,t){return fi.getPsetRel(e,t)}static async getEntityName(e,t){var i;const s=await e.getProperties(t);if(!s)return{key:null,name:null};const n=Object.keys(s).find(o=>o.endsWith("Name"))??null,r=n?(i=s[n])==null?void 0:i.value:null;return{key:n,name:r}}static async getQuantityValue(e,t){const i=await e.getProperties(t);if(!i)return{key:null,value:null};const s=Object.keys(i).find(r=>r.endsWith("Value"))??null;let n;return s===null||i[s]===void 0||i[s]===null?n=null:n=i[s].value,{key:s,value:n}}static isRel(e){return An[e].startsWith("IFCREL")}static async attributeExists(e,t,i){const s=await e.getProperties(t);return s?Object.keys(s).includes(i):!1}static async groupEntitiesByType(e,t){var i;const s=new Map;for(const n of t){const r=await e.getProperties(n);if(!r)continue;const o=r.type;s.get(o)||s.set(o,new Set),(i=s.get(o))==null||i.add(n)}return s}}const yu={IFCURIREFERENCE:"IfcUriReference",IFCTIME:"IfcTime",IFCTEMPERATURERATEOFCHANGEMEASURE:"IfcTemperatureRateOfChangeMeasure",IFCSOUNDPRESSURELEVELMEASURE:"IfcSoundPressureLevelMeasure",IFCSOUNDPOWERLEVELMEASURE:"IfcSoundPowerLevelMeasure",IFCPROPERTYSETDEFINITIONSET:"IfcPropertySetDefinitionSet",IFCPOSITIVEINTEGER:"IfcPositiveInteger",IFCNONNEGATIVELENGTHMEASURE:"IfcNonNegativeLengthMeasure",IFCLINEINDEX:"IfcLineIndex",IFCLANGUAGEID:"IfcLanguageId",IFCDURATION:"IfcDuration",IFCDAYINWEEKNUMBER:"IfcDayInWeekNumber",IFCDATETIME:"IfcDateTime",IFCDATE:"IfcDate",IFCCARDINALPOINTREFERENCE:"IfcCardinalPointReference",IFCBINARY:"IfcBinary",IFCAREADENSITYMEASURE:"IfcAreaDensityMeasure",IFCARCINDEX:"IfcArcIndex",IFCYEARNUMBER:"IfcYearNumber",IFCWARPINGMOMENTMEASURE:"IfcWarpingMomentMeasure",IFCWARPINGCONSTANTMEASURE:"IfcWarpingConstantMeasure",IFCVOLUMETRICFLOWRATEMEASURE:"IfcVolumetricFlowRateMeasure",IFCVOLUMEMEASURE:"IfcVolumeMeasure",IFCVAPORPERMEABILITYMEASURE:"IfcVaporPermeabilityMeasure",IFCTORQUEMEASURE:"IfcTorqueMeasure",IFCTIMESTAMP:"IfcTimestamp",IFCTIMEMEASURE:"IfcTimeMeasure",IFCTHERMODYNAMICTEMPERATUREMEASURE:"IfcThermodynamicTemperatureMeasure",IFCTHERMALTRANSMITTANCEMEASURE:"IfcThermalTransmittanceMeasure",IFCTHERMALRESISTANCEMEASURE:"IfcThermalResistanceMeasure",IFCTHERMALEXPANSIONCOEFFICIENTMEASURE:"IfcThermalExpansionCoefficientMeasure",IFCTHERMALCONDUCTIVITYMEASURE:"IfcThermalConductivityMeasure",IFCTHERMALADMITTANCEMEASURE:"IfcThermalAdmittanceMeasure",IFCTEXTTRANSFORMATION:"IfcTextTransformation",IFCTEXTFONTNAME:"IfcTextFontName",IFCTEXTDECORATION:"IfcTextDecoration",IFCTEXTALIGNMENT:"IfcTextAlignment",IFCTEXT:"IfcText",IFCTEMPERATUREGRADIENTMEASURE:"IfcTemperatureGradientMeasure",IFCSPECULARROUGHNESS:"IfcSpecularRoughness",IFCSPECULAREXPONENT:"IfcSpecularExponent",IFCSPECIFICHEATCAPACITYMEASURE:"IfcSpecificHeatCapacityMeasure",IFCSOUNDPRESSUREMEASURE:"IfcSoundPressureMeasure",IFCSOUNDPOWERMEASURE:"IfcSoundPowerMeasure",IFCSOLIDANGLEMEASURE:"IfcSolidAngleMeasure",IFCSHEARMODULUSMEASURE:"IfcShearModulusMeasure",IFCSECTIONALAREAINTEGRALMEASURE:"IfcSectionalAreaIntegralMeasure",IFCSECTIONMODULUSMEASURE:"IfcSectionModulusMeasure",IFCSECONDINMINUTE:"IfcSecondInMinute",IFCROTATIONALSTIFFNESSMEASURE:"IfcRotationalStiffnessMeasure",IFCROTATIONALMASSMEASURE:"IfcRotationalMassMeasure",IFCROTATIONALFREQUENCYMEASURE:"IfcRotationalFrequencyMeasure",IFCREAL:"IfcReal",IFCRATIOMEASURE:"IfcRatioMeasure",IFCRADIOACTIVITYMEASURE:"IfcRadioactivityMeasure",IFCPRESSUREMEASURE:"IfcPressureMeasure",IFCPRESENTABLETEXT:"IfcPresentableText",IFCPOWERMEASURE:"IfcPowerMeasure",IFCPOSITIVERATIOMEASURE:"IfcPositiveRatioMeasure",IFCPOSITIVEPLANEANGLEMEASURE:"IfcPositivePlaneAngleMeasure",IFCPOSITIVELENGTHMEASURE:"IfcPositiveLengthMeasure",IFCPLANEANGLEMEASURE:"IfcPlaneAngleMeasure",IFCPLANARFORCEMEASURE:"IfcPlanarForceMeasure",IFCPARAMETERVALUE:"IfcParameterValue",IFCPHMEASURE:"IfcPhMeasure",IFCNUMERICMEASURE:"IfcNumericMeasure",IFCNORMALISEDRATIOMEASURE:"IfcNormalisedRatioMeasure",IFCMONTHINYEARNUMBER:"IfcMonthInYearNumber",IFCMONETARYMEASURE:"IfcMonetaryMeasure",IFCMOMENTOFINERTIAMEASURE:"IfcMomentOfInertiaMeasure",IFCMOLECULARWEIGHTMEASURE:"IfcMolecularWeightMeasure",IFCMOISTUREDIFFUSIVITYMEASURE:"IfcMoistureDiffusivityMeasure",IFCMODULUSOFSUBGRADEREACTIONMEASURE:"IfcModulusOfSubgradeReactionMeasure",IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE:"IfcModulusOfRotationalSubgradeReactionMeasure",IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE:"IfcModulusOfLinearSubgradeReactionMeasure",IFCMODULUSOFELASTICITYMEASURE:"IfcModulusOfElasticityMeasure",IFCMINUTEINHOUR:"IfcMinuteInHour",IFCMASSPERLENGTHMEASURE:"IfcMassPerLengthMeasure",IFCMASSMEASURE:"IfcMassMeasure",IFCMASSFLOWRATEMEASURE:"IfcMassFlowRateMeasure",IFCMASSDENSITYMEASURE:"IfcMassDensityMeasure",IFCMAGNETICFLUXMEASURE:"IfcMagneticFluxMeasure",IFCMAGNETICFLUXDENSITYMEASURE:"IfcMagneticFluxDensityMeasure",IFCLUMINOUSINTENSITYMEASURE:"IfcLuminousIntensityMeasure",IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE:"IfcLuminousIntensityDistributionMeasure",IFCLUMINOUSFLUXMEASURE:"IfcLuminousFluxMeasure",IFCLOGICAL:"IfcLogical",IFCLINEARVELOCITYMEASURE:"IfcLinearVelocityMeasure",IFCLINEARSTIFFNESSMEASURE:"IfcLinearStiffnessMeasure",IFCLINEARMOMENTMEASURE:"IfcLinearMomentMeasure",IFCLINEARFORCEMEASURE:"IfcLinearForceMeasure",IFCLENGTHMEASURE:"IfcLengthMeasure",IFCLABEL:"IfcLabel",IFCKINEMATICVISCOSITYMEASURE:"IfcKinematicViscosityMeasure",IFCISOTHERMALMOISTURECAPACITYMEASURE:"IfcIsothermalMoistureCapacityMeasure",IFCIONCONCENTRATIONMEASURE:"IfcIonConcentrationMeasure",IFCINTEGERCOUNTRATEMEASURE:"IfcIntegerCountRateMeasure",IFCINTEGER:"IfcInteger",IFCINDUCTANCEMEASURE:"IfcInductanceMeasure",IFCILLUMINANCEMEASURE:"IfcIlluminanceMeasure",IFCIDENTIFIER:"IfcIdentifier",IFCHOURINDAY:"IfcHourInDay",IFCHEATINGVALUEMEASURE:"IfcHeatingValueMeasure",IFCHEATFLUXDENSITYMEASURE:"IfcHeatFluxDensityMeasure",IFCGLOBALLYUNIQUEID:"IfcGloballyUniqueId",IFCFREQUENCYMEASURE:"IfcFrequencyMeasure",IFCFORCEMEASURE:"IfcForceMeasure",IFCFONTWEIGHT:"IfcFontWeight",IFCFONTVARIANT:"IfcFontVariant",IFCFONTSTYLE:"IfcFontStyle",IFCENERGYMEASURE:"IfcEnergyMeasure",IFCELECTRICVOLTAGEMEASURE:"IfcElectricVoltageMeasure",IFCELECTRICRESISTANCEMEASURE:"IfcElectricResistanceMeasure",IFCELECTRICCURRENTMEASURE:"IfcElectricCurrentMeasure",IFCELECTRICCONDUCTANCEMEASURE:"IfcElectricConductanceMeasure",IFCELECTRICCHARGEMEASURE:"IfcElectricChargeMeasure",IFCELECTRICCAPACITANCEMEASURE:"IfcElectricCapacitanceMeasure",IFCDYNAMICVISCOSITYMEASURE:"IfcDynamicViscosityMeasure",IFCDOSEEQUIVALENTMEASURE:"IfcDoseEquivalentMeasure",IFCDIMENSIONCOUNT:"IfcDimensionCount",IFCDESCRIPTIVEMEASURE:"IfcDescriptiveMeasure",IFCDAYLIGHTSAVINGHOUR:"IfcDaylightSavingHour",IFCDAYINMONTHNUMBER:"IfcDayInMonthNumber",IFCCURVATUREMEASURE:"IfcCurvatureMeasure",IFCCOUNTMEASURE:"IfcCountMeasure",IFCCONTEXTDEPENDENTMEASURE:"IfcContextDependentMeasure",IFCCOMPOUNDPLANEANGLEMEASURE:"IfcCompoundPlaneAngleMeasure",IFCCOMPLEXNUMBER:"IfcComplexNumber",IFCBOXALIGNMENT:"IfcBoxAlignment",IFCBOOLEAN:"IfcBoolean",IFCAREAMEASURE:"IfcAreaMeasure",IFCANGULARVELOCITYMEASURE:"IfcAngularVelocityMeasure",IFCAMOUNTOFSUBSTANCEMEASURE:"IfcAmountOfSubstanceMeasure",IFCACCELERATIONMEASURE:"IfcAccelerationMeasure",IFCABSORBEDDOSEMEASURE:"IfcAbsorbedDoseMeasure",IFCGEOSLICE:"IfcGeoSlice",IFCGEOMODEL:"IfcGeoModel",IFCELECTRICFLOWTREATMENTDEVICE:"IfcElectricFlowTreatmentDevice",IFCDISTRIBUTIONBOARD:"IfcDistributionBoard",IFCCONVEYORSEGMENT:"IfcConveyorSegment",IFCCAISSONFOUNDATION:"IfcCaissonFoundation",IFCBOREHOLE:"IfcBorehole",IFCBEARING:"IfcBearing",IFCALIGNMENT:"IfcAlignment",IFCTRACKELEMENT:"IfcTrackElement",IFCSIGNAL:"IfcSignal",IFCREINFORCEDSOIL:"IfcReinforcedSoil",IFCRAIL:"IfcRail",IFCPAVEMENT:"IfcPavement",IFCNAVIGATIONELEMENT:"IfcNavigationElement",IFCMOORINGDEVICE:"IfcMooringDevice",IFCMOBILETELECOMMUNICATIONSAPPLIANCE:"IfcMobileTelecommunicationsAppliance",IFCLIQUIDTERMINAL:"IfcLiquidTerminal",IFCLINEARPOSITIONINGELEMENT:"IfcLinearPositioningElement",IFCKERB:"IfcKerb",IFCGEOTECHNICALASSEMBLY:"IfcGeotechnicalAssembly",IFCELECTRICFLOWTREATMENTDEVICETYPE:"IfcElectricFlowTreatmentDeviceType",IFCEARTHWORKSFILL:"IfcEarthworksFill",IFCEARTHWORKSELEMENT:"IfcEarthworksElement",IFCEARTHWORKSCUT:"IfcEarthworksCut",IFCDISTRIBUTIONBOARDTYPE:"IfcDistributionBoardType",IFCDEEPFOUNDATION:"IfcDeepFoundation",IFCCOURSE:"IfcCourse",IFCCONVEYORSEGMENTTYPE:"IfcConveyorSegmentType",IFCCAISSONFOUNDATIONTYPE:"IfcCaissonFoundationType",IFCBUILTSYSTEM:"IfcBuiltSystem",IFCBUILTELEMENT:"IfcBuiltElement",IFCBRIDGEPART:"IfcBridgePart",IFCBRIDGE:"IfcBridge",IFCBEARINGTYPE:"IfcBearingType",IFCALIGNMENTVERTICAL:"IfcAlignmentVertical",IFCALIGNMENTSEGMENT:"IfcAlignmentSegment",IFCALIGNMENTHORIZONTAL:"IfcAlignmentHorizontal",IFCALIGNMENTCANT:"IfcAlignmentCant",IFCVIBRATIONDAMPERTYPE:"IfcVibrationDamperType",IFCVIBRATIONDAMPER:"IfcVibrationDamper",IFCVEHICLE:"IfcVehicle",IFCTRANSPORTATIONDEVICE:"IfcTransportationDevice",IFCTRACKELEMENTTYPE:"IfcTrackElementType",IFCTENDONCONDUITTYPE:"IfcTendonConduitType",IFCTENDONCONDUIT:"IfcTendonConduit",IFCSINESPIRAL:"IfcSineSpiral",IFCSIGNALTYPE:"IfcSignalType",IFCSIGNTYPE:"IfcSignType",IFCSIGN:"IfcSign",IFCSEVENTHORDERPOLYNOMIALSPIRAL:"IfcSeventhOrderPolynomialSpiral",IFCSEGMENTEDREFERENCECURVE:"IfcSegmentedReferenceCurve",IFCSECONDORDERPOLYNOMIALSPIRAL:"IfcSecondOrderPolynomialSpiral",IFCROADPART:"IfcRoadPart",IFCROAD:"IfcRoad",IFCRELADHERESTOELEMENT:"IfcRelAdheresToElement",IFCREFERENT:"IfcReferent",IFCRAILWAYPART:"IfcRailwayPart",IFCRAILWAY:"IfcRailway",IFCRAILTYPE:"IfcRailType",IFCPOSITIONINGELEMENT:"IfcPositioningElement",IFCPAVEMENTTYPE:"IfcPavementType",IFCNAVIGATIONELEMENTTYPE:"IfcNavigationElementType",IFCMOORINGDEVICETYPE:"IfcMooringDeviceType",IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE:"IfcMobileTelecommunicationsApplianceType",IFCMARINEPART:"IfcMarinePart",IFCMARINEFACILITY:"IfcMarineFacility",IFCLIQUIDTERMINALTYPE:"IfcLiquidTerminalType",IFCLINEARELEMENT:"IfcLinearElement",IFCKERBTYPE:"IfcKerbType",IFCIMPACTPROTECTIONDEVICETYPE:"IfcImpactProtectionDeviceType",IFCIMPACTPROTECTIONDEVICE:"IfcImpactProtectionDevice",IFCGRADIENTCURVE:"IfcGradientCurve",IFCGEOTECHNICALSTRATUM:"IfcGeotechnicalStratum",IFCGEOTECHNICALELEMENT:"IfcGeotechnicalElement",IFCFACILITYPARTCOMMON:"IfcFacilityPartCommon",IFCFACILITYPART:"IfcFacilityPart",IFCFACILITY:"IfcFacility",IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID:"IfcDirectrixDerivedReferenceSweptAreaSolid",IFCDEEPFOUNDATIONTYPE:"IfcDeepFoundationType",IFCCOURSETYPE:"IfcCourseType",IFCCOSINESPIRAL:"IfcCosineSpiral",IFCCLOTHOID:"IfcClothoid",IFCBUILTELEMENTTYPE:"IfcBuiltElementType",IFCVEHICLETYPE:"IfcVehicleType",IFCTRIANGULATEDIRREGULARNETWORK:"IfcTriangulatedIrregularNetwork",IFCTRANSPORTATIONDEVICETYPE:"IfcTransportationDeviceType",IFCTHIRDORDERPOLYNOMIALSPIRAL:"IfcThirdOrderPolynomialSpiral",IFCSPIRAL:"IfcSpiral",IFCSECTIONEDSURFACE:"IfcSectionedSurface",IFCSECTIONEDSOLIDHORIZONTAL:"IfcSectionedSolidHorizontal",IFCSECTIONEDSOLID:"IfcSectionedSolid",IFCRELPOSITIONS:"IfcRelPositions",IFCRELASSOCIATESPROFILEDEF:"IfcRelAssociatesProfileDef",IFCPOLYNOMIALCURVE:"IfcPolynomialCurve",IFCOFFSETCURVEBYDISTANCES:"IfcOffsetCurveByDistances",IFCOFFSETCURVE:"IfcOffsetCurve",IFCINDEXEDPOLYGONALTEXTUREMAP:"IfcIndexedPolygonalTextureMap",IFCDIRECTRIXCURVESWEPTAREASOLID:"IfcDirectrixCurveSweptAreaSolid",IFCCURVESEGMENT:"IfcCurveSegment",IFCAXIS2PLACEMENTLINEAR:"IfcAxis2PlacementLinear",IFCSEGMENT:"IfcSegment",IFCPOINTBYDISTANCEEXPRESSION:"IfcPointByDistanceExpression",IFCOPENCROSSPROFILEDEF:"IfcOpenCrossProfileDef",IFCLINEARPLACEMENT:"IfcLinearPlacement",IFCALIGNMENTHORIZONTALSEGMENT:"IfcAlignmentHorizontalSegment",IFCALIGNMENTCANTSEGMENT:"IfcAlignmentCantSegment",IFCTEXTURECOORDINATEINDICESWITHVOIDS:"IfcTextureCoordinateIndicesWithVoids",IFCTEXTURECOORDINATEINDICES:"IfcTextureCoordinateIndices",IFCQUANTITYNUMBER:"IfcQuantityNumber",IFCALIGNMENTVERTICALSEGMENT:"IfcAlignmentVerticalSegment",IFCALIGNMENTPARAMETERSEGMENT:"IfcAlignmentParameterSegment",IFCCONTROLLER:"IfcController",IFCALARM:"IfcAlarm",IFCACTUATOR:"IfcActuator",IFCUNITARYCONTROLELEMENT:"IfcUnitaryControlElement",IFCSENSOR:"IfcSensor",IFCPROTECTIVEDEVICETRIPPINGUNIT:"IfcProtectiveDeviceTrippingUnit",IFCFLOWINSTRUMENT:"IfcFlowInstrument",IFCFIRESUPPRESSIONTERMINAL:"IfcFireSuppressionTerminal",IFCFILTER:"IfcFilter",IFCFAN:"IfcFan",IFCELECTRICTIMECONTROL:"IfcElectricTimeControl",IFCELECTRICMOTOR:"IfcElectricMotor",IFCELECTRICGENERATOR:"IfcElectricGenerator",IFCELECTRICFLOWSTORAGEDEVICE:"IfcElectricFlowStorageDevice",IFCELECTRICDISTRIBUTIONBOARD:"IfcElectricDistributionBoard",IFCELECTRICAPPLIANCE:"IfcElectricAppliance",IFCDUCTSILENCER:"IfcDuctSilencer",IFCDUCTSEGMENT:"IfcDuctSegment",IFCDUCTFITTING:"IfcDuctFitting",IFCDISTRIBUTIONCIRCUIT:"IfcDistributionCircuit",IFCDAMPER:"IfcDamper",IFCCOOLINGTOWER:"IfcCoolingTower",IFCCOOLEDBEAM:"IfcCooledBeam",IFCCONDENSER:"IfcCondenser",IFCCOMPRESSOR:"IfcCompressor",IFCCOMMUNICATIONSAPPLIANCE:"IfcCommunicationsAppliance",IFCCOIL:"IfcCoil",IFCCHILLER:"IfcChiller",IFCCABLESEGMENT:"IfcCableSegment",IFCCABLEFITTING:"IfcCableFitting",IFCCABLECARRIERSEGMENT:"IfcCableCarrierSegment",IFCCABLECARRIERFITTING:"IfcCableCarrierFitting",IFCBURNER:"IfcBurner",IFCBOILER:"IfcBoiler",IFCBEAMSTANDARDCASE:"IfcBeamStandardCase",IFCAUDIOVISUALAPPLIANCE:"IfcAudioVisualAppliance",IFCAIRTOAIRHEATRECOVERY:"IfcAirToAirHeatRecovery",IFCAIRTERMINALBOX:"IfcAirTerminalBox",IFCAIRTERMINAL:"IfcAirTerminal",IFCWINDOWSTANDARDCASE:"IfcWindowStandardCase",IFCWASTETERMINAL:"IfcWasteTerminal",IFCWALLELEMENTEDCASE:"IfcWallElementedCase",IFCVALVE:"IfcValve",IFCUNITARYEQUIPMENT:"IfcUnitaryEquipment",IFCUNITARYCONTROLELEMENTTYPE:"IfcUnitaryControlElementType",IFCTUBEBUNDLE:"IfcTubeBundle",IFCTRANSFORMER:"IfcTransformer",IFCTANK:"IfcTank",IFCSWITCHINGDEVICE:"IfcSwitchingDevice",IFCSTRUCTURALLOADCASE:"IfcStructuralLoadCase",IFCSTACKTERMINAL:"IfcStackTerminal",IFCSPACEHEATER:"IfcSpaceHeater",IFCSOLARDEVICE:"IfcSolarDevice",IFCSLABSTANDARDCASE:"IfcSlabStandardCase",IFCSLABELEMENTEDCASE:"IfcSlabElementedCase",IFCSHADINGDEVICE:"IfcShadingDevice",IFCSANITARYTERMINAL:"IfcSanitaryTerminal",IFCREINFORCINGBARTYPE:"IfcReinforcingBarType",IFCRATIONALBSPLINECURVEWITHKNOTS:"IfcRationalBSplineCurveWithKnots",IFCPUMP:"IfcPump",IFCPROTECTIVEDEVICETRIPPINGUNITTYPE:"IfcProtectiveDeviceTrippingUnitType",IFCPROTECTIVEDEVICE:"IfcProtectiveDevice",IFCPLATESTANDARDCASE:"IfcPlateStandardCase",IFCPIPESEGMENT:"IfcPipeSegment",IFCPIPEFITTING:"IfcPipeFitting",IFCOUTLET:"IfcOutlet",IFCOUTERBOUNDARYCURVE:"IfcOuterBoundaryCurve",IFCMOTORCONNECTION:"IfcMotorConnection",IFCMEMBERSTANDARDCASE:"IfcMemberStandardCase",IFCMEDICALDEVICE:"IfcMedicalDevice",IFCLIGHTFIXTURE:"IfcLightFixture",IFCLAMP:"IfcLamp",IFCJUNCTIONBOX:"IfcJunctionBox",IFCINTERCEPTOR:"IfcInterceptor",IFCHUMIDIFIER:"IfcHumidifier",IFCHEATEXCHANGER:"IfcHeatExchanger",IFCFLOWMETER:"IfcFlowMeter",IFCEXTERNALSPATIALELEMENT:"IfcExternalSpatialElement",IFCEVAPORATOR:"IfcEvaporator",IFCEVAPORATIVECOOLER:"IfcEvaporativeCooler",IFCENGINE:"IfcEngine",IFCELECTRICDISTRIBUTIONBOARDTYPE:"IfcElectricDistributionBoardType",IFCDOORSTANDARDCASE:"IfcDoorStandardCase",IFCDISTRIBUTIONSYSTEM:"IfcDistributionSystem",IFCCOMMUNICATIONSAPPLIANCETYPE:"IfcCommunicationsApplianceType",IFCCOLUMNSTANDARDCASE:"IfcColumnStandardCase",IFCCIVILELEMENT:"IfcCivilElement",IFCCHIMNEY:"IfcChimney",IFCCABLEFITTINGTYPE:"IfcCableFittingType",IFCBURNERTYPE:"IfcBurnerType",IFCBUILDINGSYSTEM:"IfcBuildingSystem",IFCBUILDINGELEMENTPARTTYPE:"IfcBuildingElementPartType",IFCBOUNDARYCURVE:"IfcBoundaryCurve",IFCBSPLINECURVEWITHKNOTS:"IfcBSplineCurveWithKnots",IFCAUDIOVISUALAPPLIANCETYPE:"IfcAudioVisualApplianceType",IFCWORKCALENDAR:"IfcWorkCalendar",IFCWINDOWTYPE:"IfcWindowType",IFCVOIDINGFEATURE:"IfcVoidingFeature",IFCVIBRATIONISOLATOR:"IfcVibrationIsolator",IFCTENDONTYPE:"IfcTendonType",IFCTENDONANCHORTYPE:"IfcTendonAnchorType",IFCSYSTEMFURNITUREELEMENT:"IfcSystemFurnitureElement",IFCSURFACEFEATURE:"IfcSurfaceFeature",IFCSTRUCTURALSURFACEACTION:"IfcStructuralSurfaceAction",IFCSTRUCTURALCURVEREACTION:"IfcStructuralCurveReaction",IFCSTRUCTURALCURVEACTION:"IfcStructuralCurveAction",IFCSTAIRTYPE:"IfcStairType",IFCSOLARDEVICETYPE:"IfcSolarDeviceType",IFCSHADINGDEVICETYPE:"IfcShadingDeviceType",IFCSEAMCURVE:"IfcSeamCurve",IFCROOFTYPE:"IfcRoofType",IFCREINFORCINGMESHTYPE:"IfcReinforcingMeshType",IFCREINFORCINGELEMENTTYPE:"IfcReinforcingElementType",IFCRATIONALBSPLINESURFACEWITHKNOTS:"IfcRationalBSplineSurfaceWithKnots",IFCRAMPTYPE:"IfcRampType",IFCPOLYGONALFACESET:"IfcPolygonalFaceSet",IFCPILETYPE:"IfcPileType",IFCOPENINGSTANDARDCASE:"IfcOpeningStandardCase",IFCMEDICALDEVICETYPE:"IfcMedicalDeviceType",IFCINTERSECTIONCURVE:"IfcIntersectionCurve",IFCINTERCEPTORTYPE:"IfcInterceptorType",IFCINDEXEDPOLYCURVE:"IfcIndexedPolyCurve",IFCGEOGRAPHICELEMENT:"IfcGeographicElement",IFCFURNITURE:"IfcFurniture",IFCFOOTINGTYPE:"IfcFootingType",IFCEXTERNALSPATIALSTRUCTUREELEMENT:"IfcExternalSpatialStructureElement",IFCEVENT:"IfcEvent",IFCENGINETYPE:"IfcEngineType",IFCELEMENTASSEMBLYTYPE:"IfcElementAssemblyType",IFCDOORTYPE:"IfcDoorType",IFCCYLINDRICALSURFACE:"IfcCylindricalSurface",IFCCONSTRUCTIONPRODUCTRESOURCETYPE:"IfcConstructionProductResourceType",IFCCONSTRUCTIONMATERIALRESOURCETYPE:"IfcConstructionMaterialResourceType",IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE:"IfcConstructionEquipmentResourceType",IFCCOMPOSITECURVEONSURFACE:"IfcCompositeCurveOnSurface",IFCCOMPLEXPROPERTYTEMPLATE:"IfcComplexPropertyTemplate",IFCCIVILELEMENTTYPE:"IfcCivilElementType",IFCCHIMNEYTYPE:"IfcChimneyType",IFCBSPLINESURFACEWITHKNOTS:"IfcBSplineSurfaceWithKnots",IFCBSPLINESURFACE:"IfcBSplineSurface",IFCADVANCEDBREPWITHVOIDS:"IfcAdvancedBrepWithVoids",IFCADVANCEDBREP:"IfcAdvancedBrep",IFCTRIANGULATEDFACESET:"IfcTriangulatedFaceSet",IFCTOROIDALSURFACE:"IfcToroidalSurface",IFCTESSELLATEDFACESET:"IfcTessellatedFaceSet",IFCTASKTYPE:"IfcTaskType",IFCSURFACECURVE:"IfcSurfaceCurve",IFCSUBCONTRACTRESOURCETYPE:"IfcSubContractResourceType",IFCSTRUCTURALSURFACEREACTION:"IfcStructuralSurfaceReaction",IFCSPHERICALSURFACE:"IfcSphericalSurface",IFCSPATIALZONETYPE:"IfcSpatialZoneType",IFCSPATIALZONE:"IfcSpatialZone",IFCSPATIALELEMENTTYPE:"IfcSpatialElementType",IFCSPATIALELEMENT:"IfcSpatialElement",IFCSIMPLEPROPERTYTEMPLATE:"IfcSimplePropertyTemplate",IFCREVOLVEDAREASOLIDTAPERED:"IfcRevolvedAreaSolidTapered",IFCREPARAMETRISEDCOMPOSITECURVESEGMENT:"IfcReparametrisedCompositeCurveSegment",IFCRELSPACEBOUNDARY2NDLEVEL:"IfcRelSpaceBoundary2ndLevel",IFCRELSPACEBOUNDARY1STLEVEL:"IfcRelSpaceBoundary1stLevel",IFCRELINTERFERESELEMENTS:"IfcRelInterferesElements",IFCRELDEFINESBYTEMPLATE:"IfcRelDefinesByTemplate",IFCRELDEFINESBYOBJECT:"IfcRelDefinesByObject",IFCRELDECLARES:"IfcRelDeclares",IFCRELASSIGNSTOGROUPBYFACTOR:"IfcRelAssignsToGroupByFactor",IFCPROPERTYTEMPLATE:"IfcPropertyTemplate",IFCPROPERTYSETTEMPLATE:"IfcPropertySetTemplate",IFCPROJECTLIBRARY:"IfcProjectLibrary",IFCPROCEDURETYPE:"IfcProcedureType",IFCPREDEFINEDPROPERTYSET:"IfcPredefinedPropertySet",IFCPCURVE:"IfcPCurve",IFCLABORRESOURCETYPE:"IfcLaborResourceType",IFCINDEXEDPOLYGONALFACEWITHVOIDS:"IfcIndexedPolygonalFaceWithVoids",IFCINDEXEDPOLYGONALFACE:"IfcIndexedPolygonalFace",IFCGEOGRAPHICELEMENTTYPE:"IfcGeographicElementType",IFCFIXEDREFERENCESWEPTAREASOLID:"IfcFixedReferenceSweptAreaSolid",IFCEXTRUDEDAREASOLIDTAPERED:"IfcExtrudedAreaSolidTapered",IFCEVENTTYPE:"IfcEventType",IFCCURVEBOUNDEDSURFACE:"IfcCurveBoundedSurface",IFCCREWRESOURCETYPE:"IfcCrewResourceType",IFCCONTEXT:"IfcContext",IFCCONSTRUCTIONRESOURCETYPE:"IfcConstructionResourceType",IFCCARTESIANPOINTLIST3D:"IfcCartesianPointList3D",IFCCARTESIANPOINTLIST2D:"IfcCartesianPointList2D",IFCCARTESIANPOINTLIST:"IfcCartesianPointList",IFCADVANCEDFACE:"IfcAdvancedFace",IFCTYPERESOURCE:"IfcTypeResource",IFCTYPEPROCESS:"IfcTypeProcess",IFCTESSELLATEDITEM:"IfcTessellatedItem",IFCSWEPTDISKSOLIDPOLYGONAL:"IfcSweptDiskSolidPolygonal",IFCRESOURCETIME:"IfcResourceTime",IFCRESOURCECONSTRAINTRELATIONSHIP:"IfcResourceConstraintRelationship",IFCRESOURCEAPPROVALRELATIONSHIP:"IfcResourceApprovalRelationship",IFCQUANTITYSET:"IfcQuantitySet",IFCPROPERTYTEMPLATEDEFINITION:"IfcPropertyTemplateDefinition",IFCPREDEFINEDPROPERTIES:"IfcPredefinedProperties",IFCMIRROREDPROFILEDEF:"IfcMirroredProfileDef",IFCMATERIALRELATIONSHIP:"IfcMaterialRelationship",IFCMATERIALPROFILESETUSAGETAPERING:"IfcMaterialProfileSetUsageTapering",IFCMATERIALPROFILESETUSAGE:"IfcMaterialProfileSetUsage",IFCMATERIALCONSTITUENTSET:"IfcMaterialConstituentSet",IFCMATERIALCONSTITUENT:"IfcMaterialConstituent",IFCLAGTIME:"IfcLagTime",IFCINDEXEDTRIANGLETEXTUREMAP:"IfcIndexedTriangleTextureMap",IFCINDEXEDTEXTUREMAP:"IfcIndexedTextureMap",IFCINDEXEDCOLOURMAP:"IfcIndexedColourMap",IFCEXTERNALREFERENCERELATIONSHIP:"IfcExternalReferenceRelationship",IFCEXTENDEDPROPERTIES:"IfcExtendedProperties",IFCEVENTTIME:"IfcEventTime",IFCCONVERSIONBASEDUNITWITHOFFSET:"IfcConversionBasedUnitWithOffset",IFCCOLOURRGBLIST:"IfcColourRgbList",IFCWORKTIME:"IfcWorkTime",IFCTIMEPERIOD:"IfcTimePeriod",IFCTEXTUREVERTEXLIST:"IfcTextureVertexList",IFCTASKTIMERECURRING:"IfcTaskTimeRecurring",IFCTASKTIME:"IfcTaskTime",IFCTABLECOLUMN:"IfcTableColumn",IFCSURFACEREINFORCEMENTAREA:"IfcSurfaceReinforcementArea",IFCSTRUCTURALLOADORRESULT:"IfcStructuralLoadOrResult",IFCSTRUCTURALLOADCONFIGURATION:"IfcStructuralLoadConfiguration",IFCSCHEDULINGTIME:"IfcSchedulingTime",IFCRESOURCELEVELRELATIONSHIP:"IfcResourceLevelRelationship",IFCREFERENCE:"IfcReference",IFCRECURRENCEPATTERN:"IfcRecurrencePattern",IFCPROPERTYABSTRACTION:"IfcPropertyAbstraction",IFCPROJECTEDCRS:"IfcProjectedCrs",IFCPRESENTATIONITEM:"IfcPresentationItem",IFCMATERIALUSAGEDEFINITION:"IfcMaterialUsageDefinition",IFCMATERIALPROFILEWITHOFFSETS:"IfcMaterialProfileWithOffsets",IFCMATERIALPROFILESET:"IfcMaterialProfileSet",IFCMATERIALPROFILE:"IfcMaterialProfile",IFCMATERIALLAYERWITHOFFSETS:"IfcMaterialLayerWithOffsets",IFCMATERIALDEFINITION:"IfcMaterialDefinition",IFCMAPCONVERSION:"IfcMapConversion",IFCEXTERNALINFORMATION:"IfcExternalInformation",IFCCOORDINATEREFERENCESYSTEM:"IfcCoordinateReferenceSystem",IFCCOORDINATEOPERATION:"IfcCoordinateOperation",IFCCONNECTIONVOLUMEGEOMETRY:"IfcConnectionVolumeGeometry",IFCREINFORCINGBAR:"IfcReinforcingBar",IFCELECTRICDISTRIBUTIONPOINT:"IfcElectricDistributionPoint",IFCDISTRIBUTIONCONTROLELEMENT:"IfcDistributionControlElement",IFCDISTRIBUTIONCHAMBERELEMENT:"IfcDistributionChamberElement",IFCCONTROLLERTYPE:"IfcControllerType",IFCCHAMFEREDGEFEATURE:"IfcChamferEdgeFeature",IFCBEAM:"IfcBeam",IFCALARMTYPE:"IfcAlarmType",IFCACTUATORTYPE:"IfcActuatorType",IFCWINDOW:"IfcWindow",IFCWALLSTANDARDCASE:"IfcWallStandardCase",IFCWALL:"IfcWall",IFCVIBRATIONISOLATORTYPE:"IfcVibrationIsolatorType",IFCTENDONANCHOR:"IfcTendonAnchor",IFCTENDON:"IfcTendon",IFCSTRUCTURALANALYSISMODEL:"IfcStructuralAnalysisModel",IFCSTAIRFLIGHT:"IfcStairFlight",IFCSTAIR:"IfcStair",IFCSLAB:"IfcSlab",IFCSENSORTYPE:"IfcSensorType",IFCROUNDEDEDGEFEATURE:"IfcRoundedEdgeFeature",IFCROOF:"IfcRoof",IFCREINFORCINGMESH:"IfcReinforcingMesh",IFCREINFORCINGELEMENT:"IfcReinforcingElement",IFCRATIONALBEZIERCURVE:"IfcRationalBezierCurve",IFCRAMPFLIGHT:"IfcRampFlight",IFCRAMP:"IfcRamp",IFCRAILING:"IfcRailing",IFCPLATE:"IfcPlate",IFCPILE:"IfcPile",IFCMEMBER:"IfcMember",IFCFOOTING:"IfcFooting",IFCFLOWTREATMENTDEVICE:"IfcFlowTreatmentDevice",IFCFLOWTERMINAL:"IfcFlowTerminal",IFCFLOWSTORAGEDEVICE:"IfcFlowStorageDevice",IFCFLOWSEGMENT:"IfcFlowSegment",IFCFLOWMOVINGDEVICE:"IfcFlowMovingDevice",IFCFLOWINSTRUMENTTYPE:"IfcFlowInstrumentType",IFCFLOWFITTING:"IfcFlowFitting",IFCFLOWCONTROLLER:"IfcFlowController",IFCFIRESUPPRESSIONTERMINALTYPE:"IfcFireSuppressionTerminalType",IFCFILTERTYPE:"IfcFilterType",IFCFANTYPE:"IfcFanType",IFCENERGYCONVERSIONDEVICE:"IfcEnergyConversionDevice",IFCELECTRICALELEMENT:"IfcElectricalElement",IFCELECTRICALCIRCUIT:"IfcElectricalCircuit",IFCELECTRICTIMECONTROLTYPE:"IfcElectricTimeControlType",IFCELECTRICMOTORTYPE:"IfcElectricMotorType",IFCELECTRICHEATERTYPE:"IfcElectricHeaterType",IFCELECTRICGENERATORTYPE:"IfcElectricGeneratorType",IFCELECTRICFLOWSTORAGEDEVICETYPE:"IfcElectricFlowStorageDeviceType",IFCELECTRICAPPLIANCETYPE:"IfcElectricApplianceType",IFCEDGEFEATURE:"IfcEdgeFeature",IFCDUCTSILENCERTYPE:"IfcDuctSilencerType",IFCDUCTSEGMENTTYPE:"IfcDuctSegmentType",IFCDUCTFITTINGTYPE:"IfcDuctFittingType",IFCDOOR:"IfcDoor",IFCDISTRIBUTIONPORT:"IfcDistributionPort",IFCDISTRIBUTIONFLOWELEMENT:"IfcDistributionFlowElement",IFCDISTRIBUTIONELEMENT:"IfcDistributionElement",IFCDISTRIBUTIONCONTROLELEMENTTYPE:"IfcDistributionControlElementType",IFCDISTRIBUTIONCHAMBERELEMENTTYPE:"IfcDistributionChamberElementType",IFCDISCRETEACCESSORYTYPE:"IfcDiscreteAccessoryType",IFCDISCRETEACCESSORY:"IfcDiscreteAccessory",IFCDIAMETERDIMENSION:"IfcDiameterDimension",IFCDAMPERTYPE:"IfcDamperType",IFCCURTAINWALL:"IfcCurtainWall",IFCCOVERING:"IfcCovering",IFCCOOLINGTOWERTYPE:"IfcCoolingTowerType",IFCCOOLEDBEAMTYPE:"IfcCooledBeamType",IFCCONSTRUCTIONPRODUCTRESOURCE:"IfcConstructionProductResource",IFCCONSTRUCTIONMATERIALRESOURCE:"IfcConstructionMaterialResource",IFCCONSTRUCTIONEQUIPMENTRESOURCE:"IfcConstructionEquipmentResource",IFCCONDITIONCRITERION:"IfcConditionCriterion",IFCCONDITION:"IfcCondition",IFCCONDENSERTYPE:"IfcCondenserType",IFCCOMPRESSORTYPE:"IfcCompressorType",IFCCOLUMN:"IfcColumn",IFCCOILTYPE:"IfcCoilType",IFCCIRCLE:"IfcCircle",IFCCHILLERTYPE:"IfcChillerType",IFCCABLESEGMENTTYPE:"IfcCableSegmentType",IFCCABLECARRIERSEGMENTTYPE:"IfcCableCarrierSegmentType",IFCCABLECARRIERFITTINGTYPE:"IfcCableCarrierFittingType",IFCBUILDINGELEMENTPROXYTYPE:"IfcBuildingElementProxyType",IFCBUILDINGELEMENTPROXY:"IfcBuildingElementProxy",IFCBUILDINGELEMENTPART:"IfcBuildingElementPart",IFCBUILDINGELEMENTCOMPONENT:"IfcBuildingElementComponent",IFCBUILDINGELEMENT:"IfcBuildingElement",IFCBOILERTYPE:"IfcBoilerType",IFCBEZIERCURVE:"IfcBezierCurve",IFCBEAMTYPE:"IfcBeamType",IFCBSPLINECURVE:"IfcBSplineCurve",IFCASSET:"IfcAsset",IFCANGULARDIMENSION:"IfcAngularDimension",IFCAIRTOAIRHEATRECOVERYTYPE:"IfcAirToAirHeatRecoveryType",IFCAIRTERMINALTYPE:"IfcAirTerminalType",IFCAIRTERMINALBOXTYPE:"IfcAirTerminalBoxType",IFCACTIONREQUEST:"IfcActionRequest",IFC2DCOMPOSITECURVE:"Ifc2DCompositeCurve",IFCZONE:"IfcZone",IFCWORKSCHEDULE:"IfcWorkSchedule",IFCWORKPLAN:"IfcWorkPlan",IFCWORKCONTROL:"IfcWorkControl",IFCWASTETERMINALTYPE:"IfcWasteTerminalType",IFCWALLTYPE:"IfcWallType",IFCVIRTUALELEMENT:"IfcVirtualElement",IFCVALVETYPE:"IfcValveType",IFCUNITARYEQUIPMENTTYPE:"IfcUnitaryEquipmentType",IFCTUBEBUNDLETYPE:"IfcTubeBundleType",IFCTRIMMEDCURVE:"IfcTrimmedCurve",IFCTRANSPORTELEMENT:"IfcTransportElement",IFCTRANSFORMERTYPE:"IfcTransformerType",IFCTIMESERIESSCHEDULE:"IfcTimeSeriesSchedule",IFCTANKTYPE:"IfcTankType",IFCSYSTEM:"IfcSystem",IFCSWITCHINGDEVICETYPE:"IfcSwitchingDeviceType",IFCSUBCONTRACTRESOURCE:"IfcSubContractResource",IFCSTRUCTURALSURFACECONNECTION:"IfcStructuralSurfaceConnection",IFCSTRUCTURALRESULTGROUP:"IfcStructuralResultGroup",IFCSTRUCTURALPOINTREACTION:"IfcStructuralPointReaction",IFCSTRUCTURALPOINTCONNECTION:"IfcStructuralPointConnection",IFCSTRUCTURALPOINTACTION:"IfcStructuralPointAction",IFCSTRUCTURALPLANARACTIONVARYING:"IfcStructuralPlanarActionVarying",IFCSTRUCTURALPLANARACTION:"IfcStructuralPlanarAction",IFCSTRUCTURALLOADGROUP:"IfcStructuralLoadGroup",IFCSTRUCTURALLINEARACTIONVARYING:"IfcStructuralLinearActionVarying",IFCSTRUCTURALLINEARACTION:"IfcStructuralLinearAction",IFCSTRUCTURALCURVEMEMBERVARYING:"IfcStructuralCurveMemberVarying",IFCSTRUCTURALCURVEMEMBER:"IfcStructuralCurveMember",IFCSTRUCTURALCURVECONNECTION:"IfcStructuralCurveConnection",IFCSTRUCTURALCONNECTION:"IfcStructuralConnection",IFCSTRUCTURALACTION:"IfcStructuralAction",IFCSTAIRFLIGHTTYPE:"IfcStairFlightType",IFCSTACKTERMINALTYPE:"IfcStackTerminalType",IFCSPACETYPE:"IfcSpaceType",IFCSPACEPROGRAM:"IfcSpaceProgram",IFCSPACEHEATERTYPE:"IfcSpaceHeaterType",IFCSPACE:"IfcSpace",IFCSLABTYPE:"IfcSlabType",IFCSITE:"IfcSite",IFCSERVICELIFE:"IfcServiceLife",IFCSCHEDULETIMECONTROL:"IfcScheduleTimeControl",IFCSANITARYTERMINALTYPE:"IfcSanitaryTerminalType",IFCRELASSIGNSTASKS:"IfcRelAssignsTasks",IFCRELAGGREGATES:"IfcRelAggregates",IFCRAMPFLIGHTTYPE:"IfcRampFlightType",IFCRAILINGTYPE:"IfcRailingType",IFCRADIUSDIMENSION:"IfcRadiusDimension",IFCPUMPTYPE:"IfcPumpType",IFCPROTECTIVEDEVICETYPE:"IfcProtectiveDeviceType",IFCPROJECTIONELEMENT:"IfcProjectionElement",IFCPROJECTORDERRECORD:"IfcProjectOrderRecord",IFCPROJECTORDER:"IfcProjectOrder",IFCPROCEDURE:"IfcProcedure",IFCPORT:"IfcPort",IFCPOLYLINE:"IfcPolyline",IFCPLATETYPE:"IfcPlateType",IFCPIPESEGMENTTYPE:"IfcPipeSegmentType",IFCPIPEFITTINGTYPE:"IfcPipeFittingType",IFCPERMIT:"IfcPermit",IFCPERFORMANCEHISTORY:"IfcPerformanceHistory",IFCOUTLETTYPE:"IfcOutletType",IFCORDERACTION:"IfcOrderAction",IFCOPENINGELEMENT:"IfcOpeningElement",IFCOCCUPANT:"IfcOccupant",IFCMOVE:"IfcMove",IFCMOTORCONNECTIONTYPE:"IfcMotorConnectionType",IFCMEMBERTYPE:"IfcMemberType",IFCMECHANICALFASTENERTYPE:"IfcMechanicalFastenerType",IFCMECHANICALFASTENER:"IfcMechanicalFastener",IFCLINEARDIMENSION:"IfcLinearDimension",IFCLIGHTFIXTURETYPE:"IfcLightFixtureType",IFCLAMPTYPE:"IfcLampType",IFCLABORRESOURCE:"IfcLaborResource",IFCJUNCTIONBOXTYPE:"IfcJunctionBoxType",IFCINVENTORY:"IfcInventory",IFCHUMIDIFIERTYPE:"IfcHumidifierType",IFCHEATEXCHANGERTYPE:"IfcHeatExchangerType",IFCGROUP:"IfcGroup",IFCGRID:"IfcGrid",IFCGASTERMINALTYPE:"IfcGasTerminalType",IFCFURNITURESTANDARD:"IfcFurnitureStandard",IFCFURNISHINGELEMENT:"IfcFurnishingElement",IFCFLOWTREATMENTDEVICETYPE:"IfcFlowTreatmentDeviceType",IFCFLOWTERMINALTYPE:"IfcFlowTerminalType",IFCFLOWSTORAGEDEVICETYPE:"IfcFlowStorageDeviceType",IFCFLOWSEGMENTTYPE:"IfcFlowSegmentType",IFCFLOWMOVINGDEVICETYPE:"IfcFlowMovingDeviceType",IFCFLOWMETERTYPE:"IfcFlowMeterType",IFCFLOWFITTINGTYPE:"IfcFlowFittingType",IFCFLOWCONTROLLERTYPE:"IfcFlowControllerType",IFCFEATUREELEMENTSUBTRACTION:"IfcFeatureElementSubtraction",IFCFEATUREELEMENTADDITION:"IfcFeatureElementAddition",IFCFEATUREELEMENT:"IfcFeatureElement",IFCFASTENERTYPE:"IfcFastenerType",IFCFASTENER:"IfcFastener",IFCFACETEDBREPWITHVOIDS:"IfcFacetedBrepWithVoids",IFCFACETEDBREP:"IfcFacetedBrep",IFCEVAPORATORTYPE:"IfcEvaporatorType",IFCEVAPORATIVECOOLERTYPE:"IfcEvaporativeCoolerType",IFCEQUIPMENTSTANDARD:"IfcEquipmentStandard",IFCEQUIPMENTELEMENT:"IfcEquipmentElement",IFCENERGYCONVERSIONDEVICETYPE:"IfcEnergyConversionDeviceType",IFCELLIPSE:"IfcEllipse",IFCELEMENTCOMPONENTTYPE:"IfcElementComponentType",IFCELEMENTCOMPONENT:"IfcElementComponent",IFCELEMENTASSEMBLY:"IfcElementAssembly",IFCELEMENT:"IfcElement",IFCELECTRICALBASEPROPERTIES:"IfcElectricalBaseProperties",IFCDISTRIBUTIONFLOWELEMENTTYPE:"IfcDistributionFlowElementType",IFCDISTRIBUTIONELEMENTTYPE:"IfcDistributionElementType",IFCDIMENSIONCURVEDIRECTEDCALLOUT:"IfcDimensionCurveDirectedCallout",IFCCURTAINWALLTYPE:"IfcCurtainWallType",IFCCREWRESOURCE:"IfcCrewResource",IFCCOVERINGTYPE:"IfcCoveringType",IFCCOSTSCHEDULE:"IfcCostSchedule",IFCCOSTITEM:"IfcCostItem",IFCCONTROL:"IfcControl",IFCCONSTRUCTIONRESOURCE:"IfcConstructionResource",IFCCONIC:"IfcConic",IFCCOMPOSITECURVE:"IfcCompositeCurve",IFCCOLUMNTYPE:"IfcColumnType",IFCCIRCLEHOLLOWPROFILEDEF:"IfcCircleHollowProfileDef",IFCBUILDINGSTOREY:"IfcBuildingStorey",IFCBUILDINGELEMENTTYPE:"IfcBuildingElementType",IFCBUILDING:"IfcBuilding",IFCBOUNDEDCURVE:"IfcBoundedCurve",IFCBOOLEANCLIPPINGRESULT:"IfcBooleanClippingResult",IFCBLOCK:"IfcBlock",IFCASYMMETRICISHAPEPROFILEDEF:"IfcAsymmetricIShapeProfileDef",IFCANNOTATION:"IfcAnnotation",IFCACTOR:"IfcActor",IFCTRANSPORTELEMENTTYPE:"IfcTransportElementType",IFCTASK:"IfcTask",IFCSYSTEMFURNITUREELEMENTTYPE:"IfcSystemFurnitureElementType",IFCSURFACEOFREVOLUTION:"IfcSurfaceOfRevolution",IFCSURFACEOFLINEAREXTRUSION:"IfcSurfaceOfLinearExtrusion",IFCSURFACECURVESWEPTAREASOLID:"IfcSurfaceCurveSweptAreaSolid",IFCSTRUCTUREDDIMENSIONCALLOUT:"IfcStructuredDimensionCallout",IFCSTRUCTURALSURFACEMEMBERVARYING:"IfcStructuralSurfaceMemberVarying",IFCSTRUCTURALSURFACEMEMBER:"IfcStructuralSurfaceMember",IFCSTRUCTURALREACTION:"IfcStructuralReaction",IFCSTRUCTURALMEMBER:"IfcStructuralMember",IFCSTRUCTURALITEM:"IfcStructuralItem",IFCSTRUCTURALACTIVITY:"IfcStructuralActivity",IFCSPHERE:"IfcSphere",IFCSPATIALSTRUCTUREELEMENTTYPE:"IfcSpatialStructureElementType",IFCSPATIALSTRUCTUREELEMENT:"IfcSpatialStructureElement",IFCRIGHTCIRCULARCYLINDER:"IfcRightCircularCylinder",IFCRIGHTCIRCULARCONE:"IfcRightCircularCone",IFCREVOLVEDAREASOLID:"IfcRevolvedAreaSolid",IFCRESOURCE:"IfcResource",IFCRELVOIDSELEMENT:"IfcRelVoidsElement",IFCRELSPACEBOUNDARY:"IfcRelSpaceBoundary",IFCRELSERVICESBUILDINGS:"IfcRelServicesBuildings",IFCRELSEQUENCE:"IfcRelSequence",IFCRELSCHEDULESCOSTITEMS:"IfcRelSchedulesCostItems",IFCRELREFERENCEDINSPATIALSTRUCTURE:"IfcRelReferencedInSpatialStructure",IFCRELPROJECTSELEMENT:"IfcRelProjectsElement",IFCRELOVERRIDESPROPERTIES:"IfcRelOverridesProperties",IFCRELOCCUPIESSPACES:"IfcRelOccupiesSpaces",IFCRELNESTS:"IfcRelNests",IFCRELINTERACTIONREQUIREMENTS:"IfcRelInteractionRequirements",IFCRELFLOWCONTROLELEMENTS:"IfcRelFlowControlElements",IFCRELFILLSELEMENT:"IfcRelFillsElement",IFCRELDEFINESBYTYPE:"IfcRelDefinesByType",IFCRELDEFINESBYPROPERTIES:"IfcRelDefinesByProperties",IFCRELDEFINES:"IfcRelDefines",IFCRELDECOMPOSES:"IfcRelDecomposes",IFCRELCOVERSSPACES:"IfcRelCoversSpaces",IFCRELCOVERSBLDGELEMENTS:"IfcRelCoversBldgElements",IFCRELCONTAINEDINSPATIALSTRUCTURE:"IfcRelContainedInSpatialStructure",IFCRELCONNECTSWITHREALIZINGELEMENTS:"IfcRelConnectsWithRealizingElements",IFCRELCONNECTSWITHECCENTRICITY:"IfcRelConnectsWithEccentricity",IFCRELCONNECTSSTRUCTURALMEMBER:"IfcRelConnectsStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT:"IfcRelConnectsStructuralElement",IFCRELCONNECTSSTRUCTURALACTIVITY:"IfcRelConnectsStructuralActivity",IFCRELCONNECTSPORTS:"IfcRelConnectsPorts",IFCRELCONNECTSPORTTOELEMENT:"IfcRelConnectsPortToElement",IFCRELCONNECTSPATHELEMENTS:"IfcRelConnectsPathElements",IFCRELCONNECTSELEMENTS:"IfcRelConnectsElements",IFCRELCONNECTS:"IfcRelConnects",IFCRELASSOCIATESPROFILEPROPERTIES:"IfcRelAssociatesProfileProperties",IFCRELASSOCIATESMATERIAL:"IfcRelAssociatesMaterial",IFCRELASSOCIATESLIBRARY:"IfcRelAssociatesLibrary",IFCRELASSOCIATESDOCUMENT:"IfcRelAssociatesDocument",IFCRELASSOCIATESCONSTRAINT:"IfcRelAssociatesConstraint",IFCRELASSOCIATESCLASSIFICATION:"IfcRelAssociatesClassification",IFCRELASSOCIATESAPPROVAL:"IfcRelAssociatesApproval",IFCRELASSOCIATESAPPLIEDVALUE:"IfcRelAssociatesAppliedValue",IFCRELASSOCIATES:"IfcRelAssociates",IFCRELASSIGNSTORESOURCE:"IfcRelAssignsToResource",IFCRELASSIGNSTOPROJECTORDER:"IfcRelAssignsToProjectOrder",IFCRELASSIGNSTOPRODUCT:"IfcRelAssignsToProduct",IFCRELASSIGNSTOPROCESS:"IfcRelAssignsToProcess",IFCRELASSIGNSTOGROUP:"IfcRelAssignsToGroup",IFCRELASSIGNSTOCONTROL:"IfcRelAssignsToControl",IFCRELASSIGNSTOACTOR:"IfcRelAssignsToActor",IFCRELASSIGNS:"IfcRelAssigns",IFCRECTANGULARTRIMMEDSURFACE:"IfcRectangularTrimmedSurface",IFCRECTANGULARPYRAMID:"IfcRectangularPyramid",IFCRECTANGLEHOLLOWPROFILEDEF:"IfcRectangleHollowProfileDef",IFCPROXY:"IfcProxy",IFCPROPERTYSET:"IfcPropertySet",IFCPROJECTIONCURVE:"IfcProjectionCurve",IFCPROJECT:"IfcProject",IFCPRODUCT:"IfcProduct",IFCPROCESS:"IfcProcess",IFCPLANE:"IfcPlane",IFCPLANARBOX:"IfcPlanarBox",IFCPERMEABLECOVERINGPROPERTIES:"IfcPermeableCoveringProperties",IFCOFFSETCURVE3D:"IfcOffsetCurve3D",IFCOFFSETCURVE2D:"IfcOffsetCurve2D",IFCOBJECT:"IfcObject",IFCMANIFOLDSOLIDBREP:"IfcManifoldSolidBrep",IFCLINE:"IfcLine",IFCLSHAPEPROFILEDEF:"IfcLShapeProfileDef",IFCISHAPEPROFILEDEF:"IfcIShapeProfileDef",IFCGEOMETRICCURVESET:"IfcGeometricCurveSet",IFCFURNITURETYPE:"IfcFurnitureType",IFCFURNISHINGELEMENTTYPE:"IfcFurnishingElementType",IFCFLUIDFLOWPROPERTIES:"IfcFluidFlowProperties",IFCFILLAREASTYLETILES:"IfcFillAreaStyleTiles",IFCFILLAREASTYLETILESYMBOLWITHSTYLE:"IfcFillAreaStyleTileSymbolWithStyle",IFCFILLAREASTYLEHATCHING:"IfcFillAreaStyleHatching",IFCFACEBASEDSURFACEMODEL:"IfcFaceBasedSurfaceModel",IFCEXTRUDEDAREASOLID:"IfcExtrudedAreaSolid",IFCENERGYPROPERTIES:"IfcEnergyProperties",IFCELLIPSEPROFILEDEF:"IfcEllipseProfileDef",IFCELEMENTARYSURFACE:"IfcElementarySurface",IFCELEMENTTYPE:"IfcElementType",IFCELEMENTQUANTITY:"IfcElementQuantity",IFCEDGELOOP:"IfcEdgeLoop",IFCDRAUGHTINGPREDEFINEDCURVEFONT:"IfcDraughtingPredefinedCurveFont",IFCDRAUGHTINGPREDEFINEDCOLOUR:"IfcDraughtingPredefinedColour",IFCDRAUGHTINGCALLOUT:"IfcDraughtingCallout",IFCDOORSTYLE:"IfcDoorStyle",IFCDOORPANELPROPERTIES:"IfcDoorPanelProperties",IFCDOORLININGPROPERTIES:"IfcDoorLiningProperties",IFCDIRECTION:"IfcDirection",IFCDIMENSIONCURVETERMINATOR:"IfcDimensionCurveTerminator",IFCDIMENSIONCURVE:"IfcDimensionCurve",IFCDEFINEDSYMBOL:"IfcDefinedSymbol",IFCCURVEBOUNDEDPLANE:"IfcCurveBoundedPlane",IFCCURVE:"IfcCurve",IFCCSGSOLID:"IfcCsgSolid",IFCCSGPRIMITIVE3D:"IfcCsgPrimitive3D",IFCCRANERAILFSHAPEPROFILEDEF:"IfcCraneRailFShapeProfileDef",IFCCRANERAILASHAPEPROFILEDEF:"IfcCraneRailAShapeProfileDef",IFCCOMPOSITECURVESEGMENT:"IfcCompositeCurveSegment",IFCCLOSEDSHELL:"IfcClosedShell",IFCCIRCLEPROFILEDEF:"IfcCircleProfileDef",IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM:"IfcCartesianTransformationOperator3DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR3D:"IfcCartesianTransformationOperator3D",IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM:"IfcCartesianTransformationOperator2DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR2D:"IfcCartesianTransformationOperator2D",IFCCARTESIANTRANSFORMATIONOPERATOR:"IfcCartesianTransformationOperator",IFCCARTESIANPOINT:"IfcCartesianPoint",IFCCSHAPEPROFILEDEF:"IfcCShapeProfileDef",IFCBOXEDHALFSPACE:"IfcBoxedHalfSpace",IFCBOUNDINGBOX:"IfcBoundingBox",IFCBOUNDEDSURFACE:"IfcBoundedSurface",IFCBOOLEANRESULT:"IfcBooleanResult",IFCAXIS2PLACEMENT3D:"IfcAxis2Placement3D",IFCAXIS2PLACEMENT2D:"IfcAxis2Placement2D",IFCAXIS1PLACEMENT:"IfcAxis1Placement",IFCANNOTATIONSURFACE:"IfcAnnotationSurface",IFCANNOTATIONFILLAREAOCCURRENCE:"IfcAnnotationFillAreaOccurrence",IFCANNOTATIONFILLAREA:"IfcAnnotationFillArea",IFCANNOTATIONCURVEOCCURRENCE:"IfcAnnotationCurveOccurrence",IFCZSHAPEPROFILEDEF:"IfcZShapeProfileDef",IFCWINDOWSTYLE:"IfcWindowStyle",IFCWINDOWPANELPROPERTIES:"IfcWindowPanelProperties",IFCWINDOWLININGPROPERTIES:"IfcWindowLiningProperties",IFCVERTEXLOOP:"IfcVertexLoop",IFCVECTOR:"IfcVector",IFCUSHAPEPROFILEDEF:"IfcUShapeProfileDef",IFCTYPEPRODUCT:"IfcTypeProduct",IFCTYPEOBJECT:"IfcTypeObject",IFCTWODIRECTIONREPEATFACTOR:"IfcTwoDirectionRepeatFactor",IFCTRAPEZIUMPROFILEDEF:"IfcTrapeziumProfileDef",IFCTEXTLITERALWITHEXTENT:"IfcTextLiteralWithExtent",IFCTEXTLITERAL:"IfcTextLiteral",IFCTERMINATORSYMBOL:"IfcTerminatorSymbol",IFCTSHAPEPROFILEDEF:"IfcTShapeProfileDef",IFCSWEPTSURFACE:"IfcSweptSurface",IFCSWEPTDISKSOLID:"IfcSweptDiskSolid",IFCSWEPTAREASOLID:"IfcSweptAreaSolid",IFCSURFACESTYLERENDERING:"IfcSurfaceStyleRendering",IFCSURFACE:"IfcSurface",IFCSUBEDGE:"IfcSubedge",IFCSTRUCTURALSTEELPROFILEPROPERTIES:"IfcStructuralSteelProfileProperties",IFCSTRUCTURALPROFILEPROPERTIES:"IfcStructuralProfileProperties",IFCSTRUCTURALLOADSINGLEFORCEWARPING:"IfcStructuralLoadSingleForceWarping",IFCSTRUCTURALLOADSINGLEFORCE:"IfcStructuralLoadSingleForce",IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION:"IfcStructuralLoadSingleDisplacementDistortion",IFCSTRUCTURALLOADSINGLEDISPLACEMENT:"IfcStructuralLoadSingleDisplacement",IFCSTRUCTURALLOADPLANARFORCE:"IfcStructuralLoadPlanarForce",IFCSTRUCTURALLOADLINEARFORCE:"IfcStructuralLoadLinearForce",IFCSPACETHERMALLOADPROPERTIES:"IfcSpaceThermalLoadProperties",IFCSOUNDVALUE:"IfcSoundValue",IFCSOUNDPROPERTIES:"IfcSoundProperties",IFCSOLIDMODEL:"IfcSolidModel",IFCSLIPPAGECONNECTIONCONDITION:"IfcSlippageConnectionCondition",IFCSHELLBASEDSURFACEMODEL:"IfcShellBasedSurfaceModel",IFCSERVICELIFEFACTOR:"IfcServiceLifeFactor",IFCSECTIONEDSPINE:"IfcSectionedSpine",IFCROUNDEDRECTANGLEPROFILEDEF:"IfcRoundedRectangleProfileDef",IFCRELATIONSHIP:"IfcRelationship",IFCREINFORCEMENTDEFINITIONPROPERTIES:"IfcReinforcementDefinitionProperties",IFCREGULARTIMESERIES:"IfcRegularTimeSeries",IFCRECTANGLEPROFILEDEF:"IfcRectangleProfileDef",IFCPROPERTYTABLEVALUE:"IfcPropertyTableValue",IFCPROPERTYSINGLEVALUE:"IfcPropertySingleValue",IFCPROPERTYSETDEFINITION:"IfcPropertySetDefinition",IFCPROPERTYREFERENCEVALUE:"IfcPropertyReferenceValue",IFCPROPERTYLISTVALUE:"IfcPropertyListValue",IFCPROPERTYENUMERATEDVALUE:"IfcPropertyEnumeratedValue",IFCPROPERTYDEFINITION:"IfcPropertyDefinition",IFCPROPERTYBOUNDEDVALUE:"IfcPropertyBoundedValue",IFCPRODUCTDEFINITIONSHAPE:"IfcProductDefinitionShape",IFCPREDEFINEDPOINTMARKERSYMBOL:"IfcPredefinedPointMarkerSymbol",IFCPREDEFINEDDIMENSIONSYMBOL:"IfcPredefinedDimensionSymbol",IFCPREDEFINEDCURVEFONT:"IfcPredefinedCurveFont",IFCPREDEFINEDCOLOUR:"IfcPredefinedColour",IFCPOLYGONALBOUNDEDHALFSPACE:"IfcPolygonalBoundedHalfSpace",IFCPOLYLOOP:"IfcPolyLoop",IFCPOINTONSURFACE:"IfcPointOnSurface",IFCPOINTONCURVE:"IfcPointOnCurve",IFCPOINT:"IfcPoint",IFCPLANAREXTENT:"IfcPlanarExtent",IFCPLACEMENT:"IfcPlacement",IFCPIXELTEXTURE:"IfcPixelTexture",IFCPHYSICALCOMPLEXQUANTITY:"IfcPhysicalComplexQuantity",IFCPATH:"IfcPath",IFCPARAMETERIZEDPROFILEDEF:"IfcParameterizedProfileDef",IFCORIENTEDEDGE:"IfcOrientedEdge",IFCOPENSHELL:"IfcOpenShell",IFCONEDIRECTIONREPEATFACTOR:"IfcOneDirectionRepeatFactor",IFCOBJECTDEFINITION:"IfcObjectDefinition",IFCMECHANICALCONCRETEMATERIALPROPERTIES:"IfcMechanicalConcreteMaterialProperties",IFCMATERIALDEFINITIONREPRESENTATION:"IfcMaterialDefinitionRepresentation",IFCMAPPEDITEM:"IfcMappedItem",IFCLOOP:"IfcLoop",IFCLOCALPLACEMENT:"IfcLocalPlacement",IFCLIGHTSOURCESPOT:"IfcLightSourceSpot",IFCLIGHTSOURCEPOSITIONAL:"IfcLightSourcePositional",IFCLIGHTSOURCEGONIOMETRIC:"IfcLightSourceGoniometric",IFCLIGHTSOURCEDIRECTIONAL:"IfcLightSourceDirectional",IFCLIGHTSOURCEAMBIENT:"IfcLightSourceAmbient",IFCLIGHTSOURCE:"IfcLightSource",IFCIRREGULARTIMESERIES:"IfcIrregularTimeSeries",IFCIMAGETEXTURE:"IfcImageTexture",IFCHYGROSCOPICMATERIALPROPERTIES:"IfcHygroscopicMaterialProperties",IFCHALFSPACESOLID:"IfcHalfSpaceSolid",IFCGRIDPLACEMENT:"IfcGridPlacement",IFCGEOMETRICSET:"IfcGeometricSet",IFCGEOMETRICREPRESENTATIONSUBCONTEXT:"IfcGeometricRepresentationSubContext",IFCGEOMETRICREPRESENTATIONITEM:"IfcGeometricRepresentationItem",IFCGEOMETRICREPRESENTATIONCONTEXT:"IfcGeometricRepresentationContext",IFCGENERALPROFILEPROPERTIES:"IfcGeneralProfileProperties",IFCGENERALMATERIALPROPERTIES:"IfcGeneralMaterialProperties",IFCFUELPROPERTIES:"IfcFuelProperties",IFCFILLAREASTYLE:"IfcFillAreaStyle",IFCFAILURECONNECTIONCONDITION:"IfcFailureConnectionCondition",IFCFACESURFACE:"IfcFaceSurface",IFCFACEOUTERBOUND:"IfcFaceOuterBound",IFCFACEBOUND:"IfcFaceBound",IFCFACE:"IfcFace",IFCEXTENDEDMATERIALPROPERTIES:"IfcExtendedMaterialProperties",IFCEDGECURVE:"IfcEdgeCurve",IFCEDGE:"IfcEdge",IFCDRAUGHTINGPREDEFINEDTEXTFONT:"IfcDraughtingPredefinedTextFont",IFCDOCUMENTREFERENCE:"IfcDocumentReference",IFCDIMENSIONPAIR:"IfcDimensionPair",IFCDIMENSIONCALLOUTRELATIONSHIP:"IfcDimensionCalloutRelationship",IFCDERIVEDPROFILEDEF:"IfcDerivedProfileDef",IFCCURVESTYLE:"IfcCurveStyle",IFCCONVERSIONBASEDUNIT:"IfcConversionBasedUnit",IFCCONTEXTDEPENDENTUNIT:"IfcContextDependentUnit",IFCCONNECTIONPOINTECCENTRICITY:"IfcConnectionPointEccentricity",IFCCONNECTIONCURVEGEOMETRY:"IfcConnectionCurveGeometry",IFCCONNECTEDFACESET:"IfcConnectedFaceSet",IFCCOMPOSITEPROFILEDEF:"IfcCompositeProfileDef",IFCCOMPLEXPROPERTY:"IfcComplexProperty",IFCCOLOURRGB:"IfcColourRgb",IFCCLASSIFICATIONREFERENCE:"IfcClassificationReference",IFCCENTERLINEPROFILEDEF:"IfcCenterLineProfileDef",IFCBLOBTEXTURE:"IfcBlobTexture",IFCARBITRARYPROFILEDEFWITHVOIDS:"IfcArbitraryProfileDefWithVoids",IFCARBITRARYOPENPROFILEDEF:"IfcArbitraryOpenProfileDef",IFCARBITRARYCLOSEDPROFILEDEF:"IfcArbitraryClosedProfileDef",IFCANNOTATIONTEXTOCCURRENCE:"IfcAnnotationTextOccurrence",IFCANNOTATIONSYMBOLOCCURRENCE:"IfcAnnotationSymbolOccurrence",IFCANNOTATIONSURFACEOCCURRENCE:"IfcAnnotationSurfaceOccurrence",IFCANNOTATIONOCCURRENCE:"IfcAnnotationOccurrence",IFCWATERPROPERTIES:"IfcWaterProperties",IFCVIRTUALGRIDINTERSECTION:"IfcVirtualGridIntersection",IFCVERTEXPOINT:"IfcVertexPoint",IFCVERTEXBASEDTEXTUREMAP:"IfcVertexBasedTextureMap",IFCVERTEX:"IfcVertex",IFCUNITASSIGNMENT:"IfcUnitAssignment",IFCTOPOLOGYREPRESENTATION:"IfcTopologyRepresentation",IFCTOPOLOGICALREPRESENTATIONITEM:"IfcTopologicalRepresentationItem",IFCTIMESERIESVALUE:"IfcTimeSeriesValue",IFCTIMESERIESREFERENCERELATIONSHIP:"IfcTimeSeriesReferenceRelationship",IFCTIMESERIES:"IfcTimeSeries",IFCTHERMALMATERIALPROPERTIES:"IfcThermalMaterialProperties",IFCTEXTUREVERTEX:"IfcTextureVertex",IFCTEXTUREMAP:"IfcTextureMap",IFCTEXTURECOORDINATEGENERATOR:"IfcTextureCoordinateGenerator",IFCTEXTURECOORDINATE:"IfcTextureCoordinate",IFCTEXTSTYLEWITHBOXCHARACTERISTICS:"IfcTextStyleWithBoxCharacteristics",IFCTEXTSTYLETEXTMODEL:"IfcTextStyleTextModel",IFCTEXTSTYLEFORDEFINEDFONT:"IfcTextStyleForDefinedFont",IFCTEXTSTYLEFONTMODEL:"IfcTextStyleFontModel",IFCTEXTSTYLE:"IfcTextStyle",IFCTELECOMADDRESS:"IfcTelecomAddress",IFCTABLEROW:"IfcTableRow",IFCTABLE:"IfcTable",IFCSYMBOLSTYLE:"IfcSymbolStyle",IFCSURFACETEXTURE:"IfcSurfaceTexture",IFCSURFACESTYLEWITHTEXTURES:"IfcSurfaceStyleWithTextures",IFCSURFACESTYLESHADING:"IfcSurfaceStyleShading",IFCSURFACESTYLEREFRACTION:"IfcSurfaceStyleRefraction",IFCSURFACESTYLELIGHTING:"IfcSurfaceStyleLighting",IFCSURFACESTYLE:"IfcSurfaceStyle",IFCSTYLEDREPRESENTATION:"IfcStyledRepresentation",IFCSTYLEDITEM:"IfcStyledItem",IFCSTYLEMODEL:"IfcStyleModel",IFCSTRUCTURALLOADTEMPERATURE:"IfcStructuralLoadTemperature",IFCSTRUCTURALLOADSTATIC:"IfcStructuralLoadStatic",IFCSTRUCTURALLOAD:"IfcStructuralLoad",IFCSTRUCTURALCONNECTIONCONDITION:"IfcStructuralConnectionCondition",IFCSIMPLEPROPERTY:"IfcSimpleProperty",IFCSHAPEREPRESENTATION:"IfcShapeRepresentation",IFCSHAPEMODEL:"IfcShapeModel",IFCSHAPEASPECT:"IfcShapeAspect",IFCSECTIONREINFORCEMENTPROPERTIES:"IfcSectionReinforcementProperties",IFCSECTIONPROPERTIES:"IfcSectionProperties",IFCSIUNIT:"IfcSIUnit",IFCROOT:"IfcRoot",IFCRIBPLATEPROFILEPROPERTIES:"IfcRibPlateProfileProperties",IFCREPRESENTATIONMAP:"IfcRepresentationMap",IFCREPRESENTATIONITEM:"IfcRepresentationItem",IFCREPRESENTATIONCONTEXT:"IfcRepresentationContext",IFCREPRESENTATION:"IfcRepresentation",IFCRELAXATION:"IfcRelaxation",IFCREINFORCEMENTBARPROPERTIES:"IfcReinforcementBarProperties",IFCREFERENCESVALUEDOCUMENT:"IfcReferencesValueDocument",IFCQUANTITYWEIGHT:"IfcQuantityWeight",IFCQUANTITYVOLUME:"IfcQuantityVolume",IFCQUANTITYTIME:"IfcQuantityTime",IFCQUANTITYLENGTH:"IfcQuantityLength",IFCQUANTITYCOUNT:"IfcQuantityCount",IFCQUANTITYAREA:"IfcQuantityArea",IFCPROPERTYENUMERATION:"IfcPropertyEnumeration",IFCPROPERTYDEPENDENCYRELATIONSHIP:"IfcPropertyDependencyRelationship",IFCPROPERTYCONSTRAINTRELATIONSHIP:"IfcPropertyConstraintRelationship",IFCPROPERTY:"IfcProperty",IFCPROFILEPROPERTIES:"IfcProfileProperties",IFCPROFILEDEF:"IfcProfileDef",IFCPRODUCTSOFCOMBUSTIONPROPERTIES:"IfcProductsOfCombustionProperties",IFCPRODUCTREPRESENTATION:"IfcProductRepresentation",IFCPRESENTATIONSTYLEASSIGNMENT:"IfcPresentationStyleAssignment",IFCPRESENTATIONSTYLE:"IfcPresentationStyle",IFCPRESENTATIONLAYERWITHSTYLE:"IfcPresentationLayerWithStyle",IFCPRESENTATIONLAYERASSIGNMENT:"IfcPresentationLayerAssignment",IFCPREDEFINEDTEXTFONT:"IfcPredefinedTextFont",IFCPREDEFINEDTERMINATORSYMBOL:"IfcPredefinedTerminatorSymbol",IFCPREDEFINEDSYMBOL:"IfcPredefinedSymbol",IFCPREDEFINEDITEM:"IfcPredefinedItem",IFCPOSTALADDRESS:"IfcPostalAddress",IFCPHYSICALSIMPLEQUANTITY:"IfcPhysicalSimpleQuantity",IFCPHYSICALQUANTITY:"IfcPhysicalQuantity",IFCPERSONANDORGANIZATION:"IfcPersonAndOrganization",IFCPERSON:"IfcPerson",IFCOWNERHISTORY:"IfcOwnerHistory",IFCORGANIZATIONRELATIONSHIP:"IfcOrganizationRelationship",IFCORGANIZATION:"IfcOrganization",IFCOPTICALMATERIALPROPERTIES:"IfcOpticalMaterialProperties",IFCOBJECTIVE:"IfcObjective",IFCOBJECTPLACEMENT:"IfcObjectPlacement",IFCNAMEDUNIT:"IfcNamedUnit",IFCMONETARYUNIT:"IfcMonetaryUnit",IFCMETRIC:"IfcMetric",IFCMECHANICALSTEELMATERIALPROPERTIES:"IfcMechanicalSteelMaterialProperties",IFCMECHANICALMATERIALPROPERTIES:"IfcMechanicalMaterialProperties",IFCMEASUREWITHUNIT:"IfcMeasureWithUnit",IFCMATERIALPROPERTIES:"IfcMaterialProperties",IFCMATERIALLIST:"IfcMaterialList",IFCMATERIALLAYERSETUSAGE:"IfcMaterialLayerSetUsage",IFCMATERIALLAYERSET:"IfcMaterialLayerSet",IFCMATERIALLAYER:"IfcMaterialLayer",IFCMATERIALCLASSIFICATIONRELATIONSHIP:"IfcMaterialClassificationRelationship",IFCMATERIAL:"IfcMaterial",IFCLOCALTIME:"IfcLocalTime",IFCLIGHTINTENSITYDISTRIBUTION:"IfcLightIntensityDistribution",IFCLIGHTDISTRIBUTIONDATA:"IfcLightDistributionData",IFCLIBRARYREFERENCE:"IfcLibraryReference",IFCLIBRARYINFORMATION:"IfcLibraryInformation",IFCIRREGULARTIMESERIESVALUE:"IfcIrregularTimeSeriesValue",IFCGRIDAXIS:"IfcGridAxis",IFCEXTERNALLYDEFINEDTEXTFONT:"IfcExternallyDefinedTextFont",IFCEXTERNALLYDEFINEDSYMBOL:"IfcExternallyDefinedSymbol",IFCEXTERNALLYDEFINEDSURFACESTYLE:"IfcExternallyDefinedSurfaceStyle",IFCEXTERNALLYDEFINEDHATCHSTYLE:"IfcExternallyDefinedHatchStyle",IFCEXTERNALREFERENCE:"IfcExternalReference",IFCENVIRONMENTALIMPACTVALUE:"IfcEnvironmentalImpactValue",IFCDRAUGHTINGCALLOUTRELATIONSHIP:"IfcDraughtingCalloutRelationship",IFCDOCUMENTINFORMATIONRELATIONSHIP:"IfcDocumentInformationRelationship",IFCDOCUMENTINFORMATION:"IfcDocumentInformation",IFCDOCUMENTELECTRONICFORMAT:"IfcDocumentElectronicFormat",IFCDIMENSIONALEXPONENTS:"IfcDimensionalExponents",IFCDERIVEDUNITELEMENT:"IfcDerivedUnitElement",IFCDERIVEDUNIT:"IfcDerivedUnit",IFCDATEANDTIME:"IfcDateAndTime",IFCCURVESTYLEFONTPATTERN:"IfcCurveStyleFontPattern",IFCCURVESTYLEFONTANDSCALING:"IfcCurveStyleFontAndScaling",IFCCURVESTYLEFONT:"IfcCurveStyleFont",IFCCURRENCYRELATIONSHIP:"IfcCurrencyRelationship",IFCCOSTVALUE:"IfcCostValue",IFCCOORDINATEDUNIVERSALTIMEOFFSET:"IfcCoordinatedUniversalTimeOffset",IFCCONSTRAINTRELATIONSHIP:"IfcConstraintRelationship",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP:"IfcConstraintClassificationRelationship",IFCCONSTRAINTAGGREGATIONRELATIONSHIP:"IfcConstraintAggregationRelationship",IFCCONSTRAINT:"IfcConstraint",IFCCONNECTIONSURFACEGEOMETRY:"IfcConnectionSurfaceGeometry",IFCCONNECTIONPORTGEOMETRY:"IfcConnectionPortGeometry",IFCCONNECTIONPOINTGEOMETRY:"IfcConnectionPointGeometry",IFCCONNECTIONGEOMETRY:"IfcConnectionGeometry",IFCCOLOURSPECIFICATION:"IfcColourSpecification",IFCCLASSIFICATIONNOTATIONFACET:"IfcClassificationNotationFacet",IFCCLASSIFICATIONNOTATION:"IfcClassificationNotation",IFCCLASSIFICATIONITEMRELATIONSHIP:"IfcClassificationItemRelationship",IFCCLASSIFICATIONITEM:"IfcClassificationItem",IFCCLASSIFICATION:"IfcClassification",IFCCALENDARDATE:"IfcCalendarDate",IFCBOUNDARYNODECONDITIONWARPING:"IfcBoundaryNodeConditionWarping",IFCBOUNDARYNODECONDITION:"IfcBoundaryNodeCondition",IFCBOUNDARYFACECONDITION:"IfcBoundaryFaceCondition",IFCBOUNDARYEDGECONDITION:"IfcBoundaryEdgeCondition",IFCBOUNDARYCONDITION:"IfcBoundaryCondition",IFCAPPROVALRELATIONSHIP:"IfcApprovalRelationship",IFCAPPROVALPROPERTYRELATIONSHIP:"IfcApprovalPropertyRelationship",IFCAPPROVALACTORRELATIONSHIP:"IfcApprovalActorRelationship",IFCAPPROVAL:"IfcApproval",IFCAPPLIEDVALUERELATIONSHIP:"IfcAppliedValueRelationship",IFCAPPLIEDVALUE:"IfcAppliedValue",IFCAPPLICATION:"IfcApplication",IFCADDRESS:"IfcAddress",IFCACTORROLE:"IfcActorRole"};class Fu{constructor(){T(this,"factor",1),T(this,"complement",1)}apply(e){const t=this.getScaleMatrix().multiply(e);e.copy(t)}setUp(e){var t,i,s;this.factor=1;const n=this.getLengthUnits(e);if(!n)return;const r=n==null,o=n.Name===void 0||n.Name===null;r||o||(n.Name.value==="FOOT"&&(this.factor=.3048),((t=n.Prefix)==null?void 0:t.value)==="MILLI"?this.complement=.001:((i=n.Prefix)==null?void 0:i.value)==="CENTI"?this.complement=.01:((s=n.Prefix)==null?void 0:s.value)==="DECI"&&(this.complement=.01))}getLengthUnits(e){try{const t=e.GetLineIDsWithType(0,gh).get(0),i=e.GetLine(0,t);for(const s of i.Units){if(!s||s.value===null||s.value===void 0)continue;const n=e.GetLine(0,s.value);if(n.UnitType&&n.UnitType.value==="LENGTHUNIT")return n}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const e=this.factor;return new ne().fromArray([e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1])}}class cl{constructor(){T(this,"itemsByFloor",{}),T(this,"_units",new Fu)}setUp(e){this._units.setUp(e),this.cleanUp();try{const t=e.GetLineIDsWithType(0,Ln),i=new Set,s=e.GetLineIDsWithType(0,Ti);for(let l=0;l0&&!r.has(n)||this.settings.excludedCategories.has(n))continue;const o=this.webIfc.GetLineIDsWithType(0,n),a=o.size();for(let l=0;l{this.getMesh(n,t)});for(const n of this._visitedFragments){const{index:r,fragment:o}=n[1];t.keyFragments.set(r,o.id)}for(const n of t.items){const r=this._fragmentInstances.get(n.id);if(!r)throw new Error("Fragment not found!");const o=[];for(const[a,l]of r)o.push(l);n.add(o)}const s=this.webIfc.GetCoordinationMatrix(0);return t.coordinationMatrix.fromArray(s),t.civilData=this._civil.read(this.webIfc),t}getMesh(e,t){const i=e.geometries.size(),s=e.expressID;for(let n=0;nr.value!==i),await e.setProperties(i,null),this.registerChange(e,t,i))}addElementToPset(e,t,...i){this.components.get(it).addEntitiesRelation(e,t,{type:Os,inv:"DefinesOcurrence"},...i)}async addPropToPset(e,t,...i){const s=await e.getProperties(t);if(s){for(const n of i){if(s.HasProperties.includes(n))continue;const r=new Qt(n);s.HasProperties.push(r),this.onPropToPset.trigger({model:e,psetID:t,propID:n})}this.registerChange(e,t)}}async createIfcRel(e,t,i,s){const n=Pu[t];if(!n)throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const r=ci.getIFCSchema(e),o=Nu[n],a=yt[r][n];if(!(o&&a))throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const l=[new yt[r].IfcGloballyUniqueId(Ht.create())],{related:h,relating:d}=o,u=[...new Set(s)].map(p=>new Qt(p)),f=(p,E)=>{for(let I=p;IparseInt(r,10)),s=t[i[0]],n=new Qt(s.expressID);return{entity:s,handle:n}}registerChange(e,...t){this.changeMap[e.uuid]||(this.changeMap[e.uuid]=new Set);for(const i of t)this.changeMap[e.uuid].add(i),this.onDataChanged.trigger({model:e,expressID:i})}async newSingleProperty(e,t,i,s){const n=ci.getIFCSchema(e),r=new yt[n].IfcIdentifier(i),o=new yt[n][t](s),a=new yt[n].IfcPropertySingleValue(r,null,o,null);return a.expressID=this.getNewExpressID(e),await this.setData(e,a),a}};T(El,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let bu=El;const gl=class Or extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"onRelationsIndexed",new Y),T(this,"relationMaps",{}),T(this,"enabled",!0),T(this,"_relToAttributesMap",ha),T(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements","HasControlElements","AssignedToFlowElement","ConnectedTo","ConnectedFrom","ReferencedBy","Declares","HasContext","Controls","IsNestedBy","Nests","DocumentRefForObjects"]),T(this,"_ifcRels",[Mn,Wr,Xr,Zr,Os,jr,Qr,Ln,Kr,qr,Jr,$r,eo,to,io]),T(this,"onFragmentsDisposed",t=>{delete this.relationMaps[t.groupID]}),T(this,"_changeMap",{}),T(this,"onEntitiesRelated",new Y),this.components.add(Or.uuid,this),e.get(ue).onFragmentsDisposed.add(this.onFragmentsDisposed)}indexRelations(e,t,i,s){const n=Object.keys(t).find(h=>h.startsWith("Relating")),r=Object.keys(t).find(h=>h.startsWith("Related"));if(!(n&&r))return;const o=t[n].value,a=t[r].map(h=>h.value),l=this.getEntityRelations(e,o,s);for(const h of a)l.push(h);for(const h of a)this.getEntityRelations(e,h,i).push(o)}getAttributeIndex(e){const t=this._inverseAttributes.indexOf(e);if(t===-1)throw new Error(`IfcRelationsIndexer: ${e} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`);return t}setRelationMap(e,t){this.relationMaps[e.uuid]=t,this.onRelationsIndexed.trigger({modelID:e.uuid,relationsMap:t})}async process(e,t){if(!e.hasProperties)throw new Error("FragmentsGroup properties not found");let i=this.relationMaps[e.uuid];i||(i=new Map,this.relationMaps[e.uuid]=i);const s=e.getLocalProperties();if(!s)return i;const n=(t==null?void 0:t.relationsToProcess)??this._ifcRels;for(const[r,o]of Object.entries(s)){if(!n.includes(o.type))continue;const a=this._relToAttributesMap.get(o.type);if(!a)continue;const{forRelated:l,forRelating:h}=a;this.indexRelations(i,o,l,h)}return this.setRelationMap(e,i),i}async processFromWebIfc(e,t){const i=new Map;for(const s of this._ifcRels){const n=this._relToAttributesMap.get(s);if(!n)continue;const{forRelated:r,forRelating:o}=n,a=e.GetLineIDsWithType(t,s);for(let l=0;lE.startsWith("Related")),p=f.find(E=>E.startsWith("Relating"));if(!(m&&p))continue;u[m]=[...h].map(E=>new Qt(E)),u[p]=new Qt(a),await t.setData(s,u)}else{const u=await t.createIfcRel(s,r,a,[...h]);if(!u)continue;l.relID=u.expressID}}}}addEntitiesRelation(e,t,i,...s){const{type:n,inv:r}=i;let o=this.relationMaps[e.uuid];if(o||(o=new Map,this.relationMaps[e.uuid]=o),!this._ifcRels.includes(n))return;const a=ha.get(n);if(!a)return;const{forRelated:l,forRelating:h}=a;if(!(l===r||h===r))return;let d=this._changeMap[e.uuid];d||(d=new gt,this._changeMap[e.uuid]=d);const u=h===r?[t]:s,f=l===r?[t]:s;let m=d.get(n);m||(m=new gt,m.onItemSet.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:u,relatedIDs:f})),m.onItemUpdated.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:u,relatedIDs:f})),d.set(n,m));for(const p of u){let E=m.get(p);E||(E={related:new Jt},m.set(p,E)),E.related.add(...f)}for(const p of u)this.getEntityRelations(e,p,h).push(...f);for(const p of f)this.getEntityRelations(e,p,l).push(...u)}getEntityChildren(e,t,i=new Set){if(i.add(t),this.relationMaps[e.uuid]===void 0)throw new Error("The provided model has no indices. You have to generate them first.");const s=this.getEntityRelations(e,t,"IsDecomposedBy");if(s)for(const r of s)this.getEntityChildren(e,r,i);const n=this.getEntityRelations(e,t,"ContainsElements");if(n)for(const r of n)this.getEntityChildren(e,r,i);return i}};T(gl,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let it=gl;const Cl=class Tl extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"onFragmentsLoaded",new Y),T(this,"onFragmentsDisposed",new Y),T(this,"list",new gt),T(this,"groups",new gt),T(this,"baseCoordinationModel",""),T(this,"baseCoordinationMatrix",new ne),T(this,"enabled",!0),T(this,"_loader",new Da),this.components.add(Tl.uuid,this)}get meshes(){const e=[];for(const[t,i]of this.list)e.push(i.mesh);return e}dispose(){for(const[e,t]of this.groups)t.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(e){const{uuid:t}=e,i=[];for(const s of e.items)i.push(s.id),this.list.delete(s.id);e.dispose(!0),this.groups.delete(e.uuid),this.groups.size===0&&(this.baseCoordinationModel="",this.baseCoordinationMatrix=new ne),this.onFragmentsDisposed.trigger({groupID:t,fragmentIDs:i})}load(e,t){const i={coordinate:!0,...t},{coordinate:s,name:n,properties:r,relationsMap:o}=i,a=this._loader.import(e);t&&(a.isStreamed=t.isStreamed||!1),n&&(a.name=n);for(const l of a.items)l.group=a,this.list.set(l.id,l);return s&&this.coordinate([a]),this.groups.set(a.uuid,a),r&&a.setLocalProperties(r),o&&this.components.get(it).setRelationMap(a,o),this.onFragmentsLoaded.trigger(a),a}export(e){return this._loader.export(e)}getModelIdMap(e){const t={};for(const i in e){const s=this.list.get(i);if(!(s&&s.group))continue;const n=s.group;n.uuid in t||(t[n.uuid]=new Set);const r=e[i];for(const o of r)t[n.uuid].add(o)}return t}modelIdToFragmentIdMap(e){let t={};for(const i in e){const s=this.groups.get(i);if(!s)continue;const n=e[i],r=s.getFragmentMap(n);t={...t,...r}}return t}guidToFragmentIdMap(e){const t={};for(const[i,s]of this.groups){i in t||(t[i]=new Set);for(const n of e){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return this.modelIdToFragmentIdMap(t)}fragmentIdMapToGuids(e){const t=[],i=this.getModelIdMap(e);for(const s in i){const n=this.groups.get(s);if(!n)continue;const r=i[s];for(const o of r)for(const[a,l]of n.globalToExpressIDs.entries())if(l===o){t.push(a);break}}return t}coordinate(e=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const t=e.pop();if(!t)return;this.baseCoordinationModel=t.uuid,this.baseCoordinationMatrix=t.coordinationMatrix.clone()}if(e.length)for(const t of e)t.coordinationMatrix.equals(this.baseCoordinationMatrix)||(t.position.set(0,0,0),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.updateMatrix(),this.applyBaseCoordinateSystem(t,t.coordinationMatrix))}applyBaseCoordinateSystem(e,t){t&&e.applyMatrix4(t.clone().invert()),e.applyMatrix4(this.baseCoordinationMatrix)}clone(e,t){const i=e.cloneGroup(t);this.groups.set(i.uuid,i);for(const s of i.items)this.list.set(s.id,s);return i}};T(Cl,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let ue=Cl;var nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xu(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}function rn(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Rl={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -95,14 +95,11 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(l,e){(function(t){l.exports=t()})(function(){return function t(i,s,n){function r(h,c){if(!s[h]){if(!i[h]){var u=typeof pn=="function"&&pn;if(!c&&u)return u(h,!0);if(o)return o(h,!0);var d=new Error("Cannot find module '"+h+"'");throw d.code="MODULE_NOT_FOUND",d}var f=s[h]={exports:{}};i[h][0].call(f.exports,function(m){var p=i[h][1][m];return r(p||m)},f,f.exports,t,i,s,n)}return s[h].exports}for(var o=typeof pn=="function"&&pn,a=0;a>2,f=(3&h)<<4|c>>4,m=1>6:64,p=2>4,c=(15&d)<<4|(f=o.indexOf(a.charAt(p++)))>>2,u=(3&f)<<6|(m=o.indexOf(a.charAt(p++))),C[I++]=h,f!==64&&(C[I++]=c),m!==64&&(C[I++]=u);return C}},{"./support":30,"./utils":32}],2:[function(t,i,s){var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function h(c,u,d,f,m){this.compressedSize=c,this.uncompressedSize=u,this.crc32=d,this.compression=f,this.compressedContent=m}h.prototype={getContentWorker:function(){var c=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),u=this;return c.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),c},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(c,u,d){return c.pipe(new o).pipe(new a("uncompressedSize")).pipe(u.compressWorker(d)).pipe(new a("compressedSize")).withStreamInfo("compression",u)},i.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,s){var n=t("./utils"),r=function(){for(var o,a=[],h=0;h<256;h++){o=h;for(var c=0;c<8;c++)o=1&o?3988292384^o>>>1:o>>>1;a[h]=o}return a}();i.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(h,c,u,d){var f=r,m=d+u;h^=-1;for(var p=d;p>>8^f[255&(h^c[p])];return-1^h}(0|a,o,o.length,0):function(h,c,u,d){var f=r,m=d+u;h^=-1;for(var p=d;p>>8^f[255&(h^c.charCodeAt(p))];return-1^h}(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(t,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,i,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:n}},{lie:37}],7:[function(t,i,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),h=n?"uint8array":"array";function c(u,d){a.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=d,this.meta={}}s.magic="\b\0",o.inherits(c,a),c.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(h,u.data),!1)},c.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(d){u.push({data:d,meta:u.meta})}},s.compressWorker=function(u){return new c("Deflate",u)},s.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,s){function n(f,m){var p,I="";for(p=0;p>>=8;return I}function r(f,m,p,I,E,C){var v,g,S=f.file,O=f.compression,A=C!==h.utf8encode,b=o.transformTo("string",C(S.name)),N=o.transformTo("string",h.utf8encode(S.name)),M=S.comment,_=o.transformTo("string",C(M)),F=o.transformTo("string",h.utf8encode(M)),D=N.length!==S.name.length,R=F.length!==M.length,B="",k="",U="",K=S.dir,V=S.date,re={crc32:0,compressedSize:0,uncompressedSize:0};m&&!p||(re.crc32=f.crc32,re.compressedSize=f.compressedSize,re.uncompressedSize=f.uncompressedSize);var W=0;m&&(W|=8),A||!D&&!R||(W|=2048);var G=0,oe=0;K&&(G|=16),E==="UNIX"?(oe=798,G|=function(te,Ae){var Le=te;return te||(Le=Ae?16893:33204),(65535&Le)<<16}(S.unixPermissions,K)):(oe=20,G|=function(te){return 63&(te||0)}(S.dosPermissions)),v=V.getUTCHours(),v<<=6,v|=V.getUTCMinutes(),v<<=5,v|=V.getUTCSeconds()/2,g=V.getUTCFullYear()-1980,g<<=4,g|=V.getUTCMonth()+1,g<<=5,g|=V.getUTCDate(),D&&(k=n(1,1)+n(c(b),4)+N,B+="up"+n(k.length,2)+k),R&&(U=n(1,1)+n(c(_),4)+F,B+="uc"+n(U.length,2)+U);var ie="";return ie+=` -\0`,ie+=n(W,2),ie+=O.magic,ie+=n(v,2),ie+=n(g,2),ie+=n(re.crc32,4),ie+=n(re.compressedSize,4),ie+=n(re.uncompressedSize,4),ie+=n(b.length,2),ie+=n(B.length,2),{fileRecord:u.LOCAL_FILE_HEADER+ie+b+B,dirRecord:u.CENTRAL_FILE_HEADER+n(oe,2)+ie+n(_.length,2)+"\0\0\0\0"+n(G,4)+n(I,4)+b+B+_}}var o=t("../utils"),a=t("../stream/GenericWorker"),h=t("../utf8"),c=t("../crc32"),u=t("../signature");function d(f,m,p,I){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=p,this.encodeFileName=I,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(d,a),d.prototype.push=function(f){var m=f.meta.percent||0,p=this.entriesCount,I=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,a.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:p?(m+100*(p-I-1))/p:100}}))},d.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var m=this.streamFiles&&!f.file.dir;if(m){var p=r(f,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(f){this.accumulate=!1;var m=this.streamFiles&&!f.file.dir,p=r(f,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),m)this.push({data:function(I){return u.DATA_DESCRIPTOR+n(I.crc32,4)+n(I.compressedSize,4)+n(I.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var f=this.bytesWritten,m=0;m=this.index;a--)h=(h<<8)+this.byteAt(a);return this.index+=o,h},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=r},{"../utils":32}],19:[function(t,i,s){var n=t("./Uint8ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,s){var n=t("./DataReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,i,s){var n=t("./ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,s){var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),h=t("./NodeBufferReader"),c=t("./Uint8ArrayReader");i.exports=function(u){var d=n.getTypeOf(u);return n.checkSupport(d),d!=="string"||r.uint8array?d==="nodebuffer"?new h(u):r.uint8array?new c(n.transformTo("uint8array",u)):new o(n.transformTo("array",u)):new a(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,s){var n=t("./GenericWorker"),r=t("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,s){var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+a.data.length}r.prototype.processChunk.call(this,a)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(c){h.dataIsReady=!0,h.data=c,h.max=c&&c.length||0,h.type=n.getTypeOf(c),h.isPaused||h._tickAndRepeat()},function(c){h.error(c)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,h);break;case"uint8array":a=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":a=this.data.slice(this.index,h)}return this.index=h,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,s){function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},i.exports=n},{}],29:[function(t,i,s){var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),h=t("../support"),c=t("../external"),u=null;if(h.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(m,p){return new c.Promise(function(I,E){var C=[],v=m._internalType,g=m._outputType,S=m._mimeType;m.on("data",function(O,A){C.push(O),p&&p(A)}).on("error",function(O){C=[],E(O)}).on("end",function(){try{var O=function(A,b,N){switch(A){case"blob":return n.newBlob(n.transformTo("arraybuffer",b),N);case"base64":return a.encode(b);default:return n.transformTo(A,b)}}(g,function(A,b){var N,M=0,_=null,F=0;for(N=0;N"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),s.blob=r.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,s){for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),a=t("./stream/GenericWorker"),h=new Array(256),c=0;c<256;c++)h[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;h[254]=h[254]=1;function u(){a.call(this,"utf-8 decode"),this.leftOver=null}function d(){a.call(this,"utf-8 encode")}s.utf8encode=function(f){return r.nodebuffer?o.newBufferFrom(f,"utf-8"):function(m){var p,I,E,C,v,g=m.length,S=0;for(C=0;C>>6:(I<65536?p[v++]=224|I>>>12:(p[v++]=240|I>>>18,p[v++]=128|I>>>12&63),p[v++]=128|I>>>6&63),p[v++]=128|63&I);return p}(f)},s.utf8decode=function(f){return r.nodebuffer?n.transformTo("nodebuffer",f).toString("utf-8"):function(m){var p,I,E,C,v=m.length,g=new Array(2*v);for(p=I=0;p>10&1023,g[I++]=56320|1023&E)}return g.length!==I&&(g.subarray?g=g.subarray(0,I):g.length=I),n.applyFromCharCode(g)}(f=n.transformTo(r.uint8array?"uint8array":"array",f))},n.inherits(u,a),u.prototype.processChunk=function(f){var m=n.transformTo(r.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var p=m;(m=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),m.set(p,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var I=function(C,v){var g;for((v=v||C.length)>C.length&&(v=C.length),g=v-1;0<=g&&(192&C[g])==128;)g--;return g<0||g===0?v:g+h[C[g]]>v?g:v}(m),E=m;I!==m.length&&(r.uint8array?(E=m.subarray(0,I),this.leftOver=m.subarray(I,m.length)):(E=m.slice(0,I),this.leftOver=m.slice(I,m.length))),this.push({data:s.utf8decode(E),meta:f.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=u,n.inherits(d,a),d.prototype.processChunk=function(f){this.push({data:s.utf8encode(f.data),meta:f.meta})},s.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,s){var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),a=t("./external");function h(p){return p}function c(p,I){for(var E=0;E>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var m,p,I,E=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?d[I++]=224|f>>>12:(d[I++]=240|f>>>18,d[I++]=128|f>>>12&63),d[I++]=128|f>>>6&63),d[I++]=128|63&f);return d},s.buf2binstring=function(u){return c(u,u.length)},s.binstring2buf=function(u){for(var d=new n.Buf8(u.length),f=0,m=d.length;f>10&1023,C[m++]=56320|1023&p)}return c(C,m)},s.utf8border=function(u,d){var f;for((d=d||u.length)>u.length&&(d=u.length),f=d-1;0<=f&&(192&u[f])==128;)f--;return f<0||f===0?d:f+a[u[f]]>d?f:d}},{"./common":41}],43:[function(t,i,s){i.exports=function(n,r,o,a){for(var h=65535&n|0,c=n>>>16&65535|0,u=0;o!==0;){for(o-=u=2e3>>1:r>>>1;o[a]=r}return o}();i.exports=function(r,o,a,h){var c=n,u=h+a;r^=-1;for(var d=h;d>>8^c[255&(r^o[d])];return-1^r}},{}],46:[function(t,i,s){var n,r=t("../utils/common"),o=t("./trees"),a=t("./adler32"),h=t("./crc32"),c=t("./messages"),u=0,d=4,f=0,m=-2,p=-1,I=4,E=2,C=8,v=9,g=286,S=30,O=19,A=2*g+1,b=15,N=3,M=258,_=M+N+1,F=42,D=113,R=1,B=2,k=3,U=4;function K(y,j){return y.msg=c[j],j}function V(y){return(y<<1)-(4y.avail_out&&(X=y.avail_out),X!==0&&(r.arraySet(y.output,j.pending_buf,j.pending_out,X,y.next_out),y.next_out+=X,j.pending_out+=X,y.total_out+=X,y.avail_out-=X,j.pending-=X,j.pending===0&&(j.pending_out=0))}function G(y,j){o._tr_flush_block(y,0<=y.block_start?y.block_start:-1,y.strstart-y.block_start,j),y.block_start=y.strstart,W(y.strm)}function oe(y,j){y.pending_buf[y.pending++]=j}function ie(y,j){y.pending_buf[y.pending++]=j>>>8&255,y.pending_buf[y.pending++]=255&j}function te(y,j){var X,x,P=y.max_chain_length,z=y.strstart,Q=y.prev_length,q=y.nice_match,Y=y.strstart>y.w_size-_?y.strstart-(y.w_size-_):0,J=y.window,se=y.w_mask,$=y.prev,le=y.strstart+M,ye=J[z+Q-1],Ie=J[z+Q];y.prev_length>=y.good_match&&(P>>=2),q>y.lookahead&&(q=y.lookahead);do if(J[(X=j)+Q]===Ie&&J[X+Q-1]===ye&&J[X]===J[z]&&J[++X]===J[z+1]){z+=2,X++;do;while(J[++z]===J[++X]&&J[++z]===J[++X]&&J[++z]===J[++X]&&J[++z]===J[++X]&&J[++z]===J[++X]&&J[++z]===J[++X]&&J[++z]===J[++X]&&J[++z]===J[++X]&&zY&&--P!=0);return Q<=y.lookahead?Q:y.lookahead}function Ae(y){var j,X,x,P,z,Q,q,Y,J,se,$=y.w_size;do{if(P=y.window_size-y.lookahead-y.strstart,y.strstart>=$+($-_)){for(r.arraySet(y.window,y.window,$,$,0),y.match_start-=$,y.strstart-=$,y.block_start-=$,j=X=y.hash_size;x=y.head[--j],y.head[j]=$<=x?x-$:0,--X;);for(j=X=$;x=y.prev[--j],y.prev[j]=$<=x?x-$:0,--X;);P+=$}if(y.strm.avail_in===0)break;if(Q=y.strm,q=y.window,Y=y.strstart+y.lookahead,J=P,se=void 0,se=Q.avail_in,J=N)for(z=y.strstart-y.insert,y.ins_h=y.window[z],y.ins_h=(y.ins_h<=N&&(y.ins_h=(y.ins_h<=N)if(x=o._tr_tally(y,y.strstart-y.match_start,y.match_length-N),y.lookahead-=y.match_length,y.match_length<=y.max_lazy_match&&y.lookahead>=N){for(y.match_length--;y.strstart++,y.ins_h=(y.ins_h<=N&&(y.ins_h=(y.ins_h<=N&&y.match_length<=y.prev_length){for(P=y.strstart+y.lookahead-N,x=o._tr_tally(y,y.strstart-1-y.prev_match,y.prev_length-N),y.lookahead-=y.prev_length-1,y.prev_length-=2;++y.strstart<=P&&(y.ins_h=(y.ins_h<y.pending_buf_size-5&&(X=y.pending_buf_size-5);;){if(y.lookahead<=1){if(Ae(y),y.lookahead===0&&j===u)return R;if(y.lookahead===0)break}y.strstart+=y.lookahead,y.lookahead=0;var x=y.block_start+X;if((y.strstart===0||y.strstart>=x)&&(y.lookahead=y.strstart-x,y.strstart=x,G(y,!1),y.strm.avail_out===0)||y.strstart-y.block_start>=y.w_size-_&&(G(y,!1),y.strm.avail_out===0))return R}return y.insert=0,j===d?(G(y,!0),y.strm.avail_out===0?k:U):(y.strstart>y.block_start&&(G(y,!1),y.strm.avail_out),R)}),new me(4,4,8,4,Le),new me(4,5,16,8,Le),new me(4,6,32,32,Le),new me(4,4,16,16,ae),new me(8,16,32,32,ae),new me(8,16,128,128,ae),new me(8,32,128,256,ae),new me(32,128,258,1024,ae),new me(32,258,258,4096,ae)],s.deflateInit=function(y,j){return Ge(y,j,C,15,8,0)},s.deflateInit2=Ge,s.deflateReset=rt,s.deflateResetKeep=Te,s.deflateSetHeader=function(y,j){return y&&y.state?y.state.wrap!==2?m:(y.state.gzhead=j,f):m},s.deflate=function(y,j){var X,x,P,z;if(!y||!y.state||5>8&255),oe(x,x.gzhead.time>>16&255),oe(x,x.gzhead.time>>24&255),oe(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),oe(x,255&x.gzhead.os),x.gzhead.extra&&x.gzhead.extra.length&&(oe(x,255&x.gzhead.extra.length),oe(x,x.gzhead.extra.length>>8&255)),x.gzhead.hcrc&&(y.adler=h(y.adler,x.pending_buf,x.pending,0)),x.gzindex=0,x.status=69):(oe(x,0),oe(x,0),oe(x,0),oe(x,0),oe(x,0),oe(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),oe(x,3),x.status=D);else{var Q=C+(x.w_bits-8<<4)<<8;Q|=(2<=x.strategy||x.level<2?0:x.level<6?1:x.level===6?2:3)<<6,x.strstart!==0&&(Q|=32),Q+=31-Q%31,x.status=D,ie(x,Q),x.strstart!==0&&(ie(x,y.adler>>>16),ie(x,65535&y.adler)),y.adler=1}if(x.status===69)if(x.gzhead.extra){for(P=x.pending;x.gzindex<(65535&x.gzhead.extra.length)&&(x.pending!==x.pending_buf_size||(x.gzhead.hcrc&&x.pending>P&&(y.adler=h(y.adler,x.pending_buf,x.pending-P,P)),W(y),P=x.pending,x.pending!==x.pending_buf_size));)oe(x,255&x.gzhead.extra[x.gzindex]),x.gzindex++;x.gzhead.hcrc&&x.pending>P&&(y.adler=h(y.adler,x.pending_buf,x.pending-P,P)),x.gzindex===x.gzhead.extra.length&&(x.gzindex=0,x.status=73)}else x.status=73;if(x.status===73)if(x.gzhead.name){P=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>P&&(y.adler=h(y.adler,x.pending_buf,x.pending-P,P)),W(y),P=x.pending,x.pending===x.pending_buf_size)){z=1;break}z=x.gzindexP&&(y.adler=h(y.adler,x.pending_buf,x.pending-P,P)),z===0&&(x.gzindex=0,x.status=91)}else x.status=91;if(x.status===91)if(x.gzhead.comment){P=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>P&&(y.adler=h(y.adler,x.pending_buf,x.pending-P,P)),W(y),P=x.pending,x.pending===x.pending_buf_size)){z=1;break}z=x.gzindexP&&(y.adler=h(y.adler,x.pending_buf,x.pending-P,P)),z===0&&(x.status=103)}else x.status=103;if(x.status===103&&(x.gzhead.hcrc?(x.pending+2>x.pending_buf_size&&W(y),x.pending+2<=x.pending_buf_size&&(oe(x,255&y.adler),oe(x,y.adler>>8&255),y.adler=0,x.status=D)):x.status=D),x.pending!==0){if(W(y),y.avail_out===0)return x.last_flush=-1,f}else if(y.avail_in===0&&V(j)<=V(X)&&j!==d)return K(y,-5);if(x.status===666&&y.avail_in!==0)return K(y,-5);if(y.avail_in!==0||x.lookahead!==0||j!==u&&x.status!==666){var q=x.strategy===2?function(Y,J){for(var se;;){if(Y.lookahead===0&&(Ae(Y),Y.lookahead===0)){if(J===u)return R;break}if(Y.match_length=0,se=o._tr_tally(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++,se&&(G(Y,!1),Y.strm.avail_out===0))return R}return Y.insert=0,J===d?(G(Y,!0),Y.strm.avail_out===0?k:U):Y.last_lit&&(G(Y,!1),Y.strm.avail_out===0)?R:B}(x,j):x.strategy===3?function(Y,J){for(var se,$,le,ye,Ie=Y.window;;){if(Y.lookahead<=M){if(Ae(Y),Y.lookahead<=M&&J===u)return R;if(Y.lookahead===0)break}if(Y.match_length=0,Y.lookahead>=N&&0Y.lookahead&&(Y.match_length=Y.lookahead)}if(Y.match_length>=N?(se=o._tr_tally(Y,1,Y.match_length-N),Y.lookahead-=Y.match_length,Y.strstart+=Y.match_length,Y.match_length=0):(se=o._tr_tally(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++),se&&(G(Y,!1),Y.strm.avail_out===0))return R}return Y.insert=0,J===d?(G(Y,!0),Y.strm.avail_out===0?k:U):Y.last_lit&&(G(Y,!1),Y.strm.avail_out===0)?R:B}(x,j):n[x.level].func(x,j);if(q!==k&&q!==U||(x.status=666),q===R||q===k)return y.avail_out===0&&(x.last_flush=-1),f;if(q===B&&(j===1?o._tr_align(x):j!==5&&(o._tr_stored_block(x,0,0,!1),j===3&&(re(x.head),x.lookahead===0&&(x.strstart=0,x.block_start=0,x.insert=0))),W(y),y.avail_out===0))return x.last_flush=-1,f}return j!==d?f:x.wrap<=0?1:(x.wrap===2?(oe(x,255&y.adler),oe(x,y.adler>>8&255),oe(x,y.adler>>16&255),oe(x,y.adler>>24&255),oe(x,255&y.total_in),oe(x,y.total_in>>8&255),oe(x,y.total_in>>16&255),oe(x,y.total_in>>24&255)):(ie(x,y.adler>>>16),ie(x,65535&y.adler)),W(y),0=X.w_size&&(z===0&&(re(X.head),X.strstart=0,X.block_start=0,X.insert=0),J=new r.Buf8(X.w_size),r.arraySet(J,j,se-X.w_size,X.w_size,0),j=J,se=X.w_size),Q=y.avail_in,q=y.next_in,Y=y.input,y.avail_in=se,y.next_in=0,y.input=j,Ae(X);X.lookahead>=N;){for(x=X.strstart,P=X.lookahead-(N-1);X.ins_h=(X.ins_h<>>=N=b>>>24,v-=N,(N=b>>>16&255)===0)B[c++]=65535&b;else{if(!(16&N)){if(!(64&N)){b=g[(65535&b)+(C&(1<>>=N,v-=N),v<15&&(C+=R[a++]<>>=N=b>>>24,v-=N,!(16&(N=b>>>16&255))){if(!(64&N)){b=S[(65535&b)+(C&(1<>>=N,v-=N,(N=c-u)<_){if(p<(N=_-N)&&o.sane){n.msg="invalid distance too far back",o.mode=30;break e}if(D=E,(F=0)===I){if(F+=m-N,N>3,C&=(1<<(v-=M<<3))-1,n.next_in=a,n.next_out=c,n.avail_in=a>>24&255)+(F>>>8&65280)+((65280&F)<<8)+((255&F)<<24)}function C(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(F){var D;return F&&F.state?(D=F.state,F.total_in=F.total_out=D.total=0,F.msg="",D.wrap&&(F.adler=1&D.wrap),D.mode=m,D.last=0,D.havedict=0,D.dmax=32768,D.head=null,D.hold=0,D.bits=0,D.lencode=D.lendyn=new n.Buf32(p),D.distcode=D.distdyn=new n.Buf32(I),D.sane=1,D.back=-1,d):f}function g(F){var D;return F&&F.state?((D=F.state).wsize=0,D.whave=0,D.wnext=0,v(F)):f}function S(F,D){var R,B;return F&&F.state?(B=F.state,D<0?(R=0,D=-D):(R=1+(D>>4),D<48&&(D&=15)),D&&(D<8||15=U.wsize?(n.arraySet(U.window,D,R-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(B<(k=U.wsize-U.wnext)&&(k=B),n.arraySet(U.window,D,R-B,k,U.wnext),(B-=k)?(n.arraySet(U.window,D,R-B,B,0),U.wnext=B,U.whave=U.wsize):(U.wnext+=k,U.wnext===U.wsize&&(U.wnext=0),U.whave>>8&255,R.check=o(R.check,z,2,0),G=W=0,R.mode=2;break}if(R.flags=0,R.head&&(R.head.done=!1),!(1&R.wrap)||(((255&W)<<8)+(W>>8))%31){F.msg="incorrect header check",R.mode=30;break}if((15&W)!=8){F.msg="unknown compression method",R.mode=30;break}if(G-=4,y=8+(15&(W>>>=4)),R.wbits===0)R.wbits=y;else if(y>R.wbits){F.msg="invalid window size",R.mode=30;break}R.dmax=1<>8&1),512&R.flags&&(z[0]=255&W,z[1]=W>>>8&255,R.check=o(R.check,z,2,0)),G=W=0,R.mode=3;case 3:for(;G<32;){if(V===0)break e;V--,W+=B[U++]<>>8&255,z[2]=W>>>16&255,z[3]=W>>>24&255,R.check=o(R.check,z,4,0)),G=W=0,R.mode=4;case 4:for(;G<16;){if(V===0)break e;V--,W+=B[U++]<>8),512&R.flags&&(z[0]=255&W,z[1]=W>>>8&255,R.check=o(R.check,z,2,0)),G=W=0,R.mode=5;case 5:if(1024&R.flags){for(;G<16;){if(V===0)break e;V--,W+=B[U++]<>>8&255,R.check=o(R.check,z,2,0)),G=W=0}else R.head&&(R.head.extra=null);R.mode=6;case 6:if(1024&R.flags&&(V<(te=R.length)&&(te=V),te&&(R.head&&(y=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),n.arraySet(R.head.extra,B,U,te,y)),512&R.flags&&(R.check=o(R.check,B,te,U)),V-=te,U+=te,R.length-=te),R.length))break e;R.length=0,R.mode=7;case 7:if(2048&R.flags){if(V===0)break e;for(te=0;y=B[U+te++],R.head&&y&&R.length<65536&&(R.head.name+=String.fromCharCode(y)),y&&te>9&1,R.head.done=!0),F.adler=R.check=0,R.mode=12;break;case 10:for(;G<32;){if(V===0)break e;V--,W+=B[U++]<>>=7&G,G-=7&G,R.mode=27;break}for(;G<3;){if(V===0)break e;V--,W+=B[U++]<>>=1)){case 0:R.mode=14;break;case 1:if(M(R),R.mode=20,D!==6)break;W>>>=2,G-=2;break e;case 2:R.mode=17;break;case 3:F.msg="invalid block type",R.mode=30}W>>>=2,G-=2;break;case 14:for(W>>>=7&G,G-=7&G;G<32;){if(V===0)break e;V--,W+=B[U++]<>>16^65535)){F.msg="invalid stored block lengths",R.mode=30;break}if(R.length=65535&W,G=W=0,R.mode=15,D===6)break e;case 15:R.mode=16;case 16:if(te=R.length){if(V>>=5,G-=5,R.ndist=1+(31&W),W>>>=5,G-=5,R.ncode=4+(15&W),W>>>=4,G-=4,286>>=3,G-=3}for(;R.have<19;)R.lens[Q[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,X={bits:R.lenbits},j=h(0,R.lens,0,19,R.lencode,0,R.work,X),R.lenbits=X.bits,j){F.msg="invalid code lengths set",R.mode=30;break}R.have=0,R.mode=19;case 19:for(;R.have>>16&255,pe=65535&P,!((ae=P>>>24)<=G);){if(V===0)break e;V--,W+=B[U++]<>>=ae,G-=ae,R.lens[R.have++]=pe;else{if(pe===16){for(x=ae+2;G>>=ae,G-=ae,R.have===0){F.msg="invalid bit length repeat",R.mode=30;break}y=R.lens[R.have-1],te=3+(3&W),W>>>=2,G-=2}else if(pe===17){for(x=ae+3;G>>=ae)),W>>>=3,G-=3}else{for(x=ae+7;G>>=ae)),W>>>=7,G-=7}if(R.have+te>R.nlen+R.ndist){F.msg="invalid bit length repeat",R.mode=30;break}for(;te--;)R.lens[R.have++]=y}}if(R.mode===30)break;if(R.lens[256]===0){F.msg="invalid code -- missing end-of-block",R.mode=30;break}if(R.lenbits=9,X={bits:R.lenbits},j=h(c,R.lens,0,R.nlen,R.lencode,0,R.work,X),R.lenbits=X.bits,j){F.msg="invalid literal/lengths set",R.mode=30;break}if(R.distbits=6,R.distcode=R.distdyn,X={bits:R.distbits},j=h(u,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,X),R.distbits=X.bits,j){F.msg="invalid distances set",R.mode=30;break}if(R.mode=20,D===6)break e;case 20:R.mode=21;case 21:if(6<=V&&258<=re){F.next_out=K,F.avail_out=re,F.next_in=U,F.avail_in=V,R.hold=W,R.bits=G,a(F,ie),K=F.next_out,k=F.output,re=F.avail_out,U=F.next_in,B=F.input,V=F.avail_in,W=R.hold,G=R.bits,R.mode===12&&(R.back=-1);break}for(R.back=0;me=(P=R.lencode[W&(1<>>16&255,pe=65535&P,!((ae=P>>>24)<=G);){if(V===0)break e;V--,W+=B[U++]<>Te)])>>>16&255,pe=65535&P,!(Te+(ae=P>>>24)<=G);){if(V===0)break e;V--,W+=B[U++]<>>=Te,G-=Te,R.back+=Te}if(W>>>=ae,G-=ae,R.back+=ae,R.length=pe,me===0){R.mode=26;break}if(32&me){R.back=-1,R.mode=12;break}if(64&me){F.msg="invalid literal/length code",R.mode=30;break}R.extra=15&me,R.mode=22;case 22:if(R.extra){for(x=R.extra;G>>=R.extra,G-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=23;case 23:for(;me=(P=R.distcode[W&(1<>>16&255,pe=65535&P,!((ae=P>>>24)<=G);){if(V===0)break e;V--,W+=B[U++]<>Te)])>>>16&255,pe=65535&P,!(Te+(ae=P>>>24)<=G);){if(V===0)break e;V--,W+=B[U++]<>>=Te,G-=Te,R.back+=Te}if(W>>>=ae,G-=ae,R.back+=ae,64&me){F.msg="invalid distance code",R.mode=30;break}R.offset=pe,R.extra=15&me,R.mode=24;case 24:if(R.extra){for(x=R.extra;G>>=R.extra,G-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){F.msg="invalid distance too far back",R.mode=30;break}R.mode=25;case 25:if(re===0)break e;if(te=ie-re,R.offset>te){if((te=R.offset-te)>R.whave&&R.sane){F.msg="invalid distance too far back",R.mode=30;break}Ae=te>R.wnext?(te-=R.wnext,R.wsize-te):R.wnext-te,te>R.length&&(te=R.length),Le=R.window}else Le=k,Ae=K-R.offset,te=R.length;for(reA?(N=Ae[Le+I[D]],G[oe+I[D]]):(N=96,0),C=1<>K)+(v-=C)]=b<<24|N<<16|M|0,v!==0;);for(C=1<>=1;if(C!==0?(W&=C-1,W+=C):W=0,D++,--ie[F]==0){if(F===B)break;F=u[d+I[D]]}if(k>>7)]}function oe(P,z){P.pending_buf[P.pending++]=255&z,P.pending_buf[P.pending++]=z>>>8&255}function ie(P,z,Q){P.bi_valid>E-Q?(P.bi_buf|=z<>E-P.bi_valid,P.bi_valid+=Q-E):(P.bi_buf|=z<>>=1,Q<<=1,0<--z;);return Q>>>1}function Le(P,z,Q){var q,Y,J=new Array(I+1),se=0;for(q=1;q<=I;q++)J[q]=se=se+Q[q-1]<<1;for(Y=0;Y<=z;Y++){var $=P[2*Y+1];$!==0&&(P[2*Y]=Ae(J[$]++,$))}}function ae(P){var z;for(z=0;z>1;1<=Q;Q--)Te(P,J,Q);for(Y=le;Q=P.heap[1],P.heap[1]=P.heap[P.heap_len--],Te(P,J,1),q=P.heap[1],P.heap[--P.heap_max]=Q,P.heap[--P.heap_max]=q,J[2*Y]=J[2*Q]+J[2*q],P.depth[Y]=(P.depth[Q]>=P.depth[q]?P.depth[Q]:P.depth[q])+1,J[2*Q+1]=J[2*q+1]=Y,P.heap[1]=Y++,Te(P,J,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],function(Ie,ot){var ts,Tt,is,xe,Bs,tr,bt=ot.dyn_tree,Uo=ot.max_code,oc=ot.stat_desc.static_tree,ac=ot.stat_desc.has_stree,lc=ot.stat_desc.extra_bits,Bo=ot.stat_desc.extra_base,ss=ot.stat_desc.max_length,zs=0;for(xe=0;xe<=I;xe++)Ie.bl_count[xe]=0;for(bt[2*Ie.heap[Ie.heap_max]+1]=0,ts=Ie.heap_max+1;ts>=7;Y>>=1)if(1&ye&&$.dyn_ltree[2*le]!==0)return r;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return o;for(le=32;le>>3,(J=P.static_len+3+7>>>3)<=Y&&(Y=J)):Y=J=Q+5,Q+4<=Y&&z!==-1?x(P,z,Q,q):P.strategy===4||J===Y?(ie(P,2+(q?1:0),3),rt(P,_,F)):(ie(P,4+(q?1:0),3),function($,le,ye,Ie){var ot;for(ie($,le-257,5),ie($,ye-1,5),ie($,Ie-4,4),ot=0;ot>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&z,P.pending_buf[P.l_buf+P.last_lit]=255&Q,P.last_lit++,z===0?P.dyn_ltree[2*Q]++:(P.matches++,z--,P.dyn_ltree[2*(R[Q]+u+1)]++,P.dyn_dtree[2*G(z)]++),P.last_lit===P.lit_bufsize-1},s._tr_align=function(P){ie(P,2,3),te(P,v,_),function(z){z.bi_valid===16?(oe(z,z.bi_buf),z.bi_buf=0,z.bi_valid=0):8<=z.bi_valid&&(z.pending_buf[z.pending++]=255&z.bi_buf,z.bi_buf>>=8,z.bi_valid-=8)}(P)}},{"../utils/common":41}],53:[function(t,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,s){(function(n){(function(r,o){if(!r.setImmediate){var a,h,c,u,d=1,f={},m=!1,p=r.document,I=Object.getPrototypeOf&&Object.getPrototypeOf(r);I=I&&I.setTimeout?I:r,a={}.toString.call(r.process)==="[object process]"?function(g){process.nextTick(function(){C(g)})}:function(){if(r.postMessage&&!r.importScripts){var g=!0,S=r.onmessage;return r.onmessage=function(){g=!1},r.postMessage("","*"),r.onmessage=S,g}}()?(u="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",v,!1):r.attachEvent("onmessage",v),function(g){r.postMessage(u+g,"*")}):r.MessageChannel?((c=new MessageChannel).port1.onmessage=function(g){C(g.data)},function(g){c.port2.postMessage(g)}):p&&"onreadystatechange"in p.createElement("script")?(h=p.documentElement,function(g){var S=p.createElement("script");S.onreadystatechange=function(){C(g),S.onreadystatechange=null,h.removeChild(S),S=null},h.appendChild(S)}):function(g){setTimeout(C,0,g)},I.setImmediate=function(g){typeof g!="function"&&(g=new Function(""+g));for(var S=new Array(arguments.length-1),O=0;O"u"?n===void 0?this:n:self)}).call(this,typeof nn<"u"?nn:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Gl);var Tf=Gl.exports;const Oa=dl(Tf);var No={},qn={};(function(l){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i="["+e+"]["+t+"]*",s=new RegExp("^"+i+"$"),n=function(o,a){const h=[];let c=a.exec(o);for(;c;){const u=[];u.startIndex=a.lastIndex-c[0].length;const d=c.length;for(let f=0;f"u")};l.isExist=function(o){return typeof o<"u"},l.isEmptyObject=function(o){return Object.keys(o).length===0},l.merge=function(o,a,h){if(a){const c=Object.keys(a),u=c.length;for(let d=0;d"&&l[n]!==" "&&l[n]!==" "&&l[n]!==` -`&&l[n]!=="\r";n++)a+=l[n];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),n--),!Nf(a)){let u;return a.trim().length===0?u="Invalid space after '<'.":u="Tag '"+a+"' is an invalid name.",Me("InvalidTag",u,je(l,n))}const h=Sf(l,n);if(h===!1)return Me("InvalidAttr","Attributes for '"+a+"' have open quote.",je(l,n));let c=h.value;if(n=h.index,c[c.length-1]==="/"){const u=n-c.length;c=c.substring(0,c.length-1);const d=La(c,e);if(d===!0)i=!0;else return Me(d.err.code,d.err.msg,je(l,u+d.err.line))}else if(o)if(h.tagClosed){if(c.trim().length>0)return Me("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",je(l,r));if(t.length===0)return Me("InvalidTag","Closing tag '"+a+"' has not been opened.",je(l,r));{const u=t.pop();if(a!==u.tagName){let d=je(l,u.tagStartPos);return Me("InvalidTag","Expected closing tag '"+u.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+a+"'.",je(l,r))}t.length==0&&(s=!0)}}else return Me("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",je(l,n));else{const u=La(c,e);if(u!==!0)return Me(u.err.code,u.err.msg,je(l,n-c.length+u.err.line));if(s===!0)return Me("InvalidXml","Multiple possible root nodes found.",je(l,n));e.unpairedTags.indexOf(a)!==-1||t.push({tagName:a,tagStartPos:r}),i=!0}for(n++;n0)return Me("InvalidXml","Invalid '"+JSON.stringify(t.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Me("InvalidXml","Start tag expected.",1);return!0};function Na(l){return l===" "||l===" "||l===` -`||l==="\r"}function Pa(l,e){const t=e;for(;e5&&i==="xml")return Me("InvalidXml","XML declaration allowed only at the start of the document.",je(l,e));if(l[e]=="?"&&l[e+1]==">"){e++;break}else continue}return e}function ba(l,e){if(l.length>e+5&&l[e+1]==="-"&&l[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(l.length>e+8&&l[e+1]==="D"&&l[e+2]==="O"&&l[e+3]==="C"&&l[e+4]==="T"&&l[e+5]==="Y"&&l[e+6]==="P"&&l[e+7]==="E"){let t=1;for(e+=8;e"&&(t--,t===0))break}else if(l.length>e+9&&l[e+1]==="["&&l[e+2]==="C"&&l[e+3]==="D"&&l[e+4]==="A"&&l[e+5]==="T"&&l[e+6]==="A"&&l[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}const vf='"',yf="'";function Sf(l,e){let t="",i="",s=!1;for(;e"&&i===""){s=!0;break}t+=l[e]}return i!==""?!1:{value:t,index:e,tagClosed:s}}const wf=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function La(l,e){const t=Po.getAllMatches(l,wf),i={};for(let s=0;s!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(l,e,t){return l}},Pf=function(l){return Object.assign({},Hl,l)};bo.buildOptions=Pf;bo.defaultOptions=Hl;class bf{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}var Lf=bf;const xf=qn;function Mf(l,e){const t={};if(l[e+3]==="O"&&l[e+4]==="C"&&l[e+5]==="T"&&l[e+6]==="Y"&&l[e+7]==="P"&&l[e+8]==="E"){e=e+9;let i=1,s=!1,n=!1,r="";for(;e"){if(n?l[e-1]==="-"&&l[e-2]==="-"&&(n=!1,i--):i--,i===0)break}else l[e]==="["?s=!0:r+=l[e];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i:e}}function Df(l,e){let t="";for(;e0&&s&&t[2]!=="."||!e.leadingZeros&&n.length>0&&!s&&t[1]!==".")return l;{const a=Number(t),h=""+a;return h.search(/[eE]/)!==-1||o?e.eNotation?a:l:t.indexOf(".")!==-1?h==="0"&&r===""||h===r||s&&h==="-"+r?a:l:n?r===h||s+r===h?a:l:t===h||t===s+h?a:l}}else return l}}function Xf(l){return l&&l.indexOf(".")!==-1&&(l=l.replace(/0+$/,""),l==="."?l="0":l[0]==="."?l="0"+l:l[l.length-1]==="."&&(l=l.substr(0,l.length-1))),l}var Zf=Wf;const Wl=qn,Ts=Lf,jf=Vf,Kf=Zf;let Qf=class{constructor(l){this.options=l,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=qf,this.parseXml=ip,this.parseTextData=Jf,this.resolveNameSpace=$f,this.buildAttributesMap=tp,this.isItStopNode=op,this.replaceEntitiesValue=np,this.readStopNodeData=lp,this.saveTextToParentTag=rp,this.addChild=sp}};function qf(l){const e=Object.keys(l);for(let t=0;t0)){r||(l=this.replaceEntitiesValue(l));const o=this.options.tagValueProcessor(e,l,t,s,n);return o==null?l:typeof o!=typeof l||o!==l?o:this.options.trimValues?Hr(l,this.options.parseTagValue,this.options.numberParseOptions):l.trim()===l?Hr(l,this.options.parseTagValue,this.options.numberParseOptions):l}}function $f(l){if(this.options.removeNSPrefix){const e=l.split(":"),t=l.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(l=t+e[1])}return l}const ep=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function tp(l,e,t){if(!this.options.ignoreAttributes&&typeof l=="string"){const i=Wl.getAllMatches(l,ep),s=i.length,n={};for(let r=0;r",n,"Closing Tag is not closed.");let o=l.substring(n+2,r).trim();if(this.options.removeNSPrefix){const c=o.indexOf(":");c!==-1&&(o=o.substr(c+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&(i=this.saveTextToParentTag(i,t,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&this.options.unpairedTags.indexOf(o)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let h=0;a&&this.options.unpairedTags.indexOf(a)!==-1?(h=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):h=s.lastIndexOf("."),s=s.substring(0,h),t=this.tagsNodeStack.pop(),i="",n=r}else if(l[n+1]==="?"){let r=Gr(l,n,!1,"?>");if(!r)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,t,s),!(this.options.ignoreDeclaration&&r.tagName==="?xml"||this.options.ignorePiTags)){const o=new Ts(r.tagName);o.add(this.options.textNodeName,""),r.tagName!==r.tagExp&&r.attrExpPresent&&(o[":@"]=this.buildAttributesMap(r.tagExp,s,r.tagName)),this.addChild(t,o,s)}n=r.closeIndex+1}else if(l.substr(n+1,3)==="!--"){const r=pi(l,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){const o=l.substring(n+4,r-2);i=this.saveTextToParentTag(i,t,s),t.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}n=r}else if(l.substr(n+1,2)==="!D"){const r=jf(l,n);this.docTypeEntities=r.entities,n=r.i}else if(l.substr(n+1,2)==="!["){const r=pi(l,"]]>",n,"CDATA is not closed.")-2,o=l.substring(n+9,r);i=this.saveTextToParentTag(i,t,s);let a=this.parseTextData(o,t.tagname,s,!0,!1,!0,!0);a==null&&(a=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):t.add(this.options.textNodeName,a),n=r+2}else{let r=Gr(l,n,this.options.removeNSPrefix),o=r.tagName;const a=r.rawTagName;let h=r.tagExp,c=r.attrExpPresent,u=r.closeIndex;this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&i&&t.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,t,s,!1));const d=t;if(d&&this.options.unpairedTags.indexOf(d.tagname)!==-1&&(t=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),o!==e.tagname&&(s+=s?"."+o:o),this.isItStopNode(this.options.stopNodes,s,o)){let f="";if(h.length>0&&h.lastIndexOf("/")===h.length-1)o[o.length-1]==="/"?(o=o.substr(0,o.length-1),s=s.substr(0,s.length-1),h=o):h=h.substr(0,h.length-1),n=r.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)n=r.closeIndex;else{const p=this.readStopNodeData(l,a,u+1);if(!p)throw new Error(`Unexpected end of ${a}`);n=p.i,f=p.tagContent}const m=new Ts(o);o!==h&&c&&(m[":@"]=this.buildAttributesMap(h,s,o)),f&&(f=this.parseTextData(f,o,s,!0,c,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),m.add(this.options.textNodeName,f),this.addChild(t,m,s)}else{if(h.length>0&&h.lastIndexOf("/")===h.length-1){o[o.length-1]==="/"?(o=o.substr(0,o.length-1),s=s.substr(0,s.length-1),h=o):h=h.substr(0,h.length-1),this.options.transformTagName&&(o=this.options.transformTagName(o));const f=new Ts(o);o!==h&&c&&(f[":@"]=this.buildAttributesMap(h,s,o)),this.addChild(t,f,s),s=s.substr(0,s.lastIndexOf("."))}else{const f=new Ts(o);this.tagsNodeStack.push(t),o!==h&&c&&(f[":@"]=this.buildAttributesMap(h,s,o)),this.addChild(t,f,s),t=f}i="",n=u}}else i+=l[n];return e.child};function sp(l,e,t){const i=this.options.updateTag(e.tagname,t,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),l.addChild(e))}const np=function(l){if(this.options.processEntities){for(let e in this.docTypeEntities){const t=this.docTypeEntities[e];l=l.replace(t.regx,t.val)}for(let e in this.lastEntities){const t=this.lastEntities[e];l=l.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const t=this.htmlEntities[e];l=l.replace(t.regex,t.val)}l=l.replace(this.ampEntity.regex,this.ampEntity.val)}return l};function rp(l,e,t,i){return l&&(i===void 0&&(i=Object.keys(e.child).length===0),l=this.parseTextData(l,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,i),l!==void 0&&l!==""&&e.add(this.options.textNodeName,l),l=""),l}function op(l,e,t){const i="*."+t;for(const s in l){const n=l[s];if(i===n||e===n)return!0}return!1}function ap(l,e,t=">"){let i,s="";for(let n=e;n",t,`${e} is not closed`);if(l.substring(t+2,n).trim()===e&&(s--,s===0))return{tagContent:l.substring(i,t),i:n};t=n}else if(l[t+1]==="?")t=pi(l,"?>",t+1,"StopNode is not closed.");else if(l.substr(t+1,3)==="!--")t=pi(l,"-->",t+3,"StopNode is not closed.");else if(l.substr(t+1,2)==="![")t=pi(l,"]]>",t,"StopNode is not closed.")-2;else{const n=Gr(l,t,">");n&&((n&&n.tagName)===e&&n.tagExp[n.tagExp.length-1]!=="/"&&s++,t=n.closeIndex)}}function Hr(l,e,t){if(e&&typeof l=="string"){const i=l.trim();return i==="true"?!0:i==="false"?!1:Kf(l,t)}else return Wl.isExist(l)?l:""}var hp=Qf,Xl={};function cp(l,e){return Zl(l,e)}function Zl(l,e,t){let i;const s={};for(let n=0;n0&&(s[e.textNodeName]=i):i!==void 0&&(s[e.textNodeName]=i),s}function dp(l){const e=Object.keys(l);for(let t=0;t0&&(t=Tp),jl(l,e,"",t)}function jl(l,e,t,i){let s="",n=!1;for(let r=0;r`,n=!1;continue}else if(a===e.commentPropName){s+=i+``,n=!0;continue}else if(a[0]==="?"){const m=xa(o[":@"],e),p=a==="?xml"?"":i;let I=o[a][0][e.textNodeName];I=I.length!==0?" "+I:"",s+=p+`<${a}${I}${m}?>`,n=!0;continue}let c=i;c!==""&&(c+=e.indentBy);const u=xa(o[":@"],e),d=i+`<${a}${u}`,f=jl(o[a],e,h,c);e.unpairedTags.indexOf(a)!==-1?e.suppressUnpairedNode?s+=d+">":s+=d+"/>":(!f||f.length===0)&&e.suppressEmptyNode?s+=d+"/>":f&&f.endsWith(">")?s+=d+`>${f}${i}`:(s+=d+">",f&&i!==""&&(f.includes("/>")||f.includes("`),n=!0}return s}function vp(l){const e=Object.keys(l);for(let t=0;t0&&e.processEntities)for(let t=0;t","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ri(l){this.options=Object.assign({},Fp,l),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Np),this.processTextOrObjNode=Ap,this.options.format?(this.indentate=Op,this.tagEndChar=`> -`,this.newLine=` -`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}ri.prototype.build=function(l){return this.options.preserveOrder?wp(l,this.options):(Array.isArray(l)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(l={[this.options.arrayNodeName]:l}),this.j2x(l,0).val)};ri.prototype.j2x=function(l,e){let t="",i="";for(let s in l)if(Object.prototype.hasOwnProperty.call(l,s))if(typeof l[s]>"u")this.isAttribute(s)&&(i+="");else if(l[s]===null)this.isAttribute(s)?i+="":s[0]==="?"?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(l[s]instanceof Date)i+=this.buildTextValNode(l[s],s,"",e);else if(typeof l[s]!="object"){const n=this.isAttribute(s);if(n)t+=this.buildAttrPairStr(n,""+l[s]);else if(s===this.options.textNodeName){let r=this.options.tagValueProcessor(s,""+l[s]);i+=this.replaceEntitiesValue(r)}else i+=this.buildTextValNode(l[s],s,"",e)}else if(Array.isArray(l[s])){const n=l[s].length;let r="",o="";for(let a=0;a"u"))if(h===null)s[0]==="?"?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){const c=this.j2x(h,e+1);r+=c.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(o+=c.attrStr)}else r+=this.processTextOrObjNode(h,s,e);else if(this.options.oneListGroup){let c=this.options.tagValueProcessor(s,h);c=this.replaceEntitiesValue(c),r+=c}else r+=this.buildTextValNode(h,s,"",e)}this.options.oneListGroup&&(r=this.buildObjectNode(r,s,o,e)),i+=r}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const n=Object.keys(l[s]),r=n.length;for(let o=0;o"+l+s:this.options.commentPropName!==!1&&e===this.options.commentPropName&&n.length===0?this.indentate(i)+``+this.newLine:this.indentate(i)+"<"+e+t+n+this.tagEndChar+l+this.indentate(i)+s}};ri.prototype.closeTag=function(l){let e="";return this.options.unpairedTags.indexOf(l)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(i)+``+this.newLine;if(e[0]==="?")return this.indentate(i)+"<"+e+t+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,l);return s=this.replaceEntitiesValue(s),s===""?this.indentate(i)+"<"+e+t+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+t+">"+s+"0&&this.options.processEntities)for(let e=0;e`);let t=null;this.modifiedDate&&(t=`${this.modifiedDate.toISOString()}`);let i=null;return this.modifiedAuthor&&(i=`${this.modifiedAuthor}`),` +*/(function(c,e){(function(t){c.exports=t()})(function(){return function t(i,s,n){function r(l,h){if(!s[l]){if(!i[l]){var d=typeof rn=="function"&&rn;if(!h&&d)return d(l,!0);if(o)return o(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var f=s[l]={exports:{}};i[l][0].call(f.exports,function(m){var p=i[l][1][m];return r(p||m)},f,f.exports,t,i,s,n)}return s[l].exports}for(var o=typeof rn=="function"&&rn,a=0;a>2,f=(3&l)<<4|h>>4,m=1>6:64,p=2>4,h=(15&u)<<4|(f=o.indexOf(a.charAt(p++)))>>2,d=(3&f)<<6|(m=o.indexOf(a.charAt(p++))),g[E++]=l,f!==64&&(g[E++]=h),m!==64&&(g[E++]=d);return g}},{"./support":30,"./utils":32}],2:[function(t,i,s){var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function l(h,d,u,f,m){this.compressedSize=h,this.uncompressedSize=d,this.crc32=u,this.compression=f,this.compressedContent=m}l.prototype={getContentWorker:function(){var h=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(h,d,u){return h.pipe(new o).pipe(new a("uncompressedSize")).pipe(d.compressWorker(u)).pipe(new a("compressedSize")).withStreamInfo("compression",d)},i.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,s){var n=t("./utils"),r=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();i.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(l,h,d,u){var f=r,m=u+d;l^=-1;for(var p=u;p>>8^f[255&(l^h[p])];return-1^l}(0|a,o,o.length,0):function(l,h,d,u){var f=r,m=u+d;l^=-1;for(var p=u;p>>8^f[255&(l^h.charCodeAt(p))];return-1^l}(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(t,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,i,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:n}},{lie:37}],7:[function(t,i,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),l=n?"uint8array":"array";function h(d,u){a.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=u,this.meta={}}s.magic="\b\0",o.inherits(h,a),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,d.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(u){d.push({data:u,meta:d.meta})}},s.compressWorker=function(d){return new h("Deflate",d)},s.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,s){function n(f,m){var p,E="";for(p=0;p>>=8;return E}function r(f,m,p,E,I,g){var w,C,v=f.file,O=f.compression,A=g!==l.utf8encode,b=o.transformTo("string",g(v.name)),N=o.transformTo("string",l.utf8encode(v.name)),D=v.comment,_=o.transformTo("string",g(D)),F=o.transformTo("string",l.utf8encode(D)),L=N.length!==v.name.length,R=F.length!==D.length,U="",W="",z="",q=v.dir,X=v.date,re={crc32:0,compressedSize:0,uncompressedSize:0};m&&!p||(re.crc32=f.crc32,re.compressedSize=f.compressedSize,re.uncompressedSize=f.uncompressedSize);var G=0;m&&(G|=8),A||!L&&!R||(G|=2048);var V=0,oe=0;q&&(V|=16),I==="UNIX"?(oe=798,V|=function(te,Ae){var be=te;return te||(be=Ae?16893:33204),(65535&be)<<16}(v.unixPermissions,q)):(oe=20,V|=function(te){return 63&(te||0)}(v.dosPermissions)),w=X.getUTCHours(),w<<=6,w|=X.getUTCMinutes(),w<<=5,w|=X.getUTCSeconds()/2,C=X.getUTCFullYear()-1980,C<<=4,C|=X.getUTCMonth()+1,C<<=5,C|=X.getUTCDate(),L&&(W=n(1,1)+n(h(b),4)+N,U+="up"+n(W.length,2)+W),R&&(z=n(1,1)+n(h(_),4)+F,U+="uc"+n(z.length,2)+z);var ie="";return ie+=` +\0`,ie+=n(G,2),ie+=O.magic,ie+=n(w,2),ie+=n(C,2),ie+=n(re.crc32,4),ie+=n(re.compressedSize,4),ie+=n(re.uncompressedSize,4),ie+=n(b.length,2),ie+=n(U.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ie+b+U,dirRecord:d.CENTRAL_FILE_HEADER+n(oe,2)+ie+n(_.length,2)+"\0\0\0\0"+n(V,4)+n(E,4)+b+U+_}}var o=t("../utils"),a=t("../stream/GenericWorker"),l=t("../utf8"),h=t("../crc32"),d=t("../signature");function u(f,m,p,E){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=p,this.encodeFileName=E,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,a),u.prototype.push=function(f){var m=f.meta.percent||0,p=this.entriesCount,E=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,a.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:p?(m+100*(p-E-1))/p:100}}))},u.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var m=this.streamFiles&&!f.file.dir;if(m){var p=r(f,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(f){this.accumulate=!1;var m=this.streamFiles&&!f.file.dir,p=r(f,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),m)this.push({data:function(E){return d.DATA_DESCRIPTOR+n(E.crc32,4)+n(E.compressedSize,4)+n(E.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var f=this.bytesWritten,m=0;m=this.index;a--)l=(l<<8)+this.byteAt(a);return this.index+=o,l},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=r},{"../utils":32}],19:[function(t,i,s){var n=t("./Uint8ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,s){var n=t("./DataReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,i,s){var n=t("./ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,s){var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),l=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");i.exports=function(d){var u=n.getTypeOf(d);return n.checkSupport(u),u!=="string"||r.uint8array?u==="nodebuffer"?new l(d):r.uint8array?new h(n.transformTo("uint8array",d)):new o(n.transformTo("array",d)):new a(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,s){var n=t("./GenericWorker"),r=t("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,s){var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+a.data.length}r.prototype.processChunk.call(this,a)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(h){l.dataIsReady=!0,l.data=h,l.max=h&&h.length||0,l.type=n.getTypeOf(h),l.isPaused||l._tickAndRepeat()},function(h){l.error(h)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,l);break;case"uint8array":a=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":a=this.data.slice(this.index,l)}return this.index=l,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,s){function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},i.exports=n},{}],29:[function(t,i,s){var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),l=t("../support"),h=t("../external"),d=null;if(l.nodestream)try{d=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(m,p){return new h.Promise(function(E,I){var g=[],w=m._internalType,C=m._outputType,v=m._mimeType;m.on("data",function(O,A){g.push(O),p&&p(A)}).on("error",function(O){g=[],I(O)}).on("end",function(){try{var O=function(A,b,N){switch(A){case"blob":return n.newBlob(n.transformTo("arraybuffer",b),N);case"base64":return a.encode(b);default:return n.transformTo(A,b)}}(C,function(A,b){var N,D=0,_=null,F=0;for(N=0;N"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),s.blob=r.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,s){for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),a=t("./stream/GenericWorker"),l=new Array(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;l[254]=l[254]=1;function d(){a.call(this,"utf-8 decode"),this.leftOver=null}function u(){a.call(this,"utf-8 encode")}s.utf8encode=function(f){return r.nodebuffer?o.newBufferFrom(f,"utf-8"):function(m){var p,E,I,g,w,C=m.length,v=0;for(g=0;g>>6:(E<65536?p[w++]=224|E>>>12:(p[w++]=240|E>>>18,p[w++]=128|E>>>12&63),p[w++]=128|E>>>6&63),p[w++]=128|63&E);return p}(f)},s.utf8decode=function(f){return r.nodebuffer?n.transformTo("nodebuffer",f).toString("utf-8"):function(m){var p,E,I,g,w=m.length,C=new Array(2*w);for(p=E=0;p>10&1023,C[E++]=56320|1023&I)}return C.length!==E&&(C.subarray?C=C.subarray(0,E):C.length=E),n.applyFromCharCode(C)}(f=n.transformTo(r.uint8array?"uint8array":"array",f))},n.inherits(d,a),d.prototype.processChunk=function(f){var m=n.transformTo(r.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var p=m;(m=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),m.set(p,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var E=function(g,w){var C;for((w=w||g.length)>g.length&&(w=g.length),C=w-1;0<=C&&(192&g[C])==128;)C--;return C<0||C===0?w:C+l[g[C]]>w?C:w}(m),I=m;E!==m.length&&(r.uint8array?(I=m.subarray(0,E),this.leftOver=m.subarray(E,m.length)):(I=m.slice(0,E),this.leftOver=m.slice(E,m.length))),this.push({data:s.utf8decode(I),meta:f.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,n.inherits(u,a),u.prototype.processChunk=function(f){this.push({data:s.utf8encode(f.data),meta:f.meta})},s.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,s){var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),a=t("./external");function l(p){return p}function h(p,E){for(var I=0;I>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var m,p,E,I=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?u[E++]=224|f>>>12:(u[E++]=240|f>>>18,u[E++]=128|f>>>12&63),u[E++]=128|f>>>6&63),u[E++]=128|63&f);return u},s.buf2binstring=function(d){return h(d,d.length)},s.binstring2buf=function(d){for(var u=new n.Buf8(d.length),f=0,m=u.length;f>10&1023,g[m++]=56320|1023&p)}return h(g,m)},s.utf8border=function(d,u){var f;for((u=u||d.length)>d.length&&(u=d.length),f=u-1;0<=f&&(192&d[f])==128;)f--;return f<0||f===0?u:f+a[d[f]]>u?f:u}},{"./common":41}],43:[function(t,i,s){i.exports=function(n,r,o,a){for(var l=65535&n|0,h=n>>>16&65535|0,d=0;o!==0;){for(o-=d=2e3>>1:r>>>1;o[a]=r}return o}();i.exports=function(r,o,a,l){var h=n,d=l+a;r^=-1;for(var u=l;u>>8^h[255&(r^o[u])];return-1^r}},{}],46:[function(t,i,s){var n,r=t("../utils/common"),o=t("./trees"),a=t("./adler32"),l=t("./crc32"),h=t("./messages"),d=0,u=4,f=0,m=-2,p=-1,E=4,I=2,g=8,w=9,C=286,v=30,O=19,A=2*C+1,b=15,N=3,D=258,_=D+N+1,F=42,L=113,R=1,U=2,W=3,z=4;function q(S,j){return S.msg=h[j],j}function X(S){return(S<<1)-(4S.avail_out&&(H=S.avail_out),H!==0&&(r.arraySet(S.output,j.pending_buf,j.pending_out,H,S.next_out),S.next_out+=H,j.pending_out+=H,S.total_out+=H,S.avail_out-=H,j.pending-=H,j.pending===0&&(j.pending_out=0))}function V(S,j){o._tr_flush_block(S,0<=S.block_start?S.block_start:-1,S.strstart-S.block_start,j),S.block_start=S.strstart,G(S.strm)}function oe(S,j){S.pending_buf[S.pending++]=j}function ie(S,j){S.pending_buf[S.pending++]=j>>>8&255,S.pending_buf[S.pending++]=255&j}function te(S,j){var H,M,P=S.max_chain_length,B=S.strstart,Q=S.prev_length,K=S.nice_match,k=S.strstart>S.w_size-_?S.strstart-(S.w_size-_):0,J=S.window,se=S.w_mask,$=S.prev,le=S.strstart+D,we=J[B+Q-1],Ie=J[B+Q];S.prev_length>=S.good_match&&(P>>=2),K>S.lookahead&&(K=S.lookahead);do if(J[(H=j)+Q]===Ie&&J[H+Q-1]===we&&J[H]===J[B]&&J[++H]===J[B+1]){B+=2,H++;do;while(J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&Bk&&--P!=0);return Q<=S.lookahead?Q:S.lookahead}function Ae(S){var j,H,M,P,B,Q,K,k,J,se,$=S.w_size;do{if(P=S.window_size-S.lookahead-S.strstart,S.strstart>=$+($-_)){for(r.arraySet(S.window,S.window,$,$,0),S.match_start-=$,S.strstart-=$,S.block_start-=$,j=H=S.hash_size;M=S.head[--j],S.head[j]=$<=M?M-$:0,--H;);for(j=H=$;M=S.prev[--j],S.prev[j]=$<=M?M-$:0,--H;);P+=$}if(S.strm.avail_in===0)break;if(Q=S.strm,K=S.window,k=S.strstart+S.lookahead,J=P,se=void 0,se=Q.avail_in,J=N)for(B=S.strstart-S.insert,S.ins_h=S.window[B],S.ins_h=(S.ins_h<=N&&(S.ins_h=(S.ins_h<=N)if(M=o._tr_tally(S,S.strstart-S.match_start,S.match_length-N),S.lookahead-=S.match_length,S.match_length<=S.max_lazy_match&&S.lookahead>=N){for(S.match_length--;S.strstart++,S.ins_h=(S.ins_h<=N&&(S.ins_h=(S.ins_h<=N&&S.match_length<=S.prev_length){for(P=S.strstart+S.lookahead-N,M=o._tr_tally(S,S.strstart-1-S.prev_match,S.prev_length-N),S.lookahead-=S.prev_length-1,S.prev_length-=2;++S.strstart<=P&&(S.ins_h=(S.ins_h<S.pending_buf_size-5&&(H=S.pending_buf_size-5);;){if(S.lookahead<=1){if(Ae(S),S.lookahead===0&&j===d)return R;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var M=S.block_start+H;if((S.strstart===0||S.strstart>=M)&&(S.lookahead=S.strstart-M,S.strstart=M,V(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-_&&(V(S,!1),S.strm.avail_out===0))return R}return S.insert=0,j===u?(V(S,!0),S.strm.avail_out===0?W:z):(S.strstart>S.block_start&&(V(S,!1),S.strm.avail_out),R)}),new me(4,4,8,4,be),new me(4,5,16,8,be),new me(4,6,32,32,be),new me(4,4,16,16,ae),new me(8,16,32,32,ae),new me(8,16,128,128,ae),new me(8,32,128,256,ae),new me(32,128,258,1024,ae),new me(32,258,258,4096,ae)],s.deflateInit=function(S,j){return Ye(S,j,g,15,8,0)},s.deflateInit2=Ye,s.deflateReset=nt,s.deflateResetKeep=Te,s.deflateSetHeader=function(S,j){return S&&S.state?S.state.wrap!==2?m:(S.state.gzhead=j,f):m},s.deflate=function(S,j){var H,M,P,B;if(!S||!S.state||5>8&255),oe(M,M.gzhead.time>>16&255),oe(M,M.gzhead.time>>24&255),oe(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),oe(M,255&M.gzhead.os),M.gzhead.extra&&M.gzhead.extra.length&&(oe(M,255&M.gzhead.extra.length),oe(M,M.gzhead.extra.length>>8&255)),M.gzhead.hcrc&&(S.adler=l(S.adler,M.pending_buf,M.pending,0)),M.gzindex=0,M.status=69):(oe(M,0),oe(M,0),oe(M,0),oe(M,0),oe(M,0),oe(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),oe(M,3),M.status=L);else{var Q=g+(M.w_bits-8<<4)<<8;Q|=(2<=M.strategy||M.level<2?0:M.level<6?1:M.level===6?2:3)<<6,M.strstart!==0&&(Q|=32),Q+=31-Q%31,M.status=L,ie(M,Q),M.strstart!==0&&(ie(M,S.adler>>>16),ie(M,65535&S.adler)),S.adler=1}if(M.status===69)if(M.gzhead.extra){for(P=M.pending;M.gzindex<(65535&M.gzhead.extra.length)&&(M.pending!==M.pending_buf_size||(M.gzhead.hcrc&&M.pending>P&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),G(S),P=M.pending,M.pending!==M.pending_buf_size));)oe(M,255&M.gzhead.extra[M.gzindex]),M.gzindex++;M.gzhead.hcrc&&M.pending>P&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),M.gzindex===M.gzhead.extra.length&&(M.gzindex=0,M.status=73)}else M.status=73;if(M.status===73)if(M.gzhead.name){P=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>P&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),G(S),P=M.pending,M.pending===M.pending_buf_size)){B=1;break}B=M.gzindexP&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),B===0&&(M.gzindex=0,M.status=91)}else M.status=91;if(M.status===91)if(M.gzhead.comment){P=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>P&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),G(S),P=M.pending,M.pending===M.pending_buf_size)){B=1;break}B=M.gzindexP&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),B===0&&(M.status=103)}else M.status=103;if(M.status===103&&(M.gzhead.hcrc?(M.pending+2>M.pending_buf_size&&G(S),M.pending+2<=M.pending_buf_size&&(oe(M,255&S.adler),oe(M,S.adler>>8&255),S.adler=0,M.status=L)):M.status=L),M.pending!==0){if(G(S),S.avail_out===0)return M.last_flush=-1,f}else if(S.avail_in===0&&X(j)<=X(H)&&j!==u)return q(S,-5);if(M.status===666&&S.avail_in!==0)return q(S,-5);if(S.avail_in!==0||M.lookahead!==0||j!==d&&M.status!==666){var K=M.strategy===2?function(k,J){for(var se;;){if(k.lookahead===0&&(Ae(k),k.lookahead===0)){if(J===d)return R;break}if(k.match_length=0,se=o._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++,se&&(V(k,!1),k.strm.avail_out===0))return R}return k.insert=0,J===u?(V(k,!0),k.strm.avail_out===0?W:z):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?R:U}(M,j):M.strategy===3?function(k,J){for(var se,$,le,we,Ie=k.window;;){if(k.lookahead<=D){if(Ae(k),k.lookahead<=D&&J===d)return R;if(k.lookahead===0)break}if(k.match_length=0,k.lookahead>=N&&0k.lookahead&&(k.match_length=k.lookahead)}if(k.match_length>=N?(se=o._tr_tally(k,1,k.match_length-N),k.lookahead-=k.match_length,k.strstart+=k.match_length,k.match_length=0):(se=o._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++),se&&(V(k,!1),k.strm.avail_out===0))return R}return k.insert=0,J===u?(V(k,!0),k.strm.avail_out===0?W:z):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?R:U}(M,j):n[M.level].func(M,j);if(K!==W&&K!==z||(M.status=666),K===R||K===W)return S.avail_out===0&&(M.last_flush=-1),f;if(K===U&&(j===1?o._tr_align(M):j!==5&&(o._tr_stored_block(M,0,0,!1),j===3&&(re(M.head),M.lookahead===0&&(M.strstart=0,M.block_start=0,M.insert=0))),G(S),S.avail_out===0))return M.last_flush=-1,f}return j!==u?f:M.wrap<=0?1:(M.wrap===2?(oe(M,255&S.adler),oe(M,S.adler>>8&255),oe(M,S.adler>>16&255),oe(M,S.adler>>24&255),oe(M,255&S.total_in),oe(M,S.total_in>>8&255),oe(M,S.total_in>>16&255),oe(M,S.total_in>>24&255)):(ie(M,S.adler>>>16),ie(M,65535&S.adler)),G(S),0=H.w_size&&(B===0&&(re(H.head),H.strstart=0,H.block_start=0,H.insert=0),J=new r.Buf8(H.w_size),r.arraySet(J,j,se-H.w_size,H.w_size,0),j=J,se=H.w_size),Q=S.avail_in,K=S.next_in,k=S.input,S.avail_in=se,S.next_in=0,S.input=j,Ae(H);H.lookahead>=N;){for(M=H.strstart,P=H.lookahead-(N-1);H.ins_h=(H.ins_h<>>=N=b>>>24,w-=N,(N=b>>>16&255)===0)U[h++]=65535&b;else{if(!(16&N)){if(!(64&N)){b=C[(65535&b)+(g&(1<>>=N,w-=N),w<15&&(g+=R[a++]<>>=N=b>>>24,w-=N,!(16&(N=b>>>16&255))){if(!(64&N)){b=v[(65535&b)+(g&(1<>>=N,w-=N,(N=h-d)<_){if(p<(N=_-N)&&o.sane){n.msg="invalid distance too far back",o.mode=30;break e}if(L=I,(F=0)===E){if(F+=m-N,N>3,g&=(1<<(w-=D<<3))-1,n.next_in=a,n.next_out=h,n.avail_in=a>>24&255)+(F>>>8&65280)+((65280&F)<<8)+((255&F)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(F){var L;return F&&F.state?(L=F.state,F.total_in=F.total_out=L.total=0,F.msg="",L.wrap&&(F.adler=1&L.wrap),L.mode=m,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new n.Buf32(p),L.distcode=L.distdyn=new n.Buf32(E),L.sane=1,L.back=-1,u):f}function C(F){var L;return F&&F.state?((L=F.state).wsize=0,L.whave=0,L.wnext=0,w(F)):f}function v(F,L){var R,U;return F&&F.state?(U=F.state,L<0?(R=0,L=-L):(R=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15=z.wsize?(n.arraySet(z.window,L,R-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(U<(W=z.wsize-z.wnext)&&(W=U),n.arraySet(z.window,L,R-U,W,z.wnext),(U-=W)?(n.arraySet(z.window,L,R-U,U,0),z.wnext=U,z.whave=z.wsize):(z.wnext+=W,z.wnext===z.wsize&&(z.wnext=0),z.whave>>8&255,R.check=o(R.check,B,2,0),V=G=0,R.mode=2;break}if(R.flags=0,R.head&&(R.head.done=!1),!(1&R.wrap)||(((255&G)<<8)+(G>>8))%31){F.msg="incorrect header check",R.mode=30;break}if((15&G)!=8){F.msg="unknown compression method",R.mode=30;break}if(V-=4,S=8+(15&(G>>>=4)),R.wbits===0)R.wbits=S;else if(S>R.wbits){F.msg="invalid window size",R.mode=30;break}R.dmax=1<>8&1),512&R.flags&&(B[0]=255&G,B[1]=G>>>8&255,R.check=o(R.check,B,2,0)),V=G=0,R.mode=3;case 3:for(;V<32;){if(X===0)break e;X--,G+=U[z++]<>>8&255,B[2]=G>>>16&255,B[3]=G>>>24&255,R.check=o(R.check,B,4,0)),V=G=0,R.mode=4;case 4:for(;V<16;){if(X===0)break e;X--,G+=U[z++]<>8),512&R.flags&&(B[0]=255&G,B[1]=G>>>8&255,R.check=o(R.check,B,2,0)),V=G=0,R.mode=5;case 5:if(1024&R.flags){for(;V<16;){if(X===0)break e;X--,G+=U[z++]<>>8&255,R.check=o(R.check,B,2,0)),V=G=0}else R.head&&(R.head.extra=null);R.mode=6;case 6:if(1024&R.flags&&(X<(te=R.length)&&(te=X),te&&(R.head&&(S=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),n.arraySet(R.head.extra,U,z,te,S)),512&R.flags&&(R.check=o(R.check,U,te,z)),X-=te,z+=te,R.length-=te),R.length))break e;R.length=0,R.mode=7;case 7:if(2048&R.flags){if(X===0)break e;for(te=0;S=U[z+te++],R.head&&S&&R.length<65536&&(R.head.name+=String.fromCharCode(S)),S&&te>9&1,R.head.done=!0),F.adler=R.check=0,R.mode=12;break;case 10:for(;V<32;){if(X===0)break e;X--,G+=U[z++]<>>=7&V,V-=7&V,R.mode=27;break}for(;V<3;){if(X===0)break e;X--,G+=U[z++]<>>=1)){case 0:R.mode=14;break;case 1:if(D(R),R.mode=20,L!==6)break;G>>>=2,V-=2;break e;case 2:R.mode=17;break;case 3:F.msg="invalid block type",R.mode=30}G>>>=2,V-=2;break;case 14:for(G>>>=7&V,V-=7&V;V<32;){if(X===0)break e;X--,G+=U[z++]<>>16^65535)){F.msg="invalid stored block lengths",R.mode=30;break}if(R.length=65535&G,V=G=0,R.mode=15,L===6)break e;case 15:R.mode=16;case 16:if(te=R.length){if(X>>=5,V-=5,R.ndist=1+(31&G),G>>>=5,V-=5,R.ncode=4+(15&G),G>>>=4,V-=4,286>>=3,V-=3}for(;R.have<19;)R.lens[Q[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,H={bits:R.lenbits},j=l(0,R.lens,0,19,R.lencode,0,R.work,H),R.lenbits=H.bits,j){F.msg="invalid code lengths set",R.mode=30;break}R.have=0,R.mode=19;case 19:for(;R.have>>16&255,pe=65535&P,!((ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>>=ae,V-=ae,R.lens[R.have++]=pe;else{if(pe===16){for(M=ae+2;V>>=ae,V-=ae,R.have===0){F.msg="invalid bit length repeat",R.mode=30;break}S=R.lens[R.have-1],te=3+(3&G),G>>>=2,V-=2}else if(pe===17){for(M=ae+3;V>>=ae)),G>>>=3,V-=3}else{for(M=ae+7;V>>=ae)),G>>>=7,V-=7}if(R.have+te>R.nlen+R.ndist){F.msg="invalid bit length repeat",R.mode=30;break}for(;te--;)R.lens[R.have++]=S}}if(R.mode===30)break;if(R.lens[256]===0){F.msg="invalid code -- missing end-of-block",R.mode=30;break}if(R.lenbits=9,H={bits:R.lenbits},j=l(h,R.lens,0,R.nlen,R.lencode,0,R.work,H),R.lenbits=H.bits,j){F.msg="invalid literal/lengths set",R.mode=30;break}if(R.distbits=6,R.distcode=R.distdyn,H={bits:R.distbits},j=l(d,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,H),R.distbits=H.bits,j){F.msg="invalid distances set",R.mode=30;break}if(R.mode=20,L===6)break e;case 20:R.mode=21;case 21:if(6<=X&&258<=re){F.next_out=q,F.avail_out=re,F.next_in=z,F.avail_in=X,R.hold=G,R.bits=V,a(F,ie),q=F.next_out,W=F.output,re=F.avail_out,z=F.next_in,U=F.input,X=F.avail_in,G=R.hold,V=R.bits,R.mode===12&&(R.back=-1);break}for(R.back=0;me=(P=R.lencode[G&(1<>>16&255,pe=65535&P,!((ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>Te)])>>>16&255,pe=65535&P,!(Te+(ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>>=Te,V-=Te,R.back+=Te}if(G>>>=ae,V-=ae,R.back+=ae,R.length=pe,me===0){R.mode=26;break}if(32&me){R.back=-1,R.mode=12;break}if(64&me){F.msg="invalid literal/length code",R.mode=30;break}R.extra=15&me,R.mode=22;case 22:if(R.extra){for(M=R.extra;V>>=R.extra,V-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=23;case 23:for(;me=(P=R.distcode[G&(1<>>16&255,pe=65535&P,!((ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>Te)])>>>16&255,pe=65535&P,!(Te+(ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>>=Te,V-=Te,R.back+=Te}if(G>>>=ae,V-=ae,R.back+=ae,64&me){F.msg="invalid distance code",R.mode=30;break}R.offset=pe,R.extra=15&me,R.mode=24;case 24:if(R.extra){for(M=R.extra;V>>=R.extra,V-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){F.msg="invalid distance too far back",R.mode=30;break}R.mode=25;case 25:if(re===0)break e;if(te=ie-re,R.offset>te){if((te=R.offset-te)>R.whave&&R.sane){F.msg="invalid distance too far back",R.mode=30;break}Ae=te>R.wnext?(te-=R.wnext,R.wsize-te):R.wnext-te,te>R.length&&(te=R.length),be=R.window}else be=W,Ae=q-R.offset,te=R.length;for(reA?(N=Ae[be+E[L]],V[oe+E[L]]):(N=96,0),g=1<>q)+(w-=g)]=b<<24|N<<16|D|0,w!==0;);for(g=1<>=1;if(g!==0?(G&=g-1,G+=g):G=0,L++,--ie[F]==0){if(F===U)break;F=d[u+E[L]]}if(W>>7)]}function oe(P,B){P.pending_buf[P.pending++]=255&B,P.pending_buf[P.pending++]=B>>>8&255}function ie(P,B,Q){P.bi_valid>I-Q?(P.bi_buf|=B<>I-P.bi_valid,P.bi_valid+=Q-I):(P.bi_buf|=B<>>=1,Q<<=1,0<--B;);return Q>>>1}function be(P,B,Q){var K,k,J=new Array(E+1),se=0;for(K=1;K<=E;K++)J[K]=se=se+Q[K-1]<<1;for(k=0;k<=B;k++){var $=P[2*k+1];$!==0&&(P[2*k]=Ae(J[$]++,$))}}function ae(P){var B;for(B=0;B>1;1<=Q;Q--)Te(P,J,Q);for(k=le;Q=P.heap[1],P.heap[1]=P.heap[P.heap_len--],Te(P,J,1),K=P.heap[1],P.heap[--P.heap_max]=Q,P.heap[--P.heap_max]=K,J[2*k]=J[2*Q]+J[2*K],P.depth[k]=(P.depth[Q]>=P.depth[K]?P.depth[Q]:P.depth[K])+1,J[2*Q+1]=J[2*K+1]=k,P.heap[1]=k++,Te(P,J,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],function(Ie,rt){var qi,Ct,Ji,xe,bs,Hn,Pt=rt.dyn_tree,Ro=rt.max_code,Uc=rt.stat_desc.static_tree,Bc=rt.stat_desc.has_stree,zc=rt.stat_desc.extra_bits,So=rt.stat_desc.extra_base,$i=rt.stat_desc.max_length,xs=0;for(xe=0;xe<=E;xe++)Ie.bl_count[xe]=0;for(Pt[2*Ie.heap[Ie.heap_max]+1]=0,qi=Ie.heap_max+1;qi>=7;k>>=1)if(1&we&&$.dyn_ltree[2*le]!==0)return r;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return o;for(le=32;le>>3,(J=P.static_len+3+7>>>3)<=k&&(k=J)):k=J=Q+5,Q+4<=k&&B!==-1?M(P,B,Q,K):P.strategy===4||J===k?(ie(P,2+(K?1:0),3),nt(P,_,F)):(ie(P,4+(K?1:0),3),function($,le,we,Ie){var rt;for(ie($,le-257,5),ie($,we-1,5),ie($,Ie-4,4),rt=0;rt>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&B,P.pending_buf[P.l_buf+P.last_lit]=255&Q,P.last_lit++,B===0?P.dyn_ltree[2*Q]++:(P.matches++,B--,P.dyn_ltree[2*(R[Q]+d+1)]++,P.dyn_dtree[2*V(B)]++),P.last_lit===P.lit_bufsize-1},s._tr_align=function(P){ie(P,2,3),te(P,w,_),function(B){B.bi_valid===16?(oe(B,B.bi_buf),B.bi_buf=0,B.bi_valid=0):8<=B.bi_valid&&(B.pending_buf[B.pending++]=255&B.bi_buf,B.bi_buf>>=8,B.bi_valid-=8)}(P)}},{"../utils/common":41}],53:[function(t,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,s){(function(n){(function(r,o){if(!r.setImmediate){var a,l,h,d,u=1,f={},m=!1,p=r.document,E=Object.getPrototypeOf&&Object.getPrototypeOf(r);E=E&&E.setTimeout?E:r,a={}.toString.call(r.process)==="[object process]"?function(C){process.nextTick(function(){g(C)})}:function(){if(r.postMessage&&!r.importScripts){var C=!0,v=r.onmessage;return r.onmessage=function(){C=!1},r.postMessage("","*"),r.onmessage=v,C}}()?(d="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",w,!1):r.attachEvent("onmessage",w),function(C){r.postMessage(d+C,"*")}):r.MessageChannel?((h=new MessageChannel).port1.onmessage=function(C){g(C.data)},function(C){h.port2.postMessage(C)}):p&&"onreadystatechange"in p.createElement("script")?(l=p.documentElement,function(C){var v=p.createElement("script");v.onreadystatechange=function(){g(C),v.onreadystatechange=null,l.removeChild(v),v=null},l.appendChild(v)}):function(C){setTimeout(g,0,C)},E.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var v=new Array(arguments.length-1),O=0;O"u"?n===void 0?this:n:self)}).call(this,typeof nn<"u"?nn:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Rl);var Mu=Rl.exports;const da=xu(Mu);var Sl={},kn={};(function(c){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i="["+e+"]["+t+"]*",s=new RegExp("^"+i+"$"),n=function(o,a){const l=[];let h=a.exec(o);for(;h;){const d=[];d.startIndex=a.lastIndex-h[0].length;const u=h.length;for(let f=0;f"u")};c.isExist=function(o){return typeof o<"u"},c.isEmptyObject=function(o){return Object.keys(o).length===0},c.merge=function(o,a,l){if(a){const h=Object.keys(a),d=h.length;for(let u=0;u"&&c[n]!==" "&&c[n]!==" "&&c[n]!==` +`&&c[n]!=="\r";n++)a+=c[n];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),n--),!Yu(a)){let d;return a.trim().length===0?d="Invalid space after '<'.":d="Tag '"+a+"' is an invalid name.",Me("InvalidTag",d,Ze(c,n))}const l=Uu(c,n);if(l===!1)return Me("InvalidAttr","Attributes for '"+a+"' have open quote.",Ze(c,n));let h=l.value;if(n=l.index,h[h.length-1]==="/"){const d=n-h.length;h=h.substring(0,h.length-1);const u=ma(h,e);if(u===!0)i=!0;else return Me(u.err.code,u.err.msg,Ze(c,d+u.err.line))}else if(o)if(l.tagClosed){if(h.trim().length>0)return Me("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",Ze(c,r));if(t.length===0)return Me("InvalidTag","Closing tag '"+a+"' has not been opened.",Ze(c,r));{const d=t.pop();if(a!==d.tagName){let u=Ze(c,d.tagStartPos);return Me("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+u.line+", col "+u.col+") instead of closing tag '"+a+"'.",Ze(c,r))}t.length==0&&(s=!0)}}else return Me("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",Ze(c,n));else{const d=ma(h,e);if(d!==!0)return Me(d.err.code,d.err.msg,Ze(c,n-h.length+d.err.line));if(s===!0)return Me("InvalidXml","Multiple possible root nodes found.",Ze(c,n));e.unpairedTags.indexOf(a)!==-1||t.push({tagName:a,tagStartPos:r}),i=!0}for(n++;n0)return Me("InvalidXml","Invalid '"+JSON.stringify(t.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Me("InvalidXml","Start tag expected.",1);return!0};function ua(c){return c===" "||c===" "||c===` +`||c==="\r"}function fa(c,e){const t=e;for(;e5&&i==="xml")return Me("InvalidXml","XML declaration allowed only at the start of the document.",Ze(c,e));if(c[e]=="?"&&c[e+1]==">"){e++;break}else continue}return e}function pa(c,e){if(c.length>e+5&&c[e+1]==="-"&&c[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(c.length>e+8&&c[e+1]==="D"&&c[e+2]==="O"&&c[e+3]==="C"&&c[e+4]==="T"&&c[e+5]==="Y"&&c[e+6]==="P"&&c[e+7]==="E"){let t=1;for(e+=8;e"&&(t--,t===0))break}else if(c.length>e+9&&c[e+1]==="["&&c[e+2]==="C"&&c[e+3]==="D"&&c[e+4]==="A"&&c[e+5]==="T"&&c[e+6]==="A"&&c[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}const Du='"',_u="'";function Uu(c,e){let t="",i="",s=!1;for(;e"&&i===""){s=!0;break}t+=c[e]}return i!==""?!1:{value:t,index:e,tagClosed:s}}const Bu=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function ma(c,e){const t=po.getAllMatches(c,Bu),i={};for(let s=0;s!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(c,e,t){return c}},Gu=function(c){return Object.assign({},wl,c)};mo.buildOptions=Gu;mo.defaultOptions=wl;class Hu{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}var Wu=Hu;const Xu=kn;function Zu(c,e){const t={};if(c[e+3]==="O"&&c[e+4]==="C"&&c[e+5]==="T"&&c[e+6]==="Y"&&c[e+7]==="P"&&c[e+8]==="E"){e=e+9;let i=1,s=!1,n=!1,r="";for(;e"){if(n?c[e-1]==="-"&&c[e-2]==="-"&&(n=!1,i--):i--,i===0)break}else c[e]==="["?s=!0:r+=c[e];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i:e}}function ju(c,e){let t="";for(;e0&&s&&t[2]!=="."||!e.leadingZeros&&n.length>0&&!s&&t[1]!==".")return c;{const a=Number(t),l=""+a;return l.search(/[eE]/)!==-1||o?e.eNotation?a:c:t.indexOf(".")!==-1?l==="0"&&r===""||l===r||s&&l==="-"+r?a:c:n?r===l||s+r===l?a:c:t===l||t===s+l?a:c}}else return c}}function of(c){return c&&c.indexOf(".")!==-1&&(c=c.replace(/0+$/,""),c==="."?c="0":c[0]==="."?c="0"+c:c[c.length-1]==="."&&(c=c.substr(0,c.length-1))),c}var af=rf;const vl=kn,Is=Wu,lf=ef,cf=af;let hf=class{constructor(c){this.options=c,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=df,this.parseXml=If,this.parseTextData=uf,this.resolveNameSpace=ff,this.buildAttributesMap=mf,this.isItStopNode=Tf,this.replaceEntitiesValue=gf,this.readStopNodeData=Sf,this.saveTextToParentTag=Cf,this.addChild=Ef}};function df(c){const e=Object.keys(c);for(let t=0;t0)){r||(c=this.replaceEntitiesValue(c));const o=this.options.tagValueProcessor(e,c,t,s,n);return o==null?c:typeof o!=typeof c||o!==c?o:this.options.trimValues?Pr(c,this.options.parseTagValue,this.options.numberParseOptions):c.trim()===c?Pr(c,this.options.parseTagValue,this.options.numberParseOptions):c}}function ff(c){if(this.options.removeNSPrefix){const e=c.split(":"),t=c.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(c=t+e[1])}return c}const pf=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function mf(c,e,t){if(!this.options.ignoreAttributes&&typeof c=="string"){const i=vl.getAllMatches(c,pf),s=i.length,n={};for(let r=0;r",n,"Closing Tag is not closed.");let o=c.substring(n+2,r).trim();if(this.options.removeNSPrefix){const h=o.indexOf(":");h!==-1&&(o=o.substr(h+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&(i=this.saveTextToParentTag(i,t,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&this.options.unpairedTags.indexOf(o)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&this.options.unpairedTags.indexOf(a)!==-1?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),t=this.tagsNodeStack.pop(),i="",n=r}else if(c[n+1]==="?"){let r=Nr(c,n,!1,"?>");if(!r)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,t,s),!(this.options.ignoreDeclaration&&r.tagName==="?xml"||this.options.ignorePiTags)){const o=new Is(r.tagName);o.add(this.options.textNodeName,""),r.tagName!==r.tagExp&&r.attrExpPresent&&(o[":@"]=this.buildAttributesMap(r.tagExp,s,r.tagName)),this.addChild(t,o,s)}n=r.closeIndex+1}else if(c.substr(n+1,3)==="!--"){const r=ui(c,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){const o=c.substring(n+4,r-2);i=this.saveTextToParentTag(i,t,s),t.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}n=r}else if(c.substr(n+1,2)==="!D"){const r=lf(c,n);this.docTypeEntities=r.entities,n=r.i}else if(c.substr(n+1,2)==="!["){const r=ui(c,"]]>",n,"CDATA is not closed.")-2,o=c.substring(n+9,r);i=this.saveTextToParentTag(i,t,s);let a=this.parseTextData(o,t.tagname,s,!0,!1,!0,!0);a==null&&(a=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):t.add(this.options.textNodeName,a),n=r+2}else{let r=Nr(c,n,this.options.removeNSPrefix),o=r.tagName;const a=r.rawTagName;let l=r.tagExp,h=r.attrExpPresent,d=r.closeIndex;this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&i&&t.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,t,s,!1));const u=t;if(u&&this.options.unpairedTags.indexOf(u.tagname)!==-1&&(t=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),o!==e.tagname&&(s+=s?"."+o:o),this.isItStopNode(this.options.stopNodes,s,o)){let f="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)o[o.length-1]==="/"?(o=o.substr(0,o.length-1),s=s.substr(0,s.length-1),l=o):l=l.substr(0,l.length-1),n=r.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)n=r.closeIndex;else{const p=this.readStopNodeData(c,a,d+1);if(!p)throw new Error(`Unexpected end of ${a}`);n=p.i,f=p.tagContent}const m=new Is(o);o!==l&&h&&(m[":@"]=this.buildAttributesMap(l,s,o)),f&&(f=this.parseTextData(f,o,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),m.add(this.options.textNodeName,f),this.addChild(t,m,s)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){o[o.length-1]==="/"?(o=o.substr(0,o.length-1),s=s.substr(0,s.length-1),l=o):l=l.substr(0,l.length-1),this.options.transformTagName&&(o=this.options.transformTagName(o));const f=new Is(o);o!==l&&h&&(f[":@"]=this.buildAttributesMap(l,s,o)),this.addChild(t,f,s),s=s.substr(0,s.lastIndexOf("."))}else{const f=new Is(o);this.tagsNodeStack.push(t),o!==l&&h&&(f[":@"]=this.buildAttributesMap(l,s,o)),this.addChild(t,f,s),t=f}i="",n=d}}else i+=c[n];return e.child};function Ef(c,e,t){const i=this.options.updateTag(e.tagname,t,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),c.addChild(e))}const gf=function(c){if(this.options.processEntities){for(let e in this.docTypeEntities){const t=this.docTypeEntities[e];c=c.replace(t.regx,t.val)}for(let e in this.lastEntities){const t=this.lastEntities[e];c=c.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const t=this.htmlEntities[e];c=c.replace(t.regex,t.val)}c=c.replace(this.ampEntity.regex,this.ampEntity.val)}return c};function Cf(c,e,t,i){return c&&(i===void 0&&(i=Object.keys(e.child).length===0),c=this.parseTextData(c,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,i),c!==void 0&&c!==""&&e.add(this.options.textNodeName,c),c=""),c}function Tf(c,e,t){const i="*."+t;for(const s in c){const n=c[s];if(i===n||e===n)return!0}return!1}function Rf(c,e,t=">"){let i,s="";for(let n=e;n",t,`${e} is not closed`);if(c.substring(t+2,n).trim()===e&&(s--,s===0))return{tagContent:c.substring(i,t),i:n};t=n}else if(c[t+1]==="?")t=ui(c,"?>",t+1,"StopNode is not closed.");else if(c.substr(t+1,3)==="!--")t=ui(c,"-->",t+3,"StopNode is not closed.");else if(c.substr(t+1,2)==="![")t=ui(c,"]]>",t,"StopNode is not closed.")-2;else{const n=Nr(c,t,">");n&&((n&&n.tagName)===e&&n.tagExp[n.tagExp.length-1]!=="/"&&s++,t=n.closeIndex)}}function Pr(c,e,t){if(e&&typeof c=="string"){const i=c.trim();return i==="true"?!0:i==="false"?!1:cf(c,t)}else return vl.isExist(c)?c:""}var wf=hf,yl={};function vf(c,e){return Fl(c,e)}function Fl(c,e,t){let i;const s={};for(let n=0;n0&&(s[e.textNodeName]=i):i!==void 0&&(s[e.textNodeName]=i),s}function yf(c){const e=Object.keys(c);for(let t=0;t`);let t=null;this.modifiedDate&&(t=`${this.modifiedDate.toISOString()}`);let i=null;return this.modifiedAuthor&&(i=`${this.modifiedAuthor}`),` ${this.date.toISOString()} ${this.author} @@ -111,14 +108,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE ${i??""} ${t??""} - `}}const ql=class Qt{constructor(e){T(this,"guid",Wt.create()),T(this,"title",Qt.default.title),T(this,"creationDate",new Date),T(this,"creationAuthor",""),T(this,"viewpoints",new ei),T(this,"relatedTopics",new ei),T(this,"comments",new Ct),T(this,"customData",{}),T(this,"description"),T(this,"serverAssignedId"),T(this,"dueDate"),T(this,"modifiedAuthor"),T(this,"modifiedDate"),T(this,"index"),T(this,"_type",Qt.default.type),T(this,"_status",Qt.default.status),T(this,"_priority",Qt.default.priority),T(this,"_stage",Qt.default.stage),T(this,"_assignedTo",Qt.default.assignedTo),T(this,"_labels",Qt.default.labels??new Set),T(this,"_components"),this._components=e;const t=e.get(Ke);this.creationAuthor=t.config.author,this.relatedTopics.guard=i=>i!==this.guid}set type(e){const t=this._components.get(Ke),{strict:i,types:s}=t.config;(!i||s.has(e))&&(this._type=e)}get type(){return this._type}set status(e){const t=this._components.get(Ke),{strict:i,statuses:s}=t.config;(!i||s.has(e))&&(this._status=e)}get status(){return this._status}set priority(e){const t=this._components.get(Ke);if(e){const{strict:i,priorities:s}=t.config;if(!(!i||s.has(e)))return;this._priority=e}else this._priority=e}get priority(){return this._priority}set stage(e){const t=this._components.get(Ke);if(e){const{strict:i,stages:s}=t.config;if(!(!i||s.has(e)))return;this._stage=e}else this._stage=e}get stage(){return this._stage}set assignedTo(e){const t=this._components.get(Ke);if(e){const{strict:i,users:s}=t.config;if(!(!i||s.has(e)))return;this._assignedTo=e}else this._assignedTo=e}get assignedTo(){return this._assignedTo}set labels(e){const t=this._components.get(Ke),{strict:i,labels:s}=t.config;if(i){const n=new Set;for(const r of e)(!i||s.has(r))&&n.add(r);this._labels=n}else this._labels=e}get labels(){return this._labels}get _managerVersion(){return this._components.get(Ke).config.version}set(e){const t=e,i=this;for(const s in e){if(s==="guid")continue;const n=t[s];s in this&&(i[s]=n)}return this._components.get(Ke).list.set(this.guid,this),this}createComment(e,t){const i=new Wr(this._components,e);return i.viewpoint=t,i.topic=this,this.comments.set(i.guid,i),i}createLabelTags(e=this._managerVersion){let t="Labels";e==="2.1"&&(t="Labels"),e==="3"&&(t="Label");let i=[...this.labels].map(s=>`<${t}>${s}`).join(` + `}}const Ol=class jt{constructor(e){T(this,"guid",Ht.create()),T(this,"title",jt.default.title),T(this,"creationDate",new Date),T(this,"creationAuthor",""),T(this,"viewpoints",new Jt),T(this,"relatedTopics",new Jt),T(this,"comments",new gt),T(this,"customData",{}),T(this,"description"),T(this,"serverAssignedId"),T(this,"dueDate"),T(this,"modifiedAuthor"),T(this,"modifiedDate"),T(this,"index"),T(this,"_type",jt.default.type),T(this,"_status",jt.default.status),T(this,"_priority",jt.default.priority),T(this,"_stage",jt.default.stage),T(this,"_assignedTo",jt.default.assignedTo),T(this,"_labels",jt.default.labels??new Set),T(this,"_components"),this._components=e;const t=e.get(je);this.creationAuthor=t.config.author,this.relatedTopics.guard=i=>i!==this.guid}set type(e){const t=this._components.get(je),{strict:i,types:s}=t.config;(!i||s.has(e))&&(this._type=e)}get type(){return this._type}set status(e){const t=this._components.get(je),{strict:i,statuses:s}=t.config;(!i||s.has(e))&&(this._status=e)}get status(){return this._status}set priority(e){const t=this._components.get(je);if(e){const{strict:i,priorities:s}=t.config;if(!(!i||s.has(e)))return;this._priority=e}else this._priority=e}get priority(){return this._priority}set stage(e){const t=this._components.get(je);if(e){const{strict:i,stages:s}=t.config;if(!(!i||s.has(e)))return;this._stage=e}else this._stage=e}get stage(){return this._stage}set assignedTo(e){const t=this._components.get(je);if(e){const{strict:i,users:s}=t.config;if(!(!i||s.has(e)))return;this._assignedTo=e}else this._assignedTo=e}get assignedTo(){return this._assignedTo}set labels(e){const t=this._components.get(je),{strict:i,labels:s}=t.config;if(i){const n=new Set;for(const r of e)(!i||s.has(r))&&n.add(r);this._labels=n}else this._labels=e}get labels(){return this._labels}get _managerVersion(){return this._components.get(je).config.version}set(e){const t=e,i=this;for(const s in e){if(s==="guid")continue;const n=t[s];s in this&&(i[s]=n)}return this._components.get(je).list.set(this.guid,this),this}createComment(e,t){const i=new br(this._components,e);return i.viewpoint=t,i.topic=this,this.comments.set(i.guid,i),i}createLabelTags(e=this._managerVersion){let t="Labels";e==="2.1"&&(t="Labels"),e==="3"&&(t="Label");let i=[...this.labels].map(s=>`<${t}>${s}`).join(` `);for(const s in this.customData){const n=this.customData[s];typeof n=="string"&&(i+=` <${t}>${n}`)}return e==="2.1"?i:e==="3"?i.length!==0?` ${i} `:"":i}createCommentTags(e=this._managerVersion){const t=[...this.comments.values()].map(i=>i.serialize()).join(` `);return e==="2.1"?t:e==="3"?t.length!==0?` ${t} -`:"":t}createViewpointTags(e=this._managerVersion){let t="Viewpoints";e==="2.1"&&(t="Viewpoints"),e==="3"&&(t="ViewPoint");const i=this._components.get(zt),s=[...this.viewpoints].map(n=>i.list.get(n)).filter(n=>n).map(n=>`<${t} Guid="${n.guid}"> +`:"":t}createViewpointTags(e=this._managerVersion){let t="Viewpoints";e==="2.1"&&(t="Viewpoints"),e==="3"&&(t="ViewPoint");const i=this._components.get(Bt),s=[...this.viewpoints].map(n=>i.list.get(n)).filter(n=>n).map(n=>`<${t} Guid="${n.guid}"> ${n.guid}.bcfv ${n.guid}.jpeg @@ -129,7 +126,7 @@ ${s} `).join(` `);return e==="2.1"?t:e==="3"?t.length!==0?` ${t} -`:"":t}serialize(){const e=this._managerVersion;let t=null;this.serverAssignedId&&(t=`ServerAssignedId="${this.serverAssignedId}"`);let i=null;this.priority&&(i=`${this.priority}`);let s=null;this.index&&e==="2.1"&&(s=`${this.index}`);let n=null;this.modifiedDate&&(n=`${this.modifiedDate.toISOString()}`);let r=null;this.modifiedAuthor&&(r=`${this.modifiedAuthor}`);let o=null;this.dueDate&&(o=`${this.dueDate.toISOString()}`);let a=null;this.assignedTo&&(a=`${this.assignedTo}`);let h=null;this.description&&(h=`${this.description}`);let c=null;this.stage&&(c=`${this.stage}`);const u=this.createCommentTags(e),d=this.createViewpointTags(e),f=this.createLabelTags(e),m=this.createRelatedTopicTags(e);return` +`:"":t}serialize(){const e=this._managerVersion;let t=null;this.serverAssignedId&&(t=`ServerAssignedId="${this.serverAssignedId}"`);let i=null;this.priority&&(i=`${this.priority}`);let s=null;this.index&&e==="2.1"&&(s=`${this.index}`);let n=null;this.modifiedDate&&(n=`${this.modifiedDate.toISOString()}`);let r=null;this.modifiedAuthor&&(r=`${this.modifiedAuthor}`);let o=null;this.dueDate&&(o=`${this.dueDate.toISOString()}`);let a=null;this.assignedTo&&(a=`${this.assignedTo}`);let l=null;this.description&&(l=`${this.description}`);let h=null;this.stage&&(h=`${this.stage}`);const d=this.createCommentTags(e),u=this.createViewpointTags(e),f=this.createLabelTags(e),m=this.createRelatedTopicTags(e);return` @@ -142,20 +139,20 @@ ${t} ${r??""} ${o??""} ${a??""} + ${l??""} ${h??""} - ${c??""} ${f} ${m} - ${e==="3"?u:""} ${e==="3"?d:""} + ${e==="3"?u:""} - ${e==="2.1"?u:""} ${e==="2.1"?d:""} + ${e==="2.1"?u:""} - `}};T(ql,"default",{title:"BCF Topic",type:"Issue",status:"Active"});let Ma=ql;const Mp=(l,e)=>{if(e.trim()==="")return;const t=Ke.xmlParser.parse(e).Extensions;if(!t)return;const{Priorities:i,TopicStatuses:s,TopicTypes:n,Users:r}=t;if(i&&i.Priority){const o=Array.isArray(i.Priority)?i.Priority:[i.Priority];for(const a of o)l.config.priorities.add(a)}if(s&&s.TopicStatus){const o=Array.isArray(s.TopicStatus)?s.TopicStatus:[s.TopicStatus];for(const a of o)l.config.statuses.add(a)}if(n&&n.TopicType){const o=Array.isArray(n.TopicType)?n.TopicType:[n.TopicType];for(const a of o)l.config.types.add(a)}if(r&&r.User){const o=Array.isArray(r.User)?r.User:[r.User];for(const a of o)l.config.users.add(a)}};class Dp extends $i{constructor(){super(...arguments),T(this,"_config",{version:{type:"Select",options:new Set(["2.1","3"]),multiple:!1,value:""},author:{type:"Text",value:""},types:{type:"TextSet",value:new Set},statuses:{type:"TextSet",value:new Set},priorities:{type:"TextSet",value:new Set},labels:{type:"TextSet",value:new Set},stages:{type:"TextSet",value:new Set},users:{type:"TextSet",value:new Set},includeSelectionTag:{type:"Boolean",value:!1},updateExtensionsOnImport:{type:"Boolean",value:!1},strict:{type:"Boolean",value:!1},includeAllExtensionsOnExport:{type:"Boolean",value:!1},fallbackVersionOnImport:{type:"Select",multiple:!1,options:new Set(["2.1","3"]),value:""},ignoreIncompleteTopicsOnImport:{type:"Boolean",value:!1}})}get version(){return this._config.version.value}set version(e){this._config.version.value=e}get author(){return this._config.author.value}set author(e){this._config.author.value=e}get types(){return this._config.types.value}set types(e){this._config.types.value=e}get statuses(){return this._config.statuses.value}set statuses(e){this._config.statuses.value=e}get priorities(){return this._config.priorities.value}set priorities(e){this._config.priorities.value=e}get labels(){return this._config.labels.value}set labels(e){this._config.labels.value=e}get stages(){return this._config.stages.value}set stages(e){this._config.stages.value=e}get users(){return this._config.users.value}set users(e){this._config.users.value=e}get includeSelectionTag(){return this._config.includeSelectionTag.value}set includeSelectionTag(e){this._config.includeSelectionTag.value=e}get updateExtensionsOnImport(){return this._config.updateExtensionsOnImport.value}set updateExtensionsOnImport(e){this._config.updateExtensionsOnImport.value=e}get strict(){return this._config.strict.value}set strict(e){this._config.strict.value=e}get includeAllExtensionsOnExport(){return this._config.includeAllExtensionsOnExport.value}set includeAllExtensionsOnExport(e){this._config.includeAllExtensionsOnExport.value=e}get fallbackVersionOnImport(){return this._config.fallbackVersionOnImport.value}set fallbackVersionOnImport(e){this._config.fallbackVersionOnImport.value=e}get ignoreIncompleteTopicsOnImport(){return this._config.ignoreIncompleteTopicsOnImport.value}set ignoreIncompleteTopicsOnImport(e){this._config.ignoreIncompleteTopicsOnImport.value=e}}const Lo=class Ss extends de{constructor(){super(...arguments),T(this,"enabled",!1),T(this,"_defaultConfig",{author:"jhon.doe@example.com",version:"2.1",types:new Set(["Clash","Failure","Fault","Inquiry","Issue","Remark","Request"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),priorities:new Set(["On hold","Minor","Normal","Major","Critical"]),labels:new Set,stages:new Set,users:new Set,includeSelectionTag:!1,updateExtensionsOnImport:!0,strict:!1,includeAllExtensionsOnExport:!0,fallbackVersionOnImport:"2.1",ignoreIncompleteTopicsOnImport:!1}),T(this,"config",new Dp(this,this.components,"BCF Topics",Ss.uuid)),T(this,"list",new Ct),T(this,"onSetup",new H),T(this,"isSetup",!1),T(this,"onBCFImported",new H),T(this,"onDisposed",new H)}setup(e){if(this.isSetup)return;const t={...this._defaultConfig,...e};this.config.version=t.version,this.config.author=t.author,this.config.types=t.types,this.config.statuses=t.statuses,this.config.priorities=t.priorities,this.config.labels=t.labels,this.config.stages=t.stages,this.config.users=t.users,this.config.includeSelectionTag=t.includeSelectionTag,this.config.updateExtensionsOnImport=t.updateExtensionsOnImport,this.config.strict=t.strict,this.config.includeAllExtensionsOnExport=t.includeAllExtensionsOnExport,this.config.fallbackVersionOnImport=t.fallbackVersionOnImport||"",this.config.ignoreIncompleteTopicsOnImport=t.ignoreIncompleteTopicsOnImport,this.isSetup=!0,this.enabled=!0,this.onSetup.trigger()}create(e){const t=new Ma(this.components);return e?(t.guid=e.guid??t.guid,t.set(e)):this.list.set(t.guid,t),t}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get usedTypes(){const e=[...this.list].map(([t,i])=>i.type);return new Set(e)}get usedStatuses(){const e=[...this.list].map(([t,i])=>i.status);return new Set(e)}get usedPriorities(){const e=[...this.list].map(([t,i])=>i.priority).filter(t=>t);return new Set(e)}get usedStages(){const e=[...this.list].map(([t,i])=>i.stage).filter(t=>t);return new Set(e)}get usedUsers(){const e=[];for(const[t,i]of this.list){e.push(i.creationAuthor),i.assignedTo&&e.push(i.assignedTo),i.modifiedAuthor&&e.push(i.modifiedAuthor);for(const[s,n]of i.comments)e.push(n.author),n.modifiedAuthor&&e.push(n.modifiedAuthor)}return new Set(e)}get usedLabels(){const e=[];for(const[t,i]of this.list)e.push(...i.labels);return new Set(e)}updateExtensions(){for(const[e,t]of this.list){for(const i of t.labels)this.config.labels.add(i);this.config.types.add(t.type),t.priority&&this.config.priorities.add(t.priority),t.stage&&this.config.stages.add(t.stage),this.config.statuses.add(t.status),this.config.users.add(t.creationAuthor),t.assignedTo&&this.config.users.add(t.assignedTo),t.modifiedAuthor&&this.config.users.add(t.modifiedAuthor);for(const[i,s]of t.comments)this.config.users.add(s.author),s.modifiedAuthor&&this.config.users.add(s.modifiedAuthor)}}updateViewpointReferences(){const e=this.components.get(zt);for(const[t,i]of this.list)for(const s of i.viewpoints)e.list.has(s)||i.viewpoints.delete(s)}async export(e=this.list.values()){const t=new Oa;t.file("bcf.version",` + `}};T(Ol,"default",{title:"BCF Topic",type:"Issue",status:"Active"});let Ia=Ol;const Df=(c,e)=>{if(e.trim()==="")return;const t=je.xmlParser.parse(e).Extensions;if(!t)return;const{Priorities:i,TopicStatuses:s,TopicTypes:n,Users:r}=t;if(i&&i.Priority){const o=Array.isArray(i.Priority)?i.Priority:[i.Priority];for(const a of o)c.config.priorities.add(a)}if(s&&s.TopicStatus){const o=Array.isArray(s.TopicStatus)?s.TopicStatus:[s.TopicStatus];for(const a of o)c.config.statuses.add(a)}if(n&&n.TopicType){const o=Array.isArray(n.TopicType)?n.TopicType:[n.TopicType];for(const a of o)c.config.types.add(a)}if(r&&r.User){const o=Array.isArray(r.User)?r.User:[r.User];for(const a of o)c.config.users.add(a)}};class _f extends Qi{constructor(){super(...arguments),T(this,"_config",{version:{type:"Select",options:new Set(["2.1","3"]),multiple:!1,value:""},author:{type:"Text",value:""},types:{type:"TextSet",value:new Set},statuses:{type:"TextSet",value:new Set},priorities:{type:"TextSet",value:new Set},labels:{type:"TextSet",value:new Set},stages:{type:"TextSet",value:new Set},users:{type:"TextSet",value:new Set},includeSelectionTag:{type:"Boolean",value:!1},updateExtensionsOnImport:{type:"Boolean",value:!1},strict:{type:"Boolean",value:!1},includeAllExtensionsOnExport:{type:"Boolean",value:!1},fallbackVersionOnImport:{type:"Select",multiple:!1,options:new Set(["2.1","3"]),value:""},ignoreIncompleteTopicsOnImport:{type:"Boolean",value:!1}})}get version(){return this._config.version.value}set version(e){this._config.version.value=e}get author(){return this._config.author.value}set author(e){this._config.author.value=e}get types(){return this._config.types.value}set types(e){this._config.types.value=e}get statuses(){return this._config.statuses.value}set statuses(e){this._config.statuses.value=e}get priorities(){return this._config.priorities.value}set priorities(e){this._config.priorities.value=e}get labels(){return this._config.labels.value}set labels(e){this._config.labels.value=e}get stages(){return this._config.stages.value}set stages(e){this._config.stages.value=e}get users(){return this._config.users.value}set users(e){this._config.users.value=e}get includeSelectionTag(){return this._config.includeSelectionTag.value}set includeSelectionTag(e){this._config.includeSelectionTag.value=e}get updateExtensionsOnImport(){return this._config.updateExtensionsOnImport.value}set updateExtensionsOnImport(e){this._config.updateExtensionsOnImport.value=e}get strict(){return this._config.strict.value}set strict(e){this._config.strict.value=e}get includeAllExtensionsOnExport(){return this._config.includeAllExtensionsOnExport.value}set includeAllExtensionsOnExport(e){this._config.includeAllExtensionsOnExport.value=e}get fallbackVersionOnImport(){return this._config.fallbackVersionOnImport.value}set fallbackVersionOnImport(e){this._config.fallbackVersionOnImport.value=e}get ignoreIncompleteTopicsOnImport(){return this._config.ignoreIncompleteTopicsOnImport.value}set ignoreIncompleteTopicsOnImport(e){this._config.ignoreIncompleteTopicsOnImport.value=e}}const Io=class Ts extends de{constructor(){super(...arguments),T(this,"enabled",!1),T(this,"_defaultConfig",{author:"jhon.doe@example.com",version:"2.1",types:new Set(["Clash","Failure","Fault","Inquiry","Issue","Remark","Request"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),priorities:new Set(["On hold","Minor","Normal","Major","Critical"]),labels:new Set,stages:new Set,users:new Set,includeSelectionTag:!1,updateExtensionsOnImport:!0,strict:!1,includeAllExtensionsOnExport:!0,fallbackVersionOnImport:"2.1",ignoreIncompleteTopicsOnImport:!1}),T(this,"config",new _f(this,this.components,"BCF Topics",Ts.uuid)),T(this,"list",new gt),T(this,"onSetup",new Y),T(this,"isSetup",!1),T(this,"onBCFImported",new Y),T(this,"onDisposed",new Y)}setup(e){if(this.isSetup)return;const t={...this._defaultConfig,...e};this.config.version=t.version,this.config.author=t.author,this.config.types=t.types,this.config.statuses=t.statuses,this.config.priorities=t.priorities,this.config.labels=t.labels,this.config.stages=t.stages,this.config.users=t.users,this.config.includeSelectionTag=t.includeSelectionTag,this.config.updateExtensionsOnImport=t.updateExtensionsOnImport,this.config.strict=t.strict,this.config.includeAllExtensionsOnExport=t.includeAllExtensionsOnExport,this.config.fallbackVersionOnImport=t.fallbackVersionOnImport||"",this.config.ignoreIncompleteTopicsOnImport=t.ignoreIncompleteTopicsOnImport,this.isSetup=!0,this.enabled=!0,this.onSetup.trigger()}create(e){const t=new Ia(this.components);return e?(t.guid=e.guid??t.guid,t.set(e)):this.list.set(t.guid,t),t}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get usedTypes(){const e=[...this.list].map(([t,i])=>i.type);return new Set(e)}get usedStatuses(){const e=[...this.list].map(([t,i])=>i.status);return new Set(e)}get usedPriorities(){const e=[...this.list].map(([t,i])=>i.priority).filter(t=>t);return new Set(e)}get usedStages(){const e=[...this.list].map(([t,i])=>i.stage).filter(t=>t);return new Set(e)}get usedUsers(){const e=[];for(const[t,i]of this.list){e.push(i.creationAuthor),i.assignedTo&&e.push(i.assignedTo),i.modifiedAuthor&&e.push(i.modifiedAuthor);for(const[s,n]of i.comments)e.push(n.author),n.modifiedAuthor&&e.push(n.modifiedAuthor)}return new Set(e)}get usedLabels(){const e=[];for(const[t,i]of this.list)e.push(...i.labels);return new Set(e)}updateExtensions(){for(const[e,t]of this.list){for(const i of t.labels)this.config.labels.add(i);this.config.types.add(t.type),t.priority&&this.config.priorities.add(t.priority),t.stage&&this.config.stages.add(t.stage),this.config.statuses.add(t.status),this.config.users.add(t.creationAuthor),t.assignedTo&&this.config.users.add(t.assignedTo),t.modifiedAuthor&&this.config.users.add(t.modifiedAuthor);for(const[i,s]of t.comments)this.config.users.add(s.author),s.modifiedAuthor&&this.config.users.add(s.modifiedAuthor)}}updateViewpointReferences(){const e=this.components.get(Bt);for(const[t,i]of this.list)for(const s of i.viewpoints)e.list.has(s)||i.viewpoints.delete(s)}async export(e=this.list.values()){const t=new da;t.file("bcf.version",` - `),t.file("bcf.extensions",this.serializeExtensions());const i=await(await fetch("https://thatopen.github.io/engine_components/resources/favicon.ico")).arrayBuffer(),s=this.components.get(zt);for(const n of e){const r=t.folder(n.guid);r.file("markup.bcf",n.serialize());for(const o of n.viewpoints){const a=s.list.get(o);a&&(r.file(`${o}.jpeg`,i,{binary:!0}),r.file(`${o}.bcfv`,await a.serialize()))}}return await t.generateAsync({type:"blob"})}serializeExtensions(){const e=[...this.config.types].map(o=>`${o}`).join(` + `),t.file("bcf.extensions",this.serializeExtensions());const i=await(await fetch("https://thatopen.github.io/engine_components/resources/favicon.ico")).arrayBuffer(),s=this.components.get(Bt);for(const n of e){const r=t.folder(n.guid);r.file("markup.bcf",n.serialize());for(const o of n.viewpoints){const a=s.list.get(o);a&&(r.file(`${o}.jpeg`,i,{binary:!0}),r.file(`${o}.bcfv`,await a.serialize()))}}return await t.generateAsync({type:"blob"})}serializeExtensions(){const e=[...this.config.types].map(o=>`${o}`).join(` `),t=[...this.config.statuses].map(o=>`${o}`).join(` `),i=[...this.config.priorities].map(o=>`${o}`).join(` `),s=[...this.config.labels].map(o=>`${o}`).join(` @@ -183,7 +180,7 @@ ${n} ${r} `:""} - `}processMarkupComment(e){const{Guid:t,Date:i,Author:s,Comment:n,Viewpoint:r}=e;if(!(t&&i&&s&&Wr))return null;const o=this.components.get(zt),a=new Wr(this.components,n??"");return a.guid=t,a.date=new Date(i),a.author=s,a.viewpoint=r!=null&&r.Guid?o.list.get(r.Guid):void 0,a.modifiedAuthor=e.ModifiedAuthor,a.modifiedDate=e.ModifiedDate?new Date(e.ModifiedDate):void 0,a}getMarkupComments(e,t){var i;let s;if(t==="2.1"&&(s=e.Comment),t==="3"&&(s=(i=e.Topic.Comments)==null?void 0:i.Comment),!s)return[];s=Array.isArray(s)?s:[s];const n=s.map(r=>this.processMarkupComment(r)).filter(r=>r);return Array.isArray(n)?n:[n]}getMarkupLabels(e,t){var i;let s;return t==="2.1"&&(s=e.Topic.Labels),t==="3"&&(s=(i=e.Topic.Labels)==null?void 0:i.Label),s?Array.isArray(s)?s:[s]:[]}getMarkupViewpoints(e,t){var i;let s;return t==="2.1"&&(s=e.Viewpoints),t==="3"&&(s=(i=e.Topic.Viewpoints)==null?void 0:i.ViewPoint),s?(s=Array.isArray(s)?s:[s],s):[]}getMarkupRelatedTopics(e,t){var i;let s;return t==="2.1"&&(s=e.Topic.RelatedTopic),t==="3"&&(s=(i=e.Topic.RelatedTopics)==null?void 0:i.RelatedTopic),s?(Array.isArray(s)?s:[s]).map(n=>n.Guid):[]}async load(e,t){var i;const{fallbackVersionOnImport:s,ignoreIncompleteTopicsOnImport:n,updateExtensionsOnImport:r}=this.config,o=new Oa;await o.loadAsync(e);const a=Object.values(o.files);let h=s;const c=a.find(C=>C.name.endsWith(".version"));if(c){const C=await c.async("string"),v=Ss.xmlParser.parse(C).Version.VersionId;h=String(v)}if(!(h&&(h==="2.1"||h==="3")))throw new Error(`BCFTopics: ${h} is not supported.`);const u=a.find(C=>C.name.endsWith(".extensions"));if(r&&u){const C=await u.async("string");Mp(this,C)}const d=[],f=this.components.get(zt),m=a.filter(C=>C.name.endsWith(".bcfv"));for(const C of m){const v=await C.async("string"),g=Ss.xmlParser.parse(v).VisualizationInfo;if(!g){console.warn("Missing VisualizationInfo in Viewpoint");continue}const S={},{Guid:O,ClippingPlanes:A,Components:b,OrthogonalCamera:N,PerspectiveCamera:M}=g;if(O&&(S.guid=O),b){const{Selection:F,Visibility:D}=b;if(F&&F.Component){const B=Array.isArray(F.Component)?F.Component:[F.Component];S.selectionComponents=B.map(k=>k.IfcGuid).filter(k=>k)}if(D&&"DefaultVisibility"in D&&(S.defaultVisibility=D.DefaultVisibility),D&&D.Exceptions&&"Component"in D.Exceptions){const{Component:B}=D.Exceptions,k=Array.isArray(B)?B:[B];S.exceptionComponents=k.map(U=>U.IfcGuid).filter(U=>U)}let R;h==="2.1"&&(R=b.ViewSetupHints),h==="3"&&(R=(i=b.Visibility)==null?void 0:i.ViewSetupHints),R&&("OpeningsVisible"in R&&(S.openingsVisible=R.OpeningsVisible),"SpacesVisible"in R&&(S.spacesVisible=R.SpacesVisible),"SpaceBoundariesVisible"in R&&(S.spaceBoundariesVisible=R.SpaceBoundariesVisible))}if(N||M){const F=g.PerspectiveCamera??g.OrthogonalCamera,{CameraViewPoint:D,CameraDirection:R}=F,B=new L(Number(D.X),Number(D.Z),Number(-D.Y)),k=new L(Number(R.X),Number(R.Z),Number(-R.Y)),U={position:{x:B.x,y:B.y,z:B.z},direction:{x:k.x,y:k.y,z:k.z},aspectRatio:"AspectRatio"in F?F.AspectRatio:1};"ViewToWorldScale"in F&&(S.camera={...U,viewToWorldScale:F.ViewToWorldScale}),"FieldOfView"in F&&(S.camera={...U,fov:F.FieldOfView})}const _=new fh(this.components,t,{data:S,setCamera:!1});if(b){const{Coloring:F}=b;if(F&&F.Color){const D=Array.isArray(F.Color)?F.Color:[F.Color];for(const R of D){const{Color:B,Component:k}=R,U=(Array.isArray(k)?k:[k]).map(K=>K.IfcGuid);_.componentColors.set(B,U)}}}if(d.push(_),A){const F=this.components.get(Qi),D=Array.isArray(A.ClippingPlane)?A.ClippingPlane:[A.ClippingPlane];for(const R of D){const{Location:B,Direction:k}=R;if(!(B&&k))continue;const U=new L(B.X,B.Z,-B.Y),K=new L(k.X,-k.Z,k.Y),V=F.createFromNormalAndCoplanarPoint(t,K,U);V.visible=!1,V.enabled=!1,_.clippingPlanes.add(V)}}}const p={},I=[],E=a.filter(C=>C.name.endsWith(".bcf"));for(const C of E){const v=await C.async("string"),g=Ss.xmlParser.parse(v).Markup,S=g.Topic,{Guid:O,TopicType:A,TopicStatus:b,Title:N,CreationDate:M,CreationAuthor:_}=S;if(n&&!(O&&A&&b&&N&&M&&_))continue;const F=new Ma(this.components);F.guid=O??F.guid;const D=this.getMarkupRelatedTopics(g,h);p[F.guid]=new Set(D),F.type=A??F.type,F.status=b??F.status,F.title=N??F.title,F.creationDate=M?new Date(M):F.creationDate,F.creationAuthor=_??F.creationAuthor,F.serverAssignedId=S.ServerAssignedId,F.priority=S.Priority,F.index=S.Index,F.modifiedDate=S.ModifiedDate?new Date(S.ModifiedDate):void 0,F.modifiedAuthor=S.ModifiedAuthor,F.dueDate=S.DueDate?new Date(S.DueDate):void 0,F.assignedTo=S.AssignedTo,F.description=S.Description,F.stage=S.Stage;const R=this.getMarkupLabels(g,h);for(const U of R)F.labels.add(U);const B=this.getMarkupComments(g,h);for(const U of B)F.comments.set(U.guid,U);const k=this.getMarkupViewpoints(g,h);for(const U of k){if(!(U&&U.Guid))continue;const K=f.list.get(U.Guid);K&&F.viewpoints.add(K.guid)}this.list.set(F.guid,F),I.push(F)}for(const C in p){const v=this.list.get(C);if(!v)continue;const g=p[C];for(const S of g)v.relatedTopics.add(S)}return this.onBCFImported.trigger(I),{viewpoints:d,topics:I}}};T(Lo,"uuid","de977976-e4f6-4e4f-a01a-204727839802");T(Lo,"xmlParser",new Ql.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let Ke=Lo;const Jl=class Mt extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"onDisposed",new H),T(this,"_absoluteMin"),T(this,"_absoluteMax"),T(this,"_meshes",[]),this.components.add(Mt.uuid,this),this._absoluteMin=Mt.newBound(!0),this._absoluteMax=Mt.newBound(!1)}static getDimensions(e){const{min:t,max:i}=e,s=Math.abs(i.x-t.x),n=Math.abs(i.y-t.y),r=Math.abs(i.z-t.z),o=new L;return o.subVectors(i,t).divideScalar(2).add(t),{width:s,height:n,depth:r,center:o}}static newBound(e){const t=e?1:-1;return new L(t*Number.MAX_VALUE,t*Number.MAX_VALUE,t*Number.MAX_VALUE)}static getBounds(e,t,i){const s=i||this.newBound(!1),n=t||this.newBound(!0);for(const r of e)r.xs.x&&(s.x=r.x),r.y>s.y&&(s.y=r.y),r.z>s.z&&(s.z=r.z);return new we(t,i)}dispose(){const e=this.components.get(Pt);for(const t of this._meshes)e.destroy(t);this._meshes=[],this.onDisposed.trigger(Mt.uuid),this.onDisposed.reset()}get(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone();return new we(e,t)}getSphere(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone(),i=Math.abs((t.x-e.x)/2),s=Math.abs((t.y-e.y)/2),n=Math.abs((t.z-e.z)/2),r=new L(e.x+i,e.y+s,e.z+n),o=r.distanceTo(e);return new Ri(r,o)}getMesh(){const e=new we(this._absoluteMin,this._absoluteMax),t=Mt.getDimensions(e),{width:i,height:s,depth:n,center:r}=t,o=new ze(i,s,n),a=new ee(o);return this._meshes.push(a),a.position.copy(r),a}reset(){this._absoluteMin=Mt.newBound(!0),this._absoluteMax=Mt.newBound(!1)}add(e){for(const t of e.items)this.addMesh(t.mesh)}addMesh(e,t){if(!e.geometry.index)return;const i=Mt.getFragmentBounds(e);e.updateMatrixWorld();const s=e.matrixWorld,n=new ne,r=e instanceof ft,o=new Set;if(e instanceof el){t||(t=e.fragment.ids);for(const a of t){const h=e.fragment.getInstancesIDs(a);if(h)for(const c of h)o.add(c)}}else o.add(0);for(const a of o){const h=i.min.clone(),c=i.max.clone();r&&(e.getMatrixAt(a,n),h.applyMatrix4(n),c.applyMatrix4(n)),h.applyMatrix4(s),c.applyMatrix4(s),h.xthis._absoluteMax.x&&(this._absoluteMax.x=h.x),h.y>this._absoluteMax.y&&(this._absoluteMax.y=h.y),h.z>this._absoluteMax.z&&(this._absoluteMax.z=h.z),c.x>this._absoluteMax.x&&(this._absoluteMax.x=c.x),c.y>this._absoluteMax.y&&(this._absoluteMax.y=c.y),c.z>this._absoluteMax.z&&(this._absoluteMax.z=c.z),c.xr.x&&(r.x=c),u>r.y&&(r.y=u),d>r.z&&(r.z=d)}return new we(n,r)}};T(Jl,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let Un=Jl;const _p=class $l extends de{constructor(e){super(e),T(this,"enabled",!0),e.add($l.uuid,this)}async getIsolatedElements(e,t,i){const s=new Set;function n(a){if(s.has(a))return;const h=e.GetLine(t,a);if(h){s.add(a);for(const c in h){const u=h[c];u&&u.constructor.name==="Handle"&&u.value>0?n(u.value):Array.isArray(u)&&u.forEach(d=>{d&&d.constructor.name==="Handle"&&d.value>0&&n(d.value)})}}}for(const a of i)n(a);const r=[];for(const a of s)r.push(a);r.sort((a,h)=>a-h);const o=[];return r.forEach(a=>{const h=e.GetLine(t,a);o.push(h)}),o}async export(e,t,i){return i.forEach(s=>{e.WriteLine(t,s)}),e.SaveModel(t)}async splitIfc(e,t,i){const s=new Uint8Array(t),n=e.OpenModel(s),r=await this.getIsolatedElements(e,n,i),o=e.CreateModel({schema:cc.IFC2X3});return await this.export(e,o,r)}};T(_p,"uuid","6eb0ba2f-71c0-464e-bcec-2d7c335186b2");const eh=class th{constructor(e){T(this,"onProgress",new H),T(this,"inclusive",!1),T(this,"rules",[]),T(this,"ids",{}),T(this,"needsUpdate",new Map),T(this,"components"),this.components=e}static import(e,t){const i=th.importers.get(t.type);return i?i(e,t):(console.warn("Invalid query data:.",t),null)}static importRules(e){const t=[];for(const i of e){const s={};for(const n in i){const r=i[n];r.regexp?s[n]=new RegExp(r.value):s[n]=r}t.push(s)}return t}static importIds(e){const t={};for(const i in e.ids)t[i]=new Set(e.ids[i]);return t}clear(e){if(e===void 0){this.ids={},this.needsUpdate.clear();return}delete this.ids[e],this.needsUpdate.delete(e)}addID(e,t){this.ids[e]||(this.ids[e]=new Set),this.ids[e].add(t)}getData(){const e={};for(const i in this.ids)e[i]=Array.from(this.ids[i]);const t=this.exportRules();return{name:this.name,inclusive:this.inclusive,type:"IfcFinderQuery",ids:e,rules:t}}exportRules(){const e=[];for(const t of this.rules){const i={};for(const s in t){const n=t[s];n instanceof RegExp?i[s]={regexp:!0,value:n.source}:i[s]=n}e.push(i)}return e}findInFile(e,t){return new Promise(i=>{const s=new FileReader,n=new TextDecoder("utf-8"),r=1e4*1024,o=1e3;let a=0;const h=/;/,c=()=>{if(a>=t.size){i();return}const u=Math.min(a+r+o,t.size),d=t.slice(a,u);s.readAsArrayBuffer(d)};s.onload=()=>{if(!(s.result instanceof ArrayBuffer))return;const u=new Uint8Array(s.result),d=n.decode(u).split(h);d.shift(),this.findInLines(e,d),this.onProgress.trigger(a/t.size),a+=r,c()},c()})}getIdFromLine(e){const t=e.slice(e.indexOf("#")+1,e.indexOf("="));return parseInt(t,10)}testRules(e){let t=null,i=null,s=null,n=!1;for(const r of this.rules){if(r.type==="category"){if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;break}if(!r.value.test(t)){if(this.inclusive)continue;n=!1;break}n=!0;continue}if(i===null&&(i=this.getAttributesFromLine(e),i===null)){if(this.inclusive)continue;n=!1;break}if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;n=!1;break}if(s===null&&(s=Object.keys(new dc[t]),s=s.slice(2),s===null)){if(this.inclusive)continue;n=!1;break}if(r.type==="property"){const{name:o,value:a}=r;if(!a.test(e)){if(this.inclusive)continue;n=!1;break}let h=!1;for(let c=0;c"&&parseFloat(f)>a){c=!0;break}else if(h===">="&&parseFloat(f)>=a){c=!0;break}else if(h==="<="&&parseFloat(f)<=a){c=!0;break}}}if(c)n=!0;else if(!this.inclusive){n=!1;break}}}return n}getCategoryFromLine(e){const t=e.indexOf("=")+1,i=e.indexOf("("),s=e.slice(t,i).trim();return ff[s]||null}getAttributesFromLine(e){const t=/\((.*)\)/,i=e.match(t);if(!(i&&i[1]))return null;const s=/,(?![^()]*\))/g;return i[1].split(s).map(n=>n.trim())}};T(eh,"importers",new Map);let Vt=eh;class Da{constructor(e){T(this,"list",new Map),T(this,"id",gi.generateUUID()),T(this,"mode","intersect"),T(this,"_components"),this._components=e}get queries(){return new Set(this.list.values())}get items(){const e=[];for(const t of this.queries)e.push(t.items);return this.mode==="combine"?Ki.combine(e):Ki.intersect(e)}add(e){if(this.list.has(e.name))throw new Error(`This group already has a query with the name ${e.name}.`);this.list.set(e.name,e)}clear(e){for(const t of this.queries)t.clear(e)}import(e){this.mode=e.mode,this.id=e.id;for(const t in e.queries){const i=Vt.import(this._components,e.queries[t]);i&&this.list.set(t,i)}}export(){const e={};for(const[t,i]of this.list)e[t]=i.export();return{mode:this.mode,id:this.id,queries:e}}async update(e,t){for(const i of this.queries){const s=i.needsUpdate.get(e);(s===void 0||s)&&await i.update(e,t)}}}const ih=class sh extends Vt{constructor(e,t){super(e),T(this,"name"),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(ue),t=[];for(const i in this.ids){const s=this.ids[i],n=e.groups.get(i);if(!n){console.warn(`Model ${i} not found!`);continue}const r=n.getFragmentMap(s);t.push(r)}return Ki.combine(t)}export(){const e=this.getData();return e.type=sh.type,e}async update(e,t){this.ids[e]=new Set,await this.findInFile(e,t),this.needsUpdate.set(e,!1)}findInLines(e,t){for(const i of t)if(this.testRules(i)){const s=this.getIdFromLine(i);this.addID(e,s)}}};T(ih,"type","IfcBasicQuery");let _a=ih;Vt.importers.set(_a.type,(l,e)=>{const t=new _a(l,{name:e.name,rules:Vt.importRules(e.rules),inclusive:e.inclusive});return t.ids=Vt.importIds(e),t});const nh=class rh extends Vt{constructor(e,t){super(e),T(this,"name"),T(this,"psets",[]),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(st),t=this.components.get(ue),i=[];for(const s in this.ids){const n=t.groups.get(s);if(!n){console.log(`Model not found: ${s}.`);continue}const r=this.ids[s];for(const o of r){const a=e.getEntityRelations(s,o,"DefinesOcurrence");if(a){const h=n.getFragmentMap(a);i.push(h)}}}return Ki.combine(i)}export(){const e=this.getData();return e.type=rh.type,e}async update(e,t){await this.findInFile(e,t);const i=new Set;for(const s of this.psets){const n=this.getAttributesFromLine(s);if(n===null)continue;const r=n[4].replace("(","[").replace(")","]").replace(/#/g,""),o=JSON.parse(r);for(const a of o){const h=this.ids[e];if(h&&h.has(a)){const c=this.getIdFromLine(s);i.add(c);break}}}this.ids[e]=i,this.psets=[],this.needsUpdate.set(e,!1)}findInLines(e,t){for(const i of t){const s=this.getCategoryFromLine(i);if(s==="IfcPropertySet"){this.psets.push(i);continue}if(s==="IfcPropertySingleValue"&&this.testRules(i)){const n=this.getIdFromLine(i);this.addID(e,n)}}}};T(nh,"type","IfcPropertyQuery");let Ua=nh;Vt.importers.set(Ua.type,(l,e)=>{const t=new Ua(l,{name:e.name,inclusive:e.inclusive,rules:Vt.importRules(e.rules)});return t.ids=Vt.importIds(e),t});const Up=class oh extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Map),e.add(oh.uuid,this)}get queries(){const e=new Set;for(const[,t]of this.list)for(const i of t.queries)e.add(i);return e}import(e){for(const t in e){const i=new Da(this.components);i.import(e[t]),this.list.set(t,i)}}export(){const e={};for(const[t,i]of this.list)e[t]=i.export();return e}create(){const e=new Da(this.components);return this.list.set(e.id,e),e}delete(e){this.list.delete(e)}clear(){this.list.clear()}};T(Up,"uuid","0da7ad77-f734-42ca-942f-a074adfd1e3a");const ah=class lh extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",{}),T(this,"onDisposed",new H),T(this,"onFragmentsDisposed",t=>{const{groupID:i,fragmentIDs:s}=t;for(const n in this.list){const r=this.list[n],o=Object.keys(r);if(o.includes(i))delete r[i],Object.values(r).length===0&&delete this.list[n];else for(const a of o){const h=r[a];for(const c of s)delete h.map[c];Object.values(h).length===0&&delete r[a]}}}),e.add(lh.uuid,this),e.get(ue).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(ue).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(e){for(const t in this.list){const i=this.list[t];for(const s in i){const n=i[s];delete n.map[e]}}}find(e){const t=this.components.get(ue);if(!e){const r={};for(const[o,a]of t.list)r[o]=new Set(a.ids);return r}const i=Object.keys(e).length,s={};for(const r in e){const o=e[r];if(!this.list[r]){console.warn(`Classification ${r} does not exist.`);continue}for(const a of o){const h=this.list[r][a];if(h)for(const c in h.map){s[c]||(s[c]=new Map);for(const u of h.map[c]){const d=s[c].get(u);d===void 0?s[c].set(u,1):s[c].set(u,d+1)}}}}const n={};for(const r in s){const o=s[r];for(const[a,h]of o){if(h===void 0)throw new Error("Malformed fragments map!");h===i&&(n[r]||(n[r]=new Set),n[r].add(a))}}return n}byModel(e,t){this.list.models||(this.list.models={});const i=this.list.models;i[e]||(i[e]={map:{},id:null,name:e});const s=i[e];for(const[n,r]of t.data){const o=r[0];for(const a of o){const h=t.keyFragments.get(a);h&&(s.map[h]||(s.map[h]=new Set),s.map[h].add(n))}}}async byPredefinedType(e){var t;this.list.predefinedTypes||(this.list.predefinedTypes={});const i=this.list.predefinedTypes,s=e.getAllPropertiesIDs();for(const n of s){const r=await e.getProperties(n);if(!r)continue;const o=String((t=r.PredefinedType)==null?void 0:t.value).toUpperCase();i[o]||(i[o]={map:{},id:null,name:o});const a=i[o];for(const[h,c]of e.data){const u=c[0];for(const d of u){const f=e.keyFragments.get(d);if(!f)throw new Error("Fragment ID not found!");a.map[f]||(a.map[f]=new Set),a.map[f].add(r.expressID)}}}}byEntity(e){this.list.entities||(this.list.entities={});for(const[t,i]of e.data){const s=i[1][1],n=_n[s];this.saveItem(e,"entities",n,t)}}async byIfcRel(e,t,i){mi.isRel(t)&&await mi.getRelationMap(e,t,async(s,n)=>{const{name:r}=await mi.getEntityName(e,s);for(const o of n)this.saveItem(e,i,r??"NO REL NAME",o)})}async bySpatialStructure(e,t={}){var i,s;const n=this.components.get(st),r=n.relationMaps[e.uuid];if(!r)throw new Error(`Classifier: model relations of ${e.name||e.uuid} have to exists to group by spatial structure.`);const o=t.systemName??"spatialStructures",a=t.useProperties===void 0||t.useProperties;for(const[h]of r){if(t.isolate){const f=e.data.get(h);if(!f)continue;const m=f[1][1];if(m===void 0||!t.isolate.has(m))continue}const c=n.getEntityRelations(e,h,"Decomposes");if(c)for(const f of c){let m=f.toString();if(a){const p=await e.getProperties(f);if(!p)continue;m=(i=p.Name)==null?void 0:i.value}this.saveItem(e,o,m,h,f)}const u=n.getEntityRelations(e,h,"ContainsElements");if(!u)continue;let d=h.toString();if(a){const f=await e.getProperties(h);if(!f)continue;d=(s=f.Name)==null?void 0:s.value}for(const f of u){this.saveItem(e,o,d,f,h);const m=n.getEntityRelations(e,Number(f),"IsDecomposedBy");if(m)for(const p of m)this.saveItem(e,o,d,p,h)}}}setColor(e,t,i=!1){const s=this.components.get(ue);for(const n in e){const r=s.list.get(n);if(!r)continue;const o=e[n];r.setColor(t,o,i)}}resetColor(e){const t=this.components.get(ue);for(const i in e){const s=t.list.get(i);if(!s)continue;const n=e[i];s.resetColor(n)}}export(){const e={};for(const t in this.list){e[t]={};const i=this.list[t];for(const s in i){const n=i[s];e[t][s]={map:Ki.export(n.map),name:n.name,id:n.id}}}return e}import(e){for(const t in e){this.list[t]||(this.list[t]={});const i=e[t];for(const s in i){const n=i[s];this.list[t][s]={map:Ki.import(n.map),name:n.name,id:n.id}}}}saveItem(e,t,i,s,n=null){this.list[t]||(this.list[t]={});const r=e.data.get(s);if(r)for(const o of r[0]){const a=e.keyFragments.get(o);if(a){const h=this.list[t];h[i]||(h[i]={map:{},id:n,name:i}),h[i].map[a]||(h[i].map[a]=new Set),h[i].map[a].add(s)}}}};T(ah,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let Xr=ah;const Bp=class hh extends de{constructor(e){super(e),T(this,"onDisposed",new H),T(this,"enabled",!0),T(this,"height",10),T(this,"groupName","spatialStructures"),T(this,"list",new Set),e.add(hh.uuid,this)}dispose(){this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}set(e){if(!this.enabled)return;const t=this.components.get(Xr),i=this.components.get(ue),s=e?1:-1;let n=0;const r=t.list[this.groupName],o=new ne;for(const a in r){o.elements[13]=n*s*this.height;for(const h in r[a].map){const c=i.list.get(h),u=a+h,d=this.list.has(u);if(!c||e&&d||!e&&!d)continue;e?this.list.add(u):this.list.delete(u);const f=r[a].map[h];c.applyTransform(f,o),c.mesh.computeBoundingSphere(),c.mesh.computeBoundingBox()}n++}}};T(Bp,"uuid","d260618b-ce88-4c7d-826c-6debb91de3e2");const ch=class dh extends de{constructor(e){super(e),T(this,"enabled",!0),this.components.add(dh.uuid,this)}set(e,t){const i=this.components.get(ue);if(!t){for(const[s,n]of i.list)n&&(n.setVisibility(e),this.updateCulledVisibility(n));return}for(const s in t){const n=t[s],r=i.list.get(s);r&&(r.setVisibility(e,n),this.updateCulledVisibility(r))}}isolate(e){this.set(!1),this.set(!0,e)}updateCulledVisibility(e){const t=this.components.get(Xu);for(const[i,s]of t.list){const n=s.colorMeshes.get(e.id);n&&(n.count=e.mesh.count)}}};T(ch,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");let zp=ch;class kp extends Oo{constructor(){super(...arguments),T(this,"minGeometrySize",10),T(this,"minAssetsSize",1e3),T(this,"maxTriangles",null)}}const Vp=class uh extends de{constructor(e){super(e),T(this,"onGeometryStreamed",new Bt),T(this,"onAssetStreamed",new Bt),T(this,"onProgress",new Bt),T(this,"onIfcLoaded",new Bt),T(this,"onDisposed",new H),T(this,"settings",new kp),T(this,"enabled",!0),T(this,"webIfc",new ji),T(this,"_nextAvailableID",0),T(this,"_splittedGeometries",new Map),T(this,"_spatialTree",new bl),T(this,"_metaData",new xl),T(this,"_visitedGeometries",new Map),T(this,"_streamSerializer",new tl),T(this,"_geometries",new Map),T(this,"_geometryCount",0),T(this,"_civil",new Ll),T(this,"_groupSerializer",new $a),T(this,"_assets",[]),T(this,"_meshesWithHoles",new Set),this.components.add(uh.uuid,this),this.settings.excludedCategories.add(Ja)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(e){await this.readIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async streamFromCallBack(e){await this.streamIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async readIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModel(e,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModelFromCallback(e,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamAllGeometries(){console.log("Converting geometries to tiles...");const{minGeometrySize:e,minAssetsSize:t}=this.settings;this._spatialTree.setUp(this.webIfc);const i=this.webIfc.GetIfcEntityList(0),s=[[]],n=new kt;n.ifcMetadata={name:"",description:"",...this._metaData.getNameInfo(this.webIfc),...this._metaData.getDescriptionInfo(this.webIfc),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let r=0,o=0;for(const m of i){if(!this.webIfc.IsIfcElement(m)&&m!==yi||this.settings.excludedCategories.has(m))continue;const p=this.webIfc.GetLineIDsWithType(0,m),I=p.size();for(let E=0;Ee&&(r=0,o++,s.push([]));const C=p.get(E);s[o].push(C);const v=this.webIfc.GetLine(0,C);if(v.GlobalId){const S=(v==null?void 0:v.GlobalId.value)||(v==null?void 0:v.GlobalId);n.globalToExpressIDs.set(S,C)}const g=this._spatialTree.itemsByFloor[C]||0;n.data.set(C,[[],[g,m]]),r++}}this._spatialTree.cleanUp();let a=.01,h=0;for(const m of s){h++,this.webIfc.StreamMeshes(0,m,I=>{this.getMesh(this.webIfc,I,n)}),this._geometryCount>this.settings.minGeometrySize&&await this.streamGeometries(),this._assets.length>t&&await this.streamAssets();const p=h/s.length;p>a&&(a+=.01,a=Math.max(a,p),await this.onProgress.trigger(Math.round(a*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:c,transparent:u}=n.geometryIDs;for(const[m,{index:p,uuid:I}]of this._visitedGeometries)n.keyFragments.set(p,I),(m>1?c:u).set(m,p);Ml.get(n,this.webIfc);const d=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(d),n.civilData=this._civil.read(this.webIfc);const f=this._groupSerializer.export(n);await this.onIfcLoaded.trigger(f),n.dispose(!0)}cleanUp(){try{this.webIfc.Dispose()}catch{}this.webIfc=null,this.webIfc=new ji,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(e,t,i){const s=t.geometries.size(),n=t.expressID,r={id:n,geometries:[]};for(let o=0;othis.settings.minGeometrySize&&await this.outputGeometries(e);await this.outputGeometries(e),this._geometries.clear(),this._geometryCount=0}async outputGeometries(e){let t=this._streamSerializer.export(e),i={};for(const[s,{boundingBox:n,hasHoles:r}]of e)i[s]={boundingBox:n,hasHoles:r};await this.onGeometryStreamed.trigger({data:i,buffer:t}),i=null,t=null,e.clear()}registerGeometryData(e,t,i,s,n,r){const o=this._visitedGeometries.get(r);if(o===void 0)throw new Error("Error getting geometry data for streaming!");const a=e.data.get(t);if(!a)throw new Error("Data not found!");a[0].push(o.index);const{x:h,y:c,z:u,w:d}=i.color,f=[h,c,u,d],m=i.flatTransformation;s.geometries.push({color:f,geometryID:n,transformation:m})}};T(Vp,"uuid","d9999a00-e1f5-4d3f-8cfe-c56e08609764");class Yp extends Oo{constructor(){super(...arguments),T(this,"propertiesSize",100)}}class Gp extends de{constructor(){super(...arguments),T(this,"onPropertiesStreamed",new Bt),T(this,"onProgress",new Bt),T(this,"onIndicesStreamed",new Bt),T(this,"onDisposed",new H),T(this,"enabled",!0),T(this,"settings",new Yp),T(this,"webIfc",new ji)}async dispose(){this.onIndicesStreamed.reset(),this.onPropertiesStreamed.reset(),this.webIfc=null,this.onDisposed.reset()}async streamFromBuffer(e){await this.readIfcFile(e),await this.streamAllProperties(),this.cleanUp()}async streamFromCallBack(e){await this.streamIfcFile(e),await this.streamAllProperties(),this.cleanUp()}async readIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModel(e,this.settings.webIfc)}async streamIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModelFromCallback(e,this.settings.webIfc)}async streamAllProperties(){const{propertiesSize:e}=this.settings,t=new Set(this.webIfc.GetIfcEntityList(0)),i=new Set([go,Co,To,Hn,yi]);for(const o of i)t.add(o);let s=.01,n=0;for(const o of t){if(n++,Dl.has(o))continue;const a=i.has(o),h=this.webIfc.GetLineIDsWithType(0,o),c=h.size();let u=0;for(let d=0;ds&&(s=Math.round(s*100)/100,await this.onProgress.trigger(s),s+=.01)}await this.onProgress.trigger(1);const r=await this.components.get(st).processFromWebIfc(this.webIfc,0);await this.onIndicesStreamed.trigger(r)}cleanUp(){this.webIfc.Dispose(),this.webIfc=null,this.webIfc=new ji}}T(Gp,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");class fh{constructor(e,t,i){T(this,"title"),T(this,"guid",Wt.create()),T(this,"clippingPlanes",new ei),T(this,"camera",{aspectRatio:1,fov:60,direction:{x:0,y:0,z:0},position:{x:0,y:0,z:0}}),T(this,"exceptionComponents",new ei),T(this,"selectionComponents",new ei),T(this,"componentColors",new Ct),T(this,"spacesVisible",!1),T(this,"spaceBoundariesVisible",!1),T(this,"openingsVisible",!1),T(this,"defaultVisibility",!0),T(this,"_components"),T(this,"world");const s={setCamera:!0,...i},{data:n,setCamera:r}=s;this._components=e,this.world=t,n&&(this.guid=n.guid??this.guid,this.set(n)),r&&this.updateCamera()}get _selectionModelIdMap(){const e=this._components.get(ue),t={};for(const[i,s]of e.groups){i in t||(t[i]=new Set);for(const n of this.selectionComponents){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return t}get _exceptionModelIdMap(){const e=this._components.get(ue),t={};for(const[i,s]of e.groups){i in t||(t[i]=new Set);for(const n of this.exceptionComponents){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return t}get selection(){return this._components.get(ue).modelIdToFragmentIdMap(this._selectionModelIdMap)}get exception(){return this._components.get(ue).modelIdToFragmentIdMap(this._exceptionModelIdMap)}get projection(){return"fov"in this.camera?"Perspective":"Orthographic"}get position(){const e=this._components.get(ue),{position:t}=this.camera,{x:i,y:s,z:n}=t,r=new L(i,s,n);return e.applyBaseCoordinateSystem(r,new ne),r}get direction(){const{direction:e}=this.camera,{x:t,y:i,z:s}=e;return new L(t,i,s)}get _managerVersion(){return this._components.get(Ke).config.version}get topics(){return[...this._components.get(Ke).list.values()].filter(e=>e.viewpoints.has(this.guid))}addComponentsFromMap(e){const t=this._components.get(ue).fragmentIdMapToGuids(e);this.selectionComponents.add(...t),this._components.get(zt).list.set(this.guid,this)}set(e){const t=e,i=this;for(const s in e){if(s==="guid")continue;const n=t[s];if(s==="selectionComponents"){this.selectionComponents.clear(),this.selectionComponents.add(...n);continue}if(s==="exceptionComponents"){this.exceptionComponents.clear(),this.exceptionComponents.add(...n);continue}s in this&&(i[s]=n)}return this._components.get(zt).list.set(this.guid,this),this}async go(e,t=!0){const{camera:i}=e??this.world;if(!i.hasCameraControls())throw new Error("Viewpoint: the world's camera need controls to set the viewpoint.");i instanceof uf&&i.projection.set(this.projection);const s=new L(this.camera.position.x,this.camera.position.y,this.camera.position.z),n=new L(this.camera.direction.x,this.camera.direction.y,this.camera.direction.z);if(s.equals(new L)&&n.equals(new L))return;const r=this.position,o=this.direction;let a={x:r.x+o.x*80,y:r.y+o.y*80,z:r.z+o.z*80};const h=this.selection;if(Object.keys(h).length===0){const c=this._components.get(pt).get(this.world).castRayFromVector(r,this.direction);c&&(a=c.point)}else{const c=this._components.get(Un);c.reset(),c.addFragmentIdMap(h),a=c.getSphere().center,c.reset()}await i.controls.setLookAt(r.x,r.y,r.z,a.x,a.y,a.z,t)}updateCamera(e){const{camera:t,renderer:i}=e??this.world;if(!i)throw new Error("Viewpoint: the world needs to have a renderer!");if(!t.hasCameraControls())throw new Error("Viewpoint: world's camera need camera controls!");const s=new L;t.controls.getPosition(s);const n=t.three,r=new L(0,0,-1).applyEuler(n.rotation),{width:o,height:a}=i.getSize();let h=o/a;Number.isNaN(h)&&(h=1);const c=this._components.get(ue);s.applyMatrix4(c.baseCoordinationMatrix.clone().invert());const u={aspectRatio:h,position:{x:s.x,y:s.y,z:s.z},direction:{x:r.x,y:r.y,z:r.z}};n instanceof Qa?this.camera={...u,fov:n.fov}:n instanceof si&&(this.camera={...u,viewToWorldScale:n.top-n.bottom}),this._components.get(zt).list.set(this.guid,this)}applyVisibility(){const e=this._components.get(zp);e.set(this.defaultVisibility),e.set(!this.defaultVisibility,this.exception),e.set(!0,this.selection)}applyColors(){const e=this._components.get(zt),t=this._components.get(ue),i=this._components.get(Xr);for(const[s,n]of this.componentColors){const r=t.guidToFragmentIdMap(n);i.setColor(r,s,e.config.overwriteColors)}}resetColors(){const e=this._components.get(ue),t=this._components.get(Xr);for(const[i,s]of this.componentColors){const n=e.guidToFragmentIdMap(s);t.resetColor(n)}}async createComponentTags(e){var t,i;const s=this._components.get(ue),n=this._components.get(Ke);let r="";if(n.config.includeSelectionTag){const o=e==="selection"?this._selectionModelIdMap:this._exceptionModelIdMap;for(const a in o){const h=s.groups.get(a);if(!h)continue;const c=o[a];for(const u of c){const d=await h.getProperties(u);if(!d)continue;const f=(t=d.GlobalId)==null?void 0:t.value;if(!f)continue;const m=(i=d.Tag)==null?void 0:i.value;let p=null;m&&(p=`AuthoringToolId="${m}"`),r+=` + `}processMarkupComment(e){const{Guid:t,Date:i,Author:s,Comment:n,Viewpoint:r}=e;if(!(t&&i&&s&&br))return null;const o=this.components.get(Bt),a=new br(this.components,n??"");return a.guid=t,a.date=new Date(i),a.author=s,a.viewpoint=r!=null&&r.Guid?o.list.get(r.Guid):void 0,a.modifiedAuthor=e.ModifiedAuthor,a.modifiedDate=e.ModifiedDate?new Date(e.ModifiedDate):void 0,a}getMarkupComments(e,t){var i;let s;if(t==="2.1"&&(s=e.Comment),t==="3"&&(s=(i=e.Topic.Comments)==null?void 0:i.Comment),!s)return[];s=Array.isArray(s)?s:[s];const n=s.map(r=>this.processMarkupComment(r)).filter(r=>r);return Array.isArray(n)?n:[n]}getMarkupLabels(e,t){var i;let s;return t==="2.1"&&(s=e.Topic.Labels),t==="3"&&(s=(i=e.Topic.Labels)==null?void 0:i.Label),s?Array.isArray(s)?s:[s]:[]}getMarkupViewpoints(e,t){var i;let s;return t==="2.1"&&(s=e.Viewpoints),t==="3"&&(s=(i=e.Topic.Viewpoints)==null?void 0:i.ViewPoint),s?(s=Array.isArray(s)?s:[s],s):[]}getMarkupRelatedTopics(e,t){var i;let s;return t==="2.1"&&(s=e.Topic.RelatedTopic),t==="3"&&(s=(i=e.Topic.RelatedTopics)==null?void 0:i.RelatedTopic),s?(Array.isArray(s)?s:[s]).map(n=>n.Guid):[]}async load(e,t){var i;const{fallbackVersionOnImport:s,ignoreIncompleteTopicsOnImport:n,updateExtensionsOnImport:r}=this.config,o=new da;await o.loadAsync(e);const a=Object.values(o.files);let l=s;const h=a.find(g=>g.name.endsWith(".version"));if(h){const g=await h.async("string"),w=Ts.xmlParser.parse(g).Version.VersionId;l=String(w)}if(!(l&&(l==="2.1"||l==="3")))throw new Error(`BCFTopics: ${l} is not supported.`);const d=a.find(g=>g.name.endsWith(".extensions"));if(r&&d){const g=await d.async("string");Df(this,g)}const u=[],f=this.components.get(Bt),m=a.filter(g=>g.name.endsWith(".bcfv"));for(const g of m){const w=await g.async("string"),C=Ts.xmlParser.parse(w).VisualizationInfo;if(!C){console.warn("Missing VisualizationInfo in Viewpoint");continue}const v={},{Guid:O,ClippingPlanes:A,Components:b,OrthogonalCamera:N,PerspectiveCamera:D}=C;if(O&&(v.guid=O),b){const{Selection:F,Visibility:L}=b;if(F&&F.Component){const U=Array.isArray(F.Component)?F.Component:[F.Component];v.selectionComponents=U.map(W=>W.IfcGuid).filter(W=>W)}if(L&&"DefaultVisibility"in L&&(v.defaultVisibility=L.DefaultVisibility),L&&L.Exceptions&&"Component"in L.Exceptions){const{Component:U}=L.Exceptions,W=Array.isArray(U)?U:[U];v.exceptionComponents=W.map(z=>z.IfcGuid).filter(z=>z)}let R;l==="2.1"&&(R=b.ViewSetupHints),l==="3"&&(R=(i=b.Visibility)==null?void 0:i.ViewSetupHints),R&&("OpeningsVisible"in R&&(v.openingsVisible=R.OpeningsVisible),"SpacesVisible"in R&&(v.spacesVisible=R.SpacesVisible),"SpaceBoundariesVisible"in R&&(v.spaceBoundariesVisible=R.SpaceBoundariesVisible))}if(N||D){const F=C.PerspectiveCamera??C.OrthogonalCamera,{CameraViewPoint:L,CameraDirection:R}=F,U=new x(Number(L.X),Number(L.Z),Number(-L.Y)),W=new x(Number(R.X),Number(R.Z),Number(-R.Y)),z={position:{x:U.x,y:U.y,z:U.z},direction:{x:W.x,y:W.y,z:W.z},aspectRatio:"AspectRatio"in F?F.AspectRatio:1};"ViewToWorldScale"in F&&(v.camera={...z,viewToWorldScale:F.ViewToWorldScale}),"FieldOfView"in F&&(v.camera={...z,fov:F.FieldOfView})}const _=new Hl(this.components,t,{data:v,setCamera:!1});if(b){const{Coloring:F}=b;if(F&&F.Color){const L=Array.isArray(F.Color)?F.Color:[F.Color];for(const R of L){const{Color:U,Component:W}=R,z=(Array.isArray(W)?W:[W]).map(q=>q.IfcGuid);_.componentColors.set(U,z)}}}if(u.push(_),A){const F=this.components.get(Xi),L=Array.isArray(A.ClippingPlane)?A.ClippingPlane:[A.ClippingPlane];for(const R of L){const{Location:U,Direction:W}=R;if(!(U&&W))continue;const z=new x(U.X,U.Z,-U.Y),q=new x(W.X,-W.Z,W.Y),X=F.createFromNormalAndCoplanarPoint(t,q,z);X.visible=!1,X.enabled=!1,_.clippingPlanes.add(X)}}}const p={},E=[],I=a.filter(g=>g.name.endsWith(".bcf"));for(const g of I){const w=await g.async("string"),C=Ts.xmlParser.parse(w).Markup,v=C.Topic,{Guid:O,TopicType:A,TopicStatus:b,Title:N,CreationDate:D,CreationAuthor:_}=v;if(n&&!(O&&A&&b&&N&&D&&_))continue;const F=new Ia(this.components);F.guid=O??F.guid;const L=this.getMarkupRelatedTopics(C,l);p[F.guid]=new Set(L),F.type=A??F.type,F.status=b??F.status,F.title=N??F.title,F.creationDate=D?new Date(D):F.creationDate,F.creationAuthor=_??F.creationAuthor,F.serverAssignedId=v.ServerAssignedId,F.priority=v.Priority,F.index=v.Index,F.modifiedDate=v.ModifiedDate?new Date(v.ModifiedDate):void 0,F.modifiedAuthor=v.ModifiedAuthor,F.dueDate=v.DueDate?new Date(v.DueDate):void 0,F.assignedTo=v.AssignedTo,F.description=v.Description,F.stage=v.Stage;const R=this.getMarkupLabels(C,l);for(const z of R)F.labels.add(z);const U=this.getMarkupComments(C,l);for(const z of U)F.comments.set(z.guid,z);const W=this.getMarkupViewpoints(C,l);for(const z of W){if(!(z&&z.Guid))continue;const q=f.list.get(z.Guid);q&&F.viewpoints.add(q.guid)}this.list.set(F.guid,F),E.push(F)}for(const g in p){const w=this.list.get(g);if(!w)continue;const C=p[g];for(const v of C)w.relatedTopics.add(v)}return this.onBCFImported.trigger(E),{viewpoints:u,topics:E}}};T(Io,"uuid","de977976-e4f6-4e4f-a01a-204727839802");T(Io,"xmlParser",new Al.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let je=Io;const Nl=class Mt extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"onDisposed",new Y),T(this,"_absoluteMin"),T(this,"_absoluteMax"),T(this,"_meshes",[]),this.components.add(Mt.uuid,this),this._absoluteMin=Mt.newBound(!0),this._absoluteMax=Mt.newBound(!1)}static getDimensions(e){const{min:t,max:i}=e,s=Math.abs(i.x-t.x),n=Math.abs(i.y-t.y),r=Math.abs(i.z-t.z),o=new x;return o.subVectors(i,t).divideScalar(2).add(t),{width:s,height:n,depth:r,center:o}}static newBound(e){const t=e?1:-1;return new x(t*Number.MAX_VALUE,t*Number.MAX_VALUE,t*Number.MAX_VALUE)}static getBounds(e,t,i){const s=i||this.newBound(!1),n=t||this.newBound(!0);for(const r of e)r.xs.x&&(s.x=r.x),r.y>s.y&&(s.y=r.y),r.z>s.z&&(s.z=r.z);return new ye(t,i)}dispose(){const e=this.components.get(Nt);for(const t of this._meshes)e.destroy(t);this._meshes=[],this.onDisposed.trigger(Mt.uuid),this.onDisposed.reset()}get(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone();return new ye(e,t)}getSphere(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone(),i=Math.abs((t.x-e.x)/2),s=Math.abs((t.y-e.y)/2),n=Math.abs((t.z-e.z)/2),r=new x(e.x+i,e.y+s,e.z+n),o=r.distanceTo(e);return new gi(r,o)}getMesh(){const e=new ye(this._absoluteMin,this._absoluteMax),t=Mt.getDimensions(e),{width:i,height:s,depth:n,center:r}=t,o=new Be(i,s,n),a=new ee(o);return this._meshes.push(a),a.position.copy(r),a}reset(){this._absoluteMin=Mt.newBound(!0),this._absoluteMax=Mt.newBound(!1)}add(e){for(const t of e.items)this.addMesh(t.mesh)}addMesh(e,t){if(!e.geometry.index)return;const i=Mt.getFragmentBounds(e);e.updateMatrixWorld();const s=e.matrixWorld,n=new ne,r=e instanceof It,o=new Set;if(e instanceof _a){t||(t=e.fragment.ids);for(const a of t){const l=e.fragment.getInstancesIDs(a);if(l)for(const h of l)o.add(h)}}else o.add(0);for(const a of o){const l=i.min.clone(),h=i.max.clone();r&&(e.getMatrixAt(a,n),l.applyMatrix4(n),h.applyMatrix4(n)),l.applyMatrix4(s),h.applyMatrix4(s),l.xthis._absoluteMax.x&&(this._absoluteMax.x=l.x),l.y>this._absoluteMax.y&&(this._absoluteMax.y=l.y),l.z>this._absoluteMax.z&&(this._absoluteMax.z=l.z),h.x>this._absoluteMax.x&&(this._absoluteMax.x=h.x),h.y>this._absoluteMax.y&&(this._absoluteMax.y=h.y),h.z>this._absoluteMax.z&&(this._absoluteMax.z=h.z),h.xr.x&&(r.x=h),d>r.y&&(r.y=d),u>r.z&&(r.z=u)}return new ye(n,r)}};T(Nl,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let On=Nl;const Uf=class Pl extends de{constructor(e){super(e),T(this,"enabled",!0),e.add(Pl.uuid,this)}async getIsolatedElements(e,t,i){const s=new Set;function n(a){if(s.has(a))return;const l=e.GetLine(t,a);if(l){s.add(a);for(const h in l){const d=l[h];d&&d.constructor.name==="Handle"&&d.value>0?n(d.value):Array.isArray(d)&&d.forEach(u=>{u&&u.constructor.name==="Handle"&&u.value>0&&n(u.value)})}}}for(const a of i)n(a);const r=[];for(const a of s)r.push(a);r.sort((a,l)=>a-l);const o=[];return r.forEach(a=>{const l=e.GetLine(t,a);o.push(l)}),o}async export(e,t,i){return i.forEach(s=>{e.WriteLine(t,s)}),e.SaveModel(t)}async splitIfc(e,t,i){const s=new Uint8Array(t),n=e.OpenModel(s),r=await this.getIsolatedElements(e,n,i),o=e.CreateModel({schema:Vc.IFC2X3});return await this.export(e,o,r)}};T(Uf,"uuid","6eb0ba2f-71c0-464e-bcec-2d7c335186b2");const bl=class xl{constructor(e){T(this,"onProgress",new Y),T(this,"inclusive",!1),T(this,"rules",[]),T(this,"ids",{}),T(this,"needsUpdate",new Map),T(this,"components"),this.components=e}static import(e,t){const i=xl.importers.get(t.type);return i?i(e,t):(console.warn("Invalid query data:.",t),null)}static importRules(e){const t=[];for(const i of e){const s={};for(const n in i){const r=i[n];r.regexp?s[n]=new RegExp(r.value):s[n]=r}t.push(s)}return t}static importIds(e){const t={};for(const i in e.ids)t[i]=new Set(e.ids[i]);return t}clear(e){if(e===void 0){this.ids={},this.needsUpdate.clear();return}delete this.ids[e],this.needsUpdate.delete(e)}addID(e,t){this.ids[e]||(this.ids[e]=new Set),this.ids[e].add(t)}getData(){const e={};for(const i in this.ids)e[i]=Array.from(this.ids[i]);const t=this.exportRules();return{name:this.name,inclusive:this.inclusive,type:"IfcFinderQuery",ids:e,rules:t}}exportRules(){const e=[];for(const t of this.rules){const i={};for(const s in t){const n=t[s];n instanceof RegExp?i[s]={regexp:!0,value:n.source}:i[s]=n}e.push(i)}return e}findInFile(e,t){return new Promise(i=>{const s=new FileReader,n=new TextDecoder("utf-8"),r=1e4*1024,o=1e3;let a=0;const l=/;/,h=()=>{if(a>=t.size){i();return}const d=Math.min(a+r+o,t.size),u=t.slice(a,d);s.readAsArrayBuffer(u)};s.onload=()=>{if(!(s.result instanceof ArrayBuffer))return;const d=new Uint8Array(s.result),u=n.decode(d).split(l);u.shift(),this.findInLines(e,u),this.onProgress.trigger(a/t.size),a+=r,h()},h()})}getIdFromLine(e){const t=e.slice(e.indexOf("#")+1,e.indexOf("="));return parseInt(t,10)}testRules(e){let t=null,i=null,s=null,n=!1;for(const r of this.rules){if(r.type==="category"){if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;break}if(!r.value.test(t)){if(this.inclusive)continue;n=!1;break}n=!0;continue}if(i===null&&(i=this.getAttributesFromLine(e),i===null)){if(this.inclusive)continue;n=!1;break}if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;n=!1;break}if(s===null&&(s=Object.keys(new Yc[t]),s=s.slice(2),s===null)){if(this.inclusive)continue;n=!1;break}if(r.type==="property"){const{name:o,value:a}=r;if(!a.test(e)){if(this.inclusive)continue;n=!1;break}let l=!1;for(let h=0;h"&&parseFloat(f)>a){h=!0;break}else if(l===">="&&parseFloat(f)>=a){h=!0;break}else if(l==="<="&&parseFloat(f)<=a){h=!0;break}}}if(h)n=!0;else if(!this.inclusive){n=!1;break}}}return n}getCategoryFromLine(e){const t=e.indexOf("=")+1,i=e.indexOf("("),s=e.slice(t,i).trim();return yu[s]||null}getAttributesFromLine(e){const t=/\((.*)\)/,i=e.match(t);if(!(i&&i[1]))return null;const s=/,(?![^()]*\))/g;return i[1].split(s).map(n=>n.trim())}};T(bl,"importers",new Map);let kt=bl;class Ea{constructor(e){T(this,"list",new Map),T(this,"id",Ii.generateUUID()),T(this,"mode","intersect"),T(this,"_components"),this._components=e}get queries(){return new Set(this.list.values())}get items(){const e=[];for(const t of this.queries)e.push(t.items);return this.mode==="combine"?Wi.combine(e):Wi.intersect(e)}add(e){if(this.list.has(e.name))throw new Error(`This group already has a query with the name ${e.name}.`);this.list.set(e.name,e)}clear(e){for(const t of this.queries)t.clear(e)}import(e){this.mode=e.mode,this.id=e.id;for(const t in e.queries){const i=kt.import(this._components,e.queries[t]);i&&this.list.set(t,i)}}export(){const e={};for(const[t,i]of this.list)e[t]=i.export();return{mode:this.mode,id:this.id,queries:e}}async update(e,t){for(const i of this.queries){const s=i.needsUpdate.get(e);(s===void 0||s)&&await i.update(e,t)}}}const Ml=class Ll extends kt{constructor(e,t){super(e),T(this,"name"),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(ue),t=[];for(const i in this.ids){const s=this.ids[i],n=e.groups.get(i);if(!n){console.warn(`Model ${i} not found!`);continue}const r=n.getFragmentMap(s);t.push(r)}return Wi.combine(t)}export(){const e=this.getData();return e.type=Ll.type,e}async update(e,t){this.ids[e]=new Set,await this.findInFile(e,t),this.needsUpdate.set(e,!1)}findInLines(e,t){for(const i of t)if(this.testRules(i)){const s=this.getIdFromLine(i);this.addID(e,s)}}};T(Ml,"type","IfcBasicQuery");let ga=Ml;kt.importers.set(ga.type,(c,e)=>{const t=new ga(c,{name:e.name,rules:kt.importRules(e.rules),inclusive:e.inclusive});return t.ids=kt.importIds(e),t});const Dl=class _l extends kt{constructor(e,t){super(e),T(this,"name"),T(this,"psets",[]),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(it),t=this.components.get(ue),i=[];for(const s in this.ids){const n=t.groups.get(s);if(!n){console.log(`Model not found: ${s}.`);continue}const r=this.ids[s];for(const o of r){const a=e.getEntityRelations(s,o,"DefinesOcurrence");if(a){const l=n.getFragmentMap(a);i.push(l)}}}return Wi.combine(i)}export(){const e=this.getData();return e.type=_l.type,e}async update(e,t){await this.findInFile(e,t);const i=new Set;for(const s of this.psets){const n=this.getAttributesFromLine(s);if(n===null)continue;const r=n[4].replace("(","[").replace(")","]").replace(/#/g,""),o=JSON.parse(r);for(const a of o){const l=this.ids[e];if(l&&l.has(a)){const h=this.getIdFromLine(s);i.add(h);break}}}this.ids[e]=i,this.psets=[],this.needsUpdate.set(e,!1)}findInLines(e,t){for(const i of t){const s=this.getCategoryFromLine(i);if(s==="IfcPropertySet"){this.psets.push(i);continue}if(s==="IfcPropertySingleValue"&&this.testRules(i)){const n=this.getIdFromLine(i);this.addID(e,n)}}}};T(Dl,"type","IfcPropertyQuery");let Ca=Dl;kt.importers.set(Ca.type,(c,e)=>{const t=new Ca(c,{name:e.name,inclusive:e.inclusive,rules:kt.importRules(e.rules)});return t.ids=kt.importIds(e),t});const Bf=class Ul extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Map),e.add(Ul.uuid,this)}get queries(){const e=new Set;for(const[,t]of this.list)for(const i of t.queries)e.add(i);return e}import(e){for(const t in e){const i=new Ea(this.components);i.import(e[t]),this.list.set(t,i)}}export(){const e={};for(const[t,i]of this.list)e[t]=i.export();return e}create(){const e=new Ea(this.components);return this.list.set(e.id,e),e}delete(e){this.list.delete(e)}clear(){this.list.clear()}};T(Bf,"uuid","0da7ad77-f734-42ca-942f-a074adfd1e3a");const Bl=class zl extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",{}),T(this,"onDisposed",new Y),T(this,"onFragmentsDisposed",t=>{const{groupID:i,fragmentIDs:s}=t;for(const n in this.list){const r=this.list[n],o=Object.keys(r);if(o.includes(i))delete r[i],Object.values(r).length===0&&delete this.list[n];else for(const a of o){const l=r[a];for(const h of s)delete l.map[h];Object.values(l).length===0&&delete r[a]}}}),e.add(zl.uuid,this),e.get(ue).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(ue).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(e){for(const t in this.list){const i=this.list[t];for(const s in i){const n=i[s];delete n.map[e]}}}find(e){const t=this.components.get(ue);if(!e){const r={};for(const[o,a]of t.list)r[o]=new Set(a.ids);return r}const i=Object.keys(e).length,s={};for(const r in e){const o=e[r];if(!this.list[r]){console.warn(`Classification ${r} does not exist.`);continue}for(const a of o){const l=this.list[r][a];if(l)for(const h in l.map){s[h]||(s[h]=new Map);for(const d of l.map[h]){const u=s[h].get(d);u===void 0?s[h].set(d,1):s[h].set(d,u+1)}}}}const n={};for(const r in s){const o=s[r];for(const[a,l]of o){if(l===void 0)throw new Error("Malformed fragments map!");l===i&&(n[r]||(n[r]=new Set),n[r].add(a))}}return n}byModel(e,t){this.list.models||(this.list.models={});const i=this.list.models;i[e]||(i[e]={map:{},id:null,name:e});const s=i[e];for(const[n,r]of t.data){const o=r[0];for(const a of o){const l=t.keyFragments.get(a);l&&(s.map[l]||(s.map[l]=new Set),s.map[l].add(n))}}}async byPredefinedType(e){var t;this.list.predefinedTypes||(this.list.predefinedTypes={});const i=this.list.predefinedTypes,s=e.getAllPropertiesIDs();for(const n of s){const r=await e.getProperties(n);if(!r)continue;const o=String((t=r.PredefinedType)==null?void 0:t.value).toUpperCase();i[o]||(i[o]={map:{},id:null,name:o});const a=i[o];for(const[l,h]of e.data){const d=h[0];for(const u of d){const f=e.keyFragments.get(u);if(!f)throw new Error("Fragment ID not found!");a.map[f]||(a.map[f]=new Set),a.map[f].add(r.expressID)}}}}byEntity(e){this.list.entities||(this.list.entities={});for(const[t,i]of e.data){const s=i[1][1],n=An[s];this.saveItem(e,"entities",n,t)}}async byIfcRel(e,t,i){fi.isRel(t)&&await fi.getRelationMap(e,t,async(s,n)=>{const{name:r}=await fi.getEntityName(e,s);for(const o of n)this.saveItem(e,i,r??"NO REL NAME",o)})}async bySpatialStructure(e,t={}){var i,s;const n=this.components.get(it),r=n.relationMaps[e.uuid];if(!r)throw new Error(`Classifier: model relations of ${e.name||e.uuid} have to exists to group by spatial structure.`);const o=t.systemName??"spatialStructures",a=t.useProperties===void 0||t.useProperties;for(const[l]of r){if(t.isolate){const f=e.data.get(l);if(!f)continue;const m=f[1][1];if(m===void 0||!t.isolate.has(m))continue}const h=n.getEntityRelations(e,l,"Decomposes");if(h)for(const f of h){let m=f.toString();if(a){const p=await e.getProperties(f);if(!p)continue;m=(i=p.Name)==null?void 0:i.value}this.saveItem(e,o,m,l,f)}const d=n.getEntityRelations(e,l,"ContainsElements");if(!d)continue;let u=l.toString();if(a){const f=await e.getProperties(l);if(!f)continue;u=(s=f.Name)==null?void 0:s.value}for(const f of d){this.saveItem(e,o,u,f,l);const m=n.getEntityRelations(e,Number(f),"IsDecomposedBy");if(m)for(const p of m)this.saveItem(e,o,u,p,l)}}}setColor(e,t,i=!1){const s=this.components.get(ue);for(const n in e){const r=s.list.get(n);if(!r)continue;const o=e[n];r.setColor(t,o,i)}}resetColor(e){const t=this.components.get(ue);for(const i in e){const s=t.list.get(i);if(!s)continue;const n=e[i];s.resetColor(n)}}export(){const e={};for(const t in this.list){e[t]={};const i=this.list[t];for(const s in i){const n=i[s];e[t][s]={map:Wi.export(n.map),name:n.name,id:n.id}}}return e}import(e){for(const t in e){this.list[t]||(this.list[t]={});const i=e[t];for(const s in i){const n=i[s];this.list[t][s]={map:Wi.import(n.map),name:n.name,id:n.id}}}}saveItem(e,t,i,s,n=null){this.list[t]||(this.list[t]={});const r=e.data.get(s);if(r)for(const o of r[0]){const a=e.keyFragments.get(o);if(a){const l=this.list[t];l[i]||(l[i]={map:{},id:n,name:i}),l[i].map[a]||(l[i].map[a]=new Set),l[i].map[a].add(s)}}}};T(Bl,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let xr=Bl;const zf=class kl extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"enabled",!0),T(this,"height",10),T(this,"groupName","spatialStructures"),T(this,"list",new Set),e.add(kl.uuid,this)}dispose(){this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}set(e){if(!this.enabled)return;const t=this.components.get(xr),i=this.components.get(ue),s=e?1:-1;let n=0;const r=t.list[this.groupName],o=new ne;for(const a in r){o.elements[13]=n*s*this.height;for(const l in r[a].map){const h=i.list.get(l),d=a+l,u=this.list.has(d);if(!h||e&&u||!e&&!u)continue;e?this.list.add(d):this.list.delete(d);const f=r[a].map[l];h.applyTransform(f,o),h.mesh.computeBoundingSphere(),h.mesh.computeBoundingBox()}n++}}};T(zf,"uuid","d260618b-ce88-4c7d-826c-6debb91de3e2");const Vl=class Yl extends de{constructor(e){super(e),T(this,"enabled",!0),this.components.add(Yl.uuid,this)}set(e,t){const i=this.components.get(ue);if(!t){for(const[s,n]of i.list)n&&(n.setVisibility(e),this.updateCulledVisibility(n));return}for(const s in t){const n=t[s],r=i.list.get(s);r&&(r.setVisibility(e,n),this.updateCulledVisibility(r))}}isolate(e){this.set(!1),this.set(!0,e)}updateCulledVisibility(e){const t=this.components.get(ru);for(const[i,s]of t.list){const n=s.colorMeshes.get(e.id);n&&(n.count=e.mesh.count)}}};T(Vl,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");let kf=Vl;class Vf extends fo{constructor(){super(...arguments),T(this,"minGeometrySize",10),T(this,"minAssetsSize",1e3),T(this,"maxTriangles",null)}}const Yf=class Gl extends de{constructor(e){super(e),T(this,"onGeometryStreamed",new Ut),T(this,"onAssetStreamed",new Ut),T(this,"onProgress",new Ut),T(this,"onIfcLoaded",new Ut),T(this,"onDisposed",new Y),T(this,"settings",new Vf),T(this,"enabled",!0),T(this,"webIfc",new Hi),T(this,"_nextAvailableID",0),T(this,"_splittedGeometries",new Map),T(this,"_spatialTree",new cl),T(this,"_metaData",new dl),T(this,"_visitedGeometries",new Map),T(this,"_streamSerializer",new Ua),T(this,"_geometries",new Map),T(this,"_geometryCount",0),T(this,"_civil",new hl),T(this,"_groupSerializer",new Da),T(this,"_assets",[]),T(this,"_meshesWithHoles",new Set),this.components.add(Gl.uuid,this),this.settings.excludedCategories.add(La)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(e){await this.readIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async streamFromCallBack(e){await this.streamIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async readIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModel(e,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModelFromCallback(e,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamAllGeometries(){console.log("Converting geometries to tiles...");const{minGeometrySize:e,minAssetsSize:t}=this.settings;this._spatialTree.setUp(this.webIfc);const i=this.webIfc.GetIfcEntityList(0),s=[[]],n=new zt;n.ifcMetadata={name:"",description:"",...this._metaData.getNameInfo(this.webIfc),...this._metaData.getDescriptionInfo(this.webIfc),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let r=0,o=0;for(const m of i){if(!this.webIfc.IsIfcElement(m)&&m!==Ti||this.settings.excludedCategories.has(m))continue;const p=this.webIfc.GetLineIDsWithType(0,m),E=p.size();for(let I=0;Ie&&(r=0,o++,s.push([]));const g=p.get(I);s[o].push(g);const w=this.webIfc.GetLine(0,g);if(w.GlobalId){const v=(w==null?void 0:w.GlobalId.value)||(w==null?void 0:w.GlobalId);n.globalToExpressIDs.set(v,g)}const C=this._spatialTree.itemsByFloor[g]||0;n.data.set(g,[[],[C,m]]),r++}}this._spatialTree.cleanUp();let a=.01,l=0;for(const m of s){l++,this.webIfc.StreamMeshes(0,m,E=>{this.getMesh(this.webIfc,E,n)}),this._geometryCount>this.settings.minGeometrySize&&await this.streamGeometries(),this._assets.length>t&&await this.streamAssets();const p=l/s.length;p>a&&(a+=.01,a=Math.max(a,p),await this.onProgress.trigger(Math.round(a*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:h,transparent:d}=n.geometryIDs;for(const[m,{index:p,uuid:E}]of this._visitedGeometries)n.keyFragments.set(p,E),(m>1?h:d).set(m,p);ul.get(n,this.webIfc);const u=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(u),n.civilData=this._civil.read(this.webIfc);const f=this._groupSerializer.export(n);await this.onIfcLoaded.trigger(f),n.dispose(!0)}cleanUp(){try{this.webIfc.Dispose()}catch{}this.webIfc=null,this.webIfc=new Hi,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(e,t,i){const s=t.geometries.size(),n=t.expressID,r={id:n,geometries:[]};for(let o=0;othis.settings.minGeometrySize&&await this.outputGeometries(e);await this.outputGeometries(e),this._geometries.clear(),this._geometryCount=0}async outputGeometries(e){let t=this._streamSerializer.export(e),i={};for(const[s,{boundingBox:n,hasHoles:r}]of e)i[s]={boundingBox:n,hasHoles:r};await this.onGeometryStreamed.trigger({data:i,buffer:t}),i=null,t=null,e.clear()}registerGeometryData(e,t,i,s,n,r){const o=this._visitedGeometries.get(r);if(o===void 0)throw new Error("Error getting geometry data for streaming!");const a=e.data.get(t);if(!a)throw new Error("Data not found!");a[0].push(o.index);const{x:l,y:h,z:d,w:u}=i.color,f=[l,h,d,u],m=i.flatTransformation;s.geometries.push({color:f,geometryID:n,transformation:m})}};T(Yf,"uuid","d9999a00-e1f5-4d3f-8cfe-c56e08609764");class Gf extends fo{constructor(){super(...arguments),T(this,"propertiesSize",100)}}class Hf extends de{constructor(){super(...arguments),T(this,"onPropertiesStreamed",new Ut),T(this,"onProgress",new Ut),T(this,"onIndicesStreamed",new Ut),T(this,"onDisposed",new Y),T(this,"enabled",!0),T(this,"settings",new Gf),T(this,"webIfc",new Hi)}async dispose(){this.onIndicesStreamed.reset(),this.onPropertiesStreamed.reset(),this.webIfc=null,this.onDisposed.reset()}async streamFromBuffer(e){await this.readIfcFile(e),await this.streamAllProperties(),this.cleanUp()}async streamFromCallBack(e){await this.streamIfcFile(e),await this.streamAllProperties(),this.cleanUp()}async readIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModel(e,this.settings.webIfc)}async streamIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModelFromCallback(e,this.settings.webIfc)}async streamAllProperties(){const{propertiesSize:e}=this.settings,t=new Set(this.webIfc.GetIfcEntityList(0)),i=new Set([so,no,ro,Dn,Ti]);for(const o of i)t.add(o);let s=.01,n=0;for(const o of t){if(n++,fl.has(o))continue;const a=i.has(o),l=this.webIfc.GetLineIDsWithType(0,o),h=l.size();let d=0;for(let u=0;us&&(s=Math.round(s*100)/100,await this.onProgress.trigger(s),s+=.01)}await this.onProgress.trigger(1);const r=await this.components.get(it).processFromWebIfc(this.webIfc,0);await this.onIndicesStreamed.trigger(r)}cleanUp(){this.webIfc.Dispose(),this.webIfc=null,this.webIfc=new Hi}}T(Hf,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");class Hl{constructor(e,t,i){T(this,"title"),T(this,"guid",Ht.create()),T(this,"clippingPlanes",new Jt),T(this,"camera",{aspectRatio:1,fov:60,direction:{x:0,y:0,z:0},position:{x:0,y:0,z:0}}),T(this,"exceptionComponents",new Jt),T(this,"selectionComponents",new Jt),T(this,"componentColors",new gt),T(this,"spacesVisible",!1),T(this,"spaceBoundariesVisible",!1),T(this,"openingsVisible",!1),T(this,"defaultVisibility",!0),T(this,"_components"),T(this,"world");const s={setCamera:!0,...i},{data:n,setCamera:r}=s;this._components=e,this.world=t,n&&(this.guid=n.guid??this.guid,this.set(n)),r&&this.updateCamera()}get _selectionModelIdMap(){const e=this._components.get(ue),t={};for(const[i,s]of e.groups){i in t||(t[i]=new Set);for(const n of this.selectionComponents){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return t}get _exceptionModelIdMap(){const e=this._components.get(ue),t={};for(const[i,s]of e.groups){i in t||(t[i]=new Set);for(const n of this.exceptionComponents){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return t}get selection(){return this._components.get(ue).modelIdToFragmentIdMap(this._selectionModelIdMap)}get exception(){return this._components.get(ue).modelIdToFragmentIdMap(this._exceptionModelIdMap)}get projection(){return"fov"in this.camera?"Perspective":"Orthographic"}get position(){const e=this._components.get(ue),{position:t}=this.camera,{x:i,y:s,z:n}=t,r=new x(i,s,n);return e.applyBaseCoordinateSystem(r,new ne),r}get direction(){const{direction:e}=this.camera,{x:t,y:i,z:s}=e;return new x(t,i,s)}get _managerVersion(){return this._components.get(je).config.version}get topics(){return[...this._components.get(je).list.values()].filter(e=>e.viewpoints.has(this.guid))}addComponentsFromMap(e){const t=this._components.get(ue).fragmentIdMapToGuids(e);this.selectionComponents.add(...t),this._components.get(Bt).list.set(this.guid,this)}set(e){const t=e,i=this;for(const s in e){if(s==="guid")continue;const n=t[s];if(s==="selectionComponents"){this.selectionComponents.clear(),this.selectionComponents.add(...n);continue}if(s==="exceptionComponents"){this.exceptionComponents.clear(),this.exceptionComponents.add(...n);continue}s in this&&(i[s]=n)}return this._components.get(Bt).list.set(this.guid,this),this}async go(e,t=!0){const{camera:i}=e??this.world;if(!i.hasCameraControls())throw new Error("Viewpoint: the world's camera need controls to set the viewpoint.");i instanceof vu&&i.projection.set(this.projection);const s=new x(this.camera.position.x,this.camera.position.y,this.camera.position.z),n=new x(this.camera.direction.x,this.camera.direction.y,this.camera.direction.z);if(s.equals(new x)&&n.equals(new x))return;const r=this.position,o=this.direction;let a={x:r.x+o.x*80,y:r.y+o.y*80,z:r.z+o.z*80};const l=this.selection;if(Object.keys(l).length===0){const h=this._components.get(ut).get(this.world).castRayFromVector(r,this.direction);h&&(a=h.point)}else{const h=this._components.get(On);h.reset(),h.addFragmentIdMap(l),a=h.getSphere().center,h.reset()}await i.controls.setLookAt(r.x,r.y,r.z,a.x,a.y,a.z,t)}updateCamera(e){const{camera:t,renderer:i}=e??this.world;if(!i)throw new Error("Viewpoint: the world needs to have a renderer!");if(!t.hasCameraControls())throw new Error("Viewpoint: world's camera need camera controls!");const s=new x;t.controls.getPosition(s);const n=t.three,r=new x(0,0,-1).applyEuler(n.rotation),{width:o,height:a}=i.getSize();let l=o/a;Number.isNaN(l)&&(l=1);const h=this._components.get(ue);s.applyMatrix4(h.baseCoordinationMatrix.clone().invert());const d={aspectRatio:l,position:{x:s.x,y:s.y,z:s.z},direction:{x:r.x,y:r.y,z:r.z}};n instanceof xa?this.camera={...d,fov:n.fov}:n instanceof ti&&(this.camera={...d,viewToWorldScale:n.top-n.bottom}),this._components.get(Bt).list.set(this.guid,this)}applyVisibility(){const e=this._components.get(kf);e.set(this.defaultVisibility),e.set(!this.defaultVisibility,this.exception),e.set(!0,this.selection)}applyColors(){const e=this._components.get(Bt),t=this._components.get(ue),i=this._components.get(xr);for(const[s,n]of this.componentColors){const r=t.guidToFragmentIdMap(n);i.setColor(r,s,e.config.overwriteColors)}}resetColors(){const e=this._components.get(ue),t=this._components.get(xr);for(const[i,s]of this.componentColors){const n=e.guidToFragmentIdMap(s);t.resetColor(n)}}async createComponentTags(e){var t,i;const s=this._components.get(ue),n=this._components.get(je);let r="";if(n.config.includeSelectionTag){const o=e==="selection"?this._selectionModelIdMap:this._exceptionModelIdMap;for(const a in o){const l=s.groups.get(a);if(!l)continue;const h=o[a];for(const d of h){const u=await l.getProperties(d);if(!u)continue;const f=(t=u.GlobalId)==null?void 0:t.value;if(!f)continue;const m=(i=u.Tag)==null?void 0:i.value;let p=null;m&&(p=`AuthoringToolId="${m}"`),r+=` `}}}else r=[...this.selectionComponents].map(o=>``).join(` `);return r}createColorTags(){let e="";for(const[t,i]of this.componentColors.entries()){const s=`#${t.getHexString()}`,n=i.map(r=>` `).join(` @@ -199,63 +196,63 @@ ${e} ${s.x} ${-s.z} ${s.y} - `,h=` + `,l=` ${r.x} ${-r.z} ${r.y} - `,c=`${this.camera.aspectRatio}`;let u="";"viewToWorld"in this.camera?u=` + `,h=`${this.camera.aspectRatio}`;let d="";"viewToWorld"in this.camera?d=` ${o} ${a} + ${l} ${h} - ${c} ${this.camera.viewToWorld} - `:"fov"in this.camera&&(u=` + `:"fov"in this.camera&&(d=` ${o} ${a} + ${l} ${h} - ${c} ${this.camera.fov} - `);const d=``,f=(await this.createComponentTags("selection")).trim(),m=(await this.createComponentTags("exception")).trim(),p=this.createColorTags();return` + `);const u=``,f=(await this.createComponentTags("selection")).trim(),m=(await this.createComponentTags("exception")).trim(),p=this.createColorTags();return` - ${e==="2.1"?d:""} + ${e==="2.1"?u:""} ${f.length!==0?`${f}`:""} - ${e==="3"?d:""} + ${e==="3"?u:""} ${m.length!==0?`${m}`:""} ${p} - ${u} - `}}class Hp extends $i{constructor(){super(...arguments),T(this,"_config",{overwriteColors:{value:!1,type:"Boolean"}})}get overwriteColors(){return this._config.overwriteColors.value}set overwriteColors(e){this._config.overwriteColors.value=e}}const ph=class Zr extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Ct),T(this,"isSetup",!1),T(this,"onSetup",new H),T(this,"config",new Hp(this,this.components,"Viewpoints",Zr.uuid)),T(this,"onDisposed",new H),e.add(Zr.uuid,this)}create(e,t){const i=new fh(this.components,e,{data:t});return t||this.list.set(i.guid,i),i}setup(){}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}};T(ph,"uuid","ee867824-a796-408d-8aa0-4e5962a83c66");let zt=ph;class Wp extends $i{constructor(){super(...arguments),T(this,"_config",{visible:{value:!0,type:"Boolean"},lockRotation:{value:!0,type:"Boolean"},zoom:{type:"Number",interpolable:!0,value:.05,min:.001,max:5},frontOffset:{type:"Number",interpolable:!0,value:0,min:0,max:100},sizeX:{type:"Number",interpolable:!0,value:320,min:20,max:5e3},sizeY:{type:"Number",interpolable:!0,value:160,min:20,max:5e3},backgroundColor:{value:new Ue,type:"Color"}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e;const t=this._component.renderer.domElement.style;t.display=e?"block":"none"}get lockRotation(){return this._config.lockRotation.value}set lockRotation(e){this._config.lockRotation.value=e,this._component.lockRotation=e}get zoom(){return this._config.zoom.value}set zoom(e){this._config.zoom.value=e,this._component.zoom=e}get frontOffset(){return this._config.frontOffset.value}set frontOffset(e){this._config.frontOffset.value=e,this._component.frontOffset=e}get sizeX(){return this._config.sizeX.value}set sizeX(e){this._config.sizeX.value=e;const{sizeX:t,sizeY:i}=this._config,s=new ve(t.value,i.value);this._component.resize(s)}get sizeY(){return this._config.sizeY.value}set sizeY(e){this._config.sizeY.value=e;const{sizeX:t,sizeY:i}=this._config,s=new ve(t.value,i.value);this._component.resize(s)}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(e){this._config.backgroundColor.value=e,this._component.backgroundColor=e}}class Xp{constructor(e,t){if(T(this,"onDisposed",new H),T(this,"onAfterUpdate",new H),T(this,"onBeforeUpdate",new H),T(this,"onResize",new H),T(this,"onSetup",new H),T(this,"frontOffset",0),T(this,"overrideMaterial",new il),T(this,"backgroundColor",new Ue(395274)),T(this,"renderer"),T(this,"enabled",!0),T(this,"world"),T(this,"config"),T(this,"isSetup",!1),T(this,"_defaultConfig",{visible:!0,lockRotation:!1,zoom:.05,frontOffset:0,sizeX:320,sizeY:160,backgroundColor:new Ue(395274)}),T(this,"_lockRotation",!0),T(this,"_size",new ve(320,160)),T(this,"_camera"),T(this,"_plane"),T(this,"_tempVector1",new L),T(this,"_tempVector2",new L),T(this,"_tempTarget",new L),T(this,"down",new L(0,-1,0)),T(this,"updatePlanes",()=>{if(!this.world.renderer)throw new Error("The given world must have a renderer!");const n=[],r=this.world.renderer.three;for(const o of r.clippingPlanes)n.push(o);n.push(this._plane),this.renderer.clippingPlanes=n}),this.world=e,!this.world.renderer)throw new Error("The given world must have a renderer!");this.renderer=new bn,this.renderer.setSize(this._size.x,this._size.y);const i=1,s=this._size.x/this._size.y;this._camera=new si(i*s/-2,i*s/2,i/2,i/-2),this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes),this._camera.position.set(0,200,0),this._camera.zoom=.1,this._camera.rotation.x=-Math.PI/2,this._plane=new Xt(this.down,200),this.updatePlanes(),this.config=new Wp(this,t,"MiniMap")}get lockRotation(){return this._lockRotation}set lockRotation(e){this._lockRotation=e,e&&(this._camera.rotation.z=0)}get zoom(){return this._camera.zoom}set zoom(e){this._camera.zoom=e,this._camera.updateProjectionMatrix()}dispose(){this.enabled=!1,this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.onResize.reset(),this.overrideMaterial.dispose(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return this._camera}update(){if(!this.enabled)return;this.onBeforeUpdate.trigger();const e=this.world.scene.three,t=this.world.camera;if(!t.hasCameraControls())throw new Error("The given world must use camera controls!");if(!(e instanceof vi))throw new Error("The given world must have a THREE.Scene as a root!");const i=t.controls;if(i.getPosition(this._tempVector1),this._camera.position.x=this._tempVector1.x,this._camera.position.z=this._tempVector1.z,this.frontOffset!==0&&(i.getTarget(this._tempVector2),this._tempVector2.sub(this._tempVector1),this._tempVector2.normalize().multiplyScalar(this.frontOffset),this._camera.position.x+=this._tempVector2.x,this._camera.position.z+=this._tempVector2.z),!this._lockRotation){i.getTarget(this._tempTarget);const n=Math.atan2(this._tempTarget.x-this._tempVector1.x,this._tempTarget.z-this._tempVector1.z);this._camera.rotation.z=n+Math.PI}this._plane.set(this.down,this._tempVector1.y);const s=e.background;e.background=this.backgroundColor,this.renderer.render(e,this._camera),e.background=s,this.onAfterUpdate.trigger()}getSize(){return this._size}resize(e=this._size){this._size.copy(e),this.renderer.setSize(e.x,e.y);const t=e.x/e.y,i=1;this._camera.left=i*t/-2,this._camera.right=i*t/2,this._camera.top=i/2,this._camera.bottom=-i/2,this._camera.updateProjectionMatrix(),this.onResize.trigger(e)}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.lockRotation=t.lockRotation,this.config.zoom=t.zoom,this.config.frontOffset=t.frontOffset,this.config.sizeX=t.sizeX,this.config.sizeY=t.sizeY,this.config.backgroundColor=t.backgroundColor,this.isSetup=!0,this.onSetup.trigger()}}const Zp=class mh extends de{constructor(e){super(e),T(this,"onAfterUpdate",new H),T(this,"onBeforeUpdate",new H),T(this,"onDisposed",new H),T(this,"onSetup",new H),T(this,"enabled",!0),T(this,"list",new Map),this.components.add(mh.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a minimap!");const t=new Xp(e,this.components);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e);t&&t.dispose(),this.list.delete(e)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(){for(const[e,t]of this.list)t.update()}};T(Zp,"uuid","39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");const Ih=class Eh extends de{constructor(e){super(e),T(this,"enabled",!0),e.add(Eh.uuid,this)}static distanceFromPointToLine(e,t,i,s=!1){const n=new Je,r=new L;return n.set(t,i),n.closestPointToPoint(e,s,r),r.distanceTo(e)}getFace(e,t,i){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const s=new Map,n=e.geometry.index.array,{plane:r}=this.getFaceData(t,i,e),o=[];for(let u=0;ug.id);if(!f.size){const g=a++;for(const{id:S}of d)h.set(S,g);c.set(g,{edges:new Set(m),indices:new Set([u])});continue}let p=null;const I=new Set,E=new Set(m);for(const[g,S]of f){p===null?p=S:S!==p&&I.add(S),h.delete(g);const{edges:O}=c.get(S);O.delete(g),E.delete(g)}if(p===null)throw new Error("Error computing face!");const C=c.get(p),{indices:v}=C;v.add(u);for(const g of E){h.set(g,p);const{edges:S}=C;S.add(g)}for(const g of I){const S=c.get(g),{edges:O,indices:A}=S,b=c.get(p),{edges:N,indices:M}=b;for(const _ of O)N.add(_),h.set(_,p);for(const _ of A)M.add(_);c.delete(g)}}for(const[u,{indices:d,edges:f}]of c)if(d.has(t)){const m=[];for(const p of f){const I=s.get(p);m.push(I)}return{edges:m,indices:d}}return null}getVerticesAndNormal(e,t,i){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const s=e.geometry.index.array,n=e.geometry.attributes.position.array,r=e.geometry.attributes.normal.array,o=s[t*3]*3,a=s[t*3+1]*3,h=s[t*3+2]*3,c=new L(n[o],n[o+1],n[o+2]),u=new L(n[a],n[a+1],n[a+2]),d=new L(n[h],n[h+1],n[h+2]),f=new L(r[o],r[o+1],r[o+2]),m=new L(r[a],r[a+1],r[a+2]),p=new L(r[h],r[h+1],r[h+2]),I=(f.x+m.x+p.x)/3,E=(f.y+m.y+p.y)/3,C=(f.z+m.z+p.z)/3,v=new L(I,E,C);if(i!==void 0&&e instanceof ft){const g=new ne;e.getMatrixAt(i,g);const S=new ne;S.extractRotation(g),v.applyMatrix4(S),c.applyMatrix4(g),u.applyMatrix4(g),d.applyMatrix4(g)}return{p1:c,p2:u,p3:d,faceNormal:v}}round(e){e.x=Math.trunc(e.x*1e3)/1e3,e.y=Math.trunc(e.y*1e3)/1e3,e.z=Math.trunc(e.z*1e3)/1e3}getVolumeFromFragments(e){const t=this.components.get(ue),i=new ne,s=[];for(const r in e){const o=t.list.get(r);if(!o)continue;const a=e[r];let h=0;for(const d of a){const f=o.getInstancesIDs(d);f&&(h+=f.size)}const c=new ft(o.mesh.geometry,void 0,h);let u=0;for(const d of a){const f=o.getInstancesIDs(d);if(f)for(const m of f)o.mesh.getMatrixAt(m,i),c.setMatrixAt(u++,i)}s.push(c)}const n=this.getVolumeFromMeshes(s);for(const r of s)r.geometry=null,r.material=[],r.dispose();return n}getVolumeFromMeshes(e){let t=0;for(const i of e)t+=this.getVolumeOfMesh(i);return t}getFaceData(e,t,i){const s=this.getVerticesAndNormal(i,e,t),{p1:n,p2:r,p3:o,faceNormal:a}=s;this.round(n),this.round(r),this.round(o),this.round(a);const h=[{id:`${n.x}|${n.y}|${n.z}`,value:n},{id:`${r.x}|${r.y}|${r.z}`,value:r},{id:`${o.x}|${o.y}|${o.z}`,value:o}];h.sort((C,v)=>C.idv.id?1:0);const[{id:c,value:u},{id:d,value:f},{id:m,value:p}]=h,I=[{id:`${c}|${d}`,distance:u.distanceTo(f),points:[u,f]},{id:`${d}|${m}`,distance:f.distanceTo(p),points:[f,p]},{id:`${c}|${m}`,distance:u.distanceTo(p),points:[u,p]}],E=new Xt;return E.setFromNormalAndCoplanarPoint(a,n),E.constant=Math.round(E.constant*10)/10,{plane:E,edges:I}}getVolumeOfMesh(e){let t=0;const i=new L,s=new L,n=new L,{index:r}=e.geometry,o=e.geometry.attributes.position.array;if(!r)return console.warn("Geometry must be indexed to compute its volume!"),0;const a=[];if(e instanceof ft)for(let c=0;c{const r={parameter:s,currentValue:t,requiredValue:i.parameter,pass:!1};n&&this.addCheckResult(r,n);let o=!1;if(i.type==="simple"&&(o=t===i.parameter),i.type==="enumeration"&&(o=i.parameter.includes(t)),i.type==="pattern"&&(o=new RegExp(i.parameter).test(String(t))),i.type==="length"){const{min:a,length:h,max:c}=i.parameter;h!==void 0&&(o=String(t).length===h),a!==void 0&&(o=String(t).length>=a),c!==void 0&&(o=String(t).length<=c)}if(i.type==="bounds"&&typeof t=="number"){const{min:a,minInclusive:h,max:c,maxInclusive:u}=i.parameter;let d=!0,f=!0;a!==void 0&&(d=h?t<=a:t=c:t>c),o=d&&f}return this.cardinality==="prohibited"&&(o=!o),this.cardinality==="optional"&&(o=!0),r.pass=o,r.pass}),T(this,"testResult",[]),this.components=e}addCheckResult(e,t){const i=t.findIndex(({parameter:s})=>s===e.parameter);i!==-1?t[i]=e:t.push(e)}saveResult(e,t){const{GlobalId:i}=e;if(!i)return;const{value:s}=i,n={expressID:s,pass:t,checks:[],cardinality:this.cardinality};this.testResult.push(n)}}const Yt=(l,e)=>{let t="";return e?(e.type==="simple"&&(t=`${e.parameter}`),e.type==="enumeration"&&(t=` + ${d} + `}}class Wf extends Qi{constructor(){super(...arguments),T(this,"_config",{overwriteColors:{value:!1,type:"Boolean"}})}get overwriteColors(){return this._config.overwriteColors.value}set overwriteColors(e){this._config.overwriteColors.value=e}}const Wl=class Mr extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new gt),T(this,"isSetup",!1),T(this,"onSetup",new Y),T(this,"config",new Wf(this,this.components,"Viewpoints",Mr.uuid)),T(this,"onDisposed",new Y),e.add(Mr.uuid,this)}create(e,t){const i=new Hl(this.components,e,{data:t});return t||this.list.set(i.guid,i),i}setup(){}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}};T(Wl,"uuid","ee867824-a796-408d-8aa0-4e5962a83c66");let Bt=Wl;class Xf extends Qi{constructor(){super(...arguments),T(this,"_config",{visible:{value:!0,type:"Boolean"},lockRotation:{value:!0,type:"Boolean"},zoom:{type:"Number",interpolable:!0,value:.05,min:.001,max:5},frontOffset:{type:"Number",interpolable:!0,value:0,min:0,max:100},sizeX:{type:"Number",interpolable:!0,value:320,min:20,max:5e3},sizeY:{type:"Number",interpolable:!0,value:160,min:20,max:5e3},backgroundColor:{value:new _e,type:"Color"}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e;const t=this._component.renderer.domElement.style;t.display=e?"block":"none"}get lockRotation(){return this._config.lockRotation.value}set lockRotation(e){this._config.lockRotation.value=e,this._component.lockRotation=e}get zoom(){return this._config.zoom.value}set zoom(e){this._config.zoom.value=e,this._component.zoom=e}get frontOffset(){return this._config.frontOffset.value}set frontOffset(e){this._config.frontOffset.value=e,this._component.frontOffset=e}get sizeX(){return this._config.sizeX.value}set sizeX(e){this._config.sizeX.value=e;const{sizeX:t,sizeY:i}=this._config,s=new Se(t.value,i.value);this._component.resize(s)}get sizeY(){return this._config.sizeY.value}set sizeY(e){this._config.sizeY.value=e;const{sizeX:t,sizeY:i}=this._config,s=new Se(t.value,i.value);this._component.resize(s)}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(e){this._config.backgroundColor.value=e,this._component.backgroundColor=e}}class Zf{constructor(e,t){if(T(this,"onDisposed",new Y),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onResize",new Y),T(this,"onSetup",new Y),T(this,"frontOffset",0),T(this,"overrideMaterial",new Ba),T(this,"backgroundColor",new _e(395274)),T(this,"renderer"),T(this,"enabled",!0),T(this,"world"),T(this,"config"),T(this,"isSetup",!1),T(this,"_defaultConfig",{visible:!0,lockRotation:!1,zoom:.05,frontOffset:0,sizeX:320,sizeY:160,backgroundColor:new _e(395274)}),T(this,"_lockRotation",!0),T(this,"_size",new Se(320,160)),T(this,"_camera"),T(this,"_plane"),T(this,"_tempVector1",new x),T(this,"_tempVector2",new x),T(this,"_tempTarget",new x),T(this,"down",new x(0,-1,0)),T(this,"updatePlanes",()=>{if(!this.world.renderer)throw new Error("The given world must have a renderer!");const n=[],r=this.world.renderer.three;for(const o of r.clippingPlanes)n.push(o);n.push(this._plane),this.renderer.clippingPlanes=n}),this.world=e,!this.world.renderer)throw new Error("The given world must have a renderer!");this.renderer=new Sn,this.renderer.setSize(this._size.x,this._size.y);const i=1,s=this._size.x/this._size.y;this._camera=new ti(i*s/-2,i*s/2,i/2,i/-2),this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes),this._camera.position.set(0,200,0),this._camera.zoom=.1,this._camera.rotation.x=-Math.PI/2,this._plane=new ii(this.down,200),this.updatePlanes(),this.config=new Xf(this,t,"MiniMap")}get lockRotation(){return this._lockRotation}set lockRotation(e){this._lockRotation=e,e&&(this._camera.rotation.z=0)}get zoom(){return this._camera.zoom}set zoom(e){this._camera.zoom=e,this._camera.updateProjectionMatrix()}dispose(){this.enabled=!1,this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.onResize.reset(),this.overrideMaterial.dispose(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return this._camera}update(){if(!this.enabled)return;this.onBeforeUpdate.trigger();const e=this.world.scene.three,t=this.world.camera;if(!t.hasCameraControls())throw new Error("The given world must use camera controls!");if(!(e instanceof Ci))throw new Error("The given world must have a THREE.Scene as a root!");const i=t.controls;if(i.getPosition(this._tempVector1),this._camera.position.x=this._tempVector1.x,this._camera.position.z=this._tempVector1.z,this.frontOffset!==0&&(i.getTarget(this._tempVector2),this._tempVector2.sub(this._tempVector1),this._tempVector2.normalize().multiplyScalar(this.frontOffset),this._camera.position.x+=this._tempVector2.x,this._camera.position.z+=this._tempVector2.z),!this._lockRotation){i.getTarget(this._tempTarget);const n=Math.atan2(this._tempTarget.x-this._tempVector1.x,this._tempTarget.z-this._tempVector1.z);this._camera.rotation.z=n+Math.PI}this._plane.set(this.down,this._tempVector1.y);const s=e.background;e.background=this.backgroundColor,this.renderer.render(e,this._camera),e.background=s,this.onAfterUpdate.trigger()}getSize(){return this._size}resize(e=this._size){this._size.copy(e),this.renderer.setSize(e.x,e.y);const t=e.x/e.y,i=1;this._camera.left=i*t/-2,this._camera.right=i*t/2,this._camera.top=i/2,this._camera.bottom=-i/2,this._camera.updateProjectionMatrix(),this.onResize.trigger(e)}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.lockRotation=t.lockRotation,this.config.zoom=t.zoom,this.config.frontOffset=t.frontOffset,this.config.sizeX=t.sizeX,this.config.sizeY=t.sizeY,this.config.backgroundColor=t.backgroundColor,this.isSetup=!0,this.onSetup.trigger()}}const jf=class Xl extends de{constructor(e){super(e),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"onSetup",new Y),T(this,"enabled",!0),T(this,"list",new Map),this.components.add(Xl.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a minimap!");const t=new Zf(e,this.components);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e);t&&t.dispose(),this.list.delete(e)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(){for(const[e,t]of this.list)t.update()}};T(jf,"uuid","39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");const Zl=class jl extends de{constructor(e){super(e),T(this,"enabled",!0),e.add(jl.uuid,this)}static distanceFromPointToLine(e,t,i,s=!1){const n=new tt,r=new x;return n.set(t,i),n.closestPointToPoint(e,s,r),r.distanceTo(e)}getFace(e,t,i){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const s=new Map,n=e.geometry.index.array,{plane:r}=this.getFaceData(t,i,e),o=[];for(let d=0;dC.id);if(!f.size){const C=a++;for(const{id:v}of u)l.set(v,C);h.set(C,{edges:new Set(m),indices:new Set([d])});continue}let p=null;const E=new Set,I=new Set(m);for(const[C,v]of f){p===null?p=v:v!==p&&E.add(v),l.delete(C);const{edges:O}=h.get(v);O.delete(C),I.delete(C)}if(p===null)throw new Error("Error computing face!");const g=h.get(p),{indices:w}=g;w.add(d);for(const C of I){l.set(C,p);const{edges:v}=g;v.add(C)}for(const C of E){const v=h.get(C),{edges:O,indices:A}=v,b=h.get(p),{edges:N,indices:D}=b;for(const _ of O)N.add(_),l.set(_,p);for(const _ of A)D.add(_);h.delete(C)}}for(const[d,{indices:u,edges:f}]of h)if(u.has(t)){const m=[];for(const p of f){const E=s.get(p);m.push(E)}return{edges:m,indices:u}}return null}getVerticesAndNormal(e,t,i){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const s=e.geometry.index.array,n=e.geometry.attributes.position.array,r=e.geometry.attributes.normal.array,o=s[t*3]*3,a=s[t*3+1]*3,l=s[t*3+2]*3,h=new x(n[o],n[o+1],n[o+2]),d=new x(n[a],n[a+1],n[a+2]),u=new x(n[l],n[l+1],n[l+2]),f=new x(r[o],r[o+1],r[o+2]),m=new x(r[a],r[a+1],r[a+2]),p=new x(r[l],r[l+1],r[l+2]),E=(f.x+m.x+p.x)/3,I=(f.y+m.y+p.y)/3,g=(f.z+m.z+p.z)/3,w=new x(E,I,g);if(i!==void 0&&e instanceof It){const C=new ne;e.getMatrixAt(i,C);const v=new ne;v.extractRotation(C),w.applyMatrix4(v),h.applyMatrix4(C),d.applyMatrix4(C),u.applyMatrix4(C)}return{p1:h,p2:d,p3:u,faceNormal:w}}round(e){e.x=Math.trunc(e.x*1e3)/1e3,e.y=Math.trunc(e.y*1e3)/1e3,e.z=Math.trunc(e.z*1e3)/1e3}getVolumeFromFragments(e){const t=this.components.get(ue),i=new ne,s=[];for(const r in e){const o=t.list.get(r);if(!o)continue;const a=e[r];let l=0;for(const u of a){const f=o.getInstancesIDs(u);f&&(l+=f.size)}const h=new It(o.mesh.geometry,void 0,l);let d=0;for(const u of a){const f=o.getInstancesIDs(u);if(f)for(const m of f)o.mesh.getMatrixAt(m,i),h.setMatrixAt(d++,i)}s.push(h)}const n=this.getVolumeFromMeshes(s);for(const r of s)r.geometry=null,r.material=[],r.dispose();return n}getVolumeFromMeshes(e){let t=0;for(const i of e)t+=this.getVolumeOfMesh(i);return t}getFaceData(e,t,i){const s=this.getVerticesAndNormal(i,e,t),{p1:n,p2:r,p3:o,faceNormal:a}=s;this.round(n),this.round(r),this.round(o),this.round(a);const l=[{id:`${n.x}|${n.y}|${n.z}`,value:n},{id:`${r.x}|${r.y}|${r.z}`,value:r},{id:`${o.x}|${o.y}|${o.z}`,value:o}];l.sort((g,w)=>g.idw.id?1:0);const[{id:h,value:d},{id:u,value:f},{id:m,value:p}]=l,E=[{id:`${h}|${u}`,distance:d.distanceTo(f),points:[d,f]},{id:`${u}|${m}`,distance:f.distanceTo(p),points:[f,p]},{id:`${h}|${m}`,distance:d.distanceTo(p),points:[d,p]}],I=new ii;return I.setFromNormalAndCoplanarPoint(a,n),I.constant=Math.round(I.constant*10)/10,{plane:I,edges:E}}getVolumeOfMesh(e){let t=0;const i=new x,s=new x,n=new x,{index:r}=e.geometry,o=e.geometry.attributes.position.array;if(!r)return console.warn("Geometry must be indexed to compute its volume!"),0;const a=[];if(e instanceof It)for(let h=0;h{const r={parameter:s,currentValue:t,requiredValue:i.parameter,pass:!1};n&&this.addCheckResult(r,n);let o=!1;if(i.type==="simple"&&(o=t===i.parameter),i.type==="enumeration"&&(o=i.parameter.includes(t)),i.type==="pattern"&&(o=new RegExp(i.parameter).test(String(t))),i.type==="length"){const{min:a,length:l,max:h}=i.parameter;l!==void 0&&(o=String(t).length===l),a!==void 0&&(o=String(t).length>=a),h!==void 0&&(o=String(t).length<=h)}if(i.type==="bounds"&&typeof t=="number"){const{min:a,minInclusive:l,max:h,maxInclusive:d}=i.parameter;let u=!0,f=!0;a!==void 0&&(u=l?t<=a:t=h:t>h),o=u&&f}return this.cardinality==="prohibited"&&(o=!o),this.cardinality==="optional"&&(o=!0),r.pass=o,r.pass}),T(this,"testResult",[]),this.components=e}addCheckResult(e,t){const i=t.findIndex(({parameter:s})=>s===e.parameter);i!==-1?t[i]=e:t.push(e)}saveResult(e,t){const{GlobalId:i}=e;if(!i)return;const{value:s}=i,n={expressID:s,pass:t,checks:[],cardinality:this.cardinality};this.testResult.push(n)}}const Vt=(c,e)=>{let t="";return e?(e.type==="simple"&&(t=`${e.parameter}`),e.type==="enumeration"&&(t=` ${e.parameter.map(i=>``).join(`\r `)} `),e.type==="pattern"&&(t=` - `),` + `),` ${t} - `):t};class jp extends Jn{constructor(e,t){super(e),T(this,"facetType","Attribute"),T(this,"name"),T(this,"value"),this.name=t}serialize(e){const t=Yt("Name",this.name),i=Yt("Value",this.value);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.instructions?`instructions="${this.instructions}"`:""),` + `):t};class Qf extends Vn{constructor(e,t){super(e),T(this,"facetType","Attribute"),T(this,"name"),T(this,"value"),this.name=t}serialize(e){const t=Vt("Name",this.name),i=Vt("Value",this.value);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.instructions?`instructions="${this.instructions}"`:""),` ${t} ${i} -`}async getEntities(){return[]}async test(e){var t;this.testResult=[];for(const s in e){const n=Number(s),r=e[n],o=[],a={guid:(t=r.GlobalId)==null?void 0:t.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a);const h=Object.keys(r).filter(u=>{const d=this.evalRequirement(u,this.name,"Name"),f=r[u];return d&&f===null?this.cardinality==="optional"||this.cardinality==="prohibited":d&&(f==null?void 0:f.type)===3&&f.value===2||d&&Array.isArray(f)&&f.length===0||d&&(f==null?void 0:f.type)===1&&f.value.trim()===""?!1:d}),c=h.length>0;if(o.push({parameter:"Name",currentValue:c?h[0]:null,requiredValue:this.name.parameter,pass:this.cardinality==="prohibited"?!c:c}),this.value)if(h[0]){const u=r[h[0]];(u==null?void 0:u.type)===5?o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"}):this.evalRequirement(u?u.value:null,this.value,"Value",o)}else o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"});a.pass=o.every(({pass:u})=>u)}const i=[...this.testResult];return this.testResult=[],i}}class Kp extends Jn{constructor(e,t){super(e),T(this,"facetType","Classification"),T(this,"system"),T(this,"value"),T(this,"uri"),this.system=t}serialize(e){const t=Yt("System",this.system),i=Yt("Value",this.value);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.uri?`uri=${this.uri}`:"",s+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(){return[]}async test(e){var t;this.testResult=[];for(const s in e){const n=Number(s),r=e[n],o=[],a={guid:(t=r.GlobalId)==null?void 0:t.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a);const l=Object.keys(r).filter(d=>{const u=this.evalRequirement(d,this.name,"Name"),f=r[d];return u&&f===null?this.cardinality==="optional"||this.cardinality==="prohibited":u&&(f==null?void 0:f.type)===3&&f.value===2||u&&Array.isArray(f)&&f.length===0||u&&(f==null?void 0:f.type)===1&&f.value.trim()===""?!1:u}),h=l.length>0;if(o.push({parameter:"Name",currentValue:h?l[0]:null,requiredValue:this.name.parameter,pass:this.cardinality==="prohibited"?!h:h}),this.value)if(l[0]){const d=r[l[0]];(d==null?void 0:d.type)===5?o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"}):this.evalRequirement(d?d.value:null,this.value,"Value",o)}else o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"});a.pass=o.every(({pass:d})=>d)}const i=[...this.testResult];return this.testResult=[],i}}class Kf extends Vn{constructor(e,t){super(e),T(this,"facetType","Classification"),T(this,"system"),T(this,"value"),T(this,"uri"),this.system=t}serialize(e){const t=Vt("System",this.system),i=Vt("Value",this.value);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.uri?`uri=${this.uri}`:"",s+=this.instructions?`instructions="${this.instructions}"`:""),` ${t} ${i} -`}async getEntities(e,t={}){var i;const s=[],n=await e.getAllPropertiesOfType(Lt),r=await e.getAllPropertiesOfType(Si),o={...n,...r},a=[];for(const c in o){const u=Number(c),d=await e.getProperties(u);if(!d)continue;const f=(i=d.ReferencedSource)==null?void 0:i.value;if(!f)continue;const m=await e.getProperties(f);!m||!this.evalSystem(m)||!this.evalValue(d)||!this.evalURI(d)||a.push(u)}const h=this.components.get(st);for(const c of a){const u=h.getEntitiesWithRelation(e,"HasAssociations",c);for(const d of u){if(d in t)continue;const f=await e.getProperties(d);f&&(t[d]=f,s.push(d))}}return s}async test(e,t){var i;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],h={guid:(i=o.GlobalId)==null?void 0:i.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(h);let c=!0;const u=await this.getSystems(t,r),d=u.map(f=>this.getSystemName(f)).filter(f=>f);for(const f of u){if(!this.evalSystem(f,a))continue;if(c=!1,!(this.value&&this.system))break;if(f.type!==Lt)continue;const m=!this.value||this.evalValue(f,a),p=!this.uri||this.evalURI(f,a);if(m&&p)break}c&&this.addCheckResult({parameter:"System",currentValue:d,requiredValue:this.system,pass:this.cardinality==="optional"},a),h.pass=a.every(({pass:f})=>f)}const s=[...this.testResult];return this.testResult=[],s}async processReferencedSource(e,t){var i;const s=(i=t.ReferencedSource)==null?void 0:i.value;if(!s)return null;const n=await e.getProperties(s);return n?(n.type===Lt&&(n.ReferencedSource=await this.processReferencedSource(e,n)),n):null}async getSystems(e,t){var i;const s=[],n=this.components.get(st),r=n.getEntityRelations(e,t,"HasAssociations");if(r)for(const u of r){const d=await e.getProperties(u);d&&(d.type===Si&&s.push(d),d.type===Lt&&(d.ReferencedSource=await this.processReferencedSource(e,d),d.ReferencedSource&&s.push(d)))}const o=s.map(u=>{var d,f,m;return u.type===Si?(d=u.Name)==null?void 0:d.value:u.type===Lt?(m=(f=u.ReferencedSource)==null?void 0:f.Name)==null?void 0:m.value:null}).filter(u=>u),a=n.getEntityRelations(e,t,"IsTypedBy");if(!(a&&a[0]))return s;const h=a[0],c=n.getEntityRelations(e,h,"HasAssociations");if(c)for(const u of c){const d=await e.getProperties(u);if(d){if(d.type===Si){if(o.includes((i=d.Name)==null?void 0:i.value))continue;s.push(d)}d.type===Lt&&(d.ReferencedSource=await this.processReferencedSource(e,d),d.ReferencedSource&&s.push(d))}}return s}getSystemName(e){var t,i,s,n;if(e.type===Si)return(t=e.Name)==null?void 0:t.value;if(e.type===Lt){if(((i=e.ReferencedSource)==null?void 0:i.type)===Lt)return this.getSystemName(e.ReferencedSource);if(((s=e.ReferencedSource)==null?void 0:s.type)===Si)return(n=e.ReferencedSource.Name)==null?void 0:n.value}return null}getAllReferenceIdentifications(e){if(e.type!==Lt)return null;const t=[];if(e.Identification&&t.push(e.Identification.value),e.ReferencedSource){const i=this.getAllReferenceIdentifications(e.ReferencedSource);i&&t.push(...i)}return t}evalSystem(e,t){const i=this.getSystemName(e);return this.evalRequirement(i,this.system,"System",t)}evalValue(e,t){if(!this.value)return!0;const i=this.getAllReferenceIdentifications(e);if(!i)return!1;const s=i.find(n=>this.value?this.evalRequirement(n,this.value,"Value"):!1);return t&&this.addCheckResult({parameter:"Value",currentValue:s??null,requiredValue:this.value,pass:!!s},t),!!s}evalURI(e,t){var i;return this.uri?this.evalRequirement((i=e.Location)==null?void 0:i.value,{type:"simple",parameter:this.uri},"URI",t):!0}}class Qp extends Jn{constructor(e,t){super(e),T(this,"facetType","Entity"),T(this,"name"),T(this,"predefinedType"),this.name=t}serialize(e){const t=Yt("Name",this.name),i=Yt("Name",this.predefinedType);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(e,t={}){var i;const s=[],n=await e.getAllPropertiesOfType(bt),r=await e.getAllPropertiesOfType(Ri),o={...n,...r},a=[];for(const h in o){const d=Number(h),u=await e.getProperties(d);if(!u)continue;const f=(i=u.ReferencedSource)==null?void 0:i.value;if(!f)continue;const m=await e.getProperties(f);!m||!this.evalSystem(m)||!this.evalValue(u)||!this.evalURI(u)||a.push(d)}const l=this.components.get(it);for(const h of a){const d=l.getEntitiesWithRelation(e,"HasAssociations",h);for(const u of d){if(u in t)continue;const f=await e.getProperties(u);f&&(t[u]=f,s.push(u))}}return s}async test(e,t){var i;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],l={guid:(i=o.GlobalId)==null?void 0:i.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l);let h=!0;const d=await this.getSystems(t,r),u=d.map(f=>this.getSystemName(f)).filter(f=>f);for(const f of d){if(!this.evalSystem(f,a))continue;if(h=!1,!(this.value&&this.system))break;if(f.type!==bt)continue;const m=!this.value||this.evalValue(f,a),p=!this.uri||this.evalURI(f,a);if(m&&p)break}h&&this.addCheckResult({parameter:"System",currentValue:u,requiredValue:this.system,pass:this.cardinality==="optional"},a),l.pass=a.every(({pass:f})=>f)}const s=[...this.testResult];return this.testResult=[],s}async processReferencedSource(e,t){var i;const s=(i=t.ReferencedSource)==null?void 0:i.value;if(!s)return null;const n=await e.getProperties(s);return n?(n.type===bt&&(n.ReferencedSource=await this.processReferencedSource(e,n)),n):null}async getSystems(e,t){var i;const s=[],n=this.components.get(it),r=n.getEntityRelations(e,t,"HasAssociations");if(r)for(const d of r){const u=await e.getProperties(d);u&&(u.type===Ri&&s.push(u),u.type===bt&&(u.ReferencedSource=await this.processReferencedSource(e,u),u.ReferencedSource&&s.push(u)))}const o=s.map(d=>{var u,f,m;return d.type===Ri?(u=d.Name)==null?void 0:u.value:d.type===bt?(m=(f=d.ReferencedSource)==null?void 0:f.Name)==null?void 0:m.value:null}).filter(d=>d),a=n.getEntityRelations(e,t,"IsTypedBy");if(!(a&&a[0]))return s;const l=a[0],h=n.getEntityRelations(e,l,"HasAssociations");if(h)for(const d of h){const u=await e.getProperties(d);if(u){if(u.type===Ri){if(o.includes((i=u.Name)==null?void 0:i.value))continue;s.push(u)}u.type===bt&&(u.ReferencedSource=await this.processReferencedSource(e,u),u.ReferencedSource&&s.push(u))}}return s}getSystemName(e){var t,i,s,n;if(e.type===Ri)return(t=e.Name)==null?void 0:t.value;if(e.type===bt){if(((i=e.ReferencedSource)==null?void 0:i.type)===bt)return this.getSystemName(e.ReferencedSource);if(((s=e.ReferencedSource)==null?void 0:s.type)===Ri)return(n=e.ReferencedSource.Name)==null?void 0:n.value}return null}getAllReferenceIdentifications(e){if(e.type!==bt)return null;const t=[];if(e.Identification&&t.push(e.Identification.value),e.ReferencedSource){const i=this.getAllReferenceIdentifications(e.ReferencedSource);i&&t.push(...i)}return t}evalSystem(e,t){const i=this.getSystemName(e);return this.evalRequirement(i,this.system,"System",t)}evalValue(e,t){if(!this.value)return!0;const i=this.getAllReferenceIdentifications(e);if(!i)return!1;const s=i.find(n=>this.value?this.evalRequirement(n,this.value,"Value"):!1);return t&&this.addCheckResult({parameter:"Value",currentValue:s??null,requiredValue:this.value,pass:!!s},t),!!s}evalURI(e,t){var i;return this.uri?this.evalRequirement((i=e.Location)==null?void 0:i.value,{type:"simple",parameter:this.uri},"URI",t):!0}}class qf extends Vn{constructor(e,t){super(e),T(this,"facetType","Entity"),T(this,"name"),T(this,"predefinedType"),this.name=t}serialize(e){const t=Vt("Name",this.name),i=Vt("Name",this.predefinedType);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.instructions?`instructions="${this.instructions}"`:""),` ${t} ${i} -`}async getEntities(e,t={}){const i=Object.entries(_n),s=[];for(const[o]of i)await this.evalName({type:o})&&s.push(Number(o));let n={};for(const o of s){const a=await e.getAllPropertiesOfType(o);a&&(n={...n,...a})}if(!this.predefinedType){for(const o in n)o in t||(t[o]=n[o]);return Object.keys(n).map(Number)}const r=[];for(const o in n){const a=Number(o);if(a in t)continue;const h=n[a];await this.evalPredefinedType(e,h)&&(t[a]=h,r.push(a))}return r}async test(e,t){var i;this.testResult=[];for(const s in e){const n=Number(s),r=e[n],o=[],a={guid:(i=r.GlobalId)==null?void 0:i.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a),await this.evalName(r,o),await this.evalPredefinedType(t,r,o),a.pass=o.every(({pass:h})=>h)}return this.testResult}async evalName(e,t){const i=_n[e.type];return this.evalRequirement(i,this.name,"Name",t)}async evalPredefinedType(e,t,i){var s,n,r,o;if(!this.predefinedType)return null;const a=this.components.get(st),h=typeof this.predefinedType.parameter=="string"&&this.predefinedType.parameter==="USERDEFINED";let c=(s=t.PredefinedType)==null?void 0:s.value;if(c==="USERDEFINED"&&!h){const u=Object.keys(t).find(d=>/^((?!Predefined).)*Type$/.test(d));c=u?(n=t[u])==null?void 0:n.value:"USERDEFINED"}if(!c){const u=a.getEntityRelations(e,t.expressID,"IsTypedBy");if(u&&u[0]){const d=await e.getProperties(u[0]);if(d&&(c=(r=d.PredefinedType)==null?void 0:r.value,c==="USERDEFINED"&&!h)){const f=Object.keys(d).find(m=>/^((?!Predefined).)*Type$/.test(m));c=f?(o=d[f])==null?void 0:o.value:"USERDEFINED"}}}return this.evalRequirement(c,this.predefinedType,"PredefinedType",i)}}class qp extends Jn{constructor(e,t,i){super(e),T(this,"facetType","Property"),T(this,"propertySet"),T(this,"baseName"),T(this,"value"),T(this,"dataType"),T(this,"uri"),T(this,"_unsupportedTypes",[Ac,Oc]),this.propertySet=t,this.baseName=i}serialize(e){const t=Yt("PropertySet",this.propertySet),i=Yt("BaseName",this.baseName),s=Yt("Value",this.value),n=this.dataType?`dataType=${this.dataType}`:"";let r="";return e==="requirement"&&(r+=`cardinality="${this.cardinality}"`,r+=this.uri?`uri=${this.uri}`:"",r+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(e,t={}){const i=Object.entries(An),s=[];for(const[o]of i)await this.evalName({type:o})&&s.push(Number(o));let n={};for(const o of s){const a=await e.getAllPropertiesOfType(o);a&&(n={...n,...a})}if(!this.predefinedType){for(const o in n)o in t||(t[o]=n[o]);return Object.keys(n).map(Number)}const r=[];for(const o in n){const a=Number(o);if(a in t)continue;const l=n[a];await this.evalPredefinedType(e,l)&&(t[a]=l,r.push(a))}return r}async test(e,t){var i;this.testResult=[];for(const s in e){const n=Number(s),r=e[n],o=[],a={guid:(i=r.GlobalId)==null?void 0:i.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a),await this.evalName(r,o),await this.evalPredefinedType(t,r,o),a.pass=o.every(({pass:l})=>l)}return this.testResult}async evalName(e,t){const i=An[e.type];return this.evalRequirement(i,this.name,"Name",t)}async evalPredefinedType(e,t,i){var s,n,r,o;if(!this.predefinedType)return null;const a=this.components.get(it),l=typeof this.predefinedType.parameter=="string"&&this.predefinedType.parameter==="USERDEFINED";let h=(s=t.PredefinedType)==null?void 0:s.value;if(h==="USERDEFINED"&&!l){const d=Object.keys(t).find(u=>/^((?!Predefined).)*Type$/.test(u));h=d?(n=t[d])==null?void 0:n.value:"USERDEFINED"}if(!h){const d=a.getEntityRelations(e,t.expressID,"IsTypedBy");if(d&&d[0]){const u=await e.getProperties(d[0]);if(u&&(h=(r=u.PredefinedType)==null?void 0:r.value,h==="USERDEFINED"&&!l)){const f=Object.keys(u).find(m=>/^((?!Predefined).)*Type$/.test(m));h=f?(o=u[f])==null?void 0:o.value:"USERDEFINED"}}}return this.evalRequirement(h,this.predefinedType,"PredefinedType",i)}}class Jf extends Vn{constructor(e,t,i){super(e),T(this,"facetType","Property"),T(this,"propertySet"),T(this,"baseName"),T(this,"value"),T(this,"dataType"),T(this,"uri"),T(this,"_unsupportedTypes",[nh,rh]),this.propertySet=t,this.baseName=i}serialize(e){const t=Vt("PropertySet",this.propertySet),i=Vt("BaseName",this.baseName),s=Vt("Value",this.value),n=this.dataType?`dataType=${this.dataType}`:"";let r="";return e==="requirement"&&(r+=`cardinality="${this.cardinality}"`,r+=this.uri?`uri=${this.uri}`:"",r+=this.instructions?`instructions="${this.instructions}"`:""),` ${t} ${i} ${s} -`}async getEntities(e,t={}){var i,s;let n={};const r=await e.getAllPropertiesOfType(Wi);n={...n,...r};const o=await e.getAllPropertiesOfType(yn);if(n={...n,...o},Object.keys(n).length===0)return[];const a=[];for(const c in n){const u=Number(c),d=await e.getProperties(u);if(!d||((i=d.Name)==null?void 0:i.value)!==this.propertySet.parameter)continue;let f;if(d.type===Wi&&(f="HasProperties"),d.type===yn&&(f="Quantities"),!!f)for(const m of d[f]){const p=await e.getProperties(m.value);if(!(!p||((s=p.Name)==null?void 0:s.value)!==this.baseName.parameter)){if(this.value){const I=Object.keys(p).find(E=>E.endsWith("Value"));if(!I||p[I].value!==this.value.parameter)continue}a.push(u)}}}const h=this.components.get(st);for(const c of a){const u=h.getEntitiesWithRelation(e,"IsDefinedBy",c);for(const d of u){if(d in t)continue;const f=await e.getProperties(d);f&&(t[d]=f)}}return[]}async test(e,t){var i;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],h={guid:(i=o.GlobalId)==null?void 0:i.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(h);const c=(await this.getPsets(t,r)).filter(u=>{var d;return this.evalRequirement(((d=u.Name)==null?void 0:d.value)??null,this.propertySet,"PropertySet")?(a.push({currentValue:u.Name.value,parameter:"PropertySet",pass:!0,requiredValue:this.propertySet.parameter}),!0):!1});if(c.length===0){a.push({currentValue:null,parameter:"PropertySet",pass:!1,requiredValue:this.propertySet.parameter});continue}for(const u of c){const d=this.getItemsAttrName(u.type);if(!d){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}const f=u[d].filter(m=>{var p;return this._unsupportedTypes.includes(m.type)||!this.evalRequirement(((p=m.Name)==null?void 0:p.value)??null,this.baseName,"BaseName")?!1:(a.push({currentValue:m.Name.value,parameter:"BaseName",pass:!0,requiredValue:this.baseName.parameter}),!0)});if(f.length===0){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}for(const m of f)this.evalValue(m,a),this.evalDataType(m,a),this.evalURI()}h.pass=a.every(({pass:u})=>u)}const s=[...this.testResult];return this.testResult=[],s}getItemsAttrName(e){let t;return e===Wi&&(t="HasProperties"),e===yn&&(t="Quantities"),t}getValueKey(e){return Object.keys(e).find(t=>t.endsWith("Value")||t.endsWith("Values"))}async getPsetProps(e,t,i){const s=structuredClone(t),n=[],r=s[i];if(!r)return n;for(const{value:o}of r){const a=await e.getProperties(o);a&&n.push(a)}return s[i]=n,s}async getTypePsets(e,t){const i=[],s=this.components.get(st).getEntityRelations(e,t,"IsTypedBy");if(!(s&&s[0]))return i;const n=await e.getProperties(s[0]);if(!(n&&"HasPropertySets"in n&&Array.isArray(n.HasPropertySets)))return i;for(const{value:r}of n.HasPropertySets){const o=await e.getProperties(r);if(!(o&&"HasProperties"in o&&Array.isArray(o.HasProperties)))continue;const a=await this.getPsetProps(e,o,"HasProperties");i.push(a)}return i}async getPsets(e,t){const i=await this.getTypePsets(e,t),s=this.components.get(st).getEntityRelations(e,t,"IsDefinedBy");if(!s)return i;for(const n of s){const r=await e.getProperties(n);if(!r)continue;const o=this.getItemsAttrName(r.type);if(!o)continue;const a=await this.getPsetProps(e,r,o);i.push(a)}return i}evalValue(e,t){const i=this.getValueKey(e),s=e[i];if(this.value){if(!s)return t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:this.value.parameter}),!1;const n=structuredClone(this.value);if(s.name==="IFCLABEL"&&n.type==="simple"&&(n.parameter=String(n.parameter)),(e.type===zo||e.type===ko)&&Array.isArray(s)){const r=s.map(a=>a.value),o=s.find(a=>n?this.evalRequirement(a.value,n,"Value"):!1);return t==null||t.push({currentValue:r,pass:!!o,parameter:"Value",requiredValue:n.parameter}),!!o}return this.evalRequirement(s.value,n,"Value",t)}return i?s.type===3&&s.value===2?(t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:null}),!1):s.type===1&&s.value.trim()===""?(t==null||t.push({parameter:"Value",currentValue:"",pass:!1,requiredValue:null}),!1):!0:!0}evalDataType(e,t){if(!this.dataType)return!0;const i=this.getValueKey(e),s=e[i];if(!s)return t==null||t.push({parameter:"DataType",currentValue:null,pass:!1,requiredValue:this.dataType}),!1;if((e.type===zo||e.type===ko)&&Array.isArray(s)&&s[0]){const n=s[0].name;return this.evalRequirement(n,{type:"simple",parameter:this.dataType},"DataType",t)}return this.evalRequirement(s.name,{type:"simple",parameter:this.dataType},"DataType",t)}evalURI(){return!0}}class Jp{constructor(e,t,i){T(this,"name"),T(this,"ifcVersion",new Set),T(this,"identifier",Wt.create()),T(this,"description"),T(this,"instructions"),T(this,"requirementsDescription"),T(this,"applicability",new ei),T(this,"requirements",new ei),T(this,"components"),this.components=e,this.name=t;for(const s of i)this.ifcVersion.add(s)}set(e){const t=e,i=this;for(const s in e){if(s==="identifier")continue;const n=t[s];s in this&&(i[s]=n)}return this.components.get(im).list.set(this.identifier,this),this}async test(e){let t=[];if(this.requirements.size===0)return t;const i={};for(const s of this.applicability)await s.getEntities(e,i);return t=await[...this.requirements][0].test(i,e),t}serialize(){const e=`name="${this.name}"`,t=this.identifier?`identifier="${this.identifier}"`:"",i=this.description?`description="${this.description}"`:"",s=this.instructions?`instructions="${this.instructions}"`:"";return` +`}async getEntities(e,t={}){var i,s;let n={};const r=await e.getAllPropertiesOfType(Vi);n={...n,...r};const o=await e.getAllPropertiesOfType(pn);if(n={...n,...o},Object.keys(n).length===0)return[];const a=[];for(const h in n){const d=Number(h),u=await e.getProperties(d);if(!u||((i=u.Name)==null?void 0:i.value)!==this.propertySet.parameter)continue;let f;if(u.type===Vi&&(f="HasProperties"),u.type===pn&&(f="Quantities"),!!f)for(const m of u[f]){const p=await e.getProperties(m.value);if(!(!p||((s=p.Name)==null?void 0:s.value)!==this.baseName.parameter)){if(this.value){const E=Object.keys(p).find(I=>I.endsWith("Value"));if(!E||p[E].value!==this.value.parameter)continue}a.push(d)}}}const l=this.components.get(it);for(const h of a){const d=l.getEntitiesWithRelation(e,"IsDefinedBy",h);for(const u of d){if(u in t)continue;const f=await e.getProperties(u);f&&(t[u]=f)}}return[]}async test(e,t){var i;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],l={guid:(i=o.GlobalId)==null?void 0:i.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l);const h=(await this.getPsets(t,r)).filter(d=>{var u;return this.evalRequirement(((u=d.Name)==null?void 0:u.value)??null,this.propertySet,"PropertySet")?(a.push({currentValue:d.Name.value,parameter:"PropertySet",pass:!0,requiredValue:this.propertySet.parameter}),!0):!1});if(h.length===0){a.push({currentValue:null,parameter:"PropertySet",pass:!1,requiredValue:this.propertySet.parameter});continue}for(const d of h){const u=this.getItemsAttrName(d.type);if(!u){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}const f=d[u].filter(m=>{var p;return this._unsupportedTypes.includes(m.type)||!this.evalRequirement(((p=m.Name)==null?void 0:p.value)??null,this.baseName,"BaseName")?!1:(a.push({currentValue:m.Name.value,parameter:"BaseName",pass:!0,requiredValue:this.baseName.parameter}),!0)});if(f.length===0){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}for(const m of f)this.evalValue(m,a),this.evalDataType(m,a),this.evalURI()}l.pass=a.every(({pass:d})=>d)}const s=[...this.testResult];return this.testResult=[],s}getItemsAttrName(e){let t;return e===Vi&&(t="HasProperties"),e===pn&&(t="Quantities"),t}getValueKey(e){return Object.keys(e).find(t=>t.endsWith("Value")||t.endsWith("Values"))}async getPsetProps(e,t,i){const s=structuredClone(t),n=[],r=s[i];if(!r)return n;for(const{value:o}of r){const a=await e.getProperties(o);a&&n.push(a)}return s[i]=n,s}async getTypePsets(e,t){const i=[],s=this.components.get(it).getEntityRelations(e,t,"IsTypedBy");if(!(s&&s[0]))return i;const n=await e.getProperties(s[0]);if(!(n&&"HasPropertySets"in n&&Array.isArray(n.HasPropertySets)))return i;for(const{value:r}of n.HasPropertySets){const o=await e.getProperties(r);if(!(o&&"HasProperties"in o&&Array.isArray(o.HasProperties)))continue;const a=await this.getPsetProps(e,o,"HasProperties");i.push(a)}return i}async getPsets(e,t){const i=await this.getTypePsets(e,t),s=this.components.get(it).getEntityRelations(e,t,"IsDefinedBy");if(!s)return i;for(const n of s){const r=await e.getProperties(n);if(!r)continue;const o=this.getItemsAttrName(r.type);if(!o)continue;const a=await this.getPsetProps(e,r,o);i.push(a)}return i}evalValue(e,t){const i=this.getValueKey(e),s=e[i];if(this.value){if(!s)return t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:this.value.parameter}),!1;const n=structuredClone(this.value);if(s.name==="IFCLABEL"&&n.type==="simple"&&(n.parameter=String(n.parameter)),(e.type===wo||e.type===vo)&&Array.isArray(s)){const r=s.map(a=>a.value),o=s.find(a=>n?this.evalRequirement(a.value,n,"Value"):!1);return t==null||t.push({currentValue:r,pass:!!o,parameter:"Value",requiredValue:n.parameter}),!!o}return this.evalRequirement(s.value,n,"Value",t)}return i?s.type===3&&s.value===2?(t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:null}),!1):s.type===1&&s.value.trim()===""?(t==null||t.push({parameter:"Value",currentValue:"",pass:!1,requiredValue:null}),!1):!0:!0}evalDataType(e,t){if(!this.dataType)return!0;const i=this.getValueKey(e),s=e[i];if(!s)return t==null||t.push({parameter:"DataType",currentValue:null,pass:!1,requiredValue:this.dataType}),!1;if((e.type===wo||e.type===vo)&&Array.isArray(s)&&s[0]){const n=s[0].name;return this.evalRequirement(n,{type:"simple",parameter:this.dataType},"DataType",t)}return this.evalRequirement(s.name,{type:"simple",parameter:this.dataType},"DataType",t)}evalURI(){return!0}}class $f{constructor(e,t,i){T(this,"name"),T(this,"ifcVersion",new Set),T(this,"identifier",Ht.create()),T(this,"description"),T(this,"instructions"),T(this,"requirementsDescription"),T(this,"applicability",new Jt),T(this,"requirements",new Jt),T(this,"components"),this.components=e,this.name=t;for(const s of i)this.ifcVersion.add(s)}set(e){const t=e,i=this;for(const s in e){if(s==="identifier")continue;const n=t[s];s in this&&(i[s]=n)}return this.components.get(sp).list.set(this.identifier,this),this}async test(e){let t=[];if(this.requirements.size===0)return t;const i={};for(const s of this.applicability)await s.getEntities(e,i);return t=await[...this.requirements][0].test(i,e),t}serialize(){const e=`name="${this.name}"`,t=this.identifier?`identifier="${this.identifier}"`:"",i=this.description?`description="${this.description}"`:"",s=this.instructions?`instructions="${this.instructions}"`:"";return` ${[...this.applicability].map(n=>n.serialize("applicability"))} ${[...this.requirements].map(n=>n.serialize("requirement"))} - `}}const Gt=l=>{if(!l)return;const e={};if("simpleValue"in l&&(e.type="simple",e.parameter=l.simpleValue),"restriction"in l){const t=l.restriction;if("pattern"in t&&(e.type="pattern",e.parameter=t.pattern.value),"enumeration"in t){e.type="enumeration";const i=t.enumeration.map(({value:s})=>s);e.parameter=i}}if(e.parameter!==void 0)return e},Ba=(l,e)=>{const t=[];for(const i of e){const s=i.name,n=Gt(s);if(!n)continue;const r=new Qp(l,n);i.cardinality&&(r.cardinality=i.cardinality),r.predefinedType=Gt(i.predefinedType),r.instructions=i.instructions,t.push(r)}return t},$p=(l,e)=>{const t=[];for(const i of e){const s=i.name,n=Gt(s);if(!n)continue;const r=new jp(l,n);i.cardinality&&(r.cardinality=i.cardinality),r.value=Gt(i.value),r.instructions=i.instructions,t.push(r)}return t},em=(l,e)=>{const t=[];for(const i of e){const s=i.system,n=Gt(s);if(!n)continue;const r=new Kp(l,n);i.cardinality&&(r.cardinality=i.cardinality);const o=Gt(i.value);(o==null?void 0:o.type)==="simple"&&(o.parameter=String(o.parameter)),(o==null?void 0:o.type)==="enumeration"&&Array.isArray(o.parameter)&&(o.parameter=o.parameter.map(String)),r.value=o,r.uri=i.uri,r.instructions=i.instructions,t.push(r)}return t},tm=(l,e)=>{const t=[];for(const i of e){const s=i.propertySet,n=i.baseName,r=Gt(s),o=Gt(n);if(!(o&&r))continue;const a=new qp(l,r,o);i.cardinality&&(a.cardinality=i.cardinality);const h=Gt(i.value);(h==null?void 0:h.type)==="enumeration"&&Array.isArray(h.parameter)&&(h.parameter=h.parameter.map(String)),a.value=h,a.dataType=i.dataType,a.uri=i.uri,a.instructions=i.instructions,t.push(a)}return t},xo=class jr extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Ct),e.add(jr.uuid,this)}getFragmentIdMap(e,t){const i=t.filter(o=>o.pass).map(o=>o.expressID),s=e.getFragmentMap(i),n=t.filter(o=>!o.pass).map(o=>o.expressID),r=e.getFragmentMap(n);return{pass:s,fail:r}}create(e,t,i){const s=new Jp(this.components,e,t);return i&&(s.identifier=i),this.list.set(s.identifier,s),s}load(e){const t=[],i=jr.xmlParser.parse(e).ids,{specifications:s}=i;if(s&&s.specification){const n=Array.isArray(s.specification)?s.specification:[s.specification];for(const r of n){const{name:o,ifcVersion:a,description:h,instructions:c,identifier:u}=r;if(!(o&&a))continue;const d=[],f=[],{applicability:m,requirements:p}=r;if(m){const{maxOccurs:E,...C}=m,v=Array.isArray(C)?C:[C];for(const g of v)for(const S in g){const O=Array.isArray(g[S])?g[S]:[g[S]];if(S==="entity"){const A=Ba(this.components,O);d.push(...A)}}}let I;if(p){const{maxOccurs:E,...C}=p;I=p.description;const v=Array.isArray(C)?C:[C];for(const g of v)for(const S in g){const O=Array.isArray(g[S])?g[S]:[g[S]];if(S==="entity"){const A=Ba(this.components,O);f.push(...A)}if(S==="attribute"){const A=$p(this.components,O);f.push(...A)}if(S==="classification"){const A=em(this.components,O);f.push(...A)}if(S==="property"){const A=tm(this.components,O);f.push(...A)}}}if(d.length>0&&f.length>0){const E=this.create(o,a.split(/\s+/),u);E.description=h,E.instructions=c,E.requirementsDescription=I,E.applicability.add(...d),E.requirements.add(...f),t.push(E)}}}return t}export(e,t=this.list.values()){const i=t??this.list;return` - + `}}const Yt=c=>{if(!c)return;const e={};if("simpleValue"in c&&(e.type="simple",e.parameter=c.simpleValue),"restriction"in c){const t=c.restriction;if("pattern"in t&&(e.type="pattern",e.parameter=t.pattern.value),"enumeration"in t){e.type="enumeration";const i=t.enumeration.map(({value:s})=>s);e.parameter=i}}if(e.parameter!==void 0)return e},Ta=(c,e)=>{const t=[];for(const i of e){const s=i.name,n=Yt(s);if(!n)continue;const r=new qf(c,n);i.cardinality&&(r.cardinality=i.cardinality),r.predefinedType=Yt(i.predefinedType),r.instructions=i.instructions,t.push(r)}return t},ep=(c,e)=>{const t=[];for(const i of e){const s=i.name,n=Yt(s);if(!n)continue;const r=new Qf(c,n);i.cardinality&&(r.cardinality=i.cardinality),r.value=Yt(i.value),r.instructions=i.instructions,t.push(r)}return t},tp=(c,e)=>{const t=[];for(const i of e){const s=i.system,n=Yt(s);if(!n)continue;const r=new Kf(c,n);i.cardinality&&(r.cardinality=i.cardinality);const o=Yt(i.value);(o==null?void 0:o.type)==="simple"&&(o.parameter=String(o.parameter)),(o==null?void 0:o.type)==="enumeration"&&Array.isArray(o.parameter)&&(o.parameter=o.parameter.map(String)),r.value=o,r.uri=i.uri,r.instructions=i.instructions,t.push(r)}return t},ip=(c,e)=>{const t=[];for(const i of e){const s=i.propertySet,n=i.baseName,r=Yt(s),o=Yt(n);if(!(o&&r))continue;const a=new Jf(c,r,o);i.cardinality&&(a.cardinality=i.cardinality);const l=Yt(i.value);(l==null?void 0:l.type)==="enumeration"&&Array.isArray(l.parameter)&&(l.parameter=l.parameter.map(String)),a.value=l,a.dataType=i.dataType,a.uri=i.uri,a.instructions=i.instructions,t.push(a)}return t},Eo=class Lr extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new gt),e.add(Lr.uuid,this)}getFragmentIdMap(e,t){const i=t.filter(o=>o.pass).map(o=>o.expressID),s=e.getFragmentMap(i),n=t.filter(o=>!o.pass).map(o=>o.expressID),r=e.getFragmentMap(n);return{pass:s,fail:r}}create(e,t,i){const s=new $f(this.components,e,t);return i&&(s.identifier=i),this.list.set(s.identifier,s),s}load(e){const t=[],i=Lr.xmlParser.parse(e).ids,{specifications:s}=i;if(s&&s.specification){const n=Array.isArray(s.specification)?s.specification:[s.specification];for(const r of n){const{name:o,ifcVersion:a,description:l,instructions:h,identifier:d}=r;if(!(o&&a))continue;const u=[],f=[],{applicability:m,requirements:p}=r;if(m){const{maxOccurs:I,...g}=m,w=Array.isArray(g)?g:[g];for(const C of w)for(const v in C){const O=Array.isArray(C[v])?C[v]:[C[v]];if(v==="entity"){const A=Ta(this.components,O);u.push(...A)}}}let E;if(p){const{maxOccurs:I,...g}=p;E=p.description;const w=Array.isArray(g)?g:[g];for(const C of w)for(const v in C){const O=Array.isArray(C[v])?C[v]:[C[v]];if(v==="entity"){const A=Ta(this.components,O);f.push(...A)}if(v==="attribute"){const A=ep(this.components,O);f.push(...A)}if(v==="classification"){const A=tp(this.components,O);f.push(...A)}if(v==="property"){const A=ip(this.components,O);f.push(...A)}}}if(u.length>0&&f.length>0){const I=this.create(o,a.split(/\s+/),d);I.description=l,I.instructions=h,I.requirementsDescription=E,I.applicability.add(...u),I.requirements.add(...f),t.push(I)}}}return t}export(e,t=this.list.values()){const i=t??this.list;return` + ${e.title} ${e.copyright?`${e.copyright}`:""} @@ -270,7 +267,7 @@ ${e} ${[...i].map(s=>s.serialize()).join(` `)} -`}};T(xo,"uuid","9f0b9f78-9b2e-481a-b766-2fbfd01f342c");T(xo,"xmlParser",new Ql.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let im=xo;const za=new we,mn=new L;class gh extends Xc{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new Xi(e,3)),this.setAttribute("uv",new Xi(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new Fr(t,6,1);return this.setAttribute("instanceStart",new Vi(i,3,0)),this.setAttribute("instanceEnd",new Vi(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new Fr(t,6,1);return this.setAttribute("instanceColorStart",new Vi(i,3,0)),this.setAttribute("instanceColorEnd",new Vi(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new Zc(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new we);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),za.setFromBufferAttribute(t),this.boundingBox.union(za))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ri),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let s=0;for(let n=0,r=e.count;n`}};T(Eo,"uuid","9f0b9f78-9b2e-481a-b766-2fbfd01f342c");T(Eo,"xmlParser",new Al.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let sp=Eo;const Ra=new ye,on=new x;class Ql extends wh{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new Yi(e,3)),this.setAttribute("uv",new Yi(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new mr(t,6,1);return this.setAttribute("instanceStart",new Bi(i,3,0)),this.setAttribute("instanceEnd",new Bi(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new mr(t,6,1);return this.setAttribute("instanceColorStart",new Bi(i,3,0)),this.setAttribute("instanceColorEnd",new Bi(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new vh(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ye);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Ra.setFromBufferAttribute(t),this.boundingBox.union(Ra))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new gi),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let s=0;for(let n=0,r=e.count;n #include #include @@ -640,7 +637,7 @@ ${e} #include } - `};class _s extends We{constructor(e){super({type:"LineMaterial",uniforms:no.clone(Sn.line.uniforms),vertexShader:Sn.line.vertexShader,fragmentShader:Sn.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1))}}const ka=new L,Va=new L,ke=new qi,Ve=new qi,St=new qi,Sr=new L,wr=new ne,Ye=new Je,Ya=new L,In=new we,En=new Ri,wt=new qi;let Ot,Ei;function Ga(l,e,t){return wt.set(0,0,-e,1).applyMatrix4(l.projectionMatrix),wt.multiplyScalar(1/wt.w),wt.x=Ei/t.width,wt.y=Ei/t.height,wt.applyMatrix4(l.projectionMatrixInverse),wt.multiplyScalar(1/wt.w),Math.abs(Math.max(wt.x,wt.y))}function sm(l,e){const t=l.matrixWorld,i=l.geometry,s=i.attributes.instanceStart,n=i.attributes.instanceEnd,r=Math.min(i.instanceCount,s.count);for(let o=0,a=r;oc&&Ve.z>c)continue;if(ke.z>c){const E=ke.z-Ve.z,C=(ke.z-c)/E;ke.lerp(Ve,C)}else if(Ve.z>c){const E=Ve.z-ke.z,C=(Ve.z-c)/E;Ve.lerp(ke,C)}ke.applyMatrix4(i),Ve.applyMatrix4(i),ke.multiplyScalar(1/ke.w),Ve.multiplyScalar(1/Ve.w),ke.x*=s.x/2,ke.y*=s.y/2,Ve.x*=s.x/2,Ve.y*=s.y/2,Ye.start.copy(ke),Ye.start.z=0,Ye.end.copy(Ve),Ye.end.z=0;const f=Ye.closestPointToPointParameter(Sr,!0);Ye.at(f,Ya);const m=gi.lerp(ke.z,Ve.z,f),p=m>=-1&&m<=1,I=Sr.distanceTo(Ya)t.geometry.attributes.position.count&&(t.geometry.dispose(),t.geometry=new Bn),t.geometry.setPositions(r),s&&t.geometry.setColors(o),i.geometry.setFromPoints(a)}newCurve(e,t,i){const s=new Bn,n=new _s({color:t,linewidth:e,vertexColors:i,worldUnits:!1,depthTest:!1}),r=new Ch(s,n);return this.scene.add(r),r}newPoints(e,t){const i=new Ce,s=new et(new Float32Array,3);i.setAttribute("position",s);const n=new uc({size:e,color:t,sizeAttenuation:!1,depthTest:!1}),r=new fc(i,n);return r.frustumCulled=!1,this.scene.add(r),r}};w(Th,"settings",{colors:{LINE:[213/255,0/255,255/255],CIRCULARARC:[0/255,46,255/255],CLOTHOID:[0/255,255/255,0/255],PARABOLICARC:[0/255,255/255,72/255],CONSTANTGRADIENT:[213/255,0/255,255/255]}});let vh=Th;class om extends Zi{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new ve(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof Element&&t.element.parentNode!==null&&t.element.parentNode.removeChild(t.element)})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const zi=new L,Ha=new ne,Wa=new ne,Xa=new L,Za=new L;class am{constructor(e={}){const t=this;let i,s,n,r;const o={objects:new WeakMap},a=e.element!==void 0?e.element:document.createElement("div");a.style.overflow="hidden",this.domElement=a,this.getSize=function(){return{width:i,height:s}},this.render=function(f,m){f.matrixWorldAutoUpdate===!0&&f.updateMatrixWorld(),m.parent===null&&m.matrixWorldAutoUpdate===!0&&m.updateMatrixWorld(),Ha.copy(m.matrixWorldInverse),Wa.multiplyMatrices(m.projectionMatrix,Ha),h(f,f,m),d(f)},this.setSize=function(f,m){i=f,s=m,n=i/2,r=s/2,a.style.width=f+"px",a.style.height=m+"px"};function h(f,m,p){if(f.isCSS2DObject){zi.setFromMatrixPosition(f.matrixWorld),zi.applyMatrix4(Wa);const I=f.visible===!0&&zi.z>=-1&&zi.z<=1&&f.layers.test(p.layers)===!0;if(f.element.style.display=I===!0?"":"none",I===!0){f.onBeforeRender(t,m,p);const C=f.element;C.style.transform="translate("+-100*f.center.x+"%,"+-100*f.center.y+"%)translate("+(zi.x*n+n)+"px,"+(-zi.y*r+r)+"px)",C.parentNode!==a&&a.appendChild(C),f.onAfterRender(t,m,p)}const E={distanceToCameraSquared:c(p,f)};o.objects.set(f,E)}for(let I=0,E=f.children.length;I{if(this.onBeforeUpdate.trigger(this),!this.enabled||!this.currentWorld)return;const s=this.currentWorld.scene.three,n=this.currentWorld.camera.three;s instanceof vi&&this.three2D.render(s,n)}),this.onDisposed.add(()=>{this.three2D.domElement.remove()}),this.onResize.add(({x:s,y:n})=>{this.three2D.setSize(s,n)}),this.setupHtmlRenderer(),this.resize()}setupHtmlRenderer(){this.three2D.domElement.style.position="absolute",this.three2D.domElement.style.top="0px",this.three2D.domElement.style.pointerEvents="none",this.container&&this.container.appendChild(this.three2D.domElement)}}const yh=class Sh extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"enabled",!0),w(this,"threshold",50),w(this,"autoCluster",!0),w(this,"list",new Map),w(this,"clusterLabels",new Set),w(this,"currentKeys",new Set),w(this,"_color","white"),w(this,"_markerKey",0),w(this,"_clusterKey",0),w(this,"_worldEvents",new Map),w(this,"_setupWorlds",new Set),e.add(Sh.uuid,this)}get color(){return this._color}set color(e){this._color=e;for(const[t,i]of this.list)for(const[s,n]of i)n.label.three.element.style.color=e}create(e,t,i,s=!1){this.setupEvents(e,!0);const n=this._markerKey.toString(),r=this.getWorldMarkerList(e);if(r.has(n))return;const o=document.createElement("span");o.innerHTML=t,o.style.color=this._color;const a=new $e(e,o);return a.three.position.copy(i),r.set(n,{key:n,label:a,merged:!1,static:s}),this._markerKey++,n}delete(e){for(const[t,i]of this.list){const s=i.get(e);s&&s.label.dispose(),i.delete(e)}}getWorldMarkerList(e){return this.list.has(e.uuid)||this.list.set(e.uuid,new Map),this.list.get(e.uuid)}dispose(e){for(const[t,i]of this.list){const s=[...i.keys()];for(const n of s){const r=i.get(n);e&&r.type!==e||(r.label.dispose(),i.delete(n))}}if(!e){this.list.clear(),this._markerKey=0;for(const t of this.clusterLabels)t.label.dispose();this.clusterLabels.clear(),this._clusterKey=0,this.currentKeys.clear()}this.onDisposed.trigger()}setupEvents(e,t){if(t&&this._setupWorlds.has(e.uuid)||!e.camera.hasCameraControls())return;const i=this.getWorldEvent(e);e.camera.controls.removeEventListener("sleep",i),e.camera.controls.removeEventListener("rest",i),t&&(e.camera.controls.addEventListener("sleep",i),e.camera.controls.addEventListener("rest",i))}cluster(e){if(!this.autoCluster)return;this.resetMarkers();const t=this.list.get(e.uuid);if(t){for(const[i,s]of t)if(!s.merged&&!s.static){this.currentKeys.clear();for(const[n,r]of t)r.static||s.key!==r.key&&!r.merged&&this.distance(s.label,r.label)0){this.currentKeys.add(s.key),s.merged=!0;const n=Array.from(this.currentKeys),r=this.getAveragePositionFromLabels(n),o=new $e(s.label.world,this.createClusterElement(this._clusterKey.toString())),{element:a}=o.three;a.textContent=n.length.toString(),o.three.position.copy(r),this.clusterLabels.add({key:this._clusterKey.toString(),markerKeys:n,label:o}),this._clusterKey++}}this.removeMergeMarkers(e)}}getWorldEvent(e){if(!this._worldEvents.has(e.uuid)){const t=()=>{this.cluster(e)};this._worldEvents.set(e.uuid,t)}return this._worldEvents.get(e.uuid)}resetMarkers(){for(const[e,t]of this.list)for(const[i,s]of t)s.merged=!1;for(const e of this.clusterLabels)e.label.dispose();this.clusterLabels.clear(),this._clusterKey=0}removeMergeMarkers(e){const t=this.list.get(e.uuid);if(t){for(const[i,s]of t)s.merged?s.label.dispose():s.label.world.scene.three.add(s.label.three);for(const i of this.clusterLabels)if(i.markerKeys.length===1){for(const[s,n]of this.list){const r=n.get(i.markerKeys[0]);r&&(r.label.world.scene.three.add(r.label.three),r.merged=!1)}i.label.dispose(),this.clusterLabels.delete(i)}}}getAveragePositionFromLabels(e){const t=e.map(i=>{for(const[s,n]of this.list){const r=n.get(i);if(r)return r.label.three.position}return new L});return t.reduce((i,s)=>i.add(s),new L).divideScalar(t.length)}createClusterElement(e){const t=document.createElement("div");return t.textContent=e,t.style.color="#000000",t.style.background="#FFFFFF",t.style.fontSize="1.2rem",t.style.fontWeight="500",t.style.pointerEvents="auto",t.style.borderRadius="50%",t.style.padding="5px 11px",t.style.textAlign="center",t.style.cursor="pointer",t.addEventListener("pointerdown",()=>{this.navigateToCluster(e)}),t.addEventListener("pointerover",()=>{t.style.background="#BCF124"}),t.addEventListener("pointerout",()=>{t.style.background="#FFFFFF"}),t}getScreenPosition(e){const t=new L;if(!e.world.renderer)throw new Error("Renderer not found!");const i=e.three.position.clone();i.project(e.world.camera.three);const s=e.world.renderer.getSize();return t.x=i.x*s.x/2+s.x/2,t.y=-(i.y*s.y/2)+s.y/2,t}distance(e,t){const i=this.getScreenPosition(e),s=this.getScreenPosition(t),n=i.x-s.x,r=i.y-s.y,o=Math.sqrt(n*n+r*r)*.5;return o===0?this.threshold+1:o}navigateToCluster(e){const t=[],i=Array.from(this.clusterLabels).find(h=>h.key===e);if(!i)return;const s=i.label.world.camera;if(!s.hasCameraControls()){console.warn("Zoom to clusters only supported with Camera Controls!");return}for(const h of i.markerKeys)for(const[c,u]of this.list){const d=u.get(h);if(d){const{x:f,y:m,z:p}=d.label.three.position;t.push(f,m,p)}}i.label.dispose(),this.clusterLabels.delete(i);const n=new Ce,r=new Float32Array(t),o=new et(r,3);n.setAttribute("position",o);const a=new ee(n);a.geometry.computeBoundingSphere(),a.geometry.boundingSphere&&s.controls.fitToSphere(a,!0),n.dispose(),a.clear(),t.length=0}};w(yh,"uuid","4079eb91-79b0-4ede-bcf2-15b837129236");let hi=yh;function hm(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Mo={exports:{}};Mo.exports=$n;Mo.exports.default=$n;function $n(l,e,t){t=t||2;var i=e&&e.length,s=i?e[0]*t:l.length,n=wh(l,0,s,t,!0),r=[];if(!n||n.next===n.prev)return r;var o,a,h,c,u,d,f;if(i&&(n=pm(l,e,n,t)),l.length>80*t){o=h=l[0],a=c=l[1];for(var m=t;mh&&(h=u),d>c&&(c=d);f=Math.max(h-o,c-a),f=f!==0?32767/f:0}return bs(n,r,t,o,a,f,0),r}function wh(l,e,t,i,s){var n,r;if(s===qr(l,e,t,i)>0)for(n=e;n=e;n-=i)r=ja(n,l[n],l[n+1],r);return r&&er(r,r.next)&&(xs(r),r=r.next),r}function Ti(l,e){if(!l)return l;e||(e=l);var t=l,i;do if(i=!1,!t.steiner&&(er(t,t.next)||be(t.prev,t,t.next)===0)){if(xs(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function bs(l,e,t,i,s,n,r){if(l){!r&&n&&Cm(l,i,s,n);for(var o=l,a,h;l.prev!==l.next;){if(a=l.prev,h=l.next,n?dm(l,i,s,n):cm(l)){e.push(a.i/t|0),e.push(l.i/t|0),e.push(h.i/t|0),xs(l),l=h.next,o=h.next;continue}if(l=h,l===o){r?r===1?(l=um(Ti(l),e,t),bs(l,e,t,i,s,n,2)):r===2&&fm(l,e,t,i,s,n):bs(Ti(l),e,t,i,s,n,1);break}}}}function cm(l){var e=l.prev,t=l,i=l.next;if(be(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,r=i.x,o=e.y,a=t.y,h=i.y,c=sn?s>r?s:r:n>r?n:r,f=o>a?o>h?o:h:a>h?a:h,m=i.next;m!==e;){if(m.x>=c&&m.x<=d&&m.y>=u&&m.y<=f&&Hi(s,o,n,a,r,h,m.x,m.y)&&be(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function dm(l,e,t,i){var s=l.prev,n=l,r=l.next;if(be(s,n,r)>=0)return!1;for(var o=s.x,a=n.x,h=r.x,c=s.y,u=n.y,d=r.y,f=oa?o>h?o:h:a>h?a:h,I=c>u?c>d?c:d:u>d?u:d,E=Kr(f,m,e,t,i),C=Kr(p,I,e,t,i),v=l.prevZ,g=l.nextZ;v&&v.z>=E&&g&&g.z<=C;){if(v.x>=f&&v.x<=p&&v.y>=m&&v.y<=I&&v!==s&&v!==r&&Hi(o,c,a,u,h,d,v.x,v.y)&&be(v.prev,v,v.next)>=0||(v=v.prevZ,g.x>=f&&g.x<=p&&g.y>=m&&g.y<=I&&g!==s&&g!==r&&Hi(o,c,a,u,h,d,g.x,g.y)&&be(g.prev,g,g.next)>=0))return!1;g=g.nextZ}for(;v&&v.z>=E;){if(v.x>=f&&v.x<=p&&v.y>=m&&v.y<=I&&v!==s&&v!==r&&Hi(o,c,a,u,h,d,v.x,v.y)&&be(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;g&&g.z<=C;){if(g.x>=f&&g.x<=p&&g.y>=m&&g.y<=I&&g!==s&&g!==r&&Hi(o,c,a,u,h,d,g.x,g.y)&&be(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function um(l,e,t){var i=l;do{var s=i.prev,n=i.next.next;!er(s,n)&&Fh(s,i,i.next,n)&&Ls(s,n)&&Ls(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),xs(i),xs(i.next),i=l=n),i=i.next}while(i!==l);return Ti(i)}function fm(l,e,t,i,s,n){var r=l;do{for(var o=r.next.next;o!==r.prev;){if(r.i!==o.i&&vm(r,o)){var a=Ah(r,o);r=Ti(r,r.next),a=Ti(a,a.next),bs(r,e,t,i,s,n,0),bs(a,e,t,i,s,n,0);return}o=o.next}r=r.next}while(r!==l)}function pm(l,e,t,i){var s=[],n,r,o,a,h;for(n=0,r=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,r=t.x=t.x&&t.x>=h&&i!==t.x&&Hi(sr.x||t.x===r.x&&gm(r,t)))&&(r=t,u=d)),t=t.next;while(t!==a);return r}function gm(l,e){return be(l.prev,l,e.prev)<0&&be(e.next,l,l.next)<0}function Cm(l,e,t,i){var s=l;do s.z===0&&(s.z=Kr(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==l);s.prevZ.nextZ=null,s.prevZ=null,Tm(s)}function Tm(l){var e,t,i,s,n,r,o,a,h=1;do{for(t=l,l=null,n=null,r=0;t;){for(r++,i=t,o=0,e=0;e0||a>0&&i;)o!==0&&(a===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,a--),n?n.nextZ=s:l=s,s.prevZ=n,n=s;t=i}n.nextZ=null,h*=2}while(r>1);return l}function Kr(l,e,t,i,s){return l=(l-t)*s|0,e=(e-i)*s|0,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,l|e<<1}function Rm(l){var e=l,t=l;do(e.x=(l-r)*(n-o)&&(l-r)*(i-o)>=(t-r)*(e-o)&&(t-r)*(n-o)>=(s-r)*(i-o)}function vm(l,e){return l.next.i!==e.i&&l.prev.i!==e.i&&!ym(l,e)&&(Ls(l,e)&&Ls(e,l)&&Sm(l,e)&&(be(l.prev,l,e.prev)||be(l,e.prev,e))||er(l,e)&&be(l.prev,l,l.next)>0&&be(e.prev,e,e.next)>0)}function be(l,e,t){return(e.y-l.y)*(t.x-e.x)-(e.x-l.x)*(t.y-e.y)}function er(l,e){return l.x===e.x&&l.y===e.y}function Fh(l,e,t,i){var s=Cn(be(l,e,t)),n=Cn(be(l,e,i)),r=Cn(be(t,i,l)),o=Cn(be(t,i,e));return!!(s!==n&&r!==o||s===0&&gn(l,t,e)||n===0&&gn(l,i,e)||r===0&&gn(t,l,i)||o===0&&gn(t,e,i))}function gn(l,e,t){return e.x<=Math.max(l.x,t.x)&&e.x>=Math.min(l.x,t.x)&&e.y<=Math.max(l.y,t.y)&&e.y>=Math.min(l.y,t.y)}function Cn(l){return l>0?1:l<0?-1:0}function ym(l,e){var t=l;do{if(t.i!==l.i&&t.next.i!==l.i&&t.i!==e.i&&t.next.i!==e.i&&Fh(t,t.next,l,e))return!0;t=t.next}while(t!==l);return!1}function Ls(l,e){return be(l.prev,l,l.next)<0?be(l,e,l.next)>=0&&be(l,l.prev,e)>=0:be(l,e,l.prev)<0||be(l,l.next,e)<0}function Sm(l,e){var t=l,i=!1,s=(l.x+e.x)/2,n=(l.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==l);return i}function Ah(l,e){var t=new Qr(l.i,l.x,l.y),i=new Qr(e.i,e.x,e.y),s=l.next,n=e.prev;return l.next=e,e.prev=l,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function ja(l,e,t,i){var s=new Qr(l,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function xs(l){l.next.prev=l.prev,l.prev.next=l.next,l.prevZ&&(l.prevZ.nextZ=l.nextZ),l.nextZ&&(l.nextZ.prevZ=l.prevZ)}function Qr(l,e,t){this.i=l,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}$n.deviation=function(l,e,t,i){var s=e&&e.length,n=s?e[0]*t:l.length,r=Math.abs(qr(l,0,n,t));if(s)for(var o=0,a=e.length;o0&&(i+=l[s-1].length,t.holes.push(i))}return t};var wm=Mo.exports;const Fm=hm(wm),Am={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` + `};class Ns extends He{constructor(e){super({type:"LineMaterial",uniforms:Hr.clone(mn.line.uniforms),vertexShader:mn.line.vertexShader,fragmentShader:mn.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1))}}const Sa=new x,wa=new x,ze=new Zi,ke=new Zi,wt=new Zi,fr=new x,pr=new ne,Ve=new tt,va=new x,an=new ye,ln=new gi,vt=new Zi;let At,mi;function ya(c,e,t){return vt.set(0,0,-e,1).applyMatrix4(c.projectionMatrix),vt.multiplyScalar(1/vt.w),vt.x=mi/t.width,vt.y=mi/t.height,vt.applyMatrix4(c.projectionMatrixInverse),vt.multiplyScalar(1/vt.w),Math.abs(Math.max(vt.x,vt.y))}function np(c,e){const t=c.matrixWorld,i=c.geometry,s=i.attributes.instanceStart,n=i.attributes.instanceEnd,r=Math.min(i.instanceCount,s.count);for(let o=0,a=r;oh&&ke.z>h)continue;if(ze.z>h){const I=ze.z-ke.z,g=(ze.z-h)/I;ze.lerp(ke,g)}else if(ke.z>h){const I=ke.z-ze.z,g=(ke.z-h)/I;ke.lerp(ze,g)}ze.applyMatrix4(i),ke.applyMatrix4(i),ze.multiplyScalar(1/ze.w),ke.multiplyScalar(1/ke.w),ze.x*=s.x/2,ze.y*=s.y/2,ke.x*=s.x/2,ke.y*=s.y/2,Ve.start.copy(ze),Ve.start.z=0,Ve.end.copy(ke),Ve.end.z=0;const f=Ve.closestPointToPointParameter(fr,!0);Ve.at(f,va);const m=Ii.lerp(ze.z,ke.z,f),p=m>=-1&&m<=1,E=fr.distanceTo(va)t.geometry.attributes.position.count&&(t.geometry.dispose(),t.geometry=new Nn),t.geometry.setPositions(r),s&&t.geometry.setColors(o),i.geometry.setFromPoints(a)}newCurve(e,t,i){const s=new Nn,n=new Ns({color:t,linewidth:e,vertexColors:i,worldUnits:!1,depthTest:!1}),r=new Kl(s,n);return this.scene.add(r),r}newPoints(e,t){const i=new Ce,s=new Je(new Float32Array,3);i.setAttribute("position",s);const n=new Gc({size:e,color:t,sizeAttenuation:!1,depthTest:!1}),r=new Hc(i,n);return r.frustumCulled=!1,this.scene.add(r),r}};y(ql,"settings",{colors:{LINE:[213/255,0/255,255/255],CIRCULARARC:[0/255,46,255/255],CLOTHOID:[0/255,255/255,0/255],PARABOLICARC:[0/255,255/255,72/255],CONSTANTGRADIENT:[213/255,0/255,255/255]}});let $l=ql;class ap extends Gi{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new Se(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof Element&&t.element.parentNode!==null&&t.element.parentNode.removeChild(t.element)})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const _i=new x,Fa=new ne,Aa=new ne,Oa=new x,Na=new x;class lp{constructor(e={}){const t=this;let i,s,n,r;const o={objects:new WeakMap},a=e.element!==void 0?e.element:document.createElement("div");a.style.overflow="hidden",this.domElement=a,this.getSize=function(){return{width:i,height:s}},this.render=function(f,m){f.matrixWorldAutoUpdate===!0&&f.updateMatrixWorld(),m.parent===null&&m.matrixWorldAutoUpdate===!0&&m.updateMatrixWorld(),Fa.copy(m.matrixWorldInverse),Aa.multiplyMatrices(m.projectionMatrix,Fa),l(f,f,m),u(f)},this.setSize=function(f,m){i=f,s=m,n=i/2,r=s/2,a.style.width=f+"px",a.style.height=m+"px"};function l(f,m,p){if(f.isCSS2DObject){_i.setFromMatrixPosition(f.matrixWorld),_i.applyMatrix4(Aa);const E=f.visible===!0&&_i.z>=-1&&_i.z<=1&&f.layers.test(p.layers)===!0;if(f.element.style.display=E===!0?"":"none",E===!0){f.onBeforeRender(t,m,p);const g=f.element;g.style.transform="translate("+-100*f.center.x+"%,"+-100*f.center.y+"%)translate("+(_i.x*n+n)+"px,"+(-_i.y*r+r)+"px)",g.parentNode!==a&&a.appendChild(g),f.onAfterRender(t,m,p)}const I={distanceToCameraSquared:h(p,f)};o.objects.set(f,I)}for(let E=0,I=f.children.length;E{if(this.onBeforeUpdate.trigger(this),!this.enabled||!this.currentWorld)return;const s=this.currentWorld.scene.three,n=this.currentWorld.camera.three;s instanceof Ci&&this.three2D.render(s,n)}),this.onDisposed.add(()=>{this.three2D.domElement.remove()}),this.onResize.add(({x:s,y:n})=>{this.three2D.setSize(s,n)}),this.setupHtmlRenderer(),this.resize()}setupHtmlRenderer(){this.three2D.domElement.style.position="absolute",this.three2D.domElement.style.top="0px",this.three2D.domElement.style.pointerEvents="none",this.container&&this.container.appendChild(this.three2D.domElement)}}const ec=class tc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"threshold",50),y(this,"autoCluster",!0),y(this,"list",new Map),y(this,"clusterLabels",new Set),y(this,"currentKeys",new Set),y(this,"_color","white"),y(this,"_markerKey",0),y(this,"_clusterKey",0),y(this,"_worldEvents",new Map),y(this,"_setupWorlds",new Set),e.add(tc.uuid,this)}get color(){return this._color}set color(e){this._color=e;for(const[t,i]of this.list)for(const[s,n]of i)n.label.three.element.style.color=e}create(e,t,i,s=!1){this.setupEvents(e,!0);const n=this._markerKey.toString(),r=this.getWorldMarkerList(e);if(r.has(n))return;const o=document.createElement("span");o.innerHTML=t,o.style.color=this._color;const a=new qe(e,o);return a.three.position.copy(i),r.set(n,{key:n,label:a,merged:!1,static:s}),this._markerKey++,n}delete(e){for(const[t,i]of this.list){const s=i.get(e);s&&s.label.dispose(),i.delete(e)}}getWorldMarkerList(e){return this.list.has(e.uuid)||this.list.set(e.uuid,new Map),this.list.get(e.uuid)}dispose(e){for(const[t,i]of this.list){const s=[...i.keys()];for(const n of s){const r=i.get(n);e&&r.type!==e||(r.label.dispose(),i.delete(n))}}if(!e){this.list.clear(),this._markerKey=0;for(const t of this.clusterLabels)t.label.dispose();this.clusterLabels.clear(),this._clusterKey=0,this.currentKeys.clear()}this.onDisposed.trigger()}setupEvents(e,t){if(t&&this._setupWorlds.has(e.uuid)||!e.camera.hasCameraControls())return;const i=this.getWorldEvent(e);e.camera.controls.removeEventListener("sleep",i),e.camera.controls.removeEventListener("rest",i),t&&(e.camera.controls.addEventListener("sleep",i),e.camera.controls.addEventListener("rest",i))}cluster(e){if(!this.autoCluster)return;this.resetMarkers();const t=this.list.get(e.uuid);if(t){for(const[i,s]of t)if(!s.merged&&!s.static){this.currentKeys.clear();for(const[n,r]of t)r.static||s.key!==r.key&&!r.merged&&this.distance(s.label,r.label)0){this.currentKeys.add(s.key),s.merged=!0;const n=Array.from(this.currentKeys),r=this.getAveragePositionFromLabels(n),o=new qe(s.label.world,this.createClusterElement(this._clusterKey.toString())),{element:a}=o.three;a.textContent=n.length.toString(),o.three.position.copy(r),this.clusterLabels.add({key:this._clusterKey.toString(),markerKeys:n,label:o}),this._clusterKey++}}this.removeMergeMarkers(e)}}getWorldEvent(e){if(!this._worldEvents.has(e.uuid)){const t=()=>{this.cluster(e)};this._worldEvents.set(e.uuid,t)}return this._worldEvents.get(e.uuid)}resetMarkers(){for(const[e,t]of this.list)for(const[i,s]of t)s.merged=!1;for(const e of this.clusterLabels)e.label.dispose();this.clusterLabels.clear(),this._clusterKey=0}removeMergeMarkers(e){const t=this.list.get(e.uuid);if(t){for(const[i,s]of t)s.merged?s.label.dispose():s.label.world.scene.three.add(s.label.three);for(const i of this.clusterLabels)if(i.markerKeys.length===1){for(const[s,n]of this.list){const r=n.get(i.markerKeys[0]);r&&(r.label.world.scene.three.add(r.label.three),r.merged=!1)}i.label.dispose(),this.clusterLabels.delete(i)}}}getAveragePositionFromLabels(e){const t=e.map(i=>{for(const[s,n]of this.list){const r=n.get(i);if(r)return r.label.three.position}return new x});return t.reduce((i,s)=>i.add(s),new x).divideScalar(t.length)}createClusterElement(e){const t=document.createElement("div");return t.textContent=e,t.style.color="#000000",t.style.background="#FFFFFF",t.style.fontSize="1.2rem",t.style.fontWeight="500",t.style.pointerEvents="auto",t.style.borderRadius="50%",t.style.padding="5px 11px",t.style.textAlign="center",t.style.cursor="pointer",t.addEventListener("pointerdown",()=>{this.navigateToCluster(e)}),t.addEventListener("pointerover",()=>{t.style.background="#BCF124"}),t.addEventListener("pointerout",()=>{t.style.background="#FFFFFF"}),t}getScreenPosition(e){const t=new x;if(!e.world.renderer)throw new Error("Renderer not found!");const i=e.three.position.clone();i.project(e.world.camera.three);const s=e.world.renderer.getSize();return t.x=i.x*s.x/2+s.x/2,t.y=-(i.y*s.y/2)+s.y/2,t}distance(e,t){const i=this.getScreenPosition(e),s=this.getScreenPosition(t),n=i.x-s.x,r=i.y-s.y,o=Math.sqrt(n*n+r*r)*.5;return o===0?this.threshold+1:o}navigateToCluster(e){const t=[],i=Array.from(this.clusterLabels).find(l=>l.key===e);if(!i)return;const s=i.label.world.camera;if(!s.hasCameraControls()){console.warn("Zoom to clusters only supported with Camera Controls!");return}for(const l of i.markerKeys)for(const[h,d]of this.list){const u=d.get(l);if(u){const{x:f,y:m,z:p}=u.label.three.position;t.push(f,m,p)}}i.label.dispose(),this.clusterLabels.delete(i);const n=new Ce,r=new Float32Array(t),o=new Je(r,3);n.setAttribute("position",o);const a=new ee(n);a.geometry.computeBoundingSphere(),a.geometry.boundingSphere&&s.controls.fitToSphere(a,!0),n.dispose(),a.clear(),t.length=0}};y(ec,"uuid","4079eb91-79b0-4ede-bcf2-15b837129236");let ai=ec;function hp(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var go={exports:{}};go.exports=Yn;go.exports.default=Yn;function Yn(c,e,t){t=t||2;var i=e&&e.length,s=i?e[0]*t:c.length,n=ic(c,0,s,t,!0),r=[];if(!n||n.next===n.prev)return r;var o,a,l,h,d,u,f;if(i&&(n=mp(c,e,n,t)),c.length>80*t){o=l=c[0],a=h=c[1];for(var m=t;ml&&(l=d),u>h&&(h=u);f=Math.max(l-o,h-a),f=f!==0?32767/f:0}return vs(n,r,t,o,a,f,0),r}function ic(c,e,t,i,s){var n,r;if(s===Ur(c,e,t,i)>0)for(n=e;n=e;n-=i)r=Pa(n,c[n],c[n+1],r);return r&&Gn(r,r.next)&&(Fs(r),r=r.next),r}function Ei(c,e){if(!c)return c;e||(e=c);var t=c,i;do if(i=!1,!t.steiner&&(Gn(t,t.next)||Pe(t.prev,t,t.next)===0)){if(Fs(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function vs(c,e,t,i,s,n,r){if(c){!r&&n&&Tp(c,i,s,n);for(var o=c,a,l;c.prev!==c.next;){if(a=c.prev,l=c.next,n?up(c,i,s,n):dp(c)){e.push(a.i/t|0),e.push(c.i/t|0),e.push(l.i/t|0),Fs(c),c=l.next,o=l.next;continue}if(c=l,c===o){r?r===1?(c=fp(Ei(c),e,t),vs(c,e,t,i,s,n,2)):r===2&&pp(c,e,t,i,s,n):vs(Ei(c),e,t,i,s,n,1);break}}}}function dp(c){var e=c.prev,t=c,i=c.next;if(Pe(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,r=i.x,o=e.y,a=t.y,l=i.y,h=sn?s>r?s:r:n>r?n:r,f=o>a?o>l?o:l:a>l?a:l,m=i.next;m!==e;){if(m.x>=h&&m.x<=u&&m.y>=d&&m.y<=f&&ki(s,o,n,a,r,l,m.x,m.y)&&Pe(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function up(c,e,t,i){var s=c.prev,n=c,r=c.next;if(Pe(s,n,r)>=0)return!1;for(var o=s.x,a=n.x,l=r.x,h=s.y,d=n.y,u=r.y,f=oa?o>l?o:l:a>l?a:l,E=h>d?h>u?h:u:d>u?d:u,I=Dr(f,m,e,t,i),g=Dr(p,E,e,t,i),w=c.prevZ,C=c.nextZ;w&&w.z>=I&&C&&C.z<=g;){if(w.x>=f&&w.x<=p&&w.y>=m&&w.y<=E&&w!==s&&w!==r&&ki(o,h,a,d,l,u,w.x,w.y)&&Pe(w.prev,w,w.next)>=0||(w=w.prevZ,C.x>=f&&C.x<=p&&C.y>=m&&C.y<=E&&C!==s&&C!==r&&ki(o,h,a,d,l,u,C.x,C.y)&&Pe(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;w&&w.z>=I;){if(w.x>=f&&w.x<=p&&w.y>=m&&w.y<=E&&w!==s&&w!==r&&ki(o,h,a,d,l,u,w.x,w.y)&&Pe(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;C&&C.z<=g;){if(C.x>=f&&C.x<=p&&C.y>=m&&C.y<=E&&C!==s&&C!==r&&ki(o,h,a,d,l,u,C.x,C.y)&&Pe(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function fp(c,e,t){var i=c;do{var s=i.prev,n=i.next.next;!Gn(s,n)&&sc(s,i,i.next,n)&&ys(s,n)&&ys(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),Fs(i),Fs(i.next),i=c=n),i=i.next}while(i!==c);return Ei(i)}function pp(c,e,t,i,s,n){var r=c;do{for(var o=r.next.next;o!==r.prev;){if(r.i!==o.i&&wp(r,o)){var a=nc(r,o);r=Ei(r,r.next),a=Ei(a,a.next),vs(r,e,t,i,s,n,0),vs(a,e,t,i,s,n,0);return}o=o.next}r=r.next}while(r!==c)}function mp(c,e,t,i){var s=[],n,r,o,a,l;for(n=0,r=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,r=t.x=t.x&&t.x>=l&&i!==t.x&&ki(sr.x||t.x===r.x&&Cp(r,t)))&&(r=t,d=u)),t=t.next;while(t!==a);return r}function Cp(c,e){return Pe(c.prev,c,e.prev)<0&&Pe(e.next,c,c.next)<0}function Tp(c,e,t,i){var s=c;do s.z===0&&(s.z=Dr(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==c);s.prevZ.nextZ=null,s.prevZ=null,Rp(s)}function Rp(c){var e,t,i,s,n,r,o,a,l=1;do{for(t=c,c=null,n=null,r=0;t;){for(r++,i=t,o=0,e=0;e0||a>0&&i;)o!==0&&(a===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,a--),n?n.nextZ=s:c=s,s.prevZ=n,n=s;t=i}n.nextZ=null,l*=2}while(r>1);return c}function Dr(c,e,t,i,s){return c=(c-t)*s|0,e=(e-i)*s|0,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,c|e<<1}function Sp(c){var e=c,t=c;do(e.x=(c-r)*(n-o)&&(c-r)*(i-o)>=(t-r)*(e-o)&&(t-r)*(n-o)>=(s-r)*(i-o)}function wp(c,e){return c.next.i!==e.i&&c.prev.i!==e.i&&!vp(c,e)&&(ys(c,e)&&ys(e,c)&&yp(c,e)&&(Pe(c.prev,c,e.prev)||Pe(c,e.prev,e))||Gn(c,e)&&Pe(c.prev,c,c.next)>0&&Pe(e.prev,e,e.next)>0)}function Pe(c,e,t){return(e.y-c.y)*(t.x-e.x)-(e.x-c.x)*(t.y-e.y)}function Gn(c,e){return c.x===e.x&&c.y===e.y}function sc(c,e,t,i){var s=hn(Pe(c,e,t)),n=hn(Pe(c,e,i)),r=hn(Pe(t,i,c)),o=hn(Pe(t,i,e));return!!(s!==n&&r!==o||s===0&&cn(c,t,e)||n===0&&cn(c,i,e)||r===0&&cn(t,c,i)||o===0&&cn(t,e,i))}function cn(c,e,t){return e.x<=Math.max(c.x,t.x)&&e.x>=Math.min(c.x,t.x)&&e.y<=Math.max(c.y,t.y)&&e.y>=Math.min(c.y,t.y)}function hn(c){return c>0?1:c<0?-1:0}function vp(c,e){var t=c;do{if(t.i!==c.i&&t.next.i!==c.i&&t.i!==e.i&&t.next.i!==e.i&&sc(t,t.next,c,e))return!0;t=t.next}while(t!==c);return!1}function ys(c,e){return Pe(c.prev,c,c.next)<0?Pe(c,e,c.next)>=0&&Pe(c,c.prev,e)>=0:Pe(c,e,c.prev)<0||Pe(c,c.next,e)<0}function yp(c,e){var t=c,i=!1,s=(c.x+e.x)/2,n=(c.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==c);return i}function nc(c,e){var t=new _r(c.i,c.x,c.y),i=new _r(e.i,e.x,e.y),s=c.next,n=e.prev;return c.next=e,e.prev=c,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function Pa(c,e,t,i){var s=new _r(c,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Fs(c){c.next.prev=c.prev,c.prev.next=c.next,c.prevZ&&(c.prevZ.nextZ=c.nextZ),c.nextZ&&(c.nextZ.prevZ=c.prevZ)}function _r(c,e,t){this.i=c,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Yn.deviation=function(c,e,t,i){var s=e&&e.length,n=s?e[0]*t:c.length,r=Math.abs(Ur(c,0,n,t));if(s)for(var o=0,a=e.length;o0&&(i+=c[s-1].length,t.holes.push(i))}return t};var Fp=go.exports;const Ap=hp(Fp),Op={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` varying vec2 vUv; @@ -663,7 +660,7 @@ ${e} gl_FragColor = opacity * texel; - }`};class es{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Om=new si(-1,1,1,-1,0,1);class Nm extends Ce{constructor(){super(),this.setAttribute("position",new Xi([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Xi([0,2,0,0,2,0],2))}}const Pm=new Nm;class Oh{constructor(e){this._mesh=new ee(Pm,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,Om)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class Nh extends es{constructor(e,t){super(),this.textureID=t!==void 0?t:"tDiffuse",e instanceof We?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=no.clone(e.uniforms),this.material=new We({name:e.name!==void 0?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new Oh(this.material)}render(e,t,i){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=i.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class Ka extends es{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,i){const s=e.getContext(),n=e.state;n.buffers.color.setMask(!1),n.buffers.depth.setMask(!1),n.buffers.color.setLocked(!0),n.buffers.depth.setLocked(!0);let r,o;this.inverse?(r=0,o=1):(r=1,o=0),n.buffers.stencil.setTest(!0),n.buffers.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),n.buffers.stencil.setFunc(s.ALWAYS,r,4294967295),n.buffers.stencil.setClear(o),n.buffers.stencil.setLocked(!0),e.setRenderTarget(i),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),n.buffers.color.setLocked(!1),n.buffers.depth.setLocked(!1),n.buffers.color.setMask(!0),n.buffers.depth.setMask(!0),n.buffers.stencil.setLocked(!1),n.buffers.stencil.setFunc(s.EQUAL,1,4294967295),n.buffers.stencil.setOp(s.KEEP,s.KEEP,s.KEEP),n.buffers.stencil.setLocked(!0)}}class bm extends es{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class Lm{constructor(e,t){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),t===void 0){const i=e.getSize(new ve);this._width=i.width,this._height=i.height,t=new Nt(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Ro}),t.texture.name="EffectComposer.rt1"}else this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new Nh(Am),this.copyPass.material.blending=Nc,this.clock=new qa}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);t!==-1&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;tl.charCodeAt(0));const zm=Uint8Array.from(atob(Ph),l=>l.charCodeAt(0));function bh(l,e,t){if(e.getQueryParameter(l,e.QUERY_RESULT_AVAILABLE)){const i=e.getQueryParameter(l,e.QUERY_RESULT)/1e6;t.lastTime=i}else setTimeout(()=>{bh(l,e,t)},1)}class km extends es{constructor(e,t,i=512,s=512){super(),this.width=i,this.height=s,this.clear=!0,this.camera=t,this.scene=e,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new Ue(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0},{set:(n,r,o)=>{const a=n[r];return n[r]=o,r==="aoSamples"&&a!==o&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),r==="denoiseSamples"&&a!==o&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),r==="halfRes"&&a!==o&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),r==="depthAwareUpsampling"&&a!==o&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.beautyRenderTarget=new Nt(this.width,this.height,{minFilter:rs,magFilter:_t}),this.beautyRenderTarget.depthTexture=new Pc(this.width,this.height,bc),this.beautyRenderTarget.depthTexture.format=Lc,this.writeTargetInternal=new Nt(this.width,this.height,{minFilter:rs,magFilter:rs,depthBuffer:!1}),this.readTargetInternal=new Nt(this.width,this.height,{minFilter:rs,magFilter:rs,depthBuffer:!1}),this.bluenoise=new xc(zm,128,128),this.bluenoise.colorSpace=Mc,this.bluenoise.wrapS=Vo,this.bluenoise.wrapT=Vo,this.bluenoise.minFilter=_t,this.bluenoise.magFilter=_t,this.bluenoise.needsUpdate=!0,this.lastTime=0,this._r=new ve,this._c=new Ue}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new Dc(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=_c,this.depthDownsampleTarget.texture[0].type=Uc,this.depthDownsampleTarget.texture[0].minFilter=_t,this.depthDownsampleTarget.texture[0].magFilter=_t,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=nl,this.depthDownsampleTarget.texture[1].type=Ro,this.depthDownsampleTarget.texture[1].minFilter=_t,this.depthDownsampleTarget.texture[1].magFilter=_t,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new Tn(new We(Bm))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const t={...Dm};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(t.fragmentShader=`#define LOGDEPTH + }`};var ac="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnC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Rnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";Uint8Array.from(atob(ac),c=>c.charCodeAt(0));const kp=Uint8Array.from(atob(ac),c=>c.charCodeAt(0));function lc(c,e,t){if(e.getQueryParameter(c,e.QUERY_RESULT_AVAILABLE)){const i=e.getQueryParameter(c,e.QUERY_RESULT)/1e6;t.lastTime=i}else setTimeout(()=>{lc(c,e,t)},1)}class Vp extends Ki{constructor(e,t,i=512,s=512){super(),this.width=i,this.height=s,this.clear=!0,this.camera=t,this.scene=e,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new _e(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0},{set:(n,r,o)=>{const a=n[r];return n[r]=o,r==="aoSamples"&&a!==o&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),r==="denoiseSamples"&&a!==o&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),r==="halfRes"&&a!==o&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),r==="depthAwareUpsampling"&&a!==o&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.beautyRenderTarget=new Ot(this.width,this.height,{minFilter:ts,magFilter:Dt}),this.beautyRenderTarget.depthTexture=new ah(this.width,this.height,lh),this.beautyRenderTarget.depthTexture.format=ch,this.writeTargetInternal=new Ot(this.width,this.height,{minFilter:ts,magFilter:ts,depthBuffer:!1}),this.readTargetInternal=new Ot(this.width,this.height,{minFilter:ts,magFilter:ts,depthBuffer:!1}),this.bluenoise=new hh(kp,128,128),this.bluenoise.colorSpace=dh,this.bluenoise.wrapS=yo,this.bluenoise.wrapT=yo,this.bluenoise.minFilter=Dt,this.bluenoise.magFilter=Dt,this.bluenoise.needsUpdate=!0,this.lastTime=0,this._r=new Se,this._c=new _e}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new uh(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=fh,this.depthDownsampleTarget.texture[0].type=ph,this.depthDownsampleTarget.texture[0].minFilter=Dt,this.depthDownsampleTarget.texture[0].magFilter=Dt,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=ka,this.depthDownsampleTarget.texture[1].type=oo,this.depthDownsampleTarget.texture[1].minFilter=Dt,this.depthDownsampleTarget.texture[1].magFilter=Dt,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new dn(new He(zp))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const t={..._p};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(t.fragmentShader=`#define LOGDEPTH `+t.fragmentShader),this.configuration.halfRes&&(t.fragmentShader=`#define HALFRES -`+t.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new We(t)):this.effectShaderQuad=new Tn(new We(t))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const t={...Um};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(t.fragmentShader=`#define LOGDEPTH -`+t.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new We(t)):this.poissonBlurQuad=new Tn(new We(t))}configureEffectCompositer(e=!1){const t={..._m};e&&(t.fragmentShader=`#define LOGDEPTH +`+t.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new He(t)):this.effectShaderQuad=new dn(new He(t))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const t={...Bp};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(t.fragmentShader=`#define LOGDEPTH +`+t.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new He(t)):this.poissonBlurQuad=new dn(new He(t))}configureEffectCompositer(e=!1){const t={...Up};e&&(t.fragmentShader=`#define LOGDEPTH `+t.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(t.fragmentShader=`#define HALFRES -`+t.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new We(t)):this.effectCompositerQuad=new Tn(new We(t))}generateHemisphereSamples(e){const t=[];for(let i=0;i @@ -1346,7 +1343,7 @@ void main() { #include gl_FragColor = vColor; } - `})}function Gm(){return new We({side:2,clipping:!0,uniforms:{},vertexShader:` + `})}function Hp(){return new He({side:2,clipping:!0,uniforms:{},vertexShader:` varying vec3 vCameraPosition; varying vec3 vPosition; varying vec3 vNormal; @@ -1392,7 +1389,7 @@ void main() { gl_FragColor = vec4(difference, difference, difference, 1.); } - `})}class Hm extends es{constructor(e,t,i,s,n){if(super(),w(this,"components"),w(this,"resolution"),w(this,"renderScene"),w(this,"renderCamera"),w(this,"fsQuad"),w(this,"normalOverrideMaterial"),w(this,"glossOverrideMaterial"),w(this,"planeBuffer"),w(this,"glossBuffer"),w(this,"outlineBuffer"),w(this,"excludedMeshes",[]),w(this,"outlinedMeshes",{}),w(this,"outlineScene",new vi),w(this,"_outlineEnabled",!1),w(this,"_lineColor",10066329),w(this,"_opacity",.4),w(this,"_tolerance",3),w(this,"_glossEnabled",!0),w(this,"_glossExponent",1.9),w(this,"_minGloss",-.1),w(this,"_maxGloss",.1),!i.renderer)throw new Error("The given world must have a renderer!");this.components=t,this.renderScene=s,this.renderCamera=n,this.resolution=new ve(e.x,e.y),this.fsQuad=new Oh,this.fsQuad.material=this.createOutlinePostProcessMaterial(),this.planeBuffer=this.newRenderTarget(),this.glossBuffer=this.newRenderTarget(),this.outlineBuffer=this.newRenderTarget();const r=Ym();r.clippingPlanes=i.renderer.clippingPlanes,this.normalOverrideMaterial=r;const o=Gm();o.clippingPlanes=i.renderer.clippingPlanes,this.glossOverrideMaterial=o}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this.fsQuad.material.uniforms.lineColor.value.set(e)}get tolerance(){return this._tolerance}set tolerance(e){this._tolerance=e;const t=this.fsQuad.material;t.uniforms.tolerance.value=e}get opacity(){return this._opacity}set opacity(e){this._opacity=e;const t=this.fsQuad.material;t.uniforms.opacity.value=e}get glossEnabled(){return this._glossEnabled}set glossEnabled(e){if(e===this._glossEnabled)return;this._glossEnabled=e;const t=this.fsQuad.material;t.uniforms.glossEnabled.value=e?1:0}get glossExponent(){return this._glossExponent}set glossExponent(e){this._glossExponent=e;const t=this.fsQuad.material;t.uniforms.glossExponent.value=e}get minGloss(){return this._minGloss}set minGloss(e){this._minGloss=e;const t=this.fsQuad.material;t.uniforms.minGloss.value=e}get maxGloss(){return new nt().color.convertLinearToSRGB(),this._maxGloss}set maxGloss(e){this._maxGloss=e;const t=this.fsQuad.material;t.uniforms.maxGloss.value=e}get outlineEnabled(){return this._outlineEnabled}set outlineEnabled(e){if(e===this._outlineEnabled)return;this._outlineEnabled=e;const t=this.fsQuad.material;t.uniforms.outlineEnabled.value=e?1:0}async dispose(){this.planeBuffer.dispose(),this.glossBuffer.dispose(),this.outlineBuffer.dispose(),this.normalOverrideMaterial.dispose(),this.glossOverrideMaterial.dispose(),this.fsQuad.material.dispose(),this.fsQuad.dispose(),this.excludedMeshes=[],this.outlineScene.children=[];const e=this.components.get(Pt);for(const t in this.outlinedMeshes){const i=this.outlinedMeshes[t];for(const s of i.meshes){e.destroy(s,!0,!0);const n=s;n.fragment&&n.fragment.dispose(!0)}i.material.dispose()}}setSize(e,t){this.planeBuffer.setSize(e,t),this.glossBuffer.setSize(e,t),this.outlineBuffer.setSize(e,t),this.resolution.set(e,t);const i=this.fsQuad.material;i.uniforms.screenSize.value.set(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y),i.uniformsNeedUpdate=!0}render(e,t,i){const s=t.depthBuffer;t.depthBuffer=!1;const n=this.renderScene.overrideMaterial,r=this.renderScene.background;this.renderScene.background=null;for(const a of this.excludedMeshes)a.visible=!1;e.setRenderTarget(this.planeBuffer),this.renderScene.overrideMaterial=this.normalOverrideMaterial,e.render(this.renderScene,this.renderCamera),this._glossEnabled&&(e.setRenderTarget(this.glossBuffer),this.renderScene.overrideMaterial=this.glossOverrideMaterial,e.render(this.renderScene,this.renderCamera)),this.renderScene.overrideMaterial=n,e.setRenderTarget(this.outlineBuffer),this._outlineEnabled?e.render(this.outlineScene,this.renderCamera):e.clear();for(const a of this.excludedMeshes)a.visible=!0;this.renderScene.background=r;const o=this.fsQuad.material;o.uniforms.planeBuffer.value=this.planeBuffer.texture,o.uniforms.glossBuffer.value=this.glossBuffer.texture,o.uniforms.outlineBuffer.value=this.outlineBuffer.texture,o.uniforms.sceneColorBuffer.value=i.texture,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.fsQuad.render(e)),t.depthBuffer=s}get vertexShader(){return` + `})}class Wp extends Ki{constructor(e,t,i,s,n){if(super(),y(this,"components"),y(this,"resolution"),y(this,"renderScene"),y(this,"renderCamera"),y(this,"fsQuad"),y(this,"normalOverrideMaterial"),y(this,"glossOverrideMaterial"),y(this,"planeBuffer"),y(this,"glossBuffer"),y(this,"outlineBuffer"),y(this,"excludedMeshes",[]),y(this,"outlinedMeshes",{}),y(this,"outlineScene",new Ci),y(this,"_outlineEnabled",!1),y(this,"_lineColor",10066329),y(this,"_opacity",.4),y(this,"_tolerance",3),y(this,"_glossEnabled",!0),y(this,"_glossExponent",1.9),y(this,"_minGloss",-.1),y(this,"_maxGloss",.1),!i.renderer)throw new Error("The given world must have a renderer!");this.components=t,this.renderScene=s,this.renderCamera=n,this.resolution=new Se(e.x,e.y),this.fsQuad=new rc,this.fsQuad.material=this.createOutlinePostProcessMaterial(),this.planeBuffer=this.newRenderTarget(),this.glossBuffer=this.newRenderTarget(),this.outlineBuffer=this.newRenderTarget();const r=Gp();r.clippingPlanes=i.renderer.clippingPlanes,this.normalOverrideMaterial=r;const o=Hp();o.clippingPlanes=i.renderer.clippingPlanes,this.glossOverrideMaterial=o}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this.fsQuad.material.uniforms.lineColor.value.set(e)}get tolerance(){return this._tolerance}set tolerance(e){this._tolerance=e;const t=this.fsQuad.material;t.uniforms.tolerance.value=e}get opacity(){return this._opacity}set opacity(e){this._opacity=e;const t=this.fsQuad.material;t.uniforms.opacity.value=e}get glossEnabled(){return this._glossEnabled}set glossEnabled(e){if(e===this._glossEnabled)return;this._glossEnabled=e;const t=this.fsQuad.material;t.uniforms.glossEnabled.value=e?1:0}get glossExponent(){return this._glossExponent}set glossExponent(e){this._glossExponent=e;const t=this.fsQuad.material;t.uniforms.glossExponent.value=e}get minGloss(){return this._minGloss}set minGloss(e){this._minGloss=e;const t=this.fsQuad.material;t.uniforms.minGloss.value=e}get maxGloss(){return new st().color.convertLinearToSRGB(),this._maxGloss}set maxGloss(e){this._maxGloss=e;const t=this.fsQuad.material;t.uniforms.maxGloss.value=e}get outlineEnabled(){return this._outlineEnabled}set outlineEnabled(e){if(e===this._outlineEnabled)return;this._outlineEnabled=e;const t=this.fsQuad.material;t.uniforms.outlineEnabled.value=e?1:0}async dispose(){this.planeBuffer.dispose(),this.glossBuffer.dispose(),this.outlineBuffer.dispose(),this.normalOverrideMaterial.dispose(),this.glossOverrideMaterial.dispose(),this.fsQuad.material.dispose(),this.fsQuad.dispose(),this.excludedMeshes=[],this.outlineScene.children=[];const e=this.components.get(Nt);for(const t in this.outlinedMeshes){const i=this.outlinedMeshes[t];for(const s of i.meshes){e.destroy(s,!0,!0);const n=s;n.fragment&&n.fragment.dispose(!0)}i.material.dispose()}}setSize(e,t){this.planeBuffer.setSize(e,t),this.glossBuffer.setSize(e,t),this.outlineBuffer.setSize(e,t),this.resolution.set(e,t);const i=this.fsQuad.material;i.uniforms.screenSize.value.set(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y),i.uniformsNeedUpdate=!0}render(e,t,i){const s=t.depthBuffer;t.depthBuffer=!1;const n=this.renderScene.overrideMaterial,r=this.renderScene.background;this.renderScene.background=null;for(const a of this.excludedMeshes)a.visible=!1;e.setRenderTarget(this.planeBuffer),this.renderScene.overrideMaterial=this.normalOverrideMaterial,e.render(this.renderScene,this.renderCamera),this._glossEnabled&&(e.setRenderTarget(this.glossBuffer),this.renderScene.overrideMaterial=this.glossOverrideMaterial,e.render(this.renderScene,this.renderCamera)),this.renderScene.overrideMaterial=n,e.setRenderTarget(this.outlineBuffer),this._outlineEnabled?e.render(this.outlineScene,this.renderCamera):e.clear();for(const a of this.excludedMeshes)a.visible=!0;this.renderScene.background=r;const o=this.fsQuad.material;o.uniforms.planeBuffer.value=this.planeBuffer.texture,o.uniforms.glossBuffer.value=this.glossBuffer.texture,o.uniforms.outlineBuffer.value=this.outlineBuffer.texture,o.uniforms.sceneColorBuffer.value=i.texture,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.fsQuad.render(e)),t.depthBuffer=s}get vertexShader(){return` varying vec2 vUv; void main() { vUv = uv; @@ -1581,7 +1578,7 @@ void main() { gl_FragColor = corrected; } - `}createOutlinePostProcessMaterial(){return new We({uniforms:{opacity:{value:this._opacity},debugVisualize:{value:0},sceneColorBuffer:{value:null},tolerance:{value:this._tolerance},planeBuffer:{value:null},glossBuffer:{value:null},outlineBuffer:{value:null},glossEnabled:{value:1},minGloss:{value:this._minGloss},maxGloss:{value:this._maxGloss},outlineEnabled:{value:0},glossExponent:{value:this._glossExponent},width:{value:1},lineColor:{value:new Ue(this._lineColor)},screenSize:{value:new qi(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y)}},vertexShader:this.vertexShader,fragmentShader:this.fragmentShader})}newRenderTarget(){const e=new Nt(this.resolution.x,this.resolution.y);return e.texture.colorSpace="srgb-linear",e.texture.format=nl,e.texture.type=Ro,e.texture.minFilter=_t,e.texture.magFilter=_t,e.texture.generateMipmaps=!1,e.stencilBuffer=!1,e}}class Wm{constructor(e,t,i){if(w(this,"composer"),w(this,"overrideClippingPlanes",!1),w(this,"_components"),w(this,"_world"),w(this,"_renderTarget"),w(this,"_enabled",!1),w(this,"_initialized",!1),w(this,"_n8ao"),w(this,"_customEffects"),w(this,"_basePass"),w(this,"_gammaPass"),w(this,"_depthTexture"),w(this,"_renderer"),w(this,"_settings",{gamma:!0,custom:!0,ao:!1}),!i.renderer)throw new Error("The given world must have a renderer!");this._components=e,this._renderer=t,this._world=i,this._renderTarget=new Nt(window.innerWidth,window.innerHeight),this._renderTarget.texture.colorSpace="srgb-linear",this.composer=new Lm(t,this._renderTarget),this.composer.setSize(window.innerWidth,window.innerHeight)}get basePass(){if(!this._basePass)throw new Error("Custom effects not initialized!");return this._basePass}get gammaPass(){if(!this._gammaPass)throw new Error("Custom effects not initialized!");return this._gammaPass}get customEffects(){if(!this._customEffects)throw new Error("Custom effects not initialized!");return this._customEffects}get n8ao(){if(!this._n8ao)throw new Error("Custom effects not initialized!");return this._n8ao}get enabled(){return this._enabled}set enabled(e){this._initialized||this.initialize(),this._enabled=e}get settings(){return{...this._settings}}dispose(){var e,t,i,s;this.composer.dispose(),this._renderTarget.dispose(),(e=this._depthTexture)==null||e.dispose(),(t=this._customEffects)==null||t.dispose(),(i=this._gammaPass)==null||i.dispose(),(s=this._n8ao)==null||s.dispose()}setPasses(e){let t=!1;for(const i in e){const s=i;if(this.settings[s]!==e[s]){t=!0;break}}if(t){for(const i in e){const s=i;this._settings[s]!==void 0&&(this._settings[s]=e[s])}this.updatePasses()}}setSize(e,t){if(!(e===0||t===0)&&this._initialized){const i=this._settings.custom;i&&this.setPasses({custom:!1}),this.setPasses({custom:!1}),this.composer.setSize(e,t),this.basePass.setSize(e,t),this.n8ao.setSize(e,t),this.customEffects.setSize(e,t),this.gammaPass.setSize(e,t),i&&this.setPasses({custom:!0})}}update(){this._enabled&&this.composer.render()}updateCamera(){const e=this._world.camera.three;this._n8ao&&(this._n8ao.camera=e),this._customEffects&&(this._customEffects.renderCamera=e),this._basePass&&(this._basePass.camera=e)}updateProjection(e){this.composer.passes.forEach(t=>{t.camera=e}),this.update()}initialize(){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const e=this._world.scene.three,t=this._world.camera.three;if(!(e instanceof vi))throw new Error("The given scene must have a THREE.Scene as core!");const i=this._world.camera;i.projection&&i.projection.onChanged.add(()=>{this.updateCamera()});const s=this._world.renderer;this.overrideClippingPlanes||(this._renderer.clippingPlanes=s.clippingPlanes),this._renderer.outputColorSpace="srgb",this._renderer.toneMapping=pc,this.newBasePass(e,t),this.newSaoPass(e,t),this.newGammaPass(),this.newCustomPass(e,t),this._initialized=!0,this.updatePasses()}updatePasses(){for(const e of this.composer.passes)this.composer.removePass(e);this._basePass&&this.composer.addPass(this.basePass),this._settings.gamma&&this.composer.addPass(this.gammaPass),this._settings.ao&&this.composer.addPass(this.n8ao),this._settings.custom&&this.composer.addPass(this.customEffects)}newCustomPass(e,t){this._customEffects=new Hm(new ve(window.innerWidth,window.innerHeight),this._components,this._world,e,t)}newGammaPass(){this._gammaPass=new Nh(Vm)}newSaoPass(e,t){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const{width:i,height:s}=this._world.renderer.getSize();this._n8ao=new km(e,t,i,s);const{configuration:n}=this._n8ao;n.aoSamples=16,n.denoiseSamples=1,n.denoiseRadius=13,n.aoRadius=1,n.distanceFalloff=4,n.aoRadius=1,n.intensity=4,n.halfRes=!0,n.color=new Ue().setHex(13421772,"srgb-linear")}newBasePass(e,t){this._basePass=new xm(e,t)}}class Jr extends lm{constructor(e,t,i){super(e,t,i),w(this,"_postproduction"),this.onResize.add(s=>this.resizePostproduction(s)),this.onWorldChanged.add(()=>{this.currentWorld&&(this._postproduction&&this._postproduction.dispose(),this._postproduction=new Wm(e,this.three,this.currentWorld),this.setPostproductionSize())})}get postproduction(){if(!this._postproduction)throw new Error("Renderer not initialized yet with a world!");return this._postproduction}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger();const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.postproduction.enabled?this.postproduction.composer.render():this.three.render(e,t),e instanceof vi&&this.three2D.render(e,t),this.onAfterUpdate.trigger()}dispose(){super.dispose(),this.postproduction.dispose()}resizePostproduction(e){this.postproduction&&this.setPostproductionSize(e)}setPostproductionSize(e){if(!this.container)return;const t=e?e.x:this.container.clientWidth,i=e?e.y:this.container.clientHeight;this.postproduction.setSize(t,i)}}class Xm{constructor(e,t,i,s,n){w(this,"mesh",new ee(new Ce)),w(this,"components"),w(this,"world"),w(this,"styleName"),w(this,"_precission",1e4),w(this,"_tempVector",new L),w(this,"_plane"),w(this,"_geometry"),w(this,"_outlinedMesh"),w(this,"_plane2DCoordinateSystem",new ne),w(this,"_planeAxis"),this.components=e,this.world=t,this.mesh.material=n,this.mesh.frustumCulled=!1,this.mesh.userData.indexFragmentMap=new Map,this._plane=i;const{x:r,y:o,z:a}=i.normal;Math.abs(r)===1?this._planeAxis="x":Math.abs(o)===1?this._planeAxis="y":Math.abs(a)===1&&(this._planeAxis="z"),this._geometry=s,this.mesh.geometry.attributes.position=s.attributes.position;const h=i.normal.clone().multiplyScalar(.01);this._outlinedMesh=new ee(this.mesh.geometry),this.mesh.position.copy(h),this._outlinedMesh.position.copy(h),this.visible=!0}get visible(){return this.mesh.parent!==null}set visible(e){const t=this.getStyleAndScene();if(e){if(this.world.scene.three.add(this.mesh),t){const{style:i,outlineScene:s}=t;this._outlinedMesh.material=i.material,i.meshes.add(this._outlinedMesh),s.add(this._outlinedMesh)}}else if(this.mesh.removeFromParent(),t){const{style:i}=t;i.meshes.delete(this._outlinedMesh),this._outlinedMesh.removeFromParent()}}set geometry(e){this._geometry=e,this.mesh.geometry.attributes.position=e.attributes.position}dispose(){const e=this.getStyleAndScene();if(e){const{style:t}=e;t.meshes.delete(this._outlinedMesh),this._outlinedMesh.removeFromParent()}this.mesh.material=[],this._outlinedMesh.material=[],this.mesh.userData.indexFragmentMap.clear(),this.mesh.userData={},this.mesh.geometry.dispose(),this.mesh.removeFromParent(),this.mesh.geometry=null,this._outlinedMesh.geometry=null,this.mesh=null,this._plane=null,this._geometry=null,this.components=null}update(e,t){const i=this._geometry.attributes.position.array;if(!i)return;this.updatePlane2DCoordinateSystem();const{userData:s}=this.mesh,n=s.indexFragmentMap;n.clear();let r=0;const o=[];let a=0;const h=this.components.get(ue);for(const[c,u]of t)for(const d in u){const f=h.list.get(d);f&&(f.mesh.userData.fills||(f.mesh.userData.fills=new Set),f.mesh.userData.fills.add(this.mesh))}for(let c=0;cthis._localPlane.intersectsBox(s),intersectsTriangle:s=>{let n=0;if(this._tempLine.start.copy(s.a),this._tempLine.end.copy(s.b),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.b),this._tempLine.end.copy(s.c),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.c),this._tempLine.end.copy(s.a),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}n!==2&&(i-=n)}}),i}updateDeletedEdges(e){const t=Object.keys(this._edges);for(const i of t)e[i]===void 0&&(this.disposeEdge(i),this.disposeOutline(i))}disposeOutline(e){if(!this.world.renderer)return;const t=this.world.renderer;if(t instanceof Jr){const i=t.postproduction.customEffects.outlinedMeshes;delete i[e]}}disposeEdge(e){const t=this.components.get(Pt),i=this._edges[e];i.fill&&i.fill.dispose(),t.destroy(i.mesh,!1),delete this._edges[e]}}class zn extends Qn{constructor(e,t,i,s,n,r=5,o=!0){super(e,t,i,s,n,r,o),w(this,"edges"),w(this,"edgesMaxUpdateRate",50),w(this,"_visible",!0),w(this,"_edgesVisible",!0),w(this,"updateFill",()=>{this.edges.fillNeedsUpdate=!0,this.edges.update()}),this.edges=new Zm(e,t,this.three),this.toggleControls(!0),this.edges.visible=!0,this.onDraggingEnded.add(()=>{this.updateFill(),this.edges.visible=!0}),this.onDraggingStarted.add(()=>this.edges.visible=!1)}get visible(){return this._visible}set visible(e){super.visible=e,this.toggleControls(e)}set enabled(e){this._enabled=e,this.world.renderer&&this.world.renderer.setPlane(e,this.three)}get enabled(){return super.enabled}dispose(){super.dispose(),this.edges.dispose()}}class jm{constructor(){w(this,"onDisposed",new H),w(this,"enabled",!0),w(this,"list",{}),w(this,"_defaultLineMaterial",new ni({color:0,linewidth:.001})),w(this,"onAfterUpdate",new H),w(this,"onBeforeUpdate",new H)}update(e){this.onBeforeUpdate.trigger(this.list),this.onAfterUpdate.trigger(this.list)}create(e,t,i,s,n,r){if(!i.renderer)throw new Error("The given world doesn't have a renderer!");s||(s=this._defaultLineMaterial);for(const h of t)h.geometry.boundsTree||h.geometry.computeBoundsTree();const o=i.renderer;s.clippingPlanes=o.clippingPlanes;const a={name:e,lineMaterial:s,meshes:t,fillMaterial:n,outlineMaterial:r,fragments:{}};return this.list[e]=a,a}dispose(){const e=Object.keys(this.list);for(const t of e)this.deleteStyle(t);this.list={},this.onDisposed.trigger(),this.onDisposed.reset()}deleteStyle(e,t=!0){var i,s;const n=this.list[e];n&&(n.meshes.clear(),t&&(n.lineMaterial.dispose(),(i=n.fillMaterial)==null||i.dispose(),(s=n.outlineMaterial)==null||s.dispose())),delete this.list[e]}}const Lh=class xh extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"enabled",!0),w(this,"styles"),w(this,"fillsNeedUpdate",!1),w(this,"_visible",!0),this.components.list.set(xh.uuid,this),this.styles=new jm}get visible(){return this._visible}set visible(e){this._visible=e;const t=this.components.get(Qi);for(const i of t.list)i instanceof zn&&(i.edges.visible=e)}dispose(){this.styles.dispose(),this.onDisposed.trigger()}async update(e=!1){if(!this.enabled)return;const t=this.components.get(Qi);for(const i of t.list)i instanceof zn&&(e||this.fillsNeedUpdate?i.updateFill():i.update());this.fillsNeedUpdate=!1}};w(Lh,"uuid","24dfc306-a3c4-410f-8071-babc4afa5e4d");let Rn=Lh;const Km={name:"HorizontalBlurShader",uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:` + `}createOutlinePostProcessMaterial(){return new He({uniforms:{opacity:{value:this._opacity},debugVisualize:{value:0},sceneColorBuffer:{value:null},tolerance:{value:this._tolerance},planeBuffer:{value:null},glossBuffer:{value:null},outlineBuffer:{value:null},glossEnabled:{value:1},minGloss:{value:this._minGloss},maxGloss:{value:this._maxGloss},outlineEnabled:{value:0},glossExponent:{value:this._glossExponent},width:{value:1},lineColor:{value:new _e(this._lineColor)},screenSize:{value:new Zi(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y)}},vertexShader:this.vertexShader,fragmentShader:this.fragmentShader})}newRenderTarget(){const e=new Ot(this.resolution.x,this.resolution.y);return e.texture.colorSpace="srgb-linear",e.texture.format=ka,e.texture.type=oo,e.texture.minFilter=Dt,e.texture.magFilter=Dt,e.texture.generateMipmaps=!1,e.stencilBuffer=!1,e}}class Xp{constructor(e,t,i){if(y(this,"composer"),y(this,"overrideClippingPlanes",!1),y(this,"_components"),y(this,"_world"),y(this,"_renderTarget"),y(this,"_enabled",!1),y(this,"_initialized",!1),y(this,"_n8ao"),y(this,"_customEffects"),y(this,"_basePass"),y(this,"_gammaPass"),y(this,"_depthTexture"),y(this,"_renderer"),y(this,"_settings",{gamma:!0,custom:!0,ao:!1}),!i.renderer)throw new Error("The given world must have a renderer!");this._components=e,this._renderer=t,this._world=i,this._renderTarget=new Ot(window.innerWidth,window.innerHeight),this._renderTarget.texture.colorSpace="srgb-linear",this.composer=new Mp(t,this._renderTarget),this.composer.setSize(window.innerWidth,window.innerHeight)}get basePass(){if(!this._basePass)throw new Error("Custom effects not initialized!");return this._basePass}get gammaPass(){if(!this._gammaPass)throw new Error("Custom effects not initialized!");return this._gammaPass}get customEffects(){if(!this._customEffects)throw new Error("Custom effects not initialized!");return this._customEffects}get n8ao(){if(!this._n8ao)throw new Error("Custom effects not initialized!");return this._n8ao}get enabled(){return this._enabled}set enabled(e){this._initialized||this.initialize(),this._enabled=e}get settings(){return{...this._settings}}dispose(){var e,t,i,s;this.composer.dispose(),this._renderTarget.dispose(),(e=this._depthTexture)==null||e.dispose(),(t=this._customEffects)==null||t.dispose(),(i=this._gammaPass)==null||i.dispose(),(s=this._n8ao)==null||s.dispose()}setPasses(e){let t=!1;for(const i in e){const s=i;if(this.settings[s]!==e[s]){t=!0;break}}if(t){for(const i in e){const s=i;this._settings[s]!==void 0&&(this._settings[s]=e[s])}this.updatePasses()}}setSize(e,t){if(!(e===0||t===0)&&this._initialized){const i=this._settings.custom;i&&this.setPasses({custom:!1}),this.setPasses({custom:!1}),this.composer.setSize(e,t),this.basePass.setSize(e,t),this.n8ao.setSize(e,t),this.customEffects.setSize(e,t),this.gammaPass.setSize(e,t),i&&this.setPasses({custom:!0})}}update(){this._enabled&&this.composer.render()}updateCamera(){const e=this._world.camera.three;this._n8ao&&(this._n8ao.camera=e),this._customEffects&&(this._customEffects.renderCamera=e),this._basePass&&(this._basePass.camera=e)}updateProjection(e){this.composer.passes.forEach(t=>{t.camera=e}),this.update()}initialize(){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const e=this._world.scene.three,t=this._world.camera.three;if(!(e instanceof Ci))throw new Error("The given scene must have a THREE.Scene as core!");const i=this._world.camera;i.projection&&i.projection.onChanged.add(()=>{this.updateCamera()});const s=this._world.renderer;this.overrideClippingPlanes||(this._renderer.clippingPlanes=s.clippingPlanes),this._renderer.outputColorSpace="srgb",this._renderer.toneMapping=Wc,this.newBasePass(e,t),this.newSaoPass(e,t),this.newGammaPass(),this.newCustomPass(e,t),this._initialized=!0,this.updatePasses()}updatePasses(){for(const e of this.composer.passes)this.composer.removePass(e);this._basePass&&this.composer.addPass(this.basePass),this._settings.gamma&&this.composer.addPass(this.gammaPass),this._settings.ao&&this.composer.addPass(this.n8ao),this._settings.custom&&this.composer.addPass(this.customEffects)}newCustomPass(e,t){this._customEffects=new Wp(new Se(window.innerWidth,window.innerHeight),this._components,this._world,e,t)}newGammaPass(){this._gammaPass=new oc(Yp)}newSaoPass(e,t){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const{width:i,height:s}=this._world.renderer.getSize();this._n8ao=new Vp(e,t,i,s);const{configuration:n}=this._n8ao;n.aoSamples=16,n.denoiseSamples=1,n.denoiseRadius=13,n.aoRadius=1,n.distanceFalloff=4,n.aoRadius=1,n.intensity=4,n.halfRes=!0,n.color=new _e().setHex(13421772,"srgb-linear")}newBasePass(e,t){this._basePass=new Lp(e,t)}}class Br extends cp{constructor(e,t,i){super(e,t,i),y(this,"_postproduction"),this.onResize.add(s=>this.resizePostproduction(s)),this.onWorldChanged.add(()=>{this.currentWorld&&(this._postproduction&&this._postproduction.dispose(),this._postproduction=new Xp(e,this.three,this.currentWorld),this.setPostproductionSize())})}get postproduction(){if(!this._postproduction)throw new Error("Renderer not initialized yet with a world!");return this._postproduction}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger();const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.postproduction.enabled?this.postproduction.composer.render():this.three.render(e,t),e instanceof Ci&&this.three2D.render(e,t),this.onAfterUpdate.trigger()}dispose(){super.dispose(),this.postproduction.dispose()}resizePostproduction(e){this.postproduction&&this.setPostproductionSize(e)}setPostproductionSize(e){if(!this.container)return;const t=e?e.x:this.container.clientWidth,i=e?e.y:this.container.clientHeight;this.postproduction.setSize(t,i)}}class Zp{constructor(e,t,i,s,n){y(this,"mesh",new ee(new Ce)),y(this,"components"),y(this,"world"),y(this,"styleName"),y(this,"_precission",1e4),y(this,"_tempVector",new x),y(this,"_plane"),y(this,"_geometry"),y(this,"_outlinedMesh"),y(this,"_plane2DCoordinateSystem",new ne),y(this,"_planeAxis"),this.components=e,this.world=t,this.mesh.material=n,this.mesh.frustumCulled=!1,this.mesh.userData.indexFragmentMap=new Map,this._plane=i;const{x:r,y:o,z:a}=i.normal;Math.abs(r)===1?this._planeAxis="x":Math.abs(o)===1?this._planeAxis="y":Math.abs(a)===1&&(this._planeAxis="z"),this._geometry=s,this.mesh.geometry.attributes.position=s.attributes.position;const l=i.normal.clone().multiplyScalar(.01);this._outlinedMesh=new ee(this.mesh.geometry),this.mesh.position.copy(l),this._outlinedMesh.position.copy(l),this.visible=!0}get visible(){return this.mesh.parent!==null}set visible(e){const t=this.getStyleAndScene();if(e){if(this.world.scene.three.add(this.mesh),t){const{style:i,outlineScene:s}=t;this._outlinedMesh.material=i.material,i.meshes.add(this._outlinedMesh),s.add(this._outlinedMesh)}}else if(this.mesh.removeFromParent(),t){const{style:i}=t;i.meshes.delete(this._outlinedMesh),this._outlinedMesh.removeFromParent()}}set geometry(e){this._geometry=e,this.mesh.geometry.attributes.position=e.attributes.position}dispose(){const e=this.getStyleAndScene();if(e){const{style:t}=e;t.meshes.delete(this._outlinedMesh),this._outlinedMesh.removeFromParent()}this.mesh.material=[],this._outlinedMesh.material=[],this.mesh.userData.indexFragmentMap.clear(),this.mesh.userData={},this.mesh.geometry.dispose(),this.mesh.removeFromParent(),this.mesh.geometry=null,this._outlinedMesh.geometry=null,this.mesh=null,this._plane=null,this._geometry=null,this.components=null}update(e,t){const i=this._geometry.attributes.position.array;if(!i)return;this.updatePlane2DCoordinateSystem();const{userData:s}=this.mesh,n=s.indexFragmentMap;n.clear();let r=0;const o=[];let a=0;const l=this.components.get(ue);for(const[h,d]of t)for(const u in d){const f=l.list.get(u);f&&(f.mesh.userData.fills||(f.mesh.userData.fills=new Set),f.mesh.userData.fills.add(this.mesh))}for(let h=0;hthis._localPlane.intersectsBox(s),intersectsTriangle:s=>{let n=0;if(this._tempLine.start.copy(s.a),this._tempLine.end.copy(s.b),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.b),this._tempLine.end.copy(s.c),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.c),this._tempLine.end.copy(s.a),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}n!==2&&(i-=n)}}),i}updateDeletedEdges(e){const t=Object.keys(this._edges);for(const i of t)e[i]===void 0&&(this.disposeEdge(i),this.disposeOutline(i))}disposeOutline(e){if(!this.world.renderer)return;const t=this.world.renderer;if(t instanceof Br){const i=t.postproduction.customEffects.outlinedMeshes;delete i[e]}}disposeEdge(e){const t=this.components.get(Nt),i=this._edges[e];i.fill&&i.fill.dispose(),t.destroy(i.mesh,!1),delete this._edges[e]}}class Pn extends zn{constructor(e,t,i,s,n,r=5,o=!0){super(e,t,i,s,n,r,o),y(this,"edges"),y(this,"edgesMaxUpdateRate",50),y(this,"_visible",!0),y(this,"_edgesVisible",!0),y(this,"updateFill",()=>{this.edges.fillNeedsUpdate=!0,this.edges.update()}),this.edges=new jp(e,t,this.three),this.toggleControls(!0),this.edges.visible=!0,this.onDraggingEnded.add(()=>{this.updateFill(),this.edges.visible=!0}),this.onDraggingStarted.add(()=>this.edges.visible=!1)}get visible(){return this._visible}set visible(e){super.visible=e,this.toggleControls(e)}set enabled(e){this._enabled=e,this.world.renderer&&this.world.renderer.setPlane(e,this.three)}get enabled(){return super.enabled}dispose(){super.dispose(),this.edges.dispose()}}class Qp{constructor(){y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"list",{}),y(this,"_defaultLineMaterial",new si({color:0,linewidth:.001})),y(this,"onAfterUpdate",new Y),y(this,"onBeforeUpdate",new Y)}update(e){this.onBeforeUpdate.trigger(this.list),this.onAfterUpdate.trigger(this.list)}create(e,t,i,s,n,r){if(!i.renderer)throw new Error("The given world doesn't have a renderer!");s||(s=this._defaultLineMaterial);for(const l of t)l.geometry.boundsTree||l.geometry.computeBoundsTree();const o=i.renderer;s.clippingPlanes=o.clippingPlanes;const a={name:e,lineMaterial:s,meshes:t,fillMaterial:n,outlineMaterial:r,fragments:{}};return this.list[e]=a,a}dispose(){const e=Object.keys(this.list);for(const t of e)this.deleteStyle(t);this.list={},this.onDisposed.trigger(),this.onDisposed.reset()}deleteStyle(e,t=!0){var i,s;const n=this.list[e];n&&(n.meshes.clear(),t&&(n.lineMaterial.dispose(),(i=n.fillMaterial)==null||i.dispose(),(s=n.outlineMaterial)==null||s.dispose())),delete this.list[e]}}const cc=class hc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"styles"),y(this,"fillsNeedUpdate",!1),y(this,"_visible",!0),this.components.list.set(hc.uuid,this),this.styles=new Qp}get visible(){return this._visible}set visible(e){this._visible=e;const t=this.components.get(Xi);for(const i of t.list)i instanceof Pn&&(i.edges.visible=e)}dispose(){this.styles.dispose(),this.onDisposed.trigger()}async update(e=!1){if(!this.enabled)return;const t=this.components.get(Xi);for(const i of t.list)i instanceof Pn&&(e||this.fillsNeedUpdate?i.updateFill():i.update());this.fillsNeedUpdate=!1}};y(cc,"uuid","24dfc306-a3c4-410f-8071-babc4afa5e4d");let un=cc;const Kp={name:"HorizontalBlurShader",uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:` varying vec2 vUv; @@ -1613,7 +1610,7 @@ void main() { gl_FragColor = sum; - }`},Qm={name:"VerticalBlurShader",uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:` + }`},qp={name:"VerticalBlurShader",uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:` varying vec2 vUv; @@ -1645,10 +1642,10 @@ void main() { gl_FragColor = sum; - }`},Mh=class ki extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"enabled",!0),w(this,"cameraHeight",10),w(this,"darkness",1.2),w(this,"opacity",1),w(this,"resolution",512),w(this,"amount",3.5),w(this,"planeColor",16777215),w(this,"shadowOffset",0),w(this,"shadowExtraScaleFactor",1.5),w(this,"list",{}),w(this,"tempMaterial",new nt({visible:!1})),w(this,"depthMaterial",new il),this.components.add(ki.uuid,this),this.initializeDepthMaterial()}dispose(){for(const e in this.list)this.deleteShadow(e);this.tempMaterial.dispose(),this.depthMaterial.dispose(),this.components=null,this.onDisposed.trigger(ki.uuid),this.onDisposed.reset()}create(e,t,i){if(this.list[t])throw new Error(`There is already a shadow with ID ${t}`);const{size:s,center:n,min:r}=this.getSizeCenterMin(e),o=this.createShadow(t,s,i);return this.initializeShadow(o,n,r),this.createPlanes(o,s),this.bakeShadow(e,o),o.root}deleteShadow(e){const t=this.components.get(Pt),i=this.list[e];if(delete this.list[e],!i)throw new Error(`No shadow with ID ${e} was found.`);t.destroy(i.root),t.destroy(i.blurPlane),i.rt.dispose(),i.rtBlur.dispose()}createPlanes(e,t){const i=new Vn(t.x,t.z).rotateX(Math.PI/2);this.createBasePlane(e,i),ki.createBlurPlane(e,i)}initializeShadow(e,t,i){this.initializeRoot(e,t,i),ki.initializeRenderTargets(e),ki.initializeCamera(e)}bakeShadow(e,t){const i=t.world.scene.three;if(!(i instanceof vi))throw new Error("The core of the scene of the world must be a scene!");if(!t.world.renderer)throw new Error("The given world must have a renderer!");const s=t.world.renderer.three,n=e.map(h=>!!h.parent);for(let h=0;h!e.includes(h)&&h!==t.root);for(let h=r.length-1;h>=0;h--)i.remove(r[h]);const o=i.background;i.background=null,i.overrideMaterial=this.depthMaterial;const a=[];for(const h of e)a.push(h.visible),h.visible=!0;s.setRenderTarget(t.rt),s.render(i,t.camera),i.overrideMaterial=null,this.blurShadow(t,this.amount),this.blurShadow(t,this.amount*.4),s.setRenderTarget(null),i.background=o;for(let h=0;h=0;h--)i.add(r[h]);for(let h=0;h{i.uniforms.darkness=this.depthMaterial.userData.darkness,i.fragmentShader=` + }`},dc=class Ui extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"cameraHeight",10),y(this,"darkness",1.2),y(this,"opacity",1),y(this,"resolution",512),y(this,"amount",3.5),y(this,"planeColor",16777215),y(this,"shadowOffset",0),y(this,"shadowExtraScaleFactor",1.5),y(this,"list",{}),y(this,"tempMaterial",new st({visible:!1})),y(this,"depthMaterial",new Ba),this.components.add(Ui.uuid,this),this.initializeDepthMaterial()}dispose(){for(const e in this.list)this.deleteShadow(e);this.tempMaterial.dispose(),this.depthMaterial.dispose(),this.components=null,this.onDisposed.trigger(Ui.uuid),this.onDisposed.reset()}create(e,t,i){if(this.list[t])throw new Error(`There is already a shadow with ID ${t}`);const{size:s,center:n,min:r}=this.getSizeCenterMin(e),o=this.createShadow(t,s,i);return this.initializeShadow(o,n,r),this.createPlanes(o,s),this.bakeShadow(e,o),o.root}deleteShadow(e){const t=this.components.get(Nt),i=this.list[e];if(delete this.list[e],!i)throw new Error(`No shadow with ID ${e} was found.`);t.destroy(i.root),t.destroy(i.blurPlane),i.rt.dispose(),i.rtBlur.dispose()}createPlanes(e,t){const i=new xn(t.x,t.z).rotateX(Math.PI/2);this.createBasePlane(e,i),Ui.createBlurPlane(e,i)}initializeShadow(e,t,i){this.initializeRoot(e,t,i),Ui.initializeRenderTargets(e),Ui.initializeCamera(e)}bakeShadow(e,t){const i=t.world.scene.three;if(!(i instanceof Ci))throw new Error("The core of the scene of the world must be a scene!");if(!t.world.renderer)throw new Error("The given world must have a renderer!");const s=t.world.renderer.three,n=e.map(l=>!!l.parent);for(let l=0;l!e.includes(l)&&l!==t.root);for(let l=r.length-1;l>=0;l--)i.remove(r[l]);const o=i.background;i.background=null,i.overrideMaterial=this.depthMaterial;const a=[];for(const l of e)a.push(l.visible),l.visible=!0;s.setRenderTarget(t.rt),s.render(i,t.camera),i.overrideMaterial=null,this.blurShadow(t,this.amount),this.blurShadow(t,this.amount*.4),s.setRenderTarget(null),i.background=o;for(let l=0;l=0;l--)i.add(r[l]);for(let l=0;l{i.uniforms.darkness=this.depthMaterial.userData.darkness,i.fragmentShader=` uniform float darkness; ${i.fragmentShader.replace(e,t)} - `}}createShadow(e,t,i){return this.list[e]={root:new Mn,world:i,rt:new Nt(this.resolution,this.resolution),rtBlur:new Nt(this.resolution,this.resolution),blurPlane:new ee,camera:this.createCamera(t)},this.list[e]}createCamera(e){return new si(-e.x/2,e.x/2,e.z/2,-e.z/2,0,this.cameraHeight)}getSizeCenterMin(e){const t=e[0].parent,i=new Mn;i.children=e;const s=new we().setFromObject(i);t==null||t.add(...e);const n=new L;s.getSize(n),n.x*=this.shadowExtraScaleFactor,n.z*=this.shadowExtraScaleFactor;const r=new L;s.getCenter(r);const o=s.min;return{size:n,center:r,min:o}}blurShadow(e,t){if(!e.world.renderer)throw new Error("The given world must have a renderer!");const i=new We(Km);i.depthTest=!1;const s=new We(Qm);s.depthTest=!1,e.blurPlane.visible=!0,e.blurPlane.material=i,e.blurPlane.material.uniforms.tDiffuse.value=e.rt.texture,i.uniforms.h.value=t*1/256;const n=e.world.renderer.three;n.setRenderTarget(e.rtBlur),n.render(e.blurPlane,e.camera),e.blurPlane.material=s,e.blurPlane.material.uniforms.tDiffuse.value=e.rtBlur.texture,s.uniforms.v.value=t*1/256,n.setRenderTarget(e.rt),n.render(e.blurPlane,e.camera),e.blurPlane.visible=!1}};w(Mh,"uuid","f833a09a-a3ab-4c58-b03e-da5298c7a1b6");let oI=Mh;const qm=class Dh extends de{constructor(e){super(e),w(this,"enabled",!0),w(this,"inputs",["OBC","BUI"]),w(this,"_requestEventID","thatOpenCompanyComponentRequested"),w(this,"_createEventID","thatOpenCompanyComponentCreated"),e.add(Dh.uuid,this)}async import(e){return new Promise(t=>{const i=document.createElement("script"),s=` + `}}createShadow(e,t,i){return this.list[e]={root:new yn,world:i,rt:new Ot(this.resolution,this.resolution),rtBlur:new Ot(this.resolution,this.resolution),blurPlane:new ee,camera:this.createCamera(t)},this.list[e]}createCamera(e){return new ti(-e.x/2,e.x/2,e.z/2,-e.z/2,0,this.cameraHeight)}getSizeCenterMin(e){const t=e[0].parent,i=new yn;i.children=e;const s=new ye().setFromObject(i);t==null||t.add(...e);const n=new x;s.getSize(n),n.x*=this.shadowExtraScaleFactor,n.z*=this.shadowExtraScaleFactor;const r=new x;s.getCenter(r);const o=s.min;return{size:n,center:r,min:o}}blurShadow(e,t){if(!e.world.renderer)throw new Error("The given world must have a renderer!");const i=new He(Kp);i.depthTest=!1;const s=new He(qp);s.depthTest=!1,e.blurPlane.visible=!0,e.blurPlane.material=i,e.blurPlane.material.uniforms.tDiffuse.value=e.rt.texture,i.uniforms.h.value=t*1/256;const n=e.world.renderer.three;n.setRenderTarget(e.rtBlur),n.render(e.blurPlane,e.camera),e.blurPlane.material=s,e.blurPlane.material.uniforms.tDiffuse.value=e.rtBlur.texture,s.uniforms.v.value=t*1/256,n.setRenderTarget(e.rt),n.render(e.blurPlane,e.camera),e.blurPlane.visible=!1}};y(dc,"uuid","f833a09a-a3ab-4c58-b03e-da5298c7a1b6");let am=dc;const Jp=class uc extends de{constructor(e){super(e),y(this,"enabled",!0),y(this,"inputs",["OBC","BUI"]),y(this,"_requestEventID","thatOpenCompanyComponentRequested"),y(this,"_createEventID","thatOpenCompanyComponentCreated"),e.add(uc.uuid,this)}async import(e){return new Promise(t=>{const i=document.createElement("script"),s=` function main() { const { ${this.inputs} } = window.ThatOpenCompany; @@ -1664,4 +1661,4 @@ void main() { } main(); - `,n=r=>{window.removeEventListener(this._createEventID,n);const o=r.detail,a=this.components.get(o);i.remove(),t(a)};i.addEventListener("load",()=>{window.addEventListener(this._createEventID,n),window.dispatchEvent(new Event(this._requestEventID))}),i.src=URL.createObjectURL(new File([s],"temp.js")),document.head.appendChild(i)})}};w(qm,"uuid","74c0c370-1af8-4ca9-900a-4a4196c0f2f5");const Jm=["Station","Radius","Length","InitialKP","FinalKP","KP","Slope","Height","InitialKPV","FinalKPV"],_h=class Uh extends de{constructor(e){super(e),w(this,"enabled",!0),w(this,"world",null),w(this,"_markerKey",0),w(this,"_list",new Map),w(this,"type","horizontal"),w(this,"divisionLength",100),e.add(Uh.uuid,this)}addKPStation(e,t,i){const s=this.components.get(hi),n=document.createElement("div"),r=document.createElement("div");n.appendChild(r),r.innerHTML=t,r.style.color=s.color,r.style.borderBottom="1px dotted white",r.style.width="160px",r.style.textAlign="left";const o=new $e(e,n),a=new L;a.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),a.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),a.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);const h=new L;h.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-2),h.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-2),h.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-2);const c=new L;c.x=(a.x+h.x)/2,c.y=(a.y+h.y)/2,c.z=(a.z+h.z)/2,o.three.position.copy(c);const u=new L;u.subVectors(a,h).normalize();const d=new lt;d.setFromUnitVectors(new L(0,1,0),u);const f=new sl().setFromQuaternion(d).z,m=gi.radToDeg(f);r.style.transform=`rotate(${-m-90}deg) translate(-35%, -50%)`;const p=this._markerKey.toString();s.setupEvents(e,!0),s.getWorldMarkerList(e).set(p,{label:o,key:p,merged:!1,static:!1}),this._markerKey++,this.save(p,"KP")}addVerticalMarker(e,t,i,s,n){const r=this.components.get(hi),o=document.createElement("span");o.innerHTML=t,o.style.color=r.color;const a=new $e(e,o,n);if(s==="Height"){const c=document.createElement("span");c.innerHTML=t,c.style.color=r.color;const{position:u}=i.geometry.attributes,d=(u.array.length/3-1)*3,f=u.array.slice(d,d+3);a.three.position.set(f[0],f[1]+10,f[2])}else if(s==="InitialKPV"){const{position:c}=i.geometry.attributes,u=c.getX(0),d=c.getY(0),f=c.getZ(0);a.three.position.set(u-20,d,f)}else if(s==="FinalKPV"){const{position:c}=i.geometry.attributes,u=c.getX(i.geometry.attributes.position.count-1),d=c.getY(i.geometry.attributes.position.count-1),f=c.getZ(i.geometry.attributes.position.count-1);a.three.position.set(u+20,d,f)}else if(s==="Slope"){o.style.color="grey";const{position:c}=i.geometry.attributes,u=new L;u.x=c.getX(0),u.y=c.getY(0),u.z=c.getZ(0);const d=new L;d.x=c.getX(c.count-1),d.y=c.getY(c.count-1),d.z=c.getZ(c.count-1);const f=new L;f.addVectors(u,d).multiplyScalar(.5),a.three.position.set(f.x,f.y-10,f.z)}const h=this._markerKey.toString();return r.setupEvents(e,!0),r.getWorldMarkerList(e).set(h,{label:a,key:h,type:s,merged:!1,static:!1}),this._markerKey++,this.save(h,s),a}addCivilMarker(e,t,i,s){const n=this.components.get(hi),r=document.createElement("span");r.innerHTML=t,r.style.color=n.color;const o=new $e(e,r);if(s==="InitialKP"){const h=i.geometry.attributes.position.getX(0),c=i.geometry.attributes.position.getY(0),u=i.geometry.attributes.position.getZ(0);o.three.position.set(h+2,c+2,u)}else if(s==="FinalKP"){const h=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),c=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),u=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);o.three.position.set(h+2,c-2,u)}else if(s==="Length"){const h=new L;h.x=i.geometry.attributes.position.getX(0),h.y=i.geometry.attributes.position.getY(0),h.z=i.geometry.attributes.position.getZ(0);const c=new L;c.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),c.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),c.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);const u=h.distanceTo(c);o.three.element.innerText=u.toFixed(2);const d=c.clone().add(h).divideScalar(2);o.three.position.copy(d)}const a=this._markerKey.toString();return n.setupEvents(e,!0),n.getWorldMarkerList(e).set(a,{label:o,key:a,type:s,merged:!1,static:!1}),this._markerKey++,this.save(a,s),o}showKPStations(e){if(!this.world)throw new Error("A world is needed for this component to work!");if(this.type==="horizontal"){const t=this.generateStartAndEndKP(e);for(const[,s]of t)this.addKPStation(this.world,s.value,s.normal);const i=this.generateConstantKP(e);for(const[,s]of i)this.addKPStation(this.world,s.value,s.normal)}}showCurveLength(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(hi),s=e.length,n=`${t.toFixed(2)} m`,r=Math.round(s/2),o=e[r],a=i.create(this.world,n,o,!0);a!==void 0&&this.save(a,"Radius")}showLineLength(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(hi),s=new L;s.x=e.geometry.getAttribute("position").getX(0),s.y=e.geometry.getAttribute("position").getY(0),s.z=e.geometry.getAttribute("position").getZ(0);const n=new L;n.x=e.geometry.getAttribute("position").getX(1),n.y=e.geometry.getAttribute("position").getY(1),n.z=e.geometry.getAttribute("position").getZ(1);const r=`${t.toFixed(2)} m`,o=new L;o.addVectors(s,n).multiplyScalar(.5);const a=i.create(this.world,r,o,!0);a!==void 0&&this.save(a,"Radius")}showCurveRadius(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(hi),s=new L;s.x=e.geometry.getAttribute("position").getX(0),s.y=e.geometry.getAttribute("position").getY(0),s.z=e.geometry.getAttribute("position").getZ(0);const n=new L;n.x=e.geometry.getAttribute("position").getX(1),n.y=e.geometry.getAttribute("position").getY(1),n.z=e.geometry.getAttribute("position").getZ(1);const r=`R = ${t.toFixed(2)} m`,o=new L;o.addVectors(s,n).multiplyScalar(.5);const a=i.create(this.world,r,o,!0);a!==void 0&&this.save(a,"Radius")}deleteByType(e=Jm){const t=this.components.get(hi);for(const i of e){const s=this._list.get(i);if(s){for(const n of s)t.delete(n);this._list.delete(i)}}}generateStartAndEndKP(e){const{alignment:t}=e.curve,i=new Map;for(const s of t.horizontal){const n=s.getLength();if(i.size>0){const r=s.index-1,o=i.get(r).distance+n,a=s.mesh.geometry.getAttribute("position"),h=a.count-1,c=new L;c.x=a.getX(h),c.y=a.getY(h),c.z=a.getZ(h);const u=this.createNormalLine(s.mesh);i.set(s.index,{value:this.getShortendKPValue(o),distance:o,point:c,normal:u})}else{const r=s.mesh.geometry.getAttribute("position"),o=r.count-1,a=new L;a.x=r.getX(o),a.y=r.getY(o),a.z=r.getZ(o);const h=this.createNormalLine(s.mesh);i.set(s.index,{value:this.getShortendKPValue(n),distance:n,point:a,normal:h})}}return i}createNormalLine(e){const t=e.geometry.attributes.position.count-1,i=t-1,s=new L;s.x=e.geometry.attributes.position.getX(t),s.y=e.geometry.attributes.position.getY(t),s.z=e.geometry.attributes.position.getZ(t);const n=new L;n.x=e.geometry.attributes.position.getX(i),n.y=e.geometry.attributes.position.getY(i),n.z=e.geometry.attributes.position.getZ(i);const r=new L().subVectors(s,n).clone().applyAxisAngle(new L(0,0,1),Math.PI*.5).normalize(),o=new Ce().setFromPoints([r.clone().setLength(10).add(s),r.clone().setLength(-10).add(s)]);return new De(o)}generateConstantKP(e){const{alignment:t}=e.curve,i=new Map,s=t.getLength("horizontal"),n=Math.floor(s/this.divisionLength);for(let r=0;r1e3&&parseInt(i,10)<1e4){const[r,...o]=i;return`${r}+${o.join("")}.${n}`}if(parseInt(i,10)>1e4){const[r,o,...a]=i;return`${r}${o}+${a.join("")}.${n}`}return`0+${i.padStart(3,"0")}.${n}`}save(e,t){this._list.has(t)||this._list.set(t,new Set),this._list.get(t).add(e)}};w(_h,"uuid","0af12c32-81ee-4100-a030-e9ae546f6170");let Fs=_h;class Bh extends de{constructor(e){super(e),w(this,"onHighlight",new H),w(this,"onMarkerChange",new H),w(this,"onMarkerHidden",new H),w(this,"onDisposed",new H),w(this,"enabled",!0),w(this,"mouseMarkers"),w(this,"_curves",[]),w(this,"_previousAlignment",null),w(this,"_highlighter"),w(this,"_world",null),w(this,"updateLinesResolution",t=>{var i;(i=this._highlighter)==null||i.setResolution(t)}),w(this,"onMouseMove",t=>{var i,s,n;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const r=this._world.renderer.three.domElement.parentElement,o=this._world.camera.three,a=(i=this._highlighter)==null?void 0:i.castRay(t,o,r,this._curves);if(a){const{object:h}=a;(s=this._highlighter)==null||s.hover(h),this.updateMarker(a,"hover");return}this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),(n=this._highlighter)==null||n.unHover(),this.onMarkerHidden.trigger({type:"hover"})}),w(this,"onClick",t=>{var i,s;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const n=this._world.renderer.three.domElement.parentElement,r=this._world.camera.three,o=(i=this._highlighter)==null?void 0:i.castRay(t,r,n,this._curves);if(o){const a=o,h=a.object;if((s=this._highlighter)==null||s.select(h),this.updateMarker(a,"select"),this._world.camera.hasCameraControls()&&(h.geometry.boundingBox||h.geometry.computeBoundingBox(),h.geometry.boundingBox)){const c=this.getScaledBox(h.geometry.boundingBox,2);this._world.camera.controls.fitToBox(c,!0)}this.onHighlight.trigger({mesh:h,point:a.point}),this._previousAlignment!==h.curve.alignment&&(this.components.get(Fs).showKPStations(h),this._previousAlignment=h.curve.alignment)}}),w(this,"onControlsUpdated",()=>{if(!this._world)throw new Error("No world was given for this navigator!");if(!(this._world.camera.three instanceof si)||!this._highlighter)return;const{zoom:t,left:i,right:s,top:n,bottom:r}=this._world.camera.three,o=i-s,a=n-r,h=Math.max(o,a)/t,c=40,{caster:u}=this._highlighter;u.params.Line.threshold=h/c})}get highlighter(){if(!this._highlighter)throw new Error("Highlighter not initialized. You must set a world first!");return this._highlighter}get world(){return this._world}set world(e){var t,i,s;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(t=this._highlighter)==null||t.dispose(),(i=this.mouseMarkers)==null||i.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!e))return;const n=e.scene.three;this._highlighter=new vh(n,this.view),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}async draw(e,t){if(!e.civilData)throw new Error("The provided model doesn't have civil data!");if(!this._world)throw new Error("No world was given for this navigator!");const{alignments:i}=e.civilData,s=t||i.values(),n=this._world.scene.three,r=new we;r.makeEmpty(),r.min.set(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r.max.set(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(const a of s){if(!a)throw new Error("Alignment not found!");for(const h of a[this.view])if(n.add(h.mesh),this._curves.push(h.mesh),!r.isEmpty())r.expandByObject(h.mesh);else{h.mesh.geometry.computeBoundingBox();const c=h.mesh.geometry.boundingBox;c instanceof we&&r.copy(c).applyMatrix4(h.mesh.matrixWorld)}}const o=this.getScaledBox(r,1.2);this._world.camera.hasCameraControls()&&await this._world.camera.controls.fitToBox(o,!1)}async dispose(){var e;(e=this._highlighter)==null||e.dispose(),this.clear(),this.onHighlight.reset(),this._curves=[],this.onDisposed.trigger(),this.onDisposed.reset()}clear(){var e,t;(e=this._highlighter)==null||e.unSelect(),(t=this._highlighter)==null||t.unHover();for(const i of this._curves)i.removeFromParent();this._curves=[]}setMarker(e,t,i){if(!this._curves.length)return;const s=e.getCurveAt(t,this.view),n=e.getPointAt(t,this.view),{index:r}=s.curve.getSegmentAt(s.percentage);this.setMouseMarker(n,s.curve.mesh,r,i)}setDefSegments(e){const t=[],i=[],s=(n,r)=>{const o=r[1]-n[1],a=r[0]-n[0];return o/a};for(let n=0;n=0;d--)if(r[d*3]!==void 0&&r[d*3+1]!==void 0){h=r[d*3],c=r[d*3+1];break}const u=(s([o,a],[h,c])*100).toFixed(2);i.push({slope:u})}for(const n of e)for(let r=0;rs.clone().add(i))}showLineInfo(e,t){const i=this.components.get(Fs);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.geometry.attributes.position.array,n=this.calculateParallelCurve(s,s.length/3,t),r=new Ce().setFromPoints(n),o=new De(r,this.markupMaterial);i.showLineLength(o,e.curve.getLength()),this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:a,endDimensionPoints:h}=this.calculateDimensionLines(e,o),c=this.offsetDimensionLine(a,t*.1),u=this.offsetDimensionLine(h,t*.1),d=new Ce().setFromPoints(c),f=new Ce().setFromPoints(u),m=new De(d,this.markupMaterial);this._scene.add(m),this.markupLines.push(m);const p=new De(f,this.markupMaterial);this._scene.add(p),this.markupLines.push(p)}showClothoidInfo(e,t){const i=this.components.get(Fs);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.geometry.attributes.position.array,n=this.calculateParallelCurve(s,s.length/3,t),r=new Ce().setFromPoints(n);i.showCurveLength(n,e.curve.getLength());const o=new De(r,this.markupMaterial);this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:a,endDimensionPoints:h}=this.calculateDimensionLines(e,o),c=this.offsetDimensionLine(a,t*.1),u=this.offsetDimensionLine(h,t*.1),d=new Ce().setFromPoints(c),f=new Ce().setFromPoints(u),m=new De(d,this.markupMaterial);this._scene.add(m),this.markupLines.push(m);const p=new De(f,this.markupMaterial);this._scene.add(p),this.markupLines.push(p)}showCircularArcInfo(e,t){const i=this.components.get(Fs);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.curve.data.RADIUS,n=e.geometry.attributes.position.array,r=e.geometry.attributes.position.count,o=[],a=new L(n[0],n[1],n[2]),h=(r-1)*3,c=new L(n[h],n[h+1],n[h+2]),u=r/2*3,d=new L(n[u],n[u+1],n[u+2]),f=c.clone().sub(a).normalize(),m=new L(-f.y,f.x,0);m.multiplyScalar(s);const p=d.clone().add(m);o.push(d),o.push(p);const I=new Ce().setFromPoints(o),E=new De(I,this.markupMaterial);i.showCurveRadius(E,Math.abs(s)),this._scene.add(E),this.markupLines.push(E);const C=[];for(let D=0;D{!this._highlighter||!this.planHighlighter||this.planHighlighter.showCurveInfo(t)})}get world(){return super.world}set world(e){var t;super.world=e,e&&((t=this.planHighlighter)==null||t.dispose(),this.planHighlighter=new $m(this.components,e.scene.three,e))}};w(zh,"uuid","3096dea0-5bc2-41c7-abce-9089b6c9431b");let aI=zh;const Vh=class Yh extends Bh{constructor(e){super(e),w(this,"enabled",!0),w(this,"view","vertical"),this.components.add(Yh.uuid,this)}get world(){return super.world}set world(e){this.world!==e&&(super.world=e,this._highlighter&&this._highlighter.onSelect.add(t=>{if(!this.world)throw new Error("A world is needed to work with this component!");const i=this.components.get(Fs);i.deleteByType(["Slope","Height","InitialKPV","FinalKPV"]);const{alignment:s}=t.curve,n=[];for(const h of s.vertical){const c=h.mesh.geometry.attributes.position.array;n.push(c)}const{defSegments:r,slope:o}=this.setDefSegments(n),a=this.world.scene.three;for(let h=0;h{var i;(i=this.highlighter)==null||i.setResolution(t)}),w(this,"onClick",t=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const i=this.world.renderer.three.domElement,s=this.world.camera.three,n=this._highlighter.castRay(t,s,i,this._curves);if(n){const r=n.object;this._highlighter.select(r),this.updateMarker(n,"select");const{point:o,index:a}=n;a!==void 0&&this.onHighlight.trigger({curve:r,point:o,index:a});return}this._highlighter.unSelect(),this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),this.onMarkerHidden.trigger({type:"hover"})}),w(this,"onMouseMove",async t=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const i=this.world.renderer.three.domElement,s=this.world.camera.three,n=this._highlighter.castRay(t,s,i,this._curves);if(n){this._highlighter.hover(n.object),this.updateMarker(n,"hover");return}this._highlighter.unHover()}),this.components.add(Hh.uuid,this)}get world(){return this._world}set world(e){var t,i,s;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(t=this._highlighter)==null||t.dispose(),(i=this.mouseMarkers)==null||i.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!e))return;const n=e.scene.three;this._highlighter=new vh(n,"absolute"),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}get highlighter(){if(!this._highlighter)throw new Error("Navigator not initialized!");return this._highlighter}draw(e){if(!e.civilData)throw new Error("Model must have civil data!");if(!this.world)throw new Error("A world must be given before drawing an alignment!");const t=this.world.scene.three;for(const[i,s]of e.civilData.alignments)for(const{mesh:n}of s.absolute)t.add(n),this._curves.push(n)}setMarker(e,t,i){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const s=e.getPointAt(t,"absolute");this.mouseMarkers[i].visible=!0,this.mouseMarkers[i].three.position.copy(s)}hideMarker(e){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const t=this.mouseMarkers[e].three;t.visible=!1}newMouseMarker(e,t){const i=t.scene.three,s=document.createElement("div");s.style.backgroundColor=e,s.style.width="1rem",s.style.height="1rem",s.style.borderRadius="1rem";const n=new $e(t,s,i);return n.visible=!1,n}setupEvents(e){var t,i;if(!this.world)throw new Error("No world found!");if(this.world.isDisposing||!this.world.renderer)return;const s=this.world.renderer.three.domElement;(t=this.world.renderer)==null||t.onResize.remove(this.updateLinesResolution),s.removeEventListener("click",this.onClick),s.removeEventListener("pointermove",this.onMouseMove),e&&(s.addEventListener("click",this.onClick),s.addEventListener("pointermove",this.onMouseMove),(i=this.world.renderer)==null||i.onResize.add(this.updateLinesResolution))}updateMarker(e,t){if(!this.mouseMarkers)return;const{point:i,object:s}=e,n=s,r=n.curve,o=n.curve.alignment,a=o.getPercentageAt(i,"absolute");this.mouseMarkers[t].visible=!0,this.mouseMarkers[t].three.position.copy(i),a!==null&&this.onMarkerChange.trigger({alignment:o,percentage:a,type:t,curve:r})}};w(Gh,"uuid","0a59c09e-2b49-474a-9320-99f51f40f182");let hI=Gh;const Wh=class Xh extends de{constructor(e){super(e),w(this,"enabled",!0),w(this,"world",null),w(this,"plane"),w(this,"_world3D",null),this.components.add(Xh.uuid,this)}get world3D(){return this._world3D}set world3D(e){var t;if(this._world3D=e,(t=this.plane)==null||t.dispose(),!e)return;const i=this.components.get(Qi),s=i.Type;i.Type=zn,this.plane=i.createFromNormalAndCoplanarPoint(e,new L(1,0,0),new L),i.Type=s,this.plane.visible=!1,this.plane.enabled=!1}async set(e,t){if(!this.world||!this.plane)throw new Error("You must set a world before using this component");this.plane.enabled=!0;const i=e.curve.getPercentageAt(t);if(i===null)return;const{startPoint:s,endPoint:n}=e.curve.getSegmentAt(i);if(e.geometry.index===null)throw new Error("Geometry must be indexed!");const r=new L;r.subVectors(n,s),r.normalize(),this.plane.setFromNormalAndCoplanarPoint(r,t),this.plane.edges.update();const o=this.plane.helper.matrix.clone();o.invert();const a=this.world.scene.three,h=this.plane.edges.get();for(const c in h){const{mesh:u}=h[c];u.position.set(0,0,0),u.rotation.set(0,0,0),u.updateMatrix(),u.applyMatrix4(o),u.parent!==a&&a.add(u)}this.plane.enabled=!1}};w(Wh,"uuid","96b2c87e-d90b-4639-8257-8f01136fe324");let cI=Wh;function ii(){const l=document.createElement("div");return l.style.backgroundColor="black",l.style.color="white",l.style.padding="8px",l.style.borderRadius="8px",l.style.fontFamily="sans-serif",l}const Nn=class Pn{constructor(e,t,i){w(this,"label"),w(this,"boundingBox",new ee),w(this,"world"),w(this,"components"),w(this,"_length"),w(this,"_visible",!0),w(this,"_start"),w(this,"_end"),w(this,"_root",new Mn),w(this,"_endpoints",[]),w(this,"_line"),this.components=e,this.world=t,this._start=i.start,this._end=i.end,this._length=this.getLength(),this._line=this.createLine(i),this.newEndpointElement(i.endpointElement),this.newEndpointElement(i.endpointElement.cloneNode(!0)),this.label=this.newText(),this._root.renderOrder=2,this.world.scene.three.add(this._root)}get visible(){return this._visible}set visible(e){this._visible=e,this.label.visible=e,this._endpoints[0].visible=e,this._endpoints[1].visible=e;const[t,i]=this._endpoints,s=t.three,n=i.three,r=this.label.three;e?(this.world.scene.three.add(this._root),this._root.add(r,s,n)):(r.removeFromParent(),s.removeFromParent(),n.removeFromParent(),this._root.removeFromParent())}get endPoint(){return this._end}set endPoint(e){this._end=e;const t=this._line.geometry.attributes.position;t.setXYZ(1,e.x,e.y,e.z),t.needsUpdate=!0,this._endpoints[1].three.position.copy(e),this.updateLabel()}get startPoint(){return this._start}set startPoint(e){this._start=e;const t=this._line.geometry.attributes.position;t.setXYZ(0,e.x,e.y,e.z),t.needsUpdate=!0,this._endpoints[0].three.position.copy(e),this.updateLabel()}get _center(){let e=this._end.clone().sub(this._start);const t=e.length()*.5;return e=e.normalize().multiplyScalar(t),this._start.clone().add(e)}dispose(){const e=this.components.get(Pt);this.visible=!1,e.destroy(this._root),e.destroy(this._line);for(const t of this._endpoints)t.dispose();this._endpoints.length=0,this.label.dispose(),this.boundingBox&&e.destroy(this.boundingBox),this.components=null}createBoundingBox(){this.boundingBox.geometry=new ze(1,1,this._length),this.boundingBox.position.copy(this._center),this.boundingBox.lookAt(this._end),this.boundingBox.visible=!1,this._root.add(this.boundingBox)}toggleLabel(){this.label.toggleVisibility()}newEndpointElement(e){const t=this._endpoints.length===0?this._start:this._end,i=new $e(this.world,e);i.three.position.copy(t),this._endpoints.push(i),this._root.add(i.three)}updateLabel(){this._length=this.getLength(),this.label.three.element.textContent=this.getTextContent(),this.label.three.position.copy(this._center),this._line.computeLineDistances()}createLine(e){const t=new Ce;t.setFromPoints([e.start,e.end]);const i=new De(t,e.lineMaterial);return this._root.add(i),i}newText(){const e=ii();e.textContent=this.getTextContent();const t=new $e(this.world,e);return t.three.position.copy(this._center),this._root.add(t.three),t}getTextContent(){return`${(this._length/Pn.scale).toFixed(Pn.rounding)} ${Pn.units}`}getLength(){return this._start.distanceTo(this._end)}};w(Nn,"scale",1),w(Nn,"units","m"),w(Nn,"rounding",2);let Do=Nn;class eI{constructor(e,t,i){w(this,"enabled",!0),w(this,"points",[]),w(this,"workingPlane",null),w(this,"labelMarker"),w(this,"world"),w(this,"components"),w(this,"onDisposed",new H),w(this,"onAreaComputed",new H),w(this,"onWorkingPlaneComputed",new H),w(this,"onPointAdded",new H),w(this,"onPointRemoved",new H),w(this,"_visible",!0),w(this,"_rotationMatrix",null),w(this,"_dimensionLines",[]),w(this,"_defaultLineMaterial",new ni({color:"red"})),this.world=t,this.components=e;const s=ii();this.labelMarker=new $e(t,s),this.labelMarker.visible=!1,this.onPointAdded.add(n=>{this.points.length===3&&!this._dimensionLines[2]&&(this.addDimensionLine(n,this.points[0]),this.labelMarker.visible=!0)}),i==null||i.forEach(n=>this.setPoint(n))}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this._dimensionLines)t.visible=e,t.label.visible=!1;this.labelMarker.visible=e}setPoint(e,t){let i;if(t?i=t:i=this.points.length===0?0:this.points.length,i===0){this.points[0]=e;return}if(i<0||i>this.points.length)return;const s=this.points.length>i;this.points[i]=e,this.onPointAdded.trigger(e),s||this.addDimensionLine(this.points[i-1],e);const{previousLine:n,nextLine:r}=this.getLinesBetweenIndex(i);n&&(n.endPoint=e),r&&(r.startPoint=e)}removePoint(e){if(this.points.length===3)return;this.points.splice(e,1);const{previousLine:t,nextLine:i}=this.getLinesBetweenIndex(e);i&&(t.endPoint=i.endPoint),i==null||i.dispose(),this._dimensionLines.splice(e,1),this.onPointRemoved.trigger()}toggleLabel(){this.labelMarker.toggleVisibility()}addDimensionLine(e,t){const i=new Do(this.components,this.world,{start:e,end:t,lineMaterial:this._defaultLineMaterial,endpointElement:ii()});return i.toggleLabel(),this._dimensionLines.length>1?this._dimensionLines.splice(this._dimensionLines.length-1,0,i):this._dimensionLines.push(i),i}getLinesBetweenIndex(e){const t=e===0?this._dimensionLines.length-1:e-1,i=this._dimensionLines[t],s=this._dimensionLines[e];return{previousLine:i,nextLine:s}}computeWorkingPlane(){this.workingPlane=new Xt().setFromCoplanarPoints(this.points[0],this.points[1],this.points[2]);const e=new L(0,1,0),t=this.workingPlane.normal.angleTo(e),i=new L().crossVectors(this.workingPlane.normal,e).normalize();this._rotationMatrix=new ne().makeRotationAxis(i,t),this.onWorkingPlaneComputed.trigger(this.workingPlane)}computeArea(){if(!(this._rotationMatrix&&this.workingPlane))return this.onAreaComputed.trigger(0),0;let e=0,t=0;const i=this._rotationMatrix,s=this.points.map(r=>{const o=r.clone().applyMatrix4(i),a=new ve(o.x,o.z);return e+=a.x,t+=a.y,a}),n=Math.abs(Bc.area(s));return this.labelMarker.three.element.textContent=`${n.toFixed(2)} m²`,this.labelMarker.three.position.set(e/s.length,-this.workingPlane.constant,t/s.length).applyMatrix4(i.clone().invert()),this.onAreaComputed.trigger(n),n}dispose(){this.onAreaComputed.reset(),this.onWorkingPlaneComputed.reset(),this.onPointAdded.reset(),this.onPointRemoved.reset();for(const e of this._dimensionLines)e.dispose();this.labelMarker.dispose(),this._dimensionLines=[],this.points=[],this._rotationMatrix=null,this.workingPlane=null,this._defaultLineMaterial.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return{points:this.points,workingPlane:this.workingPlane,area:this.computeArea()}}}class _o extends Iu{constructor(e,t){super(e,t),w(this,"onDisposed",new H),w(this,"marker",null),w(this,"_className","default-vertex-picker"),this.onEnabled.add(i=>{this.marker&&(this.marker.visible=i)})}get className(){return this._className}set className(e){this._className=e,this.marker&&(this.marker.three.element.className=e)}dispose(){this.marker&&this.marker.dispose(),super.dispose()}get(e){const t=super.get(e);return t?(this.marker||(this.marker=new $e(e),this.marker.three.element.className=this._className),this.marker.world!==e&&(this.marker.world=e,this.marker.three.removeFromParent(),e.scene.three.add(this.marker.three)),this.marker.visible=!0,this.marker.three.position.copy(t)):this.marker&&(this.marker.visible=!1),t}}const Zh=class $r extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"list",[]),w(this,"world"),w(this,"_enabled",!1),w(this,"_visible",!0),w(this,"_vertexPicker"),w(this,"_currentAreaElement",null),w(this,"_clickCount",0),w(this,"create",()=>{if(!this.enabled)return;if(!this.world)throw new Error("World not defined for the area measurement!");const t=this._vertexPicker.get(this.world);if(t){if(!this._currentAreaElement){const i=new eI(this.components,this.world);i.onPointAdded.add(()=>{this._clickCount===2&&!i.workingPlane&&(i.computeWorkingPlane(),this._vertexPicker.workingPlane=i.workingPlane)}),i.onPointRemoved.add(()=>this._clickCount--),this._currentAreaElement=i}this._currentAreaElement.setPoint(t,this._clickCount),this._currentAreaElement.computeArea(),this._clickCount++}}),w(this,"onMouseMove",()=>{if(!this.world){console.log("No world given for the area measurement!");return}const t=this._vertexPicker.get(this.world);t&&this._currentAreaElement&&(this._currentAreaElement.setPoint(t,this._clickCount),this._currentAreaElement.computeArea())}),w(this,"onKeydown",t=>{this.enabled&&(t.key==="z"&&t.ctrlKey&&this._currentAreaElement&&this._currentAreaElement.removePoint(this._clickCount-1),t.key==="Enter"&&this._currentAreaElement&&this.endCreation(),t.key==="Escape"&&(this._clickCount===0&&!this._currentAreaElement?this.enabled=!1:this.cancelCreation()))}),this.components.add($r.uuid,this),this._vertexPicker=new _o(e)}set enabled(e){this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e),e||this.cancelCreation()}get enabled(){return this._enabled}set workingPlane(e){this._vertexPicker.workingPlane=e}get workingPlane(){return this._vertexPicker.workingPlane}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}dispose(){this.setupEvents(!1),this._vertexPicker.dispose(),this._currentAreaElement&&this._currentAreaElement.dispose();for(const e of this.list)e.dispose();this.components=null,this.onDisposed.trigger($r.uuid),this.onDisposed.reset()}delete(){}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}endCreation(){this._currentAreaElement&&(this._currentAreaElement.points.length<3||(this._currentAreaElement&&(this.list.push(this._currentAreaElement),this._currentAreaElement.removePoint(this._clickCount),this._currentAreaElement.computeWorkingPlane(),this._currentAreaElement.computeArea(),this._currentAreaElement=null),this._vertexPicker.workingPlane=null,this._clickCount=0))}cancelCreation(){this._currentAreaElement&&(this._currentAreaElement.dispose(),this._currentAreaElement=null),this._vertexPicker.workingPlane=null,this._clickCount=0}setupEvents(e){if(!this.world)throw new Error("The area measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the area measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}};w(Zh,"uuid","c453a99e-f054-4781-9060-33df617db4a5");let dI=Zh;class tI{constructor(e,t){w(this,"enabled",!0),w(this,"visible",!0),w(this,"points",[]),w(this,"world"),w(this,"onDisposed",new H),w(this,"_lineMaterial",new _s({color:6629591,linewidth:2})),w(this,"_lineGeometry",new Bn),w(this,"_line",new Ch(this._lineGeometry,this._lineMaterial)),w(this,"_labelMarker"),w(this,"onAngleComputed",new H),w(this,"onPointAdded",new H),this.world=e;const i=ii();this._labelMarker=new $e(e,i),this.labelMarker.visible=!0,this.onPointAdded.add(()=>{this.points.length===1&&e.scene.three.add(this._line),this.points.length===3&&(this.labelMarker.visible=!0)}),this.onAngleComputed.add(s=>{this.labelMarker.three.element.textContent=`${s.toFixed(2)}°`,this.labelMarker.three.position.copy(this.points[1]??new L)}),t==null||t.forEach(s=>this.setPoint(s))}set lineMaterial(e){this._lineMaterial.dispose(),this._lineMaterial=e,this._line.material=e,this._lineMaterial.resolution.set(window.innerWidth,window.innerHeight)}get lineMaterial(){return this._lineMaterial}set labelMarker(e){this._labelMarker.dispose(),this._labelMarker=e}get labelMarker(){return this._labelMarker}get angle(){return{points:this.points,angle:this.computeAngle()}}setPoint(e,t){let i;if(t?i=t:i=this.points.length===0?0:this.points.length,![0,1,2].includes(i))return;this.points[i]=e,this.onPointAdded.trigger(e);const s=this.points.map(n=>[n.x,n.y,n.z]);this._lineGeometry.setPositions(s.flat())}toggleLabel(){this.labelMarker.toggleVisibility()}computeAngle(){const e=this.points[0],t=this.points[1],i=this.points[2];if(!(e&&t&&i))return 0;const s=new L().subVectors(t,e),n=new L().subVectors(t,i),r=gi.radToDeg(s.angleTo(n));return this.onAngleComputed.trigger(r),r}dispose(){this.points=[],this.labelMarker.dispose(),this.onAngleComputed.reset(),this.onPointAdded.reset(),this.labelMarker.dispose(),this._line.removeFromParent(),this._lineMaterial.dispose(),this._lineGeometry.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}}const jh=class eo extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"world"),w(this,"list",[]),w(this,"_lineMaterial"),w(this,"_enabled",!1),w(this,"_vertexPicker"),w(this,"_currentAngleElement",null),w(this,"_clickCount",0),w(this,"create",()=>{if(!this.enabled)return;if(!this.world){console.log("No world selected for angle measurement!");return}const t=this._vertexPicker.get(this.world);if(t){if(!this._currentAngleElement){const i=new tI(this.world);i.lineMaterial=this.lineMaterial,this._currentAngleElement=i}this._currentAngleElement.setPoint(t,this._clickCount),this._currentAngleElement.setPoint(t,this._clickCount+1),this._currentAngleElement.setPoint(t,this._clickCount+2),this._currentAngleElement.computeAngle(),this._clickCount++,this._clickCount===3&&this.endCreation()}}),w(this,"onMouseMove",()=>{if(!this.world){console.log("No world selected for angle measurement!");return}const t=this._vertexPicker.get(this.world);t&&this._currentAngleElement&&(this._currentAngleElement.setPoint(t,this._clickCount),this._currentAngleElement.computeAngle())}),w(this,"onKeyDown",t=>{this.enabled&&t.key==="Escape"&&this.cancelCreation()}),this.components.add(eo.uuid,this),this._vertexPicker=new _o(e),this._lineMaterial=new _s({color:6629591,linewidth:2})}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.setupEvents(e),this._vertexPicker.enabled=e,e||this.cancelCreation()}get lineMaterial(){return this._lineMaterial}set lineMaterial(e){this._lineMaterial.dispose(),this._lineMaterial=e,this._lineMaterial.resolution.set(window.innerWidth,window.innerHeight)}get workingPlane(){return this._vertexPicker.workingPlane}set workingPlane(e){this._vertexPicker.workingPlane=e}dispose(){this.setupEvents(!1),this._lineMaterial.dispose(),this._vertexPicker.dispose();for(const e of this.list)e.dispose();this._currentAngleElement&&this._currentAngleElement.dispose(),this.components=null,this.onDisposed.trigger(eo.uuid),this.onDisposed.reset()}delete(){}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}endCreation(){this._currentAngleElement&&(this.list.push(this._currentAngleElement),this._currentAngleElement.computeAngle(),this._currentAngleElement=null),this._clickCount=0}cancelCreation(){this._currentAngleElement&&(this._currentAngleElement.dispose(),this._currentAngleElement=null),this._clickCount=0}setupEvents(e){if(!this.world)throw new Error("No world selected for angle measurement!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeyDown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeyDown))}};w(jh,"uuid","622fb2c9-528c-4b0a-8a0e-6a1375f0a3aa");let uI=jh;const Kh=class to extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"onBeforeUpdate",new H),w(this,"onAfterUpdate",new H),w(this,"onCleaned",new H),w(this,"snapDistance",.25),w(this,"list",[]),w(this,"world"),w(this,"_vertexPicker"),w(this,"_lineMaterial",new ni({color:"#DC2626",linewidth:2,depthTest:!1})),w(this,"_visible",!0),w(this,"_enabled",!1),w(this,"_temp",{isDragging:!1,start:new L,end:new L,dimension:void 0}),w(this,"create",t=>{const i=t instanceof Zi?t:void 0;if(this._enabled){if(!this._temp.isDragging){this.drawStart(i);return}this.endCreation()}}),w(this,"onMouseMove",()=>{this.world&&this._vertexPicker.get(this.world)}),w(this,"onKeydown",t=>{this.enabled&&t.key==="Escape"&&this.cancelCreation()}),this.components.add(to.uuid,this),this._vertexPicker=new _o(e,{previewElement:ii(),snapDistance:this.snapDistance})}get enabled(){return this._enabled}set enabled(e){e||this.cancelCreation(),this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e)}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get color(){return this._lineMaterial.color}set color(e){this._lineMaterial.color=e}dispose(){this.setupEvents(!1),this.enabled=!1;for(const e of this.list)e.dispose();this._lineMaterial.dispose(),this.list=[],this._vertexPicker.dispose(),this.onDisposed.trigger(to.uuid),this.onDisposed.reset()}async update(e){this._enabled&&this._temp.isDragging&&this.drawInProcess()}createOnPoints(e,t){const i=this.drawDimension();return i.startPoint=e,i.endPoint=t,i.createBoundingBox(),this.list.push(i),i}delete(){if(!this.world)throw new Error("World is needed for Length Measurement!");if(!this._enabled||this.list.length===0)return;const e=this.getBoundingBoxes(),t=this.components.get(pt).get(this.world).castRay(e);if(!t)return;const i=this.list.find(s=>s.boundingBox===t.object);if(i){const s=this.list.indexOf(i);this.list.splice(s,1),i.dispose()}}async deleteMeasurement(e){if(e){const t=this.list.indexOf(e);this.list.splice(t,1),e.dispose()}}deleteAll(){for(const e of this.list)e.dispose();this.list=[],this.onCleaned.trigger(null)}cancelCreation(){var e;this._temp.dimension&&(this._temp.isDragging=!1,(e=this._temp.dimension)==null||e.dispose(),this._temp.dimension=void 0)}endCreation(){this._temp.dimension&&(this._temp.dimension.createBoundingBox(),this.list.push(this._temp.dimension),this._temp.dimension=void 0,this._temp.isDragging=!1)}drawStart(e){if(!this.world)throw new Error("The length measurement needs a world to work!");const t=e?[e]:void 0,i=this.components.get(pt).get(this.world).castRay(t),s=this._vertexPicker.get(this.world);i&&s&&(this._temp.isDragging=!0,this._temp.start=e?i.point:s)}drawInProcess(){if(!this.world)throw new Error("The length measurement needs a world to work!");if(!this.components.get(pt).get(this.world).castRay())return;const e=this._vertexPicker.get(this.world);e&&(this._temp.end=e,this._temp.dimension||(this._temp.dimension=this.drawDimension()),this._temp.dimension.endPoint=this._temp.end)}drawDimension(){if(!this.world)throw new Error("The length measurement needs a world to work!");return new Do(this.components,this.world,{start:this._temp.start,end:this._temp.end,lineMaterial:this._lineMaterial,endpointElement:ii()})}getBoundingBoxes(){return this.list.map(e=>e.boundingBox).filter(e=>e!==void 0)}setupEvents(e){if(!this.world)throw new Error("The length measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the length measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;t&&(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown),e&&(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)))}};w(Kh,"uuid","2f9bcacf-18a9-4be6-a293-e898eae64ea1");let Rs=Kh;const Qh=class qh extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"onVolumeFound",new H),w(this,"label",null),w(this,"world"),w(this,"_enabled",!1),w(this,"create",()=>{if(!this.enabled)return;if(!this.world)throw new Error("World is needed for Volume Measurement!");const t=this.components.get(pt).get(this.world).castRay(),i=this.components.get(Ii);if(!t||!t.object)return;const{object:s}=t;if(s instanceof ee){const n=i.getVolumeFromMeshes([s]);this.onVolumeFound.trigger(n)}}),w(this,"onMouseMove",()=>{}),w(this,"onKeydown",t=>{}),this.components.add(qh.uuid,this)}set enabled(e){this._enabled=e,this.setupEvents(e),e||this.cancelCreation()}get enabled(){return this._enabled}async dispose(){var e;this.setupEvents(!1),(e=this.label)==null||e.dispose(),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){}async deleteAll(){}endCreation(){}cancelCreation(){}getVolumeFromFragments(e){const t=this.components.get(Ii).getVolumeFromFragments(e),i=this.components.get(Un);i.reset(),i.addFragmentIdMap(e);const s=i.getSphere();return this.setLabel(s,t),t}getVolumeFromMeshes(e){const t=this.components.get(Ii),i=this.components.get(Un);i.reset();for(const r of e)i.addMesh(r);const s=i.getSphere(),n=t.getVolumeFromMeshes(e);return this.setLabel(s,n),n}clear(){this.label&&(this.label.visible=!1)}newLabel(){if(!this.world)throw new Error("World is needed for Volume Measurement!");const e=ii();return new $e(this.world,e)}setupEvents(e){if(!this.world)throw new Error("The volume measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the volume measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("click",this.create),t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("click",this.create),t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}setLabel(e,t){if(!this.world)throw new Error("World is needed for Volume Measurement!");this.label||(this.label=this.newLabel(),this.label.three.removeFromParent()),this.label.visible=!0,this.world.scene.three.add(this.label.three),this.label.three.position.copy(e.center);const i=Math.trunc(t*100)/100;this.label.three.element.textContent=i.toString()}};w(Qh,"uuid","811da532-7af3-4635-b592-1c06ae494af5");let fI=Qh;const Jh=class $h extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"selection",[]),w(this,"preview",new ee(new Ce,new nt({side:2,depthTest:!1,transparent:!0,opacity:.25,color:"#BCF124"}))),w(this,"selectionMaterial",new nt({side:2,depthTest:!1,transparent:!0,color:"#BCF124",opacity:.75})),w(this,"world"),w(this,"_enabled",!1),w(this,"_currentSelelection",null),w(this,"create",()=>{if(!this.world)throw new Error("No world given to the face measurement!");if(!this.enabled||!this._currentSelelection)return;const t=this.world.scene.three,i=new Ce,s=new ee(i,this.selectionMaterial);i.setAttribute("position",this.preview.geometry.attributes.position),t.add(s),i.computeBoundingSphere();const{area:n,perimeter:r}=this._currentSelelection,o=this.newLabel(i,n);s.add(o.three),this.selection.push({area:n,perimeter:r,mesh:s,label:o})}),w(this,"onMouseMove",()=>{if(!this.world)throw new Error("The face measurement needs a world to work!");if(!this.enabled){this.unselect();return}const t=this.components.get(pt).get(this.world).castRay();if(!t||!t.object||t.faceIndex===void 0){this.unselect();return}const{object:i,faceIndex:s}=t;i instanceof ee||i instanceof ft?this.updateSelection(i,s,t.instanceId):this.unselect()}),w(this,"onKeydown",t=>{}),this.components.add($h.uuid,this),this.preview.frustumCulled=!1}set enabled(e){if(!this.world)throw new Error("No world given for the Face measurement!");this._enabled=e,this.setupEvents(e),e?this.world.scene.three.add(this.preview):(this.preview.removeFromParent(),this.cancelCreation()),this.setVisibility(e)}get enabled(){return this._enabled}dispose(){this.setupEvents(!1),this.deleteAll(),this.preview.removeFromParent(),this.preview.material.dispose(),this.preview.geometry.dispose(),this.selectionMaterial.dispose(),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){if(!this.world)throw new Error("No world given to the face measurement!");const e=this.selection.map(n=>n.mesh),t=this.components.get(pt).get(this.world).castRay(e);if(!t||!t.object)return;const i=this.selection.find(n=>n.mesh===t.object);if(!i)return;i.mesh.removeFromParent(),i.mesh.geometry.dispose(),i.label.dispose();const s=this.selection.indexOf(i);this.selection.splice(s,1)}deleteAll(){for(const e of this.selection)e.mesh.removeFromParent(),e.mesh.geometry.dispose(),e.label.dispose();this.selection=[]}endCreation(){}cancelCreation(){}get(){const e=[];for(const t of this.selection){const i=t.mesh.geometry,{area:s,perimeter:n}=t,r=i.attributes.position.array;e.push({position:r,area:s,perimeter:n})}return e}set(e){if(!this.world)throw new Error("No world given to the face measurement!");const t=this.world.scene.three;for(const i of e){const s=new Ce,n=new ee(s,this.selectionMaterial);t.add(n);const r=new et(i.position,3);s.setAttribute("position",r),s.computeBoundingSphere();const{area:o,perimeter:a}=i,h=this.newLabel(s,o);n.add(h.three),this.selection.push({area:o,perimeter:a,mesh:n,label:h})}}setupEvents(e){if(!this.world)throw new Error("The face measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the face measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown),e&&(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown))}setVisibility(e){if(!this.world)throw new Error("The face measurement needs a world to work!");if(this.world.isDisposing)return;const t=this.world.scene.three;for(const i of this.selection){const s=i.label.three;e?(t.add(i.mesh),i.mesh.add(s)):(i.mesh.removeFromParent(),s.removeFromParent())}}unselect(){this.preview.removeFromParent(),this._currentSelelection=null}updateSelection(e,t,i){if(!this.world)throw new Error("The face measurement needs a world to work!");this.world.scene.three.add(this.preview);const s=this.components.get(Ii).getFace(e,t,i);if(s===null)return;const n=this.regenerateHighlight(e,s.indices,i);let r=0;for(const{distance:o}of s.edges)r+=o;this._currentSelelection={perimeter:r,area:n}}newLabel(e,t){if(!e.boundingSphere)throw new Error("Error computing area geometry");if(!this.world)throw new Error("The face measurement needs a world to work!");const{center:i}=e.boundingSphere,s=ii(),n=Math.trunc(t*100)/100;s.textContent=n.toString();const r=new $e(this.world,s);return r.three.position.copy(i),r}regenerateHighlight(e,t,i){const s=[],n=[];let r=0,o=0;const a=new ui,h=this.components.get(Ii);for(const d of t){const{p1:f,p2:m,p3:p}=h.getVerticesAndNormal(e,d,i);s.push(f.x,f.y,f.z),s.push(m.x,m.y,m.z),s.push(p.x,p.y,p.z),a.set(f,m,p),o+=a.getArea(),n.push(r,r+1,r+2),r+=3}this.preview.position.set(0,0,0),this.preview.rotation.set(0,0,0),this.preview.scale.set(1,1,1),this.preview.updateMatrix(),this.preview.applyMatrix4(e.matrixWorld);const c=new Float32Array(s),u=new et(c,3);return this.preview.geometry.setAttribute("position",u),this.preview.geometry.setIndex(n),o}};w(Jh,"uuid","30279548-1309-44f6-aa97-ce26eed73522");let pI=Jh;const ec=class tc extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"preview"),w(this,"tolerance",.3),w(this,"world"),w(this,"_enabled",!1),w(this,"_lineMaterial",new ni({color:"#DC2626",linewidth:2,depthTest:!1,transparent:!0})),w(this,"create",async()=>{if(!this.preview||!this.enabled||!this.preview.visible)return;const t=this.components.get(Rs);t.world=this.world;const i=this.preview.startPoint.clone(),s=this.preview.endPoint.clone();t.createOnPoints(i,s)}),w(this,"onMouseMove",()=>{if(!this.preview)return;if(!this.world)throw new Error("The edge measurement needs a world to work!");if(!this.enabled){this.preview.visible=!1;return}const t=this.components.get(pt).get(this.world).castRay();if(!t||!t.object){this.preview.visible=!1;return}const{object:i,faceIndex:s,point:n}=t;if(s===void 0){this.preview.visible=!1;return}i instanceof ee||i instanceof ft?this.updateSelection(i,n,s,t.instanceId):this.preview.visible=!1}),w(this,"onKeydown",t=>{}),this.components.add(tc.uuid,this)}set enabled(e){if(this._enabled=e,this.setupEvents(e),e){if(!this.world)throw new Error("The edge measurement needs a world to work!");if(!this.preview){const t=document.createElement("div");t.className="w-2 h-2 bg-red-600 rounded-full",this.preview=new Do(this.components,this.world,{start:new L,end:new L,lineMaterial:this._lineMaterial,endpointElement:t}),this.preview.visible=!1}}else this.cancelCreation()}get enabled(){return this._enabled}dispose(){this.preview&&this.preview.dispose(),this._lineMaterial.dispose(),this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){if(!this.enabled)return;const e=this.components.get(Rs),t=e.enabled;e.enabled=!0,e.delete(),e.enabled=t}deleteAll(){this.components.get(Rs).deleteAll()}endCreation(){}cancelCreation(){}get(){const e=this.components.get(Rs).list,t=[];for(const i of e){const s=i.startPoint,n=i.endPoint,r=[s.x,s.y,s.z,n.x,n.y,n.z];t.push(r)}return t}set(e){const t=this.components.get(Rs);t.world=this.world;for(const i of e){const[s,n,r,o,a,h]=i,c=new L(s,n,r),u=new L(o,a,h);t.createOnPoints(c,u)}}setupEvents(e){if(!this.world)throw new Error("The edge measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the edge measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}updateSelection(e,t,i,s){if(!this.preview||!e.geometry.index)return;const n=this.components.get(Ii).getFace(e,i,s);if(!n)return;const{edges:r}=n;let o=Number.MAX_VALUE,a=[];for(const u of r){const[d,f]=u.points,m=Ii.distanceFromPointToLine(t,d,f,!0);m{const n=s.data.colors,r={},o={},a={},h={},c=performance.now();let u=!1;const d=new Set(this._geometriesInMemory);for(const[f,m]of n){const p=this._geometries.get(f);if(!p||!(m>this.threshold))continue;d.delete(f);const{exists:I}=p,E=this._indexModelID.get(p.modelIndex);I?(p.time=c,h[E]||(h[E]=new Set),h[E].add(p.geometryID),this._geometriesInMemory.add(f),u=!0):(r[E]||(r[E]=new Map),p.time=c,p.exists=!0,r[E].has(m)||r[E].set(m,new Set),r[E].get(m).add(p.geometryID),this._geometriesInMemory.add(f),u=!0)}for(const f of d){const m=this._geometries.get(f);m&&(this.handleLostGeometries(c,f,m,o,a),u=!0)}u&&await this.onViewUpdated.trigger({toLoad:r,toRemove:o,toHide:a,toShow:h}),this._isWorkerBusy=!1}),this.config.updateInterval=500,this._geometry=new ze(1,1,1),this._geometry.groups=[],this._geometry.deleteAttribute("uv");const i=this._geometry.attributes.position.array;for(let s=0;sparseInt(m,10)),f=[];for(const m of i.ids){const p=i.get(m);if(!p.colors)throw new Error("Malformed fragments!");for(const I of p.colors)I.setRGB(c/255,u/255,d/255,"srgb");f.push(p)}h.fragment.add(f),Ut.enabled=r,this.needsUpdate=!0}removeFragment(e,t){const i=this._modelIDIndex.get(e),s=this.codes.get(i).get(t),n=this._geometries.get(s);if(n.hidden||this.setGeometryVisibility(n,!0,!1),n.fragment){const{fragment:r}=n;r.dispose(!1),n.fragment=void 0}}setModelTransformation(e,t){const i=this._modelIDIndex.get(e);if(i===void 0)throw new Error("Model not found!");const s=this.boxes.get(i);s&&(s.mesh.position.set(0,0,0),s.mesh.rotation.set(0,0,0),s.mesh.scale.set(1,1,1),s.mesh.applyMatrix4(t));const n=this._geometriesGroups.get(i);n&&(n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),n.applyMatrix4(t))}setVisibility(e,t,i){const s=this._modelIDIndex.get(t);if(s!==void 0)for(const[n,r]of i){const o=this.codes.get(s);if(o===void 0)throw new Error("Map not found!");const a=o.get(n),h=this._geometries.get(a);if(h===void 0)throw new Error("Geometry not found!");h.hidden=!e,this.setGeometryVisibility(h,e,!0,r)}}updateTransformations(e){const t=this._modelIDIndex.get(e);if(t===void 0)return;const i=this.components.get(ue).groups.get(e);if(i){i.updateWorldMatrix(!0,!1),i.updateMatrix();const s=this.boxes.get(t);s&&(s.mesh.position.set(0,0,0),s.mesh.rotation.set(0,0,0),s.mesh.scale.set(1,1,1),s.mesh.updateMatrix(),s.mesh.applyMatrix4(i.matrixWorld),s.mesh.updateMatrix());const n=this._geometriesGroups.get(t);n&&(n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),n.updateMatrix(),n.applyMatrix4(i.matrixWorld),n.updateMatrix())}}async addStaticGeometries(e,t=!0){const i={data:{colors:new Map}},s=this.threshold+1e3;for(const n in e){const r=this._modelIDIndex.get(n);if(r===void 0)continue;const o=this.codes.get(r);if(!o)continue;const a=e[n];for(const h of a){const c=o.get(h);if(!c)continue;const u=this._geometries.get(c);if(!u)continue;u.exists=!0,t||(u.hidden=!1,u.time=performance.now(),i.data.colors.set(c,s)),this._geometriesInMemory.add(c);const d=t?this._staticGeometries.culled:this._staticGeometries.unculled;d[n]||(d[n]=new Set),d[n].add(h)}}t||await this.handleWorkerMessage(i)}removeStaticGeometries(e,t){const i=[];t===void 0?i.push("culled","unculled"):t===!0?i.push("culled"):i.push("unculled");for(const s in e){const n=e[s];for(const r of i){const o=this._staticGeometries[r][s];if(o)for(const a of n)o.delete(a)}}}cancel(e){for(const t in e){const i=this._modelIDIndex.get(t);if(i===void 0)throw new Error("Model not found.");const s=this.codes.get(i);if(s===void 0)throw new Error("Codes not found.");for(const n of e[t]){const r=s.get(n);if(r===void 0)throw new Error("Color code not found.");this._geometriesInMemory.delete(r);const o=this._geometries.get(r);if(!o)throw new Error("Geometry not found.");o.exists=!1}}}getBoundingBoxes(e){const t=new kt;for(const i in e){const s=e[i],n=this._modelIDIndex.get(i);if(n===void 0)continue;const r=this.boxes.get(n);if(!r)continue;const o=r.clone(s);t.add(o.mesh),t.items.push(o)}return t}getInstanceID(e,t){const i=10**(Math.log(t)*Math.LOG10E+1|0);return e+t/i}setGeometryVisibility(e,t,i,s){const{modelIndex:n,geometryID:r,assetIDs:o}=e,a=this.boxes.get(n);if(a===void 0)throw new Error("Model not found!");const h=s||o;if(i&&e.fragment)e.fragment.setVisibility(t,h);else{const c=new Set;for(const u of h){const d=this.getInstanceID(u,r);c.add(d)}a.setVisibility(t,c)}}handleLostGeometries(e,t,i,s,n){var r,o,a;const h=this._indexModelID.get(i.modelIndex),c=e-i.time,{culled:u,unculled:d}=this._staticGeometries;if(c>this.maxLostTime){if((r=u[h])!=null&&r.has(i.geometryID)||(o=d[h])!=null&&o.has(i.geometryID))return;s[h]||(s[h]=new Set),i.exists=!1,s[h].add(i.geometryID),this._geometriesInMemory.delete(t)}else if(c>this.maxHiddenTime){if((a=d[h])!=null&&a.has(i.geometryID))return;n[h]||(n[h]=new Set),n[h].add(i.geometryID)}}createModelIndex(e){if(this._modelIDIndex.has(e))throw new Error("Can't load the same model twice!");const t=this._nextModelID;return this._nextModelID++,this._modelIDIndex.set(e,t),this._indexModelID.set(t,e),t}}const ic=class io extends de{constructor(e){super(e),w(this,"enabled",!0),w(this,"onFragmentsDeleted",new H),w(this,"onFragmentsLoaded",new H),w(this,"onDisposed",new H),w(this,"models",{}),w(this,"serializer",new tl),w(this,"maxRamTime",5e3),w(this,"useCache",!0),w(this,"cancel",!1),w(this,"url",""),w(this,"fetch",async t=>fetch(this.url+t)),w(this,"fileDB",new Ec("that-open-company-streaming")),w(this,"_culler",null),w(this,"_world",null),w(this,"_ramCache",new Map),w(this,"_isDisposing",!1),w(this,"_geometryInstances",{}),w(this,"_loadedFragments",{}),w(this,"fragIDData",new Map),w(this,"_baseMaterial",new Ln),w(this,"_baseMaterialT",new Ln({transparent:!0,opacity:.5})),w(this,"disposeStreamedGroup",t=>{this._isDisposing=!0;const{groupID:i,fragmentIDs:s}=t;if(this.models[i]){delete this.models[i],delete this._geometryInstances[i],delete this._loadedFragments[i];for(const n of s)this.fragIDData.delete(n);this.culler.remove(i),this._isDisposing=!1}}),this.components.add(io.uuid,this),this.components.get(ue).onFragmentsDisposed.add(this.disposeStreamedGroup),kt.setPropertiesDB(!0)}get world(){if(!this._world)throw new Error("You must set a world before using the streamer!");return this._world}set world(e){var t;this._world=e,(t=this._culler)==null||t.dispose(),this._culler=new iI(this.components,e),this._culler.onViewUpdated.add(async({toLoad:i,toRemove:s,toShow:n,toHide:r})=>{await this.loadFoundGeometries(i),await this.unloadLostGeometries(s),this.setMeshVisibility(n,!0),this.setMeshVisibility(r,!1)})}get culler(){if(!this._culler)throw new Error("You must set a world before using the streamer!");return this._culler}dispose(){var e;this._isDisposing=!0,this.onFragmentsLoaded.reset(),this.onFragmentsDeleted.reset(),this._ramCache.clear(),this.components.get(ue).onFragmentsDisposed.remove(this.disposeStreamedGroup),this.models={},this._geometryInstances={},this._loadedFragments={},this.fragIDData.clear(),this._baseMaterial.dispose(),this._baseMaterialT.dispose(),(e=this._culler)==null||e.dispose(),this.onDisposed.trigger(io.uuid),this.onDisposed.reset(),this._isDisposing=!1,kt.setPropertiesDB(!1)}async load(e,t,i){const{assets:s,geometries:n,globalDataFileId:r}=e,o=await(await this.fetch(r)).arrayBuffer(),a=new Uint8Array(o),h=this.components.get(ue).load(a,{coordinate:t,isStreamed:!0});h.name=r.replace("-processed-global",""),this.world.scene.three.add(h);const{opaque:c,transparent:u}=h.geometryIDs;for(const[p,I]of c){const E=h.keyFragments.get(I);if(E===void 0)throw new Error("Malformed fragments group!");this.fragIDData.set(E,[h,p,new Set])}for(const[p,I]of u){const E=h.keyFragments.get(I);if(E===void 0)throw new Error("Malformed fragments group!");this.fragIDData.set(E,[h,Math.abs(p),new Set])}this.culler.add(h.uuid,s,n);const d=new Map;for(const p of s)d.set(p.id,p);const f={assetsMap:d,geometries:n};Object.defineProperty(f,"assets",{get:()=>Array.from(f.assetsMap.values())}),this.models[h.uuid]=f;const m=new Map;for(const p of s){const I=p.id;for(const{transformation:E,geometryID:C,color:v}of p.geometries){m.has(C)||m.set(C,[]);const g=m.get(C);if(!g)throw new Error("Malformed instances");g.push({id:I,transformation:E,color:v})}}if(this._geometryInstances[h.uuid]=m,i){const p=new Map,I=new Map;for(const S in i.ids){const O=i.ids[S],A=parseInt(S,10);p.set(A,O)}for(const S in i.types){const O=i.types[S],A=parseInt(S,10);I.set(A,O)}const E=r.replace("-global","-properties");kt.url=this.url,h.streamSettings={baseFileName:E,ids:p,types:I};const{indexesFile:C}=i,v=await(await this.fetch(C)).text(),g=this.components.get(st);g.setRelationMap(h,g.getRelationsMapFromJSON(v))}return this.culler.updateTransformations(h.uuid),this.culler.needsUpdate=!0,h}remove(e){const t=this.components.get(ue),i=t.groups.get(e);i&&t.disposeGroup(i)}setVisibility(e,t){const i=new Map;if(!t){const s=this.components.get(ue),n={};for(const[,r]of s.groups){const o=r.getFragmentMap();for(const a in o)n[a]=o[a]}t=n}for(const s in t){const n=this.fragIDData.get(s);if(n===void 0)throw new Error("Geometry not found!");const[r,o,a]=n,h=r.uuid;i.has(h)||i.set(h,new Map);const c=i.get(h),u=t[s];for(const f of u)e?a.delete(f):a.add(f);c.get(o)||c.set(o,new Set);const d=c.get(o);for(const f of u)d.add(f)}for(const[s,n]of i){this.culler.setVisibility(e,s,n);for(const[r]of n){const o=this._loadedFragments[s];if(!o)continue;const a=o[r];if(a)for(const h of a){const c=t[h.id];c&&h.setVisibility(e,c)}}}this.culler.needsUpdate=!0}async clearCache(){await this.fileDB.clear()}async setStatic(e,t,i){const s={};for(const n of e){const r=this.fragIDData.get(n);if(!r){console.log(`Item not found: ${n}.`);continue}const[o,a]=r,h=o.uuid;s[h]||(s[h]=new Set),s[h].add(a)}if(t){const n={};for(const r in s){const o=new Map;o.set(1,s[r]),n[r]=o}await this.loadFoundGeometries(n,!1),await this.culler.addStaticGeometries(s,i)}else this.culler.removeStaticGeometries(s,i)}getBoundingBoxes(e){const t={},i=this.components.get(ue),s=new Map;for(const[r,o]of i.groups)for(const[,a]of o.keyFragments)s.set(a,r);const n=new Set;for(const r in e){const o=s.get(r);if(o===void 0){console.log("Fragment group not found!");continue}const a=e[r];n.has(o)||(t[o]=new Set,n.add(o));for(const h of a){const c=this.models[o].assetsMap.get(h);if(c)for(const u of c.geometries){const d=u.geometryID,f=this.culler.getInstanceID(h,d);t[o].add(f)}}}return this.culler.getBoundingBoxes(t)}async loadFoundGeometries(e,t=!0){this.cancel=!1;const i={};for(const s in e){const n=new Set;for(const[,r]of e[s])for(const o of r)n.add(o);i[s]=n}for(const s in e){if(this._isDisposing)return;if(this.cancel){this.cancelLoading(i);return}const n=this.components.get(ue).groups.get(s);if(!n)return;const{geometries:r}=this.models[s],o=new Map,a=new Set;for(const[f,m]of e[s])for(const p of m){if(this.cancel){this.cancelLoading(i);return}a.add(p);const I=r[p];if(!I)throw new Error("Geometry not found");if(I.geometryFile){const E=I.geometryFile,C=o.get(E)||0;o.set(E,C+f)}}if(this.useCache){const f=o.entries();for(const[m,p]of f)this.fileDB.isCached(m)&&o.set(m,p+99999)}const h=Array.from(o).sort((f,m)=>m[1]-f[1]),c=[];for(const[f]of h){const m=this.loadFragmentFile(s,n,t,f,a,i);c.push(m)}await Promise.all(c);const u=new Set,d=performance.now();for(const[f,{time:m}]of this._ramCache)d-m>this.maxRamTime&&u.add(f);for(const f of u)this._ramCache.delete(f)}}async unloadLostGeometries(e){if(this._isDisposing)return;const t=[],i=this.components.get(ue);for(const s in e){const n=i.groups.get(s);if(!n)throw new Error("Fragment group not found!");if(!this._loadedFragments[s])continue;const r=this._loadedFragments[s],o=e[s];for(const a of o){if(this.culler.removeFragment(n.uuid,a),!r[a])continue;const h=r[a];for(const c of h)n.items.splice(n.items.indexOf(c),1),t.push(c);delete r[a]}}t.length&&this.onFragmentsDeleted.trigger(t);for(const s of t)i.list.delete(s.id),this.world.meshes.delete(s.mesh),s.mesh.material=[],s.dispose(!0)}setMeshVisibility(e,t){for(const i in e)for(const s of e[i]){const n=this._loadedFragments[i];if(!n)continue;const r=n[s];if(r)for(const o of r)o.mesh.visible=t}}newFragment(e,t,i,s,n,r,o){if(s.length===0||this._isDisposing)return;const a=e.geometryIDs,h=n?a.transparent:a.opaque,c=t*(n?-1:1),u=h.get(c);if(u===void 0)return;const d=e.keyFragments.get(u);if(d===void 0)return;const f=this.components.get(ue);if(f.list.has(d))return;const m=n?this._baseMaterialT:this._baseMaterial,p=new xn(i,m,s.length);p.mesh.visible=o,p.id=d,p.mesh.uuid=d,p.group=e,e.add(p.mesh),e.items.push(p),f.list.set(p.id,p),this.world.meshes.add(p.mesh),this._loadedFragments[e.uuid]||(this._loadedFragments[e.uuid]={});const I=this._loadedFragments[e.uuid];I[t]||(I[t]=[]),I[t].push(p);const E=new Map;for(let S=0;S{var i;const s=this.components.get(ue);for(const n in t){const r=s.list.get(n);if(!r)continue;const o=(i=r.group)==null?void 0:i.uuid;if(o)for(const a in this.selection){if(a===this.config.selectName||a===this.config.hoverName)continue;const h=this.selection[a][n];if(h){a in this._colorsBeforeSelect||(this._colorsBeforeSelect[a]={}),o in this._colorsBeforeSelect[a]||(this._colorsBeforeSelect[a]={[o]:new Set});for(const c of h)this._colorsBeforeSelect[a][o].add(c)}}}}),w(this,"restoreHighlightersAfterDeselect",()=>{const t=this.components.get(ue);for(const i in this._colorsBeforeSelect){let s={};const n=this._colorsBeforeSelect[i];for(const r in n){const o=t.groups.get(r);if(!o)continue;const a=o.getFragmentMap(n[r]);s={...s,...a}}this.highlightByID(i,s,!1,!1)}this._colorsBeforeSelect={}}),w(this,"clearHover",()=>{this.selection[this.config.hoverName]={}}),w(this,"onMouseDown",t=>{this.enabled&&(this.mouseDownPosition={x:t.clientX,y:t.clientY},this._mouseState.down=!0)}),w(this,"onMouseUp",async t=>{if(!this.enabled)return;const{world:i,autoHighlightOnClick:s,selectEnabled:n}=this.config;if(!i)throw new Error("No world found!");if(!i.renderer)throw new Error("This world doesn't have a renderer!");if(t.target===i.renderer.three.domElement){if(this._mouseState.down=!1,this._mouseState.moved||t.button!==0){this._mouseState.moved=!1;return}if(this._mouseState.moved=!1,s&&n){const r=this.multiple==="none"?!0:!t[this.multiple];await this.highlight(this.config.selectName,r,this.zoomToSelection)}}}),w(this,"onMouseMove",async t=>{if(!this.enabled)return;const i=t.clientX-this.mouseDownPosition.x,s=t.clientY-this.mouseDownPosition.y,n=Math.sqrt(i*i+s*s),{hoverName:r,hoverEnabled:o}=this.config;if(this._mouseState.moved){this.clear(r);return}if(n>this.mouseMoveThreshold){this._mouseState.moved=this._mouseState.down;const a={};for(const h in this.selection){if(h===r)continue;const c=this.selection[h];for(const u in c){u in a||(a[u]=new Set);const d=c[u];for(const f of d)a[u].add(f)}}o&&await this.highlight(this.config.hoverName,!0,!1,a)}}),this.components.add(so.uuid,this),this.eventManager.list.add(this.onSetup),this.eventManager.list.add(this.onDisposed)}async dispose(){this.setupEvents(!1),this._fills.dispose(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.selection={};for(const e in this.events){const{onClear:t,onHighlight:i}=this.events[e];this.eventManager.list.delete(t),this.eventManager.list.delete(i)}this.onDisposed.trigger(so.uuid),this.eventManager.reset()}add(e,t){if(this.selection[e]||this.colors.has(e))throw new Error("A selection with that name already exists!");this.colors.set(e,t),this.selection[e]={};const i=new H,s=new H,n=new H;this.events[e]={onHighlight:i,onClear:n,onBeforeHighlight:s},this.eventManager.add([n,i,s])}remove(e){if(this.clear(e),delete this.selection[e],this.colors.delete(e),this.selection[e]||this.colors.has(e))throw new Error("A selection with that name already exists!");if(this.events[e]){const{onHighlight:t,onClear:i,onBeforeHighlight:s}=this.events[e];this.eventManager.remove([i,t,s]),delete this.events[e]}}async highlight(e,t=!0,i=this.zoomToSelection,s={}){if(!this.enabled)return null;if(!this.config.world)throw new Error("No world found in config!");const n=this.config.world;if(!this.selection[e])throw new Error(`Selection ${e} does not exist.`);const r=[],o=this.components.get(ue).meshes;for(const I of o)r.push(I);const a=this.components.get(Qi);for(const I of a.list){const E=I;if(E.edges){const C=E.edges.fillMeshes;for(const v of C)r.push(v)}}const h=this.components.get(pt).get(n).castRay(r);if(!h||!h.face)return this.clear(e),null;const c=h.object;if(!c.fragment&&c.userData.indexFragmentMap){if(h.faceIndex===void 0||!c.geometry.index)return null;const{userData:I}=c,E=I.indexFragmentMap.get(h.faceIndex);if(E){await this.highlightByID(e,E,t,i,s,c,!0);const C=Object.keys(E)[0];return{id:Array.from(E[C])[0],fragments:E}}return null}const u=c.geometry,d=h.instanceId;if(!u||d===void 0)return null;const f=c.fragment.getItemID(d);if(f===null)throw new Error("Item ID not found!");const m=c.fragment.group;if(!m)throw new Error("Fragment must belong to a FragmentsGroup!");const p=m.getFragmentMap([f]);return await this.highlightByID(e,p,t,i,s,void 0,!0),{id:f,fragments:p}}async highlightByID(e,t,i=!0,s=this.zoomToSelection,n={},r=void 0,o=!1){if(!this.enabled)return;this.events[e].onBeforeHighlight.trigger(this.selection[e]),i&&this.clear(e);const a=this.components.get(ue),h=this.colors.get(e);if(h===void 0)throw new Error("Color for selection not found!");const c={};for(const u in t){const d=t[u],f=n[u];for(const m of d)if(!(f&&f.has(m))){if(this.selectable[e]){const p=this.selectable[e];if(!p[u]||!p[u].has(m))continue}c[u]||(c[u]=new Set),c[u].add(m)}}for(const u in c){this.selection[e][u]||(this.selection[e][u]=new Set);const d=c[u],f=new Set,m=new Set;for(const I of d){const E=this.selection[e][u];o&&this.autoToggle.has(e)&&E.has(I)?(f.add(I),E.delete(I)):(E.add(I),m.add(I))}const p=a.list.get(u);if(p&&(f.size&&(this.backupColor?p.setColor(this.backupColor,f):p.resetColor(f)),m.size&&h!==null&&p.setColor(h,m),p.mesh.userData.fills&&h!==null))for(const I of p.mesh.userData.fills)this._fills.highlight(e,I,h,t)}this.events[e].onHighlight.trigger(this.selection[e]),r&&h!==null&&this._fills.highlight(e,r,h,t),s&&await this.zoomSelection(e)}clear(e,t){const i=e?[e]:Object.keys(this.selection);for(const s of i){this._fills.clear(s);const n=this.components.get(ue),r=this.selection[s];for(const o in r){const a=n.list.get(o);if(!a)continue;let h=r[o];if(h){if(t){const c=t[o];if(!c)continue;const u=new Set,d=new Set;for(const f of h)c.has(f)?u.add(f):d.add(f);h=u,d.size?r[o]=d:delete r[o]}this.backupColor?a.setColor(this.backupColor,h):a.resetColor(h)}}t||(this.selection[s]={}),this.events[s].onClear.trigger(null)}}setup(e){this.config={...this.config,...e},this.add(this.config.selectName,this.config.selectionColor),this.autoToggle.add(this.config.selectName),this.add(this.config.hoverName,this.config.hoverColor),this.setupEvents(!0),this.enabled=!0,this.isSetup=!0,this.onSetup.trigger(this)}updateFragments(e){for(const t of e)for(const i in this.selection){const s=this.selection[i][t.id],n=this.colors.get(i);s&&n&&t.setColor(n,s)}}async zoomSelection(e){if(!this.config.world)throw new Error("No world found in config!");const t=this.config.world;if(!t.camera.hasCameraControls())return;const i=this.components.get(Un),s=this.components.get(ue);i.reset();const n=this.selection[e];if(!Object.keys(n).length)return;for(const p in n){const I=s.list.get(p);if(!I)continue;const E=n[p];i.addMesh(I.mesh,E)}const r=i.getSphere(),o=1/0,a=-1/0,{x:h,y:c,z:u}=r.center,d=r.radius===o||h===o||c===o||u===o,f=r.radius===a||h===a||c===a||u===a,m=r.radius===0;d||f||m||(r.radius*=this.zoomFactor,await t.camera.controls.fitToSphere(r,!0))}setupEvents(e){if(!this.config.world){console.log("No world found while setting up events!");return}if(this.config.world.isDisposing)return;if(!this.config.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.config.world.renderer.three.domElement,i=this.events[this.config.selectName].onHighlight;i.remove(this.clearHover),i.remove(this.saveHighlightersBeforeSelect);const s=this.events[this.config.selectName].onClear;s.remove(this.restoreHighlightersAfterDeselect),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("pointermove",this.onMouseMove),e&&(i.add(this.clearHover),i.add(this.saveHighlightersBeforeSelect),s.add(this.restoreHighlightersAfterDeselect),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("pointermove",this.onMouseMove))}};w(sc,"uuid","cb8a76f2-654a-4b50-80c6-66fd83cafd77");let EI=sc;class nI extends de{constructor(){super(...arguments),w(this,"onDisposed",new H),w(this,"world")}get enabled(){return!this.world||this.world.isDisposing?!1:this.getRenderer().postproduction.customEffects.outlineEnabled}set enabled(e){if(!this.world||this.world.isDisposing)return;const t=this.getRenderer();t.postproduction.customEffects.outlineEnabled=e}create(e,t){const i=this.getRenderer();if(i.postproduction.customEffects.outlinedMeshes[e]!==void 0)throw new Error(`There's already a style with the name ${e}.`);i.postproduction.customEffects.outlinedMeshes[e]={material:t,meshes:new Set}}add(e,t){const i=this.getRenderer(),s=this.getStyles()[e];if(!s)throw new Error(`The style ${e} does not exist`);const n=i.postproduction.customEffects.outlineScene,r=this.components.get(ue);for(const o in t){const a=r.list.get(o);if(!a)continue;const h=t[o],c=a.clone(h);c.mesh.position.set(0,0,0),c.mesh.rotation.set(0,0,0),c.mesh.applyMatrix4(a.mesh.matrixWorld),c.mesh.instanceColor=null,c.mesh.material=[s.material],s.meshes.add(c.mesh),n.add(c.mesh)}}clear(e){if(e){this.clearStyle(e,!1);return}const t=this.getStyles(),i=Object.keys(t);for(const s of i)this.clearStyle(s,!1);this.world=void 0}dispose(){if(this.world&&!this.world.isDisposing){const e=this.getStyles(),t=Object.keys(e);for(const i of t)this.clearStyle(i,!0)}this.onDisposed.trigger(),this.onDisposed.reset()}clearStyle(e,t){const i=this.getStyles(),s=i[e];if(!s)return;const n=this.components.get(Pt);for(const r of s.meshes){const o=r;o.fragment&&o.fragment.dispose(!1),n.destroy(r)}s.meshes.clear(),t&&(s.material.dispose(),delete i[e])}getStyles(){return this.getRenderer().postproduction.customEffects.outlinedMeshes}getRenderer(){if(!this.world)throw new Error("You must set a world to use the outliner!");const e=this.world.renderer;if(!e.postproduction)throw new Error("The world given to the outliner must use the postproduction renderer.");return e}}w(nI,"uuid","2fd3bcc5-b3b6-4ded-9f64-f47a02854a10");class Dt extends de{constructor(){super(...arguments),w(this,"enabled",!1),w(this,"onDisposed",new H),w(this,"onNavigated",new H),w(this,"onExited",new H),w(this,"planeType","section"),w(this,"offset",100),w(this,"list",new Map),w(this,"world"),w(this,"current",null),w(this,"cached3DCamera",{position:new L,target:new L,projection:"Perspective",zoom:1,top:10,bottom:-10,right:10,left:-10})}create(e){const t=this.getWorld(),{id:i,point:s,normal:n,type:r}=e;let{name:o,offset:a}=e;const h=this.components.get(Qi),c=h.Type;h.Type=zn;const u=h.createFromNormalAndCoplanarPoint(t,n,s);u.visible=!1,u.edges.visible=!1,u.enabled=!1,o=o||i,a=a||this.offset,u.type=r||this.planeType,u.updateFill();const d=n.clone().multiplyScalar(-a).add(s),f=s.clone(),m={id:i,name:o,plane:u,offset:a,cached:{position:d,target:f,zoom:1,size:10}};return this.list.set(i,m),h.Type=c,m}delete(e){const t=this.list.get(e);t&&(t.plane.dispose(),this.list.delete(e))}async goTo(e,t=!1){var i;const s=this.getCamera();if(((i=this.current)==null?void 0:i.id)===e)return;const n=this.list.get(e);if(!n)throw new Error(`There's no section with the ID: ${e}.`);this.cacheCameraPosition(),await this.hidePreviousClippingPlane(),await s.projection.set("Orthographic"),this.current=n;const r=new L,o=new L,{cached:a}=n,{position:h,target:c}=a;r.copy(c),o.copy(h),await s.controls.setLookAt(o.x,o.y,o.z,r.x,r.y,r.z,t);const u=n.cached.size,d=s.threePersp.aspect;s.threeOrtho.top=u,s.threeOrtho.bottom=-u,s.threeOrtho.left=-u*d,s.threeOrtho.right=u*d,s.threeOrtho.updateProjectionMatrix(),await s.controls.zoomTo(a.zoom,!1),s.set("Plan"),this.current.plane&&(this.current.plane.enabled=!0,this.current.plane.edges.fillNeedsUpdate=!0,this.current.plane.edges.visible=!0),this.enabled=!0,this.onNavigated.trigger({id:e})}async exit(e=!1){if(!this.enabled||!this.world)return;this.cacheCameraPosition();const t=this.getCamera();t.set("Orbit");const{position:i,target:s,projection:n}=this.cached3DCamera;await t.projection.set(n),this.current&&(this.current.plane.enabled=!1,this.current.plane.edges.enabled=!1,this.current.plane.edges.visible=!1),this.current=null;const{x:r,y:o,z:a}=i,{x:h,y:c,z:u}=s;await t.controls.setLookAt(r,o,a,h,c,u,e),t.projection.current==="Orthographic"&&(await t.controls.zoomTo(this.cached3DCamera.zoom,!1),t.threeOrtho.left=this.cached3DCamera.left,t.threeOrtho.right=this.cached3DCamera.right,t.threeOrtho.top=this.cached3DCamera.top,t.threeOrtho.bottom=this.cached3DCamera.bottom),this.enabled=!1,this.onExited.trigger()}dispose(){for(const[,{plane:e}]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}getWorld(){if(!this.world)throw new Error("World is needed to create sections!");return this.world}getCamera(){const e=this.getWorld().camera;if(!e.hasCameraControls()||!e.projection)throw new Error("The world given to sections must have an OrthoPerspective camera.");return e}cacheCameraPosition(){if(!this.world)throw new Error("World is needed to create clipping planes!");const e=this.getCamera();if(this.enabled){if(!this.current)throw new Error("Current section not found!");const{cached:t}=this.current,{position:i,target:s}=t;e.controls.getPosition(i),e.controls.getTarget(s),t.zoom=e.threeOrtho.zoom,t.size=e.threeOrtho.top}else{e.three.getWorldPosition(this.cached3DCamera.position),e.controls.getTarget(this.cached3DCamera.target),this.cached3DCamera.projection=e.projection.current,this.cached3DCamera.zoom=e.threeOrtho.zoom;const{top:t,bottom:i,left:s,right:n}=e.threeOrtho;this.cached3DCamera.top=t,this.cached3DCamera.bottom=i,this.cached3DCamera.left=s,this.cached3DCamera.right=n}}async hidePreviousClippingPlane(){if(this.current){const e=this.current.plane;e&&(e.enabled=!1),this.current.plane.edges.visible=!1}}}w(Dt,"uuid","45b41ba3-7bb8-4e08-909f-e0fa87973965");const nc=class rc extends de{constructor(e){super(e),w(this,"onDisposed",new H),w(this,"planeType","floorplan"),w(this,"onNavigated",new H),w(this,"onExited",new H),w(this,"enabled",!1),w(this,"currentPlan",null),w(this,"offset",1.5),w(this,"list",[]),w(this,"_cachedPlanCamera",null),this.components.add(rc.uuid,this)}get world(){return this.components.get(Dt).world}set world(e){const t=this.components.get(Dt);t.world=e}get defaultCameraOffset(){return this.components.get(Dt).offset}set defaultCameraOffset(e){const t=this.components.get(Dt);t.offset=e}dispose(){this.onExited.reset(),this.onNavigated.reset();const e=this.components.get(Dt);for(const t of this.list)e.delete(t.id);this.list=[],this.onDisposed.trigger(),this.onDisposed.reset()}async generate(e){if(!e.hasProperties)throw new Error("Properties are needed to compute plan views!");const t=await e.getAllPropertiesOfType(Hn);if(!t)throw new Error("Floorplans not found!");const i=e.coordinationMatrix.elements[13],s=await mi.getUnits(e);for(const n of Object.values(t)){const r={value:0};this.getAbsoluteFloorHeight(n.ObjectPlacement,r);const o=r.value*s+i+this.offset;this.create({name:n.Name.value,id:n.GlobalId.value,normal:new L(0,-1,0),point:new L(0,o,0)})}}create(e){const t=this.components.get(Dt);e.type=e.type||this.planeType;const i={...t.create(e),planOffset:this.offset};this.list.push(i)}async goTo(e,t=!1){this.enabled&&this.cachePlanCamera(),await this.components.get(Dt).goTo(e,t),await this.applyCachedPlanCamera();const i=this.list.find(s=>s.id===e);i&&(this.currentPlan=i),this.enabled=!0}async exitPlanView(e=!1){this.enabled&&(this.cachePlanCamera(),await this.components.get(Dt).exit(e),this.currentPlan=null,this.enabled=!1,this.onExited.trigger())}cachePlanCamera(){var e;const t=(e=this.world)==null?void 0:e.camera,i=new L,s=new L;t.controls.getTarget(i),t.controls.getPosition(s),this._cachedPlanCamera={target:i,position:s,zoom:t.threeOrtho.zoom,top:t.threeOrtho.top,right:t.threeOrtho.right,bottom:t.threeOrtho.bottom,left:t.threeOrtho.left}}async applyCachedPlanCamera(){var e;if(!this._cachedPlanCamera)return;const t=(e=this.world)==null?void 0:e.camera,{position:i,target:s}=this._cachedPlanCamera,n=new L,r=new L;t.controls.getPosition(n),t.controls.getTarget(r);const o=n.y,a=r.y;await t.controls.setLookAt(i.x,o,i.z,s.x,a,s.z),await t.controls.zoomTo(this._cachedPlanCamera.zoom),t.threeOrtho.top=this._cachedPlanCamera.top,t.threeOrtho.bottom=this._cachedPlanCamera.bottom,t.threeOrtho.left=this._cachedPlanCamera.left,t.threeOrtho.right=this._cachedPlanCamera.right,t.threeOrtho.updateProjectionMatrix()}getAbsoluteFloorHeight(e,t){const i=e.RelativePlacement.Location.Coordinates;t.value+=i[2].value,e.PlacementRelTo&&this.getAbsoluteFloorHeight(e.PlacementRelTo,t)}};w(nc,"uuid","a80874aa-1c93-43a4-80f2-df346da086b1");let gI=nc;export{hI as A,zn as C,cI as F,EI as L,gI as M,mI as N,fI as O,pI as P,lI as S,oI as T,Jr as W,lm as X,Dt as a,II as b,hi as c,Rs as i,nI as k,dI as v,uI as w,Rn as x,aI as y}; + `,n=r=>{window.removeEventListener(this._createEventID,n);const o=r.detail,a=this.components.get(o);i.remove(),t(a)};i.addEventListener("load",()=>{window.addEventListener(this._createEventID,n),window.dispatchEvent(new Event(this._requestEventID))}),i.src=URL.createObjectURL(new File([s],"temp.js")),document.head.appendChild(i)})}};y(Jp,"uuid","74c0c370-1af8-4ca9-900a-4a4196c0f2f5");const $p=["Station","Radius","Length","InitialKP","FinalKP","KP","Slope","Height","InitialKPV","FinalKPV"],fc=class pc extends de{constructor(e){super(e),y(this,"enabled",!0),y(this,"world",null),y(this,"_markerKey",0),y(this,"_list",new Map),y(this,"type","horizontal"),y(this,"divisionLength",100),e.add(pc.uuid,this)}addKPStation(e,t,i){const s=this.components.get(ai),n=document.createElement("div"),r=document.createElement("div");n.appendChild(r),r.innerHTML=t,r.style.color=s.color,r.style.borderBottom="1px dotted white",r.style.width="160px",r.style.textAlign="left";const o=new qe(e,n),a=new x;a.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),a.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),a.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);const l=new x;l.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-2),l.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-2),l.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-2);const h=new x;h.x=(a.x+l.x)/2,h.y=(a.y+l.y)/2,h.z=(a.z+l.z)/2,o.three.position.copy(h);const d=new x;d.subVectors(a,l).normalize();const u=new at;u.setFromUnitVectors(new x(0,1,0),d);const f=new za().setFromQuaternion(u).z,m=Ii.radToDeg(f);r.style.transform=`rotate(${-m-90}deg) translate(-35%, -50%)`;const p=this._markerKey.toString();s.setupEvents(e,!0),s.getWorldMarkerList(e).set(p,{label:o,key:p,merged:!1,static:!1}),this._markerKey++,this.save(p,"KP")}addVerticalMarker(e,t,i,s,n){const r=this.components.get(ai),o=document.createElement("span");o.innerHTML=t,o.style.color=r.color;const a=new qe(e,o,n);if(s==="Height"){const h=document.createElement("span");h.innerHTML=t,h.style.color=r.color;const{position:d}=i.geometry.attributes,u=(d.array.length/3-1)*3,f=d.array.slice(u,u+3);a.three.position.set(f[0],f[1]+10,f[2])}else if(s==="InitialKPV"){const{position:h}=i.geometry.attributes,d=h.getX(0),u=h.getY(0),f=h.getZ(0);a.three.position.set(d-20,u,f)}else if(s==="FinalKPV"){const{position:h}=i.geometry.attributes,d=h.getX(i.geometry.attributes.position.count-1),u=h.getY(i.geometry.attributes.position.count-1),f=h.getZ(i.geometry.attributes.position.count-1);a.three.position.set(d+20,u,f)}else if(s==="Slope"){o.style.color="grey";const{position:h}=i.geometry.attributes,d=new x;d.x=h.getX(0),d.y=h.getY(0),d.z=h.getZ(0);const u=new x;u.x=h.getX(h.count-1),u.y=h.getY(h.count-1),u.z=h.getZ(h.count-1);const f=new x;f.addVectors(d,u).multiplyScalar(.5),a.three.position.set(f.x,f.y-10,f.z)}const l=this._markerKey.toString();return r.setupEvents(e,!0),r.getWorldMarkerList(e).set(l,{label:a,key:l,type:s,merged:!1,static:!1}),this._markerKey++,this.save(l,s),a}addCivilMarker(e,t,i,s){const n=this.components.get(ai),r=document.createElement("span");r.innerHTML=t,r.style.color=n.color;const o=new qe(e,r);if(s==="InitialKP"){const l=i.geometry.attributes.position.getX(0),h=i.geometry.attributes.position.getY(0),d=i.geometry.attributes.position.getZ(0);o.three.position.set(l+2,h+2,d)}else if(s==="FinalKP"){const l=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),h=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),d=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);o.three.position.set(l+2,h-2,d)}else if(s==="Length"){const l=new x;l.x=i.geometry.attributes.position.getX(0),l.y=i.geometry.attributes.position.getY(0),l.z=i.geometry.attributes.position.getZ(0);const h=new x;h.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),h.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),h.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);const d=l.distanceTo(h);o.three.element.innerText=d.toFixed(2);const u=h.clone().add(l).divideScalar(2);o.three.position.copy(u)}const a=this._markerKey.toString();return n.setupEvents(e,!0),n.getWorldMarkerList(e).set(a,{label:o,key:a,type:s,merged:!1,static:!1}),this._markerKey++,this.save(a,s),o}showKPStations(e){if(!this.world)throw new Error("A world is needed for this component to work!");if(this.type==="horizontal"){const t=this.generateStartAndEndKP(e);for(const[,s]of t)this.addKPStation(this.world,s.value,s.normal);const i=this.generateConstantKP(e);for(const[,s]of i)this.addKPStation(this.world,s.value,s.normal)}}showCurveLength(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=e.length,n=`${t.toFixed(2)} m`,r=Math.round(s/2),o=e[r],a=i.create(this.world,n,o,!0);a!==void 0&&this.save(a,"Radius")}showLineLength(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=new x;s.x=e.geometry.getAttribute("position").getX(0),s.y=e.geometry.getAttribute("position").getY(0),s.z=e.geometry.getAttribute("position").getZ(0);const n=new x;n.x=e.geometry.getAttribute("position").getX(1),n.y=e.geometry.getAttribute("position").getY(1),n.z=e.geometry.getAttribute("position").getZ(1);const r=`${t.toFixed(2)} m`,o=new x;o.addVectors(s,n).multiplyScalar(.5);const a=i.create(this.world,r,o,!0);a!==void 0&&this.save(a,"Radius")}showCurveRadius(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=new x;s.x=e.geometry.getAttribute("position").getX(0),s.y=e.geometry.getAttribute("position").getY(0),s.z=e.geometry.getAttribute("position").getZ(0);const n=new x;n.x=e.geometry.getAttribute("position").getX(1),n.y=e.geometry.getAttribute("position").getY(1),n.z=e.geometry.getAttribute("position").getZ(1);const r=`R = ${t.toFixed(2)} m`,o=new x;o.addVectors(s,n).multiplyScalar(.5);const a=i.create(this.world,r,o,!0);a!==void 0&&this.save(a,"Radius")}deleteByType(e=$p){const t=this.components.get(ai);for(const i of e){const s=this._list.get(i);if(s){for(const n of s)t.delete(n);this._list.delete(i)}}}generateStartAndEndKP(e){const{alignment:t}=e.curve,i=new Map;for(const s of t.horizontal){const n=s.getLength();if(i.size>0){const r=s.index-1,o=i.get(r).distance+n,a=s.mesh.geometry.getAttribute("position"),l=a.count-1,h=new x;h.x=a.getX(l),h.y=a.getY(l),h.z=a.getZ(l);const d=this.createNormalLine(s.mesh);i.set(s.index,{value:this.getShortendKPValue(o),distance:o,point:h,normal:d})}else{const r=s.mesh.geometry.getAttribute("position"),o=r.count-1,a=new x;a.x=r.getX(o),a.y=r.getY(o),a.z=r.getZ(o);const l=this.createNormalLine(s.mesh);i.set(s.index,{value:this.getShortendKPValue(n),distance:n,point:a,normal:l})}}return i}createNormalLine(e){const t=e.geometry.attributes.position.count-1,i=t-1,s=new x;s.x=e.geometry.attributes.position.getX(t),s.y=e.geometry.attributes.position.getY(t),s.z=e.geometry.attributes.position.getZ(t);const n=new x;n.x=e.geometry.attributes.position.getX(i),n.y=e.geometry.attributes.position.getY(i),n.z=e.geometry.attributes.position.getZ(i);const r=new x().subVectors(s,n).clone().applyAxisAngle(new x(0,0,1),Math.PI*.5).normalize(),o=new Ce().setFromPoints([r.clone().setLength(10).add(s),r.clone().setLength(-10).add(s)]);return new Le(o)}generateConstantKP(e){const{alignment:t}=e.curve,i=new Map,s=t.getLength("horizontal"),n=Math.floor(s/this.divisionLength);for(let r=0;r1e3&&parseInt(i,10)<1e4){const[r,...o]=i;return`${r}+${o.join("")}.${n}`}if(parseInt(i,10)>1e4){const[r,o,...a]=i;return`${r}${o}+${a.join("")}.${n}`}return`0+${i.padStart(3,"0")}.${n}`}save(e,t){this._list.has(t)||this._list.set(t,new Set),this._list.get(t).add(e)}};y(fc,"uuid","0af12c32-81ee-4100-a030-e9ae546f6170");let Ss=fc;class mc extends de{constructor(e){super(e),y(this,"onHighlight",new Y),y(this,"onMarkerChange",new Y),y(this,"onMarkerHidden",new Y),y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"mouseMarkers"),y(this,"_curves",[]),y(this,"_previousAlignment",null),y(this,"_highlighter"),y(this,"_world",null),y(this,"updateLinesResolution",t=>{var i;(i=this._highlighter)==null||i.setResolution(t)}),y(this,"onMouseMove",t=>{var i,s,n;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const r=this._world.renderer.three.domElement.parentElement,o=this._world.camera.three,a=(i=this._highlighter)==null?void 0:i.castRay(t,o,r,this._curves);if(a){const{object:l}=a;(s=this._highlighter)==null||s.hover(l),this.updateMarker(a,"hover");return}this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),(n=this._highlighter)==null||n.unHover(),this.onMarkerHidden.trigger({type:"hover"})}),y(this,"onClick",t=>{var i,s;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const n=this._world.renderer.three.domElement.parentElement,r=this._world.camera.three,o=(i=this._highlighter)==null?void 0:i.castRay(t,r,n,this._curves);if(o){const a=o,l=a.object;if((s=this._highlighter)==null||s.select(l),this.updateMarker(a,"select"),this._world.camera.hasCameraControls()&&(l.geometry.boundingBox||l.geometry.computeBoundingBox(),l.geometry.boundingBox)){const h=this.getScaledBox(l.geometry.boundingBox,2);this._world.camera.controls.fitToBox(h,!0)}this.onHighlight.trigger({mesh:l,point:a.point}),this._previousAlignment!==l.curve.alignment&&(this.components.get(Ss).showKPStations(l),this._previousAlignment=l.curve.alignment)}}),y(this,"onControlsUpdated",()=>{if(!this._world)throw new Error("No world was given for this navigator!");if(!(this._world.camera.three instanceof ti)||!this._highlighter)return;const{zoom:t,left:i,right:s,top:n,bottom:r}=this._world.camera.three,o=i-s,a=n-r,l=Math.max(o,a)/t,h=40,{caster:d}=this._highlighter;d.params.Line.threshold=l/h})}get highlighter(){if(!this._highlighter)throw new Error("Highlighter not initialized. You must set a world first!");return this._highlighter}get world(){return this._world}set world(e){var t,i,s;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(t=this._highlighter)==null||t.dispose(),(i=this.mouseMarkers)==null||i.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!e))return;const n=e.scene.three;this._highlighter=new $l(n,this.view),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}async draw(e,t){if(!e.civilData)throw new Error("The provided model doesn't have civil data!");if(!this._world)throw new Error("No world was given for this navigator!");const{alignments:i}=e.civilData,s=t||i.values(),n=this._world.scene.three,r=new ye;r.makeEmpty(),r.min.set(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r.max.set(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(const a of s){if(!a)throw new Error("Alignment not found!");for(const l of a[this.view])if(n.add(l.mesh),this._curves.push(l.mesh),!r.isEmpty())r.expandByObject(l.mesh);else{l.mesh.geometry.computeBoundingBox();const h=l.mesh.geometry.boundingBox;h instanceof ye&&r.copy(h).applyMatrix4(l.mesh.matrixWorld)}}const o=this.getScaledBox(r,1.2);this._world.camera.hasCameraControls()&&await this._world.camera.controls.fitToBox(o,!1)}async dispose(){var e;(e=this._highlighter)==null||e.dispose(),this.clear(),this.onHighlight.reset(),this._curves=[],this.onDisposed.trigger(),this.onDisposed.reset()}clear(){var e,t;(e=this._highlighter)==null||e.unSelect(),(t=this._highlighter)==null||t.unHover();for(const i of this._curves)i.removeFromParent();this._curves=[]}setMarker(e,t,i){if(!this._curves.length)return;const s=e.getCurveAt(t,this.view),n=e.getPointAt(t,this.view),{index:r}=s.curve.getSegmentAt(s.percentage);this.setMouseMarker(n,s.curve.mesh,r,i)}setDefSegments(e){const t=[],i=[],s=(n,r)=>{const o=r[1]-n[1],a=r[0]-n[0];return o/a};for(let n=0;n=0;u--)if(r[u*3]!==void 0&&r[u*3+1]!==void 0){l=r[u*3],h=r[u*3+1];break}const d=(s([o,a],[l,h])*100).toFixed(2);i.push({slope:d})}for(const n of e)for(let r=0;rs.clone().add(i))}showLineInfo(e,t){const i=this.components.get(Ss);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.geometry.attributes.position.array,n=this.calculateParallelCurve(s,s.length/3,t),r=new Ce().setFromPoints(n),o=new Le(r,this.markupMaterial);i.showLineLength(o,e.curve.getLength()),this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:a,endDimensionPoints:l}=this.calculateDimensionLines(e,o),h=this.offsetDimensionLine(a,t*.1),d=this.offsetDimensionLine(l,t*.1),u=new Ce().setFromPoints(h),f=new Ce().setFromPoints(d),m=new Le(u,this.markupMaterial);this._scene.add(m),this.markupLines.push(m);const p=new Le(f,this.markupMaterial);this._scene.add(p),this.markupLines.push(p)}showClothoidInfo(e,t){const i=this.components.get(Ss);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.geometry.attributes.position.array,n=this.calculateParallelCurve(s,s.length/3,t),r=new Ce().setFromPoints(n);i.showCurveLength(n,e.curve.getLength());const o=new Le(r,this.markupMaterial);this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:a,endDimensionPoints:l}=this.calculateDimensionLines(e,o),h=this.offsetDimensionLine(a,t*.1),d=this.offsetDimensionLine(l,t*.1),u=new Ce().setFromPoints(h),f=new Ce().setFromPoints(d),m=new Le(u,this.markupMaterial);this._scene.add(m),this.markupLines.push(m);const p=new Le(f,this.markupMaterial);this._scene.add(p),this.markupLines.push(p)}showCircularArcInfo(e,t){const i=this.components.get(Ss);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.curve.data.RADIUS,n=e.geometry.attributes.position.array,r=e.geometry.attributes.position.count,o=[],a=new x(n[0],n[1],n[2]),l=(r-1)*3,h=new x(n[l],n[l+1],n[l+2]),d=r/2*3,u=new x(n[d],n[d+1],n[d+2]),f=h.clone().sub(a).normalize(),m=new x(-f.y,f.x,0);m.multiplyScalar(s);const p=u.clone().add(m);o.push(u),o.push(p);const E=new Ce().setFromPoints(o),I=new Le(E,this.markupMaterial);i.showCurveRadius(I,Math.abs(s)),this._scene.add(I),this.markupLines.push(I);const g=[];for(let L=0;L{!this._highlighter||!this.planHighlighter||this.planHighlighter.showCurveInfo(t)})}get world(){return super.world}set world(e){var t;super.world=e,e&&((t=this.planHighlighter)==null||t.dispose(),this.planHighlighter=new em(this.components,e.scene.three,e))}};y(Ic,"uuid","3096dea0-5bc2-41c7-abce-9089b6c9431b");let lm=Ic;const gc=class Cc extends mc{constructor(e){super(e),y(this,"enabled",!0),y(this,"view","vertical"),this.components.add(Cc.uuid,this)}get world(){return super.world}set world(e){this.world!==e&&(super.world=e,this._highlighter&&this._highlighter.onSelect.add(t=>{if(!this.world)throw new Error("A world is needed to work with this component!");const i=this.components.get(Ss);i.deleteByType(["Slope","Height","InitialKPV","FinalKPV"]);const{alignment:s}=t.curve,n=[];for(const l of s.vertical){const h=l.mesh.geometry.attributes.position.array;n.push(h)}const{defSegments:r,slope:o}=this.setDefSegments(n),a=this.world.scene.three;for(let l=0;l{var i;(i=this.highlighter)==null||i.setResolution(t)}),y(this,"onClick",t=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const i=this.world.renderer.three.domElement,s=this.world.camera.three,n=this._highlighter.castRay(t,s,i,this._curves);if(n){const r=n.object;this._highlighter.select(r),this.updateMarker(n,"select");const{point:o,index:a}=n;a!==void 0&&this.onHighlight.trigger({curve:r,point:o,index:a});return}this._highlighter.unSelect(),this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),this.onMarkerHidden.trigger({type:"hover"})}),y(this,"onMouseMove",async t=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const i=this.world.renderer.three.domElement,s=this.world.camera.three,n=this._highlighter.castRay(t,s,i,this._curves);if(n){this._highlighter.hover(n.object),this.updateMarker(n,"hover");return}this._highlighter.unHover()}),this.components.add(Rc.uuid,this)}get world(){return this._world}set world(e){var t,i,s;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(t=this._highlighter)==null||t.dispose(),(i=this.mouseMarkers)==null||i.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!e))return;const n=e.scene.three;this._highlighter=new $l(n,"absolute"),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}get highlighter(){if(!this._highlighter)throw new Error("Navigator not initialized!");return this._highlighter}draw(e){if(!e.civilData)throw new Error("Model must have civil data!");if(!this.world)throw new Error("A world must be given before drawing an alignment!");const t=this.world.scene.three;for(const[i,s]of e.civilData.alignments)for(const{mesh:n}of s.absolute)t.add(n),this._curves.push(n)}setMarker(e,t,i){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const s=e.getPointAt(t,"absolute");this.mouseMarkers[i].visible=!0,this.mouseMarkers[i].three.position.copy(s)}hideMarker(e){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const t=this.mouseMarkers[e].three;t.visible=!1}newMouseMarker(e,t){const i=t.scene.three,s=document.createElement("div");s.style.backgroundColor=e,s.style.width="1rem",s.style.height="1rem",s.style.borderRadius="1rem";const n=new qe(t,s,i);return n.visible=!1,n}setupEvents(e){var t,i;if(!this.world)throw new Error("No world found!");if(this.world.isDisposing||!this.world.renderer)return;const s=this.world.renderer.three.domElement;(t=this.world.renderer)==null||t.onResize.remove(this.updateLinesResolution),s.removeEventListener("click",this.onClick),s.removeEventListener("pointermove",this.onMouseMove),e&&(s.addEventListener("click",this.onClick),s.addEventListener("pointermove",this.onMouseMove),(i=this.world.renderer)==null||i.onResize.add(this.updateLinesResolution))}updateMarker(e,t){if(!this.mouseMarkers)return;const{point:i,object:s}=e,n=s,r=n.curve,o=n.curve.alignment,a=o.getPercentageAt(i,"absolute");this.mouseMarkers[t].visible=!0,this.mouseMarkers[t].three.position.copy(i),a!==null&&this.onMarkerChange.trigger({alignment:o,percentage:a,type:t,curve:r})}};y(Tc,"uuid","0a59c09e-2b49-474a-9320-99f51f40f182");let hm=Tc;const Sc=class wc extends de{constructor(e){super(e),y(this,"enabled",!0),y(this,"world",null),y(this,"plane"),y(this,"_world3D",null),this.components.add(wc.uuid,this)}get world3D(){return this._world3D}set world3D(e){var t;if(this._world3D=e,(t=this.plane)==null||t.dispose(),!e)return;const i=this.components.get(Xi),s=i.Type;i.Type=Pn,this.plane=i.createFromNormalAndCoplanarPoint(e,new x(1,0,0),new x),i.Type=s,this.plane.visible=!1,this.plane.enabled=!1}async set(e,t){if(!this.world||!this.plane)throw new Error("You must set a world before using this component");this.plane.enabled=!0;const i=e.curve.getPercentageAt(t);if(i===null)return;const{startPoint:s,endPoint:n}=e.curve.getSegmentAt(i);if(e.geometry.index===null)throw new Error("Geometry must be indexed!");const r=new x;r.subVectors(n,s),r.normalize(),this.plane.setFromNormalAndCoplanarPoint(r,t),this.plane.edges.update();const o=this.plane.helper.matrix.clone();o.invert();const a=this.world.scene.three,l=this.plane.edges.get();for(const h in l){const{mesh:d}=l[h];d.position.set(0,0,0),d.rotation.set(0,0,0),d.updateMatrix(),d.applyMatrix4(o),d.parent!==a&&a.add(d)}this.plane.enabled=!1}};y(Sc,"uuid","96b2c87e-d90b-4639-8257-8f01136fe324");let dm=Sc;function ei(){const c=document.createElement("div");return c.style.backgroundColor="black",c.style.color="white",c.style.padding="8px",c.style.borderRadius="8px",c.style.fontFamily="sans-serif",c}const Tn=class Rn{constructor(e,t,i){y(this,"label"),y(this,"boundingBox",new ee),y(this,"world"),y(this,"components"),y(this,"_length"),y(this,"_visible",!0),y(this,"_start"),y(this,"_end"),y(this,"_root",new yn),y(this,"_endpoints",[]),y(this,"_line"),this.components=e,this.world=t,this._start=i.start,this._end=i.end,this._length=this.getLength(),this._line=this.createLine(i),this.newEndpointElement(i.endpointElement),this.newEndpointElement(i.endpointElement.cloneNode(!0)),this.label=this.newText(),this._root.renderOrder=2,this.world.scene.three.add(this._root)}get visible(){return this._visible}set visible(e){this._visible=e,this.label.visible=e,this._endpoints[0].visible=e,this._endpoints[1].visible=e;const[t,i]=this._endpoints,s=t.three,n=i.three,r=this.label.three;e?(this.world.scene.three.add(this._root),this._root.add(r,s,n)):(r.removeFromParent(),s.removeFromParent(),n.removeFromParent(),this._root.removeFromParent())}get endPoint(){return this._end}set endPoint(e){this._end=e;const t=this._line.geometry.attributes.position;t.setXYZ(1,e.x,e.y,e.z),t.needsUpdate=!0,this._endpoints[1].three.position.copy(e),this.updateLabel()}get startPoint(){return this._start}set startPoint(e){this._start=e;const t=this._line.geometry.attributes.position;t.setXYZ(0,e.x,e.y,e.z),t.needsUpdate=!0,this._endpoints[0].three.position.copy(e),this.updateLabel()}get _center(){let e=this._end.clone().sub(this._start);const t=e.length()*.5;return e=e.normalize().multiplyScalar(t),this._start.clone().add(e)}dispose(){const e=this.components.get(Nt);this.visible=!1,e.destroy(this._root),e.destroy(this._line);for(const t of this._endpoints)t.dispose();this._endpoints.length=0,this.label.dispose(),this.boundingBox&&e.destroy(this.boundingBox),this.components=null}createBoundingBox(){this.boundingBox.geometry=new Be(1,1,this._length),this.boundingBox.position.copy(this._center),this.boundingBox.lookAt(this._end),this.boundingBox.visible=!1,this._root.add(this.boundingBox)}toggleLabel(){this.label.toggleVisibility()}newEndpointElement(e){const t=this._endpoints.length===0?this._start:this._end,i=new qe(this.world,e);i.three.position.copy(t),this._endpoints.push(i),this._root.add(i.three)}updateLabel(){this._length=this.getLength(),this.label.three.element.textContent=this.getTextContent(),this.label.three.position.copy(this._center),this._line.computeLineDistances()}createLine(e){const t=new Ce;t.setFromPoints([e.start,e.end]);const i=new Le(t,e.lineMaterial);return this._root.add(i),i}newText(){const e=ei();e.textContent=this.getTextContent();const t=new qe(this.world,e);return t.three.position.copy(this._center),this._root.add(t.three),t}getTextContent(){return`${(this._length/Rn.scale).toFixed(Rn.rounding)} ${Rn.units}`}getLength(){return this._start.distanceTo(this._end)}};y(Tn,"scale",1),y(Tn,"units","m"),y(Tn,"rounding",2);let Co=Tn;class tm{constructor(e,t,i){y(this,"enabled",!0),y(this,"points",[]),y(this,"workingPlane",null),y(this,"labelMarker"),y(this,"world"),y(this,"components"),y(this,"onDisposed",new Y),y(this,"onAreaComputed",new Y),y(this,"onWorkingPlaneComputed",new Y),y(this,"onPointAdded",new Y),y(this,"onPointRemoved",new Y),y(this,"_visible",!0),y(this,"_rotationMatrix",null),y(this,"_dimensionLines",[]),y(this,"_defaultLineMaterial",new si({color:"red"})),this.world=t,this.components=e;const s=ei();this.labelMarker=new qe(t,s),this.labelMarker.visible=!1,this.onPointAdded.add(n=>{this.points.length===3&&!this._dimensionLines[2]&&(this.addDimensionLine(n,this.points[0]),this.labelMarker.visible=!0)}),i==null||i.forEach(n=>this.setPoint(n))}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this._dimensionLines)t.visible=e,t.label.visible=!1;this.labelMarker.visible=e}setPoint(e,t){let i;if(t?i=t:i=this.points.length===0?0:this.points.length,i===0){this.points[0]=e;return}if(i<0||i>this.points.length)return;const s=this.points.length>i;this.points[i]=e,this.onPointAdded.trigger(e),s||this.addDimensionLine(this.points[i-1],e);const{previousLine:n,nextLine:r}=this.getLinesBetweenIndex(i);n&&(n.endPoint=e),r&&(r.startPoint=e)}removePoint(e){if(this.points.length===3)return;this.points.splice(e,1);const{previousLine:t,nextLine:i}=this.getLinesBetweenIndex(e);i&&(t.endPoint=i.endPoint),i==null||i.dispose(),this._dimensionLines.splice(e,1),this.onPointRemoved.trigger()}toggleLabel(){this.labelMarker.toggleVisibility()}addDimensionLine(e,t){const i=new Co(this.components,this.world,{start:e,end:t,lineMaterial:this._defaultLineMaterial,endpointElement:ei()});return i.toggleLabel(),this._dimensionLines.length>1?this._dimensionLines.splice(this._dimensionLines.length-1,0,i):this._dimensionLines.push(i),i}getLinesBetweenIndex(e){const t=e===0?this._dimensionLines.length-1:e-1,i=this._dimensionLines[t],s=this._dimensionLines[e];return{previousLine:i,nextLine:s}}computeWorkingPlane(){this.workingPlane=new ii().setFromCoplanarPoints(this.points[0],this.points[1],this.points[2]);const e=new x(0,1,0),t=this.workingPlane.normal.angleTo(e),i=new x().crossVectors(this.workingPlane.normal,e).normalize();this._rotationMatrix=new ne().makeRotationAxis(i,t),this.onWorkingPlaneComputed.trigger(this.workingPlane)}computeArea(){if(!(this._rotationMatrix&&this.workingPlane))return this.onAreaComputed.trigger(0),0;let e=0,t=0;const i=this._rotationMatrix,s=this.points.map(r=>{const o=r.clone().applyMatrix4(i),a=new Se(o.x,o.z);return e+=a.x,t+=a.y,a}),n=Math.abs(mh.area(s));return this.labelMarker.three.element.textContent=`${n.toFixed(2)} m²`,this.labelMarker.three.position.set(e/s.length,-this.workingPlane.constant,t/s.length).applyMatrix4(i.clone().invert()),this.onAreaComputed.trigger(n),n}dispose(){this.onAreaComputed.reset(),this.onWorkingPlaneComputed.reset(),this.onPointAdded.reset(),this.onPointRemoved.reset();for(const e of this._dimensionLines)e.dispose();this.labelMarker.dispose(),this._dimensionLines=[],this.points=[],this._rotationMatrix=null,this.workingPlane=null,this._defaultLineMaterial.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return{points:this.points,workingPlane:this.workingPlane,area:this.computeArea()}}}class To extends Zd{constructor(e,t){super(e,t),y(this,"onDisposed",new Y),y(this,"marker",null),y(this,"_className","default-vertex-picker"),this.onEnabled.add(i=>{this.marker&&(this.marker.visible=i)})}get className(){return this._className}set className(e){this._className=e,this.marker&&(this.marker.three.element.className=e)}dispose(){this.marker&&this.marker.dispose(),super.dispose()}get(e){const t=super.get(e);return t?(this.marker||(this.marker=new qe(e),this.marker.three.element.className=this._className),this.marker.world!==e&&(this.marker.world=e,this.marker.three.removeFromParent(),e.scene.three.add(this.marker.three)),this.marker.visible=!0,this.marker.three.position.copy(t)):this.marker&&(this.marker.visible=!1),t}}const vc=class zr extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"list",[]),y(this,"world"),y(this,"_enabled",!1),y(this,"_visible",!0),y(this,"_vertexPicker"),y(this,"_currentAreaElement",null),y(this,"_clickCount",0),y(this,"create",()=>{if(!this.enabled)return;if(!this.world)throw new Error("World not defined for the area measurement!");const t=this._vertexPicker.get(this.world);if(t){if(!this._currentAreaElement){const i=new tm(this.components,this.world);i.onPointAdded.add(()=>{this._clickCount===2&&!i.workingPlane&&(i.computeWorkingPlane(),this._vertexPicker.workingPlane=i.workingPlane)}),i.onPointRemoved.add(()=>this._clickCount--),this._currentAreaElement=i}this._currentAreaElement.setPoint(t,this._clickCount),this._currentAreaElement.computeArea(),this._clickCount++}}),y(this,"onMouseMove",()=>{if(!this.world){console.log("No world given for the area measurement!");return}const t=this._vertexPicker.get(this.world);t&&this._currentAreaElement&&(this._currentAreaElement.setPoint(t,this._clickCount),this._currentAreaElement.computeArea())}),y(this,"onKeydown",t=>{this.enabled&&(t.key==="z"&&t.ctrlKey&&this._currentAreaElement&&this._currentAreaElement.removePoint(this._clickCount-1),t.key==="Enter"&&this._currentAreaElement&&this.endCreation(),t.key==="Escape"&&(this._clickCount===0&&!this._currentAreaElement?this.enabled=!1:this.cancelCreation()))}),this.components.add(zr.uuid,this),this._vertexPicker=new To(e)}set enabled(e){this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e),e||this.cancelCreation()}get enabled(){return this._enabled}set workingPlane(e){this._vertexPicker.workingPlane=e}get workingPlane(){return this._vertexPicker.workingPlane}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}dispose(){this.setupEvents(!1),this._vertexPicker.dispose(),this._currentAreaElement&&this._currentAreaElement.dispose();for(const e of this.list)e.dispose();this.components=null,this.onDisposed.trigger(zr.uuid),this.onDisposed.reset()}delete(){}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}endCreation(){this._currentAreaElement&&(this._currentAreaElement.points.length<3||(this._currentAreaElement&&(this.list.push(this._currentAreaElement),this._currentAreaElement.removePoint(this._clickCount),this._currentAreaElement.computeWorkingPlane(),this._currentAreaElement.computeArea(),this._currentAreaElement=null),this._vertexPicker.workingPlane=null,this._clickCount=0))}cancelCreation(){this._currentAreaElement&&(this._currentAreaElement.dispose(),this._currentAreaElement=null),this._vertexPicker.workingPlane=null,this._clickCount=0}setupEvents(e){if(!this.world)throw new Error("The area measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the area measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}};y(vc,"uuid","c453a99e-f054-4781-9060-33df617db4a5");let um=vc;class im{constructor(e,t){y(this,"enabled",!0),y(this,"visible",!0),y(this,"points",[]),y(this,"world"),y(this,"onDisposed",new Y),y(this,"_lineMaterial",new Ns({color:6629591,linewidth:2})),y(this,"_lineGeometry",new Nn),y(this,"_line",new Kl(this._lineGeometry,this._lineMaterial)),y(this,"_labelMarker"),y(this,"onAngleComputed",new Y),y(this,"onPointAdded",new Y),this.world=e;const i=ei();this._labelMarker=new qe(e,i),this.labelMarker.visible=!0,this.onPointAdded.add(()=>{this.points.length===1&&e.scene.three.add(this._line),this.points.length===3&&(this.labelMarker.visible=!0)}),this.onAngleComputed.add(s=>{this.labelMarker.three.element.textContent=`${s.toFixed(2)}°`,this.labelMarker.three.position.copy(this.points[1]??new x)}),t==null||t.forEach(s=>this.setPoint(s))}set lineMaterial(e){this._lineMaterial.dispose(),this._lineMaterial=e,this._line.material=e,this._lineMaterial.resolution.set(window.innerWidth,window.innerHeight)}get lineMaterial(){return this._lineMaterial}set labelMarker(e){this._labelMarker.dispose(),this._labelMarker=e}get labelMarker(){return this._labelMarker}get angle(){return{points:this.points,angle:this.computeAngle()}}setPoint(e,t){let i;if(t?i=t:i=this.points.length===0?0:this.points.length,![0,1,2].includes(i))return;this.points[i]=e,this.onPointAdded.trigger(e);const s=this.points.map(n=>[n.x,n.y,n.z]);this._lineGeometry.setPositions(s.flat())}toggleLabel(){this.labelMarker.toggleVisibility()}computeAngle(){const e=this.points[0],t=this.points[1],i=this.points[2];if(!(e&&t&&i))return 0;const s=new x().subVectors(t,e),n=new x().subVectors(t,i),r=Ii.radToDeg(s.angleTo(n));return this.onAngleComputed.trigger(r),r}dispose(){this.points=[],this.labelMarker.dispose(),this.onAngleComputed.reset(),this.onPointAdded.reset(),this.labelMarker.dispose(),this._line.removeFromParent(),this._lineMaterial.dispose(),this._lineGeometry.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}}const yc=class kr extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"world"),y(this,"list",[]),y(this,"_lineMaterial"),y(this,"_enabled",!1),y(this,"_vertexPicker"),y(this,"_currentAngleElement",null),y(this,"_clickCount",0),y(this,"create",()=>{if(!this.enabled)return;if(!this.world){console.log("No world selected for angle measurement!");return}const t=this._vertexPicker.get(this.world);if(t){if(!this._currentAngleElement){const i=new im(this.world);i.lineMaterial=this.lineMaterial,this._currentAngleElement=i}this._currentAngleElement.setPoint(t,this._clickCount),this._currentAngleElement.setPoint(t,this._clickCount+1),this._currentAngleElement.setPoint(t,this._clickCount+2),this._currentAngleElement.computeAngle(),this._clickCount++,this._clickCount===3&&this.endCreation()}}),y(this,"onMouseMove",()=>{if(!this.world){console.log("No world selected for angle measurement!");return}const t=this._vertexPicker.get(this.world);t&&this._currentAngleElement&&(this._currentAngleElement.setPoint(t,this._clickCount),this._currentAngleElement.computeAngle())}),y(this,"onKeyDown",t=>{this.enabled&&t.key==="Escape"&&this.cancelCreation()}),this.components.add(kr.uuid,this),this._vertexPicker=new To(e),this._lineMaterial=new Ns({color:6629591,linewidth:2})}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.setupEvents(e),this._vertexPicker.enabled=e,e||this.cancelCreation()}get lineMaterial(){return this._lineMaterial}set lineMaterial(e){this._lineMaterial.dispose(),this._lineMaterial=e,this._lineMaterial.resolution.set(window.innerWidth,window.innerHeight)}get workingPlane(){return this._vertexPicker.workingPlane}set workingPlane(e){this._vertexPicker.workingPlane=e}dispose(){this.setupEvents(!1),this._lineMaterial.dispose(),this._vertexPicker.dispose();for(const e of this.list)e.dispose();this._currentAngleElement&&this._currentAngleElement.dispose(),this.components=null,this.onDisposed.trigger(kr.uuid),this.onDisposed.reset()}delete(){}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}endCreation(){this._currentAngleElement&&(this.list.push(this._currentAngleElement),this._currentAngleElement.computeAngle(),this._currentAngleElement=null),this._clickCount=0}cancelCreation(){this._currentAngleElement&&(this._currentAngleElement.dispose(),this._currentAngleElement=null),this._clickCount=0}setupEvents(e){if(!this.world)throw new Error("No world selected for angle measurement!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeyDown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeyDown))}};y(yc,"uuid","622fb2c9-528c-4b0a-8a0e-6a1375f0a3aa");let fm=yc;const Fc=class Vr extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"onBeforeUpdate",new Y),y(this,"onAfterUpdate",new Y),y(this,"snapDistance",.25),y(this,"list",[]),y(this,"world"),y(this,"_vertexPicker"),y(this,"_lineMaterial",new si({color:"#DC2626",linewidth:2,depthTest:!1})),y(this,"_visible",!0),y(this,"_enabled",!1),y(this,"_temp",{isDragging:!1,start:new x,end:new x,dimension:void 0}),y(this,"create",t=>{const i=t instanceof Gi?t:void 0;if(this._enabled){if(!this._temp.isDragging){this.drawStart(i);return}this.endCreation()}}),y(this,"onMouseMove",()=>{this.world&&this._vertexPicker.get(this.world)}),y(this,"onKeydown",t=>{this.enabled&&t.key==="Escape"&&this.cancelCreation()}),this.components.add(Vr.uuid,this),this._vertexPicker=new To(e,{previewElement:ei(),snapDistance:this.snapDistance})}get enabled(){return this._enabled}set enabled(e){e||this.cancelCreation(),this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e)}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get color(){return this._lineMaterial.color}set color(e){this._lineMaterial.color=e}dispose(){this.setupEvents(!1),this.enabled=!1;for(const e of this.list)e.dispose();this._lineMaterial.dispose(),this.list=[],this._vertexPicker.dispose(),this.onDisposed.trigger(Vr.uuid),this.onDisposed.reset()}async update(e){this._enabled&&this._temp.isDragging&&this.drawInProcess()}createOnPoints(e,t){const i=this.drawDimension();i.startPoint=e,i.endPoint=t,i.createBoundingBox(),this.list.push(i)}delete(){if(!this.world)throw new Error("World is needed for Length Measurement!");if(!this._enabled||this.list.length===0)return;const e=this.getBoundingBoxes(),t=this.components.get(ut).get(this.world).castRay(e);if(!t)return;const i=this.list.find(s=>s.boundingBox===t.object);if(i){const s=this.list.indexOf(i);this.list.splice(s,1),i.dispose()}}async deleteMeasurement(e){if(e){const t=this.list.indexOf(e);this.list.splice(t,1),e.dispose()}}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}cancelCreation(){var e;this._temp.dimension&&(this._temp.isDragging=!1,(e=this._temp.dimension)==null||e.dispose(),this._temp.dimension=void 0)}endCreation(){this._temp.dimension&&(this._temp.dimension.createBoundingBox(),this.list.push(this._temp.dimension),this._temp.dimension=void 0,this._temp.isDragging=!1)}drawStart(e){if(!this.world)throw new Error("The length measurement needs a world to work!");const t=e?[e]:void 0,i=this.components.get(ut).get(this.world).castRay(t),s=this._vertexPicker.get(this.world);i&&s&&(this._temp.isDragging=!0,this._temp.start=e?i.point:s)}drawInProcess(){if(!this.world)throw new Error("The length measurement needs a world to work!");if(!this.components.get(ut).get(this.world).castRay())return;const e=this._vertexPicker.get(this.world);e&&(this._temp.end=e,this._temp.dimension||(this._temp.dimension=this.drawDimension()),this._temp.dimension.endPoint=this._temp.end)}drawDimension(){if(!this.world)throw new Error("The length measurement needs a world to work!");return new Co(this.components,this.world,{start:this._temp.start,end:this._temp.end,lineMaterial:this._lineMaterial,endpointElement:ei()})}getBoundingBoxes(){return this.list.map(e=>e.boundingBox).filter(e=>e!==void 0)}setupEvents(e){if(!this.world)throw new Error("The length measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the length measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;t&&(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown),e&&(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)))}};y(Fc,"uuid","2f9bcacf-18a9-4be6-a293-e898eae64ea1");let Es=Fc;const Ac=class Oc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"onVolumeFound",new Y),y(this,"label",null),y(this,"world"),y(this,"_enabled",!1),y(this,"create",()=>{if(!this.enabled)return;if(!this.world)throw new Error("World is needed for Volume Measurement!");const t=this.components.get(ut).get(this.world).castRay(),i=this.components.get(pi);if(!t||!t.object)return;const{object:s}=t;if(s instanceof ee){const n=i.getVolumeFromMeshes([s]);this.onVolumeFound.trigger(n)}}),y(this,"onMouseMove",()=>{}),y(this,"onKeydown",t=>{}),this.components.add(Oc.uuid,this)}set enabled(e){this._enabled=e,this.setupEvents(e),e||this.cancelCreation()}get enabled(){return this._enabled}async dispose(){var e;this.setupEvents(!1),(e=this.label)==null||e.dispose(),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){}async deleteAll(){}endCreation(){}cancelCreation(){}getVolumeFromFragments(e){const t=this.components.get(pi).getVolumeFromFragments(e),i=this.components.get(On);i.reset(),i.addFragmentIdMap(e);const s=i.getSphere();return this.setLabel(s,t),t}getVolumeFromMeshes(e){const t=this.components.get(pi),i=this.components.get(On);i.reset();for(const r of e)i.addMesh(r);const s=i.getSphere(),n=t.getVolumeFromMeshes(e);return this.setLabel(s,n),n}clear(){this.label&&(this.label.visible=!1)}newLabel(){if(!this.world)throw new Error("World is needed for Volume Measurement!");const e=ei();return new qe(this.world,e)}setupEvents(e){if(!this.world)throw new Error("The volume measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the volume measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("click",this.create),t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("click",this.create),t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}setLabel(e,t){if(!this.world)throw new Error("World is needed for Volume Measurement!");this.label||(this.label=this.newLabel(),this.label.three.removeFromParent()),this.label.visible=!0,this.world.scene.three.add(this.label.three),this.label.three.position.copy(e.center);const i=Math.trunc(t*100)/100;this.label.three.element.textContent=i.toString()}};y(Ac,"uuid","811da532-7af3-4635-b592-1c06ae494af5");let pm=Ac;const Nc=class Pc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"selection",[]),y(this,"preview",new ee(new Ce,new st({side:2,depthTest:!1,transparent:!0,opacity:.25,color:"#BCF124"}))),y(this,"selectionMaterial",new st({side:2,depthTest:!1,transparent:!0,color:"#BCF124",opacity:.75})),y(this,"world"),y(this,"_enabled",!1),y(this,"_currentSelelection",null),y(this,"create",()=>{if(!this.world)throw new Error("No world given to the face measurement!");if(!this.enabled||!this._currentSelelection)return;const t=this.world.scene.three,i=new Ce,s=new ee(i,this.selectionMaterial);i.setAttribute("position",this.preview.geometry.attributes.position),t.add(s),i.computeBoundingSphere();const{area:n,perimeter:r}=this._currentSelelection,o=this.newLabel(i,n);s.add(o.three),this.selection.push({area:n,perimeter:r,mesh:s,label:o})}),y(this,"onMouseMove",()=>{if(!this.world)throw new Error("The face measurement needs a world to work!");if(!this.enabled){this.unselect();return}const t=this.components.get(ut).get(this.world).castRay();if(!t||!t.object||t.faceIndex===void 0){this.unselect();return}const{object:i,faceIndex:s}=t;i instanceof ee||i instanceof It?this.updateSelection(i,s,t.instanceId):this.unselect()}),y(this,"onKeydown",t=>{}),this.components.add(Pc.uuid,this),this.preview.frustumCulled=!1}set enabled(e){if(!this.world)throw new Error("No world given for the Face measurement!");this._enabled=e,this.setupEvents(e),e?this.world.scene.three.add(this.preview):(this.preview.removeFromParent(),this.cancelCreation()),this.setVisibility(e)}get enabled(){return this._enabled}dispose(){this.setupEvents(!1),this.deleteAll(),this.preview.removeFromParent(),this.preview.material.dispose(),this.preview.geometry.dispose(),this.selectionMaterial.dispose(),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){if(!this.world)throw new Error("No world given to the face measurement!");const e=this.selection.map(n=>n.mesh),t=this.components.get(ut).get(this.world).castRay(e);if(!t||!t.object)return;const i=this.selection.find(n=>n.mesh===t.object);if(!i)return;i.mesh.removeFromParent(),i.mesh.geometry.dispose(),i.label.dispose();const s=this.selection.indexOf(i);this.selection.splice(s,1)}deleteAll(){for(const e of this.selection)e.mesh.removeFromParent(),e.mesh.geometry.dispose(),e.label.dispose();this.selection=[]}endCreation(){}cancelCreation(){}get(){const e=[];for(const t of this.selection){const i=t.mesh.geometry,{area:s,perimeter:n}=t,r=i.attributes.position.array;e.push({position:r,area:s,perimeter:n})}return e}set(e){if(!this.world)throw new Error("No world given to the face measurement!");const t=this.world.scene.three;for(const i of e){const s=new Ce,n=new ee(s,this.selectionMaterial);t.add(n);const r=new Je(i.position,3);s.setAttribute("position",r),s.computeBoundingSphere();const{area:o,perimeter:a}=i,l=this.newLabel(s,o);n.add(l.three),this.selection.push({area:o,perimeter:a,mesh:n,label:l})}}setupEvents(e){if(!this.world)throw new Error("The face measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the face measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown),e&&(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown))}setVisibility(e){if(!this.world)throw new Error("The face measurement needs a world to work!");if(this.world.isDisposing)return;const t=this.world.scene.three;for(const i of this.selection){const s=i.label.three;e?(t.add(i.mesh),i.mesh.add(s)):(i.mesh.removeFromParent(),s.removeFromParent())}}unselect(){this.preview.removeFromParent(),this._currentSelelection=null}updateSelection(e,t,i){if(!this.world)throw new Error("The face measurement needs a world to work!");this.world.scene.three.add(this.preview);const s=this.components.get(pi).getFace(e,t,i);if(s===null)return;const n=this.regenerateHighlight(e,s.indices,i);let r=0;for(const{distance:o}of s.edges)r+=o;this._currentSelelection={perimeter:r,area:n}}newLabel(e,t){if(!e.boundingSphere)throw new Error("Error computing area geometry");if(!this.world)throw new Error("The face measurement needs a world to work!");const{center:i}=e.boundingSphere,s=ei(),n=Math.trunc(t*100)/100;s.textContent=n.toString();const r=new qe(this.world,s);return r.three.position.copy(i),r}regenerateHighlight(e,t,i){const s=[],n=[];let r=0,o=0;const a=new hi,l=this.components.get(pi);for(const u of t){const{p1:f,p2:m,p3:p}=l.getVerticesAndNormal(e,u,i);s.push(f.x,f.y,f.z),s.push(m.x,m.y,m.z),s.push(p.x,p.y,p.z),a.set(f,m,p),o+=a.getArea(),n.push(r,r+1,r+2),r+=3}this.preview.position.set(0,0,0),this.preview.rotation.set(0,0,0),this.preview.scale.set(1,1,1),this.preview.updateMatrix(),this.preview.applyMatrix4(e.matrixWorld);const h=new Float32Array(s),d=new Je(h,3);return this.preview.geometry.setAttribute("position",d),this.preview.geometry.setIndex(n),o}};y(Nc,"uuid","30279548-1309-44f6-aa97-ce26eed73522");let mm=Nc;const bc=class xc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"preview"),y(this,"tolerance",.3),y(this,"world"),y(this,"_enabled",!1),y(this,"_lineMaterial",new si({color:"#DC2626",linewidth:2,depthTest:!1,transparent:!0})),y(this,"create",async()=>{if(!this.preview||!this.enabled||!this.preview.visible)return;const t=this.components.get(Es);t.world=this.world;const i=this.preview.startPoint.clone(),s=this.preview.endPoint.clone();t.createOnPoints(i,s)}),y(this,"onMouseMove",()=>{if(!this.preview)return;if(!this.world)throw new Error("The edge measurement needs a world to work!");if(!this.enabled){this.preview.visible=!1;return}const t=this.components.get(ut).get(this.world).castRay();if(!t||!t.object){this.preview.visible=!1;return}const{object:i,faceIndex:s,point:n}=t;if(s===void 0){this.preview.visible=!1;return}i instanceof ee||i instanceof It?this.updateSelection(i,n,s,t.instanceId):this.preview.visible=!1}),y(this,"onKeydown",t=>{}),this.components.add(xc.uuid,this)}set enabled(e){if(this._enabled=e,this.setupEvents(e),e){if(!this.world)throw new Error("The edge measurement needs a world to work!");if(!this.preview){const t=document.createElement("div");t.className="w-2 h-2 bg-red-600 rounded-full",this.preview=new Co(this.components,this.world,{start:new x,end:new x,lineMaterial:this._lineMaterial,endpointElement:t}),this.preview.visible=!1}}else this.cancelCreation()}get enabled(){return this._enabled}dispose(){this.preview&&this.preview.dispose(),this._lineMaterial.dispose(),this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){if(!this.enabled)return;const e=this.components.get(Es),t=e.enabled;e.enabled=!0,e.delete(),e.enabled=t}deleteAll(){this.components.get(Es).deleteAll()}endCreation(){}cancelCreation(){}get(){const e=this.components.get(Es).list,t=[];for(const i of e){const s=i.startPoint,n=i.endPoint,r=[s.x,s.y,s.z,n.x,n.y,n.z];t.push(r)}return t}set(e){const t=this.components.get(Es);t.world=this.world;for(const i of e){const[s,n,r,o,a,l]=i,h=new x(s,n,r),d=new x(o,a,l);t.createOnPoints(h,d)}}setupEvents(e){if(!this.world)throw new Error("The edge measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the edge measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}updateSelection(e,t,i,s){if(!this.preview||!e.geometry.index)return;const n=this.components.get(pi).getFace(e,i,s);if(!n)return;const{edges:r}=n;let o=Number.MAX_VALUE,a=[];for(const d of r){const[u,f]=d.points,m=pi.distanceFromPointToLine(t,u,f,!0);m{const n=s.data.colors,r={},o={},a={},l={},h=performance.now();let d=!1;const u=new Set(this._geometriesInMemory);for(const[f,m]of n){const p=this._geometries.get(f);if(!p||!(m>this.threshold))continue;u.delete(f);const{exists:E}=p,I=this._indexModelID.get(p.modelIndex);E?(p.time=h,l[I]||(l[I]=new Set),l[I].add(p.geometryID),this._geometriesInMemory.add(f),d=!0):(r[I]||(r[I]=new Map),p.time=h,p.exists=!0,r[I].has(m)||r[I].set(m,new Set),r[I].get(m).add(p.geometryID),this._geometriesInMemory.add(f),d=!0)}for(const f of u){const m=this._geometries.get(f);m&&(this.handleLostGeometries(h,f,m,o,a),d=!0)}d&&await this.onViewUpdated.trigger({toLoad:r,toRemove:o,toHide:a,toShow:l}),this._isWorkerBusy=!1}),this.config.updateInterval=500,this._geometry=new Be(1,1,1),this._geometry.groups=[],this._geometry.deleteAttribute("uv");const i=this._geometry.attributes.position.array;for(let s=0;sparseInt(m,10)),f=[];for(const m of i.ids){const p=i.get(m);if(!p.colors)throw new Error("Malformed fragments!");for(const E of p.colors)E.setRGB(h/255,d/255,u/255,"srgb");f.push(p)}l.fragment.add(f),_t.enabled=r,this.needsUpdate=!0}removeFragment(e,t){const i=this._modelIDIndex.get(e),s=this.codes.get(i).get(t),n=this._geometries.get(s);if(n.hidden||this.setGeometryVisibility(n,!0,!1),n.fragment){const{fragment:r}=n;r.dispose(!1),n.fragment=void 0}}setModelTransformation(e,t){const i=this._modelIDIndex.get(e);if(i===void 0)throw new Error("Model not found!");const s=this.boxes.get(i);s&&(s.mesh.position.set(0,0,0),s.mesh.rotation.set(0,0,0),s.mesh.scale.set(1,1,1),s.mesh.applyMatrix4(t));const n=this._geometriesGroups.get(i);n&&(n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),n.applyMatrix4(t))}setVisibility(e,t,i){const s=this._modelIDIndex.get(t);if(s!==void 0)for(const[n,r]of i){const o=this.codes.get(s);if(o===void 0)throw new Error("Map not found!");const a=o.get(n),l=this._geometries.get(a);if(l===void 0)throw new Error("Geometry not found!");l.hidden=!e,this.setGeometryVisibility(l,e,!0,r)}}updateTransformations(e){const t=this._modelIDIndex.get(e);if(t===void 0)return;const i=this.components.get(ue).groups.get(e);if(i){i.updateWorldMatrix(!0,!1),i.updateMatrix();const s=this.boxes.get(t);s&&(s.mesh.position.set(0,0,0),s.mesh.rotation.set(0,0,0),s.mesh.scale.set(1,1,1),s.mesh.updateMatrix(),s.mesh.applyMatrix4(i.matrixWorld),s.mesh.updateMatrix());const n=this._geometriesGroups.get(t);n&&(n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),n.updateMatrix(),n.applyMatrix4(i.matrixWorld),n.updateMatrix())}}async addStaticGeometries(e,t=!0){const i={data:{colors:new Map}},s=this.threshold+1e3;for(const n in e){const r=this._modelIDIndex.get(n);if(r===void 0)continue;const o=this.codes.get(r);if(!o)continue;const a=e[n];for(const l of a){const h=o.get(l);if(!h)continue;const d=this._geometries.get(h);if(!d)continue;d.exists=!0,t||(d.hidden=!1,d.time=performance.now(),i.data.colors.set(h,s)),this._geometriesInMemory.add(h);const u=t?this._staticGeometries.culled:this._staticGeometries.unculled;u[n]||(u[n]=new Set),u[n].add(l)}}t||await this.handleWorkerMessage(i)}removeStaticGeometries(e,t){const i=[];t===void 0?i.push("culled","unculled"):t===!0?i.push("culled"):i.push("unculled");for(const s in e){const n=e[s];for(const r of i){const o=this._staticGeometries[r][s];if(o)for(const a of n)o.delete(a)}}}cancel(e){for(const t in e){const i=this._modelIDIndex.get(t);if(i===void 0)throw new Error("Model not found.");const s=this.codes.get(i);if(s===void 0)throw new Error("Codes not found.");for(const n of e[t]){const r=s.get(n);if(r===void 0)throw new Error("Color code not found.");this._geometriesInMemory.delete(r);const o=this._geometries.get(r);if(!o)throw new Error("Geometry not found.");o.exists=!1}}}getBoundingBoxes(e){const t=new zt;for(const i in e){const s=e[i],n=this._modelIDIndex.get(i);if(n===void 0)continue;const r=this.boxes.get(n);if(!r)continue;const o=r.clone(s);t.add(o.mesh),t.items.push(o)}return t}getInstanceID(e,t){const i=10**(Math.log(t)*Math.LOG10E+1|0);return e+t/i}setGeometryVisibility(e,t,i,s){const{modelIndex:n,geometryID:r,assetIDs:o}=e,a=this.boxes.get(n);if(a===void 0)throw new Error("Model not found!");const l=s||o;if(i&&e.fragment)e.fragment.setVisibility(t,l);else{const h=new Set;for(const d of l){const u=this.getInstanceID(d,r);h.add(u)}a.setVisibility(t,h)}}handleLostGeometries(e,t,i,s,n){var r,o,a;const l=this._indexModelID.get(i.modelIndex),h=e-i.time,{culled:d,unculled:u}=this._staticGeometries;if(h>this.maxLostTime){if((r=d[l])!=null&&r.has(i.geometryID)||(o=u[l])!=null&&o.has(i.geometryID))return;s[l]||(s[l]=new Set),i.exists=!1,s[l].add(i.geometryID),this._geometriesInMemory.delete(t)}else if(h>this.maxHiddenTime){if((a=u[l])!=null&&a.has(i.geometryID))return;n[l]||(n[l]=new Set),n[l].add(i.geometryID)}}createModelIndex(e){if(this._modelIDIndex.has(e))throw new Error("Can't load the same model twice!");const t=this._nextModelID;return this._nextModelID++,this._modelIDIndex.set(e,t),this._indexModelID.set(t,e),t}}const Mc=class Yr extends de{constructor(e){super(e),y(this,"enabled",!0),y(this,"onFragmentsDeleted",new Y),y(this,"onFragmentsLoaded",new Y),y(this,"onDisposed",new Y),y(this,"models",{}),y(this,"serializer",new Ua),y(this,"maxRamTime",5e3),y(this,"useCache",!0),y(this,"cancel",!1),y(this,"url",""),y(this,"fetch",async t=>fetch(this.url+t)),y(this,"fileDB",new jc("that-open-company-streaming")),y(this,"_culler",null),y(this,"_world",null),y(this,"_ramCache",new Map),y(this,"_isDisposing",!1),y(this,"_geometryInstances",{}),y(this,"_loadedFragments",{}),y(this,"fragIDData",new Map),y(this,"_baseMaterial",new wn),y(this,"_baseMaterialT",new wn({transparent:!0,opacity:.5})),y(this,"disposeStreamedGroup",t=>{this._isDisposing=!0;const{groupID:i,fragmentIDs:s}=t;if(this.models[i]){delete this.models[i],delete this._geometryInstances[i],delete this._loadedFragments[i];for(const n of s)this.fragIDData.delete(n);this.culler.remove(i),this._isDisposing=!1}}),this.components.add(Yr.uuid,this),this.components.get(ue).onFragmentsDisposed.add(this.disposeStreamedGroup),zt.setPropertiesDB(!0)}get world(){if(!this._world)throw new Error("You must set a world before using the streamer!");return this._world}set world(e){var t;this._world=e,(t=this._culler)==null||t.dispose(),this._culler=new sm(this.components,e),this._culler.onViewUpdated.add(async({toLoad:i,toRemove:s,toShow:n,toHide:r})=>{await this.loadFoundGeometries(i),await this.unloadLostGeometries(s),this.setMeshVisibility(n,!0),this.setMeshVisibility(r,!1)})}get culler(){if(!this._culler)throw new Error("You must set a world before using the streamer!");return this._culler}dispose(){var e;this._isDisposing=!0,this.onFragmentsLoaded.reset(),this.onFragmentsDeleted.reset(),this._ramCache.clear(),this.components.get(ue).onFragmentsDisposed.remove(this.disposeStreamedGroup),this.models={},this._geometryInstances={},this._loadedFragments={},this.fragIDData.clear(),this._baseMaterial.dispose(),this._baseMaterialT.dispose(),(e=this._culler)==null||e.dispose(),this.onDisposed.trigger(Yr.uuid),this.onDisposed.reset(),this._isDisposing=!1,zt.setPropertiesDB(!1)}async load(e,t,i){const{assets:s,geometries:n,globalDataFileId:r}=e,o=await(await this.fetch(r)).arrayBuffer(),a=new Uint8Array(o),l=this.components.get(ue).load(a,{coordinate:t,isStreamed:!0});l.name=r.replace("-processed-global",""),this.world.scene.three.add(l);const{opaque:h,transparent:d}=l.geometryIDs;for(const[p,E]of h){const I=l.keyFragments.get(E);if(I===void 0)throw new Error("Malformed fragments group!");this.fragIDData.set(I,[l,p,new Set])}for(const[p,E]of d){const I=l.keyFragments.get(E);if(I===void 0)throw new Error("Malformed fragments group!");this.fragIDData.set(I,[l,Math.abs(p),new Set])}this.culler.add(l.uuid,s,n);const u=new Map;for(const p of s)u.set(p.id,p);const f={assetsMap:u,geometries:n};Object.defineProperty(f,"assets",{get:()=>Array.from(f.assetsMap.values())}),this.models[l.uuid]=f;const m=new Map;for(const p of s){const E=p.id;for(const{transformation:I,geometryID:g,color:w}of p.geometries){m.has(g)||m.set(g,[]);const C=m.get(g);if(!C)throw new Error("Malformed instances");C.push({id:E,transformation:I,color:w})}}if(this._geometryInstances[l.uuid]=m,i){const p=new Map,E=new Map;for(const v in i.ids){const O=i.ids[v],A=parseInt(v,10);p.set(A,O)}for(const v in i.types){const O=i.types[v],A=parseInt(v,10);E.set(A,O)}const I=r.replace("-global","-properties");zt.url=this.url,l.streamSettings={baseFileName:I,ids:p,types:E};const{indexesFile:g}=i,w=await(await this.fetch(g)).text(),C=this.components.get(it);C.setRelationMap(l,C.getRelationsMapFromJSON(w))}return this.culler.updateTransformations(l.uuid),this.culler.needsUpdate=!0,l}remove(e){const t=this.components.get(ue),i=t.groups.get(e);i&&t.disposeGroup(i)}setVisibility(e,t){const i=new Map;if(!t){const s=this.components.get(ue),n={};for(const[,r]of s.groups){const o=r.getFragmentMap();for(const a in o)n[a]=o[a]}t=n}for(const s in t){const n=this.fragIDData.get(s);if(n===void 0)throw new Error("Geometry not found!");const[r,o,a]=n,l=r.uuid;i.has(l)||i.set(l,new Map);const h=i.get(l),d=t[s];for(const f of d)e?a.delete(f):a.add(f);h.get(o)||h.set(o,new Set);const u=h.get(o);for(const f of d)u.add(f)}for(const[s,n]of i){this.culler.setVisibility(e,s,n);for(const[r]of n){const o=this._loadedFragments[s];if(!o)continue;const a=o[r];if(a)for(const l of a){const h=t[l.id];h&&l.setVisibility(e,h)}}}this.culler.needsUpdate=!0}async clearCache(){await this.fileDB.clear()}async setStatic(e,t,i){const s={};for(const n of e){const r=this.fragIDData.get(n);if(!r){console.log(`Item not found: ${n}.`);continue}const[o,a]=r,l=o.uuid;s[l]||(s[l]=new Set),s[l].add(a)}if(t){const n={};for(const r in s){const o=new Map;o.set(1,s[r]),n[r]=o}await this.loadFoundGeometries(n,!1),await this.culler.addStaticGeometries(s,i)}else this.culler.removeStaticGeometries(s,i)}getBoundingBoxes(e){const t={},i=this.components.get(ue),s=new Map;for(const[r,o]of i.groups)for(const[,a]of o.keyFragments)s.set(a,r);const n=new Set;for(const r in e){const o=s.get(r);if(o===void 0){console.log("Fragment group not found!");continue}const a=e[r];n.has(o)||(t[o]=new Set,n.add(o));for(const l of a){const h=this.models[o].assetsMap.get(l);if(h)for(const d of h.geometries){const u=d.geometryID,f=this.culler.getInstanceID(l,u);t[o].add(f)}}}return this.culler.getBoundingBoxes(t)}async loadFoundGeometries(e,t=!0){this.cancel=!1;const i={};for(const s in e){const n=new Set;for(const[,r]of e[s])for(const o of r)n.add(o);i[s]=n}for(const s in e){if(this._isDisposing)return;if(this.cancel){this.cancelLoading(i);return}const n=this.components.get(ue).groups.get(s);if(!n)return;const{geometries:r}=this.models[s],o=new Map,a=new Set;for(const[f,m]of e[s])for(const p of m){if(this.cancel){this.cancelLoading(i);return}a.add(p);const E=r[p];if(!E)throw new Error("Geometry not found");if(E.geometryFile){const I=E.geometryFile,g=o.get(I)||0;o.set(I,g+f)}}if(this.useCache){const f=o.entries();for(const[m,p]of f)this.fileDB.isCached(m)&&o.set(m,p+99999)}const l=Array.from(o).sort((f,m)=>m[1]-f[1]),h=[];for(const[f]of l){const m=this.loadFragmentFile(s,n,t,f,a,i);h.push(m)}await Promise.all(h);const d=new Set,u=performance.now();for(const[f,{time:m}]of this._ramCache)u-m>this.maxRamTime&&d.add(f);for(const f of d)this._ramCache.delete(f)}}async unloadLostGeometries(e){if(this._isDisposing)return;const t=[],i=this.components.get(ue);for(const s in e){const n=i.groups.get(s);if(!n)throw new Error("Fragment group not found!");if(!this._loadedFragments[s])continue;const r=this._loadedFragments[s],o=e[s];for(const a of o){if(this.culler.removeFragment(n.uuid,a),!r[a])continue;const l=r[a];for(const h of l)n.items.splice(n.items.indexOf(h),1),t.push(h);delete r[a]}}t.length&&this.onFragmentsDeleted.trigger(t);for(const s of t)i.list.delete(s.id),this.world.meshes.delete(s.mesh),s.mesh.material=[],s.dispose(!0)}setMeshVisibility(e,t){for(const i in e)for(const s of e[i]){const n=this._loadedFragments[i];if(!n)continue;const r=n[s];if(r)for(const o of r)o.mesh.visible=t}}newFragment(e,t,i,s,n,r,o){if(s.length===0||this._isDisposing)return;const a=e.geometryIDs,l=n?a.transparent:a.opaque,h=t*(n?-1:1),d=l.get(h);if(d===void 0)return;const u=e.keyFragments.get(d);if(u===void 0)return;const f=this.components.get(ue);if(f.list.has(u))return;const m=n?this._baseMaterialT:this._baseMaterial,p=new vn(i,m,s.length);p.mesh.visible=o,p.id=u,p.mesh.uuid=u,p.group=e,e.add(p.mesh),e.items.push(p),f.list.set(p.id,p),this.world.meshes.add(p.mesh),this._loadedFragments[e.uuid]||(this._loadedFragments[e.uuid]={});const E=this._loadedFragments[e.uuid];E[t]||(E[t]=[]),E[t].push(p);const I=new Map;for(let v=0;v{var i;const s=this.components.get(ue);for(const n in t){const r=s.list.get(n);if(!r)continue;const o=(i=r.group)==null?void 0:i.uuid;if(o)for(const a in this.selection){if(a===this.config.selectName||a===this.config.hoverName)continue;const l=this.selection[a][n];if(l){a in this._colorsBeforeSelect||(this._colorsBeforeSelect[a]={}),o in this._colorsBeforeSelect[a]||(this._colorsBeforeSelect[a]={[o]:new Set});for(const h of l)this._colorsBeforeSelect[a][o].add(h)}}}}),y(this,"restoreHighlightersAfterDeselect",()=>{const t=this.components.get(ue);for(const i in this._colorsBeforeSelect){let s={};const n=this._colorsBeforeSelect[i];for(const r in n){const o=t.groups.get(r);if(!o)continue;const a=o.getFragmentMap(n[r]);s={...s,...a}}this.highlightByID(i,s,!1,!1)}this._colorsBeforeSelect={}}),y(this,"clearHover",()=>{this.selection[this.config.hoverName]={}}),y(this,"onMouseDown",t=>{this.enabled&&(this.mouseDownPosition={x:t.clientX,y:t.clientY},this._mouseState.down=!0)}),y(this,"onMouseUp",async t=>{if(!this.enabled)return;const{world:i,autoHighlightOnClick:s,selectEnabled:n}=this.config;if(!i)throw new Error("No world found!");if(!i.renderer)throw new Error("This world doesn't have a renderer!");if(t.target===i.renderer.three.domElement){if(this._mouseState.down=!1,this._mouseState.moved||t.button!==0){this._mouseState.moved=!1;return}if(this._mouseState.moved=!1,s&&n){const r=this.multiple==="none"?!0:!t[this.multiple];await this.highlight(this.config.selectName,r,this.zoomToSelection)}}}),y(this,"onMouseMove",async t=>{if(!this.enabled)return;const i=t.clientX-this.mouseDownPosition.x,s=t.clientY-this.mouseDownPosition.y,n=Math.sqrt(i*i+s*s),{hoverName:r,hoverEnabled:o}=this.config;if(this._mouseState.moved){this.clear(r);return}if(n>this.mouseMoveThreshold){this._mouseState.moved=this._mouseState.down;const a={};for(const l in this.selection){if(l===r)continue;const h=this.selection[l];for(const d in h){d in a||(a[d]=new Set);const u=h[d];for(const f of u)a[d].add(f)}}o&&await this.highlight(this.config.hoverName,!0,!1,a)}}),this.components.add(Gr.uuid,this),this.eventManager.list.add(this.onSetup),this.eventManager.list.add(this.onDisposed)}async dispose(){this.setupEvents(!1),this._fills.dispose(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.selection={};for(const e in this.events){const{onClear:t,onHighlight:i}=this.events[e];this.eventManager.list.delete(t),this.eventManager.list.delete(i)}this.onDisposed.trigger(Gr.uuid),this.eventManager.reset()}add(e,t){if(this.selection[e]||this.colors.has(e))throw new Error("A selection with that name already exists!");this.colors.set(e,t),this.selection[e]={};const i=new Y,s=new Y,n=new Y;this.events[e]={onHighlight:i,onClear:n,onBeforeHighlight:s},this.eventManager.add([n,i,s])}remove(e){if(this.clear(e),delete this.selection[e],this.colors.delete(e),this.selection[e]||this.colors.has(e))throw new Error("A selection with that name already exists!");if(this.events[e]){const{onHighlight:t,onClear:i,onBeforeHighlight:s}=this.events[e];this.eventManager.remove([i,t,s]),delete this.events[e]}}async highlight(e,t=!0,i=this.zoomToSelection,s={}){if(!this.enabled)return null;if(!this.config.world)throw new Error("No world found in config!");const n=this.config.world;if(!this.selection[e])throw new Error(`Selection ${e} does not exist.`);const r=[],o=this.components.get(ue).meshes;for(const E of o)r.push(E);const a=this.components.get(Xi);for(const E of a.list){const I=E;if(I.edges){const g=I.edges.fillMeshes;for(const w of g)r.push(w)}}const l=this.components.get(ut).get(n).castRay(r);if(!l||!l.face)return this.clear(e),null;const h=l.object;if(!h.fragment&&h.userData.indexFragmentMap){if(l.faceIndex===void 0||!h.geometry.index)return null;const{userData:E}=h,I=E.indexFragmentMap.get(l.faceIndex);if(I){await this.highlightByID(e,I,t,i,s,h,!0);const g=Object.keys(I)[0];return{id:Array.from(I[g])[0],fragments:I}}return null}const d=h.geometry,u=l.instanceId;if(!d||u===void 0)return null;const f=h.fragment.getItemID(u);if(f===null)throw new Error("Item ID not found!");const m=h.fragment.group;if(!m)throw new Error("Fragment must belong to a FragmentsGroup!");const p=m.getFragmentMap([f]);return await this.highlightByID(e,p,t,i,s,void 0,!0),{id:f,fragments:p}}async highlightByID(e,t,i=!0,s=this.zoomToSelection,n={},r=void 0,o=!1){if(!this.enabled)return;this.events[e].onBeforeHighlight.trigger(this.selection[e]),i&&this.clear(e);const a=this.components.get(ue),l=this.colors.get(e);if(l===void 0)throw new Error("Color for selection not found!");const h={};for(const d in t){const u=t[d],f=n[d];for(const m of u)if(!(f&&f.has(m))){if(this.selectable[e]){const p=this.selectable[e];if(!p[d]||!p[d].has(m))continue}h[d]||(h[d]=new Set),h[d].add(m)}}for(const d in h){this.selection[e][d]||(this.selection[e][d]=new Set);const u=h[d],f=new Set,m=new Set;for(const E of u){const I=this.selection[e][d];o&&this.autoToggle.has(e)&&I.has(E)?(f.add(E),I.delete(E)):(I.add(E),m.add(E))}const p=a.list.get(d);if(p&&(f.size&&(this.backupColor?p.setColor(this.backupColor,f):p.resetColor(f)),m.size&&l!==null&&p.setColor(l,m),p.mesh.userData.fills&&l!==null))for(const E of p.mesh.userData.fills)this._fills.highlight(e,E,l,t)}this.events[e].onHighlight.trigger(this.selection[e]),r&&l!==null&&this._fills.highlight(e,r,l,t),s&&await this.zoomSelection(e)}clear(e,t){const i=e?[e]:Object.keys(this.selection);for(const s of i){this._fills.clear(s);const n=this.components.get(ue),r=this.selection[s];for(const o in r){const a=n.list.get(o);if(!a)continue;let l=r[o];if(l){if(t){const h=t[o];if(!h)continue;const d=new Set,u=new Set;for(const f of l)h.has(f)?d.add(f):u.add(f);l=d,u.size?r[o]=u:delete r[o]}this.backupColor?a.setColor(this.backupColor,l):a.resetColor(l)}}t||(this.selection[s]={}),this.events[s].onClear.trigger(null)}}setup(e){this.config={...this.config,...e},this.add(this.config.selectName,this.config.selectionColor),this.autoToggle.add(this.config.selectName),this.add(this.config.hoverName,this.config.hoverColor),this.setupEvents(!0),this.enabled=!0,this.isSetup=!0,this.onSetup.trigger(this)}updateFragments(e){for(const t of e)for(const i in this.selection){const s=this.selection[i][t.id],n=this.colors.get(i);s&&n&&t.setColor(n,s)}}async zoomSelection(e){if(!this.config.world)throw new Error("No world found in config!");const t=this.config.world;if(!t.camera.hasCameraControls())return;const i=this.components.get(On),s=this.components.get(ue);i.reset();const n=this.selection[e];if(!Object.keys(n).length)return;for(const p in n){const E=s.list.get(p);if(!E)continue;const I=n[p];i.addMesh(E.mesh,I)}const r=i.getSphere(),o=1/0,a=-1/0,{x:l,y:h,z:d}=r.center,u=r.radius===o||l===o||h===o||d===o,f=r.radius===a||l===a||h===a||d===a,m=r.radius===0;u||f||m||(r.radius*=this.zoomFactor,await t.camera.controls.fitToSphere(r,!0))}setupEvents(e){if(!this.config.world){console.log("No world found while setting up events!");return}if(this.config.world.isDisposing)return;if(!this.config.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.config.world.renderer.three.domElement,i=this.events[this.config.selectName].onHighlight;i.remove(this.clearHover),i.remove(this.saveHighlightersBeforeSelect);const s=this.events[this.config.selectName].onClear;s.remove(this.restoreHighlightersAfterDeselect),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("pointermove",this.onMouseMove),e&&(i.add(this.clearHover),i.add(this.saveHighlightersBeforeSelect),s.add(this.restoreHighlightersAfterDeselect),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("pointermove",this.onMouseMove))}};y(Lc,"uuid","cb8a76f2-654a-4b50-80c6-66fd83cafd77");let gm=Lc;class rm extends de{constructor(){super(...arguments),y(this,"onDisposed",new Y),y(this,"world")}get enabled(){return!this.world||this.world.isDisposing?!1:this.getRenderer().postproduction.customEffects.outlineEnabled}set enabled(e){if(!this.world||this.world.isDisposing)return;const t=this.getRenderer();t.postproduction.customEffects.outlineEnabled=e}create(e,t){const i=this.getRenderer();if(i.postproduction.customEffects.outlinedMeshes[e]!==void 0)throw new Error(`There's already a style with the name ${e}.`);i.postproduction.customEffects.outlinedMeshes[e]={material:t,meshes:new Set}}add(e,t){const i=this.getRenderer(),s=this.getStyles()[e];if(!s)throw new Error(`The style ${e} does not exist`);const n=i.postproduction.customEffects.outlineScene,r=this.components.get(ue);for(const o in t){const a=r.list.get(o);if(!a)continue;const l=t[o],h=a.clone(l);h.mesh.position.set(0,0,0),h.mesh.rotation.set(0,0,0),h.mesh.applyMatrix4(a.mesh.matrixWorld),h.mesh.instanceColor=null,h.mesh.material=[s.material],s.meshes.add(h.mesh),n.add(h.mesh)}}clear(e){if(e){this.clearStyle(e,!1);return}const t=this.getStyles(),i=Object.keys(t);for(const s of i)this.clearStyle(s,!1);this.world=void 0}dispose(){if(this.world&&!this.world.isDisposing){const e=this.getStyles(),t=Object.keys(e);for(const i of t)this.clearStyle(i,!0)}this.onDisposed.trigger(),this.onDisposed.reset()}clearStyle(e,t){const i=this.getStyles(),s=i[e];if(!s)return;const n=this.components.get(Nt);for(const r of s.meshes){const o=r;o.fragment&&o.fragment.dispose(!1),n.destroy(r)}s.meshes.clear(),t&&(s.material.dispose(),delete i[e])}getStyles(){return this.getRenderer().postproduction.customEffects.outlinedMeshes}getRenderer(){if(!this.world)throw new Error("You must set a world to use the outliner!");const e=this.world.renderer;if(!e.postproduction)throw new Error("The world given to the outliner must use the postproduction renderer.");return e}}y(rm,"uuid","2fd3bcc5-b3b6-4ded-9f64-f47a02854a10");class Lt extends de{constructor(){super(...arguments),y(this,"enabled",!1),y(this,"onDisposed",new Y),y(this,"onNavigated",new Y),y(this,"onExited",new Y),y(this,"planeType","section"),y(this,"offset",100),y(this,"list",new Map),y(this,"world"),y(this,"current",null),y(this,"cached3DCamera",{position:new x,target:new x,projection:"Perspective",zoom:1,top:10,bottom:-10,right:10,left:-10})}create(e){const t=this.getWorld(),{id:i,point:s,normal:n,type:r}=e;let{name:o,offset:a}=e;const l=this.components.get(Xi),h=l.Type;l.Type=Pn;const d=l.createFromNormalAndCoplanarPoint(t,n,s);d.visible=!1,d.edges.visible=!1,d.enabled=!1,o=o||i,a=a||this.offset,d.type=r||this.planeType,d.updateFill();const u=n.clone().multiplyScalar(-a).add(s),f=s.clone(),m={id:i,name:o,plane:d,offset:a,cached:{position:u,target:f,zoom:1,size:10}};return this.list.set(i,m),l.Type=h,m}delete(e){const t=this.list.get(e);t&&(t.plane.dispose(),this.list.delete(e))}async goTo(e,t=!1){var i;const s=this.getCamera();if(((i=this.current)==null?void 0:i.id)===e)return;const n=this.list.get(e);if(!n)throw new Error(`There's no section with the ID: ${e}.`);this.cacheCameraPosition(),await this.hidePreviousClippingPlane(),await s.projection.set("Orthographic"),this.current=n;const r=new x,o=new x,{cached:a}=n,{position:l,target:h}=a;r.copy(h),o.copy(l),await s.controls.setLookAt(o.x,o.y,o.z,r.x,r.y,r.z,t);const d=n.cached.size,u=s.threePersp.aspect;s.threeOrtho.top=d,s.threeOrtho.bottom=-d,s.threeOrtho.left=-d*u,s.threeOrtho.right=d*u,s.threeOrtho.updateProjectionMatrix(),await s.controls.zoomTo(a.zoom,!1),s.set("Plan"),this.current.plane&&(this.current.plane.enabled=!0,this.current.plane.edges.fillNeedsUpdate=!0,this.current.plane.edges.visible=!0),this.enabled=!0,this.onNavigated.trigger({id:e})}async exit(e=!1){if(!this.enabled||!this.world)return;this.cacheCameraPosition();const t=this.getCamera();t.set("Orbit");const{position:i,target:s,projection:n}=this.cached3DCamera;await t.projection.set(n),this.current&&(this.current.plane.enabled=!1,this.current.plane.edges.enabled=!1,this.current.plane.edges.visible=!1),this.current=null;const{x:r,y:o,z:a}=i,{x:l,y:h,z:d}=s;await t.controls.setLookAt(r,o,a,l,h,d,e),t.projection.current==="Orthographic"&&(await t.controls.zoomTo(this.cached3DCamera.zoom,!1),t.threeOrtho.left=this.cached3DCamera.left,t.threeOrtho.right=this.cached3DCamera.right,t.threeOrtho.top=this.cached3DCamera.top,t.threeOrtho.bottom=this.cached3DCamera.bottom),this.enabled=!1,this.onExited.trigger()}dispose(){for(const[,{plane:e}]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}getWorld(){if(!this.world)throw new Error("World is needed to create sections!");return this.world}getCamera(){const e=this.getWorld().camera;if(!e.hasCameraControls()||!e.projection)throw new Error("The world given to sections must have an OrthoPerspective camera.");return e}cacheCameraPosition(){if(!this.world)throw new Error("World is needed to create clipping planes!");const e=this.getCamera();if(this.enabled){if(!this.current)throw new Error("Current section not found!");const{cached:t}=this.current,{position:i,target:s}=t;e.controls.getPosition(i),e.controls.getTarget(s),t.zoom=e.threeOrtho.zoom,t.size=e.threeOrtho.top}else{e.three.getWorldPosition(this.cached3DCamera.position),e.controls.getTarget(this.cached3DCamera.target),this.cached3DCamera.projection=e.projection.current,this.cached3DCamera.zoom=e.threeOrtho.zoom;const{top:t,bottom:i,left:s,right:n}=e.threeOrtho;this.cached3DCamera.top=t,this.cached3DCamera.bottom=i,this.cached3DCamera.left=s,this.cached3DCamera.right=n}}async hidePreviousClippingPlane(){if(this.current){const e=this.current.plane;e&&(e.enabled=!1),this.current.plane.edges.visible=!1}}}y(Lt,"uuid","45b41ba3-7bb8-4e08-909f-e0fa87973965");const Dc=class _c extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"planeType","floorplan"),y(this,"onNavigated",new Y),y(this,"onExited",new Y),y(this,"enabled",!1),y(this,"currentPlan",null),y(this,"offset",1.5),y(this,"list",[]),y(this,"_cachedPlanCamera",null),this.components.add(_c.uuid,this)}get world(){return this.components.get(Lt).world}set world(e){const t=this.components.get(Lt);t.world=e}get defaultCameraOffset(){return this.components.get(Lt).offset}set defaultCameraOffset(e){const t=this.components.get(Lt);t.offset=e}dispose(){this.onExited.reset(),this.onNavigated.reset();const e=this.components.get(Lt);for(const t of this.list)e.delete(t.id);this.list=[],this.onDisposed.trigger(),this.onDisposed.reset()}async generate(e){if(!e.hasProperties)throw new Error("Properties are needed to compute plan views!");const t=await e.getAllPropertiesOfType(Dn);if(!t)throw new Error("Floorplans not found!");const i=e.coordinationMatrix.elements[13],s=await fi.getUnits(e);for(const n of Object.values(t)){const r={value:0};this.getAbsoluteFloorHeight(n.ObjectPlacement,r);const o=r.value*s+i+this.offset;this.create({name:n.Name.value,id:n.GlobalId.value,normal:new x(0,-1,0),point:new x(0,o,0)})}}create(e){const t=this.components.get(Lt);e.type=e.type||this.planeType;const i={...t.create(e),planOffset:this.offset};this.list.push(i)}async goTo(e,t=!1){this.enabled&&this.cachePlanCamera(),await this.components.get(Lt).goTo(e,t),await this.applyCachedPlanCamera();const i=this.list.find(s=>s.id===e);i&&(this.currentPlan=i),this.enabled=!0}async exitPlanView(e=!1){this.enabled&&(this.cachePlanCamera(),await this.components.get(Lt).exit(e),this.currentPlan=null,this.enabled=!1,this.onExited.trigger())}cachePlanCamera(){var e;const t=(e=this.world)==null?void 0:e.camera,i=new x,s=new x;t.controls.getTarget(i),t.controls.getPosition(s),this._cachedPlanCamera={target:i,position:s,zoom:t.threeOrtho.zoom,top:t.threeOrtho.top,right:t.threeOrtho.right,bottom:t.threeOrtho.bottom,left:t.threeOrtho.left}}async applyCachedPlanCamera(){var e;if(!this._cachedPlanCamera)return;const t=(e=this.world)==null?void 0:e.camera,{position:i,target:s}=this._cachedPlanCamera,n=new x,r=new x;t.controls.getPosition(n),t.controls.getTarget(r);const o=n.y,a=r.y;await t.controls.setLookAt(i.x,o,i.z,s.x,a,s.z),await t.controls.zoomTo(this._cachedPlanCamera.zoom),t.threeOrtho.top=this._cachedPlanCamera.top,t.threeOrtho.bottom=this._cachedPlanCamera.bottom,t.threeOrtho.left=this._cachedPlanCamera.left,t.threeOrtho.right=this._cachedPlanCamera.right,t.threeOrtho.updateProjectionMatrix()}getAbsoluteFloorHeight(e,t){const i=e.RelativePlacement.Location.Coordinates;t.value+=i[2].value,e.PlacementRelTo&&this.getAbsoluteFloorHeight(e.PlacementRelTo,t)}};y(Dc,"uuid","a80874aa-1c93-43a4-80f2-df346da086b1");let Cm=Dc;export{Br as L,Lt as O,ai as P,rm as Y,Pn as a,dm as b,um as c,Em as d,Im as f,pm as h,cp as j,fm as l,Cm as m,lm as n,hm as o,gm as p,cm as r,am as s,Es as t,mm as u,un as v}; diff --git a/examples/assets/lengthMeasurement.js b/examples/assets/lengthMeasurement.js index 8ace1e5b..587eb35f 100644 --- a/examples/assets/lengthMeasurement.js +++ b/examples/assets/lengthMeasurement.js @@ -1,4 +1,4 @@ -import{B as m,M as b,a as d}from"./web-ifc-api-CKmHUvxw.js";import{S as p}from"./stats.min-GTpOrGrX.js";import{C as u,W as h,S as w,a as k,G as g}from"./index-7--X2BWW.js";import{T as f,L as a,m as c}from"./index-ByMLC5eT.js";import{W as D,i as y}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new u,v=t.get(h),e=v.create();e.scene=new w(t);e.renderer=new D(t,r);e.camera=new k(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const x=t.get(g);x.create(e);e.scene.three.background=null;const L=new m(3,3,3),S=new b({color:"#6528D7"}),i=new d(L,S);i.position.set(0,1.5,0);e.scene.three.add(i);e.meshes.add(i);const n=t.get(y);n.world=e;n.enabled=!0;n.snapDistance=1;r.ondblclick=()=>n.create();window.onkeydown=o=>{(o.code==="Delete"||o.code==="Backspace")&&n.delete()};const s=new p;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());f.init();const l=a.create(()=>c` +import{B as m,M as b,a as d}from"./web-ifc-api-CKmHUvxw.js";import{S as p}from"./stats.min-GTpOrGrX.js";import{C as u,W as h,S as w,a as k,G as g}from"./index-7--X2BWW.js";import{T as f,L as i,m as c}from"./index-ByMLC5eT.js";import{L as D,t as y}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new u,L=t.get(h),e=L.create();e.scene=new w(t);e.renderer=new D(t,r);e.camera=new k(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const v=t.get(g);v.create(e);e.scene.three.background=null;const x=new m(3,3,3),S=new b({color:"#6528D7"}),a=new d(x,S);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const n=t.get(y);n.world=e;n.enabled=!0;n.snapDistance=1;r.ondblclick=()=>n.create();window.onkeydown=o=>{(o.code==="Delete"||o.code==="Backspace")&&n.delete()};const s=new p;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());f.init();const l=i.create(()=>c` Create dimension: Double click @@ -24,7 +24,7 @@ import{B as m,M as b,a as d}from"./web-ifc-api-CKmHUvxw.js";import{S as p}from". - `);document.body.append(l);const C=a.create(()=>c` + `);document.body.append(l);const C=i.create(()=>c` diff --git a/examples/assets/marker.js b/examples/assets/marker.js index 316f277e..ee891947 100644 --- a/examples/assets/marker.js +++ b/examples/assets/marker.js @@ -1 +1 @@ -import{V as c}from"./web-ifc-api-CKmHUvxw.js";import{C as l,W as i,S as p,a as h,G as w}from"./index-7--X2BWW.js";import{X as f,c as g}from"./index-BIn5csQH.js";import{S}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,u=t.get(i),e=u.create();e.scene=new p(t);e.renderer=new f(t,r);e.camera=new h(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);r.appendChild(e.renderer.three2D.domElement);const y=t.get(w);y.create(e);e.scene.three.background=null;const a=t.get(g);a.threshold=10;for(let o=0;o<20;o++){const s=Math.random()*5,d=Math.random()*5,m=Math.random()*5;a.create(e,"🚀",new c(s,d,m))}const n=new S;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import{V as c}from"./web-ifc-api-CKmHUvxw.js";import{C as l,W as i,S as p,a as f,G as h}from"./index-7--X2BWW.js";import{j as w,P as g}from"./index-DHdXOf4g.js";import{S}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,u=t.get(i),e=u.create();e.scene=new p(t);e.renderer=new w(t,r);e.camera=new f(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);r.appendChild(e.renderer.three2D.domElement);const y=t.get(h);y.create(e);e.scene.three.background=null;const a=t.get(g);a.threshold=10;for(let o=0;o<20;o++){const s=Math.random()*5,d=Math.random()*5,m=Math.random()*5;a.create(e,"🚀",new c(s,d,m))}const n=new S;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/plans.js b/examples/assets/plans.js index cae37e4f..5a385c15 100644 --- a/examples/assets/plans.js +++ b/examples/assets/plans.js @@ -1,4 +1,4 @@ -import{b as y,L as E,C as I}from"./web-ifc-api-CKmHUvxw.js";import{C as S,W as F,S as M,O as x,G as A,F as B,b as P,c as W}from"./index-7--X2BWW.js";import{W as D,M as U,L as G,x as O}from"./index-BIn5csQH.js";import{T,L as u,m as f}from"./index-ByMLC5eT.js";import{S as v}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const R=document.getElementById("container"),n=new S,$=n.get(F),e=$.create();e.scene=new M(n);e.renderer=new D(n,R);e.camera=new x(n);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;n.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const j=n.get(A),g=j.create(e);g.three.position.y-=1;g.config.color.setHex(6710886);e.renderer.postproduction.customEffects.excludedMeshes.push(g.three);e.scene.three.background=null;const h=n.get(B),N=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),_=await N.arrayBuffer(),q=new Uint8Array(_),s=h.load(q);e.scene.three.add(s);const z=await fetch("https://thatopen.github.io/engine_components/resources/small.json"),H=await z.json();s.setLocalProperties(H);const c=new v;c.showPanel(2);document.body.append(c.dom);c.dom.style.left="0px";c.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>c.begin());e.renderer.onAfterUpdate.add(()=>c.end());const i=n.get(U);i.world=e;await i.generate(s);const d=n.get(G);d.setup({world:e});const V=n.get(P),l=V.create(e);for(const t of s.items)l.add(t.mesh);l.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{l.needsUpdate=!0});const a=n.get(W),r=n.get(O);a.byModel(s.uuid,s);a.byEntity(s);const k=a.find({models:[s.uuid]}),b=a.find({entities:["IFCWALLSTANDARDCASE","IFCWALL"]}),w=a.find({entities:["IFCDOOR","IFCWINDOW","IFCPLATE","IFCMEMBER"]}),J=new y({color:"gray",side:2}),K=new E({color:"black"}),Q=new y({color:"black",opacity:.5,side:2,transparent:!0});r.styles.create("thick",new Set,e,K,J,Q);for(const t in b){const o=h.list.get(t);if(!o)continue;const{mesh:p}=o;r.styles.list.thick.fragments[t]=new Set(b[t]),r.styles.list.thick.meshes.add(p)}r.styles.create("thin",new Set,e);for(const t in w){const o=h.list.get(t);if(!o)continue;const{mesh:p}=o;r.styles.list.thin.fragments[t]=new Set(w[t]),r.styles.list.thin.meshes.add(p)}await r.update(!0);T.init();const C=u.create(()=>f` +import{b as y,L as E,C as I}from"./web-ifc-api-CKmHUvxw.js";import{C as S,W as F,S as A,O as B,G as P,F as M,b as x,c as D}from"./index-7--X2BWW.js";import{L as U,m as G,p as O,v as T}from"./index-DHdXOf4g.js";import{T as W,L as u,m as f}from"./index-ByMLC5eT.js";import{S as v}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const R=document.getElementById("container"),n=new S,$=n.get(F),e=$.create();e.scene=new A(n);e.renderer=new U(n,R);e.camera=new B(n);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;n.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const j=n.get(P),g=j.create(e);g.three.position.y-=1;g.config.color.setHex(6710886);e.renderer.postproduction.customEffects.excludedMeshes.push(g.three);e.scene.three.background=null;const h=n.get(M),N=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),_=await N.arrayBuffer(),q=new Uint8Array(_),s=h.load(q);e.scene.three.add(s);const z=await fetch("https://thatopen.github.io/engine_components/resources/small.json"),H=await z.json();s.setLocalProperties(H);const c=new v;c.showPanel(2);document.body.append(c.dom);c.dom.style.left="0px";c.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>c.begin());e.renderer.onAfterUpdate.add(()=>c.end());const i=n.get(G);i.world=e;await i.generate(s);const d=n.get(O);d.setup({world:e});const V=n.get(x),l=V.create(e);for(const t of s.items)l.add(t.mesh);l.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{l.needsUpdate=!0});const a=n.get(D),r=n.get(T);a.byModel(s.uuid,s);a.byEntity(s);const k=a.find({models:[s.uuid]}),b=a.find({entities:["IFCWALLSTANDARDCASE","IFCWALL"]}),w=a.find({entities:["IFCDOOR","IFCWINDOW","IFCPLATE","IFCMEMBER"]}),J=new y({color:"gray",side:2}),K=new E({color:"black"}),Q=new y({color:"black",opacity:.5,side:2,transparent:!0});r.styles.create("thick",new Set,e,K,J,Q);for(const t in b){const o=h.list.get(t);if(!o)continue;const{mesh:p}=o;r.styles.list.thick.fragments[t]=new Set(b[t]),r.styles.list.thick.meshes.add(p)}r.styles.create("thin",new Set,e);for(const t in w){const o=h.list.get(t);if(!o)continue;const{mesh:p}=o;r.styles.list.thin.fragments[t]=new Set(w[t]),r.styles.list.thin.meshes.add(p)}await r.update(!0);W.init();const C=u.create(()=>f` diff --git a/examples/assets/postproductionRenderer.js b/examples/assets/postproductionRenderer.js index fcc466a4..47bf33f4 100644 --- a/examples/assets/postproductionRenderer.js +++ b/examples/assets/postproductionRenderer.js @@ -1,4 +1,4 @@ -import{C as c}from"./web-ifc-api-CKmHUvxw.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as p,L as m,m as u}from"./index-ByMLC5eT.js";import{C as d,W as f,S as h,a as g,G as v,F as x}from"./index-7--X2BWW.js";import{W as $}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const k=document.getElementById("container"),o=new d,E=o.get(f),a=E.create();a.scene=new h(o);a.renderer=new $(o,k);a.camera=new g(o);a.scene.three.background=null;o.init();a.camera.controls.setLookAt(12,6,8,0,0,-10);a.scene.setup();const w=o.get(v),r=w.create(a);r.config.color.set(6710886);a.scene.three.background=null;const y=new x(o),S=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),C=await S.arrayBuffer(),G=new Uint8Array(C),A=y.load(G);a.scene.three.add(A);const{postproduction:n}=a.renderer;n.enabled=!0;n.customEffects.excludedMeshes.push(r.three);const s=n.n8ao.configuration,t=new b;t.showPanel(2);document.body.append(t.dom);t.dom.style.left="0px";t.dom.style.zIndex="unset";a.renderer.onBeforeUpdate.add(()=>t.begin());a.renderer.onAfterUpdate.add(()=>t.end());p.init();const l=m.create(()=>u` +import{C as c}from"./web-ifc-api-CKmHUvxw.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as p,L as m,m as u}from"./index-ByMLC5eT.js";import{C as d,W as f,S as h,a as g,G as v,F as x}from"./index-7--X2BWW.js";import{L as $}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const k=document.getElementById("container"),o=new d,E=o.get(f),a=E.create();a.scene=new h(o);a.renderer=new $(o,k);a.camera=new g(o);a.scene.three.background=null;o.init();a.camera.controls.setLookAt(12,6,8,0,0,-10);a.scene.setup();const w=o.get(v),r=w.create(a);r.config.color.set(6710886);a.scene.three.background=null;const y=new x(o),S=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),C=await S.arrayBuffer(),G=new Uint8Array(C),L=y.load(G);a.scene.three.add(L);const{postproduction:n}=a.renderer;n.enabled=!0;n.customEffects.excludedMeshes.push(r.three);const s=n.n8ao.configuration,t=new b;t.showPanel(2);document.body.append(t.dom);t.dom.style.left="0px";t.dom.style.zIndex="unset";a.renderer.onBeforeUpdate.add(()=>t.begin());a.renderer.onAfterUpdate.add(()=>t.end());p.init();const l=m.create(()=>u` - `);document.body.append(l);const R=m.create(()=>u` + `);document.body.append(l);const A=m.create(()=>u` - `);document.body.append(R); + `);document.body.append(A); diff --git a/examples/assets/sections.js b/examples/assets/sections.js index 98495cda..7f81d00d 100644 --- a/examples/assets/sections.js +++ b/examples/assets/sections.js @@ -1,13 +1,13 @@ -import{V as b,b as C,L as E,C as F}from"./web-ifc-api-CKmHUvxw.js";import{C as A,W as B,S as x,O as M,G as W,F as D,b as U,c as G}from"./index-7--X2BWW.js";import{T as O,L as p,m as f}from"./index-ByMLC5eT.js";import{S as T}from"./stats.min-GTpOrGrX.js";import{W as P,a as v,L as R,x as $}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const j=document.getElementById("container"),t=new A,N=t.get(B),e=N.create();e.scene=new x(t);e.renderer=new P(t,j);e.camera=new M(t);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const V=t.get(W),g=V.create(e);g.config.color.setHex(6710886);g.three.position.y-=1;e.renderer.postproduction.customEffects.excludedMeshes.push(g.three);e.scene.three.background=null;const h=t.get(D),_=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),q=await _.arrayBuffer(),z=new Uint8Array(q),s=h.load(z);e.scene.three.add(s);const H=await fetch("https://thatopen.github.io/engine_components/resources/small.json"),J=await H.json();s.setLocalProperties(J);const c=new T;c.showPanel(2);document.body.append(c.dom);c.dom.style.left="0px";c.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>c.begin());e.renderer.onAfterUpdate.add(()=>c.end());const d=t.get(v);d.world=e;const w=d.create({name:"Section 01",id:"1234",normal:new b(-1,0,0),point:new b(1.5,0,0)}),l=t.get(R);l.setup({world:e});const K=t.get(U),i=K.create(e);for(const n of s.items)i.add(n.mesh);i.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{i.needsUpdate=!0});const r=t.get(G),o=t.get($);r.byModel(s.uuid,s);r.byEntity(s);const S=r.find({models:[s.uuid]}),y=r.find({entities:["IFCWALLSTANDARDCASE","IFCWALL","IFCSLAB"]}),k=r.find({entities:["IFCDOOR","IFCWINDOW","IFCPLATE","IFCMEMBER"]}),Q=new C({color:"gray",side:2}),X=new E({color:"black"}),Y=new C({color:"black",opacity:.5,side:2,transparent:!0});o.styles.create("thick",new Set,e,X,Q,Y);for(const n in y){const a=h.list.get(n);if(!a)continue;const{mesh:m}=a;o.styles.list.thick.fragments[n]=new Set(y[n]),o.styles.list.thick.meshes.add(m)}o.styles.create("thin",new Set,e);for(const n in k){const a=h.list.get(n);if(!a)continue;const{mesh:m}=a;o.styles.list.thin.fragments[n]=new Set(k[n]),o.styles.list.thin.meshes.add(m)}await o.update(!0);O.init();const L=p.create(()=>f` +import{V as b,b as C,L as E,C as F}from"./web-ifc-api-CKmHUvxw.js";import{C as A,W as B,S as M,O,G as x,F as D,b as U,c as G}from"./index-7--X2BWW.js";import{T,L as u,m as f}from"./index-ByMLC5eT.js";import{S as W}from"./stats.min-GTpOrGrX.js";import{L as v,O as P,p as R,v as $}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const j=document.getElementById("container"),t=new A,N=t.get(B),e=N.create();e.scene=new M(t);e.renderer=new v(t,j);e.camera=new O(t);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const V=t.get(x),g=V.create(e);g.config.color.setHex(6710886);g.three.position.y-=1;e.renderer.postproduction.customEffects.excludedMeshes.push(g.three);e.scene.three.background=null;const h=t.get(D),_=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),q=await _.arrayBuffer(),z=new Uint8Array(q),s=h.load(z);e.scene.three.add(s);const H=await fetch("https://thatopen.github.io/engine_components/resources/small.json"),J=await H.json();s.setLocalProperties(J);const c=new W;c.showPanel(2);document.body.append(c.dom);c.dom.style.left="0px";c.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>c.begin());e.renderer.onAfterUpdate.add(()=>c.end());const d=t.get(P);d.world=e;const w=d.create({name:"Section 01",id:"1234",normal:new b(-1,0,0),point:new b(1.5,0,0)}),l=t.get(R);l.setup({world:e});const K=t.get(U),i=K.create(e);for(const n of s.items)i.add(n.mesh);i.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{i.needsUpdate=!0});const r=t.get(G),o=t.get($);r.byModel(s.uuid,s);r.byEntity(s);const S=r.find({models:[s.uuid]}),y=r.find({entities:["IFCWALLSTANDARDCASE","IFCWALL","IFCSLAB"]}),k=r.find({entities:["IFCDOOR","IFCWINDOW","IFCPLATE","IFCMEMBER"]}),Q=new C({color:"gray",side:2}),X=new E({color:"black"}),Y=new C({color:"black",opacity:.5,side:2,transparent:!0});o.styles.create("thick",new Set,e,X,Q,Y);for(const n in y){const a=h.list.get(n);if(!a)continue;const{mesh:m}=a;o.styles.list.thick.fragments[n]=new Set(y[n]),o.styles.list.thick.meshes.add(m)}o.styles.create("thin",new Set,e);for(const n in k){const a=h.list.get(n);if(!a)continue;const{mesh:m}=a;o.styles.list.thin.fragments[n]=new Set(k[n]),o.styles.list.thin.meshes.add(m)}await o.update(!0);T.init();const L=u.create(()=>f` - `);document.body.append(L);const Z=e.renderer.postproduction.customEffects.minGloss,u=new F("white"),I=L.querySelector("bim-panel-section[name='sections']"),ee=p.create(()=>f` + `);document.body.append(L);const Z=e.renderer.postproduction.customEffects.minGloss,p=new F("white"),I=L.querySelector("bim-panel-section[name='sections']"),ee=u.create(()=>f` + @click="${()=>{e.renderer.postproduction.customEffects.minGloss=.1,l.backupColor=p,r.setColor(S,p),e.scene.three.background=p,d.goTo(w.id),i.needsUpdate=!0}}"> - `);I.append(ee);const te=e.scene.three.background,ne=p.create(()=>f` + `);I.append(ee);const te=e.scene.three.background,ne=u.create(()=>f` diff --git a/examples/assets/shadowDropper.js b/examples/assets/shadowDropper.js index 5035696b..77dc4900 100644 --- a/examples/assets/shadowDropper.js +++ b/examples/assets/shadowDropper.js @@ -1,4 +1,4 @@ -import{B as m,M as p,a as u,C as b}from"./web-ifc-api-CKmHUvxw.js";import{C as h,W as w,S as f,a as g,G as S}from"./index-7--X2BWW.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{T as v,L as c,m as d}from"./index-ByMLC5eT.js";import{X as y,T as C}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const l=document.getElementById("container"),o=new h,$=o.get(w),e=$.create();e.scene=new f(o);e.renderer=new y(o,l);e.camera=new g(o);e.scene.setup();o.init();e.camera.controls.setLookAt(5,5,5,0,0,0);l.appendChild(e.renderer.three2D.domElement);const E=o.get(S),L=E.create(e);L.config.color.setHex(14540253);const M=new m(3,3,3),T=new p({color:"#6528D7"}),n=new u(M,T);n.position.set(0,1.5,0);e.scene.three.add(n);e.meshes.add(n);e.scene.three.background=new b("white");const t=o.get(C);t.shadowExtraScaleFactor=15;t.shadowOffset=.1;const a="example";t.create([n],a,e);const s=new x;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());v.init();const i=c.create(()=>d` +import{B as m,M as p,a as u,C as b}from"./web-ifc-api-CKmHUvxw.js";import{C as h,W as w,S as f,a as g,G as S}from"./index-7--X2BWW.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{T as v,L as c,m as l}from"./index-ByMLC5eT.js";import{j as y,s as C}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const d=document.getElementById("container"),o=new h,$=o.get(w),e=$.create();e.scene=new f(o);e.renderer=new y(o,d);e.camera=new g(o);e.scene.setup();o.init();e.camera.controls.setLookAt(5,5,5,0,0,0);d.appendChild(e.renderer.three2D.domElement);const E=o.get(S),L=E.create(e);L.config.color.setHex(14540253);const M=new m(3,3,3),B=new p({color:"#6528D7"}),n=new u(M,B);n.position.set(0,1.5,0);e.scene.three.add(n);e.meshes.add(n);e.scene.three.background=new b("white");const t=o.get(C);t.shadowExtraScaleFactor=15;t.shadowOffset=.1;const a="example";t.create([n],a,e);const s=new x;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());v.init();const i=c.create(()=>l` @@ -22,8 +22,8 @@ import{B as m,M as p,a as u,C as b}from"./web-ifc-api-CKmHUvxw.js";import{C as h - `);document.body.append(i);const B=c.create(()=>d` + `);document.body.append(i);const G=c.create(()=>l` - `);document.body.append(B); + `);document.body.append(G); diff --git a/examples/assets/volumeMeasurement.js b/examples/assets/volumeMeasurement.js index b01d63cd..07fff72c 100644 --- a/examples/assets/volumeMeasurement.js +++ b/examples/assets/volumeMeasurement.js @@ -1 +1 @@ -import"./web-ifc-api-CKmHUvxw.js";import{S as c}from"./stats.min-GTpOrGrX.js";import{C as d,W as m,S as l,a as i,G as g,F as p}from"./index-7--X2BWW.js";import{W as f,O as u,L as w}from"./index-BIn5csQH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new d,b=t.get(m),e=b.create();e.scene=new l(t);e.renderer=new f(t,h);e.camera=new i(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const y=t.get(g);y.create(e);e.scene.three.background=null;const S=new p(t),C=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),F=await C.arrayBuffer(),W=new Uint8Array(F),v=S.load(W);e.scene.three.add(v);const o=t.get(u);o.world=e;o.enabled=!0;const s=t.get(w);s.setup({world:e});s.events.select.onHighlight.add(a=>{const r=o.getVolumeFromFragments(a);console.log(r)});s.events.select.onClear.add(()=>{o.clear()});const n=new c;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import"./web-ifc-api-CKmHUvxw.js";import{S as c}from"./stats.min-GTpOrGrX.js";import{C as d,W as m,S as l,a as i,G as g,F as p}from"./index-7--X2BWW.js";import{L as f,h,p as u}from"./index-DHdXOf4g.js";import"./_commonjsHelpers-Cpj98o6Y.js";const w=document.getElementById("container"),t=new d,b=t.get(m),e=b.create();e.scene=new l(t);e.renderer=new f(t,w);e.camera=new i(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const y=t.get(g);y.create(e);e.scene.three.background=null;const S=new p(t),C=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),F=await C.arrayBuffer(),v=new Uint8Array(F),A=S.load(v);e.scene.three.add(A);const o=t.get(h);o.world=e;o.enabled=!0;const s=t.get(u);s.setup({world:e});s.events.select.onHighlight.add(a=>{const r=o.getVolumeFromFragments(a);console.log(r)});s.events.select.onClear.add(()=>{o.clear()});const n=new c;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/worlds.js b/examples/assets/worlds.js index a5850af8..a95f95dc 100644 --- a/examples/assets/worlds.js +++ b/examples/assets/worlds.js @@ -1,26 +1,26 @@ -import{Z as p,B as u,a as b,d as g,av as f,e as w,f as y,L as h,w as L,V as v,C}from"./web-ifc-api-CKmHUvxw.js";import{T as S,L as l,m as c}from"./index-ByMLC5eT.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{C as B,W as M,S as A}from"./index-BGVa1Y3B.js";import{S as k,a as D}from"./simple-renderer-CKpUJy5R.js";import"./_commonjsHelpers-Cpj98o6Y.js";const I=document.getElementById("container"),n=new B,P=n.get(M),e=P.create();e.scene=new k(n);e.renderer=new D(n,I);e.camera=new A(n);n.init();e.scene.setup();e.scene.three.background=null;const U=new p({color:"#6528D7",transparent:!0,opacity:.2}),G=new u,t=new b(G,U);e.scene.three.add(t);t.rotation.x+=Math.PI/4.2;t.rotation.y+=Math.PI/4.2;t.rotation.z+=Math.PI/4.2;t.updateMatrixWorld();const W=new Float32Array(3e5),r=new g(W,3,!1);r.setUsage(f);const m=new w;m.setAttribute("position",r);const i=new y(m,new h({color:"red",linewidth:.001}));i.frustumCulled=!1;e.scene.three.add(i);const $=new L(new v(0,0,1),0),d=n.get(void 0);d.plane=$;const{index:T}=d.generate({meshes:[t],posAttr:r});i.geometry.setDrawRange(0,T);r.needsUpdate=!0;console.log(i);e.camera.controls.setLookAt(3,3,3,0,0,0);const o=new x;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());S.init();const a=l.create(()=>c` +import{Z as l,B as c,a as m,C as d}from"./web-ifc-api-CKmHUvxw.js";import{T as p,L as s,m as r}from"./index-ByMLC5eT.js";import{S as u}from"./stats.min-GTpOrGrX.js";import{C as b,W as g,S as h}from"./index-BGVa1Y3B.js";import{S as y,a as f}from"./simple-renderer-CKpUJy5R.js";import"./_commonjsHelpers-Cpj98o6Y.js";const w=document.getElementById("container"),o=new b,L=o.get(g),e=L.create();e.scene=new y(o);e.renderer=new f(o,w);e.camera=new h(o);o.init();e.scene.setup();e.scene.three.background=null;const v=new l({color:"#6528D7",transparent:!0,opacity:.2}),C=new c,i=new m(C,v);e.scene.three.add(i);i.rotation.x+=Math.PI/4.2;i.rotation.y+=Math.PI/4.2;i.rotation.z+=Math.PI/4.2;i.updateMatrixWorld();e.camera.controls.setLookAt(3,3,3,0,0,0);const n=new u;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());p.init();const a=s.create(()=>r` + @input="${({target:t})=>{e.scene.config.backgroundColor=new d(t.color)}}"> + @change="${({target:t})=>{e.scene.config.directionalLight.intensity=t.value}}"> + @change="${({target:t})=>{e.scene.config.ambientLight.intensity=t.value}}"> - `);document.body.append(a);const z=l.create(()=>c` + `);document.body.append(a);const S=s.create(()=>r` - `);document.body.append(z); + `);document.body.append(S); diff --git a/packages/core/src/core/Worlds/example.ts b/packages/core/src/core/Worlds/example.ts index 64a3d6a3..27a0892d 100644 --- a/packages/core/src/core/Worlds/example.ts +++ b/packages/core/src/core/Worlds/example.ts @@ -120,36 +120,6 @@ cube.rotation.y += Math.PI / 4.2; cube.rotation.z += Math.PI / 4.2; cube.updateMatrixWorld(); -const buffer = new Float32Array(300000); -const posAttr = new THREE.BufferAttribute(buffer, 3, false); -posAttr.setUsage(THREE.DynamicDrawUsage); - -const edgesGeometry = new THREE.BufferGeometry(); -edgesGeometry.setAttribute("position", posAttr); - -const edges = new THREE.LineSegments( - edgesGeometry, - new THREE.LineBasicMaterial({ color: "red", linewidth: 0.001 }), -); - -edges.frustumCulled = false; - -world.scene.three.add(edges); - -const plane = new THREE.Plane(new THREE.Vector3(0, 0, 1), 0); -const edgeGenerator = components.get(OBC.EdgeGenerator); -edgeGenerator.plane = plane; - -const { index } = edgeGenerator.generate({ - meshes: [cube], - posAttr, -}); - -edges.geometry.setDrawRange(0, index); -posAttr.needsUpdate = true; -console.log(edges); - - /* MD Finally, we will make the camera look at the cube: diff --git a/packages/front/package.json b/packages/front/package.json index f2c5483e..2dfded92 100644 --- a/packages/front/package.json +++ b/packages/front/package.json @@ -54,4 +54,4 @@ "n8ao": "1.5.1", "postprocessing": "6.34.2" } -} \ No newline at end of file +}