@bimdata/viewer 2.8.0-beta.3 → 2.8.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -186855,47 +186855,48 @@ function JRi(i) {
186855
186855
  }
186856
186856
  };
186857
186857
  }
186858
- function YRi(i) {
186859
- const e = i, t = e.units.reduce(
186860
- (u, A) => (A.conversion_baseunit = e.units[A.conversion_baseunit_index], delete A.conversion_baseunit_index, u[A.id] = A, u),
186858
+ function YRi(i = {}) {
186859
+ var u, A, d, h, p, f, m, g, I, y;
186860
+ const e = i, t = ((u = e.units) == null ? void 0 : u.reduce(
186861
+ (C, B) => (B.conversion_baseunit = e.units[B.conversion_baseunit_index], delete B.conversion_baseunit_index, C[B.id] = B, C),
186861
186862
  {}
186862
- ), n = e.definitions.reduce(
186863
- (u, A) => (A.unit = e.units[A.unit_id], delete A.unit_id, u[A.id] = A, u),
186863
+ )) ?? {}, n = ((A = e.definitions) == null ? void 0 : A.reduce(
186864
+ (C, B) => (B.unit = e.units[B.unit_id], delete B.unit_id, C[B.id] = B, C),
186864
186865
  {}
186865
- ), s = e.property_sets.reduce(
186866
- (u, A) => (A.properties.forEach((d) => {
186867
- d.definition = e.definitions[d.def_id], delete d.def_id;
186868
- }), u[A.id] = A, u),
186866
+ )) ?? {}, s = ((d = e.property_sets) == null ? void 0 : d.reduce(
186867
+ (C, B) => (B.properties.forEach((w) => {
186868
+ w.definition = e.definitions[w.def_id], delete w.def_id;
186869
+ }), C[B.id] = B, C),
186869
186870
  {}
186870
- ), r = e.classifications.reduce(
186871
- (u, A) => (A.name = A.type, A.title = A.description, u[A.id] = A, u),
186871
+ )) ?? {}, r = ((h = e.classifications) == null ? void 0 : h.reduce(
186872
+ (C, B) => (B.name = B.type, B.title = B.description, C[B.id] = B, C),
186872
186873
  {}
186873
- ), o = e.layers.reduce(
186874
- (u, A) => (A.elements = [], u[A.id] = A, u),
186874
+ )) ?? {}, o = ((p = e.layers) == null ? void 0 : p.reduce(
186875
+ (C, B) => (B.elements = [], C[B.id] = B, C),
186875
186876
  {}
186876
- ), a = e.systems.reduce(
186877
- (u, A) => (A.elements = [], u[A.uuid] = A, u),
186877
+ )) ?? {}, a = ((f = e.systems) == null ? void 0 : f.reduce(
186878
+ (C, B) => (B.elements = [], C[B.uuid] = B, C),
186878
186879
  {}
186879
- ), l = {};
186880
- l.materials_data = e.materials.materials_data.reduce(
186881
- (u, A) => (A.property_sets = A.psets.map((d) => e.property_sets[d]), delete A.psets, delete A.step_id, u[A.id] = A, u),
186880
+ )) ?? {}, l = {};
186881
+ l.materials_data = ((m = e.materials) == null ? void 0 : m.materials_data.reduce(
186882
+ (C, B) => (B.property_sets = B.psets.map((w) => e.property_sets[w]), delete B.psets, delete B.step_id, C[B.id] = B, C),
186882
186883
  {}
186883
- ), l.list_components = e.materials.list_components.reduce(
186884
- (u, A) => (A.material = e.materials.materials_data[A.material], A.option = e.materials.options[A.material_option], u[A.id] = A, delete A.id, u),
186884
+ )) ?? {}, l.list_components = ((g = e.materials) == null ? void 0 : g.list_components.reduce(
186885
+ (C, B) => (B.material = e.materials.materials_data[B.material], B.option = e.materials.options[B.material_option], C[B.id] = B, delete B.id, C),
186885
186886
  {}
186886
- ), l.options = e.materials.options.reduce(
186887
- (u, A) => (A.list_components = A.material_list.map((d) => e.materials.list_components[d]), u[A.id] = A, u),
186887
+ )) ?? {}, l.options = ((I = e.materials) == null ? void 0 : I.options.reduce(
186888
+ (C, B) => (B.list_components = B.material_list.map((w) => e.materials.list_components[w]), C[B.id] = B, C),
186888
186889
  {}
186889
- );
186890
+ )) ?? {};
186890
186891
  const c = {};
186891
- return e.elements.forEach((u) => {
186892
- u.attributes = e.property_sets[u.attributes], u.property_sets = u.psets.map((A) => e.property_sets[A]), delete u.psets, u.classifications = u.classifications.map((A) => e.classifications[A]), u.systems = u.systems.map((A) => {
186893
- const d = e.systems[A];
186894
- return d.elements.push(u.uuid), d;
186895
- }), u.layers = u.layers.map((A) => {
186896
- const d = e.layers[A];
186897
- return d.elements.push(u.uuid), d;
186898
- }), u.material_list = u.material_list.map((A) => e.materials.list_components[A]), c[u.uuid] = u;
186892
+ return (y = e.elements) == null || y.forEach((C) => {
186893
+ C.attributes = e.property_sets[C.attributes], C.property_sets = C.psets.map((B) => e.property_sets[B]), delete C.psets, C.classifications = C.classifications.map((B) => e.classifications[B]), C.systems = C.systems.map((B) => {
186894
+ const w = e.systems[B];
186895
+ return w.elements.push(C.uuid), w;
186896
+ }), C.layers = C.layers.map((B) => {
186897
+ const w = e.layers[B];
186898
+ return w.elements.push(C.uuid), w;
186899
+ }), C.material_list = C.material_list.map((B) => e.materials.list_components[B]), c[C.uuid] = C;
186899
186900
  }), {
186900
186901
  units: t,
186901
186902
  definitions: n,
@@ -187133,7 +187134,7 @@ async function eQi(i) {
187133
187134
  const t = await new NRi(new gMe(i)).getEntries(), n = await XRi(t);
187134
187135
  return await Promise.all(
187135
187136
  Object.values(n).flatMap(
187136
- ({ model: s, buildings: r, storeys: o }) => [s].concat(s.children).concat(r.flatMap((a) => a.plans).map((a) => a.plan)).concat(o.flatMap((a) => a.plans).map((a) => a.plan))
187137
+ ({ model: s, buildings: r = [], storeys: o = [] }) => [s].concat(s.children).concat(r.flatMap((a) => a.plans).map((a) => a.plan)).concat(o.flatMap((a) => a.plans).map((a) => a.plan))
187137
187138
  ).map((s) => $Ri(t, s))
187138
187139
  ), n;
187139
187140
  }
@@ -190244,7 +190245,7 @@ let ATi = class {
190244
190245
  );
190245
190246
  }
190246
190247
  };
190247
- const dTi = "2.8.0-beta.3", hTi = {
190248
+ const dTi = "2.8.0-beta.5", hTi = {
190248
190249
  version: dTi
190249
190250
  };
190250
190251
  class fTi {