manim-web 0.3.21 → 0.3.22

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 (123) hide show
  1. package/README.md +20 -0
  2. package/dist/{AmsConfiguration-BMyoprhk.js → AmsConfiguration-OUoC_kJ0.js} +5 -5
  3. package/dist/{AmsConfiguration-BdxxYRby.js → AmsConfiguration-tdje_HlF.js} +5 -5
  4. package/dist/{ConfigMacrosConfiguration-B8X_JSVI.js → ConfigMacrosConfiguration-4OaQYvlr.js} +3 -3
  5. package/dist/{ConfigMacrosConfiguration-DUxp6DUV.js → ConfigMacrosConfiguration-DM3-S5M8.js} +3 -3
  6. package/dist/{Entities-B1o7gN0J.js → Entities-Dw6381dl.js} +2 -2
  7. package/dist/{Entities-C82lnCux.js → Entities-bJKKDYjE.js} +2 -2
  8. package/dist/{HtmlNode-BLmQ2r7U.js → HtmlNode-1mFtYQ9G.js} +2 -2
  9. package/dist/{HtmlNode-DXGeKrcW.js → HtmlNode-CQqo5we-.js} +2 -2
  10. package/dist/{InputJax-DL9oUQY4.js → InputJax-D5R2pqUk.js} +2 -2
  11. package/dist/{InputJax-DnDWM3Y0.js → InputJax-jNvwWU5P.js} +2 -2
  12. package/dist/{NewcommandConfiguration-BPjclFig.js → NewcommandConfiguration-BN_OlLcO.js} +2 -2
  13. package/dist/{NewcommandConfiguration-bJ6P1rBY.js → NewcommandConfiguration-DZ3mSCpD.js} +2 -2
  14. package/dist/{NewcommandMethods-C_E3iLoK.js → NewcommandMethods-D5bueYYE.js} +2 -2
  15. package/dist/{NewcommandMethods-Cb7yFm5P.js → NewcommandMethods-DTf_dan5.js} +2 -2
  16. package/dist/{ParseMethods-BMPfzfQC.js → ParseMethods-Deqa7kJ6.js} +7 -7
  17. package/dist/{ParseMethods-D3_HeS1K.js → ParseMethods-Dt5bYDSZ.js} +7 -7
  18. package/dist/{Styles-Dky5jZUe.js → Styles-BILrGVps.js} +1 -1
  19. package/dist/{Styles-J-6R3Vr8.js → Styles-DQSruwWe.js} +1 -1
  20. package/dist/animation/Animation.d.ts.map +1 -1
  21. package/dist/animation/MasterTimeline.d.ts +88 -1
  22. package/dist/animation/MasterTimeline.d.ts.map +1 -1
  23. package/dist/animation/movement/Rotate.d.ts +2 -7
  24. package/dist/animation/movement/Rotate.d.ts.map +1 -1
  25. package/dist/animation/transform/PointMorphStrategy.d.ts.map +1 -1
  26. package/dist/core/AnimateProxy.d.ts +3 -5
  27. package/dist/core/AnimateProxy.d.ts.map +1 -1
  28. package/dist/core/Camera.d.ts +37 -0
  29. package/dist/core/Camera.d.ts.map +1 -1
  30. package/dist/core/CameraExtensions.d.ts +33 -1
  31. package/dist/core/CameraExtensions.d.ts.map +1 -1
  32. package/dist/core/Group.d.ts +3 -11
  33. package/dist/core/Group.d.ts.map +1 -1
  34. package/dist/core/Mobject.d.ts +33 -7
  35. package/dist/core/Mobject.d.ts.map +1 -1
  36. package/dist/core/MobjectPositioning.d.ts +2 -5
  37. package/dist/core/MobjectPositioning.d.ts.map +1 -1
  38. package/dist/core/MobjectTypes.d.ts +21 -4
  39. package/dist/core/MobjectTypes.d.ts.map +1 -1
  40. package/dist/core/Renderer.d.ts +3 -0
  41. package/dist/core/Renderer.d.ts.map +1 -1
  42. package/dist/core/Scene.d.ts +50 -0
  43. package/dist/core/Scene.d.ts.map +1 -1
  44. package/dist/core/ThreeDScene.d.ts +3 -1
  45. package/dist/core/ThreeDScene.d.ts.map +1 -1
  46. package/dist/core/VGroup.d.ts +11 -19
  47. package/dist/core/VGroup.d.ts.map +1 -1
  48. package/dist/core/VMobject.d.ts +14 -1
  49. package/dist/core/VMobject.d.ts.map +1 -1
  50. package/dist/core/VMobjectGeometry.d.ts +20 -10
  51. package/dist/core/VMobjectGeometry.d.ts.map +1 -1
  52. package/dist/core/VMobjectRendering.d.ts +5 -0
  53. package/dist/core/VMobjectRendering.d.ts.map +1 -1
  54. package/dist/core/VMobjectTransformAlignment.d.ts +9 -0
  55. package/dist/core/VMobjectTransformAlignment.d.ts.map +1 -1
  56. package/dist/{html-DU38zqaN.js → html-Bza5WY1y.js} +6 -6
  57. package/dist/{html-DjkQuIHJ.js → html-bhzMuE8p.js} +6 -6
  58. package/dist/index.d.ts +4 -3
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +2 -4
  61. package/dist/integrations/react.js +16 -18
  62. package/dist/integrations/vue.js +15 -17
  63. package/dist/interaction/OrbitControls.d.ts +1 -1
  64. package/dist/interaction/OrbitControls.d.ts.map +1 -1
  65. package/dist/{lengths-CP7zmbxJ.js → lengths-D2zTYMUu.js} +2 -2
  66. package/dist/{liteAdaptor-BLgze3o2.js → liteAdaptor-BkxB5CGC.js} +3 -3
  67. package/dist/{liteAdaptor-zXv-jsO1.js → liteAdaptor-LMKuWwg1.js} +3 -3
  68. package/dist/manim-web.browser.js +8668 -7171
  69. package/dist/{mathjax-7LgaTjtj.js → mathjax-CPQWkQEv.js} +2 -2
  70. package/dist/{mathjax-CoSFlQ0H.js → mathjax-b-GTdZgw.js} +2 -2
  71. package/dist/{mo-CNYDGAsg.js → mo-D4wFHS6V.js} +2 -2
  72. package/dist/{mo-C5uLT3Z9.js → mo-hAX79Dzl.js} +2 -2
  73. package/dist/mobjects/geometry/AngleShapes.d.ts +0 -4
  74. package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
  75. package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -1
  76. package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -1
  77. package/dist/mobjects/graphing/ComplexPlane.d.ts +41 -1
  78. package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
  79. package/dist/mobjects/graphing/Vector.d.ts.map +1 -1
  80. package/dist/mobjects/point/Mobject1D.d.ts.map +1 -1
  81. package/dist/mobjects/point/Mobject2D.d.ts.map +1 -1
  82. package/dist/mobjects/point/PMobject.d.ts +8 -2
  83. package/dist/mobjects/point/PMobject.d.ts.map +1 -1
  84. package/dist/mobjects/point/PointMobject.d.ts.map +1 -1
  85. package/dist/mobjects/text/Code.d.ts.map +1 -1
  86. package/dist/mobjects/text/MathTex.d.ts +9 -0
  87. package/dist/mobjects/text/MathTex.d.ts.map +1 -1
  88. package/dist/mobjects/text/MathTexImage.d.ts.map +1 -1
  89. package/dist/mobjects/text/Text.d.ts.map +1 -1
  90. package/dist/mobjects/text/TextGlyphGroup.d.ts.map +1 -1
  91. package/dist/mobjects/three-d/Line3D.d.ts +10 -56
  92. package/dist/mobjects/three-d/Line3D.d.ts.map +1 -1
  93. package/dist/player/Player.d.ts +36 -29
  94. package/dist/player/Player.d.ts.map +1 -1
  95. package/dist/player/PlayerUI.d.ts.map +1 -1
  96. package/dist/player/RecordingScene.d.ts +37 -0
  97. package/dist/player/RecordingScene.d.ts.map +1 -0
  98. package/dist/{src-CW4pfZdP.js → src-BlTk3Bta.js} +8798 -7302
  99. package/dist/{svg-CYweEoZ1.js → svg-DNS5Hwhk.js} +268 -253
  100. package/dist/{svg-swSF_J59.js → svg-DVUoAdmC.js} +268 -253
  101. package/dist/test-setup/vitest-setup.d.ts +20 -0
  102. package/dist/test-setup/vitest-setup.d.ts.map +1 -0
  103. package/dist/{tex-C4_queV-.js → tex-BQCLd0dF.js} +19 -15
  104. package/dist/{tex-CA5MLeEe.js → tex-Cd_bTYKG.js} +19 -15
  105. package/dist/utils/axis.d.ts +4 -0
  106. package/dist/utils/axis.d.ts.map +1 -0
  107. package/dist/utils/logger.d.ts +37 -0
  108. package/dist/utils/logger.d.ts.map +1 -1
  109. package/dist/utils/math.d.ts +4 -0
  110. package/dist/utils/math.d.ts.map +1 -1
  111. package/dist/utils/vectors.d.ts +54 -1
  112. package/dist/utils/vectors.d.ts.map +1 -1
  113. package/package.json +8 -6
  114. package/dist/Factory-D-whCqrb.js +0 -107
  115. package/dist/GifExporter-BrxY_q7e.js +0 -338
  116. package/dist/GifExporter-S2pbxMc5.js +0 -338
  117. package/dist/Options-XPptO-6X.js +0 -63
  118. package/dist/VideoExporter-6ikT3u9H.js +0 -102
  119. package/dist/VideoExporter-D_RxVahH.js +0 -102
  120. package/dist/lengths-D4tR1gYA.js +0 -54
  121. package/dist/rolldown-runtime-DnwLefa7.js +0 -23
  122. /package/dist/{Factory-BKM7FEO-.js → Factory-Ba6Nqb3M.js} +0 -0
  123. /package/dist/{Options-DRlTi0G8.js → Options-DMK2wYar.js} +0 -0
