@ifc-lite/viewer 1.22.1 → 1.23.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 (33) hide show
  1. package/.turbo/turbo-build.log +30 -30
  2. package/CHANGELOG.md +50 -0
  3. package/dist/assets/{basketViewActivator--cFpU2Q9.js → basketViewActivator-Dn_bHUl2.js} +6 -6
  4. package/dist/assets/{bcf-Ba2CjHib.js → bcf-B9SFl84i.js} +1 -1
  5. package/dist/assets/{deflate-DCLbV4UE.js → deflate-yMpdCIqk.js} +1 -1
  6. package/dist/assets/{exporters-Bf6PTtdW.js → exporters-D-BvrNIg.js} +1178 -1147
  7. package/dist/assets/{geometry-controller.worker-CEr00X3X.js → geometry-controller.worker-Cm5pvyR6.js} +2 -2
  8. package/dist/assets/geometry.worker-ClNvXIrj.js +1 -0
  9. package/dist/assets/{geotiff-BN4J8Vt9.js → geotiff-D1tvcDCb.js} +10 -10
  10. package/dist/assets/{ids-XwxE1tK3.js → ids-DZLs0snJ.js} +3 -3
  11. package/dist/assets/{ifc-lite-DNzkEkIb.js → ifc-lite-BDg0iIbj.js} +2 -2
  12. package/dist/assets/{ifc-lite_bg-1IiJN0Zg.wasm → ifc-lite_bg-BIryVCXQ.wasm} +0 -0
  13. package/dist/assets/{ifc-lite_bg-B_eUD1Wy.wasm → ifc-lite_bg-DyHX37GQ.wasm} +0 -0
  14. package/dist/assets/{index-j2x5R7fb.js → index-CXSBhkcJ.js} +20564 -20159
  15. package/dist/assets/{jpeg-BUTmr0Bp.js → jpeg-DUMcZp24.js} +1 -1
  16. package/dist/assets/{lerc-DmzRHXn3.js → lerc-IN4uWojP.js} +1 -1
  17. package/dist/assets/{lzw-CgyIIzii.js → lzw-Cnw0hH-m.js} +1 -1
  18. package/dist/assets/{native-bridge-Q5ACp4QY.js → native-bridge-BVf2uzoH.js} +1 -1
  19. package/dist/assets/{packbits-C1r4AzHj.js → packbits-BskJCwk0.js} +1 -1
  20. package/dist/assets/{parser.worker-Cl6XQcXA.js → parser.worker-BdtkkaGf.js} +3 -3
  21. package/dist/assets/raw-DzTtEZIY.js +1 -0
  22. package/dist/assets/{sandbox-Bju6ZKJK.js → sandbox-VLI_y7cl.js} +2 -2
  23. package/dist/assets/{server-client-B8wi3CGx.js → server-client-BLcKaWQB.js} +1 -1
  24. package/dist/assets/{wasm-bridge-X-mWRA9Z.js → wasm-bridge-BAfZh7YT.js} +1 -1
  25. package/dist/assets/{webimage-D0MbRMkU.js → webimage-Db2xzze3.js} +1 -1
  26. package/dist/assets/{workerHelpers-DnNedVRr.js → workerHelpers--sAYm9yN.js} +1 -1
  27. package/dist/assets/{zstd-DA4VQ-ji.js → zstd-BDToOQyD.js} +1 -1
  28. package/dist/index.html +6 -6
  29. package/package.json +7 -7
  30. package/src/components/viewer/GLBExportDialog.tsx +389 -0
  31. package/src/components/viewer/MainToolbar.tsx +17 -25
  32. package/dist/assets/geometry.worker-B4VPDkmL.js +0 -1
  33. package/dist/assets/raw-ZqLh7kVQ.js +0 -1
