buzzcasting-utils 1.6.6 → 1.6.8

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.
@@ -145,6 +145,7 @@ export declare enum EVENTS {
145
145
  ADD_SLIDE = "addSlide",
146
146
  APP_READY = "appReady",
147
147
  API_UPDATE = "apiUpdate",
148
+ BACKGROUND_UPDATE = "backgroundUpdate",
148
149
  WS_API_REQUEST = "wsApiRequest",
149
150
  WS_API_RESPONSE = "wsApiResponse",
150
151
  WS_API_UPDATE = "wsApiRUpdate",
@@ -154,6 +155,8 @@ export declare enum EVENTS {
154
155
  CLOSE_BUILDER_DIALOG = "closeBuilderDialog",
155
156
  CLOSE_BUILDER_MODAL = "closeBuilderModal",
156
157
  CLOSE_MODAL = "closeModal",
158
+ COLOR_UPDATE = "colorUpdate",
159
+ COMPONENT_INDEX = "componentIndex",
157
160
  CSS_SET = "setCss",
158
161
  CSS_STORE = "storeCss",
159
162
  DASHBOARD_LOAD = "loadDashboard",
@@ -202,6 +205,7 @@ export declare enum EVENTS {
202
205
  UPLOAD_COMPLETED = "uploadCompleted",
203
206
  VERSION = "version",
204
207
  WIDGETS_CLEAR = "widgetsClear",
208
+ WIDGET_DID_UPDATE = "widgetDidUpdate",
205
209
  WIDGET_LOAD = "widgetLoad",
206
210
  WIDGET_STORE = "widgetStore",
207
211
  WIDGET_UPDATE = "widgetUpdate"
@@ -630,7 +634,7 @@ export declare interface IDateFormat {
630
634
  locale?: string;
631
635
  }
632
636
 
633
- declare interface IDynamics {
637
+ export declare interface IDynamics {
634
638
  engagement?: number;
635
639
  video_views?: number;
636
640
  sentiment?: 0;
@@ -740,6 +744,7 @@ export declare interface IMessage {
740
744
  published: string;
741
745
  harvested: string;
742
746
  utc: number;
747
+ timestamp?: number;
743
748
  expires: number;
744
749
  channel: string;
745
750
  type: string;
@@ -820,7 +825,7 @@ export declare interface IPresentations {
820
825
  */
821
826
  export declare interface IQuery {
822
827
  [x: string]: any;
823
- widget: string;
828
+ widget?: string;
824
829
  topics?: string;
825
830
  presentation?: string;
826
831
  dashboard?: string;
@@ -1,4 +1,4 @@
1
- var h = /* @__PURE__ */ ((e) => (e.CLOUD = "cloud", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.IMAGES = "images", e.MESSAGES = "messages", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.SERIES = "series", e.SLIDE = "slide", e.SLIDES = "slides", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e))(h || {}), m = /* @__PURE__ */ ((e) => (e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e))(m || {}), v = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e.APPROVE_MESSAGE = "approveMessage", e.CHANNEL = "channel", e.CLEAN_MESSAGES = "cleanMessages", e.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", e.CLOSE_BUILDER_MODAL = "closeBuilderModal", e.CLOSE_MODAL = "closeModal", e.CSS_SET = "setCss", e.CSS_STORE = "storeCss", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.IMAGE_GET = "getImage", e.IMAGE_SET = "setImage", e.IMAGE_STORED = "imageStored", e.LAUPPUT_UPDATE = "layoutUpdate", e.PREV_SLIDE = "prevSlide", e.RELOAD_PRESENTATION = "reloadPresentation", e.STAR_MESSAGE = "starMessage", e.GOTO_SLIDE = "gotoSlide", e.NEXT_SLIDE = "nextSlide", e.PREFERENCE_LOAD = "loadPreference", e.PREFERENCE_STORE = "storePreference", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.SCREENSHOT_TAKE = "takeScreenshot", e.SCREENSHOT_STORE = "storeScreenshot", e.SECTION_UPDATE = "sectionUpdate", e.SHOW_BUILDER_DIALOG = "showBuilderDialog", e.SHOW_BUILDER_MODAL = "showBuilderModal", e.SHOW_MODAL = "showModal", e.SLIDE_DID_LOAD = "slideDidLoad", e.SLIDE_GET = "getSlide", e.SLIDE_GOTO = "slideGoto", e.SLIDE_LOAD = "loadSlide", e.SLIDE_READY = "slideReady", e.SLIDE_SAVED = "slideSaved", e.SLIDE_SET = "setSlide", e.SLIDE_STORE = "storeSlide", e.SLIDE_STORED = "slideStored", e.SLIDE_TRANSITIONER = "slideTransitioner", e.START_TRANSITIONER = "startTransitioner", e.STORAGE_INIT = "storageInit", e.SUBSCRIBE = "subscribe", e.SUSPEND_ACCOUNT = "suspendAccount", e.SWITCH_PRESENTATION = "switchPresentation", e.REMOVE_CLOUD = "removeCloud", e.UPDATE = "update", e.UPLOAD_COMPLETED = "uploadCompleted", e.VERSION = "version", e.WIDGETS_CLEAR = "widgetsClear", e.WIDGET_LOAD = "widgetLoad", e.WIDGET_STORE = "widgetStore", e.WIDGET_UPDATE = "widgetUpdate", e))(v || {}), x = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(x || {}), I = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(I || {});
1
+ var h = /* @__PURE__ */ ((e) => (e.CLOUD = "cloud", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.IMAGES = "images", e.MESSAGES = "messages", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.SERIES = "series", e.SLIDE = "slide", e.SLIDES = "slides", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e))(h || {}), m = /* @__PURE__ */ ((e) => (e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e))(m || {}), L = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.BACKGROUND_UPDATE = "backgroundUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e.APPROVE_MESSAGE = "approveMessage", e.CHANNEL = "channel", e.CLEAN_MESSAGES = "cleanMessages", e.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", e.CLOSE_BUILDER_MODAL = "closeBuilderModal", e.CLOSE_MODAL = "closeModal", e.COLOR_UPDATE = "colorUpdate", e.COMPONENT_INDEX = "componentIndex", e.CSS_SET = "setCss", e.CSS_STORE = "storeCss", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.IMAGE_GET = "getImage", e.IMAGE_SET = "setImage", e.IMAGE_STORED = "imageStored", e.LAUPPUT_UPDATE = "layoutUpdate", e.PREV_SLIDE = "prevSlide", e.RELOAD_PRESENTATION = "reloadPresentation", e.STAR_MESSAGE = "starMessage", e.GOTO_SLIDE = "gotoSlide", e.NEXT_SLIDE = "nextSlide", e.PREFERENCE_LOAD = "loadPreference", e.PREFERENCE_STORE = "storePreference", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.SCREENSHOT_TAKE = "takeScreenshot", e.SCREENSHOT_STORE = "storeScreenshot", e.SECTION_UPDATE = "sectionUpdate", e.SHOW_BUILDER_DIALOG = "showBuilderDialog", e.SHOW_BUILDER_MODAL = "showBuilderModal", e.SHOW_MODAL = "showModal", e.SLIDE_DID_LOAD = "slideDidLoad", e.SLIDE_GET = "getSlide", e.SLIDE_GOTO = "slideGoto", e.SLIDE_LOAD = "loadSlide", e.SLIDE_READY = "slideReady", e.SLIDE_SAVED = "slideSaved", e.SLIDE_SET = "setSlide", e.SLIDE_STORE = "storeSlide", e.SLIDE_STORED = "slideStored", e.SLIDE_TRANSITIONER = "slideTransitioner", e.START_TRANSITIONER = "startTransitioner", e.STORAGE_INIT = "storageInit", e.SUBSCRIBE = "subscribe", e.SUSPEND_ACCOUNT = "suspendAccount", e.SWITCH_PRESENTATION = "switchPresentation", e.REMOVE_CLOUD = "removeCloud", e.UPDATE = "update", e.UPLOAD_COMPLETED = "uploadCompleted", e.VERSION = "version", e.WIDGETS_CLEAR = "widgetsClear", e.WIDGET_DID_UPDATE = "widgetDidUpdate", e.WIDGET_LOAD = "widgetLoad", e.WIDGET_STORE = "widgetStore", e.WIDGET_UPDATE = "widgetUpdate", e))(L || {}), D = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(D || {}), v = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(v || {});
2
2
  function J(e) {
3
3
  const t = e.toUpperCase().split(/[\s_-]+/);
4
4
  return t.length > 0 ? (t.forEach((r, n) => {
@@ -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 != null && n.name && (t[n.name] = n.value);
26
+ n?.name && (t[n.name] = n.value);
27
27
  }
28
28
  return t;
29
29
  }
@@ -39,7 +39,7 @@ function V(e) {
39
39
  const t = {};
40
40
  for (let r = 0; r < e.length; r++) {
41
41
  const n = e[r];
42
- n.name !== "class" && (t[n.name] = E(n.value));
42
+ n.name !== "class" && (t[n.name] = P(n.value));
43
43
  }
44
44
  return t;
45
45
  }
@@ -98,7 +98,7 @@ function te(e, t) {
98
98
  function re(e) {
99
99
  return e.replace(/^\w|[A-Z]|\b\w/g, (t, r) => r === 0 ? t.toLowerCase() : t.toUpperCase()).replace(/\s+/g, "");
100
100
  }
101
- function E(e) {
101
+ function P(e) {
102
102
  return e.toLowerCase().split("-").reduce((t, r) => t + (r.charAt(0).toUpperCase() + r.slice(1)));
103
103
  }
104
104
  const ne = (e) => e.charAt(0).toUpperCase() + e.slice(1);
@@ -120,12 +120,12 @@ const ae = () => Math.floor(Math.random() * 16777215).toString(16), ie = () => {
120
120
  let r = e.split(",");
121
121
  return r = r.map((n) => parseFloat(n.trim()).toString()), e = "background-color: rgba(" + parseInt(r[0]) + "," + parseInt(r[1]) + "," + parseInt(r[2]) + "," + t + ");", e;
122
122
  };
123
- function P(e) {
123
+ function E(e) {
124
124
  e.reduce(
125
125
  (t, r) => Object.keys(r).reduce(
126
126
  (n, o) => ({
127
127
  ...n,
128
- [o]: o in t && typeof t[o] == "object" && t[o] !== null && typeof r[o] == "object" && r[o] !== null ? P([t[o], r[o]]) : r[o]
128
+ [o]: o in t && typeof t[o] == "object" && t[o] !== null && typeof r[o] == "object" && r[o] !== null ? E([t[o], r[o]]) : r[o]
129
129
  }),
130
130
  t
131
131
  ),
@@ -134,7 +134,7 @@ function P(e) {
134
134
  }
135
135
  const de = (e) => [...new Set(e)], ue = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
136
136
  function fe(e, t = "font-bold") {
137
- return `${(e == null ? void 0 : e.title) !== null ? `<div class="${t}">${e.title}</div>` : ""}${e != null && e.content ? e.content.replace(/\n\n/g, `
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 S(e, t, r) {
159
+ function y(e, t, r) {
160
160
  return Object.keys(t).sort().reduce(n, e);
161
161
  function n(o, a) {
162
- return L(o, t[a], a, r);
162
+ return I(o, t[a], a, r);
163
163
  }
164
164
  }
165
- function L(e, t, r, n) {
166
- const o = f(f(f(e, r), y(t)), typeof t);
165
+ function I(e, t, r, n) {
166
+ const o = f(f(f(e, r), M(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 = S(o, t, n);
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,11 +183,11 @@ function L(e, t, r, n) {
183
183
  }
184
184
  return f(o, t.toString());
185
185
  }
186
- function y(e) {
186
+ function M(e) {
187
187
  return Object.prototype.toString.call(e);
188
188
  }
189
189
  function ge(e) {
190
- return k(L(0, e, "", []).toString(16), 8);
190
+ return k(I(0, e, "", []).toString(16), 8);
191
191
  }
192
192
  const be = (e) => {
193
193
  let t = "";
@@ -242,7 +242,7 @@ const be = (e) => {
242
242
  let t = {}, r = e.split(",");
243
243
  for (let n = 0; n < r.length; n++) t[r[n]] = !0;
244
244
  return t;
245
- }, R = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, _ = /^<\/([-A-Za-z0-9_]+)[^>]*>/, M = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, $ = g(
245
+ }, _ = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, R = /^<\/([-A-Za-z0-9_]+)[^>]*>/, $ = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, S = g(
246
246
  "area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"
247
247
  ), C = g(
248
248
  "a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"
@@ -266,7 +266,7 @@ const be = (e) => {
266
266
  };
267
267
  for (; e; ) {
268
268
  if (n = !0, !a.at(-1) || !T[a.at(-1)]) {
269
- if (e.indexOf("<!--") == 0 ? (r = e.indexOf("-->"), r >= 0 && (t.comment && t.comment(e.substring(4, r)), e = e.substring(r + 3), n = !1)) : e.indexOf("</") == 0 ? (o = e.match(_), o && (e = e.substring(o[0].length), o[0].replace(_, i), n = !1)) : e.indexOf("<") == 0 && (o = e.match(R), o && (e = e.substring(o[0].length), o[0].replace(R, u), n = !1)), n) {
269
+ if (e.indexOf("<!--") == 0 ? (r = e.indexOf("-->"), r >= 0 && (t.comment && t.comment(e.substring(4, r)), e = e.substring(r + 3), n = !1)) : e.indexOf("</") == 0 ? (o = e.match(R), o && (e = e.substring(o[0].length), o[0].replace(R, i), n = !1)) : e.indexOf("<") == 0 && (o = e.match(_), o && (e = e.substring(o[0].length), o[0].replace(_, u), n = !1)), n) {
270
270
  r = e.indexOf("<");
271
271
  let c = r < 0 ? e : e.substring(0, r);
272
272
  e = r < 0 ? "" : e.substring(r), t.chars && t.chars(c);
@@ -290,12 +290,12 @@ const be = (e) => {
290
290
  if (s = s.toLowerCase(), C[s])
291
291
  for (; a.at(-1) && U[a.at(-1)]; )
292
292
  i("", a.at(-1));
293
- if (G[s] && a.at(-1) == s && i("", s), p = $[s] || !!p, p || a.push(s), t.start) {
293
+ if (G[s] && a.at(-1) == s && i("", s), p = S[s] || !!p, p || a.push(s), t.start) {
294
294
  const O = [];
295
- d.replace(M, function(Q, D) {
296
- let w = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : B[D] ? D : "";
295
+ d.replace($, function(Q, x) {
296
+ let w = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : B[x] ? x : "";
297
297
  O.push({
298
- name: D,
298
+ name: x,
299
299
  value: w,
300
300
  escaped: w.replace(/(^|[^\\])"/g, '$1\\"')
301
301
  //"
@@ -400,17 +400,18 @@ const he = (e) => {
400
400
  return `<!-- ${e.text} -->`;
401
401
  if (e.node === "root")
402
402
  return r;
403
- }, xe = () => {
403
+ }, De = () => {
404
404
  const e = (t = !1) => {
405
405
  const n = document.createElement("canvas").getContext("2d", { willReadFrequently: t });
406
406
  return n !== null ? (n.moveTo(0, 0), n.lineTo(120, 121), n.stroke(), n.getImageData(0, 0, 200, 200).data.join()) : null;
407
407
  };
408
408
  return e(!0) !== e(!1);
409
- }, De = (e, t = 0, r = !0, n = "en") => {
409
+ }, xe = (e, t = 0, r = !0, n = "en") => {
410
+ if (e === void 0) return "";
410
411
  if (e = typeof e == "string" || e instanceof String ? parseFloat(e.replace(/[^0-9.]/g, "")) : e, r === !1)
411
412
  return e.toLocaleString(n);
412
413
  if (e < 1e3)
413
- return e = e.toString().replace(/[^0-9.]/g, "");
414
+ return e = ("" + e).replace(/[^0-9.]/g, "");
414
415
  e = e.toString().replace(/[^0-9.]/g, "");
415
416
  let o = [
416
417
  { v: 1e3, s: "K" },
@@ -438,12 +439,12 @@ const he = (e) => {
438
439
  console.error(...t);
439
440
  break;
440
441
  }
441
- }, we = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), Re = (e) => e.replace(/\>\</g, `>
442
- <`), _e = (e) => e.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g, "").replace(/\s*\{\s*/g, "{").replace(/\s*\}\s*/g, "}").replace(/\s*\:\s*/g, ":").replace(/\s*\;\s*/g, ";").replace(/\s*\,\s*/g, ",").replace(/\s*\~\s*/g, "~").replace(/\s*\>\s*/g, ">").replace(/\s*\+\s*/g, "+").replace(/\s*\!\s*/g, "!"), Le = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
442
+ }, we = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), _e = (e) => e.replace(/\>\</g, `>
443
+ <`), Re = (e) => e.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g, "").replace(/\s*\{\s*/g, "{").replace(/\s*\}\s*/g, "}").replace(/\s*\:\s*/g, ":").replace(/\s*\;\s*/g, ";").replace(/\s*\,\s*/g, ",").replace(/\s*\~\s*/g, "~").replace(/\s*\>\s*/g, ">").replace(/\s*\+\s*/g, "+").replace(/\s*\!\s*/g, "!"), Ie = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
443
444
  `).replace(/\}/g, `}
444
445
  `).replace(/\;/g, `;
445
446
  `);
446
- function ve(e, t) {
447
+ function Le(e, t) {
447
448
  const r = [
448
449
  { value: 1, symbol: "" },
449
450
  { value: 1e3, symbol: "K" },
@@ -458,15 +459,15 @@ function ve(e, t) {
458
459
  ;
459
460
  return (e / r[o].value).toFixed(t).replace(n, "$1") + r[o].symbol;
460
461
  }
461
- function Ie(e) {
462
+ function ve(e) {
462
463
  const t = RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);
463
464
  return t && decodeURIComponent(t[1].replace(/\+/g, " ")) || null;
464
465
  }
465
- const Ee = (e) => new Proxy(new URLSearchParams(window.location.search), {
466
+ const Pe = (e) => new Proxy(new URLSearchParams(window.location.search), {
466
467
  // @ts-ignore
467
468
  get: (r, n) => r.get(n)
468
469
  })[e];
469
- function Pe(e) {
470
+ function Ee(e) {
470
471
  return e[Math.floor(Math.random() * e.length)];
471
472
  }
472
473
  function ke(e) {
@@ -480,14 +481,13 @@ function ke(e) {
480
481
  return {};
481
482
  }
482
483
  }
483
- function Se(e) {
484
+ function ye(e) {
484
485
  const t = window.BuzzCasting.getOptions().suspended ?? !1;
485
486
  return e.forEach((r) => {
486
- var n;
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(
487
+ if (t ? r.content = "License suspended, please contact your Sales Representative to restore service" : r.content = r.content?.replace(
488
488
  /(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,
489
489
  ""
490
- )) || "", r.sender !== null)
490
+ ) || "", r.sender !== null)
491
491
  switch (!0) {
492
492
  case r.sender.title === "Unknown author":
493
493
  r.sender.title = "", r.sender.name = "";
@@ -516,18 +516,18 @@ function Se(e) {
516
516
  influence: 0
517
517
  };
518
518
  if (r.sender.title === "" && r.link !== "") {
519
- const o = new URL(r.link);
520
- r.sender.title = o.hostname.replace("www.", "");
519
+ const n = new URL(r.link);
520
+ r.sender.title = n.hostname.replace("www.", "");
521
521
  }
522
522
  }), e;
523
523
  }
524
- function ye(e, t, r, n) {
524
+ function Me(e, t, r, n) {
525
525
  e.stopPropagation(), t.showModal({
526
526
  showComponent: "card-modal",
527
527
  props: { data: r, options: n }
528
528
  });
529
529
  }
530
- function Me(e) {
530
+ function $e(e) {
531
531
  const t = [...e];
532
532
  for (let r = t.length - 1; r > 0; r--) {
533
533
  const n = Math.floor(Math.random() * (r + 1));
@@ -535,14 +535,14 @@ function Me(e) {
535
535
  }
536
536
  return t;
537
537
  }
538
- function $e() {
538
+ function Se() {
539
539
  let e = "";
540
540
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
541
541
  for (let r = 0; r < 7; r++) e += t.charAt(Math.floor(Math.random() * t.length));
542
542
  return e;
543
543
  }
544
544
  const Ce = (e) => {
545
- switch (e == null ? void 0 : e.type) {
545
+ switch (e?.type) {
546
546
  case h.MESSAGES:
547
547
  return m.MESSAGES;
548
548
  case h.SERIES:
@@ -574,24 +574,22 @@ function Te(e) {
574
574
  return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
575
575
  }
576
576
  function He(e) {
577
- var t;
578
577
  if (e.widget === void 0) {
579
- const r = (t = e.topics) == null ? void 0 : t.split("-");
580
- r && r.length > 1 ? (e.dashboard = r ? r[0] : "", e.widget = r ? r[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
578
+ const t = e.topics?.split("-");
579
+ t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
581
580
  }
582
581
  return e;
583
582
  }
584
583
  function We(e, t) {
585
- var i;
586
584
  let r, n, o, a, l;
587
585
  switch (e.moderation) {
588
- case x.BEFORE:
589
- r = /* @__PURE__ */ new Date(), n = (i = e.beforeTime) == null ? void 0 : i.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);
586
+ case D.BEFORE:
587
+ 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
588
  break;
591
- case x.DELAYED:
589
+ case D.DELAYED:
592
590
  e.delay && e.delay > 0 && (t.delay = `${e.delay}`);
593
591
  break;
594
- case x.APPROVED:
592
+ case D.APPROVED:
595
593
  t.approved = "1";
596
594
  break;
597
595
  default:
@@ -599,60 +597,60 @@ function We(e, t) {
599
597
  }
600
598
  return t;
601
599
  }
602
- var j = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(j || {}), X = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(X || {});
600
+ var X = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(X || {}), j = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(j || {});
603
601
  export {
604
602
  h as API,
605
603
  m as CSS,
606
- v as EVENTS,
604
+ L as EVENTS,
607
605
  A as HTMLParser,
608
606
  me as HTMLtoDOM,
609
607
  be as HTMLtoXML,
610
- x as MODERATION,
608
+ D as MODERATION,
611
609
  ce as RGBAchangeA,
612
- I as STORAGE,
613
- X as ShapeType,
614
- j as Type,
610
+ v as STORAGE,
611
+ j as ShapeType,
612
+ X as Type,
615
613
  J as anonymize,
616
614
  z as attachedMedia,
617
615
  q as attrs,
618
616
  ee as awaitElement,
619
617
  te as brandLogo,
620
- E as camelCase,
618
+ P as camelCase,
621
619
  V as camelCasedProps,
622
620
  re as camelize,
623
621
  ne as capitalizeFirstLetter,
624
622
  oe as clearContents,
625
- P as deepMerge,
623
+ E as deepMerge,
626
624
  ue as escape,
627
625
  N as filterAttributes,
628
626
  fe as formatContent,
629
627
  pe as getGuid,
630
628
  Te as getKey,
631
- Ie as getParameterByName,
632
- Ee as getQueryParam,
633
- xe as hasHWA,
629
+ ve as getParameterByName,
630
+ Pe as getQueryParam,
631
+ De as hasHWA,
634
632
  ge as hashSum,
635
633
  he as html2json,
636
- De as intToString,
634
+ xe as intToString,
637
635
  Ae as isEmpty,
638
636
  F as json2html,
639
637
  Oe as log,
640
- Le as maxifyCss,
641
- Re as maxifyHtml,
642
- _e as minifyCss,
638
+ Ie as maxifyCss,
639
+ _e as maxifyHtml,
640
+ Re as minifyCss,
643
641
  we as minifyHtml,
644
642
  We as moderation,
645
- ve as numberFormatter,
643
+ Le as numberFormatter,
646
644
  ae as randomColor,
647
645
  le as randomRGB,
648
646
  se as randomRGBA,
649
647
  ie as randomRGBAfull,
650
- Pe as randomValue,
648
+ Ee as randomValue,
651
649
  ke as rtl,
652
- Se as sanitize,
653
- ye as showModal,
654
- Me as shuffleMessages,
655
- $e as stringGen,
650
+ ye as sanitize,
651
+ Me as showModal,
652
+ $e as shuffleMessages,
653
+ Se as stringGen,
656
654
  Ce as typeCss,
657
655
  Ue as uniq,
658
656
  de as unique,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.6.6",
4
+ "version": "1.6.8",
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.13.2",
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.29",
36
- "@typescript-eslint/eslint-plugin": "^8.33.0",
37
- "@typescript-eslint/parser": "^8.33.0",
38
- "@vitest/coverage-v8": "^3.2.0",
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.28.0",
42
- "lint-staged": "^16.0.0",
41
+ "eslint": "^9.29.0",
42
+ "lint-staged": "^16.1.2",
43
43
  "typescript": "^5.8.3",
44
- "vite": "^6.3.5",
44
+ "vite": "^7.0.0",
45
45
  "vite-plugin-dts": "^4.5.4",
46
- "vitest": "^3.2.0"
46
+ "vitest": "^3.2.4"
47
47
  },
48
48
  "lint-staged": {
49
49
  "*.ts": "npm run lint"