nvis-fe-cms-libs 1.1.23 → 1.1.25
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.
|
@@ -49,7 +49,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
49
49
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
import require$$0, { useRef, useState, useEffect, useMemo, forwardRef, createElement
|
|
52
|
+
import require$$0, { useRef, useState, useEffect, useMemo, forwardRef, createElement } from "react";
|
|
53
53
|
var jsxRuntime = { exports: {} };
|
|
54
54
|
var reactJsxRuntime_production = {};
|
|
55
55
|
/**
|
|
@@ -662,7 +662,7 @@ const TimelineSection = ({ data, t, isDarkMode, section }) => {
|
|
|
662
662
|
const timelineData = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data).map((item) => item.data)) || [];
|
|
663
663
|
const [timelineVisible, setTimelineVisible] = useState([]);
|
|
664
664
|
const timelineRefs = useRef([]);
|
|
665
|
-
const sectionTitle = (section == null ? void 0 : section.title) || "";
|
|
665
|
+
const sectionTitle = (section == null ? void 0 : section.title) || "...";
|
|
666
666
|
useEffect(() => {
|
|
667
667
|
setTimelineVisible(new Array(timelineData.length).fill(false));
|
|
668
668
|
}, [timelineData.length]);
|
|
@@ -698,53 +698,49 @@ const TimelineSection = ({ data, t, isDarkMode, section }) => {
|
|
|
698
698
|
}
|
|
699
699
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { className: `py-20 ${isDarkMode ? "bg-gray-800" : "bg-white"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
|
|
700
700
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-12", children: [
|
|
701
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
701
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
702
702
|
"div",
|
|
703
703
|
{
|
|
704
704
|
className: `relative inline-block px-4 py-2 rounded-full text-sm font-semibold mb-4 border transition-all duration-300 transform hover:scale-105 shadow-md hover:shadow-lg overflow-hidden ${isDarkMode ? "bg-gradient-to-br from-slate-900 via-blue-900 to-indigo-900 text-emerald-300 border-blue-800" : "bg-white text-emerald-800 border-gray-200"}`,
|
|
705
|
-
children: [
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
"
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
"
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
"
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}
|
|
735
|
-
)
|
|
736
|
-
] })
|
|
737
|
-
]
|
|
705
|
+
children: isDarkMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
706
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
707
|
+
"div",
|
|
708
|
+
{
|
|
709
|
+
className: "absolute w-12 h-12 bg-white/5 rounded-full",
|
|
710
|
+
style: { left: "10%", top: "20%" }
|
|
711
|
+
}
|
|
712
|
+
),
|
|
713
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
714
|
+
"div",
|
|
715
|
+
{
|
|
716
|
+
className: "absolute w-10 h-10 bg-white/5 rounded-full",
|
|
717
|
+
style: { right: "30%", bottom: "10%" }
|
|
718
|
+
}
|
|
719
|
+
),
|
|
720
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
721
|
+
"div",
|
|
722
|
+
{
|
|
723
|
+
className: "absolute w-14 h-14 bg-white/5 rounded-md",
|
|
724
|
+
style: { left: "20%", bottom: "30%" }
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
728
|
+
"div",
|
|
729
|
+
{
|
|
730
|
+
className: 'absolute inset-0 bg-[url("data:image/svg+xml,%3Csvg width=\\\\\\"60\\\\\\" height=\\\\\\"60\\\\\\" viewBox=\\\\\\"0 0 60 60\\\\\\" xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\"%3E%3Cg fill=\\\\\\"none\\\\\\" fill-rule=\\\\\\"evenodd\\\\\\"%3E%3Cg fill=\\\\\\"%23ffffff\\\\\\" fill-opacity=\\\\\\"0.05\\\\\\"%3E%3Ccircle cx=\\\\\\"30\\\\\\" cy=\\\\\\"30\\\\\\" r=\\\\\\"2\\\\\\"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")] opacity-20'
|
|
731
|
+
}
|
|
732
|
+
)
|
|
733
|
+
] })
|
|
738
734
|
}
|
|
739
735
|
),
|
|
740
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
736
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
741
737
|
"h2",
|
|
742
738
|
{
|
|
743
739
|
className: `text-3xl lg:text-4xl font-bold mb-4 ${isDarkMode ? "text-white" : "text-gray-900"}`,
|
|
744
|
-
children: [
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
]
|
|
740
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "block bg-gradient-to-r from-emerald-600 to-teal-600 bg-clip-text text-transparent", children: [
|
|
741
|
+
"📈 ",
|
|
742
|
+
sectionTitle
|
|
743
|
+
] })
|
|
748
744
|
}
|
|
749
745
|
)
|
|
750
746
|
] }),
|
|
@@ -4685,17 +4681,23 @@ const PageHighlightSection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
|
|
|
4685
4681
|
] })
|
|
4686
4682
|
] });
|
|
4687
4683
|
};
|
|
4688
|
-
const PageChildrenSelectSection = ({ data, isDarkMode, section, imageBaseUrl = "" }) => {
|
|
4684
|
+
const PageChildrenSelectSection = ({ data, isDarkMode, t, section, imageBaseUrl = "" }) => {
|
|
4689
4685
|
var _a;
|
|
4690
4686
|
const pages = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data).filter(Boolean)) || [];
|
|
4691
4687
|
const sectionTitle = (section == null ? void 0 : section.title) || "";
|
|
4692
4688
|
const sectionDescription = (section == null ? void 0 : section.description) || "";
|
|
4689
|
+
const [visibleCount, setVisibleCount] = useState(8);
|
|
4690
|
+
const visiblePages = pages.slice(0, visibleCount);
|
|
4691
|
+
const hasMore = visibleCount < pages.length;
|
|
4693
4692
|
if (!pages || pages.length === 0) {
|
|
4694
4693
|
return null;
|
|
4695
4694
|
}
|
|
4696
4695
|
const handleNavigate = (slug) => {
|
|
4697
4696
|
window.location.href = slug;
|
|
4698
4697
|
};
|
|
4698
|
+
const handleLoadMore = () => {
|
|
4699
|
+
setVisibleCount((prev) => prev + 8);
|
|
4700
|
+
};
|
|
4699
4701
|
const getImageUrl = (url) => {
|
|
4700
4702
|
if (!url) return "";
|
|
4701
4703
|
if (url.startsWith("http://") || url.startsWith("https://")) return url;
|
|
@@ -4730,8 +4732,9 @@ const PageChildrenSelectSection = ({ data, isDarkMode, section, imageBaseUrl = "
|
|
|
4730
4732
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
|
|
4731
4733
|
display: "grid",
|
|
4732
4734
|
gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))",
|
|
4733
|
-
gap: "24px"
|
|
4734
|
-
|
|
4735
|
+
gap: "24px",
|
|
4736
|
+
marginBottom: hasMore ? "40px" : "0"
|
|
4737
|
+
}, children: visiblePages.map((page) => {
|
|
4735
4738
|
const iconUrl = getImageUrl(page.icon);
|
|
4736
4739
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4737
4740
|
"div",
|
|
@@ -4754,7 +4757,7 @@ const PageChildrenSelectSection = ({ data, isDarkMode, section, imageBaseUrl = "
|
|
|
4754
4757
|
onMouseEnter: (e) => {
|
|
4755
4758
|
e.currentTarget.style.transform = "translateY(-8px)";
|
|
4756
4759
|
e.currentTarget.style.boxShadow = isDarkMode ? "0 20px 25px -5px rgba(0, 0, 0, 0.5)" : "0 20px 25px -5px rgba(0, 0, 0, 0.15)";
|
|
4757
|
-
e.currentTarget.style.borderColor =
|
|
4760
|
+
e.currentTarget.style.borderColor = "#1638f9ff";
|
|
4758
4761
|
},
|
|
4759
4762
|
onMouseLeave: (e) => {
|
|
4760
4763
|
e.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4791,19 +4794,59 @@ const PageChildrenSelectSection = ({ data, isDarkMode, section, imageBaseUrl = "
|
|
|
4791
4794
|
},
|
|
4792
4795
|
page.id
|
|
4793
4796
|
);
|
|
4794
|
-
}) })
|
|
4797
|
+
}) }),
|
|
4798
|
+
hasMore && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4799
|
+
"button",
|
|
4800
|
+
{
|
|
4801
|
+
onClick: handleLoadMore,
|
|
4802
|
+
style: {
|
|
4803
|
+
display: "inline-flex",
|
|
4804
|
+
alignItems: "center",
|
|
4805
|
+
justifyContent: "center",
|
|
4806
|
+
gap: "8px",
|
|
4807
|
+
padding: "14px 32px",
|
|
4808
|
+
fontSize: "16px",
|
|
4809
|
+
fontWeight: "600",
|
|
4810
|
+
color: "#fff",
|
|
4811
|
+
backgroundColor: "#f97316",
|
|
4812
|
+
border: "none",
|
|
4813
|
+
borderRadius: "9999px",
|
|
4814
|
+
cursor: "pointer",
|
|
4815
|
+
transition: "all 0.3s",
|
|
4816
|
+
boxShadow: "0 4px 6px -1px rgba(249, 115, 22, 0.3)"
|
|
4817
|
+
},
|
|
4818
|
+
onMouseEnter: (e) => {
|
|
4819
|
+
e.currentTarget.style.backgroundColor = "#ea580c";
|
|
4820
|
+
e.currentTarget.style.transform = "translateY(-2px)";
|
|
4821
|
+
},
|
|
4822
|
+
onMouseLeave: (e) => {
|
|
4823
|
+
e.currentTarget.style.backgroundColor = "#f97316";
|
|
4824
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
4825
|
+
},
|
|
4826
|
+
children: [
|
|
4827
|
+
t("pageChildrenSelect.moreInsights"),
|
|
4828
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { size: 18 })
|
|
4829
|
+
]
|
|
4830
|
+
}
|
|
4831
|
+
) })
|
|
4795
4832
|
] }) });
|
|
4796
4833
|
};
|
|
4797
|
-
const PageChildrenSelectSection1 = ({ data, isDarkMode, section, imageBaseUrl = "" }) => {
|
|
4834
|
+
const PageChildrenSelectSection1 = ({ data, isDarkMode, t, section, imageBaseUrl = "" }) => {
|
|
4798
4835
|
var _a;
|
|
4799
4836
|
const pages = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data).filter(Boolean)) || [];
|
|
4800
4837
|
const sectionTitle = (section == null ? void 0 : section.title) || "";
|
|
4838
|
+
const [visibleCount, setVisibleCount] = useState(5);
|
|
4839
|
+
const visiblePages = pages.slice(0, visibleCount);
|
|
4840
|
+
const hasMore = visibleCount < pages.length;
|
|
4801
4841
|
if (!pages || pages.length === 0) {
|
|
4802
4842
|
return null;
|
|
4803
4843
|
}
|
|
4804
4844
|
const handleNavigate = (slug) => {
|
|
4805
4845
|
window.location.href = slug;
|
|
4806
4846
|
};
|
|
4847
|
+
const handleLoadMore = () => {
|
|
4848
|
+
setVisibleCount((prev) => prev + 5);
|
|
4849
|
+
};
|
|
4807
4850
|
const getImageUrl = (url) => {
|
|
4808
4851
|
if (!url) return "";
|
|
4809
4852
|
if (url.startsWith("http://") || url.startsWith("https://")) return url;
|
|
@@ -4829,7 +4872,7 @@ const PageChildrenSelectSection1 = ({ data, isDarkMode, section, imageBaseUrl =
|
|
|
4829
4872
|
display: "flex",
|
|
4830
4873
|
flexDirection: "column",
|
|
4831
4874
|
gap: "24px"
|
|
4832
|
-
}, children:
|
|
4875
|
+
}, children: visiblePages.map((page) => {
|
|
4833
4876
|
var _a2, _b;
|
|
4834
4877
|
const mainImage = ((_b = (_a2 = page.pageImages) == null ? void 0 : _a2.find((img) => img.isMain)) == null ? void 0 : _b.url) || page.icon;
|
|
4835
4878
|
const imageUrl = getImageUrl(mainImage);
|
|
@@ -4919,226 +4962,44 @@ const PageChildrenSelectSection1 = ({ data, isDarkMode, section, imageBaseUrl =
|
|
|
4919
4962
|
},
|
|
4920
4963
|
page.id
|
|
4921
4964
|
);
|
|
4922
|
-
}) })
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
}
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
cb();
|
|
4955
|
-
};
|
|
4956
|
-
i18n.on("initialized", initialized);
|
|
4957
|
-
}
|
|
4958
|
-
};
|
|
4959
|
-
const loadNamespaces = (i18n, ns, cb) => {
|
|
4960
|
-
i18n.loadNamespaces(ns, loadedClb(i18n, cb));
|
|
4961
|
-
};
|
|
4962
|
-
const loadLanguages = (i18n, lng, ns, cb) => {
|
|
4963
|
-
if (isString(ns)) ns = [ns];
|
|
4964
|
-
if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
|
|
4965
|
-
ns.forEach((n) => {
|
|
4966
|
-
if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
|
|
4967
|
-
});
|
|
4968
|
-
i18n.loadLanguages(lng, loadedClb(i18n, cb));
|
|
4969
|
-
};
|
|
4970
|
-
const hasLoadedNamespace = (ns, i18n, options = {}) => {
|
|
4971
|
-
if (!i18n.languages || !i18n.languages.length) {
|
|
4972
|
-
warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
4973
|
-
languages: i18n.languages
|
|
4974
|
-
});
|
|
4975
|
-
return true;
|
|
4976
|
-
}
|
|
4977
|
-
return i18n.hasLoadedNamespace(ns, {
|
|
4978
|
-
lng: options.lng,
|
|
4979
|
-
precheck: (i18nInstance2, loadNotPending) => {
|
|
4980
|
-
if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
|
|
4981
|
-
}
|
|
4982
|
-
});
|
|
4983
|
-
};
|
|
4984
|
-
const isString = (obj) => typeof obj === "string";
|
|
4985
|
-
const isObject = (obj) => typeof obj === "object" && obj !== null;
|
|
4986
|
-
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
4987
|
-
const htmlEntities = {
|
|
4988
|
-
"&": "&",
|
|
4989
|
-
"&": "&",
|
|
4990
|
-
"<": "<",
|
|
4991
|
-
"<": "<",
|
|
4992
|
-
">": ">",
|
|
4993
|
-
">": ">",
|
|
4994
|
-
"'": "'",
|
|
4995
|
-
"'": "'",
|
|
4996
|
-
""": '"',
|
|
4997
|
-
""": '"',
|
|
4998
|
-
" ": " ",
|
|
4999
|
-
" ": " ",
|
|
5000
|
-
"©": "©",
|
|
5001
|
-
"©": "©",
|
|
5002
|
-
"®": "®",
|
|
5003
|
-
"®": "®",
|
|
5004
|
-
"…": "…",
|
|
5005
|
-
"…": "…",
|
|
5006
|
-
"/": "/",
|
|
5007
|
-
"/": "/"
|
|
5008
|
-
};
|
|
5009
|
-
const unescapeHtmlEntity = (m) => htmlEntities[m];
|
|
5010
|
-
const unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
5011
|
-
let defaultOptions = {
|
|
5012
|
-
bindI18n: "languageChanged",
|
|
5013
|
-
bindI18nStore: "",
|
|
5014
|
-
transEmptyNodeValue: "",
|
|
5015
|
-
transSupportBasicHtmlNodes: true,
|
|
5016
|
-
transWrapTextNodes: "",
|
|
5017
|
-
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
5018
|
-
useSuspense: true,
|
|
5019
|
-
unescape
|
|
5020
|
-
};
|
|
5021
|
-
const getDefaults = () => defaultOptions;
|
|
5022
|
-
let i18nInstance;
|
|
5023
|
-
const getI18n = () => i18nInstance;
|
|
5024
|
-
const I18nContext = createContext();
|
|
5025
|
-
class ReportNamespaces {
|
|
5026
|
-
constructor() {
|
|
5027
|
-
this.usedNamespaces = {};
|
|
5028
|
-
}
|
|
5029
|
-
addUsedNamespaces(namespaces) {
|
|
5030
|
-
namespaces.forEach((ns) => {
|
|
5031
|
-
if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
|
|
5032
|
-
});
|
|
5033
|
-
}
|
|
5034
|
-
getUsedNamespaces() {
|
|
5035
|
-
return Object.keys(this.usedNamespaces);
|
|
5036
|
-
}
|
|
5037
|
-
}
|
|
5038
|
-
const usePrevious = (value, ignore) => {
|
|
5039
|
-
const ref = useRef();
|
|
5040
|
-
useEffect(() => {
|
|
5041
|
-
ref.current = value;
|
|
5042
|
-
}, [value, ignore]);
|
|
5043
|
-
return ref.current;
|
|
5044
|
-
};
|
|
5045
|
-
const alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
|
|
5046
|
-
const useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
|
|
5047
|
-
const useTranslation = (ns, props = {}) => {
|
|
5048
|
-
var _a, _b, _c, _d;
|
|
5049
|
-
const {
|
|
5050
|
-
i18n: i18nFromProps
|
|
5051
|
-
} = props;
|
|
5052
|
-
const {
|
|
5053
|
-
i18n: i18nFromContext,
|
|
5054
|
-
defaultNS: defaultNSFromContext
|
|
5055
|
-
} = useContext(I18nContext) || {};
|
|
5056
|
-
const i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
5057
|
-
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
|
|
5058
|
-
if (!i18n) {
|
|
5059
|
-
warnOnce(i18n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
5060
|
-
const notReadyT = (k, optsOrDefaultValue) => {
|
|
5061
|
-
if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
|
|
5062
|
-
if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
|
|
5063
|
-
return Array.isArray(k) ? k[k.length - 1] : k;
|
|
5064
|
-
};
|
|
5065
|
-
const retNotReady = [notReadyT, {}, false];
|
|
5066
|
-
retNotReady.t = notReadyT;
|
|
5067
|
-
retNotReady.i18n = {};
|
|
5068
|
-
retNotReady.ready = false;
|
|
5069
|
-
return retNotReady;
|
|
5070
|
-
}
|
|
5071
|
-
if ((_a = i18n.options.react) == null ? void 0 : _a.wait) warnOnce(i18n, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
5072
|
-
const i18nOptions = __spreadValues(__spreadValues(__spreadValues({}, getDefaults()), i18n.options.react), props);
|
|
5073
|
-
const {
|
|
5074
|
-
useSuspense,
|
|
5075
|
-
keyPrefix
|
|
5076
|
-
} = i18nOptions;
|
|
5077
|
-
let namespaces = defaultNSFromContext || ((_b = i18n.options) == null ? void 0 : _b.defaultNS);
|
|
5078
|
-
namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
|
|
5079
|
-
(_d = (_c = i18n.reportNamespaces).addUsedNamespaces) == null ? void 0 : _d.call(_c, namespaces);
|
|
5080
|
-
const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
|
|
5081
|
-
const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
5082
|
-
const getT = () => memoGetT;
|
|
5083
|
-
const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
5084
|
-
const [t, setT] = useState(getT);
|
|
5085
|
-
let joinedNS = namespaces.join();
|
|
5086
|
-
if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
|
|
5087
|
-
const previousJoinedNS = usePrevious(joinedNS);
|
|
5088
|
-
const isMounted = useRef(true);
|
|
5089
|
-
useEffect(() => {
|
|
5090
|
-
const {
|
|
5091
|
-
bindI18n,
|
|
5092
|
-
bindI18nStore
|
|
5093
|
-
} = i18nOptions;
|
|
5094
|
-
isMounted.current = true;
|
|
5095
|
-
if (!ready && !useSuspense) {
|
|
5096
|
-
if (props.lng) {
|
|
5097
|
-
loadLanguages(i18n, props.lng, namespaces, () => {
|
|
5098
|
-
if (isMounted.current) setT(getNewT);
|
|
5099
|
-
});
|
|
5100
|
-
} else {
|
|
5101
|
-
loadNamespaces(i18n, namespaces, () => {
|
|
5102
|
-
if (isMounted.current) setT(getNewT);
|
|
5103
|
-
});
|
|
4965
|
+
}) }),
|
|
4966
|
+
hasMore && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", justifyContent: "center", marginTop: "40px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4967
|
+
"button",
|
|
4968
|
+
{
|
|
4969
|
+
onClick: handleLoadMore,
|
|
4970
|
+
style: {
|
|
4971
|
+
display: "inline-flex",
|
|
4972
|
+
alignItems: "center",
|
|
4973
|
+
gap: "8px",
|
|
4974
|
+
padding: "12px 28px",
|
|
4975
|
+
fontSize: "16px",
|
|
4976
|
+
fontWeight: "600",
|
|
4977
|
+
color: "#fff",
|
|
4978
|
+
backgroundColor: "#2563eb",
|
|
4979
|
+
border: "none",
|
|
4980
|
+
borderRadius: "9999px",
|
|
4981
|
+
cursor: "pointer",
|
|
4982
|
+
transition: "all 0.3s",
|
|
4983
|
+
boxShadow: "0 4px 6px -1px rgba(37, 99, 235, 0.3)"
|
|
4984
|
+
},
|
|
4985
|
+
onMouseEnter: (e) => {
|
|
4986
|
+
e.currentTarget.style.backgroundColor = "#1d4ed8";
|
|
4987
|
+
e.currentTarget.style.transform = "translateY(-2px)";
|
|
4988
|
+
},
|
|
4989
|
+
onMouseLeave: (e) => {
|
|
4990
|
+
e.currentTarget.style.backgroundColor = "#2563eb";
|
|
4991
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
4992
|
+
},
|
|
4993
|
+
children: [
|
|
4994
|
+
t("pageChildrenSelect.moreInsights"),
|
|
4995
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { size: 18 })
|
|
4996
|
+
]
|
|
5104
4997
|
}
|
|
5105
|
-
}
|
|
5106
|
-
|
|
5107
|
-
setT(getNewT);
|
|
5108
|
-
}
|
|
5109
|
-
const boundReset = () => {
|
|
5110
|
-
if (isMounted.current) setT(getNewT);
|
|
5111
|
-
};
|
|
5112
|
-
if (bindI18n) i18n == null ? void 0 : i18n.on(bindI18n, boundReset);
|
|
5113
|
-
if (bindI18nStore) i18n == null ? void 0 : i18n.store.on(bindI18nStore, boundReset);
|
|
5114
|
-
return () => {
|
|
5115
|
-
isMounted.current = false;
|
|
5116
|
-
if (i18n && bindI18n) bindI18n == null ? void 0 : bindI18n.split(" ").forEach((e) => i18n.off(e, boundReset));
|
|
5117
|
-
if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e) => i18n.store.off(e, boundReset));
|
|
5118
|
-
};
|
|
5119
|
-
}, [i18n, joinedNS]);
|
|
5120
|
-
useEffect(() => {
|
|
5121
|
-
if (isMounted.current && ready) {
|
|
5122
|
-
setT(getT);
|
|
5123
|
-
}
|
|
5124
|
-
}, [i18n, keyPrefix, ready]);
|
|
5125
|
-
const ret = [t, i18n, ready];
|
|
5126
|
-
ret.t = t;
|
|
5127
|
-
ret.i18n = i18n;
|
|
5128
|
-
ret.ready = ready;
|
|
5129
|
-
if (ready) return ret;
|
|
5130
|
-
if (!ready && !useSuspense) return ret;
|
|
5131
|
-
throw new Promise((resolve) => {
|
|
5132
|
-
if (props.lng) {
|
|
5133
|
-
loadLanguages(i18n, props.lng, namespaces, () => resolve());
|
|
5134
|
-
} else {
|
|
5135
|
-
loadNamespaces(i18n, namespaces, () => resolve());
|
|
5136
|
-
}
|
|
5137
|
-
});
|
|
4998
|
+
) })
|
|
4999
|
+
] }) });
|
|
5138
5000
|
};
|
|
5139
|
-
const PageChildrenSelectSection2 = ({ data, isDarkMode, section, imageBaseUrl = "" }) => {
|
|
5001
|
+
const PageChildrenSelectSection2 = ({ data, isDarkMode, t, section, imageBaseUrl = "" }) => {
|
|
5140
5002
|
var _a;
|
|
5141
|
-
const { t } = useTranslation();
|
|
5142
5003
|
const pages = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data).filter(Boolean)) || [];
|
|
5143
5004
|
const sectionTitle = (section == null ? void 0 : section.title) || "";
|
|
5144
5005
|
const [visibleCount, setVisibleCount] = useState(6);
|