strapi-plugin-magic-sessionmanager 4.7.2 → 4.9.0

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/README.md +380 -663
  3. package/dist/admin/Analytics-B6d-39Qh.js +420 -0
  4. package/dist/admin/Analytics-DxOWXHn8.mjs +418 -0
  5. package/dist/admin/App-ZsSGj7n8.mjs +1894 -0
  6. package/dist/admin/App-mRFV50K6.js +1896 -0
  7. package/dist/admin/License-BE6UQ_V3.mjs +443 -0
  8. package/dist/admin/License-DXt2oi6u.js +443 -0
  9. package/dist/admin/OnlineUsersWidget-CFvM3Vbp.js +273 -0
  10. package/dist/admin/OnlineUsersWidget-_tJ6aeWl.mjs +254 -0
  11. package/dist/admin/SectionCard-BlWv8CRt.js +54 -0
  12. package/dist/admin/SectionCard-D51bv4Hi.mjs +55 -0
  13. package/dist/admin/Settings-BUc12TP5.js +3570 -0
  14. package/dist/admin/Settings-dtW7cjTX.mjs +3568 -0
  15. package/dist/admin/de-BFKoGEVT.js +544 -0
  16. package/dist/admin/de-j0oZH9Pz.mjs +544 -0
  17. package/dist/admin/en-UY4Tb5tE.mjs +544 -0
  18. package/dist/admin/en-s7Ksdkcg.js +544 -0
  19. package/dist/admin/es-07OGMe_5.js +544 -0
  20. package/dist/admin/es-DGBcZwQy.mjs +544 -0
  21. package/dist/admin/fr-B6-DWhGO.mjs +544 -0
  22. package/dist/admin/fr-ETj_2UBY.js +544 -0
  23. package/dist/admin/index-C_SyRULc.mjs +1750 -0
  24. package/dist/admin/index-D4kEnXSp.js +1751 -0
  25. package/dist/admin/index.js +1 -1
  26. package/dist/admin/index.mjs +2 -2
  27. package/dist/admin/maskSensitiveValue-BWcSjow7.js +9 -0
  28. package/dist/admin/maskSensitiveValue-lLRhN_S7.mjs +10 -0
  29. package/dist/admin/pt-C7PwrQtV.js +544 -0
  30. package/dist/admin/pt-YMRLm9gx.mjs +544 -0
  31. package/dist/server/index.js +3555 -6350
  32. package/dist/server/index.mjs +3555 -6350
  33. package/package.json +30 -19
  34. package/pics/analytics.png +0 -0
  35. package/pics/dashboard-dark.png +0 -0
  36. package/pics/dashboard.png +0 -0
  37. package/pics/dashboardsessionmodal.png +0 -0
  38. package/pics/mobile-dashboard.png +0 -0
  39. package/pics/mobile-session.png +0 -0
  40. package/pics/sessioninfopanel.png +0 -0
  41. package/pics/settings1.png +0 -0
  42. package/pics/settings2.png +0 -0
  43. package/pics/widget.png +0 -0
  44. package/scripts/geoip-updater.cjs +266 -36
  45. package/scripts/update-geoip-db.mjs +3 -0
  46. package/dist/admin/Analytics-CsrpxJwQ.mjs +0 -497
  47. package/dist/admin/Analytics-D03ZNNMR.js +0 -499
  48. package/dist/admin/App-B2VCS3cz.js +0 -1481
  49. package/dist/admin/App-qxKnK7G2.mjs +0 -1479
  50. package/dist/admin/License-ClW7sZLR.mjs +0 -318
  51. package/dist/admin/License-fixnQ7wF.js +0 -320
  52. package/dist/admin/OnlineUsersWidget-mR_OMiwi.mjs +0 -185
  53. package/dist/admin/OnlineUsersWidget-qb9utPBy.js +0 -185
  54. package/dist/admin/Settings-U3V4eGMo.mjs +0 -2038
  55. package/dist/admin/Settings-gv2BF54w.js +0 -2040
  56. package/dist/admin/StyledButtons-Cz8oYhmc.mjs +0 -418
  57. package/dist/admin/StyledButtons-DDuxnYz8.js +0 -419
  58. package/dist/admin/de-BnqGCokx.js +0 -316
  59. package/dist/admin/de-JBE-iylO.mjs +0 -316
  60. package/dist/admin/en-BRmVwd8-.js +0 -316
  61. package/dist/admin/en-kQWtdEai.mjs +0 -316
  62. package/dist/admin/es-CH691xcL.js +0 -301
  63. package/dist/admin/es-DOQvBxih.mjs +0 -301
  64. package/dist/admin/fr-CLExO0w_.js +0 -301
  65. package/dist/admin/fr-CmfCpepX.mjs +0 -301
  66. package/dist/admin/index-B_lFjUAg.mjs +0 -551
  67. package/dist/admin/index-Duc7cR_d.js +0 -552
  68. package/dist/admin/pt-BJ_F0yNi.js +0 -301
  69. package/dist/admin/pt-BSzZdyAH.mjs +0 -301
  70. package/dist/admin/sessionStatus-D_fWEzgj.js +0 -11
  71. package/dist/admin/sessionStatus-kwggjEMw.mjs +0 -12
