@ram_28/kf-ai-sdk 1.0.11 → 1.0.13

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 (195) hide show
  1. package/README.md +55 -48
  2. package/dist/api/client.d.ts +14 -14
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/datetime.d.ts +5 -5
  5. package/dist/api/datetime.d.ts.map +1 -1
  6. package/dist/api/index.d.ts +1 -1
  7. package/dist/api/index.d.ts.map +1 -1
  8. package/dist/api/metadata.d.ts +2 -2
  9. package/dist/api/metadata.d.ts.map +1 -1
  10. package/dist/api.cjs +1 -0
  11. package/dist/api.d.ts +4 -0
  12. package/dist/api.d.ts.map +1 -0
  13. package/dist/api.mjs +27 -0
  14. package/dist/api.types.cjs +1 -0
  15. package/dist/api.types.d.ts +4 -0
  16. package/dist/api.types.d.ts.map +1 -0
  17. package/dist/api.types.mjs +1 -0
  18. package/dist/auth/AuthProvider.d.ts +3 -3
  19. package/dist/auth/AuthProvider.d.ts.map +1 -1
  20. package/dist/auth/authClient.d.ts +4 -4
  21. package/dist/auth/authClient.d.ts.map +1 -1
  22. package/dist/auth/authConfig.d.ts +5 -5
  23. package/dist/auth/authConfig.d.ts.map +1 -1
  24. package/dist/auth/index.d.ts +1 -1
  25. package/dist/auth/index.d.ts.map +1 -1
  26. package/dist/auth/types.d.ts +21 -21
  27. package/dist/auth/types.d.ts.map +1 -1
  28. package/dist/auth/useAuth.d.ts +2 -2
  29. package/dist/auth/useAuth.d.ts.map +1 -1
  30. package/dist/auth.cjs +1 -0
  31. package/dist/auth.d.ts +5 -0
  32. package/dist/auth.d.ts.map +1 -0
  33. package/dist/auth.mjs +280 -0
  34. package/dist/auth.types.cjs +1 -0
  35. package/dist/auth.types.d.ts +2 -0
  36. package/dist/auth.types.d.ts.map +1 -0
  37. package/dist/auth.types.mjs +1 -0
  38. package/dist/base-types.d.ts +2 -0
  39. package/dist/base-types.d.ts.map +1 -0
  40. package/dist/client-C15j4O5B.cjs +1 -0
  41. package/dist/client-CfvLiGfP.js +233 -0
  42. package/dist/cn-Dr87sK3i.js +2775 -0
  43. package/dist/cn-mXUIg4vp.cjs +1 -0
  44. package/dist/components/hooks/index.d.ts +3 -3
  45. package/dist/components/hooks/index.d.ts.map +1 -1
  46. package/dist/components/hooks/useFilter/index.d.ts +2 -2
  47. package/dist/components/hooks/useFilter/index.d.ts.map +1 -1
  48. package/dist/components/hooks/useFilter/types.d.ts +19 -31
  49. package/dist/components/hooks/useFilter/types.d.ts.map +1 -1
  50. package/dist/components/hooks/useFilter/useFilter.d.ts +2 -2
  51. package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -1
  52. package/dist/components/hooks/useForm/apiClient.d.ts +6 -6
  53. package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -1
  54. package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +7 -7
  55. package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -1
  56. package/dist/components/hooks/useForm/index.d.ts +5 -5
  57. package/dist/components/hooks/useForm/index.d.ts.map +1 -1
  58. package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +10 -10
  59. package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -1
  60. package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +7 -12
  61. package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -1
  62. package/dist/components/hooks/useForm/schemaParser.utils.d.ts +7 -7
  63. package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -1
  64. package/dist/components/hooks/useForm/types.d.ts +67 -76
  65. package/dist/components/hooks/useForm/types.d.ts.map +1 -1
  66. package/dist/components/hooks/useForm/useForm.d.ts +2 -2
  67. package/dist/components/hooks/useForm/useForm.d.ts.map +1 -1
  68. package/dist/components/hooks/useKanban/apiClient.d.ts +16 -16
  69. package/dist/components/hooks/useKanban/apiClient.d.ts.map +1 -1
  70. package/dist/components/hooks/useKanban/context.d.ts +3 -3
  71. package/dist/components/hooks/useKanban/context.d.ts.map +1 -1
  72. package/dist/components/hooks/useKanban/dragDropManager.d.ts +7 -7
  73. package/dist/components/hooks/useKanban/dragDropManager.d.ts.map +1 -1
  74. package/dist/components/hooks/useKanban/index.d.ts +1 -1
  75. package/dist/components/hooks/useKanban/index.d.ts.map +1 -1
  76. package/dist/components/hooks/useKanban/types.d.ts +65 -67
  77. package/dist/components/hooks/useKanban/types.d.ts.map +1 -1
  78. package/dist/components/hooks/useKanban/useKanban.d.ts +2 -2
  79. package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -1
  80. package/dist/components/hooks/useTable/index.d.ts +1 -1
  81. package/dist/components/hooks/useTable/index.d.ts.map +1 -1
  82. package/dist/components/hooks/useTable/types.d.ts +10 -10
  83. package/dist/components/hooks/useTable/types.d.ts.map +1 -1
  84. package/dist/components/hooks/useTable/useTable.d.ts +2 -2
  85. package/dist/components/hooks/useTable/useTable.d.ts.map +1 -1
  86. package/dist/filter.cjs +1 -0
  87. package/dist/filter.d.ts +3 -0
  88. package/dist/filter.d.ts.map +1 -0
  89. package/dist/filter.mjs +6 -0
  90. package/dist/filter.types.cjs +1 -0
  91. package/dist/filter.types.d.ts +2 -0
  92. package/dist/filter.types.d.ts.map +1 -0
  93. package/dist/filter.types.mjs +1 -0
  94. package/dist/form.cjs +1 -0
  95. package/dist/form.d.ts +3 -0
  96. package/dist/form.d.ts.map +1 -0
  97. package/dist/form.mjs +2355 -0
  98. package/dist/form.types.cjs +1 -0
  99. package/dist/form.types.d.ts +2 -0
  100. package/dist/form.types.d.ts.map +1 -0
  101. package/dist/form.types.mjs +1 -0
  102. package/dist/jsx-runtime-BYECrxsp.cjs +30 -0
  103. package/dist/jsx-runtime-DGlMoOmv.js +630 -0
  104. package/dist/kanban.cjs +13 -0
  105. package/dist/kanban.d.ts +5 -0
  106. package/dist/kanban.d.ts.map +1 -0
  107. package/dist/kanban.mjs +1060 -0
  108. package/dist/kanban.types.cjs +1 -0
  109. package/dist/kanban.types.d.ts +2 -0
  110. package/dist/kanban.types.d.ts.map +1 -0
  111. package/dist/kanban.types.mjs +1 -0
  112. package/dist/kanban.ui.cjs +1 -0
  113. package/dist/kanban.ui.d.ts +2 -0
  114. package/dist/kanban.ui.d.ts.map +1 -0
  115. package/dist/kanban.ui.mjs +104 -0
  116. package/dist/metadata-2FLBsFcf.cjs +1 -0
  117. package/dist/metadata-DBcoDth-.js +43 -0
  118. package/dist/table.cjs +1 -0
  119. package/dist/table.d.ts +2 -0
  120. package/dist/table.d.ts.map +1 -0
  121. package/dist/table.mjs +148 -0
  122. package/dist/table.types.cjs +1 -0
  123. package/dist/table.types.d.ts +2 -0
  124. package/dist/table.types.d.ts.map +1 -0
  125. package/dist/table.types.mjs +1 -0
  126. package/dist/types/base-fields.d.ts +45 -45
  127. package/dist/types/base-fields.d.ts.map +1 -1
  128. package/dist/types/common.d.ts +45 -61
  129. package/dist/types/common.d.ts.map +1 -1
  130. package/dist/types.cjs +1 -0
  131. package/dist/types.mjs +1 -0
  132. package/dist/useFilter-CXFqEHyI.js +129 -0
  133. package/dist/useFilter-D-bCDo6Z.cjs +1 -0
  134. package/dist/useQuery-BScHEo7x.cjs +1 -0
  135. package/dist/useQuery-KpZFg80c.js +748 -0
  136. package/dist/utils/formatting.d.ts +4 -4
  137. package/dist/utils/formatting.d.ts.map +1 -1
  138. package/dist/utils.cjs +4 -0
  139. package/dist/utils.d.ts +3 -0
  140. package/dist/utils.d.ts.map +1 -0
  141. package/dist/utils.mjs +105 -0
  142. package/package.json +147 -9
  143. package/sdk/api/client.ts +51 -51
  144. package/sdk/api/datetime.ts +5 -5
  145. package/sdk/api/index.ts +28 -33
  146. package/sdk/api/metadata.ts +4 -4
  147. package/sdk/api.ts +24 -0
  148. package/sdk/api.types.ts +58 -0
  149. package/sdk/auth/AuthProvider.tsx +18 -18
  150. package/sdk/auth/authClient.ts +9 -9
  151. package/sdk/auth/authConfig.ts +9 -9
  152. package/sdk/auth/index.ts +5 -5
  153. package/sdk/auth/types.ts +21 -21
  154. package/sdk/auth/useAuth.ts +2 -2
  155. package/sdk/auth.ts +22 -0
  156. package/sdk/auth.types.ts +28 -0
  157. package/sdk/base-types.ts +45 -0
  158. package/sdk/components/hooks/index.ts +22 -22
  159. package/sdk/components/hooks/useFilter/index.ts +8 -14
  160. package/sdk/components/hooks/useFilter/types.ts +29 -58
  161. package/sdk/components/hooks/useFilter/useFilter.ts +41 -44
  162. package/sdk/components/hooks/useForm/apiClient.ts +8 -8
  163. package/sdk/components/hooks/useForm/expressionValidator.utils.ts +18 -18
  164. package/sdk/components/hooks/useForm/index.ts +24 -24
  165. package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +22 -22
  166. package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +26 -62
  167. package/sdk/components/hooks/useForm/schemaParser.utils.ts +24 -24
  168. package/sdk/components/hooks/useForm/types.ts +66 -82
  169. package/sdk/components/hooks/useForm/useForm.ts +15 -21
  170. package/sdk/components/hooks/useKanban/apiClient.ts +54 -54
  171. package/sdk/components/hooks/useKanban/context.ts +3 -3
  172. package/sdk/components/hooks/useKanban/dragDropManager.ts +19 -19
  173. package/sdk/components/hooks/useKanban/index.ts +26 -26
  174. package/sdk/components/hooks/useKanban/types.ts +69 -71
  175. package/sdk/components/hooks/useKanban/useKanban.ts +43 -51
  176. package/sdk/components/hooks/useKanban/useKanbanSimple.ts +4 -4
  177. package/sdk/components/hooks/useTable/index.ts +5 -1
  178. package/sdk/components/hooks/useTable/types.ts +10 -10
  179. package/sdk/components/hooks/useTable/useTable.ts +10 -10
  180. package/sdk/filter.ts +13 -0
  181. package/sdk/filter.types.ts +17 -0
  182. package/sdk/form.ts +15 -0
  183. package/sdk/form.types.ts +46 -0
  184. package/sdk/kanban.ts +23 -0
  185. package/sdk/kanban.types.ts +50 -0
  186. package/sdk/kanban.ui.ts +16 -0
  187. package/sdk/table.ts +7 -0
  188. package/sdk/table.types.ts +13 -0
  189. package/sdk/types/base-fields.ts +47 -47
  190. package/sdk/types/common.ts +47 -71
  191. package/sdk/types/index.ts +1 -1
  192. package/sdk/utils/formatting.ts +4 -4
  193. package/sdk/utils.ts +10 -0
  194. package/dist/index.cjs +0 -45
  195. package/dist/index.mjs +0 -6387
