floor-editor-ts 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5982,6 +5982,19 @@ function emitFloorCallback(type, data) {
5982
5982
  data
5983
5983
  });
5984
5984
  }
5985
+ function emitCamerasChanged(data) {
5986
+ if (data.added.length === 0 && data.removed.length === 0) return;
5987
+ emitFloorCallback("camerasChanged", data);
5988
+ }
5989
+ function cameraItemToCallbackProps(item) {
5990
+ var _item$props, _ref, _item$name, _item$props2;
5991
+ if (!item.serial) return null;
5992
+ return {
5993
+ ...(_item$props = item.props) !== null && _item$props !== void 0 ? _item$props : {},
5994
+ serial: item.serial,
5995
+ name: (_ref = (_item$name = item.name) !== null && _item$name !== void 0 ? _item$name : (_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.name) !== null && _ref !== void 0 ? _ref : ""
5996
+ };
5997
+ }
5985
5998
  //#endregion
5986
5999
  //#region src/lib/stores/onboarding.svelte.ts
5987
6000
  var onboarding_svelte_exports = /* @__PURE__ */ __exportAll({
@@ -6156,6 +6169,33 @@ function reviveDates(p) {
6156
6169
  if (p.updatedAt && !(p.updatedAt instanceof Date)) p.updatedAt = new Date(p.updatedAt);
6157
6170
  return p;
6158
6171
  }
6172
+ function collectCamerasBySerial(project) {
6173
+ const map = /* @__PURE__ */ new Map();
6174
+ if (!(project === null || project === void 0 ? void 0 : project.floors)) return map;
6175
+ for (const floor of project.floors) {
6176
+ var _floor$furniture;
6177
+ for (const item of (_floor$furniture = floor.furniture) !== null && _floor$furniture !== void 0 ? _floor$furniture : []) {
6178
+ if (item.catalogId !== "camera" || !item.serial) continue;
6179
+ const props = cameraItemToCallbackProps(item);
6180
+ if (props) map.set(props.serial, props);
6181
+ }
6182
+ }
6183
+ return map;
6184
+ }
6185
+ /** Diff assigned cameras between two project snapshots and notify host. */
6186
+ function emitCameraDiff(before, after) {
6187
+ if (isAssignedCamerasSyncing()) return;
6188
+ const beforeMap = collectCamerasBySerial(before);
6189
+ const afterMap = collectCamerasBySerial(after);
6190
+ const removed = [];
6191
+ const added = [];
6192
+ for (const [serial, props] of beforeMap) if (!afterMap.has(serial)) removed.push(props);
6193
+ for (const [serial, props] of afterMap) if (!beforeMap.has(serial)) added.push(props);
6194
+ emitCamerasChanged({
6195
+ added,
6196
+ removed
6197
+ });
6198
+ }
6159
6199
  function undo() {
6160
6200
  const prev = undoStack.pop();
6161
6201
  if (!prev) return;
@@ -6165,19 +6205,23 @@ function undo() {
6165
6205
  description: prev.description,
6166
6206
  timestamp: prev.timestamp
6167
6207
  });
6168
- currentProject.set(reviveDates(JSON.parse(prev.state)));
6208
+ const next = reviveDates(JSON.parse(prev.state));
6209
+ currentProject.set(next);
6210
+ emitCameraDiff(cur, next);
6169
6211
  syncHistoryStore();
6170
6212
  }
6171
6213
  function redo() {
6172
- const next = redoStack.pop();
6173
- if (!next) return;
6214
+ const nextEntry = redoStack.pop();
6215
+ if (!nextEntry) return;
6174
6216
  const cur = get$1(currentProject);
6175
6217
  if (cur) undoStack.push({
6176
6218
  state: JSON.stringify(cur),
6177
- description: next.description,
6178
- timestamp: next.timestamp
6219
+ description: nextEntry.description,
6220
+ timestamp: nextEntry.timestamp
6179
6221
  });
6180
- currentProject.set(reviveDates(JSON.parse(next.state)));
6222
+ const next = reviveDates(JSON.parse(nextEntry.state));
6223
+ currentProject.set(next);
6224
+ emitCameraDiff(cur, next);
6181
6225
  syncHistoryStore();
6182
6226
  }
6183
6227
  /** Jump to a specific undo history step by index (0 = oldest) */
@@ -6198,7 +6242,9 @@ function jumpToUndoStep(targetIndex) {
6198
6242
  redoStack.push(entry);
6199
6243
  }
6200
6244
  const target = undoStack.pop();
6201
- currentProject.set(reviveDates(JSON.parse(target.state)));
6245
+ const next = reviveDates(JSON.parse(target.state));
6246
+ currentProject.set(next);
6247
+ emitCameraDiff(cur, next);
6202
6248
  syncHistoryStore();
6203
6249
  }
6204
6250
  function mutate(fn, description) {
@@ -6372,10 +6418,13 @@ function removeFurniture(id) {
6372
6418
  mutate((f) => {
6373
6419
  f.furniture = f.furniture.filter((fi) => fi.id !== id);
6374
6420
  }, "Deleted furniture");
6375
- if ((removedCamera === null || removedCamera === void 0 ? void 0 : removedCamera.serial) && !isAssignedCamerasSyncing()) emitFloorCallback("cameraRemoved", {
6376
- serial: removedCamera.serial,
6377
- name: removedCamera.name
6378
- });
6421
+ if ((removedCamera === null || removedCamera === void 0 ? void 0 : removedCamera.serial) && !isAssignedCamerasSyncing()) {
6422
+ const props = cameraItemToCallbackProps(removedCamera);
6423
+ if (props) emitCamerasChanged({
6424
+ added: [],
6425
+ removed: [props]
6426
+ });
6427
+ }
6379
6428
  }
6380
6429
  function addStair(position) {
6381
6430
  const id = uid$1();
@@ -6489,10 +6538,13 @@ function removeElement(id) {
6489
6538
  if (f.columns) f.columns = f.columns.filter((c) => c.id !== id);
6490
6539
  if (f.textAnnotations) f.textAnnotations = f.textAnnotations.filter((t) => t.id !== id);
6491
6540
  }, "Deleted element");
6492
- if ((removedCamera === null || removedCamera === void 0 ? void 0 : removedCamera.serial) && !isAssignedCamerasSyncing()) emitFloorCallback("cameraRemoved", {
6493
- serial: removedCamera.serial,
6494
- name: removedCamera.name
6495
- });
6541
+ if ((removedCamera === null || removedCamera === void 0 ? void 0 : removedCamera.serial) && !isAssignedCamerasSyncing()) {
6542
+ const props = cameraItemToCallbackProps(removedCamera);
6543
+ if (props) emitCamerasChanged({
6544
+ added: [],
6545
+ removed: [props]
6546
+ });
6547
+ }
6496
6548
  }
6497
6549
  /** Move a wall endpoint without creating an undo snapshot (for dragging) */
6498
6550
  function moveWallEndpoint(id, endpoint, position) {
@@ -7020,6 +7072,18 @@ var localStore = {
7020
7072
  };
7021
7073
  //#endregion
7022
7074
  //#region src/lib/packageDefaults.ts
7075
+ /** Flatten host camera object into string props for furniture + UI. */
7076
+ function assignedCameraToProps(cam) {
7077
+ const props = {};
7078
+ for (const [key, value] of Object.entries(cam)) {
7079
+ if (value == null) continue;
7080
+ props[key] = String(value);
7081
+ }
7082
+ return props;
7083
+ }
7084
+ function formatCameraPropLabel(key) {
7085
+ return key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()).trim();
7086
+ }
7023
7087
  var DEFAULT_CONFIG = {
7024
7088
  viewOnly: false,
7025
7089
  floorMaxWidth: 600,
@@ -7041,7 +7105,15 @@ var DEFAULT_CONFIG = {
7041
7105
  function normalizeConfig(value) {
7042
7106
  if (!value || typeof value !== "object") return { ...DEFAULT_CONFIG };
7043
7107
  const siteCameras = Array.isArray(value.siteCameras) ? value.siteCameras.filter((c) => !!c && typeof c === "object" && typeof c.serial === "string" && typeof c.name === "string") : DEFAULT_CONFIG.siteCameras;
7044
- const assignedCameras = Array.isArray(value.assignedCameras) ? value.assignedCameras.filter((c) => !!c && typeof c === "object" && typeof c.serial === "string" && c.serial.trim().length > 0 && typeof c.name === "string") : DEFAULT_CONFIG.assignedCameras;
7108
+ const assignedCameras = Array.isArray(value.assignedCameras) ? value.assignedCameras.filter((c) => !!c && typeof c === "object" && typeof c.serial === "string" && String(c.serial).trim().length > 0).map((c) => {
7109
+ const next = { serial: String(c.serial).trim() };
7110
+ for (const [key, val] of Object.entries(c)) {
7111
+ if (key === "serial") continue;
7112
+ if (val == null) continue;
7113
+ if (typeof val === "string" || typeof val === "number" || typeof val === "boolean") next[key] = val;
7114
+ }
7115
+ return next;
7116
+ }) : DEFAULT_CONFIG.assignedCameras;
7045
7117
  const image = typeof value.cameraThumbnail === "string" ? value.cameraThumbnail ? value.cameraThumbnail : DEFAULT_CONFIG.cameraThumbnail : DEFAULT_CONFIG.cameraThumbnail;
7046
7118
  const opacity = typeof value.cameraThumbnailOpacity === "number" && value.cameraThumbnailOpacity >= 0 && value.cameraThumbnailOpacity <= 1 ? value.cameraThumbnailOpacity : DEFAULT_CONFIG.cameraThumbnailOpacity;
7047
7119
  const canvasBackground = normalizeColor$1(value.canvasBackground, DEFAULT_CONFIG.canvasBackground);
@@ -56161,7 +56233,7 @@ var themePreference = createThemeStore();
56161
56233
  //#endregion
56162
56234
  //#region src/lib/components/toolbar/SettingsDialog.svelte
56163
56235
  init_client();
56164
- var root_2$12 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
56236
+ var root_2$13 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
56165
56237
  var root_3$12 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
56166
56238
  var root_4$11 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
56167
56239
  var root_5$8 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
@@ -56289,7 +56361,7 @@ function SettingsDialog($$anchor, $$props) {
56289
56361
  var button_1 = child(div_3);
56290
56362
  var node_1 = sibling(child(button_1));
56291
56363
  var consequent = ($$anchor) => {
56292
- append($$anchor, root_2$12());
56364
+ append($$anchor, root_2$13());
56293
56365
  };
56294
56366
  if_block(node_1, ($$render) => {
56295
56367
  if (get(activeTab) === "project") $$render(consequent);
@@ -56569,7 +56641,7 @@ delegate([
56569
56641
  //#endregion
56570
56642
  //#region src/lib/components/sidebar/AreaSummaryPanel.svelte
56571
56643
  init_client();
56572
- var root_2$11 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between text-xs bg-gray-50 rounded px-2 py-1.5"><span class="text-gray-700"> <span class="text-gray-400"> </span></span> <span class="font-medium text-gray-800"> </span></div>`);
56644
+ var root_2$12 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between text-xs bg-gray-50 rounded px-2 py-1.5"><span class="text-gray-700"> <span class="text-gray-400"> </span></span> <span class="font-medium text-gray-800"> </span></div>`);
56573
56645
  var root_1$12 = /* @__PURE__ */ from_html(`<div><h4 class="text-xs font-semibold text-gray-500 uppercase mb-1.5">By Category</h4> <div class="space-y-1"></div></div>`);
56574
56646
  var root_4$10 = /* @__PURE__ */ from_html(`<div class="flex items-center gap-1.5 text-xs px-1 py-1"><div class="flex-1 min-w-0"><div class="flex items-center justify-between"><span class="text-gray-700 truncate"> </span> <span class="text-gray-500 ml-1 shrink-0"> </span></div> <div class="w-full bg-gray-200 rounded-full h-1 mt-0.5"><div class="bg-blue-400 h-1 rounded-full"></div></div></div> <span class="text-[10px] text-gray-400 w-8 text-right shrink-0"> </span></div>`);
56575
56647
  var root_3$11 = /* @__PURE__ */ from_html(`<div><h4 class="text-xs font-semibold text-gray-500 uppercase mb-1.5">Room Breakdown</h4> <div class="space-y-0.5"></div></div>`);
@@ -56690,7 +56762,7 @@ function AreaSummaryPanel($$anchor, $$props) {
56690
56762
  var div_10 = root_1$12();
56691
56763
  var div_11 = sibling(child(div_10), 2);
56692
56764
  each(div_11, 21, () => get(categoryTotals), index$1, ($$anchor, cat) => {
56693
- var div_12 = root_2$11();
56765
+ var div_12 = root_2$12();
56694
56766
  var span = child(div_12);
56695
56767
  var text_4 = child(span);
56696
56768
  var span_1 = sibling(text_4);
@@ -56918,7 +56990,7 @@ async function autoSave(onDispatch) {
56918
56990
  //#endregion
56919
56991
  //#region src/lib/components/toolbar/VersionHistoryPanel.svelte
56920
56992
  init_client();
56921
- var root_2$10 = /* @__PURE__ */ from_html(`<p class="text-sm text-gray-400 text-center py-8">No snapshots yet.<br/>Versions are saved automatically every 5 minutes.</p>`);
56993
+ var root_2$11 = /* @__PURE__ */ from_html(`<p class="text-sm text-gray-400 text-center py-8">No snapshots yet.<br/>Versions are saved automatically every 5 minutes.</p>`);
56922
56994
  var root_4$9 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between py-2 px-2 rounded-lg hover:bg-gray-50 group transition-colors"><div class="flex-1 min-w-0"><div class="text-sm font-medium text-gray-700 truncate"> </div> <div class="text-xs text-gray-400"> </div></div> <button class="text-xs px-2.5 py-1 bg-blue-50 text-blue-600 rounded-md hover:bg-blue-100 transition-colors opacity-0 group-hover:opacity-100 font-medium shrink-0 ml-2">Restore</button></div>`);
56923
56995
  var root_3$10 = /* @__PURE__ */ from_html(`<div class="space-y-1"></div>`);
56924
56996
  var root_5$6 = /* @__PURE__ */ from_html(`<div class="px-4 py-2 border-t border-gray-100"><button class="text-xs text-red-400 hover:text-red-600 transition-colors">Clear all versions</button></div>`);
@@ -56968,7 +57040,7 @@ function VersionHistoryPanel($$anchor, $$props) {
56968
57040
  var div_3 = sibling(div_2, 2);
56969
57041
  var node_1 = child(div_3);
56970
57042
  var consequent = ($$anchor) => {
56971
- append($$anchor, root_2$10());
57043
+ append($$anchor, root_2$11());
56972
57044
  };
56973
57045
  var alternate = ($$anchor) => {
56974
57046
  var div_4 = root_3$10();
@@ -57034,14 +57106,14 @@ delegate(["click", "keydown"]);
57034
57106
  init_client();
57035
57107
  init_index_client();
57036
57108
  init_onboarding_svelte();
57037
- var root_2$9 = /* @__PURE__ */ from_html(`<input type="text" class="bg-white/20 text-white font-semibold px-2 py-0.5 rounded border border-white/30 outline-none text-sm w-40"/>`);
57109
+ var root_2$10 = /* @__PURE__ */ from_html(`<input type="text" class="bg-white/20 text-white font-semibold px-2 py-0.5 rounded border border-white/30 outline-none text-sm w-40"/>`);
57038
57110
  var root_3$9 = /* @__PURE__ */ from_html(`<button class="font-semibold text-white text-sm hover:bg-white/10 px-2 py-0.5 rounded transition-colors" title="Click to rename"> </button>`);
57039
57111
  var root_4$8 = /* @__PURE__ */ from_html(`<button> </button>`);
57040
57112
  var root_5$5 = /* @__PURE__ */ from_html(`<div class="flex bg-white/15 rounded-full p-0.5"><button title="Select mode (V)" aria-label="Select mode"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></button> <button title="Pan mode (H)" aria-label="Pan mode"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 11V6a2 2 0 0 0-4 0v1"></path><path d="M14 10V4a2 2 0 0 0-4 0v2"></path><path d="M10 10.5V6a2 2 0 0 0-4 0v8"></path><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"></path></svg></button></div>`);
57041
57113
  var root_6$4 = /* @__PURE__ */ from_html(`<div class="flex items-center gap-1 bg-white/15 rounded-full p-0.5"><button class="w-7 h-7 flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors text-sm font-bold" title="Zoom Out (−)" aria-label="Zoom Out">−</button> <button class="px-2 py-1 text-xs font-medium text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors min-w-[3rem] text-center" title="Reset Zoom (100%)"> </button> <button class="w-7 h-7 flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors text-sm font-bold" title="Zoom In (+)" aria-label="Zoom In">+</button></div>`);
57042
57114
  var root_8$2 = /* @__PURE__ */ from_html(`<button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg> Import JSON</button>`);
57043
57115
  var root_7$5 = /* @__PURE__ */ from_html(`<div class="absolute right-0 top-full mt-1 bg-white rounded-lg shadow-lg border border-gray-200 py-1 w-48 z-50"><button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg> Print Layout</button> <div class="h-px bg-gray-100 my-1"></div> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><path d="M21 15l-5-5L5 21"></path></svg> Export 2D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg> Export 3D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 19V5"></path><path d="M5 12l7-7 7 7"></path></svg> Export as SVG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M8 16h2"></path><path d="M14 16h2"></path></svg> Export as DXF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M9 16h6"></path></svg> Export as DWG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M16 11v6"></path><path d="M8 11v6"></path><path d="M12 11v6"></path></svg> Export as PDF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path></svg> Download JSON</button> <div class="h-px bg-gray-100 my-1"></div> <!> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> New Project</button></div>`);
57044
- var root_1$10 = /* @__PURE__ */ from_html(`<div class="h-12 bg-gradient-to-r from-slate-800 to-slate-700 flex items-center px-4 gap-3 shrink-0 shadow-sm"><!> <div class="h-5 w-px bg-white/20"></div> <div class="flex items-center gap-1"><!> <button class="text-white/80 hover:text-white text-xs hover:bg-white/10 px-1.5 py-0.5 rounded transition-colors" title="Add Floor" aria-label="Add Floor">+</button> <span class="text-white/40 text-[10px] ml-1"> </span></div> <div class="flex-1"></div> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Undo (Ctrl+Z)" aria-label="Undo"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg></button> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Redo (Ctrl+Y)" aria-label="Redo"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.13-9.36L23 10"></path></svg></button> <div class="h-5 w-px bg-white/20"></div> <button aria-label="Snap to Grid"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg></button> <!> <button aria-label="Toggle Furniture"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="12" width="20" height="8" rx="1"></rect><path d="M4 12V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v5"></path><line x1="12" y1="12" x2="12" y2="20"></line></svg></button> <div class="h-5 w-px bg-white/20"></div> <!> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Version History" aria-label="Version History"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></button> <button class="px-2 py-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Area Summary" aria-label="Area Summary"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"></rect><path d="M3 9h18"></path><path d="M9 3v18"></path></svg></button> <button class="px-2 py-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Settings" aria-label="Settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button> <div class="h-5 w-px bg-white/20"></div> <div class="relative"><button class="px-3 py-1.5 text-sm text-white/90 hover:text-white hover:bg-white/10 rounded transition-colors flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg> Export</button> <!></div> <span><!></span> <button class="px-3 py-1.5 text-sm bg-white text-slate-800 font-semibold rounded-lg hover:bg-blue-50 transition-colors shadow-sm">Save</button></div>`);
57116
+ var root_1$10 = /* @__PURE__ */ from_html(`<div class="h-12 bg-gradient-to-r from-slate-800 to-slate-700 flex items-center px-4 gap-3 shrink-0 shadow-sm"><button type="button"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2.5"></rect><path d="M9 3v18"></path></svg></button> <!> <div class="h-5 w-px bg-white/20"></div> <div class="flex items-center gap-1"><!> <button class="text-white/80 hover:text-white text-xs hover:bg-white/10 px-1.5 py-0.5 rounded transition-colors" title="Add Floor" aria-label="Add Floor">+</button> <span class="text-white/40 text-[10px] ml-1"> </span></div> <div class="flex-1"></div> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Undo (Ctrl+Z)" aria-label="Undo"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg></button> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Redo (Ctrl+Y)" aria-label="Redo"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.13-9.36L23 10"></path></svg></button> <div class="h-5 w-px bg-white/20"></div> <button aria-label="Snap to Grid"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg></button> <!> <button aria-label="Toggle Furniture"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="12" width="20" height="8" rx="1"></rect><path d="M4 12V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v5"></path><line x1="12" y1="12" x2="12" y2="20"></line></svg></button> <div class="h-5 w-px bg-white/20"></div> <!> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Version History" aria-label="Version History"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></button> <button class="px-2 py-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Area Summary" aria-label="Area Summary"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"></rect><path d="M3 9h18"></path><path d="M9 3v18"></path></svg></button> <button class="px-2 py-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Settings" aria-label="Settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button> <div class="h-5 w-px bg-white/20"></div> <div class="relative"><button class="px-3 py-1.5 text-sm text-white/90 hover:text-white hover:bg-white/10 rounded transition-colors flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg> Export</button> <!></div> <span><!></span> <button class="px-3 py-1.5 text-sm bg-white text-slate-800 font-semibold rounded-lg hover:bg-blue-50 transition-colors shadow-sm">Save</button></div>`);
57045
57117
  var root_13$2 = /* @__PURE__ */ from_html(`<div class="absolute right-0 top-full mt-1 bg-white rounded-lg shadow-lg border border-gray-200 py-1 w-48 z-50"><button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg> Print Layout</button> <div class="h-px bg-gray-100 my-1"></div> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><path d="M21 15l-5-5L5 21"></path></svg> Export 2D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg> Export 3D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 19V5"></path><path d="M5 12l7-7 7 7"></path></svg> Export as SVG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M8 16h2"></path><path d="M14 16h2"></path></svg> Export as DXF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M9 16h6"></path></svg> Export as DWG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M16 11v6"></path><path d="M8 11v6"></path><path d="M12 11v6"></path></svg> Export as PDF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path></svg> Download JSON</button> <div class="h-px bg-gray-100 my-1"></div> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg> Import JSON</button></div>`);
57046
57118
  var root_12$2 = /* @__PURE__ */ from_html(`<div class="h-12 bg-gradient-to-r from-slate-800 to-slate-700 flex items-center justify-between px-4 gap-3 shrink-0 shadow-sm"><span class="font-semibold text-white text-sm px-2 py-0.5 rounded transition-colors"> </span> <div class="relative"><button class="px-3 py-1.5 text-sm text-white/90 hover:text-white hover:bg-white/10 rounded transition-colors flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg> Import</button> <!></div></div>`);
57047
57119
  var root_14$2 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/40"><div class="bg-white rounded-xl shadow-2xl w-[420px] max-h-[80vh] overflow-hidden"><div class="flex items-center justify-between px-5 py-3 border-b border-gray-200"><h2 class="text-base font-semibold text-gray-800">📐 Area Summary</h2> <button class="text-gray-400 hover:text-gray-600 text-xl leading-none">&times;</button></div> <div class="overflow-y-auto max-h-[calc(80vh-52px)] p-1"><!></div></div></div>`);
@@ -57053,6 +57125,7 @@ function TopBar($$anchor, $$props) {
57053
57125
  const $canvasZoom = () => store_get(canvasZoom, "$canvasZoom", $$stores);
57054
57126
  const $saveState = () => store_get(saveState, "$saveState", $$stores);
57055
57127
  const [$$stores, $$cleanup] = setup_stores();
57128
+ let showBuildSidebar = prop($$props, "showBuildSidebar", 15, true);
57056
57129
  let settingsOpen = /* @__PURE__ */ state(false);
57057
57130
  let areaOpen = /* @__PURE__ */ state(false);
57058
57131
  let versionHistoryOpen = /* @__PURE__ */ state(false);
@@ -57235,9 +57308,10 @@ function TopBar($$anchor, $$props) {
57235
57308
  var node = first_child(fragment);
57236
57309
  var consequent_7 = ($$anchor) => {
57237
57310
  var div = root_1$10();
57238
- var node_1 = child(div);
57311
+ var button = child(div);
57312
+ var node_1 = sibling(button, 2);
57239
57313
  var consequent = ($$anchor) => {
57240
- var input_1 = root_2$9();
57314
+ var input_1 = root_2$10();
57241
57315
  remove_input_defaults(input_1);
57242
57316
  event("blur", input_1, onNameBlur);
57243
57317
  delegated("keydown", input_1, onNameKeydown);
@@ -57245,12 +57319,12 @@ function TopBar($$anchor, $$props) {
57245
57319
  append($$anchor, input_1);
57246
57320
  };
57247
57321
  var alternate = ($$anchor) => {
57248
- var button = root_3$9();
57249
- var text_1 = child(button, true);
57250
- reset(button);
57322
+ var button_1 = root_3$9();
57323
+ var text_1 = child(button_1, true);
57324
+ reset(button_1);
57251
57325
  template_effect(() => set_text(text_1, get(projectName)));
57252
- delegated("click", button, () => set(editingName, true));
57253
- append($$anchor, button);
57326
+ delegated("click", button_1, () => set(editingName, true));
57327
+ append($$anchor, button_1);
57254
57328
  };
57255
57329
  if_block(node_1, ($$render) => {
57256
57330
  if (get(editingName)) $$render(consequent);
@@ -57259,104 +57333,104 @@ function TopBar($$anchor, $$props) {
57259
57333
  var div_1 = sibling(node_1, 4);
57260
57334
  var node_2 = child(div_1);
57261
57335
  each(node_2, 17, () => get(floors), index$1, ($$anchor, fl) => {
57262
- var button_1 = root_4$8();
57263
- var text_2 = child(button_1, true);
57264
- reset(button_1);
57336
+ var button_2 = root_4$8();
57337
+ var text_2 = child(button_2, true);
57338
+ reset(button_2);
57265
57339
  template_effect(() => {
57266
- set_class(button_1, 1, `px-2 py-0.5 text-xs rounded transition-colors ${get(fl).id === get(activeFloorId) ? "bg-white text-slate-800 font-semibold" : "text-white/80 hover:bg-white/10"}`);
57267
- set_attribute(button_1, "title", get(fl).id === get(activeFloorId) ? "Active floor (dbl-click to remove)" : "Click to switch, dbl-click to remove");
57340
+ set_class(button_2, 1, `px-2 py-0.5 text-xs rounded transition-colors ${get(fl).id === get(activeFloorId) ? "bg-white text-slate-800 font-semibold" : "text-white/80 hover:bg-white/10"}`);
57341
+ set_attribute(button_2, "title", get(fl).id === get(activeFloorId) ? "Active floor (dbl-click to remove)" : "Click to switch, dbl-click to remove");
57268
57342
  set_text(text_2, get(fl).name);
57269
57343
  });
57270
- delegated("click", button_1, () => setActiveFloor(get(fl).id));
57271
- delegated("dblclick", button_1, () => onRemoveFloor(get(fl).id));
57272
- append($$anchor, button_1);
57344
+ delegated("click", button_2, () => setActiveFloor(get(fl).id));
57345
+ delegated("dblclick", button_2, () => onRemoveFloor(get(fl).id));
57346
+ append($$anchor, button_2);
57273
57347
  });
57274
- var button_2 = sibling(node_2, 2);
57275
- var span = sibling(button_2, 2);
57348
+ var button_3 = sibling(node_2, 2);
57349
+ var span = sibling(button_3, 2);
57276
57350
  var text_3 = child(span);
57277
57351
  reset(span);
57278
57352
  reset(div_1);
57279
- var button_3 = sibling(div_1, 4);
57280
- var button_4 = sibling(button_3, 2);
57281
- var button_5 = sibling(button_4, 4);
57282
- var node_3 = sibling(button_5, 2);
57353
+ var button_4 = sibling(div_1, 4);
57354
+ var button_5 = sibling(button_4, 2);
57355
+ var button_6 = sibling(button_5, 4);
57356
+ var node_3 = sibling(button_6, 2);
57283
57357
  var consequent_1 = ($$anchor) => {
57284
57358
  var div_2 = root_5$5();
57285
- var button_6 = child(div_2);
57286
- var button_7 = sibling(button_6, 2);
57359
+ var button_7 = child(div_2);
57360
+ var button_8 = sibling(button_7, 2);
57287
57361
  reset(div_2);
57288
57362
  template_effect(() => {
57289
- set_class(button_6, 1, `px-2 py-1 text-xs font-semibold rounded-full transition-colors ${!$panMode() ? "bg-white text-slate-800" : "text-white/80 hover:text-white"}`);
57290
- set_class(button_7, 1, `px-2 py-1 text-xs font-semibold rounded-full transition-colors ${$panMode() ? "bg-white text-slate-800" : "text-white/80 hover:text-white"}`);
57363
+ set_class(button_7, 1, `px-2 py-1 text-xs font-semibold rounded-full transition-colors ${!$panMode() ? "bg-white text-slate-800" : "text-white/80 hover:text-white"}`);
57364
+ set_class(button_8, 1, `px-2 py-1 text-xs font-semibold rounded-full transition-colors ${$panMode() ? "bg-white text-slate-800" : "text-white/80 hover:text-white"}`);
57291
57365
  });
57292
- delegated("click", button_6, () => panMode.set(false));
57293
- delegated("click", button_7, () => panMode.set(true));
57366
+ delegated("click", button_7, () => panMode.set(false));
57367
+ delegated("click", button_8, () => panMode.set(true));
57294
57368
  append($$anchor, div_2);
57295
57369
  };
57296
57370
  if_block(node_3, ($$render) => {
57297
57371
  if (get(mode) === "2d") $$render(consequent_1);
57298
57372
  });
57299
- var button_8 = sibling(node_3, 2);
57300
- var node_4 = sibling(button_8, 4);
57373
+ var button_9 = sibling(node_3, 2);
57374
+ var node_4 = sibling(button_9, 4);
57301
57375
  var consequent_2 = ($$anchor) => {
57302
57376
  var div_3 = root_6$4();
57303
- var button_9 = child(div_3);
57304
- var button_10 = sibling(button_9, 2);
57305
- var text_4 = child(button_10);
57306
- reset(button_10);
57377
+ var button_10 = child(div_3);
57307
57378
  var button_11 = sibling(button_10, 2);
57379
+ var text_4 = child(button_11);
57380
+ reset(button_11);
57381
+ var button_12 = sibling(button_11, 2);
57308
57382
  reset(div_3);
57309
57383
  template_effect(($0) => set_text(text_4, `${$0 !== null && $0 !== void 0 ? $0 : ""}%`), [() => Math.round($canvasZoom() * 100)]);
57310
- delegated("click", button_9, () => canvasZoom.update((z) => Math.max(.1, z / 1.25)));
57311
- delegated("click", button_10, () => canvasZoom.set(1));
57312
- delegated("click", button_11, () => canvasZoom.update((z) => Math.min(10, z * 1.25)));
57384
+ delegated("click", button_10, () => canvasZoom.update((z) => Math.max(.1, z / 1.25)));
57385
+ delegated("click", button_11, () => canvasZoom.set(1));
57386
+ delegated("click", button_12, () => canvasZoom.update((z) => Math.min(10, z * 1.25)));
57313
57387
  append($$anchor, div_3);
57314
57388
  };
57315
57389
  if_block(node_4, ($$render) => {
57316
57390
  if (get(mode) === "2d") $$render(consequent_2);
57317
57391
  });
57318
- var button_12 = sibling(node_4, 2);
57319
- var button_13 = sibling(button_12, 2);
57392
+ var button_13 = sibling(node_4, 2);
57320
57393
  var button_14 = sibling(button_13, 2);
57321
- var div_4 = sibling(button_14, 4);
57322
- var button_15 = child(div_4);
57323
- var node_5 = sibling(button_15, 2);
57394
+ var button_15 = sibling(button_14, 2);
57395
+ var div_4 = sibling(button_15, 4);
57396
+ var button_16 = child(div_4);
57397
+ var node_5 = sibling(button_16, 2);
57324
57398
  var consequent_4 = ($$anchor) => {
57325
57399
  var div_5 = root_7$5();
57326
- var button_16 = child(div_5);
57327
- var button_17 = sibling(button_16, 4);
57328
- var button_18 = sibling(button_17, 2);
57400
+ var button_17 = child(div_5);
57401
+ var button_18 = sibling(button_17, 4);
57329
57402
  var button_19 = sibling(button_18, 2);
57330
57403
  var button_20 = sibling(button_19, 2);
57331
57404
  var button_21 = sibling(button_20, 2);
57332
57405
  var button_22 = sibling(button_21, 2);
57333
57406
  var button_23 = sibling(button_22, 2);
57334
- var node_6 = sibling(button_23, 4);
57407
+ var button_24 = sibling(button_23, 2);
57408
+ var node_6 = sibling(button_24, 4);
57335
57409
  var consequent_3 = ($$anchor) => {
57336
- var button_24 = root_8$2();
57337
- delegated("click", button_24, onImportJSON);
57338
- append($$anchor, button_24);
57410
+ var button_25 = root_8$2();
57411
+ delegated("click", button_25, onImportJSON);
57412
+ append($$anchor, button_25);
57339
57413
  };
57340
57414
  if_block(node_6, ($$render) => {
57341
57415
  if (!$$props.viewOnly) $$render(consequent_3);
57342
57416
  });
57343
- var button_25 = sibling(node_6, 2);
57417
+ var button_26 = sibling(node_6, 2);
57344
57418
  reset(div_5);
57345
- delegated("click", button_16, () => {
57419
+ delegated("click", button_17, () => {
57346
57420
  set(exportOpen, false);
57347
57421
  window.dispatchEvent(new KeyboardEvent("keydown", {
57348
57422
  key: "p",
57349
57423
  ctrlKey: true
57350
57424
  }));
57351
57425
  });
57352
- delegated("click", button_17, onExport2DPNG);
57353
- delegated("click", button_18, onExport3DPNG);
57354
- delegated("click", button_19, onExportSVG);
57355
- delegated("click", button_20, onExportDXF);
57356
- delegated("click", button_21, onExportDWG);
57357
- delegated("click", button_22, onExportPDF);
57358
- delegated("click", button_23, onExportJSON);
57359
- delegated("click", button_25, newProject);
57426
+ delegated("click", button_18, onExport2DPNG);
57427
+ delegated("click", button_19, onExport3DPNG);
57428
+ delegated("click", button_20, onExportSVG);
57429
+ delegated("click", button_21, onExportDXF);
57430
+ delegated("click", button_22, onExportDWG);
57431
+ delegated("click", button_23, onExportPDF);
57432
+ delegated("click", button_24, onExportJSON);
57433
+ delegated("click", button_26, newProject);
57360
57434
  append($$anchor, div_5);
57361
57435
  };
57362
57436
  if_block(node_5, ($$render) => {
@@ -57381,41 +57455,46 @@ function TopBar($$anchor, $$props) {
57381
57455
  else $$render(alternate_1, -1);
57382
57456
  });
57383
57457
  reset(span_1);
57384
- var button_26 = sibling(span_1, 2);
57458
+ var button_27 = sibling(span_1, 2);
57385
57459
  reset(div);
57386
57460
  template_effect(() => {
57387
57461
  var _$$get$length;
57462
+ set_class(button, 1, `shrink-0 w-8 h-8 rounded-md flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 transition-colors ${showBuildSidebar() ? "bg-white/15 text-white" : ""}`);
57463
+ set_attribute(button, "title", showBuildSidebar() ? "Hide sidebar" : "Show sidebar");
57464
+ set_attribute(button, "aria-label", showBuildSidebar() ? "Hide sidebar" : "Show sidebar");
57465
+ set_attribute(button, "aria-pressed", showBuildSidebar());
57388
57466
  set_text(text_3, `${(_$$get$length = get(floors).length) !== null && _$$get$length !== void 0 ? _$$get$length : ""}F`);
57389
- set_class(button_5, 1, `p-1.5 rounded transition-colors ${get(snapOn) ? "text-white bg-white/20" : "text-white/40 hover:text-white/70 hover:bg-white/10"}`);
57390
- set_attribute(button_5, "title", `Snap to Grid (${get(snapOn) ? "On" : "Off"})`);
57391
- set_class(button_8, 1, `p-1.5 rounded transition-colors ${$showFurnitureStore() ? "text-white bg-white/20" : "text-white/40 hover:text-white/70 hover:bg-white/10"}`);
57392
- set_attribute(button_8, "title", `Toggle Furniture (${$showFurnitureStore() ? "Visible" : "Hidden"})`);
57467
+ set_class(button_6, 1, `p-1.5 rounded transition-colors ${get(snapOn) ? "text-white bg-white/20" : "text-white/40 hover:text-white/70 hover:bg-white/10"}`);
57468
+ set_attribute(button_6, "title", `Snap to Grid (${get(snapOn) ? "On" : "Off"})`);
57469
+ set_class(button_9, 1, `p-1.5 rounded transition-colors ${$showFurnitureStore() ? "text-white bg-white/20" : "text-white/40 hover:text-white/70 hover:bg-white/10"}`);
57470
+ set_attribute(button_9, "title", `Toggle Furniture (${$showFurnitureStore() ? "Visible" : "Hidden"})`);
57393
57471
  set_class(span_1, 1, `text-[11px] font-medium transition-all duration-300 ${$saveState() === "saved" ? "text-emerald-400" : $saveState() === "saving" ? "text-amber-300 animate-pulse" : "text-white/50"}`);
57394
57472
  set_attribute(span_1, "title", get(lastSavedText) || "Not saved yet");
57395
57473
  });
57396
- delegated("click", button_2, onAddFloor);
57397
- delegated("click", button_3, function(...$$args) {
57474
+ delegated("click", button, () => showBuildSidebar(!showBuildSidebar()));
57475
+ delegated("click", button_3, onAddFloor);
57476
+ delegated("click", button_4, function(...$$args) {
57398
57477
  undo === null || undo === void 0 || undo.apply(this, $$args);
57399
57478
  });
57400
- delegated("click", button_4, function(...$$args) {
57479
+ delegated("click", button_5, function(...$$args) {
57401
57480
  redo === null || redo === void 0 || redo.apply(this, $$args);
57402
57481
  });
57403
- delegated("click", button_5, () => {
57482
+ delegated("click", button_6, () => {
57404
57483
  snapEnabled.update((v) => !v);
57405
57484
  set(snapOn, !get(snapOn));
57406
57485
  });
57407
- delegated("click", button_8, () => layerVisibility.update((v) => ({
57486
+ delegated("click", button_9, () => layerVisibility.update((v) => ({
57408
57487
  ...v,
57409
57488
  furniture: !v.furniture
57410
57489
  })));
57411
- delegated("click", button_12, () => set(versionHistoryOpen, true));
57412
- delegated("click", button_13, () => set(areaOpen, true));
57413
- delegated("click", button_14, () => set(settingsOpen, true));
57414
- delegated("click", button_15, () => {
57490
+ delegated("click", button_13, () => set(versionHistoryOpen, true));
57491
+ delegated("click", button_14, () => set(areaOpen, true));
57492
+ delegated("click", button_15, () => set(settingsOpen, true));
57493
+ delegated("click", button_16, () => {
57415
57494
  set(exportOpen, !get(exportOpen));
57416
57495
  if (get(exportOpen)) triggerTip("first-export", 300, 60);
57417
57496
  });
57418
- delegated("click", button_26, save);
57497
+ delegated("click", button_27, save);
57419
57498
  append($$anchor, div);
57420
57499
  };
57421
57500
  var alternate_2 = ($$anchor) => {
@@ -57424,35 +57503,35 @@ function TopBar($$anchor, $$props) {
57424
57503
  var text_8 = child(span_2, true);
57425
57504
  reset(span_2);
57426
57505
  var div_7 = sibling(span_2, 2);
57427
- var button_27 = child(div_7);
57428
- var node_8 = sibling(button_27, 2);
57506
+ var button_28 = child(div_7);
57507
+ var node_8 = sibling(button_28, 2);
57429
57508
  var consequent_8 = ($$anchor) => {
57430
57509
  var div_8 = root_13$2();
57431
- var button_28 = child(div_8);
57432
- var button_29 = sibling(button_28, 4);
57433
- var button_30 = sibling(button_29, 2);
57510
+ var button_29 = child(div_8);
57511
+ var button_30 = sibling(button_29, 4);
57434
57512
  var button_31 = sibling(button_30, 2);
57435
57513
  var button_32 = sibling(button_31, 2);
57436
57514
  var button_33 = sibling(button_32, 2);
57437
57515
  var button_34 = sibling(button_33, 2);
57438
57516
  var button_35 = sibling(button_34, 2);
57439
- var button_36 = sibling(button_35, 4);
57517
+ var button_36 = sibling(button_35, 2);
57518
+ var button_37 = sibling(button_36, 4);
57440
57519
  reset(div_8);
57441
- delegated("click", button_28, () => {
57520
+ delegated("click", button_29, () => {
57442
57521
  set(exportOpen, false);
57443
57522
  window.dispatchEvent(new KeyboardEvent("keydown", {
57444
57523
  key: "p",
57445
57524
  ctrlKey: true
57446
57525
  }));
57447
57526
  });
57448
- delegated("click", button_29, onExport2DPNG);
57449
- delegated("click", button_30, onExport3DPNG);
57450
- delegated("click", button_31, onExportSVG);
57451
- delegated("click", button_32, onExportDXF);
57452
- delegated("click", button_33, onExportDWG);
57453
- delegated("click", button_34, onExportPDF);
57454
- delegated("click", button_35, onExportJSON);
57455
- delegated("click", button_36, onImportJSON);
57527
+ delegated("click", button_30, onExport2DPNG);
57528
+ delegated("click", button_31, onExport3DPNG);
57529
+ delegated("click", button_32, onExportSVG);
57530
+ delegated("click", button_33, onExportDXF);
57531
+ delegated("click", button_34, onExportDWG);
57532
+ delegated("click", button_35, onExportPDF);
57533
+ delegated("click", button_36, onExportJSON);
57534
+ delegated("click", button_37, onImportJSON);
57456
57535
  append($$anchor, div_8);
57457
57536
  };
57458
57537
  if_block(node_8, ($$render) => {
@@ -57462,7 +57541,7 @@ function TopBar($$anchor, $$props) {
57462
57541
  bind_this(div_7, ($$value) => exportRef = $$value, () => exportRef);
57463
57542
  reset(div_6);
57464
57543
  template_effect(() => set_text(text_8, get(projectName)));
57465
- delegated("click", button_27, () => {
57544
+ delegated("click", button_28, () => {
57466
57545
  set(exportOpen, !get(exportOpen));
57467
57546
  if (get(exportOpen)) triggerTip("first-export", 300, 60);
57468
57547
  });
@@ -57495,7 +57574,7 @@ function TopBar($$anchor, $$props) {
57495
57574
  var div_9 = root_14$2();
57496
57575
  var div_10 = child(div_9);
57497
57576
  var div_11 = child(div_10);
57498
- var button_37 = sibling(child(div_11), 2);
57577
+ var button_38 = sibling(child(div_11), 2);
57499
57578
  reset(div_11);
57500
57579
  var div_12 = sibling(div_11, 2);
57501
57580
  AreaSummaryPanel(child(div_12), {});
@@ -57507,7 +57586,7 @@ function TopBar($$anchor, $$props) {
57507
57586
  if (e.key === "Escape") set(areaOpen, false);
57508
57587
  });
57509
57588
  delegated("click", div_10, (e) => e.stopPropagation());
57510
- delegated("click", button_37, () => set(areaOpen, false));
57589
+ delegated("click", button_38, () => set(areaOpen, false));
57511
57590
  append($$anchor, div_9);
57512
57591
  };
57513
57592
  if_block(node_11, ($$render) => {
@@ -57518,8 +57597,8 @@ function TopBar($$anchor, $$props) {
57518
57597
  $$cleanup();
57519
57598
  }
57520
57599
  delegate([
57521
- "keydown",
57522
57600
  "click",
57601
+ "keydown",
57523
57602
  "dblclick"
57524
57603
  ]);
57525
57604
  //#endregion
@@ -58053,7 +58132,7 @@ function placeRoomTemplate(preset, origin, template, w = 400, h = 300) {
58053
58132
  //#endregion
58054
58133
  //#region src/lib/components/editor/UndoHistoryPanel.svelte
58055
58134
  init_client();
58056
- var root_2$8 = /* @__PURE__ */ from_html(`<div class="px-3 py-6 text-center text-xs text-gray-400">No history yet</div>`);
58135
+ var root_2$9 = /* @__PURE__ */ from_html(`<div class="px-3 py-6 text-center text-xs text-gray-400">No history yet</div>`);
58057
58136
  var root_4$7 = /* @__PURE__ */ from_html(`<button><span class="w-5 text-[10px] text-gray-400 text-right shrink-0"></span> <span class="truncate flex-1"> </span> <span class="text-[10px] text-gray-300 shrink-0"> </span></button>`);
58058
58137
  var root_3$8 = /* @__PURE__ */ from_html(`<div class="py-1"><!> <div><span class="w-5 text-[10px] text-gray-400 text-right shrink-0">●</span> <span class="truncate flex-1 font-medium">Current state</span></div></div>`);
58059
58138
  var root_1$9 = /* @__PURE__ */ from_html(`<div class="fixed bottom-12 left-4 w-64 max-h-80 bg-white rounded-xl shadow-2xl border border-gray-200 z-50 flex flex-col overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-gray-100 bg-gray-50"><div class="flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-slate-500"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg> <span class="text-xs font-semibold text-slate-700">Undo History</span></div> <div class="flex items-center gap-2"><span class="text-[10px] text-slate-400"> </span> <button class="text-gray-400 hover:text-gray-600 text-sm leading-none" aria-label="Close history">✕</button></div></div> <div class="flex-1 overflow-y-auto"><!></div></div>`);
@@ -58092,7 +58171,7 @@ function UndoHistoryPanel($$anchor, $$props) {
58092
58171
  var div_3 = sibling(div_1, 2);
58093
58172
  var node_1 = child(div_3);
58094
58173
  var consequent = ($$anchor) => {
58095
- append($$anchor, root_2$8());
58174
+ append($$anchor, root_2$9());
58096
58175
  };
58097
58176
  var alternate = ($$anchor) => {
58098
58177
  var div_5 = root_3$8();
@@ -58158,7 +58237,7 @@ init_client();
58158
58237
  init_index_client();
58159
58238
  var root_3$7 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-amber-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#92400e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
58160
58239
  var root_4$6 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-cyan-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0e7490" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="1"></rect><line x1="12" y1="4" x2="12" y2="20"></line><line x1="3" y1="12" x2="21" y2="12"></line></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
58161
- var root_2$7 = /* @__PURE__ */ from_html(`<div class="grid grid-cols-2 gap-2 mb-3"></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Windows</h3> <div class="grid grid-cols-2 gap-2"></div>`, 1);
58240
+ var root_2$8 = /* @__PURE__ */ from_html(`<div class="grid grid-cols-2 gap-2 mb-3"></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Windows</h3> <div class="grid grid-cols-2 gap-2"></div>`, 1);
58162
58241
  var root_1$8 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Structure</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 5h-5V2h-3v6h-4V5H7v6H2v3h5v3h3v-3h4v3h3v-6h5z"></path></svg></div> <div class="text-left"><div class="font-medium">Add Stairs</div> <div class="text-xs text-gray-400">Click to place stairs</div></div></button> <div class="flex gap-2"><button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="6"></circle><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Round Column</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="6" y="6" width="12" height="12"></rect><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Square Column</div></div></button></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Annotate</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7V4h16v3"></path><line x1="12" y1="4" x2="12" y2="20"></line><line x1="8" y1="20" x2="16" y2="20"></line></svg></div> <div class="text-left"><div class="font-medium">Text Label</div> <div class="text-xs text-gray-400">Add text annotations (T)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><line x1="16" y1="5" x2="22" y2="5"></line><line x1="19" y1="2" x2="19" y2="8"></line><line x1="3" y1="12" x2="12" y2="12"></line></svg></div> <div class="text-left"><div class="font-medium">Dimension</div> <div class="text-xs text-gray-400">Add dimension annotations (N)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h5l2-7 4 14 2-7h7"></path></svg></div> <div class="text-left"><div class="font-medium">Measure</div> <div class="text-xs text-gray-400">Measure distances (M)</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Import</h3> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="text-left"><div class="font-medium">Import Image</div> <div class="text-xs text-gray-400">Floor plan background</div></div></button> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg></div> <div class="text-left"><div class="font-medium">Import RoomPlan</div> <div class="text-xs text-gray-400">iOS LiDAR scan (.json/.zip)</div></div></button> <button class="w-full flex items-center justify-between px-1 py-2 mt-3"><h3 class="text-xs font-semibold text-gray-400 uppercase">Doors</h3> <span class="text-gray-400 text-xs"> </span></button> <!></div>`);
58163
58242
  var root_6$3 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-blue-300 hover:bg-blue-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-gray-50 flex items-center justify-center text-2xl font-mono"> </div> <span class="text-xs font-medium text-gray-600"> </span></button>`);
58164
58243
  var root_7$4 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-green-300 hover:bg-green-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-green-50 flex items-center justify-center text-lg"><!></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
@@ -58538,7 +58617,7 @@ function BuildPanel($$anchor, $$props) {
58538
58617
  reset(button_13);
58539
58618
  var node_1 = sibling(button_13, 2);
58540
58619
  var consequent = ($$anchor) => {
58541
- var fragment_1 = root_2$7();
58620
+ var fragment_1 = root_2$8();
58542
58621
  var div_13 = first_child(fragment_1);
58543
58622
  each(div_13, 21, () => doorCatalog, index$1, ($$anchor, dc) => {
58544
58623
  var button_14 = root_3$7();
@@ -59408,7 +59487,7 @@ function handleGlobalShortcut(e, ctx = {}) {
59408
59487
  init_client();
59409
59488
  var root_3$6 = /* @__PURE__ */ from_html(`<button></button>`);
59410
59489
  var root_4$5 = /* @__PURE__ */ from_html(`<button><span class="bg-white/80 backdrop-blur-sm rounded px-1 py-0.5 mb-0.5 text-gray-700"> </span></button>`);
59411
- var root_2$6 = /* @__PURE__ */ from_html(`<div class="space-y-2"><span class="text-xs text-gray-500">Color</span> <div class="grid grid-cols-6 gap-1.5"></div> <label class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></label> <span class="text-xs text-gray-500">Texture</span> <div class="grid grid-cols-3 gap-1.5"><button>None</button> <!></div></div>`);
59490
+ var root_2$7 = /* @__PURE__ */ from_html(`<div class="space-y-2"><span class="text-xs text-gray-500">Color</span> <div class="grid grid-cols-6 gap-1.5"></div> <label class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></label> <span class="text-xs text-gray-500">Texture</span> <div class="grid grid-cols-3 gap-1.5"><button>None</button> <!></div></div>`);
59412
59491
  var root_6$2 = /* @__PURE__ */ from_html(`<button></button>`);
59413
59492
  var root_7$3 = /* @__PURE__ */ from_html(`<button><span class="bg-white/80 backdrop-blur-sm rounded px-1 py-0.5 mb-0.5 text-gray-700"> </span></button>`);
59414
59493
  var root_5$3 = /* @__PURE__ */ from_html(`<div class="space-y-2"><span class="text-xs text-gray-500">Color</span> <div class="grid grid-cols-6 gap-1.5"></div> <label class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></label> <span class="text-xs text-gray-500">Texture</span> <div class="grid grid-cols-3 gap-1.5"><button>None</button> <!></div></div>`);
@@ -59417,8 +59496,8 @@ var root_8$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-
59417
59496
  var root_9$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-cyan-100 rounded flex items-center justify-center text-xs">🪟</span> Window Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Standard</option><option>Fixed</option><option>Casement</option><option>Sliding</option><option>Bay</option></select></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="1" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`, 1);
59418
59497
  var root_13$1 = /* @__PURE__ */ from_html(`<option> </option>`);
59419
59498
  var root_12$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500">Camera</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm bg-white"><option>Select camera...</option><!></select></label>`);
59420
- var root_14$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500">Camera Serial</span> <input type="text" disabled="" readonly="" placeholder="Assigned by host" class="w-full px-2 py-1 border border-gray-200 rounded text-sm bg-gray-50 text-gray-600 font-mono"/></label>`);
59421
- var root_11$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500">Camera Name</span> <input type="text" placeholder="Display name" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <!>`, 1);
59499
+ var root_14$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500"> </span> <input type="text"/></label>`);
59500
+ var root_11$1 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
59422
59501
  var root_15$1 = /* @__PURE__ */ from_html(`<button></button>`);
59423
59502
  var root_10$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-purple-100 rounded flex items-center justify-center text-xs"> </span> <button> </button></h3> <div class="space-y-3"><!> <div><div class="flex items-center gap-1 mb-2"><span class="text-xs text-gray-500">Color</span> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-gray-400"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="grid grid-cols-5 gap-1.5 mb-2"></div> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></div> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="1" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="1" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="1" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Material</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Wood</option><option>Metal</option><option>Fabric</option><option>Leather</option><option>Glass</option><option>Plastic</option><option>Stone</option><option>Ceramic</option></select></label> <label class="block"><span class="text-xs text-gray-500">Rotation (degrees)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-1"><button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Rotate 90° left">↺ 90°</button> <button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Rotate 90° right">↻ 90°</button></div> <div class="flex gap-1"><button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Flip horizontally">↔ Flip H</button> <button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Flip vertically">↕ Flip V</button></div> <button class="w-full px-2 py-1.5 border border-gray-300 rounded text-sm text-gray-600 hover:bg-gray-50 transition-colors">Reset to defaults</button></div>`, 1);
59424
59503
  var root_17$1 = /* @__PURE__ */ from_html(`<label class="block pb-3 border-b border-gray-200"><span class="text-xs text-gray-500"> </span> <input type="range" min="0.05" max="1" step="0.05" class="w-full"/></label>`);
@@ -59609,15 +59688,45 @@ function PropertiesPanel($$anchor, $$props) {
59609
59688
  if (!get(selectedFurniture)) return;
59610
59689
  updateFurniture(get(selectedFurniture).id, { rotation: Number(e.target.value) });
59611
59690
  }
59612
- function onFurnitureName(e) {
59613
- if (!get(selectedFurniture)) return;
59614
- updateFurniture(get(selectedFurniture).id, { name: e.target.value });
59615
- }
59691
+ const cameraPropEntries = /* @__PURE__ */ user_derived(() => {
59692
+ var _$$get$name, _$$get$serial;
59693
+ if (!get(selectedFurniture) || get(selectedFurniture).catalogId !== "camera") return [];
59694
+ const props = get(selectedFurniture).props;
59695
+ if (props && Object.keys(props).length > 0) {
59696
+ const keys = Object.keys(props);
59697
+ keys.sort((a, b) => {
59698
+ if (a === "serial") return -1;
59699
+ if (b === "serial") return 1;
59700
+ if (a === "name") return -1;
59701
+ if (b === "name") return 1;
59702
+ return a.localeCompare(b);
59703
+ });
59704
+ return keys.map((key) => {
59705
+ var _props$key;
59706
+ return {
59707
+ key,
59708
+ value: (_props$key = props[key]) !== null && _props$key !== void 0 ? _props$key : ""
59709
+ };
59710
+ });
59711
+ }
59712
+ return [{
59713
+ key: "name",
59714
+ value: (_$$get$name = get(selectedFurniture).name) !== null && _$$get$name !== void 0 ? _$$get$name : ""
59715
+ }, {
59716
+ key: "serial",
59717
+ value: (_$$get$serial = get(selectedFurniture).serial) !== null && _$$get$serial !== void 0 ? _$$get$serial : ""
59718
+ }];
59719
+ });
59720
+ /** Host-assigned camera fields are read-only; package fields (color/size/…) stay editable. */
59721
+ const cameraPropsLocked = /* @__PURE__ */ user_derived(() => {
59722
+ var _$$get13;
59723
+ return !!(((_$$get13 = get(selectedFurniture)) === null || _$$get13 === void 0 ? void 0 : _$$get13.catalogId) === "camera" && get(selectedFurniture).props && Object.keys(get(selectedFurniture).props).length > 0);
59724
+ });
59616
59725
  const useSiteCameraSelect = /* @__PURE__ */ user_derived(() => siteCameras().length > 0);
59617
59726
  const usedCameraSerials = /* @__PURE__ */ user_derived(() => {
59618
- var _$$get13;
59727
+ var _$$get14;
59619
59728
  const used = /* @__PURE__ */ new Set();
59620
- if (!((_$$get13 = get(floor)) === null || _$$get13 === void 0 ? void 0 : _$$get13.furniture) || !get(selectedFurniture)) return used;
59729
+ if (!((_$$get14 = get(floor)) === null || _$$get14 === void 0 ? void 0 : _$$get14.furniture) || !get(selectedFurniture)) return used;
59621
59730
  for (const item of get(floor).furniture) {
59622
59731
  if (item.catalogId !== "camera" || item.id === get(selectedFurniture).id) continue;
59623
59732
  if (item.serial) used.add(item.serial);
@@ -59625,20 +59734,21 @@ function PropertiesPanel($$anchor, $$props) {
59625
59734
  return used;
59626
59735
  });
59627
59736
  const selectableSiteCameras = /* @__PURE__ */ user_derived(() => {
59628
- var _$$get$serial;
59737
+ var _$$get$serial2;
59629
59738
  if (!get(selectedFurniture) || !get(useSiteCameraSelect)) return [];
59630
- const currentSerial = (_$$get$serial = get(selectedFurniture).serial) !== null && _$$get$serial !== void 0 ? _$$get$serial : "";
59739
+ const currentSerial = (_$$get$serial2 = get(selectedFurniture).serial) !== null && _$$get$serial2 !== void 0 ? _$$get$serial2 : "";
59631
59740
  const fromSite = siteCameras().filter((c) => !get(usedCameraSerials).has(c.serial) || c.serial === currentSerial);
59632
59741
  if (currentSerial && !fromSite.some((c) => c.serial === currentSerial)) {
59633
- var _$$get$name;
59742
+ var _$$get$name2;
59634
59743
  return [{
59635
59744
  serial: currentSerial,
59636
- name: (_$$get$name = get(selectedFurniture).name) !== null && _$$get$name !== void 0 ? _$$get$name : currentSerial
59745
+ name: (_$$get$name2 = get(selectedFurniture).name) !== null && _$$get$name2 !== void 0 ? _$$get$name2 : currentSerial
59637
59746
  }, ...fromSite];
59638
59747
  }
59639
59748
  return fromSite;
59640
59749
  });
59641
59750
  function onSiteCameraSelect(e) {
59751
+ var _$$get$props;
59642
59752
  if (!get(selectedFurniture)) return;
59643
59753
  const serial = e.target.value;
59644
59754
  if (!serial) {
@@ -59652,7 +59762,12 @@ function PropertiesPanel($$anchor, $$props) {
59652
59762
  if (!camera) return;
59653
59763
  updateFurniture(get(selectedFurniture).id, {
59654
59764
  serial: camera.serial,
59655
- name: camera.name
59765
+ name: camera.name,
59766
+ props: {
59767
+ ...(_$$get$props = get(selectedFurniture).props) !== null && _$$get$props !== void 0 ? _$$get$props : {},
59768
+ serial: camera.serial,
59769
+ name: camera.name
59770
+ }
59656
59771
  });
59657
59772
  }
59658
59773
  function resetFurnitureDefaults() {
@@ -59961,7 +60076,7 @@ function PropertiesPanel($$anchor, $$props) {
59961
60076
  var consequent = ($$anchor) => {
59962
60077
  const sideColor = /* @__PURE__ */ user_derived(() => get(selectedWall).interiorColor || get(selectedWall).color);
59963
60078
  const sideTex = /* @__PURE__ */ user_derived(() => get(selectedWall).interiorTexture === "none" ? void 0 : get(selectedWall).interiorTexture || get(selectedWall).texture);
59964
- var div_5 = root_2$6();
60079
+ var div_5 = root_2$7();
59965
60080
  var div_6 = sibling(child(div_5), 2);
59966
60081
  each(div_6, 21, () => wallColors, index$1, ($$anchor, wc) => {
59967
60082
  var button_3 = root_3$6();
@@ -60204,7 +60319,7 @@ function PropertiesPanel($$anchor, $$props) {
60204
60319
  reset(label_11);
60205
60320
  reset(div_11);
60206
60321
  template_effect(($0, $1, $2, $3, $4, $5, $6, $7) => {
60207
- var _$$get14, _$$get15, _$$get16, _$$get17;
60322
+ var _$$get15, _$$get16, _$$get17, _$$get18;
60208
60323
  set_text(text_6, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60209
60324
  set_value(input_5, $1);
60210
60325
  set_text(text_7, `Distance from A (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
@@ -60217,10 +60332,10 @@ function PropertiesPanel($$anchor, $$props) {
60217
60332
  var _select$__value;
60218
60333
  select.value = (_select$__value = select.__value = get(selectedDoor).type) !== null && _select$__value !== void 0 ? _select$__value : "", select_option(select, get(selectedDoor).type);
60219
60334
  }
60220
- set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get14 = get(selectedDoor)) === null || _$$get14 === void 0 ? void 0 : _$$get14.swingDirection) === "left" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60221
- set_class(button_10, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get15 = get(selectedDoor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.swingDirection) === "right" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60222
- set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$get16 = get(selectedDoor)) === null || _$$get16 === void 0 ? void 0 : _$$get16.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60223
- set_class(button_12, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get17 = get(selectedDoor)) === null || _$$get17 === void 0 ? void 0 : _$$get17.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60335
+ set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get15 = get(selectedDoor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.swingDirection) === "left" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60336
+ set_class(button_10, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get16 = get(selectedDoor)) === null || _$$get16 === void 0 ? void 0 : _$$get16.swingDirection) === "right" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60337
+ set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$get17 = get(selectedDoor)) === null || _$$get17 === void 0 ? void 0 : _$$get17.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60338
+ set_class(button_12, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get18 = get(selectedDoor)) === null || _$$get18 === void 0 ? void 0 : _$$get18.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60224
60339
  }, [
60225
60340
  () => unitLabel(),
60226
60341
  () => displayValue(get(selectedDoor).width),
@@ -60359,14 +60474,10 @@ function PropertiesPanel($$anchor, $$props) {
60359
60474
  var node_4 = child(div_15);
60360
60475
  var consequent_5 = ($$anchor) => {
60361
60476
  var fragment_4 = root_11$1();
60362
- var label_18 = first_child(fragment_4);
60363
- var input_14 = sibling(child(label_18), 2);
60364
- remove_input_defaults(input_14);
60365
- reset(label_18);
60366
- var node_5 = sibling(label_18, 2);
60477
+ var node_5 = first_child(fragment_4);
60367
60478
  var consequent_4 = ($$anchor) => {
60368
- var label_19 = root_12$1();
60369
- var select_2 = sibling(child(label_19), 2);
60479
+ var label_18 = root_12$1();
60480
+ var select_2 = sibling(child(label_18), 2);
60370
60481
  var option_11 = child(select_2);
60371
60482
  option_11.value = option_11.__value = "";
60372
60483
  each(sibling(option_11), 17, () => get(selectableSiteCameras), (cam) => cam.serial, ($$anchor, cam) => {
@@ -60375,8 +60486,8 @@ function PropertiesPanel($$anchor, $$props) {
60375
60486
  reset(option_12);
60376
60487
  var option_12_value = {};
60377
60488
  template_effect(() => {
60378
- var _$$get$name2, _$$get$serial2;
60379
- set_text(text_18, `${(_$$get$name2 = get(cam).name) !== null && _$$get$name2 !== void 0 ? _$$get$name2 : ""} (${(_$$get$serial2 = get(cam).serial) !== null && _$$get$serial2 !== void 0 ? _$$get$serial2 : ""})`);
60489
+ var _$$get$name3, _$$get$serial3;
60490
+ set_text(text_18, `${(_$$get$name3 = get(cam).name) !== null && _$$get$name3 !== void 0 ? _$$get$name3 : ""} (${(_$$get$serial3 = get(cam).serial) !== null && _$$get$serial3 !== void 0 ? _$$get$serial3 : ""})`);
60380
60491
  if (option_12_value !== (option_12_value = get(cam).serial)) {
60381
60492
  var _option_12$__value;
60382
60493
  option_12.value = (_option_12$__value = option_12.__value = get(cam).serial) !== null && _option_12$__value !== void 0 ? _option_12$__value : "";
@@ -60386,30 +60497,30 @@ function PropertiesPanel($$anchor, $$props) {
60386
60497
  });
60387
60498
  reset(select_2);
60388
60499
  select_2.value = select_2.__value = "";
60389
- reset(label_19);
60500
+ reset(label_18);
60390
60501
  delegated("change", select_2, onSiteCameraSelect);
60391
- append($$anchor, label_19);
60392
- };
60393
- var alternate_1 = ($$anchor) => {
60394
- var label_20 = root_14$1();
60395
- var input_15 = sibling(child(label_20), 2);
60396
- remove_input_defaults(input_15);
60397
- reset(label_20);
60398
- template_effect(() => {
60399
- var _$$get$serial3;
60400
- return set_value(input_15, (_$$get$serial3 = get(selectedFurniture).serial) !== null && _$$get$serial3 !== void 0 ? _$$get$serial3 : "");
60401
- });
60402
- append($$anchor, label_20);
60502
+ append($$anchor, label_18);
60403
60503
  };
60404
60504
  if_block(node_5, ($$render) => {
60405
60505
  if (get(useSiteCameraSelect) && !get(selectedFurniture).serial) $$render(consequent_4);
60406
- else $$render(alternate_1, -1);
60407
60506
  });
60408
- template_effect(() => {
60409
- var _$$get$name3;
60410
- return set_value(input_14, (_$$get$name3 = get(selectedFurniture).name) !== null && _$$get$name3 !== void 0 ? _$$get$name3 : "");
60507
+ each(sibling(node_5, 2), 17, () => get(cameraPropEntries), (field) => field.key, ($$anchor, field) => {
60508
+ var label_19 = root_14$1();
60509
+ var span_15 = child(label_19);
60510
+ var text_19 = child(span_15, true);
60511
+ reset(span_15);
60512
+ var input_14 = sibling(span_15, 2);
60513
+ remove_input_defaults(input_14);
60514
+ reset(label_19);
60515
+ template_effect(($0) => {
60516
+ set_text(text_19, $0);
60517
+ set_value(input_14, get(field).value);
60518
+ input_14.disabled = get(cameraPropsLocked) || get(field).key === "serial";
60519
+ input_14.readOnly = get(cameraPropsLocked) || get(field).key === "serial";
60520
+ set_class(input_14, 1, `w-full px-2 py-1 border border-gray-200 rounded text-sm bg-gray-50 text-gray-600 ${get(field).key === "serial" ? "font-mono" : ""}`);
60521
+ }, [() => formatCameraPropLabel(get(field).key)]);
60522
+ append($$anchor, label_19);
60411
60523
  });
60412
- delegated("input", input_14, onFurnitureName);
60413
60524
  append($$anchor, fragment_4);
60414
60525
  };
60415
60526
  if_block(node_4, ($$render) => {
@@ -60443,33 +60554,33 @@ function PropertiesPanel($$anchor, $$props) {
60443
60554
  });
60444
60555
  reset(div_17);
60445
60556
  var div_18 = sibling(div_17, 2);
60446
- var input_16 = sibling(child(div_18), 2);
60447
- remove_input_defaults(input_16);
60557
+ var input_15 = sibling(child(div_18), 2);
60558
+ remove_input_defaults(input_15);
60448
60559
  reset(div_18);
60449
60560
  reset(div_16);
60450
- var label_21 = sibling(div_16, 2);
60451
- var span_15 = child(label_21);
60452
- var text_19 = child(span_15);
60453
- reset(span_15);
60454
- var input_17 = sibling(span_15, 2);
60561
+ var label_20 = sibling(div_16, 2);
60562
+ var span_16 = child(label_20);
60563
+ var text_20 = child(span_16);
60564
+ reset(span_16);
60565
+ var input_16 = sibling(span_16, 2);
60566
+ remove_input_defaults(input_16);
60567
+ reset(label_20);
60568
+ var label_21 = sibling(label_20, 2);
60569
+ var span_17 = child(label_21);
60570
+ var text_21 = child(span_17);
60571
+ reset(span_17);
60572
+ var input_17 = sibling(span_17, 2);
60455
60573
  remove_input_defaults(input_17);
60456
60574
  reset(label_21);
60457
60575
  var label_22 = sibling(label_21, 2);
60458
- var span_16 = child(label_22);
60459
- var text_20 = child(span_16);
60460
- reset(span_16);
60461
- var input_18 = sibling(span_16, 2);
60576
+ var span_18 = child(label_22);
60577
+ var text_22 = child(span_18);
60578
+ reset(span_18);
60579
+ var input_18 = sibling(span_18, 2);
60462
60580
  remove_input_defaults(input_18);
60463
60581
  reset(label_22);
60464
60582
  var label_23 = sibling(label_22, 2);
60465
- var span_17 = child(label_23);
60466
- var text_21 = child(span_17);
60467
- reset(span_17);
60468
- var input_19 = sibling(span_17, 2);
60469
- remove_input_defaults(input_19);
60470
- reset(label_23);
60471
- var label_24 = sibling(label_23, 2);
60472
- var select_3 = sibling(child(label_24), 2);
60583
+ var select_3 = sibling(child(label_23), 2);
60473
60584
  var option_13 = child(select_3);
60474
60585
  option_13.value = option_13.__value = "Wood";
60475
60586
  var option_14 = sibling(option_13);
@@ -60489,12 +60600,12 @@ function PropertiesPanel($$anchor, $$props) {
60489
60600
  reset(select_3);
60490
60601
  var select_3_value;
60491
60602
  init_select(select_3);
60603
+ reset(label_23);
60604
+ var label_24 = sibling(label_23, 2);
60605
+ var input_19 = sibling(child(label_24), 2);
60606
+ remove_input_defaults(input_19);
60492
60607
  reset(label_24);
60493
- var label_25 = sibling(label_24, 2);
60494
- var input_20 = sibling(child(label_25), 2);
60495
- remove_input_defaults(input_20);
60496
- reset(label_25);
60497
- var div_19 = sibling(label_25, 2);
60608
+ var div_19 = sibling(label_24, 2);
60498
60609
  var button_15 = child(div_19);
60499
60610
  var button_16 = sibling(button_15, 2);
60500
60611
  reset(div_19);
@@ -60511,18 +60622,18 @@ function PropertiesPanel($$anchor, $$props) {
60511
60622
  set_class(button_13, 1, `ml-auto px-1.5 py-0.5 rounded text-xs border transition-colors ${get(selectedFurniture).locked ? "bg-amber-100 border-amber-400 text-amber-700" : "border-gray-200 hover:bg-gray-50 text-gray-500"}`);
60512
60623
  set_attribute(button_13, "title", get(selectedFurniture).locked ? "Unlock (Ctrl+L)" : "Lock (Ctrl+L)");
60513
60624
  set_text(text_17, get(selectedFurniture).locked ? "🔒 Locked" : "🔓");
60514
- set_value(input_16, $2);
60515
- set_text(text_19, `Width (${$3 !== null && $3 !== void 0 ? $3 : ""})`);
60516
- set_value(input_17, $4);
60517
- set_text(text_20, `Depth (${$5 !== null && $5 !== void 0 ? $5 : ""})`);
60518
- set_value(input_18, $6);
60519
- set_text(text_21, `Height (${$7 !== null && $7 !== void 0 ? $7 : ""})`);
60520
- set_value(input_19, $8);
60625
+ set_value(input_15, $2);
60626
+ set_text(text_20, `Width (${$3 !== null && $3 !== void 0 ? $3 : ""})`);
60627
+ set_value(input_16, $4);
60628
+ set_text(text_21, `Depth (${$5 !== null && $5 !== void 0 ? $5 : ""})`);
60629
+ set_value(input_17, $6);
60630
+ set_text(text_22, `Height (${$7 !== null && $7 !== void 0 ? $7 : ""})`);
60631
+ set_value(input_18, $8);
60521
60632
  if (select_3_value !== (select_3_value = (_$$get$material = get(selectedFurniture).material) !== null && _$$get$material !== void 0 ? _$$get$material : "Wood")) {
60522
60633
  var _select_3$__value, _$$get$material2, _$$get$material3;
60523
60634
  select_3.value = (_select_3$__value = select_3.__value = (_$$get$material2 = get(selectedFurniture).material) !== null && _$$get$material2 !== void 0 ? _$$get$material2 : "Wood") !== null && _select_3$__value !== void 0 ? _select_3$__value : "", select_option(select_3, (_$$get$material3 = get(selectedFurniture).material) !== null && _$$get$material3 !== void 0 ? _$$get$material3 : "Wood");
60524
60635
  }
60525
- set_value(input_20, $9);
60636
+ set_value(input_19, $9);
60526
60637
  }, [
60527
60638
  () => {
60528
60639
  var _getCatalogItem$icon, _getCatalogItem2;
@@ -60556,12 +60667,12 @@ function PropertiesPanel($$anchor, $$props) {
60556
60667
  delegated("click", button_13, () => {
60557
60668
  if (get(selectedFurniture)) toggleFurnitureLock(get(selectedFurniture).id);
60558
60669
  });
60559
- delegated("input", input_16, (e) => onFurnitureColor(e.target.value));
60560
- delegated("input", input_17, onFurnitureWidth);
60561
- delegated("input", input_18, onFurnitureDepth);
60562
- delegated("input", input_19, onFurnitureHeight);
60670
+ delegated("input", input_15, (e) => onFurnitureColor(e.target.value));
60671
+ delegated("input", input_16, onFurnitureWidth);
60672
+ delegated("input", input_17, onFurnitureDepth);
60673
+ delegated("input", input_18, onFurnitureHeight);
60563
60674
  delegated("change", select_3, onFurnitureMaterial);
60564
- delegated("input", input_20, onFurnitureRotation);
60675
+ delegated("input", input_19, onFurnitureRotation);
60565
60676
  delegated("click", button_15, () => {
60566
60677
  if (get(selectedFurniture)) updateFurniture(get(selectedFurniture).id, { rotation: get(selectedFurniture).rotation - 90 });
60567
60678
  });
@@ -60594,35 +60705,35 @@ function PropertiesPanel($$anchor, $$props) {
60594
60705
  var consequent_9 = ($$anchor) => {
60595
60706
  var fragment_5 = root_16();
60596
60707
  var div_21 = sibling(first_child(fragment_5), 2);
60597
- var node_7 = child(div_21);
60708
+ var node_8 = child(div_21);
60598
60709
  var consequent_7 = ($$anchor) => {
60599
- var label_26 = root_17$1();
60600
- var span_18 = child(label_26);
60601
- var text_22 = child(span_18);
60602
- reset(span_18);
60603
- var input_21 = sibling(span_18, 2);
60604
- remove_input_defaults(input_21);
60605
- reset(label_26);
60710
+ var label_25 = root_17$1();
60711
+ var span_19 = child(label_25);
60712
+ var text_23 = child(span_19);
60713
+ reset(span_19);
60714
+ var input_20 = sibling(span_19, 2);
60715
+ remove_input_defaults(input_20);
60716
+ reset(label_25);
60606
60717
  template_effect(($0) => {
60607
- set_text(text_22, `Camera Thumbnail Opacity (${$0 !== null && $0 !== void 0 ? $0 : ""}%)`);
60608
- set_value(input_21, get(thumbOpacity));
60718
+ set_text(text_23, `Camera Thumbnail Opacity (${$0 !== null && $0 !== void 0 ? $0 : ""}%)`);
60719
+ set_value(input_20, get(thumbOpacity));
60609
60720
  }, [() => Math.round(get(thumbOpacity) * 100)]);
60610
- delegated("input", input_21, (e) => updateCameraThumbnailOpacity(Number(e.target.value)));
60611
- append($$anchor, label_26);
60721
+ delegated("input", input_20, (e) => updateCameraThumbnailOpacity(Number(e.target.value)));
60722
+ append($$anchor, label_25);
60612
60723
  };
60613
- if_block(node_7, ($$render) => {
60724
+ if_block(node_8, ($$render) => {
60614
60725
  if (get(hasCameraThumbnailOverlay)) $$render(consequent_7);
60615
60726
  });
60616
- var label_27 = sibling(node_7, 2);
60617
- var select_4 = sibling(child(label_27), 2);
60727
+ var label_26 = sibling(node_8, 2);
60728
+ var select_4 = sibling(child(label_26), 2);
60618
60729
  each(select_4, 21, () => roomTypes, index$1, ($$anchor, rt) => {
60619
60730
  var option_21 = root_18$1();
60620
- var text_23 = child(option_21);
60731
+ var text_24 = child(option_21);
60621
60732
  reset(option_21);
60622
60733
  var option_21_value = {};
60623
60734
  template_effect(() => {
60624
60735
  var _$$get$icon, _$$get$label;
60625
- set_text(text_23, `${(_$$get$icon = get(rt).icon) !== null && _$$get$icon !== void 0 ? _$$get$icon : ""} ${(_$$get$label = get(rt).label) !== null && _$$get$label !== void 0 ? _$$get$label : ""}`);
60736
+ set_text(text_24, `${(_$$get$icon = get(rt).icon) !== null && _$$get$icon !== void 0 ? _$$get$icon : ""} ${(_$$get$label = get(rt).label) !== null && _$$get$label !== void 0 ? _$$get$label : ""}`);
60626
60737
  if (option_21_value !== (option_21_value = get(rt).id)) {
60627
60738
  var _option_21$__value;
60628
60739
  option_21.value = (_option_21$__value = option_21.__value = get(rt).id) !== null && _option_21$__value !== void 0 ? _option_21$__value : "";
@@ -60633,13 +60744,13 @@ function PropertiesPanel($$anchor, $$props) {
60633
60744
  reset(select_4);
60634
60745
  var select_4_value;
60635
60746
  init_select(select_4);
60747
+ reset(label_26);
60748
+ var label_27 = sibling(label_26, 2);
60749
+ var input_21 = sibling(child(label_27), 2);
60750
+ remove_input_defaults(input_21);
60636
60751
  reset(label_27);
60637
60752
  var label_28 = sibling(label_27, 2);
60638
- var input_22 = sibling(child(label_28), 2);
60639
- remove_input_defaults(input_22);
60640
- reset(label_28);
60641
- var label_29 = sibling(label_28, 2);
60642
- var select_5 = sibling(child(label_29), 2);
60753
+ var select_5 = sibling(child(label_28), 2);
60643
60754
  var option_22 = child(select_5);
60644
60755
  option_22.value = option_22.__value = "indoor";
60645
60756
  var option_23 = sibling(option_22);
@@ -60651,10 +60762,10 @@ function PropertiesPanel($$anchor, $$props) {
60651
60762
  reset(select_5);
60652
60763
  var select_5_value;
60653
60764
  init_select(select_5);
60654
- reset(label_29);
60655
- var div_22 = sibling(label_29, 2);
60765
+ reset(label_28);
60766
+ var div_22 = sibling(label_28, 2);
60656
60767
  var p = sibling(child(div_22), 2);
60657
- var text_24 = child(p, true);
60768
+ var text_25 = child(p, true);
60658
60769
  reset(p);
60659
60770
  reset(div_22);
60660
60771
  var div_23 = sibling(div_22, 2);
@@ -60672,22 +60783,22 @@ function PropertiesPanel($$anchor, $$props) {
60672
60783
  });
60673
60784
  reset(div_24);
60674
60785
  var div_25 = sibling(div_24, 2);
60675
- var input_23 = sibling(child(div_25), 2);
60676
- remove_input_defaults(input_23);
60786
+ var input_22 = sibling(child(div_25), 2);
60787
+ remove_input_defaults(input_22);
60677
60788
  reset(div_25);
60678
60789
  reset(div_23);
60679
60790
  var div_26 = sibling(div_23, 2);
60680
60791
  var div_27 = sibling(child(div_26), 2);
60681
60792
  each(div_27, 21, () => textureGroups, index$1, ($$anchor, group) => {
60682
60793
  var div_28 = root_20$1();
60683
- var span_19 = child(div_28);
60684
- var text_25 = child(span_19, true);
60685
- reset(span_19);
60686
- var div_29 = sibling(span_19, 2);
60794
+ var span_20 = child(div_28);
60795
+ var text_26 = child(span_20, true);
60796
+ reset(span_20);
60797
+ var div_29 = sibling(span_20, 2);
60687
60798
  each(div_29, 21, () => get(group).ids, index$1, ($$anchor, matId) => {
60688
60799
  const mat = /* @__PURE__ */ user_derived(() => floorMaterials.find((m) => m.id === get(matId)));
60689
60800
  var fragment_6 = comment();
60690
- var node_8 = first_child(fragment_6);
60801
+ var node_9 = first_child(fragment_6);
60691
60802
  var consequent_8 = ($$anchor) => {
60692
60803
  const texPath = /* @__PURE__ */ user_derived(() => {
60693
60804
  var _floorTexPaths$$$get$;
@@ -60696,26 +60807,26 @@ function PropertiesPanel($$anchor, $$props) {
60696
60807
  var button_21 = root_22$1();
60697
60808
  var div_30 = child(button_21);
60698
60809
  var div_31 = sibling(div_30, 2);
60699
- var text_26 = child(div_31, true);
60810
+ var text_27 = child(div_31, true);
60700
60811
  reset(div_31);
60701
60812
  reset(button_21);
60702
60813
  template_effect(() => {
60703
60814
  set_class(button_21, 1, `p-1 rounded-lg border-2 hover:border-gray-300 transition-all text-xs ${get(selectedRoom).floorTexture === get(mat).id ? "border-blue-500 ring-2 ring-blue-200 shadow-sm" : "border-gray-200"}`);
60704
60815
  set_attribute(button_21, "title", get(mat).name);
60705
60816
  set_style(div_30, get(texPath) ? `background-image: url(${get(texPath)}); background-size: cover; background-position: center;` : `background-color: ${get(mat).color}`);
60706
- set_text(text_26, get(mat).name);
60817
+ set_text(text_27, get(mat).name);
60707
60818
  });
60708
60819
  delegated("click", button_21, () => onRoomFloor(get(mat).id));
60709
60820
  append($$anchor, button_21);
60710
60821
  };
60711
- if_block(node_8, ($$render) => {
60822
+ if_block(node_9, ($$render) => {
60712
60823
  if (get(mat)) $$render(consequent_8);
60713
60824
  });
60714
60825
  append($$anchor, fragment_6);
60715
60826
  });
60716
60827
  reset(div_29);
60717
60828
  reset(div_28);
60718
- template_effect(() => set_text(text_25, get(group).label));
60829
+ template_effect(() => set_text(text_26, get(group).label));
60719
60830
  append($$anchor, div_28);
60720
60831
  });
60721
60832
  reset(div_27);
@@ -60727,16 +60838,16 @@ function PropertiesPanel($$anchor, $$props) {
60727
60838
  var _select_4$__value;
60728
60839
  select_4.value = (_select_4$__value = select_4.__value = get(selectedRoomType)) !== null && _select_4$__value !== void 0 ? _select_4$__value : "", select_option(select_4, get(selectedRoomType));
60729
60840
  }
60730
- set_value(input_22, get(selectedRoom).name);
60841
+ set_value(input_21, get(selectedRoom).name);
60731
60842
  if (select_5_value !== (select_5_value = (_$$get$roomType = get(selectedRoom).roomType) !== null && _$$get$roomType !== void 0 ? _$$get$roomType : "indoor")) {
60732
60843
  var _select_5$__value, _$$get$roomType2, _$$get$roomType3;
60733
60844
  select_5.value = (_select_5$__value = select_5.__value = (_$$get$roomType2 = get(selectedRoom).roomType) !== null && _$$get$roomType2 !== void 0 ? _$$get$roomType2 : "indoor") !== null && _select_5$__value !== void 0 ? _select_5$__value : "", select_option(select_5, (_$$get$roomType3 = get(selectedRoom).roomType) !== null && _$$get$roomType3 !== void 0 ? _$$get$roomType3 : "indoor");
60734
60845
  }
60735
- set_text(text_24, $0);
60736
- set_value(input_23, (_$$get$color6 = get(selectedRoom).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : "#ffffff");
60846
+ set_text(text_25, $0);
60847
+ set_value(input_22, (_$$get$color6 = get(selectedRoom).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : "#ffffff");
60737
60848
  }, [() => formatArea(get(selectedRoom).area, get(settings).units)]);
60738
60849
  delegated("change", select_4, onRoomType);
60739
- delegated("input", input_22, onRoomName);
60850
+ delegated("input", input_21, onRoomName);
60740
60851
  delegated("change", select_5, (e) => {
60741
60852
  if (get(selectedRoom)) {
60742
60853
  const v = e.target.value;
@@ -60744,14 +60855,14 @@ function PropertiesPanel($$anchor, $$props) {
60744
60855
  updateDetectedRoom(get(selectedRoom).id, { roomType: v });
60745
60856
  }
60746
60857
  });
60747
- delegated("input", input_23, (e) => onRoomColor(e.target.value));
60858
+ delegated("input", input_22, (e) => onRoomColor(e.target.value));
60748
60859
  append($$anchor, fragment_5);
60749
60860
  };
60750
60861
  var consequent_10 = ($$anchor) => {
60751
60862
  var fragment_7 = root_23$1();
60752
60863
  var div_32 = sibling(first_child(fragment_7), 2);
60753
- var label_30 = child(div_32);
60754
- var select_6 = sibling(child(label_30), 2);
60864
+ var label_29 = child(div_32);
60865
+ var select_6 = sibling(child(label_29), 2);
60755
60866
  var option_26 = child(select_6);
60756
60867
  option_26.value = option_26.__value = "straight";
60757
60868
  var option_27 = sibling(option_26);
@@ -60763,49 +60874,49 @@ function PropertiesPanel($$anchor, $$props) {
60763
60874
  reset(select_6);
60764
60875
  var select_6_value;
60765
60876
  init_select(select_6);
60877
+ reset(label_29);
60878
+ var label_30 = sibling(label_29, 2);
60879
+ var span_21 = child(label_30);
60880
+ var text_28 = child(span_21);
60881
+ reset(span_21);
60882
+ var input_23 = sibling(span_21, 2);
60883
+ remove_input_defaults(input_23);
60766
60884
  reset(label_30);
60767
60885
  var label_31 = sibling(label_30, 2);
60768
- var span_20 = child(label_31);
60769
- var text_27 = child(span_20);
60770
- reset(span_20);
60771
- var input_24 = sibling(span_20, 2);
60886
+ var span_22 = child(label_31);
60887
+ var text_29 = child(span_22);
60888
+ reset(span_22);
60889
+ var input_24 = sibling(span_22, 2);
60772
60890
  remove_input_defaults(input_24);
60773
60891
  reset(label_31);
60774
60892
  var label_32 = sibling(label_31, 2);
60775
- var span_21 = child(label_32);
60776
- var text_28 = child(span_21);
60777
- reset(span_21);
60778
- var input_25 = sibling(span_21, 2);
60893
+ var input_25 = sibling(child(label_32), 2);
60779
60894
  remove_input_defaults(input_25);
60780
60895
  reset(label_32);
60781
60896
  var label_33 = sibling(label_32, 2);
60782
- var input_26 = sibling(child(label_33), 2);
60783
- remove_input_defaults(input_26);
60784
- reset(label_33);
60785
- var label_34 = sibling(label_33, 2);
60786
- var div_33 = sibling(child(label_34), 2);
60897
+ var div_33 = sibling(child(label_33), 2);
60787
60898
  var button_22 = child(div_33);
60788
60899
  var button_23 = sibling(button_22, 2);
60789
60900
  reset(div_33);
60901
+ reset(label_33);
60902
+ var label_34 = sibling(label_33, 2);
60903
+ var input_26 = sibling(child(label_34), 2);
60904
+ remove_input_defaults(input_26);
60790
60905
  reset(label_34);
60791
- var label_35 = sibling(label_34, 2);
60792
- var input_27 = sibling(child(label_35), 2);
60793
- remove_input_defaults(input_27);
60794
- reset(label_35);
60795
60906
  reset(div_32);
60796
60907
  template_effect(($0, $1, $2, $3) => {
60797
60908
  if (select_6_value !== (select_6_value = get(selectedStair).stairType || "straight")) {
60798
60909
  var _select_6$__value;
60799
60910
  select_6.value = (_select_6$__value = select_6.__value = get(selectedStair).stairType || "straight") !== null && _select_6$__value !== void 0 ? _select_6$__value : "", select_option(select_6, get(selectedStair).stairType || "straight");
60800
60911
  }
60801
- set_text(text_27, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60802
- set_value(input_24, $1);
60803
- set_text(text_28, `Depth (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
60804
- set_value(input_25, $3);
60805
- set_value(input_26, get(selectedStair).riserCount);
60912
+ set_text(text_28, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60913
+ set_value(input_23, $1);
60914
+ set_text(text_29, `Depth (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
60915
+ set_value(input_24, $3);
60916
+ set_value(input_25, get(selectedStair).riserCount);
60806
60917
  set_class(button_22, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedStair).direction === "up" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60807
60918
  set_class(button_23, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedStair).direction === "down" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60808
- set_value(input_27, get(selectedStair).rotation);
60919
+ set_value(input_26, get(selectedStair).rotation);
60809
60920
  }, [
60810
60921
  () => unitLabel(),
60811
60922
  () => displayValue(get(selectedStair).width),
@@ -60813,38 +60924,38 @@ function PropertiesPanel($$anchor, $$props) {
60813
60924
  () => displayValue(get(selectedStair).depth)
60814
60925
  ]);
60815
60926
  delegated("change", select_6, (e) => updateStair(get(selectedStair).id, { stairType: e.target.value }));
60816
- delegated("input", input_24, (e) => updateStair(get(selectedStair).id, { width: inputToCm(Number(e.target.value)) }));
60817
- delegated("input", input_25, (e) => updateStair(get(selectedStair).id, { depth: inputToCm(Number(e.target.value)) }));
60818
- delegated("input", input_26, (e) => updateStair(get(selectedStair).id, { riserCount: Number(e.target.value) }));
60927
+ delegated("input", input_23, (e) => updateStair(get(selectedStair).id, { width: inputToCm(Number(e.target.value)) }));
60928
+ delegated("input", input_24, (e) => updateStair(get(selectedStair).id, { depth: inputToCm(Number(e.target.value)) }));
60929
+ delegated("input", input_25, (e) => updateStair(get(selectedStair).id, { riserCount: Number(e.target.value) }));
60819
60930
  delegated("click", button_22, () => updateStair(get(selectedStair).id, { direction: "up" }));
60820
60931
  delegated("click", button_23, () => updateStair(get(selectedStair).id, { direction: "down" }));
60821
- delegated("input", input_27, (e) => updateStair(get(selectedStair).id, { rotation: Number(e.target.value) }));
60932
+ delegated("input", input_26, (e) => updateStair(get(selectedStair).id, { rotation: Number(e.target.value) }));
60822
60933
  append($$anchor, fragment_7);
60823
60934
  };
60824
60935
  var consequent_12 = ($$anchor) => {
60825
60936
  var fragment_8 = root_24$1();
60826
60937
  var div_34 = sibling(first_child(fragment_8), 2);
60827
- var label_36 = child(div_34);
60828
- var div_35 = sibling(child(label_36), 2);
60938
+ var label_35 = child(div_34);
60939
+ var div_35 = sibling(child(label_35), 2);
60829
60940
  var button_24 = child(div_35);
60830
60941
  var button_25 = sibling(button_24, 2);
60831
60942
  reset(div_35);
60943
+ reset(label_35);
60944
+ var label_36 = sibling(label_35, 2);
60945
+ var span_23 = child(label_36);
60946
+ var text_30 = child(span_23);
60947
+ reset(span_23);
60948
+ var input_27 = sibling(span_23, 2);
60949
+ remove_input_defaults(input_27);
60832
60950
  reset(label_36);
60833
60951
  var label_37 = sibling(label_36, 2);
60834
- var span_22 = child(label_37);
60835
- var text_29 = child(span_22);
60836
- reset(span_22);
60837
- var input_28 = sibling(span_22, 2);
60952
+ var span_24 = child(label_37);
60953
+ var text_31 = child(span_24);
60954
+ reset(span_24);
60955
+ var input_28 = sibling(span_24, 2);
60838
60956
  remove_input_defaults(input_28);
60839
60957
  reset(label_37);
60840
- var label_38 = sibling(label_37, 2);
60841
- var span_23 = child(label_38);
60842
- var text_30 = child(span_23);
60843
- reset(span_23);
60844
- var input_29 = sibling(span_23, 2);
60845
- remove_input_defaults(input_29);
60846
- reset(label_38);
60847
- var div_36 = sibling(label_38, 2);
60958
+ var div_36 = sibling(label_37, 2);
60848
60959
  var div_37 = sibling(child(div_36), 2);
60849
60960
  each(div_37, 21, () => columnColorPresets, index$1, ($$anchor, preset) => {
60850
60961
  var button_26 = root_25();
@@ -60859,32 +60970,32 @@ function PropertiesPanel($$anchor, $$props) {
60859
60970
  });
60860
60971
  reset(div_37);
60861
60972
  var div_38 = sibling(div_37, 2);
60862
- var input_30 = sibling(child(div_38), 2);
60863
- remove_input_defaults(input_30);
60973
+ var input_29 = sibling(child(div_38), 2);
60974
+ remove_input_defaults(input_29);
60864
60975
  reset(div_38);
60865
60976
  reset(div_36);
60866
- var node_9 = sibling(div_36, 2);
60977
+ var node_10 = sibling(div_36, 2);
60867
60978
  var consequent_11 = ($$anchor) => {
60868
- var label_39 = root_26();
60869
- var input_31 = sibling(child(label_39), 2);
60870
- remove_input_defaults(input_31);
60871
- reset(label_39);
60872
- template_effect(() => set_value(input_31, get(selectedColumn).rotation));
60873
- delegated("input", input_31, (e) => updateColumn(get(selectedColumn).id, { rotation: Number(e.target.value) }));
60874
- append($$anchor, label_39);
60979
+ var label_38 = root_26();
60980
+ var input_30 = sibling(child(label_38), 2);
60981
+ remove_input_defaults(input_30);
60982
+ reset(label_38);
60983
+ template_effect(() => set_value(input_30, get(selectedColumn).rotation));
60984
+ delegated("input", input_30, (e) => updateColumn(get(selectedColumn).id, { rotation: Number(e.target.value) }));
60985
+ append($$anchor, label_38);
60875
60986
  };
60876
- if_block(node_9, ($$render) => {
60987
+ if_block(node_10, ($$render) => {
60877
60988
  if (get(selectedColumn).shape === "square") $$render(consequent_11);
60878
60989
  });
60879
60990
  reset(div_34);
60880
60991
  template_effect(($0, $1, $2, $3) => {
60881
60992
  set_class(button_24, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedColumn).shape === "round" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60882
60993
  set_class(button_25, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedColumn).shape === "square" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60883
- set_text(text_29, `${get(selectedColumn).shape === "round" ? "Diameter" : "Side Length"} (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60884
- set_value(input_28, $1);
60885
- set_text(text_30, `Height (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
60886
- set_value(input_29, $3);
60887
- set_value(input_30, get(selectedColumn).color);
60994
+ set_text(text_30, `${get(selectedColumn).shape === "round" ? "Diameter" : "Side Length"} (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60995
+ set_value(input_27, $1);
60996
+ set_text(text_31, `Height (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
60997
+ set_value(input_28, $3);
60998
+ set_value(input_29, get(selectedColumn).color);
60888
60999
  }, [
60889
61000
  () => unitLabel(),
60890
61001
  () => displayValue(get(selectedColumn).diameter),
@@ -60893,29 +61004,33 @@ function PropertiesPanel($$anchor, $$props) {
60893
61004
  ]);
60894
61005
  delegated("click", button_24, () => updateColumn(get(selectedColumn).id, { shape: "round" }));
60895
61006
  delegated("click", button_25, () => updateColumn(get(selectedColumn).id, { shape: "square" }));
60896
- delegated("input", input_28, (e) => updateColumn(get(selectedColumn).id, { diameter: inputToCm(Number(e.target.value)) }));
60897
- delegated("input", input_29, (e) => updateColumn(get(selectedColumn).id, { height: inputToCm(Number(e.target.value)) }));
60898
- delegated("input", input_30, (e) => updateColumn(get(selectedColumn).id, { color: e.target.value }));
61007
+ delegated("input", input_27, (e) => updateColumn(get(selectedColumn).id, { diameter: inputToCm(Number(e.target.value)) }));
61008
+ delegated("input", input_28, (e) => updateColumn(get(selectedColumn).id, { height: inputToCm(Number(e.target.value)) }));
61009
+ delegated("input", input_29, (e) => updateColumn(get(selectedColumn).id, { color: e.target.value }));
60899
61010
  append($$anchor, fragment_8);
60900
61011
  };
60901
61012
  var consequent_13 = ($$anchor) => {
60902
61013
  var div_39 = root_27();
60903
- var label_40 = sibling(child(div_39), 2);
61014
+ var label_39 = sibling(child(div_39), 2);
61015
+ var input_31 = sibling(child(label_39), 2);
61016
+ remove_input_defaults(input_31);
61017
+ reset(label_39);
61018
+ var label_40 = sibling(label_39, 2);
60904
61019
  var input_32 = sibling(child(label_40), 2);
60905
61020
  remove_input_defaults(input_32);
60906
61021
  reset(label_40);
60907
61022
  var label_41 = sibling(label_40, 2);
60908
- var input_33 = sibling(child(label_41), 2);
61023
+ var div_40 = sibling(child(label_41), 2);
61024
+ var input_33 = child(div_40);
60909
61025
  remove_input_defaults(input_33);
61026
+ var span_25 = sibling(input_33, 2);
61027
+ var text_32 = child(span_25, true);
61028
+ reset(span_25);
61029
+ reset(div_40);
60910
61030
  reset(label_41);
60911
61031
  var label_42 = sibling(label_41, 2);
60912
- var div_40 = sibling(child(label_42), 2);
60913
- var input_34 = child(div_40);
61032
+ var input_34 = sibling(child(label_42), 2);
60914
61033
  remove_input_defaults(input_34);
60915
- var span_24 = sibling(input_34, 2);
60916
- var text_31 = child(span_24, true);
60917
- reset(span_24);
60918
- reset(div_40);
60919
61034
  reset(label_42);
60920
61035
  var label_43 = sibling(label_42, 2);
60921
61036
  var input_35 = sibling(child(label_43), 2);
@@ -60925,26 +61040,22 @@ function PropertiesPanel($$anchor, $$props) {
60925
61040
  var input_36 = sibling(child(label_44), 2);
60926
61041
  remove_input_defaults(input_36);
60927
61042
  reset(label_44);
60928
- var label_45 = sibling(label_44, 2);
60929
- var input_37 = sibling(child(label_45), 2);
60930
- remove_input_defaults(input_37);
60931
- reset(label_45);
60932
61043
  reset(div_39);
60933
61044
  template_effect(($0, $1) => {
60934
- set_value(input_32, get(selectedTextAnnotation).text);
60935
- set_value(input_33, get(selectedTextAnnotation).fontSize);
60936
- set_value(input_34, get(selectedTextAnnotation).color);
60937
- set_text(text_31, get(selectedTextAnnotation).color);
60938
- set_value(input_35, get(selectedTextAnnotation).rotation);
60939
- set_value(input_36, $0);
60940
- set_value(input_37, $1);
61045
+ set_value(input_31, get(selectedTextAnnotation).text);
61046
+ set_value(input_32, get(selectedTextAnnotation).fontSize);
61047
+ set_value(input_33, get(selectedTextAnnotation).color);
61048
+ set_text(text_32, get(selectedTextAnnotation).color);
61049
+ set_value(input_34, get(selectedTextAnnotation).rotation);
61050
+ set_value(input_35, $0);
61051
+ set_value(input_36, $1);
60941
61052
  }, [() => Math.round(get(selectedTextAnnotation).x), () => Math.round(get(selectedTextAnnotation).y)]);
60942
- delegated("input", input_32, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { text: e.target.value }));
60943
- delegated("input", input_33, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { fontSize: Number(e.target.value) }));
60944
- delegated("input", input_34, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { color: e.target.value }));
60945
- delegated("input", input_35, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { rotation: Number(e.target.value) }));
60946
- delegated("input", input_36, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { x: Number(e.target.value) }));
60947
- delegated("input", input_37, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { y: Number(e.target.value) }));
61053
+ delegated("input", input_31, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { text: e.target.value }));
61054
+ delegated("input", input_32, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { fontSize: Number(e.target.value) }));
61055
+ delegated("input", input_33, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { color: e.target.value }));
61056
+ delegated("input", input_34, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { rotation: Number(e.target.value) }));
61057
+ delegated("input", input_35, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { x: Number(e.target.value) }));
61058
+ delegated("input", input_36, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { y: Number(e.target.value) }));
60948
61059
  append($$anchor, div_39);
60949
61060
  };
60950
61061
  if_block(node, ($$render) => {
@@ -60957,11 +61068,15 @@ function PropertiesPanel($$anchor, $$props) {
60957
61068
  else if (get(selectedColumn)) $$render(consequent_12, 6);
60958
61069
  else if (get(selectedTextAnnotation)) $$render(consequent_13, 7);
60959
61070
  });
60960
- var node_10 = sibling(node, 2);
61071
+ var node_11 = sibling(node, 2);
60961
61072
  var consequent_14 = ($$anchor) => {
60962
61073
  var div_41 = root_28();
60963
61074
  var div_42 = sibling(child(div_41), 2);
60964
- var label_46 = child(div_42);
61075
+ var label_45 = child(div_42);
61076
+ var input_37 = sibling(child(label_45), 2);
61077
+ remove_input_defaults(input_37);
61078
+ reset(label_45);
61079
+ var label_46 = sibling(label_45, 2);
60965
61080
  var input_38 = sibling(child(label_46), 2);
60966
61081
  remove_input_defaults(input_38);
60967
61082
  reset(label_46);
@@ -60969,13 +61084,9 @@ function PropertiesPanel($$anchor, $$props) {
60969
61084
  var input_39 = sibling(child(label_47), 2);
60970
61085
  remove_input_defaults(input_39);
60971
61086
  reset(label_47);
60972
- var label_48 = sibling(label_47, 2);
60973
- var input_40 = sibling(child(label_48), 2);
60974
- remove_input_defaults(input_40);
60975
- reset(label_48);
60976
- var div_43 = sibling(label_48, 2);
61087
+ var div_43 = sibling(label_47, 2);
60977
61088
  var button_27 = child(div_43);
60978
- var text_32 = child(button_27, true);
61089
+ var text_33 = child(button_27, true);
60979
61090
  reset(button_27);
60980
61091
  var button_28 = sibling(button_27, 2);
60981
61092
  reset(div_43);
@@ -60983,15 +61094,15 @@ function PropertiesPanel($$anchor, $$props) {
60983
61094
  reset(div_42);
60984
61095
  reset(div_41);
60985
61096
  template_effect(() => {
60986
- set_value(input_38, get(floor).backgroundImage.opacity);
60987
- set_value(input_39, get(floor).backgroundImage.scale);
60988
- set_value(input_40, get(floor).backgroundImage.rotation);
61097
+ set_value(input_37, get(floor).backgroundImage.opacity);
61098
+ set_value(input_38, get(floor).backgroundImage.scale);
61099
+ set_value(input_39, get(floor).backgroundImage.rotation);
60989
61100
  set_class(button_27, 1, `flex-1 px-2 py-1.5 border rounded text-sm ${get(floor).backgroundImage.locked ? "bg-amber-100 border-amber-400 text-amber-700" : "border-gray-200 hover:bg-gray-50"}`);
60990
- set_text(text_32, get(floor).backgroundImage.locked ? "🔒 Locked" : "🔓 Unlocked");
61101
+ set_text(text_33, get(floor).backgroundImage.locked ? "🔒 Locked" : "🔓 Unlocked");
60991
61102
  });
60992
- delegated("input", input_38, (e) => updateBackgroundImage({ opacity: Number(e.target.value) }));
60993
- delegated("input", input_39, (e) => updateBackgroundImage({ scale: Number(e.target.value) }));
60994
- delegated("input", input_40, (e) => updateBackgroundImage({ rotation: Number(e.target.value) }));
61103
+ delegated("input", input_37, (e) => updateBackgroundImage({ opacity: Number(e.target.value) }));
61104
+ delegated("input", input_38, (e) => updateBackgroundImage({ scale: Number(e.target.value) }));
61105
+ delegated("input", input_39, (e) => updateBackgroundImage({ rotation: Number(e.target.value) }));
60995
61106
  delegated("click", button_27, () => updateBackgroundImage({ locked: !get(floor).backgroundImage.locked }));
60996
61107
  delegated("click", button_28, () => {
60997
61108
  calibrationPoints.set([]);
@@ -61000,9 +61111,9 @@ function PropertiesPanel($$anchor, $$props) {
61000
61111
  delegated("click", button_29, () => setBackgroundImage(void 0));
61001
61112
  append($$anchor, div_41);
61002
61113
  };
61003
- if_block(node_10, ($$render) => {
61004
- var _$$get18;
61005
- if (get(hasBgImage) && ((_$$get18 = get(floor)) === null || _$$get18 === void 0 ? void 0 : _$$get18.backgroundImage)) $$render(consequent_14);
61114
+ if_block(node_11, ($$render) => {
61115
+ var _$$get19;
61116
+ if (get(hasBgImage) && ((_$$get19 = get(floor)) === null || _$$get19 === void 0 ? void 0 : _$$get19.backgroundImage)) $$render(consequent_14);
61006
61117
  });
61007
61118
  reset(div);
61008
61119
  template_effect(() => classes = set_class(div, 1, `${is3D() ? "w-80" : "w-64"} shrink-0 bg-white border-l border-gray-200 flex flex-col overflow-y-auto p-3 fixed right-0 z-40 shadow-lg`, null, classes, { hidden: !get(hasSelection) }));
@@ -61023,7 +61134,7 @@ delegate([
61023
61134
  init_client();
61024
61135
  var root_3$5 = /* @__PURE__ */ from_html(`<button><span class="text-[10px]"> </span> <span class="truncate flex-1"> </span></button>`);
61025
61136
  var root_4$4 = /* @__PURE__ */ from_html(`<div class="pl-7 pr-2 py-1 text-gray-300 italic">Empty</div>`);
61026
- var root_2$5 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
61137
+ var root_2$6 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
61027
61138
  var root_1$6 = /* @__PURE__ */ from_html(`<div class="border-b border-gray-50 relative"><button class="w-full flex items-center gap-1.5 px-2 py-1.5 hover:bg-gray-50 text-left"><span class="text-[10px] text-gray-400 w-3"> </span> <span> </span> <span class="font-medium text-gray-700 flex-1"> </span> <span class="text-gray-400 mr-1"> </span></button> <span role="button" tabindex="0">👁</span> <!></div>`);
61028
61139
  var root_5$2 = /* @__PURE__ */ from_html(`<div class="p-4 text-gray-400 text-center">No elements</div>`);
61029
61140
  var root$2 = /* @__PURE__ */ from_html(`<div class="w-56 bg-white border-l border-gray-200 flex flex-col overflow-hidden text-xs select-none"><div class="px-3 py-2 border-b border-gray-100 font-semibold text-gray-700 text-sm flex items-center gap-1.5">🗂 Layers</div> <div class="flex-1 overflow-y-auto"><!> <!></div></div>`);
@@ -61194,7 +61305,7 @@ function LayersPanel($$anchor, $$props) {
61194
61305
  let classes;
61195
61306
  var node_1 = sibling(span_4, 2);
61196
61307
  var consequent_1 = ($$anchor) => {
61197
- var fragment = root_2$5();
61308
+ var fragment = root_2$6();
61198
61309
  var node_2 = first_child(fragment);
61199
61310
  each(node_2, 17, () => get(cat).items, index$1, ($$anchor, item) => {
61200
61311
  var button_1 = root_3$5();
@@ -62232,7 +62343,7 @@ function drawFurnitureIcon(ctx, catalogId, w, d, color, strokeColor, heatmapMatr
62232
62343
  //#region src/lib/components/editor/ContextMenu.svelte
62233
62344
  init_client();
62234
62345
  init_index_client();
62235
- var root_2$4 = /* @__PURE__ */ from_html(`<button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">📋</span> Duplicate</button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">🔄</span> Rotate 90°</button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">↔️</span> Flip Horizontal</button> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">⬆️</span> Bring to Front</button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">⬇️</span> Send to Back</button> <div class="ctx-sep svelte-wxo1tu"></div> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu"> </span> </button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">⚙️</span> Properties</button> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item ctx-danger svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">🗑️</span> Delete</button>`, 1);
62346
+ var root_2$5 = /* @__PURE__ */ from_html(`<button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">📋</span> Duplicate</button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">🔄</span> Rotate 90°</button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">↔️</span> Flip Horizontal</button> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">⬆️</span> Bring to Front</button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">⬇️</span> Send to Back</button> <div class="ctx-sep svelte-wxo1tu"></div> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu"> </span> </button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">⚙️</span> Properties</button> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item ctx-danger svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">🗑️</span> Delete</button>`, 1);
62236
62347
  var root_3$4 = /* @__PURE__ */ from_html(`<button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">✂️</span> Split Wall</button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">〰️</span> </button> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">⚙️</span> Properties</button> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item ctx-danger svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">🗑️</span> Delete Wall</button>`, 1);
62237
62348
  var root_4$3 = /* @__PURE__ */ from_html(`<button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">⚙️</span> Properties</button> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item ctx-danger svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">🗑️</span> Delete</button>`, 1);
62238
62349
  var root_5$1 = /* @__PURE__ */ from_html(`<button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">✏️</span> Rename Room</button> <button class="ctx-item svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">🎨</span> Change Floor Texture</button> <div class="ctx-sep svelte-wxo1tu"></div> <button class="ctx-item ctx-danger svelte-wxo1tu" role="menuitem"><span class="ctx-icon svelte-wxo1tu">🗑️</span> Delete Room</button>`, 1);
@@ -62280,7 +62391,7 @@ function ContextMenu($$anchor, $$props) {
62280
62391
  var div = root_1$5();
62281
62392
  var node_1 = child(div);
62282
62393
  var consequent = ($$anchor) => {
62283
- var fragment_1 = root_2$4();
62394
+ var fragment_1 = root_2$5();
62284
62395
  var button = first_child(fragment_1);
62285
62396
  var button_1 = sibling(button, 2);
62286
62397
  var button_2 = sibling(button_1, 2);
@@ -63618,30 +63729,65 @@ function drawFurnitureItem(cs, item, selected, options) {
63618
63729
  ctx.fillRect(hx - ehs, hy - ehs, ehs * 2, ehs * 2);
63619
63730
  ctx.strokeRect(hx - ehs, hy - ehs, ehs * 2, ehs * 2);
63620
63731
  }
63621
- const rotY = -d / 2 - 18;
63622
- ctx.strokeStyle = "#3b82f6";
63623
- ctx.lineWidth = 1;
63624
- ctx.beginPath();
63625
- ctx.moveTo(0, -d / 2 - 2);
63626
- ctx.lineTo(0, rotY + 5);
63627
- ctx.stroke();
63628
- ctx.fillStyle = "#3b82f6";
63629
- ctx.beginPath();
63630
- ctx.arc(0, rotY, 5, 0, Math.PI * 2);
63631
- ctx.fill();
63632
- ctx.strokeStyle = "#ffffff";
63633
- ctx.lineWidth = 1.2;
63634
- ctx.beginPath();
63635
- ctx.arc(0, rotY, 3, -Math.PI * .8, Math.PI * .4);
63636
- ctx.stroke();
63637
- const arrowAngle2 = Math.PI * .4;
63638
- const ax = Math.cos(arrowAngle2) * 3;
63639
- const ay = Math.sin(arrowAngle2) * 3;
63640
- ctx.beginPath();
63641
- ctx.moveTo(ax + 1.5, rotY + ay - 1);
63642
- ctx.lineTo(ax, rotY + ay);
63643
- ctx.lineTo(ax - 1, rotY + ay - 2);
63644
- ctx.stroke();
63732
+ const rotOffset = isCamera ? 26 : 18;
63733
+ const rotRadius = isCamera ? 8 : 5;
63734
+ const rotIconR = isCamera ? 4.5 : 3;
63735
+ const rotHandles = isCamera ? [
63736
+ {
63737
+ edgeX: 0,
63738
+ edgeY: -d / 2,
63739
+ hx: 0,
63740
+ hy: -d / 2 - rotOffset
63741
+ },
63742
+ {
63743
+ edgeX: 0,
63744
+ edgeY: d / 2,
63745
+ hx: 0,
63746
+ hy: d / 2 + rotOffset
63747
+ },
63748
+ {
63749
+ edgeX: -w / 2,
63750
+ edgeY: 0,
63751
+ hx: -w / 2 - rotOffset,
63752
+ hy: 0
63753
+ },
63754
+ {
63755
+ edgeX: w / 2,
63756
+ edgeY: 0,
63757
+ hx: w / 2 + rotOffset,
63758
+ hy: 0
63759
+ }
63760
+ ] : [{
63761
+ edgeX: 0,
63762
+ edgeY: -d / 2,
63763
+ hx: 0,
63764
+ hy: -d / 2 - rotOffset
63765
+ }];
63766
+ for (const h of rotHandles) {
63767
+ ctx.strokeStyle = "#3b82f6";
63768
+ ctx.lineWidth = 1;
63769
+ ctx.beginPath();
63770
+ ctx.moveTo(h.edgeX, h.edgeY);
63771
+ ctx.lineTo(h.hx, h.hy);
63772
+ ctx.stroke();
63773
+ ctx.fillStyle = "#3b82f6";
63774
+ ctx.beginPath();
63775
+ ctx.arc(h.hx, h.hy, rotRadius, 0, Math.PI * 2);
63776
+ ctx.fill();
63777
+ ctx.strokeStyle = "#ffffff";
63778
+ ctx.lineWidth = isCamera ? 1.6 : 1.2;
63779
+ ctx.beginPath();
63780
+ ctx.arc(h.hx, h.hy, rotIconR, -Math.PI * .8, Math.PI * .4);
63781
+ ctx.stroke();
63782
+ const arrowAngle2 = Math.PI * .4;
63783
+ const ax = Math.cos(arrowAngle2) * rotIconR;
63784
+ const ay = Math.sin(arrowAngle2) * rotIconR;
63785
+ ctx.beginPath();
63786
+ ctx.moveTo(h.hx + ax + 1.5, h.hy + ay - 1);
63787
+ ctx.lineTo(h.hx + ax, h.hy + ay);
63788
+ ctx.lineTo(h.hx + ax - 1, h.hy + ay - 2);
63789
+ ctx.stroke();
63790
+ }
63645
63791
  }
63646
63792
  ctx.restore();
63647
63793
  }
@@ -64579,7 +64725,7 @@ function findWallAt(p, walls, zoom) {
64579
64725
  return null;
64580
64726
  }
64581
64727
  function findHandleAt(p, selectedId, furniture, zoom) {
64582
- var _fi$scale$x, _fi$scale, _fi$scale$y, _fi$scale2;
64728
+ var _fi$width, _fi$scale$x, _fi$scale, _fi$depth, _fi$scale$y, _fi$scale2;
64583
64729
  if (!selectedId) return null;
64584
64730
  const fi = furniture.find((f) => f.id === selectedId);
64585
64731
  if (!fi) return null;
@@ -64590,11 +64736,34 @@ function findHandleAt(p, selectedId, furniture, zoom) {
64590
64736
  const angle = -(fi.rotation * Math.PI) / 180;
64591
64737
  const rx = dx * Math.cos(angle) - dy * Math.sin(angle);
64592
64738
  const ry = dx * Math.sin(angle) + dy * Math.cos(angle);
64593
- const hw = cat.width * Math.abs((_fi$scale$x = (_fi$scale = fi.scale) === null || _fi$scale === void 0 ? void 0 : _fi$scale.x) !== null && _fi$scale$x !== void 0 ? _fi$scale$x : 1) / 2;
64594
- const hd = cat.depth * Math.abs((_fi$scale$y = (_fi$scale2 = fi.scale) === null || _fi$scale2 === void 0 ? void 0 : _fi$scale2.y) !== null && _fi$scale$y !== void 0 ? _fi$scale$y : 1) / 2;
64739
+ const hw = ((_fi$width = fi.width) !== null && _fi$width !== void 0 ? _fi$width : cat.width) * Math.abs((_fi$scale$x = (_fi$scale = fi.scale) === null || _fi$scale === void 0 ? void 0 : _fi$scale.x) !== null && _fi$scale$x !== void 0 ? _fi$scale$x : 1) / 2;
64740
+ const hd = ((_fi$depth = fi.depth) !== null && _fi$depth !== void 0 ? _fi$depth : cat.depth) * Math.abs((_fi$scale$y = (_fi$scale2 = fi.scale) === null || _fi$scale2 === void 0 ? void 0 : _fi$scale2.y) !== null && _fi$scale$y !== void 0 ? _fi$scale$y : 1) / 2;
64595
64741
  const ht = 8 / zoom;
64596
- const rotHandleDist = 18 / zoom;
64597
- if (Math.abs(rx) < ht && Math.abs(ry - (-hd - rotHandleDist)) < ht) return "rotate";
64742
+ const isCamera = fi.catalogId === "camera";
64743
+ const rotHandleDist = (isCamera ? 26 : 18) / zoom;
64744
+ const rotHt = (isCamera ? 12 : 8) / zoom;
64745
+ const rotateHits = isCamera ? [
64746
+ {
64747
+ x: 0,
64748
+ y: -hd - rotHandleDist
64749
+ },
64750
+ {
64751
+ x: 0,
64752
+ y: hd + rotHandleDist
64753
+ },
64754
+ {
64755
+ x: -hw - rotHandleDist,
64756
+ y: 0
64757
+ },
64758
+ {
64759
+ x: hw + rotHandleDist,
64760
+ y: 0
64761
+ }
64762
+ ] : [{
64763
+ x: 0,
64764
+ y: -hd - rotHandleDist
64765
+ }];
64766
+ for (const h of rotateHits) if (Math.abs(rx - h.x) < rotHt && Math.abs(ry - h.y) < rotHt) return "rotate";
64598
64767
  if (Math.abs(rx - -hw) < ht && Math.abs(ry - -hd) < ht) return "resize-tl";
64599
64768
  if (Math.abs(rx - hw) < ht && Math.abs(ry - -hd) < ht) return "resize-tr";
64600
64769
  if (Math.abs(rx - -hw) < ht && Math.abs(ry - hd) < ht) return "resize-bl";
@@ -64780,7 +64949,7 @@ var root_21 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -tr
64780
64949
  var root_22 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-red-600 text-white px-3 py-1 rounded-full text-xs shadow">Right-click two points to measure · M to exit · Esc to cancel</div>`);
64781
64950
  var root_23 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-emerald-600 text-white px-3 py-1 rounded-full text-xs shadow">Click to place text label · Esc to cancel</div>`);
64782
64951
  var root_24 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-indigo-600 text-white px-3 py-1 rounded-full text-xs shadow"> </div>`);
64783
- var root_2$3 = /* @__PURE__ */ from_html(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="absolute bottom-3 left-3 z-20 flex items-center gap-1 bg-white rounded-lg shadow-lg border border-gray-200 px-1 py-0.5"><button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom Out (−)" aria-label="Zoom out">−</button> <button class="min-w-[3.5rem] h-7 flex items-center justify-center rounded hover:bg-gray-100 text-xs font-medium text-gray-600 hover:text-gray-800 tabular-nums" title="Reset to 100%" aria-label="Zoom to 100%"> </button> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom In (+)" aria-label="Zoom in">+</button> <div class="w-px h-5 bg-gray-200"></div> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700 text-sm" title="Zoom to Fit (F)" aria-label="Zoom to fit">⊞</button></div> <!>`, 1);
64952
+ var root_2$4 = /* @__PURE__ */ from_html(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="absolute bottom-3 left-3 z-20 flex items-center gap-1 bg-white rounded-lg shadow-lg border border-gray-200 px-1 py-0.5"><button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom Out (−)" aria-label="Zoom out">−</button> <button class="min-w-[3.5rem] h-7 flex items-center justify-center rounded hover:bg-gray-100 text-xs font-medium text-gray-600 hover:text-gray-800 tabular-nums" title="Reset to 100%" aria-label="Zoom to 100%"> </button> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom In (+)" aria-label="Zoom in">+</button> <div class="w-px h-5 bg-gray-200"></div> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700 text-sm" title="Zoom to Fit (F)" aria-label="Zoom to fit">⊞</button></div> <!>`, 1);
64784
64953
  var root$1 = /* @__PURE__ */ from_html(`<div class="w-full h-full relative overflow-hidden" role="application"><div class="w-full h-full"><canvas aria-label="Floor plan editor canvas"></canvas></div> <!> <!></div>`);
64785
64954
  function FloorPlanCanvas($$anchor, $$props) {
64786
64955
  push($$props, true);
@@ -65254,21 +65423,31 @@ function FloorPlanCanvas($$anchor, $$props) {
65254
65423
  };
65255
65424
  return end;
65256
65425
  }
65426
+ let resizeRaf = 0;
65257
65427
  function resize() {
65428
+ if (resizeRaf) return;
65429
+ resizeRaf = requestAnimationFrame(() => {
65430
+ resizeRaf = 0;
65431
+ applyCanvasResize();
65432
+ });
65433
+ }
65434
+ function applyCanvasResize() {
65258
65435
  if ($$props.viewOnly) {
65259
65436
  layoutViewOnlyViewport();
65260
65437
  return;
65261
65438
  }
65262
65439
  const parent = canvas === null || canvas === void 0 ? void 0 : canvas.parentElement;
65263
- if (!parent) return;
65264
- set(width, parent.clientWidth, true);
65265
- set(height, parent.clientHeight, true);
65266
- if (canvas) {
65267
- canvas.width = get(width);
65268
- canvas.height = get(height);
65269
- }
65270
- markDirty();
65271
- needsFitToCanvas = true;
65440
+ if (!parent || !canvas) return;
65441
+ const nextW = parent.clientWidth;
65442
+ const nextH = parent.clientHeight;
65443
+ if (nextW <= 0 || nextH <= 0) return;
65444
+ if (nextW === get(width) && nextH === get(height) && canvas.width === nextW) return;
65445
+ set(width, nextW, true);
65446
+ set(height, nextH, true);
65447
+ canvas.width = get(width);
65448
+ canvas.height = get(height);
65449
+ canvasDirty = true;
65450
+ draw();
65272
65451
  }
65273
65452
  /** viewOnly: canvas fills parent 100%, floor zoomed to fit edge-to-edge */
65274
65453
  function layoutViewOnlyViewport() {
@@ -68263,7 +68442,7 @@ function FloorPlanCanvas($$anchor, $$props) {
68263
68442
  });
68264
68443
  var node_1 = sibling(node, 2);
68265
68444
  var consequent_22 = ($$anchor) => {
68266
- var fragment = root_2$3();
68445
+ var fragment = root_2$4();
68267
68446
  var node_2 = first_child(fragment);
68268
68447
  var consequent_1 = ($$anchor) => {
68269
68448
  var input = root_3$3();
@@ -68780,7 +68959,7 @@ function FloorPlanCanvas($$anchor, $$props) {
68780
68959
  set_style(div_1, $0);
68781
68960
  classes = set_class(canvas_1, 1, "block w-full h-full", null, classes, { "pointer-events-none": $$props.viewOnly });
68782
68961
  set_attribute(canvas_1, "tabindex", $$props.viewOnly ? -1 : 0);
68783
- set_style(canvas_1, `cursor: ${get(cursorStyle)};`);
68962
+ set_style(canvas_1, `cursor: ${get(cursorStyle)}; background-color: ${canvasBackground()};`);
68784
68963
  }, [() => getCanvasFrameStyle()]);
68785
68964
  delegated("mousedown", canvas_1, onMouseDown);
68786
68965
  delegated("mousemove", canvas_1, onMouseMove);
@@ -68929,7 +69108,7 @@ function alignElements(ids, op) {
68929
69108
  //#region src/lib/components/editor/AlignmentToolbar.svelte
68930
69109
  init_client();
68931
69110
  var root_3$2 = /* @__PURE__ */ from_html(`<div class="w-px h-5 bg-gray-200 mx-0.5"></div>`);
68932
- var root_2$2 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-blue-50 text-gray-500 hover:text-blue-600 transition-colors"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path></path></svg></button> <!>`, 1);
69111
+ var root_2$3 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-blue-50 text-gray-500 hover:text-blue-600 transition-colors"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path></path></svg></button> <!>`, 1);
68933
69112
  var root_1$3 = /* @__PURE__ */ from_html(`<div class="fixed top-16 left-1/2 -translate-x-1/2 z-50 flex items-center gap-0.5 bg-white rounded-lg shadow-lg border border-gray-200 px-1.5 py-1"><span class="text-xs text-gray-400 px-1 select-none"> </span> <div class="w-px h-5 bg-gray-200 mx-0.5"></div> <!></div>`);
68934
69113
  function AlignmentToolbar($$anchor, $$props) {
68935
69114
  push($$props, true);
@@ -68994,7 +69173,7 @@ function AlignmentToolbar($$anchor, $$props) {
68994
69173
  var text = child(span);
68995
69174
  reset(span);
68996
69175
  each(sibling(span, 4), 17, () => buttons, index$1, ($$anchor, btn) => {
68997
- var fragment_1 = root_2$2();
69176
+ var fragment_1 = root_2$3();
68998
69177
  var button = first_child(fragment_1);
68999
69178
  var svg = child(button);
69000
69179
  var path = child(svg);
@@ -69032,7 +69211,7 @@ delegate(["click"]);
69032
69211
  //#endregion
69033
69212
  //#region src/lib/components/editor/CommandPalette.svelte
69034
69213
  init_client();
69035
- var root_2$1 = /* @__PURE__ */ from_html(`<div class="px-4 py-6 text-center text-sm text-gray-400">No results found</div>`);
69214
+ var root_2$2 = /* @__PURE__ */ from_html(`<div class="px-4 py-6 text-center text-sm text-gray-400">No results found</div>`);
69036
69215
  var root_4$1 = /* @__PURE__ */ from_html(`<div role="option"><span class="text-base w-6 text-center flex-shrink-0"> </span> <span class="flex-1 truncate"> </span> <span class="text-xs text-gray-400 flex-shrink-0"> </span></div>`);
69037
69216
  var root_1$2 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/40 z-[100] flex justify-center" role="dialog" aria-label="Command Palette"><div class="mt-[15vh] w-full max-w-lg h-fit bg-white rounded-xl shadow-2xl overflow-hidden" role="listbox"><div class="flex items-center gap-2 px-4 py-3 border-b border-gray-200"><span class="text-gray-400 text-lg">🔍</span> <input class="flex-1 bg-transparent outline-none text-sm text-gray-800 placeholder-gray-400" placeholder="Search furniture, tools, actions…" type="text" spellcheck="false"/> <kbd class="text-[10px] px-1.5 py-0.5 bg-gray-100 rounded border border-gray-200 text-gray-400">ESC</kbd></div> <div class="max-h-[50vh] overflow-y-auto"><!></div> <div class="px-4 py-2 border-t border-gray-100 flex items-center gap-3 text-[10px] text-gray-400"><span><kbd class="px-1 py-0.5 bg-gray-100 rounded border border-gray-200">↑↓</kbd> navigate</span> <span><kbd class="px-1 py-0.5 bg-gray-100 rounded border border-gray-200">↵</kbd> select</span> <span><kbd class="px-1 py-0.5 bg-gray-100 rounded border border-gray-200">esc</kbd> close</span></div></div></div>`);
69038
69217
  function CommandPalette($$anchor, $$props) {
@@ -69289,7 +69468,7 @@ function CommandPalette($$anchor, $$props) {
69289
69468
  var div_3 = sibling(div_2, 2);
69290
69469
  var node_1 = child(div_3);
69291
69470
  var consequent = ($$anchor) => {
69292
- append($$anchor, root_2$1());
69471
+ append($$anchor, root_2$2());
69293
69472
  };
69294
69473
  var alternate = ($$anchor) => {
69295
69474
  var fragment_1 = comment();
@@ -69353,7 +69532,7 @@ delegate(["click", "keydown"]);
69353
69532
  //#region src/lib/components/editor/PrintLayout.svelte
69354
69533
  init_client();
69355
69534
  init_index_client();
69356
- var root_2 = /* @__PURE__ */ from_html(`<option> </option>`);
69535
+ var root_2$1 = /* @__PURE__ */ from_html(`<option> </option>`);
69357
69536
  var root_4 = /* @__PURE__ */ from_html(`<div class="flex justify-between"><span class="text-slate-600"> </span> <span class="text-slate-800 font-medium ml-2"> </span></div>`);
69358
69537
  var root_3$1 = /* @__PURE__ */ from_html(`<div class="border-t border-slate-300 pt-3 mt-2 print-legend"><h3 class="text-xs font-bold text-slate-700 uppercase tracking-wide mb-2">Room Schedule</h3> <div class="grid grid-cols-3 gap-x-6 gap-y-1 text-xs"></div></div>`);
69359
69538
  var root_1$1 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/60 z-[100] flex items-start justify-center overflow-auto print-overlay-backdrop"><div class="fixed top-0 left-0 right-0 bg-slate-800 text-white px-6 py-3 flex items-center gap-4 z-[101] print-hide"><h3 class="font-semibold text-sm">Print Preview</h3> <div class="h-4 w-px bg-white/20"></div> <label class="text-xs text-white/70">Page: <select class="ml-1 bg-slate-700 text-white text-xs rounded px-2 py-1 border border-slate-600"><option>Letter</option><option>A4</option></select></label> <label class="text-xs text-white/70">Orientation: <select class="ml-1 bg-slate-700 text-white text-xs rounded px-2 py-1 border border-slate-600"><option>Landscape</option><option>Portrait</option></select></label> <label class="text-xs text-white/70">Scale: <select class="ml-1 bg-slate-700 text-white text-xs rounded px-2 py-1 border border-slate-600"></select></label> <div class="flex-1"></div> <button class="px-4 py-1.5 bg-blue-500 hover:bg-blue-600 text-white text-sm font-semibold rounded-lg transition-colors flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg> Print</button> <button class="px-3 py-1.5 text-white/70 hover:text-white text-sm transition-colors">✕ Close</button></div> <div><div class="border-b-2 border-slate-800 pb-3 mb-4 flex items-end justify-between print-title-block"><div><h1 class="text-xl font-bold text-slate-800"> </h1> <p class="text-sm text-slate-500"> </p></div> <div class="text-right text-xs text-slate-500"><p class="font-semibold text-slate-700"> </p> <p> </p></div></div> <div class="flex-1 relative print-canvas-container svelte-67xe6d"><canvas class="w-full svelte-67xe6d" style="height: calc(100% - 20px);"></canvas> <div class="absolute top-2 right-2 print-north-arrow"><svg width="40" height="40" viewBox="0 0 40 40"><polygon points="20,2 24,16 20,12 16,16" fill="#1e293b"></polygon><polygon points="20,38 24,24 20,28 16,24" fill="#94a3b8"></polygon><text x="20" y="10" text-anchor="middle" fill="#1e293b" font-size="8" font-weight="bold">N</text></svg></div> <div class="absolute bottom-1 left-2 flex items-center gap-2 text-[10px] text-slate-600 print-scale-bar"><div class="flex items-end gap-0"><div class="w-12 h-1 bg-slate-800"></div> <div class="w-12 h-1 bg-slate-400"></div></div> <span> </span></div></div> <!> <div class="border-t border-slate-200 pt-2 mt-3 flex justify-between text-[9px] text-slate-400 print-footer"><span>Generated by Open3D Floorplan</span> <span>Page 1 of 1</span></div></div></div>`);
@@ -69580,7 +69759,7 @@ function PrintLayout($$anchor, $$props) {
69580
69759
  var label_2 = sibling(label_1, 2);
69581
69760
  var select_2 = sibling(child(label_2));
69582
69761
  each(select_2, 21, () => scaleOptions, index$1, ($$anchor, s) => {
69583
- var option_4 = root_2();
69762
+ var option_4 = root_2$1();
69584
69763
  var text = child(option_4, true);
69585
69764
  reset(option_4);
69586
69765
  var option_4_value = {};
@@ -69802,10 +69981,32 @@ function findOpenCameraPosition(floor, preferred) {
69802
69981
  y: preferred.y
69803
69982
  };
69804
69983
  }
69984
+ function propsEqual(a, b) {
69985
+ const left = a !== null && a !== void 0 ? a : {};
69986
+ const keys = new Set([...Object.keys(left), ...Object.keys(b)]);
69987
+ for (const key of keys) {
69988
+ var _left$key, _b$key;
69989
+ if (((_left$key = left[key]) !== null && _left$key !== void 0 ? _left$key : "") !== ((_b$key = b[key]) !== null && _b$key !== void 0 ? _b$key : "")) return false;
69990
+ }
69991
+ return true;
69992
+ }
69993
+ function applyCameraProps(id, cam) {
69994
+ var _props$serial, _ref, _props$name;
69995
+ const props = assignedCameraToProps(cam);
69996
+ const serial = ((_props$serial = props.serial) === null || _props$serial === void 0 ? void 0 : _props$serial.trim()) || String(cam.serial).trim();
69997
+ updateFurniture(id, {
69998
+ serial,
69999
+ name: (_ref = (_props$name = props.name) !== null && _props$name !== void 0 ? _props$name : props.serial) !== null && _ref !== void 0 ? _ref : serial,
70000
+ props: {
70001
+ ...props,
70002
+ serial
70003
+ }
70004
+ });
70005
+ }
69805
70006
  /**
69806
70007
  * Sync host `assignedCameras` onto the active floor.
69807
70008
  * - Adds missing serials at floor center (non-overlapping)
69808
- * - Updates names for existing serials
70009
+ * - Updates dynamic props for existing serials
69809
70010
  * - Removes cameras whose serial is no longer assigned
69810
70011
  * - If floor has no walls, rejects adds and emits camerasRejected
69811
70012
  */
@@ -69814,24 +70015,21 @@ function syncAssignedCameras(assigned) {
69814
70015
  const floor = get$1(activeFloor);
69815
70016
  const project = get$1(currentProject);
69816
70017
  if (!floor || !project) return;
69817
- const normalized = assigned.filter((c) => c && typeof c.serial === "string" && c.serial.trim());
69818
- const assignedBySerial = new Map(normalized.map((c) => [c.serial.trim(), c]));
70018
+ const normalized = assigned.filter((c) => c && typeof c.serial === "string" && String(c.serial).trim());
70019
+ const assignedBySerial = new Map(normalized.map((c) => [String(c.serial).trim(), c]));
69819
70020
  const existing = getCameraFurniture(floor);
69820
70021
  const existingBySerial = /* @__PURE__ */ new Map();
69821
70022
  for (const item of existing) if (item.serial) existingBySerial.set(item.serial, item);
69822
- const toAdd = normalized.filter((c) => !existingBySerial.has(c.serial.trim()));
70023
+ const toAdd = normalized.filter((c) => !existingBySerial.has(String(c.serial).trim()));
69823
70024
  const hasFloorLayout = ((_floor$walls$length = (_floor$walls = floor.walls) === null || _floor$walls === void 0 ? void 0 : _floor$walls.length) !== null && _floor$walls$length !== void 0 ? _floor$walls$length : 0) > 0;
69824
70025
  function rejectNoFloor(cameras) {
69825
70026
  if (cameras.length === 0) return;
69826
- const key = cameras.map((c) => c.serial.trim()).sort().join(",");
70027
+ const key = cameras.map((c) => String(c.serial).trim()).sort().join(",");
69827
70028
  if (key === lastRejectedKey) return;
69828
70029
  lastRejectedKey = key;
69829
70030
  emitFloorCallback("camerasRejected", {
69830
70031
  reason: "no-floor",
69831
- cameras: cameras.map((c) => ({
69832
- serial: c.serial,
69833
- name: c.name
69834
- }))
70032
+ cameras: cameras.map((c) => assignedCameraToProps(c))
69835
70033
  });
69836
70034
  }
69837
70035
  if (toAdd.length > 0 && !hasFloorLayout) rejectNoFloor(toAdd);
@@ -69846,7 +70044,10 @@ function syncAssignedCameras(assigned) {
69846
70044
  for (const item of getCameraFurniture(floorAfterRemove)) {
69847
70045
  if (!item.serial) continue;
69848
70046
  const assignedCam = assignedBySerial.get(item.serial);
69849
- if (assignedCam && assignedCam.name !== item.name) updateFurniture(item.id, { name: assignedCam.name });
70047
+ if (!assignedCam) continue;
70048
+ const nextProps = assignedCameraToProps(assignedCam);
70049
+ nextProps.serial = item.serial;
70050
+ if (!propsEqual(item.props, nextProps) || item.name !== nextProps.name) applyCameraProps(item.id, assignedCam);
69850
70051
  }
69851
70052
  if (!hasFloorLayout) return;
69852
70053
  const center = getFloorCenter(floorAfterRemove);
@@ -69857,12 +70058,9 @@ function syncAssignedCameras(assigned) {
69857
70058
  lastRejectedKey = "";
69858
70059
  let workingFloor = get$1(activeFloor);
69859
70060
  for (const cam of toAdd) {
69860
- const serial = cam.serial.trim();
70061
+ const serial = String(cam.serial).trim();
69861
70062
  if (getCameraFurniture(workingFloor).some((f) => f.serial === serial)) continue;
69862
- updateFurniture(addFurniture("camera", findOpenCameraPosition(workingFloor, center)), {
69863
- serial,
69864
- name: cam.name
69865
- });
70063
+ applyCameraProps(addFurniture("camera", findOpenCameraPosition(workingFloor, center)), cam);
69866
70064
  workingFloor = get$1(activeFloor);
69867
70065
  }
69868
70066
  } finally {
@@ -69873,6 +70071,7 @@ function syncAssignedCameras(assigned) {
69873
70071
  //#region src/App.svelte
69874
70072
  init_client();
69875
70073
  init_index_client();
70074
+ var root_2 = /* @__PURE__ */ from_html(`<div class="shrink-0 h-full overflow-hidden transition-[width] duration-300 ease-in-out"><div><!></div></div>`);
69876
70075
  var root_3 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
69877
70076
  var root_7 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/50 flex items-center justify-center z-50" role="dialog" tabindex="-1" aria-label="Keyboard Shortcuts"><div class="bg-white rounded-2xl shadow-2xl max-w-2xl w-full mx-4 max-h-[85vh] flex flex-col" role="document"><div class="flex items-center justify-between px-6 pt-5 pb-3 border-b border-gray-100"><div class="flex items-center gap-2"><svg class="w-5 h-5 text-slate-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707"></path></svg> <h2 class="text-lg font-bold text-slate-800">Keyboard Shortcuts</h2></div> <div class="flex items-center gap-2"><button class="text-xs px-3 py-1.5 rounded-lg bg-slate-100 hover:bg-slate-200 text-slate-600 hover:text-slate-800 transition-colors flex items-center gap-1.5" aria-label="Copy all shortcuts"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg> Copy All</button> <button class="text-gray-400 hover:text-gray-600 text-xl leading-none" aria-label="Close shortcuts">✕</button></div></div> <div class="overflow-y-auto px-6 py-4"><div class="grid grid-cols-2 gap-x-8 gap-y-0 text-sm"><div><div class="flex items-center gap-2 mb-2"><span class="text-xs font-bold uppercase tracking-wider text-indigo-500">Tools</span> <div class="flex-1 h-px bg-indigo-100"></div></div> <div class="space-y-1.5 mb-5"><div class="flex justify-between"><span class="text-gray-600">Select tool</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">V</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Wall tool</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">W</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Door tool</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">D</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Pan mode</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">H</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Measure tool</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">M</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Annotate tool</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">N</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Text tool</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">T</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Toggle snap</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">S</kbd></div></div> <div class="flex items-center gap-2 mb-2"><span class="text-xs font-bold uppercase tracking-wider text-amber-500">Edit</span> <div class="flex-1 h-px bg-amber-100"></div></div> <div class="space-y-1.5 mb-5"><div class="flex justify-between"><span class="text-gray-600">Undo</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+Z</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Redo</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+Y</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Copy</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+C</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Paste</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+V</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Select all</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+A</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Deselect all</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+D</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Save project</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+S</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Cancel / Deselect</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Esc</kbd></div></div></div> <div><div class="flex items-center gap-2 mb-2"><span class="text-xs font-bold uppercase tracking-wider text-emerald-500">Elements</span> <div class="flex-1 h-px bg-emerald-100"></div></div> <div class="space-y-1.5 mb-5"><div class="flex justify-between"><span class="text-gray-600">Rotate element</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">R</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Delete selected</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Del</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Lock / Unlock</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+L</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Group selection</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+G</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Ungroup</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Ctrl+⇧+G</kbd></div></div> <div class="flex items-center gap-2 mb-2"><span class="text-xs font-bold uppercase tracking-wider text-blue-500">View</span> <div class="flex-1 h-px bg-blue-100"></div></div> <div class="space-y-1.5 mb-5"><div class="flex justify-between"><span class="text-gray-600">Toggle 2D / 3D</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Tab</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Zoom to fit</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">F</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Toggle grid</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">G</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Toggle layers</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">L</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Show shortcuts</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">?</kbd></div></div> <div class="flex items-center gap-2 mb-2"><span class="text-xs font-bold uppercase tracking-wider text-purple-500">Canvas</span> <div class="flex-1 h-px bg-purple-100"></div></div> <div class="space-y-1.5 mb-5"><div class="flex justify-between"><span class="text-gray-600">Zoom in / out</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Scroll</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Zoom in / out</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">+ / −</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Pan canvas</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Space+Drag</kbd></div></div> <div class="flex items-center gap-2 mb-2"><span class="text-xs font-bold uppercase tracking-wider text-rose-500">Walls</span> <div class="flex-1 h-px bg-rose-100"></div></div> <div class="space-y-1.5"><div class="flex justify-between"><span class="text-gray-600">Finish wall chain</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">Dbl-click</kbd></div> <div class="flex justify-between"><span class="text-gray-600">Close wall loop</span><kbd class="px-1.5 py-0.5 bg-gray-100 rounded text-xs font-mono text-slate-700 border border-gray-200">C</kbd></div></div></div></div></div> <div class="px-6 py-3 border-t border-gray-100 text-center"><p class="text-xs text-gray-400">Press <kbd class="px-1 py-0.5 bg-gray-100 rounded text-xs font-mono border border-gray-200">?</kbd> or <kbd class="px-1 py-0.5 bg-gray-100 rounded text-xs font-mono border border-gray-200">Esc</kbd> to close</p></div></div></div>`);
69878
70077
  var root = /* @__PURE__ */ from_html(`<div class="h-full flex flex-col overflow-hidden"><!> <div class="flex flex-1 overflow-hidden"><!> <div class="flex-1 min-w-0 relative"><!></div> <!> <!></div></div> <!> <!> <!> <!> <!>`, 1);
@@ -69880,6 +70079,7 @@ function App($$anchor, $$props) {
69880
70079
  var _$$props$stores, _$$props$stores2;
69881
70080
  push($$props, true);
69882
70081
  let showLayers = /* @__PURE__ */ state(false);
70082
+ let showBuildSidebar = /* @__PURE__ */ state(true);
69883
70083
  let floorData = /* @__PURE__ */ state(null);
69884
70084
  let config = /* @__PURE__ */ state(proxy({ ...DEFAULT_CONFIG }));
69885
70085
  let activeFloorId = /* @__PURE__ */ state(null);
@@ -69962,6 +70162,12 @@ function App($$anchor, $$props) {
69962
70162
  },
69963
70163
  get onDispatch() {
69964
70164
  return $$props.onDispatch;
70165
+ },
70166
+ get showBuildSidebar() {
70167
+ return get(showBuildSidebar);
70168
+ },
70169
+ set showBuildSidebar($$value) {
70170
+ set(showBuildSidebar, $$value, true);
69965
70171
  }
69966
70172
  });
69967
70173
  };
@@ -69971,7 +70177,9 @@ function App($$anchor, $$props) {
69971
70177
  var div_1 = sibling(node, 2);
69972
70178
  var node_1 = child(div_1);
69973
70179
  var consequent_1 = ($$anchor) => {
69974
- BuildPanel($$anchor, {
70180
+ var div_2 = root_2();
70181
+ var div_3 = child(div_2);
70182
+ BuildPanel(child(div_3), {
69975
70183
  get showHelp() {
69976
70184
  return get(showHelp);
69977
70185
  },
@@ -69991,16 +70199,24 @@ function App($$anchor, $$props) {
69991
70199
  set(showUndoHistory, $$value, true);
69992
70200
  }
69993
70201
  });
70202
+ reset(div_3);
70203
+ reset(div_2);
70204
+ template_effect(() => {
70205
+ set_style(div_2, `width: ${get(showBuildSidebar) ? "16rem" : "0"};`);
70206
+ set_attribute(div_2, "aria-hidden", !get(showBuildSidebar));
70207
+ set_class(div_3, 1, `w-64 h-full ${get(showBuildSidebar) ? "" : "pointer-events-none"}`);
70208
+ });
70209
+ append($$anchor, div_2);
69994
70210
  };
69995
70211
  if_block(node_1, ($$render) => {
69996
70212
  var _$$get;
69997
70213
  if (get(mode) === "2d" && !((_$$get = get(config)) === null || _$$get === void 0 ? void 0 : _$$get.viewOnly)) $$render(consequent_1);
69998
70214
  });
69999
- var div_2 = sibling(node_1, 2);
70000
- var node_2 = child(div_2);
70215
+ var div_4 = sibling(node_1, 2);
70216
+ var node_3 = child(div_4);
70001
70217
  var consequent_3 = ($$anchor) => {
70002
- var fragment_3 = root_3();
70003
- var node_3 = first_child(fragment_3);
70218
+ var fragment_2 = root_3();
70219
+ var node_4 = first_child(fragment_2);
70004
70220
  {
70005
70221
  let $0 = /* @__PURE__ */ user_derived(() => {
70006
70222
  var _$$get2;
@@ -70054,7 +70270,7 @@ function App($$anchor, $$props) {
70054
70270
  var _$$get14;
70055
70271
  return (_$$get14 = get(config)) === null || _$$get14 === void 0 ? void 0 : _$$get14.floorPlateBackground;
70056
70272
  });
70057
- FloorPlanCanvas(node_3, {
70273
+ FloorPlanCanvas(node_4, {
70058
70274
  get viewOnly() {
70059
70275
  return get($0);
70060
70276
  },
@@ -70096,27 +70312,27 @@ function App($$anchor, $$props) {
70096
70312
  }
70097
70313
  });
70098
70314
  }
70099
- var node_4 = sibling(node_3, 2);
70315
+ var node_5 = sibling(node_4, 2);
70100
70316
  var consequent_2 = ($$anchor) => {
70101
70317
  AlignmentToolbar($$anchor, {});
70102
70318
  };
70103
- if_block(node_4, ($$render) => {
70319
+ if_block(node_5, ($$render) => {
70104
70320
  if (!get(config).viewOnly) $$render(consequent_2);
70105
70321
  });
70106
- append($$anchor, fragment_3);
70322
+ append($$anchor, fragment_2);
70107
70323
  };
70108
- if_block(node_2, ($$render) => {
70324
+ if_block(node_3, ($$render) => {
70109
70325
  if (get(mode) === "2d") $$render(consequent_3);
70110
70326
  });
70111
- reset(div_2);
70112
- var node_5 = sibling(div_2, 2);
70327
+ reset(div_4);
70328
+ var node_6 = sibling(div_4, 2);
70113
70329
  var consequent_4 = ($$anchor) => {
70114
70330
  LayersPanel($$anchor, {});
70115
70331
  };
70116
- if_block(node_5, ($$render) => {
70332
+ if_block(node_6, ($$render) => {
70117
70333
  if (get(showLayers) && get(mode) === "2d" && !get(config).viewOnly) $$render(consequent_4);
70118
70334
  });
70119
- var node_6 = sibling(node_5, 2);
70335
+ var node_7 = sibling(node_6, 2);
70120
70336
  var consequent_5 = ($$anchor) => {
70121
70337
  {
70122
70338
  let $0 = /* @__PURE__ */ user_derived(() => get(mode) === "3d");
@@ -70141,13 +70357,13 @@ function App($$anchor, $$props) {
70141
70357
  });
70142
70358
  }
70143
70359
  };
70144
- if_block(node_6, ($$render) => {
70360
+ if_block(node_7, ($$render) => {
70145
70361
  if (!get(config).viewOnly) $$render(consequent_5);
70146
70362
  });
70147
70363
  reset(div_1);
70148
70364
  reset(div);
70149
- var node_7 = sibling(div, 2);
70150
- UndoHistoryPanel(node_7, {
70365
+ var node_8 = sibling(div, 2);
70366
+ UndoHistoryPanel(node_8, {
70151
70367
  get visible() {
70152
70368
  return get(showUndoHistory);
70153
70369
  },
@@ -70155,25 +70371,25 @@ function App($$anchor, $$props) {
70155
70371
  set(showUndoHistory, $$value, true);
70156
70372
  }
70157
70373
  });
70158
- var node_8 = sibling(node_7, 2);
70374
+ var node_9 = sibling(node_8, 2);
70159
70375
  var consequent_6 = ($$anchor) => {
70160
- var div_3 = root_7();
70161
- var div_4 = child(div_3);
70162
- var div_5 = child(div_4);
70163
- var div_6 = sibling(child(div_5), 2);
70164
- var button = child(div_6);
70376
+ var div_5 = root_7();
70377
+ var div_6 = child(div_5);
70378
+ var div_7 = child(div_6);
70379
+ var div_8 = sibling(child(div_7), 2);
70380
+ var button = child(div_8);
70165
70381
  var button_1 = sibling(button, 2);
70382
+ reset(div_8);
70383
+ reset(div_7);
70384
+ next(4);
70166
70385
  reset(div_6);
70167
70386
  reset(div_5);
70168
- next(4);
70169
- reset(div_4);
70170
- reset(div_3);
70171
- delegated("click", div_3, () => set(showHelp, false));
70172
- delegated("keydown", div_3, (e) => {
70387
+ delegated("click", div_5, () => set(showHelp, false));
70388
+ delegated("keydown", div_5, (e) => {
70173
70389
  if (e.key === "Escape") set(showHelp, false);
70174
70390
  });
70175
- delegated("click", div_4, (e) => e.stopPropagation());
70176
- delegated("keydown", div_4, (e) => e.stopPropagation());
70391
+ delegated("click", div_6, (e) => e.stopPropagation());
70392
+ delegated("keydown", div_6, (e) => e.stopPropagation());
70177
70393
  delegated("click", button, () => {
70178
70394
  const text = [
70179
70395
  "KEYBOARD SHORTCUTS — Open3D Floorplan",
@@ -70224,13 +70440,13 @@ function App($$anchor, $$props) {
70224
70440
  navigator.clipboard.writeText(text);
70225
70441
  });
70226
70442
  delegated("click", button_1, () => set(showHelp, false));
70227
- append($$anchor, div_3);
70443
+ append($$anchor, div_5);
70228
70444
  };
70229
- if_block(node_8, ($$render) => {
70445
+ if_block(node_9, ($$render) => {
70230
70446
  if (get(showHelp)) $$render(consequent_6);
70231
70447
  });
70232
- var node_9 = sibling(node_8, 2);
70233
- CommandPalette(node_9, {
70448
+ var node_10 = sibling(node_9, 2);
70449
+ CommandPalette(node_10, {
70234
70450
  get open() {
70235
70451
  return get(commandPaletteOpen);
70236
70452
  },
@@ -70238,8 +70454,8 @@ function App($$anchor, $$props) {
70238
70454
  set(commandPaletteOpen, $$value, true);
70239
70455
  }
70240
70456
  });
70241
- var node_10 = sibling(node_9, 2);
70242
- PrintLayout(node_10, {
70457
+ var node_11 = sibling(node_10, 2);
70458
+ PrintLayout(node_11, {
70243
70459
  get open() {
70244
70460
  return get(printOpen);
70245
70461
  },
@@ -70247,7 +70463,7 @@ function App($$anchor, $$props) {
70247
70463
  set(printOpen, $$value, true);
70248
70464
  }
70249
70465
  });
70250
- OnboardingTooltip(sibling(node_10, 2), {});
70466
+ OnboardingTooltip(sibling(node_11, 2), {});
70251
70467
  append($$anchor, fragment);
70252
70468
  pop();
70253
70469
  }