@lv-x-software-house/x_view 1.2.5-dev.21 → 1.2.5-dev.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +730 -454
  2. package/dist/index.mjs +630 -354
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  // src/XViewScene.jsx
2
- import React25, {
2
+ import React26, {
3
3
  useCallback as useCallback4,
4
4
  useEffect as useEffect22,
5
5
  useRef as useRef19,
6
- useState as useState25,
6
+ useState as useState26,
7
7
  useMemo as useMemo12
8
8
  } from "react";
9
9
  import { useRouter, useSearchParams } from "next/navigation";
@@ -106,7 +106,8 @@ function ContextMenu({
106
106
  onClose,
107
107
  viewMembers,
108
108
  currentUser,
109
- onStartQuest
109
+ onStartQuest,
110
+ onFinishQuest
110
111
  }) {
111
112
  var _a, _b, _c;
112
113
  const menuRef = useRef(null);
@@ -307,12 +308,13 @@ function ContextMenu({
307
308
  });
308
309
  };
309
310
  const renderMainView = () => {
310
- var _a2, _b2, _c2;
311
+ var _a2, _b2, _c2, _d;
311
312
  const hasVersions = computedVersions.length > 0;
312
313
  const canCreateVersion = ability.can("create", "Versioning");
313
314
  const canReadVersion = ability.can("read", "Versioning");
314
315
  const shouldShowVersioningBtn = canCreateVersion || canReadVersion && hasVersions;
315
316
  const canStartQuest = isCurrentNodeQuest && (((_a2 = data.nodeData) == null ? void 0 : _a2.status) !== "In Progress" || ((_b2 = data.nodeData) == null ? void 0 : _b2.assignee_id) !== (currentUser == null ? void 0 : currentUser.id));
317
+ const canFinishQuest = isCurrentNodeQuest && ((_c2 = data.nodeData) == null ? void 0 : _c2.assignee_id) === (currentUser == null ? void 0 : currentUser.id);
316
318
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-indigo-400/80 shadow-[0_0_12px_1px_rgba(99,102,241,0.5)]" }), /* @__PURE__ */ React.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "A\xE7\xF5es R\xE1pidas")), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-1" }, canStartQuest && /* @__PURE__ */ React.createElement(
317
319
  "button",
318
320
  {
@@ -325,7 +327,19 @@ function ContextMenu({
325
327
  },
326
328
  /* @__PURE__ */ React.createElement("span", null, "\u{1F680}"),
327
329
  /* @__PURE__ */ React.createElement("span", null, "Iniciar Quest")
328
- ), ability.can("create", "Connection") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartConnection == null ? void 0 : onStartConnection(data.nodeData), className: baseButtonClass, title: "Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }), /* @__PURE__ */ React.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })), /* @__PURE__ */ React.createElement("span", null, "Conectar")), ability.can("create", "Node") && !((_c2 = data.nodeData) == null ? void 0 : _c2.is_quest) && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartCreation == null ? void 0 : onStartCreation(data.nodeData), className: baseButtonClass, title: "Criar e Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "16" }), /* @__PURE__ */ React.createElement("line", { x1: "8", y1: "12", x2: "16", y2: "12" })), /* @__PURE__ */ React.createElement("span", null, "Criar e Conectar")), ability.can("create", "Ancestry") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartAncestryCreation == null ? void 0 : onStartAncestryCreation(data.nodeData), className: baseButtonClass, title: "Criar Ancestralidade" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 20.5c.5-.5.8-1.2.8-2s-.3-1.5-.8-2c-.5-.5-1.2-.8-2-.8s-1.5.3-2 .8c-.5.5-.8 1.2-.8 2s.3 1.5.8 2c.5.5 1.2-.8 2 .8s1.5-.3 2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M10 16v-3a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ React.createElement("path", { d: "M14 3.5c.5.5.8 1.2.8 2s-.3 1.5-.8 2c-.5-.5-1.2-.8-2 .8s1.5.3-2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M14 8v3a2 2 0 0 0 2 2h4" })), /* @__PURE__ */ React.createElement("span", null, "Criar Ancestralidade")), shouldShowVersioningBtn && /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("versioning"), className: baseButtonClass, title: hasVersions ? "Versionamento" : "Criar Versionamento" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("line", { x1: "6", y1: "3", x2: "6", y2: "15" }), /* @__PURE__ */ React.createElement("circle", { cx: "18", cy: "6", r: "3" }), /* @__PURE__ */ React.createElement("circle", { cx: "6", cy: "18", r: "3" }), /* @__PURE__ */ React.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })), /* @__PURE__ */ React.createElement("span", null, hasVersions || !canCreateVersion ? "Versionamento" : "Criar Versionamento")), (connections.length > 0 || availableAncestries.length > 0) && ability.can("read", "Connection") && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("connections"), className: baseButtonClass, title: "Conex\xF5es" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2z" }), /* @__PURE__ */ React.createElement("path", { d: "M8 12h8" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8v8" })), /* @__PURE__ */ React.createElement("span", null, "Conex\xF5es (", totalConnectionsCount, ")"))), /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => {
330
+ ), canFinishQuest && /* @__PURE__ */ React.createElement(
331
+ "button",
332
+ {
333
+ onClick: () => {
334
+ onFinishQuest == null ? void 0 : onFinishQuest(data.nodeData);
335
+ onClose();
336
+ },
337
+ className: `w-full flex items-center gap-2.5 px-2 py-1.5 text-left text-sm rounded-md bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20 hover:text-emerald-300 transition-colors duration-150 truncate font-semibold shadow-inner`,
338
+ title: "Finalizar esta quest"
339
+ },
340
+ /* @__PURE__ */ React.createElement("span", null, "\u2705"),
341
+ /* @__PURE__ */ React.createElement("span", null, "Finalizar Quest")
342
+ ), ability.can("create", "Connection") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartConnection == null ? void 0 : onStartConnection(data.nodeData), className: baseButtonClass, title: "Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }), /* @__PURE__ */ React.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })), /* @__PURE__ */ React.createElement("span", null, "Conectar")), ability.can("create", "Node") && !((_d = data.nodeData) == null ? void 0 : _d.is_quest) && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartCreation == null ? void 0 : onStartCreation(data.nodeData), className: baseButtonClass, title: "Criar e Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "16" }), /* @__PURE__ */ React.createElement("line", { x1: "8", y1: "12", x2: "16", y2: "12" })), /* @__PURE__ */ React.createElement("span", null, "Criar e Conectar")), ability.can("create", "Ancestry") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartAncestryCreation == null ? void 0 : onStartAncestryCreation(data.nodeData), className: baseButtonClass, title: "Criar Ancestralidade" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 20.5c.5-.5.8-1.2.8-2s-.3-1.5-.8-2c-.5-.5-1.2-.8-2-.8s-1.5.3-2 .8c-.5.5-.8 1.2-.8 2s.3 1.5.8 2c.5.5 1.2-.8 2 .8s1.5-.3 2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M10 16v-3a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ React.createElement("path", { d: "M14 3.5c.5.5.8 1.2.8 2s-.3 1.5-.8 2c-.5-.5-1.2-.8-2 .8s1.5.3-2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M14 8v3a2 2 0 0 0 2 2h4" })), /* @__PURE__ */ React.createElement("span", null, "Criar Ancestralidade")), shouldShowVersioningBtn && /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("versioning"), className: baseButtonClass, title: hasVersions ? "Versionamento" : "Criar Versionamento" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("line", { x1: "6", y1: "3", x2: "6", y2: "15" }), /* @__PURE__ */ React.createElement("circle", { cx: "18", cy: "6", r: "3" }), /* @__PURE__ */ React.createElement("circle", { cx: "6", cy: "18", r: "3" }), /* @__PURE__ */ React.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })), /* @__PURE__ */ React.createElement("span", null, hasVersions || !canCreateVersion ? "Versionamento" : "Criar Versionamento")), (connections.length > 0 || availableAncestries.length > 0) && ability.can("read", "Connection") && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("connections"), className: baseButtonClass, title: "Conex\xF5es" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2z" }), /* @__PURE__ */ React.createElement("path", { d: "M8 12h8" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8v8" })), /* @__PURE__ */ React.createElement("span", null, "Conex\xF5es (", totalConnectionsCount, ")"))), /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => {
329
343
  onFocusNode == null ? void 0 : onFocusNode(data.nodeData);
330
344
  onClose();
331
345
  }, className: baseButtonClass, title: "Focar na c\xE2mera" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "3" })), /* @__PURE__ */ React.createElement("span", null, "Focar neste Node")), /* @__PURE__ */ React.createElement("button", { onClick: (e) => handleCopyLink(e, data.nodeData), className: baseButtonClass, title: "Copiar Link para Compartilhar" }, isLinkCopied ? /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#4ade80", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("polyline", { points: "20 6 9 17 4 12" })) : /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }), /* @__PURE__ */ React.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })), /* @__PURE__ */ React.createElement("span", { className: isLinkCopied ? "text-green-400" : "" }, isLinkCopied ? "Copiado!" : "Copiar Link")), ability.can("dismiss", "Node") && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("button", { onClick: () => onDismissNode == null ? void 0 : onDismissNode(data.nodeData), className: baseButtonClass, title: "Remover da visualiza\xE7\xE3o" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }), /* @__PURE__ */ React.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }), /* @__PURE__ */ React.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }), /* @__PURE__ */ React.createElement("line", { x1: "2", y1: "2", x2: "22", y2: "22" })), /* @__PURE__ */ React.createElement("span", null, "Dismiss")), /* @__PURE__ */ React.createElement("button", { onClick: () => onDismissOtherNodes == null ? void 0 : onDismissOtherNodes(data.nodeData), className: baseButtonClass, title: "Remover outros da visualiza\xE7\xE3o" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "3" }), /* @__PURE__ */ React.createElement("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }), /* @__PURE__ */ React.createElement("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React.createElement("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }), /* @__PURE__ */ React.createElement("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })), /* @__PURE__ */ React.createElement("span", null, "Dismiss other nodes"))), ability.can("delete", "Node") && /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("deleteConfirmation"), className: deleteButtonClass, title: "Excluir Node" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React.createElement("line", { x1: "10", y1: "11", x2: "10", y2: "17" }), /* @__PURE__ */ React.createElement("line", { x1: "14", y1: "11", x2: "14", y2: "17" })), /* @__PURE__ */ React.createElement("span", null, "Excluir Node"))));
@@ -8366,8 +8380,116 @@ function InSceneVersionForm({
8366
8380
  }
8367
8381
 
8368
8382
  // src/components/InSceneQuestForm.jsx
8369
- import React15, { useState as useState16, useRef as useRef12 } from "react";
8370
- import { FiPlus as FiPlus5, FiCheck as FiCheck9, FiEdit2 as FiEdit26, FiTarget, FiX as FiX4, FiChevronDown as FiChevronDown5, FiUser, FiSearch as FiSearch4 } from "react-icons/fi";
8383
+ import React16, { useState as useState17, useRef as useRef12 } from "react";
8384
+ import { FiPlus as FiPlus6, FiCheck as FiCheck9, FiEdit2 as FiEdit26, FiTarget, FiX as FiX5, FiChevronDown as FiChevronDown6, FiUser as FiUser2, FiSearch as FiSearch5 } from "react-icons/fi";
8385
+
8386
+ // src/components/QuestReviewStackEditor.jsx
8387
+ import React15, { useState as useState16 } from "react";
8388
+ import { FiPlus as FiPlus5, FiX as FiX4, FiUser, FiSearch as FiSearch4, FiChevronUp, FiChevronDown as FiChevronDown5, FiAlertCircle } from "react-icons/fi";
8389
+ function QuestReviewStackEditor({
8390
+ reviewStack = [],
8391
+ onChange,
8392
+ viewMembers = [],
8393
+ readOnly = false
8394
+ }) {
8395
+ const [isAdding, setIsAdding] = useState16(false);
8396
+ const [searchQuery, setSearchQuery] = useState16("");
8397
+ const handleAddReviewer = (userId) => {
8398
+ const newStack = [...reviewStack, { userId, status: "pending", mandatory: false }];
8399
+ onChange(newStack);
8400
+ setIsAdding(false);
8401
+ setSearchQuery("");
8402
+ };
8403
+ const handleRemoveReviewer = (index) => {
8404
+ const newStack = reviewStack.filter((_, i) => i !== index);
8405
+ onChange(newStack);
8406
+ };
8407
+ const handleToggleMandatory = (index) => {
8408
+ const newStack = [...reviewStack];
8409
+ newStack[index] = { ...newStack[index], mandatory: !newStack[index].mandatory };
8410
+ onChange(newStack);
8411
+ };
8412
+ const handleMove = (index, direction) => {
8413
+ const newStack = [...reviewStack];
8414
+ const targetIndex = index + direction;
8415
+ if (targetIndex < 0 || targetIndex >= newStack.length) return;
8416
+ [newStack[index], newStack[targetIndex]] = [newStack[targetIndex], newStack[index]];
8417
+ onChange(newStack);
8418
+ };
8419
+ const filteredMembers = viewMembers.filter((m) => {
8420
+ const search = searchQuery.toLowerCase();
8421
+ return (m.name || "").toLowerCase().includes(search) || (m.email || "").toLowerCase().includes(search);
8422
+ });
8423
+ return /* @__PURE__ */ React15.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Review Stack (Sequential)"), !readOnly && !isAdding && /* @__PURE__ */ React15.createElement(
8424
+ "button",
8425
+ {
8426
+ type: "button",
8427
+ onClick: () => setIsAdding(true),
8428
+ className: "flex items-center gap-1 px-2 py-1 text-[10px] bg-sky-500/20 text-sky-300 border border-sky-500/30 rounded hover:bg-sky-500/30 transition-colors"
8429
+ },
8430
+ /* @__PURE__ */ React15.createElement(FiPlus5, { size: 10 }),
8431
+ " Adicionar Camada"
8432
+ )), isAdding && /* @__PURE__ */ React15.createElement("div", { className: "bg-slate-900/50 border border-sky-500/30 rounded-lg p-2 space-y-2 animate-in fade-in slide-in-from-top-1 duration-200" }, /* @__PURE__ */ React15.createElement("div", { className: "relative" }, /* @__PURE__ */ React15.createElement(FiSearch4, { className: "absolute left-2 top-1/2 -translate-y-1/2 text-slate-500", size: 12 }), /* @__PURE__ */ React15.createElement(
8433
+ "input",
8434
+ {
8435
+ autoFocus: true,
8436
+ type: "text",
8437
+ placeholder: "Buscar revisor...",
8438
+ value: searchQuery,
8439
+ onChange: (e) => setSearchQuery(e.target.value),
8440
+ className: "w-full bg-slate-800 border border-white/10 rounded p-1.5 pl-7 text-xs focus:outline-none focus:ring-1 focus:ring-sky-400"
8441
+ }
8442
+ ), /* @__PURE__ */ React15.createElement("button", { onClick: () => setIsAdding(false), className: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-white" }, /* @__PURE__ */ React15.createElement(FiX4, { size: 14 }))), /* @__PURE__ */ React15.createElement("ul", { className: "max-h-32 overflow-y-auto custom-scrollbar space-y-1" }, filteredMembers.map((m) => /* @__PURE__ */ React15.createElement(
8443
+ "li",
8444
+ {
8445
+ key: m.id,
8446
+ onClick: () => handleAddReviewer(m.id),
8447
+ className: "px-2 py-1.5 hover:bg-white/5 rounded cursor-pointer text-xs flex items-center gap-2"
8448
+ },
8449
+ /* @__PURE__ */ React15.createElement(FiUser, { size: 12, className: "text-slate-400" }),
8450
+ /* @__PURE__ */ React15.createElement("span", { className: "truncate" }, m.name || m.email)
8451
+ )), filteredMembers.length === 0 && /* @__PURE__ */ React15.createElement("li", { className: "text-[10px] text-slate-500 text-center py-2 italic font-light" }, "Nenhum membro encontrado"))), /* @__PURE__ */ React15.createElement("div", { className: "space-y-1.5" }, reviewStack.map((item, index) => {
8452
+ const member = viewMembers.find((m) => m.id === item.userId);
8453
+ const isCompleted = item.status === "completed";
8454
+ return /* @__PURE__ */ React15.createElement(
8455
+ "div",
8456
+ {
8457
+ key: index,
8458
+ className: `group relative flex items-center gap-3 p-2 rounded-lg border ${isCompleted ? "bg-green-500/5 border-green-500/20" : "bg-white/5 border-white/10"} hover:border-white/20 transition-all`
8459
+ },
8460
+ /* @__PURE__ */ React15.createElement("div", { className: "flex flex-col items-center gap-0.5 text-slate-500" }, /* @__PURE__ */ React15.createElement("span", { className: "text-[10px] font-bold opacity-50" }, index + 1), !readOnly && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: () => handleMove(index, -1), disabled: index === 0, className: "hover:text-sky-400 disabled:opacity-20" }, /* @__PURE__ */ React15.createElement(FiChevronUp, { size: 12 })), /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: () => handleMove(index, 1), disabled: index === reviewStack.length - 1, className: "hover:text-sky-400 disabled:opacity-20" }, /* @__PURE__ */ React15.createElement(FiChevronDown5, { size: 12 })))),
8461
+ /* @__PURE__ */ React15.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React15.createElement("span", { className: `truncate text-sm font-medium ${isCompleted ? "text-green-300" : "text-slate-200"}` }, (member == null ? void 0 : member.name) || (member == null ? void 0 : member.email) || "Unknown User"), item.mandatory && /* @__PURE__ */ React15.createElement("span", { className: "flex-shrink-0 px-1.5 py-0.5 rounded-full bg-amber-500/20 text-amber-300 text-[8px] font-bold uppercase tracking-tighter border border-amber-500/30" }, "Obrigat\xF3rio")), /* @__PURE__ */ React15.createElement("p", { className: "text-[10px] text-slate-500 flex items-center gap-1" }, isCompleted ? "\u2713 Review Conclu\xEDda" : "\u23F3 Pendente")),
8462
+ !readOnly && /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity" }, /* @__PURE__ */ React15.createElement(
8463
+ "button",
8464
+ {
8465
+ type: "button",
8466
+ onClick: () => handleToggleMandatory(index),
8467
+ title: item.mandatory ? "Remover obrigatoriedade" : "Tornar obrigat\xF3rio",
8468
+ className: `p-1.5 rounded hover:bg-white/10 transition-colors ${item.mandatory ? "text-amber-400" : "text-slate-500"}`
8469
+ },
8470
+ /* @__PURE__ */ React15.createElement(FiAlertCircle, { size: 14 })
8471
+ ), /* @__PURE__ */ React15.createElement(
8472
+ "button",
8473
+ {
8474
+ type: "button",
8475
+ onClick: () => handleRemoveReviewer(index),
8476
+ className: "p-1.5 rounded hover:bg-red-500/20 text-slate-500 hover:text-red-400 transition-colors"
8477
+ },
8478
+ /* @__PURE__ */ React15.createElement(FiX4, { size: 14 })
8479
+ ))
8480
+ );
8481
+ }), reviewStack.length === 0 && !isAdding && /* @__PURE__ */ React15.createElement("div", { className: "py-6 border-2 border-dashed border-white/5 rounded-xl flex flex-col items-center justify-center gap-2" }, /* @__PURE__ */ React15.createElement("p", { className: "text-xs text-slate-500 font-light italic" }, "Nenhum revisor definido"), !readOnly && /* @__PURE__ */ React15.createElement(
8482
+ "button",
8483
+ {
8484
+ type: "button",
8485
+ onClick: () => setIsAdding(true),
8486
+ className: "text-[10px] text-sky-400 hover:underline"
8487
+ },
8488
+ "+ Come\xE7ar a Review Stack"
8489
+ ))));
8490
+ }
8491
+
8492
+ // src/components/InSceneQuestForm.jsx
8371
8493
  var QUEST_STATUS_COLORS2 = {
8372
8494
  "Backlog": "#64748b",
8373
8495
  "In Progress": "#eab308",
@@ -8391,22 +8513,24 @@ function InSceneQuestForm({
8391
8513
  // NOVA PROP
8392
8514
  questCounter = 1,
8393
8515
  // NOVA PROP
8394
- viewMembers = []
8516
+ viewMembers = [],
8517
+ session = null
8395
8518
  }) {
8396
8519
  var _a, _b;
8397
- const [name, setName] = useState16("");
8398
- const [assigneeId, setAssigneeId] = useState16("");
8399
- const [types, setTypes] = useState16(["quest"]);
8400
- const [typeInput, setTypeInput] = useState16("");
8401
- const [status, setStatus] = useState16("Backlog");
8402
- const [size, setSize] = useState16("medium");
8403
- const [intensity, setIntensity] = useState16(0);
8404
- const [description, setDescription] = useState16("");
8405
- const [isStatusDropdownOpen, setIsStatusDropdownOpen] = useState16(false);
8406
- const [isAssigneeDropdownOpen, setIsAssigneeDropdownOpen] = useState16(false);
8407
- const [assigneeSearchQuery, setAssigneeSearchQuery] = useState16("");
8408
- const [customProps, setCustomProps] = useState16([]);
8409
- const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState16(false);
8520
+ const [name, setName] = useState17("");
8521
+ const [assigneeId, setAssigneeId] = useState17("");
8522
+ const [types, setTypes] = useState17(["quest"]);
8523
+ const [typeInput, setTypeInput] = useState17("");
8524
+ const [status, setStatus] = useState17("Backlog");
8525
+ const [size, setSize] = useState17("medium");
8526
+ const [intensity, setIntensity] = useState17(0);
8527
+ const [description, setDescription] = useState17("");
8528
+ const [reviewStack, setReviewStack] = useState17([]);
8529
+ const [isStatusDropdownOpen, setIsStatusDropdownOpen] = useState17(false);
8530
+ const [isAssigneeDropdownOpen, setIsAssigneeDropdownOpen] = useState17(false);
8531
+ const [assigneeSearchQuery, setAssigneeSearchQuery] = useState17("");
8532
+ const [customProps, setCustomProps] = useState17([]);
8533
+ const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState17(false);
8410
8534
  const propsEndRef = useRef12(null);
8411
8535
  const standardizedName = `${viewName} - ${questCounter} - \xBB ${name || "Nova Quest"}`;
8412
8536
  const handleAddProp = () => {
@@ -8443,6 +8567,7 @@ function InSceneQuestForm({
8443
8567
  }
8444
8568
  };
8445
8569
  const handleSubmit = (e) => {
8570
+ var _a2, _b2, _c, _d;
8446
8571
  e.preventDefault();
8447
8572
  if (!name.trim()) {
8448
8573
  alert("O campo 'T\xEDtulo' \xE9 obrigat\xF3rio.");
@@ -8452,6 +8577,22 @@ function InSceneQuestForm({
8452
8577
  customProps.filter((prop) => prop.key.trim() && !prop.isEditing)
8453
8578
  );
8454
8579
  const processedSections = processDescriptionForSave(description, []);
8580
+ const initialTimeline = [{
8581
+ type: "quest_created",
8582
+ timestamp: Date.now(),
8583
+ actorId: ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id) || "unknown",
8584
+ description: `Quest criada por ${((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.name) || "usu\xE1rio"}.`
8585
+ }];
8586
+ if (assigneeId) {
8587
+ initialTimeline.push({
8588
+ type: "assignee_changed",
8589
+ timestamp: Date.now() + 1,
8590
+ // Ensure sequential timestamp
8591
+ actorId: ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.id) || "unknown",
8592
+ to_assignee_id: assigneeId,
8593
+ description: `Quest atribu\xEDda para ${((_d = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _d.name) || "respons\xE1vel"}.`
8594
+ });
8595
+ }
8455
8596
  onSave({
8456
8597
  name: standardizedName,
8457
8598
  // SALVA O NOME FORMATADO
@@ -8467,13 +8608,15 @@ function InSceneQuestForm({
8467
8608
  description_sections: processedSections,
8468
8609
  useImageAsTexture: false,
8469
8610
  textureImageUrl: null,
8611
+ reviewStack,
8612
+ timeline: initialTimeline,
8470
8613
  ...additionalData
8471
8614
  });
8472
8615
  };
8473
8616
  const swallow = (e) => e.stopPropagation();
8474
8617
  const currentUsedTypes = customProps.map((p) => p.type).filter((t) => UNIQUE_PROP_TYPES.includes(t));
8475
8618
  const availableImages = customProps.filter((p) => p.type === "images").flatMap((p) => Array.isArray(p.value) ? p.value : []).filter((img) => img.value && img.value.trim() !== "");
8476
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
8619
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
8477
8620
  "div",
8478
8621
  {
8479
8622
  ref: refEl,
@@ -8485,8 +8628,8 @@ function InSceneQuestForm({
8485
8628
  onContextMenu: swallow,
8486
8629
  onDoubleClick: swallow
8487
8630
  },
8488
- /* @__PURE__ */ React15.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)` } }),
8489
- /* @__PURE__ */ React15.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React15.createElement("div", null, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React15.createElement(FiTarget, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React15.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Nova quest")), /* @__PURE__ */ React15.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, "Criar Quest")), /* @__PURE__ */ React15.createElement(
8631
+ /* @__PURE__ */ React16.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)` } }),
8632
+ /* @__PURE__ */ React16.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React16.createElement("div", null, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React16.createElement(FiTarget, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React16.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Nova quest")), /* @__PURE__ */ React16.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, "Criar Quest")), /* @__PURE__ */ React16.createElement(
8490
8633
  "button",
8491
8634
  {
8492
8635
  type: "button",
@@ -8496,7 +8639,7 @@ function InSceneQuestForm({
8496
8639
  },
8497
8640
  "\xD7"
8498
8641
  )),
8499
- /* @__PURE__ */ React15.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col max-h-[68vh]" }, /* @__PURE__ */ React15.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, /* @__PURE__ */ React15.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React15.createElement(
8642
+ /* @__PURE__ */ React16.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col max-h-[68vh]" }, /* @__PURE__ */ React16.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React16.createElement(
8500
8643
  "input",
8501
8644
  {
8502
8645
  required: true,
@@ -8510,16 +8653,16 @@ function InSceneQuestForm({
8510
8653
  },
8511
8654
  className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-indigo-400/60"
8512
8655
  }
8513
- ), /* @__PURE__ */ React15.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React15.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React15.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ React15.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300" }, "Status da Quest"), /* @__PURE__ */ React15.createElement("div", { className: "relative" }, /* @__PURE__ */ React15.createElement(
8656
+ ), /* @__PURE__ */ React16.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React16.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React16.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Status da Quest"), /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
8514
8657
  "button",
8515
8658
  {
8516
8659
  type: "button",
8517
8660
  onClick: () => setIsStatusDropdownOpen(!isStatusDropdownOpen),
8518
8661
  className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
8519
8662
  },
8520
- /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React15.createElement("span", { className: "w-3 h-3 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.5)]", style: { backgroundColor: QUEST_STATUS_COLORS2[status] } }), /* @__PURE__ */ React15.createElement("span", { className: "text-slate-200 font-medium" }, status)),
8521
- /* @__PURE__ */ React15.createElement(FiChevronDown5, { className: `text-slate-400 transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}` })
8522
- ), isStatusDropdownOpen && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsStatusDropdownOpen(false) }), /* @__PURE__ */ React15.createElement("ul", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-800 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden" }, Object.keys(QUEST_STATUS_COLORS2).map((s) => /* @__PURE__ */ React15.createElement(
8663
+ /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React16.createElement("span", { className: "w-3 h-3 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.5)]", style: { backgroundColor: QUEST_STATUS_COLORS2[status] } }), /* @__PURE__ */ React16.createElement("span", { className: "text-slate-200 font-medium" }, status)),
8664
+ /* @__PURE__ */ React16.createElement(FiChevronDown6, { className: `text-slate-400 transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}` })
8665
+ ), isStatusDropdownOpen && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsStatusDropdownOpen(false) }), /* @__PURE__ */ React16.createElement("ul", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-800 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden" }, Object.keys(QUEST_STATUS_COLORS2).map((s) => /* @__PURE__ */ React16.createElement(
8523
8666
  "li",
8524
8667
  {
8525
8668
  key: s,
@@ -8530,21 +8673,21 @@ function InSceneQuestForm({
8530
8673
  },
8531
8674
  className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${status === s ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
8532
8675
  },
8533
- /* @__PURE__ */ React15.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS2[s] } }),
8676
+ /* @__PURE__ */ React16.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS2[s] } }),
8534
8677
  s
