@ui0/icon 0.1.4 → 0.1.5

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.
@@ -1,70 +1,70 @@
1
- var At = Object.defineProperty;
2
- var St = (r, t, e) => t in r ? At(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var I = (r, t, e) => St(r, typeof t != "symbol" ? t + "" : t, e);
4
- import { createHash as Nt } from "node:crypto";
5
- import { createRequire as kt } from "node:module";
6
- import k from "node:path";
7
- import { parse as Ct, compileTemplate as Et, compileStyle as Pt } from "vue/compiler-sfc";
8
- import { readdirSync as Ft, readFileSync as z } from "node:fs";
1
+ var St = Object.defineProperty;
2
+ var Nt = (r, t, e) => t in r ? St(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var I = (r, t, e) => Nt(r, typeof t != "symbol" ? t + "" : t, e);
4
+ import { createHash as kt } from "node:crypto";
5
+ import { createRequire as Ct } from "node:module";
6
+ import N from "node:path";
7
+ import { parse as Et, compileTemplate as Pt, compileStyle as Ft } from "vue/compiler-sfc";
8
+ import { readdirSync as It, readFileSync as z, statSync as Ot } from "node:fs";
9
9
  function X(r, t, e, s = 480, i = 480) {
10
- const f = r.split(/[\s,]+/).map(parseFloat), l = r.includes(",") ? "," : " ";
11
- return f.map((a, o) => {
10
+ const c = r.split(/[\s,]+/).map(parseFloat), a = r.includes(",") ? "," : " ";
11
+ return c.map((n, o) => {
12
12
  const u = o % 2 === 0, p = u ? s : i, g = u ? t : e;
13
- return ((a - p) * g + p).toFixed(2);
14
- }).reduce((a, o, u) => a + (u > 0 ? u % 2 === 0 ? " " : l : "") + o, "");
13
+ return ((n - p) * g + p).toFixed(2);
14
+ }).reduce((n, o, u) => n + (u > 0 ? u % 2 === 0 ? " " : a : "") + o, "");
15
15
  }
16
16
  function at(r, t) {
17
17
  return r.replace(/([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)/g, (e) => (parseFloat(e) * t).toFixed(2));
18
18
  }
19
19
  function tt(r, t, e) {
20
- const [s = 0, i = 0] = e, { x1: f, y1: l, x2: a, y2: o, ...u } = r, p = parseFloat(f).toFixed(3), g = parseFloat(l).toFixed(3), n = parseFloat(a).toFixed(3), m = parseFloat(o).toFixed(3), c = (h, d) => (d + (h - d) * t).toFixed(3);
20
+ const [s = 0, i = 0] = e, { x1: c, y1: a, x2: n, y2: o, ...u } = r, p = parseFloat(c).toFixed(3), g = parseFloat(a).toFixed(3), l = parseFloat(n).toFixed(3), m = parseFloat(o).toFixed(3), f = (h, d) => (d + (h - d) * t).toFixed(3);
21
21
  return {
22
22
  ...u,
23
23
  // Сохраняем остальные атрибуты
24
- x1: c(+p, s),
25
- y1: c(+g, i),
26
- x2: c(+n, s),
27
- y2: c(+m, i)
24
+ x1: f(+p, s),
25
+ y1: f(+g, i),
26
+ x2: f(+l, s),
27
+ y2: f(+m, i)
28
28
  };
29
29
  }
30
30
  function et(r, t, e) {
31
- const [s = 0, i = 0] = e, { x: f, y: l, width: a, height: o, ...u } = r, p = (g, n) => (n + (g - n) * t).toFixed(3);
31
+ const [s = 0, i = 0] = e, { x: c, y: a, width: n, height: o, ...u } = r, p = (g, l) => (l + (g - l) * t).toFixed(3);
32
32
  return {
33
33
  ...u,
34
- x: p(+f, s),
35
- y: p(+l, i),
36
- width: (+a * t).toFixed(3),
34
+ x: p(+c, s),
35
+ y: p(+a, i),
36
+ width: (+n * t).toFixed(3),
37
37
  height: (+o * t).toFixed(3)
38
38
  };
39
39
  }
40
40
  function D(r, t, e) {
41
- return isNaN(t) || isNaN(e) ? r : r.replace(/([MLHVCSQTZmlhvcsqtaz])([^MLHVCSQTZmlhvcsqtaz]*)/gi, (s, i, f) => {
41
+ return isNaN(t) || isNaN(e) ? r : r.replace(/([MLHVCSQTZmlhvcsqtaz])([^MLHVCSQTZmlhvcsqtaz]*)/gi, (s, i, c) => {
42
42
  if (/^[Zz]$/.test(i)) return i;
43
- const l = i === i.toLowerCase();
44
- let a = i, o = 0;
45
- return f.split(/[\s,]+/).filter(Boolean).forEach((u) => {
43
+ const a = i === i.toLowerCase();
44
+ let n = i, o = 0;
45
+ return c.split(/[\s,]+/).filter(Boolean).forEach((u) => {
46
46
  const p = parseFloat(u);
47
47
  let g = u;
48
- isNaN(p) || (l || (g = (o % 2 === 0 ? p + t : p + e).toFixed(3)), o++), a += (a === i ? "" : " ") + g;
49
- }), a;
48
+ isNaN(p) || (a || (g = (o % 2 === 0 ? p + t : p + e).toFixed(3)), o++), n += (n === i ? "" : " ") + g;
49
+ }), n;
50
50
  });
51
51
  }
52
- function It(r) {
52
+ function _t(r) {
53
53
  return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, e) => (e ? "-" : "") + t.toLowerCase());
54
54
  }
55
55
  function st(r) {
56
56
  return r.startsWith("@") || r.startsWith(":") ? r : r.replace(/[^a-zA-Z0-9]+(.)/g, (t, e) => e.toUpperCase()).replace(/^[A-Z]/, (t) => t.toLowerCase());
57
57
  }
58
- function Ot(r, t, e) {
58
+ function Mt(r, t, e) {
59
59
  const s = [];
60
60
  for (let i = 0; i < r.length; i++) {
61
- const f = r.indexOf(">", i);
62
- if (r.startsWith(`<${t}`, i) && f > -1 && r[f - 1] !== "/" && s.push(i), r.startsWith(`</${t}>`, i) && s.length > 0 && s.pop() === e)
61
+ const c = r.indexOf(">", i);
62
+ if (r.startsWith(`<${t}`, i) && c > -1 && r[c - 1] !== "/" && s.push(i), r.startsWith(`</${t}>`, i) && s.length > 0 && s.pop() === e)
63
63
  return i;
64
64
  }
65
65
  return -1;
66
66
  }
67
- const _t = [
67
+ const Bt = [
68
68
  "attributeName",
69
69
  "repeatCount",
70
70
  "repeatDur",
@@ -80,7 +80,7 @@ const _t = [
80
80
  "lengthAdjust",
81
81
  "ariaHidden",
82
82
  "ariaLabel"
83
- ], Mt = [
83
+ ], jt = [
84
84
  "svg",
85
85
  "g",
86
86
  "path",
@@ -144,8 +144,8 @@ const _t = [
144
144
  "a",
145
145
  "switch"
146
146
  ];
147
- function Bt(r, t) {
148
- return Mt.includes(r.tag) ? !_t.includes(t) : !0;
147
+ function Lt(r, t) {
148
+ return jt.includes(r.tag) ? !Bt.includes(t) : !0;
149
149
  }
150
150
  class x {
151
151
  static createNode(t = {}) {
@@ -175,11 +175,11 @@ class x {
175
175
  if (!e) return !1;
176
176
  const s = Array.isArray(e) ? e : [e];
177
177
  for (const i of s) {
178
- let f = this.parent;
179
- for (; f !== null; ) {
180
- if (f === i)
178
+ let c = this.parent;
179
+ for (; c !== null; ) {
180
+ if (c === i)
181
181
  return !0;
182
- f = f.parent;
182
+ c = c.parent;
183
183
  }
184
184
  }
185
185
  return !1;
@@ -209,7 +209,7 @@ class x {
209
209
  // todo when exists end tag between quotes - "something >" parser have issues
210
210
  static parse(t, e, s = {}) {
211
211
  let i = t.replace(/\r?\n/g, " ").replace(/\s+/g, " ").trim();
212
- const f = [], { parent: l = null } = s;
212
+ const c = [], { parent: a = null } = s;
213
213
  for (; i.length > 0; ) {
214
214
  if (i.startsWith("<!--")) {
215
215
  const d = i.indexOf("-->") + 3;
@@ -242,33 +242,33 @@ class x {
242
242
  tag: "#text",
243
243
  attributes: {},
244
244
  children: [],
245
- parent: l,
245
+ parent: a,
246
246
  content: b,
247
247
  raw: b
248
248
  }), v = e ? e(y) : y;
249
- v && f.push(...Array.isArray(v) ? v : [v]), i = d === -1 ? "" : i.slice(d);
249
+ v && c.push(...Array.isArray(v) ? v : [v]), i = d === -1 ? "" : i.slice(d);
250
250
  continue;
251
251
  }
252
- const a = i.indexOf(">");
253
- if (a === -1) break;
254
- const o = i[a - 1] === "/", u = i.slice(1, o ? a - 1 : a), p = u.indexOf(" "), g = p === -1 ? u : u.slice(0, p), n = p === -1 ? "" : u.slice(p + 1), m = this.createNode({
252
+ const n = i.indexOf(">");
253
+ if (n === -1) break;
254
+ const o = i[n - 1] === "/", u = i.slice(1, o ? n - 1 : n), p = u.indexOf(" "), g = p === -1 ? u : u.slice(0, p), l = p === -1 ? "" : u.slice(p + 1), m = this.createNode({
255
255
  tag: g,
256
- attributes: this.parseAttributes(n),
256
+ attributes: this.parseAttributes(l),
257
257
  children: [],
258
- parent: l,
258
+ parent: a,
259
259
  content: "",
260
260
  raw: ""
261
261
  // Will be set later
262
262
  });
263
- let c = a + 1;
263
+ let f = n + 1;
264
264
  if (!o) {
265
- const d = `</${g}>`, b = Ot(i, g, 0);
266
- b !== -1 && (m.raw = i.slice(c, b), m.content = m.raw.slice(0, b - c), m.raw.includes("<") && (m.children = this.parse(m.raw, e, { parent: m })), c = b + d.length);
265
+ const d = `</${g}>`, b = Mt(i, g, 0);
266
+ b !== -1 && (m.raw = i.slice(f, b), m.content = m.raw.slice(0, b - f), m.raw.includes("<") && (m.children = this.parse(m.raw, e, { parent: m })), f = b + d.length);
267
267
  }
268
268
  const h = e ? e(m) : m;
269
- h ? f.push(...Array.isArray(h) ? h : [h]) : m.parent && (m.parent.content = m.parent.content.replace(this.serialize(m), "")), i = i.slice(c).trim();
269
+ h ? c.push(...Array.isArray(h) ? h : [h]) : m.parent && (m.parent.content = m.parent.content.replace(this.serialize(m), "")), i = i.slice(f).trim();
270
270
  }
271
- return f;
271
+ return c;
272
272
  }
273
273
  static parseAsSingle(t, e, s = {}) {
274
274
  return this.parse(t, e, s)[0];
@@ -281,7 +281,7 @@ class x {
281
281
  static serialize(t) {
282
282
  if (Array.isArray(t))
283
283
  return t.map((i) => this.serialize(i)).join("");
284
- const e = Object.entries(t.attributes).map(([i, f]) => ` ${Bt(t, i) ? It(i) : i}="${f}"`).join(""), s = t.children.map((i) => this.serialize(i)).join("");
284
+ const e = Object.entries(t.attributes).map(([i, c]) => ` ${Lt(t, i) ? _t(i) : i}="${c}"`).join(""), s = t.children.map((i) => this.serialize(i)).join("");
285
285
  return t.children.length === 0 ? t.content ? `<${t.tag}${e}>${t.content}</${t.tag}>` : `<${t.tag}${e}/>` : `<${t.tag}${e}>${s}</${t.tag}>`;
286
286
  }
287
287
  /**
@@ -292,10 +292,10 @@ class x {
292
292
  * @param options Optional traversal options
293
293
  */
294
294
  static walk(t, e, s) {
295
- const i = Array.isArray(t) ? t : [t], f = (s == null ? void 0 : s.includeText) ?? !0, l = (a) => {
296
- (a.tag !== "#text" || f) && e(a) === !1 || a.children.forEach((o) => l(o));
295
+ const i = Array.isArray(t) ? t : [t], c = (s == null ? void 0 : s.includeText) ?? !0, a = (n) => {
296
+ (n.tag !== "#text" || c) && e(n) === !1 || n.children.forEach((o) => a(o));
297
297
  };
298
- i.forEach(l);
298
+ i.forEach(a);
299
299
  }
300
300
  static clone(t, e = null) {
301
301
  const s = this.createNode({
@@ -316,7 +316,7 @@ class x {
316
316
  return e;
317
317
  }
318
318
  }
319
- const Lt = /* @__PURE__ */ new Set(["path", "rect", "circle", "ellipse", "line", "polyline", "polygon"]), nt = ["dataProgressAt", "dataProgressInactive", "dataProgressActive"];
319
+ const Rt = /* @__PURE__ */ new Set(["path", "rect", "circle", "ellipse", "line", "polyline", "polygon"]), ct = ["dataProgressAt", "dataProgressInactive", "dataProgressActive"];
320
320
  function $(r, t) {
321
321
  throw new Error(`[ui0-icon] ${r}: ${t}`);
322
322
  }
@@ -334,114 +334,114 @@ function U(r, t, e) {
334
334
  };
335
335
  }
336
336
  function P(r) {
337
- return nt.some((t) => r.attributes[t] !== void 0);
337
+ return ct.some((t) => r.attributes[t] !== void 0);
338
338
  }
339
339
  function J(r, t) {
340
340
  P(r) && $(t, "progress declaration inside an excluded subtree"), r.children.forEach((e) => J(e, t));
341
341
  }
342
342
  function it(r) {
343
- return JSON.stringify(nt.map((t) => r.attributes[t]));
343
+ return JSON.stringify(ct.map((t) => r.attributes[t]));
344
344
  }
345
- function Rt(r, t) {
345
+ function Tt(r, t) {
346
346
  const e = [], s = r.attributes.dataProgressBy === "layers";
347
347
  r.attributes.dataProgressBy !== void 0 && !s && $(t, `unknown progress target mode '${r.attributes.dataProgressBy}'`);
348
- const f = (r.attributes.dataIcon ?? "").split(/[\s,]+/).includes("no-progress") || r.hasClass("no-progress"), l = (r.attributes.dataLayers ?? "").split(/[\s,]+/).filter(Boolean);
349
- s && (!l.length || new Set(l).size !== l.length) && $(t, "layer progress requires a nonempty, unique data-layers list");
350
- const a = new Map(l.map((n) => [n, []])), o = (n, m, c) => {
351
- if (["defs", "mask", "clipPath"].includes(n.tag)) {
352
- J(n, t);
348
+ const c = (r.attributes.dataIcon ?? "").split(/[\s,]+/).includes("no-progress") || r.hasClass("no-progress"), a = (r.attributes.dataLayers ?? "").split(/[\s,]+/).filter(Boolean);
349
+ s && (!a.length || new Set(a).size !== a.length) && $(t, "layer progress requires a nonempty, unique data-layers list");
350
+ const n = new Map(a.map((l) => [l, []])), o = (l, m, f) => {
351
+ if (["defs", "mask", "clipPath"].includes(l.tag)) {
352
+ J(l, t);
353
353
  return;
354
354
  }
355
- if (f || n.hasClass("no-progress") || n.hasAttr("data-skip")) {
356
- J(n, t);
355
+ if (c || l.hasClass("no-progress") || l.hasAttr("data-skip")) {
356
+ J(l, t);
357
357
  return;
358
358
  }
359
- const h = n.tag === "g" && n.hasAttr("data-group");
360
- if (m && (h || P(n)) && $(t, "nested progress targets conflict with their containing group"), s) {
361
- const d = n.attributes.dataLayer;
362
- d !== void 0 ? (a.has(d) || $(t, `unknown layer '${d}'`), c !== void 0 && $(t, "nested progress layers overlap"), a.get(d).push(n)) : P(n) && n !== r && $(t, "layer progress declarations must be placed on a data-layer node"), n.children.forEach((b) => o(b, !1, d ?? c));
359
+ const h = l.tag === "g" && l.hasAttr("data-group");
360
+ if (m && (h || P(l)) && $(t, "nested progress targets conflict with their containing group"), s) {
361
+ const d = l.attributes.dataLayer;
362
+ d !== void 0 ? (n.has(d) || $(t, `unknown layer '${d}'`), f !== void 0 && $(t, "nested progress layers overlap"), n.get(d).push(l)) : P(l) && l !== r && $(t, "layer progress declarations must be placed on a data-layer node"), l.children.forEach((b) => o(b, !1, d ?? f));
363
363
  } else {
364
- const d = h || Lt.has(n.tag);
365
- if (n.attributes[":opacity"] !== void 0 || n.attributes[":data-p-on"] !== void 0) {
366
- P(n) && $(t, "progress conflicts with an existing :opacity binding");
364
+ const d = h || Rt.has(l.tag);
365
+ if (l.attributes[":opacity"] !== void 0 || l.attributes[":data-p-on"] !== void 0) {
366
+ P(l) && $(t, "progress conflicts with an existing :opacity binding");
367
367
  return;
368
368
  }
369
- !m && d && e.push([n]), !d && P(n) && n !== r && $(t, "progress declaration requires a paint node or data-group"), n.children.forEach((b) => o(b, m || h));
369
+ !m && d && e.push([l]), !d && P(l) && l !== r && $(t, "progress declaration requires a paint node or data-group"), l.children.forEach((b) => o(b, m || h));
370
370
  }
371
371
  };
372
- if (o(r, !1), s && !f)
373
- for (const [n, m] of a)
374
- m.length || $(t, `layer '${n}' has no progress targets`), e.push(m);
375
- const u = e.map((n) => n.filter(P)), p = u.some((n) => n.length);
376
- return { steps: e.map((n, m) => {
372
+ if (o(r, !1), s && !c)
373
+ for (const [l, m] of n)
374
+ m.length || $(t, `layer '${l}' has no progress targets`), e.push(m);
375
+ const u = e.map((l) => l.filter(P)), p = u.some((l) => l.length);
376
+ return { steps: e.map((l, m) => {
377
377
  var b;
378
- const c = u[m];
379
- c.some((y) => it(y) !== it(c[0])) && $(t, "conflicting declarations for the same layer");
380
- const h = ((b = c[0]) == null ? void 0 : b.attributes) ?? {};
378
+ const f = u[m];
379
+ f.some((y) => it(y) !== it(f[0])) && $(t, "conflicting declarations for the same layer");
380
+ const h = ((b = f[0]) == null ? void 0 : b.attributes) ?? {};
381
381
  p && h.dataProgressAt === void 0 && $(t, "explicit and automatic progress thresholds cannot be mixed");
382
382
  const d = p ? B(h.dataProgressAt, 0, 100, `${t} at`) : Number((100 * (m + 1) / e.length).toFixed(3));
383
383
  return {
384
- targets: n,
384
+ targets: l,
385
385
  at: d,
386
386
  ...U({ inactive: h.dataProgressInactive, active: h.dataProgressActive }, {}, t)
387
387
  };
388
388
  }) };
389
389
  }
390
- function jt(r, t, e) {
390
+ function zt(r, t, e) {
391
391
  if (!r) return { steps: [] };
392
392
  Array.isArray(r.steps) || $(e, "progress.steps must be an array");
393
- const s = U(r, {}, e), i = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map(), l = (o) => {
393
+ const s = U(r, {}, e), i = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map(), a = (o) => {
394
394
  if (["defs", "mask", "clipPath"].includes(o.tag) || o.hasClass("no-progress") || o.hasAttr("data-skip")) return;
395
395
  const u = o.attributes.dataLayer;
396
- u && f.set(u, [...f.get(u) ?? [], o]), o.children.forEach(l);
396
+ u && c.set(u, [...c.get(u) ?? [], o]), o.children.forEach(a);
397
397
  };
398
- return t.forEach(l), { steps: r.steps.map((o, u) => {
398
+ return t.forEach(a), { steps: r.steps.map((o, u) => {
399
399
  const p = `${e} progress step ${u + 1}`;
400
400
  o.at === void 0 && $(p, "at is required");
401
401
  const g = o.cells !== void 0;
402
402
  g === (o.layers !== void 0) && $(p, "use either cells or layers");
403
- const n = g ? o.cells : o.layers;
404
- n.length || $(p, "target list cannot be empty");
403
+ const l = g ? o.cells : o.layers;
404
+ l.length || $(p, "target list cannot be empty");
405
405
  const m = [];
406
- for (const c of n) {
407
- const h = g ? t.has(c) ? [t.get(c)] : [] : f.get(c) ?? [];
408
- h.length || $(p, `unknown ${g ? "cell" : "layer"} '${c}'`);
406
+ for (const f of l) {
407
+ const h = g ? t.has(f) ? [t.get(f)] : [] : c.get(f) ?? [];
408
+ h.length || $(p, `unknown ${g ? "cell" : "layer"} '${f}'`);
409
409
  for (const d of h)
410
- [...i].some((b) => b === d || d.isChildOf(b) || b.isChildOf(d)) && $(p, `overlapping target '${c}'`), i.add(d), m.push(d);
410
+ [...i].some((b) => b === d || d.isChildOf(b) || b.isChildOf(d)) && $(p, `overlapping target '${f}'`), i.add(d), m.push(d);
411
411
  }
412
412
  return { targets: m, at: B(o.at, 0, 100, `${p} at`), ...U(o, s, p) };
413
413
  }) };
414
414
  }
415
- function ct(r) {
415
+ function lt(r) {
416
416
  for (const t of r.steps)
417
417
  for (const e of t.targets) {
418
418
  if (!e.parent) throw new Error("[ui0-icon] progress target has no parent");
419
419
  const s = e.parent, i = s.children.indexOf(e);
420
420
  if (i < 0) throw new Error("[ui0-icon] progress target is detached");
421
- const f = x.createNode({
421
+ const c = x.createNode({
422
422
  tag: "g",
423
423
  parent: s,
424
424
  children: [e],
425
425
  attributes: { ":opacity": `iconProgressValue &gt;= ${t.at} ? ${t.active} : ${t.inactive}` }
426
426
  });
427
- s.children[i] = f, e.parent = f;
427
+ s.children[i] = c, e.parent = c;
428
428
  }
429
429
  }
430
- function lt(r, t) {
430
+ function ft(r, t) {
431
431
  const e = x.parseAsSingle(r);
432
- return (!e || e.tag !== "svg") && $(t, "expected an SVG root"), ct(Rt(e, t)), e.serialize();
432
+ return (!e || e.tag !== "svg") && $(t, "expected an SVG root"), lt(Tt(e, t)), e.serialize();
433
433
  }
434
- function ft(r, t, e) {
434
+ function ut(r, t, e) {
435
435
  const s = x.parseAsSingle(r);
436
436
  (!s || s.tag !== "svg") && $(e, "expected an SVG root");
437
437
  const i = /* @__PURE__ */ new Map();
438
- for (const f of s.children) {
439
- const l = f.attributes.dataCell;
440
- l !== void 0 && (i.has(l) && $(e, `duplicate placement cell '${l}'`), i.set(l, f));
438
+ for (const c of s.children) {
439
+ const a = c.attributes.dataCell;
440
+ a !== void 0 && (i.has(a) && $(e, `duplicate placement cell '${a}'`), i.set(a, c));
441
441
  }
442
- return ct(jt(t.progress, i, e)), s.serialize();
442
+ return lt(zt(t.progress, i, e)), s.serialize();
443
443
  }
444
- function Tt(r, t) {
444
+ function Wt(r, t) {
445
445
  if (r === void 0) return 100;
446
446
  const s = typeof r == "number" || typeof r == "string" && r.trim() !== "" ? Number(r) : NaN;
447
447
  return Number.isFinite(s) ? Math.max(0, Math.min(100, s)) : (t == null || t("[ui0-icon] invalid progress value, using 100"), 100);
@@ -450,7 +450,7 @@ const W = /\s|,/, rt = ["path", "rect", "circle", "ellipse", "line", "polyline",
450
450
  function ot(r, t = 1) {
451
451
  return t !== 1 ? D(at(r, t), -F(t), -F(t)) : r;
452
452
  }
453
- class zt {
453
+ class Vt {
454
454
  constructor(t = {}) {
455
455
  I(this, "options");
456
456
  I(this, "name");
@@ -476,44 +476,44 @@ class zt {
476
476
  modifiers: []
477
477
  }
478
478
  };
479
- let i = "", f = {
479
+ let i = "", c = {
480
480
  x: 1,
481
481
  y: 1
482
- }, l = this.result[t].options;
483
- l.flags ?? (l.flags = []), l.modifiers ?? (l.modifiers = []), l.layers ?? (l.layers = []);
484
- const a = x.parseAsSingle(e, (n) => {
482
+ }, a = this.result[t].options;
483
+ a.flags ?? (a.flags = []), a.modifiers ?? (a.modifiers = []), a.layers ?? (a.layers = []);
484
+ const n = x.parseAsSingle(e, (l) => {
485
485
  var m;
486
- if (n.tag === "svg" || n.tag === "g") {
487
- if (n.tag === "svg" && n.hasAttr("viewBox")) {
488
- const [, , c = "960", h = "960"] = n.attributes.viewBox.split(" ");
489
- (c !== "960" || h !== "960") && (f.x = 960 / +c, f.y = 960 / +h);
486
+ if (l.tag === "svg" || l.tag === "g") {
487
+ if (l.tag === "svg" && l.hasAttr("viewBox")) {
488
+ const [, , f = "960", h = "960"] = l.attributes.viewBox.split(" ");
489
+ (f !== "960" || h !== "960") && (c.x = 960 / +f, c.y = 960 / +h);
490
490
  }
491
- n.hasAttr("data-icon") && (l.flags = n.attributes.dataIcon.split(W)), n.hasAttr("data-layers") && (l.layers = n.attributes.dataLayers.split(W)), n.hasAttr("data-modifiers") && (l.modifiers = n.attributes.dataModifiers.split(W));
491
+ l.hasAttr("data-icon") && (a.flags = l.attributes.dataIcon.split(W)), l.hasAttr("data-layers") && (a.layers = l.attributes.dataLayers.split(W)), l.hasAttr("data-modifiers") && (a.modifiers = l.attributes.dataModifiers.split(W));
492
492
  }
493
- if (n.tag === "template")
493
+ if (l.tag === "template")
494
494
  return x.createNode({
495
495
  tag: "template",
496
- attributes: n.attributes,
497
- content: n.raw,
496
+ attributes: l.attributes,
497
+ content: l.raw,
498
498
  children: [],
499
- parent: n.parent,
499
+ parent: l.parent,
500
500
  raw: ""
501
501
  });
502
- if (n.tag === "style" && ((m = n.parent) == null ? void 0 : m.tag) === "defs")
503
- return i += n.content, null;
504
- if (rt.includes(n.tag) || n.tag === "g") {
505
- const { id: c } = n.attributes;
506
- c && (c.startsWith("r-icon") || c.startsWith("no-")) && (n.attributes.class = c + " " + (n.attributes.class ?? ""), delete n.attributes.id);
502
+ if (l.tag === "style" && ((m = l.parent) == null ? void 0 : m.tag) === "defs")
503
+ return i += l.content, null;
504
+ if (rt.includes(l.tag) || l.tag === "g") {
505
+ const { id: f } = l.attributes;
506
+ f && (f.startsWith("r-icon") || f.startsWith("no-")) && (l.attributes.class = f + " " + (l.attributes.class ?? ""), delete l.attributes.id);
507
507
  }
508
- return n;
508
+ return l;
509
509
  });
510
- !l.flags.includes("no-rescale") && this.options.rescaling && a.walk((n) => {
511
- (n.tag !== "g" && f && f.x !== 1 || f.y !== 1) && this.processBoxScaling(n, f.x, f.y);
510
+ !a.flags.includes("no-rescale") && this.options.rescaling && n.walk((l) => {
511
+ (l.tag !== "g" && c && c.x !== 1 || c.y !== 1) && this.processBoxScaling(l, c.x, c.y);
512
512
  });
513
- const o = this.processNode(t, a);
514
- delete a.attributes.id, delete a.attributes.viewBox;
513
+ const o = this.processNode(t, n);
514
+ delete n.attributes.id, delete n.attributes.viewBox;
515
515
  const u = {};
516
- a.children.unshift(
516
+ n.children.unshift(
517
517
  x.createNode({
518
518
  tag: "rect",
519
519
  children: [],
@@ -526,9 +526,9 @@ class zt {
526
526
  );
527
527
  const p = x.createNode({
528
528
  tag: "g",
529
- content: a.content,
530
- raw: a.raw,
531
- children: a.children,
529
+ content: n.content,
530
+ raw: n.raw,
531
+ children: n.children,
532
532
  attributes: {
533
533
  ...u,
534
534
  ":class": "modifiers",
@@ -536,7 +536,7 @@ class zt {
536
536
  },
537
537
  parent: null
538
538
  });
539
- a.hasAttr("class") && (p.attributes.class = a.attributes.class), a.hasAttr("style") && (p.attributes.style = a.attributes.style), this.options.fit && (p.attributes[":style"] = "'--r-icon-fit-ratio: ' + fitRatios[fit]");
539
+ n.hasAttr("class") && (p.attributes.class = n.attributes.class), n.hasAttr("style") && (p.attributes.style = n.attributes.style), this.options.fit && (p.attributes[":style"] = "'--r-icon-fit-ratio: ' + fitRatios[fit]");
540
540
  let g = x.serialize(p);
541
541
  return this.result[t].sfc = {
542
542
  template: g,
@@ -547,17 +547,17 @@ class zt {
547
547
  render(t) {
548
548
  if (!this.result) return "";
549
549
  const { template: e = "", style: s = "", script: i = "" } = this.result[t].sfc;
550
- let f = "";
551
- return e && (f += `
550
+ let c = "";
551
+ return e && (c += `
552
552
  <template>
553
553
  ${e}
554
- </template>`), s && (f += `
554
+ </template>`), s && (c += `
555
555
  <style scoped lang="scss">
556
556
  ${s.trim()}
557
- </style>`), i && (f += `
557
+ </style>`), i && (c += `
558
558
  <script>
559
559
  ${i}
560
- <\/script>`), f;
560
+ <\/script>`), c;
561
561
  }
562
562
  processBoxScaling(t, e = 1, s = 1) {
563
563
  if (!(e === 1 && s === 1))
@@ -568,19 +568,19 @@ ${i}
568
568
  }
569
569
  }
570
570
  processNode(t, e) {
571
- const s = this.result[t].options, i = ["fit", "progress", "rendering", "modifiers"], { layers: f = [] } = this.processFeatures(t, e);
572
- s.layers = [...s.layers, ...f];
573
- const l = {
571
+ const s = this.result[t].options, i = ["fit", "progress", "rendering", "modifiers"], { layers: c = [] } = this.processFeatures(t, e);
572
+ s.layers = [...s.layers, ...c];
573
+ const a = {
574
574
  ...this.processFit(e),
575
- layers: f,
575
+ layers: c,
576
576
  fitRatios: {
577
577
  default: 1,
578
578
  small: 0.84210526,
579
579
  large: 1.16666667
580
580
  }
581
581
  };
582
- return Array.isArray(this.options.fit) && (this.options.fit.length === 2 && ([l.fitRatios.small, l.fitRatios.large] = this.options.fit), this.options.fit[2] && ([l.fitRatios.small, l.fitRatios.default, l.fitRatios.large] = this.options.fit)), `export default {
583
- setup: () => (${JSON.stringify(l)}),
582
+ return Array.isArray(this.options.fit) && (this.options.fit.length === 2 && ([a.fitRatios.small, a.fitRatios.large] = this.options.fit), this.options.fit[2] && ([a.fitRatios.small, a.fitRatios.default, a.fitRatios.large] = this.options.fit)), `export default {
583
+ setup: () => (${JSON.stringify(a)}),
584
584
  props: ${JSON.stringify(i)},
585
585
  customOptions: ${JSON.stringify(s)}
586
586
  }`;
@@ -601,185 +601,202 @@ ${i}
601
601
  t.attributes.fill && !e.includes("fill") && (t.attributes[":fill"] = `rendering === 'original' ? '${t.attributes.fill}' : undefined`, delete t.attributes.fill), t.attributes.stroke && !e.includes("stroke") && (t.attributes[":stroke"] = `rendering === 'original' ? '${t.attributes.stroke}' : undefined`, delete t.attributes.stroke);
602
602
  }
603
603
  processFit(t) {
604
- let e = 0, s = 0, i = 0, f = 0, l = 0;
605
- const a = [], o = [], u = [], p = [], g = [], [n = 0.84210526, m = 1.16666667] = Array.isArray(this.options.fit) ? this.options.fit : [];
606
- return t.walk((c) => {
604
+ let e = 0, s = 0, i = 0, c = 0, a = 0;
605
+ const n = [], o = [], u = [], p = [], g = [], [l = 0.84210526, m = 1.16666667] = Array.isArray(this.options.fit) ? this.options.fit : [];
606
+ return t.walk((f) => {
607
607
  var h;
608
- if (!c.hasClass("no-fit") && ((h = c.parent) == null ? void 0 : h.tag) !== "mask") {
609
- if (c.tag === "line") {
610
- const { x1: d = "0", x2: b = "0", y1: y = "0", y2: v = "0" } = c.attributes;
608
+ if (!f.hasClass("no-fit") && ((h = f.parent) == null ? void 0 : h.tag) !== "mask") {
609
+ if (f.tag === "line") {
610
+ const { x1: d = "0", x2: b = "0", y1: y = "0", y2: v = "0" } = f.attributes;
611
611
  u.push({
612
612
  x1: d,
613
613
  x2: b,
614
614
  y1: y,
615
615
  y2: v
616
- }), c.attributes[":x1"] = `fitLine[${i}][this.fit].x1`, c.attributes[":x2"] = `fitLine[${i}][this.fit].x2`, c.attributes[":y1"] = `fitLine[${i}][this.fit].y1`, c.attributes[":y2"] = `fitLine[${i}][this.fit].y2`, delete c.attributes.x1, delete c.attributes.x2, delete c.attributes.y1, delete c.attributes.y2, i++;
616
+ }), f.attributes[":x1"] = `fitLine[${i}][this.fit].x1`, f.attributes[":x2"] = `fitLine[${i}][this.fit].x2`, f.attributes[":y1"] = `fitLine[${i}][this.fit].y1`, f.attributes[":y2"] = `fitLine[${i}][this.fit].y2`, delete f.attributes.x1, delete f.attributes.x2, delete f.attributes.y1, delete f.attributes.y2, i++;
617
617
  }
618
- if (c.tag === "path" && c.hasAttr("d") && (a.push(c.attributes.d), c.attributes[":d"] = `fitPath[${s}][this.fit]`, s++, delete c.attributes.d), c.tag === "polyline" && (p.push(c.attributes.points), c.attributes[":points"] = `fitPolyline[${e}][this.fit]`, delete c.attributes.points, e++), c.tag === "circle" && c.hasAttr("r") && (g.push(c.attributes.r), c.attributes[":r"] = `fitCircle[${f}][this.fit]`, f++, delete c.attributes.r), c.tag === "rect" && c.hasAttr("width") && c.hasAttr("height")) {
619
- const { width: d, height: b, x: y, y: v } = c.attributes;
620
- o.push({ width: d, height: b, x: y, y: v }), c.attributes[":width"] = `fitRect[${l}][this.fit].width`, c.attributes[":height"] = `fitRect[${l}][this.fit].height`, c.attributes[":x"] = `fitRect[${l}][this.fit].x`, c.attributes[":y"] = `fitRect[${l}][this.fit].y`, l++, delete c.attributes.width, delete c.attributes.height, delete c.attributes.x, delete c.attributes.y;
618
+ if (f.tag === "path" && f.hasAttr("d") && (n.push(f.attributes.d), f.attributes[":d"] = `fitPath[${s}][this.fit]`, s++, delete f.attributes.d), f.tag === "polyline" && (p.push(f.attributes.points), f.attributes[":points"] = `fitPolyline[${e}][this.fit]`, delete f.attributes.points, e++), f.tag === "circle" && f.hasAttr("r") && (g.push(f.attributes.r), f.attributes[":r"] = `fitCircle[${c}][this.fit]`, c++, delete f.attributes.r), f.tag === "rect" && f.hasAttr("width") && f.hasAttr("height")) {
619
+ const { width: d, height: b, x: y, y: v } = f.attributes;
620
+ o.push({ width: d, height: b, x: y, y: v }), f.attributes[":width"] = `fitRect[${a}][this.fit].width`, f.attributes[":height"] = `fitRect[${a}][this.fit].height`, f.attributes[":x"] = `fitRect[${a}][this.fit].x`, f.attributes[":y"] = `fitRect[${a}][this.fit].y`, a++, delete f.attributes.width, delete f.attributes.height, delete f.attributes.x, delete f.attributes.y;
621
621
  }
622
622
  }
623
623
  }), {
624
- fitPolyline: p.reduce((c, h) => [
625
- ...c,
624
+ fitPolyline: p.reduce((f, h) => [
625
+ ...f,
626
626
  {
627
627
  default: h,
628
- small: D(X(h, n, n), -F(n), -F(n)),
628
+ small: D(X(h, l, l), -F(l), -F(l)),
629
629
  large: D(X(h, m, m), -F(m), -F(m))
630
630
  }
631
631
  ], []),
632
- fitLine: u.reduce((c, h) => [
633
- ...c,
632
+ fitLine: u.reduce((f, h) => [
633
+ ...f,
634
634
  {
635
635
  default: h,
636
- small: tt(h, n, [480, 480]),
636
+ small: tt(h, l, [480, 480]),
637
637
  large: tt(h, m, [480, 480])
638
638
  }
639
639
  ], []),
640
- fitPath: a.reduce((c, h) => [
641
- ...c,
640
+ fitPath: n.reduce((f, h) => [
641
+ ...f,
642
642
  {
643
643
  default: h,
644
- small: ot(h, n),
644
+ small: ot(h, l),
645
645
  large: ot(h, m)
646
646
  }
647
647
  ], []),
648
- fitRect: o.reduce((c, h) => [
649
- ...c,
648
+ fitRect: o.reduce((f, h) => [
649
+ ...f,
650
650
  {
651
651
  default: h,
652
- small: et(h, n, [480, 480]),
652
+ small: et(h, l, [480, 480]),
653
653
  large: et(h, m, [480, 480])
654
654
  }
655
655
  ], []),
656
- fitCircle: g.reduce((c, h) => [
657
- ...c,
656
+ fitCircle: g.reduce((f, h) => [
657
+ ...f,
658
658
  {
659
659
  default: h,
660
- small: (+h * n).toFixed(3),
660
+ small: (+h * l).toFixed(3),
661
661
  large: (+h * m).toFixed(3)
662
662
  }
663
663
  ], [])
664
664
  };
665
665
  }
666
666
  processFeatures(t, e) {
667
- const s = [], i = [], f = [], l = [], a = /* @__PURE__ */ new Set();
667
+ const s = [], i = [], c = [], a = [], n = /* @__PURE__ */ new Set();
668
668
  return e.walk((o) => {
669
669
  const u = rt.includes(o.tag), p = o.tag === "g";
670
670
  if (!o.hasAttr("data-skip")) {
671
671
  if (o.hasAttr("data-layer")) {
672
- a.add(o.attributes.dataLayer);
673
- const g = [...a].indexOf(o.attributes.dataLayer);
672
+ n.add(o.attributes.dataLayer);
673
+ const g = [...n].indexOf(o.attributes.dataLayer);
674
674
  o.addStyle(`--r-icon-l-i: ${g}`), o.attributes["data-l-i"] = g.toString();
675
675
  }
676
- if (o.hasClass("no-progress") && f.push(o), o.tag === "mask" && l.push(o), u || p) {
676
+ if (o.hasClass("no-progress") && c.push(o), o.tag === "mask" && a.push(o), u || p) {
677
677
  const g = o.attributes.class && o.attributes.class.indexOf("no-progress") > -1;
678
- p && o.hasAttr("data-group") && (s.push(o), i.push(o), delete o.attributes.dataGroup), u && !o.isChildOf(i) && (g || s.push(o)), o.isChildOf(l) || this.processRendering(o);
678
+ p && o.hasAttr("data-group") && (s.push(o), i.push(o), delete o.attributes.dataGroup), u && !o.isChildOf(i) && (g || s.push(o)), o.isChildOf(a) || this.processRendering(o);
679
679
  }
680
680
  this.processNodesIfModifiers(o);
681
681
  }
682
- }), e.addStyle(`--r-icon-l-c: ${a.size}`), e.addStyle(`--r-icon-p-c: ${s.length}`), this.processPointNodes(s), this.applyProgress(t, s, f, l), {
683
- layers: a
682
+ }), e.addStyle(`--r-icon-l-c: ${n.size}`), e.addStyle(`--r-icon-p-c: ${s.length}`), this.processPointNodes(s), this.applyProgress(t, s, c, a), {
683
+ layers: n
684
684
  };
685
685
  }
686
686
  /** Applies the legacy progress behavior; the next transformer supplies its own compiled program. */
687
687
  applyProgress(t, e, s, i) {
688
- this.result[t].options.flags.includes("no-progress") || e.forEach((f, l) => {
689
- if (!f.isChildOf([...s, ...i])) {
690
- const a = ((100 / e.length || 1) * (l + 1)).toFixed(3);
691
- f.attributes["data-p-on"] = a, f.attributes[":opacity"] = `(progress ?? 100) >= ${a} ? 1 : .2`;
688
+ this.result[t].options.flags.includes("no-progress") || e.forEach((c, a) => {
689
+ if (!c.isChildOf([...s, ...i])) {
690
+ const n = ((100 / e.length || 1) * (a + 1)).toFixed(3);
691
+ c.attributes["data-p-on"] = n, c.attributes[":opacity"] = `(progress ?? 100) >= ${n} ? 1 : .2`;
692
692
  }
693
693
  });
694
694
  }
695
695
  }
696
- class Wt extends zt {
696
+ class Gt extends Vt {
697
697
  /** Consumes an already compiled progress template from the next loader. */
698
698
  processPrepared(t, e) {
699
699
  return this.processCompiled(t, e, this.options);
700
700
  }
701
701
  /** Transforms author declarations into a component with one shared reactive progress value. */
702
702
  process(t, e = "", s = this.options) {
703
- return this.processCompiled(t, lt(e, t), s);
703
+ return this.processCompiled(t, ft(e, t), s);
704
704
  }
705
705
  /** Compiles composition-owned progress without automatically progressing each source body. */
706
706
  processVirtual(t, e, s) {
707
- return this.processCompiled(t, ft(e, s, t), this.options);
707
+ return this.processCompiled(t, ut(e, s, t), this.options);
708
708
  }
709
709
  /** Adds one computed normalization per component while preserving the existing generated setup data. */
710
710
  processCompiled(t, e, s) {
711
- const i = x.parseAsSingle(e), f = i == null ? void 0 : i.attributes.transform, l = super.process(t, e, s);
712
- if (f && (l.template = l.template.replace(/^<g(?=[\s>])/, `<g transform="${f}"`)), i != null && i.attributes.dataModifiers) {
713
- const a = x.parseAsSingle(l.template);
714
- a.walk((o) => {
711
+ const i = x.parseAsSingle(e), c = i == null ? void 0 : i.attributes.transform, a = super.process(t, e, s);
712
+ if (c && (a.template = a.template.replace(/^<g(?=[\s>])/, `<g transform="${c}"`)), i != null && i.attributes.dataModifiers) {
713
+ const n = x.parseAsSingle(a.template);
714
+ n.walk((o) => {
715
715
  if (!["path", "rect", "circle", "ellipse", "line", "polyline", "polygon"].includes(o.tag)) return;
716
716
  const u = "{ '--ui0-icon-state': modifiers.join('|') }", p = o.attributes[":style"];
717
717
  o.attributes[":style"] = p ? `[${p}, ${u}]` : u;
718
- }), l.template = a.serialize();
718
+ }), a.template = n.serialize();
719
719
  }
720
- return l.script = `import { computed as __iconComputed } from 'vue'
721
- const __iconNormalize = ${Tt.toString()}
722
- ${l.script}`.replace(
720
+ return a.script = `import { computed as __iconComputed } from 'vue'
721
+ const __iconNormalize = ${Wt.toString()}
722
+ ${a.script}`.replace(
723
723
  /setup: \(\) => \((.*?)\),\n props:/s,
724
- (a, o) => {
724
+ (n, o) => {
725
725
  const u = JSON.parse(o);
726
726
  for (const p of Object.values(u)) {
727
727
  const g = Array.isArray(p) ? p : [p];
728
- for (const n of g)
729
- n && typeof n == "object" && "default" in n && (n.normal = n.default);
728
+ for (const l of g)
729
+ l && typeof l == "object" && "default" in l && (l.normal = l.default);
730
730
  }
731
731
  return `setup: (__props) => ({ ...(${JSON.stringify(u)}), iconProgressValue: __iconComputed(() => __iconNormalize(__props.progress, import.meta.env.DEV ? console.warn : undefined)) }),
732
732
  props:`;
733
733
  }
734
- ), l;
734
+ ), a;
735
735
  }
736
736
  /** Declarative progress is already compiled; skip the legacy automatic opacity rewrite. */
737
737
  applyProgress() {
738
738
  }
739
739
  }
740
- function ut(r) {
740
+ function pt(r) {
741
741
  return "file" in r;
742
742
  }
743
- function Vt(r) {
744
- const t = r.indexOf("?"), e = t === -1 ? void 0 : r.slice(t), s = t === -1 ? r : r.slice(0, t), i = s.indexOf("#"), f = i === -1 ? s : s.slice(0, i), [l, ...a] = f.split("."), o = i === -1 ? void 0 : s.slice(i + 1);
743
+ function qt(r) {
744
+ const t = r.indexOf("?"), e = t === -1 ? void 0 : r.slice(t), s = t === -1 ? r : r.slice(0, t), i = s.indexOf("#"), c = i === -1 ? s : s.slice(0, i), [a, ...n] = c.split("."), o = i === -1 ? void 0 : s.slice(i + 1);
745
745
  return {
746
- name: l,
746
+ name: a,
747
747
  cell: o,
748
748
  query: e,
749
- modifiers: a.length ? a.map((u) => u.replace(/:/g, "-")) : void 0
749
+ modifiers: n.length ? n.map((u) => u.replace(/:/g, "-")) : void 0
750
750
  };
751
751
  }
752
- const Gt = `<svg width="960" height="960" viewBox="0 0 960 960">>
752
+ const Dt = `<svg width="960" height="960" viewBox="0 0 960 960">>
753
753
  <path class="no-fill" d="M340 340 C494.6 340 620 465.4 620 620" />
754
754
  </svg>
755
- `, qt = `<svg width="960" height="960" viewBox="0 0 960 960">
755
+ `, Ut = `<svg width="960" height="960" viewBox="0 0 960 960">
756
756
  <path class="no-fill" d="M480 600 L480 360 M480 360 L395.1 444.9 M480 360 L564.9 444.9"/>
757
757
  </svg>
758
- `, Dt = `<svg width="960" height="960" viewBox="0 0 960 960">
758
+ `, Jt = `<svg width="960" height="960" viewBox="0 0 960 960">
759
759
 
760
760
  <polyline points="347.69,546.155 480,413.845 612.31,546.155"/>
761
761
 
762
762
  </svg>
763
- `, Ut = `<svg viewBox="0 0 960 960">
763
+ `, Zt = `<svg viewBox="0 0 960 960">
764
764
  <circle cx="480" cy="480" r="320"/>
765
765
  </svg>
766
- `, Jt = `<svg>
766
+ `, Ht = `<svg>
767
767
  <path class="no-fill" d="M480,480h280c0,74.2-29.5,145.5-82,198-52.5,52.5-123.8,82-198,82v-280Z"/>
768
768
  </svg>
769
- `, Zt = `<svg viewBox="0 0 960 960"><circle cx="480" cy="480" r="60"/></svg>
770
- `, Ht = `<svg data-icon="utility no-progress" viewBox="0 0 960 960">
769
+ `, Kt = `<svg viewBox="0 0 960 960"><circle cx="480" cy="480" r="60"/></svg>
770
+ `, Qt = `<svg data-icon="utility no-progress" viewBox="0 0 960 960">
771
771
  <path d="M441.3,253.9c17.2-29.8,60.2-29.8,77.4,0l117.6,203.8,117.6,203.8c17.2,29.8-4.3,67-38.7,67H244.7c-34.4,0-55.9-37.2-38.7-67l117.6-203.8,117.6-203.8Z"/>
772
772
  </svg>
773
773
  `, V = {
774
- "arc-90": Gt,
775
- arrow: qt,
776
- chevron: Dt,
777
- circle: Ut,
778
- "pie-90": Jt,
779
- point: Zt,
780
- triangle: Ht
774
+ "arc-90": Dt,
775
+ arrow: Ut,
776
+ chevron: Jt,
777
+ circle: Zt,
778
+ "pie-90": Ht,
779
+ point: Kt,
780
+ triangle: Qt
781
781
  };
782
- class Kt {
782
+ function nt(r, t) {
783
+ if (N.isAbsolute(t)) return t;
784
+ let e = r;
785
+ const s = [];
786
+ for (let i = 0; i < 4; i++) {
787
+ const c = N.join(e, t);
788
+ s.push(c);
789
+ try {
790
+ if (Ot(c).isDirectory()) return c;
791
+ } catch {
792
+ }
793
+ const a = N.dirname(e);
794
+ if (a === e) break;
795
+ e = a;
796
+ }
797
+ throw new Error(`[ui0-icon] directory '${t}' not found (looked in: ${s.join(", ")})`);
798
+ }
799
+ class Yt {
783
800
  constructor(t, e, s) {
784
801
  I(this, "files", /* @__PURE__ */ new Map());
785
802
  this.options = t, this.root = e, this.warn = s;
@@ -789,90 +806,90 @@ class Kt {
789
806
  var e;
790
807
  if (this.files.clear(), ((e = this.options.packs) == null ? void 0 : e.blocks) !== void 0) throw new Error("[ui0-icon] packs.blocks cannot override the built-in pack");
791
808
  const t = typeof this.options.dir == "string" ? [this.options.dir] : this.options.dir ?? [];
792
- for (const s of t) this.scanDirectory("assets", k.resolve(this.root, s));
809
+ for (const s of t) this.scanDirectory("assets", nt(this.root, s));
793
810
  for (const [s, i] of Object.entries(this.options.packs ?? {}))
794
- typeof i == "string" && this.scanDirectory(s, k.resolve(this.root, i));
811
+ typeof i == "string" && this.scanDirectory(s, nt(this.root, i));
795
812
  }
796
813
  /** Registers every nested SVG with a path relative to its configured directory. */
797
814
  scanDirectory(t, e, s = "") {
798
- for (const i of Ft(k.join(e, s), { withFileTypes: !0 })) {
799
- const f = k.posix.join(s, i.name);
800
- if (i.isDirectory()) this.scanDirectory(t, e, f);
801
- else if (i.isFile() && f.endsWith(".svg")) {
802
- const l = `${t}/${f.slice(0, -4)}`, a = k.join(e, f);
803
- if (this.files.has(l)) throw new Error(`[ui0-icon] duplicate source '${l}'`);
804
- this.files.set(l, a);
815
+ for (const i of It(N.join(e, s), { withFileTypes: !0 })) {
816
+ const c = N.posix.join(s, i.name);
817
+ if (i.isDirectory()) this.scanDirectory(t, e, c);
818
+ else if (i.isFile() && c.endsWith(".svg")) {
819
+ const a = `${t}/${c.slice(0, -4)}`, n = N.join(e, c);
820
+ if (this.files.has(a)) throw new Error(`[ui0-icon] duplicate source '${a}'`);
821
+ this.files.set(a, n);
805
822
  }
806
823
  }
807
824
  }
808
825
  /** Finds a file-backed icon name for ordinary imports within the configured source roots. */
809
826
  nameOfFile(t) {
810
- for (const [e, s] of this.files) if (k.resolve(s) === k.resolve(t)) return e;
827
+ for (const [e, s] of this.files) if (N.resolve(s) === N.resolve(t)) return e;
811
828
  }
812
829
  /** Checks whether the next loader owns a complete icon name. */
813
830
  has(t) {
814
- var f;
831
+ var c;
815
832
  const e = t.indexOf("/"), s = t.slice(0, e), i = t.slice(e + 1);
816
- return this.files.has(t) || s === "blocks" && i in V || s === "virtual" && i in (this.options.virtual ?? {}) || typeof ((f = this.options.packs) == null ? void 0 : f[s]) == "object" && i in this.options.packs[s];
833
+ return this.files.has(t) || s === "blocks" && i in V || s === "virtual" && i in (this.options.virtual ?? {}) || typeof ((c = this.options.packs) == null ? void 0 : c[s]) == "object" && i in this.options.packs[s];
817
834
  }
818
835
  /** Reads one registered source and records its actual filesystem dependencies. */
819
836
  read(t) {
820
- var a, o;
837
+ var n, o;
821
838
  const e = t.indexOf("/"), s = t.slice(0, e), i = t.slice(e + 1);
822
839
  if (s === "virtual") {
823
- const u = (a = this.options.virtual) == null ? void 0 : a[i];
840
+ const u = (n = this.options.virtual) == null ? void 0 : n[i];
824
841
  if (!u) throw new Error(`[ui0-icon] unknown source '${t}'`);
825
- if (ut(u)) {
842
+ if (pt(u)) {
826
843
  if (u.file.trimStart().startsWith("<")) return { svg: u.file, definition: u, files: /* @__PURE__ */ new Set() };
827
- const p = k.resolve(this.root, u.file);
844
+ const p = N.resolve(this.root, u.file);
828
845
  return { svg: z(p, "utf8"), definition: u, files: /* @__PURE__ */ new Set([p]) };
829
846
  }
830
847
  return { definition: u, files: /* @__PURE__ */ new Set() };
831
848
  }
832
849
  if (s === "blocks" && V[i]) return { svg: V[i], files: /* @__PURE__ */ new Set() };
833
- const f = (o = this.options.packs) == null ? void 0 : o[s];
834
- if (f && typeof f == "object" && i in f) {
835
- const u = f[i];
850
+ const c = (o = this.options.packs) == null ? void 0 : o[s];
851
+ if (c && typeof c == "object" && i in c) {
852
+ const u = c[i];
836
853
  if (this.files.has(t) && this.warn(`[ui0-icon] packs.${s}.${i} overrides the directory source`), typeof u != "string") throw new Error(`[ui0-icon] '${t}' must retain an SVG file reference`);
837
- const p = k.resolve(this.root, u);
854
+ const p = N.resolve(this.root, u);
838
855
  return { svg: z(p, "utf8"), files: /* @__PURE__ */ new Set([p]) };
839
856
  }
840
- const l = this.files.get(t);
841
- if (!l) throw new Error(`[ui0-icon] unknown source '${t}'`);
842
- return { svg: z(l, "utf8"), files: /* @__PURE__ */ new Set([l]) };
857
+ const a = this.files.get(t);
858
+ if (!a) throw new Error(`[ui0-icon] unknown source '${t}'`);
859
+ return { svg: z(a, "utf8"), files: /* @__PURE__ */ new Set([a]) };
843
860
  }
844
861
  }
845
- function pt(r, t, e) {
862
+ function dt(r, t, e) {
846
863
  const s = r.attributes.viewBox === void 0 ? [0, 0, t, t] : r.attributes.viewBox.trim().split(/[\s,]+/).map(Number);
847
864
  if (s.length !== 4 || s.some((i) => !Number.isFinite(i)) || s[2] <= 0 || s[3] <= 0)
848
865
  throw new Error(`[ui0-icon] ${e}: invalid viewBox`);
849
866
  return s;
850
867
  }
851
- function Qt(r) {
868
+ function Xt(r) {
852
869
  const t = { ...r.attributes };
853
870
  return delete t.viewBox, delete t.width, delete t.height, x.createNode({ tag: "g", attributes: t, children: r.children, content: r.content }).serialize();
854
871
  }
855
- function dt(r, t, e, s, i = /* @__PURE__ */ new Set()) {
872
+ function ht(r, t, e, s, i = /* @__PURE__ */ new Set()) {
856
873
  var m;
857
874
  if (i.has(r)) throw new Error(`[ui0-icon] ${r}: cyclic composition`);
858
- const f = new Set(i).add(r), l = t.read(r);
859
- if (!l.definition || ut(l.definition))
860
- return { svg: l.svg, files: l.files, virtual: !1 };
861
- const a = l.definition, { rows: o, cols: u } = a;
862
- if (![o, u].every((c) => Number.isSafeInteger(c) && c > 0))
875
+ const c = new Set(i).add(r), a = t.read(r);
876
+ if (!a.definition || pt(a.definition))
877
+ return { svg: a.svg, files: a.files, virtual: !1 };
878
+ const n = a.definition, { rows: o, cols: u } = n;
879
+ if (![o, u].every((f) => Number.isSafeInteger(f) && f > 0))
863
880
  throw new Error(`[ui0-icon] ${r}: rows and cols must be positive integers`);
864
- const p = [], g = new Set(l.files);
865
- for (const [c, h] of Object.entries(a.cells)) {
881
+ const p = [], g = new Set(a.files);
882
+ for (const [f, h] of Object.entries(n.cells)) {
866
883
  if (h === void 0) continue;
867
- const d = `${r} cell ${c}`, b = c.split("-").map(Number), [y, v] = b;
884
+ const d = `${r} cell ${f}`, b = f.split("-").map(Number), [y, v] = b;
868
885
  if (b.length !== 2 || !b.every(Number.isSafeInteger) || y < 1 || y > o || v < 1 || v > u)
869
886
  throw new Error(`[ui0-icon] ${d}: cell is outside ${o}x${u}`);
870
- const w = typeof h == "string" ? { value: h } : h, { rows: E, cols: N } = w.span ?? { rows: 1, cols: 1 };
871
- if (![E, N].every((A) => Number.isSafeInteger(A) && A > 0))
887
+ const w = typeof h == "string" ? { value: h } : h, { rows: E, cols: k } = w.span ?? { rows: 1, cols: 1 };
888
+ if (![E, k].every((A) => Number.isSafeInteger(A) && A > 0))
872
889
  throw new Error(`[ui0-icon] ${d}: span rows and cols must be positive integers`);
873
- if (E > o - y + 1 || N > u - v + 1)
874
- throw new Error(`[ui0-icon] ${d}: span ${E}x${N} is outside ${o}x${u}`);
875
- const S = Vt(w.value), C = Object.fromEntries(new URLSearchParams(S.query));
890
+ if (E > o - y + 1 || k > u - v + 1)
891
+ throw new Error(`[ui0-icon] ${d}: span ${E}x${k} is outside ${o}x${u}`);
892
+ const S = qt(w.value), C = Object.fromEntries(new URLSearchParams(S.query));
876
893
  if ("weight" in w || C.weight !== void 0) throw new Error(`[ui0-icon] ${d}: local weight is forbidden`);
877
894
  if ("shape" in w || "badge" in w || C.shape !== void 0 || C.badge !== void 0)
878
895
  throw new Error(`[ui0-icon] ${d}: shape and badge belong to the complete icon`);
@@ -881,72 +898,72 @@ function dt(r, t, e, s, i = /* @__PURE__ */ new Set()) {
881
898
  w.cell === "full" && s(`[ui0-icon] ${d}: cell:'full' is deprecated and has no placement effect`);
882
899
  for (const A of ["fit", "rotate", "flipped", "filled", "rendering", "modifiers"])
883
900
  w[A] !== void 0 && C[A] !== void 0 && String(w[A]) !== C[A] && s(`[ui0-icon] ${d}: ${A}=${String(w[A])} overrides value parameter ${C[A]}`);
884
- let L;
901
+ let j;
885
902
  try {
886
- L = dt(S.name, t, e, s, f);
903
+ j = ht(S.name, t, e, s, c);
887
904
  } catch (A) {
888
905
  throw new Error(`[ui0-icon] ${d} source '${S.name}': ${String(A)}`);
889
906
  }
890
- L.files.forEach((A) => g.add(A));
891
- const Z = x.parseAsSingle(L.svg), [ht, gt, _, M] = pt(Z, e, `${d} source ${S.name}`), R = w.rotate ?? Number(C.rotate ?? 0);
892
- if (!Number.isFinite(R)) throw new Error(`[ui0-icon] ${d}: invalid rotate`);
893
- const H = Math.abs(R % 180) === 90, mt = H ? M / _ : _ / M, bt = N * o / (E * u);
894
- if (Math.abs(mt - bt) > 1e-6)
907
+ j.files.forEach((A) => g.add(A));
908
+ const Z = x.parseAsSingle(j.svg), [gt, mt, _, M] = dt(Z, e, `${d} source ${S.name}`), L = w.rotate ?? Number(C.rotate ?? 0);
909
+ if (!Number.isFinite(L)) throw new Error(`[ui0-icon] ${d}: invalid rotate`);
910
+ const H = Math.abs(L % 180) === 90, bt = H ? M / _ : _ / M, vt = k * o / (E * u);
911
+ if (Math.abs(bt - vt) > 1e-6)
895
912
  throw new Error(`[ui0-icon] ${d} source ${S.name}: source proportions do not match the placement area`);
896
- const j = w.fit ?? C.fit ?? "normal", K = { normal: 1, default: 1, small: 0.84210526, large: 1.16666667 };
897
- if (!(j in K)) throw new Error(`[ui0-icon] ${d}: unknown fit '${j}'`);
898
- const T = e * 0.75 * N / u / ((H ? M : _) * 0.75) * K[j], vt = e * 0.125 + (v - 1 + N / 2) * e * 0.75 / u, wt = e * 0.125 + (y - 1 + E / 2) * e * 0.75 / o, $t = w.flipped ?? C.flipped === "true", Q = w.filled ?? (C.filled === "true" || ((m = S.modifiers) == null ? void 0 : m.some((A) => ["fill", "filled"].includes(A)))), yt = typeof w.modifiers == "string" ? w.modifiers.split(/[\s,]+/) : w.modifiers ?? [], Y = {
899
- dataCell: c,
900
- transform: `translate(${vt} ${wt}) scale(${$t ? -T : T} ${T}) rotate(${R}) translate(${-ht - _ / 2} ${-gt - M / 2})`,
901
- class: [...S.modifiers ?? [], ...yt].join(" ")
913
+ const R = w.fit ?? C.fit ?? "normal", K = { normal: 1, default: 1, small: 0.84210526, large: 1.16666667 };
914
+ if (!(R in K)) throw new Error(`[ui0-icon] ${d}: unknown fit '${R}'`);
915
+ const T = e * 0.75 * k / u / ((H ? M : _) * 0.75) * K[R], wt = e * 0.125 + (v - 1 + k / 2) * e * 0.75 / u, $t = e * 0.125 + (y - 1 + E / 2) * e * 0.75 / o, yt = w.flipped ?? C.flipped === "true", Q = w.filled ?? (C.filled === "true" || ((m = S.modifiers) == null ? void 0 : m.some((A) => ["fill", "filled"].includes(A)))), xt = typeof w.modifiers == "string" ? w.modifiers.split(/[\s,]+/) : w.modifiers ?? [], Y = {
916
+ dataCell: f,
917
+ transform: `translate(${wt} ${$t}) scale(${yt ? -T : T} ${T}) rotate(${L}) translate(${-gt - _ / 2} ${-mt - M / 2})`,
918
+ class: [...S.modifiers ?? [], ...xt].join(" ")
902
919
  };
903
920
  Q !== void 0 && (Y.style = `fill:${Q ? "var(--0-icon-fill-color, currentColor)" : "none"}`);
904
- const xt = Qt(Z).replaceAll("iconProgressValue", "100");
905
- p.push(x.createNode({ tag: "g", attributes: Y, content: xt }).serialize());
921
+ const At = Xt(Z).replaceAll("iconProgressValue", "100");
922
+ p.push(x.createNode({ tag: "g", attributes: Y, content: At }).serialize());
906
923
  }
907
- const n = `<svg viewBox="0 0 ${e} ${e}">${p.join("")}</svg>`;
908
- return { svg: ft(n, a, r), files: g, virtual: !0 };
924
+ const l = `<svg viewBox="0 0 ${e} ${e}">${p.join("")}</svg>`;
925
+ return { svg: ut(l, n, r), files: g, virtual: !0 };
909
926
  }
910
- function Yt(r, t, e) {
927
+ function te(r, t, e) {
911
928
  const s = x.parseAsSingle(r);
912
929
  if (!s || s.tag !== "svg") throw new Error(`[ui0-icon] ${e}: expected SVG root`);
913
- const [i, f, l, a] = pt(s, t, e), o = 960 / Math.max(l, a);
914
- if (s.attributes.viewBox = "0 0 960 960", i !== 0 || f !== 0 || l !== 960 || a !== 960) {
915
- const u = `translate(480 480) scale(${o}) translate(${-i - l / 2} ${-f - a / 2})`;
930
+ const [i, c, a, n] = dt(s, t, e), o = 960 / Math.max(a, n);
931
+ if (s.attributes.viewBox = "0 0 960 960", i !== 0 || c !== 0 || a !== 960 || n !== 960) {
932
+ const u = `translate(480 480) scale(${o}) translate(${-i - a / 2} ${-c - n / 2})`;
916
933
  s.attributes.transform = `${u} ${s.attributes.transform ?? ""}`.trim();
917
934
  }
918
935
  return s.serialize();
919
936
  }
920
937
  const G = "virtual:ui0-icon-next/", O = "\0ui0-icon-next/", q = "/@ui0-icon-next/";
921
- function oe(r = {}) {
938
+ function ae(r = {}) {
922
939
  let t = "";
923
940
  const e = r.size ?? 960;
924
941
  if (!Number.isFinite(e) || e <= 0) throw new Error("[ui0-icon] size must be a positive number");
925
942
  let s;
926
- const i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), l = new Wt({ fit: r.fit ?? !0, rescaling: !1 });
943
+ const i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), a = new Gt({ fit: r.fit ?? !0, rescaling: !1 });
927
944
  return {
928
945
  name: "vite:ui0-icon",
929
946
  enforce: "pre",
930
- configResolved(a) {
931
- t = a.root, s = new Kt(r, t, (o) => a.logger.warn(o)), s.scan();
947
+ configResolved(n) {
948
+ t = n.root, s = new Yt(r, t, (o) => n.logger.warn(o)), s.scan();
932
949
  },
933
- resolveId(a, o) {
934
- if (a.startsWith(q) || a.startsWith(O)) return a;
935
- if (a.startsWith(G)) return O + decodeURIComponent(a.slice(G.length));
936
- if (!o || !/\.svg(?:\?icon)?$/.test(a)) return;
937
- const u = a.replace(/\?icon$/, ""), p = k.isAbsolute(u) ? u : k.resolve(k.dirname(o.split("?")[0]), u), g = s.nameOfFile(p) ?? (u.startsWith("/") ? s.nameOfFile(k.join(t, u)) : void 0);
950
+ resolveId(n, o) {
951
+ if (n.startsWith(q) || n.startsWith(O)) return n;
952
+ if (n.startsWith(G)) return O + decodeURIComponent(n.slice(G.length));
953
+ if (!o || !/\.svg(?:\?icon)?$/.test(n)) return;
954
+ const u = n.replace(/\?icon$/, ""), p = N.isAbsolute(u) ? u : N.resolve(N.dirname(o.split("?")[0]), u), g = s.nameOfFile(p) ?? (u.startsWith("/") ? s.nameOfFile(N.join(t, u)) : void 0);
938
955
  if (g) return O + g;
939
956
  },
940
- load(a) {
941
- if (a.startsWith(q)) return f.get(a) ?? "";
942
- if (!a.startsWith(O)) return;
943
- const o = a.slice(O.length), u = dt(o, s, e, (d) => this.warn(d));
944
- i.set(a, u.files), u.files.forEach((d) => this.addWatchFile(d));
945
- const p = u.virtual ? u.svg : lt(u.svg, o), g = l.processPrepared(o, Yt(p, e, o)), n = Nt("sha256").update(o).digest("hex").slice(0, 12), m = `data-v-${n}`, c = Et({ source: g.template, filename: `${o}.vue`, id: m, scoped: !!g.style });
946
- if (c.errors.length) throw c.errors[0];
957
+ load(n) {
958
+ if (n.startsWith(q)) return c.get(n) ?? "";
959
+ if (!n.startsWith(O)) return;
960
+ const o = n.slice(O.length), u = ht(o, s, e, (d) => this.warn(d));
961
+ i.set(n, u.files), u.files.forEach((d) => this.addWatchFile(d));
962
+ const p = u.virtual ? u.svg : ft(u.svg, o), g = a.processPrepared(o, te(p, e, o)), l = kt("sha256").update(o).digest("hex").slice(0, 12), m = `data-v-${l}`, f = Pt({ source: g.template, filename: `${o}.vue`, id: m, scoped: !!g.style });
963
+ if (f.errors.length) throw f.errors[0];
947
964
  let h = "";
948
965
  if (g.style) {
949
- const d = kt(k.join(t, "package.json")), b = Pt({
966
+ const d = Ct(N.join(t, "package.json")), b = Ft({
950
967
  source: g.style,
951
968
  filename: `${o}.scss`,
952
969
  id: m,
@@ -962,63 +979,63 @@ function oe(r = {}) {
962
979
  }
963
980
  });
964
981
  if (b.errors.length) throw b.errors[0];
965
- const y = `${q}${n}.css`;
966
- f.set(y, b.code), h += `import ${JSON.stringify(y)}
982
+ const y = `${q}${l}.css`;
983
+ c.set(y, b.code), h += `import ${JSON.stringify(y)}
967
984
  `;
968
985
  }
969
986
  return h += g.script.replace("export default", "const _body =") + `
970
- `, h += c.code.replace("export function render", "function render"), h += `
987
+ `, h += f.code.replace("export function render", "function render"), h += `
971
988
  _body.render = render
972
989
  `, g.style && (h += `_body.__scopeId = ${JSON.stringify(m)}
973
990
  `), h + `export default _body
974
991
  `;
975
992
  },
976
- transform(a, o) {
993
+ transform(n, o) {
977
994
  var b, y;
978
995
  if (!o.endsWith(".vue")) return;
979
- const { descriptor: u, errors: p } = Ct(a, { filename: o });
996
+ const { descriptor: u, errors: p } = Et(n, { filename: o });
980
997
  if (p.length || !((b = u.template) != null && b.ast)) return;
981
- const g = /* @__PURE__ */ new Set(), n = (v) => {
998
+ const g = /* @__PURE__ */ new Set(), l = (v) => {
982
999
  var w, E;
983
1000
  if (v.type === 1 && ["Icon", "icon", "Ui0Icon", "ui0-icon"].includes(v.tag ?? ""))
984
- for (const N of v.props ?? []) {
985
- if (N.type === 6 && ["value", "badge"].includes(N.name) && N.value) {
986
- const S = N.value.content.split(/[.?]/, 1)[0];
1001
+ for (const k of v.props ?? []) {
1002
+ if (k.type === 6 && ["value", "badge"].includes(k.name) && k.value) {
1003
+ const S = k.value.content.split(/[.?]/, 1)[0];
987
1004
  if (s.has(S)) g.add(S);
988
1005
  else if (/^(assets|virtual|blocks)\//.test(S) || S.split("/")[0] in (r.packs ?? {}))
989
1006
  throw new Error(`[ui0-icon] ${o}: unknown source '${S}'`);
990
1007
  }
991
- if (N.type === 7 && N.name === "bind" && ((w = N.arg) == null ? void 0 : w.content) === "value")
1008
+ if (k.type === 7 && k.name === "bind" && ((w = k.arg) == null ? void 0 : w.content) === "value")
992
1009
  for (const S of Object.keys(r.virtual ?? {})) g.add(`virtual/${S}`);
993
1010
  }
994
- (E = v.children) == null || E.forEach(n);
1011
+ (E = v.children) == null || E.forEach(l);
995
1012
  };
996
- if (n(u.template.ast), !g.size) return;
1013
+ if (l(u.template.ast), !g.size) return;
997
1014
  const m = [...g].map((v, w) => `import __ui0Body${w} from ${JSON.stringify(G + encodeURIComponent(v))}`).join(`
998
- `), c = [...g].map((v, w) => `${JSON.stringify(v)}: __ui0Body${w}`).join(","), h = `
1015
+ `), f = [...g].map((v, w) => `${JSON.stringify(v)}: __ui0Body${w}`).join(","), h = `
999
1016
  import { provide as __ui0Provide, inject as __ui0Inject } from 'vue'
1000
1017
  ${m}
1001
1018
  const __ui0Key = Symbol.for('ui0-icon-generated')
1002
- __ui0Provide(__ui0Key, { ...__ui0Inject(__ui0Key, {}), ${c} })
1019
+ __ui0Provide(__ui0Key, { ...__ui0Inject(__ui0Key, {}), ${f} })
1003
1020
  `;
1004
1021
  if (u.scriptSetup) {
1005
1022
  const v = u.scriptSetup.loc.start.offset;
1006
- return { code: a.slice(0, v) + h + a.slice(v), map: null };
1023
+ return { code: n.slice(0, v) + h + n.slice(v), map: null };
1007
1024
  }
1008
1025
  const d = (y = u.script) != null && y.lang ? ` lang="${u.script.lang}"` : "";
1009
- return { code: `${a}
1026
+ return { code: `${n}
1010
1027
  <script setup${d}>${h}<\/script>`, map: null };
1011
1028
  },
1012
- handleHotUpdate(a) {
1029
+ handleHotUpdate(n) {
1013
1030
  s.scan();
1014
1031
  const o = [];
1015
1032
  for (const [u, p] of i) {
1016
- if (!p.has(a.file)) continue;
1017
- const g = a.server.moduleGraph.getModuleById(u);
1033
+ if (!p.has(n.file)) continue;
1034
+ const g = n.server.moduleGraph.getModuleById(u);
1018
1035
  g && o.push(g);
1019
1036
  }
1020
- for (const u of f.keys()) {
1021
- const p = a.server.moduleGraph.getModuleById(u);
1037
+ for (const u of c.keys()) {
1038
+ const p = n.server.moduleGraph.getModuleById(u);
1022
1039
  p && o.length && o.push(p);
1023
1040
  }
1024
1041
  if (o.length) return o;
@@ -1026,8 +1043,8 @@ __ui0Provide(__ui0Key, { ...__ui0Inject(__ui0Key, {}), ${c} })
1026
1043
  };
1027
1044
  }
1028
1045
  export {
1029
- oe as ViteUi0Icon,
1030
- oe as ViteUi0IconNext,
1031
- oe as default,
1032
- ut as isVirtualTemplate
1046
+ ae as ViteUi0Icon,
1047
+ ae as ViteUi0IconNext,
1048
+ ae as default,
1049
+ pt as isVirtualTemplate
1033
1050
  };