@burdenoff/microfe-devportal 2026.626.3 → 2026.626.5

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