@glass-sdk/liquid-glass 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +133 -494
  2. package/dist/core/concentric.js +86 -0
  3. package/dist/core/materials.js +41 -0
  4. package/dist/core/morph-path.js +206 -0
  5. package/dist/core/optics.js +7 -0
  6. package/dist/core/progressive.js +35 -0
  7. package/dist/{concentric-COCiG9DQ.js → core/shape.js} +1 -85
  8. package/dist/core/spring.js +78 -0
  9. package/dist/core/union.js +117 -0
  10. package/dist/core.js +6 -9
  11. package/dist/dom/compose-layers.js +54 -0
  12. package/dist/dom/compound-field.js +23 -0
  13. package/dist/dom/control-motion.js +101 -0
  14. package/dist/dom/engine.js +7 -0
  15. package/dist/dom/exit-handoff.js +14 -0
  16. package/dist/dom/filter-bounds.js +87 -0
  17. package/dist/dom/filter-budget.js +45 -0
  18. package/dist/dom/filter-groups.js +38 -0
  19. package/dist/dom/filter-paint-root.js +41 -0
  20. package/dist/dom/filter-patch.js +129 -0
  21. package/dist/dom/filter-reach.js +36 -0
  22. package/dist/dom/filter-stages.js +7 -0
  23. package/dist/dom/fixed-shape.js +20 -0
  24. package/dist/dom/foreground.js +36 -0
  25. package/dist/dom/interaction.js +129 -0
  26. package/dist/dom/lens-layers.js +163 -0
  27. package/dist/dom/map-blend.js +8 -0
  28. package/dist/dom/map-encoder.js +47 -0
  29. package/dist/dom/map-encoder.worker.js +16 -0
  30. package/dist/dom/map-encoding.js +17 -0
  31. package/dist/dom/map-image.js +34 -0
  32. package/dist/dom/map-store.js +189 -0
  33. package/dist/dom/maps.js +131 -0
  34. package/dist/dom/material-graph.js +52 -0
  35. package/dist/dom/morph.js +296 -0
  36. package/dist/dom/page-zoom.js +46 -0
  37. package/dist/dom/png.js +105 -0
  38. package/dist/dom/progressive.js +299 -0
  39. package/dist/dom/renderer.js +6 -0
  40. package/dist/dom/sampling-bounds.js +22 -0
  41. package/dist/dom/selection.js +106 -0
  42. package/dist/dom/shape-layout.js +199 -0
  43. package/dist/dom/shared-backdrop.js +41 -0
  44. package/dist/dom/ticker.js +103 -0
  45. package/dist/dom/warm.js +108 -0
  46. package/dist/dom.js +694 -2
  47. package/dist/gpu/geometry.js +9 -0
  48. package/dist/gpu/maps.js +8 -0
  49. package/dist/gpu/planes.js +4 -0
  50. package/dist/gpu.js +213 -2
  51. package/dist/index.js +10 -932
  52. package/dist/react/button.js +23 -0
  53. package/dist/react/control-thumb.js +50 -0
  54. package/dist/react/menu.js +159 -0
  55. package/dist/react/merged-ref.js +18 -0
  56. package/dist/react/progressive.js +73 -0
  57. package/dist/react/scene.js +122 -0
  58. package/dist/react/shape.js +93 -0
  59. package/dist/react/surface.js +69 -0
  60. package/dist/react/tabs.js +94 -0
  61. package/dist/react/toolbar.js +145 -0
  62. package/dist/react/value-control-motion.js +9 -0
  63. package/dist/react/value-controls.js +176 -0
  64. package/dist/styles.css +19 -0
  65. package/dist/types/core/optics.d.ts +0 -1
  66. package/dist/types/core/spring.d.ts +1 -1
  67. package/dist/types/dom/compose-layers.d.ts +15 -0
  68. package/dist/types/dom/compound-field.d.ts +35 -0
  69. package/dist/types/dom/engine.d.ts +9 -0
  70. package/dist/types/dom/exit-handoff.d.ts +7 -0
  71. package/dist/types/dom/filter-bounds.d.ts +1 -1
  72. package/dist/types/dom/filter-budget.d.ts +20 -0
  73. package/dist/types/dom/filter-groups.d.ts +25 -0
  74. package/dist/types/dom/filter-paint-root.d.ts +9 -0
  75. package/dist/types/dom/filter-patch.d.ts +3 -8
  76. package/dist/types/dom/filter-reach.d.ts +23 -0
  77. package/dist/types/dom/filter-stages.d.ts +5 -0
  78. package/dist/types/dom/index.d.ts +3 -0
  79. package/dist/types/dom/lens-layers.d.ts +68 -0
  80. package/dist/types/dom/map-blend.d.ts +22 -0
  81. package/dist/types/dom/map-encoding.d.ts +1 -1
  82. package/dist/types/dom/map-image.d.ts +5 -2
  83. package/dist/types/dom/maps.d.ts +5 -5
  84. package/dist/types/dom/material-graph.d.ts +22 -0
  85. package/dist/types/dom/morph.d.ts +8 -0
  86. package/dist/types/dom/page-zoom.d.ts +18 -0
  87. package/dist/types/dom/png.d.ts +2 -0
  88. package/dist/types/dom/progressive.d.ts +29 -1
  89. package/dist/types/dom/renderer.d.ts +4 -0
  90. package/dist/types/dom/sampling-bounds.d.ts +10 -0
  91. package/dist/types/dom/shared-backdrop.d.ts +19 -0
  92. package/dist/types/dom/warm.d.ts +4 -1
  93. package/dist/types/gpu/geometry.d.ts +17 -0
  94. package/dist/types/gpu/index.d.ts +4 -16
  95. package/dist/types/gpu/planes.d.ts +2 -0
  96. package/dist/types/react/button.d.ts +11 -0
  97. package/dist/types/react/index.d.ts +14 -149
  98. package/dist/types/react/menu.d.ts +29 -0
  99. package/dist/types/react/progressive.d.ts +15 -0
  100. package/dist/types/react/scene.d.ts +35 -0
  101. package/dist/types/react/surface.d.ts +35 -0
  102. package/dist/types/react/tabs.d.ts +29 -0
  103. package/dist/types/react/toolbar.d.ts +21 -0
  104. package/package.json +1 -1
  105. package/dist/dom-CKc8vDTR.js +0 -2532
  106. package/dist/gpu-Co5Y89mh.js +0 -244
  107. package/dist/map-encoder.worker-DO1drw0Y.js +0 -16
  108. package/dist/materials-DVPgteZ9.js +0 -234
  109. package/dist/types/dom/progressive-maps.d.ts +0 -6
