@strapi-community/plugin-io 1.0.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.
@@ -0,0 +1,411 @@
1
+ import * as React from "react";
2
+ var __assign = function() {
3
+ __assign = Object.assign || function __assign2(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ function __rest(s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ }
23
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
24
+ var e = new Error(message);
25
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
26
+ };
27
+ var reactIs$1 = { exports: {} };
28
+ var reactIs_production_min = {};
29
+ /** @license React v16.13.1
30
+ * react-is.production.min.js
31
+ *
32
+ * Copyright (c) Facebook, Inc. and its affiliates.
33
+ *
34
+ * This source code is licensed under the MIT license found in the
35
+ * LICENSE file in the root directory of this source tree.
36
+ */
37
+ var hasRequiredReactIs_production_min;
38
+ function requireReactIs_production_min() {
39
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
40
+ hasRequiredReactIs_production_min = 1;
41
+ var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
42
+ function z(a) {
43
+ if ("object" === typeof a && null !== a) {
44
+ var u = a.$$typeof;
45
+ switch (u) {
46
+ case c:
47
+ switch (a = a.type, a) {
48
+ case l:
49
+ case m:
50
+ case e:
51
+ case g:
52
+ case f:
53
+ case p:
54
+ return a;
55
+ default:
56
+ switch (a = a && a.$$typeof, a) {
57
+ case k:
58
+ case n:
59
+ case t:
60
+ case r:
61
+ case h:
62
+ return a;
63
+ default:
64
+ return u;
65
+ }
66
+ }
67
+ case d:
68
+ return u;
69
+ }
70
+ }
71
+ }
72
+ function A(a) {
73
+ return z(a) === m;
74
+ }
75
+ reactIs_production_min.AsyncMode = l;
76
+ reactIs_production_min.ConcurrentMode = m;
77
+ reactIs_production_min.ContextConsumer = k;
78
+ reactIs_production_min.ContextProvider = h;
79
+ reactIs_production_min.Element = c;
80
+ reactIs_production_min.ForwardRef = n;
81
+ reactIs_production_min.Fragment = e;
82
+ reactIs_production_min.Lazy = t;
83
+ reactIs_production_min.Memo = r;
84
+ reactIs_production_min.Portal = d;
85
+ reactIs_production_min.Profiler = g;
86
+ reactIs_production_min.StrictMode = f;
87
+ reactIs_production_min.Suspense = p;
88
+ reactIs_production_min.isAsyncMode = function(a) {
89
+ return A(a) || z(a) === l;
90
+ };
91
+ reactIs_production_min.isConcurrentMode = A;
92
+ reactIs_production_min.isContextConsumer = function(a) {
93
+ return z(a) === k;
94
+ };
95
+ reactIs_production_min.isContextProvider = function(a) {
96
+ return z(a) === h;
97
+ };
98
+ reactIs_production_min.isElement = function(a) {
99
+ return "object" === typeof a && null !== a && a.$$typeof === c;
100
+ };
101
+ reactIs_production_min.isForwardRef = function(a) {
102
+ return z(a) === n;
103
+ };
104
+ reactIs_production_min.isFragment = function(a) {
105
+ return z(a) === e;
106
+ };
107
+ reactIs_production_min.isLazy = function(a) {
108
+ return z(a) === t;
109
+ };
110
+ reactIs_production_min.isMemo = function(a) {
111
+ return z(a) === r;
112
+ };
113
+ reactIs_production_min.isPortal = function(a) {
114
+ return z(a) === d;
115
+ };
116
+ reactIs_production_min.isProfiler = function(a) {
117
+ return z(a) === g;
118
+ };
119
+ reactIs_production_min.isStrictMode = function(a) {
120
+ return z(a) === f;
121
+ };
122
+ reactIs_production_min.isSuspense = function(a) {
123
+ return z(a) === p;
124
+ };
125
+ reactIs_production_min.isValidElementType = function(a) {
126
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
127
+ };
128
+ reactIs_production_min.typeOf = z;
129
+ return reactIs_production_min;
130
+ }
131
+ var reactIs_development = {};
132
+ /** @license React v16.13.1
133
+ * react-is.development.js
134
+ *
135
+ * Copyright (c) Facebook, Inc. and its affiliates.
136
+ *
137
+ * This source code is licensed under the MIT license found in the
138
+ * LICENSE file in the root directory of this source tree.
139
+ */
140
+ var hasRequiredReactIs_development;
141
+ function requireReactIs_development() {
142
+ if (hasRequiredReactIs_development) return reactIs_development;
143
+ hasRequiredReactIs_development = 1;
144
+ if (process.env.NODE_ENV !== "production") {
145
+ (function() {
146
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
147
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
148
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
149
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
150
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
151
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
152
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
153
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
154
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
155
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
156
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
157
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
158
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
159
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
160
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
161
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
162
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
163
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
164
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
165
+ function isValidElementType(type) {
166
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
167
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
168
+ }
169
+ function typeOf(object) {
170
+ if (typeof object === "object" && object !== null) {
171
+ var $$typeof = object.$$typeof;
172
+ switch ($$typeof) {
173
+ case REACT_ELEMENT_TYPE:
174
+ var type = object.type;
175
+ switch (type) {
176
+ case REACT_ASYNC_MODE_TYPE:
177
+ case REACT_CONCURRENT_MODE_TYPE:
178
+ case REACT_FRAGMENT_TYPE:
179
+ case REACT_PROFILER_TYPE:
180
+ case REACT_STRICT_MODE_TYPE:
181
+ case REACT_SUSPENSE_TYPE:
182
+ return type;
183
+ default:
184
+ var $$typeofType = type && type.$$typeof;
185
+ switch ($$typeofType) {
186
+ case REACT_CONTEXT_TYPE:
187
+ case REACT_FORWARD_REF_TYPE:
188
+ case REACT_LAZY_TYPE:
189
+ case REACT_MEMO_TYPE:
190
+ case REACT_PROVIDER_TYPE:
191
+ return $$typeofType;
192
+ default:
193
+ return $$typeof;
194
+ }
195
+ }
196
+ case REACT_PORTAL_TYPE:
197
+ return $$typeof;
198
+ }
199
+ }
200
+ return void 0;
201
+ }
202
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
203
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
204
+ var ContextConsumer = REACT_CONTEXT_TYPE;
205
+ var ContextProvider = REACT_PROVIDER_TYPE;
206
+ var Element = REACT_ELEMENT_TYPE;
207
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
208
+ var Fragment = REACT_FRAGMENT_TYPE;
209
+ var Lazy = REACT_LAZY_TYPE;
210
+ var Memo = REACT_MEMO_TYPE;
211
+ var Portal = REACT_PORTAL_TYPE;
212
+ var Profiler = REACT_PROFILER_TYPE;
213
+ var StrictMode = REACT_STRICT_MODE_TYPE;
214
+ var Suspense = REACT_SUSPENSE_TYPE;
215
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
216
+ function isAsyncMode(object) {
217
+ {
218
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
219
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
220
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
221
+ }
222
+ }
223
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
224
+ }
225
+ function isConcurrentMode(object) {
226
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
227
+ }
228
+ function isContextConsumer(object) {
229
+ return typeOf(object) === REACT_CONTEXT_TYPE;
230
+ }
231
+ function isContextProvider(object) {
232
+ return typeOf(object) === REACT_PROVIDER_TYPE;
233
+ }
234
+ function isElement(object) {
235
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
236
+ }
237
+ function isForwardRef(object) {
238
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
239
+ }
240
+ function isFragment(object) {
241
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
242
+ }
243
+ function isLazy(object) {
244
+ return typeOf(object) === REACT_LAZY_TYPE;
245
+ }
246
+ function isMemo(object) {
247
+ return typeOf(object) === REACT_MEMO_TYPE;
248
+ }
249
+ function isPortal(object) {
250
+ return typeOf(object) === REACT_PORTAL_TYPE;
251
+ }
252
+ function isProfiler(object) {
253
+ return typeOf(object) === REACT_PROFILER_TYPE;
254
+ }
255
+ function isStrictMode(object) {
256
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
257
+ }
258
+ function isSuspense(object) {
259
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
260
+ }
261
+ reactIs_development.AsyncMode = AsyncMode;
262
+ reactIs_development.ConcurrentMode = ConcurrentMode;
263
+ reactIs_development.ContextConsumer = ContextConsumer;
264
+ reactIs_development.ContextProvider = ContextProvider;
265
+ reactIs_development.Element = Element;
266
+ reactIs_development.ForwardRef = ForwardRef;
267
+ reactIs_development.Fragment = Fragment;
268
+ reactIs_development.Lazy = Lazy;
269
+ reactIs_development.Memo = Memo;
270
+ reactIs_development.Portal = Portal;
271
+ reactIs_development.Profiler = Profiler;
272
+ reactIs_development.StrictMode = StrictMode;
273
+ reactIs_development.Suspense = Suspense;
274
+ reactIs_development.isAsyncMode = isAsyncMode;
275
+ reactIs_development.isConcurrentMode = isConcurrentMode;
276
+ reactIs_development.isContextConsumer = isContextConsumer;
277
+ reactIs_development.isContextProvider = isContextProvider;
278
+ reactIs_development.isElement = isElement;
279
+ reactIs_development.isForwardRef = isForwardRef;
280
+ reactIs_development.isFragment = isFragment;
281
+ reactIs_development.isLazy = isLazy;
282
+ reactIs_development.isMemo = isMemo;
283
+ reactIs_development.isPortal = isPortal;
284
+ reactIs_development.isProfiler = isProfiler;
285
+ reactIs_development.isStrictMode = isStrictMode;
286
+ reactIs_development.isSuspense = isSuspense;
287
+ reactIs_development.isValidElementType = isValidElementType;
288
+ reactIs_development.typeOf = typeOf;
289
+ })();
290
+ }
291
+ return reactIs_development;
292
+ }
293
+ if (process.env.NODE_ENV === "production") {
294
+ reactIs$1.exports = requireReactIs_production_min();
295
+ } else {
296
+ reactIs$1.exports = requireReactIs_development();
297
+ }
298
+ var reactIsExports = reactIs$1.exports;
299
+ var reactIs = reactIsExports;
300
+ var FORWARD_REF_STATICS = {
301
+ "$$typeof": true,
302
+ render: true,
303
+ defaultProps: true,
304
+ displayName: true,
305
+ propTypes: true
306
+ };
307
+ var MEMO_STATICS = {
308
+ "$$typeof": true,
309
+ compare: true,
310
+ defaultProps: true,
311
+ displayName: true,
312
+ propTypes: true,
313
+ type: true
314
+ };
315
+ var TYPE_STATICS = {};
316
+ TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
317
+ TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
318
+ function invariant(condition, message, Err) {
319
+ if (Err === void 0) {
320
+ Err = Error;
321
+ }
322
+ if (!condition) {
323
+ throw new Err(message);
324
+ }
325
+ }
326
+ var defaultErrorHandler = function(error) {
327
+ if (process.env.NODE_ENV !== "production") {
328
+ console.error(error);
329
+ }
330
+ };
331
+ var defaultWarnHandler = function(warning) {
332
+ if (process.env.NODE_ENV !== "production") {
333
+ console.warn(warning);
334
+ }
335
+ };
336
+ var DEFAULT_INTL_CONFIG = {
337
+ formats: {},
338
+ messages: {},
339
+ timeZone: void 0,
340
+ defaultLocale: "en",
341
+ defaultFormats: {},
342
+ fallbackOnEmptyString: true,
343
+ onError: defaultErrorHandler,
344
+ onWarn: defaultWarnHandler
345
+ };
346
+ function invariantIntlContext(intl) {
347
+ invariant(intl, "[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.");
348
+ }
349
+ __assign(__assign({}, DEFAULT_INTL_CONFIG), { textComponent: React.Fragment });
350
+ var IntlContext = typeof window !== "undefined" && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__ ? window.__REACT_INTL_CONTEXT__ || (window.__REACT_INTL_CONTEXT__ = React.createContext(null)) : React.createContext(null);
351
+ IntlContext.Consumer;
352
+ IntlContext.Provider;
353
+ var Context = IntlContext;
354
+ function useIntl() {
355
+ var intl = React.useContext(Context);
356
+ invariantIntlContext(intl);
357
+ return intl;
358
+ }
359
+ var DisplayName;
360
+ (function(DisplayName2) {
361
+ DisplayName2["formatDate"] = "FormattedDate";
362
+ DisplayName2["formatTime"] = "FormattedTime";
363
+ DisplayName2["formatNumber"] = "FormattedNumber";
364
+ DisplayName2["formatList"] = "FormattedList";
365
+ DisplayName2["formatDisplayName"] = "FormattedDisplayName";
366
+ })(DisplayName || (DisplayName = {}));
367
+ var DisplayNameParts;
368
+ (function(DisplayNameParts2) {
369
+ DisplayNameParts2["formatDate"] = "FormattedDateParts";
370
+ DisplayNameParts2["formatTime"] = "FormattedTimeParts";
371
+ DisplayNameParts2["formatNumber"] = "FormattedNumberParts";
372
+ DisplayNameParts2["formatList"] = "FormattedListParts";
373
+ })(DisplayNameParts || (DisplayNameParts = {}));
374
+ function createFormattedDateTimePartsComponent(name) {
375
+ var ComponentParts = function(props) {
376
+ var intl = useIntl();
377
+ var value = props.value, children = props.children, formatProps = __rest(props, ["value", "children"]);
378
+ var date = typeof value === "string" ? new Date(value || 0) : value;
379
+ var formattedParts = name === "formatDate" ? intl.formatDateToParts(date, formatProps) : intl.formatTimeToParts(date, formatProps);
380
+ return children(formattedParts);
381
+ };
382
+ ComponentParts.displayName = DisplayNameParts[name];
383
+ return ComponentParts;
384
+ }
385
+ function createFormattedComponent(name) {
386
+ var Component = function(props) {
387
+ var intl = useIntl();
388
+ var value = props.value, children = props.children, formatProps = __rest(
389
+ props,
390
+ ["value", "children"]
391
+ );
392
+ var formattedValue = intl[name](value, formatProps);
393
+ if (typeof children === "function") {
394
+ return children(formattedValue);
395
+ }
396
+ var Text = intl.textComponent || React.Fragment;
397
+ return React.createElement(Text, null, formattedValue);
398
+ };
399
+ Component.displayName = DisplayName[name];
400
+ return Component;
401
+ }
402
+ createFormattedComponent("formatDate");
403
+ createFormattedComponent("formatTime");
404
+ createFormattedComponent("formatNumber");
405
+ createFormattedComponent("formatList");
406
+ createFormattedComponent("formatDisplayName");
407
+ createFormattedDateTimePartsComponent("formatDate");
408
+ createFormattedDateTimePartsComponent("formatTime");
409
+ export {
410
+ useIntl as u
411
+ };
@@ -0,0 +1,114 @@
1
+ import { useRef, useEffect } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Server } from "@strapi/icons";
4
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
5
+ const v = glob[path];
6
+ if (v) {
7
+ return typeof v === "function" ? v() : Promise.resolve(v);
8
+ }
9
+ return new Promise((_, reject) => {
10
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
11
+ reject.bind(
12
+ null,
13
+ new Error(
14
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
15
+ )
16
+ )
17
+ );
18
+ });
19
+ };
20
+ const PLUGIN_ID = "io";
21
+ const Initializer = ({ setPlugin }) => {
22
+ const ref = useRef(setPlugin);
23
+ useEffect(() => {
24
+ ref.current(PLUGIN_ID);
25
+ }, []);
26
+ return null;
27
+ };
28
+ const PluginIcon = () => /* @__PURE__ */ jsx(Server, {});
29
+ const index = {
30
+ register(app) {
31
+ app.registerPlugin({
32
+ id: PLUGIN_ID,
33
+ initializer: Initializer,
34
+ isReady: false,
35
+ name: PLUGIN_ID
36
+ });
37
+ app.createSettingSection(
38
+ {
39
+ id: PLUGIN_ID,
40
+ intlLabel: {
41
+ id: `${PLUGIN_ID}.plugin.name`,
42
+ defaultMessage: "Socket.IO"
43
+ }
44
+ },
45
+ [
46
+ {
47
+ intlLabel: {
48
+ id: `${PLUGIN_ID}.settings.title`,
49
+ defaultMessage: "Settings"
50
+ },
51
+ id: `${PLUGIN_ID}-settings`,
52
+ to: `${PLUGIN_ID}/settings`,
53
+ Component: () => import("./SettingsPage-DBIu309c.mjs").then((mod) => ({ default: mod.SettingsPage }))
54
+ },
55
+ {
56
+ intlLabel: {
57
+ id: `${PLUGIN_ID}.monitoring.title`,
58
+ defaultMessage: "Monitoring"
59
+ },
60
+ id: `${PLUGIN_ID}-monitoring`,
61
+ to: `${PLUGIN_ID}/monitoring`,
62
+ Component: () => import("./MonitoringPage-DLZdTZpg.mjs").then((mod) => ({ default: mod.MonitoringPage }))
63
+ }
64
+ ]
65
+ );
66
+ if ("widgets" in app) {
67
+ app.widgets.register({
68
+ icon: PluginIcon,
69
+ title: {
70
+ id: `${PLUGIN_ID}.widget.socket-stats.title`,
71
+ defaultMessage: "Socket.IO Stats"
72
+ },
73
+ component: async () => {
74
+ const component = await import("./SocketStatsWidget--uGHcYvU.mjs");
75
+ return component.SocketStatsWidget;
76
+ },
77
+ id: "socket-io-stats-widget",
78
+ pluginId: PLUGIN_ID
79
+ });
80
+ console.log(`[${PLUGIN_ID}] ✅ Socket.IO Stats Widget registered`);
81
+ }
82
+ },
83
+ bootstrap(app) {
84
+ console.log(`[${PLUGIN_ID}] Bootstrapping plugin...`);
85
+ },
86
+ async registerTrads({ locales }) {
87
+ const importedTrads = await Promise.all(
88
+ locales.map((locale) => {
89
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-BoFxKIL3.mjs"), "./translations/en.json": () => import("./en-B4_6Q0aQ.mjs"), "./translations/es.json": () => import("./es-CCwv5Ulk.mjs"), "./translations/fr.json": () => import("./fr-DtBI9vH_.mjs"), "./translations/pt.json": () => import("./pt-I9epJZpI.mjs") }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
90
+ return {
91
+ data: prefixPluginTranslations(data, PLUGIN_ID),
92
+ locale
93
+ };
94
+ }).catch(() => {
95
+ return {
96
+ data: {},
97
+ locale
98
+ };
99
+ });
100
+ })
101
+ );
102
+ return Promise.resolve(importedTrads);
103
+ }
104
+ };
105
+ const prefixPluginTranslations = (trad, pluginId) => {
106
+ return Object.keys(trad).reduce((acc, current) => {
107
+ acc[`${pluginId}.${current}`] = trad[current];
108
+ return acc;
109
+ }, {});
110
+ };
111
+ export {
112
+ PLUGIN_ID as P,
113
+ index as i
114
+ };