@m3ui-vue/m3ui-vue 1.9.0 → 1.10.0

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 (154) hide show
  1. package/README.md +2 -0
  2. package/dist/API.md +305 -12
  3. package/dist/{MButton-LiZRRP4h.js → MButton-B9RCM06i.js} +4 -4
  4. package/dist/MButton-B9RCM06i.js.map +1 -0
  5. package/dist/{MColorPickerModal-IjciC8zh.js → MColorPickerModal-ChRtcZOo.js} +5 -5
  6. package/dist/{MColorPickerModal-IjciC8zh.js.map → MColorPickerModal-ChRtcZOo.js.map} +1 -1
  7. package/dist/{MDialog-BLpfgIA3.js → MDialog-dk07tify.js} +3 -3
  8. package/dist/{MDialog-BLpfgIA3.js.map → MDialog-dk07tify.js.map} +1 -1
  9. package/dist/{MIconButton-CNjN0xwW.js → MIconButton-CrBPZidd.js} +46 -39
  10. package/dist/MIconButton-CrBPZidd.js.map +1 -0
  11. package/dist/MListItem-h9H223vx.js +1239 -0
  12. package/dist/MListItem-h9H223vx.js.map +1 -0
  13. package/dist/{MLoadingIndicator-dejdXpu8.js → MLoadingIndicator-YTV1Ov5w.js} +2 -2
  14. package/dist/{MLoadingIndicator-dejdXpu8.js.map → MLoadingIndicator-YTV1Ov5w.js.map} +1 -1
  15. package/dist/MMenuItem-US0Zbglq.js +596 -0
  16. package/dist/MMenuItem-US0Zbglq.js.map +1 -0
  17. package/dist/{MPdfViewer-B5Q9Xs9d.js → MPdfViewer-DL9mRsd2.js} +8 -8
  18. package/dist/{MPdfViewer-B5Q9Xs9d.js.map → MPdfViewer-DL9mRsd2.js.map} +1 -1
  19. package/dist/MProgressBar-BzZMxq7M.js +254 -0
  20. package/dist/MProgressBar-BzZMxq7M.js.map +1 -0
  21. package/dist/{MSeekBar-NwkuAzx-.js → MSeekBar-JFZcoJ8y.js} +2 -2
  22. package/dist/{MSeekBar-NwkuAzx-.js.map → MSeekBar-JFZcoJ8y.js.map} +1 -1
  23. package/dist/MSegmentedButton-DMou-8sG.js +106 -0
  24. package/dist/MSegmentedButton-DMou-8sG.js.map +1 -0
  25. package/dist/{MSignaturePad-Bqr-1R9f.js → MSignaturePad-WuvE_Cyl.js} +2 -2
  26. package/dist/{MSignaturePad-Bqr-1R9f.js.map → MSignaturePad-WuvE_Cyl.js.map} +1 -1
  27. package/dist/{MSlider-B7dIcHVn.js → MSlider-7TzhFHKS.js} +3 -3
  28. package/dist/{MSlider-B7dIcHVn.js.map → MSlider-7TzhFHKS.js.map} +1 -1
  29. package/dist/{MSpinner-CXLY7lWw.js → MSpinner-CkIVBuGE.js} +2 -2
  30. package/dist/{MSpinner-CXLY7lWw.js.map → MSpinner-CkIVBuGE.js.map} +1 -1
  31. package/dist/{MTextField-CryHMs8-.js → MTextField-B6_iOczK.js} +3 -3
  32. package/dist/{MTextField-CryHMs8-.js.map → MTextField-B6_iOczK.js.map} +1 -1
  33. package/dist/{_useFieldValidation-CvZnZfl-.js → _useFieldValidation-COBJ1tWr.js} +2 -2
  34. package/dist/{_useFieldValidation-CvZnZfl-.js.map → _useFieldValidation-COBJ1tWr.js.map} +1 -1
  35. package/dist/api.json +1 -1
  36. package/dist/code-editor.js +2 -2
  37. package/dist/components/MAvatarGroup.vue.d.ts +48 -0
  38. package/dist/components/MCommentThread.vue.d.ts +42 -0
  39. package/dist/components/MContainer.vue.d.ts +1 -1
  40. package/dist/components/MContextMenu.vue.d.ts +7 -0
  41. package/dist/components/MDataTable.vue.d.ts +7 -0
  42. package/dist/components/MList.vue.d.ts +11 -0
  43. package/dist/components/MListDetail.vue.d.ts +22 -0
  44. package/dist/components/MListItem.vue.d.ts +9 -1
  45. package/dist/components/MMenu.vue.d.ts +10 -0
  46. package/dist/components/MReactions.vue.d.ts +35 -0
  47. package/dist/components/MScaffold.vue.d.ts +45 -0
  48. package/dist/components/MScrollField.vue.d.ts +4 -1
  49. package/dist/components/MScrollable.vue.d.ts +5 -4
  50. package/dist/components/MSpreadsheet.vue.d.ts +1 -1
  51. package/dist/components/MSupportingPane.vue.d.ts +22 -0
  52. package/dist/components/MTable.vue.d.ts +7 -0
  53. package/dist/components/MVirtualList.vue.d.ts +51 -0
  54. package/dist/components/_MComment.vue.d.ts +8 -0
  55. package/dist/components/_MCommentComposer.vue.d.ts +23 -0
  56. package/dist/components/_commentThread.d.ts +41 -0
  57. package/dist/composables/_menuGroups.d.ts +7 -0
  58. package/dist/composables/_usePaneResize.d.ts +45 -0
  59. package/dist/composables/useLocale.d.ts +22 -0
  60. package/dist/composables/useUndo.d.ts +45 -0
  61. package/dist/directives/vRipple.d.ts +4 -0
  62. package/dist/draw.js +4 -4
  63. package/dist/flow.js +2 -2
  64. package/dist/gantt.js +3 -3
  65. package/dist/index.d.ts +12 -0
  66. package/dist/locales/index.js +128 -0
  67. package/dist/locales/index.js.map +1 -1
  68. package/dist/m3ui-vue.css +1 -1
  69. package/dist/m3ui.js +11027 -9741
  70. package/dist/m3ui.js.map +1 -1
  71. package/dist/map.js +7 -7
  72. package/dist/media.js +6 -6
  73. package/dist/pdf-sign.js +8 -8
  74. package/dist/pdf.js +1 -1
  75. package/dist/plugin.d.ts +6 -0
  76. package/dist/rich-text-editor.js +6 -6
  77. package/dist/styles/theme.css +43 -6
  78. package/dist/styles.css +1 -1
  79. package/dist/{useLocale-ybIju59R.js → useLocale-YRaOT12S.js} +17 -1
  80. package/dist/useLocale-YRaOT12S.js.map +1 -0
  81. package/package.json +1 -1
  82. package/src/__tests__/MListItemNestedControl.test.ts +1 -1
  83. package/src/__tests__/MListMultiSelect.test.ts +132 -0
  84. package/src/__tests__/MMenu.test.ts +152 -0
  85. package/src/__tests__/MProgressBar.test.ts +84 -1
  86. package/src/__tests__/MScrollField.test.ts +16 -0
  87. package/src/__tests__/MScrollable.test.ts +61 -5
  88. package/src/__tests__/MSwitch.test.ts +83 -0
  89. package/src/__tests__/adaptiveLayouts.test.ts +167 -0
  90. package/src/__tests__/backlogComponents.test.ts +249 -0
  91. package/src/__tests__/popupPosition.test.ts +4 -0
  92. package/src/__tests__/stateLayerOpacity.test.ts +65 -0
  93. package/src/__tests__/tableCheckboxReveal.test.ts +35 -0
  94. package/src/__tests__/vRipple.test.ts +62 -0
  95. package/src/components/MAvatarGroup.vue +150 -0
  96. package/src/components/MButton.vue +1 -1
  97. package/src/components/MButtonGroup.vue +1 -1
  98. package/src/components/MCard.vue +4 -2
  99. package/src/components/MCheckbox.vue +13 -2
  100. package/src/components/MChip.vue +7 -4
  101. package/src/components/MCircleProgressBar.vue +69 -21
  102. package/src/components/MCommentThread.vue +131 -0
  103. package/src/components/MContextMenu.vue +18 -31
  104. package/src/components/MDataTable.vue +16 -6
  105. package/src/components/MFab.vue +2 -2
  106. package/src/components/MIconButton.vue +2 -2
  107. package/src/components/MList.vue +163 -5
  108. package/src/components/MListDetail.vue +100 -14
  109. package/src/components/MListItem.vue +66 -6
  110. package/src/components/MMenu.vue +48 -41
  111. package/src/components/MMenuItem.vue +48 -14
  112. package/src/components/MProgressBar.vue +183 -50
  113. package/src/components/MRadio.vue +14 -2
  114. package/src/components/MReactions.vue +161 -0
  115. package/src/components/MScaffold.vue +213 -0
  116. package/src/components/MScrollField.vue +15 -12
  117. package/src/components/MScrollable.vue +187 -46
  118. package/src/components/MSegmentedButton.vue +3 -1
  119. package/src/components/MSupportingPane.vue +102 -12
  120. package/src/components/MSwitch.vue +92 -9
  121. package/src/components/MTable.vue +17 -4
  122. package/src/components/MTimeScroll.vue +1 -1
  123. package/src/components/MToggleButton.vue +2 -2
  124. package/src/components/MVirtualList.vue +222 -0
  125. package/src/components/_MComment.vue +142 -0
  126. package/src/components/_MCommentComposer.vue +68 -0
  127. package/src/components/_commentThread.ts +46 -0
  128. package/src/composables/_menuGroups.ts +31 -0
  129. package/src/composables/_usePaneResize.ts +271 -0
  130. package/src/composables/useLocale.ts +38 -0
  131. package/src/composables/useUndo.ts +170 -0
  132. package/src/directives/vRipple.ts +18 -5
  133. package/src/index.ts +12 -0
  134. package/src/locales/ar.ts +16 -0
  135. package/src/locales/de.ts +16 -0
  136. package/src/locales/es.ts +16 -0
  137. package/src/locales/fr.ts +16 -0
  138. package/src/locales/ja.ts +16 -0
  139. package/src/locales/ko.ts +16 -0
  140. package/src/locales/pt.ts +16 -0
  141. package/src/locales/zh.ts +16 -0
  142. package/src/plugin.ts +7 -0
  143. package/src/styles/theme.css +43 -6
  144. package/dist/MButton-LiZRRP4h.js.map +0 -1
  145. package/dist/MIconButton-CNjN0xwW.js.map +0 -1
  146. package/dist/MListItem-BBQ-6i3v.js +0 -991
  147. package/dist/MListItem-BBQ-6i3v.js.map +0 -1
  148. package/dist/MMenuItem-E31tMzOt.js +0 -577
  149. package/dist/MMenuItem-E31tMzOt.js.map +0 -1
  150. package/dist/MProgressBar-CPrZhQbA.js +0 -179
  151. package/dist/MProgressBar-CPrZhQbA.js.map +0 -1
  152. package/dist/MSegmentedButton-DZuZLBML.js +0 -105
  153. package/dist/MSegmentedButton-DZuZLBML.js.map +0 -1
  154. package/dist/useLocale-ybIju59R.js.map +0 -1
