@burdenoff/microfe-devportal 2026.624.7 → 2026.624.9

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.
@@ -5,24 +5,24 @@ import { EmptyState as r } from "../components/EmptyState.js";
5
5
  import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetWebhooksQuery as c, useGetWorkspaceInstallationQuery as l, useInstallApplicationMutation as u, useRevokeDelegationMutation as d, useRotateAppSecretMutation as f, useSubmitApplicationMutation as p, useUninstallApplicationMutation as m, useUpdateApplicationMutation as h } from "../../generated/global-operations.js";
6
6
  import { PageLayout as g, PageSection as _ } from "../components/PageLayout.js";
7
7
  import { APP_TYPE_LABELS as v } from "../utils/constants.js";
8
- import { FeaturedBadge as y, StatusBadge as b, VerifiedBadge as x } from "../components/StatusBadge.js";
9
- import { SelectionCheckbox as S } from "../components/SelectionCheckbox.js";
10
- import { nativeNotify as C } from "../../utils/nativeBridge.js";
11
- import { NewSecretAlert as ee } from "../components/SecretDisplay.js";
12
- import { DataTable as w, DetailList as T } from "../components/DataTable.js";
13
- import { InputField as E, SelectField as D, TextareaField as O } from "../components/FormField.js";
14
- import { ConfirmDialog as k } from "../components/ConfirmDialog.js";
15
- import { GrantDelegationModal as A } from "../components/GrantDelegationModal.js";
16
- import { DEVPORTAL_PERMISSIONS as te } from "../constants/permissions.js";
17
- import { useDevportalPermission as ne } from "../hooks/usePermission.js";
18
- import { usePackageUpload as j } from "../hooks/usePackageUpload.js";
19
- import { useCallback as M, useEffect as re, useMemo as N, useRef as P, useState as F } from "react";
20
- import { useI18n as I } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { AlertCircle as ie, AppWindow as ae, BarChart3 as L, CheckCircle as R, Clock as oe, Download as se, Edit as ce, ExternalLink as z, FlaskConical as le, Info as B, Key as ue, Loader2 as V, MoreHorizontal as de, Plus as H, Power as fe, RefreshCw as pe, SendHorizontal as me, Shield as U, Store as he, Upload as W, Users as G, Webhook as ge, X as K, XCircle as _e } from "lucide-react";
22
- import { useParams as ve } from "react-router-dom";
23
- import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
8
+ import { FeaturedBadge as y, StatusBadge as b, VerifiedBadge as ee } from "../components/StatusBadge.js";
9
+ import { SelectionCheckbox as x } from "../components/SelectionCheckbox.js";
10
+ import { nativeNotify as S } from "../../utils/nativeBridge.js";
11
+ import { NewSecretAlert as te } from "../components/SecretDisplay.js";
12
+ import { DataTable as C, DetailList as ne } from "../components/DataTable.js";
13
+ import { InputField as w, SelectField as T, TextareaField as E } from "../components/FormField.js";
14
+ import { ConfirmDialog as re } from "../components/ConfirmDialog.js";
15
+ import { GrantDelegationModal as ie } from "../components/GrantDelegationModal.js";
16
+ import { DEVPORTAL_PERMISSIONS as ae } from "../constants/permissions.js";
17
+ import { useDevportalPermission as D } from "../hooks/usePermission.js";
18
+ import { usePackageUpload as O } from "../hooks/usePackageUpload.js";
19
+ import { useCallback as k, useEffect as oe, useMemo as A, useRef as j, useState as M } from "react";
20
+ import { useI18n as N } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { AlertCircle as se, AppWindow as ce, BarChart3 as P, CheckCircle as F, Clock as I, Download as le, Edit as ue, ExternalLink as L, FlaskConical as de, Info as R, Key as fe, Loader2 as z, MoreHorizontal as pe, Plus as B, Power as me, RefreshCw as he, SendHorizontal as ge, Shield as V, Store as H, Upload as U, Users as W, Webhook as _e, X as G, XCircle as ve } from "lucide-react";
22
+ import { useParams as ye } from "react-router-dom";
23
+ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
24
24
  //#region src/devportal/pages/ApplicationDetailPage.tsx