@@ -0,0 +1,630 @@
1
+ import Se from "react";
2
+ var X = { exports: {} }, k = {};
3
+ /**
4
+ * @license React
5
+ * react-jsx-runtime.production.min.js
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var Te;
13
+ function lr() {
14
+ if (Te) return k;
15
+ Te = 1;
16
+ var V = Se, C = Symbol.for("react.element"), M = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, F = V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, A = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function w(y, f, T) {
18
+ var p, _ = {}, b = null, I = null;
19
+ T !== void 0 && (b = "" + T), f.key !== void 0 && (b = "" + f.key), f.ref !== void 0 && (I = f.ref);
20
+ for (p in f) m.call(f, p) && !A.hasOwnProperty(p) && (_[p] = f[p]);
21
+ if (y && y.defaultProps) for (p in f = y.defaultProps, f) _[p] === void 0 && (_[p] = f[p]);
22
+ return { $$typeof: C, type: y, key: b, ref: I, props: _, _owner: F.current };
23
+ }
24
+ return k.Fragment = M, k.jsx = w, k.jsxs = w, k;
25
+ }
26
+ var D = {};
27
+ /**
28
+ * @license React
29
+ * react-jsx-runtime.development.js
30
+ *
31
+ * Copyright (c) Facebook, Inc. and its affiliates.
32
+ *
33
+ * This source code is licensed under the MIT license found in the
34
+ * LICENSE file in the root directory of this source tree.
35
+ */
36
+ var Oe;
37
+ function fr() {
38
+ return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var V = Se, C = Symbol.for("react.element"), M = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), F = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), y = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), H = Symbol.iterator, Pe = "@@iterator";
40
+ function Ce(e) {
41
+ if (e === null || typeof e != "object")
42
+ return null;
43
+ var r = H && e[H] || e[Pe];
44
+ return typeof r == "function" ? r : null;
45
+ }
46
+ var O = V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function c(e) {
48
+ {
49
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
50
+ t[n - 1] = arguments[n];
51
+ we("error", e, t);
52
+ }
53
+ }
54
+ function we(e, r, t) {
55
+ {
56
+ var n = O.ReactDebugCurrentFrame, o = n.getStackAddendum();
57
+ o !== "" && (r += "%s", t = t.concat([o]));
58
+ var u = t.map(function(i) {
59
+ return String(i);
60
+ });
61
+ u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
62
+ }
63
+ }
64
+ var je = !1, xe = !1, ke = !1, De = !1, Fe = !1, Z;
65
+ Z = Symbol.for("react.module.reference");
66
+ function Ae(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === m || e === A || Fe || e === F || e === T || e === p || De || e === I || je || xe || ke || typeof e == "object" && e !== null && (e.$$typeof === b || e.$$typeof === _ || e.$$typeof === w || e.$$typeof === y || e.$$typeof === f || // This needs to include all possible module reference object
68
+ // types supported by any Flight configuration anywhere since
69
+ // we don't know which Flight build this will end up being used
70
+ // with.
71
+ e.$$typeof === Z || e.getModuleId !== void 0));
72
+ }
73
+ function Ie(e, r, t) {
74
+ var n = e.displayName;
75
+ if (n)
76
+ return n;
77
+ var o = r.displayName || r.name || "";
78
+ return o !== "" ? t + "(" + o + ")" : t;
79
+ }
80
+ function Q(e) {
81
+ return e.displayName || "Context";
82
+ }
83
+ function E(e) {
84
+ if (e == null)
85
+ return null;
86
+ if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
+ return e.displayName || e.name || null;
88
+ if (typeof e == "string")
89
+ return e;
90
+ switch (e) {
91
+ case m:
92
+ return "Fragment";
93
+ case M:
94
+ return "Portal";
95
+ case A:
96
+ return "Profiler";
97
+ case F:
98
+ return "StrictMode";
99
+ case T:
100
+ return "Suspense";
101
+ case p:
102
+ return "SuspenseList";
103
+ }
104
+ if (typeof e == "object")
105
+ switch (e.$$typeof) {
106
+ case y:
107
+ var r = e;
108
+ return Q(r) + ".Consumer";
109
+ case w:
110
+ var t = e;
111
+ return Q(t._context) + ".Provider";
112
+ case f:
113
+ return Ie(e, e.render, "ForwardRef");
114
+ case _:
115
+ var n = e.displayName || null;
116
+ return n !== null ? n : E(e.type) || "Memo";
117
+ case b: {
118
+ var o = e, u = o._payload, i = o._init;
119
+ try {
120
+ return E(i(u));
121
+ } catch {
122
+ return null;
123
+ }
124
+ }
125
+ }
126
+ return null;
127
+ }
128
+ var h = Object.assign, j = 0, ee, re, te, ne, ae, ie, oe;
129
+ function ue() {
130
+ }
131
+ ue.__reactDisabledLog = !0;
132
+ function We() {
133
+ {
134
+ if (j === 0) {
135
+ ee = console.log, re = console.info, te = console.warn, ne = console.error, ae = console.group, ie = console.groupCollapsed, oe = console.groupEnd;
136
+ var e = {
137
+ configurable: !0,
138
+ enumerable: !0,
139
+ value: ue,
140
+ writable: !0
141
+ };
142
+ Object.defineProperties(console, {
143
+ info: e,
144
+ log: e,
145
+ warn: e,
146
+ error: e,
147
+ group: e,
148
+ groupCollapsed: e,
149
+ groupEnd: e
150
+ });
151
+ }
152
+ j++;
153
+ }
154
+ }
155
+ function Ye() {
156
+ {
157
+ if (j--, j === 0) {
158
+ var e = {
159
+ configurable: !0,
160
+ enumerable: !0,
161
+ writable: !0
162
+ };
163
+ Object.defineProperties(console, {
164
+ log: h({}, e, {
165
+ value: ee
166
+ }),
167
+ info: h({}, e, {
168
+ value: re
169
+ }),
170
+ warn: h({}, e, {
171
+ value: te
172
+ }),
173
+ error: h({}, e, {
174
+ value: ne
175
+ }),
176
+ group: h({}, e, {
177
+ value: ae
178
+ }),
179
+ groupCollapsed: h({}, e, {
180
+ value: ie
181
+ }),
182
+ groupEnd: h({}, e, {
183
+ value: oe
184
+ })
185
+ });
186
+ }
187
+ j < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ }
189
+ }
190
+ var U = O.ReactCurrentDispatcher, N;
191
+ function W(e, r, t) {
192
+ {
193
+ if (N === void 0)
194
+ try {
195
+ throw Error();
196
+ } catch (o) {
197
+ var n = o.stack.trim().match(/\n( *(at )?)/);
198
+ N = n && n[1] || "";
199
+ }
200
+ return `
201
+ ` + N + e;
202
+ }
203
+ }
204
+ var B = !1, Y;
205
+ {
206
+ var $e = typeof WeakMap == "function" ? WeakMap : Map;
207
+ Y = new $e();
208
+ }
209
+ function se(e, r) {
210
+ if (!e || B)
211
+ return "";
212
+ {
213
+ var t = Y.get(e);
214
+ if (t !== void 0)
215
+ return t;
216
+ }
217
+ var n;
218
+ B = !0;
219
+ var o = Error.prepareStackTrace;
220
+ Error.prepareStackTrace = void 0;
221
+ var u;
222
+ u = U.current, U.current = null, We();
223
+ try {
224
+ if (r) {
225
+ var i = function() {
226
+ throw Error();
227
+ };
228
+ if (Object.defineProperty(i.prototype, "props", {
229
+ set: function() {
230
+ throw Error();
231
+ }
232
+ }), typeof Reflect == "object" && Reflect.construct) {
233
+ try {
234
+ Reflect.construct(i, []);
235
+ } catch (d) {
236
+ n = d;
237
+ }
238
+ Reflect.construct(e, [], i);
239
+ } else {
240
+ try {
241
+ i.call();
242
+ } catch (d) {
243
+ n = d;
244
+ }
245
+ e.call(i.prototype);
246
+ }
247
+ } else {
248
+ try {
249
+ throw Error();
250
+ } catch (d) {
251
+ n = d;
252
+ }
253
+ e();
254
+ }
255
+ } catch (d) {
256
+ if (d && n && typeof d.stack == "string") {
257
+ for (var a = d.stack.split(`
258
+ `), v = n.stack.split(`
259
+ `), s = a.length - 1, l = v.length - 1; s >= 1 && l >= 0 && a[s] !== v[l]; )
260
+ l--;
261
+ for (; s >= 1 && l >= 0; s--, l--)
262
+ if (a[s] !== v[l]) {
263
+ if (s !== 1 || l !== 1)
264
+ do
265
+ if (s--, l--, l < 0 || a[s] !== v[l]) {
266
+ var g = `
267
+ ` + a[s].replace(" at new ", " at ");
268
+ return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && Y.set(e, g), g;
269
+ }
270
+ while (s >= 1 && l >= 0);
271
+ break;
272
+ }
273
+ }
274
+ } finally {
275
+ B = !1, U.current = u, Ye(), Error.prepareStackTrace = o;
276
+ }
277
+ var P = e ? e.displayName || e.name : "", R = P ? W(P) : "";
278
+ return typeof e == "function" && Y.set(e, R), R;
279
+ }
280
+ function Le(e, r, t) {
281
+ return se(e, !1);
282
+ }
283
+ function Ve(e) {
284
+ var r = e.prototype;
285
+ return !!(r && r.isReactComponent);
286
+ }
287
+ function $(e, r, t) {
288
+ if (e == null)
289
+ return "";
290
+ if (typeof e == "function")
291
+ return se(e, Ve(e));
292
+ if (typeof e == "string")
293
+ return W(e);
294
+ switch (e) {
295
+ case T:
296
+ return W("Suspense");
297
+ case p:
298
+ return W("SuspenseList");
299
+ }
300
+ if (typeof e == "object")
301
+ switch (e.$$typeof) {
302
+ case f:
303
+ return Le(e.render);
304
+ case _:
305
+ return $(e.type, r, t);
306
+ case b: {
307
+ var n = e, o = n._payload, u = n._init;
308
+ try {
309
+ return $(u(o), r, t);
310
+ } catch {
311
+ }
312
+ }
313
+ }
314
+ return "";
315
+ }
316
+ var x = Object.prototype.hasOwnProperty, le = {}, fe = O.ReactDebugCurrentFrame;
317
+ function L(e) {
318
+ if (e) {
319
+ var r = e._owner, t = $(e.type, e._source, r ? r.type : null);
320
+ fe.setExtraStackFrame(t);
321
+ } else
322
+ fe.setExtraStackFrame(null);
323
+ }
324
+ function Me(e, r, t, n, o) {
325
+ {
326
+ var u = Function.call.bind(x);
327
+ for (var i in e)
328
+ if (u(e, i)) {
329
+ var a = void 0;
330
+ try {
331
+ if (typeof e[i] != "function") {
332
+ var v = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ throw v.name = "Invariant Violation", v;
334
+ }
335
+ a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
+ } catch (s) {
337
+ a = s;
338
+ }
339
+ a && !(a instanceof Error) && (L(o), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), L(null)), a instanceof Error && !(a.message in le) && (le[a.message] = !0, L(o), c("Failed %s type: %s", t, a.message), L(null));
340
+ }
341
+ }
342
+ }
343
+ var Ue = Array.isArray;
344
+ function J(e) {
345
+ return Ue(e);
346
+ }
347
+ function Ne(e) {
348
+ {
349
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
+ return t;
351
+ }
352
+ }
353
+ function Be(e) {
354
+ try {
355
+ return ce(e), !1;
356
+ } catch {
357
+ return !0;
358
+ }
359
+ }
360
+ function ce(e) {
361
+ return "" + e;
362
+ }
363
+ function ve(e) {
364
+ if (Be(e))
365
+ return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ne(e)), ce(e);
366
+ }
367
+ var de = O.ReactCurrentOwner, Je = {
368
+ key: !0,
369
+ ref: !0,
370
+ __self: !0,
371
+ __source: !0
372
+ }, pe, ge;
373
+ function Ke(e) {
374
+ if (x.call(e, "ref")) {
375
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
+ if (r && r.isReactWarning)
377
+ return !1;
378
+ }
379
+ return e.ref !== void 0;
380
+ }
381
+ function qe(e) {
382
+ if (x.call(e, "key")) {
383
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
+ if (r && r.isReactWarning)
385
+ return !1;
386
+ }
387
+ return e.key !== void 0;
388
+ }
389
+ function Ge(e, r) {
390
+ typeof e.ref == "string" && de.current;
391
+ }
392
+ function ze(e, r) {
393
+ {
394
+ var t = function() {
395
+ pe || (pe = !0, c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
396
+ };
397
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
+ get: t,
399
+ configurable: !0
400
+ });
401
+ }
402
+ }
403
+ function Xe(e, r) {
404
+ {
405
+ var t = function() {
406
+ ge || (ge = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
407
+ };
408
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
+ get: t,
410
+ configurable: !0
411
+ });
412
+ }
413
+ }
414
+ var He = function(e, r, t, n, o, u, i) {
415
+ var a = {
416
+ // This tag allows us to uniquely identify this as a React Element
417
+ $$typeof: C,
418
+ // Built-in properties that belong on the element
419
+ type: e,
420
+ key: r,
421
+ ref: t,
422
+ props: i,
423
+ // Record the component responsible for creating this element.
424
+ _owner: u
425
+ };
426
+ return a._store = {}, Object.defineProperty(a._store, "validated", {
427
+ configurable: !1,
428
+ enumerable: !1,
429
+ writable: !0,
430
+ value: !1
431
+ }), Object.defineProperty(a, "_self", {
432
+ configurable: !1,
433
+ enumerable: !1,
434
+ writable: !1,
435
+ value: n
436
+ }), Object.defineProperty(a, "_source", {
437
+ configurable: !1,
438
+ enumerable: !1,
439
+ writable: !1,
440
+ value: o
441
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
442
+ };
443
+ function Ze(e, r, t, n, o) {
444
+ {
445
+ var u, i = {}, a = null, v = null;
446
+ t !== void 0 && (ve(t), a = "" + t), qe(r) && (ve(r.key), a = "" + r.key), Ke(r) && (v = r.ref, Ge(r, o));
447
+ for (u in r)
448
+ x.call(r, u) && !Je.hasOwnProperty(u) && (i[u] = r[u]);
449
+ if (e && e.defaultProps) {
450
+ var s = e.defaultProps;
451
+ for (u in s)
452
+ i[u] === void 0 && (i[u] = s[u]);
453
+ }
454
+ if (a || v) {
455
+ var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
+ a && ze(i, l), v && Xe(i, l);
457
+ }
458
+ return He(e, a, v, o, n, de.current, i);
459
+ }
460
+ }
461
+ var K = O.ReactCurrentOwner, _e = O.ReactDebugCurrentFrame;
462
+ function S(e) {
463
+ if (e) {
464
+ var r = e._owner, t = $(e.type, e._source, r ? r.type : null);
465
+ _e.setExtraStackFrame(t);
466
+ } else
467
+ _e.setExtraStackFrame(null);
468
+ }
469
+ var q;
470
+ q = !1;
471
+ function G(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === C;
473
+ }
474
+ function Ee() {
475
+ {
476
+ if (K.current) {
477
+ var e = E(K.current.type);
478
+ if (e)
479
+ return `
480
+
481
+ Check the render method of \`` + e + "`.";
482
+ }
483
+ return "";
484
+ }
485
+ }
486
+ function Qe(e) {
487
+ return "";
488
+ }
489
+ var ye = {};
490
+ function er(e) {
491
+ {
492
+ var r = Ee();
493
+ if (!r) {
494
+ var t = typeof e == "string" ? e : e.displayName || e.name;
495
+ t && (r = `
496
+
497
+ Check the top-level render call using <` + t + ">.");
498
+ }
499
+ return r;
500
+ }
501
+ }
502
+ function be(e, r) {
503
+ {
504
+ if (!e._store || e._store.validated || e.key != null)
505
+ return;
506
+ e._store.validated = !0;
507
+ var t = er(r);
508
+ if (ye[t])
509
+ return;
510
+ ye[t] = !0;
511
+ var n = "";
512
+ e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + E(e._owner.type) + "."), S(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), S(null);
513
+ }
514
+ }
515
+ function he(e, r) {
516
+ {
517
+ if (typeof e != "object")
518
+ return;
519
+ if (J(e))
520
+ for (var t = 0; t < e.length; t++) {
521
+ var n = e[t];
522
+ G(n) && be(n, r);
523
+ }
524
+ else if (G(e))
525
+ e._store && (e._store.validated = !0);
526
+ else if (e) {
527
+ var o = Ce(e);
528
+ if (typeof o == "function" && o !== e.entries)
529
+ for (var u = o.call(e), i; !(i = u.next()).done; )
530
+ G(i.value) && be(i.value, r);
531
+ }
532
+ }
533
+ }
534
+ function rr(e) {
535
+ {
536
+ var r = e.type;
537
+ if (r == null || typeof r == "string")
538
+ return;
539
+ var t;
540
+ if (typeof r == "function")
541
+ t = r.propTypes;
542
+ else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
543
+ // Inner props are checked in the reconciler.
544
+ r.$$typeof === _))
545
+ t = r.propTypes;
546
+ else
547
+ return;
548
+ if (t) {
549
+ var n = E(r);
550
+ Me(t, e.props, "prop", n, e);
551
+ } else if (r.PropTypes !== void 0 && !q) {
552
+ q = !0;
553
+ var o = E(r);
554
+ c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
555
+ }
556
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
+ }
558
+ }
559
+ function tr(e) {
560
+ {
561
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
+ var n = r[t];
563
+ if (n !== "children" && n !== "key") {
564
+ S(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), S(null);
565
+ break;
566
+ }
567
+ }
568
+ e.ref !== null && (S(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), S(null));
569
+ }
570
+ }
571
+ var Re = {};
572
+ function me(e, r, t, n, o, u) {
573
+ {
574
+ var i = Ae(e);
575
+ if (!i) {
576
+ var a = "";
577
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
578
+ var v = Qe();
579
+ v ? a += v : a += Ee();
580
+ var s;
581
+ e === null ? s = "null" : J(e) ? s = "array" : e !== void 0 && e.$$typeof === C ? (s = "<" + (E(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
582
+ }
583
+ var l = Ze(e, r, t, o, u);
584
+ if (l == null)
585
+ return l;
586
+ if (i) {
587
+ var g = r.children;
588
+ if (g !== void 0)
589
+ if (n)
590
+ if (J(g)) {
591
+ for (var P = 0; P < g.length; P++)
592
+ he(g[P], e);
593
+ Object.freeze && Object.freeze(g);
594
+ } else
595
+ c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
+ else
597
+ he(g, e);
598
+ }
599
+ if (x.call(r, "key")) {
600
+ var R = E(e), d = Object.keys(r).filter(function(sr) {
601
+ return sr !== "key";
602
+ }), z = d.length > 0 ? "{key: someKey, " + d.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!Re[R + z]) {
604
+ var ur = d.length > 0 ? "{" + d.join(": ..., ") + ": ...}" : "{}";
605
+ c(`A props object containing a "key" prop is being spread into JSX:
606
+ let props = %s;
607
+ <%s {...props} />
608
+ React keys must be passed directly to JSX without using spread:
609
+ let props = %s;
610
+ <%s key={someKey} {...props} />`, z, R, ur, R), Re[R + z] = !0;
611
+ }
612
+ }
613
+ return e === m ? tr(l) : rr(l), l;
614
+ }
615
+ }
616
+ function nr(e, r, t) {
617
+ return me(e, r, t, !0);
618
+ }
619
+ function ar(e, r, t) {
620
+ return me(e, r, t, !1);
621
+ }
622
+ var ir = ar, or = nr;
623
+ D.Fragment = m, D.jsx = ir, D.jsxs = or;
624
+ }()), D;
625
+ }
626
+ process.env.NODE_ENV === "production" ? X.exports = lr() : X.exports = fr();
627
+ var vr = X.exports;
628
+ export {
629
+ vr as j
630
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";var At=a=>{throw TypeError(a)};var wt=(a,e,s)=>e.has(a)||At("Cannot "+s);var l=(a,e,s)=>(wt(a,e,"read from private field"),s?s.call(a):e.get(a)),F=(a,e,s)=>e.has(a)?At("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,s),v=(a,e,s,t)=>(wt(a,e,"write to private field"),t?t.call(a,s):e.set(a,s),s),L=(a,e,s)=>(wt(a,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),C=require("./useQuery-BScHEo7x.cjs"),M=require("./client-C15j4O5B.cjs"),se=require("./useFilter-D-bCDo6Z.cjs");function ae(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const t=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(e,s,t.get?t:{enumerable:!0,get:()=>a[s]})}}return e.default=a,Object.freeze(e)}const B=ae(h);function ie(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var X,G,H,Y,J,pt,Ot,Ht,ne=(Ht=class extends C.Subscribable{constructor(e,s){super();F(this,J);F(this,X);F(this,G);F(this,H);F(this,Y);v(this,X,e),this.setOptions(s),this.bindMethods(),L(this,J,pt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const s=this.options;this.options=l(this,X).defaultMutationOptions(e),C.shallowEqualObjects(this.options,s)||l(this,X).getMutationCache().notify({type:"observerOptionsUpdated",mutation:l(this,H),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&C.hashKey(s.mutationKey)!==C.hashKey(this.options.mutationKey)?this.reset():((t=l(this,H))==null?void 0:t.state.status)==="pending"&&l(this,H).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=l(this,H))==null||e.removeObserver(this)}onMutationUpdate(e){L(this,J,pt).call(this),L(this,J,Ot).call(this,e)}getCurrentResult(){return l(this,G)}reset(){var e;(e=l(this,H))==null||e.removeObserver(this),v(this,H,void 0),L(this,J,pt).call(this),L(this,J,Ot).call(this)}mutate(e,s){var t;return v(this,Y,s),(t=l(this,H))==null||t.removeObserver(this),v(this,H,l(this,X).getMutationCache().build(l(this,X),this.options)),l(this,H).addObserver(this),l(this,H).execute(e)}},X=new WeakMap,G=new WeakMap,H=new WeakMap,Y=new WeakMap,J=new WeakSet,pt=function(){var s;const e=((s=l(this,H))==null?void 0:s.state)??ie();v(this,G,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},Ot=function(e){C.notifyManager.batch(()=>{var s,t,i,d,p,m,Q,E;if(l(this,Y)&&this.hasListeners()){const w=l(this,G).variables,_=l(this,G).context,K={client:l(this,X),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(t=(s=l(this,Y)).onSuccess)==null||t.call(s,e.data,w,_,K)}catch(q){Promise.reject(q)}try{(d=(i=l(this,Y)).onSettled)==null||d.call(i,e.data,null,w,_,K)}catch(q){Promise.reject(q)}}else if((e==null?void 0:e.type)==="error"){try{(m=(p=l(this,Y)).onError)==null||m.call(p,e.error,w,_,K)}catch(q){Promise.reject(q)}try{(E=(Q=l(this,Y)).onSettled)==null||E.call(Q,void 0,e.error,w,_,K)}catch(q){Promise.reject(q)}}}this.listeners.forEach(w=>{w(l(this,G))})})},Ht);function Tt(a,e){const s=new Set(e);return a.filter(t=>!s.has(t))}function oe(a,e,s){const t=a.slice(0);return t[e]=s,t}var tt,j,at,it,I,W,ct,lt,dt,T,St,_t,kt,Qt,Et,jt,ue=(jt=class extends C.Subscribable{constructor(e,s,t){super();F(this,T);F(this,tt);F(this,j);F(this,at);F(this,it);F(this,I);F(this,W);F(this,ct);F(this,lt);F(this,dt,[]);v(this,tt,e),v(this,it,t),v(this,at,[]),v(this,I,[]),v(this,j,[]),this.setQueries(s)}onSubscribe(){this.listeners.size===1&&l(this,I).forEach(e=>{e.subscribe(s=>{L(this,T,Qt).call(this,e,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,l(this,I).forEach(e=>{e.destroy()})}setQueries(e,s){if(v(this,at,e),v(this,it,s),process.env.NODE_ENV!=="production"){const t=e.map(i=>l(this,tt).defaultQueryOptions(i).queryHash);new Set(t).size!==t.length&&console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.")}C.notifyManager.batch(()=>{const t=l(this,I),i=L(this,T,kt).call(this,l(this,at));i.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const d=i.map(_=>_.observer),p=d.map(_=>_.getCurrentResult()),m=t.length!==d.length,Q=d.some((_,K)=>_!==t[K]),E=m||Q,w=E?!0:p.some((_,K)=>{const q=l(this,j)[K];return!q||!C.shallowEqualObjects(_,q)});!E&&!w||(E&&(v(this,dt,i),v(this,I,d)),v(this,j,p),this.hasListeners()&&(E&&(Tt(t,d).forEach(_=>{_.destroy()}),Tt(d,t).forEach(_=>{_.subscribe(K=>{L(this,T,Qt).call(this,_,K)})})),L(this,T,Et).call(this)))})}getCurrentResult(){return l(this,j)}getQueries(){return l(this,I).map(e=>e.getCurrentQuery())}getObservers(){return l(this,I)}getOptimisticResult(e,s){const t=L(this,T,kt).call(this,e),i=t.map(d=>d.observer.getOptimisticResult(d.defaultedQueryOptions));return[i,d=>L(this,T,_t).call(this,d??i,s),()=>L(this,T,St).call(this,i,t)]}},tt=new WeakMap,j=new WeakMap,at=new WeakMap,it=new WeakMap,I=new WeakMap,W=new WeakMap,ct=new WeakMap,lt=new WeakMap,dt=new WeakMap,T=new WeakSet,St=function(e,s){return s.map((t,i)=>{const d=e[i];return t.defaultedQueryOptions.notifyOnChangeProps?d:t.observer.trackResult(d,p=>{s.forEach(m=>{m.observer.trackProp(p)})})})},_t=function(e,s){return s?((!l(this,W)||l(this,j)!==l(this,lt)||s!==l(this,ct))&&(v(this,ct,s),v(this,lt,l(this,j)),v(this,W,C.replaceEqualDeep(l(this,W),s(e)))),l(this,W)):e},kt=function(e){const s=new Map;l(this,I).forEach(i=>{const d=i.options.queryHash;if(!d)return;const p=s.get(d);p?p.push(i):s.set(d,[i])});const t=[];return e.forEach(i=>{var Q;const d=l(this,tt).defaultQueryOptions(i),m=((Q=s.get(d.queryHash))==null?void 0:Q.shift())??new C.QueryObserver(l(this,tt),d);t.push({defaultedQueryOptions:d,observer:m})}),t},Qt=function(e,s){const t=l(this,I).indexOf(e);t!==-1&&(v(this,j,oe(l(this,j),t,s)),L(this,T,Et).call(this))},Et=function(){var e;if(this.hasListeners()){const s=l(this,W),t=L(this,T,St).call(this,l(this,j),l(this,dt)),i=L(this,T,_t).call(this,t,(e=l(this,it))==null?void 0:e.combine);s!==i&&C.notifyManager.batch(()=>{this.listeners.forEach(d=>{d(l(this,j))})})}},jt);function ce({queries:a,...e},s){const t=C.useQueryClient(),i=C.useIsRestoring(),d=C.useQueryErrorResetBoundary(),p=B.useMemo(()=>a.map(f=>{const P=t.defaultQueryOptions(f);return P._optimisticResults=i?"isRestoring":"optimistic",P}),[a,t,i]);p.forEach(f=>{C.ensureSuspenseTimers(f);const P=t.getQueryCache().get(f.queryHash);C.ensurePreventErrorBoundaryRetry(f,d,P)}),C.useClearResetErrorBoundary(d);const[m]=B.useState(()=>new ue(t,p,e)),[Q,E,w]=m.getOptimisticResult(p,e.combine),_=!i&&e.subscribed!==!1;B.useSyncExternalStore(B.useCallback(f=>_?m.subscribe(C.notifyManager.batchCalls(f)):C.noop,[m,_]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),B.useEffect(()=>{m.setQueries(p,e)},[p,e,m]);const q=Q.some((f,P)=>C.shouldSuspend(p[P],f))?Q.flatMap((f,P)=>{const R=p[P];if(R){const N=new C.QueryObserver(t,R);if(C.shouldSuspend(R,f))return C.fetchOptimistic(R,N,d);C.willFetch(f,i)&&C.fetchOptimistic(R,N,d)}return[]}):[];if(q.length>0)throw Promise.all(q);const V=Q.find((f,P)=>{const R=p[P];return R&&C.getHasError({result:f,errorResetBoundary:d,throwOnError:R.throwOnError,query:t.getQueryCache().get(R.queryHash),suspense:R.suspense})});if(V!=null&&V.error)throw V.error;return E(w())}function ut(a,e){const s=C.useQueryClient(),[t]=B.useState(()=>new ne(s,a));B.useEffect(()=>{t.setOptions(a)},[t,a]);const i=B.useSyncExternalStore(B.useCallback(p=>t.subscribe(C.notifyManager.batchCalls(p)),[t]),()=>t.getCurrentResult(),()=>t.getCurrentResult()),d=B.useCallback((p,m)=>{t.mutate(p,m).catch(C.noop)},[t]);if(i.error&&C.shouldThrowError(t.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:d,mutateAsync:i.mutate}}const Ft=50,Lt=5,$t=5;function It({onCardMove:a,onError:e,columns:s,announceMove:t}){const[i,d]=h.useState({isDragging:!1,draggedCard:null,dragOverColumn:null,dragOverPosition:null,dragSourceColumn:null}),p=h.useRef(null),m=h.useRef(null),Q=h.useRef(null),E=h.useCallback(()=>{d({isDragging:!1,draggedCard:null,dragOverColumn:null,dragOverPosition:null,dragSourceColumn:null}),m.current&&(clearTimeout(m.current),m.current=null)},[]),w=h.useCallback(g=>s.find(c=>c._id===g)||null,[s]),_=h.useCallback(g=>{for(const c of s){const b=c.cards.find(O=>O._id===g);if(b)return{card:b,column:c}}return null},[s]),K=h.useCallback((g,c)=>{var b,O;try{const y=g.target,D=w(c.columnId);if(!D)throw new Error("Source column not found");(b=g.dataTransfer)==null||b.setData("text/plain",c._id),(O=g.dataTransfer)==null||O.setData("application/json",JSON.stringify(c));const $=y.cloneNode(!0);$.style.cssText=`
2
+ position: fixed;
3
+ top: -1000px;
4
+ left: -1000px;
5
+ opacity: 0.9;
6
+ transform: rotate(-2deg) scale(0.95);
7
+ box-shadow: 0 10px 25px rgba(0,0,0,0.2);
8
+ pointer-events: none;
9
+ z-index: 9999;
10
+ max-width: 300px;
11
+ background: white;
12
+ border-radius: 8px;
13
+ `,document.body.appendChild($),p.current=$,g.dataTransfer&&g.dataTransfer.setDragImage($,g.offsetX||50,g.offsetY||20),d({isDragging:!0,draggedCard:c,dragOverColumn:null,dragOverPosition:null,dragSourceColumn:D._id}),t==null||t(c,D.title,"being moved")}catch(y){e==null||e(y instanceof Error?y:new Error("Drag start failed")),E()}},[w,e,E,t]),q=h.useCallback((g,c)=>{if(g.preventDefault(),!i.isDragging||!i.draggedCard)return;const b=c?w(c):null;d(O=>({...O,dragOverColumn:(b==null?void 0:b._id)||null,dragOverPosition:null})),P(g)},[i.isDragging,i.draggedCard,w]),V=h.useCallback((g,c)=>{if(g.preventDefault(),!(!i.isDragging||!i.draggedCard))try{const b=i.draggedCard,O=i.dragSourceColumn,y=w(c),D=w(O);if(!y||!D)throw new Error("Target or source column not found");if(O===c){E();return}if(y.limit&&y.cards.length>=y.limit)throw new Error(`Column "${y.title}" has reached its limit of ${y.limit} cards`);a==null||a(b,O,c),t==null||t(b,D.title,y.title)}catch(b){e==null||e(b instanceof Error?b:new Error("Drop failed"))}finally{E()}},[i,w,a,e,E,t]),f=h.useCallback(()=>{p.current&&(document.body.removeChild(p.current),p.current=null),E()},[E]),P=h.useCallback(g=>{const c=g.target.closest(".kanban-container");if(!c)return;const b=c.getBoundingClientRect(),O=g.clientX-b.left,y=b.width;let D=0;if(O<Ft?D=-Lt:O>y-Ft&&(D=Lt),D!==0){m.current&&clearTimeout(m.current);const $=()=>{c.scrollLeft+=D,m.current=setTimeout($,16)};m.current=setTimeout($,100)}else m.current&&(clearTimeout(m.current),m.current=null)},[]),R=h.useCallback((g,c)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter","Space","Escape"].includes(g.key))return;g.preventDefault();const b=_(c._id);if(!b)return;const{column:O}=b,y=s.findIndex(D=>D._id===O._id);try{switch(g.key){case"ArrowLeft":if(y>0){const D=s[y-1];a==null||a(c,O._id,D._id),t==null||t(c,O.title,D.title)}break;case"ArrowRight":if(y<s.length-1){const D=s[y+1];a==null||a(c,O._id,D._id),t==null||t(c,O.title,D.title)}break;case"ArrowUp":t==null||t(c,"current position","position above");break;case"ArrowDown":t==null||t(c,"current position","position below");break;case"Enter":case"Space":t==null||t(c,O.title,"drag mode");break;case"Escape":t==null||t(c,"drag mode","cancelled");break}}catch(D){e==null||e(D instanceof Error?D:new Error("Keyboard navigation failed"))}},[_,s,a,e,t]),N=h.useCallback((g,c)=>{const b=g.touches[0];Q.current={x:b.clientX,y:b.clientY,card:c}},[]),et=h.useCallback(g=>{if(!Q.current)return;const c=g.touches[0],b=Math.abs(c.clientX-Q.current.x),O=Math.abs(c.clientY-Q.current.y);if(b>$t||O>$t){const y=Q.current.card,D=w(y.columnId);if(!D)return;d({isDragging:!0,draggedCard:y,dragOverColumn:null,dragOverPosition:null,dragSourceColumn:D._id}),t==null||t(y,D.title,"being moved")}},[w,t]),k=h.useCallback(g=>{if(!i.isDragging||!i.draggedCard||!Q.current){Q.current=null;return}try{const c=g.changedTouches[0],b=document.elementFromPoint(c.clientX,c.clientY),O=b==null?void 0:b.closest("[data-column-id]");if(O){const y=O.dataset.columnId,D=i.draggedCard,$=i.dragSourceColumn,U=w(y),ht=w($);if(U&&ht&&$!==y){if(U.limit&&U.cards.length>=U.limit)throw new Error(`Column "${U.title}" has reached its limit of ${U.limit} cards`);a==null||a(D,$,y),t==null||t(D,ht.title,U.title)}}}catch(c){e==null||e(c instanceof Error?c:new Error("Touch drop failed"))}finally{Q.current=null,E()}},[i,w,a,e,E,t]),x=h.useCallback((g,c,b)=>{const O=`Moved "${g.title}" from ${c} to ${b}`,y=document.createElement("div");y.setAttribute("aria-live","polite"),y.setAttribute("aria-atomic","true"),y.className="sr-only",y.textContent=O,document.body.appendChild(y),setTimeout(()=>{document.body.removeChild(y)},1e3),console.log(`Kanban: ${O}`)},[]);return h.useEffect(()=>()=>{m.current&&clearTimeout(m.current),p.current&&document.body.contains(p.current)&&document.body.removeChild(p.current)},[]),{isDragging:i.isDragging,draggedCard:i.draggedCard,dragOverColumn:i.dragOverColumn,dragOverPosition:i.dragOverPosition,dragSourceColumn:i.dragSourceColumn,handleDragStart:K,handleDragOver:q,handleDrop:V,handleDragEnd:f,handleKeyDown:R,handleTouchStart:N,handleTouchMove:et,handleTouchEnd:k,announceMove:t||x,reset:E}}function le(a){var Kt,qt,Pt;const{columns:e,source:s,enableDragDrop:t=!0,initialState:i,onCardMove:d,onCardCreate:p,onCardUpdate:m,onCardDelete:Q,onError:E}=a,[w,_]=h.useState({query:(i==null?void 0:i.search)||""}),[K]=h.useState({field:((Kt=i==null?void 0:i.sorting)==null?void 0:Kt.field)||null,direction:((qt=i==null?void 0:i.sorting)==null?void 0:qt.direction)||null}),[q,V]=h.useState(()=>{const r={};return e.forEach(o=>{r[o.id]=10}),r}),f=h.useRef(E),P=h.useRef(d),R=h.useRef(p),N=h.useRef(m),et=h.useRef(Q);h.useEffect(()=>{f.current=E,P.current=d,R.current=p,N.current=m,et.current=Q},[E,d,p,m,Q]);const k=C.useQueryClient(),x=se.useFilter({initialConditions:i==null?void 0:i.filters,initialOperator:(i==null?void 0:i.filterOperator)||"And"}),g=h.useCallback(r=>{const o={LHSField:"columnId",Operator:"EQ",RHSValue:r,RHSType:"Constant"},n=x.payload;let u;n?n.Operator==="And"?u={...n,Condition:[...n.Condition||[],o]}:u={Operator:"And",Condition:[n,o]}:u={Operator:"And",Condition:[o]};const S={Page:1,PageSize:q[r]||10,Filter:u};return K.field&&K.direction?S.Sort=[{[String(K.field)]:K.direction==="asc"?"ASC":"DESC"},{position:"ASC"}]:S.Sort=[{columnId:"ASC"},{position:"ASC"}],w.query&&(S.Search=w.query),S},[x.payload,q,K,w.query]),c=ce({queries:e.map(r=>{const o=g(r.id);return{queryKey:["kanban-cards",s,r.id,o],queryFn:async()=>{try{return await M.api(s).list(o)}catch(n){throw n}},placeholderData:C.keepPreviousData,staleTime:30*1e3}})}),b=c.some(r=>r.isLoading),O=c.some(r=>r.isFetching),y=((Pt=c.find(r=>r.error))==null?void 0:Pt.error)||null,D=async()=>{await Promise.all(c.map(r=>r.refetch()))},$=h.useMemo(()=>{const r={};return w.query&&(r.Search=w.query),x.payload&&(r.Filter=x.payload),r},[w.query,x.payload]),{data:U,isLoading:ht,error:zt}=C.useQuery({queryKey:["kanban-count",s,$],queryFn:async()=>{try{return await M.api(s).count($)}catch(r){throw f.current&&f.current(r),r}},staleTime:30*1e3,gcTime:60*1e3}),vt=ut({mutationFn:async r=>{const o=r.position??999999;return(await M.api(s).create({...r,position:o}))._id},onMutate:async r=>{const o=r.columnId,n=g(o),u=["kanban-cards",s,o,n];await k.cancelQueries({queryKey:u});const S=k.getQueryData(u);if(S){const rt=S.Data,z=r.position??rt.length,st=`temp-${Date.now()}`,Z={...r,_id:st,position:z,_created_at:new Date,_modified_at:new Date};k.setQueryData(u,{...S,Data:[...S.Data,Z]})}return{previousCards:S,queryKey:u}},onSuccess:async(r,o,n)=>{var u;n!=null&&n.queryKey&&await k.invalidateQueries({queryKey:n.queryKey}),(u=R.current)==null||u.call(R,{_id:r,...o})},onError:(r,o,n)=>{var u;n!=null&&n.previousCards&&(n!=null&&n.queryKey)&&k.setQueryData(n.queryKey,n.previousCards),(u=f.current)==null||u.call(f,r)},onSettled:(r,o,n)=>{const u=n.columnId,S=g(u);k.invalidateQueries({queryKey:["kanban-cards",s,u,S]})}}),yt=ut({mutationFn:async({id:r,updates:o})=>(await M.api(s).update(r,o),{id:r,updates:o}),onMutate:async()=>(await k.cancelQueries({queryKey:["kanban-cards",s]}),{}),onSuccess:async r=>{var o;(o=N.current)==null||o.call(N,{_id:r.id,...r.updates})},onError:(r,o,n)=>{var u;(u=f.current)==null||u.call(f,r)},onSettled:()=>{k.invalidateQueries({queryKey:["kanban-cards",s]})}}),mt=ut({mutationFn:async r=>(await M.api(s).delete(r),r),onMutate:async()=>(await k.cancelQueries({queryKey:["kanban-cards",s]}),{}),onSuccess:async r=>{var o;(o=et.current)==null||o.call(et,r)},onError:(r,o,n)=>{var u;(u=f.current)==null||u.call(f,r)},onSettled:()=>{k.invalidateQueries({queryKey:["kanban-cards",s]})}}),nt=ut({mutationFn:async({cardId:r,fromColumnId:o,toColumnId:n,position:u})=>{const S={columnId:n,...u!==void 0&&{position:u}};return await M.api(s).update(r,S),{cardId:r,fromColumnId:o,toColumnId:n,position:u}},onMutate:async({cardId:r,fromColumnId:o,toColumnId:n,position:u})=>{const S=g(o),rt=g(n),z=["kanban-cards",s,o,S],st=["kanban-cards",s,n,rt];await k.cancelQueries({queryKey:z}),await k.cancelQueries({queryKey:st});const Z=k.getQueryData(z),ot=k.getQueryData(st);if(Z&&ot){const Rt=Z.Data.find(Ct=>Ct._id===r);if(Rt){const Ct={...Z,Data:Z.Data.filter(Dt=>Dt._id!==r)},te={...Rt,columnId:n,position:u??ot.Data.length,_modified_at:new Date},ee={...ot,Data:[...ot.Data,te].sort((Dt,re)=>Dt.position-re.position)};k.setQueryData(z,Ct),k.setQueryData(st,ee)}}return{previousFromData:Z,previousToData:ot,fromQueryKey:z,toQueryKey:st,fromColumnId:o,toColumnId:n}},onSuccess:async r=>{var o;(o=P.current)==null||o.call(P,{_id:r.cardId},r.fromColumnId,r.toColumnId)},onError:(r,o,n)=>{var u;n!=null&&n.previousFromData&&(n!=null&&n.fromQueryKey)&&k.setQueryData(n.fromQueryKey,n.previousFromData),n!=null&&n.previousToData&&(n!=null&&n.toQueryKey)&&k.setQueryData(n.toQueryKey,n.previousToData),(u=f.current)==null||u.call(f,r)},onSettled:(r,o,n)=>{const u=g(n.fromColumnId),S=g(n.toColumnId);k.invalidateQueries({queryKey:["kanban-cards",s,n.fromColumnId,u]}),k.invalidateQueries({queryKey:["kanban-cards",s,n.toColumnId,S]})}}),bt=ut({mutationFn:async({cardIds:r,columnId:o})=>{const n=r.map((u,S)=>({id:u,position:S,columnId:o}));await Promise.all(n.map(u=>M.api(s).update(u.id,{position:u.position,columnId:u.columnId})))},onMutate:async({columnId:r})=>{const o=g(r),n=["kanban-cards",s,r,o];return await k.cancelQueries({queryKey:n}),{}},onSuccess:()=>{},onError:(r,o,n)=>{var u;(u=f.current)==null||u.call(f,r)},onSettled:(r,o,n)=>{const u=g(n.columnId);k.invalidateQueries({queryKey:["kanban-cards",s,n.columnId,u]})}}),Bt=h.useCallback(async(r,o,n)=>{try{await nt.mutateAsync({cardId:r._id,fromColumnId:o,toColumnId:n,position:void 0})}catch{}},[nt]),gt=h.useMemo(()=>e.sort((r,o)=>r.position-o.position).map((r,o)=>{var S;const u=((S=c[o].data)==null?void 0:S.Data)||[];return{_id:r.id,title:r.title,position:r.position,color:r.color,limit:r.limit,cards:u.sort((rt,z)=>rt.position-z.position),_created_at:new Date,_modified_at:new Date}}),[e,c]),A=It({onCardMove:Bt,onError:f.current,columns:gt,announceMove:(r,o,n)=>{console.log(`Kanban: Moved "${r.title}" from ${o} to ${n}`)}}),Nt=h.useCallback(r=>{var o,n;return{draggable:!0,role:"option","aria-selected":t&&((o=A.draggedCard)==null?void 0:o._id)===r._id,"aria-grabbed":t&&((n=A.draggedCard)==null?void 0:n._id)===r._id,onDragStart:u=>{if(!t)return;u.dataTransfer.setData("text/plain",JSON.stringify(r));const S=u.nativeEvent||u;A.handleDragStart(S,r)},onDragEnd:A.handleDragEnd,onKeyDown:u=>{if(!t)return;const S=u.nativeEvent||u;A.handleKeyDown(S,r)}}},[t,A]),Xt=h.useCallback(r=>({"data-column-id":r,role:"listbox",onDragOver:o=>{if(!t)return;const n=o.nativeEvent||o;A.handleDragOver(n,r)},onDrop:o=>{if(!t)return;const n=o.nativeEvent||o;A.handleDrop(n,r)}}),[t,A]),Yt=h.useCallback(r=>{_({query:r})},[]),Jt=h.useCallback(()=>{_({query:""})},[]),Vt=(U==null?void 0:U.Count)||0,xt=b||ht,Gt=O,Wt=vt.isPending||yt.isPending||mt.isPending||nt.isPending||bt.isPending,ft=y||zt,Zt=h.useCallback(async()=>{await D()},[D]),Mt=h.useCallback(async()=>{await k.invalidateQueries({predicate:r=>r.queryKey[0]==="kanban-cards"||r.queryKey[0]==="kanban-count"})},[k]);return h.useEffect(()=>{ft&&f.current&&f.current(ft)},[ft]),{columns:gt,totalCards:Vt,isLoading:xt,isFetching:Gt,isUpdating:Wt,error:ft,createCard:vt.mutateAsync,updateCard:h.useCallback(async(r,o)=>{await yt.mutateAsync({id:r,updates:o})},[yt]),deleteCard:h.useCallback(async r=>{await mt.mutateAsync(r)},[mt]),moveCard:h.useCallback(async(r,o,n,u)=>{if(!u){for(const S of gt)if(S.cards.find(z=>z._id===r)){u=S._id;break}if(!u)throw new Error(`Card ${r} not found in any column`)}await nt.mutateAsync({cardId:r,fromColumnId:u,toColumnId:o,position:n})},[nt,gt]),reorderCards:h.useCallback(async(r,o)=>{await bt.mutateAsync({cardIds:r,columnId:o})},[bt]),searchQuery:w.query,setSearchQuery:Yt,clearSearch:Jt,filter:x,isDragging:t?A.isDragging:!1,draggedCard:t?A.draggedCard:null,dragOverColumn:t?A.dragOverColumn:null,handleDragStart:t?A.handleDragStart:()=>{},handleDragOver:t?A.handleDragOver:()=>{},handleDrop:t?A.handleDrop:()=>{},handleDragEnd:t?A.handleDragEnd:()=>{},handleKeyDown:t?A.handleKeyDown:()=>{},getCardProps:t?Nt:r=>({}),getColumnProps:t?Xt:r=>({}),loadMore:h.useCallback(r=>{V(o=>({...o,[r]:(o[r]||10)+10}))},[]),refetch:Zt,refresh:Mt}}const Ut=h.createContext(null);function de(){const a=h.useContext(Ut);if(!a)throw new Error("Kanban components must be used within a KanbanBoard component");return a}function he(a,e){const s=e.reduce((t,i)=>(t[i.columnId]||(t[i.columnId]=[]),t[i.columnId].push(i),t),{});return a.map(t=>({...t,cards:(s[t._id]||[]).sort((i,d)=>i.position-d.position)}))}function ge(a,e){if(a.cards.length===0)return 0;if(e===void 0||e>=a.cards.length)return a.cards[a.cards.length-1].position+1;if(e===0){const i=a.cards[0];return Math.max(0,i.position-1)}const s=a.cards[e-1],t=a.cards[e];return Math.floor((s.position+t.position)/2)}function fe(a,e){if(a.length===0)return 0;if(e===void 0||e>=a.length)return a[a.length-1].position+1;if(e===0){const i=a[0];return Math.max(0,i.position-1)}const s=a[e-1],t=a[e];return Math.floor((s.position+t.position)/2)}function pe(a){return a.sort((e,s)=>e.position-s.position).map((e,s)=>({...e,position:s}))}function ye(a,e,s,t){const i=`Failed to ${e} ${s}`,d=t?` (ID: ${t})`:"";return a instanceof Error?new Error(`${i}${d}: ${a.message}`):new Error(`${i}${d}: Unknown error`)}function me(a,e){switch(e){case"list":return a&&Array.isArray(a.Data);case"single":return a&&typeof a=="object";case"create":return a&&typeof a._id=="string";case"delete":return a&&a.status==="success";default:return!1}}exports.KanbanContext=Ut;exports.calculateCardPosition=ge;exports.calculateColumnPosition=fe;exports.handleKanbanApiError=ye;exports.mergeCardsIntoColumns=he;exports.normalizePositions=pe;exports.useDragDropManager=It;exports.useKanban=le;exports.useKanbanContext=de;exports.validateApiResponse=me;