zudoku 0.3.0-dev.54 → 0.3.0-dev.55

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 (121) hide show
  1. package/lib/AnchorLink-BaXHjhF-.js +989 -0
  2. package/lib/{AnchorLink-BCN_a_Uz.js.map → AnchorLink-BaXHjhF-.js.map} +1 -1
  3. package/lib/Combination-BfufJFkX.js +1365 -0
  4. package/lib/{Combination-B0Iu6mhJ.js.map → Combination-BfufJFkX.js.map} +1 -1
  5. package/lib/DevPortalProvider-GjdO0Xr-.js +1610 -0
  6. package/lib/{DevPortalProvider-Do9oJqme.js.map → DevPortalProvider-GjdO0Xr-.js.map} +1 -1
  7. package/lib/Markdown-B8nPVql1.js +19708 -0
  8. package/lib/Markdown-B8nPVql1.js.map +1 -0
  9. package/lib/MdxPage-Dlujuj-J.js +223 -0
  10. package/lib/{MdxPage-Bsc79cD-.js.map → MdxPage-Dlujuj-J.js.map} +1 -1
  11. package/lib/OperationList-krPgt6sE.js +8041 -0
  12. package/lib/{OperationList-K-JWBxau.js.map → OperationList-krPgt6sE.js.map} +1 -1
  13. package/lib/Playground-DOHxca0P.js +539 -0
  14. package/lib/{Playground-Czy7ha9z.js.map → Playground-DOHxca0P.js.map} +1 -1
  15. package/lib/Route-CR6TEwVC.js +13 -0
  16. package/lib/{Route-D-egsGHx.js.map → Route-CR6TEwVC.js.map} +1 -1
  17. package/lib/Select-Boi_pe3L.js +5298 -0
  18. package/lib/{Select-CcBbwJ2R.js.map → Select-Boi_pe3L.js.map} +1 -1
  19. package/lib/Spinner-oU0QJmi_.js +16 -0
  20. package/lib/{Spinner-C9_Opdev.js.map → Spinner-oU0QJmi_.js.map} +1 -1
  21. package/lib/_commonjsHelpers-BxmBWJD2.js +34 -0
  22. package/lib/_commonjsHelpers-BxmBWJD2.js.map +1 -0
  23. package/lib/assets/index-CpIig0AX.js +6341 -0
  24. package/lib/{index-pI9JkN46.js.map → assets/index-CpIig0AX.js.map} +1 -1
  25. package/lib/assets/worker-B5k2aBV9.js +18921 -0
  26. package/lib/assets/{worker-BjPv-hjP.js.map → worker-B5k2aBV9.js.map} +1 -1
  27. package/lib/context-BoN_3uxi.js +17 -0
  28. package/lib/{context-_fYfJFgk.js.map → context-BoN_3uxi.js.map} +1 -1
  29. package/lib/hook-CIuFuyBT.js +90 -0
  30. package/lib/{hook-CKqQERWo.js.map → hook-CIuFuyBT.js.map} +1 -1
  31. package/lib/index-BL1P4Gqq.js +280 -0
  32. package/lib/{index-ByHya67R.js.map → index-BL1P4Gqq.js.map} +1 -1
  33. package/lib/index-Bn03IPZt.js +6341 -0
  34. package/lib/{assets/index-BPdJm2ty.js.map → index-Bn03IPZt.js.map} +1 -1
  35. package/lib/{index-jsFBaizC.js → index-Dih8IAqw.js} +103 -83
  36. package/lib/{index-jsFBaizC.js.map → index-Dih8IAqw.js.map} +1 -1
  37. package/lib/index-FprhHF51.js +253 -0
  38. package/lib/{index-DseBZFJ-.js.map → index-FprhHF51.js.map} +1 -1
  39. package/lib/jsx-runtime-DvZ6OKMM.js +2110 -0
  40. package/lib/{jsx-runtime-CJZJivg2.js.map → jsx-runtime-DvZ6OKMM.js.map} +1 -1
  41. package/lib/mutation-DWY9x2Uc.js +250 -0
  42. package/lib/{mutation-DjbQSHzT.js.map → mutation-DWY9x2Uc.js.map} +1 -1
  43. package/lib/prism-bash.min-BtBk0onv.js +7 -0
  44. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-BtBk0onv.js.map} +1 -1
  45. package/lib/prism-csharp.min-Cv7D49bv.js +30 -0
  46. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-Cv7D49bv.js.map} +1 -1
  47. package/lib/prism-java.min-tNK-JX6x.js +7 -0
  48. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-tNK-JX6x.js.map} +1 -1
  49. package/lib/prism-json.min-Cdtv-CME.js +2 -0
  50. package/lib/{prism-json.min-B1GJqK1k.js.map → prism-json.min-Cdtv-CME.js.map} +1 -1
  51. package/lib/prism-markup-templating-iotg2sCU.js +94 -0
  52. package/lib/{prism-markup-templating-DZrrEs0A.js.map → prism-markup-templating-iotg2sCU.js.map} +1 -1
  53. package/lib/prism-objectivec.min-CY4WGixz.js +2 -0
  54. package/lib/{prism-objectivec.min-BXSWqpJJ.js.map → prism-objectivec.min-CY4WGixz.js.map} +1 -1
  55. package/lib/prism-php.min-T6sIVgED.js +11 -0
  56. package/lib/{prism-php.min-o7FpoMP_.js.map → prism-php.min-T6sIVgED.js.map} +1 -1
  57. package/lib/prism-ruby.min-B-2KAa4y.js +8 -0
  58. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-B-2KAa4y.js.map} +1 -1
  59. package/lib/router-ButO1QyY.js +4062 -0
  60. package/lib/{router-CBw2vqJE.js.map → router-ButO1QyY.js.map} +1 -1
  61. package/lib/slugify-CmS97Vy8.js +50 -0
  62. package/lib/{slugify-CiPVjteN.js.map → slugify-CmS97Vy8.js.map} +1 -1
  63. package/lib/state-CmGfNKhR.js +436 -0
  64. package/lib/{state-DKdaQzvh.js.map → state-CmGfNKhR.js.map} +1 -1
  65. package/lib/urql-DtVKPBx_.js +2567 -0
  66. package/lib/{urql-DEKdguFl.js.map → urql-DtVKPBx_.js.map} +1 -1
  67. package/lib/util-B5KX4h4M.js +55 -0
  68. package/lib/{util-_jwUlTBU.js.map → util-B5KX4h4M.js.map} +1 -1
  69. package/lib/zudoku.auth-auth0.js +24 -18
  70. package/lib/zudoku.auth-auth0.js.map +1 -1
  71. package/lib/zudoku.auth-clerk.js +43 -34
  72. package/lib/zudoku.auth-clerk.js.map +1 -1
  73. package/lib/zudoku.auth-openid.js +1121 -734
  74. package/lib/zudoku.auth-openid.js.map +1 -1
  75. package/lib/zudoku.components.js +1076 -823
  76. package/lib/zudoku.components.js.map +1 -1
  77. package/lib/zudoku.openapi-worker.js +13776 -9681
  78. package/lib/zudoku.openapi-worker.js.map +1 -1
  79. package/lib/zudoku.plugin-api-keys.js +206 -165
  80. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  81. package/lib/zudoku.plugin-markdown.js +41 -33
  82. package/lib/zudoku.plugin-markdown.js.map +1 -1
  83. package/lib/zudoku.plugin-openapi.js +6 -6
  84. package/lib/zudoku.plugin-redirect.js +10 -8
  85. package/lib/zudoku.plugin-redirect.js.map +1 -1
  86. package/package.json +1 -1
  87. package/lib/AnchorLink-BCN_a_Uz.js +0 -705
  88. package/lib/Combination-B0Iu6mhJ.js +0 -915
  89. package/lib/DevPortalProvider-Do9oJqme.js +0 -1081
  90. package/lib/Markdown-aE_XoLNs.js +0 -15030
  91. package/lib/Markdown-aE_XoLNs.js.map +0 -1
  92. package/lib/MdxPage-Bsc79cD-.js +0 -190
  93. package/lib/OperationList-K-JWBxau.js +0 -5091
  94. package/lib/Playground-Czy7ha9z.js +0 -502
  95. package/lib/Route-D-egsGHx.js +0 -13
  96. package/lib/Select-CcBbwJ2R.js +0 -3667
  97. package/lib/Spinner-C9_Opdev.js +0 -15
  98. package/lib/_commonjsHelpers-BVfed4GL.js +0 -29
  99. package/lib/_commonjsHelpers-BVfed4GL.js.map +0 -1
  100. package/lib/assets/index-BPdJm2ty.js +0 -4765
  101. package/lib/assets/worker-BjPv-hjP.js +0 -14897
  102. package/lib/context-_fYfJFgk.js +0 -14
  103. package/lib/hook-CKqQERWo.js +0 -77
  104. package/lib/index-ByHya67R.js +0 -207
  105. package/lib/index-DseBZFJ-.js +0 -170
  106. package/lib/index-pI9JkN46.js +0 -4765
  107. package/lib/jsx-runtime-CJZJivg2.js +0 -1526
  108. package/lib/mutation-DjbQSHzT.js +0 -208
  109. package/lib/prism-bash.min-DadFsM4Z.js +0 -7
  110. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  111. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  112. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  113. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  114. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  115. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  116. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  117. package/lib/router-CBw2vqJE.js +0 -2973
  118. package/lib/slugify-CiPVjteN.js +0 -28
  119. package/lib/state-DKdaQzvh.js +0 -288
  120. package/lib/urql-DEKdguFl.js +0 -1592
  121. package/lib/util-_jwUlTBU.js +0 -41
