floor-editor-ts 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6990,13 +6990,16 @@ var DEFAULT_CONFIG = {
6990
6990
  selectedCameraSerial: null,
6991
6991
  showCameraCones: false,
6992
6992
  showCameraLabels: true,
6993
- cameraHeatmapMatrix: []
6993
+ cameraHeatmapMatrix: [],
6994
+ siteCameras: []
6994
6995
  };
6995
6996
  function normalizeConfig(value) {
6996
6997
  if (!value || typeof value !== "object") return { ...DEFAULT_CONFIG };
6998
+ 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;
6997
6999
  return {
6998
7000
  ...DEFAULT_CONFIG,
6999
- ...value
7001
+ ...value,
7002
+ siteCameras
7000
7003
  };
7001
7004
  }
7002
7005
  function normalizeFloorData(data) {
@@ -56110,7 +56113,7 @@ var root_7$6 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-
56110
56113
  before:content-[''] before:absolute before:w-4 before:h-4 before:rounded-full before:bg-white before:top-0.5 before:left-0.5 before:transition-transform checked:before:translate-x-5"/></label> <div class="flex items-center justify-between px-4 py-3.5"><span class="text-sm text-gray-700">Line Color</span> <div class="flex items-center gap-2"><button style="background-color: #ffffff" aria-label="White line color"></button> <span class="text-gray-300">|</span> <button style="background-color: #1e293b" aria-label="Dark line color"></button></div></div></div>`, 1);
56111
56114
  var root_9$2 = /* @__PURE__ */ from_html(`<button><span class="text-2xl"> </span> <span class="text-xs font-medium text-gray-700 dark:text-gray-300"> </span></button>`);
56112
56115
  var root_8$3 = /* @__PURE__ */ from_html(`<div class="space-y-4"><div><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-3">Theme</span> <div class="flex gap-3"></div></div></div>`);
56113
- var root_11$2 = /* @__PURE__ */ from_html(`<button class="px-4 py-2 text-sm font-medium text-red-600 dark:text-red-400 border border-red-300 dark:border-red-600 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors">Remove</button>`);
56116
+ var root_11$1 = /* @__PURE__ */ from_html(`<button class="px-4 py-2 text-sm font-medium text-red-600 dark:text-red-400 border border-red-300 dark:border-red-600 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors">Remove</button>`);
56114
56117
  var root_12$3 = /* @__PURE__ */ from_html(`<button class="px-4 py-2 text-sm font-medium text-red-600 dark:text-red-400 border border-red-300 dark:border-red-600 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors">Remove</button>`);
56115
56118
  var root_10$2 = /* @__PURE__ */ from_html(`<div class="space-y-4"><div><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-1">Gemini API Key</span> <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Required for AI-powered photorealistic rendering. Your key is stored locally in your browser only - never sent to our servers.</p> <div class="flex gap-2"><div class="relative flex-1"><input class="w-full px-3 py-2 pr-10 border border-gray-300 dark:border-gray-600 rounded-lg text-sm font-mono focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="AIza..."/> <button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm"> </button></div></div> <div class="flex gap-2 mt-3"><button class="px-4 py-2 text-sm font-medium bg-slate-700 text-white rounded-lg hover:bg-slate-600 transition-colors"> </button> <!></div></div> <div class="border-t border-gray-200 dark:border-gray-700 pt-4"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-2">How to get a Gemini key</span> <ol class="text-xs text-gray-500 dark:text-gray-400 space-y-1 list-decimal list-inside"><li>Go to <a href="https://aistudio.google.com/apikey" target="_blank" rel="noopener" class="text-blue-500 hover:underline">Google AI Studio</a></li> <li>Click "Create API Key"</li> <li>Copy and paste it above</li></ol></div> <div class="border-t border-gray-200 dark:border-gray-700 pt-4"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-1">OpenAI API Key</span> <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Optional — enables OpenAI image generation as an alternative to Gemini. Stored locally only.</p> <div class="flex gap-2"><div class="relative flex-1"><input class="w-full px-3 py-2 pr-10 border border-gray-300 dark:border-gray-600 rounded-lg text-sm font-mono focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="sk-..."/> <button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm"> </button></div></div> <div class="flex gap-2 mt-3"><button class="px-4 py-2 text-sm font-medium bg-slate-700 text-white rounded-lg hover:bg-slate-600 transition-colors"> </button> <!></div> <div class="mt-3"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-2">How to get an OpenAI key</span> <ol class="text-xs text-gray-500 dark:text-gray-400 space-y-1 list-decimal list-inside"><li>Go to <a href="https://platform.openai.com/api-keys" target="_blank" rel="noopener" class="text-blue-500 hover:underline">OpenAI Platform</a></li> <li>Click "Create new secret key"</li> <li>Copy and paste it above</li></ol></div></div></div>`);
56116
56119
  var root_1$13 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center" role="dialog" tabindex="-1" aria-label="Settings"><div class="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-[420px] max-h-[80vh] flex flex-col" role="document"><div class="flex items-center justify-between px-5 pt-4 pb-2"><h2 class="text-lg font-bold text-gray-800 dark:text-gray-100">Settings</h2> <button class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-xl leading-none" aria-label="Close settings">✕</button></div> <div class="flex border-b border-gray-200 dark:border-gray-700 px-5"><button>Project <!></button> <button>Dimensions <!></button> <button>Appearance <!></button> <button>AI <!></button></div> <div class="p-5 overflow-y-auto"><!></div></div></div>`);
@@ -56402,7 +56405,7 @@ function SettingsDialog($$anchor, $$props) {
56402
56405
  reset(button_11);
56403
56406
  var node_6 = sibling(button_11, 2);
56404
56407
  var consequent_7 = ($$anchor) => {
56405
- var button_12 = root_11$2();
56408
+ var button_12 = root_11$1();
56406
56409
  delegated("click", button_12, clearGeminiKey);
56407
56410
  append($$anchor, button_12);
56408
56411
  };
@@ -58094,16 +58097,16 @@ var root_6$3 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-cen
58094
58097
  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>`);
58095
58098
  var root_5$4 = /* @__PURE__ */ from_html(`<div class="space-y-2"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Presets</h3> <p class="text-xs text-gray-400 mb-3">Click to add a room shape to the canvas</p> <div class="grid grid-cols-2 gap-2"></div> <hr class="my-3 border-gray-200"/> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Templates</h3> <p class="text-xs text-gray-400 mb-3">Pre-furnished rooms — walls + furniture in one click</p> <div class="grid grid-cols-2 gap-2"></div></div>`);
58096
58099
  var root_16$1 = /* @__PURE__ */ from_html(`<button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 w-5 h-5 flex items-center justify-center rounded-full hover:bg-gray-100" title="Clear search"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>`);
58097
- var root_17$1 = /* @__PURE__ */ from_html(`<div class="text-[10px] text-gray-400 px-1"> </div>`);
58100
+ var root_17$2 = /* @__PURE__ */ from_html(`<div class="text-[10px] text-gray-400 px-1"> </div>`);
58098
58101
  var root_18$2 = /* @__PURE__ */ from_html(`<button> </button>`);
58099
58102
  var root_20$2 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-8 h-8 rounded-lg flex items-center justify-center"><div class="w-4 h-4 rounded-sm"></div></div> <span class="text-[10px] font-medium text-gray-600 leading-tight text-center"> </span></button>`);
58100
58103
  var root_19$2 = /* @__PURE__ */ from_html(`<div class="mt-1"><h4 class="text-[10px] font-semibold text-gray-400 uppercase mb-1.5">Recent</h4> <div class="grid grid-cols-2 gap-2"></div></div> <hr class="border-gray-100"/>`, 1);
58101
58104
  var root_22$2 = /* @__PURE__ */ from_html(`<span class="text-xs font-medium text-gray-600"> <mark class="bg-yellow-200 text-gray-800 rounded-sm px-0.5"> </mark> </span>`);
58102
58105
  var root_23$2 = /* @__PURE__ */ from_html(`<span class="text-xs font-medium text-gray-600"> </span>`);
58103
- var root_21$2 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-10 h-10 rounded-lg flex items-center justify-center"><div class="w-5 h-5 rounded-sm"></div></div> <!> <span class="text-[10px] text-gray-400"> </span></button>`);
58106
+ var root_21$1 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-10 h-10 rounded-lg flex items-center justify-center"><div class="w-5 h-5 rounded-sm"></div></div> <!> <span class="text-[10px] text-gray-400"> </span></button>`);
58104
58107
  var root_15$2 = /* @__PURE__ */ from_html(`<div class="space-y-2"><div class="relative"><input type="text" placeholder="Search furniture..." class="w-full px-3 py-2 pr-8 border border-gray-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-200 focus:border-blue-400 outline-none"/> <!></div> <!> <div class="flex flex-wrap gap-1 max-h-24 overflow-y-auto"><button>All</button> <button> </button> <!></div> <!> <div class="grid grid-cols-2 gap-2 mt-2"></div></div>`);
58105
58108
  var root_24$2 = /* @__PURE__ */ from_html(`<div class="fixed z-50 pointer-events-none"><div class="bg-white rounded-xl shadow-2xl border border-gray-200 overflow-hidden" style="width: 220px;"><div class="w-full h-[120px] bg-gray-50 flex items-center justify-center p-3"><div class="w-16 h-16 rounded-xl flex items-center justify-center"><div class="w-10 h-10 rounded-md"></div></div></div> <div class="p-3 space-y-1.5"><div class="flex items-center gap-2"><span class="text-sm font-semibold text-gray-800"> </span> <span class="px-1.5 py-0.5 rounded-full text-[9px] font-semibold text-white"> </span></div> <div class="text-xs text-gray-500"> </div></div></div></div>`);
