buzzcasting-utils 1.3.6 → 1.3.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.
@@ -913,6 +913,7 @@ export declare interface IShow {
913
913
  }
914
914
 
915
915
  export declare interface ISlide {
916
+ 'id': string;
916
917
  'label': string;
917
918
  'cols': number;
918
919
  'rows': number;
@@ -133,14 +133,14 @@ function f(e, t) {
133
133
  n = t.charCodeAt(r), e = (e << 5) - e + n, e |= 0;
134
134
  return e < 0 ? e * -2 : e;
135
135
  }
136
- function y(e, t, r) {
136
+ function I(e, t, r) {
137
137
  return Object.keys(t).sort().reduce(n, e);
138
138
  function n(o, a) {
139
139
  return _(o, t[a], a, r);
140
140
  }
141
141
  }
142
142
  function _(e, t, r, n) {
143
- const o = f(f(f(e, r), I(t)), typeof t);
143
+ const o = f(f(f(e, r), y(t)), typeof t);
144
144
  if (t === null)
145
145
  return f(o, "null");
146
146
  if (t === void 0)
@@ -149,7 +149,7 @@ function _(e, t, r, n) {
149
149
  if (n.includes(t))
150
150
  return f(o, `[Circular]${r}`);
151
151
  n.push(t);
152
- const a = y(o, t, n);
152
+ const a = I(o, t, n);
153
153
  if (!("valueOf" in t) || typeof t.valueOf != "function")
154
154
  return a;
155
155
  try {
@@ -160,7 +160,7 @@ function _(e, t, r, n) {
160
160
  }
161
161
  return f(o, t.toString());
162
162
  }
163
- function I(e) {
163
+ function y(e) {
164
164
  return Object.prototype.toString.call(e);
165
165
  }
166
166
  function ie(e) {
@@ -219,23 +219,16 @@ const se = (e) => {
219
219
  let t = {}, r = e.split(",");
220
220
  for (let n = 0; n < r.length; n++) t[r[n]] = !0;
221
221
  return t;
222
- }, R = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, E = /^<\/([-A-Za-z0-9_]+)[^>]*>/, M = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, S = g(
222
+ }, R = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, E = /^<\/([-A-Za-z0-9_]+)[^>]*>/, M = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, C = g(
223
223
  "area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"
224
- ), C = g(
224
+ ), S = g(
225
225
  "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"
226
226
  ), U = g(
227
227
  "abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"
228
228
  ), T = g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), B = g(
229
229
  "checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
230
- ), H = g("script,style");
231
- Array.prototype.last = function() {
232
- return this[this.length - 1];
233
- };
234
- const D = (e, t) => {
230
+ ), H = g("script,style"), D = (e, t) => {
235
231
  let r, n, o, a = [], l = e;
236
- a.last = function() {
237
- return this[this.length - 1];
238
- };
239
232
  const i = (c, s) => {
240
233
  let d;
241
234
  if (!s) d = 0;
@@ -249,7 +242,7 @@ const D = (e, t) => {
249
242
  }
250
243
  };
251
244
  for (; e; ) {
252
- if (n = !0, !a.last() || !H[a.last()]) {
245
+ if (n = !0, !a.at(-1) || !H[a.at(-1)]) {
253
246
  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(E), o && (e = e.substring(o[0].length), o[0].replace(E, 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) {
254
247
  r = e.indexOf("<");
255
248
  let c = r < 0 ? e : e.substring(0, r);
@@ -258,23 +251,23 @@ const D = (e, t) => {
258
251
  } else
259
252
  e = e.replace(
260
253
  //@ts-ignore
261
- new RegExp("([\\s\\S]*?)</" + a.last() + "[^>]*>"),
254
+ new RegExp("([\\s\\S]*?)</" + a.at(-1) + "[^>]*>"),
262
255
  function(c, s) {
263
256
  return s = s.replace(
264
257
  /<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,
265
258
  "$1$2"
266
259
  ), t.chars && t.chars(s), "";
267
260
  }
268
- ), i("", a.last());
261
+ ), i("", a.at(-1));
269
262
  if (e == l) throw "Parse Error: " + e;
270
263
  l = e;
271
264
  }
272
265
  i();
273
266
  function u(c, s, d, p) {
274
- if (s = s.toLowerCase(), C[s])
275
- for (; a.last() && U[a.last()]; )
276
- i("", a.last());
277
- if (T[s] && a.last() == s && i("", s), p = S[s] || !!p, p || a.push(s), t.start) {
267
+ if (s = s.toLowerCase(), S[s])
268
+ for (; a.at(-1) && U[a.at(-1)]; )
269
+ i("", a.at(-1));
270
+ if (T[s] && a.at(-1) == s && i("", s), p = C[s] || !!p, p || a.push(s), t.start) {
278
271
  const w = [];
279
272
  d.replace(M, function(j, A) {
280
273
  let O = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : B[A] ? A : "";
@@ -385,8 +378,7 @@ const ce = (e) => {
385
378
  if (e.node === "root")
386
379
  return r;
387
380
  }, de = (e, t = 0, r = !0, n = "en") => {
388
- if (typeof e == "string" || e instanceof String) return e.toString().replace(/[^0-9.]/g, "");
389
- if (r === !1)
381
+ if (e = Number.isNaN(e) ? e : parseFloat(e.replace(/[^0-9.]/g, "")), r === !1)
390
382
  return e.toLocaleString(n);
391
383
  if (e < 1e3)
392
384
  return e = e.toString().replace(/[^0-9.]/g, "");
@@ -562,7 +554,7 @@ function ve(e) {
562
554
  }
563
555
  return e;
564
556
  }
565
- function ye(e, t) {
557
+ function Ie(e, t) {
566
558
  var i;
567
559
  let r, n, o, a, l;
568
560
  switch (e.moderation) {
@@ -617,7 +609,7 @@ export {
617
609
  pe as maxifyHtml,
618
610
  ge as minifyCss,
619
611
  fe as minifyHtml,
620
- ye as moderation,
612
+ Ie as moderation,
621
613
  he as numberFormatter,
622
614
  Ae as randomValue,
623
615
  De as rtl,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.3.6",
4
+ "version": "1.3.8",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",
@@ -32,18 +32,18 @@
32
32
  "@antfu/eslint-config": "^4.11.0",
33
33
  "@commitlint/cli": "^19.8.0",
34
34
  "@commitlint/config-conventional": "^19.8.0",
35
- "@types/node": "^22.13.14",
36
- "@typescript-eslint/eslint-plugin": "^8.28.0",
37
- "@typescript-eslint/parser": "^8.28.0",
38
- "@vitest/coverage-v8": "^3.0.9",
35
+ "@types/node": "^22.14.0",
36
+ "@typescript-eslint/eslint-plugin": "^8.29.1",
37
+ "@typescript-eslint/parser": "^8.29.1",
38
+ "@vitest/coverage-v8": "^3.1.1",
39
39
  "camelcase": "^8.0.0",
40
40
  "changelogen": "^0.6.1",
41
- "eslint": "^9.23.0",
41
+ "eslint": "^9.24.0",
42
42
  "lint-staged": "^15.5.0",
43
- "typescript": "^5.8.2",
44
- "vite": "^6.2.3",
43
+ "typescript": "^5.8.3",
44
+ "vite": "^6.2.5",
45
45
  "vite-plugin-dts": "^4.5.3",
46
- "vitest": "^3.0.9"
46
+ "vitest": "^3.1.1"
47
47
  },
48
48
  "lint-staged": {
49
49
  "*.ts": "npm run lint"