pollcatch 2.1.12 → 2.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pc.js +273 -264
package/pc.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
6
|
const it = globalThis, At = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Lt = /* @__PURE__ */ new WeakMap();
|
|
7
|
-
let
|
|
7
|
+
let ne = class {
|
|
8
8
|
constructor(t, o, r) {
|
|
9
9
|
if (this._$cssResult$ = !0, r !== _t) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = t, this.t = o;
|
|
@@ -22,14 +22,14 @@ let ae = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const Ae = (e) => new ne(typeof e == "string" ? e : e + "", void 0, _t), F = (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
|
|
32
|
-
},
|
|
31
|
+
return new ne(o, e, _t);
|
|
32
|
+
}, _e = (e, t) => {
|
|
33
33
|
if (At) 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 = it.litNonce;
|
|
@@ -38,17 +38,17 @@ const ke = (e) => new ae(typeof e == "string" ? e : e + "", void 0, _t), F = (e,
|
|
|
38
38
|
}, Rt = At ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let o = "";
|
|
40
40
|
for (const r of t.cssRules) o += r.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Ae(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:
|
|
48
|
+
const { is: Ee, defineProperty: Pe, getOwnPropertyDescriptor: Oe, getOwnPropertyNames: Te, getOwnPropertySymbols: ze, getPrototypeOf: Ie } = Object, T = globalThis, Ut = T.trustedTypes, Ne = Ut ? Ut.emptyScript : "", mt = T.reactiveElementPolyfillSupport, K = (e, t) => e, at = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
e = e ?
|
|
51
|
+
e = e ? Ne : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,7 +73,7 @@ const { is: _e, defineProperty: Ee, getOwnPropertyDescriptor: Pe, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return o;
|
|
76
|
-
} }, Et = (e, t) => !
|
|
76
|
+
} }, Et = (e, t) => !Ee(e, t), jt = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Et };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), T.litPropertyMetadata ?? (T.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let U = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
@@ -85,11 +85,11 @@ let U = class extends HTMLElement {
|
|
|
85
85
|
static createProperty(t, o = jt) {
|
|
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 &&
|
|
88
|
+
s !== void 0 && Pe(this.prototype, t, s);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, o, r) {
|
|
92
|
-
const { get: s, set: i } =
|
|
92
|
+
const { get: s, set: i } = Oe(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[o];
|
|
94
94
|
}, set(a) {
|
|
95
95
|
this[o] = a;
|
|
@@ -106,13 +106,13 @@ let U = class extends HTMLElement {
|
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
108
|
if (this.hasOwnProperty(K("elementProperties"))) return;
|
|
109
|
-
const t =
|
|
109
|
+
const t = Ie(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(K("finalized"))) return;
|
|
114
114
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(K("properties"))) {
|
|
115
|
-
const o = this.properties, r = [...
|
|
115
|
+
const o = this.properties, r = [...Te(o), ...ze(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 U = class extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return _e(t, this.constructor.elementStyles), t;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var t;
|
|
@@ -279,53 +279,53 @@ U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[K("elementProper
|
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const W = globalThis, nt = W.trustedTypes, Bt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0,
|
|
282
|
+
const W = globalThis, nt = W.trustedTypes, Bt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, le = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, ce = "?" + P, Me = `<${ce}>`, L = document, X = () => L.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function", Pt = Array.isArray, Le = (e) => Pt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", bt = `[
|
|
283
283
|
\f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Vt = />/g, N = RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), qt = /'/g, Ht = /"/g,
|
|
285
|
-
function
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), qt = /'/g, Ht = /"/g, de = /^(?:script|style|textarea|title)$/i, Re = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), d = Re(1), z = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), M = L.createTreeWalker(L, 129);
|
|
285
|
+
function pe(e, t) {
|
|
286
286
|
if (!Pt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
287
|
return Bt !== void 0 ? Bt.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const Ue = (e, t) => {
|
|
290
290
|
const o = e.length - 1, r = [];
|
|
291
291
|
let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = Z;
|
|
292
292
|
for (let n = 0; n < o; n++) {
|
|
293
293
|
const l = e[n];
|
|
294
|
-
let
|
|
295
|
-
for (; w < l.length && (a.lastIndex = w, c = a.exec(l), c !== null); ) w = a.lastIndex, a === Z ? c[1] === "!--" ? a = Dt : c[1] !== void 0 ? a = Vt : c[2] !== void 0 ? (
|
|
294
|
+
let p, c, u = -1, w = 0;
|
|
295
|
+
for (; w < l.length && (a.lastIndex = w, c = a.exec(l), c !== null); ) w = a.lastIndex, a === Z ? c[1] === "!--" ? a = Dt : c[1] !== void 0 ? a = Vt : c[2] !== void 0 ? (de.test(c[2]) && (s = RegExp("</" + c[2], "g")), a = N) : c[3] !== void 0 && (a = N) : a === N ? c[0] === ">" ? (a = s ?? Z, u = -1) : c[1] === void 0 ? u = -2 : (u = a.lastIndex - c[2].length, p = c[1], a = c[3] === void 0 ? N : c[3] === '"' ? Ht : qt) : a === Ht || a === qt ? a = N : a === Dt || a === Vt ? a = Z : (a = N, s = void 0);
|
|
296
296
|
const v = a === N && e[n + 1].startsWith("/>") ? " " : "";
|
|
297
|
-
i += a === Z ? l +
|
|
297
|
+
i += a === Z ? l + Me : u >= 0 ? (r.push(p), l.slice(0, u) + le + l.slice(u) + P + v) : l + P + (u === -2 ? n : v);
|
|
298
298
|
}
|
|
299
|
-
return [
|
|
299
|
+
return [pe(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
300
300
|
};
|
|
301
|
-
let kt = class
|
|
301
|
+
let kt = class ue {
|
|
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 n = t.length - 1, l = this.parts, [
|
|
307
|
-
if (this.el =
|
|
308
|
-
const
|
|
309
|
-
|
|
306
|
+
const n = t.length - 1, l = this.parts, [p, c] = Ue(t, o);
|
|
307
|
+
if (this.el = ue.createElement(p, r), M.currentNode = this.el.content, o === 2 || o === 3) {
|
|
308
|
+
const u = this.el.content.firstChild;
|
|
309
|
+
u.replaceWith(...u.childNodes);
|
|
310
310
|
}
|
|
311
311
|
for (; (s = M.nextNode()) !== null && l.length < n; ) {
|
|
312
312
|
if (s.nodeType === 1) {
|
|
313
|
-
if (s.hasAttributes()) for (const
|
|
314
|
-
const w = c[a++], v = s.getAttribute(
|
|
315
|
-
l.push({ type: 1, index: i, name: E[2], strings: v, ctor: E[1] === "." ?
|
|
316
|
-
} else
|
|
317
|
-
if (
|
|
318
|
-
const
|
|
313
|
+
if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(le)) {
|
|
314
|
+
const w = c[a++], v = s.getAttribute(u).split(P), E = /([.?@])?(.*)/.exec(w);
|
|
315
|
+
l.push({ type: 1, index: i, name: E[2], strings: v, ctor: E[1] === "." ? Be : E[1] === "?" ? De : E[1] === "@" ? Ve : ct }), s.removeAttribute(u);
|
|
316
|
+
} else u.startsWith(P) && (l.push({ type: 6, index: i }), s.removeAttribute(u));
|
|
317
|
+
if (de.test(s.tagName)) {
|
|
318
|
+
const u = s.textContent.split(P), w = u.length - 1;
|
|
319
319
|
if (w > 0) {
|
|
320
320
|
s.textContent = nt ? nt.emptyScript : "";
|
|
321
|
-
for (let v = 0; v < w; v++) s.append(
|
|
322
|
-
s.append(
|
|
321
|
+
for (let v = 0; v < w; v++) s.append(u[v], X()), M.nextNode(), l.push({ type: 2, index: ++i });
|
|
322
|
+
s.append(u[w], X());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (s.nodeType === 8) if (s.data ===
|
|
325
|
+
} else if (s.nodeType === 8) if (s.data === ce) l.push({ type: 2, index: i });
|
|
326
326
|
else {
|
|
327
|
-
let
|
|
328
|
-
for (; (
|
|
327
|
+
let u = -1;
|
|
328
|
+
for (; (u = s.data.indexOf(P, u + 1)) !== -1; ) l.push({ type: 7, index: i }), u += P.length - 1;
|
|
329
329
|
}
|
|
330
330
|
i++;
|
|
331
331
|
}
|
|
@@ -342,7 +342,7 @@ function D(e, t, o = e, r) {
|
|
|
342
342
|
const i = Q(t) ? void 0 : t._$litDirective$;
|
|
343
343
|
return (s == null ? void 0 : s.constructor) !== i && ((n = s == null ? void 0 : s._$AO) == null || n.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 = D(e, s._$AS(e, t.values), s, r)), t;
|
|
344
344
|
}
|
|
345
|
-
let
|
|
345
|
+
let je = class {
|
|
346
346
|
constructor(t, o) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
|
|
348
348
|
}
|
|
@@ -358,8 +358,8 @@ let Ue = class {
|
|
|
358
358
|
let i = M.nextNode(), a = 0, n = 0, l = r[0];
|
|
359
359
|
for (; l !== void 0; ) {
|
|
360
360
|
if (a === l.index) {
|
|
361
|
-
let
|
|
362
|
-
l.type === 2 ?
|
|
361
|
+
let p;
|
|
362
|
+
l.type === 2 ? p = new et(i, i.nextSibling, this, t) : l.type === 1 ? p = new l.ctor(i, l.name, l.strings, this, t) : l.type === 6 && (p = new qe(i, this, t)), this._$AV.push(p), l = r[++n];
|
|
363
363
|
}
|
|
364
364
|
a !== (l == null ? void 0 : l.index) && (i = M.nextNode(), a++);
|
|
365
365
|
}
|
|
@@ -390,7 +390,7 @@ class et {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(t, o = this) {
|
|
393
|
-
t = D(this, t, o), Q(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== z && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
393
|
+
t = D(this, t, o), Q(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== z && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Le(t) ? this.k(t) : this._(t);
|
|
394
394
|
}
|
|
395
395
|
O(t) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -403,10 +403,10 @@ class et {
|
|
|
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 = kt.createElement(
|
|
406
|
+
const { values: o, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = kt.createElement(pe(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
|
|
409
|
+
const a = new je(s, this), n = a.u(this.options);
|
|
410
410
|
a.p(o), this.T(n), this._$AH = a;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
@@ -449,8 +449,8 @@ class ct {
|
|
|
449
449
|
if (i === void 0) t = D(this, t, o, 0), a = !Q(t) || t !== this._$AH && t !== z, a && (this._$AH = t);
|
|
450
450
|
else {
|
|
451
451
|
const n = t;
|
|
452
|
-
let l,
|
|
453
|
-
for (t = i[0], l = 0; l < i.length - 1; l++)
|
|
452
|
+
let l, p;
|
|
453
|
+
for (t = i[0], l = 0; l < i.length - 1; l++) p = D(this, n[r + l], o, l), p === z && (p = this._$AH[l]), a || (a = !Q(p) || p !== this._$AH[l]), p === h ? t = h : t !== h && (t += (p ?? "") + i[l + 1]), this._$AH[l] = p;
|
|
454
454
|
}
|
|
455
455
|
a && !s && this.j(t);
|
|
456
456
|
}
|
|
@@ -458,7 +458,7 @@ class ct {
|
|
|
458
458
|
t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
let
|
|
461
|
+
let Be = class extends ct {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ let je = class extends ct {
|
|
|
466
466
|
this.element[this.name] = t === h ? void 0 : t;
|
|
467
467
|
}
|
|
468
468
|
};
|
|
469
|
-
class
|
|
469
|
+
class De extends ct {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -474,7 +474,7 @@ class Be extends ct {
|
|
|
474
474
|
this.element.toggleAttribute(this.name, !!t && t !== h);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class
|
|
477
|
+
class Ve extends ct {
|
|
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 De extends ct {
|
|
|
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
|
|
491
|
+
class qe {
|
|
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
|
}
|
|
@@ -501,7 +501,7 @@ class Ve {
|
|
|
501
501
|
}
|
|
502
502
|
const gt = W.litHtmlPolyfillSupport;
|
|
503
503
|
gt == null || gt(kt, et), (W.litHtmlVersions ?? (W.litHtmlVersions = [])).push("3.2.1");
|
|
504
|
-
const
|
|
504
|
+
const He = (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 j = class extends U {
|
|
|
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 =
|
|
529
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = He(o, this.renderRoot, this.renderOptions);
|
|
530
530
|
}
|
|
531
531
|
connectedCallback() {
|
|
532
532
|
var t;
|
|
@@ -540,8 +540,8 @@ let j = class extends U {
|
|
|
540
540
|
return z;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
j._$litElement$ = !0, j.finalized = !0, (
|
|
543
|
+
var ae;
|
|
544
|
+
j._$litElement$ = !0, j.finalized = !0, (ae = globalThis.litElementHydrateSupport) == null || ae.call(globalThis, { LitElement: j });
|
|
545
545
|
const vt = globalThis.litElementPolyfillSupport;
|
|
546
546
|
vt == null || vt({ LitElement: j });
|
|
547
547
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
@@ -560,7 +560,7 @@ const ot = (e) => (t, o) => {
|
|
|
560
560
|
* Copyright 2017 Google LLC
|
|
561
561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
562
562
|
*/
|
|
563
|
-
const
|
|
563
|
+
const Fe = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Et }, Ye = (e = Fe, 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 He = { attribute: !0, type: String, converter: at, 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" ?
|
|
585
|
+
return (t, o) => typeof o == "object" ? Ye(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);
|
|
@@ -596,50 +596,50 @@ function Ot(e) {
|
|
|
596
596
|
return f({ ...e, state: !0, attribute: !1 });
|
|
597
597
|
}
|
|
598
598
|
var $ = /* @__PURE__ */ ((e) => (e.reaction = "reaction", e.stars = "stars", e.poll = "poll", e.text = "text", e.nps = "nps", e))($ || {});
|
|
599
|
-
const
|
|
600
|
-
var
|
|
599
|
+
const Ze = "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='M640-160v-280h160v280H640Zm-240%200v-640h160v640H400Zm-240%200v-440h160v440H160Z'/%3e%3c/svg%3e", Ge = "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='M160-160v-440h160v440H160Zm240%200v-400l160%20160v240H400Zm160-354L400-674v-126h160v286Zm240%20240L640-434v-6h160v166Zm-9%20219L55-791l57-57%20736%20736-57%2057Z'/%3e%3c/svg%3e", Ke = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='currentColor'%3e%3cpath%20d='M200-200h57l391-391-57-57-391%20391v57Zm-80%2080v-170l528-527q12-11%2026.5-17t30.5-6q16%200%2031%206t26%2018l55%2056q12%2011%2017.5%2026t5.5%2030q0%2016-5.5%2030.5T817-647L290-120H120Zm640-584-56-56%2056%2056Zm-141%2085-28-29%2057%2057-29-28Z'/%3e%3c/svg%3e", We = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='%23666666'%20class='bi%20bi-x'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M4.646%204.646a.5.5%200%200%201%20.708%200L8%207.293l2.646-2.647a.5.5%200%200%201%20.708.708L8.707%208l2.647%202.646a.5.5%200%200%201-.708.708L8%208.707l-2.646%202.647a.5.5%200%200%201-.708-.708L7.293%208%204.646%205.354a.5.5%200%200%201%200-.708'/%3e%3c/svg%3e";
|
|
600
|
+
var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
601
601
|
return typeof e == "string" ? e.length > 0 : typeof e == "number";
|
|
602
602
|
}, x = function(e, t, o) {
|
|
603
603
|
return t === void 0 && (t = 0), o === void 0 && (o = Math.pow(10, t)), Math.round(o * e) / o + 0;
|
|
604
604
|
}, S = function(e, t, o) {
|
|
605
605
|
return t === void 0 && (t = 0), o === void 0 && (o = 1), e > o ? o : e > t ? e : t;
|
|
606
|
-
},
|
|
606
|
+
}, he = function(e) {
|
|
607
607
|
return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
|
|
608
608
|
}, Yt = function(e) {
|
|
609
609
|
return { r: S(e.r, 0, 255), g: S(e.g, 0, 255), b: S(e.b, 0, 255), a: S(e.a) };
|
|
610
610
|
}, yt = function(e) {
|
|
611
611
|
return { r: x(e.r), g: x(e.g), b: x(e.b), a: x(e.a, 3) };
|
|
612
|
-
},
|
|
612
|
+
}, Xe = /^#([0-9a-f]{3,8})$/i, rt = function(e) {
|
|
613
613
|
var t = e.toString(16);
|
|
614
614
|
return t.length < 2 ? "0" + t : t;
|
|
615
|
-
},
|
|
615
|
+
}, fe = function(e) {
|
|
616
616
|
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), n = a ? i === t ? (o - r) / a : i === o ? 2 + (r - t) / a : 4 + (t - o) / a : 0;
|
|
617
617
|
return { h: 60 * (n < 0 ? n + 6 : n), s: i ? a / i * 100 : 0, v: i / 255 * 100, a: s };
|
|
618
|
-
},
|
|
618
|
+
}, me = function(e) {
|
|
619
619
|
var t = e.h, o = e.s, r = e.v, s = e.a;
|
|
620
620
|
t = t / 360 * 6, o /= 100, r /= 100;
|
|
621
|
-
var i = Math.floor(t), a = r * (1 - o), n = r * (1 - (t - i) * o), l = r * (1 - (1 - t + i) * o),
|
|
622
|
-
return { r: 255 * [r, n, a, a, l, r][
|
|
621
|
+
var i = Math.floor(t), a = r * (1 - o), n = r * (1 - (t - i) * o), l = r * (1 - (1 - t + i) * o), p = i % 6;
|
|
622
|
+
return { r: 255 * [r, n, a, a, l, r][p], g: 255 * [l, r, r, n, a, a][p], b: 255 * [a, a, l, r, r, n][p], a: s };
|
|
623
623
|
}, Zt = function(e) {
|
|
624
|
-
return { h:
|
|
624
|
+
return { h: he(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
|
|
625
625
|
}, Gt = function(e) {
|
|
626
626
|
return { h: x(e.h), s: x(e.s), l: x(e.l), a: x(e.a, 3) };
|
|
627
627
|
}, Kt = function(e) {
|
|
628
|
-
return
|
|
628
|
+
return me((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 }));
|
|
629
629
|
var t, o, r;
|
|
630
630
|
}, J = function(e) {
|
|
631
|
-
return { h: (t =
|
|
631
|
+
return { h: (t = fe(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 };
|
|
632
632
|
var t, o, r, s;
|
|
633
|
-
},
|
|
634
|
-
var t =
|
|
633
|
+
}, Qe = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, to = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, eo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, oo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Wt = { string: [[function(e) {
|
|
634
|
+
var t = Xe.exec(e);
|
|
635
635
|
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 ? x(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 ? x(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
636
636
|
}, "hex"], [function(e) {
|
|
637
|
-
var t =
|
|
637
|
+
var t = eo.exec(e) || oo.exec(e);
|
|
638
638
|
return t ? t[2] !== t[4] || t[4] !== t[6] ? null : Yt({ 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;
|
|
639
639
|
}, "rgb"], [function(e) {
|
|
640
|
-
var t =
|
|
640
|
+
var t = Qe.exec(e) || to.exec(e);
|
|
641
641
|
if (!t) return null;
|
|
642
|
-
var o, r, s = Zt({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (
|
|
642
|
+
var o, r, s = Zt({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (Je[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
|
|
643
643
|
return Kt(s);
|
|
644
644
|
}, "hsl"]], object: [[function(e) {
|
|
645
645
|
var t = e.r, o = e.g, r = e.b, s = e.a, i = s === void 0 ? 1 : s;
|
|
@@ -653,16 +653,16 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
653
653
|
var t = e.h, o = e.s, r = e.v, s = e.a, i = s === void 0 ? 1 : s;
|
|
654
654
|
if (!A(t) || !A(o) || !A(r)) return null;
|
|
655
655
|
var a = function(n) {
|
|
656
|
-
return { h:
|
|
656
|
+
return { h: he(n.h), s: S(n.s, 0, 100), v: S(n.v, 0, 100), a: S(n.a) };
|
|
657
657
|
}({ h: Number(t), s: Number(o), v: Number(r), a: Number(i) });
|
|
658
|
-
return
|
|
658
|
+
return me(a);
|
|
659
659
|
}, "hsv"]] }, Jt = function(e, t) {
|
|
660
660
|
for (var o = 0; o < t.length; o++) {
|
|
661
661
|
var r = t[o][0](e);
|
|
662
662
|
if (r) return [r, t[o][1]];
|
|
663
663
|
}
|
|
664
664
|
return [null, void 0];
|
|
665
|
-
},
|
|
665
|
+
}, ro = function(e) {
|
|
666
666
|
return typeof e == "string" ? Jt(e.trim(), Wt.string) : typeof e == "object" && e !== null ? Jt(e, Wt.object) : [null, void 0];
|
|
667
667
|
}, wt = function(e, t) {
|
|
668
668
|
var o = J(e);
|
|
@@ -674,7 +674,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
674
674
|
return { h: o.h, s: o.s, l: S(o.l + 100 * t, 0, 100), a: o.a };
|
|
675
675
|
}, Qt = function() {
|
|
676
676
|
function e(t) {
|
|
677
|
-
this.parsed =
|
|
677
|
+
this.parsed = ro(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
678
678
|
}
|
|
679
679
|
return e.prototype.isValid = function() {
|
|
680
680
|
return this.parsed !== null;
|
|
@@ -698,7 +698,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
698
698
|
return t = Gt(J(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
|
|
699
699
|
var t, o, r, s, i;
|
|
700
700
|
}, e.prototype.toHsv = function() {
|
|
701
|
-
return t =
|
|
701
|
+
return t = fe(this.rgba), { h: x(t.h), s: x(t.s), v: x(t.v), a: x(t.a, 3) };
|
|
702
702
|
var t;
|
|
703
703
|
}, e.prototype.invert = function() {
|
|
704
704
|
return C({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
|
|
@@ -728,7 +728,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
728
728
|
return e instanceof Qt ? e : new Qt(e);
|
|
729
729
|
};
|
|
730
730
|
const xt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
|
|
731
|
-
function
|
|
731
|
+
function so(e) {
|
|
732
732
|
return {
|
|
733
733
|
debug: (t, ...o) => {
|
|
734
734
|
xt && console.debug(`[${e}]`, t, ...o);
|
|
@@ -744,9 +744,9 @@ function ro(e) {
|
|
|
744
744
|
}
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
|
-
const
|
|
748
|
-
var
|
|
749
|
-
const
|
|
747
|
+
const b = so("Pollcatch");
|
|
748
|
+
var be = /* @__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))(be || {});
|
|
749
|
+
const io = {
|
|
750
750
|
black: "#000000",
|
|
751
751
|
white: "#ffffff",
|
|
752
752
|
red: "#ff0000",
|
|
@@ -763,21 +763,21 @@ const so = {
|
|
|
763
763
|
teal: "#008080",
|
|
764
764
|
navy: "#000080"
|
|
765
765
|
};
|
|
766
|
-
function
|
|
766
|
+
function ao(e) {
|
|
767
767
|
const t = e.toLowerCase().trim();
|
|
768
|
-
return
|
|
768
|
+
return io[t] || null;
|
|
769
769
|
}
|
|
770
770
|
function St(e, t) {
|
|
771
771
|
const o = te(e), r = te(t), s = Math.max(o, r), i = Math.min(o, r);
|
|
772
772
|
return (s + 0.05) / (i + 0.05);
|
|
773
773
|
}
|
|
774
774
|
function te(e) {
|
|
775
|
-
const t =
|
|
775
|
+
const t = lo(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), n = s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
776
776
|
return 0.2126 * i + 0.7152 * a + 0.0722 * n;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function no(e, t = {}) {
|
|
779
779
|
if (!C(e).isValid())
|
|
780
|
-
return
|
|
780
|
+
return b.warn(`Invalid color provided: ${e}`), "black";
|
|
781
781
|
const {
|
|
782
782
|
minContrast: r = 4.5,
|
|
783
783
|
colorOptions: s = ["black", "white", "light", "dark"],
|
|
@@ -787,29 +787,29 @@ function ao(e, t = {}) {
|
|
|
787
787
|
},
|
|
788
788
|
fallback: a = "white"
|
|
789
789
|
} = t, n = s.map((c) => c === "black" ? "#000000" : c === "white" ? "#ffffff" : c === "light" ? i.light || "#f8f9fa" : c === "dark" ? i.dark || "#343a40" : c);
|
|
790
|
-
let l = a,
|
|
790
|
+
let l = a, p = 0;
|
|
791
791
|
for (const c of n) {
|
|
792
|
-
const
|
|
793
|
-
|
|
792
|
+
const u = St(e, c);
|
|
793
|
+
u >= r && u > p && (p = u, l = c);
|
|
794
794
|
}
|
|
795
|
-
if (
|
|
795
|
+
if (p === 0) {
|
|
796
796
|
const c = St(e, a);
|
|
797
|
-
l = a,
|
|
798
|
-
for (const
|
|
799
|
-
if (
|
|
800
|
-
const w = St(e,
|
|
801
|
-
w >
|
|
797
|
+
l = a, p = c;
|
|
798
|
+
for (const u of n) {
|
|
799
|
+
if (u === a) continue;
|
|
800
|
+
const w = St(e, u);
|
|
801
|
+
w > p && (p = w, l = u);
|
|
802
802
|
}
|
|
803
|
-
|
|
804
|
-
`No color option met the minimum contrast ratio of ${r}:1 against ${e}. Using ${l} with contrast ratio ${
|
|
803
|
+
b.warn(
|
|
804
|
+
`No color option met the minimum contrast ratio of ${r}:1 against ${e}. Using ${l} with contrast ratio ${p.toFixed(2)}:1 instead.`
|
|
805
805
|
);
|
|
806
806
|
}
|
|
807
807
|
return l;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
810
|
-
const o =
|
|
809
|
+
function lo(e) {
|
|
810
|
+
const o = ao(e) || e, r = C(o);
|
|
811
811
|
if (!r.isValid())
|
|
812
|
-
return
|
|
812
|
+
return b.warn(`Invalid color provided: ${e}`), { r: 0, g: 0, b: 0 };
|
|
813
813
|
const { r: s, g: i, b: a } = r.toRgb();
|
|
814
814
|
return { r: s, g: i, b: a };
|
|
815
815
|
}
|
|
@@ -825,24 +825,24 @@ function k(e, t) {
|
|
|
825
825
|
}[t] : void 0;
|
|
826
826
|
return e === "left" || e === "right" ? r || "center" : e === "top" || e === "bottom" ? r || "start" : r || "center";
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function ee(e, t = "1rem", o = 1) {
|
|
829
829
|
if (!e) return t;
|
|
830
|
-
const
|
|
831
|
-
xs:
|
|
832
|
-
sm:
|
|
833
|
-
md:
|
|
834
|
-
lg:
|
|
835
|
-
xl:
|
|
836
|
-
},
|
|
837
|
-
if (
|
|
838
|
-
return
|
|
839
|
-
const
|
|
830
|
+
const r = {
|
|
831
|
+
xs: 0.75,
|
|
832
|
+
sm: 0.875,
|
|
833
|
+
md: 1,
|
|
834
|
+
lg: 1.25,
|
|
835
|
+
xl: 1.5
|
|
836
|
+
}, s = e.toLowerCase().trim();
|
|
837
|
+
if (r[s] !== void 0)
|
|
838
|
+
return `${r[s] * o}rem`;
|
|
839
|
+
const i = e.trim().replace(/\s+/g, " ");
|
|
840
840
|
if (/\d+(\.\d+)?\s*(px|em|rem|%|vh|vw|pt|pc|in|cm|mm|ex|ch|vmin|vmax)$/i.test(
|
|
841
|
-
|
|
841
|
+
i
|
|
842
842
|
))
|
|
843
|
-
return
|
|
844
|
-
const
|
|
845
|
-
return isNaN(
|
|
843
|
+
return i.replace(/\s+/g, "");
|
|
844
|
+
const n = parseFloat(i);
|
|
845
|
+
return isNaN(n) ? t : `${n}rem`;
|
|
846
846
|
}
|
|
847
847
|
function co(e, t = "4px") {
|
|
848
848
|
if (!e) return t;
|
|
@@ -901,11 +901,11 @@ function ho(e) {
|
|
|
901
901
|
return /^(#[0-9a-fA-F]{3,8}|rgb\([^)]+\)|rgba\([^)]+\)|hsl\([^)]+\)|hsla\([^)]+\)|[a-zA-Z]+)$/.test(t);
|
|
902
902
|
}
|
|
903
903
|
function R(e) {
|
|
904
|
-
return ho(e) ? e.replace(/[<>"']/g, "").trim() : (
|
|
904
|
+
return ho(e) ? e.replace(/[<>"']/g, "").trim() : (b.warn("Invalid color value:", e), "#000000");
|
|
905
905
|
}
|
|
906
906
|
function fo(e) {
|
|
907
907
|
if (typeof e != "string")
|
|
908
|
-
return
|
|
908
|
+
return b.warn("Non-string value passed to sanitizeCSS:", typeof e), "";
|
|
909
909
|
let t = e;
|
|
910
910
|
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;
|
|
911
911
|
}
|
|
@@ -915,9 +915,9 @@ function mo(e) {
|
|
|
915
915
|
(t, o, r, s, i) => s ? t : `${o}: ${r.trim()} !important${i}`
|
|
916
916
|
);
|
|
917
917
|
}
|
|
918
|
-
const
|
|
919
|
-
function
|
|
920
|
-
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (
|
|
918
|
+
const oe = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", bo = "pc_session_id", go = 24 * 60 * 60 * 1e3;
|
|
919
|
+
function re() {
|
|
920
|
+
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (b.warn("crypto.randomUUID not available, using fallback UUID generator"), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
921
921
|
const t = Math.random() * 16 | 0;
|
|
922
922
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
923
923
|
}));
|
|
@@ -927,56 +927,56 @@ function Tt() {
|
|
|
927
927
|
try {
|
|
928
928
|
return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
|
|
929
929
|
} catch {
|
|
930
|
-
return
|
|
930
|
+
return b.warn("localStorage not available, session ID will not persist"), !1;
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function ge(e) {
|
|
934
934
|
try {
|
|
935
935
|
const t = localStorage.getItem(e);
|
|
936
936
|
return t ? JSON.parse(t) : void 0;
|
|
937
937
|
} catch (t) {
|
|
938
|
-
|
|
938
|
+
b.warn(`Failed to get item from localStorage: ${e}`, t);
|
|
939
939
|
return;
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function ve(e, t) {
|
|
943
943
|
try {
|
|
944
944
|
return localStorage.setItem(e, JSON.stringify(t)), !0;
|
|
945
945
|
} catch (o) {
|
|
946
|
-
return
|
|
946
|
+
return b.warn(`Failed to set item in localStorage: ${e}`, o), !1;
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
async function vo() {
|
|
950
950
|
if (typeof window < "u") {
|
|
951
951
|
if (window.pcProject !== void 0)
|
|
952
|
-
return
|
|
952
|
+
return b.debug("Found project key in global variable"), window.pcProject;
|
|
953
953
|
const e = document.querySelectorAll("script[pc-project]");
|
|
954
954
|
if (e.length > 0) {
|
|
955
955
|
const t = e[e.length - 1], o = t == null ? void 0 : t.getAttribute("pc-project");
|
|
956
956
|
if (o)
|
|
957
|
-
return
|
|
957
|
+
return b.debug("Found project key in script tag attribute"), o;
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
|
-
|
|
960
|
+
b.warn("No project key found in global variable or script tags");
|
|
961
961
|
}
|
|
962
|
-
async function
|
|
962
|
+
async function se() {
|
|
963
963
|
const e = bo, t = go;
|
|
964
964
|
if (Tt()) {
|
|
965
|
-
const o =
|
|
965
|
+
const o = ge(e);
|
|
966
966
|
if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
|
|
967
|
-
return
|
|
968
|
-
|
|
967
|
+
return b.debug("Using existing session ID from localStorage"), o.id;
|
|
968
|
+
b.debug(
|
|
969
969
|
o ? "Session ID expired" : "No session ID found",
|
|
970
970
|
"generating new one"
|
|
971
971
|
);
|
|
972
|
-
const r =
|
|
973
|
-
return
|
|
972
|
+
const r = re();
|
|
973
|
+
return ve(e, {
|
|
974
974
|
id: r,
|
|
975
975
|
timestamp: Date.now()
|
|
976
|
-
}) ?
|
|
976
|
+
}) ? b.debug("Generated and stored new session ID") : b.warn("Generated session ID but failed to store it"), r;
|
|
977
977
|
} else {
|
|
978
|
-
const o =
|
|
979
|
-
return
|
|
978
|
+
const o = re();
|
|
979
|
+
return b.debug("Generated non-persistent session ID"), o;
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
function lt(e) {
|
|
@@ -1006,19 +1006,19 @@ function yo(e) {
|
|
|
1006
1006
|
if (!Tt())
|
|
1007
1007
|
return O();
|
|
1008
1008
|
try {
|
|
1009
|
-
const t =
|
|
1009
|
+
const t = ge(e);
|
|
1010
1010
|
return t ? { ...O(), ...t } : O();
|
|
1011
1011
|
} catch (t) {
|
|
1012
|
-
return
|
|
1012
|
+
return b.warn("Failed to load localStats from localStorage", t), O();
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
1015
|
function wo(e, t) {
|
|
1016
1016
|
if (!Tt())
|
|
1017
1017
|
return !1;
|
|
1018
1018
|
try {
|
|
1019
|
-
return
|
|
1019
|
+
return ve(e, t) ? (b.debug("Saved localStats to localStorage", t), !0) : !1;
|
|
1020
1020
|
} catch (o) {
|
|
1021
|
-
return
|
|
1021
|
+
return b.warn("Failed to save localStats to localStorage", o), !1;
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
1024
|
function $o(e, t) {
|
|
@@ -1057,7 +1057,7 @@ function xo(e, t) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
return o.nps = lt((o == null ? void 0 : o.breakdown) || {}), o;
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function ye(e) {
|
|
1061
1061
|
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);
|
|
1062
1062
|
}
|
|
1063
1063
|
function dt(e) {
|
|
@@ -1107,8 +1107,9 @@ function Ao(e, t = 50) {
|
|
|
1107
1107
|
return e.length <= t ? e : e.substring(0, t).trim() + "...";
|
|
1108
1108
|
}
|
|
1109
1109
|
class _o {
|
|
1110
|
+
// Tracks if user has ever made a selection (even if later deselected)
|
|
1110
1111
|
constructor(t) {
|
|
1111
|
-
this.stats = O(), this.localStats = O(), this.isLoading = !0, this.isSubmitting = !1, (this.host = t).addController(this);
|
|
1112
|
+
this.stats = O(), this.localStats = O(), this.isLoading = !0, this.isSubmitting = !1, this.hasInteracted = !1, (this.host = t).addController(this);
|
|
1112
1113
|
}
|
|
1113
1114
|
hostConnected() {
|
|
1114
1115
|
this.loadStats();
|
|
@@ -1117,7 +1118,7 @@ class _o {
|
|
|
1117
1118
|
return this.host.project || await vo() || "public";
|
|
1118
1119
|
}
|
|
1119
1120
|
async getLocalStatsKey() {
|
|
1120
|
-
const t = this.host, o = await
|
|
1121
|
+
const t = this.host, o = await se(), r = await this.getProjectId(), s = t.name || "unnamed";
|
|
1121
1122
|
return `pc-local-stats-${o}-${r}-${s}`;
|
|
1122
1123
|
}
|
|
1123
1124
|
/**
|
|
@@ -1145,42 +1146,42 @@ class _o {
|
|
|
1145
1146
|
}
|
|
1146
1147
|
let a, n;
|
|
1147
1148
|
if (i && typeof i == "function") {
|
|
1148
|
-
const
|
|
1149
|
-
if (
|
|
1149
|
+
const u = this.getOptionsForDataFunc(t);
|
|
1150
|
+
if (b.debug(`Using data function for: ${r}`, {
|
|
1150
1151
|
dataFuncName: t.dataFunc,
|
|
1151
1152
|
projectKey: o,
|
|
1152
|
-
options:
|
|
1153
|
-
}), a = await i(o, r,
|
|
1153
|
+
options: u
|
|
1154
|
+
}), a = await i(o, r, u), a && typeof a == "object" && "success" in a && "data" in a) {
|
|
1154
1155
|
if (!a.success)
|
|
1155
|
-
throw
|
|
1156
|
+
throw b.error("Custom data function returned unsuccessful response", a), new Error("Custom data function returned unsuccessful response");
|
|
1156
1157
|
n = a.data || {};
|
|
1157
1158
|
} else
|
|
1158
1159
|
n = a || {};
|
|
1159
1160
|
} else {
|
|
1160
|
-
const
|
|
1161
|
+
const u = t.dataEndpoint || oe;
|
|
1161
1162
|
if (!r)
|
|
1162
1163
|
throw new Error("Name parameter is required");
|
|
1163
|
-
const w = `${
|
|
1164
|
-
|
|
1164
|
+
const w = `${u}/${encodeURIComponent(o)}/${encodeURIComponent(r)}`;
|
|
1165
|
+
b.debug(`Fetching stats for: ${r}`, { endpoint: u, projectKey: o });
|
|
1165
1166
|
const v = await fetch(w);
|
|
1166
1167
|
if (!v.ok)
|
|
1167
1168
|
throw new Error(`API request failed with status: ${v.status}`);
|
|
1168
1169
|
if (a = await v.json(), !a.success)
|
|
1169
|
-
throw
|
|
1170
|
+
throw b.error("Backend returned unsuccessful response", a), new Error("Backend returned unsuccessful response");
|
|
1170
1171
|
n = a.data || {};
|
|
1171
1172
|
}
|
|
1172
|
-
const l = n.count > 0 ? Math.round(n.sum / n.count) : 0,
|
|
1173
|
+
const l = n.count > 0 ? Math.round(n.sum / n.count) : 0, p = Math.round(n.sum / n.count * 100), c = {
|
|
1173
1174
|
count: n.count ?? 0,
|
|
1174
1175
|
sum: n.sum,
|
|
1175
1176
|
avg: l,
|
|
1176
|
-
pct:
|
|
1177
|
+
pct: p,
|
|
1177
1178
|
nps: s === $.nps ? lt((n == null ? void 0 : n.breakdown) || {}) : 0,
|
|
1178
1179
|
breakdown: n.breakdown ?? {},
|
|
1179
1180
|
updated: n.updated_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
1180
1181
|
};
|
|
1181
1182
|
this.stats = c;
|
|
1182
1183
|
} catch (o) {
|
|
1183
|
-
throw
|
|
1184
|
+
throw b.error("Error loading stats:", o, this.localStats), o;
|
|
1184
1185
|
} finally {
|
|
1185
1186
|
this.isLoading = !1, this.host.requestUpdate();
|
|
1186
1187
|
}
|
|
@@ -1212,9 +1213,9 @@ class _o {
|
|
|
1212
1213
|
const t = await this.getLocalStatsKey();
|
|
1213
1214
|
try {
|
|
1214
1215
|
const o = yo(t);
|
|
1215
|
-
|
|
1216
|
+
b.debug("Loaded localStats from localStorage", o), this.localStats = o;
|
|
1216
1217
|
} catch (o) {
|
|
1217
|
-
|
|
1218
|
+
b.warn("Failed to generate localStorage key for localStats", o), this.localStats = O();
|
|
1218
1219
|
}
|
|
1219
1220
|
this.host.requestUpdate();
|
|
1220
1221
|
}
|
|
@@ -1224,9 +1225,9 @@ class _o {
|
|
|
1224
1225
|
async persistLocalStats() {
|
|
1225
1226
|
try {
|
|
1226
1227
|
const t = await this.getLocalStatsKey();
|
|
1227
|
-
wo(t, this.localStats) ||
|
|
1228
|
+
wo(t, this.localStats) || b.warn("Failed to save localStats to localStorage");
|
|
1228
1229
|
} catch (t) {
|
|
1229
|
-
|
|
1230
|
+
b.warn("Failed to save localStats to localStorage", t);
|
|
1230
1231
|
}
|
|
1231
1232
|
}
|
|
1232
1233
|
/**
|
|
@@ -1239,7 +1240,7 @@ class _o {
|
|
|
1239
1240
|
*/
|
|
1240
1241
|
updateStats(t, o) {
|
|
1241
1242
|
const r = this.host;
|
|
1242
|
-
if (this.stats && (this.stats = $o(this.stats, this.localStats)), this.localStats = {
|
|
1243
|
+
if (this.hasInteracted = !0, this.stats && (this.stats = $o(this.stats, this.localStats)), this.localStats = {
|
|
1243
1244
|
count: t > 0 || r.type === $.nps ? 1 : 0,
|
|
1244
1245
|
// always 1 or 0
|
|
1245
1246
|
sum: t,
|
|
@@ -1254,15 +1255,15 @@ class _o {
|
|
|
1254
1255
|
}, o && o.length > 0)
|
|
1255
1256
|
for (const s of o)
|
|
1256
1257
|
s && (this.localStats.breakdown[s] = 1);
|
|
1257
|
-
this.stats = xo(this.stats, this.localStats),
|
|
1258
|
+
this.stats = xo(this.stats, this.localStats), b.debug("Stats updated - remote: ", this.stats), b.debug("Stats updated - local: ", this.stats), this.persistLocalStats(), this.host.requestUpdate();
|
|
1258
1259
|
}
|
|
1259
1260
|
async markStatsAsSubmitted() {
|
|
1260
1261
|
this.localStats.submitted = (/* @__PURE__ */ new Date()).toISOString(), await this.persistLocalStats(), this.host.requestUpdate();
|
|
1261
1262
|
}
|
|
1262
1263
|
async submitStats() {
|
|
1263
|
-
if (!this.hasLocalStats())
|
|
1264
|
-
throw
|
|
1265
|
-
const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await
|
|
1264
|
+
if (!this.hasLocalStats() && !this.hasInteracted)
|
|
1265
|
+
throw b.warn("No local stats to submit"), new Error("No local stats to submit");
|
|
1266
|
+
const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await se(), s = await this.getProjectId(), i = t.name || "", a = this.localStats.sum, n = Object.keys(this.localStats.breakdown || {});
|
|
1266
1267
|
this.isSubmitting = !0, this.host.requestUpdate();
|
|
1267
1268
|
const l = {
|
|
1268
1269
|
sessionId: r,
|
|
@@ -1274,31 +1275,31 @@ class _o {
|
|
|
1274
1275
|
textValues: n,
|
|
1275
1276
|
metadata: t.metadata,
|
|
1276
1277
|
timestamp: o
|
|
1277
|
-
},
|
|
1278
|
+
}, p = ko(JSON.stringify(l), o);
|
|
1278
1279
|
try {
|
|
1279
|
-
await this.sendStats({ ...l, hash:
|
|
1280
|
+
await this.sendStats({ ...l, hash: p }), await this.markStatsAsSubmitted(), this.dispatchSubmitEvent(l);
|
|
1280
1281
|
} catch (c) {
|
|
1281
|
-
|
|
1282
|
+
b.warn("Failed to send stats event", c);
|
|
1282
1283
|
} finally {
|
|
1283
1284
|
this.isSubmitting = !1, this.host.requestUpdate();
|
|
1284
1285
|
}
|
|
1285
1286
|
return l;
|
|
1286
1287
|
}
|
|
1287
1288
|
async sendStats(t) {
|
|
1288
|
-
const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint ||
|
|
1289
|
+
const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint || oe;
|
|
1289
1290
|
if (r.dataFunc) {
|
|
1290
|
-
|
|
1291
|
+
b.debug("Skip sending stats as data function is in use.");
|
|
1291
1292
|
return;
|
|
1292
1293
|
}
|
|
1293
1294
|
if (!dt(s))
|
|
1294
|
-
throw
|
|
1295
|
+
throw b.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
|
|
1295
1296
|
try {
|
|
1296
|
-
if (
|
|
1297
|
+
if (b.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
|
|
1297
1298
|
if (navigator.sendBeacon(s, o)) {
|
|
1298
|
-
|
|
1299
|
+
b.debug("Successfully sent stats via sendBeacon");
|
|
1299
1300
|
return;
|
|
1300
1301
|
} else
|
|
1301
|
-
|
|
1302
|
+
b.debug("sendBeacon failed, falling back to fetch");
|
|
1302
1303
|
const i = await fetch(s, {
|
|
1303
1304
|
body: o,
|
|
1304
1305
|
method: "POST",
|
|
@@ -1309,9 +1310,9 @@ class _o {
|
|
|
1309
1310
|
});
|
|
1310
1311
|
if (!i.ok)
|
|
1311
1312
|
throw new Error(`API request failed with status: ${i.status}`);
|
|
1312
|
-
|
|
1313
|
+
b.debug("Successfully sent stats via fetch");
|
|
1313
1314
|
} catch (i) {
|
|
1314
|
-
throw
|
|
1315
|
+
throw b.error("Failed to send analytics:", i), i;
|
|
1315
1316
|
}
|
|
1316
1317
|
}
|
|
1317
1318
|
/**
|
|
@@ -1328,7 +1329,7 @@ class _o {
|
|
|
1328
1329
|
pct: (o == null ? void 0 : o.pct) || 0,
|
|
1329
1330
|
nps: r.type === $.nps ? lt((o == null ? void 0 : o.breakdown) || {}) : 0
|
|
1330
1331
|
};
|
|
1331
|
-
return
|
|
1332
|
+
return b.debug("Stats data: ", this.stats), Co(t, s);
|
|
1332
1333
|
}
|
|
1333
1334
|
/**
|
|
1334
1335
|
* Checks if a value is selected in the local stats
|
|
@@ -1356,7 +1357,7 @@ class _o {
|
|
|
1356
1357
|
let a = 1;
|
|
1357
1358
|
if ((i.type === $.stars || i.type === $.nps) && (a = parseInt(t)), s)
|
|
1358
1359
|
if (o) {
|
|
1359
|
-
const l = r.filter((
|
|
1360
|
+
const l = r.filter((p) => p !== t);
|
|
1360
1361
|
this.updateStats(l.length > 0 ? 1 : 0, l);
|
|
1361
1362
|
} else
|
|
1362
1363
|
this.updateStats(0, []);
|
|
@@ -1388,7 +1389,7 @@ class _o {
|
|
|
1388
1389
|
bubbles: !0,
|
|
1389
1390
|
composed: !0
|
|
1390
1391
|
});
|
|
1391
|
-
t.dispatchEvent(i),
|
|
1392
|
+
t.dispatchEvent(i), b.debug("Dispatched change event", s);
|
|
1392
1393
|
}
|
|
1393
1394
|
/**
|
|
1394
1395
|
* Dispatches a 'submit' CustomEvent on the host element
|
|
@@ -1400,7 +1401,7 @@ class _o {
|
|
|
1400
1401
|
bubbles: !0,
|
|
1401
1402
|
composed: !0
|
|
1402
1403
|
});
|
|
1403
|
-
o.dispatchEvent(r),
|
|
1404
|
+
o.dispatchEvent(r), b.debug("Dispatched submit event", t);
|
|
1404
1405
|
}
|
|
1405
1406
|
hasLocalStats() {
|
|
1406
1407
|
var t;
|
|
@@ -1462,18 +1463,18 @@ class Eo {
|
|
|
1462
1463
|
*/
|
|
1463
1464
|
shouldShowStats() {
|
|
1464
1465
|
const t = this.host;
|
|
1465
|
-
return t.showStats === void 0 || t.showStats === "never" ? !1 : t.showStats === "always" || t.showStats === "" || t.readOnly && t.showStats === "after-vote" ? !0 : t.hasEditButton && this.isEditing ? !1 : this.dataController.hasLocalStats();
|
|
1466
|
+
return t.showStats === void 0 || t.showStats === "never" ? !1 : t.showStats === "always" || t.showStats === "" || t.readOnly && t.showStats === "after-vote" ? !0 : t.hasEditButton && this.isEditing ? !1 : this.dataController.hasLocalStats() || this.dataController.hasInteracted;
|
|
1466
1467
|
}
|
|
1467
1468
|
shouldShowFooter() {
|
|
1468
1469
|
return this.shouldShowSubmitButton() || this.shouldShowStats();
|
|
1469
1470
|
}
|
|
1470
1471
|
shouldShowChart() {
|
|
1471
1472
|
const t = this.host;
|
|
1472
|
-
return t.showChart ? t.readOnly ? this.isChartVisible : !(t.hasEditButton && this.isEditing || !this.dataController.hasLocalStats() || !this.isChartVisible) : !1;
|
|
1473
|
+
return t.showChart ? t.readOnly ? this.isChartVisible : !(t.hasEditButton && this.isEditing || !this.dataController.hasLocalStats() && !this.dataController.hasInteracted || !this.isChartVisible) : !1;
|
|
1473
1474
|
}
|
|
1474
1475
|
shouldShowChartToggle() {
|
|
1475
1476
|
const t = this.host;
|
|
1476
|
-
return t.showChart ? t.readOnly ? !0 : !(t.hasEditButton && this.isEditing || !this.dataController.hasLocalStats()) : !1;
|
|
1477
|
+
return t.showChart ? t.readOnly ? !0 : !(t.hasEditButton && this.isEditing || !this.dataController.hasLocalStats() && !this.dataController.hasInteracted) : !1;
|
|
1477
1478
|
}
|
|
1478
1479
|
shouldShowSubmitButton() {
|
|
1479
1480
|
return !!this.isEditing;
|
|
@@ -1500,7 +1501,7 @@ class Eo {
|
|
|
1500
1501
|
}
|
|
1501
1502
|
}
|
|
1502
1503
|
var zt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(zt || {});
|
|
1503
|
-
function
|
|
1504
|
+
function we(e, t = {}) {
|
|
1504
1505
|
const { type: o = "functional", alt: r, ariaLabel: s, isSelected: i } = t;
|
|
1505
1506
|
if (!e)
|
|
1506
1507
|
return { alt: "", ariaHidden: !0 };
|
|
@@ -1530,8 +1531,8 @@ function Oo(e, t) {
|
|
|
1530
1531
|
* Copyright 2017 Google LLC
|
|
1531
1532
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1532
1533
|
*/
|
|
1533
|
-
const
|
|
1534
|
-
let
|
|
1534
|
+
const $e = { ATTRIBUTE: 1 }, xe = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
1535
|
+
let Se = class {
|
|
1535
1536
|
constructor(t) {
|
|
1536
1537
|
}
|
|
1537
1538
|
get _$AU() {
|
|
@@ -1552,10 +1553,10 @@ let xe = class {
|
|
|
1552
1553
|
* Copyright 2018 Google LLC
|
|
1553
1554
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1554
1555
|
*/
|
|
1555
|
-
const y =
|
|
1556
|
+
const y = xe(class extends Se {
|
|
1556
1557
|
constructor(e) {
|
|
1557
1558
|
var t;
|
|
1558
|
-
if (super(e), e.type !==
|
|
1559
|
+
if (super(e), e.type !== $e.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.");
|
|
1559
1560
|
}
|
|
1560
1561
|
render(e) {
|
|
1561
1562
|
return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
|
|
@@ -1587,7 +1588,7 @@ const st = {
|
|
|
1587
1588
|
desktop: "1024px"
|
|
1588
1589
|
}, Mt = class Mt extends j {
|
|
1589
1590
|
constructor() {
|
|
1590
|
-
super(...arguments), this.dataController = new _o(this), this.displayController = new Eo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.lockAnswer = !1, this.ariaLabel = null, this.minContrast =
|
|
1591
|
+
super(...arguments), this.dataController = new _o(this), this.displayController = new Eo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.lockAnswer = !1, this.ariaLabel = null, this.minContrast = be.AA_NORMAL, this.options = [], this.project = "public", this.questionPosition = "top", this.statsText = "{count} votes", this.buttonText = "Submit", this.buttonRadius = "sm", this.multiple = !1, this.readOnly = !1, this.handleEditToggleKeyDown = (t) => {
|
|
1591
1592
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleEnterEditMode());
|
|
1592
1593
|
};
|
|
1593
1594
|
}
|
|
@@ -1622,7 +1623,7 @@ const st = {
|
|
|
1622
1623
|
const i = R(this.primaryColor);
|
|
1623
1624
|
o += `--pc-primary-color: ${i} !important;
|
|
1624
1625
|
`;
|
|
1625
|
-
const a =
|
|
1626
|
+
const a = no(i, {
|
|
1626
1627
|
minContrast: this.minContrast,
|
|
1627
1628
|
colorOptions: ["black", "white", "light", "dark"]
|
|
1628
1629
|
});
|
|
@@ -1652,8 +1653,13 @@ const st = {
|
|
|
1652
1653
|
}
|
|
1653
1654
|
const s = this.starHoverColor || (r ? `color-mix(in srgb, ${R(r)} 80%, white)` : null);
|
|
1654
1655
|
if (s && (o += `--pc-star-hover-color: ${s} !important;
|
|
1655
|
-
`), this.
|
|
1656
|
-
const i =
|
|
1656
|
+
`), this.starSize) {
|
|
1657
|
+
const i = ee(this.starSize, "1rem", 1.5);
|
|
1658
|
+
o += `--pc-stars-star-size: ${i} !important;
|
|
1659
|
+
`;
|
|
1660
|
+
}
|
|
1661
|
+
if (this.size) {
|
|
1662
|
+
const i = ee(this.size);
|
|
1657
1663
|
o += `font-size: ${i} !important;
|
|
1658
1664
|
`;
|
|
1659
1665
|
}
|
|
@@ -1718,7 +1724,7 @@ const st = {
|
|
|
1718
1724
|
renderEditToggleIcon(t = "edit-toggle-button") {
|
|
1719
1725
|
return this.displayController.shouldShowEditButton() ? d`
|
|
1720
1726
|
<img
|
|
1721
|
-
src="${
|
|
1727
|
+
src="${Ke}"
|
|
1722
1728
|
alt="Edit vote"
|
|
1723
1729
|
class="edit-toggle-icon"
|
|
1724
1730
|
data-testid="${t}"
|
|
@@ -1737,7 +1743,7 @@ const st = {
|
|
|
1737
1743
|
renderChartToggle() {
|
|
1738
1744
|
return this.displayController.shouldShowChartToggle() ? d`
|
|
1739
1745
|
<img
|
|
1740
|
-
src="${this.displayController.isChartVisible ?
|
|
1746
|
+
src="${this.displayController.isChartVisible ? Ge : Ze}"
|
|
1741
1747
|
alt="${this.displayController.isChartVisible ? "Hide chart" : "Show chart"}"
|
|
1742
1748
|
class="chart-toggle-icon"
|
|
1743
1749
|
data-testid="chart-toggle-button"
|
|
@@ -1778,7 +1784,7 @@ const st = {
|
|
|
1778
1784
|
<div class="pc-thank-you-msg" data-testid="thank-you-msg">
|
|
1779
1785
|
${t}
|
|
1780
1786
|
<img
|
|
1781
|
-
src="${
|
|
1787
|
+
src="${We}"
|
|
1782
1788
|
alt="Close"
|
|
1783
1789
|
class="thank-you-close-icon"
|
|
1784
1790
|
data-testid="close-thank-you-button"
|
|
@@ -1881,106 +1887,109 @@ Mt.styles = [
|
|
|
1881
1887
|
}
|
|
1882
1888
|
`
|
|
1883
1889
|
];
|
|
1884
|
-
let
|
|
1890
|
+
let m = Mt;
|
|
1885
1891
|
g([
|
|
1886
1892
|
f({ type: String, attribute: "show-stats" })
|
|
1887
|
-
],
|
|
1893
|
+
], m.prototype, "showStats");
|
|
1888
1894
|
g([
|
|
1889
1895
|
f({ type: Boolean, attribute: "show-chart" })
|
|
1890
|
-
],
|
|
1896
|
+
], m.prototype, "showChart");
|
|
1891
1897
|
g([
|
|
1892
1898
|
f({ type: Boolean, attribute: "initialized" })
|
|
1893
|
-
],
|
|
1899
|
+
], m.prototype, "initialized");
|
|
1894
1900
|
g([
|
|
1895
1901
|
f({ type: Boolean, attribute: "lock-answer" })
|
|
1896
|
-
],
|
|
1902
|
+
], m.prototype, "lockAnswer");
|
|
1897
1903
|
g([
|
|
1898
1904
|
f({ type: String, attribute: "primary-color" })
|
|
1899
|
-
],
|
|
1905
|
+
], m.prototype, "primaryColor");
|
|
1900
1906
|
g([
|
|
1901
1907
|
f({ type: String, attribute: "mute-color" })
|
|
1902
|
-
],
|
|
1908
|
+
], m.prototype, "muteColor");
|
|
1903
1909
|
g([
|
|
1904
1910
|
f({ type: String, attribute: "text-color" })
|
|
1905
|
-
],
|
|
1911
|
+
], m.prototype, "textColor");
|
|
1906
1912
|
g([
|
|
1907
1913
|
f({ type: String, attribute: "background-color" })
|
|
1908
|
-
],
|
|
1914
|
+
], m.prototype, "backgroundColor");
|
|
1909
1915
|
g([
|
|
1910
1916
|
f({ type: String, attribute: "accent-color" })
|
|
1911
|
-
],
|
|
1917
|
+
], m.prototype, "accentColor");
|
|
1912
1918
|
g([
|
|
1913
1919
|
f({ type: String, attribute: "star-color" })
|
|
1914
|
-
],
|
|
1920
|
+
], m.prototype, "starColor");
|
|
1915
1921
|
g([
|
|
1916
1922
|
f({ type: String, attribute: "star-hover-color" })
|
|
1917
|
-
],
|
|
1923
|
+
], m.prototype, "starHoverColor");
|
|
1924
|
+
g([
|
|
1925
|
+
f({ type: String, attribute: "star-size" })
|
|
1926
|
+
], m.prototype, "starSize");
|
|
1918
1927
|
g([
|
|
1919
1928
|
f({ type: String })
|
|
1920
|
-
],
|
|
1929
|
+
], m.prototype, "size");
|
|
1921
1930
|
g([
|
|
1922
1931
|
f({ type: String, attribute: "aria-label" })
|
|
1923
|
-
],
|
|
1932
|
+
], m.prototype, "ariaLabel");
|
|
1924
1933
|
g([
|
|
1925
1934
|
f({ type: String, attribute: "aria-describedby" })
|
|
1926
|
-
],
|
|
1935
|
+
], m.prototype, "ariaDescribedby");
|
|
1927
1936
|
g([
|
|
1928
1937
|
f({ type: Number, attribute: "min-contrast" })
|
|
1929
|
-
],
|
|
1938
|
+
], m.prototype, "minContrast");
|
|
1930
1939
|
g([
|
|
1931
1940
|
f({ type: String })
|
|
1932
|
-
],
|
|
1941
|
+
], m.prototype, "css");
|
|
1933
1942
|
g([
|
|
1934
1943
|
f({ type: Array })
|
|
1935
|
-
],
|
|
1944
|
+
], m.prototype, "options");
|
|
1936
1945
|
g([
|
|
1937
1946
|
f({ type: String })
|
|
1938
|
-
],
|
|
1947
|
+
], m.prototype, "project");
|
|
1939
1948
|
g([
|
|
1940
1949
|
f({ type: String, attribute: "name" })
|
|
1941
|
-
],
|
|
1950
|
+
], m.prototype, "name");
|
|
1942
1951
|
g([
|
|
1943
1952
|
f({ type: String })
|
|
1944
|
-
],
|
|
1953
|
+
], m.prototype, "metadata");
|
|
1945
1954
|
g([
|
|
1946
1955
|
f({ type: String, attribute: "data-func" })
|
|
1947
|
-
],
|
|
1956
|
+
], m.prototype, "dataFunc");
|
|
1948
1957
|
g([
|
|
1949
1958
|
f({ type: String, attribute: "data-endpoint" })
|
|
1950
|
-
],
|
|
1959
|
+
], m.prototype, "dataEndpoint");
|
|
1951
1960
|
g([
|
|
1952
1961
|
f({ type: String })
|
|
1953
|
-
],
|
|
1962
|
+
], m.prototype, "question");
|
|
1954
1963
|
g([
|
|
1955
1964
|
f({ type: String, attribute: "question-position" })
|
|
1956
|
-
],
|
|
1965
|
+
], m.prototype, "questionPosition");
|
|
1957
1966
|
g([
|
|
1958
1967
|
f({ type: String, attribute: "question-align" })
|
|
1959
|
-
],
|
|
1968
|
+
], m.prototype, "questionAlign");
|
|
1960
1969
|
g([
|
|
1961
1970
|
f({ type: String, attribute: "stats-text" })
|
|
1962
|
-
],
|
|
1971
|
+
], m.prototype, "statsText");
|
|
1963
1972
|
g([
|
|
1964
1973
|
f({ type: String, attribute: "stats-position" })
|
|
1965
|
-
],
|
|
1974
|
+
], m.prototype, "statsPosition");
|
|
1966
1975
|
g([
|
|
1967
1976
|
f({ type: String, attribute: "stats-align" })
|
|
1968
|
-
],
|
|
1977
|
+
], m.prototype, "statsAlign");
|
|
1969
1978
|
g([
|
|
1970
1979
|
f({ type: String, attribute: "button-text" })
|
|
1971
|
-
],
|
|
1980
|
+
], m.prototype, "buttonText");
|
|
1972
1981
|
g([
|
|
1973
1982
|
f({ type: String, attribute: "button-radius" })
|
|
1974
|
-
],
|
|
1983
|
+
], m.prototype, "buttonRadius");
|
|
1975
1984
|
g([
|
|
1976
1985
|
f({ type: String, attribute: "thank-you-msg" })
|
|
1977
|
-
],
|
|
1986
|
+
], m.prototype, "thankYouMsg");
|
|
1978
1987
|
g([
|
|
1979
1988
|
f({ type: Boolean, attribute: "multiple" })
|
|
1980
|
-
],
|
|
1989
|
+
], m.prototype, "multiple");
|
|
1981
1990
|
g([
|
|
1982
1991
|
f({ type: Boolean, attribute: "read-only" })
|
|
1983
|
-
],
|
|
1992
|
+
], m.prototype, "readOnly");
|
|
1984
1993
|
const zo = F`
|
|
1985
1994
|
/* CSS variables inherit from parent - defaults are specified at usage sites */
|
|
1986
1995
|
|
|
@@ -2622,10 +2631,10 @@ function It(e, t = {}) {
|
|
|
2622
2631
|
const n = `
|
|
2623
2632
|
width: ${o > 0 ? i.value / o * s.maxWidth : 0}%;
|
|
2624
2633
|
background-color: ${s.barColor};
|
|
2625
|
-
`, l = s.labelFormatter(i),
|
|
2634
|
+
`, l = s.labelFormatter(i), p = i.label ? d`<span class="pc-bar-label-text">${l}</span>` : h, c = !i.label && i.icon ? d`<span class="pc-bar-label-icon">${i.icon}</span>` : h;
|
|
2626
2635
|
return d`
|
|
2627
2636
|
<div class="pc-bar-row">
|
|
2628
|
-
<div class="pc-bar-label">${
|
|
2637
|
+
<div class="pc-bar-label">${p} ${c}</div>
|
|
2629
2638
|
<div class="pc-bar-container">
|
|
2630
2639
|
<div class="pc-bar" style="${n}"></div>
|
|
2631
2640
|
<div class="pc-bar-value">${s.valueFormatter(i)}</div>
|
|
@@ -2641,7 +2650,7 @@ var Io = Object.defineProperty, No = Object.getOwnPropertyDescriptor, Y = (e, t,
|
|
|
2641
2650
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
2642
2651
|
return r && s && Io(t, o, s), s;
|
|
2643
2652
|
};
|
|
2644
|
-
let I = class extends
|
|
2653
|
+
let I = class extends m {
|
|
2645
2654
|
constructor() {
|
|
2646
2655
|
super(), this.min = 0, this.max = 10, this.type = $.nps, this.minLabel = "Not at all", this.maxLabel = "Extremely", this.minMaxPosition = "top", this.hoverValue = -1, this.handleNumberLeave = () => {
|
|
2647
2656
|
this.hoverValue = -1;
|
|
@@ -2769,7 +2778,7 @@ let I = class extends b {
|
|
|
2769
2778
|
`;
|
|
2770
2779
|
}
|
|
2771
2780
|
};
|
|
2772
|
-
I.styles = [...
|
|
2781
|
+
I.styles = [...m.styles, pt, zo];
|
|
2773
2782
|
Y([
|
|
2774
2783
|
f({ type: String, attribute: "min-label" })
|
|
2775
2784
|
], I.prototype, "minLabel", 2);
|
|
@@ -3050,7 +3059,7 @@ var Lo = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, Nt = (e, t
|
|
|
3050
3059
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3051
3060
|
return r && s && Lo(t, o, s), s;
|
|
3052
3061
|
};
|
|
3053
|
-
let tt = class extends
|
|
3062
|
+
let tt = class extends m {
|
|
3054
3063
|
constructor() {
|
|
3055
3064
|
super(), this.type = $.poll, this.multiple = !1, this.compact = !1, this.hasEditButton = !0, this.statsText = "{count} votes", this.questionPosition = "top", this.statsPosition = "bottom", this.showStats = "after-vote";
|
|
3056
3065
|
}
|
|
@@ -3108,12 +3117,12 @@ let tt = class extends b {
|
|
|
3108
3117
|
*/
|
|
3109
3118
|
renderOptionIcon(e) {
|
|
3110
3119
|
if (!(e != null && e.icon)) return "";
|
|
3111
|
-
const t = zt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s =
|
|
3120
|
+
const t = zt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = we(e == null ? void 0 : e.icon, {
|
|
3112
3121
|
type: t,
|
|
3113
3122
|
alt: o,
|
|
3114
3123
|
isSelected: r
|
|
3115
3124
|
});
|
|
3116
|
-
return
|
|
3125
|
+
return ye(e == null ? void 0 : e.icon) ? d`<span
|
|
3117
3126
|
class="poll-option-icon"
|
|
3118
3127
|
aria-hidden="${s.ariaHidden ? "true" : "false"}"
|
|
3119
3128
|
>${e == null ? void 0 : e.icon}</span
|
|
@@ -3197,12 +3206,12 @@ let tt = class extends b {
|
|
|
3197
3206
|
* Render chart that replaces poll options when showing
|
|
3198
3207
|
*/
|
|
3199
3208
|
renderBarChart() {
|
|
3200
|
-
var l,
|
|
3201
|
-
const e = ((l = this.dataController.stats) == null ? void 0 : l.breakdown) || {}, t = ((
|
|
3209
|
+
var l, p;
|
|
3210
|
+
const e = ((l = this.dataController.stats) == null ? void 0 : l.breakdown) || {}, t = ((p = this.dataController.localStats) == null ? void 0 : p.breakdown) || {}, o = Object.values(e).reduce((c, u) => c + u, 0), r = this.options.map((c, u) => {
|
|
3202
3211
|
const w = e[c.value] || 0, v = o > 0 ? Math.round(w / o * 100) : 0, E = (t[c.value] || 0) > 0;
|
|
3203
3212
|
return {
|
|
3204
3213
|
option: c,
|
|
3205
|
-
index:
|
|
3214
|
+
index: u,
|
|
3206
3215
|
voteCount: w,
|
|
3207
3216
|
percentage: v,
|
|
3208
3217
|
isSelected: E
|
|
@@ -3221,7 +3230,7 @@ let tt = class extends b {
|
|
|
3221
3230
|
...=${a}
|
|
3222
3231
|
>
|
|
3223
3232
|
${r.map((c) => {
|
|
3224
|
-
const
|
|
3233
|
+
const u = {
|
|
3225
3234
|
"poll-option": !0,
|
|
3226
3235
|
"poll-option--compact": this.compact,
|
|
3227
3236
|
"poll-option--chart-view": !0,
|
|
@@ -3229,7 +3238,7 @@ let tt = class extends b {
|
|
|
3229
3238
|
};
|
|
3230
3239
|
return d`
|
|
3231
3240
|
<div
|
|
3232
|
-
class="${y(
|
|
3241
|
+
class="${y(u)}"
|
|
3233
3242
|
data-testid="poll-chart-item-${c.index}"
|
|
3234
3243
|
role="listitem"
|
|
3235
3244
|
aria-label="${c.option.label}: ${c.percentage}% (${c.voteCount} votes)"
|
|
@@ -3313,7 +3322,7 @@ let tt = class extends b {
|
|
|
3313
3322
|
`;
|
|
3314
3323
|
}
|
|
3315
3324
|
};
|
|
3316
|
-
tt.styles = [...
|
|
3325
|
+
tt.styles = [...m.styles, pt, Mo];
|
|
3317
3326
|
Nt([
|
|
3318
3327
|
f({ type: Boolean })
|
|
3319
3328
|
], tt.prototype, "multiple", 2);
|
|
@@ -3405,10 +3414,10 @@ const Uo = F`
|
|
|
3405
3414
|
* Copyright 2018 Google LLC
|
|
3406
3415
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3407
3416
|
*/
|
|
3408
|
-
const
|
|
3417
|
+
const Ce = "important", jo = " !" + Ce, Bo = xe(class extends Se {
|
|
3409
3418
|
constructor(e) {
|
|
3410
3419
|
var t;
|
|
3411
|
-
if (super(e), e.type !==
|
|
3420
|
+
if (super(e), e.type !== $e.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.");
|
|
3412
3421
|
}
|
|
3413
3422
|
render(e) {
|
|
3414
3423
|
return Object.keys(e).reduce((t, o) => {
|
|
@@ -3425,7 +3434,7 @@ const Se = "important", jo = " !" + Se, Bo = $e(class extends xe {
|
|
|
3425
3434
|
if (s != null) {
|
|
3426
3435
|
this.ft.add(r);
|
|
3427
3436
|
const i = typeof s == "string" && s.endsWith(jo);
|
|
3428
|
-
r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ?
|
|
3437
|
+
r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Ce : "") : o[r] = s;
|
|
3429
3438
|
}
|
|
3430
3439
|
}
|
|
3431
3440
|
return z;
|
|
@@ -3436,7 +3445,7 @@ var Do = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, ut = (e, t
|
|
|
3436
3445
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3437
3446
|
return r && s && Do(t, o, s), s;
|
|
3438
3447
|
};
|
|
3439
|
-
let V = class extends
|
|
3448
|
+
let V = class extends m {
|
|
3440
3449
|
constructor() {
|
|
3441
3450
|
super(), this.type = $.stars, this.numStars = 5, this.hoverValue = -1, this.handleStarKeyDown = (e) => {
|
|
3442
3451
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -3462,18 +3471,18 @@ let V = class extends b {
|
|
|
3462
3471
|
var i, a;
|
|
3463
3472
|
if (this.displayController.shouldShowChart()) return h;
|
|
3464
3473
|
const e = ((i = this.dataController.stats) == null ? void 0 : i.avg) || 0, t = ((a = this.dataController.localStats) == null ? void 0 : a.avg) || 0, o = this.readOnly ? e : t, r = this.displayController.allowEdit(), s = Array.from({ length: this.numStars }, (n, l) => l + 1).map((n) => {
|
|
3465
|
-
const l = n <= Math.floor(o) || n <= (this.hoverValue || 0),
|
|
3474
|
+
const l = n <= Math.floor(o) || n <= (this.hoverValue || 0), p = !l && n === Math.ceil(o) && o % 1 !== 0, c = {
|
|
3466
3475
|
star: !0,
|
|
3467
3476
|
selected: l,
|
|
3468
|
-
partial:
|
|
3477
|
+
partial: p,
|
|
3469
3478
|
"view-mode": !r
|
|
3470
|
-
},
|
|
3479
|
+
}, u = p ? { "--partial-fill": `${o % 1 * 100}%` } : {};
|
|
3471
3480
|
return d`
|
|
3472
3481
|
<div class="pc-section" data-testid="pc-section">
|
|
3473
3482
|
<span
|
|
3474
3483
|
data-testid="stars-view-star-${n}"
|
|
3475
3484
|
class=${y(c)}
|
|
3476
|
-
style=${Bo(
|
|
3485
|
+
style=${Bo(u)}
|
|
3477
3486
|
role="${r ? "button" : "presentation"}"
|
|
3478
3487
|
tabindex="${r ? "0" : ""}"
|
|
3479
3488
|
aria-label="${r ? `Rate ${n} star${n > 1 ? "s" : ""}` : ""}"
|
|
@@ -3533,7 +3542,7 @@ let V = class extends b {
|
|
|
3533
3542
|
`;
|
|
3534
3543
|
}
|
|
3535
3544
|
};
|
|
3536
|
-
V.styles = [...
|
|
3545
|
+
V.styles = [...m.styles, pt, Uo];
|
|
3537
3546
|
ut([
|
|
3538
3547
|
f({ type: String })
|
|
3539
3548
|
], V.prototype, "icon", 2);
|
|
@@ -3740,7 +3749,7 @@ const qo = F`
|
|
|
3740
3749
|
.reaction.expand .reaction-list {
|
|
3741
3750
|
order: 1;
|
|
3742
3751
|
}
|
|
3743
|
-
`,
|
|
3752
|
+
`, ie = {
|
|
3744
3753
|
// Faces
|
|
3745
3754
|
smile: "😊",
|
|
3746
3755
|
laugh: "😄",
|
|
@@ -3883,9 +3892,9 @@ const qo = F`
|
|
|
3883
3892
|
hiking: "🥾",
|
|
3884
3893
|
yoga: "🧘"
|
|
3885
3894
|
};
|
|
3886
|
-
function
|
|
3895
|
+
function ke(e) {
|
|
3887
3896
|
let t = "❓", o = !1;
|
|
3888
|
-
return e ? e in
|
|
3897
|
+
return e ? e in ie ? t = ie[e] : ye(e) ? t = e : dt(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 = "❓", {
|
|
3889
3898
|
icon: t,
|
|
3890
3899
|
isRemoteImage: o
|
|
3891
3900
|
};
|
|
@@ -3896,7 +3905,7 @@ var Fo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, ht = (e, t
|
|
|
3896
3905
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3897
3906
|
return r && s && Fo(t, o, s), s;
|
|
3898
3907
|
};
|
|
3899
|
-
let q = class extends
|
|
3908
|
+
let q = class extends m {
|
|
3900
3909
|
constructor() {
|
|
3901
3910
|
super(), this.type = $.reaction, this.showCounts = !1, this.compact = !1, this.popupPosition = "auto", this.hasEditButton = !1, this.statsText = "{count} votes", this.buttonRadius = "990px", this.muteColor = "#cccccc", this.questionPosition = "top", this.statsPosition = "right", this.popupPosition = "auto";
|
|
3902
3911
|
}
|
|
@@ -3920,7 +3929,7 @@ let q = class extends b {
|
|
|
3920
3929
|
* Renders the icon for a reaction
|
|
3921
3930
|
*/
|
|
3922
3931
|
renderReactionIcon(e, t) {
|
|
3923
|
-
const { icon: o, isRemoteImage: r } =
|
|
3932
|
+
const { icon: o, isRemoteImage: r } = ke(e), s = zt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = we(o, {
|
|
3924
3933
|
type: s,
|
|
3925
3934
|
alt: i,
|
|
3926
3935
|
ariaLabel: i,
|
|
@@ -4063,13 +4072,13 @@ let q = class extends b {
|
|
|
4063
4072
|
renderChart() {
|
|
4064
4073
|
if (!this.displayController.shouldShowChart()) return h;
|
|
4065
4074
|
const e = this.dataController.getBreakdownInfo(), o = Object.entries(e.breakdownCount).filter(
|
|
4066
|
-
([l,
|
|
4067
|
-
).map(([l,
|
|
4068
|
-
const c = this.options.find((
|
|
4075
|
+
([l, p]) => this.options.some((c) => c.value === l)
|
|
4076
|
+
).map(([l, p]) => {
|
|
4077
|
+
const c = this.options.find((u) => u.value === l);
|
|
4069
4078
|
return {
|
|
4070
4079
|
label: l,
|
|
4071
4080
|
// Use the reaction value as label
|
|
4072
|
-
value:
|
|
4081
|
+
value: p,
|
|
4073
4082
|
icon: (c == null ? void 0 : c.icon) || l
|
|
4074
4083
|
// Use the icon or fall back to reaction value
|
|
4075
4084
|
};
|
|
@@ -4105,7 +4114,7 @@ let q = class extends b {
|
|
|
4105
4114
|
`;
|
|
4106
4115
|
}
|
|
4107
4116
|
};
|
|
4108
|
-
q.styles = [...
|
|
4117
|
+
q.styles = [...m.styles, pt, qo];
|
|
4109
4118
|
ht([
|
|
4110
4119
|
f({ type: Boolean, attribute: "show-counts" })
|
|
4111
4120
|
], q.prototype, "showCounts", 2);
|
|
@@ -4199,12 +4208,12 @@ let H = class extends j {
|
|
|
4199
4208
|
// REACTION widget uses options for the icon
|
|
4200
4209
|
}));
|
|
4201
4210
|
t && t.length > 0 && (r = Array.from(t).map((s) => {
|
|
4202
|
-
const i = G(s, "value", "") || "", a = G(s, "label", Zo(s, i)) || "", n = G(s, "icon", void 0), l = G(s, "tooltip", void 0),
|
|
4211
|
+
const i = G(s, "value", "") || "", a = G(s, "label", Zo(s, i)) || "", n = G(s, "icon", void 0), l = G(s, "tooltip", void 0), p = G(s, "disabled", void 0), c = { value: i, label: a };
|
|
4203
4212
|
if (n !== void 0) {
|
|
4204
|
-
const
|
|
4205
|
-
c.icon =
|
|
4213
|
+
const u = ke(n);
|
|
4214
|
+
c.icon = u.icon;
|
|
4206
4215
|
}
|
|
4207
|
-
return l !== void 0 && (c.tooltip = l),
|
|
4216
|
+
return l !== void 0 && (c.tooltip = l), p !== void 0 && (c.disabled = !0), c;
|
|
4208
4217
|
})), this.parsedOptions = r;
|
|
4209
4218
|
}
|
|
4210
4219
|
/**
|