@ixo/editor 2.31.2 → 2.32.1

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.
@@ -13768,7 +13768,7 @@ var ClaimTemplateView = ({ editor, block }) => {
13768
13768
  };
13769
13769
 
13770
13770
  // src/mantine/blocks/claim/flow/FlowView.tsx
13771
- import React151, { useMemo as useMemo43, useRef as useRef10, useEffect as useEffect43, useCallback as useCallback38 } from "react";
13771
+ import React151, { useMemo as useMemo43, useRef as useRef11, useEffect as useEffect44, useCallback as useCallback40 } from "react";
13772
13772
  import { Stack as Stack113, Text as Text87, Loader as Loader19, Center as Center9, Alert as Alert20, Title as Title6, Flex as Flex27, ActionIcon as ActionIcon26 } from "@mantine/core";
13773
13773
 
13774
13774
  // src/mantine/hooks/useCurrentUser.ts
@@ -14457,7 +14457,7 @@ function useBlockAuthorization({
14457
14457
  }
14458
14458
 
14459
14459
  // src/mantine/blocks/bid/flow/components/BidSurveyPanel.tsx
14460
- import React140, { useMemo as useMemo35, useEffect as useEffect37 } from "react";
14460
+ import React140, { useMemo as useMemo35, useEffect as useEffect37, useRef as useRef9, useCallback as useCallback34 } from "react";
14461
14461
  import { Loader as Loader13, Stack as Stack104, Text as Text78 } from "@mantine/core";
14462
14462
  import { Survey as Survey2 } from "@ixo/surveys";
14463
14463
 
@@ -14581,6 +14581,13 @@ var BidSurveyPanel = ({ deedId, collectionId, role, onSubmitComplete, execution,
14581
14581
  const { closePanel } = usePanelStore();
14582
14582
  const { surveyModel, loading, error, handleSurveyComplete } = useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, executeHookedActions);
14583
14583
  const roleLabel = role === "service_agent" ? "Service Agent" : "Evaluation Agent";
14584
+ const handleSurveyCompleteRef = useRef9(handleSurveyComplete);
14585
+ useEffect37(() => {
14586
+ handleSurveyCompleteRef.current = handleSurveyComplete;
14587
+ }, [handleSurveyComplete]);
14588
+ const stableHandleSurveyComplete = useCallback34((sender) => {
14589
+ handleSurveyCompleteRef.current(sender);
14590
+ }, []);
14584
14591
  const surveyContainerStyle = useMemo35(
14585
14592
  () => ({
14586
14593
  flex: 1,
@@ -14593,18 +14600,18 @@ var BidSurveyPanel = ({ deedId, collectionId, role, onSubmitComplete, execution,
14593
14600
  );
14594
14601
  useEffect37(() => {
14595
14602
  if (surveyModel) {
14596
- surveyModel.onComplete.add(handleSurveyComplete);
14603
+ surveyModel.onComplete.add(stableHandleSurveyComplete);
14597
14604
  return () => {
14598
- surveyModel.onComplete.remove(handleSurveyComplete);
14605
+ surveyModel.onComplete.remove(stableHandleSurveyComplete);
14599
14606
  };
14600
14607
  }
14601
14608
  return void 0;
14602
- }, [surveyModel, handleSurveyComplete]);
14609
+ }, [surveyModel, stableHandleSurveyComplete]);
14603
14610
  return /* @__PURE__ */ React140.createElement(BaseRightPanelLayout, { isTemplate: false, onClose: closePanel, title: `${roleLabel} Application` }, /* @__PURE__ */ React140.createElement("div", { style: surveyContainerStyle }, loading && /* @__PURE__ */ React140.createElement(Stack104, { align: "center", justify: "center", style: { height: "100%" } }, /* @__PURE__ */ React140.createElement(Loader13, { size: "lg" }), /* @__PURE__ */ React140.createElement(Text78, { size: "sm", c: "dimmed" }, "Loading survey template...")), error && /* @__PURE__ */ React140.createElement(Stack104, { align: "center", justify: "center", style: { height: "100%", padding: "1rem" } }, /* @__PURE__ */ React140.createElement(Text78, { size: "sm", c: "red" }, error)), !loading && !error && surveyModel && /* @__PURE__ */ React140.createElement(Survey2, { model: surveyModel })));
14604
14611
  };
14605
14612
 
14606
14613
  // src/mantine/blocks/bid/flow/components/BidsList.tsx
14607
- import React143, { useCallback as useCallback36 } from "react";
14614
+ import React143, { useCallback as useCallback37 } from "react";
14608
14615
  import { Stack as Stack107, Text as Text81, Loader as Loader15, Center as Center6, Alert as Alert18 } from "@mantine/core";
14609
14616
  import { IconAlertCircle as IconAlertCircle3 } from "@tabler/icons-react";
14610
14617
 
@@ -14695,13 +14702,13 @@ function useBidView(bid, deedId) {
14695
14702
  }
14696
14703
 
14697
14704
  // src/mantine/blocks/bid/flow/hooks/useBidActions.ts
14698
- import { useState as useState54, useCallback as useCallback34 } from "react";
14705
+ import { useState as useState54, useCallback as useCallback35 } from "react";
14699
14706
  function useBidActions(bid, deedId, adminAddress, execution, onRefresh, executeHookedActions) {
14700
14707
  const handlers = useBlocknoteHandlers();
14701
14708
  const { closePanel } = usePanelStore();
14702
14709
  const [loading, setLoading] = useState54(false);
14703
14710
  const [error, setError] = useState54(null);
14704
- const approveBid = useCallback34(async () => {
14711
+ const approveBid = useCallback35(async () => {
14705
14712
  try {
14706
14713
  setLoading(true);
14707
14714
  setError(null);
@@ -14769,7 +14776,7 @@ function useBidActions(bid, deedId, adminAddress, execution, onRefresh, executeH
14769
14776
  setLoading(false);
14770
14777
  }
14771
14778
  }, [bid, deedId, adminAddress, handlers, closePanel, onRefresh, execution, executeHookedActions]);
14772
- const rejectBid = useCallback34(
14779
+ const rejectBid = useCallback35(
14773
14780
  async (reason) => {
14774
14781
  if (!reason.trim()) {
14775
14782
  setError("Please provide a reason for rejection");
@@ -14908,13 +14915,13 @@ var BidItem = ({ bid, deedId, adminAddress, onRefresh, execution, executeHookedA
14908
14915
  };
14909
14916
 
14910
14917
  // src/mantine/blocks/bid/flow/hooks/useBids.ts
14911
- import { useState as useState57, useEffect as useEffect40, useCallback as useCallback35 } from "react";
14918
+ import { useState as useState57, useEffect as useEffect40, useCallback as useCallback36 } from "react";
14912
14919
  function useBids(collectionId) {
14913
14920
  const handlers = useBlocknoteHandlers();
14914
14921
  const [bids, setBids] = useState57([]);
14915
14922
  const [loading, setLoading] = useState57(true);
14916
14923
  const [error, setError] = useState57(null);
14917
- const fetchBids = useCallback35(async () => {
14924
+ const fetchBids = useCallback36(async () => {
14918
14925
  if (!collectionId) {
14919
14926
  setLoading(false);
14920
14927
  return;
@@ -14941,7 +14948,7 @@ function useBids(collectionId) {
14941
14948
  var BidsList = ({ collectionId, deedId, adminAddress, onRefresh, execution, executeHookedActions }) => {
14942
14949
  const { closePanel } = usePanelStore();
14943
14950
  const { bids, loading, error, refetch } = useBids(collectionId);
14944
- const handleRefresh = useCallback36(() => {
14951
+ const handleRefresh = useCallback37(() => {
14945
14952
  refetch();
14946
14953
  onRefresh();
14947
14954
  }, [refetch, onRefresh]);
@@ -15011,6 +15018,37 @@ var UserPlus = ({ size = 24, color = "currentColor", style }) => {
15011
15018
  };
15012
15019
  var UserPlus_default = UserPlus;
15013
15020
 
15021
+ // src/mantine/blocks/bid/flow/hooks/useUserBid.ts
15022
+ import { useState as useState58, useEffect as useEffect41, useCallback as useCallback38 } from "react";
15023
+ function useUserBid(collectionId, userDid) {
15024
+ const handlers = useBlocknoteHandlers();
15025
+ const [userBid, setUserBid] = useState58(null);
15026
+ const [loading, setLoading] = useState58(true);
15027
+ const [error, setError] = useState58(null);
15028
+ const fetchUserBid = useCallback38(async () => {
15029
+ if (!collectionId || !userDid) {
15030
+ setLoading(false);
15031
+ return;
15032
+ }
15033
+ try {
15034
+ setLoading(true);
15035
+ setError(null);
15036
+ const formattedDid = userDid.startsWith("did:ixo:") ? userDid : `did:ixo:${userDid}`;
15037
+ const response = await handlers.queryBidsByDid({ collectionId, did: formattedDid });
15038
+ setUserBid(Array.isArray(response?.data) && response.data.length > 0 ? response.data[0] : null);
15039
+ } catch (err) {
15040
+ setError(err instanceof Error ? err.message : "Failed to fetch user bid");
15041
+ setUserBid(null);
15042
+ } finally {
15043
+ setLoading(false);
15044
+ }
15045
+ }, [collectionId, userDid, handlers]);
15046
+ useEffect41(() => {
15047
+ fetchUserBid();
15048
+ }, [fetchUserBid]);
15049
+ return { userBid, loading, error, refetch: fetchUserBid };
15050
+ }
15051
+
15014
15052
  // src/mantine/blocks/bid/flow/components/BidCollectionItem.tsx
15015
15053
  var BidCollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh, execution, executeHookedActions }) => {
15016
15054
  const {
@@ -15023,6 +15061,7 @@ var BidCollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh
15023
15061
  actorDid: execution.actorDid,
15024
15062
  flowUri: execution.flowUri
15025
15063
  });
15064
+ const { userBid, loading: userBidLoading } = useUserBid(collection.id, execution.actorDid);
15026
15065
  const executionRef = React146.useRef(execution);
15027
15066
  const executeHookedActionsRef = React146.useRef(executeHookedActions);
15028
15067
  const onRefreshRef = React146.useRef(onRefresh);
@@ -15118,13 +15157,16 @@ var BidCollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh
15118
15157
  );
15119
15158
  const { open: openBidsList } = usePanel(bidsListPanelId, bidsListPanelContent);
15120
15159
  const renderActionButton = () => {
15121
- if (authLoading) {
15160
+ if (authLoading || userBidLoading) {
15122
15161
  return /* @__PURE__ */ React146.createElement(Loader16, { size: "xs" });
15123
15162
  }
15124
15163
  if (userRole === "PO" /* Owner */) {
15125
15164
  return /* @__PURE__ */ React146.createElement(ActionIcon23, { variant: "subtle", size: "lg", onClick: openBidsList }, /* @__PURE__ */ React146.createElement(IconArrowRight3, { size: 20 }));
15126
15165
  } else if (userRole === "SA" /* ServiceProvider */ || userRole === "EA" /* Evaluator */) {
15127
15166
  return /* @__PURE__ */ React146.createElement(Badge21, { size: "sm", color: getRoleColor(userRole) }, getRoleLabel(userRole));
15167
+ } else if (userBid) {
15168
+ const roleLabel = getRoleLabel(userBid.role);
15169
+ return /* @__PURE__ */ React146.createElement(Tooltip13, { label: `Applied as ${roleLabel}`, withArrow: true }, /* @__PURE__ */ React146.createElement(Badge21, { size: "xs", variant: "filled", color: "blue" }, "In Progress"));
15128
15170
  } else {
15129
15171
  if (!isAuthorized) {
15130
15172
  return /* @__PURE__ */ React146.createElement(Tooltip13, { label: reason || "You are not authorized to apply", withArrow: true }, /* @__PURE__ */ React146.createElement(Button30, { size: "xs", variant: "light", disabled: true, leftSection: /* @__PURE__ */ React146.createElement(IconLock, { size: 14 }) }, "Apply"));
@@ -15142,11 +15184,11 @@ var BidCollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh
15142
15184
  };
15143
15185
 
15144
15186
  // src/mantine/blocks/evaluator/flow/EvaluationCollectionItem.tsx
15145
- import React149, { useMemo as useMemo42, useEffect as useEffect42, useRef as useRef9 } from "react";
15187
+ import React149, { useMemo as useMemo42, useEffect as useEffect43, useRef as useRef10 } from "react";
15146
15188
  import { Stack as Stack111, Text as Text85, ActionIcon as ActionIcon25, Tooltip as Tooltip15 } from "@mantine/core";
15147
15189
 
15148
15190
  // src/mantine/blocks/evaluator/flow/ClaimsList.tsx
15149
- import React148, { useState as useState58, useEffect as useEffect41, useCallback as useCallback37, useMemo as useMemo41 } from "react";
15191
+ import React148, { useState as useState59, useEffect as useEffect42, useCallback as useCallback39, useMemo as useMemo41 } from "react";
15150
15192
  import { Paper as Paper14, CloseButton as CloseButton5, Title as Title5, Loader as Loader17, Stack as Stack110, Text as Text84, ActionIcon as ActionIcon24, Alert as Alert19, Badge as Badge23, Group as Group51, Button as Button31, Divider as Divider13, Tabs as Tabs3, ScrollArea as ScrollArea6 } from "@mantine/core";
15151
15193
  import { IconAlertCircle as IconAlertCircle4, IconArrowRight as IconArrowRight4, IconRefresh as IconRefresh3, IconArrowLeft as IconArrowLeft4, IconFileText as IconFileText3, IconRobot as IconRobot3, IconChecklist as IconChecklist3 } from "@tabler/icons-react";
15152
15194
  import { Survey as Survey4, SurveyModel as SurveyModel4 } from "@ixo/surveys";
@@ -15592,21 +15634,21 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15592
15634
  const { closePanel } = usePanelStore();
15593
15635
  const handlers = useBlocknoteHandlers();
15594
15636
  const { editor } = useBlocknoteContext();
15595
- const [viewMode, setViewMode] = useState58("list");
15596
- const [claims, setClaims] = useState58([]);
15597
- const [loading, setLoading] = useState58(true);
15598
- const [error, setError] = useState58(null);
15599
- const [selectedClaim, setSelectedClaim] = useState58(null);
15600
- const [claimData, setClaimData] = useState58(null);
15601
- const [surveyJson, setSurveyJson] = useState58(null);
15602
- const [surveyLoading, setSurveyLoading] = useState58(false);
15603
- const [surveyError, setSurveyError] = useState58(null);
15604
- const [evaluating, setEvaluating] = useState58(false);
15605
- const [rubricData, setRubricData] = useState58(null);
15606
- const [evaluationResult, setEvaluationResult] = useState58(null);
15607
- const [evaluationLoading, setEvaluationLoading] = useState58(false);
15608
- const [activeTab, setActiveTab] = useState58("submission");
15609
- const fetchClaims = useCallback37(async () => {
15637
+ const [viewMode, setViewMode] = useState59("list");
15638
+ const [claims, setClaims] = useState59([]);
15639
+ const [loading, setLoading] = useState59(true);
15640
+ const [error, setError] = useState59(null);
15641
+ const [selectedClaim, setSelectedClaim] = useState59(null);
15642
+ const [claimData, setClaimData] = useState59(null);
15643
+ const [surveyJson, setSurveyJson] = useState59(null);
15644
+ const [surveyLoading, setSurveyLoading] = useState59(false);
15645
+ const [surveyError, setSurveyError] = useState59(null);
15646
+ const [evaluating, setEvaluating] = useState59(false);
15647
+ const [rubricData, setRubricData] = useState59(null);
15648
+ const [evaluationResult, setEvaluationResult] = useState59(null);
15649
+ const [evaluationLoading, setEvaluationLoading] = useState59(false);
15650
+ const [activeTab, setActiveTab] = useState59("submission");
15651
+ const fetchClaims = useCallback39(async () => {
15610
15652
  try {
15611
15653
  setLoading(true);
15612
15654
  setError(null);
@@ -15621,10 +15663,10 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15621
15663
  setLoading(false);
15622
15664
  }
15623
15665
  }, [collectionId]);
15624
- useEffect41(() => {
15666
+ useEffect42(() => {
15625
15667
  fetchClaims();
15626
15668
  }, [fetchClaims]);
15627
- const fetchClaimAndSurvey = useCallback37(
15669
+ const fetchClaimAndSurvey = useCallback39(
15628
15670
  async (claim) => {
15629
15671
  try {
15630
15672
  setSurveyLoading(true);
@@ -15671,7 +15713,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15671
15713
  },
15672
15714
  [collectionId, deedId]
15673
15715
  );
15674
- const handleViewClaim = useCallback37(
15716
+ const handleViewClaim = useCallback39(
15675
15717
  (claim) => {
15676
15718
  setSelectedClaim(claim);
15677
15719
  fetchClaimAndSurvey(claim);
@@ -15679,7 +15721,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15679
15721
  },
15680
15722
  [fetchClaimAndSurvey]
15681
15723
  );
15682
- const handleBackToList = useCallback37(() => {
15724
+ const handleBackToList = useCallback39(() => {
15683
15725
  setViewMode("list");
15684
15726
  setSelectedClaim(null);
15685
15727
  setClaimData(null);
@@ -15714,7 +15756,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15714
15756
  }),
15715
15757
  []
15716
15758
  );
15717
- const handleApprove = useCallback37(async () => {
15759
+ const handleApprove = useCallback39(async () => {
15718
15760
  if (!selectedClaim) return;
15719
15761
  try {
15720
15762
  setEvaluating(true);
@@ -15807,7 +15849,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15807
15849
  setEvaluating(false);
15808
15850
  }
15809
15851
  }, [selectedClaim, handlers, deedId, collectionId, adminAddress, evaluationResult, handleBackToList, onEvaluationComplete, editor]);
15810
- const handleReject = useCallback37(async () => {
15852
+ const handleReject = useCallback39(async () => {
15811
15853
  if (!selectedClaim) return;
15812
15854
  try {
15813
15855
  setEvaluating(true);
@@ -16004,9 +16046,9 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
16004
16046
  };
16005
16047
  var ClaimListItem = ({ claim, onViewClaim }) => {
16006
16048
  const handlers = useBlocknoteHandlers();
16007
- const [userProfile, setUserProfile] = useState58(null);
16008
- const [loadingProfile, setLoadingProfile] = useState58(false);
16009
- useEffect41(() => {
16049
+ const [userProfile, setUserProfile] = useState59(null);
16050
+ const [loadingProfile, setLoadingProfile] = useState59(false);
16051
+ useEffect42(() => {
16010
16052
  const fetchUserProfile = async () => {
16011
16053
  if (!claim.agentDid) return;
16012
16054
  try {
@@ -16073,8 +16115,8 @@ var ClaimListItem = ({ claim, onViewClaim }) => {
16073
16115
  import { IconArrowRight as IconArrowRight5 } from "@tabler/icons-react";
16074
16116
  var EvaluationCollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh }) => {
16075
16117
  const { getCurrentUser } = useBlocknoteHandlers();
16076
- const getCurrentUserRef = useRef9(getCurrentUser);
16077
- useEffect42(() => {
16118
+ const getCurrentUserRef = useRef10(getCurrentUser);
16119
+ useEffect43(() => {
16078
16120
  getCurrentUserRef.current = getCurrentUser;
16079
16121
  }, [getCurrentUser]);
16080
16122
  const currentUser = getCurrentUserRef.current();
@@ -16218,8 +16260,8 @@ var ClaimFlowView = ({ editor, block }) => {
16218
16260
  }),
16219
16261
  [flowNode, runtime, ucanManager, userAddress, delegationStore, verifySignature, flowOwnerDid, flowUri]
16220
16262
  );
16221
- const executionRef = useRef10(executionValue);
16222
- useEffect43(() => {
16263
+ const executionRef = useRef11(executionValue);
16264
+ useEffect44(() => {
16223
16265
  executionRef.current = executionValue;
16224
16266
  }, [executionValue]);
16225
16267
  const execution = useMemo43(
@@ -16272,11 +16314,11 @@ var ClaimFlowView = ({ editor, block }) => {
16272
16314
  const title = block.props.title || "Submit Claim";
16273
16315
  const adminAddress = block.props.adminAddress || "";
16274
16316
  const { collections, loading, error, refetch } = useCollections(did, selectedCollectionIds, block, editor);
16275
- const refetchRef = useRef10(refetch);
16276
- useEffect43(() => {
16317
+ const refetchRef = useRef11(refetch);
16318
+ useEffect44(() => {
16277
16319
  refetchRef.current = refetch;
16278
16320
  }, [refetch]);
16279
- const stableRefetch = useCallback38(() => {
16321
+ const stableRefetch = useCallback40(() => {
16280
16322
  refetchRef.current();
16281
16323
  }, []);
16282
16324
  if (!did) {
@@ -16364,10 +16406,10 @@ import React156, { useMemo as useMemo45 } from "react";
16364
16406
  import { Group as Group52, Stack as Stack114, Text as Text88 } from "@mantine/core";
16365
16407
 
16366
16408
  // src/mantine/blocks/bid/template/TemplateConfig.tsx
16367
- import React155, { useCallback as useCallback40 } from "react";
16409
+ import React155, { useCallback as useCallback42 } from "react";
16368
16410
 
16369
16411
  // src/mantine/blocks/bid/template/GeneralTab.tsx
16370
- import React154, { useEffect as useEffect44, useState as useState59, useCallback as useCallback39, useMemo as useMemo44 } from "react";
16412
+ import React154, { useEffect as useEffect45, useState as useState60, useCallback as useCallback41, useMemo as useMemo44 } from "react";
16371
16413
  var GeneralTab7 = ({
16372
16414
  title,
16373
16415
  description,
@@ -16380,12 +16422,12 @@ var GeneralTab7 = ({
16380
16422
  onSelectedCollectionsChange,
16381
16423
  onAdminAddressChange
16382
16424
  }) => {
16383
- const [localTitle, setLocalTitle] = useState59(title || "");
16384
- const [localDescription, setLocalDescription] = useState59(description || "");
16385
- useEffect44(() => {
16425
+ const [localTitle, setLocalTitle] = useState60(title || "");
16426
+ const [localDescription, setLocalDescription] = useState60(description || "");
16427
+ useEffect45(() => {
16386
16428
  setLocalTitle(title || "");
16387
16429
  }, [title]);
16388
- useEffect44(() => {
16430
+ useEffect45(() => {
16389
16431
  setLocalDescription(description || "");
16390
16432
  }, [description]);
16391
16433
  const parsedSelectedCollections = useMemo44(() => {
@@ -16395,14 +16437,14 @@ var GeneralTab7 = ({
16395
16437
  return [];
16396
16438
  }
16397
16439
  }, [selectedCollections]);
16398
- const handleCollectionsChange = useCallback39(
16440
+ const handleCollectionsChange = useCallback41(
16399
16441
  (collections) => {
16400
16442
  const stringified = JSON.stringify(collections || []);
16401
16443
  onSelectedCollectionsChange(stringified);
16402
16444
  },
16403
16445
  [onSelectedCollectionsChange]
16404
16446
  );
16405
- const handleAdminAddressChange = useCallback39(
16447
+ const handleAdminAddressChange = useCallback41(
16406
16448
  (adminAddress2) => {
16407
16449
  if (onAdminAddressChange) {
16408
16450
  onAdminAddressChange(adminAddress2);
@@ -16632,7 +16674,7 @@ var bidActions = [
16632
16674
  // src/mantine/blocks/bid/template/TemplateConfig.tsx
16633
16675
  var TemplateConfig7 = ({ editor, block }) => {
16634
16676
  const { closePanel } = usePanelStore();
16635
- const updateProp = useCallback40(
16677
+ const updateProp = useCallback42(
16636
16678
  (key, value) => {
16637
16679
  editor.updateBlock(block, {
16638
16680
  props: {
@@ -16726,7 +16768,7 @@ var BidTemplateView = ({ editor, block }) => {
16726
16768
  };
16727
16769
 
16728
16770
  // src/mantine/blocks/bid/flow/components/FlowView.tsx
16729
- import React157, { useMemo as useMemo46, useRef as useRef11, useEffect as useEffect45, useCallback as useCallback41 } from "react";
16771
+ import React157, { useMemo as useMemo46, useRef as useRef12, useEffect as useEffect46, useCallback as useCallback43 } from "react";
16730
16772
  import { Stack as Stack115, Text as Text89, Loader as Loader20, Center as Center10, Alert as Alert21, Title as Title7, Flex as Flex28, ActionIcon as ActionIcon27 } from "@mantine/core";
16731
16773
  import { IconSettings as IconSettings4, IconRefresh as IconRefresh5, IconAlertCircle as IconAlertCircle6 } from "@tabler/icons-react";
16732
16774
  var BID_FLOW_PANEL_ID = "bid-flow-panel";
@@ -16769,8 +16811,8 @@ var BidFlowView = ({ editor, block }) => {
16769
16811
  }),
16770
16812
  [flowNode, runtime, ucanManager, userAddress, editor, flowUri, delegationStore, verifySignature, flowOwnerDid]
16771
16813
  );
16772
- const executionRef = useRef11(executionValue);
16773
- useEffect45(() => {
16814
+ const executionRef = useRef12(executionValue);
16815
+ useEffect46(() => {
16774
16816
  executionRef.current = executionValue;
16775
16817
  }, [executionValue]);
16776
16818
  const execution = useMemo46(
@@ -16827,11 +16869,11 @@ var BidFlowView = ({ editor, block }) => {
16827
16869
  const title = block.props.title || "Bid Application";
16828
16870
  const { collections, loading, error, refetch } = useCollections(did, selectedCollectionIds, block, editor);
16829
16871
  const { executeHookedActions } = useHookedActions({ block, editor });
16830
- const refetchRef = useRef11(refetch);
16831
- useEffect45(() => {
16872
+ const refetchRef = useRef12(refetch);
16873
+ useEffect46(() => {
16832
16874
  refetchRef.current = refetch;
16833
16875
  }, [refetch]);
16834
- const stableRefetch = useCallback41(() => {
16876
+ const stableRefetch = useCallback43(() => {
16835
16877
  refetchRef.current();
16836
16878
  }, []);
16837
16879
  if (!did) {
@@ -16911,10 +16953,10 @@ import React162, { useMemo as useMemo48 } from "react";
16911
16953
  import { Group as Group53, Stack as Stack116, Text as Text90 } from "@mantine/core";
16912
16954
 
16913
16955
  // src/mantine/blocks/evaluator/template/TemplateConfig.tsx
16914
- import React161, { useCallback as useCallback43 } from "react";
16956
+ import React161, { useCallback as useCallback45 } from "react";
16915
16957
 
16916
16958
  // src/mantine/blocks/evaluator/template/GeneralTab.tsx
16917
- import React160, { useEffect as useEffect46, useState as useState60, useCallback as useCallback42, useMemo as useMemo47 } from "react";
16959
+ import React160, { useEffect as useEffect47, useState as useState61, useCallback as useCallback44, useMemo as useMemo47 } from "react";
16918
16960
  var GeneralTab8 = ({
16919
16961
  title,
16920
16962
  description,
@@ -16927,12 +16969,12 @@ var GeneralTab8 = ({
16927
16969
  onSelectedCollectionsChange,
16928
16970
  onAdminAddressChange
16929
16971
  }) => {
16930
- const [localTitle, setLocalTitle] = useState60(title || "");
16931
- const [localDescription, setLocalDescription] = useState60(description || "");
16932
- useEffect46(() => {
16972
+ const [localTitle, setLocalTitle] = useState61(title || "");
16973
+ const [localDescription, setLocalDescription] = useState61(description || "");
16974
+ useEffect47(() => {
16933
16975
  setLocalTitle(title || "");
16934
16976
  }, [title]);
16935
- useEffect46(() => {
16977
+ useEffect47(() => {
16936
16978
  setLocalDescription(description || "");
16937
16979
  }, [description]);
16938
16980
  const parsedSelectedCollections = useMemo47(() => {
@@ -16942,14 +16984,14 @@ var GeneralTab8 = ({
16942
16984
  return [];
16943
16985
  }
16944
16986
  }, [selectedCollections]);
16945
- const handleCollectionsChange = useCallback42(
16987
+ const handleCollectionsChange = useCallback44(
16946
16988
  (collections) => {
16947
16989
  const stringified = JSON.stringify(collections || []);
16948
16990
  onSelectedCollectionsChange(stringified);
16949
16991
  },
16950
16992
  [onSelectedCollectionsChange]
16951
16993
  );
16952
- const handleAdminAddressChange = useCallback42(
16994
+ const handleAdminAddressChange = useCallback44(
16953
16995
  (adminAddress2) => {
16954
16996
  if (onAdminAddressChange) {
16955
16997
  onAdminAddressChange(adminAddress2);
@@ -16998,7 +17040,7 @@ var GeneralTab8 = ({
16998
17040
  // src/mantine/blocks/evaluator/template/TemplateConfig.tsx
16999
17041
  var TemplateConfig8 = ({ editor, block }) => {
17000
17042
  const { closePanel } = usePanelStore();
17001
- const updateProp = useCallback43(
17043
+ const updateProp = useCallback45(
17002
17044
  (key, value) => {
17003
17045
  editor.updateBlock(block, {
17004
17046
  props: {
@@ -17150,14 +17192,14 @@ import React167 from "react";
17150
17192
  import { createReactBlockSpec as createReactBlockSpec12 } from "@blocknote/react";
17151
17193
 
17152
17194
  // src/mantine/blocks/visualization/VisualizationBlock.tsx
17153
- import React166, { useMemo as useMemo50, useCallback as useCallback44, useRef as useRef12, useState as useState61, useEffect as useEffect47 } from "react";
17195
+ import React166, { useMemo as useMemo50, useCallback as useCallback46, useRef as useRef13, useState as useState62, useEffect as useEffect48 } from "react";
17154
17196
  import { Box as Box34, Stack as Stack118, Text as Text92, Paper as Paper15, Group as Group54 } from "@mantine/core";
17155
17197
  function VisualizationBlock({ block, editor }) {
17156
17198
  const { visualizationRenderer } = useBlocknoteContext();
17157
17199
  const { vizType, config, title, preferences } = block.props;
17158
- const containerRef = useRef12(null);
17159
- const [hasValidDimensions, setHasValidDimensions] = useState61(false);
17160
- useEffect47(() => {
17200
+ const containerRef = useRef13(null);
17201
+ const [hasValidDimensions, setHasValidDimensions] = useState62(false);
17202
+ useEffect48(() => {
17161
17203
  const container = containerRef.current;
17162
17204
  if (!container) return;
17163
17205
  const checkDimensions = () => {
@@ -17187,7 +17229,7 @@ function VisualizationBlock({ block, editor }) {
17187
17229
  return {};
17188
17230
  }
17189
17231
  }, [preferences]);
17190
- const handlePreferencesChange = useCallback44(
17232
+ const handlePreferencesChange = useCallback46(
17191
17233
  (newPreferences) => {
17192
17234
  if (editor) {
17193
17235
  editor.updateBlock(block, {
@@ -17254,17 +17296,17 @@ import React170, { useMemo as useMemo51 } from "react";
17254
17296
  import { Badge as Badge24, Group as Group55, Stack as Stack119, Text as Text93 } from "@mantine/core";
17255
17297
 
17256
17298
  // src/mantine/blocks/domainCreator/template/TemplateConfig.tsx
17257
- import React169, { useCallback as useCallback45 } from "react";
17299
+ import React169, { useCallback as useCallback47 } from "react";
17258
17300
 
17259
17301
  // src/mantine/blocks/domainCreator/template/GeneralTab.tsx
17260
- import React168, { useEffect as useEffect48, useState as useState62 } from "react";
17302
+ import React168, { useEffect as useEffect49, useState as useState63 } from "react";
17261
17303
  var GeneralTab9 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
17262
- const [localTitle, setLocalTitle] = useState62(title || "");
17263
- const [localDescription, setLocalDescription] = useState62(description || "");
17264
- const [localIcon, setLocalIcon] = useState62(icon || "file-text");
17265
- useEffect48(() => setLocalTitle(title || ""), [title]);
17266
- useEffect48(() => setLocalDescription(description || ""), [description]);
17267
- useEffect48(() => setLocalIcon(icon || "file-text"), [icon]);
17304
+ const [localTitle, setLocalTitle] = useState63(title || "");
17305
+ const [localDescription, setLocalDescription] = useState63(description || "");
17306
+ const [localIcon, setLocalIcon] = useState63(icon || "file-text");
17307
+ useEffect49(() => setLocalTitle(title || ""), [title]);
17308
+ useEffect49(() => setLocalDescription(description || ""), [description]);
17309
+ useEffect49(() => setLocalIcon(icon || "file-text"), [icon]);
17268
17310
  return /* @__PURE__ */ React168.createElement(BaseSection, null, /* @__PURE__ */ React168.createElement(
17269
17311
  BaseTextInput,
17270
17312
  {
@@ -17309,7 +17351,7 @@ var GeneralTab9 = ({ title, description, icon, onTitleChange, onDescriptionChang
17309
17351
  // src/mantine/blocks/domainCreator/template/TemplateConfig.tsx
17310
17352
  var TemplateConfig9 = ({ editor, block }) => {
17311
17353
  const { closePanel } = usePanelStore();
17312
- const updateProp = useCallback45(
17354
+ const updateProp = useCallback47(
17313
17355
  (key, value) => {
17314
17356
  editor.updateBlock(block, {
17315
17357
  props: {
@@ -17360,12 +17402,12 @@ var DomainCreatorTemplateView = ({ editor, block }) => {
17360
17402
  };
17361
17403
 
17362
17404
  // src/mantine/blocks/domainCreator/flow/FlowView.tsx
17363
- import React172, { useCallback as useCallback47, useMemo as useMemo53, useState as useState64 } from "react";
17405
+ import React172, { useCallback as useCallback49, useMemo as useMemo53, useState as useState65 } from "react";
17364
17406
  import { ActionIcon as ActionIcon29, Badge as Badge25, Group as Group57, Stack as Stack121, Text as Text95, Tooltip as Tooltip16 } from "@mantine/core";
17365
17407
  import { IconChevronRight as IconChevronRight6, IconCheck as IconCheck6, IconAlertCircle as IconAlertCircle9 } from "@tabler/icons-react";
17366
17408
 
17367
17409
  // src/mantine/blocks/domainCreator/flow/DomainCreatorSurveyPanel.tsx
17368
- import React171, { useCallback as useCallback46, useEffect as useEffect49, useMemo as useMemo52, useRef as useRef13, useState as useState63 } from "react";
17410
+ import React171, { useCallback as useCallback48, useEffect as useEffect50, useMemo as useMemo52, useRef as useRef14, useState as useState64 } from "react";
17369
17411
  import { Alert as Alert23, Button as Button32, Group as Group56, Loader as Loader22, Stack as Stack120, Text as Text94 } from "@mantine/core";
17370
17412
  import { useDebouncedCallback } from "@mantine/hooks";
17371
17413
  import { IconAlertCircle as IconAlertCircle8, IconCheck as IconCheck5 } from "@tabler/icons-react";
@@ -18426,12 +18468,12 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18426
18468
  const { handlers } = useBlocknoteContext();
18427
18469
  const existingBlockEntityDid = block.props.entityDid;
18428
18470
  const existingBlockEntityType = block.props.entityType;
18429
- const [flowStep, setFlowStep] = useState63(existingBlockEntityDid ? "success" : "survey");
18430
- const [error, setError] = useState63(null);
18431
- const [createdEntityDid, setCreatedEntityDid] = useState63(existingBlockEntityDid || null);
18432
- const [createdEntityType, setCreatedEntityType] = useState63(existingBlockEntityType || null);
18433
- const isUpdatingFromProp = useRef13(false);
18434
- const lastSyncedAnswers = useRef13("");
18471
+ const [flowStep, setFlowStep] = useState64(existingBlockEntityDid ? "success" : "survey");
18472
+ const [error, setError] = useState64(null);
18473
+ const [createdEntityDid, setCreatedEntityDid] = useState64(existingBlockEntityDid || null);
18474
+ const [createdEntityType, setCreatedEntityType] = useState64(existingBlockEntityType || null);
18475
+ const isUpdatingFromProp = useRef14(false);
18476
+ const lastSyncedAnswers = useRef14("");
18435
18477
  const surveyModel = useMemo52(() => {
18436
18478
  const model = new SurveyModel5(tempDomainCreatorSurvey);
18437
18479
  model.applyTheme(surveyTheme);
@@ -18439,7 +18481,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18439
18481
  model.questionsOnPageMode = "singlePage";
18440
18482
  return model;
18441
18483
  }, []);
18442
- const syncPropToSurvey = useCallback46(
18484
+ const syncPropToSurvey = useCallback48(
18443
18485
  (answersJson) => {
18444
18486
  if (!answersJson || answersJson === lastSyncedAnswers.current) return;
18445
18487
  try {
@@ -18471,13 +18513,13 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18471
18513
  }
18472
18514
  });
18473
18515
  }, SYNC_DEBOUNCE_MS);
18474
- useEffect49(() => {
18516
+ useEffect50(() => {
18475
18517
  const answersJson = block.props.answers;
18476
18518
  if (answersJson) {
18477
18519
  syncPropToSurvey(answersJson);
18478
18520
  }
18479
18521
  }, [block.props.answers, syncPropToSurvey]);
18480
- useEffect49(() => {
18522
+ useEffect50(() => {
18481
18523
  const handleValueChanged = () => {
18482
18524
  if (isUpdatingFromProp.current) return;
18483
18525
  syncSurveyToProp(surveyModel.data);
@@ -18487,7 +18529,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18487
18529
  surveyModel.onValueChanged.remove(handleValueChanged);
18488
18530
  };
18489
18531
  }, [surveyModel, syncSurveyToProp]);
18490
- useEffect49(() => {
18532
+ useEffect50(() => {
18491
18533
  const needsSchema = !block.props.surveySchema;
18492
18534
  const needsAnswers = !block.props.answers;
18493
18535
  if (needsSchema || needsAnswers) {
@@ -18509,7 +18551,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18509
18551
  });
18510
18552
  }
18511
18553
  }, [editor, block]);
18512
- const processDomainCreation = useCallback46(
18554
+ const processDomainCreation = useCallback48(
18513
18555
  async (data) => {
18514
18556
  if (!handlers) {
18515
18557
  throw new Error("Handlers not available");
@@ -18587,7 +18629,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18587
18629
  },
18588
18630
  [handlers, existingEntityDid, issuerDidOverride]
18589
18631
  );
18590
- const handleSurveyComplete = useCallback46(
18632
+ const handleSurveyComplete = useCallback48(
18591
18633
  async (sender) => {
18592
18634
  const data = sender.data || {};
18593
18635
  try {
@@ -18615,21 +18657,21 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18615
18657
  },
18616
18658
  [processDomainCreation, onComplete, editor, block]
18617
18659
  );
18618
- useEffect49(() => {
18660
+ useEffect50(() => {
18619
18661
  surveyModel.onComplete.add(handleSurveyComplete);
18620
18662
  return () => {
18621
18663
  surveyModel.onComplete.remove(handleSurveyComplete);
18622
18664
  };
18623
18665
  }, [handleSurveyComplete, surveyModel]);
18624
- const handleRetry = useCallback46(() => {
18666
+ const handleRetry = useCallback48(() => {
18625
18667
  setFlowStep("survey");
18626
18668
  setError(null);
18627
18669
  surveyModel.clear();
18628
18670
  }, [surveyModel]);
18629
- const handleClose = useCallback46(() => {
18671
+ const handleClose = useCallback48(() => {
18630
18672
  closePanel();
18631
18673
  }, [closePanel]);
18632
- const handleVisitEntity = useCallback46(() => {
18674
+ const handleVisitEntity = useCallback48(() => {
18633
18675
  if (createdEntityDid && createdEntityType && handlers?.redirectToEntityOverview) {
18634
18676
  handlers.redirectToEntityOverview(createdEntityDid, createdEntityType);
18635
18677
  }
@@ -18662,11 +18704,11 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18662
18704
  // src/mantine/blocks/domainCreator/flow/FlowView.tsx
18663
18705
  var DOMAIN_CREATOR_FLOW_PANEL_ID = "domain-creator-flow-panel";
18664
18706
  var DomainCreatorFlowView = ({ editor, block }) => {
18665
- const [hasOpened, setHasOpened] = useState64(false);
18666
- const [submissionStatus, setSubmissionStatus] = useState64("idle");
18707
+ const [hasOpened, setHasOpened] = useState65(false);
18708
+ const [submissionStatus, setSubmissionStatus] = useState65("idle");
18667
18709
  const lastSubmission = block.props.lastSubmission ? JSON.parse(block.props.lastSubmission) : null;
18668
18710
  const hasExistingSubmission = lastSubmission?.entityDid;
18669
- const handleComplete = useCallback47(
18711
+ const handleComplete = useCallback49(
18670
18712
  (data) => {
18671
18713
  editor.updateBlock(block, {
18672
18714
  props: {
@@ -18752,30 +18794,30 @@ import React178, { useMemo as useMemo56 } from "react";
18752
18794
  import { Badge as Badge27, Group as Group59, Stack as Stack124, Text as Text98 } from "@mantine/core";
18753
18795
 
18754
18796
  // src/mantine/blocks/email/template/TemplateConfig.tsx
18755
- import React177, { useCallback as useCallback50, useMemo as useMemo55 } from "react";
18797
+ import React177, { useCallback as useCallback52, useMemo as useMemo55 } from "react";
18756
18798
 
18757
18799
  // src/mantine/blocks/email/template/GeneralTab.tsx
18758
- import React175, { useEffect as useEffect50, useState as useState65, useCallback as useCallback48, useRef as useRef14 } from "react";
18800
+ import React175, { useEffect as useEffect51, useState as useState66, useCallback as useCallback50, useRef as useRef15 } from "react";
18759
18801
  import { Divider as Divider14, Loader as Loader23, Select as Select4, Stack as Stack122, Text as Text96 } from "@mantine/core";
18760
18802
  var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplateChange, onToChange }) => {
18761
18803
  const handlers = useBlocknoteHandlers();
18762
18804
  const block = getCurrentBlock();
18763
18805
  const blockProps = block.props;
18764
- const [localTitle, setLocalTitle] = useState65(blockProps.title || "");
18765
- const [localTemplateName, setLocalTemplateName] = useState65(blockProps.templateName || "");
18766
- const [localTo, setLocalTo] = useState65(blockProps.to || "");
18767
- const [templates, setTemplates] = useState65([]);
18768
- const [loadingTemplates, setLoadingTemplates] = useState65(false);
18769
- const [loadingContent, setLoadingContent] = useState65(false);
18770
- const [error, setError] = useState65(null);
18771
- useEffect50(() => {
18806
+ const [localTitle, setLocalTitle] = useState66(blockProps.title || "");
18807
+ const [localTemplateName, setLocalTemplateName] = useState66(blockProps.templateName || "");
18808
+ const [localTo, setLocalTo] = useState66(blockProps.to || "");
18809
+ const [templates, setTemplates] = useState66([]);
18810
+ const [loadingTemplates, setLoadingTemplates] = useState66(false);
18811
+ const [loadingContent, setLoadingContent] = useState66(false);
18812
+ const [error, setError] = useState66(null);
18813
+ useEffect51(() => {
18772
18814
  const currentBlock = getCurrentBlock();
18773
18815
  setLocalTitle(currentBlock.props.title || "");
18774
18816
  setLocalTemplateName(currentBlock.props.templateName || "");
18775
18817
  setLocalTo(currentBlock.props.to || "");
18776
18818
  }, [getCurrentBlock]);
18777
- const hasLoadedTemplates = useRef14(false);
18778
- useEffect50(() => {
18819
+ const hasLoadedTemplates = useRef15(false);
18820
+ useEffect51(() => {
18779
18821
  if (hasLoadedTemplates.current) return;
18780
18822
  async function loadTemplates() {
18781
18823
  if (!handlers.listEmailTemplates) {
@@ -18797,7 +18839,7 @@ var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplat
18797
18839
  }
18798
18840
  loadTemplates();
18799
18841
  }, [handlers.listEmailTemplates]);
18800
- const handleTemplateSelect = useCallback48(
18842
+ const handleTemplateSelect = useCallback50(
18801
18843
  async (selectedTemplateName) => {
18802
18844
  if (!selectedTemplateName) {
18803
18845
  setLocalTemplateName("");
@@ -18886,7 +18928,7 @@ var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplat
18886
18928
  };
18887
18929
 
18888
18930
  // src/mantine/blocks/email/template/VariablesTab.tsx
18889
- import React176, { useMemo as useMemo54, useCallback as useCallback49, useState as useState66, useEffect as useEffect51 } from "react";
18931
+ import React176, { useMemo as useMemo54, useCallback as useCallback51, useState as useState67, useEffect as useEffect52 } from "react";
18890
18932
  import { Alert as Alert24, Badge as Badge26, Divider as Divider15, Group as Group58, Stack as Stack123, Text as Text97 } from "@mantine/core";
18891
18933
  import { IconInfoCircle as IconInfoCircle4, IconCheck as IconCheck7 } from "@tabler/icons-react";
18892
18934
  var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) => {
@@ -18906,8 +18948,8 @@ var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) =>
18906
18948
  return {};
18907
18949
  }
18908
18950
  }, [blockProps.variables]);
18909
- const [localMapping, setLocalMapping] = useState66(parsedVariableMapping);
18910
- useEffect51(() => {
18951
+ const [localMapping, setLocalMapping] = useState67(parsedVariableMapping);
18952
+ useEffect52(() => {
18911
18953
  const currentBlock = getCurrentBlock();
18912
18954
  try {
18913
18955
  const mapping = JSON.parse(currentBlock.props.variables || "{}");
@@ -18916,7 +18958,7 @@ var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) =>
18916
18958
  setLocalMapping({});
18917
18959
  }
18918
18960
  }, [getCurrentBlock]);
18919
- const handleVariableChange = useCallback49(
18961
+ const handleVariableChange = useCallback51(
18920
18962
  (variableName, value) => {
18921
18963
  const updated = { ...localMapping, [variableName]: value };
18922
18964
  setLocalMapping(updated);
@@ -18949,11 +18991,11 @@ var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) =>
18949
18991
  // src/mantine/blocks/email/template/TemplateConfig.tsx
18950
18992
  var TemplateConfig10 = ({ editor, block }) => {
18951
18993
  const { closePanel } = usePanelStore();
18952
- const getCurrentBlock = useCallback50(() => {
18994
+ const getCurrentBlock = useCallback52(() => {
18953
18995
  const currentBlock = editor.document.find((b) => b.id === block.id);
18954
18996
  return currentBlock || block;
18955
18997
  }, [editor, block.id]);
18956
- const updateProp = useCallback50(
18998
+ const updateProp = useCallback52(
18957
18999
  (key, value) => {
18958
19000
  const currentBlock = getCurrentBlock();
18959
19001
  editor.updateBlock(currentBlock, {
@@ -18965,7 +19007,7 @@ var TemplateConfig10 = ({ editor, block }) => {
18965
19007
  },
18966
19008
  [editor, getCurrentBlock]
18967
19009
  );
18968
- const handleTemplateChange = useCallback50(
19010
+ const handleTemplateChange = useCallback52(
18969
19011
  (updates) => {
18970
19012
  const currentBlock = getCurrentBlock();
18971
19013
  editor.updateBlock(currentBlock, {
@@ -18977,7 +19019,7 @@ var TemplateConfig10 = ({ editor, block }) => {
18977
19019
  },
18978
19020
  [editor, getCurrentBlock]
18979
19021
  );
18980
- const handleVariablesChange = useCallback50(
19022
+ const handleVariablesChange = useCallback52(
18981
19023
  (variables) => {
18982
19024
  updateProp("variables", variables);
18983
19025
  },
@@ -19047,11 +19089,11 @@ import { Group as Group60, Stack as Stack125, Text as Text99, ActionIcon as Acti
19047
19089
  import { IconSend as IconSend4, IconCheck as IconCheck8, IconX as IconX11 } from "@tabler/icons-react";
19048
19090
 
19049
19091
  // src/mantine/blocks/email/flow/hooks/useEmailActions.ts
19050
- import { useState as useState67, useCallback as useCallback51 } from "react";
19092
+ import { useState as useState68, useCallback as useCallback53 } from "react";
19051
19093
  function useEmailActions({ block, editor }) {
19052
19094
  const handlers = useBlocknoteHandlers();
19053
- const [loading, setLoading] = useState67(false);
19054
- const updateBlockStatus = useCallback51(
19095
+ const [loading, setLoading] = useState68(false);
19096
+ const updateBlockStatus = useCallback53(
19055
19097
  (updates) => {
19056
19098
  editor.updateBlock(block, {
19057
19099
  props: { ...block.props, ...updates }
@@ -19059,7 +19101,7 @@ function useEmailActions({ block, editor }) {
19059
19101
  },
19060
19102
  [editor, block]
19061
19103
  );
19062
- const sendEmail = useCallback51(async () => {
19104
+ const sendEmail = useCallback53(async () => {
19063
19105
  if (!handlers.sendEmail) {
19064
19106
  updateBlockStatus({
19065
19107
  status: "error",
@@ -19126,7 +19168,7 @@ function useEmailActions({ block, editor }) {
19126
19168
  setLoading(false);
19127
19169
  }
19128
19170
  }, [block, editor, handlers, updateBlockStatus]);
19129
- const resetStatus = useCallback51(() => {
19171
+ const resetStatus = useCallback53(() => {
19130
19172
  updateBlockStatus({
19131
19173
  status: "idle",
19132
19174
  error: ""
@@ -19283,15 +19325,15 @@ import React188 from "react";
19283
19325
  import React184, { useMemo as useMemo59 } from "react";
19284
19326
 
19285
19327
  // src/mantine/blocks/protocolSelector/template/TemplateConfig.tsx
19286
- import React183, { useCallback as useCallback52 } from "react";
19328
+ import React183, { useCallback as useCallback54 } from "react";
19287
19329
 
19288
19330
  // src/mantine/blocks/protocolSelector/template/GeneralTab.tsx
19289
- import React182, { useEffect as useEffect52, useMemo as useMemo58, useState as useState68 } from "react";
19331
+ import React182, { useEffect as useEffect53, useMemo as useMemo58, useState as useState69 } from "react";
19290
19332
  import { Divider as Divider17, Stack as Stack126, Text as Text100, PillsInput as PillsInput2, Pill as Pill2, Box as Box35 } from "@mantine/core";
19291
19333
  var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescriptionChange, onProtocolDidsChange }) => {
19292
- const [localTitle, setLocalTitle] = useState68(title || "");
19293
- const [localDescription, setLocalDescription] = useState68(description || "");
19294
- const [inputValue, setInputValue] = useState68("");
19334
+ const [localTitle, setLocalTitle] = useState69(title || "");
19335
+ const [localDescription, setLocalDescription] = useState69(description || "");
19336
+ const [inputValue, setInputValue] = useState69("");
19295
19337
  const localDids = useMemo58(() => {
19296
19338
  try {
19297
19339
  const parsed = JSON.parse(protocolDids || "[]");
@@ -19300,10 +19342,10 @@ var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescrip
19300
19342
  return [];
19301
19343
  }
19302
19344
  }, [protocolDids]);
19303
- useEffect52(() => {
19345
+ useEffect53(() => {
19304
19346
  setLocalTitle(title || "");
19305
19347
  }, [title]);
19306
- useEffect52(() => {
19348
+ useEffect53(() => {
19307
19349
  setLocalDescription(description || "");
19308
19350
  }, [description]);
19309
19351
  const handleAddDid = () => {
@@ -19361,7 +19403,7 @@ var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescrip
19361
19403
  // src/mantine/blocks/protocolSelector/template/TemplateConfig.tsx
19362
19404
  var TemplateConfig11 = ({ editor, block }) => {
19363
19405
  const { closePanel } = usePanelStore();
19364
- const updateProp = useCallback52(
19406
+ const updateProp = useCallback54(
19365
19407
  (key, value) => {
19366
19408
  editor.updateBlock(block, {
19367
19409
  props: {
@@ -19436,7 +19478,7 @@ import { Badge as Badge29, Box as Box38, Group as Group63, Stack as Stack129, Te
19436
19478
  import { IconCircleDashed as IconCircleDashed3, IconChecks } from "@tabler/icons-react";
19437
19479
 
19438
19480
  // src/mantine/blocks/protocolSelector/flow/ProtocolSelectionPanel.tsx
19439
- import React186, { useState as useState69, useEffect as useEffect53, useMemo as useMemo60, useCallback as useCallback53 } from "react";
19481
+ import React186, { useState as useState70, useEffect as useEffect54, useMemo as useMemo60, useCallback as useCallback55 } from "react";
19440
19482
  import { Stack as Stack128, Text as Text102, Box as Box37, Group as Group62, Loader as Loader25 } from "@mantine/core";
19441
19483
 
19442
19484
  // src/icons/EntityAvatar.tsx
@@ -19474,8 +19516,8 @@ var ProtocolSelectionPanel = ({ editor, block }) => {
19474
19516
  return [];
19475
19517
  }
19476
19518
  }, [block.props.protocolDids]);
19477
- const [protocols, setProtocols] = useState69([]);
19478
- useEffect53(() => {
19519
+ const [protocols, setProtocols] = useState70([]);
19520
+ useEffect54(() => {
19479
19521
  if (protocolDids.length === 0) {
19480
19522
  setProtocols([]);
19481
19523
  return;
@@ -19543,7 +19585,7 @@ var ProtocolSelectionPanel = ({ editor, block }) => {
19543
19585
  }
19544
19586
  });
19545
19587
  }, [protocolDids, handlers]);
19546
- const handleSelectProtocol = useCallback53(
19588
+ const handleSelectProtocol = useCallback55(
19547
19589
  (protocol) => {
19548
19590
  editor.updateBlock(block, {
19549
19591
  props: {
@@ -19699,22 +19741,22 @@ import React192, { useMemo as useMemo62 } from "react";
19699
19741
  import { Badge as Badge30, Group as Group64, Stack as Stack130, Text as Text105 } from "@mantine/core";
19700
19742
 
19701
19743
  // src/mantine/blocks/form/template/TemplateConfig.tsx
19702
- import React191, { useCallback as useCallback54 } from "react";
19744
+ import React191, { useCallback as useCallback56 } from "react";
19703
19745
  import { Paper as Paper16, CloseButton as CloseButton6, Title as Title9 } from "@mantine/core";
19704
19746
 
19705
19747
  // src/mantine/blocks/form/template/GeneralTab.tsx
19706
- import React190, { useEffect as useEffect54, useState as useState70 } from "react";
19748
+ import React190, { useEffect as useEffect55, useState as useState71 } from "react";
19707
19749
  import { Text as Text104 } from "@mantine/core";
19708
19750
  var GeneralTab12 = ({ title, description, icon, surveySchema, onTitleChange, onDescriptionChange, onIconChange, onSurveySchemaChange }) => {
19709
- const [localTitle, setLocalTitle] = useState70(title || "");
19710
- const [localDescription, setLocalDescription] = useState70(description || "");
19711
- const [localIcon, setLocalIcon] = useState70(icon || "checklist");
19712
- const [localSchema, setLocalSchema] = useState70(surveySchema || "");
19713
- const [schemaError, setSchemaError] = useState70(null);
19714
- useEffect54(() => setLocalTitle(title || ""), [title]);
19715
- useEffect54(() => setLocalDescription(description || ""), [description]);
19716
- useEffect54(() => setLocalIcon(icon || "checklist"), [icon]);
19717
- useEffect54(() => setLocalSchema(surveySchema || ""), [surveySchema]);
19751
+ const [localTitle, setLocalTitle] = useState71(title || "");
19752
+ const [localDescription, setLocalDescription] = useState71(description || "");
19753
+ const [localIcon, setLocalIcon] = useState71(icon || "checklist");
19754
+ const [localSchema, setLocalSchema] = useState71(surveySchema || "");
19755
+ const [schemaError, setSchemaError] = useState71(null);
19756
+ useEffect55(() => setLocalTitle(title || ""), [title]);
19757
+ useEffect55(() => setLocalDescription(description || ""), [description]);
19758
+ useEffect55(() => setLocalIcon(icon || "checklist"), [icon]);
19759
+ useEffect55(() => setLocalSchema(surveySchema || ""), [surveySchema]);
19718
19760
  const handleSchemaChange = (value) => {
19719
19761
  setLocalSchema(value);
19720
19762
  setSchemaError(null);
@@ -19784,7 +19826,7 @@ var GeneralTab12 = ({ title, description, icon, surveySchema, onTitleChange, onD
19784
19826
  // src/mantine/blocks/form/template/TemplateConfig.tsx
19785
19827
  var TemplateConfig12 = ({ editor, block }) => {
19786
19828
  const { closePanel } = usePanelStore();
19787
- const updateProp = useCallback54(
19829
+ const updateProp = useCallback56(
19788
19830
  (key, value) => {
19789
19831
  editor.updateBlock(block, {
19790
19832
  props: {
@@ -19858,12 +19900,12 @@ var FormTemplateView = ({ editor, block }) => {
19858
19900
  };
19859
19901
 
19860
19902
  // src/mantine/blocks/form/flow/FlowView.tsx
19861
- import React194, { useMemo as useMemo64, useState as useState71, useCallback as useCallback56 } from "react";
19903
+ import React194, { useMemo as useMemo64, useState as useState72, useCallback as useCallback58 } from "react";
19862
19904
  import { ActionIcon as ActionIcon31, Badge as Badge31, Group as Group65, Stack as Stack131, Text as Text107, Tooltip as Tooltip19 } from "@mantine/core";
19863
19905
  import { IconChevronRight as IconChevronRight7 } from "@tabler/icons-react";
19864
19906
 
19865
19907
  // src/mantine/blocks/form/flow/FormPanel.tsx
19866
- import React193, { useCallback as useCallback55, useEffect as useEffect55, useMemo as useMemo63, useRef as useRef15 } from "react";
19908
+ import React193, { useCallback as useCallback57, useEffect as useEffect56, useMemo as useMemo63, useRef as useRef16 } from "react";
19867
19909
  import { Alert as Alert26, Text as Text106 } from "@mantine/core";
19868
19910
  import { useDebouncedCallback as useDebouncedCallback2 } from "@mantine/hooks";
19869
19911
  import { IconAlertCircle as IconAlertCircle10 } from "@tabler/icons-react";
@@ -19888,8 +19930,8 @@ function deepEqual2(a, b) {
19888
19930
  }
19889
19931
  var FormPanel = ({ editor, block, onComplete }) => {
19890
19932
  const { closePanel } = usePanelStore();
19891
- const isUpdatingFromProp = useRef15(false);
19892
- const lastSyncedAnswers = useRef15("");
19933
+ const isUpdatingFromProp = useRef16(false);
19934
+ const lastSyncedAnswers = useRef16("");
19893
19935
  const surveySchema = useMemo63(() => {
19894
19936
  if (!block.props.surveySchema) return null;
19895
19937
  try {
@@ -19907,7 +19949,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19907
19949
  model.completeText = "Complete";
19908
19950
  return model;
19909
19951
  }, [surveySchema]);
19910
- const syncPropToSurvey = useCallback55(
19952
+ const syncPropToSurvey = useCallback57(
19911
19953
  (answersJson) => {
19912
19954
  if (!surveyModel || !answersJson || answersJson === lastSyncedAnswers.current) return;
19913
19955
  try {
@@ -19939,13 +19981,13 @@ var FormPanel = ({ editor, block, onComplete }) => {
19939
19981
  }
19940
19982
  });
19941
19983
  }, SYNC_DEBOUNCE_MS2);
19942
- useEffect55(() => {
19984
+ useEffect56(() => {
19943
19985
  const answersJson = block.props.answers;
19944
19986
  if (answersJson) {
19945
19987
  syncPropToSurvey(answersJson);
19946
19988
  }
19947
19989
  }, [block.props.answers, syncPropToSurvey]);
19948
- useEffect55(() => {
19990
+ useEffect56(() => {
19949
19991
  if (!surveyModel) return;
19950
19992
  const handleValueChanged = () => {
19951
19993
  if (isUpdatingFromProp.current) return;
@@ -19956,7 +19998,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19956
19998
  surveyModel.onValueChanged.remove(handleValueChanged);
19957
19999
  };
19958
20000
  }, [surveyModel, syncSurveyToProp]);
19959
- const handleSurveyComplete = useCallback55(
20001
+ const handleSurveyComplete = useCallback57(
19960
20002
  (sender) => {
19961
20003
  const data = sender.data || {};
19962
20004
  const finalAnswersJson = JSON.stringify(data);
@@ -19973,14 +20015,14 @@ var FormPanel = ({ editor, block, onComplete }) => {
19973
20015
  },
19974
20016
  [editor, block, onComplete]
19975
20017
  );
19976
- useEffect55(() => {
20018
+ useEffect56(() => {
19977
20019
  if (!surveyModel) return;
19978
20020
  surveyModel.onComplete.add(handleSurveyComplete);
19979
20021
  return () => {
19980
20022
  surveyModel.onComplete.remove(handleSurveyComplete);
19981
20023
  };
19982
20024
  }, [handleSurveyComplete, surveyModel]);
19983
- const handleClose = useCallback55(() => {
20025
+ const handleClose = useCallback57(() => {
19984
20026
  closePanel();
19985
20027
  }, [closePanel]);
19986
20028
  if (!surveySchema) {
@@ -20000,10 +20042,10 @@ var FormPanel = ({ editor, block, onComplete }) => {
20000
20042
  // src/mantine/blocks/form/flow/FlowView.tsx
20001
20043
  var FORM_FLOW_PANEL_ID = "form-flow-panel";
20002
20044
  var FormFlowView = ({ editor, block }) => {
20003
- const [hasOpened, setHasOpened] = useState71(false);
20045
+ const [hasOpened, setHasOpened] = useState72(false);
20004
20046
  const status = block.props.status || "pending";
20005
20047
  const isCompleted = status === "completed";
20006
- const handleComplete = useCallback56(() => {
20048
+ const handleComplete = useCallback58(() => {
20007
20049
  editor.updateBlock(block, {
20008
20050
  props: {
20009
20051
  ...block.props,
@@ -20098,17 +20140,17 @@ import React199, { useMemo as useMemo65 } from "react";
20098
20140
  import { Badge as Badge32, Group as Group66, Stack as Stack132, Text as Text108 } from "@mantine/core";
20099
20141
 
20100
20142
  // src/mantine/blocks/domainCreatorSign/template/TemplateConfig.tsx
20101
- import React198, { useCallback as useCallback57 } from "react";
20143
+ import React198, { useCallback as useCallback59 } from "react";
20102
20144
 
20103
20145
  // src/mantine/blocks/domainCreatorSign/template/GeneralTab.tsx
20104
- import React197, { useEffect as useEffect56, useState as useState72 } from "react";
20146
+ import React197, { useEffect as useEffect57, useState as useState73 } from "react";
20105
20147
  var GeneralTab13 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
20106
- const [localTitle, setLocalTitle] = useState72(title || "");
20107
- const [localDescription, setLocalDescription] = useState72(description || "");
20108
- const [localIcon, setLocalIcon] = useState72(icon || "file-text");
20109
- useEffect56(() => setLocalTitle(title || ""), [title]);
20110
- useEffect56(() => setLocalDescription(description || ""), [description]);
20111
- useEffect56(() => setLocalIcon(icon || "file-text"), [icon]);
20148
+ const [localTitle, setLocalTitle] = useState73(title || "");
20149
+ const [localDescription, setLocalDescription] = useState73(description || "");
20150
+ const [localIcon, setLocalIcon] = useState73(icon || "file-text");
20151
+ useEffect57(() => setLocalTitle(title || ""), [title]);
20152
+ useEffect57(() => setLocalDescription(description || ""), [description]);
20153
+ useEffect57(() => setLocalIcon(icon || "file-text"), [icon]);
20112
20154
  return /* @__PURE__ */ React197.createElement(BaseSection, null, /* @__PURE__ */ React197.createElement(
20113
20155
  BaseTextInput,
20114
20156
  {
@@ -20153,7 +20195,7 @@ var GeneralTab13 = ({ title, description, icon, onTitleChange, onDescriptionChan
20153
20195
  // src/mantine/blocks/domainCreatorSign/template/TemplateConfig.tsx
20154
20196
  var TemplateConfig13 = ({ editor, block }) => {
20155
20197
  const { closePanel } = usePanelStore();
20156
- const updateProp = useCallback57(
20198
+ const updateProp = useCallback59(
20157
20199
  (key, value) => {
20158
20200
  editor.updateBlock(block, {
20159
20201
  props: {
@@ -20212,14 +20254,14 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
20212
20254
  };
20213
20255
 
20214
20256
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
20215
- import React202, { useCallback as useCallback59, useMemo as useMemo66, useEffect as useEffect57 } from "react";
20257
+ import React202, { useCallback as useCallback61, useMemo as useMemo66, useEffect as useEffect58 } from "react";
20216
20258
  import { ActionIcon as ActionIcon32, Badge as Badge34, Group as Group69, Stack as Stack135, Text as Text111, Tooltip as Tooltip21 } from "@mantine/core";
20217
20259
  import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
20218
20260
 
20219
20261
  // src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
20220
20262
  import { Alert as Alert27, Button as Button34, Group as Group68, Loader as Loader26, Stack as Stack134, Text as Text110 } from "@mantine/core";
20221
20263
  import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck9 } from "@tabler/icons-react";
20222
- import React201, { useCallback as useCallback58, useState as useState74 } from "react";
20264
+ import React201, { useCallback as useCallback60, useState as useState75 } from "react";
20223
20265
 
20224
20266
  // src/mantine/blocks/domainCreatorSign/utils/buildLinkedEntityResource.ts
20225
20267
  function parseLinkedEntities2(entitiesString) {
@@ -20242,11 +20284,11 @@ function buildGovernanceGroupLinkedEntities(linkedEntities) {
20242
20284
  // src/mantine/components/Base/BaseSigning.tsx
20243
20285
  import { Badge as Badge33, Box as Box39, Flex as Flex30, Group as Group67, Slider, Stack as Stack133, Tabs as Tabs4, Text as Text109, Tooltip as Tooltip20 } from "@mantine/core";
20244
20286
  import { IconClock as IconClock2, IconFeather as IconFeather2, IconUsers as IconUsers3, IconArrowsExchange as IconArrowsExchange2, IconCalendar as IconCalendar2, IconLeaf as IconLeaf2, IconBolt } from "@tabler/icons-react";
20245
- import React200, { useState as useState73 } from "react";
20287
+ import React200, { useState as useState74 } from "react";
20246
20288
  function BaseSigning({ handleSign }) {
20247
- const [value, setValue] = useState73(23);
20248
- const [isSigned, setIsSigned] = useState73(false);
20249
- const [activeTab, setActiveTab] = useState73("agents");
20289
+ const [value, setValue] = useState74(23);
20290
+ const [isSigned, setIsSigned] = useState74(false);
20291
+ const [activeTab, setActiveTab] = useState74("agents");
20250
20292
  const handleSlideEnd = (sliderValue) => {
20251
20293
  if (sliderValue >= 60) {
20252
20294
  setValue(73);
@@ -20360,22 +20402,22 @@ function BaseSigning({ handleSign }) {
20360
20402
  var SignPanel = ({ editor, block, onComplete, onError }) => {
20361
20403
  const { closePanel } = usePanelStore();
20362
20404
  const { handlers } = useBlocknoteContext();
20363
- const [flowStep, setFlowStep] = useState74(block.props.status === "completed" ? "success" : block.props.status === "error" ? "error" : "ready");
20364
- const [error, setError] = useState74(block.props.errorMessage || null);
20365
- const [createdEntityDid, setCreatedEntityDid] = useState74(block.props.entityDid || null);
20366
- const getDomainCardData = useCallback58(() => {
20405
+ const [flowStep, setFlowStep] = useState75(block.props.status === "completed" ? "success" : block.props.status === "error" ? "error" : "ready");
20406
+ const [error, setError] = useState75(block.props.errorMessage || null);
20407
+ const [createdEntityDid, setCreatedEntityDid] = useState75(block.props.entityDid || null);
20408
+ const getDomainCardData = useCallback60(() => {
20367
20409
  try {
20368
20410
  return JSON.parse(block.props.domainCardData || "{}");
20369
20411
  } catch {
20370
20412
  return null;
20371
20413
  }
20372
20414
  }, [block.props.domainCardData]);
20373
- const getDate100YearsFromNow = useCallback58(() => {
20415
+ const getDate100YearsFromNow = useCallback60(() => {
20374
20416
  const date = /* @__PURE__ */ new Date();
20375
20417
  date.setFullYear(date.getFullYear() + 100);
20376
20418
  return date.toISOString();
20377
20419
  }, []);
20378
- const processSignAndCreate = useCallback58(async () => {
20420
+ const processSignAndCreate = useCallback60(async () => {
20379
20421
  if (!handlers) {
20380
20422
  throw new Error("Handlers not available");
20381
20423
  }
@@ -20463,7 +20505,7 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20463
20505
  transactionHash
20464
20506
  };
20465
20507
  }, [handlers, getDomainCardData, block, editor, getDate100YearsFromNow]);
20466
- const handleSign = useCallback58(async () => {
20508
+ const handleSign = useCallback60(async () => {
20467
20509
  try {
20468
20510
  const result = await processSignAndCreate();
20469
20511
  setCreatedEntityDid(result.entityDid);
@@ -20477,7 +20519,7 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20477
20519
  onError?.(errorMessage);
20478
20520
  }
20479
20521
  }, [processSignAndCreate, onComplete, onError]);
20480
- const handleRetry = useCallback58(() => {
20522
+ const handleRetry = useCallback60(() => {
20481
20523
  setFlowStep("ready");
20482
20524
  setError(null);
20483
20525
  editor.updateBlock(block, {
@@ -20488,10 +20530,10 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20488
20530
  }
20489
20531
  });
20490
20532
  }, [editor, block]);
20491
- const handleClose = useCallback58(() => {
20533
+ const handleClose = useCallback60(() => {
20492
20534
  closePanel();
20493
20535
  }, [closePanel]);
20494
- const handleVisitEntity = useCallback58(() => {
20536
+ const handleVisitEntity = useCallback60(() => {
20495
20537
  const entityType = block.props.entityType || "dao";
20496
20538
  if (createdEntityDid && handlers?.redirectToEntityOverview) {
20497
20539
  handlers.redirectToEntityOverview(createdEntityDid, entityType);
@@ -20539,7 +20581,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20539
20581
  const status = block.props.status || "pending";
20540
20582
  const domainCardData = block.props.domainCardData || "{}";
20541
20583
  const isDataReady = isDomainCardDataReady(domainCardData);
20542
- useEffect57(() => {
20584
+ useEffect58(() => {
20543
20585
  if (status === "pending" && isDataReady) {
20544
20586
  editor.updateBlock(block, {
20545
20587
  props: {
@@ -20549,7 +20591,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20549
20591
  });
20550
20592
  }
20551
20593
  }, [isDataReady, status, editor, block]);
20552
- const handleComplete = useCallback59(
20594
+ const handleComplete = useCallback61(
20553
20595
  (result) => {
20554
20596
  editor.updateBlock(block, {
20555
20597
  props: {
@@ -20562,7 +20604,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20562
20604
  },
20563
20605
  [editor, block]
20564
20606
  );
20565
- const handleError = useCallback59(
20607
+ const handleError = useCallback61(
20566
20608
  (errorMessage) => {
20567
20609
  editor.updateBlock(block, {
20568
20610
  props: {
@@ -20687,18 +20729,18 @@ import React207, { useMemo as useMemo67 } from "react";
20687
20729
  import { Badge as Badge35, Group as Group70, Stack as Stack136, Text as Text112 } from "@mantine/core";
20688
20730
 
20689
20731
  // src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
20690
- import React206, { useCallback as useCallback60 } from "react";
20732
+ import React206, { useCallback as useCallback62 } from "react";
20691
20733
  import { Paper as Paper17, CloseButton as CloseButton7, Title as Title10 } from "@mantine/core";
20692
20734
 
20693
20735
  // src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
20694
- import React205, { useEffect as useEffect58, useState as useState75 } from "react";
20736
+ import React205, { useEffect as useEffect59, useState as useState76 } from "react";
20695
20737
  var GeneralTab14 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
20696
- const [localTitle, setLocalTitle] = useState75(title || "");
20697
- const [localDescription, setLocalDescription] = useState75(description || "");
20698
- const [localIcon, setLocalIcon] = useState75(icon || "dots-circle");
20699
- useEffect58(() => setLocalTitle(title || ""), [title]);
20700
- useEffect58(() => setLocalDescription(description || ""), [description]);
20701
- useEffect58(() => setLocalIcon(icon || "dots-circle"), [icon]);
20738
+ const [localTitle, setLocalTitle] = useState76(title || "");
20739
+ const [localDescription, setLocalDescription] = useState76(description || "");
20740
+ const [localIcon, setLocalIcon] = useState76(icon || "dots-circle");
20741
+ useEffect59(() => setLocalTitle(title || ""), [title]);
20742
+ useEffect59(() => setLocalDescription(description || ""), [description]);
20743
+ useEffect59(() => setLocalIcon(icon || "dots-circle"), [icon]);
20702
20744
  return /* @__PURE__ */ React205.createElement(BaseSection, null, /* @__PURE__ */ React205.createElement(
20703
20745
  BaseTextInput,
20704
20746
  {
@@ -20743,7 +20785,7 @@ var GeneralTab14 = ({ title, description, icon, onTitleChange, onDescriptionChan
20743
20785
  // src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
20744
20786
  var TemplateConfig14 = ({ editor, block }) => {
20745
20787
  const { closePanel } = usePanelStore();
20746
- const updateProp = useCallback60(
20788
+ const updateProp = useCallback62(
20747
20789
  (key, value) => {
20748
20790
  editor.updateBlock(block, {
20749
20791
  props: {
@@ -20814,7 +20856,7 @@ var DomainCardViewerTemplateView = ({ editor, block }) => {
20814
20856
  };
20815
20857
 
20816
20858
  // src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
20817
- import React209, { useMemo as useMemo69, useCallback as useCallback61, useEffect as useEffect59 } from "react";
20859
+ import React209, { useMemo as useMemo69, useCallback as useCallback63, useEffect as useEffect60 } from "react";
20818
20860
  import { ActionIcon as ActionIcon33, Badge as Badge36, Button as Button36, Group as Group71, Stack as Stack138, Text as Text114, Tooltip as Tooltip22 } from "@mantine/core";
20819
20861
  import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash6 } from "@tabler/icons-react";
20820
20862
 
@@ -21129,7 +21171,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21129
21171
  const status = block.props.status || "pending";
21130
21172
  const domainPreviewData = block.props.domainPreviewData || "{}";
21131
21173
  const isDataReady = isPreviewDataReady(domainPreviewData);
21132
- useEffect59(() => {
21174
+ useEffect60(() => {
21133
21175
  if (status === "pending" && isDataReady) {
21134
21176
  editor.updateBlock(block, {
21135
21177
  props: {
@@ -21139,7 +21181,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21139
21181
  });
21140
21182
  }
21141
21183
  }, [isDataReady, status, editor, block]);
21142
- const handleApprove = useCallback61(() => {
21184
+ const handleApprove = useCallback63(() => {
21143
21185
  editor.updateBlock(block, {
21144
21186
  props: {
21145
21187
  ...block.props,
@@ -21150,7 +21192,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21150
21192
  const panelId = `${DOMAIN_CARD_VIEWER_FLOW_PANEL_ID}-${block.id}`;
21151
21193
  const panelContent = useMemo69(() => /* @__PURE__ */ React209.createElement(ViewerPanel, { editor, block, onApprove: handleApprove }), [editor, block, handleApprove]);
21152
21194
  const { open } = usePanel(panelId, panelContent);
21153
- const handleInjectDummyData = useCallback61(
21195
+ const handleInjectDummyData = useCallback63(
21154
21196
  (e) => {
21155
21197
  e.stopPropagation();
21156
21198
  editor.updateBlock(block, {
@@ -21166,7 +21208,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21166
21208
  },
21167
21209
  [editor, block]
21168
21210
  );
21169
- const handleSetLoading = useCallback61(
21211
+ const handleSetLoading = useCallback63(
21170
21212
  (e) => {
21171
21213
  e.stopPropagation();
21172
21214
  editor.updateBlock(block, {
@@ -21179,7 +21221,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21179
21221
  },
21180
21222
  [editor, block]
21181
21223
  );
21182
- const handleClearData = useCallback61(
21224
+ const handleClearData = useCallback63(
21183
21225
  (e) => {
21184
21226
  e.stopPropagation();
21185
21227
  editor.updateBlock(block, {
@@ -21282,10 +21324,10 @@ import React214, { useMemo as useMemo70 } from "react";
21282
21324
  import { Badge as Badge37, Group as Group72, Stack as Stack140, Text as Text116 } from "@mantine/core";
21283
21325
 
21284
21326
  // src/mantine/blocks/governanceGroup/template/TemplateConfig.tsx
21285
- import React213, { useCallback as useCallback62 } from "react";
21327
+ import React213, { useCallback as useCallback64 } from "react";
21286
21328
 
21287
21329
  // src/mantine/blocks/governanceGroup/template/GeneralTab.tsx
21288
- import React212, { useEffect as useEffect60, useState as useState76 } from "react";
21330
+ import React212, { useEffect as useEffect61, useState as useState77 } from "react";
21289
21331
  import { Card as Card19, SimpleGrid as SimpleGrid2, Stack as Stack139, Text as Text115, ThemeIcon as ThemeIcon3 } from "@mantine/core";
21290
21332
  import { IconUsers as IconUsers4, IconSignature, IconPhoto as IconPhoto2, IconCoin } from "@tabler/icons-react";
21291
21333
 
@@ -21325,12 +21367,12 @@ var GROUP_TYPE_ICONS = {
21325
21367
  tokenStaking: /* @__PURE__ */ React212.createElement(IconCoin, { size: 20 })
21326
21368
  };
21327
21369
  var GeneralTab15 = ({ title, description, icon, groupType, onTitleChange, onDescriptionChange, onIconChange, onGroupTypeChange }) => {
21328
- const [localTitle, setLocalTitle] = useState76(title || "");
21329
- const [localDescription, setLocalDescription] = useState76(description || "");
21330
- const [localIcon, setLocalIcon] = useState76(icon || "users");
21331
- useEffect60(() => setLocalTitle(title || ""), [title]);
21332
- useEffect60(() => setLocalDescription(description || ""), [description]);
21333
- useEffect60(() => setLocalIcon(icon || "users"), [icon]);
21370
+ const [localTitle, setLocalTitle] = useState77(title || "");
21371
+ const [localDescription, setLocalDescription] = useState77(description || "");
21372
+ const [localIcon, setLocalIcon] = useState77(icon || "users");
21373
+ useEffect61(() => setLocalTitle(title || ""), [title]);
21374
+ useEffect61(() => setLocalDescription(description || ""), [description]);
21375
+ useEffect61(() => setLocalIcon(icon || "users"), [icon]);
21334
21376
  return /* @__PURE__ */ React212.createElement(BaseSection, null, /* @__PURE__ */ React212.createElement(Stack139, { gap: "md" }, /* @__PURE__ */ React212.createElement(Text115, { size: "sm", fw: 500 }, "Group Type"), /* @__PURE__ */ React212.createElement(SimpleGrid2, { cols: 2, spacing: "sm" }, GROUP_TYPE_CONFIGS.map((config) => {
21335
21377
  const isSelected = groupType === config.type;
21336
21378
  return /* @__PURE__ */ React212.createElement(
@@ -22118,7 +22160,7 @@ var getSurveyForGroupType = (groupType) => {
22118
22160
  // src/mantine/blocks/governanceGroup/template/TemplateConfig.tsx
22119
22161
  var TemplateConfig15 = ({ editor, block }) => {
22120
22162
  const { closePanel } = usePanelStore();
22121
- const updateProp = useCallback62(
22163
+ const updateProp = useCallback64(
22122
22164
  (key, value) => {
22123
22165
  editor.updateBlock(block, {
22124
22166
  props: {
@@ -22129,7 +22171,7 @@ var TemplateConfig15 = ({ editor, block }) => {
22129
22171
  },
22130
22172
  [editor, block]
22131
22173
  );
22132
- const handleGroupTypeChange = useCallback62(
22174
+ const handleGroupTypeChange = useCallback64(
22133
22175
  (groupType) => {
22134
22176
  const surveySchema = getSurveyForGroupType(groupType);
22135
22177
  editor.updateBlock(block, {
@@ -22199,12 +22241,12 @@ var GovernanceGroupTemplateView = ({ editor, block }) => {
22199
22241
  };
22200
22242
 
22201
22243
  // src/mantine/blocks/governanceGroup/flow/FlowView.tsx
22202
- import React216, { useCallback as useCallback64, useEffect as useEffect62, useMemo as useMemo72, useRef as useRef17, useState as useState78 } from "react";
22244
+ import React216, { useCallback as useCallback66, useEffect as useEffect63, useMemo as useMemo72, useRef as useRef18, useState as useState79 } from "react";
22203
22245
  import { ActionIcon as ActionIcon34, Badge as Badge38, Group as Group74, Stack as Stack142, Text as Text118, Tooltip as Tooltip23 } from "@mantine/core";
22204
22246
  import { IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
22205
22247
 
22206
22248
  // src/mantine/blocks/governanceGroup/flow/GovernanceGroupPanel.tsx
22207
- import React215, { useCallback as useCallback63, useEffect as useEffect61, useMemo as useMemo71, useRef as useRef16, useState as useState77 } from "react";
22249
+ import React215, { useCallback as useCallback65, useEffect as useEffect62, useMemo as useMemo71, useRef as useRef17, useState as useState78 } from "react";
22208
22250
  import { Alert as Alert29, Button as Button37, Card as Card20, Group as Group73, Loader as Loader28, SimpleGrid as SimpleGrid3, Stack as Stack141, Text as Text117, ThemeIcon as ThemeIcon4 } from "@mantine/core";
22209
22251
  import { useDebouncedCallback as useDebouncedCallback3 } from "@mantine/hooks";
22210
22252
  import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck11, IconUsers as IconUsers5, IconSignature as IconSignature2, IconPhoto as IconPhoto3, IconCoin as IconCoin2, IconArrowLeft as IconArrowLeft5 } from "@tabler/icons-react";
@@ -22244,13 +22286,13 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22244
22286
  if (existingGroupType) return "survey";
22245
22287
  return "typeSelection";
22246
22288
  };
22247
- const [flowStep, setFlowStep] = useState77(getInitialFlowStep);
22248
- const [selectedGroupType, setSelectedGroupType] = useState77(existingGroupType || null);
22249
- const [error, setError] = useState77(null);
22250
- const [createdCoreAddress, setCreatedCoreAddress] = useState77(existingCoreAddress || null);
22251
- const [createdGroupAddress, setCreatedGroupAddress] = useState77(block.props.groupAddress || null);
22252
- const isUpdatingFromProp = useRef16(false);
22253
- const lastSyncedAnswers = useRef16("");
22289
+ const [flowStep, setFlowStep] = useState78(getInitialFlowStep);
22290
+ const [selectedGroupType, setSelectedGroupType] = useState78(existingGroupType || null);
22291
+ const [error, setError] = useState78(null);
22292
+ const [createdCoreAddress, setCreatedCoreAddress] = useState78(existingCoreAddress || null);
22293
+ const [createdGroupAddress, setCreatedGroupAddress] = useState78(block.props.groupAddress || null);
22294
+ const isUpdatingFromProp = useRef17(false);
22295
+ const lastSyncedAnswers = useRef17("");
22254
22296
  const surveyModel = useMemo71(() => {
22255
22297
  if (!selectedGroupType) return null;
22256
22298
  const surveySchema = getSurveyForGroupType(selectedGroupType);
@@ -22261,7 +22303,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22261
22303
  model.questionsOnPageMode = "singlePage";
22262
22304
  return model;
22263
22305
  }, [selectedGroupType]);
22264
- const syncPropToSurvey = useCallback63(
22306
+ const syncPropToSurvey = useCallback65(
22265
22307
  (answersJson) => {
22266
22308
  if (!answersJson || answersJson === lastSyncedAnswers.current || !surveyModel) return;
22267
22309
  try {
@@ -22293,13 +22335,13 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22293
22335
  }
22294
22336
  });
22295
22337
  }, SYNC_DEBOUNCE_MS3);
22296
- useEffect61(() => {
22338
+ useEffect62(() => {
22297
22339
  const answersJson = block.props.answers;
22298
22340
  if (answersJson && surveyModel) {
22299
22341
  syncPropToSurvey(answersJson);
22300
22342
  }
22301
22343
  }, [block.props.answers, syncPropToSurvey, surveyModel]);
22302
- useEffect61(() => {
22344
+ useEffect62(() => {
22303
22345
  if (!surveyModel) return;
22304
22346
  const handleValueChanged = () => {
22305
22347
  if (isUpdatingFromProp.current) return;
@@ -22324,7 +22366,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22324
22366
  lastSyncedAnswers.current = "";
22325
22367
  setFlowStep("survey");
22326
22368
  };
22327
- const processGroupCreation = useCallback63(
22369
+ const processGroupCreation = useCallback65(
22328
22370
  async (data) => {
22329
22371
  if (!handlers) {
22330
22372
  throw new Error("Handlers not available");
@@ -22346,7 +22388,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22346
22388
  },
22347
22389
  [handlers, selectedGroupType]
22348
22390
  );
22349
- const handleSurveyComplete = useCallback63(
22391
+ const handleSurveyComplete = useCallback65(
22350
22392
  async (sender) => {
22351
22393
  const data = sender.data || {};
22352
22394
  try {
@@ -22383,19 +22425,19 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22383
22425
  },
22384
22426
  [processGroupCreation, onComplete, editor, block, selectedGroupType]
22385
22427
  );
22386
- useEffect61(() => {
22428
+ useEffect62(() => {
22387
22429
  if (!surveyModel) return;
22388
22430
  surveyModel.onComplete.add(handleSurveyComplete);
22389
22431
  return () => {
22390
22432
  surveyModel.onComplete.remove(handleSurveyComplete);
22391
22433
  };
22392
22434
  }, [handleSurveyComplete, surveyModel]);
22393
- const handleRetry = useCallback63(() => {
22435
+ const handleRetry = useCallback65(() => {
22394
22436
  setFlowStep("survey");
22395
22437
  setError(null);
22396
22438
  surveyModel?.clear();
22397
22439
  }, [surveyModel]);
22398
- const handleBackToTypeSelection = useCallback63(() => {
22440
+ const handleBackToTypeSelection = useCallback65(() => {
22399
22441
  setSelectedGroupType(null);
22400
22442
  setFlowStep("typeSelection");
22401
22443
  editor.updateBlock(block, {
@@ -22407,7 +22449,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22407
22449
  }
22408
22450
  });
22409
22451
  }, [editor, block]);
22410
- const handleClose = useCallback63(() => {
22452
+ const handleClose = useCallback65(() => {
22411
22453
  closePanel();
22412
22454
  }, [closePanel]);
22413
22455
  if (flowStep === "typeSelection") {
@@ -22450,13 +22492,13 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22450
22492
  // src/mantine/blocks/governanceGroup/flow/FlowView.tsx
22451
22493
  var GOVERNANCE_GROUP_FLOW_PANEL_ID = "governance-group-flow-panel";
22452
22494
  var GovernanceGroupFlowView = ({ editor, block }) => {
22453
- const [hasOpened, setHasOpened] = useState78(false);
22454
- const [submissionStatus, setSubmissionStatus] = useState78("idle");
22495
+ const [hasOpened, setHasOpened] = useState79(false);
22496
+ const [submissionStatus, setSubmissionStatus] = useState79("idle");
22455
22497
  const lastSubmission = block.props.lastSubmission ? JSON.parse(block.props.lastSubmission) : null;
22456
22498
  const hasExistingSubmission = lastSubmission?.coreAddress;
22457
- const editorRef = useRef17(editor);
22458
- const blockRef = useRef17(block);
22459
- useEffect62(() => {
22499
+ const editorRef = useRef18(editor);
22500
+ const blockRef = useRef18(block);
22501
+ useEffect63(() => {
22460
22502
  editorRef.current = editor;
22461
22503
  blockRef.current = block;
22462
22504
  });
@@ -22478,8 +22520,8 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22478
22520
  // eslint-disable-next-line react-hooks/exhaustive-deps
22479
22521
  []
22480
22522
  );
22481
- const handleCompleteRef = useRef17();
22482
- const handleComplete = useCallback64((data) => {
22523
+ const handleCompleteRef = useRef18();
22524
+ const handleComplete = useCallback66((data) => {
22483
22525
  const currentEditor = editorRef.current;
22484
22526
  const currentBlock = blockRef.current;
22485
22527
  currentEditor.updateBlock(currentBlock, {
@@ -22499,10 +22541,10 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22499
22541
  });
22500
22542
  setSubmissionStatus("success");
22501
22543
  }, []);
22502
- useEffect62(() => {
22544
+ useEffect63(() => {
22503
22545
  handleCompleteRef.current = handleComplete;
22504
22546
  });
22505
- const stableHandleComplete = useCallback64(
22547
+ const stableHandleComplete = useCallback66(
22506
22548
  (data) => {
22507
22549
  handleCompleteRef.current?.(data);
22508
22550
  },
@@ -22646,14 +22688,14 @@ function generateId(prefix) {
22646
22688
  }
22647
22689
 
22648
22690
  // src/mantine/blocks/flowLink/template/WorkspacePageSelector.tsx
22649
- import React220, { useEffect as useEffect63, useState as useState79 } from "react";
22691
+ import React220, { useEffect as useEffect64, useState as useState80 } from "react";
22650
22692
  import { Loader as Loader29, Alert as Alert30 } from "@mantine/core";
22651
22693
  var WorkspacePageSelector = ({ selectedPageId, onSelect }) => {
22652
22694
  const handlers = useBlocknoteHandlers();
22653
- const [pages, setPages] = useState79([]);
22654
- const [loading, setLoading] = useState79(false);
22655
- const [error, setError] = useState79(null);
22656
- useEffect63(() => {
22695
+ const [pages, setPages] = useState80([]);
22696
+ const [loading, setLoading] = useState80(false);
22697
+ const [error, setError] = useState80(null);
22698
+ useEffect64(() => {
22657
22699
  const fetchPages = async () => {
22658
22700
  if (!handlers.getWorkspacePages) {
22659
22701
  setError("Workspace pages not supported");
@@ -22873,15 +22915,15 @@ import React225, { useMemo as useMemo75 } from "react";
22873
22915
  import { Badge as Badge40, Group as Group78, Stack as Stack147, Text as Text122, Tooltip as Tooltip25 } from "@mantine/core";
22874
22916
 
22875
22917
  // src/mantine/blocks/flowLink/flow/FlowLinkPanel.tsx
22876
- import React224, { useState as useState80, useEffect as useEffect64, useCallback as useCallback65 } from "react";
22918
+ import React224, { useState as useState81, useEffect as useEffect65, useCallback as useCallback67 } from "react";
22877
22919
  import { Stack as Stack146, Text as Text121, Card as Card22, Group as Group77, Badge as Badge39, ActionIcon as ActionIcon36, Loader as Loader30, Tooltip as Tooltip24 } from "@mantine/core";
22878
22920
  import { IconRefresh as IconRefresh7, IconCheck as IconCheck12, IconClock as IconClock3, IconCircleDashed as IconCircleDashed4 } from "@tabler/icons-react";
22879
22921
  var FlowLinkPanel = ({ block }) => {
22880
22922
  const { closePanel } = usePanelStore();
22881
22923
  const handlers = useBlocknoteHandlers();
22882
22924
  const links = safeParseJSONArray(block.props.links).sort((a, b) => a.position - b.position);
22883
- const [linksWithStatus, setLinksWithStatus] = useState80(links.map((link) => ({ ...link })));
22884
- const fetchStatuses = useCallback65(async () => {
22925
+ const [linksWithStatus, setLinksWithStatus] = useState81(links.map((link) => ({ ...link })));
22926
+ const fetchStatuses = useCallback67(async () => {
22885
22927
  if (!handlers.getFlowStatus) {
22886
22928
  return;
22887
22929
  }
@@ -22898,7 +22940,7 @@ var FlowLinkPanel = ({ block }) => {
22898
22940
  );
22899
22941
  setLinksWithStatus(updatedLinks);
22900
22942
  }, [handlers, links]);
22901
- useEffect64(() => {
22943
+ useEffect65(() => {
22902
22944
  fetchStatuses();
22903
22945
  }, []);
22904
22946
  const handleNavigate = (link) => {
@@ -23199,7 +23241,7 @@ blockRegistry.register({
23199
23241
  });
23200
23242
 
23201
23243
  // src/mantine/blocks/hooks/useBlockDependencies.ts
23202
- import { useMemo as useMemo76, useEffect as useEffect65, useState as useState81, useCallback as useCallback66 } from "react";
23244
+ import { useMemo as useMemo76, useEffect as useEffect66, useState as useState82, useCallback as useCallback68 } from "react";
23203
23245
 
23204
23246
  // src/mantine/blocks/hooks/useDependsOn.ts
23205
23247
  import { useMemo as useMemo77 } from "react";
@@ -23769,14 +23811,14 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
23769
23811
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
23770
23812
 
23771
23813
  // src/core/hooks/useMatrixProvider.ts
23772
- import { useEffect as useEffect66, useState as useState82, useRef as useRef18, useCallback as useCallback67, useMemo as useMemo78 } from "react";
23814
+ import { useEffect as useEffect67, useState as useState83, useRef as useRef19, useCallback as useCallback69, useMemo as useMemo78 } from "react";
23773
23815
  import { MatrixProvider } from "@ixo/matrix-crdt";
23774
23816
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23775
- const [matrixProvider, setProvider] = useState82(null);
23776
- const [status, setStatus] = useState82("disconnected");
23777
- const isMountedRef = useRef18(true);
23778
- const providerRef = useRef18(null);
23779
- const retryTimeoutRef = useRef18(null);
23817
+ const [matrixProvider, setProvider] = useState83(null);
23818
+ const [status, setStatus] = useState83("disconnected");
23819
+ const isMountedRef = useRef19(true);
23820
+ const providerRef = useRef19(null);
23821
+ const retryTimeoutRef = useRef19(null);
23780
23822
  const providerOptions = useMemo78(
23781
23823
  () => ({
23782
23824
  translator: {
@@ -23790,22 +23832,22 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23790
23832
  }),
23791
23833
  []
23792
23834
  );
23793
- const handleDocumentAvailable = useCallback67(() => {
23835
+ const handleDocumentAvailable = useCallback69(() => {
23794
23836
  if (isMountedRef.current) {
23795
23837
  setStatus("connected");
23796
23838
  }
23797
23839
  }, []);
23798
- const handleDocumentUnavailable = useCallback67(() => {
23840
+ const handleDocumentUnavailable = useCallback69(() => {
23799
23841
  if (isMountedRef.current) {
23800
23842
  setStatus("failed");
23801
23843
  }
23802
23844
  }, []);
23803
- const handleCanWriteChanged = useCallback67(() => {
23845
+ const handleCanWriteChanged = useCallback69(() => {
23804
23846
  if (isMountedRef.current && providerRef.current) {
23805
23847
  setStatus(providerRef.current.canWrite ? "connected" : "failed");
23806
23848
  }
23807
23849
  }, []);
23808
- const initProvider = useCallback67(async () => {
23850
+ const initProvider = useCallback69(async () => {
23809
23851
  if (!isMountedRef.current) return;
23810
23852
  if (retryTimeoutRef.current) {
23811
23853
  clearTimeout(retryTimeoutRef.current);
@@ -23838,7 +23880,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23838
23880
  }
23839
23881
  }
23840
23882
  }, [matrixClient, providerOptions, handleDocumentAvailable, handleDocumentUnavailable, handleCanWriteChanged]);
23841
- useEffect66(() => {
23883
+ useEffect67(() => {
23842
23884
  isMountedRef.current = true;
23843
23885
  initProvider();
23844
23886
  return () => {
@@ -23855,7 +23897,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23855
23897
  setStatus("disconnected");
23856
23898
  };
23857
23899
  }, [initProvider]);
23858
- useEffect66(() => {
23900
+ useEffect67(() => {
23859
23901
  return () => {
23860
23902
  isMountedRef.current = false;
23861
23903
  };
@@ -23874,7 +23916,7 @@ function useCollaborativeYDoc(_options) {
23874
23916
  }
23875
23917
 
23876
23918
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
23877
- import { useMemo as useMemo80, useEffect as useEffect67, useState as useState83 } from "react";
23919
+ import { useMemo as useMemo80, useEffect as useEffect68, useState as useState84 } from "react";
23878
23920
 
23879
23921
  // src/core/lib/matrixMetadata.ts
23880
23922
  var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
@@ -24059,7 +24101,7 @@ function useCreateCollaborativeIxoEditor(options) {
24059
24101
  roomId: options.roomId
24060
24102
  });
24061
24103
  const metadataManager = useMemo80(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
24062
- useEffect67(() => {
24104
+ useEffect68(() => {
24063
24105
  return () => {
24064
24106
  metadataManager.dispose();
24065
24107
  };
@@ -24311,12 +24353,12 @@ function useCreateCollaborativeIxoEditor(options) {
24311
24353
  return void 0;
24312
24354
  };
24313
24355
  }
24314
- useEffect67(() => {
24356
+ useEffect68(() => {
24315
24357
  if (ixoEditor) {
24316
24358
  ixoEditor.isEditable = editable;
24317
24359
  }
24318
24360
  }, [ixoEditor, editable]);
24319
- useEffect67(() => {
24361
+ useEffect68(() => {
24320
24362
  if (connectionStatus !== "connected") {
24321
24363
  return;
24322
24364
  }
@@ -24338,9 +24380,9 @@ function useCreateCollaborativeIxoEditor(options) {
24338
24380
  titleText.insert(0, options.title);
24339
24381
  }
24340
24382
  }, [connectionStatus, root, titleText, permissions.write, options.docId, options.title, memoizedUser.id]);
24341
- const [connectedUsers, setConnectedUsers] = useState83([]);
24383
+ const [connectedUsers, setConnectedUsers] = useState84([]);
24342
24384
  const webrtcProvider = matrixProvider?.webrtcProvider;
24343
- useEffect67(() => {
24385
+ useEffect68(() => {
24344
24386
  if (!matrixProvider?.awarenessInstance || !webrtcProvider || connectionStatus !== "connected") {
24345
24387
  return;
24346
24388
  }
@@ -24359,7 +24401,7 @@ function useCreateCollaborativeIxoEditor(options) {
24359
24401
  awareness.off("change", updateUsers);
24360
24402
  };
24361
24403
  }, [matrixProvider, webrtcProvider, connectionStatus]);
24362
- useEffect67(() => {
24404
+ useEffect68(() => {
24363
24405
  if (!matrixProvider?.awarenessInstance || !webrtcProvider || connectionStatus !== "connected") {
24364
24406
  return;
24365
24407
  }
@@ -24397,7 +24439,7 @@ function useCreateCollaborativeIxoEditor(options) {
24397
24439
  }
24398
24440
 
24399
24441
  // src/mantine/components/Base/BaseIconPicker.tsx
24400
- import React229, { useState as useState84, useMemo as useMemo81, useEffect as useEffect68 } from "react";
24442
+ import React229, { useState as useState85, useMemo as useMemo81, useEffect as useEffect69 } from "react";
24401
24443
  import { TextInput as TextInput7, Tabs as Tabs5, Box as Box41, Stack as Stack148, UnstyledButton as UnstyledButton2, Text as Text123, Center as Center12, ScrollArea as ScrollArea8, Group as Group79, Popover as Popover4 } from "@mantine/core";
24402
24444
  import * as TablerIcons from "@tabler/icons-react";
24403
24445
  import { IconSearch as IconSearch6, IconX as IconX12, IconChevronLeft, IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
@@ -24455,9 +24497,9 @@ var localStorageService = {
24455
24497
  var iconsKey = "editor_recent_icons";
24456
24498
  var ICONS_PER_PAGE = 500;
24457
24499
  function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children, currentIcon }) {
24458
- const [searchQuery, setSearchQuery] = useState84("");
24459
- const [activeTab, setActiveTab] = useState84("icons");
24460
- const [currentPage, setCurrentPage] = useState84(1);
24500
+ const [searchQuery, setSearchQuery] = useState85("");
24501
+ const [activeTab, setActiveTab] = useState85("icons");
24502
+ const [currentPage, setCurrentPage] = useState85(1);
24461
24503
  const allIcons = useMemo81(() => {
24462
24504
  const iconEntries = Object.entries(TablerIcons).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
24463
24505
  return iconEntries;
@@ -24467,7 +24509,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24467
24509
  const query = searchQuery.toLowerCase();
24468
24510
  return allIcons.filter(([name]) => name.toLowerCase().includes(query));
24469
24511
  }, [allIcons, searchQuery]);
24470
- useEffect68(() => {
24512
+ useEffect69(() => {
24471
24513
  setCurrentPage(1);
24472
24514
  }, [searchQuery]);
24473
24515
  const paginatedIcons = useMemo81(() => {
@@ -24578,7 +24620,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24578
24620
  }
24579
24621
 
24580
24622
  // src/mantine/components/CoverImage.tsx
24581
- import React231, { useState as useState85, useRef as useRef19, useEffect as useEffect69 } from "react";
24623
+ import React231, { useState as useState86, useRef as useRef20, useEffect as useEffect70 } from "react";
24582
24624
  import { Box as Box43, Group as Group80 } from "@mantine/core";
24583
24625
 
24584
24626
  // src/core/lib/imageTransform.ts
@@ -24764,14 +24806,14 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
24764
24806
  import { useDisclosure as useDisclosure5 } from "@mantine/hooks";
24765
24807
  function CoverImage({ coverImageUrl, logoUrl }) {
24766
24808
  const { editor, handlers, editable } = useBlocknoteContext();
24767
- const [isHovering, setIsHovering] = useState85(false);
24768
- const [isRepositioning, setIsRepositioning] = useState85(false);
24769
- const [coverPosition, setCoverPosition] = useState85(50);
24770
- const coverFileInputRef = useRef19(null);
24771
- const logoFileInputRef = useRef19(null);
24809
+ const [isHovering, setIsHovering] = useState86(false);
24810
+ const [isRepositioning, setIsRepositioning] = useState86(false);
24811
+ const [coverPosition, setCoverPosition] = useState86(50);
24812
+ const coverFileInputRef = useRef20(null);
24813
+ const logoFileInputRef = useRef20(null);
24772
24814
  const [opened, { open, close }] = useDisclosure5(false);
24773
- const [metadata, setMetadata] = useState85(() => editor?.getPageMetadata?.() || null);
24774
- useEffect69(() => {
24815
+ const [metadata, setMetadata] = useState86(() => editor?.getPageMetadata?.() || null);
24816
+ useEffect70(() => {
24775
24817
  if (!editor?._metadataManager) {
24776
24818
  return;
24777
24819
  }
@@ -25046,7 +25088,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
25046
25088
  }
25047
25089
 
25048
25090
  // src/mantine/components/PageHeader.tsx
25049
- import React232, { useState as useState86, useRef as useRef20, useEffect as useEffect70 } from "react";
25091
+ import React232, { useState as useState87, useRef as useRef21, useEffect as useEffect71 } from "react";
25050
25092
  function PageHeader({
25051
25093
  title = "New page",
25052
25094
  icon,
@@ -25058,11 +25100,11 @@ function PageHeader({
25058
25100
  isFavorited = false,
25059
25101
  menuItems = []
25060
25102
  }) {
25061
- const [isMenuOpen, setIsMenuOpen] = useState86(false);
25062
- const [isPrivacyOpen, setIsPrivacyOpen] = useState86(false);
25063
- const menuRef = useRef20(null);
25064
- const privacyRef = useRef20(null);
25065
- useEffect70(() => {
25103
+ const [isMenuOpen, setIsMenuOpen] = useState87(false);
25104
+ const [isPrivacyOpen, setIsPrivacyOpen] = useState87(false);
25105
+ const menuRef = useRef21(null);
25106
+ const privacyRef = useRef21(null);
25107
+ useEffect71(() => {
25066
25108
  function handleClickOutside(event) {
25067
25109
  if (menuRef.current && !menuRef.current.contains(event.target)) {
25068
25110
  setIsMenuOpen(false);
@@ -25260,7 +25302,7 @@ var styles = {
25260
25302
  };
25261
25303
 
25262
25304
  // src/mantine/components/ExternalDropZone.tsx
25263
- import React233, { useCallback as useCallback68, useEffect as useEffect71, useRef as useRef21, useState as useState87 } from "react";
25305
+ import React233, { useCallback as useCallback70, useEffect as useEffect72, useRef as useRef22, useState as useState88 } from "react";
25264
25306
  import { Box as Box44 } from "@mantine/core";
25265
25307
  var SCROLL_ZONE_SIZE = 80;
25266
25308
  var SCROLL_SPEED = 12;
@@ -25273,20 +25315,20 @@ var ExternalDropZone = ({
25273
25315
  onPlacementCancel,
25274
25316
  children
25275
25317
  }) => {
25276
- const containerRef = useRef21(null);
25277
- const [isValidDrag, setIsValidDrag] = useState87(false);
25278
- const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState87(false);
25279
- const [indicatorStyle, setIndicatorStyle] = useState87({});
25280
- const dropPositionRef = useRef21(null);
25281
- const scrollAnimationRef = useRef21(null);
25282
- const scrollDirectionRef = useRef21(null);
25283
- const scrollContainerRef = useRef21(null);
25284
- const getBlockElements = useCallback68(() => {
25318
+ const containerRef = useRef22(null);
25319
+ const [isValidDrag, setIsValidDrag] = useState88(false);
25320
+ const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState88(false);
25321
+ const [indicatorStyle, setIndicatorStyle] = useState88({});
25322
+ const dropPositionRef = useRef22(null);
25323
+ const scrollAnimationRef = useRef22(null);
25324
+ const scrollDirectionRef = useRef22(null);
25325
+ const scrollContainerRef = useRef22(null);
25326
+ const getBlockElements = useCallback70(() => {
25285
25327
  if (!containerRef.current) return [];
25286
25328
  const blocks = containerRef.current.querySelectorAll('[data-node-type="blockContainer"]');
25287
25329
  return Array.from(blocks);
25288
25330
  }, []);
25289
- const getScrollContainer = useCallback68(() => {
25331
+ const getScrollContainer = useCallback70(() => {
25290
25332
  if (scrollContainerRef.current) return scrollContainerRef.current;
25291
25333
  let element = containerRef.current;
25292
25334
  while (element) {
@@ -25301,7 +25343,7 @@ var ExternalDropZone = ({
25301
25343
  scrollContainerRef.current = window;
25302
25344
  return window;
25303
25345
  }, []);
25304
- const performScroll = useCallback68(() => {
25346
+ const performScroll = useCallback70(() => {
25305
25347
  const container = getScrollContainer();
25306
25348
  const direction = scrollDirectionRef.current;
25307
25349
  if (!direction) {
@@ -25316,7 +25358,7 @@ var ExternalDropZone = ({
25316
25358
  }
25317
25359
  scrollAnimationRef.current = requestAnimationFrame(performScroll);
25318
25360
  }, [getScrollContainer]);
25319
- const startAutoScroll = useCallback68(
25361
+ const startAutoScroll = useCallback70(
25320
25362
  (direction) => {
25321
25363
  if (scrollDirectionRef.current === direction) return;
25322
25364
  scrollDirectionRef.current = direction;
@@ -25326,14 +25368,14 @@ var ExternalDropZone = ({
25326
25368
  },
25327
25369
  [performScroll]
25328
25370
  );
25329
- const stopAutoScroll = useCallback68(() => {
25371
+ const stopAutoScroll = useCallback70(() => {
25330
25372
  scrollDirectionRef.current = null;
25331
25373
  if (scrollAnimationRef.current) {
25332
25374
  cancelAnimationFrame(scrollAnimationRef.current);
25333
25375
  scrollAnimationRef.current = null;
25334
25376
  }
25335
25377
  }, []);
25336
- const checkAutoScroll = useCallback68(
25378
+ const checkAutoScroll = useCallback70(
25337
25379
  (clientY) => {
25338
25380
  const container = getScrollContainer();
25339
25381
  let containerTop;
@@ -25356,7 +25398,7 @@ var ExternalDropZone = ({
25356
25398
  },
25357
25399
  [getScrollContainer, startAutoScroll, stopAutoScroll]
25358
25400
  );
25359
- const findDropPosition = useCallback68(
25401
+ const findDropPosition = useCallback70(
25360
25402
  (clientY) => {
25361
25403
  const blocks = getBlockElements();
25362
25404
  if (blocks.length === 0 || !editor?.document) return null;
@@ -25389,7 +25431,7 @@ var ExternalDropZone = ({
25389
25431
  },
25390
25432
  [getBlockElements, editor]
25391
25433
  );
25392
- const handleDragOver = useCallback68(
25434
+ const handleDragOver = useCallback70(
25393
25435
  (e) => {
25394
25436
  if (!e.dataTransfer.types.includes(acceptedType)) return;
25395
25437
  e.preventDefault();
@@ -25412,7 +25454,7 @@ var ExternalDropZone = ({
25412
25454
  },
25413
25455
  [acceptedType, findDropPosition, checkAutoScroll]
25414
25456
  );
25415
- const handleDragLeave = useCallback68(
25457
+ const handleDragLeave = useCallback70(
25416
25458
  (e) => {
25417
25459
  if (containerRef.current && !containerRef.current.contains(e.relatedTarget)) {
25418
25460
  setIsValidDrag(false);
@@ -25422,7 +25464,7 @@ var ExternalDropZone = ({
25422
25464
  },
25423
25465
  [stopAutoScroll]
25424
25466
  );
25425
- const handleDrop = useCallback68(
25467
+ const handleDrop = useCallback70(
25426
25468
  (e) => {
25427
25469
  e.preventDefault();
25428
25470
  e.stopPropagation();
@@ -25436,7 +25478,7 @@ var ExternalDropZone = ({
25436
25478
  },
25437
25479
  [onDrop, stopAutoScroll]
25438
25480
  );
25439
- useEffect71(() => {
25481
+ useEffect72(() => {
25440
25482
  const handleGlobalDragEnd = () => {
25441
25483
  setIsValidDrag(false);
25442
25484
  dropPositionRef.current = null;
@@ -25445,7 +25487,7 @@ var ExternalDropZone = ({
25445
25487
  window.addEventListener("dragend", handleGlobalDragEnd);
25446
25488
  return () => window.removeEventListener("dragend", handleGlobalDragEnd);
25447
25489
  }, [stopAutoScroll]);
25448
- const handleOverlayMouseMove = useCallback68(
25490
+ const handleOverlayMouseMove = useCallback70(
25449
25491
  (e) => {
25450
25492
  setIsHoveringInPlacementMode(true);
25451
25493
  checkAutoScroll(e.clientY);
@@ -25464,12 +25506,12 @@ var ExternalDropZone = ({
25464
25506
  },
25465
25507
  [findDropPosition, checkAutoScroll]
25466
25508
  );
25467
- const handleOverlayMouseLeave = useCallback68(() => {
25509
+ const handleOverlayMouseLeave = useCallback70(() => {
25468
25510
  setIsHoveringInPlacementMode(false);
25469
25511
  dropPositionRef.current = null;
25470
25512
  stopAutoScroll();
25471
25513
  }, [stopAutoScroll]);
25472
- const handleOverlayClick = useCallback68(
25514
+ const handleOverlayClick = useCallback70(
25473
25515
  (e) => {
25474
25516
  e.preventDefault();
25475
25517
  e.stopPropagation();
@@ -25483,7 +25525,7 @@ var ExternalDropZone = ({
25483
25525
  },
25484
25526
  [onDrop, stopAutoScroll]
25485
25527
  );
25486
- const handleOverlayWheel = useCallback68(
25528
+ const handleOverlayWheel = useCallback70(
25487
25529
  (e) => {
25488
25530
  const container = getScrollContainer();
25489
25531
  if (container === window) {
@@ -25494,7 +25536,7 @@ var ExternalDropZone = ({
25494
25536
  },
25495
25537
  [getScrollContainer]
25496
25538
  );
25497
- useEffect71(() => {
25539
+ useEffect72(() => {
25498
25540
  if (!isPlacementMode) return;
25499
25541
  const handleKeyDown = (e) => {
25500
25542
  if (e.key === "Escape") {
@@ -25517,13 +25559,13 @@ var ExternalDropZone = ({
25517
25559
  document.removeEventListener("click", handleGlobalClick, true);
25518
25560
  };
25519
25561
  }, [isPlacementMode, onPlacementCancel]);
25520
- useEffect71(() => {
25562
+ useEffect72(() => {
25521
25563
  if (!isPlacementMode) {
25522
25564
  setIsHoveringInPlacementMode(false);
25523
25565
  dropPositionRef.current = null;
25524
25566
  }
25525
25567
  }, [isPlacementMode]);
25526
- useEffect71(() => {
25568
+ useEffect72(() => {
25527
25569
  const isActive = isValidDrag || isPlacementMode && isHoveringInPlacementMode;
25528
25570
  if (isActive) {
25529
25571
  document.body.classList.add("external-artifact-drag-active");
@@ -25534,7 +25576,7 @@ var ExternalDropZone = ({
25534
25576
  document.body.classList.remove("external-artifact-drag-active");
25535
25577
  };
25536
25578
  }, [isValidDrag, isPlacementMode, isHoveringInPlacementMode]);
25537
- useEffect71(() => {
25579
+ useEffect72(() => {
25538
25580
  return () => {
25539
25581
  if (scrollAnimationRef.current) {
25540
25582
  cancelAnimationFrame(scrollAnimationRef.current);
@@ -25586,7 +25628,7 @@ var ExternalDropZone = ({
25586
25628
  };
25587
25629
 
25588
25630
  // src/mantine/IxoEditor.tsx
25589
- import React235, { useState as useState88, useEffect as useEffect72, useCallback as useCallback69 } from "react";
25631
+ import React235, { useState as useState89, useEffect as useEffect73, useCallback as useCallback71 } from "react";
25590
25632
  import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
25591
25633
  import { BlockNoteView } from "@blocknote/mantine";
25592
25634
  import { filterSuggestionItems } from "@blocknote/core";
@@ -25664,8 +25706,8 @@ function IxoEditorContent({
25664
25706
  }) {
25665
25707
  const { activePanel } = usePanelStore();
25666
25708
  const isPanelOpen = activePanel !== null;
25667
- const [isRoomPrivate, setIsRoomPrivate] = useState88(pageHeaderProps?.isPrivate ?? true);
25668
- useEffect72(() => {
25709
+ const [isRoomPrivate, setIsRoomPrivate] = useState89(pageHeaderProps?.isPrivate ?? true);
25710
+ useEffect73(() => {
25669
25711
  const matrixClient = editor.getMatrixClient?.();
25670
25712
  const roomId = editor.getRoomId?.();
25671
25713
  if (!matrixClient || !roomId) return;
@@ -25681,7 +25723,7 @@ function IxoEditorContent({
25681
25723
  } catch {
25682
25724
  }
25683
25725
  }, [editor]);
25684
- const handlePrivacyChange = useCallback69(
25726
+ const handlePrivacyChange = useCallback71(
25685
25727
  async (makePrivate) => {
25686
25728
  const matrixClient = editor.getMatrixClient?.();
25687
25729
  const roomId = editor.getRoomId?.();
@@ -25836,7 +25878,7 @@ function IxoEditor({
25836
25878
  }
25837
25879
 
25838
25880
  // src/mantine/components/EntitySigningSetup.tsx
25839
- import React236, { useState as useState89 } from "react";
25881
+ import React236, { useState as useState90 } from "react";
25840
25882
  import { Modal as Modal3, Stack as Stack149, Text as Text124, TextInput as TextInput8, Button as Button39, Alert as Alert31, Group as Group81 } from "@mantine/core";
25841
25883
  import { IconAlertCircle as IconAlertCircle14, IconCheck as IconCheck13, IconKey as IconKey2 } from "@tabler/icons-react";
25842
25884
  var EntitySigningSetup = ({
@@ -25846,11 +25888,11 @@ var EntitySigningSetup = ({
25846
25888
  entityName,
25847
25889
  onSetup
25848
25890
  }) => {
25849
- const [pin, setPin] = useState89("");
25850
- const [confirmPin, setConfirmPin] = useState89("");
25851
- const [loading, setLoading] = useState89(false);
25852
- const [error, setError] = useState89(null);
25853
- const [success, setSuccess] = useState89(false);
25891
+ const [pin, setPin] = useState90("");
25892
+ const [confirmPin, setConfirmPin] = useState90("");
25893
+ const [loading, setLoading] = useState90(false);
25894
+ const [error, setError] = useState90(null);
25895
+ const [success, setSuccess] = useState90(false);
25854
25896
  const handleSetup = async () => {
25855
25897
  if (pin.length < 4) {
25856
25898
  setError("PIN must be at least 4 characters");
@@ -25932,7 +25974,7 @@ var EntitySigningSetup = ({
25932
25974
  };
25933
25975
 
25934
25976
  // src/mantine/components/FlowPermissionsPanel.tsx
25935
- import React237, { useState as useState90, useEffect as useEffect73, useMemo as useMemo83 } from "react";
25977
+ import React237, { useState as useState91, useEffect as useEffect74, useMemo as useMemo83 } from "react";
25936
25978
  import { Stack as Stack150, Text as Text125, Paper as Paper19, Group as Group82, Badge as Badge41, Button as Button40, ActionIcon as ActionIcon37, Loader as Loader31, Alert as Alert32, Divider as Divider19 } from "@mantine/core";
25937
25979
  import { IconPlus as IconPlus7, IconTrash as IconTrash8, IconShieldCheck as IconShieldCheck2, IconUser as IconUser5, IconRobot as IconRobot4, IconBuilding } from "@tabler/icons-react";
25938
25980
  var FlowPermissionsPanel = ({
@@ -25943,11 +25985,11 @@ var FlowPermissionsPanel = ({
25943
25985
  onRevokePermission,
25944
25986
  getUserDisplayName
25945
25987
  }) => {
25946
- const [delegations, setDelegations] = useState90([]);
25947
- const [loading, setLoading] = useState90(true);
25948
- const [revoking, setRevoking] = useState90(null);
25988
+ const [delegations, setDelegations] = useState91([]);
25989
+ const [loading, setLoading] = useState91(true);
25990
+ const [revoking, setRevoking] = useState91(null);
25949
25991
  const rootCapability = useMemo83(() => editor.getRootCapability?.(), [editor]);
25950
- useEffect73(() => {
25992
+ useEffect74(() => {
25951
25993
  const loadDelegations = async () => {
25952
25994
  setLoading(true);
25953
25995
  const allDelegations = editor.getAllDelegations?.() || [];
@@ -26031,7 +26073,7 @@ var FlowPermissionsPanel = ({
26031
26073
  };
26032
26074
 
26033
26075
  // src/mantine/components/GrantPermissionModal.tsx
26034
- import React238, { useState as useState91, useCallback as useCallback70 } from "react";
26076
+ import React238, { useState as useState92, useCallback as useCallback72 } from "react";
26035
26077
  import {
26036
26078
  Modal as Modal4,
26037
26079
  Stack as Stack151,
@@ -26063,21 +26105,21 @@ var GrantPermissionModal = ({
26063
26105
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
26064
26106
  const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
26065
26107
  const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
26066
- const [recipientType, setRecipientType] = useState91("user");
26067
- const [searchQuery, setSearchQuery] = useState91("");
26068
- const [searchResults, setSearchResults] = useState91([]);
26069
- const [searching, setSearching] = useState91(false);
26070
- const [selectedRecipient, setSelectedRecipient] = useState91(null);
26071
- const [manualDid, setManualDid] = useState91("");
26072
- const [scopeType, setScopeType] = useState91("full");
26073
- const [selectedBlocks, setSelectedBlocks] = useState91([]);
26074
- const [expirationEnabled, setExpirationEnabled] = useState91(false);
26075
- const [expirationDays, setExpirationDays] = useState91(30);
26076
- const [canDelegate, setCanDelegate] = useState91(false);
26077
- const [pin, setPin] = useState91("");
26078
- const [loading, setLoading] = useState91(false);
26079
- const [error, setError] = useState91(null);
26080
- const handleSearch = useCallback70(async () => {
26108
+ const [recipientType, setRecipientType] = useState92("user");
26109
+ const [searchQuery, setSearchQuery] = useState92("");
26110
+ const [searchResults, setSearchResults] = useState92([]);
26111
+ const [searching, setSearching] = useState92(false);
26112
+ const [selectedRecipient, setSelectedRecipient] = useState92(null);
26113
+ const [manualDid, setManualDid] = useState92("");
26114
+ const [scopeType, setScopeType] = useState92("full");
26115
+ const [selectedBlocks, setSelectedBlocks] = useState92([]);
26116
+ const [expirationEnabled, setExpirationEnabled] = useState92(false);
26117
+ const [expirationDays, setExpirationDays] = useState92(30);
26118
+ const [canDelegate, setCanDelegate] = useState92(false);
26119
+ const [pin, setPin] = useState92("");
26120
+ const [loading, setLoading] = useState92(false);
26121
+ const [error, setError] = useState92(null);
26122
+ const handleSearch = useCallback72(async () => {
26081
26123
  if (searchQuery.length < 2) return;
26082
26124
  setSearching(true);
26083
26125
  try {
@@ -26374,4 +26416,4 @@ export {
26374
26416
  ixoGraphQLClient,
26375
26417
  getEntity
26376
26418
  };
26377
- //# sourceMappingURL=chunk-DSHJZVWK.mjs.map
26419
+ //# sourceMappingURL=chunk-443WXWOY.mjs.map