@m3e/icon 1.0.6 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -19,20 +19,19 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
19
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
20
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
21
  PERFORMANCE OF THIS SOFTWARE.
22
- ***************************************************************************** */
23
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
24
-
25
-
26
- function __decorate(decorators, target, key, desc) {
27
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
- return c > 3 && r && Object.defineProperty(target, key, r), r;
31
- }
32
-
33
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
34
- var e = new Error(message);
35
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
22
+ ***************************************************************************** */
23
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
24
+
25
+ function __decorate(decorators, target, key, desc) {
26
+ var c = arguments.length,
27
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
28
+ d;
29
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31
+ }
32
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
33
+ var e = new Error(message);
34
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
36
35
  };
37
36
 
38
37
  /**
@@ -40,39 +39,395 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
40
39
  * Copyright 2017 Google LLC
41
40
  * SPDX-License-Identifier: BSD-3-Clause
42
41
  */
43
- const t$1=t=>(e,o)=>{ void 0!==o?o.addInitializer((()=>{customElements.define(t,e);})):customElements.define(t,e);};
42
+ const t$1 = t => (e, o) => {
43
+ void 0 !== o ? o.addInitializer(() => {
44
+ customElements.define(t, e);
45
+ }) : customElements.define(t, e);
46
+ };
44
47
 
45
48
  /**
46
49
  * @license
47
50
  * Copyright 2019 Google LLC
48
51
  * SPDX-License-Identifier: BSD-3-Clause
49
52
  */
50
- const t=globalThis,e$3=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o$2=new WeakMap;let n$2 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$3&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$2.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$2("string"==typeof t?t:t+"",void 0,s),S=(s,o)=>{if(e$3)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$3?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
53
+ const t = globalThis,
54
+ e$3 = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
55
+ s = Symbol(),
56
+ o$2 = new WeakMap();
57
+ let n$2 = class n {
58
+ constructor(t, e, o) {
59
+ if (this._$cssResult$ = true, o !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
60
+ this.cssText = t, this.t = e;
61
+ }
62
+ get styleSheet() {
63
+ let t = this.o;
64
+ const s = this.t;
65
+ if (e$3 && void 0 === t) {
66
+ const e = void 0 !== s && 1 === s.length;
67
+ e && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$2.set(s, t));
68
+ }
69
+ return t;
70
+ }
71
+ toString() {
72
+ return this.cssText;
73
+ }
74
+ };
75
+ const r$2 = t => new n$2("string" == typeof t ? t : t + "", void 0, s),
76
+ S = (s, o) => {
77
+ if (e$3) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
78
+ const o = document.createElement("style"),
79
+ n = t.litNonce;
80
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
81
+ }
82
+ },
83
+ c$1 = e$3 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
84
+ let e = "";
85
+ for (const s of t.cssRules) e += s.cssText;
86
+ return r$2(e);
87
+ })(t) : t;
51
88
 
