pollcatch 2.3.1 → 2.3.2

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/pc.js +346 -270
package/pc.js CHANGED
@@ -3,16 +3,16 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const yt = globalThis, Ut = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, qt = Symbol(), Jt = /* @__PURE__ */ new WeakMap();
6
+ const yt = globalThis, qt = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ht = Symbol(), Jt = /* @__PURE__ */ new WeakMap();
7
7
  let $e = class {
8
8
  constructor(t, o, r) {
9
- if (this._$cssResult$ = !0, r !== qt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
+ if (this._$cssResult$ = !0, r !== Ht) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
10
  this.cssText = t, this.t = o;
11
11
  }
12
12
  get styleSheet() {
13
13
  let t = this.o;
14
14
  const o = this.t;
15
- if (Ut && t === void 0) {
15
+ if (qt && t === void 0) {
16
16
  const r = o !== void 0 && o.length === 1;
17
17
  r && (t = Jt.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Jt.set(o, t));
18
18
  }
@@ -22,30 +22,30 @@ let $e = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const Ve = (e) => new $e(typeof e == "string" ? e : e + "", void 0, qt), R = (e, ...t) => {
25
+ const Ue = (e) => new $e(typeof e == "string" ? e : e + "", void 0, Ht), R = (e, ...t) => {
26
26
  const o = e.length === 1 ? e[0] : t.reduce((r, s, i) => r + ((a) => {
27
27
  if (a._$cssResult$ === !0) return a.cssText;
28
28
  if (typeof a == "number") return a;
29
29
  throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
30
  })(s) + e[i + 1], e[0]);
31
- return new $e(o, e, qt);
32
- }, Ue = (e, t) => {
33
- if (Ut) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
31
+ return new $e(o, e, Ht);
32
+ }, qe = (e, t) => {
33
+ if (qt) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
34
34
  else for (const o of t) {
35
35
  const r = document.createElement("style"), s = yt.litNonce;
36
36
  s !== void 0 && r.setAttribute("nonce", s), r.textContent = o.cssText, e.appendChild(r);
37
37
  }
38
- }, Qt = Ut ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
38
+ }, Qt = qt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
39
39
  let o = "";
40
40
  for (const r of t.cssRules) o += r.cssText;
41
- return Ve(o);
41
+ return Ue(o);
42
42
  })(e) : e;
43
43
  /**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: qe, defineProperty: He, getOwnPropertyDescriptor: Fe, getOwnPropertyNames: Ye, getOwnPropertySymbols: Ke, getPrototypeOf: Ge } = Object, V = globalThis, te = V.trustedTypes, We = te ? te.emptyScript : "", _t = V.reactiveElementPolyfillSupport, nt = (e, t) => e, wt = { toAttribute(e, t) {
48
+ const { is: He, defineProperty: Fe, getOwnPropertyDescriptor: Ye, getOwnPropertyNames: Ke, getOwnPropertySymbols: Ge, getPrototypeOf: Ze } = Object, V = globalThis, te = V.trustedTypes, We = te ? te.emptyScript : "", Ot = V.reactiveElementPolyfillSupport, nt = (e, t) => e, wt = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
51
  e = e ? We : null;
@@ -73,7 +73,7 @@ const { is: qe, defineProperty: He, getOwnPropertyDescriptor: Fe, getOwnProperty
73
73
  }
74
74
  }
75
75
  return o;
76
- } }, Ht = (e, t) => !qe(e, t), ee = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ht };
76
+ } }, Ft = (e, t) => !He(e, t), ee = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ft };
77
77
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), V.litPropertyMetadata ?? (V.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
78
  let Q = class extends HTMLElement {
79
79
  static addInitializer(t) {
@@ -85,11 +85,11 @@ let Q = class extends HTMLElement {
85
85
  static createProperty(t, o = ee) {
86
86
  if (o.state && (o.attribute = !1), this._$Ei(), this.elementProperties.set(t, o), !o.noAccessor) {
87
87
  const r = Symbol(), s = this.getPropertyDescriptor(t, r, o);
88
- s !== void 0 && He(this.prototype, t, s);
88
+ s !== void 0 && Fe(this.prototype, t, s);
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(t, o, r) {
92
- const { get: s, set: i } = Fe(this.prototype, t) ?? { get() {
92
+ const { get: s, set: i } = Ye(this.prototype, t) ?? { get() {
93
93
  return this[o];
94
94
  }, set(a) {
95
95
  this[o] = a;
@@ -106,13 +106,13 @@ let Q = class extends HTMLElement {
106
106
  }
107
107
  static _$Ei() {
108
108
  if (this.hasOwnProperty(nt("elementProperties"))) return;
109
- const t = Ge(this);
109
+ const t = Ze(this);
110
110
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
111
111
  }
112
112
  static finalize() {
113
113
  if (this.hasOwnProperty(nt("finalized"))) return;
114
114
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(nt("properties"))) {
115
- const o = this.properties, r = [...Ye(o), ...Ke(o)];
115
+ const o = this.properties, r = [...Ke(o), ...Ge(o)];
116
116
  for (const s of r) this.createProperty(s, o[s]);
117
117
  }
118
118
  const t = this[Symbol.metadata];
@@ -161,7 +161,7 @@ let Q = class extends HTMLElement {
161
161
  }
162
162
  createRenderRoot() {
163
163
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
164
- return Ue(t, this.constructor.elementStyles), t;
164
+ return qe(t, this.constructor.elementStyles), t;
165
165
  }
166
166
  connectedCallback() {
167
167
  var t;
@@ -200,7 +200,7 @@ let Q = class extends HTMLElement {
200
200
  }
201
201
  requestUpdate(t, o, r) {
202
202
  if (t !== void 0) {
203
- if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Ht)(this[t], o)) return;
203
+ if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Ft)(this[t], o)) return;
204
204
  this.P(t, o, r);
205
205
  }
206
206
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
@@ -273,20 +273,20 @@ let Q = class extends HTMLElement {
273
273
  firstUpdated(t) {
274
274
  }
275
275
  };
276
- Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[nt("elementProperties")] = /* @__PURE__ */ new Map(), Q[nt("finalized")] = /* @__PURE__ */ new Map(), _t == null || _t({ ReactiveElement: Q }), (V.reactiveElementVersions ?? (V.reactiveElementVersions = [])).push("2.0.4");
276
+ Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[nt("elementProperties")] = /* @__PURE__ */ new Map(), Q[nt("finalized")] = /* @__PURE__ */ new Map(), Ot == null || Ot({ ReactiveElement: Q }), (V.reactiveElementVersions ?? (V.reactiveElementVersions = [])).push("2.0.4");
277
277
  /**
278
278
  * @license
279
279
  * Copyright 2017 Google LLC
280
280
  * SPDX-License-Identifier: BSD-3-Clause
281
281
  */
282
- const lt = globalThis, $t = lt.trustedTypes, oe = $t ? $t.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Se = "$lit$", B = `lit$${Math.random().toFixed(9).slice(2)}$`, Ce = "?" + B, Ze = `<${Ce}>`, G = document, dt = () => G.createComment(""), pt = (e) => e === null || typeof e != "object" && typeof e != "function", Ft = Array.isArray, Xe = (e) => Ft(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", Ot = `[
283
- \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, se = />/g, Y = RegExp(`>|${Ot}(?:([^\\s"'>=/]+)(${Ot}*=${Ot}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ie = /'/g, ae = /"/g, ke = /^(?:script|style|textarea|title)$/i, Je = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = Je(1), U = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), K = G.createTreeWalker(G, 129);
282
+ const lt = globalThis, $t = lt.trustedTypes, oe = $t ? $t.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Se = "$lit$", B = `lit$${Math.random().toFixed(9).slice(2)}$`, Ce = "?" + B, Xe = `<${Ce}>`, G = document, dt = () => G.createComment(""), pt = (e) => e === null || typeof e != "object" && typeof e != "function", Yt = Array.isArray, Je = (e) => Yt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", It = `[
283
+ \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, se = />/g, Y = RegExp(`>|${It}(?:([^\\s"'>=/]+)(${It}*=${It}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ie = /'/g, ae = /"/g, ke = /^(?:script|style|textarea|title)$/i, Qe = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = Qe(1), U = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), K = G.createTreeWalker(G, 129);
285
285
  function Ee(e, t) {
286
- if (!Ft(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
286
+ if (!Yt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
287
  return oe !== void 0 ? oe.createHTML(t) : t;
288
288
  }
289
- const Qe = (e, t) => {
289
+ const to = (e, t) => {
290
290
  const o = e.length - 1, r = [];
291
291
  let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = it;
292
292
  for (let l = 0; l < o; l++) {
@@ -294,16 +294,16 @@ const Qe = (e, t) => {
294
294
  let d, p, h = -1, b = 0;
295
295
  for (; b < n.length && (a.lastIndex = b, p = a.exec(n), p !== null); ) b = a.lastIndex, a === it ? p[1] === "!--" ? a = re : p[1] !== void 0 ? a = se : p[2] !== void 0 ? (ke.test(p[2]) && (s = RegExp("</" + p[2], "g")), a = Y) : p[3] !== void 0 && (a = Y) : a === Y ? p[0] === ">" ? (a = s ?? it, h = -1) : p[1] === void 0 ? h = -2 : (h = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? Y : p[3] === '"' ? ae : ie) : a === ae || a === ie ? a = Y : a === re || a === se ? a = it : (a = Y, s = void 0);
296
296
  const x = a === Y && e[l + 1].startsWith("/>") ? " " : "";
297
- i += a === it ? n + Ze : h >= 0 ? (r.push(d), n.slice(0, h) + Se + n.slice(h) + B + x) : n + B + (h === -2 ? l : x);
297
+ i += a === it ? n + Xe : h >= 0 ? (r.push(d), n.slice(0, h) + Se + n.slice(h) + B + x) : n + B + (h === -2 ? l : x);
298
298
  }
299
299
  return [Ee(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
300
300
  };
301
- let Vt = class Ae {
301
+ let Ut = class Ae {
302
302
  constructor({ strings: t, _$litType$: o }, r) {
303
303
  let s;
304
304
  this.parts = [];
305
305
  let i = 0, a = 0;
306
- const l = t.length - 1, n = this.parts, [d, p] = Qe(t, o);
306
+ const l = t.length - 1, n = this.parts, [d, p] = to(t, o);
307
307
  if (this.el = Ae.createElement(d, r), K.currentNode = this.el.content, o === 2 || o === 3) {
308
308
  const h = this.el.content.firstChild;
309
309
  h.replaceWith(...h.childNodes);
@@ -312,7 +312,7 @@ let Vt = class Ae {
312
312
  if (s.nodeType === 1) {
313
313
  if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Se)) {
314
314
  const b = p[a++], x = s.getAttribute(h).split(B), E = /([.?@])?(.*)/.exec(b);
315
- n.push({ type: 1, index: i, name: E[2], strings: x, ctor: E[1] === "." ? eo : E[1] === "?" ? oo : E[1] === "@" ? ro : kt }), s.removeAttribute(h);
315
+ n.push({ type: 1, index: i, name: E[2], strings: x, ctor: E[1] === "." ? oo : E[1] === "?" ? ro : E[1] === "@" ? so : Et }), s.removeAttribute(h);
316
316
  } else h.startsWith(B) && (n.push({ type: 6, index: i }), s.removeAttribute(h));
317
317
  if (ke.test(s.tagName)) {
318
318
  const h = s.textContent.split(B), b = h.length - 1;
@@ -342,7 +342,7 @@ function et(e, t, o = e, r) {
342
342
  const i = pt(t) ? void 0 : t._$litDirective$;
343
343
  return (s == null ? void 0 : s.constructor) !== i && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), i === void 0 ? s = void 0 : (s = new i(e), s._$AT(e, o, r)), r !== void 0 ? (o._$Co ?? (o._$Co = []))[r] = s : o._$Cl = s), s !== void 0 && (t = et(e, s._$AS(e, t.values), s, r)), t;
344
344
  }
345
- let to = class {
345
+ let eo = class {
346
346
  constructor(t, o) {
347
347
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
348
348
  }
@@ -359,7 +359,7 @@ let to = class {
359
359
  for (; n !== void 0; ) {
360
360
  if (a === n.index) {
361
361
  let d;
362
- n.type === 2 ? d = new ut(i, i.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(i, n.name, n.strings, this, t) : n.type === 6 && (d = new so(i, this, t)), this._$AV.push(d), n = r[++l];
362
+ n.type === 2 ? d = new ut(i, i.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(i, n.name, n.strings, this, t) : n.type === 6 && (d = new io(i, this, t)), this._$AV.push(d), n = r[++l];
363
363
  }
364
364
  a !== (n == null ? void 0 : n.index) && (i = K.nextNode(), a++);
365
365
  }
@@ -390,7 +390,7 @@ class ut {
390
390
  return this._$AB;
391
391
  }
392
392
  _$AI(t, o = this) {
393
- t = et(this, t, o), pt(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Xe(t) ? this.k(t) : this._(t);
393
+ t = et(this, t, o), pt(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Je(t) ? this.k(t) : this._(t);
394
394
  }
395
395
  O(t) {
396
396
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -403,19 +403,19 @@ class ut {
403
403
  }
404
404
  $(t) {
405
405
  var i;
406
- const { values: o, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Vt.createElement(Ee(r.h, r.h[0]), this.options)), r);
406
+ const { values: o, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Ut.createElement(Ee(r.h, r.h[0]), this.options)), r);
407
407
  if (((i = this._$AH) == null ? void 0 : i._$AD) === s) this._$AH.p(o);
408
408
  else {
409
- const a = new to(s, this), l = a.u(this.options);
409
+ const a = new eo(s, this), l = a.u(this.options);
410
410
  a.p(o), this.T(l), this._$AH = a;
411
411
  }
412
412
  }
413
413
  _$AC(t) {
414
414
  let o = ne.get(t.strings);
415
- return o === void 0 && ne.set(t.strings, o = new Vt(t)), o;
415
+ return o === void 0 && ne.set(t.strings, o = new Ut(t)), o;
416
416
  }
417
417
  k(t) {
418
- Ft(this._$AH) || (this._$AH = [], this._$AR());
418
+ Yt(this._$AH) || (this._$AH = [], this._$AR());
419
419
  const o = this._$AH;
420
420
  let r, s = 0;
421
421
  for (const i of t) s === o.length ? o.push(r = new ut(this.O(dt()), this.O(dt()), this, this.options)) : r = o[s], r._$AI(i), s++;
@@ -433,7 +433,7 @@ class ut {
433
433
  this._$AM === void 0 && (this._$Cv = t, (o = this._$AP) == null || o.call(this, t));
434
434
  }
435
435
  }
436
- class kt {
436
+ class Et {
437
437
  get tagName() {
438
438
  return this.element.tagName;
439
439
  }
@@ -458,7 +458,7 @@ class kt {
458
458
  t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
- let eo = class extends kt {
461
+ let oo = class extends Et {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
@@ -466,7 +466,7 @@ let eo = class extends kt {
466
466
  this.element[this.name] = t === u ? void 0 : t;
467
467
  }
468
468
  };
469
- class oo extends kt {
469
+ class ro extends Et {
470
470
  constructor() {
471
471
  super(...arguments), this.type = 4;
472
472
  }
@@ -474,7 +474,7 @@ class oo extends kt {
474
474
  this.element.toggleAttribute(this.name, !!t && t !== u);
475
475
  }
476
476
  }
477
- class ro extends kt {
477
+ class so extends Et {
478
478
  constructor(t, o, r, s, i) {
479
479
  super(t, o, r, s, i), this.type = 5;
480
480
  }
@@ -488,7 +488,7 @@ class ro extends kt {
488
488
  typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, t) : this._$AH.handleEvent(t);
489
489
  }
490
490
  }
491
- class so {
491
+ class io {
492
492
  constructor(t, o, r) {
493
493
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = r;
494
494
  }
@@ -499,9 +499,9 @@ class so {
499
499
  et(this, t);
500
500
  }
501
501
  }
502
- const It = lt.litHtmlPolyfillSupport;
503
- It == null || It(Vt, ut), (lt.litHtmlVersions ?? (lt.litHtmlVersions = [])).push("3.2.1");
504
- const io = (e, t, o) => {
502
+ const zt = lt.litHtmlPolyfillSupport;
503
+ zt == null || zt(Ut, ut), (lt.litHtmlVersions ?? (lt.litHtmlVersions = [])).push("3.2.1");
504
+ const ao = (e, t, o) => {
505
505
  const r = (o == null ? void 0 : o.renderBefore) ?? t;
506
506
  let s = r._$litPart$;
507
507
  if (s === void 0) {
@@ -526,7 +526,7 @@ let N = class extends Q {
526
526
  }
527
527
  update(t) {
528
528
  const o = this.render();
529
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = io(o, this.renderRoot, this.renderOptions);
529
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ao(o, this.renderRoot, this.renderOptions);
530
530
  }
531
531
  connectedCallback() {
532
532
  var t;
@@ -542,8 +542,8 @@ let N = class extends Q {
542
542
  };
543
543
  var we;
544
544
  N._$litElement$ = !0, N.finalized = !0, (we = globalThis.litElementHydrateSupport) == null || we.call(globalThis, { LitElement: N });
545
- const zt = globalThis.litElementPolyfillSupport;
546
- zt == null || zt({ LitElement: N });
545
+ const Mt = globalThis.litElementPolyfillSupport;
546
+ Mt == null || Mt({ LitElement: N });
547
547
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
548
548
  /**
549
549
  * @license
@@ -560,7 +560,7 @@ const H = (e) => (t, o) => {
560
560
  * Copyright 2017 Google LLC
561
561
  * SPDX-License-Identifier: BSD-3-Clause
562
562
  */
563
- const ao = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ht }, no = (e = ao, t, o) => {
563
+ const no = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ft }, lo = (e = no, t, o) => {
564
564
  const { kind: r, metadata: s } = o;
565
565
  let i = globalThis.litPropertyMetadata.get(s);
566
566
  if (i === void 0 && globalThis.litPropertyMetadata.set(s, i = /* @__PURE__ */ new Map()), i.set(o.name, e), r === "accessor") {
@@ -582,7 +582,7 @@ const ao = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged
582
582
  throw Error("Unsupported decorator location: " + r);
583
583
  };
584
584
  function f(e) {
585
- return (t, o) => typeof o == "object" ? no(e, t, o) : ((r, s, i) => {
585
+ return (t, o) => typeof o == "object" ? lo(e, t, o) : ((r, s, i) => {
586
586
  const a = s.hasOwnProperty(i);
587
587
  return s.constructor.createProperty(i, a ? { ...r, wrapped: !0 } : r), a ? Object.getOwnPropertyDescriptor(s, i) : void 0;
588
588
  })(e, t, o);
@@ -600,7 +600,7 @@ function k(e) {
600
600
  * Copyright 2017 Google LLC
601
601
  * SPDX-License-Identifier: BSD-3-Clause
602
602
  */
603
- const lo = (e, t, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, o), o);
603
+ const co = (e, t, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, o), o);
604
604
  /**
605
605
  * @license
606
606
  * Copyright 2017 Google LLC
@@ -612,13 +612,13 @@ function ht(e, t) {
612
612
  var l;
613
613
  return ((l = a.renderRoot) == null ? void 0 : l.querySelector(e)) ?? null;
614
614
  };
615
- return lo(o, r, { get() {
615
+ return co(o, r, { get() {
616
616
  return i(this);
617
617
  } });
618
618
  };
619
619
  }
620
620
  var S = /* @__PURE__ */ ((e) => (e.reaction = "reaction", e.stars = "stars", e.poll = "poll", e.text = "text", e.nps = "nps", e))(S || {});
621
- const Yt = c`
621
+ const Kt = c`
622
622
  <svg
623
623
  xmlns="http://www.w3.org/2000/svg"
624
624
  height="24px"
@@ -628,7 +628,7 @@ const Yt = c`
628
628
  >
629
629
  <path d="M640-160v-280h160v280H640Zm-240 0v-640h160v640H400Zm-240 0v-440h160v440H160Z" />
630
630
  </svg>
631
- `, Kt = c`
631
+ `, Gt = c`
632
632
  <svg
633
633
  xmlns="http://www.w3.org/2000/svg"
634
634
  height="24px"
@@ -640,7 +640,7 @@ const Yt = c`
640
640
  d="M160-160v-440h160v440H160Zm240 0v-400l160 160v240H400Zm160-354L400-674v-126h160v286Zm240 240L640-434v-6h160v166Zm-9 219L55-791l57-57 736 736-57 57Z"
641
641
  />
642
642
  </svg>
643
- `, Gt = c`
643
+ `, St = c`
644
644
  <svg
645
645
  xmlns="http://www.w3.org/2000/svg"
646
646
  height="24px"
@@ -652,7 +652,7 @@ const Yt = c`
652
652
  d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"
653
653
  />
654
654
  </svg>
655
- `, co = c`
655
+ `, po = c`
656
656
  <svg
657
657
  xmlns="http://www.w3.org/2000/svg"
658
658
  width="16"
@@ -664,50 +664,60 @@ const Yt = c`
664
664
  d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"
665
665
  />
666
666
  </svg>
667
+ `, Pe = c`
668
+ <svg
669
+ xmlns="http://www.w3.org/2000/svg"
670
+ height="24px"
671
+ viewBox="0 -960 960 960"
672
+ width="24px"
673
+ fill="currentColor"
674
+ >
675
+ <path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" />
676
+ </svg>
667
677
  `;
668
- var po = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
678
+ var uo = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
669
679
  return typeof e == "string" ? e.length > 0 : typeof e == "number";
670
680
  }, $ = function(e, t, o) {
671
681
  return t === void 0 && (t = 0), o === void 0 && (o = Math.pow(10, t)), Math.round(o * e) / o + 0;
672
682
  }, A = function(e, t, o) {
673
683
  return t === void 0 && (t = 0), o === void 0 && (o = 1), e > o ? o : e > t ? e : t;
674
- }, Pe = function(e) {
684
+ }, Te = function(e) {
675
685
  return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
676
686
  }, le = function(e) {
677
687
  return { r: A(e.r, 0, 255), g: A(e.g, 0, 255), b: A(e.b, 0, 255), a: A(e.a) };
678
- }, Mt = function(e) {
688
+ }, Lt = function(e) {
679
689
  return { r: $(e.r), g: $(e.g), b: $(e.b), a: $(e.a, 3) };
680
- }, uo = /^#([0-9a-f]{3,8})$/i, vt = function(e) {
690
+ }, ho = /^#([0-9a-f]{3,8})$/i, vt = function(e) {
681
691
  var t = e.toString(16);
682
692
  return t.length < 2 ? "0" + t : t;
683
- }, Te = function(e) {
693
+ }, _e = function(e) {
684
694
  var t = e.r, o = e.g, r = e.b, s = e.a, i = Math.max(t, o, r), a = i - Math.min(t, o, r), l = a ? i === t ? (o - r) / a : i === o ? 2 + (r - t) / a : 4 + (t - o) / a : 0;
685
695
  return { h: 60 * (l < 0 ? l + 6 : l), s: i ? a / i * 100 : 0, v: i / 255 * 100, a: s };
686
- }, _e = function(e) {
696
+ }, Oe = function(e) {
687
697
  var t = e.h, o = e.s, r = e.v, s = e.a;
688
698
  t = t / 360 * 6, o /= 100, r /= 100;
689
699
  var i = Math.floor(t), a = r * (1 - o), l = r * (1 - (t - i) * o), n = r * (1 - (1 - t + i) * o), d = i % 6;
690
700
  return { r: 255 * [r, l, a, a, n, r][d], g: 255 * [n, r, r, l, a, a][d], b: 255 * [a, a, n, r, r, l][d], a: s };
691
701
  }, ce = function(e) {
692
- return { h: Pe(e.h), s: A(e.s, 0, 100), l: A(e.l, 0, 100), a: A(e.a) };
702
+ return { h: Te(e.h), s: A(e.s, 0, 100), l: A(e.l, 0, 100), a: A(e.a) };
693
703
  }, de = function(e) {
694
704
  return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
695
705
  }, pe = function(e) {
696
- return _e((o = (t = e).s, { h: t.h, s: (o *= ((r = t.l) < 50 ? r : 100 - r) / 100) > 0 ? 2 * o / (r + o) * 100 : 0, v: r + o, a: t.a }));
706
+ return Oe((o = (t = e).s, { h: t.h, s: (o *= ((r = t.l) < 50 ? r : 100 - r) / 100) > 0 ? 2 * o / (r + o) * 100 : 0, v: r + o, a: t.a }));
697
707
  var t, o, r;
698
708
  }, ct = function(e) {
699
- return { h: (t = Te(e)).h, s: (s = (200 - (o = t.s)) * (r = t.v) / 100) > 0 && s < 200 ? o * r / 100 / (s <= 100 ? s : 200 - s) * 100 : 0, l: s / 2, a: t.a };
709
+ return { h: (t = _e(e)).h, s: (s = (200 - (o = t.s)) * (r = t.v) / 100) > 0 && s < 200 ? o * r / 100 / (s <= 100 ? s : 200 - s) * 100 : 0, l: s / 2, a: t.a };
700
710
  var t, o, r, s;
701
- }, ho = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, fo = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, go = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, mo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ue = { string: [[function(e) {
702
- var t = uo.exec(e);
711
+ }, fo = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, go = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, mo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, vo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ue = { string: [[function(e) {
712
+ var t = ho.exec(e);
703
713
  return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? $(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? $(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
704
714
  }, "hex"], [function(e) {
705
- var t = go.exec(e) || mo.exec(e);
715
+ var t = mo.exec(e) || vo.exec(e);
706
716
  return t ? t[2] !== t[4] || t[4] !== t[6] ? null : le({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
707
717
  }, "rgb"], [function(e) {
708
- var t = ho.exec(e) || fo.exec(e);
718
+ var t = fo.exec(e) || go.exec(e);
709
719
  if (!t) return null;
710
- var o, r, s = ce({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (po[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
720
+ var o, r, s = ce({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (uo[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
711
721
  return pe(s);
712
722
  }, "hsl"]], object: [[function(e) {
713
723
  var t = e.r, o = e.g, r = e.b, s = e.a, i = s === void 0 ? 1 : s;
@@ -721,44 +731,44 @@ var po = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
721
731
  var t = e.h, o = e.s, r = e.v, s = e.a, i = s === void 0 ? 1 : s;
722
732
  if (!z(t) || !z(o) || !z(r)) return null;
723
733
  var a = function(l) {
724
- return { h: Pe(l.h), s: A(l.s, 0, 100), v: A(l.v, 0, 100), a: A(l.a) };
734
+ return { h: Te(l.h), s: A(l.s, 0, 100), v: A(l.v, 0, 100), a: A(l.a) };
725
735
  }({ h: Number(t), s: Number(o), v: Number(r), a: Number(i) });
726
- return _e(a);
736
+ return Oe(a);
727
737
  }, "hsv"]] }, he = function(e, t) {
728
738
  for (var o = 0; o < t.length; o++) {
729
739
  var r = t[o][0](e);
730
740
  if (r) return [r, t[o][1]];
731
741
  }
732
742
  return [null, void 0];
733
- }, vo = function(e) {
743
+ }, bo = function(e) {
734
744
  return typeof e == "string" ? he(e.trim(), ue.string) : typeof e == "object" && e !== null ? he(e, ue.object) : [null, void 0];
735
- }, Lt = function(e, t) {
745
+ }, Nt = function(e, t) {
736
746
  var o = ct(e);
737
747
  return { h: o.h, s: A(o.s + 100 * t, 0, 100), l: o.l, a: o.a };
738
- }, Nt = function(e) {
748
+ }, Dt = function(e) {
739
749
  return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
740
750
  }, fe = function(e, t) {
741
751
  var o = ct(e);
742
752
  return { h: o.h, s: o.s, l: A(o.l + 100 * t, 0, 100), a: o.a };
743
753
  }, ge = function() {
744
754
  function e(t) {
745
- this.parsed = vo(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
755
+ this.parsed = bo(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
746
756
  }
747
757
  return e.prototype.isValid = function() {
748
758
  return this.parsed !== null;
749
759
  }, e.prototype.brightness = function() {
750
- return $(Nt(this.rgba), 2);
760
+ return $(Dt(this.rgba), 2);
751
761
  }, e.prototype.isDark = function() {
752
- return Nt(this.rgba) < 0.5;
762
+ return Dt(this.rgba) < 0.5;
753
763
  }, e.prototype.isLight = function() {
754
- return Nt(this.rgba) >= 0.5;
764
+ return Dt(this.rgba) >= 0.5;
755
765
  }, e.prototype.toHex = function() {
756
- return t = Mt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? vt($(255 * i)) : "", "#" + vt(o) + vt(r) + vt(s) + a;
766
+ return t = Lt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? vt($(255 * i)) : "", "#" + vt(o) + vt(r) + vt(s) + a;
757
767
  var t, o, r, s, i, a;
758
768
  }, e.prototype.toRgb = function() {
759
- return Mt(this.rgba);
769
+ return Lt(this.rgba);
760
770
  }, e.prototype.toRgbString = function() {
761
- return t = Mt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
771
+ return t = Lt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
762
772
  var t, o, r, s, i;
763
773
  }, e.prototype.toHsl = function() {
764
774
  return de(ct(this.rgba));
@@ -766,17 +776,17 @@ var po = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
766
776
  return t = de(ct(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
767
777
  var t, o, r, s, i;
768
778
  }, e.prototype.toHsv = function() {
769
- return t = Te(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
779
+ return t = _e(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
770
780
  var t;
771
781
  }, e.prototype.invert = function() {
772
782
  return T({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
773
783
  var t;
774
784
  }, e.prototype.saturate = function(t) {
775
- return t === void 0 && (t = 0.1), T(Lt(this.rgba, t));
785
+ return t === void 0 && (t = 0.1), T(Nt(this.rgba, t));
776
786
  }, e.prototype.desaturate = function(t) {
777
- return t === void 0 && (t = 0.1), T(Lt(this.rgba, -t));
787
+ return t === void 0 && (t = 0.1), T(Nt(this.rgba, -t));
778
788
  }, e.prototype.grayscale = function() {
779
- return T(Lt(this.rgba, -1));
789
+ return T(Nt(this.rgba, -1));
780
790
  }, e.prototype.lighten = function(t) {
781
791
  return t === void 0 && (t = 0.1), T(fe(this.rgba, t));
782
792
  }, e.prototype.darken = function(t) {
@@ -795,26 +805,26 @@ var po = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
795
805
  }(), T = function(e) {
796
806
  return e instanceof ge ? e : new ge(e);
797
807
  };
798
- const Dt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
799
- function bo(e) {
808
+ const Rt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
809
+ function yo(e) {
800
810
  return {
801
811
  debug: (t, ...o) => {
802
- Dt && console.debug(`[${e}]`, t, ...o);
812
+ Rt && console.debug(`[${e}]`, t, ...o);
803
813
  },
804
814
  info: (t, ...o) => {
805
- Dt && console.info(`[${e}]`, t, ...o);
815
+ Rt && console.info(`[${e}]`, t, ...o);
806
816
  },
807
817
  warn: (t, ...o) => {
808
- Dt && console.warn(`[${e}]`, t, ...o);
818
+ Rt && console.warn(`[${e}]`, t, ...o);
809
819
  },
810
820
  error: (t, ...o) => {
811
821
  console.error(`[${e}]`, t, ...o);
812
822
  }
813
823
  };
814
824
  }
815
- const m = bo("Pollcatch");
816
- var Oe = /* @__PURE__ */ ((e) => (e[e.AA_NORMAL = 4.5] = "AA_NORMAL", e[e.AA_LARGE = 3] = "AA_LARGE", e[e.AAA_NORMAL = 7] = "AAA_NORMAL", e[e.AAA_LARGE = 4.5] = "AAA_LARGE", e))(Oe || {});
817
- const yo = {
825
+ const m = yo("Pollcatch");
826
+ var Ie = /* @__PURE__ */ ((e) => (e[e.AA_NORMAL = 4.5] = "AA_NORMAL", e[e.AA_LARGE = 3] = "AA_LARGE", e[e.AAA_NORMAL = 7] = "AAA_NORMAL", e[e.AAA_LARGE = 4.5] = "AAA_LARGE", e))(Ie || {});
827
+ const xo = {
818
828
  black: "#000000",
819
829
  white: "#ffffff",
820
830
  red: "#ff0000",
@@ -831,19 +841,19 @@ const yo = {
831
841
  teal: "#008080",
832
842
  navy: "#000080"
833
843
  };
834
- function xo(e) {
844
+ function wo(e) {
835
845
  const t = e.toLowerCase().trim();
836
- return yo[t] || null;
846
+ return xo[t] || null;
837
847
  }
838
- function Rt(e, t) {
848
+ function jt(e, t) {
839
849
  const o = me(e), r = me(t), s = Math.max(o, r), i = Math.min(o, r);
840
850
  return (s + 0.05) / (i + 0.05);
841
851
  }
842
852
  function me(e) {
843
- const t = $o(e), o = t.r / 255, r = t.g / 255, s = t.b / 255, i = o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4), a = r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4), l = s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
853
+ const t = So(e), o = t.r / 255, r = t.g / 255, s = t.b / 255, i = o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4), a = r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4), l = s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
844
854
  return 0.2126 * i + 0.7152 * a + 0.0722 * l;
845
855
  }
846
- function wo(e, t = {}) {
856
+ function $o(e, t = {}) {
847
857
  if (!T(e).isValid())
848
858
  return m.warn(`Invalid color provided: ${e}`), "black";
849
859
  const {
@@ -857,15 +867,15 @@ function wo(e, t = {}) {
857
867
  } = t, l = s.map((p) => p === "black" ? "#000000" : p === "white" ? "#ffffff" : p === "light" ? i.light || "#f8f9fa" : p === "dark" ? i.dark || "#343a40" : p);
858
868
  let n = a, d = 0;
859
869
  for (const p of l) {
860
- const h = Rt(e, p);
870
+ const h = jt(e, p);
861
871
  h >= r && h > d && (d = h, n = p);
862
872
  }
863
873
  if (d === 0) {
864
- const p = Rt(e, a);
874
+ const p = jt(e, a);
865
875
  n = a, d = p;
866
876
  for (const h of l) {
867
877
  if (h === a) continue;
868
- const b = Rt(e, h);
878
+ const b = jt(e, h);
869
879
  b > d && (d = b, n = h);
870
880
  }
871
881
  m.warn(
@@ -874,8 +884,8 @@ function wo(e, t = {}) {
874
884
  }
875
885
  return n;
876
886
  }
877
- function $o(e) {
878
- const o = xo(e) || e, r = T(o);
887
+ function So(e) {
888
+ const o = wo(e) || e, r = T(o);
879
889
  if (!r.isValid())
880
890
  return m.warn(`Invalid color provided: ${e}`), { r: 0, g: 0, b: 0 };
881
891
  const { r: s, g: i, b: a } = r.toRgb();
@@ -893,7 +903,7 @@ function O(e, t) {
893
903
  }[t] : void 0;
894
904
  return e === "left" || e === "right" ? r || "center" : e === "top" || e === "bottom" ? r || "start" : r || "center";
895
905
  }
896
- function jt(e, t = "1rem", o = 1) {
906
+ function Bt(e, t = "1rem", o = 1) {
897
907
  if (!e) return t;
898
908
  const r = {
899
909
  xs: 0.7,
@@ -912,7 +922,7 @@ function jt(e, t = "1rem", o = 1) {
912
922
  const l = parseFloat(i);
913
923
  return isNaN(l) ? t : `${l}rem`;
914
924
  }
915
- function So(e, t = "4px") {
925
+ function Co(e, t = "4px") {
916
926
  if (!e) return t;
917
927
  const o = {
918
928
  xs: "2px",
@@ -943,7 +953,7 @@ function tt(e) {
943
953
  }
944
954
  return t;
945
955
  }
946
- function Co(e, t, o) {
956
+ function ko(e, t, o) {
947
957
  return tt({
948
958
  role: "button",
949
959
  ariaLabel: e,
@@ -951,7 +961,7 @@ function Co(e, t, o) {
951
961
  ariaDisabled: o
952
962
  });
953
963
  }
954
- function ko(e, t, o, r = !1) {
964
+ function Eo(e, t, o, r = !1) {
955
965
  return tt({
956
966
  role: r ? "radio" : "checkbox",
957
967
  ariaLabel: e,
@@ -959,38 +969,38 @@ function ko(e, t, o, r = !1) {
959
969
  ariaDisabled: o
960
970
  });
961
971
  }
962
- function Bt(e, t, o) {
972
+ function Vt(e, t, o) {
963
973
  typeof o == "boolean" ? e.setAttribute(t, o ? "true" : "false") : e.setAttribute(t, o);
964
974
  }
965
- function Eo(e) {
975
+ function Ao(e) {
966
976
  if (typeof e != "string")
967
977
  return !1;
968
978
  const t = e.replace(/[<>"']/g, "").trim();
969
979
  return /^(#[0-9a-fA-F]{3,8}|rgb\([^)]+\)|rgba\([^)]+\)|hsl\([^)]+\)|hsla\([^)]+\)|[a-zA-Z]+)$/.test(t);
970
980
  }
971
981
  function J(e) {
972
- return Eo(e) ? e.replace(/[<>"']/g, "").trim() : (m.warn("Invalid color value:", e), "#000000");
982
+ return Ao(e) ? e.replace(/[<>"']/g, "").trim() : (m.warn("Invalid color value:", e), "#000000");
973
983
  }
974
- function Ao(e) {
984
+ function Po(e) {
975
985
  if (typeof e != "string")
976
986
  return m.warn("Non-string value passed to sanitizeCSS:", typeof e), "";
977
987
  let t = e;
978
988
  return t = t.replace(/@import[^;]+;/gi, "").replace(/expression\s*\([^)]*\)/gi, "").replace(/javascript:\s*[^"'\s;]*/gi, "").replace(/url\s*\(\s*["']?data:(?!image\/[^;]+;base64,)[^"')]*["']?\s*\)/gi, "").replace(/-moz-binding\s*:[^;]+;/gi, "").replace(/behavior\s*:[^;]+;/gi, ""), t;
979
989
  }
980
- function Po(e) {
990
+ function To(e) {
981
991
  return typeof e != "string" || !e.trim() ? "" : e.replace(
982
992
  /([^{}:;]+):\s*([^;{}!]+)(\s*!important)?\s*(;|})/gi,
983
993
  (t, o, r, s, i) => s ? t : `${o}: ${r.trim()} !important${i}`
984
994
  );
985
995
  }
986
- const ve = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", To = "pc_session_id", _o = 24 * 60 * 60 * 1e3;
996
+ const ve = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", _o = "pc_session_id", Oo = 24 * 60 * 60 * 1e3;
987
997
  function be() {
988
998
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (m.warn("crypto.randomUUID not available, using fallback UUID generator"), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
989
999
  const t = Math.random() * 16 | 0;
990
1000
  return (e === "x" ? t : t & 3 | 8).toString(16);
991
1001
  }));
992
1002
  }
993
- function Wt() {
1003
+ function Zt() {
994
1004
  const e = "test-local-storage";
995
1005
  try {
996
1006
  return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
@@ -998,7 +1008,7 @@ function Wt() {
998
1008
  return m.warn("localStorage not available, session ID will not persist"), !1;
999
1009
  }
1000
1010
  }
1001
- function Ie(e) {
1011
+ function ze(e) {
1002
1012
  try {
1003
1013
  const t = localStorage.getItem(e);
1004
1014
  return t ? JSON.parse(t) : void 0;
@@ -1007,14 +1017,14 @@ function Ie(e) {
1007
1017
  return;
1008
1018
  }
1009
1019
  }
1010
- function ze(e, t) {
1020
+ function Me(e, t) {
1011
1021
  try {
1012
1022
  return localStorage.setItem(e, JSON.stringify(t)), !0;
1013
1023
  } catch (o) {
1014
1024
  return m.warn(`Failed to set item in localStorage: ${e}`, o), !1;
1015
1025
  }
1016
1026
  }
1017
- async function Oo() {
1027
+ async function Io() {
1018
1028
  if (typeof window < "u") {
1019
1029
  if (window.pcProject !== void 0)
1020
1030
  return m.debug("Found project key in global variable"), window.pcProject;
@@ -1028,9 +1038,9 @@ async function Oo() {
1028
1038
  m.warn("No project key found in global variable or script tags");
1029
1039
  }
1030
1040
  async function ye() {
1031
- const e = To, t = _o;
1032
- if (Wt()) {
1033
- const o = Ie(e);
1041
+ const e = _o, t = Oo;
1042
+ if (Zt()) {
1043
+ const o = ze(e);
1034
1044
  if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
1035
1045
  return m.debug("Using existing session ID from localStorage"), o.id;
1036
1046
  m.debug(
@@ -1038,7 +1048,7 @@ async function ye() {
1038
1048
  "generating new one"
1039
1049
  );
1040
1050
  const r = be();
1041
- return ze(e, {
1051
+ return Me(e, {
1042
1052
  id: r,
1043
1053
  timestamp: Date.now()
1044
1054
  }) ? m.debug("Generated and stored new session ID") : m.warn("Generated session ID but failed to store it"), r;
@@ -1047,7 +1057,7 @@ async function ye() {
1047
1057
  return m.debug("Generated non-persistent session ID"), o;
1048
1058
  }
1049
1059
  }
1050
- function St(e) {
1060
+ function Ct(e) {
1051
1061
  if (!e || typeof e != "object")
1052
1062
  return 0;
1053
1063
  let t = 0, o = 0, r = 0;
@@ -1060,7 +1070,7 @@ function St(e) {
1060
1070
  const s = t / r * 100, i = o / r * 100;
1061
1071
  return Math.round(s - i);
1062
1072
  }
1063
- function Io(e) {
1073
+ function zo(e) {
1064
1074
  if (!e || typeof e != "object")
1065
1075
  return { promoters: 0, passives: 0, detractors: 0 };
1066
1076
  let t = 0, o = 0, r = 0;
@@ -1070,14 +1080,14 @@ function Io(e) {
1070
1080
  }
1071
1081
  return { promoters: t, passives: o, detractors: r };
1072
1082
  }
1073
- function zo(e, t) {
1083
+ function Mo(e, t) {
1074
1084
  const o = {};
1075
1085
  for (const r of t)
1076
1086
  o[r] = e[r] || 0;
1077
1087
  return o;
1078
1088
  }
1079
- function Mo(e, t) {
1080
- const o = t ? zo(e, t) : e;
1089
+ function Lo(e, t) {
1090
+ const o = t ? Mo(e, t) : e;
1081
1091
  let r = 0, s = 0;
1082
1092
  for (const [a, l] of Object.entries(o)) {
1083
1093
  s += l;
@@ -1096,26 +1106,26 @@ function L() {
1096
1106
  updated: (/* @__PURE__ */ new Date()).toISOString()
1097
1107
  };
1098
1108
  }
1099
- function Lo(e) {
1100
- if (!Wt())
1109
+ function No(e) {
1110
+ if (!Zt())
1101
1111
  return L();
1102
1112
  try {
1103
- const t = Ie(e);
1113
+ const t = ze(e);
1104
1114
  return t ? { ...L(), ...t } : L();
1105
1115
  } catch (t) {
1106
1116
  return m.warn("Failed to load localStats from localStorage", t), L();
1107
1117
  }
1108
1118
  }
1109
- function No(e, t) {
1110
- if (!Wt())
1119
+ function Do(e, t) {
1120
+ if (!Zt())
1111
1121
  return !1;
1112
1122
  try {
1113
- return ze(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1123
+ return Me(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1114
1124
  } catch (o) {
1115
1125
  return m.warn("Failed to save localStats to localStorage", o), !1;
1116
1126
  }
1117
1127
  }
1118
- function Do(e, t) {
1128
+ function Ro(e, t) {
1119
1129
  const o = {
1120
1130
  count: Math.max(0, e.count - t.count),
1121
1131
  sum: (e.sum || 0) - (t.sum || 0),
@@ -1128,9 +1138,9 @@ function Do(e, t) {
1128
1138
  if (o.count > 0 && o.sum !== void 0 ? o.avg = Math.round(o.sum / o.count * 100) / 100 : o.avg = 0, t.breakdown && o.breakdown)
1129
1139
  for (const [r, s] of Object.entries(t.breakdown))
1130
1140
  o.breakdown[r] && (o.breakdown[r] = Math.max(0, o.breakdown[r] - s), o.breakdown[r] === 0 && delete o.breakdown[r]);
1131
- return o.nps = St((o == null ? void 0 : o.breakdown) || {}), o;
1141
+ return o.nps = Ct((o == null ? void 0 : o.breakdown) || {}), o;
1132
1142
  }
1133
- function Ro(e, t) {
1143
+ function jo(e, t) {
1134
1144
  if (!e.count && !t.count)
1135
1145
  return L();
1136
1146
  if (!e.count)
@@ -1149,12 +1159,12 @@ function Ro(e, t) {
1149
1159
  for (const [r, s] of Object.entries(t.breakdown))
1150
1160
  o.breakdown[r] = (o.breakdown[r] || 0) + s;
1151
1161
  }
1152
- return o.nps = St((o == null ? void 0 : o.breakdown) || {}), o;
1162
+ return o.nps = Ct((o == null ? void 0 : o.breakdown) || {}), o;
1153
1163
  }
1154
- function Me(e) {
1164
+ function Le(e) {
1155
1165
  return !e || typeof e != "string" ? !1 : /^[\p{Emoji}]$/u.test(e) ? !0 : new RegExp("^\\p{Emoji}(\\p{Emoji_Modifier}|\\u200D\\p{Emoji})*$", "u").test(e);
1156
1166
  }
1157
- function Et(e) {
1167
+ function At(e) {
1158
1168
  if (!e || typeof e != "string")
1159
1169
  return !1;
1160
1170
  const t = e.trim();
@@ -1168,7 +1178,7 @@ function Et(e) {
1168
1178
  return !1;
1169
1179
  }
1170
1180
  }
1171
- function jo(e) {
1181
+ function Bo(e) {
1172
1182
  if (!e || typeof e != "string")
1173
1183
  return [];
1174
1184
  const t = e.trim();
@@ -1183,24 +1193,24 @@ function jo(e) {
1183
1193
  }
1184
1194
  return t.split(",").map((o) => o.trim()).filter((o) => o !== "");
1185
1195
  }
1186
- function Bo(e, t) {
1196
+ function Vo(e, t) {
1187
1197
  const o = /{([^{}]+)}/g;
1188
1198
  return e.replace(o, (r, s) => {
1189
1199
  const i = s.trim(), a = t[i];
1190
1200
  return a !== void 0 ? String(a) : r;
1191
1201
  });
1192
1202
  }
1193
- function Vo(e, t) {
1203
+ function Uo(e, t) {
1194
1204
  let o = 2166136261;
1195
1205
  const r = e + ":" + t;
1196
1206
  for (let s = 0; s < r.length; s++)
1197
1207
  o ^= r.charCodeAt(s), o += (o << 1) + (o << 4) + (o << 7) + (o << 8) + (o << 24);
1198
1208
  return (o >>> 0).toString(16).padStart(8, "0");
1199
1209
  }
1200
- function Uo(e, t = 50) {
1210
+ function qo(e, t = 50) {
1201
1211
  return e.length <= t ? e : e.substring(0, t).trim() + "...";
1202
1212
  }
1203
- class qo {
1213
+ class Ho {
1204
1214
  // Tracks if user has ever made a selection (even if later deselected)
1205
1215
  constructor(t) {
1206
1216
  this.stats = L(), this.localStats = L(), this.prevLocalStats = L(), this.isLoading = !0, this.isSubmitting = !1, this.hasInteracted = !1, (this.host = t).addController(this);
@@ -1209,7 +1219,7 @@ class qo {
1209
1219
  this.loadStats();
1210
1220
  }
1211
1221
  async getProjectId() {
1212
- return this.host.project || await Oo() || "public";
1222
+ return this.host.project || await Io() || "public";
1213
1223
  }
1214
1224
  async getLocalStatsKey() {
1215
1225
  const t = this.host, o = await ye(), r = await this.getProjectId(), s = t.name || "unnamed";
@@ -1264,12 +1274,12 @@ class qo {
1264
1274
  throw m.error("Backend returned unsuccessful response", a), new Error("Backend returned unsuccessful response");
1265
1275
  l = a.data || {};
1266
1276
  }
1267
- const n = this.getOptionsForDataFunc(t), d = Mo(l.breakdown ?? {}, n), p = d.count, h = d.sum, b = p > 0 ? Math.round(h / p * 10) / 10 : 0, x = p > 0 ? Math.round(h / p * 100) : 0, E = {
1277
+ const n = this.getOptionsForDataFunc(t), d = Lo(l.breakdown ?? {}, n), p = d.count, h = d.sum, b = p > 0 ? Math.round(h / p * 10) / 10 : 0, x = p > 0 ? Math.round(h / p * 100) : 0, E = {
1268
1278
  count: p,
1269
1279
  sum: h,
1270
1280
  avg: b,
1271
1281
  pct: x,
1272
- nps: s === S.nps ? St(d.breakdown) : 0,
1282
+ nps: s === S.nps ? Ct(d.breakdown) : 0,
1273
1283
  breakdown: d.breakdown,
1274
1284
  updated: l.updated_at || (/* @__PURE__ */ new Date()).toISOString()
1275
1285
  };
@@ -1306,7 +1316,7 @@ class qo {
1306
1316
  async loadLocalStats() {
1307
1317
  const t = await this.getLocalStatsKey();
1308
1318
  try {
1309
- const o = Lo(t);
1319
+ const o = No(t);
1310
1320
  m.debug("Loaded localStats from localStorage", o), this.localStats = o, o.submitted && (this.prevLocalStats = { ...o });
1311
1321
  } catch (o) {
1312
1322
  m.warn("Failed to generate localStorage key for localStats", o), this.localStats = L();
@@ -1319,7 +1329,7 @@ class qo {
1319
1329
  async persistLocalStats() {
1320
1330
  try {
1321
1331
  const t = await this.getLocalStatsKey();
1322
- No(t, this.localStats) || m.warn("Failed to save localStats to localStorage");
1332
+ Do(t, this.localStats) || m.warn("Failed to save localStats to localStorage");
1323
1333
  } catch (t) {
1324
1334
  m.warn("Failed to save localStats to localStorage", t);
1325
1335
  }
@@ -1333,7 +1343,7 @@ class qo {
1333
1343
  * @param textValues
1334
1344
  */
1335
1345
  updateStats(t, o) {
1336
- if (this.hasInteracted = !0, this.stats && (this.stats = Do(this.stats, this.localStats)), this.localStats = {
1346
+ if (this.hasInteracted = !0, this.stats && (this.stats = Ro(this.stats, this.localStats)), this.localStats = {
1337
1347
  count: t > 0 || o.length > 0 ? 1 : 0,
1338
1348
  sum: t,
1339
1349
  // e.g. number of stars, nps value
@@ -1347,7 +1357,7 @@ class qo {
1347
1357
  }, o && o.length > 0)
1348
1358
  for (const r of o)
1349
1359
  r && (this.localStats.breakdown[r] = 1);
1350
- this.stats = Ro(this.stats, this.localStats), m.debug("Stats updated - remote: ", this.stats), m.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
1360
+ this.stats = jo(this.stats, this.localStats), m.debug("Stats updated - remote: ", this.stats), m.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
1351
1361
  }
1352
1362
  async markStatsAsSubmitted() {
1353
1363
  this.localStats.submitted = (/* @__PURE__ */ new Date()).toISOString(), this.prevLocalStats = { ...this.localStats }, await this.persistLocalStats(), this.host.requestUpdate();
@@ -1369,7 +1379,7 @@ class qo {
1369
1379
  prevTextValues: d,
1370
1380
  metadata: t.metadata,
1371
1381
  timestamp: o
1372
- }, h = Vo(JSON.stringify(p), o);
1382
+ }, h = Uo(JSON.stringify(p), o);
1373
1383
  try {
1374
1384
  await this.sendStats({ ...p, hash: h }), await this.markStatsAsSubmitted(), this.dispatchSubmitEvent(p);
1375
1385
  } catch (b) {
@@ -1385,7 +1395,7 @@ class qo {
1385
1395
  m.debug("Skip sending stats as data function is in use.");
1386
1396
  return;
1387
1397
  }
1388
- if (!Et(s))
1398
+ if (!At(s))
1389
1399
  throw m.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
1390
1400
  try {
1391
1401
  if (m.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
@@ -1421,9 +1431,9 @@ class qo {
1421
1431
  sum: (o == null ? void 0 : o.sum) || 0,
1422
1432
  avg: s,
1423
1433
  pct: (o == null ? void 0 : o.pct) || 0,
1424
- nps: r.type === S.nps ? St((o == null ? void 0 : o.breakdown) || {}) : 0
1434
+ nps: r.type === S.nps ? Ct((o == null ? void 0 : o.breakdown) || {}) : 0
1425
1435
  };
1426
- return m.debug("Stats data: ", this.stats), Bo(t, i);
1436
+ return m.debug("Stats data: ", this.stats), Vo(t, i);
1427
1437
  }
1428
1438
  /**
1429
1439
  * Checks if a value is selected in the local stats
@@ -1510,7 +1520,7 @@ class qo {
1510
1520
  return ((t = this.localStats) == null ? void 0 : t.submitted) !== void 0 && this.hasLocalStats();
1511
1521
  }
1512
1522
  }
1513
- class Ho {
1523
+ class Fo {
1514
1524
  constructor(t, o) {
1515
1525
  this.isEditing = !0, this.isChartVisible = !1, this.isStatsVisible = !1, this.isThankYouVisible = !1, this.isReactionPopoverVisible = !1, this.initialized = !1, this.handleClickOutside = (r) => {
1516
1526
  r.target !== this.host && (this.toggleThankYouVisibility(!1), this.toggleReactionPopoverVisibility(!1));
@@ -1593,8 +1603,8 @@ class Ho {
1593
1603
  return !(this.host.readonly || !this.isEditing);
1594
1604
  }
1595
1605
  }
1596
- var Zt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Zt || {});
1597
- function Le(e, t = {}) {
1606
+ var Wt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Wt || {});
1607
+ function Ne(e, t = {}) {
1598
1608
  const { type: o = "functional", alt: r, ariaLabel: s, isSelected: i } = t;
1599
1609
  if (!e)
1600
1610
  return { alt: "", ariaHidden: !0 };
@@ -1603,20 +1613,20 @@ function Le(e, t = {}) {
1603
1613
  o === "functional" && !r && !s && console.warn(
1604
1614
  "No alt text or aria-label provided for functional icon. This may cause accessibility issues."
1605
1615
  );
1606
- const a = i ? " (selected)" : "", l = Et(e) && !r ? "" : r || e, n = s || (l ? `${l}${a}` : a);
1616
+ const a = i ? " (selected)" : "", l = At(e) && !r ? "" : r || e, n = s || (l ? `${l}${a}` : a);
1607
1617
  return {
1608
1618
  alt: l,
1609
1619
  ariaLabel: n,
1610
1620
  ariaHidden: !1
1611
1621
  };
1612
1622
  }
1613
- function Fo(e, t = "polite") {
1623
+ function Yo(e, t = "polite") {
1614
1624
  let o = document.getElementById("screen-reader-announcer");
1615
1625
  o ? o.setAttribute("aria-live", t) : (o = document.createElement("div"), o.id = "screen-reader-announcer", o.setAttribute("aria-live", t), o.setAttribute("role", "status"), o.setAttribute("aria-atomic", "true"), o.style.position = "absolute", o.style.width = "1px", o.style.height = "1px", o.style.margin = "-1px", o.style.padding = "0", o.style.overflow = "hidden", o.style.clip = "rect(0, 0, 0, 0)", o.style.whiteSpace = "nowrap", o.style.border = "0", document.body.appendChild(o)), o.textContent = "", setTimeout(() => {
1616
1626
  o.textContent = e;
1617
1627
  }, 50);
1618
1628
  }
1619
- function Yo(e, t) {
1629
+ function Ko(e, t) {
1620
1630
  return `${e}: ${t}`;
1621
1631
  }
1622
1632
  /**
@@ -1624,8 +1634,8 @@ function Yo(e, t) {
1624
1634
  * Copyright 2017 Google LLC
1625
1635
  * SPDX-License-Identifier: BSD-3-Clause
1626
1636
  */
1627
- const Ne = { ATTRIBUTE: 1 }, De = (e) => (...t) => ({ _$litDirective$: e, values: t });
1628
- let Re = class {
1637
+ const De = { ATTRIBUTE: 1 }, Re = (e) => (...t) => ({ _$litDirective$: e, values: t });
1638
+ let je = class {
1629
1639
  constructor(t) {
1630
1640
  }
1631
1641
  get _$AU() {
@@ -1646,10 +1656,10 @@ let Re = class {
1646
1656
  * Copyright 2018 Google LLC
1647
1657
  * SPDX-License-Identifier: BSD-3-Clause
1648
1658
  */
1649
- const y = De(class extends Re {
1659
+ const y = Re(class extends je {
1650
1660
  constructor(e) {
1651
1661
  var t;
1652
- if (super(e), e.type !== Ne.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1662
+ if (super(e), e.type !== De.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1653
1663
  }
1654
1664
  render(e) {
1655
1665
  return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
@@ -1670,10 +1680,10 @@ const y = De(class extends Re {
1670
1680
  return U;
1671
1681
  }
1672
1682
  });
1673
- var Ko = Object.defineProperty, v = (e, t, o, r) => {
1683
+ var Go = Object.defineProperty, v = (e, t, o, r) => {
1674
1684
  for (var s = void 0, i = e.length - 1, a; i >= 0; i--)
1675
1685
  (a = e[i]) && (s = a(t, o, s) || s);
1676
- return s && Ko(t, o, s), s;
1686
+ return s && Go(t, o, s), s;
1677
1687
  };
1678
1688
  const bt = {
1679
1689
  mobile: "480px",
@@ -1681,7 +1691,7 @@ const bt = {
1681
1691
  desktop: "1024px"
1682
1692
  }, Xt = class Xt extends N {
1683
1693
  constructor() {
1684
- super(...arguments), this.dataController = new qo(this), this.displayController = new Ho(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.ariaLabel = null, this.minContrast = Oe.AA_NORMAL, this.options = [], this.project = "public", this.questionPosition = "top", this.statsText = "{count} votes", this.buttonText = "Submit", this.buttonRadius = "sm", this.multiple = !1, this.inline = !1, this.readonly = !1, this.handleEditToggleKeyDown = (t) => {
1694
+ super(...arguments), this.dataController = new Ho(this), this.displayController = new Fo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.ariaLabel = null, this.minContrast = Ie.AA_NORMAL, this.options = [], this.project = "public", this.questionPosition = "top", this.statsText = "{count} votes", this.buttonText = "Submit", this.buttonRadius = "sm", this.multiple = !1, this.inline = !1, this.readonly = !1, this.handleEditToggleKeyDown = (t) => {
1685
1695
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleEnterEditMode());
1686
1696
  };
1687
1697
  }
@@ -1716,7 +1726,7 @@ const bt = {
1716
1726
  const i = J(this.primaryColor);
1717
1727
  o += `--pc-primary-color: ${i} !important;
1718
1728
  `;
1719
- const a = wo(i, {
1729
+ const a = $o(i, {
1720
1730
  minContrast: this.minContrast,
1721
1731
  colorOptions: ["black", "white", "light", "dark"]
1722
1732
  });
@@ -1747,33 +1757,33 @@ const bt = {
1747
1757
  const s = this.starHoverColor || (r ? `color-mix(in srgb, ${J(r)} 80%, white)` : null);
1748
1758
  if (s && (o += `--pc-star-hover-color: ${s} !important;
1749
1759
  `), this.starSize) {
1750
- const i = jt(this.starSize, "1.5em", 1.5);
1760
+ const i = Bt(this.starSize, "1.5em", 1.5);
1751
1761
  o += `--pc-stars-star-size: ${i} !important;
1752
1762
  `;
1753
1763
  }
1754
1764
  if (this.reactionSize) {
1755
- const i = jt(this.reactionSize, "1em", 1);
1765
+ const i = Bt(this.reactionSize, "1em", 1);
1756
1766
  o += `--pc-reaction-size: ${i} !important;
1757
1767
  `;
1758
1768
  }
1759
1769
  if (this.size) {
1760
- const i = jt(this.size);
1770
+ const i = Bt(this.size);
1761
1771
  o += `font-size: ${i} !important;
1762
1772
  `;
1763
1773
  }
1764
1774
  if (this.buttonRadius) {
1765
- const i = So(this.buttonRadius);
1775
+ const i = Co(this.buttonRadius);
1766
1776
  o += `--pc-button-radius: ${i} !important;
1767
1777
  `;
1768
1778
  }
1769
1779
  o += `}
1770
- `, this.css && (o += Po(Ao(this.css))), t.textContent = o;
1780
+ `, this.css && (o += To(Po(this.css))), t.textContent = o;
1771
1781
  }
1772
1782
  /**
1773
1783
  * Update ARIA attributes for accessibility
1774
1784
  */
1775
1785
  updateAriaAttributes() {
1776
- this.ariaLabel && Bt(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Bt(this, "aria-describedby", this.ariaDescribedby), Bt(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1786
+ this.ariaLabel && Vt(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Vt(this, "aria-describedby", this.ariaDescribedby), Vt(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1777
1787
  }
1778
1788
  /**
1779
1789
  * Update host CSS classes based on state
@@ -1798,7 +1808,7 @@ const bt = {
1798
1808
  */
1799
1809
  announceSelectionChange(t, o, r) {
1800
1810
  const s = `Poll for "${t}"`, i = r ? `${o.label} selected` : `${o.label} unselected`;
1801
- Fo(Yo(s, i));
1811
+ Yo(Ko(s, i));
1802
1812
  }
1803
1813
  /** Common render methods */
1804
1814
  renderLabel() {
@@ -1829,7 +1839,7 @@ const bt = {
1829
1839
  tabindex="0"
1830
1840
  aria-label="Edit vote"
1831
1841
  @keydown="${this.handleEditToggleKeyDown}"
1832
- >${Gt}</span
1842
+ >${St}</span
1833
1843
  >
1834
1844
  ` : u;
1835
1845
  }
@@ -1848,7 +1858,7 @@ const bt = {
1848
1858
  tabindex="0"
1849
1859
  aria-label="${this.displayController.isChartVisible ? "Hide chart" : "Show chart"}"
1850
1860
  @keydown="${() => this.displayController.toggleChartVisibility()}"
1851
- >${this.displayController.isChartVisible ? Kt : Yt}</span
1861
+ >${this.displayController.isChartVisible ? Gt : Kt}</span
1852
1862
  >
1853
1863
  ` : u;
1854
1864
  }
@@ -1875,7 +1885,7 @@ const bt = {
1875
1885
  renderThankYouMessage() {
1876
1886
  if (!this.displayController.shouldDisplayThankYouMsg())
1877
1887
  return u;
1878
- const t = Uo(this.thankYouMsg || "");
1888
+ const t = qo(this.thankYouMsg || "");
1879
1889
  return c`
1880
1890
  <div class="pc-thank-you-overlay" data-testid="poll-thank-you-overlay">
1881
1891
  <div class="pc-thank-you" data-testid="thank-you">
@@ -1887,7 +1897,7 @@ const bt = {
1887
1897
  @click="${() => this.displayController.toggleThankYouVisibility(!1)}"
1888
1898
  role="button"
1889
1899
  aria-label="Close"
1890
- >${co}</span
1900
+ >${po}</span
1891
1901
  >
1892
1902
  </div>
1893
1903
  </div>
@@ -2082,7 +2092,7 @@ v([
2082
2092
  v([
2083
2093
  f({ type: Boolean, reflect: !0 })
2084
2094
  ], g.prototype, "readonly");
2085
- const Go = R`
2095
+ const Zo = R`
2086
2096
  /* CSS variables inherit from parent - defaults are specified at usage sites */
2087
2097
 
2088
2098
  .pc-body {
@@ -2533,7 +2543,7 @@ const Go = R`
2533
2543
  animation: none;
2534
2544
  }
2535
2545
  }
2536
- `, At = R`
2546
+ `, Pt = R`
2537
2547
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
2538
2548
  :host {
2539
2549
  --default-primary-color: #2196f3;
@@ -2962,6 +2972,22 @@ const Go = R`
2962
2972
  text-decoration-thickness: 2px;
2963
2973
  }
2964
2974
 
2975
+ /* Selected option indicator for inline mode */
2976
+ .pc-inline-selected {
2977
+ display: inline-flex;
2978
+ align-items: center;
2979
+ font-size: 0.9em;
2980
+ color: var(--pc-primary-color, var(--default-primary-color));
2981
+ opacity: 0.9;
2982
+ }
2983
+
2984
+ .pc-inline-selected .poll-option-icon,
2985
+ .pc-inline-selected .poll-option-icon-img {
2986
+ font-size: 1em;
2987
+ width: 1em;
2988
+ height: 1em;
2989
+ }
2990
+
2965
2991
  /* Vertical layout for top/bottom stats position */
2966
2992
  .pc-inline-trigger-vertical {
2967
2993
  flex-direction: column;
@@ -3023,6 +3049,10 @@ const Go = R`
3023
3049
 
3024
3050
  /* Popover stats text */
3025
3051
  .pc-popover-stats {
3052
+ display: flex;
3053
+ align-items: center;
3054
+ justify-content: center;
3055
+ gap: 0.3em;
3026
3056
  font-size: 0.85em;
3027
3057
  color: var(--pc-text-color, var(--default-text-color));
3028
3058
  opacity: 0.8;
@@ -3035,6 +3065,25 @@ const Go = R`
3035
3065
  display: none;
3036
3066
  }
3037
3067
 
3068
+ /* Edit icon in popover stats */
3069
+ .pc-popover-edit-icon {
3070
+ display: inline-flex;
3071
+ align-items: center;
3072
+ justify-content: center;
3073
+ cursor: pointer;
3074
+ opacity: 0.7;
3075
+ transition: opacity 0.15s ease;
3076
+ }
3077
+
3078
+ .pc-popover-edit-icon:hover {
3079
+ opacity: 1;
3080
+ }
3081
+
3082
+ .pc-popover-edit-icon svg {
3083
+ width: 1.1em;
3084
+ height: 1.1em;
3085
+ }
3086
+
3038
3087
  /* Popover submit button */
3039
3088
  .pc-popover-submit {
3040
3089
  font: inherit;
@@ -3086,6 +3135,11 @@ const Go = R`
3086
3135
  font-size: var(--pc-font-size-medium, var(--default-font-size-medium));
3087
3136
  padding: 0.2em 0;
3088
3137
  }
3138
+
3139
+ /* Popover content should not exceed screen width on mobile */
3140
+ .pc-popover-content {
3141
+ width: 100% !important;
3142
+ }
3089
3143
  }
3090
3144
 
3091
3145
  .pc-thank-you-msg {
@@ -3301,10 +3355,10 @@ const Go = R`
3301
3355
  max-width: 100%;
3302
3356
  }
3303
3357
  `;
3304
- var Zo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, j = (e, t, o, r) => {
3305
- for (var s = r > 1 ? void 0 : r ? Xo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3358
+ var Xo = Object.defineProperty, Jo = Object.getOwnPropertyDescriptor, j = (e, t, o, r) => {
3359
+ for (var s = r > 1 ? void 0 : r ? Jo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3306
3360
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3307
- return r && s && Zo(t, o, s), s;
3361
+ return r && s && Xo(t, o, s), s;
3308
3362
  };
3309
3363
  let _ = class extends N {
3310
3364
  constructor() {
@@ -3423,7 +3477,7 @@ j([
3423
3477
  _ = j([
3424
3478
  H("pc-popover")
3425
3479
  ], _);
3426
- const Jo = R`
3480
+ const Qo = R`
3427
3481
  :host {
3428
3482
  --sheet-bg: light-dark(#ffffff, #1a1a1a);
3429
3483
  --sheet-border: light-dark(#e0e0e0, #333333);
@@ -3536,10 +3590,10 @@ const Jo = R`
3536
3590
  max-width: 100%;
3537
3591
  }
3538
3592
  `;
3539
- var Qo = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, X = (e, t, o, r) => {
3540
- for (var s = r > 1 ? void 0 : r ? tr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3593
+ var tr = Object.defineProperty, er = Object.getOwnPropertyDescriptor, X = (e, t, o, r) => {
3594
+ for (var s = r > 1 ? void 0 : r ? er(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3541
3595
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3542
- return r && s && Qo(t, o, s), s;
3596
+ return r && s && tr(t, o, s), s;
3543
3597
  };
3544
3598
  let D = class extends N {
3545
3599
  constructor() {
@@ -3635,7 +3689,7 @@ let D = class extends N {
3635
3689
  `;
3636
3690
  }
3637
3691
  };
3638
- D.styles = [Jo];
3692
+ D.styles = [Qo];
3639
3693
  X([
3640
3694
  f({ type: Boolean, reflect: !0 })
3641
3695
  ], D.prototype, "open", 2);
@@ -3657,13 +3711,13 @@ X([
3657
3711
  D = X([
3658
3712
  H("pc-bottom-sheet")
3659
3713
  ], D);
3660
- var er = Object.defineProperty, or = Object.getOwnPropertyDescriptor, ft = (e, t, o, r) => {
3661
- for (var s = r > 1 ? void 0 : r ? or(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3714
+ var or = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, ft = (e, t, o, r) => {
3715
+ for (var s = r > 1 ? void 0 : r ? rr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3662
3716
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3663
- return r && s && er(t, o, s), s;
3717
+ return r && s && or(t, o, s), s;
3664
3718
  };
3665
- const rr = 768;
3666
- let W = class extends N {
3719
+ const sr = 768;
3720
+ let Z = class extends N {
3667
3721
  constructor() {
3668
3722
  super(...arguments), this.open = !1, this.position = "auto", this.isMobile = !1, this.handleMediaChange = (e) => {
3669
3723
  this.isMobile = e.matches;
@@ -3679,7 +3733,7 @@ let W = class extends N {
3679
3733
  super.disconnectedCallback(), (e = this.mediaQuery) == null || e.removeEventListener("change", this.handleMediaChange);
3680
3734
  }
3681
3735
  setupMediaQuery() {
3682
- this.mediaQuery = window.matchMedia(`(max-width: ${rr - 1}px)`), this.isMobile = this.mediaQuery.matches, this.mediaQuery.addEventListener("change", this.handleMediaChange);
3736
+ this.mediaQuery = window.matchMedia(`(max-width: ${sr - 1}px)`), this.isMobile = this.mediaQuery.matches, this.mediaQuery.addEventListener("change", this.handleMediaChange);
3683
3737
  }
3684
3738
  render() {
3685
3739
  return this.isMobile ? c`
@@ -3698,30 +3752,30 @@ let W = class extends N {
3698
3752
  `;
3699
3753
  }
3700
3754
  };
3701
- W.styles = R`
3755
+ Z.styles = R`
3702
3756
  :host {
3703
3757
  display: contents;
3704
3758
  }
3705
3759
  `;
3706
3760
  ft([
3707
3761
  f({ type: Boolean, reflect: !0 })
3708
- ], W.prototype, "open", 2);
3762
+ ], Z.prototype, "open", 2);
3709
3763
  ft([
3710
3764
  f({ type: String })
3711
- ], W.prototype, "position", 2);
3765
+ ], Z.prototype, "position", 2);
3712
3766
  ft([
3713
3767
  f({ attribute: !1 })
3714
- ], W.prototype, "anchor", 2);
3768
+ ], Z.prototype, "anchor", 2);
3715
3769
  ft([
3716
3770
  k()
3717
- ], W.prototype, "isMobile", 2);
3718
- W = ft([
3771
+ ], Z.prototype, "isMobile", 2);
3772
+ Z = ft([
3719
3773
  H("pc-responsive-modal")
3720
- ], W);
3721
- var sr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
3722
- for (var s = r > 1 ? void 0 : r ? ir(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3774
+ ], Z);
3775
+ var ir = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
3776
+ for (var s = r > 1 ? void 0 : r ? ar(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3723
3777
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3724
- return r && s && sr(t, o, s), s;
3778
+ return r && s && ir(t, o, s), s;
3725
3779
  };
3726
3780
  let I = class extends g {
3727
3781
  constructor() {
@@ -3743,7 +3797,7 @@ let I = class extends g {
3743
3797
  const i = this.dataController.isValueSelected(String(s)), a = {
3744
3798
  "nps-button": !0,
3745
3799
  selected: i
3746
- }, l = Co(`Rate ${s}`, i, !1);
3800
+ }, l = ko(`Rate ${s}`, i, !1);
3747
3801
  return c`
3748
3802
  <button
3749
3803
  data-testid="nps-button-${s}"
@@ -3790,7 +3844,7 @@ let I = class extends g {
3790
3844
  const e = this.dataController.stats, t = (e == null ? void 0 : e.nps) ?? 0, o = 100, r = 100, s = 80, i = (w) => ({
3791
3845
  x: o + s * Math.cos(w),
3792
3846
  y: r - s * Math.sin(w)
3793
- }), a = i(Math.PI), l = i(Math.PI / 2), n = i(Math.PI / 4), d = i(0), p = (w, mt, Be = 0) => `M ${w.x} ${w.y} A ${s} ${s} 0 ${Be} 1 ${mt.x} ${mt.y}`, h = p(a, l), b = p(l, n), x = p(n, d), C = ((w) => Math.PI - (w + 100) / 200 * Math.PI)(t), P = i(C);
3847
+ }), a = i(Math.PI), l = i(Math.PI / 2), n = i(Math.PI / 4), d = i(0), p = (w, mt, Ve = 0) => `M ${w.x} ${w.y} A ${s} ${s} 0 ${Ve} 1 ${mt.x} ${mt.y}`, h = p(a, l), b = p(l, n), x = p(n, d), C = ((w) => Math.PI - (w + 100) / 200 * Math.PI)(t), P = i(C);
3794
3848
  return c`
3795
3849
  <div class="nps-semicircle-gauge" data-testid="nps-semicircle-gauge">
3796
3850
  <svg viewBox="0 0 200 115">
@@ -3866,7 +3920,7 @@ let I = class extends g {
3866
3920
  * Uses SVG with 3 colored segments for detractors/passives/promoters
3867
3921
  */
3868
3922
  renderInlineGauge() {
3869
- const e = this.dataController.stats, t = (e == null ? void 0 : e.breakdown) || {}, o = 8, r = 2 * Math.PI * o, s = Io(t), i = s.detractors + s.passives + s.promoters;
3923
+ const e = this.dataController.stats, t = (e == null ? void 0 : e.breakdown) || {}, o = 8, r = 2 * Math.PI * o, s = zo(t), i = s.detractors + s.passives + s.promoters;
3870
3924
  if (i === 0)
3871
3925
  return c`
3872
3926
  <div class="inline-nps-gauge">
@@ -3918,9 +3972,10 @@ let I = class extends g {
3918
3972
  /**
3919
3973
  * Render the inline trigger button
3920
3974
  * Respects show-stats attribute for controlling stats text visibility
3975
+ * Shows add icon when no selection, edit icon when user has submitted
3921
3976
  */
3922
3977
  renderInlineTrigger() {
3923
- const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "";
3978
+ const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Pe;
3924
3979
  return c`
3925
3980
  <button
3926
3981
  class="pc-inline-trigger"
@@ -3933,7 +3988,7 @@ let I = class extends g {
3933
3988
  >
3934
3989
  ${this.renderInlineGauge()}
3935
3990
  ${t ? c`<span class="pc-inline-stats-text">${t}</span>` : u}
3936
- <span class="inline-nps-icon">${Gt}</span>
3991
+ <span class="inline-nps-icon">${r}</span>
3937
3992
  </button>
3938
3993
  `;
3939
3994
  }
@@ -3986,7 +4041,7 @@ let I = class extends g {
3986
4041
  @keydown="${(e) => {
3987
4042
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.displayController.toggleChartVisibility());
3988
4043
  }}"
3989
- >${this.displayController.isChartVisible ? Kt : Yt}</span
4044
+ >${this.displayController.isChartVisible ? Gt : Kt}</span
3990
4045
  >
3991
4046
  `;
3992
4047
  }
@@ -4070,7 +4125,7 @@ let I = class extends g {
4070
4125
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
4071
4126
  }
4072
4127
  };
4073
- I.styles = [...g.styles, At, Go];
4128
+ I.styles = [...g.styles, Pt, Zo];
4074
4129
  F([
4075
4130
  f({ type: String, attribute: "min-label" })
4076
4131
  ], I.prototype, "minLabel", 2);
@@ -4095,7 +4150,7 @@ F([
4095
4150
  I = F([
4096
4151
  H("pc-nps")
4097
4152
  ], I);
4098
- const ar = R`
4153
+ const nr = R`
4099
4154
  /* CSS variables inherit from parent - defaults are specified at usage sites */
4100
4155
 
4101
4156
  .pc-container {
@@ -4402,8 +4457,7 @@ const ar = R`
4402
4457
  /* Poll popover sizing */
4403
4458
  .pc-popover-content {
4404
4459
  padding: 0.5rem;
4405
- min-width: 250px;
4406
- max-width: 350px;
4460
+ min-width: 280px;
4407
4461
  }
4408
4462
 
4409
4463
  /* Poll-specific: center the stats text */
@@ -4481,12 +4535,12 @@ const ar = R`
4481
4535
  opacity: 0.8;
4482
4536
  }
4483
4537
  `;
4484
- var nr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, gt = (e, t, o, r) => {
4485
- for (var s = r > 1 ? void 0 : r ? lr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
4538
+ var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, gt = (e, t, o, r) => {
4539
+ for (var s = r > 1 ? void 0 : r ? cr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
4486
4540
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
4487
- return r && s && nr(t, o, s), s;
4541
+ return r && s && lr(t, o, s), s;
4488
4542
  };
4489
- let Z = class extends g {
4543
+ let W = class extends g {
4490
4544
  constructor() {
4491
4545
  super(), this.type = S.poll, this.multiple = !1, this.compact = !1, this.popoverOpen = !1, this.hasEditButton = !0, this.statsText = "{count} votes", this.questionPosition = "top", this.statsPosition = "bottom", this.showStats = "after-vote";
4492
4546
  }
@@ -4544,16 +4598,16 @@ let Z = class extends g {
4544
4598
  */
4545
4599
  renderOptionIcon(e) {
4546
4600
  if (!(e != null && e.icon)) return "";
4547
- const t = Zt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = Le(e == null ? void 0 : e.icon, {
4601
+ const t = Wt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = Ne(e == null ? void 0 : e.icon, {
4548
4602
  type: t,
4549
4603
  alt: o,
4550
4604
  isSelected: r
4551
4605
  });
4552
- return Me(e == null ? void 0 : e.icon) ? c`<span
4606
+ return Le(e == null ? void 0 : e.icon) ? c`<span
4553
4607
  class="poll-option-icon"
4554
4608
  aria-hidden="${s.ariaHidden ? "true" : "false"}"
4555
4609
  >${e == null ? void 0 : e.icon}</span
4556
- >` : Et(e == null ? void 0 : e.icon) ? c`<img
4610
+ >` : At(e == null ? void 0 : e.icon) ? c`<img
4557
4611
  src="${e == null ? void 0 : e.icon}"
4558
4612
  alt="${s.alt}"
4559
4613
  class="poll-option-icon-img"
@@ -4581,7 +4635,7 @@ let Z = class extends g {
4581
4635
  selected: o,
4582
4636
  "poll-option--compact": this.compact,
4583
4637
  "poll-option--disabled": r
4584
- }, i = t + 1, a = `poll-${this.type}-${i}`, l = ko(
4638
+ }, i = t + 1, a = `poll-${this.type}-${i}`, l = Eo(
4585
4639
  e.label,
4586
4640
  o,
4587
4641
  r,
@@ -4736,9 +4790,10 @@ let Z = class extends g {
4736
4790
  /**
4737
4791
  * Render the inline trigger button
4738
4792
  * Respects show-stats attribute for controlling stats text visibility
4793
+ * Shows add icon when no selection, edit icon when user has submitted
4739
4794
  */
4740
4795
  renderInlineTrigger() {
4741
- const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "";
4796
+ const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Pe;
4742
4797
  return c`
4743
4798
  <button
4744
4799
  class="pc-inline-trigger"
@@ -4752,7 +4807,7 @@ let Z = class extends g {
4752
4807
  >
4753
4808
  ${this.question ? c`<span class="inline-poll-question">${this.question}</span>` : u}
4754
4809
  ${t ? c`<span class="pc-inline-stats-text">${t}</span>` : u}
4755
- <span class="inline-poll-icon">${Gt}</span>
4810
+ <span class="inline-poll-icon">${r}</span>
4756
4811
  </button>
4757
4812
  `;
4758
4813
  }
@@ -4776,18 +4831,39 @@ let Z = class extends g {
4776
4831
  </button>
4777
4832
  `;
4778
4833
  }
4834
+ /**
4835
+ * Handle edit button click in popover to switch back to edit mode
4836
+ */
4837
+ handlePopoverEditClick() {
4838
+ this.displayController.toggleEditMode(!0), this.displayController.toggleChartVisibility(!1);
4839
+ }
4779
4840
  /**
4780
4841
  * Render popover content
4781
4842
  * Shows poll options for voting, or chart after submission
4843
+ * Respects show-stats attribute for controlling stats text visibility
4782
4844
  */
4783
4845
  renderPopoverContent() {
4784
- const e = this.displayController.shouldShowChart(), o = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "";
4846
+ const e = this.displayController.shouldShowChart(), o = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = e && !this.readonly;
4785
4847
  return c`
4786
4848
  <div class="pc-popover-content" data-testid="poll-popover-content">
4787
4849
  ${this.question ? c`<div class="pc-popover-question">${this.question}</div>` : u}
4788
4850
  ${e ? this.renderBarChart() : this.renderPollOptions()}
4789
4851
  ${e ? u : this.renderPopoverSubmitButton()}
4790
- ${o ? c`<div class="pc-popover-stats">${o}</div>` : u}
4852
+ ${o || r ? c`<div class="pc-popover-stats">
4853
+ ${o ? c`<span>${o}</span>` : u}
4854
+ ${r ? c`<span
4855
+ class="pc-popover-edit-icon"
4856
+ @click=${this.handlePopoverEditClick}
4857
+ role="button"
4858
+ tabindex="0"
4859
+ aria-label="Edit vote"
4860
+ data-testid="popover-edit-icon"
4861
+ @keydown=${(s) => {
4862
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), this.handlePopoverEditClick());
4863
+ }}
4864
+ >${St}</span
4865
+ >` : u}
4866
+ </div>` : u}
4791
4867
  </div>
4792
4868
  `;
4793
4869
  }
@@ -4871,23 +4947,23 @@ let Z = class extends g {
4871
4947
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
4872
4948
  }
4873
4949
  };
4874
- Z.styles = [...g.styles, At, ar];
4950
+ W.styles = [...g.styles, Pt, nr];
4875
4951
  gt([
4876
4952
  f({ type: Boolean })
4877
- ], Z.prototype, "multiple", 2);
4953
+ ], W.prototype, "multiple", 2);
4878
4954
  gt([
4879
4955
  f({ type: Boolean })
4880
- ], Z.prototype, "compact", 2);
4956
+ ], W.prototype, "compact", 2);
4881
4957
  gt([
4882
4958
  k()
4883
- ], Z.prototype, "popoverOpen", 2);
4959
+ ], W.prototype, "popoverOpen", 2);
4884
4960
  gt([
4885
4961
  ht(".pc-inline-trigger")
4886
- ], Z.prototype, "triggerElement", 2);
4887
- Z = gt([
4962
+ ], W.prototype, "triggerElement", 2);
4963
+ W = gt([
4888
4964
  H("pc-poll")
4889
- ], Z);
4890
- const cr = R`
4965
+ ], W);
4966
+ const dr = R`
4891
4967
  /* CSS variables inherit from parent - defaults are specified at usage sites */
4892
4968
 
4893
4969
  .pc-section {
@@ -5074,10 +5150,10 @@ const cr = R`
5074
5150
  * Copyright 2018 Google LLC
5075
5151
  * SPDX-License-Identifier: BSD-3-Clause
5076
5152
  */
5077
- const je = "important", dr = " !" + je, pr = De(class extends Re {
5153
+ const Be = "important", pr = " !" + Be, ur = Re(class extends je {
5078
5154
  constructor(e) {
5079
5155
  var t;
5080
- if (super(e), e.type !== Ne.ATTRIBUTE || e.name !== "style" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
5156
+ if (super(e), e.type !== De.ATTRIBUTE || e.name !== "style" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
5081
5157
  }
5082
5158
  render(e) {
5083
5159
  return Object.keys(e).reduce((t, o) => {
@@ -5093,8 +5169,8 @@ const je = "important", dr = " !" + je, pr = De(class extends Re {
5093
5169
  const s = t[r];
5094
5170
  if (s != null) {
5095
5171
  this.ft.add(r);
5096
- const i = typeof s == "string" && s.endsWith(dr);
5097
- r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? je : "") : o[r] = s;
5172
+ const i = typeof s == "string" && s.endsWith(pr);
5173
+ r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Be : "") : o[r] = s;
5098
5174
  }
5099
5175
  }
5100
5176
  return U;
@@ -5272,17 +5348,17 @@ const xe = {
5272
5348
  hiking: "🥾",
5273
5349
  yoga: "🧘"
5274
5350
  };
5275
- function Ct(e) {
5351
+ function kt(e) {
5276
5352
  let t = "❓", o = !1;
5277
- return e ? e in xe ? t = xe[e] : Me(e) ? t = e : Et(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") && !e.includes("/") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
5353
+ return e ? e in xe ? t = xe[e] : Le(e) ? t = e : At(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") && !e.includes("/") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
5278
5354
  icon: t,
5279
5355
  isRemoteImage: o
5280
5356
  };
5281
5357
  }
5282
- var ur = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, st = (e, t, o, r) => {
5283
- for (var s = r > 1 ? void 0 : r ? hr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5358
+ var hr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, st = (e, t, o, r) => {
5359
+ for (var s = r > 1 ? void 0 : r ? fr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5284
5360
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
5285
- return r && s && ur(t, o, s), s;
5361
+ return r && s && hr(t, o, s), s;
5286
5362
  };
5287
5363
  let q = class extends g {
5288
5364
  constructor() {
@@ -5307,14 +5383,14 @@ let q = class extends g {
5307
5383
  * Renders the star icon using resolveIcon for emoji, URL, or MDI support
5308
5384
  */
5309
5385
  renderStarIcon() {
5310
- const { icon: e, isRemoteImage: t } = Ct(this.icon);
5386
+ const { icon: e, isRemoteImage: t } = kt(this.icon);
5311
5387
  return t ? c`<img class="star-icon-img" src="${e}" alt="star" />` : e;
5312
5388
  }
5313
5389
  /**
5314
5390
  * Gets the resolved icon string (for use in chart labels)
5315
5391
  */
5316
5392
  getResolvedIconString() {
5317
- const { icon: e, isRemoteImage: t } = Ct(this.icon);
5393
+ const { icon: e, isRemoteImage: t } = kt(this.icon);
5318
5394
  return t ? "★" : e;
5319
5395
  }
5320
5396
  /**
@@ -5336,7 +5412,7 @@ let q = class extends g {
5336
5412
  <span
5337
5413
  data-testid="${e ? "popover" : "stars-view"}-star-${d}"
5338
5414
  class=${y(x)}
5339
- style=${pr(E)}
5415
+ style=${ur(E)}
5340
5416
  role="${a ? "button" : "presentation"}"
5341
5417
  tabindex="${a ? "0" : ""}"
5342
5418
  aria-label="${a ? `Rate ${d} star${d > 1 ? "s" : ""}` : ""}"
@@ -5505,7 +5581,7 @@ let q = class extends g {
5505
5581
  @keydown="${(e) => {
5506
5582
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.displayController.toggleChartVisibility());
5507
5583
  }}"
5508
- >${this.displayController.isChartVisible ? Kt : Yt}</span
5584
+ >${this.displayController.isChartVisible ? Gt : Kt}</span
5509
5585
  >
5510
5586
  `;
5511
5587
  }
@@ -5586,7 +5662,7 @@ let q = class extends g {
5586
5662
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
5587
5663
  }
5588
5664
  };
5589
- q.styles = [...g.styles, At, cr];
5665
+ q.styles = [...g.styles, Pt, dr];
5590
5666
  st([
5591
5667
  f({ type: String })
5592
5668
  ], q.prototype, "icon", 2);
@@ -5605,7 +5681,7 @@ st([
5605
5681
  q = st([
5606
5682
  H("pc-stars")
5607
5683
  ], q);
5608
- const fr = R`
5684
+ const gr = R`
5609
5685
  /* Adjust stats text for reactions */
5610
5686
  .pc-stats-text {
5611
5687
  font-size: var(--pc-font-size-small, var(--default-font-size-small));
@@ -5868,11 +5944,11 @@ const fr = R`
5868
5944
  animation: none;
5869
5945
  }
5870
5946
  }
5871
- `, gr = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23434343'%3e%3cpath%20d='M480-480Zm0%20400q-83%200-156-31.5T197-197q-54-54-85.5-127T80-480q0-83%2031.5-156T197-763q54-54%20127-85.5T480-880q43%200%2083%208.5t77%2024.5v90q-35-20-75.5-31.5T480-800q-133%200-226.5%2093.5T160-480q0%20133%2093.5%20226.5T480-160q133%200%20226.5-93.5T800-480q0-32-6.5-62T776-600h86q9%2029%2013.5%2058.5T880-480q0%2083-31.5%20156T763-197q-54%2054-127%2085.5T480-80Zm320-600v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM620-520q25%200%2042.5-17.5T680-580q0-25-17.5-42.5T620-640q-25%200-42.5%2017.5T560-580q0%2025%2017.5%2042.5T620-520Zm-280%200q25%200%2042.5-17.5T400-580q0-25-17.5-42.5T340-640q-25%200-42.5%2017.5T280-580q0%2025%2017.5%2042.5T340-520Zm140%20260q68%200%20123.5-38.5T684-400H276q25%2063%2080.5%20101.5T480-260Z'/%3e%3c/svg%3e";
5872
- var mr = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, Pt = (e, t, o, r) => {
5873
- for (var s = r > 1 ? void 0 : r ? vr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5947
+ `, mr = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23434343'%3e%3cpath%20d='M480-480Zm0%20400q-83%200-156-31.5T197-197q-54-54-85.5-127T80-480q0-83%2031.5-156T197-763q54-54%20127-85.5T480-880q43%200%2083%208.5t77%2024.5v90q-35-20-75.5-31.5T480-800q-133%200-226.5%2093.5T160-480q0%20133%2093.5%20226.5T480-160q133%200%20226.5-93.5T800-480q0-32-6.5-62T776-600h86q9%2029%2013.5%2058.5T880-480q0%2083-31.5%20156T763-197q-54%2054-127%2085.5T480-80Zm320-600v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM620-520q25%200%2042.5-17.5T680-580q0-25-17.5-42.5T620-640q-25%200-42.5%2017.5T560-580q0%2025%2017.5%2042.5T620-520Zm-280%200q25%200%2042.5-17.5T400-580q0-25-17.5-42.5T340-640q-25%200-42.5%2017.5T280-580q0%2025%2017.5%2042.5T340-520Zm140%20260q68%200%20123.5-38.5T684-400H276q25%2063%2080.5%20101.5T480-260Z'/%3e%3c/svg%3e";
5948
+ var vr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, Tt = (e, t, o, r) => {
5949
+ for (var s = r > 1 ? void 0 : r ? br(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5874
5950
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
5875
- return r && s && mr(t, o, s), s;
5951
+ return r && s && vr(t, o, s), s;
5876
5952
  };
5877
5953
  let ot = class extends g {
5878
5954
  constructor() {
@@ -5898,7 +5974,7 @@ let ot = class extends g {
5898
5974
  * Renders the icon for a reaction
5899
5975
  */
5900
5976
  renderReactionIcon(e, t) {
5901
- const { icon: o, isRemoteImage: r } = Ct(e), s = Zt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = Le(o, {
5977
+ const { icon: o, isRemoteImage: r } = kt(e), s = Wt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = Ne(o, {
5902
5978
  type: s,
5903
5979
  alt: i,
5904
5980
  ariaLabel: i,
@@ -5952,7 +6028,7 @@ let ot = class extends g {
5952
6028
  aria-expanded="${this.displayController.shouldShowReactionPopover()}"
5953
6029
  aria-haspopup="true"
5954
6030
  >
5955
- <img src="${gr}" alt="" class="trigger-icon" />
6031
+ <img src="${mr}" alt="" class="trigger-icon" />
5956
6032
  </button>
5957
6033
  `;
5958
6034
  }
@@ -6114,31 +6190,31 @@ let ot = class extends g {
6114
6190
  return this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
6115
6191
  }
6116
6192
  };
6117
- ot.styles = [...g.styles, At, fr];
6118
- Pt([
6193
+ ot.styles = [...g.styles, Pt, gr];
6194
+ Tt([
6119
6195
  f({ type: Boolean, attribute: "show-counts" })
6120
6196
  ], ot.prototype, "showCounts", 2);
6121
- Pt([
6197
+ Tt([
6122
6198
  f({ type: Boolean, reflect: !0 })
6123
6199
  ], ot.prototype, "compact", 2);
6124
- Pt([
6200
+ Tt([
6125
6201
  f({ type: String, attribute: "popup-position" })
6126
6202
  ], ot.prototype, "popupPosition", 2);
6127
- ot = Pt([
6203
+ ot = Tt([
6128
6204
  H("pc-reaction")
6129
6205
  ], ot);
6130
6206
  function at(e, t, o = void 0) {
6131
6207
  const r = e.getAttribute(t);
6132
6208
  return r === null ? o : r == null ? void 0 : r.trim();
6133
6209
  }
6134
- function br(e, t = void 0) {
6210
+ function yr(e, t = void 0) {
6135
6211
  const o = e.textContent;
6136
6212
  return o === "" || o === null ? t : o == null ? void 0 : o.trim();
6137
6213
  }
6138
- var yr = Object.defineProperty, xr = Object.getOwnPropertyDescriptor, Tt = (e, t, o, r) => {
6139
- for (var s = r > 1 ? void 0 : r ? xr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6214
+ var xr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, _t = (e, t, o, r) => {
6215
+ for (var s = r > 1 ? void 0 : r ? wr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6140
6216
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
6141
- return r && s && yr(t, o, s), s;
6217
+ return r && s && xr(t, o, s), s;
6142
6218
  };
6143
6219
  let rt = class extends N {
6144
6220
  constructor() {
@@ -6201,16 +6277,16 @@ let rt = class extends N {
6201
6277
  const e = this.querySelector("pc-poll, pc-reaction");
6202
6278
  if (!e) return;
6203
6279
  const t = this.querySelectorAll("poll-catch-option");
6204
- let r = jo(this.options).map((s) => ({
6280
+ let r = Bo(this.options).map((s) => ({
6205
6281
  value: s,
6206
6282
  label: s,
6207
6283
  icon: e.tagName === "PC-REACTION" ? s : void 0
6208
6284
  // REACTION widget uses options for the icon
6209
6285
  }));
6210
6286
  t && t.length > 0 && (r = Array.from(t).map((s) => {
6211
- const i = at(s, "value", "") || "", a = at(s, "label", br(s, i)) || "", l = at(s, "icon", void 0), n = at(s, "tooltip", void 0), d = at(s, "disabled", void 0), p = { value: i, label: a };
6287
+ const i = at(s, "value", "") || "", a = at(s, "label", yr(s, i)) || "", l = at(s, "icon", void 0), n = at(s, "tooltip", void 0), d = at(s, "disabled", void 0), p = { value: i, label: a };
6212
6288
  if (l !== void 0) {
6213
- const h = Ct(l);
6289
+ const h = kt(l);
6214
6290
  p.icon = h.icon;
6215
6291
  }
6216
6292
  return n !== void 0 && (p.tooltip = n), d !== void 0 && (p.disabled = !0), p;
@@ -6236,16 +6312,16 @@ let rt = class extends N {
6236
6312
  }
6237
6313
  }
6238
6314
  };
6239
- Tt([
6315
+ _t([
6240
6316
  f({ type: String })
6241
6317
  ], rt.prototype, "type", 2);
6242
- Tt([
6318
+ _t([
6243
6319
  f({ type: String })
6244
6320
  ], rt.prototype, "options", 2);
6245
- Tt([
6321
+ _t([
6246
6322
  k()
6247
6323
  ], rt.prototype, "parsedOptions", 2);
6248
- rt = Tt([
6324
+ rt = _t([
6249
6325
  H("poll-catch")
6250
6326
  ], rt);
6251
6327
  export {