package/dist/dom.js CHANGED
@@ -1,2 +1,694 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, o, p as s, s as c, t as l, u } from "./dom-CKc8vDTR.js";
2
- export { c as attachGeometryMotion, a as attachInteraction, o as attachSelectionLens, i as clearMaterialMapCache, l as createGlassScene, e as getMaterialMaps, n as observeConcentricShape, r as observeCornerPlacement, t as radiusPixels, s as registerShapeContainer, u as resolveMotion };
1
+ import { cornerOptions as e, shapeClip as t, shapePolygon as n } from "./core/shape.js";
2
+ import { polygonClip as r } from "./core/concentric.js";
3
+ import { createTicker as i } from "./dom/ticker.js";
4
+ import { createConcentricResolver as a, observeConcentricShape as o, observeCornerPlacement as s, registerShapeContainer as c, setResolvedShape as l } from "./dom/shape-layout.js";
5
+ import { chromium as u, gecko as d, webkit as f } from "./dom/engine.js";
6
+ import { blurOutsets as p, filterBudgetFactor as m, filterGraphOutsets as h, outsetBudget as g } from "./dom/filter-budget.js";
7
+ import { attachInteraction as _, resolveMotion as v } from "./dom/interaction.js";
8
+ import { radiusPixels as y, shapeDistance as b } from "./core/morph-path.js";
9
+ import { attachGeometryMotion as x } from "./dom/morph.js";
10
+ import { attachSelectionLens as S } from "./dom/selection.js";
11
+ import { materials as C } from "./core/materials.js";
12
+ import { getMaterialRenderer as w } from "./dom/renderer.js";
13
+ import { clearMaterialMapCache as T, getMaterialMaps as E, getSurfaceMaterialMaps as D, peekMaterialMaps as O, peekSurfaceMaterialMaps as k } from "./dom/maps.js";
14
+ import { capsuleMapGeometry as A, mapImage as ee, mapUrl as te, surfaceMapResult as ne } from "./dom/map-image.js";
15
+ import { comparePaintOrder as j, foregroundFilter as re, overlaps as ie } from "./dom/foreground.js";
16
+ import { filterPixelRatio as ae, pageZoom as M, untiledOutsets as oe } from "./dom/page-zoom.js";
17
+ import { patchFilters as se } from "./dom/filter-patch.js";
18
+ import { createMapWarmer as N } from "./dom/warm.js";
19
+ import { updateControlMotion as P } from "./dom/control-motion.js";
20
+ import { padRepaintReach as ce, repaintReach as le } from "./dom/filter-reach.js";
21
+ import { acquireFilterPaintRoot as ue, acquireSceneCompositingLayer as de } from "./dom/filter-paint-root.js";
22
+ import { createProgressiveLayer as fe } from "./dom/progressive.js";
23
+ import { crossedSides as pe, edgeTiles as me, filterBounds as he, tilesFor as ge } from "./dom/filter-bounds.js";
24
+ import { clusterFilterBranches as _e, mapBoxesOverlap as ve } from "./dom/filter-groups.js";
25
+ import { compoundFieldImage as ye, compoundSources as be, fieldTouches as xe } from "./dom/compound-field.js";
26
+ import { refractionSamplingBounds as Se, unionSamplingBounds as Ce } from "./dom/sampling-bounds.js";
27
+ import { sharedBackdropMaterials as we } from "./dom/shared-backdrop.js";
28
+ import { blendMapImage as Te } from "./dom/map-blend.js";
29
+ import { frostMarkup as Ee, overlayTintMarkup as De, tintChannels as Oe, tintMarkup as ke, toneMarkup as Ae } from "./dom/material-graph.js";
30
+ import { createLensLayers as je } from "./dom/lens-layers.js";
31
+ import { composeSparseLayers as Me } from "./dom/compose-layers.js";
32
+ import { getLayoutSize as Ne } from "@lisse/core";
33
+ //#region src/dom/index.ts
34
+ var Pe = 0, Fe = 0, F = "transform";
35
+ function I(e) {
36
+ let t = e.promoted;
37
+ e.promoted = void 0, t && !t.value && e.element.style.getPropertyValue("will-change") === F && e.element.style.removeProperty("will-change");
38
+ }
39
+ var Ie = 1, L = (e) => JSON.stringify(A(e) ?? e);
40
+ function Le(e, t) {
41
+ let n = 1;
42
+ for (let r = e; r && r !== t; r = r.parentElement) {
43
+ let e = Number(getComputedStyle(r).opacity);
44
+ if (Number.isFinite(e) && (n *= e), n < .001) return 0;
45
+ }
46
+ return n;
47
+ }
48
+ var Re = "http://www.w3.org/2000/svg";
49
+ function R(o, s = {}) {
50
+ let y = f ? de(o) : void 0, S = ++Pe, T = document.createElementNS(Re, "svg");
51
+ T.setAttribute("aria-hidden", "true"), T.setAttribute("width", "0"), T.setAttribute("height", "0"), T.style.position = "absolute", T.style.inset = "0", T.style.pointerEvents = "none";
52
+ let A = document.createElementNS(Re, "defs");
53
+ T.append(A), o.append(T);
54
+ let R = Math.max(1, Math.min(64, Math.floor(s.maxSurfaces ?? 16))), ze = "", Be, Ve, z = null, B = !1, V = !0, He = "", H = /* @__PURE__ */ new Set(), U = /* @__PURE__ */ new Set(), W = 0, Ue = 0, We = !1, Ge = 0, Ke = (e) => {
55
+ e ??= Be ?? Ve ?? [...H].find((e) => e.error)?.error;
56
+ let t = [...H].filter((e) => e.maps), n = String(t.length === H.size && !e);
57
+ o.dataset.glassReady !== n && (o.dataset.glassReady = n);
58
+ let r = `${H.size},${t.length},${e?.message ?? ""},${t.reduce((e, t) => e + t.maps.duration, 0)}`;
59
+ ze !== r && (ze = r, s.onDiagnostic?.({
60
+ surfaces: H.size,
61
+ maps: t.length,
62
+ mapTime: t.reduce((e, t) => e + t.maps.duration, 0),
63
+ error: e
64
+ }), o.dispatchEvent(new CustomEvent("glass:diagnostic", { detail: {
65
+ surfaces: H.size,
66
+ maps: t.length,
67
+ error: e?.message
68
+ } })));
69
+ }, G = fe(o, (e) => Ke(e)), K = N(o), qe = typeof navigator < "u" && "gpu" in navigator ? setTimeout(() => {
70
+ w().then((e) => e.warmed).catch(() => void 0);
71
+ }, 600) : void 0, Je = "", q = 0, Ye = `${M()} ${devicePixelRatio}`, J = d ? je(o) : void 0, Xe = {
72
+ left: 0,
73
+ top: 0,
74
+ width: 0,
75
+ height: 0
76
+ }, Ze = "", Qe = (e) => {
77
+ let t = e.style.getPropertyValue("filter");
78
+ return {
79
+ original: t,
80
+ base: /^(initial|inherit|unset|revert|revert-layer)$/i.test(t.trim()) ? getComputedStyle(e).filter : t,
81
+ priority: e.style.getPropertyPriority("filter"),
82
+ releasePaint: f ? ue(e) : void 0
83
+ };
84
+ }, $e = (e, t, n) => {
85
+ let r = t.base.trim().toLowerCase() === "none" ? "" : t.base, i = n ? [r, n].filter(Boolean).join(" ") : t.original;
86
+ (e.style.getPropertyValue("filter") !== i || e.style.getPropertyPriority("filter") !== t.priority) && e.style.setProperty("filter", i, t.priority), t.applied = e.style.getPropertyValue("filter");
87
+ }, et = (e, t) => {
88
+ t.applied !== void 0 && e.style.getPropertyValue("filter") === t.applied && e.style.getPropertyPriority("filter") === t.priority && (t.original ? e.style.setProperty("filter", t.original, t.priority) : e.style.removeProperty("filter")), t.releasePaint?.();
89
+ }, Y, X, tt = "", Z = /* @__PURE__ */ new Map(), nt = /* @__PURE__ */ new Set(), rt = (e) => {
90
+ Y && et(e, Y), X && (et(X.element, X.style), X.element.removeAttribute("data-glass-blur-active")), X = void 0, Y = void 0;
91
+ }, it = (e) => {
92
+ let t = Z.get(e);
93
+ t !== void 0 && (et(e, t), Z.delete(e));
94
+ }, at = (e, t) => {
95
+ if (e.options.refraction !== void 0) return e.options.refraction;
96
+ if (!t.length) return C[e.options.material ?? "clear"].refraction;
97
+ let n = Math.min(...t.map((t) => Math.min(e.x - t.x, e.y - t.y, t.x + t.w - e.x - e.w, t.y + t.h - e.y - e.h)));
98
+ return Math.max(0, Math.min(8, n * .6));
99
+ }, ot = (e) => [...H].filter((t) => t !== e && t.element.contains(e.element)), st = (e, t) => e.options.material === "regular" ? Math.max(C.regular.blur, (e.options.appearance === "dark" ? C.regular.dark : C.regular.light).fillSigma) * t : 0, Q = 0, ct = -1, lt = [], ut = () => (ct !== Q && (lt = [...H].sort((e, t) => j(e.element, t.element)), ct = Q), lt), dt = -1, ft = [], pt = () => (dt !== Q && (ft = [...ut(), ...nt].sort((e, t) => j(e.element, t.element)), dt = Q), ft);
100
+ function mt(e, t) {
101
+ if (!z) return;
102
+ if (!e || !t) {
103
+ Y && $e(z, Y, "");
104
+ return;
105
+ }
106
+ (T.getAttribute("width") !== String(e) || T.getAttribute("height") !== String(t)) && (T.setAttribute("width", String(e)), T.setAttribute("height", String(t)), T.setAttribute("viewBox", `0 0 ${e} ${t}`));
107
+ let n = `lg-${S}`, r = [], i = [], a = ut(), o = f ? be(a, {
108
+ source: (e) => e.outline?.detachedSource(),
109
+ nested: (e) => ot(e).length > 0,
110
+ refraction: (e) => at(e, ot(e)),
111
+ reach: (e) => Math.ceil(3 * st(e, 1) + at(e, ot(e)) + 8) + 2
112
+ }) : /* @__PURE__ */ new Map(), s = new Set(o.values()), c = (e) => e.length === 2 && o.get(e[1]) === e[0] ? {
113
+ source: e[0],
114
+ popup: e[1]
115
+ } : void 0, l = a.filter((e) => e.maps && (e.opacity >= .001 || s.has(e))), u = new Map(l.map((e) => [e, ot(e)])), _ = new Map(l.map((e) => [e, at(e, u.get(e))])), v = (e) => _.get(e) + 4, y = (e, t) => e.x < t.x + t.w && t.x < e.x + e.w && e.y < t.y + t.h && t.y < e.y + e.h, b = (e, t) => {
116
+ let n = Math.max(v(e), v(t));
117
+ return e.x < t.x + t.w + n && t.x - n < e.x + e.w && e.y < t.y + t.h + n && t.y - n < e.y + e.h;
118
+ }, x = (e) => `${e.options.material ?? "clear"},${e.options.appearance ?? "light"},${e.options.tint ?? ""},${_.get(e)}`, w = (e) => f && e.opacity >= .999 && !u.get(e).length, E = (e) => w(e) && !l.some((t) => t !== e && b(e, t) && (!w(t) || x(t) !== x(e) || ve(e, t))), D = [], O = /* @__PURE__ */ new Map();
119
+ for (let e of l) {
120
+ if (s.has(e)) continue;
121
+ let t = o.get(e);
122
+ if (t) {
123
+ D.push([t, e]);
124
+ continue;
125
+ }
126
+ if (!E(e)) {
127
+ D.push([e]);
128
+ continue;
129
+ }
130
+ let n = x(e), r = O.get(n);
131
+ r || (r = [], O.set(n, r), D.push(r)), r.push(e);
132
+ }
133
+ let k = new Map(D.flatMap((e) => e.map((t) => [t, e]))), j = ae(), M = new Map(l.map((e) => {
134
+ let t = e.options.appearance === "dark" ? C.regular.dark : C.regular.light, n = e.options.material === "regular" ? p(C.regular.blur) + p(t.fillSigma) : 0;
135
+ return [e, j * (n + _.get(e))];
136
+ })), N = (e) => e.reduce((e, t) => e + Math.max(...t.map((e) => M.get(e))) + (t.length === 1 || c(t) ? l.filter((e) => !t.includes(e) && t.some((t) => y(e, t))).reduce((e, t) => Math.max(e, M.get(t)), 0) : 0), 0), P = m(e * j, t * j, N(D)), ue = new Map(l.map((e) => [e, _.get(e) * P])), de = new Map(l.map((e) => {
137
+ let t = e.place, n = !o.has(e) && !s.has(e) && (t ? t.stretched && t.a.x === t.b.x && t.a.y === t.b.y && t.a.w === t.b.w && t.a.h === t.b.h : !(!e.shown || e.shown.outline));
138
+ return [e, Se({
139
+ x: e.x - 2,
140
+ y: e.y - 2,
141
+ width: e.w + 4,
142
+ height: e.h + 4
143
+ }, ue.get(e), n)];
144
+ })), fe = (e) => {
145
+ let t = Math.ceil(3 * st(e, P) + ue.get(e) + 8);
146
+ return {
147
+ x: e.x - 2 - t,
148
+ y: e.y - 2 - t,
149
+ width: e.w + 4 + 2 * t,
150
+ height: e.h + 4 + 2 * t
151
+ };
152
+ }, je = D.flatMap((e) => {
153
+ if (e.length < 2 || c(e)) return [e];
154
+ let t = e[0].options.material === "regular", n = /^#[\da-f]{6}$/i.test(e[0].options.tint ?? "");
155
+ return _e(e, (e) => {
156
+ let t = {
157
+ x: e.x - 2,
158
+ y: e.y - 2,
159
+ width: e.w + 4,
160
+ height: e.h + 4
161
+ }, n = ue.get(e) + 3;
162
+ return {
163
+ output: t,
164
+ crop: fe(e),
165
+ sampled: {
166
+ x: t.x - n,
167
+ y: t.y - n,
168
+ width: t.width + 2 * n,
169
+ height: t.height + 2 * n
170
+ }
171
+ };
172
+ }, {
173
+ output: (t ? 4 : 3) + (n ? 3 : 0),
174
+ sampled: t ? 4 : 0
175
+ });
176
+ });
177
+ !d && m(e * j, t * j, N(je)) >= P && (D = je);
178
+ let Ne = (e) => e.length > 1 ? `g${e.map((e) => e.serial).sort((e, t) => e - t).join("-")}` : `s${e[0].serial}`, Pe = l.map(fe), Fe = (e) => {
179
+ let t = Math.min(...e.map((e) => e.x)), n = Math.min(...e.map((e) => e.y));
180
+ return {
181
+ x: t,
182
+ y: n,
183
+ width: Math.max(...e.map((e) => e.x + e.width)) - t,
184
+ height: Math.max(...e.map((e) => e.y + e.height)) - n
185
+ };
186
+ }, F = he(e, t, Pe, 0), I = (e) => `x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}"`, Ie = (n) => {
187
+ let r = new Map(n.flatMap((e) => e.map((t) => [t, e]))), i = n.flat().map((e) => f ? de.get(e) : fe(e)), a = n.length ? me(e, t, f ? Ce(i) : F, "scene", pe(e, t, i)) : {
188
+ markup: "",
189
+ names: {}
190
+ }, o = [a.markup], s = "SourceGraphic", l = new Map(n.map((e, t) => {
191
+ let r = c(e)?.popup ?? e[0];
192
+ return [e, e.length > 1 && !c(e) ? [] : n.slice(0, t).flat().filter((t) => k.get(t) !== k.get(r) && e.some((e) => xe(t, e, v(r))))];
193
+ })), p = f ? we(n.map((e) => ({
194
+ key: e,
195
+ id: Ne(e),
196
+ options: (c(e)?.popup ?? e[0]).options,
197
+ bounds: Ce(e.map((e) => de.get(e))),
198
+ inputs: l.get(e)
199
+ })), P) : void 0, m = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
200
+ return n.forEach((n) => {
201
+ let i = c(n), _ = i?.popup ?? n[0], v = _.options, y = Ne(n), b = Fe(n.map((e) => ({
202
+ x: e.x - 2,
203
+ y: e.y - 2,
204
+ width: e.w + 4,
205
+ height: e.h + 4
206
+ }))), x = b.x, S = b.y, C = b.width, w = b.height, T = (e, t) => {
207
+ let r = (t, n, r = e) => {
208
+ let i = t.place;
209
+ return i ? Te(r, n, i, t, d) : ee(t.maps, r, n, t.x - 2, t.y - 2, t.w + 4, t.h + 4);
210
+ };
211
+ return i ? ye(i.source, i.popup, e, t, b, (e, t, n) => r(e, n, t)) : n.length === 1 ? r(_, t) : n.map((t) => r(t, ne(t.serial, e))).join("") + `<feMerge result="${t}" ${I(b)}>${n.map((t) => `<feMergeNode in="${ne(t.serial, e)}"/>`).join("")}</feMerge>`;
212
+ }, E = n.length > 1 || _.opacity >= .999, D = o.length;
213
+ o.push(T("field", `${y}field`), ...E ? [] : [`<feComponentTransfer in="${y}field" result="${y}mask"><feFuncA type="linear" slope="${_.opacity}"/></feComponentTransfer>`]);
214
+ let O = E ? `${y}field` : `${y}mask`, k = u.get(_), A = Fe(n.map(fe)), te = l.get(n), j = [];
215
+ for (let e of te) if (n.some((t) => xe(e, t))) j.push(...h.get(r.get(e)));
216
+ else {
217
+ let t = `s${e.serial}`;
218
+ o.push(ee(e.maps, "overlay", `${y}by${t}overlay`, e.x - 2, e.y - 2, e.w + 4, e.h + 4)), j.push(`${y}by${t}overlay`);
219
+ }
220
+ let re = ge(e, t, A).map((e) => a.names[e]).filter((e) => !!e);
221
+ (re.length || j.length) && o.push(`<feMerge result="${y}crop" ${I(A)}>${re.map((e) => `<feMergeNode in="${e}"/>`).join("")}<feMergeNode in="${s}"/>${j.map((e) => `<feMergeNode in="${e}"/>`).join("")}</feMerge>`);
222
+ let ie = re.length || j.length ? `${y}crop` : s, ae = ie;
223
+ if (v.material === "regular") {
224
+ let e = p?.get(n);
225
+ if (e) m.has(e.result) || (o.push(e.markup), m.add(e.result)), ae = e.result;
226
+ else {
227
+ let e = Ee(y, ie, v, P);
228
+ o.push(e.markup), ae = e.result;
229
+ }
230
+ }
231
+ let M = ue.get(_);
232
+ o.push(`<feDisplacementMap in="${ae}" in2="${y}field" scale="${M * 2}" xChannelSelector="R" yChannelSelector="G" result="${y}refracted"/>`, Ae(y, v, k.length > 0));
233
+ let oe = `${y}color`, se = `${y}overlay`, N = Oe(v);
234
+ if (N) {
235
+ let e = ke(y, v, N);
236
+ o.push(e.markup), oe = e.color, se = `${y}tintOverlay`;
237
+ }
238
+ o.push(`<feComposite in="${oe}" in2="${O}" operator="in" result="${y}inside"/>`, T("overlay", `${y}overlay`), ...N ? [De(`${y}overlay`, se, v, N)] : [], ...E ? [] : [`<feComponentTransfer in="${se}" result="${y}fadedOverlay"><feFuncA type="linear" slope="${_.opacity}"/></feComponentTransfer>`]);
239
+ let ce = Ce(n.map((e) => de.get(e))), le = new Set([
240
+ "frost",
241
+ "fill",
242
+ "blend",
243
+ "mix",
244
+ ...f ? ["refracted"] : []
245
+ ].map((e) => `${y}${e}`));
246
+ for (let e = D; e < o.length; e++) o[e] = o[e].replace(/<(feFlood|feComposite|feDisplacementMap|feColorMatrix|feComponentTransfer|feGaussianBlur|feBlend)\b([^>]*?)(\/?)>/g, (e, t, n, r) => {
247
+ if (/\sx="/.test(n)) return e;
248
+ let i = le.has(/result="([^"]+)"/.exec(n)?.[1] ?? "") ? ce : {
249
+ x,
250
+ y: S,
251
+ width: C,
252
+ height: w
253
+ };
254
+ return `<${t}${n} x="${i.x}" y="${i.y}" width="${i.width}" height="${i.height}"${r}>`;
255
+ });
256
+ let pe = [`${y}inside`, E ? se : `${y}fadedOverlay`];
257
+ h.set(n, pe), g.set(n, O);
258
+ }), n.length && o.push(Me(n.map((e) => ({
259
+ id: Ne(e),
260
+ mask: g.get(e),
261
+ layers: h.get(e),
262
+ bounds: Ce(e.map((e) => ({
263
+ x: e.x - 2,
264
+ y: e.y - 2,
265
+ width: e.w + 4,
266
+ height: e.h + 4
267
+ })))
268
+ })))), o.join("");
269
+ };
270
+ if (Be = void 0, J) {
271
+ let e = new Map(l.filter((e) => e.frame).map((e) => [e, {
272
+ serial: e.serial,
273
+ element: e.element,
274
+ options: e.options,
275
+ maps: e.maps,
276
+ place: e.place,
277
+ x: e.x,
278
+ y: e.y,
279
+ w: e.w,
280
+ h: e.h,
281
+ opacity: e.opacity,
282
+ refraction: _.get(e),
283
+ frame: e.frame,
284
+ parents: [],
285
+ beneath: []
286
+ }]));
287
+ for (let [t, n] of e) {
288
+ n.parents.push(...u.get(t).map((t) => e.get(t)).filter((e) => e !== void 0));
289
+ for (let r of l) {
290
+ if (r === t) break;
291
+ let i = e.get(r);
292
+ i && !n.parents.includes(i) && !t.element.contains(r.element) && xe(r, t, v(t)) && n.beneath.push(i);
293
+ }
294
+ }
295
+ J.update([...e.values()], z, Xe, X?.matches ? {
296
+ left: 0,
297
+ top: 0,
298
+ regions: G.regions()
299
+ } : void 0);
300
+ } else if (l.length) {
301
+ let a = Ie(D);
302
+ if (f) {
303
+ let n = h(a), r = n + q, i = m(e * j, t * j, r * j), o = n ? Math.max(0, Math.min(1, (r * i - q) / n)) : 1;
304
+ o < 1 && (a = a.replace(/(<fe(?:GaussianBlur|DisplacementMap)\b[^>]*?\s(?:stdDeviation|scale)=")([^"]+)(")/g, (e, t, n, r) => t + n.split(" ").map((e) => Number(e) * o).join(" ") + r));
305
+ let s = le(a, e, t, G.regions()), c = n * o + q > oe(e, t), l = Math.min(c ? 2 * s : s, g(e * j, t * j) / j, c ? Infinity : oe(e, t, .85)) - q;
306
+ l > n * o && (a = ce(a, Math.floor(l), e, t, c));
307
+ }
308
+ let o = `${n}-scene`;
309
+ r.push(`<filter id="${o}" x="${F.x / e}" y="${F.y / t}" width="${F.width / e}" height="${F.height / t}" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB">${a}</filter>`), i.push(o);
310
+ }
311
+ let L = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Map(), Re = pt(), R = new Map(Re.map((e, t) => [e, t]));
312
+ J || Re.forEach((e) => {
313
+ if (!e.w || !e.h || e.opacity < .001) return;
314
+ let t = a.filter((t) => R.get(e) < R.get(t) && t.maps && t.opacity > .001 && ie(e, t) && t.absorbs?.element !== e.element && !e.element.contains(t.element) && !t.element.contains(e.element) && ![...Le].some(([n, r]) => n.element.contains(e.element) && r.includes(t)));
315
+ if (!t.length) return;
316
+ let i = `${n}-f${e.serial}`;
317
+ r.push(re(i, e, t)), L.set(e.element, i), Le.set(e, t);
318
+ });
319
+ for (let e of Z.keys()) L.has(e) || it(e);
320
+ let ze = se(A, r, te);
321
+ for (let [e, t] of L) Z.has(e) || Z.set(e, Qe(e)), $e(e, Z.get(e), `url("#${ze(t)}")`);
322
+ Je = i.map((e) => `url("#${ze(e)}")`).join(" "), Ke();
323
+ }
324
+ function ht(e, t, n) {
325
+ let r = L(t);
326
+ if (e.prepared.has(r) || e.preparing.has(r)) return;
327
+ let i = k(t);
328
+ if (i) {
329
+ let n = K.has(i);
330
+ K.warm(i), e.prepared.set(r, {
331
+ geometry: t,
332
+ maps: i,
333
+ ready: n ? 0 : performance.now() + 50
334
+ }), V = !0;
335
+ return;
336
+ }
337
+ e.preparing.add(r), W++, D(t, n).then((n) => {
338
+ if (e.preparing.delete(r), !B && H.has(e) && e.path?.some((e) => L({
339
+ ...e,
340
+ dpr: t.dpr,
341
+ appearance: t.appearance
342
+ }) === r)) {
343
+ let i = K.has(n);
344
+ K.warm(n), e.prepared.set(r, {
345
+ geometry: t,
346
+ maps: n,
347
+ ready: i ? 0 : performance.now() + 50
348
+ }), V = !0;
349
+ }
350
+ }).catch(() => {
351
+ e.preparing.delete(r);
352
+ }).finally(() => {
353
+ W--, $.wake();
354
+ });
355
+ }
356
+ function gt(e, t, n) {
357
+ let r = n ? L(t) : JSON.stringify(t);
358
+ if (e.wanted = r, r === e.key || e.inflight) return;
359
+ let i = n ? k(t) : O(t);
360
+ if (i && (K.has(i) || !e.maps)) {
361
+ e.key = r, K.warm(i), e.maps = i, e.shown = t, e.error = void 0, V = !0;
362
+ return;
363
+ }
364
+ e.key = r, e.inflight = !0, W++, (n ? D(t) : E(t)).then((n) => {
365
+ if (e.inflight = !1, B || !H.has(e)) return;
366
+ if (f && !e.maps && e.wanted !== r) {
367
+ e.key = void 0, $.wake();
368
+ return;
369
+ }
370
+ let i = K.has(n);
371
+ K.warm(n);
372
+ let a = () => {
373
+ !B && H.has(e) && (e.maps = n, e.shown = t, e.error = void 0, V = !0, $.wake());
374
+ };
375
+ e.maps && !i ? setTimeout(a, 50) : a();
376
+ }).catch((t) => {
377
+ e.inflight = !1, !B && H.has(e) && e.key === r && (e.error = t instanceof Error ? t : Error(String(t)), Ke(e.error));
378
+ }).finally(() => {
379
+ W--, $.wake();
380
+ });
381
+ }
382
+ function _t(e) {
383
+ if (B) return !1;
384
+ let i = [], a = P(o, e), s = !1, c = !1, d = (z ?? o).getBoundingClientRect(), f = z ? z.offsetWidth : o.clientWidth, p = z ? z.offsetHeight : o.clientHeight;
385
+ Xe = {
386
+ left: 0,
387
+ top: 0,
388
+ width: d.width,
389
+ height: d.height
390
+ };
391
+ let m = `${f},${p}`;
392
+ m !== He && (V = !0, He = m), U.forEach((t) => {
393
+ t.frame(e, We) && (a = !0);
394
+ }), H.forEach((t) => t.animators.forEach((t) => {
395
+ t.frame(e, We) && (a = !0);
396
+ }));
397
+ let h = [...H].some((e) => e.outline?.pending());
398
+ We = h;
399
+ let g = (e, t) => L({
400
+ width: t.width,
401
+ height: t.height,
402
+ radius: t.radius,
403
+ outline: t.outline,
404
+ dpr: t.dpr ?? Ie,
405
+ appearance: e.options.appearance
406
+ }), _ = /* @__PURE__ */ new Map(), v = (e, t) => {
407
+ e.writtenClip !== t && (e.writtenClip = t, i.push(() => {
408
+ e.element.style.clipPath = t, e.element.style.borderRadius = "0px";
409
+ }));
410
+ }, y = (e, t) => {
411
+ e.writtenRadius !== t && (e.writtenRadius = t, i.push(() => e.element.style.setProperty("--lg-radius", t)));
412
+ };
413
+ H.forEach((t) => {
414
+ t.place = void 0;
415
+ let n = t.outline?.geometry();
416
+ if (!n) return;
417
+ let r = t.outline.waypoints();
418
+ if (r !== t.path) {
419
+ t.path = r;
420
+ let e = new Set(r.map((e) => g(t, e)));
421
+ for (let [n, r] of t.prepared) !e.has(n) && r.maps !== t.maps && t.prepared.delete(n);
422
+ for (let e of r) ht(t, {
423
+ width: e.width,
424
+ height: e.height,
425
+ radius: e.radius,
426
+ outline: e.outline,
427
+ dpr: e.dpr ?? Ie,
428
+ appearance: t.options.appearance
429
+ }, !!e.resting);
430
+ }
431
+ let i = n.draw;
432
+ if (!i) return;
433
+ let a = (n) => {
434
+ let r = t.prepared.get(g(t, n.shape));
435
+ return r && r.ready <= e ? r : void 0;
436
+ }, o = (e, t) => ({
437
+ maps: t.maps,
438
+ x: e.left - d.left,
439
+ y: e.top - d.top,
440
+ w: e.width,
441
+ h: e.height
442
+ }), s = a(i.a), c = i.b ? a(i.b) : s, l = !1;
443
+ if (!s) {
444
+ let r = Infinity;
445
+ for (let i of t.prepared.values()) {
446
+ if (i.geometry.outline || i.ready > e) continue;
447
+ let t = b(i.geometry, n);
448
+ t < r && (r = t, s = i);
449
+ }
450
+ l = !0;
451
+ }
452
+ if (!s) return;
453
+ let u = {
454
+ shape: i.a.shape,
455
+ left: n.left,
456
+ top: n.top,
457
+ width: n.width,
458
+ height: n.height
459
+ }, f = o(l ? u : i.a, s), p = !l && c && i.b ? o(i.b, c) : f;
460
+ t.place = {
461
+ a: f,
462
+ b: p,
463
+ mix: p === f ? 0 : i.mix,
464
+ stretched: l || !i.a.shape.outline && !i.b?.shape.outline
465
+ }, n.absorbs && !l && _.set(n.absorbs.element, Math.max(_.get(n.absorbs.element) ?? 0, n.absorbs.weight));
466
+ }), H.forEach((c) => {
467
+ let u = c.outline?.geometry(), f = c.place;
468
+ if (J) {
469
+ let e = c.element.getBoundingClientRect(), t = {
470
+ left: e.left - d.left,
471
+ top: e.top - d.top,
472
+ sx: e.width / (c.element.offsetWidth || e.width || 1),
473
+ sy: e.height / (c.element.offsetHeight || e.height || 1),
474
+ clientLeft: c.element.clientLeft,
475
+ clientTop: c.element.clientTop
476
+ };
477
+ (!c.frame || Object.entries(t).some(([e, t]) => Math.abs(t - c.frame[e]) > .01)) && (V = !0), c.frame = t;
478
+ }
479
+ let p = f ? {
480
+ left: Math.min(f.a.x, f.b.x) + d.left,
481
+ top: Math.min(f.a.y, f.b.y) + d.top,
482
+ width: Math.max(f.a.x + f.a.w, f.b.x + f.b.w) - Math.min(f.a.x, f.b.x),
483
+ height: Math.max(f.a.y + f.a.h, f.b.y + f.b.h) - Math.min(f.a.y, f.b.y)
484
+ } : u ?? (({ left: e, top: t, width: n, height: r }) => ({
485
+ left: e,
486
+ top: t,
487
+ width: n,
488
+ height: r
489
+ }))(c.element.getBoundingClientRect()), m = p.left - d.left, h = p.top - d.top, b = p.width, x = p.height;
490
+ [
491
+ m - c.x,
492
+ h - c.y,
493
+ b - c.w,
494
+ x - c.h
495
+ ].some((e) => Math.abs(e) > .05) && (Object.assign(c, {
496
+ x: m,
497
+ y: h,
498
+ w: b,
499
+ h: x
500
+ }), u || (c.movedAt = e), s = !0, V = !0), c.baseOpacity = Le(c.element, o) * (c.outline?.opacity() ?? 1);
501
+ let S = c.baseOpacity * (1 - (_.get(c.element) ?? 0));
502
+ Math.abs(S - c.opacity) > .001 && (c.opacity = S, V = !0);
503
+ let C = Math.min(devicePixelRatio || 1, 2);
504
+ if (u || (c.absorbs = void 0), u) {
505
+ a = !0, c.absorbs = u.absorbs, f ? (c.maps = f.a.maps, c.shown = c.prepared.get(g(c, u.draw.a.shape))?.geometry ?? c.shown) : c.maps = void 0, V = !0;
506
+ let e = f?.stretched ? c.shown : void 0, t = c.element.getBoundingClientRect(), o = (c.element.offsetWidth || 1) / (t.width || 1), s = (c.element.offsetHeight || 1) / (t.height || 1), l = !e || e.radius === "capsule" && u.radius === "capsule" && Math.abs(e.height - u.height) < .5 ? {
507
+ width: u.width,
508
+ height: u.height,
509
+ radius: u.radius
510
+ } : e, d = u.width / l.width, p = u.height / l.height, m = n(l.width, l.height, l.radius).map(([e, n]) => [(u.left - t.left + e * d) * o, (u.top - t.top + n * p) * s]);
511
+ v(c, r(m));
512
+ let h = u.radius === "capsule" ? Math.min(u.width, u.height) / 2 : u.radius;
513
+ y(c, `${h.toFixed(2)}px`);
514
+ let _ = c.maps ? "1" : "0";
515
+ c.writtenReady !== _ && (c.writtenReady = _, i.push(() => c.element.style.setProperty("--lg-glass-ready", _))), c.geometryKey = void 0, c.key = void 0;
516
+ return;
517
+ }
518
+ if (c.outline?.positioning()) return;
519
+ let { width: w, height: T } = Ne(c.element);
520
+ if (!w || !T) return;
521
+ let E = c.options.radius ?? 8, D = c.resolveShape?.();
522
+ if (c.resolveShape && (!D || D.length < 3)) {
523
+ c.maps && (c.maps = void 0, V = !0), c.key = void 0, c.geometryKey = void 0, l(c.element, []), v(c, r([]));
524
+ return;
525
+ }
526
+ l(c.element, D);
527
+ let O = {
528
+ outline: D,
529
+ width: w,
530
+ height: T,
531
+ radius: E,
532
+ dpr: C,
533
+ appearance: c.options.appearance
534
+ };
535
+ if (E === "capsule" && !D && Math.abs(b / w - x / T) > .004) {
536
+ let e = n(b, x, "capsule").map(([e, t]) => [e * w / b, t * T / x]);
537
+ v(c, r(e)), c.geometryKey = void 0, gt(c, O, !0);
538
+ return;
539
+ }
540
+ let k = JSON.stringify(O);
541
+ k !== c.geometryKey && (c.geometryKey !== void 0 && (c.resized = e), c.geometryKey = k, v(c, D ? r(D) : t(w, T, E)), y(c, `${typeof E == "number" ? Math.min(E, w / 2, T / 2) : Math.min(w, T) / 2}px`));
542
+ let A = E === "capsule" && e - (c.resized ?? 0) < 500;
543
+ A && (a = !0), gt(c, O, A);
544
+ }), u && H.forEach((t) => {
545
+ let n = e - (t.movedAt ?? -Infinity) < 400;
546
+ n && (c = !0), n !== !!t.promoted && (n ? (t.promoted = {
547
+ value: t.element.style.getPropertyValue("will-change"),
548
+ priority: t.element.style.getPropertyPriority("will-change")
549
+ }, t.promoted.value || i.push(() => t.element.style.setProperty("will-change", F))) : i.push(() => I(t)));
550
+ }), nt.forEach((e) => {
551
+ let t = e.element.getBoundingClientRect(), n = {
552
+ x: t.left - d.left,
553
+ y: t.top - d.top,
554
+ w: t.width,
555
+ h: t.height
556
+ };
557
+ Object.entries(n).some(([t, n]) => Math.abs(n - e[t]) > .05) && (Object.assign(e, n), V = !0);
558
+ });
559
+ let x = pt().map((e) => e.serial).join(",");
560
+ if (x !== Ze && (V = !0, Ze = x), X) {
561
+ let e = X.element.getBoundingClientRect();
562
+ X.matches = Math.abs(e.left - d.left) < .5 && Math.abs(e.top - d.top) < .5 && Math.abs(e.width - d.width) < .5 && Math.abs(e.height - d.height) < .5;
563
+ }
564
+ let S = z ? G.update(z) : "";
565
+ if (X) {
566
+ let e = JSON.stringify([X.matches, G.regions()]);
567
+ e !== tt && (tt = e, V = !0);
568
+ }
569
+ let C = G.outsets();
570
+ C !== q && (q = C, V = !0);
571
+ let w = `${M()} ${devicePixelRatio}`;
572
+ w !== Ye && (Ye = w, V = !0);
573
+ let T = V, E = (a || s) && e - Ge < 15, D = V && !h && !E;
574
+ D && (Ge = e), !h && !E && (V = !1);
575
+ let O = G.error(), k = Ve?.message !== O?.message;
576
+ return Ve = O, i.push(() => {
577
+ if (D && mt(f, p), z) {
578
+ let e = X?.matches ? Je : (G.scrollsContent() ? [S, Je] : [Je, S]).filter(Boolean).join(" ");
579
+ Y && $e(z, Y, e), X && $e(X.element, X.style, X.matches ? S : "");
580
+ }
581
+ k && Ke();
582
+ }), {
583
+ active: a || T || c || W > 0,
584
+ write: () => {
585
+ for (let e of i) e();
586
+ }
587
+ };
588
+ }
589
+ let $ = i(_t, {
590
+ root: o,
591
+ ignore: (e) => T.contains(e) || K.owns(e) || !!J?.owns(e),
592
+ onMutation: () => {
593
+ Q++;
594
+ }
595
+ });
596
+ return {
597
+ setContent(e) {
598
+ z && rt(z), z && $.unobserve(z), z = e, e && (Y = Qe(e));
599
+ let t = e?.parentElement;
600
+ J && t?.hasAttribute("data-glass-blur-host") && (t.setAttribute("data-glass-blur-active", ""), X = {
601
+ element: t,
602
+ style: Qe(t)
603
+ }), e && $.observe(e), V = !0, $.wake();
604
+ },
605
+ addSurface(t, n = {}) {
606
+ if (H.size >= R) throw RangeError(`GlassScene supports ${R} surfaces; increase maxSurfaces up to 64 or split the scene.`);
607
+ if (!Number.isFinite(n.refraction ?? 60) || (n.refraction ?? 60) < 0) throw RangeError("Refraction must be finite and nonnegative.");
608
+ e(n.radius ?? 8);
609
+ let r = {
610
+ serial: ++Fe,
611
+ element: t,
612
+ options: n,
613
+ resolveShape: n.concentric ? a(t, typeof n.concentric == "object" ? n.concentric.inset : void 0, n.radius ?? 8) : void 0,
614
+ releaseShape: c(t, n.radius ?? 8),
615
+ clip: t.style.clipPath,
616
+ borderRadius: t.style.borderRadius,
617
+ x: 0,
618
+ y: 0,
619
+ w: 0,
620
+ h: 0,
621
+ opacity: 1,
622
+ animators: [],
623
+ prepared: /* @__PURE__ */ new Map(),
624
+ preparing: /* @__PURE__ */ new Set()
625
+ }, i = () => v(n.motion);
626
+ (n.morphFrom || n.fluid) && !n.concentric && r.animators.push(r.outline = x(t, {
627
+ from: n.morphFrom,
628
+ morph: n.morph,
629
+ layout: n.fluid,
630
+ radius: n.radius ?? 8,
631
+ motion: i,
632
+ neck: n.neck,
633
+ enter: n.morphEnter,
634
+ submenu: t.hasAttribute("data-glass-submenu"),
635
+ prepared: (e) => {
636
+ let t = r.prepared.get(L({
637
+ width: e.width,
638
+ height: e.height,
639
+ radius: e.radius,
640
+ outline: e.outline,
641
+ dpr: e.dpr ?? Ie,
642
+ appearance: n.appearance
643
+ }));
644
+ return !!t && t.ready <= performance.now();
645
+ }
646
+ })), n.interactive && (r.animators.push(_(t, i)), t.dataset.glassInteractive !== "" && (t.dataset.glassInteractive = ""));
647
+ let s = t.getAttribute("data-glass-appearance");
648
+ return s !== (n.appearance ?? "light") && (t.dataset.glassAppearance = n.appearance ?? "light"), H.add(r), $.observe(t), Q++, V = !0, n.morphFrom && (Ue++, o.dataset.glassPopup = ""), $.wake(), () => {
649
+ r.animators.forEach((e) => e.dispose()), n.interactive && delete t.dataset.glassInteractive, l(t), r.releaseShape(), it(t), t.style.clipPath = r.clip, t.style.borderRadius = r.borderRadius, t.style.removeProperty("--lg-radius"), I(r), H.delete(r), Q++, $.unobserve(t), n.morphFrom && --Ue === 0 && delete o.dataset.glassPopup, s === null ? t.removeAttribute("data-glass-appearance") : t.setAttribute("data-glass-appearance", s), V = !0, $.wake();
650
+ };
651
+ },
652
+ addForeground(e) {
653
+ let t = {
654
+ element: e,
655
+ serial: ++Fe,
656
+ x: 0,
657
+ y: 0,
658
+ w: 0,
659
+ h: 0,
660
+ opacity: 1,
661
+ options: {}
662
+ };
663
+ return nt.add(t), Q++, $.observe(e), V = !0, $.wake(), () => {
664
+ it(e), nt.delete(t), Q++, $.unobserve(e), V = !0, $.wake();
665
+ };
666
+ },
667
+ addAnimator(e) {
668
+ return U.add(e), $.wake(), () => {
669
+ U.delete(e), e.dispose(), $.wake();
670
+ };
671
+ },
672
+ addProgressiveBlur: (e, t) => {
673
+ let n = G.add(e, t);
674
+ return $.wake(), () => {
675
+ n(), $.wake();
676
+ };
677
+ },
678
+ addScrollEdges: (e) => {
679
+ let t = G.addScroll(e);
680
+ return $.wake(), () => {
681
+ t(), $.wake();
682
+ };
683
+ },
684
+ dispose() {
685
+ clearTimeout(qe), G.dispose(), J?.dispose(), K.dispose(), U.forEach((e) => e.dispose()), U.clear(), B = !0, $.dispose(), z && rt(z);
686
+ for (let e of Z.keys()) it(e);
687
+ T.remove(), y?.(), H.forEach((e) => {
688
+ e.animators.forEach((e) => e.dispose()), l(e.element), e.releaseShape(), e.element.style.clipPath = e.clip, e.element.style.borderRadius = e.borderRadius, e.element.style.removeProperty("--lg-radius"), I(e);
689
+ }), H.clear(), nt.clear();
690
+ }
691
+ };
692
+ }
693
+ //#endregion
694
+ export { x as attachGeometryMotion, _ as attachInteraction, S as attachSelectionLens, T as clearMaterialMapCache, R as createGlassScene, E as getMaterialMaps, o as observeConcentricShape, s as observeCornerPlacement, y as radiusPixels, c as registerShapeContainer, v as resolveMotion };