@@ -0,0 +1,389 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+
5
+ /**
6
+ * Export Dialog for GLB (binary glTF) export.
7
+ *
8
+ * v1 surface: model picker (single-model only — merged export deferred),
9
+ * colour source (Rendering vs Shading), visible-only filter, include
10
+ * metadata toggle. Other knobs Dion flagged (PBR reflectance, embed-
11
+ * transparency, default material picker, coordinate origin, apply
12
+ * mutations) are intentionally absent here and tracked separately.
13
+ */
14
+
15
+ import { useState, useCallback, useMemo, useEffect } from 'react';
16
+ import { Download, AlertCircle, Check, Loader2 } from 'lucide-react';
17
+ import { Button } from '@/components/ui/button';
18
+ import { Label } from '@/components/ui/label';
19
+ import { Switch } from '@/components/ui/switch';
20
+ import { Badge } from '@/components/ui/badge';
21
+ import {
22
+ Select,
23
+ SelectContent,
24
+ SelectItem,
25
+ SelectTrigger,
26
+ SelectValue,
27
+ } from '@/components/ui/select';
28
+ import {
29
+ Dialog,
30
+ DialogContent,
31
+ DialogDescription,
32
+ DialogFooter,
33
+ DialogHeader,
34
+ DialogTitle,
35
+ DialogTrigger,
36
+ } from '@/components/ui/dialog';
37
+ import {
38
+ Alert,
39
+ AlertDescription,
40
+ AlertTitle,
41
+ } from '@/components/ui/alert';
42
+ import { useViewerStore } from '@/store';
43
+ import { toast } from '@/components/ui/toast';
44
+ import { GLTFExporter } from '@ifc-lite/export';
45
+
46
+ type ColorSource = 'rendering' | 'shading';
47
+
48
+ /**
49
+ * Translate the viewer's `typeVisibility` toggles into the set of IFC class
50
+ * names the GLB exporter should drop on a visible-only export. Mirrors the
51
+ * gating in `basketVisibleSet.ts` and `ViewportContainer.tsx` so the export
52
+ * matches what the user sees in the viewport.
53
+ */
54
+ function buildHiddenIfcTypes(
55
+ typeVisibility: { spaces: boolean; openings: boolean; site: boolean },
56
+ ): Set<string> {
57
+ const out = new Set<string>();
58
+ if (!typeVisibility.spaces) out.add('IfcSpace');
59
+ if (!typeVisibility.openings) out.add('IfcOpeningElement');
60
+ if (!typeVisibility.site) out.add('IfcSite');
61
+ return out;
62
+ }
63
+
64
+ interface GLBExportDialogProps {
65
+ trigger?: React.ReactNode;
66
+ }
67
+
68
+ export function GLBExportDialog({ trigger }: GLBExportDialogProps) {
69
+ const models = useViewerStore((s) => s.models);
70
+ const hiddenEntities = useViewerStore((s) => s.hiddenEntities);
71
+ const isolatedEntities = useViewerStore((s) => s.isolatedEntities);
72
+ const hiddenEntitiesByModel = useViewerStore((s) => s.hiddenEntitiesByModel);
73
+ const isolatedEntitiesByModel = useViewerStore((s) => s.isolatedEntitiesByModel);
74
+ // Class-level visibility (IfcSpace / IfcOpeningElement / IfcSite) — these
75
+ // are off by default and live OUTSIDE the per-entity hidden set, so a
76
+ // visible-only export that only checks `hiddenEntities` would still ship
77
+ // openings the user never rendered (issue surfaced on the Revit door
78
+ // fixture where IfcOpeningElement #2438 leaked through).
79
+ const typeVisibility = useViewerStore((s) => s.typeVisibility);
80
+ // Legacy single-model fallback so this dialog works before any
81
+ // FederatedModel is registered (the common case for v1 users). Only
82
+ // the geometryResult is needed — GLB export doesn't read the parsed
83
+ // STEP store.
84
+ const legacyGeometryResult = useViewerStore((s) => s.geometryResult);
85
+
86
+ const [open, setOpen] = useState(false);
87
+ const [selectedModelId, setSelectedModelId] = useState<string>('');
88
+ const [colorSource, setColorSource] = useState<ColorSource>('rendering');
89
+ const [visibleOnly, setVisibleOnly] = useState(false);
90
+ const [includeMetadata, setIncludeMetadata] = useState(true);
91
+ const [isExporting, setIsExporting] = useState(false);
92
+ const [exportResult, setExportResult] = useState<{ success: boolean; message: string } | null>(null);
93
+
94
+ // Model list: federated models first, falling back to the legacy single
95
+ // model when nothing is registered. Mirrors ExportDialog.
96
+ const modelList = useMemo(() => {
97
+ const list = Array.from(models.values()).map((m) => ({
98
+ id: m.id,
99
+ name: m.name,
100
+ geometryResult: m.geometryResult,
101
+ }));
102
+
103
+ if (list.length === 0 && legacyGeometryResult) {
104
+ list.push({
105
+ id: '__legacy__',
106
+ name: 'Current Model',
107
+ geometryResult: legacyGeometryResult,
108
+ });
109
+ }
110
+
111
+ return list;
112
+ }, [models, legacyGeometryResult]);
113
+
114
+ // Default to the first model in the list whenever the menu opens.
115
+ useEffect(() => {
116
+ if (modelList.length > 0 && !selectedModelId) {
117
+ setSelectedModelId(modelList[0].id);
118
+ }
119
+ }, [modelList, selectedModelId]);
120
+
121
+ const selectedModel = useMemo(() => {
122
+ if (selectedModelId === '__legacy__' && legacyGeometryResult) {
123
+ return {
124
+ id: '__legacy__',
125
+ name: 'Current Model',
126
+ geometryResult: legacyGeometryResult,
127
+ };
128
+ }
129
+ return modelList.find((m) => m.id === selectedModelId);
130
+ }, [modelList, selectedModelId, legacyGeometryResult]);
131
+
132
+ /**
133
+ * Build the hidden / isolation sets in **global** ID space.
134
+ *
135
+ * `MeshData.expressId` carries the federated global ID (`local +
136
+ * idOffset`, see `store/types.ts:365`), and the legacy / global store
137
+ * sets (`hiddenEntities`, `isolatedEntities`) are also global —
138
+ * `basketVisibleSet.ts:405-412` is the canonical reference for which
139
+ * set lives in which space. Only the per-model `*ByModel` Maps store
140
+ * raw local IDs, so those need an offset added before they can match
141
+ * a mesh expressId. This is the opposite shape from the STEP exporter
142
+ * (which works in local entity space), so don't reuse ExportDialog's
143
+ * helpers here.
144
+ */
145
+ const getGlobalHiddenIds = useCallback((modelId: string): Set<number> => {
146
+ if (modelId === '__legacy__') return hiddenEntities;
147
+
148
+ const model = models.get(modelId);
149
+ if (!model) return new Set();
150
+ const offset = model.idOffset ?? 0;
151
+
152
+ const out = new Set<number>();
153
+ // Global IDs from the legacy / global store — already global, just
154
+ // restrict to this model's range so we don't carry over hidden IDs
155
+ // that belong to sibling federated models.
156
+ for (const globalId of hiddenEntities) {
157
+ const localId = globalId - offset;
158
+ if (localId > 0 && localId <= model.maxExpressId) {
159
+ out.add(globalId);
160
+ }
161
+ }
162
+ // Per-model entries are LOCAL IDs — convert to global.
163
+ const modelHidden = hiddenEntitiesByModel.get(modelId);
164
+ if (modelHidden) {
165
+ for (const localId of modelHidden) {
166
+ out.add(localId + offset);
167
+ }
168
+ }
169
+ return out;
170
+ }, [models, hiddenEntities, hiddenEntitiesByModel]);
171
+
172
+ const getGlobalIsolatedIds = useCallback((modelId: string): Set<number> | null => {
173
+ if (modelId === '__legacy__') return isolatedEntities;
174
+
175
+ const model = models.get(modelId);
176
+ if (!model) return null;
177
+ const offset = model.idOffset ?? 0;
178
+
179
+ const out = new Set<number>();
180
+ if (isolatedEntities) {
181
+ for (const globalId of isolatedEntities) {
182
+ const localId = globalId - offset;
183
+ if (localId > 0 && localId <= model.maxExpressId) {
184
+ out.add(globalId);
185
+ }
186
+ }
187
+ }
188
+ const modelIsolated = isolatedEntitiesByModel.get(modelId);
189
+ if (modelIsolated) {
190
+ for (const localId of modelIsolated) {
191
+ out.add(localId + offset);
192
+ }
193
+ }
194
+ return out.size > 0 ? out : null;
195
+ }, [models, isolatedEntities, isolatedEntitiesByModel]);
196
+
197
+ const handleExport = useCallback(() => {
198
+ if (!selectedModel?.geometryResult) return;
199
+
200
+ setIsExporting(true);
201
+ setExportResult(null);
202
+
203
+ try {
204
+ const exporter = new GLTFExporter(selectedModel.geometryResult);
205
+ const globalHidden = visibleOnly ? getGlobalHiddenIds(selectedModelId) : undefined;
206
+ const globalIsolated = visibleOnly ? getGlobalIsolatedIds(selectedModelId) : undefined;
207
+ const hiddenIfcTypes = visibleOnly ? buildHiddenIfcTypes(typeVisibility) : undefined;
208
+
209
+ const glb = exporter.exportGLB({
210
+ includeMetadata,
211
+ colorSource,
212
+ visibleOnly,
213
+ hiddenEntityIds: globalHidden,
214
+ isolatedEntityIds: globalIsolated,
215
+ hiddenIfcTypes,
216
+ });
217
+
218
+ const blob = new Blob([new Uint8Array(glb)], { type: 'model/gltf-binary' });
219
+ const url = URL.createObjectURL(blob);
220
+ const a = document.createElement('a');
221
+ a.href = url;
222
+ const baseName = selectedModel.name.replace(/\.[^.]+$/, '');
223
+ const suffix = visibleOnly ? '_visible' : '';
224
+ a.download = `${baseName}${suffix}.glb`;
225
+ document.body.appendChild(a);
226
+ a.click();
227
+ document.body.removeChild(a);
228
+ URL.revokeObjectURL(url);
229
+
230
+ const msg = `Exported GLB (${(blob.size / 1024).toFixed(0)} KB)`;
231
+ setExportResult({ success: true, message: msg });
232
+ toast.success(msg);
233
+ } catch (err) {
234
+ console.error('Export failed:', err);
235
+ const errMsg = `GLB export failed: ${err instanceof Error ? err.message : 'Unknown error'}`;
236
+ setExportResult({ success: false, message: errMsg });
237
+ toast.error(errMsg);
238
+ } finally {
239
+ setIsExporting(false);
240
+ }
241
+ }, [
242
+ selectedModel,
243
+ selectedModelId,
244
+ includeMetadata,
245
+ colorSource,
246
+ visibleOnly,
247
+ getGlobalHiddenIds,
248
+ getGlobalIsolatedIds,
249
+ ]);
250
+
251
+ return (
252
+ <Dialog open={open} onOpenChange={setOpen}>
253
+ <DialogTrigger asChild>
254
+ {trigger || (
255
+ <Button variant="outline" size="sm">
256
+ <Download className="h-4 w-4 mr-2" />
257
+ Export GLB
258
+ </Button>
259
+ )}
260
+ </DialogTrigger>
261
+ <DialogContent className="sm:max-w-md overflow-hidden">
262
+ <DialogHeader>
263
+ <DialogTitle className="flex items-center gap-2">
264
+ <Download className="h-5 w-5" />
265
+ Export GLB File
266
+ </DialogTitle>
267
+ <DialogDescription>
268
+ Export the 3D model as binary glTF for use in other viewers and renderers
269
+ </DialogDescription>
270
+ </DialogHeader>
271
+
272
+ <div className="grid gap-4 py-4 max-h-[60vh] overflow-y-auto">
273
+ {/* Model selector — only shown when multiple are loaded */}
274
+ {modelList.length > 1 && (
275
+ <div className="flex items-center gap-4">
276
+ <Label className="w-32">Model</Label>
277
+ <Select value={selectedModelId} onValueChange={setSelectedModelId}>
278
+ <SelectTrigger>
279
+ <SelectValue placeholder="Select model" />
280
+ </SelectTrigger>
281
+ <SelectContent>
282
+ {modelList.map((m) => {
283
+ const maxLen = 24;
284
+ const displayName =
285
+ m.name.length > maxLen ? m.name.slice(0, maxLen) + '…' : m.name;
286
+ return (
287
+ <SelectItem key={m.id} value={m.id} title={m.name}>
288
+ {displayName}
289
+ </SelectItem>
290
+ );
291
+ })}
292
+ </SelectContent>
293
+ </Select>
294
+ </div>
295
+ )}
296
+
297
+ {/* Colour source */}
298
+ <div className="flex items-start gap-4">
299
+ <div className="w-32 pt-2">
300
+ <Label>Colour Source</Label>
301
+ </div>
302
+ <div className="flex-1 space-y-2">
303
+ <Select
304
+ value={colorSource}
305
+ onValueChange={(v) => setColorSource(v as ColorSource)}
306
+ >
307
+ <SelectTrigger>
308
+ <SelectValue />
309
+ </SelectTrigger>
310
+ <SelectContent>
311
+ <SelectItem value="rendering">Rendering (apparent colour)</SelectItem>
312
+ <SelectItem value="shading">Shading (SurfaceColour)</SelectItem>
313
+ </SelectContent>
314
+ </Select>
315
+ <p className="text-xs text-muted-foreground">
316
+ {colorSource === 'rendering'
317
+ ? 'Uses IfcSurfaceStyleRendering.DiffuseColour when authored, otherwise SurfaceColour. Matches most IFC viewers.'
318
+ : 'Uses the base SurfaceColour. Falls back to the rendering colour when no distinct DiffuseColour was authored.'}
319
+ </p>
320
+ </div>
321
+ </div>
322
+
323
+ {/* Output format indicator */}
324
+ <div className="flex items-center gap-4">
325
+ <Label className="w-32 text-muted-foreground">Output</Label>
326
+ <Badge variant="secondary">glTF Binary</Badge>
327
+ <span className="text-xs text-muted-foreground">.glb</span>
328
+ </div>
329
+
330
+ {/* Visible only */}
331
+ <div className="flex items-center justify-between">
332
+ <div>
333
+ <Label>Export Visible Only</Label>
334
+ <p className="text-xs text-muted-foreground">
335
+ Skip entities currently hidden or outside the isolation set
336
+ </p>
337
+ </div>
338
+ <Switch checked={visibleOnly} onCheckedChange={setVisibleOnly} />
339
+ </div>
340
+
341
+ {/* Include metadata */}
342
+ <div className="flex items-center justify-between">
343
+ <div>
344
+ <Label>Include Metadata</Label>
345
+ <p className="text-xs text-muted-foreground">
346
+ Embed expressId / modelIndex on each node and totals on the asset
347
+ </p>
348
+ </div>
349
+ <Switch checked={includeMetadata} onCheckedChange={setIncludeMetadata} />
350
+ </div>
351
+
352
+ {exportResult && (
353
+ <Alert variant={exportResult.success ? 'default' : 'destructive'}>
354
+ {exportResult.success ? (
355
+ <Check className="h-4 w-4" />
356
+ ) : (
357
+ <AlertCircle className="h-4 w-4" />
358
+ )}
359
+ <AlertTitle>{exportResult.success ? 'Success' : 'Error'}</AlertTitle>
360
+ <AlertDescription>{exportResult.message}</AlertDescription>
361
+ </Alert>
362
+ )}
363
+ </div>
364
+
365
+ <DialogFooter>
366
+ <Button variant="outline" onClick={() => setOpen(false)}>
367
+ Cancel
368
+ </Button>
369
+ <Button
370
+ onClick={handleExport}
371
+ disabled={isExporting || !selectedModel?.geometryResult}
372
+ >
373
+ {isExporting ? (
374
+ <>
375
+ <Loader2 className="h-4 w-4 mr-2 animate-spin" />
376
+ Exporting...
377
+ </>
378
+ ) : (
379
+ <>
380
+ <Download className="h-4 w-4 mr-2" />
381
+ Export
382
+ </>
383
+ )}
384
+ </Button>
385
+ </DialogFooter>
386
+ </DialogContent>
387
+ </Dialog>
388
+ );
389
+ }
@@ -73,9 +73,10 @@ import { goHomeFromStore, resetVisibilityForHomeFromStore } from '@/store/homeVi
73
73
  import { executeBasketIsolate } from '@/store/basket/basketCommands';
