@geowiki/ui 0.16.9-dev.9 → 0.16.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  __require,
5
5
  __spreadProps,
6
6
  __spreadValues
7
- } from "./chunk-2KORXHVU.mjs";
7
+ } from "./chunk-IIIL7C6U.mjs";
8
8
 
9
9
  // src/index.tsx
10
10
  export * from "@geowiki/design-system";
@@ -38,8 +38,7 @@ var NextImage = ({
38
38
  import classNames from "classnames";
39
39
  import { jsx as jsx2 } from "react/jsx-runtime";
40
40
  var HtmlLinkList = ({ links }) => {
41
- if (!links)
42
- return null;
41
+ if (!links) return null;
43
42
  return /* @__PURE__ */ jsx2("div", { children: links == null ? void 0 : links.map((link) => {
44
43
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
45
44
  return /* @__PURE__ */ jsx2(
@@ -229,8 +228,7 @@ function parseTitle(title, type) {
229
228
  return parsedTitle.join("");
230
229
  }
231
230
  var isAdmin = (token) => {
232
- if (!token)
233
- return false;
231
+ if (!token) return false;
234
232
  try {
235
233
  const decodedToken = jwtDecode(token);
236
234
  return decodedToken.role.includes(USER_ROLE.ADMIN) || decodedToken.role.includes(USER_ROLE.FARMER_CLUSTER_ADMIN);
@@ -703,7 +701,7 @@ var ProfileSettings = ({ data }) => {
703
701
  const { handleSubmit, register } = useForm();
704
702
  const { toast: toast2 } = useToast();
705
703
  const queryClient = useQueryClient();
706
- const onSubmit = (data2) => __async(void 0, null, function* () {
704
+ const onSubmit = (data2) => __async(null, null, function* () {
707
705
  try {
708
706
  yield ProfileService.profileUpdate(data2);
709
707
  toast2({
@@ -787,7 +785,7 @@ var ChangePassword = () => {
787
785
  newPassword: "",
788
786
  confirmNewPassword: ""
789
787
  });
790
- const onSubmit = (data) => __async(void 0, null, function* () {
788
+ const onSubmit = (data) => __async(null, null, function* () {
791
789
  if (shouldDisabled()) {
792
790
  toast2({
793
791
  title: "Password Incorrect",
@@ -904,7 +902,7 @@ var AccountEdit = ({ data, open, setOpen }) => {
904
902
  const handleInputChange = () => {
905
903
  setShowSaving(false);
906
904
  };
907
- const onSubmit = (data2) => __async(void 0, null, function* () {
905
+ const onSubmit = (data2) => __async(null, null, function* () {
908
906
  try {
909
907
  yield ProfileService3.profileUpdate(data2);
910
908
  toast2({
@@ -1160,7 +1158,7 @@ var PasswordEdit = ({ open, setOpen }) => {
1160
1158
  setIsSaving(false);
1161
1159
  }
1162
1160
  }, [formValues, hasInteracted]);
1163
- const onSubmit = (data) => __async(void 0, null, function* () {
1161
+ const onSubmit = (data) => __async(null, null, function* () {
1164
1162
  try {
1165
1163
  setIsSaving(true);
1166
1164
  const requestBody = data;
@@ -1456,7 +1454,7 @@ var TestEmail = ({ onDismiss }) => {
1456
1454
  useEffect2(() => {
1457
1455
  setOpen(true);
1458
1456
  }, []);
1459
- const onSubmit = (data) => __async(void 0, null, function* () {
1457
+ const onSubmit = (data) => __async(null, null, function* () {
1460
1458
  try {
1461
1459
  const payload = data;
1462
1460
  yield EmailSettingsService.emailSettingsSendTestEmail(payload);
@@ -1545,7 +1543,7 @@ var Emailing = () => {
1545
1543
  },
1546
1544
  [emailSettingDto]
1547
1545
  );
1548
- const onSubmitEvent = () => __async(void 0, null, function* () {
1546
+ const onSubmitEvent = () => __async(null, null, function* () {
1549
1547
  try {
1550
1548
  yield EmailSettingsService2.emailSettingsUpdate(__spreadValues({}, emailSettingDto));
1551
1549
  toast2({
@@ -1789,7 +1787,7 @@ var AddTenant = () => {
1789
1787
  const { toast: toast2 } = useToast6();
1790
1788
  const { handleSubmit, register } = useForm7();
1791
1789
  const queryClient = useQueryClient5();
1792
- const onSubmit = (data) => __async(void 0, null, function* () {
1790
+ const onSubmit = (data) => __async(null, null, function* () {
1793
1791
  const newTenant = data;
1794
1792
  try {
1795
1793
  yield TenantService.tenantCreate(newTenant);
@@ -1904,7 +1902,7 @@ var TenantEdit = ({
1904
1902
  setEnableHost(true);
1905
1903
  }
1906
1904
  }, [tenantDto, (_a = tenantDto == null ? void 0 : tenantDto.extraProperties) == null ? void 0 : _a.Host]);
1907
- const onSubmit = (dto) => __async(void 0, null, function* () {
1905
+ const onSubmit = (dto) => __async(null, null, function* () {
1908
1906
  const tenant = dto;
1909
1907
  try {
1910
1908
  yield TenantService2.tenantUpdate(tenantId, tenant);
@@ -2061,7 +2059,7 @@ var FeatureList = ({ onDismiss, tenantId }) => {
2061
2059
  setEnableEmailSetting(value);
2062
2060
  }
2063
2061
  };
2064
- const onSubmit = () => __async(void 0, null, function* () {
2062
+ const onSubmit = () => __async(null, null, function* () {
2065
2063
  try {
2066
2064
  const featureUpdateDto = {};
2067
2065
  featureUpdateDto.features = [
@@ -2095,7 +2093,7 @@ var FeatureList = ({ onDismiss, tenantId }) => {
2095
2093
  }
2096
2094
  }
2097
2095
  });
2098
- const onResetToDefaultEvent = () => __async(void 0, null, function* () {
2096
+ const onResetToDefaultEvent = () => __async(null, null, function* () {
2099
2097
  try {
2100
2098
  yield FeaturesService.featuresDelete(PermissionProvider.T, tenantId);
2101
2099
  toast2({
@@ -2194,8 +2192,7 @@ import {
2194
2192
  import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
2195
2193
  var PermissionActions = ({ actions }) => {
2196
2194
  const renderElement = (action) => {
2197
- if (!action.showButton || action.visible)
2198
- return false;
2195
+ if (!action.showButton || action.visible) return false;
2199
2196
  return /* @__PURE__ */ jsx23(DropdownMenuItem, { children: /* @__PURE__ */ jsxs20(Button12, { variant: "secondary", onClick: action.callback, size: "sm", children: [
2200
2197
  action.icon === "permission" && /* @__PURE__ */ jsxs20("div", { className: "flex items-center space-x-1", children: [
2201
2198
  /* @__PURE__ */ jsx23(
@@ -2284,7 +2281,7 @@ var DeleteTenant = ({
2284
2281
  }) => {
2285
2282
  const { toast: toast2 } = useToast9();
2286
2283
  const [open, setOpen] = useState13(false);
2287
- const onYesEvent = () => __async(void 0, null, function* () {
2284
+ const onYesEvent = () => __async(null, null, function* () {
2288
2285
  try {
2289
2286
  yield TenantService3.tenantDelete(tenantId);
2290
2287
  toast2({
@@ -2485,7 +2482,7 @@ var AddUser = ({ showButtonAdd }) => {
2485
2482
  const { toast: toast2 } = useToast10();
2486
2483
  const queryClient = useQueryClient9();
2487
2484
  const { handleSubmit, register } = useForm10();
2488
- const onSubmit = (data) => __async(void 0, null, function* () {
2485
+ const onSubmit = (data) => __async(null, null, function* () {
2489
2486
  const user = data;
2490
2487
  user.isActive = isActive;
2491
2488
  user.lockoutEnabled = lockoutEnabled;
@@ -2616,7 +2613,7 @@ var DeleteUser = ({
2616
2613
  }) => {
2617
2614
  const { toast: toast2 } = useToast11();
2618
2615
  const [open, setOpen] = useState16(false);
2619
- const onYesEvent = () => __async(void 0, null, function* () {
2616
+ const onYesEvent = () => __async(null, null, function* () {
2620
2617
  try {
2621
2618
  yield UserService2.userDelete(userId);
2622
2619
  toast2({
@@ -2797,8 +2794,7 @@ function formatUserAlias(userName) {
2797
2794
  var _a, _b;
2798
2795
  const parts = userName.split("_");
2799
2796
  const first = ((_b = (_a = parts[0].at(0)) == null ? void 0 : _a.toUpperCase()) != null ? _b : "") + parts[0].substring(1);
2800
- if (!parts[1])
2801
- return first;
2797
+ if (!parts[1]) return first;
2802
2798
  return first + "(" + parts[1].toUpperCase() + ")";
2803
2799
  }
2804
2800
  var UserEdit = ({ userDto, userId, onDismiss }) => {
@@ -2862,20 +2858,16 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
2862
2858
  setRefreshData(false);
2863
2859
  };
2864
2860
  if ((updateUserRoleProjectResult == null ? void 0 : updateUserRoleProjectResult.success) == true) {
2865
- if (userAlias != "")
2866
- setUserAlias("");
2867
- if (userProjectRole.length != 0)
2868
- setUserProjectRole([]);
2861
+ if (userAlias != "") setUserAlias("");
2862
+ if (userProjectRole.length != 0) setUserProjectRole([]);
2869
2863
  }
2870
2864
  if (setUserDetail && setUserDetail.success == true) {
2871
- if (contractStartDate != "")
2872
- setContractStartDate("");
2873
- if (contractEndDate != "")
2874
- setContractEndDate("");
2865
+ if (contractStartDate != "") setContractStartDate("");
2866
+ if (contractEndDate != "") setContractEndDate("");
2875
2867
  setUpdateUserDetail(false);
2876
2868
  setRefreshData(false);
2877
2869
  }
2878
- const updateUserRoleProject = () => __async(void 0, null, function* () {
2870
+ const updateUserRoleProject = () => __async(null, null, function* () {
2879
2871
  setUserAlias(formatUserAlias(userDto.userName));
2880
2872
  setUpdateUserProject(true);
2881
2873
  });
@@ -2925,18 +2917,15 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
2925
2917
  const paginationComponentOptions = {
2926
2918
  noRowsPerPage: true
2927
2919
  };
2928
- const onSubmit = (data) => __async(void 0, null, function* () {
2920
+ const onSubmit = (data) => __async(null, null, function* () {
2929
2921
  const user = data;
2930
2922
  try {
2931
2923
  if (evolandFeature) {
2932
- if (!updateUserProject)
2933
- yield updateUserRoleProject();
2924
+ if (!updateUserProject) yield updateUserRoleProject();
2934
2925
  if (userCurrentProject && (userCurrentProject[0].contract_start_date != contractStartDate || userCurrentProject[0].contract_end_date != contractEndDate)) {
2935
- if (contractStartDate == "")
2936
- setContractStartDate(null);
2937
- if (contractEndDate == "")
2938
- setContractEndDate(null);
2939
- if ((contractStartDate == "" || !contractStartDate) && contractEndDate || contractEndDate && contractStartDate && new Date(contractEndDate) < new Date(contractEndDate)) {
2926
+ if (contractStartDate == "") setContractStartDate(null);
2927
+ if (contractEndDate == "") setContractEndDate(null);
2928
+ if ((contractStartDate == "" || !contractStartDate) && contractEndDate || contractEndDate && contractStartDate && new Date(contractEndDate) < new Date(contractStartDate)) {
2940
2929
  alert("Please provide correct date");
2941
2930
  return;
2942
2931
  }
@@ -2963,14 +2952,10 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
2963
2952
  });
2964
2953
  const onCloseEvent = () => {
2965
2954
  setOpen(false);
2966
- if (userAlias != "")
2967
- setUserAlias("");
2968
- if (userProjectRole.length != 0)
2969
- setUserProjectRole([]);
2970
- if (contractStartDate != "")
2971
- setContractStartDate("");
2972
- if (contractEndDate != "")
2973
- setContractEndDate("");
2955
+ if (userAlias != "") setUserAlias("");
2956
+ if (userProjectRole.length != 0) setUserProjectRole([]);
2957
+ if (contractStartDate != "") setContractStartDate("");
2958
+ if (contractEndDate != "") setContractEndDate("");
2974
2959
  onDismiss();
2975
2960
  };
2976
2961
  useEffect9(() => {
@@ -3002,7 +2987,7 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
3002
2987
  },
3003
2988
  [roles]
3004
2989
  );
3005
- const onRoleAssignedSaveEvent = (e) => __async(void 0, null, function* () {
2990
+ const onRoleAssignedSaveEvent = (e) => __async(null, null, function* () {
3006
2991
  var _a2;
3007
2992
  e.preventDefault();
3008
2993
  const updateUserDto = __spreadProps(__spreadValues({}, userDto), {
@@ -3087,8 +3072,7 @@ var UserEdit = ({ userDto, userId, onDismiss }) => {
3087
3072
  onChange: (e) => {
3088
3073
  if ((contractStartDate == "" || !contractStartDate) && e.target.value !== "" || new Date(contractStartDate) > new Date(e.target.value))
3089
3074
  alert("Please provide correct start date");
3090
- else
3091
- setContractEndDate(e.target.value);
3075
+ else setContractEndDate(e.target.value);
3092
3076
  }
3093
3077
  })
3094
3078
  )
@@ -3435,8 +3419,7 @@ var UserPermission = ({
3435
3419
  var _a;
3436
3420
  return (_a = g.permissions) == null ? void 0 : _a.every((p) => p.isGranted);
3437
3421
  }).every((e) => e);
3438
- if (hasAllPermissionGranted)
3439
- setHasAllGranted(hasAllPermissionGranted);
3422
+ if (hasAllPermissionGranted) setHasAllGranted(hasAllPermissionGranted);
3440
3423
  }
3441
3424
  }, [permissionGroups]);
3442
3425
  useEffect11(() => {
@@ -3500,7 +3483,7 @@ var UserPermission = ({
3500
3483
  [hasAllGranted, permissionGroups]
3501
3484
  );
3502
3485
  const onSubmit = useCallback5(
3503
- (e) => __async(void 0, null, function* () {
3486
+ (e) => __async(null, null, function* () {
3504
3487
  e.preventDefault();
3505
3488
  const payload = permissionGroups == null ? void 0 : permissionGroups.map(
3506
3489
  (p) => p.permissions.map((grant) => ({
@@ -3856,7 +3839,7 @@ var DeleteRole = ({
3856
3839
  }) => {
3857
3840
  const { toast: toast2 } = useToast14();
3858
3841
  const [open, setOpen] = useState21(false);
3859
- const onYesEvent = () => __async(void 0, null, function* () {
3842
+ const onYesEvent = () => __async(null, null, function* () {
3860
3843
  try {
3861
3844
  yield RoleService.roleDelete(roleId);
3862
3845
  toast2({
@@ -3917,7 +3900,7 @@ var RoleEdit = ({ roleDto, roleId, onDismiss }) => {
3917
3900
  const { handleSubmit, register } = useForm12();
3918
3901
  const [isDefault, setIsDefault] = useState22(roleDto.isDefault);
3919
3902
  const [isPublic, setIsPublic] = useState22(roleDto.isPublic);
3920
- const onSubmit = (data) => __async(void 0, null, function* () {
3903
+ const onSubmit = (data) => __async(null, null, function* () {
3921
3904
  const role = data;
3922
3905
  role.isDefault = isDefault;
3923
3906
  role.isPublic = isPublic;
@@ -4080,8 +4063,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
4080
4063
  var _a;
4081
4064
  return (_a = g.permissions) == null ? void 0 : _a.every((p) => p.isGranted);
4082
4065
  }).every((e) => e);
4083
- if (hasAllPermissionGranted)
4084
- setHasAllGranted(hasAllPermissionGranted);
4066
+ if (hasAllPermissionGranted) setHasAllGranted(hasAllPermissionGranted);
4085
4067
  }
4086
4068
  }, [permissionGroups]);
4087
4069
  useEffect14(() => {
@@ -4145,7 +4127,7 @@ var RolePermission = ({ roleDto, onDismiss }) => {
4145
4127
  [hasAllGranted, permissionGroups]
4146
4128
  );
4147
4129
  const onSubmit = useCallback6(
4148
- (e) => __async(void 0, null, function* () {
4130
+ (e) => __async(null, null, function* () {
4149
4131
  e.preventDefault();
4150
4132
  const payload = permissionGroups == null ? void 0 : permissionGroups.map(
4151
4133
  (p) => p.permissions.map((grant) => ({
@@ -4463,7 +4445,7 @@ var AddRole = ({ showButtonAdd }) => {
4463
4445
  const { toast: toast2 } = useToast17();
4464
4446
  const { handleSubmit, register } = useForm13();
4465
4447
  const queryClient = useQueryClient14();
4466
- const onSubmit = (data) => __async(void 0, null, function* () {
4448
+ const onSubmit = (data) => __async(null, null, function* () {
4467
4449
  const newRole = data;
4468
4450
  newRole.isDefault = isDefault;
4469
4451
  newRole.isPublic = isPublic;
@@ -4686,13 +4668,11 @@ import { useCurrentUser as useCurrentUser2 } from "@geowiki/core";
4686
4668
  import { Fragment as Fragment17, jsx as jsx43 } from "react/jsx-runtime";
4687
4669
  var RequireRole = ({ roles, children }) => {
4688
4670
  const currentUser = useCurrentUser2();
4689
- if (!currentUser)
4690
- return null;
4671
+ if (!currentUser) return null;
4691
4672
  if (!(roles == null ? void 0 : roles.some((role) => {
4692
4673
  var _a;
4693
4674
  return (_a = currentUser.roles) == null ? void 0 : _a.includes(role);
4694
- })))
4695
- return null;
4675
+ }))) return null;
4696
4676
  return /* @__PURE__ */ jsx43(Fragment17, { children });
4697
4677
  };
4698
4678
 
@@ -4763,8 +4743,7 @@ var Sidebar = ({
4763
4743
  (menu) => {
4764
4744
  var _a2;
4765
4745
  const m = (_a2 = menu.children) == null ? void 0 : _a2.find((c) => c.link === (router == null ? void 0 : router.asPath));
4766
- if (m)
4767
- return menu.name;
4746
+ if (m) return menu.name;
4768
4747
  return "";
4769
4748
  },
4770
4749
  [router == null ? void 0 : router.asPath]
@@ -5032,8 +5011,13 @@ var HtmlView = (props) => {
5032
5011
  };
5033
5012
 
5034
5013
  // src/components/Elements/TopProgress.tsx
5035
- import { motion, useScroll, useSpring } from "framer-motion";
5014
+ import {
5015
+ motion as motionRaw,
5016
+ useScroll,
5017
+ useSpring
5018
+ } from "framer-motion";
5036
5019
  import { jsx as jsx49 } from "react/jsx-runtime";
5020
+ var motion = motionRaw;
5037
5021
  var TopProgress = () => {
5038
5022
  const { scrollYProgress } = useScroll();
5039
5023
  const scaleX = useSpring(scrollYProgress, {
@@ -5163,8 +5147,7 @@ var CustomDropDown = (props) => {
5163
5147
  }
5164
5148
  return null;
5165
5149
  });
5166
- if (IsConfigSettingsLoaded)
5167
- return /* @__PURE__ */ jsx51(LoaderFull2, {});
5150
+ if (IsConfigSettingsLoaded) return /* @__PURE__ */ jsx51(LoaderFull2, {});
5168
5151
  return /* @__PURE__ */ jsx51(
5169
5152
  AsyncSelect,
5170
5153
  {
@@ -5307,11 +5290,9 @@ var CustomFilterSort = (props) => {
5307
5290
  LabelLookUp: item.LabelLookUp,
5308
5291
  Parameter: item.Parameter,
5309
5292
  onValueChange: (currentvalue) => {
5310
- if ((currentvalue == null ? void 0 : currentvalue.value) != void 0)
5311
- skip = 0;
5293
+ if ((currentvalue == null ? void 0 : currentvalue.value) != void 0) skip = 0;
5312
5294
  filterValues[item == null ? void 0 : item.Name.replace(new RegExp(" ", "g"), "")] = currentvalue == null ? void 0 : currentvalue.value;
5313
- if (!props.showButtons)
5314
- onSearch();
5295
+ if (!props.showButtons) onSearch();
5315
5296
  }
5316
5297
  },
5317
5298
  index
@@ -5375,15 +5356,15 @@ var CustomFilterSort = (props) => {
5375
5356
  // src/components/Elements/InfoCard.tsx
5376
5357
  import { useConfigSettings as useConfigSettings2 } from "@geowiki/core";
5377
5358
  import { Link as Link4 } from "@geowiki/core";
5378
- import { motion as motion2 } from "framer-motion";
5359
+ import { motion as motionRaw2 } from "framer-motion";
5379
5360
  import { itemVariants } from "@geowiki/core";
5380
5361
  import { LoaderFull as LoaderFull3 } from "@geowiki/design-system";
5381
5362
  import { jsx as jsx53, jsxs as jsxs46 } from "react/jsx-runtime";
5363
+ var motion2 = motionRaw2;
5382
5364
  var InfoCard = (props) => {
5383
5365
  var _a;
5384
5366
  var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = useConfigSettings2();
5385
- if (IsConfigSettingsLoaded)
5386
- return /* @__PURE__ */ jsx53(LoaderFull3, {});
5367
+ if (IsConfigSettingsLoaded) return /* @__PURE__ */ jsx53(LoaderFull3, {});
5387
5368
  return /* @__PURE__ */ jsx53(
5388
5369
  motion2.li,
5389
5370
  {
@@ -5614,9 +5595,7 @@ var CmsImage = ({
5614
5595
  className = "relative w-full h-full",
5615
5596
  showPlaceholder = true
5616
5597
  }) => {
5617
- var { data: cmsImageUrl, isLoading } = useCmsImage(src);
5618
- if (isLoading)
5619
- return null;
5598
+ const cmsImageUrl = useCmsImage(src);
5620
5599
  if (width && height) {
5621
5600
  if (!showPlaceholder)
5622
5601
  return /* @__PURE__ */ jsx58(
@@ -6323,8 +6302,8 @@ var RichTextContent = (props) => {
6323
6302
  const [hasContent, setHasContent] = useState31(
6324
6303
  props.defaultValue ? true : false
6325
6304
  );
6326
- const loadQuill = () => __async(void 0, null, function* () {
6327
- return new Promise((resolve) => __async(void 0, null, function* () {
6305
+ const loadQuill = () => __async(null, null, function* () {
6306
+ return new Promise((resolve) => __async(null, null, function* () {
6328
6307
  const Quill = yield __require("react-quill").Quill;
6329
6308
  const BlotFormatter = (yield __require("quill-blot-formatter")).default;
6330
6309
  resolve({ Quill, BlotFormatter });
@@ -6479,8 +6458,7 @@ import { Link as Link8 } from "@geowiki/core";
6479
6458
  import { Button as Button24 } from "@geowiki/design-system";
6480
6459
  import { jsx as jsx72 } from "react/jsx-runtime";
6481
6460
  var ButtonList = ({ data }) => {
6482
- if (!data)
6483
- return null;
6461
+ if (!data) return null;
6484
6462
  return data == null ? void 0 : data.map((button) => {
6485
6463
  var _a;
6486
6464
  return /* @__PURE__ */ jsx72(Button24, { children: /* @__PURE__ */ jsx72(
@@ -6642,7 +6620,6 @@ var NewsArticle = (props) => {
6642
6620
 
6643
6621
  // src/components/News/NewsItemList.tsx
6644
6622
  import { useRouter as useRouter3 } from "@geowiki/core";
6645
- import { v4 as v48 } from "uuid";
6646
6623
  import { Fragment as Fragment20, jsx as jsx76, jsxs as jsxs62 } from "react/jsx-runtime";
6647
6624
  var NewsItemList = ({ newsItems }) => {
6648
6625
  const allLanguages = [
@@ -6685,25 +6662,28 @@ var NewsItemList = ({ newsItems }) => {
6685
6662
  index
6686
6663
  );
6687
6664
  }) }) }) }) }),
6688
- /* @__PURE__ */ jsx76("div", { className: "-my-8 divide-y-2 divide-gray-100 py-10 lg:py-16", children: /* @__PURE__ */ jsx76("div", { className: "mx-auto max-w-7xl", children: /* @__PURE__ */ jsx76("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: newsItems.map((newsArticle) => /* @__PURE__ */ jsx76(
6689
- NewsArticle,
6690
- {
6691
- title: newsArticle.title,
6692
- description: newsArticle.description,
6693
- username: newsArticle.sourceName,
6694
- time: newsArticle.publishDate,
6695
- language: newsArticle.language,
6696
- path: newsArticle.imageUrl,
6697
- link: newsArticle.url
6698
- },
6699
- v48()
6700
- )) }) }) })
6665
+ /* @__PURE__ */ jsx76("div", { className: "-my-8 divide-y-2 divide-gray-100 py-10 lg:py-16", children: /* @__PURE__ */ jsx76("div", { className: "mx-auto max-w-7xl", children: /* @__PURE__ */ jsx76("div", { className: "grid grid-cols-1 lg:grid-cols-4 gap-6", children: newsItems.map((newsArticle, index) => {
6666
+ var _a;
6667
+ return /* @__PURE__ */ jsx76(
6668
+ NewsArticle,
6669
+ {
6670
+ title: newsArticle.title,
6671
+ description: newsArticle.description,
6672
+ username: newsArticle.sourceName,
6673
+ time: newsArticle.publishDate,
6674
+ language: newsArticle.language,
6675
+ path: newsArticle.imageUrl,
6676
+ link: newsArticle.url
6677
+ },
6678
+ (_a = newsArticle.url) != null ? _a : `news-${index}`
6679
+ );
6680
+ }) }) }) })
6701
6681
  ] }) });
6702
6682
  };
6703
6683
 
6704
6684
  // src/components/Publications/PublicationList.tsx
6705
6685
  import { listVariants as listVariants3 } from "@geowiki/core";
6706
- import { motion as motion7 } from "framer-motion";
6686
+ import { motion as motionRaw3 } from "framer-motion";
6707
6687
 
6708
6688
  // src/components/Publications/PublicationItem.tsx
6709
6689
  import { itemVariants as itemVariants3, useCmsUrl as useCmsUrl2 } from "@geowiki/core";
@@ -6760,10 +6740,11 @@ var PublicationItem = ({ publication }) => {
6760
6740
 
6761
6741
  // src/components/Publications/PublicationList.tsx
6762
6742
  import { jsx as jsx78 } from "react/jsx-runtime";
6743
+ var motion7 = motionRaw3;
6763
6744
  var PublicationList = ({ publications }) => {
6764
- publications.sort((a, b) => {
6765
- return new Date(b.PublishedUtc).getTime() - new Date(a.PublishedUtc).getTime();
6766
- });
6745
+ const sorted = [...publications].sort(
6746
+ (a, b) => new Date(b.PublishedUtc).getTime() - new Date(a.PublishedUtc).getTime()
6747
+ );
6767
6748
  return /* @__PURE__ */ jsx78(
6768
6749
  motion7.ul,
6769
6750
  {
@@ -6772,7 +6753,7 @@ var PublicationList = ({ publications }) => {
6772
6753
  animate: "enter",
6773
6754
  exit: "exit",
6774
6755
  variants: listVariants3,
6775
- children: publications && publications.map((post) => {
6756
+ children: sorted.map((post) => {
6776
6757
  var _a;
6777
6758
  return /* @__PURE__ */ jsx78(PublicationItem, { publication: post }, (_a = post.AutoroutePart) == null ? void 0 : _a.Path);
6778
6759
  })
@@ -6833,7 +6814,7 @@ import { dynamic as dynamic2 } from "@geowiki/core";
6833
6814
  import { useState as useState34 } from "react";
6834
6815
  import { jsx as jsx81, jsxs as jsxs66 } from "react/jsx-runtime";
6835
6816
  var MapWithNoSSR = dynamic2(
6836
- () => import("./cluster-map-WZNS6WYH.mjs").then((x) => x.FarmerClusterMap),
6817
+ () => import("./cluster-map-YODMYBPK.mjs").then((x) => x.FarmerClusterMap),
6837
6818
  {
6838
6819
  ssr: false
6839
6820
  }
@@ -7064,7 +7045,7 @@ var UpdatePassword = (props) => {
7064
7045
  reset({ confirmnewPassword: null });
7065
7046
  }
7066
7047
  };
7067
- const onPasswordSubmit = () => __async(void 0, null, function* () {
7048
+ const onPasswordSubmit = () => __async(null, null, function* () {
7068
7049
  try {
7069
7050
  yield ProfileService5.profileChangePassword(PasswordData);
7070
7051
  Swal.fire({
@@ -7267,7 +7248,7 @@ var UpdateUserProfile = ({
7267
7248
  });
7268
7249
  });
7269
7250
  };
7270
- const onProfileSubmit = () => __async(void 0, null, function* () {
7251
+ const onProfileSubmit = () => __async(null, null, function* () {
7271
7252
  var result = yield ProfileService6.profileUpdate(UserData);
7272
7253
  if (result.name === UserData.name && result.surname === UserData.surname) {
7273
7254
  Swal2.fire({
@@ -7275,7 +7256,7 @@ var UpdateUserProfile = ({
7275
7256
  text: "Profile updated successfully",
7276
7257
  icon: "success"
7277
7258
  }).then(() => {
7278
- location.href = window.location.href;
7259
+ window.location.reload();
7279
7260
  });
7280
7261
  } else {
7281
7262
  Swal2.fire({
@@ -7374,7 +7355,7 @@ import { toast } from "react-toastify";
7374
7355
  import { jsx as jsx87, jsxs as jsxs72 } from "react/jsx-runtime";
7375
7356
  var SettingsItem = (props) => {
7376
7357
  const [value, setValue] = useState37(props.value);
7377
- const handleUpdateSettings = () => __async(void 0, null, function* () {
7358
+ const handleUpdateSettings = () => __async(null, null, function* () {
7378
7359
  try {
7379
7360
  yield SettingsService.settingsSetSettingForTenant(props.setting, value);
7380
7361
  toast.success("Settings updated");
@@ -7420,8 +7401,7 @@ import { jsx as jsx88, jsxs as jsxs73 } from "react/jsx-runtime";
7420
7401
  var SettingsManagement = () => {
7421
7402
  var _a;
7422
7403
  var { data, isLoading } = useAppConfig3();
7423
- if (isLoading)
7424
- return /* @__PURE__ */ jsx88("div", { children: "Loading..." });
7404
+ if (isLoading) return /* @__PURE__ */ jsx88("div", { children: "Loading..." });
7425
7405
  const keys = Object == null ? void 0 : Object.keys((_a = data == null ? void 0 : data.setting) == null ? void 0 : _a.values);
7426
7406
  let settings = {
7427
7407
  GeoWiki: keys.filter((key) => key.startsWith("GeoWiki")),
@@ -7432,10 +7412,8 @@ var SettingsManagement = () => {
7432
7412
  return key.startsWith((_a2 = data == null ? void 0 : data.currentTenant) == null ? void 0 : _a2.name);
7433
7413
  })
7434
7414
  };
7435
- if (!data)
7436
- return /* @__PURE__ */ jsx88("div", { children: "no data" });
7437
- if (!keys)
7438
- return /* @__PURE__ */ jsx88("div", { children: "no keys" });
7415
+ if (!data) return /* @__PURE__ */ jsx88("div", { children: "no data" });
7416
+ if (!keys) return /* @__PURE__ */ jsx88("div", { children: "no keys" });
7439
7417
  return /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88("div", { className: "w-full px-2 py-16 sm:px-0", children: /* @__PURE__ */ jsxs73(Tab.Group, { children: [
7440
7418
  /* @__PURE__ */ jsx88(Tab.List, { className: "flex p-1 space-x-1 rounded-xl", children: Object.keys(settings).map(
7441
7419
  (key) => settings[key].length > 0 && /* @__PURE__ */ jsx88(
@@ -8446,6 +8424,7 @@ var FilterDropdown = ({
8446
8424
  return /* @__PURE__ */ jsx96(
8447
8425
  Disclosure2,
8448
8426
  {
8427
+ as: "div",
8449
8428
  "data-component": "FilterDropdown",
8450
8429
  defaultOpen: filterValues.length > 0,
8451
8430
  children: ({ open }) => /* @__PURE__ */ jsxs81(Fragment23, { children: [
@@ -8529,7 +8508,7 @@ var DesignTestimonials = ({ testimonials }) => {
8529
8508
  // src/components/DesignElements/BannerFollowLinks.tsx
8530
8509
  import { H2Design, H9Design } from "@geowiki/design-system";
8531
8510
  import { Link as Link13 } from "@geowiki/core";
8532
- import { v4 as v49 } from "uuid";
8511
+ import { v4 as v48 } from "uuid";
8533
8512
  import { jsx as jsx98, jsxs as jsxs83 } from "react/jsx-runtime";
8534
8513
  var BannerFollowLinks = ({ title, links }) => {
8535
8514
  return /* @__PURE__ */ jsxs83("div", { className: " py-8 mt-6 flex-col flex items-center justify-center bg-primary text-white rounded-2xl lg:pt-[100px] lg:mt-10 lg:pb-[88px] space-y-8", children: [
@@ -8542,7 +8521,7 @@ var BannerFollowLinks = ({ title, links }) => {
8542
8521
  rel: "noreferrer",
8543
8522
  children: /* @__PURE__ */ jsx98(H9Design, { children: link.text })
8544
8523
  },
8545
- v49()
8524
+ v48()
8546
8525
  )) })
8547
8526
  ] });
8548
8527
  };
@@ -8555,8 +8534,7 @@ import { jsx as jsx99, jsxs as jsxs84 } from "react/jsx-runtime";
8555
8534
  var ListTagsGroup = ({ cluster }) => {
8556
8535
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
8557
8536
  var { data: ConfigSettings, isLoading: IsConfigSettingsLoaded } = useConfigSettings3();
8558
- if (IsConfigSettingsLoaded)
8559
- return /* @__PURE__ */ jsx99(LoaderFull4, {});
8537
+ if (IsConfigSettingsLoaded) return /* @__PURE__ */ jsx99(LoaderFull4, {});
8560
8538
  return /* @__PURE__ */ jsxs84("div", { className: "space-y-6 lg:space-y-10", children: [
8561
8539
  /* @__PURE__ */ jsx99(
8562
8540
  TagsGroup,
@@ -8723,15 +8701,13 @@ var ApiImage = ({
8723
8701
  width = 0,
8724
8702
  height = 0
8725
8703
  }) => {
8726
- var { data, isLoading } = useApiImage(imageId);
8727
- if (isLoading)
8728
- return null;
8704
+ const src = useApiImage(imageId);
8729
8705
  if (width > 0 && height > 0) {
8730
8706
  return /* @__PURE__ */ jsx100(
8731
8707
  Image4,
8732
8708
  {
8733
8709
  className,
8734
- src: data,
8710
+ src,
8735
8711
  alt,
8736
8712
  placeholder: `data:image/svg+xml;base64,${toBase642(shimmer2(700, 490))}`,
8737
8713
  width,
@@ -8745,7 +8721,7 @@ var ApiImage = ({
8745
8721
  Image4,
8746
8722
  {
8747
8723
  className: "object-cover rounded-xl",
8748
- src: data,
8724
+ src,
8749
8725
  alt,
8750
8726
  fill: true,
8751
8727
  placeholder: `data:image/svg+xml;base64,${toBase642(shimmer2(700, 490))}`,
@@ -8758,7 +8734,7 @@ var ApiImage = ({
8758
8734
  // src/components/DesignElements/SignUpBanner.tsx
8759
8735
  import { H3Design, Body18 as Body184, DesignButton as DesignButton8 } from "@geowiki/design-system";
8760
8736
  import { Link as Link14 } from "@geowiki/core";
8761
- import { v4 as v410 } from "uuid";
8737
+ import { v4 as v49 } from "uuid";
8762
8738
  import { jsx as jsx101, jsxs as jsxs85 } from "react/jsx-runtime";
8763
8739
  var SignUpBanner = ({
8764
8740
  title,
@@ -8797,7 +8773,7 @@ var SignUpBanner = ({
8797
8773
  height: 172,
8798
8774
  className: "w-[172px] h-[172px] rounded-xl object-cover"
8799
8775
  },
8800
- v410()
8776
+ v49()
8801
8777
  ))
8802
8778
  ] }),
8803
8779
  (button == null ? void 0 : button.text) && (button == null ? void 0 : button.link) && /* @__PURE__ */ jsx101("div", { className: "lg:hidden w-full", children: /* @__PURE__ */ jsx101(
@@ -8933,7 +8909,6 @@ import { Fragment as Fragment24 } from "react";
8933
8909
  import { Dialog as Dialog18, Transition as Transition5 } from "@headlessui/react";
8934
8910
  import { ArrowLeftIcon, CheckIcon } from "@heroicons/react/24/outline";
8935
8911
  import { useRouter as useRouter8 } from "@geowiki/core";
8936
- import { v4 as v411 } from "uuid";
8937
8912
  import { DesignButton as DesignButton10 } from "@geowiki/design-system";
8938
8913
  import { jsx as jsx104, jsxs as jsxs87 } from "react/jsx-runtime";
8939
8914
  function MobileFilterPopupOpened({
@@ -9038,27 +9013,30 @@ function MobileFilterPopupOpened({
9038
9013
  }
9039
9014
  ) })
9040
9015
  ] }),
9041
- /* @__PURE__ */ jsx104("div", { className: " h-auto max-h-[calc(100vh-150px)] pt-3 px-5 bg-white space-y-4 overflow-y-auto ", children: list == null ? void 0 : list.map((item, index) => /* @__PURE__ */ jsxs87(
9042
- "div",
9043
- {
9044
- className: " cursor-pointer ",
9045
- onClick: () => handleClick(item.value),
9046
- children: [
9047
- /* @__PURE__ */ jsxs87("div", { className: "flex justify-between", children: [
9048
- /* @__PURE__ */ jsx104("div", { className: "pb-4 text-black text-base font-normal leading-snug", children: item.label }),
9049
- checkValues.includes(item.value) && /* @__PURE__ */ jsx104("div", { children: /* @__PURE__ */ jsx104(
9050
- CheckIcon,
9051
- {
9052
- className: "h-6 w-6 text-primary",
9053
- "aria-hidden": "true"
9054
- }
9055
- ) })
9056
- ] }),
9057
- index !== list.length - 1 && /* @__PURE__ */ jsx104("div", { className: "w-full border-0 border-b border-grey-light" })
9058
- ]
9059
- },
9060
- v411()
9061
- )) }),
9016
+ /* @__PURE__ */ jsx104("div", { className: " h-auto max-h-[calc(100vh-150px)] pt-3 px-5 bg-white space-y-4 overflow-y-auto ", children: list == null ? void 0 : list.map((item, index) => {
9017
+ var _a;
9018
+ return /* @__PURE__ */ jsxs87(
9019
+ "div",
9020
+ {
9021
+ className: " cursor-pointer ",
9022
+ onClick: () => handleClick(item.value),
9023
+ children: [
9024
+ /* @__PURE__ */ jsxs87("div", { className: "flex justify-between", children: [
9025
+ /* @__PURE__ */ jsx104("div", { className: "pb-4 text-black text-base font-normal leading-snug", children: item.label }),
9026
+ checkValues.includes(item.value) && /* @__PURE__ */ jsx104("div", { children: /* @__PURE__ */ jsx104(
9027
+ CheckIcon,
9028
+ {
9029
+ className: "h-6 w-6 text-primary",
9030
+ "aria-hidden": "true"
9031
+ }
9032
+ ) })
9033
+ ] }),
9034
+ index !== list.length - 1 && /* @__PURE__ */ jsx104("div", { className: "w-full border-0 border-b border-grey-light" })
9035
+ ]
9036
+ },
9037
+ (_a = item.value) != null ? _a : `item-${index}`
9038
+ );
9039
+ }) }),
9062
9040
  /* @__PURE__ */ jsx104("div", { className: "absolute bottom-0 right-0 px-5 w-full pb-6 flex justify-center", children: /* @__PURE__ */ jsx104(DesignButton10, { className: "w-full ", onClick: handleShowResults, children: "View results" }) })
9063
9041
  ] })
9064
9042
  }
@@ -9313,7 +9291,7 @@ var ClusterNewsItem = (props) => {
9313
9291
  };
9314
9292
 
9315
9293
  // src/components/DesignElements/ClusterNews/ClusterNewsList.tsx
9316
- import { v4 as v412 } from "uuid";
9294
+ import { v4 as v410 } from "uuid";
9317
9295
  import { jsx as jsx110 } from "react/jsx-runtime";
9318
9296
  var ClusterNewsList = ({ clusterNewsItems }) => {
9319
9297
  return /* @__PURE__ */ jsx110("div", { className: "mx-auto", children: /* @__PURE__ */ jsx110("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-6", children: clusterNewsItems == null ? void 0 : clusterNewsItems.map((clusterNewsItem) => /* @__PURE__ */ jsx110(
@@ -9327,14 +9305,14 @@ var ClusterNewsList = ({ clusterNewsItems }) => {
9327
9305
  clusterCountry: clusterNewsItem.clusterCountry,
9328
9306
  path: clusterNewsItem.path
9329
9307
  },
9330
- v412()
9308
+ v410()
9331
9309
  )) }) });
9332
9310
  };
9333
9311
 
9334
9312
  // src/components/DesignElements/ClusterNews/ClusterStoryItem.tsx
9335
9313
  import { H4Design } from "@geowiki/design-system";
9336
9314
  import { useClusterNews } from "@geowiki/core";
9337
- import { v4 as v413 } from "uuid";
9315
+ import { v4 as v411 } from "uuid";
9338
9316
  import { Body18 as Body185, Body18m as Body18m5 } from "@geowiki/design-system";
9339
9317
  import { jsx as jsx111, jsxs as jsxs92 } from "react/jsx-runtime";
9340
9318
  var ClusterStoryItem = (props) => {
@@ -9355,7 +9333,7 @@ var ClusterStoryItem = (props) => {
9355
9333
  }
9356
9334
  const clusterNewsItems = clusterNewsDisplay == null ? void 0 : clusterNewsDisplay.slice(0, 3).map((clusterNewsItem) => {
9357
9335
  return {
9358
- key: v413(),
9336
+ key: v411(),
9359
9337
  id: clusterNewsItem.id,
9360
9338
  title: clusterNewsItem.title,
9361
9339
  clusterName: props.ClusterName,
@@ -9449,7 +9427,7 @@ var ClusterStoryItem = (props) => {
9449
9427
  import { H4Design as H4Design2 } from "@geowiki/design-system";
9450
9428
  import { useState as useState43 } from "react";
9451
9429
  import { DesignButton as DesignButton12 } from "@geowiki/design-system";
9452
- import { v4 as v414 } from "uuid";
9430
+ import { v4 as v412 } from "uuid";
9453
9431
  import { useClusterNews as useClusterNews2 } from "@geowiki/core";
9454
9432
  import { LocalLoader } from "@geowiki/design-system";
9455
9433
  import { Fragment as Fragment26, jsx as jsx112, jsxs as jsxs93 } from "react/jsx-runtime";
@@ -9480,7 +9458,7 @@ var ClusterNews = ({
9480
9458
  const clusterNewsDisplay = showAll ? currentItems : publishedItems == null ? void 0 : publishedItems.slice(0, 3);
9481
9459
  const clusterNewsItems = clusterNewsDisplay == null ? void 0 : clusterNewsDisplay.map((clusterNewsItem) => {
9482
9460
  return {
9483
- key: v414(),
9461
+ key: v412(),
9484
9462
  id: clusterNewsItem.id,
9485
9463
  title: clusterNewsItem.title,
9486
9464
  clusterName,
@@ -9490,10 +9468,8 @@ var ClusterNews = ({
9490
9468
  path: clusterNewsItem.imageId === "00000000-0000-0000-0000-000000000000" ? "/assets/img/noImage.png" : clusterNewsItem.imageId
9491
9469
  };
9492
9470
  });
9493
- if (isLoading)
9494
- return /* @__PURE__ */ jsx112(LocalLoader, {});
9495
- if (publishedItems.length == 0)
9496
- return null;
9471
+ if (isLoading) return /* @__PURE__ */ jsx112(LocalLoader, {});
9472
+ if (publishedItems.length == 0) return null;
9497
9473
  return /* @__PURE__ */ jsx112(Fragment26, { children: !isLoading && /* @__PURE__ */ jsx112("div", { className: "bg-grey-lightest lg:mt-[100px]", children: /* @__PURE__ */ jsx112("div", { className: "bg-grey-lightest mx-5 lg:mx-12", children: /* @__PURE__ */ jsxs93("div", { className: "container mx-auto space-y-6 py-6 lg:space-y-10 lg:py-16 px-0 lg:px-10 ", children: [
9498
9474
  /* @__PURE__ */ jsxs93("div", { className: "lg:flex lg:justify-between lg:items-end", children: [
9499
9475
  /* @__PURE__ */ jsx112(H4Design2, { className: "pb-4 lg:pb-0", children: "Cluster News" }),
@@ -9528,7 +9504,7 @@ var ClusterNews = ({
9528
9504
 
9529
9505
  // src/components/DesignElements/ClusterNews/SixClusterNews.tsx
9530
9506
  import { useNewsFromAllClusters, useClusterNewsWithId } from "@geowiki/core";
9531
- import { v4 as v415 } from "uuid";
9507
+ import { v4 as v413 } from "uuid";
9532
9508
  import { jsx as jsx113 } from "react/jsx-runtime";
9533
9509
  var SixClusterNews = () => {
9534
9510
  var _a, _b, _c;
@@ -9569,7 +9545,7 @@ var SixClusterNews = () => {
9569
9545
  ];
9570
9546
  const clusterNews = (_a = clusterNewsArray.filter((item) => item != null).map(
9571
9547
  (clusterNewsItem) => ({
9572
- key: v415(),
9548
+ key: v413(),
9573
9549
  id: clusterNewsItem.id,
9574
9550
  title: clusterNewsItem.title,
9575
9551
  clusterName: clusterNewsItem.clusterName,
@@ -9581,7 +9557,7 @@ var SixClusterNews = () => {
9581
9557
  )) != null ? _a : [];
9582
9558
  const firstClusterNews = (_c = (_b = news == null ? void 0 : news.items) == null ? void 0 : _b.map((clusterNewsItem) => {
9583
9559
  return {
9584
- key: v415(),
9560
+ key: v413(),
9585
9561
  id: clusterNewsItem.id,
9586
9562
  title: clusterNewsItem.title,
9587
9563
  clusterName: clusterNewsItem.clusterName,
@@ -9648,13 +9624,12 @@ var ClusterList = ({ clusters }) => {
9648
9624
  import { H4Design as H4Design3 } from "@geowiki/design-system";
9649
9625
  import { DesignButton as DesignButton13 } from "@geowiki/design-system";
9650
9626
  import { Link as Link19 } from "@geowiki/core";
9651
- import { v4 as v416 } from "uuid";
9627
+ import { v4 as v414 } from "uuid";
9652
9628
  import { useCountries } from "@geowiki/core";
9653
9629
  import { jsx as jsx116, jsxs as jsxs95 } from "react/jsx-runtime";
9654
9630
  var H3Clusters = ({ clusters }) => {
9655
9631
  const { data: countries, isLoading: isCountriesLoading } = useCountries();
9656
- if (isCountriesLoading)
9657
- return /* @__PURE__ */ jsx116("div", { children: "Loading..." });
9632
+ if (isCountriesLoading) return /* @__PURE__ */ jsx116("div", { children: "Loading..." });
9658
9633
  return /* @__PURE__ */ jsxs95("div", { className: "lg:container mx-auto space-y-6 lg:space-y-10 ", children: [
9659
9634
  /* @__PURE__ */ jsxs95("div", { className: "lg:flex lg:justify-between lg:items-end", children: [
9660
9635
  /* @__PURE__ */ jsx116(H4Design3, { className: "pb-4 lg:pb-0", children: "Explore other Farmer Clusters" }),
@@ -9673,7 +9648,7 @@ var H3Clusters = ({ clusters }) => {
9673
9648
  clusters: clusters == null ? void 0 : clusters.slice(0, 4).map((cluster) => {
9674
9649
  var _a;
9675
9650
  return {
9676
- key: v416(),
9651
+ key: v414(),
9677
9652
  title: cluster.name,
9678
9653
  imageId: cluster.coverImageId || "",
9679
9654
  country: ((_a = countries == null ? void 0 : countries.find((c) => c.id === cluster.countryId)) == null ? void 0 : _a.country) || "Missing Country",
@@ -9729,7 +9704,7 @@ var GalleryCarouselOpen = ({
9729
9704
  }) => {
9730
9705
  const [defaultPhoto, setDefaultPhoto] = useState44(currentPhoto);
9731
9706
  const [text, setDefaultText] = useState44("");
9732
- var { data } = useApiImage2(defaultPhoto.imageId);
9707
+ const data = useApiImage2(defaultPhoto.imageId);
9733
9708
  useEffect22(() => {
9734
9709
  setDefaultPhoto(currentPhoto);
9735
9710
  }, [currentPhoto]);
@@ -10292,10 +10267,11 @@ var SubtitleH3BodyInternalLinkList = ({
10292
10267
  return text.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#039;/g, "'");
10293
10268
  };
10294
10269
  const addLinksStyles = (content) => {
10270
+ if (!content) return "";
10295
10271
  const decodedContent = decodeHtmlEntities(content);
10296
10272
  const textToAdd = " class='text-white font-semibold no-underline'";
10297
10273
  const regex = /(<a(?=[^>]*>))/g;
10298
- const modifiedText = decodedContent == null ? void 0 : decodedContent.replace(regex, `$1${textToAdd}`);
10274
+ const modifiedText = decodedContent.replace(regex, `$1${textToAdd}`);
10299
10275
  return modifiedText;
10300
10276
  };
10301
10277
  return /* @__PURE__ */ jsxs108(
@@ -10366,7 +10342,7 @@ var SubtitleH3Faq = ({
10366
10342
  // src/components/DesignElements/TextBlocks/subtitle-h3-cluster-4-column.tsx
10367
10343
  import { H3Design as H3Design5, Body18 as Body1811 } from "@geowiki/design-system";
10368
10344
  import { useClusters, useCountries as useCountries2 } from "@geowiki/core";
10369
- import { v4 as v417 } from "uuid";
10345
+ import { v4 as v415 } from "uuid";
10370
10346
  import { DesignButton as DesignButton19 } from "@geowiki/design-system";
10371
10347
  import { Link as Link25 } from "@geowiki/core";
10372
10348
  import { jsx as jsx132, jsxs as jsxs110 } from "react/jsx-runtime";
@@ -10383,8 +10359,7 @@ var SubtitleH3Cluster4Column = ({
10383
10359
  4
10384
10360
  );
10385
10361
  const { data: countries, isLoading: isCountriesLoading } = useCountries2();
10386
- if (isClusterLoading || isCountriesLoading)
10387
- return /* @__PURE__ */ jsx132("div", { children: "Loading..." });
10362
+ if (isClusterLoading || isCountriesLoading) return /* @__PURE__ */ jsx132("div", { children: "Loading..." });
10388
10363
  return /* @__PURE__ */ jsxs110(
10389
10364
  "div",
10390
10365
  {
@@ -10417,7 +10392,7 @@ var SubtitleH3Cluster4Column = ({
10417
10392
  clusters: (_a = clusters == null ? void 0 : clusters.items) == null ? void 0 : _a.map((cluster) => {
10418
10393
  var _a2;
10419
10394
  return {
10420
- key: v417(),
10395
+ key: v415(),
10421
10396
  title: cluster.name,
10422
10397
  imageId: cluster.coverImageId || "",
10423
10398
  country: ((_a2 = countries == null ? void 0 : countries.find((x) => x.id === cluster.countryId)) == null ? void 0 : _a2.country) || "Missing Country",
@@ -10435,7 +10410,7 @@ var SubtitleH3Cluster4Column = ({
10435
10410
  // src/components/DesignElements/TextBlocks/subtitle-h3-cluster-news-3-column.tsx
10436
10411
  import { H3Design as H3Design6, Body18 as Body1812 } from "@geowiki/design-system";
10437
10412
  import { useNewsFromAllClusters as useNewsFromAllClusters2 } from "@geowiki/core";
10438
- import { v4 as v418 } from "uuid";
10413
+ import { v4 as v416 } from "uuid";
10439
10414
  import { DesignButton as DesignButton20 } from "@geowiki/design-system";
10440
10415
  import { Link as Link26 } from "@geowiki/core";
10441
10416
  import { jsx as jsx133, jsxs as jsxs111 } from "react/jsx-runtime";
@@ -10448,7 +10423,7 @@ var SubtitleH3ClusterNews3Column = ({
10448
10423
  const { data: news, isLoading } = useNewsFromAllClusters2(0, 3);
10449
10424
  const clusterNewsItems = (_a = news == null ? void 0 : news.items) == null ? void 0 : _a.map((clusterNewsItem) => {
10450
10425
  return {
10451
- key: v418(),
10426
+ key: v416(),
10452
10427
  id: clusterNewsItem.id,
10453
10428
  title: clusterNewsItem.title,
10454
10429
  clusterName: clusterNewsItem.clusterName,