@@ -5,20 +5,27 @@ import { computed as r, createBlock as i, createVNode as a, defineComponent as o
5
5
  function v(e) {
6
6
  return e === !1 ? { disabled: !0 } : typeof e == "string" ? { color: e } : e === !0 || e == null ? {} : e;
7
7
  }
8
- function y(e, t, n) {
9
- let r = e.getBoundingClientRect(), i = Math.max(r.width, r.height) * 2, a = document.createElement("span");
10
- a.className = "m3-ripple-layer";
8
+ function y(e, t, n, r = !1) {
9
+ let i = e.getBoundingClientRect(), a = Math.max(i.width, i.height) * 2;
10
+ r && (t = {
11
+ clientX: i.left + i.width / 2,
12
+ clientY: i.top + i.height / 2
13
+ });
11
14
  let o = document.createElement("span");
12
- o.className = "m3-ripple", o.style.cssText = `width:${i}px;height:${i}px;top:${t.clientY - r.top - i / 2}px;left:${t.clientX - r.left - i / 2}px`, n && (o.style.background = n), a.appendChild(o), e.appendChild(a), o.addEventListener("animationend", () => a.remove(), { once: !0 });
15
+ o.className = "m3-ripple-layer";
16
+ let s = document.createElement("span");
17
+ s.className = "m3-ripple", s.style.cssText = `width:${a}px;height:${a}px;top:${t.clientY - i.top - a / 2}px;left:${t.clientX - i.left - a / 2}px`, n && (s.style.background = n), o.appendChild(s), e.appendChild(o), s.addEventListener("animationend", () => o.remove(), { once: !0 });
13
18
  }
14
- var b = /* @__PURE__ */ new WeakMap(), x = {
19
+ var b = /* @__PURE__ */ new WeakMap(), x = "button, a[href], input, select, textarea, [role=\"button\"], [role=\"checkbox\"], [role=\"switch\"], [contenteditable], [data-no-ripple]", S = () => document.documentElement.dataset.m3Ripple === "off", C = {
15
20
  mounted(e, t) {
16
21
  let n = {
17
22
  options: v(t.value),
18
23
  onPointerDown(t) {
19
- if (n.options.disabled || t.button !== 0) return;
20
- let { position: r } = getComputedStyle(e);
21
- r && r !== "static" || (e.style.position = "relative"), y(e, t, n.options.color);
24
+ if (n.options.disabled || t.button !== 0 || S()) return;
25
+ let r = t.target?.closest?.(x);
26
+ if (r && r !== e && e.contains(r)) return;
27
+ let i = n.options.layer?.() ?? e, { position: a } = getComputedStyle(i);
28
+ a && a !== "static" || (i.style.position = "relative"), y(i, t, n.options.color, n.options.centered);
22
29
  }
23
30
  };
24
31
  b.set(e, n), e.addEventListener("pointerdown", n.onPointerDown);
@@ -31,34 +38,34 @@ var b = /* @__PURE__ */ new WeakMap(), x = {
31
38
  let t = b.get(e);
32
39
  t && e.removeEventListener("pointerdown", t.onPointerDown), b.delete(e);
33
40
  }
34
- }, S = 1e3 / 60, C = .004;
35
- function w(e, t, n, r, i) {
41
+ }, w = 1e3 / 60, T = .004;
42
+ function E(e, t, n, r, i) {
36
43
  let a = [e], o = e, s = n, c = 2 * r.dampingRatio * Math.sqrt(r.stiffness);
37
44
  for (let e = 0; e < 600; e++) {
38
- for (let e = S / 1e3; e > 1e-9; e -= C) {
39
- let n = Math.min(C, e);
45
+ for (let e = w / 1e3; e > 1e-9; e -= T) {
46
+ let n = Math.min(T, e);
40
47
  s += (-r.stiffness * (o - t) - c * s) * n, o += s * n;
41
48
  }
42
49
  if (a.push(o), Math.abs(o - t) < i && Math.abs(s) < i * 10) break;
43
50
  }
44
51
  return a[a.length - 1] = t, a;
45
52
  }
46
- function T(e, t) {
47
- let n = Number(t ?? 0) / S, r = Math.floor(n);
53
+ function D(e, t) {
54
+ let n = Number(t ?? 0) / w, r = Math.floor(n);
48
55
  return r >= e.length - 1 ? e[e.length - 1] : r < 0 ? e[0] : e[r] + (e[r + 1] - e[r]) * (n - r);
49
56
  }
50
- var E = (e) => (e.length - 1) * S;
51
- function D(e, t, n, r = 0) {
57
+ var O = (e) => (e.length - 1) * w;
58
+ function k(e, t, n, r = 0) {
52
59
  if (!e || typeof e.animate != "function" || t.length < 2) return null;
53
60
  let i = e.animate(t.map(n), {
54
- duration: E(t),
61
+ duration: O(t),
55
62
  delay: r,
56
63
  easing: "linear"
57
64
  });
58
65
  return i.finished.catch(() => {}), i;
59
66
  }
60
- var O = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, k = t.standard.fastSpatial, A = t.standard.fastEffects, j = t.standard.defaultEffects, M = t.standard.defaultSpatial, N = .004;
61
- function P(e, t, n = k) {
67
+ var A = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, j = t.standard.fastSpatial, M = t.standard.fastEffects, N = t.standard.defaultEffects, P = t.standard.defaultSpatial, F = .004;
68
+ function I(e, t, n = j) {
62
69
  let r = [...e()], i = r.map(() => 0), a = 0, o = 0;
63
70
  function s(c) {
64
71
  let l = Math.min((c - o) / 1e3, 1 / 30);
@@ -67,7 +74,7 @@ function P(e, t, n = k) {
67
74
  u.length !== r.length && (r = [...u], i = u.map(() => 0));
68
75
  let d = n.stiffness, f = 2 * n.dampingRatio * Math.sqrt(d);
69
76
  for (; l > 0;) {
70
- let e = Math.min(l, N);
77
+ let e = Math.min(l, F);
71
78
  l -= e;
72
79
  for (let t = 0; t < u.length; t++) i[t] += (-d * (r[t] - u[t]) - f * i[t]) * e, r[t] += i[t] * e;
73
80
  }
@@ -82,7 +89,7 @@ function P(e, t, n = k) {
82
89
  }
83
90
  return h(() => e().join(","), c), l(() => t(r)), u(() => cancelAnimationFrame(a)), { snap: d };
84
91
  }
85
- var F = n(.4, 0, .2, 1), I = "relative inline-flex shrink-0 items-center justify-center overflow-hidden transition-colors duration-150 cursor-pointer disabled:cursor-not-allowed disabled:text-on-surface/38 before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity before:duration-150 enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]", L = /* @__PURE__ */ o({
92
+ var L = n(.4, 0, .2, 1), R = "relative inline-flex shrink-0 items-center justify-center overflow-hidden transition-colors duration-150 cursor-pointer disabled:cursor-not-allowed disabled:text-on-surface/38 before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity before:duration-150 enabled:hover:before:opacity-[0.08] enabled:focus-visible:before:opacity-[0.1] enabled:active:before:opacity-[0.1]", z = /* @__PURE__ */ o({
86
93
  __name: "MIconButton",
87
94
  props: {
88
95
  icon: {},
@@ -139,7 +146,7 @@ var F = n(.4, 0, .2, 1), I = "relative inline-flex shrink-0 items-center justify
139
146
  default: return { color: n };
140
147
  }
141
148
  }
142
- let S = r(() => o.to && !u.value ? "RouterLink" : "button"), C = {
149
+ let x = r(() => o.to && !u.value ? "RouterLink" : "button"), S = {
143
150
  xs: {
144
151
  px: 32,
145
152
  icon: 20,
@@ -187,14 +194,14 @@ var F = n(.4, 0, .2, 1), I = "relative inline-flex shrink-0 items-center justify
187
194
  square: 12,
188
195
  pressed: 8,
189
196
  checkedRound: 12
190
- } : C[o.size] ?? C.sm), T = f(null), E = f(!1);
197
+ } : S[o.size] ?? S.sm), T = f(null), E = f(!1);
191
198
  function D() {
192
199
  let e = w.value, t = e.px / 2;
193
200
  return E.value ? e.pressed : o.checked ? o.shape === "squared" ? t : e.checkedRound : o.shape === "squared" ? e.square : t;
194
201
  }
195
- P(() => u.value ? [D()] : [], (e) => {
202
+ I(() => u.value ? [D()] : [], (e) => {
196
203
  T.value instanceof HTMLElement && (T.value.style.borderRadius = e.length ? `${e[0]}px` : "");
197
- }, j);
204
+ }, N);
198
205
  function O() {
199
206
  u.value && !o.disabled && (E.value = !0);
200
207
  }
@@ -204,14 +211,14 @@ var F = n(.4, 0, .2, 1), I = "relative inline-flex shrink-0 items-center justify
204
211
  function A() {
205
212
  u.value && !o.disabled && l("update:checked", !o.checked);
206
213
  }
207
- let M = r(() => {
214
+ let j = r(() => {
208
215
  if (o.variant === "outlined" && o.checked) return "disabled:bg-on-surface/10";
209
216
  switch (o.variant) {
210
217
  case "filled":
211
218
  case "tonal": return "disabled:bg-on-surface/10";
212
219
  default: return "";
213
220
  }
214
- }), N = r(() => o.shape === "squared" ? w.value.squareRadius : "rounded-full"), F = r(() => {
221
+ }), M = r(() => o.shape === "squared" ? w.value.squareRadius : "rounded-full"), P = r(() => {
215
222
  let e = o.checked;
216
223
  switch (o.variant) {
217
224
  case "filled": return e ? "bg-primary text-on-primary" : "bg-surface-container text-on-surface-variant";
@@ -219,8 +226,8 @@ var F = n(.4, 0, .2, 1), I = "relative inline-flex shrink-0 items-center justify
219
226
  case "outlined": return e ? "bg-inverse-surface text-inverse-on-surface" : "border border-current text-on-surface-variant";
220
227
  default: return e ? "text-primary" : "text-on-surface-variant";
221
228
  }
222
- }), L = r(() => {
223
- if (u.value) return F.value;
229
+ }), F = r(() => {
230
+ if (u.value) return P.value;
224
231
  switch (o.variant) {
225
232
  case "filled": return "bg-primary text-on-primary";
226
233
  case "tonal": return "bg-secondary-container text-on-secondary-container";
@@ -228,19 +235,19 @@ var F = n(.4, 0, .2, 1), I = "relative inline-flex shrink-0 items-center justify
228
235
  default: return "text-on-surface-variant";
229
236
  }
230
237
  });
231
- return (n, r) => _((d(), i(p(S.value), {
238
+ return (n, r) => _((d(), i(p(x.value), {
232
239
  ref_key: "rootEl",
233
240
  ref: T,
234
- to: S.value === "RouterLink" ? t.to : void 0,
235
- type: S.value === "RouterLink" ? void 0 : "button",
241
+ to: x.value === "RouterLink" ? t.to : void 0,
242
+ type: x.value === "RouterLink" ? void 0 : "button",
236
243
  "aria-label": t.label || void 0,
237
244
  "aria-pressed": u.value ? t.checked : void 0,
238
245
  disabled: t.disabled,
239
246
  class: s([
240
- I,
241
- N.value,
242
- L.value,
243
- M.value
247
+ R,
248
+ M.value,
249
+ F.value,
250
+ j.value
244
251
  ]),
245
252
  style: c([{
246
253
  width: `${w.value.px}px`,
@@ -270,12 +277,12 @@ var F = n(.4, 0, .2, 1), I = "relative inline-flex shrink-0 items-center justify
270
277
  "disabled",
271
278
  "class",
272
279
  "style"
273
- ])), [[m(x), {
280
+ ])), [[m(C), {
274
281
  disabled: t.disabled,
275
282
  color: t.rippleColor
276
283
  }]]);
277
284
  }
278
285
  });
279
- export { k as a, S as c, T as d, w as f, A as i, D as l, j as n, F as o, x as p, M as r, P as s, L as t, O as u };
286
+ export { j as a, w as c, D as d, E as f, M as i, k as l, N as n, L as o, C as p, P as r, I as s, z as t, A as u };
280
287
 
281
- //# sourceMappingURL=MIconButton-CNjN0xwW.js.map
288
+ //# sourceMappingURL=MIconButton-CrBPZidd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MIconButton-CrBPZidd.js","names":["SUBSTEP","_withDirectives","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_normalizeStyle","_withCtx","_createVNode","MIcon","_unref","MIcon_default","motionSprings","cubicBezier","normalize","value","spawnRipple","rect","host","d","centered","layer","el","event","color","states","NESTED_CONTROLS","rippleOff","vRipple","state","binding","e","control","position","SAMPLE_MS","SUBSTEP$1","sampleSpring","out","from","pos","vel","velocity","damping","spring","i","left","h","to","epsilon","sampleAt","t","time","samples","samplesDuration","playSamples","anim","keyframe","prefersReducedMotion","FAST_SPATIAL","FAST_EFFECTS","DEFAULT_EFFECTS","DEFAULT_SPATIAL","SUBSTEP","useSpring","current","target","raf","last","frame","dt","now","k","spec","c","settled","v","apply","start","snap","watch","onMounted","onUnmounted","fastOutSlowIn","base","MIconButton_default","defineComponent","__emit","props","__props","emit","isToggle","computed","ROLES","ROLE","colorStyle","paintStyle","cc","role","main","tag","sizeMap","resolved","rootEl","ref","pressed","targetRadius","r","full","onPointerDown","onPointerUp","onClick","disabledContainerClasses","shapeClass","toggleClasses","on","variantClasses","withDirectives","openBlock","createBlock","resolveDynamicComponent","normalizeClass","normalizeStyle","withCtx","createVNode","unref"],"sources":["../src/directives/vRipple.ts","../src/composables/_springAnimation.ts","../src/composables/_useSpring.ts","../src/components/MIconButton.vue"],"sourcesContent":["import type { Directive } from 'vue'\n\n/** Options for `v-ripple`. */\nexport interface RippleOptions {\n /** No ripple while true (e.g. bound to the element's disabled state). */\n disabled?: boolean\n /** Any CSS color for the ripple; defaults to the element's text color (`currentColor`). */\n color?: string\n /** Draw it in this element instead (e.g. the round state layer of a checkbox), clipped to its shape */\n layer?: () => HTMLElement | null | undefined\n /** Grow from the center instead of from the pointer (with `layer`, a selection control's unbounded ripple) */\n centered?: boolean\n}\n\n/** `v-ripple` value: nothing or `true` (on), `false` (off), a CSS color, or an options object. */\nexport type RippleValue = boolean | string | RippleOptions | null | undefined\n\nfunction normalize(value: RippleValue): RippleOptions {\n if (value === false) return { disabled: true }\n if (typeof value === 'string') return { color: value }\n if (value === true || value == null) return {}\n return value\n}\n\n// The ripple sits in its own clipping layer (`border-radius: inherit`), so the host only needs to be\n// positioned, not `overflow: hidden`.\nfunction spawnRipple(host: HTMLElement, event: { clientX: number; clientY: number }, color?: string, centered = false) {\n const rect = host.getBoundingClientRect()\n const d = Math.max(rect.width, rect.height) * 2\n if (centered) event = { clientX: rect.left + rect.width / 2, clientY: rect.top + rect.height / 2 }\n const layer = document.createElement('span')\n layer.className = 'm3-ripple-layer'\n const el = document.createElement('span')\n el.className = 'm3-ripple'\n el.style.cssText = `width:${d}px;height:${d}px;top:${event.clientY - rect.top - d / 2}px;left:${event.clientX - rect.left - d / 2}px`\n if (color) el.style.background = color\n layer.appendChild(el)\n host.appendChild(layer)\n el.addEventListener('animationend', () => layer.remove(), { once: true })\n}\n\ninterface RippleState {\n options: RippleOptions\n onPointerDown: (e: PointerEvent) => void\n}\n\nconst states = new WeakMap<HTMLElement, RippleState>()\n\nconst NESTED_CONTROLS = 'button, a[href], input, select, textarea, [role=\"button\"], [role=\"checkbox\"], [role=\"switch\"], [contenteditable], [data-no-ripple]'\n// App-wide off switch: `createM3UI({ ripple: false })`, or data-m3-ripple=\"off\" on <html>\nconst rippleOff = () => document.documentElement.dataset.m3Ripple === 'off'\n\n/**\n * The M3 press ripple for any element: `<div v-ripple>`, `v-ripple=\"false\"`, `v-ripple=\"'#e91e63'\"`\n * or `v-ripple=\"{ disabled, color }\"`. A statically positioned element is made `position: relative`.\n * Registered globally as `v-ripple` by `createM3UI()`; import `vRipple` to use it without the plugin.\n */\nexport const vRipple: Directive<HTMLElement, RippleValue> = {\n mounted(el, binding) {\n const state: RippleState = {\n options: normalize(binding.value),\n onPointerDown(e) {\n if (state.options.disabled || e.button !== 0 || rippleOff()) return\n // A control inside it (a button in a card, a list row's trailing switch) gets its own press, not this one\n const control = (e.target as Element | null)?.closest?.(NESTED_CONTROLS)\n if (control && control !== el && el.contains(control)) return\n const host = state.options.layer?.() ?? el\n // Checked on press, not on mount: the element may not be in the document yet when mounted.\n const { position } = getComputedStyle(host)\n if (!position || position === 'static') host.style.position = 'relative'\n spawnRipple(host, e, state.options.color, state.options.centered)\n },\n }\n states.set(el, state)\n el.addEventListener('pointerdown', state.onPointerDown)\n },\n updated(el, binding) {\n const state = states.get(el)\n if (state) state.options = normalize(binding.value)\n },\n beforeUnmount(el) {\n const state = states.get(el)\n if (state) el.removeEventListener('pointerdown', state.onPointerDown)\n states.delete(el)\n },\n}\n","import type { SpringSpec } from './motion'\n\n/*\n * Internal (not exported from index.ts): springs played as Web Animations.\n *\n * The library's springs normally step in a rAF loop (see CLAUDE.md). That loop runs on the main thread, and an\n * enter/exit animation starts exactly when the main thread is busiest: mounting the panel's content, re-laying\n * out the page for a scroll lock. On phones that janked visibly (MNavigationDrawer's open, where the old CSS\n * transition hadn't, since the compositor runs those). So enter/exit/settle springs are simulated up front, one\n * sample per 60Hz frame, and played as a linear Web Animation of transform/opacity, which the compositor runs\n * too. Same curve, bounce and release velocity as the loop; only a finger-driven drag writes styles directly.\n *\n * Pattern: write the end state inline, then play the samples over it (an animation beats inline styles), so\n * nothing jumps when it ends; to interrupt, read `sampleAt(samples, anim.currentTime)`, write that inline and\n * cancel.\n */\n\nexport const SAMPLE_MS = 1000 / 60\n// Stiff springs (FastEffects, 3800) diverge at a 16ms Euler step: integrate in 4ms substeps\nconst SUBSTEP = 0.004\n\n/**\n * The spring from `from` to `to`, starting at `velocity` (units/s), one sample per 60Hz frame until it's within\n * `epsilon` of `to` (and slower than `epsilon * 10` per second). The last sample is exactly `to`.\n */\nexport function sampleSpring(from: number, to: number, velocity: number, spring: SpringSpec, epsilon: number): number[] {\n const out = [from]\n let pos = from\n let vel = velocity\n const damping = 2 * spring.dampingRatio * Math.sqrt(spring.stiffness)\n for (let i = 0; i < 600; i++) {\n for (let left = SAMPLE_MS / 1000; left > 1e-9; left -= SUBSTEP) {\n const h = Math.min(SUBSTEP, left)\n vel += (-spring.stiffness * (pos - to) - damping * vel) * h\n pos += vel * h\n }\n out.push(pos)\n if (Math.abs(pos - to) < epsilon && Math.abs(vel) < epsilon * 10) break\n }\n out[out.length - 1] = to\n return out\n}\n\n/** The value `samples` has `time` ms into playback (an Animation's currentTime), linear between frames */\nexport function sampleAt(samples: number[], time: CSSNumberish | null | undefined): number {\n const t = Number(time ?? 0) / SAMPLE_MS\n const i = Math.floor(t)\n if (i >= samples.length - 1) return samples[samples.length - 1]!\n if (i < 0) return samples[0]!\n return samples[i]! + (samples[i + 1]! - samples[i]!) * (t - i)\n}\n\n/** How long `samples` play, in ms */\nexport const samplesDuration = (samples: number[]) => (samples.length - 1) * SAMPLE_MS\n\n/**\n * Plays `samples` on `el` as a linear Web Animation, each mapped to a keyframe. Null when there's nothing to\n * play or no Web Animations API (the inline end state then simply stands).\n */\nexport function playSamples(\n el: Element | null | undefined,\n samples: number[],\n keyframe: (value: number) => Keyframe,\n delay = 0,\n): Animation | null {\n if (!el || typeof (el as HTMLElement).animate !== 'function' || samples.length < 2) return null\n const anim = (el as HTMLElement).animate(samples.map(keyframe), { duration: samplesDuration(samples), delay, easing: 'linear' })\n // cancel() rejects `finished`; nothing has to wait on it\n anim.finished.catch(() => {})\n return anim\n}\n\nexport const prefersReducedMotion = () =>\n typeof window !== 'undefined' && !!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n","// A set of numbers (corner radii, sizes...) that springs toward a target, written to the DOM once per\n// frame through `apply`. Same integration as the rest of the library (semi-implicit Euler), in fixed 4ms\n// substeps so a stiff spring stays stable on a dropped frame. `useSpring` is public (index.ts, with the\n// motion tokens); the constants below are the library's internal shorthands for the Standard scheme.\nimport { onMounted, onUnmounted, watch } from 'vue'\nimport { cubicBezier, motionSprings, type SpringSpec } from './motion'\n\nexport type { SpringSpec }\n\n/** MotionSchemeKeyTokens.FastSpatial in the Standard scheme (StandardMotionTokens.SpringFastSpatial*) */\nexport const FAST_SPATIAL: SpringSpec = motionSprings.standard.fastSpatial\n/** MotionSchemeKeyTokens.FastEffects in the Standard scheme */\nexport const FAST_EFFECTS: SpringSpec = motionSprings.standard.fastEffects\n/** MotionSchemeKeyTokens.DefaultEffects in the Standard scheme */\nexport const DEFAULT_EFFECTS: SpringSpec = motionSprings.standard.defaultEffects\n/** MotionSchemeKeyTokens.DefaultSpatial in the Standard scheme */\nexport const DEFAULT_SPATIAL: SpringSpec = motionSprings.standard.defaultSpatial\n\nconst SUBSTEP = 0.004\n\nexport function useSpring(\n target: () => number[],\n apply: (values: readonly number[]) => void,\n spec: SpringSpec = FAST_SPATIAL,\n) {\n let current = [...target()]\n let velocity = current.map(() => 0)\n let raf = 0\n let last = 0\n\n function frame(now: number) {\n let dt = Math.min((now - last) / 1000, 1 / 30)\n last = now\n const t = target()\n if (t.length !== current.length) {\n current = [...t]\n velocity = t.map(() => 0)\n }\n const k = spec.stiffness\n const c = 2 * spec.dampingRatio * Math.sqrt(k)\n while (dt > 0) {\n const h = Math.min(dt, SUBSTEP)\n dt -= h\n for (let i = 0; i < t.length; i++) {\n velocity[i]! += (-k * (current[i]! - t[i]!) - c * velocity[i]!) * h\n current[i]! += velocity[i]! * h\n }\n }\n const settled = t.every((v, i) => Math.abs(v - current[i]!) < 0.05 && Math.abs(velocity[i]!) < 0.05)\n if (settled) {\n current = [...t]\n velocity = t.map(() => 0)\n }\n apply(current)\n raf = settled ? 0 : requestAnimationFrame(frame)\n }\n\n function start() {\n if (raf) return\n last = performance.now()\n raf = requestAnimationFrame(frame)\n }\n\n /** Jumps to the target without animating (e.g. when the layout context changes). */\n function snap() {\n cancelAnimationFrame(raf)\n raf = 0\n current = [...target()]\n velocity = current.map(() => 0)\n apply(current)\n }\n\n watch(() => target().join(','), start)\n onMounted(() => apply(current))\n onUnmounted(() => cancelAnimationFrame(raf))\n\n return { snap }\n}\n\n/** Compose's FastOutSlowInEasing, cubic-bezier(0.4, 0, 0.2, 1) — the easing of a default tween() */\nexport const fastOutSlowIn = cubicBezier(0.4, 0, 0.2, 1)\n","<script setup lang=\"ts\">\n/**\n * A button that shows only an icon — four visual styles, the same 5-tier expressive sizing as MButton. Give it\n * `checked` (v-model:checked) and it becomes M3's icon toggle button.\n *\n * @event update:checked Emitted on click when `checked` is set — powers v-model:checked\n */\nimport { computed, ref } from 'vue'\nimport MIcon from './MIcon.vue'\nimport { vRipple } from '../directives/vRipple'\nimport { DEFAULT_EFFECTS, useSpring } from '../composables/_useSpring'\n\nconst props = withDefaults(\n defineProps<{\n /** Material Symbol icon name */\n icon: string\n /** Accessible label (its aria-label; no visible tooltip: wrap it in MTooltip for one) */\n label?: string\n /** Visual style */\n variant?: 'standard' | 'filled' | 'tonal' | 'outlined'\n /**\n * An M3 role or any CSS color (`#fff` over a photo, `rgb(0 0 0 / 0.3)` for a scrim-like filled button,\n * `currentColor` to follow the surrounding text). Standard and outlined use it for the icon; filled for the\n * container with white (or the role's on-color) on it; tonal for a 20% container with the color on it.\n * Disabled buttons and toggles keep their own colors\n */\n color?: 'primary' | 'secondary' | 'tertiary' | 'error' | (string & {})\n /**\n * Icon color over what the variant and `color` give: an M3 role (`on-surface`…) or any CSS color (`#000` on a\n * white filled button). Disabled buttons and toggles keep their own\n */\n contentColor?: string\n /**\n * Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md,\n * 28px lg/xl)\n */\n shape?: 'rounded' | 'squared'\n /** M3's 5-tier icon button sizing (xs:32, sm:40, md:56, lg:96, xl:136), or a custom pixel value */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number\n /** Icon size in px. Default the size tier's (or 55% of a custom pixel `size`) */\n iconSize?: number\n /** Disables interaction */\n disabled?: boolean\n /** Vue Router destination — renders as RouterLink instead of button */\n to?: string | Record<string, any>\n /** Any CSS color for the press ripple; defaults to the button's content color */\n rippleColor?: string\n /**\n * Makes it a toggle button (v-model:checked): selected colors, a filled icon, and a shape that morphs when\n * pressed and when checked. Leave it unset for a plain icon button\n */\n checked?: boolean\n /** Icon shown while checked, when it differs from `icon` (e.g. 'pause' for 'play_arrow') */\n checkedIcon?: string\n /** Draw the icon filled (Material Symbols' FILL axis) without making it a toggle, e.g. media controls */\n iconFilled?: boolean\n }>(),\n {\n variant: 'standard',\n shape: 'rounded',\n size: 'sm',\n disabled: false,\n checked: undefined,\n },\n)\n\nconst emit = defineEmits<{ 'update:checked': [boolean] }>()\n\nconst isToggle = computed(() => props.checked !== undefined)\n\nconst ROLES = ['primary', 'secondary', 'tertiary', 'error']\n// Color-role names (`on-surface`…) read the theme's token; anything else is a CSS color\nconst ROLE = /^(on-)?(primary|secondary|tertiary|error|surface|surface-variant|inverse-surface|inverse-primary)(-container|-variant)?$/\nconst colorStyle = computed(() => {\n const base = paintStyle()\n const cc = props.contentColor\n if (!cc || props.disabled || isToggle.value) return base\n return { ...base, color: ROLE.test(cc) ? `var(--color-${cc})` : cc }\n})\n// `color` as inline styles over the variant's classes, so the default look stays class-only\nfunction paintStyle() {\n const c = props.color\n if (!c || props.disabled || isToggle.value) return undefined\n const role = ROLES.includes(c)\n const main = role ? `var(--color-${c})` : c\n switch (props.variant) {\n case 'filled':\n return { backgroundColor: main, color: role ? `var(--color-on-${c})` : '#fff' }\n case 'tonal':\n return role\n ? { backgroundColor: `var(--color-${c}-container)`, color: `var(--color-on-${c}-container)` }\n : { backgroundColor: `color-mix(in srgb, ${c} 20%, transparent)`, color: c }\n default:\n return { color: main }\n }\n}\nconst tag = computed(() => props.to && !isToggle.value ? 'RouterLink' : 'button')\n\n// Container height/width (icon buttons are always square by default — real\n// `IconButtonDefaults.<tier>ContainerSize()` also has Narrow/Wide width options not\n// implemented here, matching the existing scope of MButton's size tiers) and icon size\n// per M3's 5-tier `{XSmall,Small,Medium,Large,XLarge}IconButtonTokens.kt`. `squareRadius`\n// matches each tier's own `ContainerShapeSquare` (12px xs/sm, 16px md, 28px lg/xl) — same\n// pattern as MButton's size tiers.\n// Toggle radii (px) from the same token files: `square` is ContainerShapeSquare, `pressed`\n// PressedContainerShape, `checkedRound` SelectedContainerShapeRound (a round button squares off when\n// checked); SelectedContainerShapeSquare is CornerFull (a square one turns round), i.e. px / 2.\nconst sizeMap = {\n xs: { px: 32, icon: 20, squareRadius: 'rounded-md', square: 12, pressed: 8, checkedRound: 12 },\n sm: { px: 40, icon: 24, squareRadius: 'rounded-md', square: 12, pressed: 8, checkedRound: 12 },\n md: { px: 56, icon: 24, squareRadius: 'rounded-lg', square: 16, pressed: 12, checkedRound: 16 },\n lg: { px: 96, icon: 32, squareRadius: 'rounded-xl', square: 28, pressed: 16, checkedRound: 28 },\n xl: { px: 136, icon: 40, squareRadius: 'rounded-xl', square: 28, pressed: 16, checkedRound: 28 },\n}\n\nconst resolved = computed(() => {\n if (typeof props.size === 'number') {\n return { px: props.size, icon: Math.round(props.size * 0.55), squareRadius: 'rounded-md', square: 12, pressed: 8, checkedRound: 12 }\n }\n return sizeMap[props.size] ?? sizeMap.sm\n})\n\n// Icon toggle shape morph (IconButton.kt's shapeByInteraction: pressed, else checked, else the resting\n// shape), on the DefaultEffects spring the source picks so it doesn't bounce. Plain icon buttons keep\n// a static shape, like Compose's non-`shapes` overloads.\nconst rootEl = ref<unknown>(null)\nconst pressed = ref(false)\n\nfunction targetRadius() {\n const r = resolved.value\n const full = r.px / 2\n if (pressed.value) return r.pressed\n if (props.checked) return props.shape === 'squared' ? full : r.checkedRound\n return props.shape === 'squared' ? r.square : full\n}\n\nuseSpring(\n () => (isToggle.value ? [targetRadius()] : []),\n (v) => {\n // A RouterLink root (plain button with `to`) is a component instance, not an element\n if (rootEl.value instanceof HTMLElement) rootEl.value.style.borderRadius = v.length ? `${v[0]}px` : ''\n },\n DEFAULT_EFFECTS,\n)\n\nfunction onPointerDown() {\n if (isToggle.value && !props.disabled) pressed.value = true\n}\nfunction onPointerUp() {\n pressed.value = false\n}\n\nfunction onClick() {\n if (isToggle.value && !props.disabled) emit('update:checked', !props.checked)\n}\n\n/*\n * State layer via a `before:` overlay (same technique MButton uses) rather than a direct\n * `hover:bg-*`/`active:bg-*` utility: a solid `bg-primary`/`bg-secondary-container`\n * container can't also swap to a translucent hover background without just replacing the\n * color outright, so hover/press need a separate semi-transparent layer painted on top,\n * tinted with the button's own content color (`before:bg-current`) — matches real M3's\n * per-variant Hovered/PressedColor tokens, which are all just the content color at a fixed\n * opacity (8% hover, 10% focus and press), the same universal state-layer pattern across every variant.\n */\nconst base =\n 'relative inline-flex shrink-0 items-center justify-center overflow-hidden transition-colors duration-150 cursor-pointer ' +\n 'disabled:cursor-not-allowed disabled:text-on-surface/38 ' +\n \"before:content-[''] before:pointer-events-none before:absolute before:inset-0 \" +\n 'before:bg-current before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'enabled:hover:before:opacity-[0.08] enabled:focus-visible:before:opacity-[0.1] enabled:active:before:opacity-[0.1]'\n\n// M3 disabled container opacity is 10% on-surface (DisabledContainerOpacity, Filled/Tonal\n// only — Outlined has no container). Outlined's border needs no separate disabled class:\n// it's `border-current` (see `variantClasses`), so it dims automatically along with the\n// `disabled:text-on-surface/38` in `base` above, exactly like the real `outlinedIconButtonBorder`\n// (which literally reuses `LocalContentColor` at the same disabled opacity as the icon).\nconst disabledContainerClasses = computed(() => {\n if (props.variant === 'outlined' && props.checked) return 'disabled:bg-on-surface/10'\n switch (props.variant) {\n case 'filled':\n case 'tonal':\n return 'disabled:bg-on-surface/10'\n default:\n return ''\n }\n})\n\nconst shapeClass = computed(() => props.shape === 'squared' ? resolved.value.squareRadius : 'rounded-full')\n\n\n// Toggle colors: the Selected*/Unselected* tokens of each variant's *IconButtonTokens. Unchecked\n// filled/tonal differ from the plain button's colors, so the checked state stands out.\nconst toggleClasses = computed(() => {\n const on = props.checked\n switch (props.variant) {\n case 'filled':\n return on ? 'bg-primary text-on-primary' : 'bg-surface-container text-on-surface-variant'\n case 'tonal':\n return on ? 'bg-secondary text-on-secondary' : 'bg-secondary-container text-on-secondary-container'\n case 'outlined':\n // outlinedIconToggleButtonBorder: no border once checked\n return on ? 'bg-inverse-surface text-inverse-on-surface' : 'border border-current text-on-surface-variant'\n default:\n return on ? 'text-primary' : 'text-on-surface-variant'\n }\n})\n\nconst variantClasses = computed(() => {\n if (isToggle.value) return toggleClasses.value\n switch (props.variant) {\n case 'filled':\n // Real IconButton.kt has no elevation tokens at all for any variant — flat, unlike Button\n return 'bg-primary text-on-primary'\n case 'tonal':\n return 'bg-secondary-container text-on-secondary-container'\n case 'outlined':\n // OutlinedIconButtonTokens' default (non-\"vibrant\") border tracks LocalContentColor,\n // i.e. the same on-surface-variant used for the icon itself — not a fixed outline token\n return 'border border-current text-on-surface-variant'\n default:\n return 'text-on-surface-variant'\n }\n})\n</script>\n\n<template>\n <component\n :is=\"tag\"\n ref=\"rootEl\"\n :to=\"tag === 'RouterLink' ? to : undefined\"\n :type=\"tag === 'RouterLink' ? undefined : 'button'\"\n :aria-label=\"label || undefined\"\n :aria-pressed=\"isToggle ? checked : undefined\"\n :disabled=\"disabled\"\n :class=\"[base, shapeClass, variantClasses, disabledContainerClasses]\"\n :style=\"[{ width: `${resolved.px}px`, height: `${resolved.px}px` }, colorStyle]\"\n v-ripple=\"{ disabled, color: rippleColor }\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerUp\"\n @pointerleave=\"onPointerUp\"\n @pointercancel=\"onPointerUp\"\n @click=\"onClick\"\n >\n <MIcon :name=\"checked && checkedIcon ? checkedIcon : icon\" :size=\"iconSize ?? resolved.icon\" :filled=\"!!checked || iconFilled\" />\n </component>\n</template>\n"],"mappings":";;;;AAiBA,SAASc,EAAU,GAAmC;CAIpD,OAHIC,MAAU,KAAc,EAAE,UAAU,GAAK,IACzC,OAAOA,KAAU,WAAiB,EAAE,OAAOA,EAAM,IACjDA,MAAU,MAAQA,KAAS,OAAa,CAAC,IACtCA;AACT;AAIA,SAASC,EAAY,GAAmB,GAA6C,GAAgB,IAAW,IAAO;CACrH,IAAMC,IAAOC,EAAK,sBAAsB,GAClCC,IAAI,KAAK,IAAIF,EAAK,OAAOA,EAAK,MAAM,IAAI;CAC9C,AAAIG,MAAU,IAAQ;EAAE,SAASH,EAAK,OAAOA,EAAK,QAAQ;EAAG,SAASA,EAAK,MAAMA,EAAK,SAAS;CAAE;CACjG,IAAMI,IAAQ,SAAS,cAAc,MAAM;CAC3C,EAAM,YAAY;CAClB,IAAMC,IAAK,SAAS,cAAc,MAAM;CAMxC,AALA,EAAG,YAAY,aACf,EAAG,MAAM,UAAU,SAASH,EAAE,YAAYA,EAAE,SAASI,EAAM,UAAUN,EAAK,MAAME,IAAI,EAAE,UAAUI,EAAM,UAAUN,EAAK,OAAOE,IAAI,EAAE,KAC9HK,MAAO,EAAG,MAAM,aAAaA,IACjCH,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