@windrun-huaiin/third-ui 6.2.0 → 6.2.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.
- package/dist/fuma/mdx/index.d.mts +30 -2
- package/dist/fuma/mdx/index.d.ts +30 -2
- package/dist/fuma/mdx/index.js +152 -3
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +151 -3
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.d.mts +1 -1
- package/dist/fuma/server.d.ts +1 -1
- package/dist/fuma/server.js +30 -3201
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +25 -3200
- package/dist/fuma/server.mjs.map +1 -1
- package/dist/main/index.d.mts +65 -1
- package/dist/main/index.d.ts +65 -1
- package/dist/main/index.js +364 -0
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +361 -0
- package/dist/main/index.mjs.map +1 -1
- package/dist/main/server.js +207 -886
- package/dist/main/server.js.map +1 -1
- package/dist/main/server.mjs +115 -794
- package/dist/main/server.mjs.map +1 -1
- package/package.json +2 -2
- package/src/fuma/fuma-banner-suit.tsx +1 -1
- package/src/fuma/mdx/index.ts +2 -1
- package/src/main/faq.tsx +1 -1
- package/src/main/gallery.tsx +1 -1
- package/src/main/index.ts +4 -1
- package/src/main/price-plan.tsx +1 -1
- package/dist/toc-base-BC7kXpDU.d.mts +0 -15
- package/dist/toc-base-BC7kXpDU.d.ts +0 -15
package/dist/main/server.mjs
CHANGED
|
@@ -67,121 +67,7 @@ function cn(...inputs) {
|
|
|
67
67
|
|
|
68
68
|
// src/main/gallery.tsx
|
|
69
69
|
import Image from "next/image";
|
|
70
|
-
|
|
71
|
-
// src/main/gallery-interactive.tsx
|
|
72
|
-
import { useState, useEffect } from "react";
|
|
73
|
-
function GalleryInteractive({ data }) {
|
|
74
|
-
const [imageErrors, setImageErrors] = useState(/* @__PURE__ */ new Set());
|
|
75
|
-
const [downloadingItems, setDownloadingItems] = useState(/* @__PURE__ */ new Set());
|
|
76
|
-
const cdnProxyUrl = process.env.NEXT_PUBLIC_STYLE_CDN_PROXY_URL;
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
data.items.forEach((item, index) => {
|
|
79
|
-
const downloadButton = document.querySelector(`[data-gallery-download="${item.id}"]`);
|
|
80
|
-
const imageElement = document.querySelector(`[data-gallery-image="${item.id}"]`);
|
|
81
|
-
if (downloadButton) {
|
|
82
|
-
const handleDownload = () => __async(null, null, function* () {
|
|
83
|
-
var _a;
|
|
84
|
-
if (downloadingItems.has(item.id)) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
setDownloadingItems((prev) => new Set(prev).add(item.id));
|
|
88
|
-
try {
|
|
89
|
-
if (!cdnProxyUrl) {
|
|
90
|
-
throw new Error("CDN proxy URL not configured");
|
|
91
|
-
}
|
|
92
|
-
const originalUrl = new URL(item.url);
|
|
93
|
-
const filename = originalUrl.pathname.substring(1);
|
|
94
|
-
const proxyUrl = `${cdnProxyUrl}/${encodeURIComponent(filename)}`;
|
|
95
|
-
const urlExtension = (_a = item.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
|
96
|
-
let extension = ".webp";
|
|
97
|
-
if (urlExtension && ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(urlExtension)) {
|
|
98
|
-
extension = `.${urlExtension}`;
|
|
99
|
-
}
|
|
100
|
-
const response = yield fetch(proxyUrl);
|
|
101
|
-
if (!response.ok) {
|
|
102
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
103
|
-
}
|
|
104
|
-
const blob = yield response.blob();
|
|
105
|
-
const blobUrl = URL.createObjectURL(blob);
|
|
106
|
-
const a = document.createElement("a");
|
|
107
|
-
a.href = blobUrl;
|
|
108
|
-
a.download = `${data.downloadPrefix}-${index + 1}${extension}`;
|
|
109
|
-
a.style.display = "none";
|
|
110
|
-
document.body.appendChild(a);
|
|
111
|
-
a.click();
|
|
112
|
-
setTimeout(() => {
|
|
113
|
-
document.body.removeChild(a);
|
|
114
|
-
URL.revokeObjectURL(blobUrl);
|
|
115
|
-
}, 100);
|
|
116
|
-
} catch (error) {
|
|
117
|
-
console.error("Download failed:", error);
|
|
118
|
-
} finally {
|
|
119
|
-
setDownloadingItems((prev) => {
|
|
120
|
-
const newSet = new Set(prev);
|
|
121
|
-
newSet.delete(item.id);
|
|
122
|
-
return newSet;
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
downloadButton.addEventListener("click", handleDownload);
|
|
127
|
-
}
|
|
128
|
-
if (imageElement) {
|
|
129
|
-
const handleImageError = () => {
|
|
130
|
-
setImageErrors((prev) => new Set(prev).add(item.id));
|
|
131
|
-
imageElement.src = data.defaultImgUrl;
|
|
132
|
-
};
|
|
133
|
-
imageElement.addEventListener("error", handleImageError);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
const updateDownloadStates = () => {
|
|
137
|
-
data.items.forEach((item) => {
|
|
138
|
-
const downloadButton = document.querySelector(`[data-gallery-download="${item.id}"]`);
|
|
139
|
-
if (downloadButton) {
|
|
140
|
-
const isDownloading = downloadingItems.has(item.id);
|
|
141
|
-
if (isDownloading) {
|
|
142
|
-
downloadButton.disabled = true;
|
|
143
|
-
downloadButton.classList.add("bg-black/30", "text-white/50");
|
|
144
|
-
downloadButton.classList.remove("bg-black/50", "hover:bg-black/70", "text-white/80", "hover:text-white");
|
|
145
|
-
downloadButton.innerHTML = `
|
|
146
|
-
<svg class="h-5 w-5 text-white animate-spin" fill="none" viewBox="0 0 24 24">
|
|
147
|
-
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
148
|
-
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
149
|
-
</svg>
|
|
150
|
-
`;
|
|
151
|
-
} else {
|
|
152
|
-
downloadButton.disabled = false;
|
|
153
|
-
downloadButton.classList.remove("bg-black/30", "text-white/50");
|
|
154
|
-
downloadButton.classList.add("bg-black/50", "hover:bg-black/70", "text-white/80", "hover:text-white");
|
|
155
|
-
downloadButton.innerHTML = `
|
|
156
|
-
<svg class="h-5 w-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
157
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
|
158
|
-
</svg>
|
|
159
|
-
`;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
updateDownloadStates();
|
|
165
|
-
return () => {
|
|
166
|
-
data.items.forEach((item) => {
|
|
167
|
-
var _a, _b;
|
|
168
|
-
const downloadButton = document.querySelector(`[data-gallery-download="${item.id}"]`);
|
|
169
|
-
const imageElement = document.querySelector(`[data-gallery-image="${item.id}"]`);
|
|
170
|
-
if (downloadButton) {
|
|
171
|
-
const newButton = downloadButton.cloneNode(true);
|
|
172
|
-
(_a = downloadButton.parentNode) == null ? void 0 : _a.replaceChild(newButton, downloadButton);
|
|
173
|
-
}
|
|
174
|
-
if (imageElement) {
|
|
175
|
-
const newImage = imageElement.cloneNode(true);
|
|
176
|
-
(_b = imageElement.parentNode) == null ? void 0 : _b.replaceChild(newImage, imageElement);
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
};
|
|
180
|
-
}, [data, downloadingItems, imageErrors, cdnProxyUrl]);
|
|
181
|
-
return null;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// src/main/gallery.tsx
|
|
70
|
+
import { GalleryInteractive } from "@third-ui/main";
|
|
185
71
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
186
72
|
function Gallery(_0) {
|
|
187
73
|
return __async(this, arguments, function* ({ locale, sectionClassName, button }) {
|
|
@@ -2915,34 +2801,9 @@ function getGlobalIcon(iconKey, createElement3) {
|
|
|
2915
2801
|
return Icon2;
|
|
2916
2802
|
}
|
|
2917
2803
|
|
|
2918
|
-
// src/main/rich-text-expert.tsx
|
|
2919
|
-
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2920
|
-
var defaultTagRenderers = {
|
|
2921
|
-
// text Stong
|
|
2922
|
-
strong: (chunks) => /* @__PURE__ */ jsx34("strong", { children: chunks }),
|
|
2923
|
-
// text Emphasis
|
|
2924
|
-
em: (chunks) => /* @__PURE__ */ jsx34("em", { children: chunks }),
|
|
2925
|
-
// text Underline
|
|
2926
|
-
u: (chunks) => /* @__PURE__ */ jsx34("u", { children: chunks }),
|
|
2927
|
-
// text Mark
|
|
2928
|
-
mark: (chunks) => /* @__PURE__ */ jsx34("mark", { className: "bg-purple-300 dark:bg-purple-500 text-neutral-800 dark:text-neutral-300 px-1 rounded", children: chunks }),
|
|
2929
|
-
// text Delete
|
|
2930
|
-
del: (chunks) => /* @__PURE__ */ jsx34("del", { children: chunks }),
|
|
2931
|
-
// text Subscript
|
|
2932
|
-
sub: (chunks) => /* @__PURE__ */ jsx34("sub", { children: chunks }),
|
|
2933
|
-
// text Superscript
|
|
2934
|
-
sup: (chunks) => /* @__PURE__ */ jsx34("sup", { children: chunks })
|
|
2935
|
-
};
|
|
2936
|
-
function createRichTextRenderer(customRenderers) {
|
|
2937
|
-
const renderers = __spreadValues(__spreadValues({}, defaultTagRenderers), customRenderers);
|
|
2938
|
-
return function richText2(t, key) {
|
|
2939
|
-
return t.rich(key, renderers);
|
|
2940
|
-
};
|
|
2941
|
-
}
|
|
2942
|
-
var richText = createRichTextRenderer();
|
|
2943
|
-
|
|
2944
2804
|
// src/main/usage.tsx
|
|
2945
|
-
import {
|
|
2805
|
+
import { richText } from "@third-ui/main/rich-text-expert";
|
|
2806
|
+
import { jsx as jsx34, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2946
2807
|
function Usage(_0) {
|
|
2947
2808
|
return __async(this, arguments, function* ({
|
|
2948
2809
|
locale,
|
|
@@ -2966,16 +2827,16 @@ function Usage(_0) {
|
|
|
2966
2827
|
/* @__PURE__ */ jsxs11("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
2967
2828
|
data.title,
|
|
2968
2829
|
" ",
|
|
2969
|
-
/* @__PURE__ */
|
|
2830
|
+
/* @__PURE__ */ jsx34("span", { className: "text-purple-500", children: data.eyesOn })
|
|
2970
2831
|
] }),
|
|
2971
|
-
/* @__PURE__ */
|
|
2972
|
-
/* @__PURE__ */
|
|
2832
|
+
/* @__PURE__ */ jsx34("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap", children: data.description }),
|
|
2833
|
+
/* @__PURE__ */ jsx34("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: /* @__PURE__ */ jsx34("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: data.steps.map((step) => {
|
|
2973
2834
|
const Icon2 = getGlobalIcon(step.iconKey);
|
|
2974
2835
|
return /* @__PURE__ */ jsxs11("div", { "data-usage-step": step.id, className: "flex items-start", children: [
|
|
2975
|
-
/* @__PURE__ */
|
|
2836
|
+
/* @__PURE__ */ jsx34("div", { className: "flex-shrink-0 mr-4", children: /* @__PURE__ */ jsx34(Icon2, { className: "w-8 h-8 text-purple-500" }) }),
|
|
2976
2837
|
/* @__PURE__ */ jsxs11("div", { children: [
|
|
2977
|
-
/* @__PURE__ */
|
|
2978
|
-
/* @__PURE__ */
|
|
2838
|
+
/* @__PURE__ */ jsx34("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: `${step.stepNumber}. ${step.title}` }),
|
|
2839
|
+
/* @__PURE__ */ jsx34("p", { className: "text-gray-700 dark:text-gray-300", children: step.description })
|
|
2979
2840
|
] })
|
|
2980
2841
|
] }, step.id);
|
|
2981
2842
|
}) }) })
|
|
@@ -2985,7 +2846,8 @@ function Usage(_0) {
|
|
|
2985
2846
|
|
|
2986
2847
|
// src/main/features.tsx
|
|
2987
2848
|
import { getTranslations as getTranslations3 } from "next-intl/server";
|
|
2988
|
-
import {
|
|
2849
|
+
import { richText as richText2 } from "@third-ui/main/rich-text-expert";
|
|
2850
|
+
import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2989
2851
|
function Features(_0) {
|
|
2990
2852
|
return __async(this, arguments, function* ({
|
|
2991
2853
|
locale,
|
|
@@ -2996,11 +2858,11 @@ function Features(_0) {
|
|
|
2996
2858
|
const data = {
|
|
2997
2859
|
title: t("title"),
|
|
2998
2860
|
eyesOn: t("eyesOn"),
|
|
2999
|
-
description:
|
|
2861
|
+
description: richText2(t, "description"),
|
|
3000
2862
|
items: featureItems.map((feature, index) => ({
|
|
3001
2863
|
id: `feature-item-${index}`,
|
|
3002
2864
|
title: feature.title,
|
|
3003
|
-
description:
|
|
2865
|
+
description: richText2(t, `items.${index}.description`),
|
|
3004
2866
|
iconKey: feature.iconKey
|
|
3005
2867
|
}))
|
|
3006
2868
|
};
|
|
@@ -3008,10 +2870,10 @@ function Features(_0) {
|
|
|
3008
2870
|
/* @__PURE__ */ jsxs12("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
3009
2871
|
data.title,
|
|
3010
2872
|
" ",
|
|
3011
|
-
/* @__PURE__ */
|
|
2873
|
+
/* @__PURE__ */ jsx35("span", { className: "text-purple-500", children: data.eyesOn })
|
|
3012
2874
|
] }),
|
|
3013
|
-
/* @__PURE__ */
|
|
3014
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ jsx35("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap", children: data.description }),
|
|
2876
|
+
/* @__PURE__ */ jsx35("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: data.items.map((feature) => {
|
|
3015
2877
|
const Icon2 = getGlobalIcon(feature.iconKey);
|
|
3016
2878
|
return /* @__PURE__ */ jsxs12(
|
|
3017
2879
|
"div",
|
|
@@ -3019,9 +2881,9 @@ function Features(_0) {
|
|
|
3019
2881
|
"data-feature-id": feature.id,
|
|
3020
2882
|
className: "bg-white dark:bg-gray-800/60 p-8 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none",
|
|
3021
2883
|
children: [
|
|
3022
|
-
/* @__PURE__ */
|
|
3023
|
-
/* @__PURE__ */
|
|
3024
|
-
/* @__PURE__ */
|
|
2884
|
+
/* @__PURE__ */ jsx35("div", { className: "text-4xl mb-4 flex items-center justify-start", children: /* @__PURE__ */ jsx35(Icon2, { className: "w-8 h-8" }) }),
|
|
2885
|
+
/* @__PURE__ */ jsx35("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100", children: feature.title }),
|
|
2886
|
+
/* @__PURE__ */ jsx35("p", { className: "text-gray-700 dark:text-gray-300", children: feature.description })
|
|
3025
2887
|
]
|
|
3026
2888
|
},
|
|
3027
2889
|
feature.id
|
|
@@ -3033,7 +2895,8 @@ function Features(_0) {
|
|
|
3033
2895
|
|
|
3034
2896
|
// src/main/tips.tsx
|
|
3035
2897
|
import { getTranslations as getTranslations4 } from "next-intl/server";
|
|
3036
|
-
import {
|
|
2898
|
+
import { richText as richText3 } from "@third-ui/main/rich-text-expert";
|
|
2899
|
+
import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3037
2900
|
function Tips(_0) {
|
|
3038
2901
|
return __async(this, arguments, function* ({
|
|
3039
2902
|
locale,
|
|
@@ -3044,7 +2907,7 @@ function Tips(_0) {
|
|
|
3044
2907
|
const processedSections = sections.map((section, index) => ({
|
|
3045
2908
|
id: `tip-section-${index}`,
|
|
3046
2909
|
title: section.title,
|
|
3047
|
-
description:
|
|
2910
|
+
description: richText3(t, `sections.${index}.description`)
|
|
3048
2911
|
}));
|
|
3049
2912
|
const midPoint = Math.ceil(processedSections.length / 2);
|
|
3050
2913
|
const leftColumn = processedSections.slice(0, midPoint);
|
|
@@ -3059,11 +2922,11 @@ function Tips(_0) {
|
|
|
3059
2922
|
/* @__PURE__ */ jsxs13("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-16", children: [
|
|
3060
2923
|
data.title,
|
|
3061
2924
|
" ",
|
|
3062
|
-
/* @__PURE__ */
|
|
2925
|
+
/* @__PURE__ */ jsx36("span", { className: "text-purple-500", children: data.eyesOn })
|
|
3063
2926
|
] }),
|
|
3064
|
-
/* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3066
|
-
/* @__PURE__ */
|
|
2927
|
+
/* @__PURE__ */ jsx36("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-12 bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [data.leftColumn, data.rightColumn].map((column, colIndex) => /* @__PURE__ */ jsx36("div", { className: "space-y-8", children: column.map((tip) => /* @__PURE__ */ jsxs13("div", { "data-tip-id": tip.id, className: "space-y-4", children: [
|
|
2928
|
+
/* @__PURE__ */ jsx36("h3", { className: "text-2xl font-semibold", children: tip.title }),
|
|
2929
|
+
/* @__PURE__ */ jsx36("p", { className: "", children: tip.description })
|
|
3067
2930
|
] }, tip.id)) }, colIndex)) })
|
|
3068
2931
|
] });
|
|
3069
2932
|
});
|
|
@@ -3071,52 +2934,9 @@ function Tips(_0) {
|
|
|
3071
2934
|
|
|
3072
2935
|
// src/main/faq.tsx
|
|
3073
2936
|
import { getTranslations as getTranslations5 } from "next-intl/server";
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
import {
|
|
3077
|
-
function FAQInteractive({ data }) {
|
|
3078
|
-
const [openStates, setOpenStates] = useState2({});
|
|
3079
|
-
useEffect2(() => {
|
|
3080
|
-
data.items.forEach((item) => {
|
|
3081
|
-
const toggleButton = document.querySelector(`[data-faq-toggle="${item.id}"]`);
|
|
3082
|
-
const contentDiv = document.querySelector(`[data-faq-content="${item.id}"]`);
|
|
3083
|
-
const iconSvg = document.querySelector(`[data-faq-icon="${item.id}"]`);
|
|
3084
|
-
if (toggleButton && contentDiv && iconSvg) {
|
|
3085
|
-
const handleClick = () => {
|
|
3086
|
-
const isOpen = openStates[item.id] || false;
|
|
3087
|
-
const newOpenState = !isOpen;
|
|
3088
|
-
setOpenStates((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
3089
|
-
[item.id]: newOpenState
|
|
3090
|
-
}));
|
|
3091
|
-
if (newOpenState) {
|
|
3092
|
-
contentDiv.classList.remove("hidden");
|
|
3093
|
-
toggleButton.setAttribute("aria-expanded", "true");
|
|
3094
|
-
iconSvg.style.transform = "rotate(90deg)";
|
|
3095
|
-
} else {
|
|
3096
|
-
contentDiv.classList.add("hidden");
|
|
3097
|
-
toggleButton.setAttribute("aria-expanded", "false");
|
|
3098
|
-
iconSvg.style.transform = "rotate(0deg)";
|
|
3099
|
-
}
|
|
3100
|
-
};
|
|
3101
|
-
toggleButton.addEventListener("click", handleClick);
|
|
3102
|
-
}
|
|
3103
|
-
});
|
|
3104
|
-
return () => {
|
|
3105
|
-
data.items.forEach((item) => {
|
|
3106
|
-
var _a;
|
|
3107
|
-
const toggleButton = document.querySelector(`[data-faq-toggle="${item.id}"]`);
|
|
3108
|
-
if (toggleButton) {
|
|
3109
|
-
const newButton = toggleButton.cloneNode(true);
|
|
3110
|
-
(_a = toggleButton.parentNode) == null ? void 0 : _a.replaceChild(newButton, toggleButton);
|
|
3111
|
-
}
|
|
3112
|
-
});
|
|
3113
|
-
};
|
|
3114
|
-
}, [data, openStates]);
|
|
3115
|
-
return null;
|
|
3116
|
-
}
|
|
3117
|
-
|
|
3118
|
-
// src/main/faq.tsx
|
|
3119
|
-
import { jsx as jsx38, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2937
|
+
import { richText as richText4 } from "@third-ui/main/rich-text-expert";
|
|
2938
|
+
import { FAQInteractive } from "@third-ui/main";
|
|
2939
|
+
import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3120
2940
|
function FAQ(_0) {
|
|
3121
2941
|
return __async(this, arguments, function* ({
|
|
3122
2942
|
locale,
|
|
@@ -3126,17 +2946,17 @@ function FAQ(_0) {
|
|
|
3126
2946
|
const rawItems = t.raw("items");
|
|
3127
2947
|
const data = {
|
|
3128
2948
|
title: t("title"),
|
|
3129
|
-
description:
|
|
2949
|
+
description: richText4(t, "description"),
|
|
3130
2950
|
items: rawItems.map((item, index) => ({
|
|
3131
2951
|
id: `faq-item-${index}`,
|
|
3132
2952
|
question: item.question,
|
|
3133
|
-
answer:
|
|
2953
|
+
answer: richText4(t, `items.${index}.answer`)
|
|
3134
2954
|
}))
|
|
3135
2955
|
};
|
|
3136
2956
|
return /* @__PURE__ */ jsxs14("section", { id: "faq", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
/* @__PURE__ */
|
|
2957
|
+
/* @__PURE__ */ jsx37("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: data.title }),
|
|
2958
|
+
/* @__PURE__ */ jsx37("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto", children: data.description }),
|
|
2959
|
+
/* @__PURE__ */ jsx37("div", { className: "space-y-6", children: data.items.map((item) => /* @__PURE__ */ jsxs14(
|
|
3140
2960
|
"div",
|
|
3141
2961
|
{
|
|
3142
2962
|
"data-faq-id": item.id,
|
|
@@ -3149,8 +2969,8 @@ function FAQ(_0) {
|
|
|
3149
2969
|
"data-faq-toggle": item.id,
|
|
3150
2970
|
"aria-expanded": "false",
|
|
3151
2971
|
children: [
|
|
3152
|
-
/* @__PURE__ */
|
|
3153
|
-
/* @__PURE__ */
|
|
2972
|
+
/* @__PURE__ */ jsx37("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
|
|
2973
|
+
/* @__PURE__ */ jsx37(
|
|
3154
2974
|
"svg",
|
|
3155
2975
|
{
|
|
3156
2976
|
className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200",
|
|
@@ -3158,13 +2978,13 @@ function FAQ(_0) {
|
|
|
3158
2978
|
fill: "none",
|
|
3159
2979
|
stroke: "currentColor",
|
|
3160
2980
|
viewBox: "0 0 24 24",
|
|
3161
|
-
children: /* @__PURE__ */
|
|
2981
|
+
children: /* @__PURE__ */ jsx37("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
|
|
3162
2982
|
}
|
|
3163
2983
|
)
|
|
3164
2984
|
]
|
|
3165
2985
|
}
|
|
3166
2986
|
),
|
|
3167
|
-
/* @__PURE__ */
|
|
2987
|
+
/* @__PURE__ */ jsx37(
|
|
3168
2988
|
"div",
|
|
3169
2989
|
{
|
|
3170
2990
|
className: "mt-4 text-gray-700 dark:text-gray-300 text-base hidden",
|
|
@@ -3176,14 +2996,15 @@ function FAQ(_0) {
|
|
|
3176
2996
|
},
|
|
3177
2997
|
item.id
|
|
3178
2998
|
)) }),
|
|
3179
|
-
/* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ jsx37(FAQInteractive, { data })
|
|
3180
3000
|
] });
|
|
3181
3001
|
});
|
|
3182
3002
|
}
|
|
3183
3003
|
|
|
3184
3004
|
// src/main/seo-content.tsx
|
|
3185
3005
|
import { getTranslations as getTranslations6 } from "next-intl/server";
|
|
3186
|
-
import {
|
|
3006
|
+
import { richText as richText5 } from "@third-ui/main/rich-text-expert";
|
|
3007
|
+
import { jsx as jsx38, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3187
3008
|
function SeoContent(_0) {
|
|
3188
3009
|
return __async(this, arguments, function* ({
|
|
3189
3010
|
locale,
|
|
@@ -3195,30 +3016,30 @@ function SeoContent(_0) {
|
|
|
3195
3016
|
title: t("title"),
|
|
3196
3017
|
eyesOn: t("eyesOn"),
|
|
3197
3018
|
description: t("description"),
|
|
3198
|
-
intro:
|
|
3019
|
+
intro: richText5(t, "intro"),
|
|
3199
3020
|
sections: rawSections.map((section, index) => ({
|
|
3200
3021
|
id: `seo-section-${index}`,
|
|
3201
3022
|
title: section.title,
|
|
3202
|
-
content:
|
|
3023
|
+
content: richText5(t, `sections.${index}.content`)
|
|
3203
3024
|
})),
|
|
3204
|
-
conclusion:
|
|
3025
|
+
conclusion: richText5(t, "conclusion")
|
|
3205
3026
|
};
|
|
3206
3027
|
return /* @__PURE__ */ jsxs15("section", { id: "seo", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
3207
3028
|
/* @__PURE__ */ jsxs15("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
|
|
3208
3029
|
data.title,
|
|
3209
3030
|
" ",
|
|
3210
|
-
/* @__PURE__ */
|
|
3031
|
+
/* @__PURE__ */ jsx38("span", { className: "text-purple-500", children: data.eyesOn })
|
|
3211
3032
|
] }),
|
|
3212
|
-
/* @__PURE__ */
|
|
3033
|
+
/* @__PURE__ */ jsx38("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: data.description }),
|
|
3213
3034
|
/* @__PURE__ */ jsxs15("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [
|
|
3214
3035
|
/* @__PURE__ */ jsxs15("div", { className: "space-y-10", children: [
|
|
3215
|
-
/* @__PURE__ */
|
|
3036
|
+
/* @__PURE__ */ jsx38("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: data.intro }),
|
|
3216
3037
|
data.sections.map((section) => /* @__PURE__ */ jsxs15("div", { "data-seo-section": section.id, children: [
|
|
3217
|
-
/* @__PURE__ */
|
|
3218
|
-
/* @__PURE__ */
|
|
3038
|
+
/* @__PURE__ */ jsx38("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }),
|
|
3039
|
+
/* @__PURE__ */ jsx38("p", { className: "text-gray-700 dark:text-gray-300", children: section.content })
|
|
3219
3040
|
] }, section.id))
|
|
3220
3041
|
] }),
|
|
3221
|
-
/* @__PURE__ */
|
|
3042
|
+
/* @__PURE__ */ jsx38("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: data.conclusion })
|
|
3222
3043
|
] })
|
|
3223
3044
|
] });
|
|
3224
3045
|
});
|
|
@@ -3226,306 +3047,9 @@ function SeoContent(_0) {
|
|
|
3226
3047
|
|
|
3227
3048
|
// src/main/cta.tsx
|
|
3228
3049
|
import { getTranslations as getTranslations7 } from "next-intl/server";
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
import
|
|
3232
|
-
|
|
3233
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3234
|
-
import * as React34 from "react";
|
|
3235
|
-
|
|
3236
|
-
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
3237
|
-
import * as React33 from "react";
|
|
3238
|
-
function setRef(ref, value) {
|
|
3239
|
-
if (typeof ref === "function") {
|
|
3240
|
-
return ref(value);
|
|
3241
|
-
} else if (ref !== null && ref !== void 0) {
|
|
3242
|
-
ref.current = value;
|
|
3243
|
-
}
|
|
3244
|
-
}
|
|
3245
|
-
function composeRefs(...refs) {
|
|
3246
|
-
return (node) => {
|
|
3247
|
-
let hasCleanup = false;
|
|
3248
|
-
const cleanups = refs.map((ref) => {
|
|
3249
|
-
const cleanup = setRef(ref, node);
|
|
3250
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
3251
|
-
hasCleanup = true;
|
|
3252
|
-
}
|
|
3253
|
-
return cleanup;
|
|
3254
|
-
});
|
|
3255
|
-
if (hasCleanup) {
|
|
3256
|
-
return () => {
|
|
3257
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
3258
|
-
const cleanup = cleanups[i];
|
|
3259
|
-
if (typeof cleanup == "function") {
|
|
3260
|
-
cleanup();
|
|
3261
|
-
} else {
|
|
3262
|
-
setRef(refs[i], null);
|
|
3263
|
-
}
|
|
3264
|
-
}
|
|
3265
|
-
};
|
|
3266
|
-
}
|
|
3267
|
-
};
|
|
3268
|
-
}
|
|
3269
|
-
|
|
3270
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3271
|
-
import { Fragment as Fragment2, jsx as jsx40 } from "react/jsx-runtime";
|
|
3272
|
-
// @__NO_SIDE_EFFECTS__
|
|
3273
|
-
function createSlot(ownerName) {
|
|
3274
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
3275
|
-
const Slot2 = React34.forwardRef((props, forwardedRef) => {
|
|
3276
|
-
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3277
|
-
const childrenArray = React34.Children.toArray(children);
|
|
3278
|
-
const slottable = childrenArray.find(isSlottable);
|
|
3279
|
-
if (slottable) {
|
|
3280
|
-
const newElement = slottable.props.children;
|
|
3281
|
-
const newChildren = childrenArray.map((child) => {
|
|
3282
|
-
if (child === slottable) {
|
|
3283
|
-
if (React34.Children.count(newElement) > 1) return React34.Children.only(null);
|
|
3284
|
-
return React34.isValidElement(newElement) ? newElement.props.children : null;
|
|
3285
|
-
} else {
|
|
3286
|
-
return child;
|
|
3287
|
-
}
|
|
3288
|
-
});
|
|
3289
|
-
return /* @__PURE__ */ jsx40(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
|
|
3290
|
-
}
|
|
3291
|
-
return /* @__PURE__ */ jsx40(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
3292
|
-
});
|
|
3293
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
3294
|
-
return Slot2;
|
|
3295
|
-
}
|
|
3296
|
-
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
3297
|
-
// @__NO_SIDE_EFFECTS__
|
|
3298
|
-
function createSlotClone(ownerName) {
|
|
3299
|
-
const SlotClone = React34.forwardRef((props, forwardedRef) => {
|
|
3300
|
-
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3301
|
-
if (React34.isValidElement(children)) {
|
|
3302
|
-
const childrenRef = getElementRef(children);
|
|
3303
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
3304
|
-
if (children.type !== React34.Fragment) {
|
|
3305
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3306
|
-
}
|
|
3307
|
-
return React34.cloneElement(children, props2);
|
|
3308
|
-
}
|
|
3309
|
-
return React34.Children.count(children) > 1 ? React34.Children.only(null) : null;
|
|
3310
|
-
});
|
|
3311
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3312
|
-
return SlotClone;
|
|
3313
|
-
}
|
|
3314
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
3315
|
-
function isSlottable(child) {
|
|
3316
|
-
return React34.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3317
|
-
}
|
|
3318
|
-
function mergeProps(slotProps, childProps) {
|
|
3319
|
-
const overrideProps = __spreadValues({}, childProps);
|
|
3320
|
-
for (const propName in childProps) {
|
|
3321
|
-
const slotPropValue = slotProps[propName];
|
|
3322
|
-
const childPropValue = childProps[propName];
|
|
3323
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
3324
|
-
if (isHandler) {
|
|
3325
|
-
if (slotPropValue && childPropValue) {
|
|
3326
|
-
overrideProps[propName] = (...args) => {
|
|
3327
|
-
const result = childPropValue(...args);
|
|
3328
|
-
slotPropValue(...args);
|
|
3329
|
-
return result;
|
|
3330
|
-
};
|
|
3331
|
-
} else if (slotPropValue) {
|
|
3332
|
-
overrideProps[propName] = slotPropValue;
|
|
3333
|
-
}
|
|
3334
|
-
} else if (propName === "style") {
|
|
3335
|
-
overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue);
|
|
3336
|
-
} else if (propName === "className") {
|
|
3337
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3338
|
-
}
|
|
3339
|
-
}
|
|
3340
|
-
return __spreadValues(__spreadValues({}, slotProps), overrideProps);
|
|
3341
|
-
}
|
|
3342
|
-
function getElementRef(element) {
|
|
3343
|
-
var _a, _b;
|
|
3344
|
-
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
3345
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3346
|
-
if (mayWarn) {
|
|
3347
|
-
return element.ref;
|
|
3348
|
-
}
|
|
3349
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
3350
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3351
|
-
if (mayWarn) {
|
|
3352
|
-
return element.props.ref;
|
|
3353
|
-
}
|
|
3354
|
-
return element.props.ref || element.ref;
|
|
3355
|
-
}
|
|
3356
|
-
|
|
3357
|
-
// ../base-ui/src/ui/button.tsx
|
|
3358
|
-
import { cva } from "class-variance-authority";
|
|
3359
|
-
import { jsx as jsx41, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3360
|
-
var buttonVariants = cva(
|
|
3361
|
-
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3362
|
-
{
|
|
3363
|
-
variants: {
|
|
3364
|
-
variant: {
|
|
3365
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
3366
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
3367
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
3368
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
3369
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
3370
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
3371
|
-
},
|
|
3372
|
-
size: {
|
|
3373
|
-
default: "h-10 px-4 py-2",
|
|
3374
|
-
sm: "h-9 rounded-md px-3",
|
|
3375
|
-
lg: "h-11 rounded-md px-8",
|
|
3376
|
-
icon: "h-10 w-10"
|
|
3377
|
-
}
|
|
3378
|
-
},
|
|
3379
|
-
defaultVariants: {
|
|
3380
|
-
variant: "default",
|
|
3381
|
-
size: "default"
|
|
3382
|
-
}
|
|
3383
|
-
}
|
|
3384
|
-
);
|
|
3385
|
-
var Button = React35.forwardRef(
|
|
3386
|
-
(_a, ref) => {
|
|
3387
|
-
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
3388
|
-
const Comp = asChild ? Slot : "button";
|
|
3389
|
-
if (asChild) {
|
|
3390
|
-
return /* @__PURE__ */ jsx41(
|
|
3391
|
-
Comp,
|
|
3392
|
-
__spreadProps(__spreadValues({
|
|
3393
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
3394
|
-
ref,
|
|
3395
|
-
disabled: loading || props.disabled
|
|
3396
|
-
}, props), {
|
|
3397
|
-
children
|
|
3398
|
-
})
|
|
3399
|
-
);
|
|
3400
|
-
}
|
|
3401
|
-
return /* @__PURE__ */ jsxs16(
|
|
3402
|
-
Comp,
|
|
3403
|
-
__spreadProps(__spreadValues({
|
|
3404
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
3405
|
-
ref,
|
|
3406
|
-
disabled: loading || props.disabled
|
|
3407
|
-
}, props), {
|
|
3408
|
-
children: [
|
|
3409
|
-
children,
|
|
3410
|
-
loading && /* @__PURE__ */ jsx41(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
3411
|
-
]
|
|
3412
|
-
})
|
|
3413
|
-
);
|
|
3414
|
-
}
|
|
3415
|
-
);
|
|
3416
|
-
Button.displayName = "Button";
|
|
3417
|
-
|
|
3418
|
-
// src/fuma/mdx/gradient-button.tsx
|
|
3419
|
-
import Link2 from "next/link";
|
|
3420
|
-
import React36, { useState as useState3 } from "react";
|
|
3421
|
-
import { Fragment as Fragment3, jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3422
|
-
function GradientButton({
|
|
3423
|
-
title,
|
|
3424
|
-
icon,
|
|
3425
|
-
align = "left",
|
|
3426
|
-
disabled = false,
|
|
3427
|
-
className = "",
|
|
3428
|
-
href,
|
|
3429
|
-
openInNewTab = true,
|
|
3430
|
-
onClick,
|
|
3431
|
-
loadingText,
|
|
3432
|
-
preventDoubleClick = true
|
|
3433
|
-
}) {
|
|
3434
|
-
const [isLoading, setIsLoading] = useState3(false);
|
|
3435
|
-
const actualLoadingText = loadingText || (title == null ? void 0 : title.toString().trim()) || "Loading...";
|
|
3436
|
-
const getAlignmentClass = () => {
|
|
3437
|
-
switch (align) {
|
|
3438
|
-
case "center":
|
|
3439
|
-
return "justify-center";
|
|
3440
|
-
case "right":
|
|
3441
|
-
return "justify-end";
|
|
3442
|
-
default:
|
|
3443
|
-
return "justify-start";
|
|
3444
|
-
}
|
|
3445
|
-
};
|
|
3446
|
-
const handleClick = (e) => __async(null, null, function* () {
|
|
3447
|
-
if (disabled || isLoading) {
|
|
3448
|
-
e.preventDefault();
|
|
3449
|
-
return;
|
|
3450
|
-
}
|
|
3451
|
-
if (onClick) {
|
|
3452
|
-
e.preventDefault();
|
|
3453
|
-
if (preventDoubleClick) {
|
|
3454
|
-
setIsLoading(true);
|
|
3455
|
-
}
|
|
3456
|
-
try {
|
|
3457
|
-
yield onClick();
|
|
3458
|
-
} catch (error) {
|
|
3459
|
-
console.error("GradientButton onClick error:", error);
|
|
3460
|
-
} finally {
|
|
3461
|
-
if (preventDoubleClick) {
|
|
3462
|
-
setIsLoading(false);
|
|
3463
|
-
}
|
|
3464
|
-
}
|
|
3465
|
-
}
|
|
3466
|
-
});
|
|
3467
|
-
const isDisabled = disabled || isLoading;
|
|
3468
|
-
const displayTitle = isLoading ? actualLoadingText : title;
|
|
3469
|
-
const displayIcon = isLoading ? /* @__PURE__ */ jsx42(globalLucideIcons.Loader2, { className: "h-4 w-4 text-white animate-spin" }) : icon ? React36.cloneElement(icon, {
|
|
3470
|
-
className: "h-4 w-4 text-white"
|
|
3471
|
-
}) : /* @__PURE__ */ jsx42(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
|
|
3472
|
-
const buttonContent = onClick ? /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3473
|
-
/* @__PURE__ */ jsx42("span", { children: displayIcon }),
|
|
3474
|
-
/* @__PURE__ */ jsx42("span", { className: "ml-1", children: displayTitle })
|
|
3475
|
-
] }) : /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3476
|
-
/* @__PURE__ */ jsx42("span", { children: displayTitle }),
|
|
3477
|
-
/* @__PURE__ */ jsx42("span", { className: "ml-1", children: displayIcon })
|
|
3478
|
-
] });
|
|
3479
|
-
const buttonClassName = `
|
|
3480
|
-
bg-gradient-to-r
|
|
3481
|
-
from-purple-400 to-pink-500
|
|
3482
|
-
hover:from-purple-500 hover:to-pink-600
|
|
3483
|
-
dark:from-purple-500 dark:to-pink-600
|
|
3484
|
-
dark:hover:from-purple-600 dark:hover:to-pink-700
|
|
3485
|
-
text-white text-base font-bold shadow-lg hover:shadow-xl
|
|
3486
|
-
transition-all duration-300
|
|
3487
|
-
rounded-full
|
|
3488
|
-
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
3489
|
-
${className}
|
|
3490
|
-
`;
|
|
3491
|
-
return /* @__PURE__ */ jsx42("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
|
|
3492
|
-
// for click
|
|
3493
|
-
/* @__PURE__ */ jsx42(
|
|
3494
|
-
Button,
|
|
3495
|
-
{
|
|
3496
|
-
size: "lg",
|
|
3497
|
-
className: buttonClassName,
|
|
3498
|
-
onClick: handleClick,
|
|
3499
|
-
disabled: isDisabled,
|
|
3500
|
-
children: buttonContent
|
|
3501
|
-
}
|
|
3502
|
-
)
|
|
3503
|
-
) : (
|
|
3504
|
-
// for Link
|
|
3505
|
-
/* @__PURE__ */ jsx42(
|
|
3506
|
-
Button,
|
|
3507
|
-
{
|
|
3508
|
-
asChild: true,
|
|
3509
|
-
size: "lg",
|
|
3510
|
-
className: buttonClassName,
|
|
3511
|
-
disabled: isDisabled,
|
|
3512
|
-
children: /* @__PURE__ */ jsx42(
|
|
3513
|
-
Link2,
|
|
3514
|
-
__spreadProps(__spreadValues({
|
|
3515
|
-
href: href || "#",
|
|
3516
|
-
className: "no-underline hover:no-underline"
|
|
3517
|
-
}, openInNewTab ? { target: "_blank", rel: "noopener noreferrer" } : {}), {
|
|
3518
|
-
onClick: isDisabled ? (e) => e.preventDefault() : void 0,
|
|
3519
|
-
children: buttonContent
|
|
3520
|
-
})
|
|
3521
|
-
)
|
|
3522
|
-
}
|
|
3523
|
-
)
|
|
3524
|
-
) });
|
|
3525
|
-
}
|
|
3526
|
-
|
|
3527
|
-
// src/main/cta.tsx
|
|
3528
|
-
import { jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3050
|
+
import { GradientButton } from "@third-ui/fuma/mdx/gradient-button";
|
|
3051
|
+
import { richText as richText6 } from "@third-ui/main/rich-text-expert";
|
|
3052
|
+
import { jsx as jsx39, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3529
3053
|
function CTA(_0) {
|
|
3530
3054
|
return __async(this, arguments, function* ({
|
|
3531
3055
|
locale,
|
|
@@ -3535,24 +3059,24 @@ function CTA(_0) {
|
|
|
3535
3059
|
const data = {
|
|
3536
3060
|
title: t("title"),
|
|
3537
3061
|
eyesOn: t("eyesOn"),
|
|
3538
|
-
description1:
|
|
3062
|
+
description1: richText6(t, "description1"),
|
|
3539
3063
|
description2: t("description2"),
|
|
3540
3064
|
button: t("button"),
|
|
3541
3065
|
url: t("url")
|
|
3542
3066
|
};
|
|
3543
|
-
return /* @__PURE__ */
|
|
3544
|
-
/* @__PURE__ */
|
|
3067
|
+
return /* @__PURE__ */ jsx39("section", { id: "cta", className: cn("px-16 py-20 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: /* @__PURE__ */ jsxs16("div", { className: "\n bg-gradient-to-r from-[#f7f8fa] via-[#e0c3fc] to-[#b2fefa]\n dark:bg-gradient-to-r dark:from-[#2d0b4e] dark:via-[#6a3fa0] dark:to-[#3a185a]\n rounded-2xl p-12 text-center\n bg-[length:200%_auto] animate-cta-gradient-wave\n ", children: [
|
|
3068
|
+
/* @__PURE__ */ jsxs16("h2", { className: "text-3xl md:text-4xl font-bold mb-6", children: [
|
|
3545
3069
|
data.title,
|
|
3546
3070
|
" ",
|
|
3547
|
-
/* @__PURE__ */
|
|
3071
|
+
/* @__PURE__ */ jsx39("span", { className: "text-purple-400", children: data.eyesOn }),
|
|
3548
3072
|
"?"
|
|
3549
3073
|
] }),
|
|
3550
|
-
/* @__PURE__ */
|
|
3074
|
+
/* @__PURE__ */ jsxs16("p", { className: "text-2xl mx-auto mb-8", children: [
|
|
3551
3075
|
data.description1,
|
|
3552
|
-
/* @__PURE__ */
|
|
3553
|
-
/* @__PURE__ */
|
|
3076
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
3077
|
+
/* @__PURE__ */ jsx39("span", { className: "text-purple-400", children: data.description2 })
|
|
3554
3078
|
] }),
|
|
3555
|
-
/* @__PURE__ */
|
|
3079
|
+
/* @__PURE__ */ jsx39(
|
|
3556
3080
|
GradientButton,
|
|
3557
3081
|
{
|
|
3558
3082
|
title: data.button,
|
|
@@ -3566,8 +3090,8 @@ function CTA(_0) {
|
|
|
3566
3090
|
|
|
3567
3091
|
// src/main/footer.tsx
|
|
3568
3092
|
import { getTranslations as getTranslations8 } from "next-intl/server";
|
|
3569
|
-
import
|
|
3570
|
-
import { jsx as
|
|
3093
|
+
import Link2 from "next/link";
|
|
3094
|
+
import { jsx as jsx40, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3571
3095
|
function Footer(_0) {
|
|
3572
3096
|
return __async(this, arguments, function* ({ locale }) {
|
|
3573
3097
|
const tFooter = yield getTranslations8({ locale, namespace: "footer" });
|
|
@@ -3579,243 +3103,40 @@ function Footer(_0) {
|
|
|
3579
3103
|
company: tFooter("company"),
|
|
3580
3104
|
copyright: tFooter("copyright", { year: (/* @__PURE__ */ new Date()).getFullYear(), name: tFooter("company") })
|
|
3581
3105
|
};
|
|
3582
|
-
return /* @__PURE__ */
|
|
3583
|
-
/* @__PURE__ */
|
|
3584
|
-
/* @__PURE__ */
|
|
3585
|
-
/* @__PURE__ */
|
|
3586
|
-
/* @__PURE__ */
|
|
3106
|
+
return /* @__PURE__ */ jsx40("div", { className: "mb-10 w-full mx-auto border-t-purple-700/80 border-t-1", children: /* @__PURE__ */ jsx40("footer", { children: /* @__PURE__ */ jsxs17("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [
|
|
3107
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-center space-x-6 text-xs", children: [
|
|
3108
|
+
/* @__PURE__ */ jsxs17(Link2, { href: `/${locale}/legal/terms`, className: "flex items-center space-x-1 hover:underline", children: [
|
|
3109
|
+
/* @__PURE__ */ jsx40(globalLucideIcons.ReceiptText, { className: "h-3.5 w-3.5" }),
|
|
3110
|
+
/* @__PURE__ */ jsx40("span", { children: data.terms })
|
|
3587
3111
|
] }),
|
|
3588
|
-
/* @__PURE__ */
|
|
3589
|
-
/* @__PURE__ */
|
|
3590
|
-
/* @__PURE__ */
|
|
3112
|
+
/* @__PURE__ */ jsxs17(Link2, { href: `/${locale}/legal/privacy`, className: "flex items-center space-x-1 hover:underline", children: [
|
|
3113
|
+
/* @__PURE__ */ jsx40(globalLucideIcons.ShieldUser, { className: "h-3.5 w-3.5" }),
|
|
3114
|
+
/* @__PURE__ */ jsx40("span", { children: data.privacy })
|
|
3591
3115
|
] }),
|
|
3592
|
-
/* @__PURE__ */
|
|
3593
|
-
/* @__PURE__ */
|
|
3594
|
-
/* @__PURE__ */
|
|
3116
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative group", children: [
|
|
3117
|
+
/* @__PURE__ */ jsx40("div", { className: "absolute left-2/3 -translate-x-1/4 bottom-full mb-1 hidden group-hover:block bg-zinc-600 text-white text-xs rounded px-3 py-1 whitespace-nowrap z-10 shadow-lg", children: data.email }),
|
|
3118
|
+
/* @__PURE__ */ jsxs17(
|
|
3595
3119
|
"a",
|
|
3596
3120
|
{
|
|
3597
3121
|
href: `mailto:${data.email}`,
|
|
3598
3122
|
className: "flex items-center space-x-1 underline cursor-pointer px-2",
|
|
3599
3123
|
children: [
|
|
3600
|
-
/* @__PURE__ */
|
|
3601
|
-
/* @__PURE__ */
|
|
3124
|
+
/* @__PURE__ */ jsx40(globalLucideIcons.Mail, { className: "h-3.5 w-3.5" }),
|
|
3125
|
+
/* @__PURE__ */ jsx40("span", { children: data.contactUs })
|
|
3602
3126
|
]
|
|
3603
3127
|
}
|
|
3604
3128
|
)
|
|
3605
3129
|
] })
|
|
3606
3130
|
] }),
|
|
3607
|
-
/* @__PURE__ */
|
|
3131
|
+
/* @__PURE__ */ jsx40("div", { className: "text-xs text-center", children: /* @__PURE__ */ jsx40("span", { children: data.copyright }) })
|
|
3608
3132
|
] }) }) });
|
|
3609
3133
|
});
|
|
3610
3134
|
}
|
|
3611
3135
|
|
|
3612
3136
|
// src/main/price-plan.tsx
|
|
3613
3137
|
import { getTranslations as getTranslations9 } from "next-intl/server";
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
import { useState as useState4, useEffect as useEffect3 } from "react";
|
|
3617
|
-
import { useRouter } from "next/navigation";
|
|
3618
|
-
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3619
|
-
function PricePlanInteractive({ data }) {
|
|
3620
|
-
const [billingKey, setBillingKey] = useState4(data.billingSwitch.defaultKey);
|
|
3621
|
-
const [tooltip, setTooltip] = useState4({ show: false, content: "", x: 0, y: 0 });
|
|
3622
|
-
const router = useRouter();
|
|
3623
|
-
useEffect3(() => {
|
|
3624
|
-
const monthlyButton = document.querySelector('[data-billing-button="monthly"]');
|
|
3625
|
-
const yearlyButton = document.querySelector('[data-billing-button="yearly"]');
|
|
3626
|
-
const handleBillingSwitch = (newBillingKey) => {
|
|
3627
|
-
setBillingKey(newBillingKey);
|
|
3628
|
-
updatePrices(newBillingKey);
|
|
3629
|
-
updateDiscountInfo(newBillingKey);
|
|
3630
|
-
updateButtonStyles(newBillingKey);
|
|
3631
|
-
};
|
|
3632
|
-
if (monthlyButton) {
|
|
3633
|
-
monthlyButton.addEventListener("click", () => handleBillingSwitch("monthly"));
|
|
3634
|
-
}
|
|
3635
|
-
if (yearlyButton) {
|
|
3636
|
-
yearlyButton.addEventListener("click", () => handleBillingSwitch("yearly"));
|
|
3637
|
-
}
|
|
3638
|
-
data.plans.forEach((plan) => {
|
|
3639
|
-
var _a;
|
|
3640
|
-
(_a = plan.features) == null ? void 0 : _a.forEach((feature, i) => {
|
|
3641
|
-
if (feature == null ? void 0 : feature.tooltip) {
|
|
3642
|
-
const tooltipTrigger = document.querySelector(`[data-tooltip-trigger="${plan.key}-${i}"]`);
|
|
3643
|
-
if (tooltipTrigger) {
|
|
3644
|
-
const handleMouseEnter = (e) => {
|
|
3645
|
-
setTooltip({
|
|
3646
|
-
show: true,
|
|
3647
|
-
content: feature.tooltip,
|
|
3648
|
-
x: e.clientX,
|
|
3649
|
-
y: e.clientY
|
|
3650
|
-
});
|
|
3651
|
-
};
|
|
3652
|
-
const handleMouseMove = (e) => {
|
|
3653
|
-
setTooltip((prev) => __spreadProps(__spreadValues({}, prev), { x: e.clientX, y: e.clientY }));
|
|
3654
|
-
};
|
|
3655
|
-
const handleMouseLeave = () => {
|
|
3656
|
-
setTooltip((prev) => __spreadProps(__spreadValues({}, prev), { show: false }));
|
|
3657
|
-
};
|
|
3658
|
-
tooltipTrigger.addEventListener("mouseenter", handleMouseEnter);
|
|
3659
|
-
tooltipTrigger.addEventListener("mousemove", handleMouseMove);
|
|
3660
|
-
tooltipTrigger.addEventListener("mouseleave", handleMouseLeave);
|
|
3661
|
-
}
|
|
3662
|
-
}
|
|
3663
|
-
});
|
|
3664
|
-
});
|
|
3665
|
-
data.plans.forEach((plan) => {
|
|
3666
|
-
var _a;
|
|
3667
|
-
const planButton = document.querySelector(`[data-plan-button="${plan.key}"]`);
|
|
3668
|
-
if (planButton && !((_a = plan.button) == null ? void 0 : _a.disabled)) {
|
|
3669
|
-
planButton.addEventListener("click", () => {
|
|
3670
|
-
router.push("/");
|
|
3671
|
-
});
|
|
3672
|
-
}
|
|
3673
|
-
});
|
|
3674
|
-
return () => {
|
|
3675
|
-
var _a, _b;
|
|
3676
|
-
if (monthlyButton) {
|
|
3677
|
-
const newButton = monthlyButton.cloneNode(true);
|
|
3678
|
-
(_a = monthlyButton.parentNode) == null ? void 0 : _a.replaceChild(newButton, monthlyButton);
|
|
3679
|
-
}
|
|
3680
|
-
if (yearlyButton) {
|
|
3681
|
-
const newButton = yearlyButton.cloneNode(true);
|
|
3682
|
-
(_b = yearlyButton.parentNode) == null ? void 0 : _b.replaceChild(newButton, yearlyButton);
|
|
3683
|
-
}
|
|
3684
|
-
data.plans.forEach((plan) => {
|
|
3685
|
-
var _a2;
|
|
3686
|
-
(_a2 = plan.features) == null ? void 0 : _a2.forEach((_feature, i) => {
|
|
3687
|
-
var _a3;
|
|
3688
|
-
const tooltipTrigger = document.querySelector(`[data-tooltip-trigger="${plan.key}-${i}"]`);
|
|
3689
|
-
if (tooltipTrigger) {
|
|
3690
|
-
const newTrigger = tooltipTrigger.cloneNode(true);
|
|
3691
|
-
(_a3 = tooltipTrigger.parentNode) == null ? void 0 : _a3.replaceChild(newTrigger, tooltipTrigger);
|
|
3692
|
-
}
|
|
3693
|
-
});
|
|
3694
|
-
});
|
|
3695
|
-
};
|
|
3696
|
-
}, [data, router]);
|
|
3697
|
-
const updatePrices = (newBillingKey) => {
|
|
3698
|
-
const currentBilling = data.pricePlanConfig.billingOptions.find((opt) => opt.key === newBillingKey) || data.pricePlanConfig.billingOptions[0];
|
|
3699
|
-
const currentBillingDisplay = data.billingSwitch.options.find((opt) => opt.key === newBillingKey) || data.billingSwitch.options[0];
|
|
3700
|
-
data.plans.forEach((plan) => {
|
|
3701
|
-
const priceContainer = document.querySelector(`[data-price-container="${plan.key}"]`);
|
|
3702
|
-
const priceValue = data.pricePlanConfig.prices[plan.key];
|
|
3703
|
-
if (priceContainer) {
|
|
3704
|
-
const priceValueElement = document.querySelector(`[data-price-value="${plan.key}"]`);
|
|
3705
|
-
const priceUnitElement = document.querySelector(`[data-price-unit="${plan.key}"]`);
|
|
3706
|
-
const priceOriginalElement = document.querySelector(`[data-price-original="${plan.key}"]`);
|
|
3707
|
-
const priceDiscountElement = document.querySelector(`[data-price-discount="${plan.key}"]`);
|
|
3708
|
-
const priceSubtitleElement = document.querySelector(`[data-price-subtitle="${plan.key}"]`);
|
|
3709
|
-
if (typeof priceValue !== "number" || isNaN(priceValue)) {
|
|
3710
|
-
if (priceValueElement) priceValueElement.textContent = String(priceValue);
|
|
3711
|
-
if (priceSubtitleElement) priceSubtitleElement.textContent = plan.showBillingSubTitle === false ? "" : (currentBillingDisplay == null ? void 0 : currentBillingDisplay.subTitle) || "";
|
|
3712
|
-
} else {
|
|
3713
|
-
const originValue = Number(priceValue);
|
|
3714
|
-
const discount = currentBilling.discount;
|
|
3715
|
-
const hasDiscount = discount !== 0;
|
|
3716
|
-
const saleValue = originValue * (1 - discount);
|
|
3717
|
-
const formatPrice = (v) => Number(v.toFixed(2)).toString();
|
|
3718
|
-
const showNaN = saleValue < 0;
|
|
3719
|
-
if (priceValueElement) {
|
|
3720
|
-
priceValueElement.textContent = `${data.currency}${showNaN ? "NaN" : hasDiscount ? formatPrice(saleValue) : formatPrice(originValue)}`;
|
|
3721
|
-
}
|
|
3722
|
-
if (priceUnitElement) {
|
|
3723
|
-
priceUnitElement.textContent = currentBillingDisplay.unit || "";
|
|
3724
|
-
}
|
|
3725
|
-
if (hasDiscount) {
|
|
3726
|
-
if (priceOriginalElement) {
|
|
3727
|
-
priceOriginalElement.textContent = `${data.currency}${showNaN ? "NaN" : formatPrice(originValue)}`;
|
|
3728
|
-
priceOriginalElement.style.display = "inline";
|
|
3729
|
-
}
|
|
3730
|
-
if (priceDiscountElement && currentBillingDisplay.discountText) {
|
|
3731
|
-
const discountText = currentBillingDisplay.discountText.replace("{percent}", String(Math.round(Math.abs(discount) * 100)));
|
|
3732
|
-
priceDiscountElement.textContent = discountText;
|
|
3733
|
-
priceDiscountElement.style.display = "inline";
|
|
3734
|
-
}
|
|
3735
|
-
} else {
|
|
3736
|
-
if (priceOriginalElement) priceOriginalElement.style.display = "none";
|
|
3737
|
-
if (priceDiscountElement) priceDiscountElement.style.display = "none";
|
|
3738
|
-
}
|
|
3739
|
-
if (priceSubtitleElement) {
|
|
3740
|
-
priceSubtitleElement.textContent = plan.showBillingSubTitle === false ? "" : (currentBillingDisplay == null ? void 0 : currentBillingDisplay.subTitle) || "";
|
|
3741
|
-
}
|
|
3742
|
-
}
|
|
3743
|
-
}
|
|
3744
|
-
});
|
|
3745
|
-
};
|
|
3746
|
-
const updateDiscountInfo = (newBillingKey) => {
|
|
3747
|
-
const discountInfoElement = document.querySelector("[data-discount-info]");
|
|
3748
|
-
if (discountInfoElement) {
|
|
3749
|
-
const opt = data.billingSwitch.options.find((opt2) => opt2.key === newBillingKey);
|
|
3750
|
-
const bOpt = data.pricePlanConfig.billingOptions.find((opt2) => opt2.key === newBillingKey);
|
|
3751
|
-
if (opt && bOpt && opt.discountText && bOpt.discount !== 0) {
|
|
3752
|
-
const discountText = opt.discountText.replace("{percent}", String(Math.round(Math.abs(bOpt.discount) * 100)));
|
|
3753
|
-
discountInfoElement.innerHTML = `
|
|
3754
|
-
<span class="px-2 py-1 text-xs rounded bg-yellow-100 text-yellow-800 font-semibold align-middle text-center inline-flex items-center justify-center whitespace-nowrap">
|
|
3755
|
-
${discountText}
|
|
3756
|
-
</span>
|
|
3757
|
-
`;
|
|
3758
|
-
} else {
|
|
3759
|
-
discountInfoElement.innerHTML = "";
|
|
3760
|
-
}
|
|
3761
|
-
}
|
|
3762
|
-
};
|
|
3763
|
-
const updateButtonStyles = (newBillingKey) => {
|
|
3764
|
-
const monthlyButton = document.querySelector('[data-billing-button="monthly"]');
|
|
3765
|
-
const yearlyButton = document.querySelector('[data-billing-button="yearly"]');
|
|
3766
|
-
if (monthlyButton) {
|
|
3767
|
-
if (newBillingKey === "monthly") {
|
|
3768
|
-
monthlyButton.className = cn(
|
|
3769
|
-
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3770
|
-
"text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm"
|
|
3771
|
-
);
|
|
3772
|
-
} else {
|
|
3773
|
-
monthlyButton.className = cn(
|
|
3774
|
-
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3775
|
-
"text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
|
|
3776
|
-
);
|
|
3777
|
-
}
|
|
3778
|
-
}
|
|
3779
|
-
if (yearlyButton) {
|
|
3780
|
-
if (newBillingKey === "yearly") {
|
|
3781
|
-
yearlyButton.className = cn(
|
|
3782
|
-
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3783
|
-
"text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm"
|
|
3784
|
-
);
|
|
3785
|
-
} else {
|
|
3786
|
-
yearlyButton.className = cn(
|
|
3787
|
-
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3788
|
-
"text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
|
|
3789
|
-
);
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
};
|
|
3793
|
-
const Tooltip = ({ show, content, x, y }) => {
|
|
3794
|
-
if (!show) return null;
|
|
3795
|
-
const style = {
|
|
3796
|
-
position: "fixed",
|
|
3797
|
-
left: Math.max(8, x),
|
|
3798
|
-
top: Math.max(8, y),
|
|
3799
|
-
zIndex: 9999,
|
|
3800
|
-
maxWidth: 200,
|
|
3801
|
-
transform: "translateY(-50%)",
|
|
3802
|
-
pointerEvents: "none",
|
|
3803
|
-
whiteSpace: "pre-line"
|
|
3804
|
-
};
|
|
3805
|
-
return /* @__PURE__ */ jsx45(
|
|
3806
|
-
"div",
|
|
3807
|
-
{
|
|
3808
|
-
style,
|
|
3809
|
-
className: "bg-gray-700 dark:bg-gray-200 text-gray-100 dark:text-gray-800 text-xs leading-relaxed px-3 py-2 rounded-lg shadow-lg border border-gray-300 dark:border-gray-600 backdrop-blur-sm",
|
|
3810
|
-
children: content
|
|
3811
|
-
}
|
|
3812
|
-
);
|
|
3813
|
-
};
|
|
3814
|
-
return /* @__PURE__ */ jsx45(Tooltip, __spreadValues({}, tooltip));
|
|
3815
|
-
}
|
|
3816
|
-
|
|
3817
|
-
// src/main/price-plan.tsx
|
|
3818
|
-
import { Fragment as Fragment4, jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3138
|
+
import { PricePlanInteractive } from "@third-ui/main";
|
|
3139
|
+
import { Fragment, jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3819
3140
|
function PricePlan(_0) {
|
|
3820
3141
|
return __async(this, arguments, function* ({
|
|
3821
3142
|
locale,
|
|
@@ -3857,9 +3178,9 @@ function PricePlan(_0) {
|
|
|
3857
3178
|
const currentBillingDisplay = data.billingSwitch.options.find((opt) => opt.key === billingKey) || defaultBillingDisplay;
|
|
3858
3179
|
const billingSubTitle = (currentBillingDisplay == null ? void 0 : currentBillingDisplay.subTitle) || "";
|
|
3859
3180
|
if (typeof priceValue !== "number" || isNaN(priceValue)) {
|
|
3860
|
-
return /* @__PURE__ */
|
|
3861
|
-
/* @__PURE__ */
|
|
3862
|
-
/* @__PURE__ */
|
|
3181
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-start w-full", "data-price-container": plan.key, children: [
|
|
3182
|
+
/* @__PURE__ */ jsx41("div", { className: "flex items-end gap-2", children: /* @__PURE__ */ jsx41("span", { className: "text-4xl font-extrabold text-gray-900 dark:text-gray-100", "data-price-value": plan.key, children: priceValue }) }),
|
|
3183
|
+
/* @__PURE__ */ jsx41("div", { className: "flex items-center gap-2 min-h-[24px] mt-1", children: /* @__PURE__ */ jsx41("span", { className: cn("text-xs text-gray-700 dark:text-gray-300 font-medium", plan.showBillingSubTitle === false && "opacity-0 select-none"), "data-price-subtitle": plan.key, children: plan.showBillingSubTitle === false ? "" : billingSubTitle }) })
|
|
3863
3184
|
] });
|
|
3864
3185
|
}
|
|
3865
3186
|
const originValue = Number(priceValue);
|
|
@@ -3873,32 +3194,32 @@ function PricePlan(_0) {
|
|
|
3873
3194
|
discountText = currentBillingDisplay.discountText.replace("{percent}", String(Math.round(Math.abs(discount) * 100)));
|
|
3874
3195
|
}
|
|
3875
3196
|
const showNaN = saleValue < 0;
|
|
3876
|
-
return /* @__PURE__ */
|
|
3877
|
-
/* @__PURE__ */
|
|
3878
|
-
/* @__PURE__ */
|
|
3197
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-start w-full", "data-price-container": plan.key, children: [
|
|
3198
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-end gap-2", children: [
|
|
3199
|
+
/* @__PURE__ */ jsxs18("span", { className: "text-4xl font-extrabold text-gray-900 dark:text-gray-100", "data-price-value": plan.key, children: [
|
|
3879
3200
|
data.currency,
|
|
3880
3201
|
showNaN ? "NaN" : hasDiscount ? formatPrice(saleValue) : formatPrice(originValue)
|
|
3881
3202
|
] }),
|
|
3882
|
-
/* @__PURE__ */
|
|
3203
|
+
/* @__PURE__ */ jsx41("span", { className: "text-lg text-gray-700 dark:text-gray-300 font-medium mb-1", "data-price-unit": plan.key, children: unit })
|
|
3883
3204
|
] }),
|
|
3884
|
-
/* @__PURE__ */
|
|
3885
|
-
hasDiscount && /* @__PURE__ */
|
|
3886
|
-
/* @__PURE__ */
|
|
3205
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 min-h-[24px] mt-1", children: [
|
|
3206
|
+
hasDiscount && /* @__PURE__ */ jsxs18(Fragment, { children: [
|
|
3207
|
+
/* @__PURE__ */ jsxs18("span", { className: "text-base text-gray-400 line-through", "data-price-original": plan.key, children: [
|
|
3887
3208
|
data.currency,
|
|
3888
3209
|
showNaN ? "NaN" : formatPrice(originValue)
|
|
3889
3210
|
] }),
|
|
3890
|
-
discountText && /* @__PURE__ */
|
|
3211
|
+
discountText && /* @__PURE__ */ jsx41("span", { className: "px-2 py-0.5 text-xs rounded bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200 font-semibold align-middle", "data-price-discount": plan.key, children: discountText })
|
|
3891
3212
|
] }),
|
|
3892
|
-
/* @__PURE__ */
|
|
3213
|
+
/* @__PURE__ */ jsx41("span", { className: cn("text-xs text-gray-700 dark:text-gray-300 font-medium", plan.showBillingSubTitle === false && "opacity-0 select-none"), "data-price-subtitle": plan.key, children: plan.showBillingSubTitle === false ? "" : billingSubTitle })
|
|
3893
3214
|
] })
|
|
3894
3215
|
] });
|
|
3895
3216
|
}
|
|
3896
|
-
return /* @__PURE__ */
|
|
3897
|
-
/* @__PURE__ */
|
|
3898
|
-
/* @__PURE__ */
|
|
3899
|
-
/* @__PURE__ */
|
|
3900
|
-
/* @__PURE__ */
|
|
3901
|
-
/* @__PURE__ */
|
|
3217
|
+
return /* @__PURE__ */ jsxs18("section", { id: "pricing", className: cn("px-4 py-10 md:px-16 md:py-16 mx-auto max-w-7xl scroll-mt-10", sectionClassName), children: [
|
|
3218
|
+
/* @__PURE__ */ jsx41("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-3", children: data.title }),
|
|
3219
|
+
/* @__PURE__ */ jsx41("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-8 text-base md:text-lg mx-auto", children: data.subtitle }),
|
|
3220
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-center", children: [
|
|
3221
|
+
/* @__PURE__ */ jsx41("div", { className: "flex items-center relative mb-3", children: /* @__PURE__ */ jsxs18("div", { className: "flex bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-full p-1", "data-billing-switch": true, children: [
|
|
3222
|
+
/* @__PURE__ */ jsx41(
|
|
3902
3223
|
"button",
|
|
3903
3224
|
{
|
|
3904
3225
|
className: cn(
|
|
@@ -3910,7 +3231,7 @@ function PricePlan(_0) {
|
|
|
3910
3231
|
children: ((_a = data.billingSwitch.options.find((opt) => opt.key === "monthly")) == null ? void 0 : _a.name) || "Monthly"
|
|
3911
3232
|
}
|
|
3912
3233
|
),
|
|
3913
|
-
/* @__PURE__ */
|
|
3234
|
+
/* @__PURE__ */ jsx41(
|
|
3914
3235
|
"button",
|
|
3915
3236
|
{
|
|
3916
3237
|
className: cn(
|
|
@@ -3923,19 +3244,19 @@ function PricePlan(_0) {
|
|
|
3923
3244
|
}
|
|
3924
3245
|
)
|
|
3925
3246
|
] }) }),
|
|
3926
|
-
/* @__PURE__ */
|
|
3247
|
+
/* @__PURE__ */ jsx41("div", { className: "h-8 flex items-center justify-center mb-3", "data-discount-info": true, children: (() => {
|
|
3927
3248
|
const opt = data.billingSwitch.options.find((opt2) => opt2.key === data.billingSwitch.defaultKey);
|
|
3928
3249
|
const bOpt = billingOptions.find((opt2) => opt2.key === data.billingSwitch.defaultKey);
|
|
3929
3250
|
if (!(opt && bOpt && opt.discountText && bOpt.discount !== 0)) return null;
|
|
3930
|
-
return /* @__PURE__ */
|
|
3251
|
+
return /* @__PURE__ */ jsx41("span", { className: "px-2 py-1 text-xs rounded bg-yellow-100 text-yellow-800 font-semibold align-middle text-center inline-flex items-center justify-center whitespace-nowrap", children: opt.discountText.replace(
|
|
3931
3252
|
"{percent}",
|
|
3932
3253
|
String(Math.round(Math.abs(bOpt.discount) * 100))
|
|
3933
3254
|
) });
|
|
3934
3255
|
})() })
|
|
3935
3256
|
] }),
|
|
3936
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ jsx41("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: data.plans.map((plan, _idx) => {
|
|
3937
3258
|
var _a2, _b2, _c;
|
|
3938
|
-
return /* @__PURE__ */
|
|
3259
|
+
return /* @__PURE__ */ jsxs18(
|
|
3939
3260
|
"div",
|
|
3940
3261
|
{
|
|
3941
3262
|
"data-price-plan": plan.key,
|
|
@@ -3946,29 +3267,29 @@ function PricePlan(_0) {
|
|
|
3946
3267
|
),
|
|
3947
3268
|
style: { minHeight: maxFeaturesCount * 100 },
|
|
3948
3269
|
children: [
|
|
3949
|
-
/* @__PURE__ */
|
|
3950
|
-
/* @__PURE__ */
|
|
3951
|
-
plan.titleTags && plan.titleTags.map((tag, i) => /* @__PURE__ */
|
|
3270
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
3271
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xl font-bold text-gray-900 dark:text-gray-100", children: plan.title }),
|
|
3272
|
+
plan.titleTags && plan.titleTags.map((tag, i) => /* @__PURE__ */ jsx41("span", { className: "px-2 py-0.5 text-xs rounded bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200 font-semibold align-middle", children: tag }, i))
|
|
3952
3273
|
] }),
|
|
3953
3274
|
renderPrice(plan),
|
|
3954
|
-
/* @__PURE__ */
|
|
3955
|
-
feature ? /* @__PURE__ */
|
|
3956
|
-
feature && feature.tag && /* @__PURE__ */
|
|
3957
|
-
feature ? /* @__PURE__ */
|
|
3275
|
+
/* @__PURE__ */ jsx41("ul", { className: "flex-1 mb-6 mt-4", children: getFeatureRows(plan).map((feature, i) => /* @__PURE__ */ jsxs18("li", { className: "flex items-center gap-2 mb-2 min-h-[28px]", "data-feature-item": `${plan.key}-${i}`, children: [
|
|
3276
|
+
feature ? /* @__PURE__ */ jsx41("span", { className: "inline-flex items-center justify-center w-5 h-5 rounded-full bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-200 mr-1", children: feature.icon ? /* @__PURE__ */ jsx41("span", { children: feature.icon }) : /* @__PURE__ */ jsx41("span", { className: "font-bold", children: "\u2713" }) }) : /* @__PURE__ */ jsx41("span", { className: "inline-flex items-center justify-center w-5 h-5 rounded-full mr-1", children: "\xA0" }),
|
|
3277
|
+
feature && feature.tag && /* @__PURE__ */ jsx41("span", { className: "px-1 py-0.5 text-[6px] rounded bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 font-semibold align-middle", children: feature.tag }),
|
|
3278
|
+
feature ? /* @__PURE__ */ jsxs18("span", { className: "relative group cursor-pointer text-sm text-gray-800 dark:text-gray-200", children: [
|
|
3958
3279
|
feature.description,
|
|
3959
|
-
feature.tooltip && /* @__PURE__ */
|
|
3280
|
+
feature.tooltip && /* @__PURE__ */ jsx41(
|
|
3960
3281
|
"span",
|
|
3961
3282
|
{
|
|
3962
3283
|
className: "ml-1 align-middle inline-flex",
|
|
3963
3284
|
"data-tooltip-trigger": `${plan.key}-${i}`,
|
|
3964
3285
|
"data-tooltip-content": feature.tooltip,
|
|
3965
|
-
children: /* @__PURE__ */
|
|
3286
|
+
children: /* @__PURE__ */ jsx41("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx41("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) })
|
|
3966
3287
|
}
|
|
3967
3288
|
)
|
|
3968
|
-
] }) : /* @__PURE__ */
|
|
3289
|
+
] }) : /* @__PURE__ */ jsx41("span", { children: "\xA0" })
|
|
3969
3290
|
] }, i)) }),
|
|
3970
|
-
/* @__PURE__ */
|
|
3971
|
-
/* @__PURE__ */
|
|
3291
|
+
/* @__PURE__ */ jsx41("div", { className: "flex-1" }),
|
|
3292
|
+
/* @__PURE__ */ jsx41(
|
|
3972
3293
|
"button",
|
|
3973
3294
|
{
|
|
3974
3295
|
className: cn(
|
|
@@ -3986,7 +3307,7 @@ function PricePlan(_0) {
|
|
|
3986
3307
|
plan.key
|
|
3987
3308
|
);
|
|
3988
3309
|
}) }),
|
|
3989
|
-
/* @__PURE__ */
|
|
3310
|
+
/* @__PURE__ */ jsx41(PricePlanInteractive, { data })
|
|
3990
3311
|
] });
|
|
3991
3312
|
});
|
|
3992
3313
|
}
|