@@ -0,0 +1,443 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const react = require("react");
5
+ const reactIntl = require("react-intl");
6
+ const designSystem = require("@strapi/design-system");
7
+ const StrapiAdmin = require("@strapi/strapi/admin");
8
+ const icons = require("@strapi/icons");
9
+ const index = require("./index-D4kEnXSp.js");
10
+ const SectionCard = require("./SectionCard-BlWv8CRt.js");
11
+ const maskSensitiveValue = require("./maskSensitiveValue-BWcSjow7.js");
12
+ const LICENSE_STATE_MESSAGES = Object.freeze({
13
+ noKey: Object.freeze({
14
+ messageId: "license.state.noKey",
15
+ defaultMessage: "No license key stored."
16
+ }),
17
+ valid: Object.freeze({
18
+ messageId: "license.state.valid",
19
+ defaultMessage: "License valid until {date}."
20
+ }),
21
+ validNoExpiry: Object.freeze({
22
+ messageId: "license.state.validNoExpiry",
23
+ defaultMessage: "License valid. It has no expiry date."
24
+ }),
25
+ expired: Object.freeze({
26
+ messageId: "license.state.expired",
27
+ defaultMessage: "License expired on {date}."
28
+ }),
29
+ expiredNoDate: Object.freeze({
30
+ messageId: "license.state.expiredNoDate",
31
+ defaultMessage: "License expired."
32
+ }),
33
+ invalid: Object.freeze({
34
+ messageId: "license.state.invalid",
35
+ defaultMessage: "This license key is not valid."
36
+ }),
37
+ unchecked: Object.freeze({
38
+ messageId: "license.state.unchecked",
39
+ defaultMessage: "The license status could not be checked."
40
+ })
41
+ });
42
+ const LICENSE_FEATURES_MESSAGE = Object.freeze({
43
+ messageId: "license.features.always",
44
+ defaultMessage: "All features are available with or without a key."
45
+ });
46
+ const LICENSE_EXPIRY_DATE_OPTIONS = Object.freeze({ dateStyle: "medium" });
47
+ const present = (value) => typeof value === "string" ? value.trim() !== "" : value !== null && value !== void 0;
48
+ function getLicenseState(response, now = Date.now()) {
49
+ const data = response?.data && typeof response.data === "object" ? response.data : {};
50
+ const hasKey = typeof response?.hasKey === "boolean" ? response.hasKey : present(data.licenseKey);
51
+ const expiresAt = present(data.expiresAt) ? data.expiresAt : null;
52
+ const expiresAtMs = expiresAt ? Date.parse(expiresAt) : Number.NaN;
53
+ const base = { hasKey, expiresAt, serverReachable: data.isOnline === true, data };
54
+ if (!hasKey) return { ...base, state: "noKey" };
55
+ const described = [
56
+ "email",
57
+ "firstName",
58
+ "lastName",
59
+ "expiresAt",
60
+ "lastPingAt",
61
+ "deviceName"
62
+ ].some((field) => present(data[field]));
63
+ if (!described) return { ...base, state: "unchecked" };
64
+ const expired = data.isExpired === true || Number.isFinite(expiresAtMs) && expiresAtMs <= now;
65
+ if (expired)
66
+ return { ...base, state: Number.isFinite(expiresAtMs) ? "expired" : "expiredNoDate" };
67
+ if (data.isActive === false) return { ...base, state: "invalid" };
68
+ return { ...base, state: Number.isFinite(expiresAtMs) ? "valid" : "validNoExpiry" };
69
+ }
70
+ function describeLicenseState(licenseState, formatDate) {
71
+ const descriptor = LICENSE_STATE_MESSAGES[licenseState?.state] || LICENSE_STATE_MESSAGES.unchecked;
72
+ if (licenseState?.state === "valid" || licenseState?.state === "expired") {
73
+ return {
74
+ ...descriptor,
75
+ values: { date: formatDate(licenseState.expiresAt, LICENSE_EXPIRY_DATE_OPTIONS) }
76
+ };
77
+ }
78
+ return { ...descriptor };
79
+ }
80
+ const LICENSE_SUMMARY_MESSAGES = Object.freeze({
81
+ heading: Object.freeze({
82
+ messageId: "license.download.heading",
83
+ defaultMessage: "Session Manager license"
84
+ }),
85
+ status: Object.freeze({ messageId: "license.download.status", defaultMessage: "Status" }),
86
+ key: Object.freeze({ messageId: "license.key.title", defaultMessage: "License key" }),
87
+ holder: Object.freeze({ messageId: "license.details.holder", defaultMessage: "Holder" }),
88
+ email: Object.freeze({ messageId: "license.account.email", defaultMessage: "Email address" }),
89
+ expires: Object.freeze({ messageId: "license.details.expires", defaultMessage: "Expires" }),
90
+ noExpiry: Object.freeze({
91
+ messageId: "license.details.noExpiry",
92
+ defaultMessage: "No expiry date"
93
+ }),
94
+ deviceName: Object.freeze({
95
+ messageId: "license.details.deviceName",
96
+ defaultMessage: "Device name"
97
+ }),
98
+ ipAddress: Object.freeze({
99
+ messageId: "license.details.ipAddress",
100
+ defaultMessage: "IP address"
101
+ }),
102
+ lastCheck: Object.freeze({
103
+ messageId: "license.details.lastCheck",
104
+ defaultMessage: "Last check"
105
+ }),
106
+ deviceLimit: Object.freeze({
107
+ messageId: "license.system.deviceLimit",
108
+ defaultMessage: "Device limit"
109
+ }),
110
+ deviceLimitValue: Object.freeze({
111
+ messageId: "license.system.deviceLimitValue",
112
+ defaultMessage: "{current} of {max}"
113
+ }),
114
+ serverReachable: Object.freeze({
115
+ messageId: "license.details.serverReachable",
116
+ defaultMessage: "License server reachable"
117
+ }),
118
+ yes: Object.freeze({ messageId: "common.yes", defaultMessage: "Yes" }),
119
+ no: Object.freeze({ messageId: "common.no", defaultMessage: "No" }),
120
+ generated: Object.freeze({
121
+ messageId: "license.download.generated",
122
+ defaultMessage: "Generated"
123
+ }),
124
+ notProvided: Object.freeze({
125
+ messageId: "license.value.notProvided",
126
+ defaultMessage: "Not provided"
127
+ })
128
+ });
129
+ const RULE = "========================================";
130
+ const text = (value) => typeof value === "string" ? value.trim() : "";
131
+ function getLicenseHolderName(data) {
132
+ return [text(data?.firstName), text(data?.lastName)].filter(Boolean).join(" ");
133
+ }
134
+ function buildLicenseSummary({
135
+ response,
136
+ translate,
137
+ formatDate,
138
+ generatedAt = Date.now(),
139
+ now = Date.now()
140
+ }) {
141
+ const m = LICENSE_SUMMARY_MESSAGES;
142
+ const licenseState = getLicenseState(response, now);
143
+ const data = licenseState.data;
144
+ const statusMessage = describeLicenseState(licenseState, formatDate);
145
+ const notProvided = translate(m.notProvided);
146
+ const orMissing = (value) => text(value) || notProvided;
147
+ const line = (descriptor, value) => `${translate(descriptor)}: ${value}`;
148
+ return [
149
+ translate(m.heading),
150
+ RULE,
151
+ line(m.status, translate(statusMessage, statusMessage.values)),
152
+ translate(LICENSE_FEATURES_MESSAGE),
153
+ "",
154
+ line(m.key, orMissing(data.licenseKey)),
155
+ line(m.holder, getLicenseHolderName(data) || notProvided),
156
+ line(m.email, orMissing(data.email)),
157
+ line(
158
+ m.expires,
159
+ licenseState.expiresAt ? formatDate(licenseState.expiresAt, LICENSE_EXPIRY_DATE_OPTIONS) : translate(m.noExpiry)
160
+ ),
161
+ line(m.deviceName, orMissing(data.deviceName)),
162
+ line(m.ipAddress, orMissing(data.ipAddress)),
163
+ line(m.lastCheck, data.lastPingAt ? formatDate(data.lastPingAt) : notProvided),
164
+ line(
165
+ m.deviceLimit,
166
+ translate(m.deviceLimitValue, {
167
+ current: Number(data.currentDevices) || 0,
168
+ max: Number(data.maxDevices) || 1
169
+ })
170
+ ),
171
+ line(m.serverReachable, translate(licenseState.serverReachable ? m.yes : m.no)),
172
+ RULE,
173
+ line(m.generated, formatDate(generatedAt)),
174
+ ""
175
+ ].join("\n");
176
+ }
177
+ const isForbidden = (error) => error?.status === 403 || error?.response?.status === 403;
178
+ const LicensePage = () => {
179
+ const { formatMessage } = reactIntl.useIntl();
180
+ const { get } = StrapiAdmin.useFetchClient();
181
+ const { toggleNotification } = StrapiAdmin.useNotification();
182
+ const { copy } = StrapiAdmin.useClipboard();
183
+ const { formatDate } = index.useSessionFormatters();
184
+ const t = (id, defaultMessage, values) => formatMessage({ id: index.getTranslation(id), defaultMessage }, values);
185
+ const translate = (descriptor, values) => formatMessage(
186
+ { id: index.getTranslation(descriptor.messageId), defaultMessage: descriptor.defaultMessage },
187
+ values
188
+ );
189
+ const [loading, setLoading] = react.useState(true);
190
+ const [refreshing, setRefreshing] = react.useState(false);
191
+ const [licenseData, setLicenseData] = react.useState(null);
192
+ const [showLicenseKey, setShowLicenseKey] = react.useState(false);
193
+ const [error, setError] = react.useState(false);
194
+ const [forbidden, setForbidden] = react.useState(false);
195
+ const requestPendingRef = react.useRef(false);
196
+ const fetchLicenseStatus = react.useCallback(async () => {
197
+ if (requestPendingRef.current) return false;
198
+ requestPendingRef.current = true;
199
+ try {
200
+ const response = await get(`/${index.pluginId}/license/status`);
201
+ setLicenseData(response.data);
202
+ setError(false);
203
+ return true;
204
+ } catch (err) {
205
+ index.logSafeAdminError("license.load", err);
206
+ if (isForbidden(err)) setForbidden(true);
207
+ setError(true);
208
+ return false;
209
+ } finally {
210
+ requestPendingRef.current = false;
211
+ setRefreshing(false);
212
+ setLoading(false);
213
+ }
214
+ }, [get]);
215
+ const checkLicenseStatus = async ({ announce }) => {
216
+ if (requestPendingRef.current) return;
217
+ setRefreshing(true);
218
+ const loaded = await fetchLicenseStatus();
219
+ if (loaded && announce) {
220
+ toggleNotification({
221
+ type: "success",
222
+ message: t("license.success.refreshed", "License status checked.")
223
+ });
224
+ }
225
+ };
226
+ const handleRefresh = () => checkLicenseStatus({ announce: true });
227
+ const handleCopyLicenseKey = async () => {
228
+ try {
229
+ const copied = await copy(licenseData?.data?.licenseKey || "");
230
+ if (!copied) throw new Error("clipboard_unavailable");
231
+ toggleNotification({
232
+ type: "success",
233
+ message: t("license.success.copied", "Copied.")
234
+ });
235
+ } catch (err) {
236
+ index.logSafeAdminError("license.copyKey", err);
237
+ toggleNotification({
238
+ type: "danger",
239
+ message: t("license.error.copy", "The key could not be copied.")
240
+ });
241
+ }
242
+ };
243
+ const handleDownloadLicenseKey = () => {
244
+ try {
245
+ const content = buildLicenseSummary({
246
+ response: licenseData,
247
+ translate,
248
+ formatDate,
249
+ generatedAt: Date.now()
250
+ });
251
+ const blob = new Blob([content], { type: "text/plain;charset=utf-8" });
252
+ const url = window.URL.createObjectURL(blob);
253
+ const link = document.createElement("a");
254
+ link.href = url;
255
+ link.download = "session-manager-license.txt";
256
+ document.body.appendChild(link);
257
+ link.click();
258
+ document.body.removeChild(link);
259
+ window.URL.revokeObjectURL(url);
260
+ toggleNotification({
261
+ type: "success",
262
+ message: t("license.success.downloaded", "License details downloaded.")
263
+ });
264
+ } catch (err) {
265
+ index.logSafeAdminError("license.download", err);
266
+ toggleNotification({
267
+ type: "danger",
268
+ message: t("license.error.download", "The file could not be created.")
269
+ });
270
+ }
271
+ };
272
+ react.useEffect(() => {
273
+ fetchLicenseStatus();
274
+ }, [fetchLicenseStatus]);
275
+ if (loading) {
276
+ return /* @__PURE__ */ jsxRuntime.jsx(StrapiAdmin.Page.Loading, {});
277
+ }
278
+ if (forbidden) {
279
+ return /* @__PURE__ */ jsxRuntime.jsx(StrapiAdmin.Page.NoPermissions, {});
280
+ }
281
+ const licenseState = licenseData ? getLicenseState(licenseData) : null;
282
+ const hasKey = licenseState?.hasKey === true;
283
+ const data = licenseState?.data || {};
284
+ const statusMessage = licenseState ? describeLicenseState(licenseState, formatDate) : null;
285
+ const yesNo = (value) => value ? t("common.yes", "Yes") : t("common.no", "No");
286
+ const detailItems = [
287
+ {
288
+ id: "holder",
289
+ label: t("license.details.holder", "Holder"),
290
+ value: getLicenseHolderName(data)
291
+ },
292
+ {
293
+ id: "email",
294
+ kind: "email",
295
+ label: t("license.account.email", "Email address"),
296
+ value: data.email
297
+ },
298
+ {
299
+ id: "expires",
300
+ label: t("license.details.expires", "Expires"),
301
+ value: licenseState?.expiresAt ? formatDate(licenseState.expiresAt, LICENSE_EXPIRY_DATE_OPTIONS) : t("license.details.noExpiry", "No expiry date")
302
+ },
303
+ {
304
+ id: "device-name",
305
+ label: t("license.details.deviceName", "Device name"),
306
+ value: data.deviceName
307
+ },
308
+ {
309
+ id: "ip",
310
+ kind: "id",
311
+ label: t("license.details.ipAddress", "IP address"),
312
+ value: data.ipAddress
313
+ },
314
+ {
315
+ id: "last-check",
316
+ label: t("license.details.lastCheck", "Last check"),
317
+ value: data.lastPingAt ? formatDate(data.lastPingAt) : null
318
+ },
319
+ {
320
+ id: "device-limit",
321
+ label: t("license.system.deviceLimit", "Device limit"),
322
+ value: t("license.system.deviceLimitValue", "{current} of {max}", {
323
+ current: Number(data.currentDevices) || 0,
324
+ max: Number(data.maxDevices) || 1
325
+ })
326
+ },
327
+ {
328
+ id: "server-reachable",
329
+ label: t("license.details.serverReachable", "License server reachable"),
330
+ render: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { children: yesNo(licenseState?.serverReachable) })
331
+ }
332
+ ];
333
+ return /* @__PURE__ */ jsxRuntime.jsxs(
334
+ index.PageShell,
335
+ {
336
+ headingId: "magic-sessionmanager-license-title",
337
+ title: t("license.title", "License"),
338
+ subtitle: t("license.subtitle", "Optional license key for this installation."),
339
+ primaryAction: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, wrap: "wrap", justifyContent: "flex-end", children: [
340
+ hasKey ? /* @__PURE__ */ jsxRuntime.jsx(
341
+ designSystem.Button,
342
+ {
343
+ variant: "secondary",
344
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, { "aria-hidden": true }),
345
+ onClick: handleDownloadLicenseKey,
346
+ children: t("license.key.download", "Download as text")
347
+ }
348
+ ) : null,
349
+ /* @__PURE__ */ jsxRuntime.jsx(
350
+ designSystem.Button,
351
+ {
352
+ variant: "secondary",
353
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowClockwise, { "aria-hidden": true }),
354
+ onClick: handleRefresh,
355
+ "aria-busy": refreshing,
356
+ children: t("license.refresh", "Check again")
357
+ }
358
+ )
359
+ ] }),
360
+ children: [
361
+ /* @__PURE__ */ jsxRuntime.jsxs(SectionCard.SectionCard, { title: t("license.status.title", "License status"), children: [
362
+ error ? /* @__PURE__ */ jsxRuntime.jsx(
363
+ index.PersistentAlert,
364
+ {
365
+ variant: "danger",
366
+ closeLabel: t("common.close", "Close"),
367
+ action: /* @__PURE__ */ jsxRuntime.jsx(
368
+ designSystem.Button,
369
+ {
370
+ variant: "secondary",
371
+ onClick: () => checkLicenseStatus({ announce: false }),
372
+ "aria-busy": refreshing,
373
+ children: t("license.error.retry", "Try again")
374
+ }
375
+ ),
376
+ children: /* @__PURE__ */ jsxRuntime.jsx(index.ReadableText, { variant: "omega", textColor: "neutral800", tag: "span", children: t("license.error.load", "The license status could not be checked.") })
377
+ }
378
+ ) : null,
379
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, "aria-live": "polite", children: [
380
+ statusMessage ? /* @__PURE__ */ jsxRuntime.jsx(
381
+ designSystem.Typography,
382
+ {
383
+ variant: "omega",
384
+ tag: "p",
385
+ textColor: "neutral800",
386
+ fontWeight: "semiBold",
387
+ "data-license-state": "",
388
+ children: translate(statusMessage, statusMessage.values)
389
+ }
390
+ ) : null,
391
+ /* @__PURE__ */ jsxRuntime.jsx(index.ReadableText, { variant: "omega", textColor: "neutral600", tag: "p", children: translate(LICENSE_FEATURES_MESSAGE) })
392
+ ] })
393
+ ] }),
394
+ hasKey ? /* @__PURE__ */ jsxRuntime.jsx(SectionCard.SectionCard, { title: t("license.details.title", "License details"), children: /* @__PURE__ */ jsxRuntime.jsx(index.PropertyList, { items: detailItems }) }) : null,
395
+ hasKey ? /* @__PURE__ */ jsxRuntime.jsx(SectionCard.SectionCard, { title: t("license.key.title", "License key"), children: /* @__PURE__ */ jsxRuntime.jsxs(
396
+ designSystem.Field.Root,
397
+ {
398
+ name: "license-key",
399
+ id: "magic-sessionmanager-license-key",
400
+ hint: t("license.key.hint", "The key stays masked until you reveal it."),
401
+ children: [
402
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: t("license.key.label", "Stored key") }),
403
+ /* @__PURE__ */ jsxRuntime.jsx(
404
+ designSystem.TextInput,
405
+ {
406
+ readOnly: true,
407
+ autoComplete: "off",
408
+ spellCheck: false,
409
+ value: showLicenseKey ? data.licenseKey : maskSensitiveValue.maskSensitiveValue(data.licenseKey),
410
+ endAction: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 1, children: [
411
+ /* @__PURE__ */ jsxRuntime.jsx(
412
+ designSystem.IconButton,
413
+ {
414
+ variant: "ghost",
415
+ label: t(
416
+ showLicenseKey ? "license.key.hide" : "license.key.show",
417
+ showLicenseKey ? "Hide key" : "Show key"
418
+ ),
419
+ onClick: () => setShowLicenseKey((visible) => !visible),
420
+ children: showLicenseKey ? /* @__PURE__ */ jsxRuntime.jsx(icons.EyeStriked, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntime.jsx(icons.Eye, { "aria-hidden": true })
421
+ }
422
+ ),
423
+ /* @__PURE__ */ jsxRuntime.jsx(
424
+ designSystem.IconButton,
425
+ {
426
+ variant: "ghost",
427
+ label: t("license.key.copy", "Copy key"),
428
+ onClick: handleCopyLicenseKey,
429
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Duplicate, { "aria-hidden": true })
430
+ }
431
+ )
432
+ ] })
433
+ }
434
+ ),
435
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
436
+ ]
437
+ }
438
+ ) }) : null
439
+ ]
440
+ }
441
+ );
442
+ };
443
+ exports.default = LicensePage;