@@ -1,63 +0,0 @@
1
- //#region node_modules/@mathjax/src/mjs/util/Options.js
2
- var e = {}.constructor;
3
- function t(t) {
4
- return typeof t == "object" && !!t && (t.constructor === e || t.constructor === r);
5
- }
6
- var n = {
7
- invalidOption: "warn",
8
- optionError: (e, t) => {
9
- if (n.invalidOption === "fatal") throw Error(e);
10
- console.warn("MathJax: " + e);
11
- }
12
- }, r = class {};
13
- function i(e) {
14
- return Object.assign(Object.create(r.prototype), e);
15
- }
16
- function a(e) {
17
- return Array.isArray(e) ? e : [e];
18
- }
19
- function o(e) {
20
- return e ? Object.keys(e).concat(Object.getOwnPropertySymbols(e)) : [];
21
- }
22
- function s(e) {
23
- let n = {};
24
- for (let r of o(e)) {
25
- let i = Object.getOwnPropertyDescriptor(e, r), a = i.value;
26
- Array.isArray(a) ? i.value = c([], a, !1) : t(a) && (i.value = s(a)), i.enumerable && (n[r] = i);
27
- }
28
- return Object.defineProperties(e.constructor === r ? i({}) : {}, n);
29
- }
30
- function c(e, i, a = !0) {
31
- for (let l of o(i)) {
32
- if (a && e[l] === void 0 && e.constructor !== r) {
33
- typeof l == "symbol" && (l = l.toString()), n.optionError(`Invalid option "${l}" (no default value).`, l);
34
- continue;
35
- }
36
- let u = i[l], d = e[l];
37
- if (t(u) && d !== null && (typeof d == "object" || typeof d == "function")) {
38
- let t = o(u);
39
- Array.isArray(d) && (t.length === 1 && (t[0] === "[+]" || t[0] === "[-]") && Array.isArray(u[t[0]]) || t.length === 2 && t.sort().join(",") === "[+],[-]" && Array.isArray(u["[+]"]) && Array.isArray(u["[-]"])) ? (u["[-]"] && (d = e[l] = d.filter((e) => u["[-]"].indexOf(e) < 0)), u["[+]"] && (e[l] = [...d, ...u["[+]"]])) : c(d, u, a);
40
- } else Array.isArray(u) ? (e[l] = [], c(e[l], u, !1)) : t(u) ? e[l] = s(u) : e[l] = u;
41
- }
42
- return e;
43
- }
44
- function l(e, ...t) {
45
- return t.forEach((t) => c(e, t, !1)), e;
46
- }
47
- function u(e, ...t) {
48
- return t.forEach((t) => c(e, t, !0)), e;
49
- }
50
- function d(e, ...t) {
51
- let n = [];
52
- for (let r of t) {
53
- let t = {}, i = {};
54
- for (let n of Object.keys(e || {})) (r[n] === void 0 ? i : t)[n] = e[n];
55
- n.push(t), e = i;
56
- }
57
- return n.unshift(e), n;
58
- }
59
- function f(e, t, n = null) {
60
- return Object.hasOwn(t, e) ? t[e] : n;
61
- }
62
- //#endregion
63
- export { d as a, a as i, i as n, u as o, f as r, l as t };
@@ -1,102 +0,0 @@
1
- import { n as e } from "./rolldown-runtime-DnwLefa7.js";
2
- //#region src/export/VideoExporter.ts
3
- var t = /* @__PURE__ */ e({
4
- VideoExporter: () => n,
5
- createVideoExporter: () => r
6
- }), n = class e {
7
- _scene;
8
- _options;
9
- _mediaRecorder = null;
10
- _recordedChunks = [];
11
- _isRecording = !1;
12
- constructor(e, t) {
13
- this._scene = e, this._options = {
14
- fps: t?.fps ?? 60,
15
- quality: t?.quality ?? .9,
16
- format: t?.format ?? "webm",
17
- width: t?.width ?? e.getWidth(),
18
- height: t?.height ?? e.getHeight(),
19
- duration: t?.duration ?? 0,
20
- onProgress: t?.onProgress ?? (() => {}),
21
- includeAudio: t?.includeAudio ?? !0,
22
- audioManager: t?.audioManager ?? null
23
- };
24
- }
25
- _getAudioManager() {
26
- if (this._options.audioManager) return this._options.audioManager;
27
- try {
28
- let e = this._scene.audioManager;
29
- return e.tracks.length > 0 ? e : null;
30
- } catch (e) {
31
- return console.warn("AudioManager unavailable; exporting without audio:", e), null;
32
- }
33
- }
34
- async startRecording() {
35
- if (this._isRecording) throw Error("Already recording");
36
- let e = this._scene.getCanvas().captureStream(this._options.fps), t = this._options.includeAudio ? this._getAudioManager() : null, n;
37
- if (t && t.tracks.length > 0) {
38
- let r = t.createStreamDestination().stream.getAudioTracks();
39
- n = new MediaStream([...e.getVideoTracks(), ...r]);
40
- } else n = e;
41
- let r;
42
- if (this._options.format === "webm" ? r = "video/webm;codecs=vp9" : this._options.format === "mov" ? MediaRecorder.isTypeSupported("video/quicktime") ? r = "video/quicktime" : (console.warn("MOV format not supported by this browser, falling back to WebM"), r = "video/webm;codecs=vp9") : r = "video/mp4", !MediaRecorder.isTypeSupported(r)) throw Error(`Format ${r} is not supported by this browser`);
43
- this._recordedChunks = [], this._mediaRecorder = new MediaRecorder(n, {
44
- mimeType: r,
45
- videoBitsPerSecond: Math.floor(this._options.quality * 1e7)
46
- }), this._mediaRecorder.ondataavailable = (e) => {
47
- e.data.size > 0 && this._recordedChunks.push(e.data);
48
- }, this._mediaRecorder.start(), this._isRecording = !0;
49
- }
50
- async stopRecording() {
51
- return new Promise((e, t) => {
52
- if (!this._mediaRecorder || !this._isRecording) {
53
- t(/* @__PURE__ */ Error("Not recording"));
54
- return;
55
- }
56
- this._mediaRecorder.onstop = () => {
57
- let t;
58
- t = this._options.format === "webm" ? "video/webm" : this._options.format === "mov" ? "video/quicktime" : "video/mp4";
59
- let n = new Blob(this._recordedChunks, { type: t });
60
- this._isRecording = !1, e(n);
61
- }, this._mediaRecorder.stop();
62
- });
63
- }
64
- async exportTimeline(e) {
65
- let t = e ?? this._options.duration ?? this._scene.getTimelineDuration() ?? 5, n = Math.ceil(t * this._options.fps), r = 1 / this._options.fps, i = this._options.includeAudio ? this._getAudioManager() : null;
66
- i && i.tracks.length > 0 && i.seek(0), await this.startRecording(), i && i.tracks.length > 0 && i.play();
67
- for (let e = 0; e < n; e++) {
68
- let t = e * r;
69
- this._scene.seek(t), await new Promise((e) => requestAnimationFrame(e)), this._options.onProgress(e / n);
70
- }
71
- return i && i.isPlaying && i.stop(), this.stopRecording();
72
- }
73
- async exportAudio(e) {
74
- let t = this._getAudioManager();
75
- if (!t || t.tracks.length === 0) return null;
76
- let n = e ?? this._options.duration ?? this._scene.getTimelineDuration() ?? 5;
77
- return t.exportWAV(n);
78
- }
79
- static download(e, t = "animation.webm") {
80
- let n = URL.createObjectURL(e), r = document.createElement("a");
81
- r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
82
- }
83
- async exportAndDownload(t, n) {
84
- let r = await this.exportTimeline(n), i = {
85
- webm: ".webm",
86
- mp4: ".mp4",
87
- mov: ".mov"
88
- }[this._options.format] ?? ".webm";
89
- e.download(r, t ?? `animation${i}`);
90
- }
91
- isRecording() {
92
- return this._isRecording;
93
- }
94
- getOptions() {
95
- return { ...this._options };
96
- }
97
- };
98
- function r(e, t) {
99
- return new n(e, t);
100
- }
101
- //#endregion
102
- export { t as n, r, n as t };
@@ -1,102 +0,0 @@
1
- import { n as e } from "./rolldown-runtime-DnwLefa7.js";
2
- //#region src/export/VideoExporter.ts
3
- var t = /* @__PURE__ */ e({
4
- VideoExporter: () => n,
5
- createVideoExporter: () => r
6
- }), n = class e {
7
- _scene;
8
- _options;
9
- _mediaRecorder = null;
10
- _recordedChunks = [];
11
- _isRecording = !1;
12
- constructor(e, t) {
13
- this._scene = e, this._options = {
14
- fps: t?.fps ?? 60,
15
- quality: t?.quality ?? .9,
16
- format: t?.format ?? "webm",
17
- width: t?.width ?? e.getWidth(),
18
- height: t?.height ?? e.getHeight(),
19
- duration: t?.duration ?? 0,
20
- onProgress: t?.onProgress ?? (() => {}),
21
- includeAudio: t?.includeAudio ?? !0,
22
- audioManager: t?.audioManager ?? null
23
- };
24
- }
25
- _getAudioManager() {
26
- if (this._options.audioManager) return this._options.audioManager;
27
- try {
28
- let e = this._scene.audioManager;
29
- return e.tracks.length > 0 ? e : null;
30
- } catch (e) {
31
- return console.warn("AudioManager unavailable; exporting without audio:", e), null;
32
- }
33
- }
34
- async startRecording() {
35
- if (this._isRecording) throw Error("Already recording");
36
- let e = this._scene.getCanvas().captureStream(this._options.fps), t = this._options.includeAudio ? this._getAudioManager() : null, n;
37
- if (t && t.tracks.length > 0) {
38
- let r = t.createStreamDestination().stream.getAudioTracks();
39
- n = new MediaStream([...e.getVideoTracks(), ...r]);
40
- } else n = e;
41
- let r;
42
- if (this._options.format === "webm" ? r = "video/webm;codecs=vp9" : this._options.format === "mov" ? MediaRecorder.isTypeSupported("video/quicktime") ? r = "video/quicktime" : (console.warn("MOV format not supported by this browser, falling back to WebM"), r = "video/webm;codecs=vp9") : r = "video/mp4", !MediaRecorder.isTypeSupported(r)) throw Error(`Format ${r} is not supported by this browser`);
43
- this._recordedChunks = [], this._mediaRecorder = new MediaRecorder(n, {
44
- mimeType: r,
45
- videoBitsPerSecond: Math.floor(this._options.quality * 1e7)
46
- }), this._mediaRecorder.ondataavailable = (e) => {
47
- e.data.size > 0 && this._recordedChunks.push(e.data);
48
- }, this._mediaRecorder.start(), this._isRecording = !0;
49
- }
50
- async stopRecording() {
51
- return new Promise((e, t) => {
52
- if (!this._mediaRecorder || !this._isRecording) {
53
- t(/* @__PURE__ */ Error("Not recording"));
54
- return;
55
- }
56
- this._mediaRecorder.onstop = () => {
57
- let t;
58
- t = this._options.format === "webm" ? "video/webm" : this._options.format === "mov" ? "video/quicktime" : "video/mp4";
59
- let n = new Blob(this._recordedChunks, { type: t });
60
- this._isRecording = !1, e(n);
61
- }, this._mediaRecorder.stop();
62
- });
63
- }
64
- async exportTimeline(e) {
65
- let t = e ?? this._options.duration ?? this._scene.getTimelineDuration() ?? 5, n = Math.ceil(t * this._options.fps), r = 1 / this._options.fps, i = this._options.includeAudio ? this._getAudioManager() : null;
66
- i && i.tracks.length > 0 && i.seek(0), await this.startRecording(), i && i.tracks.length > 0 && i.play();
67
- for (let e = 0; e < n; e++) {
68
- let t = e * r;
69
- this._scene.seek(t), await new Promise((e) => requestAnimationFrame(e)), this._options.onProgress(e / n);
70
- }
71
- return i && i.isPlaying && i.stop(), this.stopRecording();
72
- }
73
- async exportAudio(e) {
74
- let t = this._getAudioManager();
75
- if (!t || t.tracks.length === 0) return null;
76
- let n = e ?? this._options.duration ?? this._scene.getTimelineDuration() ?? 5;
77
- return t.exportWAV(n);
78
- }
79
- static download(e, t = "animation.webm") {
80
- let n = URL.createObjectURL(e), r = document.createElement("a");
81
- r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
82
- }
83
- async exportAndDownload(t, n) {
84
- let r = await this.exportTimeline(n), i = {
85
- webm: ".webm",
86
- mp4: ".mp4",
87
- mov: ".mov"
88
- }[this._options.format] ?? ".webm";
89
- e.download(r, t ?? `animation${i}`);
90
- }
91
- isRecording() {
92
- return this._isRecording;
93
- }
94
- getOptions() {
95
- return { ...this._options };
96
- }
97
- };
98
- function r(e, t) {
99
- return new n(e, t);
100
- }
101
- //#endregion
102
- export { t as n, r, n as t };
@@ -1,54 +0,0 @@
1
- //#region node_modules/@mathjax/src/mjs/util/lengths.js
2
- var e = 1e6, t = {
3
- px: 1,
4
- in: 96,
5
- cm: 96 / 2.54,
6
- mm: 96 / 25.4
7
- }, n = {
8
- em: 1,
9
- ex: .431,
10
- pt: 1 / 10,
11
- pc: 12 / 10,
12
- mu: 1 / 18
13
- }, r = {
14
- veryverythinmathspace: 1 / 18,
15
- verythinmathspace: 2 / 18,
16
- thinmathspace: 3 / 18,
17
- mediummathspace: 4 / 18,
18
- thickmathspace: 5 / 18,
19
- verythickmathspace: 6 / 18,
20
- veryverythickmathspace: 7 / 18,
21
- negativeveryverythinmathspace: -1 / 18,
22
- negativeverythinmathspace: -2 / 18,
23
- negativethinmathspace: -3 / 18,
24
- negativemediummathspace: -4 / 18,
25
- negativethickmathspace: -5 / 18,
26
- negativeverythickmathspace: -6 / 18,
27
- negativeveryverythickmathspace: -7 / 18,
28
- thin: .04,
29
- medium: .06,
30
- thick: .1,
31
- normal: 1,
32
- big: 2,
33
- small: 1 / Math.sqrt(2),
34
- infinity: e
35
- };
36
- function i(e, i = 0, a = 1, o = 16) {
37
- if (typeof e != "string" && (e = String(e)), e === "" || e == null) return i;
38
- if (r[e]) return r[e];
39
- let s = e.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);
40
- if (!s || s[0] === "") return i;
41
- let c = parseFloat(s[1] || "1"), l = s[2];
42
- return Object.hasOwn(t, l) ? c * t[l] / o / a : Object.hasOwn(n, l) ? c * n[l] : l === "%" ? c / 100 * i : c * i;
43
- }
44
- function a(e) {
45
- return (100 * e).toFixed(1).replace(/\.?0+$/, "") + "%";
46
- }
47
- function o(e) {
48
- return Math.abs(e) < .001 ? "0" : e.toFixed(3).replace(/\.?0+$/, "") + "em";
49
- }
50
- function s(t, n = -e, r = 16) {
51
- return t *= r, n && t < n && (t = n), Math.abs(t) < .1 ? "0" : t.toFixed(1).replace(/\.0$/, "") + "px";
52
- }
53
- //#endregion
54
- export { a, i, r as n, s as o, o as r, e as t };
@@ -1,23 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
3
- let r = {};
4
- for (var i in e) t(r, i, {
5
- get: e[i],
6
- enumerable: !0
7
- });
8
- return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
- }, c = (e, i, o, s) => {
10
- if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
- get: ((e) => i[e]).bind(null, d),
12
- enumerable: !(s = n(i, d)) || s.enumerable
13
- });
14
- return e;
15
- }, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
16
- value: n,
17
- enumerable: !0
18
- }) : a, n)), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
19
- if (typeof require < "u") return require.apply(this, arguments);
20
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
21
- });
22
- //#endregion
23
- export { l as i, s as n, u as r, o as t };