zudoku 0.13.0 → 0.13.1

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 (168) hide show
  1. package/dist/cli/dev/handler.js +2 -2
  2. package/dist/cli/dev/handler.js.map +1 -1
  3. package/dist/config/validators/validate.d.ts +27 -13
  4. package/dist/config/validators/validate.js +3 -1
  5. package/dist/config/validators/validate.js.map +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/lib/components/Header.js +1 -1
  8. package/dist/lib/components/Header.js.map +1 -1
  9. package/dist/lib/components/MobileTopNavigation.js +2 -1
  10. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  11. package/dist/lib/components/Search.js +1 -1
  12. package/dist/lib/components/Search.js.map +1 -1
  13. package/dist/lib/components/SlotletProvider.d.ts +6 -2
  14. package/dist/lib/components/SlotletProvider.js +3 -5
  15. package/dist/lib/components/SlotletProvider.js.map +1 -1
  16. package/dist/lib/components/index.d.ts +2 -1
  17. package/dist/lib/components/index.js.map +1 -1
  18. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
  19. package/dist/lib/plugins/custom-pages/CustomPage.js +10 -0
  20. package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
  21. package/dist/lib/plugins/custom-pages/index.d.ts +8 -6
  22. package/dist/lib/plugins/custom-pages/index.js +3 -4
  23. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  24. package/dist/lib/plugins/openapi/Endpoint.js +1 -1
  25. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  26. package/dist/lib/plugins/openapi/OperationList.js +1 -1
  27. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  28. package/dist/lib/plugins/openapi/Route.d.ts +1 -1
  29. package/dist/lib/plugins/openapi/Route.js +1 -1
  30. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  31. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  32. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  33. package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
  34. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
  35. package/dist/lib/plugins/openapi/client/createWorkerClient.js +1 -1
  36. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -1
  37. package/dist/lib/plugins/openapi/index.js +1 -1
  38. package/dist/lib/plugins/openapi/index.js.map +1 -1
  39. package/dist/lib/ui/Callout.d.ts +36 -35
  40. package/dist/lib/ui/Callout.js.map +1 -1
  41. package/dist/lib/ui/Drawer.d.ts +8 -10
  42. package/dist/lib/ui/Drawer.js.map +1 -1
  43. package/dist/lib/util/useExposedProps.d.ts +2 -0
  44. package/dist/lib/util/useExposedProps.js +8 -0
  45. package/dist/lib/util/useExposedProps.js.map +1 -0
  46. package/dist/vite/dev-server.d.ts +6 -1
  47. package/dist/vite/dev-server.js +4 -2
  48. package/dist/vite/dev-server.js.map +1 -1
  49. package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-CbgJ5SAh.js} +3 -3
  50. package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-CbgJ5SAh.js.map} +1 -1
  51. package/lib/{DeveloperHint-YeWHKvyr.js → DeveloperHint-CiXPc9Xm.js} +2 -2
  52. package/lib/{DeveloperHint-YeWHKvyr.js.map → DeveloperHint-CiXPc9Xm.js.map} +1 -1
  53. package/lib/ErrorPage-B-zoPPVx.js +15 -0
  54. package/lib/{ErrorPage-CsZAN_za.js.map → ErrorPage-B-zoPPVx.js.map} +1 -1
  55. package/lib/Input-QMLhK7Rb.js +2229 -0
  56. package/lib/Input-QMLhK7Rb.js.map +1 -0
  57. package/lib/{Markdown-DapSf3wG.js → Markdown-D6Nze6qq.js} +3281 -5392
  58. package/lib/Markdown-D6Nze6qq.js.map +1 -0
  59. package/lib/{MdxPage-BqBWsXZ1.js → MdxPage-DBhq6-5F.js} +15 -15
  60. package/lib/{MdxPage-BqBWsXZ1.js.map → MdxPage-DBhq6-5F.js.map} +1 -1
  61. package/lib/{OperationList-CYrmxPa8.js → OperationList-Ba24gUd2.js} +50 -51
  62. package/lib/OperationList-Ba24gUd2.js.map +1 -0
  63. package/lib/{Route-Q5mqNQrv.js → Route-DI38nxYt.js} +3 -4
  64. package/lib/Route-DI38nxYt.js.map +1 -0
  65. package/lib/SidebarBadge-B9-VJSQr.js +503 -0
  66. package/lib/SidebarBadge-B9-VJSQr.js.map +1 -0
  67. package/lib/{SlotletProvider-BWwfPzgI.js → SlotletProvider-Cb8mGpBO.js} +42 -44
  68. package/lib/{SlotletProvider-BWwfPzgI.js.map → SlotletProvider-Cb8mGpBO.js.map} +1 -1
  69. package/lib/ZudokuContext-BEmsYQoq.js +1173 -0
  70. package/lib/ZudokuContext-BEmsYQoq.js.map +1 -0
  71. package/lib/assets/{index-B9EWVYfo.js → index-B_Jk_Yzp.js} +968 -938
  72. package/lib/assets/index-B_Jk_Yzp.js.map +1 -0
  73. package/lib/assets/{worker-BP8Uzflt.js → worker-Bf8vjASY.js} +4581 -4300
  74. package/lib/assets/worker-Bf8vjASY.js.map +1 -0
  75. package/lib/cn-BmFQLtkS.js +2279 -0
  76. package/lib/cn-BmFQLtkS.js.map +1 -0
  77. package/lib/{index-BG0g4WW0.js → index-BRCiYFaL.js} +747 -737
  78. package/lib/index-BRCiYFaL.js.map +1 -0
  79. package/lib/{index-CLd8ycZz.js → index-CkwDvuPt.js} +947 -917
  80. package/lib/index-CkwDvuPt.js.map +1 -0
  81. package/lib/{index-LNp6rxyU.js → index-D06ATMgg.js} +2 -2
  82. package/lib/{index-LNp6rxyU.js.map → index-D06ATMgg.js.map} +1 -1
  83. package/lib/{index-BlJ2rj99.js → index-DA74gNq3.js} +1124 -974
  84. package/lib/index-DA74gNq3.js.map +1 -0
  85. package/lib/index-DJqnphbT.js +35 -0
  86. package/lib/{index-Bn6Lc9tq.js.map → index-DJqnphbT.js.map} +1 -1
  87. package/lib/{index-BngPzhKn.js → index-dgcPryXi.js} +3 -3
  88. package/lib/{index-BngPzhKn.js.map → index-dgcPryXi.js.map} +1 -1
  89. package/lib/{index-Dolisrci.js → index-g_JJcuFg.js} +603 -549
  90. package/lib/index-g_JJcuFg.js.map +1 -0
  91. package/lib/router-Oe6YmY6B.js +3024 -0
  92. package/lib/router-Oe6YmY6B.js.map +1 -0
  93. package/lib/state-CsuHT8ZO.js +183 -0
  94. package/lib/state-CsuHT8ZO.js.map +1 -0
  95. package/lib/urql-core-KJnLL26g.js +1455 -0
  96. package/lib/urql-core-KJnLL26g.js.map +1 -0
  97. package/lib/useExposedProps-Csw8oAlt.js +9 -0
  98. package/lib/useExposedProps-Csw8oAlt.js.map +1 -0
  99. package/lib/{utils-ByIc_KIM.js → utils-Chi3p5nE.js} +4 -4
  100. package/lib/utils-Chi3p5nE.js.map +1 -0
  101. package/lib/zudoku.auth-auth0.js +1 -1
  102. package/lib/zudoku.auth-clerk.js +2 -2
  103. package/lib/zudoku.auth-openid.js +363 -350
  104. package/lib/zudoku.auth-openid.js.map +1 -1
  105. package/lib/zudoku.components.js +1695 -1628
  106. package/lib/zudoku.components.js.map +1 -1
  107. package/lib/zudoku.openapi-worker.js +4599 -4317
  108. package/lib/zudoku.openapi-worker.js.map +1 -1
  109. package/lib/zudoku.plugin-api-keys.js +7 -7
  110. package/lib/zudoku.plugin-custom-pages.js +16 -8
  111. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  112. package/lib/zudoku.plugin-markdown.js +1 -1
  113. package/lib/zudoku.plugin-openapi.js +8 -8
  114. package/lib/zudoku.plugin-redirect.js +1 -1
  115. package/package.json +58 -65
  116. package/src/lib/components/Header.tsx +2 -2
  117. package/src/lib/components/MobileTopNavigation.tsx +4 -0
  118. package/src/lib/components/Search.tsx +1 -1
  119. package/src/lib/components/SlotletProvider.tsx +14 -7
  120. package/src/lib/components/index.ts +1 -1
  121. package/src/lib/plugins/custom-pages/CustomPage.tsx +15 -0
  122. package/src/lib/plugins/custom-pages/index.tsx +11 -9
  123. package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
  124. package/src/lib/plugins/openapi/OperationList.tsx +1 -1
  125. package/src/lib/plugins/openapi/Route.tsx +1 -2
  126. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  127. package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -6
  128. package/src/lib/plugins/openapi/client/createWorkerClient.ts +1 -6
  129. package/src/lib/plugins/openapi/index.tsx +1 -5
  130. package/src/lib/ui/Callout.tsx +7 -6
  131. package/src/lib/ui/Drawer.tsx +38 -36
  132. package/src/lib/util/useExposedProps.tsx +10 -0
  133. package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
  134. package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
  135. package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
  136. package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
  137. package/dist/lib/plugins/openapi/util/urql.js +0 -8
  138. package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
  139. package/lib/CategoryHeading-ovR-zHRq.js +0 -10
  140. package/lib/CategoryHeading-ovR-zHRq.js.map +0 -1
  141. package/lib/ErrorPage-CsZAN_za.js +0 -16
  142. package/lib/Input-CtVUl3eT.js +0 -2198
  143. package/lib/Input-CtVUl3eT.js.map +0 -1
  144. package/lib/Markdown-DapSf3wG.js.map +0 -1
  145. package/lib/OperationList-CYrmxPa8.js.map +0 -1
  146. package/lib/Route-Q5mqNQrv.js.map +0 -1
  147. package/lib/SidebarBadge-Dx7jtnoA.js +0 -498
  148. package/lib/SidebarBadge-Dx7jtnoA.js.map +0 -1
  149. package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
  150. package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
  151. package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
  152. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  153. package/lib/assets/index-B9EWVYfo.js.map +0 -1
  154. package/lib/assets/worker-BP8Uzflt.js.map +0 -1
  155. package/lib/index-BG0g4WW0.js.map +0 -1
  156. package/lib/index-BlJ2rj99.js.map +0 -1
  157. package/lib/index-Bn6Lc9tq.js +0 -9
  158. package/lib/index-CLd8ycZz.js.map +0 -1
  159. package/lib/index-Dolisrci.js.map +0 -1
  160. package/lib/router-D2p7Olpn.js +0 -2971
  161. package/lib/router-D2p7Olpn.js.map +0 -1
  162. package/lib/state-hNe1dw4B.js +0 -548
  163. package/lib/state-hNe1dw4B.js.map +0 -1
  164. package/lib/urql-YhcsXYy8.js +0 -1591
  165. package/lib/urql-YhcsXYy8.js.map +0 -1
  166. package/lib/utils-ByIc_KIM.js.map +0 -1
  167. package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
  168. package/src/lib/plugins/openapi/util/urql.ts +0 -8