8535
- )))))), /* @__PURE__ */ React15.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300" }, "Assignee (Respons\xE1vel)"), /* @__PURE__ */ React15.createElement("div", { className: "relative" }, /* @__PURE__ */ React15.createElement(
8678
+ )))))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Assignee (Respons\xE1vel)"), /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
8536
8679
  "button",
8537
8680
  {
8538
8681
  type: "button",
8539
8682
  onClick: () => setIsAssigneeDropdownOpen(!isAssigneeDropdownOpen),
8540
8683
  className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
8541
8684
  },
8542
- /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React15.createElement(FiUser, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React15.createElement("span", { className: "text-slate-200 font-medium" }, ((_a = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _a.name) || ((_b = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _b.email) || "Nenhum")),
8543
- /* @__PURE__ */ React15.createElement(FiChevronDown5, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
8544
- ), isAssigneeDropdownOpen && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
8685
+ /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React16.createElement(FiUser2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React16.createElement("span", { className: "text-slate-200 font-medium" }, ((_a = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _a.name) || ((_b = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _b.email) || "Nenhum")),
8686
+ /* @__PURE__ */ React16.createElement(FiChevronDown6, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
8687
+ ), isAssigneeDropdownOpen && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
8545
8688
  setIsAssigneeDropdownOpen(false);
8546
8689
  setAssigneeSearchQuery("");
8547
- } }), /* @__PURE__ */ React15.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React15.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React15.createElement(FiSearch4, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React15.createElement(
8690
+ } }), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React16.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React16.createElement(FiSearch5, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React16.createElement(
8548
8691
  "input",
8549
8692
  {
8550
8693
  type: "text",
@@ -8555,7 +8698,7 @@ function InSceneQuestForm({
8555
8698
  className: "bg-transparent border-none outline-none text-xs text-white placeholder-slate-500 w-full",
8556
8699
  onClick: (e) => e.stopPropagation()
8557
8700
  }
8558
- )), /* @__PURE__ */ React15.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React15.createElement(
8701
+ )), /* @__PURE__ */ React16.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React16.createElement(
8559
8702
  "li",
8560
8703
  {
8561
8704
  onClick: () => {
@@ -8569,7 +8712,7 @@ function InSceneQuestForm({
8569
8712
  ), viewMembers.filter((member) => {
8570
8713
  const search = assigneeSearchQuery.toLowerCase();
8571
8714
  return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
8572
- }).map((member) => /* @__PURE__ */ React15.createElement(
8715
+ }).map((member) => /* @__PURE__ */ React16.createElement(
8573
8716
  "li",
8574
8717
  {
8575
8718
  key: member.id,
@@ -8584,7 +8727,14 @@ function InSceneQuestForm({
8584
8727
  )), viewMembers.filter((member) => {
8585
8728
  const search = assigneeSearchQuery.toLowerCase();
8586
8729
  return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
8587
- }).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React15.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado")))))), /* @__PURE__ */ React15.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300" }, "Tipos Adicionais"), /* @__PURE__ */ React15.createElement("div", { className: "relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all" }, types.map((t, index) => /* @__PURE__ */ React15.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, t !== "quest" && /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React15.createElement(FiX4, { size: 12 })))), /* @__PURE__ */ React15.createElement(
8730
+ }).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React16.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado")))))), /* @__PURE__ */ React16.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React16.createElement(
8731
+ QuestReviewStackEditor,
8732
+ {
8733
+ reviewStack,
8734
+ onChange: setReviewStack,
8735
+ viewMembers
8736
+ }
8737
+ )), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tipos Adicionais"), /* @__PURE__ */ React16.createElement("div", { className: "relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all" }, types.map((t, index) => /* @__PURE__ */ React16.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, t !== "quest" && /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React16.createElement(FiX5, { size: 12 })))), /* @__PURE__ */ React16.createElement(
8588
8738
  "input",
8589
8739
  {
8590
8740
  type: "text",
@@ -8597,7 +8747,7 @@ function InSceneQuestForm({
8597
8747
  className: "flex-1 bg-transparent text-sm min-w-[80px] focus:outline-none text-slate-200",
8598
8748
  autoComplete: "off"
8599
8749
  }
8600
- ))), /* @__PURE__ */ React15.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o (Opcional)"), /* @__PURE__ */ React15.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React15.createElement(
8750
+ ))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Descri\xE7\xE3o (Opcional)"), /* @__PURE__ */ React16.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React16.createElement(
8601
8751
  DescriptionDisplay,
8602
8752
  {
8603
8753
  description,
@@ -8607,7 +8757,7 @@ function InSceneQuestForm({
8607
8757
  onMentionClick,
8608
8758
  onSaveDescription: (newDesc) => setDescription(newDesc)
8609
8759
  }
8610
- ), /* @__PURE__ */ React15.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors" }, /* @__PURE__ */ React15.createElement(FiEdit26, { size: 14 }))), !description && /* @__PURE__ */ React15.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React15.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => /* @__PURE__ */ React15.createElement(
8760
+ ), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors" }, /* @__PURE__ */ React16.createElement(FiEdit26, { size: 14 }))), !description && /* @__PURE__ */ React16.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => /* @__PURE__ */ React16.createElement(
8611
8761
  "button",
8612
8762
  {
8613
8763
  key: s,
@@ -8618,9 +8768,9 @@ function InSceneQuestForm({
8618
8768
  },
8619
8769
  className: "flex items-center gap-2 group cursor-pointer focus:outline-none"
8620
8770
  },
8621
- /* @__PURE__ */ React15.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${size === s ? "bg-indigo-500 border-indigo-500" : "border-slate-600 bg-transparent group-hover:border-slate-500"}` }, size === s && /* @__PURE__ */ React15.createElement(FiCheck9, { size: 12, className: "text-white" })),
8622
- /* @__PURE__ */ React15.createElement("span", { className: `text-sm capitalize transition-colors ${size === s ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}` }, s)
8623
- )))), /* @__PURE__ */ React15.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React15.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React15.createElement(FiPlus5, { size: 14 }), " Adicionar")), /* @__PURE__ */ React15.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React15.createElement(
8771
+ /* @__PURE__ */ React16.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${size === s ? "bg-indigo-500 border-indigo-500" : "border-slate-600 bg-transparent group-hover:border-slate-500"}` }, size === s && /* @__PURE__ */ React16.createElement(FiCheck9, { size: 12, className: "text-white" })),
8772
+ /* @__PURE__ */ React16.createElement("span", { className: `text-sm capitalize transition-colors ${size === s ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}` }, s)
8773
+ )))), /* @__PURE__ */ React16.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React16.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider" }, "Propriedades Adicionais"), /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React16.createElement(FiPlus6, { size: 14 }), " Adicionar")), /* @__PURE__ */ React16.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React16.createElement(
8624
8774
  CustomPropertyDisplay,