25
- function ye(e) {
25
+ function be(e) {
26
26
  return e ? {
27
27
  id: e.id,
28
28
  name: e.name,
@@ -70,7 +70,7 @@ function ye(e) {
70
70
  updatedAt: e.updatedAt
71
71
  } : null;
72
72
  }
73
- function X(e) {
73
+ function Y(e) {
74
74
  return {
75
75
  id: e.id,
76
76
  applicationId: e.applicationId,
@@ -94,7 +94,7 @@ function X(e) {
94
94
  updatedAt: e.updatedAt
95
95
  };
96
96
  }
97
- function be(e) {
97
+ function xe(e) {
98
98
  return {
99
99
  id: e.id,
100
100
  applicationId: e.applicationId,
@@ -110,7 +110,7 @@ function be(e) {
110
110
  createdAt: e.createdAt
111
111
  };
112
112
  }
113
- function xe(e) {
113
+ function Se(e) {
114
114
  return {
115
115
  id: e.id,
116
116
  appId: e.appId,
@@ -132,356 +132,356 @@ function xe(e) {
132
132
  revokedBy: e.revokedBy || void 0
133
133
  };
134
134
  }
135
- var Se = [
135
+ var Ce = [
136
136
  {
137
137
  id: "overview",
138
138
  label: "Overview",
139
- icon: ae
139
+ icon: ce
140
140
  },
141
141
  {
142
142
  id: "permissions",
143
143
  label: "Permissions",
144
- icon: U
144
+ icon: V
145
145
  },
146
146
  {
147
147
  id: "webhooks",
148
148
  label: "Webhooks",
149
- icon: ge
149
+ icon: _e
150
150
  },
151
151
  {
152
152
  id: "delegations",
153
153
  label: "Delegations",
154
- icon: G
154
+ icon: W
155
155
  },
156
156
  {
157
157
  id: "analytics",
158
158
  label: "Analytics",
159
- icon: L
159
+ icon: P
160
160
  },
161
161
  {
162
162
  id: "playground",
163
163
  label: "API Playground",
164
- icon: z
164
+ icon: L
165
165
  },
166
166
  {
167
167
  id: "store-listing",
168
- label: "Store Listing",
169
- icon: he
168
+ label: "Marketplace Listing",
169
+ icon: H
170
170
  }
171
- ], Ce = {
171
+ ], we = {
172
172
  ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
173
173
  REVOKED: "bg-status-error-bg-subtle text-status-error-text",
174
174
  EXPIRED: "bg-bg-sunken text-text-secondary"
175
- }, we = ({ message: e = "Loading..." }) => /* @__PURE__ */ Y("div", {
175
+ }, X = ({ message: e = "Loading..." }) => /* @__PURE__ */ J("div", {
176
176
  className: "flex items-center justify-center gap-3 py-12",
177
- children: [/* @__PURE__ */ J(V, {
177
+ children: [/* @__PURE__ */ q(z, {
178
178
  size: 20,
179
179
  className: "animate-spin text-muted-foreground"
180
- }), /* @__PURE__ */ J("p", {
180
+ }), /* @__PURE__ */ q("p", {
181
181
  className: "text-sm text-muted-foreground",
182
182
  children: e
183
183
  })]
184
- }), Z = ({ message: e }) => /* @__PURE__ */ Y("div", {
184
+ }), Z = ({ message: e }) => /* @__PURE__ */ J("div", {
185
185
  className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
186
- children: [/* @__PURE__ */ J(ie, {
186
+ children: [/* @__PURE__ */ q(se, {
187
187
  size: 32,
188
188
  className: "text-destructive"
189
- }), /* @__PURE__ */ J("p", {
189
+ }), /* @__PURE__ */ q("p", {
190
190
  className: "text-sm text-muted-foreground",
191
191
  children: e
192
192
  })]
193
193
  }), Te = () => {
194
- let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = I(), p = (e, t) => {
194
+ let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = N(), p = (e, t) => {
195
195
  let n = d(e);
196
196
  return n === e ? t : n;
197
- }, { allowed: h } = ne(te.APP_UPDATE), { allowed: _ } = ne(te.APP_DELETE), { appId: S } = ve(), [w, T] = F("overview"), [E, D] = F(!1), [O, j] = F(!1), [re, N] = F(null), [P, L] = F(!1), { data: R, loading: se, error: z } = s({
198
- variables: { id: S },
199
- skip: !S
200
- }), [B, { loading: ue }] = f(), [de, { loading: H }] = a(), [U, { loading: he }] = u(), [W, { loading: G }] = m(), { data: ge, refetch: K } = l({
197
+ }, { allowed: h } = D(ae.APP_UPDATE), { allowed: _ } = D(ae.APP_DELETE), { appId: x } = ye(), [C, ne] = M("overview"), [w, T] = M(!1), [E, O] = M(!1), [oe, A] = M(null), [j, P] = M(!1), { data: F, loading: le, error: L } = s({
198
+ variables: { id: x },
199
+ skip: !x
200
+ }), [R, { loading: fe }] = f(), [pe, { loading: B }] = a(), [V, { loading: H }] = u(), [U, { loading: W }] = m(), { data: _e, refetch: G } = l({
201
201
  variables: {
202
- applicationId: S,
202
+ applicationId: x,
203
203
  workspaceId: c ?? void 0
204
204
  },
205
- skip: !c || !S,
205
+ skip: !c || !x,
206
206
  fetchPolicy: "cache-and-network"
207
- }), q = ge?.appInstallations?.edges?.[0]?.node ?? null, X = M((e) => {
207
+ }), K = _e?.appInstallations?.edges?.[0]?.node ?? null, Y = k((e) => {
208
208
  i?.(`${o}${e}`);
209
- }, [i, o]), be = M(async () => {
210
- let e = R?.application?.appId;
209
+ }, [i, o]), xe = k(async () => {
210
+ let e = F?.application?.appId;
211
211
  if (e) try {
212
- let t = (await B({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
213
- t && N(t), D(!1);
212
+ let t = (await R({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
213
+ t && A(t), T(!1);
214
214
  } catch {}
215
- }, [R?.application?.appId, B]), xe = M(async () => {
216
- if (S) try {
217
- await de({ variables: { id: S } }), j(!1), X("/apps");
215
+ }, [F?.application?.appId, R]), Se = k(async () => {
216
+ if (x) try {
217
+ await pe({ variables: { id: x } }), O(!1), Y("/apps");
218
218
  } catch {}
219
219
  }, [
220
- S,
221
- de,
222
- X
223
- ]), Ce = M(async () => {
224
- if (!(!S || !c)) try {
225
- await U({ variables: { input: {
226
- applicationId: S,
220
+ x,
221
+ pe,
222
+ Y
223
+ ]), we = k(async () => {
224
+ if (!(!x || !c)) try {
225
+ await V({ variables: { input: {
226
+ applicationId: x,
227
227
  scope: "WORKSPACE",
228
228
  workspaceId: c,
229
229
  autoUpdate: !1
230
- } } }), K(), C("success");
230
+ } } }), G(), S("success");
231
231
  } catch (e) {
232
- console.error("[DevPortal] Test in Workspace failed:", e), C("error");
232
+ console.error("[DevPortal] Test in Workspace failed:", e), S("error");
233
233
  }
234
234
  }, [
235
- S,
235
+ x,
236
236
  c,
237
- U,
238
- K
239
- ]), we = M(async (e) => {
237
+ V,
238
+ G
239
+ ]), X = k(async (e) => {
240
240
  try {
241
- await W({ variables: { id: e } }), K(), C("success");
241
+ await U({ variables: { id: e } }), G(), S("success");
242
242
  } catch {
243
- C("error");
243
+ S("error");
244
244
  }
245
- }, [W, K]);
246
- if (se && !R) return /* @__PURE__ */ J(n, { message: p("devportal.loadingApplication", "Loading application...") });
247
- if (z) return /* @__PURE__ */ J(g, {
245
+ }, [U, G]);
246
+ if (le && !F) return /* @__PURE__ */ q(n, { message: p("devportal.loadingApplication", "Loading application...") });
247
+ if (L) return /* @__PURE__ */ q(g, {
248
248
  title: p("devportal.error", "Error"),
249
249
  backLink: `${o}/apps`,
250
250
  backLabel: p("devportal.backToApplications", "Back to Applications"),
251
- children: /* @__PURE__ */ Y("div", {
251
+ children: /* @__PURE__ */ J("div", {
252
252
  className: "flex flex-col items-center justify-center py-12 text-center",
253
253
  children: [
254
- /* @__PURE__ */ J(ie, {
254
+ /* @__PURE__ */ q(se, {
255
255
  size: 48,
256
256
  className: "text-destructive mb-4"
257
257
  }),
258
- /* @__PURE__ */ J("h3", {
258
+ /* @__PURE__ */ q("h3", {
259
259
  className: "text-lg font-semibold mb-2",
260
260
  children: p("devportal.failedToLoadApplication", "Failed to load application")
261
261
  }),
262
- /* @__PURE__ */ J("p", {
262
+ /* @__PURE__ */ q("p", {
263
263
  className: "text-sm text-muted-foreground",
264
- children: z.message
264
+ children: L.message
265
265
  })
266
266
  ]
267
267
  })
268
268
  });
269
- let Z = ye(R?.application);
270
- return Z ? /* @__PURE__ */ Y(g, {
269
+ let Z = be(F?.application);
270
+ return Z ? /* @__PURE__ */ J(g, {
271
271
  title: Z.name,
272
272
  description: Z.shortDescription,
273
273
  backLink: `${o}/apps`,
274
274
  backLabel: p("devportal.backToApplications", "Back to Applications"),
275
- actions: /* @__PURE__ */ Y("div", {
275
+ actions: /* @__PURE__ */ J("div", {
276
276
  className: "flex items-center gap-2",
277
277
  children: [
278
- Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && /* @__PURE__ */ Y("button", {
279
- onClick: () => D(!0),
278
+ Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && /* @__PURE__ */ J("button", {
279
+ onClick: () => T(!0),
280
280
  disabled: !Z.appId,
281
281
  title: Z.appId ? p("devportal.rotateSecretHint", "Generate a new client secret") : p("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
282
282
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
283
- children: [/* @__PURE__ */ J(pe, { size: 16 }), p("devportal.rotateSecret", "Rotate Secret")]
283
+ children: [/* @__PURE__ */ q(he, { size: 16 }), p("devportal.rotateSecret", "Rotate Secret")]
284
284
  }),
285
- /* @__PURE__ */ Y("button", {
286
- onClick: () => X(`/apps/${Z.id}/versions`),
285
+ /* @__PURE__ */ J("button", {
286
+ onClick: () => Y(`/apps/${Z.id}/versions`),
287
287
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
288
- children: [/* @__PURE__ */ J(oe, { size: 16 }), p("devportal.versions", "Versions")]
288
+ children: [/* @__PURE__ */ q(I, { size: 16 }), p("devportal.versions", "Versions")]
289
289
  }),
290
- Z.status !== "PUBLISHED" && (Z.appType !== "NODE" && Z.appType !== "WORKFLOW" ? !0 : (R?.application?.versions?.totalCount ?? 0) > 0) && /* @__PURE__ */ Y("button", {
291
- onClick: () => T("store-listing"),
290
+ Z.status !== "PUBLISHED" && /* @__PURE__ */ J("button", {
291
+ onClick: () => Y(`/apps/${Z.id}/publish`),
292
292
  className: "inline-flex items-center gap-2 rounded-md border border-primary/40 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 transition-colors",
293
- children: [/* @__PURE__ */ J(me, { size: 16 }), p("devportal.submitForReview", "Submit for Review")]
293
+ children: [/* @__PURE__ */ q(ge, { size: 16 }), p("devportal.submitForReview", "Submit for Review")]
294
294
  }),
295
- Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && (q ? /* @__PURE__ */ Y("button", {
296
- onClick: () => void we(q.id),
297
- disabled: G || !c,
295
+ Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && (K ? /* @__PURE__ */ J("button", {
296
+ onClick: () => void X(K.id),
297
+ disabled: W || !c,
298
298
  title: p("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
299
299
  className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
300
- children: [G ? /* @__PURE__ */ J(V, {
300
+ children: [W ? /* @__PURE__ */ q(z, {
301
301
  size: 16,
302
302
  className: "animate-spin"
303
- }) : /* @__PURE__ */ J(_e, { size: 16 }), p("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
304
- }) : /* @__PURE__ */ Y("button", {
305
- onClick: () => void Ce(),
306
- disabled: he || !c,
303
+ }) : /* @__PURE__ */ q(ve, { size: 16 }), p("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
304
+ }) : /* @__PURE__ */ J("button", {
305
+ onClick: () => void we(),
306
+ disabled: H || !c,
307
307
  "aria-disabled": !c,
308
308
  title: c ? p("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : p("devportal.noWorkspaceContext", "No workspace context available"),
309
309
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
310
- children: [he ? /* @__PURE__ */ J(V, {
310
+ children: [H ? /* @__PURE__ */ q(z, {
311
311
  size: 16,
312
312
  className: "animate-spin"
313
- }) : /* @__PURE__ */ J(le, { size: 16 }), p("devportal.testInWorkspace", "Test in Workspace")]
313
+ }) : /* @__PURE__ */ q(de, { size: 16 }), p("devportal.testInWorkspace", "Test in Workspace")]
314
314
  })),
315
- Z.appType === "NODE" && /* @__PURE__ */ Y("button", {
315
+ Z.appType === "NODE" && /* @__PURE__ */ J("button", {
316
316
  onClick: () => i?.(`/workflows/new?nodeId=${Z.id}`),
317
317
  disabled: !c,
318
318
  "aria-disabled": !c,
319
319
  title: c ? p("devportal.testInWorkflowBuilderHint", "Open a new workflow with this node available in the builder") : p("devportal.noWorkspaceContext", "No workspace context available"),
320
320
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
321
- children: [/* @__PURE__ */ J(le, { size: 16 }), p("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
321
+ children: [/* @__PURE__ */ q(de, { size: 16 }), p("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
322
322
  }),
323
- /* @__PURE__ */ Y("button", {
324
- onClick: () => X(`/apps/${Z.id}/edit`),
323
+ /* @__PURE__ */ J("button", {
324
+ onClick: () => Y(`/apps/${Z.id}/edit`),
325
325
  disabled: !h,
326
326
  "aria-disabled": !h,
327
327
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
328
- children: [/* @__PURE__ */ J(ce, { size: 16 }), p("devportal.editApp", "Edit App")]
328
+ children: [/* @__PURE__ */ q(ue, { size: 16 }), p("devportal.editApp", "Edit App")]
329
329
  }),
330
- /* @__PURE__ */ Y("button", {
331
- onClick: () => j(!0),
330
+ /* @__PURE__ */ J("button", {
331
+ onClick: () => O(!0),
332
332
  disabled: !_,
333
333
  "aria-disabled": !_,
334
334
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
335
- children: [/* @__PURE__ */ J(fe, { size: 16 }), p("devportal.deactivate", "Deactivate")]
335
+ children: [/* @__PURE__ */ q(me, { size: 16 }), p("devportal.deactivate", "Deactivate")]
336
336
  })
337
337
  ]
338
338
  }),
339
339
  children: [
340
- re && /* @__PURE__ */ J(ee, {
340
+ oe && /* @__PURE__ */ q(te, {
341
341
  title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
342
- secret: re,
342
+ secret: oe,
343
343
  description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
344
- onDismiss: () => N(null)
344
+ onDismiss: () => A(null)
345
345
  }),
346
- /* @__PURE__ */ Y("div", {
346
+ /* @__PURE__ */ J("div", {
347
347
  className: "flex flex-wrap items-center gap-2",
348
348
  children: [
349
- /* @__PURE__ */ J(b, {
349
+ /* @__PURE__ */ q(b, {
350
350
  status: Z.status,
351
351
  type: "app"
352
352
  }),
353
- /* @__PURE__ */ J(b, {
353
+ /* @__PURE__ */ q(b, {
354
354
  status: Z.visibility,
355
355
  type: "app"
356
356
  }),
357
- Z.isVerified && /* @__PURE__ */ J(x, { verified: !0 }),
358
- Z.isFeatured && /* @__PURE__ */ J(y, {}),
359
- /* @__PURE__ */ J("span", {
357
+ Z.isVerified && /* @__PURE__ */ q(ee, { verified: !0 }),
358
+ Z.isFeatured && /* @__PURE__ */ q(y, {}),
359
+ /* @__PURE__ */ q("span", {
360
360
  className: "text-sm text-muted-foreground",
361
361
  children: v[Z.appType] || Z.appType
362
362
  })
363
363
  ]
364
364
  }),
365
- /* @__PURE__ */ J("div", {
365
+ /* @__PURE__ */ q("div", {
366
366
  className: "border-b",
367
- children: /* @__PURE__ */ J("nav", {
367
+ children: /* @__PURE__ */ q("nav", {
368
368
  className: "-mb-px flex gap-4 overflow-x-auto",
369
369
  role: "tablist",
370
370
  "aria-label": p("devportal.applicationSections", "Application sections"),
371
- children: Se.filter((e) => !((Z.appType === "NODE" || Z.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
371
+ children: Ce.filter((e) => !((Z.appType === "NODE" || Z.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
372
372
  let n = e.icon;
373
- return /* @__PURE__ */ Y("button", {
373
+ return /* @__PURE__ */ J("button", {
374
374
  id: `application-tab-${e.id}`,
375
375
  role: "tab",
376
- "aria-selected": w === e.id,
376
+ "aria-selected": C === e.id,
377
377
  "aria-controls": `application-panel-${e.id}`,
378
- onClick: () => T(e.id),
379
- className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", w === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
380
- children: [/* @__PURE__ */ J(n, { size: 16 }), e.label]
378
+ onClick: () => ne(e.id),
379
+ className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", C === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
380
+ children: [/* @__PURE__ */ q(n, { size: 16 }), e.label]
381
381
  }, e.id);
382
382
  })
383
383
  })
384
384
  }),
385
- /* @__PURE__ */ Y("div", {
385
+ /* @__PURE__ */ J("div", {
386
386
  className: "mt-6",
387
- id: `application-panel-${w}`,
387
+ id: `application-panel-${C}`,
388
388
  role: "tabpanel",
389
- "aria-labelledby": `application-tab-${w}`,
389
+ "aria-labelledby": `application-tab-${C}`,
390
390
  tabIndex: 0,
391
391
  children: [
392
- w === "overview" && /* @__PURE__ */ J(ke, { app: Z }),
393
- w === "permissions" && /* @__PURE__ */ J(We, { app: Z }),
394
- w === "webhooks" && /* @__PURE__ */ J(Ee, {
392
+ C === "overview" && /* @__PURE__ */ q(ke, { app: Z }),
393
+ C === "permissions" && /* @__PURE__ */ q(We, { app: Z }),
394
+ C === "webhooks" && /* @__PURE__ */ q(Ee, {
395
395
  appId: Z.id,
396
- onNavigate: X
396
+ onNavigate: Y
397
397
  }),
398
- w === "delegations" && /* @__PURE__ */ J(De, {
398
+ C === "delegations" && /* @__PURE__ */ q(De, {
399
399
  authAppId: Z.appId || void 0,
400
400
  appName: Z.name,
401
- onGrantDelegation: () => L(!0),
402
- onNavigate: X
401
+ onGrantDelegation: () => P(!0),
402
+ onNavigate: Y
403
403
  }),
404
- w === "analytics" && /* @__PURE__ */ J(Oe, { appId: Z.id }),
405
- w === "playground" && /* @__PURE__ */ J(Pe, { app: Z }),
406
- w === "store-listing" && /* @__PURE__ */ J(Ve, { app: Z })
404
+ C === "analytics" && /* @__PURE__ */ q(Oe, { appId: Z.id }),
405
+ C === "playground" && /* @__PURE__ */ q(Pe, { app: Z }),
406
+ C === "store-listing" && /* @__PURE__ */ q(Ve, { app: Z })
407
407
  ]
408
408
  }),
409
- /* @__PURE__ */ J(k, {
410
- open: E,
411
- onOpenChange: D,
412
- onConfirm: be,
409
+ /* @__PURE__ */ q(re, {
410
+ open: w,
411
+ onOpenChange: T,
412
+ onConfirm: xe,
413
413
  title: p("devportal.rotateAppSecret", "Rotate App Secret"),
414
414
  description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
415
415
  confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
416
416
  cancelLabel: p("devportal.cancel", "Cancel"),
417
417
  variant: "warning",
418
- loading: ue
418
+ loading: fe
419
419
  }),
420
- /* @__PURE__ */ J(k, {
421
- open: O,
422
- onOpenChange: j,
423
- onConfirm: xe,
420
+ /* @__PURE__ */ q(re, {
421
+ open: E,
422
+ onOpenChange: O,
423
+ onConfirm: Se,
424
424
  title: p("devportal.deactivateApplication", "Deactivate Application"),
425
425
  description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
426
426
  confirmLabel: p("devportal.deactivate", "Deactivate"),
427
427
  cancelLabel: p("devportal.cancel", "Cancel"),
428
428
  variant: "destructive",
429
- loading: H
429
+ loading: B
430
430
  }),
431
- /* @__PURE__ */ J(A, {
432
- open: P,
433
- onOpenChange: L,
431
+ /* @__PURE__ */ q(ie, {
432
+ open: j,
433
+ onOpenChange: P,
434
434
  appId: Z.appId || "",
435
435
  appName: Z.name,
436
436
  appScopes: Z.scopes?.map((e) => e.scope) ?? [],
437
437
  onSuccess: () => {
438
- L(!1);
438
+ P(!1);
439
439
  }
440
440
  })
441
441
  ]
442
- }) : /* @__PURE__ */ J(g, {
442
+ }) : /* @__PURE__ */ q(g, {
443
443
  title: p("devportal.notFound", "Not Found"),
444
444
  backLink: `${o}/apps`,
445
445
  backLabel: p("devportal.backToApplications", "Back to Applications"),
446
- children: /* @__PURE__ */ J(r, {
447
- icon: /* @__PURE__ */ J(ae, { size: 48 }),
446
+ children: /* @__PURE__ */ q(r, {
447
+ icon: /* @__PURE__ */ q(ce, { size: 48 }),
448
448
  title: p("devportal.applicationNotFound", "Application not found"),
449
449
  description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
450
450
  })
451
451
  });
452
452
  }, Ee = ({ appId: e, onNavigate: t }) => {
453
- let { t: n } = I(), r = (e, t) => {
453
+ let { t: n } = N(), r = (e, t) => {
454
454
  let r = n(e);
455
455
  return r === e ? t : r;
456
456
  }, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
457
- return a ? /* @__PURE__ */ J(we, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ J(Z, { message: o.message }) : /* @__PURE__ */ J(Ae, {
457
+ return a ? /* @__PURE__ */ q(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ q(Z, { message: o.message }) : /* @__PURE__ */ q(Ae, {
458
458
  appId: e,
459
- webhooks: (i?.webhooks ?? []).map(X),
459
+ webhooks: (i?.webhooks ?? []).map(Y),
460
460
  onNavigate: t
461
461
  });
462
462
  }, De = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
463
- let { t: o } = I(), s = (e, t) => {
463
+ let { t: o } = N(), s = (e, t) => {
464
464
  let n = o(e);
465
465
  return n === e ? t : n;
466
- }, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = F([]), [g, _] = F(!1), [v, y] = F(/* @__PURE__ */ new Set()), [b, x] = F(null), S = N(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(xe) : [], [e, c]), C = N(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = N(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), T = C.some((e) => v.has(e.id)) && !w, E = M((e, t) => {
466
+ }, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = M([]), [g, _] = M(!1), [v, y] = M(/* @__PURE__ */ new Set()), [b, ee] = M(null), x = A(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Se) : [], [e, c]), S = A(() => x.filter((e) => e.status === "ACTIVE"), [x]), te = A(() => S.filter((e) => v.has(e.id)), [S, v]), C = S.length > 0 && S.every((e) => v.has(e.id)), ne = S.some((e) => v.has(e.id)) && !C, w = k((e, t) => {
467
467
  y((n) => {
468
468
  let r = new Set(n);
469
469
  return t ? r.add(e) : r.delete(e), r;
470
470
  });
471
- }, []), D = M((e) => {
471
+ }, []), T = k((e) => {
472
472
  y((t) => {
473
473
  let n = new Set(t);
474
- return C.forEach((t) => {
474
+ return S.forEach((t) => {
475
475
  e ? n.add(t.id) : n.delete(t.id);
476
476
  }), n;
477
477
  });
478
- }, [C]), O = M(() => {
478
+ }, [S]), E = k(() => {
479
479
  y(/* @__PURE__ */ new Set());
480
- }, []), A = M(async (e) => {
480
+ }, []), ie = k(async (e) => {
481
481
  _(!0);
482
482
  try {
483
483
  let t = await Promise.allSettled(e.map((e) => p({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
484
- x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
484
+ ee(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
485
485
  let n = new Set(t);
486
486
  return e.forEach((e) => n.delete(e)), n;
487
487
  }), h([]), f();
@@ -489,38 +489,38 @@ var Se = [
489
489
  _(!1);
490
490
  }
491
491
  }, [p, f]);
492
- return e ? l ? /* @__PURE__ */ J(we, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ J(Z, { message: u.message }) : /* @__PURE__ */ Y(q, { children: [
493
- b && /* @__PURE__ */ J("div", {
492
+ return e ? l ? /* @__PURE__ */ q(X, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ q(Z, { message: u.message }) : /* @__PURE__ */ J(K, { children: [
493
+ b && /* @__PURE__ */ q("div", {
494
494
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
495
- children: /* @__PURE__ */ Y("div", {
495
+ children: /* @__PURE__ */ J("div", {
496
496
  className: "flex items-center justify-between gap-3",
497
- children: [/* @__PURE__ */ J("span", { children: b }), /* @__PURE__ */ J("button", {
498
- onClick: () => x(null),
497
+ children: [/* @__PURE__ */ q("span", { children: b }), /* @__PURE__ */ q("button", {
498
+ onClick: () => ee(null),
499
499
  className: "text-status-success-text hover:text-status-success-text",
500
500
  children: s("devportal.dismiss", "Dismiss")
501
501
  })]
502
502
  })
503
503
  }),
504
- /* @__PURE__ */ J(je, {
504
+ /* @__PURE__ */ q(je, {
505
505
  appName: t,
506
- delegations: S,
506
+ delegations: x,
507
507
  onGrantDelegation: n,
508
508
  onRevokeDelegation: (e) => h([e]),
509
509
  selectedDelegationIds: v,
510
- onToggleSelectDelegation: E,
511
- onToggleAllDelegations: D,
512
- onClearSelection: O,
513
- onRevokeSelected: () => h(ee.map((e) => e.id)),
514
- allVisibleSelected: w,
515
- partiallySelected: T
510
+ onToggleSelectDelegation: w,
511
+ onToggleAllDelegations: T,
512
+ onClearSelection: E,
513
+ onRevokeSelected: () => h(te.map((e) => e.id)),
514
+ allVisibleSelected: C,
515
+ partiallySelected: ne
516
516
  }),
517
- /* @__PURE__ */ J(k, {
517
+ /* @__PURE__ */ q(re, {
518
518
  open: m.length > 0,
519
519
  onOpenChange: (e) => {
520
520
  e || h([]);
521
521
  },
522
522
  onConfirm: () => {
523
- m.length > 0 && A(m);
523
+ m.length > 0 && ie(m);
524
524
  },
525
525
  title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
526
526
  description: m.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${m.length} selected delegations.`) : s("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
@@ -529,90 +529,90 @@ var Se = [
529
529
  variant: "destructive",
530
530
  loading: g
531
531
  })
532
- ] }) : /* @__PURE__ */ J(r, {
533
- icon: /* @__PURE__ */ J(U, { size: 32 }),
532
+ ] }) : /* @__PURE__ */ q(r, {
533
+ icon: /* @__PURE__ */ q(V, { size: 32 }),
534
534
  title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
535
535
  description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
536
- action: /* @__PURE__ */ Y("button", {
536
+ action: /* @__PURE__ */ J("button", {
537
537
  onClick: () => a("/oauth"),
538
538
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
539
- children: [/* @__PURE__ */ J(z, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
539
+ children: [/* @__PURE__ */ q(L, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
540
540
  })
541
541
  });
542
542
  }, Oe = ({ appId: e }) => {
543
- let { t } = I(), n = (e, n) => {
543
+ let { t } = N(), n = (e, n) => {
544
544
  let r = t(e);
545
545
  return r === e ? n : r;
546
- }, r = N(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
546
+ }, r = A(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
547
547
  applicationId: e,
548
548
  period: "daily",
549
- startDate: N(() => {
549
+ startDate: A(() => {
550
550
  let e = new Date(r);
551
551
  return e.setDate(e.getDate() - 30), e;
552
552
  }, [r]).toISOString(),
553
553
  endDate: r.toISOString()
554
554
  } });
555
- return a ? /* @__PURE__ */ J(we, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ J(Z, { message: s.message }) : /* @__PURE__ */ J(Me, { analytics: (i?.applicationAnalytics ?? []).map(be) });
555
+ return a ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ q(Z, { message: s.message }) : /* @__PURE__ */ q(Me, { analytics: (i?.applicationAnalytics ?? []).map(xe) });
556
556
  }, ke = ({ app: e }) => {
557
- let { t } = I(), n = (e, n) => {
557
+ let { t } = N(), n = (e, n) => {
558
558
  let r = t(e);
559
559
  return r === e ? n : r;
560
560
  };
561
- return /* @__PURE__ */ Y("div", {
561
+ return /* @__PURE__ */ J("div", {
562
562
  className: "grid gap-6 lg:grid-cols-3",
563
- children: [/* @__PURE__ */ Y("div", {
563
+ children: [/* @__PURE__ */ J("div", {
564
564
  className: "lg:col-span-2 space-y-6",
565
565
  children: [
566
- /* @__PURE__ */ Y("div", {
566
+ /* @__PURE__ */ J("div", {
567
567
  className: "grid gap-4 sm:grid-cols-4",
568
568
  children: [
569
- /* @__PURE__ */ J(Q, {
569
+ /* @__PURE__ */ q(Q, {
570
570
  label: n("devportal.totalInstalls", "Total Installs"),
571
571
  value: e.installCount.toLocaleString()
572
572
  }),
573
- /* @__PURE__ */ J(Q, {
573
+ /* @__PURE__ */ q(Q, {
574
574
  label: n("devportal.activeInstalls", "Active Installs"),
575
575
  value: e.activeInstallCount.toLocaleString()
576
576
  }),
577
- /* @__PURE__ */ J(Q, {
577
+ /* @__PURE__ */ q(Q, {
578
578
  label: n("devportal.averageRating", "Average Rating"),
579
579
  value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
580
580
  }),
581
- /* @__PURE__ */ J(Q, {
581
+ /* @__PURE__ */ q(Q, {
582
582
  label: n("devportal.reviews", "Reviews"),
583
583
  value: e.reviewCount.toString()
584
584
  })
585
585
  ]
586
586
  }),
587
- /* @__PURE__ */ J(_, {
587
+ /* @__PURE__ */ q(_, {
588
588
  title: n("devportal.description", "Description"),
589
- children: /* @__PURE__ */ J("div", {
589
+ children: /* @__PURE__ */ q("div", {
590
590
  className: "prose prose-sm max-w-none",
591
- children: /* @__PURE__ */ J("pre", {
591
+ children: /* @__PURE__ */ q("pre", {
592
592
  className: "whitespace-pre-wrap font-sans text-sm text-foreground bg-transparent p-0 m-0",
593
593
  children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
594
594
  })
595
595
  })
596
596
  }),
597
- /* @__PURE__ */ J(_, {
597
+ /* @__PURE__ */ q(_, {
598
598
  title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
599
- children: /* @__PURE__ */ Y("div", {
599
+ children: /* @__PURE__ */ J("div", {
600
600
  className: "space-y-3",
601
- children: [e.tags.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
601
+ children: [e.tags.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
602
602
  className: "text-xs text-muted-foreground mb-2",
603
603
  children: n("devportal.tags", "Tags")
604
- }), /* @__PURE__ */ J("div", {
604
+ }), /* @__PURE__ */ q("div", {
605
605
  className: "flex flex-wrap gap-2",
606
- children: e.tags.map((e) => /* @__PURE__ */ J("span", {
606
+ children: e.tags.map((e) => /* @__PURE__ */ q("span", {
607
607
  className: "rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary",
608
608
  children: e
609
609
  }, e))
610
- })] }), e.keywords.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
610
+ })] }), e.keywords.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
611
611
  className: "text-xs text-muted-foreground mb-2",
612
612
  children: n("devportal.keywords", "Keywords")
613
- }), /* @__PURE__ */ J("div", {
613
+ }), /* @__PURE__ */ q("div", {
614
614
  className: "flex flex-wrap gap-2",
615
- children: e.keywords.map((e) => /* @__PURE__ */ J("span", {
615
+ children: e.keywords.map((e) => /* @__PURE__ */ q("span", {
616
616
  className: "rounded-full bg-muted px-3 py-1 text-xs",
617
617
  children: e
618
618
  }, e))
@@ -620,14 +620,14 @@ var Se = [
620
620
  })
621
621
  })
622
622
  ]
623
- }), /* @__PURE__ */ Y("div", {
623
+ }), /* @__PURE__ */ J("div", {
624
624
  className: "space-y-6",
625
- children: [/* @__PURE__ */ J(_, {
625
+ children: [/* @__PURE__ */ q(_, {
626
626
  title: n("devportal.details", "Details"),
627
- children: /* @__PURE__ */ J(T, { items: [
627
+ children: /* @__PURE__ */ q(ne, { items: [
628
628
  {
629
629
  label: n("devportal.appId", "App ID"),
630
- value: /* @__PURE__ */ J("code", {
630
+ value: /* @__PURE__ */ q("code", {
631
631
  className: "text-xs",
632
632
  children: e.id
633
633
  })
@@ -657,32 +657,32 @@ var Se = [
657
657
  value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
658
658
  }
659
659
  ] })
660
- }), /* @__PURE__ */ J(_, {
660
+ }), /* @__PURE__ */ q(_, {
661
661
  title: n("devportal.links", "Links"),
662
- children: /* @__PURE__ */ Y("div", {
662
+ children: /* @__PURE__ */ J("div", {
663
663
  className: "space-y-2",
664
664
  children: [
665
- e.websiteUrl && /* @__PURE__ */ J($, {
665
+ e.websiteUrl && /* @__PURE__ */ q($, {
666
666
  label: n("devportal.website", "Website"),
667
667
  url: e.websiteUrl
668
668
  }),
669
- e.documentationUrl && /* @__PURE__ */ J($, {
669
+ e.documentationUrl && /* @__PURE__ */ q($, {
670
670
  label: n("devportal.documentation", "Documentation"),
671
671
  url: e.documentationUrl
672
672
  }),
673
- e.supportUrl && /* @__PURE__ */ J($, {
673
+ e.supportUrl && /* @__PURE__ */ q($, {
674
674
  label: n("devportal.support", "Support"),
675
675
  url: e.supportUrl
676
676
  }),
677
- e.githubUrl && /* @__PURE__ */ J($, {
677
+ e.githubUrl && /* @__PURE__ */ q($, {
678
678
  label: n("devportal.github", "GitHub"),
679
679
  url: e.githubUrl
680
680
  }),
681
- e.privacyPolicyUrl && /* @__PURE__ */ J($, {
681
+ e.privacyPolicyUrl && /* @__PURE__ */ q($, {
682
682
  label: n("devportal.privacyPolicy", "Privacy Policy"),
683
683
  url: e.privacyPolicyUrl
684
684
  }),
685
- e.termsOfServiceUrl && /* @__PURE__ */ J($, {
685
+ e.termsOfServiceUrl && /* @__PURE__ */ q($, {
686
686
  label: n("devportal.termsOfService", "Terms of Service"),
687
687
  url: e.termsOfServiceUrl
688
688
  })
@@ -692,15 +692,15 @@ var Se = [
692
692
  })]
693
693
  });
694
694
  }, Ae = ({ appId: e, webhooks: t, onNavigate: n }) => {
695
- let { t: i } = I(), a = (e, t) => {
695
+ let { t: i } = N(), a = (e, t) => {
696
696
  let n = i(e);
697
697
  return n === e ? t : n;
698
698
  };
699
- return /* @__PURE__ */ Y("div", {
699
+ return /* @__PURE__ */ J("div", {
700
700
  className: "space-y-6",
701
- children: [/* @__PURE__ */ Y("div", {
701
+ children: [/* @__PURE__ */ J("div", {
702
702
  className: "flex items-center justify-between",
703
- children: [/* @__PURE__ */ Y("p", {
703
+ children: [/* @__PURE__ */ J("p", {
704
704
  className: "text-sm text-muted-foreground",
705
705
  children: [
706
706
  t.length,
@@ -709,81 +709,81 @@ var Se = [
709
709
  " ",
710
710
  a("devportal.configured", "configured")
711
711
  ]
712
- }), /* @__PURE__ */ Y("button", {
712
+ }), /* @__PURE__ */ J("button", {
713
713
  onClick: () => n(`/apps/${e}/webhooks/new`),
714
714
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
715
- children: [/* @__PURE__ */ J(H, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
715
+ children: [/* @__PURE__ */ q(B, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
716
716
  })]
717
- }), t.length > 0 ? /* @__PURE__ */ J("div", {
717
+ }), t.length > 0 ? /* @__PURE__ */ q("div", {
718
718
  className: "space-y-4",
719
- children: t.map((t) => /* @__PURE__ */ Y("div", {
719
+ children: t.map((t) => /* @__PURE__ */ J("div", {
720
720
  className: "rounded-lg border bg-card p-4 space-y-4",
721
721
  children: [
722
- /* @__PURE__ */ Y("div", {
722
+ /* @__PURE__ */ J("div", {
723
723
  className: "flex items-start justify-between",
724
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
724
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
725
725
  className: "flex items-center gap-2",
726
- children: [/* @__PURE__ */ J("h3", {
726
+ children: [/* @__PURE__ */ q("h3", {
727
727
  className: "font-medium",
728
728
  children: t.name
729
- }), /* @__PURE__ */ J(b, {
729
+ }), /* @__PURE__ */ q(b, {
730
730
  status: t.status,
731
731
  type: "webhook"
732
732
  })]
733
- }), t.description && /* @__PURE__ */ J("p", {
733
+ }), t.description && /* @__PURE__ */ q("p", {
734
734
  className: "text-sm text-muted-foreground mt-1",
735
735
  children: t.description
736
- })] }), /* @__PURE__ */ J("button", {
736
+ })] }), /* @__PURE__ */ q("button", {
737
737
  onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
738
738
  className: "rounded-md p-1 hover:bg-muted",
739
- children: /* @__PURE__ */ J(de, { size: 20 })
739
+ children: /* @__PURE__ */ q(pe, { size: 20 })
740
740
  })]
741
741
  }),
742
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
742
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
743
743
  className: "text-xs text-muted-foreground mb-1",
744
744
  children: a("devportal.endpointUrl", "Endpoint URL")
745
- }), /* @__PURE__ */ J("code", {
745
+ }), /* @__PURE__ */ q("code", {
746
746
  className: "text-sm bg-muted px-2 py-1 rounded block truncate",
747
747
  children: t.url
748
748
  })] }),
749
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
749
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
750
750
  className: "text-xs text-muted-foreground mb-2",
751
751
  children: a("devportal.events", "Events")
752
- }), /* @__PURE__ */ J("div", {
752
+ }), /* @__PURE__ */ q("div", {
753
753
  className: "flex flex-wrap gap-2",
754
- children: t.events.map((e) => /* @__PURE__ */ J("span", {
754
+ children: t.events.map((e) => /* @__PURE__ */ q("span", {
755
755
  className: "rounded-full bg-muted px-2 py-0.5 text-xs",
756
756
  children: e
757
757
  }, e))
758
758
  })] }),
759
- /* @__PURE__ */ Y("div", {
759
+ /* @__PURE__ */ J("div", {
760
760
  className: "grid gap-4 sm:grid-cols-4 text-sm",
761
761
  children: [
762
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
762
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
763
763
  className: "text-xs text-muted-foreground",
764
764
  children: a("devportal.success", "Success")
765
- }), /* @__PURE__ */ J("p", {
765
+ }), /* @__PURE__ */ q("p", {
766
766
  className: "font-medium text-status-success-text",
767
767
  children: t.successCount.toLocaleString()
768
768
  })] }),
769
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
769
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
770
770
  className: "text-xs text-muted-foreground",
771
771
  children: a("devportal.failed", "Failed")
772
- }), /* @__PURE__ */ J("p", {
772
+ }), /* @__PURE__ */ q("p", {
773
773
  className: "font-medium text-status-error-text",
774
774
  children: t.failureCount.toLocaleString()
775
775
  })] }),
776
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
776
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
777
777
  className: "text-xs text-muted-foreground",
778
778
  children: a("devportal.successRate", "Success Rate")
779
- }), /* @__PURE__ */ Y("p", {
779
+ }), /* @__PURE__ */ J("p", {
780
780
  className: "font-medium",
781
781
  children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
782
782
  })] }),
783
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
783
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
784
784
  className: "text-xs text-muted-foreground",
785
785
  children: a("devportal.lastTriggered", "Last Triggered")
786
- }), /* @__PURE__ */ J("p", {
786
+ }), /* @__PURE__ */ q("p", {
787
787
  className: "font-medium",
788
788
  children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
789
789
  })] })
@@ -791,28 +791,28 @@ var Se = [
791
791
  })
792
792
  ]
793
793
  }, t.id))
794
- }) : /* @__PURE__ */ J(r, {
795
- icon: /* @__PURE__ */ J(ge, { size: 32 }),
794
+ }) : /* @__PURE__ */ q(r, {
795
+ icon: /* @__PURE__ */ q(_e, { size: 32 }),
796
796
  title: a("devportal.noWebhooks", "No webhooks"),
797
797
  description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
798
- action: /* @__PURE__ */ Y("button", {
798
+ action: /* @__PURE__ */ J("button", {
799
799
  onClick: () => n(`/apps/${e}/webhooks/new`),
800
800
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
801
- children: [/* @__PURE__ */ J(H, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
801
+ children: [/* @__PURE__ */ q(B, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
802
802
  })
803
803
  })]
804
804
  });
805
805
  }, je = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
806
- let { t: p } = I(), m = (e, t) => {
806
+ let { t: p } = N(), m = (e, t) => {
807
807
  let n = p(e);
808
808
  return n === e ? t : n;
809
809
  }, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
810
- return /* @__PURE__ */ Y("div", {
810
+ return /* @__PURE__ */ J("div", {
811
811
  className: "space-y-6",
812
812
  children: [
813
- /* @__PURE__ */ Y("div", {
813
+ /* @__PURE__ */ J("div", {
814
814
  className: "flex items-center justify-between",
815
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
815
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
816
816
  className: "text-sm text-muted-foreground",
817
817
  children: [
818
818
  n.length,
@@ -823,7 +823,7 @@ var Se = [
823
823
  " ",
824
824
  e
825
825
  ]
826
- }), h.length > 0 && /* @__PURE__ */ Y("p", {
826
+ }), h.length > 0 && /* @__PURE__ */ J("p", {
827
827
  className: "text-xs text-muted-foreground mt-0.5",
828
828
  children: [
829
829
  h.length,
@@ -835,44 +835,44 @@ var Se = [
835
835
  " ",
836
836
  m("devportal.revokedExpired", "revoked/expired")
837
837
  ]
838
- })] }), /* @__PURE__ */ Y("button", {
838
+ })] }), /* @__PURE__ */ J("button", {
839
839
  onClick: i,
840
840
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
841
- children: [/* @__PURE__ */ J(H, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
841
+ children: [/* @__PURE__ */ q(B, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
842
842
  })]
843
843
  }),
844
- h.length > 0 && /* @__PURE__ */ J("div", {
844
+ h.length > 0 && /* @__PURE__ */ q("div", {
845
845
  className: "rounded-lg border bg-card p-4",
846
- children: /* @__PURE__ */ Y("div", {
846
+ children: /* @__PURE__ */ J("div", {
847
847
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
848
- children: [/* @__PURE__ */ Y("div", {
848
+ children: [/* @__PURE__ */ J("div", {
849
849
  className: "flex flex-wrap items-center gap-3",
850
- children: [/* @__PURE__ */ Y("div", {
850
+ children: [/* @__PURE__ */ J("div", {
851
851
  className: "flex items-center gap-2",
852
- children: [/* @__PURE__ */ J(S, {
852
+ children: [/* @__PURE__ */ q(x, {
853
853
  checked: d,
854
854
  indeterminate: f,
855
855
  onChange: c,
856
856
  ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
857
- }), /* @__PURE__ */ J("span", {
857
+ }), /* @__PURE__ */ q("span", {
858
858
  className: "text-sm font-medium",
859
859
  children: m("devportal.selectAllActive", "Select all active")
860
860
  })]
861
- }), o.size > 0 && /* @__PURE__ */ J("button", {
861
+ }), o.size > 0 && /* @__PURE__ */ q("button", {
862
862
  onClick: l,
863
863
  className: "text-sm text-muted-foreground hover:text-foreground",
864
864
  children: m("devportal.clearSelection", "Clear selection")
865
865
  })]
866
- }), /* @__PURE__ */ Y("div", {
866
+ }), /* @__PURE__ */ J("div", {
867
867
  className: "flex flex-wrap items-center gap-2",
868
- children: [/* @__PURE__ */ Y("span", {
868
+ children: [/* @__PURE__ */ J("span", {
869
869
  className: "rounded-full bg-muted px-3 py-1 text-sm font-medium text-muted-foreground",
870
870
  children: [
871
871
  o.size,
872
872
  " ",
873
873
  m("devportal.selected", "selected")
874
874
  ]
875
- }), /* @__PURE__ */ Y("button", {
875
+ }), /* @__PURE__ */ J("button", {
876
876
  onClick: u,
877
877
  disabled: o.size === 0,
878
878
  className: "rounded-md border border-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
@@ -881,33 +881,33 @@ var Se = [
881
881
  })]
882
882
  })
883
883
  }),
884
- n.length > 0 ? /* @__PURE__ */ J("div", {
884
+ n.length > 0 ? /* @__PURE__ */ q("div", {
885
885
  className: "space-y-4",
886
- children: n.map((e) => /* @__PURE__ */ Y("div", {
886
+ children: n.map((e) => /* @__PURE__ */ J("div", {
887
887
  className: "rounded-lg border bg-card p-4 space-y-4",
888
888
  children: [
889
- /* @__PURE__ */ Y("div", {
889
+ /* @__PURE__ */ J("div", {
890
890
  className: "flex items-start justify-between",
891
- children: [/* @__PURE__ */ Y("div", {
891
+ children: [/* @__PURE__ */ J("div", {
892
892
  className: "flex items-start gap-3",
893
- children: [e.status === "ACTIVE" && /* @__PURE__ */ J("div", {
893
+ children: [e.status === "ACTIVE" && /* @__PURE__ */ q("div", {
894
894
  onClick: (e) => e.stopPropagation(),
895
- children: /* @__PURE__ */ J(S, {
895
+ children: /* @__PURE__ */ q(x, {
896
896
  checked: o.has(e.id),
897
897
  onChange: (t) => s(e.id, t),
898
898
  ariaLabel: `Select delegation ${e.id}`,
899
899
  className: "mt-1"
900
900
  })
901
- }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
901
+ }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
902
902
  className: "flex items-center gap-2",
903
- children: [/* @__PURE__ */ Y("h3", {
903
+ children: [/* @__PURE__ */ J("h3", {
904
904
  className: "font-medium",
905
905
  children: ["Delegation #", e.id.slice(0, 8)]
906
- }), /* @__PURE__ */ J("span", {
907
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", Ce[e.status]),
906
+ }), /* @__PURE__ */ q("span", {
907
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", we[e.status]),
908
908
  children: e.status
909
909
  })]
910
- }), /* @__PURE__ */ Y("p", {
910
+ }), /* @__PURE__ */ J("p", {
911
911
  className: "text-sm text-muted-foreground mt-1",
912
912
  children: [
913
913
  m("devportal.granted", "Granted"),
@@ -919,55 +919,55 @@ var Se = [
919
919
  e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
920
920
  ]
921
921
  })] })]
922
- }), e.status === "ACTIVE" && /* @__PURE__ */ Y("button", {
922
+ }), e.status === "ACTIVE" && /* @__PURE__ */ J("button", {
923
923
  onClick: () => a(e.id),
924
924
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
925
- children: [/* @__PURE__ */ J(_e, { size: 14 }), m("devportal.revoke", "Revoke")]
925
+ children: [/* @__PURE__ */ q(ve, { size: 14 }), m("devportal.revoke", "Revoke")]
926
926
  })]
927
927
  }),
928
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
928
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
929
929
  className: "text-xs text-muted-foreground mb-2",
930
930
  children: m("devportal.grantedScopes", "Granted Scopes")
931
- }), /* @__PURE__ */ J("div", {
931
+ }), /* @__PURE__ */ q("div", {
932
932
  className: "flex flex-wrap gap-2",
933
- children: e.scopes.map((e) => /* @__PURE__ */ J("span", {
933
+ children: e.scopes.map((e) => /* @__PURE__ */ q("span", {
934
934
  className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
935
935
  children: e
936
936
  }, e))
937
937
  })] }),
938
- e.workspaceIds.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
938
+ e.workspaceIds.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
939
939
  className: "text-xs text-muted-foreground mb-2",
940
940
  children: m("devportal.workspaceScope", "Workspace Scope")
941
- }), /* @__PURE__ */ J("div", {
941
+ }), /* @__PURE__ */ q("div", {
942
942
  className: "flex flex-wrap gap-2",
943
- children: e.workspaceIds.map((e) => /* @__PURE__ */ J("code", {
943
+ children: e.workspaceIds.map((e) => /* @__PURE__ */ q("code", {
944
944
  className: "rounded bg-muted px-2 py-0.5 text-xs",
945
945
  children: e
946
946
  }, e))
947
947
  })] }),
948
- /* @__PURE__ */ Y("div", {
948
+ /* @__PURE__ */ J("div", {
949
949
  className: "flex items-center gap-4 text-xs text-muted-foreground",
950
950
  children: [
951
- e.expiresAt && /* @__PURE__ */ Y("span", {
951
+ e.expiresAt && /* @__PURE__ */ J("span", {
952
952
  className: "flex items-center gap-1",
953
953
  children: [
954
- /* @__PURE__ */ J(oe, { size: 12 }),
954
+ /* @__PURE__ */ q(I, { size: 12 }),
955
955
  m("devportal.expires", "Expires"),
956
956
  " ",
957
957
  new Date(e.expiresAt).toLocaleDateString()
958
958
  ]
959
959
  }),
960
- !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ Y("span", {
960
+ !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ J("span", {
961
961
  className: "flex items-center gap-1",
962
- children: [/* @__PURE__ */ J(R, {
962
+ children: [/* @__PURE__ */ q(F, {
963
963
  size: 12,
964
964
  className: "text-status-success-text"
965
965
  }), m("devportal.noExpiration", "No expiration")]
966
966
  }),
967
- e.revokedAt && /* @__PURE__ */ Y("span", {
967
+ e.revokedAt && /* @__PURE__ */ J("span", {
968
968
  className: "flex items-center gap-1",
969
969
  children: [
970
- /* @__PURE__ */ J(_e, {
970
+ /* @__PURE__ */ q(ve, {
971
971
  size: 12,
972
972
  className: "text-status-error-text"
973
973
  }),
@@ -980,52 +980,52 @@ var Se = [
980
980
  })
981
981
  ]
982
982
  }, e.id))
983
- }) : /* @__PURE__ */ J(r, {
984
- icon: /* @__PURE__ */ J(G, { size: 32 }),
983
+ }) : /* @__PURE__ */ q(r, {
984
+ icon: /* @__PURE__ */ q(W, { size: 32 }),
985
985
  title: m("devportal.noDelegations", "No delegations"),
986
986
  description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
987
- action: /* @__PURE__ */ Y("button", {
987
+ action: /* @__PURE__ */ J("button", {
988
988
  onClick: i,
989
989
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
990
- children: [/* @__PURE__ */ J(H, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
990
+ children: [/* @__PURE__ */ q(B, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
991
991
  })
992
992
  })
993
993
  ]
994
994
  });
995
995
  }, Me = ({ analytics: e }) => {
996
- let { t } = I(), n = (e, n) => {
996
+ let { t } = N(), n = (e, n) => {
997
997
  let r = t(e);
998
998
  return r === e ? n : r;
999
999
  }, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
1000
- return /* @__PURE__ */ Y("div", {
1000
+ return /* @__PURE__ */ J("div", {
1001
1001
  className: "space-y-6",
1002
- children: [/* @__PURE__ */ Y("div", {
1002
+ children: [/* @__PURE__ */ J("div", {
1003
1003
  className: "grid gap-4 sm:grid-cols-4",
1004
1004
  children: [
1005
- /* @__PURE__ */ J(Q, {
1005
+ /* @__PURE__ */ q(Q, {
1006
1006
  label: n("devportal.activeUsers", "Active Users"),
1007
1007
  value: i?.activeUsers.toLocaleString() || "0",
1008
1008
  trend: a ? o(i.activeUsers, a.activeUsers) : void 0
1009
1009
  }),
1010
- /* @__PURE__ */ J(Q, {
1010
+ /* @__PURE__ */ q(Q, {
1011
1011
  label: n("devportal.apiCalls", "API Calls"),
1012
1012
  value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
1013
1013
  trend: a ? o(i.apiCalls, a.apiCalls) : void 0
1014
1014
  }),
1015
- /* @__PURE__ */ J(Q, {
1015
+ /* @__PURE__ */ q(Q, {
1016
1016
  label: n("devportal.avgResponseTime", "Avg Response Time"),
1017
1017
  value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
1018
1018
  trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
1019
1019
  }),
1020
- /* @__PURE__ */ J(Q, {
1020
+ /* @__PURE__ */ q(Q, {
1021
1021
  label: n("devportal.errorRate", "Error Rate"),
1022
1022
  value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
1023
1023
  trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
1024
1024
  })
1025
1025
  ]
1026
- }), /* @__PURE__ */ J(_, {
1026
+ }), /* @__PURE__ */ q(_, {
1027
1027
  title: n("devportal.dailyBreakdown", "Daily Breakdown"),
1028
- children: e.length > 0 ? /* @__PURE__ */ J(w, {
1028
+ children: e.length > 0 ? /* @__PURE__ */ q(C, {
1029
1029
  data: e,
1030
1030
  keyField: "id",
1031
1031
  columns: [
@@ -1065,18 +1065,18 @@ var Se = [
1065
1065
  render: (e) => e.sessions.toLocaleString()
1066
1066
  }
1067
1067
  ]
1068
- }) : /* @__PURE__ */ J(r, {
1069
- icon: /* @__PURE__ */ J(L, { size: 32 }),
1068
+ }) : /* @__PURE__ */ q(r, {
1069
+ icon: /* @__PURE__ */ q(P, { size: 32 }),
1070
1070
  title: n("devportal.noAnalyticsData", "No analytics data"),
1071
1071
  description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
1072
1072
  })
1073
1073
  })]
1074
1074
  });
1075
1075
  }, Ne = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Pe = ({ app: t }) => {
1076
- let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = I(), o = (e, t) => {
1076
+ let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = N(), o = (e, t) => {
1077
1077
  let n = a(e);
1078
1078
  return n === e ? t : n;
1079
- }, [s, c] = F(Ne), [l, u] = F("{}"), [d, f] = F(""), [p, m] = F(!1), [h, g] = F(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = F(i || ""), [y, b] = F(!1), x = M(async () => {
1079
+ }, [s, c] = M(Ne), [l, u] = M("{}"), [d, f] = M(""), [p, m] = M(!1), [h, g] = M(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = M(i || ""), [y, b] = M(!1), ee = k(async () => {
1080
1080
  m(!0), f("");
1081
1081
  try {
1082
1082
  let e = {};
@@ -1107,24 +1107,24 @@ var Se = [
1107
1107
  l,
1108
1108
  h,
1109
1109
  _
1110
- ]), S = M(() => {
1110
+ ]), x = k(() => {
1111
1111
  i && v(i), b(!0);
1112
1112
  }, [i]);
1113
- return /* @__PURE__ */ Y("div", {
1113
+ return /* @__PURE__ */ J("div", {
1114
1114
  className: "space-y-4",
1115
1115
  children: [
1116
- /* @__PURE__ */ Y("div", {
1116
+ /* @__PURE__ */ J("div", {
1117
1117
  className: "flex items-center justify-between",
1118
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("h3", {
1118
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("h3", {
1119
1119
  className: "text-lg font-semibold",
1120
1120
  children: o("devportal.apiPlayground", "API Playground")
1121
- }), /* @__PURE__ */ Y("p", {
1121
+ }), /* @__PURE__ */ J("p", {
1122
1122
  className: "text-sm text-muted-foreground",
1123
1123
  children: [
1124
1124
  o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
1125
1125
  " ",
1126
- /* @__PURE__ */ J("strong", { children: t.name }),
1127
- t.appId && /* @__PURE__ */ Y("span", {
1126
+ /* @__PURE__ */ q("strong", { children: t.name }),
1127
+ t.appId && /* @__PURE__ */ J("span", {
1128
1128
  className: "ml-1 text-xs text-muted-foreground",
1129
1129
  children: [
1130
1130
  "(OAuth App: ",
@@ -1133,39 +1133,39 @@ var Se = [
1133
1133
  ]
1134
1134
  })
1135
1135
  ]
1136
- })] }), /* @__PURE__ */ Y("button", {
1137
- onClick: S,
1136
+ })] }), /* @__PURE__ */ J("button", {
1137
+ onClick: x,
1138
1138
  className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
1139
- children: [/* @__PURE__ */ J(ue, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1139
+ children: [/* @__PURE__ */ q(fe, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1140
1140
  })]
1141
1141
  }),
1142
- y && /* @__PURE__ */ Y("div", {
1142
+ y && /* @__PURE__ */ J("div", {
1143
1143
  className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
1144
1144
  children: [
1145
- /* @__PURE__ */ J("p", {
1145
+ /* @__PURE__ */ q("p", {
1146
1146
  className: "font-medium text-status-info-text",
1147
1147
  children: o("devportal.authenticationGuide", "Authentication Guide")
1148
1148
  }),
1149
- /* @__PURE__ */ Y("p", {
1149
+ /* @__PURE__ */ J("p", {
1150
1150
  className: "text-status-info-text",
1151
1151
  children: [
1152
1152
  o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
1153
1153
  " ",
1154
- /* @__PURE__ */ J("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1154
+ /* @__PURE__ */ q("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1155
1155
  " ",
1156
1156
  o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
1157
1157
  ]
1158
1158
  }),
1159
- /* @__PURE__ */ J("pre", {
1159
+ /* @__PURE__ */ q("pre", {
1160
1160
  className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
1161
1161
  children: "mutation {\n authenticateApp(input: {\n clientId: \"<your-client-id>\"\n clientSecret: \"<your-client-secret>\"\n scopes: []\n }) {\n accessToken\n tokenType\n expiresIn\n }\n}"
1162
1162
  }),
1163
- /* @__PURE__ */ Y("p", {
1163
+ /* @__PURE__ */ J("p", {
1164
1164
  className: "text-status-info-text",
1165
1165
  children: [
1166
1166
  o("devportal.useReturnedAccessToken", "Use the returned"),
1167
1167
  " ",
1168
- /* @__PURE__ */ J("code", {
1168
+ /* @__PURE__ */ q("code", {
1169
1169
  className: "bg-status-info-bg-subtle px-1 rounded",
1170
1170
  children: "accessToken"
1171
1171
  }),
@@ -1173,129 +1173,129 @@ var Se = [
1173
1173
  o("devportal.asBearerToken", "as the Bearer token below.")
1174
1174
  ]
1175
1175
  }),
1176
- /* @__PURE__ */ J("button", {
1176
+ /* @__PURE__ */ q("button", {
1177
1177
  onClick: () => b(!1),
1178
1178
  className: "text-xs text-accent-blue hover:underline",
1179
1179
  children: o("devportal.dismiss", "Dismiss")
1180
1180
  })
1181
1181
  ]
1182
1182
  }),
1183
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1183
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1184
1184
  className: "block text-sm font-medium mb-1",
1185
1185
  children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
1186
- }), /* @__PURE__ */ Y("div", {
1186
+ }), /* @__PURE__ */ J("div", {
1187
1187
  className: "flex gap-2",
1188
- children: [/* @__PURE__ */ J("input", {
1188
+ children: [/* @__PURE__ */ q("input", {
1189
1189
  type: "text",
1190
1190
  value: h,
1191
1191
  onChange: (e) => g(e.target.value),
1192
1192
  className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-background"
1193
- }), /* @__PURE__ */ Y("select", {
1193
+ }), /* @__PURE__ */ J("select", {
1194
1194
  onChange: (e) => g(e.target.value),
1195
1195
  className: "rounded-md border px-3 py-2 text-sm bg-background",
1196
1196
  value: h,
1197
- children: [/* @__PURE__ */ J("option", {
1197
+ children: [/* @__PURE__ */ q("option", {
1198
1198
  value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
1199
1199
  children: o("devportal.globalGateway", "Global Gateway")
1200
- }), /* @__PURE__ */ J("option", {
1200
+ }), /* @__PURE__ */ q("option", {
1201
1201
  value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
1202
1202
  children: o("devportal.workspaceGateway", "Workspace Gateway")
1203
1203
  })]
1204
1204
  })]
1205
1205
  })] }),
1206
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1206
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1207
1207
  className: "block text-sm font-medium mb-1",
1208
1208
  children: o("devportal.bearerToken", "Bearer Token")
1209
- }), /* @__PURE__ */ J("input", {
1209
+ }), /* @__PURE__ */ q("input", {
1210
1210
  type: "password",
1211
1211
  value: _,
1212
1212
  onChange: (e) => v(e.target.value),
1213
1213
  placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
1214
1214
  className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-background"
1215
1215
  })] }),
1216
- /* @__PURE__ */ Y("div", {
1216
+ /* @__PURE__ */ J("div", {
1217
1217
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
1218
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1218
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1219
1219
  className: "block text-sm font-medium mb-1",
1220
1220
  children: o("devportal.query", "Query")
1221
- }), /* @__PURE__ */ J("textarea", {
1221
+ }), /* @__PURE__ */ q("textarea", {
1222
1222
  value: s,
1223
1223
  onChange: (e) => c(e.target.value),
1224
1224
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1225
1225
  spellCheck: !1
1226
- })] }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1226
+ })] }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1227
1227
  className: "block text-sm font-medium mb-1",
1228
1228
  children: o("devportal.variablesJson", "Variables (JSON)")
1229
- }), /* @__PURE__ */ J("textarea", {
1229
+ }), /* @__PURE__ */ q("textarea", {
1230
1230
  value: l,
1231
1231
  onChange: (e) => u(e.target.value),
1232
1232
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1233
1233
  spellCheck: !1
1234
1234
  })] })]
1235
1235
  }),
1236
- /* @__PURE__ */ Y("button", {
1237
- onClick: x,
1236
+ /* @__PURE__ */ J("button", {
1237
+ onClick: ee,
1238
1238
  disabled: p,
1239
1239
  className: "flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
1240
- children: [p ? /* @__PURE__ */ J(V, {
1240
+ children: [p ? /* @__PURE__ */ q(z, {
1241
1241
  size: 16,
1242
1242
  className: "animate-spin"
1243
- }) : /* @__PURE__ */ J(z, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
1243
+ }) : /* @__PURE__ */ q(L, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
1244
1244
  }),
1245
- d && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1245
+ d && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1246
1246
  className: "block text-sm font-medium mb-1",
1247
1247
  children: o("devportal.response", "Response")
1248
- }), /* @__PURE__ */ J("pre", {
1248
+ }), /* @__PURE__ */ q("pre", {
1249
1249
  className: "w-full max-h-96 overflow-auto rounded-md border bg-muted p-4 text-xs font-mono",
1250
1250
  children: d
1251
1251
  })] })
1252
1252
  ]
1253
1253
  });
1254
1254
  }, Fe = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
1255
- let d = P(null), f = M(async (e) => {
1255
+ let d = j(null), f = k(async (e) => {
1256
1256
  try {
1257
1257
  r((await s(e)).downloadUrl);
1258
1258
  } catch {}
1259
1259
  }, [s, r]);
1260
- return /* @__PURE__ */ Y("div", {
1260
+ return /* @__PURE__ */ J("div", {
1261
1261
  className: "space-y-1.5",
1262
1262
  children: [
1263
- /* @__PURE__ */ J("label", {
1263
+ /* @__PURE__ */ q("label", {
1264
1264
  className: "text-sm font-medium",
1265
1265
  children: e
1266
1266
  }),
1267
- /* @__PURE__ */ Y("div", {
1267
+ /* @__PURE__ */ J("div", {
1268
1268
  className: "flex gap-3 items-start",
1269
- children: [/* @__PURE__ */ Y("div", {
1269
+ children: [/* @__PURE__ */ J("div", {
1270
1270
  className: t("relative shrink-0 w-20 rounded-lg border border-border bg-bg-sunken overflow-hidden flex items-center justify-center", o),
1271
- children: [n ? /* @__PURE__ */ J("img", {
1271
+ children: [n ? /* @__PURE__ */ q("img", {
1272
1272
  src: n,
1273
1273
  alt: e,
1274
1274
  className: "w-full h-full object-cover"
1275
- }) : /* @__PURE__ */ J(W, {
1275
+ }) : /* @__PURE__ */ q(U, {
1276
1276
  size: 18,
1277
1277
  className: "text-text-secondary opacity-40"
1278
- }), c && /* @__PURE__ */ Y("div", {
1278
+ }), c && /* @__PURE__ */ J("div", {
1279
1279
  className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
1280
- children: [/* @__PURE__ */ J(V, {
1280
+ children: [/* @__PURE__ */ q(z, {
1281
1281
  size: 14,
1282
1282
  className: "animate-spin text-white"
1283
- }), /* @__PURE__ */ Y("span", {
1283
+ }), /* @__PURE__ */ J("span", {
1284
1284
  className: "text-white text-xs",
1285
1285
  children: [l, "%"]
1286
1286
  })]
1287
1287
  })]
1288
- }), /* @__PURE__ */ Y("div", {
1288
+ }), /* @__PURE__ */ J("div", {
1289
1289
  className: "flex-1 space-y-1.5",
1290
1290
  children: [
1291
- /* @__PURE__ */ J("input", {
1291
+ /* @__PURE__ */ q("input", {
1292
1292
  type: "url",
1293
1293
  value: n,
1294
1294
  onChange: (e) => r(e.target.value),
1295
1295
  placeholder: "https://...",
1296
1296
  className: "w-full rounded-md border border-border bg-bg-input px-3 py-1.5 text-sm placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-primary/30"
1297
1297
  }),
1298
- /* @__PURE__ */ J("input", {
1298
+ /* @__PURE__ */ q("input", {
1299
1299
  ref: d,
1300
1300
  type: "file",
1301
1301
  accept: a,
@@ -1305,28 +1305,28 @@ var Se = [
1305
1305
  t && f(t), e.target.value = "";
1306
1306
  }
1307
1307
  }),
1308
- /* @__PURE__ */ Y("button", {
1308
+ /* @__PURE__ */ J("button", {
1309
1309
  type: "button",
1310
1310
  disabled: c,
1311
1311
  onClick: () => d.current?.click(),
1312
1312
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors disabled:opacity-50",
1313
- children: [/* @__PURE__ */ J(W, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
1313
+ children: [/* @__PURE__ */ q(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
1314
1314
  }),
1315
- u && /* @__PURE__ */ J("p", {
1315
+ u && /* @__PURE__ */ q("p", {
1316
1316
  className: "text-xs text-status-error-text",
1317
1317
  children: u
1318
1318
  })
1319
1319
  ]
1320
1320
  })]
1321
1321
  }),
1322
- i && /* @__PURE__ */ J("p", {
1322
+ i && /* @__PURE__ */ q("p", {
1323
1323
  className: "text-xs text-text-secondary",
1324
1324
  children: i
1325
1325
  })
1326
1326
  ]
1327
1327
  });
1328
1328
  }, Ie = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1329
- let s = P(null), c = M(async (t) => {
1329
+ let s = j(null), c = k(async (t) => {
1330
1330
  try {
1331
1331
  let i = await r(t);
1332
1332
  n([...e, i.downloadUrl]);
@@ -1338,45 +1338,45 @@ var Se = [
1338
1338
  ]), l = (t) => {
1339
1339
  n(e.filter((e, n) => n !== t));
1340
1340
  };
1341
- return /* @__PURE__ */ Y("div", {
1341
+ return /* @__PURE__ */ J("div", {
1342
1342
  className: "space-y-2",
1343
1343
  children: [
1344
- /* @__PURE__ */ J("label", {
1344
+ /* @__PURE__ */ q("label", {
1345
1345
  className: "text-sm font-medium",
1346
1346
  children: "Screenshots"
1347
1347
  }),
1348
- /* @__PURE__ */ Y("div", {
1348
+ /* @__PURE__ */ J("div", {
1349
1349
  className: "flex flex-wrap gap-3",
1350
- children: [e.map((e, t) => /* @__PURE__ */ Y("div", {
1350
+ children: [e.map((e, t) => /* @__PURE__ */ J("div", {
1351
1351
  className: "relative group w-36 aspect-video rounded-lg border border-border overflow-hidden bg-bg-sunken",
1352
- children: [/* @__PURE__ */ J("img", {
1352
+ children: [/* @__PURE__ */ q("img", {
1353
1353
  src: e,
1354
1354
  alt: `Screenshot ${t + 1}`,
1355
1355
  className: "w-full h-full object-cover"
1356
- }), /* @__PURE__ */ J("button", {
1356
+ }), /* @__PURE__ */ q("button", {
1357
1357
  type: "button",
1358
1358
  onClick: () => l(t),
1359
1359
  className: "absolute top-1 right-1 rounded-full bg-black/60 text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
1360
- children: /* @__PURE__ */ J(K, { size: 12 })
1360
+ children: /* @__PURE__ */ q(G, { size: 12 })
1361
1361
  })]
1362
- }, t)), /* @__PURE__ */ J("button", {
1362
+ }, t)), /* @__PURE__ */ q("button", {
1363
1363
  type: "button",
1364
1364
  disabled: i,
1365
1365
  onClick: () => s.current?.click(),
1366
1366
  className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
1367
- children: i ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
1367
+ children: i ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(z, {
1368
1368
  size: 18,
1369
1369
  className: "animate-spin text-primary"
1370
- }), /* @__PURE__ */ Y("span", {
1370
+ }), /* @__PURE__ */ J("span", {
1371
1371
  className: "text-xs",
1372
1372
  children: [a, "%"]
1373
- })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, { size: 18 }), /* @__PURE__ */ J("span", {
1373
+ })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, { size: 18 }), /* @__PURE__ */ q("span", {
1374
1374
  className: "text-xs",
1375
1375
  children: "Add screenshot"
1376
1376
  })] })
1377
1377
  })]
1378
1378
  }),
1379
- /* @__PURE__ */ J("input", {
1379
+ /* @__PURE__ */ q("input", {
1380
1380
  ref: s,
1381
1381
  type: "file",
1382
1382
  accept: "image/png,image/jpeg,image/webp,image/gif",
@@ -1386,7 +1386,7 @@ var Se = [
1386
1386
  t && c(t), e.target.value = "";
1387
1387
  }
1388
1388
  }),
1389
- o && /* @__PURE__ */ J("p", {
1389
+ o && /* @__PURE__ */ q("p", {
1390
1390
  className: "text-xs text-status-error-text",
1391
1391
  children: o
1392
1392
  })
@@ -1498,102 +1498,102 @@ function Be(e) {
1498
1498
  };
1499
1499
  }
1500
1500
  var Ve = ({ app: n }) => {
1501
- let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o } = e(), { t: s } = I(), c = (e, t) => {
1502
- let n = s(e);
1501
+ let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } = N(), u = (e, t) => {
1502
+ let n = l(e);
1503
1503
  return n === e ? t : n;
1504
- }, [l, u] = F(() => Be(n)), [d, f] = F(!1), [m, g] = F(!1), v = P(n);
1505
- v.current = n;
1506
- let [y] = h(), [b, { loading: x }] = p();
1507
- re(() => {
1508
- u(Be(v.current));
1504
+ }, [d, f] = M(() => Be(n)), [m, g] = M(!1), [v, y] = M(!1), b = j(n);
1505
+ b.current = n;
1506
+ let [ee] = h(), [x, { loading: te }] = p();
1507
+ oe(() => {
1508
+ f(Be(b.current));
1509
1509
  }, [n.id]);
1510
- let S = (e, t) => {
1511
- u((n) => ({
1510
+ let C = (e, t) => {
1511
+ f((n) => ({
1512
1512
  ...n,
1513
1513
  [e]: t
1514
1514
  }));
1515
- }, ee = async () => {
1516
- f(!0);
1515
+ }, ne = async () => {
1516
+ g(!0);
1517
1517
  try {
1518
- let e = l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Le.has(l.manifestItemType), i = n.manifest ?? {}, a = {
1518
+ let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Le.has(d.manifestItemType), i = n.manifest ?? {}, a = {
1519
1519
  manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
1520
- itemType: l.manifestItemType || void 0,
1520
+ itemType: d.manifestItemType || void 0,
1521
1521
  identity: {
1522
- version: l.manifestVersion || "1.0.0",
1523
- displayName: l.manifestDisplayName
1522
+ version: d.manifestVersion || "1.0.0",
1523
+ displayName: d.manifestDisplayName
1524
1524
  },
1525
- ...r ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
1526
- type: l.manifestInstallType,
1527
- ...l.manifestInstallType === "zip" && l.manifestRegistryUrl ? { url: l.manifestRegistryUrl } : {}
1525
+ ...r ? { jsonContent: d.manifestJsonContent || void 0 } : { digital: { install: {
1526
+ type: d.manifestInstallType,
1527
+ ...d.manifestInstallType === "zip" && d.manifestRegistryUrl ? { url: d.manifestRegistryUrl } : {}
1528
1528
  } } },
1529
1529
  permissions: t,
1530
- compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
1530
+ compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
1531
1531
  }, o = { ...n.pricingDetails ?? {} };
1532
- if (l.pricingType !== "FREE") {
1533
- let e = parseFloat(l.price);
1534
- isNaN(e) || (o.price = e), l.currency && (o.currency = l.currency);
1532
+ if (d.pricingType !== "FREE") {
1533
+ let e = parseFloat(d.price);
1534
+ isNaN(e) || (o.price = e), d.currency && (o.currency = d.currency);
1535
1535
  }
1536
- await y({ variables: {
1536
+ await ee({ variables: {
1537
1537
  id: n.id,
1538
1538
  input: {
1539
- iconUrl: l.iconUrl || null,
1540
- bannerUrl: l.bannerUrl || null,
1541
- videoUrl: l.videoUrl || null,
1542
- shortDescription: l.shortDescription || null,
1543
- description: l.description || null,
1539
+ iconUrl: d.iconUrl || null,
1540
+ bannerUrl: d.bannerUrl || null,
1541
+ videoUrl: d.videoUrl || null,
1542
+ shortDescription: d.shortDescription || null,
1543
+ description: d.description || null,
1544
1544
  screenshots: e.length > 0 ? e : null,
1545
- websiteUrl: l.websiteUrl || null,
1546
- documentationUrl: l.documentationUrl || null,
1547
- githubUrl: l.githubUrl || null,
1548
- supportUrl: l.supportUrl || null,
1549
- privacyPolicyUrl: l.privacyPolicyUrl || null,
1550
- termsOfServiceUrl: l.termsOfServiceUrl || null,
1551
- pricingType: l.pricingType || null,
1545
+ websiteUrl: d.websiteUrl || null,
1546
+ documentationUrl: d.documentationUrl || null,
1547
+ githubUrl: d.githubUrl || null,
1548
+ supportUrl: d.supportUrl || null,
1549
+ privacyPolicyUrl: d.privacyPolicyUrl || null,
1550
+ termsOfServiceUrl: d.termsOfServiceUrl || null,
1551
+ pricingType: d.pricingType || null,
1552
1552
  pricingDetails: Object.keys(o).length > 0 ? o : null,
1553
1553
  manifest: a
1554
1554
  }
1555
- } }), C("success");
1555
+ } }), S("success");
1556
1556
  } catch {
1557
- C("error");
1557
+ S("error");
1558
1558
  } finally {
1559
- f(!1);
1559
+ g(!1);
1560
1560
  }
1561
- }, w = async () => {
1561
+ }, re = async () => {
1562
1562
  try {
1563
- await b({ variables: { id: n.id } }), C("success");
1563
+ await x({ variables: { id: n.id } }), S("success");
1564
1564
  } catch {
1565
- C("error");
1565
+ S("error");
1566
1566
  }
1567
- }, T = P(null), k = P(null), { upload: A, uploading: te, progress: ne, error: N } = j(r, i, a, o), { upload: ae, uploading: L, progress: ce, error: z } = j(r, i, a, o, "/DevPortal/Assets"), { upload: le, uploading: ue, progress: de, error: H } = j(r, i, a, o, "/DevPortal/Assets"), { upload: fe, uploading: pe, progress: me, error: U } = j(r, i, a, o, "/DevPortal/Assets"), G = M(async (e) => {
1567
+ }, ie = j(null), ae = j(null), { upload: D, uploading: A, progress: ce, error: P } = O(r, i, a, o), { upload: ue, uploading: L, progress: de, error: fe } = O(r, i, a, o, "/DevPortal/Assets"), { upload: pe, uploading: B, progress: me, error: he } = O(r, i, a, o, "/DevPortal/Assets"), { upload: V, uploading: W, progress: _e, error: G } = O(r, i, a, o, "/DevPortal/Assets"), ve = k(async (e) => {
1568
1568
  let t = e.target.files?.[0];
1569
1569
  if (t) {
1570
1570
  e.target.value = "";
1571
1571
  try {
1572
- let e = await A(t);
1573
- u((t) => ({
1572
+ let e = await D(t);
1573
+ f((t) => ({
1574
1574
  ...t,
1575
1575
  manifestRegistryUrl: e.downloadUrl
1576
1576
  }));
1577
1577
  } catch {}
1578
1578
  }
1579
- }, [A]), ge = M(async (e) => {
1580
- e.preventDefault(), g(!1);
1579
+ }, [D]), ye = k(async (e) => {
1580
+ e.preventDefault(), y(!1);
1581
1581
  let t = e.dataTransfer.files?.[0];
1582
1582
  if (t) try {
1583
- let e = await A(t);
1584
- u((t) => ({
1583
+ let e = await D(t);
1584
+ f((t) => ({
1585
1585
  ...t,
1586
1586
  manifestRegistryUrl: e.downloadUrl
1587
1587
  }));
1588
1588
  } catch {}
1589
- }, [A]), K = M((e) => {
1589
+ }, [D]), be = k((e) => {
1590
1590
  let t = e.target.files?.[0];
1591
1591
  if (!t) return;
1592
1592
  let n = new FileReader();
1593
1593
  n.onload = (e) => {
1594
1594
  try {
1595
1595
  let t = JSON.parse(e.target?.result), n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [];
1596
- u((e) => ({
1596
+ f((e) => ({
1597
1597
  ...e,
1598
1598
  manifestItemType: typeof t.itemType == "string" ? t.itemType : e.manifestItemType,
1599
1599
  manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.manifestDisplayName,
@@ -1605,449 +1605,577 @@ var Ve = ({ app: n }) => {
1605
1605
  }));
1606
1606
  } catch {}
1607
1607
  }, n.readAsText(t), e.target.value = "";
1608
- }, []), _e = M(() => {
1609
- let e = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Le.has(l.manifestItemType), r = {
1608
+ }, []), Y = k(() => {
1609
+ let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Le.has(d.manifestItemType), r = {
1610
1610
  manifestVersion: "1.0",
1611
- itemType: l.manifestItemType || void 0,
1611
+ itemType: d.manifestItemType || void 0,
1612
1612
  identity: {
1613
- version: l.manifestVersion || "1.0.0",
1614
- displayName: l.manifestDisplayName
1613
+ version: d.manifestVersion || "1.0.0",
1614
+ displayName: d.manifestDisplayName
1615
1615
  },
1616
- ...t ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
1617
- type: l.manifestInstallType,
1618
- ...l.manifestInstallType === "zip" && l.manifestRegistryUrl ? { url: l.manifestRegistryUrl } : {}
1616
+ ...t ? { jsonContent: d.manifestJsonContent || void 0 } : { digital: { install: {
1617
+ type: d.manifestInstallType,
1618
+ ...d.manifestInstallType === "zip" && d.manifestRegistryUrl ? { url: d.manifestRegistryUrl } : {}
1619
1619
  } } },
1620
1620
  permissions: e,
1621
- compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
1621
+ compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
1622
1622
  }, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1623
1623
  o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
1624
- }, [n.slug, l]), ve = Le.has(l.manifestItemType), ye = l.manifestInstallType === "builtin", X = l.pricingType !== "FREE", be = l.manifestRegistryUrl ? l.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1624
+ }, [n.slug, d]), xe = Le.has(d.manifestItemType), Se = d.manifestInstallType === "builtin", Ce = d.pricingType !== "FREE", we = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1625
1625
  n.status;
1626
- let xe = n.status === "SUBMITTED", Se = n.status === "PUBLISHED";
1627
- return /* @__PURE__ */ Y("div", {
1626
+ let X = n.status === "SUBMITTED", Z = n.status === "PUBLISHED", Te = n.appType === "NODE" || n.appType === "WORKFLOW", Ee = [
1627
+ {
1628
+ label: "Short description",
1629
+ done: !!d.shortDescription.trim()
1630
+ },
1631
+ {
1632
+ label: "Full description",
1633
+ done: !!d.description.trim()
1634
+ },
1635
+ {
1636
+ label: "Icon",
1637
+ done: !!d.iconUrl.trim()
1638
+ },
1639
+ {
1640
+ label: "Privacy Policy URL",
1641
+ done: !!d.privacyPolicyUrl.trim()
1642
+ },
1643
+ {
1644
+ label: "Terms of Service URL",
1645
+ done: !!d.termsOfServiceUrl.trim()
1646
+ }
1647
+ ], De = Ee.filter((e) => e.done).length, Oe = Ee.length;
1648
+ return /* @__PURE__ */ J("div", {
1628
1649
  className: "space-y-8 max-w-3xl",
1629
1650
  children: [
1630
- Se ? /* @__PURE__ */ Y("div", {
1651
+ /* @__PURE__ */ J("div", {
1652
+ className: "rounded-lg border border-primary/20 bg-primary/5 px-4 py-3 space-y-2",
1653
+ children: [/* @__PURE__ */ q("p", {
1654
+ className: "text-sm font-semibold text-primary",
1655
+ children: u("devportal.listingTabPurpose", "What is this tab for?")
1656
+ }), /* @__PURE__ */ J("ul", {
1657
+ className: "text-sm text-muted-foreground space-y-1 list-none pl-0",
1658
+ children: [
1659
+ /* @__PURE__ */ J("li", {
1660
+ className: "flex items-start gap-2",
1661
+ children: [/* @__PURE__ */ q(H, {
1662
+ size: 14,
1663
+ className: "mt-0.5 shrink-0 text-primary"
1664
+ }), /* @__PURE__ */ J("span", { children: [
1665
+ /* @__PURE__ */ q("strong", { children: u("devportal.thisTab", "This tab") }),
1666
+ " ",
1667
+ u("devportal.listingTabDesc", "controls your store card — the name, description, icon and screenshots users see in the marketplace. Save changes here any time without creating a new release.")
1668
+ ] })]
1669
+ }),
1670
+ Te && /* @__PURE__ */ J("li", {
1671
+ className: "flex items-start gap-2",
1672
+ children: [/* @__PURE__ */ q(I, {
1673
+ size: 14,
1674
+ className: "mt-0.5 shrink-0 text-primary"
1675
+ }), /* @__PURE__ */ J("span", { children: [
1676
+ u("devportal.versionsTabDesc", "To release a new version (ZIP package + manifest), go to the"),
1677
+ " ",
1678
+ /* @__PURE__ */ q("button", {
1679
+ type: "button",
1680
+ className: "underline text-primary hover:no-underline",
1681
+ onClick: () => s?.(`${c}/apps/${n.id}/versions`),
1682
+ children: u("devportal.versionsTab", "Versions page")
1683
+ }),
1684
+ "."
1685
+ ] })]
1686
+ }),
1687
+ /* @__PURE__ */ J("li", {
1688
+ className: "flex items-start gap-2",
1689
+ children: [/* @__PURE__ */ q(ge, {
1690
+ size: 14,
1691
+ className: "mt-0.5 shrink-0 text-primary"
1692
+ }), /* @__PURE__ */ q("span", { children: u("devportal.submitTabDesc", "When your listing is ready, click \"Submit for Review\" to send it to the review team.") })]
1693
+ })
1694
+ ]
1695
+ })]
1696
+ }),
1697
+ !Z && /* @__PURE__ */ J("div", {
1698
+ className: "rounded-lg border bg-card p-4 space-y-3",
1699
+ children: [/* @__PURE__ */ J("div", {
1700
+ className: "flex items-center justify-between",
1701
+ children: [/* @__PURE__ */ J("p", {
1702
+ className: "text-sm font-medium",
1703
+ children: [
1704
+ u("devportal.listingCompleteness", "Listing completeness"),
1705
+ " ",
1706
+ /* @__PURE__ */ J("span", {
1707
+ className: t("ml-1 text-xs font-semibold", De === Oe ? "text-status-success-text" : "text-status-warning-text"),
1708
+ children: [
1709
+ De,
1710
+ "/",
1711
+ Oe
1712
+ ]
1713
+ })
1714
+ ]
1715
+ }), De === Oe && /* @__PURE__ */ J("span", {
1716
+ className: "text-xs text-status-success-text flex items-center gap-1",
1717
+ children: [/* @__PURE__ */ q(F, { size: 12 }), u("devportal.readyToSubmit", "Ready to submit")]
1718
+ })]
1719
+ }), /* @__PURE__ */ q("div", {
1720
+ className: "grid grid-cols-2 sm:grid-cols-3 gap-2",
1721
+ children: Ee.map((e) => /* @__PURE__ */ J("div", {
1722
+ className: "flex items-center gap-1.5 text-xs",
1723
+ children: [e.done ? /* @__PURE__ */ q(F, {
1724
+ size: 12,
1725
+ className: "text-status-success-text shrink-0"
1726
+ }) : /* @__PURE__ */ q(se, {
1727
+ size: 12,
1728
+ className: "text-status-warning-text shrink-0"
1729
+ }), /* @__PURE__ */ q("span", {
1730
+ className: e.done ? "text-foreground" : "text-muted-foreground",
1731
+ children: e.label
1732
+ })]
1733
+ }, e.label))
1734
+ })]
1735
+ }),
1736
+ Z ? /* @__PURE__ */ J("div", {
1631
1737
  className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
1632
- children: [/* @__PURE__ */ J(R, {
1738
+ children: [/* @__PURE__ */ q(F, {
1633
1739
  size: 16,
1634
1740
  className: "text-success mt-0.5 shrink-0"
1635
- }), /* @__PURE__ */ Y("div", {
1741
+ }), /* @__PURE__ */ J("div", {
1636
1742
  className: "text-sm",
1637
- children: [/* @__PURE__ */ J("span", {
1743
+ children: [/* @__PURE__ */ q("span", {
1638
1744
  className: "font-medium text-success",
1639
- children: c("devportal.storeListing.published", "Published")
1640
- }), n.publishedAt && /* @__PURE__ */ Y("span", {
1745
+ children: u("devportal.storeListing.published", "Published")
1746
+ }), n.publishedAt && /* @__PURE__ */ J("span", {
1641
1747
  className: "text-muted-foreground ml-2",
1642
1748
  children: [
1643
- c("devportal.storeListing.since", "since"),
1749
+ u("devportal.storeListing.since", "since"),
1644
1750
  " ",
1645
1751
  new Date(n.publishedAt).toLocaleDateString()
1646
1752
  ]
1647
1753
  })]
1648
1754
  })]
1649
- }) : xe ? /* @__PURE__ */ Y("div", {
1755
+ }) : X ? /* @__PURE__ */ J("div", {
1650
1756
  className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
1651
- children: [/* @__PURE__ */ J(oe, {
1757
+ children: [/* @__PURE__ */ q(I, {
1652
1758
  size: 16,
1653
1759
  className: "text-primary mt-0.5 shrink-0"
1654
- }), /* @__PURE__ */ Y("div", {
1760
+ }), /* @__PURE__ */ J("div", {
1655
1761
  className: "text-sm",
1656
1762
  children: [
1657
- /* @__PURE__ */ J("span", {
1763
+ /* @__PURE__ */ q("span", {
1658
1764
  className: "font-medium text-primary",
1659
- children: c("devportal.storeListing.underReview", "Submitted for review")
1765
+ children: u("devportal.storeListing.underReview", "Submitted for review")
1660
1766
  }),
1661
- n.submittedAt && /* @__PURE__ */ J("span", {
1767
+ n.submittedAt && /* @__PURE__ */ q("span", {
1662
1768
  className: "text-muted-foreground ml-2",
1663
1769
  children: new Date(n.submittedAt).toLocaleDateString()
1664
1770
  }),
1665
- n.reviewStatus && /* @__PURE__ */ Y("span", {
1771
+ n.reviewStatus && /* @__PURE__ */ J("span", {
1666
1772
  className: "text-muted-foreground ml-2",
1667
1773
  children: ["· ", n.reviewStatus]
1668
1774
  })
1669
1775
  ]
1670
1776
  })]
1671
- }) : /* @__PURE__ */ Y("div", {
1777
+ }) : /* @__PURE__ */ J("div", {
1672
1778
  className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
1673
- children: [/* @__PURE__ */ J(ie, {
1779
+ children: [/* @__PURE__ */ q(se, {
1674
1780
  size: 16,
1675
1781
  className: "text-warning mt-0.5 shrink-0"
1676
- }), /* @__PURE__ */ Y("div", {
1782
+ }), /* @__PURE__ */ J("div", {
1677
1783
  className: "text-sm",
1678
- children: [/* @__PURE__ */ J("span", {
1784
+ children: [/* @__PURE__ */ q("span", {
1679
1785
  className: "font-medium text-warning",
1680
- children: c("devportal.storeListing.draft", "Draft")
1681
- }), /* @__PURE__ */ J("span", {
1786
+ children: u("devportal.storeListing.draft", "Draft")
1787
+ }), /* @__PURE__ */ q("span", {
1682
1788
  className: "text-muted-foreground ml-2",
1683
- children: c("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
1789
+ children: u("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
1684
1790
  })]
1685
1791
  })]
1686
1792
  }),
1687
- /* @__PURE__ */ J(_, {
1688
- title: c("devportal.package", "Package"),
1689
- description: c("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
1690
- children: /* @__PURE__ */ Y("div", {
1793
+ Te ? /* @__PURE__ */ J("div", {
1794
+ className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-4 flex items-start gap-3",
1795
+ children: [/* @__PURE__ */ q(R, {
1796
+ size: 16,
1797
+ className: "shrink-0 mt-0.5 text-muted-foreground"
1798
+ }), /* @__PURE__ */ J("div", {
1799
+ className: "text-sm space-y-1",
1800
+ children: [/* @__PURE__ */ q("p", {
1801
+ className: "font-medium",
1802
+ children: u("devportal.packageManagedInVersions", "ZIP package & manifest are managed in Versions")
1803
+ }), /* @__PURE__ */ q("p", {
1804
+ className: "text-muted-foreground",
1805
+ children: u("devportal.packageManagedInVersionsDesc", "For NODE and WORKFLOW types, each release is uploaded through the Versions page — including the ZIP archive and manifest.json. This keeps your code releases separate from your store card.")
1806
+ })]
1807
+ })]
1808
+ }) : /* @__PURE__ */ q(_, {
1809
+ title: u("devportal.package", "Package"),
1810
+ description: u("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
1811
+ children: /* @__PURE__ */ J("div", {
1691
1812
  className: "space-y-6",
1692
1813
  children: [
1693
- /* @__PURE__ */ J(D, {
1694
- label: c("devportal.storeItemType", "Item Type"),
1695
- value: l.manifestItemType,
1814
+ /* @__PURE__ */ q(T, {
1815
+ label: u("devportal.storeItemType", "Item Type"),
1816
+ value: d.manifestItemType,
1696
1817
  onChange: (e) => {
1697
1818
  let t = e.target.value;
1698
- S("manifestItemType", t), Le.has(t) ? S("manifestInstallType", "json") : l.manifestInstallType === "json" && S("manifestInstallType", "zip");
1819
+ C("manifestItemType", t), Le.has(t) ? C("manifestInstallType", "json") : d.manifestInstallType === "json" && C("manifestInstallType", "zip");
1699
1820
  },
1700
1821
  options: ze,
1701
- placeholder: c("devportal.selectItemType", "Select item type…"),
1702
- hint: c("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
1822
+ placeholder: u("devportal.selectItemType", "Select item type…"),
1823
+ hint: u("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
1703
1824
  }),
1704
- /* @__PURE__ */ Y("div", {
1825
+ /* @__PURE__ */ J("div", {
1705
1826
  className: "grid gap-4 sm:grid-cols-2",
1706
- children: [/* @__PURE__ */ J(E, {
1707
- label: c("devportal.manifestDisplayName", "Display Name"),
1708
- value: l.manifestDisplayName,
1709
- onChange: (e) => S("manifestDisplayName", e.target.value),
1827
+ children: [/* @__PURE__ */ q(w, {
1828
+ label: u("devportal.manifestDisplayName", "Display Name"),
1829
+ value: d.manifestDisplayName,
1830
+ onChange: (e) => C("manifestDisplayName", e.target.value),
1710
1831
  placeholder: "My Awesome Node"
1711
- }), /* @__PURE__ */ J(E, {
1712
- label: c("devportal.manifestVersion", "Version"),
1713
- value: l.manifestVersion,
1714
- onChange: (e) => S("manifestVersion", e.target.value),
1832
+ }), /* @__PURE__ */ q(w, {
1833
+ label: u("devportal.manifestVersion", "Version"),
1834
+ value: d.manifestVersion,
1835
+ onChange: (e) => C("manifestVersion", e.target.value),
1715
1836
  placeholder: "1.0.0",
1716
- hint: c("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
1837
+ hint: u("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
1717
1838
  })]
1718
1839
  }),
1719
- ve && /* @__PURE__ */ J(O, {
1720
- label: c("devportal.jsonContent", l.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
1721
- value: l.manifestJsonContent,
1722
- onChange: (e) => S("manifestJsonContent", e.target.value),
1840
+ xe && /* @__PURE__ */ q(E, {
1841
+ label: u("devportal.jsonContent", d.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
1842
+ value: d.manifestJsonContent,
1843
+ onChange: (e) => C("manifestJsonContent", e.target.value),
1723
1844
  rows: 12,
1724
1845
  placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
1725
- hint: c("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
1846
+ hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
1726
1847
  }),
1727
- !ve && /* @__PURE__ */ Y("div", {
1848
+ !xe && /* @__PURE__ */ J("div", {
1728
1849
  className: "space-y-3",
1729
1850
  children: [
1730
- /* @__PURE__ */ Y("div", {
1851
+ /* @__PURE__ */ J("div", {
1731
1852
  className: "flex items-center justify-between flex-wrap gap-2",
1732
- children: [/* @__PURE__ */ J("label", {
1853
+ children: [/* @__PURE__ */ q("label", {
1733
1854
  className: "text-sm font-medium",
1734
- children: c("devportal.packageFile", "Package File")
1735
- }), /* @__PURE__ */ Y("label", {
1855
+ children: u("devportal.packageFile", "Package File")
1856
+ }), /* @__PURE__ */ J("label", {
1736
1857
  className: "flex items-center gap-2 text-sm cursor-pointer select-none",
1737
- children: [/* @__PURE__ */ J("input", {
1858
+ children: [/* @__PURE__ */ q("input", {
1738
1859
  type: "checkbox",
1739
- checked: ye,
1740
- onChange: (e) => S("manifestInstallType", e.target.checked ? "builtin" : "zip"),
1860
+ checked: Se,
1861
+ onChange: (e) => C("manifestInstallType", e.target.checked ? "builtin" : "zip"),
1741
1862
  className: "h-4 w-4 rounded border-border accent-primary"
1742
- }), /* @__PURE__ */ J("span", {
1863
+ }), /* @__PURE__ */ q("span", {
1743
1864
  className: "text-text-secondary",
1744
- children: c("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
1865
+ children: u("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
1745
1866
  })]
1746
1867
  })]
1747
1868
  }),
1748
- !ye && /* @__PURE__ */ Y(q, { children: [
1749
- /* @__PURE__ */ Y("div", {
1869
+ !Se && /* @__PURE__ */ J(K, { children: [
1870
+ /* @__PURE__ */ J("div", {
1750
1871
  className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1751
- children: [/* @__PURE__ */ J(B, {
1872
+ children: [/* @__PURE__ */ q(R, {
1752
1873
  size: 15,
1753
1874
  className: "mt-0.5 shrink-0"
1754
- }), /* @__PURE__ */ Y("span", { children: [
1755
- c("devportal.zipModelHint", "Package your code and a "),
1756
- /* @__PURE__ */ J("code", {
1875
+ }), /* @__PURE__ */ J("span", { children: [
1876
+ u("devportal.zipModelHint", "Package your code and a "),
1877
+ /* @__PURE__ */ q("code", {
1757
1878
  className: "rounded bg-muted px-1 py-0.5 font-mono text-xs",
1758
1879
  children: "manifest.json"
1759
1880
  }),
1760
- c("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
1881
+ u("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
1761
1882
  ] })]
1762
1883
  }),
1763
- /* @__PURE__ */ Y("div", {
1884
+ /* @__PURE__ */ J("div", {
1764
1885
  onDragOver: (e) => {
1765
- e.preventDefault(), g(!0);
1886
+ e.preventDefault(), y(!0);
1766
1887
  },
1767
- onDragLeave: () => g(!1),
1768
- onDrop: (e) => void ge(e),
1769
- onClick: () => !te && k.current?.click(),
1770
- className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", m ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", te && "pointer-events-none opacity-75"),
1771
- children: [/* @__PURE__ */ J("input", {
1772
- ref: k,
1888
+ onDragLeave: () => y(!1),
1889
+ onDrop: (e) => void ye(e),
1890
+ onClick: () => !A && ae.current?.click(),
1891
+ className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", v ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", A && "pointer-events-none opacity-75"),
1892
+ children: [/* @__PURE__ */ q("input", {
1893
+ ref: ae,
1773
1894
  type: "file",
1774
1895
  accept: ".zip,application/zip,application/x-zip-compressed",
1775
1896
  className: "hidden",
1776
- onChange: (e) => void G(e)
1777
- }), te ? /* @__PURE__ */ Y(q, { children: [
1778
- /* @__PURE__ */ J(V, {
1897
+ onChange: (e) => void ve(e)
1898
+ }), A ? /* @__PURE__ */ J(K, { children: [
1899
+ /* @__PURE__ */ q(z, {
1779
1900
  size: 28,
1780
1901
  className: "animate-spin text-primary"
1781
1902
  }),
1782
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
1903
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
1783
1904
  className: "text-sm font-medium",
1784
1905
  children: [
1785
- c("devportal.uploading", "Uploading…"),
1906
+ u("devportal.uploading", "Uploading…"),
1786
1907
  " ",
1787
- ne,
1908
+ ce,
1788
1909
  "%"
1789
1910
  ]
1790
- }), /* @__PURE__ */ J("p", {
1911
+ }), /* @__PURE__ */ q("p", {
1791
1912
  className: "text-xs text-text-secondary mt-0.5",
1792
- children: c("devportal.uploadingHint", "Stored securely in your workspace")
1913
+ children: u("devportal.uploadingHint", "Stored securely in your workspace")
1793
1914
  })] }),
1794
- /* @__PURE__ */ J("div", {
1915
+ /* @__PURE__ */ q("div", {
1795
1916
  className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
1796
- children: /* @__PURE__ */ J("div", {
1917
+ children: /* @__PURE__ */ q("div", {
1797
1918
  className: "h-full bg-primary transition-all",
1798
- style: { width: `${ne}%` }
1919
+ style: { width: `${ce}%` }
1799
1920
  })
1800
1921
  })
1801
- ] }) : be ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(R, {
1922
+ ] }) : we ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(F, {
1802
1923
  size: 28,
1803
1924
  className: "text-status-success-text"
1804
- }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
1925
+ }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
1805
1926
  className: "text-sm font-medium",
1806
- children: be
1807
- }), /* @__PURE__ */ J("p", {
1927
+ children: we
1928
+ }), /* @__PURE__ */ q("p", {
1808
1929
  className: "text-xs text-text-secondary mt-0.5",
1809
- children: c("devportal.clickToReplace", "Click or drag to replace")
1810
- })] })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, {
1930
+ children: u("devportal.clickToReplace", "Click or drag to replace")
1931
+ })] })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, {
1811
1932
  size: 28,
1812
1933
  className: "text-text-secondary"
1813
- }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
1934
+ }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
1814
1935
  className: "text-sm font-medium",
1815
- children: c("devportal.dropZipHere", "Drop your .zip here")
1816
- }), /* @__PURE__ */ J("p", {
1936
+ children: u("devportal.dropZipHere", "Drop your .zip here")
1937
+ }), /* @__PURE__ */ q("p", {
1817
1938
  className: "text-xs text-text-secondary mt-0.5",
1818
- children: c("devportal.orClickToBrowse", "or click to browse")
1939
+ children: u("devportal.orClickToBrowse", "or click to browse")
1819
1940
  })] })] })]
1820
1941
  }),
1821
- N && /* @__PURE__ */ J("p", {
1942
+ P && /* @__PURE__ */ q("p", {
1822
1943
  className: "text-xs text-status-error-text",
1823
- children: N
1944
+ children: P
1824
1945
  })
1825
1946
  ] }),
1826
- ye && /* @__PURE__ */ Y("div", {
1947
+ Se && /* @__PURE__ */ J("div", {
1827
1948
  className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1828
- children: [/* @__PURE__ */ J(B, {
1949
+ children: [/* @__PURE__ */ q(R, {
1829
1950
  size: 15,
1830
1951
  className: "mt-0.5 shrink-0"
1831
- }), /* @__PURE__ */ J("span", { children: c("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
1952
+ }), /* @__PURE__ */ q("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
1832
1953
  })
1833
1954
  ]
1834
1955
  }),
1835
- /* @__PURE__ */ Y("div", {
1956
+ /* @__PURE__ */ J("div", {
1836
1957
  className: "flex flex-wrap items-center gap-2 border-t pt-4",
1837
1958
  children: [
1838
- /* @__PURE__ */ J("input", {
1839
- ref: T,
1959
+ /* @__PURE__ */ q("input", {
1960
+ ref: ie,
1840
1961
  type: "file",
1841
1962
  accept: ".json,application/json",
1842
1963
  className: "hidden",
1843
- onChange: K
1964
+ onChange: be
1844
1965
  }),
1845
- /* @__PURE__ */ J("span", {
1966
+ /* @__PURE__ */ q("span", {
1846
1967
  className: "text-xs text-text-secondary mr-1",
1847
1968
  children: "manifest.json:"
1848
1969
  }),
1849
- /* @__PURE__ */ Y("button", {
1970
+ /* @__PURE__ */ J("button", {
1850
1971
  type: "button",
1851
- onClick: () => T.current?.click(),
1972
+ onClick: () => ie.current?.click(),
1852
1973
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
1853
- children: [/* @__PURE__ */ J(W, { size: 12 }), c("devportal.importManifest", "Import")]
1974
+ children: [/* @__PURE__ */ q(U, { size: 12 }), u("devportal.importManifest", "Import")]
1854
1975
  }),
1855
- /* @__PURE__ */ Y("button", {
1976
+ /* @__PURE__ */ J("button", {
1856
1977
  type: "button",
1857
- onClick: _e,
1978
+ onClick: Y,
1858
1979
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
1859
- children: [/* @__PURE__ */ J(se, { size: 12 }), c("devportal.exportManifest", "Export")]
1980
+ children: [/* @__PURE__ */ q(le, { size: 12 }), u("devportal.exportManifest", "Export")]
1860
1981
  }),
1861
- /* @__PURE__ */ J("span", {
1982
+ /* @__PURE__ */ q("span", {
1862
1983
  className: "text-xs text-text-secondary",
1863
- children: c("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
1984
+ children: u("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
1864
1985
  })
1865
1986
  ]
1866
1987
  })
1867
1988
  ]
1868
1989
  })
1869
1990
  }),
1870
- /* @__PURE__ */ J(_, {
1871
- title: c("devportal.storePresentation", "Store Presence"),
1872
- description: c("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
1873
- children: /* @__PURE__ */ Y("div", {
1991
+ /* @__PURE__ */ q(_, {
1992
+ title: u("devportal.storePresentation", "Store Presence"),
1993
+ description: u("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
1994
+ children: /* @__PURE__ */ J("div", {
1874
1995
  className: "space-y-5",
1875
1996
  children: [
1876
- /* @__PURE__ */ Y("div", {
1997
+ /* @__PURE__ */ J("div", {
1877
1998
  className: "grid gap-5 sm:grid-cols-2",
1878
- children: [/* @__PURE__ */ J(Fe, {
1879
- label: c("devportal.iconUrl", "Icon"),
1880
- value: l.iconUrl,
1881
- onChange: (e) => S("iconUrl", e),
1882
- hint: c("devportal.iconUrlHint", "Square, 256×256 px recommended"),
1999
+ children: [/* @__PURE__ */ q(Fe, {
2000
+ label: u("devportal.iconUrl", "Icon"),
2001
+ value: d.iconUrl,
2002
+ onChange: (e) => C("iconUrl", e),
2003
+ hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
1883
2004
  aspectClass: "aspect-square",
1884
- upload: ae,
2005
+ upload: ue,
1885
2006
  uploading: L,
1886
- progress: ce,
1887
- error: z
1888
- }), /* @__PURE__ */ J(Fe, {
1889
- label: c("devportal.bannerUrl", "Banner"),
1890
- value: l.bannerUrl,
1891
- onChange: (e) => S("bannerUrl", e),
1892
- hint: c("devportal.bannerUrlHint", "1280×640 px recommended"),
1893
- aspectClass: "aspect-video",
1894
- upload: le,
1895
- uploading: ue,
1896
2007
  progress: de,
1897
- error: H
2008
+ error: fe
2009
+ }), /* @__PURE__ */ q(Fe, {
2010
+ label: u("devportal.bannerUrl", "Banner"),
2011
+ value: d.bannerUrl,
2012
+ onChange: (e) => C("bannerUrl", e),
2013
+ hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
2014
+ aspectClass: "aspect-video",
2015
+ upload: pe,
2016
+ uploading: B,
2017
+ progress: me,
2018
+ error: he
1898
2019
  })]
1899
2020
  }),
1900
- /* @__PURE__ */ J(E, {
1901
- label: c("devportal.videoUrl", "Demo Video URL"),
1902
- value: l.videoUrl,
1903
- onChange: (e) => S("videoUrl", e.target.value),
2021
+ /* @__PURE__ */ q(w, {
2022
+ label: u("devportal.videoUrl", "Demo Video URL"),
2023
+ value: d.videoUrl,
2024
+ onChange: (e) => C("videoUrl", e.target.value),
1904
2025
  placeholder: "https://...",
1905
- hint: c("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
2026
+ hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
1906
2027
  }),
1907
- /* @__PURE__ */ J(O, {
1908
- label: c("devportal.shortDescription", "Short Description"),
1909
- value: l.shortDescription,
1910
- onChange: (e) => S("shortDescription", e.target.value),
2028
+ /* @__PURE__ */ q(E, {
2029
+ label: u("devportal.shortDescription", "Short Description"),
2030
+ value: d.shortDescription,
2031
+ onChange: (e) => C("shortDescription", e.target.value),
1911
2032
  maxLength: 200,
1912
2033
  rows: 2,
1913
- hint: `${l.shortDescription.length}/200 · ${c("devportal.shortDescHint", "Shown in search results and cards")}`
2034
+ hint: `${d.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
1914
2035
  }),
1915
- /* @__PURE__ */ J(O, {
1916
- label: c("devportal.longDescription", "Full Description"),
1917
- value: l.description,
1918
- onChange: (e) => S("description", e.target.value),
2036
+ /* @__PURE__ */ q(E, {
2037
+ label: u("devportal.longDescription", "Full Description"),
2038
+ value: d.description,
2039
+ onChange: (e) => C("description", e.target.value),
1919
2040
  rows: 5,
1920
- hint: c("devportal.fullDescHint", "Markdown supported")
2041
+ hint: u("devportal.fullDescHint", "Markdown supported")
1921
2042
  }),
1922
- /* @__PURE__ */ J(Ie, {
1923
- urls: l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
1924
- onChange: (e) => S("screenshotsText", e.join("\n")),
1925
- upload: fe,
1926
- uploading: pe,
1927
- progress: me,
1928
- error: U
2043
+ /* @__PURE__ */ q(Ie, {
2044
+ urls: d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
2045
+ onChange: (e) => C("screenshotsText", e.join("\n")),
2046
+ upload: V,
2047
+ uploading: W,
2048
+ progress: _e,
2049
+ error: G
1929
2050
  })
1930
2051
  ]
1931
2052
  })
1932
2053
  }),
1933
- /* @__PURE__ */ J(_, {
1934
- title: c("devportal.linksPolicies", "Links & Policies"),
1935
- description: c("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
1936
- children: /* @__PURE__ */ Y("div", {
2054
+ /* @__PURE__ */ q(_, {
2055
+ title: u("devportal.linksPolicies", "Links & Policies"),
2056
+ description: u("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
2057
+ children: /* @__PURE__ */ J("div", {
1937
2058
  className: "grid gap-4 sm:grid-cols-2",
1938
2059
  children: [
1939
- /* @__PURE__ */ J(E, {
1940
- label: c("devportal.websiteUrl", "Website"),
1941
- value: l.websiteUrl,
1942
- onChange: (e) => S("websiteUrl", e.target.value),
2060
+ /* @__PURE__ */ q(w, {
2061
+ label: u("devportal.websiteUrl", "Website"),
2062
+ value: d.websiteUrl,
2063
+ onChange: (e) => C("websiteUrl", e.target.value),
1943
2064
  placeholder: "https://..."
1944
2065
  }),
1945
- /* @__PURE__ */ J(E, {
1946
- label: c("devportal.documentationUrl", "Documentation"),
1947
- value: l.documentationUrl,
1948
- onChange: (e) => S("documentationUrl", e.target.value),
2066
+ /* @__PURE__ */ q(w, {
2067
+ label: u("devportal.documentationUrl", "Documentation"),
2068
+ value: d.documentationUrl,
2069
+ onChange: (e) => C("documentationUrl", e.target.value),
1949
2070
  placeholder: "https://..."
1950
2071
  }),
1951
- /* @__PURE__ */ J(E, {
1952
- label: c("devportal.githubUrl", "GitHub"),
1953
- value: l.githubUrl,
1954
- onChange: (e) => S("githubUrl", e.target.value),
2072
+ /* @__PURE__ */ q(w, {
2073
+ label: u("devportal.githubUrl", "GitHub"),
2074
+ value: d.githubUrl,
2075
+ onChange: (e) => C("githubUrl", e.target.value),
1955
2076
  placeholder: "https://github.com/..."
1956
2077
  }),
1957
- /* @__PURE__ */ J(E, {
1958
- label: c("devportal.supportUrl", "Support"),
1959
- value: l.supportUrl,
1960
- onChange: (e) => S("supportUrl", e.target.value),
2078
+ /* @__PURE__ */ q(w, {
2079
+ label: u("devportal.supportUrl", "Support"),
2080
+ value: d.supportUrl,
2081
+ onChange: (e) => C("supportUrl", e.target.value),
1961
2082
  placeholder: "https://..."
1962
2083
  }),
1963
- /* @__PURE__ */ J(E, {
1964
- label: `${c("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
1965
- value: l.privacyPolicyUrl,
1966
- onChange: (e) => S("privacyPolicyUrl", e.target.value),
2084
+ /* @__PURE__ */ q(w, {
2085
+ label: `${u("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
2086
+ value: d.privacyPolicyUrl,
2087
+ onChange: (e) => C("privacyPolicyUrl", e.target.value),
1967
2088
  placeholder: "https://...",
1968
- hint: c("devportal.requiredForStore", "Required for store submission")
2089
+ hint: u("devportal.requiredForStore", "Required for store submission")
1969
2090
  }),
1970
- /* @__PURE__ */ J(E, {
1971
- label: `${c("devportal.termsOfServiceUrl", "Terms of Service")} *`,
1972
- value: l.termsOfServiceUrl,
1973
- onChange: (e) => S("termsOfServiceUrl", e.target.value),
2091
+ /* @__PURE__ */ q(w, {
2092
+ label: `${u("devportal.termsOfServiceUrl", "Terms of Service")} *`,
2093
+ value: d.termsOfServiceUrl,
2094
+ onChange: (e) => C("termsOfServiceUrl", e.target.value),
1974
2095
  placeholder: "https://...",
1975
- hint: c("devportal.requiredForStore", "Required for store submission")
2096
+ hint: u("devportal.requiredForStore", "Required for store submission")
1976
2097
  })
1977
2098
  ]
1978
2099
  })
1979
2100
  }),
1980
- /* @__PURE__ */ J(_, {
1981
- title: c("devportal.pricing", "Pricing"),
1982
- description: c("devportal.pricingDescription", "How this item is priced in the marketplace"),
1983
- children: /* @__PURE__ */ Y("div", {
2101
+ /* @__PURE__ */ q(_, {
2102
+ title: u("devportal.pricing", "Pricing"),
2103
+ description: u("devportal.pricingDescription", "How this item is priced in the marketplace"),
2104
+ children: /* @__PURE__ */ J("div", {
1984
2105
  className: "space-y-4",
1985
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
2106
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1986
2107
  className: "mb-2 block text-sm font-medium",
1987
- children: c("devportal.pricingType", "Pricing Type")
1988
- }), /* @__PURE__ */ J("div", {
2108
+ children: u("devportal.pricingType", "Pricing Type")
2109
+ }), /* @__PURE__ */ q("div", {
1989
2110
  className: "flex flex-wrap gap-2",
1990
- children: Re.map((e) => /* @__PURE__ */ J("button", {
2111
+ children: Re.map((e) => /* @__PURE__ */ q("button", {
1991
2112
  type: "button",
1992
- onClick: () => S("pricingType", e.value),
1993
- className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
2113
+ onClick: () => C("pricingType", e.value),
2114
+ className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", d.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
1994
2115
  children: e.label
1995
2116
  }, e.value))
1996
- })] }), X && /* @__PURE__ */ Y("div", {
2117
+ })] }), Ce && /* @__PURE__ */ J("div", {
1997
2118
  className: "grid gap-4 sm:grid-cols-2",
1998
- children: [/* @__PURE__ */ J(E, {
1999
- label: c("devportal.price", "Price"),
2119
+ children: [/* @__PURE__ */ q(w, {
2120
+ label: u("devportal.price", "Price"),
2000
2121
  type: "number",
2001
- value: l.price,
2002
- onChange: (e) => S("price", e.target.value),
2122
+ value: d.price,
2123
+ onChange: (e) => C("price", e.target.value),
2003
2124
  placeholder: "0.00"
2004
- }), /* @__PURE__ */ J(E, {
2005
- label: c("devportal.currency", "Currency"),
2006
- value: l.currency,
2007
- onChange: (e) => S("currency", e.target.value),
2125
+ }), /* @__PURE__ */ q(w, {
2126
+ label: u("devportal.currency", "Currency"),
2127
+ value: d.currency,
2128
+ onChange: (e) => C("currency", e.target.value),
2008
2129
  placeholder: "USD"
2009
2130
  })]
2010
2131
  })]
2011
2132
  })
2012
2133
  }),
2013
- /* @__PURE__ */ Y("div", {
2134
+ /* @__PURE__ */ J("div", {
2014
2135
  className: "border-t pt-6 flex items-center gap-3 flex-wrap",
2015
- children: [/* @__PURE__ */ J("button", {
2016
- type: "button",
2017
- onClick: ee,
2018
- disabled: d,
2019
- className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
2020
- children: d ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
2021
- size: 16,
2022
- className: "animate-spin"
2023
- }), c("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(he, { size: 16 }), c("devportal.saveStoreListing", "Save Store Listing")] })
2024
- }), !Se && /* @__PURE__ */ J("button", {
2025
- type: "button",
2026
- onClick: () => void w(),
2027
- disabled: x || d,
2028
- className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
2029
- children: x ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
2030
- size: 16,
2031
- className: "animate-spin"
2032
- }), c("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(R, { size: 16 }), xe ? c("devportal.resubmitForReview", "Resubmit for Review") : c("devportal.submitForReview", "Submit for Review")] })
2033
- })]
2136
+ children: [
2137
+ /* @__PURE__ */ q("button", {
2138
+ type: "button",
2139
+ onClick: ne,
2140
+ disabled: m,
2141
+ className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
2142
+ children: m ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(z, {
2143
+ size: 16,
2144
+ className: "animate-spin"
2145
+ }), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(H, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
2146
+ }),
2147
+ !Z && !X && /* @__PURE__ */ q("button", {
2148
+ type: "button",
2149
+ onClick: () => void re(),
2150
+ disabled: te || m,
2151
+ className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
2152
+ children: te ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(z, {
2153
+ size: 16,
2154
+ className: "animate-spin"
2155
+ }), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ge, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
2156
+ }),
2157
+ !Z && X && /* @__PURE__ */ J("p", {
2158
+ className: "text-xs text-muted-foreground flex items-center gap-1.5",
2159
+ children: [/* @__PURE__ */ q(I, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
2160
+ })
2161
+ ]
2034
2162
  })
2035
2163
  ]
2036
2164
  });
2037
2165
  }, Q = ({ label: e, value: n, trend: r }) => {
2038
- let { t: i } = I();
2039
- return /* @__PURE__ */ Y("div", {
2166
+ let { t: i } = N();
2167
+ return /* @__PURE__ */ J("div", {
2040
2168
  className: "rounded-lg border bg-card p-4",
2041
2169
  children: [
2042
- /* @__PURE__ */ J("p", {
2170
+ /* @__PURE__ */ q("p", {
2043
2171
  className: "text-sm text-muted-foreground",
2044
2172
  children: e
2045
2173
  }),
2046
- /* @__PURE__ */ J("p", {
2174
+ /* @__PURE__ */ q("p", {
2047
2175
  className: "text-2xl font-bold",
2048
2176
  children: n
2049
2177
  }),
2050
- r !== void 0 && /* @__PURE__ */ Y("p", {
2178
+ r !== void 0 && /* @__PURE__ */ J("p", {
2051
2179
  className: t("text-xs mt-1", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-muted-foreground"),
2052
2180
  children: [
2053
2181
  r > 0 ? "+" : "",
@@ -2061,12 +2189,12 @@ var Ve = ({ app: n }) => {
2061
2189
  })
2062
2190
  ]
2063
2191
  });
2064
- }, $ = ({ label: e, url: t }) => /* @__PURE__ */ Y("a", {
2192
+ }, $ = ({ label: e, url: t }) => /* @__PURE__ */ J("a", {
2065
2193
  href: t,
2066
2194
  target: "_blank",
2067
2195
  rel: "noopener noreferrer",
2068
2196
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
2069
- children: [/* @__PURE__ */ J(z, { size: 14 }), e]
2197
+ children: [/* @__PURE__ */ q(L, { size: 14 }), e]
2070
2198
  }), He = [
2071
2199
  {
2072
2200
  id: "auth",
@@ -2146,7 +2274,7 @@ function Ue(e) {
2146
2274
  return t;
2147
2275
  }
2148
2276
  var We = ({ app: e }) => {
2149
- let t = e.manifest ?? {}, [n, r] = F(() => Ue(t)), [i, a] = F(!1), [o, s] = F(!1), [c] = h(), l = (e, t) => {
2277
+ let t = e.manifest ?? {}, [n, r] = M(() => Ue(t)), [i, a] = M(!1), [o, s] = M(!1), [c] = h(), l = (e, t) => {
2150
2278
  s(!1), r((n) => ({
2151
2279
  ...n,
2152
2280
  [e]: t
@@ -2177,41 +2305,41 @@ var We = ({ app: e }) => {
2177
2305
  "read",
2178
2306
  "write"
2179
2307
  ];
2180
- return /* @__PURE__ */ J(_, {
2308
+ return /* @__PURE__ */ q(_, {
2181
2309
  title: "Permissions",
2182
2310
  description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
2183
- children: /* @__PURE__ */ Y("div", {
2311
+ children: /* @__PURE__ */ J("div", {
2184
2312
  className: "space-y-4",
2185
2313
  children: [
2186
- /* @__PURE__ */ J("div", {
2314
+ /* @__PURE__ */ q("div", {
2187
2315
  className: "overflow-x-auto rounded-lg border border-border",
2188
- children: /* @__PURE__ */ Y("table", {
2316
+ children: /* @__PURE__ */ J("table", {
2189
2317
  className: "w-full text-sm",
2190
- children: [/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", {
2318
+ children: [/* @__PURE__ */ q("thead", { children: /* @__PURE__ */ J("tr", {
2191
2319
  className: "border-b border-border bg-muted/50",
2192
- children: [/* @__PURE__ */ J("th", {
2320
+ children: [/* @__PURE__ */ q("th", {
2193
2321
  className: "px-4 py-3 text-left font-medium text-muted-foreground w-1/2",
2194
2322
  children: "Resource"
2195
- }), f.map((e) => /* @__PURE__ */ J("th", {
2323
+ }), f.map((e) => /* @__PURE__ */ q("th", {
2196
2324
  className: "px-4 py-3 text-center font-medium text-muted-foreground",
2197
2325
  children: d[e]
2198
2326
  }, e))]
2199
- }) }), /* @__PURE__ */ J("tbody", {
2327
+ }) }), /* @__PURE__ */ q("tbody", {
2200
2328
  className: "divide-y divide-border",
2201
- children: He.map((e) => /* @__PURE__ */ Y("tr", {
2329
+ children: He.map((e) => /* @__PURE__ */ J("tr", {
2202
2330
  className: "hover:bg-muted/30 transition-colors",
2203
- children: [/* @__PURE__ */ Y("td", {
2331
+ children: [/* @__PURE__ */ J("td", {
2204
2332
  className: "px-4 py-3",
2205
- children: [/* @__PURE__ */ J("p", {
2333
+ children: [/* @__PURE__ */ q("p", {
2206
2334
  className: "font-medium text-foreground",
2207
2335
  children: e.label
2208
- }), /* @__PURE__ */ J("p", {
2336
+ }), /* @__PURE__ */ q("p", {
2209
2337
  className: "text-xs text-muted-foreground",
2210
2338
  children: e.description
2211
2339
  })]
2212
- }), f.map((t) => /* @__PURE__ */ J("td", {
2340
+ }), f.map((t) => /* @__PURE__ */ q("td", {
2213
2341
  className: "px-4 py-3 text-center",
2214
- children: /* @__PURE__ */ J("input", {
2342
+ children: /* @__PURE__ */ q("input", {
2215
2343
  type: "radio",
2216
2344
  name: `perm-${e.id}`,
2217
2345
  value: t,
@@ -2224,27 +2352,27 @@ var We = ({ app: e }) => {
2224
2352
  })]
2225
2353
  })
2226
2354
  }),
2227
- /* @__PURE__ */ Y("div", {
2355
+ /* @__PURE__ */ J("div", {
2228
2356
  className: "rounded-lg border border-border-subtle bg-muted/30 p-3 flex gap-2 text-xs text-muted-foreground",
2229
- children: [/* @__PURE__ */ J(B, {
2357
+ children: [/* @__PURE__ */ q(R, {
2230
2358
  size: 14,
2231
2359
  className: "flex-shrink-0 mt-0.5"
2232
- }), /* @__PURE__ */ Y("span", { children: [/* @__PURE__ */ J("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
2360
+ }), /* @__PURE__ */ J("span", { children: [/* @__PURE__ */ q("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
2233
2361
  }),
2234
- /* @__PURE__ */ Y("div", {
2362
+ /* @__PURE__ */ J("div", {
2235
2363
  className: "flex items-center justify-end gap-3",
2236
- children: [o && /* @__PURE__ */ Y("span", {
2364
+ children: [o && /* @__PURE__ */ J("span", {
2237
2365
  className: "flex items-center gap-1.5 text-sm text-status-success-text",
2238
- children: [/* @__PURE__ */ J(R, { size: 14 }), "Saved"]
2239
- }), /* @__PURE__ */ Y("button", {
2366
+ children: [/* @__PURE__ */ q(F, { size: 14 }), "Saved"]
2367
+ }), /* @__PURE__ */ J("button", {
2240
2368
  type: "button",
2241
2369
  onClick: () => void u(),
2242
2370
  disabled: i,
2243
2371
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
2244
- children: [i ? /* @__PURE__ */ J(V, {
2372
+ children: [i ? /* @__PURE__ */ q(z, {
2245
2373
  size: 14,
2246
2374
  className: "animate-spin"
2247
- }) : /* @__PURE__ */ J(U, { size: 14 }), "Save Permissions"]
2375
+ }) : /* @__PURE__ */ q(V, { size: 14 }), "Save Permissions"]
2248
2376
  })]
2249
2377
  })
2250
2378
  ]