@burdenoff/microfe-store 2026.525.3 → 2026.527.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/StoreAdminRoutes.js +10 -9
- package/dist/StoreAdminRoutes.js.map +1 -1
- package/dist/StoreRoutes.js +2 -1
- package/dist/StoreRoutes.js.map +1 -1
- package/dist/components/AccessDenied.js +23 -0
- package/dist/components/AccessDenied.js.map +1 -0
- package/dist/components/InstallAppModal.js +183 -129
- package/dist/components/InstallAppModal.js.map +1 -1
- package/dist/components/PermissionGuard.js +8 -0
- package/dist/components/PermissionGuard.js.map +1 -0
- package/dist/components/RouteGuards.js +7 -21
- package/dist/components/RouteGuards.js.map +1 -1
- package/dist/components/cart/CartDrawer.js +20 -14
- package/dist/components/cart/CartDrawer.js.map +1 -1
- package/dist/hooks/useStoreGraphQL.js +22 -20
- package/dist/hooks/useStoreGraphQL.js.map +1 -1
- package/dist/hooks/useStoreGraphQLWithContext.js.map +1 -1
- package/dist/hooks/useStorePermissions.js +4 -1
- package/dist/hooks/useStorePermissions.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/pages/AdminDashboardPage.js +182 -183
- package/dist/pages/AdminDashboardPage.js.map +1 -1
- package/dist/pages/AdminReviewModerationPage.js +7 -6
- package/dist/pages/AdminReviewModerationPage.js.map +1 -1
- package/dist/pages/AdminStoresPage.js +193 -185
- package/dist/pages/AdminStoresPage.js.map +1 -1
- package/dist/pages/AdminSubmissionsQueuePage.js +140 -142
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/AppDetailPage.js +6 -3
- package/dist/pages/AppDetailPage.js.map +1 -1
- package/dist/pages/AppSettingsPage.js +6 -3
- package/dist/pages/AppSettingsPage.js.map +1 -1
- package/dist/pages/CartPage.js +23 -15
- package/dist/pages/CartPage.js.map +1 -1
- package/dist/pages/InstalledAppsPage.js +26 -15
- package/dist/pages/InstalledAppsPage.js.map +1 -1
- package/dist/pages/MarketplaceHomePage.js +275 -247
- package/dist/pages/MarketplaceHomePage.js.map +1 -1
- package/dist/pages/MyLicensesPage.js +10 -8
- package/dist/pages/MyLicensesPage.js.map +1 -1
- package/dist/pages/OrderConfirmationPage.js +72 -75
- package/dist/pages/OrderConfirmationPage.js.map +1 -1
- package/dist/pages/OrdersPage.js +22 -20
- package/dist/pages/OrdersPage.js.map +1 -1
- package/dist/pages/ProductCategoryPage.js +3 -1
- package/dist/pages/ProductCategoryPage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +458 -443
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/dist/pages/ProductReviewsPage.js +4 -3
- package/dist/pages/ProductReviewsPage.js.map +1 -1
- package/dist/pages/PublisherDashboardPage.js +13 -7
- package/dist/pages/PublisherDashboardPage.js.map +1 -1
- package/dist/pages/PublisherRevenuePage.js +7 -5
- package/dist/pages/PublisherRevenuePage.js.map +1 -1
- package/dist/pages/PublisherSubmissionsPage.js +12 -7
- package/dist/pages/PublisherSubmissionsPage.js.map +1 -1
- package/dist/pages/PublisherSubmitPage.js +6 -0
- package/dist/pages/PublisherSubmitPage.js.map +1 -1
- package/dist/pages/SearchResultsPage.js +6 -3
- package/dist/pages/SearchResultsPage.js.map +1 -1
- package/dist/pages/StoresPage.js +73 -74
- package/dist/pages/StoresPage.js.map +1 -1
- package/dist/providers/StoreProvider.js +25 -25
- package/dist/providers/StoreProvider.js.map +1 -1
- package/dist/utils/index.js +29 -19
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/index.js +0 -3
- package/dist/components/marketplace/ProductCard.js +0 -2
|
@@ -2,16 +2,15 @@ import { useStore as e } from "../providers/StoreProvider.js";
|
|
|
2
2
|
import { useCart as t } from "../hooks/useCart.js";
|
|
3
3
|
import { formatNumber as n, formatPrice as r } from "../utils/index.js";
|
|
4
4
|
import { useCreateReview as ee, useDeleteReview as te, useMarkReviewHelpful as ne, useStoreProductDetails as re, useUpdateReview as ie } from "../hooks/useStoreGraphQL.js";
|
|
5
|
-
import { nativeConfirm as ae, nativeImpact as oe, nativeNotify as
|
|
6
|
-
import { InstallAppModal as
|
|
7
|
-
import "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { useEventBus as ge } from "@burdenoff/fe-libs/shared/events";
|
|
5
|
+
import { nativeConfirm as ae, nativeImpact as oe, nativeNotify as se } from "../utils/nativeBridge.js";
|
|
6
|
+
import { InstallAppModal as ce } from "../components/InstallAppModal.js";
|
|
7
|
+
import { useCallback as i, useEffect as le, useRef as a, useState as o } from "react";
|
|
8
|
+
import { AlertCircle as s, ArrowLeft as ue, Check as de, Loader2 as fe, Package as pe, ShieldCheck as c, ShoppingCart as me, Star as l, ThumbsUp as u } from "lucide-react";
|
|
9
|
+
import { Fragment as he, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
import { useNavigate as ge, useParams as _e } from "react-router-dom";
|
|
11
|
+
import { useEventBus as ve } from "@burdenoff/fe-libs/shared/events";
|
|
13
12
|
//#region src/pages/ProductDetailPage.tsx
|
|
14
|
-
var
|
|
13
|
+
var ye = (e, t) => ({
|
|
15
14
|
id: e.id,
|
|
16
15
|
publisherId: t?.id || "",
|
|
17
16
|
publisher: {
|
|
@@ -83,41 +82,41 @@ var _e = (e, t) => ({
|
|
|
83
82
|
createdAt: e.createdAt,
|
|
84
83
|
updatedAt: e.updatedAt,
|
|
85
84
|
publishedAt: e.publishedAt
|
|
86
|
-
}),
|
|
85
|
+
}), be = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ f("div", {
|
|
87
86
|
className: "flex items-center gap-2",
|
|
88
87
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ d("span", {
|
|
90
89
|
className: "w-3 text-xs text-text-muted",
|
|
91
90
|
children: e
|
|
92
91
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ d("div", {
|
|
94
93
|
className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
|
|
95
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ d("div", {
|
|
96
95
|
className: "h-full rounded-full bg-status-warning-bg-subtle",
|
|
97
96
|
style: { width: `${t}%` }
|
|
98
97
|
})
|
|
99
98
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ d("span", {
|
|
101
100
|
className: "w-12 text-right text-xs text-text-muted",
|
|
102
101
|
children: n(r)
|
|
103
102
|
})
|
|
104
103
|
]
|
|
105
|
-
}),
|
|
104
|
+
}), xe = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => /* @__PURE__ */ f("div", {
|
|
106
105
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
107
106
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ d("div", {
|
|
109
108
|
className: "mb-3 flex items-start justify-between",
|
|
110
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ f("div", {
|
|
111
110
|
className: "flex items-center gap-3",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
113
|
-
className: "flex
|
|
111
|
+
children: [/* @__PURE__ */ d("div", {
|
|
112
|
+
className: "flex size-10 items-center justify-center rounded-full bg-bg-sunken text-text-muted",
|
|
114
113
|
children: e.userId.charAt(0).toUpperCase()
|
|
115
|
-
}), /* @__PURE__ */
|
|
114
|
+
}), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
|
|
116
115
|
className: "font-medium text-text-primary",
|
|
117
116
|
children: ["User ", e.userId.slice(0, 8)]
|
|
118
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ f("div", {
|
|
119
118
|
className: "flex items-center gap-2",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ d("div", {
|
|
121
120
|
className: "flex gap-0.5",
|
|
122
121
|
children: [
|
|
123
122
|
1,
|
|
@@ -125,8 +124,8 @@ var _e = (e, t) => ({
|
|
|
125
124
|
3,
|
|
126
125
|
4,
|
|
127
126
|
5
|
|
128
|
-
].map((t) => /* @__PURE__ */
|
|
129
|
-
}), /* @__PURE__ */
|
|
127
|
+
].map((t) => /* @__PURE__ */ d(l, { className: `size-3 ${t <= e.rating ? "fill-current text-status-warning-text" : "text-text-muted"}` }, t))
|
|
128
|
+
}), /* @__PURE__ */ d("span", {
|
|
130
129
|
className: "text-xs text-text-muted",
|
|
131
130
|
children: ((e) => {
|
|
132
131
|
try {
|
|
@@ -143,147 +142,147 @@ var _e = (e, t) => ({
|
|
|
143
142
|
})] })]
|
|
144
143
|
})
|
|
145
144
|
}),
|
|
146
|
-
e.title && /* @__PURE__ */
|
|
145
|
+
e.title && /* @__PURE__ */ d("h4", {
|
|
147
146
|
className: "mb-2 font-medium text-text-primary",
|
|
148
147
|
children: e.title
|
|
149
148
|
}),
|
|
150
|
-
e.comment && /* @__PURE__ */
|
|
149
|
+
e.comment && /* @__PURE__ */ d("p", {
|
|
151
150
|
className: "mb-3 text-sm text-text-muted",
|
|
152
151
|
children: e.comment
|
|
153
152
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ d("div", {
|
|
155
154
|
className: "flex items-center justify-between",
|
|
156
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ f("button", {
|
|
157
156
|
type: "button",
|
|
158
157
|
onClick: () => t(e.id),
|
|
159
158
|
disabled: n,
|
|
160
159
|
"aria-label": `Mark review from ${e.userId} as helpful`,
|
|
161
160
|
className: "flex items-center gap-1 text-xs text-text-muted transition-colors hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-60",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ d(u, { className: "size-3.5" }), /* @__PURE__ */ d("span", { children: n ? "Updating…" : `Helpful (${e.helpful})` })]
|
|
163
162
|
})
|
|
164
163
|
})
|
|
165
164
|
]
|
|
166
|
-
}),
|
|
165
|
+
}), Se = () => /* @__PURE__ */ f("div", {
|
|
167
166
|
className: "h-full overflow-y-auto",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ d("div", {
|
|
169
168
|
className: "sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4",
|
|
170
|
-
children: /* @__PURE__ */
|
|
169
|
+
children: /* @__PURE__ */ f("div", {
|
|
171
170
|
className: "flex items-center gap-4",
|
|
172
171
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ d("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }),
|
|
173
|
+
/* @__PURE__ */ d("div", { className: "h-6 w-48 flex-1 animate-pulse rounded bg-bg-sunken" }),
|
|
174
|
+
/* @__PURE__ */ f("div", {
|
|
176
175
|
className: "flex gap-2",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ d("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" })]
|
|
178
177
|
})
|
|
179
178
|
]
|
|
180
179
|
})
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
-
className: "mx-auto max-w-6xl
|
|
180
|
+
}), /* @__PURE__ */ f("div", {
|
|
181
|
+
className: "mx-auto max-w-6xl p-6",
|
|
183
182
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ f("div", {
|
|
185
184
|
className: "mb-8 flex flex-col gap-6 md:flex-row",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ f("div", {
|
|
187
186
|
className: "flex gap-4 md:w-1/2",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ d("div", { className: "size-28 animate-pulse rounded-2xl bg-bg-sunken" }), /* @__PURE__ */ f("div", {
|
|
189
188
|
className: "flex flex-1 flex-col justify-center gap-2",
|
|
190
189
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ d("div", { className: "h-8 w-3/4 animate-pulse rounded bg-bg-sunken" }),
|
|
191
|
+
/* @__PURE__ */ f("div", {
|
|
193
192
|
className: "flex items-center gap-2",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ d("div", { className: "h-4 w-32 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "size-4 animate-pulse rounded-full bg-bg-sunken" })]
|
|
195
194
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ f("div", {
|
|
197
196
|
className: "flex gap-3",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ d("div", { className: "h-5 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "h-5 w-24 animate-pulse rounded bg-bg-sunken" })]
|
|
199
198
|
})
|
|
200
199
|
]
|
|
201
200
|
})]
|
|
202
|
-
}), /* @__PURE__ */
|
|
201
|
+
}), /* @__PURE__ */ f("div", {
|
|
203
202
|
className: "flex flex-col gap-4 md:w-1/2 md:items-end",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ f("div", {
|
|
205
204
|
className: "flex items-center gap-4",
|
|
206
205
|
children: [
|
|
207
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ f("div", {
|
|
208
207
|
className: "text-center",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ d("div", { className: "h-10 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "mt-1 h-3 w-20 animate-pulse rounded bg-bg-sunken" })]
|
|
210
209
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ d("div", { className: "h-12 w-px bg-border-default" }),
|
|
211
|
+
/* @__PURE__ */ f("div", {
|
|
213
212
|
className: "text-center",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ d("div", { className: "h-8 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "mt-1 h-3 w-16 animate-pulse rounded bg-bg-sunken" })]
|
|
215
214
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ d("div", { className: "h-12 w-px bg-border-default" }),
|
|
216
|
+
/* @__PURE__ */ f("div", {
|
|
218
217
|
className: "text-center",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ d("div", { className: "h-8 w-20 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "mt-1 h-3 w-12 animate-pulse rounded bg-bg-sunken" })]
|
|
220
219
|
})
|
|
221
220
|
]
|
|
222
|
-
}), /* @__PURE__ */
|
|
221
|
+
}), /* @__PURE__ */ f("div", {
|
|
223
222
|
className: "flex gap-3",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ d("div", { className: "h-12 w-40 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "size-12 animate-pulse rounded-lg bg-bg-sunken" })]
|
|
225
224
|
})]
|
|
226
225
|
})]
|
|
227
226
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ f("section", {
|
|
229
228
|
className: "mb-8",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ d("div", { className: "aspect-video animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ d("div", {
|
|
231
230
|
className: "mt-4 flex gap-4",
|
|
232
231
|
children: [...[
|
|
233
232
|
,
|
|
234
233
|
,
|
|
235
234
|
,
|
|
236
235
|
,
|
|
237
|
-
]].map((e, t) => /* @__PURE__ */
|
|
236
|
+
]].map((e, t) => /* @__PURE__ */ d("div", { className: "h-20 w-36 animate-pulse rounded-lg bg-bg-sunken" }, t))
|
|
238
237
|
})]
|
|
239
238
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ f("section", {
|
|
241
240
|
className: "mb-8",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ f("div", {
|
|
243
242
|
className: "mb-4 flex items-center gap-2",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
245
|
-
}), /* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ d("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "h-6 w-32 animate-pulse rounded bg-bg-sunken" })]
|
|
244
|
+
}), /* @__PURE__ */ f("div", {
|
|
246
245
|
className: "animate-pulse rounded-lg border border-border-default bg-bg-surface p-4",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ f("div", {
|
|
248
247
|
className: "space-y-2",
|
|
249
248
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ d("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
|
|
250
|
+
/* @__PURE__ */ d("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
|
|
251
|
+
/* @__PURE__ */ d("div", { className: "h-4 w-3/4 rounded bg-bg-sunken" }),
|
|
252
|
+
/* @__PURE__ */ d("div", { className: "h-4 w-5/6 rounded bg-bg-sunken" })
|
|
254
253
|
]
|
|
255
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ d("div", {
|
|
256
255
|
className: "mt-4 flex gap-2",
|
|
257
256
|
children: [...[
|
|
258
257
|
,
|
|
259
258
|
,
|
|
260
259
|
,
|
|
261
260
|
,
|
|
262
|
-
]].map((e, t) => /* @__PURE__ */
|
|
261
|
+
]].map((e, t) => /* @__PURE__ */ d("div", { className: "h-6 w-16 rounded-full bg-bg-sunken" }, t))
|
|
263
262
|
})]
|
|
264
263
|
})]
|
|
265
264
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ f("section", {
|
|
267
266
|
className: "mb-8",
|
|
268
267
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ f("div", {
|
|
270
269
|
className: "mb-4 flex items-center justify-between",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ f("div", {
|
|
272
271
|
className: "flex items-center gap-2",
|
|
273
|
-
children: [/* @__PURE__ */
|
|
274
|
-
}), /* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ d("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
|
|
273
|
+
}), /* @__PURE__ */ d("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
|
|
275
274
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ f("div", {
|
|
277
276
|
className: "mb-6 flex flex-col gap-6 md:flex-row",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ d("div", {
|
|
279
278
|
className: "animate-pulse rounded-lg border border-border-default bg-bg-surface p-4 md:w-64",
|
|
280
|
-
children: /* @__PURE__ */
|
|
279
|
+
children: /* @__PURE__ */ f("div", {
|
|
281
280
|
className: "flex items-center gap-6",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ f("div", {
|
|
283
282
|
className: "text-center",
|
|
284
283
|
children: [
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ d("div", { className: "h-12 w-16 rounded bg-bg-sunken" }),
|
|
285
|
+
/* @__PURE__ */ d("div", {
|
|
287
286
|
className: "my-1 flex justify-center gap-0.5",
|
|
288
287
|
children: [...[
|
|
289
288
|
,
|
|
@@ -291,11 +290,11 @@ var _e = (e, t) => ({
|
|
|
291
290
|
,
|
|
292
291
|
,
|
|
293
292
|
,
|
|
294
|
-
]].map((e, t) => /* @__PURE__ */
|
|
293
|
+
]].map((e, t) => /* @__PURE__ */ d("div", { className: "size-4 rounded bg-bg-sunken" }, t))
|
|
295
294
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ d("div", { className: "h-3 w-20 rounded bg-bg-sunken" })
|
|
297
296
|
]
|
|
298
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ d("div", {
|
|
299
298
|
className: "flex-1 space-y-1",
|
|
300
299
|
children: [...[
|
|
301
300
|
,
|
|
@@ -303,29 +302,29 @@ var _e = (e, t) => ({
|
|
|
303
302
|
,
|
|
304
303
|
,
|
|
305
304
|
,
|
|
306
|
-
]].map((e, t) => /* @__PURE__ */
|
|
305
|
+
]].map((e, t) => /* @__PURE__ */ f("div", {
|
|
307
306
|
className: "flex items-center gap-2",
|
|
308
307
|
children: [
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ d("div", { className: "h-2 w-3 rounded bg-bg-sunken" }),
|
|
309
|
+
/* @__PURE__ */ d("div", { className: "h-2 flex-1 rounded-full bg-bg-sunken" }),
|
|
310
|
+
/* @__PURE__ */ d("div", { className: "h-2 w-8 rounded bg-bg-sunken" })
|
|
312
311
|
]
|
|
313
312
|
}, t))
|
|
314
313
|
})]
|
|
315
314
|
})
|
|
316
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ d("div", { className: "h-12 w-32 animate-pulse rounded-lg bg-bg-sunken" })]
|
|
317
316
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ d("div", {
|
|
319
318
|
className: "space-y-4",
|
|
320
|
-
children: [...[, ,]].map((e, t) => /* @__PURE__ */
|
|
319
|
+
children: [...[, ,]].map((e, t) => /* @__PURE__ */ f("div", {
|
|
321
320
|
className: "animate-pulse rounded-lg border border-border-default bg-bg-surface p-4",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ f("div", {
|
|
323
322
|
className: "mb-3 flex items-start gap-3",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ d("div", { className: "size-10 rounded-full bg-bg-sunken" }), /* @__PURE__ */ f("div", {
|
|
325
324
|
className: "flex-1",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ d("div", { className: "h-4 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", {
|
|
327
326
|
className: "mt-1 flex items-center gap-2",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ d("div", {
|
|
329
328
|
className: "flex gap-0.5",
|
|
330
329
|
children: [...[
|
|
331
330
|
,
|
|
@@ -333,26 +332,26 @@ var _e = (e, t) => ({
|
|
|
333
332
|
,
|
|
334
333
|
,
|
|
335
334
|
,
|
|
336
|
-
]].map((e, t) => /* @__PURE__ */
|
|
337
|
-
}), /* @__PURE__ */
|
|
335
|
+
]].map((e, t) => /* @__PURE__ */ d("div", { className: "size-3 rounded bg-bg-sunken" }, t))
|
|
336
|
+
}), /* @__PURE__ */ d("div", { className: "h-3 w-20 rounded bg-bg-sunken" })]
|
|
338
337
|
})]
|
|
339
338
|
})]
|
|
340
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ f("div", {
|
|
341
340
|
className: "space-y-2",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ d("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
|
|
343
342
|
})]
|
|
344
343
|
}, t))
|
|
345
344
|
})
|
|
346
345
|
]
|
|
347
346
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ f("section", {
|
|
349
348
|
className: "mb-8",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ f("div", {
|
|
351
350
|
className: "mb-4 flex items-center gap-2",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
-
}), /* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ d("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "h-6 w-48 animate-pulse rounded bg-bg-sunken" })]
|
|
352
|
+
}), /* @__PURE__ */ d("div", {
|
|
354
353
|
className: "animate-pulse rounded-lg border border-border-default bg-bg-surface p-4",
|
|
355
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ d("div", {
|
|
356
355
|
className: "grid gap-4 md:grid-cols-2",
|
|
357
356
|
children: [...[
|
|
358
357
|
,
|
|
@@ -361,37 +360,37 @@ var _e = (e, t) => ({
|
|
|
361
360
|
,
|
|
362
361
|
,
|
|
363
362
|
,
|
|
364
|
-
]].map((e, t) => /* @__PURE__ */
|
|
363
|
+
]].map((e, t) => /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", { className: "h-3 w-16 rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "mt-1 h-5 w-24 rounded bg-bg-sunken" })] }, t))
|
|
365
364
|
})
|
|
366
365
|
})]
|
|
367
366
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ f("section", {
|
|
369
368
|
className: "mb-8",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ f("div", {
|
|
371
370
|
className: "mb-4 flex items-center justify-between",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ f("div", {
|
|
373
372
|
className: "flex items-center gap-2",
|
|
374
|
-
children: [/* @__PURE__ */
|
|
375
|
-
}), /* @__PURE__ */
|
|
376
|
-
}), /* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ d("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
|
|
374
|
+
}), /* @__PURE__ */ d("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
|
|
375
|
+
}), /* @__PURE__ */ d("div", {
|
|
377
376
|
className: "grid gap-4 md:grid-cols-4",
|
|
378
377
|
children: [...[
|
|
379
378
|
,
|
|
380
379
|
,
|
|
381
380
|
,
|
|
382
381
|
,
|
|
383
|
-
]].map((e, t) => /* @__PURE__ */
|
|
382
|
+
]].map((e, t) => /* @__PURE__ */ d("div", {
|
|
384
383
|
className: "animate-pulse rounded-lg border border-border-default bg-bg-surface p-3",
|
|
385
|
-
children: /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ f("div", {
|
|
386
385
|
className: "flex items-center gap-3",
|
|
387
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ d("div", { className: "size-14 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ f("div", {
|
|
388
387
|
className: "flex-1",
|
|
389
388
|
children: [
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ d("div", { className: "h-4 w-24 rounded bg-bg-sunken" }),
|
|
390
|
+
/* @__PURE__ */ d("div", { className: "mt-1 h-3 w-16 rounded bg-bg-sunken" }),
|
|
391
|
+
/* @__PURE__ */ f("div", {
|
|
393
392
|
className: "mt-1 flex items-center gap-2",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ d("div", { className: "h-3 w-8 rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "h-3 w-12 rounded bg-bg-sunken" })]
|
|
395
394
|
})
|
|
396
395
|
]
|
|
397
396
|
})]
|
|
@@ -399,45 +398,47 @@ var _e = (e, t) => ({
|
|
|
399
398
|
}, t))
|
|
400
399
|
})]
|
|
401
400
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ f("section", {
|
|
403
402
|
className: "mb-8",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ d("div", { className: "mb-4 h-6 w-36 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ f("div", {
|
|
405
404
|
className: "animate-pulse rounded-lg border border-border-default bg-bg-surface p-4",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ f("div", {
|
|
407
406
|
className: "flex items-center gap-4",
|
|
408
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ d("div", { className: "size-12 rounded-lg bg-bg-sunken" }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("div", {
|
|
409
408
|
className: "flex items-center gap-2",
|
|
410
|
-
children: [/* @__PURE__ */
|
|
411
|
-
}), /* @__PURE__ */
|
|
412
|
-
}), /* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ d("div", { className: "h-5 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "size-4 rounded-full bg-bg-sunken" })]
|
|
410
|
+
}), /* @__PURE__ */ d("div", { className: "mt-1 h-4 w-40 rounded bg-bg-sunken" })] })]
|
|
411
|
+
}), /* @__PURE__ */ f("div", {
|
|
413
412
|
className: "mt-3 space-y-2",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ d("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ d("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
|
|
415
414
|
})]
|
|
416
415
|
})]
|
|
417
416
|
})
|
|
418
417
|
]
|
|
419
418
|
})]
|
|
420
|
-
}),
|
|
419
|
+
}), Ce = ({ error: e, onRetry: t, onBack: n }) => /* @__PURE__ */ d("div", {
|
|
421
420
|
className: "flex h-full items-center justify-center",
|
|
422
|
-
children: /* @__PURE__ */
|
|
421
|
+
children: /* @__PURE__ */ f("div", {
|
|
423
422
|
className: "text-center",
|
|
424
423
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ d(s, { className: "mx-auto mb-4 size-12 text-status-error-text" }),
|
|
425
|
+
/* @__PURE__ */ d("h2", {
|
|
427
426
|
className: "mb-2 text-xl font-semibold text-text-primary",
|
|
428
427
|
children: "Failed to load product"
|
|
429
428
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ d("p", {
|
|
431
430
|
className: "mb-4 text-text-muted",
|
|
432
431
|
children: e.message || "An error occurred while loading the product details."
|
|
433
432
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ f("div", {
|
|
435
434
|
className: "flex justify-center gap-3",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ d("button", {
|
|
436
|
+
type: "button",
|
|
437
437
|
onClick: t,
|
|
438
438
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
|
|
439
439
|
children: "Try Again"
|
|
440
|
-
}), /* @__PURE__ */
|
|
440
|
+
}), /* @__PURE__ */ d("button", {
|
|
441
|
+
type: "button",
|
|
441
442
|
onClick: n,
|
|
442
443
|
className: "rounded-lg border border-border-default px-4 py-2 text-text-primary transition-colors hover:bg-bg-sunken",
|
|
443
444
|
children: "Go Back"
|
|
@@ -445,8 +446,8 @@ var _e = (e, t) => ({
|
|
|
445
446
|
})
|
|
446
447
|
]
|
|
447
448
|
})
|
|
448
|
-
}),
|
|
449
|
-
let { productId: s } =
|
|
449
|
+
}), p = () => {
|
|
450
|
+
let { productId: s } = _e(), u = ge(), { basePath: p } = e(), { addProduct: m, cartItems: we, addingToCart: h, createOrder: g, checkingOut: _ } = t(), { createReview: v, loading: y } = ee(), { updateReview: b, loading: Te } = ie(), { deleteReview: Ee, loading: De } = te(), { markHelpful: Oe, loading: ke } = ne(), x = ve(), [S, Ae] = o(!1), [C, je] = o(!1), [w, T] = o(!1), [E, D] = o(null), [O, k] = o(null), [A, j] = o("success"), [M, N] = o(!1), [P, F] = o(""), [I, L] = o(""), [R, z] = o(5), [Me, Ne] = o(null), [Pe, Fe] = o(!1), { data: Ie, loading: Le, error: Re, refetch: B } = re({
|
|
450
451
|
id: s,
|
|
451
452
|
slug: s,
|
|
452
453
|
includeReviews: !0,
|
|
@@ -454,327 +455,336 @@ var _e = (e, t) => ({
|
|
|
454
455
|
includeRelated: !0,
|
|
455
456
|
relatedLimit: 4,
|
|
456
457
|
includeVersions: !0
|
|
457
|
-
}),
|
|
458
|
-
if (
|
|
459
|
-
if (D(null),
|
|
460
|
-
|
|
458
|
+
}), V = Ie, H = V?.product, U = V?.publisher, W = we.some((e) => e.productId === H?.id), ze = i(async () => {
|
|
459
|
+
if (H) {
|
|
460
|
+
if (D(null), W) {
|
|
461
|
+
u(`${p}/cart`);
|
|
461
462
|
return;
|
|
462
463
|
}
|
|
463
464
|
try {
|
|
464
|
-
await
|
|
465
|
+
await m(ye(H, U), void 0, 1);
|
|
465
466
|
} catch (e) {
|
|
466
467
|
console.error("Failed to add product to cart:", e), D("Failed to add this product to cart. Please try again.");
|
|
467
468
|
}
|
|
468
469
|
}
|
|
469
470
|
}, [
|
|
471
|
+
H,
|
|
470
472
|
U,
|
|
473
|
+
m,
|
|
471
474
|
W,
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
]), Re = a(async () => {
|
|
477
|
-
if (U) {
|
|
475
|
+
u,
|
|
476
|
+
p
|
|
477
|
+
]), Be = i(async () => {
|
|
478
|
+
if (H) {
|
|
478
479
|
D(null), T(!0);
|
|
479
480
|
try {
|
|
480
|
-
let e =
|
|
481
|
+
let e = H.price || 0, t = await g({
|
|
481
482
|
total: e,
|
|
482
483
|
lineItems: [{
|
|
483
|
-
productId:
|
|
484
|
-
name:
|
|
484
|
+
productId: H.id,
|
|
485
|
+
name: H.name,
|
|
485
486
|
quantity: 1,
|
|
486
487
|
unitPrice: e,
|
|
487
488
|
subtotal: e,
|
|
488
|
-
itemType:
|
|
489
|
-
pricingModel:
|
|
489
|
+
itemType: H.nature?.toLowerCase() || "digital",
|
|
490
|
+
pricingModel: H.pricingModel || "PAID_ONETIME"
|
|
490
491
|
}],
|
|
491
492
|
billingAccountId: ""
|
|
492
493
|
});
|
|
493
|
-
t?.id ?
|
|
494
|
+
t?.id ? u(`/billing/checkout/store/${t.id}`) : (console.error("Failed to create order"), D("Failed to create order. Please try again."), T(!1));
|
|
494
495
|
} catch (e) {
|
|
495
496
|
console.error("Buy Now error:", e), D(e instanceof Error ? e.message : "Failed to start checkout"), T(!1);
|
|
496
497
|
}
|
|
497
498
|
}
|
|
498
499
|
}, [
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
]),
|
|
503
|
-
|
|
504
|
-
}, [
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
500
|
+
H,
|
|
501
|
+
g,
|
|
502
|
+
u
|
|
503
|
+
]), Ve = i(() => {
|
|
504
|
+
H && Fe(!0);
|
|
505
|
+
}, [H]), He = a(H);
|
|
506
|
+
He.current = H;
|
|
507
|
+
let Ue = a(x);
|
|
508
|
+
Ue.current = x, le(() => {
|
|
509
|
+
let e = He.current;
|
|
510
|
+
e && Ue.current.emit("store.product.viewed", {
|
|
511
|
+
productId: e.id,
|
|
512
|
+
productSlug: e.slug,
|
|
513
|
+
productType: e.type,
|
|
514
|
+
pricingModel: e.pricingModel
|
|
511
515
|
});
|
|
512
|
-
}, [
|
|
513
|
-
let
|
|
514
|
-
|
|
515
|
-
productId:
|
|
516
|
+
}, [H?.id]);
|
|
517
|
+
let We = i((e, t) => {
|
|
518
|
+
H && (x.emit("store.product.installed", {
|
|
519
|
+
productId: H.id,
|
|
516
520
|
workspaceId: e
|
|
517
|
-
}), console.log(`Successfully installed ${
|
|
518
|
-
}, [
|
|
521
|
+
}), console.log(`Successfully installed ${H.name} to workspace ${t} (${e})`));
|
|
522
|
+
}, [H, x]), Ge = i((e) => {
|
|
519
523
|
console.error("Installation failed:", e.message);
|
|
520
|
-
}, []),
|
|
521
|
-
F(
|
|
522
|
-
}, [
|
|
523
|
-
if (!
|
|
524
|
+
}, []), Ke = i(() => {
|
|
525
|
+
F(V?.userReview?.title ?? ""), L(V?.userReview?.comment ?? ""), z(V?.userReview?.rating ?? 5), k(null), j("success"), N(!0);
|
|
526
|
+
}, [V?.userReview]), qe = i(async () => {
|
|
527
|
+
if (!H) return;
|
|
524
528
|
if (R < 1 || R > 5) {
|
|
525
529
|
j("error"), k("Choose a rating from 1 to 5 stars.");
|
|
526
530
|
return;
|
|
527
531
|
}
|
|
528
532
|
let e = {
|
|
529
|
-
productId:
|
|
533
|
+
productId: H.id,
|
|
530
534
|
rating: R,
|
|
531
535
|
title: P.trim() || void 0,
|
|
532
536
|
comment: I.trim() || void 0
|
|
533
537
|
};
|
|
534
|
-
if (!(
|
|
538
|
+
if (!(V?.userReview ? await b(V.userReview.id, {
|
|
535
539
|
rating: e.rating,
|
|
536
540
|
title: e.title,
|
|
537
541
|
comment: e.comment
|
|
538
|
-
}) : await
|
|
542
|
+
}) : await v(e))) {
|
|
539
543
|
j("error"), k("We could not save your review. Please try again.");
|
|
540
544
|
return;
|
|
541
545
|
}
|
|
542
|
-
j("success"), k(
|
|
543
|
-
productId:
|
|
546
|
+
j("success"), k(V?.userReview ? "Your review was updated." : "Your review was submitted."), N(!1), x.emit("store.review.submitted", {
|
|
547
|
+
productId: H.id,
|
|
544
548
|
rating: R
|
|
545
|
-
}), await
|
|
549
|
+
}), await B();
|
|
546
550
|
}, [
|
|
547
551
|
x,
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
+
v,
|
|
553
|
+
H,
|
|
554
|
+
V?.userReview,
|
|
555
|
+
B,
|
|
552
556
|
I,
|
|
553
557
|
R,
|
|
554
558
|
P,
|
|
555
|
-
|
|
556
|
-
]),
|
|
557
|
-
if (
|
|
559
|
+
b
|
|
560
|
+
]), Je = i(async () => {
|
|
561
|
+
if (V?.userReview && (oe("medium"), await ae({
|
|
558
562
|
title: "Delete review",
|
|
559
563
|
message: "Are you sure you want to remove your review?",
|
|
560
564
|
okButtonTitle: "Delete",
|
|
561
565
|
cancelButtonTitle: "Cancel"
|
|
562
566
|
}) !== !1)) {
|
|
563
|
-
if (!await
|
|
564
|
-
j("error"), k("We could not remove your review. Please try again."),
|
|
567
|
+
if (!await Ee(V.userReview.id)) {
|
|
568
|
+
j("error"), k("We could not remove your review. Please try again."), se("error");
|
|
565
569
|
return;
|
|
566
570
|
}
|
|
567
|
-
j("success"), k("Your review was removed."), N(!1), F(""), L(""), z(5),
|
|
571
|
+
j("success"), k("Your review was removed."), N(!1), F(""), L(""), z(5), se("success"), await B();
|
|
568
572
|
}
|
|
569
573
|
}, [
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
]),
|
|
574
|
-
|
|
575
|
-
}, [
|
|
576
|
-
if (
|
|
577
|
-
if (
|
|
578
|
-
error:
|
|
579
|
-
onRetry:
|
|
580
|
-
onBack: () =>
|
|
574
|
+
Ee,
|
|
575
|
+
V?.userReview,
|
|
576
|
+
B
|
|
577
|
+
]), Ye = i(async (e) => {
|
|
578
|
+
Ne(e), await Oe(e) && await B(), Ne(null);
|
|
579
|
+
}, [Oe, B]);
|
|
580
|
+
if (Le) return /* @__PURE__ */ d(Se, {});
|
|
581
|
+
if (Re) return /* @__PURE__ */ d(Ce, {
|
|
582
|
+
error: Re,
|
|
583
|
+
onRetry: B,
|
|
584
|
+
onBack: () => u(`${p}/marketplace`)
|
|
581
585
|
});
|
|
582
|
-
if (!
|
|
586
|
+
if (!V?.product) return /* @__PURE__ */ d("div", {
|
|
583
587
|
className: "flex h-full items-center justify-center",
|
|
584
|
-
children: /* @__PURE__ */
|
|
588
|
+
children: /* @__PURE__ */ f("div", {
|
|
585
589
|
className: "text-center",
|
|
586
590
|
children: [
|
|
587
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ d("h2", {
|
|
588
592
|
className: "mb-2 text-xl font-semibold text-text-primary",
|
|
589
593
|
children: "Product not found"
|
|
590
594
|
}),
|
|
591
|
-
/* @__PURE__ */
|
|
595
|
+
/* @__PURE__ */ d("p", {
|
|
592
596
|
className: "mb-4 text-text-muted",
|
|
593
597
|
children: "The product you are looking for does not exist or has been removed."
|
|
594
598
|
}),
|
|
595
|
-
/* @__PURE__ */
|
|
596
|
-
|
|
599
|
+
/* @__PURE__ */ d("button", {
|
|
600
|
+
type: "button",
|
|
601
|
+
onClick: () => u(`${p}/marketplace`),
|
|
597
602
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
|
|
598
603
|
children: "Back to Marketplace"
|
|
599
604
|
})
|
|
600
605
|
]
|
|
601
606
|
})
|
|
602
607
|
});
|
|
603
|
-
let { reviews:
|
|
608
|
+
let { reviews: G, reviewsCount: Xe, relatedProducts: K, ratingDistribution: q, isPurchased: J, userEntitlement: Y } = V, X = H, Z = q ? q.fiveStars + q.fourStars + q.threeStars + q.twoStars + q.oneStar : 0, Ze = q ? [
|
|
604
609
|
{
|
|
605
610
|
stars: 5,
|
|
606
|
-
count:
|
|
607
|
-
percentage:
|
|
611
|
+
count: q.fiveStars,
|
|
612
|
+
percentage: Z > 0 ? q.fiveStars / Z * 100 : 0
|
|
608
613
|
},
|
|
609
614
|
{
|
|
610
615
|
stars: 4,
|
|
611
|
-
count:
|
|
612
|
-
percentage:
|
|
616
|
+
count: q.fourStars,
|
|
617
|
+
percentage: Z > 0 ? q.fourStars / Z * 100 : 0
|
|
613
618
|
},
|
|
614
619
|
{
|
|
615
620
|
stars: 3,
|
|
616
|
-
count:
|
|
617
|
-
percentage:
|
|
621
|
+
count: q.threeStars,
|
|
622
|
+
percentage: Z > 0 ? q.threeStars / Z * 100 : 0
|
|
618
623
|
},
|
|
619
624
|
{
|
|
620
625
|
stars: 2,
|
|
621
|
-
count:
|
|
622
|
-
percentage:
|
|
626
|
+
count: q.twoStars,
|
|
627
|
+
percentage: Z > 0 ? q.twoStars / Z * 100 : 0
|
|
623
628
|
},
|
|
624
629
|
{
|
|
625
630
|
stars: 1,
|
|
626
|
-
count:
|
|
627
|
-
percentage:
|
|
631
|
+
count: q.oneStar,
|
|
632
|
+
percentage: Z > 0 ? q.oneStar / Z * 100 : 0
|
|
628
633
|
}
|
|
629
|
-
] : [],
|
|
630
|
-
return /* @__PURE__ */
|
|
634
|
+
] : [], Qe = X.requiredPermissions || [], Q = X.integrationDeps || [], $e = () => X.pricingModel === "FREE" ? "Free" : X.pricingModel === "SUBSCRIPTION" ? `${r(X.price, X.currency)}/mo` : r(X.price, X.currency), $ = X.pricingModel === "FREE" || X.price === 0;
|
|
635
|
+
return /* @__PURE__ */ f("div", {
|
|
631
636
|
className: "h-full overflow-y-auto bg-bg-base",
|
|
632
637
|
children: [
|
|
633
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ d("div", {
|
|
634
639
|
className: "relative bg-bg-surface",
|
|
635
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ d("div", {
|
|
636
641
|
className: "mx-auto max-w-7xl",
|
|
637
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ f("div", {
|
|
638
643
|
className: "flex flex-col lg:flex-row",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
644
|
+
children: [/* @__PURE__ */ f("div", {
|
|
640
645
|
className: "flex-1 px-6 py-8 lg:max-w-xl lg:py-12",
|
|
641
646
|
children: [
|
|
642
|
-
/* @__PURE__ */
|
|
643
|
-
|
|
647
|
+
/* @__PURE__ */ f("button", {
|
|
648
|
+
type: "button",
|
|
649
|
+
onClick: () => u(-1),
|
|
644
650
|
className: "mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary",
|
|
645
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ d(ue, { className: "size-4" }), "Back"]
|
|
646
652
|
}),
|
|
647
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ d("h1", {
|
|
648
654
|
className: "mb-4 text-4xl font-normal leading-tight text-text-primary lg:text-5xl",
|
|
649
|
-
children:
|
|
655
|
+
children: X.name
|
|
650
656
|
}),
|
|
651
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ f("div", {
|
|
652
658
|
className: "mb-2",
|
|
653
|
-
children: [
|
|
654
|
-
href:
|
|
659
|
+
children: [U?.websiteUrl ? /* @__PURE__ */ d("a", {
|
|
660
|
+
href: U.websiteUrl,
|
|
655
661
|
target: "_blank",
|
|
656
662
|
rel: "noreferrer",
|
|
657
663
|
className: "text-base font-medium text-text-link hover:underline",
|
|
658
|
-
children:
|
|
659
|
-
}) : /* @__PURE__ */
|
|
664
|
+
children: U.name
|
|
665
|
+
}) : /* @__PURE__ */ d("span", {
|
|
660
666
|
className: "text-base font-medium text-text-primary",
|
|
661
|
-
children:
|
|
662
|
-
}),
|
|
667
|
+
children: U?.name || X.authorName || "Unknown Publisher"
|
|
668
|
+
}), U?.isVerified && /* @__PURE__ */ d(c, { className: "ml-1.5 inline size-4 text-status-success-text" })]
|
|
663
669
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ f("p", {
|
|
665
671
|
className: "mb-6 text-sm text-text-muted",
|
|
666
672
|
children: [
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
n(
|
|
673
|
+
X.category && /* @__PURE__ */ d("span", { children: X.category }),
|
|
674
|
+
X.category && " · ",
|
|
675
|
+
n(X.downloads),
|
|
670
676
|
"+ downloads"
|
|
671
677
|
]
|
|
672
678
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ f("div", {
|
|
674
680
|
className: "mb-6 flex items-center gap-4",
|
|
675
681
|
children: [
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
className: "flex
|
|
678
|
-
children:
|
|
679
|
-
src:
|
|
682
|
+
/* @__PURE__ */ d("div", {
|
|
683
|
+
className: "flex size-12 items-center justify-center overflow-hidden rounded-xl bg-bg-sunken",
|
|
684
|
+
children: X.icon ? /* @__PURE__ */ d("img", {
|
|
685
|
+
src: X.icon,
|
|
680
686
|
alt: "",
|
|
681
|
-
className: "
|
|
682
|
-
}) : /* @__PURE__ */
|
|
687
|
+
className: "size-full object-cover"
|
|
688
|
+
}) : /* @__PURE__ */ d("span", {
|
|
683
689
|
className: "text-lg font-bold text-text-muted",
|
|
684
|
-
children:
|
|
690
|
+
children: X.name.charAt(0)
|
|
685
691
|
})
|
|
686
692
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ f("div", {
|
|
688
694
|
className: "flex items-center gap-1 border-l border-border-default pl-4",
|
|
689
695
|
children: [
|
|
690
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ d("span", {
|
|
691
697
|
className: "text-sm font-medium text-text-primary",
|
|
692
|
-
children: (
|
|
698
|
+
children: (X.rating || 0).toFixed(1)
|
|
693
699
|
}),
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
700
|
+
/* @__PURE__ */ d(l, { className: "size-4 fill-current text-status-warning-text" }),
|
|
701
|
+
/* @__PURE__ */ f("span", {
|
|
696
702
|
className: "ml-1 text-xs text-text-muted",
|
|
697
|
-
children: [n(
|
|
703
|
+
children: [n(Xe || X.reviewCount), " reviews"]
|
|
698
704
|
})
|
|
699
705
|
]
|
|
700
706
|
}),
|
|
701
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ f("div", {
|
|
702
708
|
className: "border-l border-border-default pl-4",
|
|
703
|
-
children: [/* @__PURE__ */
|
|
709
|
+
children: [/* @__PURE__ */ f("span", {
|
|
704
710
|
className: "text-sm font-medium text-text-primary",
|
|
705
|
-
children: [n(
|
|
706
|
-
}), /* @__PURE__ */
|
|
711
|
+
children: [n(X.downloads), "+"]
|
|
712
|
+
}), /* @__PURE__ */ d("p", {
|
|
707
713
|
className: "text-xs text-text-muted",
|
|
708
714
|
children: "Downloads"
|
|
709
715
|
})]
|
|
710
716
|
}),
|
|
711
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ f("div", {
|
|
712
718
|
className: "border-l border-border-default pl-4",
|
|
713
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ d("span", {
|
|
714
720
|
className: "rounded bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary",
|
|
715
|
-
children:
|
|
716
|
-
}), /* @__PURE__ */
|
|
721
|
+
children: X.type
|
|
722
|
+
}), /* @__PURE__ */ d("p", {
|
|
717
723
|
className: "mt-0.5 text-xs text-text-muted",
|
|
718
724
|
children: "Type"
|
|
719
725
|
})]
|
|
720
726
|
})
|
|
721
727
|
]
|
|
722
728
|
}),
|
|
723
|
-
E && /* @__PURE__ */
|
|
729
|
+
E && /* @__PURE__ */ d("div", {
|
|
724
730
|
role: "alert",
|
|
725
731
|
className: "mb-4 rounded-lg border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
726
732
|
children: E
|
|
727
733
|
}),
|
|
728
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ f("div", {
|
|
729
735
|
className: "mb-6 flex items-center gap-3",
|
|
730
|
-
children: [
|
|
731
|
-
|
|
736
|
+
children: [J && !$ ? /* @__PURE__ */ d("button", {
|
|
737
|
+
type: "button",
|
|
738
|
+
onClick: Ve,
|
|
732
739
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
733
740
|
children: "Install to Workspace"
|
|
734
|
-
}) : $ ? /* @__PURE__ */
|
|
735
|
-
|
|
741
|
+
}) : $ ? /* @__PURE__ */ d("button", {
|
|
742
|
+
type: "button",
|
|
743
|
+
onClick: Ve,
|
|
736
744
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
737
745
|
children: "Install"
|
|
738
|
-
}) : /* @__PURE__ */
|
|
739
|
-
|
|
740
|
-
|
|
746
|
+
}) : /* @__PURE__ */ d("button", {
|
|
747
|
+
type: "button",
|
|
748
|
+
onClick: Be,
|
|
749
|
+
disabled: w || _,
|
|
741
750
|
className: "cursor-pointer flex items-center gap-2 rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-70",
|
|
742
|
-
children: w ||
|
|
743
|
-
}), !$ && !
|
|
744
|
-
|
|
745
|
-
|
|
751
|
+
children: w || _ ? /* @__PURE__ */ f(he, { children: [/* @__PURE__ */ d(fe, { className: "size-4 animate-spin" }), "Processing…"] }) : `Buy ${$e()}`
|
|
752
|
+
}), !$ && !J && /* @__PURE__ */ f("button", {
|
|
753
|
+
type: "button",
|
|
754
|
+
onClick: ze,
|
|
755
|
+
disabled: h,
|
|
746
756
|
className: "cursor-pointer flex items-center gap-2 rounded-full border border-border-default px-4 py-3 text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
|
|
747
|
-
children: [
|
|
757
|
+
children: [h ? /* @__PURE__ */ d(fe, { className: "size-4 animate-spin" }) : W ? /* @__PURE__ */ d(de, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ d(me, { className: "size-4" }), W ? "In Cart" : "Add to Cart"]
|
|
748
758
|
})]
|
|
749
759
|
}),
|
|
750
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ f("p", {
|
|
751
761
|
className: "flex items-center gap-2 text-xs text-text-muted",
|
|
752
|
-
children: [/* @__PURE__ */
|
|
762
|
+
children: [/* @__PURE__ */ d(pe, { className: "size-4" }), "This app is available for your workspace"]
|
|
753
763
|
}),
|
|
754
|
-
|
|
764
|
+
Y && /* @__PURE__ */ f("p", {
|
|
755
765
|
className: "mt-2 flex items-center gap-2 text-xs text-text-muted",
|
|
756
766
|
children: [
|
|
757
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ d(c, { className: "size-4 text-status-success-text" }),
|
|
758
768
|
"License: ",
|
|
759
|
-
|
|
760
|
-
|
|
769
|
+
Y.status,
|
|
770
|
+
Y.expiresAt && ` (Expires: ${new Date(Y.expiresAt).toLocaleDateString()})`
|
|
761
771
|
]
|
|
762
772
|
})
|
|
763
773
|
]
|
|
764
|
-
}), /* @__PURE__ */
|
|
774
|
+
}), /* @__PURE__ */ d("div", {
|
|
765
775
|
className: "relative flex-1 bg-bg-sunken lg:min-h-[500px]",
|
|
766
|
-
children:
|
|
767
|
-
src:
|
|
768
|
-
alt: `${
|
|
769
|
-
className: "
|
|
770
|
-
}) : /* @__PURE__ */
|
|
776
|
+
children: X.screenshots && X.screenshots.length > 0 ? /* @__PURE__ */ d("img", {
|
|
777
|
+
src: X.screenshots[0],
|
|
778
|
+
alt: `${X.name} screenshot`,
|
|
779
|
+
className: "size-full object-cover"
|
|
780
|
+
}) : /* @__PURE__ */ d("div", {
|
|
771
781
|
className: "flex h-full min-h-[300px] items-center justify-center",
|
|
772
|
-
children: /* @__PURE__ */
|
|
782
|
+
children: /* @__PURE__ */ f("div", {
|
|
773
783
|
className: "text-center",
|
|
774
|
-
children: [/* @__PURE__ */
|
|
775
|
-
className: "mx-auto mb-4 flex
|
|
776
|
-
children:
|
|
777
|
-
}), /* @__PURE__ */
|
|
784
|
+
children: [/* @__PURE__ */ d("div", {
|
|
785
|
+
className: "mx-auto mb-4 flex size-24 items-center justify-center rounded-2xl bg-bg-surface text-4xl font-bold text-text-muted",
|
|
786
|
+
children: X.name.charAt(0)
|
|
787
|
+
}), /* @__PURE__ */ d("p", {
|
|
778
788
|
className: "text-sm text-text-muted",
|
|
779
789
|
children: "No preview available"
|
|
780
790
|
})]
|
|
@@ -784,79 +794,80 @@ var _e = (e, t) => ({
|
|
|
784
794
|
})
|
|
785
795
|
})
|
|
786
796
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ d("main", {
|
|
788
798
|
className: "mx-auto max-w-7xl px-6 py-8",
|
|
789
|
-
children: /* @__PURE__ */
|
|
799
|
+
children: /* @__PURE__ */ f("div", {
|
|
790
800
|
className: "flex flex-col gap-8 lg:flex-row",
|
|
791
|
-
children: [/* @__PURE__ */
|
|
801
|
+
children: [/* @__PURE__ */ f("div", {
|
|
792
802
|
className: "flex-1 lg:max-w-3xl",
|
|
793
803
|
children: [
|
|
794
|
-
|
|
804
|
+
X.screenshots && X.screenshots.length > 1 && /* @__PURE__ */ d("section", {
|
|
795
805
|
className: "mb-8",
|
|
796
|
-
children: /* @__PURE__ */
|
|
806
|
+
children: /* @__PURE__ */ d("div", {
|
|
797
807
|
className: "flex gap-4 overflow-x-auto pb-4",
|
|
798
|
-
children:
|
|
808
|
+
children: X.screenshots.map((e, t) => /* @__PURE__ */ d("div", {
|
|
799
809
|
className: "relative h-64 w-96 flex-shrink-0 overflow-hidden rounded-xl bg-bg-sunken",
|
|
800
|
-
children: /* @__PURE__ */
|
|
810
|
+
children: /* @__PURE__ */ d("img", {
|
|
801
811
|
src: e,
|
|
802
812
|
alt: `Screenshot ${t + 1}`,
|
|
803
|
-
className: "
|
|
813
|
+
className: "size-full object-cover"
|
|
804
814
|
})
|
|
805
815
|
}, t))
|
|
806
816
|
})
|
|
807
817
|
}),
|
|
808
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ f("section", {
|
|
809
819
|
className: "mb-8",
|
|
810
820
|
children: [
|
|
811
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ d("div", {
|
|
812
822
|
className: "mb-4 flex items-center justify-between text-left",
|
|
813
|
-
children: /* @__PURE__ */
|
|
823
|
+
children: /* @__PURE__ */ d("h2", {
|
|
814
824
|
className: "text-lg font-medium text-text-primary",
|
|
815
825
|
children: "About this app"
|
|
816
826
|
})
|
|
817
827
|
}),
|
|
818
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ f("div", {
|
|
819
829
|
className: "text-sm leading-relaxed text-text-secondary",
|
|
820
|
-
children: [/* @__PURE__ */
|
|
830
|
+
children: [/* @__PURE__ */ d("p", {
|
|
821
831
|
className: S ? "" : "line-clamp-4",
|
|
822
|
-
children:
|
|
823
|
-
}), ((
|
|
824
|
-
|
|
832
|
+
children: X.longDescription || X.description || "No description available."
|
|
833
|
+
}), ((X.longDescription || X.description)?.length ?? 0) > 200 && /* @__PURE__ */ d("button", {
|
|
834
|
+
type: "button",
|
|
835
|
+
onClick: () => Ae(!S),
|
|
825
836
|
className: "cursor-pointer mt-3 text-sm font-medium text-text-link",
|
|
826
837
|
children: S ? "Show less" : "Show more"
|
|
827
838
|
})]
|
|
828
839
|
}),
|
|
829
|
-
|
|
840
|
+
X.tags && X.tags.length > 0 && /* @__PURE__ */ d("div", {
|
|
830
841
|
className: "mt-4 flex flex-wrap gap-2",
|
|
831
|
-
children:
|
|
842
|
+
children: X.tags.map((e) => /* @__PURE__ */ d("span", {
|
|
832
843
|
className: "rounded-full border border-border-default px-3 py-1.5 text-xs text-text-muted transition-colors hover:bg-bg-sunken",
|
|
833
844
|
children: e
|
|
834
845
|
}, e))
|
|
835
846
|
})
|
|
836
847
|
]
|
|
837
848
|
}),
|
|
838
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ f("section", {
|
|
839
850
|
className: "mb-8",
|
|
840
851
|
children: [
|
|
841
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ d("div", {
|
|
842
853
|
className: "mb-4 flex items-center justify-between text-left",
|
|
843
|
-
children: /* @__PURE__ */
|
|
854
|
+
children: /* @__PURE__ */ d("h2", {
|
|
844
855
|
className: "text-lg font-medium text-text-primary",
|
|
845
856
|
children: "Ratings & Reviews"
|
|
846
857
|
})
|
|
847
858
|
}),
|
|
848
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ f("div", {
|
|
849
860
|
className: "rounded-xl border border-border-default bg-bg-surface p-5",
|
|
850
|
-
children: [
|
|
861
|
+
children: [G && G.length > 0 ? /* @__PURE__ */ f("div", {
|
|
851
862
|
className: "flex items-start gap-8",
|
|
852
|
-
children: [/* @__PURE__ */
|
|
863
|
+
children: [/* @__PURE__ */ f("div", {
|
|
853
864
|
className: "text-center",
|
|
854
865
|
children: [
|
|
855
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ d("p", {
|
|
856
867
|
className: "text-5xl font-light text-text-primary",
|
|
857
|
-
children: (
|
|
868
|
+
children: (X.rating || 0).toFixed(1)
|
|
858
869
|
}),
|
|
859
|
-
/* @__PURE__ */
|
|
870
|
+
/* @__PURE__ */ d("div", {
|
|
860
871
|
className: "my-2 flex justify-center gap-0.5",
|
|
861
872
|
children: [
|
|
862
873
|
1,
|
|
@@ -864,21 +875,21 @@ var _e = (e, t) => ({
|
|
|
864
875
|
3,
|
|
865
876
|
4,
|
|
866
877
|
5
|
|
867
|
-
].map((e) => /* @__PURE__ */
|
|
878
|
+
].map((e) => /* @__PURE__ */ d(l, { className: `size-4 ${e <= Math.round(X.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
|
|
868
879
|
}),
|
|
869
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ f("p", {
|
|
870
881
|
className: "text-sm text-text-muted",
|
|
871
|
-
children: [n(
|
|
882
|
+
children: [n(Xe || X.reviewCount), " reviews"]
|
|
872
883
|
})
|
|
873
884
|
]
|
|
874
|
-
}),
|
|
885
|
+
}), Ze.length > 0 && /* @__PURE__ */ d("div", {
|
|
875
886
|
className: "flex-1 space-y-1.5",
|
|
876
|
-
children:
|
|
887
|
+
children: Ze.map((e) => /* @__PURE__ */ d(be, { ...e }, e.stars))
|
|
877
888
|
})]
|
|
878
|
-
}) : /* @__PURE__ */
|
|
889
|
+
}) : /* @__PURE__ */ f("div", {
|
|
879
890
|
className: "flex flex-col items-center justify-center py-6 text-center",
|
|
880
891
|
children: [
|
|
881
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ d("div", {
|
|
882
893
|
className: "mb-3 flex gap-0.5",
|
|
883
894
|
children: [
|
|
884
895
|
1,
|
|
@@ -886,37 +897,37 @@ var _e = (e, t) => ({
|
|
|
886
897
|
3,
|
|
887
898
|
4,
|
|
888
899
|
5
|
|
889
|
-
].map((e) => /* @__PURE__ */
|
|
900
|
+
].map((e) => /* @__PURE__ */ d(l, { className: "size-5 text-border-default" }, e))
|
|
890
901
|
}),
|
|
891
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ d("p", {
|
|
892
903
|
className: "font-medium text-text-primary",
|
|
893
904
|
children: "No reviews yet"
|
|
894
905
|
}),
|
|
895
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ d("p", {
|
|
896
907
|
className: "mt-1 text-sm text-text-muted",
|
|
897
908
|
children: "Be the first to share your experience with this app."
|
|
898
909
|
})
|
|
899
910
|
]
|
|
900
|
-
}), /* @__PURE__ */
|
|
911
|
+
}), /* @__PURE__ */ f("div", {
|
|
901
912
|
className: "mt-6 border-t border-border-default pt-4",
|
|
902
|
-
children: [O && /* @__PURE__ */
|
|
913
|
+
children: [O && /* @__PURE__ */ d("p", {
|
|
903
914
|
role: A === "success" ? "status" : "alert",
|
|
904
915
|
className: `mb-3 rounded-lg px-3 py-2 text-sm ${A === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
|
|
905
916
|
children: O
|
|
906
|
-
}),
|
|
917
|
+
}), J || V?.userReview ? /* @__PURE__ */ f("div", {
|
|
907
918
|
className: "space-y-4",
|
|
908
|
-
children: [/* @__PURE__ */
|
|
919
|
+
children: [/* @__PURE__ */ d("button", {
|
|
909
920
|
type: "button",
|
|
910
|
-
onClick: () => M ? N(!1) :
|
|
921
|
+
onClick: () => M ? N(!1) : Ke(),
|
|
911
922
|
className: "w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link",
|
|
912
|
-
children:
|
|
913
|
-
}), M && /* @__PURE__ */
|
|
923
|
+
children: V?.userReview ? M ? "Cancel review editing" : "Edit your review" : M ? "Cancel review" : "Write a Review"
|
|
924
|
+
}), M && /* @__PURE__ */ f("div", {
|
|
914
925
|
className: "rounded-xl border border-border-default bg-bg-sunken p-4",
|
|
915
926
|
children: [
|
|
916
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
917
928
|
className: "text-sm font-medium text-text-primary",
|
|
918
929
|
children: "Your rating"
|
|
919
|
-
}), /* @__PURE__ */
|
|
930
|
+
}), /* @__PURE__ */ d("div", {
|
|
920
931
|
className: "mt-2 flex flex-wrap gap-2",
|
|
921
932
|
children: [
|
|
922
933
|
1,
|
|
@@ -924,25 +935,27 @@ var _e = (e, t) => ({
|
|
|
924
935
|
3,
|
|
925
936
|
4,
|
|
926
937
|
5
|
|
927
|
-
].map((e) => /* @__PURE__ */
|
|
938
|
+
].map((e) => /* @__PURE__ */ f("button", {
|
|
928
939
|
type: "button",
|
|
929
940
|
onClick: () => z(e),
|
|
930
941
|
className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${R === e ? "border-action-primary-border bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface"}`,
|
|
931
942
|
children: [e, " ★"]
|
|
932
943
|
}, e))
|
|
933
944
|
})] }),
|
|
934
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ f("label", {
|
|
935
946
|
className: "mt-4 block text-sm font-medium text-text-primary",
|
|
936
|
-
children: ["Title", /* @__PURE__ */
|
|
947
|
+
children: ["Title", /* @__PURE__ */ d("input", {
|
|
948
|
+
"aria-label": "Review title",
|
|
937
949
|
value: P,
|
|
938
950
|
onChange: (e) => F(e.target.value),
|
|
939
951
|
className: "mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border",
|
|
940
952
|
placeholder: "Summarize your experience"
|
|
941
953
|
})]
|
|
942
954
|
}),
|
|
943
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ f("label", {
|
|
944
956
|
className: "mt-4 block text-sm font-medium text-text-primary",
|
|
945
|
-
children: ["Review", /* @__PURE__ */
|
|
957
|
+
children: ["Review", /* @__PURE__ */ d("textarea", {
|
|
958
|
+
"aria-label": "Review body",
|
|
946
959
|
value: I,
|
|
947
960
|
onChange: (e) => L(e.target.value),
|
|
948
961
|
rows: 4,
|
|
@@ -952,184 +965,185 @@ var _e = (e, t) => ({
|
|
|
952
965
|
placeholder: "What worked well? What should improve?"
|
|
953
966
|
})]
|
|
954
967
|
}),
|
|
955
|
-
/* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ f("div", {
|
|
956
969
|
className: "mt-4 flex flex-wrap gap-3",
|
|
957
|
-
children: [/* @__PURE__ */
|
|
970
|
+
children: [/* @__PURE__ */ d("button", {
|
|
958
971
|
type: "button",
|
|
959
|
-
onClick:
|
|
960
|
-
disabled:
|
|
972
|
+
onClick: qe,
|
|
973
|
+
disabled: y || Te,
|
|
961
974
|
className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
|
|
962
|
-
children:
|
|
963
|
-
}),
|
|
975
|
+
children: y || Te ? "Saving..." : V?.userReview ? "Update Review" : "Submit Review"
|
|
976
|
+
}), V?.userReview && /* @__PURE__ */ d("button", {
|
|
964
977
|
type: "button",
|
|
965
|
-
onClick:
|
|
966
|
-
disabled:
|
|
978
|
+
onClick: Je,
|
|
979
|
+
disabled: De,
|
|
967
980
|
className: "cursor-pointer rounded-lg border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-60",
|
|
968
|
-
children:
|
|
981
|
+
children: De ? "Removing..." : "Delete Review"
|
|
969
982
|
})]
|
|
970
983
|
})
|
|
971
984
|
]
|
|
972
985
|
})]
|
|
973
|
-
}) : /* @__PURE__ */
|
|
986
|
+
}) : /* @__PURE__ */ d("p", {
|
|
974
987
|
className: "text-center text-sm text-text-muted",
|
|
975
988
|
children: "Purchase this app to submit a review."
|
|
976
989
|
})]
|
|
977
990
|
})]
|
|
978
991
|
}),
|
|
979
|
-
|
|
992
|
+
G && G.length > 0 && /* @__PURE__ */ f("div", {
|
|
980
993
|
className: "mt-4 space-y-3",
|
|
981
|
-
children: [/* @__PURE__ */
|
|
994
|
+
children: [/* @__PURE__ */ d("ul", {
|
|
982
995
|
className: "space-y-3",
|
|
983
|
-
children: (C ?
|
|
996
|
+
children: (C ? G : G.slice(0, 2)).map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(xe, {
|
|
984
997
|
review: e,
|
|
985
|
-
onMarkHelpful:
|
|
986
|
-
markingHelpful:
|
|
998
|
+
onMarkHelpful: Ye,
|
|
999
|
+
markingHelpful: ke && Me === e.id
|
|
987
1000
|
}) }, e.id))
|
|
988
|
-
}),
|
|
989
|
-
|
|
1001
|
+
}), G.length > 2 && /* @__PURE__ */ d("button", {
|
|
1002
|
+
type: "button",
|
|
1003
|
+
onClick: () => je(!C),
|
|
990
1004
|
className: "cursor-pointer text-sm font-medium text-text-link",
|
|
991
|
-
children: C ? "Show less" : `Show all ${
|
|
1005
|
+
children: C ? "Show less" : `Show all ${G.length} reviews`
|
|
992
1006
|
})]
|
|
993
1007
|
}),
|
|
994
|
-
(!
|
|
1008
|
+
(!G || G.length === 0) && /* @__PURE__ */ d("p", {
|
|
995
1009
|
className: "mt-4 text-sm text-text-muted",
|
|
996
1010
|
children: "No reviews yet. Be the first to review!"
|
|
997
1011
|
})
|
|
998
1012
|
]
|
|
999
1013
|
}),
|
|
1000
|
-
|
|
1014
|
+
Qe.length > 0 && /* @__PURE__ */ f("section", {
|
|
1001
1015
|
className: "mb-8",
|
|
1002
|
-
children: [/* @__PURE__ */
|
|
1016
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1003
1017
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1004
1018
|
children: "Required Permissions"
|
|
1005
|
-
}), /* @__PURE__ */
|
|
1019
|
+
}), /* @__PURE__ */ d("div", {
|
|
1006
1020
|
className: "space-y-2",
|
|
1007
|
-
children:
|
|
1021
|
+
children: Qe.map((e) => /* @__PURE__ */ f("div", {
|
|
1008
1022
|
className: "flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3",
|
|
1009
|
-
children: [/* @__PURE__ */
|
|
1023
|
+
children: [/* @__PURE__ */ d(c, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ d("span", {
|
|
1010
1024
|
className: "text-sm text-text-primary",
|
|
1011
1025
|
children: e
|
|
1012
1026
|
})]
|
|
1013
1027
|
}, e))
|
|
1014
1028
|
})]
|
|
1015
1029
|
}),
|
|
1016
|
-
|
|
1030
|
+
Q.length > 0 && /* @__PURE__ */ f("section", {
|
|
1017
1031
|
className: "mb-8",
|
|
1018
|
-
children: [/* @__PURE__ */
|
|
1032
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1019
1033
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1020
1034
|
children: "Integrations"
|
|
1021
|
-
}), /* @__PURE__ */
|
|
1035
|
+
}), /* @__PURE__ */ d("div", {
|
|
1022
1036
|
className: "flex flex-wrap gap-2",
|
|
1023
|
-
children:
|
|
1037
|
+
children: Q.map((e) => /* @__PURE__ */ d("span", {
|
|
1024
1038
|
className: "rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
|
|
1025
1039
|
children: e
|
|
1026
1040
|
}, e))
|
|
1027
1041
|
})]
|
|
1028
1042
|
}),
|
|
1029
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ f("section", {
|
|
1030
1044
|
className: "mb-8",
|
|
1031
|
-
children: [/* @__PURE__ */
|
|
1045
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1032
1046
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1033
1047
|
children: "Additional Information"
|
|
1034
|
-
}), /* @__PURE__ */
|
|
1048
|
+
}), /* @__PURE__ */ f("div", {
|
|
1035
1049
|
className: "grid grid-cols-2 gap-6 md:grid-cols-3",
|
|
1036
1050
|
children: [
|
|
1037
|
-
|
|
1051
|
+
X.manifestVersion && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1038
1052
|
className: "text-xs text-text-muted",
|
|
1039
1053
|
children: "Version"
|
|
1040
|
-
}), /* @__PURE__ */
|
|
1054
|
+
}), /* @__PURE__ */ d("p", {
|
|
1041
1055
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1042
|
-
children:
|
|
1056
|
+
children: X.manifestVersion
|
|
1043
1057
|
})] }),
|
|
1044
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1045
1059
|
className: "text-xs text-text-muted",
|
|
1046
1060
|
children: "Type"
|
|
1047
|
-
}), /* @__PURE__ */
|
|
1061
|
+
}), /* @__PURE__ */ d("p", {
|
|
1048
1062
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1049
|
-
children:
|
|
1063
|
+
children: X.type
|
|
1050
1064
|
})] }),
|
|
1051
|
-
|
|
1065
|
+
X.publishedAt && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1052
1066
|
className: "text-xs text-text-muted",
|
|
1053
1067
|
children: "Published"
|
|
1054
|
-
}), /* @__PURE__ */
|
|
1068
|
+
}), /* @__PURE__ */ d("p", {
|
|
1055
1069
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1056
|
-
children: new Date(
|
|
1070
|
+
children: new Date(X.publishedAt).toLocaleDateString()
|
|
1057
1071
|
})] }),
|
|
1058
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1059
1073
|
className: "text-xs text-text-muted",
|
|
1060
1074
|
children: "Updated"
|
|
1061
|
-
}), /* @__PURE__ */
|
|
1075
|
+
}), /* @__PURE__ */ d("p", {
|
|
1062
1076
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1063
|
-
children: new Date(
|
|
1077
|
+
children: new Date(X.updatedAt).toLocaleDateString()
|
|
1064
1078
|
})] }),
|
|
1065
|
-
|
|
1079
|
+
X.license && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1066
1080
|
className: "text-xs text-text-muted",
|
|
1067
1081
|
children: "License"
|
|
1068
|
-
}), /* @__PURE__ */
|
|
1082
|
+
}), /* @__PURE__ */ d("p", {
|
|
1069
1083
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1070
|
-
children:
|
|
1084
|
+
children: X.license
|
|
1071
1085
|
})] }),
|
|
1072
|
-
|
|
1086
|
+
X.minPlatformVersion && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1073
1087
|
className: "text-xs text-text-muted",
|
|
1074
1088
|
children: "Min Platform Version"
|
|
1075
|
-
}), /* @__PURE__ */
|
|
1089
|
+
}), /* @__PURE__ */ d("p", {
|
|
1076
1090
|
className: "mt-1 text-sm font-medium text-text-primary",
|
|
1077
|
-
children:
|
|
1091
|
+
children: X.minPlatformVersion
|
|
1078
1092
|
})] })
|
|
1079
1093
|
]
|
|
1080
1094
|
})]
|
|
1081
1095
|
})
|
|
1082
1096
|
]
|
|
1083
|
-
}), /* @__PURE__ */
|
|
1097
|
+
}), /* @__PURE__ */ f("div", {
|
|
1084
1098
|
className: "w-full lg:w-80",
|
|
1085
1099
|
children: [
|
|
1086
|
-
(
|
|
1100
|
+
(X.documentationUrl || X.repositoryUrl || U?.email) && /* @__PURE__ */ f("div", {
|
|
1087
1101
|
className: "mb-6 rounded-xl border border-border-default bg-bg-surface p-4",
|
|
1088
|
-
children: [/* @__PURE__ */
|
|
1102
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
1089
1103
|
className: "font-medium text-text-primary",
|
|
1090
1104
|
children: "App support"
|
|
1091
|
-
}), /* @__PURE__ */
|
|
1105
|
+
}), /* @__PURE__ */ f("div", {
|
|
1092
1106
|
className: "mt-3 space-y-2 text-sm",
|
|
1093
1107
|
children: [
|
|
1094
|
-
|
|
1095
|
-
href:
|
|
1108
|
+
X.documentationUrl && /* @__PURE__ */ d("a", {
|
|
1109
|
+
href: X.documentationUrl,
|
|
1096
1110
|
target: "_blank",
|
|
1097
1111
|
rel: "noreferrer",
|
|
1098
1112
|
className: "block text-text-link hover:underline",
|
|
1099
1113
|
children: "Documentation"
|
|
1100
1114
|
}),
|
|
1101
|
-
|
|
1102
|
-
href:
|
|
1115
|
+
X.repositoryUrl && /* @__PURE__ */ d("a", {
|
|
1116
|
+
href: X.repositoryUrl,
|
|
1103
1117
|
target: "_blank",
|
|
1104
1118
|
rel: "noreferrer",
|
|
1105
1119
|
className: "block text-text-link hover:underline",
|
|
1106
1120
|
children: "Source repository"
|
|
1107
1121
|
}),
|
|
1108
|
-
|
|
1109
|
-
href: `mailto:${
|
|
1122
|
+
U?.email && /* @__PURE__ */ d("a", {
|
|
1123
|
+
href: `mailto:${U.email}`,
|
|
1110
1124
|
className: "block text-text-link hover:underline",
|
|
1111
1125
|
children: "Contact publisher"
|
|
1112
1126
|
})
|
|
1113
1127
|
]
|
|
1114
1128
|
})]
|
|
1115
1129
|
}),
|
|
1116
|
-
|
|
1130
|
+
U && /* @__PURE__ */ f("div", {
|
|
1117
1131
|
className: "mb-6 rounded-xl border border-border-default bg-bg-surface p-4",
|
|
1118
1132
|
children: [
|
|
1119
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ d("h3", {
|
|
1120
1134
|
className: "font-medium text-text-primary",
|
|
1121
1135
|
children: "Publisher"
|
|
1122
1136
|
}),
|
|
1123
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ d("p", {
|
|
1124
1138
|
className: "mt-2 text-sm text-text-primary",
|
|
1125
|
-
children:
|
|
1139
|
+
children: U.name
|
|
1126
1140
|
}),
|
|
1127
|
-
|
|
1141
|
+
U.bio && /* @__PURE__ */ d("p", {
|
|
1128
1142
|
className: "mt-2 text-sm text-text-muted",
|
|
1129
|
-
children:
|
|
1143
|
+
children: U.bio
|
|
1130
1144
|
}),
|
|
1131
|
-
|
|
1132
|
-
href:
|
|
1145
|
+
U.websiteUrl && /* @__PURE__ */ d("a", {
|
|
1146
|
+
href: U.websiteUrl,
|
|
1133
1147
|
target: "_blank",
|
|
1134
1148
|
rel: "noreferrer",
|
|
1135
1149
|
className: "mt-3 inline-block text-sm text-text-link hover:underline",
|
|
@@ -1137,41 +1151,42 @@ var _e = (e, t) => ({
|
|
|
1137
1151
|
})
|
|
1138
1152
|
]
|
|
1139
1153
|
}),
|
|
1140
|
-
|
|
1154
|
+
K && K.length > 0 && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", {
|
|
1141
1155
|
className: "mb-4 flex items-center justify-between text-left",
|
|
1142
|
-
children: /* @__PURE__ */
|
|
1156
|
+
children: /* @__PURE__ */ d("span", {
|
|
1143
1157
|
className: "font-medium text-text-primary",
|
|
1144
1158
|
children: "Similar apps"
|
|
1145
1159
|
})
|
|
1146
|
-
}), /* @__PURE__ */
|
|
1160
|
+
}), /* @__PURE__ */ d("div", {
|
|
1147
1161
|
className: "space-y-3",
|
|
1148
|
-
children:
|
|
1149
|
-
|
|
1162
|
+
children: K.slice(0, 4).map((e) => /* @__PURE__ */ f("button", {
|
|
1163
|
+
type: "button",
|
|
1164
|
+
onClick: () => u(`${p}/marketplace/product/${e.id}`),
|
|
1150
1165
|
className: "flex w-full cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-bg-sunken",
|
|
1151
|
-
children: [e.icon ? /* @__PURE__ */
|
|
1166
|
+
children: [e.icon ? /* @__PURE__ */ d("img", {
|
|
1152
1167
|
src: e.icon,
|
|
1153
1168
|
alt: e.name,
|
|
1154
|
-
className: "
|
|
1155
|
-
}) : /* @__PURE__ */
|
|
1156
|
-
className: "flex
|
|
1169
|
+
className: "size-12 rounded-xl object-cover"
|
|
1170
|
+
}) : /* @__PURE__ */ d("div", {
|
|
1171
|
+
className: "flex size-12 items-center justify-center rounded-xl bg-bg-sunken text-lg font-bold text-text-muted",
|
|
1157
1172
|
children: e.name.charAt(0)
|
|
1158
|
-
}), /* @__PURE__ */
|
|
1173
|
+
}), /* @__PURE__ */ f("div", {
|
|
1159
1174
|
className: "flex-1 overflow-hidden",
|
|
1160
1175
|
children: [
|
|
1161
|
-
/* @__PURE__ */
|
|
1176
|
+
/* @__PURE__ */ d("p", {
|
|
1162
1177
|
className: "truncate text-sm font-medium text-text-primary",
|
|
1163
1178
|
children: e.name
|
|
1164
1179
|
}),
|
|
1165
|
-
/* @__PURE__ */
|
|
1180
|
+
/* @__PURE__ */ d("p", {
|
|
1166
1181
|
className: "text-xs text-text-muted",
|
|
1167
|
-
children:
|
|
1182
|
+
children: U?.name || "Unknown"
|
|
1168
1183
|
}),
|
|
1169
|
-
(e.reviewCount ?? 0) > 0 && /* @__PURE__ */
|
|
1184
|
+
(e.reviewCount ?? 0) > 0 && /* @__PURE__ */ f("div", {
|
|
1170
1185
|
className: "flex items-center gap-1",
|
|
1171
|
-
children: [/* @__PURE__ */
|
|
1186
|
+
children: [/* @__PURE__ */ d("span", {
|
|
1172
1187
|
className: "text-xs text-text-muted",
|
|
1173
1188
|
children: (e.rating || 0).toFixed(1)
|
|
1174
|
-
}), /* @__PURE__ */
|
|
1189
|
+
}), /* @__PURE__ */ d(l, { className: "size-3 fill-current text-status-warning-text" })]
|
|
1175
1190
|
})
|
|
1176
1191
|
]
|
|
1177
1192
|
})]
|
|
@@ -1181,25 +1196,25 @@ var _e = (e, t) => ({
|
|
|
1181
1196
|
})]
|
|
1182
1197
|
})
|
|
1183
1198
|
}),
|
|
1184
|
-
|
|
1185
|
-
isOpen:
|
|
1186
|
-
onClose: () =>
|
|
1199
|
+
X && /* @__PURE__ */ d(ce, {
|
|
1200
|
+
isOpen: Pe,
|
|
1201
|
+
onClose: () => Fe(!1),
|
|
1187
1202
|
app: {
|
|
1188
|
-
id:
|
|
1189
|
-
name:
|
|
1190
|
-
slug:
|
|
1191
|
-
icon:
|
|
1192
|
-
type:
|
|
1193
|
-
version:
|
|
1203
|
+
id: X.id,
|
|
1204
|
+
name: X.name,
|
|
1205
|
+
slug: X.slug,
|
|
1206
|
+
icon: X.icon,
|
|
1207
|
+
type: X.type,
|
|
1208
|
+
version: X.manifestVersion
|
|
1194
1209
|
},
|
|
1195
|
-
purchaseState:
|
|
1196
|
-
onInstallSuccess:
|
|
1197
|
-
onInstallError:
|
|
1210
|
+
purchaseState: J && !$ ? "purchased" : "free",
|
|
1211
|
+
onInstallSuccess: We,
|
|
1212
|
+
onInstallError: Ge
|
|
1198
1213
|
})
|
|
1199
1214
|
]
|
|
1200
1215
|
});
|
|
1201
1216
|
};
|
|
1202
1217
|
//#endregion
|
|
1203
|
-
export {
|
|
1218
|
+
export { p as ProductDetailPage };
|
|
1204
1219
|
|
|
1205
1220
|
//# sourceMappingURL=ProductDetailPage.js.map
|