58106
- var root_25 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center"><div class="bg-white rounded-xl shadow-2xl w-80 p-5"><h3 class="text-sm font-bold text-gray-800 mb-1">Import RoomPlan</h3> <p class="text-xs text-gray-400 mb-4"> </p> <div class="space-y-3"><label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Straighten walls</div> <div class="text-xs text-gray-400">Snap near-horizontal/vertical walls to axis</div></div></label> <label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Enforce orthogonal <span class="text-xs text-blue-400 font-mono"> </span></div> <div class="text-xs text-gray-400">Force all walls to 90°/180° angles</div></div></label> <label class="block"><div class="text-xs text-gray-500 mb-1">Corner merge distance (cm)</div> <input type="number" min="0" max="50" step="5" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div> <div class="flex gap-2 mt-5"><button class="flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm text-gray-600 hover:bg-gray-50 transition-colors">Cancel</button> <button class="flex-1 px-3 py-2 bg-blue-500 text-white rounded-lg text-sm font-medium hover:bg-blue-600 transition-colors">Import</button></div></div></div>`);
58109
+ var root_25$1 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center"><div class="bg-white rounded-xl shadow-2xl w-80 p-5"><h3 class="text-sm font-bold text-gray-800 mb-1">Import RoomPlan</h3> <p class="text-xs text-gray-400 mb-4"> </p> <div class="space-y-3"><label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Straighten walls</div> <div class="text-xs text-gray-400">Snap near-horizontal/vertical walls to axis</div></div></label> <label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Enforce orthogonal <span class="text-xs text-blue-400 font-mono"> </span></div> <div class="text-xs text-gray-400">Force all walls to 90°/180° angles</div></div></label> <label class="block"><div class="text-xs text-gray-500 mb-1">Corner merge distance (cm)</div> <input type="number" min="0" max="50" step="5" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div> <div class="flex gap-2 mt-5"><button class="flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm text-gray-600 hover:bg-gray-50 transition-colors">Cancel</button> <button class="flex-1 px-3 py-2 bg-blue-500 text-white rounded-lg text-sm font-medium hover:bg-blue-600 transition-colors">Import</button></div></div></div>`);
58107
58110
  var root$4 = /* @__PURE__ */ from_html(`<div class="relative w-64 bg-white border-r border-gray-200 flex flex-col h-full overflow-hidden"><div class="flex border-b border-gray-200"><button>Build</button> <button>Rooms</button> <button>Objects</button></div> <div class="flex-1 overflow-y-auto p-3"><!></div> <button title="Layers Panel (L)" aria-label="Toggle Layers Panel">🗂</button> <button title="Undo History" aria-label="Toggle Undo History">⟲</button> <button class="absolute bottom-4 left-4 w-8 h-8 rounded-full bg-slate-700 text-white text-sm font-bold shadow-lg hover:bg-slate-600 transition-colors z-50" title="Keyboard Shortcuts (?)" aria-label="Keyboard Shortcuts">?</button></div> <!> <!>`, 1);
