@polycyphers/bim 0.1.4 → 0.1.6

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.
package/dist/index.mjs CHANGED
@@ -863,94 +863,94 @@ var y = {
863
863
  ar: /* @__PURE__ */ "الحفاظ على مخطط قائم,أدخل الإحداثيات المعروفة وراجع الحدود قبل التصدير. تبقى ملاحظات الصورة غير مؤكدة ولا تثبت مقياساً فعلياً.,تحميل المخطط,الزوايا,إضافة زاوية,استخدام الزوايا كحدود خارجية,الجدران,إضافة جدار,البداية,النهاية,السماكة,الغرف,إضافة غرفة,الاسم,أرقام الزوايا بترتيب الحدود,الفتحات,إضافة فتحة,الجدار,الموضع,العرض,الارتفاع,العتبة,فحص الهندسة,حفظ المخطط المراجع,راجعت القيم المقدمة مع مصدري. تبقى التقديرات غير مؤكدة.,تصدير المخطط المراجع,الإصدار المحفوظ,استعادة الإصدار,استعادة,إزالة,تنزيل,تغييرات غير محفوظة,النوع".split(",")
864
864
  }, b = () => crypto.randomUUID().replaceAll("-", "");
865
865
  function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee, onDownload: te, disabled: d = !1, sourceObjectId: ne, imageUrl: f, pendingDraft: p, persistPending: m, onPendingSaved: h, registerPendingSaver: g, loadSavedOnMount: re = !1 }) {
866
- let [x, ce] = o(() => p?.graph ?? ie()), [S, C] = o(p?.baseDigitizationRevision ?? 0), [w, le] = o(null), [T, E] = o(!!p?.graph), [D, ue] = o(!1), [O, k] = o(""), [A, j] = o(!1), [de, M] = o(null), [fe, N] = o(1), [pe, me] = o(["svg", "dxf"]), [he, P] = o(!1), [ge, _e] = o(50), [F, ve] = o(p?.sourceObjectId ?? ne), [I, ye] = o(!1), [L, be] = o(null), [xe, Se] = o(null), [R, Ce] = o(""), [we, Te] = o(""), [Ee, De] = o(""), [Oe, z] = o(() => p?.graph ? JSON.stringify(p.graph) : null), B = a(0), V = a(!0), ke = a(!1), H = a(c), Ae = a(ee);
867
- H.current = c, Ae.current = ee;
868
- let U = d, W = y[r], je = `/projects/${t}/digitization`, G = a(n), Me = a({
866
+ let [x, ce] = o(() => p?.graph ?? ie()), [S, C] = o(p?.baseDigitizationRevision ?? 0), [w, le] = o(null), [T, E] = o(!!p?.graph), [D, ue] = o(!1), [O, k] = o(""), [de, A] = o(!1), [fe, j] = o(null), [pe, M] = o(1), [me, he] = o(["svg", "dxf"]), [ge, N] = o(!1), [_e, ve] = o(50), [P, ye] = o(p?.sourceObjectId ?? ne), [F, be] = o(!1), [I, xe] = o(null), [Se, Ce] = o(null), [L, we] = o(""), [Te, Ee] = o(""), [De, Oe] = o(""), [ke, R] = o(() => p?.graph ? JSON.stringify(p.graph) : null), z = a(0), B = a(!0), Ae = a(!1), V = a(c), je = a(ee);
867
+ V.current = c, je.current = ee;
868
+ let H = d, U = y[r], Me = `/projects/${t}/digitization`, W = a(n), G = a({
869
869
  g: x,
870
870
  revision: S,
871
- source: F,
871
+ source: P,
872
872
  dirty: T,
873
873
  persistPending: m,
874
874
  onPendingSaved: h
875
875
  });
876
- Me.current = {
876
+ G.current = {
877
877
  g: x,
878
878
  revision: S,
879
- source: F,
879
+ source: P,
880
880
  dirty: T,
881
881
  persistPending: m,
882
882
  onPendingSaved: h
883
883
  };
884
884
  async function Ne() {
885
- let e = Me.current;
885
+ let e = G.current;
886
886
  if (!e.persistPending || !e.dirty && e.revision > 0) return null;
887
887
  if (!v(e.g)) throw Error("Enter known numeric values before preserving this draft or checkout. Missing values are never replaced with zero.");
888
- let n = B.current, r = await e.persistPending({
888
+ let n = z.current, r = await e.persistPending({
889
889
  workflow: "existing-plan",
890
890
  graph: e.g,
891
891
  sourceObjectId: e.source,
892
892
  baseDigitizationRevision: e.revision
893
- }, G.current, t);
894
- if (!V.current || n !== B.current) throw new DOMException("The pending workspace changed.", "AbortError");
895
- return G.current = r.version, z(JSON.stringify(e.g)), e.onPendingSaved?.(r), r;
893
+ }, W.current, t);
894
+ if (!B.current || n !== z.current) throw new DOMException("The pending workspace changed.", "AbortError");
895
+ return W.current = r.version, R(JSON.stringify(e.g)), e.onPendingSaved?.(r), r;
896
896
  }
897
- i(() => (g?.(Ne), () => g?.(null)), [g]), i(() => (V.current = !0, () => {
898
- V.current = !1, B.current++, Ae.current({
897
+ i(() => (g?.(Ne), () => g?.(null)), [g]), i(() => (B.current = !0, () => {
898
+ B.current = !1, z.current++, je.current({
899
899
  busy: !1,
900
900
  hasUnsavedChanges: !1
901
901
  });
902
902
  }), []), i(() => {
903
- Ae.current({
903
+ je.current({
904
904
  busy: D,
905
- hasUnsavedChanges: T && JSON.stringify(x) !== Oe
905
+ hasUnsavedChanges: T && JSON.stringify(x) !== ke
906
906
  });
907
907
  }, [
908
908
  D,
909
909
  T,
910
910
  x,
911
- Oe
911
+ ke
912
912
  ]), i(() => {
913
- n !== G.current && (G.current = n, B.current++, le(null), j(!1), M(null), p?.graph && (ce(p.graph), z(JSON.stringify(p.graph)), C(p.baseDigitizationRevision ?? 0), E(!0)));
913
+ n !== W.current && (W.current = n, z.current++, le(null), A(!1), j(null), p?.graph && (ce(p.graph), R(JSON.stringify(p.graph)), C(p.baseDigitizationRevision ?? 0), E(!0)));
914
914
  }, [n]), i(() => {
915
- B.current++, S > 0 && F !== ne && E(!0), ve(ne), be(null), Se(null), ye(!1), j(!1), le(null), M(null);
915
+ z.current++, S > 0 && P !== ne && E(!0), ye(ne), xe(null), Ce(null), be(!1), A(!1), le(null), j(null);
916
916
  }, [ne]), i(() => {
917
917
  if (!p?.graph && !re) return;
918
- let e = B.current;
919
- H.current(je).then((t) => {
920
- V.current && e === B.current && t && Number.isInteger(t.revision) && (p?.graph ? t.revision <= Me.current.revision || (B.current++, C(t.revision), le(null), j(!1), M(null), k("The saved plan changed. Your pending observations are restored; review them again before saving.")) : Ie(t));
918
+ let e = z.current;
919
+ V.current(Me).then((t) => {
920
+ B.current && e === z.current && t && Number.isInteger(t.revision) && (p?.graph ? t.revision <= G.current.revision || (z.current++, C(t.revision), le(null), A(!1), j(null), k("The saved plan changed. Your pending observations are restored; review them again before saving.")) : Ie(t));
921
921
  }).catch(() => {});
922
922
  }, []);
923
923
  function K(e) {
924
- B.current++, ce(e), E(!0), le(null), M(null), j(!1);
924
+ z.current++, ce(e), E(!0), le(null), j(null), A(!1);
925
925
  }
926
926
  async function Pe(e, t) {
927
- let n = B.current, r = await H.current(e, t);
928
- if (!V.current || n !== B.current) throw new DOMException("The reviewed workspace changed.", "AbortError");
927
+ let n = z.current, r = await V.current(e, t);
928
+ if (!B.current || n !== z.current) throw new DOMException("The reviewed workspace changed.", "AbortError");
929
929
  return r;
930
930
  }
931
931
  async function Fe(e) {
932
- if (!(ke.current || U)) {
933
- ke.current = !0, ue(!0), k("");
932
+ if (!(Ae.current || H)) {
933
+ Ae.current = !0, ue(!0), k("");
934
934
  try {
935
935
  await e();
936
936
  } catch (e) {
937
- V.current && !(e instanceof DOMException && e.name === "AbortError") && k(e instanceof Error ? e.message : String(e));
937
+ B.current && !(e instanceof DOMException && e.name === "AbortError") && k(e instanceof Error ? e.message : String(e));
938
938
  } finally {
939
- ke.current = !1, V.current && ue(!1);
939
+ Ae.current = !1, B.current && ue(!1);
940
940
  }
941
941
  }
942
942
  }
943
943
  function Ie(e) {
944
- V.current && (ve(e.sourceObjectId ?? ne), be(null), Se(null), ye(!1), ce(e.graph), C(e.revision), le({
944
+ B.current && (ye(e.sourceObjectId ?? ne), xe(null), Ce(null), be(!1), ce(e.graph), C(e.revision), le({
945
945
  ...e.review,
946
946
  svg: e.svg ?? e.review.svg,
947
947
  pricingNotice: e.pricingNotice ?? e.review.pricingNotice
948
- }), E(!1), z(null), j(!1), M(null), me(e.availableFormats ?? ["svg", "dxf"]), P(!1));
948
+ }), E(!1), R(null), A(!1), j(null), he(e.availableFormats ?? ["svg", "dxf"]), N(!1));
949
949
  }
950
950
  let q = (e, t, n = !1) => /* @__PURE__ */ l("button", {
951
951
  type: "button",
952
952
  className: "outline",
953
- disabled: D || U || n,
953
+ disabled: D || H || n,
954
954
  onClick: t,
955
955
  children: e
956
956
  });
@@ -1004,25 +1004,25 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1004
1004
  return /* @__PURE__ */ u("details", {
1005
1005
  className: "digitization-review paper",
1006
1006
  children: [/* @__PURE__ */ u("summary", { children: [
1007
- W[0],
1007
+ U[0],
1008
1008
  " ",
1009
- T && /* @__PURE__ */ l("small", { children: W[31] })
1009
+ T && /* @__PURE__ */ l("small", { children: U[31] })
1010
1010
  ] }), /* @__PURE__ */ u("fieldset", {
1011
- disabled: D || U,
1011
+ disabled: D || H,
1012
1012
  style: {
1013
1013
  border: 0,
1014
1014
  padding: 0,
1015
1015
  minWidth: 0
1016
1016
  },
1017
1017
  children: [
1018
- /* @__PURE__ */ l("p", { children: W[1] }),
1018
+ /* @__PURE__ */ l("p", { children: U[1] }),
1019
1019
  /* @__PURE__ */ u("label", { children: [{
1020
1020
  en: "Input units",
1021
1021
  de: "Eingabeeinheit",
1022
1022
  fr: "Unité des données",
1023
1023
  ar: "وحدات الإدخال"
1024
1024
  }[r], /* @__PURE__ */ l("select", {
1025
- disabled: D || U,
1025
+ disabled: D || H,
1026
1026
  value: x.units,
1027
1027
  onChange: (e) => K({
1028
1028
  ...x,
@@ -1034,8 +1034,8 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1034
1034
  "mm"
1035
1035
  ].map((e) => /* @__PURE__ */ l("option", { children: e }, e))
1036
1036
  })] }),
1037
- q(W[2], () => void Fe(async () => {
1038
- let e = await Pe(je);
1037
+ q(U[2], () => void Fe(async () => {
1038
+ let e = await Pe(Me);
1039
1039
  e ? Ie(e) : k({
1040
1040
  en: "No saved existing plan yet.",
1041
1041
  de: "Noch kein bestehender Plan gespeichert.",
@@ -1044,16 +1044,16 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1044
1044
  }[r]);
1045
1045
  }), T),
1046
1046
  S > 0 && /* @__PURE__ */ u("p", { children: [
1047
- W[26],
1047
+ U[26],
1048
1048
  " ",
1049
1049
  S
1050
1050
  ] }),
1051
- F && /* @__PURE__ */ u("section", { children: [
1051
+ P && /* @__PURE__ */ u("section", { children: [
1052
1052
  /* @__PURE__ */ u("label", { children: [/* @__PURE__ */ l("input", {
1053
1053
  type: "checkbox",
1054
- checked: I,
1055
- disabled: D || U,
1056
- onChange: (e) => ye(e.target.checked)
1054
+ checked: F,
1055
+ disabled: D || H,
1056
+ onChange: (e) => be(e.target.checked)
1057
1057
  }), {
1058
1058
  en: "Send this saved image to Anthropic for unconfirmed image-coordinate observations. This does not establish physical scale.",
1059
1059
  de: "Gespeichertes Bild an Anthropic für unbestätigte Bildkoordinaten senden. Dies bestätigt keinen Maßstab.",
@@ -1066,17 +1066,17 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1066
1066
  fr: "Lire les observations de l’image",
1067
1067
  ar: "قراءة ملاحظات الصورة"
1068
1068
  }[r], () => void Fe(async () => {
1069
- let e = await Pe(je + "/recognize", {
1070
- expectedProjectVersion: G.current,
1069
+ let e = await Pe(Me + "/recognize", {
1070
+ expectedProjectVersion: W.current,
1071
1071
  expectedRevision: S,
1072
1072
  operationId: b(),
1073
- sourceObjectId: F,
1073
+ sourceObjectId: P,
1074
1074
  intent: "Identify existing boundaries, walls, rooms and openings as unconfirmed image coordinates only.",
1075
1075
  allowAiProcessing: !0
1076
1076
  });
1077
- V.current && (be(e), Se(null), Ce(""), Te(""), De(""));
1078
- }), !I),
1079
- L && /* @__PURE__ */ u("div", {
1077
+ B.current && (xe(e), Ce(null), we(""), Ee(""), Oe(""));
1078
+ }), !F),
1079
+ I && /* @__PURE__ */ u("div", {
1080
1080
  role: "status",
1081
1081
  children: [
1082
1082
  /* @__PURE__ */ l("p", { children: {
@@ -1085,23 +1085,23 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1085
1085
  fr: "Tracé estimatif uniquement. Calibration et mesures vérifiées restent nécessaires ; aucun plan métrique adopté.",
1086
1086
  ar: "تتبع تقديري للصورة فقط. ما زالت المعايرة والقياسات المراجعة مطلوبة؛ لم يتم اعتماد مخطط متري."
1087
1087
  }[r] }),
1088
- L.questions.map((e, t) => /* @__PURE__ */ l("p", { children: e }, t)),
1089
- L.candidate && /* @__PURE__ */ u("svg", {
1088
+ I.questions.map((e, t) => /* @__PURE__ */ l("p", { children: e }, t)),
1089
+ I.candidate && /* @__PURE__ */ u("svg", {
1090
1090
  "aria-label": "Unconfirmed image-coordinate tracing",
1091
- viewBox: `0 0 ${L.candidate.imageWidthPx} ${L.candidate.imageHeightPx}`,
1091
+ viewBox: `0 0 ${I.candidate.imageWidthPx} ${I.candidate.imageHeightPx}`,
1092
1092
  style: {
1093
1093
  width: "100%",
1094
1094
  maxHeight: 350
1095
1095
  },
1096
1096
  children: [
1097
- f && F === ne && /* @__PURE__ */ l("image", {
1097
+ f && P === ne && /* @__PURE__ */ l("image", {
1098
1098
  href: f,
1099
- width: L.candidate.imageWidthPx,
1100
- height: L.candidate.imageHeightPx
1099
+ width: I.candidate.imageWidthPx,
1100
+ height: I.candidate.imageHeightPx
1101
1101
  }),
1102
1102
  " ",
1103
- L.candidate.walls.map((e) => {
1104
- let t = L.candidate.vertices.find((t) => t.id === e.startVertexId), n = L.candidate.vertices.find((t) => t.id === e.endVertexId);
1103
+ I.candidate.walls.map((e) => {
1104
+ let t = I.candidate.vertices.find((t) => t.id === e.startVertexId), n = I.candidate.vertices.find((t) => t.id === e.endVertexId);
1105
1105
  return t && n ? /* @__PURE__ */ l("line", {
1106
1106
  x1: t.xPx,
1107
1107
  y1: t.yPx,
@@ -1111,15 +1111,15 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1111
1111
  strokeWidth: "2"
1112
1112
  }, e.id) : null;
1113
1113
  }),
1114
- L.candidate.vertices.map((e) => /* @__PURE__ */ u("g", { children: [/* @__PURE__ */ l("circle", {
1114
+ I.candidate.vertices.map((e) => /* @__PURE__ */ u("g", { children: [/* @__PURE__ */ l("circle", {
1115
1115
  cx: e.xPx,
1116
1116
  cy: e.yPx,
1117
- r: Math.max(3, L.candidate.imageWidthPx / 120),
1118
- fill: e.id === R || e.id === we ? "#bd641c" : "#397e70"
1117
+ r: Math.max(3, I.candidate.imageWidthPx / 120),
1118
+ fill: e.id === L || e.id === Te ? "#bd641c" : "#397e70"
1119
1119
  }), /* @__PURE__ */ l("text", {
1120
1120
  x: e.xPx + 5,
1121
1121
  y: e.yPx - 5,
1122
- fontSize: Math.max(8, L.candidate.imageWidthPx / 60),
1122
+ fontSize: Math.max(8, I.candidate.imageWidthPx / 60),
1123
1123
  fill: "#1f2b28",
1124
1124
  children: e.id
1125
1125
  })] }, e.id))
@@ -1128,7 +1128,7 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1128
1128
  ]
1129
1129
  })
1130
1130
  ] }),
1131
- L?.candidate && /* @__PURE__ */ u("section", { children: [
1131
+ I?.candidate && /* @__PURE__ */ u("section", { children: [
1132
1132
  /* @__PURE__ */ l("h3", { children: {
1133
1133
  en: "Calibration preview — not confirmed dimensions",
1134
1134
  de: "Kalibrierungsvorschau — keine bestätigten Maße",
@@ -1143,22 +1143,22 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1143
1143
  }[r] }),
1144
1144
  [[
1145
1145
  "start",
1146
- R,
1147
- Ce
1146
+ L,
1147
+ we
1148
1148
  ], [
1149
1149
  "end",
1150
- we,
1151
- Te
1152
- ]].map(([e, t, n]) => /* @__PURE__ */ u("label", { children: [e === "start" ? W[8] : W[9], /* @__PURE__ */ u("select", {
1153
- disabled: D || U,
1150
+ Te,
1151
+ Ee
1152
+ ]].map(([e, t, n]) => /* @__PURE__ */ u("label", { children: [e === "start" ? U[8] : U[9], /* @__PURE__ */ u("select", {
1153
+ disabled: D || H,
1154
1154
  value: t,
1155
1155
  onChange: (e) => {
1156
- n(e.target.value), B.current++, Se(null);
1156
+ n(e.target.value), z.current++, Ce(null);
1157
1157
  },
1158
1158
  children: [/* @__PURE__ */ l("option", {
1159
1159
  value: "",
1160
1160
  children: "—"
1161
- }), L.candidate.vertices.map((e) => /* @__PURE__ */ l("option", {
1161
+ }), I.candidate.vertices.map((e) => /* @__PURE__ */ l("option", {
1162
1162
  value: e.id,
1163
1163
  children: e.id
1164
1164
  }, e.id))]
@@ -1172,10 +1172,10 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1172
1172
  type: "number",
1173
1173
  min: "0",
1174
1174
  step: "any",
1175
- disabled: D || U,
1176
- value: Ee,
1175
+ disabled: D || H,
1176
+ value: De,
1177
1177
  onChange: (e) => {
1178
- De(e.target.value), B.current++, Se(null);
1178
+ Oe(e.target.value), z.current++, Ce(null);
1179
1179
  }
1180
1180
  })] }),
1181
1181
  q({
@@ -1184,43 +1184,43 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1184
1184
  fr: "Afficher les suggestions calibrées",
1185
1185
  ar: "عرض اقتراحات المعايرة"
1186
1186
  }[r], () => void Fe(async () => {
1187
- let e = await Pe(je + "/calibrate", {
1188
- expectedProjectVersion: G.current,
1187
+ let e = await Pe(Me + "/calibrate", {
1188
+ expectedProjectVersion: W.current,
1189
1189
  expectedRevision: S,
1190
- candidate: L.candidate,
1191
- sourceObjectId: F,
1190
+ candidate: I.candidate,
1191
+ sourceObjectId: P,
1192
1192
  calibration: {
1193
- startVertexId: R,
1194
- endVertexId: we,
1195
- originVertexId: R,
1196
- knownLength: ae(Number(Ee)),
1193
+ startVertexId: L,
1194
+ endVertexId: Te,
1195
+ originVertexId: L,
1196
+ knownLength: ae(Number(De)),
1197
1197
  units: "m"
1198
1198
  }
1199
1199
  });
1200
- V.current && Se(e);
1201
- }), !R || !we || R === we || !Number.isFinite(Number(Ee)) || Number(Ee) <= 0),
1202
- xe && /* @__PURE__ */ u("div", {
1200
+ B.current && Ce(e);
1201
+ }), !L || !Te || L === Te || !Number.isFinite(Number(De)) || Number(De) <= 0),
1202
+ Se && /* @__PURE__ */ u("div", {
1203
1203
  role: "status",
1204
1204
  children: [
1205
- xe.findings.map((e, t) => /* @__PURE__ */ u("p", { children: [
1205
+ Se.findings.map((e, t) => /* @__PURE__ */ u("p", { children: [
1206
1206
  e.code,
1207
1207
  ": ",
1208
1208
  e.message
1209
1209
  ] }, t)),
1210
- xe.questions.map((e, t) => /* @__PURE__ */ l("p", { children: e }, t)),
1211
- xe.draft && q({
1210
+ Se.questions.map((e, t) => /* @__PURE__ */ l("p", { children: e }, t)),
1211
+ Se.draft && q({
1212
1212
  en: "Start review from unconfirmed suggestions",
1213
1213
  de: "Unbestätigte Vorschläge einzeln prüfen",
1214
1214
  fr: "Vérifier les suggestions non confirmées",
1215
1215
  ar: "بدء مراجعة الاقتراحات غير المؤكدة"
1216
- }[r], () => K(se(xe.draft)), T)
1216
+ }[r], () => K(se(Se.draft)), T)
1217
1217
  ]
1218
1218
  })
1219
1219
  ] }),
1220
1220
  /* @__PURE__ */ u("fieldset", {
1221
- disabled: D || U,
1221
+ disabled: D || H,
1222
1222
  children: [
1223
- /* @__PURE__ */ l("legend", { children: W[3] }),
1223
+ /* @__PURE__ */ l("legend", { children: U[3] }),
1224
1224
  x.vertices.map((e, t) => /* @__PURE__ */ u("article", { children: [
1225
1225
  /* @__PURE__ */ l("strong", { children: t + 1 }),
1226
1226
  Le("X", e.x, (t) => K({
@@ -1237,12 +1237,12 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1237
1237
  y: t
1238
1238
  } : n)
1239
1239
  })),
1240
- q(W[29], () => K({
1240
+ q(U[29], () => K({
1241
1241
  ...x,
1242
1242
  vertices: x.vertices.filter((t) => t.id !== e.id)
1243
1243
  }))
1244
1244
  ] }, e.id)),
1245
- q(W[4], () => K({
1245
+ q(U[4], () => K({
1246
1246
  ...x,
1247
1247
  vertices: [...x.vertices, {
1248
1248
  id: b(),
@@ -1250,39 +1250,39 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1250
1250
  y: oe()
1251
1251
  }]
1252
1252
  })),
1253
- q(W[5], () => K({
1253
+ q(U[5], () => K({
1254
1254
  ...x,
1255
1255
  boundaryVertexIds: x.vertices.map((e) => e.id)
1256
1256
  }), x.vertices.length < 3)
1257
1257
  ]
1258
1258
  }),
1259
1259
  /* @__PURE__ */ u("fieldset", {
1260
- disabled: D || U,
1260
+ disabled: D || H,
1261
1261
  children: [
1262
- /* @__PURE__ */ l("legend", { children: W[6] }),
1262
+ /* @__PURE__ */ l("legend", { children: U[6] }),
1263
1263
  x.walls.map((e) => /* @__PURE__ */ u("article", { children: [
1264
- J(W[8], e.startVertexId, (t) => K({
1264
+ J(U[8], e.startVertexId, (t) => K({
1265
1265
  ...x,
1266
1266
  walls: x.walls.map((n) => n.id === e.id ? {
1267
1267
  ...n,
1268
1268
  startVertexId: t
1269
1269
  } : n)
1270
1270
  })),
1271
- J(W[9], e.endVertexId, (t) => K({
1271
+ J(U[9], e.endVertexId, (t) => K({
1272
1272
  ...x,
1273
1273
  walls: x.walls.map((n) => n.id === e.id ? {
1274
1274
  ...n,
1275
1275
  endVertexId: t
1276
1276
  } : n)
1277
1277
  })),
1278
- Le(W[10], e.thickness, (t) => K({
1278
+ Le(U[10], e.thickness, (t) => K({
1279
1279
  ...x,
1280
1280
  walls: x.walls.map((n) => n.id === e.id ? {
1281
1281
  ...n,
1282
1282
  thickness: t
1283
1283
  } : n)
1284
1284
  })),
1285
- /* @__PURE__ */ u("label", { children: [W[32], /* @__PURE__ */ l("select", {
1285
+ /* @__PURE__ */ u("label", { children: [U[32], /* @__PURE__ */ l("select", {
1286
1286
  value: e.type,
1287
1287
  onChange: (t) => K({
1288
1288
  ...x,
@@ -1297,12 +1297,12 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1297
1297
  "interior"
1298
1298
  ].map((e) => /* @__PURE__ */ l("option", { children: e }, e))
1299
1299
  })] }),
1300
- q(W[29], () => K({
1300
+ q(U[29], () => K({
1301
1301
  ...x,
1302
1302
  walls: x.walls.filter((t) => t.id !== e.id)
1303
1303
  }))
1304
1304
  ] }, e.id)),
1305
- q(W[7], () => K({
1305
+ q(U[7], () => K({
1306
1306
  ...x,
1307
1307
  walls: [...x.walls, {
1308
1308
  id: b(),
@@ -1315,11 +1315,11 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1315
1315
  ]
1316
1316
  }),
1317
1317
  /* @__PURE__ */ u("fieldset", {
1318
- disabled: D || U,
1318
+ disabled: D || H,
1319
1319
  children: [
1320
- /* @__PURE__ */ l("legend", { children: W[11] }),
1320
+ /* @__PURE__ */ l("legend", { children: U[11] }),
1321
1321
  x.rooms.map((e) => /* @__PURE__ */ u("article", { children: [
1322
- /* @__PURE__ */ u("label", { children: [W[13], /* @__PURE__ */ l("input", {
1322
+ /* @__PURE__ */ u("label", { children: [U[13], /* @__PURE__ */ l("input", {
1323
1323
  value: e.name,
1324
1324
  onChange: (t) => K({
1325
1325
  ...x,
@@ -1344,7 +1344,7 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1344
1344
  } : n)
1345
1345
  })
1346
1346
  })] }),
1347
- /* @__PURE__ */ u("label", { children: [W[14], /* @__PURE__ */ l("input", {
1347
+ /* @__PURE__ */ u("label", { children: [U[14], /* @__PURE__ */ l("input", {
1348
1348
  value: e.vertexIds.map((e) => x.vertices.findIndex((t) => t.id === e) + 1).join(","),
1349
1349
  onChange: (t) => K({
1350
1350
  ...x,
@@ -1354,12 +1354,12 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1354
1354
  } : n)
1355
1355
  })
1356
1356
  })] }),
1357
- q(W[29], () => K({
1357
+ q(U[29], () => K({
1358
1358
  ...x,
1359
1359
  rooms: x.rooms.filter((t) => t.id !== e.id)
1360
1360
  }))
1361
1361
  ] }, e.id)),
1362
- q(W[12], () => K({
1362
+ q(U[12], () => K({
1363
1363
  ...x,
1364
1364
  rooms: [...x.rooms, {
1365
1365
  id: b(),
@@ -1371,11 +1371,11 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1371
1371
  ]
1372
1372
  }),
1373
1373
  /* @__PURE__ */ u("fieldset", {
1374
- disabled: D || U,
1374
+ disabled: D || H,
1375
1375
  children: [
1376
- /* @__PURE__ */ l("legend", { children: W[15] }),
1376
+ /* @__PURE__ */ l("legend", { children: U[15] }),
1377
1377
  x.openings.map((t) => /* @__PURE__ */ u("article", { children: [
1378
- /* @__PURE__ */ u("label", { children: [W[32], /* @__PURE__ */ u("select", {
1378
+ /* @__PURE__ */ u("label", { children: [U[32], /* @__PURE__ */ u("select", {
1379
1379
  value: t.kind,
1380
1380
  onChange: (e) => K({
1381
1381
  ...x,
@@ -1408,7 +1408,7 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1408
1408
  "fixed"
1409
1409
  ].map((e) => /* @__PURE__ */ l("option", { children: e }, e))
1410
1410
  })] }),
1411
- /* @__PURE__ */ u("label", { children: [W[17], /* @__PURE__ */ u("select", {
1411
+ /* @__PURE__ */ u("label", { children: [U[17], /* @__PURE__ */ u("select", {
1412
1412
  value: t.hostWallId,
1413
1413
  onChange: (e) => K({
1414
1414
  ...x,
@@ -1430,19 +1430,19 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1430
1430
  "width",
1431
1431
  "height",
1432
1432
  "sill"
1433
- ].map((n, r) => /* @__PURE__ */ l(e.Fragment, { children: Le(W[18 + r], t[n] ?? oe(), (e) => K({
1433
+ ].map((n, r) => /* @__PURE__ */ l(e.Fragment, { children: Le(U[18 + r], t[n] ?? oe(), (e) => K({
1434
1434
  ...x,
1435
1435
  openings: x.openings.map((r) => r.id === t.id ? {
1436
1436
  ...r,
1437
1437
  [n]: (n === "height" || n === "sill") && !Number.isFinite(e.value) ? null : e
1438
1438
  } : r)
1439
1439
  })) }, n)),
1440
- q(W[29], () => K({
1440
+ q(U[29], () => K({
1441
1441
  ...x,
1442
1442
  openings: x.openings.filter((e) => e.id !== t.id)
1443
1443
  }))
1444
1444
  ] }, t.id)),
1445
- q(W[16], () => K({
1445
+ q(U[16], () => K({
1446
1446
  ...x,
1447
1447
  openings: [...x.openings, {
1448
1448
  id: b(),
@@ -1457,14 +1457,14 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1457
1457
  }))
1458
1458
  ]
1459
1459
  }),
1460
- q(W[22], () => void Fe(async () => {
1461
- let e = await Pe(je + "/review", {
1462
- expectedProjectVersion: G.current,
1460
+ q(U[22], () => void Fe(async () => {
1461
+ let e = await Pe(Me + "/review", {
1462
+ expectedProjectVersion: W.current,
1463
1463
  expectedRevision: S,
1464
1464
  graph: x,
1465
- sourceObjectId: F
1465
+ sourceObjectId: P
1466
1466
  });
1467
- V.current && (le(e), j(!1));
1467
+ B.current && (le(e), A(!1));
1468
1468
  }), !v(x)),
1469
1469
  w && /* @__PURE__ */ u("section", {
1470
1470
  "aria-live": "polite",
@@ -1485,7 +1485,7 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1485
1485
  e.suggestedAction
1486
1486
  ] }, t)) }),
1487
1487
  /* @__PURE__ */ u("details", { children: [
1488
- /* @__PURE__ */ l("summary", { children: W[22] }),
1488
+ /* @__PURE__ */ l("summary", { children: U[22] }),
1489
1489
  w.values.values.map((e) => /* @__PURE__ */ u("p", { children: [
1490
1490
  e.path,
1491
1491
  ": ",
@@ -1504,39 +1504,39 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1504
1504
  ] }),
1505
1505
  /* @__PURE__ */ u("label", { children: [/* @__PURE__ */ l("input", {
1506
1506
  type: "checkbox",
1507
- disabled: D || U,
1508
- checked: A,
1509
- onChange: (e) => j(e.target.checked)
1510
- }), W[24]] }),
1511
- q(W[23], () => void Fe(async () => {
1512
- await Ne(), Ie(await Pe(je, {
1513
- expectedProjectVersion: G.current,
1507
+ disabled: D || H,
1508
+ checked: de,
1509
+ onChange: (e) => A(e.target.checked)
1510
+ }), U[24]] }),
1511
+ q(U[23], () => void Fe(async () => {
1512
+ await Ne(), Ie(await Pe(Me, {
1513
+ expectedProjectVersion: W.current,
1514
1514
  expectedRevision: S,
1515
1515
  operationId: b(),
1516
1516
  graph: x,
1517
- sourceObjectId: F,
1517
+ sourceObjectId: P,
1518
1518
  reviewContentHash: w.contentHash,
1519
1519
  reviewedValuePaths: _(w)
1520
1520
  }));
1521
- }), !A || !w.geometryValidated || !T && S > 0 && w.canExport || (w.requiredReviewPaths?.some((e) => !_(w).includes(e)) ?? !1))
1521
+ }), !de || !w.geometryValidated || !T && S > 0 && w.canExport || (w.requiredReviewPaths?.some((e) => !_(w).includes(e)) ?? !1))
1522
1522
  ]
1523
1523
  }),
1524
- pe.includes("pdf") && /* @__PURE__ */ u("label", { children: [
1524
+ me.includes("pdf") && /* @__PURE__ */ u("label", { children: [
1525
1525
  "PDF",
1526
1526
  /* @__PURE__ */ l("input", {
1527
1527
  type: "checkbox",
1528
- disabled: D || U,
1529
- checked: he,
1528
+ disabled: D || H,
1529
+ checked: ge,
1530
1530
  onChange: (e) => {
1531
- P(e.target.checked), M(null);
1531
+ N(e.target.checked), j(null);
1532
1532
  }
1533
1533
  }),
1534
1534
  /* @__PURE__ */ u("select", {
1535
1535
  "aria-label": "PDF scale / paper",
1536
- disabled: D || U,
1537
- value: ge,
1536
+ disabled: D || H,
1537
+ value: _e,
1538
1538
  onChange: (e) => {
1539
- _e(Number(e.target.value)), M(null);
1539
+ ve(Number(e.target.value)), j(null);
1540
1540
  },
1541
1541
  children: [/* @__PURE__ */ l("option", {
1542
1542
  value: 50,
@@ -1548,38 +1548,38 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1548
1548
  }),
1549
1549
  /* @__PURE__ */ l("small", { children: "100% · 1:100: compact labels" })
1550
1550
  ] }),
1551
- q(W[25], () => void Fe(async () => {
1552
- let e = await Pe(je + "/exports", {
1553
- expectedProjectVersion: G.current,
1551
+ q(U[25], () => void Fe(async () => {
1552
+ let e = await Pe(Me + "/exports", {
1553
+ expectedProjectVersion: W.current,
1554
1554
  expectedRevision: S,
1555
1555
  operationId: b(),
1556
- formats: he ? [
1556
+ formats: ge ? [
1557
1557
  "svg",
1558
1558
  "dxf",
1559
1559
  "pdf"
1560
1560
  ] : ["svg", "dxf"],
1561
- scaleDenominator: ge,
1562
- paperSize: ge === 50 ? "A2" : "A3"
1561
+ scaleDenominator: _e,
1562
+ paperSize: _e === 50 ? "A2" : "A3"
1563
1563
  });
1564
- V.current && M(e);
1564
+ B.current && j(e);
1565
1565
  }), T || !w?.canExport || S < 1),
1566
1566
  S > 1 && /* @__PURE__ */ u("label", { children: [
1567
- W[27],
1567
+ U[27],
1568
1568
  /* @__PURE__ */ l("input", {
1569
1569
  type: "number",
1570
1570
  min: "1",
1571
1571
  max: S - 1,
1572
- value: fe,
1573
- onChange: (e) => N(e.target.valueAsNumber)
1572
+ value: pe,
1573
+ onChange: (e) => M(e.target.valueAsNumber)
1574
1574
  }),
1575
- q(W[28], () => void Fe(async () => Ie(await Pe(je + "/undo", {
1576
- expectedProjectVersion: G.current,
1575
+ q(U[28], () => void Fe(async () => Ie(await Pe(Me + "/undo", {
1576
+ expectedProjectVersion: W.current,
1577
1577
  expectedRevision: S,
1578
- targetRevision: fe,
1578
+ targetRevision: pe,
1579
1579
  operationId: b()
1580
1580
  }))), T)
1581
1581
  ] }),
1582
- de && Object.keys(de.files).map((t) => /* @__PURE__ */ l(e.Fragment, { children: q(W[30] + " " + t.toUpperCase(), () => te(t, de), T) }, t)),
1582
+ fe && Object.keys(fe.files).map((t) => /* @__PURE__ */ l(e.Fragment, { children: q(U[30] + " " + t.toUpperCase(), () => te(t, fe), T) }, t)),
1583
1583
  O && /* @__PURE__ */ l("p", {
1584
1584
  role: "alert",
1585
1585
  children: O
@@ -1590,66 +1590,66 @@ function x({ projectId: t, projectVersion: n, language: r, api: c, onState: ee,
1590
1590
  });
1591
1591
  }
1592
1592
  // src/packageVersion.ts
1593
- var ce = "0.1.4";
1593
+ var ce = "0.1.6";
1594
1594
  // src/licensing.ts
1595
1595
  te();
1596
- var S = "bim", C = ce, w = "https://licenseapi.polycyphers.com/api/license/revoked.json", le = "polycyphers-revocation-list", T = 1048576, E = 86400, D = 6e4, ue = "", O = 0, k = "not_set", A = null, j = null, de = /* @__PURE__ */ new Set();
1597
- function M(e) {
1596
+ var S = "bim", C = ce, w = "https://licenseapi.polycyphers.com/api/license/revoked.json", le = "polycyphers-revocation-list", T = 1048576, E = 86400, D = 6e4, ue = "", O = 0, k = "not_set", de = null, A = null, fe = /* @__PURE__ */ new Set();
1597
+ function j(e) {
1598
1598
  ne(e === "karamentreprises" ? "karament" : null);
1599
1599
  }
1600
- function fe(e) {
1600
+ function pe(e) {
1601
1601
  let t = typeof e == "string" ? e.trim() : "";
1602
1602
  if (t !== ue) {
1603
- ue = t, O++, A = null, k = t ? "checking" : "not_set";
1604
- for (let e of de) try {
1603
+ ue = t, O++, de = null, k = t ? "checking" : "not_set";
1604
+ for (let e of fe) try {
1605
1605
  e();
1606
1606
  } catch {}
1607
1607
  }
1608
1608
  }
1609
- function N() {
1610
- fe("");
1609
+ function M() {
1610
+ pe("");
1611
1611
  }
1612
- function pe(e) {
1613
- return de.add(e), () => {
1614
- de.delete(e);
1612
+ function me(e) {
1613
+ return fe.add(e), () => {
1614
+ fe.delete(e);
1615
1615
  };
1616
1616
  }
1617
- function me() {
1618
- return A ? Date.now() >= A.expires ? "expired" : Date.now() < A.until ? A.status : "checking" : k;
1617
+ function he() {
1618
+ return de ? Date.now() >= de.expires ? "expired" : Date.now() < de.until ? de.status : "checking" : k;
1619
1619
  }
1620
- function he(e) {
1620
+ function ge(e) {
1621
1621
  return !!e && typeof e == "object" && !Array.isArray(e);
1622
1622
  }
1623
- function P(e, t = 256) {
1623
+ function N(e, t = 256) {
1624
1624
  return typeof e == "string" && e.length > 0 && e.length <= t && !/[\u0000-\u001f\u007f]/.test(e);
1625
1625
  }
1626
- function ge(e) {
1626
+ function _e(e) {
1627
1627
  return typeof e == "number" && Number.isSafeInteger(e) && e > 0;
1628
1628
  }
1629
- function _e(e) {
1629
+ function ve(e) {
1630
1630
  if (e.length > 32768 || !/^[-_A-Za-z0-9]+\.[-_A-Za-z0-9]+$/.test(e)) return null;
1631
1631
  try {
1632
1632
  let t = Uint8Array.from(atob(e.split(".")[0].replace(/-/g, "+").replace(/_/g, "/")), (e) => e.charCodeAt(0)), n = JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(t));
1633
- return he(n) ? n : null;
1633
+ return ge(n) ? n : null;
1634
1634
  } catch {
1635
1635
  return null;
1636
1636
  }
1637
1637
  }
1638
- function F(e) {
1638
+ function P(e) {
1639
1639
  if (e === "*") return !0;
1640
1640
  let t = e.split("."), n = C.split(".");
1641
1641
  return t.length <= 3 && t.every((e, t) => e === "x" || e === "*" || /^\d+$/.test(e) && e === n[t]);
1642
1642
  }
1643
- function ve(e) {
1644
- if (!P(e, 253)) return !1;
1643
+ function ye(e) {
1644
+ if (!N(e, 253)) return !1;
1645
1645
  let t = e.toLowerCase().replace(/^\*\./, "").replace(/^\./, "");
1646
1646
  return /^\[[0-9a-f:]+\]$/.test(t) || t.split(".").every((e) => /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/.test(e));
1647
1647
  }
1648
- function I(e, t) {
1648
+ function F(e, t) {
1649
1649
  let n = e.toLowerCase();
1650
1650
  return n === t ? !0 : n.startsWith("*.") ? t.endsWith(n.slice(1)) && t.length > n.length - 1 : n.startsWith(".") ? t === n.slice(1) || t.endsWith(n) : !1;
1651
1651
  }
1652
- async function ye(e) {
1652
+ async function be(e) {
1653
1653
  if (!e.ok) throw Error("License service unavailable");
1654
1654
  let t = e.headers.get("content-length");
1655
1655
  if (t && (!/^\d+$/.test(t) || Number(t) > T)) throw Error("License response too large");
@@ -1669,20 +1669,20 @@ async function ye(e) {
1669
1669
  for (let e of i) a.set(e, o), o += e.byteLength;
1670
1670
  return JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(a));
1671
1671
  }
1672
- async function L(e, t) {
1672
+ async function I(e, t) {
1673
1673
  let n = new AbortController(), r = setTimeout(() => n.abort(), 8e3);
1674
1674
  try {
1675
- let r = await ye(await fetch(w, {
1675
+ let r = await be(await fetch(w, {
1676
1676
  credentials: "omit",
1677
1677
  cache: "no-store",
1678
1678
  redirect: "error",
1679
1679
  signal: n.signal
1680
1680
  }));
1681
- if (!he(r) || typeof r.token != "string" || r.token.length > T || !ge(r.iat) || !Array.isArray(r.revoked) || r.revoked.length > 1e5 || !r.revoked.every((e) => P(e, 128))) throw Error("Invalid revocation envelope");
1681
+ if (!ge(r) || typeof r.token != "string" || r.token.length > T || !_e(r.iat) || !Array.isArray(r.revoked) || r.revoked.length > 1e5 || !r.revoked.every((e) => N(e, 128))) throw Error("Invalid revocation envelope");
1682
1682
  let i = r.revoked, a = await f(r.token, le, t);
1683
1683
  if (!a.ok) throw Error("Invalid signed revocation list");
1684
1684
  let o = a.payload;
1685
- if (!ge(o.iat) || !ge(o.exp) || o.exp <= t || o.exp <= o.iat || o.exp - o.iat > E || o.iat > t + 60 || t - o.iat > E || o.iat !== r.iat || !Array.isArray(o.revoked) || o.revoked.length !== r.revoked.length || !o.revoked.every((e, t) => P(e, 128) && e === i[t])) throw Error("Stale or inconsistent revocation list");
1685
+ if (!_e(o.iat) || !_e(o.exp) || o.exp <= t || o.exp <= o.iat || o.exp - o.iat > E || o.iat > t + 60 || t - o.iat > E || o.iat !== r.iat || !Array.isArray(o.revoked) || o.revoked.length !== r.revoked.length || !o.revoked.every((e, t) => N(e, 128) && e === i[t])) throw Error("Stale or inconsistent revocation list");
1686
1686
  return {
1687
1687
  revoked: r.revoked.includes(e),
1688
1688
  expires: Math.min(o.exp, o.iat + E) * 1e3
@@ -1691,20 +1691,20 @@ async function L(e, t) {
1691
1691
  clearTimeout(r);
1692
1692
  }
1693
1693
  }
1694
- async function be(e = !1) {
1695
- let t = me();
1694
+ async function xe(e = !1) {
1695
+ let t = he();
1696
1696
  if (!e && t === "licensed") return t;
1697
1697
  if (!ue) return "not_set";
1698
- if (j?.epoch === O) return j.promise;
1698
+ if (A?.epoch === O) return A.promise;
1699
1699
  let n = O, r = ue, i = (async () => {
1700
1700
  let e = "invalid_signature", t = null;
1701
1701
  try {
1702
- let n = _e(r);
1703
- if (!n || !P(n.sub)) return "invalid_signature";
1702
+ let n = ve(r);
1703
+ if (!n || !N(n.sub)) return "invalid_signature";
1704
1704
  let i = Math.floor(Date.now() / 1e3), a = await f(r, n.sub, i);
1705
1705
  if (!a.ok) return a.status;
1706
1706
  let o = a.payload;
1707
- if (!P(o.sub) || !P(o.jti, 128) || !ge(o.iat) || !ge(o.exp) || o.iat > i + 60 || o.exp <= o.iat) return "invalid_signature";
1707
+ if (!N(o.sub) || !N(o.jti, 128) || !_e(o.iat) || !_e(o.exp) || o.iat > i + 60 || o.exp <= o.iat) return "invalid_signature";
1708
1708
  if (![
1709
1709
  "pro",
1710
1710
  "team",
@@ -1712,11 +1712,11 @@ async function be(e = !1) {
1712
1712
  "internal"
1713
1713
  ].includes(String(o.tier))) return "wrong_tier";
1714
1714
  if (o.exp <= i) return "expired";
1715
- if (!Array.isArray(o.pkg) || !o.pkg.length || o.pkg.length > 32 || !o.pkg.every((e) => P(e, 128)) || !o.pkg.includes("bim") || o.pkg.includes("Polycyphers.Bim")) return "wrong_package";
1716
- if (typeof o.ver != "string" || o.ver.length > 64 || !F(o.ver)) return "wrong_version";
1715
+ if (!Array.isArray(o.pkg) || !o.pkg.length || o.pkg.length > 32 || !o.pkg.every((e) => N(e, 128)) || !o.pkg.includes("bim") || o.pkg.includes("Polycyphers.Bim")) return "wrong_package";
1716
+ if (typeof o.ver != "string" || o.ver.length > 64 || !P(o.ver)) return "wrong_version";
1717
1717
  let s = typeof location > "u" ? "" : location.hostname.toLowerCase();
1718
- if (!s || !Array.isArray(o.dom) || !o.dom.length || o.dom.length > 64 || !o.dom.every(ve) || !o.dom.some((e) => I(e, s))) return "wrong_domain";
1719
- let c = await L(o.jti, i);
1718
+ if (!s || !Array.isArray(o.dom) || !o.dom.length || o.dom.length > 64 || !o.dom.every(ye) || !o.dom.some((e) => F(e, s))) return "wrong_domain";
1719
+ let c = await I(o.jti, i);
1720
1720
  if (c.revoked) return "revoked";
1721
1721
  let l = Math.min(o.exp * 1e3, c.expires);
1722
1722
  return o.exp * 1e3 <= Date.now() ? "expired" : l <= Date.now() ? "unavailable" : (e = "licensed", t = {
@@ -1727,22 +1727,22 @@ async function be(e = !1) {
1727
1727
  } catch {
1728
1728
  return "unavailable";
1729
1729
  } finally {
1730
- n === O && (A = t, k = t?.status ?? "unavailable");
1730
+ n === O && (de = t, k = t?.status ?? "unavailable");
1731
1731
  }
1732
1732
  })();
1733
- j = {
1733
+ A = {
1734
1734
  epoch: n,
1735
1735
  promise: i
1736
1736
  };
1737
1737
  try {
1738
1738
  let e = await i;
1739
- return n === O ? (k = e, e) : me();
1739
+ return n === O ? (k = e, e) : he();
1740
1740
  } finally {
1741
- j?.promise === i && (j = null);
1741
+ A?.promise === i && (A = null);
1742
1742
  }
1743
1743
  }
1744
1744
  // src/studioState.ts
1745
- function xe(e, t) {
1745
+ function Se(e, t) {
1746
1746
  if (typeof e.priceMinorUnits != "number" || !Number.isFinite(e.priceMinorUnits) || typeof e.currency != "string") return null;
1747
1747
  try {
1748
1748
  let n = new Intl.NumberFormat(t, {
@@ -1754,29 +1754,29 @@ function xe(e, t) {
1754
1754
  return null;
1755
1755
  }
1756
1756
  }
1757
- function Se(e) {
1757
+ function Ce(e) {
1758
1758
  return typeof e.freeProposalGenerations == "number" && typeof e.freeBimExports == "number" ? {
1759
1759
  proposals: e.freeProposalGenerations,
1760
1760
  exports: e.freeBimExports
1761
1761
  } : null;
1762
1762
  }
1763
- function R(e) {
1763
+ function L(e) {
1764
1764
  return "polycyphers.bim.project.v1:" + encodeURIComponent(e);
1765
1765
  }
1766
- function Ce(e, t) {
1766
+ function we(e, t) {
1767
1767
  try {
1768
- let n = e.getItem(R(t));
1768
+ let n = e.getItem(L(t));
1769
1769
  return n && /^[a-f0-9]{32}$/i.test(n) ? n : null;
1770
1770
  } catch {
1771
1771
  return null;
1772
1772
  }
1773
1773
  }
1774
- function we(e, t, n) {
1774
+ function Te(e, t, n) {
1775
1775
  try {
1776
- n && /^[a-f0-9]{32}$/i.test(n) ? e.setItem(R(t), n) : e.removeItem(R(t));
1776
+ n && /^[a-f0-9]{32}$/i.test(n) ? e.setItem(L(t), n) : e.removeItem(L(t));
1777
1777
  } catch {}
1778
1778
  }
1779
- function Te(e) {
1779
+ function Ee(e) {
1780
1780
  return {
1781
1781
  footprint: { edges: Array.from({ length: 4 }, (e, t) => ({
1782
1782
  id: "W" + (t + 1),
@@ -1806,7 +1806,7 @@ function Te(e) {
1806
1806
  language: e
1807
1807
  };
1808
1808
  }
1809
- function Ee(e) {
1809
+ function De(e) {
1810
1810
  if (e.footprint.edges.length < 3 || e.footprint.edges.some((e) => !Number.isFinite(e.lengthM) || e.lengthM <= 0 || e.bearingDegrees !== null && !Number.isFinite(e.bearingDegrees))) return "Enter every measured wall length. Leave an unknown bearing blank.";
1811
1811
  if (e.programme) {
1812
1812
  let t = e.programme;
@@ -1822,27 +1822,27 @@ function Ee(e) {
1822
1822
  }
1823
1823
  return null;
1824
1824
  }
1825
- function De(e, t) {
1825
+ function Oe(e, t) {
1826
1826
  return !!e && !!t && e.isChanged && e.expectedVersion === t.version && e.snapshot.projectId === t.projectId;
1827
1827
  }
1828
- function Oe(e) {
1828
+ function ke(e) {
1829
1829
  let t = e?.toLowerCase().split(/[-_]/)[0];
1830
1830
  return t === "de" || t === "fr" || t === "ar" ? t : "en";
1831
1831
  }
1832
- function z(e, t, n) {
1832
+ function R(e, t, n) {
1833
1833
  return n.some((e) => e.toLowerCase() === t.toLowerCase()) ? "estimated" : e.valueOrigins ? e.valueOrigins.userGivenPaths.some((e) => e.toLowerCase() === t.toLowerCase()) ? "user-given" : "estimated" : t.startsWith("programme.") ? e.programme?.source.startsWith("User-entered") ? "user-given" : "estimated" : t.startsWith("buildUps.") ? "estimated" : "user-given";
1834
1834
  }
1835
- function B(e, t, n) {
1836
- let r = e.valueOrigins?.userGivenPaths ?? [...e.footprint.edges.flatMap((e, t) => [...Number.isFinite(e.lengthM) ? [`footprint.edges[${t}].lengthM`] : [], ...e.bearingDegrees == null ? [] : [`footprint.edges[${t}].bearingDegrees`]]), ...Object.entries(e.programme ?? {}).filter(([, e]) => typeof e == "number" && Number.isFinite(e)).map(([e]) => "programme." + e)].filter((t) => z(e, t, n) === "user-given");
1835
+ function z(e, t, n) {
1836
+ let r = e.valueOrigins?.userGivenPaths ?? [...e.footprint.edges.flatMap((e, t) => [...Number.isFinite(e.lengthM) ? [`footprint.edges[${t}].lengthM`] : [], ...e.bearingDegrees == null ? [] : [`footprint.edges[${t}].bearingDegrees`]]), ...Object.entries(e.programme ?? {}).filter(([, e]) => typeof e == "number" && Number.isFinite(e)).map(([e]) => "programme." + e)].filter((t) => R(e, t, n) === "user-given");
1837
1837
  return {
1838
1838
  ...e,
1839
1839
  valueOrigins: { userGivenPaths: [...r.filter((e) => e.toLowerCase() !== t.toLowerCase()), t] }
1840
1840
  };
1841
1841
  }
1842
1842
  // src/BimStudio.tsx
1843
- var V = t("baulynq"), ke = () => location.pathname === "/verify-email" || location.pathname === "/verify", H = () => crypto.randomUUID().replaceAll("-", "");
1844
- function Ae() {
1845
- let e = r(V);
1843
+ var B = t("baulynq"), Ae = () => location.pathname === "/verify-email" || location.pathname === "/verify", V = () => crypto.randomUUID().replaceAll("-", "");
1844
+ function je() {
1845
+ let e = r(B);
1846
1846
  return /* @__PURE__ */ u("span", {
1847
1847
  className: "brand",
1848
1848
  children: [/* @__PURE__ */ l("svg", {
@@ -1852,13 +1852,13 @@ function Ae() {
1852
1852
  }), /* @__PURE__ */ u("strong", { children: [e === "karamentreprises" ? "Karamentreprises" : "BauLynq", /* @__PURE__ */ l("span", { children: e === "karamentreprises" ? "BIM" : "Vision" })] })]
1853
1853
  });
1854
1854
  }
1855
- function U() {
1855
+ function H() {
1856
1856
  return /* @__PURE__ */ l("span", {
1857
1857
  "aria-hidden": "true",
1858
1858
  children: "↗"
1859
1859
  });
1860
1860
  }
1861
- function W() {
1861
+ function U() {
1862
1862
  return /* @__PURE__ */ u("svg", {
1863
1863
  viewBox: "0 0 450 340",
1864
1864
  role: "img",
@@ -1964,17 +1964,17 @@ function W() {
1964
1964
  ]
1965
1965
  });
1966
1966
  }
1967
- function je(e = {}) {
1968
- let t = e.brand ?? "baulynq", r = Oe(e.language ?? e.initialInput?.language ?? (typeof navigator > "u" ? "en" : navigator.language)), [a, s] = o("checking"), [c, ee] = o(0);
1967
+ function Me(e = {}) {
1968
+ let t = e.brand ?? "baulynq", r = ke(e.language ?? e.initialInput?.language ?? (typeof navigator > "u" ? "en" : navigator.language)), [a, s] = o("checking"), [c, ee] = o(0);
1969
1969
  i(() => {
1970
1970
  let e = !0, n = !1, r = !1;
1971
- M(t);
1971
+ j(t);
1972
1972
  let i = async () => {
1973
1973
  if (n) r = !0;
1974
1974
  else {
1975
1975
  n = !0;
1976
1976
  try {
1977
- let t = await be(!0);
1977
+ let t = await xe(!0);
1978
1978
  e && s(t);
1979
1979
  } catch {
1980
1980
  e && s("unavailable");
@@ -1984,12 +1984,12 @@ function je(e = {}) {
1984
1984
  }
1985
1985
  };
1986
1986
  i();
1987
- let a = pe(() => {
1987
+ let a = me(() => {
1988
1988
  e && s("checking"), i();
1989
1989
  }), o = setInterval(() => {
1990
1990
  i();
1991
1991
  }, 3e4), c = setInterval(() => {
1992
- let t = me();
1992
+ let t = he();
1993
1993
  e && t !== "licensed" && s(t);
1994
1994
  }, 1e3);
1995
1995
  return () => {
@@ -1997,13 +1997,13 @@ function je(e = {}) {
1997
1997
  };
1998
1998
  }, [t, c]);
1999
1999
  let te = n(async (t, n) => {
2000
- let r = await be(), i = me();
2000
+ let r = await xe(), i = he();
2001
2001
  if (r !== "licensed" || i !== "licensed") throw s(i), new DOMException("A valid component license is required.", "AbortError");
2002
2002
  return e.transport ? e.transport(t, n) : fetch("/v1" + t, n);
2003
2003
  }, [e.transport]), d = a === "licensed";
2004
- return /* @__PURE__ */ l(V.Provider, {
2004
+ return /* @__PURE__ */ l(B.Provider, {
2005
2005
  value: t,
2006
- children: d ? /* @__PURE__ */ l(G, {
2006
+ children: d ? /* @__PURE__ */ l(W, {
2007
2007
  ...e,
2008
2008
  transport: te
2009
2009
  }, e.embedded ? e.workspaceKey ?? "unscoped" : "public") : /* @__PURE__ */ u("section", {
@@ -2011,7 +2011,7 @@ function je(e = {}) {
2011
2011
  dir: r === "ar" ? "rtl" : "ltr",
2012
2012
  "aria-label": "Component licensing",
2013
2013
  children: [
2014
- /* @__PURE__ */ l(Ae, {}),
2014
+ /* @__PURE__ */ l(je, {}),
2015
2015
  /* @__PURE__ */ l("h1", { children: g(r, a === "checking" ? "Verifying component license…" : "A valid component license is required") }),
2016
2016
  /* @__PURE__ */ u("p", { children: [
2017
2017
  t === "karamentreprises" ? "Karamentreprises BIM" : "BauLynq Vision",
@@ -2032,24 +2032,24 @@ function je(e = {}) {
2032
2032
  })
2033
2033
  });
2034
2034
  }
2035
- function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, initialInput: ee, workspaceKey: te, language: d, onStateChange: ne, brand: f = "baulynq" } = {}) {
2036
- let [p, h] = o(() => Oe(d ?? ee?.language ?? (typeof navigator > "u" ? "en" : navigator.language))), [ie, ae] = o(t || location.pathname === "/studio" ? "studio" : "home"), [oe, _] = o("measure"), [v, se] = o(null), [y, b] = o(ee ?? null), [ce, S] = o("A"), [C, w] = o(!1), [le, T] = o(""), [E, D] = o(""), [ue, O] = o(""), [k, A] = o(null), [j, de] = o(null), [M, fe] = o(null), [N, pe] = o(""), [he, P] = o(!t && ke()), [ge, _e] = o(""), [F, ve] = o(""), [I, ye] = o({}), [L, be] = o(!1), [R, z] = o(ke() ? "verify" : "login"), [B, V] = o(() => ke() ? new URLSearchParams(location.search).get("token") ?? "" : ""), [je, G] = o(), [Fe, Ie] = o(null), [q, Le] = o(null), [J, Re] = o(null), [ze, Be] = o(""), [Ve, He] = o(null), [Ue, We] = o([]), [Ge, Ke] = o(!1), [qe, Je] = o(!1), [Ye, Xe] = o(!1), [Ze, Qe] = o(null), [$e, et] = o(null), [tt, nt] = o(null), [rt, it] = o(!1), [at, ot] = o(1), [st, ct] = o(1), [lt, ut] = o(!1), [dt, ft] = o(!1), [pt, mt] = o(!1), [ht, gt] = o(null), [_t, vt] = o(!1), [yt, bt] = o([]), [xt, St] = o([]), [Ct, wt] = o(null), Tt = a(null), Et = n((e) => {
2035
+ function W({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, initialInput: ee, workspaceKey: te, language: d, onStateChange: ne, brand: f = "baulynq" } = {}) {
2036
+ let [p, h] = o(() => ke(d ?? ee?.language ?? (typeof navigator > "u" ? "en" : navigator.language))), [ie, ae] = o(t || location.pathname === "/studio" ? "studio" : "home"), [oe, _] = o("measure"), [v, se] = o(null), [y, b] = o(ee ?? null), [ce, S] = o("A"), [C, w] = o(!1), [le, T] = o(""), [E, D] = o(""), [ue, O] = o(""), [k, de] = o(null), [A, fe] = o(null), [j, pe] = o(null), [M, me] = o(""), [ge, N] = o(!t && Ae()), [_e, ve] = o(""), [P, ye] = o(""), [F, be] = o({}), [I, xe] = o(!1), [L, R] = o(Ae() ? "verify" : "login"), [z, B] = o(() => Ae() ? new URLSearchParams(location.search).get("token") ?? "" : ""), [Me, W] = o(), [Fe, Ie] = o(null), [q, Le] = o(null), [J, Re] = o(null), [ze, Be] = o(""), [Ve, He] = o(null), [Ue, We] = o([]), [Ge, Ke] = o(!1), [qe, Je] = o(!1), [Ye, Xe] = o(!1), [Ze, Qe] = o(null), [$e, et] = o(null), [tt, nt] = o(null), [rt, it] = o(!1), [at, ot] = o(1), [st, ct] = o(1), [lt, ut] = o(!1), [dt, ft] = o(!1), [pt, mt] = o(!1), [ht, gt] = o(null), [_t, vt] = o(!1), [yt, bt] = o([]), [xt, St] = o([]), [Ct, wt] = o(null), Tt = a(null), Et = n((e) => {
2037
2037
  Tt.current = e;
2038
- }, []), [Dt, Ot] = o(!1), [kt, At] = o([]), [jt, Mt] = o(), Nt = a(null), Pt = a(!1), Ft = a(!0), Y = a(0), It = a(""), Lt = a(void 0), Rt = a(te), X = m[p], zt = te ?? je, [Bt, Vt] = o(!1), [Ht, Ut] = o({
2038
+ }, []), [Dt, Ot] = o(!1), [kt, At] = o([]), [jt, Mt] = o(), Nt = a(null), Pt = a(!1), Ft = a(!0), Y = a(0), It = a(""), Lt = a(void 0), Rt = a(te), X = m[p], zt = te ?? Me, [Bt, Vt] = o(!1), [Ht, Ut] = o({
2039
2039
  busy: !1,
2040
2040
  hasUnsavedChanges: !1
2041
- }), Wt = n((e) => Ut(e), []), Gt = a(ne), Kt = Ht.hasUnsavedChanges || lt || !!E.trim() || !!q || !!J && !Ve || _t;
2041
+ }), Wt = n((e) => Ut(e), []), Gt = a(ne), Kt = Ht.hasUnsavedChanges || lt || !!q || _t, qt = Kt || !!E.trim() || !!J && !Ve;
2042
2042
  i(() => {
2043
2043
  Gt.current = ne;
2044
2044
  }, [ne]), i(() => {
2045
2045
  Gt.current?.({
2046
2046
  busy: C || Ht.busy,
2047
- hasUnsavedChanges: Kt
2047
+ hasUnsavedChanges: qt
2048
2048
  });
2049
2049
  }, [
2050
2050
  C,
2051
2051
  Ht.busy,
2052
- Kt
2052
+ qt
2053
2053
  ]), i(() => () => {
2054
2054
  Gt.current?.({
2055
2055
  busy: !1,
@@ -2058,46 +2058,46 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2058
2058
  }, []), i(() => {
2059
2059
  et(null), nt(null), ot(Math.max(1, (v?.version ?? 1) - 1)), ct(v?.version ?? 1), v || it(!1);
2060
2060
  }, [v?.projectId, v?.version]);
2061
- let qt = q?.snapshot ?? v, Z = qt?.proposals.find((e) => e.id === ce) ?? qt?.proposals[0], Jt = xe(I, p), Yt = Se(I), Xt = typeof I.checkoutAvailable == "boolean" ? I.checkoutAvailable : I.checkoutEnabled === !0, Zt = [
2061
+ let Jt = q?.snapshot ?? v, Z = Jt?.proposals.find((e) => e.id === ce) ?? Jt?.proposals[0], Yt = Se(F, p), Xt = Ce(F), Zt = typeof F.checkoutAvailable == "boolean" ? F.checkoutAvailable : F.checkoutEnabled === !0, Qt = [
2062
2062
  "paidRegenerations",
2063
2063
  "chatRefinementsPerProject",
2064
2064
  "exportsPerPaidProject"
2065
- ].every((e) => typeof I[e] == "number" && Number.isInteger(I[e]) && Number(I[e]) >= 0) ? {
2066
- regenerations: Number(I.paidRegenerations),
2067
- chat: Number(I.chatRefinementsPerProject),
2068
- exports: Number(I.exportsPerPaidProject)
2065
+ ].every((e) => typeof F[e] == "number" && Number.isInteger(F[e]) && Number(F[e]) >= 0) ? {
2066
+ regenerations: Number(F.paidRegenerations),
2067
+ chat: Number(F.chatRefinementsPerProject),
2068
+ exports: Number(F.exportsPerPaidProject)
2069
2069
  } : null;
2070
2070
  i(() => (Ft.current = !0, () => {
2071
2071
  Ft.current = !1, Y.current++;
2072
2072
  }), []);
2073
- function Qt(e) {
2074
- let t = me();
2073
+ function $t(e) {
2074
+ let t = he();
2075
2075
  if (!Ft.current || e !== Y.current || t !== "licensed") throw new DOMException("The verified session changed.", "AbortError");
2076
2076
  }
2077
- async function $t(e, n) {
2077
+ async function en(e, n) {
2078
2078
  let i = Y.current;
2079
- Qt(i);
2079
+ $t(i);
2080
2080
  let a = new Headers(n?.headers).get("Authorization");
2081
2081
  if (!t && e !== "/session" && a && a !== "Bearer " + It.current) throw new DOMException("The verified session changed.", "AbortError");
2082
2082
  let o = await (r ? r(e, n) : fetch("/v1" + e, n));
2083
- if (e !== "/config" && Qt(i), !t && o.status === 401 && !e.startsWith("/account/")) throw tn(), z("login"), P(!0), T("Sign in with a verified account to continue."), new DOMException("The verified session expired.", "AbortError");
2083
+ if (e !== "/config" && $t(i), !t && o.status === 401 && !e.startsWith("/account/")) throw nn(), R("login"), N(!0), T("Sign in with a verified account to continue."), new DOMException("The verified session expired.", "AbortError");
2084
2084
  return o;
2085
2085
  }
2086
- function en() {
2086
+ function tn() {
2087
2087
  wt(null), Tt.current = null, Vt(!1), Ut({
2088
2088
  busy: !1,
2089
2089
  hasUnsavedChanges: !1
2090
- }), ut(!1), mt(!1), T(""), O(""), ft(!1), Qe(null), We([]), At([]), Mt(void 0), gt(null), vt(!1), bt([]), Ke(!1), Je(!1), D(""), se(null), St([]), b(null), Le(null), Re(null), fe(null), de(null), A(null), He(null), Ie(null), Xe(!1);
2090
+ }), ut(!1), mt(!1), T(""), O(""), ft(!1), Qe(null), We([]), At([]), Mt(void 0), gt(null), vt(!1), bt([]), Ke(!1), Je(!1), D(""), se(null), St([]), b(null), Le(null), Re(null), pe(null), fe(null), de(null), He(null), Ie(null), Xe(!1);
2091
2091
  }
2092
- function tn() {
2093
- (v || Lt.current) && en(), Y.current++, It.current = "", Lt.current = void 0, pe(""), G(void 0);
2092
+ function nn() {
2093
+ (v || Lt.current) && tn(), Y.current++, It.current = "", Lt.current = void 0, me(""), W(void 0);
2094
2094
  }
2095
2095
  async function Q(e, n, r) {
2096
- let i = Y.current, a = await $t(e, {
2096
+ let i = Y.current, a = await en(e, {
2097
2097
  method: r ?? (n ? "POST" : "GET"),
2098
2098
  headers: {
2099
2099
  ...n ? { "Content-Type": "application/json" } : {},
2100
- ...!t && N ? { Authorization: "Bearer " + N } : {}
2100
+ ...!t && M ? { Authorization: "Bearer " + M } : {}
2101
2101
  },
2102
2102
  body: n ? JSON.stringify(n) : void 0
2103
2103
  });
@@ -2107,7 +2107,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2107
2107
  let e = await a.json();
2108
2108
  e && typeof e == "object" && !Array.isArray(e) && (r = e), n = String(r.detail ?? r.title ?? r.error ?? n);
2109
2109
  } catch {}
2110
- Qt(i), a.status === 401 && (t || (tn(), e.startsWith("/account/") || z("login"), P(!0)), n = t ? "Your app session needs attention. Sign in again through your app." : "Sign in with a verified account to continue.");
2110
+ $t(i), a.status === 401 && (t || (nn(), e.startsWith("/account/") || R("login"), N(!0)), n = t ? "Your app session needs attention. Sign in again through your app." : "Sign in with a verified account to continue.");
2111
2111
  let o = /^\/projects\/([a-f0-9]{32})\//.exec(e)?.[1];
2112
2112
  throw !t && a.status === 402 && r.code === "project_quota_exceeded" && o && [
2113
2113
  "operation_cap",
@@ -2118,43 +2118,43 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2118
2118
  projectPaid: r.projectPaid,
2119
2119
  canPurchase: r.canPurchase,
2120
2120
  reason: String(r.reason)
2121
- }), r.canPurchase && !r.projectPaid && nn("paywall")), Error(n);
2121
+ }), r.canPurchase && !r.projectPaid && rn("paywall")), Error(n);
2122
2122
  }
2123
2123
  let o = a.status === 204 ? null : await a.json();
2124
- return Qt(i), o;
2124
+ return $t(i), o;
2125
2125
  }
2126
- async function nn(e, n = Dt) {
2127
- if (!(t || I.analyticsEnabled !== !0)) try {
2128
- await $t("/analytics/events", {
2126
+ async function rn(e, n = Dt) {
2127
+ if (!(t || F.analyticsEnabled !== !0)) try {
2128
+ await en("/analytics/events", {
2129
2129
  method: "POST",
2130
2130
  headers: {
2131
2131
  "Content-Type": "application/json",
2132
- ...N ? { Authorization: "Bearer " + N } : {}
2132
+ ...M ? { Authorization: "Bearer " + M } : {}
2133
2133
  },
2134
2134
  body: JSON.stringify({
2135
- eventId: H(),
2135
+ eventId: V(),
2136
2136
  kind: e,
2137
2137
  consentGranted: n
2138
2138
  })
2139
2139
  });
2140
2140
  } catch {}
2141
2141
  }
2142
- function rn(e) {
2143
- Ot(e), nn("visit", e);
2142
+ function an(e) {
2143
+ Ot(e), rn("visit", e);
2144
2144
  }
2145
2145
  i(() => {
2146
- d !== void 0 && h(Oe(d));
2146
+ d !== void 0 && h(ke(d));
2147
2147
  }, [d]), i(() => {
2148
2148
  t || (document.documentElement.lang = p, document.documentElement.dir = p === "ar" ? "rtl" : "ltr");
2149
2149
  }, [p, t]), i(() => {
2150
2150
  let e = !0;
2151
- return $t("/config").then((e) => e.ok ? e.json() : Promise.reject()).then((t) => {
2152
- e && ye(t);
2151
+ return en("/config").then((e) => e.ok ? e.json() : Promise.reject()).then((t) => {
2152
+ e && be(t);
2153
2153
  }).catch(() => {}), () => {
2154
2154
  e = !1;
2155
2155
  };
2156
2156
  }, [r]), i(() => {
2157
- !t && ke() && history.replaceState({}, "", location.pathname);
2157
+ !t && Ae() && history.replaceState({}, "", location.pathname);
2158
2158
  }, [t]), i(() => {
2159
2159
  if (!J) {
2160
2160
  Be("");
@@ -2163,25 +2163,25 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2163
2163
  let e = URL.createObjectURL(J);
2164
2164
  return Be(e), () => URL.revokeObjectURL(e);
2165
2165
  }, [J]), i(() => {
2166
- t && Rt.current !== te && (Y.current++, en(), Rt.current = te);
2166
+ t && Rt.current !== te && (Y.current++, tn(), Rt.current = te);
2167
2167
  }, [te, t]), i(() => {
2168
2168
  if (!zt) return;
2169
- let e = Ce(localStorage, zt);
2169
+ let e = we(localStorage, zt);
2170
2170
  if (Ie(e), !e || y || v) return;
2171
2171
  let t = !0;
2172
2172
  return Q("/projects/" + e).then((e) => {
2173
- t && (an(e), _(e.input.isDraft ? "measure" : "proposals"));
2173
+ t && (on(e), _(e.input.isDraft ? "measure" : "proposals"));
2174
2174
  }).catch((e) => {
2175
2175
  t && T(e instanceof Error ? e.message : "Could not resume the project.");
2176
2176
  }), () => {
2177
2177
  t = !1;
2178
2178
  };
2179
2179
  }, [zt]);
2180
- function an(t) {
2181
- Ct?.projectId !== t.projectId && wt(null), Qt(Y.current), Qe(t.reconciliation), Xe(!1), t.input.isDraft || (ut(!1), vt(!1)), t.input.isDraft || bt([]), se(t), b(t.pendingDraft?.input ? {
2180
+ function on(t) {
2181
+ Ct?.projectId !== t.projectId && wt(null), $t(Y.current), Qe(t.reconciliation), Xe(!1), t.input.isDraft || (ut(!1), vt(!1)), t.input.isDraft || bt([]), se(t), b(t.pendingDraft?.input ? {
2182
2182
  ...t.pendingDraft.input,
2183
2183
  isDraft: !1
2184
- } : t.input.isDraft ? y ?? Te(p) : t.input), Vt(e && (t.pendingDraft?.workflow ?? t.workflow) === "existing-plan"), t.pendingDraft && (t.pendingDraft.input && ut(!1), He(t.pendingDraft.sourceObjectId ?? null), D(t.pendingDraft.brief ?? "")), S(t.selectedProposalId ?? t.proposals.find((e) => e.recommended)?.id ?? "A"), fe(null), de(null), A(null), Le(null), zt && (we(localStorage, zt, t.projectId), Ie(t.projectId));
2184
+ } : t.input.isDraft ? y ?? Ee(p) : t.input), Vt(e && (t.pendingDraft?.workflow ?? t.workflow) === "existing-plan"), t.pendingDraft && (t.pendingDraft.input && ut(!1), He(t.pendingDraft.sourceObjectId ?? null), D(t.pendingDraft.brief ?? "")), S(t.selectedProposalId ?? t.proposals.find((e) => e.recommended)?.id ?? "A"), pe(null), fe(null), de(null), Le(null), zt && (Te(localStorage, zt, t.projectId), Ie(t.projectId));
2185
2185
  }
2186
2186
  async function $(e) {
2187
2187
  if (!(Pt.current || Ht.busy)) {
@@ -2195,26 +2195,26 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2195
2195
  }
2196
2196
  }
2197
2197
  }
2198
- function on(e) {
2198
+ function sn(e) {
2199
2199
  mt(!1), ae(e), t || history.pushState({}, "", e === "home" ? "/" : "/studio"), window.scrollTo(0, 0);
2200
2200
  }
2201
- function sn(e = !1) {
2202
- Ht.busy || Ht.hasUnsavedChanges || (wt(null), Tt.current = null, Vt(!1), ut(!1), e || Re(null), Ke(!1), Je(!1), We([]), At([]), Mt(void 0), gt(null), vt(!1), bt([]), D(""), se(null), St([]), b(Te(p)), Le(null), fe(null), de(null), A(null), Xe(!1), Qe(null), He(null), _("measure"), on("studio"));
2201
+ function cn(e = !1) {
2202
+ Ht.busy || Ht.hasUnsavedChanges || (wt(null), Tt.current = null, Vt(!1), ut(!1), e || Re(null), Ke(!1), Je(!1), We([]), At([]), Mt(void 0), gt(null), vt(!1), bt([]), D(""), se(null), St([]), b(Ee(p)), Le(null), pe(null), fe(null), de(null), Xe(!1), Qe(null), He(null), _("measure"), sn("studio"));
2203
2203
  }
2204
- async function cn() {
2205
- I.mode === "local-demo" ? (on("studio"), await $(async () => {
2204
+ async function ln() {
2205
+ F.mode === "local-demo" ? (sn("studio"), await $(async () => {
2206
2206
  let e = await Q("/reference?language=" + p);
2207
2207
  b(e), ut(!1), Xe(!1), _("measure"), O("Reference example loaded. Review its site-confirmed dimensions before generating.");
2208
- })) : sn();
2208
+ })) : cn();
2209
2209
  }
2210
- async function ln(e, n) {
2210
+ async function un(e, n) {
2211
2211
  let r = Y.current;
2212
2212
  if (!Ge || !qe) throw Error("Review the image permissions and AI disclosure before upload.");
2213
2213
  let i = new FormData();
2214
2214
  i.append("file", n), i.append("rightsAcknowledged", "true"), i.append("aiProcessingAcknowledged", "true");
2215
- let a = await $t(`/projects/${e.projectId}/uploads`, {
2215
+ let a = await en(`/projects/${e.projectId}/uploads`, {
2216
2216
  method: "POST",
2217
- headers: !t && N ? { Authorization: "Bearer " + N } : {},
2217
+ headers: !t && M ? { Authorization: "Bearer " + M } : {},
2218
2218
  body: i
2219
2219
  });
2220
2220
  if (!a.ok) {
@@ -2223,19 +2223,19 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2223
2223
  let t = await a.json();
2224
2224
  e = t.detail ?? t.title ?? t.error ?? e;
2225
2225
  } catch {}
2226
- throw Qt(r), Error(e);
2226
+ throw $t(r), Error(e);
2227
2227
  }
2228
2228
  let o = await a.json();
2229
- return Qt(r), He(o.upload.id), O("Sketch stored privately. Reading produces observations to confirm, never unchecked dimensions."), o.upload.id;
2229
+ return $t(r), He(o.upload.id), O("Sketch stored privately. Reading produces observations to confirm, never unchecked dimensions."), o.upload.id;
2230
2230
  }
2231
- async function un(e, t = v?.version ?? 0, n = v?.projectId ?? H()) {
2231
+ async function dn(e, t = v?.version ?? 0, n = v?.projectId ?? V()) {
2232
2232
  if (e.input) {
2233
- let t = Ee(e.input);
2233
+ let t = De(e.input);
2234
2234
  if (t) throw Error(t);
2235
2235
  }
2236
2236
  let r = await Q("/drafts", {
2237
2237
  projectId: n,
2238
- operationId: H(),
2238
+ operationId: V(),
2239
2239
  expectedVersion: t,
2240
2240
  pendingDraft: {
2241
2241
  ...e,
@@ -2245,12 +2245,12 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2245
2245
  if (r.projectId !== n || r.version !== t + 1 || r.pendingDraft?.workflow !== e.workflow) throw Error("Pending work could not be saved by this service. Checkout and generation are stopped; keep this page open.");
2246
2246
  return r;
2247
2247
  }
2248
- function dn(e) {
2249
- an(e), _("measure");
2248
+ function fn(e) {
2249
+ on(e), _("measure");
2250
2250
  }
2251
- async function fn() {
2251
+ async function pn() {
2252
2252
  y && await $(async () => {
2253
- let e = Ee(y);
2253
+ let e = De(y);
2254
2254
  if (e) throw Error(e);
2255
2255
  if (J && !Ve && (!Ge || !qe)) throw Error("Review the image permissions and AI disclosure, or remove the local image.");
2256
2256
  if (!Ye) throw Error("Confirm the measured dimensions and bearings before generating.");
@@ -2261,56 +2261,56 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2261
2261
  }, r = await Q("/footprints/reconcile", n.footprint);
2262
2262
  if (Qe(r), r.status !== "Unique") throw Error(r.findings.map((e) => e.message).join(" ") || "The footprint needs another confirmed measurement.");
2263
2263
  let i = v, a = Ve;
2264
- t || (i = await un({
2264
+ t || (i = await dn({
2265
2265
  workflow: "manual",
2266
2266
  input: n,
2267
2267
  sourceObjectId: a ?? void 0
2268
- }, i?.version ?? 0, i?.projectId ?? H()), an(i), Qe(r), J && !a && (a = await ln(i, J), i = await un({
2268
+ }, i?.version ?? 0, i?.projectId ?? V()), on(i), Qe(r), J && !a && (a = await un(i, J), i = await dn({
2269
2269
  workflow: "manual",
2270
2270
  input: n,
2271
2271
  sourceObjectId: a
2272
- }, i.version, i.projectId), an(i), Qe(r)));
2272
+ }, i.version, i.projectId), on(i), Qe(r)));
2273
2273
  let o = i ? await Q(`/projects/${i.projectId}/edits`, {
2274
2274
  expectedVersion: i.version,
2275
- operationId: H(),
2275
+ operationId: V(),
2276
2276
  edit: {
2277
2277
  replaceInput: n,
2278
2278
  note: "Confirmed measurements"
2279
2279
  }
2280
2280
  }) : await Q("/projects", {
2281
- projectId: H(),
2282
- operationId: H(),
2281
+ projectId: V(),
2282
+ operationId: V(),
2283
2283
  input: n
2284
2284
  });
2285
- an(o), wt(null), _(o.input.isDraft ? "measure" : "proposals"), J && !a && await ln(o, J);
2285
+ on(o), wt(null), _(o.input.isDraft ? "measure" : "proposals"), J && !a && await un(o, J);
2286
2286
  });
2287
2287
  }
2288
- async function pn() {
2288
+ async function mn() {
2289
2289
  E.trim() && v && await $(async () => {
2290
2290
  let e = await Q(`/projects/${v.projectId}/chat`, {
2291
2291
  expectedVersion: v.version,
2292
- operationId: H(),
2292
+ operationId: V(),
2293
2293
  message: E
2294
2294
  });
2295
2295
  Le(e.preview), O(e.reply), D(""), _("refine");
2296
2296
  });
2297
2297
  }
2298
- async function mn() {
2299
- if (!De(q, v) || !q || !v) return;
2298
+ async function hn() {
2299
+ if (!Oe(q, v) || !q || !v) return;
2300
2300
  let e = q;
2301
2301
  await $(async () => {
2302
- an(await Q(`/projects/${v.projectId}/edits`, {
2302
+ on(await Q(`/projects/${v.projectId}/edits`, {
2303
2303
  expectedVersion: e.expectedVersion,
2304
- operationId: H(),
2304
+ operationId: V(),
2305
2305
  edit: e.edit
2306
2306
  })), O("Preview applied as a new saved version.");
2307
2307
  });
2308
2308
  }
2309
- async function hn(e) {
2309
+ async function gn(e) {
2310
2310
  v && !q && await $(async () => {
2311
- an(await Q(`/projects/${v.projectId}/edits`, {
2311
+ on(await Q(`/projects/${v.projectId}/edits`, {
2312
2312
  expectedVersion: v.version,
2313
- operationId: H(),
2313
+ operationId: V(),
2314
2314
  edit: {
2315
2315
  selectProposalId: e.id,
2316
2316
  note: "Selected layout " + e.id
@@ -2318,27 +2318,27 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2318
2318
  }));
2319
2319
  });
2320
2320
  }
2321
- async function gn() {
2321
+ async function _n() {
2322
2322
  v && (rt ? it(!1) : await $(async () => {
2323
2323
  let e = await Q(`/projects/${v.projectId}/history`);
2324
2324
  et(e), it(!0);
2325
2325
  }));
2326
2326
  }
2327
- async function _n() {
2327
+ async function vn() {
2328
2328
  v && $e?.some((e) => e.version === at) && $e.some((e) => e.version === st) && await $(async () => {
2329
2329
  nt(await Q(`/projects/${v.projectId}/compare?left=${at}&right=${st}`));
2330
2330
  });
2331
2331
  }
2332
- async function vn() {
2332
+ async function yn() {
2333
2333
  v && at !== v.version && !q && $e?.some((e) => e.version === at) && await $(async () => {
2334
- an(await Q(`/projects/${v.projectId}/undo`, {
2334
+ on(await Q(`/projects/${v.projectId}/undo`, {
2335
2335
  expectedVersion: v.version,
2336
2336
  targetVersion: at,
2337
- operationId: H()
2337
+ operationId: V()
2338
2338
  })), O(g(p, "Saved as a new version. Earlier versions are unchanged."));
2339
2339
  });
2340
2340
  }
2341
- function yn() {
2341
+ function bn() {
2342
2342
  return /* @__PURE__ */ u("section", {
2343
2343
  className: "project-price",
2344
2344
  children: [
@@ -2349,17 +2349,17 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2349
2349
  fr: "Ce parcours produit des fichiers 2D vérifiés, sans reconstruction BIM automatique. L’enregistrement utilise le quota du projet ; vérifier le devis et les limites avant achat.",
2350
2350
  ar: "ينتج هذا المسار ملفات ثنائية الأبعاد مراجعة، وليس إعادة بناء BIM تلقائية. يستخدم الحفظ حصة المشروع؛ راجع السعر والحدود قبل الشراء."
2351
2351
  }[p] : "One project includes proposals, refinements and its BIM model within the configured caps. Free allowances are checked by the service." }),
2352
- Zt ? /* @__PURE__ */ u("p", {
2352
+ Qt ? /* @__PURE__ */ u("p", {
2353
2353
  className: "quota-disclosure",
2354
2354
  children: [
2355
2355
  "After the initial proposal request: ",
2356
- Zt.regenerations,
2356
+ Qt.regenerations,
2357
2357
  " regenerations · ",
2358
- Zt.chat,
2358
+ Qt.chat,
2359
2359
  " chat refinements · ",
2360
- Zt.exports,
2360
+ Qt.exports,
2361
2361
  " ",
2362
- Zt.exports === 1 ? "BIM export" : "BIM exports",
2362
+ Qt.exports === 1 ? "BIM export" : "BIM exports",
2363
2363
  " per paid project."
2364
2364
  ]
2365
2365
  }) : /* @__PURE__ */ l("p", { children: "Project usage limits are unavailable. Checkout stays disabled until they can be shown." }),
@@ -2367,7 +2367,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2367
2367
  role: "status",
2368
2368
  children: g(p, "This paid project reached its configured limit. Another purchase will not extend its allowance.")
2369
2369
  }) : k ? /* @__PURE__ */ u(c, { children: [
2370
- /* @__PURE__ */ l("strong", { children: xe({
2370
+ /* @__PURE__ */ l("strong", { children: Se({
2371
2371
  priceMinorUnits: k.priceMinorUnits,
2372
2372
  currency: k.currency
2373
2373
  }, p) }),
@@ -2378,39 +2378,39 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2378
2378
  ] }),
2379
2379
  /* @__PURE__ */ l("button", {
2380
2380
  className: "ink full",
2381
- disabled: C || !Xt || !Zt,
2382
- onClick: xn,
2381
+ disabled: C || !Zt || !Qt,
2382
+ onClick: Sn,
2383
2383
  children: g(p, "Continue to Stripe")
2384
2384
  }),
2385
2385
  /* @__PURE__ */ l("button", {
2386
2386
  className: "textbtn",
2387
2387
  disabled: C,
2388
- onClick: bn,
2388
+ onClick: xn,
2389
2389
  children: g(p, "Refresh project quote")
2390
2390
  })
2391
2391
  ] }) : /* @__PURE__ */ l("button", {
2392
2392
  className: "outline full",
2393
- disabled: C || !Xt,
2394
- onClick: bn,
2393
+ disabled: C || !Zt,
2394
+ onClick: xn,
2395
2395
  children: g(p, "View project price")
2396
2396
  }),
2397
- !Xt && /* @__PURE__ */ l("small", { children: g(p, "Purchases are not enabled in this environment.") }),
2397
+ !Zt && /* @__PURE__ */ l("small", { children: g(p, "Purchases are not enabled in this environment.") }),
2398
2398
  /* @__PURE__ */ l("small", { children: "A checkout return is not proof of payment; downloads use the service's verified entitlement." })
2399
2399
  ]
2400
2400
  });
2401
2401
  }
2402
- async function bn() {
2402
+ async function xn() {
2403
2403
  v && !t && await $(async () => {
2404
2404
  let e = await Q("/account/quote", { projectId: v.projectId });
2405
- if (e.projectId !== v.projectId || !e.quoteId || xe({
2405
+ if (e.projectId !== v.projectId || !e.quoteId || Se({
2406
2406
  priceMinorUnits: e.priceMinorUnits,
2407
2407
  currency: e.currency
2408
2408
  }, p) === null || !Number.isFinite(Date.parse(e.expiresAtUtc))) throw Error("A valid project quote was not supplied.");
2409
- A(e);
2409
+ de(e);
2410
2410
  });
2411
2411
  }
2412
- async function xn() {
2413
- v && k && !t && Xt && Zt && (Ct?.projectId !== v.projectId || !Ct.projectPaid) && await $(async () => {
2412
+ async function Sn() {
2413
+ v && k && !t && Zt && Qt && (Ct?.projectId !== v.projectId || !Ct.projectPaid) && await $(async () => {
2414
2414
  let e = k;
2415
2415
  if (J && !Ve) throw Error("Scan and save the selected image before checkout so it can be restored after payment.");
2416
2416
  if (e.projectId !== v.projectId || Date.parse(e.expiresAtUtc) <= Date.now()) throw Error("This quote expired. Refresh the project quote before purchase.");
@@ -2419,69 +2419,69 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2419
2419
  let e = Tt.current;
2420
2420
  if (!e) throw Error("The existing-plan editor is not ready to preserve your latest work. Checkout is stopped; keep this page open.");
2421
2421
  t = await e() ?? t;
2422
- } else y && (t = await un({
2422
+ } else y && (t = await dn({
2423
2423
  workflow: "manual",
2424
2424
  input: y,
2425
2425
  sourceObjectId: Ve ?? void 0
2426
- }, t.version, t.projectId), an(t));
2426
+ }, t.version, t.projectId), on(t));
2427
2427
  if (Date.parse(e.expiresAtUtc) <= Date.now()) throw Error("This quote expired. Refresh the project quote before purchase.");
2428
2428
  let n = await Q("/account/checkout", {
2429
2429
  projectId: t.projectId,
2430
- requestId: H(),
2430
+ requestId: V(),
2431
2431
  quoteId: e.quoteId
2432
2432
  }), r = new URL(n.url);
2433
2433
  if (r.protocol !== "https:" || r.hostname !== "checkout.stripe.com" || r.username || r.password) throw Error("The checkout address was not accepted.");
2434
2434
  window.location.assign(r.href);
2435
2435
  });
2436
2436
  }
2437
- function Sn() {
2438
- en(), Y.current++, It.current = "", Lt.current = void 0, T(""), pe(""), G(void 0), ve(""), _e(""), V(""), O("Signed out. Your saved project stays private and can resume after sign-in.");
2437
+ function Cn() {
2438
+ tn(), Y.current++, It.current = "", Lt.current = void 0, T(""), me(""), W(void 0), ye(""), ve(""), B(""), O("Signed out. Your saved project stays private and can resume after sign-in.");
2439
2439
  }
2440
- async function Cn() {
2440
+ async function wn() {
2441
2441
  v && Z && !q && await $(async () => {
2442
- de(await Q(`/projects/${v.projectId}/drawings`, {
2442
+ fe(await Q(`/projects/${v.projectId}/drawings`, {
2443
2443
  expectedVersion: v.version,
2444
- operationId: H(),
2444
+ operationId: V(),
2445
2445
  proposalId: Z.id
2446
2446
  })), O("2D concept drawings prepared. This does not spend the BIM model export.");
2447
2447
  });
2448
2448
  }
2449
- async function wn() {
2449
+ async function Tn() {
2450
2450
  v && Z && !q && await $(async () => {
2451
2451
  let e = await Q(`/projects/${v.projectId}/exports`, {
2452
2452
  expectedVersion: v.version,
2453
- operationId: H(),
2453
+ operationId: V(),
2454
2454
  proposalId: Z.id
2455
2455
  });
2456
- fe(e), _("download");
2456
+ pe(e), _("download");
2457
2457
  });
2458
2458
  }
2459
- async function Tn(e, n = M) {
2459
+ async function En(e, n = j) {
2460
2460
  n && v && await $(async () => {
2461
- let r = Y.current, i = await $t(`/projects/${v.projectId}/objects/${n.files[e].id}`, { headers: !t && N ? { Authorization: "Bearer " + N } : {} });
2461
+ let r = Y.current, i = await en(`/projects/${v.projectId}/objects/${n.files[e].id}`, { headers: !t && M ? { Authorization: "Bearer " + M } : {} });
2462
2462
  if (!i.ok) throw Error("Download unavailable.");
2463
2463
  let a = await i.blob();
2464
- Qt(r);
2464
+ $t(r);
2465
2465
  let o = URL.createObjectURL(a), s = document.createElement("a");
2466
2466
  s.href = o, s.download = `${f === "karamentreprises" ? "karamentreprises" : "baulynq"}-${n.proposalId}-v${n.version}.${e}`, s.click(), setTimeout(() => URL.revokeObjectURL(o), 1e3);
2467
2467
  });
2468
2468
  }
2469
- async function En(e) {
2469
+ async function Dn(e) {
2470
2470
  Ht.busy || Pt.current || (![
2471
2471
  "image/png",
2472
2472
  "image/jpeg",
2473
2473
  "image/webp"
2474
- ].includes(e.type) || e.size > 8388608 ? T("Choose a PNG, JPEG or WebP up to 8 MB.") : (Re(e), He(null), Ke(!1), Je(!1), v ? (_("measure"), O("Local preview only. Review permissions and AI disclosure before uploading the image.")) : (y || sn(!0), _("measure"), O("Local sketch preview only. Review permissions, then scan and store it privately before asking AI to read observations. No measured footprint is required for that step."))));
2474
+ ].includes(e.type) || e.size > 8388608 ? T("Choose a PNG, JPEG or WebP up to 8 MB.") : (Re(e), He(null), Ke(!1), Je(!1), v ? (_("measure"), O("Local preview only. Review permissions and AI disclosure before uploading the image.")) : (y || cn(!0), _("measure"), O("Local sketch preview only. Review permissions, then scan and store it privately before asking AI to read observations. No measured footprint is required for that step."))));
2475
2475
  }
2476
- async function Dn() {
2476
+ async function On() {
2477
2477
  Kt || await $(async () => {
2478
- an(await Q("/drafts", {
2479
- projectId: H(),
2480
- operationId: H()
2481
- })), Vt(!0), _("measure"), on("studio");
2478
+ on(await Q("/drafts", {
2479
+ projectId: V(),
2480
+ operationId: V()
2481
+ })), Vt(!0), _("measure"), sn("studio");
2482
2482
  });
2483
2483
  }
2484
- function On() {
2484
+ function kn() {
2485
2485
  return /* @__PURE__ */ u("section", {
2486
2486
  className: "paper consent-panel",
2487
2487
  children: [
@@ -2519,7 +2519,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2519
2519
  /* @__PURE__ */ l("button", {
2520
2520
  className: "ink",
2521
2521
  disabled: C || !Ge || !qe,
2522
- onClick: kn,
2522
+ onClick: An,
2523
2523
  children: g(p, "Upload for scanning")
2524
2524
  }),
2525
2525
  /* @__PURE__ */ l("button", {
@@ -2533,78 +2533,78 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2533
2533
  ]
2534
2534
  });
2535
2535
  }
2536
- async function kn() {
2536
+ async function An() {
2537
2537
  J && await $(async () => {
2538
2538
  let e = v;
2539
2539
  e || (e = await Q("/drafts", {
2540
- projectId: H(),
2541
- operationId: H()
2542
- }), an(e), _("measure")), await ln(e, J);
2540
+ projectId: V(),
2541
+ operationId: V()
2542
+ }), on(e), _("measure")), await un(e, J);
2543
2543
  });
2544
2544
  }
2545
- async function An() {
2545
+ async function jn() {
2546
2546
  v && Ve && await $(async () => {
2547
2547
  let e = await Q(`/projects/${v.projectId}/read-sketch`, {
2548
2548
  expectedVersion: v.version,
2549
- operationId: H(),
2549
+ operationId: V(),
2550
2550
  objectId: Ve,
2551
2551
  intent: E || "Read the sketch measurements and identify uncertainties."
2552
2552
  });
2553
2553
  At(e.observations), Mt(e.values), gt(e.candidate ?? null), vt(!1), We(e.questions), O("Recognized values remain estimated. Preview the outline, check labels and assumptions, then explicitly adopt reviewed measurements."), _("measure");
2554
2554
  });
2555
2555
  }
2556
- async function jn() {
2556
+ async function Mn() {
2557
2557
  v && await $(async () => {
2558
2558
  let e = await Q(`/projects/${v.projectId}`, void 0, "DELETE");
2559
- se(null), St([]), b(null), fe(null), de(null), A(null), Le(null), ut(!1), Re(null), He(null), We([]), At([]), Mt(void 0), gt(null), vt(!1), bt([]), Qe(null), zt && we(localStorage, zt, null), Ie(null), O(e.dataErased === !0 ? `Service reports project data erased. ${e.accountingPending ? "Accounting cleanup is still pending." : "Accounting cleanup completed."}` : "Deletion accepted; data erasure is still pending. The service will continue cleanup.");
2559
+ se(null), St([]), b(null), pe(null), fe(null), de(null), Le(null), ut(!1), Re(null), He(null), We([]), At([]), Mt(void 0), gt(null), vt(!1), bt([]), Qe(null), zt && Te(localStorage, zt, null), Ie(null), O(e.dataErased === !0 ? `Service reports project data erased. ${e.accountingPending ? "Accounting cleanup is still pending." : "Accounting cleanup completed."}` : "Deletion accepted; data erasure is still pending. The service will continue cleanup.");
2560
2560
  });
2561
2561
  }
2562
- async function Mn() {
2563
- !t && N && await $(async () => {
2562
+ async function Nn() {
2563
+ !t && M && await $(async () => {
2564
2564
  let e = await Q("/account/data", void 0, "DELETE");
2565
- Dt && (await nn("visit", !1), Ot(!1)), en(), Y.current++, zt && we(localStorage, zt, null), _("measure"), O((e.dataErased ? "Service reports project content erased." : "Content deletion accepted; erasure is still pending.") + " " + (e.accountingPending ? "Accounting cleanup is still pending. " : "") + "Account identity, billing and required anti-abuse metadata are retained.");
2565
+ Dt && (await rn("visit", !1), Ot(!1)), tn(), Y.current++, zt && Te(localStorage, zt, null), _("measure"), O((e.dataErased ? "Service reports project content erased." : "Content deletion accepted; erasure is still pending.") + " " + (e.accountingPending ? "Accounting cleanup is still pending. " : "") + "Account identity, billing and required anti-abuse metadata are retained.");
2566
2566
  });
2567
2567
  }
2568
- async function Nn() {
2568
+ async function Pn() {
2569
2569
  await $(async () => {
2570
2570
  let e = Y.current;
2571
- if (R === "signup") {
2572
- await Q("/account/signup", { email: ge }), O("Check your email for the verification link. No session is created until ownership is verified."), z("verify"), ve("");
2571
+ if (L === "signup") {
2572
+ await Q("/account/signup", { email: _e }), O("Check your email for the verification link. No session is created until ownership is verified."), R("verify"), ye("");
2573
2573
  return;
2574
2574
  }
2575
- let t = await Q(R === "verify" ? "/account/verification/complete" : "/account/login", R === "verify" ? {
2576
- token: B,
2577
- password: F
2575
+ let t = await Q(L === "verify" ? "/account/verification/complete" : "/account/login", L === "verify" ? {
2576
+ token: z,
2577
+ password: P
2578
2578
  } : {
2579
- email: ge,
2580
- password: F
2579
+ email: _e,
2580
+ password: P
2581
2581
  });
2582
- if (ve(""), V(""), !t.token) {
2583
- z("login"), O("Email verified. Sign in to continue.");
2582
+ if (ye(""), B(""), !t.token) {
2583
+ R("login"), O("Email verified. Sign in to continue.");
2584
2584
  return;
2585
2585
  }
2586
- let n = await $t("/session", { headers: { Authorization: "Bearer " + t.token } });
2586
+ let n = await en("/session", { headers: { Authorization: "Bearer " + t.token } });
2587
2587
  if (!n.ok) throw Error("The verified workspace could not be loaded.");
2588
2588
  let r = await n.json();
2589
- if (Qt(e), typeof r.workspaceKey != "string" || !r.workspaceKey || r.workspaceKey.length > 512) throw Error("The verified workspace could not be loaded.");
2590
- Lt.current && Lt.current !== r.workspaceKey && en(), Y.current++, It.current = t.token, Lt.current = r.workspaceKey, pe(t.token), G(r.workspaceKey), P(!1), O("Signed in. This session stays in memory only.");
2589
+ if ($t(e), typeof r.workspaceKey != "string" || !r.workspaceKey || r.workspaceKey.length > 512) throw Error("The verified workspace could not be loaded.");
2590
+ Lt.current && Lt.current !== r.workspaceKey && tn(), Y.current++, It.current = t.token, Lt.current = r.workspaceKey, me(t.token), W(r.workspaceKey), N(!1), O("Signed in. This session stays in memory only.");
2591
2591
  });
2592
2592
  }
2593
- function Pn() {
2593
+ function Fn() {
2594
2594
  ht?.input && (ut(!0), b({
2595
- ...y ?? Te(p),
2595
+ ...y ?? Ee(p),
2596
2596
  footprint: ht.input
2597
2597
  }), Qe(ht.reconciliation), bt(ht.input.edges.flatMap((e, t) => [`footprint.edges[${t}].lengthM`, ...e.bearingDegrees == null ? [] : [`footprint.edges[${t}].bearingDegrees`]])), vt(!0), Xe(!1), Le(null), _("measure"), O("Recognized outline is a local estimated preview. No project version or proposal was changed. Review every length, bearing and wall type before adoption."));
2598
2598
  }
2599
- function Fn(e) {
2599
+ function In(e) {
2600
2600
  Re(null), Be(""), He(e), _("measure"), O("Saved sanitized sketch selected. Reading it with AI is a separate explicit action.");
2601
2601
  }
2602
- async function In(e, n) {
2602
+ async function Ln(e, n) {
2603
2603
  v && await $(async () => {
2604
- let r = Y.current, i = await $t(`/projects/${v.projectId}/objects/${n.objectId}`, { headers: !t && N ? { Authorization: "Bearer " + N } : {} });
2604
+ let r = Y.current, i = await en(`/projects/${v.projectId}/objects/${n.objectId}`, { headers: !t && M ? { Authorization: "Bearer " + M } : {} });
2605
2605
  if (!i.ok) throw Error("Saved file is unavailable or expired.");
2606
2606
  let a = await i.blob();
2607
- Qt(r);
2607
+ $t(r);
2608
2608
  let o = URL.createObjectURL(a), s = document.createElement("a");
2609
2609
  s.href = o, s.download = `${f === "karamentreprises" ? "karamentreprises" : "baulynq"}-${e.kind}${e.version ? "-v" + e.version : ""}.${n.format}`, s.click(), setTimeout(() => URL.revokeObjectURL(o), 1e3);
2610
2610
  });
@@ -2624,7 +2624,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2624
2624
  v?.version,
2625
2625
  Ve
2626
2626
  ]);
2627
- let Ln = oe === "measure" ? Ze?.values : Z?.values ?? qt?.reconciliation.values ?? Ze?.values, Rn = Z?.findings.reduce((e, t) => (e[t.status] = (e[t.status] ?? 0) + 1, e), {}) ?? {};
2627
+ let Rn = oe === "measure" ? Ze?.values : Z?.values ?? Jt?.reconciliation.values ?? Ze?.values, zn = Z?.findings.reduce((e, t) => (e[t.status] = (e[t.status] ?? 0) + 1, e), {}) ?? {};
2628
2628
  return /* @__PURE__ */ u("div", {
2629
2629
  className: "bim-studio",
2630
2630
  dir: p === "ar" ? "rtl" : "ltr",
@@ -2633,13 +2633,13 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2633
2633
  className: "logo",
2634
2634
  href: "/",
2635
2635
  onClick: (e) => {
2636
- e.preventDefault(), on("home");
2636
+ e.preventDefault(), sn("home");
2637
2637
  },
2638
- children: /* @__PURE__ */ l(Ae, {})
2638
+ children: /* @__PURE__ */ l(je, {})
2639
2639
  }), /* @__PURE__ */ u("nav", { children: [
2640
2640
  /* @__PURE__ */ l("a", {
2641
2641
  href: "/#pricing",
2642
- onClick: () => ie !== "home" && on("home"),
2642
+ onClick: () => ie !== "home" && sn("home"),
2643
2643
  children: X.pricing
2644
2644
  }),
2645
2645
  /* @__PURE__ */ l("select", {
@@ -2659,10 +2659,10 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2659
2659
  /* @__PURE__ */ l("button", {
2660
2660
  className: "quiet account-action",
2661
2661
  disabled: C,
2662
- onClick: () => N ? on("studio") : P(!0),
2663
- children: N ? X.account : X.signin
2662
+ onClick: () => M ? sn("studio") : N(!0),
2663
+ children: M ? X.account : X.signin
2664
2664
  }),
2665
- N && /* @__PURE__ */ u("div", {
2665
+ M && /* @__PURE__ */ u("div", {
2666
2666
  className: "account-options",
2667
2667
  children: [/* @__PURE__ */ l("button", {
2668
2668
  className: "quiet",
@@ -2690,15 +2690,15 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2690
2690
  }), /* @__PURE__ */ l("button", {
2691
2691
  className: "quiet full",
2692
2692
  disabled: C,
2693
- onClick: Sn,
2693
+ onClick: Cn,
2694
2694
  children: g(p, "Sign out")
2695
2695
  })]
2696
2696
  })]
2697
2697
  }),
2698
2698
  /* @__PURE__ */ u("button", {
2699
2699
  className: "ink",
2700
- onClick: () => on("studio"),
2701
- children: [X.studio, /* @__PURE__ */ l(U, {})]
2700
+ onClick: () => sn("studio"),
2701
+ children: [X.studio, /* @__PURE__ */ l(H, {})]
2702
2702
  })
2703
2703
  ] })] }),
2704
2704
  ie === "home" ? /* @__PURE__ */ u("main", {
@@ -2721,15 +2721,15 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2721
2721
  className: "actions",
2722
2722
  children: [/* @__PURE__ */ u("button", {
2723
2723
  className: "ink large",
2724
- onClick: () => on("studio"),
2725
- children: [X.start, /* @__PURE__ */ l(U, {})]
2726
- }), I.mode === "local-demo" ? /* @__PURE__ */ u("button", {
2724
+ onClick: () => sn("studio"),
2725
+ children: [X.start, /* @__PURE__ */ l(H, {})]
2726
+ }), F.mode === "local-demo" ? /* @__PURE__ */ u("button", {
2727
2727
  className: "textbtn",
2728
- onClick: cn,
2728
+ onClick: ln,
2729
2729
  children: [X.try, " →"]
2730
2730
  }) : /* @__PURE__ */ u("button", {
2731
2731
  className: "textbtn",
2732
- onClick: () => sn(),
2732
+ onClick: () => cn(),
2733
2733
  children: [g(p, "Enter measurements"), " →"]
2734
2734
  })]
2735
2735
  }),
@@ -2749,7 +2749,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2749
2749
  className: "card-title",
2750
2750
  children: [/* @__PURE__ */ l("span", { children: "01 / SKETCH" }), /* @__PURE__ */ l("span", { children: "THE STARTING POINT" })]
2751
2751
  }),
2752
- /* @__PURE__ */ l(W, {}),
2752
+ /* @__PURE__ */ l(U, {}),
2753
2753
  /* @__PURE__ */ l("h3", { children: X.before })
2754
2754
  ]
2755
2755
  }),
@@ -2775,13 +2775,13 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2775
2775
  })
2776
2776
  }),
2777
2777
  /* @__PURE__ */ l("h3", { children: X.after }),
2778
- I.mode === "local-demo" ? /* @__PURE__ */ u("button", {
2778
+ F.mode === "local-demo" ? /* @__PURE__ */ u("button", {
2779
2779
  className: "textbtn",
2780
- onClick: cn,
2780
+ onClick: ln,
2781
2781
  children: [X.try, " ↗"]
2782
2782
  }) : /* @__PURE__ */ u("button", {
2783
2783
  className: "textbtn",
2784
- onClick: () => sn(),
2784
+ onClick: () => cn(),
2785
2785
  children: [g(p, "Enter measurements"), " ↗"]
2786
2786
  })
2787
2787
  ]
@@ -2840,30 +2840,30 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2840
2840
  className: "eyebrow",
2841
2841
  children: f === "karamentreprises" ? "KARAMENTREPRISES BIM" : "BAULYNQ VISION"
2842
2842
  }),
2843
- /* @__PURE__ */ l("h2", { children: Jt ?? "Pricing opens with the service" }),
2843
+ /* @__PURE__ */ l("h2", { children: Yt ?? "Pricing opens with the service" }),
2844
2844
  /* @__PURE__ */ l("small", { children: "Base pricing. Your project quote is shown before purchase." }),
2845
- /* @__PURE__ */ l("p", { children: Yt ? `${Yt.proposals} free proposal generations · ${Yt.exports} BIM exports` : "The local preview does not accept payments." }),
2845
+ /* @__PURE__ */ l("p", { children: Xt ? `${Xt.proposals} free proposal generations · ${Xt.exports} BIM exports` : "The local preview does not accept payments." }),
2846
2846
  /* @__PURE__ */ l("p", { children: "One project includes proposals, refinements and its model export." }),
2847
- Zt && /* @__PURE__ */ u("p", { children: [
2847
+ Qt && /* @__PURE__ */ u("p", { children: [
2848
2848
  "After the initial proposal request: ",
2849
- Zt.regenerations,
2849
+ Qt.regenerations,
2850
2850
  " regenerations · ",
2851
- Zt.chat,
2851
+ Qt.chat,
2852
2852
  " chat refinements · ",
2853
- Zt.exports,
2853
+ Qt.exports,
2854
2854
  " ",
2855
- Zt.exports === 1 ? "BIM export" : "BIM exports",
2855
+ Qt.exports === 1 ? "BIM export" : "BIM exports",
2856
2856
  " per paid project."
2857
2857
  ] }),
2858
2858
  /* @__PURE__ */ u("button", {
2859
2859
  className: "ink",
2860
- onClick: () => on("studio"),
2861
- children: [X.start, /* @__PURE__ */ l(U, {})]
2860
+ onClick: () => sn("studio"),
2861
+ children: [X.start, /* @__PURE__ */ l(H, {})]
2862
2862
  })
2863
2863
  ]
2864
2864
  })]
2865
2865
  }),
2866
- /* @__PURE__ */ u("footer", { children: [/* @__PURE__ */ l(Ae, {}), /* @__PURE__ */ l("span", { children: X.disclaimer })] })
2866
+ /* @__PURE__ */ u("footer", { children: [/* @__PURE__ */ l(je, {}), /* @__PURE__ */ l("span", { children: X.disclaimer })] })
2867
2867
  ]
2868
2868
  }) : /* @__PURE__ */ u("main", {
2869
2869
  className: "studio",
@@ -2878,7 +2878,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2878
2878
  /* @__PURE__ */ l("h2", { children: X.workspace }),
2879
2879
  /* @__PURE__ */ u("span", {
2880
2880
  className: "project-status",
2881
- children: [/* @__PURE__ */ l("span", { className: "dot" }), I.mode === "local-demo" ? "Local reference preview" : "Private project"]
2881
+ children: [/* @__PURE__ */ l("span", { className: "dot" }), F.mode === "local-demo" ? "Local reference preview" : "Private project"]
2882
2882
  }),
2883
2883
  /* @__PURE__ */ l("div", {
2884
2884
  className: "stage-nav",
@@ -2898,14 +2898,14 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2898
2898
  className: "rail-bottom",
2899
2899
  children: [
2900
2900
  /* @__PURE__ */ l("p", { children: X.privacy }),
2901
- typeof I.retentionDays == "number" && /* @__PURE__ */ u("p", { children: [
2901
+ typeof F.retentionDays == "number" && /* @__PURE__ */ u("p", { children: [
2902
2902
  "Retention: ",
2903
- I.retentionDays,
2903
+ F.retentionDays,
2904
2904
  " days, as configured by the service."
2905
2905
  ] }),
2906
2906
  v && /* @__PURE__ */ l("button", {
2907
2907
  className: "quiet danger",
2908
- onClick: jn,
2908
+ onClick: Mn,
2909
2909
  children: X.delete
2910
2910
  })
2911
2911
  ]
@@ -2940,24 +2940,24 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2940
2940
  /* @__PURE__ */ l("button", {
2941
2941
  className: "quiet",
2942
2942
  disabled: C,
2943
- onClick: () => sn(),
2943
+ onClick: () => cn(),
2944
2944
  children: g(p, "New project")
2945
2945
  }),
2946
2946
  v && /* @__PURE__ */ l("button", {
2947
2947
  className: "quiet compact-delete",
2948
2948
  "aria-label": "Delete current project",
2949
2949
  disabled: C,
2950
- onClick: jn,
2950
+ onClick: Mn,
2951
2951
  children: X.delete
2952
2952
  }),
2953
2953
  v && /* @__PURE__ */ u("button", {
2954
2954
  className: "outline",
2955
2955
  disabled: C || !!q || v.version < 2,
2956
2956
  onClick: () => $(async () => {
2957
- an(await Q(`/projects/${v.projectId}/undo`, {
2957
+ on(await Q(`/projects/${v.projectId}/undo`, {
2958
2958
  expectedVersion: v.version,
2959
2959
  targetVersion: v.version - 1,
2960
- operationId: H()
2960
+ operationId: V()
2961
2961
  }));
2962
2962
  }),
2963
2963
  children: ["↶ ", X.undo]
@@ -2995,8 +2995,8 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
2995
2995
  ] }),
2996
2996
  /* @__PURE__ */ l("button", {
2997
2997
  className: "ink",
2998
- disabled: C || !De(q, v),
2999
- onClick: mn,
2998
+ disabled: C || !Oe(q, v),
2999
+ onClick: hn,
3000
3000
  children: g(p, "Apply as new version")
3001
3001
  }),
3002
3002
  /* @__PURE__ */ l("button", {
@@ -3022,11 +3022,11 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3022
3022
  className: "ink large",
3023
3023
  disabled: C,
3024
3024
  onClick: () => Nt.current?.click(),
3025
- children: [X.upload, /* @__PURE__ */ l(U, {})]
3025
+ children: [X.upload, /* @__PURE__ */ l(H, {})]
3026
3026
  }), /* @__PURE__ */ l("button", {
3027
3027
  className: "outline",
3028
3028
  disabled: C,
3029
- onClick: () => sn(),
3029
+ onClick: () => cn(),
3030
3030
  children: g(p, "Enter measurements")
3031
3031
  })]
3032
3032
  }),
@@ -3035,14 +3035,14 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3035
3035
  disabled: C,
3036
3036
  onClick: () => $(async () => {
3037
3037
  let e = await Q("/projects/" + Fe);
3038
- an(e), _(e.input.isDraft ? "measure" : "proposals");
3038
+ on(e), _(e.input.isDraft ? "measure" : "proposals");
3039
3039
  }),
3040
3040
  children: g(p, "Resume saved project")
3041
3041
  }),
3042
- I.mode === "local-demo" && /* @__PURE__ */ l("button", {
3042
+ F.mode === "local-demo" && /* @__PURE__ */ l("button", {
3043
3043
  className: "textbtn",
3044
3044
  disabled: C,
3045
- onClick: cn,
3045
+ onClick: ln,
3046
3046
  children: X.try
3047
3047
  })
3048
3048
  ]
@@ -3075,7 +3075,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3075
3075
  maxHeight: 350
3076
3076
  }
3077
3077
  }),
3078
- J && !Ve && On()
3078
+ J && !Ve && kn()
3079
3079
  ]
3080
3080
  }) : oe === "measure" && y ? /* @__PURE__ */ u(c, { children: [
3081
3081
  /* @__PURE__ */ l(K, {
@@ -3092,13 +3092,13 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3092
3092
  estimatedFields: yt,
3093
3093
  confirmed: Ye,
3094
3094
  setConfirmed: Xe,
3095
- onGenerate: fn,
3095
+ onGenerate: pn,
3096
3096
  busy: C,
3097
3097
  onUpload: () => Nt.current?.click(),
3098
3098
  imageUrl: ze,
3099
3099
  geometry: Ze
3100
3100
  }),
3101
- J && !Ve && On(),
3101
+ J && !Ve && kn(),
3102
3102
  Ve && /* @__PURE__ */ u("section", {
3103
3103
  className: "paper consent-panel",
3104
3104
  children: [
@@ -3116,7 +3116,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3116
3116
  /* @__PURE__ */ l("button", {
3117
3117
  className: "outline",
3118
3118
  disabled: C,
3119
- onClick: An,
3119
+ onClick: jn,
3120
3120
  children: g(p, "Read saved sketch with AI · observations only")
3121
3121
  })
3122
3122
  ]
@@ -3130,7 +3130,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3130
3130
  /* @__PURE__ */ l("button", {
3131
3131
  className: "outline",
3132
3132
  disabled: C || !ht.input || _t,
3133
- onClick: Pn,
3133
+ onClick: Fn,
3134
3134
  children: g(p, "Preview recognized outline")
3135
3135
  }),
3136
3136
  _t && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("p", { children: g(p, "Local estimated preview only. The saved project is unchanged.") }), /* @__PURE__ */ l(Pe, { candidate: ht })] }),
@@ -3173,30 +3173,30 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3173
3173
  /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("span", { children: [
3174
3174
  X.area,
3175
3175
  " ",
3176
- /* @__PURE__ */ l(Me, {
3176
+ /* @__PURE__ */ l(G, {
3177
3177
  language: p,
3178
- report: Ln,
3178
+ report: Rn,
3179
3179
  path: "centerlineAreaM2"
3180
3180
  })
3181
3181
  ] }), /* @__PURE__ */ u("strong", { children: [Z.centerlineAreaM2.toFixed(2), /* @__PURE__ */ l("small", { children: "m²" })] })] }),
3182
3182
  /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("span", { children: [
3183
3183
  X.net,
3184
3184
  " ",
3185
- /* @__PURE__ */ l(Me, {
3185
+ /* @__PURE__ */ l(G, {
3186
3186
  language: p,
3187
- report: Ln,
3187
+ report: Rn,
3188
3188
  path: "netAreaM2"
3189
3189
  })
3190
3190
  ] }), /* @__PURE__ */ u("strong", { children: [Z.netAreaM2.toFixed(2), /* @__PURE__ */ l("small", { children: "m²" })] })] }),
3191
3191
  /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("span", { children: [
3192
3192
  X.perimeter,
3193
3193
  " ",
3194
- /* @__PURE__ */ l(Me, {
3194
+ /* @__PURE__ */ l(G, {
3195
3195
  language: p,
3196
- report: Ln,
3196
+ report: Rn,
3197
3197
  path: "perimeterM"
3198
3198
  })
3199
- ] }), /* @__PURE__ */ u("strong", { children: [qt?.reconciliation.solutions[0]?.perimeterM.toFixed(2), /* @__PURE__ */ l("small", { children: "m" })] })] }),
3199
+ ] }), /* @__PURE__ */ u("strong", { children: [Jt?.reconciliation.solutions[0]?.perimeterM.toFixed(2), /* @__PURE__ */ l("small", { children: "m" })] })] }),
3200
3200
  /* @__PURE__ */ u("div", {
3201
3201
  className: "metric-note",
3202
3202
  children: [Z.hasRequiredConflicts ? X.warning : g(p, "Required layout checks passed"), /* @__PURE__ */ l("span", { children: g(p, "Reference sources remain visible below.") })]
@@ -3228,7 +3228,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3228
3228
  children: [/* @__PURE__ */ l("span", { children: f === "karamentreprises" ? "KARAMENTREPRISES BIM" : "BAULYNQ VISION" }), /* @__PURE__ */ u("span", { children: [
3229
3229
  q ? "PREVIEW / " : "",
3230
3230
  "v",
3231
- qt?.version,
3231
+ Jt?.version,
3232
3232
  " · ",
3233
3233
  p.toUpperCase()
3234
3234
  ] })]
@@ -3241,11 +3241,11 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3241
3241
  className: "eyebrow",
3242
3242
  children: "FIND YOUR FIT"
3243
3243
  }),
3244
- qt?.proposals.map((e) => /* @__PURE__ */ u("button", {
3244
+ Jt?.proposals.map((e) => /* @__PURE__ */ u("button", {
3245
3245
  className: "proposal-card " + (ce === e.id ? "selected" : ""),
3246
3246
  disabled: C,
3247
3247
  onClick: () => {
3248
- ce !== e.id && (S(e.id), fe(null), de(null));
3248
+ ce !== e.id && (S(e.id), pe(null), fe(null));
3249
3249
  },
3250
3250
  children: [/* @__PURE__ */ l("span", {
3251
3251
  className: "proposal-letter",
@@ -3262,10 +3262,10 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3262
3262
  /* @__PURE__ */ u("button", {
3263
3263
  className: "ink full",
3264
3264
  disabled: C || !!q,
3265
- onClick: () => hn(Z),
3266
- children: [X.select, /* @__PURE__ */ l(U, {})]
3265
+ onClick: () => gn(Z),
3266
+ children: [X.select, /* @__PURE__ */ l(H, {})]
3267
3267
  }),
3268
- !t && v && yn(),
3268
+ !t && v && bn(),
3269
3269
  /* @__PURE__ */ u("section", {
3270
3270
  className: "drawing-downloads",
3271
3271
  children: [
@@ -3273,12 +3273,12 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3273
3273
  /* @__PURE__ */ l("button", {
3274
3274
  className: "outline full",
3275
3275
  disabled: C || !!q,
3276
- onClick: Cn,
3276
+ onClick: wn,
3277
3277
  children: g(p, "Prepare PDF / editable DXF / SVG")
3278
3278
  }),
3279
- j && Object.keys(j.files).map((e) => /* @__PURE__ */ u("button", {
3279
+ A && Object.keys(A.files).map((e) => /* @__PURE__ */ u("button", {
3280
3280
  className: "quiet",
3281
- onClick: () => Tn(e, j),
3281
+ onClick: () => En(e, A),
3282
3282
  children: [e.toUpperCase(), " ↓"]
3283
3283
  }, e)),
3284
3284
  /* @__PURE__ */ l("small", { children: "Separate from the BIM model export. PDF is included when the service has PDF rendering configured." })
@@ -3290,17 +3290,17 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3290
3290
  }),
3291
3291
  oe === "download" ? /* @__PURE__ */ u(c, { children: [
3292
3292
  /* @__PURE__ */ l("h3", { children: X.download }),
3293
- M ? Object.keys(M.files).map((e) => /* @__PURE__ */ u("button", {
3293
+ j ? Object.keys(j.files).map((e) => /* @__PURE__ */ u("button", {
3294
3294
  className: "outline full",
3295
- onClick: () => Tn(e),
3295
+ onClick: () => En(e),
3296
3296
  children: [e.toUpperCase(), " ↓"]
3297
3297
  }, e)) : /* @__PURE__ */ u("button", {
3298
3298
  className: "ink full",
3299
3299
  disabled: C || !!q || Z.hasRequiredConflicts,
3300
- onClick: wn,
3301
- children: [X.export, /* @__PURE__ */ l(U, {})]
3300
+ onClick: Tn,
3301
+ children: [X.export, /* @__PURE__ */ l(H, {})]
3302
3302
  }),
3303
- /* @__PURE__ */ l("small", { children: M?.viewerVerification ?? X.downloadNote })
3303
+ /* @__PURE__ */ l("small", { children: j?.viewerVerification ?? X.downloadNote })
3304
3304
  ] }) : /* @__PURE__ */ u("div", {
3305
3305
  className: "chat",
3306
3306
  children: [
@@ -3316,7 +3316,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3316
3316
  /* @__PURE__ */ u("button", {
3317
3317
  className: "outline full",
3318
3318
  disabled: C || !E.trim(),
3319
- onClick: pn,
3319
+ onClick: mn,
3320
3320
  children: [X.send, " →"]
3321
3321
  })
3322
3322
  ]
@@ -3341,39 +3341,39 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3341
3341
  e.widthM.toFixed(2),
3342
3342
  " × ",
3343
3343
  e.depthM.toFixed(2),
3344
- /* @__PURE__ */ l(Me, {
3344
+ /* @__PURE__ */ l(G, {
3345
3345
  language: p,
3346
- report: Ln,
3346
+ report: Rn,
3347
3347
  path: `${e.roomId}.widthM`
3348
3348
  }),
3349
- /* @__PURE__ */ l(Me, {
3349
+ /* @__PURE__ */ l(G, {
3350
3350
  language: p,
3351
- report: Ln,
3351
+ report: Rn,
3352
3352
  path: `${e.roomId}.depthM`
3353
3353
  })
3354
3354
  ] }),
3355
- /* @__PURE__ */ u("td", { children: [e.centerlineAreaM2.toFixed(2), /* @__PURE__ */ l(Me, {
3355
+ /* @__PURE__ */ u("td", { children: [e.centerlineAreaM2.toFixed(2), /* @__PURE__ */ l(G, {
3356
3356
  language: p,
3357
- report: Ln,
3357
+ report: Rn,
3358
3358
  path: `${e.roomId}.centerlineAreaM2`
3359
3359
  })] }),
3360
- /* @__PURE__ */ u("td", { children: [e.netAreaM2.toFixed(2), /* @__PURE__ */ l(Me, {
3360
+ /* @__PURE__ */ u("td", { children: [e.netAreaM2.toFixed(2), /* @__PURE__ */ l(G, {
3361
3361
  language: p,
3362
- report: Ln,
3362
+ report: Rn,
3363
3363
  path: `${e.roomId}.netAreaM2`
3364
3364
  })] })
3365
3365
  ] }, e.roomId)) }),
3366
3366
  /* @__PURE__ */ l("tfoot", { children: /* @__PURE__ */ u("tr", { children: [
3367
3367
  /* @__PURE__ */ l("th", { children: g(p, "Total") }),
3368
3368
  /* @__PURE__ */ l("td", {}),
3369
- /* @__PURE__ */ u("th", { children: [Z.centerlineAreaM2.toFixed(2), /* @__PURE__ */ l(Me, {
3369
+ /* @__PURE__ */ u("th", { children: [Z.centerlineAreaM2.toFixed(2), /* @__PURE__ */ l(G, {
3370
3370
  language: p,
3371
- report: Ln,
3371
+ report: Rn,
3372
3372
  path: "centerlineAreaM2"
3373
3373
  })] }),
3374
- /* @__PURE__ */ u("th", { children: [Z.netAreaM2.toFixed(2), /* @__PURE__ */ l(Me, {
3374
+ /* @__PURE__ */ u("th", { children: [Z.netAreaM2.toFixed(2), /* @__PURE__ */ l(G, {
3375
3375
  language: p,
3376
- report: Ln,
3376
+ report: Rn,
3377
3377
  path: "netAreaM2"
3378
3378
  })] })
3379
3379
  ] }) })
@@ -3384,22 +3384,22 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3384
3384
  /* @__PURE__ */ l("h3", { children: X.checks }),
3385
3385
  /* @__PURE__ */ l("div", {
3386
3386
  className: "check-counts",
3387
- children: Object.entries(Rn).map(([e, t]) => /* @__PURE__ */ u("span", { children: [/* @__PURE__ */ l("strong", { children: t }), e] }, e))
3387
+ children: Object.entries(zn).map(([e, t]) => /* @__PURE__ */ u("span", { children: [/* @__PURE__ */ l("strong", { children: t }), e] }, e))
3388
3388
  }),
3389
3389
  /* @__PURE__ */ u("button", {
3390
3390
  className: "textbtn",
3391
- onClick: () => be(!L),
3391
+ onClick: () => xe(!I),
3392
3392
  children: [
3393
- L ? g(p, "Hide") : X.notes,
3393
+ I ? g(p, "Hide") : X.notes,
3394
3394
  " ",
3395
- L ? "−" : "+"
3395
+ I ? "−" : "+"
3396
3396
  ]
3397
3397
  }),
3398
3398
  /* @__PURE__ */ l("p", { children: "Reference-only entries are disclosed, never presented as passed checks. Country statutory certification is not inferred." })
3399
3399
  ]
3400
3400
  })]
3401
3401
  }),
3402
- L && /* @__PURE__ */ l("article", {
3402
+ I && /* @__PURE__ */ l("article", {
3403
3403
  className: "paper findings",
3404
3404
  children: Z.findings.map((e, t) => /* @__PURE__ */ u("details", { children: [
3405
3405
  /* @__PURE__ */ u("summary", { children: [
@@ -3419,7 +3419,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3419
3419
  className: "disclaimer",
3420
3420
  children: X.disclaimer
3421
3421
  })
3422
- ] }) : qt ? /* @__PURE__ */ u("section", {
3422
+ ] }) : Jt ? /* @__PURE__ */ u("section", {
3423
3423
  className: "paper findings",
3424
3424
  role: "status",
3425
3425
  children: [
@@ -3428,9 +3428,9 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3428
3428
  /* @__PURE__ */ u("p", { children: [
3429
3429
  g(p, "Status"),
3430
3430
  ": ",
3431
- qt.reconciliation.status
3431
+ Jt.reconciliation.status
3432
3432
  ] }),
3433
- qt.reconciliation.findings.map((e, t) => /* @__PURE__ */ l("p", { children: e.message }, t)),
3433
+ Jt.reconciliation.findings.map((e, t) => /* @__PURE__ */ l("p", { children: e.message }, t)),
3434
3434
  /* @__PURE__ */ l("button", {
3435
3435
  className: "outline",
3436
3436
  disabled: C,
@@ -3445,8 +3445,8 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3445
3445
  }) : null,
3446
3446
  e && !v && /* @__PURE__ */ l("button", {
3447
3447
  className: "outline",
3448
- disabled: C || Kt,
3449
- onClick: () => void Dn(),
3448
+ disabled: C || Ht.busy || Kt,
3449
+ onClick: () => void On(),
3450
3450
  children: {
3451
3451
  en: "Preserve an existing plan",
3452
3452
  de: "Bestehenden Plan erhalten",
@@ -3469,7 +3469,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3469
3469
  }[p]
3470
3470
  })
3471
3471
  }),
3472
- v && !Z && !t && yn(),
3472
+ v && !Z && !t && bn(),
3473
3473
  v?.pendingDraft && /* @__PURE__ */ l("p", {
3474
3474
  role: "status",
3475
3475
  children: g(p, "Pending inputs are saved privately. They are not an accepted result.")
@@ -3479,8 +3479,8 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3479
3479
  projectVersion: v.version,
3480
3480
  pendingDraft: v.pendingDraft ?? void 0,
3481
3481
  loadSavedOnMount: v.workflow === "existing-plan" && !v.pendingDraft?.graph,
3482
- persistPending: t ? void 0 : un,
3483
- onPendingSaved: t ? void 0 : dn,
3482
+ persistPending: t ? void 0 : dn,
3483
+ onPendingSaved: t ? void 0 : fn,
3484
3484
  registerPendingSaver: t ? void 0 : Et,
3485
3485
  language: p,
3486
3486
  disabled: C,
@@ -3488,7 +3488,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3488
3488
  imageUrl: ze || void 0,
3489
3489
  api: Q,
3490
3490
  onState: Wt,
3491
- onDownload: (e, t) => void Tn(e, t)
3491
+ onDownload: (e, t) => void En(e, t)
3492
3492
  }, v.projectId),
3493
3493
  v && /* @__PURE__ */ l(re, {
3494
3494
  language: p,
@@ -3500,18 +3500,18 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3500
3500
  comparison: tt,
3501
3501
  left: at,
3502
3502
  right: st,
3503
- onToggle: gn,
3503
+ onToggle: _n,
3504
3504
  onLeftChange: (e) => {
3505
3505
  ot(e), nt(null);
3506
3506
  },
3507
3507
  onRightChange: (e) => {
3508
3508
  ct(e), nt(null);
3509
3509
  },
3510
- onCompare: _n,
3511
- onRestore: vn
3510
+ onCompare: vn,
3511
+ onRestore: yn
3512
3512
  }),
3513
- (qt || Ze) && /* @__PURE__ */ l(Ne, {
3514
- report: Ln,
3513
+ (Jt || Ze) && /* @__PURE__ */ l(Ne, {
3514
+ report: Rn,
3515
3515
  language: p
3516
3516
  })
3517
3517
  ]
@@ -3523,7 +3523,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3523
3523
  accept: "image/png,image/jpeg,image/webp",
3524
3524
  onChange: (e) => {
3525
3525
  let t = e.target.files?.[0];
3526
- t && En(t), e.target.value = "";
3526
+ t && Dn(t), e.target.value = "";
3527
3527
  }
3528
3528
  })
3529
3529
  ]
@@ -3544,7 +3544,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3544
3544
  e.files.map((t) => /* @__PURE__ */ u("button", {
3545
3545
  className: "quiet",
3546
3546
  disabled: C,
3547
- onClick: () => In(e, t),
3547
+ onClick: () => Ln(e, t),
3548
3548
  children: [t.format.toUpperCase(), " ↓"]
3549
3549
  }, t.objectId)),
3550
3550
  e.kind === "upload" && e.files.find((e) => [
@@ -3554,7 +3554,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3554
3554
  ].includes(e.format)) && /* @__PURE__ */ l("button", {
3555
3555
  className: "outline",
3556
3556
  disabled: C,
3557
- onClick: () => Fn(e.files.find((e) => [
3557
+ onClick: () => In(e.files.find((e) => [
3558
3558
  "png",
3559
3559
  "jpeg",
3560
3560
  "webp"
@@ -3563,15 +3563,15 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3563
3563
  })
3564
3564
  ] }, e.artifactId))] })
3565
3565
  }),
3566
- !t && I.analyticsEnabled === !0 && /* @__PURE__ */ u("aside", {
3566
+ !t && F.analyticsEnabled === !0 && /* @__PURE__ */ u("aside", {
3567
3567
  className: "analytics-choice",
3568
3568
  children: [/* @__PURE__ */ u("label", { children: [/* @__PURE__ */ l("input", {
3569
3569
  type: "checkbox",
3570
3570
  checked: Dt,
3571
- onChange: (e) => rn(e.target.checked)
3571
+ onChange: (e) => an(e.target.checked)
3572
3572
  }), " Allow optional visit and paywall analytics"] }), /* @__PURE__ */ l("small", { children: "We send event type only, without drawings, dimensions, prompts, URLs or account IDs. Uncheck to withdraw consent and request deletion of this browser's client observations." })]
3573
3573
  }),
3574
- !t && N && dt && /* @__PURE__ */ l("div", {
3574
+ !t && M && dt && /* @__PURE__ */ l("div", {
3575
3575
  className: "modal-backdrop",
3576
3576
  children: /* @__PURE__ */ u("section", {
3577
3577
  className: "modal paper",
@@ -3587,7 +3587,7 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3587
3587
  /* @__PURE__ */ l("button", {
3588
3588
  className: "outline full danger",
3589
3589
  disabled: C,
3590
- onClick: Mn,
3590
+ onClick: Nn,
3591
3591
  children: g(p, "Delete my project content")
3592
3592
  }),
3593
3593
  /* @__PURE__ */ l("button", {
@@ -3599,23 +3599,23 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3599
3599
  ]
3600
3600
  })
3601
3601
  }),
3602
- !t && he && /* @__PURE__ */ l("div", {
3602
+ !t && ge && /* @__PURE__ */ l("div", {
3603
3603
  className: "modal-backdrop",
3604
3604
  children: /* @__PURE__ */ u("form", {
3605
3605
  className: "modal paper",
3606
3606
  onSubmit: (e) => {
3607
- e.preventDefault(), Nn();
3607
+ e.preventDefault(), Pn();
3608
3608
  },
3609
3609
  children: [
3610
3610
  /* @__PURE__ */ l("button", {
3611
3611
  type: "button",
3612
3612
  className: "close",
3613
3613
  "aria-label": X.close,
3614
- onClick: () => P(!1),
3614
+ onClick: () => N(!1),
3615
3615
  children: "×"
3616
3616
  }),
3617
- /* @__PURE__ */ l(Ae, {}),
3618
- /* @__PURE__ */ l("h2", { children: R === "signup" ? g(p, "Create a verified account") : R === "verify" ? g(p, "Verify your email") : X.signin }),
3617
+ /* @__PURE__ */ l(je, {}),
3618
+ /* @__PURE__ */ l("h2", { children: L === "signup" ? g(p, "Create a verified account") : L === "verify" ? g(p, "Verify your email") : X.signin }),
3619
3619
  le && /* @__PURE__ */ l("p", {
3620
3620
  role: "alert",
3621
3621
  children: f === "karamentreprises" ? le.replace(/Polycyphers/gi, "Karamentreprises") : le
@@ -3624,40 +3624,40 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3624
3624
  role: "status",
3625
3625
  children: ue
3626
3626
  }),
3627
- R !== "verify" && /* @__PURE__ */ u("label", {
3627
+ L !== "verify" && /* @__PURE__ */ u("label", {
3628
3628
  className: "field",
3629
3629
  children: [X.email, /* @__PURE__ */ l("input", {
3630
3630
  type: "email",
3631
3631
  autoComplete: "email",
3632
3632
  required: !0,
3633
- value: ge,
3634
- onChange: (e) => _e(e.target.value)
3633
+ value: _e,
3634
+ onChange: (e) => ve(e.target.value)
3635
3635
  })]
3636
3636
  }),
3637
- R === "verify" && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("p", { children: "Open the verification link sent to your email, or paste its token below. Verification happens only when you submit this form." }), /* @__PURE__ */ u("label", {
3637
+ L === "verify" && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("p", { children: "Open the verification link sent to your email, or paste its token below. Verification happens only when you submit this form." }), /* @__PURE__ */ u("label", {
3638
3638
  className: "field",
3639
3639
  children: [g(p, "Verification token"), /* @__PURE__ */ l("input", {
3640
3640
  autoComplete: "off",
3641
3641
  required: !0,
3642
- value: B,
3643
- onChange: (e) => V(e.target.value)
3642
+ value: z,
3643
+ onChange: (e) => B(e.target.value)
3644
3644
  })]
3645
3645
  })] }),
3646
- R !== "signup" && /* @__PURE__ */ u("label", {
3646
+ L !== "signup" && /* @__PURE__ */ u("label", {
3647
3647
  className: "field",
3648
3648
  children: [X.password, /* @__PURE__ */ l("input", {
3649
3649
  type: "password",
3650
- autoComplete: R === "verify" ? "new-password" : "current-password",
3651
- minLength: R === "verify" ? 10 : void 0,
3650
+ autoComplete: L === "verify" ? "new-password" : "current-password",
3651
+ minLength: L === "verify" ? 10 : void 0,
3652
3652
  required: !0,
3653
- value: F,
3654
- onChange: (e) => ve(e.target.value)
3653
+ value: P,
3654
+ onChange: (e) => ye(e.target.value)
3655
3655
  })]
3656
3656
  }),
3657
3657
  /* @__PURE__ */ l("button", {
3658
3658
  className: "ink full",
3659
3659
  disabled: C,
3660
- children: R === "signup" ? g(p, "Send verification email") : R === "verify" ? g(p, "Verify & set password") : X.signin
3660
+ children: L === "signup" ? g(p, "Send verification email") : L === "verify" ? g(p, "Verify & set password") : X.signin
3661
3661
  }),
3662
3662
  /* @__PURE__ */ u("div", {
3663
3663
  className: "account-modes",
@@ -3665,31 +3665,31 @@ function G({ enableExistingPlanReview: e = !1, embedded: t = !1, transport: r, i
3665
3665
  /* @__PURE__ */ l("button", {
3666
3666
  type: "button",
3667
3667
  className: "textbtn",
3668
- onClick: () => z("login"),
3668
+ onClick: () => R("login"),
3669
3669
  children: g(p, "Sign in")
3670
3670
  }),
3671
3671
  /* @__PURE__ */ l("button", {
3672
3672
  type: "button",
3673
3673
  className: "textbtn",
3674
- onClick: () => z("signup"),
3674
+ onClick: () => R("signup"),
3675
3675
  children: g(p, "Create account")
3676
3676
  }),
3677
3677
  /* @__PURE__ */ l("button", {
3678
3678
  type: "button",
3679
3679
  className: "textbtn",
3680
- onClick: () => z("verify"),
3680
+ onClick: () => R("verify"),
3681
3681
  children: g(p, "Verify email")
3682
3682
  })
3683
3683
  ]
3684
3684
  }),
3685
- typeof I.verificationCompletionUrl == "string" && /* @__PURE__ */ u("p", { children: ["Verification destination: ", I.verificationCompletionUrl] })
3685
+ typeof F.verificationCompletionUrl == "string" && /* @__PURE__ */ u("p", { children: ["Verification destination: ", F.verificationCompletionUrl] })
3686
3686
  ]
3687
3687
  })
3688
3688
  })
3689
3689
  ]
3690
3690
  });
3691
3691
  }
3692
- function Me({ report: e, path: t, language: n = "en" }) {
3692
+ function G({ report: e, path: t, language: n = "en" }) {
3693
3693
  let r = e?.values.find((e) => e.path === t) ?? e?.values.find((e) => e.path.endsWith("." + t));
3694
3694
  return /* @__PURE__ */ u("small", {
3695
3695
  className: "value-tag " + (r?.origin ?? "missing"),
@@ -3732,7 +3732,7 @@ function Ne({ report: e, language: t }) {
3732
3732
  " ",
3733
3733
  t.unit
3734
3734
  ] }),
3735
- /* @__PURE__ */ l("td", { children: /* @__PURE__ */ l(Me, {
3735
+ /* @__PURE__ */ l("td", { children: /* @__PURE__ */ l(G, {
3736
3736
  language: n,
3737
3737
  report: e,
3738
3738
  path: t.path
@@ -3744,7 +3744,7 @@ function Ne({ report: e, language: t }) {
3744
3744
  }
3745
3745
  function K({ input: e, setInput: t, onChange: n, estimatedFields: r, confirmed: i, setConfirmed: a, onGenerate: o, busy: s, onUpload: ee, imageUrl: te, geometry: d, language: ne }) {
3746
3746
  let f = ne, p = (e, i) => {
3747
- i && (e = B(e, i, r)), t(e), n(i);
3747
+ i && (e = z(e, i, r)), t(e), n(i);
3748
3748
  }, m = e.programme, h = [
3749
3749
  ["bedroomWidthM", "Bedroom width"],
3750
3750
  ["bedroomDepthM", "Bedroom depth"],
@@ -3807,7 +3807,7 @@ function K({ input: e, setInput: t, onChange: n, estimatedFields: r, confirmed:
3807
3807
  g(f, "Length (m)"),
3808
3808
  " ",
3809
3809
  /* @__PURE__ */ u("small", { children: [
3810
- g(f, z(e, `footprint.edges[${n}].lengthM`, r)),
3810
+ g(f, R(e, `footprint.edges[${n}].lengthM`, r)),
3811
3811
  " · ",
3812
3812
  g(f, "unconfirmed")
3813
3813
  ] }),
@@ -3833,7 +3833,7 @@ function K({ input: e, setInput: t, onChange: n, estimatedFields: r, confirmed:
3833
3833
  g(f, "Bearing (°)"),
3834
3834
  " ",
3835
3835
  /* @__PURE__ */ u("small", { children: [
3836
- g(f, z(e, `footprint.edges[${n}].bearingDegrees`, r)),
3836
+ g(f, R(e, `footprint.edges[${n}].bearingDegrees`, r)),
3837
3837
  " · ",
3838
3838
  g(f, "unconfirmed")
3839
3839
  ] }),
@@ -3933,7 +3933,7 @@ function K({ input: e, setInput: t, onChange: n, estimatedFields: r, confirmed:
3933
3933
  g(f, n),
3934
3934
  " (m)",
3935
3935
  /* @__PURE__ */ u("small", { children: [
3936
- g(f, z(e, `programme.${t}`, r)),
3936
+ g(f, R(e, `programme.${t}`, r)),
3937
3937
  " · ",
3938
3938
  g(f, "unconfirmed")
3939
3939
  ] }),
@@ -3974,7 +3974,7 @@ function K({ input: e, setInput: t, onChange: n, estimatedFields: r, confirmed:
3974
3974
  className: "textbtn",
3975
3975
  onClick: () => p({
3976
3976
  ...e,
3977
- programme: Te(e.language).programme
3977
+ programme: Ee(e.language).programme
3978
3978
  }),
3979
3979
  children: "Enter my own room dimensions"
3980
3980
  })] })]
@@ -3998,7 +3998,7 @@ function K({ input: e, setInput: t, onChange: n, estimatedFields: r, confirmed:
3998
3998
  children: [
3999
3999
  g(f, "Clear ceiling height (m)"),
4000
4000
  /* @__PURE__ */ u("small", { children: [
4001
- g(f, z(e, "buildUps.clearCeilingHeightM", r)),
4001
+ g(f, R(e, "buildUps.clearCeilingHeightM", r)),
4002
4002
  " · ",
4003
4003
  g(f, "unconfirmed")
4004
4004
  ] }),
@@ -4144,4 +4144,4 @@ function Pe({ candidate: e }) {
4144
4144
  }), /* @__PURE__ */ u("figcaption", { children: [t?.length ? "Deterministic closure preview from estimated inputs." : "Image-space outline estimate; no physical scale.", " Original recognized outline; form edits are checked when you request reconciliation."] })]
4145
4145
  });
4146
4146
  }
4147
- export { S as BIM_PACKAGE_ID, C as BIM_PACKAGE_VERSION, je as BimStudio, be as checkBimLicense, N as clearLicense, ee as disableTelemetry, d as enableTelemetry, fe as setLicense };
4147
+ export { S as BIM_PACKAGE_ID, C as BIM_PACKAGE_VERSION, Me as BimStudio, xe as checkBimLicense, M as clearLicense, ee as disableTelemetry, d as enableTelemetry, pe as setLicense };