@@ -1,14 +0,0 @@
1
- import { createContext as e, useContext as r } from "react";
2
- const t = e(
3
- void 0
4
- ), n = t.Provider, i = () => {
5
- const o = r(t);
6
- if (!o)
7
- throw new Error("useOasConfig must be used within a OasConfigProvider");
8
- return o.config;
9
- };
10
- export {
11
- n as O,
12
- i as u
13
- };
14
- //# sourceMappingURL=context-_fYfJFgk.js.map
@@ -1,77 +0,0 @@
1
- import { b as o, j as t, c as a } from "./jsx-runtime-CJZJivg2.js";
2
- import { c as i, P as r, g as l, H as c, L as u } from "./Markdown-aE_XoLNs.js";
3
- import { i as x } from "./router-CBw2vqJE.js";
4
- import { u as m } from "./DevPortalProvider-Do9oJqme.js";
5
- import { u as d } from "./state-DKdaQzvh.js";
6
- /**
7
- * @license lucide-react v0.378.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */
12
- const h = i("Unlink", [
13
- [
14
- "path",
15
- {
16
- d: "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",
17
- key: "yqzxt4"
18
- }
19
- ],
20
- [
21
- "path",
22
- {
23
- d: "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",
24
- key: "4qinb0"
25
- }
26
- ],
27
- ["line", { x1: "8", x2: "8", y1: "2", y2: "5", key: "1041cp" }],
28
- ["line", { x1: "2", x2: "5", y1: "8", y2: "8", key: "14m1p5" }],
29
- ["line", { x1: "16", x2: "16", y1: "19", y2: "22", key: "rzdirn" }],
30
- ["line", { x1: "19", x2: "22", y1: "16", y2: "16", key: "ox905f" }]
31
- ]), p = () => (o(), /* @__PURE__ */ t.jsxs("div", { className: r + " h-full pt-[--padding-content-top]", children: [
32
- /* @__PURE__ */ t.jsx(l, { children: "404" }),
33
- /* @__PURE__ */ t.jsxs(c, { level: 1, className: "flex gap-3.5 items-center", children: [
34
- "Page not found",
35
- /* @__PURE__ */ t.jsx(h, { size: 24 })
36
- ] }),
37
- !1,
38
- /* @__PURE__ */ t.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
39
- /* @__PURE__ */ t.jsx(u, { to: "/", children: "Go back home" })
40
- ] }));
41
- function g({ error: e }) {
42
- const s = (e == null ? void 0 : e.message) ?? "Something went wrong", n = e == null ? void 0 : e.stack;
43
- return /* @__PURE__ */ t.jsx("div", { className: "flex h-screen max-h-screen min-h-full items-center justify-center bg-primary-background px-4 py-16 lg:px-8", children: /* @__PURE__ */ t.jsxs("div", { className: "mx-auto max-w-[85%] sm:max-w-[50%]", children: [
44
- /* @__PURE__ */ t.jsx("h1", { className: "text-4xl font-bold tracking-tight text-h1-text sm:text-5xl", children: "Something went wrong" }),
45
- /* @__PURE__ */ t.jsx("p", { className: "mt-5 text-h1-text", children: s }),
46
- n ? /* @__PURE__ */ t.jsx("pre", { className: "mt-5 max-h-[400px] w-full overflow-scroll rounded-md border border-input-border bg-input-background p-3 text-property-name-text text-red-700", children: n }) : null
47
- ] }) });
48
- }
49
- function b() {
50
- const e = a();
51
- return x(e) && e.status === 404 ? /* @__PURE__ */ t.jsx(p, {}) : /* @__PURE__ */ t.jsx(g, { error: e });
52
- }
53
- const v = () => {
54
- const { authentication: e } = m(), s = d(), n = typeof e < "u";
55
- return {
56
- isAuthEnabled: n,
57
- isPending: s.isPending,
58
- profile: s.profile,
59
- isAuthenticated: s.profile,
60
- login: async () => {
61
- if (!n)
62
- throw new Error("Authentication is not enabled.");
63
- await e.login();
64
- },
65
- logout: async () => {
66
- if (!n)
67
- throw new Error("Authentication is not enabled.");
68
- await e.logout(), window.location.href = "/";
69
- }
70
- };
71
- };
72
- export {
73
- g as E,
74
- b as R,
75
- v as u
76
- };
77
- //# sourceMappingURL=hook-CKqQERWo.js.map
@@ -1,207 +0,0 @@
1
- import * as s from "react";
2
- import { j as p } from "./jsx-runtime-CJZJivg2.js";
3
- import * as R from "react-dom";
4
- function I(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
5
- return function(o) {
6
- if (e == null || e(o), n === !1 || !o.defaultPrevented)
7
- return t == null ? void 0 : t(o);
8
- };
9
- }
10
- function A(e, t) {
11
- const n = s.createContext(t);
12
- function r(c) {
13
- const { children: i, ...u } = c, l = s.useMemo(() => u, Object.values(u));
14
- return /* @__PURE__ */ p.jsx(n.Provider, { value: l, children: i });
15
- }
16
- function o(c) {
17
- const i = s.useContext(n);
18
- if (i) return i;
19
- if (t !== void 0) return t;
20
- throw new Error(`\`${c}\` must be used within \`${e}\``);
21
- }
22
- return r.displayName = e + "Provider", [r, o];
23
- }
24
- function B(e, t = []) {
25
- let n = [];
26
- function r(c, i) {
27
- const u = s.createContext(i), l = n.length;
28
- n = [...n, i];
29
- function a(f) {
30
- const { scope: d, children: v, ...m } = f, P = (d == null ? void 0 : d[e][l]) || u, b = s.useMemo(() => m, Object.values(m));
31
- return /* @__PURE__ */ p.jsx(P.Provider, { value: b, children: v });
32
- }
33
- function h(f, d) {
34
- const v = (d == null ? void 0 : d[e][l]) || u, m = s.useContext(v);
35
- if (m) return m;
36
- if (i !== void 0) return i;
37
- throw new Error(`\`${f}\` must be used within \`${c}\``);
38
- }
39
- return a.displayName = c + "Provider", [a, h];
40
- }
41
- const o = () => {
42
- const c = n.map((i) => s.createContext(i));
43
- return function(u) {
44
- const l = (u == null ? void 0 : u[e]) || c;
45
- return s.useMemo(
46
- () => ({ [`__scope${e}`]: { ...u, [e]: l } }),
47
- [u, l]
48
- );
49
- };
50
- };
51
- return o.scopeName = e, [r, g(o, ...t)];
52
- }
53
- function g(...e) {
54
- const t = e[0];
55
- if (e.length === 1) return t;
56
- const n = () => {
57
- const r = e.map((o) => ({
58
- useScope: o(),
59
- scopeName: o.scopeName
60
- }));
61
- return function(c) {
62
- const i = r.reduce((u, { useScope: l, scopeName: a }) => {
63
- const f = l(c)[`__scope${a}`];
64
- return { ...u, ...f };
65
- }, {});
66
- return s.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
67
- };
68
- };
69
- return n.scopeName = t.scopeName, n;
70
- }
71
- function x(e) {
72
- const t = s.useRef(e);
73
- return s.useEffect(() => {
74
- t.current = e;
75
- }), s.useMemo(() => (...n) => {
76
- var r;
77
- return (r = t.current) == null ? void 0 : r.call(t, ...n);
78
- }, []);
79
- }
80
- function k({
81
- prop: e,
82
- defaultProp: t,
83
- onChange: n = () => {
84
- }
85
- }) {
86
- const [r, o] = w({ defaultProp: t, onChange: n }), c = e !== void 0, i = c ? e : r, u = x(n), l = s.useCallback(
87
- (a) => {
88
- if (c) {
89
- const f = typeof a == "function" ? a(e) : a;
90
- f !== e && u(f);
91
- } else
92
- o(a);
93
- },
94
- [c, e, o, u]
95
- );
96
- return [i, l];
97
- }
98
- function w({
99
- defaultProp: e,
100
- onChange: t
101
- }) {
102
- const n = s.useState(e), [r] = n, o = s.useRef(r), c = x(t);
103
- return s.useEffect(() => {
104
- o.current !== r && (c(r), o.current = r);
105
- }, [r, o, c]), n;
106
- }
107
- var j = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
108
- };
109
- function E(e, t) {
110
- typeof e == "function" ? e(t) : e != null && (e.current = t);
111
- }
112
- function S(...e) {
113
- return (t) => e.forEach((n) => E(n, t));
114
- }
115
- function L(...e) {
116
- return s.useCallback(S(...e), e);
117
- }
118
- var y = s.forwardRef((e, t) => {
119
- const { children: n, ...r } = e, o = s.Children.toArray(n), c = o.find(N);
120
- if (c) {
121
- const i = c.props.children, u = o.map((l) => l === c ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : l);
122
- return /* @__PURE__ */ p.jsx(C, { ...r, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
123
- }
124
- return /* @__PURE__ */ p.jsx(C, { ...r, ref: t, children: n });
125
- });
126
- y.displayName = "Slot";
127
- var C = s.forwardRef((e, t) => {
128
- const { children: n, ...r } = e;
129
- if (s.isValidElement(n)) {
130
- const o = M(n);
131
- return s.cloneElement(n, {
132
- ...O(r, n.props),
133
- // @ts-ignore
134
- ref: t ? S(t, o) : o
135
- });
136
- }
137
- return s.Children.count(n) > 1 ? s.Children.only(null) : null;
138
- });
139
- C.displayName = "SlotClone";
140
- var $ = ({ children: e }) => /* @__PURE__ */ p.jsx(p.Fragment, { children: e });
141
- function N(e) {
142
- return s.isValidElement(e) && e.type === $;
143
- }
144
- function O(e, t) {
145
- const n = { ...t };
146
- for (const r in t) {
147
- const o = e[r], c = t[r];
148
- /^on[A-Z]/.test(r) ? o && c ? n[r] = (...u) => {
149
- c(...u), o(...u);
150
- } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...c } : r === "className" && (n[r] = [o, c].filter(Boolean).join(" "));
151
- }
152
- return { ...e, ...n };
153
- }
154
- function M(e) {
155
- var r, o;
156
- let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
157
- return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
158
- }
159
- var _ = [
160
- "a",
161
- "button",
162
- "div",
163
- "form",
164
- "h2",
165
- "h3",
166
- "img",
167
- "input",
168
- "label",
169
- "li",
170
- "nav",
171
- "ol",
172
- "p",
173
- "span",
174
- "svg",
175
- "ul"
176
- ], U = _.reduce((e, t) => {
177
- const n = s.forwardRef((r, o) => {
178
- const { asChild: c, ...i } = r, u = c ? y : t;
179
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p.jsx(u, { ...i, ref: o });
180
- });
181
- return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
182
- }, {});
183
- function F(e, t) {
184
- e && R.flushSync(() => e.dispatchEvent(t));
185
- }
186
- var D = s.useId || (() => {
187
- }), V = 0;
188
- function T(e) {
189
- const [t, n] = s.useState(D());
190
- return j(() => {
191
- n((r) => r ?? String(V++));
192
- }, [e]), t ? `radix-${t}` : "";
193
- }
194
- export {
195
- U as P,
196
- y as S,
197
- k as a,
198
- x as b,
199
- B as c,
200
- I as d,
201
- T as e,
202
- A as f,
203
- j as g,
204
- F as h,
205
- L as u
206
- };
207
- //# sourceMappingURL=index-ByHya67R.js.map
@@ -1,170 +0,0 @@
1
- import * as s from "react";
2
- import { u as M, g as h, c as U, a as j, e as L, P as A, d as W } from "./index-ByHya67R.js";
3
- import * as k from "react-dom";
4
- import { j as N } from "./jsx-runtime-CJZJivg2.js";
5
- function F(e, n) {
6
- return s.useReducer((r, t) => n[r][t] ?? r, e);
7
- }
8
- var I = (e) => {
9
- const { present: n, children: r } = e, t = B(n), o = typeof r == "function" ? r({ present: t.isPresent }) : s.Children.only(r), c = M(t.ref, G(o));
10
- return typeof r == "function" || t.isPresent ? s.cloneElement(o, { ref: c }) : null;
11
- };
12
- I.displayName = "Presence";
13
- function B(e) {
14
- const [n, r] = s.useState(), t = s.useRef({}), o = s.useRef(e), c = s.useRef("none"), l = e ? "mounted" : "unmounted", [f, i] = F(l, {
15
- mounted: {
16
- UNMOUNT: "unmounted",
17
- ANIMATION_OUT: "unmountSuspended"
18
- },
19
- unmountSuspended: {
20
- MOUNT: "mounted",
21
- ANIMATION_END: "unmounted"
22
- },
23
- unmounted: {
24
- MOUNT: "mounted"
25
- }
26
- });
27
- return s.useEffect(() => {
28
- const a = v(t.current);
29
- c.current = f === "mounted" ? a : "none";
30
- }, [f]), h(() => {
31
- const a = t.current, d = o.current;
32
- if (d !== e) {
33
- const g = c.current, m = v(a);
34
- e ? i("MOUNT") : m === "none" || (a == null ? void 0 : a.display) === "none" ? i("UNMOUNT") : i(d && g !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
35
- }
36
- }, [e, i]), h(() => {
37
- if (n) {
38
- const a = (p) => {
39
- const m = v(t.current).includes(p.animationName);
40
- p.target === n && m && k.flushSync(() => i("ANIMATION_END"));
41
- }, d = (p) => {
42
- p.target === n && (c.current = v(t.current));
43
- };
44
- return n.addEventListener("animationstart", d), n.addEventListener("animationcancel", a), n.addEventListener("animationend", a), () => {
45
- n.removeEventListener("animationstart", d), n.removeEventListener("animationcancel", a), n.removeEventListener("animationend", a);
46
- };
47
- } else
48
- i("ANIMATION_END");
49
- }, [n, i]), {
50
- isPresent: ["mounted", "unmountSuspended"].includes(f),
51
- ref: s.useCallback((a) => {
52
- a && (t.current = getComputedStyle(a)), r(a);
53
- }, [])
54
- };
55
- }
56
- function v(e) {
57
- return (e == null ? void 0 : e.animationName) || "none";
58
- }
59
- function G(e) {
60
- var t, o;
61
- let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning;
62
- return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
63
- }
64
- var O = "Collapsible", [$, K] = U(O), [q, P] = $(O), S = s.forwardRef(
65
- (e, n) => {
66
- const {
67
- __scopeCollapsible: r,
68
- open: t,
69
- defaultOpen: o,
70
- disabled: c,
71
- onOpenChange: l,
72
- ...f
73
- } = e, [i = !1, a] = j({
74
- prop: t,
75
- defaultProp: o,
76
- onChange: l
77
- });
78
- return /* @__PURE__ */ N.jsx(
79
- q,
80
- {
81
- scope: r,
82
- disabled: c,
83
- contentId: L(),
84
- open: i,
85
- onOpenToggle: s.useCallback(() => a((d) => !d), [a]),
86
- children: /* @__PURE__ */ N.jsx(
87
- A.div,
88
- {
89
- "data-state": x(i),
90
- "data-disabled": c ? "" : void 0,
91
- ...f,
92
- ref: n
93
- }
94
- )
95
- }
96
- );
97
- }
98
- );
99
- S.displayName = O;
100
- var _ = "CollapsibleTrigger", w = s.forwardRef(
101
- (e, n) => {
102
- const { __scopeCollapsible: r, ...t } = e, o = P(_, r);
103
- return /* @__PURE__ */ N.jsx(
104
- A.button,
105
- {
106
- type: "button",
107
- "aria-controls": o.contentId,
108
- "aria-expanded": o.open || !1,
109
- "data-state": x(o.open),
110
- "data-disabled": o.disabled ? "" : void 0,
111
- disabled: o.disabled,
112
- ...t,
113
- ref: n,
114
- onClick: W(e.onClick, o.onOpenToggle)
115
- }
116
- );
117
- }
118
- );
119
- w.displayName = _;
120
- var E = "CollapsibleContent", D = s.forwardRef(
121
- (e, n) => {
122
- const { forceMount: r, ...t } = e, o = P(E, e.__scopeCollapsible);
123
- return /* @__PURE__ */ N.jsx(I, { present: r || o.open, children: ({ present: c }) => /* @__PURE__ */ N.jsx(H, { ...t, ref: n, present: c }) });
124
- }
125
- );
126
- D.displayName = E;
127
- var H = s.forwardRef((e, n) => {
128
- const { __scopeCollapsible: r, present: t, children: o, ...c } = e, l = P(E, r), [f, i] = s.useState(t), a = s.useRef(null), d = M(n, a), p = s.useRef(0), g = p.current, m = s.useRef(0), R = m.current, b = l.open || f, T = s.useRef(b), C = s.useRef();
129
- return s.useEffect(() => {
130
- const u = requestAnimationFrame(() => T.current = !1);
131
- return () => cancelAnimationFrame(u);
132
- }, []), h(() => {
133
- const u = a.current;
134
- if (u) {
135
- C.current = C.current || {
136
- transitionDuration: u.style.transitionDuration,
137
- animationName: u.style.animationName
138
- }, u.style.transitionDuration = "0s", u.style.animationName = "none";
139
- const y = u.getBoundingClientRect();
140
- p.current = y.height, m.current = y.width, T.current || (u.style.transitionDuration = C.current.transitionDuration, u.style.animationName = C.current.animationName), i(t);
141
- }
142
- }, [l.open, t]), /* @__PURE__ */ N.jsx(
143
- A.div,
144
- {
145
- "data-state": x(l.open),
146
- "data-disabled": l.disabled ? "" : void 0,
147
- id: l.contentId,
148
- hidden: !b,
149
- ...c,
150
- ref: d,
151
- style: {
152
- "--radix-collapsible-content-height": g ? `${g}px` : void 0,
153
- "--radix-collapsible-content-width": R ? `${R}px` : void 0,
154
- ...e.style
155
- },
156
- children: b && o
157
- }
158
- );
159
- });
160
- function x(e) {
161
- return e ? "open" : "closed";
162
- }
163
- var Q = S, V = w, X = D;
164
- export {
165
- X as C,
166
- I as P,
167
- Q as R,
168
- V as T
169
- };
170
- //# sourceMappingURL=index-DseBZFJ-.js.map