52
89
  /**
53
90
  * @license
54
91
  * Copyright 2017 Google LLC
55
92
  * SPDX-License-Identifier: BSD-3-Clause
56
- */const{is:i,defineProperty:e$2,getOwnPropertyDescriptor:h,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$1,getPrototypeOf:n$1}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i(t,s),b={attribute:true,type:String,converter:u,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$2(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r$1(t),...o$1(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$1(s));}else void 0!==s&&i.push(c$1(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.1");
93
+ */
94
+ const {
95
+ is: i,
96
+ defineProperty: e$2,
97
+ getOwnPropertyDescriptor: h,
98
+ getOwnPropertyNames: r$1,
99
+ getOwnPropertySymbols: o$1,
100
+ getPrototypeOf: n$1
101
+ } = Object,
102
+ a = globalThis,
103
+ c = a.trustedTypes,
104
+ l = c ? c.emptyScript : "",
105
+ p = a.reactiveElementPolyfillSupport,
106
+ d = (t, s) => t,
107
+ u = {
108
+ toAttribute(t, s) {
109
+ switch (s) {
110
+ case Boolean:
111
+ t = t ? l : null;
112
+ break;
113
+ case Object:
114
+ case Array:
115
+ t = null == t ? t : JSON.stringify(t);
116
+ }
117
+ return t;
118
+ },
119
+ fromAttribute(t, s) {
120
+ let i = t;
121
+ switch (s) {
122
+ case Boolean:
123
+ i = null !== t;
124
+ break;
125
+ case Number:
126
+ i = null === t ? null : Number(t);
127
+ break;
128
+ case Object:
129
+ case Array:
130
+ try {
131
+ i = JSON.parse(t);
132
+ } catch (t) {
133
+ i = null;
134
+ }
135
+ }
136
+ return i;
137
+ }
138
+ },
139
+ f = (t, s) => !i(t, s),
140
+ b = {
141
+ attribute: true,
142
+ type: String,
143
+ converter: u,
144
+ reflect: false,
145
+ useDefault: false,
146
+ hasChanged: f
147
+ };
148
+ Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= new WeakMap();
149
+ class y extends HTMLElement {
150
+ static addInitializer(t) {
151
+ this._$Ei(), (this.l ??= []).push(t);
152
+ }
153
+ static get observedAttributes() {
154
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
155
+ }
156
+ static createProperty(t, s = b) {
157
+ if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
158
+ const i = Symbol(),
159
+ h = this.getPropertyDescriptor(t, i, s);
160
+ void 0 !== h && e$2(this.prototype, t, h);
161
+ }
162
+ }
163
+ static getPropertyDescriptor(t, s, i) {
164
+ const {
165
+ get: e,
166
+ set: r
167
+ } = h(this.prototype, t) ?? {
168
+ get() {
169
+ return this[s];
170
+ },
171
+ set(t) {
172
+ this[s] = t;
173
+ }
174
+ };
175
+ return {
176
+ get: e,
177
+ set(s) {
178
+ const h = e?.call(this);
179
+ r?.call(this, s), this.requestUpdate(t, h, i);
180
+ },
181
+ configurable: true,
182
+ enumerable: true
183
+ };
184
+ }
185
+ static getPropertyOptions(t) {
186
+ return this.elementProperties.get(t) ?? b;
187
+ }
188
+ static _$Ei() {
189
+ if (this.hasOwnProperty(d("elementProperties"))) return;
190
+ const t = n$1(this);
191
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
192
+ }
193
+ static finalize() {
194
+ if (this.hasOwnProperty(d("finalized"))) return;
195
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
196
+ const t = this.properties,
197
+ s = [...r$1(t), ...o$1(t)];
198
+ for (const i of s) this.createProperty(i, t[i]);
199
+ }
200
+ const t = this[Symbol.metadata];
201
+ if (null !== t) {
202
+ const s = litPropertyMetadata.get(t);
203
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
204
+ }
205
+ this._$Eh = new Map();
206
+ for (const [t, s] of this.elementProperties) {
207
+ const i = this._$Eu(t, s);
208
+ void 0 !== i && this._$Eh.set(i, t);
209
+ }
210
+ this.elementStyles = this.finalizeStyles(this.styles);
211
+ }
212
+ static finalizeStyles(s) {
213
+ const i = [];
214
+ if (Array.isArray(s)) {
215
+ const e = new Set(s.flat(1 / 0).reverse());
216
+ for (const s of e) i.unshift(c$1(s));
217
+ } else void 0 !== s && i.push(c$1(s));
218
+ return i;
219
+ }
220
+ static _$Eu(t, s) {
221
+ const i = s.attribute;
222
+ return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
223
+ }
224
+ constructor() {
225
+ super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
226
+ }
227
+ _$Ev() {
228
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
229
+ }
230
+ addController(t) {
231
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
232
+ }
233
+ removeController(t) {
234
+ this._$EO?.delete(t);
235
+ }
236
+ _$E_() {
237
+ const t = new Map(),
238
+ s = this.constructor.elementProperties;
239
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
240
+ t.size > 0 && (this._$Ep = t);
241
+ }
242
+ createRenderRoot() {
243
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
244
+ return S(t, this.constructor.elementStyles), t;
245
+ }
246
+ connectedCallback() {
247
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
248
+ }
249
+ enableUpdating(t) {}
250
+ disconnectedCallback() {
251
+ this._$EO?.forEach(t => t.hostDisconnected?.());
252
+ }
253
+ attributeChangedCallback(t, s, i) {
254
+ this._$AK(t, i);
255
+ }
256
+ _$ET(t, s) {
257
+ const i = this.constructor.elementProperties.get(t),
258
+ e = this.constructor._$Eu(t, i);
259
+ if (void 0 !== e && true === i.reflect) {
260
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u).toAttribute(s, i.type);
261
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
262
+ }
263
+ }
264
+ _$AK(t, s) {
265
+ const i = this.constructor,
266
+ e = i._$Eh.get(t);
267
+ if (void 0 !== e && this._$Em !== e) {
268
+ const t = i.getPropertyOptions(e),
269
+ h = "function" == typeof t.converter ? {
270
+ fromAttribute: t.converter
271
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u;
272
+ this._$Em = e;
273
+ const r = h.fromAttribute(s, t.type);
274
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
275
+ }
276
+ }
277
+ requestUpdate(t, s, i) {
278
+ if (void 0 !== t) {
279
+ const e = this.constructor,
280
+ h = this[t];
281
+ if (i ??= e.getPropertyOptions(t), !((i.hasChanged ?? f)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(e._$Eu(t, i)))) return;
282
+ this.C(t, s, i);
283
+ }
284
+ false === this.isUpdatePending && (this._$ES = this._$EP());
285
+ }
286
+ C(t, s, {
287
+ useDefault: i,
288
+ reflect: e,
289
+ wrapped: h
290
+ }, r) {
291
+ i && !(this._$Ej ??= new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), true !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), true === e && this._$Em !== t && (this._$Eq ??= new Set()).add(t));
292
+ }
293
+ async _$EP() {
294
+ this.isUpdatePending = true;
295
+ try {
296
+ await this._$ES;
297
+ } catch (t) {
298
+ Promise.reject(t);
299
+ }
300
+ const t = this.scheduleUpdate();
301
+ return null != t && (await t), !this.isUpdatePending;
302
+ }
303
+ scheduleUpdate() {
304
+ return this.performUpdate();
305
+ }
306
+ performUpdate() {
307
+ if (!this.isUpdatePending) return;
308
+ if (!this.hasUpdated) {
309
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
310
+ for (const [t, s] of this._$Ep) this[t] = s;
311
+ this._$Ep = void 0;
312
+ }
313
+ const t = this.constructor.elementProperties;
314
+ if (t.size > 0) for (const [s, i] of t) {
315
+ const {
316
+ wrapped: t
317
+ } = i,
318
+ e = this[s];
319
+ true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
320
+ }
321
+ }
322
+ let t = false;
323
+ const s = this._$AL;
324
+ try {
325
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
326
+ } catch (s) {
327
+ throw t = false, this._$EM(), s;
328
+ }
329
+ t && this._$AE(s);
330
+ }
331
+ willUpdate(t) {}
332
+ _$AE(t) {
333
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
334
+ }
335
+ _$EM() {
336
+ this._$AL = new Map(), this.isUpdatePending = false;
337
+ }
338
+ get updateComplete() {
339
+ return this.getUpdateComplete();
340
+ }
341
+ getUpdateComplete() {
342
+ return this._$ES;
343
+ }
344
+ shouldUpdate(t) {
345
+ return true;
346
+ }
347
+ update(t) {
348
+ this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
349
+ }
350
+ updated(t) {}
351
+ firstUpdated(t) {}
352
+ }
353
+ y.elementStyles = [], y.shadowRootOptions = {
354
+ mode: "open"
355
+ }, y[d("elementProperties")] = new Map(), y[d("finalized")] = new Map(), p?.({
356
+ ReactiveElement: y
357
+ }), (a.reactiveElementVersions ??= []).push("2.1.1");
57
358
 
