+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- )
- (s = k.lastIndex),
- k === Cb
- ? "!--" === p[1]
- ? (k = c)
- : void 0 === p[1]
- ? void 0 === p[2]
- ? void 0 !== p[3] && (k = Eb)
- : (m.test(p[2]) && (e = RegExp("" + p[2], "g")), (k = Eb))
- : (k = Db)
- : k === Eb
- ? ">" === p[0]
- ? ((k = null == e ? Cb : e), (q = -1))
- : void 0 === p[1]
- ? (q = -2)
- : ((q = k.lastIndex - p[2].length),
- (o = p[1]),
- (k = void 0 === p[3] ? Eb : '"' === p[3] ? _ : f))
- : k === _ || k === f
- ? (k = Eb)
- : k === c || k === Db
- ? (k = Cb)
- : ((k = Eb), (e = void 0));
- var u = k === Eb && a[l + 1].startsWith("/>") ? " " : "";
- j +=
- k === Cb
- ? n + xb
- : 0 <= q
- ? (i.push(o), n.slice(0, q) + "$lit$" + n.slice(q) + vb + u)
- : n + vb + (-2 === q ? (i.push(void 0), l) : u);
- }
- var t = j + (a[g] || ">") + (2 === b ? "" : "");
- if (!Array.isArray(a) || !a.hasOwnProperty("raw"))
- throw Error("invalid template strings array");
- return [void 0 === ub ? t : ub.createHTML(t), i];
- };
- class Ib {
- constructor(b, e) {
- var f,
- { strings: g, _$litType$: h } = b;
- this.parts = [];
- var i = 0,
- j = 0,
- n = g.length - 1,
- o = this.parts,
- [c, p] = Hb(g, h);
- if (
- ((this.el = Ib.createElement(c, e)),
- (Gb.currentNode = this.el.content),
- 2 === h)
- ) {
- var a = this.el.content,
- q = a.firstChild;
- q.remove(), a.append(...q.childNodes);
- }
- for (; null !== (f = Gb.nextNode()) && o.length < n; ) {
- if (1 === f.nodeType) {
- if (f.hasAttributes()) {
- var s = [];
- for (var t of f.getAttributeNames())
- if (t.endsWith("$lit$") || t.startsWith(vb)) {
- var u = p[j++];
- if ((s.push(t), void 0 !== u)) {
- var v = f.getAttribute(u.toLowerCase() + "$lit$").split(vb),
- w = /([.?@])?(.*)/.exec(u);
- o.push({
- type: 1,
- index: i,
- name: w[2],
- strings: v,
- ctor:
- "." === w[1]
- ? Lb
- : "?" === w[1]
- ? k
- : "@" === w[1]
- ? Mb
- : N,
- });
- } else o.push({ type: 6, index: i });
- }
- for (var x of s) f.removeAttribute(x);
- }
- if (m.test(f.tagName)) {
- var y = f.textContent.split(vb),
- z = y.length - 1;
- if (0 < z) {
- f.textContent = tb ? tb.emptyScript : "";
- for (var A = 0; A < z; A++)
- f.append(y[A], zb()),
- Gb.nextNode(),
- o.push({ type: 2, index: ++i });
- f.append(y[z], zb());
- }
- }
- } else if (8 === f.nodeType)
- if (f.data === wb) o.push({ type: 2, index: i });
- else
- for (var B = -1; -1 !== (B = f.data.indexOf(vb, B + 1)); )
- o.push({ type: 7, index: i }), (B += vb.length - 1);
- i++;
- }
- }
- static createElement(a) {
- var b = yb.createElement("template");
- return (b.innerHTML = a), b;
- }
- }
- class Jb {
- constructor(a, b) {
- (this.v = []), (this._$AN = void 0), (this._$AD = a), (this._$AM = b);
- }
- get parentNode() {
- return this._$AM.parentNode;
- }
- get _$AU() {
- return this._$AM._$AU;
- }
- p(a) {
- var b,
- {
- el: { content: e },
- parts: c,
- } = this._$AD,
- f = (
- null !== (b = null == a ? void 0 : a.creationScope) && void 0 !== b
- ? b
- : yb
- ).importNode(e, !0);
- Gb.currentNode = f;
- for (var g = Gb.nextNode(), j = 0, h = 0, k = c[0]; void 0 !== k; ) {
- if (j === k.index) {
- var d = void 0;
- 2 === k.type
- ? (d = new Kb(g, g.nextSibling, this, a))
- : 1 === k.type
- ? (d = new k.ctor(g, k.name, k.strings, this, a))
- : 6 === k.type && (d = new Nb(g, this, a)),
- this.v.push(d),
- (k = c[++h]);
- }
- j !== (null == k ? void 0 : k.index) && ((g = Gb.nextNode()), j++);
- }
- return f;
- }
- m(a) {
- var b = 0;
- for (var c of this.v)
- void 0 !== c &&
- (void 0 === c.strings
- ? c._$AI(a[b])
- : (c._$AI(a, c, b), (b += c.strings.length - 2))),
- b++;
- }
- }
- class Kb {
- constructor(a, c, d, f) {
- var e;
- (this.type = 2),
- (this._$AH = b),
- (this._$AN = void 0),
- (this._$AA = a),
- (this._$AB = c),
- (this._$AM = d),
- (this.options = f),
- (this._$Cg =
- null === (e = null == f ? void 0 : f.isConnected) ||
- void 0 === e ||
- e);
- }
- get _$AU() {
- var a, b;
- return null !==
- (b = null === (a = this._$AM) || void 0 === a ? void 0 : a._$AU) &&
- void 0 !== b
- ? b
- : this._$Cg;
- }
- get parentNode() {
- var a = this._$AA.parentNode,
- b = this._$AM;
- return void 0 !== b && 11 === a.nodeType && (a = b.parentNode), a;
- }
- get startNode() {
- return this._$AA;
- }
- get endNode() {
- return this._$AB;
- }
- _$AI(a) {
- var c =
- 1 < arguments.length && arguments[1] !== void 0 ? arguments[1] : this;
- (a = Ka(this, a, c)),
- Ab(a)
- ? a === b || null == a || "" === a
- ? (this._$AH !== b && this._$AR(), (this._$AH = b))
- : a !== this._$AH && a !== $ && this.$(a)
- : void 0 === a._$litType$
- ? void 0 === a.nodeType
- ? d(a)
- ? this.S(a)
- : this.$(a)
- : this.k(a)
- : this.T(a);
- }
- A(a) {
- var b =
- 1 < arguments.length && arguments[1] !== void 0
- ? arguments[1]
- : this._$AB;
- return this._$AA.parentNode.insertBefore(a, b);
- }
- k(a) {
- this._$AH !== a && (this._$AR(), (this._$AH = this.A(a)));
- }
- $(a) {
- this._$AH !== b && Ab(this._$AH)
- ? (this._$AA.nextSibling.data = a)
- : this.k(yb.createTextNode(a)),
- (this._$AH = a);
- }
- T(a) {
- var b,
- { values: c, _$litType$: d } = a,
- e =
- "number" == typeof d
- ? this._$AC(a)
- : (void 0 === d.el &&
- (d.el = Ib.createElement(d.h, this.options)),
- d);
- if ((null === (b = this._$AH) || void 0 === b ? void 0 : b._$AD) === e)
- this._$AH.m(c);
- else {
- var f = new Jb(e, this),
- g = f.p(this.options);
- f.m(c), this.k(g), (this._$AH = f);
- }
- }
- _$AC(a) {
- var b = Fb.get(a.strings);
- return void 0 === b && Fb.set(a.strings, (b = new Ib(a))), b;
- }
- S(a) {
- Bb(this._$AH) || ((this._$AH = []), this._$AR());
- var b,
- c = this._$AH,
- d = 0;
- for (var f of a)
- d === c.length
- ? c.push(
- (b = new Kb(this.A(zb()), this.A(zb()), this, this.options))
- )
- : (b = c[d]),
- b._$AI(f),
- d++;
- d < c.length && (this._$AR(b && b._$AB.nextSibling, d), (c.length = d));
- }
- _$AR() {
- var a,
- b =
- 0 < arguments.length && arguments[0] !== void 0
- ? arguments[0]
- : this._$AA.nextSibling,
- c = 1 < arguments.length ? arguments[1] : void 0;
- for (
- null === (a = this._$AP) || void 0 === a || a.call(this, !1, !0, c);
- b && b !== this._$AB;
+
+
+
+
+
+
+
+
+
+
+
- ) {
- var d = b.nextSibling;
- b.remove(), (b = d);
- }
- }
- setConnected(a) {
- var b;
- void 0 === this._$AM &&
- ((this._$Cg = a),
- null === (b = this._$AP) || void 0 === b || b.call(this, a));
- }
- }
- class N {
- constructor(a, c, d, f, e) {
- (this.type = 1),
- (this._$AH = b),
- (this._$AN = void 0),
- (this.element = a),
- (this.name = c),
- (this._$AM = f),
- (this.options = e),
- 2 < d.length || "" !== d[0] || "" !== d[1]
- ? ((this._$AH = Array(d.length - 1).fill(new String())),
- (this.strings = d))
- : (this._$AH = b);
- }
- get tagName() {
- return this.element.tagName;
- }
- get _$AU() {
- return this._$AM._$AU;
- }
- _$AI(a) {
- var c =
- 1 < arguments.length && arguments[1] !== void 0
- ? arguments[1]
- : this,
- d = 2 < arguments.length ? arguments[2] : void 0,
- f = 3 < arguments.length ? arguments[3] : void 0,
- e = this.strings,
- g = !1;
- if (void 0 === e)
- (a = Ka(this, a, c, 0)),
- (g = !Ab(a) || (a !== this._$AH && a !== $)),
- g && (this._$AH = a);
- else {
- var h,
- i,
- j = a;
- for (a = e[0], h = 0; h < e.length - 1; h++)
- (i = Ka(this, j[d + h], c, h)),
- i === $ && (i = this._$AH[h]),
- g || (g = !Ab(i) || i !== this._$AH[h]),
- i === b
- ? (a = b)
- : a !== b && (a += (null == i ? "" : i) + e[h + 1]),
- (this._$AH[h] = i);
- }
- g && !f && this.C(a);
- }
- C(a) {
- a === b
- ? this.element.removeAttribute(this.name)
- : this.element.setAttribute(this.name, null == a ? "" : a);
- }
- }
- class Lb extends N {
- constructor() {
- super(...arguments), (this.type = 3);
- }
- C(a) {
- this.element[this.name] = a === b ? void 0 : a;
- }
- }
- var M = tb ? tb.emptyScript : "";
- class k extends N {
- constructor() {
- super(...arguments), (this.type = 4);
- }
- C(a) {
- a && a !== b
- ? this.element.setAttribute(this.name, M)
- : this.element.removeAttribute(this.name);
- }
- }
- class Mb extends N {
- constructor(a, b, c, d, e) {
- super(a, b, c, d, e), (this.type = 5);
- }
- _$AI(a) {
- var c,
- d =
- 1 < arguments.length && arguments[1] !== void 0
- ? arguments[1]
- : this;
- if (
- (a = null !== (c = Ka(this, a, d, 0)) && void 0 !== c ? c : b) !== $
- ) {
- var f = this._$AH,
- e =
- (a === b && f !== b) ||
- a.capture !== f.capture ||
- a.once !== f.once ||
- a.passive !== f.passive,
- g = a !== b && (f === b || e);
- e && this.element.removeEventListener(this.name, this, f),
- g && this.element.addEventListener(this.name, this, a),
- (this._$AH = a);
- }
- }
- handleEvent(a) {
- var b, c;
- "function" == typeof this._$AH
- ? this._$AH.call(
- null !==
- (c =
- null === (b = this.options) || void 0 === b
- ? void 0
- : b.host) && void 0 !== c
- ? c
- : this.element,
- a
- )
- : this._$AH.handleEvent(a);
- }
- }
- class Nb {
- constructor(a, b, c) {
- (this.element = a),
- (this.type = 6),
- (this._$AN = void 0),
- (this._$AM = b),
- (this.options = c);
- }
- get _$AU() {
- return this._$AM._$AU;
- }
- _$AI(a) {
- Ka(this, a);
- }
- }
- var L = window.litHtmlPolyfillSupport;
- null == L || L(Ib, Kb),
- (null !== (a = globalThis.litHtmlVersions) && void 0 !== a
- ? a
- : (globalThis.litHtmlVersions = [])
- ).push("2.2.0");
- var Ob, Pb;
- class Qb extends h {
- constructor() {
- super(...arguments),
- (this.renderOptions = { host: this }),
- (this._$Dt = void 0);
- }
- createRenderRoot() {
- var a,
- b,
- c = super.createRenderRoot();
- return (
- (null !== (a = (b = this.renderOptions).renderBefore) &&
- void 0 !== a) ||
- (b.renderBefore = c.firstChild),
- c
- );
- }
- update(a) {
- var b = this.render();
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected),
- super.update(a),
- (this._$Dt = T(b, this.renderRoot, this.renderOptions));
- }
- connectedCallback() {
- var a;
- super.connectedCallback(),
- null === (a = this._$Dt) || void 0 === a || a.setConnected(!0);
- }
- disconnectedCallback() {
- var a;
- super.disconnectedCallback(),
- null === (a = this._$Dt) || void 0 === a || a.setConnected(!1);
- }
- render() {
- return $;
- }
- }
- (Qb.finalized = !0),
- (Qb._$litElement$ = !0),
- null === (Ob = globalThis.litElementHydrateSupport) ||
- void 0 === Ob ||
- Ob.call(globalThis, { LitElement: Qb });
- var Rb = globalThis.litElementPolyfillSupport;
- null == Rb || Rb({ LitElement: Qb }),
- (null !== (Pb = globalThis.litElementVersions) && void 0 !== Pb
- ? Pb
- : (globalThis.litElementVersions = [])
- ).push("3.2.0");
- var Sb = mb(
- p ||
- (p = j([
- "\n .light-entity-card {\n padding: 16px;\n }\n\n .light-entity-child-card {\n box-shadow: none !important;\n padding: 0 !important;\n }\n\n .light-entity-card.group {\n padding-bottom: 0;\n padding-top: 0;\n }\n\n .ha-slider-full-width ha-slider {\n width: 100%;\n }\n\n .percent-slider {\n color: var(--primary-text-color);\n margin-top: 5px;\n }\n\n .light-entity-card__header {\n display: flex;\n justify-content: space-between;\n @apply --paper-font-headline;\n line-height: 40px;\n color: var(--primary-text-color);\n font-size: 24px;\n }\n\n .group .light-entity-card__header {\n font-size: 16px;\n }\n\n .light-entity-card-sliders > div {\n margin-top: 10px;\n }\n\n .group .light-entity-card-sliders > div {\n margin-top: 0px;\n }\n\n .light-entity-card__toggle {\n display: flex;\n cursor: pointer;\n }\n\n .light-entity-card__color-picker {\n display: flex;\n justify-content: space-around;\n --ha-color-picker-wheel-borderwidth: 5;\n --ha-color-picker-wheel-bordercolor: white;\n --ha-color-picker-wheel-shadow: none;\n --ha-color-picker-marker-borderwidth: 2;\n --ha-color-picker-marker-bordercolor: white;\n }\n\n .group .light-entity-card__color-picker {\n width: 50%;\n margin: 0 auto;\n }\n \n .light-entity-card-color_temp {\n background-image: var(--ha-slider-background);\n }\n\n .group .light-entity-card-effectlist {\n margin-top: -25px;\n }\n\n .light-entity-card-center {\n display: flex;\n justify-content: center;\n cursor: pointer;\n }\n\n .light-entity-card-toggle {\n margin-right: 5px;\n }\n\n .hidden {\n display: none;\n }\n\n .icon-container {\n margin-top: 4px;\n }\n",
- ]))
- ),
- Tb = {
- shorten_cards: !1,
- consolidate_entities: !1,
- child_card: !1,
- hide_header: !1,
- header: "",
- color_wheel: !0,
- persist_features: !1,
- brightness: !0,
- color_temp: !0,
- white_value: !0,
- color_picker: !0,
- smooth_color_wheel: !1,
- speed: !0,
- intensity: !0,
- force_features: !1,
- show_slider_percent: !1,
- full_width_sliders: !1,
- brightness_icon: "weather-sunny",
- white_icon: "file-word-box",
- temperature_icon: "thermometer",
- speed_icon: "speedometer",
- intensity_icon: "transit-connection-horizontal",
- },
- Ub = mb(
- q ||
- (q = j([
- "\n .entities {\n padding-top: 10px;\n padding-bottom: 10px;\n display: flex;\n }\n\n .entities ha-formfield {\n display: block;\n margin-bottom: 10px;\n margin-left: 10px;\n }\n\n .checkbox-options {\n display: flex;\n }\n \n mwc-select {\n width: 100%;\n }\n\n .checkbox-options ha-formfield,\n .entities mwc-switch,\n .entities ha-form-string {\n padding-right: 2%;\n width: 48%;\n }\n\n .checkbox-options ha-formfield {\n margin-top: 10px;\n }\n\n .overall-config {\n margin-bottom: 20px;\n }\n",
- ]))
- ),
- Vb = (a, b) =>
- a.reduce(
- (a, c) => (
- c.defineId
- ? (a[c.defineId] = c)
- : c.promise.then((a) => {
- void 0 === b.registry.get(c.name) &&
- b.registry.define(c.name, a);
- }),
- a
- ),
- {}
- ),
- Wb = (a) => ({
- name: a,
- promise: customElements
- .whenDefined(a)
- .then(() => customElements.get(a)),
- }),
- Xb = function (a, c) {
- return (
- (Xb =
- Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array &&
- function (a, c) {
- a.__proto__ = c;
- }) ||
- function (a, c) {
- for (var b in c)
- Object.prototype.hasOwnProperty.call(c, b) && (a[b] = c[b]);
- }),
- Xb(a, c)
- );
- },
- Yb = function () {
- return (
- (Yb =
- Object.assign ||
- function (a) {
- for (var b, c = 1, d = arguments.length; c < d; c++)
- for (var e in ((b = arguments[c]), b))
- Object.prototype.hasOwnProperty.call(b, e) && (a[e] = b[e]);
- return a;
- }),
- Yb.apply(this, arguments)
- );
- },
- Zb = (a) => (b, c) => {
- if (!b.constructor._observers) {
- b.constructor._observers = new Map();
- var d = b.updated;
- b.updated = function (a) {
- d.call(this, a),
- a.forEach((a, b) => {
- var c = this.constructor._observers,
- d = c.get(b);
- d !== void 0 && d.call(this, this[b], a);
- });
- };
- } else if (!b.constructor.hasOwnProperty("_observers")) {
- var e = b.constructor._observers;
- (b.constructor._observers = new Map()),
- e.forEach((a, c) => b.constructor._observers.set(c, a));
- }
- b.constructor._observers.set(c, a);
- };
- class $b {
- constructor(a) {
- (this.startPress = (b) => {
- a().then((a) => {
- a && a.startPress(b);
- });
- }),
- (this.endPress = () => {
- a().then((a) => {
- a && a.endPress();
- });
- }),
- (this.startFocus = () => {
- a().then((a) => {
- a && a.startFocus();
- });
- }),
- (this.endFocus = () => {
- a().then((a) => {
- a && a.endFocus();
- });
- }),
- (this.startHover = () => {
- a().then((a) => {
- a && a.startHover();
- });
- }),
- (this.endHover = () => {
- a().then((a) => {
- a && a.endHover();
- });
- });
- }
- }
- var ac,
- bc = (a, b) =>
- "method" === b.kind && b.descriptor && !("value" in b.descriptor)
- ? l(
- l({}, b),
- {},
- {
- finisher(c) {
- c.createProperty(b.key, a);
- },
- }
- )
- : {
- kind: "field",
- key: Symbol(),
- placement: "own",
- descriptor: {},
- originalKey: b.key,
- initializer() {
- "function" == typeof b.initializer &&
- (this[b.key] = b.initializer.call(this));
- },
- finisher(c) {
- c.createProperty(b.key, a);
- },
- },
- cc = (a) => {
- var { finisher: b, descriptor: c } = a;
- return (a, d) => {
- var e;
- if (void 0 === d) {
- var f = null !== (e = a.originalKey) && void 0 !== e ? e : a.key,
- g =
- null == c
- ? l(l({}, a), {}, { key: f })
- : {
- kind: "method",
- placement: "prototype",
- key: f,
- descriptor: c(a.key),
- };
- return (
- null != b &&
- (g.finisher = function (a) {
- b(a, f);
- }),
- g
- );
- }
- {
- var h = a.constructor;
- void 0 !== c && Object.defineProperty(a, d, c(d)),
- null == b || b(h, d);
- }
- };
- },
- dc =
- null ==
- (null === (ac = window.HTMLSlotElement) || void 0 === ac
- ? void 0
- : ac.prototype.assignedElements)
- ? (a, b) =>
- a.assignedNodes(b).filter((a) => a.nodeType === Node.ELEMENT_NODE)
- : (a, b) => a.assignedElements(b),
- ec = {
- ATTRIBUTE: 1,
- CHILD: 2,
- PROPERTY: 3,
- BOOLEAN_ATTRIBUTE: 4,
- EVENT: 5,
- ELEMENT: 6,
- },
- fc = (a) =>
- function () {
- for (var b = arguments.length, c = Array(b), d = 0; d < b; d++)
- c[d] = arguments[d];
- return { _$litDirective$: a, values: c };
- };
- class gc {
- constructor() {}
- get _$AU() {
- return this._$AM._$AU;
- }
- _$AT(a, b, c) {
- (this._$Ct = a), (this._$AM = b), (this._$Ci = c);
- }
- _$AS(a, b) {
- return this.update(a, b);
- }
- update(a, b) {
- return this.render(...b);
- }
- }
- var hc = fc(
- class extends gc {
- constructor(a) {
- var b;
- if (
- (super(a),
- a.type !== ec.ATTRIBUTE ||
- "class" !== a.name ||
- 2 <
- (null === (b = a.strings) || void 0 === b ? void 0 : b.length))
- )
- throw Error(
- "`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."
- );
- }
- render(a) {
- return (
- " " +
- Object.keys(a)
- .filter((b) => a[b])
- .join(" ") +
- " "
- );
- }
- update(a, b) {
- var c,
- d,
- [f] = b;
- if (void 0 === this.et) {
- for (var e in ((this.et = new Set()),
- void 0 !== a.strings &&
- (this.st = new Set(
- a.strings
- .join(" ")
- .split(/\s/)
- .filter((a) => "" !== a)
- )),
- f))
- !f[e] ||
- (null !== (c = this.st) && void 0 !== c && c.has(e)) ||
- this.et.add(e);
- return this.render(f);
- }
- var g = a.element.classList;
- for (var h in (this.et.forEach((a) => {
- a in f || (g.remove(a), this.et.delete(a));
- }),
- f)) {
- var i = !!f[h];
- i === this.et.has(h) ||
- (null === (d = this.st) || void 0 === d ? void 0 : d.has(h)) ||
- (i
- ? (g.add(h), this.et.add(h))
- : (g.remove(h), this.et.delete(h)));
- }
- return $;
- }
- }
- );
- class ic extends Qb {
- constructor() {
- super(...arguments),
- (this.value = ""),
- (this.group = null),
- (this.tabindex = -1),
- (this.disabled = !1),
- (this.twoline = !1),
- (this.activated = !1),
- (this.graphic = null),
- (this.multipleGraphics = !1),
- (this.hasMeta = !1),
- (this.noninteractive = !1),
- (this.selected = !1),
- (this.shouldRenderRipple = !1),
- (this._managingList = null),
- (this.boundOnClick = this.onClick.bind(this)),
- (this._firstChanged = !0),
- (this._skipPropRequest = !1),
- (this.rippleHandlers = new $b(
- () => ((this.shouldRenderRipple = !0), this.ripple)
- )),
- (this.listeners = [
- {
- target: this,
- eventNames: ["click"],
- cb: () => {
- this.onClick();
- },
- },
- {
- target: this,
- eventNames: ["mouseenter"],
- cb: this.rippleHandlers.startHover,
- },
- {
- target: this,
- eventNames: ["mouseleave"],
- cb: this.rippleHandlers.endHover,
- },
- {
- target: this,
- eventNames: ["focus"],
- cb: this.rippleHandlers.startFocus,
- },
- {
- target: this,
- eventNames: ["blur"],
- cb: this.rippleHandlers.endFocus,
- },
- {
- target: this,
- eventNames: ["mousedown", "touchstart"],
- cb: (a) => {
- var b = a.type;
- this.onDown("mousedown" === b ? "mouseup" : "touchend", a);
- },
- },
- ]);
- }
- get text() {
- var a = this.textContent;
- return a ? a.trim() : "";
- }
- render() {
- var a = this.renderText(),
- b = this.graphic ? this.renderGraphic() : g(r || (r = j([""]))),
- c = this.hasMeta ? this.renderMeta() : g(s || (s = j([""])));
- return g(
- t || (t = j(["\n ", "\n ", "\n ", "\n ", ""])),
- this.renderRipple(),
- b,
- a,
- c
- );
- }
- renderRipple() {
- return this.shouldRenderRipple
- ? g(
- u ||
- (u = j([
- "\n
\n ",
- ])),
- this.activated
- )
- : this.activated
- ? g(v || (v = j(['
'])))
- : "";
- }
- renderGraphic() {
- var a = { multi: this.multipleGraphics };
- return g(
- w ||
- (w = j([
- '\n
\n \n ',
- ])),
- hc(a)
- );
- }
- renderMeta() {
- return g(
- x ||
- (x = j([
- '\n
\n \n ',
- ]))
- );
- }
- renderText() {
- var a = this.twoline ? this.renderTwoline() : this.renderSingleLine();
- return g(
- y ||
- (y = j([
- '\n
\n ',
- "\n ",
- ])),
- a
- );
- }
- renderSingleLine() {
- return g(z || (z = j(["
"])));
- }
- renderTwoline() {
- return g(
- A ||
- (A = j([
- '\n
\n \n \n
\n \n \n ',
- ]))
- );
- }
- onClick() {
- this.fireRequestSelected(!this.selected, "interaction");
- }
- onDown(a, b) {
- var c = () => {
- window.removeEventListener(a, c), this.rippleHandlers.endPress();
- };
- window.addEventListener(a, c), this.rippleHandlers.startPress(b);
- }
- fireRequestSelected(a, b) {
- if (!this.noninteractive) {
- var c = new CustomEvent("request-selected", {
- bubbles: !0,
- composed: !0,
- detail: { source: b, selected: a },
- });
- this.dispatchEvent(c);
- }
- }
- connectedCallback() {
- super.connectedCallback(),
- this.noninteractive || this.setAttribute("mwc-list-item", "");
- for (var a of this.listeners)
- for (var b of a.eventNames)
- a.target.addEventListener(b, a.cb, { passive: !0 });
- }
- disconnectedCallback() {
- super.disconnectedCallback();
- for (var a of this.listeners)
- for (var b of a.eventNames) a.target.removeEventListener(b, a.cb);
- this._managingList &&
- (this._managingList.debouncedLayout
- ? this._managingList.debouncedLayout(!0)
- : this._managingList.layout(!0));
- }
- firstUpdated() {
- var a = new Event("list-item-rendered", { bubbles: !0, composed: !0 });
- this.dispatchEvent(a);
- }
- }
- Na([Ra("slot")], ic.prototype, "slotElement", void 0),
- Na(
- [
- (function (a) {
- return cc({
- descriptor: () => ({
- get() {
- var b = this;
- return o(function* () {
- var c;
- return (
- yield b.updateComplete,
- null === (c = b.renderRoot) || void 0 === c
- ? void 0
- : c.querySelector(a)
- );
- })();
- },
- enumerable: !0,
- configurable: !0,
- }),
- });
- })("mwc-ripple"),
- ],
- ic.prototype,
- "ripple",
- void 0
- ),
- Na([Pa({ type: String })], ic.prototype, "value", void 0),
- Na([Pa({ type: String, reflect: !0 })], ic.prototype, "group", void 0),
- Na([Pa({ type: Number, reflect: !0 })], ic.prototype, "tabindex", void 0),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a) {
- a
- ? this.setAttribute("aria-disabled", "true")
- : this.setAttribute("aria-disabled", "false");
- }),
- ],
- ic.prototype,
- "disabled",
- void 0
- ),
- Na([Pa({ type: Boolean, reflect: !0 })], ic.prototype, "twoline", void 0),
- Na(
- [Pa({ type: Boolean, reflect: !0 })],
- ic.prototype,
- "activated",
- void 0
- ),
- Na([Pa({ type: String, reflect: !0 })], ic.prototype, "graphic", void 0),
- Na([Pa({ type: Boolean })], ic.prototype, "multipleGraphics", void 0),
- Na([Pa({ type: Boolean })], ic.prototype, "hasMeta", void 0),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a) {
- a
- ? (this.removeAttribute("aria-checked"),
- this.removeAttribute("mwc-list-item"),
- (this.selected = !1),
- (this.activated = !1),
- (this.tabIndex = -1))
- : this.setAttribute("mwc-list-item", "");
- }),
- ],
- ic.prototype,
- "noninteractive",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a) {
- var b = this.getAttribute("role"),
- c =
- "gridcell" === b ||
- "option" === b ||
- "row" === b ||
- "tab" === b;
- return (
- c && a
- ? this.setAttribute("aria-selected", "true")
- : c && this.setAttribute("aria-selected", "false"),
- this._firstChanged
- ? void (this._firstChanged = !1)
- : void (
- this._skipPropRequest ||
- this.fireRequestSelected(a, "property")
- )
- );
- }),
- ],
- ic.prototype,
- "selected",
- void 0
- ),
- Na([Qa()], ic.prototype, "shouldRenderRipple", void 0),
- Na([Qa()], ic.prototype, "_managingList", void 0);
- var jc = mb(
- B ||
- (B = j([
- ':host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}',
- ]))
- ),
- kc = (a) => a.nodeType === Node.ELEMENT_NODE,
- lc = () => {},
- mc = {
- get passive() {
- return !1;
- },
- };
- document.addEventListener("x", lc, mc),
- document.removeEventListener("x", lc);
- var nc = function () {
- var a =
- 0 < arguments.length && arguments[0] !== void 0
- ? arguments[0]
- : window.document,
- b = a.activeElement,
- c = [];
- if (!b) return c;
- for (; b && (c.push(b), b.shadowRoot); ) b = b.shadowRoot.activeElement;
- return c;
- },
- oc = (a) => {
- var b = nc();
- if (!b.length) return !1;
- var c = b[b.length - 1],
- d = new Event("check-if-focused", { bubbles: !0, composed: !0 }),
- e = [],
- f = (a) => {
- e = a.composedPath();
- };
- return (
- document.body.addEventListener("check-if-focused", f),
- c.dispatchEvent(d),
- document.body.removeEventListener("check-if-focused", f),
- -1 !== e.indexOf(a)
- );
- };
- class pc extends Qb {
- click() {
- return this.mdcRoot
- ? (this.mdcRoot.focus(), void this.mdcRoot.click())
- : void super.click();
- }
- createFoundation() {
- this.mdcFoundation !== void 0 && this.mdcFoundation.destroy(),
- this.mdcFoundationClass &&
- ((this.mdcFoundation = new this.mdcFoundationClass(
- this.createAdapter()
- )),
- this.mdcFoundation.init());
- }
- firstUpdated() {
- this.createFoundation();
- }
- }
- var qc = (function () {
- function a(a) {
- void 0 === a && (a = {}), (this.adapter = a);
- }
- return (
- Object.defineProperty(a, "cssClasses", {
- get: function () {
- return {};
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(a, "strings", {
- get: function () {
- return {};
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(a, "numbers", {
- get: function () {
- return {};
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(a, "defaultAdapter", {
- get: function () {
- return {};
- },
- enumerable: !1,
- configurable: !0,
- }),
- (a.prototype.init = function () {}),
- (a.prototype.destroy = function () {}),
- a
- );
- })(),
- rc = {
- BG_FOCUSED: "mdc-ripple-upgraded--background-focused",
- FG_ACTIVATION: "mdc-ripple-upgraded--foreground-activation",
- FG_DEACTIVATION: "mdc-ripple-upgraded--foreground-deactivation",
- ROOT: "mdc-ripple-upgraded",
- UNBOUNDED: "mdc-ripple-upgraded--unbounded",
- },
- sc = {
- VAR_FG_SCALE: "--mdc-ripple-fg-scale",
- VAR_FG_SIZE: "--mdc-ripple-fg-size",
- VAR_FG_TRANSLATE_END: "--mdc-ripple-fg-translate-end",
- VAR_FG_TRANSLATE_START: "--mdc-ripple-fg-translate-start",
- VAR_LEFT: "--mdc-ripple-left",
- VAR_TOP: "--mdc-ripple-top",
- },
- tc = {
- DEACTIVATION_TIMEOUT_MS: 225,
- FG_DEACTIVATION_MS: 150,
- INITIAL_ORIGIN_SCALE: 0.6,
- PADDING: 10,
- TAP_DELAY_MS: 300,
- },
- uc = ["touchstart", "pointerdown", "mousedown", "keydown"],
- vc = ["touchend", "pointerup", "mouseup", "contextmenu"],
- wc = [],
- xc = (function (a) {
- function b(c) {
- var d = a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- return (
- (d.activationAnimationHasEnded = !1),
- (d.activationTimer = 0),
- (d.fgDeactivationRemovalTimer = 0),
- (d.fgScale = "0"),
- (d.frame = { width: 0, height: 0 }),
- (d.initialSize = 0),
- (d.layoutFrame = 0),
- (d.maxRadius = 0),
- (d.unboundedCoords = { left: 0, top: 0 }),
- (d.activationState = d.defaultActivationState()),
- (d.activationTimerCallback = function () {
- (d.activationAnimationHasEnded = !0),
- d.runDeactivationUXLogicIfReady();
- }),
- (d.activateHandler = function (a) {
- d.activateImpl(a);
- }),
- (d.deactivateHandler = function () {
- d.deactivateImpl();
- }),
- (d.focusHandler = function () {
- d.handleFocus();
- }),
- (d.blurHandler = function () {
- d.handleBlur();
- }),
- (d.resizeHandler = function () {
- d.layout();
- }),
- d
- );
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return rc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "strings", {
- get: function () {
- return sc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "numbers", {
- get: function () {
- return tc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "defaultAdapter", {
- get: function () {
- return {
- addClass: function () {},
- browserSupportsCssVars: function () {
- return !0;
- },
- computeBoundingRect: function () {
- return {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0,
- width: 0,
- height: 0,
- };
- },
- containsEventTarget: function () {
- return !0;
- },
- deregisterDocumentInteractionHandler: function () {},
- deregisterInteractionHandler: function () {},
- deregisterResizeHandler: function () {},
- getWindowPageOffset: function () {
- return { x: 0, y: 0 };
- },
- isSurfaceActive: function () {
- return !0;
- },
- isSurfaceDisabled: function () {
- return !0;
- },
- isUnbounded: function () {
- return !0;
- },
- registerDocumentInteractionHandler: function () {},
- registerInteractionHandler: function () {},
- registerResizeHandler: function () {},
- removeClass: function () {},
- updateCssVariable: function () {},
- };
- },
- enumerable: !1,
- configurable: !0,
- }),
- (b.prototype.init = function () {
- var a = this,
- c = this.supportsPressRipple();
- if ((this.registerRootHandlers(c), c)) {
- var d = b.cssClasses,
- e = d.ROOT,
- f = d.UNBOUNDED;
- requestAnimationFrame(function () {
- a.adapter.addClass(e),
- a.adapter.isUnbounded() &&
- (a.adapter.addClass(f), a.layoutInternal());
- });
- }
- }),
- (b.prototype.destroy = function () {
- var a = this;
- if (this.supportsPressRipple()) {
- this.activationTimer &&
- (clearTimeout(this.activationTimer),
- (this.activationTimer = 0),
- this.adapter.removeClass(b.cssClasses.FG_ACTIVATION)),
- this.fgDeactivationRemovalTimer &&
- (clearTimeout(this.fgDeactivationRemovalTimer),
- (this.fgDeactivationRemovalTimer = 0),
- this.adapter.removeClass(b.cssClasses.FG_DEACTIVATION));
- var c = b.cssClasses,
- d = c.ROOT,
- e = c.UNBOUNDED;
- requestAnimationFrame(function () {
- a.adapter.removeClass(d),
- a.adapter.removeClass(e),
- a.removeCssVars();
- });
- }
- this.deregisterRootHandlers(),
- this.deregisterDeactivationHandlers();
- }),
- (b.prototype.activate = function (a) {
- this.activateImpl(a);
- }),
- (b.prototype.deactivate = function () {
- this.deactivateImpl();
- }),
- (b.prototype.layout = function () {
- var a = this;
- this.layoutFrame && cancelAnimationFrame(this.layoutFrame),
- (this.layoutFrame = requestAnimationFrame(function () {
- a.layoutInternal(), (a.layoutFrame = 0);
- }));
- }),
- (b.prototype.setUnbounded = function (a) {
- var c = b.cssClasses.UNBOUNDED;
- a ? this.adapter.addClass(c) : this.adapter.removeClass(c);
- }),
- (b.prototype.handleFocus = function () {
- var a = this;
- requestAnimationFrame(function () {
- return a.adapter.addClass(b.cssClasses.BG_FOCUSED);
- });
- }),
- (b.prototype.handleBlur = function () {
- var a = this;
- requestAnimationFrame(function () {
- return a.adapter.removeClass(b.cssClasses.BG_FOCUSED);
- });
- }),
- (b.prototype.supportsPressRipple = function () {
- return this.adapter.browserSupportsCssVars();
- }),
- (b.prototype.defaultActivationState = function () {
- return {
- activationEvent: void 0,
- hasDeactivationUXRun: !1,
- isActivated: !1,
- isProgrammatic: !1,
- wasActivatedByPointer: !1,
- wasElementMadeActive: !1,
- };
- }),
- (b.prototype.registerRootHandlers = function (a) {
- var b, c;
- if (a) {
- try {
- for (var d, e = Oa(uc), f = e.next(); !f.done; f = e.next())
- (d = f.value),
- this.adapter.registerInteractionHandler(
- d,
- this.activateHandler
- );
- } catch (a) {
- b = { error: a };
- } finally {
- try {
- f && !f.done && (c = e.return) && c.call(e);
- } finally {
- if (b) throw b.error;
- }
- }
- this.adapter.isUnbounded() &&
- this.adapter.registerResizeHandler(this.resizeHandler);
- }
- this.adapter.registerInteractionHandler("focus", this.focusHandler),
- this.adapter.registerInteractionHandler("blur", this.blurHandler);
- }),
- (b.prototype.registerDeactivationHandlers = function (a) {
- var b, c;
- if ("keydown" === a.type)
- this.adapter.registerInteractionHandler(
- "keyup",
- this.deactivateHandler
- );
- else
- try {
- for (var d, e = Oa(vc), f = e.next(); !f.done; f = e.next())
- (d = f.value),
- this.adapter.registerDocumentInteractionHandler(
- d,
- this.deactivateHandler
- );
- } catch (a) {
- b = { error: a };
- } finally {
- try {
- f && !f.done && (c = e.return) && c.call(e);
- } finally {
- if (b) throw b.error;
- }
- }
- }),
- (b.prototype.deregisterRootHandlers = function () {
- var a, b;
- try {
- for (var c, d = Oa(uc), e = d.next(); !e.done; e = d.next())
- (c = e.value),
- this.adapter.deregisterInteractionHandler(
- c,
- this.activateHandler
- );
- } catch (b) {
- a = { error: b };
- } finally {
- try {
- e && !e.done && (b = d.return) && b.call(d);
- } finally {
- if (a) throw a.error;
- }
- }
- this.adapter.deregisterInteractionHandler(
- "focus",
- this.focusHandler
- ),
- this.adapter.deregisterInteractionHandler(
- "blur",
- this.blurHandler
- ),
- this.adapter.isUnbounded() &&
- this.adapter.deregisterResizeHandler(this.resizeHandler);
- }),
- (b.prototype.deregisterDeactivationHandlers = function () {
- var a, b;
- this.adapter.deregisterInteractionHandler(
- "keyup",
- this.deactivateHandler
- );
- try {
- for (var c, d = Oa(vc), e = d.next(); !e.done; e = d.next())
- (c = e.value),
- this.adapter.deregisterDocumentInteractionHandler(
- c,
- this.deactivateHandler
- );
- } catch (b) {
- a = { error: b };
- } finally {
- try {
- e && !e.done && (b = d.return) && b.call(d);
- } finally {
- if (a) throw a.error;
- }
- }
- }),
- (b.prototype.removeCssVars = function () {
- var a = this,
- c = b.strings,
- d = Object.keys(c);
- d.forEach(function (b) {
- 0 === b.indexOf("VAR_") &&
- a.adapter.updateCssVariable(c[b], null);
- });
- }),
- (b.prototype.activateImpl = function (a) {
- var b = this;
- if (!this.adapter.isSurfaceDisabled()) {
- var c = this.activationState;
- if (!c.isActivated) {
- var d = this.previousActivationEvent,
- e = d && void 0 !== a && d.type !== a.type;
- if (!e) {
- (c.isActivated = !0),
- (c.isProgrammatic = void 0 === a),
- (c.activationEvent = a),
- (c.wasActivatedByPointer =
- !c.isProgrammatic &&
- void 0 !== a &&
- ("mousedown" === a.type ||
- "touchstart" === a.type ||
- "pointerdown" === a.type));
- var f =
- void 0 !== a &&
- 0 < wc.length &&
- wc.some(function (a) {
- return b.adapter.containsEventTarget(a);
- });
- return f
- ? void this.resetActivationState()
- : void (void 0 !== a &&
- (wc.push(a.target),
- this.registerDeactivationHandlers(a)),
- (c.wasElementMadeActive = this.checkElementMadeActive(a)),
- c.wasElementMadeActive && this.animateActivation(),
- requestAnimationFrame(function () {
- (wc = []),
- c.wasElementMadeActive ||
- void 0 === a ||
- (" " !== a.key && 32 !== a.keyCode) ||
- ((c.wasElementMadeActive =
- b.checkElementMadeActive(a)),
- c.wasElementMadeActive && b.animateActivation()),
- c.wasElementMadeActive ||
- (b.activationState = b.defaultActivationState());
- }));
- }
- }
- }
- }),
- (b.prototype.checkElementMadeActive = function (a) {
- return (
- void 0 === a ||
- "keydown" !== a.type ||
- this.adapter.isSurfaceActive()
- );
- }),
- (b.prototype.animateActivation = function () {
- var a = this,
- c = b.strings,
- d = c.VAR_FG_TRANSLATE_START,
- e = c.VAR_FG_TRANSLATE_END,
- f = b.cssClasses,
- g = f.FG_DEACTIVATION,
- h = f.FG_ACTIVATION,
- i = b.numbers.DEACTIVATION_TIMEOUT_MS;
- this.layoutInternal();
- var j = "",
- k = "";
- if (!this.adapter.isUnbounded()) {
- var l = this.getFgTranslationCoordinates(),
- m = l.startPoint,
- n = l.endPoint;
- (j = m.x + "px, " + m.y + "px"), (k = n.x + "px, " + n.y + "px");
- }
- this.adapter.updateCssVariable(d, j),
- this.adapter.updateCssVariable(e, k),
- clearTimeout(this.activationTimer),
- clearTimeout(this.fgDeactivationRemovalTimer),
- this.rmBoundedActivationClasses(),
- this.adapter.removeClass(g),
- this.adapter.computeBoundingRect(),
- this.adapter.addClass(h),
- (this.activationTimer = setTimeout(function () {
- a.activationTimerCallback();
- }, i));
- }),
- (b.prototype.getFgTranslationCoordinates = function () {
- var a,
- b = this.activationState,
- c = b.activationEvent,
- d = b.wasActivatedByPointer;
- (a = d
- ? Wa(
- c,
- this.adapter.getWindowPageOffset(),
- this.adapter.computeBoundingRect()
- )
- : { x: this.frame.width / 2, y: this.frame.height / 2 }),
- (a = {
- x: a.x - this.initialSize / 2,
- y: a.y - this.initialSize / 2,
- });
- var e = {
- x: this.frame.width / 2 - this.initialSize / 2,
- y: this.frame.height / 2 - this.initialSize / 2,
- };
- return { startPoint: a, endPoint: e };
- }),
- (b.prototype.runDeactivationUXLogicIfReady = function () {
- var a = this,
- c = b.cssClasses.FG_DEACTIVATION,
- d = this.activationState,
- e = d.hasDeactivationUXRun,
- f = d.isActivated;
- (e || !f) &&
- this.activationAnimationHasEnded &&
- (this.rmBoundedActivationClasses(),
- this.adapter.addClass(c),
- (this.fgDeactivationRemovalTimer = setTimeout(function () {
- a.adapter.removeClass(c);
- }, tc.FG_DEACTIVATION_MS)));
- }),
- (b.prototype.rmBoundedActivationClasses = function () {
- var a = b.cssClasses.FG_ACTIVATION;
- this.adapter.removeClass(a),
- (this.activationAnimationHasEnded = !1),
- this.adapter.computeBoundingRect();
- }),
- (b.prototype.resetActivationState = function () {
- var a = this;
- (this.previousActivationEvent =
- this.activationState.activationEvent),
- (this.activationState = this.defaultActivationState()),
- setTimeout(function () {
- return (a.previousActivationEvent = void 0);
- }, b.numbers.TAP_DELAY_MS);
- }),
- (b.prototype.deactivateImpl = function () {
- var a = this,
- b = this.activationState;
- if (b.isActivated) {
- var c = Yb({}, b);
- b.isProgrammatic
- ? (requestAnimationFrame(function () {
- a.animateDeactivation(c);
- }),
- this.resetActivationState())
- : (this.deregisterDeactivationHandlers(),
- requestAnimationFrame(function () {
- (a.activationState.hasDeactivationUXRun = !0),
- a.animateDeactivation(c),
- a.resetActivationState();
- }));
- }
- }),
- (b.prototype.animateDeactivation = function (a) {
- var b = a.wasActivatedByPointer,
- c = a.wasElementMadeActive;
- (b || c) && this.runDeactivationUXLogicIfReady();
- }),
- (b.prototype.layoutInternal = function () {
- var a = Math.floor,
- c = Math.max,
- d = this;
- this.frame = this.adapter.computeBoundingRect();
- var e = c(this.frame.height, this.frame.width);
- this.maxRadius = this.adapter.isUnbounded()
- ? e
- : (function getBoundedRadius() {
- var a = Math.sqrt,
- c = Math.pow,
- e = a(c(d.frame.width, 2) + c(d.frame.height, 2));
- return e + b.numbers.PADDING;
- })();
- var f = a(e * b.numbers.INITIAL_ORIGIN_SCALE);
- (this.initialSize =
- this.adapter.isUnbounded() && 0 != f % 2 ? f - 1 : f),
- (this.fgScale = "" + this.maxRadius / this.initialSize),
- this.updateLayoutCssVars();
- }),
- (b.prototype.updateLayoutCssVars = function () {
- var a = Math.round,
- c = b.strings,
- d = c.VAR_FG_SIZE,
- e = c.VAR_LEFT,
- f = c.VAR_TOP,
- g = c.VAR_FG_SCALE;
- this.adapter.updateCssVariable(d, this.initialSize + "px"),
- this.adapter.updateCssVariable(g, this.fgScale),
- this.adapter.isUnbounded() &&
- ((this.unboundedCoords = {
- left: a(this.frame.width / 2 - this.initialSize / 2),
- top: a(this.frame.height / 2 - this.initialSize / 2),
- }),
- this.adapter.updateCssVariable(
- e,
- this.unboundedCoords.left + "px"
- ),
- this.adapter.updateCssVariable(
- f,
- this.unboundedCoords.top + "px"
- ));
- }),
- b
- );
- })(qc),
- yc = fc(
- class extends gc {
- constructor(a) {
- var b;
- if (
- (super(a),
- a.type !== ec.ATTRIBUTE ||
- "style" !== a.name ||
- 2 <
- (null === (b = a.strings) || void 0 === b
- ? void 0
- : b.length))
- )
- throw Error(
- "The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute."
- );
- }
- render(a) {
- return Object.keys(a).reduce((b, c) => {
- var d = a[c];
- return null == d
- ? b
- : b +
- ""
- .concat(
- (c = c
- .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&")
- .toLowerCase()),
- ":"
- )
- .concat(d, ";");
- }, "");
- }
- update(a, b) {
- var [c] = b,
- { style: d } = a.element;
- if (void 0 === this.ct) {
- for (var e in ((this.ct = new Set()), c)) this.ct.add(e);
- return this.render(c);
- }
- for (var f in (this.ct.forEach((a) => {
- null == c[a] &&
- (this.ct.delete(a),
- a.includes("-") ? d.removeProperty(a) : (d[a] = ""));
- }),
- c)) {
- var g = c[f];
- null != g &&
- (this.ct.add(f),
- f.includes("-") ? d.setProperty(f, g) : (d[f] = g));
- }
- return $;
- }
- }
- );
- class zc extends pc {
- constructor() {
- super(...arguments),
- (this.primary = !1),
- (this.accent = !1),
- (this.unbounded = !1),
- (this.disabled = !1),
- (this.activated = !1),
- (this.selected = !1),
- (this.internalUseStateLayerCustomProperties = !1),
- (this.hovering = !1),
- (this.bgFocused = !1),
- (this.fgActivation = !1),
- (this.fgDeactivation = !1),
- (this.fgScale = ""),
- (this.fgSize = ""),
- (this.translateStart = ""),
- (this.translateEnd = ""),
- (this.leftPos = ""),
- (this.topPos = ""),
- (this.mdcFoundationClass = xc);
- }
- get isActive() {
- return Ua(this.parentElement || this, ":active");
- }
- createAdapter() {
- return {
- browserSupportsCssVars: () => !0,
- isUnbounded: () => this.unbounded,
- isSurfaceActive: () => this.isActive,
- isSurfaceDisabled: () => this.disabled,
- addClass: (a) => {
- switch (a) {
- case "mdc-ripple-upgraded--background-focused":
- this.bgFocused = !0;
- break;
- case "mdc-ripple-upgraded--foreground-activation":
- this.fgActivation = !0;
- break;
- case "mdc-ripple-upgraded--foreground-deactivation":
- this.fgDeactivation = !0;
- break;
- default:
- }
- },
- removeClass: (a) => {
- switch (a) {
- case "mdc-ripple-upgraded--background-focused":
- this.bgFocused = !1;
- break;
- case "mdc-ripple-upgraded--foreground-activation":
- this.fgActivation = !1;
- break;
- case "mdc-ripple-upgraded--foreground-deactivation":
- this.fgDeactivation = !1;
- break;
- default:
- }
- },
- containsEventTarget: () => !0,
- registerInteractionHandler: () => void 0,
- deregisterInteractionHandler: () => void 0,
- registerDocumentInteractionHandler: () => void 0,
- deregisterDocumentInteractionHandler: () => void 0,
- registerResizeHandler: () => void 0,
- deregisterResizeHandler: () => void 0,
- updateCssVariable: (a, b) => {
- switch (a) {
- case "--mdc-ripple-fg-scale":
- this.fgScale = b;
- break;
- case "--mdc-ripple-fg-size":
- this.fgSize = b;
- break;
- case "--mdc-ripple-fg-translate-end":
- this.translateEnd = b;
- break;
- case "--mdc-ripple-fg-translate-start":
- this.translateStart = b;
- break;
- case "--mdc-ripple-left":
- this.leftPos = b;
- break;
- case "--mdc-ripple-top":
- this.topPos = b;
- break;
- default:
- }
- },
- computeBoundingRect: () =>
- (this.parentElement || this).getBoundingClientRect(),
- getWindowPageOffset: () => ({
- x: window.pageXOffset,
- y: window.pageYOffset,
- }),
- };
- }
- startPress(a) {
- this.waitForFoundation(() => {
- this.mdcFoundation.activate(a);
- });
- }
- endPress() {
- this.waitForFoundation(() => {
- this.mdcFoundation.deactivate();
- });
- }
- startFocus() {
- this.waitForFoundation(() => {
- this.mdcFoundation.handleFocus();
- });
- }
- endFocus() {
- this.waitForFoundation(() => {
- this.mdcFoundation.handleBlur();
- });
- }
- startHover() {
- this.hovering = !0;
- }
- endHover() {
- this.hovering = !1;
- }
- waitForFoundation(a) {
- this.mdcFoundation ? a() : this.updateComplete.then(a);
- }
- update(a) {
- a.has("disabled") && this.disabled && this.endHover(), super.update(a);
- }
- render() {
- var a = this.activated && (this.primary || !this.accent),
- b = this.selected && (this.primary || !this.accent),
- c = {
- "mdc-ripple-surface--accent": this.accent,
- "mdc-ripple-surface--primary--activated": a,
- "mdc-ripple-surface--accent--activated":
- this.accent && this.activated,
- "mdc-ripple-surface--primary--selected": b,
- "mdc-ripple-surface--accent--selected":
- this.accent && this.selected,
- "mdc-ripple-surface--disabled": this.disabled,
- "mdc-ripple-surface--hover": this.hovering,
- "mdc-ripple-surface--primary": this.primary,
- "mdc-ripple-surface--selected": this.selected,
- "mdc-ripple-upgraded--background-focused": this.bgFocused,
- "mdc-ripple-upgraded--foreground-activation": this.fgActivation,
- "mdc-ripple-upgraded--foreground-deactivation": this.fgDeactivation,
- "mdc-ripple-upgraded--unbounded": this.unbounded,
- "mdc-ripple-surface--internal-use-state-layer-custom-properties":
- this.internalUseStateLayerCustomProperties,
- };
- return g(
- C ||
- (C = j([
- '\n
',
- ])),
- hc(c),
- yc({
- "--mdc-ripple-fg-scale": this.fgScale,
- "--mdc-ripple-fg-size": this.fgSize,
- "--mdc-ripple-fg-translate-end": this.translateEnd,
- "--mdc-ripple-fg-translate-start": this.translateStart,
- "--mdc-ripple-left": this.leftPos,
- "--mdc-ripple-top": this.topPos,
- })
- );
- }
- }
- Na([Ra(".mdc-ripple-surface")], zc.prototype, "mdcRoot", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "primary", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "accent", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "unbounded", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "disabled", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "activated", void 0),
- Na([Pa({ type: Boolean })], zc.prototype, "selected", void 0),
- Na(
- [Pa({ type: Boolean })],
- zc.prototype,
- "internalUseStateLayerCustomProperties",
- void 0
- ),
- Na([Qa()], zc.prototype, "hovering", void 0),
- Na([Qa()], zc.prototype, "bgFocused", void 0),
- Na([Qa()], zc.prototype, "fgActivation", void 0),
- Na([Qa()], zc.prototype, "fgDeactivation", void 0),
- Na([Qa()], zc.prototype, "fgScale", void 0),
- Na([Qa()], zc.prototype, "fgSize", void 0),
- Na([Qa()], zc.prototype, "translateStart", void 0),
- Na([Qa()], zc.prototype, "translateEnd", void 0),
- Na([Qa()], zc.prototype, "leftPos", void 0),
- Na([Qa()], zc.prototype, "topPos", void 0);
- var Ac = mb(
- D ||
- (D = j([
- '.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}',
- ]))
- );
- class Bc extends La(zc) {
- static get defineId() {
- return "mwc-ripple";
- }
- static get elementDefinitions() {
- return Vb([], Bc);
- }
- static get styles() {
- return Ac;
- }
- }
- class Cc extends La(ic) {
- static get defineId() {
- return "mwc-list-item";
- }
- static get elementDefinitions() {
- return Vb([Bc], Cc);
- }
- static get styles() {
- return jc;
- }
- }
- var Dc = {
- UNKNOWN: "Unknown",
- BACKSPACE: "Backspace",
- ENTER: "Enter",
- SPACEBAR: "Spacebar",
- PAGE_UP: "PageUp",
- PAGE_DOWN: "PageDown",
- END: "End",
- HOME: "Home",
- ARROW_LEFT: "ArrowLeft",
- ARROW_UP: "ArrowUp",
- ARROW_RIGHT: "ArrowRight",
- ARROW_DOWN: "ArrowDown",
- DELETE: "Delete",
- ESCAPE: "Escape",
- TAB: "Tab",
- },
- Ec = new Set();
- Ec.add(Dc.BACKSPACE),
- Ec.add(Dc.ENTER),
- Ec.add(Dc.SPACEBAR),
- Ec.add(Dc.PAGE_UP),
- Ec.add(Dc.PAGE_DOWN),
- Ec.add(Dc.END),
- Ec.add(Dc.HOME),
- Ec.add(Dc.ARROW_LEFT),
- Ec.add(Dc.ARROW_UP),
- Ec.add(Dc.ARROW_RIGHT),
- Ec.add(Dc.ARROW_DOWN),
- Ec.add(Dc.DELETE),
- Ec.add(Dc.ESCAPE),
- Ec.add(Dc.TAB);
- var Fc = {
- BACKSPACE: 8,
- ENTER: 13,
- SPACEBAR: 32,
- PAGE_UP: 33,
- PAGE_DOWN: 34,
- END: 35,
- HOME: 36,
- ARROW_LEFT: 37,
- ARROW_UP: 38,
- ARROW_RIGHT: 39,
- ARROW_DOWN: 40,
- DELETE: 46,
- ESCAPE: 27,
- TAB: 9,
- },
- Gc = new Map();
- Gc.set(Fc.BACKSPACE, Dc.BACKSPACE),
- Gc.set(Fc.ENTER, Dc.ENTER),
- Gc.set(Fc.SPACEBAR, Dc.SPACEBAR),
- Gc.set(Fc.PAGE_UP, Dc.PAGE_UP),
- Gc.set(Fc.PAGE_DOWN, Dc.PAGE_DOWN),
- Gc.set(Fc.END, Dc.END),
- Gc.set(Fc.HOME, Dc.HOME),
- Gc.set(Fc.ARROW_LEFT, Dc.ARROW_LEFT),
- Gc.set(Fc.ARROW_UP, Dc.ARROW_UP),
- Gc.set(Fc.ARROW_RIGHT, Dc.ARROW_RIGHT),
- Gc.set(Fc.ARROW_DOWN, Dc.ARROW_DOWN),
- Gc.set(Fc.DELETE, Dc.DELETE),
- Gc.set(Fc.ESCAPE, Dc.ESCAPE),
- Gc.set(Fc.TAB, Dc.TAB);
- var Hc,
- Ic,
- Jc,
- Kc,
- Lc = new Set([
- Dc.PAGE_UP,
- Dc.PAGE_DOWN,
- Dc.END,
- Dc.HOME,
- Dc.ARROW_LEFT,
- Dc.ARROW_UP,
- Dc.ARROW_RIGHT,
- Dc.ARROW_DOWN,
- ]),
- Mc = {
- LIST_ITEM_ACTIVATED_CLASS: "mdc-list-item--activated",
- LIST_ITEM_CLASS: "mdc-list-item",
- LIST_ITEM_DISABLED_CLASS: "mdc-list-item--disabled",
- LIST_ITEM_SELECTED_CLASS: "mdc-list-item--selected",
- LIST_ITEM_TEXT_CLASS: "mdc-list-item__text",
- LIST_ITEM_PRIMARY_TEXT_CLASS: "mdc-list-item__primary-text",
- ROOT: "mdc-list",
- },
- Nc =
- ((Hc = {}),
- (Hc["" + Mc.LIST_ITEM_ACTIVATED_CLASS] = "mdc-list-item--activated"),
- (Hc["" + Mc.LIST_ITEM_CLASS] = "mdc-list-item"),
- (Hc["" + Mc.LIST_ITEM_DISABLED_CLASS] = "mdc-list-item--disabled"),
- (Hc["" + Mc.LIST_ITEM_SELECTED_CLASS] = "mdc-list-item--selected"),
- (Hc["" + Mc.LIST_ITEM_PRIMARY_TEXT_CLASS] =
- "mdc-list-item__primary-text"),
- (Hc["" + Mc.ROOT] = "mdc-list"),
- Hc),
- Oc =
- ((Ic = {}),
- (Ic["" + Mc.LIST_ITEM_ACTIVATED_CLASS] =
- "mdc-deprecated-list-item--activated"),
- (Ic["" + Mc.LIST_ITEM_CLASS] = "mdc-deprecated-list-item"),
- (Ic["" + Mc.LIST_ITEM_DISABLED_CLASS] =
- "mdc-deprecated-list-item--disabled"),
- (Ic["" + Mc.LIST_ITEM_SELECTED_CLASS] =
- "mdc-deprecated-list-item--selected"),
- (Ic["" + Mc.LIST_ITEM_TEXT_CLASS] = "mdc-deprecated-list-item__text"),
- (Ic["" + Mc.LIST_ITEM_PRIMARY_TEXT_CLASS] =
- "mdc-deprecated-list-item__primary-text"),
- (Ic["" + Mc.ROOT] = "mdc-deprecated-list"),
- Ic),
- Pc = {
- ACTION_EVENT: "MDCList:action",
- ARIA_CHECKED: "aria-checked",
- ARIA_CHECKED_CHECKBOX_SELECTOR:
- '[role="checkbox"][aria-checked="true"]',
- ARIA_CHECKED_RADIO_SELECTOR: '[role="radio"][aria-checked="true"]',
- ARIA_CURRENT: "aria-current",
- ARIA_DISABLED: "aria-disabled",
- ARIA_ORIENTATION: "aria-orientation",
- ARIA_ORIENTATION_HORIZONTAL: "horizontal",
- ARIA_ROLE_CHECKBOX_SELECTOR: '[role="checkbox"]',
- ARIA_SELECTED: "aria-selected",
- ARIA_INTERACTIVE_ROLES_SELECTOR: '[role="listbox"], [role="menu"]',
- ARIA_MULTI_SELECTABLE_SELECTOR: '[aria-multiselectable="true"]',
- CHECKBOX_RADIO_SELECTOR: 'input[type="checkbox"], input[type="radio"]',
- CHECKBOX_SELECTOR: 'input[type="checkbox"]',
- CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:
- "\n ." +
- Mc.LIST_ITEM_CLASS +
- " button:not(:disabled),\n ." +
- Mc.LIST_ITEM_CLASS +
- " a,\n ." +
- Oc[Mc.LIST_ITEM_CLASS] +
- " button:not(:disabled),\n ." +
- Oc[Mc.LIST_ITEM_CLASS] +
- " a\n ",
- DEPRECATED_SELECTOR: ".mdc-deprecated-list",
- FOCUSABLE_CHILD_ELEMENTS:
- "\n ." +
- Mc.LIST_ITEM_CLASS +
- " button:not(:disabled),\n ." +
- Mc.LIST_ITEM_CLASS +
- " a,\n ." +
- Mc.LIST_ITEM_CLASS +
- ' input[type="radio"]:not(:disabled),\n .' +
- Mc.LIST_ITEM_CLASS +
- ' input[type="checkbox"]:not(:disabled),\n .' +
- Oc[Mc.LIST_ITEM_CLASS] +
- " button:not(:disabled),\n ." +
- Oc[Mc.LIST_ITEM_CLASS] +
- " a,\n ." +
- Oc[Mc.LIST_ITEM_CLASS] +
- ' input[type="radio"]:not(:disabled),\n .' +
- Oc[Mc.LIST_ITEM_CLASS] +
- ' input[type="checkbox"]:not(:disabled)\n ',
- RADIO_SELECTOR: 'input[type="radio"]',
- SELECTED_ITEM_SELECTOR: '[aria-selected="true"], [aria-current="true"]',
- },
- Qc = { UNSET_INDEX: -1, TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300 },
- Rc = ["input", "button", "textarea", "select"],
- Sc = function (a) {
- var b = a.target;
- if (b) {
- var c = ("" + b.tagName).toLowerCase();
- -1 === Rc.indexOf(c) && a.preventDefault();
- }
- },
- Tc =
- !(
- null ===
- (Kc =
- null === (Jc = window.ShadyDOM) || void 0 === Jc
- ? void 0
- : Jc.inUse) || void 0 === Kc
- ) && Kc;
- class Uc extends pc {
- constructor() {
- super(...arguments),
- (this.disabled = !1),
- (this.containingForm = null),
- (this.formDataListener = (a) => {
- this.disabled || this.setFormData(a.formData);
- });
- }
- findFormElement() {
- if (!this.shadowRoot || Tc) return null;
- var a = this.getRootNode(),
- b = a.querySelectorAll("form");
- for (var c of Array.from(b)) if (c.contains(this)) return c;
- return null;
- }
- connectedCallback() {
- var a;
- super.connectedCallback(),
- (this.containingForm = this.findFormElement()),
- null === (a = this.containingForm) || void 0 === a
- ? void 0
- : a.addEventListener("formdata", this.formDataListener);
- }
- disconnectedCallback() {
- var a;
- super.disconnectedCallback(),
- null === (a = this.containingForm) || void 0 === a
- ? void 0
- : a.removeEventListener("formdata", this.formDataListener),
- (this.containingForm = null);
- }
- click() {
- this.formElement &&
- !this.disabled &&
- (this.formElement.focus(), this.formElement.click());
- }
- firstUpdated() {
- super.firstUpdated(),
- this.shadowRoot &&
- this.mdcRoot.addEventListener("change", (a) => {
- this.dispatchEvent(new Event("change", a));
- });
- }
- }
- (Uc.shadowRootOptions = { mode: "open", delegatesFocus: !0 }),
- Na([Pa({ type: Boolean })], Uc.prototype, "disabled", void 0);
- var Vc = {
- LABEL_FLOAT_ABOVE: "mdc-floating-label--float-above",
- LABEL_REQUIRED: "mdc-floating-label--required",
- LABEL_SHAKE: "mdc-floating-label--shake",
- ROOT: "mdc-floating-label",
- },
- Wc = (function (a) {
- function b(c) {
- var d = a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- return (
- (d.shakeAnimationEndHandler = function () {
- d.handleShakeAnimationEnd();
- }),
- d
- );
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return Vc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "defaultAdapter", {
- get: function () {
- return {
- addClass: function () {},
- removeClass: function () {},
- getWidth: function () {
- return 0;
- },
- registerInteractionHandler: function () {},
- deregisterInteractionHandler: function () {},
- };
- },
- enumerable: !1,
- configurable: !0,
- }),
- (b.prototype.init = function () {
- this.adapter.registerInteractionHandler(
- "animationend",
- this.shakeAnimationEndHandler
- );
- }),
- (b.prototype.destroy = function () {
- this.adapter.deregisterInteractionHandler(
- "animationend",
- this.shakeAnimationEndHandler
- );
- }),
- (b.prototype.getWidth = function () {
- return this.adapter.getWidth();
- }),
- (b.prototype.shake = function (a) {
- var c = b.cssClasses.LABEL_SHAKE;
- a ? this.adapter.addClass(c) : this.adapter.removeClass(c);
- }),
- (b.prototype.float = function (a) {
- var c = b.cssClasses,
- d = c.LABEL_FLOAT_ABOVE,
- e = c.LABEL_SHAKE;
- a
- ? this.adapter.addClass(d)
- : (this.adapter.removeClass(d), this.adapter.removeClass(e));
- }),
- (b.prototype.setRequired = function (a) {
- var c = b.cssClasses.LABEL_REQUIRED;
- a ? this.adapter.addClass(c) : this.adapter.removeClass(c);
- }),
- (b.prototype.handleShakeAnimationEnd = function () {
- var a = b.cssClasses.LABEL_SHAKE;
- this.adapter.removeClass(a);
- }),
- b
- );
- })(qc),
- Xc = (a) => ({
- addClass: (b) => a.classList.add(b),
- removeClass: (b) => a.classList.remove(b),
- getWidth: () => a.scrollWidth,
- registerInteractionHandler: (b, c) => {
- a.addEventListener(b, c);
- },
- deregisterInteractionHandler: (b, c) => {
- a.removeEventListener(b, c);
- },
- });
- var Yc = fc(
- class extends gc {
- constructor(a) {
- switch (
- (super(a),
- (this.foundation = null),
- (this.previousPart = null),
- a.type)
- ) {
- case ec.ATTRIBUTE:
- case ec.PROPERTY:
- break;
- default:
- throw new Error(
- "FloatingLabel directive only support attribute and property parts"
- );
- }
- }
- update(a, b) {
- var [c] = b;
- if (a !== this.previousPart) {
- this.foundation && this.foundation.destroy(),
- (this.previousPart = a);
- var d = a.element;
- d.classList.add("mdc-floating-label");
- var e = Xc(d);
- (this.foundation = new Wc(e)), this.foundation.init();
- }
- return this.render(c);
- }
- render() {
- return this.foundation;
- }
- }
- ),
- Zc = {
- LINE_RIPPLE_ACTIVE: "mdc-line-ripple--active",
- LINE_RIPPLE_DEACTIVATING: "mdc-line-ripple--deactivating",
- },
- $c = (function (a) {
- function b(c) {
- var d = a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- return (
- (d.transitionEndHandler = function (a) {
- d.handleTransitionEnd(a);
- }),
- d
- );
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return Zc;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "defaultAdapter", {
- get: function () {
- return {
- addClass: function () {},
- removeClass: function () {},
- hasClass: function () {
- return !1;
- },
- setStyle: function () {},
- registerEventHandler: function () {},
- deregisterEventHandler: function () {},
- };
- },
- enumerable: !1,
- configurable: !0,
- }),
- (b.prototype.init = function () {
- this.adapter.registerEventHandler(
- "transitionend",
- this.transitionEndHandler
- );
- }),
- (b.prototype.destroy = function () {
- this.adapter.deregisterEventHandler(
- "transitionend",
- this.transitionEndHandler
- );
- }),
- (b.prototype.activate = function () {
- this.adapter.removeClass(Zc.LINE_RIPPLE_DEACTIVATING),
- this.adapter.addClass(Zc.LINE_RIPPLE_ACTIVE);
- }),
- (b.prototype.setRippleCenter = function (a) {
- this.adapter.setStyle("transform-origin", a + "px center");
- }),
- (b.prototype.deactivate = function () {
- this.adapter.addClass(Zc.LINE_RIPPLE_DEACTIVATING);
- }),
- (b.prototype.handleTransitionEnd = function (a) {
- var b = this.adapter.hasClass(Zc.LINE_RIPPLE_DEACTIVATING);
- "opacity" === a.propertyName &&
- b &&
- (this.adapter.removeClass(Zc.LINE_RIPPLE_ACTIVE),
- this.adapter.removeClass(Zc.LINE_RIPPLE_DEACTIVATING));
- }),
- b
- );
- })(qc),
- _c = (a) => ({
- addClass: (b) => a.classList.add(b),
- removeClass: (b) => a.classList.remove(b),
- hasClass: (b) => a.classList.contains(b),
- setStyle: (b, c) => a.style.setProperty(b, c),
- registerEventHandler: (b, c) => {
- a.addEventListener(b, c);
- },
- deregisterEventHandler: (b, c) => {
- a.removeEventListener(b, c);
- },
- });
- var ad,
- bd = fc(
- class extends gc {
- constructor(a) {
- switch (
- (super(a),
- (this.previousPart = null),
- (this.foundation = null),
- a.type)
- ) {
- case ec.ATTRIBUTE:
- case ec.PROPERTY:
- return;
- default:
- throw new Error(
- "LineRipple only support attribute and property parts."
- );
- }
- }
- update(a) {
- if (this.previousPart !== a) {
- this.foundation && this.foundation.destroy(),
- (this.previousPart = a);
- var b = a.element;
- b.classList.add("mdc-line-ripple");
- var c = _c(b);
- (this.foundation = new $c(c)), this.foundation.init();
- }
- return this.render();
- }
- render() {
- return this.foundation;
- }
- }
- ),
- cd = {
- ANCHOR: "mdc-menu-surface--anchor",
- ANIMATING_CLOSED: "mdc-menu-surface--animating-closed",
- ANIMATING_OPEN: "mdc-menu-surface--animating-open",
- FIXED: "mdc-menu-surface--fixed",
- IS_OPEN_BELOW: "mdc-menu-surface--is-open-below",
- OPEN: "mdc-menu-surface--open",
- ROOT: "mdc-menu-surface",
- },
- dd = {
- CLOSED_EVENT: "MDCMenuSurface:closed",
- CLOSING_EVENT: "MDCMenuSurface:closing",
- OPENED_EVENT: "MDCMenuSurface:opened",
- FOCUSABLE_ELEMENTS:
- 'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])',
- },
- ed = {
- TRANSITION_OPEN_DURATION: 120,
- TRANSITION_CLOSE_DURATION: 75,
- MARGIN_TO_EDGE: 32,
- ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO: 0.67,
- TOUCH_EVENT_WAIT_MS: 30,
- };
- (function (a) {
- (a[(a.BOTTOM = 1)] = "BOTTOM"),
- (a[(a.CENTER = 2)] = "CENTER"),
- (a[(a.RIGHT = 4)] = "RIGHT"),
- (a[(a.FLIP_RTL = 8)] = "FLIP_RTL");
- })(ad || (ad = {}));
- var fd;
- (function (a) {
- (a[(a.TOP_LEFT = 0)] = "TOP_LEFT"),
- (a[(a.TOP_RIGHT = 4)] = "TOP_RIGHT"),
- (a[(a.BOTTOM_LEFT = 1)] = "BOTTOM_LEFT"),
- (a[(a.BOTTOM_RIGHT = 5)] = "BOTTOM_RIGHT"),
- (a[(a.TOP_START = 8)] = "TOP_START"),
- (a[(a.TOP_END = 12)] = "TOP_END"),
- (a[(a.BOTTOM_START = 9)] = "BOTTOM_START"),
- (a[(a.BOTTOM_END = 13)] = "BOTTOM_END");
- })(fd || (fd = {}));
- var gd = {
- ACTIVATED: "mdc-select--activated",
- DISABLED: "mdc-select--disabled",
- FOCUSED: "mdc-select--focused",
- INVALID: "mdc-select--invalid",
- MENU_INVALID: "mdc-select__menu--invalid",
- OUTLINED: "mdc-select--outlined",
- REQUIRED: "mdc-select--required",
- ROOT: "mdc-select",
- WITH_LEADING_ICON: "mdc-select--with-leading-icon",
- },
- hd = {
- ARIA_CONTROLS: "aria-controls",
- ARIA_DESCRIBEDBY: "aria-describedby",
- ARIA_SELECTED_ATTR: "aria-selected",
- CHANGE_EVENT: "MDCSelect:change",
- HIDDEN_INPUT_SELECTOR: 'input[type="hidden"]',
- LABEL_SELECTOR: ".mdc-floating-label",
- LEADING_ICON_SELECTOR: ".mdc-select__icon",
- LINE_RIPPLE_SELECTOR: ".mdc-line-ripple",
- MENU_SELECTOR: ".mdc-select__menu",
- OUTLINE_SELECTOR: ".mdc-notched-outline",
- SELECTED_TEXT_SELECTOR: ".mdc-select__selected-text",
- SELECT_ANCHOR_SELECTOR: ".mdc-select__anchor",
- VALUE_ATTR: "data-value",
- },
- id = {
- LABEL_SCALE: 0.75,
- UNSET_INDEX: -1,
- CLICK_DEBOUNCE_TIMEOUT_MS: 330,
- },
- jd = (function (a) {
- function b(c, d) {
- void 0 === d && (d = {});
- var e = a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- return (
- (e.disabled = !1),
- (e.isMenuOpen = !1),
- (e.useDefaultValidation = !0),
- (e.customValidity = !0),
- (e.lastSelectedIndex = id.UNSET_INDEX),
- (e.clickDebounceTimeout = 0),
- (e.recentlyClicked = !1),
- (e.leadingIcon = d.leadingIcon),
- (e.helperText = d.helperText),
- e
- );
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return gd;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "numbers", {
- get: function () {
- return id;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "strings", {
- get: function () {
- return hd;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "defaultAdapter", {
- get: function () {
- return {
- addClass: function () {},
- removeClass: function () {},
- hasClass: function () {
- return !1;
- },
- activateBottomLine: function () {},
- deactivateBottomLine: function () {},
- getSelectedIndex: function () {
- return -1;
- },
- setSelectedIndex: function () {},
- hasLabel: function () {
- return !1;
- },
- floatLabel: function () {},
- getLabelWidth: function () {
- return 0;
- },
- setLabelRequired: function () {},
- hasOutline: function () {
- return !1;
- },
- notchOutline: function () {},
- closeOutline: function () {},
- setRippleCenter: function () {},
- notifyChange: function () {},
- setSelectedText: function () {},
- isSelectAnchorFocused: function () {
- return !1;
- },
- getSelectAnchorAttr: function () {
- return "";
- },
- setSelectAnchorAttr: function () {},
- removeSelectAnchorAttr: function () {},
- addMenuClass: function () {},
- removeMenuClass: function () {},
- openMenu: function () {},
- closeMenu: function () {},
- getAnchorElement: function () {
- return null;
- },
- setMenuAnchorElement: function () {},
- setMenuAnchorCorner: function () {},
- setMenuWrapFocus: function () {},
- focusMenuItemAtIndex: function () {},
- getMenuItemCount: function () {
- return 0;
- },
- getMenuItemValues: function () {
- return [];
- },
- getMenuItemTextAtIndex: function () {
- return "";
- },
- isTypeaheadInProgress: function () {
- return !1;
- },
- typeaheadMatchItem: function () {
- return -1;
- },
- };
- },
- enumerable: !1,
- configurable: !0,
- }),
- (b.prototype.getSelectedIndex = function () {
- return this.adapter.getSelectedIndex();
- }),
- (b.prototype.setSelectedIndex = function (a, b, c) {
- void 0 === b && (b = !1),
- void 0 === c && (c = !1),
- a >= this.adapter.getMenuItemCount() ||
- (a === id.UNSET_INDEX
- ? this.adapter.setSelectedText("")
- : this.adapter.setSelectedText(
- this.adapter.getMenuItemTextAtIndex(a).trim()
- ),
- this.adapter.setSelectedIndex(a),
- b && this.adapter.closeMenu(),
- !c && this.lastSelectedIndex !== a && this.handleChange(),
- (this.lastSelectedIndex = a));
- }),
- (b.prototype.setValue = function (a, b) {
- void 0 === b && (b = !1);
- var c = this.adapter.getMenuItemValues().indexOf(a);
- this.setSelectedIndex(c, !1, b);
- }),
- (b.prototype.getValue = function () {
- var a = this.adapter.getSelectedIndex(),
- b = this.adapter.getMenuItemValues();
- return a === id.UNSET_INDEX ? "" : b[a];
- }),
- (b.prototype.getDisabled = function () {
- return this.disabled;
- }),
- (b.prototype.setDisabled = function (a) {
- (this.disabled = a),
- this.disabled
- ? (this.adapter.addClass(gd.DISABLED), this.adapter.closeMenu())
- : this.adapter.removeClass(gd.DISABLED),
- this.leadingIcon && this.leadingIcon.setDisabled(this.disabled),
- this.disabled
- ? this.adapter.removeSelectAnchorAttr("tabindex")
- : this.adapter.setSelectAnchorAttr("tabindex", "0"),
- this.adapter.setSelectAnchorAttr(
- "aria-disabled",
- this.disabled.toString()
- );
- }),
- (b.prototype.openMenu = function () {
- this.adapter.addClass(gd.ACTIVATED),
- this.adapter.openMenu(),
- (this.isMenuOpen = !0),
- this.adapter.setSelectAnchorAttr("aria-expanded", "true");
- }),
- (b.prototype.setHelperTextContent = function (a) {
- this.helperText && this.helperText.setContent(a);
- }),
- (b.prototype.layout = function () {
- if (this.adapter.hasLabel()) {
- var a = 0 < this.getValue().length,
- b = this.adapter.hasClass(gd.FOCUSED),
- c = a || b,
- d = this.adapter.hasClass(gd.REQUIRED);
- this.notchOutline(c),
- this.adapter.floatLabel(c),
- this.adapter.setLabelRequired(d);
- }
- }),
- (b.prototype.layoutOptions = function () {
- var a = this.adapter.getMenuItemValues(),
- b = a.indexOf(this.getValue());
- this.setSelectedIndex(b, !1, !0);
- }),
- (b.prototype.handleMenuOpened = function () {
- if (0 !== this.adapter.getMenuItemValues().length) {
- var a = this.getSelectedIndex(),
- b = 0 <= a ? a : 0;
- this.adapter.focusMenuItemAtIndex(b);
- }
- }),
- (b.prototype.handleMenuClosing = function () {
- this.adapter.setSelectAnchorAttr("aria-expanded", "false");
- }),
- (b.prototype.handleMenuClosed = function () {
- this.adapter.removeClass(gd.ACTIVATED),
- (this.isMenuOpen = !1),
- this.adapter.isSelectAnchorFocused() || this.blur();
- }),
- (b.prototype.handleChange = function () {
- this.layout(), this.adapter.notifyChange(this.getValue());
- var a = this.adapter.hasClass(gd.REQUIRED);
- a && this.useDefaultValidation && this.setValid(this.isValid());
- }),
- (b.prototype.handleMenuItemAction = function (a) {
- this.setSelectedIndex(a, !0);
- }),
- (b.prototype.handleFocus = function () {
- this.adapter.addClass(gd.FOCUSED),
- this.layout(),
- this.adapter.activateBottomLine();
- }),
- (b.prototype.handleBlur = function () {
- this.isMenuOpen || this.blur();
- }),
- (b.prototype.handleClick = function (a) {
- if (!(this.disabled || this.recentlyClicked))
- return (
- this.setClickDebounceTimeout(),
- this.isMenuOpen
- ? void this.adapter.closeMenu()
- : void (this.adapter.setRippleCenter(a), this.openMenu())
- );
- }),
- (b.prototype.handleKeydown = function (a) {
- if (!this.isMenuOpen && this.adapter.hasClass(gd.FOCUSED)) {
- var b = Xa(a) === Dc.ENTER,
- c = Xa(a) === Dc.SPACEBAR,
- d = Xa(a) === Dc.ARROW_UP,
- e = Xa(a) === Dc.ARROW_DOWN,
- f = a.ctrlKey || a.metaKey;
- if (
- !f &&
- ((!c && a.key && 1 === a.key.length) ||
- (c && this.adapter.isTypeaheadInProgress()))
- ) {
- var g = c ? " " : a.key,
- h = this.adapter.typeaheadMatchItem(
- g,
- this.getSelectedIndex()
- );
- return (
- 0 <= h && this.setSelectedIndex(h), void a.preventDefault()
- );
- }
- (b || c || d || e) &&
- (d && 0 < this.getSelectedIndex()
- ? this.setSelectedIndex(this.getSelectedIndex() - 1)
- : e &&
- this.getSelectedIndex() <
- this.adapter.getMenuItemCount() - 1 &&
- this.setSelectedIndex(this.getSelectedIndex() + 1),
- this.openMenu(),
- a.preventDefault());
- }
- }),
- (b.prototype.notchOutline = function (a) {
- if (this.adapter.hasOutline()) {
- var b = this.adapter.hasClass(gd.FOCUSED);
- if (a) {
- var c = id.LABEL_SCALE,
- d = this.adapter.getLabelWidth() * c;
- this.adapter.notchOutline(d);
- } else b || this.adapter.closeOutline();
- }
- }),
- (b.prototype.setLeadingIconAriaLabel = function (a) {
- this.leadingIcon && this.leadingIcon.setAriaLabel(a);
- }),
- (b.prototype.setLeadingIconContent = function (a) {
- this.leadingIcon && this.leadingIcon.setContent(a);
- }),
- (b.prototype.getUseDefaultValidation = function () {
- return this.useDefaultValidation;
- }),
- (b.prototype.setUseDefaultValidation = function (a) {
- this.useDefaultValidation = a;
- }),
- (b.prototype.setValid = function (a) {
- this.useDefaultValidation || (this.customValidity = a),
- this.adapter.setSelectAnchorAttr("aria-invalid", (!a).toString()),
- a
- ? (this.adapter.removeClass(gd.INVALID),
- this.adapter.removeMenuClass(gd.MENU_INVALID))
- : (this.adapter.addClass(gd.INVALID),
- this.adapter.addMenuClass(gd.MENU_INVALID)),
- this.syncHelperTextValidity(a);
- }),
- (b.prototype.isValid = function () {
- return this.useDefaultValidation &&
- this.adapter.hasClass(gd.REQUIRED) &&
- !this.adapter.hasClass(gd.DISABLED)
- ? this.getSelectedIndex() !== id.UNSET_INDEX &&
- (0 !== this.getSelectedIndex() || !!this.getValue())
- : this.customValidity;
- }),
- (b.prototype.setRequired = function (a) {
- a
- ? this.adapter.addClass(gd.REQUIRED)
- : this.adapter.removeClass(gd.REQUIRED),
- this.adapter.setSelectAnchorAttr("aria-required", a.toString()),
- this.adapter.setLabelRequired(a);
- }),
- (b.prototype.getRequired = function () {
- return "true" === this.adapter.getSelectAnchorAttr("aria-required");
- }),
- (b.prototype.init = function () {
- var a = this.adapter.getAnchorElement();
- a &&
- (this.adapter.setMenuAnchorElement(a),
- this.adapter.setMenuAnchorCorner(fd.BOTTOM_START)),
- this.adapter.setMenuWrapFocus(!1),
- this.setDisabled(this.adapter.hasClass(gd.DISABLED)),
- this.syncHelperTextValidity(!this.adapter.hasClass(gd.INVALID)),
- this.layout(),
- this.layoutOptions();
- }),
- (b.prototype.blur = function () {
- this.adapter.removeClass(gd.FOCUSED),
- this.layout(),
- this.adapter.deactivateBottomLine();
- var a = this.adapter.hasClass(gd.REQUIRED);
- a && this.useDefaultValidation && this.setValid(this.isValid());
- }),
- (b.prototype.syncHelperTextValidity = function (a) {
- if (this.helperText) {
- this.helperText.setValidity(a);
- var b = this.helperText.isVisible(),
- c = this.helperText.getId();
- b && c
- ? this.adapter.setSelectAnchorAttr(hd.ARIA_DESCRIBEDBY, c)
- : this.adapter.removeSelectAnchorAttr(hd.ARIA_DESCRIBEDBY);
- }
- }),
- (b.prototype.setClickDebounceTimeout = function () {
- var a = this;
- clearTimeout(this.clickDebounceTimeout),
- (this.clickDebounceTimeout = setTimeout(function () {
- a.recentlyClicked = !1;
- }, id.CLICK_DEBOUNCE_TIMEOUT_MS)),
- (this.recentlyClicked = !0);
- }),
- b
- );
- })(qc),
- kd = (a) => (null == a ? b : a),
- ld = function () {
- var a =
- 0 < arguments.length && arguments[0] !== void 0 ? arguments[0] : {},
- b = {};
- for (var c in a) b[c] = a[c];
- return Object.assign(
- {
- badInput: !1,
- customError: !1,
- patternMismatch: !1,
- rangeOverflow: !1,
- rangeUnderflow: !1,
- stepMismatch: !1,
- tooLong: !1,
- tooShort: !1,
- typeMismatch: !1,
- valid: !0,
- valueMissing: !1,
- },
- b
- );
- };
- class md extends Uc {
- constructor() {
- super(...arguments),
- (this.mdcFoundationClass = jd),
- (this.disabled = !1),
- (this.outlined = !1),
- (this.label = ""),
- (this.outlineOpen = !1),
- (this.outlineWidth = 0),
- (this.value = ""),
- (this.name = ""),
- (this.selectedText = ""),
- (this.icon = ""),
- (this.menuOpen = !1),
- (this.helper = ""),
- (this.validateOnInitialRender = !1),
- (this.validationMessage = ""),
- (this.required = !1),
- (this.naturalMenuWidth = !1),
- (this.isUiValid = !0),
- (this.fixedMenuPosition = !1),
- (this.typeaheadState = Ya()),
- (this.sortedIndexByFirstChar = new Map()),
- (this.menuElement_ = null),
- (this.listeners = []),
- (this.onBodyClickBound = () => void 0),
- (this._menuUpdateComplete = null),
- (this.valueSetDirectly = !1),
- (this.validityTransform = null),
- (this._validity = ld());
- }
- get items() {
- return (
- this.menuElement_ || (this.menuElement_ = this.menuElement),
- this.menuElement_ ? this.menuElement_.items : []
- );
- }
- get selected() {
- var a = this.menuElement;
- return a ? a.selected : null;
- }
- get index() {
- var a = this.menuElement;
- return a ? a.index : -1;
- }
- get shouldRenderHelperText() {
- return !!this.helper || !!this.validationMessage;
- }
- get validity() {
- return this._checkValidity(this.value), this._validity;
- }
- render() {
- var a = {
- "mdc-select--disabled": this.disabled,
- "mdc-select--no-label": !this.label,
- "mdc-select--filled": !this.outlined,
- "mdc-select--outlined": this.outlined,
- "mdc-select--with-leading-icon": !!this.icon,
- "mdc-select--required": this.required,
- "mdc-select--invalid": !this.isUiValid,
- },
- b = { "mdc-select__menu--invalid": !this.isUiValid },
- c = !this.label ? void 0 : "label",
- d = this.shouldRenderHelperText ? "helper-text" : void 0;
- return g(
- E ||
- (E = j([
- '\n
\n
\n \n
\n
',
- '\n \n
\n \n \n ',
- '\n
\n
",
- ])),
- hc(a),
- yc(b),
- this.onKeydown,
- this.registerBodyClick,
- this.deregisterBodyClick
- );
- }
- createAdapter() {
- var a = this;
- return Object.assign(Object.assign({}, Va(this.mdcRoot)), {
- hasAnchor: () => !!this.anchor,
- notifyClose: () => {
- var a = new CustomEvent("closed", { bubbles: !0, composed: !0 });
- (this.open = !1), this.mdcRoot.dispatchEvent(a);
- },
- notifyClosing: () => {
- var a = new CustomEvent("closing", { bubbles: !0, composed: !0 });
- this.mdcRoot.dispatchEvent(a);
- },
- notifyOpen: () => {
- var a = new CustomEvent("opened", { bubbles: !0, composed: !0 });
- (this.open = !0), this.mdcRoot.dispatchEvent(a);
- },
- isElementInContainer: () => !1,
- isRtl: () =>
- !!this.mdcRoot &&
- "rtl" === getComputedStyle(this.mdcRoot).direction,
- setTransformOrigin: (a) => {
- var b = this.mdcRoot;
- b && (this.styleTransformOrigin = a);
- },
- isFocused: () => oc(this),
- saveFocus: () => {
- var a = nc(),
- b = a.length;
- b || (this.previouslyFocused = null),
- (this.previouslyFocused = a[b - 1]);
- },
- restoreFocus: () => {
- !this.previouslyFocused ||
- ("focus" in this.previouslyFocused &&
- this.previouslyFocused.focus());
- },
- getInnerDimensions: () => {
- var a = this.mdcRoot;
- return a
- ? { width: a.offsetWidth, height: a.offsetHeight }
- : { width: 0, height: 0 };
- },
- getAnchorDimensions: () => {
- var a = this.anchor;
- return a ? a.getBoundingClientRect() : null;
- },
- getBodyDimensions: () => ({
- width: document.body.clientWidth,
- height: document.body.clientHeight,
- }),
- getWindowDimensions: () => ({
- width: window.innerWidth,
- height: window.innerHeight,
- }),
- getWindowScroll: () => ({
- x: window.pageXOffset,
- y: window.pageYOffset,
- }),
- setPosition: (a) => {
- var b = this.mdcRoot;
- b &&
- ((this.styleLeft = "left" in a ? "".concat(a.left, "px") : ""),
- (this.styleRight = "right" in a ? "".concat(a.right, "px") : ""),
- (this.styleTop = "top" in a ? "".concat(a.top, "px") : ""),
- (this.styleBottom =
- "bottom" in a ? "".concat(a.bottom, "px") : ""));
- },
- setMaxHeight: (function () {
- var b = o(function* (b) {
- var c = a.mdcRoot;
- c &&
- ((a.styleMaxHeight = b),
- yield a.updateComplete,
- (a.styleMaxHeight = "var(--mdc-menu-max-height, ".concat(
- b,
- ")"
- )));
- });
- return function () {
- return b.apply(this, arguments);
- };
- })(),
- });
- }
- onKeydown(a) {
- this.mdcFoundation && this.mdcFoundation.handleKeydown(a);
- }
- onBodyClick(a) {
- if (!this.stayOpenOnBodyClick) {
- var b = a.composedPath();
- -1 === b.indexOf(this) && this.close();
- }
- }
- registerBodyClick() {
- (this.onBodyClickBound = this.onBodyClick.bind(this)),
- document.body.addEventListener("click", this.onBodyClickBound, {
- passive: !0,
- capture: !0,
- });
- }
- deregisterBodyClick() {
- document.body.removeEventListener("click", this.onBodyClickBound, {
- capture: !0,
- });
- }
- close() {
- this.open = !1;
- }
- show() {
- this.open = !0;
- }
- }
- Na([Ra(".mdc-menu-surface")], Cd.prototype, "mdcRoot", void 0),
- Na([Ra("slot")], Cd.prototype, "slotElement", void 0),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation &&
- !this.fixed &&
- this.mdcFoundation.setIsHoisted(a);
- }),
- ],
- Cd.prototype,
- "absolute",
- void 0
- ),
- Na([Pa({ type: Boolean })], Cd.prototype, "fullwidth", void 0),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation &&
- !this.absolute &&
- this.mdcFoundation.setFixedPosition(a);
- }),
- ],
- Cd.prototype,
- "fixed",
- void 0
- ),
- Na(
- [
- Pa({ type: Number }),
- Zb(function (a) {
- this.mdcFoundation &&
- null !== this.y &&
- null !== a &&
- (this.mdcFoundation.setAbsolutePosition(a, this.y),
- this.mdcFoundation.setAnchorMargin({
- left: a,
- top: this.y,
- right: -a,
- bottom: this.y,
- }));
- }),
- ],
- Cd.prototype,
- "x",
- void 0
- ),
- Na(
- [
- Pa({ type: Number }),
- Zb(function (a) {
- this.mdcFoundation &&
- null !== this.x &&
- null !== a &&
- (this.mdcFoundation.setAbsolutePosition(this.x, a),
- this.mdcFoundation.setAnchorMargin({
- left: this.x,
- top: a,
- right: -this.x,
- bottom: a,
- }));
- }),
- ],
- Cd.prototype,
- "y",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation && this.mdcFoundation.setQuickOpen(a);
- }),
- ],
- Cd.prototype,
- "quick",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a, b) {
- this.mdcFoundation &&
- (a
- ? this.mdcFoundation.open()
- : b !== void 0 && this.mdcFoundation.close());
- }),
- ],
- Cd.prototype,
- "open",
- void 0
- ),
- Na([Pa({ type: Boolean })], Cd.prototype, "stayOpenOnBodyClick", void 0),
- Na(
- [
- Qa(),
- Zb(function (a) {
- this.mdcFoundation &&
- (a
- ? this.mdcFoundation.setAnchorCorner(a)
- : this.mdcFoundation.setAnchorCorner(a));
- }),
- ],
- Cd.prototype,
- "bitwiseCorner",
- void 0
- ),
- Na(
- [
- Pa({ type: String }),
- Zb(function (a) {
- if (this.mdcFoundation) {
- var b = null === this.previousMenuCorner,
- c = !b && a !== this.previousMenuCorner;
- ("START" === a || "END" === a) &&
- (c || (b && "END" === a)) &&
- ((this.bitwiseCorner ^= ad.RIGHT),
- this.mdcFoundation.flipCornerHorizontally(),
- (this.previousMenuCorner = a));
- }
- }),
- ],
- Cd.prototype,
- "menuCorner",
- void 0
- ),
- Na(
- [
- Pa({ type: String }),
- Zb(function (a) {
- if (this.mdcFoundation && a) {
- var b = Bd[a];
- "END" === this.menuCorner && (b ^= ad.RIGHT),
- (this.bitwiseCorner = b);
- }
- }),
- ],
- Cd.prototype,
- "corner",
- void 0
- ),
- Na([Qa()], Cd.prototype, "styleTop", void 0),
- Na([Qa()], Cd.prototype, "styleLeft", void 0),
- Na([Qa()], Cd.prototype, "styleRight", void 0),
- Na([Qa()], Cd.prototype, "styleBottom", void 0),
- Na([Qa()], Cd.prototype, "styleMaxHeight", void 0),
- Na([Qa()], Cd.prototype, "styleTransformOrigin", void 0);
- var Dd = mb(
- U ||
- (U = j([
- ".mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}",
- ]))
- );
- class Ed extends La(Cd) {
- static get defineId() {
- return "mwc-menu-surface";
- }
- static get elementDefinitions() {
- return Vb([], Ed);
- }
- static get styles() {
- return Dd;
- }
- }
- var Fd = (a) => a.hasAttribute("mwc-list-item");
- class Gd extends pc {
- constructor() {
- var a;
- super(),
- (a = this),
- (this.mdcAdapter = null),
- (this.mdcFoundationClass = yd),
- (this.activatable = !1),
- (this.multi = !1),
- (this.wrapFocus = !1),
- (this.itemRoles = null),
- (this.innerRole = null),
- (this.innerAriaLabel = null),
- (this.rootTabbable = !1),
- (this.previousTabindex = null),
- (this.noninteractive = !1),
- (this.itemsReadyResolver = () => {}),
- (this.itemsReady = Promise.resolve([])),
- (this.items_ = []);
- var b = gb(this.layout.bind(this));
- this.debouncedLayout = function () {
- var c =
- !(0 < arguments.length && arguments[0] !== void 0) || arguments[0];
- hb.call(a), b(c);
- };
- }
- getUpdateComplete() {
- var a = () => super.getUpdateComplete,
- b = this;
- return o(function* () {
- var c = yield a().call(b);
- return yield b.itemsReady, c;
- })();
- }
- get items() {
- return this.items_;
- }
- updateItems() {
- var a,
- b = null !== (a = this.assignedElements) && void 0 !== a ? a : [],
- c = [];
- for (var f of b)
- Fd(f) && (c.push(f), (f._managingList = this)),
- f.hasAttribute("divider") &&
- !f.hasAttribute("role") &&
- f.setAttribute("role", "separator");
- this.items_ = c;
- var d = new Set();
- if (
- (this.items_.forEach((a, b) => {
- this.itemRoles
- ? a.setAttribute("role", this.itemRoles)
- : a.removeAttribute("role"),
- a.selected && d.add(b);
- }),
- this.multi)
- )
- this.select(d);
- else {
- var g = d.size ? d.entries().next().value[1] : -1;
- this.select(g);
- }
- var e = new Event("items-updated", { bubbles: !0, composed: !0 });
- this.dispatchEvent(e);
- }
- get selected() {
- var a = this.index;
- if (!fb(a)) return -1 === a ? null : this.items[a];
- var b = [];
- for (var c of a) b.push(this.items[c]);
- return b;
- }
- get index() {
- return this.mdcFoundation ? this.mdcFoundation.getSelectedIndex() : -1;
- }
- render() {
- var a = null === this.innerRole ? void 0 : this.innerRole,
- b = null === this.innerAriaLabel ? void 0 : this.innerAriaLabel,
- c = this.rootTabbable ? "0" : "-1";
- return g(
- V ||
- (V = j([
- "\n \n
\n ",
- ])),
- c,
- kd(a),
- kd(b),
- this.onKeydown,
- this.onFocusIn,
- this.onFocusOut,
- this.onRequestSelected,
- this.onListItemConnected,
- this.renderPlaceholder()
- );
- }
- renderPlaceholder() {
- var a,
- b = null !== (a = this.assignedElements) && void 0 !== a ? a : [];
- return void 0 !== this.emptyMessage && 0 === b.length
- ? g(
- W ||
- (W = j([
- "\n
",
- "\n ",
- ])),
- this.emptyMessage
- )
- : null;
- }
- firstUpdated() {
- super.firstUpdated(),
- this.items.length ||
- (this.mdcFoundation.setMulti(this.multi), this.layout());
- }
- onFocusIn(a) {
- if (this.mdcFoundation && this.mdcRoot) {
- var b = this.getIndexOfTarget(a);
- this.mdcFoundation.handleFocusIn(a, b);
- }
- }
- onFocusOut(a) {
- if (this.mdcFoundation && this.mdcRoot) {
- var b = this.getIndexOfTarget(a);
- this.mdcFoundation.handleFocusOut(a, b);
- }
- }
- onKeydown(a) {
- if (this.mdcFoundation && this.mdcRoot) {
- var b = this.getIndexOfTarget(a),
- c = a.target,
- d = Fd(c);
- this.mdcFoundation.handleKeydown(a, d, b);
- }
- }
- onRequestSelected(a) {
- if (this.mdcFoundation) {
- var d = this.getIndexOfTarget(a);
- if (
- -1 === d &&
- (this.layout(), (d = this.getIndexOfTarget(a)), -1 === d)
- )
- return;
- var e = this.items[d];
- if (e.disabled) return;
- var b = a.detail.selected,
- c = a.detail.source;
- this.mdcFoundation.handleSingleSelection(d, "interaction" === c, b),
- a.stopPropagation();
- }
- }
- getIndexOfTarget(a) {
- var b = this.items,
- c = a.composedPath();
- for (var d of c) {
- var e = -1;
- if ((kc(d) && Fd(d) && (e = b.indexOf(d)), -1 !== e)) return e;
- }
- return -1;
- }
- createAdapter() {
- return (
- (this.mdcAdapter = {
- getListItemCount: () => (this.mdcRoot ? this.items.length : 0),
- getFocusedElementIndex: this.getFocusedItemIndex,
- getAttributeForElementIndex: (a, b) => {
- var c = this.mdcRoot;
- if (!c) return "";
- var d = this.items[a];
- return d ? d.getAttribute(b) : "";
- },
- setAttributeForElementIndex: (a, b, c) => {
- if (this.mdcRoot) {
- var d = this.items[a];
- d && d.setAttribute(b, c);
- }
- },
- focusItemAtIndex: (a) => {
- var b = this.items[a];
- b && b.focus();
- },
- setTabIndexForElementIndex: (a, b) => {
- var c = this.items[a];
- c && (c.tabindex = b);
- },
- notifyAction: (a) => {
- var b = new CustomEvent("action", {
- bubbles: !0,
- composed: !0,
- detail: { index: a },
- });
- this.dispatchEvent(b);
- },
- notifySelected: (a, b) => {
- var c = new CustomEvent("selected", {
- bubbles: !0,
- composed: !0,
- detail: { index: a, diff: b },
- });
- this.dispatchEvent(c);
- },
- isFocusInsideList: () => oc(this),
- isRootFocused: () => {
- var a = this.mdcRoot,
- b = a.getRootNode();
- return b.activeElement === a;
- },
- setDisabledStateForElementIndex: (a, b) => {
- var c = this.items[a];
- c && (c.disabled = b);
- },
- getDisabledStateForElementIndex: (a) => {
- var b = this.items[a];
- return !!b && b.disabled;
- },
- setSelectedStateForElementIndex: (a, b) => {
- var c = this.items[a];
- c && (c.selected = b);
- },
- getSelectedStateForElementIndex: (a) => {
- var b = this.items[a];
- return !!b && b.selected;
- },
- setActivatedStateForElementIndex: (a, b) => {
- var c = this.items[a];
- c && (c.activated = b);
- },
- }),
- this.mdcAdapter
- );
- }
- selectUi(a) {
- var b =
- !!(1 < arguments.length && arguments[1] !== void 0) && arguments[1],
- c = this.items[a];
- c && ((c.selected = !0), (c.activated = b));
- }
- deselectUi(a) {
- var b = this.items[a];
- b && ((b.selected = !1), (b.activated = !1));
- }
- select(a) {
- this.mdcFoundation && this.mdcFoundation.setSelectedIndex(a);
- }
- toggle(a, b) {
- this.multi && this.mdcFoundation.toggleMultiAtIndex(a, b);
- }
- onListItemConnected(a) {
- var b = a.target;
- this.layout(-1 === this.items.indexOf(b));
- }
- layout() {
- var a =
- !(0 < arguments.length && arguments[0] !== void 0) || arguments[0];
- a && this.updateItems();
- var b = this.items[0];
- for (var c of this.items) c.tabindex = -1;
- b &&
- (this.noninteractive
- ? !this.previousTabindex && (this.previousTabindex = b)
- : (b.tabindex = 0)),
- this.itemsReadyResolver();
- }
- getFocusedItemIndex() {
- if (!this.mdcRoot) return -1;
- if (!this.items.length) return -1;
- var a = nc();
- if (!a.length) return -1;
- for (var b, c = a.length - 1; 0 <= c; c--)
- if (((b = a[c]), Fd(b))) return this.items.indexOf(b);
- return -1;
- }
- focusItemAtIndex(a) {
- for (var b of this.items)
- if (0 === b.tabindex) {
- b.tabindex = -1;
- break;
- }
- (this.items[a].tabindex = 0), this.items[a].focus();
- }
- focus() {
- var a = this.mdcRoot;
- a && a.focus();
- }
- blur() {
- var a = this.mdcRoot;
- a && a.blur();
- }
- }
- Na([Pa({ type: String })], Gd.prototype, "emptyMessage", void 0),
- Na([Ra(".mdc-deprecated-list")], Gd.prototype, "mdcRoot", void 0),
- Na([Ta("", !0, "*")], Gd.prototype, "assignedElements", void 0),
- Na(
- [Ta("", !0, '[tabindex="0"]')],
- Gd.prototype,
- "tabbableElements",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation && this.mdcFoundation.setUseActivatedClass(a);
- }),
- ],
- Gd.prototype,
- "activatable",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a, b) {
- this.mdcFoundation && this.mdcFoundation.setMulti(a),
- b !== void 0 && this.layout();
- }),
- ],
- Gd.prototype,
- "multi",
- void 0
- ),
- Na(
- [
- Pa({ type: Boolean }),
- Zb(function (a) {
- this.mdcFoundation && this.mdcFoundation.setWrapFocus(a);
- }),
- ],
- Gd.prototype,
- "wrapFocus",
- void 0
- ),
- Na(
- [
- Pa({ type: String }),
- Zb(function (a, b) {
- b !== void 0 && this.updateItems();
- }),
- ],
- Gd.prototype,
- "itemRoles",
- void 0
- ),
- Na([Pa({ type: String })], Gd.prototype, "innerRole", void 0),
- Na([Pa({ type: String })], Gd.prototype, "innerAriaLabel", void 0),
- Na([Pa({ type: Boolean })], Gd.prototype, "rootTabbable", void 0),
- Na(
- [
- Pa({ type: Boolean, reflect: !0 }),
- Zb(function (a) {
- var b, c;
- if (a) {
- var d =
- null !==
- (c =
- null === (b = this.tabbableElements) || void 0 === b
- ? void 0
- : b[0]) && void 0 !== c
- ? c
- : null;
- (this.previousTabindex = d),
- d && d.setAttribute("tabindex", "-1");
- } else !a && this.previousTabindex && (this.previousTabindex.setAttribute("tabindex", "0"), (this.previousTabindex = null));
- }),
- ],
- Gd.prototype,
- "noninteractive",
- void 0
- );
- var Hd = mb(
- X ||
- (X = j([
- '@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}',
- ]))
- );
- class Id extends La(Gd) {
- static get defineId() {
- return "mwc-list";
- }
- static get elementDefinitions() {
- return Vb([Cc], Id);
- }
- static get styles() {
- return Hd;
- }
- }
- class Jd extends La(zd) {
- static get defineId() {
- return "mwc-menu";
- }
- static get elementDefinitions() {
- return Vb([Ed, Id], Jd);
- }
- static get styles() {
- return Ad;
- }
- }
- var Kd = { NOTCH_ELEMENT_SELECTOR: ".mdc-notched-outline__notch" },
- Ld = { NOTCH_ELEMENT_PADDING: 8 },
- Md = {
- NO_LABEL: "mdc-notched-outline--no-label",
- OUTLINE_NOTCHED: "mdc-notched-outline--notched",
- OUTLINE_UPGRADED: "mdc-notched-outline--upgraded",
- },
- Nd = (function (a) {
- function b(c) {
- return a.call(this, Yb(Yb({}, b.defaultAdapter), c)) || this;
- }
- return (
- Ma(b, a),
- Object.defineProperty(b, "strings", {
- get: function () {
- return Kd;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "cssClasses", {
- get: function () {
- return Md;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "numbers", {
- get: function () {
- return Ld;
- },
- enumerable: !1,
- configurable: !0,
- }),
- Object.defineProperty(b, "defaultAdapter", {
- get: function () {
- return {
- addClass: function () {},
- removeClass: function () {},
- setNotchWidthProperty: function () {},
- removeNotchWidthProperty: function () {},
- };
- },
- enumerable: !1,
- configurable: !0,
- }),
- (b.prototype.notch = function (a) {
- var c = b.cssClasses.OUTLINE_NOTCHED;
- 0 < a && (a += Ld.NOTCH_ELEMENT_PADDING),
- this.adapter.setNotchWidthProperty(a),
- this.adapter.addClass(c);
- }),
- (b.prototype.closeNotch = function () {
- var a = b.cssClasses.OUTLINE_NOTCHED;
- this.adapter.removeClass(a),
- this.adapter.removeNotchWidthProperty();
- }),
- b
- );
- })(qc);
- class Od extends pc {
- constructor() {
- super(...arguments),
- (this.mdcFoundationClass = Nd),
- (this.width = 0),
- (this.open = !1),
- (this.lastOpen = this.open);
- }
- createAdapter() {
- return {
- addClass: (a) => this.mdcRoot.classList.add(a),
- removeClass: (a) => this.mdcRoot.classList.remove(a),
- setNotchWidthProperty: (a) =>
- this.notchElement.style.setProperty("width", "".concat(a, "px")),
- removeNotchWidthProperty: () =>
- this.notchElement.style.removeProperty("width"),
- };
- }
- openOrClose(a, b) {
- this.mdcFoundation &&
- (a && b !== void 0
- ? this.mdcFoundation.notch(b)
- : this.mdcFoundation.closeNotch());
- }
- render() {
- this.openOrClose(this.open, this.width);
- var a = hc({ "mdc-notched-outline--notched": this.open });
- return g(
- Y ||
- (Y = j([
- '\n
\n \n \n \n \n \n ',
- ])),
- a
- );
- }
- }
- Na([Ra(".mdc-notched-outline")], Od.prototype, "mdcRoot", void 0),
- Na([Pa({ type: Number })], Od.prototype, "width", void 0),
- Na([Pa({ type: Boolean, reflect: !0 })], Od.prototype, "open", void 0),
- Na(
- [Ra(".mdc-notched-outline__notch")],
- Od.prototype,
- "notchElement",
- void 0
- );
- var Pd = mb(
- Z ||
- (Z = j([
- ".mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}",
- ]))
- );
- class Qd extends La(Od) {
- static get defineId() {
- return "mwc-notched-outline";
- }
- static get elementDefinitions() {
- return Vb([], Qd);
- }
- static get styles() {
- return Pd;
- }
- }
- var Rd = mb(
- aa ||
- (aa = j([
- ':host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}',
- ]))
- );
- class Sd extends La(Qb) {
- static get defineId() {
- return "mwc-icon";
- }
- static get elementDefinitions() {
- return Vb([], Sd);
- }
- render() {
- return g(ba || (ba = j(["
"])));
- }
- static get styles() {
- return Rd;
- }
- }
- class Td extends La(md) {
- static get defineId() {
- return "mwc-select";
- }
- static get elementDefinitions() {
- return Vb([Jd, Sd, Qd], Td);
- }
- static get styles() {
- return od;
- }
- }
- var Ud = function (a, b) {
- var c =
- 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {},
- d = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : {},
- e = new Event(b, {
- bubbles: void 0 === d.bubbles || d.bubbles,
- cancelable: !!d.cancelable,
- composed: void 0 === d.composed || d.composed,
- });
- return (e.detail = c), a.dispatchEvent(e), e;
- };
- class Vd extends La(Qb) {
- static get elementDefinitions() {
- return Vb(
- [Wb("ha-checkbox"), Wb("ha-formfield"), Wb("ha-form-string"), Cc, Td],
- Vd
- );
- }
- static get styles() {
- return Ub;
- }
- static get properties() {
- return { hass: {}, _config: {} };
- }
- setConfig(a) {
- this._config = l(l({}, Tb), a);
- }
- get entityOptions() {
- var a = Object.keys(this.hass.states).filter((a) =>
- ["switch", "light", "group"].includes(a.substr(0, a.indexOf(".")))
- );
- return a.sort(), a;
- }
- firstUpdated() {
- this._firstRendered = !0;
- }
- render() {
- if (!this.hass) return g(ca || (ca = j([""])));
- var { header: a } = this._config;
- if (!a && this._config.entity) {
- var c = this._config.entity.split(".")[1] || "";
- c && ((c = c.charAt(0).toUpperCase() + c.slice(1)), (a = c));
- }
- var b = this.entityOptions.map((a) =>
- g(
- da ||
- (da = j([
- '
",
- "",
- ])),
- a,
- a === this._config.entity,
- a
- )
- );
- return g(
- ea ||
- (ea = j([
- '\n
\n\n
\n \n
\n\n
\n \n ',
- "\n \n \n
\n\n
\n \n \n
\n\n
\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n \n
\n\n
\n \n \n \n
\n
\n
\n ',
- ])),
- { name: "header", type: "string" },
- a,
- "header",
- this.configChanged,
- !0,
- this.configChanged,
- (a) => a.stopPropagation(),
- "entity",
- b,
- { name: "brightness_icon", type: "string" },
- this._config.brightness_icon,
- "brightness_icon",
- this.configChanged,
- { name: "white_icon", type: "string" },
- this._config.white_icon,
- "white_icon",
- this.configChanged,
- { name: "temperature_icon", type: "string" },
- this._config.temperature_icon,
- "temperature_icon",
- this.configChanged,
- this.checkboxConfigChanged,
- this._config.color_wheel,
- "color_wheel",
- this.checkboxConfigChanged,
- this._config.shorten_cards,
- "shorten_cards",
- this.checkboxConfigChanged,
- this._config.persist_features,
- "persist_features",
- this.checkboxConfigChanged,
- this._config.brightness,
- "brightness",
- this.checkboxConfigChanged,
- this._config.color_temp,
- "color_temp",
- this.checkboxConfigChanged,
- this._config.white_value,
- "white_value",
- this.checkboxConfigChanged,
- this._config.speed,
- "speed",
- this.checkboxConfigChanged,
- this._config.intensity,
- "intensity",
- this.checkboxConfigChanged,
- this._config.color_picker,
- "color_picker",
- this.checkboxConfigChanged,
- this._config.effects_list,
- "effects_list",
- this.checkboxConfigChanged,
- this._config.full_width_sliders,
- "full_width_sliders",
- this.checkboxConfigChanged,
- this._config.show_slider_percent,
- "show_slider_percent",
- this.checkboxConfigChanged,
- this._config.smooth_color_wheel,
- "smooth_color_wheel",
- this.checkboxConfigChanged,
- this._config.consolidate_entities,
- "consolidate_entities",
- this.checkboxConfigChanged,
- this._config.hide_header,
- "hide_header",
- this.checkboxConfigChanged,
- this._config.child_card,
- "child_card",
- this.checkboxConfigChanged,
- this._config.force_features,
- "force_features"
- );
- }
- configChanged(a) {
- if (this._config && this.hass && this._firstRendered) {
- var {
- target: { configValue: b, value: c },
- detail: { value: d },
- } = a;
- (this._config =
- void 0 !== d && null !== d
- ? l(l({}, this._config), {}, { [b]: d })
- : l(l({}, this._config), {}, { [b]: c })),
- Ud(this, "config-changed", { config: this._config });
- }
- }
- checkboxConfigChanged(a) {
- if (this._config && this.hass && this._firstRendered) {
- var {
- target: { value: b, checked: c },
- } = a;
- (this._config = l(l({}, this._config), {}, { [b]: c })),
- Ud(this, "config-changed", { config: this._config });
- }
- }
- }
- var Wd = "light-entity-card-editor";
- customElements.define(Wd, Vd),
- console.info(
- "%c LIGHT-ENTITY-CARD \n%c Version ".concat(
- {
- name: "light-entity-card",
- version: "5.0.0",
- description: "A light-entity card for Home Assistant Lovelace UI",
- keywords: [
- "home-assistant",
- "homeassistant",
- "hass",
- "automation",
- "lovelace",
- "custom-cards",
- "light-entity",
- ],
- repository: "git@github.com:ljmerza/light-entity-card.git",
- author: "Leonardo Merza
",
- license: "MIT",
- dependencies: {
- "@lit-labs/scoped-registry-mixin": "^1.0.0",
- "@material/mwc-icon": "^0.25.3",
- "@material/mwc-list": "^0.25.3",
- "@material/mwc-menu": "^0.25.3",
- "@material/mwc-notched-outline": "^0.25.3",
- "@material/mwc-ripple": "^0.25.3",
- "@material/mwc-select": "^0.25.3",
- "core-js": "^2.6.5",
- lit: "^2.1.2",
- },
- devDependencies: {
- "@babel/cli": "^7.4.3",
- "@babel/core": "^7.4.3",
- "@babel/plugin-proposal-class-properties": "^7.3.3",
- "@babel/plugin-proposal-decorators": "^7.3.0",
- "@babel/plugin-transform-template-literals": "^7.2.0",
- "@babel/preset-env": "^7.3.1",
- "@rollup/plugin-json": "^4.0.3",
- "babel-plugin-iife-wrap": "^1.1.0",
- "babel-preset-minify": "^0.5.0",
- eslint: "^5.16.0",
- "eslint-config-airbnb-base": "^13.1.0",
- "eslint-plugin-import": "2.16.0",
- rollup: "^0.66.6",
- "rollup-plugin-node-resolve": "^3.4.0",
- },
- resolutions: {
- lit: "^2.1.2",
- "lit-html": "2.1.2",
- "lit-element": "3.1.2",
- "@lit/reactive-element": "1.2.1",
- },
- scripts: {
- build: "npm run rollup && npm run babel",
- rollup: "rollup -c",
- babel:
- "babel dist/light-entity-card.js --out-file dist/light-entity-card.js",
- lint: "eslint src/* --ext .js",
- watch: "rollup -c --watch",
- start: "rollup -c --watch",
- },
- }.version,
- " "
- ),
- "color: orange; font-weight: bold; background: black",
- "color: white; font-weight: bold; background: dimgray"
- );
- class Xd extends La(Qb) {
- static get elementDefinitions() {
- return Vb(
- [
- Wb("ha-card"),
- Wb("more-info-light"),
- Wb("ha-switch"),
- Wb("ha-icon"),
- Wb("ha-slider"),
- Wb("ha-color-picker"),
- Td,
- Cc,
- ],
- Xd
- );
- }
- firstUpdated() {
- return o(function* () {
- if (window.loadCardHelpers) {
- var a = yield window.loadCardHelpers();
- a.importMoreInfoControl("light");
- }
- })();
- }
- static get properties() {
- return { hass: Object, config: Object };
- }
- setConfig(a) {
- if (!a.entity) throw Error("entity required.");
- (this.config = l(l({}, Tb), a)),
- (this._hueSegments = this.config.smooth_color_wheel ? 0 : 24),
- (this._saturationSegments = this.config.smooth_color_wheel ? 0 : 8);
- }
- static getConfigElement() {
- return o(function* () {
- return document.createElement(Wd);
- })();
- }
- static get featureNames() {
- return {
- brightness: 1,
- colorTemp: 2,
- effectList: 4,
- color: 16,
- whiteValue: 128,
- };
- }
- static get cmdToggle() {
- return { on: "turn_on", off: "turn_off" };
- }
- static get entityLength() {
- return { light: 10, switch: 1 };
- }
- getCardSize() {
- if (
- !this.config ||
- !this.__hass ||
- !this.__hass.states[this.config.entity]
- )
- return 1;
- var a = 0,
- b = this.__hass.states[this.config.entity];
- return (
- Array.isArray(b.attributes.entity_id)
- ? b.attributes.entity_id.forEach(
- (b) => (a += this.getEntityLength(b))
- )
- : (a += this.getEntityLength(b.attributes.entity_id)),
- this.config.group && (a *= 0.8),
- parseInt(a, 1)
- );
- }
- getEntityLength(a) {
- return /^light\./.test(a)
- ? Xd.entityLength.light
- : /^switch\./.test(a)
- ? Xd.entityLength.switch
- : 0;
- }
- get styles() {
- return Sb;
- }
- get language() {
- return this.__hass.resources[this.__hass.language];
- }
- isEntityOn(a) {
- return "on" === a.state;
- }
- updated() {
- (this._isUpdating = !1),
- this._shownStateObjects.forEach((a) => {
- var b = this.generateColorPickerId(a),
- c = this.shadowRoot.querySelectorAll("#".concat(b));
- if (c.length) {
- var d = (a.attributes.hs_color && a.attributes.hs_color[0]) || 0,
- e =
- (a.attributes.hs_color && a.attributes.hs_color[1] / 100) ||
- 0;
- c[0].desiredHsColor = { h: d, s: e };
- }
- });
- }
- render() {
- var a = this.__hass.states[this.config.entity];
- if (!a)
- return g(
- fa ||
- (fa = j([
- "\n \n ",
- " \n ",
- ])),
- this.styles,
- "Invalid entity: ".concat(this.config.entity)
- );
- (this._isUpdating = !0),
- (this._stateObjects = this.getEntitiesToShow(a)),
- (this._shownStateObjects = this.config.consolidate_entities
- ? [a]
- : [...this._stateObjects]);
- var b = this._shownStateObjects.reduce(
- (a, b) =>
- g(ga || (ga = j(["", "", ""])), a, this.createEntityTemplate(b)),
- ""
- ),
- c = "light-entity-card "
- .concat(this.config.shorten_cards ? " group" : "", " ")
- .concat(this.config.child_card ? " light-entity-child-card" : "");
- return g(
- ha ||
- (ha = j([
- "\n \n \n \n ',
- " ",
- "\n ",
- " ",
- "\n ",
- "\n \n ",
- " ",
- "\n ",
- ])),
- this.createHeader(a),
- b,
- this.createBrightnessSlider(a),
- this.createSpeedSlider(a),
- this.createIntensitySlider(a),
- this.createColorTemperature(a),
- this.createWhiteValue(a),
- this.createColorPicker(a),
- this.createEffectList(a)
- );
- }
- createHeader(a) {
- if (this.config.hide_header) return g(ja || (ja = j([""])));
- var b = this.config.header || a.attributes.friendly_name || a.entity_id;
- return g(
- ka ||
- (ka = j([
- '\n
+