@wexio/messenger-widget-react 1.4.1 → 1.5.1
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/CHANGELOG.md +130 -0
- package/README.md +2 -1
- package/dist/widget-react-0MqeP0VG2.js +201 -0
- package/dist/widget-react-12srXq362.js +201 -0
- package/dist/widget-react-13R6Vrt62.js +201 -0
- package/dist/widget-react-1FPhjaT7.js +2 -0
- package/dist/widget-react-1a5mHYv6.js +4 -0
- package/dist/widget-react-B-zdiXnI.js +2 -0
- package/dist/widget-react-B1v9X8dK2.js +201 -0
- package/dist/widget-react-B6W6yHa9.js +2 -0
- package/dist/widget-react-BAzh_M3R.js +201 -0
- package/dist/widget-react-BEeSy_sM.js +201 -0
- package/dist/widget-react-BGg29YDq.js +2 -0
- package/dist/widget-react-BKZZeBk72.js +201 -0
- package/dist/widget-react-BNsA7Hq8.js +2 -0
- package/dist/widget-react-BP_S1jOe2.js +2 -0
- package/dist/widget-react-BjVldSFi2.js +2 -0
- package/dist/widget-react-Bk8_ZpvK.js +2 -0
- package/dist/widget-react-BpSJW2vD2.js +201 -0
- package/dist/widget-react-BpfEg8PP.js +2 -0
- package/dist/widget-react-BtVbDkom.js +2 -0
- package/dist/widget-react-BxEMz2N0.js +2 -0
- package/dist/widget-react-BxYFNB-9.js +2 -0
- package/dist/widget-react-Bz5u8QHz.js +109 -0
- package/dist/widget-react-BzlFOEiU2.js +2 -0
- package/dist/widget-react-C-hnCqBf.js +2 -0
- package/dist/widget-react-C1rXlCoj.js +201 -0
- package/dist/widget-react-C1vTza-V2.js +201 -0
- package/dist/widget-react-C2_GJN-2.js +2 -0
- package/dist/widget-react-C40Ha_9C.js +2 -0
- package/dist/widget-react-C6OZyIh32.js +201 -0
- package/dist/widget-react-C78gQza62.js +201 -0
- package/dist/widget-react-C9D7iqrt.js +2 -0
- package/dist/widget-react-CJkUvFuJ2.js +2 -0
- package/dist/widget-react-CM6RqtRI2.js +2 -0
- package/dist/widget-react-COAvUm8D.js +140 -0
- package/dist/widget-react-COGNC9PO.js +2 -0
- package/dist/widget-react-CPEQKK8u.js +2 -0
- package/dist/widget-react-CZHkN2nG.js +2 -0
- package/dist/widget-react-CgvtA8Ek.js +201 -0
- package/dist/widget-react-Cil8Ajlh.js +201 -0
- package/dist/widget-react-CuJV_7PK.js +2 -0
- package/dist/widget-react-Cv42XaBB.js +2 -0
- package/dist/widget-react-Cw8StXTV2.js +201 -0
- package/dist/widget-react-CxTI2WNr.js +201 -0
- package/dist/widget-react-Cx_utOCH.js +2 -0
- package/dist/widget-react-D2sqPDts.js +2 -0
- package/dist/widget-react-D5s6TWhn.js +2 -0
- package/dist/widget-react-DBqY7BEB.js +163 -0
- package/dist/widget-react-DCnPzcmJ2.js +109 -0
- package/dist/widget-react-DFBIOPUo.js +2 -0
- package/dist/widget-react-DJTgpBXp.js +109 -0
- package/dist/widget-react-DJczk-Ax.js +2 -0
- package/dist/widget-react-DLK0giQJ2.js +201 -0
- package/dist/widget-react-DPf6mDAF2.js +201 -0
- package/dist/widget-react-DSyQ4JjS.js +2 -0
- package/dist/widget-react-DUnaBOfT.js +10 -0
- package/dist/widget-react-DW-XOzIR.js +2 -0
- package/dist/widget-react-DXnKk30y2.js +2 -0
- package/dist/widget-react-DfgfDdBf2.js +2 -0
- package/dist/widget-react-DhLRmjli.js +2 -0
- package/dist/widget-react-DjlwkwTM2.js +2 -0
- package/dist/widget-react-Dl2PevZk.js +2 -0
- package/dist/widget-react-DleQcmXy.js +2 -0
- package/dist/widget-react-DmRVdLdI.js +2 -0
- package/dist/widget-react-Ds-6CsP4.js +7 -0
- package/dist/widget-react-Dy2T3sIZ2.js +201 -0
- package/dist/widget-react-DzgDJMDl.js +2 -0
- package/dist/widget-react-FX5W7RyV.js +4 -0
- package/dist/widget-react-Fou9JP7u.js +201 -0
- package/dist/widget-react-GikUZ6_D.js +2 -0
- package/dist/widget-react-M6ZbU9Uk.js +2 -0
- package/dist/widget-react-RFGjueTQ.js +201 -0
- package/dist/widget-react-SG4_gli5.js +2 -0
- package/dist/widget-react-W_6RewLw2.js +2 -0
- package/dist/widget-react-YOrK-1WI2.js +201 -0
- package/dist/widget-react-YrYT-pD1.js +285 -0
- package/dist/widget-react-bEpDN5aA2.js +201 -0
- package/dist/widget-react-dWaXqKR32.js +2 -0
- package/dist/widget-react-iwANUtnB.js +201 -0
- package/dist/widget-react-llsiMoHr.js +2 -0
- package/dist/widget-react-tvX8XSZD.js +201 -0
- package/dist/widget-react-uWEOH9Lh.js +201 -0
- package/dist/widget-react-wMl4Kthk.js +2 -0
- package/dist/widget-react-yKWc1q98.js +2 -0
- package/dist/widget-react-zZslBPCS.js +2 -0
- package/dist/widget-react.js +50 -36283
- package/dist/widget-react.licenses.txt +3604 -0
- package/package.json +1 -1
- package/dist/widget-react--IUy5lNt.js +0 -510
- package/dist/widget-react-B7es3n1-.js +0 -32
- package/dist/widget-react-BAUpSGhZ.js +0 -1345
- package/dist/widget-react-BS9kUSRS.js +0 -255
- package/dist/widget-react-BT30ojz0.js +0 -371
- package/dist/widget-react-BXf2Ty8d.js +0 -364
- package/dist/widget-react-BgALABDe.js +0 -39
- package/dist/widget-react-BgunakAG.js +0 -566
- package/dist/widget-react-BkXA6ytR.js +0 -23856
- package/dist/widget-react-Bvtklo8g.js +0 -356
- package/dist/widget-react-BxEjM2it.js +0 -118
- package/dist/widget-react-CN_FIvMD.js +0 -834
- package/dist/widget-react-CTdz_dwX.js +0 -306
- package/dist/widget-react-Ck8JAYqT.js +0 -22122
- package/dist/widget-react-CyAVDflZ.js +0 -273
- package/dist/widget-react-DSAyUf2U.js +0 -229
- package/dist/widget-react-DbOJZl9F.js +0 -4932
- package/dist/widget-react-DgIxSjv7.js +0 -25
- package/dist/widget-react-Ds5J9FbQ.js +0 -27
- package/dist/widget-react-SI7deQTE.js +0 -35
- package/dist/widget-react-krPPnv02.js +0 -4438
- package/dist/widget-react-wSc9gIfG.js +0 -198
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
globalThis.process === void 0 && (globalThis.process = {
|
|
2
|
-
env: {},
|
|
3
|
-
nextTick: function(e) {
|
|
4
|
-
setTimeout(e, 0);
|
|
5
|
-
},
|
|
6
|
-
emit: function() {
|
|
7
|
-
return !1;
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
import "react";
|
|
11
|
-
import "react-dom";
|
|
12
|
-
import "react/jsx-runtime";
|
|
13
|
-
import "react-dom/client";
|
|
14
|
-
import { i as e, n as t } from "./widget-react-krPPnv02.js";
|
|
15
|
-
import { t as n } from "./widget-react-B7es3n1-.js";
|
|
16
|
-
import { n as r, r as i, t as a } from "./widget-react-BgALABDe.js";
|
|
17
|
-
import { t as o } from "./widget-react-BAUpSGhZ.js";
|
|
18
|
-
import { memo as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
19
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
20
|
-
//#region node_modules/@wavesurfer/react/dist/index.js
|
|
21
|
-
function m(e, t) {
|
|
22
|
-
var n = {};
|
|
23
|
-
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
24
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
25
|
-
var i = 0;
|
|
26
|
-
for (r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
27
|
-
}
|
|
28
|
-
return n;
|
|
29
|
-
}
|
|
30
|
-
function h(e, t) {
|
|
31
|
-
let [n, r] = d(null), i = l((() => m(t, ["plugins"])), [t]), a = l((() => Object.entries(i).flat()), [i]);
|
|
32
|
-
return c((() => {
|
|
33
|
-
if (!e?.current) return;
|
|
34
|
-
let n = o.create(Object.assign(Object.assign({}, i), {
|
|
35
|
-
plugins: t.plugins,
|
|
36
|
-
container: e.current
|
|
37
|
-
}));
|
|
38
|
-
return r(n), () => {
|
|
39
|
-
n.destroy();
|
|
40
|
-
};
|
|
41
|
-
}), [
|
|
42
|
-
e,
|
|
43
|
-
t.plugins,
|
|
44
|
-
...a
|
|
45
|
-
]), n;
|
|
46
|
-
}
|
|
47
|
-
var g = /^on([A-Z])/, _ = (e) => g.test(e);
|
|
48
|
-
function v(e, t) {
|
|
49
|
-
c((() => {
|
|
50
|
-
if (!e) return;
|
|
51
|
-
let n = Object.entries(t);
|
|
52
|
-
if (!n.length) return;
|
|
53
|
-
let r = n.map((([t, n]) => {
|
|
54
|
-
let r = t.replace(g, ((e, t) => t.toLowerCase()));
|
|
55
|
-
return e.on(r, ((...t) => n(e, ...t)));
|
|
56
|
-
}));
|
|
57
|
-
return () => {
|
|
58
|
-
r.forEach(((e) => e()));
|
|
59
|
-
};
|
|
60
|
-
}), [e, ...l((() => Object.entries(t).flat()), [t])]);
|
|
61
|
-
}
|
|
62
|
-
s(((e) => {
|
|
63
|
-
let t = u(null), [n, r] = function(e) {
|
|
64
|
-
return l((() => {
|
|
65
|
-
let t = Object.assign({}, e), n = Object.assign({}, e);
|
|
66
|
-
for (let e in t) _(e) ? delete t[e] : delete n[e];
|
|
67
|
-
return [t, n];
|
|
68
|
-
}), [e]);
|
|
69
|
-
}(e);
|
|
70
|
-
return v(h(t, n), r), f("div", { ref: t });
|
|
71
|
-
}));
|
|
72
|
-
function y(e) {
|
|
73
|
-
var { container: t } = e;
|
|
74
|
-
let n = h(t, m(e, ["container"])), r = function(e) {
|
|
75
|
-
let [t, n] = d(!1), [r, i] = d(!1), [a, o] = d(!1), [s, u] = d(0);
|
|
76
|
-
return c((() => {
|
|
77
|
-
if (!e) return;
|
|
78
|
-
let t = [
|
|
79
|
-
e.on("load", (() => {
|
|
80
|
-
n(!1), i(!1), u(0);
|
|
81
|
-
})),
|
|
82
|
-
e.on("ready", (() => {
|
|
83
|
-
n(!0), i(!1), o(!1), u(0);
|
|
84
|
-
})),
|
|
85
|
-
e.on("finish", (() => {
|
|
86
|
-
o(!0);
|
|
87
|
-
})),
|
|
88
|
-
e.on("play", (() => {
|
|
89
|
-
i(!0);
|
|
90
|
-
})),
|
|
91
|
-
e.on("pause", (() => {
|
|
92
|
-
i(!1);
|
|
93
|
-
})),
|
|
94
|
-
e.on("timeupdate", (() => {
|
|
95
|
-
u(e.getCurrentTime());
|
|
96
|
-
})),
|
|
97
|
-
e.on("destroy", (() => {
|
|
98
|
-
n(!1), i(!1);
|
|
99
|
-
}))
|
|
100
|
-
];
|
|
101
|
-
return () => {
|
|
102
|
-
t.forEach(((e) => e()));
|
|
103
|
-
};
|
|
104
|
-
}), [e]), l((() => ({
|
|
105
|
-
isReady: t,
|
|
106
|
-
isPlaying: r,
|
|
107
|
-
hasFinished: a,
|
|
108
|
-
currentTime: s
|
|
109
|
-
})), [
|
|
110
|
-
r,
|
|
111
|
-
a,
|
|
112
|
-
s,
|
|
113
|
-
t
|
|
114
|
-
]);
|
|
115
|
-
}(n);
|
|
116
|
-
return l((() => Object.assign(Object.assign({}, r), { wavesurfer: n })), [r, n]);
|
|
117
|
-
}
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region node_modules/wavesurfer.js/dist/plugins/hover.esm.js
|
|
120
|
-
var b = class {
|
|
121
|
-
constructor() {
|
|
122
|
-
this.listeners = {};
|
|
123
|
-
}
|
|
124
|
-
on(e, t, n) {
|
|
125
|
-
if (this.listeners[e] || (this.listeners[e] = /* @__PURE__ */ new Set()), n?.once) {
|
|
126
|
-
let n = (...r) => {
|
|
127
|
-
this.un(e, n), t(...r);
|
|
128
|
-
};
|
|
129
|
-
return this.listeners[e].add(n), () => this.un(e, n);
|
|
130
|
-
}
|
|
131
|
-
return this.listeners[e].add(t), () => this.un(e, t);
|
|
132
|
-
}
|
|
133
|
-
un(e, t) {
|
|
134
|
-
var n;
|
|
135
|
-
(n = this.listeners[e]) == null || n.delete(t);
|
|
136
|
-
}
|
|
137
|
-
once(e, t) {
|
|
138
|
-
return this.on(e, t, { once: !0 });
|
|
139
|
-
}
|
|
140
|
-
unAll() {
|
|
141
|
-
this.listeners = {};
|
|
142
|
-
}
|
|
143
|
-
emit(e, ...t) {
|
|
144
|
-
this.listeners[e] && this.listeners[e].forEach(((e) => e(...t)));
|
|
145
|
-
}
|
|
146
|
-
}, x = class extends b {
|
|
147
|
-
constructor(e) {
|
|
148
|
-
super(), this.subscriptions = [], this.isDestroyed = !1, this.options = e;
|
|
149
|
-
}
|
|
150
|
-
onInit() {}
|
|
151
|
-
_init(e) {
|
|
152
|
-
this.isDestroyed && (this.subscriptions = [], this.isDestroyed = !1), this.wavesurfer = e, this.onInit();
|
|
153
|
-
}
|
|
154
|
-
destroy() {
|
|
155
|
-
this.emit("destroy"), this.subscriptions.forEach(((e) => e())), this.subscriptions = [], this.isDestroyed = !0, this.wavesurfer = void 0;
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
function S(e, t) {
|
|
159
|
-
let n = t.xmlns ? document.createElementNS(t.xmlns, e) : document.createElement(e);
|
|
160
|
-
for (let [e, r] of Object.entries(t)) if (e === "children" && r) for (let [e, t] of Object.entries(r)) t instanceof Node ? n.appendChild(t) : typeof t == "string" ? n.appendChild(document.createTextNode(t)) : n.appendChild(S(e, t));
|
|
161
|
-
else e === "style" ? Object.assign(n.style, r) : e === "textContent" ? n.textContent = r : n.setAttribute(e, r.toString());
|
|
162
|
-
return n;
|
|
163
|
-
}
|
|
164
|
-
function C(e, t, n) {
|
|
165
|
-
let r = S(e, t || {});
|
|
166
|
-
return n?.appendChild(r), r;
|
|
167
|
-
}
|
|
168
|
-
function w(e, t) {
|
|
169
|
-
let n, r = () => {
|
|
170
|
-
n && (n(), n = void 0), n = e();
|
|
171
|
-
}, i = t.map(((e) => e.subscribe(r)));
|
|
172
|
-
return r(), () => {
|
|
173
|
-
n && (n(), n = void 0), i.forEach(((e) => e()));
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
function T(e, t) {
|
|
177
|
-
let n = function(e) {
|
|
178
|
-
let t = e, n = /* @__PURE__ */ new Set();
|
|
179
|
-
return {
|
|
180
|
-
get value() {
|
|
181
|
-
return t;
|
|
182
|
-
},
|
|
183
|
-
set(e) {
|
|
184
|
-
Object.is(t, e) || (t = e, n.forEach(((e) => e(t))));
|
|
185
|
-
},
|
|
186
|
-
update(e) {
|
|
187
|
-
this.set(e(t));
|
|
188
|
-
},
|
|
189
|
-
subscribe: (e) => (n.add(e), () => n.delete(e))
|
|
190
|
-
};
|
|
191
|
-
}(null), r = (e) => {
|
|
192
|
-
n.set(e);
|
|
193
|
-
};
|
|
194
|
-
return e.addEventListener(t, r), n._cleanup = () => {
|
|
195
|
-
e.removeEventListener(t, r);
|
|
196
|
-
}, n;
|
|
197
|
-
}
|
|
198
|
-
var E = {
|
|
199
|
-
lineWidth: 1,
|
|
200
|
-
labelSize: 11,
|
|
201
|
-
labelPreferLeft: !1,
|
|
202
|
-
formatTimeCallback: (e) => `${Math.floor(e / 60)}:${`0${Math.floor(e) % 60}`.slice(-2)}`
|
|
203
|
-
}, D = class e extends x {
|
|
204
|
-
constructor(e) {
|
|
205
|
-
super(e || {}), this.lastPointerPosition = null, this.options = Object.assign({}, E, e), this.wrapper = C("div", { part: "hover" }), this.label = C("span", { part: "hover-label" }, this.wrapper);
|
|
206
|
-
}
|
|
207
|
-
static create(t) {
|
|
208
|
-
return new e(t);
|
|
209
|
-
}
|
|
210
|
-
addUnits(e) {
|
|
211
|
-
return `${e}${typeof e == "number" ? "px" : ""}`;
|
|
212
|
-
}
|
|
213
|
-
onInit() {
|
|
214
|
-
if (!this.wavesurfer) throw Error("WaveSurfer is not initialized");
|
|
215
|
-
let e = this.wavesurfer.options, t = this.options.lineColor || e.cursorColor || e.progressColor;
|
|
216
|
-
Object.assign(this.wrapper.style, {
|
|
217
|
-
position: "absolute",
|
|
218
|
-
zIndex: 10,
|
|
219
|
-
left: 0,
|
|
220
|
-
top: 0,
|
|
221
|
-
height: "100%",
|
|
222
|
-
pointerEvents: "none",
|
|
223
|
-
borderLeft: `${this.addUnits(this.options.lineWidth)} solid ${t}`,
|
|
224
|
-
opacity: "0",
|
|
225
|
-
transition: "opacity .1s ease-in"
|
|
226
|
-
}), Object.assign(this.label.style, {
|
|
227
|
-
display: "block",
|
|
228
|
-
backgroundColor: this.options.labelBackground,
|
|
229
|
-
color: this.options.labelColor,
|
|
230
|
-
fontSize: `${this.addUnits(this.options.labelSize)}`,
|
|
231
|
-
transition: "transform .1s ease-in",
|
|
232
|
-
padding: "2px 3px"
|
|
233
|
-
});
|
|
234
|
-
let n = this.wavesurfer.getWrapper();
|
|
235
|
-
n.appendChild(this.wrapper);
|
|
236
|
-
let r = this.wavesurfer.getState(), i = T(n, "pointermove"), a = T(n, "pointerleave");
|
|
237
|
-
this.subscriptions.push(w((() => {
|
|
238
|
-
let e = i.value;
|
|
239
|
-
if (!e || !this.wavesurfer) return;
|
|
240
|
-
this.lastPointerPosition = {
|
|
241
|
-
clientX: e.clientX,
|
|
242
|
-
clientY: e.clientY
|
|
243
|
-
};
|
|
244
|
-
let t = this.wavesurfer.getWrapper().getBoundingClientRect(), { width: n } = t, a = e.clientX - t.left, o = Math.min(1, Math.max(0, a / n)), s = Math.min(n - this.options.lineWidth - 1, a);
|
|
245
|
-
this.wrapper.style.transform = `translateX(${s}px)`, this.wrapper.style.opacity = "1";
|
|
246
|
-
let c = r.duration.value;
|
|
247
|
-
this.label.textContent = this.options.formatTimeCallback(c * o);
|
|
248
|
-
let l = this.label.offsetWidth, u = this.options.labelPreferLeft ? s - l > 0 : s + l > n;
|
|
249
|
-
this.label.style.transform = u ? `translateX(-${l + this.options.lineWidth}px)` : "", this.emit("hover", o);
|
|
250
|
-
}), [i, r.duration])), this.subscriptions.push(w((() => {
|
|
251
|
-
a.value && (this.wrapper.style.opacity = "0", this.lastPointerPosition = null, this.wrapper.style.transform = "");
|
|
252
|
-
}), [a]));
|
|
253
|
-
let o = () => {
|
|
254
|
-
if (this.lastPointerPosition && this.wavesurfer) {
|
|
255
|
-
let e = this.wavesurfer.getWrapper().getBoundingClientRect(), { width: t } = e, n = this.lastPointerPosition.clientX - e.left, i = Math.min(1, Math.max(0, n / t)), a = Math.min(t - this.options.lineWidth - 1, n);
|
|
256
|
-
this.wrapper.style.transform = `translateX(${a}px)`;
|
|
257
|
-
let o = r.duration.value;
|
|
258
|
-
this.label.textContent = this.options.formatTimeCallback(o * i);
|
|
259
|
-
let s = this.label.offsetWidth, c = this.options.labelPreferLeft ? a - s > 0 : a + s > t;
|
|
260
|
-
this.label.style.transform = c ? `translateX(-${s + this.options.lineWidth}px)` : "";
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
this.subscriptions.push(this.wavesurfer.on("zoom", o)), this.subscriptions.push(this.wavesurfer.on("scroll", o));
|
|
264
|
-
}
|
|
265
|
-
destroy() {
|
|
266
|
-
super.destroy(), this.wrapper.remove();
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region components/widget/tabs/messages-tab/message/audio-bubble-player.tsx
|
|
271
|
-
function O({ src: o, onDark: s = !1 }) {
|
|
272
|
-
let m = e("messages"), h = u(null), [g, _] = d(null), [v, b] = d(!1);
|
|
273
|
-
c(() => {
|
|
274
|
-
let e = h.current;
|
|
275
|
-
if (!e) return;
|
|
276
|
-
let t = getComputedStyle(e), n = t.getPropertyValue("--wx-primary").trim() || "#121314", r = t.getPropertyValue("--wx-primary-fg").trim() || "#ffffff", i = t.getPropertyValue("--wx-fg-muted").trim() || "#6b7280";
|
|
277
|
-
_(s ? {
|
|
278
|
-
wave: A(r, .35),
|
|
279
|
-
progress: r,
|
|
280
|
-
hoverLine: r
|
|
281
|
-
} : {
|
|
282
|
-
wave: i,
|
|
283
|
-
progress: n,
|
|
284
|
-
hoverLine: n
|
|
285
|
-
});
|
|
286
|
-
}, [s]);
|
|
287
|
-
let x = l(() => g ? [D.create({
|
|
288
|
-
lineColor: g.hoverLine,
|
|
289
|
-
lineWidth: 1,
|
|
290
|
-
labelBackground: g.hoverLine,
|
|
291
|
-
labelColor: s ? "#121314" : "#ffffff",
|
|
292
|
-
labelSize: "10px"
|
|
293
|
-
})] : [], [g, s]), S = l(() => ({ credentials: "omit" }), []), { wavesurfer: C, isReady: w, isPlaying: T, currentTime: E } = y({
|
|
294
|
-
container: h,
|
|
295
|
-
url: g && !v ? o : void 0,
|
|
296
|
-
waveColor: g?.wave,
|
|
297
|
-
progressColor: g?.progress,
|
|
298
|
-
cursorColor: g?.progress,
|
|
299
|
-
barWidth: 2,
|
|
300
|
-
barRadius: 2,
|
|
301
|
-
cursorWidth: 1,
|
|
302
|
-
height: 24,
|
|
303
|
-
hideScrollbar: !0,
|
|
304
|
-
plugins: x,
|
|
305
|
-
fetchParams: S
|
|
306
|
-
});
|
|
307
|
-
return c(() => {
|
|
308
|
-
if (!C) return;
|
|
309
|
-
let e = () => b(!0);
|
|
310
|
-
return C.on("error", e), () => {
|
|
311
|
-
C.un("error", e);
|
|
312
|
-
};
|
|
313
|
-
}, [C]), v ? /* @__PURE__ */ p("a", {
|
|
314
|
-
href: o,
|
|
315
|
-
target: "_blank",
|
|
316
|
-
rel: "noopener",
|
|
317
|
-
className: t("inline-flex w-60 max-w-full items-center gap-2 rounded-wx-sm px-3 py-2 text-xs font-medium", s ? "bg-wx-primary-fg/10 text-wx-primary-fg hover:bg-wx-primary-fg/20" : "bg-wx-bg/60 text-wx-fg hover:bg-wx-bg"),
|
|
318
|
-
children: [/* @__PURE__ */ f(n, {
|
|
319
|
-
size: 12,
|
|
320
|
-
className: "shrink-0"
|
|
321
|
-
}), /* @__PURE__ */ f("span", {
|
|
322
|
-
className: "truncate",
|
|
323
|
-
children: m("openAudio")
|
|
324
|
-
})]
|
|
325
|
-
}) : /* @__PURE__ */ p("div", {
|
|
326
|
-
className: "flex w-60 max-w-full min-w-0 items-center gap-3",
|
|
327
|
-
children: [
|
|
328
|
-
/* @__PURE__ */ f("button", {
|
|
329
|
-
type: "button",
|
|
330
|
-
onClick: () => {
|
|
331
|
-
C?.playPause();
|
|
332
|
-
},
|
|
333
|
-
"aria-label": m(T ? "pauseAudio" : "playAudio"),
|
|
334
|
-
className: t("flex h-8 w-8 shrink-0 items-center justify-center rounded-full transition-opacity", s ? "bg-wx-primary-fg text-wx-primary hover:opacity-90" : "bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover"),
|
|
335
|
-
children: w ? T ? /* @__PURE__ */ f(r, { size: 12 }) : /* @__PURE__ */ f(a, {
|
|
336
|
-
size: 12,
|
|
337
|
-
className: "translate-x-[1px]"
|
|
338
|
-
}) : /* @__PURE__ */ f(i, {
|
|
339
|
-
size: 12,
|
|
340
|
-
className: "animate-spin"
|
|
341
|
-
})
|
|
342
|
-
}),
|
|
343
|
-
/* @__PURE__ */ f("div", {
|
|
344
|
-
ref: h,
|
|
345
|
-
className: "min-w-0 flex-1"
|
|
346
|
-
}),
|
|
347
|
-
/* @__PURE__ */ f("span", {
|
|
348
|
-
className: t("shrink-0 font-mono text-[10px] tabular-nums", s ? "text-wx-primary-fg/70" : "text-wx-fg-subtle"),
|
|
349
|
-
children: w ? k(E) : "0:00"
|
|
350
|
-
})
|
|
351
|
-
]
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
function k(e) {
|
|
355
|
-
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
356
|
-
}
|
|
357
|
-
function A(e, t) {
|
|
358
|
-
let n = e.replace("#", "");
|
|
359
|
-
return n.length === 6 ? `rgba(${parseInt(n.substring(0, 2), 16)}, ${parseInt(n.substring(2, 4), 16)}, ${parseInt(n.substring(4, 6), 16)}, ${t})` : e;
|
|
360
|
-
}
|
|
361
|
-
//#endregion
|
|
362
|
-
export { O as AudioBubblePlayer };
|
|
363
|
-
|
|
364
|
-
//# sourceMappingURL=widget-react-BXf2Ty8d.js.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
globalThis.process === void 0 && (globalThis.process = {
|
|
2
|
-
env: {},
|
|
3
|
-
nextTick: function(e) {
|
|
4
|
-
setTimeout(e, 0);
|
|
5
|
-
},
|
|
6
|
-
emit: function() {
|
|
7
|
-
return !1;
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
import "react";
|
|
11
|
-
import "react-dom";
|
|
12
|
-
import "react/jsx-runtime";
|
|
13
|
-
import "react-dom/client";
|
|
14
|
-
import { t as e } from "./widget-react-krPPnv02.js";
|
|
15
|
-
var t = e("loader-circle", [["path", {
|
|
16
|
-
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
17
|
-
key: "13zald"
|
|
18
|
-
}]]), n = e("pause", [["rect", {
|
|
19
|
-
x: "14",
|
|
20
|
-
y: "3",
|
|
21
|
-
width: "5",
|
|
22
|
-
height: "18",
|
|
23
|
-
rx: "1",
|
|
24
|
-
key: "kaeet6"
|
|
25
|
-
}], ["rect", {
|
|
26
|
-
x: "5",
|
|
27
|
-
y: "3",
|
|
28
|
-
width: "5",
|
|
29
|
-
height: "18",
|
|
30
|
-
rx: "1",
|
|
31
|
-
key: "1wsw3u"
|
|
32
|
-
}]]), r = e("play", [["path", {
|
|
33
|
-
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
34
|
-
key: "10ikf1"
|
|
35
|
-
}]]);
|
|
36
|
-
//#endregion
|
|
37
|
-
export { n, t as r, r as t };
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=widget-react-BgALABDe.js.map
|