74
74
  import { useIfc } from '@/hooks/useIfc';
75
75
  import { cn } from '@/lib/utils';
76
- import { GLTFExporter, CSVExporter } from '@ifc-lite/export';
76
+ import { CSVExporter } from '@ifc-lite/export';
77
77
  import { FileSpreadsheet, FileJson, FileText, Filter, Upload, Pencil } from 'lucide-react';
78
78
  import { ExportDialog } from './ExportDialog';
79
+ import { GLBExportDialog } from './GLBExportDialog';
79
80
  import { BulkPropertyEditor } from './BulkPropertyEditor';
80
81
  import { DataConnector } from './DataConnector';
81
82
  import { ExportChangesButton } from './ExportChangesButton';
@@ -891,26 +892,6 @@ export function MainToolbar({ onShowShortcuts }: MainToolbarProps = {} as MainTo
891
892
  return activeAnalysisExtension?.label ?? 'Analysis';
892
893
  }, [activeAnalysisExtension?.label, activeWorkspacePanels]);
893
894
 
894
- const handleExportGLB = useCallback(() => {
895
- if (!requireDesktopFeature('exports', 'Exports')) return;
896
- if (!geometryResult) return;
897
- try {
898
- const exporter = new GLTFExporter(geometryResult);
899
- const glb = exporter.exportGLB({ includeMetadata: true });
900
- const blob = new Blob([new Uint8Array(glb)], { type: 'model/gltf-binary' });
901
- const url = URL.createObjectURL(blob);
902
- const a = document.createElement('a');
903
- a.href = url;
904
- a.download = 'model.glb';
905
- a.click();
906
- URL.revokeObjectURL(url);
907
- toast.success(`Exported GLB (${(blob.size / 1024).toFixed(0)} KB)`);
908
- } catch (err) {
909
- console.error('Export failed:', err);
910
- toast.error(`GLB export failed: ${err instanceof Error ? err.message : 'Unknown error'}`);
911
- }
912
- }, [geometryResult, requireDesktopFeature]);
913
-
914
895
  const handleScreenshot = useCallback(() => {
915
896
  if (!requireDesktopFeature('exports', 'Exports')) return;
916
897
  const canvas = document.querySelector('canvas');
@@ -1103,10 +1084,21 @@ export function MainToolbar({ onShowShortcuts }: MainToolbarProps = {} as MainTo
1103
1084
  </DropdownMenuItem>
1104
1085
  )}
1105
1086
  <DropdownMenuSeparator />
1106
- <DropdownMenuItem onClick={handleExportGLB}>
1107
- <Download className="h-4 w-4 mr-2" />
1108
- Export GLB (3D Model)
1109
- </DropdownMenuItem>
1087
+ {hasDesktopFeatureAccess(desktopEntitlement, 'exports') ? (
1088
+ <GLBExportDialog
1089
+ trigger={
1090
+ <DropdownMenuItem onSelect={(e) => e.preventDefault()}>
1091
+ <Download className="h-4 w-4 mr-2" />
1092
+ Export GLB (3D Model)
1093
+ </DropdownMenuItem>
1094
+ }
1095
+ />
1096
+ ) : (
1097
+ <DropdownMenuItem onClick={() => promptDesktopUpgrade('Exports')}>
1098
+ <Download className="h-4 w-4 mr-2" />
1099
+ Export GLB (3D Model)
1100
+ </DropdownMenuItem>
1101
+ )}
1110
1102
  <DropdownMenuSeparator />
1111
1103
  <DropdownMenuSub>
1112
1104
  <DropdownMenuSubTrigger disabled={!ifcDataStore}>
@@ -1 +0,0 @@
1
- let r;function d(n){V===y.length&&y.push(y.length+1);const t=V;return V=y[t],y[t]=n,t}function It(n){if(Z==1)throw new Error("out of js stack");return y[--Z]=n,Z}const Ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));function ce(n){n<132||(y[n]=V,V=n)}function k(n,t){return n=n>>>0,ge().subarray(n/4,n/4+t)}function G(n,t){return n=n>>>0,pe().subarray(n/8,n/8+t)}function Xt(n,t){return n=n>>>0,Nt().subarray(n/4,n/4+t)}let j=null;function a(){return(j===null||j.buffer.detached===!0||j.buffer.detached===void 0&&j.buffer!==r.memory.buffer)&&(j=new DataView(r.memory.buffer)),j}let E=null;function ge(){return(E===null||E.byteLength===0)&&(E=new Float32Array(r.memory.buffer)),E}let T=null;function pe(){return(T===null||T.byteLength===0)&&(T=new Float64Array(r.memory.buffer)),T}function w(n,t){return n=n>>>0,ue(n,t)}let D=null;function Nt(){return(D===null||D.byteLength===0)&&(D=new Uint32Array(r.memory.buffer)),D}let W=null;function U(){return(W===null||W.byteLength===0)&&(W=new Uint8Array(r.memory.buffer)),W}function p(n){return y[n]}function L(n,t){try{return n.apply(this,t)}catch(e){r.__wbindgen_export(d(e))}}let y=new Array(128).fill(void 0);y.push(void 0,null,!0,!1);let V=y.length;function z(n){return n==null}function de(n,t,e,_){const s={a:n,b:t,cnt:1,dtor:e},i=(...c)=>{s.cnt++;const o=s.a;s.a=0;try{return _(o,s.b,...c)}finally{s.a=o,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--s.cnt===0&&(s.dtor(s.a,s.b),s.a=0,Ft.unregister(s))},Ft.register(i,s,s),i}function m(n,t){const e=t(n.length*4,4)>>>0;return Nt().set(n,e/4),g=n.length,e}function x(n,t){const e=t(n.length*1,1)>>>0;return U().set(n,e/1),g=n.length,e}function l(n,t,e){if(e===void 0){const o=Y.encode(n),u=t(o.length,1)>>>0;return U().subarray(u,u+o.length).set(o),g=o.length,u}let _=n.length,s=t(_,1)>>>0;const i=U();let c=0;for(;c<_;c++){const o=n.charCodeAt(c);if(o>127)break;i[s+c]=o}if(c!==_){c!==0&&(n=n.slice(c)),s=e(s,_,_=c+n.length*3,1)>>>0;const o=U().subarray(s+c,s+_),u=Y.encodeInto(n,o);c+=u.written,s=e(s,_,c,1)>>>0}return g=c,s}let Z=128;function b(n){const t=p(n);return ce(n),t}let ot=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});ot.decode();const be=2146435072;let lt=0;function ue(n,t){return lt+=t,lt>=be&&(ot=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),ot.decode(),lt=t),ot.decode(U().subarray(n,n+t))}const Y=new TextEncoder;"encodeInto"in Y||(Y.encodeInto=function(n,t){const e=Y.encode(n);return t.set(e),{read:n.length,written:e.length}});let g=0;function le(n,t,e){r.__wasm_bindgen_func_elem_1480(n,t,d(e))}function we(n,t,e,_){r.__wasm_bindgen_func_elem_1520(n,t,d(e),d(_))}const St=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_georeferencejs_free(n>>>0,1)),wt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_gpugeometry_free(n>>>0,1)),ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_gpuinstancedgeometry_free(n>>>0,1)),yt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_gpuinstancedgeometrycollection_free(n>>>0,1)),jt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_gpuinstancedgeometryref_free(n>>>0,1)),Mt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_gpumeshmetadata_free(n>>>0,1)),kt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_ifcapi_free(n>>>0,1)),Rt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_instancedata_free(n>>>0,1)),zt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_instancedgeometry_free(n>>>0,1)),Pt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_instancedmeshcollection_free(n>>>0,1)),Ct=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_meshcollection_free(n>>>0,1)),At=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_meshcollectionwithrtc_free(n>>>0,1)),Ot=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_meshdatajs_free(n>>>0,1)),Bt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_profilecollection_free(n>>>0,1)),Lt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_profileentryjs_free(n>>>0,1)),Et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_rtcoffsetjs_free(n>>>0,1)),Tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_symboliccircle_free(n>>>0,1)),Dt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_symbolicpolyline_free(n>>>0,1)),Wt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_symbolicrepresentationcollection_free(n>>>0,1)),ht=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>r.__wbg_zerocopymesh_free(n>>>0,1));class X{static __wrap(t){t=t>>>0;const e=Object.create(X.prototype);return e.__wbg_ptr=t,St.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,St.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_georeferencejs_free(t,0)}localToMap(t,e,_){try{const o=r.__wbindgen_add_to_stack_pointer(-16);r.georeferencejs_localToMap(o,this.__wbg_ptr,t,e,_);var s=a().getInt32(o+0,!0),i=a().getInt32(o+4,!0),c=G(s,i).slice();return r.__wbindgen_export2(s,i*8,8),c}finally{r.__wbindgen_add_to_stack_pointer(16)}}mapToLocal(t,e,_){try{const o=r.__wbindgen_add_to_stack_pointer(-16);r.georeferencejs_mapToLocal(o,this.__wbg_ptr,t,e,_);var s=a().getInt32(o+0,!0),i=a().getInt32(o+4,!0),c=G(s,i).slice();return r.__wbindgen_export2(s,i*8,8),c}finally{r.__wbindgen_add_to_stack_pointer(16)}}get crsName(){try{const _=r.__wbindgen_add_to_stack_pointer(-16);r.georeferencejs_crsName(_,this.__wbg_ptr);var t=a().getInt32(_+0,!0),e=a().getInt32(_+4,!0);let s;return t!==0&&(s=w(t,e).slice(),r.__wbindgen_export2(t,e*1,1)),s}finally{r.__wbindgen_add_to_stack_pointer(16)}}get rotation(){return r.georeferencejs_rotation(this.__wbg_ptr)}toMatrix(){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.georeferencejs_toMatrix(s,this.__wbg_ptr);var t=a().getInt32(s+0,!0),e=a().getInt32(s+4,!0),_=G(t,e).slice();return r.__wbindgen_export2(t,e*8,8),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}get eastings(){return r.__wbg_get_georeferencejs_eastings(this.__wbg_ptr)}set eastings(t){r.__wbg_set_georeferencejs_eastings(this.__wbg_ptr,t)}get northings(){return r.__wbg_get_georeferencejs_northings(this.__wbg_ptr)}set northings(t){r.__wbg_set_georeferencejs_northings(this.__wbg_ptr,t)}get orthogonal_height(){return r.__wbg_get_georeferencejs_orthogonal_height(this.__wbg_ptr)}set orthogonal_height(t){r.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr,t)}get x_axis_abscissa(){return r.__wbg_get_georeferencejs_x_axis_abscissa(this.__wbg_ptr)}set x_axis_abscissa(t){r.__wbg_set_georeferencejs_x_axis_abscissa(this.__wbg_ptr,t)}get x_axis_ordinate(){return r.__wbg_get_georeferencejs_x_axis_ordinate(this.__wbg_ptr)}set x_axis_ordinate(t){r.__wbg_set_georeferencejs_x_axis_ordinate(this.__wbg_ptr,t)}get scale(){return r.__wbg_get_georeferencejs_scale(this.__wbg_ptr)}set scale(t){r.__wbg_set_georeferencejs_scale(this.__wbg_ptr,t)}}Symbol.dispose&&(X.prototype[Symbol.dispose]=X.prototype.free);class P{static __wrap(t){t=t>>>0;const e=Object.create(P.prototype);return e.__wbg_ptr=t,wt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,wt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_gpugeometry_free(t,0)}get meshCount(){return r.gpugeometry_meshCount(this.__wbg_ptr)>>>0}get indicesLen(){return r.gpugeometry_indicesLen(this.__wbg_ptr)>>>0}get indicesPtr(){return r.gpugeometry_indicesPtr(this.__wbg_ptr)>>>0}get rtcOffsetX(){return r.gpugeometry_rtcOffsetX(this.__wbg_ptr)}get rtcOffsetY(){return r.gpugeometry_rtcOffsetY(this.__wbg_ptr)}get rtcOffsetZ(){return r.gpugeometry_rtcOffsetZ(this.__wbg_ptr)}get hasRtcOffset(){return r.gpugeometry_hasRtcOffset(this.__wbg_ptr)!==0}set_rtc_offset(t,e,_){r.gpugeometry_set_rtc_offset(this.__wbg_ptr,t,e,_)}get vertexDataLen(){return r.gpugeometry_vertexDataLen(this.__wbg_ptr)>>>0}get vertexDataPtr(){return r.gpugeometry_vertexDataPtr(this.__wbg_ptr)>>>0}getIfcTypeName(t){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.gpugeometry_getIfcTypeName(s,this.__wbg_ptr,t);var e=a().getInt32(s+0,!0),_=a().getInt32(s+4,!0);let i;return e!==0&&(i=w(e,_).slice(),r.__wbindgen_export2(e,_*1,1)),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}getMeshMetadata(t){const e=r.gpugeometry_getMeshMetadata(this.__wbg_ptr,t);return e===0?void 0:q.__wrap(e)}get totalVertexCount(){return r.gpugeometry_totalVertexCount(this.__wbg_ptr)>>>0}get indicesByteLength(){return r.gpugeometry_indicesByteLength(this.__wbg_ptr)>>>0}get totalTriangleCount(){return r.gpugeometry_totalTriangleCount(this.__wbg_ptr)>>>0}get vertexDataByteLength(){return r.gpugeometry_vertexDataByteLength(this.__wbg_ptr)>>>0}constructor(){const t=r.gpugeometry_new();return this.__wbg_ptr=t>>>0,wt.register(this,this.__wbg_ptr,this),this}get isEmpty(){return r.gpugeometry_isEmpty(this.__wbg_ptr)!==0}}Symbol.dispose&&(P.prototype[Symbol.dispose]=P.prototype.free);class N{static __wrap(t){t=t>>>0;const e=Object.create(N.prototype);return e.__wbg_ptr=t,ft.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ft.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_gpuinstancedgeometry_free(t,0)}get geometryId(){const t=r.gpuinstancedgeometry_geometryId(this.__wbg_ptr);return BigInt.asUintN(64,t)}get indicesLen(){return r.gpuinstancedgeometry_indicesLen(this.__wbg_ptr)>>>0}get indicesPtr(){return r.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr)>>>0}get vertexCount(){return r.gpuinstancedgeometry_vertexCount(this.__wbg_ptr)>>>0}get instanceCount(){return r.gpuinstancedgeometry_instanceCount(this.__wbg_ptr)>>>0}get triangleCount(){return r.gpuinstancedgeometry_triangleCount(this.__wbg_ptr)>>>0}get vertexDataLen(){return r.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr)>>>0}get vertexDataPtr(){return r.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr)>>>0}get instanceDataLen(){return r.gpuinstancedgeometry_instanceDataLen(this.__wbg_ptr)>>>0}get instanceDataPtr(){return r.gpuinstancedgeometry_instanceDataPtr(this.__wbg_ptr)>>>0}get indicesByteLength(){return r.gpuinstancedgeometry_indicesByteLength(this.__wbg_ptr)>>>0}get vertexDataByteLength(){return r.gpuinstancedgeometry_vertexDataByteLength(this.__wbg_ptr)>>>0}get instanceExpressIdsPtr(){return r.gpuinstancedgeometry_instanceExpressIdsPtr(this.__wbg_ptr)>>>0}get instanceDataByteLength(){return r.gpuinstancedgeometry_instanceDataByteLength(this.__wbg_ptr)>>>0}constructor(t){const e=r.gpuinstancedgeometry_new(t);return this.__wbg_ptr=e>>>0,ft.register(this,this.__wbg_ptr,this),this}}Symbol.dispose&&(N.prototype[Symbol.dispose]=N.prototype.free);class K{static __wrap(t){t=t>>>0;const e=Object.create(K.prototype);return e.__wbg_ptr=t,yt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_gpuinstancedgeometrycollection_free(t,0)}get(t){const e=r.gpuinstancedgeometrycollection_get(this.__wbg_ptr,t);return e===0?void 0:N.__wrap(e)}constructor(){const t=r.gpuinstancedgeometrycollection_new();return this.__wbg_ptr=t>>>0,yt.register(this,this.__wbg_ptr,this),this}get length(){return r.gpuinstancedgeometrycollection_length(this.__wbg_ptr)>>>0}getRef(t){const e=r.gpuinstancedgeometrycollection_get(this.__wbg_ptr,t);return e===0?void 0:$.__wrap(e)}}Symbol.dispose&&(K.prototype[Symbol.dispose]=K.prototype.free);class ${static __wrap(t){t=t>>>0;const e=Object.create($.prototype);return e.__wbg_ptr=t,jt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_gpuinstancedgeometryref_free(t,0)}get geometryId(){const t=r.gpuinstancedgeometry_geometryId(this.__wbg_ptr);return BigInt.asUintN(64,t)}get indicesLen(){return r.gpuinstancedgeometry_indicesLen(this.__wbg_ptr)>>>0}get indicesPtr(){return r.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr)>>>0}get instanceCount(){return r.gpuinstancedgeometry_instanceCount(this.__wbg_ptr)>>>0}get vertexDataLen(){return r.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr)>>>0}get vertexDataPtr(){return r.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr)>>>0}get instanceDataLen(){return r.gpuinstancedgeometry_instanceDataLen(this.__wbg_ptr)>>>0}get instanceDataPtr(){return r.gpuinstancedgeometry_instanceDataPtr(this.__wbg_ptr)>>>0}get indicesByteLength(){return r.gpuinstancedgeometry_indicesByteLength(this.__wbg_ptr)>>>0}get vertexDataByteLength(){return r.gpuinstancedgeometry_vertexDataByteLength(this.__wbg_ptr)>>>0}get instanceExpressIdsPtr(){return r.gpuinstancedgeometry_instanceExpressIdsPtr(this.__wbg_ptr)>>>0}get instanceDataByteLength(){return r.gpuinstancedgeometry_instanceDataByteLength(this.__wbg_ptr)>>>0}}Symbol.dispose&&($.prototype[Symbol.dispose]=$.prototype.free);class q{static __wrap(t){t=t>>>0;const e=Object.create(q.prototype);return e.__wbg_ptr=t,Mt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Mt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_gpumeshmetadata_free(t,0)}get expressId(){return r.gpumeshmetadata_expressId(this.__wbg_ptr)>>>0}get indexCount(){return r.gpumeshmetadata_indexCount(this.__wbg_ptr)>>>0}get ifcTypeIdx(){return r.gpumeshmetadata_ifcTypeIdx(this.__wbg_ptr)}get indexOffset(){return r.gpumeshmetadata_indexOffset(this.__wbg_ptr)>>>0}get vertexCount(){return r.gpumeshmetadata_vertexCount(this.__wbg_ptr)>>>0}get vertexOffset(){return r.gpumeshmetadata_vertexOffset(this.__wbg_ptr)>>>0}get color(){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.gpumeshmetadata_color(s,this.__wbg_ptr);var t=a().getInt32(s+0,!0),e=a().getInt32(s+4,!0),_=k(t,e).slice();return r.__wbindgen_export2(t,e*4,4),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}}Symbol.dispose&&(q.prototype[Symbol.dispose]=q.prototype.free);class ct{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_ifcapi_free(t,0)}parseMeshes(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_parseMeshes(this.__wbg_ptr,e,_);return I.__wrap(s)}parseMeshesAsync(t,e){const _=l(t,r.__wbindgen_export3,r.__wbindgen_export4),s=g,i=r.ifcapi_parseMeshesAsync(this.__wbg_ptr,_,s,d(e));return b(i)}buildPrePassFast(t){const e=x(t,r.__wbindgen_export3),_=g,s=r.ifcapi_buildPrePassFast(this.__wbg_ptr,e,_);return b(s)}buildPrePassOnce(t){const e=x(t,r.__wbindgen_export3),_=g,s=r.ifcapi_buildPrePassOnce(this.__wbg_ptr,e,_);return b(s)}parseMeshesSubset(t,e,_,s){const i=l(t,r.__wbindgen_export3,r.__wbindgen_export4),c=g,o=r.ifcapi_parseMeshesSubset(this.__wbg_ptr,i,c,e,_,s);return I.__wrap(o)}parseToGpuGeometry(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_parseToGpuGeometry(this.__wbg_ptr,e,_);return P.__wrap(s)}parseMeshesInstanced(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_parseMeshesInstanced(this.__wbg_ptr,e,_);return A.__wrap(s)}processGeometryBatch(t,e,_,s,i,c,o,u,h,F,O,B){const S=x(t,r.__wbindgen_export3),gt=g,pt=m(e,r.__wbindgen_export3),dt=g,bt=m(u,r.__wbindgen_export3),ut=g,te=m(h,r.__wbindgen_export3),ee=g,re=m(F,r.__wbindgen_export3),ne=g,_e=m(O,r.__wbindgen_export3),se=g,ie=x(B,r.__wbindgen_export3),oe=g,ae=r.ifcapi_processGeometryBatch(this.__wbg_ptr,S,gt,pt,dt,_,s,i,c,o,bt,ut,te,ee,re,ne,_e,se,ie,oe);return I.__wrap(ae)}scanEntityIndexShard(t,e,_,s){try{const u=r.__wbindgen_add_to_stack_pointer(-16),h=x(t,r.__wbindgen_export3),F=g;r.ifcapi_scanEntityIndexShard(u,this.__wbg_ptr,h,F,It(e),_,s);var i=a().getInt32(u+0,!0),c=a().getInt32(u+4,!0),o=a().getInt32(u+8,!0);if(o)throw b(c);return b(i)}finally{r.__wbindgen_add_to_stack_pointer(16),y[Z++]=void 0}}buildPrePassStreaming(t,e,_){try{const o=r.__wbindgen_add_to_stack_pointer(-16),u=x(t,r.__wbindgen_export3),h=g;r.ifcapi_buildPrePassStreaming(o,this.__wbg_ptr,u,h,It(e),_);var s=a().getInt32(o+0,!0),i=a().getInt32(o+4,!0),c=a().getInt32(o+8,!0);if(c)throw b(i);return b(s)}finally{r.__wbindgen_add_to_stack_pointer(16),y[Z++]=void 0}}parseToGpuGeometryAsync(t,e){const _=l(t,r.__wbindgen_export3,r.__wbindgen_export4),s=g,i=r.ifcapi_parseToGpuGeometryAsync(this.__wbg_ptr,_,s,d(e));return b(i)}parseMeshesInstancedAsync(t,e){const _=l(t,r.__wbindgen_export3,r.__wbindgen_export4),s=g,i=r.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr,_,s,d(e));return b(i)}parseToGpuInstancedGeometry(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_parseToGpuInstancedGeometry(this.__wbg_ptr,e,_);return K.__wrap(s)}processInstancedGeometryBatch(t,e,_,s,i,c,o,u,h){const F=x(t,r.__wbindgen_export3),O=g,B=m(e,r.__wbindgen_export3),S=g,gt=m(u,r.__wbindgen_export3),pt=g,dt=x(h,r.__wbindgen_export3),bt=g,ut=r.ifcapi_processInstancedGeometryBatch(this.__wbg_ptr,F,O,B,S,_,s,i,c,o,gt,pt,dt,bt);return A.__wrap(ut)}parseZeroCopy(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_parseZeroCopy(this.__wbg_ptr,e,_);return st.__wrap(s)}extractProfiles(t,e){const _=l(t,r.__wbindgen_export3,r.__wbindgen_export4),s=g,i=r.ifcapi_extractProfiles(this.__wbg_ptr,_,s,e);return Q.__wrap(i)}debugProcessEntity953(t){let e,_;try{const c=r.__wbindgen_add_to_stack_pointer(-16),o=l(t,r.__wbindgen_export3,r.__wbindgen_export4),u=g;r.ifcapi_debugProcessEntity953(c,this.__wbg_ptr,o,u);var s=a().getInt32(c+0,!0),i=a().getInt32(c+4,!0);return e=s,_=i,w(s,i)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(e,_,1)}}debugProcessFirstWall(t){let e,_;try{const c=r.__wbindgen_add_to_stack_pointer(-16),o=l(t,r.__wbindgen_export3,r.__wbindgen_export4),u=g;r.ifcapi_debugProcessFirstWall(c,this.__wbg_ptr,o,u);var s=a().getInt32(c+0,!0),i=a().getInt32(c+4,!0);return e=s,_=i,w(s,i)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(e,_,1)}}getMemory(){const t=r.ifcapi_getMemory(this.__wbg_ptr);return b(t)}setEntityIndex(t,e,_){const s=m(t,r.__wbindgen_export3),i=g,c=m(e,r.__wbindgen_export3),o=g,u=m(_,r.__wbindgen_export3),h=g;r.ifcapi_setEntityIndex(this.__wbg_ptr,s,i,c,o,u,h)}setMergeLayers(t){r.ifcapi_setMergeLayers(this.__wbg_ptr,t)}clearPrePassCache(){r.ifcapi_clearPrePassCache(this.__wbg_ptr)}constructor(){const t=r.ifcapi_new();return this.__wbg_ptr=t>>>0,kt.register(this,this.__wbg_ptr,this),this}get version(){let t,e;try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.ifcapi_version(i,this.__wbg_ptr);var _=a().getInt32(i+0,!0),s=a().getInt32(i+4,!0);return t=_,e=s,w(_,s)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(t,e,1)}}get is_ready(){return r.ifcapi_is_ready(this.__wbg_ptr)!==0}getGeoReference(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_getGeoReference(this.__wbg_ptr,e,_);return s===0?void 0:X.__wrap(s)}parseMeshesWithRtc(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_parseMeshesWithRtc(this.__wbg_ptr,e,_);return H.__wrap(s)}parseStreaming(t,e){const _=l(t,r.__wbindgen_export3,r.__wbindgen_export4),s=g,i=r.ifcapi_parseStreaming(this.__wbg_ptr,_,s,d(e));return b(i)}scanEntitiesFast(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_scanEntitiesFast(this.__wbg_ptr,e,_);return b(s)}scanEntitiesFastBytes(t){const e=x(t,r.__wbindgen_export3),_=g,s=r.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr,e,_);return b(s)}scanGeometryEntitiesFast(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr,e,_);return b(s)}scanRelevantEntitiesFastBytes(t){const e=x(t,r.__wbindgen_export3),_=g,s=r.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr,e,_);return b(s)}parse(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_parse(this.__wbg_ptr,e,_);return b(s)}parseSymbolicRepresentations(t){const e=l(t,r.__wbindgen_export3,r.__wbindgen_export4),_=g,s=r.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr,e,_);return _t.__wrap(s)}}Symbol.dispose&&(ct.prototype[Symbol.dispose]=ct.prototype.free);class J{static __wrap(t){t=t>>>0;const e=Object.create(J.prototype);return e.__wbg_ptr=t,Rt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_instancedata_free(t,0)}get expressId(){return r.instancedata_expressId(this.__wbg_ptr)>>>0}get color(){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.instancedata_color(s,this.__wbg_ptr);var t=a().getInt32(s+0,!0),e=a().getInt32(s+4,!0),_=k(t,e).slice();return r.__wbindgen_export2(t,e*4,4),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}get transform(){const t=r.instancedata_transform(this.__wbg_ptr);return b(t)}}Symbol.dispose&&(J.prototype[Symbol.dispose]=J.prototype.free);class C{static __wrap(t){t=t>>>0;const e=Object.create(C.prototype);return e.__wbg_ptr=t,zt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_instancedgeometry_free(t,0)}get geometryId(){const t=r.gpuinstancedgeometry_geometryId(this.__wbg_ptr);return BigInt.asUintN(64,t)}get_instance(t){const e=r.instancedgeometry_get_instance(this.__wbg_ptr,t);return e===0?void 0:J.__wrap(e)}get instance_count(){return r.instancedgeometry_instance_count(this.__wbg_ptr)>>>0}get indices(){const t=r.instancedgeometry_indices(this.__wbg_ptr);return b(t)}get normals(){const t=r.instancedgeometry_normals(this.__wbg_ptr);return b(t)}get positions(){const t=r.instancedgeometry_positions(this.__wbg_ptr);return b(t)}}Symbol.dispose&&(C.prototype[Symbol.dispose]=C.prototype.free);class A{static __wrap(t){t=t>>>0;const e=Object.create(A.prototype);return e.__wbg_ptr=t,Pt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_instancedmeshcollection_free(t,0)}get totalInstances(){return r.instancedmeshcollection_totalInstances(this.__wbg_ptr)>>>0}get totalGeometries(){return r.gpuinstancedgeometrycollection_length(this.__wbg_ptr)>>>0}get(t){const e=r.instancedmeshcollection_get(this.__wbg_ptr,t);return e===0?void 0:C.__wrap(e)}get length(){return r.gpuinstancedgeometrycollection_length(this.__wbg_ptr)>>>0}}Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);class I{static __wrap(t){t=t>>>0;const e=Object.create(I.prototype);return e.__wbg_ptr=t,Ct.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ct.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_meshcollection_free(t,0)}get rtcOffsetX(){return r.gpugeometry_rtcOffsetZ(this.__wbg_ptr)}get rtcOffsetY(){return r.meshcollection_rtcOffsetY(this.__wbg_ptr)}get rtcOffsetZ(){return r.meshcollection_rtcOffsetZ(this.__wbg_ptr)}hasRtcOffset(){return r.meshcollection_hasRtcOffset(this.__wbg_ptr)!==0}localToWorld(t,e,_){try{const o=r.__wbindgen_add_to_stack_pointer(-16);r.meshcollection_localToWorld(o,this.__wbg_ptr,t,e,_);var s=a().getInt32(o+0,!0),i=a().getInt32(o+4,!0),c=G(s,i).slice();return r.__wbindgen_export2(s,i*8,8),c}finally{r.__wbindgen_add_to_stack_pointer(16)}}get totalVertices(){return r.meshcollection_totalVertices(this.__wbg_ptr)>>>0}get totalTriangles(){return r.meshcollection_totalTriangles(this.__wbg_ptr)>>>0}get buildingRotation(){try{const _=r.__wbindgen_add_to_stack_pointer(-16);r.meshcollection_buildingRotation(_,this.__wbg_ptr);var t=a().getInt32(_+0,!0),e=a().getFloat64(_+8,!0);return t===0?void 0:e}finally{r.__wbindgen_add_to_stack_pointer(16)}}get(t){const e=r.meshcollection_get(this.__wbg_ptr,t);return e===0?void 0:R.__wrap(e)}get length(){return r.meshcollection_length(this.__wbg_ptr)>>>0}}Symbol.dispose&&(I.prototype[Symbol.dispose]=I.prototype.free);class H{static __wrap(t){t=t>>>0;const e=Object.create(H.prototype);return e.__wbg_ptr=t,At.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,At.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_meshcollectionwithrtc_free(t,0)}get rtcOffset(){const t=r.meshcollectionwithrtc_rtcOffset(this.__wbg_ptr);return et.__wrap(t)}get(t){const e=r.meshcollectionwithrtc_get(this.__wbg_ptr,t);return e===0?void 0:R.__wrap(e)}get length(){return r.meshcollection_length(this.__wbg_ptr)>>>0}get meshes(){const t=r.meshcollectionwithrtc_meshes(this.__wbg_ptr);return I.__wrap(t)}}Symbol.dispose&&(H.prototype[Symbol.dispose]=H.prototype.free);class R{static __wrap(t){t=t>>>0;const e=Object.create(R.prototype);return e.__wbg_ptr=t,Ot.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ot.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_meshdatajs_free(t,0)}get expressId(){return r.meshdatajs_expressId(this.__wbg_ptr)>>>0}get vertexCount(){return r.meshdatajs_vertexCount(this.__wbg_ptr)>>>0}get triangleCount(){return r.meshdatajs_triangleCount(this.__wbg_ptr)>>>0}get color(){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.meshdatajs_color(s,this.__wbg_ptr);var t=a().getInt32(s+0,!0),e=a().getInt32(s+4,!0),_=k(t,e).slice();return r.__wbindgen_export2(t,e*4,4),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}get indices(){const t=r.meshdatajs_indices(this.__wbg_ptr);return b(t)}get normals(){const t=r.meshdatajs_normals(this.__wbg_ptr);return b(t)}get ifcType(){let t,e;try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.meshdatajs_ifcType(i,this.__wbg_ptr);var _=a().getInt32(i+0,!0),s=a().getInt32(i+4,!0);return t=_,e=s,w(_,s)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(t,e,1)}}get positions(){const t=r.meshdatajs_positions(this.__wbg_ptr);return b(t)}}Symbol.dispose&&(R.prototype[Symbol.dispose]=R.prototype.free);class Q{static __wrap(t){t=t>>>0;const e=Object.create(Q.prototype);return e.__wbg_ptr=t,Bt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_profilecollection_free(t,0)}get(t){const e=r.profilecollection_get(this.__wbg_ptr,t);return e===0?void 0:tt.__wrap(e)}get length(){return r.profilecollection_length(this.__wbg_ptr)>>>0}}Symbol.dispose&&(Q.prototype[Symbol.dispose]=Q.prototype.free);class tt{static __wrap(t){t=t>>>0;const e=Object.create(tt.prototype);return e.__wbg_ptr=t,Lt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Lt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_profileentryjs_free(t,0)}get expressId(){return r.meshdatajs_expressId(this.__wbg_ptr)>>>0}get holeCounts(){const t=r.profileentryjs_holeCounts(this.__wbg_ptr);return b(t)}get holePoints(){const t=r.profileentryjs_holePoints(this.__wbg_ptr);return b(t)}get modelIndex(){return r.profileentryjs_modelIndex(this.__wbg_ptr)>>>0}get outerPoints(){const t=r.profileentryjs_outerPoints(this.__wbg_ptr);return b(t)}get extrusionDir(){const t=r.profileentryjs_extrusionDir(this.__wbg_ptr);return b(t)}get extrusionDepth(){return r.profileentryjs_extrusionDepth(this.__wbg_ptr)}get ifcType(){let t,e;try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.profileentryjs_ifcType(i,this.__wbg_ptr);var _=a().getInt32(i+0,!0),s=a().getInt32(i+4,!0);return t=_,e=s,w(_,s)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(t,e,1)}}get transform(){const t=r.profileentryjs_transform(this.__wbg_ptr);return b(t)}}Symbol.dispose&&(tt.prototype[Symbol.dispose]=tt.prototype.free);class et{static __wrap(t){t=t>>>0;const e=Object.create(et.prototype);return e.__wbg_ptr=t,Et.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Et.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_rtcoffsetjs_free(t,0)}isSignificant(){return r.rtcoffsetjs_isSignificant(this.__wbg_ptr)!==0}toWorld(t,e,_){try{const o=r.__wbindgen_add_to_stack_pointer(-16);r.rtcoffsetjs_toWorld(o,this.__wbg_ptr,t,e,_);var s=a().getInt32(o+0,!0),i=a().getInt32(o+4,!0),c=G(s,i).slice();return r.__wbindgen_export2(s,i*8,8),c}finally{r.__wbindgen_add_to_stack_pointer(16)}}get x(){return r.__wbg_get_georeferencejs_eastings(this.__wbg_ptr)}set x(t){r.__wbg_set_georeferencejs_eastings(this.__wbg_ptr,t)}get y(){return r.__wbg_get_georeferencejs_northings(this.__wbg_ptr)}set y(t){r.__wbg_set_georeferencejs_northings(this.__wbg_ptr,t)}get z(){return r.__wbg_get_georeferencejs_orthogonal_height(this.__wbg_ptr)}set z(t){r.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr,t)}}Symbol.dispose&&(et.prototype[Symbol.dispose]=et.prototype.free);class rt{static __wrap(t){t=t>>>0;const e=Object.create(rt.prototype);return e.__wbg_ptr=t,Tt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Tt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_symboliccircle_free(t,0)}get expressId(){return r.gpumeshmetadata_vertexCount(this.__wbg_ptr)>>>0}get startAngle(){return r.symboliccircle_startAngle(this.__wbg_ptr)}get isFullCircle(){return r.symboliccircle_isFullCircle(this.__wbg_ptr)!==0}get repIdentifier(){let t,e;try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.symboliccircle_repIdentifier(i,this.__wbg_ptr);var _=a().getInt32(i+0,!0),s=a().getInt32(i+4,!0);return t=_,e=s,w(_,s)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(t,e,1)}}get radius(){return r.symboliccircle_radius(this.__wbg_ptr)}get centerX(){return r.symboliccircle_centerX(this.__wbg_ptr)}get centerY(){return r.symboliccircle_centerY(this.__wbg_ptr)}get ifcType(){let t,e;try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.symboliccircle_ifcType(i,this.__wbg_ptr);var _=a().getInt32(i+0,!0),s=a().getInt32(i+4,!0);return t=_,e=s,w(_,s)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(t,e,1)}}get endAngle(){return r.symboliccircle_endAngle(this.__wbg_ptr)}}Symbol.dispose&&(rt.prototype[Symbol.dispose]=rt.prototype.free);class nt{static __wrap(t){t=t>>>0;const e=Object.create(nt.prototype);return e.__wbg_ptr=t,Dt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_symbolicpolyline_free(t,0)}get expressId(){return r.symbolicpolyline_expressId(this.__wbg_ptr)>>>0}get pointCount(){return r.symbolicpolyline_pointCount(this.__wbg_ptr)>>>0}get repIdentifier(){let t,e;try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.symbolicpolyline_repIdentifier(i,this.__wbg_ptr);var _=a().getInt32(i+0,!0),s=a().getInt32(i+4,!0);return t=_,e=s,w(_,s)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(t,e,1)}}get points(){const t=r.symbolicpolyline_points(this.__wbg_ptr);return b(t)}get ifcType(){let t,e;try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.symbolicpolyline_ifcType(i,this.__wbg_ptr);var _=a().getInt32(i+0,!0),s=a().getInt32(i+4,!0);return t=_,e=s,w(_,s)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export2(t,e,1)}}get isClosed(){return r.symbolicpolyline_isClosed(this.__wbg_ptr)!==0}}Symbol.dispose&&(nt.prototype[Symbol.dispose]=nt.prototype.free);class _t{static __wrap(t){t=t>>>0;const e=Object.create(_t.prototype);return e.__wbg_ptr=t,Wt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_symbolicrepresentationcollection_free(t,0)}getCircle(t){const e=r.symbolicrepresentationcollection_getCircle(this.__wbg_ptr,t);return e===0?void 0:rt.__wrap(e)}get totalCount(){return r.symbolicrepresentationcollection_totalCount(this.__wbg_ptr)>>>0}get circleCount(){return r.symbolicrepresentationcollection_circleCount(this.__wbg_ptr)>>>0}getPolyline(t){const e=r.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr,t);return e===0?void 0:nt.__wrap(e)}get polylineCount(){return r.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr)>>>0}getExpressIds(){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.symbolicrepresentationcollection_getExpressIds(s,this.__wbg_ptr);var t=a().getInt32(s+0,!0),e=a().getInt32(s+4,!0),_=Xt(t,e).slice();return r.__wbindgen_export2(t,e*4,4),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}get isEmpty(){return r.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr)!==0}}Symbol.dispose&&(_t.prototype[Symbol.dispose]=_t.prototype.free);class st{static __wrap(t){t=t>>>0;const e=Object.create(st.prototype);return e.__wbg_ptr=t,ht.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ht.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_zerocopymesh_free(t,0)}bounds_max(){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.zerocopymesh_bounds_max(s,this.__wbg_ptr);var t=a().getInt32(s+0,!0),e=a().getInt32(s+4,!0),_=k(t,e).slice();return r.__wbindgen_export2(t,e*4,4),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}bounds_min(){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.zerocopymesh_bounds_min(s,this.__wbg_ptr);var t=a().getInt32(s+0,!0),e=a().getInt32(s+4,!0),_=k(t,e).slice();return r.__wbindgen_export2(t,e*4,4),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}get indices_len(){return r.gpuinstancedgeometry_indicesLen(this.__wbg_ptr)>>>0}get indices_ptr(){return r.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr)>>>0}get normals_len(){return r.zerocopymesh_normals_len(this.__wbg_ptr)>>>0}get normals_ptr(){return r.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr)>>>0}get vertex_count(){return r.zerocopymesh_vertex_count(this.__wbg_ptr)>>>0}get positions_len(){return r.zerocopymesh_positions_len(this.__wbg_ptr)>>>0}get positions_ptr(){return r.zerocopymesh_positions_ptr(this.__wbg_ptr)>>>0}get triangle_count(){return r.gpuinstancedgeometry_triangleCount(this.__wbg_ptr)>>>0}constructor(){const t=r.zerocopymesh_new();return this.__wbg_ptr=t>>>0,ht.register(this,this.__wbg_ptr,this),this}get is_empty(){return r.zerocopymesh_is_empty(this.__wbg_ptr)!==0}}Symbol.dispose&&(st.prototype[Symbol.dispose]=st.prototype.free);const fe=new Set(["basic","cors","default"]);async function ye(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(_){if(n.ok&&fe.has(n.type)&&n.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",_);else throw _}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function Kt(){const n={};return n.wbg={},n.wbg.__wbg_Error_52673b7de5a0ca89=function(t,e){const _=Error(w(t,e));return d(_)},n.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(t){return typeof p(t)=="function"},n.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(t){return p(t)===void 0},n.wbg.__wbg___wbindgen_memory_a342e963fbcabd68=function(){const t=r.memory;return d(t)},n.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(t,e){const _=p(e),s=typeof _=="number"?_:void 0;a().setFloat64(t+8,z(s)?0:s,!0),a().setInt32(t+0,!z(s),!0)},n.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(t,e){throw new Error(w(t,e))},n.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7=function(t){p(t)._wbg_cb_unref()},n.wbg.__wbg_call_3020136f7a2d6e44=function(){return L(function(t,e,_){const s=p(t).call(p(e),p(_));return d(s)},arguments)},n.wbg.__wbg_call_abb4ff46ce38be40=function(){return L(function(t,e){const _=p(t).call(p(e));return d(_)},arguments)},n.wbg.__wbg_call_c8baa5c5e72d274e=function(){return L(function(t,e,_,s){const i=p(t).call(p(e),p(_),p(s));return d(i)},arguments)},n.wbg.__wbg_debug_9d0c87ddda3dc485=function(t){console.debug(p(t))},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let _,s;try{_=t,s=e,console.error(w(t,e))}finally{r.__wbindgen_export2(_,s,1)}},n.wbg.__wbg_get_af9dab7e9603ea93=function(){return L(function(t,e){const _=Reflect.get(p(t),p(e));return d(_)},arguments)},n.wbg.__wbg_gpugeometry_new=function(t){const e=P.__wrap(t);return d(e)},n.wbg.__wbg_info_ce6bcc489c22f6f0=function(t){console.info(p(t))},n.wbg.__wbg_instancedgeometry_new=function(t){const e=C.__wrap(t);return d(e)},n.wbg.__wbg_length_86ce4877baf913bb=function(t){return p(t).length},n.wbg.__wbg_length_d45040a40c570362=function(t){return p(t).length},n.wbg.__wbg_meshdatajs_new=function(t){const e=R.__wrap(t);return d(e)},n.wbg.__wbg_new_1ba21ce319a06297=function(){const t=new Object;return d(t)},n.wbg.__wbg_new_25f239778d6112b9=function(){const t=new Array;return d(t)},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){const t=new Error;return d(t)},n.wbg.__wbg_new_ff12d2b041fb48f1=function(t,e){try{var _={a:t,b:e},s=(c,o)=>{const u=_.a;_.a=0;try{return we(u,_.b,c,o)}finally{_.a=u}};const i=new Promise(s);return d(i)}finally{_.a=_.b=0}},n.wbg.__wbg_new_from_slice_41e2764a343e3cb1=function(t,e){const _=new Float32Array(k(t,e));return d(_)},n.wbg.__wbg_new_from_slice_db0691b69e9d3891=function(t,e){const _=new Uint32Array(Xt(t,e));return d(_)},n.wbg.__wbg_new_no_args_cb138f77cf6151ee=function(t,e){const _=new Function(w(t,e));return d(_)},n.wbg.__wbg_new_with_length_202b3db94ba5fc86=function(t){const e=new Uint32Array(t>>>0);return d(e)},n.wbg.__wbg_new_with_length_806b9e5b8290af7c=function(t){const e=new Float64Array(t>>>0);return d(e)},n.wbg.__wbg_new_with_length_aa5eaf41d35235e5=function(t){const e=new Uint8Array(t>>>0);return d(e)},n.wbg.__wbg_prototypesetcall_96cc7097487b926d=function(t,e,_){Float32Array.prototype.set.call(k(t,e),p(_))},n.wbg.__wbg_push_7d9be8f38fc13975=function(t,e){return p(t).push(p(e))},n.wbg.__wbg_queueMicrotask_9b549dfce8865860=function(t){const e=p(t).queueMicrotask;return d(e)},n.wbg.__wbg_queueMicrotask_fca69f5bfad613a5=function(t){queueMicrotask(p(t))},n.wbg.__wbg_resolve_fd5bfbaa4ce36e1e=function(t){const e=Promise.resolve(p(t));return d(e)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(t,e,_){p(t)[b(e)]=b(_)},n.wbg.__wbg_set_781438a03c0c3c81=function(){return L(function(t,e,_){return Reflect.set(p(t),p(e),p(_))},arguments)},n.wbg.__wbg_set_7df433eea03a5c14=function(t,e,_){p(t)[e>>>0]=b(_)},n.wbg.__wbg_set_index_021489b2916af13e=function(t,e,_){p(t)[e>>>0]=_},n.wbg.__wbg_set_index_04c4b93e64d08a52=function(t,e,_){p(t)[e>>>0]=_},n.wbg.__wbg_set_index_42abe35f117e614e=function(t,e,_){p(t)[e>>>0]=_>>>0},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const _=p(e).stack,s=l(_,r.__wbindgen_export3,r.__wbindgen_export4),i=g;a().setInt32(t+4,i,!0),a().setInt32(t+0,s,!0)},n.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335=function(){const t=typeof global>"u"?null:global;return z(t)?0:d(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1=function(){const t=typeof globalThis>"u"?null:globalThis;return z(t)?0:d(t)},n.wbg.__wbg_static_accessor_SELF_08f5a74c69739274=function(){const t=typeof self>"u"?null:self;return z(t)?0:d(t)},n.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024=function(){const t=typeof window>"u"?null:window;return z(t)?0:d(t)},n.wbg.__wbg_then_4f95312d68691235=function(t,e){const _=p(t).then(p(e));return d(_)},n.wbg.__wbg_warn_6e567d0d926ff881=function(t){console.warn(p(t))},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(t,e){const _=w(t,e);return d(_)},n.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(t){const e=BigInt.asUintN(64,t);return d(e)},n.wbg.__wbindgen_cast_73cbb7b49382c492=function(t,e){const _=de(t,e,r.__wasm_bindgen_func_elem_1479,le);return d(_)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(t){return d(t)},n.wbg.__wbindgen_object_clone_ref=function(t){const e=p(t);return d(e)},n.wbg.__wbindgen_object_drop_ref=function(t){b(t)},n}function $t(n,t){return r=n.exports,qt.__wbindgen_wasm_module=t,j=null,E=null,T=null,D=null,W=null,r.__wbindgen_start(),r}function he(n){if(r!==void 0)return r;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const t=Kt();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));const e=new WebAssembly.Instance(n,t);return $t(e,n)}async function qt(n){if(r!==void 0)return r;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/assets/ifc-lite_bg-B_eUD1Wy.wasm",import.meta.url));const t=Kt();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:_}=await ye(await n,t);return $t(e,_)}let v=null,Jt;async function M(){return v||(await qt(Jt),v=new ct,it=!1,mt(),v)}let Ht=!1,it=!1;function mt(){if(!v||it)return;const n=v;typeof n.setMergeLayers=="function"&&n.setMergeLayers(Ht),it=!0}function xt(n){return new Uint8Array(n)}function vt(n){const t=new Uint8Array(n.byteLength);return t.set(new Uint8Array(n)),t}let f=null;const Gt=1e6;function Ut(n){return{sharedBuffer:n.sharedBuffer,localBytes:xt(n.sharedBuffer),sabFallbackTaken:!1,unitScale:n.unitScale,rtcX:n.rtcX,rtcY:n.rtcY,rtcZ:n.rtcZ,needsShift:n.needsShift,voidKeys:n.voidKeys,voidCounts:n.voidCounts,voidValues:n.voidValues,styleIds:n.styleIds,styleColors:n.styleColors,pendingMeshes:[],pendingTransfers:[],totalMeshesEmitted:0,cumulativeMeshBytes:0}}function Qt(n){if(n.pendingMeshes.length===0)return;const t=n.pendingMeshes,e=n.pendingTransfers;n.pendingMeshes=[],n.pendingTransfers=[],n.totalMeshesEmitted+=t.length,self.postMessage({type:"batch",meshes:t},e)}function me(n,t){for(let e=0;e<t.length;e++){const _=t.get(e);if(!_)continue;const s=new Float32Array(_.positions),i=new Float32Array(_.normals),c=new Uint32Array(_.indices);n.pendingMeshes.push({expressId:_.expressId,ifcType:_.ifcType,positions:s,normals:i,indices:c,color:[_.color[0],_.color[1],_.color[2],_.color[3]]}),n.pendingTransfers.push(s.buffer,i.buffer,c.buffer),n.cumulativeMeshBytes+=s.byteLength+i.byteLength+c.byteLength,_.free()}t.free()}async function at(n,t){const e=Math.floor(t.length/3);if(e!==0)try{const s=(await M()).processGeometryBatch(n.localBytes,t,n.unitScale,n.rtcX,n.rtcY,n.rtcZ,n.needsShift,n.voidKeys,n.voidCounts,n.voidValues,n.styleIds,n.styleColors);me(n,s)}catch(_){const s=_.message;if(!n.sabFallbackTaken&&n.localBytes.buffer instanceof SharedArrayBuffer){n.sabFallbackTaken=!0,console.warn(`[Worker] processGeometryBatch rejected SAB view (${s}), falling back to copy`),n.localBytes=vt(n.sharedBuffer),await at(n,t);return}if(e===1){console.warn(`[Worker] Skipping entity #${t[0]}: ${s}`),v=null;return}console.warn(`[Worker] Batch of ${e} entities failed (${s}), splitting…`),v=null;const i=Math.floor(e/2)*3;await at(n,t.slice(0,i)),await at(n,t.slice(i))}}async function Vt(n,t){const e=Math.floor(t.length/3);for(let _=0;_<e;_+=Gt){const s=_*3,i=Math.min(s+Gt*3,t.length);await at(n,t.subarray(s,i)),Qt(n)}}function Zt(n){Qt(n);let t=0;try{t=v?.getMemory()?.buffer?.byteLength??0}catch{}self.postMessage({type:"memory",meshBytes:n.cumulativeMeshBytes,wasmHeapBytes:t}),self.postMessage({type:"complete",totalMeshes:n.totalMeshesEmitted})}let Yt=Promise.resolve();self.onmessage=n=>{Yt=Yt.then(()=>xe(n)).catch(t=>{self.postMessage({type:"error",message:t instanceof Error?t.message:String(t)})})};async function xe(n){try{if(n.data.type==="prepass-streaming"){const t=await M();self.postMessage({type:"prepass-progress",phase:"parsing"});const e=n.data.sharedBuffer,_=n.data.chunkSize??5e4;let s=xt(e),i=!1;const c=o=>{self.postMessage({type:"prepass-stream",event:o})};try{t.buildPrePassStreaming(s,c,_)}catch(o){const u=o instanceof Error?o.message:String(o);if(!i)i=!0,console.warn(`[Worker] Streaming prepass with SAB view failed (${u}), retrying with copy`),s=vt(e),t.buildPrePassStreaming(s,c,_);else throw o}return}if(n.data.type==="prepass"||n.data.type==="prepass-fast"){const t=await M();self.postMessage({type:"prepass-progress",phase:"parsing"});const e=n.data.sharedBuffer,_=n.data.type==="prepass-fast";let s;try{const i=xt(e);s=_?t.buildPrePassFast(i):t.buildPrePassOnce(i)}catch(i){const c=i instanceof Error?i.message:String(i);console.warn(`[Worker] Prepass with SAB view failed (${c}), retrying with copy`);const o=vt(e);s=_?t.buildPrePassFast(o):t.buildPrePassOnce(o)}self.postMessage({type:"prepass-result",result:s});return}if(n.data.type==="init"){n.data.wasmUrl&&(Jt=n.data.wasmUrl),n.data.wasmModule?(he({module_or_path:n.data.wasmModule}),v=new ct,it=!1,mt()):await M(),self.postMessage({type:"ready"});return}if(n.data.type==="process"){await M();const{sharedBuffer:t,jobsFlat:e,unitScale:_,rtcX:s,rtcY:i,rtcZ:c,needsShift:o,voidKeys:u,voidCounts:h,voidValues:F,styleIds:O,styleColors:B}=n.data,S=Ut({sharedBuffer:t,unitScale:_,rtcX:s,rtcY:i,rtcZ:c,needsShift:o,voidKeys:u,voidCounts:h,voidValues:F,styleIds:O,styleColors:B});f=S,await Vt(S,e),Zt(S),f=null;return}if(n.data.type==="stream-start"){await M(),f=Ut({sharedBuffer:n.data.sharedBuffer,unitScale:n.data.unitScale,rtcX:n.data.rtcX,rtcY:n.data.rtcY,rtcZ:n.data.rtcZ,needsShift:n.data.needsShift,voidKeys:n.data.voidKeys,voidCounts:n.data.voidCounts,voidValues:n.data.voidValues,styleIds:n.data.styleIds,styleColors:n.data.styleColors});return}if(n.data.type==="stream-chunk"){if(!f)throw new Error("stream-chunk received before stream-start");await Vt(f,n.data.jobsFlat);return}if(n.data.type==="set-styles"){if(!f)return;f.styleIds=n.data.styleIds,f.styleColors=n.data.styleColors,f.voidKeys=n.data.voidKeys,f.voidCounts=n.data.voidCounts,f.voidValues=n.data.voidValues;return}if(n.data.type==="set-entity-index"){(await M()).setEntityIndex(n.data.ids,n.data.starts,n.data.lengths);return}if(n.data.type==="set-merge-layers"){Ht=n.data.enabled===!0,it=!1,mt();return}if(n.data.type==="stream-end"){if(!f)throw new Error("stream-end received before stream-start");Zt(f),f=null;return}}catch(t){self.postMessage({type:"error",message:t instanceof Error?t.message:String(t)})}}
@@ -1 +0,0 @@
1
- import{B as o}from"./geotiff-BN4J8Vt9.js";import"./sandbox-Bju6ZKJK.js";import"./lens-CpjUdqpw.js";import"./__vite-browser-external-B1O5LaIO.js";class c extends o{decodeBlock(e){return e}}export{c as default};