@ifc-lite/viewer 1.25.2 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/.turbo/turbo-build.log +40 -30
  2. package/CHANGELOG.md +110 -0
  3. package/dist/assets/{basketViewActivator-CTgyKI3U.js → basketViewActivator-B3CdrLsb.js} +7 -7
  4. package/dist/assets/{bcf-7jQby1qi.js → bcf-QeHK_Aud.js} +5 -5
  5. package/dist/assets/{browser-DXS29_v9.js → browser-BIoDDfBW.js} +1 -1
  6. package/dist/assets/{cesium-BoVuJvTC.js → cesium-CzZn5yVA.js} +319 -319
  7. package/dist/assets/{deflate-Cfp9t1Df.js → deflate-B-d0SYQM.js} +1 -1
  8. package/dist/assets/exceljs.min-DsuzKYnj.js +29 -0
  9. package/dist/assets/{exporters-DfSvJPi4.js → exporters-B4LbZFeT.js} +1434 -1179
  10. package/dist/assets/geometry.worker-BdH-E6NB.js +1 -0
  11. package/dist/assets/{geotiff-xZoE8BkO.js → geotiff-CrVtDRFq.js} +10 -10
  12. package/dist/assets/html2canvas.esm-Ge7aVWlp.js +5 -0
  13. package/dist/assets/{ids-Cu73hD0Y.js → ids-DjsGFN10.js} +21 -21
  14. package/dist/assets/ifc-lite_bg-DsYUIHm3.wasm +0 -0
  15. package/dist/assets/{index-WSbA5iy6.js → index-COYokSKc.js} +44122 -38782
  16. package/dist/assets/index-ajK6D32J.css +1 -0
  17. package/dist/assets/index.es-CY202jA3.js +6866 -0
  18. package/dist/assets/{jpeg-DhwFEbqb.js → jpeg-D4wOkf5h.js} +1 -1
  19. package/dist/assets/jspdf.es.min-DIGb9BHN.js +19571 -0
  20. package/dist/assets/jspdf.plugin.autotable-BBLUVd7n.js +2 -0
  21. package/dist/assets/{lerc-Dz6BXOVb.js → lerc-DmW0_tgf.js} +1 -1
  22. package/dist/assets/{lzw-C9z0fG2o.js → lzw-oWetY-d6.js} +1 -1
  23. package/dist/assets/{maplibre-gl-Do6O5tDc.js → maplibre-gl-BF3Z0idw.js} +1 -1
  24. package/dist/assets/{native-bridge-RvDmzO-2.js → native-bridge-BX8_tHXE.js} +1 -1
  25. package/dist/assets/{packbits-jfwifz7C.js → packbits-F8Nkp4NY.js} +1 -1
  26. package/dist/assets/{pako.esm-Cram60i4.js → pako.esm-n3Pgozwg.js} +1 -1
  27. package/dist/assets/{parser.worker-C594dWxH.js → parser.worker-D591Zu_-.js} +3 -3
  28. package/dist/assets/pdf-Dsh3HPZB.js +135 -0
  29. package/dist/assets/raw-D9iw0tmc.js +1 -0
  30. package/dist/assets/{sandbox-DDSZ7rek.js → sandbox-BAC3a-eN.js} +4235 -2716
  31. package/dist/assets/server-client-Cjwnm7il.js +706 -0
  32. package/dist/assets/{webimage-XFHVyVtC.js → webimage-BLV1dgmd.js} +1 -1
  33. package/dist/assets/xlsx-Bc2HTrjC.js +142 -0
  34. package/dist/assets/{zip-BJqVbRkU.js → zip-DFgP-l20.js} +1 -1
  35. package/dist/assets/{zstd-3q5qcl5V.js → zstd-C_1HxVrA.js} +1 -1
  36. package/dist/index.html +8 -8
  37. package/package.json +13 -9
  38. package/src/components/extensions/FlavorDialog.tsx +18 -2
  39. package/src/components/extensions/FlavorListView.tsx +12 -3
  40. package/src/components/mcp/PlaygroundChat.tsx +1 -0
  41. package/src/components/mcp/data.ts +6 -0
  42. package/src/components/mcp/playground-dispatcher.ts +277 -0
  43. package/src/components/mcp/types.ts +2 -1
  44. package/src/components/ui/combo-input.tsx +163 -0
  45. package/src/components/ui/tabs.tsx +1 -1
  46. package/src/components/viewer/ClashBcfExportDialog.tsx +271 -0
  47. package/src/components/viewer/ClashPanel.tsx +370 -0
  48. package/src/components/viewer/ClashSettingsDialog.tsx +407 -0
  49. package/src/components/viewer/CommandPalette.tsx +14 -15
  50. package/src/components/viewer/MainToolbar.tsx +155 -175
  51. package/src/components/viewer/PropertiesPanel.tsx +13 -6
  52. package/src/components/viewer/SearchInline.tsx +62 -2
  53. package/src/components/viewer/SearchModal.filter.builder.tsx +24 -393
  54. package/src/components/viewer/SearchModal.filter.editors.tsx +503 -0
  55. package/src/components/viewer/SearchModal.filter.tsx +64 -1
  56. package/src/components/viewer/SearchModal.tsx +19 -6
  57. package/src/components/viewer/ViewerLayout.tsx +5 -0
  58. package/src/components/viewer/Viewport.tsx +64 -9
  59. package/src/components/viewer/ViewportContainer.tsx +45 -3
  60. package/src/components/viewer/bcf/BCFOverlay.tsx +5 -4
  61. package/src/components/viewer/lists/ColumnHeaderMenu.tsx +84 -0
  62. package/src/components/viewer/lists/ListBuilder.tsx +789 -280
  63. package/src/components/viewer/lists/ListGroupingBar.tsx +72 -0
  64. package/src/components/viewer/lists/ListPanel.tsx +49 -5
  65. package/src/components/viewer/lists/ListResultsTable.tsx +270 -176
  66. package/src/components/viewer/lists/list-table-utils.ts +123 -0
  67. package/src/components/viewer/useGeometryStreaming.ts +21 -1
  68. package/src/generated/mcp-catalog.json +4 -0
  69. package/src/hooks/ingest/streamCleanup.test.ts +41 -0
  70. package/src/hooks/ingest/streamCleanup.ts +45 -0
  71. package/src/hooks/ingest/viewerModelIngest.ts +64 -42
  72. package/src/hooks/ingest/watchedGeometryStream.test.ts +78 -0
  73. package/src/hooks/ingest/watchedGeometryStream.ts +76 -0
  74. package/src/hooks/source-key.ts +35 -0
  75. package/src/hooks/useAlignmentLines3D.ts +139 -0
  76. package/src/hooks/useClash.ts +420 -0
  77. package/src/hooks/useGridLines3D.ts +140 -0
  78. package/src/hooks/useIfcFederation.ts +16 -2
  79. package/src/hooks/useIfcLoader.ts +5 -7
  80. package/src/lib/clash/persistence.ts +308 -0
  81. package/src/lib/geo/effective-georef.test.ts +66 -0
  82. package/src/lib/length-unit-scale.ts +41 -0
  83. package/src/lib/lists/adapter.ts +136 -11
  84. package/src/lib/lists/export/csv.ts +47 -0
  85. package/src/lib/lists/export/index.ts +49 -0
  86. package/src/lib/lists/export/model.ts +111 -0
  87. package/src/lib/lists/export/pdf.ts +67 -0
  88. package/src/lib/lists/export/xlsx.ts +83 -0
  89. package/src/lib/lists/index.ts +2 -0
  90. package/src/lib/search/filter-evaluate.test.ts +81 -0
  91. package/src/lib/search/filter-evaluate.ts +59 -87
  92. package/src/lib/search/filter-match.ts +167 -0
  93. package/src/lib/search/filter-rules.test.ts +25 -0
  94. package/src/lib/search/filter-rules.ts +75 -2
  95. package/src/lib/search/filter-schema.ts +0 -0
  96. package/src/lib/slab-edit.test.ts +72 -0
  97. package/src/lib/slab-edit.ts +159 -19
  98. package/src/sdk/adapters/export-adapter.ts +3 -3
  99. package/src/sdk/adapters/query-adapter.ts +3 -3
  100. package/src/services/extensions/host.ts +13 -0
  101. package/src/store/constants.ts +33 -25
  102. package/src/store/index.ts +29 -8
  103. package/src/store/slices/clashSlice.ts +251 -0
  104. package/src/store/slices/listSlice.ts +6 -0
  105. package/src/store/slices/mutationSlice.ts +14 -6
  106. package/src/store/slices/searchSlice.ts +29 -3
  107. package/src/store/slices/visibilitySlice.test.ts +23 -5
  108. package/src/store/slices/visibilitySlice.ts +18 -8
  109. package/src/utils/nativeSpatialDataStore.ts +6 -0
  110. package/src/utils/serverDataModel.test.ts +6 -0
  111. package/src/utils/serverDataModel.ts +7 -0
  112. package/dist/assets/geometry.worker-Cyn5BybV.js +0 -1
  113. package/dist/assets/ifc-lite_bg-ksLBP5cA.wasm +0 -0
  114. package/dist/assets/index-Bws3UAkj.css +0 -1
  115. package/dist/assets/raw-R2QfzPAR.js +0 -1
  116. package/dist/assets/server-client-Ctk8_Bof.js +0 -626
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-bridge-RvDmzO-2.js","assets/sandbox-DDSZ7rek.js","assets/lens-PYsLu_MA.js"])))=>i.map(i=>d[i]);
2
- import { K as Ge, _ as $e, aF as st, a3 as Ve, a4 as ze, j as tt, k as Ct, aI as Me, E as ke, ad as ee, ah as Ye, ae as We, aB as je, O as He, i as ne, h as Xe, __tla as __tla_0 } from "./sandbox-DDSZ7rek.js";
3
- let rs, is, Le, as, qn, Pe, ss, In, cs, ie, os, ns;
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-bridge-BX8_tHXE.js","assets/sandbox-BAC3a-eN.js","assets/lens-PYsLu_MA.js"])))=>i.map(i=>d[i]);
2
+ import { V as We, _ as je, aT as nt, a9 as ke, aa as Ye, l as et, m as bt, aW as Ue, E as He, al as se, ap as Xe, am as qe, aO as Qe, X as Je, k as ie, j as Ke, __tla as __tla_0 } from "./sandbox-BAC3a-eN.js";
3
+ let ds, ls, Be, us, ts, Ge, cs, En, hs, oe, fs, as;
4
4
  let __tla = Promise.all([
5
5
  (()=>{
6
6
  try {
@@ -8,72 +8,75 @@ let __tla = Promise.all([
8
8
  } catch {}
9
9
  })()
10
10
  ]).then(async ()=>{
11
- let c;
12
- function P(r) {
13
- St === rt.length && rt.push(rt.length + 1);
14
- const t = St;
15
- return St = rt[t], rt[t] = r, t;
11
+ let a;
12
+ function U(r) {
13
+ Nt === ot.length && ot.push(ot.length + 1);
14
+ const t = Nt;
15
+ return Nt = ot[t], ot[t] = r, t;
16
16
  }
17
- function qe(r) {
17
+ function Ze(r) {
18
18
  if (kt == 1) throw new Error("out of js stack");
19
- return rt[--kt] = r, kt;
19
+ return ot[--kt] = r, kt;
20
20
  }
21
- const de = typeof FinalizationRegistry > "u" ? {
21
+ const ue = typeof FinalizationRegistry > "u" ? {
22
22
  register: ()=>{},
23
23
  unregister: ()=>{}
24
24
  } : new FinalizationRegistry((r)=>r.dtor(r.a, r.b));
25
- function Qe(r) {
26
- r < 132 || (rt[r] = St, St = r);
25
+ function tn(r) {
26
+ r < 132 || (ot[r] = Nt, Nt = r);
27
27
  }
28
- function se(r, t) {
29
- return r = r >>> 0, Ke().subarray(r / 4, r / 4 + t);
28
+ function re(r, t) {
29
+ return r = r >>> 0, sn().subarray(r / 4, r / 4 + t);
30
30
  }
31
- function Je(r, t) {
32
- return r = r >>> 0, Ze().subarray(r / 8, r / 8 + t);
31
+ function en(r, t) {
32
+ return r = r >>> 0, rn().subarray(r / 8, r / 8 + t);
33
33
  }
34
- function xe(r, t) {
35
- return r = r >>> 0, Be().subarray(r / 4, r / 4 + t);
34
+ function De(r, t) {
35
+ return r = r >>> 0, ve().subarray(r / 4, r / 4 + t);
36
36
  }
37
- let It = null;
37
+ function nn(r, t) {
38
+ return r = r >>> 0, Ct().subarray(r / 1, r / 1 + t);
39
+ }
40
+ let _t = null;
38
41
  function A() {
39
- return (It === null || It.buffer.detached === !0 || It.buffer.detached === void 0 && It.buffer !== c.memory.buffer) && (It = new DataView(c.memory.buffer)), It;
42
+ return (_t === null || _t.buffer.detached === !0 || _t.buffer.detached === void 0 && _t.buffer !== a.memory.buffer) && (_t = new DataView(a.memory.buffer)), _t;
40
43
  }
41
44
  let Tt = null;
42
- function Ke() {
43
- return (Tt === null || Tt.byteLength === 0) && (Tt = new Float32Array(c.memory.buffer)), Tt;
45
+ function sn() {
46
+ return (Tt === null || Tt.byteLength === 0) && (Tt = new Float32Array(a.memory.buffer)), Tt;
44
47
  }
45
- let wt = null;
46
- function Ze() {
47
- return (wt === null || wt.byteLength === 0) && (wt = new Float64Array(c.memory.buffer)), wt;
48
+ let Ft = null;
49
+ function rn() {
50
+ return (Ft === null || Ft.byteLength === 0) && (Ft = new Float64Array(a.memory.buffer)), Ft;
48
51
  }
49
52
  function J(r, t) {
50
- return r = r >>> 0, nn(r, t);
51
- }
52
- let Ft = null;
53
- function Be() {
54
- return (Ft === null || Ft.byteLength === 0) && (Ft = new Uint32Array(c.memory.buffer)), Ft;
53
+ return r = r >>> 0, cn(r, t);
55
54
  }
56
55
  let Rt = null;
57
- function Nt() {
58
- return (Rt === null || Rt.byteLength === 0) && (Rt = new Uint8Array(c.memory.buffer)), Rt;
56
+ function ve() {
57
+ return (Rt === null || Rt.byteLength === 0) && (Rt = new Uint32Array(a.memory.buffer)), Rt;
58
+ }
59
+ let St = null;
60
+ function Ct() {
61
+ return (St === null || St.byteLength === 0) && (St = new Uint8Array(a.memory.buffer)), St;
59
62
  }
60
63
  function k(r) {
61
- return rt[r];
64
+ return ot[r];
62
65
  }
63
- function Xt(r, t) {
66
+ function Qt(r, t) {
64
67
  try {
65
68
  return r.apply(this, t);
66
69
  } catch (e) {
67
- c.__wbindgen_export(P(e));
70
+ a.__wbindgen_export(U(e));
68
71
  }
69
72
  }
70
- let rt = new Array(128).fill(void 0);
71
- rt.push(void 0, null, !0, !1);
72
- let St = rt.length;
73
- function $t(r) {
73
+ let ot = new Array(128).fill(void 0);
74
+ ot.push(void 0, null, !0, !1);
75
+ let Nt = ot.length;
76
+ function zt(r) {
74
77
  return r == null;
75
78
  }
76
- function tn(r, t, e, n) {
79
+ function on(r, t, e, n) {
77
80
  const s = {
78
81
  a: r,
79
82
  b: t,
@@ -81,63 +84,63 @@ let __tla = Promise.all([
81
84
  dtor: e
82
85
  }, i = (...o)=>{
83
86
  s.cnt++;
84
- const a = s.a;
87
+ const c = s.a;
85
88
  s.a = 0;
86
89
  try {
87
- return n(a, s.b, ...o);
90
+ return n(c, s.b, ...o);
88
91
  } finally{
89
- s.a = a, i._wbg_cb_unref();
92
+ s.a = c, i._wbg_cb_unref();
90
93
  }
91
94
  };
92
95
  return i._wbg_cb_unref = ()=>{
93
- --s.cnt === 0 && (s.dtor(s.a, s.b), s.a = 0, de.unregister(s));
94
- }, de.register(i, s, s), i;
96
+ --s.cnt === 0 && (s.dtor(s.a, s.b), s.a = 0, ue.unregister(s));
97
+ }, ue.register(i, s, s), i;
95
98
  }
96
- function ft(r, t) {
99
+ function ut(r, t) {
97
100
  const e = t(r.length * 4, 4) >>> 0;
98
- return Be().set(r, e / 4), Y = r.length, e;
101
+ return ve().set(r, e / 4), G = r.length, e;
99
102
  }
100
- function pt(r, t) {
103
+ function It(r, t) {
101
104
  const e = t(r.length * 1, 1) >>> 0;
102
- return Nt().set(r, e / 1), Y = r.length, e;
105
+ return Ct().set(r, e / 1), G = r.length, e;
103
106
  }
104
- function gt(r, t, e) {
107
+ function ct(r, t, e) {
105
108
  if (e === void 0) {
106
- const a = At.encode(r), l = t(a.length, 1) >>> 0;
107
- return Nt().subarray(l, l + a.length).set(a), Y = a.length, l;
109
+ const c = At.encode(r), l = t(c.length, 1) >>> 0;
110
+ return Ct().subarray(l, l + c.length).set(c), G = c.length, l;
108
111
  }
109
112
  let n = r.length, s = t(n, 1) >>> 0;
110
- const i = Nt();
113
+ const i = Ct();
111
114
  let o = 0;
112
115
  for(; o < n; o++){
113
- const a = r.charCodeAt(o);
114
- if (a > 127) break;
115
- i[s + o] = a;
116
+ const c = r.charCodeAt(o);
117
+ if (c > 127) break;
118
+ i[s + o] = c;
116
119
  }
117
120
  if (o !== n) {
118
121
  o !== 0 && (r = r.slice(o)), s = e(s, n, n = o + r.length * 3, 1) >>> 0;
119
- const a = Nt().subarray(s + o, s + n), l = At.encodeInto(r, a);
122
+ const c = Ct().subarray(s + o, s + n), l = At.encodeInto(r, c);
120
123
  o += l.written, s = e(s, n, o, 1) >>> 0;
121
124
  }
122
- return Y = o, s;
125
+ return G = o, s;
123
126
  }
124
127
  let kt = 128;
125
- function W(r) {
128
+ function D(r) {
126
129
  const t = k(r);
127
- return Qe(r), t;
130
+ return tn(r), t;
128
131
  }
129
132
  let Yt = new TextDecoder("utf-8", {
130
133
  ignoreBOM: !0,
131
134
  fatal: !0
132
135
  });
133
136
  Yt.decode();
134
- const en = 2146435072;
135
- let qt = 0;
136
- function nn(r, t) {
137
- return qt += t, qt >= en && (Yt = new TextDecoder("utf-8", {
137
+ const an = 2146435072;
138
+ let Jt = 0;
139
+ function cn(r, t) {
140
+ return Jt += t, Jt >= an && (Yt = new TextDecoder("utf-8", {
138
141
  ignoreBOM: !0,
139
142
  fatal: !0
140
- }), Yt.decode(), qt = t), Yt.decode(Nt().subarray(r, r + t));
143
+ }), Yt.decode(), Jt = t), Yt.decode(Ct().subarray(r, r + t));
141
144
  }
142
145
  const At = new TextEncoder;
143
146
  "encodeInto" in At || (At.encodeInto = function(r, t) {
@@ -147,719 +150,829 @@ let __tla = Promise.all([
147
150
  written: e.length
148
151
  };
149
152
  });
150
- let Y = 0;
151
- function sn(r, t, e) {
152
- c.__wasm_bindgen_func_elem_1685(r, t, P(e));
153
+ let G = 0;
154
+ function ln(r, t, e) {
155
+ a.__wasm_bindgen_func_elem_654(r, t, U(e));
153
156
  }
154
- function rn(r, t, e, n) {
155
- c.__wasm_bindgen_func_elem_1832(r, t, P(e), P(n));
157
+ function dn(r, t, e, n) {
158
+ a.__wasm_bindgen_func_elem_688(r, t, U(e), U(n));
156
159
  }
157
- const fe = typeof FinalizationRegistry > "u" ? {
160
+ typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>a.__wbg_clashrunresult_free(r >>> 0, 1));
161
+ typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>a.__wbg_clashsession_free(r >>> 0, 1));
162
+ const he = typeof FinalizationRegistry > "u" ? {
163
+ register: ()=>{},
164
+ unregister: ()=>{}
165
+ } : new FinalizationRegistry((r)=>a.__wbg_gridaxiscollection_free(r >>> 0, 1)), pe = typeof FinalizationRegistry > "u" ? {
158
166
  register: ()=>{},
159
167
  unregister: ()=>{}
160
- } : new FinalizationRegistry((r)=>c.__wbg_ifcapi_free(r >>> 0, 1)), ue = typeof FinalizationRegistry > "u" ? {
168
+ } : new FinalizationRegistry((r)=>a.__wbg_gridaxisjs_free(r >>> 0, 1)), Ie = typeof FinalizationRegistry > "u" ? {
161
169
  register: ()=>{},
162
170
  unregister: ()=>{}
163
- } : new FinalizationRegistry((r)=>c.__wbg_meshcollection_free(r >>> 0, 1)), he = typeof FinalizationRegistry > "u" ? {
171
+ } : new FinalizationRegistry((r)=>a.__wbg_ifcapi_free(r >>> 0, 1)), _e = typeof FinalizationRegistry > "u" ? {
164
172
  register: ()=>{},
165
173
  unregister: ()=>{}
166
- } : new FinalizationRegistry((r)=>c.__wbg_meshdatajs_free(r >>> 0, 1)), pe = typeof FinalizationRegistry > "u" ? {
174
+ } : new FinalizationRegistry((r)=>a.__wbg_meshcollection_free(r >>> 0, 1)), ge = typeof FinalizationRegistry > "u" ? {
167
175
  register: ()=>{},
168
176
  unregister: ()=>{}
169
- } : new FinalizationRegistry((r)=>c.__wbg_profilecollection_free(r >>> 0, 1)), Ie = typeof FinalizationRegistry > "u" ? {
177
+ } : new FinalizationRegistry((r)=>a.__wbg_meshdatajs_free(r >>> 0, 1)), ye = typeof FinalizationRegistry > "u" ? {
170
178
  register: ()=>{},
171
179
  unregister: ()=>{}
172
- } : new FinalizationRegistry((r)=>c.__wbg_profileentryjs_free(r >>> 0, 1)), ge = typeof FinalizationRegistry > "u" ? {
180
+ } : new FinalizationRegistry((r)=>a.__wbg_profilecollection_free(r >>> 0, 1)), me = typeof FinalizationRegistry > "u" ? {
173
181
  register: ()=>{},
174
182
  unregister: ()=>{}
175
- } : new FinalizationRegistry((r)=>c.__wbg_symboliccircle_free(r >>> 0, 1)), _e = typeof FinalizationRegistry > "u" ? {
183
+ } : new FinalizationRegistry((r)=>a.__wbg_profileentryjs_free(r >>> 0, 1)), Ee = typeof FinalizationRegistry > "u" ? {
176
184
  register: ()=>{},
177
185
  unregister: ()=>{}
178
- } : new FinalizationRegistry((r)=>c.__wbg_symbolicfillarea_free(r >>> 0, 1)), ye = typeof FinalizationRegistry > "u" ? {
186
+ } : new FinalizationRegistry((r)=>a.__wbg_symboliccircle_free(r >>> 0, 1)), be = typeof FinalizationRegistry > "u" ? {
179
187
  register: ()=>{},
180
188
  unregister: ()=>{}
181
- } : new FinalizationRegistry((r)=>c.__wbg_symbolicpolyline_free(r >>> 0, 1)), Ee = typeof FinalizationRegistry > "u" ? {
189
+ } : new FinalizationRegistry((r)=>a.__wbg_symbolicfillarea_free(r >>> 0, 1)), Ce = typeof FinalizationRegistry > "u" ? {
182
190
  register: ()=>{},
183
191
  unregister: ()=>{}
184
- } : new FinalizationRegistry((r)=>c.__wbg_symbolicrepresentationcollection_free(r >>> 0, 1)), me = typeof FinalizationRegistry > "u" ? {
192
+ } : new FinalizationRegistry((r)=>a.__wbg_symbolicpolyline_free(r >>> 0, 1)), we = typeof FinalizationRegistry > "u" ? {
185
193
  register: ()=>{},
186
194
  unregister: ()=>{}
187
- } : new FinalizationRegistry((r)=>c.__wbg_symbolictext_free(r >>> 0, 1));
188
- ie = class {
195
+ } : new FinalizationRegistry((r)=>a.__wbg_symbolicrepresentationcollection_free(r >>> 0, 1)), Te = typeof FinalizationRegistry > "u" ? {
196
+ register: ()=>{},
197
+ unregister: ()=>{}
198
+ } : new FinalizationRegistry((r)=>a.__wbg_symbolictext_free(r >>> 0, 1));
199
+ class Ot {
200
+ static __wrap(t) {
201
+ t = t >>> 0;
202
+ const e = Object.create(Ot.prototype);
203
+ return e.__wbg_ptr = t, he.register(e, e.__wbg_ptr, e), e;
204
+ }
189
205
  __destroy_into_raw() {
190
206
  const t = this.__wbg_ptr;
191
- return this.__wbg_ptr = 0, fe.unregister(this), t;
207
+ return this.__wbg_ptr = 0, he.unregister(this), t;
192
208
  }
193
209
  free() {
194
210
  const t = this.__destroy_into_raw();
195
- c.__wbg_ifcapi_free(t, 0);
211
+ a.__wbg_gridaxiscollection_free(t, 0);
212
+ }
213
+ get length() {
214
+ return a.gridaxiscollection_length(this.__wbg_ptr) >>> 0;
215
+ }
216
+ getAxis(t) {
217
+ const e = a.gridaxiscollection_getAxis(this.__wbg_ptr, t);
218
+ return e === 0 ? void 0 : xt.__wrap(e);
219
+ }
220
+ get isEmpty() {
221
+ return a.gridaxiscollection_isEmpty(this.__wbg_ptr) !== 0;
222
+ }
223
+ }
224
+ Symbol.dispose && (Ot.prototype[Symbol.dispose] = Ot.prototype.free);
225
+ class xt {
226
+ static __wrap(t) {
227
+ t = t >>> 0;
228
+ const e = Object.create(xt.prototype);
229
+ return e.__wbg_ptr = t, pe.register(e, e.__wbg_ptr, e), e;
230
+ }
231
+ __destroy_into_raw() {
232
+ const t = this.__wbg_ptr;
233
+ return this.__wbg_ptr = 0, pe.unregister(this), t;
234
+ }
235
+ free() {
236
+ const t = this.__destroy_into_raw();
237
+ a.__wbg_gridaxisjs_free(t, 0);
238
+ }
239
+ get end() {
240
+ const t = a.gridaxisjs_end(this.__wbg_ptr);
241
+ return D(t);
242
+ }
243
+ get tag() {
244
+ let t, e;
245
+ try {
246
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
247
+ a.gridaxisjs_tag(i, this.__wbg_ptr);
248
+ var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
249
+ return t = n, e = s, J(n, s);
250
+ } finally{
251
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
252
+ }
253
+ }
254
+ get start() {
255
+ const t = a.gridaxisjs_start(this.__wbg_ptr);
256
+ return D(t);
257
+ }
258
+ get axisId() {
259
+ return a.gridaxisjs_axisId(this.__wbg_ptr) >>> 0;
260
+ }
261
+ get gridId() {
262
+ return a.gridaxisjs_gridId(this.__wbg_ptr) >>> 0;
263
+ }
264
+ }
265
+ Symbol.dispose && (xt.prototype[Symbol.dispose] = xt.prototype.free);
266
+ oe = class {
267
+ __destroy_into_raw() {
268
+ const t = this.__wbg_ptr;
269
+ return this.__wbg_ptr = 0, Ie.unregister(this), t;
270
+ }
271
+ free() {
272
+ const t = this.__destroy_into_raw();
273
+ a.__wbg_ifcapi_free(t, 0);
196
274
  }
197
275
  buildPrePassFast(t) {
198
- const e = pt(t, c.__wbindgen_export3), n = Y, s = c.ifcapi_buildPrePassFast(this.__wbg_ptr, e, n);
199
- return W(s);
276
+ const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_buildPrePassFast(this.__wbg_ptr, e, n);
277
+ return D(s);
200
278
  }
201
279
  buildPrePassOnce(t) {
202
- const e = pt(t, c.__wbindgen_export3), n = Y, s = c.ifcapi_buildPrePassOnce(this.__wbg_ptr, e, n);
203
- return W(s);
280
+ const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_buildPrePassOnce(this.__wbg_ptr, e, n);
281
+ return D(s);
204
282
  }
205
- processGeometryBatch(t, e, n, s, i, o, a, l, d, u, f, p) {
206
- const _ = pt(t, c.__wbindgen_export3), h = Y, y = ft(e, c.__wbindgen_export3), m = Y, b = ft(l, c.__wbindgen_export3), w = Y, v = ft(d, c.__wbindgen_export3), L = Y, j = ft(u, c.__wbindgen_export3), O = Y, U = ft(f, c.__wbindgen_export3), C = Y, N = pt(p, c.__wbindgen_export3), F = Y, E = c.ifcapi_processGeometryBatch(this.__wbg_ptr, _, h, y, m, n, s, i, o, a, b, w, v, L, j, O, U, C, N, F);
207
- return Ot.__wrap(E);
283
+ processGeometryBatch(t, e, n, s, i, o, c, l, d, u, f, p) {
284
+ const g = It(t, a.__wbindgen_export3), h = G, y = ut(e, a.__wbindgen_export3), E = G, C = ut(l, a.__wbindgen_export3), T = G, $ = ut(d, a.__wbindgen_export3), x = G, Y = ut(u, a.__wbindgen_export3), O = G, v = ut(f, a.__wbindgen_export3), b = G, S = It(p, a.__wbindgen_export3), F = G, m = a.ifcapi_processGeometryBatch(this.__wbg_ptr, g, h, y, E, n, s, i, o, c, C, T, $, x, Y, O, v, b, S, F);
285
+ return Lt.__wrap(m);
208
286
  }
209
287
  buildPrePassStreaming(t, e, n) {
210
288
  try {
211
- const a = c.__wbindgen_add_to_stack_pointer(-16), l = pt(t, c.__wbindgen_export3), d = Y;
212
- c.ifcapi_buildPrePassStreaming(a, this.__wbg_ptr, l, d, qe(e), n);
213
- var s = A().getInt32(a + 0, !0), i = A().getInt32(a + 4, !0), o = A().getInt32(a + 8, !0);
214
- if (o) throw W(i);
215
- return W(s);
289
+ const c = a.__wbindgen_add_to_stack_pointer(-16), l = It(t, a.__wbindgen_export3), d = G;
290
+ a.ifcapi_buildPrePassStreaming(c, this.__wbg_ptr, l, d, Ze(e), n);
291
+ var s = A().getInt32(c + 0, !0), i = A().getInt32(c + 4, !0), o = A().getInt32(c + 8, !0);
292
+ if (o) throw D(i);
293
+ return D(s);
216
294
  } finally{
217
- c.__wbindgen_add_to_stack_pointer(16), rt[kt++] = void 0;
295
+ a.__wbindgen_add_to_stack_pointer(16), ot[kt++] = void 0;
218
296
  }
219
297
  }
298
+ parseGridAxes(t) {
299
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseGridAxes(this.__wbg_ptr, e, n);
300
+ return Ot.__wrap(s);
301
+ }
302
+ parseGridLines(t) {
303
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseGridLines(this.__wbg_ptr, e, n);
304
+ return D(s);
305
+ }
306
+ parseAlignmentLines(t) {
307
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseAlignmentLines(this.__wbg_ptr, e, n);
308
+ return D(s);
309
+ }
220
310
  extractProfiles(t, e) {
221
- const n = gt(t, c.__wbindgen_export3, c.__wbindgen_export4), s = Y, i = c.ifcapi_extractProfiles(this.__wbg_ptr, n, s, e);
222
- return Mt.__wrap(i);
311
+ const n = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), s = G, i = a.ifcapi_extractProfiles(this.__wbg_ptr, n, s, e);
312
+ return Pt.__wrap(i);
223
313
  }
224
314
  getMemory() {
225
- const t = c.ifcapi_getMemory(this.__wbg_ptr);
226
- return W(t);
315
+ const t = a.ifcapi_getMemory(this.__wbg_ptr);
316
+ return D(t);
227
317
  }
228
318
  setEntityIndex(t, e, n) {
229
- const s = ft(t, c.__wbindgen_export3), i = Y, o = ft(e, c.__wbindgen_export3), a = Y, l = ft(n, c.__wbindgen_export3), d = Y;
230
- c.ifcapi_setEntityIndex(this.__wbg_ptr, s, i, o, a, l, d);
319
+ const s = ut(t, a.__wbindgen_export3), i = G, o = ut(e, a.__wbindgen_export3), c = G, l = ut(n, a.__wbindgen_export3), d = G;
320
+ a.ifcapi_setEntityIndex(this.__wbg_ptr, s, i, o, c, l, d);
231
321
  }
232
322
  setMergeLayers(t) {
233
- c.ifcapi_setMergeLayers(this.__wbg_ptr, t);
323
+ a.ifcapi_setMergeLayers(this.__wbg_ptr, t);
234
324
  }
235
325
  clearPrePassCache() {
236
- c.ifcapi_clearPrePassCache(this.__wbg_ptr);
326
+ a.ifcapi_clearPrePassCache(this.__wbg_ptr);
237
327
  }
238
328
  constructor(){
239
- const t = c.ifcapi_new();
240
- return this.__wbg_ptr = t >>> 0, fe.register(this, this.__wbg_ptr, this), this;
329
+ const t = a.ifcapi_new();
330
+ return this.__wbg_ptr = t >>> 0, Ie.register(this, this.__wbg_ptr, this), this;
241
331
  }
242
332
  get version() {
243
333
  let t, e;
244
334
  try {
245
- const i = c.__wbindgen_add_to_stack_pointer(-16);
246
- c.ifcapi_version(i, this.__wbg_ptr);
335
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
336
+ a.ifcapi_version(i, this.__wbg_ptr);
247
337
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
248
338
  return t = n, e = s, J(n, s);
249
339
  } finally{
250
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
340
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
251
341
  }
252
342
  }
253
343
  get is_ready() {
254
- return c.ifcapi_is_ready(this.__wbg_ptr) !== 0;
344
+ return a.ifcapi_is_ready(this.__wbg_ptr) !== 0;
255
345
  }
256
346
  parseStreaming(t, e) {
257
- const n = gt(t, c.__wbindgen_export3, c.__wbindgen_export4), s = Y, i = c.ifcapi_parseStreaming(this.__wbg_ptr, n, s, P(e));
258
- return W(i);
347
+ const n = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), s = G, i = a.ifcapi_parseStreaming(this.__wbg_ptr, n, s, U(e));
348
+ return D(i);
259
349
  }
260
350
  scanEntitiesFast(t) {
261
- const e = gt(t, c.__wbindgen_export3, c.__wbindgen_export4), n = Y, s = c.ifcapi_scanEntitiesFast(this.__wbg_ptr, e, n);
262
- return W(s);
351
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_scanEntitiesFast(this.__wbg_ptr, e, n);
352
+ return D(s);
263
353
  }
264
354
  scanEntitiesFastBytes(t) {
265
- const e = pt(t, c.__wbindgen_export3), n = Y, s = c.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, e, n);
266
- return W(s);
355
+ const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, e, n);
356
+ return D(s);
267
357
  }
268
358
  scanGeometryEntitiesFast(t) {
269
- const e = gt(t, c.__wbindgen_export3, c.__wbindgen_export4), n = Y, s = c.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, e, n);
270
- return W(s);
359
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, e, n);
360
+ return D(s);
271
361
  }
272
362
  scanRelevantEntitiesFastBytes(t) {
273
- const e = pt(t, c.__wbindgen_export3), n = Y, s = c.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, e, n);
274
- return W(s);
363
+ const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, e, n);
364
+ return D(s);
275
365
  }
276
366
  parse(t) {
277
- const e = gt(t, c.__wbindgen_export3, c.__wbindgen_export4), n = Y, s = c.ifcapi_parse(this.__wbg_ptr, e, n);
278
- return W(s);
367
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parse(this.__wbg_ptr, e, n);
368
+ return D(s);
279
369
  }
280
370
  parseSymbolicRepresentations(t) {
281
- const e = gt(t, c.__wbindgen_export3, c.__wbindgen_export4), n = Y, s = c.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, e, n);
282
- return Dt.__wrap(s);
371
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, e, n);
372
+ return Gt.__wrap(s);
283
373
  }
284
374
  };
285
- Symbol.dispose && (ie.prototype[Symbol.dispose] = ie.prototype.free);
286
- class Ot {
375
+ Symbol.dispose && (oe.prototype[Symbol.dispose] = oe.prototype.free);
376
+ class Lt {
287
377
  static __wrap(t) {
288
378
  t = t >>> 0;
289
- const e = Object.create(Ot.prototype);
290
- return e.__wbg_ptr = t, ue.register(e, e.__wbg_ptr, e), e;
379
+ const e = Object.create(Lt.prototype);
380
+ return e.__wbg_ptr = t, _e.register(e, e.__wbg_ptr, e), e;
291
381
  }
292
382
  __destroy_into_raw() {
293
383
  const t = this.__wbg_ptr;
294
- return this.__wbg_ptr = 0, ue.unregister(this), t;
384
+ return this.__wbg_ptr = 0, _e.unregister(this), t;
295
385
  }
296
386
  free() {
297
387
  const t = this.__destroy_into_raw();
298
- c.__wbg_meshcollection_free(t, 0);
388
+ a.__wbg_meshcollection_free(t, 0);
299
389
  }
300
390
  get rtcOffsetX() {
301
- return c.meshcollection_rtcOffsetX(this.__wbg_ptr);
391
+ return a.meshcollection_rtcOffsetX(this.__wbg_ptr);
302
392
  }
303
393
  get rtcOffsetY() {
304
- return c.meshcollection_rtcOffsetY(this.__wbg_ptr);
394
+ return a.meshcollection_rtcOffsetY(this.__wbg_ptr);
305
395
  }
306
396
  get rtcOffsetZ() {
307
- return c.meshcollection_rtcOffsetZ(this.__wbg_ptr);
397
+ return a.meshcollection_rtcOffsetZ(this.__wbg_ptr);
308
398
  }
309
399
  hasRtcOffset() {
310
- return c.meshcollection_hasRtcOffset(this.__wbg_ptr) !== 0;
400
+ return a.meshcollection_hasRtcOffset(this.__wbg_ptr) !== 0;
311
401
  }
312
402
  localToWorld(t, e, n) {
313
403
  try {
314
- const a = c.__wbindgen_add_to_stack_pointer(-16);
315
- c.meshcollection_localToWorld(a, this.__wbg_ptr, t, e, n);
316
- var s = A().getInt32(a + 0, !0), i = A().getInt32(a + 4, !0), o = Je(s, i).slice();
317
- return c.__wbindgen_export2(s, i * 8, 8), o;
404
+ const c = a.__wbindgen_add_to_stack_pointer(-16);
405
+ a.meshcollection_localToWorld(c, this.__wbg_ptr, t, e, n);
406
+ var s = A().getInt32(c + 0, !0), i = A().getInt32(c + 4, !0), o = en(s, i).slice();
407
+ return a.__wbindgen_export2(s, i * 8, 8), o;
318
408
  } finally{
319
- c.__wbindgen_add_to_stack_pointer(16);
409
+ a.__wbindgen_add_to_stack_pointer(16);
320
410
  }
321
411
  }
322
412
  get totalVertices() {
323
- return c.meshcollection_totalVertices(this.__wbg_ptr) >>> 0;
413
+ return a.meshcollection_totalVertices(this.__wbg_ptr) >>> 0;
324
414
  }
325
415
  get totalTriangles() {
326
- return c.meshcollection_totalTriangles(this.__wbg_ptr) >>> 0;
416
+ return a.meshcollection_totalTriangles(this.__wbg_ptr) >>> 0;
327
417
  }
328
418
  get buildingRotation() {
329
419
  try {
330
- const n = c.__wbindgen_add_to_stack_pointer(-16);
331
- c.meshcollection_buildingRotation(n, this.__wbg_ptr);
420
+ const n = a.__wbindgen_add_to_stack_pointer(-16);
421
+ a.meshcollection_buildingRotation(n, this.__wbg_ptr);
332
422
  var t = A().getInt32(n + 0, !0), e = A().getFloat64(n + 8, !0);
333
423
  return t === 0 ? void 0 : e;
334
424
  } finally{
335
- c.__wbindgen_add_to_stack_pointer(16);
425
+ a.__wbindgen_add_to_stack_pointer(16);
336
426
  }
337
427
  }
338
428
  get(t) {
339
- const e = c.meshcollection_get(this.__wbg_ptr, t);
340
- return e === 0 ? void 0 : Lt.__wrap(e);
429
+ const e = a.meshcollection_get(this.__wbg_ptr, t);
430
+ return e === 0 ? void 0 : Mt.__wrap(e);
341
431
  }
342
432
  get length() {
343
- return c.meshcollection_length(this.__wbg_ptr) >>> 0;
433
+ return a.meshcollection_length(this.__wbg_ptr) >>> 0;
344
434
  }
345
435
  }
346
- Symbol.dispose && (Ot.prototype[Symbol.dispose] = Ot.prototype.free);
347
- class Lt {
436
+ Symbol.dispose && (Lt.prototype[Symbol.dispose] = Lt.prototype.free);
437
+ class Mt {
348
438
  static __wrap(t) {
349
439
  t = t >>> 0;
350
- const e = Object.create(Lt.prototype);
351
- return e.__wbg_ptr = t, he.register(e, e.__wbg_ptr, e), e;
440
+ const e = Object.create(Mt.prototype);
441
+ return e.__wbg_ptr = t, ge.register(e, e.__wbg_ptr, e), e;
352
442
  }
353
443
  __destroy_into_raw() {
354
444
  const t = this.__wbg_ptr;
355
- return this.__wbg_ptr = 0, he.unregister(this), t;
445
+ return this.__wbg_ptr = 0, ge.unregister(this), t;
356
446
  }
357
447
  free() {
358
448
  const t = this.__destroy_into_raw();
359
- c.__wbg_meshdatajs_free(t, 0);
449
+ a.__wbg_meshdatajs_free(t, 0);
360
450
  }
361
451
  get expressId() {
362
- return c.meshdatajs_expressId(this.__wbg_ptr) >>> 0;
452
+ return a.meshdatajs_expressId(this.__wbg_ptr) >>> 0;
453
+ }
454
+ get hasTexture() {
455
+ return a.meshdatajs_hasTexture(this.__wbg_ptr) !== 0;
456
+ }
457
+ get textureRgba() {
458
+ const t = a.meshdatajs_textureRgba(this.__wbg_ptr);
459
+ return D(t);
363
460
  }
364
461
  get vertexCount() {
365
- return c.meshdatajs_vertexCount(this.__wbg_ptr) >>> 0;
462
+ return a.meshdatajs_vertexCount(this.__wbg_ptr) >>> 0;
366
463
  }
367
464
  get shadingColor() {
368
465
  try {
369
- const n = c.__wbindgen_add_to_stack_pointer(-16);
370
- c.meshdatajs_shadingColor(n, this.__wbg_ptr);
466
+ const n = a.__wbindgen_add_to_stack_pointer(-16);
467
+ a.meshdatajs_shadingColor(n, this.__wbg_ptr);
371
468
  var t = A().getInt32(n + 0, !0), e = A().getInt32(n + 4, !0);
372
469
  let s;
373
- return t !== 0 && (s = se(t, e).slice(), c.__wbindgen_export2(t, e * 4, 4)), s;
470
+ return t !== 0 && (s = re(t, e).slice(), a.__wbindgen_export2(t, e * 4, 4)), s;
374
471
  } finally{
375
- c.__wbindgen_add_to_stack_pointer(16);
472
+ a.__wbindgen_add_to_stack_pointer(16);
376
473
  }
377
474
  }
475
+ get textureWidth() {
476
+ return a.meshdatajs_textureWidth(this.__wbg_ptr) >>> 0;
477
+ }
478
+ get textureHeight() {
479
+ return a.meshdatajs_textureHeight(this.__wbg_ptr) >>> 0;
480
+ }
378
481
  get triangleCount() {
379
- return c.meshdatajs_triangleCount(this.__wbg_ptr) >>> 0;
482
+ return a.meshdatajs_triangleCount(this.__wbg_ptr) >>> 0;
483
+ }
484
+ get textureRepeatS() {
485
+ return a.meshdatajs_textureRepeatS(this.__wbg_ptr) !== 0;
486
+ }
487
+ get textureRepeatT() {
488
+ return a.meshdatajs_textureRepeatT(this.__wbg_ptr) !== 0;
489
+ }
490
+ get uvs() {
491
+ const t = a.meshdatajs_uvs(this.__wbg_ptr);
492
+ return D(t);
380
493
  }
381
494
  get color() {
382
495
  try {
383
- const s = c.__wbindgen_add_to_stack_pointer(-16);
384
- c.meshdatajs_color(s, this.__wbg_ptr);
385
- var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = se(t, e).slice();
386
- return c.__wbindgen_export2(t, e * 4, 4), n;
496
+ const s = a.__wbindgen_add_to_stack_pointer(-16);
497
+ a.meshdatajs_color(s, this.__wbg_ptr);
498
+ var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = re(t, e).slice();
499
+ return a.__wbindgen_export2(t, e * 4, 4), n;
387
500
  } finally{
388
- c.__wbindgen_add_to_stack_pointer(16);
501
+ a.__wbindgen_add_to_stack_pointer(16);
389
502
  }
390
503
  }
391
504
  get indices() {
392
- const t = c.meshdatajs_indices(this.__wbg_ptr);
393
- return W(t);
505
+ const t = a.meshdatajs_indices(this.__wbg_ptr);
506
+ return D(t);
394
507
  }
395
508
  get normals() {
396
- const t = c.meshdatajs_normals(this.__wbg_ptr);
397
- return W(t);
509
+ const t = a.meshdatajs_normals(this.__wbg_ptr);
510
+ return D(t);
398
511
  }
399
512
  get ifcType() {
400
513
  let t, e;
401
514
  try {
402
- const i = c.__wbindgen_add_to_stack_pointer(-16);
403
- c.meshdatajs_ifcType(i, this.__wbg_ptr);
515
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
516
+ a.meshdatajs_ifcType(i, this.__wbg_ptr);
404
517
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
405
518
  return t = n, e = s, J(n, s);
406
519
  } finally{
407
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
520
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
408
521
  }
409
522
  }
410
523
  get positions() {
411
- const t = c.meshdatajs_positions(this.__wbg_ptr);
412
- return W(t);
524
+ const t = a.meshdatajs_positions(this.__wbg_ptr);
525
+ return D(t);
413
526
  }
414
527
  }
415
- Symbol.dispose && (Lt.prototype[Symbol.dispose] = Lt.prototype.free);
416
- class Mt {
528
+ Symbol.dispose && (Mt.prototype[Symbol.dispose] = Mt.prototype.free);
529
+ class Pt {
417
530
  static __wrap(t) {
418
531
  t = t >>> 0;
419
- const e = Object.create(Mt.prototype);
420
- return e.__wbg_ptr = t, pe.register(e, e.__wbg_ptr, e), e;
532
+ const e = Object.create(Pt.prototype);
533
+ return e.__wbg_ptr = t, ye.register(e, e.__wbg_ptr, e), e;
421
534
  }
422
535
  __destroy_into_raw() {
423
536
  const t = this.__wbg_ptr;
424
- return this.__wbg_ptr = 0, pe.unregister(this), t;
537
+ return this.__wbg_ptr = 0, ye.unregister(this), t;
425
538
  }
426
539
  free() {
427
540
  const t = this.__destroy_into_raw();
428
- c.__wbg_profilecollection_free(t, 0);
541
+ a.__wbg_profilecollection_free(t, 0);
429
542
  }
430
543
  get(t) {
431
- const e = c.profilecollection_get(this.__wbg_ptr, t);
432
- return e === 0 ? void 0 : xt.__wrap(e);
544
+ const e = a.profilecollection_get(this.__wbg_ptr, t);
545
+ return e === 0 ? void 0 : Bt.__wrap(e);
433
546
  }
434
547
  get length() {
435
- return c.profilecollection_length(this.__wbg_ptr) >>> 0;
548
+ return a.profilecollection_length(this.__wbg_ptr) >>> 0;
436
549
  }
437
550
  }
438
- Symbol.dispose && (Mt.prototype[Symbol.dispose] = Mt.prototype.free);
439
- class xt {
551
+ Symbol.dispose && (Pt.prototype[Symbol.dispose] = Pt.prototype.free);
552
+ class Bt {
440
553
  static __wrap(t) {
441
554
  t = t >>> 0;
442
- const e = Object.create(xt.prototype);
443
- return e.__wbg_ptr = t, Ie.register(e, e.__wbg_ptr, e), e;
555
+ const e = Object.create(Bt.prototype);
556
+ return e.__wbg_ptr = t, me.register(e, e.__wbg_ptr, e), e;
444
557
  }
445
558
  __destroy_into_raw() {
446
559
  const t = this.__wbg_ptr;
447
- return this.__wbg_ptr = 0, Ie.unregister(this), t;
560
+ return this.__wbg_ptr = 0, me.unregister(this), t;
448
561
  }
449
562
  free() {
450
563
  const t = this.__destroy_into_raw();
451
- c.__wbg_profileentryjs_free(t, 0);
564
+ a.__wbg_profileentryjs_free(t, 0);
452
565
  }
453
566
  get expressId() {
454
- return c.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
567
+ return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
455
568
  }
456
569
  get holeCounts() {
457
- const t = c.profileentryjs_holeCounts(this.__wbg_ptr);
458
- return W(t);
570
+ const t = a.profileentryjs_holeCounts(this.__wbg_ptr);
571
+ return D(t);
459
572
  }
460
573
  get holePoints() {
461
- const t = c.profileentryjs_holePoints(this.__wbg_ptr);
462
- return W(t);
574
+ const t = a.profileentryjs_holePoints(this.__wbg_ptr);
575
+ return D(t);
463
576
  }
464
577
  get modelIndex() {
465
- return c.profileentryjs_modelIndex(this.__wbg_ptr) >>> 0;
578
+ return a.profileentryjs_modelIndex(this.__wbg_ptr) >>> 0;
466
579
  }
467
580
  get outerPoints() {
468
- const t = c.profileentryjs_outerPoints(this.__wbg_ptr);
469
- return W(t);
581
+ const t = a.profileentryjs_outerPoints(this.__wbg_ptr);
582
+ return D(t);
470
583
  }
471
584
  get extrusionDir() {
472
- const t = c.profileentryjs_extrusionDir(this.__wbg_ptr);
473
- return W(t);
585
+ const t = a.profileentryjs_extrusionDir(this.__wbg_ptr);
586
+ return D(t);
474
587
  }
475
588
  get extrusionDepth() {
476
- return c.profileentryjs_extrusionDepth(this.__wbg_ptr);
589
+ return a.profileentryjs_extrusionDepth(this.__wbg_ptr);
477
590
  }
478
591
  get ifcType() {
479
592
  let t, e;
480
593
  try {
481
- const i = c.__wbindgen_add_to_stack_pointer(-16);
482
- c.profileentryjs_ifcType(i, this.__wbg_ptr);
594
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
595
+ a.profileentryjs_ifcType(i, this.__wbg_ptr);
483
596
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
484
597
  return t = n, e = s, J(n, s);
485
598
  } finally{
486
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
599
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
487
600
  }
488
601
  }
489
602
  get transform() {
490
- const t = c.profileentryjs_transform(this.__wbg_ptr);
491
- return W(t);
603
+ const t = a.profileentryjs_transform(this.__wbg_ptr);
604
+ return D(t);
492
605
  }
493
606
  }
494
- Symbol.dispose && (xt.prototype[Symbol.dispose] = xt.prototype.free);
495
- class Bt {
607
+ Symbol.dispose && (Bt.prototype[Symbol.dispose] = Bt.prototype.free);
608
+ class Ut {
496
609
  static __wrap(t) {
497
610
  t = t >>> 0;
498
- const e = Object.create(Bt.prototype);
499
- return e.__wbg_ptr = t, ge.register(e, e.__wbg_ptr, e), e;
611
+ const e = Object.create(Ut.prototype);
612
+ return e.__wbg_ptr = t, Ee.register(e, e.__wbg_ptr, e), e;
500
613
  }
501
614
  __destroy_into_raw() {
502
615
  const t = this.__wbg_ptr;
503
- return this.__wbg_ptr = 0, ge.unregister(this), t;
616
+ return this.__wbg_ptr = 0, Ee.unregister(this), t;
504
617
  }
505
618
  free() {
506
619
  const t = this.__destroy_into_raw();
507
- c.__wbg_symboliccircle_free(t, 0);
620
+ a.__wbg_symboliccircle_free(t, 0);
508
621
  }
509
622
  get expressId() {
510
- return c.symboliccircle_expressId(this.__wbg_ptr) >>> 0;
623
+ return a.symboliccircle_expressId(this.__wbg_ptr) >>> 0;
511
624
  }
512
625
  get startAngle() {
513
- return c.symboliccircle_startAngle(this.__wbg_ptr);
626
+ return a.symboliccircle_startAngle(this.__wbg_ptr);
514
627
  }
515
628
  get isFullCircle() {
516
- return c.symboliccircle_isFullCircle(this.__wbg_ptr) !== 0;
629
+ return a.symboliccircle_isFullCircle(this.__wbg_ptr) !== 0;
517
630
  }
518
631
  get repIdentifier() {
519
632
  let t, e;
520
633
  try {
521
- const i = c.__wbindgen_add_to_stack_pointer(-16);
522
- c.symboliccircle_repIdentifier(i, this.__wbg_ptr);
634
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
635
+ a.symboliccircle_repIdentifier(i, this.__wbg_ptr);
523
636
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
524
637
  return t = n, e = s, J(n, s);
525
638
  } finally{
526
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
639
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
527
640
  }
528
641
  }
529
642
  get radius() {
530
- return c.symboliccircle_radius(this.__wbg_ptr);
643
+ return a.symboliccircle_radius(this.__wbg_ptr);
531
644
  }
532
645
  get worldY() {
533
- return c.symboliccircle_worldY(this.__wbg_ptr);
646
+ return a.symboliccircle_worldY(this.__wbg_ptr);
534
647
  }
535
648
  get centerX() {
536
- return c.symboliccircle_centerX(this.__wbg_ptr);
649
+ return a.symboliccircle_centerX(this.__wbg_ptr);
537
650
  }
538
651
  get centerY() {
539
- return c.symboliccircle_centerY(this.__wbg_ptr);
652
+ return a.symboliccircle_centerY(this.__wbg_ptr);
540
653
  }
541
654
  get ifcType() {
542
655
  let t, e;
543
656
  try {
544
- const i = c.__wbindgen_add_to_stack_pointer(-16);
545
- c.symboliccircle_ifcType(i, this.__wbg_ptr);
657
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
658
+ a.symboliccircle_ifcType(i, this.__wbg_ptr);
546
659
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
547
660
  return t = n, e = s, J(n, s);
548
661
  } finally{
549
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
662
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
550
663
  }
551
664
  }
552
665
  get endAngle() {
553
- return c.symboliccircle_endAngle(this.__wbg_ptr);
666
+ return a.symboliccircle_endAngle(this.__wbg_ptr);
554
667
  }
555
668
  }
556
- Symbol.dispose && (Bt.prototype[Symbol.dispose] = Bt.prototype.free);
557
- class Pt {
669
+ Symbol.dispose && (Ut.prototype[Symbol.dispose] = Ut.prototype.free);
670
+ class Dt {
558
671
  static __wrap(t) {
559
672
  t = t >>> 0;
560
- const e = Object.create(Pt.prototype);
561
- return e.__wbg_ptr = t, _e.register(e, e.__wbg_ptr, e), e;
673
+ const e = Object.create(Dt.prototype);
674
+ return e.__wbg_ptr = t, be.register(e, e.__wbg_ptr, e), e;
562
675
  }
563
676
  __destroy_into_raw() {
564
677
  const t = this.__wbg_ptr;
565
- return this.__wbg_ptr = 0, _e.unregister(this), t;
678
+ return this.__wbg_ptr = 0, be.unregister(this), t;
566
679
  }
567
680
  free() {
568
681
  const t = this.__destroy_into_raw();
569
- c.__wbg_symbolicfillarea_free(t, 0);
682
+ a.__wbg_symbolicfillarea_free(t, 0);
570
683
  }
571
684
  get expressId() {
572
- return c.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
685
+ return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
573
686
  }
574
687
  get holeCount() {
575
- return c.symbolicfillarea_holeCount(this.__wbg_ptr) >>> 0;
688
+ return a.symbolicfillarea_holeCount(this.__wbg_ptr) >>> 0;
576
689
  }
577
690
  get hatchAngle() {
578
- return c.symbolicfillarea_hatchAngle(this.__wbg_ptr);
691
+ return a.symbolicfillarea_hatchAngle(this.__wbg_ptr);
579
692
  }
580
693
  get pointCount() {
581
- return c.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
694
+ return a.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
582
695
  }
583
696
  get hasHatching() {
584
- return c.symbolicfillarea_hasHatching(this.__wbg_ptr) !== 0;
697
+ return a.symbolicfillarea_hasHatching(this.__wbg_ptr) !== 0;
585
698
  }
586
699
  get hatchSpacing() {
587
- return c.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
700
+ return a.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
588
701
  }
589
702
  get holesOffsets() {
590
- const t = c.symbolicfillarea_holesOffsets(this.__wbg_ptr);
591
- return W(t);
703
+ const t = a.symbolicfillarea_holesOffsets(this.__wbg_ptr);
704
+ return D(t);
592
705
  }
593
706
  get repIdentifier() {
594
707
  let t, e;
595
708
  try {
596
- const i = c.__wbindgen_add_to_stack_pointer(-16);
597
- c.symbolicfillarea_repIdentifier(i, this.__wbg_ptr);
709
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
710
+ a.symbolicfillarea_repIdentifier(i, this.__wbg_ptr);
598
711
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
599
712
  return t = n, e = s, J(n, s);
600
713
  } finally{
601
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
714
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
602
715
  }
603
716
  }
604
717
  get hatchLineWidth() {
605
- return c.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
718
+ return a.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
606
719
  }
607
720
  get hatchAngleSecondary() {
608
- return c.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
721
+ return a.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
609
722
  }
610
723
  get fillA() {
611
- return c.symbolicfillarea_fillA(this.__wbg_ptr);
724
+ return a.symbolicfillarea_fillA(this.__wbg_ptr);
612
725
  }
613
726
  get fillB() {
614
- return c.symbolicfillarea_fillB(this.__wbg_ptr);
727
+ return a.symbolicfillarea_fillB(this.__wbg_ptr);
615
728
  }
616
729
  get fillG() {
617
- return c.symbolicfillarea_fillG(this.__wbg_ptr);
730
+ return a.symbolicfillarea_fillG(this.__wbg_ptr);
618
731
  }
619
732
  get fillR() {
620
- return c.symbolicfillarea_fillR(this.__wbg_ptr);
733
+ return a.symbolicfillarea_fillR(this.__wbg_ptr);
621
734
  }
622
735
  get points() {
623
- const t = c.symbolicfillarea_points(this.__wbg_ptr);
624
- return W(t);
736
+ const t = a.symbolicfillarea_points(this.__wbg_ptr);
737
+ return D(t);
625
738
  }
626
739
  get worldY() {
627
- return c.symbolicfillarea_worldY(this.__wbg_ptr);
740
+ return a.symbolicfillarea_worldY(this.__wbg_ptr);
628
741
  }
629
742
  get ifcType() {
630
743
  let t, e;
631
744
  try {
632
- const i = c.__wbindgen_add_to_stack_pointer(-16);
633
- c.symbolicfillarea_ifcType(i, this.__wbg_ptr);
745
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
746
+ a.symbolicfillarea_ifcType(i, this.__wbg_ptr);
634
747
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
635
748
  return t = n, e = s, J(n, s);
636
749
  } finally{
637
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
750
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
638
751
  }
639
752
  }
640
753
  }
641
- Symbol.dispose && (Pt.prototype[Symbol.dispose] = Pt.prototype.free);
642
- class Ut {
754
+ Symbol.dispose && (Dt.prototype[Symbol.dispose] = Dt.prototype.free);
755
+ class vt {
643
756
  static __wrap(t) {
644
757
  t = t >>> 0;
645
- const e = Object.create(Ut.prototype);
646
- return e.__wbg_ptr = t, ye.register(e, e.__wbg_ptr, e), e;
758
+ const e = Object.create(vt.prototype);
759
+ return e.__wbg_ptr = t, Ce.register(e, e.__wbg_ptr, e), e;
647
760
  }
648
761
  __destroy_into_raw() {
649
762
  const t = this.__wbg_ptr;
650
- return this.__wbg_ptr = 0, ye.unregister(this), t;
763
+ return this.__wbg_ptr = 0, Ce.unregister(this), t;
651
764
  }
652
765
  free() {
653
766
  const t = this.__destroy_into_raw();
654
- c.__wbg_symbolicpolyline_free(t, 0);
767
+ a.__wbg_symbolicpolyline_free(t, 0);
655
768
  }
656
769
  get expressId() {
657
- return c.symbolicpolyline_expressId(this.__wbg_ptr) >>> 0;
770
+ return a.symbolicpolyline_expressId(this.__wbg_ptr) >>> 0;
658
771
  }
659
772
  get pointCount() {
660
- return c.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
773
+ return a.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
661
774
  }
662
775
  get repIdentifier() {
663
776
  let t, e;
664
777
  try {
665
- const i = c.__wbindgen_add_to_stack_pointer(-16);
666
- c.symbolicpolyline_repIdentifier(i, this.__wbg_ptr);
778
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
779
+ a.symbolicpolyline_repIdentifier(i, this.__wbg_ptr);
667
780
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
668
781
  return t = n, e = s, J(n, s);
669
782
  } finally{
670
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
783
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
671
784
  }
672
785
  }
673
786
  get points() {
674
- const t = c.symbolicpolyline_points(this.__wbg_ptr);
675
- return W(t);
787
+ const t = a.symbolicpolyline_points(this.__wbg_ptr);
788
+ return D(t);
676
789
  }
677
790
  get worldY() {
678
- return c.symboliccircle_worldY(this.__wbg_ptr);
791
+ return a.symboliccircle_worldY(this.__wbg_ptr);
679
792
  }
680
793
  get ifcType() {
681
794
  let t, e;
682
795
  try {
683
- const i = c.__wbindgen_add_to_stack_pointer(-16);
684
- c.symbolicpolyline_ifcType(i, this.__wbg_ptr);
796
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
797
+ a.symbolicpolyline_ifcType(i, this.__wbg_ptr);
685
798
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
686
799
  return t = n, e = s, J(n, s);
687
800
  } finally{
688
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
801
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
689
802
  }
690
803
  }
691
804
  get isClosed() {
692
- return c.symbolicpolyline_isClosed(this.__wbg_ptr) !== 0;
805
+ return a.symbolicpolyline_isClosed(this.__wbg_ptr) !== 0;
693
806
  }
694
807
  }
695
- Symbol.dispose && (Ut.prototype[Symbol.dispose] = Ut.prototype.free);
696
- class Dt {
808
+ Symbol.dispose && (vt.prototype[Symbol.dispose] = vt.prototype.free);
809
+ class Gt {
697
810
  static __wrap(t) {
698
811
  t = t >>> 0;
699
- const e = Object.create(Dt.prototype);
700
- return e.__wbg_ptr = t, Ee.register(e, e.__wbg_ptr, e), e;
812
+ const e = Object.create(Gt.prototype);
813
+ return e.__wbg_ptr = t, we.register(e, e.__wbg_ptr, e), e;
701
814
  }
702
815
  __destroy_into_raw() {
703
816
  const t = this.__wbg_ptr;
704
- return this.__wbg_ptr = 0, Ee.unregister(this), t;
817
+ return this.__wbg_ptr = 0, we.unregister(this), t;
705
818
  }
706
819
  free() {
707
820
  const t = this.__destroy_into_raw();
708
- c.__wbg_symbolicrepresentationcollection_free(t, 0);
821
+ a.__wbg_symbolicrepresentationcollection_free(t, 0);
709
822
  }
710
823
  get fillCount() {
711
- return c.symbolicrepresentationcollection_fillCount(this.__wbg_ptr) >>> 0;
824
+ return a.symbolicrepresentationcollection_fillCount(this.__wbg_ptr) >>> 0;
712
825
  }
713
826
  getCircle(t) {
714
- const e = c.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, t);
715
- return e === 0 ? void 0 : Bt.__wrap(e);
827
+ const e = a.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, t);
828
+ return e === 0 ? void 0 : Ut.__wrap(e);
716
829
  }
717
830
  get textCount() {
718
- return c.symbolicrepresentationcollection_textCount(this.__wbg_ptr) >>> 0;
831
+ return a.symbolicrepresentationcollection_textCount(this.__wbg_ptr) >>> 0;
719
832
  }
720
833
  get totalCount() {
721
- return c.symbolicrepresentationcollection_totalCount(this.__wbg_ptr) >>> 0;
834
+ return a.symbolicrepresentationcollection_totalCount(this.__wbg_ptr) >>> 0;
722
835
  }
723
836
  get circleCount() {
724
- return c.symbolicrepresentationcollection_circleCount(this.__wbg_ptr) >>> 0;
837
+ return a.symbolicrepresentationcollection_circleCount(this.__wbg_ptr) >>> 0;
725
838
  }
726
839
  getPolyline(t) {
727
- const e = c.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, t);
728
- return e === 0 ? void 0 : Ut.__wrap(e);
840
+ const e = a.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, t);
841
+ return e === 0 ? void 0 : vt.__wrap(e);
729
842
  }
730
843
  get polylineCount() {
731
- return c.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr) >>> 0;
844
+ return a.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr) >>> 0;
732
845
  }
733
846
  getExpressIds() {
734
847
  try {
735
- const s = c.__wbindgen_add_to_stack_pointer(-16);
736
- c.symbolicrepresentationcollection_getExpressIds(s, this.__wbg_ptr);
737
- var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = xe(t, e).slice();
738
- return c.__wbindgen_export2(t, e * 4, 4), n;
848
+ const s = a.__wbindgen_add_to_stack_pointer(-16);
849
+ a.symbolicrepresentationcollection_getExpressIds(s, this.__wbg_ptr);
850
+ var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = De(t, e).slice();
851
+ return a.__wbindgen_export2(t, e * 4, 4), n;
739
852
  } finally{
740
- c.__wbindgen_add_to_stack_pointer(16);
853
+ a.__wbindgen_add_to_stack_pointer(16);
741
854
  }
742
855
  }
743
856
  getFill(t) {
744
- const e = c.symbolicrepresentationcollection_getFill(this.__wbg_ptr, t);
745
- return e === 0 ? void 0 : Pt.__wrap(e);
857
+ const e = a.symbolicrepresentationcollection_getFill(this.__wbg_ptr, t);
858
+ return e === 0 ? void 0 : Dt.__wrap(e);
746
859
  }
747
860
  getText(t) {
748
- const e = c.symbolicrepresentationcollection_getText(this.__wbg_ptr, t);
749
- return e === 0 ? void 0 : vt.__wrap(e);
861
+ const e = a.symbolicrepresentationcollection_getText(this.__wbg_ptr, t);
862
+ return e === 0 ? void 0 : $t.__wrap(e);
750
863
  }
751
864
  get isEmpty() {
752
- return c.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr) !== 0;
865
+ return a.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr) !== 0;
753
866
  }
754
867
  }
755
- Symbol.dispose && (Dt.prototype[Symbol.dispose] = Dt.prototype.free);
756
- class vt {
868
+ Symbol.dispose && (Gt.prototype[Symbol.dispose] = Gt.prototype.free);
869
+ class $t {
757
870
  static __wrap(t) {
758
871
  t = t >>> 0;
759
- const e = Object.create(vt.prototype);
760
- return e.__wbg_ptr = t, me.register(e, e.__wbg_ptr, e), e;
872
+ const e = Object.create($t.prototype);
873
+ return e.__wbg_ptr = t, Te.register(e, e.__wbg_ptr, e), e;
761
874
  }
762
875
  __destroy_into_raw() {
763
876
  const t = this.__wbg_ptr;
764
- return this.__wbg_ptr = 0, me.unregister(this), t;
877
+ return this.__wbg_ptr = 0, Te.unregister(this), t;
765
878
  }
766
879
  free() {
767
880
  const t = this.__destroy_into_raw();
768
- c.__wbg_symbolictext_free(t, 0);
881
+ a.__wbg_symbolictext_free(t, 0);
769
882
  }
770
883
  get expressId() {
771
- return c.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
884
+ return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
772
885
  }
773
886
  get repIdentifier() {
774
887
  let t, e;
775
888
  try {
776
- const i = c.__wbindgen_add_to_stack_pointer(-16);
777
- c.symbolictext_repIdentifier(i, this.__wbg_ptr);
889
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
890
+ a.symbolictext_repIdentifier(i, this.__wbg_ptr);
778
891
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
779
892
  return t = n, e = s, J(n, s);
780
893
  } finally{
781
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
894
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
782
895
  }
783
896
  }
784
897
  get x() {
785
- return c.symbolicfillarea_fillR(this.__wbg_ptr);
898
+ return a.symbolicfillarea_fillR(this.__wbg_ptr);
786
899
  }
787
900
  get y() {
788
- return c.symbolicfillarea_fillG(this.__wbg_ptr);
901
+ return a.symbolicfillarea_fillG(this.__wbg_ptr);
789
902
  }
790
903
  get dirX() {
791
- return c.symbolicfillarea_fillB(this.__wbg_ptr);
904
+ return a.symbolicfillarea_fillB(this.__wbg_ptr);
792
905
  }
793
906
  get dirY() {
794
- return c.symbolicfillarea_fillA(this.__wbg_ptr);
907
+ return a.symbolicfillarea_fillA(this.__wbg_ptr);
795
908
  }
796
909
  get height() {
797
- return c.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
910
+ return a.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
798
911
  }
799
912
  get colorA() {
800
- return c.symbolictext_colorA(this.__wbg_ptr);
913
+ return a.symbolictext_colorA(this.__wbg_ptr);
801
914
  }
802
915
  get colorB() {
803
- return c.symbolicfillarea_worldY(this.__wbg_ptr);
916
+ return a.symbolicfillarea_worldY(this.__wbg_ptr);
804
917
  }
805
918
  get colorG() {
806
- return c.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
919
+ return a.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
807
920
  }
808
921
  get colorR() {
809
- return c.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
922
+ return a.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
810
923
  }
811
924
  get content() {
812
925
  let t, e;
813
926
  try {
814
- const i = c.__wbindgen_add_to_stack_pointer(-16);
815
- c.symbolictext_content(i, this.__wbg_ptr);
927
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
928
+ a.symbolictext_content(i, this.__wbg_ptr);
816
929
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
817
930
  return t = n, e = s, J(n, s);
818
931
  } finally{
819
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
932
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
820
933
  }
821
934
  }
822
935
  get worldY() {
823
- return c.symbolicfillarea_hatchAngle(this.__wbg_ptr);
936
+ return a.symbolicfillarea_hatchAngle(this.__wbg_ptr);
824
937
  }
825
938
  get ifcType() {
826
939
  let t, e;
827
940
  try {
828
- const i = c.__wbindgen_add_to_stack_pointer(-16);
829
- c.symbolictext_ifcType(i, this.__wbg_ptr);
941
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
942
+ a.symbolictext_ifcType(i, this.__wbg_ptr);
830
943
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
831
944
  return t = n, e = s, J(n, s);
832
945
  } finally{
833
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
946
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
834
947
  }
835
948
  }
836
949
  get alignment() {
837
950
  let t, e;
838
951
  try {
839
- const i = c.__wbindgen_add_to_stack_pointer(-16);
840
- c.symbolictext_alignment(i, this.__wbg_ptr);
952
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
953
+ a.symbolictext_alignment(i, this.__wbg_ptr);
841
954
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
842
955
  return t = n, e = s, J(n, s);
843
956
  } finally{
844
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
957
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
845
958
  }
846
959
  }
847
960
  get targetPx() {
848
- return c.symbolictext_targetPx(this.__wbg_ptr);
961
+ return a.symbolictext_targetPx(this.__wbg_ptr);
849
962
  }
850
963
  }
851
- Symbol.dispose && (vt.prototype[Symbol.dispose] = vt.prototype.free);
852
- const on = new Set([
964
+ Symbol.dispose && ($t.prototype[Symbol.dispose] = $t.prototype.free);
965
+ const fn = new Set([
853
966
  "basic",
854
967
  "cors",
855
968
  "default"
856
969
  ]);
857
- async function an(r, t) {
970
+ async function un(r, t) {
858
971
  if (typeof Response == "function" && r instanceof Response) {
859
972
  if (typeof WebAssembly.instantiateStreaming == "function") try {
860
973
  return await WebAssembly.instantiateStreaming(r, t);
861
974
  } catch (n) {
862
- if (r.ok && on.has(r.type) && r.headers.get("Content-Type") !== "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", n);
975
+ if (r.ok && fn.has(r.type) && r.headers.get("Content-Type") !== "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", n);
863
976
  else throw n;
864
977
  }
865
978
  const e = await r.arrayBuffer();
@@ -872,103 +985,106 @@ let __tla = Promise.all([
872
985
  } : e;
873
986
  }
874
987
  }
875
- function cn() {
988
+ function hn() {
876
989
  const r = {};
877
990
  return r.wbg = {}, r.wbg.__wbg_Error_52673b7de5a0ca89 = function(t, e) {
878
991
  const n = Error(J(t, e));
879
- return P(n);
992
+ return U(n);
880
993
  }, r.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(t) {
881
994
  return typeof k(t) == "function";
882
995
  }, r.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(t) {
883
996
  return k(t) === void 0;
884
997
  }, r.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
885
- const t = c.memory;
886
- return P(t);
998
+ const t = a.memory;
999
+ return U(t);
887
1000
  }, r.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(t, e) {
888
1001
  throw new Error(J(t, e));
889
1002
  }, r.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(t) {
890
1003
  k(t)._wbg_cb_unref();
891
1004
  }, r.wbg.__wbg_call_3020136f7a2d6e44 = function() {
892
- return Xt(function(t, e, n) {
1005
+ return Qt(function(t, e, n) {
893
1006
  const s = k(t).call(k(e), k(n));
894
- return P(s);
1007
+ return U(s);
895
1008
  }, arguments);
896
1009
  }, r.wbg.__wbg_call_abb4ff46ce38be40 = function() {
897
- return Xt(function(t, e) {
1010
+ return Qt(function(t, e) {
898
1011
  const n = k(t).call(k(e));
899
- return P(n);
1012
+ return U(n);
900
1013
  }, arguments);
901
1014
  }, r.wbg.__wbg_error_7534b8e9a36f1ab4 = function(t, e) {
902
1015
  let n, s;
903
1016
  try {
904
1017
  n = t, s = e, console.error(J(t, e));
905
1018
  } finally{
906
- c.__wbindgen_export2(n, s, 1);
1019
+ a.__wbindgen_export2(n, s, 1);
907
1020
  }
908
1021
  }, r.wbg.__wbg_info_ce6bcc489c22f6f0 = function(t) {
909
1022
  console.info(k(t));
910
1023
  }, r.wbg.__wbg_new_1ba21ce319a06297 = function() {
911
1024
  const t = new Object;
912
- return P(t);
1025
+ return U(t);
913
1026
  }, r.wbg.__wbg_new_25f239778d6112b9 = function() {
914
1027
  const t = new Array;
915
- return P(t);
1028
+ return U(t);
916
1029
  }, r.wbg.__wbg_new_8a6f238a6ece86ea = function() {
917
1030
  const t = new Error;
918
- return P(t);
1031
+ return U(t);
919
1032
  }, r.wbg.__wbg_new_ff12d2b041fb48f1 = function(t, e) {
920
1033
  try {
921
1034
  var n = {
922
1035
  a: t,
923
1036
  b: e
924
- }, s = (o, a)=>{
1037
+ }, s = (o, c)=>{
925
1038
  const l = n.a;
926
1039
  n.a = 0;
927
1040
  try {
928
- return rn(l, n.b, o, a);
1041
+ return dn(l, n.b, o, c);
929
1042
  } finally{
930
1043
  n.a = l;
931
1044
  }
932
1045
  };
933
1046
  const i = new Promise(s);
934
- return P(i);
1047
+ return U(i);
935
1048
  } finally{
936
1049
  n.a = n.b = 0;
937
1050
  }
938
1051
  }, r.wbg.__wbg_new_from_slice_41e2764a343e3cb1 = function(t, e) {
939
- const n = new Float32Array(se(t, e));
940
- return P(n);
1052
+ const n = new Float32Array(re(t, e));
1053
+ return U(n);
941
1054
  }, r.wbg.__wbg_new_from_slice_db0691b69e9d3891 = function(t, e) {
942
- const n = new Uint32Array(xe(t, e));
943
- return P(n);
1055
+ const n = new Uint32Array(De(t, e));
1056
+ return U(n);
1057
+ }, r.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(t, e) {
1058
+ const n = new Uint8Array(nn(t, e));
1059
+ return U(n);
944
1060
  }, r.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(t, e) {
945
1061
  const n = new Function(J(t, e));
946
- return P(n);
1062
+ return U(n);
947
1063
  }, r.wbg.__wbg_new_with_length_202b3db94ba5fc86 = function(t) {
948
1064
  const e = new Uint32Array(t >>> 0);
949
- return P(e);
1065
+ return U(e);
950
1066
  }, r.wbg.__wbg_new_with_length_806b9e5b8290af7c = function(t) {
951
1067
  const e = new Float64Array(t >>> 0);
952
- return P(e);
1068
+ return U(e);
953
1069
  }, r.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(t) {
954
1070
  const e = new Uint8Array(t >>> 0);
955
- return P(e);
1071
+ return U(e);
956
1072
  }, r.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(t) {
957
1073
  const e = k(t).queueMicrotask;
958
- return P(e);
1074
+ return U(e);
959
1075
  }, r.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(t) {
960
1076
  queueMicrotask(k(t));
961
1077
  }, r.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(t) {
962
1078
  const e = Promise.resolve(k(t));
963
- return P(e);
1079
+ return U(e);
964
1080
  }, r.wbg.__wbg_set_3f1d0b984ed272ed = function(t, e, n) {
965
- k(t)[W(e)] = W(n);
1081
+ k(t)[D(e)] = D(n);
966
1082
  }, r.wbg.__wbg_set_781438a03c0c3c81 = function() {
967
- return Xt(function(t, e, n) {
1083
+ return Qt(function(t, e, n) {
968
1084
  return Reflect.set(k(t), k(e), k(n));
969
1085
  }, arguments);
970
1086
  }, r.wbg.__wbg_set_7df433eea03a5c14 = function(t, e, n) {
971
- k(t)[e >>> 0] = W(n);
1087
+ k(t)[e >>> 0] = D(n);
972
1088
  }, r.wbg.__wbg_set_index_021489b2916af13e = function(t, e, n) {
973
1089
  k(t)[e >>> 0] = n;
974
1090
  }, r.wbg.__wbg_set_index_04c4b93e64d08a52 = function(t, e, n) {
@@ -976,57 +1092,57 @@ let __tla = Promise.all([
976
1092
  }, r.wbg.__wbg_set_index_42abe35f117e614e = function(t, e, n) {
977
1093
  k(t)[e >>> 0] = n >>> 0;
978
1094
  }, r.wbg.__wbg_stack_0ed75d68575b0f3c = function(t, e) {
979
- const n = k(e).stack, s = gt(n, c.__wbindgen_export3, c.__wbindgen_export4), i = Y;
1095
+ const n = k(e).stack, s = ct(n, a.__wbindgen_export3, a.__wbindgen_export4), i = G;
980
1096
  A().setInt32(t + 4, i, !0), A().setInt32(t + 0, s, !0);
981
1097
  }, r.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
982
1098
  const t = typeof global > "u" ? null : global;
983
- return $t(t) ? 0 : P(t);
1099
+ return zt(t) ? 0 : U(t);
984
1100
  }, r.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
985
1101
  const t = typeof globalThis > "u" ? null : globalThis;
986
- return $t(t) ? 0 : P(t);
1102
+ return zt(t) ? 0 : U(t);
987
1103
  }, r.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
988
1104
  const t = typeof self > "u" ? null : self;
989
- return $t(t) ? 0 : P(t);
1105
+ return zt(t) ? 0 : U(t);
990
1106
  }, r.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
991
1107
  const t = typeof window > "u" ? null : window;
992
- return $t(t) ? 0 : P(t);
1108
+ return zt(t) ? 0 : U(t);
993
1109
  }, r.wbg.__wbg_then_4f95312d68691235 = function(t, e) {
994
1110
  const n = k(t).then(k(e));
995
- return P(n);
1111
+ return U(n);
996
1112
  }, r.wbg.__wbg_warn_6e567d0d926ff881 = function(t) {
997
1113
  console.warn(k(t));
998
1114
  }, r.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(t, e) {
999
1115
  const n = J(t, e);
1000
- return P(n);
1116
+ return U(n);
1117
+ }, r.wbg.__wbindgen_cast_257c51b8abf9285e = function(t, e) {
1118
+ const n = on(t, e, a.__wasm_bindgen_func_elem_653, ln);
1119
+ return U(n);
1001
1120
  }, r.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(t) {
1002
1121
  const e = BigInt.asUintN(64, t);
1003
- return P(e);
1004
- }, r.wbg.__wbindgen_cast_89b0435615caf0ab = function(t, e) {
1005
- const n = tn(t, e, c.__wasm_bindgen_func_elem_1684, sn);
1006
- return P(n);
1122
+ return U(e);
1007
1123
  }, r.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(t) {
1008
- return P(t);
1124
+ return U(t);
1009
1125
  }, r.wbg.__wbindgen_object_clone_ref = function(t) {
1010
1126
  const e = k(t);
1011
- return P(e);
1127
+ return U(e);
1012
1128
  }, r.wbg.__wbindgen_object_drop_ref = function(t) {
1013
- W(t);
1129
+ D(t);
1014
1130
  }, r;
1015
1131
  }
1016
- function ln(r, t) {
1017
- return c = r.exports, Pe.__wbindgen_wasm_module = t, It = null, Tt = null, wt = null, Ft = null, Rt = null, c.__wbindgen_start(), c;
1132
+ function pn(r, t) {
1133
+ return a = r.exports, Ge.__wbindgen_wasm_module = t, _t = null, Tt = null, Ft = null, Rt = null, St = null, a.__wbindgen_start(), a;
1018
1134
  }
1019
- Pe = async function(r) {
1020
- if (c !== void 0) return c;
1021
- typeof r < "u" && (Object.getPrototypeOf(r) === Object.prototype ? { module_or_path: r } = r : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), typeof r > "u" && (r = new URL("/assets/ifc-lite_bg-ksLBP5cA.wasm", import.meta.url));
1022
- const t = cn();
1135
+ Ge = async function(r) {
1136
+ if (a !== void 0) return a;
1137
+ typeof r < "u" && (Object.getPrototypeOf(r) === Object.prototype ? { module_or_path: r } = r : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), typeof r > "u" && (r = new URL("/assets/ifc-lite_bg-DsYUIHm3.wasm", import.meta.url));
1138
+ const t = hn();
1023
1139
  (typeof r == "string" || typeof Request == "function" && r instanceof Request || typeof URL == "function" && r instanceof URL) && (r = fetch(r));
1024
- const { instance: e, module: n } = await an(await r, t);
1025
- return ln(e, n);
1140
+ const { instance: e, module: n } = await un(await r, t);
1141
+ return pn(e, n);
1026
1142
  };
1027
- const ct = Ge("Geometry"), dn = "IFC-Lite WASM cannot recover from a fatal runtime error within the same document lifetime. Reload the page or recreate the worker process before calling init() again.";
1028
- let Qt = null;
1029
- class fn {
1143
+ const tt = We("Geometry"), In = "IFC-Lite WASM cannot recover from a fatal runtime error within the same document lifetime. Reload the page or recreate the worker process before calling init() again.";
1144
+ let Kt = null;
1145
+ class _n {
1030
1146
  ifcApi = null;
1031
1147
  initialized = !1;
1032
1148
  mergeLayers = !1;
@@ -1034,15 +1150,15 @@ let __tla = Promise.all([
1034
1150
  return t instanceof WebAssembly.RuntimeError;
1035
1151
  }
1036
1152
  markFatalWasmRuntimeError() {
1037
- Qt = new Error(dn), this.reset();
1153
+ Kt = new Error(In), this.reset();
1038
1154
  }
1039
1155
  async init() {
1040
1156
  if (!this.initialized) {
1041
- if (Qt) throw Qt;
1157
+ if (Kt) throw Kt;
1042
1158
  try {
1043
- await Pe(), ct.debug("Geometry processing: single-threaded WASM (N-worker pool handles parallelism)"), this.ifcApi = new ie, this.applyMergeLayers(), this.initialized = !0, ct.info("WASM geometry engine initialized");
1159
+ await Ge(), tt.debug("Geometry processing: single-threaded WASM (N-worker pool handles parallelism)"), this.ifcApi = new oe, this.applyMergeLayers(), this.initialized = !0, tt.info("WASM geometry engine initialized");
1044
1160
  } catch (t) {
1045
- throw ct.error("Failed to initialize WASM geometry engine", t, {
1161
+ throw tt.error("Failed to initialize WASM geometry engine", t, {
1046
1162
  operation: "init"
1047
1163
  }), this.isWasmRuntimeError(t) ? this.markFatalWasmRuntimeError() : this.reset(), t;
1048
1164
  }
@@ -1055,11 +1171,11 @@ let __tla = Promise.all([
1055
1171
  if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1056
1172
  try {
1057
1173
  const e = this.ifcApi.parseSymbolicRepresentations(t);
1058
- return ct.debug(`Parsed ${e.totalCount} symbolic items (${e.polylineCount} polylines, ${e.circleCount} circles)`, {
1174
+ return tt.debug(`Parsed ${e.totalCount} symbolic items (${e.polylineCount} polylines, ${e.circleCount} circles)`, {
1059
1175
  operation: "parseSymbolicRepresentations"
1060
1176
  }), e;
1061
1177
  } catch (e) {
1062
- throw ct.error("Failed to parse symbolic representations", e, {
1178
+ throw tt.error("Failed to parse symbolic representations", e, {
1063
1179
  operation: "parseSymbolicRepresentations",
1064
1180
  data: {
1065
1181
  contentLength: t.length
@@ -1067,15 +1183,63 @@ let __tla = Promise.all([
1067
1183
  }), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
1068
1184
  }
1069
1185
  }
1186
+ parseAlignmentLines(t) {
1187
+ if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1188
+ try {
1189
+ const e = this.ifcApi.parseAlignmentLines(t);
1190
+ return tt.debug(`Parsed ${e.length / 3} alignment line vertices`, {
1191
+ operation: "parseAlignmentLines"
1192
+ }), e;
1193
+ } catch (e) {
1194
+ throw tt.error("Failed to parse alignment lines", e, {
1195
+ operation: "parseAlignmentLines",
1196
+ data: {
1197
+ contentLength: t.length
1198
+ }
1199
+ }), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
1200
+ }
1201
+ }
1202
+ parseGridLines(t) {
1203
+ if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1204
+ try {
1205
+ const e = this.ifcApi.parseGridLines(t);
1206
+ return tt.debug(`Parsed ${e.length / 3} grid line vertices`, {
1207
+ operation: "parseGridLines"
1208
+ }), e;
1209
+ } catch (e) {
1210
+ throw tt.error("Failed to parse grid lines", e, {
1211
+ operation: "parseGridLines",
1212
+ data: {
1213
+ contentLength: t.length
1214
+ }
1215
+ }), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
1216
+ }
1217
+ }
1218
+ parseGridAxes(t) {
1219
+ if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1220
+ try {
1221
+ const e = this.ifcApi.parseGridAxes(t);
1222
+ return tt.debug(`Parsed ${e.length} grid axes`, {
1223
+ operation: "parseGridAxes"
1224
+ }), e;
1225
+ } catch (e) {
1226
+ throw tt.error("Failed to parse grid axes", e, {
1227
+ operation: "parseGridAxes",
1228
+ data: {
1229
+ contentLength: t.length
1230
+ }
1231
+ }), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
1232
+ }
1233
+ }
1070
1234
  extractProfiles(t, e = 0) {
1071
1235
  if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1072
1236
  try {
1073
1237
  const n = this.ifcApi.extractProfiles(t, e);
1074
- return ct.debug(`Extracted ${n.length} profiles`, {
1238
+ return tt.debug(`Extracted ${n.length} profiles`, {
1075
1239
  operation: "extractProfiles"
1076
1240
  }), n;
1077
1241
  } catch (n) {
1078
- throw ct.error("Failed to extract profiles", n, {
1242
+ throw tt.error("Failed to extract profiles", n, {
1079
1243
  operation: "extractProfiles",
1080
1244
  data: {
1081
1245
  contentLength: t.length
@@ -1103,7 +1267,7 @@ let __tla = Promise.all([
1103
1267
  if (!this.ifcApi) return;
1104
1268
  const t = this.ifcApi;
1105
1269
  if (typeof t.setMergeLayers != "function") {
1106
- ct.warn("setMergeLayers not present on WASM API — flag tracked but suppression is a no-op until WASM is rebuilt", {
1270
+ tt.warn("setMergeLayers not present on WASM API — flag tracked but suppression is a no-op until WASM is rebuilt", {
1107
1271
  operation: "setMergeLayers",
1108
1272
  data: {
1109
1273
  requested: this.mergeLayers
@@ -1111,18 +1275,18 @@ let __tla = Promise.all([
1111
1275
  });
1112
1276
  return;
1113
1277
  }
1114
- t.setMergeLayers(this.mergeLayers), ct.debug(`mergeLayers=${this.mergeLayers}`, {
1278
+ t.setMergeLayers(this.mergeLayers), tt.debug(`mergeLayers=${this.mergeLayers}`, {
1115
1279
  operation: "setMergeLayers"
1116
1280
  });
1117
1281
  }
1118
1282
  }
1119
- function Ue() {
1283
+ function $e() {
1120
1284
  return typeof window < "u" && "__TAURI_INTERNALS__" in window;
1121
1285
  }
1122
- async function un() {
1123
- if (Ue()) {
1124
- const { NativeBridge: r } = await $e(async ()=>{
1125
- const { NativeBridge: t } = await import("./native-bridge-RvDmzO-2.js").then(async (m)=>{
1286
+ async function gn() {
1287
+ if ($e()) {
1288
+ const { NativeBridge: r } = await je(async ()=>{
1289
+ const { NativeBridge: t } = await import("./native-bridge-BX8_tHXE.js").then(async (m)=>{
1126
1290
  await m.__tla;
1127
1291
  return m;
1128
1292
  });
@@ -1134,12 +1298,12 @@ let __tla = Promise.all([
1134
1298
  }
1135
1299
  throw new Error("createPlatformBridge() is native-only; the browser uses the WASM GeometryProcessor path directly.");
1136
1300
  }
1137
- class hn {
1301
+ class yn {
1138
1302
  buildInterleavedBuffer(t) {
1139
1303
  const e = t.positions.length / 3, n = new Float32Array(e * 6);
1140
1304
  for(let s = 0; s < e; s++){
1141
- const i = s * 6, o = s * 3, a = s * 3;
1142
- n[i] = t.positions[o], n[i + 1] = t.positions[o + 1], n[i + 2] = t.positions[o + 2], n[i + 3] = t.normals[a], n[i + 4] = t.normals[a + 1], n[i + 5] = t.normals[a + 2];
1305
+ const i = s * 6, o = s * 3, c = s * 3;
1306
+ n[i] = t.positions[o], n[i + 1] = t.positions[o + 1], n[i + 2] = t.positions[o + 2], n[i + 3] = t.normals[c], n[i + 4] = t.normals[c + 1], n[i + 5] = t.normals[c + 2];
1143
1307
  }
1144
1308
  return n;
1145
1309
  }
@@ -1153,7 +1317,7 @@ let __tla = Promise.all([
1153
1317
  };
1154
1318
  }
1155
1319
  }
1156
- class pn {
1320
+ class mn {
1157
1321
  originShift = {
1158
1322
  x: 0,
1159
1323
  y: 0,
@@ -1166,6 +1330,8 @@ let __tla = Promise.all([
1166
1330
  wasmRtcDetected = !1;
1167
1331
  NORMAL_COORD_THRESHOLD = 1e4;
1168
1332
  activeThreshold = 1e7;
1333
+ appliedWasmRtcOffset = null;
1334
+ lengthUnitScale = void 0;
1169
1335
  isReasonableValue(t) {
1170
1336
  return Number.isFinite(t) && Math.abs(t) < this.MAX_REASONABLE_COORD;
1171
1337
  }
@@ -1185,22 +1351,22 @@ let __tla = Promise.all([
1185
1351
  }, s = e ?? this.MAX_REASONABLE_COORD;
1186
1352
  for (const i of t){
1187
1353
  const o = i.positions;
1188
- for(let a = 0; a < o.length; a += 3){
1189
- const l = o[a], d = o[a + 1], u = o[a + 2];
1354
+ for(let c = 0; c < o.length; c += 3){
1355
+ const l = o[c], d = o[c + 1], u = o[c + 2];
1190
1356
  Number.isFinite(l) && Number.isFinite(d) && Number.isFinite(u) && Math.abs(l) < s && Math.abs(d) < s && Math.abs(u) < s && (n.min.x = Math.min(n.min.x, l), n.min.y = Math.min(n.min.y, d), n.min.z = Math.min(n.min.z, u), n.max.x = Math.max(n.max.x, l), n.max.y = Math.max(n.max.y, d), n.max.z = Math.max(n.max.z, u));
1191
1357
  }
1192
1358
  }
1193
1359
  return n;
1194
1360
  }
1195
1361
  calculateBoundsFast(t) {
1196
- let e = 1 / 0, n = 1 / 0, s = 1 / 0, i = -1 / 0, o = -1 / 0, a = -1 / 0;
1362
+ let e = 1 / 0, n = 1 / 0, s = 1 / 0, i = -1 / 0, o = -1 / 0, c = -1 / 0;
1197
1363
  for (const l of t){
1198
1364
  const d = l.positions, u = d.length;
1199
1365
  if (u < 3) continue;
1200
- const f = d[0], p = d[1], _ = d[2];
1201
- if (f < e && (e = f), p < n && (n = p), _ < s && (s = _), f > i && (i = f), p > o && (o = p), _ > a && (a = _), u >= 6) {
1202
- const h = d[u - 3], y = d[u - 2], m = d[u - 1];
1203
- h < e && (e = h), y < n && (n = y), m < s && (s = m), h > i && (i = h), y > o && (o = y), m > a && (a = m);
1366
+ const f = d[0], p = d[1], g = d[2];
1367
+ if (f < e && (e = f), p < n && (n = p), g < s && (s = g), f > i && (i = f), p > o && (o = p), g > c && (c = g), u >= 6) {
1368
+ const h = d[u - 3], y = d[u - 2], E = d[u - 1];
1369
+ h < e && (e = h), y < n && (n = y), E < s && (s = E), h > i && (i = h), y > o && (o = y), E > c && (c = E);
1204
1370
  }
1205
1371
  }
1206
1372
  return {
@@ -1212,7 +1378,7 @@ let __tla = Promise.all([
1212
1378
  max: {
1213
1379
  x: i,
1214
1380
  y: o,
1215
- z: a
1381
+ z: c
1216
1382
  }
1217
1383
  };
1218
1384
  }
@@ -1229,8 +1395,8 @@ let __tla = Promise.all([
1229
1395
  shiftPositions(t, e, n) {
1230
1396
  const s = n ?? this.MAX_REASONABLE_COORD;
1231
1397
  for(let i = 0; i < t.length; i += 3){
1232
- const o = t[i], a = t[i + 1], l = t[i + 2];
1233
- Number.isFinite(o) && Number.isFinite(a) && Number.isFinite(l) && Math.abs(o) < s && Math.abs(a) < s && Math.abs(l) < s ? (t[i] = o - e.x, t[i + 1] = a - e.y, t[i + 2] = l - e.z) : (t[i] = 0, t[i + 1] = 0, t[i + 2] = 0);
1398
+ const o = t[i], c = t[i + 1], l = t[i + 2];
1399
+ Number.isFinite(o) && Number.isFinite(c) && Number.isFinite(l) && Math.abs(o) < s && Math.abs(c) < s && Math.abs(l) < s ? (t[i] = o - e.x, t[i + 1] = c - e.y, t[i + 2] = l - e.z) : (t[i] = 0, t[i + 1] = 0, t[i + 2] = 0);
1234
1400
  }
1235
1401
  }
1236
1402
  shiftBounds(t, e) {
@@ -1300,11 +1466,11 @@ let __tla = Promise.all([
1300
1466
  const o = this.calculateCentroid(n);
1301
1467
  this.originShift = o;
1302
1468
  for (const l of t)this.shiftPositions(l.positions, o);
1303
- const a = this.shiftBounds(n, o);
1469
+ const c = this.shiftBounds(n, o);
1304
1470
  return {
1305
1471
  originShift: o,
1306
1472
  originalBounds: n,
1307
- shiftedBounds: a,
1473
+ shiftedBounds: c,
1308
1474
  hasLargeCoordinates: !0
1309
1475
  };
1310
1476
  }
@@ -1336,18 +1502,18 @@ let __tla = Promise.all([
1336
1502
  x: this.accumulatedBounds.max.x - this.accumulatedBounds.min.x,
1337
1503
  y: this.accumulatedBounds.max.y - this.accumulatedBounds.min.y,
1338
1504
  z: this.accumulatedBounds.max.z - this.accumulatedBounds.min.z
1339
- }, i = Math.max(s.x, s.y, s.z), o = this.calculateCentroid(this.accumulatedBounds), a = Math.sqrt(o.x ** 2 + o.y ** 2 + o.z ** 2);
1505
+ }, i = Math.max(s.x, s.y, s.z), o = this.calculateCentroid(this.accumulatedBounds), c = Math.sqrt(o.x ** 2 + o.y ** 2 + o.z ** 2);
1340
1506
  let l = 0, d = 0;
1341
1507
  const u = this.THRESHOLD;
1342
- for (const _ of t){
1343
- const h = _.positions;
1508
+ for (const g of t){
1509
+ const h = g.positions;
1344
1510
  if (h.length >= 3) {
1345
- const y = Math.abs(h[0]), m = Math.abs(h[1]), b = Math.abs(h[2]);
1346
- Math.max(y, m, b) < u ? l++ : d++;
1511
+ const y = Math.abs(h[0]), E = Math.abs(h[1]), C = Math.abs(h[2]);
1512
+ Math.max(y, E, C) < u ? l++ : d++;
1347
1513
  }
1348
1514
  }
1349
1515
  const f = l + d, p = f > 0 && l / f > .5;
1350
- p && (this.wasmRtcDetected = !0, this.accumulatedBounds = this.calculateBounds(t, this.NORMAL_COORD_THRESHOLD)), (a > this.THRESHOLD || i > this.THRESHOLD) && !p && (this.originShift = o);
1516
+ p && (this.wasmRtcDetected = !0, this.accumulatedBounds = this.calculateBounds(t, this.NORMAL_COORD_THRESHOLD)), (c > this.THRESHOLD || i > this.THRESHOLD) && !p && (this.originShift = o);
1351
1517
  }
1352
1518
  this.shiftCalculated = !0;
1353
1519
  }
@@ -1372,7 +1538,15 @@ let __tla = Promise.all([
1372
1538
  ...this.accumulatedBounds
1373
1539
  },
1374
1540
  shiftedBounds: e,
1375
- hasLargeCoordinates: n
1541
+ hasLargeCoordinates: n,
1542
+ ...this.appliedWasmRtcOffset ? {
1543
+ wasmRtcOffset: {
1544
+ ...this.appliedWasmRtcOffset
1545
+ }
1546
+ } : {},
1547
+ ...this.lengthUnitScale !== void 0 ? {
1548
+ lengthUnitScale: this.lengthUnitScale
1549
+ } : {}
1376
1550
  };
1377
1551
  }
1378
1552
  getFinalCoordinateInfo() {
@@ -1407,27 +1581,40 @@ let __tla = Promise.all([
1407
1581
  z: 0
1408
1582
  }
1409
1583
  },
1410
- hasLargeCoordinates: !1
1584
+ hasLargeCoordinates: !1,
1585
+ ...this.appliedWasmRtcOffset ? {
1586
+ wasmRtcOffset: {
1587
+ ...this.appliedWasmRtcOffset
1588
+ }
1589
+ } : {},
1590
+ ...this.lengthUnitScale !== void 0 ? {
1591
+ lengthUnitScale: this.lengthUnitScale
1592
+ } : {}
1411
1593
  };
1412
1594
  }
1595
+ setWasmMetadata(t, e) {
1596
+ this.lengthUnitScale = t, this.appliedWasmRtcOffset = e ? {
1597
+ ...e
1598
+ } : null;
1599
+ }
1413
1600
  reset() {
1414
1601
  this.accumulatedBounds = null, this.shiftCalculated = !1, this.originShift = {
1415
1602
  x: 0,
1416
1603
  y: 0,
1417
1604
  z: 0
1418
- }, this.wasmRtcDetected = !1, this.activeThreshold = this.MAX_REASONABLE_COORD;
1605
+ }, this.wasmRtcDetected = !1, this.activeThreshold = this.MAX_REASONABLE_COORD, this.appliedWasmRtcOffset = null, this.lengthUnitScale = void 0;
1419
1606
  }
1420
1607
  }
1421
- In = ((r)=>(r.Fast = "fast", r.Balanced = "balanced", r.High = "high", r))(In || {});
1422
- function gn(r) {
1423
- const t = Math.max(0, r.fileSizeMB), e = Math.max(1, Math.floor(r.cores)), n = Math.max(1, r.deviceMemoryGB), s = e >= 10 ? Math.max(n, 16) : n, i = Math.max(0, Math.floor(r.totalJobs)), o = Math.max(1, Math.floor(r.minWorkers ?? 1)), a = Math.max(o, Math.floor(r.maxWorkers ?? 8));
1608
+ En = ((r)=>(r.Fast = "fast", r.Balanced = "balanced", r.High = "high", r))(En || {});
1609
+ function bn(r) {
1610
+ const t = Math.max(0, r.fileSizeMB), e = Math.max(1, Math.floor(r.cores)), n = Math.max(1, r.deviceMemoryGB), s = e >= 10 ? Math.max(n, 16) : n, i = Math.max(0, Math.floor(r.totalJobs)), o = Math.max(1, Math.floor(r.minWorkers ?? 1)), c = Math.max(o, Math.floor(r.maxWorkers ?? 8));
1424
1611
  if (i === 0) return {
1425
1612
  count: 0,
1426
1613
  reason: "jobs"
1427
1614
  };
1428
1615
  let l;
1429
- e >= 16 && s >= 16 ? l = Math.min(a, Math.floor(e / 2)) : e >= 12 && s >= 8 ? l = t > 512 ? 4 : 5 : e >= 10 && s >= 8 ? l = t > 512 ? 3 : 4 : e >= 8 && s >= 8 ? l = t > 512 ? 2 : 3 : l = Math.max(1, Math.min(2, Math.floor(e / 2)));
1430
- const d = s * 1024, u = Math.max(1024, d * .25), f = t * 2.5, p = Math.max(64, t * 1.5), _ = d - u - f, h = _ > 0 ? Math.max(1, Math.floor(_ / p)) : 1, y = [
1616
+ e >= 16 && s >= 16 ? l = Math.min(c, Math.floor(e / 2)) : e >= 12 && s >= 8 ? l = t > 512 ? 4 : 5 : e >= 10 && s >= 8 ? l = t > 512 ? 3 : 4 : e >= 8 && s >= 8 ? l = t > 512 ? 2 : 3 : l = Math.max(1, Math.min(2, Math.floor(e / 2)));
1617
+ const d = s * 1024, u = Math.max(1024, d * .25), f = t * 2.5, p = Math.max(64, t * 1.5), g = d - u - f, h = g > 0 ? Math.max(1, Math.floor(g / p)) : 1, y = [
1431
1618
  {
1432
1619
  value: l,
1433
1620
  reason: "cores"
@@ -1441,34 +1628,34 @@ let __tla = Promise.all([
1441
1628
  reason: "jobs"
1442
1629
  },
1443
1630
  {
1444
- value: a,
1631
+ value: c,
1445
1632
  reason: "max"
1446
1633
  }
1447
1634
  ];
1448
- let m = y[0];
1449
- for(let b = 1; b < y.length; b++)y[b].value < m.value && (m = y[b]);
1450
- return m.value < o ? {
1635
+ let E = y[0];
1636
+ for(let C = 1; C < y.length; C++)y[C].value < E.value && (E = y[C]);
1637
+ return E.value < o ? {
1451
1638
  count: o,
1452
1639
  reason: "min"
1453
1640
  } : {
1454
- count: m.value,
1455
- reason: m.reason
1641
+ count: E.value,
1642
+ reason: E.reason
1456
1643
  };
1457
1644
  }
1458
- function _n(r) {
1459
- return gn(r).count;
1645
+ function Cn(r) {
1646
+ return bn(r).count;
1460
1647
  }
1461
- const yn = 3e4, En = 15e3, mn = 15e3, Cn = 5e3, bn = 60, Tn = 30, wn = 30, Fn = 15;
1462
- ns = function(r) {
1463
- const t = r.desktopStableWasm === !0, e = Math.max(0, Math.floor(r.batchCount)), n = Math.max(0, r.fileSizeMB), s = e > 0 ? t ? Cn : mn : t ? En : yn, i = e > 0 ? t ? Fn : wn : t ? Tn : bn;
1648
+ const wn = 3e4, Tn = 15e3, Fn = 15e3, Rn = 5e3, Sn = 60, Nn = 30, An = 30, On = 15;
1649
+ as = function(r) {
1650
+ const t = r.desktopStableWasm === !0, e = Math.max(0, Math.floor(r.batchCount)), n = Math.max(0, r.fileSizeMB), s = e > 0 ? t ? Rn : Fn : t ? Tn : wn, i = e > 0 ? t ? On : An : t ? Nn : Sn;
1464
1651
  return Math.max(s, Math.round(s + n * i));
1465
1652
  };
1466
- function Rn(r, t) {
1653
+ function xn(r, t) {
1467
1654
  if (typeof t == "number") return t;
1468
1655
  const e = t.fileSizeMB ? t.fileSizeMB : r.length / (1024 * 1024);
1469
1656
  return e < 10 ? 100 : e < 50 ? 200 : e < 100 ? 300 : e < 300 ? 500 : e < 500 ? 1500 : 3e3;
1470
1657
  }
1471
- function Ce(r) {
1658
+ function Fe(r) {
1472
1659
  const t = [];
1473
1660
  try {
1474
1661
  for(let e = 0; e < r.length; e++){
@@ -1479,8 +1666,7 @@ let __tla = Promise.all([
1479
1666
  s[1],
1480
1667
  s[2],
1481
1668
  s[3]
1482
- ] : void 0;
1483
- t.push({
1669
+ ] : void 0, o = {
1484
1670
  expressId: n.expressId,
1485
1671
  ifcType: n.ifcType,
1486
1672
  positions: n.positions,
@@ -1495,7 +1681,14 @@ let __tla = Promise.all([
1495
1681
  ...i ? {
1496
1682
  shadingColor: i
1497
1683
  } : {}
1498
- });
1684
+ };
1685
+ n.hasTexture && (o.uvs = n.uvs, o.texture = {
1686
+ rgba: n.textureRgba,
1687
+ width: n.textureWidth,
1688
+ height: n.textureHeight,
1689
+ repeatS: n.textureRepeatS,
1690
+ repeatT: n.textureRepeatT
1691
+ }), t.push(o);
1499
1692
  } finally{
1500
1693
  n.free();
1501
1694
  }
@@ -1505,41 +1698,41 @@ let __tla = Promise.all([
1505
1698
  }
1506
1699
  return t;
1507
1700
  }
1508
- function Vt(r, t) {
1701
+ function Wt(r, t) {
1509
1702
  return t !== void 0 ? {
1510
1703
  ...r,
1511
1704
  buildingRotation: t
1512
1705
  } : r;
1513
1706
  }
1514
- const Nn = 8, Sn = 32768, An = 4, On = 8192, Ln = 10;
1515
- function be() {
1707
+ const Ln = 8, Mn = 32768, Pn = 4, Bn = 8192, Un = 10;
1708
+ function Re() {
1516
1709
  const r = globalThis.scheduler;
1517
1710
  return typeof r?.yield == "function" ? r.yield() : new Promise((t)=>{
1518
1711
  globalThis.setTimeout(t, 0);
1519
1712
  });
1520
1713
  }
1521
- function Te(r, t, e) {
1714
+ function Se(r, t, e) {
1522
1715
  if (t.type === "colorUpdate") {
1523
1716
  const i = r[r.length - 1];
1524
1717
  if (i?.type === "colorUpdate") {
1525
- for (const [o, a] of t.updates)i.updates.set(o, a);
1718
+ for (const [o, c] of t.updates)i.updates.set(o, c);
1526
1719
  return;
1527
1720
  }
1528
1721
  r.push(t);
1529
1722
  return;
1530
1723
  }
1531
1724
  const n = r[r.length - 1];
1532
- if (n?.type === "batch" && (r.length >= Nn || e.queuedMeshes >= Sn)) {
1725
+ if (n?.type === "batch" && (r.length >= Ln || e.queuedMeshes >= Mn)) {
1533
1726
  for(let i = 0; i < t.meshes.length; i++)n.meshes.push(t.meshes[i]);
1534
1727
  n.nativeTelemetry = t.nativeTelemetry, e.coalescedBatchCount += 1;
1535
1728
  } else r.push(t);
1536
1729
  e.queuedMeshes += t.meshes.length;
1537
1730
  }
1538
- async function* we(r, t, e, n) {
1731
+ async function* Ne(r, t, e, n) {
1539
1732
  e.reset(), yield {
1540
1733
  type: "start",
1541
1734
  totalEstimate: t
1542
- }, await be(), yield {
1735
+ }, await Re(), yield {
1543
1736
  type: "model-open",
1544
1737
  modelID: 0
1545
1738
  };
@@ -1547,65 +1740,65 @@ let __tla = Promise.all([
1547
1740
  queuedMeshes: 0,
1548
1741
  coalescedBatchCount: 0
1549
1742
  };
1550
- let o = null, a = !1, l = null, d, u = 0;
1743
+ let o = null, c = !1, l = null, d, u = 0;
1551
1744
  const f = ()=>{
1552
1745
  o && (o(), o = null);
1553
1746
  }, p = r({
1554
1747
  onBatch: (h)=>{
1555
- Te(s, {
1748
+ Se(s, {
1556
1749
  type: "batch",
1557
1750
  meshes: h.meshes,
1558
1751
  nativeTelemetry: h.nativeTelemetry
1559
1752
  }, i), f();
1560
1753
  },
1561
1754
  onColorUpdate: (h)=>{
1562
- Te(s, {
1755
+ Se(s, {
1563
1756
  type: "colorUpdate",
1564
1757
  updates: new Map(h)
1565
1758
  }, i), f();
1566
1759
  },
1567
1760
  onComplete: (h)=>{
1568
- n(h), d = h.totalMeshes, a = !0, f();
1761
+ n(h), d = h.totalMeshes, c = !0, f();
1569
1762
  },
1570
1763
  onError: (h)=>{
1571
- l = h, a = !0, f();
1764
+ l = h, c = !0, f();
1572
1765
  }
1573
1766
  });
1574
- for(; !a || s.length > 0;){
1575
- let h = 0, y = 0, m = performance.now();
1767
+ for(; !c || s.length > 0;){
1768
+ let h = 0, y = 0, E = performance.now();
1576
1769
  for(; s.length > 0;){
1577
- const b = s.shift();
1578
- if (b.type === "colorUpdate") {
1770
+ const C = s.shift();
1771
+ if (C.type === "colorUpdate") {
1579
1772
  yield {
1580
1773
  type: "colorUpdate",
1581
- updates: b.updates
1774
+ updates: C.updates
1582
1775
  };
1583
1776
  continue;
1584
1777
  }
1585
- i.queuedMeshes = Math.max(0, i.queuedMeshes - b.meshes.length), e.processTrustedMeshesIncremental(b.meshes), u += b.meshes.length;
1586
- const w = e.getCurrentCoordinateInfo();
1778
+ i.queuedMeshes = Math.max(0, i.queuedMeshes - C.meshes.length), e.processTrustedMeshesIncremental(C.meshes), u += C.meshes.length;
1779
+ const T = e.getCurrentCoordinateInfo();
1587
1780
  yield {
1588
1781
  type: "batch",
1589
- meshes: b.meshes,
1782
+ meshes: C.meshes,
1590
1783
  totalSoFar: u,
1591
- coordinateInfo: w || void 0,
1592
- nativeTelemetry: b.nativeTelemetry
1593
- }, h += 1, y += b.meshes.length, s.length > 0 && (h >= An || y >= On || performance.now() - m >= Ln) && (await be(), h = 0, y = 0, m = performance.now());
1784
+ coordinateInfo: T || void 0,
1785
+ nativeTelemetry: C.nativeTelemetry
1786
+ }, h += 1, y += C.meshes.length, s.length > 0 && (h >= Pn || y >= Bn || performance.now() - E >= Un) && (await Re(), h = 0, y = 0, E = performance.now());
1594
1787
  }
1595
1788
  if (l) throw l;
1596
- a || await new Promise((b)=>{
1597
- o = b;
1789
+ c || await new Promise((C)=>{
1790
+ o = C;
1598
1791
  });
1599
1792
  }
1600
1793
  await p, i.coalescedBatchCount > 0 && console.info(`[GeometryProcessor] Coalesced ${i.coalescedBatchCount} native batches while JS drained the queue`);
1601
- const _ = e.getFinalCoordinateInfo();
1794
+ const g = e.getFinalCoordinateInfo();
1602
1795
  yield {
1603
1796
  type: "complete",
1604
1797
  totalMeshes: d ?? u,
1605
- coordinateInfo: _
1798
+ coordinateInfo: g
1606
1799
  };
1607
1800
  }
1608
- async function* Mn(r, t, e, n, s) {
1801
+ async function* Dn(r, t, e, n, s) {
1609
1802
  t.reset(), yield {
1610
1803
  type: "start",
1611
1804
  totalEstimate: r.length / 1e3
@@ -1616,76 +1809,82 @@ let __tla = Promise.all([
1616
1809
  let i;
1617
1810
  const o = r.buffer;
1618
1811
  n && n.byteLength === r.byteLength ? i = n : typeof SharedArrayBuffer < "u" && o instanceof SharedArrayBuffer && r.byteOffset === 0 && r.byteLength === o.byteLength ? i = o : (i = new SharedArrayBuffer(r.byteLength), new Uint8Array(i).set(r));
1619
- const a = ()=>new Worker(new URL("/assets/geometry.worker-Cyn5BybV.js", import.meta.url), {
1812
+ const c = ()=>new Worker(new URL("/assets/geometry.worker-BdH-E6NB.js", import.meta.url), {
1620
1813
  type: "module"
1621
- }), l = ()=>new Worker(new URL("/assets/geometry.worker-Cyn5BybV.js", import.meta.url), {
1814
+ }), l = ()=>new Worker(new URL("/assets/geometry.worker-BdH-E6NB.js", import.meta.url), {
1622
1815
  type: "module"
1623
1816
  }), d = [];
1624
1817
  let u = null;
1625
1818
  const f = ()=>{
1626
1819
  u && (u(), u = null);
1627
1820
  };
1628
- let p = null, _ = 0, h = !1, y = null, m = null, b = 0, w = 0, v = !1, L = !1;
1629
- const j = [];
1630
- let O = !1, U = !1;
1631
- const C = [], N = (M, X)=>{
1632
- M.onmessage = (B)=>{
1633
- const x = B.data;
1634
- if (x.type === "ready") {
1821
+ let p = null, g = 0, h = !1, y = null, E = null, C = 0, T = 0, $ = !1, x = !1;
1822
+ const Y = [];
1823
+ let O = !1, v = !1;
1824
+ const b = [], S = (L, X)=>{
1825
+ L.onmessage = (B)=>{
1826
+ const M = B.data;
1827
+ if (M.type === "ready") {
1635
1828
  console.log(`[stream] worker[${X}] WASM ready @ ${Q()}ms`);
1636
1829
  return;
1637
1830
  }
1638
- if (x.type === "memory") {
1831
+ if (M.type === "memory") {
1639
1832
  d.push({
1640
1833
  type: "workerMemory",
1641
1834
  workerIndex: X,
1642
- wasmHeapBytes: x.wasmHeapBytes,
1643
- meshBytes: x.meshBytes
1835
+ wasmHeapBytes: M.wasmHeapBytes,
1836
+ meshBytes: M.meshBytes
1644
1837
  }), f();
1645
1838
  return;
1646
1839
  }
1647
- if (x.type === "batch") {
1648
- C[X] === void 0 && (C[X] = Q(), console.log(`[stream] worker[${X}] first batch @ ${Q()}ms (${x.meshes?.length ?? 0} meshes)`));
1649
- const q = x.meshes.map((D)=>({
1650
- expressId: D.expressId,
1651
- ifcType: D.ifcType,
1652
- positions: D.positions instanceof Float32Array ? D.positions : new Float32Array(D.positions),
1653
- normals: D.normals instanceof Float32Array ? D.normals : new Float32Array(D.normals),
1654
- indices: D.indices instanceof Uint32Array ? D.indices : new Uint32Array(D.indices),
1655
- color: D.color
1840
+ if (M.type === "batch") {
1841
+ b[X] === void 0 && (b[X] = Q(), console.log(`[stream] worker[${X}] first batch @ ${Q()}ms (${M.meshes?.length ?? 0} meshes)`));
1842
+ const q = M.meshes.map((P)=>({
1843
+ expressId: P.expressId,
1844
+ ifcType: P.ifcType,
1845
+ positions: P.positions instanceof Float32Array ? P.positions : new Float32Array(P.positions),
1846
+ normals: P.normals instanceof Float32Array ? P.normals : new Float32Array(P.normals),
1847
+ indices: P.indices instanceof Uint32Array ? P.indices : new Uint32Array(P.indices),
1848
+ color: P.color,
1849
+ ...P.uvs ? {
1850
+ uvs: P.uvs
1851
+ } : {},
1852
+ ...P.texture ? {
1853
+ texture: P.texture
1854
+ } : {}
1656
1855
  }));
1657
1856
  if (q.length > 0) {
1658
- w += q.length, t.processMeshesIncremental(q);
1659
- const D = t.getCurrentCoordinateInfo();
1857
+ T += q.length, t.processMeshesIncremental(q);
1858
+ const P = t.getCurrentCoordinateInfo();
1660
1859
  d.push({
1661
1860
  type: "batch",
1662
1861
  meshes: q,
1663
- totalSoFar: w,
1664
- coordinateInfo: D || void 0
1862
+ totalSoFar: T,
1863
+ coordinateInfo: P || void 0
1665
1864
  }), f();
1666
1865
  }
1667
1866
  return;
1668
1867
  }
1669
- if (x.type === "complete") {
1670
- b++, M.terminate(), f();
1868
+ if (M.type === "complete") {
1869
+ C++, L.terminate(), f();
1671
1870
  return;
1672
1871
  }
1673
- if (x.type === "error") {
1674
- m = new Error(`Geometry worker error: ${x.message}`), b++, M.terminate(), f();
1872
+ if (M.type === "error") {
1873
+ E = new Error(`Geometry worker error: ${M.message}`), C++, L.terminate(), f();
1675
1874
  return;
1676
1875
  }
1677
- }, M.onerror = (B)=>{
1678
- m = new Error(`Geometry worker failed: ${B.message}`), b++, M.terminate(), f();
1876
+ }, L.onerror = (B)=>{
1877
+ E = new Error(`Geometry worker failed: ${B.message}`), C++, L.terminate(), f();
1679
1878
  };
1680
- }, F = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2, E = typeof navigator < "u" ? navigator.deviceMemory ?? 8 : 8, g = r.byteLength / (1024 * 1024), T = Math.max(1, Math.ceil(g * 100)), I = _n({
1681
- fileSizeMB: g,
1879
+ }, F = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2, m = typeof navigator < "u" ? navigator.deviceMemory ?? 8 : 8, _ = r.byteLength / (1024 * 1024), w = Math.max(1, Math.ceil(_ * 100)), I = Cn({
1880
+ fileSizeMB: _,
1682
1881
  cores: F,
1683
- deviceMemoryGB: E,
1684
- totalJobs: T
1882
+ deviceMemoryGB: m,
1883
+ totalJobs: w
1685
1884
  }), R = [];
1686
- for(let M = 0; M < I; M++){
1687
- const X = a();
1688
- R.push(X), N(X, M);
1885
+ for(let L = 0; L < I; L++){
1886
+ const X = c();
1887
+ R.push(X), S(X, L);
1689
1888
  const B = s?.wasmUrls?.wasm;
1690
1889
  X.postMessage({
1691
1890
  type: "init",
@@ -1697,83 +1896,87 @@ let __tla = Promise.all([
1697
1896
  enabled: s?.mergeLayers === !0
1698
1897
  });
1699
1898
  }
1700
- const S = ()=>{
1701
- if (!v) {
1702
- v = !0;
1703
- for (const M of R)try {
1704
- M.postMessage({
1899
+ const N = ()=>{
1900
+ if (!$) {
1901
+ $ = !0;
1902
+ for (const L of R)try {
1903
+ L.postMessage({
1705
1904
  type: "stream-end"
1706
1905
  });
1707
1906
  } catch {}
1708
1907
  }
1709
- }, G = ()=>{
1710
- if (L || !p) return;
1711
- L = !0;
1712
- const M = e != null, X = M ? e.x : p.rtcOffset[0], B = M ? e.y : p.rtcOffset[1], x = M ? e.z : p.rtcOffset[2], q = M ? !0 : p.needsShift;
1713
- d.push({
1908
+ }, V = ()=>{
1909
+ if (x || !p) return;
1910
+ x = !0;
1911
+ const L = e != null, X = L ? e.x : p.rtcOffset[0], B = L ? e.y : p.rtcOffset[1], M = L ? e.z : p.rtcOffset[2], q = L ? !0 : p.needsShift;
1912
+ t.setWasmMetadata(p.unitScale, q ? {
1913
+ x: X,
1914
+ y: B,
1915
+ z: M
1916
+ } : null), d.push({
1714
1917
  type: "rtcOffset",
1715
1918
  rtcOffset: {
1716
1919
  x: X,
1717
1920
  y: B,
1718
- z: x
1921
+ z: M
1719
1922
  },
1720
1923
  hasRtc: q
1721
1924
  }), f();
1722
- const D = new Uint32Array(0), nt = new Uint8Array(0);
1723
- for (const ht of R)ht.postMessage({
1925
+ const P = new Uint32Array(0), it = new Uint8Array(0);
1926
+ for (const pt of R)pt.postMessage({
1724
1927
  type: "stream-start",
1725
1928
  sharedBuffer: i,
1726
1929
  unitScale: p.unitScale,
1727
1930
  rtcX: X,
1728
1931
  rtcY: B,
1729
- rtcZ: x,
1932
+ rtcZ: M,
1730
1933
  needsShift: q,
1731
- voidKeys: D,
1732
- voidCounts: D,
1733
- voidValues: D,
1734
- styleIds: D,
1735
- styleColors: nt
1934
+ voidKeys: P,
1935
+ voidCounts: P,
1936
+ voidValues: P,
1937
+ styleIds: P,
1938
+ styleColors: it
1736
1939
  });
1737
1940
  };
1738
- function $(M) {
1739
- if (R.length === 0 || M.length === 0) return;
1740
- const X = Math.floor(M.length / 3);
1941
+ function z(L) {
1942
+ if (R.length === 0 || L.length === 0) return;
1943
+ const X = Math.floor(L.length / 3);
1741
1944
  if (X === 0) return;
1742
1945
  const B = Math.ceil(X / R.length);
1743
1946
  try {
1744
- for(let x = 0; x < R.length; x++){
1745
- const q = x * B * 3, D = Math.min(q + B * 3, M.length);
1746
- if (q >= D) continue;
1747
- const nt = M.slice(q, D);
1748
- R[x].postMessage({
1947
+ for(let M = 0; M < R.length; M++){
1948
+ const q = M * B * 3, P = Math.min(q + B * 3, L.length);
1949
+ if (q >= P) continue;
1950
+ const it = L.slice(q, P);
1951
+ R[M].postMessage({
1749
1952
  type: "stream-chunk",
1750
- jobsFlat: nt
1953
+ jobsFlat: it
1751
1954
  }, [
1752
- nt.buffer
1955
+ it.buffer
1753
1956
  ]);
1754
1957
  }
1755
- } catch (x) {
1756
- m = new Error(`Failed to dispatch jobs chunk: ${x instanceof Error ? x.message : String(x)}`), f();
1958
+ } catch (M) {
1959
+ E = new Error(`Failed to dispatch jobs chunk: ${M instanceof Error ? M.message : String(M)}`), f();
1757
1960
  }
1758
1961
  }
1759
- const V = (M)=>{
1760
- if (!L || !O || !U) {
1761
- j.push(M);
1962
+ const W = (L)=>{
1963
+ if (!x || !O || !v) {
1964
+ Y.push(L);
1762
1965
  return;
1763
1966
  }
1764
- $(M);
1967
+ z(L);
1765
1968
  }, H = ()=>{
1766
- if (!(!L || !O || !U)) for(; j.length > 0;)$(j.shift());
1767
- }, z = performance.now(), Q = ()=>Math.round(performance.now() - z);
1768
- console.log(`[stream] processParallel start, fileSizeMB=${g.toFixed(1)} workerCount=${I}`);
1969
+ if (!(!x || !O || !v)) for(; Y.length > 0;)z(Y.shift());
1970
+ }, j = performance.now(), Q = ()=>Math.round(performance.now() - j);
1971
+ console.log(`[stream] processParallel start, fileSizeMB=${_.toFixed(1)} workerCount=${I}`);
1769
1972
  const K = l();
1770
1973
  s?.wasmUrls?.wasm && K.postMessage({
1771
1974
  type: "init",
1772
1975
  wasmUrl: s.wasmUrls.wasm
1773
1976
  });
1774
- let ot = 0, ut = 0, it = -1;
1775
- K.onmessage = (M)=>{
1776
- const X = M.data;
1977
+ let at = 0, ht = 0, rt = -1;
1978
+ K.onmessage = (L)=>{
1979
+ const X = L.data;
1777
1980
  if (X.type === "prepass-progress") {
1778
1981
  d.push({
1779
1982
  type: "progress",
@@ -1788,108 +1991,108 @@ let __tla = Promise.all([
1788
1991
  rtcOffset: B.rtcOffset,
1789
1992
  needsShift: B.needsShift,
1790
1993
  buildingRotation: B.buildingRotation ?? null
1791
- }, console.log(`[stream] meta @ ${Q()}ms unitScale=${p.unitScale} rtc=[${p.rtcOffset[0].toFixed(0)},${p.rtcOffset[1].toFixed(0)},${p.rtcOffset[2].toFixed(0)}]`), G(), f();
1994
+ }, console.log(`[stream] meta @ ${Q()}ms unitScale=${p.unitScale} rtc=[${p.rtcOffset[0].toFixed(0)},${p.rtcOffset[1].toFixed(0)},${p.rtcOffset[2].toFixed(0)}]`), V(), f();
1792
1995
  else if (B.type === "jobs") {
1793
- const x = B.jobs, q = Math.floor(x.length / 3);
1794
- ot++, ut += q, it < 0 && (it = Q(), console.log(`[stream] first jobs chunk @ ${it}ms (${q} jobs)`)), (ot % 10 === 1 || q < 1e3) && console.log(`[stream] chunk #${ot} @ ${Q()}ms (+${q} jobs, total ${ut})`), V(x);
1996
+ const M = B.jobs, q = Math.floor(M.length / 3);
1997
+ at++, ht += q, rt < 0 && (rt = Q(), console.log(`[stream] first jobs chunk @ ${rt}ms (${q} jobs)`)), (at % 10 === 1 || q < 1e3) && console.log(`[stream] chunk #${at} @ ${Q()}ms (+${q} jobs, total ${ht})`), W(M);
1795
1998
  } else if (B.type === "styles") {
1796
- const x = B.styleIds, q = B.styleColors, D = B.voidKeys, nt = B.voidCounts, ht = B.voidValues;
1797
- console.log(`[stream] styles @ ${Q()}ms (${x.length} styled, ${D.length} void hosts), draining ${j.length} queued chunks`);
1798
- for (const Ht of R)try {
1799
- const dt = x.slice(), yt = q.slice(), Et = D.slice(), mt = nt.slice(), Gt = ht.slice();
1800
- Ht.postMessage({
1999
+ const M = B.styleIds, q = B.styleColors, P = B.voidKeys, it = B.voidCounts, pt = B.voidValues;
2000
+ console.log(`[stream] styles @ ${Q()}ms (${M.length} styled, ${P.length} void hosts), draining ${Y.length} queued chunks`);
2001
+ for (const qt of R)try {
2002
+ const ft = M.slice(), yt = q.slice(), mt = P.slice(), Et = it.slice(), Vt = pt.slice();
2003
+ qt.postMessage({
1801
2004
  type: "set-styles",
1802
- styleIds: dt,
2005
+ styleIds: ft,
1803
2006
  styleColors: yt,
1804
- voidKeys: Et,
1805
- voidCounts: mt,
1806
- voidValues: Gt
2007
+ voidKeys: mt,
2008
+ voidCounts: Et,
2009
+ voidValues: Vt
1807
2010
  }, [
1808
- dt.buffer,
2011
+ ft.buffer,
1809
2012
  yt.buffer,
1810
- Et.buffer,
1811
2013
  mt.buffer,
1812
- Gt.buffer
2014
+ Et.buffer,
2015
+ Vt.buffer
1813
2016
  ]);
1814
- } catch (dt) {
1815
- console.warn("[stream] set-styles dispatch failed:", dt);
2017
+ } catch (ft) {
2018
+ console.warn("[stream] set-styles dispatch failed:", ft);
1816
2019
  }
1817
2020
  O = !0, H();
1818
2021
  } else if (B.type === "entity-index") {
1819
- const x = B.ids, q = B.starts, D = B.lengths;
1820
- if (console.log(`[stream] entity-index @ ${Q()}ms (${x.length} entries)`), typeof SharedArrayBuffer < "u") {
1821
- const nt = x.byteLength, ht = q.byteLength, Ht = D.byteLength, dt = new SharedArrayBuffer(nt), yt = new SharedArrayBuffer(ht), Et = new SharedArrayBuffer(Ht);
1822
- new Uint32Array(dt).set(x), new Uint32Array(yt).set(q), new Uint32Array(Et).set(D);
1823
- for (const mt of R)try {
1824
- mt.postMessage({
2022
+ const M = B.ids, q = B.starts, P = B.lengths;
2023
+ if (console.log(`[stream] entity-index @ ${Q()}ms (${M.length} entries)`), typeof SharedArrayBuffer < "u") {
2024
+ const it = M.byteLength, pt = q.byteLength, qt = P.byteLength, ft = new SharedArrayBuffer(it), yt = new SharedArrayBuffer(pt), mt = new SharedArrayBuffer(qt);
2025
+ new Uint32Array(ft).set(M), new Uint32Array(yt).set(q), new Uint32Array(mt).set(P);
2026
+ for (const Et of R)try {
2027
+ Et.postMessage({
1825
2028
  type: "set-entity-index",
1826
- ids: new Uint32Array(dt),
2029
+ ids: new Uint32Array(ft),
1827
2030
  starts: new Uint32Array(yt),
1828
- lengths: new Uint32Array(Et)
2031
+ lengths: new Uint32Array(mt)
1829
2032
  });
1830
- } catch (Gt) {
1831
- console.warn("[stream] set-entity-index dispatch failed:", Gt);
2033
+ } catch (Vt) {
2034
+ console.warn("[stream] set-entity-index dispatch failed:", Vt);
1832
2035
  }
1833
2036
  if (s?.onEntityIndex) try {
1834
- s.onEntityIndex(new Uint32Array(dt), new Uint32Array(yt), new Uint32Array(Et));
1835
- } catch (mt) {
1836
- console.warn("[stream] onEntityIndex callback failed:", mt);
2037
+ s.onEntityIndex(new Uint32Array(ft), new Uint32Array(yt), new Uint32Array(mt));
2038
+ } catch (Et) {
2039
+ console.warn("[stream] onEntityIndex callback failed:", Et);
1837
2040
  }
1838
2041
  } else {
1839
- for (const nt of R)try {
1840
- nt.postMessage({
2042
+ for (const it of R)try {
2043
+ it.postMessage({
1841
2044
  type: "set-entity-index",
1842
- ids: x.slice(),
2045
+ ids: M.slice(),
1843
2046
  starts: q.slice(),
1844
- lengths: D.slice()
2047
+ lengths: P.slice()
1845
2048
  });
1846
- } catch (ht) {
1847
- console.warn("[stream] set-entity-index dispatch failed:", ht);
2049
+ } catch (pt) {
2050
+ console.warn("[stream] set-entity-index dispatch failed:", pt);
1848
2051
  }
1849
2052
  if (s?.onEntityIndex) try {
1850
- s.onEntityIndex(x.slice(), q.slice(), D.slice());
1851
- } catch (nt) {
1852
- console.warn("[stream] onEntityIndex callback failed:", nt);
2053
+ s.onEntityIndex(M.slice(), q.slice(), P.slice());
2054
+ } catch (it) {
2055
+ console.warn("[stream] onEntityIndex callback failed:", it);
1853
2056
  }
1854
2057
  }
1855
- U = !0, H();
1856
- } else B.type === "complete" && (_ = B.totalJobs, console.log(`[stream] prepass complete @ ${Q()}ms totalJobs=${_} chunks=${ot}`), at || (at = !0, lt()));
2058
+ v = !0, H();
2059
+ } else B.type === "complete" && (g = B.totalJobs, console.log(`[stream] prepass complete @ ${Q()}ms totalJobs=${g} chunks=${at}`), lt || (lt = !0, dt()));
1857
2060
  return;
1858
2061
  }
1859
2062
  if (X.type === "error") {
1860
2063
  y = new Error(X.message), h = !0, K.terminate(), f();
1861
2064
  return;
1862
2065
  }
1863
- }, K.onerror = (M)=>{
1864
- y = new Error(`Pre-pass worker failed: ${M.message}`), h = !0, K.terminate(), f();
2066
+ }, K.onerror = (L)=>{
2067
+ y = new Error(`Pre-pass worker failed: ${L.message}`), h = !0, K.terminate(), f();
1865
2068
  };
1866
- const lt = ()=>{
1867
- h = !0, L && S(), K.terminate(), f();
2069
+ const dt = ()=>{
2070
+ h = !0, x && N(), K.terminate(), f();
1868
2071
  };
1869
2072
  K.postMessage({
1870
2073
  type: "prepass-streaming",
1871
2074
  sharedBuffer: i,
1872
2075
  chunkSize: 5e4
1873
2076
  });
1874
- let at = !1;
2077
+ let lt = !1;
1875
2078
  for(;;){
1876
2079
  for(; d.length > 0;)yield d.shift();
1877
- if (m) {
1878
- for (const M of R)try {
1879
- M.terminate();
2080
+ if (E) {
2081
+ for (const L of R)try {
2082
+ L.terminate();
1880
2083
  } catch {}
1881
2084
  try {
1882
2085
  K.terminate();
1883
2086
  } catch {}
1884
- throw m;
2087
+ throw E;
1885
2088
  }
1886
2089
  if (y) {
1887
- for (const M of R)try {
1888
- M.terminate();
2090
+ for (const L of R)try {
2091
+ L.terminate();
1889
2092
  } catch {}
1890
2093
  throw y;
1891
2094
  }
1892
- if (h && !L && _ === 0) {
2095
+ if (h && !x && g === 0) {
1893
2096
  for (const X of R)try {
1894
2097
  X.terminate();
1895
2098
  } catch {}
@@ -1900,26 +2103,26 @@ let __tla = Promise.all([
1900
2103
  };
1901
2104
  return;
1902
2105
  }
1903
- if (h && L && b >= R.length && d.length === 0) break;
1904
- await new Promise((M)=>{
1905
- u = M;
2106
+ if (h && x && C >= R.length && d.length === 0) break;
2107
+ await new Promise((L)=>{
2108
+ u = L;
1906
2109
  });
1907
2110
  }
1908
- const _t = t.getFinalCoordinateInfo();
2111
+ const gt = t.getFinalCoordinateInfo();
1909
2112
  yield {
1910
2113
  type: "complete",
1911
- totalMeshes: w,
1912
- coordinateInfo: _t
2114
+ totalMeshes: T,
2115
+ coordinateInfo: gt
1913
2116
  };
1914
2117
  }
1915
- let bt = null;
1916
- function xn(r) {
1917
- if (bt) throw new Error(`GeometryProcessor ${r} cannot start while ${bt} is still running. Wait for the active stream to finish, or cancel it before starting another geometry operation.`);
1918
- return bt = r, ()=>{
1919
- bt === r && (bt = null);
2118
+ let wt = null;
2119
+ function vn(r) {
2120
+ if (wt) throw new Error(`GeometryProcessor ${r} cannot start while ${wt} is still running. Wait for the active stream to finish, or cancel it before starting another geometry operation.`);
2121
+ return wt = r, ()=>{
2122
+ wt === r && (wt = null);
1920
2123
  };
1921
2124
  }
1922
- ss = class {
2125
+ cs = class {
1923
2126
  static largeFileByteStreamingThreshold = 256 * 1024 * 1024;
1924
2127
  bridge = null;
1925
2128
  platformBridge = null;
@@ -1929,19 +2132,19 @@ let __tla = Promise.all([
1929
2132
  lastNativeStats = null;
1930
2133
  mergeLayers;
1931
2134
  constructor(t = {}){
1932
- this.bufferBuilder = new hn, this.coordinateHandler = new pn, this.isNative = t.preferNative !== !1 && Ue(), this.mergeLayers = t.mergeLayers === !0, t.quality, this.isNative || (this.bridge = new fn, this.bridge.setMergeLayers(this.mergeLayers));
2135
+ this.bufferBuilder = new yn, this.coordinateHandler = new mn, this.isNative = t.preferNative !== !1 && $e(), this.mergeLayers = t.mergeLayers === !0, t.quality, this.isNative || (this.bridge = new _n, this.bridge.setMergeLayers(this.mergeLayers));
1933
2136
  }
1934
2137
  async init() {
1935
- this.isNative ? (this.platformBridge = await un(), await this.platformBridge.init(), console.log("[GeometryProcessor] Native bridge initialized")) : this.bridge && await this.bridge.init();
2138
+ this.isNative ? (this.platformBridge = await gn(), await this.platformBridge.init(), console.log("[GeometryProcessor] Native bridge initialized")) : this.bridge && await this.bridge.init();
1936
2139
  }
1937
2140
  async process(t, e) {
1938
2141
  let n;
1939
2142
  if (this.isNative && this.platformBridge) console.time("[GeometryProcessor] native-processing"), n = (await this.platformBridge.processGeometry(t)).meshes, console.timeEnd("[GeometryProcessor] native-processing");
1940
2143
  else {
1941
2144
  this.bridge?.isInitialized() || await this.init();
1942
- const a = await this.collectMeshesMainThread(t);
1943
- n = a.meshes;
1944
- const l = this.coordinateHandler.processMeshes(n), d = a.buildingRotation, u = {
2145
+ const c = await this.collectMeshesMainThread(t);
2146
+ n = c.meshes;
2147
+ const l = this.coordinateHandler.processMeshes(n), d = c.buildingRotation, u = {
1945
2148
  ...l,
1946
2149
  buildingRotation: d
1947
2150
  }, f = this.bufferBuilder.processMeshes(n);
@@ -1971,14 +2174,22 @@ let __tla = Promise.all([
1971
2174
  coordinateInfo: n
1972
2175
  };
1973
2176
  }
2177
+ applyPrePassMetadata(t) {
2178
+ this.coordinateHandler.setWasmMetadata(t.unitScale, t.needsShift ? {
2179
+ x: t.rtcOffset?.[0] ?? 0,
2180
+ y: t.rtcOffset?.[1] ?? 0,
2181
+ z: t.rtcOffset?.[2] ?? 0
2182
+ } : null);
2183
+ }
1974
2184
  collectMeshesViaPrePass(t) {
1975
2185
  if (!this.bridge) throw new Error("WASM bridge not initialized");
1976
2186
  const e = this.bridge.getApi(), n = e.buildPrePassOnce(t);
2187
+ this.applyPrePassMetadata(n);
1977
2188
  try {
1978
2189
  const s = [], i = n.totalJobs ?? 0;
1979
2190
  if (n.jobs && i > 0) {
1980
2191
  const o = e.processGeometryBatch(t, n.jobs, n.unitScale, n.rtcOffset?.[0] ?? 0, n.rtcOffset?.[1] ?? 0, n.rtcOffset?.[2] ?? 0, n.needsShift, n.voidKeys, n.voidCounts, n.voidValues, n.styleIds, n.styleColors);
1981
- s.push(...Ce(o));
2192
+ s.push(...Fe(o));
1982
2193
  }
1983
2194
  return {
1984
2195
  meshes: s,
@@ -1994,6 +2205,7 @@ let __tla = Promise.all([
1994
2205
  async *processStreamingBytes(t, e) {
1995
2206
  if (!this.bridge) throw new Error("WASM bridge not initialized");
1996
2207
  const n = this.bridge.getApi(), s = n.buildPrePassOnce(t);
2208
+ this.applyPrePassMetadata(s);
1997
2209
  try {
1998
2210
  yield {
1999
2211
  type: "model-open",
@@ -2012,28 +2224,28 @@ let __tla = Promise.all([
2012
2224
  yield {
2013
2225
  type: "complete",
2014
2226
  totalMeshes: 0,
2015
- coordinateInfo: Vt(this.coordinateHandler.getFinalCoordinateInfo(), i)
2227
+ coordinateInfo: Wt(this.coordinateHandler.getFinalCoordinateInfo(), i)
2016
2228
  };
2017
2229
  return;
2018
2230
  }
2019
- const o = Rn(t, e), l = Math.max(o, Math.ceil(s.totalJobs / 30));
2231
+ const o = xn(t, e), l = Math.max(o, Math.ceil(s.totalJobs / 30));
2020
2232
  let d = 0;
2021
2233
  for(let f = 0; f < s.totalJobs; f += l){
2022
- const p = Math.min(f + l, s.totalJobs), _ = s.jobs.slice(f * 3, p * 3), h = n.processGeometryBatch(t, _, s.unitScale, s.rtcOffset?.[0] ?? 0, s.rtcOffset?.[1] ?? 0, s.rtcOffset?.[2] ?? 0, s.needsShift, s.voidKeys, s.voidCounts, s.voidValues, s.styleIds, s.styleColors), y = Ce(h);
2234
+ const p = Math.min(f + l, s.totalJobs), g = s.jobs.slice(f * 3, p * 3), h = n.processGeometryBatch(t, g, s.unitScale, s.rtcOffset?.[0] ?? 0, s.rtcOffset?.[1] ?? 0, s.rtcOffset?.[2] ?? 0, s.needsShift, s.voidKeys, s.voidCounts, s.voidValues, s.styleIds, s.styleColors), y = Fe(h);
2023
2235
  if (y.length === 0) {
2024
- await new Promise((w)=>setTimeout(w, 0));
2236
+ await new Promise((T)=>setTimeout(T, 0));
2025
2237
  continue;
2026
2238
  }
2027
2239
  this.coordinateHandler.processMeshesIncremental(y), d += y.length;
2028
- const m = this.coordinateHandler.getCurrentCoordinateInfo(), b = m ? Vt(m, i) : null;
2240
+ const E = this.coordinateHandler.getCurrentCoordinateInfo(), C = E ? Wt(E, i) : null;
2029
2241
  yield {
2030
2242
  type: "batch",
2031
2243
  meshes: y,
2032
2244
  totalSoFar: d,
2033
- coordinateInfo: b || void 0
2034
- }, await new Promise((w)=>setTimeout(w, 0));
2245
+ coordinateInfo: C || void 0
2246
+ }, await new Promise((T)=>setTimeout(T, 0));
2035
2247
  }
2036
- const u = Vt(this.coordinateHandler.getFinalCoordinateInfo(), i);
2248
+ const u = Wt(this.coordinateHandler.getFinalCoordinateInfo(), i);
2037
2249
  yield {
2038
2250
  type: "complete",
2039
2251
  totalMeshes: d,
@@ -2044,7 +2256,7 @@ let __tla = Promise.all([
2044
2256
  }
2045
2257
  }
2046
2258
  async *processStreaming(t, e, n = 25, s) {
2047
- const i = this.isNative ? null : xn("processStreaming");
2259
+ const i = this.isNative ? null : vn("processStreaming");
2048
2260
  try {
2049
2261
  yield* this.processStreamingUnlocked(t, e, n, s);
2050
2262
  } finally{
@@ -2061,7 +2273,7 @@ let __tla = Promise.all([
2061
2273
  modelID: 0
2062
2274
  }, console.time("[GeometryProcessor] native-streaming");
2063
2275
  const i = [];
2064
- let o = null, a = !1, l = null, d, u = 0;
2276
+ let o = null, c = !1, l = null, d, u = 0;
2065
2277
  const f = ()=>{
2066
2278
  o && (o(), o = null);
2067
2279
  }, p = this.platformBridge.processGeometryStreaming(t, {
@@ -2079,13 +2291,13 @@ let __tla = Promise.all([
2079
2291
  }), f();
2080
2292
  },
2081
2293
  onComplete: (h)=>{
2082
- this.lastNativeStats = h, d = h.totalMeshes, a = !0, f();
2294
+ this.lastNativeStats = h, d = h.totalMeshes, c = !0, f();
2083
2295
  },
2084
2296
  onError: (h)=>{
2085
- l = h, a = !0, f();
2297
+ l = h, c = !0, f();
2086
2298
  }
2087
2299
  });
2088
- for(; !a || i.length > 0;){
2300
+ for(; !c || i.length > 0;){
2089
2301
  for(; i.length > 0;){
2090
2302
  const h = i.shift();
2091
2303
  if (h.type === "colorUpdate") {
@@ -2106,16 +2318,16 @@ let __tla = Promise.all([
2106
2318
  };
2107
2319
  }
2108
2320
  if (l) throw l;
2109
- a || await new Promise((h)=>{
2321
+ c || await new Promise((h)=>{
2110
2322
  o = h;
2111
2323
  });
2112
2324
  }
2113
2325
  await p;
2114
- const _ = this.coordinateHandler.getFinalCoordinateInfo();
2326
+ const g = this.coordinateHandler.getFinalCoordinateInfo();
2115
2327
  yield {
2116
2328
  type: "complete",
2117
2329
  totalMeshes: d ?? u,
2118
- coordinateInfo: _
2330
+ coordinateInfo: g
2119
2331
  }, console.timeEnd("[GeometryProcessor] native-streaming");
2120
2332
  } else {
2121
2333
  if (!this.bridge) throw new Error("WASM bridge not initialized");
@@ -2125,19 +2337,19 @@ let __tla = Promise.all([
2125
2337
  async *processStreamingPath(t, e = 0, n) {
2126
2338
  if (!this.isNative) throw new Error("File-path geometry streaming is only available in native desktop builds");
2127
2339
  if (this.platformBridge || await this.init(), !this.platformBridge?.processGeometryStreamingPath) throw new Error("Native platform bridge does not support file-path streaming");
2128
- yield* we((s)=>this.platformBridge.processGeometryStreamingPath(t, s, n), e > 0 ? e / 1e3 : 0, this.coordinateHandler, (s)=>{
2340
+ yield* Ne((s)=>this.platformBridge.processGeometryStreamingPath(t, s, n), e > 0 ? e / 1e3 : 0, this.coordinateHandler, (s)=>{
2129
2341
  this.lastNativeStats = s;
2130
2342
  });
2131
2343
  }
2132
2344
  async *processStreamingCache(t) {
2133
2345
  if (!this.isNative) throw new Error("Native cached geometry streaming is only available in native desktop builds");
2134
2346
  if (this.platformBridge || await this.init(), !this.platformBridge?.processGeometryStreamingCache) throw new Error("Native platform bridge does not support cached geometry streaming");
2135
- yield* we((e)=>this.platformBridge.processGeometryStreamingCache(t, e), 0, this.coordinateHandler, (e)=>{
2347
+ yield* Ne((e)=>this.platformBridge.processGeometryStreamingCache(t, e), 0, this.coordinateHandler, (e)=>{
2136
2348
  this.lastNativeStats = e;
2137
2349
  });
2138
2350
  }
2139
2351
  async *processParallel(t, e, n, s, i) {
2140
- this.bridge?.isInitialized() || await this.init(), yield* Mn(t, this.coordinateHandler, e, n, {
2352
+ this.bridge?.isInitialized() || await this.init(), yield* Dn(t, this.coordinateHandler, e, n, {
2141
2353
  onEntityIndex: s,
2142
2354
  mergeLayers: this.mergeLayers,
2143
2355
  wasmUrls: i
@@ -2160,16 +2372,16 @@ let __tla = Promise.all([
2160
2372
  i = l.meshes, o = l.buildingRotation;
2161
2373
  }
2162
2374
  this.coordinateHandler.processMeshesIncremental(i);
2163
- const a = Vt(this.coordinateHandler.getFinalCoordinateInfo(), o);
2375
+ const c = Wt(this.coordinateHandler.getFinalCoordinateInfo(), o);
2164
2376
  yield {
2165
2377
  type: "batch",
2166
2378
  meshes: i,
2167
2379
  totalSoFar: i.length,
2168
- coordinateInfo: a || void 0
2380
+ coordinateInfo: c || void 0
2169
2381
  }, yield {
2170
2382
  type: "complete",
2171
2383
  totalMeshes: i.length,
2172
- coordinateInfo: a
2384
+ coordinateInfo: c
2173
2385
  };
2174
2386
  } else typeof SharedArrayBuffer < "u" && typeof Worker < "u" && typeof navigator < "u" && (navigator.hardwareConcurrency ?? 1) > 1 ? yield* this.processParallel(t, e.sharedRtcOffset, e.existingSab, e.onEntityIndex, e.wasmUrls) : yield* this.processStreaming(t, e.entityIndex, s, e.sharedRtcOffset);
2175
2387
  }
@@ -2181,17 +2393,60 @@ let __tla = Promise.all([
2181
2393
  }
2182
2394
  parseSymbolicRepresentations(t) {
2183
2395
  if (!this.bridge || !this.bridge.isInitialized()) return null;
2184
- const e = st(t);
2396
+ const e = nt(t);
2185
2397
  return this.bridge.parseSymbolicRepresentations(e);
2186
2398
  }
2399
+ parseAlignmentLines(t) {
2400
+ if (!this.bridge || !this.bridge.isInitialized()) return null;
2401
+ const e = nt(t);
2402
+ return this.bridge.parseAlignmentLines(e);
2403
+ }
2404
+ parseGridLines(t) {
2405
+ if (!this.bridge || !this.bridge.isInitialized()) return null;
2406
+ const e = nt(t);
2407
+ return this.bridge.parseGridLines(e);
2408
+ }
2409
+ parseGridAxes(t) {
2410
+ if (!this.bridge || !this.bridge.isInitialized()) return null;
2411
+ const e = nt(t), n = this.bridge.parseGridAxes(e);
2412
+ try {
2413
+ const s = [];
2414
+ for(let i = 0; i < n.length; i++){
2415
+ const o = n.getAxis(i);
2416
+ if (o) try {
2417
+ const c = o.start, l = o.end;
2418
+ s.push({
2419
+ gridId: o.gridId,
2420
+ axisId: o.axisId,
2421
+ tag: o.tag,
2422
+ start: [
2423
+ c[0],
2424
+ c[1],
2425
+ c[2]
2426
+ ],
2427
+ end: [
2428
+ l[0],
2429
+ l[1],
2430
+ l[2]
2431
+ ]
2432
+ });
2433
+ } finally{
2434
+ o.free();
2435
+ }
2436
+ }
2437
+ return s;
2438
+ } finally{
2439
+ n.free();
2440
+ }
2441
+ }
2187
2442
  extractProfiles(t, e = 0) {
2188
2443
  if (!this.bridge || !this.bridge.isInitialized()) return null;
2189
- const n = st(t);
2444
+ const n = nt(t);
2190
2445
  return this.bridge.extractProfiles(n, e);
2191
2446
  }
2192
2447
  dispose() {}
2193
2448
  };
2194
- is = class {
2449
+ ls = class {
2195
2450
  geometryResult;
2196
2451
  constructor(t){
2197
2452
  this.geometryResult = t;
@@ -2208,7 +2463,7 @@ let __tla = Promise.all([
2208
2463
  };
2209
2464
  }
2210
2465
  buildGLTF(t) {
2211
- const e = this.geometryResult.meshes, n = t.colorSource ?? "rendering", s = t.visibleOnly === !0, i = t.hiddenEntityIds ?? null, o = t.isolatedEntityIds ?? null, a = o !== null && o.size > 0, l = t.hiddenIfcTypes ?? null, d = (I)=>s ? !(l && I.ifcType && l.has(I.ifcType) || a && !o.has(I.expressId) || i && i.has(I.expressId)) : !0, u = (I)=>n === "shading" ? I.shadingColor ?? I.color : I.color, f = {
2466
+ const e = this.geometryResult.meshes, n = t.colorSource ?? "rendering", s = t.visibleOnly === !0, i = t.hiddenEntityIds ?? null, o = t.isolatedEntityIds ?? null, c = o !== null && o.size > 0, l = t.hiddenIfcTypes ?? null, d = (I)=>s ? !(l && I.ifcType && l.has(I.ifcType) || c && !o.has(I.expressId) || i && i.has(I.expressId)) : !0, u = (I)=>n === "shading" ? I.shadingColor ?? I.color : I.color, f = {
2212
2467
  asset: {
2213
2468
  version: "2.0",
2214
2469
  generator: "IFC-Lite"
@@ -2234,12 +2489,12 @@ let __tla = Promise.all([
2234
2489
  vertexCount: this.geometryResult.totalVertices,
2235
2490
  triangleCount: this.geometryResult.totalTriangles
2236
2491
  });
2237
- const p = new Map, _ = [];
2492
+ const p = new Map, g = [];
2238
2493
  function h(I) {
2239
- const R = `${Math.round(I[0] * 100)},${Math.round(I[1] * 100)},${Math.round(I[2] * 100)},${Math.round(I[3] * 100)}`, S = p.get(R);
2240
- if (S !== void 0) return S;
2241
- const G = _.length;
2242
- return _.push({
2494
+ const R = `${Math.round(I[0] * 100)},${Math.round(I[1] * 100)},${Math.round(I[2] * 100)},${Math.round(I[3] * 100)}`, N = p.get(R);
2495
+ if (N !== void 0) return N;
2496
+ const V = g.length;
2497
+ return g.push({
2243
2498
  pbrMetallicRoughness: {
2244
2499
  baseColorFactor: [
2245
2500
  I[0],
@@ -2256,52 +2511,52 @@ let __tla = Promise.all([
2256
2511
  ...I[3] < 1 ? {
2257
2512
  alphaMode: "BLEND"
2258
2513
  } : {}
2259
- }), p.set(R, G), G;
2514
+ }), p.set(R, V), V;
2260
2515
  }
2261
2516
  const y = [];
2262
- let m = 0, b = 0, w = 0;
2517
+ let E = 0, C = 0, T = 0;
2263
2518
  for(let I = 0; I < e.length; I++){
2264
2519
  const R = e[I];
2265
2520
  if (!d(R)) continue;
2266
- const S = R.positions, G = R.normals, $ = R.indices;
2267
- if (!S.length || !G.length || !$.length || S.length % 3 !== 0 || G.length % 3 !== 0 || S.length !== G.length) continue;
2268
- let V = S[0], H = S[1], z = S[2], Q = S[0], K = S[1], ot = S[2];
2269
- for(let it = 3; it < S.length; it += 3){
2270
- const lt = S[it], at = S[it + 1], _t = S[it + 2];
2271
- lt < V && (V = lt), lt > Q && (Q = lt), at < H && (H = at), at > K && (K = at), _t < z && (z = _t), _t > ot && (ot = _t);
2521
+ const N = R.positions, V = R.normals, z = R.indices;
2522
+ if (!N.length || !V.length || !z.length || N.length % 3 !== 0 || V.length % 3 !== 0 || N.length !== V.length) continue;
2523
+ let W = N[0], H = N[1], j = N[2], Q = N[0], K = N[1], at = N[2];
2524
+ for(let rt = 3; rt < N.length; rt += 3){
2525
+ const dt = N[rt], lt = N[rt + 1], gt = N[rt + 2];
2526
+ dt < W && (W = dt), dt > Q && (Q = dt), lt < H && (H = lt), lt > K && (K = lt), gt < j && (j = gt), gt > at && (at = gt);
2272
2527
  }
2273
- const ut = u(R);
2528
+ const ht = u(R);
2274
2529
  y.push({
2275
2530
  meshIndex: I,
2276
- posCount: S.length,
2277
- normCount: G.length,
2278
- idxCount: $.length,
2279
- posByteOffset: m * 4,
2280
- normByteOffset: b * 4,
2281
- idxByteOffset: w * 4,
2531
+ posCount: N.length,
2532
+ normCount: V.length,
2533
+ idxCount: z.length,
2534
+ posByteOffset: E * 4,
2535
+ normByteOffset: C * 4,
2536
+ idxByteOffset: T * 4,
2282
2537
  bounds: {
2283
2538
  min: [
2284
- V,
2539
+ W,
2285
2540
  H,
2286
- z
2541
+ j
2287
2542
  ],
2288
2543
  max: [
2289
2544
  Q,
2290
2545
  K,
2291
- ot
2546
+ at
2292
2547
  ]
2293
2548
  },
2294
- materialIdx: ut ? h(ut) : void 0
2295
- }), m += S.length, b += G.length, w += $.length;
2549
+ materialIdx: ht ? h(ht) : void 0
2550
+ }), E += N.length, C += V.length, T += z.length;
2296
2551
  }
2297
- if (m === 0 || b === 0 || w === 0) throw new Error("Cannot export GLB: no valid geometry data found");
2298
- const v = new Float32Array(m), L = new Float32Array(b), j = new Uint32Array(w);
2299
- let O = 0, U = 0, C = 0;
2300
- const N = [];
2552
+ if (E === 0 || C === 0 || T === 0) throw new Error("Cannot export GLB: no valid geometry data found");
2553
+ const $ = new Float32Array(E), x = new Float32Array(C), Y = new Uint32Array(T);
2554
+ let O = 0, v = 0, b = 0;
2555
+ const S = [];
2301
2556
  for (const I of y){
2302
2557
  const R = e[I.meshIndex];
2303
- v.set(R.positions, O), L.set(R.normals, U), j.set(R.indices, C), O += I.posCount, U += I.normCount, C += I.idxCount;
2304
- const S = f.accessors.length;
2558
+ $.set(R.positions, O), x.set(R.normals, v), Y.set(R.indices, b), O += I.posCount, v += I.normCount, b += I.idxCount;
2559
+ const N = f.accessors.length;
2305
2560
  f.accessors.push({
2306
2561
  bufferView: 0,
2307
2562
  byteOffset: I.posByteOffset,
@@ -2311,7 +2566,7 @@ let __tla = Promise.all([
2311
2566
  min: I.bounds.min,
2312
2567
  max: I.bounds.max
2313
2568
  });
2314
- const G = f.accessors.length;
2569
+ const V = f.accessors.length;
2315
2570
  f.accessors.push({
2316
2571
  bufferView: 1,
2317
2572
  byteOffset: I.normByteOffset,
@@ -2319,7 +2574,7 @@ let __tla = Promise.all([
2319
2574
  count: I.normCount / 3,
2320
2575
  type: "VEC3"
2321
2576
  });
2322
- const $ = f.accessors.length;
2577
+ const z = f.accessors.length;
2323
2578
  f.accessors.push({
2324
2579
  bufferView: 2,
2325
2580
  byteOffset: I.idxByteOffset,
@@ -2327,35 +2582,35 @@ let __tla = Promise.all([
2327
2582
  count: I.idxCount,
2328
2583
  type: "SCALAR"
2329
2584
  });
2330
- const V = f.meshes.length;
2585
+ const W = f.meshes.length;
2331
2586
  f.meshes.push({
2332
2587
  primitives: [
2333
2588
  {
2334
2589
  attributes: {
2335
- POSITION: S,
2336
- NORMAL: G
2590
+ POSITION: N,
2591
+ NORMAL: V
2337
2592
  },
2338
- indices: $,
2593
+ indices: z,
2339
2594
  ...I.materialIdx !== void 0 ? {
2340
2595
  material: I.materialIdx
2341
2596
  } : {}
2342
2597
  }
2343
2598
  ]
2344
2599
  });
2345
- const H = f.nodes.length, z = {
2346
- mesh: V
2600
+ const H = f.nodes.length, j = {
2601
+ mesh: W
2347
2602
  };
2348
- t.includeMetadata && R.expressId !== void 0 && (z.extras = R.modelIndex !== void 0 ? {
2603
+ t.includeMetadata && R.expressId !== void 0 && (j.extras = R.modelIndex !== void 0 ? {
2349
2604
  expressId: R.expressId,
2350
2605
  modelIndex: R.modelIndex
2351
2606
  } : {
2352
2607
  expressId: R.expressId
2353
- }), f.nodes.push(z), N.push(H);
2608
+ }), f.nodes.push(j), S.push(H);
2354
2609
  }
2355
- f.scenes[0].nodes = N, _.length > 0 && (f.materials = _, f.extensionsUsed = [
2610
+ f.scenes[0].nodes = S, g.length > 0 && (f.materials = g, f.extensionsUsed = [
2356
2611
  "KHR_materials_unlit"
2357
2612
  ]);
2358
- const F = v.buffer, E = L.buffer, g = j.buffer, T = F.byteLength + E.byteLength + g.byteLength;
2613
+ const F = $.buffer, m = x.buffer, _ = Y.buffer, w = F.byteLength + m.byteLength + _.byteLength;
2359
2614
  f.bufferViews.push({
2360
2615
  buffer: 0,
2361
2616
  byteOffset: 0,
@@ -2365,38 +2620,38 @@ let __tla = Promise.all([
2365
2620
  }), f.bufferViews.push({
2366
2621
  buffer: 0,
2367
2622
  byteOffset: F.byteLength,
2368
- byteLength: E.byteLength,
2623
+ byteLength: m.byteLength,
2369
2624
  byteStride: 12,
2370
2625
  target: 34962
2371
2626
  }), f.bufferViews.push({
2372
2627
  buffer: 0,
2373
- byteOffset: F.byteLength + E.byteLength,
2374
- byteLength: g.byteLength,
2628
+ byteOffset: F.byteLength + m.byteLength,
2629
+ byteLength: _.byteLength,
2375
2630
  target: 34963
2376
- }), f.buffers[0].byteLength = T;
2631
+ }), f.buffers[0].byteLength = w;
2377
2632
  for (const I of f.accessors){
2378
2633
  const R = f.bufferViews[I.bufferView];
2379
2634
  if (!R) throw new Error(`Accessor references invalid bufferView ${I.bufferView}`);
2380
- let S = 0;
2381
- if (I.componentType === 5126) S = 4;
2382
- else if (I.componentType === 5125) S = 4;
2383
- else if (I.componentType === 5123) S = 2;
2384
- else if (I.componentType === 5120) S = 1;
2635
+ let N = 0;
2636
+ if (I.componentType === 5126) N = 4;
2637
+ else if (I.componentType === 5125) N = 4;
2638
+ else if (I.componentType === 5123) N = 2;
2639
+ else if (I.componentType === 5120) N = 1;
2385
2640
  else throw new Error(`Unsupported component type: ${I.componentType}`);
2386
- let G = 1;
2387
- if (I.type === "VEC3") G = 3;
2388
- else if (I.type === "VEC2") G = 2;
2389
- else if (I.type === "SCALAR") G = 1;
2641
+ let V = 1;
2642
+ if (I.type === "VEC3") V = 3;
2643
+ else if (I.type === "VEC2") V = 2;
2644
+ else if (I.type === "SCALAR") V = 1;
2390
2645
  else throw new Error(`Unsupported accessor type: ${I.type}`);
2391
- const $ = I.count * G * S, V = (I.byteOffset || 0) + $;
2392
- if (V > R.byteLength) throw new Error(`Accessor exceeds bufferView bounds: accessor byteOffset=${I.byteOffset || 0}, length=${$}, bufferView byteLength=${R.byteLength}, end=${V}`);
2646
+ const z = I.count * V * N, W = (I.byteOffset || 0) + z;
2647
+ if (W > R.byteLength) throw new Error(`Accessor exceeds bufferView bounds: accessor byteOffset=${I.byteOffset || 0}, length=${z}, bufferView byteLength=${R.byteLength}, end=${W}`);
2393
2648
  }
2394
2649
  return {
2395
2650
  json: f,
2396
2651
  buffers: [
2397
2652
  new Uint8Array(F),
2398
- new Uint8Array(E),
2399
- new Uint8Array(g)
2653
+ new Uint8Array(m),
2654
+ new Uint8Array(_)
2400
2655
  ]
2401
2656
  };
2402
2657
  }
@@ -2407,23 +2662,23 @@ let __tla = Promise.all([
2407
2662
  return n;
2408
2663
  }
2409
2664
  packGLB(t, e) {
2410
- const n = JSON.stringify(t), s = new TextEncoder().encode(n), i = (4 - s.byteLength % 4) % 4, o = s.byteLength + i, a = this.combineBuffers(e), l = (4 - a.byteLength % 4) % 4, d = a.byteLength + l, u = 20 + o + 8 + d, f = new ArrayBuffer(u), p = new DataView(f), _ = new Uint8Array(f);
2665
+ const n = JSON.stringify(t), s = new TextEncoder().encode(n), i = (4 - s.byteLength % 4) % 4, o = s.byteLength + i, c = this.combineBuffers(e), l = (4 - c.byteLength % 4) % 4, d = c.byteLength + l, u = 20 + o + 8 + d, f = new ArrayBuffer(u), p = new DataView(f), g = new Uint8Array(f);
2411
2666
  let h = 0;
2412
- p.setUint32(h, 1179937895, !0), h += 4, p.setUint32(h, 2, !0), h += 4, p.setUint32(h, u, !0), h += 4, p.setUint32(h, o, !0), h += 4, p.setUint32(h, 1313821514, !0), h += 4, _.set(s, h), h += s.byteLength;
2413
- for(let y = 0; y < i; y++)_[h++] = 32;
2414
- return p.setUint32(h, d, !0), h += 4, p.setUint32(h, 5130562, !0), h += 4, _.set(a, h), new Uint8Array(f);
2667
+ p.setUint32(h, 1179937895, !0), h += 4, p.setUint32(h, 2, !0), h += 4, p.setUint32(h, u, !0), h += 4, p.setUint32(h, o, !0), h += 4, p.setUint32(h, 1313821514, !0), h += 4, g.set(s, h), h += s.byteLength;
2668
+ for(let y = 0; y < i; y++)g[h++] = 32;
2669
+ return p.setUint32(h, d, !0), h += 4, p.setUint32(h, 5130562, !0), h += 4, g.set(c, h), new Uint8Array(f);
2415
2670
  }
2416
2671
  };
2417
- rs = class {
2672
+ ds = class {
2418
2673
  store;
2419
2674
  constructor(t){
2420
2675
  this.store = t;
2421
2676
  }
2422
2677
  getPropertiesForEntity(t) {
2423
- return this.store.onDemandPropertyMap && this.store.source?.length > 0 ? Ve(this.store, t) : this.store.properties?.getForEntity(t) ?? [];
2678
+ return this.store.onDemandPropertyMap && this.store.source?.length > 0 ? ke(this.store, t) : this.store.properties?.getForEntity(t) ?? [];
2424
2679
  }
2425
2680
  getQuantitiesForEntity(t) {
2426
- return this.store.onDemandQuantityMap && this.store.source?.length > 0 ? ze(this.store, t) : this.store.quantities?.getForEntity(t) ?? [];
2681
+ return this.store.onDemandQuantityMap && this.store.source?.length > 0 ? Ye(this.store, t) : this.store.quantities?.getForEntity(t) ?? [];
2427
2682
  }
2428
2683
  exportEntities(t, e = {}) {
2429
2684
  const n = e.delimiter ?? ",", s = e.includeProperties ?? !1, i = e.flattenProperties ?? !1, o = [
@@ -2434,17 +2689,17 @@ let __tla = Promise.all([
2434
2689
  "description",
2435
2690
  "objectType",
2436
2691
  "hasGeometry"
2437
- ], a = new Map;
2692
+ ], c = new Map;
2438
2693
  if (s && i) {
2439
2694
  const u = t ?? this.getAllEntityIds();
2440
2695
  for (const f of u){
2441
2696
  const p = this.getPropertiesForEntity(f);
2442
- for (const _ of p){
2443
- a.has(_.name) || a.set(_.name, new Set);
2444
- for (const h of _.properties)a.get(_.name).add(h.name);
2697
+ for (const g of p){
2698
+ c.has(g.name) || c.set(g.name, new Set);
2699
+ for (const h of g.properties)c.get(g.name).add(h.name);
2445
2700
  }
2446
2701
  }
2447
- for (const [f, p] of a)for (const _ of p)o.push(`${f}_${_}`);
2702
+ for (const [f, p] of c)for (const g of p)o.push(`${f}_${g}`);
2448
2703
  }
2449
2704
  const l = [
2450
2705
  this.joinRow(o.map((u)=>this.escapeValue(u)), n)
@@ -2460,15 +2715,15 @@ let __tla = Promise.all([
2460
2715
  this.escapeValue(this.store.entities.hasGeometry(u) ? "true" : "false")
2461
2716
  ];
2462
2717
  if (s && i) {
2463
- const p = this.getPropertiesForEntity(u), _ = new Map;
2718
+ const p = this.getPropertiesForEntity(u), g = new Map;
2464
2719
  for (const h of p){
2465
2720
  const y = new Map;
2466
- for (const m of h.properties)y.set(m.name, m.value);
2467
- _.set(h.name, y);
2721
+ for (const E of h.properties)y.set(E.name, E.value);
2722
+ g.set(h.name, y);
2468
2723
  }
2469
- for (const [h, y] of a)for (const m of y){
2470
- const b = _.get(h)?.get(m) ?? "";
2471
- f.push(this.escapeValue(b));
2724
+ for (const [h, y] of c)for (const E of y){
2725
+ const C = g.get(h)?.get(E) ?? "";
2726
+ f.push(this.escapeValue(C));
2472
2727
  }
2473
2728
  }
2474
2729
  l.push(this.joinRow(f, n));
@@ -2487,22 +2742,22 @@ let __tla = Promise.all([
2487
2742
  "value",
2488
2743
  "type"
2489
2744
  ], i = [
2490
- this.joinRow(s.map((a)=>this.escapeValue(a)), n)
2745
+ this.joinRow(s.map((c)=>this.escapeValue(c)), n)
2491
2746
  ], o = t ?? this.getAllEntityIds();
2492
- for (const a of o){
2493
- const l = this.getPropertiesForEntity(a);
2747
+ for (const c of o){
2748
+ const l = this.getPropertiesForEntity(c);
2494
2749
  if (!l || l.length === 0) continue;
2495
- const d = this.store.entities.getGlobalId(a) || "", u = this.store.entities.getName(a) || "", f = this.store.entities.getTypeName(a) || "";
2496
- for (const p of l)if (!(!p.properties || p.properties.length === 0)) for (const _ of p.properties){
2750
+ const d = this.store.entities.getGlobalId(c) || "", u = this.store.entities.getName(c) || "", f = this.store.entities.getTypeName(c) || "";
2751
+ for (const p of l)if (!(!p.properties || p.properties.length === 0)) for (const g of p.properties){
2497
2752
  const h = [
2498
- this.escapeValue(a),
2753
+ this.escapeValue(c),
2499
2754
  this.escapeValue(d),
2500
2755
  this.escapeValue(u),
2501
2756
  this.escapeValue(f),
2502
2757
  this.escapeValue(p.name || ""),
2503
- this.escapeValue(_.name || ""),
2504
- this.escapeValue(_.value),
2505
- this.escapeValue(_.type ?? "")
2758
+ this.escapeValue(g.name || ""),
2759
+ this.escapeValue(g.value),
2760
+ this.escapeValue(g.type ?? "")
2506
2761
  ];
2507
2762
  i.push(this.joinRow(h, n));
2508
2763
  }
@@ -2522,18 +2777,18 @@ let __tla = Promise.all([
2522
2777
  "type"
2523
2778
  ], o = [
2524
2779
  this.joinRow(s.map((l)=>this.escapeValue(l)), n)
2525
- ], a = t ?? this.getAllEntityIds();
2526
- for (const l of a){
2780
+ ], c = t ?? this.getAllEntityIds();
2781
+ for (const l of c){
2527
2782
  const d = this.getQuantitiesForEntity(l);
2528
2783
  if (!d || d.length === 0) continue;
2529
2784
  const u = this.store.entities.getGlobalId(l) || "", f = this.store.entities.getName(l) || "", p = this.store.entities.getTypeName(l) || "";
2530
- for (const _ of d)if (!(!_.quantities || _.quantities.length === 0)) for (const h of _.quantities){
2785
+ for (const g of d)if (!(!g.quantities || g.quantities.length === 0)) for (const h of g.quantities){
2531
2786
  const y = [
2532
2787
  this.escapeValue(l),
2533
2788
  this.escapeValue(u),
2534
2789
  this.escapeValue(f),
2535
2790
  this.escapeValue(p),
2536
- this.escapeValue(_.name || ""),
2791
+ this.escapeValue(g.name || ""),
2537
2792
  this.escapeValue(h.name || ""),
2538
2793
  this.escapeValue(h.value),
2539
2794
  this.escapeValue(h.type ?? "")
@@ -2553,19 +2808,19 @@ let __tla = Promise.all([
2553
2808
  "parentId",
2554
2809
  "level"
2555
2810
  ], s = [
2556
- this.joinRow(n.map((a)=>this.escapeValue(a)), e)
2811
+ this.joinRow(n.map((c)=>this.escapeValue(c)), e)
2557
2812
  ], i = this.store.spatialHierarchy;
2558
2813
  if (!i?.project) return s[0];
2559
- const o = (a, l, d)=>{
2814
+ const o = (c, l, d)=>{
2560
2815
  const u = [
2561
- this.escapeValue(a.expressId),
2562
- this.escapeValue(this.store.entities.getGlobalId(a.expressId) || ""),
2563
- this.escapeValue(a.name || ""),
2564
- this.escapeValue(this.store.entities.getTypeName(a.expressId) || ""),
2816
+ this.escapeValue(c.expressId),
2817
+ this.escapeValue(this.store.entities.getGlobalId(c.expressId) || ""),
2818
+ this.escapeValue(c.name || ""),
2819
+ this.escapeValue(this.store.entities.getTypeName(c.expressId) || ""),
2565
2820
  this.escapeValue(l ?? ""),
2566
2821
  this.escapeValue(d)
2567
2822
  ];
2568
- if (s.push(this.joinRow(u, e)), a.children) for (const f of a.children)o(f, a.expressId, d + 1);
2823
+ if (s.push(this.joinRow(u, e)), c.children) for (const f of c.children)o(f, c.expressId, d + 1);
2569
2824
  };
2570
2825
  return o(i.project, null, 0), s.join(`
2571
2826
  `);
@@ -2585,7 +2840,7 @@ let __tla = Promise.all([
2585
2840
  return t.join(e);
2586
2841
  }
2587
2842
  };
2588
- const Bn = 35, zt = 48, Fe = 57, Pn = new Set([
2843
+ const Gn = 35, jt = 48, Ae = 57, $n = new Set([
2589
2844
  "IFCOWNERHISTORY",
2590
2845
  "IFCAPPLICATION",
2591
2846
  "IFCPERSON",
@@ -2601,7 +2856,7 @@ let __tla = Promise.all([
2601
2856
  "IFCMONETARYUNIT",
2602
2857
  "IFCGEOMETRICREPRESENTATIONCONTEXT",
2603
2858
  "IFCGEOMETRICREPRESENTATIONSUBCONTEXT"
2604
- ]), Un = new Set([
2859
+ ]), Vn = new Set([
2605
2860
  "IFCPROJECT",
2606
2861
  "IFCSITE",
2607
2862
  "IFCBUILDING",
@@ -2622,7 +2877,7 @@ let __tla = Promise.all([
2622
2877
  "IFCSPATIALZONE",
2623
2878
  "IFCEXTERNALSPATIALELEMENT",
2624
2879
  "IFCEXTERNALSPATIALSTRUCTUREELEMENT"
2625
- ]), Dn = new Set([
2880
+ ]), zn = new Set([
2626
2881
  "IFCBEAM",
2627
2882
  "IFCBEAMSTANDARDCASE",
2628
2883
  "IFCBUILDINGELEMENT",
@@ -2830,25 +3085,25 @@ let __tla = Promise.all([
2830
3085
  "IFCSTRUCTURALSURFACEMEMBERVARYING",
2831
3086
  "IFCSTRUCTURALSURFACEREACTION"
2832
3087
  ]);
2833
- function Wt(r, t, e, n) {
3088
+ function Ht(r, t, e, n) {
2834
3089
  const s = t + e;
2835
3090
  let i = t;
2836
- for(; i < s;)if (r[i] === Bn) {
2837
- if (i++, i < s && r[i] >= zt && r[i] <= Fe) {
2838
- let o = r[i] - zt;
2839
- for(i++; i < s && r[i] >= zt && r[i] <= Fe;)o = o * 10 + (r[i] - zt), i++;
3091
+ for(; i < s;)if (r[i] === Gn) {
3092
+ if (i++, i < s && r[i] >= jt && r[i] <= Ae) {
3093
+ let o = r[i] - jt;
3094
+ for(i++; i < s && r[i] >= jt && r[i] <= Ae;)o = o * 10 + (r[i] - jt), i++;
2840
3095
  n.push(o);
2841
3096
  }
2842
3097
  } else i++;
2843
3098
  }
2844
- function re(r, t, e, n) {
3099
+ function ae(r, t, e, n) {
2845
3100
  const s = new Set, i = [];
2846
- for (const a of r)e.has(a) && !s.has(a) && (s.add(a), i.push(a));
3101
+ for (const c of r)e.has(c) && !s.has(c) && (s.add(c), i.push(c));
2847
3102
  const o = [];
2848
3103
  for(; i.length > 0;){
2849
- const a = i.pop(), l = e.get(a);
3104
+ const c = i.pop(), l = e.get(c);
2850
3105
  if (l) {
2851
- o.length = 0, Wt(t, l.byteOffset, l.byteLength, o);
3106
+ o.length = 0, Ht(t, l.byteOffset, l.byteLength, o);
2852
3107
  for(let d = 0; d < o.length; d++){
2853
3108
  const u = o[d];
2854
3109
  if (!s.has(u) && e.has(u)) {
@@ -2860,23 +3115,23 @@ let __tla = Promise.all([
2860
3115
  }
2861
3116
  return s;
2862
3117
  }
2863
- function oe(r, t, e) {
3118
+ function ce(r, t, e) {
2864
3119
  const n = new Set, s = new Set;
2865
3120
  for (const [i, o] of r.entityIndex.byId){
2866
- const a = o.type.toUpperCase();
2867
- if (Pn.has(a)) {
3121
+ const c = o.type.toUpperCase();
3122
+ if ($n.has(c)) {
2868
3123
  n.add(i);
2869
3124
  continue;
2870
3125
  }
2871
- if (Un.has(a)) {
3126
+ if (Vn.has(c)) {
2872
3127
  n.add(i);
2873
3128
  continue;
2874
3129
  }
2875
- if (a.startsWith("IFCREL")) {
3130
+ if (c.startsWith("IFCREL")) {
2876
3131
  n.add(i);
2877
3132
  continue;
2878
3133
  }
2879
- if (Dn.has(a)) {
3134
+ if (zn.has(c)) {
2880
3135
  const l = t.has(i), d = e !== null && !e.has(i);
2881
3136
  l || d ? s.add(i) : n.add(i);
2882
3137
  continue;
@@ -2890,38 +3145,38 @@ let __tla = Promise.all([
2890
3145
  continue;
2891
3146
  }
2892
3147
  }
2893
- return vn(r, n, s), {
3148
+ return Wn(r, n, s), {
2894
3149
  roots: n,
2895
3150
  hiddenProductIds: s
2896
3151
  };
2897
3152
  }
2898
- function vn(r, t, e) {
3153
+ function Wn(r, t, e) {
2899
3154
  const n = r.source;
2900
3155
  if (!n) return;
2901
3156
  const s = r.entityIndex.byType.get("IFCRELVOIDSELEMENT") ?? [];
2902
3157
  if (s.length === 0) return;
2903
3158
  const i = [];
2904
3159
  for (const o of s){
2905
- const a = r.entityIndex.byId.get(o);
2906
- if (!a) continue;
2907
- let l = a.byteOffset;
2908
- const d = a.byteOffset + a.byteLength;
3160
+ const c = r.entityIndex.byId.get(o);
3161
+ if (!c) continue;
3162
+ let l = c.byteOffset;
3163
+ const d = c.byteOffset + c.byteLength;
2909
3164
  for(; l < d && n[l] !== 40;)l++;
2910
- if (l >= d || (i.length = 0, Wt(n, l, d - l, i), i.length < 2)) continue;
3165
+ if (l >= d || (i.length = 0, Ht(n, l, d - l, i), i.length < 2)) continue;
2911
3166
  const u = i[i.length - 2], f = i[i.length - 1];
2912
3167
  e.has(u) && (e.add(f), t.delete(o), t.delete(f));
2913
3168
  }
2914
3169
  }
2915
- function ae(r, t, e) {
3170
+ function le(r, t, e) {
2916
3171
  const n = [], s = [], i = e.byType.get("IFCSTYLEDITEM") ?? [], o = e.byType.get("IFCSTYLEDREPRESENTATION") ?? [];
2917
- for (const a of [
3172
+ for (const c of [
2918
3173
  i,
2919
3174
  o
2920
- ])for (const l of a){
3175
+ ])for (const l of c){
2921
3176
  if (r.has(l)) continue;
2922
3177
  const d = e.byId.get(l);
2923
3178
  if (!d) continue;
2924
- s.length = 0, Wt(t, d.byteOffset, d.byteLength, s);
3179
+ s.length = 0, Ht(t, d.byteOffset, d.byteLength, s);
2925
3180
  let u = !1;
2926
3181
  for(let f = 0; f < s.length; f++)if (r.has(s[f])) {
2927
3182
  u = !0;
@@ -2930,9 +3185,9 @@ let __tla = Promise.all([
2930
3185
  u && (r.add(l), n.push(l));
2931
3186
  }
2932
3187
  for(; n.length > 0;){
2933
- const a = n.pop(), l = e.byId.get(a);
3188
+ const c = n.pop(), l = e.byId.get(c);
2934
3189
  if (l) {
2935
- s.length = 0, Wt(t, l.byteOffset, l.byteLength, s);
3190
+ s.length = 0, Ht(t, l.byteOffset, l.byteLength, s);
2936
3191
  for(let d = 0; d < s.length; d++){
2937
3192
  const u = s[d];
2938
3193
  !r.has(u) && e.byId.has(u) && (r.add(u), n.push(u));
@@ -2940,7 +3195,7 @@ let __tla = Promise.all([
2940
3195
  }
2941
3196
  }
2942
3197
  }
2943
- const Re = new Map([
3198
+ const Oe = new Map([
2944
3199
  [
2945
3200
  "IFCELECTRICDISTRIBUTIONPOINT",
2946
3201
  "IFCELECTRICDISTRIBUTIONBOARD"
@@ -2953,7 +3208,7 @@ let __tla = Promise.all([
2953
3208
  "IFCEQUIPMENTELEMENT",
2954
3209
  "IFCBUILDINGELEMENTPROXY"
2955
3210
  ]
2956
- ]), Ne = new Map([
3211
+ ]), xe = new Map([
2957
3212
  [
2958
3213
  "IFCELECTRICDISTRIBUTIONBOARD",
2959
3214
  "IFCELECTRICDISTRIBUTIONPOINT"
@@ -3046,7 +3301,7 @@ let __tla = Promise.all([
3046
3301
  "IFCBUILTELEMENT",
3047
3302
  "IFCBUILDINGELEMENTPROXY"
3048
3303
  ]
3049
- ]), Jt = new Map([]), Kt = new Map([
3304
+ ]), Zt = new Map([]), te = new Map([
3050
3305
  [
3051
3306
  "IFCFACILITY",
3052
3307
  "IFCBUILDING"
@@ -3191,7 +3446,7 @@ let __tla = Promise.all([
3191
3446
  "IFCELECTRICFLOWTREATMENTDEVICE",
3192
3447
  "IFCFLOWTREATMENTDEVICE"
3193
3448
  ]
3194
- ]), Gn = new Map([
3449
+ ]), jn = new Map([
3195
3450
  [
3196
3451
  "IFCWALL",
3197
3452
  8
@@ -3313,34 +3568,34 @@ let __tla = Promise.all([
3313
3568
  8
3314
3569
  ]
3315
3570
  ]);
3316
- function De(r, t, e) {
3571
+ function Ve(r, t, e) {
3317
3572
  if (t === e) return r;
3318
3573
  const n = r.toUpperCase();
3319
- return $n(t, e)?.get(n) ?? n;
3574
+ return kn(t, e)?.get(n) ?? n;
3320
3575
  }
3321
- function $n(r, t) {
3322
- return r === "IFC2X3" && t === "IFC4" ? Re : r === "IFC4" && t === "IFC2X3" ? Ne : r === "IFC4" && t === "IFC4X3" ? Jt : r === "IFC4X3" && t === "IFC4" ? Kt : r === "IFC5" && t === "IFC4X3" || r === "IFC4X3" && t === "IFC5" ? null : r === "IFC5" && t === "IFC4" ? Kt : r === "IFC4" && t === "IFC5" ? Jt : r === "IFC2X3" && (t === "IFC4X3" || t === "IFC5") ? Se(Re, Jt) : (r === "IFC4X3" || r === "IFC5") && t === "IFC2X3" ? Se(Kt, Ne) : null;
3576
+ function kn(r, t) {
3577
+ return r === "IFC2X3" && t === "IFC4" ? Oe : r === "IFC4" && t === "IFC2X3" ? xe : r === "IFC4" && t === "IFC4X3" ? Zt : r === "IFC4X3" && t === "IFC4" ? te : r === "IFC5" && t === "IFC4X3" || r === "IFC4X3" && t === "IFC5" ? null : r === "IFC5" && t === "IFC4" ? te : r === "IFC4" && t === "IFC5" ? Zt : r === "IFC2X3" && (t === "IFC4X3" || t === "IFC5") ? Le(Oe, Zt) : (r === "IFC4X3" || r === "IFC5") && t === "IFC2X3" ? Le(te, xe) : null;
3323
3578
  }
3324
- function Se(r, t) {
3579
+ function Le(r, t) {
3325
3580
  const e = new Map;
3326
3581
  for (const [n, s] of r)e.set(n, t.get(s) ?? s);
3327
3582
  for (const [n, s] of t)e.has(n) || e.set(n, s);
3328
3583
  return e;
3329
3584
  }
3330
- function jt(r, t, e) {
3585
+ function Xt(r, t, e) {
3331
3586
  if (t === e) return r;
3332
3587
  const n = r.match(/^(#\d+=)(\w+)\((.*)?\);?\s*$/);
3333
3588
  if (!n) return r;
3334
- const s = n[1], i = n[2].toUpperCase(), o = n[3] ?? "", a = De(i, t, e);
3335
- if (Vn(a, e)) return `${s}IFCPROXY('${Yn()}',$,'${i}',$,$,$,$,.NOTDEFINED.,$);`;
3589
+ const s = n[1], i = n[2].toUpperCase(), o = n[3] ?? "", c = Ve(i, t, e);
3590
+ if (Yn(c, e)) return `${s}IFCPROXY('${qn()}',$,'${i}',$,$,$,$,.NOTDEFINED.,$);`;
3336
3591
  let l = o;
3337
3592
  if (e === "IFC2X3") {
3338
- const d = Gn.get(a);
3339
- d !== void 0 && (l = zn(o, d));
3593
+ const d = jn.get(c);
3594
+ d !== void 0 && (l = Hn(o, d));
3340
3595
  }
3341
- return `${s}${a}(${l});`;
3596
+ return `${s}${c}(${l});`;
3342
3597
  }
3343
- function Vn(r, t) {
3598
+ function Yn(r, t) {
3344
3599
  return t === "IFC4X3" || t === "IFC5" ? !1 : new Set([
3345
3600
  "IFCALIGNMENTCANT",
3346
3601
  "IFCALIGNMENTHORIZONTAL",
@@ -3348,39 +3603,39 @@ let __tla = Promise.all([
3348
3603
  "IFCALIGNMENTSEGMENT"
3349
3604
  ]).has(r);
3350
3605
  }
3351
- function zn(r, t) {
3606
+ function Hn(r, t) {
3352
3607
  if (!r.trim()) return r;
3353
3608
  const e = [];
3354
3609
  let n = 0, s = !1, i = "";
3355
3610
  for(let o = 0; o < r.length; o++){
3356
- const a = r[o];
3357
- if (a === "'" && !s) s = !0, i += a;
3358
- else if (a === "'" && s) {
3611
+ const c = r[o];
3612
+ if (c === "'" && !s) s = !0, i += c;
3613
+ else if (c === "'" && s) {
3359
3614
  if (o + 1 < r.length && r[o + 1] === "'") {
3360
3615
  i += "''", o++;
3361
3616
  continue;
3362
3617
  }
3363
- s = !1, i += a;
3364
- } else if (s) i += a;
3365
- else if (a === "(") n++, i += a;
3366
- else if (a === ")") n--, i += a;
3367
- else if (a === "," && n === 0) {
3618
+ s = !1, i += c;
3619
+ } else if (s) i += c;
3620
+ else if (c === "(") n++, i += c;
3621
+ else if (c === ")") n--, i += c;
3622
+ else if (c === "," && n === 0) {
3368
3623
  if (e.push(i), i = "", e.length >= t) return e.join(",");
3369
- } else i += a;
3624
+ } else i += c;
3370
3625
  }
3371
3626
  return e.push(i), e.length > t ? e.slice(0, t).join(",") : e.join(",");
3372
3627
  }
3373
- function ce(r, t) {
3628
+ function de(r, t) {
3374
3629
  return r !== t;
3375
3630
  }
3376
- let kn = 0;
3377
- function Yn() {
3378
- const r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$", t = kn++;
3631
+ let Xn = 0;
3632
+ function qn() {
3633
+ const r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$", t = Xn++;
3379
3634
  let e = "PROXY_", n = t;
3380
3635
  for(let s = 0; s < 16; s++)e += r[n % 64], n = Math.floor(n / 64) + s;
3381
3636
  return e;
3382
3637
  }
3383
- function et(r) {
3638
+ function st(r) {
3384
3639
  return r.replace(/\\/g, "\\\\").replace(/'/g, "''");
3385
3640
  }
3386
3641
  function Z(r) {
@@ -3388,52 +3643,52 @@ let __tla = Promise.all([
3388
3643
  const t = r.toString();
3389
3644
  return t.includes(".") ? t : t + ".";
3390
3645
  }
3391
- function Wn(r) {
3646
+ function Qn(r) {
3392
3647
  switch(r){
3393
- case Ct.Length:
3648
+ case bt.Length:
3394
3649
  return "IFCQUANTITYLENGTH";
3395
- case Ct.Area:
3650
+ case bt.Area:
3396
3651
  return "IFCQUANTITYAREA";
3397
- case Ct.Volume:
3652
+ case bt.Volume:
3398
3653
  return "IFCQUANTITYVOLUME";
3399
- case Ct.Count:
3654
+ case bt.Count:
3400
3655
  return "IFCQUANTITYCOUNT";
3401
- case Ct.Weight:
3656
+ case bt.Weight:
3402
3657
  return "IFCQUANTITYWEIGHT";
3403
- case Ct.Time:
3658
+ case bt.Time:
3404
3659
  return "IFCQUANTITYTIME";
3405
3660
  default:
3406
3661
  return "IFCQUANTITYCOUNT";
3407
3662
  }
3408
3663
  }
3409
- function ve(r, t) {
3664
+ function ze(r, t) {
3410
3665
  if (r == null) return "$";
3411
3666
  switch(t){
3412
- case tt.String:
3413
- case tt.Label:
3414
- case tt.Text:
3415
- return `IFCLABEL('${et(String(r))}')`;
3416
- case tt.Identifier:
3417
- return `IFCIDENTIFIER('${et(String(r))}')`;
3418
- case tt.Real:
3667
+ case et.String:
3668
+ case et.Label:
3669
+ case et.Text:
3670
+ return `IFCLABEL('${st(String(r))}')`;
3671
+ case et.Identifier:
3672
+ return `IFCIDENTIFIER('${st(String(r))}')`;
3673
+ case et.Real:
3419
3674
  {
3420
3675
  const e = Number(r);
3421
3676
  return Number.isFinite(e) ? `IFCREAL(${e.toString().includes(".") ? e : e + "."})` : "$";
3422
3677
  }
3423
- case tt.Integer:
3678
+ case et.Integer:
3424
3679
  return `IFCINTEGER(${Math.round(Number(r))})`;
3425
- case tt.Boolean:
3426
- case tt.Logical:
3680
+ case et.Boolean:
3681
+ case et.Logical:
3427
3682
  return r === !0 ? "IFCBOOLEAN(.T.)" : r === !1 ? "IFCBOOLEAN(.F.)" : "IFCLOGICAL(.U.)";
3428
- case tt.Enum:
3683
+ case et.Enum:
3429
3684
  return `.${String(r).toUpperCase()}.`;
3430
- case tt.List:
3431
- return Array.isArray(r) ? `(${r.map((n)=>ve(n, tt.String)).join(",")})` : "$";
3685
+ case et.List:
3686
+ return Array.isArray(r) ? `(${r.map((n)=>ze(n, et.String)).join(",")})` : "$";
3432
3687
  default:
3433
- return `IFCLABEL('${et(String(r))}')`;
3688
+ return `IFCLABEL('${st(String(r))}')`;
3434
3689
  }
3435
3690
  }
3436
- function jn(r, t) {
3691
+ function Jn(r, t) {
3437
3692
  const e = r.trim(), n = t.trim();
3438
3693
  if (r === "") return "$";
3439
3694
  if (e === "$" || e === "*" || /^#\d+$/.test(e)) return e;
@@ -3446,20 +3701,20 @@ let __tla = Promise.all([
3446
3701
  const s = Number(e);
3447
3702
  return Number.isFinite(s) ? n.includes(".") || /E/i.test(n) ? Z(s) : String(s) : "$";
3448
3703
  }
3449
- return Me(r);
3704
+ return Ue(r);
3450
3705
  }
3451
- function le(r) {
3706
+ function fe(r) {
3452
3707
  if (r == null) return "$";
3453
3708
  if (typeof r == "boolean") return r ? ".T." : ".F.";
3454
3709
  if (typeof r == "number") return Number.isFinite(r) ? Number.isInteger(r) ? String(r) : Z(r) : "$";
3455
- if (Array.isArray(r)) return `(${r.map(le).join(",")})`;
3710
+ if (Array.isArray(r)) return `(${r.map(fe).join(",")})`;
3456
3711
  const t = String(r).trim();
3457
- return t === "$" || t === "*" || /^#\d+$/.test(t) ? t : /^\.[A-Z0-9_]+\.$/i.test(t) ? t.toUpperCase() : `'${et(String(r))}'`;
3712
+ return t === "$" || t === "*" || /^#\d+$/.test(t) ? t : /^\.[A-Z0-9_]+\.$/i.test(t) ? t.toUpperCase() : `'${st(String(r))}'`;
3458
3713
  }
3459
- function Hn(r) {
3460
- return r.map(le).join(",");
3714
+ function Kn(r) {
3715
+ return r.map(fe).join(",");
3461
3716
  }
3462
- function Ae(r) {
3717
+ function Me(r) {
3463
3718
  const t = [];
3464
3719
  let e = "", n = 0, s = !1;
3465
3720
  for(let i = 0; i < r.length; i++){
@@ -3484,7 +3739,7 @@ let __tla = Promise.all([
3484
3739
  }
3485
3740
  return e.trim() && t.push(e.trim()), t;
3486
3741
  }
3487
- function Xn(r) {
3742
+ function Zn(r) {
3488
3743
  const t = [];
3489
3744
  let e = "", n = 0, s = !1;
3490
3745
  for(let i = 0; i < r.length; i++){
@@ -3509,7 +3764,7 @@ let __tla = Promise.all([
3509
3764
  }
3510
3765
  return t.push(e), t;
3511
3766
  }
3512
- qn = class {
3767
+ ts = class {
3513
3768
  dataStore;
3514
3769
  mutationView;
3515
3770
  nextExpressId;
@@ -3517,192 +3772,192 @@ let __tla = Promise.all([
3517
3772
  constructor(t, e){
3518
3773
  this.dataStore = t, this.mutationView = e || null;
3519
3774
  const n = this.findMaxExpressId(), s = typeof e?.peekNextExpressId == "function" ? e.peekNextExpressId() - 1 : 0;
3520
- this.nextExpressId = Math.max(n, s) + 1, this.entityExtractor = t.source ? new ke(t.source) : null;
3775
+ this.nextExpressId = Math.max(n, s) + 1, this.entityExtractor = t.source ? new He(t.source) : null;
3521
3776
  }
3522
3777
  export(t) {
3523
3778
  const e = [];
3524
3779
  let n = 0, s = 0;
3525
- const i = t.schema || this.dataStore.schemaVersion || "IFC4", o = this.dataStore.schemaVersion || "IFC4", a = ce(o, i);
3780
+ const i = t.schema || this.dataStore.schemaVersion || "IFC4", o = this.dataStore.schemaVersion || "IFC4", c = de(o, i);
3526
3781
  if (i === "IFC2X3" && t.applyMutations !== !1 && t.georefMutations && (Object.keys(t.georefMutations.projectedCRS ?? {}).length > 0 || Object.keys(t.georefMutations.mapConversion ?? {}).length > 0)) throw new Error("Georeferencing creation and editing requires IFC4 or newer. IFC2X3 does not support IfcProjectedCRS or IfcMapConversion.");
3527
- const l = ee({
3782
+ const l = se({
3528
3783
  schema: i,
3529
3784
  description: t.description || "Exported from ifc-lite",
3530
3785
  author: t.author || "",
3531
3786
  organization: t.organization || "",
3532
3787
  application: t.application || "ifc-lite",
3533
3788
  filename: t.filename || "export.ifc"
3534
- }), d = new Set, u = new Map, f = new Map, p = [], _ = [], h = new Map, y = new Map, m = new Set, b = new Map, w = new Set, v = new Set;
3789
+ }), d = new Set, u = new Map, f = new Map, p = [], g = [], h = new Map, y = new Map, E = new Set, C = new Map, T = new Set, $ = new Set;
3535
3790
  if (this.mutationView && t.applyMutations !== !1) {
3536
- const C = this.mutationView.getMutations(), N = new Map, F = new Map;
3537
- for (const g of C){
3538
- if (g.type === "UPDATE_ATTRIBUTE" && g.attributeName) {
3539
- d.add(g.entityId), f.has(g.entityId) || f.set(g.entityId, new Map), f.get(g.entityId).set(g.attributeName, g.newValue == null ? "" : String(g.newValue));
3791
+ const b = this.mutationView.getMutations(), S = new Map, F = new Map;
3792
+ for (const _ of b){
3793
+ if (_.type === "UPDATE_ATTRIBUTE" && _.attributeName) {
3794
+ d.add(_.entityId), f.has(_.entityId) || f.set(_.entityId, new Map), f.get(_.entityId).set(_.attributeName, _.newValue == null ? "" : String(_.newValue));
3540
3795
  continue;
3541
3796
  }
3542
- if (!g.psetName) continue;
3543
- const I = g.type === "CREATE_QUANTITY" || g.type === "UPDATE_QUANTITY" || g.type === "DELETE_QUANTITY" ? F : N;
3544
- I.has(g.entityId) || I.set(g.entityId, new Set), I.get(g.entityId).add(g.psetName);
3797
+ if (!_.psetName) continue;
3798
+ const I = _.type === "CREATE_QUANTITY" || _.type === "UPDATE_QUANTITY" || _.type === "DELETE_QUANTITY" ? F : S;
3799
+ I.has(_.entityId) || I.set(_.entityId, new Set), I.get(_.entityId).add(_.psetName);
3545
3800
  }
3546
- const E = this.buildRelDefinesByPropertiesIndex();
3547
- for (const [g, T] of N){
3548
- d.add(g), u.set(g, T), s++;
3549
- const R = this.mutationView.getForEntity(g).filter(($)=>T.has($.name)), S = new Set;
3801
+ const m = this.buildRelDefinesByPropertiesIndex();
3802
+ for (const [_, w] of S){
3803
+ d.add(_), u.set(_, w), s++;
3804
+ const R = this.mutationView.getForEntity(_).filter((z)=>w.has(z.name)), N = new Set;
3550
3805
  R.length > 0 && p.push({
3551
- entityId: g,
3806
+ entityId: _,
3552
3807
  psets: R
3553
3808
  });
3554
- const G = E.get(g);
3555
- if (G) for (const { relId: $, psetId: V } of G){
3556
- const H = this.getPropertySetName(V);
3557
- if (H && S.add(H), H && T.has(H)) {
3558
- v.add($), w.add(V);
3559
- const z = this.getPropertyIdsInSet(V);
3560
- for (const Q of z)w.add(Q);
3809
+ const V = m.get(_);
3810
+ if (V) for (const { relId: z, psetId: W } of V){
3811
+ const H = this.getPropertySetName(W);
3812
+ if (H && N.add(H), H && w.has(H)) {
3813
+ $.add(z), T.add(W);
3814
+ const j = this.getPropertyIdsInSet(W);
3815
+ for (const Q of j)T.add(Q);
3561
3816
  }
3562
3817
  }
3563
- if (this.isTypeEntity(g)) {
3564
- const $ = this.getTypeOwnedHasPropertySetIds(g), V = new Set;
3565
- for (const H of $){
3566
- const z = this.getPropertySetName(H);
3567
- if (!z || !T.has(z)) continue;
3568
- V.add(z), w.add(H);
3818
+ if (this.isTypeEntity(_)) {
3819
+ const z = this.getTypeOwnedHasPropertySetIds(_), W = new Set;
3820
+ for (const H of z){
3821
+ const j = this.getPropertySetName(H);
3822
+ if (!j || !w.has(j)) continue;
3823
+ W.add(j), T.add(H);
3569
3824
  const Q = this.getPropertyIdsInSet(H);
3570
- for (const K of Q)w.add(K);
3825
+ for (const K of Q)T.add(K);
3571
3826
  }
3572
- for (const H of T)S.has(H) || V.add(H);
3573
- V.size > 0 && (h.set(g, V), y.set(g, $), m.add(g));
3827
+ for (const H of w)N.has(H) || W.add(H);
3828
+ W.size > 0 && (h.set(_, W), y.set(_, z), E.add(_));
3574
3829
  }
3575
3830
  }
3576
3831
  t.includeQuantities === !1 && F.clear();
3577
- for (const [g, T] of F){
3578
- d.add(g), u.has(g) || s++;
3579
- const R = this.mutationView.getQuantitiesForEntity(g).filter((G)=>T.has(G.name));
3580
- R.length > 0 && _.push({
3581
- entityId: g,
3832
+ for (const [_, w] of F){
3833
+ d.add(_), u.has(_) || s++;
3834
+ const R = this.mutationView.getQuantitiesForEntity(_).filter((V)=>w.has(V.name));
3835
+ R.length > 0 && g.push({
3836
+ entityId: _,
3582
3837
  qsets: R
3583
3838
  });
3584
- const S = E.get(g);
3585
- if (S) for (const { relId: G, psetId: $ } of S){
3586
- const V = this.getElementQuantityName($);
3587
- if (V && T.has(V)) {
3588
- v.add(G), w.add($);
3589
- const H = this.getPropertyIdsInSet($);
3590
- for (const z of H)w.add(z);
3839
+ const N = m.get(_);
3840
+ if (N) for (const { relId: V, psetId: z } of N){
3841
+ const W = this.getElementQuantityName(z);
3842
+ if (W && w.has(W)) {
3843
+ $.add(V), T.add(z);
3844
+ const H = this.getPropertyIdsInSet(z);
3845
+ for (const j of H)T.add(j);
3591
3846
  }
3592
3847
  }
3593
3848
  }
3594
- for (const [g] of f)!N.has(g) && !F.has(g) && s++;
3849
+ for (const [_] of f)!S.has(_) && !F.has(_) && s++;
3595
3850
  }
3596
- const L = [];
3851
+ const x = [];
3597
3852
  if (t.applyMutations !== !1 && t.georefMutations) {
3598
- const C = t.georefMutations, N = this.dataStore.entityIndex.byType.get("IFCPROJECTEDCRS"), F = this.dataStore.entityIndex.byType.get("IFCMAPCONVERSION");
3599
- if (C.projectedCRS && N?.length) {
3600
- const E = N[0];
3601
- f.has(E) || f.set(E, new Map);
3602
- const g = f.get(E), T = C.projectedCRS;
3853
+ const b = t.georefMutations, S = this.dataStore.entityIndex.byType.get("IFCPROJECTEDCRS"), F = this.dataStore.entityIndex.byType.get("IFCMAPCONVERSION");
3854
+ if (b.projectedCRS && S?.length) {
3855
+ const m = S[0];
3856
+ f.has(m) || f.set(m, new Map);
3857
+ const _ = f.get(m), w = b.projectedCRS;
3603
3858
  let I = !1;
3604
- if (T.name !== void 0 && (g.set("Name", String(T.name)), I = !0), T.description !== void 0 && (g.set("Description", String(T.description)), I = !0), T.geodeticDatum !== void 0 && (g.set("GeodeticDatum", String(T.geodeticDatum)), I = !0), T.verticalDatum !== void 0 && (g.set("VerticalDatum", String(T.verticalDatum)), I = !0), T.mapProjection !== void 0 && (g.set("MapProjection", String(T.mapProjection)), I = !0), T.mapZone !== void 0 && (g.set("MapZone", String(T.mapZone)), I = !0), T.mapUnit !== void 0) {
3605
- const R = this.resolveMapUnitReference(String(T.mapUnit), L);
3606
- g.set("MapUnit", `#${R}`), I = !0;
3859
+ if (w.name !== void 0 && (_.set("Name", String(w.name)), I = !0), w.description !== void 0 && (_.set("Description", String(w.description)), I = !0), w.geodeticDatum !== void 0 && (_.set("GeodeticDatum", String(w.geodeticDatum)), I = !0), w.verticalDatum !== void 0 && (_.set("VerticalDatum", String(w.verticalDatum)), I = !0), w.mapProjection !== void 0 && (_.set("MapProjection", String(w.mapProjection)), I = !0), w.mapZone !== void 0 && (_.set("MapZone", String(w.mapZone)), I = !0), w.mapUnit !== void 0) {
3860
+ const R = this.resolveMapUnitReference(String(w.mapUnit), x);
3861
+ _.set("MapUnit", `#${R}`), I = !0;
3607
3862
  }
3608
- I && !d.has(E) && (d.add(E), s++);
3863
+ I && !d.has(m) && (d.add(m), s++);
3609
3864
  }
3610
- if (C.mapConversion && F?.length) {
3611
- const E = F[0];
3612
- f.has(E) || f.set(E, new Map);
3613
- const g = f.get(E), T = C.mapConversion;
3865
+ if (b.mapConversion && F?.length) {
3866
+ const m = F[0];
3867
+ f.has(m) || f.set(m, new Map);
3868
+ const _ = f.get(m), w = b.mapConversion;
3614
3869
  let I = !1;
3615
- T.eastings !== void 0 && (g.set("Eastings", String(T.eastings)), I = !0), T.northings !== void 0 && (g.set("Northings", String(T.northings)), I = !0), T.orthogonalHeight !== void 0 && (g.set("OrthogonalHeight", String(T.orthogonalHeight)), I = !0), T.xAxisAbscissa !== void 0 && (g.set("XAxisAbscissa", String(T.xAxisAbscissa)), I = !0), T.xAxisOrdinate !== void 0 && (g.set("XAxisOrdinate", String(T.xAxisOrdinate)), I = !0), T.scale !== void 0 && (g.set("Scale", String(T.scale)), I = !0), I && !d.has(E) && (d.add(E), s++);
3870
+ w.eastings !== void 0 && (_.set("Eastings", String(w.eastings)), I = !0), w.northings !== void 0 && (_.set("Northings", String(w.northings)), I = !0), w.orthogonalHeight !== void 0 && (_.set("OrthogonalHeight", String(w.orthogonalHeight)), I = !0), w.xAxisAbscissa !== void 0 && (_.set("XAxisAbscissa", String(w.xAxisAbscissa)), I = !0), w.xAxisOrdinate !== void 0 && (_.set("XAxisOrdinate", String(w.xAxisOrdinate)), I = !0), w.scale !== void 0 && (_.set("Scale", String(w.scale)), I = !0), I && !d.has(m) && (d.add(m), s++);
3616
3871
  }
3617
- if (C.projectedCRS && !N?.length) {
3618
- const E = C.projectedCRS, g = this.nextExpressId++, T = E.name ? `'${et(String(E.name))}'` : "$", I = E.description ? `'${et(String(E.description))}'` : "$", R = E.geodeticDatum ? `'${et(String(E.geodeticDatum))}'` : "$", S = E.verticalDatum ? `'${et(String(E.verticalDatum))}'` : "$", G = E.mapProjection ? `'${et(String(E.mapProjection))}'` : "$", $ = E.mapZone ? `'${et(String(E.mapZone))}'` : "$", V = E.mapUnit ? `#${this.resolveMapUnitReference(String(E.mapUnit), L)}` : "$";
3619
- L.push(`#${g}=IFCPROJECTEDCRS(${T},${I},${R},${S},${G},${$},${V});`), n++;
3872
+ if (b.projectedCRS && !S?.length) {
3873
+ const m = b.projectedCRS, _ = this.nextExpressId++, w = m.name ? `'${st(String(m.name))}'` : "$", I = m.description ? `'${st(String(m.description))}'` : "$", R = m.geodeticDatum ? `'${st(String(m.geodeticDatum))}'` : "$", N = m.verticalDatum ? `'${st(String(m.verticalDatum))}'` : "$", V = m.mapProjection ? `'${st(String(m.mapProjection))}'` : "$", z = m.mapZone ? `'${st(String(m.mapZone))}'` : "$", W = m.mapUnit ? `#${this.resolveMapUnitReference(String(m.mapUnit), x)}` : "$";
3874
+ x.push(`#${_}=IFCPROJECTEDCRS(${w},${I},${R},${N},${V},${z},${W});`), n++;
3620
3875
  const H = this.findPreferredGeometricRepresentationContextId();
3621
3876
  if (H) {
3622
- const z = C.mapConversion || {}, Q = this.nextExpressId++, K = Z(Number(z.eastings) || 0), ot = Z(Number(z.northings) || 0), ut = Z(Number(z.orthogonalHeight) || 0), it = z.xAxisAbscissa !== void 0 ? Z(Number(z.xAxisAbscissa)) : "$", lt = z.xAxisOrdinate !== void 0 ? Z(Number(z.xAxisOrdinate)) : "$", at = z.scale !== void 0 ? Z(Number(z.scale)) : "$";
3623
- L.push(`#${Q}=IFCMAPCONVERSION(#${H},#${g},${K},${ot},${ut},${it},${lt},${at});`), n++;
3877
+ const j = b.mapConversion || {}, Q = this.nextExpressId++, K = Z(Number(j.eastings) || 0), at = Z(Number(j.northings) || 0), ht = Z(Number(j.orthogonalHeight) || 0), rt = j.xAxisAbscissa !== void 0 ? Z(Number(j.xAxisAbscissa)) : "$", dt = j.xAxisOrdinate !== void 0 ? Z(Number(j.xAxisOrdinate)) : "$", lt = j.scale !== void 0 ? Z(Number(j.scale)) : "$";
3878
+ x.push(`#${Q}=IFCMAPCONVERSION(#${H},#${_},${K},${at},${ht},${rt},${dt},${lt});`), n++;
3624
3879
  } else console.warn("[StepExporter] Cannot create IfcMapConversion: no IfcGeometricRepresentationContext found in source file");
3625
- } else if (C.mapConversion && !F?.length && N?.length) {
3626
- const E = this.findPreferredGeometricRepresentationContextId();
3627
- if (E) {
3628
- const g = C.mapConversion, T = this.nextExpressId++, I = Z(Number(g.eastings) || 0), R = Z(Number(g.northings) || 0), S = Z(Number(g.orthogonalHeight) || 0), G = g.xAxisAbscissa !== void 0 ? Z(Number(g.xAxisAbscissa)) : "$", $ = g.xAxisOrdinate !== void 0 ? Z(Number(g.xAxisOrdinate)) : "$", V = g.scale !== void 0 ? Z(Number(g.scale)) : "$";
3629
- L.push(`#${T}=IFCMAPCONVERSION(#${E},#${N[0]},${I},${R},${S},${G},${$},${V});`), n++;
3880
+ } else if (b.mapConversion && !F?.length && S?.length) {
3881
+ const m = this.findPreferredGeometricRepresentationContextId();
3882
+ if (m) {
3883
+ const _ = b.mapConversion, w = this.nextExpressId++, I = Z(Number(_.eastings) || 0), R = Z(Number(_.northings) || 0), N = Z(Number(_.orthogonalHeight) || 0), V = _.xAxisAbscissa !== void 0 ? Z(Number(_.xAxisAbscissa)) : "$", z = _.xAxisOrdinate !== void 0 ? Z(Number(_.xAxisOrdinate)) : "$", W = _.scale !== void 0 ? Z(Number(_.scale)) : "$";
3884
+ x.push(`#${w}=IFCMAPCONVERSION(#${m},#${S[0]},${I},${R},${N},${V},${z},${W});`), n++;
3630
3885
  } else console.warn("[StepExporter] Cannot create IfcMapConversion: no IfcGeometricRepresentationContext found in source file");
3631
3886
  }
3632
3887
  }
3633
- const j = this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function" ? this.mutationView.getNewEntities().length : 0;
3634
- if (t.deltaOnly && d.size === 0 && j === 0 && L.length === 0) {
3635
- const C = new TextEncoder().encode(l + `DATA;
3888
+ const Y = this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function" ? this.mutationView.getNewEntities().length : 0;
3889
+ if (t.deltaOnly && d.size === 0 && Y === 0 && x.length === 0) {
3890
+ const b = new TextEncoder().encode(l + `DATA;
3636
3891
  ENDSEC;
3637
3892
  END-ISO-10303-21;
3638
3893
  `);
3639
3894
  return {
3640
- content: C,
3895
+ content: b,
3641
3896
  stats: {
3642
3897
  entityCount: 0,
3643
3898
  newEntityCount: 0,
3644
3899
  modifiedEntityCount: 0,
3645
- fileSize: C.byteLength
3900
+ fileSize: b.byteLength
3646
3901
  }
3647
3902
  };
3648
3903
  }
3649
3904
  let O = null;
3650
3905
  if (t.visibleOnly && this.dataStore.source) {
3651
- const { roots: C, hiddenProductIds: N } = oe(this.dataStore, t.hiddenEntityIds ?? new Set, t.isolatedEntityIds ?? null);
3652
- O = re(C, this.dataStore.source, this.dataStore.entityIndex.byId, N), ae(O, this.dataStore.source, this.dataStore.entityIndex);
3906
+ const { roots: b, hiddenProductIds: S } = ce(this.dataStore, t.hiddenEntityIds ?? new Set, t.isolatedEntityIds ?? null);
3907
+ O = ae(b, this.dataStore.source, this.dataStore.entityIndex.byId, S), le(O, this.dataStore.source, this.dataStore.entityIndex);
3653
3908
  }
3654
3909
  if (!t.deltaOnly && this.dataStore.source) {
3655
- const C = this.dataStore.source, N = !!this.mutationView && t.applyMutations !== !1;
3656
- for (const [F, E] of this.dataStore.entityIndex.byId){
3657
- if (N && typeof this.mutationView.isDeleted == "function" && this.mutationView.isDeleted(F) || E.byteLength === 0 || E.byteOffset < 0 || O !== null && !O.has(F) || w.has(F) || v.has(F) || m.has(F)) continue;
3658
- const g = E.type.toUpperCase();
3659
- if (t.includeGeometry === !1 && this.isGeometryEntity(g)) continue;
3660
- const T = st(C, E.byteOffset, E.byteOffset + E.byteLength);
3661
- let I = f.has(F) ? this.applyAttributeMutations(T, g, f.get(F)) : T;
3662
- const R = N && typeof this.mutationView.getPositionalMutationsForEntity == "function" ? this.mutationView.getPositionalMutationsForEntity(F) : null;
3663
- if (R && R.size > 0 && (I = this.applyPositionalMutations(I, R), d.has(F) || (d.add(F), s++)), a) {
3664
- const S = jt(I, o, i);
3665
- S !== null && e.push(S);
3910
+ const b = this.dataStore.source, S = !!this.mutationView && t.applyMutations !== !1;
3911
+ for (const [F, m] of this.dataStore.entityIndex.byId){
3912
+ if (S && typeof this.mutationView.isDeleted == "function" && this.mutationView.isDeleted(F) || m.byteLength === 0 || m.byteOffset < 0 || O !== null && !O.has(F) || T.has(F) || $.has(F) || E.has(F)) continue;
3913
+ const _ = m.type.toUpperCase();
3914
+ if (t.includeGeometry === !1 && this.isGeometryEntity(_)) continue;
3915
+ const w = nt(b, m.byteOffset, m.byteOffset + m.byteLength);
3916
+ let I = f.has(F) ? this.applyAttributeMutations(w, _, f.get(F)) : w;
3917
+ const R = S && typeof this.mutationView.getPositionalMutationsForEntity == "function" ? this.mutationView.getPositionalMutationsForEntity(F) : null;
3918
+ if (R && R.size > 0 && (I = this.applyPositionalMutations(I, R), d.has(F) || (d.add(F), s++)), c) {
3919
+ const N = Xt(I, o, i);
3920
+ N !== null && e.push(N);
3666
3921
  } else e.push(I);
3667
3922
  }
3668
3923
  }
3669
- for (const { entityId: C, psets: N } of p){
3670
- const F = this.generatePropertySetEntities(C, N, h.get(C));
3924
+ for (const { entityId: b, psets: S } of p){
3925
+ const F = this.generatePropertySetEntities(b, S, h.get(b));
3671
3926
  e.push(...F.lines), n += F.count;
3672
- const E = h.get(C);
3673
- if (E && E.size > 0) {
3674
- const g = this.rewriteTypeEntityHasPropertySets(C, y.get(C) ?? [], E, F.generatedTypeOwnedPsetIds);
3675
- g && b.set(C, g);
3927
+ const m = h.get(b);
3928
+ if (m && m.size > 0) {
3929
+ const _ = this.rewriteTypeEntityHasPropertySets(b, y.get(b) ?? [], m, F.generatedTypeOwnedPsetIds);
3930
+ _ && C.set(b, _);
3676
3931
  }
3677
3932
  }
3678
- for (const [C, N] of h){
3679
- if (b.has(C)) continue;
3680
- const F = this.rewriteTypeEntityHasPropertySets(C, y.get(C) ?? [], N, new Map);
3681
- F && b.set(C, F);
3933
+ for (const [b, S] of h){
3934
+ if (C.has(b)) continue;
3935
+ const F = this.rewriteTypeEntityHasPropertySets(b, y.get(b) ?? [], S, new Map);
3936
+ F && C.set(b, F);
3682
3937
  }
3683
- for (const { entityId: C, qsets: N } of _){
3684
- const F = this.generateQuantitySetEntities(C, N);
3938
+ for (const { entityId: b, qsets: S } of g){
3939
+ const F = this.generateQuantitySetEntities(b, S);
3685
3940
  e.push(...F.lines), n += F.count;
3686
3941
  }
3687
- for (const C of b.values())e.push(C);
3688
- for (const C of L)e.push(C);
3689
- if (this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function") for (const C of this.mutationView.getNewEntities()){
3690
- const N = C.type.toUpperCase();
3691
- if (t.includeGeometry === !1 && this.isGeometryEntity(N) || O !== null && !O.has(C.expressId)) continue;
3692
- const F = `#${C.expressId}=${N}(${Hn(C.attributes)});`;
3693
- if (a) {
3694
- const E = jt(F, o, i);
3695
- E !== null && (e.push(E), n++);
3942
+ for (const b of C.values())e.push(b);
3943
+ for (const b of x)e.push(b);
3944
+ if (this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function") for (const b of this.mutationView.getNewEntities()){
3945
+ const S = b.type.toUpperCase();
3946
+ if (t.includeGeometry === !1 && this.isGeometryEntity(S) || O !== null && !O.has(b.expressId)) continue;
3947
+ const F = `#${b.expressId}=${S}(${Kn(b.attributes)});`;
3948
+ if (c) {
3949
+ const m = Xt(F, o, i);
3950
+ m !== null && (e.push(m), n++);
3696
3951
  } else e.push(F), n++;
3697
3952
  }
3698
- const U = Qn(l, e);
3953
+ const v = es(l, e);
3699
3954
  return {
3700
- content: U,
3955
+ content: v,
3701
3956
  stats: {
3702
3957
  entityCount: e.length,
3703
3958
  newEntityCount: n,
3704
3959
  modifiedEntityCount: s,
3705
- fileSize: U.byteLength
3960
+ fileSize: v.byteLength
3706
3961
  }
3707
3962
  };
3708
3963
  }
@@ -3738,22 +3993,22 @@ END-ISO-10303-21;
3738
3993
  const s = [];
3739
3994
  let i = 0;
3740
3995
  const o = new Map;
3741
- for (const a of e){
3996
+ for (const c of e){
3742
3997
  const l = [];
3743
- for (const _ of a.properties){
3998
+ for (const g of c.properties){
3744
3999
  const h = this.nextExpressId++;
3745
4000
  i++;
3746
- const y = ve(_.value, _.type), m = _.unit ? this.findUnitId(_.unit) : null, b = m !== null ? je(m) : null, w = `#${h}=IFCPROPERTYSINGLEVALUE('${et(_.name)}',$,${y},${b ? Me(b) : "$"});`;
3747
- s.push(w), l.push(h);
4001
+ const y = ze(g.value, g.type), E = g.unit ? this.findUnitId(g.unit) : null, C = E !== null ? Qe(E) : null, T = `#${h}=IFCPROPERTYSINGLEVALUE('${st(g.name)}',$,${y},${C ? Ue(C) : "$"});`;
4002
+ s.push(T), l.push(h);
3748
4003
  }
3749
4004
  const d = this.nextExpressId++;
3750
4005
  i++;
3751
- const u = l.map((_)=>`#${_}`).join(","), f = this.generateGlobalId(), p = `#${d}=IFCPROPERTYSET('${f}',$,'${et(a.name)}',$,(${u}));`;
3752
- if (s.push(p), n?.has(a.name)) o.set(a.name, d);
4006
+ const u = l.map((g)=>`#${g}`).join(","), f = this.generateGlobalId(), p = `#${d}=IFCPROPERTYSET('${f}',$,'${st(c.name)}',$,(${u}));`;
4007
+ if (s.push(p), n?.has(c.name)) o.set(c.name, d);
3753
4008
  else {
3754
- const _ = this.nextExpressId++;
4009
+ const g = this.nextExpressId++;
3755
4010
  i++;
3756
- const h = this.generateGlobalId(), y = `#${_}=IFCRELDEFINESBYPROPERTIES('${h}',$,$,$,(#${t}),#${d});`;
4011
+ const h = this.generateGlobalId(), y = `#${g}=IFCRELDEFINESBYPROPERTIES('${h}',$,$,$,(#${t}),#${d});`;
3757
4012
  s.push(y);
3758
4013
  }
3759
4014
  }
@@ -3771,17 +4026,17 @@ END-ISO-10303-21;
3771
4026
  for (const h of i.quantities){
3772
4027
  const y = this.nextExpressId++;
3773
4028
  s++;
3774
- const m = Wn(h.type), b = Z(h.value), w = `#${y}=${m}('${et(h.name)}',$,$,${b},$);`;
3775
- n.push(w), o.push(y);
4029
+ const E = Qn(h.type), C = Z(h.value), T = `#${y}=${E}('${st(h.name)}',$,$,${C},$);`;
4030
+ n.push(T), o.push(y);
3776
4031
  }
3777
- const a = this.nextExpressId++;
4032
+ const c = this.nextExpressId++;
3778
4033
  s++;
3779
- const l = o.map((h)=>`#${h}`).join(","), d = this.generateGlobalId(), u = `#${a}=IFCELEMENTQUANTITY('${d}',$,'${et(i.name)}',$,$,(${l}));`;
4034
+ const l = o.map((h)=>`#${h}`).join(","), d = this.generateGlobalId(), u = `#${c}=IFCELEMENTQUANTITY('${d}',$,'${st(i.name)}',$,$,(${l}));`;
3780
4035
  n.push(u);
3781
4036
  const f = this.nextExpressId++;
3782
4037
  s++;
3783
- const p = this.generateGlobalId(), _ = `#${f}=IFCRELDEFINESBYPROPERTIES('${p}',$,$,$,(#${t}),#${a});`;
3784
- n.push(_);
4038
+ const p = this.generateGlobalId(), g = `#${f}=IFCRELDEFINESBYPROPERTIES('${p}',$,$,$,(#${t}),#${c});`;
4039
+ n.push(g);
3785
4040
  }
3786
4041
  return {
3787
4042
  lines: n,
@@ -3791,22 +4046,22 @@ END-ISO-10303-21;
3791
4046
  applyAttributeMutations(t, e, n) {
3792
4047
  const s = t.indexOf("("), i = t.lastIndexOf(");");
3793
4048
  if (s < 0 || i < s) return t;
3794
- const o = Ye(e);
4049
+ const o = Xe(e);
3795
4050
  if (o.length === 0) return t;
3796
- const a = Ae(t.slice(s + 1, i));
4051
+ const c = Me(t.slice(s + 1, i));
3797
4052
  let l = !1;
3798
4053
  for (const [d, u] of n){
3799
4054
  const f = o.indexOf(d);
3800
- f < 0 || f >= a.length || (a[f] = jn(u, a[f]), l = !0);
4055
+ f < 0 || f >= c.length || (c[f] = Jn(u, c[f]), l = !0);
3801
4056
  }
3802
- return l ? `${t.slice(0, s + 1)}${a.join(",")}${t.slice(i)}` : t;
4057
+ return l ? `${t.slice(0, s + 1)}${c.join(",")}${t.slice(i)}` : t;
3803
4058
  }
3804
4059
  applyPositionalMutations(t, e) {
3805
4060
  const n = t.indexOf("("), s = t.lastIndexOf(");");
3806
4061
  if (n < 0 || s < n) return t;
3807
- const i = Ae(t.slice(n + 1, s));
4062
+ const i = Me(t.slice(n + 1, s));
3808
4063
  let o = !1;
3809
- for (const [a, l] of e)a < 0 || a >= i.length || (i[a] = le(l), o = !0);
4064
+ for (const [c, l] of e)c < 0 || c >= i.length || (i[c] = fe(l), o = !0);
3810
4065
  return o ? `${t.slice(0, n + 1)}${i.join(",")}${t.slice(s)}` : t;
3811
4066
  }
3812
4067
  resolveMapUnitReference(t, e) {
@@ -3817,8 +4072,8 @@ END-ISO-10303-21;
3817
4072
  return e.push(`#${o}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), o;
3818
4073
  }
3819
4074
  if (n === "FOOT" || n === "US SURVEY FOOT") {
3820
- const o = this.nextExpressId++, a = this.nextExpressId++, l = this.nextExpressId++, d = this.nextExpressId++, u = n === "US SURVEY FOOT" ? 1200 / 3937 : .3048, f = n === "US SURVEY FOOT" ? "US SURVEY FOOT" : "FOOT";
3821
- return e.push(`#${o}=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);`), e.push(`#${a}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), e.push(`#${l}=IFCMEASUREWITHUNIT(IFCLENGTHMEASURE(${Z(u)}),#${a});`), e.push(`#${d}=IFCCONVERSIONBASEDUNIT(#${o},.LENGTHUNIT.,'${f}',#${l});`), d;
4075
+ const o = this.nextExpressId++, c = this.nextExpressId++, l = this.nextExpressId++, d = this.nextExpressId++, u = n === "US SURVEY FOOT" ? 1200 / 3937 : .3048, f = n === "US SURVEY FOOT" ? "US SURVEY FOOT" : "FOOT";
4076
+ return e.push(`#${o}=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);`), e.push(`#${c}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), e.push(`#${l}=IFCMEASUREWITHUNIT(IFCLENGTHMEASURE(${Z(u)}),#${c});`), e.push(`#${d}=IFCCONVERSIONBASEDUNIT(#${o},.LENGTHUNIT.,'${f}',#${l});`), d;
3822
4077
  }
3823
4078
  const i = this.nextExpressId++;
3824
4079
  return e.push(`#${i}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), i;
@@ -3837,13 +4092,13 @@ END-ISO-10303-21;
3837
4092
  if (typeof d != "number") continue;
3838
4093
  const u = this.dataStore.entityIndex.byId.get(d), f = u ? this.entityExtractor.extractEntity(u) : null;
3839
4094
  if (!f) continue;
3840
- const p = f.type.toUpperCase(), _ = f.attributes ?? [];
3841
- if ((typeof _[1] == "string" ? _[1].replace(/\./g, "").toUpperCase() : "") === "LENGTHUNIT") {
4095
+ const p = f.type.toUpperCase(), g = f.attributes ?? [];
4096
+ if ((typeof g[1] == "string" ? g[1].replace(/\./g, "").toUpperCase() : "") === "LENGTHUNIT") {
3842
4097
  if (p === "IFCSIUNIT") {
3843
- const y = typeof _[2] == "string" ? _[2].replace(/\./g, "").toUpperCase() : "", m = typeof _[3] == "string" ? _[3].replace(/\./g, "").toUpperCase() : "", b = y ? `${y}${m}` : m;
3844
- if (t === "METRE" && (b === "METRE" || b === "METER")) return d;
4098
+ const y = typeof g[2] == "string" ? g[2].replace(/\./g, "").toUpperCase() : "", E = typeof g[3] == "string" ? g[3].replace(/\./g, "").toUpperCase() : "", C = y ? `${y}${E}` : E;
4099
+ if (t === "METRE" && (C === "METRE" || C === "METER")) return d;
3845
4100
  }
3846
- if (p === "IFCCONVERSIONBASEDUNIT" && (typeof _[2] == "string" ? this.normalizeMapUnitName(_[2]) : "") === t) return d;
4101
+ if (p === "IFCCONVERSIONBASEDUNIT" && (typeof g[2] == "string" ? this.normalizeMapUnitName(g[2]) : "") === t) return d;
3847
4102
  }
3848
4103
  }
3849
4104
  return null;
@@ -3855,13 +4110,13 @@ END-ISO-10303-21;
3855
4110
  for (const n of t){
3856
4111
  const s = this.dataStore.entityIndex.byId.get(n), i = s ? this.entityExtractor.extractEntity(s) : null;
3857
4112
  if (!i) continue;
3858
- const o = i.attributes ?? [], a = typeof o[1] == "string" ? o[1].trim().toUpperCase() : "", l = typeof o[2] == "number" ? o[2] : null;
3859
- if (l === 3 && e === null && (e = n), a === "MODEL" && l === 3) return n;
4113
+ const o = i.attributes ?? [], c = typeof o[1] == "string" ? o[1].trim().toUpperCase() : "", l = typeof o[2] == "number" ? o[2] : null;
4114
+ if (l === 3 && e === null && (e = n), c === "MODEL" && l === 3) return n;
3860
4115
  }
3861
4116
  return e ?? t[0] ?? null;
3862
4117
  }
3863
4118
  generateGlobalId() {
3864
- return We();
4119
+ return qe();
3865
4120
  }
3866
4121
  findMaxExpressId() {
3867
4122
  let t = 0;
@@ -3924,37 +4179,37 @@ END-ISO-10303-21;
3924
4179
  getRelatedEntities(t) {
3925
4180
  const e = this.dataStore.entityIndex.byId.get(t);
3926
4181
  if (!e || !this.dataStore.source) return [];
3927
- const s = st(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(([^)]+)\)\s*,\s*#(\d+)\s*\)\s*;/);
4182
+ const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(([^)]+)\)\s*,\s*#(\d+)\s*\)\s*;/);
3928
4183
  if (!s) return [];
3929
- const i = s[1], o = [], a = i.matchAll(/#(\d+)/g);
3930
- for (const l of a)o.push(parseInt(l[1], 10));
4184
+ const i = s[1], o = [], c = i.matchAll(/#(\d+)/g);
4185
+ for (const l of c)o.push(parseInt(l[1], 10));
3931
4186
  return o;
3932
4187
  }
3933
4188
  getRelatedPropertySet(t) {
3934
4189
  const e = this.dataStore.entityIndex.byId.get(t);
3935
4190
  if (!e || !this.dataStore.source) return null;
3936
- const s = st(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/,\s*#(\d+)\s*\)\s*;$/);
4191
+ const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/,\s*#(\d+)\s*\)\s*;$/);
3937
4192
  return s ? parseInt(s[1], 10) : null;
3938
4193
  }
3939
4194
  getPropertySetName(t) {
3940
4195
  const e = this.dataStore.entityIndex.byId.get(t);
3941
4196
  if (!e || !this.dataStore.source) return null;
3942
- const s = st(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/IFCPROPERTYSET\s*\([^,]*,[^,]*,'([^']*)'/i);
4197
+ const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/IFCPROPERTYSET\s*\([^,]*,[^,]*,'([^']*)'/i);
3943
4198
  return s ? s[1] : null;
3944
4199
  }
3945
4200
  getElementQuantityName(t) {
3946
4201
  const e = this.dataStore.entityIndex.byId.get(t);
3947
4202
  if (!e || !this.dataStore.source) return null;
3948
- const s = st(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/IFCELEMENTQUANTITY\s*\([^,]*,[^,]*,'([^']*)'/i);
4203
+ const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/IFCELEMENTQUANTITY\s*\([^,]*,[^,]*,'([^']*)'/i);
3949
4204
  return s ? s[1] : null;
3950
4205
  }
3951
4206
  getPropertyIdsInSet(t) {
3952
4207
  const e = this.dataStore.entityIndex.byId.get(t);
3953
4208
  if (!e || !this.dataStore.source) return [];
3954
- const s = st(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(\s*(#[^)]+)\s*\)\s*\)\s*;$/);
4209
+ const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(\s*(#[^)]+)\s*\)\s*\)\s*;$/);
3955
4210
  if (!s) return [];
3956
- const i = s[1], o = [], a = i.matchAll(/#(\d+)/g);
3957
- for (const l of a)o.push(parseInt(l[1], 10));
4211
+ const i = s[1], o = [], c = i.matchAll(/#(\d+)/g);
4212
+ for (const l of c)o.push(parseInt(l[1], 10));
3958
4213
  return o;
3959
4214
  }
3960
4215
  isTypeEntity(t) {
@@ -3979,53 +4234,53 @@ END-ISO-10303-21;
3979
4234
  i.push(l);
3980
4235
  }
3981
4236
  for (const [l, d] of s)o.has(l) || i.push(d);
3982
- const a = i.length > 0 ? `(${i.map((l)=>`#${l}`).join(",")})` : "$";
3983
- return this.replaceEntityAttribute(t, 5, a);
4237
+ const c = i.length > 0 ? `(${i.map((l)=>`#${l}`).join(",")})` : "$";
4238
+ return this.replaceEntityAttribute(t, 5, c);
3984
4239
  }
3985
4240
  replaceEntityAttribute(t, e, n) {
3986
4241
  const s = this.dataStore.entityIndex.byId.get(t);
3987
4242
  if (!s || !this.dataStore.source) return null;
3988
- const o = st(this.dataStore.source, s.byteOffset, s.byteOffset + s.byteLength).match(/^(#\d+\s*=\s*\w+\()([\s\S]*)(\)\s*;)\s*$/);
4243
+ const o = nt(this.dataStore.source, s.byteOffset, s.byteOffset + s.byteLength).match(/^(#\d+\s*=\s*\w+\()([\s\S]*)(\)\s*;)\s*$/);
3989
4244
  if (!o) return null;
3990
- const [, a, l, d] = o, u = Xn(l);
3991
- return e >= u.length ? null : (u[e] = n, `${a}${u.join(",")}${d}`);
4245
+ const [, c, l, d] = o, u = Zn(l);
4246
+ return e >= u.length ? null : (u[e] = n, `${c}${u.join(",")}${d}`);
3992
4247
  }
3993
4248
  };
3994
- os = function(r, t) {
3995
- const n = new qn(r).export({
4249
+ fs = function(r, t) {
4250
+ const n = new ts(r).export({
3996
4251
  schema: "IFC4",
3997
4252
  ...t
3998
4253
  });
3999
4254
  return new TextDecoder().decode(n.content);
4000
4255
  };
4001
- function Qn(r, t) {
4256
+ function es(r, t) {
4002
4257
  const e = new TextEncoder, n = e.encode(`${r}DATA;
4003
4258
  `), s = e.encode(`ENDSEC;
4004
4259
  END-ISO-10303-21;
4005
4260
  `), i = e.encode(`
4006
4261
  `);
4007
4262
  let o = n.byteLength + s.byteLength;
4008
- const a = new Array(t.length);
4009
- for(let u = 0; u < t.length; u++)a[u] = e.encode(t[u]), o += a[u].byteLength + i.byteLength;
4263
+ const c = new Array(t.length);
4264
+ for(let u = 0; u < t.length; u++)c[u] = e.encode(t[u]), o += c[u].byteLength + i.byteLength;
4010
4265
  const l = new Uint8Array(o);
4011
4266
  let d = 0;
4012
4267
  l.set(n, d), d += n.byteLength;
4013
- for(let u = 0; u < a.length; u++)l.set(a[u], d), d += a[u].byteLength, l.set(i, d), d += i.byteLength;
4268
+ for(let u = 0; u < c.length; u++)l.set(c[u], d), d += c[u].byteLength, l.set(i, d), d += i.byteLength;
4014
4269
  return l.set(s, d), l;
4015
4270
  }
4016
- const Jn = /#(\d+)/g, Kn = new Set([
4271
+ const ns = /#(\d+)/g, ss = new Set([
4017
4272
  "IFCUNITASSIGNMENT",
4018
4273
  "IFCGEOMETRICREPRESENTATIONCONTEXT",
4019
4274
  "IFCGEOMETRICREPRESENTATIONSUBCONTEXT"
4020
4275
  ]);
4021
- as = class {
4276
+ us = class {
4022
4277
  models;
4023
4278
  constructor(t){
4024
4279
  if (t.length === 0) throw new Error("MergedExporter requires at least one model");
4025
4280
  this.models = t;
4026
4281
  }
4027
4282
  export(t) {
4028
- const e = t.onProgress, n = t.schema || "IFC4", s = ee({
4283
+ const e = t.onProgress, n = t.schema || "IFC4", s = se({
4029
4284
  schema: n,
4030
4285
  description: t.description || `Merged export of ${this.models.length} models from ifc-lite`,
4031
4286
  author: t.author || "",
@@ -4034,46 +4289,46 @@ END-ISO-10303-21;
4034
4289
  filename: t.filename || "merged.ifc"
4035
4290
  }), i = [];
4036
4291
  let o = 1;
4037
- const a = new Map;
4292
+ const c = new Map;
4038
4293
  for (const y of this.models){
4039
- a.set(y.id, o - 1);
4040
- let m = 0;
4041
- for (const [b] of y.dataStore.entityIndex.byId)b > m && (m = b);
4042
- o += m;
4294
+ c.set(y.id, o - 1);
4295
+ let E = 0;
4296
+ for (const [C] of y.dataStore.entityIndex.byId)C > E && (E = C);
4297
+ o += E;
4043
4298
  }
4044
- const l = this.models[0], d = a.get(l.id), u = this.findInfrastructureEntities(l.dataStore), f = this.findEntitiesByType(l.dataStore, "IFCPROJECT"), p = this.buildSpatialLookup(l.dataStore);
4045
- let _ = !0;
4299
+ const l = this.models[0], d = c.get(l.id), u = this.findInfrastructureEntities(l.dataStore), f = this.findEntitiesByType(l.dataStore, "IFCPROJECT"), p = this.buildSpatialLookup(l.dataStore);
4300
+ let g = !0;
4046
4301
  for (const y of this.models){
4047
- const m = a.get(y.id), b = y.dataStore.source;
4048
- if (!b || b.length === 0) continue;
4049
- let w = null;
4302
+ const E = c.get(y.id), C = y.dataStore.source;
4303
+ if (!C || C.length === 0) continue;
4304
+ let T = null;
4050
4305
  if (t.visibleOnly) {
4051
- const j = t.hiddenEntityIdsByModel?.get(y.id) ?? new Set, O = t.isolatedEntityIdsByModel?.get(y.id) ?? null, { roots: U, hiddenProductIds: C } = oe(y.dataStore, j, O);
4052
- w = re(U, b, y.dataStore.entityIndex.byId, C), ae(w, b, y.dataStore.entityIndex);
4306
+ const Y = t.hiddenEntityIdsByModel?.get(y.id) ?? new Set, O = t.isolatedEntityIdsByModel?.get(y.id) ?? null, { roots: v, hiddenProductIds: b } = ce(y.dataStore, Y, O);
4307
+ T = ae(v, C, y.dataStore.entityIndex.byId, b), le(T, C, y.dataStore.entityIndex);
4053
4308
  }
4054
- const v = new Map, L = new Set;
4055
- if (!_) {
4056
- const j = this.findEntitiesByType(y.dataStore, "IFCPROJECT");
4057
- if (f.length > 0) for (const U of j)v.set(U, f[0] + d), L.add(U);
4309
+ const $ = new Map, x = new Set;
4310
+ if (!g) {
4311
+ const Y = this.findEntitiesByType(y.dataStore, "IFCPROJECT");
4312
+ if (f.length > 0) for (const v of Y)$.set(v, f[0] + d), x.add(v);
4058
4313
  const O = this.findInfrastructureEntities(y.dataStore);
4059
- for (const [U, C] of u){
4060
- const N = O.get(U);
4061
- N && C.length > 0 && N.length > 0 && (v.set(N[0], C[0] + d), L.add(N[0]));
4314
+ for (const [v, b] of u){
4315
+ const S = O.get(v);
4316
+ S && b.length > 0 && S.length > 0 && ($.set(S[0], b[0] + d), x.add(S[0]));
4062
4317
  }
4063
- this.unifySpatialEntities(y.dataStore, p, d, v, L), this.skipRedundantRelAggregates(y.dataStore, v, L);
4318
+ this.unifySpatialEntities(y.dataStore, p, d, $, x), this.skipRedundantRelAggregates(y.dataStore, $, x);
4064
4319
  }
4065
- for (const [j, O] of y.dataStore.entityIndex.byId){
4066
- if (w !== null && !w.has(j) || L.has(j)) continue;
4067
- const U = st(b, O.byteOffset, O.byteOffset + O.byteLength);
4068
- let C;
4069
- m === 0 && v.size === 0 ? C = U : C = this.remapEntityText(U, m, v);
4070
- const N = y.dataStore.schemaVersion || "IFC4";
4071
- if (ce(N, n)) {
4072
- const F = jt(C, N, n);
4320
+ for (const [Y, O] of y.dataStore.entityIndex.byId){
4321
+ if (T !== null && !T.has(Y) || x.has(Y)) continue;
4322
+ const v = nt(C, O.byteOffset, O.byteOffset + O.byteLength);
4323
+ let b;
4324
+ E === 0 && $.size === 0 ? b = v : b = this.remapEntityText(v, E, $);
4325
+ const S = y.dataStore.schemaVersion || "IFC4";
4326
+ if (de(S, n)) {
4327
+ const F = Xt(b, S, n);
4073
4328
  F !== null && i.push(F);
4074
- } else i.push(C);
4329
+ } else i.push(b);
4075
4330
  }
4076
- _ = !1;
4331
+ g = !1;
4077
4332
  }
4078
4333
  e && e({
4079
4334
  phase: "assembling",
@@ -4081,7 +4336,7 @@ END-ISO-10303-21;
4081
4336
  entitiesProcessed: i.length,
4082
4337
  entitiesTotal: i.length
4083
4338
  });
4084
- const h = Oe(s, i);
4339
+ const h = Pe(s, i);
4085
4340
  return {
4086
4341
  content: h,
4087
4342
  stats: {
@@ -4092,7 +4347,7 @@ END-ISO-10303-21;
4092
4347
  };
4093
4348
  }
4094
4349
  async exportAsync(t) {
4095
- const e = t.onProgress, n = t.schema || "IFC4", s = ee({
4350
+ const e = t.onProgress, n = t.schema || "IFC4", s = se({
4096
4351
  schema: n,
4097
4352
  description: t.description || `Merged export of ${this.models.length} models from ifc-lite`,
4098
4353
  author: t.author || "",
@@ -4101,67 +4356,67 @@ END-ISO-10303-21;
4101
4356
  filename: t.filename || "merged.ifc"
4102
4357
  }), i = [];
4103
4358
  let o = 0;
4104
- for (const w of this.models)o += w.dataStore.entityIndex.byId.size;
4105
- let a = 1;
4359
+ for (const T of this.models)o += T.dataStore.entityIndex.byId.size;
4360
+ let c = 1;
4106
4361
  const l = new Map;
4107
- for (const w of this.models){
4108
- l.set(w.id, a - 1);
4109
- let v = 0;
4110
- for (const [L] of w.dataStore.entityIndex.byId)L > v && (v = L);
4111
- a += v;
4362
+ for (const T of this.models){
4363
+ l.set(T.id, c - 1);
4364
+ let $ = 0;
4365
+ for (const [x] of T.dataStore.entityIndex.byId)x > $ && ($ = x);
4366
+ c += $;
4112
4367
  }
4113
- const d = this.models[0], u = l.get(d.id), f = this.findInfrastructureEntities(d.dataStore), p = this.findEntitiesByType(d.dataStore, "IFCPROJECT"), _ = this.buildSpatialLookup(d.dataStore);
4368
+ const d = this.models[0], u = l.get(d.id), f = this.findInfrastructureEntities(d.dataStore), p = this.findEntitiesByType(d.dataStore, "IFCPROJECT"), g = this.buildSpatialLookup(d.dataStore);
4114
4369
  let h = !0, y = 0;
4115
- const m = 2e3;
4370
+ const E = 2e3;
4116
4371
  e && e({
4117
4372
  phase: "preparing",
4118
4373
  percent: 0,
4119
4374
  entitiesProcessed: 0,
4120
4375
  entitiesTotal: o
4121
4376
  });
4122
- for (const w of this.models){
4123
- const v = l.get(w.id), L = w.dataStore.source;
4124
- if (!L || L.length === 0) continue;
4377
+ for (const T of this.models){
4378
+ const $ = l.get(T.id), x = T.dataStore.source;
4379
+ if (!x || x.length === 0) continue;
4125
4380
  e && e({
4126
4381
  phase: "entities",
4127
4382
  percent: o > 0 ? y / o * .85 : 0,
4128
4383
  entitiesProcessed: y,
4129
4384
  entitiesTotal: o,
4130
- currentModel: w.name
4385
+ currentModel: T.name
4131
4386
  });
4132
- let j = null;
4387
+ let Y = null;
4133
4388
  if (t.visibleOnly) {
4134
- const N = t.hiddenEntityIdsByModel?.get(w.id) ?? new Set, F = t.isolatedEntityIdsByModel?.get(w.id) ?? null, { roots: E, hiddenProductIds: g } = oe(w.dataStore, N, F);
4135
- j = re(E, L, w.dataStore.entityIndex.byId, g), ae(j, L, w.dataStore.entityIndex);
4389
+ const S = t.hiddenEntityIdsByModel?.get(T.id) ?? new Set, F = t.isolatedEntityIdsByModel?.get(T.id) ?? null, { roots: m, hiddenProductIds: _ } = ce(T.dataStore, S, F);
4390
+ Y = ae(m, x, T.dataStore.entityIndex.byId, _), le(Y, x, T.dataStore.entityIndex);
4136
4391
  }
4137
- const O = new Map, U = new Set;
4392
+ const O = new Map, v = new Set;
4138
4393
  if (!h) {
4139
- const N = this.findEntitiesByType(w.dataStore, "IFCPROJECT");
4140
- if (p.length > 0) for (const E of N)O.set(E, p[0] + u), U.add(E);
4141
- const F = this.findInfrastructureEntities(w.dataStore);
4142
- for (const [E, g] of f){
4143
- const T = F.get(E);
4144
- T && g.length > 0 && T.length > 0 && (O.set(T[0], g[0] + u), U.add(T[0]));
4394
+ const S = this.findEntitiesByType(T.dataStore, "IFCPROJECT");
4395
+ if (p.length > 0) for (const m of S)O.set(m, p[0] + u), v.add(m);
4396
+ const F = this.findInfrastructureEntities(T.dataStore);
4397
+ for (const [m, _] of f){
4398
+ const w = F.get(m);
4399
+ w && _.length > 0 && w.length > 0 && (O.set(w[0], _[0] + u), v.add(w[0]));
4145
4400
  }
4146
- this.unifySpatialEntities(w.dataStore, _, u, O, U), this.skipRedundantRelAggregates(w.dataStore, O, U);
4401
+ this.unifySpatialEntities(T.dataStore, g, u, O, v), this.skipRedundantRelAggregates(T.dataStore, O, v);
4147
4402
  }
4148
- let C = 0;
4149
- for (const [N, F] of w.dataStore.entityIndex.byId){
4150
- if (j !== null && !j.has(N) || U.has(N)) continue;
4151
- const E = st(L, F.byteOffset, F.byteOffset + F.byteLength);
4152
- let g;
4153
- v === 0 && O.size === 0 ? g = E : g = this.remapEntityText(E, v, O);
4154
- const T = w.dataStore.schemaVersion || "IFC4";
4155
- if (ce(T, n)) {
4156
- const I = jt(g, T, n);
4403
+ let b = 0;
4404
+ for (const [S, F] of T.dataStore.entityIndex.byId){
4405
+ if (Y !== null && !Y.has(S) || v.has(S)) continue;
4406
+ const m = nt(x, F.byteOffset, F.byteOffset + F.byteLength);
4407
+ let _;
4408
+ $ === 0 && O.size === 0 ? _ = m : _ = this.remapEntityText(m, $, O);
4409
+ const w = T.dataStore.schemaVersion || "IFC4";
4410
+ if (de(w, n)) {
4411
+ const I = Xt(_, w, n);
4157
4412
  I !== null && i.push(I);
4158
- } else i.push(g);
4159
- C++, y++, C % m === 0 && (e && e({
4413
+ } else i.push(_);
4414
+ b++, y++, b % E === 0 && (e && e({
4160
4415
  phase: "entities",
4161
4416
  percent: o > 0 ? y / o * .85 : 0,
4162
4417
  entitiesProcessed: y,
4163
4418
  entitiesTotal: o,
4164
- currentModel: w.name
4419
+ currentModel: T.name
4165
4420
  }), await new Promise((I)=>setTimeout(I, 0)));
4166
4421
  }
4167
4422
  h = !1;
@@ -4171,31 +4426,31 @@ END-ISO-10303-21;
4171
4426
  percent: .9,
4172
4427
  entitiesProcessed: o,
4173
4428
  entitiesTotal: o
4174
- }), await new Promise((w)=>setTimeout(w, 0));
4175
- const b = Oe(s, i);
4429
+ }), await new Promise((T)=>setTimeout(T, 0));
4430
+ const C = Pe(s, i);
4176
4431
  return e && e({
4177
4432
  phase: "assembling",
4178
4433
  percent: 1,
4179
4434
  entitiesProcessed: o,
4180
4435
  entitiesTotal: o
4181
4436
  }), {
4182
- content: b,
4437
+ content: C,
4183
4438
  stats: {
4184
4439
  modelCount: this.models.length,
4185
4440
  totalEntityCount: i.length,
4186
- fileSize: b.byteLength
4441
+ fileSize: C.byteLength
4187
4442
  }
4188
4443
  };
4189
4444
  }
4190
4445
  remapEntityText(t, e, n) {
4191
- return t.replace(Jn, (s, i)=>{
4192
- const o = parseInt(i, 10), a = n.get(o);
4193
- return a !== void 0 ? `#${a}` : `#${o + e}`;
4446
+ return t.replace(ns, (s, i)=>{
4447
+ const o = parseInt(i, 10), c = n.get(o);
4448
+ return c !== void 0 ? `#${c}` : `#${o + e}`;
4194
4449
  });
4195
4450
  }
4196
4451
  findInfrastructureEntities(t) {
4197
4452
  const e = new Map;
4198
- for (const n of Kn){
4453
+ for (const n of ss){
4199
4454
  const s = t.entityIndex.byType.get(n) ?? [];
4200
4455
  s.length > 0 && e.set(n, [
4201
4456
  ...s
@@ -4243,11 +4498,11 @@ END-ISO-10303-21;
4243
4498
  let f;
4244
4499
  u && (f = e.sitesByName.get(u.toLowerCase())), f === void 0 && o.length === 1 && e.siteIds.length === 1 && (f = e.siteIds[0]), f !== void 0 && (s.set(d, f + n), i.add(d));
4245
4500
  }
4246
- const a = this.findEntitiesByType(t, "IFCBUILDING");
4247
- for (const d of a){
4501
+ const c = this.findEntitiesByType(t, "IFCBUILDING");
4502
+ for (const d of c){
4248
4503
  const u = this.extractEntityName(d, t);
4249
4504
  let f;
4250
- u && (f = e.buildingsByName.get(u.toLowerCase())), f === void 0 && a.length === 1 && e.buildingIds.length === 1 && (f = e.buildingIds[0]), f !== void 0 && (s.set(d, f + n), i.add(d));
4505
+ u && (f = e.buildingsByName.get(u.toLowerCase())), f === void 0 && c.length === 1 && e.buildingIds.length === 1 && (f = e.buildingIds[0]), f !== void 0 && (s.set(d, f + n), i.add(d));
4251
4506
  }
4252
4507
  const l = new Set;
4253
4508
  for (const d of this.findEntitiesByType(t, "IFCBUILDINGSTOREY")){
@@ -4259,11 +4514,11 @@ END-ISO-10303-21;
4259
4514
  }
4260
4515
  if (f === void 0) {
4261
4516
  const p = this.extractStoreyElevation(d, t);
4262
- if (p !== void 0) for (const _ of e.storeysByElevation){
4263
- if (l.has(_.expressId)) continue;
4264
- const h = Math.max(.5, Math.abs(_.elevation) * .01);
4265
- if (Math.abs(p - _.elevation) <= h) {
4266
- f = _.expressId;
4517
+ if (p !== void 0) for (const g of e.storeysByElevation){
4518
+ if (l.has(g.expressId)) continue;
4519
+ const h = Math.max(.5, Math.abs(g.elevation) * .01);
4520
+ if (Math.abs(p - g.elevation) <= h) {
4521
+ f = g.expressId;
4267
4522
  break;
4268
4523
  }
4269
4524
  }
@@ -4277,11 +4532,11 @@ END-ISO-10303-21;
4277
4532
  if (!i) continue;
4278
4533
  const o = i.match(/^#(\d+)$/);
4279
4534
  if (!o || !e.has(parseInt(o[1], 10))) continue;
4280
- const a = this.extractStepAttribute(s, t, 5);
4281
- if (!a) continue;
4535
+ const c = this.extractStepAttribute(s, t, 5);
4536
+ if (!c) continue;
4282
4537
  const l = [], d = /#(\d+)/g;
4283
4538
  let u;
4284
- for(; (u = d.exec(a)) !== null;)l.push(parseInt(u[1], 10));
4539
+ for(; (u = d.exec(c)) !== null;)l.push(parseInt(u[1], 10));
4285
4540
  l.length !== 0 && l.every((f)=>e.has(f)) && n.add(s);
4286
4541
  }
4287
4542
  }
@@ -4290,7 +4545,7 @@ END-ISO-10303-21;
4290
4545
  if (!n || n === "$") return null;
4291
4546
  if (n.startsWith("'") && n.endsWith("'")) {
4292
4547
  const s = n.slice(1, -1).replace(/''/g, "'");
4293
- return He(s);
4548
+ return Je(s);
4294
4549
  }
4295
4550
  return null;
4296
4551
  }
@@ -4305,24 +4560,24 @@ END-ISO-10303-21;
4305
4560
  if (!s) return null;
4306
4561
  const i = e.entityIndex.byId.get(t);
4307
4562
  if (!i) return null;
4308
- const o = st(s, i.byteOffset, i.byteOffset + i.byteLength), a = o.indexOf("(");
4309
- if (a === -1) return null;
4310
- let l = 0, d = 0, u = a + 1, f = !1;
4311
- for(let p = a + 1; p < o.length; p++){
4312
- const _ = o[p];
4313
- if (_ === "'" && !f) f = !0;
4314
- else if (_ === "'" && f) {
4563
+ const o = nt(s, i.byteOffset, i.byteOffset + i.byteLength), c = o.indexOf("(");
4564
+ if (c === -1) return null;
4565
+ let l = 0, d = 0, u = c + 1, f = !1;
4566
+ for(let p = c + 1; p < o.length; p++){
4567
+ const g = o[p];
4568
+ if (g === "'" && !f) f = !0;
4569
+ else if (g === "'" && f) {
4315
4570
  if (p + 1 < o.length && o[p + 1] === "'") {
4316
4571
  p++;
4317
4572
  continue;
4318
4573
  }
4319
4574
  f = !1;
4320
4575
  } else if (!f) {
4321
- if (_ === "(") l++;
4322
- else if (_ === ")") {
4576
+ if (g === "(") l++;
4577
+ else if (g === ")") {
4323
4578
  if (l === 0) return d === n ? o.substring(u, p).trim() : null;
4324
4579
  l--;
4325
- } else if (_ === "," && l === 0) {
4580
+ } else if (g === "," && l === 0) {
4326
4581
  if (d === n) return o.substring(u, p).trim();
4327
4582
  d++, u = p + 1;
4328
4583
  }
@@ -4331,28 +4586,28 @@ END-ISO-10303-21;
4331
4586
  return null;
4332
4587
  }
4333
4588
  };
4334
- function Oe(r, t) {
4589
+ function Pe(r, t) {
4335
4590
  const e = new TextEncoder, n = e.encode(`${r}DATA;
4336
4591
  `), s = e.encode(`ENDSEC;
4337
4592
  END-ISO-10303-21;
4338
4593
  `), i = e.encode(`
4339
4594
  `);
4340
4595
  let o = n.byteLength + s.byteLength;
4341
- const a = new Array(t.length);
4342
- for(let u = 0; u < t.length; u++)a[u] = e.encode(t[u]), o += a[u].byteLength + i.byteLength;
4596
+ const c = new Array(t.length);
4597
+ for(let u = 0; u < t.length; u++)c[u] = e.encode(t[u]), o += c[u].byteLength + i.byteLength;
4343
4598
  const l = new Uint8Array(o);
4344
4599
  let d = 0;
4345
4600
  l.set(n, d), d += n.byteLength;
4346
- for(let u = 0; u < a.length; u++)l.set(a[u], d), d += a[u].byteLength, l.set(i, d), d += i.byteLength;
4601
+ for(let u = 0; u < c.length; u++)l.set(c[u], d), d += c[u].byteLength, l.set(i, d), d += i.byteLength;
4347
4602
  return l.set(s, d), l;
4348
4603
  }
4349
- let Zt;
4350
- Zt = {
4604
+ let ee;
4605
+ ee = {
4351
4606
  IFC_CORE: "https://ifcx.dev/@standards.buildingsmart.org/ifc/core/ifc@v5a.ifcx",
4352
4607
  IFC_PROP: "https://ifcx.dev/@standards.buildingsmart.org/ifc/core/prop@v5a.ifcx",
4353
4608
  USD: "https://ifcx.dev/@openusd.org/usd@v1.ifcx"
4354
4609
  };
4355
- Le = new Set([
4610
+ Be = new Set([
4356
4611
  "UsageType",
4357
4612
  "TypeName",
4358
4613
  "IsExternal",
@@ -4371,7 +4626,7 @@ END-ISO-10303-21;
4371
4626
  "CrossSectionArea",
4372
4627
  "Station"
4373
4628
  ]);
4374
- cs = class {
4629
+ hs = class {
4375
4630
  dataStore;
4376
4631
  mutationView;
4377
4632
  geometryResult;
@@ -4387,58 +4642,58 @@ END-ISO-10303-21;
4387
4642
  const e = this.dataStore.schemaVersion || "IFC4";
4388
4643
  this.buildEntityMaps();
4389
4644
  const n = this.buildMeshLookup(t), s = this.buildVisibleSet(t), i = t.onlyTreeEntities !== !1 ? this.buildTreeEntitySet() : null, o = [];
4390
- let a = 0, l = 0;
4645
+ let c = 0, l = 0;
4391
4646
  const { entities: d, strings: u } = this.dataStore;
4392
4647
  let f = null;
4393
4648
  for(let y = 0; y < d.count; y++){
4394
- const m = d.expressId[y];
4395
- if (s && !s.has(m) || i && !i.has(m)) continue;
4396
- const b = d.typeEnum[y], w = ne(b) || "IfcElement", v = De(w.toUpperCase(), e, "IFC5"), L = ts(v);
4397
- L === "IfcProject" && (f = m);
4398
- const j = this.entityUuids.get(m) || te(m), O = {};
4649
+ const E = d.expressId[y];
4650
+ if (s && !s.has(E) || i && !i.has(E)) continue;
4651
+ const C = d.typeEnum[y], T = ie(C) || "IfcElement", $ = Ve(T.toUpperCase(), e, "IFC5"), x = rs($);
4652
+ x === "IfcProject" && (f = E);
4653
+ const Y = this.entityUuids.get(E) || ne(E), O = {};
4399
4654
  O["bsi::ifc::class"] = {
4400
- code: L,
4401
- uri: `https://identifier.buildingsmart.org/uri/buildingsmart/ifc/5/class/${L}`
4655
+ code: x,
4656
+ uri: `https://identifier.buildingsmart.org/uri/buildingsmart/ifc/5/class/${x}`
4402
4657
  };
4403
- const U = u.get(d.name[y]) || this.spatialNodeNames.get(m);
4404
- U && (O["bsi::ifc::prop::Name"] = U);
4405
- const C = u.get(d.description[y]);
4406
- if (C && (O["bsi::ifc::prop::Description"] = C), t.includeProperties !== !1) {
4407
- const E = this.getPropertiesForEntity(m, t);
4408
- for (const [g, T] of Object.entries(E))O[g] = T, a++;
4658
+ const v = u.get(d.name[y]) || this.spatialNodeNames.get(E);
4659
+ v && (O["bsi::ifc::prop::Name"] = v);
4660
+ const b = u.get(d.description[y]);
4661
+ if (b && (O["bsi::ifc::prop::Description"] = b), t.includeProperties !== !1) {
4662
+ const m = this.getPropertiesForEntity(E, t);
4663
+ for (const [_, w] of Object.entries(m))O[_] = w, c++;
4409
4664
  }
4410
- const N = {
4411
- path: j
4412
- }, F = this.getChildrenForEntity(m);
4413
- if (Object.keys(F).length > 0 && (N.children = F), t.includeGeometry !== !1) {
4414
- const E = n.get(m);
4415
- if (E && E.length > 0) {
4416
- const g = this.convertToUsdMesh(E);
4417
- O["usd::usdgeom::mesh"] = g;
4418
- const [T, I, R, S] = E[0].color;
4665
+ const S = {
4666
+ path: Y
4667
+ }, F = this.getChildrenForEntity(E);
4668
+ if (Object.keys(F).length > 0 && (S.children = F), t.includeGeometry !== !1) {
4669
+ const m = n.get(E);
4670
+ if (m && m.length > 0) {
4671
+ const _ = this.convertToUsdMesh(m);
4672
+ O["usd::usdgeom::mesh"] = _;
4673
+ const [w, I, R, N] = m[0].color;
4419
4674
  O["bsi::ifc::presentation::diffuseColor"] = [
4420
- T,
4675
+ w,
4421
4676
  I,
4422
4677
  R
4423
- ], S < 1 && (O["bsi::ifc::presentation::opacity"] = S), l++;
4678
+ ], N < 1 && (O["bsi::ifc::presentation::opacity"] = N), l++;
4424
4679
  }
4425
4680
  }
4426
- Object.keys(O).length > 0 && (N.attributes = O), o.push(N);
4681
+ Object.keys(O).length > 0 && (S.attributes = O), o.push(S);
4427
4682
  }
4428
4683
  if (f !== null) {
4429
4684
  const y = this.entityUuids.get(f);
4430
4685
  if (y) {
4431
- const m = this.childNames.get(f) || u.get(d.name[this.findEntityIndex(f)]) || "Project", b = te(0);
4686
+ const E = this.childNames.get(f) || u.get(d.name[this.findEntityIndex(f)]) || "Project", C = ne(0);
4432
4687
  o.unshift({
4433
- path: b,
4688
+ path: C,
4434
4689
  children: {
4435
- [m]: y
4690
+ [E]: y
4436
4691
  },
4437
4692
  attributes: {}
4438
4693
  });
4439
4694
  }
4440
4695
  }
4441
- const p = Zn(o), _ = {
4696
+ const p = is(o), g = {
4442
4697
  header: {
4443
4698
  id: `ifcx_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
4444
4699
  ifcxVersion: "ifcx_alpha",
@@ -4449,12 +4704,12 @@ END-ISO-10303-21;
4449
4704
  imports: p,
4450
4705
  schemas: {},
4451
4706
  data: o
4452
- }, h = t.prettyPrint !== !1 ? JSON.stringify(_, null, 2) : JSON.stringify(_);
4707
+ }, h = t.prettyPrint !== !1 ? JSON.stringify(g, null, 2) : JSON.stringify(g);
4453
4708
  return {
4454
4709
  content: h,
4455
4710
  stats: {
4456
4711
  nodeCount: o.length,
4457
- propertyCount: a,
4712
+ propertyCount: c,
4458
4713
  meshCount: l,
4459
4714
  fileSize: new TextEncoder().encode(h).length
4460
4715
  }
@@ -4470,7 +4725,7 @@ END-ISO-10303-21;
4470
4725
  this.entityUuids.clear();
4471
4726
  for(let l = 0; l < e.count; l++){
4472
4727
  const d = e.expressId[l], u = n.get(e.globalId[l]);
4473
- this.entityUuids.set(d, u || te(d));
4728
+ this.entityUuids.set(d, u || ne(d));
4474
4729
  }
4475
4730
  const s = new Map, i = (l, d)=>{
4476
4731
  if (d) for (const u of d)s.set(u, l);
@@ -4497,19 +4752,19 @@ END-ISO-10303-21;
4497
4752
  const d = e.expressId[l];
4498
4753
  let u = n.get(e.name[l]) || "";
4499
4754
  if (u || (u = this.spatialNodeNames.get(d) || ""), !u) {
4500
- const f = ne(e.typeEnum[l]);
4755
+ const f = ie(e.typeEnum[l]);
4501
4756
  f !== "Unknown" && (u = f);
4502
4757
  }
4503
4758
  o.set(d, u);
4504
4759
  }
4505
- const a = new Map;
4506
- for (const [l, d] of s)a.has(d) || a.set(d, []), a.get(d).push(l);
4760
+ const c = new Map;
4761
+ for (const [l, d] of s)c.has(d) || c.set(d, []), c.get(d).push(l);
4507
4762
  for(let l = 0; l < e.count; l++){
4508
4763
  const d = e.expressId[l];
4509
- s.has(d) || (a.has(void 0) || a.set(void 0, []), a.get(void 0).push(d));
4764
+ s.has(d) || (c.has(void 0) || c.set(void 0, []), c.get(void 0).push(d));
4510
4765
  }
4511
4766
  this.childNames.clear();
4512
- for (const [, l] of a){
4767
+ for (const [, l] of c){
4513
4768
  const d = new Map;
4514
4769
  for (const u of l){
4515
4770
  const p = (o.get(u) || `e${u}`).replace(/[/\\]/g, "_").replace(/\s+/g, "_");
@@ -4526,16 +4781,16 @@ END-ISO-10303-21;
4526
4781
  if (this.mutationView && e.applyMutations !== !1) {
4527
4782
  const s = this.mutationView.getForEntity(t);
4528
4783
  for (const i of s)for (const o of i.properties){
4529
- if (e.onlyKnownProperties !== !1 && !Le.has(o.name)) continue;
4530
- const a = `bsi::ifc::prop::${o.name}`;
4531
- n[a] = this.convertPropertyValue(o.value, o.type);
4784
+ if (e.onlyKnownProperties !== !1 && !Be.has(o.name)) continue;
4785
+ const c = `bsi::ifc::prop::${o.name}`;
4786
+ n[c] = this.convertPropertyValue(o.value, o.type);
4532
4787
  }
4533
4788
  } else if (this.dataStore.properties) {
4534
4789
  const s = this.dataStore.properties.getForEntity(t);
4535
4790
  for (const i of s)for (const o of i.properties){
4536
- if (e.onlyKnownProperties !== !1 && !Le.has(o.name)) continue;
4537
- const a = `bsi::ifc::prop::${o.name}`;
4538
- n[a] = this.convertPropertyValue(o.value, o.type);
4791
+ if (e.onlyKnownProperties !== !1 && !Be.has(o.name)) continue;
4792
+ const c = `bsi::ifc::prop::${o.name}`;
4793
+ n[c] = this.convertPropertyValue(o.value, o.type);
4539
4794
  }
4540
4795
  }
4541
4796
  return n;
@@ -4543,12 +4798,12 @@ END-ISO-10303-21;
4543
4798
  convertPropertyValue(t, e) {
4544
4799
  if (t == null) return null;
4545
4800
  switch(e){
4546
- case tt.Real:
4801
+ case et.Real:
4547
4802
  return Number(t);
4548
- case tt.Integer:
4803
+ case et.Integer:
4549
4804
  return Math.round(Number(t));
4550
- case tt.Boolean:
4551
- case tt.Logical:
4805
+ case et.Boolean:
4806
+ case et.Logical:
4552
4807
  return !!t;
4553
4808
  default:
4554
4809
  return t;
@@ -4556,10 +4811,10 @@ END-ISO-10303-21;
4556
4811
  }
4557
4812
  getChildrenForEntity(t) {
4558
4813
  const e = {}, n = (o)=>{
4559
- const a = this.entityUuids.get(o);
4560
- if (!a) return;
4814
+ const c = this.entityUuids.get(o);
4815
+ if (!c) return;
4561
4816
  const l = this.childNames.get(o) || `e${o}`;
4562
- e[l] = a;
4817
+ e[l] = c;
4563
4818
  }, s = this.spatialChildIds.get(t);
4564
4819
  if (s) for (const o of s)n(o);
4565
4820
  const { spatialHierarchy: i } = this.dataStore;
@@ -4570,7 +4825,7 @@ END-ISO-10303-21;
4570
4825
  i.byStorey?.get(t),
4571
4826
  i.bySpace?.get(t)
4572
4827
  ];
4573
- for (const a of o)if (a) for (const l of a)n(l);
4828
+ for (const c of o)if (c) for (const l of c)n(l);
4574
4829
  }
4575
4830
  return e;
4576
4831
  }
@@ -4588,9 +4843,9 @@ END-ISO-10303-21;
4588
4843
  let s = 0;
4589
4844
  for (const i of t){
4590
4845
  for(let o = 0; o < i.positions.length; o += 3){
4591
- const a = i.positions[o], l = i.positions[o + 1], d = i.positions[o + 2];
4846
+ const c = i.positions[o], l = i.positions[o + 1], d = i.positions[o + 2];
4592
4847
  e.push([
4593
- a,
4848
+ c,
4594
4849
  -d,
4595
4850
  l
4596
4851
  ]);
@@ -4626,13 +4881,13 @@ END-ISO-10303-21;
4626
4881
  if (!t.visibleOnly) return null;
4627
4882
  const e = t.hiddenEntityIds ?? new Set, n = t.isolatedEntityIds ?? null, s = new Set, { entities: i } = this.dataStore;
4628
4883
  for(let o = 0; o < i.count; o++){
4629
- const a = i.expressId[o];
4630
- n ? n.has(a) && s.add(a) : e.has(a) || s.add(a);
4884
+ const c = i.expressId[o];
4885
+ n ? n.has(c) && s.add(c) : e.has(c) || s.add(c);
4631
4886
  }
4632
4887
  return s;
4633
4888
  }
4634
4889
  };
4635
- function Zn(r) {
4890
+ function is(r) {
4636
4891
  let t = !1, e = !1, n = !1;
4637
4892
  for (const i of r)if (i.attributes) {
4638
4893
  for (const o of Object.keys(i.attributes))if (!t && (o === "bsi::ifc::class" || o.startsWith("bsi::ifc::presentation::") || o === "bsi::ifc::material" || o === "bsi::ifc::spaceBoundary") && (t = !0), !e && o.startsWith("bsi::ifc::prop::") && (e = !0), !n && o.startsWith("usd::") && (n = !0), t && e && n) break;
@@ -4640,21 +4895,21 @@ END-ISO-10303-21;
4640
4895
  }
4641
4896
  const s = [];
4642
4897
  return t && s.push({
4643
- uri: Zt.IFC_CORE
4898
+ uri: ee.IFC_CORE
4644
4899
  }), e && s.push({
4645
- uri: Zt.IFC_PROP
4900
+ uri: ee.IFC_PROP
4646
4901
  }), n && s.push({
4647
- uri: Zt.USD
4902
+ uri: ee.USD
4648
4903
  }), s;
4649
4904
  }
4650
- function te(r) {
4905
+ function ne(r) {
4651
4906
  return `00000000-0000-4000-8000-${r.toString(16).padStart(12, "0")}`;
4652
4907
  }
4653
- function ts(r) {
4654
- const t = Xe(r), e = ne(t);
4908
+ function rs(r) {
4909
+ const t = Ke(r), e = ie(t);
4655
4910
  if (e !== "Unknown") return e;
4656
4911
  const n = r.toLowerCase();
4657
4912
  return n.startsWith("ifc") ? "Ifc" + n.charAt(3).toUpperCase() + n.slice(4) : r;
4658
4913
  }
4659
4914
  });
4660
- export { rs as C, is as G, Le as I, as as M, qn as S, Pe as _, ss as a, In as b, cs as c, ie as d, os as e, ns as g, __tla };
4915
+ export { ds as C, ls as G, Be as I, us as M, ts as S, Ge as _, cs as a, En as b, hs as c, oe as d, fs as e, as as g, __tla };