@@ -1,548 +0,0 @@
1
- import T from "react";
2
- import { g as Z } from "./_commonjsHelpers-BkfeUUK-.js";
3
- var ee = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
4
- const G = (e) => {
5
- let c;
6
- const u = /* @__PURE__ */ new Set(), a = (f, i) => {
7
- const s = typeof f == "function" ? f(c) : f;
8
- if (!Object.is(s, c)) {
9
- const v = c;
10
- c = i ?? (typeof s != "object" || s === null) ? s : Object.assign({}, c, s), u.forEach((p) => p(c, v));
11
- }
12
- }, _ = () => c, E = { setState: a, getState: _, getInitialState: () => d, subscribe: (f) => (u.add(f), () => u.delete(f)), destroy: () => {
13
- (ee ? "production" : void 0) !== "production" && console.warn(
14
- "[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
15
- ), u.clear();
16
- } }, d = c = e(a, _, E);
17
- return E;
18
- }, te = (e) => e ? G(e) : G;
19
- var N = { exports: {} }, M = {}, b = { exports: {} }, U = {};
20
- /**
21
- * @license React
22
- * use-sync-external-store-shim.production.min.js
23
- *
24
- * Copyright (c) Facebook, Inc. and its affiliates.
25
- *
26
- * This source code is licensed under the MIT license found in the
27
- * LICENSE file in the root directory of this source tree.
28
- */
29
- var z;
30
- function re() {
31
- if (z) return U;
32
- z = 1;
33
- var e = T;
34
- function c(i, s) {
35
- return i === s && (i !== 0 || 1 / i === 1 / s) || i !== i && s !== s;
36
- }
37
- var u = typeof Object.is == "function" ? Object.is : c, a = e.useState, _ = e.useEffect, t = e.useLayoutEffect, O = e.useDebugValue;
38
- function y(i, s) {
39
- var v = s(), p = a({ inst: { value: v, getSnapshot: s } }), n = p[0].inst, r = p[1];
40
- return t(function() {
41
- n.value = v, n.getSnapshot = s, E(n) && r({ inst: n });
42
- }, [i, v, s]), _(function() {
43
- return E(n) && r({ inst: n }), i(function() {
44
- E(n) && r({ inst: n });
45
- });
46
- }, [i]), O(v), v;
47
- }
48
- function E(i) {
49
- var s = i.getSnapshot;
50
- i = i.value;
51
- try {
52
- var v = s();
53
- return !u(i, v);
54
- } catch {
55
- return !0;
56
- }
57
- }
58
- function d(i, s) {
59
- return s();
60
- }
61
- var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : y;
62
- return U.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, U;
63
- }
64
- var W = {};
65
- /**
66
- * @license React
67
- * use-sync-external-store-shim.development.js
68
- *
69
- * Copyright (c) Facebook, Inc. and its affiliates.
70
- *
71
- * This source code is licensed under the MIT license found in the
72
- * LICENSE file in the root directory of this source tree.
73
- */
74
- var K;
75
- function ne() {
76
- return K || (K = 1, process.env.NODE_ENV !== "production" && function() {
77
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
78
- var e = T, c = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
79
- function u(l) {
80
- {
81
- for (var S = arguments.length, g = new Array(S > 1 ? S - 1 : 0), m = 1; m < S; m++)
82
- g[m - 1] = arguments[m];
83
- a("error", l, g);
84
- }
85
- }
86
- function a(l, S, g) {
87
- {
88
- var m = c.ReactDebugCurrentFrame, R = m.getStackAddendum();
89
- R !== "" && (S += "%s", g = g.concat([R]));
90
- var D = g.map(function(L) {
91
- return String(L);
92
- });
93
- D.unshift("Warning: " + S), Function.prototype.apply.call(console[l], console, D);
94
- }
95
- }
96
- function _(l, S) {
97
- return l === S && (l !== 0 || 1 / l === 1 / S) || l !== l && S !== S;
98
- }
99
- var t = typeof Object.is == "function" ? Object.is : _, O = e.useState, y = e.useEffect, E = e.useLayoutEffect, d = e.useDebugValue, f = !1, i = !1;
100
- function s(l, S, g) {
101
- f || e.startTransition !== void 0 && (f = !0, u("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
102
- var m = S();
103
- if (!i) {
104
- var R = S();
105
- t(m, R) || (u("The result of getSnapshot should be cached to avoid an infinite loop"), i = !0);
106
- }
107
- var D = O({
108
- inst: {
109
- value: m,
110
- getSnapshot: S
111
- }
112
- }), L = D[0].inst, w = D[1];
113
- return E(function() {
114
- L.value = m, L.getSnapshot = S, v(L) && w({
115
- inst: L
116
- });
117
- }, [l, m, S]), y(function() {
118
- v(L) && w({
119
- inst: L
120
- });
121
- var x = function() {
122
- v(L) && w({
123
- inst: L
124
- });
125
- };
126
- return l(x);
127
- }, [l]), d(m), m;
128
- }
129
- function v(l) {
130
- var S = l.getSnapshot, g = l.value;
131
- try {
132
- var m = S();
133
- return !t(g, m);
134
- } catch {
135
- return !0;
136
- }
137
- }
138
- function p(l, S, g) {
139
- return S();
140
- }
141
- var n = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", r = !n, h = r ? p : s, o = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : h;
142
- W.useSyncExternalStore = o, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
143
- }()), W;
144
- }
145
- var P;
146
- function J() {
147
- return P || (P = 1, process.env.NODE_ENV === "production" ? b.exports = re() : b.exports = ne()), b.exports;
148
- }
149
- /**
150
- * @license React
151
- * use-sync-external-store-shim/with-selector.production.min.js
152
- *
153
- * Copyright (c) Facebook, Inc. and its affiliates.
154
- *
155
- * This source code is licensed under the MIT license found in the
156
- * LICENSE file in the root directory of this source tree.
157
- */
158
- var q;
159
- function oe() {
160
- if (q) return M;
161
- q = 1;
162
- var e = T, c = J();
163
- function u(d, f) {
164
- return d === f && (d !== 0 || 1 / d === 1 / f) || d !== d && f !== f;
165
- }
166
- var a = typeof Object.is == "function" ? Object.is : u, _ = c.useSyncExternalStore, t = e.useRef, O = e.useEffect, y = e.useMemo, E = e.useDebugValue;
167
- return M.useSyncExternalStoreWithSelector = function(d, f, i, s, v) {
168
- var p = t(null);
169
- if (p.current === null) {
170
- var n = { hasValue: !1, value: null };
171
- p.current = n;
172
- } else n = p.current;
173
- p = y(function() {
174
- function h(m) {
175
- if (!o) {
176
- if (o = !0, l = m, m = s(m), v !== void 0 && n.hasValue) {
177
- var R = n.value;
178
- if (v(R, m)) return S = R;
179
- }
180
- return S = m;
181
- }
182
- if (R = S, a(l, m)) return R;
183
- var D = s(m);
184
- return v !== void 0 && v(R, D) ? R : (l = m, S = D);
185
- }
186
- var o = !1, l, S, g = i === void 0 ? null : i;
187
- return [function() {
188
- return h(f());
189
- }, g === null ? void 0 : function() {
190
- return h(g());
191
- }];
192
- }, [f, i, s, v]);
193
- var r = _(d, p[0], p[1]);
194
- return O(function() {
195
- n.hasValue = !0, n.value = r;
196
- }, [r]), E(r), r;
197
- }, M;
198
- }
199
- var j = {};
200
- /**
201
- * @license React
202
- * use-sync-external-store-shim/with-selector.development.js
203
- *
204
- * Copyright (c) Facebook, Inc. and its affiliates.
205
- *
206
- * This source code is licensed under the MIT license found in the
207
- * LICENSE file in the root directory of this source tree.
208
- */
209
- var F;
210
- function ie() {
211
- return F || (F = 1, process.env.NODE_ENV !== "production" && function() {
212
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
213
- var e = T, c = J();
214
- function u(f, i) {
215
- return f === i && (f !== 0 || 1 / f === 1 / i) || f !== f && i !== i;
216
- }
217
- var a = typeof Object.is == "function" ? Object.is : u, _ = c.useSyncExternalStore, t = e.useRef, O = e.useEffect, y = e.useMemo, E = e.useDebugValue;
218
- function d(f, i, s, v, p) {
219
- var n = t(null), r;
220
- n.current === null ? (r = {
221
- hasValue: !1,
222
- value: null
223
- }, n.current = r) : r = n.current;
224
- var h = y(function() {
225
- var g = !1, m, R, D = function(I) {
226
- if (!g) {
227
- g = !0, m = I;
228
- var C = v(I);
229
- if (p !== void 0 && r.hasValue) {
230
- var H = r.value;
231
- if (p(H, C))
232
- return R = H, H;
233
- }
234
- return R = C, C;
235
- }
236
- var X = m, V = R;
237
- if (a(X, I))
238
- return V;
239
- var B = v(I);
240
- return p !== void 0 && p(V, B) ? V : (m = I, R = B, B);
241
- }, L = s === void 0 ? null : s, w = function() {
242
- return D(i());
243
- }, x = L === null ? void 0 : function() {
244
- return D(L());
245
- };
246
- return [w, x];
247
- }, [i, s, v, p]), o = h[0], l = h[1], S = _(f, o, l);
248
- return O(function() {
249
- r.hasValue = !0, r.value = S;
250
- }, [S]), E(S), S;
251
- }
252
- j.useSyncExternalStoreWithSelector = d, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
253
- }()), j;
254
- }
255
- process.env.NODE_ENV === "production" ? N.exports = oe() : N.exports = ie();
256
- var ue = N.exports;
257
- const ae = /* @__PURE__ */ Z(ue);
258
- var Y = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
259
- const { useDebugValue: se } = T, { useSyncExternalStoreWithSelector: ce } = ae;
260
- let $ = !1;
261
- const le = (e) => e;
262
- function de(e, c = le, u) {
263
- (Y ? "production" : void 0) !== "production" && u && !$ && (console.warn(
264
- "[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
265
- ), $ = !0);
266
- const a = ce(
267
- e.subscribe,
268
- e.getState,
269
- e.getServerState || e.getInitialState,
270
- c,
271
- u
272
- );
273
- return se(a), a;
274
- }
275
- const k = (e) => {
276
- (Y ? "production" : void 0) !== "production" && typeof e != "function" && console.warn(
277
- "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
278
- );
279
- const c = typeof e == "function" ? te(e) : e, u = (a, _) => de(c, a, _);
280
- return Object.assign(u, c), u;
281
- }, Q = (e) => e ? k(e) : k;
282
- var fe = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
283
- function ve(e, c) {
284
- let u;
285
- try {
286
- u = e();
287
- } catch {
288
- return;
289
- }
290
- return {
291
- getItem: (_) => {
292
- var t;
293
- const O = (E) => E === null ? null : JSON.parse(E, void 0), y = (t = u.getItem(_)) != null ? t : null;
294
- return y instanceof Promise ? y.then(O) : O(y);
295
- },
296
- setItem: (_, t) => u.setItem(
297
- _,
298
- JSON.stringify(t, void 0)
299
- ),
300
- removeItem: (_) => u.removeItem(_)
301
- };
302
- }
303
- const A = (e) => (c) => {
304
- try {
305
- const u = e(c);
306
- return u instanceof Promise ? u : {
307
- then(a) {
308
- return A(a)(u);
309
- },
310
- catch(a) {
311
- return this;
312
- }
313
- };
314
- } catch (u) {
315
- return {
316
- then(a) {
317
- return this;
318
- },
319
- catch(a) {
320
- return A(a)(u);
321
- }
322
- };
323
- }
324
- }, Se = (e, c) => (u, a, _) => {
325
- let t = {
326
- getStorage: () => localStorage,
327
- serialize: JSON.stringify,
328
- deserialize: JSON.parse,
329
- partialize: (r) => r,
330
- version: 0,
331
- merge: (r, h) => ({
332
- ...h,
333
- ...r
334
- }),
335
- ...c
336
- }, O = !1;
337
- const y = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Set();
338
- let d;
339
- try {
340
- d = t.getStorage();
341
- } catch {
342
- }
343
- if (!d)
344
- return e(
345
- (...r) => {
346
- console.warn(
347
- `[zustand persist middleware] Unable to update item '${t.name}', the given storage is currently unavailable.`
348
- ), u(...r);
349
- },
350
- a,
351
- _
352
- );
353
- const f = A(t.serialize), i = () => {
354
- const r = t.partialize({ ...a() });
355
- let h;
356
- const o = f({ state: r, version: t.version }).then(
357
- (l) => d.setItem(t.name, l)
358
- ).catch((l) => {
359
- h = l;
360
- });
361
- if (h)
362
- throw h;
363
- return o;
364
- }, s = _.setState;
365
- _.setState = (r, h) => {
366
- s(r, h), i();
367
- };
368
- const v = e(
369
- (...r) => {
370
- u(...r), i();
371
- },
372
- a,
373
- _
374
- );
375
- let p;
376
- const n = () => {
377
- var r;
378
- if (!d) return;
379
- O = !1, y.forEach((o) => o(a()));
380
- const h = ((r = t.onRehydrateStorage) == null ? void 0 : r.call(t, a())) || void 0;
381
- return A(d.getItem.bind(d))(t.name).then((o) => {
382
- if (o)
383
- return t.deserialize(o);
384
- }).then((o) => {
385
- if (o)
386
- if (typeof o.version == "number" && o.version !== t.version) {
387
- if (t.migrate)
388
- return t.migrate(
389
- o.state,
390
- o.version
391
- );
392
- console.error(
393
- "State loaded from storage couldn't be migrated since no migrate function was provided"
394
- );
395
- } else
396
- return o.state;
397
- }).then((o) => {
398
- var l;
399
- return p = t.merge(
400
- o,
401
- (l = a()) != null ? l : v
402
- ), u(p, !0), i();
403
- }).then(() => {
404
- h == null || h(p, void 0), O = !0, E.forEach((o) => o(p));
405
- }).catch((o) => {
406
- h == null || h(void 0, o);
407
- });
408
- };
409
- return _.persist = {
410
- setOptions: (r) => {
411
- t = {
412
- ...t,
413
- ...r
414
- }, r.getStorage && (d = r.getStorage());
415
- },
416
- clearStorage: () => {
417
- d == null || d.removeItem(t.name);
418
- },
419
- getOptions: () => t,
420
- rehydrate: () => n(),
421
- hasHydrated: () => O,
422
- onHydrate: (r) => (y.add(r), () => {
423
- y.delete(r);
424
- }),
425
- onFinishHydration: (r) => (E.add(r), () => {
426
- E.delete(r);
427
- })
428
- }, n(), p || v;
429
- }, _e = (e, c) => (u, a, _) => {
430
- let t = {
431
- storage: ve(() => localStorage),
432
- partialize: (n) => n,
433
- version: 0,
434
- merge: (n, r) => ({
435
- ...r,
436
- ...n
437
- }),
438
- ...c
439
- }, O = !1;
440
- const y = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Set();
441
- let d = t.storage;
442
- if (!d)
443
- return e(
444
- (...n) => {
445
- console.warn(
446
- `[zustand persist middleware] Unable to update item '${t.name}', the given storage is currently unavailable.`
447
- ), u(...n);
448
- },
449
- a,
450
- _
451
- );
452
- const f = () => {
453
- const n = t.partialize({ ...a() });
454
- return d.setItem(t.name, {
455
- state: n,
456
- version: t.version
457
- });
458
- }, i = _.setState;
459
- _.setState = (n, r) => {
460
- i(n, r), f();
461
- };
462
- const s = e(
463
- (...n) => {
464
- u(...n), f();
465
- },
466
- a,
467
- _
468
- );
469
- _.getInitialState = () => s;
470
- let v;
471
- const p = () => {
472
- var n, r;
473
- if (!d) return;
474
- O = !1, y.forEach((o) => {
475
- var l;
476
- return o((l = a()) != null ? l : s);
477
- });
478
- const h = ((r = t.onRehydrateStorage) == null ? void 0 : r.call(t, (n = a()) != null ? n : s)) || void 0;
479
- return A(d.getItem.bind(d))(t.name).then((o) => {
480
- if (o)
481
- if (typeof o.version == "number" && o.version !== t.version) {
482
- if (t.migrate)
483
- return [
484
- !0,
485
- t.migrate(
486
- o.state,
487
- o.version
488
- )
489
- ];
490
- console.error(
491
- "State loaded from storage couldn't be migrated since no migrate function was provided"
492
- );
493
- } else
494
- return [!1, o.state];
495
- return [!1, void 0];
496
- }).then((o) => {
497
- var l;
498
- const [S, g] = o;
499
- if (v = t.merge(
500
- g,
501
- (l = a()) != null ? l : s
502
- ), u(v, !0), S)
503
- return f();
504
- }).then(() => {
505
- h == null || h(v, void 0), v = a(), O = !0, E.forEach((o) => o(v));
506
- }).catch((o) => {
507
- h == null || h(void 0, o);
508
- });
509
- };
510
- return _.persist = {
511
- setOptions: (n) => {
512
- t = {
513
- ...t,
514
- ...n
515
- }, n.storage && (d = n.storage);
516
- },
517
- clearStorage: () => {
518
- d == null || d.removeItem(t.name);
519
- },
520
- getOptions: () => t,
521
- rehydrate: () => p(),
522
- hasHydrated: () => O,
523
- onHydrate: (n) => (y.add(n), () => {
524
- y.delete(n);
525
- }),
526
- onFinishHydration: (n) => (E.add(n), () => {
527
- E.delete(n);
528
- })
529
- }, t.skipHydration || p(), v || s;
530
- }, pe = (e, c) => "getStorage" in c || "serialize" in c || "deserialize" in c ? ((fe ? "production" : void 0) !== "production" && console.warn(
531
- "[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."
532
- ), Se(e, c)) : _e(e, c), me = pe, ye = Q(() => ({
533
- isPending: !1,
534
- isAuthenticated: !1
535
- })), Oe = Q()(
536
- me(
537
- (e) => ({
538
- selectedServer: void 0,
539
- setSelectedServer: (c) => e({ selectedServer: c })
540
- }),
541
- { name: "zudoku-selected-server" }
542
- )
543
- );
544
- export {
545
- Oe as a,
546
- ye as u
547
- };
548
- //# sourceMappingURL=state-hNe1dw4B.js.map