dimsum-chat 0.4.3 → 0.4.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.
@@ -1,7 +1,7 @@
1
- var I = Object.defineProperty;
2
- var T = (a, t, i) => t in a ? I(a, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[t] = i;
3
- var r = (a, t, i) => (T(a, typeof t != "symbol" ? t + "" : t, i), i);
4
- const A = {
1
+ var T = Object.defineProperty;
2
+ var A = (r, t, i) => t in r ? T(r, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[t] = i;
3
+ var b = (r, t, i) => (A(r, typeof t != "symbol" ? t + "" : t, i), i);
4
+ const I = {
5
5
  type: "LIVE_OPEN_PLATFORM_DM",
6
6
  content: {
7
7
  cmd: "LIVE_OPEN_PLATFORM_DM",
@@ -14,7 +14,7 @@ const A = {
14
14
  dm_type: 0
15
15
  }
16
16
  }
17
- }, B = {
17
+ }, k = {
18
18
  type: "LIVE_OPEN_PLATFORM_SEND_GIFT",
19
19
  content: {
20
20
  cmd: "LIVE_OPEN_PLATFORM_SEND_GIFT",
@@ -30,51 +30,51 @@ const A = {
30
30
  gift_icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAB+FBMVEX/////UFD/TFD/TVD/TE7/TU//TU//TU//SUv/Skz/Sk3/S03/S07/TE3/TE7/TE//TU7/TU//TVD/Tk//TlD/T1D/T1H/UFH/UFL/UFP/UVL/UVP/UlP/UlT/U1T/U1X/VFX/VFb/VVb/VVf/Vlf/Vlj/V1j/V1n/WFn/WFr/WVr/WVv/Wlv/Wlz/W1z/W13/XF3/XF7/XV7/XV//Xl//XmD/X2D/X2H/YGH/YGL/YWL/YWP/YmP/YmT/Y2T/Y2X/ZGX/ZGb/ZWb/ZWf/Zmf/Zmj/Z2j/Z2n/aGn/aWv/bG7/bW7/bm//b3D/cXL/cnT/dHX/dXb/d3n/eXr/env/e33/fH7/fo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o1bUNP7KZuKq11dXSr62NdeRlRdldDwMr2M7Lx7KzuRFINrdfIpbdoBQGzPZuIvEigRKJnZ2tlRr1/4Wmmz6Gx9JTAAAAAElFTkSuQmCC"
31
31
  }
32
32
  }
33
- }, _ = [A, B], m = class m {
33
+ }, _ = [I, k], g = class g {
34
34
  constructor() {
35
- r(this, "AUTH_HOST", "https://dimsum-widget-auth-1301031323.cos.ap-guangzhou.myqcloud.com");
36
- r(this, "WHITELIST_WIDGETS", ["dimsum-bonk-2024-widget", "douyin-bonk-2024-widget"]);
37
- r(this, "MAX_RETRY_COUNT", 3);
38
- r(this, "authenticatedPlatformAndRoomId");
39
- r(this, "isPiracy", !1);
40
- r(this, "retryCount", 0);
35
+ b(this, "AUTH_HOST", "https://dimsum-widget-auth-1301031323.cos.ap-guangzhou.myqcloud.com");
36
+ b(this, "WHITELIST_WIDGETS", ["dimsum-bonk-2024-widget", "douyin-bonk-2024-widget"]);
37
+ b(this, "MAX_RETRY_COUNT", 3);
38
+ b(this, "authenticatedPlatformAndRoomId");
39
+ b(this, "isPiracy", !1);
40
+ b(this, "retryCount", 0);
41
41
  }
42
42
  static getInstance() {
43
- return m.instance || (m.instance = new m()), m.instance;
43
+ return g.instance || (g.instance = new g()), g.instance;
44
44
  }
45
45
  updateWidgetId(t) {
46
46
  return t === "douyin-bonk-2024-widget" ? "dimsum-bonk-2024-widget" : t;
47
47
  }
48
48
  checkAuthentication(t, i, s) {
49
- if (t = this.updateWidgetId(t), !this.WHITELIST_WIDGETS.includes(t) || this.authenticatedPlatformAndRoomId === `${i}-${s}`)
49
+ if (t = this.updateWidgetId(t), !this.WHITELIST_WIDGETS.includes(t) || this.authenticatedPlatformAndRoomId === `${i}-${s}` || i === "chzzk" && t === "dimsum-bonk-2024-widget")
50
50
  return;
51
- const n = () => {
51
+ const e = () => {
52
52
  this.retryCount++, this.retryCount < this.MAX_RETRY_COUNT ? setTimeout(() => {
53
53
  this.checkAuthentication(t, i, s);
54
54
  }, 1e3) : this.isPiracy = !0;
55
- }, e = `${this.AUTH_HOST}/${t}/whitelist/${i}/${s}`;
56
- return fetch(e).then((p) => {
57
- console.log("checkAuthentication", p.status), p.status === 200 ? (this.authenticatedPlatformAndRoomId = `${i}-${s}`, this.isPiracy = !1) : n();
55
+ }, n = `${this.AUTH_HOST}/${t}/whitelist/${i}/${s}`;
56
+ return fetch(n).then((p) => {
57
+ console.log("checkAuthentication", p.status), p.status === 200 ? (this.authenticatedPlatformAndRoomId = `${i}-${s}`, this.isPiracy = !1) : e();
58
58
  }).catch(() => {
59
- console.log("checkAuthentication error"), n();
59
+ console.log("checkAuthentication error"), e();
60
60
  });
61
61
  }
62
62
  passMessage(t) {
63
63
  try {
64
64
  if (t.type === "DimSumChatRoomInfo") {
65
- const i = t.content.platform ?? t.content.platfrom, s = t.content.roomId, n = window.location.pathname.split("/")[1];
66
- this.checkAuthentication(n, i, s);
65
+ const i = t.content.platform ?? t.content.platfrom, s = t.content.roomId, e = window.location.pathname.split("/")[1];
66
+ this.checkAuthentication(e, i, s);
67
67
  }
68
68
  if (t.type === "INTERACT_WORD") {
69
- const i = typeof t.content == "object" ? t.content : JSON.parse(t.content), s = "bilibili", n = String(i.data.roomid), e = window.location.pathname.split("/")[1];
70
- this.checkAuthentication(e, s, n);
69
+ const i = typeof t.content == "object" ? t.content : JSON.parse(t.content), s = "bilibili", e = String(i.data.roomid), n = window.location.pathname.split("/")[1];
70
+ this.checkAuthentication(n, s, e);
71
71
  }
72
72
  if (t.type === "LIVE_OPEN_PLATFORM_DM" || t.type === "LIVE_OPEN_PLATFORM_SEND_GIFT") {
73
73
  const i = typeof t.content == "object" ? t.content : JSON.parse(t.content);
74
74
  if (i.data.room_id === void 0)
75
75
  return t;
76
- const s = "bilibili", n = String(i.data.room_id), e = window.location.pathname.split("/")[1];
77
- this.checkAuthentication(e, s, n);
76
+ const s = "bilibili", e = String(i.data.room_id), n = window.location.pathname.split("/")[1];
77
+ this.checkAuthentication(n, s, e);
78
78
  }
79
79
  if (this.isPiracy)
80
80
  return _[Math.floor(Math.random() * _.length)];
@@ -84,9 +84,9 @@ const A = {
84
84
  return t;
85
85
  }
86
86
  };
87
- r(m, "instance");
88
- let y = m;
89
- const M = {
87
+ b(g, "instance");
88
+ let l = g;
89
+ const B = {
90
90
  type: "LIVE_OPEN_PLATFORM_DM",
91
91
  content: {
92
92
  cmd: "LIVE_OPEN_PLATFORM_DM",
@@ -97,7 +97,7 @@ const M = {
97
97
  guard_level: 1
98
98
  }
99
99
  }
100
- }, E = {
100
+ }, M = {
101
101
  type: "LIVE_OPEN_PLATFORM_DM",
102
102
  content: {
103
103
  cmd: "LIVE_OPEN_PLATFORM_DM",
@@ -108,22 +108,22 @@ const M = {
108
108
  guard_level: 1
109
109
  }
110
110
  }
111
- }, D = {
112
- connected: M,
113
- welcome: E
111
+ }, z = {
112
+ connected: B,
113
+ welcome: M
114
114
  };
115
- function L() {
115
+ function E() {
116
116
  const t = window.location.pathname.split("/");
117
117
  return t.length > 1 ? t[1] : "unknown base name";
118
118
  }
119
- function k(a) {
119
+ function L(r) {
120
120
  let t;
121
- switch (a.type) {
121
+ switch (r.type) {
122
122
  case "DimSumChatWidgetInfoRequest":
123
123
  t = {
124
124
  type: "DimSumChatWidgetInfoResponse",
125
125
  content: {
126
- base: L(),
126
+ base: E(),
127
127
  url: window.location.href
128
128
  }
129
129
  };
@@ -132,8 +132,8 @@ function k(a) {
132
132
  }
133
133
  const x = class x {
134
134
  constructor() {
135
- r(this, "webSocket");
136
- r(this, "messageListeners");
135
+ b(this, "webSocket");
136
+ b(this, "messageListeners");
137
137
  this.webSocket = null, this.messageListeners = [];
138
138
  }
139
139
  static getInstance() {
@@ -143,7 +143,7 @@ const x = class x {
143
143
  this.webSocket || (this.webSocket = new WebSocket(t), this.webSocket.onmessage = this.handleMessage.bind(this), this.webSocket.onopen = () => {
144
144
  console.log("connected"), setTimeout(() => {
145
145
  this.messageListeners.forEach(
146
- (i) => i(JSON.stringify(D.connected))
146
+ (i) => i(JSON.stringify(z.connected))
147
147
  );
148
148
  }, 100);
149
149
  }, this.webSocket.onclose = () => {
@@ -153,15 +153,15 @@ const x = class x {
153
153
  });
154
154
  }
155
155
  handleMessage(t) {
156
- var e;
156
+ var n;
157
157
  const i = t.data;
158
158
  this.messageListeners.forEach((p) => p(i));
159
- const s = JSON.parse(i), n = k(s);
160
- n && ((e = this.webSocket) == null || e.send(JSON.stringify(n)));
159
+ const s = JSON.parse(i), e = L(s);
160
+ e && ((n = this.webSocket) == null || n.send(JSON.stringify(e)));
161
161
  }
162
162
  addMessageListener(t) {
163
163
  this.messageListeners.push(t), setTimeout(() => {
164
- t(JSON.stringify(D.welcome));
164
+ t(JSON.stringify(z.welcome));
165
165
  }, 100);
166
166
  }
167
167
  removeMessageListener(t) {
@@ -169,23 +169,23 @@ const x = class x {
169
169
  i !== -1 && this.messageListeners.splice(i, 1);
170
170
  }
171
171
  };
172
- r(x, "instance");
173
- let l = x;
172
+ b(x, "instance");
173
+ let j = x;
174
174
  function S() {
175
- const a = new URL(window.location.href), t = a.protocol === "https:" ? "wss:" : "ws:", i = a.host;
175
+ const r = new URL(window.location.href), t = r.protocol === "https:" ? "wss:" : "ws:", i = r.host;
176
176
  return `${t}//${i}/websocket`;
177
177
  }
178
- function U(a) {
178
+ function N(r) {
179
179
  const t = new URL(window.location.href), i = t.protocol, s = t.host;
180
- return `${i}//${s}/bface/${a}`;
180
+ return `${i}//${s}/bface/${r}`;
181
181
  }
182
- function R(a, t = {}) {
182
+ function U(r, t = {}) {
183
183
  const {
184
184
  customWsServer: i = S()
185
- } = t, s = y.getInstance(), n = l.getInstance();
186
- n.connect(i), n.addMessageListener((e) => {
187
- const p = JSON.parse(e), f = s.passMessage(p), g = new j(f);
188
- a(f, g);
185
+ } = t, s = l.getInstance(), e = j.getInstance();
186
+ e.connect(i), e.addMessageListener((n) => {
187
+ const p = JSON.parse(n), d = s.passMessage(p), f = new v(d);
188
+ r(d, f);
189
189
  });
190
190
  }
191
191
  const C = [
@@ -449,7 +449,7 @@ const C = [
449
449
  ["[糖葫芦]", "https://p3-pc-sign.douyinpic.com/obj/tos-cn-i-tsj2vxp0zn/d4aa8a0ff46a445e861ad8fb78c07140?x-expires=2023614000&x-signature=FvN4ytTGjC7Mww8KX4BRIg9wcTE%3D"],
450
450
  ["[虎头]", "https://p3-pc-sign.douyinpic.com/obj/tos-cn-i-tsj2vxp0zn/7569ffeaa3894b8b8ea843c0e5a05f63?x-expires=2023614000&x-signature=m%2Bi3d034xBQkuBqx4xrvzru5q6A%3D"],
451
451
  ["[iloveyou]", "https://p3-pc-sign.douyinpic.com/obj/tos-cn-i-tsj2vxp0zn/798bcfd9811f4fcd97df92af06c87a0e?x-expires=2023614000&x-signature=DuK8xhX7glgLx44H53PrhM32D44%3D"]
452
- ], z = [
452
+ ], D = [
453
453
  ["[dog]", "http://i0.hdslb.com/bfs/live/4428c84e694fbf4e0ef6c06e958d9352c3582740.png"],
454
454
  ["[花]", "http://i0.hdslb.com/bfs/live/7dd2ef03e13998575e4d8a803c6e12909f94e72b.png"],
455
455
  ["[妙]", "http://i0.hdslb.com/bfs/live/08f735d950a0fba267dda140673c9ab2edf6410d.png"],
@@ -740,11 +740,11 @@ const C = [
740
740
  ["[抱拳]", "https://bd.a.yximgs.com/bs2/emotion/1704790113221third_party_s1296853443.png"],
741
741
  ["[早上好]", "https://ali2.a.yximgs.com/bs2/emotion/1704790167344third_party_s1296853922.png"],
742
742
  ["[胡思乱想]", "https://ali2.a.yximgs.com/bs2/emotion/1704790657229third_party_s1296858542.png"]
743
- ], d = class d {
743
+ ], h = class h {
744
744
  constructor(t) {
745
- r(this, "rawType");
746
- r(this, "rawContent");
747
- r(this, "_cachedValues", {});
745
+ b(this, "rawType");
746
+ b(this, "rawContent");
747
+ b(this, "_cachedValues", {});
748
748
  this.rawType = t.type;
749
749
  try {
750
750
  typeof t.content == "string" ? this.rawContent = JSON.parse(t.content) : this.rawContent = t.content;
@@ -752,13 +752,13 @@ const C = [
752
752
  this.rawContent = t.content;
753
753
  }
754
754
  const i = this, s = Object.getPrototypeOf(this);
755
- Object.getOwnPropertyNames(s).forEach((n) => {
756
- const e = Object.getOwnPropertyDescriptor(s, n);
757
- e && typeof e.get == "function" && Object.defineProperty(i, n, {
755
+ Object.getOwnPropertyNames(s).forEach((e) => {
756
+ const n = Object.getOwnPropertyDescriptor(s, e);
757
+ n && typeof n.get == "function" && Object.defineProperty(i, e, {
758
758
  get: function() {
759
- return i.getCachedValue(n, () => {
759
+ return i.getCachedValue(e, () => {
760
760
  var p;
761
- return (p = e.get) == null ? void 0 : p.call(i);
761
+ return (p = n.get) == null ? void 0 : p.call(i);
762
762
  });
763
763
  },
764
764
  enumerable: !0,
@@ -787,6 +787,8 @@ const C = [
787
787
  return "douyin";
788
788
  if (this.rawType.startsWith("Kuaishou"))
789
789
  return "kuaishou";
790
+ if (this.rawType.startsWith("Chzzk"))
791
+ return "chzzk";
790
792
  if (i.test(this.rawType))
791
793
  return "acfun";
792
794
  }
@@ -803,7 +805,8 @@ const C = [
803
805
  "CommonActionSignalComment",
804
806
  "WebcastChatMessage",
805
807
  "DANMU_MSG",
806
- "KuaishouCommentFeeds"
808
+ "KuaishouCommentFeeds",
809
+ "ChzzkChatMessage"
807
810
  ],
808
811
  gift: [
809
812
  "LIVE_OPEN_PLATFORM_SEND_GIFT",
@@ -828,11 +831,13 @@ const C = [
828
831
  ],
829
832
  guard: [
830
833
  "LIVE_OPEN_PLATFORM_GUARD",
831
- "GUARD_BUY"
834
+ "GUARD_BUY",
835
+ "ChzzkSubscriptionMessage"
832
836
  ],
833
837
  superchat: [
834
838
  "LIVE_OPEN_PLATFORM_SUPER_CHAT",
835
- "SUPER_CHAT_MESSAGE"
839
+ "SUPER_CHAT_MESSAGE",
840
+ "ChzzkDonationMessage"
836
841
  ],
837
842
  enter: [
838
843
  "CommonActionSignalUserEnterRoom",
@@ -884,6 +889,8 @@ const C = [
884
889
  return this.rawContent.user.nickName;
885
890
  if (this.platform === "kuaishou" && "user" in this.rawContent)
886
891
  return this.rawContent.user.userName;
892
+ if (this.platform === "chzzk" && this.rawContent.profile)
893
+ return JSON.parse(this.rawContent.profile).nickname;
887
894
  }
888
895
  /**
889
896
  * User ID.
@@ -911,6 +918,8 @@ const C = [
911
918
  return this.rawContent.user.id;
912
919
  if (this.platform === "kuaishou" && "user" in this.rawContent)
913
920
  return this.rawContent.user.principalId;
921
+ if (this.platform === "chzzk" && "uid" in this.rawContent)
922
+ return this.rawContent.uid;
914
923
  }
915
924
  get clubLevel() {
916
925
  if (this.platform === "bilibili" || this.platform === "openblive") {
@@ -1004,7 +1013,8 @@ const C = [
1004
1013
  bilibili: () => this.rawContent.info[1],
1005
1014
  openblive: () => this.rawContent.data.msg,
1006
1015
  douyin: () => this.rawContent.content,
1007
- kuaishou: () => this.rawContent.content
1016
+ kuaishou: () => this.rawContent.content,
1017
+ chzzk: () => this.rawContent.msg
1008
1018
  };
1009
1019
  return this.type === "comment" && t[this.platform] ? t[this.platform]() : this.type === "superchat" ? this.superChatComment : void 0;
1010
1020
  }
@@ -1019,61 +1029,72 @@ const C = [
1019
1029
  const {
1020
1030
  stickerStyle: i = "",
1021
1031
  stickerClass: s = "",
1022
- emotStyle: n = "",
1023
- emotClass: e = "",
1032
+ emotStyle: e = "",
1033
+ emotClass: n = "",
1024
1034
  acfunCustomStickers: p = [],
1025
- acfunCustomHtmlBuilder: f
1026
- } = t, g = {
1035
+ acfunCustomHtmlBuilder: d
1036
+ } = t, f = {
1027
1037
  acfun: () => {
1028
- let o = h(this.rawContent.content);
1038
+ let o = m(this.rawContent.content);
1029
1039
  if ("emotionUrl" in this.rawContent && this.rawContent.emotionUrl)
1030
1040
  return `<img src="${this.rawContent.emotionUrl}" alt="" style="${i}" class="${s}">`;
1031
- let c;
1032
- return p.forEach((b) => {
1033
- o.includes(b.keyWord) && (c = b.path);
1034
- }), c != null ? f != null ? f(c, o) : `<div style="display:flex;">
1035
- <img src="${c}" alt="" style="${i}" class="${s}">
1041
+ let a;
1042
+ return p.forEach((c) => {
1043
+ o.includes(c.keyWord) && (a = c.path);
1044
+ }), a != null ? d != null ? d(a, o) : `<div style="display:flex;">
1045
+ <img src="${a}" alt="" style="${i}" class="${s}">
1036
1046
  <div style="flex-grow:1;">${o}</div>
1037
- </div>` : h(this.rawContent.content);
1047
+ </div>` : m(this.rawContent.content);
1038
1048
  },
1039
1049
  bilibili: () => {
1040
1050
  if (typeof this.rawContent.info[0][13] == "object")
1041
1051
  return `<img src="${this.rawContent.info[0][13].url}" alt="" style="${i}" class="${s}">`;
1042
- const o = this.rawContent.info[0][15].extra, c = JSON.parse(o);
1043
- let b = h(c.content);
1044
- const v = c.emots;
1045
- for (let u in v) {
1046
- const F = new RegExp(`\\${u}`, "g");
1047
- b = b.replace(F, `<img src="${v[u].url}" alt="" style="${n}" class="${e}">`);
1052
+ const o = this.rawContent.info[0][15].extra, a = JSON.parse(o);
1053
+ let c = m(a.content);
1054
+ const u = a.emots;
1055
+ for (let y in u) {
1056
+ const F = new RegExp(`\\${y}`, "g");
1057
+ c = c.replace(F, `<img src="${u[y].url}" alt="" style="${e}" class="${n}">`);
1048
1058
  }
1049
- return b;
1059
+ return c;
1050
1060
  },
1051
1061
  openblive: () => {
1052
1062
  if (this.rawContent.data.emoji_img_url)
1053
1063
  return `<img src="${this.rawContent.data.emoji_img_url}" alt="" style="${i}" class="${s}">`;
1054
- let o = h(this.rawContent.data.msg);
1055
- return z.forEach((c) => {
1056
- const b = new RegExp(`\\${c[0]}`, "g");
1057
- o = o.replace(b, `<img src="${c[1]}" alt="" style="${n}" class="${e}">`);
1064
+ let o = m(this.rawContent.data.msg);
1065
+ return D.forEach((a) => {
1066
+ const c = new RegExp(`\\${a[0]}`, "g");
1067
+ o = o.replace(c, `<img src="${a[1]}" alt="" style="${e}" class="${n}">`);
1058
1068
  }), o;
1059
1069
  },
1060
1070
  douyin: () => {
1061
- let o = h(this.rawContent.content);
1062
- return C.forEach((c) => {
1063
- const b = new RegExp(`\\${c[0]}`, "g");
1064
- o = o.replace(b, `<img src="${c[1]}" alt="" style="${n}" class="${e}">`);
1071
+ let o = m(this.rawContent.content);
1072
+ return C.forEach((a) => {
1073
+ const c = new RegExp(`\\${a[0]}`, "g");
1074
+ o = o.replace(c, `<img src="${a[1]}" alt="" style="${e}" class="${n}">`);
1065
1075
  }), o;
1066
1076
  },
1067
1077
  kuaishou: () => {
1068
- let o = h(this.rawContent.content);
1069
- return w.forEach((c) => {
1070
- const b = new RegExp(`\\${c[0]}`, "g");
1071
- o = o.replace(b, `<img src="${c[1]}" alt="" style="${n}" class="${e}">`);
1078
+ let o = m(this.rawContent.content);
1079
+ return w.forEach((a) => {
1080
+ const c = new RegExp(`\\${a[0]}`, "g");
1081
+ o = o.replace(c, `<img src="${a[1]}" alt="" style="${e}" class="${n}">`);
1072
1082
  }), o;
1083
+ },
1084
+ chzzk: () => {
1085
+ let o = m(this.rawContent.msg);
1086
+ if (this.rawContent.extras) {
1087
+ const c = JSON.parse(this.rawContent.extras).emojis || {};
1088
+ for (let u in c) {
1089
+ const y = new RegExp(`\\{:${u}:}`, "g");
1090
+ o = o.replace(y, `<img src="${c[u]}" alt="" style="${e}" class="${n}">`);
1091
+ }
1092
+ return o;
1093
+ }
1073
1094
  }
1074
1095
  };
1075
- if (this.type === "comment" && g[this.platform])
1076
- return g[this.platform]();
1096
+ if (this.type === "comment" && f[this.platform])
1097
+ return f[this.platform]();
1077
1098
  }
1078
1099
  /**
1079
1100
  * Custom comment content builder.
@@ -1085,30 +1106,39 @@ const C = [
1085
1106
  CommentBuilder(t) {
1086
1107
  const i = {
1087
1108
  acfun: () => {
1088
- let s = h(this.rawContent.content), n = "emotionUrl" in this.rawContent && this.rawContent.emotionUrl ? this.rawContent.emotionUrl : void 0;
1089
- return t(s, n);
1109
+ let s = m(this.rawContent.content), e = "emotionUrl" in this.rawContent && this.rawContent.emotionUrl ? this.rawContent.emotionUrl : void 0;
1110
+ return t(s, e);
1090
1111
  },
1091
1112
  bilibili: () => {
1092
- let s, n = [];
1113
+ let s, e = [];
1093
1114
  typeof this.rawContent.info[0][13] == "object" && (s = this.rawContent.info[0][13].url);
1094
- const e = this.rawContent.info[0][15].extra, p = JSON.parse(e), f = h(p.content), g = p.emots;
1095
- for (let o in g)
1096
- n.push([o, g[o].url]);
1097
- return t(f, s, n);
1115
+ const n = this.rawContent.info[0][15].extra, p = JSON.parse(n), d = m(p.content), f = p.emots;
1116
+ for (let o in f)
1117
+ e.push([o, f[o].url]);
1118
+ return t(d, s, e);
1098
1119
  },
1099
1120
  openblive: () => {
1100
1121
  let s;
1101
1122
  this.rawContent.data.emoji_img_url && (s = this.rawContent.data.emoji_img_url);
1102
- const n = h(this.rawContent.data.msg);
1103
- return t(n, s, z);
1123
+ const e = m(this.rawContent.data.msg);
1124
+ return t(e, s, D);
1104
1125
  },
1105
1126
  douyin: () => {
1106
- const s = h(this.rawContent.content);
1127
+ const s = m(this.rawContent.content);
1107
1128
  return t(s, void 0, C);
1108
1129
  },
1109
1130
  kuaishou: () => {
1110
- const s = h(this.rawContent.content);
1131
+ const s = m(this.rawContent.content);
1111
1132
  return t(s, void 0, w);
1133
+ },
1134
+ chzzk: () => {
1135
+ let s = m(this.rawContent.msg), e = [];
1136
+ if (this.rawContent.extras) {
1137
+ const p = JSON.parse(this.rawContent.extras).emojis || {};
1138
+ for (let d in p)
1139
+ e.push([`{:${d}:}`, p[d]]);
1140
+ }
1141
+ return t(s, void 0, e);
1112
1142
  }
1113
1143
  };
1114
1144
  if (this.type === "comment" && i[this.platform])
@@ -1129,6 +1159,10 @@ const C = [
1129
1159
  return this.rawContent.data.privilege_type;
1130
1160
  }
1131
1161
  }
1162
+ if (this.platform === "chzzk") {
1163
+ const t = this.chzzkTier;
1164
+ return t && t <= 3 && t >= 1 ? 4 - t : 0;
1165
+ }
1132
1166
  }
1133
1167
  get guardNum() {
1134
1168
  if (this.platform === "bilibili" || this.platform === "openblive") {
@@ -1137,12 +1171,22 @@ const C = [
1137
1171
  if ("data" in this.rawContent && "guard_num" in this.rawContent.data)
1138
1172
  return this.rawContent.guard_num;
1139
1173
  }
1174
+ if (this.platform === "chzzk")
1175
+ return this.chzzkTierMonth;
1140
1176
  }
1141
1177
  // 可能是单价(未确认),舰长价格198实际可能为138
1142
1178
  get guardPrice() {
1143
1179
  if ((this.platform === "bilibili" || this.platform === "openblive") && "data" in this.rawContent && "price" in this.rawContent.data)
1144
1180
  return this.rawContent.data.price / 1e3;
1145
1181
  }
1182
+ get chzzkTier() {
1183
+ if (this.platform === "chzzk" && this.rawType === "ChzzkSubscriptionMessage" && this.rawContent.extras)
1184
+ return JSON.parse(this.rawContent.extras).tierNo;
1185
+ }
1186
+ get chzzkTierMonth() {
1187
+ if (this.platform === "chzzk" && this.rawType === "ChzzkSubscriptionMessage" && this.rawContent.extras)
1188
+ return JSON.parse(this.rawContent.extras).month;
1189
+ }
1146
1190
  get giftName() {
1147
1191
  const t = {
1148
1192
  acfun: () => this.rawContent.giftInfo.name,
@@ -1161,16 +1205,16 @@ const C = [
1161
1205
  openblive: () => this.rawContent.data.gift_num,
1162
1206
  douyin: () => {
1163
1207
  if (this.rawContent.sendType === 4) {
1164
- const s = this.rawContent.comboCount, n = this.rawContent.groupId, e = this.rawContent.giftId, p = this.uid, f = `${n}_${p}_${e}`;
1165
- let g = 0;
1166
- return d.douyinGiftGroup.has(f) && (g = d.douyinGiftGroup.get(f) ?? 0), d.douyinGiftGroup.set(f, s), d.douyinGiftGroup.size > 1024 && d.douyinGiftGroup.delete(d.douyinGiftGroup.keys().next().value ?? ""), s - g;
1208
+ const s = this.rawContent.comboCount, e = this.rawContent.groupId, n = this.rawContent.giftId, p = this.uid, d = `${e}_${p}_${n}`;
1209
+ let f = 0;
1210
+ return h.douyinGiftGroup.has(d) && (f = h.douyinGiftGroup.get(d) ?? 0), h.douyinGiftGroup.set(d, s), h.douyinGiftGroup.size > 1024 && h.douyinGiftGroup.delete(h.douyinGiftGroup.keys().next().value ?? ""), s - f;
1167
1211
  }
1168
1212
  return this.rawContent.groupCount;
1169
1213
  },
1170
1214
  kuaishou: () => {
1171
- const s = this.rawContent.batchSize * this.rawContent.comboCount, n = this.rawContent.mergeKey;
1172
- let e = 0;
1173
- return d.kuaishouGiftGroup.has(n) && (e = d.kuaishouGiftGroup.get(n) ?? 0), d.kuaishouGiftGroup.set(n, s), d.kuaishouGiftGroup.size > 1024 && d.kuaishouGiftGroup.delete(d.kuaishouGiftGroup.keys().next().value ?? ""), s - e;
1215
+ const s = this.rawContent.batchSize * this.rawContent.comboCount, e = this.rawContent.mergeKey;
1216
+ let n = 0;
1217
+ return h.kuaishouGiftGroup.has(e) && (n = h.kuaishouGiftGroup.get(e) ?? 0), h.kuaishouGiftGroup.set(e, s), h.kuaishouGiftGroup.size > 1024 && h.kuaishouGiftGroup.delete(h.kuaishouGiftGroup.keys().next().value ?? ""), s - n;
1174
1218
  }
1175
1219
  };
1176
1220
  if (this.type === "gift" && t[this.platform])
@@ -1203,7 +1247,8 @@ const C = [
1203
1247
  get superChatComment() {
1204
1248
  const t = {
1205
1249
  bilibili: () => this.rawContent.data.message,
1206
- openblive: () => this.rawContent.data.message
1250
+ openblive: () => this.rawContent.data.message,
1251
+ chzzk: () => this.rawContent.msg
1207
1252
  };
1208
1253
  if (this.type === "superchat" && t[this.platform])
1209
1254
  return t[this.platform]();
@@ -1211,7 +1256,11 @@ const C = [
1211
1256
  get superChatPrice() {
1212
1257
  const t = {
1213
1258
  bilibili: () => this.rawContent.data.price,
1214
- openblive: () => this.rawContent.data.rmb
1259
+ openblive: () => this.rawContent.data.rmb,
1260
+ chzzk: () => {
1261
+ if (this.rawContent.extras)
1262
+ return JSON.parse(this.rawContent.extras).payAmount;
1263
+ }
1215
1264
  };
1216
1265
  if (this.type === "superchat" && t[this.platform])
1217
1266
  return t[this.platform]();
@@ -1228,29 +1277,30 @@ const C = [
1228
1277
  const {
1229
1278
  douyinSteps: i = [7, 11, 15],
1230
1279
  kuaishouSteps: s = [7, 11, 15],
1231
- acfunSteps: n = [7, 11, 15],
1232
- acfunClubUid: e = 0
1280
+ acfunSteps: e = [7, 11, 15],
1281
+ acfunClubUid: n = 0
1233
1282
  } = t, p = (o) => {
1234
1283
  if (this.clubLevel === void 0)
1235
1284
  return 0;
1236
- const c = o.findIndex((b) => this.clubLevel <= b);
1237
- return c !== -1 ? c : o.length;
1238
- }, f = () => this.guardLevel && this.guardLevel > 0 ? 4 - this.guardLevel : 0, g = {
1285
+ const a = o.findIndex((c) => this.clubLevel <= c);
1286
+ return a !== -1 ? a : o.length;
1287
+ }, d = () => this.guardLevel && this.guardLevel > 0 ? 4 - this.guardLevel : 0, f = {
1239
1288
  douyin: () => p(i),
1240
1289
  kuaishou: () => p(s),
1241
- acfun: () => e > 0 && this.acfunClubUid !== e ? 0 : p(n),
1242
- bilibili: () => f(),
1243
- openblive: () => f()
1290
+ acfun: () => n > 0 && this.acfunClubUid !== n ? 0 : p(e),
1291
+ bilibili: () => d(),
1292
+ openblive: () => d(),
1293
+ chzzk: () => this.chzzkTier ?? 0
1244
1294
  };
1245
- if (g[this.platform])
1246
- return g[this.platform]();
1295
+ if (f[this.platform])
1296
+ return f[this.platform]();
1247
1297
  }
1248
1298
  };
1249
1299
  // groupId_userId_giftId : comboCount
1250
- r(d, "douyinGiftGroup", /* @__PURE__ */ new Map()), r(d, "kuaishouGiftGroup", /* @__PURE__ */ new Map());
1251
- let j = d;
1252
- function h(a) {
1253
- return a.replace(/[&<>"']/g, function(t) {
1300
+ b(h, "douyinGiftGroup", /* @__PURE__ */ new Map()), b(h, "kuaishouGiftGroup", /* @__PURE__ */ new Map());
1301
+ let v = h;
1302
+ function m(r) {
1303
+ return r.replace(/[&<>"']/g, function(t) {
1254
1304
  switch (t) {
1255
1305
  case "&":
1256
1306
  return "&amp;";
@@ -1268,9 +1318,9 @@ function h(a) {
1268
1318
  });
1269
1319
  }
1270
1320
  export {
1271
- j as Parser,
1272
- l as WebSocketManager,
1273
- U as getBfaceURL,
1321
+ v as Parser,
1322
+ j as WebSocketManager,
1323
+ N as getBfaceURL,
1274
1324
  S as getWebSocketURL,
1275
- R as onMessage
1325
+ U as onMessage
1276
1326
  };