58108
58111
  function BuildPanel($$anchor, $$props) {
58109
58112
  push($$props, true);
@@ -58663,7 +58666,7 @@ function BuildPanel($$anchor, $$props) {
58663
58666
  reset(div_22);
58664
58667
  var node_4 = sibling(div_22, 2);
58665
58668
  var consequent_10 = ($$anchor) => {
58666
- var div_23 = root_17$1();
58669
+ var div_23 = root_17$2();
58667
58670
  var text_17 = child(div_23);
58668
58671
  reset(div_23);
58669
58672
  template_effect(() => {
@@ -58758,7 +58761,7 @@ function BuildPanel($$anchor, $$props) {
58758
58761
  var div_29 = sibling(node_6, 2);
58759
58762
  each(div_29, 21, () => get(filtered), index$1, ($$anchor, item) => {
58760
58763
  const s = /* @__PURE__ */ user_derived(() => get(search).toLowerCase());
58761
- var button_23 = root_21$2();
58764
+ var button_23 = root_21$1();
58762
58765
  var span_10 = child(button_23);
58763
58766
  var text_22 = child(span_10, true);
58764
58767
  reset(span_10);
@@ -58904,7 +58907,7 @@ function BuildPanel($$anchor, $$props) {
58904
58907
  });
58905
58908
  var node_9 = sibling(node_8, 2);
58906
58909
  var consequent_15 = ($$anchor) => {
58907
- var div_40 = root_25();
58910
+ var div_40 = root_25$1();
58908
58911
  var div_41 = child(div_40);
58909
58912
  var p_1 = sibling(child(div_41), 2);
58910
58913
  var text_31 = child(p_1, true);
@@ -59345,20 +59348,23 @@ var root_5$3 = /* @__PURE__ */ from_html(`<div class="space-y-2"><span class="te
59345
59348
  var root_1$7 = /* @__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-gray-200 rounded flex items-center justify-center text-xs">▭</span> Wall Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" disabled="" class="w-full px-2 py-1 border border-gray-200 rounded text-sm bg-gray-50"/></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 class="flex items-center gap-2"><span class="text-xs text-gray-500">Curved</span> <button> </button></div> <div><div class="flex border-b border-gray-200 mb-3"><button>Interior</button> <button>Exterior</button></div> <!></div></div>`, 1);
59346
59349
  var root_8$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-amber-100 rounded flex items-center justify-center text-xs">🚪</span> Door Properties</h3> <div class="space-y-3"><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">Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Single</option><option>Double</option><option>Sliding</option><option>French</option><option>Pocket</option><option>Bifold</option></select></label> <label class="block"><span class="text-xs text-gray-500">Hinge Side</span> <div class="flex gap-2"><button>Left</button> <button>Right</button></div></label> <label class="block"><span class="text-xs text-gray-500">Opens</span> <div class="flex gap-2"><button>Inward</button> <button>Outward</button></div></label></div>`, 1);
59347
59350
  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);
59348
- 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> <label class="block"><span class="text-xs text-gray-500">Camera Serial</span> <input type="text" placeholder="Device serial" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label>`, 1);
59349
- var root_12$1 = /* @__PURE__ */ from_html(`<button></button>`);
59351
+ var root_13$1 = /* @__PURE__ */ from_html(`<option> </option>`);
59352
+ var root_14$1 = /* @__PURE__ */ from_html(`<p class="text-xs text-gray-500">Serial: <span class="text-gray-700 font-mono"> </span></p>`);
59353
+ 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> <!>`, 1);
59354
+ var root_15$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> <label class="block"><span class="text-xs text-gray-500">Camera Serial</span> <input type="text" placeholder="Device serial" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label>`, 1);
59355
+ var root_16 = /* @__PURE__ */ from_html(`<button></button>`);
59350
59356
  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);
59351
- var root_14$1 = /* @__PURE__ */ from_html(`<option> </option>`);
59352
- var root_15$1 = /* @__PURE__ */ from_html(`<button></button>`);
59353
- var root_18$1 = /* @__PURE__ */ from_html(`<button><div class="w-full h-12 rounded-md mb-1 overflow-hidden"></div> <div class="text-center leading-3 text-[10px] text-gray-600 truncate"> </div></button>`);
59354
- var root_16 = /* @__PURE__ */ from_html(`<div><span class="text-xs font-medium text-gray-600 mb-1.5 block"> </span> <div class="grid grid-cols-3 gap-1.5"></div></div>`);
59355
- var root_13$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-green-100 rounded flex items-center justify-center text-xs">⬜</span> Room Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Room Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"></select></label> <label class="block"><span class="text-xs text-gray-500">Room Name</span> <input type="text" 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">Category</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>🏠 Indoor</option><option>🌳 Outdoor</option><option>🚗 Garage</option><option>🔧 Utility</option></select></label> <div><span class="text-xs text-gray-500">Area</span> <p class="text-sm text-gray-700"> </p></div> <div><span class="text-xs text-gray-500 mb-1.5 block">Room Color</span> <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> <div><div class="flex items-center gap-1 mb-2"><span class="text-xs text-gray-500">Floor Material</span> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-gray-400"><path d="M3 3h18v18H3z"></path><path d="M8 8h8v8H8z"></path></svg></div> <div class="space-y-3"></div></div></div>`, 1);
59356
- var root_19$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-gray-200 rounded flex items-center justify-center text-xs">🪜</span> Stair 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>Straight</option><option>L-Shaped</option><option>U-Shaped</option><option>Spiral</option></select></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">Risers</span> <input type="number" min="3" max="30" 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">Direction</span> <div class="flex gap-2"><button>Up ↑</button> <button>Down ↓</button></div></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>`, 1);
59357
- var root_21$1 = /* @__PURE__ */ from_html(`<button></button>`);
59358
- var root_22$1 = /* @__PURE__ */ from_html(`<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>`);
59359
- var root_20$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-gray-200 rounded flex items-center justify-center text-xs">🏛️</span> Column Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Shape</span> <div class="flex gap-2"><button>⭕ Round</button> <button>⬜ Square</button></div></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="10" max="200" 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="50" max="1000" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div><span class="text-xs text-gray-500 mb-1.5 block">Color</span> <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> <!></div>`, 1);
59360
- var root_23$1 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-emerald-100 rounded flex items-center justify-center text-xs">🏷️</span> Text Annotation</h3> <label class="block"><span class="text-xs text-gray-500">Text</span> <input type="text" 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">Font Size</span> <input type="number" min="8" max="72" 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">Color</span> <div class="flex items-center gap-2"><input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/> <span class="text-xs text-gray-400"> </span></div></label> <label class="block"><span class="text-xs text-gray-500">Rotation (°)</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">X</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">Y</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`);
59361
- var root_24$1 = /* @__PURE__ */ from_html(`<div class="mt-4 pt-3 border-t border-gray-200"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-blue-100 rounded flex items-center justify-center text-xs">🖼️</span> Background Image</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Opacity</span> <input type="range" min="0.05" max="1" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Scale</span> <input type="range" min="0.1" max="5" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Rotation</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-2"><button> </button> <button class="flex-1 px-2 py-1.5 border rounded text-sm border-gray-200 hover:bg-gray-50">📏 Set Scale</button></div> <button class="w-full px-2 py-1.5 border border-red-300 rounded text-sm text-red-600 hover:bg-red-50">Remove Image</button></div></div>`);
59357
+ var root_18$1 = /* @__PURE__ */ from_html(`<option> </option>`);
59358
+ var root_19$1 = /* @__PURE__ */ from_html(`<button></button>`);
59359
+ var root_22$1 = /* @__PURE__ */ from_html(`<button><div class="w-full h-12 rounded-md mb-1 overflow-hidden"></div> <div class="text-center leading-3 text-[10px] text-gray-600 truncate"> </div></button>`);
59360
+ var root_20$1 = /* @__PURE__ */ from_html(`<div><span class="text-xs font-medium text-gray-600 mb-1.5 block"> </span> <div class="grid grid-cols-3 gap-1.5"></div></div>`);
59361
+ var root_17$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-green-100 rounded flex items-center justify-center text-xs">⬜</span> Room Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Room Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"></select></label> <label class="block"><span class="text-xs text-gray-500">Room Name</span> <input type="text" 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">Category</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>🏠 Indoor</option><option>🌳 Outdoor</option><option>🚗 Garage</option><option>🔧 Utility</option></select></label> <div><span class="text-xs text-gray-500">Area</span> <p class="text-sm text-gray-700"> </p></div> <div><span class="text-xs text-gray-500 mb-1.5 block">Room Color</span> <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> <div><div class="flex items-center gap-1 mb-2"><span class="text-xs text-gray-500">Floor Material</span> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-gray-400"><path d="M3 3h18v18H3z"></path><path d="M8 8h8v8H8z"></path></svg></div> <div class="space-y-3"></div></div></div>`, 1);
59362
+ var root_23$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-gray-200 rounded flex items-center justify-center text-xs">🪜</span> Stair 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>Straight</option><option>L-Shaped</option><option>U-Shaped</option><option>Spiral</option></select></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">Risers</span> <input type="number" min="3" max="30" 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">Direction</span> <div class="flex gap-2"><button>Up ↑</button> <button>Down ↓</button></div></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>`, 1);
59363
+ var root_25 = /* @__PURE__ */ from_html(`<button></button>`);
59364
+ var root_26 = /* @__PURE__ */ from_html(`<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>`);
59365
+ var root_24$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-gray-200 rounded flex items-center justify-center text-xs">🏛️</span> Column Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Shape</span> <div class="flex gap-2"><button>⭕ Round</button> <button>⬜ Square</button></div></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="10" max="200" 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="50" max="1000" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div><span class="text-xs text-gray-500 mb-1.5 block">Color</span> <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> <!></div>`, 1);
59366
+ var root_27 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-emerald-100 rounded flex items-center justify-center text-xs">🏷️</span> Text Annotation</h3> <label class="block"><span class="text-xs text-gray-500">Text</span> <input type="text" 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">Font Size</span> <input type="number" min="8" max="72" 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">Color</span> <div class="flex items-center gap-2"><input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/> <span class="text-xs text-gray-400"> </span></div></label> <label class="block"><span class="text-xs text-gray-500">Rotation (°)</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">X</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">Y</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`);
59367
+ var root_28 = /* @__PURE__ */ from_html(`<div class="mt-4 pt-3 border-t border-gray-200"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-blue-100 rounded flex items-center justify-center text-xs">🖼️</span> Background Image</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Opacity</span> <input type="range" min="0.05" max="1" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Scale</span> <input type="range" min="0.1" max="5" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Rotation</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-2"><button> </button> <button class="flex-1 px-2 py-1.5 border rounded text-sm border-gray-200 hover:bg-gray-50">📏 Set Scale</button></div> <button class="w-full px-2 py-1.5 border border-red-300 rounded text-sm text-red-600 hover:bg-red-50">Remove Image</button></div></div>`);
59362
59368
  var root$3 = /* @__PURE__ */ from_html(`<div data-properties-panel="" style="top: 48px; bottom: 36px;"><!> <!></div>`);
59363
59369
  function PropertiesPanel($$anchor, $$props) {
59364
59370
  push($$props, true);
@@ -59396,7 +59402,7 @@ function PropertiesPanel($$anchor, $$props) {
59396
59402
  function unitLabel() {
59397
59403
  return get(settings).units === "imperial" ? "in" : "cm";
59398
59404
  }
59399
- let is3D = prop($$props, "is3D", 3, false);
59405
+ let is3D = prop($$props, "is3D", 3, false), siteCameras = prop($$props, "siteCameras", 19, () => []);
59400
59406
  let wallSideTab = /* @__PURE__ */ state("interior");
59401
59407
  let selectedWall = /* @__PURE__ */ user_derived(() => {
59402
59408
  var _$$get$walls$find, _$$get;
@@ -59535,6 +59541,48 @@ function PropertiesPanel($$anchor, $$props) {
59535
59541
  if (!get(selectedFurniture)) return;
59536
59542
  updateFurniture(get(selectedFurniture).id, { serial: e.target.value });
59537
59543
  }
59544
+ const useSiteCameraSelect = /* @__PURE__ */ user_derived(() => siteCameras().length > 0);
59545
+ const usedCameraSerials = /* @__PURE__ */ user_derived(() => {
59546
+ var _$$get12;
59547
+ const used = /* @__PURE__ */ new Set();
59548
+ if (!((_$$get12 = get(floor)) === null || _$$get12 === void 0 ? void 0 : _$$get12.furniture) || !get(selectedFurniture)) return used;
59549
+ for (const item of get(floor).furniture) {
59550
+ if (item.catalogId !== "camera" || item.id === get(selectedFurniture).id) continue;
59551
+ if (item.serial) used.add(item.serial);
59552
+ }
59553
+ return used;
59554
+ });
59555
+ const selectableSiteCameras = /* @__PURE__ */ user_derived(() => {
59556
+ var _$$get$serial;
59557
+ if (!get(selectedFurniture) || !get(useSiteCameraSelect)) return [];
59558
+ const currentSerial = (_$$get$serial = get(selectedFurniture).serial) !== null && _$$get$serial !== void 0 ? _$$get$serial : "";
59559
+ const fromSite = siteCameras().filter((c) => !get(usedCameraSerials).has(c.serial) || c.serial === currentSerial);
59560
+ if (currentSerial && !fromSite.some((c) => c.serial === currentSerial)) {
59561
+ var _$$get$name;
59562
+ return [{
59563
+ serial: currentSerial,
59564
+ name: (_$$get$name = get(selectedFurniture).name) !== null && _$$get$name !== void 0 ? _$$get$name : currentSerial
59565
+ }, ...fromSite];
59566
+ }
59567
+ return fromSite;
59568
+ });
59569
+ function onSiteCameraSelect(e) {
59570
+ if (!get(selectedFurniture)) return;
59571
+ const serial = e.target.value;
59572
+ if (!serial) {
59573
+ updateFurniture(get(selectedFurniture).id, {
59574
+ serial: void 0,
59575
+ name: void 0
59576
+ });
59577
+ return;
59578
+ }
59579
+ const camera = siteCameras().find((c) => c.serial === serial);
59580
+ if (!camera) return;
59581
+ updateFurniture(get(selectedFurniture).id, {
59582
+ serial: camera.serial,
59583
+ name: camera.name
59584
+ });
59585
+ }
59538
59586
  function resetFurnitureDefaults() {
59539
59587
  if (!get(selectedFurniture)) return;
59540
59588
  updateFurniture(get(selectedFurniture).id, {
@@ -60084,7 +60132,7 @@ function PropertiesPanel($$anchor, $$props) {
60084
60132
  reset(label_11);
60085
60133
  reset(div_11);
60086
60134
  template_effect(($0, $1, $2, $3, $4, $5, $6, $7) => {
60087
- var _$$get12, _$$get13, _$$get14, _$$get15;
60135
+ var _$$get13, _$$get14, _$$get15, _$$get16;
60088
60136
  set_text(text_6, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60089
60137
  set_value(input_5, $1);
60090
60138
  set_text(text_7, `Distance from A (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
@@ -60097,10 +60145,10 @@ function PropertiesPanel($$anchor, $$props) {
60097
60145
  var _select$__value;
60098
60146
  select.value = (_select$__value = select.__value = get(selectedDoor).type) !== null && _select$__value !== void 0 ? _select$__value : "", select_option(select, get(selectedDoor).type);
60099
60147
  }
60100
- set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get12 = get(selectedDoor)) === null || _$$get12 === void 0 ? void 0 : _$$get12.swingDirection) === "left" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60101
- set_class(button_10, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get13 = get(selectedDoor)) === null || _$$get13 === void 0 ? void 0 : _$$get13.swingDirection) === "right" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60102
- set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$get14 = get(selectedDoor)) === null || _$$get14 === void 0 ? void 0 : _$$get14.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60103
- set_class(button_12, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get15 = get(selectedDoor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60148
+ set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get13 = get(selectedDoor)) === null || _$$get13 === void 0 ? void 0 : _$$get13.swingDirection) === "left" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60149
+ set_class(button_10, 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) === "right" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60150
+ set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$get15 = get(selectedDoor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60151
+ set_class(button_12, 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"}`);
60104
60152
  }, [
60105
60153
  () => unitLabel(),
60106
60154
  () => displayValue(get(selectedDoor).width),
@@ -60224,7 +60272,7 @@ function PropertiesPanel($$anchor, $$props) {
60224
60272
  delegated("input", input_13, onWindowSill);
60225
60273
  append($$anchor, fragment_2);
60226
60274
  };
60227
- var consequent_5 = ($$anchor) => {
60275
+ var consequent_7 = ($$anchor) => {
60228
60276
  var fragment_3 = root_10$1();
60229
60277
  var h3 = first_child(fragment_3);
60230
60278
  var span_14 = child(h3);
@@ -60237,27 +60285,84 @@ function PropertiesPanel($$anchor, $$props) {
60237
60285
  reset(h3);
60238
60286
  var div_15 = sibling(h3, 2);
60239
60287
  var node_4 = child(div_15);
60240
- var consequent_4 = ($$anchor) => {
60241
- var fragment_4 = root_11$1();
60242
- var label_18 = first_child(fragment_4);
60243
- var input_14 = sibling(child(label_18), 2);
60244
- remove_input_defaults(input_14);
60245
- reset(label_18);
60246
- var label_19 = sibling(label_18, 2);
60247
- var input_15 = sibling(child(label_19), 2);
60248
- remove_input_defaults(input_15);
60249
- reset(label_19);
60250
- template_effect(() => {
60251
- var _$$get$name, _$$get$serial;
60252
- set_value(input_14, (_$$get$name = get(selectedFurniture).name) !== null && _$$get$name !== void 0 ? _$$get$name : "");
60253
- set_value(input_15, (_$$get$serial = get(selectedFurniture).serial) !== null && _$$get$serial !== void 0 ? _$$get$serial : "");
60288
+ var consequent_6 = ($$anchor) => {
60289
+ var fragment_4 = comment();
60290
+ var node_5 = first_child(fragment_4);
60291
+ var consequent_5 = ($$anchor) => {
60292
+ var fragment_5 = root_12$1();
60293
+ var label_18 = first_child(fragment_5);
60294
+ var select_2 = sibling(child(label_18), 2);
60295
+ var option_11 = child(select_2);
60296
+ option_11.value = option_11.__value = "";
60297
+ each(sibling(option_11), 17, () => get(selectableSiteCameras), (cam) => cam.serial, ($$anchor, cam) => {
60298
+ var option_12 = root_13$1();
60299
+ var text_18 = child(option_12);
60300
+ reset(option_12);
60301
+ var option_12_value = {};
60302
+ template_effect(() => {
60303
+ var _$$get$name2, _$$get$serial2;
60304
+ 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 : ""})`);
60305
+ if (option_12_value !== (option_12_value = get(cam).serial)) {
60306
+ var _option_12$__value;
60307
+ option_12.value = (_option_12$__value = option_12.__value = get(cam).serial) !== null && _option_12$__value !== void 0 ? _option_12$__value : "";
60308
+ }
60309
+ });
60310
+ append($$anchor, option_12);
60311
+ });
60312
+ reset(select_2);
60313
+ var select_2_value;
60314
+ init_select(select_2);
60315
+ reset(label_18);
60316
+ var node_7 = sibling(label_18, 2);
60317
+ var consequent_4 = ($$anchor) => {
60318
+ var p = root_14$1();
60319
+ var span_15 = sibling(child(p));
60320
+ var text_19 = child(span_15, true);
60321
+ reset(span_15);
60322
+ reset(p);
60323
+ template_effect(() => set_text(text_19, get(selectedFurniture).serial));
60324
+ append($$anchor, p);
60325
+ };
60326
+ if_block(node_7, ($$render) => {
60327
+ if (get(selectedFurniture).serial) $$render(consequent_4);
60328
+ });
60329
+ template_effect(() => {
60330
+ var _$$get$serial3;
60331
+ if (select_2_value !== (select_2_value = (_$$get$serial3 = get(selectedFurniture).serial) !== null && _$$get$serial3 !== void 0 ? _$$get$serial3 : "")) {
60332
+ var _select_2$__value, _$$get$serial4, _$$get$serial5;
60333
+ select_2.value = (_select_2$__value = select_2.__value = (_$$get$serial4 = get(selectedFurniture).serial) !== null && _$$get$serial4 !== void 0 ? _$$get$serial4 : "") !== null && _select_2$__value !== void 0 ? _select_2$__value : "", select_option(select_2, (_$$get$serial5 = get(selectedFurniture).serial) !== null && _$$get$serial5 !== void 0 ? _$$get$serial5 : "");
60334
+ }
60335
+ });
60336
+ delegated("change", select_2, onSiteCameraSelect);
60337
+ append($$anchor, fragment_5);
60338
+ };
60339
+ var alternate_1 = ($$anchor) => {
60340
+ var fragment_6 = root_15$1();
60341
+ var label_19 = first_child(fragment_6);
60342
+ var input_14 = sibling(child(label_19), 2);
60343
+ remove_input_defaults(input_14);
60344
+ reset(label_19);
60345
+ var label_20 = sibling(label_19, 2);
60346
+ var input_15 = sibling(child(label_20), 2);
60347
+ remove_input_defaults(input_15);
60348
+ reset(label_20);
60349
+ template_effect(() => {
60350
+ var _$$get$name3, _$$get$serial6;
60351
+ set_value(input_14, (_$$get$name3 = get(selectedFurniture).name) !== null && _$$get$name3 !== void 0 ? _$$get$name3 : "");
60352
+ set_value(input_15, (_$$get$serial6 = get(selectedFurniture).serial) !== null && _$$get$serial6 !== void 0 ? _$$get$serial6 : "");
60353
+ });
60354
+ delegated("input", input_14, onFurnitureName);
60355
+ delegated("input", input_15, onFurnitureSerial);
60356
+ append($$anchor, fragment_6);
60357
+ };
60358
+ if_block(node_5, ($$render) => {
60359
+ if (get(useSiteCameraSelect)) $$render(consequent_5);
60360
+ else $$render(alternate_1, -1);
60254
60361
  });
60255
- delegated("input", input_14, onFurnitureName);
60256
- delegated("input", input_15, onFurnitureSerial);
60257
60362
  append($$anchor, fragment_4);
60258
60363
  };
60259
60364
  if_block(node_4, ($$render) => {
60260
- if (get(selectedFurniture).catalogId === "camera") $$render(consequent_4);
60365
+ if (get(selectedFurniture).catalogId === "camera") $$render(consequent_6);
60261
60366
  });
60262
60367
  var div_16 = sibling(node_4, 2);
60263
60368
  var div_17 = sibling(child(div_16), 2);
@@ -60273,7 +60378,7 @@ function PropertiesPanel($$anchor, $$props) {
60273
60378
  "#dc143c",
60274
60379
  "#228b22"
60275
60380
  ], index$1, ($$anchor, color) => {
60276
- var button_14 = root_12$1();
60381
+ var button_14 = root_16();
60277
60382
  template_effect(($0) => {
60278
60383
  set_class(button_14, 1, `w-6 h-6 rounded border-2 hover:border-gray-300 transition-colors ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
60279
60384
  set_style(button_14, `background-color: ${color !== null && color !== void 0 ? color : ""}`);
@@ -60291,54 +60396,54 @@ function PropertiesPanel($$anchor, $$props) {
60291
60396
  remove_input_defaults(input_16);
60292
60397
  reset(div_18);
60293
60398
  reset(div_16);
60294
- var label_20 = sibling(div_16, 2);
60295
- var span_15 = child(label_20);
60296
- var text_18 = child(span_15);
60297
- reset(span_15);
60298
- var input_17 = sibling(span_15, 2);
60299
- remove_input_defaults(input_17);
60300
- reset(label_20);
60301
- var label_21 = sibling(label_20, 2);
60399
+ var label_21 = sibling(div_16, 2);
60302
60400
  var span_16 = child(label_21);
60303
- var text_19 = child(span_16);
60401
+ var text_20 = child(span_16);
60304
60402
  reset(span_16);
60305
- var input_18 = sibling(span_16, 2);
60306
- remove_input_defaults(input_18);
60403
+ var input_17 = sibling(span_16, 2);
60404
+ remove_input_defaults(input_17);
60307
60405
  reset(label_21);
60308
60406
  var label_22 = sibling(label_21, 2);
60309
60407
  var span_17 = child(label_22);
60310
- var text_20 = child(span_17);
60408
+ var text_21 = child(span_17);
60311
60409
  reset(span_17);
60312
- var input_19 = sibling(span_17, 2);
60313
- remove_input_defaults(input_19);
60410
+ var input_18 = sibling(span_17, 2);
60411
+ remove_input_defaults(input_18);
60314
60412
  reset(label_22);
60315
60413
  var label_23 = sibling(label_22, 2);
60316
- var select_2 = sibling(child(label_23), 2);
60317
- var option_11 = child(select_2);
60318
- option_11.value = option_11.__value = "Wood";
60319
- var option_12 = sibling(option_11);
60320
- option_12.value = option_12.__value = "Metal";
60321
- var option_13 = sibling(option_12);
60322
- option_13.value = option_13.__value = "Fabric";
60414
+ var span_18 = child(label_23);
60415
+ var text_22 = child(span_18);
60416
+ reset(span_18);
60417
+ var input_19 = sibling(span_18, 2);
60418
+ remove_input_defaults(input_19);
60419
+ reset(label_23);
60420
+ var label_24 = sibling(label_23, 2);
60421
+ var select_3 = sibling(child(label_24), 2);
60422
+ var option_13 = child(select_3);
60423
+ option_13.value = option_13.__value = "Wood";
60323
60424
  var option_14 = sibling(option_13);
60324
- option_14.value = option_14.__value = "Leather";
60425
+ option_14.value = option_14.__value = "Metal";
60325
60426
  var option_15 = sibling(option_14);
60326
- option_15.value = option_15.__value = "Glass";
60427
+ option_15.value = option_15.__value = "Fabric";
60327
60428
  var option_16 = sibling(option_15);
60328
- option_16.value = option_16.__value = "Plastic";
60429
+ option_16.value = option_16.__value = "Leather";
60329
60430
  var option_17 = sibling(option_16);
60330
- option_17.value = option_17.__value = "Stone";
60431
+ option_17.value = option_17.__value = "Glass";
60331
60432
  var option_18 = sibling(option_17);
60332
- option_18.value = option_18.__value = "Ceramic";
60333
- reset(select_2);
60334
- var select_2_value;
60335
- init_select(select_2);
60336
- reset(label_23);
60337
- var label_24 = sibling(label_23, 2);
60338
- var input_20 = sibling(child(label_24), 2);
60339
- remove_input_defaults(input_20);
60433
+ option_18.value = option_18.__value = "Plastic";
60434
+ var option_19 = sibling(option_18);
60435
+ option_19.value = option_19.__value = "Stone";
60436
+ var option_20 = sibling(option_19);
60437
+ option_20.value = option_20.__value = "Ceramic";
60438
+ reset(select_3);
60439
+ var select_3_value;
60440
+ init_select(select_3);
60340
60441
  reset(label_24);
60341
- var div_19 = sibling(label_24, 2);
60442
+ var label_25 = sibling(label_24, 2);
60443
+ var input_20 = sibling(child(label_25), 2);
60444
+ remove_input_defaults(input_20);
60445
+ reset(label_25);
60446
+ var div_19 = sibling(label_25, 2);
60342
60447
  var button_15 = child(div_19);
60343
60448
  var button_16 = sibling(button_15, 2);
60344
60449
  reset(div_19);
@@ -60356,15 +60461,15 @@ function PropertiesPanel($$anchor, $$props) {
60356
60461
  set_attribute(button_13, "title", get(selectedFurniture).locked ? "Unlock (Ctrl+L)" : "Lock (Ctrl+L)");
60357
60462
  set_text(text_17, get(selectedFurniture).locked ? "🔒 Locked" : "🔓");
60358
60463
  set_value(input_16, $2);
60359
- set_text(text_18, `Width (${$3 !== null && $3 !== void 0 ? $3 : ""})`);
60464
+ set_text(text_20, `Width (${$3 !== null && $3 !== void 0 ? $3 : ""})`);
60360
60465
  set_value(input_17, $4);
60361
- set_text(text_19, `Depth (${$5 !== null && $5 !== void 0 ? $5 : ""})`);
60466
+ set_text(text_21, `Depth (${$5 !== null && $5 !== void 0 ? $5 : ""})`);
60362
60467
  set_value(input_18, $6);
60363
- set_text(text_20, `Height (${$7 !== null && $7 !== void 0 ? $7 : ""})`);
60468
+ set_text(text_22, `Height (${$7 !== null && $7 !== void 0 ? $7 : ""})`);
60364
60469
  set_value(input_19, $8);
60365
- if (select_2_value !== (select_2_value = (_$$get$material = get(selectedFurniture).material) !== null && _$$get$material !== void 0 ? _$$get$material : "Wood")) {
60366
- var _select_2$__value, _$$get$material2, _$$get$material3;
60367
- select_2.value = (_select_2$__value = select_2.__value = (_$$get$material2 = get(selectedFurniture).material) !== null && _$$get$material2 !== void 0 ? _$$get$material2 : "Wood") !== null && _select_2$__value !== void 0 ? _select_2$__value : "", select_option(select_2, (_$$get$material3 = get(selectedFurniture).material) !== null && _$$get$material3 !== void 0 ? _$$get$material3 : "Wood");
60470
+ if (select_3_value !== (select_3_value = (_$$get$material = get(selectedFurniture).material) !== null && _$$get$material !== void 0 ? _$$get$material : "Wood")) {
60471
+ var _select_3$__value, _$$get$material2, _$$get$material3;
60472
+ 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");
60368
60473
  }
60369
60474
  set_value(input_20, $9);
60370
60475
  }, [
@@ -60404,7 +60509,7 @@ function PropertiesPanel($$anchor, $$props) {
60404
60509
  delegated("input", input_17, onFurnitureWidth);
60405
60510
  delegated("input", input_18, onFurnitureDepth);
60406
60511
  delegated("input", input_19, onFurnitureHeight);
60407
- delegated("change", select_2, onFurnitureMaterial);
60512
+ delegated("change", select_3, onFurnitureMaterial);
60408
60513
  delegated("input", input_20, onFurnitureRotation);
60409
60514
  delegated("click", button_15, () => {
60410
60515
  if (get(selectedFurniture)) updateFurniture(get(selectedFurniture).id, { rotation: get(selectedFurniture).rotation - 90 });
@@ -60435,57 +60540,57 @@ function PropertiesPanel($$anchor, $$props) {
60435
60540
  delegated("click", button_19, resetFurnitureDefaults);
60436
60541
  append($$anchor, fragment_3);
60437
60542
  };
60438
- var consequent_7 = ($$anchor) => {
60439
- var fragment_5 = root_13$1();
60440
- var div_21 = sibling(first_child(fragment_5), 2);
60441
- var label_25 = child(div_21);
60442
- var select_3 = sibling(child(label_25), 2);
60443
- each(select_3, 21, () => roomTypes, index$1, ($$anchor, rt) => {
60444
- var option_19 = root_14$1();
60445
- var text_21 = child(option_19);
60446
- reset(option_19);
60447
- var option_19_value = {};
60543
+ var consequent_9 = ($$anchor) => {
60544
+ var fragment_7 = root_17$1();
60545
+ var div_21 = sibling(first_child(fragment_7), 2);
60546
+ var label_26 = child(div_21);
60547
+ var select_4 = sibling(child(label_26), 2);
60548
+ each(select_4, 21, () => roomTypes, index$1, ($$anchor, rt) => {
60549
+ var option_21 = root_18$1();
60550
+ var text_23 = child(option_21);
60551
+ reset(option_21);
60552
+ var option_21_value = {};
60448
60553
  template_effect(() => {
60449
60554
  var _$$get$icon, _$$get$label;
60450
- set_text(text_21, `${(_$$get$icon = get(rt).icon) !== null && _$$get$icon !== void 0 ? _$$get$icon : ""} ${(_$$get$label = get(rt).label) !== null && _$$get$label !== void 0 ? _$$get$label : ""}`);
60451
- if (option_19_value !== (option_19_value = get(rt).id)) {
60452
- var _option_19$__value;
60453
- option_19.value = (_option_19$__value = option_19.__value = get(rt).id) !== null && _option_19$__value !== void 0 ? _option_19$__value : "";
60555
+ 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 : ""}`);
60556
+ if (option_21_value !== (option_21_value = get(rt).id)) {
60557
+ var _option_21$__value;
60558
+ option_21.value = (_option_21$__value = option_21.__value = get(rt).id) !== null && _option_21$__value !== void 0 ? _option_21$__value : "";
60454
60559
  }
60455
60560
  });
60456
- append($$anchor, option_19);
60561
+ append($$anchor, option_21);
60457
60562
  });
60458
- reset(select_3);
60459
- var select_3_value;
60460
- init_select(select_3);
60461
- reset(label_25);
60462
- var label_26 = sibling(label_25, 2);
60463
- var input_21 = sibling(child(label_26), 2);
60464
- remove_input_defaults(input_21);
60465
- reset(label_26);
60466
- var label_27 = sibling(label_26, 2);
60467
- var select_4 = sibling(child(label_27), 2);
60468
- var option_20 = child(select_4);
60469
- option_20.value = option_20.__value = "indoor";
60470
- var option_21 = sibling(option_20);
60471
- option_21.value = option_21.__value = "outdoor";
60472
- var option_22 = sibling(option_21);
60473
- option_22.value = option_22.__value = "garage";
60474
- var option_23 = sibling(option_22);
60475
- option_23.value = option_23.__value = "utility";
60476
60563
  reset(select_4);
60477
60564
  var select_4_value;
60478
60565
  init_select(select_4);
60566
+ reset(label_26);
60567
+ var label_27 = sibling(label_26, 2);
60568
+ var input_21 = sibling(child(label_27), 2);
60569
+ remove_input_defaults(input_21);
60479
60570
  reset(label_27);
60480
- var div_22 = sibling(label_27, 2);
60481
- var p = sibling(child(div_22), 2);
60482
- var text_22 = child(p, true);
60483
- reset(p);
60571
+ var label_28 = sibling(label_27, 2);
60572
+ var select_5 = sibling(child(label_28), 2);
60573
+ var option_22 = child(select_5);
60574
+ option_22.value = option_22.__value = "indoor";
60575
+ var option_23 = sibling(option_22);
60576
+ option_23.value = option_23.__value = "outdoor";
60577
+ var option_24 = sibling(option_23);
60578
+ option_24.value = option_24.__value = "garage";
60579
+ var option_25 = sibling(option_24);
60580
+ option_25.value = option_25.__value = "utility";
60581
+ reset(select_5);
60582
+ var select_5_value;
60583
+ init_select(select_5);
60584
+ reset(label_28);
60585
+ var div_22 = sibling(label_28, 2);
60586
+ var p_1 = sibling(child(div_22), 2);
60587
+ var text_24 = child(p_1, true);
60588
+ reset(p_1);
60484
60589
  reset(div_22);
60485
60590
  var div_23 = sibling(div_22, 2);
60486
60591
  var div_24 = sibling(child(div_23), 2);
60487
60592
  each(div_24, 21, () => roomColorPresets, index$1, ($$anchor, preset) => {
60488
- var button_20 = root_15$1();
60593
+ var button_20 = root_19$1();
60489
60594
  template_effect(() => {
60490
60595
  var _$$get$color5;
60491
60596
  set_class(button_20, 1, `w-7 h-7 rounded-md border-2 hover:border-gray-300 transition-colors ${get(selectedRoom).color === get(preset).color ? "border-blue-500 ring-1 ring-blue-200" : "border-gray-200"}`);
@@ -60504,43 +60609,43 @@ function PropertiesPanel($$anchor, $$props) {
60504
60609
  var div_26 = sibling(div_23, 2);
60505
60610
  var div_27 = sibling(child(div_26), 2);
60506
60611
  each(div_27, 21, () => textureGroups, index$1, ($$anchor, group) => {
60507
- var div_28 = root_16();
60508
- var span_18 = child(div_28);
60509
- var text_23 = child(span_18, true);
60510
- reset(span_18);
60511
- var div_29 = sibling(span_18, 2);
60612
+ var div_28 = root_20$1();
60613
+ var span_19 = child(div_28);
60614
+ var text_25 = child(span_19, true);
60615
+ reset(span_19);
60616
+ var div_29 = sibling(span_19, 2);
60512
60617
  each(div_29, 21, () => get(group).ids, index$1, ($$anchor, matId) => {
60513
60618
  const mat = /* @__PURE__ */ user_derived(() => floorMaterials.find((m) => m.id === get(matId)));
60514
- var fragment_6 = comment();
60515
- var node_5 = first_child(fragment_6);
60516
- var consequent_6 = ($$anchor) => {
60619
+ var fragment_8 = comment();
60620
+ var node_8 = first_child(fragment_8);
60621
+ var consequent_8 = ($$anchor) => {
60517
60622
  const texPath = /* @__PURE__ */ user_derived(() => {
60518
60623
  var _floorTexPaths$$$get$;
60519
60624
  return (_floorTexPaths$$$get$ = floorTexPaths[get(mat).id]) !== null && _floorTexPaths$$$get$ !== void 0 ? _floorTexPaths$$$get$ : "";
60520
60625
  });
60521
- var button_21 = root_18$1();
60626
+ var button_21 = root_22$1();
60522
60627
  var div_30 = child(button_21);
60523
60628
  var div_31 = sibling(div_30, 2);
60524
- var text_24 = child(div_31, true);
60629
+ var text_26 = child(div_31, true);
60525
60630
  reset(div_31);
60526
60631
  reset(button_21);
60527
60632
  template_effect(() => {
60528
60633
  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"}`);
60529
60634
  set_attribute(button_21, "title", get(mat).name);
60530
60635
  set_style(div_30, get(texPath) ? `background-image: url(${get(texPath)}); background-size: cover; background-position: center;` : `background-color: ${get(mat).color}`);
60531
- set_text(text_24, get(mat).name);
60636
+ set_text(text_26, get(mat).name);
60532
60637
  });
60533
60638
  delegated("click", button_21, () => onRoomFloor(get(mat).id));
60534
60639
  append($$anchor, button_21);
60535
60640
  };
60536
- if_block(node_5, ($$render) => {
60537
- if (get(mat)) $$render(consequent_6);
60641
+ if_block(node_8, ($$render) => {
60642
+ if (get(mat)) $$render(consequent_8);
60538
60643
  });
60539
- append($$anchor, fragment_6);
60644
+ append($$anchor, fragment_8);
60540
60645
  });
60541
60646
  reset(div_29);
60542
60647
  reset(div_28);
60543
- template_effect(() => set_text(text_23, get(group).label));
60648
+ template_effect(() => set_text(text_25, get(group).label));
60544
60649
  append($$anchor, div_28);
60545
60650
  });
60546
60651
  reset(div_27);
@@ -60548,21 +60653,21 @@ function PropertiesPanel($$anchor, $$props) {
60548
60653
  reset(div_21);
60549
60654
  template_effect(($0, $1) => {
60550
60655
  var _$$get$roomType, _$$get$color6;
60551
- if (select_3_value !== (select_3_value = $0)) {
60552
- var _select_3$__value;
60553
- select_3.value = (_select_3$__value = select_3.__value = $0) !== null && _select_3$__value !== void 0 ? _select_3$__value : "", select_option(select_3, $0);
60656
+ if (select_4_value !== (select_4_value = $0)) {
60657
+ var _select_4$__value;
60658
+ select_4.value = (_select_4$__value = select_4.__value = $0) !== null && _select_4$__value !== void 0 ? _select_4$__value : "", select_option(select_4, $0);
60554
60659
  }
60555
60660
  set_value(input_21, get(selectedRoom).name);
60556
- if (select_4_value !== (select_4_value = (_$$get$roomType = get(selectedRoom).roomType) !== null && _$$get$roomType !== void 0 ? _$$get$roomType : "indoor")) {
60557
- var _select_4$__value, _$$get$roomType2, _$$get$roomType3;
60558
- select_4.value = (_select_4$__value = select_4.__value = (_$$get$roomType2 = get(selectedRoom).roomType) !== null && _$$get$roomType2 !== void 0 ? _$$get$roomType2 : "indoor") !== null && _select_4$__value !== void 0 ? _select_4$__value : "", select_option(select_4, (_$$get$roomType3 = get(selectedRoom).roomType) !== null && _$$get$roomType3 !== void 0 ? _$$get$roomType3 : "indoor");
60661
+ if (select_5_value !== (select_5_value = (_$$get$roomType = get(selectedRoom).roomType) !== null && _$$get$roomType !== void 0 ? _$$get$roomType : "indoor")) {
60662
+ var _select_5$__value, _$$get$roomType2, _$$get$roomType3;
60663
+ 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");
60559
60664
  }
60560
- set_text(text_22, $1);
60665
+ set_text(text_24, $1);
60561
60666
  set_value(input_22, (_$$get$color6 = get(selectedRoom).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : "#ffffff");
60562
60667
  }, [() => get(selectedRoomType)(), () => formatArea(get(selectedRoom).area, get(settings).units)]);
60563
- delegated("change", select_3, onRoomType);
60668
+ delegated("change", select_4, onRoomType);
60564
60669
  delegated("input", input_21, onRoomName);
60565
- delegated("change", select_4, (e) => {
60670
+ delegated("change", select_5, (e) => {
60566
60671
  if (get(selectedRoom)) {
60567
60672
  const v = e.target.value;
60568
60673
  updateRoom(get(selectedRoom).id, { roomType: v });
@@ -60570,62 +60675,62 @@ function PropertiesPanel($$anchor, $$props) {
60570
60675
  }
60571
60676
  });
60572
60677
  delegated("input", input_22, (e) => onRoomColor(e.target.value));
60573
- append($$anchor, fragment_5);
60678
+ append($$anchor, fragment_7);
60574
60679
  };
60575
- var consequent_8 = ($$anchor) => {
60576
- var fragment_7 = root_19$1();
60577
- var div_32 = sibling(first_child(fragment_7), 2);
60578
- var label_28 = child(div_32);
60579
- var select_5 = sibling(child(label_28), 2);
60580
- var option_24 = child(select_5);
60581
- option_24.value = option_24.__value = "straight";
60582
- var option_25 = sibling(option_24);
60583
- option_25.value = option_25.__value = "l-shaped";
60584
- var option_26 = sibling(option_25);
60585
- option_26.value = option_26.__value = "u-shaped";
60680
+ var consequent_10 = ($$anchor) => {
60681
+ var fragment_9 = root_23$1();
60682
+ var div_32 = sibling(first_child(fragment_9), 2);
60683
+ var label_29 = child(div_32);
60684
+ var select_6 = sibling(child(label_29), 2);
60685
+ var option_26 = child(select_6);
60686
+ option_26.value = option_26.__value = "straight";
60586
60687
  var option_27 = sibling(option_26);
60587
- option_27.value = option_27.__value = "spiral";
60588
- reset(select_5);
60589
- var select_5_value;
60590
- init_select(select_5);
60591
- reset(label_28);
60592
- var label_29 = sibling(label_28, 2);
60593
- var span_19 = child(label_29);
60594
- var text_25 = child(span_19);
60595
- reset(span_19);
60596
- var input_23 = sibling(span_19, 2);
60597
- remove_input_defaults(input_23);
60688
+ option_27.value = option_27.__value = "l-shaped";
60689
+ var option_28 = sibling(option_27);
60690
+ option_28.value = option_28.__value = "u-shaped";
60691
+ var option_29 = sibling(option_28);
60692
+ option_29.value = option_29.__value = "spiral";
60693
+ reset(select_6);
60694
+ var select_6_value;
60695
+ init_select(select_6);
60598
60696
  reset(label_29);
60599
60697
  var label_30 = sibling(label_29, 2);
60600
60698
  var span_20 = child(label_30);
60601
- var text_26 = child(span_20);
60699
+ var text_27 = child(span_20);
60602
60700
  reset(span_20);
60603
- var input_24 = sibling(span_20, 2);
60604
- remove_input_defaults(input_24);
60701
+ var input_23 = sibling(span_20, 2);
60702
+ remove_input_defaults(input_23);
60605
60703
  reset(label_30);
60606
60704
  var label_31 = sibling(label_30, 2);
60607
- var input_25 = sibling(child(label_31), 2);
60608
- remove_input_defaults(input_25);
60705
+ var span_21 = child(label_31);
60706
+ var text_28 = child(span_21);
60707
+ reset(span_21);
60708
+ var input_24 = sibling(span_21, 2);
60709
+ remove_input_defaults(input_24);
60609
60710
  reset(label_31);
60610
60711
  var label_32 = sibling(label_31, 2);
60611
- var div_33 = sibling(child(label_32), 2);
60712
+ var input_25 = sibling(child(label_32), 2);
60713
+ remove_input_defaults(input_25);
60714
+ reset(label_32);
60715
+ var label_33 = sibling(label_32, 2);
60716
+ var div_33 = sibling(child(label_33), 2);
60612
60717
  var button_22 = child(div_33);
60613
60718
  var button_23 = sibling(button_22, 2);
60614
60719
  reset(div_33);
60615
- reset(label_32);
60616
- var label_33 = sibling(label_32, 2);
60617
- var input_26 = sibling(child(label_33), 2);
60618
- remove_input_defaults(input_26);
60619
60720
  reset(label_33);
60721
+ var label_34 = sibling(label_33, 2);
60722
+ var input_26 = sibling(child(label_34), 2);
60723
+ remove_input_defaults(input_26);
60724
+ reset(label_34);
60620
60725
  reset(div_32);
60621
60726
  template_effect(($0, $1, $2, $3) => {
60622
- if (select_5_value !== (select_5_value = get(selectedStair).stairType || "straight")) {
60623
- var _select_5$__value;
60624
- select_5.value = (_select_5$__value = select_5.__value = get(selectedStair).stairType || "straight") !== null && _select_5$__value !== void 0 ? _select_5$__value : "", select_option(select_5, get(selectedStair).stairType || "straight");
60727
+ if (select_6_value !== (select_6_value = get(selectedStair).stairType || "straight")) {
60728
+ var _select_6$__value;
60729
+ 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");
60625
60730
  }
60626
- set_text(text_25, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60731
+ set_text(text_27, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60627
60732
  set_value(input_23, $1);
60628
- set_text(text_26, `Depth (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
60733
+ set_text(text_28, `Depth (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
60629
60734
  set_value(input_24, $3);
60630
60735
  set_value(input_25, get(selectedStair).riserCount);
60631
60736
  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"}`);
@@ -60637,42 +60742,42 @@ function PropertiesPanel($$anchor, $$props) {
60637
60742
  () => unitLabel(),
60638
60743
  () => displayValue(get(selectedStair).depth)
60639
60744
  ]);
60640
- delegated("change", select_5, (e) => updateStair(get(selectedStair).id, { stairType: e.target.value }));
60745
+ delegated("change", select_6, (e) => updateStair(get(selectedStair).id, { stairType: e.target.value }));
60641
60746
  delegated("input", input_23, (e) => updateStair(get(selectedStair).id, { width: inputToCm(Number(e.target.value)) }));
60642
60747
  delegated("input", input_24, (e) => updateStair(get(selectedStair).id, { depth: inputToCm(Number(e.target.value)) }));
60643
60748
  delegated("input", input_25, (e) => updateStair(get(selectedStair).id, { riserCount: Number(e.target.value) }));
60644
60749
  delegated("click", button_22, () => updateStair(get(selectedStair).id, { direction: "up" }));
60645
60750
  delegated("click", button_23, () => updateStair(get(selectedStair).id, { direction: "down" }));
60646
60751
  delegated("input", input_26, (e) => updateStair(get(selectedStair).id, { rotation: Number(e.target.value) }));
60647
- append($$anchor, fragment_7);
60752
+ append($$anchor, fragment_9);
60648
60753
  };
60649
- var consequent_10 = ($$anchor) => {
60650
- var fragment_8 = root_20$1();
60651
- var div_34 = sibling(first_child(fragment_8), 2);
60652
- var label_34 = child(div_34);
60653
- var div_35 = sibling(child(label_34), 2);
60754
+ var consequent_12 = ($$anchor) => {
60755
+ var fragment_10 = root_24$1();
60756
+ var div_34 = sibling(first_child(fragment_10), 2);
60757
+ var label_35 = child(div_34);
60758
+ var div_35 = sibling(child(label_35), 2);
60654
60759
  var button_24 = child(div_35);
60655
60760
  var button_25 = sibling(button_24, 2);
60656
60761
  reset(div_35);
60657
- reset(label_34);
60658
- var label_35 = sibling(label_34, 2);
60659
- var span_21 = child(label_35);
60660
- var text_27 = child(span_21);
60661
- reset(span_21);
60662
- var input_27 = sibling(span_21, 2);
60663
- remove_input_defaults(input_27);
60664
60762
  reset(label_35);
60665
60763
  var label_36 = sibling(label_35, 2);
60666
60764
  var span_22 = child(label_36);
60667
- var text_28 = child(span_22);
60765
+ var text_29 = child(span_22);
60668
60766
  reset(span_22);
60669
- var input_28 = sibling(span_22, 2);
60670
- remove_input_defaults(input_28);
60767
+ var input_27 = sibling(span_22, 2);
60768
+ remove_input_defaults(input_27);
60671
60769
  reset(label_36);
60672
- var div_36 = sibling(label_36, 2);
60770
+ var label_37 = sibling(label_36, 2);
60771
+ var span_23 = child(label_37);
60772
+ var text_30 = child(span_23);
60773
+ reset(span_23);
60774
+ var input_28 = sibling(span_23, 2);
60775
+ remove_input_defaults(input_28);
60776
+ reset(label_37);
60777
+ var div_36 = sibling(label_37, 2);
60673
60778
  var div_37 = sibling(child(div_36), 2);
60674
60779
  each(div_37, 21, () => columnColorPresets, index$1, ($$anchor, preset) => {
60675
- var button_26 = root_21$1();
60780
+ var button_26 = root_25();
60676
60781
  template_effect(() => {
60677
60782
  var _$$get$color7;
60678
60783
  set_class(button_26, 1, `w-7 h-7 rounded-md border-2 hover:border-gray-300 transition-colors ${get(selectedColumn).color === get(preset).color ? "border-blue-500 ring-1 ring-blue-200" : "border-gray-200"}`);
@@ -60688,26 +60793,26 @@ function PropertiesPanel($$anchor, $$props) {
60688
60793
  remove_input_defaults(input_29);
60689
60794
  reset(div_38);
60690
60795
  reset(div_36);
60691
- var node_6 = sibling(div_36, 2);
60692
- var consequent_9 = ($$anchor) => {
60693
- var label_37 = root_22$1();
60694
- var input_30 = sibling(child(label_37), 2);
60796
+ var node_9 = sibling(div_36, 2);
60797
+ var consequent_11 = ($$anchor) => {
60798
+ var label_38 = root_26();
60799
+ var input_30 = sibling(child(label_38), 2);
60695
60800
  remove_input_defaults(input_30);
60696
- reset(label_37);
60801
+ reset(label_38);
60697
60802
  template_effect(() => set_value(input_30, get(selectedColumn).rotation));
60698
60803
  delegated("input", input_30, (e) => updateColumn(get(selectedColumn).id, { rotation: Number(e.target.value) }));
60699
- append($$anchor, label_37);
60804
+ append($$anchor, label_38);
60700
60805
  };
60701
- if_block(node_6, ($$render) => {
60702
- if (get(selectedColumn).shape === "square") $$render(consequent_9);
60806
+ if_block(node_9, ($$render) => {
60807
+ if (get(selectedColumn).shape === "square") $$render(consequent_11);
60703
60808
  });
60704
60809
  reset(div_34);
60705
60810
  template_effect(($0, $1, $2, $3) => {
60706
60811
  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"}`);
60707
60812
  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"}`);
60708
- set_text(text_27, `${get(selectedColumn).shape === "round" ? "Diameter" : "Side Length"} (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60813
+ set_text(text_29, `${get(selectedColumn).shape === "round" ? "Diameter" : "Side Length"} (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60709
60814
  set_value(input_27, $1);
60710
- set_text(text_28, `Height (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
60815
+ set_text(text_30, `Height (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
60711
60816
  set_value(input_28, $3);
60712
60817
  set_value(input_29, get(selectedColumn).color);
60713
60818
  }, [
@@ -60721,45 +60826,45 @@ function PropertiesPanel($$anchor, $$props) {
60721
60826
  delegated("input", input_27, (e) => updateColumn(get(selectedColumn).id, { diameter: inputToCm(Number(e.target.value)) }));
60722
60827
  delegated("input", input_28, (e) => updateColumn(get(selectedColumn).id, { height: inputToCm(Number(e.target.value)) }));
60723
60828
  delegated("input", input_29, (e) => updateColumn(get(selectedColumn).id, { color: e.target.value }));
60724
- append($$anchor, fragment_8);
60829
+ append($$anchor, fragment_10);
60725
60830
  };
60726
- var consequent_11 = ($$anchor) => {
60727
- var div_39 = root_23$1();
60728
- var label_38 = sibling(child(div_39), 2);
60729
- var input_31 = sibling(child(label_38), 2);
60831
+ var consequent_13 = ($$anchor) => {
60832
+ var div_39 = root_27();
60833
+ var label_39 = sibling(child(div_39), 2);
60834
+ var input_31 = sibling(child(label_39), 2);
60730
60835
  remove_input_defaults(input_31);
60731
- reset(label_38);
60732
- var label_39 = sibling(label_38, 2);
60733
- var input_32 = sibling(child(label_39), 2);
60734
- remove_input_defaults(input_32);
60735
60836
  reset(label_39);
60736
60837
  var label_40 = sibling(label_39, 2);
60737
- var div_40 = sibling(child(label_40), 2);
60838
+ var input_32 = sibling(child(label_40), 2);
60839
+ remove_input_defaults(input_32);
60840
+ reset(label_40);
60841
+ var label_41 = sibling(label_40, 2);
60842
+ var div_40 = sibling(child(label_41), 2);
60738
60843
  var input_33 = child(div_40);
60739
60844
  remove_input_defaults(input_33);
60740
- var span_23 = sibling(input_33, 2);
60741
- var text_29 = child(span_23, true);
60742
- reset(span_23);
60845
+ var span_24 = sibling(input_33, 2);
60846
+ var text_31 = child(span_24, true);
60847
+ reset(span_24);
60743
60848
  reset(div_40);
60744
- reset(label_40);
60745
- var label_41 = sibling(label_40, 2);
60746
- var input_34 = sibling(child(label_41), 2);
60747
- remove_input_defaults(input_34);
60748
60849
  reset(label_41);
60749
60850
  var label_42 = sibling(label_41, 2);
60750
- var input_35 = sibling(child(label_42), 2);
60751
- remove_input_defaults(input_35);
60851
+ var input_34 = sibling(child(label_42), 2);
60852
+ remove_input_defaults(input_34);
60752
60853
  reset(label_42);
60753
60854
  var label_43 = sibling(label_42, 2);
60754
- var input_36 = sibling(child(label_43), 2);
60755
- remove_input_defaults(input_36);
60855
+ var input_35 = sibling(child(label_43), 2);
60856
+ remove_input_defaults(input_35);
60756
60857
  reset(label_43);
60858
+ var label_44 = sibling(label_43, 2);
60859
+ var input_36 = sibling(child(label_44), 2);
60860
+ remove_input_defaults(input_36);
60861
+ reset(label_44);
60757
60862
  reset(div_39);
60758
60863
  template_effect(($0, $1) => {
60759
60864
  set_value(input_31, get(selectedTextAnnotation).text);
60760
60865
  set_value(input_32, get(selectedTextAnnotation).fontSize);
60761
60866
  set_value(input_33, get(selectedTextAnnotation).color);
60762
- set_text(text_29, get(selectedTextAnnotation).color);
60867
+ set_text(text_31, get(selectedTextAnnotation).color);
60763
60868
  set_value(input_34, get(selectedTextAnnotation).rotation);
60764
60869
  set_value(input_35, $0);
60765
60870
  set_value(input_36, $1);
@@ -60776,31 +60881,31 @@ function PropertiesPanel($$anchor, $$props) {
60776
60881
  if (get(selectedWall)) $$render(consequent_1);
60777
60882
  else if (get(selectedDoor)) $$render(consequent_2, 1);
60778
60883
  else if (get(selectedWindow)) $$render(consequent_3, 2);
60779
- else if (get(selectedFurniture)) $$render(consequent_5, 3);
60780
- else if (get(selectedRoom)) $$render(consequent_7, 4);
60781
- else if (get(selectedStair)) $$render(consequent_8, 5);
60782
- else if (get(selectedColumn)) $$render(consequent_10, 6);
60783
- else if (get(selectedTextAnnotation)) $$render(consequent_11, 7);
60884
+ else if (get(selectedFurniture)) $$render(consequent_7, 3);
60885
+ else if (get(selectedRoom)) $$render(consequent_9, 4);
60886
+ else if (get(selectedStair)) $$render(consequent_10, 5);
60887
+ else if (get(selectedColumn)) $$render(consequent_12, 6);
60888
+ else if (get(selectedTextAnnotation)) $$render(consequent_13, 7);
60784
60889
  });
60785
- var node_7 = sibling(node, 2);
60786
- var consequent_12 = ($$anchor) => {
60787
- var div_41 = root_24$1();
60890
+ var node_10 = sibling(node, 2);
60891
+ var consequent_14 = ($$anchor) => {
60892
+ var div_41 = root_28();
60788
60893
  var div_42 = sibling(child(div_41), 2);
60789
- var label_44 = child(div_42);
60790
- var input_37 = sibling(child(label_44), 2);
60894
+ var label_45 = child(div_42);
60895
+ var input_37 = sibling(child(label_45), 2);
60791
60896
  remove_input_defaults(input_37);
60792
- reset(label_44);
60793
- var label_45 = sibling(label_44, 2);
60794
- var input_38 = sibling(child(label_45), 2);
60795
- remove_input_defaults(input_38);
60796
60897
  reset(label_45);
60797
60898
  var label_46 = sibling(label_45, 2);
60798
- var input_39 = sibling(child(label_46), 2);
60799
- remove_input_defaults(input_39);
60899
+ var input_38 = sibling(child(label_46), 2);
60900
+ remove_input_defaults(input_38);
60800
60901
  reset(label_46);
60801
- var div_43 = sibling(label_46, 2);
60902
+ var label_47 = sibling(label_46, 2);
60903
+ var input_39 = sibling(child(label_47), 2);
60904
+ remove_input_defaults(input_39);
60905
+ reset(label_47);
60906
+ var div_43 = sibling(label_47, 2);
60802
60907
  var button_27 = child(div_43);
60803
- var text_30 = child(button_27, true);
60908
+ var text_32 = child(button_27, true);
60804
60909
  reset(button_27);
60805
60910
  var button_28 = sibling(button_27, 2);
60806
60911
  reset(div_43);
@@ -60812,7 +60917,7 @@ function PropertiesPanel($$anchor, $$props) {
60812
60917
  set_value(input_38, get(floor).backgroundImage.scale);
60813
60918
  set_value(input_39, get(floor).backgroundImage.rotation);
60814
60919
  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"}`);
60815
- set_text(text_30, get(floor).backgroundImage.locked ? "🔒 Locked" : "🔓 Unlocked");
60920
+ set_text(text_32, get(floor).backgroundImage.locked ? "🔒 Locked" : "🔓 Unlocked");
60816
60921
  });
60817
60922
  delegated("input", input_37, (e) => updateBackgroundImage({ opacity: Number(e.target.value) }));
60818
60923
  delegated("input", input_38, (e) => updateBackgroundImage({ scale: Number(e.target.value) }));
@@ -60825,9 +60930,9 @@ function PropertiesPanel($$anchor, $$props) {
60825
60930
  delegated("click", button_29, () => setBackgroundImage(void 0));
60826
60931
  append($$anchor, div_41);
60827
60932
  };
60828
- if_block(node_7, ($$render) => {
60829
- var _$$get16;
60830
- if (get(hasBgImage) && ((_$$get16 = get(floor)) === null || _$$get16 === void 0 ? void 0 : _$$get16.backgroundImage)) $$render(consequent_12);
60933
+ if_block(node_10, ($$render) => {
60934
+ var _$$get17;
60935
+ if (get(hasBgImage) && ((_$$get17 = get(floor)) === null || _$$get17 === void 0 ? void 0 : _$$get17.backgroundImage)) $$render(consequent_14);
60831
60936
  });
60832
60937
  reset(div);
60833
60938
  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) }));
@@ -61898,10 +62003,6 @@ var drawSymGasLine = (ctx, w, d, color) => {
61898
62003
  ctx.textBaseline = "middle";
61899
62004
  ctx.fillText("G", 0, 0);
61900
62005
  };
61901
- var persons = [];
61902
- var lastSpawnTime = 0;
61903
- var SPAWN_INTERVAL = 1e3;
61904
- var MAX_PERSONS = 20;
61905
62006
  function getHeatmapColor(t, alpha = 1) {
61906
62007
  t = Math.max(0, Math.min(t, 1));
61907
62008
  let r, g, b;
@@ -61934,7 +62035,6 @@ var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatma
61934
62035
  const range = Math.max(w, d) * 6;
61935
62036
  const fov = Math.PI / 2;
61936
62037
  if (showHeatmap || showCameraCones) {
61937
- var _heatmapMatrix$;
61938
62038
  ctx.save();
61939
62039
  const coneGradient = ctx.createRadialGradient(0, 0, 0, 0, 0, range);
61940
62040
  const innerAlpha = highlighted ? "88" : showHeatmap ? "55" : "22";
@@ -61960,78 +62060,7 @@ var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatma
61960
62060
  ctx.stroke();
61961
62061
  }
61962
62062
  ctx.restore();
61963
- if (showHeatmap && (heatmapMatrix === null || heatmapMatrix === void 0 ? void 0 : heatmapMatrix.length) && ((_heatmapMatrix$ = heatmapMatrix[0]) === null || _heatmapMatrix$ === void 0 ? void 0 : _heatmapMatrix$.length)) {
61964
- const rows = heatmapMatrix.length;
61965
- const cols = heatmapMatrix[0].length;
61966
- const maxValue = Math.max(...heatmapMatrix.flat());
61967
- if (maxValue > 0) {
61968
- ctx.save();
61969
- ctx.globalCompositeOperation = "lighter";
61970
- ctx.filter = "blur(10px)";
61971
- const radius = range / rows * 1.8;
61972
- for (let y = 0; y < rows; y++) for (let x = 0; x < cols; x++) {
61973
- const value = heatmapMatrix[y][x];
61974
- if (!value || value <= 0) continue;
61975
- const intensity = Math.min(value / maxValue, 1);
61976
- const angle = -fov / 2 + (cols === 1 ? .5 : x / (cols - 1)) * fov;
61977
- const r = (y + .5) / rows * range;
61978
- const px = Math.cos(angle) * r;
61979
- const py = Math.sin(angle) * r;
61980
- const gradient = ctx.createRadialGradient(px, py, 0, px, py, radius);
61981
- const alpha = .12 + intensity * .75;
61982
- gradient.addColorStop(0, getHeatmapColor(intensity, alpha));
61983
- gradient.addColorStop(.45, getHeatmapColor(intensity, alpha * .45));
61984
- gradient.addColorStop(1, getHeatmapColor(intensity, 0));
61985
- ctx.fillStyle = gradient;
61986
- ctx.beginPath();
61987
- ctx.arc(px, py, radius, 0, Math.PI * 2);
61988
- ctx.fill();
61989
- }
61990
- ctx.restore();
61991
- }
61992
- }
61993
- if (showHeatmap && hasPerson) {
61994
- const now = Date.now();
61995
- if (persons.length < MAX_PERSONS && now - lastSpawnTime > SPAWN_INTERVAL) {
61996
- lastSpawnTime = now;
61997
- persons.push({
61998
- startTime: now,
61999
- duration: 2e3 + Math.random() * 1e3,
62000
- direction: Math.random() > .5 ? "far-to-near" : "near-to-far",
62001
- angle: (Math.random() - .5) * fov * .8
62002
- });
62003
- }
62004
- persons = persons.filter((p) => {
62005
- let t = (now - p.startTime) / p.duration;
62006
- if (t >= 1) return false;
62007
- t = Math.max(0, Math.min(t, 1));
62008
- let r;
62009
- if (p.direction === "far-to-near") r = range * (.9 - t * .8);
62010
- else r = range * (.1 + t * .8);
62011
- const x = Math.cos(p.angle) * r;
62012
- const y = Math.sin(p.angle) * r;
62013
- ctx.save();
62014
- ctx.translate(x, y);
62015
- ctx.globalCompositeOperation = "lighter";
62016
- const scale = .5 + (1 - r / range);
62017
- ctx.scale(scale, scale);
62018
- ctx.globalAlpha = 1 - t;
62019
- const glow = ctx.createRadialGradient(0, 0, 0, 0, 0, 20);
62020
- glow.addColorStop(0, "rgba(255,0,0,0.8)");
62021
- glow.addColorStop(1, "rgba(255,0,0,0)");
62022
- ctx.fillStyle = glow;
62023
- ctx.beginPath();
62024
- ctx.arc(0, 0, 20, 0, Math.PI * 2);
62025
- ctx.fill();
62026
- ctx.beginPath();
62027
- ctx.arc(0, 0, 6, 0, Math.PI * 2);
62028
- ctx.fillStyle = "red";
62029
- ctx.fill();
62030
- ctx.restore();
62031
- return true;
62032
- });
62033
- } else if (showHeatmap) persons = [];
62034
- } else persons = [];
62063
+ }
62035
62064
  ctx.fillStyle = color + "40";
62036
62065
  ctx.strokeStyle = color;
62037
62066
  ctx.lineWidth = 1;
@@ -70920,9 +70949,18 @@ function App($$anchor, $$props) {
70920
70949
  var consequent_5 = ($$anchor) => {
70921
70950
  {
70922
70951
  let $0 = /* @__PURE__ */ user_derived(() => get(mode) === "3d");
70923
- PropertiesPanel($$anchor, { get is3D() {
70924
- return get($0);
70925
- } });
70952
+ let $1 = /* @__PURE__ */ user_derived(() => {
70953
+ var _$$get$siteCameras, _$$get12;
70954
+ return (_$$get$siteCameras = (_$$get12 = get(config)) === null || _$$get12 === void 0 ? void 0 : _$$get12.siteCameras) !== null && _$$get$siteCameras !== void 0 ? _$$get$siteCameras : [];
70955
+ });
70956
+ PropertiesPanel($$anchor, {
70957
+ get is3D() {
70958
+ return get($0);
70959
+ },
70960
+ get siteCameras() {
70961
+ return get($1);
70962
+ }
70963
+ });
70926
70964
  }
70927
70965
  };
70928
70966
  if_block(node_6, ($$render) => {