buzzcasting-utils 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buzzcasting-utils.d.ts +1 -1
- package/dist/buzzcasting-utils.esm.js +18 -21
- package/package.json +10 -10
|
@@ -23,7 +23,7 @@ function q(e) {
|
|
|
23
23
|
const t = {};
|
|
24
24
|
for (let r = 0; r < e.length; r++) {
|
|
25
25
|
const n = e.item(r);
|
|
26
|
-
n
|
|
26
|
+
n?.name && (t[n.name] = n.value);
|
|
27
27
|
}
|
|
28
28
|
return t;
|
|
29
29
|
}
|
|
@@ -134,7 +134,7 @@ function P(e) {
|
|
|
134
134
|
}
|
|
135
135
|
const de = (e) => [...new Set(e)], ue = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
136
136
|
function fe(e, t = "font-bold") {
|
|
137
|
-
return `${
|
|
137
|
+
return `${e?.title !== null ? `<div class="${t}">${e.title}</div>` : ""}${e?.content ? e.content.replace(/\n\n/g, `
|
|
138
138
|
`).replace(/\n/g, "<br/>") : ""}`;
|
|
139
139
|
}
|
|
140
140
|
const pe = () => [b(2), b(1), b(1), b(1), b(3)].join("-"), b = (e) => {
|
|
@@ -156,14 +156,14 @@ function f(e, t) {
|
|
|
156
156
|
n = t.charCodeAt(r), e = (e << 5) - e + n, e |= 0;
|
|
157
157
|
return e < 0 ? e * -2 : e;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function y(e, t, r) {
|
|
160
160
|
return Object.keys(t).sort().reduce(n, e);
|
|
161
161
|
function n(o, a) {
|
|
162
162
|
return L(o, t[a], a, r);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
function L(e, t, r, n) {
|
|
166
|
-
const o = f(f(f(e, r),
|
|
166
|
+
const o = f(f(f(e, r), S(t)), typeof t);
|
|
167
167
|
if (t === null)
|
|
168
168
|
return f(o, "null");
|
|
169
169
|
if (t === void 0)
|
|
@@ -172,7 +172,7 @@ function L(e, t, r, n) {
|
|
|
172
172
|
if (n.includes(t))
|
|
173
173
|
return f(o, `[Circular]${r}`);
|
|
174
174
|
n.push(t);
|
|
175
|
-
const a =
|
|
175
|
+
const a = y(o, t, n);
|
|
176
176
|
if (!("valueOf" in t) || typeof t.valueOf != "function")
|
|
177
177
|
return a;
|
|
178
178
|
try {
|
|
@@ -183,7 +183,7 @@ function L(e, t, r, n) {
|
|
|
183
183
|
}
|
|
184
184
|
return f(o, t.toString());
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function S(e) {
|
|
187
187
|
return Object.prototype.toString.call(e);
|
|
188
188
|
}
|
|
189
189
|
function ge(e) {
|
|
@@ -480,14 +480,13 @@ function ke(e) {
|
|
|
480
480
|
return {};
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function ye(e) {
|
|
484
484
|
const t = window.BuzzCasting.getOptions().suspended ?? !1;
|
|
485
485
|
return e.forEach((r) => {
|
|
486
|
-
|
|
487
|
-
if (t ? r.content = "License suspended, please contact your Sales Representative to restore service" : r.content = ((n = r.content) == null ? void 0 : n.replace(
|
|
486
|
+
if (t ? r.content = "License suspended, please contact your Sales Representative to restore service" : r.content = r.content?.replace(
|
|
488
487
|
/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,
|
|
489
488
|
""
|
|
490
|
-
)
|
|
489
|
+
) || "", r.sender !== null)
|
|
491
490
|
switch (!0) {
|
|
492
491
|
case r.sender.title === "Unknown author":
|
|
493
492
|
r.sender.title = "", r.sender.name = "";
|
|
@@ -516,12 +515,12 @@ function Se(e) {
|
|
|
516
515
|
influence: 0
|
|
517
516
|
};
|
|
518
517
|
if (r.sender.title === "" && r.link !== "") {
|
|
519
|
-
const
|
|
520
|
-
r.sender.title =
|
|
518
|
+
const n = new URL(r.link);
|
|
519
|
+
r.sender.title = n.hostname.replace("www.", "");
|
|
521
520
|
}
|
|
522
521
|
}), e;
|
|
523
522
|
}
|
|
524
|
-
function
|
|
523
|
+
function Se(e, t, r, n) {
|
|
525
524
|
e.stopPropagation(), t.showModal({
|
|
526
525
|
showComponent: "card-modal",
|
|
527
526
|
props: { data: r, options: n }
|
|
@@ -542,7 +541,7 @@ function $e() {
|
|
|
542
541
|
return e;
|
|
543
542
|
}
|
|
544
543
|
const Ce = (e) => {
|
|
545
|
-
switch (e
|
|
544
|
+
switch (e?.type) {
|
|
546
545
|
case h.MESSAGES:
|
|
547
546
|
return m.MESSAGES;
|
|
548
547
|
case h.SERIES:
|
|
@@ -574,19 +573,17 @@ function Te(e) {
|
|
|
574
573
|
return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
|
|
575
574
|
}
|
|
576
575
|
function He(e) {
|
|
577
|
-
var t;
|
|
578
576
|
if (e.widget === void 0) {
|
|
579
|
-
const
|
|
580
|
-
|
|
577
|
+
const t = e.topics?.split("-");
|
|
578
|
+
t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
|
|
581
579
|
}
|
|
582
580
|
return e;
|
|
583
581
|
}
|
|
584
582
|
function We(e, t) {
|
|
585
|
-
var i;
|
|
586
583
|
let r, n, o, a, l;
|
|
587
584
|
switch (e.moderation) {
|
|
588
585
|
case x.BEFORE:
|
|
589
|
-
r = /* @__PURE__ */ new Date(), n =
|
|
586
|
+
r = /* @__PURE__ */ new Date(), n = e.beforeTime?.split(":"), o = Number.parseInt(n ? n[0] : "00"), a = Number.parseInt(n ? n[1] : "00"), l = Number.parseInt(n ? n[2] : "00"), t.before = r.setHours(o, a, l, 0) / 1e3, t.period || (t.period = r.getDay() === 1 ? 72 : 24);
|
|
590
587
|
break;
|
|
591
588
|
case x.DELAYED:
|
|
592
589
|
e.delay && e.delay > 0 && (t.delay = `${e.delay}`);
|
|
@@ -649,8 +646,8 @@ export {
|
|
|
649
646
|
ie as randomRGBAfull,
|
|
650
647
|
Pe as randomValue,
|
|
651
648
|
ke as rtl,
|
|
652
|
-
|
|
653
|
-
|
|
649
|
+
ye as sanitize,
|
|
650
|
+
Se as showModal,
|
|
654
651
|
Me as shuffleMessages,
|
|
655
652
|
$e as stringGen,
|
|
656
653
|
Ce as typeCss,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buzzcasting-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.7",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Mark Tamis, TouchFlows SAS",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@antfu/eslint-config": "^4.
|
|
32
|
+
"@antfu/eslint-config": "^4.16.1",
|
|
33
33
|
"@commitlint/cli": "^19.8.1",
|
|
34
34
|
"@commitlint/config-conventional": "^19.8.1",
|
|
35
|
-
"@types/node": "^22.15.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
37
|
-
"@typescript-eslint/parser": "^8.
|
|
38
|
-
"@vitest/coverage-v8": "^3.2.
|
|
35
|
+
"@types/node": "^22.15.32",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^8.35.0",
|
|
37
|
+
"@typescript-eslint/parser": "^8.35.0",
|
|
38
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
39
39
|
"camelcase": "^8.0.0",
|
|
40
40
|
"changelogen": "^0.6.1",
|
|
41
|
-
"eslint": "^9.
|
|
42
|
-
"lint-staged": "^16.
|
|
41
|
+
"eslint": "^9.29.0",
|
|
42
|
+
"lint-staged": "^16.1.2",
|
|
43
43
|
"typescript": "^5.8.3",
|
|
44
|
-
"vite": "^
|
|
44
|
+
"vite": "^7.0.0",
|
|
45
45
|
"vite-plugin-dts": "^4.5.4",
|
|
46
|
-
"vitest": "^3.2.
|
|
46
|
+
"vitest": "^3.2.4"
|
|
47
47
|
},
|
|
48
48
|
"lint-staged": {
|
|
49
49
|
"*.ts": "npm run lint"
|