58
359
  /**
59
360
  * @license
60
361
  * Copyright 2017 Google LLC
61
362
  * SPDX-License-Identifier: BSD-3-Clause
62
- */const o={attribute:true,type:String,converter:u,reflect:false,hasChanged:f},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=true),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n(t){return (e,o)=>"object"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
363
+ */
364
+ const o = {
365
+ attribute: true,
366
+ type: String,
367
+ converter: u,
368
+ reflect: false,
369
+ hasChanged: f
370
+ },
371
+ r = (t = o, e, r) => {
372
+ const {
373
+ kind: n,
374
+ metadata: i
375
+ } = r;
376
+ let s = globalThis.litPropertyMetadata.get(i);
377
+ if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = new Map()), "setter" === n && ((t = Object.create(t)).wrapped = true), s.set(r.name, t), "accessor" === n) {
378
+ const {
379
+ name: o
380
+ } = r;
381
+ return {
382
+ set(r) {
383
+ const n = e.get.call(this);
384
+ e.set.call(this, r), this.requestUpdate(o, n, t);
385
+ },
386
+ init(e) {
387
+ return void 0 !== e && this.C(o, void 0, t, e), e;
388
+ }
389
+ };
390
+ }
391
+ if ("setter" === n) {
392
+ const {
393
+ name: o
394
+ } = r;
395
+ return function (r) {
396
+ const n = this[o];
397
+ e.call(this, r), this.requestUpdate(o, n, t);
398
+ };
399
+ }
400
+ throw Error("Unsupported decorator location: " + n);
401
+ };
402
+ function n(t) {
403
+ return (e, o) => "object" == typeof o ? r(t, e, o) : ((t, e, o) => {
404
+ const r = e.hasOwnProperty(o);
405
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
406
+ })(t, e, o);
407
+ }
63
408
 
