@burdenoff/microfe-devportal 2026.626.5 → 2026.626.7

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