8625
8775
  {
8626
8776
  key: prop.id,
@@ -8631,8 +8781,8 @@ function InSceneQuestForm({
8631
8781
  unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type),
8632
8782
  onUploadFile
8633
8783
  }
8634
- )), /* @__PURE__ */ React15.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React15.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: onCancel, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm" }, "Cancelar"), /* @__PURE__ */ React15.createElement("button", { type: "submit", className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]" }, "Salvar Quest")))
8635
- ), isDescriptionModalOpen && /* @__PURE__ */ React15.createElement(
8784
+ )), /* @__PURE__ */ React16.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React16.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: onCancel, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm" }, "Cancelar"), /* @__PURE__ */ React16.createElement("button", { type: "submit", className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]" }, "Salvar Quest")))
8785
+ ), isDescriptionModalOpen && /* @__PURE__ */ React16.createElement(
8636
8786
  DescriptionEditModal,
8637
8787
  {
8638
8788
  isOpen: isDescriptionModalOpen,
@@ -8648,8 +8798,8 @@ function InSceneQuestForm({
8648
8798
  }
8649
8799
 
8650
8800
  // src/components/NodeDetailsPanel.jsx
8651
- import React16, { useState as useState17, useEffect as useEffect15, useRef as useRef13 } from "react";
8652
- import { FiPlus as FiPlus6, FiMaximize2 as FiMaximize23, FiX as FiX5, FiCheck as FiCheck10, FiImage as FiImage3, FiEdit2 as FiEdit27, FiLoader as FiLoader2, FiBookOpen as FiBookOpen3, FiSun as FiSun2, FiLink as FiLink5, FiDatabase } from "react-icons/fi";
8801
+ import React17, { useState as useState18, useEffect as useEffect15, useRef as useRef13 } from "react";
8802
+ import { FiPlus as FiPlus7, FiMaximize2 as FiMaximize23, FiX as FiX6, FiCheck as FiCheck10, FiImage as FiImage3, FiEdit2 as FiEdit27, FiLoader as FiLoader2, FiBookOpen as FiBookOpen3, FiSun as FiSun2, FiLink as FiLink5, FiDatabase } from "react-icons/fi";
8653
8803
  function NodeDetailsPanel({
8654
8804
  node,
8655
8805
  onClose,
@@ -8670,28 +8820,28 @@ function NodeDetailsPanel({
8670
8820
  userRole,
8671
8821
  currentDatasetName
8672
8822
  }) {
8673
- const [name, setName] = useState17((node == null ? void 0 : node.name) ?? "");
8674
- const [types, setTypes] = useState17([]);
8675
- const [typeInput, setTypeInput] = useState17("");
8676
- const [color, setColor] = useState17((node == null ? void 0 : node.color) ?? "#8b5cf6");
8677
- const [size, setSize] = useState17((node == null ? void 0 : node.size) ?? "medium");
8678
- const [description, setDescription] = useState17((node == null ? void 0 : node.description) ?? "");
8679
- const [intensity, setIntensity] = useState17((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
8680
- const [customProps, setCustomProps] = useState17(() => extractCustomPropsFromNode(node || {}));
8681
- const [showTypeSuggestions, setShowTypeSuggestions] = useState17(false);
8682
- const [filteredTypes, setFilteredTypes] = useState17([]);
8683
- const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState17(false);
8684
- const [isReadMode, setIsReadMode] = useState17(false);
8685
- const [existingSections, setExistingSections] = useState17((node == null ? void 0 : node.description_sections) || []);
8686
- const [isSaving, setIsSaving] = useState17(false);
8687
- const [isLinkCopied, setIsLinkCopied] = useState17(false);
8688
- const [useImageAsTexture, setUseImageAsTexture] = useState17(() => {
8823
+ const [name, setName] = useState18((node == null ? void 0 : node.name) ?? "");
8824
+ const [types, setTypes] = useState18([]);
8825
+ const [typeInput, setTypeInput] = useState18("");
8826
+ const [color, setColor] = useState18((node == null ? void 0 : node.color) ?? "#8b5cf6");
8827
+ const [size, setSize] = useState18((node == null ? void 0 : node.size) ?? "medium");
8828
+ const [description, setDescription] = useState18((node == null ? void 0 : node.description) ?? "");
8829
+ const [intensity, setIntensity] = useState18((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
8830
+ const [customProps, setCustomProps] = useState18(() => extractCustomPropsFromNode(node || {}));
8831
+ const [showTypeSuggestions, setShowTypeSuggestions] = useState18(false);
8832
+ const [filteredTypes, setFilteredTypes] = useState18([]);
8833
+ const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState18(false);
8834
+ const [isReadMode, setIsReadMode] = useState18(false);
8835
+ const [existingSections, setExistingSections] = useState18((node == null ? void 0 : node.description_sections) || []);
8836
+ const [isSaving, setIsSaving] = useState18(false);
8837
+ const [isLinkCopied, setIsLinkCopied] = useState18(false);
8838
+ const [useImageAsTexture, setUseImageAsTexture] = useState18(() => {
8689
8839
  if ((node == null ? void 0 : node.useImageAsTexture) === "true") return true;
8690
8840
  if ((node == null ? void 0 : node.useImageAsTexture) === "false") return false;
8691
8841
  return !!(node == null ? void 0 : node.useImageAsTexture);
8692
8842
  });
8693
- const [selectedImageUrl, setSelectedImageUrl] = useState17((node == null ? void 0 : node.textureImageUrl) ?? null);
8694
- const [hasUnsavedChanges, setHasUnsavedChanges] = useState17(false);
8843
+ const [selectedImageUrl, setSelectedImageUrl] = useState18((node == null ? void 0 : node.textureImageUrl) ?? null);
8844
+ const [hasUnsavedChanges, setHasUnsavedChanges] = useState18(false);
8695
8845
  const maxPanelW = typeof window !== "undefined" ? window.innerWidth * 0.92 : 1200;
8696
8846
  const { width: panelWidth, isResizing, handlePointerDown: handleResize, setWidth } = useResizablePanel({
8697
8847
  initialWidth: isReadMode ? 700 : 440,
@@ -8934,7 +9084,7 @@ function NodeDetailsPanel({
8934
9084
  onClose();
8935
9085
  };
8936
9086
  const currentUsedTypes = customProps.map((p) => p.type).filter((t) => UNIQUE_PROP_TYPES.includes(t));
8937
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
9087
+ return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
8938
9088
  "div",
8939
9089
  {
8940
9090
  className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col ${isResizing ? "transition-none" : "transition-all duration-300 ease-out"}`,
@@ -8947,7 +9097,7 @@ function NodeDetailsPanel({
8947
9097
  onContextMenu: swallow,
8948
9098
  onDoubleClick: swallow
8949
9099
  },
8950
- /* @__PURE__ */ React16.createElement(
9100
+ /* @__PURE__ */ React17.createElement(
8951
9101
  "div",
8952
9102
  {
8953
9103
  onPointerDown: (e) => {
@@ -8958,7 +9108,7 @@ function NodeDetailsPanel({
8958
9108
  title: "Arraste para redimensionar"
8959
9109
  }
8960
9110
  ),
8961
- isReadMode ? /* @__PURE__ */ React16.createElement(
9111
+ isReadMode ? /* @__PURE__ */ React17.createElement(
8962
9112
  DescriptionReadModePanel,
8963
9113
  {
8964
9114
  title: name || (node == null ? void 0 : node.name),
@@ -8979,23 +9129,23 @@ function NodeDetailsPanel({
8979
9129
  onImageClick: handleImageClickFromText,
8980
9130
  onSaveDescription: handleSaveDescriptionInline
8981
9131
  }
8982
- ) : /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }), /* @__PURE__ */ React16.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React16.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React16.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-indigo-400/80 shadow-[0_0_18px_2px_rgba(99,102,241,0.55)]" }), /* @__PURE__ */ React16.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes do Node"), /* @__PURE__ */ React16.createElement(
9132
+ ) : /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }), /* @__PURE__ */ React17.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React17.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React17.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-indigo-400/80 shadow-[0_0_18px_2px_rgba(99,102,241,0.55)]" }), /* @__PURE__ */ React17.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes do Node"), /* @__PURE__ */ React17.createElement(
8983
9133
  "button",
8984
9134
  {
8985
9135
  onClick: handleCopyLink,
8986
9136
  className: `ml-1 p-1 transition-colors ${isLinkCopied ? "text-green-400" : "text-slate-400 hover:text-indigo-400"}`,
8987
9137
  title: isLinkCopied ? "Link Copiado!" : "Copiar link para este Node"
8988
9138
  },
8989
- isLinkCopied ? /* @__PURE__ */ React16.createElement(FiCheck10, { size: 12 }) : /* @__PURE__ */ React16.createElement(FiLink5, { size: 12 })
8990
- )), /* @__PURE__ */ React16.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, name || (node == null ? void 0 : node.name))), /* @__PURE__ */ React16.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Cancelar" }, "\xD7")), /* @__PURE__ */ React16.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300" }, "Tipos"), /* @__PURE__ */ React16.createElement("div", { className: `relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/60" : ""} transition-all` }, types.map((t, index) => /* @__PURE__ */ React16.createElement("span", { key: index, className: "flex items-center gap-1 bg-indigo-500/30 text-indigo-100 px-1.5 py-0.5 rounded-md text-xs font-medium border border-indigo-500/20" }, t, canEdit && /* @__PURE__ */ React16.createElement(
9139
+ isLinkCopied ? /* @__PURE__ */ React17.createElement(FiCheck10, { size: 12 }) : /* @__PURE__ */ React17.createElement(FiLink5, { size: 12 })
9140
+ )), /* @__PURE__ */ React17.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, name || (node == null ? void 0 : node.name))), /* @__PURE__ */ React17.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Cancelar" }, "\xD7")), /* @__PURE__ */ React17.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Tipos"), /* @__PURE__ */ React17.createElement("div", { className: `relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/60" : ""} transition-all` }, types.map((t, index) => /* @__PURE__ */ React17.createElement("span", { key: index, className: "flex items-center gap-1 bg-indigo-500/30 text-indigo-100 px-1.5 py-0.5 rounded-md text-xs font-medium border border-indigo-500/20" }, t, canEdit && /* @__PURE__ */ React17.createElement(
8991
9141
  "button",
8992
9142
  {
8993
9143
  type: "button",
8994
9144
  onClick: () => handleRemoveType(index),
8995
9145
  className: "hover:text-white transition-colors"
8996
9146
  },
8997
- /* @__PURE__ */ React16.createElement(FiX5, { size: 12 })
8998
- ))), canEdit && /* @__PURE__ */ React16.createElement(
9147
+ /* @__PURE__ */ React17.createElement(FiX6, { size: 12 })
9148
+ ))), canEdit && /* @__PURE__ */ React17.createElement(
8999
9149
  "input",
9000
9150
  {
9001
9151
  type: "text",
@@ -9016,7 +9166,7 @@ function NodeDetailsPanel({
9016
9166
  placeholder: types.length === 0 ? "Ex.: Cliente" : "",
9017
9167
  autoComplete: "off"
9018
9168
  }
9019
- ), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */ React16.createElement("ul", { className: "custom-scrollbar absolute top-full left-0 z-10 w-full mt-1 max-h-40 overflow-y-auto rounded-lg bg-slate-800 border border-white/10 shadow-lg" }, filteredTypes.map((suggestedType, index) => /* @__PURE__ */ React16.createElement(
9169
+ ), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */ React17.createElement("ul", { className: "custom-scrollbar absolute top-full left-0 z-10 w-full mt-1 max-h-40 overflow-y-auto rounded-lg bg-slate-800 border border-white/10 shadow-lg" }, filteredTypes.map((suggestedType, index) => /* @__PURE__ */ React17.createElement(
9020
9170
  "li",
9021
9171
  {
9022
9172
  key: index,
@@ -9027,7 +9177,7 @@ function NodeDetailsPanel({
9027
9177
  }
9028
9178
  },
9029
9179
  suggestedType
9030
- ))))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300" }, "Nome"), /* @__PURE__ */ React16.createElement(
9180
+ ))))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Nome"), /* @__PURE__ */ React17.createElement(
9031
9181
  "input",
9032
9182
  {
9033
9183
  type: "text",
@@ -9036,7 +9186,7 @@ function NodeDetailsPanel({
9036
9186
  readOnly: !canEdit,
9037
9187
  className: `w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none ${canEdit ? "focus:ring-2 focus:ring-indigo-400/60" : "cursor-default text-slate-400"}`
9038
9188
  }
9039
- )), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React16.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React16.createElement(
9189
+ )), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React17.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React17.createElement(
9040
9190
  DescriptionDisplay,
9041
9191
  {
9042
9192
  description,
@@ -9048,7 +9198,7 @@ function NodeDetailsPanel({
9048
9198
  onImageClick: handleImageClickFromText,
9049
9199
  onSaveDescription: handleSaveDescriptionInline
9050
9200
  }
9051
- ), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React16.createElement(
9201
+ ), /* @__PURE__ */ React17.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React17.createElement(
9052
9202
  "button",
9053
9203
  {
9054
9204
  type: "button",
@@ -9056,8 +9206,8 @@ function NodeDetailsPanel({
9056
9206
  className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`,
9057
9207
  title: "Modo de Leitura"
9058
9208
  },
9059
- /* @__PURE__ */ React16.createElement(FiBookOpen3, { size: 14 })
9060
- ), canEdit && /* @__PURE__ */ React16.createElement(
9209
+ /* @__PURE__ */ React17.createElement(FiBookOpen3, { size: 14 })
9210
+ ), canEdit && /* @__PURE__ */ React17.createElement(
9061
9211
  "button",
9062
9212
  {
9063
9213
  type: "button",
@@ -9065,17 +9215,17 @@ function NodeDetailsPanel({
9065
9215
  className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors",
9066
9216
  title: "Editar descri\xE7\xE3o (Modo de Escrita)"
9067
9217
  },
9068
- /* @__PURE__ */ React16.createElement(FiEdit27, { size: 14 })
9069
- )), canEdit && !description && /* @__PURE__ */ React16.createElement(
9218
+ /* @__PURE__ */ React17.createElement(FiEdit27, { size: 14 })
9219
+ )), canEdit && !description && /* @__PURE__ */ React17.createElement(
9070
9220
  "div",
9071
9221
  {
9072
9222
  onClick: () => setIsDescriptionModalOpen(true),
9073
9223
  className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text"
9074
9224
  },
9075
9225
  "Adicionar descri\xE7\xE3o..."
9076
- ))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300" }, "Size"), /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => {
9226
+ ))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Size"), /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => {
9077
9227
  const isSelected = size === s;
9078
- return /* @__PURE__ */ React16.createElement(
9228
+ return /* @__PURE__ */ React17.createElement(
9079
9229
  "button",
9080
9230
  {
9081
9231
  key: s,
@@ -9083,10 +9233,10 @@ function NodeDetailsPanel({
9083
9233
  onClick: () => canEdit && handleSizeChange(s),
9084
9234
  className: `flex items-center gap-2 group focus:outline-none ${canEdit ? "cursor-pointer" : "cursor-default opacity-80"}`
9085
9235
  },
9086
- /* @__PURE__ */ React16.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent " + (canEdit ? "group-hover:border-slate-500" : "")}` }, isSelected && /* @__PURE__ */ React16.createElement(FiCheck10, { size: 12, className: "text-white" })),
9087
- /* @__PURE__ */ React16.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 " + (canEdit ? "group-hover:text-slate-300" : "")}` }, s)
9236
+ /* @__PURE__ */ React17.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent " + (canEdit ? "group-hover:border-slate-500" : "")}` }, isSelected && /* @__PURE__ */ React17.createElement(FiCheck10, { size: 12, className: "text-white" })),
9237
+ /* @__PURE__ */ React17.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 " + (canEdit ? "group-hover:text-slate-300" : "")}` }, s)
9088
9238
  );
9089
- }))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300" }, "Cor e Brilho"), canEdit && hasImages && /* @__PURE__ */ React16.createElement("label", { className: "flex items-center gap-2 cursor-pointer group" }, /* @__PURE__ */ React16.createElement("div", { className: `w-4 h-4 rounded border flex items-center justify-center transition-colors ${useImageAsTexture ? "bg-indigo-500 border-indigo-500" : "border-slate-500 bg-transparent"}` }, useImageAsTexture && /* @__PURE__ */ React16.createElement(FiCheck10, { size: 12, className: "text-white" })), /* @__PURE__ */ React16.createElement(
9239
+ }))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Cor e Brilho"), canEdit && hasImages && /* @__PURE__ */ React17.createElement("label", { className: "flex items-center gap-2 cursor-pointer group" }, /* @__PURE__ */ React17.createElement("div", { className: `w-4 h-4 rounded border flex items-center justify-center transition-colors ${useImageAsTexture ? "bg-indigo-500 border-indigo-500" : "border-slate-500 bg-transparent"}` }, useImageAsTexture && /* @__PURE__ */ React17.createElement(FiCheck10, { size: 12, className: "text-white" })), /* @__PURE__ */ React17.createElement(
9090
9240
  "input",
9091
9241
  {
9092
9242
  type: "checkbox",
@@ -9094,14 +9244,14 @@ function NodeDetailsPanel({
9094
9244
  onChange: handleToggleImageMode,
9095
9245
  className: "hidden"
9096
9246
  }
9097
- ), /* @__PURE__ */ React16.createElement("span", { className: `text-xs ${useImageAsTexture ? "text-indigo-300" : "text-slate-400 group-hover:text-slate-300"}` }, "Usar imagem para representar o node"))), /* @__PURE__ */ React16.createElement(
9247
+ ), /* @__PURE__ */ React17.createElement("span", { className: `text-xs ${useImageAsTexture ? "text-indigo-300" : "text-slate-400 group-hover:text-slate-300"}` }, "Usar imagem para representar o node"))), /* @__PURE__ */ React17.createElement(
9098
9248
  ColorPicker,
9099
9249
  {
9100
9250
  color,
9101
9251
  onChange: handleColorChange,
9102
9252
  disabled: !canEdit || useImageAsTexture
9103
9253
  }
9104
- ), /* @__PURE__ */ React16.createElement("div", { className: "mt-3 flex items-center gap-3" }, /* @__PURE__ */ React16.createElement(FiSun2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React16.createElement(
9254
+ ), /* @__PURE__ */ React17.createElement("div", { className: "mt-3 flex items-center gap-3" }, /* @__PURE__ */ React17.createElement(FiSun2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React17.createElement(
9105
9255
  "input",
9106
9256
  {
9107
9257
  type: "range",
@@ -9114,7 +9264,7 @@ function NodeDetailsPanel({
9114
9264
  className: `w-full h-1.5 bg-slate-700 rounded-lg appearance-none ${canEdit ? "cursor-pointer accent-indigo-500 hover:accent-indigo-400" : "cursor-default accent-slate-500"}`,
9115
9265
  title: `Intensidade do brilho: ${intensity}`
9116
9266
  }
9117
- ), /* @__PURE__ */ React16.createElement("span", { className: "text-xs text-slate-400 w-6 text-right" }, intensity)), /* @__PURE__ */ React16.createElement("span", { className: `text-xs block mt-1 transition-opacity ${useImageAsTexture ? "opacity-40" : "text-slate-400"}` }, useImageAsTexture ? "Cor da borda (definida pela imagem)" : "Ajuste a cor e a intensidade do brilho.")), /* @__PURE__ */ React16.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React16.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React16.createElement(FiPlus6, { size: 14 }), " Adicionar")), /* @__PURE__ */ React16.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React16.createElement(
9267
+ ), /* @__PURE__ */ React17.createElement("span", { className: "text-xs text-slate-400 w-6 text-right" }, intensity)), /* @__PURE__ */ React17.createElement("span", { className: `text-xs block mt-1 transition-opacity ${useImageAsTexture ? "opacity-40" : "text-slate-400"}` }, useImageAsTexture ? "Cor da borda (definida pela imagem)" : "Ajuste a cor e a intensidade do brilho.")), /* @__PURE__ */ React17.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React17.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React17.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React17.createElement(FiPlus7, { size: 14 }), " Adicionar")), /* @__PURE__ */ React17.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React17.createElement(
9118
9268
  CustomPropertyDisplay,
9119
9269
  {
9120
9270
  key: prop.id,
@@ -9129,7 +9279,7 @@ function NodeDetailsPanel({
9129
9279
  onUploadFile: canEdit ? onUploadFile : void 0,
9130
9280
  readOnly: !canEdit
9131
9281
  }
9132
- )), /* @__PURE__ */ React16.createElement("div", { ref: propsEndRef }))), currentDatasetName && /* @__PURE__ */ React16.createElement("div", { className: "pt-3 mt-4 border-t border-white/10 flex items-center justify-end gap-2 text-xs text-slate-400" }, /* @__PURE__ */ React16.createElement("span", { className: "truncate text-right" }, /* @__PURE__ */ React16.createElement("span", { className: "text-slate-200 font-medium" }, currentDatasetName)))), /* @__PURE__ */ React16.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React16.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React16.createElement(
9282
+ )), /* @__PURE__ */ React17.createElement("div", { ref: propsEndRef }))), currentDatasetName && /* @__PURE__ */ React17.createElement("div", { className: "pt-3 mt-4 border-t border-white/10 flex items-center justify-end gap-2 text-xs text-slate-400" }, /* @__PURE__ */ React17.createElement("span", { className: "truncate text-right" }, /* @__PURE__ */ React17.createElement("span", { className: "text-slate-200 font-medium" }, currentDatasetName)))), /* @__PURE__ */ React17.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React17.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React17.createElement(
9133
9283
  "button",
9134
9284
  {
9135
9285
  onClick: () => handleSave(false),
@@ -9138,10 +9288,10 @@ function NodeDetailsPanel({
9138
9288
  ${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 text-white"}
9139
9289
  `
9140
9290
  },
9141
- isSaving && /* @__PURE__ */ React16.createElement(FiLoader2, { className: "animate-spin" }),
9291
+ isSaving && /* @__PURE__ */ React17.createElement(FiLoader2, { className: "animate-spin" }),
9142
9292
  isSaving ? "Salvando..." : "Salvar"
9143
9293
  )))
9144
- ), isDescriptionModalOpen && canEdit && /* @__PURE__ */ React16.createElement(
9294
+ ), isDescriptionModalOpen && canEdit && /* @__PURE__ */ React17.createElement(
9145
9295
  DescriptionEditModal,
9146
9296
  {
9147
9297
  isOpen: isDescriptionModalOpen,
@@ -9162,8 +9312,8 @@ function NodeDetailsPanel({
9162
9312
  }
9163
9313
 
9164
9314
  // src/components/QuestDetailsPanel.jsx
9165
- import React17, { useState as useState18, useEffect as useEffect16, useRef as useRef14 } from "react";
9166
- import { FiPlus as FiPlus7, FiX as FiX6, FiCheck as FiCheck11, FiEdit2 as FiEdit28, FiLoader as FiLoader3, FiBookOpen as FiBookOpen4, FiLink as FiLink6, FiTarget as FiTarget2, FiChevronDown as FiChevronDown6, FiUser as FiUser2, FiSearch as FiSearch5 } from "react-icons/fi";
9315
+ import React18, { useState as useState19, useEffect as useEffect16, useRef as useRef14 } from "react";
9316
+ import { FiPlus as FiPlus8, FiX as FiX7, FiCheck as FiCheck11, FiEdit2 as FiEdit28, FiLoader as FiLoader3, FiBookOpen as FiBookOpen4, FiLink as FiLink6, FiTarget as FiTarget2, FiChevronDown as FiChevronDown7, FiUser as FiUser3, FiSearch as FiSearch6 } from "react-icons/fi";
9167
9317
  var QUEST_STATUS_COLORS3 = {
9168
9318
  "Backlog": "#64748b",
9169
9319
  "In Progress": "#eab308",
@@ -9191,29 +9341,31 @@ function QuestDetailsPanel({
9191
9341
  }) {
9192
9342
  var _a;
9193
9343
  const initialRawTitle = (node == null ? void 0 : node.raw_title) || (((_a = node == null ? void 0 : node.name) == null ? void 0 : _a.includes(" - \xBB ")) ? node.name.split(" - \xBB ")[1] : node == null ? void 0 : node.name) || "";
9194
- const [rawTitle, setRawTitle] = useState18(initialRawTitle);
9344
+ const [rawTitle, setRawTitle] = useState19(initialRawTitle);
9195
9345
  const prefixParts = ((node == null ? void 0 : node.name) || "").split(" - \xBB ");
9196
9346
  const questPrefix = prefixParts.length > 1 ? prefixParts[0] : "";
9197
9347
  const standardizedName = questPrefix ? `${questPrefix} - \xBB ${rawTitle || "Sem t\xEDtulo"}` : rawTitle;
9198
- const [types, setTypes] = useState18((node == null ? void 0 : node.type) ? Array.isArray(node.type) ? node.type : [node.type] : ["quest"]);
9199
- const [typeInput, setTypeInput] = useState18("");
9200
- const [status, setStatus] = useState18((node == null ? void 0 : node.status) ?? "Backlog");
9201
- const [size, setSize] = useState18((node == null ? void 0 : node.size) ?? "medium");
9202
- const [assigneeId, setAssigneeId] = useState18((node == null ? void 0 : node.assignee_id) || "");
9203
- const [description, setDescription] = useState18((node == null ? void 0 : node.description) ?? "");
9204
- const [intensity, setIntensity] = useState18((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
9205
- const [isStatusDropdownOpen, setIsStatusDropdownOpen] = useState18(false);
9206
- const [isAssigneeDropdownOpen, setIsAssigneeDropdownOpen] = useState18(false);
9207
- const [assigneeSearchQuery, setAssigneeSearchQuery] = useState18("");
9208
- const [customProps, setCustomProps] = useState18(() => extractCustomPropsFromNode(node || {}));
9209
- const [showTypeSuggestions, setShowTypeSuggestions] = useState18(false);
9210
- const [filteredTypes, setFilteredTypes] = useState18([]);
9211
- const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState18(false);
9212
- const [isReadMode, setIsReadMode] = useState18(false);
9213
- const [existingSections, setExistingSections] = useState18((node == null ? void 0 : node.description_sections) || []);
9214
- const [isSaving, setIsSaving] = useState18(false);
9215
- const [isLinkCopied, setIsLinkCopied] = useState18(false);
9216
- const [hasUnsavedChanges, setHasUnsavedChanges] = useState18(false);
9348
+ const [types, setTypes] = useState19((node == null ? void 0 : node.type) ? Array.isArray(node.type) ? node.type : [node.type] : ["quest"]);
9349
+ const [typeInput, setTypeInput] = useState19("");
9350
+ const [status, setStatus] = useState19((node == null ? void 0 : node.status) ?? "Backlog");
9351
+ const [size, setSize] = useState19((node == null ? void 0 : node.size) ?? "medium");
9352
+ const [assigneeId, setAssigneeId] = useState19((node == null ? void 0 : node.assignee_id) || "");
9353
+ const [description, setDescription] = useState19((node == null ? void 0 : node.description) ?? "");
9354
+ const [intensity, setIntensity] = useState19((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
9355
+ const [isStatusDropdownOpen, setIsStatusDropdownOpen] = useState19(false);
9356
+ const [isAssigneeDropdownOpen, setIsAssigneeDropdownOpen] = useState19(false);
9357
+ const [assigneeSearchQuery, setAssigneeSearchQuery] = useState19("");
9358
+ const [customProps, setCustomProps] = useState19(() => extractCustomPropsFromNode(node || {}));
9359
+ const [reviewStack, setReviewStack] = useState19((node == null ? void 0 : node.reviewStack) || []);
9360
+ const [timeline, setTimeline] = useState19((node == null ? void 0 : node.timeline) || []);
9361
+ const [showTypeSuggestions, setShowTypeSuggestions] = useState19(false);
9362
+ const [filteredTypes, setFilteredTypes] = useState19([]);
9363
+ const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState19(false);
9364
+ const [isReadMode, setIsReadMode] = useState19(false);
9365
+ const [existingSections, setExistingSections] = useState19((node == null ? void 0 : node.description_sections) || []);
9366
+ const [isSaving, setIsSaving] = useState19(false);
9367
+ const [isLinkCopied, setIsLinkCopied] = useState19(false);
9368
+ const [hasUnsavedChanges, setHasUnsavedChanges] = useState19(false);
9217
9369
  const maxPanelW = typeof window !== "undefined" ? window.innerWidth * 0.92 : 1200;
9218
9370
  const { width: panelWidth, isResizing, handlePointerDown: handleResize, setWidth } = useResizablePanel({
9219
9371
  initialWidth: isReadMode ? 700 : 440,
@@ -9246,6 +9398,8 @@ function QuestDetailsPanel({
9246
9398
  setIntensity((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
9247
9399
  setExistingSections((node == null ? void 0 : node.description_sections) || []);
9248
9400
  setCustomProps(extractCustomPropsFromNode(node || {}));
9401
+ setReviewStack((node == null ? void 0 : node.reviewStack) || []);
9402
+ setTimeline((node == null ? void 0 : node.timeline) || []);
9249
9403
  setHasUnsavedChanges(false);
9250
9404
  }
9251
9405
  }, [node]);
@@ -9361,6 +9515,8 @@ function QuestDetailsPanel({
9361
9515
  const currentAssigneeId = overrides.assigneeId !== void 0 ? overrides.assigneeId : assigneeId;
9362
9516
  const currentDescription = overrides.description !== void 0 ? overrides.description : description;
9363
9517
  const currentCustomProps = overrides.customProps !== void 0 ? overrides.customProps : customProps;
9518
+ const currentReviewStack = overrides.reviewStack !== void 0 ? overrides.reviewStack : reviewStack;
9519
+ const currentTimeline = overrides.timeline !== void 0 ? overrides.timeline : timeline;
9364
9520
  const currentExistingSections = overrides.existingSections !== void 0 ? overrides.existingSections : existingSections;
9365
9521
  const currentStatus = overrides.status !== void 0 ? overrides.status : status;
9366
9522
  if (!keepOpen && !hasUnsavedChanges) {
@@ -9392,6 +9548,8 @@ function QuestDetailsPanel({
9392
9548
  textureImageUrl: null,
9393
9549
  intensity,
9394
9550
  is_quest: true,
9551
+ reviewStack: currentReviewStack,
9552
+ timeline: currentTimeline,
9395
9553
  ...extrasObj,
9396
9554
  version_node: node.version_node
9397
9555
  };
@@ -9419,7 +9577,7 @@ function QuestDetailsPanel({
9419
9577
  const currentUsedTypes = customProps.map((p) => p.type).filter((t) => UNIQUE_PROP_TYPES.includes(t));
9420
9578
  const assigneeMember = viewMembers.find((m) => m.id === assigneeId);
9421
9579
  const isAssigneeUndefined = assigneeId && !assigneeMember;
9422
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
9580
+ return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
9423
9581
  "div",
9424
9582
  {
9425
9583
  className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col ${isResizing ? "transition-none" : "transition-all duration-300 ease-out"}`,
@@ -9432,11 +9590,11 @@ function QuestDetailsPanel({
9432
9590
  onContextMenu: swallow,
9433
9591
  onDoubleClick: swallow
9434
9592
  },
9435
- /* @__PURE__ */ React17.createElement("div", { onPointerDown: (e) => {
9593
+ /* @__PURE__ */ React18.createElement("div", { onPointerDown: (e) => {
9436
9594
  e.stopPropagation();
9437
9595
  handleResize(e);
9438
9596
  }, className: "absolute left-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-indigo-500/50 z-[2000] transition-colors", title: "Arraste para redimensionar" }),
9439
- isReadMode ? /* @__PURE__ */ React17.createElement(
9597
+ isReadMode ? /* @__PURE__ */ React18.createElement(
9440
9598
  DescriptionReadModePanel,
9441
9599
  {
9442
9600
  title: standardizedName || (node == null ? void 0 : node.name),
@@ -9457,7 +9615,7 @@ function QuestDetailsPanel({
9457
9615
  onImageClick: handleImageClickFromText,
9458
9616
  onSaveDescription: handleSaveDescriptionInline
9459
9617
  }
9460
- ) : /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS3[status]}, transparent)` } }), /* @__PURE__ */ React17.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React17.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React17.createElement(FiTarget2, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React17.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ React17.createElement("button", { onClick: handleCopyLink, className: `ml-1 p-1 transition-colors ${isLinkCopied ? "text-green-400" : "text-slate-400 hover:text-sky-400"}`, title: isLinkCopied ? "Link Copiado!" : "Copiar link para esta Quest" }, isLinkCopied ? /* @__PURE__ */ React17.createElement(FiCheck11, { size: 12 }) : /* @__PURE__ */ React17.createElement(FiLink6, { size: 12 }))), /* @__PURE__ */ React17.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, standardizedName || (node == null ? void 0 : node.name))), /* @__PURE__ */ React17.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Cancelar" }, "\xD7")), /* @__PURE__ */ React17.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React17.createElement(
9618
+ ) : /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS3[status]}, transparent)` } }), /* @__PURE__ */ React18.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React18.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React18.createElement(FiTarget2, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React18.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Quest"), /* @__PURE__ */ React18.createElement("button", { onClick: handleCopyLink, className: `ml-1 p-1 transition-colors ${isLinkCopied ? "text-green-400" : "text-slate-400 hover:text-sky-400"}`, title: isLinkCopied ? "Link Copiado!" : "Copiar link para esta Quest" }, isLinkCopied ? /* @__PURE__ */ React18.createElement(FiCheck11, { size: 12 }) : /* @__PURE__ */ React18.createElement(FiLink6, { size: 12 }))), /* @__PURE__ */ React18.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, standardizedName || (node == null ? void 0 : node.name))), /* @__PURE__ */ React18.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Cancelar" }, "\xD7")), /* @__PURE__ */ React18.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "T\xEDtulo da Quest"), /* @__PURE__ */ React18.createElement(
9461
9619
  "input",
9462
9620
  {
9463
9621
  type: "text",
@@ -9466,7 +9624,7 @@ function QuestDetailsPanel({
9466
9624
  readOnly: !canEdit,
9467
9625
  className: `w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none ${canEdit ? "focus:ring-2 focus:ring-indigo-400/60" : "cursor-default text-slate-400"}`
9468
9626
  }
9469
- ), /* @__PURE__ */ React17.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React17.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React17.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Status da Quest"), /* @__PURE__ */ React17.createElement("div", { className: "relative" }, /* @__PURE__ */ React17.createElement(
9627
+ ), /* @__PURE__ */ React18.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React18.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React18.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Status da Quest"), /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
9470
9628
  "button",
9471
9629
  {
9472
9630
  type: "button",
@@ -9474,9 +9632,9 @@ function QuestDetailsPanel({
9474
9632
  disabled: !canEdit,
9475
9633
  className: `w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 transition-colors flex items-center justify-between ${canEdit ? "hover:border-white/20 focus:ring-2 focus:ring-indigo-400/60 cursor-pointer" : "cursor-default opacity-80"}`
9476
9634
  },
9477
- /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17.createElement("span", { className: "w-3 h-3 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.5)]", style: { backgroundColor: QUEST_STATUS_COLORS3[status] } }), /* @__PURE__ */ React17.createElement("span", { className: "text-slate-200 font-medium" }, status)),
9478
- canEdit && /* @__PURE__ */ React17.createElement(FiChevronDown6, { className: `text-slate-400 transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}` })
9479
- ), isStatusDropdownOpen && canEdit && /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsStatusDropdownOpen(false) }), /* @__PURE__ */ React17.createElement("ul", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-800 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden" }, Object.keys(QUEST_STATUS_COLORS3).map((s) => /* @__PURE__ */ React17.createElement(
9635
+ /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18.createElement("span", { className: "w-3 h-3 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.5)]", style: { backgroundColor: QUEST_STATUS_COLORS3[status] } }), /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, status)),
9636
+ canEdit && /* @__PURE__ */ React18.createElement(FiChevronDown7, { className: `text-slate-400 transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}` })
9637
+ ), isStatusDropdownOpen && canEdit && /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsStatusDropdownOpen(false) }), /* @__PURE__ */ React18.createElement("ul", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-800 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden" }, Object.keys(QUEST_STATUS_COLORS3).map((s) => /* @__PURE__ */ React18.createElement(
9480
9638
  "li",
9481
9639
  {
9482
9640
  key: s,
@@ -9486,21 +9644,21 @@ function QuestDetailsPanel({
9486
9644
  },
9487
9645
  className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${status === s ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
9488
9646
  },
9489
- /* @__PURE__ */ React17.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS3[s] } }),
9647
+ /* @__PURE__ */ React18.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS3[s] } }),
9490
9648
  s
9491
- )))))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Assignee (Respons\xE1vel)"), canEdit ? /* @__PURE__ */ React17.createElement("div", { className: "relative" }, /* @__PURE__ */ React17.createElement(
9649
+ )))))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Assignee (Respons\xE1vel)"), canEdit ? /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
9492
9650
  "button",
9493
9651
  {
9494
9652
  type: "button",
9495
9653
  onClick: () => setIsAssigneeDropdownOpen(!isAssigneeDropdownOpen),
9496
9654
  className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
9497
9655
  },
9498
- /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17.createElement(FiUser2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React17.createElement("span", { className: "text-slate-200 font-medium" }, isAssigneeUndefined ? "Undefined" : (assigneeMember == null ? void 0 : assigneeMember.name) || (assigneeMember == null ? void 0 : assigneeMember.email) || "Nenhum")),
9499
- /* @__PURE__ */ React17.createElement(FiChevronDown6, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
9500
- ), isAssigneeDropdownOpen && /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
9656
+ /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiUser3, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, isAssigneeUndefined ? "Undefined" : (assigneeMember == null ? void 0 : assigneeMember.name) || (assigneeMember == null ? void 0 : assigneeMember.email) || "Nenhum")),
9657
+ /* @__PURE__ */ React18.createElement(FiChevronDown7, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
9658
+ ), isAssigneeDropdownOpen && /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
9501
9659
  setIsAssigneeDropdownOpen(false);