64
409
  /**
65
410
  * @license
66
411
  * Copyright 2017 Google LLC
67
412
  * SPDX-License-Identifier: BSD-3-Clause
68
413
  */
69
- const e$1=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
414
+ const e$1 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
70
415
 
71
416
  /**
72
417
  * @license
73
418
  * Copyright 2017 Google LLC
74
419
  * SPDX-License-Identifier: BSD-3-Clause
75
- */function e(e,r){return (n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;return e$1(n,s,{get(){return o(this)}})}}
420
+ */
421
+ function e(e, r) {
422
+ return (n, s, i) => {
423
+ const o = t => t.renderRoot?.querySelector(e) ?? null;
424
+ return e$1(n, s, {
425
+ get() {
426
+ return o(this);
427
+ }
428
+ });
429
+ };
430
+ }
76
431
 
77
432
  /**
78
433
  * A small symbol used to easily identify an action or category.
@@ -109,130 +464,84 @@ const e$1=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"obj
109
464
  * @attr weight - A value from 100 to 700 indicating the weight of the icon.
110
465
  */
111
466
  let M3eIconElement = class M3eIconElement extends Role(LitElement, "img") {
112
- constructor() {
113
- super(...arguments);
114
- /** The name of the icon. */
115
- this.name = "";
116
- /**
117
- * The appearance variant of the icon.
118
- * @default "outlined"
119
- */
120
- this.variant = "outlined";
121
- /**
122
- * Whether the icon is filled.
123
- * @default false
124
- */
125
- this.filled = false;
126
- /**
127
- * The grade of the icon.
128
- * @default "medium"
129
- */
130
- this.grade = "medium";
131
- /**
132
- * A value from 100 to 700 indicating the weight of the icon.
133
- * @default 400
134
- */
135
- this.weight = 400;
136
- /**
137
- * A value from 20 to 48 indicating the optical size of the icon.
138
- * @default 24
139
- */
140
- this.opticalSize = 24;
141
- }
142
- /** @inheritdoc */
143
- connectedCallback() {
144
- if (!this.hasAttribute("aria-label") &&
145
- !this.hasAttribute("aria-labelledby") &&
146
- !this.hasAttribute("aria-hidden")) {
147
- this.ariaHidden = "true";
148
- }
149
- super.connectedCallback();
467
+ constructor() {
468
+ super(...arguments);
469
+ /** The name of the icon. */
470
+ this.name = "";
471
+ /**
472
+ * The appearance variant of the icon.
473
+ * @default "outlined"
474
+ */
475
+ this.variant = "outlined";
476
+ /**
477
+ * Whether the icon is filled.
478
+ * @default false
479
+ */
480
+ this.filled = false;
481
+ /**
482
+ * The grade of the icon.
483
+ * @default "medium"
484
+ */
485
+ this.grade = "medium";
486
+ /**
487
+ * A value from 100 to 700 indicating the weight of the icon.
488
+ * @default 400
489
+ */
490
+ this.weight = 400;
491
+ /**
492
+ * A value from 20 to 48 indicating the optical size of the icon.
493
+ * @default 24
494
+ */
495
+ this.opticalSize = 24;
496
+ }
497
+ /** @inheritdoc */
498
+ connectedCallback() {
499
+ if (!this.hasAttribute("aria-label") && !this.hasAttribute("aria-labelledby") && !this.hasAttribute("aria-hidden")) {
500
+ this.ariaHidden = "true";
150
501
  }
151
- /** @inheritdoc */
152
- updated(_changedProperties) {
153
- super.updated(_changedProperties);
154
- if (_changedProperties.has("filled")) {
155
- this._icon?.style.setProperty("--_icon-fill", this.filled ? "1" : "0");
156
- }
157
- if (_changedProperties.has("grade")) {
158
- this._icon?.style.setProperty("--_icon-grade", this.grade === "low" ? "-25" : this.grade === "high" ? "200" : "0");
159
- }
160
- if (_changedProperties.has("weight")) {
161
- this._icon?.style.setProperty("--_icon-weight", `${this.weight}`);
162
- }
163
- if (_changedProperties.has("opticalSize")) {
164
- this._icon?.style.setProperty("--_icon-optical-size", `${this.opticalSize}`);
165
- }
502
+ super.connectedCallback();
503
+ }
504
+ /** @inheritdoc */
505
+ updated(_changedProperties) {
506
+ super.updated(_changedProperties);
507
+ if (_changedProperties.has("filled")) {
508
+ this._icon?.style.setProperty("--_icon-fill", this.filled ? "1" : "0");
509
+ }
510
+ if (_changedProperties.has("grade")) {
511
+ this._icon?.style.setProperty("--_icon-grade", this.grade === "low" ? "-25" : this.grade === "high" ? "200" : "0");
512
+ }
513
+ if (_changedProperties.has("weight")) {
514
+ this._icon?.style.setProperty("--_icon-weight", `${this.weight}`);
166
515
  }
167
- /** @inheritdoc */
168
- render() {
169
- return html `<div class="icon" aria-hidden="true">${this.name}</div>`;
516
+ if (_changedProperties.has("opticalSize")) {
517
+ this._icon?.style.setProperty("--_icon-optical-size", `${this.opticalSize}`);
170
518
  }
519
+ }
520
+ /** @inheritdoc */
521
+ render() {
522
+ return html`<div class="icon" aria-hidden="true">${this.name}</div>`;
523
+ }
171
524
  };
172
525
  /** The styles of the element. */
173
- M3eIconElement.styles = css `
174
- :host {
175
- display: inline-block;
176
- user-select: none;
177
- font-size: var(--m3e-icon-size, 1.5rem);
178
- width: 1em;
179
- vertical-align: middle;
180
- overflow: hidden;
181
- }
182
- .icon {
183
- font-weight: normal;
184
- font-style: normal;
185
- line-height: 1;
186
- letter-spacing: normal;
187
- text-transform: none;
188
- white-space: nowrap;
189
- word-wrap: normal;
190
- direction: ltr;
191
- font-feature-settings: "liga";
192
- -webkit-font-smoothing: antialiased;
193
- width: inherit;
194
- height: inherit;
195
- vertical-align: inherit;
196
- font-variation-settings:
197
- "FILL" var(--_icon-fill, 0),
198
- "wght" var(--_icon-weight, 400),
199
- "GRAD" var(--_icon-grade, 0),
200
- "opsz" var(--_icon-optical-size, 24);
201
- }
202
- :host([variant="outlined"]) .icon {
203
- font-family: "Material Symbols Outlined";
204
- }
205
- :host([variant="rounded"]) .icon {
206
- font-family: "Material Symbols Rounded";
207
- }
208
- :host([variant="sharp"]) .icon {
209
- font-family: "Material Symbols Sharp";
210
- }
211
- `;
212
- __decorate([
213
- e(".icon")
214
- ], M3eIconElement.prototype, "_icon", void 0);
215
- __decorate([
216
- n()
217
- ], M3eIconElement.prototype, "name", void 0);
218
- __decorate([
219
- n({ reflect: true })
220
- ], M3eIconElement.prototype, "variant", void 0);
221
- __decorate([
222
- n({ type: Boolean, reflect: true })
223
- ], M3eIconElement.prototype, "filled", void 0);
224
- __decorate([
225
- n()
226
- ], M3eIconElement.prototype, "grade", void 0);
227
- __decorate([
228
- n({ type: Number })
229
- ], M3eIconElement.prototype, "weight", void 0);
230
- __decorate([
231
- n({ attribute: "optical-size", type: Number })
232
- ], M3eIconElement.prototype, "opticalSize", void 0);
233
- M3eIconElement = __decorate([
234
- t$1("m3e-icon")
235
- ], M3eIconElement);
526
+ M3eIconElement.styles = css`:host { display: inline-block; user-select: none; font-size: var(--m3e-icon-size, 1.5rem); width: 1em; vertical-align: middle; overflow: hidden; } .icon { font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; width: inherit; height: inherit; vertical-align: inherit; font-variation-settings: "FILL" var(--_icon-fill, 0), "wght" var(--_icon-weight, 400), "GRAD" var(--_icon-grade, 0), "opsz" var(--_icon-optical-size, 24); } :host([variant="outlined"]) .icon { font-family: "Material Symbols Outlined"; } :host([variant="rounded"]) .icon { font-family: "Material Symbols Rounded"; } :host([variant="sharp"]) .icon { font-family: "Material Symbols Sharp"; }`;
527
+ __decorate([e(".icon")], M3eIconElement.prototype, "_icon", void 0);
528
+ __decorate([n()], M3eIconElement.prototype, "name", void 0);
529
+ __decorate([n({
530
+ reflect: true
531
+ })], M3eIconElement.prototype, "variant", void 0);
532
+ __decorate([n({
533
+ type: Boolean,
534
+ reflect: true
535
+ })], M3eIconElement.prototype, "filled", void 0);
536
+ __decorate([n()], M3eIconElement.prototype, "grade", void 0);
537
+ __decorate([n({
538
+ type: Number
539
+ })], M3eIconElement.prototype, "weight", void 0);
540
+ __decorate([n({
541
+ attribute: "optical-size",
542
+ type: Number
543
+ })], M3eIconElement.prototype, "opticalSize", void 0);
544
+ M3eIconElement = __decorate([t$1("m3e-icon")], M3eIconElement);
236
545
 
237
546
  export { M3eIconElement };
238
547
  //# sourceMappingURL=index.js.map