@tenorlab/react-dashboard 1.2.4 → 1.2.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.
@@ -135,10 +135,9 @@ const Tt = [
135
135
  };
136
136
  }), e;
137
137
  }, ge = (e, n) => {
138
- const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], i = n?.title || e, o = n?.description || (t ? "Container" : "Unknown");
138
+ const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], i = n?.name || e, o = n?.description || (t ? "Container" : "Unknown");
139
139
  return {
140
- title: i,
141
- name: e,
140
+ name: i,
142
141
  description: o,
143
142
  categories: r,
144
143
  noDuplicatedWidgets: !0,
@@ -200,7 +199,7 @@ const Tt = [
200
199
  const d = o[a], b = () => import(
201
200
  /* @vite-ignore */
202
201
  d.url
203
- ), g = {
202
+ ), m = {
204
203
  name: d.meta?.name || "Unknown",
205
204
  description: d.meta?.description || "Remote Plugin",
206
205
  categories: d.meta?.categories || ["Widget"],
@@ -209,7 +208,7 @@ const Tt = [
209
208
  // Or a logic to map a string name to a Lucide component
210
209
  externalDependencies: d.meta?.externalDependencies || []
211
210
  };
212
- r.push(dt(a, b, g));
211
+ r.push(dt(a, b, m));
213
212
  }
214
213
  n({
215
214
  entries: r,
@@ -228,10 +227,9 @@ const Tt = [
228
227
  for (const o in n) {
229
228
  const a = n[o], d = It(o);
230
229
  if (d && a) {
231
- const { key: b, title: g, folder: h } = d;
230
+ const { key: b, title: m, folder: h } = d;
232
231
  let u = Ot(t, e, h, b);
233
232
  if (u || (u = ge(b, {
234
- title: g,
235
233
  description: `Local ${r ? "dynamic" : "static"} widget`
236
234
  })), r)
237
235
  i.push(
@@ -246,13 +244,13 @@ const Tt = [
246
244
  return i;
247
245
  }, Le = (e) => {
248
246
  let n;
249
- const t = /* @__PURE__ */ new Set(), r = (g, h) => {
250
- const u = typeof g == "function" ? g(n) : g;
247
+ const t = /* @__PURE__ */ new Set(), r = (m, h) => {
248
+ const u = typeof m == "function" ? m(n) : m;
251
249
  if (!Object.is(u, n)) {
252
250
  const p = n;
253
251
  n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((y) => y(n, p));
254
252
  }
255
- }, i = () => n, d = { setState: r, getState: i, getInitialState: () => b, subscribe: (g) => (t.add(g), () => t.delete(g)) }, b = n = e(r, i, d);
253
+ }, i = () => n, d = { setState: r, getState: i, getInitialState: () => b, subscribe: (m) => (t.add(m), () => t.delete(m)) }, b = n = e(r, i, d);
256
254
  return d;
257
255
  }, Rt = ((e) => e ? Le(e) : Le), kt = (e) => e;
258
256
  function jt(e, n = kt) {
@@ -355,8 +353,8 @@ const At = (e) => {
355
353
  message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
356
354
  updatedDashboardConfig: e
357
355
  };
358
- const b = [...o], [g] = b.splice(a, 1);
359
- return b.splice(d, 0, g), {
356
+ const b = [...o], [m] = b.splice(a, 1);
357
+ return b.splice(d, 0, m), {
360
358
  success: !0,
361
359
  updatedDashboardConfig: {
362
360
  ...e,
@@ -491,22 +489,22 @@ const At = (e) => {
491
489
  return o.length < 1 ? [r] : (o.forEach((a) => {
492
490
  a.dashboardId || (a.dashboardId = "default"), a.dashboardName || (a.dashboardName = `Dashboard ${a.dashboardId}`), a.responsiveGrid = a.responsiveGrid ?? !1, (a.widgets || []).length < 1 && (a.widgets = r.widgets);
493
491
  const d = (a.cssSettings || []).filter(
494
- (b) => r.cssSettings.some((g) => g.key === b.key)
492
+ (b) => r.cssSettings.some((m) => m.key === b.key)
495
493
  );
496
494
  if (d.length < 1)
497
495
  a.cssSettings = [...r.cssSettings];
498
496
  else {
499
- d.forEach((g) => {
500
- g.value = (g.value || "").replace(/NaN/g, "");
497
+ d.forEach((m) => {
498
+ m.value = (m.value || "").replace(/NaN/g, "");
501
499
  const h = r.cssSettings.find(
502
- (u) => u.key === g.key
500
+ (u) => u.key === m.key
503
501
  );
504
502
  h && (Object.keys(h).forEach((u) => {
505
- u in g || (g[u] = h[u]);
506
- }), g.step = h.step, g.minValue = h.minValue, g.defaultValue = h.defaultValue, g.defaultUnit = h.defaultUnit, /\d+/g.test(g.value) === !1 && (g.value = h ? h.value : "1.0rem"));
503
+ u in m || (m[u] = h[u]);
504
+ }), m.step = h.step, m.minValue = h.minValue, m.defaultValue = h.defaultValue, m.defaultUnit = h.defaultUnit, /\d+/g.test(m.value) === !1 && (m.value = h ? h.value : "1.0rem"));
507
505
  });
508
- const b = r.cssSettings.filter((g) => !d.some(
509
- (h) => h.key === g.key
506
+ const b = r.cssSettings.filter((m) => !d.some(
507
+ (h) => h.key === m.key
510
508
  ));
511
509
  a.cssSettings = [...d, ...b];
512
510
  }
@@ -555,11 +553,11 @@ const At = (e) => {
555
553
  }, []), o = ue(
556
554
  (h) => {
557
555
  n((u) => {
558
- const p = h.dashboardId, y = u[p] || [], D = t[p] ?? -1, m = y.slice(0, D + 1), v = {
559
- undoIndex: m.length,
556
+ const p = h.dashboardId, y = u[p] || [], D = t[p] ?? -1, g = y.slice(0, D + 1), v = {
557
+ undoIndex: g.length,
560
558
  // New index based on trimmed length
561
559
  config: h
562
- }, w = [...m, v];
560
+ }, w = [...g, v];
563
561
  return r((T) => ({
564
562
  ...T,
565
563
  [p]: w.length - 1
@@ -913,10 +911,10 @@ function J(e) {
913
911
  category: a,
914
912
  px: d,
915
913
  py: b,
916
- children: g,
914
+ children: m,
917
915
  ...h
918
916
  } = e, u = () => {
919
- const y = e.isIconButton || !1, D = e.category || "primary", m = e.buttonType || "normal", v = e.disabled || !1, w = e.className || "", T = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
917
+ const y = e.isIconButton || !1, D = e.category || "primary", g = e.buttonType || "normal", v = e.disabled || !1, w = e.className || "", T = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
920
918
  let S = (e.borderColor || "").trim();
921
919
  S = S.length > 0 ? S : "";
922
920
  const l = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), N = e.shadow || "sm", c = e.shadowHover || "md", f = (e.addCss || "").trim(), M = e.justifyCss || "justify-center";
@@ -934,11 +932,11 @@ function J(e) {
934
932
  `font-${T}`
935
933
  ];
936
934
  if (v)
937
- m === "ghost" ? $.push("text-disabled border-disabled cursor-not-allowed") : $.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
935
+ g === "ghost" ? $.push("text-disabled border-disabled cursor-not-allowed") : $.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
938
936
  else {
939
937
  $.push("cursor-pointer");
940
938
  let I = "";
941
- Se.has(m) ? I = `${Se.get(m)}` : I = `${Se.get("normal")}`, C < 1 && (I = I.replace("border-[category]", ""));
939
+ Se.has(g) ? I = `${Se.get(g)}` : I = `${Se.get("normal")}`, C < 1 && (I = I.replace("border-[category]", ""));
942
940
  const E = I.replace(/\[category\]/g, D).trim();
943
941
  $.push(E);
944
942
  }
@@ -949,7 +947,7 @@ function J(e) {
949
947
  padding: r ? 0 : `${D}rem ${y}rem `
950
948
  };
951
949
  };
952
- return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: u(), style: p(), ...h, children: g });
950
+ return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: u(), style: p(), ...h, children: m });
953
951
  }
954
952
  const rn = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
955
953
  function on(e) {
@@ -1005,7 +1003,7 @@ var Ve;
1005
1003
  function sn() {
1006
1004
  if (Ve) return U;
1007
1005
  Ve = 1;
1008
- var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
1006
+ var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
1009
1007
  function C(l) {
1010
1008
  if (typeof l == "object" && l !== null) {
1011
1009
  var N = l.$$typeof;
@@ -1013,7 +1011,7 @@ function sn() {
1013
1011
  case n:
1014
1012
  switch (l = l.type, l) {
1015
1013
  case b:
1016
- case g:
1014
+ case m:
1017
1015
  case r:
1018
1016
  case o:
1019
1017
  case i:
@@ -1037,9 +1035,9 @@ function sn() {
1037
1035
  }
1038
1036
  }
1039
1037
  function S(l) {
1040
- return C(l) === g;
1038
+ return C(l) === m;
1041
1039
  }
1042
- return U.AsyncMode = b, U.ConcurrentMode = g, U.ContextConsumer = d, U.ContextProvider = a, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = D, U.Memo = y, U.Portal = t, U.Profiler = o, U.StrictMode = i, U.Suspense = u, U.isAsyncMode = function(l) {
1040
+ return U.AsyncMode = b, U.ConcurrentMode = m, U.ContextConsumer = d, U.ContextProvider = a, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = D, U.Memo = y, U.Portal = t, U.Profiler = o, U.StrictMode = i, U.Suspense = u, U.isAsyncMode = function(l) {
1043
1041
  return S(l) || C(l) === b;
1044
1042
  }, U.isConcurrentMode = S, U.isContextConsumer = function(l) {
1045
1043
  return C(l) === d;
@@ -1064,17 +1062,17 @@ function sn() {
1064
1062
  }, U.isSuspense = function(l) {
1065
1063
  return C(l) === u;
1066
1064
  }, U.isValidElementType = function(l) {
1067
- return typeof l == "string" || typeof l == "function" || l === r || l === g || l === o || l === i || l === u || l === p || typeof l == "object" && l !== null && (l.$$typeof === D || l.$$typeof === y || l.$$typeof === a || l.$$typeof === d || l.$$typeof === h || l.$$typeof === v || l.$$typeof === w || l.$$typeof === T || l.$$typeof === m);
1065
+ return typeof l == "string" || typeof l == "function" || l === r || l === m || l === o || l === i || l === u || l === p || typeof l == "object" && l !== null && (l.$$typeof === D || l.$$typeof === y || l.$$typeof === a || l.$$typeof === d || l.$$typeof === h || l.$$typeof === v || l.$$typeof === w || l.$$typeof === T || l.$$typeof === g);
1068
1066
  }, U.typeOf = C, U;
1069
1067
  }
1070
1068
  var q = {};
1071
1069
  var Ue;
1072
1070
  function cn() {
1073
1071
  return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
1074
- var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
1072
+ var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
1075
1073
  function C(_) {
1076
1074
  return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1077
- _ === r || _ === g || _ === o || _ === i || _ === u || _ === p || typeof _ == "object" && _ !== null && (_.$$typeof === D || _.$$typeof === y || _.$$typeof === a || _.$$typeof === d || _.$$typeof === h || _.$$typeof === v || _.$$typeof === w || _.$$typeof === T || _.$$typeof === m);
1075
+ _ === r || _ === m || _ === o || _ === i || _ === u || _ === p || typeof _ == "object" && _ !== null && (_.$$typeof === D || _.$$typeof === y || _.$$typeof === a || _.$$typeof === d || _.$$typeof === h || _.$$typeof === v || _.$$typeof === w || _.$$typeof === T || _.$$typeof === g);
1078
1076
  }
1079
1077
  function S(_) {
1080
1078
  if (typeof _ == "object" && _ !== null) {
@@ -1084,7 +1082,7 @@ function cn() {
1084
1082
  var me = _.type;
1085
1083
  switch (me) {
1086
1084
  case b:
1087
- case g:
1085
+ case m:
1088
1086
  case r:
1089
1087
  case o:
1090
1088
  case i:
@@ -1108,12 +1106,12 @@ function cn() {
1108
1106
  }
1109
1107
  }
1110
1108
  }
1111
- var l = b, N = g, c = d, f = a, M = n, $ = h, I = r, E = D, z = y, X = t, Q = o, K = i, ee = u, se = !1;
1109
+ var l = b, N = m, c = d, f = a, M = n, $ = h, I = r, E = D, z = y, X = t, Q = o, K = i, ee = u, se = !1;
1112
1110
  function de(_) {
1113
1111
  return se || (se = !0, 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.")), x(_) || S(_) === b;
1114
1112
  }
1115
1113
  function x(_) {
1116
- return S(_) === g;
1114
+ return S(_) === m;
1117
1115
  }
1118
1116
  function P(_) {
1119
1117
  return S(_) === d;
@@ -1179,23 +1177,23 @@ function ln() {
1179
1177
  });
1180
1178
  if (b.join("") !== "0123456789")
1181
1179
  return !1;
1182
- var g = {};
1180
+ var m = {};
1183
1181
  return "abcdefghijklmnopqrst".split("").forEach(function(h) {
1184
- g[h] = h;
1185
- }), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
1182
+ m[h] = h;
1183
+ }), Object.keys(Object.assign({}, m)).join("") === "abcdefghijklmnopqrst";
1186
1184
  } catch {
1187
1185
  return !1;
1188
1186
  }
1189
1187
  }
1190
1188
  return Te = i() ? Object.assign : function(o, a) {
1191
- for (var d, b = r(o), g, h = 1; h < arguments.length; h++) {
1189
+ for (var d, b = r(o), m, h = 1; h < arguments.length; h++) {
1192
1190
  d = Object(arguments[h]);
1193
1191
  for (var u in d)
1194
1192
  n.call(d, u) && (b[u] = d[u]);
1195
1193
  if (e) {
1196
- g = e(d);
1197
- for (var p = 0; p < g.length; p++)
1198
- t.call(d, g[p]) && (b[g[p]] = d[g[p]]);
1194
+ m = e(d);
1195
+ for (var p = 0; p < m.length; p++)
1196
+ t.call(d, m[p]) && (b[m[p]] = d[m[p]]);
1199
1197
  }
1200
1198
  }
1201
1199
  return b;
@@ -1229,7 +1227,7 @@ function dn() {
1229
1227
  }
1230
1228
  };
1231
1229
  }
1232
- function i(o, a, d, b, g) {
1230
+ function i(o, a, d, b, m) {
1233
1231
  if (process.env.NODE_ENV !== "production") {
1234
1232
  for (var h in o)
1235
1233
  if (r(o, h)) {
@@ -1249,7 +1247,7 @@ function dn() {
1249
1247
  (b || "React class") + ": type specification of " + d + " `" + h + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
1250
1248
  ), u instanceof Error && !(u.message in t)) {
1251
1249
  t[u.message] = !0;
1252
- var y = g ? g() : "";
1250
+ var y = m ? m() : "";
1253
1251
  e(
1254
1252
  "Failed " + d + " type: " + u.message + (y ?? "")
1255
1253
  );
@@ -1279,9 +1277,9 @@ function un() {
1279
1277
  return null;
1280
1278
  }
1281
1279
  return Me = function(d, b) {
1282
- var g = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
1280
+ var m = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
1283
1281
  function u(x) {
1284
- var P = x && (g && x[g] || x[h]);
1282
+ var P = x && (m && x[m] || x[h]);
1285
1283
  if (typeof P == "function")
1286
1284
  return P;
1287
1285
  }
@@ -1309,10 +1307,10 @@ function un() {
1309
1307
  function D(x, P) {
1310
1308
  return x === P ? x !== 0 || 1 / x === 1 / P : x !== x && P !== P;
1311
1309
  }
1312
- function m(x, P) {
1310
+ function g(x, P) {
1313
1311
  this.message = x, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
1314
1312
  }
1315
- m.prototype = Error.prototype;
1313
+ g.prototype = Error.prototype;
1316
1314
  function v(x) {
1317
1315
  if (process.env.NODE_ENV !== "production")
1318
1316
  var P = {}, A = 0;
@@ -1331,7 +1329,7 @@ function un() {
1331
1329
  ), P[te] = !0, A++);
1332
1330
  }
1333
1331
  }
1334
- return R[j] == null ? F ? R[j] === null ? new m("The " + Y + " `" + V + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new m("The " + Y + " `" + V + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : x(R, j, L, Y, V);
1332
+ return R[j] == null ? F ? R[j] === null ? new g("The " + Y + " `" + V + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new g("The " + Y + " `" + V + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : x(R, j, L, Y, V);
1335
1333
  }
1336
1334
  var O = k.bind(null, !1);
1337
1335
  return O.isRequired = k.bind(null, !0), O;
@@ -1341,7 +1339,7 @@ function un() {
1341
1339
  var L = A[k], Y = K(L);
1342
1340
  if (Y !== x) {
1343
1341
  var V = ee(L);
1344
- return new m(
1342
+ return new g(
1345
1343
  "Invalid " + F + " `" + R + "` of type " + ("`" + V + "` supplied to `" + O + "`, expected ") + ("`" + x + "`."),
1346
1344
  { expectedType: x }
1347
1345
  );
@@ -1356,11 +1354,11 @@ function un() {
1356
1354
  function C(x) {
1357
1355
  function P(A, k, O, F, R) {
1358
1356
  if (typeof x != "function")
1359
- return new m("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside arrayOf.");
1357
+ return new g("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside arrayOf.");
1360
1358
  var j = A[k];
1361
1359
  if (!Array.isArray(j)) {
1362
1360
  var L = K(j);
1363
- return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an array."));
1361
+ return new g("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an array."));
1364
1362
  }
1365
1363
  for (var Y = 0; Y < j.length; Y++) {
1366
1364
  var V = x(j, Y, O, F, R + "[" + Y + "]", t);
@@ -1376,7 +1374,7 @@ function un() {
1376
1374
  var R = P[A];
1377
1375
  if (!d(R)) {
1378
1376
  var j = K(R);
1379
- return new m("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
1377
+ return new g("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
1380
1378
  }
1381
1379
  return null;
1382
1380
  }
@@ -1387,7 +1385,7 @@ function un() {
1387
1385
  var R = P[A];
1388
1386
  if (!e.isValidElementType(R)) {
1389
1387
  var j = K(R);
1390
- return new m("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
1388
+ return new g("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
1391
1389
  }
1392
1390
  return null;
1393
1391
  }
@@ -1397,7 +1395,7 @@ function un() {
1397
1395
  function P(A, k, O, F, R) {
1398
1396
  if (!(A[k] instanceof x)) {
1399
1397
  var j = x.name || p, L = de(A[k]);
1400
- return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected ") + ("instance of `" + j + "`."));
1398
+ return new g("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected ") + ("instance of `" + j + "`."));
1401
1399
  }
1402
1400
  return null;
1403
1401
  }
@@ -1416,17 +1414,17 @@ function un() {
1416
1414
  var te = ee(_);
1417
1415
  return te === "symbol" ? String(_) : _;
1418
1416
  });
1419
- return new m("Invalid " + F + " `" + R + "` of value `" + String(j) + "` " + ("supplied to `" + O + "`, expected one of " + Y + "."));
1417
+ return new g("Invalid " + F + " `" + R + "` of value `" + String(j) + "` " + ("supplied to `" + O + "`, expected one of " + Y + "."));
1420
1418
  }
1421
1419
  return v(P);
1422
1420
  }
1423
1421
  function f(x) {
1424
1422
  function P(A, k, O, F, R) {
1425
1423
  if (typeof x != "function")
1426
- return new m("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside objectOf.");
1424
+ return new g("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside objectOf.");
1427
1425
  var j = A[k], L = K(j);
1428
1426
  if (L !== "object")
1429
- return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an object."));
1427
+ return new g("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an object."));
1430
1428
  for (var Y in j)
1431
1429
  if (r(j, Y)) {
1432
1430
  var V = x(j, Y, O, F, R + "." + Y, t);
@@ -1455,18 +1453,18 @@ function un() {
1455
1453
  _.data && r(_.data, "expectedType") && Y.push(_.data.expectedType);
1456
1454
  }
1457
1455
  var te = Y.length > 0 ? ", expected one of type [" + Y.join(", ") + "]" : "";
1458
- return new m("Invalid " + j + " `" + L + "` supplied to " + ("`" + R + "`" + te + "."));
1456
+ return new g("Invalid " + j + " `" + L + "` supplied to " + ("`" + R + "`" + te + "."));
1459
1457
  }
1460
1458
  return v(k);
1461
1459
  }
1462
1460
  function $() {
1463
1461
  function x(P, A, k, O, F) {
1464
- return X(P[A]) ? null : new m("Invalid " + O + " `" + F + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
1462
+ return X(P[A]) ? null : new g("Invalid " + O + " `" + F + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
1465
1463
  }
1466
1464
  return v(x);
1467
1465
  }
1468
1466
  function I(x, P, A, k, O) {
1469
- return new m(
1467
+ return new g(
1470
1468
  (x || "React class") + ": " + P + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + O + "`."
1471
1469
  );
1472
1470
  }
@@ -1474,7 +1472,7 @@ function un() {
1474
1472
  function P(A, k, O, F, R) {
1475
1473
  var j = A[k], L = K(j);
1476
1474
  if (L !== "object")
1477
- return new m("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
1475
+ return new g("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
1478
1476
  for (var Y in x) {
1479
1477
  var V = x[Y];
1480
1478
  if (typeof V != "function")
@@ -1491,14 +1489,14 @@ function un() {
1491
1489
  function P(A, k, O, F, R) {
1492
1490
  var j = A[k], L = K(j);
1493
1491
  if (L !== "object")
1494
- return new m("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
1492
+ return new g("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
1495
1493
  var Y = n({}, A[k], x);
1496
1494
  for (var V in Y) {
1497
1495
  var Z = x[V];
1498
1496
  if (r(x, V) && typeof Z != "function")
1499
1497
  return I(O, F, R, V, ee(Z));
1500
1498
  if (!Z)
1501
- return new m(
1499
+ return new g(
1502
1500
  "Invalid " + F + " `" + R + "` key `" + V + "` supplied to `" + O + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
1503
1501
  Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1504
1502
  );
@@ -1592,7 +1590,7 @@ function fn() {
1592
1590
  function t() {
1593
1591
  }
1594
1592
  return t.resetWarningCache = n, Pe = function() {
1595
- function r(a, d, b, g, h, u) {
1593
+ function r(a, d, b, m, h, u) {
1596
1594
  if (u !== e) {
1597
1595
  var p = new Error(
1598
1596
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
@@ -1719,7 +1717,7 @@ function Re() {
1719
1717
  if (et) return B;
1720
1718
  et = 1, Object.defineProperty(B, "__esModule", {
1721
1719
  value: !0
1722
- }), B.addClassName = l, B.addEvent = a, B.addUserSelectStyles = T, B.createCSSTransform = y, B.createSVGTransform = D, B.getTouch = v, B.getTouchIdentifier = w, B.getTranslation = m, B.innerHeight = h, B.innerWidth = u, B.matchesSelector = i, B.matchesSelectorAndParentsTo = o, B.offsetXYFromParent = p, B.outerHeight = b, B.outerWidth = g, B.removeClassName = N, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = C;
1720
+ }), B.addClassName = l, B.addEvent = a, B.addUserSelectStyles = T, B.createCSSTransform = y, B.createSVGTransform = D, B.getTouch = v, B.getTouchIdentifier = w, B.getTranslation = g, B.innerHeight = h, B.innerWidth = u, B.matchesSelector = i, B.matchesSelectorAndParentsTo = o, B.offsetXYFromParent = p, B.outerHeight = b, B.outerWidth = m, B.removeClassName = N, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = C;
1723
1721
  var e = we(), n = t(gn());
1724
1722
  function t(c, f) {
1725
1723
  if (typeof WeakMap == "function") var M = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
@@ -1771,7 +1769,7 @@ function Re() {
1771
1769
  const M = c.ownerDocument.defaultView.getComputedStyle(c);
1772
1770
  return f += (0, e.int)(M.borderTopWidth), f += (0, e.int)(M.borderBottomWidth), f;
1773
1771
  }
1774
- function g(c) {
1772
+ function m(c) {
1775
1773
  let f = c.clientWidth;
1776
1774
  const M = c.ownerDocument.defaultView.getComputedStyle(c);
1777
1775
  return f += (0, e.int)(M.borderLeftWidth), f += (0, e.int)(M.borderRightWidth), f;
@@ -1797,15 +1795,15 @@ function Re() {
1797
1795
  };
1798
1796
  }
1799
1797
  function y(c, f) {
1800
- const M = m(c, f, "px");
1798
+ const M = g(c, f, "px");
1801
1799
  return {
1802
1800
  [(0, n.browserPrefixToKey)("transform", n.default)]: M
1803
1801
  };
1804
1802
  }
1805
1803
  function D(c, f) {
1806
- return m(c, f, "");
1804
+ return g(c, f, "");
1807
1805
  }
1808
- function m(c, f, M) {
1806
+ function g(c, f, M) {
1809
1807
  let {
1810
1808
  x: $,
1811
1809
  y: I
@@ -1867,28 +1865,28 @@ function xt() {
1867
1865
  let {
1868
1866
  bounds: D
1869
1867
  } = u.props;
1870
- D = typeof D == "string" ? D : g(D);
1871
- const m = h(u);
1868
+ D = typeof D == "string" ? D : m(D);
1869
+ const g = h(u);
1872
1870
  if (typeof D == "string") {
1873
1871
  const {
1874
1872
  ownerDocument: v
1875
- } = m, w = v.defaultView;
1873
+ } = g, w = v.defaultView;
1876
1874
  let T;
1877
- if (D === "parent" ? T = m.parentNode : T = m.getRootNode().querySelector(D), !(T instanceof w.HTMLElement))
1875
+ if (D === "parent" ? T = g.parentNode : T = g.getRootNode().querySelector(D), !(T instanceof w.HTMLElement))
1878
1876
  throw new Error('Bounds selector "' + D + '" could not find an element.');
1879
- const C = T, S = w.getComputedStyle(m), l = w.getComputedStyle(C);
1877
+ const C = T, S = w.getComputedStyle(g), l = w.getComputedStyle(C);
1880
1878
  D = {
1881
- left: -m.offsetLeft + (0, e.int)(l.paddingLeft) + (0, e.int)(S.marginLeft),
1882
- top: -m.offsetTop + (0, e.int)(l.paddingTop) + (0, e.int)(S.marginTop),
1883
- right: (0, n.innerWidth)(C) - (0, n.outerWidth)(m) - m.offsetLeft + (0, e.int)(l.paddingRight) - (0, e.int)(S.marginRight),
1884
- bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(m) - m.offsetTop + (0, e.int)(l.paddingBottom) - (0, e.int)(S.marginBottom)
1879
+ left: -g.offsetLeft + (0, e.int)(l.paddingLeft) + (0, e.int)(S.marginLeft),
1880
+ top: -g.offsetTop + (0, e.int)(l.paddingTop) + (0, e.int)(S.marginTop),
1881
+ right: (0, n.innerWidth)(C) - (0, n.outerWidth)(g) - g.offsetLeft + (0, e.int)(l.paddingRight) - (0, e.int)(S.marginRight),
1882
+ bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(g) - g.offsetTop + (0, e.int)(l.paddingBottom) - (0, e.int)(S.marginBottom)
1885
1883
  };
1886
1884
  }
1887
1885
  return (0, e.isNum)(D.right) && (p = Math.min(p, D.right)), (0, e.isNum)(D.bottom) && (y = Math.min(y, D.bottom)), (0, e.isNum)(D.left) && (p = Math.max(p, D.left)), (0, e.isNum)(D.top) && (y = Math.max(y, D.top)), [p, y];
1888
1886
  }
1889
1887
  function r(u, p, y) {
1890
- const D = Math.round(p / u[0]) * u[0], m = Math.round(y / u[1]) * u[1];
1891
- return [D, m];
1888
+ const D = Math.round(p / u[0]) * u[0], g = Math.round(y / u[1]) * u[1];
1889
+ return [D, g];
1892
1890
  }
1893
1891
  function i(u) {
1894
1892
  return u.props.axis === "both" || u.props.axis === "x";
@@ -1899,13 +1897,13 @@ function xt() {
1899
1897
  function a(u, p, y) {
1900
1898
  const D = typeof p == "number" ? (0, n.getTouch)(u, p) : null;
1901
1899
  if (typeof p == "number" && !D) return null;
1902
- const m = h(y), v = y.props.offsetParent || m.offsetParent || m.ownerDocument.body;
1900
+ const g = h(y), v = y.props.offsetParent || g.offsetParent || g.ownerDocument.body;
1903
1901
  return (0, n.offsetXYFromParent)(D || u, v, y.props.scale);
1904
1902
  }
1905
1903
  function d(u, p, y) {
1906
- const D = !(0, e.isNum)(u.lastX), m = h(u);
1904
+ const D = !(0, e.isNum)(u.lastX), g = h(u);
1907
1905
  return D ? {
1908
- node: m,
1906
+ node: g,
1909
1907
  deltaX: 0,
1910
1908
  deltaY: 0,
1911
1909
  lastX: p,
@@ -1913,7 +1911,7 @@ function xt() {
1913
1911
  x: p,
1914
1912
  y
1915
1913
  } : {
1916
- node: m,
1914
+ node: g,
1917
1915
  deltaX: p - u.lastX,
1918
1916
  deltaY: y - u.lastY,
1919
1917
  lastX: u.lastX,
@@ -1934,7 +1932,7 @@ function xt() {
1934
1932
  lastY: u.state.y
1935
1933
  };
1936
1934
  }
1937
- function g(u) {
1935
+ function m(u) {
1938
1936
  return {
1939
1937
  left: u.left,
1940
1938
  top: u.top,
@@ -1967,10 +1965,10 @@ function mn() {
1967
1965
  value: !0
1968
1966
  }), he.default = void 0;
1969
1967
  var e = b(ae), n = d(/* @__PURE__ */ vt()), t = d(ct), r = Re(), i = xt(), o = we(), a = d(wt());
1970
- function d(m) {
1971
- return m && m.__esModule ? m : { default: m };
1968
+ function d(g) {
1969
+ return g && g.__esModule ? g : { default: g };
1972
1970
  }
1973
- function b(m, v) {
1971
+ function b(g, v) {
1974
1972
  if (typeof WeakMap == "function") var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap();
1975
1973
  return (b = function(C, S) {
1976
1974
  if (!S && C && C.__esModule) return C;
@@ -1982,24 +1980,24 @@ function mn() {
1982
1980
  }
1983
1981
  for (const f in C) f !== "default" && {}.hasOwnProperty.call(C, f) && ((N = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(C, f)) && (N.get || N.set) ? l(c, f, N) : c[f] = C[f]);
1984
1982
  return c;
1985
- })(m, v);
1983
+ })(g, v);
1986
1984
  }
1987
- function g(m, v, w) {
1988
- return (v = h(v)) in m ? Object.defineProperty(m, v, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : m[v] = w, m;
1985
+ function m(g, v, w) {
1986
+ return (v = h(v)) in g ? Object.defineProperty(g, v, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : g[v] = w, g;
1989
1987
  }
1990
- function h(m) {
1991
- var v = u(m, "string");
1988
+ function h(g) {
1989
+ var v = u(g, "string");
1992
1990
  return typeof v == "symbol" ? v : v + "";
1993
1991
  }
1994
- function u(m, v) {
1995
- if (typeof m != "object" || !m) return m;
1996
- var w = m[Symbol.toPrimitive];
1992
+ function u(g, v) {
1993
+ if (typeof g != "object" || !g) return g;
1994
+ var w = g[Symbol.toPrimitive];
1997
1995
  if (w !== void 0) {
1998
- var T = w.call(m, v);
1996
+ var T = w.call(g, v);
1999
1997
  if (typeof T != "object") return T;
2000
1998
  throw new TypeError("@@toPrimitive must return a primitive value.");
2001
1999
  }
2002
- return (v === "string" ? String : Number)(m);
2000
+ return (v === "string" ? String : Number)(g);
2003
2001
  }
2004
2002
  const p = {
2005
2003
  touch: {
@@ -2015,7 +2013,7 @@ function mn() {
2015
2013
  };
2016
2014
  let y = p.mouse, D = class extends e.Component {
2017
2015
  constructor() {
2018
- super(...arguments), g(this, "dragging", !1), g(this, "lastX", NaN), g(this, "lastY", NaN), g(this, "touchIdentifier", null), g(this, "mounted", !1), g(this, "handleDragStart", (v) => {
2016
+ super(...arguments), m(this, "dragging", !1), m(this, "lastX", NaN), m(this, "lastY", NaN), m(this, "touchIdentifier", null), m(this, "mounted", !1), m(this, "handleDragStart", (v) => {
2019
2017
  if (this.props.onMouseDown(v), !this.props.allowAnyClick && typeof v.button == "number" && v.button !== 0) return !1;
2020
2018
  const w = this.findDOMNode();
2021
2019
  if (!w || !w.ownerDocument || !w.ownerDocument.body)
@@ -2035,7 +2033,7 @@ function mn() {
2035
2033
  y: N
2036
2034
  } = S, c = (0, i.createCoreData)(this, l, N);
2037
2035
  (0, a.default)("DraggableCore: handleDragStart: %j", c), (0, a.default)("calling", this.props.onStart), !(this.props.onStart(v, c) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(T), this.dragging = !0, this.lastX = l, this.lastY = N, (0, r.addEvent)(T, y.move, this.handleDrag), (0, r.addEvent)(T, y.stop, this.handleDragStop));
2038
- }), g(this, "handleDrag", (v) => {
2036
+ }), m(this, "handleDrag", (v) => {
2039
2037
  const w = (0, i.getControlPosition)(v, this.touchIdentifier, this);
2040
2038
  if (w == null) return;
2041
2039
  let {
@@ -2058,7 +2056,7 @@ function mn() {
2058
2056
  return;
2059
2057
  }
2060
2058
  this.lastX = T, this.lastY = C;
2061
- }), g(this, "handleDragStop", (v) => {
2059
+ }), m(this, "handleDragStop", (v) => {
2062
2060
  if (!this.dragging) return;
2063
2061
  const w = (0, i.getControlPosition)(v, this.touchIdentifier, this);
2064
2062
  if (w == null) return;
@@ -2074,7 +2072,7 @@ function mn() {
2074
2072
  if (this.props.onStop(v, S) === !1 || this.mounted === !1) return !1;
2075
2073
  const N = this.findDOMNode();
2076
2074
  N && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(N.ownerDocument), (0, a.default)("DraggableCore: handleDragStop: %j", S), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, N && ((0, a.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(N.ownerDocument, y.move, this.handleDrag), (0, r.removeEvent)(N.ownerDocument, y.stop, this.handleDragStop));
2077
- }), g(this, "onMouseDown", (v) => (y = p.mouse, this.handleDragStart(v))), g(this, "onMouseUp", (v) => (y = p.mouse, this.handleDragStop(v))), g(this, "onTouchStart", (v) => (y = p.touch, this.handleDragStart(v))), g(this, "onTouchEnd", (v) => (y = p.touch, this.handleDragStop(v)));
2075
+ }), m(this, "onMouseDown", (v) => (y = p.mouse, this.handleDragStart(v))), m(this, "onMouseUp", (v) => (y = p.mouse, this.handleDragStop(v))), m(this, "onTouchStart", (v) => (y = p.touch, this.handleDragStart(v))), m(this, "onTouchEnd", (v) => (y = p.touch, this.handleDragStop(v)));
2078
2076
  }
2079
2077
  componentDidMount() {
2080
2078
  this.mounted = !0;
@@ -2113,7 +2111,7 @@ function mn() {
2113
2111
  });
2114
2112
  }
2115
2113
  };
2116
- return he.default = D, g(D, "displayName", "DraggableCore"), g(D, "propTypes", {
2114
+ return he.default = D, m(D, "displayName", "DraggableCore"), m(D, "propTypes", {
2117
2115
  /**
2118
2116
  * `allowAnyClick` allows dragging using any mouse button.
2119
2117
  * By default, we only accept the left button.
@@ -2145,8 +2143,8 @@ function mn() {
2145
2143
  * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
2146
2144
  * instead of using the parent node.
2147
2145
  */
2148
- offsetParent: function(m, v) {
2149
- if (m[v] && m[v].nodeType !== 1)
2146
+ offsetParent: function(g, v) {
2147
+ if (g[v] && g[v].nodeType !== 1)
2150
2148
  throw new Error("Draggable's offsetParent must be a DOM Node.");
2151
2149
  },
2152
2150
  /**
@@ -2243,7 +2241,7 @@ function mn() {
2243
2241
  className: o.dontSetMe,
2244
2242
  style: o.dontSetMe,
2245
2243
  transform: o.dontSetMe
2246
- }), g(D, "defaultProps", {
2244
+ }), m(D, "defaultProps", {
2247
2245
  allowAnyClick: !1,
2248
2246
  // by default only accept left click
2249
2247
  allowMobileScroll: !1,
@@ -2271,7 +2269,7 @@ function pn() {
2271
2269
  return b.default;
2272
2270
  }
2273
2271
  }), e.default = void 0;
2274
- var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(ct), i = hn(), o = Re(), a = xt(), d = we(), b = h(mn()), g = h(wt());
2272
+ var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(ct), i = hn(), o = Re(), a = xt(), d = we(), b = h(mn()), m = h(wt());
2275
2273
  function h(w) {
2276
2274
  return w && w.__esModule ? w : { default: w };
2277
2275
  }
@@ -2302,10 +2300,10 @@ function pn() {
2302
2300
  return (T = D(T)) in w ? Object.defineProperty(w, T, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : w[T] = C, w;
2303
2301
  }
2304
2302
  function D(w) {
2305
- var T = m(w, "string");
2303
+ var T = g(w, "string");
2306
2304
  return typeof T == "symbol" ? T : T + "";
2307
2305
  }
2308
- function m(w, T) {
2306
+ function g(w, T) {
2309
2307
  if (typeof w != "object" || !w) return w;
2310
2308
  var C = w[Symbol.toPrimitive];
2311
2309
  if (C !== void 0) {
@@ -2324,7 +2322,7 @@ function pn() {
2324
2322
  } = T, {
2325
2323
  prevPropsPosition: l
2326
2324
  } = C;
2327
- return S && (!l || S.x !== l.x || S.y !== l.y) ? ((0, g.default)("Draggable: getDerivedStateFromProps %j", {
2325
+ return S && (!l || S.x !== l.x || S.y !== l.y) ? ((0, m.default)("Draggable: getDerivedStateFromProps %j", {
2328
2326
  position: S,
2329
2327
  prevPropsPosition: l
2330
2328
  }), {
@@ -2337,14 +2335,14 @@ function pn() {
2337
2335
  }
2338
2336
  constructor(T) {
2339
2337
  super(T), y(this, "onDragStart", (C, S) => {
2340
- if ((0, g.default)("Draggable: onDragStart: %j", S), this.props.onStart(C, (0, a.createDraggableData)(this, S)) === !1) return !1;
2338
+ if ((0, m.default)("Draggable: onDragStart: %j", S), this.props.onStart(C, (0, a.createDraggableData)(this, S)) === !1) return !1;
2341
2339
  this.setState({
2342
2340
  dragging: !0,
2343
2341
  dragged: !0
2344
2342
  });
2345
2343
  }), y(this, "onDrag", (C, S) => {
2346
2344
  if (!this.state.dragging) return !1;
2347
- (0, g.default)("Draggable: onDrag: %j", S);
2345
+ (0, m.default)("Draggable: onDrag: %j", S);
2348
2346
  const l = (0, a.createDraggableData)(this, S), N = {
2349
2347
  x: l.x,
2350
2348
  y: l.y,
@@ -2364,7 +2362,7 @@ function pn() {
2364
2362
  this.setState(N);
2365
2363
  }), y(this, "onDragStop", (C, S) => {
2366
2364
  if (!this.state.dragging || this.props.onStop(C, (0, a.createDraggableData)(this, S)) === !1) return !1;
2367
- (0, g.default)("Draggable: onDragStop: %j", S);
2365
+ (0, m.default)("Draggable: onDragStop: %j", S);
2368
2366
  const N = {
2369
2367
  dragging: !1,
2370
2368
  slackX: 0,
@@ -2612,10 +2610,10 @@ const vn = /* @__PURE__ */ an(bn), xn = le((e, n) => {
2612
2610
  "data-testid": i,
2613
2611
  axis: "both",
2614
2612
  handle: ".handle",
2615
- onStart: (g, h) => {
2613
+ onStart: (m, h) => {
2616
2614
  e.onDraggingChange?.(!0);
2617
2615
  },
2618
- onStop: (g, h) => {
2616
+ onStop: (m, h) => {
2619
2617
  setTimeout(() => {
2620
2618
  e.onDraggingChange?.(!1);
2621
2619
  }, 100);
@@ -2754,31 +2752,31 @@ function Tn({
2754
2752
  isEditing: d,
2755
2753
  // for additional props passed to all widget from the dashboard through the DynamicWidgetLoader:
2756
2754
  extraProps: b,
2757
- onRemoveClick: g,
2755
+ onRemoveClick: m,
2758
2756
  onMoveClick: h,
2759
2757
  selectContainer: u
2760
2758
  }) {
2761
- const p = `${t}`.split("_"), y = p.length > 1, D = y ? p[0] : t, m = a.get(D);
2762
- if (!m)
2759
+ const p = `${t}`.split("_"), y = p.length > 1, D = y ? p[0] : t, g = a.get(D);
2760
+ if (!g)
2763
2761
  return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
2764
2762
  "Widget not found in catalog: ",
2765
2763
  D
2766
2764
  ] }) });
2767
2765
  let v = null, w = !1;
2768
- const T = !!m.isContainer, C = y ? mt(t) : "", S = T ? (o || []).filter((c) => c.parentWidgetKey === t) : [], l = {
2766
+ const T = !!g.isContainer, C = y ? mt(t) : "", S = T ? (o || []).filter((c) => c.parentWidgetKey === t) : [], l = {
2769
2767
  index: e,
2770
2768
  maxIndex: n,
2771
2769
  widgetKey: t,
2772
2770
  parentWidgetKey: r,
2773
2771
  isEditing: d,
2774
2772
  extraProps: b,
2775
- title: y ? C : m.title,
2776
- onRemoveClick: g,
2773
+ title: y ? C : g.title,
2774
+ onRemoveClick: m,
2777
2775
  onMoveClick: h
2778
2776
  };
2779
- if (m.component ? (v = m.component, w = !1) : m.loader && (w = !0, v = st(() => {
2780
- if (!m) return null;
2781
- const c = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f = m.meta?.externalDependencies || [], M = f.find(($) => $.startsWith("react@"));
2777
+ if (g.component ? (v = g.component, w = !1) : g.loader && (w = !0, v = st(() => {
2778
+ if (!g) return null;
2779
+ const c = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f = g.meta?.externalDependencies || [], M = f.find(($) => $.startsWith("react@"));
2782
2780
  if (M) {
2783
2781
  const $ = M.split("@")[1];
2784
2782
  if (!Sn(c, $))
@@ -2817,12 +2815,12 @@ function Tn({
2817
2815
  ] }) })
2818
2816
  }));
2819
2817
  }
2820
- if (m.component)
2821
- return m.component;
2822
- if (m.loader) {
2818
+ if (g.component)
2819
+ return g.component;
2820
+ if (g.loader) {
2823
2821
  const $ = async () => {
2824
2822
  try {
2825
- return await m.loader();
2823
+ return await g.loader();
2826
2824
  } catch (I) {
2827
2825
  return console.error(`CDN Load Failure for ${t}:`, I), {
2828
2826
  default: () => /* @__PURE__ */ s(at, { ...l, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
@@ -2832,7 +2830,7 @@ function Tn({
2832
2830
  '"'
2833
2831
  ] }),
2834
2832
  /* @__PURE__ */ s("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
2835
- /* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(m.meta || {}, null, 2) })
2833
+ /* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(g.meta || {}, null, 2) })
2836
2834
  ] }) })
2837
2835
  };
2838
2836
  }
@@ -2840,7 +2838,7 @@ function Tn({
2840
2838
  return ae.lazy($);
2841
2839
  }
2842
2840
  return null;
2843
- }, [m, t])), !v)
2841
+ }, [g, t])), !v)
2844
2842
  return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
2845
2843
  "Widget definition incomplete: ",
2846
2844
  D
@@ -2859,21 +2857,21 @@ function Tn({
2859
2857
  widgetCatalog: a,
2860
2858
  isEditing: d,
2861
2859
  extraProps: b,
2862
- onRemoveClick: g,
2860
+ onRemoveClick: m,
2863
2861
  onMoveClick: h
2864
2862
  },
2865
2863
  `${c.widgetKey}_${f}`
2866
2864
  ))
2867
2865
  } : {};
2868
- return w ? /* @__PURE__ */ s(St, { fallback: /* @__PURE__ */ s(Dn, { title: `Loading ${m.title}` }), children: /* @__PURE__ */ s(v, { ...l, ...N }) }) : /* @__PURE__ */ s(v, { ...l, ...N });
2866
+ return w ? /* @__PURE__ */ s(St, { fallback: /* @__PURE__ */ s(Dn, { title: `Loading ${g.title}` }), children: /* @__PURE__ */ s(v, { ...l, ...N }) }) : /* @__PURE__ */ s(v, { ...l, ...N });
2869
2867
  }
2870
2868
  const xe = "size-5";
2871
2869
  function ke(e) {
2872
2870
  const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, i = e.isEditing || !1;
2873
2871
  let d = n ? "border-transparent" : i && !r ? "border-card-invert" : "border-transparent";
2874
2872
  const b = ["large", "xlarge"].includes(e.size || "");
2875
- let g = "";
2876
- ["large", "xlarge"].indexOf(e.size || "") > -1 && (g = `${e.size}-widget`);
2873
+ let m = "";
2874
+ ["large", "xlarge"].indexOf(e.size || "") > -1 && (m = `${e.size}-widget`);
2877
2875
  let h = "";
2878
2876
  t === "row" && !r ? h = "min-h-48" : t === "column" && !r && (h = "min-h-96");
2879
2877
  let u = G(
@@ -2881,7 +2879,7 @@ function ke(e) {
2881
2879
  r ? "" : "has-no-children",
2882
2880
  i ? "editing" : "",
2883
2881
  h,
2884
- g,
2882
+ m,
2885
2883
  b ? "widget-container-grid" : "widget-container-flex",
2886
2884
  `direction-${t}`,
2887
2885
  `border ${d}`,
@@ -2891,7 +2889,7 @@ function ke(e) {
2891
2889
  e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
2892
2890
  }, D = (v) => {
2893
2891
  e.onMoveClick && e.widgetKey && e.onMoveClick(v, e.widgetKey, e.parentWidgetKey);
2894
- }, m = () => {
2892
+ }, g = () => {
2895
2893
  e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
2896
2894
  };
2897
2895
  return /* @__PURE__ */ W("div", { "data-testid": `container_${e.widgetKey}`, className: u, children: [
@@ -2900,7 +2898,7 @@ function ke(e) {
2900
2898
  "div",
2901
2899
  {
2902
2900
  className: "widget-title-wrapper w-full flex whitespace-nowrap",
2903
- onClick: m,
2901
+ onClick: g,
2904
2902
  children: /* @__PURE__ */ s("span", { className: "text-sm font-semibold capitalize", children: e.title })
2905
2903
  }
2906
2904
  ),
@@ -2915,7 +2913,7 @@ function ke(e) {
2915
2913
  placement: "top",
2916
2914
  title: "Target this Container"
2917
2915
  },
2918
- onClick: m,
2916
+ onClick: g,
2919
2917
  children: /* @__PURE__ */ s(
2920
2918
  tn,
2921
2919
  {
@@ -2988,18 +2986,18 @@ function We({
2988
2986
  alreadyAdded: n,
2989
2987
  addWidget: t
2990
2988
  }) {
2991
- const [r, i] = ce(!1), o = e.icon || nn, a = e.name || "Unknown", d = e.description || "---", g = (e.noDuplicatedWidgets || !1) && n, h = G(`
2989
+ const [r, i] = ce(!1), o = e.icon || nn, a = e.name || "Unknown", d = e.description || "---", m = (e.noDuplicatedWidgets || !1) && n, h = G(`
2992
2990
  flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
2993
- ${g ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
2991
+ ${m ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
2994
2992
  `);
2995
2993
  return /* @__PURE__ */ W("div", { className: h, style: { width: "calc(100% - 1rem)" }, onClick: () => {
2996
- g || t();
2994
+ m || t();
2997
2995
  }, children: [
2998
2996
  /* @__PURE__ */ s(o, { className: "" }),
2999
2997
  /* @__PURE__ */ W("div", { className: "w-full", children: [
3000
2998
  /* @__PURE__ */ W("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
3001
2999
  /* @__PURE__ */ s("span", { className: "font-bold", children: a }),
3002
- /* @__PURE__ */ s("div", { className: "text-xs", children: g ? "(Added)" : "" })
3000
+ /* @__PURE__ */ s("div", { className: "text-xs", children: m ? "(Added)" : "" })
3003
3001
  ] }),
3004
3002
  /* @__PURE__ */ W("div", { className: "flex flex-col text-xs", children: [
3005
3003
  /* @__PURE__ */ s("div", { children: d }),
@@ -3024,11 +3022,11 @@ function En({
3024
3022
  const b = d.key;
3025
3023
  if (["ArrowUp", "ArrowDown"].includes(b)) {
3026
3024
  d.preventDefault();
3027
- const g = _t.incrementOrDecrementValue(
3025
+ const m = _t.incrementOrDecrementValue(
3028
3026
  e,
3029
3027
  b === "ArrowUp" ? 1 : -1
3030
3028
  );
3031
- n(g);
3029
+ n(m);
3032
3030
  }
3033
3031
  }, a = (d) => {
3034
3032
  n({
@@ -3069,13 +3067,13 @@ function cr({
3069
3067
  onSettingItemsUpdated: a,
3070
3068
  onResetToDefaultDashboardClick: d,
3071
3069
  onUndoOrRedo: b,
3072
- onDoneClick: g
3070
+ onDoneClick: m
3073
3071
  }) {
3074
- const [h, u] = ce("Editing"), [p, y] = ce(0), [D, m] = ce(""), w = Array.from(n.keys()).map((E) => ({
3072
+ const [h, u] = ce("Editing"), [p, y] = ce(0), [D, g] = ce(""), w = Array.from(n.keys()).map((E) => ({
3075
3073
  widgetKey: E,
3076
3074
  metaData: $t(E, n)
3077
3075
  })), T = (E) => {
3078
- m(E.target.value);
3076
+ g(E.target.value);
3079
3077
  }, C = (E) => {
3080
3078
  const z = D.trim().toLowerCase();
3081
3079
  return z.length < 1 ? !0 : E.name.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
@@ -3249,7 +3247,7 @@ function cr({
3249
3247
  placement: "bottom",
3250
3248
  title: "Click to exit edit mode"
3251
3249
  },
3252
- onClick: g,
3250
+ onClick: m,
3253
3251
  children: "Done"
3254
3252
  }
3255
3253
  ) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenorlab/react-dashboard",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Foundation components for creating user-configurable dashboards in React",
5
5
  "author": "Damiano Fusco",
6
6
  "type": "module",