@gamention/pulse-elements 0.1.20 → 0.1.21
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/pulse-elements.cjs +182 -167
- package/dist/pulse-elements.js +824 -717
- package/package.json +3 -3
package/dist/pulse-elements.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2021 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
let
|
|
6
|
+
let Et = class extends Event {
|
|
7
7
|
constructor(e, t, i, s) {
|
|
8
8
|
super("context-request", { bubbles: !0, composed: !0 }), this.context = e, this.contextTarget = t, this.callback = i, this.subscribe = s ?? !1;
|
|
9
9
|
}
|
|
@@ -18,7 +18,7 @@ let kt = class extends Event {
|
|
|
18
18
|
* Copyright 2021 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
20
|
*/
|
|
21
|
-
let
|
|
21
|
+
let Je = class {
|
|
22
22
|
constructor(e, t, i, s) {
|
|
23
23
|
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (o, r) => {
|
|
24
24
|
this.unsubscribe && (this.unsubscribe !== r && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = o, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(o, r)), this.unsubscribe = r;
|
|
@@ -35,7 +35,7 @@ let Ge = class {
|
|
|
35
35
|
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
|
|
36
36
|
}
|
|
37
37
|
dispatchRequest() {
|
|
38
|
-
this.host.dispatchEvent(new
|
|
38
|
+
this.host.dispatchEvent(new Et(this.context, this.host, this.t, this.subscribe));
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
@@ -43,7 +43,7 @@ let Ge = class {
|
|
|
43
43
|
* Copyright 2021 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
45
|
*/
|
|
46
|
-
let
|
|
46
|
+
let Ut = class {
|
|
47
47
|
get value() {
|
|
48
48
|
return this.o;
|
|
49
49
|
}
|
|
@@ -80,7 +80,7 @@ let zt = class extends Event {
|
|
|
80
80
|
constructor(e, t) {
|
|
81
81
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = e, this.contextTarget = t;
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, Ze = class extends Ut {
|
|
84
84
|
constructor(e, t, i) {
|
|
85
85
|
var s, o;
|
|
86
86
|
super(t.context !== void 0 ? t.initialValue : i), this.onContextRequest = (r) => {
|
|
@@ -90,7 +90,7 @@ let zt = class extends Event {
|
|
|
90
90
|
}, this.onProviderRequest = (r) => {
|
|
91
91
|
if (r.context !== this.context || (r.contextTarget ?? r.composedPath()[0]) === this.host) return;
|
|
92
92
|
const a = /* @__PURE__ */ new Set();
|
|
93
|
-
for (const [l, { consumerHost: d }] of this.subscriptions) a.has(l) || (a.add(l), d.dispatchEvent(new
|
|
93
|
+
for (const [l, { consumerHost: d }] of this.subscriptions) a.has(l) || (a.add(l), d.dispatchEvent(new Et(this.context, d, l, !0)));
|
|
94
94
|
r.stopPropagation();
|
|
95
95
|
}, this.host = e, t.context !== void 0 ? this.context = t.context : this.context = t, this.attachListeners(), (o = (s = this.host).addController) == null || o.call(s, this);
|
|
96
96
|
}
|
|
@@ -106,7 +106,7 @@ let zt = class extends Event {
|
|
|
106
106
|
* Copyright 2017 Google LLC
|
|
107
107
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
108
108
|
*/
|
|
109
|
-
function
|
|
109
|
+
function Dt({ context: n }) {
|
|
110
110
|
return (e, t) => {
|
|
111
111
|
const i = /* @__PURE__ */ new WeakMap();
|
|
112
112
|
if (typeof t == "object") return { get() {
|
|
@@ -114,11 +114,11 @@ function Ut({ context: n }) {
|
|
|
114
114
|
}, set(s) {
|
|
115
115
|
return i.get(this).setValue(s), e.set.call(this, s);
|
|
116
116
|
}, init(s) {
|
|
117
|
-
return i.set(this, new
|
|
117
|
+
return i.set(this, new Ze(this, { context: n, initialValue: s })), s;
|
|
118
118
|
} };
|
|
119
119
|
{
|
|
120
120
|
e.constructor.addInitializer(((r) => {
|
|
121
|
-
i.set(r, new
|
|
121
|
+
i.set(r, new Ze(r, { context: n }));
|
|
122
122
|
}));
|
|
123
123
|
const s = Object.getOwnPropertyDescriptor(e, t);
|
|
124
124
|
let o;
|
|
@@ -147,17 +147,17 @@ function Ut({ context: n }) {
|
|
|
147
147
|
function fe({ context: n, subscribe: e }) {
|
|
148
148
|
return (t, i) => {
|
|
149
149
|
typeof i == "object" ? i.addInitializer((function() {
|
|
150
|
-
new
|
|
150
|
+
new Je(this, { context: n, callback: (s) => {
|
|
151
151
|
t.set.call(this, s);
|
|
152
152
|
}, subscribe: e });
|
|
153
153
|
})) : t.constructor.addInitializer(((s) => {
|
|
154
|
-
new
|
|
154
|
+
new Je(s, { context: n, callback: (o) => {
|
|
155
155
|
s[i] = o;
|
|
156
156
|
}, subscribe: e });
|
|
157
157
|
}));
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
var
|
|
160
|
+
var Ht = Object.defineProperty, Bt = (n, e, t) => e in n ? Ht(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, E = (n, e, t) => Bt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
161
161
|
const _e = {
|
|
162
162
|
allowImages: !0,
|
|
163
163
|
allowAudio: !0,
|
|
@@ -170,10 +170,10 @@ const _e = {
|
|
|
170
170
|
showCursors: !0,
|
|
171
171
|
showPresence: !0,
|
|
172
172
|
showTypingIndicators: !0
|
|
173
|
-
}, Nt = "ws://localhost:4567",
|
|
174
|
-
let
|
|
173
|
+
}, Nt = "ws://localhost:4567", Qe = 50, Ft = 3e4, qt = 1e3, Vt = 3e4;
|
|
174
|
+
let Be = class {
|
|
175
175
|
constructor() {
|
|
176
|
-
|
|
176
|
+
E(this, "handlers", /* @__PURE__ */ new Map());
|
|
177
177
|
}
|
|
178
178
|
on(e, t) {
|
|
179
179
|
this.handlers.has(e) || this.handlers.set(e, /* @__PURE__ */ new Set());
|
|
@@ -191,9 +191,9 @@ let He = class {
|
|
|
191
191
|
removeAll() {
|
|
192
192
|
this.handlers.clear();
|
|
193
193
|
}
|
|
194
|
-
},
|
|
194
|
+
}, Wt = class extends Be {
|
|
195
195
|
constructor(e) {
|
|
196
|
-
super(),
|
|
196
|
+
super(), E(this, "ws", null), E(this, "endpoint"), E(this, "reconnectAttempt", 0), E(this, "reconnectTimer", null), E(this, "_state", "disconnected"), this.endpoint = e ?? Nt;
|
|
197
197
|
}
|
|
198
198
|
get state() {
|
|
199
199
|
return this._state;
|
|
@@ -221,16 +221,16 @@ let He = class {
|
|
|
221
221
|
}
|
|
222
222
|
scheduleReconnect() {
|
|
223
223
|
const e = Math.min(
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
qt * 2 ** this.reconnectAttempt,
|
|
225
|
+
Vt
|
|
226
226
|
);
|
|
227
227
|
this.reconnectAttempt++, this.reconnectTimer = setTimeout(() => {
|
|
228
228
|
this.reconnectTimer = null, this.connect();
|
|
229
229
|
}, e);
|
|
230
230
|
}
|
|
231
|
-
},
|
|
231
|
+
}, Xt = class extends Be {
|
|
232
232
|
constructor() {
|
|
233
|
-
super(...arguments),
|
|
233
|
+
super(...arguments), E(this, "baseUrl", ""), E(this, "_user", null), E(this, "_config", { ..._e }), E(this, "_users", /* @__PURE__ */ new Map()), E(this, "_presence", /* @__PURE__ */ new Map()), E(this, "_threads", /* @__PURE__ */ new Map()), E(this, "_reactions", /* @__PURE__ */ new Map()), E(this, "_notifications", []), E(this, "_activityLogs", []), E(this, "_typing", /* @__PURE__ */ new Map()), E(this, "_viewports", /* @__PURE__ */ new Map()), E(this, "_selections", /* @__PURE__ */ new Map());
|
|
234
234
|
}
|
|
235
235
|
get user() {
|
|
236
236
|
return this._user;
|
|
@@ -278,6 +278,10 @@ let He = class {
|
|
|
278
278
|
getUser(e) {
|
|
279
279
|
return this._users.get(e);
|
|
280
280
|
}
|
|
281
|
+
/** Get all known users (from presence + comment authors). */
|
|
282
|
+
get users() {
|
|
283
|
+
return [...this._users.values()];
|
|
284
|
+
}
|
|
281
285
|
getReactions(e) {
|
|
282
286
|
return this._reactions.get(e) ?? [];
|
|
283
287
|
}
|
|
@@ -453,12 +457,12 @@ let He = class {
|
|
|
453
457
|
reset() {
|
|
454
458
|
this._user = null, this._config = { ..._e }, this._users.clear(), this._presence.clear(), this._threads.clear(), this._reactions.clear(), this._notifications = [], this._activityLogs = [], this._typing.clear(), this._viewports.clear(), this._selections.clear();
|
|
455
459
|
}
|
|
456
|
-
},
|
|
460
|
+
}, Ct = class extends Be {
|
|
457
461
|
constructor(e) {
|
|
458
462
|
var t;
|
|
459
|
-
super(),
|
|
463
|
+
super(), E(this, "state"), E(this, "connection"), E(this, "config"), E(this, "heartbeatTimer", null), E(this, "lastCursorSend", 0), E(this, "pendingCursor", null), E(this, "cursorTimer", null), this.config = e, this.state = new Xt(), this.state.baseUrl = (e.endpoint ?? "").replace(/^ws(s?):/, "http$1:").replace(/\/$/, "");
|
|
460
464
|
const i = ((t = e.endpoint) == null ? void 0 : t.replace(/^http/, "ws")) ?? void 0;
|
|
461
|
-
this.connection = new
|
|
465
|
+
this.connection = new Wt(i), this.connection.on("message", (s) => {
|
|
462
466
|
this.state.handleMessage(s), this.emit(s.type, s);
|
|
463
467
|
}), this.connection.on("state", (s) => {
|
|
464
468
|
this.emit("connection", s), s === "connected" ? (this.authenticate(), this.startHeartbeat()) : s === "disconnected" && this.stopHeartbeat();
|
|
@@ -488,9 +492,9 @@ let He = class {
|
|
|
488
492
|
// ── Cursors ──
|
|
489
493
|
moveCursor(e) {
|
|
490
494
|
const t = Date.now();
|
|
491
|
-
this.pendingCursor = e, t - this.lastCursorSend >=
|
|
495
|
+
this.pendingCursor = e, t - this.lastCursorSend >= Qe ? this.flushCursor() : this.cursorTimer || (this.cursorTimer = setTimeout(() => {
|
|
492
496
|
this.cursorTimer = null, this.flushCursor();
|
|
493
|
-
},
|
|
497
|
+
}, Qe));
|
|
494
498
|
}
|
|
495
499
|
flushCursor() {
|
|
496
500
|
this.pendingCursor && (this.send({ type: "cursor:move", position: this.pendingCursor }), this.lastCursorSend = Date.now(), this.pendingCursor = null);
|
|
@@ -502,7 +506,7 @@ let He = class {
|
|
|
502
506
|
startHeartbeat() {
|
|
503
507
|
this.heartbeatTimer = setInterval(() => {
|
|
504
508
|
this.send({ type: "presence:update", status: "online" });
|
|
505
|
-
},
|
|
509
|
+
}, Ft);
|
|
506
510
|
}
|
|
507
511
|
stopHeartbeat() {
|
|
508
512
|
this.heartbeatTimer && (clearInterval(this.heartbeatTimer), this.heartbeatTimer = null);
|
|
@@ -602,10 +606,10 @@ let He = class {
|
|
|
602
606
|
* Copyright 2019 Google LLC
|
|
603
607
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
604
608
|
*/
|
|
605
|
-
const ye = globalThis, Ne = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
606
|
-
let
|
|
609
|
+
const ye = globalThis, Ne = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Fe = Symbol(), et = /* @__PURE__ */ new WeakMap();
|
|
610
|
+
let Tt = class {
|
|
607
611
|
constructor(e, t, i) {
|
|
608
|
-
if (this._$cssResult$ = !0, i !==
|
|
612
|
+
if (this._$cssResult$ = !0, i !== Fe) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
609
613
|
this.cssText = e, this.t = t;
|
|
610
614
|
}
|
|
611
615
|
get styleSheet() {
|
|
@@ -613,7 +617,7 @@ let Ct = class {
|
|
|
613
617
|
const t = this.t;
|
|
614
618
|
if (Ne && e === void 0) {
|
|
615
619
|
const i = t !== void 0 && t.length === 1;
|
|
616
|
-
i && (e =
|
|
620
|
+
i && (e = et.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && et.set(t, e));
|
|
617
621
|
}
|
|
618
622
|
return e;
|
|
619
623
|
}
|
|
@@ -621,33 +625,33 @@ let Ct = class {
|
|
|
621
625
|
return this.cssText;
|
|
622
626
|
}
|
|
623
627
|
};
|
|
624
|
-
const
|
|
628
|
+
const Yt = (n) => new Tt(typeof n == "string" ? n : n + "", void 0, Fe), O = (n, ...e) => {
|
|
625
629
|
const t = n.length === 1 ? n[0] : e.reduce((i, s, o) => i + ((r) => {
|
|
626
630
|
if (r._$cssResult$ === !0) return r.cssText;
|
|
627
631
|
if (typeof r == "number") return r;
|
|
628
632
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
629
633
|
})(s) + n[o + 1], n[0]);
|
|
630
|
-
return new
|
|
631
|
-
},
|
|
634
|
+
return new Tt(t, n, Fe);
|
|
635
|
+
}, Kt = (n, e) => {
|
|
632
636
|
if (Ne) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
633
637
|
else for (const t of e) {
|
|
634
638
|
const i = document.createElement("style"), s = ye.litNonce;
|
|
635
639
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = t.cssText, n.appendChild(i);
|
|
636
640
|
}
|
|
637
|
-
},
|
|
641
|
+
}, tt = Ne ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
|
|
638
642
|
let t = "";
|
|
639
643
|
for (const i of e.cssRules) t += i.cssText;
|
|
640
|
-
return
|
|
644
|
+
return Yt(t);
|
|
641
645
|
})(n) : n;
|
|
642
646
|
/**
|
|
643
647
|
* @license
|
|
644
648
|
* Copyright 2017 Google LLC
|
|
645
649
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
646
650
|
*/
|
|
647
|
-
const { is:
|
|
651
|
+
const { is: Gt, defineProperty: Jt, getOwnPropertyDescriptor: Zt, getOwnPropertyNames: Qt, getOwnPropertySymbols: ei, getPrototypeOf: ti } = Object, H = globalThis, it = H.trustedTypes, ii = it ? it.emptyScript : "", Ie = H.reactiveElementPolyfillSupport, ne = (n, e) => n, ke = { toAttribute(n, e) {
|
|
648
652
|
switch (e) {
|
|
649
653
|
case Boolean:
|
|
650
|
-
n = n ?
|
|
654
|
+
n = n ? ii : null;
|
|
651
655
|
break;
|
|
652
656
|
case Object:
|
|
653
657
|
case Array:
|
|
@@ -672,7 +676,7 @@ const { is: Kt, defineProperty: Gt, getOwnPropertyDescriptor: Jt, getOwnProperty
|
|
|
672
676
|
}
|
|
673
677
|
}
|
|
674
678
|
return t;
|
|
675
|
-
} },
|
|
679
|
+
} }, qe = (n, e) => !Gt(n, e), st = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: qe };
|
|
676
680
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), H.litPropertyMetadata ?? (H.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
677
681
|
let G = class extends HTMLElement {
|
|
678
682
|
static addInitializer(e) {
|
|
@@ -681,14 +685,14 @@ let G = class extends HTMLElement {
|
|
|
681
685
|
static get observedAttributes() {
|
|
682
686
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
683
687
|
}
|
|
684
|
-
static createProperty(e, t =
|
|
688
|
+
static createProperty(e, t = st) {
|
|
685
689
|
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
686
690
|
const i = Symbol(), s = this.getPropertyDescriptor(e, i, t);
|
|
687
|
-
s !== void 0 &&
|
|
691
|
+
s !== void 0 && Jt(this.prototype, e, s);
|
|
688
692
|
}
|
|
689
693
|
}
|
|
690
694
|
static getPropertyDescriptor(e, t, i) {
|
|
691
|
-
const { get: s, set: o } =
|
|
695
|
+
const { get: s, set: o } = Zt(this.prototype, e) ?? { get() {
|
|
692
696
|
return this[t];
|
|
693
697
|
}, set(r) {
|
|
694
698
|
this[t] = r;
|
|
@@ -699,17 +703,17 @@ let G = class extends HTMLElement {
|
|
|
699
703
|
}, configurable: !0, enumerable: !0 };
|
|
700
704
|
}
|
|
701
705
|
static getPropertyOptions(e) {
|
|
702
|
-
return this.elementProperties.get(e) ??
|
|
706
|
+
return this.elementProperties.get(e) ?? st;
|
|
703
707
|
}
|
|
704
708
|
static _$Ei() {
|
|
705
709
|
if (this.hasOwnProperty(ne("elementProperties"))) return;
|
|
706
|
-
const e =
|
|
710
|
+
const e = ti(this);
|
|
707
711
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
708
712
|
}
|
|
709
713
|
static finalize() {
|
|
710
714
|
if (this.hasOwnProperty(ne("finalized"))) return;
|
|
711
715
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ne("properties"))) {
|
|
712
|
-
const t = this.properties, i = [...
|
|
716
|
+
const t = this.properties, i = [...Qt(t), ...ei(t)];
|
|
713
717
|
for (const s of i) this.createProperty(s, t[s]);
|
|
714
718
|
}
|
|
715
719
|
const e = this[Symbol.metadata];
|
|
@@ -728,8 +732,8 @@ let G = class extends HTMLElement {
|
|
|
728
732
|
const t = [];
|
|
729
733
|
if (Array.isArray(e)) {
|
|
730
734
|
const i = new Set(e.flat(1 / 0).reverse());
|
|
731
|
-
for (const s of i) t.unshift(
|
|
732
|
-
} else e !== void 0 && t.push(
|
|
735
|
+
for (const s of i) t.unshift(tt(s));
|
|
736
|
+
} else e !== void 0 && t.push(tt(e));
|
|
733
737
|
return t;
|
|
734
738
|
}
|
|
735
739
|
static _$Eu(e, t) {
|
|
@@ -758,7 +762,7 @@ let G = class extends HTMLElement {
|
|
|
758
762
|
}
|
|
759
763
|
createRenderRoot() {
|
|
760
764
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
761
|
-
return
|
|
765
|
+
return Kt(e, this.constructor.elementStyles), e;
|
|
762
766
|
}
|
|
763
767
|
connectedCallback() {
|
|
764
768
|
var e;
|
|
@@ -801,7 +805,7 @@ let G = class extends HTMLElement {
|
|
|
801
805
|
var r;
|
|
802
806
|
if (e !== void 0) {
|
|
803
807
|
const a = this.constructor;
|
|
804
|
-
if (s === !1 && (o = this[e]), i ?? (i = a.getPropertyOptions(e)), !((i.hasChanged ??
|
|
808
|
+
if (s === !1 && (o = this[e]), i ?? (i = a.getPropertyOptions(e)), !((i.hasChanged ?? qe)(o, t) || i.useDefault && i.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(e)) && !this.hasAttribute(a._$Eu(e, i)))) return;
|
|
805
809
|
this.C(e, t, i);
|
|
806
810
|
}
|
|
807
811
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -883,50 +887,50 @@ G.elementStyles = [], G.shadowRootOptions = { mode: "open" }, G[ne("elementPrope
|
|
|
883
887
|
* Copyright 2017 Google LLC
|
|
884
888
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
885
889
|
*/
|
|
886
|
-
const oe = globalThis,
|
|
887
|
-
\f\r]`, se = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
888
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
889
|
-
function
|
|
890
|
-
if (!
|
|
891
|
-
return
|
|
890
|
+
const oe = globalThis, nt = (n) => n, Ee = oe.trustedTypes, ot = Ee ? Ee.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, St = "$lit$", D = `lit$${Math.random().toFixed(9).slice(2)}$`, At = "?" + D, si = `<${At}>`, V = document, ae = () => V.createComment(""), le = (n) => n === null || typeof n != "object" && typeof n != "function", Ve = Array.isArray, ni = (n) => Ve(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Me = `[
|
|
891
|
+
\f\r]`, se = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, at = />/g, N = RegExp(`>|${Me}(?:([^\\s"'>=/]+)(${Me}*=${Me}*(?:[^
|
|
892
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), lt = /'/g, ct = /"/g, Pt = /^(?:script|style|textarea|title)$/i, _t = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), p = _t(1), oi = _t(2), W = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), dt = /* @__PURE__ */ new WeakMap(), F = V.createTreeWalker(V, 129);
|
|
893
|
+
function It(n, e) {
|
|
894
|
+
if (!Ve(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
895
|
+
return ot !== void 0 ? ot.createHTML(e) : e;
|
|
892
896
|
}
|
|
893
|
-
const
|
|
897
|
+
const ri = (n, e) => {
|
|
894
898
|
const t = n.length - 1, i = [];
|
|
895
899
|
let s, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", r = se;
|
|
896
900
|
for (let a = 0; a < t; a++) {
|
|
897
901
|
const l = n[a];
|
|
898
|
-
let d, c, h = -1,
|
|
899
|
-
for (;
|
|
900
|
-
const
|
|
901
|
-
o += r === se ? l +
|
|
902
|
+
let d, c, h = -1, u = 0;
|
|
903
|
+
for (; u < l.length && (r.lastIndex = u, c = r.exec(l), c !== null); ) u = r.lastIndex, r === se ? c[1] === "!--" ? r = rt : c[1] !== void 0 ? r = at : c[2] !== void 0 ? (Pt.test(c[2]) && (s = RegExp("</" + c[2], "g")), r = N) : c[3] !== void 0 && (r = N) : r === N ? c[0] === ">" ? (r = s ?? se, h = -1) : c[1] === void 0 ? h = -2 : (h = r.lastIndex - c[2].length, d = c[1], r = c[3] === void 0 ? N : c[3] === '"' ? ct : lt) : r === ct || r === lt ? r = N : r === rt || r === at ? r = se : (r = N, s = void 0);
|
|
904
|
+
const f = r === N && n[a + 1].startsWith("/>") ? " " : "";
|
|
905
|
+
o += r === se ? l + si : h >= 0 ? (i.push(d), l.slice(0, h) + St + l.slice(h) + D + f) : l + D + (h === -2 ? a : f);
|
|
902
906
|
}
|
|
903
|
-
return [
|
|
907
|
+
return [It(n, o + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
904
908
|
};
|
|
905
909
|
class ce {
|
|
906
910
|
constructor({ strings: e, _$litType$: t }, i) {
|
|
907
911
|
let s;
|
|
908
912
|
this.parts = [];
|
|
909
913
|
let o = 0, r = 0;
|
|
910
|
-
const a = e.length - 1, l = this.parts, [d, c] =
|
|
914
|
+
const a = e.length - 1, l = this.parts, [d, c] = ri(e, t);
|
|
911
915
|
if (this.el = ce.createElement(d, i), F.currentNode = this.el.content, t === 2 || t === 3) {
|
|
912
916
|
const h = this.el.content.firstChild;
|
|
913
917
|
h.replaceWith(...h.childNodes);
|
|
914
918
|
}
|
|
915
919
|
for (; (s = F.nextNode()) !== null && l.length < a; ) {
|
|
916
920
|
if (s.nodeType === 1) {
|
|
917
|
-
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(
|
|
918
|
-
const
|
|
919
|
-
l.push({ type: 1, index: o, name:
|
|
921
|
+
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(St)) {
|
|
922
|
+
const u = c[r++], f = s.getAttribute(h).split(D), b = /([.?@])?(.*)/.exec(u);
|
|
923
|
+
l.push({ type: 1, index: o, name: b[2], strings: f, ctor: b[1] === "." ? li : b[1] === "?" ? ci : b[1] === "@" ? di : Se }), s.removeAttribute(h);
|
|
920
924
|
} else h.startsWith(D) && (l.push({ type: 6, index: o }), s.removeAttribute(h));
|
|
921
|
-
if (
|
|
922
|
-
const h = s.textContent.split(D),
|
|
923
|
-
if (
|
|
925
|
+
if (Pt.test(s.tagName)) {
|
|
926
|
+
const h = s.textContent.split(D), u = h.length - 1;
|
|
927
|
+
if (u > 0) {
|
|
924
928
|
s.textContent = Ee ? Ee.emptyScript : "";
|
|
925
|
-
for (let
|
|
926
|
-
s.append(h[
|
|
929
|
+
for (let f = 0; f < u; f++) s.append(h[f], ae()), F.nextNode(), l.push({ type: 2, index: ++o });
|
|
930
|
+
s.append(h[u], ae());
|
|
927
931
|
}
|
|
928
932
|
}
|
|
929
|
-
} else if (s.nodeType === 8) if (s.data ===
|
|
933
|
+
} else if (s.nodeType === 8) if (s.data === At) l.push({ type: 2, index: o });
|
|
930
934
|
else {
|
|
931
935
|
let h = -1;
|
|
932
936
|
for (; (h = s.data.indexOf(D, h + 1)) !== -1; ) l.push({ type: 7, index: o }), h += D.length - 1;
|
|
@@ -946,7 +950,7 @@ function J(n, e, t = n, i) {
|
|
|
946
950
|
const o = le(e) ? void 0 : e._$litDirective$;
|
|
947
951
|
return (s == null ? void 0 : s.constructor) !== o && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), o === void 0 ? s = void 0 : (s = new o(n), s._$AT(n, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = s : t._$Cl = s), s !== void 0 && (e = J(n, s._$AS(n, e.values), s, i)), e;
|
|
948
952
|
}
|
|
949
|
-
class
|
|
953
|
+
class ai {
|
|
950
954
|
constructor(e, t) {
|
|
951
955
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
952
956
|
}
|
|
@@ -963,7 +967,7 @@ class ri {
|
|
|
963
967
|
for (; l !== void 0; ) {
|
|
964
968
|
if (r === l.index) {
|
|
965
969
|
let d;
|
|
966
|
-
l.type === 2 ? d = new me(o, o.nextSibling, this, e) : l.type === 1 ? d = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (d = new
|
|
970
|
+
l.type === 2 ? d = new me(o, o.nextSibling, this, e) : l.type === 1 ? d = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (d = new hi(o, this, e)), this._$AV.push(d), l = i[++a];
|
|
967
971
|
}
|
|
968
972
|
r !== (l == null ? void 0 : l.index) && (o = F.nextNode(), r++);
|
|
969
973
|
}
|
|
@@ -980,7 +984,7 @@ class me {
|
|
|
980
984
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
981
985
|
}
|
|
982
986
|
constructor(e, t, i, s) {
|
|
983
|
-
this.type = 2, this._$AH =
|
|
987
|
+
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
|
984
988
|
}
|
|
985
989
|
get parentNode() {
|
|
986
990
|
let e = this._$AA.parentNode;
|
|
@@ -994,7 +998,7 @@ class me {
|
|
|
994
998
|
return this._$AB;
|
|
995
999
|
}
|
|
996
1000
|
_$AI(e, t = this) {
|
|
997
|
-
e = J(this, e, t), le(e) ? e ===
|
|
1001
|
+
e = J(this, e, t), le(e) ? e === g || e == null || e === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : e !== this._$AH && e !== W && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ni(e) ? this.k(e) : this._(e);
|
|
998
1002
|
}
|
|
999
1003
|
O(e) {
|
|
1000
1004
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -1003,23 +1007,23 @@ class me {
|
|
|
1003
1007
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
1004
1008
|
}
|
|
1005
1009
|
_(e) {
|
|
1006
|
-
this._$AH !==
|
|
1010
|
+
this._$AH !== g && le(this._$AH) ? this._$AA.nextSibling.data = e : this.T(V.createTextNode(e)), this._$AH = e;
|
|
1007
1011
|
}
|
|
1008
1012
|
$(e) {
|
|
1009
1013
|
var o;
|
|
1010
|
-
const { values: t, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = ce.createElement(
|
|
1014
|
+
const { values: t, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = ce.createElement(It(i.h, i.h[0]), this.options)), i);
|
|
1011
1015
|
if (((o = this._$AH) == null ? void 0 : o._$AD) === s) this._$AH.p(t);
|
|
1012
1016
|
else {
|
|
1013
|
-
const r = new
|
|
1017
|
+
const r = new ai(s, this), a = r.u(this.options);
|
|
1014
1018
|
r.p(t), this.T(a), this._$AH = r;
|
|
1015
1019
|
}
|
|
1016
1020
|
}
|
|
1017
1021
|
_$AC(e) {
|
|
1018
|
-
let t =
|
|
1019
|
-
return t === void 0 &&
|
|
1022
|
+
let t = dt.get(e.strings);
|
|
1023
|
+
return t === void 0 && dt.set(e.strings, t = new ce(e)), t;
|
|
1020
1024
|
}
|
|
1021
1025
|
k(e) {
|
|
1022
|
-
|
|
1026
|
+
Ve(this._$AH) || (this._$AH = [], this._$AR());
|
|
1023
1027
|
const t = this._$AH;
|
|
1024
1028
|
let i, s = 0;
|
|
1025
1029
|
for (const o of e) s === t.length ? t.push(i = new me(this.O(ae()), this.O(ae()), this, this.options)) : i = t[s], i._$AI(o), s++;
|
|
@@ -1028,8 +1032,8 @@ class me {
|
|
|
1028
1032
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
1029
1033
|
var i;
|
|
1030
1034
|
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
1031
|
-
const s =
|
|
1032
|
-
|
|
1035
|
+
const s = nt(e).nextSibling;
|
|
1036
|
+
nt(e).remove(), e = s;
|
|
1033
1037
|
}
|
|
1034
1038
|
}
|
|
1035
1039
|
setConnected(e) {
|
|
@@ -1045,7 +1049,7 @@ class Se {
|
|
|
1045
1049
|
return this._$AM._$AU;
|
|
1046
1050
|
}
|
|
1047
1051
|
constructor(e, t, i, s, o) {
|
|
1048
|
-
this.type = 1, this._$AH =
|
|
1052
|
+
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = e, this.name = t, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = g;
|
|
1049
1053
|
}
|
|
1050
1054
|
_$AI(e, t = this, i, s) {
|
|
1051
1055
|
const o = this.strings;
|
|
@@ -1054,37 +1058,37 @@ class Se {
|
|
|
1054
1058
|
else {
|
|
1055
1059
|
const a = e;
|
|
1056
1060
|
let l, d;
|
|
1057
|
-
for (e = o[0], l = 0; l < o.length - 1; l++) d = J(this, a[i + l], t, l), d === W && (d = this._$AH[l]), r || (r = !le(d) || d !== this._$AH[l]), d ===
|
|
1061
|
+
for (e = o[0], l = 0; l < o.length - 1; l++) d = J(this, a[i + l], t, l), d === W && (d = this._$AH[l]), r || (r = !le(d) || d !== this._$AH[l]), d === g ? e = g : e !== g && (e += (d ?? "") + o[l + 1]), this._$AH[l] = d;
|
|
1058
1062
|
}
|
|
1059
1063
|
r && !s && this.j(e);
|
|
1060
1064
|
}
|
|
1061
1065
|
j(e) {
|
|
1062
|
-
e ===
|
|
1066
|
+
e === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
1063
1067
|
}
|
|
1064
1068
|
}
|
|
1065
|
-
class
|
|
1069
|
+
class li extends Se {
|
|
1066
1070
|
constructor() {
|
|
1067
1071
|
super(...arguments), this.type = 3;
|
|
1068
1072
|
}
|
|
1069
1073
|
j(e) {
|
|
1070
|
-
this.element[this.name] = e ===
|
|
1074
|
+
this.element[this.name] = e === g ? void 0 : e;
|
|
1071
1075
|
}
|
|
1072
1076
|
}
|
|
1073
|
-
class
|
|
1077
|
+
class ci extends Se {
|
|
1074
1078
|
constructor() {
|
|
1075
1079
|
super(...arguments), this.type = 4;
|
|
1076
1080
|
}
|
|
1077
1081
|
j(e) {
|
|
1078
|
-
this.element.toggleAttribute(this.name, !!e && e !==
|
|
1082
|
+
this.element.toggleAttribute(this.name, !!e && e !== g);
|
|
1079
1083
|
}
|
|
1080
1084
|
}
|
|
1081
|
-
class
|
|
1085
|
+
class di extends Se {
|
|
1082
1086
|
constructor(e, t, i, s, o) {
|
|
1083
1087
|
super(e, t, i, s, o), this.type = 5;
|
|
1084
1088
|
}
|
|
1085
1089
|
_$AI(e, t = this) {
|
|
1086
|
-
if ((e = J(this, e, t, 0) ??
|
|
1087
|
-
const i = this._$AH, s = e ===
|
|
1090
|
+
if ((e = J(this, e, t, 0) ?? g) === W) return;
|
|
1091
|
+
const i = this._$AH, s = e === g && i !== g || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== g && (i === g || s);
|
|
1088
1092
|
s && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
1089
1093
|
}
|
|
1090
1094
|
handleEvent(e) {
|
|
@@ -1092,7 +1096,7 @@ class ci extends Se {
|
|
|
1092
1096
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
1093
1097
|
}
|
|
1094
1098
|
}
|
|
1095
|
-
class
|
|
1099
|
+
class hi {
|
|
1096
1100
|
constructor(e, t, i) {
|
|
1097
1101
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
|
|
1098
1102
|
}
|
|
@@ -1105,7 +1109,7 @@ class di {
|
|
|
1105
1109
|
}
|
|
1106
1110
|
const Oe = oe.litHtmlPolyfillSupport;
|
|
1107
1111
|
Oe == null || Oe(ce, me), (oe.litHtmlVersions ?? (oe.litHtmlVersions = [])).push("3.3.2");
|
|
1108
|
-
const
|
|
1112
|
+
const pi = (n, e, t) => {
|
|
1109
1113
|
const i = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
1110
1114
|
let s = i._$litPart$;
|
|
1111
1115
|
if (s === void 0) {
|
|
@@ -1120,7 +1124,7 @@ const hi = (n, e, t) => {
|
|
|
1120
1124
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1121
1125
|
*/
|
|
1122
1126
|
const q = globalThis;
|
|
1123
|
-
let
|
|
1127
|
+
let _ = class extends G {
|
|
1124
1128
|
constructor() {
|
|
1125
1129
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
1126
1130
|
}
|
|
@@ -1131,7 +1135,7 @@ let P = class extends G {
|
|
|
1131
1135
|
}
|
|
1132
1136
|
update(e) {
|
|
1133
1137
|
const t = this.render();
|
|
1134
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
1138
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = pi(t, this.renderRoot, this.renderOptions);
|
|
1135
1139
|
}
|
|
1136
1140
|
connectedCallback() {
|
|
1137
1141
|
var e;
|
|
@@ -1145,10 +1149,10 @@ let P = class extends G {
|
|
|
1145
1149
|
return W;
|
|
1146
1150
|
}
|
|
1147
1151
|
};
|
|
1148
|
-
var
|
|
1149
|
-
|
|
1152
|
+
var kt;
|
|
1153
|
+
_._$litElement$ = !0, _.finalized = !0, (kt = q.litElementHydrateSupport) == null || kt.call(q, { LitElement: _ });
|
|
1150
1154
|
const Re = q.litElementPolyfillSupport;
|
|
1151
|
-
Re == null || Re({ LitElement:
|
|
1155
|
+
Re == null || Re({ LitElement: _ });
|
|
1152
1156
|
(q.litElementVersions ?? (q.litElementVersions = [])).push("4.2.2");
|
|
1153
1157
|
/**
|
|
1154
1158
|
* @license
|
|
@@ -1165,7 +1169,7 @@ const L = (n) => (e, t) => {
|
|
|
1165
1169
|
* Copyright 2017 Google LLC
|
|
1166
1170
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1167
1171
|
*/
|
|
1168
|
-
const
|
|
1172
|
+
const ui = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: qe }, fi = (n = ui, e, t) => {
|
|
1169
1173
|
const { kind: i, metadata: s } = t;
|
|
1170
1174
|
let o = globalThis.litPropertyMetadata.get(s);
|
|
1171
1175
|
if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), i === "setter" && ((n = Object.create(n)).wrapped = !0), o.set(t.name, n), i === "accessor") {
|
|
@@ -1186,8 +1190,8 @@ const pi = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged
|
|
|
1186
1190
|
}
|
|
1187
1191
|
throw Error("Unsupported decorator location: " + i);
|
|
1188
1192
|
};
|
|
1189
|
-
function
|
|
1190
|
-
return (e, t) => typeof t == "object" ?
|
|
1193
|
+
function w(n) {
|
|
1194
|
+
return (e, t) => typeof t == "object" ? fi(n, e, t) : ((i, s, o) => {
|
|
1191
1195
|
const r = s.hasOwnProperty(o);
|
|
1192
1196
|
return s.constructor.createProperty(o, i), r ? Object.getOwnPropertyDescriptor(s, o) : void 0;
|
|
1193
1197
|
})(n, e, t);
|
|
@@ -1197,16 +1201,16 @@ function x(n) {
|
|
|
1197
1201
|
* Copyright 2017 Google LLC
|
|
1198
1202
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1199
1203
|
*/
|
|
1200
|
-
function
|
|
1201
|
-
return
|
|
1204
|
+
function k(n) {
|
|
1205
|
+
return w({ ...n, state: !0, attribute: !1 });
|
|
1202
1206
|
}
|
|
1203
1207
|
const Q = "pulse-client";
|
|
1204
|
-
var
|
|
1205
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
1208
|
+
var mi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, ee = (n, e, t, i) => {
|
|
1209
|
+
for (var s = i > 1 ? void 0 : i ? gi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
1206
1210
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1207
|
-
return i && s &&
|
|
1211
|
+
return i && s && mi(e, t, s), s;
|
|
1208
1212
|
};
|
|
1209
|
-
let X = class extends
|
|
1213
|
+
let X = class extends _ {
|
|
1210
1214
|
constructor() {
|
|
1211
1215
|
super(...arguments), this.apiKey = "", this.token = "", this.room = "";
|
|
1212
1216
|
}
|
|
@@ -1218,40 +1222,40 @@ let X = class extends P {
|
|
|
1218
1222
|
room: this.room,
|
|
1219
1223
|
endpoint: this.endpoint
|
|
1220
1224
|
};
|
|
1221
|
-
this.client = new
|
|
1225
|
+
this.client = new Ct(n), this.client.connect();
|
|
1222
1226
|
}
|
|
1223
1227
|
disconnectedCallback() {
|
|
1224
1228
|
var n;
|
|
1225
1229
|
super.disconnectedCallback(), (n = this.client) == null || n.disconnect();
|
|
1226
1230
|
}
|
|
1227
1231
|
render() {
|
|
1228
|
-
return
|
|
1232
|
+
return p`<slot></slot>`;
|
|
1229
1233
|
}
|
|
1230
1234
|
};
|
|
1231
1235
|
ee([
|
|
1232
|
-
|
|
1236
|
+
w({ attribute: "api-key" })
|
|
1233
1237
|
], X.prototype, "apiKey", 2);
|
|
1234
1238
|
ee([
|
|
1235
|
-
|
|
1239
|
+
w()
|
|
1236
1240
|
], X.prototype, "token", 2);
|
|
1237
1241
|
ee([
|
|
1238
|
-
|
|
1242
|
+
w()
|
|
1239
1243
|
], X.prototype, "room", 2);
|
|
1240
1244
|
ee([
|
|
1241
|
-
|
|
1245
|
+
w()
|
|
1242
1246
|
], X.prototype, "endpoint", 2);
|
|
1243
1247
|
ee([
|
|
1244
|
-
|
|
1248
|
+
Dt({ context: Q })
|
|
1245
1249
|
], X.prototype, "client", 2);
|
|
1246
1250
|
X = ee([
|
|
1247
1251
|
L("pulse-provider")
|
|
1248
1252
|
], X);
|
|
1249
|
-
var
|
|
1250
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
1253
|
+
var vi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Ae = (n, e, t, i) => {
|
|
1254
|
+
for (var s = i > 1 ? void 0 : i ? bi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
1251
1255
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1252
|
-
return i && s &&
|
|
1256
|
+
return i && s && vi(e, t, s), s;
|
|
1253
1257
|
};
|
|
1254
|
-
let Z = class extends
|
|
1258
|
+
let Z = class extends _ {
|
|
1255
1259
|
constructor() {
|
|
1256
1260
|
super(...arguments), this.maxVisible = 5, this.users = [];
|
|
1257
1261
|
}
|
|
@@ -1276,16 +1280,16 @@ let Z = class extends P {
|
|
|
1276
1280
|
}
|
|
1277
1281
|
render() {
|
|
1278
1282
|
const n = this.users.slice(0, this.maxVisible), e = this.users.length - this.maxVisible;
|
|
1279
|
-
return
|
|
1283
|
+
return p`
|
|
1280
1284
|
<div class="avatars">
|
|
1281
|
-
${e > 0 ?
|
|
1285
|
+
${e > 0 ? p`<div class="overflow">+${e}</div>` : null}
|
|
1282
1286
|
${n.map(
|
|
1283
|
-
(t) =>
|
|
1287
|
+
(t) => p`
|
|
1284
1288
|
<div
|
|
1285
1289
|
class="avatar"
|
|
1286
1290
|
style="background:${t.user.color}"
|
|
1287
1291
|
>
|
|
1288
|
-
${t.user.avatar ?
|
|
1292
|
+
${t.user.avatar ? p`<img src="${t.user.avatar}" alt="${t.user.name}" />` : this.getInitials(t.user.name)}
|
|
1289
1293
|
<span class="status-ring ${t.status}"></span>
|
|
1290
1294
|
<span class="tooltip">${t.user.name}</span>
|
|
1291
1295
|
</div>
|
|
@@ -1401,23 +1405,23 @@ Z.styles = O`
|
|
|
1401
1405
|
`;
|
|
1402
1406
|
Ae([
|
|
1403
1407
|
fe({ context: Q, subscribe: !0 }),
|
|
1404
|
-
|
|
1408
|
+
w({ attribute: !1 })
|
|
1405
1409
|
], Z.prototype, "client", 2);
|
|
1406
1410
|
Ae([
|
|
1407
|
-
|
|
1411
|
+
w({ type: Number, attribute: "max-visible" })
|
|
1408
1412
|
], Z.prototype, "maxVisible", 2);
|
|
1409
1413
|
Ae([
|
|
1410
|
-
|
|
1414
|
+
k()
|
|
1411
1415
|
], Z.prototype, "users", 2);
|
|
1412
1416
|
Z = Ae([
|
|
1413
1417
|
L("pulse-presence")
|
|
1414
1418
|
], Z);
|
|
1415
|
-
var
|
|
1416
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
1419
|
+
var xi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, We = (n, e, t, i) => {
|
|
1420
|
+
for (var s = i > 1 ? void 0 : i ? yi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
1417
1421
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1418
|
-
return i && s &&
|
|
1422
|
+
return i && s && xi(e, t, s), s;
|
|
1419
1423
|
};
|
|
1420
|
-
let de = class extends
|
|
1424
|
+
let de = class extends _ {
|
|
1421
1425
|
constructor() {
|
|
1422
1426
|
super(...arguments), this.cursors = /* @__PURE__ */ new Map(), this.unsubs = [], this.handleLocalCursor = (n) => {
|
|
1423
1427
|
var e;
|
|
@@ -1471,9 +1475,9 @@ let de = class extends P {
|
|
|
1471
1475
|
}
|
|
1472
1476
|
render() {
|
|
1473
1477
|
const n = [...this.cursors.values()];
|
|
1474
|
-
return
|
|
1478
|
+
return p`
|
|
1475
1479
|
${n.map(
|
|
1476
|
-
(e) =>
|
|
1480
|
+
(e) => p`
|
|
1477
1481
|
<div
|
|
1478
1482
|
class="cursor"
|
|
1479
1483
|
style="transform:translate(${e.position.x}px,${e.position.y}px)"
|
|
@@ -1531,22 +1535,22 @@ de.styles = O`
|
|
|
1531
1535
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
1532
1536
|
}
|
|
1533
1537
|
`;
|
|
1534
|
-
|
|
1538
|
+
We([
|
|
1535
1539
|
fe({ context: Q, subscribe: !0 }),
|
|
1536
|
-
|
|
1540
|
+
w({ attribute: !1 })
|
|
1537
1541
|
], de.prototype, "client", 2);
|
|
1538
|
-
|
|
1539
|
-
|
|
1542
|
+
We([
|
|
1543
|
+
k()
|
|
1540
1544
|
], de.prototype, "cursors", 2);
|
|
1541
|
-
de =
|
|
1545
|
+
de = We([
|
|
1542
1546
|
L("pulse-cursors")
|
|
1543
1547
|
], de);
|
|
1544
|
-
var
|
|
1545
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
1548
|
+
var wi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, ge = (n, e, t, i) => {
|
|
1549
|
+
for (var s = i > 1 ? void 0 : i ? $i(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
1546
1550
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1547
|
-
return i && s &&
|
|
1551
|
+
return i && s && wi(e, t, s), s;
|
|
1548
1552
|
};
|
|
1549
|
-
let Y = class extends
|
|
1553
|
+
let Y = class extends _ {
|
|
1550
1554
|
constructor() {
|
|
1551
1555
|
super(...arguments), this.showResolved = !1, this.threads = [], this.replyingTo = null;
|
|
1552
1556
|
}
|
|
@@ -1568,7 +1572,7 @@ let Y = class extends P {
|
|
|
1568
1572
|
}
|
|
1569
1573
|
parseMentions(n) {
|
|
1570
1574
|
return n.split(/(@\w+)/g).map(
|
|
1571
|
-
(t) => t.startsWith("@") ?
|
|
1575
|
+
(t) => t.startsWith("@") ? p`<span class="mention">${t}</span>` : t
|
|
1572
1576
|
);
|
|
1573
1577
|
}
|
|
1574
1578
|
getInitials(n) {
|
|
@@ -1594,9 +1598,9 @@ let Y = class extends P {
|
|
|
1594
1598
|
}
|
|
1595
1599
|
render() {
|
|
1596
1600
|
const n = this.showResolved ? this.threads : this.threads.filter((e) => !e.resolved);
|
|
1597
|
-
return
|
|
1601
|
+
return p`
|
|
1598
1602
|
<div class="threads">
|
|
1599
|
-
${n.length === 0 ?
|
|
1603
|
+
${n.length === 0 ? p`<div class="empty">
|
|
1600
1604
|
<div class="empty-icon">💬</div>
|
|
1601
1605
|
No comments yet.<br>Start a conversation below.
|
|
1602
1606
|
</div>` : n.map((e) => this.renderThread(e))}
|
|
@@ -1610,12 +1614,12 @@ let Y = class extends P {
|
|
|
1610
1614
|
`;
|
|
1611
1615
|
}
|
|
1612
1616
|
renderThread(n) {
|
|
1613
|
-
return
|
|
1617
|
+
return p`
|
|
1614
1618
|
<div class="thread ${n.resolved ? "resolved" : ""}">
|
|
1615
1619
|
${n.comments.map((e, t) => {
|
|
1616
1620
|
const i = this.getUserForComment(e.userId);
|
|
1617
|
-
return
|
|
1618
|
-
${t > 0 ?
|
|
1621
|
+
return p`
|
|
1622
|
+
${t > 0 ? p`<div class="divider"></div>` : g}
|
|
1619
1623
|
<div class="comment">
|
|
1620
1624
|
<div class="comment-header">
|
|
1621
1625
|
<div
|
|
@@ -1647,12 +1651,12 @@ let Y = class extends P {
|
|
|
1647
1651
|
${n.resolved ? "Reopen" : "Resolve"}
|
|
1648
1652
|
</button>
|
|
1649
1653
|
</div>
|
|
1650
|
-
${this.replyingTo === n.id ?
|
|
1654
|
+
${this.replyingTo === n.id ? p`
|
|
1651
1655
|
<form class="reply-form" @submit=${(e) => this.handleReply(n.id, e)}>
|
|
1652
1656
|
<input type="text" placeholder="Write a reply..." />
|
|
1653
1657
|
<button type="submit">Send</button>
|
|
1654
1658
|
</form>
|
|
1655
|
-
` :
|
|
1659
|
+
` : g}
|
|
1656
1660
|
</div>
|
|
1657
1661
|
`;
|
|
1658
1662
|
}
|
|
@@ -1878,39 +1882,39 @@ Y.styles = O`
|
|
|
1878
1882
|
`;
|
|
1879
1883
|
ge([
|
|
1880
1884
|
fe({ context: Q, subscribe: !0 }),
|
|
1881
|
-
|
|
1885
|
+
w({ attribute: !1 })
|
|
1882
1886
|
], Y.prototype, "client", 2);
|
|
1883
1887
|
ge([
|
|
1884
|
-
|
|
1888
|
+
w({ type: Boolean, attribute: "show-resolved" })
|
|
1885
1889
|
], Y.prototype, "showResolved", 2);
|
|
1886
1890
|
ge([
|
|
1887
|
-
|
|
1891
|
+
k()
|
|
1888
1892
|
], Y.prototype, "threads", 2);
|
|
1889
1893
|
ge([
|
|
1890
|
-
|
|
1894
|
+
k()
|
|
1891
1895
|
], Y.prototype, "replyingTo", 2);
|
|
1892
1896
|
Y = ge([
|
|
1893
1897
|
L("pulse-comments")
|
|
1894
1898
|
], Y);
|
|
1895
|
-
var
|
|
1896
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
1899
|
+
var ki = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, Xe = (n, e, t, i) => {
|
|
1900
|
+
for (var s = i > 1 ? void 0 : i ? Ei(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
1897
1901
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1898
|
-
return i && s &&
|
|
1902
|
+
return i && s && ki(e, t, s), s;
|
|
1899
1903
|
};
|
|
1900
|
-
const
|
|
1904
|
+
const Ci = {
|
|
1901
1905
|
"comment:created": "left a comment",
|
|
1902
1906
|
"comment:mention": "mentioned you",
|
|
1903
1907
|
"comment:reply": "replied to your comment",
|
|
1904
1908
|
"thread:resolved": "resolved a thread",
|
|
1905
1909
|
"reaction:added": "reacted to your comment"
|
|
1906
|
-
},
|
|
1910
|
+
}, Ti = {
|
|
1907
1911
|
"comment:created": "💬",
|
|
1908
1912
|
"comment:mention": "📣",
|
|
1909
1913
|
"comment:reply": "↩️",
|
|
1910
1914
|
"thread:resolved": "✅",
|
|
1911
1915
|
"reaction:added": "🎉"
|
|
1912
1916
|
};
|
|
1913
|
-
let he = class extends
|
|
1917
|
+
let he = class extends _ {
|
|
1914
1918
|
constructor() {
|
|
1915
1919
|
super(...arguments), this.notifications = [];
|
|
1916
1920
|
}
|
|
@@ -1957,31 +1961,31 @@ let he = class extends P {
|
|
|
1957
1961
|
}
|
|
1958
1962
|
render() {
|
|
1959
1963
|
const n = this.notifications.filter((e) => !e.read).length;
|
|
1960
|
-
return
|
|
1964
|
+
return p`
|
|
1961
1965
|
<div class="header">
|
|
1962
1966
|
<span class="title">
|
|
1963
1967
|
Notifications
|
|
1964
|
-
${n > 0 ?
|
|
1968
|
+
${n > 0 ? p`<span class="badge">${n}</span>` : g}
|
|
1965
1969
|
</span>
|
|
1966
|
-
${n > 0 ?
|
|
1970
|
+
${n > 0 ? p`<button class="mark-all" @click=${() => this.client.markAllRead()}>
|
|
1967
1971
|
Mark all read
|
|
1968
|
-
</button>` :
|
|
1972
|
+
</button>` : g}
|
|
1969
1973
|
</div>
|
|
1970
1974
|
<div class="list">
|
|
1971
|
-
${this.notifications.length === 0 ?
|
|
1975
|
+
${this.notifications.length === 0 ? p`<div class="empty">
|
|
1972
1976
|
<div class="empty-icon">🔔</div>
|
|
1973
1977
|
No notifications yet
|
|
1974
1978
|
</div>` : this.notifications.map(
|
|
1975
|
-
(e) =>
|
|
1979
|
+
(e) => p`
|
|
1976
1980
|
<div
|
|
1977
1981
|
class="item ${e.read ? "" : "unread"}"
|
|
1978
1982
|
@click=${() => this.handleClick(e)}
|
|
1979
1983
|
>
|
|
1980
|
-
<span class="icon">${
|
|
1984
|
+
<span class="icon">${Ti[e.type] ?? "🔔"}</span>
|
|
1981
1985
|
<div class="content">
|
|
1982
1986
|
<div class="text">
|
|
1983
1987
|
<span class="actor">${this.getActorName(e.actorId)}</span>
|
|
1984
|
-
${
|
|
1988
|
+
${Ci[e.type] ?? e.type}
|
|
1985
1989
|
</div>
|
|
1986
1990
|
<div class="time">${this.formatTime(e.createdAt)}</div>
|
|
1987
1991
|
</div>
|
|
@@ -2134,23 +2138,23 @@ he.styles = O`
|
|
|
2134
2138
|
opacity: 0.4;
|
|
2135
2139
|
}
|
|
2136
2140
|
`;
|
|
2137
|
-
|
|
2141
|
+
Xe([
|
|
2138
2142
|
fe({ context: Q, subscribe: !0 }),
|
|
2139
|
-
|
|
2143
|
+
w({ attribute: !1 })
|
|
2140
2144
|
], he.prototype, "client", 2);
|
|
2141
|
-
|
|
2142
|
-
|
|
2145
|
+
Xe([
|
|
2146
|
+
k()
|
|
2143
2147
|
], he.prototype, "notifications", 2);
|
|
2144
|
-
he =
|
|
2148
|
+
he = Xe([
|
|
2145
2149
|
L("pulse-notifications")
|
|
2146
2150
|
], he);
|
|
2147
|
-
var
|
|
2148
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
2151
|
+
var Si = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, te = (n, e, t, i) => {
|
|
2152
|
+
for (var s = i > 1 ? void 0 : i ? Ai(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
2149
2153
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
2150
|
-
return i && s &&
|
|
2154
|
+
return i && s && Si(e, t, s), s;
|
|
2151
2155
|
};
|
|
2152
|
-
const
|
|
2153
|
-
let
|
|
2156
|
+
const Pi = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
|
|
2157
|
+
let B = class extends _ {
|
|
2154
2158
|
constructor() {
|
|
2155
2159
|
super(...arguments), this.targetId = "", this.targetType = "comment", this.reactions = [], this.showPicker = !1;
|
|
2156
2160
|
}
|
|
@@ -2190,9 +2194,9 @@ let N = class extends P {
|
|
|
2190
2194
|
}
|
|
2191
2195
|
render() {
|
|
2192
2196
|
const n = this.groupReactions();
|
|
2193
|
-
return
|
|
2197
|
+
return p`
|
|
2194
2198
|
${n.map(
|
|
2195
|
-
(e) =>
|
|
2199
|
+
(e) => p`
|
|
2196
2200
|
<button
|
|
2197
2201
|
class="reaction ${e.userReactionId ? "active" : ""}"
|
|
2198
2202
|
@click=${() => this.toggleReaction(e)}
|
|
@@ -2209,22 +2213,22 @@ let N = class extends P {
|
|
|
2209
2213
|
>
|
|
2210
2214
|
+
|
|
2211
2215
|
</button>
|
|
2212
|
-
${this.showPicker ?
|
|
2216
|
+
${this.showPicker ? p`
|
|
2213
2217
|
<div class="picker">
|
|
2214
|
-
${
|
|
2215
|
-
(e) =>
|
|
2218
|
+
${Pi.map(
|
|
2219
|
+
(e) => p`
|
|
2216
2220
|
<button @click=${() => this.addEmoji(e)}>
|
|
2217
2221
|
${e}
|
|
2218
2222
|
</button>
|
|
2219
2223
|
`
|
|
2220
2224
|
)}
|
|
2221
2225
|
</div>
|
|
2222
|
-
` :
|
|
2226
|
+
` : g}
|
|
2223
2227
|
</div>
|
|
2224
2228
|
`;
|
|
2225
2229
|
}
|
|
2226
2230
|
};
|
|
2227
|
-
|
|
2231
|
+
B.styles = O`
|
|
2228
2232
|
:host {
|
|
2229
2233
|
display: inline-flex;
|
|
2230
2234
|
align-items: center;
|
|
@@ -2338,24 +2342,24 @@ N.styles = O`
|
|
|
2338
2342
|
`;
|
|
2339
2343
|
te([
|
|
2340
2344
|
fe({ context: Q, subscribe: !0 }),
|
|
2341
|
-
|
|
2342
|
-
],
|
|
2345
|
+
w({ attribute: !1 })
|
|
2346
|
+
], B.prototype, "client", 2);
|
|
2343
2347
|
te([
|
|
2344
|
-
|
|
2345
|
-
],
|
|
2348
|
+
w({ attribute: "target-id" })
|
|
2349
|
+
], B.prototype, "targetId", 2);
|
|
2346
2350
|
te([
|
|
2347
|
-
|
|
2348
|
-
],
|
|
2351
|
+
w({ attribute: "target-type" })
|
|
2352
|
+
], B.prototype, "targetType", 2);
|
|
2349
2353
|
te([
|
|
2350
|
-
|
|
2351
|
-
],
|
|
2354
|
+
k()
|
|
2355
|
+
], B.prototype, "reactions", 2);
|
|
2352
2356
|
te([
|
|
2353
|
-
|
|
2354
|
-
],
|
|
2355
|
-
|
|
2357
|
+
k()
|
|
2358
|
+
], B.prototype, "showPicker", 2);
|
|
2359
|
+
B = te([
|
|
2356
2360
|
L("pulse-reactions")
|
|
2357
|
-
],
|
|
2358
|
-
const
|
|
2361
|
+
], B);
|
|
2362
|
+
const Mt = {
|
|
2359
2363
|
allowImages: !0,
|
|
2360
2364
|
allowAudio: !0,
|
|
2361
2365
|
allowVideo: !0,
|
|
@@ -2373,8 +2377,8 @@ const It = {
|
|
|
2373
2377
|
* Copyright 2017 Google LLC
|
|
2374
2378
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2375
2379
|
*/
|
|
2376
|
-
const
|
|
2377
|
-
class
|
|
2380
|
+
const _i = { CHILD: 2 }, Ii = (n) => (...e) => ({ _$litDirective$: n, values: e });
|
|
2381
|
+
class Mi {
|
|
2378
2382
|
constructor(e) {
|
|
2379
2383
|
}
|
|
2380
2384
|
get _$AU() {
|
|
@@ -2395,12 +2399,12 @@ class Ii {
|
|
|
2395
2399
|
* Copyright 2017 Google LLC
|
|
2396
2400
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2397
2401
|
*/
|
|
2398
|
-
class Le extends
|
|
2402
|
+
class Le extends Mi {
|
|
2399
2403
|
constructor(e) {
|
|
2400
|
-
if (super(e), this.it =
|
|
2404
|
+
if (super(e), this.it = g, e.type !== _i.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
2401
2405
|
}
|
|
2402
2406
|
render(e) {
|
|
2403
|
-
if (e ===
|
|
2407
|
+
if (e === g || e == null) return this._t = void 0, this.it = e;
|
|
2404
2408
|
if (e === W) return e;
|
|
2405
2409
|
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
2406
2410
|
if (e === this.it) return this._t;
|
|
@@ -2418,14 +2422,14 @@ Le.directiveName = "unsafeHTML", Le.resultType = 1;
|
|
|
2418
2422
|
class je extends Le {
|
|
2419
2423
|
}
|
|
2420
2424
|
je.directiveName = "unsafeSVG", je.resultType = 2;
|
|
2421
|
-
const
|
|
2425
|
+
const Oi = Ii(je);
|
|
2422
2426
|
/**
|
|
2423
2427
|
* @license lucide v0.577.0 - ISC
|
|
2424
2428
|
*
|
|
2425
2429
|
* This source code is licensed under the ISC license.
|
|
2426
2430
|
* See the LICENSE file in the root directory of this source tree.
|
|
2427
2431
|
*/
|
|
2428
|
-
const
|
|
2432
|
+
const Ri = [
|
|
2429
2433
|
["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }],
|
|
2430
2434
|
[
|
|
2431
2435
|
"path",
|
|
@@ -2440,7 +2444,7 @@ const Oi = [
|
|
|
2440
2444
|
* This source code is licensed under the ISC license.
|
|
2441
2445
|
* See the LICENSE file in the root directory of this source tree.
|
|
2442
2446
|
*/
|
|
2443
|
-
const
|
|
2447
|
+
const Li = [
|
|
2444
2448
|
["circle", { cx: "12", cy: "12", r: "10" }],
|
|
2445
2449
|
["path", { d: "M12 6v6l4 2" }]
|
|
2446
2450
|
];
|
|
@@ -2450,7 +2454,7 @@ const Ri = [
|
|
|
2450
2454
|
* This source code is licensed under the ISC license.
|
|
2451
2455
|
* See the LICENSE file in the root directory of this source tree.
|
|
2452
2456
|
*/
|
|
2453
|
-
const
|
|
2457
|
+
const ji = [
|
|
2454
2458
|
[
|
|
2455
2459
|
"path",
|
|
2456
2460
|
{
|
|
@@ -2464,7 +2468,7 @@ const Li = [
|
|
|
2464
2468
|
* This source code is licensed under the ISC license.
|
|
2465
2469
|
* See the LICENSE file in the root directory of this source tree.
|
|
2466
2470
|
*/
|
|
2467
|
-
const
|
|
2471
|
+
const Ui = [
|
|
2468
2472
|
["path", { d: "M12 19v3" }],
|
|
2469
2473
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }],
|
|
2470
2474
|
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3" }]
|
|
@@ -2489,7 +2493,7 @@ const zi = [
|
|
|
2489
2493
|
* This source code is licensed under the ISC license.
|
|
2490
2494
|
* See the LICENSE file in the root directory of this source tree.
|
|
2491
2495
|
*/
|
|
2492
|
-
const
|
|
2496
|
+
const Di = [
|
|
2493
2497
|
[
|
|
2494
2498
|
"path",
|
|
2495
2499
|
{
|
|
@@ -2511,7 +2515,7 @@ const Ui = [
|
|
|
2511
2515
|
* This source code is licensed under the ISC license.
|
|
2512
2516
|
* See the LICENSE file in the root directory of this source tree.
|
|
2513
2517
|
*/
|
|
2514
|
-
const
|
|
2518
|
+
const Hi = [
|
|
2515
2519
|
[
|
|
2516
2520
|
"path",
|
|
2517
2521
|
{
|
|
@@ -2526,7 +2530,7 @@ const Di = [
|
|
|
2526
2530
|
* This source code is licensed under the ISC license.
|
|
2527
2531
|
* See the LICENSE file in the root directory of this source tree.
|
|
2528
2532
|
*/
|
|
2529
|
-
const
|
|
2533
|
+
const Ot = [
|
|
2530
2534
|
["path", { d: "M12 17v5" }],
|
|
2531
2535
|
[
|
|
2532
2536
|
"path",
|
|
@@ -2541,7 +2545,7 @@ const Mt = [
|
|
|
2541
2545
|
* This source code is licensed under the ISC license.
|
|
2542
2546
|
* See the LICENSE file in the root directory of this source tree.
|
|
2543
2547
|
*/
|
|
2544
|
-
const
|
|
2548
|
+
const Bi = [
|
|
2545
2549
|
[
|
|
2546
2550
|
"path",
|
|
2547
2551
|
{
|
|
@@ -2569,7 +2573,7 @@ const Ni = [
|
|
|
2569
2573
|
* This source code is licensed under the ISC license.
|
|
2570
2574
|
* See the LICENSE file in the root directory of this source tree.
|
|
2571
2575
|
*/
|
|
2572
|
-
const
|
|
2576
|
+
const Fi = [
|
|
2573
2577
|
["path", { d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" }],
|
|
2574
2578
|
["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2" }]
|
|
2575
2579
|
];
|
|
@@ -2589,7 +2593,7 @@ const ve = [
|
|
|
2589
2593
|
* This source code is licensed under the ISC license.
|
|
2590
2594
|
* See the LICENSE file in the root directory of this source tree.
|
|
2591
2595
|
*/
|
|
2592
|
-
const
|
|
2596
|
+
const qi = [
|
|
2593
2597
|
[
|
|
2594
2598
|
"path",
|
|
2595
2599
|
{
|
|
@@ -2597,14 +2601,14 @@ const Fi = [
|
|
|
2597
2601
|
}
|
|
2598
2602
|
]
|
|
2599
2603
|
];
|
|
2600
|
-
function
|
|
2604
|
+
function Vi(n) {
|
|
2601
2605
|
return n.map(([e, t]) => {
|
|
2602
2606
|
const i = Object.entries(t).filter(([, s]) => s != null).map(([s, o]) => `${s}="${o}"`).join(" ");
|
|
2603
2607
|
return `<${e} ${i}/>`;
|
|
2604
2608
|
}).join("");
|
|
2605
2609
|
}
|
|
2606
|
-
function
|
|
2607
|
-
return
|
|
2610
|
+
function S(n, e = 18) {
|
|
2611
|
+
return oi`<svg
|
|
2608
2612
|
xmlns="http://www.w3.org/2000/svg"
|
|
2609
2613
|
width="${e}"
|
|
2610
2614
|
height="${e}"
|
|
@@ -2614,7 +2618,7 @@ function T(n, e = 18) {
|
|
|
2614
2618
|
stroke-width="2"
|
|
2615
2619
|
stroke-linecap="round"
|
|
2616
2620
|
stroke-linejoin="round"
|
|
2617
|
-
>${
|
|
2621
|
+
>${Oi(Vi(n))}</svg>`;
|
|
2618
2622
|
}
|
|
2619
2623
|
const ie = O`
|
|
2620
2624
|
* {
|
|
@@ -2715,12 +2719,12 @@ const ie = O`
|
|
|
2715
2719
|
background: transparent;
|
|
2716
2720
|
}
|
|
2717
2721
|
`;
|
|
2718
|
-
var
|
|
2719
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
2722
|
+
var Wi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, Ye = (n, e, t, i) => {
|
|
2723
|
+
for (var s = i > 1 ? void 0 : i ? Xi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
2720
2724
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
2721
|
-
return i && s &&
|
|
2725
|
+
return i && s && Wi(e, t, s), s;
|
|
2722
2726
|
};
|
|
2723
|
-
let K = class extends
|
|
2727
|
+
let K = class extends _ {
|
|
2724
2728
|
constructor() {
|
|
2725
2729
|
super(...arguments), this.items = [], this.unsubs = [], this.counter = 0;
|
|
2726
2730
|
}
|
|
@@ -2766,18 +2770,18 @@ let K = class extends P {
|
|
|
2766
2770
|
);
|
|
2767
2771
|
}
|
|
2768
2772
|
render() {
|
|
2769
|
-
return
|
|
2773
|
+
return p`
|
|
2770
2774
|
<div class="panel">
|
|
2771
2775
|
<div class="panel-header">
|
|
2772
2776
|
<span class="panel-title">Activity</span>
|
|
2773
2777
|
<button class="close-btn" @click=${this.fireClose} title="Close">
|
|
2774
|
-
${
|
|
2778
|
+
${S(ve, 16)}
|
|
2775
2779
|
</button>
|
|
2776
2780
|
</div>
|
|
2777
2781
|
|
|
2778
2782
|
<div class="panel-body pw-scrollable">
|
|
2779
|
-
${this.items.length === 0 ?
|
|
2780
|
-
(n) =>
|
|
2783
|
+
${this.items.length === 0 ? p`<div class="empty">No activity yet</div>` : this.items.map(
|
|
2784
|
+
(n) => p`
|
|
2781
2785
|
<div class="activity-item">
|
|
2782
2786
|
<div
|
|
2783
2787
|
class="activity-dot"
|
|
@@ -2785,7 +2789,7 @@ let K = class extends P {
|
|
|
2785
2789
|
></div>
|
|
2786
2790
|
<div class="activity-content">
|
|
2787
2791
|
<div class="activity-text">
|
|
2788
|
-
${n.userId ?
|
|
2792
|
+
${n.userId ? p`<span class="activity-user"
|
|
2789
2793
|
>${this.getUserName(n.userId)}</span
|
|
2790
2794
|
>
|
|
2791
2795
|
${n.description}` : n.description}
|
|
@@ -2931,21 +2935,21 @@ K.TYPE_COLORS = {
|
|
|
2931
2935
|
comment: "#3b82f6",
|
|
2932
2936
|
resolve: "#22c55e"
|
|
2933
2937
|
};
|
|
2934
|
-
|
|
2935
|
-
|
|
2938
|
+
Ye([
|
|
2939
|
+
w({ attribute: !1 })
|
|
2936
2940
|
], K.prototype, "client", 2);
|
|
2937
|
-
|
|
2938
|
-
|
|
2941
|
+
Ye([
|
|
2942
|
+
k()
|
|
2939
2943
|
], K.prototype, "items", 2);
|
|
2940
|
-
K =
|
|
2944
|
+
K = Ye([
|
|
2941
2945
|
L("pulse-widget-activity-panel")
|
|
2942
2946
|
], K);
|
|
2943
|
-
const
|
|
2944
|
-
function
|
|
2947
|
+
const Yi = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", ht = "#6366f1", pt = "#e2e8f0", Ki = "#f8fafc", Gi = "#e2e8f0", ut = "#64748b", we = 28, Ji = Array.from({ length: we }, (n, e) => 0.2 + Math.abs(Math.sin(e * 12.9898 + 78.233) * 43758.5453) % 1 * 0.8);
|
|
2948
|
+
function ft(n) {
|
|
2945
2949
|
const e = Math.max(0, Math.floor(n)), t = Math.floor(e / 60), i = e % 60;
|
|
2946
2950
|
return `${t}:${i.toString().padStart(2, "0")}`;
|
|
2947
2951
|
}
|
|
2948
|
-
class
|
|
2952
|
+
class Ue {
|
|
2949
2953
|
/**
|
|
2950
2954
|
* Create and return a fully self-contained inline audio player element.
|
|
2951
2955
|
*
|
|
@@ -2966,12 +2970,12 @@ class ze {
|
|
|
2966
2970
|
width: "220px",
|
|
2967
2971
|
height: "44px",
|
|
2968
2972
|
padding: "0 10px",
|
|
2969
|
-
background:
|
|
2973
|
+
background: Ki,
|
|
2970
2974
|
borderRadius: "12px",
|
|
2971
|
-
border: `1px solid ${
|
|
2972
|
-
fontFamily:
|
|
2975
|
+
border: `1px solid ${Gi}`,
|
|
2976
|
+
fontFamily: Yi,
|
|
2973
2977
|
fontSize: "11px",
|
|
2974
|
-
color:
|
|
2978
|
+
color: ut,
|
|
2975
2979
|
userSelect: "none",
|
|
2976
2980
|
boxSizing: "border-box"
|
|
2977
2981
|
});
|
|
@@ -2982,7 +2986,7 @@ class ze {
|
|
|
2982
2986
|
minWidth: "28px",
|
|
2983
2987
|
borderRadius: "50%",
|
|
2984
2988
|
border: "none",
|
|
2985
|
-
background:
|
|
2989
|
+
background: ht,
|
|
2986
2990
|
cursor: "pointer",
|
|
2987
2991
|
display: "flex",
|
|
2988
2992
|
alignItems: "center",
|
|
@@ -3010,8 +3014,8 @@ class ze {
|
|
|
3010
3014
|
</svg>`;
|
|
3011
3015
|
}
|
|
3012
3016
|
c(), l.appendChild(d);
|
|
3013
|
-
const
|
|
3014
|
-
Object.assign(
|
|
3017
|
+
const u = document.createElement("div");
|
|
3018
|
+
Object.assign(u.style, {
|
|
3015
3019
|
flex: "1",
|
|
3016
3020
|
display: "flex",
|
|
3017
3021
|
flexDirection: "column",
|
|
@@ -3019,50 +3023,50 @@ class ze {
|
|
|
3019
3023
|
overflow: "hidden",
|
|
3020
3024
|
minWidth: "0"
|
|
3021
3025
|
});
|
|
3022
|
-
const
|
|
3023
|
-
Object.assign(
|
|
3026
|
+
const f = document.createElement("div");
|
|
3027
|
+
Object.assign(f.style, {
|
|
3024
3028
|
display: "flex",
|
|
3025
3029
|
alignItems: "center",
|
|
3026
3030
|
gap: "1.5px",
|
|
3027
3031
|
height: "22px",
|
|
3028
3032
|
cursor: "pointer"
|
|
3029
3033
|
});
|
|
3030
|
-
const
|
|
3031
|
-
for (let
|
|
3032
|
-
const
|
|
3033
|
-
Object.assign(
|
|
3034
|
+
const b = [];
|
|
3035
|
+
for (let $ = 0; $ < we; $++) {
|
|
3036
|
+
const T = document.createElement("div"), U = Math.round(Ji[$] * 20);
|
|
3037
|
+
Object.assign(T.style, {
|
|
3034
3038
|
flex: "1",
|
|
3035
|
-
height: `${Math.max(3,
|
|
3039
|
+
height: `${Math.max(3, U)}px`,
|
|
3036
3040
|
borderRadius: "1px",
|
|
3037
|
-
background:
|
|
3041
|
+
background: pt,
|
|
3038
3042
|
transition: "background 0.1s ease",
|
|
3039
3043
|
minWidth: "0"
|
|
3040
|
-
}),
|
|
3044
|
+
}), b.push(T), f.appendChild(T);
|
|
3041
3045
|
}
|
|
3042
|
-
const
|
|
3043
|
-
Object.assign(
|
|
3046
|
+
const x = document.createElement("div");
|
|
3047
|
+
Object.assign(x.style, {
|
|
3044
3048
|
fontSize: "10px",
|
|
3045
|
-
color:
|
|
3049
|
+
color: ut,
|
|
3046
3050
|
whiteSpace: "nowrap",
|
|
3047
3051
|
lineHeight: "1"
|
|
3048
3052
|
});
|
|
3049
|
-
function
|
|
3050
|
-
const
|
|
3051
|
-
|
|
3053
|
+
function y() {
|
|
3054
|
+
const $ = ft(o), T = ft(s);
|
|
3055
|
+
x.textContent = `${$} / ${T}`;
|
|
3052
3056
|
}
|
|
3053
|
-
|
|
3054
|
-
function
|
|
3055
|
-
const
|
|
3056
|
-
for (let
|
|
3057
|
-
|
|
3057
|
+
y(), u.appendChild(f), u.appendChild(x), a.appendChild(l), a.appendChild(u);
|
|
3058
|
+
function v() {
|
|
3059
|
+
const $ = s > 0 ? o / s : 0, T = Math.floor($ * we);
|
|
3060
|
+
for (let U = 0; U < we; U++)
|
|
3061
|
+
b[U].style.background = U <= T ? ht : pt;
|
|
3058
3062
|
}
|
|
3059
|
-
return
|
|
3063
|
+
return f.addEventListener("click", ($) => {
|
|
3060
3064
|
if (s <= 0) return;
|
|
3061
|
-
const
|
|
3065
|
+
const T = f.getBoundingClientRect(), U = Math.min(
|
|
3062
3066
|
1,
|
|
3063
|
-
Math.max(0, (
|
|
3067
|
+
Math.max(0, ($.clientX - T.left) / T.width)
|
|
3064
3068
|
);
|
|
3065
|
-
r.currentTime =
|
|
3069
|
+
r.currentTime = U * s, o = r.currentTime, v(), y();
|
|
3066
3070
|
}), l.addEventListener("click", () => {
|
|
3067
3071
|
i ? r.pause() : r.play().catch(() => {
|
|
3068
3072
|
});
|
|
@@ -3071,17 +3075,17 @@ class ze {
|
|
|
3071
3075
|
}), r.addEventListener("pause", () => {
|
|
3072
3076
|
i = !1, c();
|
|
3073
3077
|
}), r.addEventListener("ended", () => {
|
|
3074
|
-
i = !1, c(), o = 0,
|
|
3078
|
+
i = !1, c(), o = 0, v(), y();
|
|
3075
3079
|
}), r.addEventListener("timeupdate", () => {
|
|
3076
|
-
o = r.currentTime,
|
|
3080
|
+
o = r.currentTime, v(), y();
|
|
3077
3081
|
}), r.addEventListener("loadedmetadata", () => {
|
|
3078
|
-
r.duration && isFinite(r.duration) && (s = r.duration,
|
|
3082
|
+
r.duration && isFinite(r.duration) && (s = r.duration, y());
|
|
3079
3083
|
}), r.addEventListener("durationchange", () => {
|
|
3080
|
-
r.duration && isFinite(r.duration) && (s = r.duration,
|
|
3084
|
+
r.duration && isFinite(r.duration) && (s = r.duration, y());
|
|
3081
3085
|
}), a;
|
|
3082
3086
|
}
|
|
3083
3087
|
}
|
|
3084
|
-
class
|
|
3088
|
+
class ze {
|
|
3085
3089
|
constructor() {
|
|
3086
3090
|
this.container = null, this.stream = null, this.recorder = null, this.analyser = null, this.audioCtx = null, this.recording = !1, this.animFrame = null, this.startTime = 0, this.maxDuration = 12e4, this.maxTimer = null, this.canvas = null, this.timerEl = null, this.resolve = null, this.animate = () => {
|
|
3087
3091
|
this.recording && (this.drawWaveform(), this.updateTimer(), this.animFrame = requestAnimationFrame(this.animate));
|
|
@@ -3212,8 +3216,8 @@ class Ue {
|
|
|
3212
3216
|
this.analyser.getByteFrequencyData(o), e.clearRect(0, 0, t, i);
|
|
3213
3217
|
const r = s, a = Math.max(2, t / r * 0.7), l = (t - a * r) / (r - 1 || 1);
|
|
3214
3218
|
for (let d = 0; d < r; d++) {
|
|
3215
|
-
const c = o[d] / 255, h = Math.max(2, c * i * 0.85),
|
|
3216
|
-
e.fillStyle = `rgba(99, 102, 241, ${
|
|
3219
|
+
const c = o[d] / 255, h = Math.max(2, c * i * 0.85), u = d * (a + l), f = (i - h) / 2, b = 0.4 + c * 0.6;
|
|
3220
|
+
e.fillStyle = `rgba(99, 102, 241, ${b})`, e.beginPath(), e.roundRect(u, f, a, h, 1), e.fill();
|
|
3217
3221
|
}
|
|
3218
3222
|
}
|
|
3219
3223
|
updateTimer() {
|
|
@@ -3231,25 +3235,25 @@ class Ue {
|
|
|
3231
3235
|
this.recorder = null, this.container && (this.container.remove(), this.container = null), this.canvas = null, this.timerEl = null;
|
|
3232
3236
|
}
|
|
3233
3237
|
}
|
|
3234
|
-
const
|
|
3238
|
+
const Zi = 180, Qi = 120, es = "#e2e8f0", ts = `
|
|
3235
3239
|
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3236
3240
|
<circle cx="14" cy="14" r="14" fill="rgba(0,0,0,0.35)"/>
|
|
3237
3241
|
<polygon points="11,8 22,14 11,20" fill="rgba(255,255,255,0.9)"/>
|
|
3238
|
-
</svg>`,
|
|
3242
|
+
</svg>`, mt = `
|
|
3239
3243
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.9)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
|
3240
3244
|
<polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
|
|
3241
3245
|
<line x1="23" y1="9" x2="17" y2="15"/>
|
|
3242
3246
|
<line x1="17" y1="9" x2="23" y2="15"/>
|
|
3243
|
-
</svg>`,
|
|
3247
|
+
</svg>`, is = `
|
|
3244
3248
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.9)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
|
3245
3249
|
<polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
|
|
3246
3250
|
<path d="M19.07 4.93a10 10 0 0 1 0 14.14"/>
|
|
3247
3251
|
<path d="M15.54 8.46a5 5 0 0 1 0 7.07"/>
|
|
3248
|
-
</svg>`,
|
|
3252
|
+
</svg>`, ss = `
|
|
3249
3253
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.9)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
|
3250
3254
|
<polyline points="15,3 21,3 21,9"/><line x1="21" y1="3" x2="14" y2="10"/>
|
|
3251
3255
|
<polyline points="9,21 3,21 3,15"/><line x1="3" y1="21" x2="10" y2="14"/>
|
|
3252
|
-
</svg>`,
|
|
3256
|
+
</svg>`, A = class A {
|
|
3253
3257
|
/**
|
|
3254
3258
|
* Renders an inline rectangular video player and returns the root container.
|
|
3255
3259
|
* @param url - Video source URL
|
|
@@ -3261,10 +3265,10 @@ const Ji = 180, Zi = 120, Qi = "#e2e8f0", es = `
|
|
|
3261
3265
|
Object.assign(o.style, {
|
|
3262
3266
|
position: "relative",
|
|
3263
3267
|
display: "inline-block",
|
|
3264
|
-
width: `${
|
|
3265
|
-
height: `${
|
|
3268
|
+
width: `${Zi}px`,
|
|
3269
|
+
height: `${Qi}px`,
|
|
3266
3270
|
borderRadius: "8px",
|
|
3267
|
-
border: `1px solid ${
|
|
3271
|
+
border: `1px solid ${es}`,
|
|
3268
3272
|
boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
|
|
3269
3273
|
overflow: "hidden",
|
|
3270
3274
|
cursor: "pointer",
|
|
@@ -3294,7 +3298,7 @@ const Ji = 180, Zi = 120, Qi = "#e2e8f0", es = `
|
|
|
3294
3298
|
transition: "opacity 0.25s ease",
|
|
3295
3299
|
opacity: "1",
|
|
3296
3300
|
pointerEvents: "none"
|
|
3297
|
-
}), a.innerHTML =
|
|
3301
|
+
}), a.innerHTML = ts, o.appendChild(a);
|
|
3298
3302
|
const l = document.createElement("div");
|
|
3299
3303
|
Object.assign(l.style, {
|
|
3300
3304
|
position: "absolute",
|
|
@@ -3309,7 +3313,7 @@ const Ji = 180, Zi = 120, Qi = "#e2e8f0", es = `
|
|
|
3309
3313
|
justifyContent: "center",
|
|
3310
3314
|
pointerEvents: "none",
|
|
3311
3315
|
transition: "opacity 0.2s ease"
|
|
3312
|
-
}), l.innerHTML =
|
|
3316
|
+
}), l.innerHTML = mt, o.appendChild(l);
|
|
3313
3317
|
const d = document.createElement("div");
|
|
3314
3318
|
Object.assign(d.style, {
|
|
3315
3319
|
position: "absolute",
|
|
@@ -3325,28 +3329,28 @@ const Ji = 180, Zi = 120, Qi = "#e2e8f0", es = `
|
|
|
3325
3329
|
cursor: "pointer",
|
|
3326
3330
|
pointerEvents: "auto",
|
|
3327
3331
|
transition: "opacity 0.2s ease, background 0.15s ease"
|
|
3328
|
-
}), d.innerHTML =
|
|
3332
|
+
}), d.innerHTML = ss, d.title = "Fullscreen", d.addEventListener("mouseenter", () => {
|
|
3329
3333
|
d.style.background = "rgba(0,0,0,0.7)";
|
|
3330
3334
|
}), d.addEventListener("mouseleave", () => {
|
|
3331
3335
|
d.style.background = "rgba(0,0,0,0.45)";
|
|
3332
|
-
}), d.addEventListener("click", (
|
|
3333
|
-
|
|
3336
|
+
}), d.addEventListener("click", (u) => {
|
|
3337
|
+
u.stopPropagation(), A.openFullscreen(e, t);
|
|
3334
3338
|
}), o.appendChild(d);
|
|
3335
3339
|
function c() {
|
|
3336
3340
|
a.style.opacity = i ? "0" : "1";
|
|
3337
3341
|
}
|
|
3338
3342
|
function h() {
|
|
3339
|
-
l.style.display = i ? "flex" : "none", l.innerHTML = s ?
|
|
3343
|
+
l.style.display = i ? "flex" : "none", l.innerHTML = s ? mt : is, d.style.display = i ? "flex" : "none";
|
|
3340
3344
|
}
|
|
3341
|
-
return o.addEventListener("click", (
|
|
3342
|
-
|
|
3345
|
+
return o.addEventListener("click", (u) => {
|
|
3346
|
+
u.stopPropagation(), i ? s ? (r.muted = !1, s = !1) : (r.pause(), i = !1, s = !0, r.muted = !0) : (r.muted = !0, s = !0, r.play().catch(() => {
|
|
3343
3347
|
}), i = !0), c(), h();
|
|
3344
3348
|
}), r.addEventListener("pause", () => {
|
|
3345
3349
|
i && (i = !1, s = !0, r.muted = !0, c(), h());
|
|
3346
3350
|
}), o;
|
|
3347
3351
|
}
|
|
3348
3352
|
static openFullscreen(e, t) {
|
|
3349
|
-
|
|
3353
|
+
A.closeFullscreen();
|
|
3350
3354
|
const i = document.createElement("div");
|
|
3351
3355
|
Object.assign(i.style, {
|
|
3352
3356
|
position: "fixed",
|
|
@@ -3388,7 +3392,7 @@ const Ji = 180, Zi = 120, Qi = "#e2e8f0", es = `
|
|
|
3388
3392
|
}), s.addEventListener("mouseleave", () => {
|
|
3389
3393
|
s.style.background = "rgba(255,255,255,0.15)";
|
|
3390
3394
|
}), s.addEventListener("click", (a) => {
|
|
3391
|
-
a.stopPropagation(),
|
|
3395
|
+
a.stopPropagation(), A.closeFullscreen();
|
|
3392
3396
|
});
|
|
3393
3397
|
const o = document.createElement("video");
|
|
3394
3398
|
Object.assign(o.style, {
|
|
@@ -3397,25 +3401,25 @@ const Ji = 180, Zi = 120, Qi = "#e2e8f0", es = `
|
|
|
3397
3401
|
borderRadius: "8px",
|
|
3398
3402
|
outline: "none",
|
|
3399
3403
|
cursor: "default"
|
|
3400
|
-
}), o.src = e, o.controls = !0, o.autoplay = !0, o.playsInline = !0, t && (o.poster = t), o.addEventListener("click", (a) => a.stopPropagation()), i.appendChild(s), i.appendChild(o), i.addEventListener("click", () =>
|
|
3404
|
+
}), o.src = e, o.controls = !0, o.autoplay = !0, o.playsInline = !0, t && (o.poster = t), o.addEventListener("click", (a) => a.stopPropagation()), i.appendChild(s), i.appendChild(o), i.addEventListener("click", () => A.closeFullscreen());
|
|
3401
3405
|
const r = (a) => {
|
|
3402
|
-
a.key === "Escape" &&
|
|
3406
|
+
a.key === "Escape" && A.closeFullscreen();
|
|
3403
3407
|
};
|
|
3404
|
-
document.addEventListener("keydown", r),
|
|
3408
|
+
document.addEventListener("keydown", r), A.fullscreenOverlay = i, A.fullscreenKeyHandler = r, document.body.appendChild(i), requestAnimationFrame(() => {
|
|
3405
3409
|
i.style.opacity = "1";
|
|
3406
3410
|
});
|
|
3407
3411
|
}
|
|
3408
3412
|
static closeFullscreen() {
|
|
3409
|
-
if (!
|
|
3410
|
-
const e =
|
|
3411
|
-
|
|
3413
|
+
if (!A.fullscreenOverlay) return;
|
|
3414
|
+
const e = A.fullscreenOverlay;
|
|
3415
|
+
A.fullscreenKeyHandler && (document.removeEventListener("keydown", A.fullscreenKeyHandler), A.fullscreenKeyHandler = null);
|
|
3412
3416
|
const t = e.querySelector("video");
|
|
3413
|
-
t && t.pause(), e.style.opacity = "0", e.addEventListener("transitionend", () => e.remove()),
|
|
3417
|
+
t && t.pause(), e.style.opacity = "0", e.addEventListener("transitionend", () => e.remove()), A.fullscreenOverlay = null;
|
|
3414
3418
|
}
|
|
3415
3419
|
};
|
|
3416
|
-
|
|
3417
|
-
let Ce =
|
|
3418
|
-
const
|
|
3420
|
+
A.fullscreenOverlay = null, A.fullscreenKeyHandler = null;
|
|
3421
|
+
let Ce = A;
|
|
3422
|
+
const gt = 60, ns = `
|
|
3419
3423
|
.vr-overlay {
|
|
3420
3424
|
display: flex;
|
|
3421
3425
|
flex-direction: column;
|
|
@@ -3522,14 +3526,14 @@ const mt = 60, ss = `
|
|
|
3522
3526
|
color: #0f172a;
|
|
3523
3527
|
}
|
|
3524
3528
|
`;
|
|
3525
|
-
function
|
|
3529
|
+
function vt(n) {
|
|
3526
3530
|
return n.toString().padStart(2, "0");
|
|
3527
3531
|
}
|
|
3528
|
-
function
|
|
3532
|
+
function os(n) {
|
|
3529
3533
|
const e = Math.floor(n / 60), t = n % 60;
|
|
3530
|
-
return `${
|
|
3534
|
+
return `${vt(e)}:${vt(t)}`;
|
|
3531
3535
|
}
|
|
3532
|
-
function
|
|
3536
|
+
function rs() {
|
|
3533
3537
|
const n = [
|
|
3534
3538
|
"video/webm;codecs=vp9,opus",
|
|
3535
3539
|
"video/webm;codecs=vp8,opus",
|
|
@@ -3540,7 +3544,7 @@ function os() {
|
|
|
3540
3544
|
if (MediaRecorder.isTypeSupported(e)) return e;
|
|
3541
3545
|
return "";
|
|
3542
3546
|
}
|
|
3543
|
-
function
|
|
3547
|
+
function as(n) {
|
|
3544
3548
|
return new Promise((e, t) => {
|
|
3545
3549
|
const i = URL.createObjectURL(n), s = document.createElement("video");
|
|
3546
3550
|
s.muted = !0, s.playsInline = !0, s.preload = "auto", s.src = i, s.addEventListener("loadeddata", () => {
|
|
@@ -3576,7 +3580,7 @@ class De {
|
|
|
3576
3580
|
}
|
|
3577
3581
|
this.stream = t, this.container = e, this.recording = !0, this.elapsed = 0, this.chunks = [], this.buildUI(e), this.videoEl && (this.videoEl.srcObject = t, this.videoEl.play().catch(() => {
|
|
3578
3582
|
}));
|
|
3579
|
-
const i =
|
|
3583
|
+
const i = rs(), s = {};
|
|
3580
3584
|
i && (s.mimeType = i);
|
|
3581
3585
|
const o = new MediaRecorder(t, s);
|
|
3582
3586
|
return this.mediaRecorder = o, o.ondataavailable = (r) => {
|
|
@@ -3584,7 +3588,7 @@ class De {
|
|
|
3584
3588
|
}, o.onstop = () => {
|
|
3585
3589
|
this.handleRecordingComplete();
|
|
3586
3590
|
}, o.start(), this.timerInterval = setInterval(() => {
|
|
3587
|
-
this.elapsed++, this.updateTimer(), this.elapsed >=
|
|
3591
|
+
this.elapsed++, this.updateTimer(), this.elapsed >= gt && this.stopRecording();
|
|
3588
3592
|
}, 1e3), new Promise((r) => {
|
|
3589
3593
|
this.resolvePromise = r;
|
|
3590
3594
|
});
|
|
@@ -3601,7 +3605,7 @@ class De {
|
|
|
3601
3605
|
}
|
|
3602
3606
|
// ── Private ──
|
|
3603
3607
|
buildUI(e) {
|
|
3604
|
-
this.styleEl = document.createElement("style"), this.styleEl.textContent =
|
|
3608
|
+
this.styleEl = document.createElement("style"), this.styleEl.textContent = ns, document.head.appendChild(this.styleEl), this.root = document.createElement("div"), this.root.className = "vr-overlay";
|
|
3605
3609
|
const t = document.createElement("div");
|
|
3606
3610
|
t.className = "vr-circle-wrapper";
|
|
3607
3611
|
const i = document.createElement("div");
|
|
@@ -3617,15 +3621,15 @@ class De {
|
|
|
3617
3621
|
}
|
|
3618
3622
|
updateTimer() {
|
|
3619
3623
|
if (!this.timerEl) return;
|
|
3620
|
-
const e =
|
|
3621
|
-
this.timerEl.textContent =
|
|
3624
|
+
const e = gt - this.elapsed;
|
|
3625
|
+
this.timerEl.textContent = os(this.elapsed), e <= 10 ? this.timerEl.classList.add("vr-countdown") : this.timerEl.classList.remove("vr-countdown");
|
|
3622
3626
|
}
|
|
3623
3627
|
async handleRecordingComplete() {
|
|
3624
3628
|
var s, o;
|
|
3625
3629
|
const e = ((s = this.mediaRecorder) == null ? void 0 : s.mimeType) || "video/webm", t = new Blob(this.chunks, { type: e });
|
|
3626
3630
|
let i;
|
|
3627
3631
|
try {
|
|
3628
|
-
i = await
|
|
3632
|
+
i = await as(t);
|
|
3629
3633
|
} catch {
|
|
3630
3634
|
const r = document.createElement("canvas");
|
|
3631
3635
|
r.width = 1, r.height = 1, i = await new Promise((a) => {
|
|
@@ -3648,7 +3652,7 @@ class De {
|
|
|
3648
3652
|
this.videoEl && (this.videoEl.srcObject = null, this.videoEl = null), this.root && this.root.parentElement && this.root.parentElement.removeChild(this.root), this.root = null, this.styleEl && this.styleEl.parentElement && this.styleEl.parentElement.removeChild(this.styleEl), this.styleEl = null, this.chunks = [], this.elapsed = 0;
|
|
3649
3653
|
}
|
|
3650
3654
|
}
|
|
3651
|
-
const
|
|
3655
|
+
const bt = {
|
|
3652
3656
|
position: "absolute",
|
|
3653
3657
|
top: "50%",
|
|
3654
3658
|
transform: "translateY(-50%)",
|
|
@@ -3666,7 +3670,7 @@ const vt = {
|
|
|
3666
3670
|
justifyContent: "center",
|
|
3667
3671
|
transition: "background 150ms ease",
|
|
3668
3672
|
zIndex: "1"
|
|
3669
|
-
},
|
|
3673
|
+
}, m = class m {
|
|
3670
3674
|
/**
|
|
3671
3675
|
* Opens a fullscreen lightbox overlay.
|
|
3672
3676
|
* @param imageUrl - Single image URL (backwards-compatible)
|
|
@@ -3674,8 +3678,8 @@ const vt = {
|
|
|
3674
3678
|
* @param startIndex - Index in allUrls to start at (default 0)
|
|
3675
3679
|
*/
|
|
3676
3680
|
static open(e, t, i) {
|
|
3677
|
-
|
|
3678
|
-
const s =
|
|
3681
|
+
m.close(), m.urls = t && t.length > 1 ? t : [e], m.currentIndex = i ?? 0;
|
|
3682
|
+
const s = m.urls.length > 1, o = document.createElement("div");
|
|
3679
3683
|
o.id = "pulse-widget-lightbox", Object.assign(o.style, {
|
|
3680
3684
|
position: "fixed",
|
|
3681
3685
|
top: "0",
|
|
@@ -3716,10 +3720,10 @@ const vt = {
|
|
|
3716
3720
|
}), r.addEventListener("mouseleave", () => {
|
|
3717
3721
|
r.style.background = "rgba(255,255,255,0.15)";
|
|
3718
3722
|
}), r.addEventListener("click", (d) => {
|
|
3719
|
-
d.stopPropagation(),
|
|
3723
|
+
d.stopPropagation(), m.close();
|
|
3720
3724
|
}), o.appendChild(r);
|
|
3721
3725
|
const a = document.createElement("img");
|
|
3722
|
-
if (a.src =
|
|
3726
|
+
if (a.src = m.urls[m.currentIndex], a.alt = "Lightbox image", Object.assign(a.style, {
|
|
3723
3727
|
maxWidth: "90vw",
|
|
3724
3728
|
maxHeight: "85vh",
|
|
3725
3729
|
borderRadius: "8px",
|
|
@@ -3727,23 +3731,23 @@ const vt = {
|
|
|
3727
3731
|
cursor: "default",
|
|
3728
3732
|
userSelect: "none",
|
|
3729
3733
|
transition: "opacity 150ms ease"
|
|
3730
|
-
}), a.addEventListener("click", (d) => d.stopPropagation()), o.appendChild(a),
|
|
3734
|
+
}), a.addEventListener("click", (d) => d.stopPropagation()), o.appendChild(a), m.imgEl = a, s) {
|
|
3731
3735
|
const d = document.createElement("button");
|
|
3732
|
-
d.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="15,18 9,12 15,6"/></svg>', Object.assign(d.style, { ...
|
|
3736
|
+
d.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="15,18 9,12 15,6"/></svg>', Object.assign(d.style, { ...bt, left: "16px" }), d.addEventListener("mouseenter", () => {
|
|
3733
3737
|
d.style.background = "rgba(255,255,255,0.3)";
|
|
3734
3738
|
}), d.addEventListener("mouseleave", () => {
|
|
3735
3739
|
d.style.background = "rgba(255,255,255,0.15)";
|
|
3736
|
-
}), d.addEventListener("click", (
|
|
3737
|
-
|
|
3738
|
-
}), o.appendChild(d),
|
|
3740
|
+
}), d.addEventListener("click", (u) => {
|
|
3741
|
+
u.stopPropagation(), m.navigate(-1);
|
|
3742
|
+
}), o.appendChild(d), m.prevBtn = d;
|
|
3739
3743
|
const c = document.createElement("button");
|
|
3740
|
-
c.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9,18 15,12 9,6"/></svg>', Object.assign(c.style, { ...
|
|
3744
|
+
c.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9,18 15,12 9,6"/></svg>', Object.assign(c.style, { ...bt, right: "16px" }), c.addEventListener("mouseenter", () => {
|
|
3741
3745
|
c.style.background = "rgba(255,255,255,0.3)";
|
|
3742
3746
|
}), c.addEventListener("mouseleave", () => {
|
|
3743
3747
|
c.style.background = "rgba(255,255,255,0.15)";
|
|
3744
|
-
}), c.addEventListener("click", (
|
|
3745
|
-
|
|
3746
|
-
}), o.appendChild(c),
|
|
3748
|
+
}), c.addEventListener("click", (u) => {
|
|
3749
|
+
u.stopPropagation(), m.navigate(1);
|
|
3750
|
+
}), o.appendChild(c), m.nextBtn = c;
|
|
3747
3751
|
const h = document.createElement("span");
|
|
3748
3752
|
Object.assign(h.style, {
|
|
3749
3753
|
position: "absolute",
|
|
@@ -3754,35 +3758,35 @@ const vt = {
|
|
|
3754
3758
|
fontSize: "13px",
|
|
3755
3759
|
fontWeight: "500",
|
|
3756
3760
|
pointerEvents: "none"
|
|
3757
|
-
}), o.appendChild(h),
|
|
3761
|
+
}), o.appendChild(h), m.counterEl = h, m.updateNav();
|
|
3758
3762
|
}
|
|
3759
|
-
o.addEventListener("click", () =>
|
|
3763
|
+
o.addEventListener("click", () => m.close());
|
|
3760
3764
|
const l = (d) => {
|
|
3761
|
-
d.key === "Escape" &&
|
|
3765
|
+
d.key === "Escape" && m.close(), s && d.key === "ArrowLeft" && m.navigate(-1), s && d.key === "ArrowRight" && m.navigate(1);
|
|
3762
3766
|
};
|
|
3763
|
-
document.addEventListener("keydown", l),
|
|
3767
|
+
document.addEventListener("keydown", l), m.overlay = o, m.onKeyDown = l, document.body.appendChild(o), requestAnimationFrame(() => {
|
|
3764
3768
|
o.style.opacity = "1";
|
|
3765
3769
|
});
|
|
3766
3770
|
}
|
|
3767
3771
|
static navigate(e) {
|
|
3768
|
-
const t =
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
}, 100)),
|
|
3772
|
+
const t = m.urls.length;
|
|
3773
|
+
m.currentIndex = (m.currentIndex + e + t) % t, m.imgEl && (m.imgEl.style.opacity = "0", setTimeout(() => {
|
|
3774
|
+
m.imgEl && (m.imgEl.src = m.urls[m.currentIndex], m.imgEl.style.opacity = "1");
|
|
3775
|
+
}, 100)), m.updateNav();
|
|
3772
3776
|
}
|
|
3773
3777
|
static updateNav() {
|
|
3774
|
-
const e =
|
|
3775
|
-
|
|
3778
|
+
const e = m.currentIndex, t = m.urls.length;
|
|
3779
|
+
m.counterEl && (m.counterEl.textContent = `${e + 1} / ${t}`);
|
|
3776
3780
|
}
|
|
3777
3781
|
/** Closes the lightbox if open. */
|
|
3778
3782
|
static close() {
|
|
3779
|
-
if (!
|
|
3780
|
-
const e =
|
|
3781
|
-
|
|
3783
|
+
if (!m.overlay) return;
|
|
3784
|
+
const e = m.overlay;
|
|
3785
|
+
m.onKeyDown && (document.removeEventListener("keydown", m.onKeyDown), m.onKeyDown = null), e.style.opacity = "0", e.addEventListener("transitionend", () => e.remove()), m.overlay = null, m.imgEl = null, m.prevBtn = null, m.nextBtn = null, m.counterEl = null, m.urls = [], m.currentIndex = 0;
|
|
3782
3786
|
}
|
|
3783
3787
|
};
|
|
3784
|
-
|
|
3785
|
-
let Te =
|
|
3788
|
+
m.overlay = null, m.onKeyDown = null, m.urls = [], m.currentIndex = 0, m.imgEl = null, m.prevBtn = null, m.nextBtn = null, m.counterEl = null;
|
|
3789
|
+
let Te = m;
|
|
3786
3790
|
class re {
|
|
3787
3791
|
constructor(e) {
|
|
3788
3792
|
this.uploading = !1, this.client = e, this.input = document.createElement("input"), this.input.type = "file", this.input.style.display = "none", document.body.appendChild(this.input);
|
|
@@ -3877,7 +3881,105 @@ class re {
|
|
|
3877
3881
|
this.input.remove();
|
|
3878
3882
|
}
|
|
3879
3883
|
}
|
|
3880
|
-
const
|
|
3884
|
+
const ls = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif";
|
|
3885
|
+
class He {
|
|
3886
|
+
constructor(e) {
|
|
3887
|
+
this.dropdown = null, this.target = null, this.mentionStart = -1, this.selectedIndex = 0, this.filteredUsers = [], this.handleInput = () => {
|
|
3888
|
+
var l;
|
|
3889
|
+
if (!this.target) return;
|
|
3890
|
+
const t = this.target.value, i = this.target.selectionStart ?? t.length, s = t.slice(0, i), o = s.lastIndexOf("@");
|
|
3891
|
+
if (o === -1 || o > 0 && /\w/.test(s[o - 1])) {
|
|
3892
|
+
this.close();
|
|
3893
|
+
return;
|
|
3894
|
+
}
|
|
3895
|
+
const r = s.slice(o + 1).toLowerCase();
|
|
3896
|
+
if (r.includes(" ")) {
|
|
3897
|
+
this.close();
|
|
3898
|
+
return;
|
|
3899
|
+
}
|
|
3900
|
+
this.mentionStart = o;
|
|
3901
|
+
const a = (l = this.client.state.user) == null ? void 0 : l.id;
|
|
3902
|
+
if (this.filteredUsers = this.client.state.users.filter((d) => d.id !== a && d.name.toLowerCase().includes(r)).slice(0, 5), this.filteredUsers.length === 0) {
|
|
3903
|
+
this.close();
|
|
3904
|
+
return;
|
|
3905
|
+
}
|
|
3906
|
+
this.selectedIndex = 0, this.showDropdown();
|
|
3907
|
+
}, this.handleKeydown = (t) => {
|
|
3908
|
+
this.dropdown && (t.key === "ArrowDown" ? (t.preventDefault(), this.selectedIndex = Math.min(this.selectedIndex + 1, this.filteredUsers.length - 1), this.renderItems()) : t.key === "ArrowUp" ? (t.preventDefault(), this.selectedIndex = Math.max(this.selectedIndex - 1, 0), this.renderItems()) : t.key === "Enter" && this.dropdown ? (t.preventDefault(), t.stopPropagation(), this.selectUser(this.filteredUsers[this.selectedIndex])) : t.key === "Escape" && this.close());
|
|
3909
|
+
}, this.handleBlur = () => {
|
|
3910
|
+
setTimeout(() => this.close(), 150);
|
|
3911
|
+
}, this.client = e;
|
|
3912
|
+
}
|
|
3913
|
+
/** Attach the mention picker to a text input or textarea. */
|
|
3914
|
+
attach(e) {
|
|
3915
|
+
this.target = e, e.addEventListener("input", this.handleInput), e.addEventListener("keydown", this.handleKeydown), e.addEventListener("blur", this.handleBlur);
|
|
3916
|
+
}
|
|
3917
|
+
/** Detach and clean up. */
|
|
3918
|
+
detach() {
|
|
3919
|
+
this.target && (this.target.removeEventListener("input", this.handleInput), this.target.removeEventListener("keydown", this.handleKeydown), this.target.removeEventListener("blur", this.handleBlur), this.target = null), this.close();
|
|
3920
|
+
}
|
|
3921
|
+
selectUser(e) {
|
|
3922
|
+
if (!this.target) return;
|
|
3923
|
+
const t = this.target.value, i = this.target.selectionStart ?? t.length, s = e.name.split(" ")[0], o = t.slice(0, this.mentionStart), r = t.slice(i);
|
|
3924
|
+
this.target.value = `${o}@${s} ${r}`;
|
|
3925
|
+
const a = this.mentionStart + s.length + 2;
|
|
3926
|
+
this.target.setSelectionRange(a, a), this.target.focus(), this.target.dispatchEvent(new Event("input", { bubbles: !0 })), this.close();
|
|
3927
|
+
}
|
|
3928
|
+
showDropdown() {
|
|
3929
|
+
if (!this.target) return;
|
|
3930
|
+
this.dropdown || (this.dropdown = document.createElement("div"), Object.assign(this.dropdown.style, {
|
|
3931
|
+
position: "absolute",
|
|
3932
|
+
zIndex: "100002",
|
|
3933
|
+
background: "#fff",
|
|
3934
|
+
border: "1px solid #e2e8f0",
|
|
3935
|
+
borderRadius: "8px",
|
|
3936
|
+
boxShadow: "0 4px 16px rgba(0,0,0,0.12)",
|
|
3937
|
+
overflow: "hidden",
|
|
3938
|
+
fontFamily: ls,
|
|
3939
|
+
minWidth: "160px",
|
|
3940
|
+
maxWidth: "220px"
|
|
3941
|
+
}), document.body.appendChild(this.dropdown));
|
|
3942
|
+
const e = this.target.getBoundingClientRect();
|
|
3943
|
+
this.dropdown.style.left = `${e.left}px`, this.dropdown.style.top = `${e.bottom + 4}px`, this.renderItems();
|
|
3944
|
+
}
|
|
3945
|
+
renderItems() {
|
|
3946
|
+
this.dropdown && (this.dropdown.innerHTML = this.filteredUsers.map((e, t) => {
|
|
3947
|
+
const i = e.name.split(" ").map((o) => o[0]).join("").toUpperCase().slice(0, 2), s = t === this.selectedIndex;
|
|
3948
|
+
return `
|
|
3949
|
+
<div class="mention-item" data-index="${t}" style="
|
|
3950
|
+
display:flex;align-items:center;gap:8px;padding:6px 10px;
|
|
3951
|
+
cursor:pointer;font-size:13px;
|
|
3952
|
+
background:${s ? "#f1f5f9" : "#fff"};
|
|
3953
|
+
transition:background 0.1s;
|
|
3954
|
+
">
|
|
3955
|
+
<div style="
|
|
3956
|
+
width:24px;height:24px;border-radius:50%;
|
|
3957
|
+
background:${e.color};color:#fff;
|
|
3958
|
+
display:flex;align-items:center;justify-content:center;
|
|
3959
|
+
font-size:10px;font-weight:700;flex-shrink:0;
|
|
3960
|
+
">${e.avatar ? `<img src="${e.avatar}" style="width:100%;height:100%;border-radius:50%;object-fit:cover;" />` : i}</div>
|
|
3961
|
+
<span style="color:#0f172a;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">${this.escapeHtml(e.name)}</span>
|
|
3962
|
+
</div>
|
|
3963
|
+
`;
|
|
3964
|
+
}).join(""), this.dropdown.querySelectorAll(".mention-item").forEach((e) => {
|
|
3965
|
+
e.addEventListener("mousedown", (t) => {
|
|
3966
|
+
t.preventDefault();
|
|
3967
|
+
const i = parseInt(e.dataset.index, 10);
|
|
3968
|
+
this.selectUser(this.filteredUsers[i]);
|
|
3969
|
+
}), e.addEventListener("mouseenter", () => {
|
|
3970
|
+
this.selectedIndex = parseInt(e.dataset.index, 10), this.renderItems();
|
|
3971
|
+
});
|
|
3972
|
+
}));
|
|
3973
|
+
}
|
|
3974
|
+
close() {
|
|
3975
|
+
var e;
|
|
3976
|
+
(e = this.dropdown) == null || e.remove(), this.dropdown = null, this.mentionStart = -1, this.filteredUsers = [];
|
|
3977
|
+
}
|
|
3978
|
+
escapeHtml(e) {
|
|
3979
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3980
|
+
}
|
|
3981
|
+
}
|
|
3982
|
+
const cs = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", ds = '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>', hs = '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>', xt = `<button class="pulse-close-btn" style="
|
|
3881
3983
|
border:none;background:none;cursor:pointer;color:#94a3b8;padding:4px;
|
|
3882
3984
|
border-radius:6px;display:flex;align-items:center;justify-content:center;
|
|
3883
3985
|
transition:all 0.15s;flex-shrink:0;
|
|
@@ -3885,7 +3987,7 @@ const as = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-syst
|
|
|
3885
3987
|
onmouseout="this.style.background='none';this.style.color='#94a3b8'">
|
|
3886
3988
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
3887
3989
|
</button>`;
|
|
3888
|
-
class
|
|
3990
|
+
class ps {
|
|
3889
3991
|
constructor(e, t = {}) {
|
|
3890
3992
|
this.container = null, this.overlay = null, this.form = null, this.popover = null, this.threads = [], this.pinEls = /* @__PURE__ */ new Map(), this._pinModeActive = !1, this.editingPopoverCommentId = null, this.popoverPickerOpen = null, this.lastTypingSendPins = /* @__PURE__ */ new Map(), this.repositionDebounce = null, this.mutationObserver = null, this.upload = null, this.audioRecorder = null, this.videoRecorder = null, this.pendingAttachmentIds = [], this.handleReposition = () => {
|
|
3891
3993
|
this.repositionDebounce || (this.repositionDebounce = setTimeout(() => {
|
|
@@ -4025,7 +4127,7 @@ class ds {
|
|
|
4025
4127
|
}), this.form.innerHTML = `
|
|
4026
4128
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;">
|
|
4027
4129
|
<span style="font-size:13px;font-weight:600;color:#0f172a;">Add a comment here</span>
|
|
4028
|
-
${
|
|
4130
|
+
${xt}
|
|
4029
4131
|
</div>
|
|
4030
4132
|
<textarea
|
|
4031
4133
|
placeholder="Write a comment..."
|
|
@@ -4057,13 +4159,15 @@ class ds {
|
|
|
4057
4159
|
</div>
|
|
4058
4160
|
<div class="pin-attachments-preview" style="margin-top:6px;display:flex;flex-wrap:wrap;gap:6px;"></div>
|
|
4059
4161
|
`;
|
|
4060
|
-
const l = this.form.querySelector("textarea"), d = this.form.querySelector(".pulse-close-btn"), c = this.form.querySelector(".pin-submit");
|
|
4061
|
-
d.addEventListener("click", () =>
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
const
|
|
4066
|
-
|
|
4162
|
+
const l = this.form.querySelector("textarea"), d = this.form.querySelector(".pulse-close-btn"), c = this.form.querySelector(".pin-submit"), h = new He(this.client);
|
|
4163
|
+
h.attach(l), d.addEventListener("click", () => {
|
|
4164
|
+
h.detach(), this.exitPinMode();
|
|
4165
|
+
}), this.pendingAttachmentIds = [], this.upload || (this.upload = new re(this.client));
|
|
4166
|
+
const u = this.form.querySelector(".pin-attachments-preview"), f = (x, y) => {
|
|
4167
|
+
const v = document.createElement("div");
|
|
4168
|
+
Object.assign(v.style, { position: "relative", display: "inline-block" }), v.appendChild(y);
|
|
4169
|
+
const $ = document.createElement("button");
|
|
4170
|
+
$.innerHTML = "×", Object.assign($.style, {
|
|
4067
4171
|
position: "absolute",
|
|
4068
4172
|
top: "-4px",
|
|
4069
4173
|
right: "-4px",
|
|
@@ -4081,51 +4185,51 @@ class ds {
|
|
|
4081
4185
|
justifyContent: "center",
|
|
4082
4186
|
padding: "0",
|
|
4083
4187
|
fontWeight: "700"
|
|
4084
|
-
}),
|
|
4085
|
-
const
|
|
4086
|
-
|
|
4087
|
-
}),
|
|
4088
|
-
},
|
|
4188
|
+
}), $.addEventListener("click", () => {
|
|
4189
|
+
const T = this.pendingAttachmentIds.indexOf(x);
|
|
4190
|
+
T !== -1 && this.pendingAttachmentIds.splice(T, 1), v.remove();
|
|
4191
|
+
}), v.appendChild($), u.appendChild(v);
|
|
4192
|
+
}, b = 5;
|
|
4089
4193
|
this.form.querySelector(".attach-img").addEventListener("click", async () => {
|
|
4090
|
-
const
|
|
4091
|
-
if (
|
|
4092
|
-
const y = await this.upload.pickFiles("image/*",
|
|
4093
|
-
for (const
|
|
4094
|
-
this.pendingAttachmentIds.push(
|
|
4095
|
-
const
|
|
4096
|
-
|
|
4194
|
+
const x = b - this.pendingAttachmentIds.length;
|
|
4195
|
+
if (x <= 0) return;
|
|
4196
|
+
const y = await this.upload.pickFiles("image/*", x);
|
|
4197
|
+
for (const v of y) {
|
|
4198
|
+
this.pendingAttachmentIds.push(v.id);
|
|
4199
|
+
const $ = document.createElement("img");
|
|
4200
|
+
$.src = v.thumbnailUrl || v.url, Object.assign($.style, { width: "48px", height: "48px", borderRadius: "6px", objectFit: "cover", border: "1px solid #e2e8f0", display: "block" }), f(v.id, $);
|
|
4097
4201
|
}
|
|
4098
4202
|
}), this.form.querySelector(".attach-mic").addEventListener("click", async () => {
|
|
4099
|
-
if (this.pendingAttachmentIds.length >=
|
|
4100
|
-
this.audioRecorder || (this.audioRecorder = new
|
|
4101
|
-
const
|
|
4102
|
-
if (
|
|
4103
|
-
const y = await this.upload.uploadBlob(
|
|
4203
|
+
if (this.pendingAttachmentIds.length >= b) return;
|
|
4204
|
+
this.audioRecorder || (this.audioRecorder = new ze());
|
|
4205
|
+
const x = await this.audioRecorder.startRecording(u);
|
|
4206
|
+
if (x) {
|
|
4207
|
+
const y = await this.upload.uploadBlob(x, "audio.webm");
|
|
4104
4208
|
if (y) {
|
|
4105
4209
|
this.pendingAttachmentIds.push(y.id);
|
|
4106
|
-
const
|
|
4107
|
-
Object.assign(
|
|
4210
|
+
const v = document.createElement("span");
|
|
4211
|
+
Object.assign(v.style, { display: "flex", alignItems: "center", padding: "4px 10px", borderRadius: "6px", background: "#f1f5f9", fontSize: "11px", color: "#64748b", height: "48px", boxSizing: "border-box" }), v.textContent = "🎤 Audio", f(y.id, v);
|
|
4108
4212
|
}
|
|
4109
4213
|
}
|
|
4110
4214
|
}), this.form.querySelector(".attach-video").addEventListener("click", async () => {
|
|
4111
|
-
if (this.pendingAttachmentIds.length >=
|
|
4215
|
+
if (this.pendingAttachmentIds.length >= b) return;
|
|
4112
4216
|
this.videoRecorder || (this.videoRecorder = new De());
|
|
4113
|
-
const
|
|
4114
|
-
if (
|
|
4115
|
-
const y = await this.upload.uploadBlob(
|
|
4217
|
+
const x = await this.videoRecorder.startRecording(u);
|
|
4218
|
+
if (x) {
|
|
4219
|
+
const y = await this.upload.uploadBlob(x.blob, "video.webm");
|
|
4116
4220
|
if (y) {
|
|
4117
4221
|
this.pendingAttachmentIds.push(y.id);
|
|
4118
|
-
const
|
|
4119
|
-
Object.assign(
|
|
4222
|
+
const v = document.createElement("span");
|
|
4223
|
+
Object.assign(v.style, { display: "flex", alignItems: "center", padding: "4px 10px", borderRadius: "6px", background: "#f1f5f9", fontSize: "11px", color: "#64748b", height: "48px", boxSizing: "border-box" }), v.textContent = "🎥 Video", f(y.id, v);
|
|
4120
4224
|
}
|
|
4121
4225
|
}
|
|
4122
4226
|
}), c.addEventListener("click", () => {
|
|
4123
|
-
const
|
|
4124
|
-
if (!
|
|
4125
|
-
const y = [...(
|
|
4126
|
-
this.client.createThread(
|
|
4127
|
-
}), l.addEventListener("keydown", (
|
|
4128
|
-
|
|
4227
|
+
const x = l.value.trim();
|
|
4228
|
+
if (!x && this.pendingAttachmentIds.length === 0) return;
|
|
4229
|
+
const y = [...(x || "").matchAll(/@(\w+)/g)].map((v) => v[1]);
|
|
4230
|
+
this.client.createThread(x, { position: i, mentions: y, attachmentIds: this.pendingAttachmentIds.length > 0 ? [...this.pendingAttachmentIds] : void 0 }), this.pendingAttachmentIds = [], this.exitPinMode();
|
|
4231
|
+
}), l.addEventListener("keydown", (x) => {
|
|
4232
|
+
x.key === "Escape" && this.exitPinMode(), x.stopPropagation();
|
|
4129
4233
|
}), document.body.appendChild(this.form), requestAnimationFrame(() => l.focus());
|
|
4130
4234
|
}
|
|
4131
4235
|
// ── Inline thread popover (shown when a pin dot is clicked) ──
|
|
@@ -4161,7 +4265,7 @@ class ds {
|
|
|
4161
4265
|
flexShrink: "0"
|
|
4162
4266
|
}), l.innerHTML = `
|
|
4163
4267
|
<span style="font-size:13px;font-weight:700;color:#0f172a;">Thread</span>
|
|
4164
|
-
${
|
|
4268
|
+
${xt}
|
|
4165
4269
|
`, l.querySelector(".pulse-close-btn").addEventListener("click", () => {
|
|
4166
4270
|
this.closePopover();
|
|
4167
4271
|
}), this.popover.appendChild(l), this.refreshPopoverComments(e), this.addPopoverReplyForm(e), document.body.appendChild(this.popover);
|
|
@@ -4189,13 +4293,13 @@ class ds {
|
|
|
4189
4293
|
}
|
|
4190
4294
|
const i = (d = this.client.state.user) == null ? void 0 : d.id;
|
|
4191
4295
|
t.innerHTML = e.comments.map((c) => {
|
|
4192
|
-
const h = this.client.state.getUser(c.userId),
|
|
4296
|
+
const h = this.client.state.getUser(c.userId), u = h ? h.name.split(" ").map((R) => R[0]).join("").toUpperCase().slice(0, 2) : "?", f = (h == null ? void 0 : h.color) ?? "#94a3b8", b = this.escapeHtml((h == null ? void 0 : h.name) ?? "Unknown"), x = this.formatTime(c.createdAt), y = i === c.userId, v = c.editedAt ? '<span style="font-size:10px;color:#94a3b8;font-style:italic;">(edited)</span>' : "";
|
|
4193
4297
|
if (this.editingPopoverCommentId === c.id)
|
|
4194
4298
|
return `
|
|
4195
4299
|
<div style="margin-bottom:10px;" data-comment-id="${c.id}">
|
|
4196
4300
|
<div style="display:flex;align-items:center;gap:7px;margin-bottom:4px;">
|
|
4197
|
-
<div style="width:22px;height:22px;border-radius:50%;background:${
|
|
4198
|
-
<span style="font-size:12px;font-weight:600;color:#0f172a;">${
|
|
4301
|
+
<div style="width:22px;height:22px;border-radius:50%;background:${f};color:#fff;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;flex-shrink:0;">${u}</div>
|
|
4302
|
+
<span style="font-size:12px;font-weight:600;color:#0f172a;">${b}</span>
|
|
4199
4303
|
</div>
|
|
4200
4304
|
<div style="margin-left:29px;">
|
|
4201
4305
|
<textarea class="edit-textarea" style="width:100%;padding:6px 10px;border:1.5px solid #e2e8f0;border-radius:6px;font-size:12px;font-family:inherit;outline:none;resize:vertical;min-height:48px;color:#0f172a;box-sizing:border-box;">${this.escapeHtml(c.body)}</textarea>
|
|
@@ -4206,37 +4310,37 @@ class ds {
|
|
|
4206
4310
|
</div>
|
|
4207
4311
|
</div>
|
|
4208
4312
|
`;
|
|
4209
|
-
const
|
|
4313
|
+
const $ = c.body && c.body !== "(attachment)" ? c.body.replace(
|
|
4210
4314
|
/@(\w+)/g,
|
|
4211
4315
|
'<span style="color:#6366f1;font-weight:600;background:#eef2ff;padding:0 3px;border-radius:3px;">@$1</span>'
|
|
4212
|
-
) : "",
|
|
4316
|
+
) : "", T = (c.attachments ?? []).map((R) => {
|
|
4213
4317
|
if (R.type === "image") {
|
|
4214
|
-
const
|
|
4318
|
+
const jt = R.thumbnailUrl || R.url;
|
|
4215
4319
|
return `<div class="popover-attachment-img" data-full-url="${this.escapeHtml(R.url)}" style="margin:4px 0 4px 29px;cursor:pointer;">
|
|
4216
|
-
<img src="${this.escapeHtml(
|
|
4320
|
+
<img src="${this.escapeHtml(jt)}" alt="${this.escapeHtml(R.filename)}" style="max-width:180px;max-height:120px;border-radius:8px;border:1px solid #e2e8f0;display:block;" />
|
|
4217
4321
|
</div>`;
|
|
4218
4322
|
}
|
|
4219
4323
|
return R.type === "audio" ? `<div class="popover-attachment-audio" data-url="${this.escapeHtml(R.url)}" data-duration="${R.durationMs ?? ""}" style="margin:4px 0 4px 29px;"></div>` : R.type === "video" ? `<div class="popover-attachment-video" data-url="${this.escapeHtml(R.url)}" data-poster="${this.escapeHtml(R.thumbnailUrl ?? "")}" style="margin:4px 0 4px 29px;"></div>` : "";
|
|
4220
|
-
}).join(""),
|
|
4324
|
+
}).join(""), U = y ? `<div class="popover-comment-actions" style="display:flex;gap:2px;margin-top:2px;margin-left:29px;">
|
|
4221
4325
|
<button class="edit-btn" data-comment-id="${c.id}" style="border:none;background:none;cursor:pointer;color:#94a3b8;padding:3px;border-radius:4px;display:flex;align-items:center;transition:all 0.15s;" title="Edit"
|
|
4222
4326
|
onmouseover="this.style.color='#6366f1';this.style.background='#eef2ff'"
|
|
4223
|
-
onmouseout="this.style.color='#94a3b8';this.style.background='none'">${
|
|
4327
|
+
onmouseout="this.style.color='#94a3b8';this.style.background='none'">${ds}</button>
|
|
4224
4328
|
<button class="delete-btn" data-comment-id="${c.id}" style="border:none;background:none;cursor:pointer;color:#94a3b8;padding:3px;border-radius:4px;display:flex;align-items:center;transition:all 0.15s;" title="Delete"
|
|
4225
4329
|
onmouseover="this.style.color='#ef4444';this.style.background='#fef2f2'"
|
|
4226
|
-
onmouseout="this.style.color='#94a3b8';this.style.background='none'">${
|
|
4227
|
-
</div>` : "",
|
|
4330
|
+
onmouseout="this.style.color='#94a3b8';this.style.background='none'">${hs}</button>
|
|
4331
|
+
</div>` : "", Lt = this.buildReactionPillsHtml(c.id);
|
|
4228
4332
|
return `
|
|
4229
4333
|
<div class="popover-comment" style="margin-bottom:10px;" data-comment-id="${c.id}">
|
|
4230
4334
|
<div style="display:flex;align-items:center;gap:7px;margin-bottom:2px;">
|
|
4231
|
-
<div style="width:22px;height:22px;border-radius:50%;background:${
|
|
4232
|
-
<span style="font-size:12px;font-weight:600;color:#0f172a;">${
|
|
4233
|
-
<span style="font-size:10px;color:#94a3b8;">${
|
|
4234
|
-
${
|
|
4335
|
+
<div style="width:22px;height:22px;border-radius:50%;background:${f};color:#fff;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;flex-shrink:0;">${u}</div>
|
|
4336
|
+
<span style="font-size:12px;font-weight:600;color:#0f172a;">${b}</span>
|
|
4337
|
+
<span style="font-size:10px;color:#94a3b8;">${x}</span>
|
|
4338
|
+
${v}
|
|
4235
4339
|
</div>
|
|
4236
|
-
${
|
|
4237
|
-
${
|
|
4238
|
-
${
|
|
4239
|
-
${
|
|
4340
|
+
${$ ? `<div style="font-size:13px;color:#334155;line-height:1.45;margin-left:29px;word-wrap:break-word;">${$}</div>` : ""}
|
|
4341
|
+
${T}
|
|
4342
|
+
${U}
|
|
4343
|
+
${Lt}
|
|
4240
4344
|
</div>
|
|
4241
4345
|
`;
|
|
4242
4346
|
}).join(""), t.querySelectorAll(".edit-btn").forEach((c) => {
|
|
@@ -4254,7 +4358,7 @@ class ds {
|
|
|
4254
4358
|
s && r && s.addEventListener("click", () => {
|
|
4255
4359
|
const c = r.value.trim();
|
|
4256
4360
|
if (!c) return;
|
|
4257
|
-
const h = [...c.matchAll(/@(\w+)/g)].map((
|
|
4361
|
+
const h = [...c.matchAll(/@(\w+)/g)].map((u) => u[1]);
|
|
4258
4362
|
this.client.editComment(
|
|
4259
4363
|
this.editingPopoverCommentId,
|
|
4260
4364
|
c,
|
|
@@ -4265,33 +4369,33 @@ class ds {
|
|
|
4265
4369
|
}), t.querySelectorAll("[data-reaction-emoji]").forEach((c) => {
|
|
4266
4370
|
c.addEventListener("click", (h) => {
|
|
4267
4371
|
h.stopPropagation();
|
|
4268
|
-
const
|
|
4269
|
-
|
|
4372
|
+
const u = c.dataset.reactionEmoji, f = c.dataset.reactionTarget, b = c.dataset.reactionId;
|
|
4373
|
+
b ? this.client.removeReaction(b) : this.client.addReaction(f, "comment", u);
|
|
4270
4374
|
});
|
|
4271
4375
|
}), t.querySelectorAll(".popover-reaction-add").forEach((c) => {
|
|
4272
4376
|
c.addEventListener("click", (h) => {
|
|
4273
4377
|
h.stopPropagation();
|
|
4274
|
-
const
|
|
4275
|
-
this.popoverPickerOpen ===
|
|
4378
|
+
const u = c.dataset.commentId;
|
|
4379
|
+
this.popoverPickerOpen === u ? (this.popoverPickerOpen = null, this.removePickerEl()) : (this.popoverPickerOpen = u, this.showPickerForButton(c, u));
|
|
4276
4380
|
});
|
|
4277
4381
|
});
|
|
4278
4382
|
const a = t.querySelectorAll(".popover-attachment-img"), l = Array.from(a).map((c) => c.dataset.fullUrl).filter(Boolean);
|
|
4279
4383
|
a.forEach((c, h) => {
|
|
4280
4384
|
c.addEventListener("click", () => {
|
|
4281
|
-
const
|
|
4282
|
-
|
|
4385
|
+
const u = c.dataset.fullUrl;
|
|
4386
|
+
u && Te.open(u, l, h);
|
|
4283
4387
|
});
|
|
4284
4388
|
}), t.querySelectorAll(".popover-attachment-audio").forEach((c) => {
|
|
4285
4389
|
const h = c.dataset.url;
|
|
4286
4390
|
if (h) {
|
|
4287
|
-
const
|
|
4288
|
-
c.appendChild(
|
|
4391
|
+
const u = c.dataset.duration ? parseInt(c.dataset.duration) : void 0, f = Ue.render(h, u);
|
|
4392
|
+
c.appendChild(f);
|
|
4289
4393
|
}
|
|
4290
4394
|
}), t.querySelectorAll(".popover-attachment-video").forEach((c) => {
|
|
4291
4395
|
const h = c.dataset.url;
|
|
4292
4396
|
if (h) {
|
|
4293
|
-
const
|
|
4294
|
-
c.appendChild(
|
|
4397
|
+
const u = c.dataset.poster || void 0, f = Ce.render(h, u);
|
|
4398
|
+
c.appendChild(f);
|
|
4295
4399
|
}
|
|
4296
4400
|
}), t.scrollTop = t.scrollHeight;
|
|
4297
4401
|
}
|
|
@@ -4324,9 +4428,11 @@ class ds {
|
|
|
4324
4428
|
`;
|
|
4325
4429
|
const o = t.querySelector("input"), r = t.querySelector(".reply-send"), a = t.querySelector(".reply-attachments-preview");
|
|
4326
4430
|
this.upload || (this.upload = new re(this.client));
|
|
4327
|
-
const l = []
|
|
4328
|
-
|
|
4329
|
-
|
|
4431
|
+
const l = [];
|
|
4432
|
+
new He(this.client).attach(o);
|
|
4433
|
+
const c = (f, b) => {
|
|
4434
|
+
const x = document.createElement("span");
|
|
4435
|
+
Object.assign(x.style, { position: "relative", display: "inline-flex", alignItems: "center", padding: "2px 18px 2px 8px", borderRadius: "4px", background: "#f1f5f9", fontSize: "10px", color: "#64748b" }), x.textContent = b;
|
|
4330
4436
|
const y = document.createElement("button");
|
|
4331
4437
|
y.innerHTML = "×", Object.assign(y.style, {
|
|
4332
4438
|
position: "absolute",
|
|
@@ -4347,44 +4453,44 @@ class ds {
|
|
|
4347
4453
|
padding: "0",
|
|
4348
4454
|
fontWeight: "700"
|
|
4349
4455
|
}), y.addEventListener("click", () => {
|
|
4350
|
-
const
|
|
4351
|
-
|
|
4352
|
-
}),
|
|
4353
|
-
},
|
|
4456
|
+
const v = l.indexOf(f);
|
|
4457
|
+
v !== -1 && l.splice(v, 1), x.remove();
|
|
4458
|
+
}), x.appendChild(y), a.appendChild(x);
|
|
4459
|
+
}, h = 5;
|
|
4354
4460
|
t.querySelector(".reply-attach-img").addEventListener("click", async () => {
|
|
4355
|
-
const
|
|
4356
|
-
if (
|
|
4357
|
-
const
|
|
4358
|
-
for (const
|
|
4359
|
-
l.push(
|
|
4461
|
+
const f = h - l.length;
|
|
4462
|
+
if (f <= 0) return;
|
|
4463
|
+
const b = await this.upload.pickFiles("image/*", f);
|
|
4464
|
+
for (const x of b)
|
|
4465
|
+
l.push(x.id), c(x.id, "📎 Image");
|
|
4360
4466
|
}), t.querySelector(".reply-attach-mic").addEventListener("click", async () => {
|
|
4361
|
-
if (l.length >=
|
|
4362
|
-
this.audioRecorder || (this.audioRecorder = new
|
|
4363
|
-
const
|
|
4364
|
-
if (
|
|
4365
|
-
const
|
|
4366
|
-
|
|
4467
|
+
if (l.length >= h) return;
|
|
4468
|
+
this.audioRecorder || (this.audioRecorder = new ze());
|
|
4469
|
+
const f = await this.audioRecorder.startRecording(t);
|
|
4470
|
+
if (f) {
|
|
4471
|
+
const b = await this.upload.uploadBlob(f, "audio.webm");
|
|
4472
|
+
b && (l.push(b.id), c(b.id, "🎤 Audio"));
|
|
4367
4473
|
}
|
|
4368
4474
|
}), t.querySelector(".reply-attach-video").addEventListener("click", async () => {
|
|
4369
|
-
if (l.length >=
|
|
4475
|
+
if (l.length >= h) return;
|
|
4370
4476
|
this.videoRecorder || (this.videoRecorder = new De());
|
|
4371
|
-
const
|
|
4372
|
-
if (
|
|
4373
|
-
const
|
|
4374
|
-
|
|
4477
|
+
const f = await this.videoRecorder.startRecording(t);
|
|
4478
|
+
if (f) {
|
|
4479
|
+
const b = await this.upload.uploadBlob(f.blob, "video.webm");
|
|
4480
|
+
b && (l.push(b.id), c(b.id, "🎥 Video"));
|
|
4375
4481
|
}
|
|
4376
4482
|
});
|
|
4377
|
-
const
|
|
4378
|
-
const
|
|
4379
|
-
if (!
|
|
4380
|
-
const
|
|
4381
|
-
this.client.reply(e.id,
|
|
4483
|
+
const u = () => {
|
|
4484
|
+
const f = o.value.trim();
|
|
4485
|
+
if (!f && l.length === 0) return;
|
|
4486
|
+
const b = [...(f || "").matchAll(/@(\w+)/g)].map((x) => x[1]);
|
|
4487
|
+
this.client.reply(e.id, f, b, l.length > 0 ? [...l] : void 0), o.value = "", l.length = 0, a.innerHTML = "";
|
|
4382
4488
|
};
|
|
4383
|
-
r.addEventListener("click",
|
|
4384
|
-
const
|
|
4385
|
-
|
|
4386
|
-
}), o.addEventListener("keydown", (
|
|
4387
|
-
|
|
4489
|
+
r.addEventListener("click", u), o.addEventListener("input", () => {
|
|
4490
|
+
const f = Date.now(), b = this.lastTypingSendPins.get(e.id) ?? 0;
|
|
4491
|
+
f - b >= 2e3 && (this.client.sendTyping(e.id), this.lastTypingSendPins.set(e.id, f));
|
|
4492
|
+
}), o.addEventListener("keydown", (f) => {
|
|
4493
|
+
f.key === "Enter" && (f.preventDefault(), u()), f.key === "Escape" && this.closePopover(), f.stopPropagation();
|
|
4388
4494
|
}), this.popover.appendChild(t);
|
|
4389
4495
|
}
|
|
4390
4496
|
removePickerEl() {
|
|
@@ -4409,7 +4515,7 @@ class ds {
|
|
|
4409
4515
|
zIndex: "10002",
|
|
4410
4516
|
fontFamily: xe
|
|
4411
4517
|
});
|
|
4412
|
-
for (const s of
|
|
4518
|
+
for (const s of cs) {
|
|
4413
4519
|
const o = document.createElement("button");
|
|
4414
4520
|
Object.assign(o.style, {
|
|
4415
4521
|
border: "none",
|
|
@@ -4442,8 +4548,8 @@ class ds {
|
|
|
4442
4548
|
const o = "display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:12px;border:1px solid #e2e8f0;background:#fff;font-size:12px;cursor:pointer;transition:all 0.15s;line-height:1.4;", r = o + "background:#eef2ff;border-color:#6366f1;";
|
|
4443
4549
|
let a = '<div style="margin-left:29px;display:flex;gap:4px;flex-wrap:wrap;margin-top:4px;">';
|
|
4444
4550
|
for (const [d, { count: c, ownId: h }] of s) {
|
|
4445
|
-
const
|
|
4446
|
-
a += `<button data-reaction-emoji="${d}" data-reaction-target="${e}" ${h ? `data-reaction-id="${h}"` : ""} style="${
|
|
4551
|
+
const u = h ? r : o;
|
|
4552
|
+
a += `<button data-reaction-emoji="${d}" data-reaction-target="${e}" ${h ? `data-reaction-id="${h}"` : ""} style="${u}">
|
|
4447
4553
|
<span>${d}</span><span style="font-size:11px;font-weight:600;color:#64748b;">${c}</span>
|
|
4448
4554
|
</button>`;
|
|
4449
4555
|
}
|
|
@@ -4544,13 +4650,13 @@ class ds {
|
|
|
4544
4650
|
});
|
|
4545
4651
|
}
|
|
4546
4652
|
}
|
|
4547
|
-
var
|
|
4548
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
4653
|
+
var us = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, z = (n, e, t, i) => {
|
|
4654
|
+
for (var s = i > 1 ? void 0 : i ? fs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
4549
4655
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
4550
|
-
return i && s &&
|
|
4656
|
+
return i && s && us(e, t, s), s;
|
|
4551
4657
|
};
|
|
4552
|
-
const
|
|
4553
|
-
let
|
|
4658
|
+
const ms = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
|
|
4659
|
+
let I = class extends _ {
|
|
4554
4660
|
constructor() {
|
|
4555
4661
|
super(...arguments), this.highlightThreadId = null, this.threadsVersion = 0, this.replyingTo = null, this.editingCommentId = null, this.editBody = "", this.pickerOpenForComment = null, this.typingByThread = /* @__PURE__ */ new Map(), this.reactionsVersion = 0, this.typingTimers = /* @__PURE__ */ new Map(), this.lastTypingSend = /* @__PURE__ */ new Map(), this.replyAttachmentIds = [];
|
|
4556
4662
|
}
|
|
@@ -4568,18 +4674,19 @@ let _ = class extends P {
|
|
|
4568
4674
|
this.client && !this.unsub && this.ensureListener();
|
|
4569
4675
|
}
|
|
4570
4676
|
updated(n) {
|
|
4571
|
-
var
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4677
|
+
var t, i, s;
|
|
4678
|
+
const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".reply-form input");
|
|
4679
|
+
e && this.client && (this.mentionPicker || (this.mentionPicker = new He(this.client)), e.dataset.mentionAttached || (this.mentionPicker.attach(e), e.dataset.mentionAttached = "1")), (i = this.shadowRoot) == null || i.querySelectorAll(".audio-player-host").forEach((o) => {
|
|
4680
|
+
if (o.children.length > 0) return;
|
|
4681
|
+
const r = o.dataset.url;
|
|
4682
|
+
if (r) {
|
|
4683
|
+
const a = o.dataset.duration ? parseInt(o.dataset.duration) : void 0;
|
|
4684
|
+
o.appendChild(Ue.render(r, a));
|
|
4685
|
+
}
|
|
4686
|
+
}), (s = this.shadowRoot) == null || s.querySelectorAll(".video-player-host").forEach((o) => {
|
|
4687
|
+
if (o.children.length > 0) return;
|
|
4688
|
+
const r = o.dataset.url;
|
|
4689
|
+
r && o.appendChild(Ce.render(r, o.dataset.poster || void 0));
|
|
4583
4690
|
});
|
|
4584
4691
|
}
|
|
4585
4692
|
teardownListeners() {
|
|
@@ -4647,7 +4754,7 @@ let _ = class extends P {
|
|
|
4647
4754
|
}
|
|
4648
4755
|
parseMentions(n) {
|
|
4649
4756
|
return n.split(/(@\w+)/g).map(
|
|
4650
|
-
(t) => t.startsWith("@") ?
|
|
4757
|
+
(t) => t.startsWith("@") ? p`<span class="mention">${t}</span>` : t
|
|
4651
4758
|
);
|
|
4652
4759
|
}
|
|
4653
4760
|
getInitials(n) {
|
|
@@ -4665,15 +4772,15 @@ let _ = class extends P {
|
|
|
4665
4772
|
}
|
|
4666
4773
|
async handleAttachImage() {
|
|
4667
4774
|
this.upload || (this.upload = new re(this.client));
|
|
4668
|
-
const n =
|
|
4775
|
+
const n = I.MAX_ATTACHMENTS - this.replyAttachmentIds.length;
|
|
4669
4776
|
if (n <= 0) return;
|
|
4670
4777
|
const e = await this.upload.pickFiles("image/*", n);
|
|
4671
4778
|
e.length > 0 && (this.replyAttachmentIds.push(...e.map((t) => t.id)), this.requestUpdate());
|
|
4672
4779
|
}
|
|
4673
4780
|
async handleRecordAudio(n) {
|
|
4674
4781
|
var i;
|
|
4675
|
-
if (this.replyAttachmentIds.length >=
|
|
4676
|
-
this.upload || (this.upload = new re(this.client)), this.audioRecorder || (this.audioRecorder = new
|
|
4782
|
+
if (this.replyAttachmentIds.length >= I.MAX_ATTACHMENTS) return;
|
|
4783
|
+
this.upload || (this.upload = new re(this.client)), this.audioRecorder || (this.audioRecorder = new ze());
|
|
4677
4784
|
const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${n}"]`), t = await this.audioRecorder.startRecording(e ?? document.body);
|
|
4678
4785
|
if (t) {
|
|
4679
4786
|
const s = await this.upload.uploadBlob(t, "audio.webm");
|
|
@@ -4682,7 +4789,7 @@ let _ = class extends P {
|
|
|
4682
4789
|
}
|
|
4683
4790
|
async handleRecordVideo(n) {
|
|
4684
4791
|
var i;
|
|
4685
|
-
if (this.replyAttachmentIds.length >=
|
|
4792
|
+
if (this.replyAttachmentIds.length >= I.MAX_ATTACHMENTS) return;
|
|
4686
4793
|
this.upload || (this.upload = new re(this.client)), this.videoRecorder || (this.videoRecorder = new De());
|
|
4687
4794
|
const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${n}"]`), t = await this.videoRecorder.startRecording(e ?? document.body);
|
|
4688
4795
|
if (t) {
|
|
@@ -4720,7 +4827,7 @@ let _ = class extends P {
|
|
|
4720
4827
|
this.client.deleteComment(n);
|
|
4721
4828
|
}
|
|
4722
4829
|
renderEditForm(n) {
|
|
4723
|
-
return
|
|
4830
|
+
return p`
|
|
4724
4831
|
<div class="edit-form">
|
|
4725
4832
|
<textarea
|
|
4726
4833
|
.value=${this.editBody}
|
|
@@ -4741,12 +4848,12 @@ let _ = class extends P {
|
|
|
4741
4848
|
const e = this.client.state.getReactions(n.id), t = (s = this.client.state.user) == null ? void 0 : s.id, i = /* @__PURE__ */ new Map();
|
|
4742
4849
|
for (const o of e)
|
|
4743
4850
|
i.has(o.emoji) || i.set(o.emoji, []), i.get(o.emoji).push(o);
|
|
4744
|
-
return
|
|
4851
|
+
return p`
|
|
4745
4852
|
<div class="comment-reactions">
|
|
4746
4853
|
${[...i.entries()].map(
|
|
4747
4854
|
([o, r]) => {
|
|
4748
4855
|
const a = r.some((l) => l.userId === t);
|
|
4749
|
-
return
|
|
4856
|
+
return p`
|
|
4750
4857
|
<button
|
|
4751
4858
|
class="reaction-pill ${a ? "own" : ""}"
|
|
4752
4859
|
@click=${() => this.toggleReaction(n.id, o)}
|
|
@@ -4765,26 +4872,26 @@ let _ = class extends P {
|
|
|
4765
4872
|
title="Add reaction"
|
|
4766
4873
|
>
|
|
4767
4874
|
+
|
|
4768
|
-
${this.pickerOpenForComment === n.id ?
|
|
4875
|
+
${this.pickerOpenForComment === n.id ? p`
|
|
4769
4876
|
<div class="emoji-picker">
|
|
4770
|
-
${
|
|
4771
|
-
(o) =>
|
|
4877
|
+
${ms.map(
|
|
4878
|
+
(o) => p`
|
|
4772
4879
|
<button @click=${(r) => {
|
|
4773
4880
|
r.stopPropagation(), this.toggleReaction(n.id, o);
|
|
4774
4881
|
}}>${o}</button>
|
|
4775
4882
|
`
|
|
4776
4883
|
)}
|
|
4777
4884
|
</div>
|
|
4778
|
-
` :
|
|
4885
|
+
` : g}
|
|
4779
4886
|
</button>
|
|
4780
4887
|
</div>
|
|
4781
4888
|
`;
|
|
4782
4889
|
}
|
|
4783
4890
|
renderTypingIndicator(n) {
|
|
4784
4891
|
const e = this.typingByThread.get(n) ?? [];
|
|
4785
|
-
if (e.length === 0) return
|
|
4892
|
+
if (e.length === 0) return g;
|
|
4786
4893
|
const t = e.length === 1 ? `${e[0]} is typing...` : `${e.join(", ")} are typing...`;
|
|
4787
|
-
return
|
|
4894
|
+
return p`<div class="typing-indicator">${t}</div>`;
|
|
4788
4895
|
}
|
|
4789
4896
|
sortedThreads() {
|
|
4790
4897
|
return [...this.threads].sort((n, e) => {
|
|
@@ -4795,7 +4902,7 @@ let _ = class extends P {
|
|
|
4795
4902
|
}
|
|
4796
4903
|
render() {
|
|
4797
4904
|
const n = this.sortedThreads();
|
|
4798
|
-
return
|
|
4905
|
+
return p`
|
|
4799
4906
|
<div class="panel">
|
|
4800
4907
|
<div class="panel-header">
|
|
4801
4908
|
<span class="panel-title">
|
|
@@ -4803,12 +4910,12 @@ let _ = class extends P {
|
|
|
4803
4910
|
<span class="thread-count">${this.threads.length}</span>
|
|
4804
4911
|
</span>
|
|
4805
4912
|
<button class="close-btn" @click=${this.fireClose} title="Close">
|
|
4806
|
-
${
|
|
4913
|
+
${S(ve, 16)}
|
|
4807
4914
|
</button>
|
|
4808
4915
|
</div>
|
|
4809
4916
|
|
|
4810
4917
|
<div class="panel-body pw-scrollable">
|
|
4811
|
-
${n.length === 0 ?
|
|
4918
|
+
${n.length === 0 ? p`<div class="empty">
|
|
4812
4919
|
<div class="empty-icon">💬</div>
|
|
4813
4920
|
No comments yet
|
|
4814
4921
|
</div>` : n.map((e) => this.renderThread(e))}
|
|
@@ -4821,13 +4928,13 @@ let _ = class extends P {
|
|
|
4821
4928
|
`;
|
|
4822
4929
|
}
|
|
4823
4930
|
renderAttachments(n) {
|
|
4824
|
-
if (!n || n.length === 0) return
|
|
4931
|
+
if (!n || n.length === 0) return g;
|
|
4825
4932
|
const e = n.filter((t) => t.type === "image").map((t) => t.url);
|
|
4826
|
-
return
|
|
4933
|
+
return p`
|
|
4827
4934
|
${n.map((t) => {
|
|
4828
4935
|
if (t.type === "image") {
|
|
4829
4936
|
const i = t.thumbnailUrl || t.url, s = e.indexOf(t.url);
|
|
4830
|
-
return
|
|
4937
|
+
return p`
|
|
4831
4938
|
<div class="comment-attachment-media">
|
|
4832
4939
|
<img
|
|
4833
4940
|
class="comment-attachment-img"
|
|
@@ -4838,40 +4945,40 @@ let _ = class extends P {
|
|
|
4838
4945
|
</div>
|
|
4839
4946
|
`;
|
|
4840
4947
|
}
|
|
4841
|
-
return t.type === "audio" ?
|
|
4948
|
+
return t.type === "audio" ? p`
|
|
4842
4949
|
<div class="comment-attachment-media" id="audio-${t.id}">
|
|
4843
4950
|
${this.renderAudioPlayer(t)}
|
|
4844
4951
|
</div>
|
|
4845
|
-
` : t.type === "video" ?
|
|
4952
|
+
` : t.type === "video" ? p`
|
|
4846
4953
|
<div class="comment-attachment-media" id="video-${t.id}">
|
|
4847
4954
|
${this.renderVideoPlayer(t)}
|
|
4848
4955
|
</div>
|
|
4849
|
-
` :
|
|
4956
|
+
` : g;
|
|
4850
4957
|
})}
|
|
4851
4958
|
`;
|
|
4852
4959
|
}
|
|
4853
4960
|
renderAudioPlayer(n) {
|
|
4854
|
-
const e = document.createElement("div"), t =
|
|
4855
|
-
return e.appendChild(t),
|
|
4961
|
+
const e = document.createElement("div"), t = Ue.render(n.url, n.durationMs);
|
|
4962
|
+
return e.appendChild(t), p`<div class="audio-player-host" data-url=${n.url} data-duration=${n.durationMs ?? ""}></div>`;
|
|
4856
4963
|
}
|
|
4857
4964
|
renderVideoPlayer(n) {
|
|
4858
|
-
return
|
|
4965
|
+
return p`<div class="video-player-host" data-url=${n.url} data-poster=${n.thumbnailUrl ?? ""}></div>`;
|
|
4859
4966
|
}
|
|
4860
4967
|
renderThread(n) {
|
|
4861
4968
|
const e = this.highlightThreadId === n.id;
|
|
4862
|
-
return
|
|
4969
|
+
return p`
|
|
4863
4970
|
<div
|
|
4864
4971
|
class="thread ${n.resolved ? "resolved" : ""} ${e ? "highlighted" : ""}"
|
|
4865
4972
|
data-thread-id=${n.id}
|
|
4866
4973
|
>
|
|
4867
|
-
${n.position ?
|
|
4868
|
-
${
|
|
4974
|
+
${n.position ? p`<div class="pin-badge">
|
|
4975
|
+
${S(Ot, 12)}
|
|
4869
4976
|
Pinned
|
|
4870
|
-
</div>` :
|
|
4977
|
+
</div>` : g}
|
|
4871
4978
|
${n.comments.map((t, i) => {
|
|
4872
4979
|
const s = this.getUserForComment(t.userId), o = this.isOwnComment(t), r = this.editingCommentId === t.id;
|
|
4873
|
-
return
|
|
4874
|
-
${i > 0 ?
|
|
4980
|
+
return p`
|
|
4981
|
+
${i > 0 ? p`<div class="comment-divider"></div>` : g}
|
|
4875
4982
|
<div class="comment">
|
|
4876
4983
|
<div class="comment-header">
|
|
4877
4984
|
<div
|
|
@@ -4882,16 +4989,16 @@ let _ = class extends P {
|
|
|
4882
4989
|
</div>
|
|
4883
4990
|
<span class="comment-author">${(s == null ? void 0 : s.name) ?? "Unknown"}</span>
|
|
4884
4991
|
<span class="comment-time">${this.formatTime(t.createdAt)}</span>
|
|
4885
|
-
${t.editedAt ?
|
|
4992
|
+
${t.editedAt ? p`<span class="edited-badge">(edited)</span>` : g}
|
|
4886
4993
|
</div>
|
|
4887
|
-
${r ? this.renderEditForm(t) :
|
|
4888
|
-
${t.body && t.body !== "(attachment)" ?
|
|
4994
|
+
${r ? this.renderEditForm(t) : p`
|
|
4995
|
+
${t.body && t.body !== "(attachment)" ? p`<div class="comment-body">${this.parseMentions(t.body)}</div>` : g}
|
|
4889
4996
|
${this.renderAttachments(t.attachments ?? [])}
|
|
4890
4997
|
`}
|
|
4891
|
-
${o && !r ?
|
|
4892
|
-
<button @click=${() => this.startEdit(t)} title="Edit">${
|
|
4893
|
-
<button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${
|
|
4894
|
-
</div>` :
|
|
4998
|
+
${o && !r ? p`<div class="comment-actions">
|
|
4999
|
+
<button @click=${() => this.startEdit(t)} title="Edit">${S(Hi, 14)}</button>
|
|
5000
|
+
<button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${S(Ni, 14)}</button>
|
|
5001
|
+
</div>` : g}
|
|
4895
5002
|
${this.renderReactions(t)}
|
|
4896
5003
|
</div>
|
|
4897
5004
|
`;
|
|
@@ -4912,7 +5019,7 @@ let _ = class extends P {
|
|
|
4912
5019
|
|
|
4913
5020
|
${this.renderTypingIndicator(n.id)}
|
|
4914
5021
|
|
|
4915
|
-
${this.replyingTo === n.id ?
|
|
5022
|
+
${this.replyingTo === n.id ? p`
|
|
4916
5023
|
<form
|
|
4917
5024
|
class="reply-form"
|
|
4918
5025
|
@submit=${(t) => this.handleReply(n.id, t)}
|
|
@@ -4931,22 +5038,22 @@ let _ = class extends P {
|
|
|
4931
5038
|
class="reply-media-btn"
|
|
4932
5039
|
title="Attach image"
|
|
4933
5040
|
@click=${() => this.handleAttachImage()}
|
|
4934
|
-
>${
|
|
5041
|
+
>${S(zi, 16)}</button>
|
|
4935
5042
|
<button
|
|
4936
5043
|
type="button"
|
|
4937
5044
|
class="reply-media-btn"
|
|
4938
5045
|
title="Record audio"
|
|
4939
5046
|
@click=${() => this.handleRecordAudio(n.id)}
|
|
4940
|
-
>${
|
|
5047
|
+
>${S(Ui, 16)}</button>
|
|
4941
5048
|
<button
|
|
4942
5049
|
type="button"
|
|
4943
5050
|
class="reply-media-btn"
|
|
4944
5051
|
title="Record video"
|
|
4945
5052
|
@click=${() => this.handleRecordVideo(n.id)}
|
|
4946
|
-
>${
|
|
5053
|
+
>${S(Fi, 16)}</button>
|
|
4947
5054
|
<div class="reply-preview">
|
|
4948
5055
|
${this.replyAttachmentIds.map(
|
|
4949
|
-
(t, i) =>
|
|
5056
|
+
(t, i) => p`<span class="reply-preview-badge">
|
|
4950
5057
|
Attached #${i + 1}
|
|
4951
5058
|
<button
|
|
4952
5059
|
type="button"
|
|
@@ -4958,12 +5065,12 @@ let _ = class extends P {
|
|
|
4958
5065
|
</div>
|
|
4959
5066
|
</div>
|
|
4960
5067
|
</form>
|
|
4961
|
-
` :
|
|
5068
|
+
` : g}
|
|
4962
5069
|
</div>
|
|
4963
5070
|
`;
|
|
4964
5071
|
}
|
|
4965
5072
|
};
|
|
4966
|
-
|
|
5073
|
+
I.styles = [
|
|
4967
5074
|
ie,
|
|
4968
5075
|
be,
|
|
4969
5076
|
Pe,
|
|
@@ -5507,56 +5614,56 @@ _.styles = [
|
|
|
5507
5614
|
}
|
|
5508
5615
|
`
|
|
5509
5616
|
];
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
],
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
],
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
],
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
],
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
],
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
],
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
],
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
],
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
],
|
|
5538
|
-
|
|
5617
|
+
I.MAX_ATTACHMENTS = 5;
|
|
5618
|
+
z([
|
|
5619
|
+
w({ attribute: !1 })
|
|
5620
|
+
], I.prototype, "client", 2);
|
|
5621
|
+
z([
|
|
5622
|
+
w()
|
|
5623
|
+
], I.prototype, "highlightThreadId", 2);
|
|
5624
|
+
z([
|
|
5625
|
+
k()
|
|
5626
|
+
], I.prototype, "threadsVersion", 2);
|
|
5627
|
+
z([
|
|
5628
|
+
k()
|
|
5629
|
+
], I.prototype, "replyingTo", 2);
|
|
5630
|
+
z([
|
|
5631
|
+
k()
|
|
5632
|
+
], I.prototype, "editingCommentId", 2);
|
|
5633
|
+
z([
|
|
5634
|
+
k()
|
|
5635
|
+
], I.prototype, "editBody", 2);
|
|
5636
|
+
z([
|
|
5637
|
+
k()
|
|
5638
|
+
], I.prototype, "pickerOpenForComment", 2);
|
|
5639
|
+
z([
|
|
5640
|
+
k()
|
|
5641
|
+
], I.prototype, "typingByThread", 2);
|
|
5642
|
+
z([
|
|
5643
|
+
k()
|
|
5644
|
+
], I.prototype, "reactionsVersion", 2);
|
|
5645
|
+
I = z([
|
|
5539
5646
|
L("pulse-widget-comments-panel")
|
|
5540
|
-
],
|
|
5541
|
-
var
|
|
5542
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
5647
|
+
], I);
|
|
5648
|
+
var gs = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, Ke = (n, e, t, i) => {
|
|
5649
|
+
for (var s = i > 1 ? void 0 : i ? vs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
5543
5650
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
5544
|
-
return i && s &&
|
|
5651
|
+
return i && s && gs(e, t, s), s;
|
|
5545
5652
|
};
|
|
5546
|
-
const
|
|
5653
|
+
const bs = {
|
|
5547
5654
|
"comment:created": "left a comment",
|
|
5548
5655
|
"comment:mention": "mentioned you",
|
|
5549
5656
|
"comment:reply": "replied to your comment",
|
|
5550
5657
|
"thread:resolved": "resolved a thread",
|
|
5551
5658
|
"reaction:added": "reacted to your comment"
|
|
5552
|
-
},
|
|
5659
|
+
}, xs = {
|
|
5553
5660
|
"comment:created": "💬",
|
|
5554
5661
|
"comment:mention": "📣",
|
|
5555
5662
|
"comment:reply": "↩️",
|
|
5556
5663
|
"thread:resolved": "✅",
|
|
5557
5664
|
"reaction:added": "🎉"
|
|
5558
5665
|
};
|
|
5559
|
-
let pe = class extends
|
|
5666
|
+
let pe = class extends _ {
|
|
5560
5667
|
constructor() {
|
|
5561
5668
|
super(...arguments), this.notifications = [];
|
|
5562
5669
|
}
|
|
@@ -5600,38 +5707,38 @@ let pe = class extends P {
|
|
|
5600
5707
|
}
|
|
5601
5708
|
render() {
|
|
5602
5709
|
const n = this.notifications.filter((e) => !e.read).length;
|
|
5603
|
-
return
|
|
5710
|
+
return p`
|
|
5604
5711
|
<div class="panel">
|
|
5605
5712
|
<div class="panel-header">
|
|
5606
5713
|
<span class="panel-title">
|
|
5607
5714
|
Notifications
|
|
5608
|
-
${n > 0 ?
|
|
5715
|
+
${n > 0 ? p`<span class="unread-badge">${n}</span>` : g}
|
|
5609
5716
|
</span>
|
|
5610
5717
|
<div style="display:flex;align-items:center;gap:4px;">
|
|
5611
|
-
${n > 0 ?
|
|
5718
|
+
${n > 0 ? p`<button class="mark-all" @click=${() => this.client.markAllRead()}>
|
|
5612
5719
|
Mark all read
|
|
5613
|
-
</button>` :
|
|
5720
|
+
</button>` : g}
|
|
5614
5721
|
<button class="close-btn" @click=${this.fireClose} title="Close">
|
|
5615
|
-
${
|
|
5722
|
+
${S(ve, 16)}
|
|
5616
5723
|
</button>
|
|
5617
5724
|
</div>
|
|
5618
5725
|
</div>
|
|
5619
5726
|
|
|
5620
5727
|
<div class="panel-body pw-scrollable">
|
|
5621
|
-
${this.notifications.length === 0 ?
|
|
5728
|
+
${this.notifications.length === 0 ? p`<div class="empty">
|
|
5622
5729
|
<div class="empty-icon">🔔</div>
|
|
5623
5730
|
No notifications
|
|
5624
5731
|
</div>` : this.notifications.map(
|
|
5625
|
-
(e) =>
|
|
5732
|
+
(e) => p`
|
|
5626
5733
|
<div
|
|
5627
5734
|
class="item ${e.read ? "" : "unread"}"
|
|
5628
5735
|
@click=${() => this.handleClick(e)}
|
|
5629
5736
|
>
|
|
5630
|
-
<span class="icon">${
|
|
5737
|
+
<span class="icon">${xs[e.type] ?? "🔔"}</span>
|
|
5631
5738
|
<div class="content">
|
|
5632
5739
|
<div class="text">
|
|
5633
5740
|
<span class="actor">${this.getActorName(e.actorId)}</span>
|
|
5634
|
-
${
|
|
5741
|
+
${bs[e.type] ?? e.type}
|
|
5635
5742
|
</div>
|
|
5636
5743
|
<div class="time">${this.formatTime(e.createdAt)}</div>
|
|
5637
5744
|
</div>
|
|
@@ -5841,17 +5948,17 @@ pe.styles = [
|
|
|
5841
5948
|
}
|
|
5842
5949
|
`
|
|
5843
5950
|
];
|
|
5844
|
-
|
|
5845
|
-
|
|
5951
|
+
Ke([
|
|
5952
|
+
w({ attribute: !1 })
|
|
5846
5953
|
], pe.prototype, "client", 2);
|
|
5847
|
-
|
|
5848
|
-
|
|
5954
|
+
Ke([
|
|
5955
|
+
k()
|
|
5849
5956
|
], pe.prototype, "notifications", 2);
|
|
5850
|
-
pe =
|
|
5957
|
+
pe = Ke([
|
|
5851
5958
|
L("pulse-widget-notifications-panel")
|
|
5852
5959
|
], pe);
|
|
5853
|
-
const
|
|
5854
|
-
class
|
|
5960
|
+
const ys = 3e3;
|
|
5961
|
+
class ws {
|
|
5855
5962
|
constructor(e) {
|
|
5856
5963
|
this.container = null, this.cursors = /* @__PURE__ */ new Map(), this.cursorEls = /* @__PURE__ */ new Map(), this.cursorLastSeen = /* @__PURE__ */ new Map(), this.unsubs = [], this.enabled = !1, this.sending = !1, this.staleTimer = null, this.handleLocalCursor = (t) => {
|
|
5857
5964
|
t.pointerType !== "touch" && this.client.moveCursor({
|
|
@@ -5903,7 +6010,7 @@ class xs {
|
|
|
5903
6010
|
), this.setSending(!0), this.staleTimer = setInterval(() => {
|
|
5904
6011
|
const e = Date.now();
|
|
5905
6012
|
for (const [t, i] of this.cursorLastSeen)
|
|
5906
|
-
if (e - i >
|
|
6013
|
+
if (e - i > ys) {
|
|
5907
6014
|
this.cursors.delete(t);
|
|
5908
6015
|
const s = this.cursorEls.get(t);
|
|
5909
6016
|
s && s.remove(), this.cursorEls.delete(t), this.cursorLastSeen.delete(t);
|
|
@@ -5999,7 +6106,7 @@ class xs {
|
|
|
5999
6106
|
i.style.transform = `translate(${t.position.x}px, ${t.position.y}px)`;
|
|
6000
6107
|
}
|
|
6001
6108
|
}
|
|
6002
|
-
class
|
|
6109
|
+
class $s {
|
|
6003
6110
|
constructor(e) {
|
|
6004
6111
|
this.container = null, this.unsubs = [], this.enabled = !1, this.drawMode = !1, this.currentPoints = [], this.currentPath = null, this.lastPoint = null, this.fadeTimers = /* @__PURE__ */ new Map(), this.handlePointerDown = (t) => {
|
|
6005
6112
|
var a, l, d;
|
|
@@ -6082,9 +6189,9 @@ class ys {
|
|
|
6082
6189
|
this.fadeTimers.set(e, t);
|
|
6083
6190
|
}
|
|
6084
6191
|
}
|
|
6085
|
-
function
|
|
6192
|
+
function ks(n) {
|
|
6086
6193
|
if (!n.rangeCount || n.isCollapsed) return null;
|
|
6087
|
-
const e = n.getRangeAt(0), t = e.startContainer, i = e.endContainer, s =
|
|
6194
|
+
const e = n.getRangeAt(0), t = e.startContainer, i = e.endContainer, s = yt(t), o = yt(i);
|
|
6088
6195
|
return !s || !o ? null : {
|
|
6089
6196
|
startSelector: s,
|
|
6090
6197
|
startOffset: e.startOffset,
|
|
@@ -6092,10 +6199,10 @@ function ws(n) {
|
|
|
6092
6199
|
endOffset: e.endOffset
|
|
6093
6200
|
};
|
|
6094
6201
|
}
|
|
6095
|
-
function
|
|
6202
|
+
function Es(n) {
|
|
6096
6203
|
var e, t;
|
|
6097
6204
|
try {
|
|
6098
|
-
const i =
|
|
6205
|
+
const i = $t(n.startSelector), s = $t(n.endSelector);
|
|
6099
6206
|
if (!i || !s) return null;
|
|
6100
6207
|
const o = document.createRange(), r = i.nodeType === Node.TEXT_NODE ? ((e = i.textContent) == null ? void 0 : e.length) ?? 0 : i.childNodes.length, a = s.nodeType === Node.TEXT_NODE ? ((t = s.textContent) == null ? void 0 : t.length) ?? 0 : s.childNodes.length;
|
|
6101
6208
|
return o.setStart(i, Math.min(n.startOffset, r)), o.setEnd(s, Math.min(n.endOffset, a)), o;
|
|
@@ -6103,18 +6210,18 @@ function $s(n) {
|
|
|
6103
6210
|
return null;
|
|
6104
6211
|
}
|
|
6105
6212
|
}
|
|
6106
|
-
function
|
|
6213
|
+
function yt(n) {
|
|
6107
6214
|
if (n.nodeType === Node.TEXT_NODE) {
|
|
6108
6215
|
const e = n.parentElement;
|
|
6109
6216
|
if (!e) return null;
|
|
6110
|
-
const t =
|
|
6217
|
+
const t = wt(e);
|
|
6111
6218
|
if (!t) return null;
|
|
6112
6219
|
const i = Array.from(e.childNodes).indexOf(n);
|
|
6113
6220
|
return `${t}::text(${i})`;
|
|
6114
6221
|
}
|
|
6115
|
-
return n.nodeType === Node.ELEMENT_NODE ?
|
|
6222
|
+
return n.nodeType === Node.ELEMENT_NODE ? wt(n) : null;
|
|
6116
6223
|
}
|
|
6117
|
-
function
|
|
6224
|
+
function wt(n) {
|
|
6118
6225
|
if (!n || n === document.documentElement) return "html";
|
|
6119
6226
|
if (n === document.body) return "body";
|
|
6120
6227
|
if (n.id) return `#${CSS.escape(n.id)}`;
|
|
@@ -6140,7 +6247,7 @@ function yt(n) {
|
|
|
6140
6247
|
}
|
|
6141
6248
|
return e.length > 0 ? e.join(" > ") : null;
|
|
6142
6249
|
}
|
|
6143
|
-
function
|
|
6250
|
+
function $t(n) {
|
|
6144
6251
|
const e = n.match(/^(.+)::text\((\d+)\)$/);
|
|
6145
6252
|
if (e) {
|
|
6146
6253
|
const t = e[1], i = parseInt(e[2], 10);
|
|
@@ -6157,7 +6264,7 @@ function wt(n) {
|
|
|
6157
6264
|
return null;
|
|
6158
6265
|
}
|
|
6159
6266
|
}
|
|
6160
|
-
class
|
|
6267
|
+
class Cs {
|
|
6161
6268
|
constructor(e) {
|
|
6162
6269
|
this.container = null, this.unsubs = [], this.enabled = !1, this.selectionEls = /* @__PURE__ */ new Map(), this.clearTimers = /* @__PURE__ */ new Map(), this.client = e;
|
|
6163
6270
|
}
|
|
@@ -6201,7 +6308,7 @@ class ks {
|
|
|
6201
6308
|
if (!this.container) return;
|
|
6202
6309
|
const i = (a = this.client.state.user) == null ? void 0 : a.id;
|
|
6203
6310
|
if (e === i || (this.clearSelection(e), !t)) return;
|
|
6204
|
-
const s =
|
|
6311
|
+
const s = Es(t);
|
|
6205
6312
|
if (!s) return;
|
|
6206
6313
|
const o = this.client.state.presence.find(
|
|
6207
6314
|
(l) => l.user.id === e
|
|
@@ -6209,8 +6316,8 @@ class ks {
|
|
|
6209
6316
|
try {
|
|
6210
6317
|
const l = s.getClientRects(), d = [];
|
|
6211
6318
|
for (let c = 0; c < l.length; c++) {
|
|
6212
|
-
const h = l[c],
|
|
6213
|
-
Object.assign(
|
|
6319
|
+
const h = l[c], u = document.createElement("div");
|
|
6320
|
+
Object.assign(u.style, {
|
|
6214
6321
|
position: "absolute",
|
|
6215
6322
|
left: `${h.left}px`,
|
|
6216
6323
|
top: `${h.top}px`,
|
|
@@ -6220,7 +6327,7 @@ class ks {
|
|
|
6220
6327
|
opacity: "0.2",
|
|
6221
6328
|
borderRadius: "2px",
|
|
6222
6329
|
pointerEvents: "none"
|
|
6223
|
-
}), this.container.appendChild(
|
|
6330
|
+
}), this.container.appendChild(u), d.push(u);
|
|
6224
6331
|
}
|
|
6225
6332
|
this.selectionEls.set(e, d);
|
|
6226
6333
|
} catch {
|
|
@@ -6240,12 +6347,12 @@ class ks {
|
|
|
6240
6347
|
}
|
|
6241
6348
|
}
|
|
6242
6349
|
}
|
|
6243
|
-
var
|
|
6244
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
6350
|
+
var Ts = Object.defineProperty, Ss = Object.getOwnPropertyDescriptor, Ge = (n, e, t, i) => {
|
|
6351
|
+
for (var s = i > 1 ? void 0 : i ? Ss(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
6245
6352
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
6246
|
-
return i && s &&
|
|
6353
|
+
return i && s && Ts(e, t, s), s;
|
|
6247
6354
|
};
|
|
6248
|
-
let ue = class extends
|
|
6355
|
+
let ue = class extends _ {
|
|
6249
6356
|
constructor() {
|
|
6250
6357
|
super(...arguments), this.roomId = "";
|
|
6251
6358
|
}
|
|
@@ -6265,7 +6372,7 @@ let ue = class extends P {
|
|
|
6265
6372
|
);
|
|
6266
6373
|
}
|
|
6267
6374
|
renderToggle(n, e) {
|
|
6268
|
-
return
|
|
6375
|
+
return p`
|
|
6269
6376
|
<div class="setting-row">
|
|
6270
6377
|
<span class="setting-label">${n}</span>
|
|
6271
6378
|
<label class="toggle">
|
|
@@ -6281,12 +6388,12 @@ let ue = class extends P {
|
|
|
6281
6388
|
}
|
|
6282
6389
|
render() {
|
|
6283
6390
|
const n = !this.settings.enabled;
|
|
6284
|
-
return
|
|
6391
|
+
return p`
|
|
6285
6392
|
<div class="panel">
|
|
6286
6393
|
<div class="panel-header">
|
|
6287
6394
|
<span class="panel-title">Settings</span>
|
|
6288
6395
|
<button class="close-btn" @click=${this.fireClose} title="Close">
|
|
6289
|
-
${
|
|
6396
|
+
${S(ve, 16)}
|
|
6290
6397
|
</button>
|
|
6291
6398
|
</div>
|
|
6292
6399
|
|
|
@@ -6506,13 +6613,13 @@ ue.styles = [
|
|
|
6506
6613
|
}
|
|
6507
6614
|
`
|
|
6508
6615
|
];
|
|
6509
|
-
|
|
6510
|
-
|
|
6616
|
+
Ge([
|
|
6617
|
+
w({ attribute: !1 })
|
|
6511
6618
|
], ue.prototype, "settings", 2);
|
|
6512
|
-
|
|
6513
|
-
|
|
6619
|
+
Ge([
|
|
6620
|
+
w()
|
|
6514
6621
|
], ue.prototype, "roomId", 2);
|
|
6515
|
-
ue =
|
|
6622
|
+
ue = Ge([
|
|
6516
6623
|
L("pulse-widget-settings-panel")
|
|
6517
6624
|
], ue);
|
|
6518
6625
|
const $e = {
|
|
@@ -6526,26 +6633,26 @@ const $e = {
|
|
|
6526
6633
|
showViewportIndicators: !0,
|
|
6527
6634
|
showSelections: !0,
|
|
6528
6635
|
showDrawings: !0
|
|
6529
|
-
},
|
|
6530
|
-
function
|
|
6636
|
+
}, Rt = "pulse:settings:";
|
|
6637
|
+
function As(n) {
|
|
6531
6638
|
try {
|
|
6532
|
-
const e = localStorage.getItem(`${
|
|
6639
|
+
const e = localStorage.getItem(`${Rt}${n}`);
|
|
6533
6640
|
return e ? { ...$e, ...JSON.parse(e) } : { ...$e };
|
|
6534
6641
|
} catch {
|
|
6535
6642
|
return { ...$e };
|
|
6536
6643
|
}
|
|
6537
6644
|
}
|
|
6538
|
-
function
|
|
6539
|
-
localStorage.setItem(`${
|
|
6645
|
+
function Ps(n, e) {
|
|
6646
|
+
localStorage.setItem(`${Rt}${n}`, JSON.stringify(e));
|
|
6540
6647
|
}
|
|
6541
|
-
var
|
|
6542
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
6648
|
+
var _s = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, j = (n, e, t, i) => {
|
|
6649
|
+
for (var s = i > 1 ? void 0 : i ? Is(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
6543
6650
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
6544
|
-
return i && s &&
|
|
6651
|
+
return i && s && _s(e, t, s), s;
|
|
6545
6652
|
};
|
|
6546
|
-
let M = class extends
|
|
6653
|
+
let M = class extends _ {
|
|
6547
6654
|
constructor() {
|
|
6548
|
-
super(...arguments), this.collapsed = !1, this.activePanel = null, this.pinModeActive = !1, this.featuresDisabled = !1, this.drawModeActive = !1, this.followingUserId = null, this.display = "floating", this.envConfig = { ...
|
|
6655
|
+
super(...arguments), this.collapsed = !1, this.activePanel = null, this.pinModeActive = !1, this.featuresDisabled = !1, this.drawModeActive = !1, this.followingUserId = null, this.display = "floating", this.envConfig = { ...Mt }, this.users = [], this.unreadCount = 0;
|
|
6549
6656
|
}
|
|
6550
6657
|
connectedCallback() {
|
|
6551
6658
|
super.connectedCallback(), this.setupPresence();
|
|
@@ -6596,35 +6703,35 @@ let M = class extends P {
|
|
|
6596
6703
|
render() {
|
|
6597
6704
|
const n = this.display === "inline";
|
|
6598
6705
|
if (this.collapsed)
|
|
6599
|
-
return
|
|
6706
|
+
return p`
|
|
6600
6707
|
<div class="toolbar collapsed ${n ? "inline" : ""}" @click=${this.fireToggle}>
|
|
6601
|
-
<span class="fab-icon">${
|
|
6708
|
+
<span class="fab-icon">${S(qi, n ? 18 : 24)}</span>
|
|
6602
6709
|
</div>
|
|
6603
6710
|
`;
|
|
6604
6711
|
const e = this.users.slice(0, 3), t = this.users.length - 3;
|
|
6605
|
-
return
|
|
6712
|
+
return p`
|
|
6606
6713
|
<div class="toolbar ${n ? "inline" : ""}"
|
|
6607
6714
|
<!-- Presence avatars -->
|
|
6608
|
-
${this.users.length > 0 && this.envConfig.showPresence ?
|
|
6715
|
+
${this.users.length > 0 && this.envConfig.showPresence ? p`
|
|
6609
6716
|
<div class="presence">
|
|
6610
|
-
${t > 0 ?
|
|
6717
|
+
${t > 0 ? p`<div class="presence-overflow">+${t}</div>` : g}
|
|
6611
6718
|
${e.map(
|
|
6612
|
-
(i) =>
|
|
6719
|
+
(i) => p`
|
|
6613
6720
|
<div
|
|
6614
6721
|
class="presence-avatar clickable ${this.followingUserId === i.user.id ? "following" : ""}"
|
|
6615
6722
|
style="background:${i.user.color}"
|
|
6616
6723
|
@click=${() => this.fireFollow(i.user.id)}
|
|
6617
6724
|
title="Click to follow ${i.user.name}"
|
|
6618
6725
|
>
|
|
6619
|
-
${i.user.avatar ?
|
|
6726
|
+
${i.user.avatar ? p`<img src="${i.user.avatar}" alt="${i.user.name}" />` : this.getInitials(i.user.name)}
|
|
6620
6727
|
<span class="presence-tooltip">${i.user.name}</span>
|
|
6621
|
-
${i.deviceType && i.deviceType !== "desktop" ?
|
|
6728
|
+
${i.deviceType && i.deviceType !== "desktop" ? p`<span class="device-icon">${i.deviceType === "mobile" ? "📱" : "📲"}</span>` : g}
|
|
6622
6729
|
</div>
|
|
6623
6730
|
`
|
|
6624
6731
|
)}
|
|
6625
6732
|
</div>
|
|
6626
6733
|
<div class="separator"></div>
|
|
6627
|
-
` :
|
|
6734
|
+
` : g}
|
|
6628
6735
|
|
|
6629
6736
|
<!-- Pin comment (primary) -->
|
|
6630
6737
|
<button
|
|
@@ -6634,7 +6741,7 @@ let M = class extends P {
|
|
|
6634
6741
|
?disabled=${this.featuresDisabled}
|
|
6635
6742
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
|
|
6636
6743
|
>
|
|
6637
|
-
${
|
|
6744
|
+
${S(Ot)}
|
|
6638
6745
|
</button>
|
|
6639
6746
|
|
|
6640
6747
|
<!-- View comments -->
|
|
@@ -6645,7 +6752,7 @@ let M = class extends P {
|
|
|
6645
6752
|
?disabled=${this.featuresDisabled}
|
|
6646
6753
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
|
|
6647
6754
|
>
|
|
6648
|
-
${
|
|
6755
|
+
${S(ji)}
|
|
6649
6756
|
</button>
|
|
6650
6757
|
|
|
6651
6758
|
<!-- Activity feed -->
|
|
@@ -6656,11 +6763,11 @@ let M = class extends P {
|
|
|
6656
6763
|
?disabled=${this.featuresDisabled}
|
|
6657
6764
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
|
|
6658
6765
|
>
|
|
6659
|
-
${
|
|
6766
|
+
${S(Li)}
|
|
6660
6767
|
</button>
|
|
6661
6768
|
|
|
6662
6769
|
<!-- Draw mode -->
|
|
6663
|
-
${this.envConfig.allowDrawing ?
|
|
6770
|
+
${this.envConfig.allowDrawing ? p`
|
|
6664
6771
|
<button
|
|
6665
6772
|
class="pw-btn pw-btn-icon ${this.drawModeActive ? "active" : ""}"
|
|
6666
6773
|
@click=${() => this.fire("draw-mode")}
|
|
@@ -6668,9 +6775,9 @@ let M = class extends P {
|
|
|
6668
6775
|
?disabled=${this.featuresDisabled}
|
|
6669
6776
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
|
|
6670
6777
|
>
|
|
6671
|
-
${
|
|
6778
|
+
${S(Di)}
|
|
6672
6779
|
</button>
|
|
6673
|
-
` :
|
|
6780
|
+
` : g}
|
|
6674
6781
|
|
|
6675
6782
|
<!-- Notifications -->
|
|
6676
6783
|
<button
|
|
@@ -6680,8 +6787,8 @@ let M = class extends P {
|
|
|
6680
6787
|
?disabled=${this.featuresDisabled}
|
|
6681
6788
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : "position:relative"}"
|
|
6682
6789
|
>
|
|
6683
|
-
${
|
|
6684
|
-
${this.unreadCount > 0 ?
|
|
6790
|
+
${S(Ri)}
|
|
6791
|
+
${this.unreadCount > 0 ? p`<span class="badge">${this.unreadCount > 9 ? "9+" : this.unreadCount}</span>` : g}
|
|
6685
6792
|
</button>
|
|
6686
6793
|
|
|
6687
6794
|
<!-- Settings -->
|
|
@@ -6690,7 +6797,7 @@ let M = class extends P {
|
|
|
6690
6797
|
@click=${() => this.fire("settings")}
|
|
6691
6798
|
title="Settings"
|
|
6692
6799
|
>
|
|
6693
|
-
${
|
|
6800
|
+
${S(Bi)}
|
|
6694
6801
|
</button>
|
|
6695
6802
|
|
|
6696
6803
|
<div class="separator"></div>
|
|
@@ -6701,7 +6808,7 @@ let M = class extends P {
|
|
|
6701
6808
|
@click=${this.fireToggle}
|
|
6702
6809
|
title="Collapse"
|
|
6703
6810
|
>
|
|
6704
|
-
${
|
|
6811
|
+
${S(ve, 14)}
|
|
6705
6812
|
</button>
|
|
6706
6813
|
</div>
|
|
6707
6814
|
`;
|
|
@@ -6923,42 +7030,42 @@ M.styles = [
|
|
|
6923
7030
|
`
|
|
6924
7031
|
];
|
|
6925
7032
|
j([
|
|
6926
|
-
|
|
7033
|
+
w({ attribute: !1 })
|
|
6927
7034
|
], M.prototype, "client", 2);
|
|
6928
7035
|
j([
|
|
6929
|
-
|
|
7036
|
+
w({ type: Boolean })
|
|
6930
7037
|
], M.prototype, "collapsed", 2);
|
|
6931
7038
|
j([
|
|
6932
|
-
|
|
7039
|
+
w()
|
|
6933
7040
|
], M.prototype, "activePanel", 2);
|
|
6934
7041
|
j([
|
|
6935
|
-
|
|
7042
|
+
w({ type: Boolean })
|
|
6936
7043
|
], M.prototype, "pinModeActive", 2);
|
|
6937
7044
|
j([
|
|
6938
|
-
|
|
7045
|
+
w({ type: Boolean })
|
|
6939
7046
|
], M.prototype, "featuresDisabled", 2);
|
|
6940
7047
|
j([
|
|
6941
|
-
|
|
7048
|
+
w({ type: Boolean })
|
|
6942
7049
|
], M.prototype, "drawModeActive", 2);
|
|
6943
7050
|
j([
|
|
6944
|
-
|
|
7051
|
+
w()
|
|
6945
7052
|
], M.prototype, "followingUserId", 2);
|
|
6946
7053
|
j([
|
|
6947
|
-
|
|
7054
|
+
w()
|
|
6948
7055
|
], M.prototype, "display", 2);
|
|
6949
7056
|
j([
|
|
6950
|
-
|
|
7057
|
+
w({ attribute: !1 })
|
|
6951
7058
|
], M.prototype, "envConfig", 2);
|
|
6952
7059
|
j([
|
|
6953
|
-
|
|
7060
|
+
k()
|
|
6954
7061
|
], M.prototype, "users", 2);
|
|
6955
7062
|
j([
|
|
6956
|
-
|
|
7063
|
+
k()
|
|
6957
7064
|
], M.prototype, "unreadCount", 2);
|
|
6958
7065
|
M = j([
|
|
6959
7066
|
L("pulse-widget-toolbar")
|
|
6960
7067
|
], M);
|
|
6961
|
-
class
|
|
7068
|
+
class Ms {
|
|
6962
7069
|
constructor(e) {
|
|
6963
7070
|
this.container = null, this.unsubs = [], this.enabled = !1, this.pillEls = /* @__PURE__ */ new Map(), this.client = e;
|
|
6964
7071
|
}
|
|
@@ -6999,23 +7106,23 @@ class _s {
|
|
|
6999
7106
|
const e = window.scrollY, t = window.innerHeight, i = document.documentElement.scrollHeight, s = (r = this.client.state.user) == null ? void 0 : r.id, o = /* @__PURE__ */ new Set();
|
|
7000
7107
|
for (const [a, l] of this.client.state.viewports) {
|
|
7001
7108
|
if (a === s) continue;
|
|
7002
|
-
const d = l.scrollY, c = l.scrollY + l.viewportHeight, h = e,
|
|
7003
|
-
if (d >= h && c <=
|
|
7004
|
-
const
|
|
7005
|
-
|
|
7109
|
+
const d = l.scrollY, c = l.scrollY + l.viewportHeight, h = e, u = e + t;
|
|
7110
|
+
if (d >= h && c <= u) {
|
|
7111
|
+
const $ = this.pillEls.get(a);
|
|
7112
|
+
$ && ($.style.display = "none");
|
|
7006
7113
|
continue;
|
|
7007
7114
|
}
|
|
7008
7115
|
o.add(a);
|
|
7009
|
-
const
|
|
7010
|
-
(
|
|
7116
|
+
const f = this.client.state.presence.find(
|
|
7117
|
+
($) => $.user.id === a
|
|
7011
7118
|
);
|
|
7012
|
-
if (!
|
|
7013
|
-
const
|
|
7119
|
+
if (!f) continue;
|
|
7120
|
+
const b = l.scrollY + l.viewportHeight / 2, x = i > 0 ? b / i : 0, y = Math.max(
|
|
7014
7121
|
8,
|
|
7015
|
-
Math.min(t - 28,
|
|
7122
|
+
Math.min(t - 28, x * t)
|
|
7016
7123
|
);
|
|
7017
|
-
let
|
|
7018
|
-
|
|
7124
|
+
let v = this.pillEls.get(a);
|
|
7125
|
+
v || (v = document.createElement("div"), Object.assign(v.style, {
|
|
7019
7126
|
position: "absolute",
|
|
7020
7127
|
right: "8px",
|
|
7021
7128
|
padding: "2px 6px",
|
|
@@ -7027,7 +7134,7 @@ class _s {
|
|
|
7027
7134
|
whiteSpace: "nowrap",
|
|
7028
7135
|
pointerEvents: "none",
|
|
7029
7136
|
transition: "top 0.3s ease"
|
|
7030
|
-
}), this.container.appendChild(
|
|
7137
|
+
}), this.container.appendChild(v), this.pillEls.set(a, v)), v.style.display = "", v.style.background = f.user.color, v.style.top = `${y}px`, v.textContent = this.getInitials(f.user.name);
|
|
7031
7138
|
}
|
|
7032
7139
|
for (const [a, l] of this.pillEls)
|
|
7033
7140
|
!o.has(a) && !this.client.state.viewports.has(a) && (l.remove(), this.pillEls.delete(a));
|
|
@@ -7036,14 +7143,14 @@ class _s {
|
|
|
7036
7143
|
return e.split(" ").map((t) => t[0]).join("").toUpperCase().slice(0, 2);
|
|
7037
7144
|
}
|
|
7038
7145
|
}
|
|
7039
|
-
var
|
|
7040
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
7146
|
+
var Os = Object.defineProperty, Rs = Object.getOwnPropertyDescriptor, P = (n, e, t, i) => {
|
|
7147
|
+
for (var s = i > 1 ? void 0 : i ? Rs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
7041
7148
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
7042
|
-
return i && s &&
|
|
7149
|
+
return i && s && Os(e, t, s), s;
|
|
7043
7150
|
};
|
|
7044
|
-
let C = class extends
|
|
7151
|
+
let C = class extends _ {
|
|
7045
7152
|
constructor() {
|
|
7046
|
-
super(...arguments), this.apiKey = "", this.token = "", this.room = "", this.position = "bottom-right", this.display = "floating", this.collapsed = !0, this.activePanel = null, this.pinModeActive = !1, this.highlightThreadId = null, this.settings = { ...$e }, this.followingUserId = null, this.drawModeActive = !1, this.connectionState = "disconnected", this.showConnectedFlash = !1, this.envConfig = { ...
|
|
7153
|
+
super(...arguments), this.apiKey = "", this.token = "", this.room = "", this.position = "bottom-right", this.display = "floating", this.collapsed = !0, this.activePanel = null, this.pinModeActive = !1, this.highlightThreadId = null, this.settings = { ...$e }, this.followingUserId = null, this.drawModeActive = !1, this.connectionState = "disconnected", this.showConnectedFlash = !1, this.envConfig = { ...Mt }, this.unsubs = [], this.clientConfigKey = "", this._isFollowScrolling = !1, this._viewportThrottleTimer = null, this._selectionThrottleTimer = null, this._connectedFlashTimer = null, this._wasDisconnected = !1, this.handleScroll = () => {
|
|
7047
7154
|
!this.settings.enabled || !this.client || this._isFollowScrolling || (this.followingUserId && (this.followingUserId = null), !this._viewportThrottleTimer && (this._viewportThrottleTimer = setTimeout(() => {
|
|
7048
7155
|
var n;
|
|
7049
7156
|
this._viewportThrottleTimer = null, (n = this.client) == null || n.updateViewport({
|
|
@@ -7064,7 +7171,7 @@ let C = class extends P {
|
|
|
7064
7171
|
(t = this.client) == null || t.updateSelection(null);
|
|
7065
7172
|
return;
|
|
7066
7173
|
}
|
|
7067
|
-
const e =
|
|
7174
|
+
const e = ks(n);
|
|
7068
7175
|
(i = this.client) == null || i.updateSelection(e);
|
|
7069
7176
|
}, 500));
|
|
7070
7177
|
}, this.handleDocumentClick = (n) => {
|
|
@@ -7096,11 +7203,11 @@ let C = class extends P {
|
|
|
7096
7203
|
room: this.room,
|
|
7097
7204
|
endpoint: this.endpoint
|
|
7098
7205
|
};
|
|
7099
|
-
this.client = new
|
|
7206
|
+
this.client = new Ct(n), this.clientConfigKey = this.getConfigKey(), this.cursorOverlay = new ws(this.client), this.commentPins = new ps(this.client, {
|
|
7100
7207
|
onPinModeExit: () => {
|
|
7101
7208
|
this.pinModeActive = !1;
|
|
7102
7209
|
}
|
|
7103
|
-
}), this.viewportOverlay = new
|
|
7210
|
+
}), this.viewportOverlay = new Ms(this.client), this.selectionOverlay = new Cs(this.client), this.drawingOverlay = new $s(this.client), this.settings = As(this.room), this.applySettings(this.settings), this.unsubs.push(
|
|
7104
7211
|
this.client.state.on("auth", () => {
|
|
7105
7212
|
var e, t;
|
|
7106
7213
|
this.envConfig = this.client.state.config, this.envConfig.showCursors || (e = this.cursorOverlay) == null || e.disable(), !this.envConfig.allowDrawing && this.drawModeActive && ((t = this.drawingOverlay) == null || t.disableDrawMode(), this.drawModeActive = !1);
|
|
@@ -7174,15 +7281,15 @@ let C = class extends P {
|
|
|
7174
7281
|
}
|
|
7175
7282
|
handleSettingsChange(n) {
|
|
7176
7283
|
const e = n.detail;
|
|
7177
|
-
this.settings = e,
|
|
7284
|
+
this.settings = e, Ps(this.room, e), this.applySettings(e);
|
|
7178
7285
|
}
|
|
7179
7286
|
applySettings(n) {
|
|
7180
|
-
var e, t, i, s, o, r, a, l, d, c, h,
|
|
7287
|
+
var e, t, i, s, o, r, a, l, d, c, h, u, f, b, x, y, v;
|
|
7181
7288
|
if (!n.enabled) {
|
|
7182
7289
|
(e = this.cursorOverlay) == null || e.disable(), (t = this.viewportOverlay) == null || t.disable(), (i = this.selectionOverlay) == null || i.disable(), (s = this.drawingOverlay) == null || s.disable(), this.drawModeActive && ((o = this.drawingOverlay) == null || o.disableDrawMode(), this.drawModeActive = !1), (r = this.client) == null || r.setAppearOffline(!0), (a = this.commentPins) == null || a.setVisible(!1), this.followingUserId = null, this.pinModeActive && ((l = this.commentPins) == null || l.exitPinMode(), this.pinModeActive = !1), this.activePanel = this.activePanel === "settings" ? "settings" : null, this.highlightThreadId = null;
|
|
7183
7290
|
return;
|
|
7184
7291
|
}
|
|
7185
|
-
this.applyCursorSettings(n), (d = this.client) == null || d.setAppearOffline(n.appearOffline), (c = this.commentPins) == null || c.setVisible(n.showCommentPins), n.showViewportIndicators ? (h = this.viewportOverlay) == null || h.enable() : (
|
|
7292
|
+
this.applyCursorSettings(n), (d = this.client) == null || d.setAppearOffline(n.appearOffline), (c = this.commentPins) == null || c.setVisible(n.showCommentPins), n.showViewportIndicators ? (h = this.viewportOverlay) == null || h.enable() : (u = this.viewportOverlay) == null || u.disable(), n.showSelections ? (f = this.selectionOverlay) == null || f.enable() : (b = this.selectionOverlay) == null || b.disable(), n.showDrawings ? (x = this.drawingOverlay) == null || x.enable() : ((y = this.drawingOverlay) == null || y.disable(), this.drawModeActive && ((v = this.drawingOverlay) == null || v.disableDrawMode(), this.drawModeActive = !1));
|
|
7186
7293
|
}
|
|
7187
7294
|
applyCursorSettings(n) {
|
|
7188
7295
|
if (!this.cursorOverlay) return;
|
|
@@ -7196,22 +7303,22 @@ let C = class extends P {
|
|
|
7196
7303
|
* the trigger element, flipping vertically/horizontally as needed.
|
|
7197
7304
|
*/
|
|
7198
7305
|
positionPopups() {
|
|
7199
|
-
var
|
|
7200
|
-
const n = this.display === "inline", e = (
|
|
7306
|
+
var b, x, y, v;
|
|
7307
|
+
const n = this.display === "inline", e = (b = this.shadowRoot) == null ? void 0 : b.querySelector(".inline-trigger"), t = (x = this.shadowRoot) == null ? void 0 : x.querySelector("pulse-widget-toolbar"), i = n ? e : t;
|
|
7201
7308
|
if (!i) return;
|
|
7202
|
-
const s = i.getBoundingClientRect(), o = window.innerWidth, r = window.innerHeight, a = 8, l = (
|
|
7309
|
+
const s = i.getBoundingClientRect(), o = window.innerWidth, r = window.innerHeight, a = 8, l = (y = this.shadowRoot) == null ? void 0 : y.querySelector(".toolbar-popover");
|
|
7203
7310
|
if (l) {
|
|
7204
7311
|
Object.assign(l.style, { top: "auto", left: "auto" });
|
|
7205
|
-
const
|
|
7206
|
-
l.style.top = `${
|
|
7312
|
+
const $ = l.getBoundingClientRect(), T = this.computePosition(s, $, o, r, a);
|
|
7313
|
+
l.style.top = `${T.top}px`, l.style.left = `${T.left}px`;
|
|
7207
7314
|
}
|
|
7208
|
-
const d = (
|
|
7315
|
+
const d = (v = this.shadowRoot) == null ? void 0 : v.querySelector(".panel-container");
|
|
7209
7316
|
if (!d) return;
|
|
7210
7317
|
Object.assign(d.style, { top: "auto", left: "auto" });
|
|
7211
7318
|
const c = l ?? t;
|
|
7212
7319
|
if (!c) return;
|
|
7213
|
-
const h = c.getBoundingClientRect(),
|
|
7214
|
-
d.style.top = `${
|
|
7320
|
+
const h = c.getBoundingClientRect(), u = d.getBoundingClientRect(), f = this.computePosition(h, u, o, r, a);
|
|
7321
|
+
d.style.top = `${f.top}px`, d.style.left = `${f.left}px`;
|
|
7215
7322
|
}
|
|
7216
7323
|
computePosition(n, e, t, i, s) {
|
|
7217
7324
|
const o = n.top, r = i - n.bottom;
|
|
@@ -7230,13 +7337,13 @@ let C = class extends P {
|
|
|
7230
7337
|
return (n == null ? void 0 : n.user.name) ?? "user";
|
|
7231
7338
|
}
|
|
7232
7339
|
renderConnectionBanner() {
|
|
7233
|
-
return this.showConnectedFlash ?
|
|
7340
|
+
return this.showConnectedFlash ? p`<div class="connection-banner connected">
|
|
7234
7341
|
<span class="connection-dot"></span>Connected
|
|
7235
|
-
</div>` : this.connectionState === "connecting" ?
|
|
7342
|
+
</div>` : this.connectionState === "connecting" ? p`<div class="connection-banner connecting">
|
|
7236
7343
|
<span class="connection-dot"></span>Reconnecting...
|
|
7237
|
-
</div>` : this.connectionState === "disconnected" && this.client ?
|
|
7344
|
+
</div>` : this.connectionState === "disconnected" && this.client ? p`<div class="connection-banner disconnected">
|
|
7238
7345
|
<span class="connection-dot"></span>Disconnected
|
|
7239
|
-
</div>` :
|
|
7346
|
+
</div>` : g;
|
|
7240
7347
|
}
|
|
7241
7348
|
handleToolbarToggle() {
|
|
7242
7349
|
this.collapsed = !this.collapsed, this.collapsed && (this.activePanel = null, this.highlightThreadId = null);
|
|
@@ -7244,38 +7351,38 @@ let C = class extends P {
|
|
|
7244
7351
|
render() {
|
|
7245
7352
|
const n = this.display === "inline";
|
|
7246
7353
|
if (n && this.collapsed)
|
|
7247
|
-
return
|
|
7354
|
+
return p`
|
|
7248
7355
|
<div class="widget-root">
|
|
7249
7356
|
<div class="inline-trigger" @click=${this.handleToolbarToggle}>
|
|
7250
7357
|
<slot>Collaborate</slot>
|
|
7251
7358
|
</div>
|
|
7252
7359
|
</div>
|
|
7253
7360
|
`;
|
|
7254
|
-
const e = this.activePanel ?
|
|
7361
|
+
const e = this.activePanel ? p`
|
|
7255
7362
|
<div class="panel-container anchored" @panel-close=${this.handlePanelClose}>
|
|
7256
|
-
${this.activePanel === "comments" ?
|
|
7363
|
+
${this.activePanel === "comments" ? p`<pulse-widget-comments-panel
|
|
7257
7364
|
.client=${this.client}
|
|
7258
7365
|
.highlightThreadId=${this.highlightThreadId}
|
|
7259
|
-
></pulse-widget-comments-panel>` :
|
|
7260
|
-
${this.activePanel === "settings" ?
|
|
7366
|
+
></pulse-widget-comments-panel>` : g}
|
|
7367
|
+
${this.activePanel === "settings" ? p`<pulse-widget-settings-panel
|
|
7261
7368
|
.settings=${this.settings}
|
|
7262
7369
|
.roomId=${this.room}
|
|
7263
7370
|
@settings-change=${this.handleSettingsChange}
|
|
7264
|
-
></pulse-widget-settings-panel>` :
|
|
7265
|
-
${this.activePanel === "notifications" ?
|
|
7371
|
+
></pulse-widget-settings-panel>` : g}
|
|
7372
|
+
${this.activePanel === "notifications" ? p`<pulse-widget-notifications-panel
|
|
7266
7373
|
.client=${this.client}
|
|
7267
|
-
></pulse-widget-notifications-panel>` :
|
|
7268
|
-
${this.activePanel === "activity" ?
|
|
7374
|
+
></pulse-widget-notifications-panel>` : g}
|
|
7375
|
+
${this.activePanel === "activity" ? p`<pulse-widget-activity-panel
|
|
7269
7376
|
.client=${this.client}
|
|
7270
|
-
></pulse-widget-activity-panel>` :
|
|
7377
|
+
></pulse-widget-activity-panel>` : g}
|
|
7271
7378
|
</div>
|
|
7272
|
-
` :
|
|
7379
|
+
` : g, t = this.followingUserId ? p`<div class="follow-banner">
|
|
7273
7380
|
Following ${this.getFollowUserName()}
|
|
7274
7381
|
<button @click=${() => {
|
|
7275
7382
|
this.followingUserId = null;
|
|
7276
7383
|
}}>Stop</button>
|
|
7277
|
-
</div>` :
|
|
7278
|
-
return n ?
|
|
7384
|
+
</div>` : g;
|
|
7385
|
+
return n ? p`
|
|
7279
7386
|
${t}
|
|
7280
7387
|
<div class="widget-root">
|
|
7281
7388
|
<div class="inline-trigger" @click=${this.handleToolbarToggle}>
|
|
@@ -7300,7 +7407,7 @@ let C = class extends P {
|
|
|
7300
7407
|
</div>
|
|
7301
7408
|
${e}
|
|
7302
7409
|
</div>
|
|
7303
|
-
` :
|
|
7410
|
+
` : p`
|
|
7304
7411
|
${t}
|
|
7305
7412
|
<div class="widget-root">
|
|
7306
7413
|
${e}
|
|
@@ -7501,55 +7608,55 @@ C.styles = [
|
|
|
7501
7608
|
}
|
|
7502
7609
|
`
|
|
7503
7610
|
];
|
|
7504
|
-
|
|
7505
|
-
|
|
7611
|
+
P([
|
|
7612
|
+
w({ attribute: "api-key" })
|
|
7506
7613
|
], C.prototype, "apiKey", 2);
|
|
7507
|
-
|
|
7508
|
-
|
|
7614
|
+
P([
|
|
7615
|
+
w()
|
|
7509
7616
|
], C.prototype, "token", 2);
|
|
7510
|
-
|
|
7511
|
-
|
|
7617
|
+
P([
|
|
7618
|
+
w()
|
|
7512
7619
|
], C.prototype, "room", 2);
|
|
7513
|
-
|
|
7514
|
-
|
|
7620
|
+
P([
|
|
7621
|
+
w()
|
|
7515
7622
|
], C.prototype, "endpoint", 2);
|
|
7516
|
-
|
|
7517
|
-
|
|
7623
|
+
P([
|
|
7624
|
+
w({ reflect: !0 })
|
|
7518
7625
|
], C.prototype, "position", 2);
|
|
7519
|
-
|
|
7520
|
-
|
|
7626
|
+
P([
|
|
7627
|
+
w({ reflect: !0 })
|
|
7521
7628
|
], C.prototype, "display", 2);
|
|
7522
|
-
|
|
7523
|
-
|
|
7629
|
+
P([
|
|
7630
|
+
k()
|
|
7524
7631
|
], C.prototype, "collapsed", 2);
|
|
7525
|
-
|
|
7526
|
-
|
|
7632
|
+
P([
|
|
7633
|
+
k()
|
|
7527
7634
|
], C.prototype, "activePanel", 2);
|
|
7528
|
-
|
|
7529
|
-
|
|
7635
|
+
P([
|
|
7636
|
+
k()
|
|
7530
7637
|
], C.prototype, "pinModeActive", 2);
|
|
7531
|
-
|
|
7532
|
-
|
|
7638
|
+
P([
|
|
7639
|
+
k()
|
|
7533
7640
|
], C.prototype, "highlightThreadId", 2);
|
|
7534
|
-
|
|
7535
|
-
|
|
7641
|
+
P([
|
|
7642
|
+
k()
|
|
7536
7643
|
], C.prototype, "settings", 2);
|
|
7537
|
-
|
|
7538
|
-
|
|
7644
|
+
P([
|
|
7645
|
+
k()
|
|
7539
7646
|
], C.prototype, "followingUserId", 2);
|
|
7540
|
-
|
|
7541
|
-
|
|
7647
|
+
P([
|
|
7648
|
+
k()
|
|
7542
7649
|
], C.prototype, "drawModeActive", 2);
|
|
7543
|
-
|
|
7544
|
-
|
|
7650
|
+
P([
|
|
7651
|
+
k()
|
|
7545
7652
|
], C.prototype, "connectionState", 2);
|
|
7546
|
-
|
|
7547
|
-
|
|
7653
|
+
P([
|
|
7654
|
+
k()
|
|
7548
7655
|
], C.prototype, "showConnectedFlash", 2);
|
|
7549
|
-
|
|
7550
|
-
|
|
7656
|
+
P([
|
|
7657
|
+
k()
|
|
7551
7658
|
], C.prototype, "envConfig", 2);
|
|
7552
|
-
C =
|
|
7659
|
+
C = P([
|
|
7553
7660
|
L("pulse-widget")
|
|
7554
7661
|
], C);
|
|
7555
7662
|
export {
|
|
@@ -7558,6 +7665,6 @@ export {
|
|
|
7558
7665
|
he as PulseNotifications,
|
|
7559
7666
|
Z as PulsePresence,
|
|
7560
7667
|
X as PulseProvider,
|
|
7561
|
-
|
|
7668
|
+
B as PulseReactions,
|
|
7562
7669
|
C as PulseWidget
|
|
7563
7670
|
};
|