@burdenoff/microfe-devportal 2026.624.9 → 2026.624.10

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