@burdenoff/microfe-devportal 2026.626.4 → 2026.626.5

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