@gamention/pulse-elements 0.1.17 → 0.1.19

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.
@@ -3,7 +3,7 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- let wt = class extends Event {
6
+ let kt = 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 wt = class extends Event {
18
18
  * Copyright 2021 Google LLC
19
19
  * SPDX-License-Identifier: BSD-3-Clause
20
20
  */
21
- let Ke = class {
21
+ let Ge = 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 Ke = class {
35
35
  this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
36
36
  }
37
37
  dispatchRequest() {
38
- this.host.dispatchEvent(new wt(this.context, this.host, this.t, this.subscribe));
38
+ this.host.dispatchEvent(new kt(this.context, this.host, this.t, this.subscribe));
39
39
  }
40
40
  };
41
41
  /**
@@ -43,7 +43,7 @@ let Ke = class {
43
43
  * Copyright 2021 Google LLC
44
44
  * SPDX-License-Identifier: BSD-3-Clause
45
45
  */
46
- let Ot = class {
46
+ let Lt = class {
47
47
  get value() {
48
48
  return this.o;
49
49
  }
@@ -76,11 +76,11 @@ let Ot = class {
76
76
  * Copyright 2021 Google LLC
77
77
  * SPDX-License-Identifier: BSD-3-Clause
78
78
  */
79
- let Rt = class extends Event {
79
+ let jt = 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
- }, Ge = class extends Ot {
83
+ }, Je = class extends Lt {
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 Rt = 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 wt(this.context, d, l, !0)));
93
+ for (const [l, { consumerHost: d }] of this.subscriptions) a.has(l) || (a.add(l), d.dispatchEvent(new kt(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
  }
@@ -98,7 +98,7 @@ let Rt = class extends Event {
98
98
  this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
99
99
  }
100
100
  hostConnected() {
101
- this.host.dispatchEvent(new Rt(this.context, this.host));
101
+ this.host.dispatchEvent(new jt(this.context, this.host));
102
102
  }
103
103
  };
104
104
  /**
@@ -106,7 +106,7 @@ let Rt = class extends Event {
106
106
  * Copyright 2017 Google LLC
107
107
  * SPDX-License-Identifier: BSD-3-Clause
108
108
  */
109
- function Lt({ context: n }) {
109
+ function zt({ 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 Lt({ 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 Ge(this, { context: n, initialValue: s })), s;
117
+ return i.set(this, new Je(this, { context: n, initialValue: s })), s;
118
118
  } };
119
119
  {
120
120
  e.constructor.addInitializer(((r) => {
121
- i.set(r, new Ge(r, { context: n }));
121
+ i.set(r, new Je(r, { context: n }));
122
122
  }));
123
123
  const s = Object.getOwnPropertyDescriptor(e, t);
124
124
  let o;
@@ -147,19 +147,31 @@ function Lt({ 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 Ke(this, { context: n, callback: (s) => {
150
+ new Ge(this, { context: n, callback: (s) => {
151
151
  t.set.call(this, s);
152
152
  }, subscribe: e });
153
153
  })) : t.constructor.addInitializer(((s) => {
154
- new Ke(s, { context: n, callback: (o) => {
154
+ new Ge(s, { context: n, callback: (o) => {
155
155
  s[i] = o;
156
156
  }, subscribe: e });
157
157
  }));
158
158
  };
159
159
  }
160
- var jt = Object.defineProperty, zt = (n, e, t) => e in n ? jt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, k = (n, e, t) => zt(n, typeof e != "symbol" ? e + "" : e, t);
161
- const Ut = "ws://localhost:4567";
162
- let De = class {
160
+ var Ut = Object.defineProperty, Dt = (n, e, t) => e in n ? Ut(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, k = (n, e, t) => Dt(n, typeof e != "symbol" ? e + "" : e, t);
161
+ const _e = {
162
+ allowImages: !0,
163
+ allowAudio: !0,
164
+ allowVideo: !0,
165
+ maxFileSizeMb: 10,
166
+ maxAttachmentsPerComment: 5,
167
+ allowReactions: !0,
168
+ allowDrawing: !0,
169
+ allowMentions: !0,
170
+ showCursors: !0,
171
+ showPresence: !0,
172
+ showTypingIndicators: !0
173
+ }, Ht = "ws://localhost:4567", Ze = 50, Nt = 3e4, Bt = 1e3, Ft = 3e4;
174
+ let He = class {
163
175
  constructor() {
164
176
  k(this, "handlers", /* @__PURE__ */ new Map());
165
177
  }
@@ -179,9 +191,9 @@ let De = class {
179
191
  removeAll() {
180
192
  this.handlers.clear();
181
193
  }
182
- }, Dt = class extends De {
194
+ }, qt = class extends He {
183
195
  constructor(e) {
184
- super(), k(this, "ws", null), k(this, "endpoint"), k(this, "reconnectAttempt", 0), k(this, "reconnectTimer", null), k(this, "_state", "disconnected"), this.endpoint = e ?? Ut;
196
+ super(), k(this, "ws", null), k(this, "endpoint"), k(this, "reconnectAttempt", 0), k(this, "reconnectTimer", null), k(this, "_state", "disconnected"), this.endpoint = e ?? Ht;
185
197
  }
186
198
  get state() {
187
199
  return this._state;
@@ -209,20 +221,23 @@ let De = class {
209
221
  }
210
222
  scheduleReconnect() {
211
223
  const e = Math.min(
212
- 1e3 * 2 ** this.reconnectAttempt,
213
- 3e4
224
+ Bt * 2 ** this.reconnectAttempt,
225
+ Ft
214
226
  );
215
227
  this.reconnectAttempt++, this.reconnectTimer = setTimeout(() => {
216
228
  this.reconnectTimer = null, this.connect();
217
229
  }, e);
218
230
  }
219
- }, Ht = class extends De {
231
+ }, Vt = class extends He {
220
232
  constructor() {
221
- super(...arguments), k(this, "baseUrl", ""), k(this, "_user", null), k(this, "_users", /* @__PURE__ */ new Map()), k(this, "_presence", /* @__PURE__ */ new Map()), k(this, "_threads", /* @__PURE__ */ new Map()), k(this, "_reactions", /* @__PURE__ */ new Map()), k(this, "_notifications", []), k(this, "_activityLogs", []), k(this, "_typing", /* @__PURE__ */ new Map()), k(this, "_viewports", /* @__PURE__ */ new Map()), k(this, "_selections", /* @__PURE__ */ new Map());
233
+ super(...arguments), k(this, "baseUrl", ""), k(this, "_user", null), k(this, "_config", { ..._e }), k(this, "_users", /* @__PURE__ */ new Map()), k(this, "_presence", /* @__PURE__ */ new Map()), k(this, "_threads", /* @__PURE__ */ new Map()), k(this, "_reactions", /* @__PURE__ */ new Map()), k(this, "_notifications", []), k(this, "_activityLogs", []), k(this, "_typing", /* @__PURE__ */ new Map()), k(this, "_viewports", /* @__PURE__ */ new Map()), k(this, "_selections", /* @__PURE__ */ new Map());
222
234
  }
223
235
  get user() {
224
236
  return this._user;
225
237
  }
238
+ get config() {
239
+ return this._config;
240
+ }
226
241
  /** Optimistically remove a comment from local state (before server round-trip). */
227
242
  removeComment(e) {
228
243
  for (const [t, i] of this._threads) {
@@ -306,7 +321,7 @@ let De = class {
306
321
  handleMessage(e) {
307
322
  switch (e.type) {
308
323
  case "auth:ok":
309
- this._user = e.user, this._users.clear();
324
+ this._config = e.config ?? { ..._e }, this._user = e.user, this._users.clear();
310
325
  for (const t of e.users) this._users.set(t.id, t);
311
326
  this._presence.clear();
312
327
  for (const t of e.presence)
@@ -436,14 +451,14 @@ let De = class {
436
451
  }
437
452
  }
438
453
  reset() {
439
- this._user = null, 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();
454
+ 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();
440
455
  }
441
- }, $t = class extends De {
456
+ }, Et = class extends He {
442
457
  constructor(e) {
443
458
  var t;
444
- super(), k(this, "state"), k(this, "connection"), k(this, "config"), k(this, "heartbeatTimer", null), k(this, "lastCursorSend", 0), k(this, "pendingCursor", null), k(this, "cursorTimer", null), this.config = e, this.state = new Ht(), this.state.baseUrl = (e.endpoint ?? "").replace(/^ws(s?):/, "http$1:").replace(/\/$/, "");
459
+ super(), k(this, "state"), k(this, "connection"), k(this, "config"), k(this, "heartbeatTimer", null), k(this, "lastCursorSend", 0), k(this, "pendingCursor", null), k(this, "cursorTimer", null), this.config = e, this.state = new Vt(), this.state.baseUrl = (e.endpoint ?? "").replace(/^ws(s?):/, "http$1:").replace(/\/$/, "");
445
460
  const i = ((t = e.endpoint) == null ? void 0 : t.replace(/^http/, "ws")) ?? void 0;
446
- this.connection = new Dt(i), this.connection.on("message", (s) => {
461
+ this.connection = new qt(i), this.connection.on("message", (s) => {
447
462
  this.state.handleMessage(s), this.emit(s.type, s);
448
463
  }), this.connection.on("state", (s) => {
449
464
  this.emit("connection", s), s === "connected" ? (this.authenticate(), this.startHeartbeat()) : s === "disconnected" && this.stopHeartbeat();
@@ -473,9 +488,9 @@ let De = class {
473
488
  // ── Cursors ──
474
489
  moveCursor(e) {
475
490
  const t = Date.now();
476
- this.pendingCursor = e, t - this.lastCursorSend >= 50 ? this.flushCursor() : this.cursorTimer || (this.cursorTimer = setTimeout(() => {
491
+ this.pendingCursor = e, t - this.lastCursorSend >= Ze ? this.flushCursor() : this.cursorTimer || (this.cursorTimer = setTimeout(() => {
477
492
  this.cursorTimer = null, this.flushCursor();
478
- }, 50));
493
+ }, Ze));
479
494
  }
480
495
  flushCursor() {
481
496
  this.pendingCursor && (this.send({ type: "cursor:move", position: this.pendingCursor }), this.lastCursorSend = Date.now(), this.pendingCursor = null);
@@ -487,7 +502,7 @@ let De = class {
487
502
  startHeartbeat() {
488
503
  this.heartbeatTimer = setInterval(() => {
489
504
  this.send({ type: "presence:update", status: "online" });
490
- }, 3e4);
505
+ }, Nt);
491
506
  }
492
507
  stopHeartbeat() {
493
508
  this.heartbeatTimer && (clearInterval(this.heartbeatTimer), this.heartbeatTimer = null);
@@ -587,18 +602,18 @@ let De = class {
587
602
  * Copyright 2019 Google LLC
588
603
  * SPDX-License-Identifier: BSD-3-Clause
589
604
  */
590
- const ye = globalThis, He = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ne = Symbol(), Je = /* @__PURE__ */ new WeakMap();
591
- let kt = class {
605
+ const ye = globalThis, Ne = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Be = Symbol(), Qe = /* @__PURE__ */ new WeakMap();
606
+ let Ct = class {
592
607
  constructor(e, t, i) {
593
- if (this._$cssResult$ = !0, i !== Ne) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
608
+ if (this._$cssResult$ = !0, i !== Be) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
594
609
  this.cssText = e, this.t = t;
595
610
  }
596
611
  get styleSheet() {
597
612
  let e = this.o;
598
613
  const t = this.t;
599
- if (He && e === void 0) {
614
+ if (Ne && e === void 0) {
600
615
  const i = t !== void 0 && t.length === 1;
601
- i && (e = Je.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && Je.set(t, e));
616
+ i && (e = Qe.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && Qe.set(t, e));
602
617
  }
603
618
  return e;
604
619
  }
@@ -606,33 +621,33 @@ let kt = class {
606
621
  return this.cssText;
607
622
  }
608
623
  };
609
- const Nt = (n) => new kt(typeof n == "string" ? n : n + "", void 0, Ne), M = (n, ...e) => {
624
+ const Wt = (n) => new Ct(typeof n == "string" ? n : n + "", void 0, Be), M = (n, ...e) => {
610
625
  const t = n.length === 1 ? n[0] : e.reduce((i, s, o) => i + ((r) => {
611
626
  if (r._$cssResult$ === !0) return r.cssText;
612
627
  if (typeof r == "number") return r;
613
628
  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.");
614
629
  })(s) + n[o + 1], n[0]);
615
- return new kt(t, n, Ne);
616
- }, Bt = (n, e) => {
617
- if (He) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
630
+ return new Ct(t, n, Be);
631
+ }, Xt = (n, e) => {
632
+ if (Ne) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
618
633
  else for (const t of e) {
619
634
  const i = document.createElement("style"), s = ye.litNonce;
620
635
  s !== void 0 && i.setAttribute("nonce", s), i.textContent = t.cssText, n.appendChild(i);
621
636
  }
622
- }, Ze = He ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
637
+ }, et = Ne ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
623
638
  let t = "";
624
639
  for (const i of e.cssRules) t += i.cssText;
625
- return Nt(t);
640
+ return Wt(t);
626
641
  })(n) : n;
627
642
  /**
628
643
  * @license
629
644
  * Copyright 2017 Google LLC
630
645
  * SPDX-License-Identifier: BSD-3-Clause
631
646
  */
632
- const { is: Ft, defineProperty: qt, getOwnPropertyDescriptor: Vt, getOwnPropertyNames: Wt, getOwnPropertySymbols: Xt, getPrototypeOf: Yt } = Object, H = globalThis, Qe = H.trustedTypes, Kt = Qe ? Qe.emptyScript : "", _e = H.reactiveElementPolyfillSupport, ne = (n, e) => n, ke = { toAttribute(n, e) {
647
+ const { is: Yt, defineProperty: Kt, getOwnPropertyDescriptor: Gt, getOwnPropertyNames: Jt, getOwnPropertySymbols: Zt, getPrototypeOf: Qt } = Object, H = globalThis, tt = H.trustedTypes, ei = tt ? tt.emptyScript : "", Ie = H.reactiveElementPolyfillSupport, ne = (n, e) => n, ke = { toAttribute(n, e) {
633
648
  switch (e) {
634
649
  case Boolean:
635
- n = n ? Kt : null;
650
+ n = n ? ei : null;
636
651
  break;
637
652
  case Object:
638
653
  case Array:
@@ -657,7 +672,7 @@ const { is: Ft, defineProperty: qt, getOwnPropertyDescriptor: Vt, getOwnProperty
657
672
  }
658
673
  }
659
674
  return t;
660
- } }, Be = (n, e) => !Ft(n, e), et = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: Be };
675
+ } }, Fe = (n, e) => !Yt(n, e), it = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: Fe };
661
676
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), H.litPropertyMetadata ?? (H.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
662
677
  let G = class extends HTMLElement {
663
678
  static addInitializer(e) {
@@ -666,14 +681,14 @@ let G = class extends HTMLElement {
666
681
  static get observedAttributes() {
667
682
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
668
683
  }
669
- static createProperty(e, t = et) {
684
+ static createProperty(e, t = it) {
670
685
  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) {
671
686
  const i = Symbol(), s = this.getPropertyDescriptor(e, i, t);
672
- s !== void 0 && qt(this.prototype, e, s);
687
+ s !== void 0 && Kt(this.prototype, e, s);
673
688
  }
674
689
  }
675
690
  static getPropertyDescriptor(e, t, i) {
676
- const { get: s, set: o } = Vt(this.prototype, e) ?? { get() {
691
+ const { get: s, set: o } = Gt(this.prototype, e) ?? { get() {
677
692
  return this[t];
678
693
  }, set(r) {
679
694
  this[t] = r;
@@ -684,17 +699,17 @@ let G = class extends HTMLElement {
684
699
  }, configurable: !0, enumerable: !0 };
685
700
  }
686
701
  static getPropertyOptions(e) {
687
- return this.elementProperties.get(e) ?? et;
702
+ return this.elementProperties.get(e) ?? it;
688
703
  }
689
704
  static _$Ei() {
690
705
  if (this.hasOwnProperty(ne("elementProperties"))) return;
691
- const e = Yt(this);
706
+ const e = Qt(this);
692
707
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
693
708
  }
694
709
  static finalize() {
695
710
  if (this.hasOwnProperty(ne("finalized"))) return;
696
711
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ne("properties"))) {
697
- const t = this.properties, i = [...Wt(t), ...Xt(t)];
712
+ const t = this.properties, i = [...Jt(t), ...Zt(t)];
698
713
  for (const s of i) this.createProperty(s, t[s]);
699
714
  }
700
715
  const e = this[Symbol.metadata];
@@ -713,8 +728,8 @@ let G = class extends HTMLElement {
713
728
  const t = [];
714
729
  if (Array.isArray(e)) {
715
730
  const i = new Set(e.flat(1 / 0).reverse());
716
- for (const s of i) t.unshift(Ze(s));
717
- } else e !== void 0 && t.push(Ze(e));
731
+ for (const s of i) t.unshift(et(s));
732
+ } else e !== void 0 && t.push(et(e));
718
733
  return t;
719
734
  }
720
735
  static _$Eu(e, t) {
@@ -743,7 +758,7 @@ let G = class extends HTMLElement {
743
758
  }
744
759
  createRenderRoot() {
745
760
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
746
- return Bt(e, this.constructor.elementStyles), e;
761
+ return Xt(e, this.constructor.elementStyles), e;
747
762
  }
748
763
  connectedCallback() {
749
764
  var e;
@@ -786,7 +801,7 @@ let G = class extends HTMLElement {
786
801
  var r;
787
802
  if (e !== void 0) {
788
803
  const a = this.constructor;
789
- if (s === !1 && (o = this[e]), i ?? (i = a.getPropertyOptions(e)), !((i.hasChanged ?? Be)(o, t) || i.useDefault && i.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(e)) && !this.hasAttribute(a._$Eu(e, i)))) return;
804
+ if (s === !1 && (o = this[e]), i ?? (i = a.getPropertyOptions(e)), !((i.hasChanged ?? Fe)(o, t) || i.useDefault && i.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(e)) && !this.hasAttribute(a._$Eu(e, i)))) return;
790
805
  this.C(e, t, i);
791
806
  }
792
807
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
@@ -862,48 +877,48 @@ let G = class extends HTMLElement {
862
877
  firstUpdated(e) {
863
878
  }
864
879
  };
865
- G.elementStyles = [], G.shadowRootOptions = { mode: "open" }, G[ne("elementProperties")] = /* @__PURE__ */ new Map(), G[ne("finalized")] = /* @__PURE__ */ new Map(), _e == null || _e({ ReactiveElement: G }), (H.reactiveElementVersions ?? (H.reactiveElementVersions = [])).push("2.1.2");
880
+ G.elementStyles = [], G.shadowRootOptions = { mode: "open" }, G[ne("elementProperties")] = /* @__PURE__ */ new Map(), G[ne("finalized")] = /* @__PURE__ */ new Map(), Ie == null || Ie({ ReactiveElement: G }), (H.reactiveElementVersions ?? (H.reactiveElementVersions = [])).push("2.1.2");
866
881
  /**
867
882
  * @license
868
883
  * Copyright 2017 Google LLC
869
884
  * SPDX-License-Identifier: BSD-3-Clause
870
885
  */
871
- const oe = globalThis, tt = (n) => n, Ee = oe.trustedTypes, it = Ee ? Ee.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Et = "$lit$", D = `lit$${Math.random().toFixed(9).slice(2)}$`, Ct = "?" + D, Gt = `<${Ct}>`, V = document, ae = () => V.createComment(""), le = (n) => n === null || typeof n != "object" && typeof n != "function", Fe = Array.isArray, Jt = (n) => Fe(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Ie = `[
872
- \f\r]`, se = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g, nt = />/g, B = RegExp(`>|${Ie}(?:([^\\s"'>=/]+)(${Ie}*=${Ie}*(?:[^
873
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ot = /'/g, rt = /"/g, Tt = /^(?:script|style|textarea|title)$/i, St = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), u = St(1), Zt = St(2), W = Symbol.for("lit-noChange"), b = Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), F = V.createTreeWalker(V, 129);
874
- function At(n, e) {
875
- if (!Fe(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
876
- return it !== void 0 ? it.createHTML(e) : e;
886
+ const oe = globalThis, st = (n) => n, Ee = oe.trustedTypes, nt = Ee ? Ee.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Tt = "$lit$", D = `lit$${Math.random().toFixed(9).slice(2)}$`, St = "?" + D, ti = `<${St}>`, V = document, ae = () => V.createComment(""), le = (n) => n === null || typeof n != "object" && typeof n != "function", qe = Array.isArray, ii = (n) => qe(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Me = `[
887
+ \f\r]`, se = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ot = /-->/g, rt = />/g, B = RegExp(`>|${Me}(?:([^\\s"'>=/]+)(${Me}*=${Me}*(?:[^
888
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), at = /'/g, lt = /"/g, At = /^(?:script|style|textarea|title)$/i, Pt = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), u = Pt(1), si = Pt(2), W = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), ct = /* @__PURE__ */ new WeakMap(), F = V.createTreeWalker(V, 129);
889
+ function _t(n, e) {
890
+ if (!qe(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
891
+ return nt !== void 0 ? nt.createHTML(e) : e;
877
892
  }
878
- const Qt = (n, e) => {
893
+ const ni = (n, e) => {
879
894
  const t = n.length - 1, i = [];
880
895
  let s, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", r = se;
881
896
  for (let a = 0; a < t; a++) {
882
897
  const l = n[a];
883
898
  let d, c, h = -1, p = 0;
884
- for (; p < l.length && (r.lastIndex = p, c = r.exec(l), c !== null); ) p = r.lastIndex, r === se ? c[1] === "!--" ? r = st : c[1] !== void 0 ? r = nt : c[2] !== void 0 ? (Tt.test(c[2]) && (s = RegExp("</" + c[2], "g")), r = B) : c[3] !== void 0 && (r = B) : r === B ? 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 ? B : c[3] === '"' ? rt : ot) : r === rt || r === ot ? r = B : r === st || r === nt ? r = se : (r = B, s = void 0);
899
+ for (; p < l.length && (r.lastIndex = p, c = r.exec(l), c !== null); ) p = r.lastIndex, r === se ? c[1] === "!--" ? r = ot : c[1] !== void 0 ? r = rt : c[2] !== void 0 ? (At.test(c[2]) && (s = RegExp("</" + c[2], "g")), r = B) : c[3] !== void 0 && (r = B) : r === B ? 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 ? B : c[3] === '"' ? lt : at) : r === lt || r === at ? r = B : r === ot || r === rt ? r = se : (r = B, s = void 0);
885
900
  const m = r === B && n[a + 1].startsWith("/>") ? " " : "";
886
- o += r === se ? l + Gt : h >= 0 ? (i.push(d), l.slice(0, h) + Et + l.slice(h) + D + m) : l + D + (h === -2 ? a : m);
901
+ o += r === se ? l + ti : h >= 0 ? (i.push(d), l.slice(0, h) + Tt + l.slice(h) + D + m) : l + D + (h === -2 ? a : m);
887
902
  }
888
- return [At(n, o + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
903
+ return [_t(n, o + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
889
904
  };
890
905
  class ce {
891
906
  constructor({ strings: e, _$litType$: t }, i) {
892
907
  let s;
893
908
  this.parts = [];
894
909
  let o = 0, r = 0;
895
- const a = e.length - 1, l = this.parts, [d, c] = Qt(e, t);
910
+ const a = e.length - 1, l = this.parts, [d, c] = ni(e, t);
896
911
  if (this.el = ce.createElement(d, i), F.currentNode = this.el.content, t === 2 || t === 3) {
897
912
  const h = this.el.content.firstChild;
898
913
  h.replaceWith(...h.childNodes);
899
914
  }
900
915
  for (; (s = F.nextNode()) !== null && l.length < a; ) {
901
916
  if (s.nodeType === 1) {
902
- if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Et)) {
917
+ if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Tt)) {
903
918
  const p = c[r++], m = s.getAttribute(h).split(D), g = /([.?@])?(.*)/.exec(p);
904
- l.push({ type: 1, index: o, name: g[2], strings: m, ctor: g[1] === "." ? ti : g[1] === "?" ? ii : g[1] === "@" ? si : Se }), s.removeAttribute(h);
919
+ l.push({ type: 1, index: o, name: g[2], strings: m, ctor: g[1] === "." ? ri : g[1] === "?" ? ai : g[1] === "@" ? li : Se }), s.removeAttribute(h);
905
920
  } else h.startsWith(D) && (l.push({ type: 6, index: o }), s.removeAttribute(h));
906
- if (Tt.test(s.tagName)) {
921
+ if (At.test(s.tagName)) {
907
922
  const h = s.textContent.split(D), p = h.length - 1;
908
923
  if (p > 0) {
909
924
  s.textContent = Ee ? Ee.emptyScript : "";
@@ -911,7 +926,7 @@ class ce {
911
926
  s.append(h[p], ae());
912
927
  }
913
928
  }
914
- } else if (s.nodeType === 8) if (s.data === Ct) l.push({ type: 2, index: o });
929
+ } else if (s.nodeType === 8) if (s.data === St) l.push({ type: 2, index: o });
915
930
  else {
916
931
  let h = -1;
917
932
  for (; (h = s.data.indexOf(D, h + 1)) !== -1; ) l.push({ type: 7, index: o }), h += D.length - 1;
@@ -931,7 +946,7 @@ function J(n, e, t = n, i) {
931
946
  const o = le(e) ? void 0 : e._$litDirective$;
932
947
  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;
933
948
  }
934
- class ei {
949
+ class oi {
935
950
  constructor(e, t) {
936
951
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
937
952
  }
@@ -948,7 +963,7 @@ class ei {
948
963
  for (; l !== void 0; ) {
949
964
  if (r === l.index) {
950
965
  let d;
951
- 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 ni(o, this, e)), this._$AV.push(d), l = i[++a];
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 ci(o, this, e)), this._$AV.push(d), l = i[++a];
952
967
  }
953
968
  r !== (l == null ? void 0 : l.index) && (o = F.nextNode(), r++);
954
969
  }
@@ -965,7 +980,7 @@ class me {
965
980
  return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
966
981
  }
967
982
  constructor(e, t, i, s) {
968
- this.type = 2, this._$AH = b, 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;
983
+ this.type = 2, this._$AH = v, 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;
969
984
  }
970
985
  get parentNode() {
971
986
  let e = this._$AA.parentNode;
@@ -979,7 +994,7 @@ class me {
979
994
  return this._$AB;
980
995
  }
981
996
  _$AI(e, t = this) {
982
- e = J(this, e, t), le(e) ? e === b || e == null || e === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : e !== this._$AH && e !== W && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Jt(e) ? this.k(e) : this._(e);
997
+ e = J(this, e, t), le(e) ? e === v || e == null || e === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : e !== this._$AH && e !== W && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ii(e) ? this.k(e) : this._(e);
983
998
  }
984
999
  O(e) {
985
1000
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -988,23 +1003,23 @@ class me {
988
1003
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
989
1004
  }
990
1005
  _(e) {
991
- this._$AH !== b && le(this._$AH) ? this._$AA.nextSibling.data = e : this.T(V.createTextNode(e)), this._$AH = e;
1006
+ this._$AH !== v && le(this._$AH) ? this._$AA.nextSibling.data = e : this.T(V.createTextNode(e)), this._$AH = e;
992
1007
  }
993
1008
  $(e) {
994
1009
  var o;
995
- const { values: t, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = ce.createElement(At(i.h, i.h[0]), this.options)), i);
1010
+ const { values: t, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = ce.createElement(_t(i.h, i.h[0]), this.options)), i);
996
1011
  if (((o = this._$AH) == null ? void 0 : o._$AD) === s) this._$AH.p(t);
997
1012
  else {
998
- const r = new ei(s, this), a = r.u(this.options);
1013
+ const r = new oi(s, this), a = r.u(this.options);
999
1014
  r.p(t), this.T(a), this._$AH = r;
1000
1015
  }
1001
1016
  }
1002
1017
  _$AC(e) {
1003
- let t = at.get(e.strings);
1004
- return t === void 0 && at.set(e.strings, t = new ce(e)), t;
1018
+ let t = ct.get(e.strings);
1019
+ return t === void 0 && ct.set(e.strings, t = new ce(e)), t;
1005
1020
  }
1006
1021
  k(e) {
1007
- Fe(this._$AH) || (this._$AH = [], this._$AR());
1022
+ qe(this._$AH) || (this._$AH = [], this._$AR());
1008
1023
  const t = this._$AH;
1009
1024
  let i, s = 0;
1010
1025
  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++;
@@ -1013,8 +1028,8 @@ class me {
1013
1028
  _$AR(e = this._$AA.nextSibling, t) {
1014
1029
  var i;
1015
1030
  for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, t); e !== this._$AB; ) {
1016
- const s = tt(e).nextSibling;
1017
- tt(e).remove(), e = s;
1031
+ const s = st(e).nextSibling;
1032
+ st(e).remove(), e = s;
1018
1033
  }
1019
1034
  }
1020
1035
  setConnected(e) {
@@ -1030,7 +1045,7 @@ class Se {
1030
1045
  return this._$AM._$AU;
1031
1046
  }
1032
1047
  constructor(e, t, i, s, o) {
1033
- this.type = 1, this._$AH = b, 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 = b;
1048
+ this.type = 1, this._$AH = v, 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 = v;
1034
1049
  }
1035
1050
  _$AI(e, t = this, i, s) {
1036
1051
  const o = this.strings;
@@ -1039,37 +1054,37 @@ class Se {
1039
1054
  else {
1040
1055
  const a = e;
1041
1056
  let l, d;
1042
- 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 === b ? e = b : e !== b && (e += (d ?? "") + o[l + 1]), this._$AH[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 === v ? e = v : e !== v && (e += (d ?? "") + o[l + 1]), this._$AH[l] = d;
1043
1058
  }
1044
1059
  r && !s && this.j(e);
1045
1060
  }
1046
1061
  j(e) {
1047
- e === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
1062
+ e === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
1048
1063
  }
1049
1064
  }
1050
- class ti extends Se {
1065
+ class ri extends Se {
1051
1066
  constructor() {
1052
1067
  super(...arguments), this.type = 3;
1053
1068
  }
1054
1069
  j(e) {
1055
- this.element[this.name] = e === b ? void 0 : e;
1070
+ this.element[this.name] = e === v ? void 0 : e;
1056
1071
  }
1057
1072
  }
1058
- class ii extends Se {
1073
+ class ai extends Se {
1059
1074
  constructor() {
1060
1075
  super(...arguments), this.type = 4;
1061
1076
  }
1062
1077
  j(e) {
1063
- this.element.toggleAttribute(this.name, !!e && e !== b);
1078
+ this.element.toggleAttribute(this.name, !!e && e !== v);
1064
1079
  }
1065
1080
  }
1066
- class si extends Se {
1081
+ class li extends Se {
1067
1082
  constructor(e, t, i, s, o) {
1068
1083
  super(e, t, i, s, o), this.type = 5;
1069
1084
  }
1070
1085
  _$AI(e, t = this) {
1071
- if ((e = J(this, e, t, 0) ?? b) === W) return;
1072
- const i = this._$AH, s = e === b && i !== b || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== b && (i === b || s);
1086
+ if ((e = J(this, e, t, 0) ?? v) === W) return;
1087
+ const i = this._$AH, s = e === v && i !== v || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== v && (i === v || s);
1073
1088
  s && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
1074
1089
  }
1075
1090
  handleEvent(e) {
@@ -1077,7 +1092,7 @@ class si extends Se {
1077
1092
  typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
1078
1093
  }
1079
1094
  }
1080
- class ni {
1095
+ class ci {
1081
1096
  constructor(e, t, i) {
1082
1097
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
1083
1098
  }
@@ -1088,9 +1103,9 @@ class ni {
1088
1103
  J(this, e);
1089
1104
  }
1090
1105
  }
1091
- const Me = oe.litHtmlPolyfillSupport;
1092
- Me == null || Me(ce, me), (oe.litHtmlVersions ?? (oe.litHtmlVersions = [])).push("3.3.2");
1093
- const oi = (n, e, t) => {
1106
+ const Oe = oe.litHtmlPolyfillSupport;
1107
+ Oe == null || Oe(ce, me), (oe.litHtmlVersions ?? (oe.litHtmlVersions = [])).push("3.3.2");
1108
+ const di = (n, e, t) => {
1094
1109
  const i = (t == null ? void 0 : t.renderBefore) ?? e;
1095
1110
  let s = i._$litPart$;
1096
1111
  if (s === void 0) {
@@ -1116,7 +1131,7 @@ let A = class extends G {
1116
1131
  }
1117
1132
  update(e) {
1118
1133
  const t = this.render();
1119
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = oi(t, this.renderRoot, this.renderOptions);
1134
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = di(t, this.renderRoot, this.renderOptions);
1120
1135
  }
1121
1136
  connectedCallback() {
1122
1137
  var e;
@@ -1130,10 +1145,10 @@ let A = class extends G {
1130
1145
  return W;
1131
1146
  }
1132
1147
  };
1133
- var yt;
1134
- A._$litElement$ = !0, A.finalized = !0, (yt = q.litElementHydrateSupport) == null || yt.call(q, { LitElement: A });
1135
- const Oe = q.litElementPolyfillSupport;
1136
- Oe == null || Oe({ LitElement: A });
1148
+ var $t;
1149
+ A._$litElement$ = !0, A.finalized = !0, ($t = q.litElementHydrateSupport) == null || $t.call(q, { LitElement: A });
1150
+ const Re = q.litElementPolyfillSupport;
1151
+ Re == null || Re({ LitElement: A });
1137
1152
  (q.litElementVersions ?? (q.litElementVersions = [])).push("4.2.2");
1138
1153
  /**
1139
1154
  * @license
@@ -1150,7 +1165,7 @@ const L = (n) => (e, t) => {
1150
1165
  * Copyright 2017 Google LLC
1151
1166
  * SPDX-License-Identifier: BSD-3-Clause
1152
1167
  */
1153
- const ri = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: Be }, ai = (n = ri, e, t) => {
1168
+ const hi = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: Fe }, pi = (n = hi, e, t) => {
1154
1169
  const { kind: i, metadata: s } = t;
1155
1170
  let o = globalThis.litPropertyMetadata.get(s);
1156
1171
  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") {
@@ -1172,7 +1187,7 @@ const ri = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged
1172
1187
  throw Error("Unsupported decorator location: " + i);
1173
1188
  };
1174
1189
  function x(n) {
1175
- return (e, t) => typeof t == "object" ? ai(n, e, t) : ((i, s, o) => {
1190
+ return (e, t) => typeof t == "object" ? pi(n, e, t) : ((i, s, o) => {
1176
1191
  const r = s.hasOwnProperty(o);
1177
1192
  return s.constructor.createProperty(o, i), r ? Object.getOwnPropertyDescriptor(s, o) : void 0;
1178
1193
  })(n, e, t);
@@ -1186,10 +1201,10 @@ function $(n) {
1186
1201
  return x({ ...n, state: !0, attribute: !1 });
1187
1202
  }
1188
1203
  const Q = "pulse-client";
1189
- var li = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, ee = (n, e, t, i) => {
1190
- for (var s = i > 1 ? void 0 : i ? ci(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1204
+ var ui = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, ee = (n, e, t, i) => {
1205
+ for (var s = i > 1 ? void 0 : i ? fi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1191
1206
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1192
- return i && s && li(e, t, s), s;
1207
+ return i && s && ui(e, t, s), s;
1193
1208
  };
1194
1209
  let X = class extends A {
1195
1210
  constructor() {
@@ -1203,7 +1218,7 @@ let X = class extends A {
1203
1218
  room: this.room,
1204
1219
  endpoint: this.endpoint
1205
1220
  };
1206
- this.client = new $t(n), this.client.connect();
1221
+ this.client = new Et(n), this.client.connect();
1207
1222
  }
1208
1223
  disconnectedCallback() {
1209
1224
  var n;
@@ -1226,15 +1241,15 @@ ee([
1226
1241
  x()
1227
1242
  ], X.prototype, "endpoint", 2);
1228
1243
  ee([
1229
- Lt({ context: Q })
1244
+ zt({ context: Q })
1230
1245
  ], X.prototype, "client", 2);
1231
1246
  X = ee([
1232
1247
  L("pulse-provider")
1233
1248
  ], X);
1234
- var di = Object.defineProperty, hi = Object.getOwnPropertyDescriptor, Ae = (n, e, t, i) => {
1235
- for (var s = i > 1 ? void 0 : i ? hi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1249
+ var mi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, Ae = (n, e, t, i) => {
1250
+ for (var s = i > 1 ? void 0 : i ? gi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1236
1251
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1237
- return i && s && di(e, t, s), s;
1252
+ return i && s && mi(e, t, s), s;
1238
1253
  };
1239
1254
  let Z = class extends A {
1240
1255
  constructor() {
@@ -1397,10 +1412,10 @@ Ae([
1397
1412
  Z = Ae([
1398
1413
  L("pulse-presence")
1399
1414
  ], Z);
1400
- var pi = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, qe = (n, e, t, i) => {
1401
- for (var s = i > 1 ? void 0 : i ? ui(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1415
+ var vi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Ve = (n, e, t, i) => {
1416
+ for (var s = i > 1 ? void 0 : i ? bi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1402
1417
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1403
- return i && s && pi(e, t, s), s;
1418
+ return i && s && vi(e, t, s), s;
1404
1419
  };
1405
1420
  let de = class extends A {
1406
1421
  constructor() {
@@ -1516,20 +1531,20 @@ de.styles = M`
1516
1531
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
1517
1532
  }
1518
1533
  `;
1519
- qe([
1534
+ Ve([
1520
1535
  fe({ context: Q, subscribe: !0 }),
1521
1536
  x({ attribute: !1 })
1522
1537
  ], de.prototype, "client", 2);
1523
- qe([
1538
+ Ve([
1524
1539
  $()
1525
1540
  ], de.prototype, "cursors", 2);
1526
- de = qe([
1541
+ de = Ve([
1527
1542
  L("pulse-cursors")
1528
1543
  ], de);
1529
- var fi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, ge = (n, e, t, i) => {
1530
- for (var s = i > 1 ? void 0 : i ? mi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1544
+ var xi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, ge = (n, e, t, i) => {
1545
+ for (var s = i > 1 ? void 0 : i ? yi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1531
1546
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1532
- return i && s && fi(e, t, s), s;
1547
+ return i && s && xi(e, t, s), s;
1533
1548
  };
1534
1549
  let Y = class extends A {
1535
1550
  constructor() {
@@ -1600,7 +1615,7 @@ let Y = class extends A {
1600
1615
  ${n.comments.map((e, t) => {
1601
1616
  const i = this.getUserForComment(e.userId);
1602
1617
  return u`
1603
- ${t > 0 ? u`<div class="divider"></div>` : b}
1618
+ ${t > 0 ? u`<div class="divider"></div>` : v}
1604
1619
  <div class="comment">
1605
1620
  <div class="comment-header">
1606
1621
  <div
@@ -1637,7 +1652,7 @@ let Y = class extends A {
1637
1652
  <input type="text" placeholder="Write a reply..." />
1638
1653
  <button type="submit">Send</button>
1639
1654
  </form>
1640
- ` : b}
1655
+ ` : v}
1641
1656
  </div>
1642
1657
  `;
1643
1658
  }
@@ -1877,18 +1892,18 @@ ge([
1877
1892
  Y = ge([
1878
1893
  L("pulse-comments")
1879
1894
  ], Y);
1880
- var gi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Ve = (n, e, t, i) => {
1881
- for (var s = i > 1 ? void 0 : i ? bi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1895
+ var wi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, We = (n, e, t, i) => {
1896
+ for (var s = i > 1 ? void 0 : i ? $i(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1882
1897
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1883
- return i && s && gi(e, t, s), s;
1898
+ return i && s && wi(e, t, s), s;
1884
1899
  };
1885
- const vi = {
1900
+ const ki = {
1886
1901
  "comment:created": "left a comment",
1887
1902
  "comment:mention": "mentioned you",
1888
1903
  "comment:reply": "replied to your comment",
1889
1904
  "thread:resolved": "resolved a thread",
1890
1905
  "reaction:added": "reacted to your comment"
1891
- }, xi = {
1906
+ }, Ei = {
1892
1907
  "comment:created": "💬",
1893
1908
  "comment:mention": "📣",
1894
1909
  "comment:reply": "↩️",
@@ -1946,11 +1961,11 @@ let he = class extends A {
1946
1961
  <div class="header">
1947
1962
  <span class="title">
1948
1963
  Notifications
1949
- ${n > 0 ? u`<span class="badge">${n}</span>` : b}
1964
+ ${n > 0 ? u`<span class="badge">${n}</span>` : v}
1950
1965
  </span>
1951
1966
  ${n > 0 ? u`<button class="mark-all" @click=${() => this.client.markAllRead()}>
1952
1967
  Mark all read
1953
- </button>` : b}
1968
+ </button>` : v}
1954
1969
  </div>
1955
1970
  <div class="list">
1956
1971
  ${this.notifications.length === 0 ? u`<div class="empty">
@@ -1962,11 +1977,11 @@ let he = class extends A {
1962
1977
  class="item ${e.read ? "" : "unread"}"
1963
1978
  @click=${() => this.handleClick(e)}
1964
1979
  >
1965
- <span class="icon">${xi[e.type] ?? "🔔"}</span>
1980
+ <span class="icon">${Ei[e.type] ?? "🔔"}</span>
1966
1981
  <div class="content">
1967
1982
  <div class="text">
1968
1983
  <span class="actor">${this.getActorName(e.actorId)}</span>
1969
- ${vi[e.type] ?? e.type}
1984
+ ${ki[e.type] ?? e.type}
1970
1985
  </div>
1971
1986
  <div class="time">${this.formatTime(e.createdAt)}</div>
1972
1987
  </div>
@@ -2119,22 +2134,22 @@ he.styles = M`
2119
2134
  opacity: 0.4;
2120
2135
  }
2121
2136
  `;
2122
- Ve([
2137
+ We([
2123
2138
  fe({ context: Q, subscribe: !0 }),
2124
2139
  x({ attribute: !1 })
2125
2140
  ], he.prototype, "client", 2);
2126
- Ve([
2141
+ We([
2127
2142
  $()
2128
2143
  ], he.prototype, "notifications", 2);
2129
- he = Ve([
2144
+ he = We([
2130
2145
  L("pulse-notifications")
2131
2146
  ], he);
2132
- var yi = Object.defineProperty, wi = Object.getOwnPropertyDescriptor, te = (n, e, t, i) => {
2133
- for (var s = i > 1 ? void 0 : i ? wi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
2147
+ var Ci = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, te = (n, e, t, i) => {
2148
+ for (var s = i > 1 ? void 0 : i ? Ti(e, t) : e, o = n.length - 1, r; o >= 0; o--)
2134
2149
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
2135
- return i && s && yi(e, t, s), s;
2150
+ return i && s && Ci(e, t, s), s;
2136
2151
  };
2137
- const $i = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
2152
+ const Si = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
2138
2153
  let N = class extends A {
2139
2154
  constructor() {
2140
2155
  super(...arguments), this.targetId = "", this.targetType = "comment", this.reactions = [], this.showPicker = !1;
@@ -2196,7 +2211,7 @@ let N = class extends A {
2196
2211
  </button>
2197
2212
  ${this.showPicker ? u`
2198
2213
  <div class="picker">
2199
- ${$i.map(
2214
+ ${Si.map(
2200
2215
  (e) => u`
2201
2216
  <button @click=${() => this.addEmoji(e)}>
2202
2217
  ${e}
@@ -2204,7 +2219,7 @@ let N = class extends A {
2204
2219
  `
2205
2220
  )}
2206
2221
  </div>
2207
- ` : b}
2222
+ ` : v}
2208
2223
  </div>
2209
2224
  `;
2210
2225
  }
@@ -2345,8 +2360,8 @@ N = te([
2345
2360
  * Copyright 2017 Google LLC
2346
2361
  * SPDX-License-Identifier: BSD-3-Clause
2347
2362
  */
2348
- const ki = { CHILD: 2 }, Ei = (n) => (...e) => ({ _$litDirective$: n, values: e });
2349
- class Ci {
2363
+ const Ai = { CHILD: 2 }, Pi = (n) => (...e) => ({ _$litDirective$: n, values: e });
2364
+ class _i {
2350
2365
  constructor(e) {
2351
2366
  }
2352
2367
  get _$AU() {
@@ -2367,12 +2382,12 @@ class Ci {
2367
2382
  * Copyright 2017 Google LLC
2368
2383
  * SPDX-License-Identifier: BSD-3-Clause
2369
2384
  */
2370
- class Re extends Ci {
2385
+ class Le extends _i {
2371
2386
  constructor(e) {
2372
- if (super(e), this.it = b, e.type !== ki.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
2387
+ if (super(e), this.it = v, e.type !== Ai.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
2373
2388
  }
2374
2389
  render(e) {
2375
- if (e === b || e == null) return this._t = void 0, this.it = e;
2390
+ if (e === v || e == null) return this._t = void 0, this.it = e;
2376
2391
  if (e === W) return e;
2377
2392
  if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
2378
2393
  if (e === this.it) return this._t;
@@ -2381,23 +2396,23 @@ class Re extends Ci {
2381
2396
  return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
2382
2397
  }
2383
2398
  }
2384
- Re.directiveName = "unsafeHTML", Re.resultType = 1;
2399
+ Le.directiveName = "unsafeHTML", Le.resultType = 1;
2385
2400
  /**
2386
2401
  * @license
2387
2402
  * Copyright 2017 Google LLC
2388
2403
  * SPDX-License-Identifier: BSD-3-Clause
2389
2404
  */
2390
- class Le extends Re {
2405
+ class je extends Le {
2391
2406
  }
2392
- Le.directiveName = "unsafeSVG", Le.resultType = 2;
2393
- const Ti = Ei(Le);
2407
+ je.directiveName = "unsafeSVG", je.resultType = 2;
2408
+ const Ii = Pi(je);
2394
2409
  /**
2395
2410
  * @license lucide v0.577.0 - ISC
2396
2411
  *
2397
2412
  * This source code is licensed under the ISC license.
2398
2413
  * See the LICENSE file in the root directory of this source tree.
2399
2414
  */
2400
- const Si = [
2415
+ const Mi = [
2401
2416
  ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }],
2402
2417
  [
2403
2418
  "path",
@@ -2412,7 +2427,7 @@ const Si = [
2412
2427
  * This source code is licensed under the ISC license.
2413
2428
  * See the LICENSE file in the root directory of this source tree.
2414
2429
  */
2415
- const Ai = [
2430
+ const Oi = [
2416
2431
  ["circle", { cx: "12", cy: "12", r: "10" }],
2417
2432
  ["path", { d: "M12 6v6l4 2" }]
2418
2433
  ];
@@ -2422,7 +2437,7 @@ const Ai = [
2422
2437
  * This source code is licensed under the ISC license.
2423
2438
  * See the LICENSE file in the root directory of this source tree.
2424
2439
  */
2425
- const Pi = [
2440
+ const Ri = [
2426
2441
  [
2427
2442
  "path",
2428
2443
  {
@@ -2436,7 +2451,7 @@ const Pi = [
2436
2451
  * This source code is licensed under the ISC license.
2437
2452
  * See the LICENSE file in the root directory of this source tree.
2438
2453
  */
2439
- const _i = [
2454
+ const Li = [
2440
2455
  ["path", { d: "M12 19v3" }],
2441
2456
  ["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }],
2442
2457
  ["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3" }]
@@ -2447,7 +2462,7 @@ const _i = [
2447
2462
  * This source code is licensed under the ISC license.
2448
2463
  * See the LICENSE file in the root directory of this source tree.
2449
2464
  */
2450
- const Ii = [
2465
+ const ji = [
2451
2466
  [
2452
2467
  "path",
2453
2468
  {
@@ -2461,7 +2476,7 @@ const Ii = [
2461
2476
  * This source code is licensed under the ISC license.
2462
2477
  * See the LICENSE file in the root directory of this source tree.
2463
2478
  */
2464
- const Mi = [
2479
+ const zi = [
2465
2480
  [
2466
2481
  "path",
2467
2482
  {
@@ -2483,7 +2498,7 @@ const Mi = [
2483
2498
  * This source code is licensed under the ISC license.
2484
2499
  * See the LICENSE file in the root directory of this source tree.
2485
2500
  */
2486
- const Oi = [
2501
+ const Ui = [
2487
2502
  [
2488
2503
  "path",
2489
2504
  {
@@ -2498,7 +2513,7 @@ const Oi = [
2498
2513
  * This source code is licensed under the ISC license.
2499
2514
  * See the LICENSE file in the root directory of this source tree.
2500
2515
  */
2501
- const Pt = [
2516
+ const It = [
2502
2517
  ["path", { d: "M12 17v5" }],
2503
2518
  [
2504
2519
  "path",
@@ -2513,7 +2528,7 @@ const Pt = [
2513
2528
  * This source code is licensed under the ISC license.
2514
2529
  * See the LICENSE file in the root directory of this source tree.
2515
2530
  */
2516
- const Ri = [
2531
+ const Di = [
2517
2532
  [
2518
2533
  "path",
2519
2534
  {
@@ -2528,7 +2543,7 @@ const Ri = [
2528
2543
  * This source code is licensed under the ISC license.
2529
2544
  * See the LICENSE file in the root directory of this source tree.
2530
2545
  */
2531
- const Li = [
2546
+ const Hi = [
2532
2547
  ["path", { d: "M10 11v6" }],
2533
2548
  ["path", { d: "M14 11v6" }],
2534
2549
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
@@ -2541,7 +2556,7 @@ const Li = [
2541
2556
  * This source code is licensed under the ISC license.
2542
2557
  * See the LICENSE file in the root directory of this source tree.
2543
2558
  */
2544
- const ji = [
2559
+ const Ni = [
2545
2560
  ["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" }],
2546
2561
  ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2" }]
2547
2562
  ];
@@ -2551,7 +2566,7 @@ const ji = [
2551
2566
  * This source code is licensed under the ISC license.
2552
2567
  * See the LICENSE file in the root directory of this source tree.
2553
2568
  */
2554
- const be = [
2569
+ const ve = [
2555
2570
  ["path", { d: "M18 6 6 18" }],
2556
2571
  ["path", { d: "m6 6 12 12" }]
2557
2572
  ];
@@ -2561,7 +2576,7 @@ const be = [
2561
2576
  * This source code is licensed under the ISC license.
2562
2577
  * See the LICENSE file in the root directory of this source tree.
2563
2578
  */
2564
- const zi = [
2579
+ const Bi = [
2565
2580
  [
2566
2581
  "path",
2567
2582
  {
@@ -2569,14 +2584,14 @@ const zi = [
2569
2584
  }
2570
2585
  ]
2571
2586
  ];
2572
- function Ui(n) {
2587
+ function Fi(n) {
2573
2588
  return n.map(([e, t]) => {
2574
2589
  const i = Object.entries(t).filter(([, s]) => s != null).map(([s, o]) => `${s}="${o}"`).join(" ");
2575
2590
  return `<${e} ${i}/>`;
2576
2591
  }).join("");
2577
2592
  }
2578
2593
  function C(n, e = 18) {
2579
- return Zt`<svg
2594
+ return si`<svg
2580
2595
  xmlns="http://www.w3.org/2000/svg"
2581
2596
  width="${e}"
2582
2597
  height="${e}"
@@ -2586,7 +2601,7 @@ function C(n, e = 18) {
2586
2601
  stroke-width="2"
2587
2602
  stroke-linecap="round"
2588
2603
  stroke-linejoin="round"
2589
- >${Ti(Ui(n))}</svg>`;
2604
+ >${Ii(Fi(n))}</svg>`;
2590
2605
  }
2591
2606
  const ie = M`
2592
2607
  * {
@@ -2631,7 +2646,7 @@ const ie = M`
2631
2646
  --pw-shadow: var(--pulse-shadow);
2632
2647
  --pw-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
2633
2648
  }
2634
- `, ve = M`
2649
+ `, be = M`
2635
2650
  .pw-btn {
2636
2651
  display: inline-flex;
2637
2652
  align-items: center;
@@ -2687,10 +2702,10 @@ const ie = M`
2687
2702
  background: transparent;
2688
2703
  }
2689
2704
  `;
2690
- var Di = Object.defineProperty, Hi = Object.getOwnPropertyDescriptor, We = (n, e, t, i) => {
2691
- for (var s = i > 1 ? void 0 : i ? Hi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
2705
+ var qi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, Xe = (n, e, t, i) => {
2706
+ for (var s = i > 1 ? void 0 : i ? Vi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
2692
2707
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
2693
- return i && s && Di(e, t, s), s;
2708
+ return i && s && qi(e, t, s), s;
2694
2709
  };
2695
2710
  let K = class extends A {
2696
2711
  constructor() {
@@ -2743,7 +2758,7 @@ let K = class extends A {
2743
2758
  <div class="panel-header">
2744
2759
  <span class="panel-title">Activity</span>
2745
2760
  <button class="close-btn" @click=${this.fireClose} title="Close">
2746
- ${C(be, 16)}
2761
+ ${C(ve, 16)}
2747
2762
  </button>
2748
2763
  </div>
2749
2764
 
@@ -2776,7 +2791,7 @@ let K = class extends A {
2776
2791
  };
2777
2792
  K.styles = [
2778
2793
  ie,
2779
- ve,
2794
+ be,
2780
2795
  Pe,
2781
2796
  M`
2782
2797
  :host {
@@ -2903,21 +2918,21 @@ K.TYPE_COLORS = {
2903
2918
  comment: "#3b82f6",
2904
2919
  resolve: "#22c55e"
2905
2920
  };
2906
- We([
2921
+ Xe([
2907
2922
  x({ attribute: !1 })
2908
2923
  ], K.prototype, "client", 2);
2909
- We([
2924
+ Xe([
2910
2925
  $()
2911
2926
  ], K.prototype, "items", 2);
2912
- K = We([
2927
+ K = Xe([
2913
2928
  L("pulse-widget-activity-panel")
2914
2929
  ], K);
2915
- const Ni = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", lt = "#6366f1", ct = "#e2e8f0", Bi = "#f8fafc", Fi = "#e2e8f0", dt = "#64748b", we = 28, qi = Array.from({ length: we }, (n, e) => 0.2 + Math.abs(Math.sin(e * 12.9898 + 78.233) * 43758.5453) % 1 * 0.8);
2916
- function ht(n) {
2930
+ const Wi = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", dt = "#6366f1", ht = "#e2e8f0", Xi = "#f8fafc", Yi = "#e2e8f0", pt = "#64748b", we = 28, Ki = Array.from({ length: we }, (n, e) => 0.2 + Math.abs(Math.sin(e * 12.9898 + 78.233) * 43758.5453) % 1 * 0.8);
2931
+ function ut(n) {
2917
2932
  const e = Math.max(0, Math.floor(n)), t = Math.floor(e / 60), i = e % 60;
2918
2933
  return `${t}:${i.toString().padStart(2, "0")}`;
2919
2934
  }
2920
- class je {
2935
+ class ze {
2921
2936
  /**
2922
2937
  * Create and return a fully self-contained inline audio player element.
2923
2938
  *
@@ -2938,12 +2953,12 @@ class je {
2938
2953
  width: "220px",
2939
2954
  height: "44px",
2940
2955
  padding: "0 10px",
2941
- background: Bi,
2956
+ background: Xi,
2942
2957
  borderRadius: "12px",
2943
- border: `1px solid ${Fi}`,
2944
- fontFamily: Ni,
2958
+ border: `1px solid ${Yi}`,
2959
+ fontFamily: Wi,
2945
2960
  fontSize: "11px",
2946
- color: dt,
2961
+ color: pt,
2947
2962
  userSelect: "none",
2948
2963
  boxSizing: "border-box"
2949
2964
  });
@@ -2954,7 +2969,7 @@ class je {
2954
2969
  minWidth: "28px",
2955
2970
  borderRadius: "50%",
2956
2971
  border: "none",
2957
- background: lt,
2972
+ background: dt,
2958
2973
  cursor: "pointer",
2959
2974
  display: "flex",
2960
2975
  alignItems: "center",
@@ -3001,12 +3016,12 @@ class je {
3001
3016
  });
3002
3017
  const g = [];
3003
3018
  for (let E = 0; E < we; E++) {
3004
- const I = document.createElement("div"), z = Math.round(qi[E] * 20);
3019
+ const I = document.createElement("div"), z = Math.round(Ki[E] * 20);
3005
3020
  Object.assign(I.style, {
3006
3021
  flex: "1",
3007
3022
  height: `${Math.max(3, z)}px`,
3008
3023
  borderRadius: "1px",
3009
- background: ct,
3024
+ background: ht,
3010
3025
  transition: "background 0.1s ease",
3011
3026
  minWidth: "0"
3012
3027
  }), g.push(I), m.appendChild(I);
@@ -3014,19 +3029,19 @@ class je {
3014
3029
  const y = document.createElement("div");
3015
3030
  Object.assign(y.style, {
3016
3031
  fontSize: "10px",
3017
- color: dt,
3032
+ color: pt,
3018
3033
  whiteSpace: "nowrap",
3019
3034
  lineHeight: "1"
3020
3035
  });
3021
- function v() {
3022
- const E = ht(o), I = ht(s);
3036
+ function b() {
3037
+ const E = ut(o), I = ut(s);
3023
3038
  y.textContent = `${E} / ${I}`;
3024
3039
  }
3025
- v(), p.appendChild(m), p.appendChild(y), a.appendChild(l), a.appendChild(p);
3040
+ b(), p.appendChild(m), p.appendChild(y), a.appendChild(l), a.appendChild(p);
3026
3041
  function w() {
3027
3042
  const E = s > 0 ? o / s : 0, I = Math.floor(E * we);
3028
3043
  for (let z = 0; z < we; z++)
3029
- g[z].style.background = z <= I ? lt : ct;
3044
+ g[z].style.background = z <= I ? dt : ht;
3030
3045
  }
3031
3046
  return m.addEventListener("click", (E) => {
3032
3047
  if (s <= 0) return;
@@ -3034,7 +3049,7 @@ class je {
3034
3049
  1,
3035
3050
  Math.max(0, (E.clientX - I.left) / I.width)
3036
3051
  );
3037
- r.currentTime = z * s, o = r.currentTime, w(), v();
3052
+ r.currentTime = z * s, o = r.currentTime, w(), b();
3038
3053
  }), l.addEventListener("click", () => {
3039
3054
  i ? r.pause() : r.play().catch(() => {
3040
3055
  });
@@ -3043,17 +3058,17 @@ class je {
3043
3058
  }), r.addEventListener("pause", () => {
3044
3059
  i = !1, c();
3045
3060
  }), r.addEventListener("ended", () => {
3046
- i = !1, c(), o = 0, w(), v();
3061
+ i = !1, c(), o = 0, w(), b();
3047
3062
  }), r.addEventListener("timeupdate", () => {
3048
- o = r.currentTime, w(), v();
3063
+ o = r.currentTime, w(), b();
3049
3064
  }), r.addEventListener("loadedmetadata", () => {
3050
- r.duration && isFinite(r.duration) && (s = r.duration, v());
3065
+ r.duration && isFinite(r.duration) && (s = r.duration, b());
3051
3066
  }), r.addEventListener("durationchange", () => {
3052
- r.duration && isFinite(r.duration) && (s = r.duration, v());
3067
+ r.duration && isFinite(r.duration) && (s = r.duration, b());
3053
3068
  }), a;
3054
3069
  }
3055
3070
  }
3056
- class ze {
3071
+ class Ue {
3057
3072
  constructor() {
3058
3073
  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 = () => {
3059
3074
  this.recording && (this.drawWaveform(), this.updateTimer(), this.animFrame = requestAnimationFrame(this.animate));
@@ -3203,21 +3218,21 @@ class ze {
3203
3218
  this.recorder = null, this.container && (this.container.remove(), this.container = null), this.canvas = null, this.timerEl = null;
3204
3219
  }
3205
3220
  }
3206
- const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
3221
+ const Gi = 180, Ji = 120, Zi = "#e2e8f0", Qi = `
3207
3222
  <svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
3208
3223
  <circle cx="14" cy="14" r="14" fill="rgba(0,0,0,0.35)"/>
3209
3224
  <polygon points="11,8 22,14 11,20" fill="rgba(255,255,255,0.9)"/>
3210
- </svg>`, pt = `
3225
+ </svg>`, ft = `
3211
3226
  <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">
3212
3227
  <polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
3213
3228
  <line x1="23" y1="9" x2="17" y2="15"/>
3214
3229
  <line x1="17" y1="9" x2="23" y2="15"/>
3215
- </svg>`, Ki = `
3230
+ </svg>`, es = `
3216
3231
  <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">
3217
3232
  <polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
3218
3233
  <path d="M19.07 4.93a10 10 0 0 1 0 14.14"/>
3219
3234
  <path d="M15.54 8.46a5 5 0 0 1 0 7.07"/>
3220
- </svg>`, Gi = `
3235
+ </svg>`, ts = `
3221
3236
  <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">
3222
3237
  <polyline points="15,3 21,3 21,9"/><line x1="21" y1="3" x2="14" y2="10"/>
3223
3238
  <polyline points="9,21 3,21 3,15"/><line x1="3" y1="21" x2="10" y2="14"/>
@@ -3233,10 +3248,10 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
3233
3248
  Object.assign(o.style, {
3234
3249
  position: "relative",
3235
3250
  display: "inline-block",
3236
- width: `${Vi}px`,
3237
- height: `${Wi}px`,
3251
+ width: `${Gi}px`,
3252
+ height: `${Ji}px`,
3238
3253
  borderRadius: "8px",
3239
- border: `1px solid ${Xi}`,
3254
+ border: `1px solid ${Zi}`,
3240
3255
  boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
3241
3256
  overflow: "hidden",
3242
3257
  cursor: "pointer",
@@ -3266,7 +3281,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
3266
3281
  transition: "opacity 0.25s ease",
3267
3282
  opacity: "1",
3268
3283
  pointerEvents: "none"
3269
- }), a.innerHTML = Yi, o.appendChild(a);
3284
+ }), a.innerHTML = Qi, o.appendChild(a);
3270
3285
  const l = document.createElement("div");
3271
3286
  Object.assign(l.style, {
3272
3287
  position: "absolute",
@@ -3281,7 +3296,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
3281
3296
  justifyContent: "center",
3282
3297
  pointerEvents: "none",
3283
3298
  transition: "opacity 0.2s ease"
3284
- }), l.innerHTML = pt, o.appendChild(l);
3299
+ }), l.innerHTML = ft, o.appendChild(l);
3285
3300
  const d = document.createElement("div");
3286
3301
  Object.assign(d.style, {
3287
3302
  position: "absolute",
@@ -3297,7 +3312,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
3297
3312
  cursor: "pointer",
3298
3313
  pointerEvents: "auto",
3299
3314
  transition: "opacity 0.2s ease, background 0.15s ease"
3300
- }), d.innerHTML = Gi, d.title = "Fullscreen", d.addEventListener("mouseenter", () => {
3315
+ }), d.innerHTML = ts, d.title = "Fullscreen", d.addEventListener("mouseenter", () => {
3301
3316
  d.style.background = "rgba(0,0,0,0.7)";
3302
3317
  }), d.addEventListener("mouseleave", () => {
3303
3318
  d.style.background = "rgba(0,0,0,0.45)";
@@ -3308,7 +3323,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
3308
3323
  a.style.opacity = i ? "0" : "1";
3309
3324
  }
3310
3325
  function h() {
3311
- l.style.display = i ? "flex" : "none", l.innerHTML = s ? pt : Ki, d.style.display = i ? "flex" : "none";
3326
+ l.style.display = i ? "flex" : "none", l.innerHTML = s ? ft : es, d.style.display = i ? "flex" : "none";
3312
3327
  }
3313
3328
  return o.addEventListener("click", (p) => {
3314
3329
  p.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(() => {
@@ -3387,7 +3402,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
3387
3402
  };
3388
3403
  S.fullscreenOverlay = null, S.fullscreenKeyHandler = null;
3389
3404
  let Ce = S;
3390
- const ut = 60, Ji = `
3405
+ const mt = 60, is = `
3391
3406
  .vr-overlay {
3392
3407
  display: flex;
3393
3408
  flex-direction: column;
@@ -3494,14 +3509,14 @@ const ut = 60, Ji = `
3494
3509
  color: #0f172a;
3495
3510
  }
3496
3511
  `;
3497
- function ft(n) {
3512
+ function gt(n) {
3498
3513
  return n.toString().padStart(2, "0");
3499
3514
  }
3500
- function Zi(n) {
3515
+ function ss(n) {
3501
3516
  const e = Math.floor(n / 60), t = n % 60;
3502
- return `${ft(e)}:${ft(t)}`;
3517
+ return `${gt(e)}:${gt(t)}`;
3503
3518
  }
3504
- function Qi() {
3519
+ function ns() {
3505
3520
  const n = [
3506
3521
  "video/webm;codecs=vp9,opus",
3507
3522
  "video/webm;codecs=vp8,opus",
@@ -3512,7 +3527,7 @@ function Qi() {
3512
3527
  if (MediaRecorder.isTypeSupported(e)) return e;
3513
3528
  return "";
3514
3529
  }
3515
- function es(n) {
3530
+ function os(n) {
3516
3531
  return new Promise((e, t) => {
3517
3532
  const i = URL.createObjectURL(n), s = document.createElement("video");
3518
3533
  s.muted = !0, s.playsInline = !0, s.preload = "auto", s.src = i, s.addEventListener("loadeddata", () => {
@@ -3531,7 +3546,7 @@ function es(n) {
3531
3546
  }), s.load();
3532
3547
  });
3533
3548
  }
3534
- class Ue {
3549
+ class De {
3535
3550
  constructor() {
3536
3551
  this.recording = !1, this.container = null, this.stream = null, this.mediaRecorder = null, this.chunks = [], this.timerInterval = null, this.elapsed = 0, this.resolvePromise = null, this.root = null, this.styleEl = null, this.videoEl = null, this.timerEl = null;
3537
3552
  }
@@ -3548,7 +3563,7 @@ class Ue {
3548
3563
  }
3549
3564
  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(() => {
3550
3565
  }));
3551
- const i = Qi(), s = {};
3566
+ const i = ns(), s = {};
3552
3567
  i && (s.mimeType = i);
3553
3568
  const o = new MediaRecorder(t, s);
3554
3569
  return this.mediaRecorder = o, o.ondataavailable = (r) => {
@@ -3556,7 +3571,7 @@ class Ue {
3556
3571
  }, o.onstop = () => {
3557
3572
  this.handleRecordingComplete();
3558
3573
  }, o.start(), this.timerInterval = setInterval(() => {
3559
- this.elapsed++, this.updateTimer(), this.elapsed >= ut && this.stopRecording();
3574
+ this.elapsed++, this.updateTimer(), this.elapsed >= mt && this.stopRecording();
3560
3575
  }, 1e3), new Promise((r) => {
3561
3576
  this.resolvePromise = r;
3562
3577
  });
@@ -3573,7 +3588,7 @@ class Ue {
3573
3588
  }
3574
3589
  // ── Private ──
3575
3590
  buildUI(e) {
3576
- this.styleEl = document.createElement("style"), this.styleEl.textContent = Ji, document.head.appendChild(this.styleEl), this.root = document.createElement("div"), this.root.className = "vr-overlay";
3591
+ this.styleEl = document.createElement("style"), this.styleEl.textContent = is, document.head.appendChild(this.styleEl), this.root = document.createElement("div"), this.root.className = "vr-overlay";
3577
3592
  const t = document.createElement("div");
3578
3593
  t.className = "vr-circle-wrapper";
3579
3594
  const i = document.createElement("div");
@@ -3589,15 +3604,15 @@ class Ue {
3589
3604
  }
3590
3605
  updateTimer() {
3591
3606
  if (!this.timerEl) return;
3592
- const e = ut - this.elapsed;
3593
- this.timerEl.textContent = Zi(this.elapsed), e <= 10 ? this.timerEl.classList.add("vr-countdown") : this.timerEl.classList.remove("vr-countdown");
3607
+ const e = mt - this.elapsed;
3608
+ this.timerEl.textContent = ss(this.elapsed), e <= 10 ? this.timerEl.classList.add("vr-countdown") : this.timerEl.classList.remove("vr-countdown");
3594
3609
  }
3595
3610
  async handleRecordingComplete() {
3596
3611
  var s, o;
3597
3612
  const e = ((s = this.mediaRecorder) == null ? void 0 : s.mimeType) || "video/webm", t = new Blob(this.chunks, { type: e });
3598
3613
  let i;
3599
3614
  try {
3600
- i = await es(t);
3615
+ i = await os(t);
3601
3616
  } catch {
3602
3617
  const r = document.createElement("canvas");
3603
3618
  r.width = 1, r.height = 1, i = await new Promise((a) => {
@@ -3620,7 +3635,7 @@ class Ue {
3620
3635
  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;
3621
3636
  }
3622
3637
  }
3623
- const mt = {
3638
+ const vt = {
3624
3639
  position: "absolute",
3625
3640
  top: "50%",
3626
3641
  transform: "translateY(-50%)",
@@ -3701,7 +3716,7 @@ const mt = {
3701
3716
  transition: "opacity 150ms ease"
3702
3717
  }), a.addEventListener("click", (d) => d.stopPropagation()), o.appendChild(a), f.imgEl = a, s) {
3703
3718
  const d = document.createElement("button");
3704
- 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, { ...mt, left: "16px" }), d.addEventListener("mouseenter", () => {
3719
+ 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, { ...vt, left: "16px" }), d.addEventListener("mouseenter", () => {
3705
3720
  d.style.background = "rgba(255,255,255,0.3)";
3706
3721
  }), d.addEventListener("mouseleave", () => {
3707
3722
  d.style.background = "rgba(255,255,255,0.15)";
@@ -3709,7 +3724,7 @@ const mt = {
3709
3724
  p.stopPropagation(), f.navigate(-1);
3710
3725
  }), o.appendChild(d), f.prevBtn = d;
3711
3726
  const c = document.createElement("button");
3712
- 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, { ...mt, right: "16px" }), c.addEventListener("mouseenter", () => {
3727
+ 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, { ...vt, right: "16px" }), c.addEventListener("mouseenter", () => {
3713
3728
  c.style.background = "rgba(255,255,255,0.3)";
3714
3729
  }), c.addEventListener("mouseleave", () => {
3715
3730
  c.style.background = "rgba(255,255,255,0.15)";
@@ -3849,7 +3864,7 @@ class re {
3849
3864
  this.input.remove();
3850
3865
  }
3851
3866
  }
3852
- const ts = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", is = '<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>', ss = '<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>', gt = `<button class="pulse-close-btn" style="
3867
+ const rs = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", as = '<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>', ls = '<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>', bt = `<button class="pulse-close-btn" style="
3853
3868
  border:none;background:none;cursor:pointer;color:#94a3b8;padding:4px;
3854
3869
  border-radius:6px;display:flex;align-items:center;justify-content:center;
3855
3870
  transition:all 0.15s;flex-shrink:0;
@@ -3857,7 +3872,7 @@ const ts = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-syst
3857
3872
  onmouseout="this.style.background='none';this.style.color='#94a3b8'">
3858
3873
  <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>
3859
3874
  </button>`;
3860
- class ns {
3875
+ class cs {
3861
3876
  constructor(e, t = {}) {
3862
3877
  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 = () => {
3863
3878
  this.repositionDebounce || (this.repositionDebounce = setTimeout(() => {
@@ -3997,7 +4012,7 @@ class ns {
3997
4012
  }), this.form.innerHTML = `
3998
4013
  <div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;">
3999
4014
  <span style="font-size:13px;font-weight:600;color:#0f172a;">Add a comment here</span>
4000
- ${gt}
4015
+ ${bt}
4001
4016
  </div>
4002
4017
  <textarea
4003
4018
  placeholder="Write a comment..."
@@ -4032,8 +4047,8 @@ class ns {
4032
4047
  const l = this.form.querySelector("textarea"), d = this.form.querySelector(".pulse-close-btn"), c = this.form.querySelector(".pin-submit");
4033
4048
  d.addEventListener("click", () => this.exitPinMode()), this.pendingAttachmentIds = [], this.upload || (this.upload = new re(this.client));
4034
4049
  const h = this.form.querySelector(".pin-attachments-preview"), p = (g, y) => {
4035
- const v = document.createElement("div");
4036
- Object.assign(v.style, { position: "relative", display: "inline-block" }), v.appendChild(y);
4050
+ const b = document.createElement("div");
4051
+ Object.assign(b.style, { position: "relative", display: "inline-block" }), b.appendChild(y);
4037
4052
  const w = document.createElement("button");
4038
4053
  w.innerHTML = "×", Object.assign(w.style, {
4039
4054
  position: "absolute",
@@ -4055,46 +4070,46 @@ class ns {
4055
4070
  fontWeight: "700"
4056
4071
  }), w.addEventListener("click", () => {
4057
4072
  const E = this.pendingAttachmentIds.indexOf(g);
4058
- E !== -1 && this.pendingAttachmentIds.splice(E, 1), v.remove();
4059
- }), v.appendChild(w), h.appendChild(v);
4073
+ E !== -1 && this.pendingAttachmentIds.splice(E, 1), b.remove();
4074
+ }), b.appendChild(w), h.appendChild(b);
4060
4075
  }, m = 5;
4061
4076
  this.form.querySelector(".attach-img").addEventListener("click", async () => {
4062
4077
  const g = m - this.pendingAttachmentIds.length;
4063
4078
  if (g <= 0) return;
4064
4079
  const y = await this.upload.pickFiles("image/*", g);
4065
- for (const v of y) {
4066
- this.pendingAttachmentIds.push(v.id);
4080
+ for (const b of y) {
4081
+ this.pendingAttachmentIds.push(b.id);
4067
4082
  const w = document.createElement("img");
4068
- w.src = v.thumbnailUrl || v.url, Object.assign(w.style, { width: "48px", height: "48px", borderRadius: "6px", objectFit: "cover", border: "1px solid #e2e8f0", display: "block" }), p(v.id, w);
4083
+ w.src = b.thumbnailUrl || b.url, Object.assign(w.style, { width: "48px", height: "48px", borderRadius: "6px", objectFit: "cover", border: "1px solid #e2e8f0", display: "block" }), p(b.id, w);
4069
4084
  }
4070
4085
  }), this.form.querySelector(".attach-mic").addEventListener("click", async () => {
4071
4086
  if (this.pendingAttachmentIds.length >= m) return;
4072
- this.audioRecorder || (this.audioRecorder = new ze());
4087
+ this.audioRecorder || (this.audioRecorder = new Ue());
4073
4088
  const g = await this.audioRecorder.startRecording(h);
4074
4089
  if (g) {
4075
4090
  const y = await this.upload.uploadBlob(g, "audio.webm");
4076
4091
  if (y) {
4077
4092
  this.pendingAttachmentIds.push(y.id);
4078
- const v = document.createElement("span");
4079
- 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", p(y.id, v);
4093
+ const b = document.createElement("span");
4094
+ Object.assign(b.style, { display: "flex", alignItems: "center", padding: "4px 10px", borderRadius: "6px", background: "#f1f5f9", fontSize: "11px", color: "#64748b", height: "48px", boxSizing: "border-box" }), b.textContent = "🎤 Audio", p(y.id, b);
4080
4095
  }
4081
4096
  }
4082
4097
  }), this.form.querySelector(".attach-video").addEventListener("click", async () => {
4083
4098
  if (this.pendingAttachmentIds.length >= m) return;
4084
- this.videoRecorder || (this.videoRecorder = new Ue());
4099
+ this.videoRecorder || (this.videoRecorder = new De());
4085
4100
  const g = await this.videoRecorder.startRecording(h);
4086
4101
  if (g) {
4087
4102
  const y = await this.upload.uploadBlob(g.blob, "video.webm");
4088
4103
  if (y) {
4089
4104
  this.pendingAttachmentIds.push(y.id);
4090
- const v = document.createElement("span");
4091
- 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", p(y.id, v);
4105
+ const b = document.createElement("span");
4106
+ Object.assign(b.style, { display: "flex", alignItems: "center", padding: "4px 10px", borderRadius: "6px", background: "#f1f5f9", fontSize: "11px", color: "#64748b", height: "48px", boxSizing: "border-box" }), b.textContent = "🎥 Video", p(y.id, b);
4092
4107
  }
4093
4108
  }
4094
4109
  }), c.addEventListener("click", () => {
4095
4110
  const g = l.value.trim();
4096
4111
  if (!g && this.pendingAttachmentIds.length === 0) return;
4097
- const y = [...(g || "").matchAll(/@(\w+)/g)].map((v) => v[1]);
4112
+ const y = [...(g || "").matchAll(/@(\w+)/g)].map((b) => b[1]);
4098
4113
  this.client.createThread(g, { position: i, mentions: y, attachmentIds: this.pendingAttachmentIds.length > 0 ? [...this.pendingAttachmentIds] : void 0 }), this.pendingAttachmentIds = [], this.exitPinMode();
4099
4114
  }), l.addEventListener("keydown", (g) => {
4100
4115
  g.key === "Escape" && this.exitPinMode(), g.stopPropagation();
@@ -4133,7 +4148,7 @@ class ns {
4133
4148
  flexShrink: "0"
4134
4149
  }), l.innerHTML = `
4135
4150
  <span style="font-size:13px;font-weight:700;color:#0f172a;">Thread</span>
4136
- ${gt}
4151
+ ${bt}
4137
4152
  `, l.querySelector(".pulse-close-btn").addEventListener("click", () => {
4138
4153
  this.closePopover();
4139
4154
  }), this.popover.appendChild(l), this.refreshPopoverComments(e), this.addPopoverReplyForm(e), document.body.appendChild(this.popover);
@@ -4161,7 +4176,7 @@ class ns {
4161
4176
  }
4162
4177
  const i = (d = this.client.state.user) == null ? void 0 : d.id;
4163
4178
  t.innerHTML = e.comments.map((c) => {
4164
- const h = this.client.state.getUser(c.userId), p = h ? h.name.split(" ").map((O) => O[0]).join("").toUpperCase().slice(0, 2) : "?", m = (h == null ? void 0 : h.color) ?? "#94a3b8", g = this.escapeHtml((h == null ? void 0 : h.name) ?? "Unknown"), y = this.formatTime(c.createdAt), v = i === c.userId, w = c.editedAt ? '<span style="font-size:10px;color:#94a3b8;font-style:italic;">(edited)</span>' : "";
4179
+ const h = this.client.state.getUser(c.userId), p = h ? h.name.split(" ").map((O) => O[0]).join("").toUpperCase().slice(0, 2) : "?", m = (h == null ? void 0 : h.color) ?? "#94a3b8", g = this.escapeHtml((h == null ? void 0 : h.name) ?? "Unknown"), y = this.formatTime(c.createdAt), b = i === c.userId, w = c.editedAt ? '<span style="font-size:10px;color:#94a3b8;font-style:italic;">(edited)</span>' : "";
4165
4180
  if (this.editingPopoverCommentId === c.id)
4166
4181
  return `
4167
4182
  <div style="margin-bottom:10px;" data-comment-id="${c.id}">
@@ -4183,20 +4198,20 @@ class ns {
4183
4198
  '<span style="color:#6366f1;font-weight:600;background:#eef2ff;padding:0 3px;border-radius:3px;">@$1</span>'
4184
4199
  ) : "", I = (c.attachments ?? []).map((O) => {
4185
4200
  if (O.type === "image") {
4186
- const Mt = O.thumbnailUrl || O.url;
4201
+ const Rt = O.thumbnailUrl || O.url;
4187
4202
  return `<div class="popover-attachment-img" data-full-url="${this.escapeHtml(O.url)}" style="margin:4px 0 4px 29px;cursor:pointer;">
4188
- <img src="${this.escapeHtml(Mt)}" alt="${this.escapeHtml(O.filename)}" style="max-width:180px;max-height:120px;border-radius:8px;border:1px solid #e2e8f0;display:block;" />
4203
+ <img src="${this.escapeHtml(Rt)}" alt="${this.escapeHtml(O.filename)}" style="max-width:180px;max-height:120px;border-radius:8px;border:1px solid #e2e8f0;display:block;" />
4189
4204
  </div>`;
4190
4205
  }
4191
4206
  return O.type === "audio" ? `<div class="popover-attachment-audio" data-url="${this.escapeHtml(O.url)}" data-duration="${O.durationMs ?? ""}" style="margin:4px 0 4px 29px;"></div>` : O.type === "video" ? `<div class="popover-attachment-video" data-url="${this.escapeHtml(O.url)}" data-poster="${this.escapeHtml(O.thumbnailUrl ?? "")}" style="margin:4px 0 4px 29px;"></div>` : "";
4192
- }).join(""), z = v ? `<div class="popover-comment-actions" style="display:flex;gap:2px;margin-top:2px;margin-left:29px;">
4207
+ }).join(""), z = b ? `<div class="popover-comment-actions" style="display:flex;gap:2px;margin-top:2px;margin-left:29px;">
4193
4208
  <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"
4194
4209
  onmouseover="this.style.color='#6366f1';this.style.background='#eef2ff'"
4195
- onmouseout="this.style.color='#94a3b8';this.style.background='none'">${is}</button>
4210
+ onmouseout="this.style.color='#94a3b8';this.style.background='none'">${as}</button>
4196
4211
  <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"
4197
4212
  onmouseover="this.style.color='#ef4444';this.style.background='#fef2f2'"
4198
- onmouseout="this.style.color='#94a3b8';this.style.background='none'">${ss}</button>
4199
- </div>` : "", It = this.buildReactionPillsHtml(c.id);
4213
+ onmouseout="this.style.color='#94a3b8';this.style.background='none'">${ls}</button>
4214
+ </div>` : "", Ot = this.buildReactionPillsHtml(c.id);
4200
4215
  return `
4201
4216
  <div class="popover-comment" style="margin-bottom:10px;" data-comment-id="${c.id}">
4202
4217
  <div style="display:flex;align-items:center;gap:7px;margin-bottom:2px;">
@@ -4208,7 +4223,7 @@ class ns {
4208
4223
  ${E ? `<div style="font-size:13px;color:#334155;line-height:1.45;margin-left:29px;word-wrap:break-word;">${E}</div>` : ""}
4209
4224
  ${I}
4210
4225
  ${z}
4211
- ${It}
4226
+ ${Ot}
4212
4227
  </div>
4213
4228
  `;
4214
4229
  }).join(""), t.querySelectorAll(".edit-btn").forEach((c) => {
@@ -4256,7 +4271,7 @@ class ns {
4256
4271
  }), t.querySelectorAll(".popover-attachment-audio").forEach((c) => {
4257
4272
  const h = c.dataset.url;
4258
4273
  if (h) {
4259
- const p = c.dataset.duration ? parseInt(c.dataset.duration) : void 0, m = je.render(h, p);
4274
+ const p = c.dataset.duration ? parseInt(c.dataset.duration) : void 0, m = ze.render(h, p);
4260
4275
  c.appendChild(m);
4261
4276
  }
4262
4277
  }), t.querySelectorAll(".popover-attachment-video").forEach((c) => {
@@ -4319,8 +4334,8 @@ class ns {
4319
4334
  padding: "0",
4320
4335
  fontWeight: "700"
4321
4336
  }), y.addEventListener("click", () => {
4322
- const v = l.indexOf(p);
4323
- v !== -1 && l.splice(v, 1), g.remove();
4337
+ const b = l.indexOf(p);
4338
+ b !== -1 && l.splice(b, 1), g.remove();
4324
4339
  }), g.appendChild(y), a.appendChild(g);
4325
4340
  }, c = 5;
4326
4341
  t.querySelector(".reply-attach-img").addEventListener("click", async () => {
@@ -4331,7 +4346,7 @@ class ns {
4331
4346
  l.push(g.id), d(g.id, "📎 Image");
4332
4347
  }), t.querySelector(".reply-attach-mic").addEventListener("click", async () => {
4333
4348
  if (l.length >= c) return;
4334
- this.audioRecorder || (this.audioRecorder = new ze());
4349
+ this.audioRecorder || (this.audioRecorder = new Ue());
4335
4350
  const p = await this.audioRecorder.startRecording(t);
4336
4351
  if (p) {
4337
4352
  const m = await this.upload.uploadBlob(p, "audio.webm");
@@ -4339,7 +4354,7 @@ class ns {
4339
4354
  }
4340
4355
  }), t.querySelector(".reply-attach-video").addEventListener("click", async () => {
4341
4356
  if (l.length >= c) return;
4342
- this.videoRecorder || (this.videoRecorder = new Ue());
4357
+ this.videoRecorder || (this.videoRecorder = new De());
4343
4358
  const p = await this.videoRecorder.startRecording(t);
4344
4359
  if (p) {
4345
4360
  const m = await this.upload.uploadBlob(p.blob, "video.webm");
@@ -4381,7 +4396,7 @@ class ns {
4381
4396
  zIndex: "10002",
4382
4397
  fontFamily: xe
4383
4398
  });
4384
- for (const s of ts) {
4399
+ for (const s of rs) {
4385
4400
  const o = document.createElement("button");
4386
4401
  Object.assign(o.style, {
4387
4402
  border: "none",
@@ -4516,12 +4531,12 @@ class ns {
4516
4531
  });
4517
4532
  }
4518
4533
  }
4519
- var os = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, U = (n, e, t, i) => {
4520
- for (var s = i > 1 ? void 0 : i ? rs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
4534
+ var ds = Object.defineProperty, hs = Object.getOwnPropertyDescriptor, U = (n, e, t, i) => {
4535
+ for (var s = i > 1 ? void 0 : i ? hs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
4521
4536
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
4522
- return i && s && os(e, t, s), s;
4537
+ return i && s && ds(e, t, s), s;
4523
4538
  };
4524
- const as = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
4539
+ const ps = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
4525
4540
  let P = class extends A {
4526
4541
  constructor() {
4527
4542
  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 = [];
@@ -4546,7 +4561,7 @@ let P = class extends A {
4546
4561
  const s = i.dataset.url;
4547
4562
  if (s) {
4548
4563
  const o = i.dataset.duration ? parseInt(i.dataset.duration) : void 0;
4549
- i.appendChild(je.render(s, o));
4564
+ i.appendChild(ze.render(s, o));
4550
4565
  }
4551
4566
  }), (t = this.shadowRoot) == null || t.querySelectorAll(".video-player-host").forEach((i) => {
4552
4567
  if (i.children.length > 0) return;
@@ -4645,7 +4660,7 @@ let P = class extends A {
4645
4660
  async handleRecordAudio(n) {
4646
4661
  var i;
4647
4662
  if (this.replyAttachmentIds.length >= P.MAX_ATTACHMENTS) return;
4648
- this.upload || (this.upload = new re(this.client)), this.audioRecorder || (this.audioRecorder = new ze());
4663
+ this.upload || (this.upload = new re(this.client)), this.audioRecorder || (this.audioRecorder = new Ue());
4649
4664
  const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${n}"]`), t = await this.audioRecorder.startRecording(e ?? document.body);
4650
4665
  if (t) {
4651
4666
  const s = await this.upload.uploadBlob(t, "audio.webm");
@@ -4655,7 +4670,7 @@ let P = class extends A {
4655
4670
  async handleRecordVideo(n) {
4656
4671
  var i;
4657
4672
  if (this.replyAttachmentIds.length >= P.MAX_ATTACHMENTS) return;
4658
- this.upload || (this.upload = new re(this.client)), this.videoRecorder || (this.videoRecorder = new Ue());
4673
+ this.upload || (this.upload = new re(this.client)), this.videoRecorder || (this.videoRecorder = new De());
4659
4674
  const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${n}"]`), t = await this.videoRecorder.startRecording(e ?? document.body);
4660
4675
  if (t) {
4661
4676
  const s = await this.upload.uploadBlob(t.blob, "video.webm");
@@ -4739,7 +4754,7 @@ let P = class extends A {
4739
4754
  +
4740
4755
  ${this.pickerOpenForComment === n.id ? u`
4741
4756
  <div class="emoji-picker">
4742
- ${as.map(
4757
+ ${ps.map(
4743
4758
  (o) => u`
4744
4759
  <button @click=${(r) => {
4745
4760
  r.stopPropagation(), this.toggleReaction(n.id, o);
@@ -4747,14 +4762,14 @@ let P = class extends A {
4747
4762
  `
4748
4763
  )}
4749
4764
  </div>
4750
- ` : b}
4765
+ ` : v}
4751
4766
  </button>
4752
4767
  </div>
4753
4768
  `;
4754
4769
  }
4755
4770
  renderTypingIndicator(n) {
4756
4771
  const e = this.typingByThread.get(n) ?? [];
4757
- if (e.length === 0) return b;
4772
+ if (e.length === 0) return v;
4758
4773
  const t = e.length === 1 ? `${e[0]} is typing...` : `${e.join(", ")} are typing...`;
4759
4774
  return u`<div class="typing-indicator">${t}</div>`;
4760
4775
  }
@@ -4775,7 +4790,7 @@ let P = class extends A {
4775
4790
  <span class="thread-count">${this.threads.length}</span>
4776
4791
  </span>
4777
4792
  <button class="close-btn" @click=${this.fireClose} title="Close">
4778
- ${C(be, 16)}
4793
+ ${C(ve, 16)}
4779
4794
  </button>
4780
4795
  </div>
4781
4796
 
@@ -4793,7 +4808,7 @@ let P = class extends A {
4793
4808
  `;
4794
4809
  }
4795
4810
  renderAttachments(n) {
4796
- if (!n || n.length === 0) return b;
4811
+ if (!n || n.length === 0) return v;
4797
4812
  const e = n.filter((t) => t.type === "image").map((t) => t.url);
4798
4813
  return u`
4799
4814
  ${n.map((t) => {
@@ -4818,12 +4833,12 @@ let P = class extends A {
4818
4833
  <div class="comment-attachment-media" id="video-${t.id}">
4819
4834
  ${this.renderVideoPlayer(t)}
4820
4835
  </div>
4821
- ` : b;
4836
+ ` : v;
4822
4837
  })}
4823
4838
  `;
4824
4839
  }
4825
4840
  renderAudioPlayer(n) {
4826
- const e = document.createElement("div"), t = je.render(n.url, n.durationMs);
4841
+ const e = document.createElement("div"), t = ze.render(n.url, n.durationMs);
4827
4842
  return e.appendChild(t), u`<div class="audio-player-host" data-url=${n.url} data-duration=${n.durationMs ?? ""}></div>`;
4828
4843
  }
4829
4844
  renderVideoPlayer(n) {
@@ -4837,13 +4852,13 @@ let P = class extends A {
4837
4852
  data-thread-id=${n.id}
4838
4853
  >
4839
4854
  ${n.position ? u`<div class="pin-badge">
4840
- ${C(Pt, 12)}
4855
+ ${C(It, 12)}
4841
4856
  Pinned
4842
- </div>` : b}
4857
+ </div>` : v}
4843
4858
  ${n.comments.map((t, i) => {
4844
4859
  const s = this.getUserForComment(t.userId), o = this.isOwnComment(t), r = this.editingCommentId === t.id;
4845
4860
  return u`
4846
- ${i > 0 ? u`<div class="comment-divider"></div>` : b}
4861
+ ${i > 0 ? u`<div class="comment-divider"></div>` : v}
4847
4862
  <div class="comment">
4848
4863
  <div class="comment-header">
4849
4864
  <div
@@ -4854,16 +4869,16 @@ let P = class extends A {
4854
4869
  </div>
4855
4870
  <span class="comment-author">${(s == null ? void 0 : s.name) ?? "Unknown"}</span>
4856
4871
  <span class="comment-time">${this.formatTime(t.createdAt)}</span>
4857
- ${t.editedAt ? u`<span class="edited-badge">(edited)</span>` : b}
4872
+ ${t.editedAt ? u`<span class="edited-badge">(edited)</span>` : v}
4858
4873
  </div>
4859
4874
  ${r ? this.renderEditForm(t) : u`
4860
- ${t.body && t.body !== "(attachment)" ? u`<div class="comment-body">${this.parseMentions(t.body)}</div>` : b}
4875
+ ${t.body && t.body !== "(attachment)" ? u`<div class="comment-body">${this.parseMentions(t.body)}</div>` : v}
4861
4876
  ${this.renderAttachments(t.attachments ?? [])}
4862
4877
  `}
4863
4878
  ${o && !r ? u`<div class="comment-actions">
4864
- <button @click=${() => this.startEdit(t)} title="Edit">${C(Oi, 14)}</button>
4865
- <button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${C(Li, 14)}</button>
4866
- </div>` : b}
4879
+ <button @click=${() => this.startEdit(t)} title="Edit">${C(Ui, 14)}</button>
4880
+ <button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${C(Hi, 14)}</button>
4881
+ </div>` : v}
4867
4882
  ${this.renderReactions(t)}
4868
4883
  </div>
4869
4884
  `;
@@ -4903,19 +4918,19 @@ let P = class extends A {
4903
4918
  class="reply-media-btn"
4904
4919
  title="Attach image"
4905
4920
  @click=${() => this.handleAttachImage()}
4906
- >${C(Ii, 16)}</button>
4921
+ >${C(ji, 16)}</button>
4907
4922
  <button
4908
4923
  type="button"
4909
4924
  class="reply-media-btn"
4910
4925
  title="Record audio"
4911
4926
  @click=${() => this.handleRecordAudio(n.id)}
4912
- >${C(_i, 16)}</button>
4927
+ >${C(Li, 16)}</button>
4913
4928
  <button
4914
4929
  type="button"
4915
4930
  class="reply-media-btn"
4916
4931
  title="Record video"
4917
4932
  @click=${() => this.handleRecordVideo(n.id)}
4918
- >${C(ji, 16)}</button>
4933
+ >${C(Ni, 16)}</button>
4919
4934
  <div class="reply-preview">
4920
4935
  ${this.replyAttachmentIds.map(
4921
4936
  (t, i) => u`<span class="reply-preview-badge">
@@ -4930,14 +4945,14 @@ let P = class extends A {
4930
4945
  </div>
4931
4946
  </div>
4932
4947
  </form>
4933
- ` : b}
4948
+ ` : v}
4934
4949
  </div>
4935
4950
  `;
4936
4951
  }
4937
4952
  };
4938
4953
  P.styles = [
4939
4954
  ie,
4940
- ve,
4955
+ be,
4941
4956
  Pe,
4942
4957
  M`
4943
4958
  :host {
@@ -5510,18 +5525,18 @@ U([
5510
5525
  P = U([
5511
5526
  L("pulse-widget-comments-panel")
5512
5527
  ], P);
5513
- var ls = Object.defineProperty, cs = Object.getOwnPropertyDescriptor, Xe = (n, e, t, i) => {
5514
- for (var s = i > 1 ? void 0 : i ? cs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
5528
+ var us = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, Ye = (n, e, t, i) => {
5529
+ for (var s = i > 1 ? void 0 : i ? fs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
5515
5530
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
5516
- return i && s && ls(e, t, s), s;
5531
+ return i && s && us(e, t, s), s;
5517
5532
  };
5518
- const ds = {
5533
+ const ms = {
5519
5534
  "comment:created": "left a comment",
5520
5535
  "comment:mention": "mentioned you",
5521
5536
  "comment:reply": "replied to your comment",
5522
5537
  "thread:resolved": "resolved a thread",
5523
5538
  "reaction:added": "reacted to your comment"
5524
- }, hs = {
5539
+ }, gs = {
5525
5540
  "comment:created": "💬",
5526
5541
  "comment:mention": "📣",
5527
5542
  "comment:reply": "↩️",
@@ -5577,14 +5592,14 @@ let pe = class extends A {
5577
5592
  <div class="panel-header">
5578
5593
  <span class="panel-title">
5579
5594
  Notifications
5580
- ${n > 0 ? u`<span class="unread-badge">${n}</span>` : b}
5595
+ ${n > 0 ? u`<span class="unread-badge">${n}</span>` : v}
5581
5596
  </span>
5582
5597
  <div style="display:flex;align-items:center;gap:4px;">
5583
5598
  ${n > 0 ? u`<button class="mark-all" @click=${() => this.client.markAllRead()}>
5584
5599
  Mark all read
5585
- </button>` : b}
5600
+ </button>` : v}
5586
5601
  <button class="close-btn" @click=${this.fireClose} title="Close">
5587
- ${C(be, 16)}
5602
+ ${C(ve, 16)}
5588
5603
  </button>
5589
5604
  </div>
5590
5605
  </div>
@@ -5599,11 +5614,11 @@ let pe = class extends A {
5599
5614
  class="item ${e.read ? "" : "unread"}"
5600
5615
  @click=${() => this.handleClick(e)}
5601
5616
  >
5602
- <span class="icon">${hs[e.type] ?? "🔔"}</span>
5617
+ <span class="icon">${gs[e.type] ?? "🔔"}</span>
5603
5618
  <div class="content">
5604
5619
  <div class="text">
5605
5620
  <span class="actor">${this.getActorName(e.actorId)}</span>
5606
- ${ds[e.type] ?? e.type}
5621
+ ${ms[e.type] ?? e.type}
5607
5622
  </div>
5608
5623
  <div class="time">${this.formatTime(e.createdAt)}</div>
5609
5624
  </div>
@@ -5618,7 +5633,7 @@ let pe = class extends A {
5618
5633
  };
5619
5634
  pe.styles = [
5620
5635
  ie,
5621
- ve,
5636
+ be,
5622
5637
  Pe,
5623
5638
  M`
5624
5639
  :host {
@@ -5813,17 +5828,17 @@ pe.styles = [
5813
5828
  }
5814
5829
  `
5815
5830
  ];
5816
- Xe([
5831
+ Ye([
5817
5832
  x({ attribute: !1 })
5818
5833
  ], pe.prototype, "client", 2);
5819
- Xe([
5834
+ Ye([
5820
5835
  $()
5821
5836
  ], pe.prototype, "notifications", 2);
5822
- pe = Xe([
5837
+ pe = Ye([
5823
5838
  L("pulse-widget-notifications-panel")
5824
5839
  ], pe);
5825
- const ps = 3e3;
5826
- class us {
5840
+ const vs = 3e3;
5841
+ class bs {
5827
5842
  constructor(e) {
5828
5843
  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) => {
5829
5844
  t.pointerType !== "touch" && this.client.moveCursor({
@@ -5875,7 +5890,7 @@ class us {
5875
5890
  ), this.setSending(!0), this.staleTimer = setInterval(() => {
5876
5891
  const e = Date.now();
5877
5892
  for (const [t, i] of this.cursorLastSeen)
5878
- if (e - i > ps) {
5893
+ if (e - i > vs) {
5879
5894
  this.cursors.delete(t);
5880
5895
  const s = this.cursorEls.get(t);
5881
5896
  s && s.remove(), this.cursorEls.delete(t), this.cursorLastSeen.delete(t);
@@ -5971,7 +5986,7 @@ class us {
5971
5986
  i.style.transform = `translate(${t.position.x}px, ${t.position.y}px)`;
5972
5987
  }
5973
5988
  }
5974
- class fs {
5989
+ class xs {
5975
5990
  constructor(e) {
5976
5991
  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) => {
5977
5992
  var a, l, d;
@@ -6054,9 +6069,9 @@ class fs {
6054
6069
  this.fadeTimers.set(e, t);
6055
6070
  }
6056
6071
  }
6057
- function ms(n) {
6072
+ function ys(n) {
6058
6073
  if (!n.rangeCount || n.isCollapsed) return null;
6059
- const e = n.getRangeAt(0), t = e.startContainer, i = e.endContainer, s = bt(t), o = bt(i);
6074
+ const e = n.getRangeAt(0), t = e.startContainer, i = e.endContainer, s = xt(t), o = xt(i);
6060
6075
  return !s || !o ? null : {
6061
6076
  startSelector: s,
6062
6077
  startOffset: e.startOffset,
@@ -6064,10 +6079,10 @@ function ms(n) {
6064
6079
  endOffset: e.endOffset
6065
6080
  };
6066
6081
  }
6067
- function gs(n) {
6082
+ function ws(n) {
6068
6083
  var e, t;
6069
6084
  try {
6070
- const i = xt(n.startSelector), s = xt(n.endSelector);
6085
+ const i = wt(n.startSelector), s = wt(n.endSelector);
6071
6086
  if (!i || !s) return null;
6072
6087
  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;
6073
6088
  return o.setStart(i, Math.min(n.startOffset, r)), o.setEnd(s, Math.min(n.endOffset, a)), o;
@@ -6075,18 +6090,18 @@ function gs(n) {
6075
6090
  return null;
6076
6091
  }
6077
6092
  }
6078
- function bt(n) {
6093
+ function xt(n) {
6079
6094
  if (n.nodeType === Node.TEXT_NODE) {
6080
6095
  const e = n.parentElement;
6081
6096
  if (!e) return null;
6082
- const t = vt(e);
6097
+ const t = yt(e);
6083
6098
  if (!t) return null;
6084
6099
  const i = Array.from(e.childNodes).indexOf(n);
6085
6100
  return `${t}::text(${i})`;
6086
6101
  }
6087
- return n.nodeType === Node.ELEMENT_NODE ? vt(n) : null;
6102
+ return n.nodeType === Node.ELEMENT_NODE ? yt(n) : null;
6088
6103
  }
6089
- function vt(n) {
6104
+ function yt(n) {
6090
6105
  if (!n || n === document.documentElement) return "html";
6091
6106
  if (n === document.body) return "body";
6092
6107
  if (n.id) return `#${CSS.escape(n.id)}`;
@@ -6112,7 +6127,7 @@ function vt(n) {
6112
6127
  }
6113
6128
  return e.length > 0 ? e.join(" > ") : null;
6114
6129
  }
6115
- function xt(n) {
6130
+ function wt(n) {
6116
6131
  const e = n.match(/^(.+)::text\((\d+)\)$/);
6117
6132
  if (e) {
6118
6133
  const t = e[1], i = parseInt(e[2], 10);
@@ -6129,7 +6144,7 @@ function xt(n) {
6129
6144
  return null;
6130
6145
  }
6131
6146
  }
6132
- class bs {
6147
+ class $s {
6133
6148
  constructor(e) {
6134
6149
  this.container = null, this.unsubs = [], this.enabled = !1, this.selectionEls = /* @__PURE__ */ new Map(), this.clearTimers = /* @__PURE__ */ new Map(), this.client = e;
6135
6150
  }
@@ -6173,7 +6188,7 @@ class bs {
6173
6188
  if (!this.container) return;
6174
6189
  const i = (a = this.client.state.user) == null ? void 0 : a.id;
6175
6190
  if (e === i || (this.clearSelection(e), !t)) return;
6176
- const s = gs(t);
6191
+ const s = ws(t);
6177
6192
  if (!s) return;
6178
6193
  const o = this.client.state.presence.find(
6179
6194
  (l) => l.user.id === e
@@ -6212,10 +6227,10 @@ class bs {
6212
6227
  }
6213
6228
  }
6214
6229
  }
6215
- var vs = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, Ye = (n, e, t, i) => {
6216
- for (var s = i > 1 ? void 0 : i ? xs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
6230
+ var ks = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Ke = (n, e, t, i) => {
6231
+ for (var s = i > 1 ? void 0 : i ? Es(e, t) : e, o = n.length - 1, r; o >= 0; o--)
6217
6232
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
6218
- return i && s && vs(e, t, s), s;
6233
+ return i && s && ks(e, t, s), s;
6219
6234
  };
6220
6235
  let ue = class extends A {
6221
6236
  constructor() {
@@ -6258,7 +6273,7 @@ let ue = class extends A {
6258
6273
  <div class="panel-header">
6259
6274
  <span class="panel-title">Settings</span>
6260
6275
  <button class="close-btn" @click=${this.fireClose} title="Close">
6261
- ${C(be, 16)}
6276
+ ${C(ve, 16)}
6262
6277
  </button>
6263
6278
  </div>
6264
6279
 
@@ -6305,7 +6320,7 @@ let ue = class extends A {
6305
6320
  };
6306
6321
  ue.styles = [
6307
6322
  ie,
6308
- ve,
6323
+ be,
6309
6324
  Pe,
6310
6325
  M`
6311
6326
  :host {
@@ -6478,13 +6493,13 @@ ue.styles = [
6478
6493
  }
6479
6494
  `
6480
6495
  ];
6481
- Ye([
6496
+ Ke([
6482
6497
  x({ attribute: !1 })
6483
6498
  ], ue.prototype, "settings", 2);
6484
- Ye([
6499
+ Ke([
6485
6500
  x()
6486
6501
  ], ue.prototype, "roomId", 2);
6487
- ue = Ye([
6502
+ ue = Ke([
6488
6503
  L("pulse-widget-settings-panel")
6489
6504
  ], ue);
6490
6505
  const $e = {
@@ -6498,22 +6513,22 @@ const $e = {
6498
6513
  showViewportIndicators: !0,
6499
6514
  showSelections: !0,
6500
6515
  showDrawings: !0
6501
- }, _t = "pulse:settings:";
6502
- function ys(n) {
6516
+ }, Mt = "pulse:settings:";
6517
+ function Cs(n) {
6503
6518
  try {
6504
- const e = localStorage.getItem(`${_t}${n}`);
6519
+ const e = localStorage.getItem(`${Mt}${n}`);
6505
6520
  return e ? { ...$e, ...JSON.parse(e) } : { ...$e };
6506
6521
  } catch {
6507
6522
  return { ...$e };
6508
6523
  }
6509
6524
  }
6510
- function ws(n, e) {
6511
- localStorage.setItem(`${_t}${n}`, JSON.stringify(e));
6525
+ function Ts(n, e) {
6526
+ localStorage.setItem(`${Mt}${n}`, JSON.stringify(e));
6512
6527
  }
6513
- var $s = Object.defineProperty, ks = Object.getOwnPropertyDescriptor, j = (n, e, t, i) => {
6514
- for (var s = i > 1 ? void 0 : i ? ks(e, t) : e, o = n.length - 1, r; o >= 0; o--)
6528
+ var Ss = Object.defineProperty, As = Object.getOwnPropertyDescriptor, j = (n, e, t, i) => {
6529
+ for (var s = i > 1 ? void 0 : i ? As(e, t) : e, o = n.length - 1, r; o >= 0; o--)
6515
6530
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
6516
- return i && s && $s(e, t, s), s;
6531
+ return i && s && Ss(e, t, s), s;
6517
6532
  };
6518
6533
  let R = class extends A {
6519
6534
  constructor() {
@@ -6570,7 +6585,7 @@ let R = class extends A {
6570
6585
  if (this.collapsed)
6571
6586
  return u`
6572
6587
  <div class="toolbar collapsed ${n ? "inline" : ""}" @click=${this.fireToggle}>
6573
- <span class="fab-icon">${C(zi, n ? 18 : 24)}</span>
6588
+ <span class="fab-icon">${C(Bi, n ? 18 : 24)}</span>
6574
6589
  </div>
6575
6590
  `;
6576
6591
  const e = this.users.slice(0, 3), t = this.users.length - 3;
@@ -6579,7 +6594,7 @@ let R = class extends A {
6579
6594
  <!-- Presence avatars -->
6580
6595
  ${this.users.length > 0 ? u`
6581
6596
  <div class="presence">
6582
- ${t > 0 ? u`<div class="presence-overflow">+${t}</div>` : b}
6597
+ ${t > 0 ? u`<div class="presence-overflow">+${t}</div>` : v}
6583
6598
  ${e.map(
6584
6599
  (i) => u`
6585
6600
  <div
@@ -6590,13 +6605,13 @@ let R = class extends A {
6590
6605
  >
6591
6606
  ${i.user.avatar ? u`<img src="${i.user.avatar}" alt="${i.user.name}" />` : this.getInitials(i.user.name)}
6592
6607
  <span class="presence-tooltip">${i.user.name}</span>
6593
- ${i.deviceType && i.deviceType !== "desktop" ? u`<span class="device-icon">${i.deviceType === "mobile" ? "📱" : "📲"}</span>` : b}
6608
+ ${i.deviceType && i.deviceType !== "desktop" ? u`<span class="device-icon">${i.deviceType === "mobile" ? "📱" : "📲"}</span>` : v}
6594
6609
  </div>
6595
6610
  `
6596
6611
  )}
6597
6612
  </div>
6598
6613
  <div class="separator"></div>
6599
- ` : b}
6614
+ ` : v}
6600
6615
 
6601
6616
  <!-- Pin comment (primary) -->
6602
6617
  <button
@@ -6606,7 +6621,7 @@ let R = class extends A {
6606
6621
  ?disabled=${this.featuresDisabled}
6607
6622
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6608
6623
  >
6609
- ${C(Pt)}
6624
+ ${C(It)}
6610
6625
  </button>
6611
6626
 
6612
6627
  <!-- View comments -->
@@ -6617,7 +6632,7 @@ let R = class extends A {
6617
6632
  ?disabled=${this.featuresDisabled}
6618
6633
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6619
6634
  >
6620
- ${C(Pi)}
6635
+ ${C(Ri)}
6621
6636
  </button>
6622
6637
 
6623
6638
  <!-- Activity feed -->
@@ -6628,7 +6643,7 @@ let R = class extends A {
6628
6643
  ?disabled=${this.featuresDisabled}
6629
6644
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6630
6645
  >
6631
- ${C(Ai)}
6646
+ ${C(Oi)}
6632
6647
  </button>
6633
6648
 
6634
6649
  <!-- Draw mode -->
@@ -6639,7 +6654,7 @@ let R = class extends A {
6639
6654
  ?disabled=${this.featuresDisabled}
6640
6655
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6641
6656
  >
6642
- ${C(Mi)}
6657
+ ${C(zi)}
6643
6658
  </button>
6644
6659
 
6645
6660
  <!-- Notifications -->
@@ -6650,8 +6665,8 @@ let R = class extends A {
6650
6665
  ?disabled=${this.featuresDisabled}
6651
6666
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : "position:relative"}"
6652
6667
  >
6653
- ${C(Si)}
6654
- ${this.unreadCount > 0 ? u`<span class="badge">${this.unreadCount > 9 ? "9+" : this.unreadCount}</span>` : b}
6668
+ ${C(Mi)}
6669
+ ${this.unreadCount > 0 ? u`<span class="badge">${this.unreadCount > 9 ? "9+" : this.unreadCount}</span>` : v}
6655
6670
  </button>
6656
6671
 
6657
6672
  <!-- Settings -->
@@ -6660,7 +6675,7 @@ let R = class extends A {
6660
6675
  @click=${() => this.fire("settings")}
6661
6676
  title="Settings"
6662
6677
  >
6663
- ${C(Ri)}
6678
+ ${C(Di)}
6664
6679
  </button>
6665
6680
 
6666
6681
  <div class="separator"></div>
@@ -6671,7 +6686,7 @@ let R = class extends A {
6671
6686
  @click=${this.fireToggle}
6672
6687
  title="Collapse"
6673
6688
  >
6674
- ${C(be, 14)}
6689
+ ${C(ve, 14)}
6675
6690
  </button>
6676
6691
  </div>
6677
6692
  `;
@@ -6679,7 +6694,7 @@ let R = class extends A {
6679
6694
  };
6680
6695
  R.styles = [
6681
6696
  ie,
6682
- ve,
6697
+ be,
6683
6698
  M`
6684
6699
  :host {
6685
6700
  display: block;
@@ -6925,7 +6940,7 @@ j([
6925
6940
  R = j([
6926
6941
  L("pulse-widget-toolbar")
6927
6942
  ], R);
6928
- class Es {
6943
+ class Ps {
6929
6944
  constructor(e) {
6930
6945
  this.container = null, this.unsubs = [], this.enabled = !1, this.pillEls = /* @__PURE__ */ new Map(), this.client = e;
6931
6946
  }
@@ -6977,7 +6992,7 @@ class Es {
6977
6992
  (E) => E.user.id === a
6978
6993
  );
6979
6994
  if (!m) continue;
6980
- const g = l.scrollY + l.viewportHeight / 2, y = i > 0 ? g / i : 0, v = Math.max(
6995
+ const g = l.scrollY + l.viewportHeight / 2, y = i > 0 ? g / i : 0, b = Math.max(
6981
6996
  8,
6982
6997
  Math.min(t - 28, y * t)
6983
6998
  );
@@ -6994,7 +7009,7 @@ class Es {
6994
7009
  whiteSpace: "nowrap",
6995
7010
  pointerEvents: "none",
6996
7011
  transition: "top 0.3s ease"
6997
- }), this.container.appendChild(w), this.pillEls.set(a, w)), w.style.display = "", w.style.background = m.user.color, w.style.top = `${v}px`, w.textContent = this.getInitials(m.user.name);
7012
+ }), this.container.appendChild(w), this.pillEls.set(a, w)), w.style.display = "", w.style.background = m.user.color, w.style.top = `${b}px`, w.textContent = this.getInitials(m.user.name);
6998
7013
  }
6999
7014
  for (const [a, l] of this.pillEls)
7000
7015
  !o.has(a) && !this.client.state.viewports.has(a) && (l.remove(), this.pillEls.delete(a));
@@ -7003,10 +7018,10 @@ class Es {
7003
7018
  return e.split(" ").map((t) => t[0]).join("").toUpperCase().slice(0, 2);
7004
7019
  }
7005
7020
  }
7006
- var Cs = Object.defineProperty, Ts = Object.getOwnPropertyDescriptor, _ = (n, e, t, i) => {
7007
- for (var s = i > 1 ? void 0 : i ? Ts(e, t) : e, o = n.length - 1, r; o >= 0; o--)
7021
+ var _s = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, _ = (n, e, t, i) => {
7022
+ for (var s = i > 1 ? void 0 : i ? Is(e, t) : e, o = n.length - 1, r; o >= 0; o--)
7008
7023
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
7009
- return i && s && Cs(e, t, s), s;
7024
+ return i && s && _s(e, t, s), s;
7010
7025
  };
7011
7026
  let T = class extends A {
7012
7027
  constructor() {
@@ -7031,7 +7046,7 @@ let T = class extends A {
7031
7046
  (t = this.client) == null || t.updateSelection(null);
7032
7047
  return;
7033
7048
  }
7034
- const e = ms(n);
7049
+ const e = ys(n);
7035
7050
  (i = this.client) == null || i.updateSelection(e);
7036
7051
  }, 500));
7037
7052
  }, this.handleDocumentClick = (n) => {
@@ -7063,11 +7078,11 @@ let T = class extends A {
7063
7078
  room: this.room,
7064
7079
  endpoint: this.endpoint
7065
7080
  };
7066
- this.client = new $t(n), this.clientConfigKey = this.getConfigKey(), this.cursorOverlay = new us(this.client), this.commentPins = new ns(this.client, {
7081
+ this.client = new Et(n), this.clientConfigKey = this.getConfigKey(), this.cursorOverlay = new bs(this.client), this.commentPins = new cs(this.client, {
7067
7082
  onPinModeExit: () => {
7068
7083
  this.pinModeActive = !1;
7069
7084
  }
7070
- }), this.viewportOverlay = new Es(this.client), this.selectionOverlay = new bs(this.client), this.drawingOverlay = new fs(this.client), this.settings = ys(this.room), this.applySettings(this.settings), this.unsubs.push(
7085
+ }), this.viewportOverlay = new Ps(this.client), this.selectionOverlay = new $s(this.client), this.drawingOverlay = new xs(this.client), this.settings = Cs(this.room), this.applySettings(this.settings), this.unsubs.push(
7071
7086
  this.client.on("connection", (e) => {
7072
7087
  this.connectionState = e, e === "connected" && this._wasDisconnected ? (this.showConnectedFlash = !0, this._connectedFlashTimer && clearTimeout(this._connectedFlashTimer), this._connectedFlashTimer = setTimeout(() => {
7073
7088
  this.showConnectedFlash = !1, this._connectedFlashTimer = null;
@@ -7104,29 +7119,30 @@ let T = class extends A {
7104
7119
  this.activePanel = null, this.highlightThreadId = null;
7105
7120
  }
7106
7121
  handleToolbarAction(n) {
7107
- var t, i, s, o;
7122
+ var i, s, o, r;
7108
7123
  const e = n.detail;
7109
- if (!(!this.settings.enabled && e !== "settings"))
7110
- switch (e) {
7111
- case "comments":
7112
- this.activePanel = this.activePanel === "comments" ? null : "comments", this.highlightThreadId = null;
7113
- break;
7114
- case "settings":
7115
- this.activePanel = this.activePanel === "settings" ? null : "settings";
7116
- break;
7117
- case "notifications":
7118
- this.activePanel = this.activePanel === "notifications" ? null : "notifications";
7119
- break;
7120
- case "activity":
7121
- this.activePanel = this.activePanel === "activity" ? null : "activity";
7122
- break;
7123
- case "pin-mode":
7124
- this.pinModeActive = !this.pinModeActive, this.pinModeActive ? (t = this.commentPins) == null || t.enterPinMode() : (i = this.commentPins) == null || i.exitPinMode();
7125
- break;
7126
- case "draw-mode":
7127
- this.drawModeActive = !this.drawModeActive, this.drawModeActive ? (s = this.drawingOverlay) == null || s.enableDrawMode() : (o = this.drawingOverlay) == null || o.disableDrawMode();
7128
- break;
7129
- }
7124
+ if (!this.settings.enabled && e !== "settings") return;
7125
+ const t = e === "comments" || e === "settings" || e === "notifications" || e === "activity";
7126
+ switch ((t || e === "pin-mode") && this.drawModeActive && (this.drawModeActive = !1, (i = this.drawingOverlay) == null || i.disableDrawMode()), (t || e === "draw-mode") && this.pinModeActive && (this.pinModeActive = !1, (s = this.commentPins) == null || s.exitPinMode()), (e === "pin-mode" || e === "draw-mode") && (this.activePanel = null), e) {
7127
+ case "comments":
7128
+ this.activePanel = this.activePanel === "comments" ? null : "comments", this.highlightThreadId = null;
7129
+ break;
7130
+ case "settings":
7131
+ this.activePanel = this.activePanel === "settings" ? null : "settings";
7132
+ break;
7133
+ case "notifications":
7134
+ this.activePanel = this.activePanel === "notifications" ? null : "notifications";
7135
+ break;
7136
+ case "activity":
7137
+ this.activePanel = this.activePanel === "activity" ? null : "activity";
7138
+ break;
7139
+ case "pin-mode":
7140
+ this.pinModeActive = !this.pinModeActive, this.pinModeActive && ((o = this.commentPins) == null || o.enterPinMode());
7141
+ break;
7142
+ case "draw-mode":
7143
+ this.drawModeActive = !this.drawModeActive, this.drawModeActive && ((r = this.drawingOverlay) == null || r.enableDrawMode());
7144
+ break;
7145
+ }
7130
7146
  }
7131
7147
  handleFollow(n) {
7132
7148
  const e = n.detail;
@@ -7134,15 +7150,15 @@ let T = class extends A {
7134
7150
  }
7135
7151
  handleSettingsChange(n) {
7136
7152
  const e = n.detail;
7137
- this.settings = e, ws(this.room, e), this.applySettings(e);
7153
+ this.settings = e, Ts(this.room, e), this.applySettings(e);
7138
7154
  }
7139
7155
  applySettings(n) {
7140
- var e, t, i, s, o, r, a, l, d, c, h, p, m, g, y, v, w;
7156
+ var e, t, i, s, o, r, a, l, d, c, h, p, m, g, y, b, w;
7141
7157
  if (!n.enabled) {
7142
7158
  (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;
7143
7159
  return;
7144
7160
  }
7145
- 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() : (p = this.viewportOverlay) == null || p.disable(), n.showSelections ? (m = this.selectionOverlay) == null || m.enable() : (g = this.selectionOverlay) == null || g.disable(), n.showDrawings ? (y = this.drawingOverlay) == null || y.enable() : ((v = this.drawingOverlay) == null || v.disable(), this.drawModeActive && ((w = this.drawingOverlay) == null || w.disableDrawMode(), this.drawModeActive = !1));
7161
+ 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() : (p = this.viewportOverlay) == null || p.disable(), n.showSelections ? (m = this.selectionOverlay) == null || m.enable() : (g = this.selectionOverlay) == null || g.disable(), n.showDrawings ? (y = this.drawingOverlay) == null || y.enable() : ((b = this.drawingOverlay) == null || b.disable(), this.drawModeActive && ((w = this.drawingOverlay) == null || w.disableDrawMode(), this.drawModeActive = !1));
7146
7162
  }
7147
7163
  applyCursorSettings(n) {
7148
7164
  if (!this.cursorOverlay) return;
@@ -7156,10 +7172,10 @@ let T = class extends A {
7156
7172
  * the trigger element, flipping vertically/horizontally as needed.
7157
7173
  */
7158
7174
  positionPopups() {
7159
- var g, y, v, w;
7175
+ var g, y, b, w;
7160
7176
  const n = this.display === "inline", e = (g = this.shadowRoot) == null ? void 0 : g.querySelector(".inline-trigger"), t = (y = this.shadowRoot) == null ? void 0 : y.querySelector("pulse-widget-toolbar"), i = n ? e : t;
7161
7177
  if (!i) return;
7162
- const s = i.getBoundingClientRect(), o = window.innerWidth, r = window.innerHeight, a = 8, l = (v = this.shadowRoot) == null ? void 0 : v.querySelector(".toolbar-popover");
7178
+ const s = i.getBoundingClientRect(), o = window.innerWidth, r = window.innerHeight, a = 8, l = (b = this.shadowRoot) == null ? void 0 : b.querySelector(".toolbar-popover");
7163
7179
  if (l) {
7164
7180
  Object.assign(l.style, { top: "auto", left: "auto" });
7165
7181
  const E = l.getBoundingClientRect(), I = this.computePosition(s, E, o, r, a);
@@ -7196,7 +7212,7 @@ let T = class extends A {
7196
7212
  <span class="connection-dot"></span>Reconnecting...
7197
7213
  </div>` : this.connectionState === "disconnected" && this.client ? u`<div class="connection-banner disconnected">
7198
7214
  <span class="connection-dot"></span>Disconnected
7199
- </div>` : b;
7215
+ </div>` : v;
7200
7216
  }
7201
7217
  handleToolbarToggle() {
7202
7218
  this.collapsed = !this.collapsed, this.collapsed && (this.activePanel = null, this.highlightThreadId = null);
@@ -7216,25 +7232,25 @@ let T = class extends A {
7216
7232
  ${this.activePanel === "comments" ? u`<pulse-widget-comments-panel
7217
7233
  .client=${this.client}
7218
7234
  .highlightThreadId=${this.highlightThreadId}
7219
- ></pulse-widget-comments-panel>` : b}
7235
+ ></pulse-widget-comments-panel>` : v}
7220
7236
  ${this.activePanel === "settings" ? u`<pulse-widget-settings-panel
7221
7237
  .settings=${this.settings}
7222
7238
  .roomId=${this.room}
7223
7239
  @settings-change=${this.handleSettingsChange}
7224
- ></pulse-widget-settings-panel>` : b}
7240
+ ></pulse-widget-settings-panel>` : v}
7225
7241
  ${this.activePanel === "notifications" ? u`<pulse-widget-notifications-panel
7226
7242
  .client=${this.client}
7227
- ></pulse-widget-notifications-panel>` : b}
7243
+ ></pulse-widget-notifications-panel>` : v}
7228
7244
  ${this.activePanel === "activity" ? u`<pulse-widget-activity-panel
7229
7245
  .client=${this.client}
7230
- ></pulse-widget-activity-panel>` : b}
7246
+ ></pulse-widget-activity-panel>` : v}
7231
7247
  </div>
7232
- ` : b, t = this.followingUserId ? u`<div class="follow-banner">
7248
+ ` : v, t = this.followingUserId ? u`<div class="follow-banner">
7233
7249
  Following ${this.getFollowUserName()}
7234
7250
  <button @click=${() => {
7235
7251
  this.followingUserId = null;
7236
7252
  }}>Stop</button>
7237
- </div>` : b;
7253
+ </div>` : v;
7238
7254
  return n ? u`
7239
7255
  ${t}
7240
7256
  <div class="widget-root">