9502
9660
  setAssigneeSearchQuery("");
9503
- } }), /* @__PURE__ */ React17.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React17.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React17.createElement(FiSearch5, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React17.createElement(
9661
+ } }), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React18.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiSearch6, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React18.createElement(
9504
9662
  "input",
9505
9663
  {
9506
9664
  type: "text",
@@ -9511,11 +9669,19 @@ function QuestDetailsPanel({
9511
9669
  className: "bg-transparent border-none outline-none text-xs text-white placeholder-slate-500 w-full",
9512
9670
  onClick: (e) => e.stopPropagation()
9513
9671
  }
9514
- )), /* @__PURE__ */ React17.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React17.createElement(
9672
+ )), /* @__PURE__ */ React18.createElement("ul", { className: "max-h-48 overflow-y-auto custom-scrollbar" }, /* @__PURE__ */ React18.createElement(
9515
9673
  "li",
9516
9674
  {
9517
9675
  onClick: () => {
9518
9676
  setAssigneeId("");
9677
+ const newTimeline = [...timeline, {
9678
+ type: "assignee_changed",
9679
+ timestamp: Date.now(),
9680
+ actorId: "user",
9681
+ to_assignee_id: null,
9682
+ description: `Respons\xE1vel removido.`
9683
+ }];
9684
+ setTimeline(newTimeline);
9519
9685
  setHasUnsavedChanges(true);
9520
9686
  setIsAssigneeDropdownOpen(false);
9521
9687
  setAssigneeSearchQuery("");
@@ -9523,7 +9689,7 @@ function QuestDetailsPanel({
9523
9689
  className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${!assigneeId ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
9524
9690
  },
9525
9691
  "Nenhum"
9526
- ), isAssigneeUndefined && /* @__PURE__ */ React17.createElement(
9692
+ ), isAssigneeUndefined && /* @__PURE__ */ React18.createElement(
9527
9693
  "li",
9528
9694
  {
9529
9695
  onClick: () => {
@@ -9536,12 +9702,20 @@ function QuestDetailsPanel({
9536
9702
  ), viewMembers.filter((member) => {
9537
9703
  const search = assigneeSearchQuery.toLowerCase();
9538
9704
  return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
9539
- }).map((member) => /* @__PURE__ */ React17.createElement(
9705
+ }).map((member) => /* @__PURE__ */ React18.createElement(
9540
9706
  "li",
9541
9707
  {
9542
9708
  key: member.id,
9543
9709
  onClick: () => {
9544
9710
  setAssigneeId(member.id);
9711
+ const newTimeline = [...timeline, {
9712
+ type: "assignee_changed",
9713
+ timestamp: Date.now(),
9714
+ actorId: "user",
9715
+ to_assignee_id: member.id,
9716
+ description: `Quest atribu\xEDda para ${member.name || member.email}.`
9717
+ }];
9718
+ setTimeline(newTimeline);
9545
9719
  setHasUnsavedChanges(true);
9546
9720
  setIsAssigneeDropdownOpen(false);
9547
9721
  setAssigneeSearchQuery("");
@@ -9552,7 +9726,18 @@ function QuestDetailsPanel({
9552
9726
  )), viewMembers.filter((member) => {
9553
9727
  const search = assigneeSearchQuery.toLowerCase();
9554
9728
  return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
9555
- }).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React17.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado"))))) : /* @__PURE__ */ React17.createElement("div", { className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 text-slate-400 flex items-center gap-2" }, /* @__PURE__ */ React17.createElement(FiUser2, { className: "opacity-50", size: 14 }), assigneeId ? assigneeMember ? assigneeMember.name || assigneeMember.email : "Undefined" : "Nenhum")), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Tipos Adicionais"), /* @__PURE__ */ React17.createElement("div", { className: `relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/60" : ""} transition-all` }, types.map((t, index) => /* @__PURE__ */ React17.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, canEdit && t !== "quest" && /* @__PURE__ */ React17.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React17.createElement(FiX6, { size: 12 })))), canEdit && /* @__PURE__ */ React17.createElement(
9729
+ }).length === 0 && assigneeSearchQuery && /* @__PURE__ */ React18.createElement("li", { className: "px-3 py-4 text-xs text-slate-500 text-center italic" }, "Nenhum membro encontrado"))))) : /* @__PURE__ */ React18.createElement("div", { className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 text-slate-400 flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiUser3, { className: "opacity-50", size: 14 }), assigneeId ? assigneeMember ? assigneeMember.name || assigneeMember.email : "Undefined" : "Nenhum")), /* @__PURE__ */ React18.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React18.createElement(
9730
+ QuestReviewStackEditor,
9731
+ {
9732
+ reviewStack,
9733
+ onChange: (newStack) => {
9734
+ setReviewStack(newStack);
9735
+ setHasUnsavedChanges(true);
9736
+ },
9737
+ viewMembers,
9738
+ readOnly: !canEdit
9739
+ }
9740
+ )), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Tipos Adicionais"), /* @__PURE__ */ React18.createElement("div", { className: `relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/60" : ""} transition-all` }, types.map((t, index) => /* @__PURE__ */ React18.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, canEdit && t !== "quest" && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React18.createElement(FiX7, { size: 12 })))), canEdit && /* @__PURE__ */ React18.createElement(
9556
9741
  "input",
9557
9742
  {
9558
9743
  type: "text",
@@ -9573,14 +9758,18 @@ function QuestDetailsPanel({
9573
9758
  placeholder: "",
9574
9759
  autoComplete: "off"
9575
9760
  }
9576
- ), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */ React17.createElement("ul", { className: "custom-scrollbar absolute top-full left-0 z-10 w-full mt-1 max-h-40 overflow-y-auto rounded-lg bg-slate-800 border border-white/10 shadow-lg" }, filteredTypes.map((suggestedType, index) => /* @__PURE__ */ React17.createElement("li", { key: index, className: "px-3 py-2 text-sm text-slate-200 cursor-pointer hover:bg-indigo-600/50", onMouseDown: (e) => {
9761
+ ), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */ React18.createElement("ul", { className: "custom-scrollbar absolute top-full left-0 z-10 w-full mt-1 max-h-40 overflow-y-auto rounded-lg bg-slate-800 border border-white/10 shadow-lg" }, filteredTypes.map((suggestedType, index) => /* @__PURE__ */ React18.createElement("li", { key: index, className: "px-3 py-2 text-sm text-slate-200 cursor-pointer hover:bg-indigo-600/50", onMouseDown: (e) => {
9577
9762
  e.preventDefault();
9578
9763
  handleAddType(suggestedType);
9579
- } }, suggestedType))))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React17.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React17.createElement(DescriptionDisplay, { description, savedSections: existingSections, availableNodes, availableAncestries, onOpenReference, onMentionClick, onImageClick: handleImageClickFromText, onSaveDescription: handleSaveDescriptionInline }), /* @__PURE__ */ React17.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React17.createElement("button", { type: "button", onClick: () => setIsReadMode(true), className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`, title: "Modo de Leitura" }, /* @__PURE__ */ React17.createElement(FiBookOpen4, { size: 14 })), canEdit && /* @__PURE__ */ React17.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors", title: "Editar descri\xE7\xE3o (Modo de Escrita)" }, /* @__PURE__ */ React17.createElement(FiEdit28, { size: 14 }))), canEdit && !description && /* @__PURE__ */ React17.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React17.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React17.createElement("label", { className: "text-xs text-slate-300" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React17.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => {
9764
+ } }, suggestedType))))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React18.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React18.createElement(DescriptionDisplay, { description, savedSections: existingSections, availableNodes, availableAncestries, onOpenReference, onMentionClick, onImageClick: handleImageClickFromText, onSaveDescription: handleSaveDescriptionInline }), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => setIsReadMode(true), className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`, title: "Modo de Leitura" }, /* @__PURE__ */ React18.createElement(FiBookOpen4, { size: 14 })), canEdit && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors", title: "Editar descri\xE7\xE3o (Modo de Escrita)" }, /* @__PURE__ */ React18.createElement(FiEdit28, { size: 14 }))), canEdit && !description && /* @__PURE__ */ React18.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => {
9580
9765
  const isSelected = size === s;
9581
- return /* @__PURE__ */ React17.createElement("button", { key: s, type: "button", onClick: () => canEdit && handleSizeChange(s), className: `flex items-center gap-2 group focus:outline-none ${canEdit ? "cursor-pointer" : "cursor-default opacity-80"}` }, /* @__PURE__ */ React17.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent " + (canEdit ? "group-hover:border-slate-500" : "")}` }, isSelected && /* @__PURE__ */ React17.createElement(FiCheck11, { size: 12, className: "text-white" })), /* @__PURE__ */ React17.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 " + (canEdit ? "group-hover:text-slate-300" : "")}` }, s));
9582
- }))), /* @__PURE__ */ React17.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React17.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React17.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React17.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React17.createElement(FiPlus7, { size: 14 }), " Adicionar")), /* @__PURE__ */ React17.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React17.createElement(CustomPropertyDisplay, { key: prop.id, prop, onUpdate: canEdit ? (updatedProp) => handleUpdateProp(idx, updatedProp) : void 0, onRemove: canEdit ? () => handleRemoveProp(idx) : void 0, onOpenImageViewer, unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type), isTextureMode: false, onUploadFile: canEdit ? onUploadFile : void 0, readOnly: !canEdit })), /* @__PURE__ */ React17.createElement("div", { ref: propsEndRef }))), currentDatasetName && /* @__PURE__ */ React17.createElement("div", { className: "pt-3 mt-4 border-t border-white/10 flex items-center justify-end gap-2 text-xs text-slate-400" }, /* @__PURE__ */ React17.createElement("span", { className: "truncate text-right" }, /* @__PURE__ */ React17.createElement("span", { className: "text-slate-200 font-medium" }, currentDatasetName)))), /* @__PURE__ */ React17.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React17.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React17.createElement("button", { onClick: () => handleSave(false), disabled: isSaving, className: `px-4 py-2 rounded-lg transition-all font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)] flex items-center gap-2 ${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 text-white"}` }, isSaving && /* @__PURE__ */ React17.createElement(FiLoader3, { className: "animate-spin" }), isSaving ? "Salvando..." : "Salvar Quest")))
9583
- ), isDescriptionModalOpen && canEdit && /* @__PURE__ */ React17.createElement(
9766
+ return /* @__PURE__ */ React18.createElement("button", { key: s, type: "button", onClick: () => canEdit && handleSizeChange(s), className: `flex items-center gap-2 group focus:outline-none ${canEdit ? "cursor-pointer" : "cursor-default opacity-80"}` }, /* @__PURE__ */ React18.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent " + (canEdit ? "group-hover:border-slate-500" : "")}` }, isSelected && /* @__PURE__ */ React18.createElement(FiCheck11, { size: 12, className: "text-white" })), /* @__PURE__ */ React18.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 " + (canEdit ? "group-hover:text-slate-300" : "")}` }, s));
9767
+ }))), /* @__PURE__ */ React18.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React18.createElement(FiPlus8, { size: 14 }), " Adicionar")), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React18.createElement(CustomPropertyDisplay, { key: prop.id, prop, onUpdate: canEdit ? (updatedProp) => handleUpdateProp(idx, updatedProp) : void 0, onRemove: canEdit ? () => handleRemoveProp(idx) : void 0, onOpenImageViewer, unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type), isTextureMode: false, onUploadFile: canEdit ? onUploadFile : void 0, readOnly: !canEdit })), /* @__PURE__ */ React18.createElement("div", { ref: propsEndRef }))), timeline && timeline.length > 0 && /* @__PURE__ */ React18.createElement("div", { className: "pt-4 pb-2 border-t border-white/10 mt-4" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider mb-3" }, "Timeline & Hist\xF3rico"), /* @__PURE__ */ React18.createElement("div", { className: "relative border-l border-white/10 ml-2.5 space-y-4" }, timeline.slice().sort((a, b) => a.timestamp - b.timestamp).map((event, idx) => {
9768
+ const dateObj = new Date(event.timestamp);
9769
+ const dateString = dateObj.toLocaleDateString("pt-BR", { day: "2-digit", month: "short", hour: "2-digit", minute: "2-digit" });
9770
+ return /* @__PURE__ */ React18.createElement("div", { key: idx, className: "relative pl-4 flex flex-col gap-0.5" }, /* @__PURE__ */ React18.createElement("div", { className: "absolute left-[-4.5px] top-1.5 w-2 h-2 rounded-full bg-slate-400/50 border-[1.5px] border-slate-900" }), /* @__PURE__ */ React18.createElement("p", { className: "text-[11px] text-slate-300" }, event.description), /* @__PURE__ */ React18.createElement("span", { className: "text-[9px] text-slate-500 font-mono tracking-tighter" }, dateString));
9771
+ }))), currentDatasetName && /* @__PURE__ */ React18.createElement("div", { className: "pt-3 mt-4 border-t border-white/10 flex items-center justify-end gap-2 text-xs text-slate-400" }, /* @__PURE__ */ React18.createElement("span", { className: "truncate text-right" }, /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, currentDatasetName)))), /* @__PURE__ */ React18.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React18.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React18.createElement("button", { onClick: () => handleSave(false), disabled: isSaving, className: `px-4 py-2 rounded-lg transition-all font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)] flex items-center gap-2 ${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 text-white"}` }, isSaving && /* @__PURE__ */ React18.createElement(FiLoader3, { className: "animate-spin" }), isSaving ? "Salvando..." : "Salvar Quest")))
9772
+ ), isDescriptionModalOpen && canEdit && /* @__PURE__ */ React18.createElement(
9584
9773
  DescriptionEditModal,
9585
9774
  {
9586
9775
  isOpen: isDescriptionModalOpen,
@@ -9600,7 +9789,7 @@ function QuestDetailsPanel({
9600
9789
  }
9601
9790
 
9602
9791
  // src/components/MultiNodeContextMenu.jsx
9603
- import React18, { useLayoutEffect as useLayoutEffect3, useRef as useRef15, useState as useState19, useEffect as useEffect17 } from "react";
9792
+ import React19, { useLayoutEffect as useLayoutEffect3, useRef as useRef15, useState as useState20, useEffect as useEffect17 } from "react";
9604
9793
  function MultiNodeContextMenu({
9605
9794
  data,
9606
9795
  userRole,
@@ -9610,8 +9799,8 @@ function MultiNodeContextMenu({
9610
9799
  onDeleteNodes
9611
9800
  }) {
9612
9801
  const menuRef = useRef15(null);
9613
- const [menuPos, setMenuPos] = useState19({ left: 0, top: 0 });
9614
- const [isConfirmingDelete, setIsConfirmingDelete] = useState19(false);
9802
+ const [menuPos, setMenuPos] = useState20({ left: 0, top: 0 });
9803
+ const [isConfirmingDelete, setIsConfirmingDelete] = useState20(false);
9615
9804
  const ability = defineAbilityFor(userRole);
9616
9805
  const canDelete = ability.can("delete", "Node");
9617
9806
  useLayoutEffect3(() => {
@@ -9642,7 +9831,7 @@ function MultiNodeContextMenu({
9642
9831
  const baseButtonClass = "w-full flex items-center gap-2.5 px-2 py-1.5 text-left text-sm rounded-md hover:bg-indigo-500/20 text-slate-200 hover:text-white transition-colors duration-150 truncate";
9643
9832
  const deleteButtonClass = "w-full flex items-center gap-2.5 px-2 py-1.5 text-left text-sm rounded-md hover:bg-red-500/25 text-red-400 hover:text-red-300 transition-colors duration-150 truncate";
9644
9833
  const nodeCount = data.nodeIds.size;
9645
- return /* @__PURE__ */ React18.createElement(
9834
+ return /* @__PURE__ */ React19.createElement(
9646
9835
  "div",
9647
9836
  {
9648
9837
  ref: menuRef,
@@ -9656,28 +9845,28 @@ function MultiNodeContextMenu({
9656
9845
  onContextMenu: swallow,
9657
9846
  onDoubleClick: swallow
9658
9847
  },
9659
- /* @__PURE__ */ React18.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }),
9660
- /* @__PURE__ */ React18.createElement("div", { className: "p-1.5" }, isConfirmingDelete ? /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col gap-3 p-2" }, /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col items-center text-center gap-2" }, /* @__PURE__ */ React18.createElement("div", { className: "w-10 h-10 rounded-full bg-red-500/20 flex items-center justify-center text-red-400 mb-1" }, /* @__PURE__ */ React18.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React18.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }))), /* @__PURE__ */ React18.createElement("p", { className: "text-sm text-slate-200" }, "Excluir ", /* @__PURE__ */ React18.createElement("strong", null, nodeCount, " Nodes"), "?"), /* @__PURE__ */ React18.createElement("p", { className: "text-[11px] text-slate-400 leading-tight" }, "Esta a\xE7\xE3o \xE9 irrevers\xEDvel. Todas as conex\xF5es associadas a eles ser\xE3o apagadas.")), /* @__PURE__ */ React18.createElement("div", { className: "flex gap-2 mt-1" }, /* @__PURE__ */ React18.createElement(
9848
+ /* @__PURE__ */ React19.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }),
9849
+ /* @__PURE__ */ React19.createElement("div", { className: "p-1.5" }, isConfirmingDelete ? /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-3 p-2" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-center text-center gap-2" }, /* @__PURE__ */ React19.createElement("div", { className: "w-10 h-10 rounded-full bg-red-500/20 flex items-center justify-center text-red-400 mb-1" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React19.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }))), /* @__PURE__ */ React19.createElement("p", { className: "text-sm text-slate-200" }, "Excluir ", /* @__PURE__ */ React19.createElement("strong", null, nodeCount, " Nodes"), "?"), /* @__PURE__ */ React19.createElement("p", { className: "text-[11px] text-slate-400 leading-tight" }, "Esta a\xE7\xE3o \xE9 irrevers\xEDvel. Todas as conex\xF5es associadas a eles ser\xE3o apagadas.")), /* @__PURE__ */ React19.createElement("div", { className: "flex gap-2 mt-1" }, /* @__PURE__ */ React19.createElement(
9661
9850
  "button",
9662
9851
  {
9663
9852
  onClick: () => setIsConfirmingDelete(false),
9664
9853
  className: "flex-1 px-2 py-2 text-xs font-medium bg-white/10 hover:bg-white/20 rounded-md text-white transition-colors"
9665
9854
  },
9666
9855
  "Cancelar"
9667
- ), /* @__PURE__ */ React18.createElement(
9856
+ ), /* @__PURE__ */ React19.createElement(
9668
9857
  "button",
9669
9858
  {
9670
9859
  onClick: () => onDeleteNodes(data.nodeIds),
9671
9860
  className: "flex-1 px-2 py-2 text-xs font-medium bg-red-500 hover:bg-red-600 rounded-md text-white transition-colors"
9672
9861
  },
9673
9862
  "Excluir"
9674
- ))) : /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React18.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-indigo-400/80 shadow-[0_0_12px_1px_rgba(99,102,241,0.5)]" }), /* @__PURE__ */ React18.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "A\xE7\xF5es em Grupo (", nodeCount, " Nodes)")), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React18.createElement("button", { onClick: () => onDismissNodes(data.nodeIds), className: baseButtonClass, title: "Remover da visualiza\xE7\xE3o" }, /* @__PURE__ */ React18.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }), /* @__PURE__ */ React18.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }), /* @__PURE__ */ React18.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }), /* @__PURE__ */ React18.createElement("line", { x1: "2", y1: "2", x2: "22", y2: "22" })), /* @__PURE__ */ React18.createElement("span", null, "Dismiss (", nodeCount, ")")), /* @__PURE__ */ React18.createElement("button", { onClick: () => onDismissOtherNodes(data.nodeIds), className: baseButtonClass, title: "Remover outros da visualiza\xE7\xE3o" }, /* @__PURE__ */ React18.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18.createElement("circle", { cx: "12", cy: "12", r: "3" }), /* @__PURE__ */ React18.createElement("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }), /* @__PURE__ */ React18.createElement("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React18.createElement("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }), /* @__PURE__ */ React18.createElement("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })), /* @__PURE__ */ React18.createElement("span", null, "Dismiss other nodes")), canDelete && /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React18.createElement("button", { onClick: () => setIsConfirmingDelete(true), className: deleteButtonClass, title: "Excluir Nodes" }, /* @__PURE__ */ React18.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React18.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React18.createElement("line", { x1: "10", y1: "11", x2: "10", y2: "17" }), /* @__PURE__ */ React18.createElement("line", { x1: "14", y1: "11", x2: "14", y2: "17" })), /* @__PURE__ */ React18.createElement("span", null, "Excluir Nodes (", nodeCount, ")"))))))
9863
+ ))) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-indigo-400/80 shadow-[0_0_12px_1px_rgba(99,102,241,0.5)]" }), /* @__PURE__ */ React19.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "A\xE7\xF5es em Grupo (", nodeCount, " Nodes)")), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React19.createElement("button", { onClick: () => onDismissNodes(data.nodeIds), className: baseButtonClass, title: "Remover da visualiza\xE7\xE3o" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }), /* @__PURE__ */ React19.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }), /* @__PURE__ */ React19.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }), /* @__PURE__ */ React19.createElement("line", { x1: "2", y1: "2", x2: "22", y2: "22" })), /* @__PURE__ */ React19.createElement("span", null, "Dismiss (", nodeCount, ")")), /* @__PURE__ */ React19.createElement("button", { onClick: () => onDismissOtherNodes(data.nodeIds), className: baseButtonClass, title: "Remover outros da visualiza\xE7\xE3o" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("circle", { cx: "12", cy: "12", r: "3" }), /* @__PURE__ */ React19.createElement("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }), /* @__PURE__ */ React19.createElement("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React19.createElement("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }), /* @__PURE__ */ React19.createElement("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })), /* @__PURE__ */ React19.createElement("span", null, "Dismiss other nodes")), canDelete && /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React19.createElement("button", { onClick: () => setIsConfirmingDelete(true), className: deleteButtonClass, title: "Excluir Nodes" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React19.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React19.createElement("line", { x1: "10", y1: "11", x2: "10", y2: "17" }), /* @__PURE__ */ React19.createElement("line", { x1: "14", y1: "11", x2: "14", y2: "17" })), /* @__PURE__ */ React19.createElement("span", null, "Excluir Nodes (", nodeCount, ")"))))))
9675
9864
  );
9676
9865
  }
9677
9866
 
9678
9867
  // src/components/RelationshipDetailsPanel.jsx
9679
- import React19, { useState as useState20, useEffect as useEffect18, useRef as useRef16, useMemo as useMemo9 } from "react";
9680
- import { FiPlus as FiPlus8, FiEdit2 as FiEdit29, FiLoader as FiLoader4, FiBookOpen as FiBookOpen5 } from "react-icons/fi";
9868
+ import React20, { useState as useState21, useEffect as useEffect18, useRef as useRef16, useMemo as useMemo9 } from "react";
9869
+ import { FiPlus as FiPlus9, FiEdit2 as FiEdit29, FiLoader as FiLoader4, FiBookOpen as FiBookOpen5 } from "react-icons/fi";
9681
9870
  function RelationshipDetailsPanel({
9682
9871
  link,
9683
9872
  onClose,
@@ -9691,16 +9880,16 @@ function RelationshipDetailsPanel({
9691
9880
  onUploadFile,
9692
9881
  userRole
9693
9882
  }) {
9694
- const [name, setName] = useState20((link == null ? void 0 : link.name) ?? "");
9695
- const [description, setDescription] = useState20((link == null ? void 0 : link.description) ?? "");
9696
- const [customProps, setCustomProps] = useState20(() => extractCustomPropsFromNode(link || {}));
9697
- const [existingSections, setExistingSections] = useState20((link == null ? void 0 : link.description_sections) || []);
9698
- const [sourceLabel, setSourceLabel] = useState20((link == null ? void 0 : link.source_label) ?? "");
9699
- const [targetLabel, setTargetLabel] = useState20((link == null ? void 0 : link.target_label) ?? "");
9700
- const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState20(false);
9701
- const [isSaving, setIsSaving] = useState20(false);
9702
- const [isReadMode, setIsReadMode] = useState20(false);
9703
- const [hasUnsavedChanges, setHasUnsavedChanges] = useState20(false);
9883
+ const [name, setName] = useState21((link == null ? void 0 : link.name) ?? "");
9884
+ const [description, setDescription] = useState21((link == null ? void 0 : link.description) ?? "");
9885
+ const [customProps, setCustomProps] = useState21(() => extractCustomPropsFromNode(link || {}));
9886
+ const [existingSections, setExistingSections] = useState21((link == null ? void 0 : link.description_sections) || []);
9887
+ const [sourceLabel, setSourceLabel] = useState21((link == null ? void 0 : link.source_label) ?? "");
9888
+ const [targetLabel, setTargetLabel] = useState21((link == null ? void 0 : link.target_label) ?? "");
9889
+ const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState21(false);
9890
+ const [isSaving, setIsSaving] = useState21(false);
9891
+ const [isReadMode, setIsReadMode] = useState21(false);
9892
+ const [hasUnsavedChanges, setHasUnsavedChanges] = useState21(false);
9704
9893
  const propsEndRef = useRef16(null);
9705
9894
  const canEdit = useMemo9(() => {
9706
9895
  const ability = defineAbilityFor(userRole);
@@ -9797,7 +9986,7 @@ function RelationshipDetailsPanel({
9797
9986
  onOpenImageViewer([{ name: name2 || "Imagem", value: url }], 0);
9798
9987
  }
9799
9988
  };
9800
- return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
9989
+ return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
9801
9990
  "div",
9802
9991
  {
9803
9992
  className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden transition-all duration-300 ease-out
@@ -9812,7 +10001,7 @@ function RelationshipDetailsPanel({
9812
10001
  onContextMenu: swallow,
9813
10002
  onDoubleClick: swallow
9814
10003
  },
9815
- isReadMode ? /* @__PURE__ */ React19.createElement(
10004
+ isReadMode ? /* @__PURE__ */ React20.createElement(
9816
10005
  DescriptionReadModePanel,
9817
10006
  {
9818
10007
  title: name || "Rela\xE7\xE3o",
@@ -9833,7 +10022,7 @@ function RelationshipDetailsPanel({
9833
10022
  onImageClick: handleImageClickFromText,
9834
10023
  onSaveDescription: handleSaveDescriptionInline
9835
10024
  }
9836
- ) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement("div", { className: "h-[2px] bg-gradient-to-r from-teal-400/0 via-teal-400/70 to-teal-400/0" }), /* @__PURE__ */ React19.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React19.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React19.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-teal-400/80 shadow-[0_0_18px_2px_rgba(45,212,191,0.55)]" }), /* @__PURE__ */ React19.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Rela\xE7\xE3o")), /* @__PURE__ */ React19.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, name || "Rela\xE7\xE3o")), /* @__PURE__ */ React19.createElement("button", { onClick: onClose, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Fechar" }, "\xD7")), /* @__PURE__ */ React19.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React19.createElement("label", { className: "text-xs text-slate-300" }, "Nome da Rela\xE7\xE3o (Opcional)"), /* @__PURE__ */ React19.createElement(
10025
+ ) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", { className: "h-[2px] bg-gradient-to-r from-teal-400/0 via-teal-400/70 to-teal-400/0" }), /* @__PURE__ */ React20.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React20.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-teal-400/80 shadow-[0_0_18px_2px_rgba(45,212,191,0.55)]" }), /* @__PURE__ */ React20.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, name || "Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement("button", { onClick: onClose, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Fechar" }, "\xD7")), /* @__PURE__ */ React20.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React20.createElement("label", { className: "text-xs text-slate-300" }, "Nome da Rela\xE7\xE3o (Opcional)"), /* @__PURE__ */ React20.createElement(
9837
10026
  "input",
9838
10027
  {
9839
10028
  type: "text",
@@ -9848,7 +10037,7 @@ function RelationshipDetailsPanel({
9848
10037
  ${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
9849
10038
  `
9850
10039
  }
9851
- )), /* @__PURE__ */ React19.createElement("div", { className: "rounded-xl border border-white/8 bg-slate-800/30 p-3 space-y-3" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "text-violet-400 flex-shrink-0" }, /* @__PURE__ */ React19.createElement("path", { d: "M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" }), /* @__PURE__ */ React19.createElement("line", { x1: "7", y1: "7", x2: "7.01", y2: "7" })), /* @__PURE__ */ React19.createElement("p", { className: "text-xs font-medium text-violet-300/80 uppercase tracking-wider" }, "Labels de Agrupamento")), /* @__PURE__ */ React19.createElement("p", { className: "text-[11px] text-slate-400 leading-relaxed" }, "Labels agrupam conex\xF5es no menu de Conex\xF5es. Cada lado da conex\xE3o pode ter sua pr\xF3pria label."), /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React19.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React19.createElement("label", { className: "text-[11px] text-slate-400" }, "Label do Source"), /* @__PURE__ */ React19.createElement(
10040
+ )), /* @__PURE__ */ React20.createElement("div", { className: "rounded-xl border border-white/8 bg-slate-800/30 p-3 space-y-3" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "text-violet-400 flex-shrink-0" }, /* @__PURE__ */ React20.createElement("path", { d: "M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" }), /* @__PURE__ */ React20.createElement("line", { x1: "7", y1: "7", x2: "7.01", y2: "7" })), /* @__PURE__ */ React20.createElement("p", { className: "text-xs font-medium text-violet-300/80 uppercase tracking-wider" }, "Labels de Agrupamento")), /* @__PURE__ */ React20.createElement("p", { className: "text-[11px] text-slate-400 leading-relaxed" }, "Labels agrupam conex\xF5es no menu de Conex\xF5es. Cada lado da conex\xE3o pode ter sua pr\xF3pria label."), /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React20.createElement("label", { className: "text-[11px] text-slate-400" }, "Label do Source"), /* @__PURE__ */ React20.createElement(
9852
10041
  "input",
9853
10042
  {
9854
10043
  type: "text",
@@ -9863,7 +10052,7 @@ function RelationshipDetailsPanel({
9863
10052
  ${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
9864
10053
  `
9865
10054
  }
9866
- )), /* @__PURE__ */ React19.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React19.createElement("label", { className: "text-[11px] text-slate-400" }, "Label do Target"), /* @__PURE__ */ React19.createElement(
10055
+ )), /* @__PURE__ */ React20.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React20.createElement("label", { className: "text-[11px] text-slate-400" }, "Label do Target"), /* @__PURE__ */ React20.createElement(
9867
10056
  "input",
9868
10057
  {
9869
10058
  type: "text",
@@ -9878,7 +10067,7 @@ function RelationshipDetailsPanel({
9878
10067
  ${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
9879
10068
  `
9880
10069
  }
9881
- )))), /* @__PURE__ */ React19.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React19.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React19.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React19.createElement(
10070
+ )))), /* @__PURE__ */ React20.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React20.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React20.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React20.createElement(
9882
10071
  DescriptionDisplay,
9883
10072
  {
9884
10073
  description,
@@ -9890,7 +10079,7 @@ function RelationshipDetailsPanel({
9890
10079
  onImageClick: handleImageClickFromText,
9891
10080
  onSaveDescription: handleSaveDescriptionInline
9892
10081
  }
9893
- ), /* @__PURE__ */ React19.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React19.createElement(
10082
+ ), /* @__PURE__ */ React20.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React20.createElement(
9894
10083
  "button",
9895
10084
  {
9896
10085
  type: "button",
@@ -9898,8 +10087,8 @@ function RelationshipDetailsPanel({
9898
10087
  className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors border-r border-white/5",
9899
10088
  title: "Modo de Leitura"
9900
10089
  },
9901
- /* @__PURE__ */ React19.createElement(FiBookOpen5, { size: 14 })
9902
- ), canEdit && /* @__PURE__ */ React19.createElement(
10090
+ /* @__PURE__ */ React20.createElement(FiBookOpen5, { size: 14 })
10091
+ ), canEdit && /* @__PURE__ */ React20.createElement(
9903
10092
  "button",
9904
10093
  {
9905
10094
  type: "button",
@@ -9907,15 +10096,15 @@ function RelationshipDetailsPanel({
9907
10096
  className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors",
9908
10097
  title: "Editar descri\xE7\xE3o"
9909
10098
  },
9910
- /* @__PURE__ */ React19.createElement(FiEdit29, { size: 14 })
9911
- )), !description && canEdit && /* @__PURE__ */ React19.createElement(
10099
+ /* @__PURE__ */ React20.createElement(FiEdit29, { size: 14 })
10100
+ )), !description && canEdit && /* @__PURE__ */ React20.createElement(
9912
10101
  "div",
9913
10102
  {
9914
10103
  onClick: () => setIsDescriptionModalOpen(true),
9915
10104
  className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text"
9916
10105
  },
9917
10106
  "Adicionar descri\xE7\xE3o..."
9918
- ))), /* @__PURE__ */ React19.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React19.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React19.createElement(FiPlus8, { size: 14 }), " Adicionar")), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React19.createElement(
10107
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React20.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React20.createElement(FiPlus9, { size: 14 }), " Adicionar")), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React20.createElement(
9919
10108
  CustomPropertyDisplay,
9920
10109
  {
9921
10110
  key: prop.id,
@@ -9927,7 +10116,7 @@ function RelationshipDetailsPanel({
9927
10116
  onUploadFile,
9928
10117
  disabled: !canEdit
9929
10118
  }
9930
- )), /* @__PURE__ */ React19.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React19.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React19.createElement("button", { onClick: onClose, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React19.createElement(
10119
+ )), /* @__PURE__ */ React20.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React20.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React20.createElement("button", { onClick: onClose, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React20.createElement(
9931
10120
  "button",
9932
10121
  {
9933
10122
  onClick: () => handleSave(false),
@@ -9936,10 +10125,10 @@ function RelationshipDetailsPanel({
9936
10125
  ${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-teal-600 to-teal-400 hover:from-teal-500 hover:to-teal-300 text-white"}
9937
10126
  `
9938
10127
  },
9939
- isSaving && /* @__PURE__ */ React19.createElement(FiLoader4, { className: "animate-spin" }),
10128
+ isSaving && /* @__PURE__ */ React20.createElement(FiLoader4, { className: "animate-spin" }),
9940
10129
  isSaving ? "Salvando..." : "Salvar"
9941
10130
  )))
9942
- ), isDescriptionModalOpen && /* @__PURE__ */ React19.createElement(
10131
+ ), isDescriptionModalOpen && /* @__PURE__ */ React20.createElement(
9943
10132
  DescriptionEditModal,
9944
10133
  {
9945
10134
  isOpen: isDescriptionModalOpen,
@@ -9961,7 +10150,7 @@ function RelationshipDetailsPanel({
9961
10150
  }
9962
10151
 
9963
10152
  // src/components/RelationshipContextMenu.jsx
9964
- import React20, { useLayoutEffect as useLayoutEffect4, useRef as useRef17, useState as useState21, useEffect as useEffect19, useMemo as useMemo10 } from "react";
10153
+ import React21, { useLayoutEffect as useLayoutEffect4, useRef as useRef17, useState as useState22, useEffect as useEffect19, useMemo as useMemo10 } from "react";
9965
10154
  function RelationshipContextMenu({
9966
10155
  data,
9967
10156
  userRole,
@@ -9972,8 +10161,8 @@ function RelationshipContextMenu({
9972
10161
  onClose
9973
10162
  }) {
9974
10163
  const menuRef = useRef17(null);
9975
- const [menuPos, setMenuPos] = useState21({ left: 0, top: 0 });
9976
- const [isConfirmingDelete, setIsConfirmingDelete] = useState21(false);
10164
+ const [menuPos, setMenuPos] = useState22({ left: 0, top: 0 });
10165
+ const [isConfirmingDelete, setIsConfirmingDelete] = useState22(false);
9977
10166
  const ability = useMemo10(() => defineAbilityFor(userRole), [userRole]);
9978
10167
  const sourceName = useMemo10(
9979
10168
  () => {
@@ -10018,7 +10207,7 @@ function RelationshipContextMenu({
10018
10207
  const dangerButtonClass = "w-full flex items-center gap-2.5 px-2 py-1.5 text-left text-sm rounded-md hover:bg-rose-500/20 text-rose-300 hover:text-rose-100 transition-colors duration-150 truncate";
10019
10208
  const canUpdate = ability.can("update", "Connection");
10020
10209
  const canDelete = ability.can("delete", "Connection");
10021
- return /* @__PURE__ */ React20.createElement(
10210
+ return /* @__PURE__ */ React21.createElement(
10022
10211
  "div",
10023
10212
  {
10024
10213
  ref: menuRef,
@@ -10032,29 +10221,29 @@ function RelationshipContextMenu({
10032
10221
  onContextMenu: swallow,
10033
10222
  onDoubleClick: swallow
10034
10223
  },
10035
- /* @__PURE__ */ React20.createElement("div", { className: "h-[2px] bg-gradient-to-r from-teal-400/0 via-teal-400/70 to-teal-400/0" }),
10036
- /* @__PURE__ */ React20.createElement("div", { className: "p-1.5" }, isConfirmingDelete ? /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-3 p-2" }, /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col items-center text-center gap-2" }, /* @__PURE__ */ React20.createElement("div", { className: "w-10 h-10 rounded-full bg-rose-500/20 flex items-center justify-center text-rose-400 mb-1" }, /* @__PURE__ */ React20.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React20.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React20.createElement("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), /* @__PURE__ */ React20.createElement("path", { d: "M10 11v6" }), /* @__PURE__ */ React20.createElement("path", { d: "M14 11v6" }), /* @__PURE__ */ React20.createElement("path", { d: "M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }))), /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-slate-200" }, "Excluir rela\xE7\xE3o?"), /* @__PURE__ */ React20.createElement("p", { className: "text-[11px] text-slate-400 leading-tight break-words" }, "Desconectar ", /* @__PURE__ */ React20.createElement("strong", null, sourceName), " de ", /* @__PURE__ */ React20.createElement("strong", null, targetName), ".")), /* @__PURE__ */ React20.createElement("div", { className: "flex gap-2 mt-1" }, /* @__PURE__ */ React20.createElement(
10224
+ /* @__PURE__ */ React21.createElement("div", { className: "h-[2px] bg-gradient-to-r from-teal-400/0 via-teal-400/70 to-teal-400/0" }),
10225
+ /* @__PURE__ */ React21.createElement("div", { className: "p-1.5" }, isConfirmingDelete ? /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-3 p-2" }, /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col items-center text-center gap-2" }, /* @__PURE__ */ React21.createElement("div", { className: "w-10 h-10 rounded-full bg-rose-500/20 flex items-center justify-center text-rose-400 mb-1" }, /* @__PURE__ */ React21.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React21.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React21.createElement("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), /* @__PURE__ */ React21.createElement("path", { d: "M10 11v6" }), /* @__PURE__ */ React21.createElement("path", { d: "M14 11v6" }), /* @__PURE__ */ React21.createElement("path", { d: "M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }))), /* @__PURE__ */ React21.createElement("p", { className: "text-sm text-slate-200" }, "Excluir rela\xE7\xE3o?"), /* @__PURE__ */ React21.createElement("p", { className: "text-[11px] text-slate-400 leading-tight break-words" }, "Desconectar ", /* @__PURE__ */ React21.createElement("strong", null, sourceName), " de ", /* @__PURE__ */ React21.createElement("strong", null, targetName), ".")), /* @__PURE__ */ React21.createElement("div", { className: "flex gap-2 mt-1" }, /* @__PURE__ */ React21.createElement(
10037
10226
  "button",
10038
10227
  {
10039
10228
  onClick: () => setIsConfirmingDelete(false),
10040
10229
  className: "flex-1 px-2 py-2 text-xs font-medium bg-white/10 hover:bg-white/20 rounded-md text-white transition-colors"
10041
10230
  },
10042
10231
  "Cancelar"
10043
- ), /* @__PURE__ */ React20.createElement(
10232
+ ), /* @__PURE__ */ React21.createElement(
10044
10233
  "button",
10045
10234
  {
10046
10235
  onClick: () => onDelete == null ? void 0 : onDelete(data.linkObject),
10047
10236
  className: "flex-1 px-2 py-2 text-xs font-medium bg-rose-600 hover:bg-rose-500 rounded-md text-white transition-colors"
10048
10237
  },
10049
10238
  "Excluir"
10050
- ))) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-teal-400/80 shadow-[0_0_12px_1px_rgba(45,212,191,0.5)]" }), /* @__PURE__ */ React20.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-1" }, canUpdate && /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
10239
+ ))) : /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React21.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-teal-400/80 shadow-[0_0_12px_1px_rgba(45,212,191,0.5)]" }), /* @__PURE__ */ React21.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "Rela\xE7\xE3o")), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-1" }, canUpdate && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
10051
10240
  "button",
10052
10241
  {
10053
10242
  onClick: () => onRelinkSource == null ? void 0 : onRelinkSource(data.linkObject),
10054
10243
  className: baseButtonClass,
10055
10244
  title: "Desconectar ponta ligada ao Source"
10056
10245
  },
10057
- /* @__PURE__ */ React20.createElement(
10246
+ /* @__PURE__ */ React21.createElement(
10058
10247
  "svg",
10059
10248
  {
10060
10249
  xmlns: "http://www.w3.org/2000/svg",
@@ -10067,18 +10256,18 @@ function RelationshipContextMenu({
10067
10256
  strokeLinecap: "round",
10068
10257
  strokeLinejoin: "round"
10069
10258
  },
10070
- /* @__PURE__ */ React20.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }),
10071
- /* @__PURE__ */ React20.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })
10259
+ /* @__PURE__ */ React21.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }),
10260
+ /* @__PURE__ */ React21.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })
10072
10261
  ),
10073
- /* @__PURE__ */ React20.createElement("span", null, "Desconectar Source (", sourceName, ")")
10074
- ), /* @__PURE__ */ React20.createElement(
10262
+ /* @__PURE__ */ React21.createElement("span", null, "Desconectar Source (", sourceName, ")")
10263
+ ), /* @__PURE__ */ React21.createElement(
10075
10264
  "button",
10076
10265
  {
10077
10266
  onClick: () => onRelinkTarget == null ? void 0 : onRelinkTarget(data.linkObject),
10078
10267
  className: baseButtonClass,
10079
10268
  title: "Desconectar ponta ligada ao Target"
10080
10269
  },
10081
- /* @__PURE__ */ React20.createElement(
10270
+ /* @__PURE__ */ React21.createElement(
10082
10271
  "svg",
10083
10272
  {
10084
10273
  xmlns: "http://www.w3.org/2000/svg",
@@ -10091,21 +10280,21 @@ function RelationshipContextMenu({
10091
10280
  strokeLinecap: "round",
10092
10281
  strokeLinejoin: "round"
10093
10282
  },
10094
- /* @__PURE__ */ React20.createElement("polyline", { points: "16 3 21 3 21 8" }),
10095
- /* @__PURE__ */ React20.createElement("line", { x1: "4", y1: "20", x2: "21", y2: "3" }),
10096
- /* @__PURE__ */ React20.createElement("polyline", { points: "21 16 21 21 16 21" }),
10097
- /* @__PURE__ */ React20.createElement("line", { x1: "15", y1: "15", x2: "21", y2: "21" }),
10098
- /* @__PURE__ */ React20.createElement("line", { x1: "4", y1: "4", x2: "9", y2: "9" })
10283
+ /* @__PURE__ */ React21.createElement("polyline", { points: "16 3 21 3 21 8" }),
10284
+ /* @__PURE__ */ React21.createElement("line", { x1: "4", y1: "20", x2: "21", y2: "3" }),
10285
+ /* @__PURE__ */ React21.createElement("polyline", { points: "21 16 21 21 16 21" }),
10286
+ /* @__PURE__ */ React21.createElement("line", { x1: "15", y1: "15", x2: "21", y2: "21" }),
10287
+ /* @__PURE__ */ React21.createElement("line", { x1: "4", y1: "4", x2: "9", y2: "9" })
10099
10288
  ),
10100
- /* @__PURE__ */ React20.createElement("span", null, "Desconectar Target (", targetName, ")")
10101
- ), /* @__PURE__ */ React20.createElement("div", { className: "h-[1px] my-1 mx-1 bg-white/10" })), /* @__PURE__ */ React20.createElement(
10289
+ /* @__PURE__ */ React21.createElement("span", null, "Desconectar Target (", targetName, ")")
10290
+ ), /* @__PURE__ */ React21.createElement("div", { className: "h-[1px] my-1 mx-1 bg-white/10" })), /* @__PURE__ */ React21.createElement(
10102
10291
  "button",
10103
10292
  {
10104
10293
  onClick: () => onOpenDetails == null ? void 0 : onOpenDetails(data.linkObject),
10105
10294
  className: baseButtonClass,
10106
10295
  title: "Abrir detalhes da rela\xE7\xE3o"
10107
10296
  },
10108
- /* @__PURE__ */ React20.createElement(
10297
+ /* @__PURE__ */ React21.createElement(
10109
10298
  "svg",
10110
10299
  {
10111
10300
  xmlns: "http://www.w3.org/2000/svg",
@@ -10118,19 +10307,19 @@ function RelationshipContextMenu({
10118
10307
  strokeLinecap: "round",
10119
10308
  strokeLinejoin: "round"
10120
10309
  },
10121
- /* @__PURE__ */ React20.createElement("circle", { cx: "12", cy: "12", r: "10" }),
10122
- /* @__PURE__ */ React20.createElement("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
10123
- /* @__PURE__ */ React20.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "8" })
10310
+ /* @__PURE__ */ React21.createElement("circle", { cx: "12", cy: "12", r: "10" }),
10311
+ /* @__PURE__ */ React21.createElement("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
10312
+ /* @__PURE__ */ React21.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "8" })
10124
10313
  ),
10125
- /* @__PURE__ */ React20.createElement("span", null, "Abrir Detalhes")
10126
- ), canDelete && /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", { className: "h-[1px] my-1 mx-1 bg-white/10" }), /* @__PURE__ */ React20.createElement(
10314
+ /* @__PURE__ */ React21.createElement("span", null, "Abrir Detalhes")
10315
+ ), canDelete && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "h-[1px] my-1 mx-1 bg-white/10" }), /* @__PURE__ */ React21.createElement(
10127
10316
  "button",
10128
10317
  {
10129
10318
  onClick: () => setIsConfirmingDelete(true),
10130
10319
  className: dangerButtonClass,
10131
10320
  title: "Excluir esta conex\xE3o"
10132
10321
  },
10133
- /* @__PURE__ */ React20.createElement(
10322
+ /* @__PURE__ */ React21.createElement(
10134
10323
  "svg",
10135
10324
  {
10136
10325
  xmlns: "http://www.w3.org/2000/svg",
@@ -10143,19 +10332,19 @@ function RelationshipContextMenu({
10143
10332
  strokeLinecap: "round",
10144
10333
  strokeLinejoin: "round"
10145
10334
  },
10146
- /* @__PURE__ */ React20.createElement("polyline", { points: "3 6 5 6 21 6" }),
10147
- /* @__PURE__ */ React20.createElement("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }),
10148
- /* @__PURE__ */ React20.createElement("path", { d: "M10 11v6" }),
10149
- /* @__PURE__ */ React20.createElement("path", { d: "M14 11v6" }),
10150
- /* @__PURE__ */ React20.createElement("path", { d: "M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
10335
+ /* @__PURE__ */ React21.createElement("polyline", { points: "3 6 5 6 21 6" }),
10336
+ /* @__PURE__ */ React21.createElement("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }),
10337
+ /* @__PURE__ */ React21.createElement("path", { d: "M10 11v6" }),
10338
+ /* @__PURE__ */ React21.createElement("path", { d: "M14 11v6" }),
10339
+ /* @__PURE__ */ React21.createElement("path", { d: "M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
10151
10340
  ),
10152
- /* @__PURE__ */ React20.createElement("span", null, "Excluir conex\xE3o (", sourceName, " \u2192 ", targetName, ")")
10341
+ /* @__PURE__ */ React21.createElement("span", null, "Excluir conex\xE3o (", sourceName, " \u2192 ", targetName, ")")
10153
10342
  )))))
10154
10343
  );
10155
10344
  }
10156
10345
 
10157
10346
  // src/components/LoadingScreen.jsx
10158
- import React21 from "react";
10347
+ import React22 from "react";
10159
10348
  var styles = {
10160
10349
  loadingOverlay: {
10161
10350
  position: "fixed",
@@ -10187,11 +10376,11 @@ var styles = {
10187
10376
  `
10188
10377
  };
10189
10378
  function LoadingScreen() {
10190
- return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("style", null, styles.keyframes), /* @__PURE__ */ React21.createElement("div", { style: styles.loadingOverlay }, /* @__PURE__ */ React21.createElement("div", { style: styles.spinner })));
10379
+ return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("style", null, styles.keyframes), /* @__PURE__ */ React22.createElement("div", { style: styles.loadingOverlay }, /* @__PURE__ */ React22.createElement("div", { style: styles.spinner })));
10191
10380
  }
10192
10381
 
10193
10382
  // src/components/ImportParentFileModal.jsx
10194
- import React22, { useEffect as useEffect20, useState as useState22 } from "react";
10383
+ import React23, { useEffect as useEffect20, useState as useState23 } from "react";
10195
10384
  function ImportParentFileModal({
10196
10385
  isOpen,
10197
10386
  onClose,
@@ -10202,11 +10391,11 @@ function ImportParentFileModal({
10202
10391
  onFetchAvailableFiles,
10203
10392
  currentViewName
10204
10393
  }) {
10205
- const [activeTab, setActiveTab] = useState22("databases");
10206
- const [availableDbs, setAvailableDbs] = useState22([]);
10207
- const [availableViews, setAvailableViews] = useState22([]);
10208
- const [selectedItem, setSelectedItem] = useState22(null);
10209
- const [isLoading, setIsLoading] = useState22(false);
10394
+ const [activeTab, setActiveTab] = useState23("databases");
10395
+ const [availableDbs, setAvailableDbs] = useState23([]);
10396
+ const [availableViews, setAvailableViews] = useState23([]);
10397
+ const [selectedItem, setSelectedItem] = useState23(null);
10398
+ const [isLoading, setIsLoading] = useState23(false);
10210
10399
  useEffect20(() => {
10211
10400
  if (isOpen && session && onFetchAvailableFiles) {
10212
10401
  const fetchData = async () => {
@@ -10272,13 +10461,13 @@ function ImportParentFileModal({
10272
10461
  const swallow = (e) => e.stopPropagation();
10273
10462
  const currentList = activeTab === "databases" ? availableDbs : availableViews;
10274
10463
  const emptyMessage = activeTab === "databases" ? "Nenhum novo arquivo parent dispon\xEDvel." : "Nenhuma view dispon\xEDvel para importa\xE7\xE3o.";
10275
- return /* @__PURE__ */ React22.createElement(
10464
+ return /* @__PURE__ */ React23.createElement(
10276
10465
  "div",
10277
10466
  {
10278
10467
  className: "ui-overlay fixed inset-0 z-[1200] flex items-center justify-center bg-black/60 backdrop-blur-sm",
10279
10468
  onClick: onClose
10280
10469
  },
10281
- /* @__PURE__ */ React22.createElement(
10470
+ /* @__PURE__ */ React23.createElement(
10282
10471
  "div",
10283
10472
  {
10284
10473
  className: "ui-overlay relative rounded-2xl border border-white/10 bg-slate-950/80 shadow-[0_20px_80px_rgba(0,0,0,0.6)] text-white w-[min(92vw,500px)] flex flex-col max-h-[85vh]",
@@ -10290,14 +10479,14 @@ function ImportParentFileModal({
10290
10479
  onContextMenu: swallow,
10291
10480
  onDoubleClick: swallow
10292
10481
  },
10293
- /* @__PURE__ */ React22.createElement("div", { className: "flex items-center justify-between px-6 py-4 border-b border-white/10 flex-shrink-0" }, /* @__PURE__ */ React22.createElement("h2", { className: "text-lg font-semibold" }, "Importar"), /* @__PURE__ */ React22.createElement(
10482
+ /* @__PURE__ */ React23.createElement("div", { className: "flex items-center justify-between px-6 py-4 border-b border-white/10 flex-shrink-0" }, /* @__PURE__ */ React23.createElement("h2", { className: "text-lg font-semibold" }, "Importar"), /* @__PURE__ */ React23.createElement(
10294
10483
  "button",
10295
10484
  {
10296
10485
  onClick: onClose,
10297
10486
  className: "p-2 rounded-md text-slate-400 hover:text-white hover:bg-white/10 transition-colors",
10298
10487
  title: "Fechar"
10299
10488
  },
10300
- /* @__PURE__ */ React22.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React22.createElement(
10489
+ /* @__PURE__ */ React23.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React23.createElement(
10301
10490
  "path",
10302
10491
  {
10303
10492
  fillRule: "evenodd",
@@ -10306,14 +10495,14 @@ function ImportParentFileModal({
10306
10495
  }
10307
10496
  ))
10308
10497
  )),
10309
- /* @__PURE__ */ React22.createElement("div", { className: "flex px-6 border-b border-white/10 bg-white/5 flex-shrink-0" }, /* @__PURE__ */ React22.createElement(
10498
+ /* @__PURE__ */ React23.createElement("div", { className: "flex px-6 border-b border-white/10 bg-white/5 flex-shrink-0" }, /* @__PURE__ */ React23.createElement(
10310
10499
  "button",
10311
10500
  {
10312
10501
  onClick: () => setActiveTab("databases"),
10313
10502
  className: `flex-1 py-3 text-sm font-medium border-b-2 transition-colors ${activeTab === "databases" ? "border-indigo-500 text-white" : "border-transparent text-slate-400 hover:text-slate-200"}`
10314
10503
  },
10315
10504
  "Arquivos Parent"
10316
- ), /* @__PURE__ */ React22.createElement(
10505
+ ), /* @__PURE__ */ React23.createElement(
10317
10506
  "button",
10318
10507
  {
10319
10508
  onClick: () => setActiveTab("views"),
@@ -10321,24 +10510,24 @@ function ImportParentFileModal({
10321
10510
  },
10322
10511
  "Views (Ancestralidades)"
10323
10512
  )),
10324
- /* @__PURE__ */ React22.createElement("div", { className: "p-6 overflow-y-auto custom-scrollbar flex-grow min-h-[200px]" }, isLoading ? /* @__PURE__ */ React22.createElement("div", { className: "flex items-center justify-center h-40" }, /* @__PURE__ */ React22.createElement("div", { className: "w-8 h-8 border-4 border-t-indigo-500 border-slate-700 rounded-full animate-spin" })) : /* @__PURE__ */ React22.createElement("div", { className: "space-y-2" }, currentList.length > 0 ? currentList.map((item) => /* @__PURE__ */ React22.createElement(
10513
+ /* @__PURE__ */ React23.createElement("div", { className: "p-6 overflow-y-auto custom-scrollbar flex-grow min-h-[200px]" }, isLoading ? /* @__PURE__ */ React23.createElement("div", { className: "flex items-center justify-center h-40" }, /* @__PURE__ */ React23.createElement("div", { className: "w-8 h-8 border-4 border-t-indigo-500 border-slate-700 rounded-full animate-spin" })) : /* @__PURE__ */ React23.createElement("div", { className: "space-y-2" }, currentList.length > 0 ? currentList.map((item) => /* @__PURE__ */ React23.createElement(
10325
10514
  "div",
10326
10515
  {
10327
10516
  key: item.id,
10328
10517
  onClick: () => setSelectedItem(item),
10329
10518
  className: `px-4 py-3 rounded-lg border cursor-pointer transition-all duration-150 flex flex-col gap-1 ${(selectedItem == null ? void 0 : selectedItem.id) === item.id ? "bg-indigo-600 border-indigo-500 shadow-lg" : "bg-slate-800/60 border-white/10 hover:border-white/20 hover:bg-slate-800"}`
10330
10519
  },
10331
- /* @__PURE__ */ React22.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React22.createElement("span", { className: "font-medium text-slate-100" }, item.name), activeTab === "views" && /* @__PURE__ */ React22.createElement("span", { className: "text-[10px] px-1.5 py-0.5 rounded bg-black/30 text-indigo-300 border border-indigo-500/30" }, "VIEW")),
10332
- item.description && /* @__PURE__ */ React22.createElement("p", { className: `text-xs ${(selectedItem == null ? void 0 : selectedItem.id) === item.id ? "text-indigo-200" : "text-slate-400"}` }, item.description)
10333
- )) : /* @__PURE__ */ React22.createElement("p", { className: "text-slate-400 text-center py-10" }, emptyMessage))),
10334
- /* @__PURE__ */ React22.createElement("div", { className: "px-6 py-4 border-t border-white/10 flex justify-end gap-3 flex-shrink-0 bg-slate-900/50" }, /* @__PURE__ */ React22.createElement(
10520
+ /* @__PURE__ */ React23.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React23.createElement("span", { className: "font-medium text-slate-100" }, item.name), activeTab === "views" && /* @__PURE__ */ React23.createElement("span", { className: "text-[10px] px-1.5 py-0.5 rounded bg-black/30 text-indigo-300 border border-indigo-500/30" }, "VIEW")),
10521
+ item.description && /* @__PURE__ */ React23.createElement("p", { className: `text-xs ${(selectedItem == null ? void 0 : selectedItem.id) === item.id ? "text-indigo-200" : "text-slate-400"}` }, item.description)
10522
+ )) : /* @__PURE__ */ React23.createElement("p", { className: "text-slate-400 text-center py-10" }, emptyMessage))),
10523
+ /* @__PURE__ */ React23.createElement("div", { className: "px-6 py-4 border-t border-white/10 flex justify-end gap-3 flex-shrink-0 bg-slate-900/50" }, /* @__PURE__ */ React23.createElement(
10335
10524
  "button",
10336
10525
  {
10337
10526
  onClick: onClose,
10338
10527
  className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm text-slate-300"
10339
10528
  },
10340
10529
  "Cancelar"
10341
- ), /* @__PURE__ */ React22.createElement(
10530
+ ), /* @__PURE__ */ React23.createElement(
10342
10531
  "button",
10343
10532
  {
10344
10533
  onClick: handleConfirm,
@@ -10352,7 +10541,7 @@ function ImportParentFileModal({
10352
10541
  }
10353
10542
 
10354
10543
  // src/components/AncestryLinkDetailsPanel.jsx
10355
- import React23, { useState as useState23 } from "react";
10544
+ import React24, { useState as useState24 } from "react";
10356
10545
  import { FiBookOpen as FiBookOpen6 } from "react-icons/fi";
10357
10546
  function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenReference, onMentionClick, onUploadFile }) {
10358
10547
  var _a, _b, _c, _d;
@@ -10362,21 +10551,21 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
10362
10551
  const customProps = extractCustomPropsFromNode(relationshipData);
10363
10552
  const sourceName = ((_b = (_a = data.sourceNode) == null ? void 0 : _a.userData) == null ? void 0 : _b.name) || "Origem";
10364
10553
  const targetName = ((_d = (_c = data.targetNode) == null ? void 0 : _c.userData) == null ? void 0 : _d.name) || "Destino";
10365
- const [isReadMode, setIsReadMode] = useState23(false);
10554
+ const [isReadMode, setIsReadMode] = useState24(false);
10366
10555
  const swallow = (e) => e.stopPropagation();
10367
10556
  const handleImageClickFromText = (url, name) => {
10368
10557
  if (onOpenImageViewer) {
10369
10558
  onOpenImageViewer([{ name: name || "Imagem", value: url }], 0);
10370
10559
  }
10371
10560
  };
10372
- return /* @__PURE__ */ React23.createElement(
10561
+ return /* @__PURE__ */ React24.createElement(
10373
10562
  "div",
10374
10563
  {
10375
10564
  className: "ui-overlay fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-[1200]",
10376
10565
  onClick: onClose,
10377
10566
  onPointerDown: swallow
10378
10567
  },
10379
- /* @__PURE__ */ React23.createElement(
10568
+ /* @__PURE__ */ React24.createElement(
10380
10569
  "div",
10381
10570
  {
10382
10571
  className: `relative group rounded-2xl border border-white/10 bg-slate-950/80 shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col max-h-[calc(100vh-4rem)] transition-all duration-300 ease-out
@@ -10384,7 +10573,7 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
10384
10573
  `,
10385
10574
  onClick: swallow
10386
10575
  },
10387
- isReadMode ? /* @__PURE__ */ React23.createElement(
10576
+ isReadMode ? /* @__PURE__ */ React24.createElement(
10388
10577
  DescriptionReadModePanel,
10389
10578
  {
10390
10579
  title: `${sourceName} \u2794 ${targetName}`,
@@ -10396,15 +10585,15 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
10396
10585
  onMentionClick,
10397
10586
  onImageClick: handleImageClickFromText
10398
10587
  }
10399
- ) : /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", { className: "h-[2px] bg-gradient-to-r from-blue-500/0 via-blue-500/70 to-blue-500/0" }), /* @__PURE__ */ React23.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React23.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React23.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React23.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-blue-500/80 shadow-[0_0_18px_2px_rgba(59,130,246,0.55)]" }), /* @__PURE__ */ React23.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Ancestralidade")), /* @__PURE__ */ React23.createElement("h2", { className: "text-lg font-semibold tracking-tight flex items-center gap-2" }, /* @__PURE__ */ React23.createElement("span", { className: "truncate max-w-[150px]" }, sourceName), /* @__PURE__ */ React23.createElement("span", { className: "text-slate-500 text-sm" }, "\u2794"), /* @__PURE__ */ React23.createElement("span", { className: "truncate max-w-[150px]" }, targetName))), /* @__PURE__ */ React23.createElement("button", { onClick: onClose, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl", title: "Fechar" }, "\xD7")), /* @__PURE__ */ React23.createElement("div", { className: "px-6 pb-6 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, description && /* @__PURE__ */ React23.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React23.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React23.createElement("label", { className: "text-xs text-slate-300 font-medium" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React23.createElement(
10588
+ ) : /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", { className: "h-[2px] bg-gradient-to-r from-blue-500/0 via-blue-500/70 to-blue-500/0" }), /* @__PURE__ */ React24.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React24.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React24.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-blue-500/80 shadow-[0_0_18px_2px_rgba(59,130,246,0.55)]" }), /* @__PURE__ */ React24.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Ancestralidade")), /* @__PURE__ */ React24.createElement("h2", { className: "text-lg font-semibold tracking-tight flex items-center gap-2" }, /* @__PURE__ */ React24.createElement("span", { className: "truncate max-w-[150px]" }, sourceName), /* @__PURE__ */ React24.createElement("span", { className: "text-slate-500 text-sm" }, "\u2794"), /* @__PURE__ */ React24.createElement("span", { className: "truncate max-w-[150px]" }, targetName))), /* @__PURE__ */ React24.createElement("button", { onClick: onClose, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl", title: "Fechar" }, "\xD7")), /* @__PURE__ */ React24.createElement("div", { className: "px-6 pb-6 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, description && /* @__PURE__ */ React24.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React24.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React24.createElement("label", { className: "text-xs text-slate-300 font-medium" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React24.createElement(
10400
10589
  "button",
10401
10590
  {
10402
10591
  onClick: () => setIsReadMode(true),
10403
10592
  className: "p-1 text-slate-400 hover:text-white transition-colors",
10404
10593
  title: "Modo de Leitura"
10405
10594
  },
10406
- /* @__PURE__ */ React23.createElement(FiBookOpen6, { size: 14 })
10407
- )), /* @__PURE__ */ React23.createElement("div", { className: "bg-slate-800/40 rounded-lg border border-white/10 p-1 relative group" }, /* @__PURE__ */ React23.createElement(
10595
+ /* @__PURE__ */ React24.createElement(FiBookOpen6, { size: 14 })
10596
+ )), /* @__PURE__ */ React24.createElement("div", { className: "bg-slate-800/40 rounded-lg border border-white/10 p-1 relative group" }, /* @__PURE__ */ React24.createElement(
10408
10597
  DescriptionDisplay,
10409
10598
  {
10410
10599
  description,
@@ -10413,7 +10602,7 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
10413
10602
  onMentionClick,
10414
10603
  onImageClick: handleImageClickFromText
10415
10604
  }
10416
- ))), customProps.length > 0 && /* @__PURE__ */ React23.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React23.createElement("label", { className: "text-xs text-slate-300 font-medium mb-2 block" }, "Propriedades"), /* @__PURE__ */ React23.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop) => /* @__PURE__ */ React23.createElement(
10605
+ ))), customProps.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React24.createElement("label", { className: "text-xs text-slate-300 font-medium mb-2 block" }, "Propriedades"), /* @__PURE__ */ React24.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop) => /* @__PURE__ */ React24.createElement(
10417
10606
  CustomPropertyDisplay,
10418
10607
  {
10419
10608
  key: prop.id,
@@ -10422,25 +10611,25 @@ function AncestryLinkDetailsPanel({ data, onClose, onOpenImageViewer, onOpenRefe
10422
10611
  onOpenImageViewer,
10423
10612
  onUploadFile
10424
10613
  }
10425
- )))), !description && customProps.length === 0 && /* @__PURE__ */ React23.createElement("div", { className: "py-8 text-center text-slate-500 text-sm italic border border-dashed border-white/10 rounded-lg" }, "Nenhum detalhe adicional dispon\xEDvel para esta conex\xE3o."), /* @__PURE__ */ React23.createElement("div", { className: "mt-4 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg text-xs text-blue-200/80 text-center" }, 'Para editar esta conex\xE3o, utilize o menu "Editar Ancestralidade".')))
10614
+ )))), !description && customProps.length === 0 && /* @__PURE__ */ React24.createElement("div", { className: "py-8 text-center text-slate-500 text-sm italic border border-dashed border-white/10 rounded-lg" }, "Nenhum detalhe adicional dispon\xEDvel para esta conex\xE3o."), /* @__PURE__ */ React24.createElement("div", { className: "mt-4 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg text-xs text-blue-200/80 text-center" }, 'Para editar esta conex\xE3o, utilize o menu "Editar Ancestralidade".')))
10426
10615
  )
10427
10616
  );
10428
10617
  }
10429
10618
 
10430
10619
  // src/components/AncestryBoard.jsx
10431
- import React24, { useState as useState24, useMemo as useMemo11, useEffect as useEffect21, useRef as useRef18 } from "react";
10620
+ import React25, { useState as useState25, useMemo as useMemo11, useEffect as useEffect21, useRef as useRef18 } from "react";
10432
10621
  import {
10433
- FiSearch as FiSearch6,
10622
+ FiSearch as FiSearch7,
10434
10623
  FiLayers as FiLayers6,
10435
10624
  FiCornerUpRight as FiCornerUpRight4,
10436
10625
  FiPlay,
10437
- FiPlus as FiPlus9,
10626
+ FiPlus as FiPlus10,
10438
10627
  FiTrash2 as FiTrash23,
10439
10628
  FiArrowLeft as FiArrowLeft3,
10440
10629
  FiArrowRight,
10441
10630
  FiCheckCircle,
10442
10631
  FiLoader as FiLoader5,
10443
- FiX as FiX7,
10632
+ FiX as FiX8,
10444
10633
  FiAlertTriangle
10445
10634
  } from "react-icons/fi";
10446
10635
  var GroupItem = ({
@@ -10472,7 +10661,7 @@ var GroupItem = ({
10472
10661
  useEffect21(() => {
10473
10662
  adjustHeight();
10474
10663
  }, [group.text]);
10475
- return /* @__PURE__ */ React24.createElement("div", { className: "flex flex-col gap-2 mb-3 pl-3 border-l border-white/10 relative group/item animate-in fade-in slide-in-from-left-2 duration-300" }, /* @__PURE__ */ React24.createElement("div", { className: "absolute -left-[1px] top-4 w-2 h-px bg-white/20" }), /* @__PURE__ */ React24.createElement(
10664
+ return /* @__PURE__ */ React25.createElement("div", { className: "flex flex-col gap-2 mb-3 pl-3 border-l border-white/10 relative group/item animate-in fade-in slide-in-from-left-2 duration-300" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute -left-[1px] top-4 w-2 h-px bg-white/20" }), /* @__PURE__ */ React25.createElement(
10476
10665
  "div",
10477
10666
  {
10478
10667
  className: `
@@ -10480,7 +10669,7 @@ var GroupItem = ({
10480
10669
  ${isPickingForThisGroup ? "bg-indigo-500/10 border-l-2 border-indigo-500" : "hover:bg-white/5 border-l-2 border-transparent hover:border-white/20"}
10481
10670
  `
10482
10671
  },
10483
- /* @__PURE__ */ React24.createElement(
10672
+ /* @__PURE__ */ React25.createElement(
10484
10673
  "textarea",
10485
10674
  {
10486
10675
  ref: textareaRef,
@@ -10498,9 +10687,9 @@ var GroupItem = ({
10498
10687
  }
10499
10688
  }
10500
10689
  ),
10501
- group.ancestries && group.ancestries.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "flex flex-wrap gap-2 mt-1" }, group.ancestries.map((anc) => {
10690
+ group.ancestries && group.ancestries.length > 0 && /* @__PURE__ */ React25.createElement("div", { className: "flex flex-wrap gap-2 mt-1" }, group.ancestries.map((anc) => {
10502
10691
  const isValid = availableIds.has(String(anc.ancestry_id));
10503
- return /* @__PURE__ */ React24.createElement(
10692
+ return /* @__PURE__ */ React25.createElement(
10504
10693
  "div",
10505
10694
  {
10506
10695
  key: anc.ancestry_id,
@@ -10512,40 +10701,40 @@ var GroupItem = ({
10512
10701
  },
10513
10702
  isValid ? (
10514
10703
  // [MANTIDO] Botão Play visível para todos
10515
- /* @__PURE__ */ React24.createElement(
10704
+ /* @__PURE__ */ React25.createElement(
10516
10705
  "button",
10517
10706
  {
10518
10707
  onClick: () => onPlayAncestry(anc.ancestry_id),
10519
10708
  className: "text-indigo-400 hover:text-white hover:bg-indigo-500 p-1 rounded-full transition-colors",
10520
10709
  title: "Renderizar no cen\xE1rio"
10521
10710
  },
10522
- /* @__PURE__ */ React24.createElement(FiPlay, { size: 10, className: "ml-0.5 fill-current" })
10711
+ /* @__PURE__ */ React25.createElement(FiPlay, { size: 10, className: "ml-0.5 fill-current" })
10523
10712
  )
10524
- ) : /* @__PURE__ */ React24.createElement("div", { className: "p-1 text-red-500 cursor-not-allowed" }, /* @__PURE__ */ React24.createElement(FiAlertTriangle, { size: 10 })),
10525
- /* @__PURE__ */ React24.createElement(
10713
+ ) : /* @__PURE__ */ React25.createElement("div", { className: "p-1 text-red-500 cursor-not-allowed" }, /* @__PURE__ */ React25.createElement(FiAlertTriangle, { size: 10 })),
10714
+ /* @__PURE__ */ React25.createElement(
10526
10715
  "span",
10527
10716
  {
10528
10717
  className: `font-medium truncate max-w-[150px] ${!isValid && "line-through decoration-red-500/50"}`
10529
10718
  },
10530
10719
  anc.name
10531
10720
  ),
10532
- canEdit && /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
10721
+ canEdit && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
10533
10722
  "div",
10534
10723
  {
10535
10724
  className: `w-px h-3 mx-0.5 ${isValid ? "bg-white/10" : "bg-red-500/20"}`
10536
10725
  }
10537
- ), /* @__PURE__ */ React24.createElement(
10726
+ ), /* @__PURE__ */ React25.createElement(
10538
10727
  "button",
10539
10728
  {
10540
10729
  onClick: () => onRemoveAncestry(group.id, anc.ancestry_id),
10541
10730
  className: `${isValid ? "text-slate-500 hover:text-red-400" : "text-red-400 hover:text-red-200"} p-0.5 rounded transition-colors`,
10542
10731
  title: "Remover men\xE7\xE3o"
10543
10732
  },
10544
- /* @__PURE__ */ React24.createElement(FiX7, { size: 12 })
10733
+ /* @__PURE__ */ React25.createElement(FiX8, { size: 12 })
10545
10734
  ))
10546
10735
  );
10547
10736
  })),
10548
- canEdit && /* @__PURE__ */ React24.createElement("div", { className: "flex items-center justify-between pt-2 mt-1 border-t border-white/5 opacity-40 group-hover/item:opacity-100 transition-opacity" }, /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React24.createElement(
10737
+ canEdit && /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between pt-2 mt-1 border-t border-white/5 opacity-40 group-hover/item:opacity-100 transition-opacity" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React25.createElement(
10549
10738
  "button",
10550
10739
  {
10551
10740
  onClick: () => onRequestPickAncestry(group.id),
@@ -10555,17 +10744,17 @@ var GroupItem = ({
10555
10744
  `,
10556
10745
  title: "Adicionar Ancestralidade a este grupo"
10557
10746
  },
10558
- isPickingForThisGroup ? /* @__PURE__ */ React24.createElement(FiCheckCircle, { size: 12 }) : /* @__PURE__ */ React24.createElement(FiSearch6, { size: 12 }),
10747
+ isPickingForThisGroup ? /* @__PURE__ */ React25.createElement(FiCheckCircle, { size: 12 }) : /* @__PURE__ */ React25.createElement(FiSearch7, { size: 12 }),
10559
10748
  isPickingForThisGroup ? "Selecionando..." : "Adicionar"
10560
- ), /* @__PURE__ */ React24.createElement(
10749
+ ), /* @__PURE__ */ React25.createElement(
10561
10750
  "button",
10562
10751
  {
10563
10752
  onClick: () => onAddSubgroup(group.id),
10564
10753
  className: "p-1.5 text-slate-500 hover:text-white hover:bg-white/10 rounded transition-colors",
10565
10754
  title: "Criar Subgrupo"
10566
10755
  },
10567
- /* @__PURE__ */ React24.createElement(FiPlus9, { size: 14 })
10568
- )), /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React24.createElement(
10756
+ /* @__PURE__ */ React25.createElement(FiPlus10, { size: 14 })
10757
+ )), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React25.createElement(
10569
10758
  "button",
10570
10759
  {
10571
10760
  onClick: () => onIndent(group.id),
@@ -10573,25 +10762,25 @@ var GroupItem = ({
10573
10762
  className: `p-1.5 rounded transition-colors ${!canIndent ? "text-slate-800 cursor-not-allowed" : "text-slate-500 hover:text-white hover:bg-white/10"}`,
10574
10763
  title: "Aninhar no grupo acima"
10575
10764
  },
10576
- /* @__PURE__ */ React24.createElement(FiArrowRight, { size: 14 })
10577
- ), /* @__PURE__ */ React24.createElement(
10765
+ /* @__PURE__ */ React25.createElement(FiArrowRight, { size: 14 })
10766
+ ), /* @__PURE__ */ React25.createElement(
10578
10767
  "button",
10579
10768
  {
10580
10769
  onClick: () => onOutdent(group.id),
10581
10770
  className: "p-1.5 text-slate-500 hover:text-white hover:bg-white/10 rounded transition-colors",
10582
10771
  title: "Desaninhar"
10583
10772
  },
10584
- /* @__PURE__ */ React24.createElement(FiArrowLeft3, { size: 14 })
10585
- ), /* @__PURE__ */ React24.createElement("div", { className: "w-px h-3 bg-white/10 mx-1" }), /* @__PURE__ */ React24.createElement(
10773
+ /* @__PURE__ */ React25.createElement(FiArrowLeft3, { size: 14 })
10774
+ ), /* @__PURE__ */ React25.createElement("div", { className: "w-px h-3 bg-white/10 mx-1" }), /* @__PURE__ */ React25.createElement(
10586
10775
  "button",
10587
10776
  {
10588
10777
  onClick: () => onDelete(group.id),
10589
10778
  className: "p-1.5 text-slate-600 hover:text-red-400 hover:bg-red-500/10 rounded transition-colors",
10590
10779
  title: "Remover Grupo"
10591
10780
  },
10592
- /* @__PURE__ */ React24.createElement(FiTrash23, { size: 14 })
10781
+ /* @__PURE__ */ React25.createElement(FiTrash23, { size: 14 })
10593
10782
  )))
10594
- ), group.children && group.children.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "ml-2" }, group.children.map((childGroup, idx) => /* @__PURE__ */ React24.createElement(
10783
+ ), group.children && group.children.length > 0 && /* @__PURE__ */ React25.createElement("div", { className: "ml-2" }, group.children.map((childGroup, idx) => /* @__PURE__ */ React25.createElement(
10595
10784
  GroupItem,
10596
10785
  {
10597
10786
  key: childGroup.id,
@@ -10623,11 +10812,11 @@ function AncestryBoard({
10623
10812
  userRole
10624
10813
  // [NOVO] Recebe a role do usuário
10625
10814
  }) {
10626
- const [searchTerm, setSearchTerm] = useState24("");
10627
- const [groups, setGroups] = useState24([]);
10628
- const [isLoaded, setIsLoaded] = useState24(false);
10629
- const [pickingGroupId, setPickingGroupId] = useState24(null);
10630
- const [saveStatus, setSaveStatus] = useState24("idle");
10815
+ const [searchTerm, setSearchTerm] = useState25("");
10816
+ const [groups, setGroups] = useState25([]);
10817
+ const [isLoaded, setIsLoaded] = useState25(false);
10818
+ const [pickingGroupId, setPickingGroupId] = useState25(null);
10819
+ const [saveStatus, setSaveStatus] = useState25("idle");
10631
10820
  const canEdit = useMemo11(() => {
10632
10821
  return userRole !== "viewer";
10633
10822
  }, [userRole]);
@@ -10846,33 +11035,33 @@ function AncestryBoard({
10846
11035
  });
10847
11036
  };
10848
11037
  if (!isOpen) return null;
10849
- return /* @__PURE__ */ React24.createElement(
11038
+ return /* @__PURE__ */ React25.createElement(
10850
11039
  "div",
10851
11040
  {
10852
11041
  className: "fixed inset-0 z-[2200] bg-black/80 backdrop-blur-sm flex items-center justify-center p-2",
10853
11042
  onClick: onClose
10854
11043
  },
10855
- /* @__PURE__ */ React24.createElement(
11044
+ /* @__PURE__ */ React25.createElement(
10856
11045
  "div",
10857
11046
  {
10858
11047
  className: "bg-slate-950 border border-white/10 rounded-xl w-[98vw] h-[97vh] flex flex-col shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-200",
10859
11048
  onClick: (e) => e.stopPropagation()
10860
11049
  },
10861
- /* @__PURE__ */ React24.createElement("div", { className: "h-14 px-4 border-b border-white/10 bg-slate-900/90 flex items-center justify-between shrink-0" }, /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React24.createElement("h3", { className: "text-base font-semibold text-white flex items-center gap-2 whitespace-nowrap" }, /* @__PURE__ */ React24.createElement(FiLayers6, { className: "text-indigo-400" }), "Ancestry Board"), saveStatus !== "idle" && /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-2 animate-in fade-in slide-in-from-left-2 duration-300" }, /* @__PURE__ */ React24.createElement("div", { className: "w-px h-4 bg-white/10 mx-1" }), /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-slate-900/50 border border-white/5" }, saveStatus === "saving" && /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
11050
+ /* @__PURE__ */ React25.createElement("div", { className: "h-14 px-4 border-b border-white/10 bg-slate-900/90 flex items-center justify-between shrink-0" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React25.createElement("h3", { className: "text-base font-semibold text-white flex items-center gap-2 whitespace-nowrap" }, /* @__PURE__ */ React25.createElement(FiLayers6, { className: "text-indigo-400" }), "Ancestry Board"), saveStatus !== "idle" && /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-2 animate-in fade-in slide-in-from-left-2 duration-300" }, /* @__PURE__ */ React25.createElement("div", { className: "w-px h-4 bg-white/10 mx-1" }), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-slate-900/50 border border-white/5" }, saveStatus === "saving" && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
10862
11051
  FiLoader5,
10863
11052
  {
10864
11053
  className: "animate-spin text-indigo-400",
10865
11054
  size: 12
10866
11055
  }
10867
- ), /* @__PURE__ */ React24.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-indigo-300" }, "Salvando")), saveStatus === "saved" && /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(FiCheckCircle, { className: "text-emerald-400", size: 12 }), /* @__PURE__ */ React24.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-slate-400" }, "Salvo")), saveStatus === "error" && /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("span", { className: "w-2 h-2 rounded-full bg-red-500" }), /* @__PURE__ */ React24.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-red-400" }, "Erro"))))), /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-3" }, pickingGroupId && /* @__PURE__ */ React24.createElement("span", { className: "text-xs text-indigo-300 font-medium animate-pulse hidden sm:inline-block mr-2" }, "Selecione na lateral..."), canEdit && /* @__PURE__ */ React24.createElement(
11056
+ ), /* @__PURE__ */ React25.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-indigo-300" }, "Salvando")), saveStatus === "saved" && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(FiCheckCircle, { className: "text-emerald-400", size: 12 }), /* @__PURE__ */ React25.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-slate-400" }, "Salvo")), saveStatus === "error" && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("span", { className: "w-2 h-2 rounded-full bg-red-500" }), /* @__PURE__ */ React25.createElement("span", { className: "text-[10px] uppercase tracking-wide font-medium text-red-400" }, "Erro"))))), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-3" }, pickingGroupId && /* @__PURE__ */ React25.createElement("span", { className: "text-xs text-indigo-300 font-medium animate-pulse hidden sm:inline-block mr-2" }, "Selecione na lateral..."), canEdit && /* @__PURE__ */ React25.createElement(
10868
11057
  "button",
10869
11058
  {
10870
11059
  onClick: handleAddRootGroup,
10871
11060
  className: "\n flex items-center gap-2 px-3 py-1.5 \n bg-white/5 hover:bg-white/10 \n border border-white/10 hover:border-white/20\n backdrop-blur-sm\n text-slate-200 hover:text-white\n rounded-md transition-all duration-200\n text-xs font-medium shadow-sm\n "
10872
11061
  },
10873
- /* @__PURE__ */ React24.createElement(FiPlus9, { size: 14, className: "text-indigo-400" }),
10874
- /* @__PURE__ */ React24.createElement("span", { className: "hidden sm:inline" }, "Novo Grupo")
10875
- ), /* @__PURE__ */ React24.createElement(
11062
+ /* @__PURE__ */ React25.createElement(FiPlus10, { size: 14, className: "text-indigo-400" }),
11063
+ /* @__PURE__ */ React25.createElement("span", { className: "hidden sm:inline" }, "Novo Grupo")
11064
+ ), /* @__PURE__ */ React25.createElement(
10876
11065
  "button",
10877
11066
  {
10878
11067
  onClick: onClose,
@@ -10880,7 +11069,7 @@ function AncestryBoard({
10880
11069
  },
10881
11070
  "\xD7"
10882
11071
  ))),
10883
- /* @__PURE__ */ React24.createElement("div", { className: "flex flex-1 overflow-hidden" }, /* @__PURE__ */ React24.createElement(
11072
+ /* @__PURE__ */ React25.createElement("div", { className: "flex flex-1 overflow-hidden" }, /* @__PURE__ */ React25.createElement(
10884
11073
  "div",
10885
11074
  {
10886
11075
  className: `
@@ -10889,12 +11078,12 @@ function AncestryBoard({
10889
11078
  min-w-[280px] max-w-[500px] bg-slate-900
10890
11079
  `
10891
11080
  },
10892
- /* @__PURE__ */ React24.createElement("div", { className: "p-3 border-b border-white/5 bg-slate-900/50" }, /* @__PURE__ */ React24.createElement("div", { className: "relative group" }, /* @__PURE__ */ React24.createElement(
10893
- FiSearch6,
11081
+ /* @__PURE__ */ React25.createElement("div", { className: "p-3 border-b border-white/5 bg-slate-900/50" }, /* @__PURE__ */ React25.createElement("div", { className: "relative group" }, /* @__PURE__ */ React25.createElement(
11082
+ FiSearch7,
10894
11083
  {
10895
11084
  className: `absolute left-3 top-1/2 -translate-y-1/2 transition-colors ${pickingGroupId ? "text-indigo-400" : "text-slate-500 group-focus-within:text-indigo-400"}`
10896
11085
  }
10897
- ), /* @__PURE__ */ React24.createElement(
11086
+ ), /* @__PURE__ */ React25.createElement(
10898
11087
  "input",
10899
11088
  {
10900
11089
  type: "text",
@@ -10908,10 +11097,10 @@ function AncestryBoard({
10908
11097
  autoFocus: !pickingGroupId
10909
11098
  }
10910
11099
  ))),
10911
- /* @__PURE__ */ React24.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-2" }, filtered.map((anc) => {
11100
+ /* @__PURE__ */ React25.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-2" }, filtered.map((anc) => {
10912
11101
  const parentNodeName = nodeNamesMap.get(String(anc.ancestral_node)) || "Node Desconhecido";
10913
11102
  const isPicking = !!pickingGroupId;
10914
- return /* @__PURE__ */ React24.createElement(
11103
+ return /* @__PURE__ */ React25.createElement(
10915
11104
  "div",
10916
11105
  {
10917
11106
  key: anc.ancestry_id,
@@ -10923,7 +11112,7 @@ function AncestryBoard({
10923
11112
  ${isPicking ? "border-indigo-500/30 bg-indigo-500/5 hover:bg-indigo-500/20 hover:border-indigo-400 cursor-pointer" : "border-white/5 bg-slate-800/40 hover:bg-indigo-600/10 hover:border-indigo-500/30 cursor-default"}
10924
11113
  `
10925
11114
  },
10926
- /* @__PURE__ */ React24.createElement(
11115
+ /* @__PURE__ */ React25.createElement(
10927
11116
  "div",
10928
11117
  {
10929
11118
  className: `
@@ -10931,10 +11120,10 @@ function AncestryBoard({
10931
11120
  ${isPicking ? "bg-indigo-500 text-white border-indigo-400" : "bg-slate-800 text-indigo-400 border-white/5 group-hover:bg-indigo-500 group-hover:text-white"}
10932
11121
  `
10933
11122
  },
10934
- isPicking ? /* @__PURE__ */ React24.createElement(FiPlus9, { size: 16 }) : /* @__PURE__ */ React24.createElement(FiLayers6, { size: 14 })
11123
+ isPicking ? /* @__PURE__ */ React25.createElement(FiPlus10, { size: 16 }) : /* @__PURE__ */ React25.createElement(FiLayers6, { size: 14 })
10935
11124
  ),
10936
- /* @__PURE__ */ React24.createElement("div", { className: "flex-1 min-w-0 pb-2" }, /* @__PURE__ */ React24.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React24.createElement("h4", { className: "text-sm font-medium text-slate-200 group-hover:text-white truncate transition-colors" }, anc.name || "Sem Nome"), anc.is_private && /* @__PURE__ */ React24.createElement("span", { className: "text-[9px] px-1 py-0.5 rounded bg-amber-500/10 text-amber-300 border border-amber-500/20" }, "Priv")), /* @__PURE__ */ React24.createElement("div", { className: "flex items-center gap-1.5 mt-0.5 text-[11px] text-slate-500 group-hover:text-indigo-200/70 transition-colors" }, /* @__PURE__ */ React24.createElement(FiCornerUpRight4, { size: 10 }), /* @__PURE__ */ React24.createElement("span", { className: "truncate max-w-[120px]" }, parentNodeName)), anc.description && /* @__PURE__ */ React24.createElement("p", { className: "mt-1.5 text-[11px] text-slate-400 line-clamp-2 leading-relaxed opacity-80" }, anc.description)),
10937
- !isPicking && /* @__PURE__ */ React24.createElement(
11125
+ /* @__PURE__ */ React25.createElement("div", { className: "flex-1 min-w-0 pb-2" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React25.createElement("h4", { className: "text-sm font-medium text-slate-200 group-hover:text-white truncate transition-colors" }, anc.name || "Sem Nome"), anc.is_private && /* @__PURE__ */ React25.createElement("span", { className: "text-[9px] px-1 py-0.5 rounded bg-amber-500/10 text-amber-300 border border-amber-500/20" }, "Priv")), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-1.5 mt-0.5 text-[11px] text-slate-500 group-hover:text-indigo-200/70 transition-colors" }, /* @__PURE__ */ React25.createElement(FiCornerUpRight4, { size: 10 }), /* @__PURE__ */ React25.createElement("span", { className: "truncate max-w-[120px]" }, parentNodeName)), anc.description && /* @__PURE__ */ React25.createElement("p", { className: "mt-1.5 text-[11px] text-slate-400 line-clamp-2 leading-relaxed opacity-80" }, anc.description)),
11126
+ !isPicking && /* @__PURE__ */ React25.createElement(
10938
11127
  "button",
10939
11128
  {
10940
11129
  onClick: (e) => {
@@ -10944,11 +11133,11 @@ function AncestryBoard({
10944
11133
  className: "absolute right-2 bottom-2 opacity-0 group-hover:opacity-100 transition-all duration-300 transform translate-y-2 group-hover:translate-y-0 z-10",
10945
11134
  title: "Renderizar Ancestralidade"
10946
11135
  },
10947
- /* @__PURE__ */ React24.createElement("div", { className: "bg-indigo-500 text-white p-2 rounded-full shadow-lg hover:bg-indigo-400 hover:scale-110 transition-all" }, /* @__PURE__ */ React24.createElement(FiPlay, { size: 14, className: "ml-0.5" }))
11136
+ /* @__PURE__ */ React25.createElement("div", { className: "bg-indigo-500 text-white p-2 rounded-full shadow-lg hover:bg-indigo-400 hover:scale-110 transition-all" }, /* @__PURE__ */ React25.createElement(FiPlay, { size: 14, className: "ml-0.5" }))
10948
11137
  )
10949
11138
  );
10950
11139
  }))
10951
- ), /* @__PURE__ */ React24.createElement("div", { className: "flex flex-col flex-1 bg-slate-950/30" }, /* @__PURE__ */ React24.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 space-y-4" }, groups.length === 0 ? /* @__PURE__ */ React24.createElement("div", { className: "flex flex-col items-center justify-center h-full text-slate-500 gap-3 border-2 border-dashed border-white/5 rounded-xl m-4 bg-slate-900/20" }, /* @__PURE__ */ React24.createElement(FiLayers6, { size: 24, className: "opacity-20" }), /* @__PURE__ */ React24.createElement("p", { className: "text-xs text-center px-4" }, canEdit ? /* @__PURE__ */ React24.createElement(React24.Fragment, null, "Nenhum grupo criado.", /* @__PURE__ */ React24.createElement("br", null), 'Use o bot\xE3o "Novo Grupo" acima.') : /* @__PURE__ */ React24.createElement(React24.Fragment, null, "Nenhum grupo dispon\xEDvel para visualiza\xE7\xE3o."))) : groups.map((group, index) => /* @__PURE__ */ React24.createElement(
11140
+ ), /* @__PURE__ */ React25.createElement("div", { className: "flex flex-col flex-1 bg-slate-950/30" }, /* @__PURE__ */ React25.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 space-y-4" }, groups.length === 0 ? /* @__PURE__ */ React25.createElement("div", { className: "flex flex-col items-center justify-center h-full text-slate-500 gap-3 border-2 border-dashed border-white/5 rounded-xl m-4 bg-slate-900/20" }, /* @__PURE__ */ React25.createElement(FiLayers6, { size: 24, className: "opacity-20" }), /* @__PURE__ */ React25.createElement("p", { className: "text-xs text-center px-4" }, canEdit ? /* @__PURE__ */ React25.createElement(React25.Fragment, null, "Nenhum grupo criado.", /* @__PURE__ */ React25.createElement("br", null), 'Use o bot\xE3o "Novo Grupo" acima.') : /* @__PURE__ */ React25.createElement(React25.Fragment, null, "Nenhum grupo dispon\xEDvel para visualiza\xE7\xE3o."))) : groups.map((group, index) => /* @__PURE__ */ React25.createElement(
10952
11141
  GroupItem,
10953
11142
  {
10954
11143
  key: group.id,
@@ -10968,7 +11157,7 @@ function AncestryBoard({
10968
11157
  canEdit
10969
11158
  }
10970
11159
  ))))),
10971
- /* @__PURE__ */ React24.createElement("div", { className: "px-5 py-2 border-t border-white/10 bg-slate-950/50 text-xs text-slate-500 flex justify-between flex-shrink-0" }, /* @__PURE__ */ React24.createElement("span", null, filtered.length, " itens encontrados"), /* @__PURE__ */ React24.createElement("span", null, groups.length, " grupos raiz"))
11160
+ /* @__PURE__ */ React25.createElement("div", { className: "px-5 py-2 border-t border-white/10 bg-slate-950/50 text-xs text-slate-500 flex justify-between flex-shrink-0" }, /* @__PURE__ */ React25.createElement("span", null, filtered.length, " itens encontrados"), /* @__PURE__ */ React25.createElement("span", null, groups.length, " grupos raiz"))
10972
11161
  )
10973
11162
  );
10974
11163
  }
@@ -11126,42 +11315,42 @@ function XViewScene({
11126
11315
  const sceneDataRef = useRef19(null);
11127
11316
  const parentDataRef = useRef19(null);
11128
11317
  const ancestryDataRef = useRef19(null);
11129
- const [isLoading, setIsLoading] = useState25(true);
11130
- const [permissionStatus, setPermissionStatus] = useState25("loading");
11131
- const [userPermissionRole, setUserPermissionRole] = useState25(null);
11132
- const [viewMembers, setViewMembers] = useState25([]);
11133
- const [isInitialized, setIsInitialized] = useState25(false);
11134
- const [sceneVersion, setSceneVersion] = useState25(0);
11135
- const [contextMenu, setContextMenu] = useState25({
11318
+ const [isLoading, setIsLoading] = useState26(true);
11319
+ const [permissionStatus, setPermissionStatus] = useState26("loading");
11320
+ const [userPermissionRole, setUserPermissionRole] = useState26(null);
11321
+ const [viewMembers, setViewMembers] = useState26([]);
11322
+ const [isInitialized, setIsInitialized] = useState26(false);
11323
+ const [sceneVersion, setSceneVersion] = useState26(0);
11324
+ const [contextMenu, setContextMenu] = useState26({
11136
11325
  visible: false,
11137
11326
  x: 0,
11138
11327
  y: 0,
11139
11328
  nodeData: null
11140
11329
  });
11141
- const [multiContextMenu, setMultiContextMenu] = useState25({
11330
+ const [multiContextMenu, setMultiContextMenu] = useState26({
11142
11331
  visible: false,
11143
11332
  x: 0,
11144
11333
  y: 0,
11145
11334
  nodeIds: null
11146
11335
  });
11147
- const [relationshipMenu, setRelationshipMenu] = useState25({
11336
+ const [relationshipMenu, setRelationshipMenu] = useState26({
11148
11337
  visible: false,
11149
11338
  x: 0,
11150
11339
  y: 0,
11151
11340
  linkObject: null
11152
11341
  });
11153
- const [creationMode, setCreationMode] = useState25({
11342
+ const [creationMode, setCreationMode] = useState26({
11154
11343
  isActive: false,
11155
11344
  sourceNodeData: null
11156
11345
  });
11157
- const [versionMode, setVersionMode] = useState25({
11346
+ const [versionMode, setVersionMode] = useState26({
11158
11347
  isActive: false,
11159
11348
  sourceNodeData: null
11160
11349
  });
11161
- const [questMode, setQuestMode] = useState25({ isActive: false });
11162
- const [hasFocusedInitial, setHasFocusedInitial] = useState25(false);
11163
- const [hasOpenedInitialAncestry, setHasOpenedInitialAncestry] = useState25(false);
11164
- const [ancestryMode, setAncestryMode] = useState25({
11350
+ const [questMode, setQuestMode] = useState26({ isActive: false });
11351
+ const [hasFocusedInitial, setHasFocusedInitial] = useState26(false);
11352
+ const [hasOpenedInitialAncestry, setHasOpenedInitialAncestry] = useState26(false);
11353
+ const [ancestryMode, setAncestryMode] = useState26({
11165
11354
  isActive: false,
11166
11355
  tree: null,
11167
11356
  selectedParentId: null,
@@ -11172,37 +11361,37 @@ function XViewScene({
11172
11361
  ancestryDescriptionSections: [],
11173
11362
  isAddingNodes: false
11174
11363
  });
11175
- const [readingMode, setReadingMode] = useState25({
11364
+ const [readingMode, setReadingMode] = useState26({
11176
11365
  isActive: false,
11177
11366
  ancestry: null,
11178
11367
  branchStack: [],
11179
11368
  autoAbstraction: false
11180
11369
  });
11181
- const [formPosition, setFormPosition] = useState25({
11370
+ const [formPosition, setFormPosition] = useState26({
11182
11371
  left: 16,
11183
11372
  top: 16,
11184
11373
  opacity: 0
11185
11374
  });
11186
- const [detailsNode, setDetailsNode] = useState25(null);
11187
- const [detailsLink, setDetailsLink] = useState25(null);
11188
- const [ancestryLinkDetails, setAncestryLinkDetails] = useState25(null);
11189
- const [imageViewer, setImageViewer] = useState25({
11375
+ const [detailsNode, setDetailsNode] = useState26(null);
11376
+ const [detailsLink, setDetailsLink] = useState26(null);
11377
+ const [ancestryLinkDetails, setAncestryLinkDetails] = useState26(null);
11378
+ const [imageViewer, setImageViewer] = useState26({
11190
11379
  visible: false,
11191
11380
  images: [],
11192
11381
  startIndex: 0
11193
11382
  });
11194
- const [editingAncestryRel, setEditingAncestryRel] = useState25({
11383
+ const [editingAncestryRel, setEditingAncestryRel] = useState26({
11195
11384
  visible: false,
11196
11385
  data: null,
11197
11386
  path: null
11198
11387
  });
11199
- const [isImportModalOpen, setIsImportModalOpen] = useState25(false);
11200
- const [importSuccessMessage, setImportSuccessMessage] = useState25("");
11201
- const [invalidTargetError, setInvalidTargetError] = useState25(null);
11202
- const [highlightedNodeId, setHighlightedNodeId] = useState25(null);
11203
- const [isAncestryBoardOpen, setIsAncestryBoardOpen] = useState25(false);
11204
- const [ancestryBoardData, setAncestryBoardData] = useState25([]);
11205
- const [isSidebarOpen, setIsSidebarOpen] = useState25(false);
11388
+ const [isImportModalOpen, setIsImportModalOpen] = useState26(false);
11389
+ const [importSuccessMessage, setImportSuccessMessage] = useState26("");
11390
+ const [invalidTargetError, setInvalidTargetError] = useState26(null);
11391
+ const [highlightedNodeId, setHighlightedNodeId] = useState26(null);
11392
+ const [isAncestryBoardOpen, setIsAncestryBoardOpen] = useState26(false);
11393
+ const [ancestryBoardData, setAncestryBoardData] = useState26([]);
11394
+ const [isSidebarOpen, setIsSidebarOpen] = useState26(false);
11206
11395
  const mountRef = useRef19(null);
11207
11396
  const tooltipRef = useRef19(null);
11208
11397
  const formRef = useRef19(null);
@@ -13048,7 +13237,7 @@ function XViewScene({
13048
13237
  userActionHandlers.handleStartVersioning(actionHandlerContext, nodeData);
13049
13238
  };
13050
13239
  const handleStartQuestQuick = useCallback4((questNode) => {
13051
- var _a2;
13240
+ var _a2, _b2, _c2;
13052
13241
  if (!questNode || !actionHandlerContext) return;
13053
13242
  const {
13054
13243
  labelObject,
@@ -13059,16 +13248,102 @@ function XViewScene({
13059
13248
  timelineEndLabel,
13060
13249
  ...cleanQuestNode
13061
13250
  } = questNode;
13251
+ const newTimeline = [...cleanQuestNode.timeline || [], {
13252
+ type: "status_changed",
13253
+ timestamp: Date.now(),
13254
+ actorId: ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id) || "unknown",
13255
+ description: `Quest iniciada ("In Progress") por ${((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.name) || "usu\xE1rio"}.`
13256
+ }];
13062
13257
  const updatedNode = {
13063
13258
  ...cleanQuestNode,
13064
13259
  status: "In Progress",
13065
13260
  color: "#eab308",
13066
- assignee_id: (_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id
13261
+ assignee_id: (_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.id,
13262
+ timeline: newTimeline
13067
13263
  };
13068
13264
  if (userActionHandlers.handleSaveNodeDetails) {
13069
13265
  userActionHandlers.handleSaveNodeDetails(actionHandlerContext, updatedNode);
13070
13266
  }
13071
13267
  }, [session, actionHandlerContext]);
13268
+ const handleFinishQuestQuick = useCallback4((questNode) => {
13269
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
13270
+ if (!questNode || !actionHandlerContext) return;
13271
+ const {
13272
+ labelObject,
13273
+ labelOffset,
13274
+ aura,
13275
+ borderRing,
13276
+ timelineIntervalBar,
13277
+ timelineEndLabel,
13278
+ ...cleanQuestNode
13279
+ } = questNode;
13280
+ let nextAssigneeId = cleanQuestNode.assignee_id;
13281
+ let nextStatus = "Done";
13282
+ let newTimeline = [...cleanQuestNode.timeline || []];
13283
+ const reviewStack = [...cleanQuestNode.reviewStack || []];
13284
+ const currentReviewerIdx = reviewStack.findIndex((r) => r.status !== "completed");
13285
+ let nextIdxToAssign = 0;
13286
+ if (currentReviewerIdx !== -1 && reviewStack[currentReviewerIdx].userId === cleanQuestNode.assignee_id) {
13287
+ reviewStack[currentReviewerIdx].status = "completed";
13288
+ nextIdxToAssign = currentReviewerIdx + 1;
13289
+ newTimeline.push({
13290
+ type: "review_completed",
13291
+ timestamp: Date.now(),
13292
+ actorId: ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id) || cleanQuestNode.assignee_id,
13293
+ description: `Review conclu\xEDda por ${((_b2 = viewMembers.find((m) => m.id === cleanQuestNode.assignee_id)) == null ? void 0 : _b2.name) || "revisor"}.`
13294
+ });
13295
+ } else {
13296
+ nextIdxToAssign = currentReviewerIdx !== -1 ? currentReviewerIdx : reviewStack.length;
13297
+ newTimeline.push({
13298
+ type: "task_completed",
13299
+ timestamp: Date.now(),
13300
+ actorId: ((_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.id) || cleanQuestNode.assignee_id,
13301
+ description: `Tarefa principal entregue por ${((_d2 = viewMembers.find((m) => m.id === cleanQuestNode.assignee_id)) == null ? void 0 : _d2.name) || ((_e2 = session == null ? void 0 : session.user) == null ? void 0 : _e2.name) || "respons\xE1vel"}.`
13302
+ });
13303
+ }
13304
+ if (nextIdxToAssign < reviewStack.length) {
13305
+ const remainingMandatory = reviewStack.slice(nextIdxToAssign).some((r) => r.mandatory);
13306
+ const hasAnyMandatory = reviewStack.some((r) => r.mandatory);
13307
+ if (!hasAnyMandatory || remainingMandatory) {
13308
+ const nextReviewer = reviewStack[nextIdxToAssign];
13309
+ nextAssigneeId = nextReviewer.userId;
13310
+ nextStatus = "Review";
13311
+ newTimeline.push({
13312
+ type: "assignee_changed",
13313
+ timestamp: Date.now() + 1,
13314
+ actorId: ((_f2 = session == null ? void 0 : session.user) == null ? void 0 : _f2.id) || "system",
13315
+ to_assignee_id: nextAssigneeId,
13316
+ description: `Quest atribu\xEDda para revis\xE3o a ${((_g2 = viewMembers.find((m) => m.id === nextAssigneeId)) == null ? void 0 : _g2.name) || "revisor"}.`
13317
+ });
13318
+ } else {
13319
+ nextStatus = "Done";
13320
+ for (let i = nextIdxToAssign; i < reviewStack.length; i++) {
13321
+ reviewStack[i].status = "skipped";
13322
+ }
13323
+ }
13324
+ } else {
13325
+ nextStatus = "Done";
13326
+ }
13327
+ if (nextStatus === "Done") {
13328
+ newTimeline.push({
13329
+ type: "quest_finished",
13330
+ timestamp: Date.now() + 2,
13331
+ actorId: ((_h2 = session == null ? void 0 : session.user) == null ? void 0 : _h2.id) || "system",
13332
+ description: `Quest finalizada!`
13333
+ });
13334
+ }
13335
+ const updatedNode = {
13336
+ ...cleanQuestNode,
13337
+ status: nextStatus,
13338
+ color: nextStatus === "Done" ? "#22c55e" : "#a855f7",
13339
+ assignee_id: nextAssigneeId,
13340
+ reviewStack,
13341
+ timeline: newTimeline
13342
+ };
13343
+ if (userActionHandlers.handleSaveNodeDetails) {
13344
+ userActionHandlers.handleSaveNodeDetails(actionHandlerContext, updatedNode);
13345
+ }
13346
+ }, [session, actionHandlerContext, viewMembers]);
13072
13347
  const handleCancelQuest = useCallback4(() => {
13073
13348
  const { graphGroup, ghostElements } = stateRef.current;
13074
13349
  if (ghostElements.node && graphGroup) {
@@ -15063,10 +15338,10 @@ function XViewScene({
15063
15338
  // <-- handleCancelQuest adicionado aqui
15064
15339
  ]);
15065
15340
  if (isLoading || status === "loading" || permissionStatus === "loading") {
15066
- return /* @__PURE__ */ React25.createElement(LoadingScreen, null);
15341
+ return /* @__PURE__ */ React26.createElement(LoadingScreen, null);
15067
15342
  }
15068
15343
  if (permissionStatus === "denied") {
15069
- return /* @__PURE__ */ React25.createElement("div", { className: "flex flex-col items-center justify-center min-h-screen w-full bg-slate-950 text-white" }, /* @__PURE__ */ React25.createElement("div", { className: "bg-slate-900/50 p-8 rounded-2xl border border-slate-800 shadow-2xl text-center max-w-md" }, /* @__PURE__ */ React25.createElement("div", { className: "mb-4 text-red-500" }, /* @__PURE__ */ React25.createElement(
15344
+ return /* @__PURE__ */ React26.createElement("div", { className: "flex flex-col items-center justify-center min-h-screen w-full bg-slate-950 text-white" }, /* @__PURE__ */ React26.createElement("div", { className: "bg-slate-900/50 p-8 rounded-2xl border border-slate-800 shadow-2xl text-center max-w-md" }, /* @__PURE__ */ React26.createElement("div", { className: "mb-4 text-red-500" }, /* @__PURE__ */ React26.createElement(
15070
15345
  "svg",
15071
15346
  {
15072
15347
  xmlns: "http://www.w3.org/2000/svg",
@@ -15076,7 +15351,7 @@ function XViewScene({
15076
15351
  stroke: "currentColor",
15077
15352
  className: "w-16 h-16 mx-auto"
15078
15353
  },
15079
- /* @__PURE__ */ React25.createElement(
15354
+ /* @__PURE__ */ React26.createElement(
15080
15355
  "path",
15081
15356
  {
15082
15357
  strokeLinecap: "round",
@@ -15084,13 +15359,13 @@ function XViewScene({
15084
15359
  d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
15085
15360
  }
15086
15361
  )
15087
- )), /* @__PURE__ */ React25.createElement("h2", { className: "text-2xl font-bold mb-2" }, "Acesso Negado"), /* @__PURE__ */ React25.createElement("p", { className: "text-slate-400 mb-6" }, "Voc\xEA n\xE3o tem permiss\xE3o para acessar este conte\xFAdo. Solicite acesso ao propriet\xE1rio ou verifique se est\xE1 na conta correta."), /* @__PURE__ */ React25.createElement(
15362
+ )), /* @__PURE__ */ React26.createElement("h2", { className: "text-2xl font-bold mb-2" }, "Acesso Negado"), /* @__PURE__ */ React26.createElement("p", { className: "text-slate-400 mb-6" }, "Voc\xEA n\xE3o tem permiss\xE3o para acessar este conte\xFAdo. Solicite acesso ao propriet\xE1rio ou verifique se est\xE1 na conta correta."), /* @__PURE__ */ React26.createElement(
15088
15363
  "button",
15089
15364
  {
15090
15365
  onClick: () => router.push("/dashboard/scenes"),
15091
15366
  className: "flex items-center justify-center gap-2 w-full py-3 px-4 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors font-medium"
15092
15367
  },
15093
- /* @__PURE__ */ React25.createElement(
15368
+ /* @__PURE__ */ React26.createElement(
15094
15369
  "svg",
15095
15370
  {
15096
15371
  xmlns: "http://www.w3.org/2000/svg",
@@ -15100,7 +15375,7 @@ function XViewScene({
15100
15375
  stroke: "currentColor",
15101
15376
  className: "w-5 h-5"
15102
15377
  },
15103
- /* @__PURE__ */ React25.createElement(
15378
+ /* @__PURE__ */ React26.createElement(
15104
15379
  "path",
15105
15380
  {
15106
15381
  strokeLinecap: "round",
@@ -15112,7 +15387,7 @@ function XViewScene({
15112
15387
  "Voltar para Scenes"
15113
15388
  )));
15114
15389
  }
15115
- return /* @__PURE__ */ React25.createElement(
15390
+ return /* @__PURE__ */ React26.createElement(
15116
15391
  "div",
15117
15392
  {
15118
15393
  ref: mountRef,
@@ -15124,7 +15399,7 @@ function XViewScene({
15124
15399
  cursor: stateRef.current.connection.isActive || stateRef.current.relink.isActive || ancestryMode.isActive ? "crosshair" : creationMode.isActive ? "default" : "grab"
15125
15400
  }
15126
15401
  },
15127
- userPermissionRole !== "link_viewer" && /* @__PURE__ */ React25.createElement(
15402
+ userPermissionRole !== "link_viewer" && /* @__PURE__ */ React26.createElement(
15128
15403
  XViewSidebar,
15129
15404
  {
15130
15405
  dbNodes: searchableDbNodes,
@@ -15144,7 +15419,7 @@ function XViewScene({
15144
15419
  userRole: userPermissionRole
15145
15420
  }
15146
15421
  ),
15147
- creationMode.isActive && /* @__PURE__ */ React25.createElement(
15422
+ creationMode.isActive && /* @__PURE__ */ React26.createElement(
15148
15423
  InSceneCreationForm,
15149
15424
  {
15150
15425
  onSave: (data) => userActionHandlers.handleSaveNode(actionHandlerContext, data),
@@ -15176,7 +15451,7 @@ function XViewScene({
15176
15451
  availableAncestries: allAvailableAncestries
15177
15452
  }
15178
15453
  ),
15179
- versionMode.isActive && /* @__PURE__ */ React25.createElement(
15454
+ versionMode.isActive && /* @__PURE__ */ React26.createElement(
15180
15455
  InSceneVersionForm,
15181
15456
  {
15182
15457
  onSave: (data) => userActionHandlers.handleSaveVersionNode(actionHandlerContext, data),
@@ -15202,7 +15477,7 @@ function XViewScene({
15202
15477
  availableAncestries: allAvailableAncestries
15203
15478
  }
15204
15479
  ),
15205
- questMode.isActive && /* @__PURE__ */ React25.createElement(
15480
+ questMode.isActive && /* @__PURE__ */ React26.createElement(
15206
15481
  InSceneQuestForm,
15207
15482
  {
15208
15483
  onSave: (data) => handleSaveQuestNode(actionHandlerContext, data),
@@ -15228,7 +15503,7 @@ function XViewScene({
15228
15503
  viewMembers
15229
15504
  }
15230
15505
  ),
15231
- readingMode.isActive && readingMode.ancestry && /* @__PURE__ */ React25.createElement(
15506
+ readingMode.isActive && readingMode.ancestry && /* @__PURE__ */ React26.createElement(
15232
15507
  "div",
15233
15508
  {
15234
15509
  className: `ui-overlay absolute group rounded-2xl border border-white/10 bg-slate-950/70 backdrop-blur-xl shadow-[0_20px_80px_rgba(0,0,0,0.6)] ring-1 ring-white/10 text-white overflow-hidden flex flex-col ${isReadModeResizing ? "transition-none" : "transition-all duration-300 ease-out"}`,
@@ -15241,7 +15516,7 @@ function XViewScene({
15241
15516
  maxWidth: "92vw"
15242
15517
  }
15243
15518
  },
15244
- /* @__PURE__ */ React25.createElement(
15519
+ /* @__PURE__ */ React26.createElement(
15245
15520
  "div",
15246
15521
  {
15247
15522
  onPointerDown: (e) => {
@@ -15252,7 +15527,7 @@ function XViewScene({
15252
15527
  title: "Arraste para redimensionar"
15253
15528
  }
15254
15529
  ),
15255
- /* @__PURE__ */ React25.createElement(
15530
+ /* @__PURE__ */ React26.createElement(
15256
15531
  DescriptionReadModePanel,
15257
15532
  {
15258
15533
  key: readingMode.branchStack.length > 0 ? readingMode.branchStack[readingMode.branchStack.length - 1].branchId : readingMode.ancestry.ancestry_id,
@@ -15287,7 +15562,7 @@ function XViewScene({
15287
15562
  }
15288
15563
  )
15289
15564
  ),
15290
- ancestryMode.isActive && ancestryMode.tree && /* @__PURE__ */ React25.createElement(
15565
+ ancestryMode.isActive && ancestryMode.tree && /* @__PURE__ */ React26.createElement(
15291
15566
  CreateAncestryPanel,
15292
15567
  {
15293
15568
  ancestryMode,
@@ -15323,7 +15598,7 @@ function XViewScene({
15323
15598
  onRenderAbstractionTree: (data, targetId) => handleRenderAbstractionTree(data, targetId)
15324
15599
  }
15325
15600
  ),
15326
- editingAncestryRel.visible && /* @__PURE__ */ React25.createElement(
15601
+ editingAncestryRel.visible && /* @__PURE__ */ React26.createElement(
15327
15602
  AncestryRelationshipPanel,
15328
15603
  {
15329
15604
  data: editingAncestryRel.data,
@@ -15337,7 +15612,7 @@ function XViewScene({
15337
15612
  onUploadFile: upload_file_action
15338
15613
  }
15339
15614
  ),
15340
- detailsNode && detailsNode.is_quest && /* @__PURE__ */ React25.createElement(
15615
+ detailsNode && detailsNode.is_quest && /* @__PURE__ */ React26.createElement(
15341
15616
  QuestDetailsPanel,
15342
15617
  {
15343
15618
  node: detailsNode,
@@ -15359,7 +15634,7 @@ function XViewScene({
15359
15634
  viewMembers
15360
15635
  }
15361
15636
  ),
15362
- detailsNode && !detailsNode.is_quest && /* @__PURE__ */ React25.createElement(
15637
+ detailsNode && !detailsNode.is_quest && /* @__PURE__ */ React26.createElement(
15363
15638
  NodeDetailsPanel,
15364
15639
  {
15365
15640
  node: detailsNode,
@@ -15391,7 +15666,7 @@ function XViewScene({
15391
15666
  currentDatasetName: detailsNodeDatasetInfo == null ? void 0 : detailsNodeDatasetInfo.datasetName
15392
15667
  }
15393
15668
  ),
15394
- detailsLink && /* @__PURE__ */ React25.createElement(
15669
+ detailsLink && /* @__PURE__ */ React26.createElement(
15395
15670
  RelationshipDetailsPanel,
15396
15671
  {
15397
15672
  link: detailsLink,
@@ -15405,7 +15680,7 @@ function XViewScene({
15405
15680
  userRole: userPermissionRole
15406
15681
  }
15407
15682
  ),
15408
- ancestryLinkDetails && /* @__PURE__ */ React25.createElement(
15683
+ ancestryLinkDetails && /* @__PURE__ */ React26.createElement(
15409
15684
  AncestryLinkDetailsPanel,
15410
15685
  {
15411
15686
  data: ancestryLinkDetails,
@@ -15416,7 +15691,7 @@ function XViewScene({
15416
15691
  onUploadFile: upload_file_action
15417
15692
  }
15418
15693
  ),
15419
- /* @__PURE__ */ React25.createElement(
15694
+ /* @__PURE__ */ React26.createElement(
15420
15695
  "div",
15421
15696
  {
15422
15697
  ref: tooltipRef,
@@ -15443,7 +15718,7 @@ function XViewScene({
15443
15718
  }
15444
15719
  }
15445
15720
  ),
15446
- /* @__PURE__ */ React25.createElement(
15721
+ /* @__PURE__ */ React26.createElement(
15447
15722
  ContextMenu,
15448
15723
  {
15449
15724
  data: contextMenu,
@@ -15472,10 +15747,11 @@ function XViewScene({
15472
15747
  onFocusNode: handleFocusNode,
15473
15748
  viewMembers,
15474
15749
  currentUser: session == null ? void 0 : session.user,
15475
- onStartQuest: handleStartQuestQuick
15750
+ onStartQuest: handleStartQuestQuick,
15751
+ onFinishQuest: handleFinishQuestQuick
15476
15752
  }
15477
15753
  ),
15478
- /* @__PURE__ */ React25.createElement(
15754
+ /* @__PURE__ */ React26.createElement(
15479
15755
  MultiNodeContextMenu,
15480
15756
  {
15481
15757
  data: multiContextMenu,
@@ -15495,7 +15771,7 @@ function XViewScene({
15495
15771
  )
15496
15772
  }
15497
15773
  ),
15498
- /* @__PURE__ */ React25.createElement(
15774
+ /* @__PURE__ */ React26.createElement(
15499
15775
  RelationshipContextMenu,
15500
15776
  {
15501
15777
  data: relationshipMenu,
@@ -15513,14 +15789,14 @@ function XViewScene({
15513
15789
  onDelete: (data) => userActionHandlers.handleDeleteLink(actionHandlerContext, data)
15514
15790
  }
15515
15791
  ),
15516
- /* @__PURE__ */ React25.createElement(
15792
+ /* @__PURE__ */ React26.createElement(
15517
15793
  ImageViewer,
15518
15794
  {
15519
15795
  data: imageViewer,
15520
15796
  onClose: () => setImageViewer({ ...imageViewer, visible: false })
15521
15797
  }
15522
15798
  ),
15523
- /* @__PURE__ */ React25.createElement(
15799
+ /* @__PURE__ */ React26.createElement(
15524
15800
  AncestryBoard,
15525
15801
  {
15526
15802
  isOpen: isAncestryBoardOpen,
@@ -15533,7 +15809,7 @@ function XViewScene({
15533
15809
  userRole: userPermissionRole
15534
15810
  }
15535
15811
  ),
15536
- /* @__PURE__ */ React25.createElement(
15812
+ /* @__PURE__ */ React26.createElement(
15537
15813
  ImportParentFileModal,
15538
15814
  {
15539
15815
  isOpen: isImportModalOpen,
@@ -15546,7 +15822,7 @@ function XViewScene({
15546
15822
  currentAncestries: ancestryDataRef.current || []
15547
15823
  }
15548
15824
  ),
15549
- invalidTargetError && /* @__PURE__ */ React25.createElement(
15825
+ invalidTargetError && /* @__PURE__ */ React26.createElement(
15550
15826
  "div",
15551
15827
  {
15552
15828
  className: "ui-overlay",
@@ -15571,13 +15847,13 @@ function XViewScene({
15571
15847
  animation: "fadeInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
15572
15848
  }
15573
15849
  },
15574
- /* @__PURE__ */ React25.createElement("style", null, `
15850
+ /* @__PURE__ */ React26.createElement("style", null, `
15575
15851
  @keyframes fadeInDown {
15576
15852
  from { opacity: 0; transform: translate(-50%, -20px); }
15577
15853
  to { opacity: 1; transform: translate(-50%, 0); }
15578
15854
  }
15579
15855
  `),
15580
- /* @__PURE__ */ React25.createElement(
15856
+ /* @__PURE__ */ React26.createElement(
15581
15857
  "svg",
15582
15858
  {
15583
15859
  width: "20",
@@ -15589,12 +15865,12 @@ function XViewScene({
15589
15865
  strokeLinecap: "round",
15590
15866
  strokeLinejoin: "round"
15591
15867
  },
15592
- /* @__PURE__ */ React25.createElement("circle", { cx: "12", cy: "12", r: "10" }),
15593
- /* @__PURE__ */ React25.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
15594
- /* @__PURE__ */ React25.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
15868
+ /* @__PURE__ */ React26.createElement("circle", { cx: "12", cy: "12", r: "10" }),
15869
+ /* @__PURE__ */ React26.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
15870
+ /* @__PURE__ */ React26.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
15595
15871
  ),
15596
- /* @__PURE__ */ React25.createElement("span", { style: { fontSize: "14px", fontWeight: 500 } }, invalidTargetError),
15597
- /* @__PURE__ */ React25.createElement(
15872
+ /* @__PURE__ */ React26.createElement("span", { style: { fontSize: "14px", fontWeight: 500 } }, invalidTargetError),
15873
+ /* @__PURE__ */ React26.createElement(
15598
15874
  "button",
15599
15875
  {
15600
15876
  onClick: () => setInvalidTargetError(null),