@keenmate/web-multiselect 1.0.0-rc04 → 1.0.0-rc06

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.
@@ -1,78 +1,78 @@
1
- var Ue = Object.defineProperty;
2
- var Ye = (i, e, t) => e in i ? Ue(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var h = (i, e, t) => Ye(i, typeof e != "symbol" ? e + "" : e, t);
4
- const te = Math.min, z = Math.max, ie = Math.round, J = Math.floor, O = (i) => ({
1
+ var at = Object.defineProperty;
2
+ var ct = (i, e, t) => e in i ? at(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var u = (i, e, t) => ct(i, typeof e != "symbol" ? e + "" : e, t);
4
+ const ae = Math.min, H = Math.max, ce = Math.round, oe = Math.floor, E = (i) => ({
5
5
  x: i,
6
6
  y: i
7
- }), Xe = {
7
+ }), dt = {
8
8
  left: "right",
9
9
  right: "left",
10
10
  bottom: "top",
11
11
  top: "bottom"
12
- }, Je = {
12
+ }, pt = {
13
13
  start: "end",
14
14
  end: "start"
15
15
  };
16
- function ke(i, e, t) {
17
- return z(i, te(e, t));
16
+ function $e(i, e, t) {
17
+ return H(i, ae(e, t));
18
18
  }
19
- function se(i, e) {
19
+ function he(i, e) {
20
20
  return typeof i == "function" ? i(e) : i;
21
21
  }
22
- function R(i) {
22
+ function W(i) {
23
23
  return i.split("-")[0];
24
24
  }
25
- function ne(i) {
25
+ function ue(i) {
26
26
  return i.split("-")[1];
27
27
  }
28
- function Ee(i) {
28
+ function We(i) {
29
29
  return i === "x" ? "y" : "x";
30
30
  }
31
- function Ve(i) {
31
+ function je(i) {
32
32
  return i === "y" ? "height" : "width";
33
33
  }
34
- const qe = /* @__PURE__ */ new Set(["top", "bottom"]);
35
- function V(i) {
36
- return qe.has(R(i)) ? "y" : "x";
34
+ const mt = /* @__PURE__ */ new Set(["top", "bottom"]);
35
+ function D(i) {
36
+ return mt.has(W(i)) ? "y" : "x";
37
37
  }
38
- function De(i) {
39
- return Ee(V(i));
38
+ function Ge(i) {
39
+ return We(D(i));
40
40
  }
41
- function Ze(i, e, t) {
41
+ function ht(i, e, t) {
42
42
  t === void 0 && (t = !1);
43
- const l = ne(i), o = De(i), s = Ve(o);
44
- let n = o === "x" ? l === (t ? "end" : "start") ? "right" : "left" : l === "start" ? "bottom" : "top";
45
- return e.reference[s] > e.floating[s] && (n = le(n)), [n, le(n)];
43
+ const o = ue(i), l = Ge(i), s = je(l);
44
+ let n = l === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
45
+ return e.reference[s] > e.floating[s] && (n = de(n)), [n, de(n)];
46
46
  }
47
- function Qe(i) {
48
- const e = le(i);
49
- return [fe(i), e, fe(e)];
47
+ function ut(i) {
48
+ const e = de(i);
49
+ return [Ce(i), e, Ce(e)];
50
50
  }
51
- function fe(i) {
52
- return i.replace(/start|end/g, (e) => Je[e]);
51
+ function Ce(i) {
52
+ return i.replace(/start|end/g, (e) => pt[e]);
53
53
  }
54
- const Ae = ["left", "right"], Pe = ["right", "left"], et = ["top", "bottom"], tt = ["bottom", "top"];
55
- function it(i, e, t) {
54
+ const Ve = ["left", "right"], De = ["right", "left"], ft = ["top", "bottom"], gt = ["bottom", "top"];
55
+ function bt(i, e, t) {
56
56
  switch (i) {
57
57
  case "top":
58
58
  case "bottom":
59
- return t ? e ? Pe : Ae : e ? Ae : Pe;
59
+ return t ? e ? De : Ve : e ? Ve : De;
60
60
  case "left":
61
61
  case "right":
62
- return e ? et : tt;
62
+ return e ? ft : gt;
63
63
  default:
64
64
  return [];
65
65
  }
66
66
  }
67
- function lt(i, e, t, l) {
68
- const o = ne(i);
69
- let s = it(R(i), t === "start", l);
70
- return o && (s = s.map((n) => n + "-" + o), e && (s = s.concat(s.map(fe)))), s;
67
+ function vt(i, e, t, o) {
68
+ const l = ue(i);
69
+ let s = bt(W(i), t === "start", o);
70
+ return l && (s = s.map((n) => n + "-" + l), e && (s = s.concat(s.map(Ce)))), s;
71
71
  }
72
- function le(i) {
73
- return i.replace(/left|right|bottom|top/g, (e) => Xe[e]);
72
+ function de(i) {
73
+ return i.replace(/left|right|bottom|top/g, (e) => dt[e]);
74
74
  }
75
- function ot(i) {
75
+ function wt(i) {
76
76
  return {
77
77
  top: 0,
78
78
  right: 0,
@@ -81,278 +81,278 @@ function ot(i) {
81
81
  ...i
82
82
  };
83
83
  }
84
- function st(i) {
85
- return typeof i != "number" ? ot(i) : {
84
+ function yt(i) {
85
+ return typeof i != "number" ? wt(i) : {
86
86
  top: i,
87
87
  right: i,
88
88
  bottom: i,
89
89
  left: i
90
90
  };
91
91
  }
92
- function oe(i) {
92
+ function pe(i) {
93
93
  const {
94
94
  x: e,
95
95
  y: t,
96
- width: l,
97
- height: o
96
+ width: o,
97
+ height: l
98
98
  } = i;
99
99
  return {
100
- width: l,
101
- height: o,
100
+ width: o,
101
+ height: l,
102
102
  top: t,
103
103
  left: e,
104
- right: e + l,
105
- bottom: t + o,
104
+ right: e + o,
105
+ bottom: t + l,
106
106
  x: e,
107
107
  y: t
108
108
  };
109
109
  }
110
- function Se(i, e, t) {
110
+ function ze(i, e, t) {
111
111
  let {
112
- reference: l,
113
- floating: o
112
+ reference: o,
113
+ floating: l
114
114
  } = i;
115
- const s = V(e), n = De(e), r = Ve(n), a = R(e), c = s === "y", p = l.x + l.width / 2 - o.width / 2, d = l.y + l.height / 2 - o.height / 2, m = l[r] / 2 - o[r] / 2;
116
- let u;
115
+ const s = D(e), n = Ge(e), r = je(n), a = W(e), p = s === "y", c = o.x + o.width / 2 - l.width / 2, d = o.y + o.height / 2 - l.height / 2, m = o[r] / 2 - l[r] / 2;
116
+ let h;
117
117
  switch (a) {
118
118
  case "top":
119
- u = {
120
- x: p,
121
- y: l.y - o.height
119
+ h = {
120
+ x: c,
121
+ y: o.y - l.height
122
122
  };
123
123
  break;
124
124
  case "bottom":
125
- u = {
126
- x: p,
127
- y: l.y + l.height
125
+ h = {
126
+ x: c,
127
+ y: o.y + o.height
128
128
  };
129
129
  break;
130
130
  case "right":
131
- u = {
132
- x: l.x + l.width,
131
+ h = {
132
+ x: o.x + o.width,
133
133
  y: d
134
134
  };
135
135
  break;
136
136
  case "left":
137
- u = {
138
- x: l.x - o.width,
137
+ h = {
138
+ x: o.x - l.width,
139
139
  y: d
140
140
  };
141
141
  break;
142
142
  default:
143
- u = {
144
- x: l.x,
145
- y: l.y
143
+ h = {
144
+ x: o.x,
145
+ y: o.y
146
146
  };
147
147
  }
148
- switch (ne(e)) {
148
+ switch (ue(e)) {
149
149
  case "start":
150
- u[n] -= m * (t && c ? -1 : 1);
150
+ h[n] -= m * (t && p ? -1 : 1);
151
151
  break;
152
152
  case "end":
153
- u[n] += m * (t && c ? -1 : 1);
153
+ h[n] += m * (t && p ? -1 : 1);
154
154
  break;
155
155
  }
156
- return u;
156
+ return h;
157
157
  }
158
- const nt = async (i, e, t) => {
158
+ const _t = async (i, e, t) => {
159
159
  const {
160
- placement: l = "bottom",
161
- strategy: o = "absolute",
160
+ placement: o = "bottom",
161
+ strategy: l = "absolute",
162
162
  middleware: s = [],
163
163
  platform: n
164
164
  } = t, r = s.filter(Boolean), a = await (n.isRTL == null ? void 0 : n.isRTL(e));
165
- let c = await n.getElementRects({
165
+ let p = await n.getElementRects({
166
166
  reference: i,
167
167
  floating: e,
168
- strategy: o
168
+ strategy: l
169
169
  }), {
170
- x: p,
170
+ x: c,
171
171
  y: d
172
- } = Se(c, l, a), m = l, u = {}, g = 0;
173
- for (let v = 0; v < r.length; v++) {
172
+ } = ze(p, o, a), m = o, h = {}, f = 0;
173
+ for (let w = 0; w < r.length; w++) {
174
174
  const {
175
- name: w,
175
+ name: g,
176
176
  fn: b
177
- } = r[v], {
178
- x: _,
179
- y,
180
- data: C,
181
- reset: x
177
+ } = r[w], {
178
+ x: y,
179
+ y: x,
180
+ data: k,
181
+ reset: C
182
182
  } = await b({
183
- x: p,
183
+ x: c,
184
184
  y: d,
185
- initialPlacement: l,
185
+ initialPlacement: o,
186
186
  placement: m,
187
- strategy: o,
188
- middlewareData: u,
189
- rects: c,
187
+ strategy: l,
188
+ middlewareData: h,
189
+ rects: p,
190
190
  platform: n,
191
191
  elements: {
192
192
  reference: i,
193
193
  floating: e
194
194
  }
195
195
  });
196
- p = _ ?? p, d = y ?? d, u = {
197
- ...u,
198
- [w]: {
199
- ...u[w],
200
- ...C
196
+ c = y ?? c, d = x ?? d, h = {
197
+ ...h,
198
+ [g]: {
199
+ ...h[g],
200
+ ...k
201
201
  }
202
- }, x && g <= 50 && (g++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (c = x.rects === !0 ? await n.getElementRects({
202
+ }, C && f <= 50 && (f++, typeof C == "object" && (C.placement && (m = C.placement), C.rects && (p = C.rects === !0 ? await n.getElementRects({
203
203
  reference: i,
204
204
  floating: e,
205
- strategy: o
206
- }) : x.rects), {
207
- x: p,
205
+ strategy: l
206
+ }) : C.rects), {
207
+ x: c,
208
208
  y: d
209
- } = Se(c, m, a)), v = -1);
209
+ } = ze(p, m, a)), w = -1);
210
210
  }
211
211
  return {
212
- x: p,
212
+ x: c,
213
213
  y: d,
214
214
  placement: m,
215
- strategy: o,
216
- middlewareData: u
215
+ strategy: l,
216
+ middlewareData: h
217
217
  };
218
218
  };
219
- async function $e(i, e) {
219
+ async function Ue(i, e) {
220
220
  var t;
221
221
  e === void 0 && (e = {});
222
222
  const {
223
- x: l,
224
- y: o,
223
+ x: o,
224
+ y: l,
225
225
  platform: s,
226
226
  rects: n,
227
227
  elements: r,
228
228
  strategy: a
229
229
  } = i, {
230
- boundary: c = "clippingAncestors",
231
- rootBoundary: p = "viewport",
230
+ boundary: p = "clippingAncestors",
231
+ rootBoundary: c = "viewport",
232
232
  elementContext: d = "floating",
233
233
  altBoundary: m = !1,
234
- padding: u = 0
235
- } = se(e, i), g = st(u), w = r[m ? d === "floating" ? "reference" : "floating" : d], b = oe(await s.getClippingRect({
236
- element: (t = await (s.isElement == null ? void 0 : s.isElement(w))) == null || t ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(r.floating)),
237
- boundary: c,
238
- rootBoundary: p,
234
+ padding: h = 0
235
+ } = he(e, i), f = yt(h), g = r[m ? d === "floating" ? "reference" : "floating" : d], b = pe(await s.getClippingRect({
236
+ element: (t = await (s.isElement == null ? void 0 : s.isElement(g))) == null || t ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(r.floating)),
237
+ boundary: p,
238
+ rootBoundary: c,
239
239
  strategy: a
240
- })), _ = d === "floating" ? {
241
- x: l,
242
- y: o,
240
+ })), y = d === "floating" ? {
241
+ x: o,
242
+ y: l,
243
243
  width: n.floating.width,
244
244
  height: n.floating.height
245
- } : n.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(r.floating)), C = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
245
+ } : n.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(r.floating)), k = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
246
246
  x: 1,
247
247
  y: 1
248
248
  } : {
249
249
  x: 1,
250
250
  y: 1
251
- }, x = oe(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
251
+ }, C = pe(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
252
252
  elements: r,
253
- rect: _,
254
- offsetParent: y,
253
+ rect: y,
254
+ offsetParent: x,
255
255
  strategy: a
256
- }) : _);
256
+ }) : y);
257
257
  return {
258
- top: (b.top - x.top + g.top) / C.y,
259
- bottom: (x.bottom - b.bottom + g.bottom) / C.y,
260
- left: (b.left - x.left + g.left) / C.x,
261
- right: (x.right - b.right + g.right) / C.x
258
+ top: (b.top - C.top + f.top) / k.y,
259
+ bottom: (C.bottom - b.bottom + f.bottom) / k.y,
260
+ left: (b.left - C.left + f.left) / k.x,
261
+ right: (C.right - b.right + f.right) / k.x
262
262
  };
263
263
  }
264
- const rt = function(i) {
264
+ const xt = function(i) {
265
265
  return i === void 0 && (i = {}), {
266
266
  name: "flip",
267
267
  options: i,
268
268
  async fn(e) {
269
- var t, l;
269
+ var t, o;
270
270
  const {
271
- placement: o,
271
+ placement: l,
272
272
  middlewareData: s,
273
273
  rects: n,
274
274
  initialPlacement: r,
275
275
  platform: a,
276
- elements: c
276
+ elements: p
277
277
  } = e, {
278
- mainAxis: p = !0,
278
+ mainAxis: c = !0,
279
279
  crossAxis: d = !0,
280
280
  fallbackPlacements: m,
281
- fallbackStrategy: u = "bestFit",
282
- fallbackAxisSideDirection: g = "none",
283
- flipAlignment: v = !0,
284
- ...w
285
- } = se(i, e);
281
+ fallbackStrategy: h = "bestFit",
282
+ fallbackAxisSideDirection: f = "none",
283
+ flipAlignment: w = !0,
284
+ ...g
285
+ } = he(i, e);
286
286
  if ((t = s.arrow) != null && t.alignmentOffset)
287
287
  return {};
288
- const b = R(o), _ = V(r), y = R(r) === r, C = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), x = m || (y || !v ? [le(r)] : Qe(r)), G = g !== "none";
289
- !m && G && x.push(...lt(r, v, g, C));
290
- const F = [r, ...x], pe = await $e(e, w), X = [];
291
- let B = ((l = s.flip) == null ? void 0 : l.overflows) || [];
292
- if (p && X.push(pe[b]), d) {
293
- const $ = Ze(o, n, C);
294
- X.push(pe[$[0]], pe[$[1]]);
288
+ const b = W(l), y = D(r), x = W(r) === r, k = await (a.isRTL == null ? void 0 : a.isRTL(p.floating)), C = m || (x || !w ? [de(r)] : ut(r)), J = f !== "none";
289
+ !m && J && C.push(...vt(r, w, f, k));
290
+ const G = [r, ...C], we = await Ue(e, g), ie = [];
291
+ let U = ((o = s.flip) == null ? void 0 : o.overflows) || [];
292
+ if (c && ie.push(we[b]), d) {
293
+ const R = ht(l, n, k);
294
+ ie.push(we[R[0]], we[R[1]]);
295
295
  }
296
- if (B = [...B, {
297
- placement: o,
298
- overflows: X
299
- }], !X.every(($) => $ <= 0)) {
300
- var ye, xe;
301
- const $ = (((ye = s.flip) == null ? void 0 : ye.index) || 0) + 1, he = F[$];
302
- if (he && (!(d === "alignment" ? _ !== V(he) : !1) || // We leave the current main axis only if every placement on that axis
296
+ if (U = [...U, {
297
+ placement: l,
298
+ overflows: ie
299
+ }], !ie.every((R) => R <= 0)) {
300
+ var Le, Ee;
301
+ const R = (((Le = s.flip) == null ? void 0 : Le.index) || 0) + 1, ye = G[R];
302
+ if (ye && (!(d === "alignment" ? y !== D(ye) : !1) || // We leave the current main axis only if every placement on that axis
303
303
  // overflows the main axis.
304
- B.every((A) => V(A.placement) === _ ? A.overflows[0] > 0 : !0)))
304
+ U.every((O) => D(O.placement) === y ? O.overflows[0] > 0 : !0)))
305
305
  return {
306
306
  data: {
307
- index: $,
308
- overflows: B
307
+ index: R,
308
+ overflows: U
309
309
  },
310
310
  reset: {
311
- placement: he
311
+ placement: ye
312
312
  }
313
313
  };
314
- let K = (xe = B.filter((L) => L.overflows[0] <= 0).sort((L, A) => L.overflows[1] - A.overflows[1])[0]) == null ? void 0 : xe.placement;
315
- if (!K)
316
- switch (u) {
314
+ let q = (Ee = U.filter((F) => F.overflows[0] <= 0).sort((F, O) => F.overflows[1] - O.overflows[1])[0]) == null ? void 0 : Ee.placement;
315
+ if (!q)
316
+ switch (h) {
317
317
  case "bestFit": {
318
- var Ce;
319
- const L = (Ce = B.filter((A) => {
320
- if (G) {
321
- const I = V(A.placement);
322
- return I === _ || // Create a bias to the `y` side axis due to horizontal
318
+ var Me;
319
+ const F = (Me = U.filter((O) => {
320
+ if (J) {
321
+ const V = D(O.placement);
322
+ return V === y || // Create a bias to the `y` side axis due to horizontal
323
323
  // reading directions favoring greater width.
324
- I === "y";
324
+ V === "y";
325
325
  }
326
326
  return !0;
327
- }).map((A) => [A.placement, A.overflows.filter((I) => I > 0).reduce((I, Ke) => I + Ke, 0)]).sort((A, I) => A[1] - I[1])[0]) == null ? void 0 : Ce[0];
328
- L && (K = L);
327
+ }).map((O) => [O.placement, O.overflows.filter((V) => V > 0).reduce((V, rt) => V + rt, 0)]).sort((O, V) => O[1] - V[1])[0]) == null ? void 0 : Me[0];
328
+ F && (q = F);
329
329
  break;
330
330
  }
331
331
  case "initialPlacement":
332
- K = r;
332
+ q = r;
333
333
  break;
334
334
  }
335
- if (o !== K)
335
+ if (l !== q)
336
336
  return {
337
337
  reset: {
338
- placement: K
338
+ placement: q
339
339
  }
340
340
  };
341
341
  }
342
342
  return {};
343
343
  }
344
344
  };
345
- }, at = /* @__PURE__ */ new Set(["left", "top"]);
346
- async function ct(i, e) {
345
+ }, Ct = /* @__PURE__ */ new Set(["left", "top"]);
346
+ async function kt(i, e) {
347
347
  const {
348
348
  placement: t,
349
- platform: l,
350
- elements: o
351
- } = i, s = await (l.isRTL == null ? void 0 : l.isRTL(o.floating)), n = R(t), r = ne(t), a = V(t) === "y", c = at.has(n) ? -1 : 1, p = s && a ? -1 : 1, d = se(e, i);
349
+ platform: o,
350
+ elements: l
351
+ } = i, s = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), n = W(t), r = ue(t), a = D(t) === "y", p = Ct.has(n) ? -1 : 1, c = s && a ? -1 : 1, d = he(e, i);
352
352
  let {
353
353
  mainAxis: m,
354
- crossAxis: u,
355
- alignmentAxis: g
354
+ crossAxis: h,
355
+ alignmentAxis: f
356
356
  } = typeof d == "number" ? {
357
357
  mainAxis: d,
358
358
  crossAxis: 0,
@@ -362,28 +362,28 @@ async function ct(i, e) {
362
362
  crossAxis: d.crossAxis || 0,
363
363
  alignmentAxis: d.alignmentAxis
364
364
  };
365
- return r && typeof g == "number" && (u = r === "end" ? g * -1 : g), a ? {
366
- x: u * p,
367
- y: m * c
365
+ return r && typeof f == "number" && (h = r === "end" ? f * -1 : f), a ? {
366
+ x: h * c,
367
+ y: m * p
368
368
  } : {
369
- x: m * c,
370
- y: u * p
369
+ x: m * p,
370
+ y: h * c
371
371
  };
372
372
  }
373
- const dt = function(i) {
373
+ const At = function(i) {
374
374
  return i === void 0 && (i = 0), {
375
375
  name: "offset",
376
376
  options: i,
377
377
  async fn(e) {
378
- var t, l;
378
+ var t, o;
379
379
  const {
380
- x: o,
380
+ x: l,
381
381
  y: s,
382
382
  placement: n,
383
383
  middlewareData: r
384
- } = e, a = await ct(e, i);
385
- return n === ((t = r.offset) == null ? void 0 : t.placement) && (l = r.arrow) != null && l.alignmentOffset ? {} : {
386
- x: o + a.x,
384
+ } = e, a = await kt(e, i);
385
+ return n === ((t = r.offset) == null ? void 0 : t.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
386
+ x: l + a.x,
387
387
  y: s + a.y,
388
388
  data: {
389
389
  ...a,
@@ -392,54 +392,54 @@ const dt = function(i) {
392
392
  };
393
393
  }
394
394
  };
395
- }, pt = function(i) {
395
+ }, St = function(i) {
396
396
  return i === void 0 && (i = {}), {
397
397
  name: "shift",
398
398
  options: i,
399
399
  async fn(e) {
400
400
  const {
401
401
  x: t,
402
- y: l,
403
- placement: o
402
+ y: o,
403
+ placement: l
404
404
  } = e, {
405
405
  mainAxis: s = !0,
406
406
  crossAxis: n = !1,
407
407
  limiter: r = {
408
- fn: (w) => {
408
+ fn: (g) => {
409
409
  let {
410
410
  x: b,
411
- y: _
412
- } = w;
411
+ y
412
+ } = g;
413
413
  return {
414
414
  x: b,
415
- y: _
415
+ y
416
416
  };
417
417
  }
418
418
  },
419
419
  ...a
420
- } = se(i, e), c = {
420
+ } = he(i, e), p = {
421
421
  x: t,
422
- y: l
423
- }, p = await $e(e, a), d = V(R(o)), m = Ee(d);
424
- let u = c[m], g = c[d];
422
+ y: o
423
+ }, c = await Ue(e, a), d = D(W(l)), m = We(d);
424
+ let h = p[m], f = p[d];
425
425
  if (s) {
426
- const w = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", _ = u + p[w], y = u - p[b];
427
- u = ke(_, u, y);
426
+ const g = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", y = h + c[g], x = h - c[b];
427
+ h = $e(y, h, x);
428
428
  }
429
429
  if (n) {
430
- const w = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", _ = g + p[w], y = g - p[b];
431
- g = ke(_, g, y);
430
+ const g = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", y = f + c[g], x = f - c[b];
431
+ f = $e(y, f, x);
432
432
  }
433
- const v = r.fn({
433
+ const w = r.fn({
434
434
  ...e,
435
- [m]: u,
436
- [d]: g
435
+ [m]: h,
436
+ [d]: f
437
437
  });
438
438
  return {
439
- ...v,
439
+ ...w,
440
440
  data: {
441
- x: v.x - t,
442
- y: v.y - l,
441
+ x: w.x - t,
442
+ y: w.y - o,
443
443
  enabled: {
444
444
  [m]: s,
445
445
  [d]: n
@@ -449,49 +449,49 @@ const dt = function(i) {
449
449
  }
450
450
  };
451
451
  };
452
- function re() {
452
+ function fe() {
453
453
  return typeof window < "u";
454
454
  }
455
- function j(i) {
456
- return Le(i) ? (i.nodeName || "").toLowerCase() : "#document";
455
+ function X(i) {
456
+ return Ke(i) ? (i.nodeName || "").toLowerCase() : "#document";
457
457
  }
458
- function k(i) {
458
+ function P(i) {
459
459
  var e;
460
460
  return (i == null || (e = i.ownerDocument) == null ? void 0 : e.defaultView) || window;
461
461
  }
462
- function M(i) {
462
+ function $(i) {
463
463
  var e;
464
- return (e = (Le(i) ? i.ownerDocument : i.document) || window.document) == null ? void 0 : e.documentElement;
464
+ return (e = (Ke(i) ? i.ownerDocument : i.document) || window.document) == null ? void 0 : e.documentElement;
465
465
  }
466
- function Le(i) {
467
- return re() ? i instanceof Node || i instanceof k(i).Node : !1;
468
- }
469
- function P(i) {
470
- return re() ? i instanceof Element || i instanceof k(i).Element : !1;
466
+ function Ke(i) {
467
+ return fe() ? i instanceof Node || i instanceof P(i).Node : !1;
471
468
  }
472
469
  function T(i) {
473
- return re() ? i instanceof HTMLElement || i instanceof k(i).HTMLElement : !1;
470
+ return fe() ? i instanceof Element || i instanceof P(i).Element : !1;
474
471
  }
475
- function Oe(i) {
476
- return !re() || typeof ShadowRoot > "u" ? !1 : i instanceof ShadowRoot || i instanceof k(i).ShadowRoot;
472
+ function M(i) {
473
+ return fe() ? i instanceof HTMLElement || i instanceof P(i).HTMLElement : !1;
477
474
  }
478
- const ht = /* @__PURE__ */ new Set(["inline", "contents"]);
479
- function Y(i) {
475
+ function Re(i) {
476
+ return !fe() || typeof ShadowRoot > "u" ? !1 : i instanceof ShadowRoot || i instanceof P(i).ShadowRoot;
477
+ }
478
+ const Pt = /* @__PURE__ */ new Set(["inline", "contents"]);
479
+ function te(i) {
480
480
  const {
481
481
  overflow: e,
482
482
  overflowX: t,
483
- overflowY: l,
484
- display: o
485
- } = S(i);
486
- return /auto|scroll|overlay|hidden|clip/.test(e + l + t) && !ht.has(o);
487
- }
488
- const ut = /* @__PURE__ */ new Set(["table", "td", "th"]);
489
- function mt(i) {
490
- return ut.has(j(i));
491
- }
492
- const ft = [":popover-open", ":modal"];
493
- function ae(i) {
494
- return ft.some((e) => {
483
+ overflowY: o,
484
+ display: l
485
+ } = L(i);
486
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + t) && !Pt.has(l);
487
+ }
488
+ const Ot = /* @__PURE__ */ new Set(["table", "td", "th"]);
489
+ function It(i) {
490
+ return Ot.has(X(i));
491
+ }
492
+ const Tt = [":popover-open", ":modal"];
493
+ function ge(i) {
494
+ return Tt.some((e) => {
495
495
  try {
496
496
  return i.matches(e);
497
497
  } catch {
@@ -499,34 +499,34 @@ function ae(i) {
499
499
  }
500
500
  });
501
501
  }
502
- const gt = ["transform", "translate", "scale", "rotate", "perspective"], bt = ["transform", "translate", "scale", "rotate", "perspective", "filter"], vt = ["paint", "layout", "strict", "content"];
503
- function ve(i) {
504
- const e = we(), t = P(i) ? S(i) : i;
505
- return gt.some((l) => t[l] ? t[l] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || bt.some((l) => (t.willChange || "").includes(l)) || vt.some((l) => (t.contain || "").includes(l));
502
+ const Lt = ["transform", "translate", "scale", "rotate", "perspective"], Et = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Mt = ["paint", "layout", "strict", "content"];
503
+ function Pe(i) {
504
+ const e = Oe(), t = T(i) ? L(i) : i;
505
+ return Lt.some((o) => t[o] ? t[o] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || Et.some((o) => (t.willChange || "").includes(o)) || Mt.some((o) => (t.contain || "").includes(o));
506
506
  }
507
- function wt(i) {
508
- let e = D(i);
509
- for (; T(e) && !W(e); ) {
510
- if (ve(e))
507
+ function $t(i) {
508
+ let e = z(i);
509
+ for (; M(e) && !Y(e); ) {
510
+ if (Pe(e))
511
511
  return e;
512
- if (ae(e))
512
+ if (ge(e))
513
513
  return null;
514
- e = D(e);
514
+ e = z(e);
515
515
  }
516
516
  return null;
517
517
  }
518
- function we() {
518
+ function Oe() {
519
519
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
520
520
  }
521
- const _t = /* @__PURE__ */ new Set(["html", "body", "#document"]);
522
- function W(i) {
523
- return _t.has(j(i));
521
+ const Vt = /* @__PURE__ */ new Set(["html", "body", "#document"]);
522
+ function Y(i) {
523
+ return Vt.has(X(i));
524
524
  }
525
- function S(i) {
526
- return k(i).getComputedStyle(i);
525
+ function L(i) {
526
+ return P(i).getComputedStyle(i);
527
527
  }
528
- function ce(i) {
529
- return P(i) ? {
528
+ function be(i) {
529
+ return T(i) ? {
530
530
  scrollLeft: i.scrollLeft,
531
531
  scrollTop: i.scrollTop
532
532
  } : {
@@ -534,162 +534,162 @@ function ce(i) {
534
534
  scrollTop: i.scrollY
535
535
  };
536
536
  }
537
- function D(i) {
538
- if (j(i) === "html")
537
+ function z(i) {
538
+ if (X(i) === "html")
539
539
  return i;
540
540
  const e = (
541
541
  // Step into the shadow DOM of the parent of a slotted node.
542
542
  i.assignedSlot || // DOM Element detected.
543
543
  i.parentNode || // ShadowRoot detected.
544
- Oe(i) && i.host || // Fallback.
545
- M(i)
544
+ Re(i) && i.host || // Fallback.
545
+ $(i)
546
546
  );
547
- return Oe(e) ? e.host : e;
547
+ return Re(e) ? e.host : e;
548
548
  }
549
- function ze(i) {
550
- const e = D(i);
551
- return W(e) ? i.ownerDocument ? i.ownerDocument.body : i.body : T(e) && Y(e) ? e : ze(e);
549
+ function Ye(i) {
550
+ const e = z(i);
551
+ return Y(e) ? i.ownerDocument ? i.ownerDocument.body : i.body : M(e) && te(e) ? e : Ye(e);
552
552
  }
553
- function U(i, e, t) {
554
- var l;
553
+ function Q(i, e, t) {
554
+ var o;
555
555
  e === void 0 && (e = []), t === void 0 && (t = !0);
556
- const o = ze(i), s = o === ((l = i.ownerDocument) == null ? void 0 : l.body), n = k(o);
556
+ const l = Ye(i), s = l === ((o = i.ownerDocument) == null ? void 0 : o.body), n = P(l);
557
557
  if (s) {
558
- const r = ge(n);
559
- return e.concat(n, n.visualViewport || [], Y(o) ? o : [], r && t ? U(r) : []);
558
+ const r = ke(n);
559
+ return e.concat(n, n.visualViewport || [], te(l) ? l : [], r && t ? Q(r) : []);
560
560
  }
561
- return e.concat(o, U(o, [], t));
561
+ return e.concat(l, Q(l, [], t));
562
562
  }
563
- function ge(i) {
563
+ function ke(i) {
564
564
  return i.parent && Object.getPrototypeOf(i.parent) ? i.frameElement : null;
565
565
  }
566
- function Re(i) {
567
- const e = S(i);
568
- let t = parseFloat(e.width) || 0, l = parseFloat(e.height) || 0;
569
- const o = T(i), s = o ? i.offsetWidth : t, n = o ? i.offsetHeight : l, r = ie(t) !== s || ie(l) !== n;
570
- return r && (t = s, l = n), {
566
+ function Xe(i) {
567
+ const e = L(i);
568
+ let t = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
569
+ const l = M(i), s = l ? i.offsetWidth : t, n = l ? i.offsetHeight : o, r = ce(t) !== s || ce(o) !== n;
570
+ return r && (t = s, o = n), {
571
571
  width: t,
572
- height: l,
572
+ height: o,
573
573
  $: r
574
574
  };
575
575
  }
576
- function _e(i) {
577
- return P(i) ? i : i.contextElement;
576
+ function Ie(i) {
577
+ return T(i) ? i : i.contextElement;
578
578
  }
579
- function H(i) {
580
- const e = _e(i);
581
- if (!T(e))
582
- return O(1);
579
+ function K(i) {
580
+ const e = Ie(i);
581
+ if (!M(e))
582
+ return E(1);
583
583
  const t = e.getBoundingClientRect(), {
584
- width: l,
585
- height: o,
584
+ width: o,
585
+ height: l,
586
586
  $: s
587
- } = Re(e);
588
- let n = (s ? ie(t.width) : t.width) / l, r = (s ? ie(t.height) : t.height) / o;
587
+ } = Xe(e);
588
+ let n = (s ? ce(t.width) : t.width) / o, r = (s ? ce(t.height) : t.height) / l;
589
589
  return (!n || !Number.isFinite(n)) && (n = 1), (!r || !Number.isFinite(r)) && (r = 1), {
590
590
  x: n,
591
591
  y: r
592
592
  };
593
593
  }
594
- const yt = /* @__PURE__ */ O(0);
595
- function Ne(i) {
596
- const e = k(i);
597
- return !we() || !e.visualViewport ? yt : {
594
+ const Dt = /* @__PURE__ */ E(0);
595
+ function Je(i) {
596
+ const e = P(i);
597
+ return !Oe() || !e.visualViewport ? Dt : {
598
598
  x: e.visualViewport.offsetLeft,
599
599
  y: e.visualViewport.offsetTop
600
600
  };
601
601
  }
602
- function xt(i, e, t) {
603
- return e === void 0 && (e = !1), !t || e && t !== k(i) ? !1 : e;
602
+ function zt(i, e, t) {
603
+ return e === void 0 && (e = !1), !t || e && t !== P(i) ? !1 : e;
604
604
  }
605
- function N(i, e, t, l) {
605
+ function j(i, e, t, o) {
606
606
  e === void 0 && (e = !1), t === void 0 && (t = !1);
607
- const o = i.getBoundingClientRect(), s = _e(i);
608
- let n = O(1);
609
- e && (l ? P(l) && (n = H(l)) : n = H(i));
610
- const r = xt(s, t, l) ? Ne(s) : O(0);
611
- let a = (o.left + r.x) / n.x, c = (o.top + r.y) / n.y, p = o.width / n.x, d = o.height / n.y;
607
+ const l = i.getBoundingClientRect(), s = Ie(i);
608
+ let n = E(1);
609
+ e && (o ? T(o) && (n = K(o)) : n = K(i));
610
+ const r = zt(s, t, o) ? Je(s) : E(0);
611
+ let a = (l.left + r.x) / n.x, p = (l.top + r.y) / n.y, c = l.width / n.x, d = l.height / n.y;
612
612
  if (s) {
613
- const m = k(s), u = l && P(l) ? k(l) : l;
614
- let g = m, v = ge(g);
615
- for (; v && l && u !== g; ) {
616
- const w = H(v), b = v.getBoundingClientRect(), _ = S(v), y = b.left + (v.clientLeft + parseFloat(_.paddingLeft)) * w.x, C = b.top + (v.clientTop + parseFloat(_.paddingTop)) * w.y;
617
- a *= w.x, c *= w.y, p *= w.x, d *= w.y, a += y, c += C, g = k(v), v = ge(g);
613
+ const m = P(s), h = o && T(o) ? P(o) : o;
614
+ let f = m, w = ke(f);
615
+ for (; w && o && h !== f; ) {
616
+ const g = K(w), b = w.getBoundingClientRect(), y = L(w), x = b.left + (w.clientLeft + parseFloat(y.paddingLeft)) * g.x, k = b.top + (w.clientTop + parseFloat(y.paddingTop)) * g.y;
617
+ a *= g.x, p *= g.y, c *= g.x, d *= g.y, a += x, p += k, f = P(w), w = ke(f);
618
618
  }
619
619
  }
620
- return oe({
621
- width: p,
620
+ return pe({
621
+ width: c,
622
622
  height: d,
623
623
  x: a,
624
- y: c
624
+ y: p
625
625
  });
626
626
  }
627
- function de(i, e) {
628
- const t = ce(i).scrollLeft;
629
- return e ? e.left + t : N(M(i)).left + t;
627
+ function ve(i, e) {
628
+ const t = be(i).scrollLeft;
629
+ return e ? e.left + t : j($(i)).left + t;
630
630
  }
631
- function Fe(i, e) {
632
- const t = i.getBoundingClientRect(), l = t.left + e.scrollLeft - de(i, t), o = t.top + e.scrollTop;
631
+ function qe(i, e) {
632
+ const t = i.getBoundingClientRect(), o = t.left + e.scrollLeft - ve(i, t), l = t.top + e.scrollTop;
633
633
  return {
634
- x: l,
635
- y: o
634
+ x: o,
635
+ y: l
636
636
  };
637
637
  }
638
- function Ct(i) {
638
+ function Rt(i) {
639
639
  let {
640
640
  elements: e,
641
641
  rect: t,
642
- offsetParent: l,
643
- strategy: o
642
+ offsetParent: o,
643
+ strategy: l
644
644
  } = i;
645
- const s = o === "fixed", n = M(l), r = e ? ae(e.floating) : !1;
646
- if (l === n || r && s)
645
+ const s = l === "fixed", n = $(o), r = e ? ge(e.floating) : !1;
646
+ if (o === n || r && s)
647
647
  return t;
648
648
  let a = {
649
649
  scrollLeft: 0,
650
650
  scrollTop: 0
651
- }, c = O(1);
652
- const p = O(0), d = T(l);
653
- if ((d || !d && !s) && ((j(l) !== "body" || Y(n)) && (a = ce(l)), T(l))) {
654
- const u = N(l);
655
- c = H(l), p.x = u.x + l.clientLeft, p.y = u.y + l.clientTop;
651
+ }, p = E(1);
652
+ const c = E(0), d = M(o);
653
+ if ((d || !d && !s) && ((X(o) !== "body" || te(n)) && (a = be(o)), M(o))) {
654
+ const h = j(o);
655
+ p = K(o), c.x = h.x + o.clientLeft, c.y = h.y + o.clientTop;
656
656
  }
657
- const m = n && !d && !s ? Fe(n, a) : O(0);
657
+ const m = n && !d && !s ? qe(n, a) : E(0);
658
658
  return {
659
- width: t.width * c.x,
660
- height: t.height * c.y,
661
- x: t.x * c.x - a.scrollLeft * c.x + p.x + m.x,
662
- y: t.y * c.y - a.scrollTop * c.y + p.y + m.y
659
+ width: t.width * p.x,
660
+ height: t.height * p.y,
661
+ x: t.x * p.x - a.scrollLeft * p.x + c.x + m.x,
662
+ y: t.y * p.y - a.scrollTop * p.y + c.y + m.y
663
663
  };
664
664
  }
665
- function kt(i) {
665
+ function Ft(i) {
666
666
  return Array.from(i.getClientRects());
667
667
  }
668
- function At(i) {
669
- const e = M(i), t = ce(i), l = i.ownerDocument.body, o = z(e.scrollWidth, e.clientWidth, l.scrollWidth, l.clientWidth), s = z(e.scrollHeight, e.clientHeight, l.scrollHeight, l.clientHeight);
670
- let n = -t.scrollLeft + de(i);
668
+ function Nt(i) {
669
+ const e = $(i), t = be(i), o = i.ownerDocument.body, l = H(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = H(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
670
+ let n = -t.scrollLeft + ve(i);
671
671
  const r = -t.scrollTop;
672
- return S(l).direction === "rtl" && (n += z(e.clientWidth, l.clientWidth) - o), {
673
- width: o,
672
+ return L(o).direction === "rtl" && (n += H(e.clientWidth, o.clientWidth) - l), {
673
+ width: l,
674
674
  height: s,
675
675
  x: n,
676
676
  y: r
677
677
  };
678
678
  }
679
- const Te = 25;
680
- function Pt(i, e) {
681
- const t = k(i), l = M(i), o = t.visualViewport;
682
- let s = l.clientWidth, n = l.clientHeight, r = 0, a = 0;
683
- if (o) {
684
- s = o.width, n = o.height;
685
- const p = we();
686
- (!p || p && e === "fixed") && (r = o.offsetLeft, a = o.offsetTop);
687
- }
688
- const c = de(l);
689
- if (c <= 0) {
690
- const p = l.ownerDocument, d = p.body, m = getComputedStyle(d), u = p.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, g = Math.abs(l.clientWidth - d.clientWidth - u);
691
- g <= Te && (s -= g);
692
- } else c <= Te && (s += c);
679
+ const Fe = 25;
680
+ function Bt(i, e) {
681
+ const t = P(i), o = $(i), l = t.visualViewport;
682
+ let s = o.clientWidth, n = o.clientHeight, r = 0, a = 0;
683
+ if (l) {
684
+ s = l.width, n = l.height;
685
+ const c = Oe();
686
+ (!c || c && e === "fixed") && (r = l.offsetLeft, a = l.offsetTop);
687
+ }
688
+ const p = ve(o);
689
+ if (p <= 0) {
690
+ const c = o.ownerDocument, d = c.body, m = getComputedStyle(d), h = c.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, f = Math.abs(o.clientWidth - d.clientWidth - h);
691
+ f <= Fe && (s -= f);
692
+ } else p <= Fe && (s += p);
693
693
  return {
694
694
  width: s,
695
695
  height: n,
@@ -697,63 +697,63 @@ function Pt(i, e) {
697
697
  y: a
698
698
  };
699
699
  }
700
- const St = /* @__PURE__ */ new Set(["absolute", "fixed"]);
701
- function Ot(i, e) {
702
- const t = N(i, !0, e === "fixed"), l = t.top + i.clientTop, o = t.left + i.clientLeft, s = T(i) ? H(i) : O(1), n = i.clientWidth * s.x, r = i.clientHeight * s.y, a = o * s.x, c = l * s.y;
700
+ const Ht = /* @__PURE__ */ new Set(["absolute", "fixed"]);
701
+ function Wt(i, e) {
702
+ const t = j(i, !0, e === "fixed"), o = t.top + i.clientTop, l = t.left + i.clientLeft, s = M(i) ? K(i) : E(1), n = i.clientWidth * s.x, r = i.clientHeight * s.y, a = l * s.x, p = o * s.y;
703
703
  return {
704
704
  width: n,
705
705
  height: r,
706
706
  x: a,
707
- y: c
707
+ y: p
708
708
  };
709
709
  }
710
- function Me(i, e, t) {
711
- let l;
710
+ function Ne(i, e, t) {
711
+ let o;
712
712
  if (e === "viewport")
713
- l = Pt(i, t);
713
+ o = Bt(i, t);
714
714
  else if (e === "document")
715
- l = At(M(i));
716
- else if (P(e))
717
- l = Ot(e, t);
715
+ o = Nt($(i));
716
+ else if (T(e))
717
+ o = Wt(e, t);
718
718
  else {
719
- const o = Ne(i);
720
- l = {
721
- x: e.x - o.x,
722
- y: e.y - o.y,
719
+ const l = Je(i);
720
+ o = {
721
+ x: e.x - l.x,
722
+ y: e.y - l.y,
723
723
  width: e.width,
724
724
  height: e.height
725
725
  };
726
726
  }
727
- return oe(l);
727
+ return pe(o);
728
728
  }
729
- function Be(i, e) {
730
- const t = D(i);
731
- return t === e || !P(t) || W(t) ? !1 : S(t).position === "fixed" || Be(t, e);
729
+ function Ze(i, e) {
730
+ const t = z(i);
731
+ return t === e || !T(t) || Y(t) ? !1 : L(t).position === "fixed" || Ze(t, e);
732
732
  }
733
- function Tt(i, e) {
733
+ function jt(i, e) {
734
734
  const t = e.get(i);
735
735
  if (t)
736
736
  return t;
737
- let l = U(i, [], !1).filter((r) => P(r) && j(r) !== "body"), o = null;
738
- const s = S(i).position === "fixed";
739
- let n = s ? D(i) : i;
740
- for (; P(n) && !W(n); ) {
741
- const r = S(n), a = ve(n);
742
- !a && r.position === "fixed" && (o = null), (s ? !a && !o : !a && r.position === "static" && !!o && St.has(o.position) || Y(n) && !a && Be(i, n)) ? l = l.filter((p) => p !== n) : o = r, n = D(n);
737
+ let o = Q(i, [], !1).filter((r) => T(r) && X(r) !== "body"), l = null;
738
+ const s = L(i).position === "fixed";
739
+ let n = s ? z(i) : i;
740
+ for (; T(n) && !Y(n); ) {
741
+ const r = L(n), a = Pe(n);
742
+ !a && r.position === "fixed" && (l = null), (s ? !a && !l : !a && r.position === "static" && !!l && Ht.has(l.position) || te(n) && !a && Ze(i, n)) ? o = o.filter((c) => c !== n) : l = r, n = z(n);
743
743
  }
744
- return e.set(i, l), l;
744
+ return e.set(i, o), o;
745
745
  }
746
- function Mt(i) {
746
+ function Gt(i) {
747
747
  let {
748
748
  element: e,
749
749
  boundary: t,
750
- rootBoundary: l,
751
- strategy: o
750
+ rootBoundary: o,
751
+ strategy: l
752
752
  } = i;
753
- const n = [...t === "clippingAncestors" ? ae(e) ? [] : Tt(e, this._c) : [].concat(t), l], r = n[0], a = n.reduce((c, p) => {
754
- const d = Me(e, p, o);
755
- return c.top = z(d.top, c.top), c.right = te(d.right, c.right), c.bottom = te(d.bottom, c.bottom), c.left = z(d.left, c.left), c;
756
- }, Me(e, r, o));
753
+ const n = [...t === "clippingAncestors" ? ge(e) ? [] : jt(e, this._c) : [].concat(t), o], r = n[0], a = n.reduce((p, c) => {
754
+ const d = Ne(e, c, l);
755
+ return p.top = H(d.top, p.top), p.right = ae(d.right, p.right), p.bottom = ae(d.bottom, p.bottom), p.left = H(d.left, p.left), p;
756
+ }, Ne(e, r, l));
757
757
  return {
758
758
  width: a.right - a.left,
759
759
  height: a.bottom - a.top,
@@ -761,33 +761,33 @@ function Mt(i) {
761
761
  y: a.top
762
762
  };
763
763
  }
764
- function It(i) {
764
+ function Ut(i) {
765
765
  const {
766
766
  width: e,
767
767
  height: t
768
- } = Re(i);
768
+ } = Xe(i);
769
769
  return {
770
770
  width: e,
771
771
  height: t
772
772
  };
773
773
  }
774
- function Et(i, e, t) {
775
- const l = T(e), o = M(e), s = t === "fixed", n = N(i, !0, s, e);
774
+ function Kt(i, e, t) {
775
+ const o = M(e), l = $(e), s = t === "fixed", n = j(i, !0, s, e);
776
776
  let r = {
777
777
  scrollLeft: 0,
778
778
  scrollTop: 0
779
779
  };
780
- const a = O(0);
781
- function c() {
782
- a.x = de(o);
783
- }
784
- if (l || !l && !s)
785
- if ((j(e) !== "body" || Y(o)) && (r = ce(e)), l) {
786
- const u = N(e, !0, s, e);
787
- a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
788
- } else o && c();
789
- s && !l && o && c();
790
- const p = o && !l && !s ? Fe(o, r) : O(0), d = n.left + r.scrollLeft - a.x - p.x, m = n.top + r.scrollTop - a.y - p.y;
780
+ const a = E(0);
781
+ function p() {
782
+ a.x = ve(l);
783
+ }
784
+ if (o || !o && !s)
785
+ if ((X(e) !== "body" || te(l)) && (r = be(e)), o) {
786
+ const h = j(e, !0, s, e);
787
+ a.x = h.x + e.clientLeft, a.y = h.y + e.clientTop;
788
+ } else l && p();
789
+ s && !o && l && p();
790
+ const c = l && !o && !s ? qe(l, r) : E(0), d = n.left + r.scrollLeft - a.x - c.x, m = n.top + r.scrollTop - a.y - c.y;
791
791
  return {
792
792
  x: d,
793
793
  y: m,
@@ -795,229 +795,476 @@ function Et(i, e, t) {
795
795
  height: n.height
796
796
  };
797
797
  }
798
- function ue(i) {
799
- return S(i).position === "static";
798
+ function _e(i) {
799
+ return L(i).position === "static";
800
800
  }
801
- function Ie(i, e) {
802
- if (!T(i) || S(i).position === "fixed")
801
+ function Be(i, e) {
802
+ if (!M(i) || L(i).position === "fixed")
803
803
  return null;
804
804
  if (e)
805
805
  return e(i);
806
806
  let t = i.offsetParent;
807
- return M(i) === t && (t = t.ownerDocument.body), t;
807
+ return $(i) === t && (t = t.ownerDocument.body), t;
808
808
  }
809
- function He(i, e) {
810
- const t = k(i);
811
- if (ae(i))
809
+ function Qe(i, e) {
810
+ const t = P(i);
811
+ if (ge(i))
812
812
  return t;
813
- if (!T(i)) {
814
- let o = D(i);
815
- for (; o && !W(o); ) {
816
- if (P(o) && !ue(o))
817
- return o;
818
- o = D(o);
813
+ if (!M(i)) {
814
+ let l = z(i);
815
+ for (; l && !Y(l); ) {
816
+ if (T(l) && !_e(l))
817
+ return l;
818
+ l = z(l);
819
819
  }
820
820
  return t;
821
821
  }
822
- let l = Ie(i, e);
823
- for (; l && mt(l) && ue(l); )
824
- l = Ie(l, e);
825
- return l && W(l) && ue(l) && !ve(l) ? t : l || wt(i) || t;
822
+ let o = Be(i, e);
823
+ for (; o && It(o) && _e(o); )
824
+ o = Be(o, e);
825
+ return o && Y(o) && _e(o) && !Pe(o) ? t : o || $t(i) || t;
826
826
  }
827
- const Vt = async function(i) {
828
- const e = this.getOffsetParent || He, t = this.getDimensions, l = await t(i.floating);
827
+ const Yt = async function(i) {
828
+ const e = this.getOffsetParent || Qe, t = this.getDimensions, o = await t(i.floating);
829
829
  return {
830
- reference: Et(i.reference, await e(i.floating), i.strategy),
830
+ reference: Kt(i.reference, await e(i.floating), i.strategy),
831
831
  floating: {
832
832
  x: 0,
833
833
  y: 0,
834
- width: l.width,
835
- height: l.height
834
+ width: o.width,
835
+ height: o.height
836
836
  }
837
837
  };
838
838
  };
839
- function Dt(i) {
840
- return S(i).direction === "rtl";
841
- }
842
- const $t = {
843
- convertOffsetParentRelativeRectToViewportRelativeRect: Ct,
844
- getDocumentElement: M,
845
- getClippingRect: Mt,
846
- getOffsetParent: He,
847
- getElementRects: Vt,
848
- getClientRects: kt,
849
- getDimensions: It,
850
- getScale: H,
851
- isElement: P,
852
- isRTL: Dt
839
+ function Xt(i) {
840
+ return L(i).direction === "rtl";
841
+ }
842
+ const Jt = {
843
+ convertOffsetParentRelativeRectToViewportRelativeRect: Rt,
844
+ getDocumentElement: $,
845
+ getClippingRect: Gt,
846
+ getOffsetParent: Qe,
847
+ getElementRects: Yt,
848
+ getClientRects: Ft,
849
+ getDimensions: Ut,
850
+ getScale: K,
851
+ isElement: T,
852
+ isRTL: Xt
853
853
  };
854
- function We(i, e) {
854
+ function et(i, e) {
855
855
  return i.x === e.x && i.y === e.y && i.width === e.width && i.height === e.height;
856
856
  }
857
- function Lt(i, e) {
858
- let t = null, l;
859
- const o = M(i);
857
+ function qt(i, e) {
858
+ let t = null, o;
859
+ const l = $(i);
860
860
  function s() {
861
861
  var r;
862
- clearTimeout(l), (r = t) == null || r.disconnect(), t = null;
862
+ clearTimeout(o), (r = t) == null || r.disconnect(), t = null;
863
863
  }
864
864
  function n(r, a) {
865
865
  r === void 0 && (r = !1), a === void 0 && (a = 1), s();
866
- const c = i.getBoundingClientRect(), {
867
- left: p,
866
+ const p = i.getBoundingClientRect(), {
867
+ left: c,
868
868
  top: d,
869
869
  width: m,
870
- height: u
871
- } = c;
872
- if (r || e(), !m || !u)
870
+ height: h
871
+ } = p;
872
+ if (r || e(), !m || !h)
873
873
  return;
874
- const g = J(d), v = J(o.clientWidth - (p + m)), w = J(o.clientHeight - (d + u)), b = J(p), y = {
875
- rootMargin: -g + "px " + -v + "px " + -w + "px " + -b + "px",
876
- threshold: z(0, te(1, a)) || 1
874
+ const f = oe(d), w = oe(l.clientWidth - (c + m)), g = oe(l.clientHeight - (d + h)), b = oe(c), x = {
875
+ rootMargin: -f + "px " + -w + "px " + -g + "px " + -b + "px",
876
+ threshold: H(0, ae(1, a)) || 1
877
877
  };
878
- let C = !0;
879
- function x(G) {
880
- const F = G[0].intersectionRatio;
881
- if (F !== a) {
882
- if (!C)
878
+ let k = !0;
879
+ function C(J) {
880
+ const G = J[0].intersectionRatio;
881
+ if (G !== a) {
882
+ if (!k)
883
883
  return n();
884
- F ? n(!1, F) : l = setTimeout(() => {
884
+ G ? n(!1, G) : o = setTimeout(() => {
885
885
  n(!1, 1e-7);
886
886
  }, 1e3);
887
887
  }
888
- F === 1 && !We(c, i.getBoundingClientRect()) && n(), C = !1;
888
+ G === 1 && !et(p, i.getBoundingClientRect()) && n(), k = !1;
889
889
  }
890
890
  try {
891
- t = new IntersectionObserver(x, {
892
- ...y,
891
+ t = new IntersectionObserver(C, {
892
+ ...x,
893
893
  // Handle <iframe>s
894
- root: o.ownerDocument
894
+ root: l.ownerDocument
895
895
  });
896
896
  } catch {
897
- t = new IntersectionObserver(x, y);
897
+ t = new IntersectionObserver(C, x);
898
898
  }
899
899
  t.observe(i);
900
900
  }
901
901
  return n(!0), s;
902
902
  }
903
- function q(i, e, t, l) {
904
- l === void 0 && (l = {});
903
+ function le(i, e, t, o) {
904
+ o === void 0 && (o = {});
905
905
  const {
906
- ancestorScroll: o = !0,
906
+ ancestorScroll: l = !0,
907
907
  ancestorResize: s = !0,
908
908
  elementResize: n = typeof ResizeObserver == "function",
909
909
  layoutShift: r = typeof IntersectionObserver == "function",
910
910
  animationFrame: a = !1
911
- } = l, c = _e(i), p = o || s ? [...c ? U(c) : [], ...U(e)] : [];
912
- p.forEach((b) => {
913
- o && b.addEventListener("scroll", t, {
911
+ } = o, p = Ie(i), c = l || s ? [...p ? Q(p) : [], ...Q(e)] : [];
912
+ c.forEach((b) => {
913
+ l && b.addEventListener("scroll", t, {
914
914
  passive: !0
915
915
  }), s && b.addEventListener("resize", t);
916
916
  });
917
- const d = c && r ? Lt(c, t) : null;
918
- let m = -1, u = null;
919
- n && (u = new ResizeObserver((b) => {
920
- let [_] = b;
921
- _ && _.target === c && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
922
- var y;
923
- (y = u) == null || y.observe(e);
917
+ const d = p && r ? qt(p, t) : null;
918
+ let m = -1, h = null;
919
+ n && (h = new ResizeObserver((b) => {
920
+ let [y] = b;
921
+ y && y.target === p && h && (h.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
922
+ var x;
923
+ (x = h) == null || x.observe(e);
924
924
  })), t();
925
- }), c && !a && u.observe(c), u.observe(e));
926
- let g, v = a ? N(i) : null;
927
- a && w();
928
- function w() {
929
- const b = N(i);
930
- v && !We(v, b) && t(), v = b, g = requestAnimationFrame(w);
925
+ }), p && !a && h.observe(p), h.observe(e));
926
+ let f, w = a ? j(i) : null;
927
+ a && g();
928
+ function g() {
929
+ const b = j(i);
930
+ w && !et(w, b) && t(), w = b, f = requestAnimationFrame(g);
931
931
  }
932
932
  return t(), () => {
933
933
  var b;
934
- p.forEach((_) => {
935
- o && _.removeEventListener("scroll", t), s && _.removeEventListener("resize", t);
936
- }), d == null || d(), (b = u) == null || b.disconnect(), u = null, a && cancelAnimationFrame(g);
934
+ c.forEach((y) => {
935
+ l && y.removeEventListener("scroll", t), s && y.removeEventListener("resize", t);
936
+ }), d == null || d(), (b = h) == null || b.disconnect(), h = null, a && cancelAnimationFrame(f);
937
937
  };
938
938
  }
939
- const Z = dt, Q = pt, me = rt, ee = (i, e, t) => {
940
- const l = /* @__PURE__ */ new Map(), o = {
941
- platform: $t,
939
+ const se = At, ne = St, xe = xt, re = (i, e, t) => {
940
+ const o = /* @__PURE__ */ new Map(), l = {
941
+ platform: Jt,
942
942
  ...t
943
943
  }, s = {
944
- ...o.platform,
945
- _c: l
944
+ ...l.platform,
945
+ _c: o
946
946
  };
947
- return nt(i, e, {
948
- ...o,
947
+ return _t(i, e, {
948
+ ...l,
949
949
  platform: s
950
950
  });
951
951
  };
952
- let E = 0;
953
- const f = {
954
- debug: (i, ...e) => {
955
- E++, console.log(
956
- `%c[MultiSelect ${E}]%c ${i}`,
957
- "color: #0ea5e9; font-weight: bold;",
958
- "color: inherit;",
959
- ...e
960
- );
952
+ var tt = function() {
953
+ }, I = "undefined", Zt = typeof window !== I && typeof window.navigator !== I && /Trident\/|MSIE /.test(window.navigator.userAgent), Ae = [
954
+ "trace",
955
+ "debug",
956
+ "info",
957
+ "warn",
958
+ "error"
959
+ ], ee = {}, _ = null;
960
+ function He(i, e) {
961
+ var t = i[e];
962
+ if (typeof t.bind == "function")
963
+ return t.bind(i);
964
+ try {
965
+ return Function.prototype.bind.call(t, i);
966
+ } catch {
967
+ return function() {
968
+ return Function.prototype.apply.apply(t, [i, arguments]);
969
+ };
970
+ }
971
+ }
972
+ function Qt() {
973
+ console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
974
+ }
975
+ function ei(i) {
976
+ return i === "debug" && (i = "log"), typeof console === I ? !1 : i === "trace" && Zt ? Qt : console[i] !== void 0 ? He(console, i) : console.log !== void 0 ? He(console, "log") : tt;
977
+ }
978
+ function Z() {
979
+ for (var i = this.getLevel(), e = 0; e < Ae.length; e++) {
980
+ var t = Ae[e];
981
+ this[t] = e < i ? tt : this.methodFactory(t, i, this.name);
982
+ }
983
+ if (this.log = this.debug, typeof console === I && i < this.levels.SILENT)
984
+ return "No console available for logging";
985
+ }
986
+ function ti(i) {
987
+ return function() {
988
+ typeof console !== I && (Z.call(this), this[i].apply(this, arguments));
989
+ };
990
+ }
991
+ function ii(i, e, t) {
992
+ return ei(i) || ti.apply(this, arguments);
993
+ }
994
+ function it(i, e) {
995
+ var t = this, o, l, s, n = "loglevel";
996
+ typeof i == "string" ? n += ":" + i : typeof i == "symbol" && (n = void 0);
997
+ function r(m) {
998
+ var h = (Ae[m] || "silent").toUpperCase();
999
+ if (!(typeof window === I || !n)) {
1000
+ try {
1001
+ window.localStorage[n] = h;
1002
+ return;
1003
+ } catch {
1004
+ }
1005
+ try {
1006
+ window.document.cookie = encodeURIComponent(n) + "=" + h + ";";
1007
+ } catch {
1008
+ }
1009
+ }
1010
+ }
1011
+ function a() {
1012
+ var m;
1013
+ if (!(typeof window === I || !n)) {
1014
+ try {
1015
+ m = window.localStorage[n];
1016
+ } catch {
1017
+ }
1018
+ if (typeof m === I)
1019
+ try {
1020
+ var h = window.document.cookie, f = encodeURIComponent(n), w = h.indexOf(f + "=");
1021
+ w !== -1 && (m = /^([^;]+)/.exec(
1022
+ h.slice(w + f.length + 1)
1023
+ )[1]);
1024
+ } catch {
1025
+ }
1026
+ return t.levels[m] === void 0 && (m = void 0), m;
1027
+ }
1028
+ }
1029
+ function p() {
1030
+ if (!(typeof window === I || !n)) {
1031
+ try {
1032
+ window.localStorage.removeItem(n);
1033
+ } catch {
1034
+ }
1035
+ try {
1036
+ window.document.cookie = encodeURIComponent(n) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
1037
+ } catch {
1038
+ }
1039
+ }
1040
+ }
1041
+ function c(m) {
1042
+ var h = m;
1043
+ if (typeof h == "string" && t.levels[h.toUpperCase()] !== void 0 && (h = t.levels[h.toUpperCase()]), typeof h == "number" && h >= 0 && h <= t.levels.SILENT)
1044
+ return h;
1045
+ throw new TypeError("log.setLevel() called with invalid level: " + m);
1046
+ }
1047
+ t.name = i, t.levels = {
1048
+ TRACE: 0,
1049
+ DEBUG: 1,
1050
+ INFO: 2,
1051
+ WARN: 3,
1052
+ ERROR: 4,
1053
+ SILENT: 5
1054
+ }, t.methodFactory = e || ii, t.getLevel = function() {
1055
+ return s ?? l ?? o;
1056
+ }, t.setLevel = function(m, h) {
1057
+ return s = c(m), h !== !1 && r(s), Z.call(t);
1058
+ }, t.setDefaultLevel = function(m) {
1059
+ l = c(m), a() || t.setLevel(m, !1);
1060
+ }, t.resetLevel = function() {
1061
+ s = null, p(), Z.call(t);
1062
+ }, t.enableAll = function(m) {
1063
+ t.setLevel(t.levels.TRACE, m);
1064
+ }, t.disableAll = function(m) {
1065
+ t.setLevel(t.levels.SILENT, m);
1066
+ }, t.rebuild = function() {
1067
+ if (_ !== t && (o = c(_.getLevel())), Z.call(t), _ === t)
1068
+ for (var m in ee)
1069
+ ee[m].rebuild();
1070
+ }, o = c(
1071
+ _ ? _.getLevel() : "WARN"
1072
+ );
1073
+ var d = a();
1074
+ d != null && (s = c(d)), Z.call(t);
1075
+ }
1076
+ _ = new it();
1077
+ _.getLogger = function(e) {
1078
+ if (typeof e != "symbol" && typeof e != "string" || e === "")
1079
+ throw new TypeError("You must supply a name when creating a logger.");
1080
+ var t = ee[e];
1081
+ return t || (t = ee[e] = new it(
1082
+ e,
1083
+ _.methodFactory
1084
+ )), t;
1085
+ };
1086
+ var oi = typeof window !== I ? window.log : void 0;
1087
+ _.noConflict = function() {
1088
+ return typeof window !== I && window.log === _ && (window.log = oi), _;
1089
+ };
1090
+ _.getLoggers = function() {
1091
+ return ee;
1092
+ };
1093
+ _.default = _;
1094
+ var li = function(i) {
1095
+ for (var e = 1, t = arguments.length, o; e < t; e++)
1096
+ for (o in arguments[e])
1097
+ Object.prototype.hasOwnProperty.call(arguments[e], o) && (i[o] = arguments[e][o]);
1098
+ return i;
1099
+ }, si = {
1100
+ template: "[%t] %l:",
1101
+ levelFormatter: function(i) {
1102
+ return i.toUpperCase();
961
1103
  },
962
- info: (i, ...e) => {
963
- E++, console.info(
964
- `%c[MultiSelect ${E}]%c ${i}`,
965
- "color: #10b981; font-weight: bold;",
966
- "color: inherit;",
967
- ...e
968
- );
1104
+ nameFormatter: function(i) {
1105
+ return i || "root";
969
1106
  },
970
- warn: (i, ...e) => {
971
- E++, console.warn(
972
- `%c[MultiSelect ${E}]%c ${i}`,
973
- "color: #f59e0b; font-weight: bold;",
974
- "color: inherit;",
975
- ...e
976
- );
1107
+ timestampFormatter: function(i) {
1108
+ return i.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");
977
1109
  },
978
- error: (i, ...e) => {
979
- E++, console.error(
980
- `%c[MultiSelect ${E}]%c ${i}`,
981
- "color: #ef4444; font-weight: bold;",
982
- "color: inherit;",
983
- ...e
984
- );
1110
+ format: void 0
1111
+ }, ot, N = {}, ni = function(i) {
1112
+ if (!i || !i.getLogger)
1113
+ throw new TypeError("Argument is not a root logger");
1114
+ ot = i;
1115
+ }, ri = function(i, e) {
1116
+ if (!i || !i.setLevel)
1117
+ throw new TypeError("Argument is not a logger");
1118
+ var t = i.methodFactory, o = i.name || "", l = N[o] || N[""] || si;
1119
+ function s(n, r, a) {
1120
+ var p = t(n, r, a), c = N[a] || N[""], d = c.template.indexOf("%t") !== -1, m = c.template.indexOf("%l") !== -1, h = c.template.indexOf("%n") !== -1;
1121
+ return function() {
1122
+ for (var f = "", w = arguments.length, g = Array(w), b = 0; b < w; b++)
1123
+ g[b] = arguments[b];
1124
+ if (o || !N[a]) {
1125
+ var y = c.timestampFormatter(/* @__PURE__ */ new Date()), x = c.levelFormatter(n), k = c.nameFormatter(a);
1126
+ c.format ? f += c.format(x, k, y) : (f += c.template, d && (f = f.replace(/%t/, y)), m && (f = f.replace(/%l/, x)), h && (f = f.replace(/%n/, k))), g.length && typeof g[0] == "string" ? g[0] = f + " " + g[0] : g.unshift(f);
1127
+ }
1128
+ p.apply(void 0, g);
1129
+ };
1130
+ }
1131
+ return N[o] || (i.methodFactory = s), e = e || {}, e.template && (e.format = void 0), N[o] = li({}, l, e), i.setLevel(i.getLevel()), ot || i.warn(
1132
+ "It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"
1133
+ ), i;
1134
+ }, Te = {
1135
+ reg: ni,
1136
+ apply: ri
1137
+ };
1138
+ const me = {
1139
+ debug: "#0ea5e9",
1140
+ // Blue
1141
+ info: "#10b981",
1142
+ // Green
1143
+ warn: "#f59e0b",
1144
+ // Orange
1145
+ error: "#ef4444"
1146
+ // Red
1147
+ };
1148
+ Te.reg(_);
1149
+ Te.apply(_, {
1150
+ format(i, e, t) {
1151
+ return me[i.toLowerCase()], `%c[${t}]%c %c[${i}]%c ${e ? `%c[${e}]%c ` : ""}`;
1152
+ },
1153
+ timestampFormatter(i) {
1154
+ return i.toTimeString().split(" ")[0] + "." + i.getMilliseconds().toString().padStart(3, "0");
985
1155
  }
1156
+ });
1157
+ const ai = _.methodFactory;
1158
+ _.methodFactory = function(i, e, t) {
1159
+ const o = ai(i, e, t);
1160
+ return function(...l) {
1161
+ if (l.length > 0 && typeof l[0] == "string" && l[0].includes("%c")) {
1162
+ const s = me[i] || "#666", n = [
1163
+ l[0],
1164
+ `color: ${s}; font-weight: bold;`,
1165
+ // timestamp color
1166
+ "color: inherit;",
1167
+ // reset
1168
+ `color: ${s}; font-weight: bold;`,
1169
+ // level color
1170
+ "color: inherit;",
1171
+ // reset
1172
+ ...t ? [
1173
+ `color: ${s}; font-weight: bold;`,
1174
+ // name color
1175
+ "color: inherit;"
1176
+ // reset
1177
+ ] : [],
1178
+ ...l.slice(1)
1179
+ ];
1180
+ o(...n);
1181
+ } else
1182
+ o(...l);
1183
+ };
1184
+ };
1185
+ _.setLevel("silent");
1186
+ const B = _.getLogger("INIT"), S = _.getLogger("DATA"), v = _.getLogger("UI"), A = _.getLogger("INTERACTION");
1187
+ [B, S, v, A].forEach((i) => {
1188
+ Te.apply(i, {
1189
+ format(t, o, l) {
1190
+ return me[t.toLowerCase()], `%c[${l}]%c %c[${t}]%c %c[${o}]%c `;
1191
+ },
1192
+ timestampFormatter(t) {
1193
+ return t.toTimeString().split(" ")[0] + "." + t.getMilliseconds().toString().padStart(3, "0");
1194
+ }
1195
+ });
1196
+ const e = i.methodFactory;
1197
+ i.methodFactory = function(t, o, l) {
1198
+ const s = e(t, o, l);
1199
+ return function(...n) {
1200
+ if (n.length > 0 && typeof n[0] == "string" && n[0].includes("%c")) {
1201
+ const r = me[t] || "#666", a = [
1202
+ n[0],
1203
+ `color: ${r}; font-weight: bold;`,
1204
+ // timestamp
1205
+ "color: inherit;",
1206
+ `color: ${r}; font-weight: bold;`,
1207
+ // level
1208
+ "color: inherit;",
1209
+ `color: ${r}; font-weight: bold;`,
1210
+ // category name
1211
+ "color: inherit;",
1212
+ ...n.slice(1)
1213
+ ];
1214
+ s(...a);
1215
+ } else
1216
+ s(...n);
1217
+ };
1218
+ }, i.setLevel("silent");
1219
+ });
1220
+ const lt = (i) => {
1221
+ _.setLevel(i), B.setLevel(i), S.setLevel(i), v.setLevel(i), A.setLevel(i);
1222
+ }, hi = () => {
1223
+ lt("debug");
1224
+ }, ui = () => {
1225
+ lt("silent");
1226
+ }, fi = (i, e = "debug") => {
1227
+ ({
1228
+ INIT: B,
1229
+ DATA: S,
1230
+ UI: v,
1231
+ INTERACTION: A
1232
+ })[i].setLevel(e);
986
1233
  };
987
- class zt {
1234
+ class ci {
988
1235
  constructor(e, t = {}) {
989
- h(this, "element");
990
- h(this, "instanceId");
991
- h(this, "options");
992
- h(this, "isOpen", !1);
993
- h(this, "selectedValues", /* @__PURE__ */ new Set());
994
- h(this, "selectedOptions", /* @__PURE__ */ new Map());
995
- h(this, "allOptions", []);
996
- h(this, "filteredOptions", []);
997
- h(this, "hiddenInputs", []);
998
- h(this, "focusedIndex", -1);
999
- h(this, "searchTerm", "");
1000
- h(this, "isLoading", !1);
1001
- h(this, "showSelectedPopover", !1);
1002
- h(this, "selectedPopoverPlacement", null);
1003
- h(this, "dropdownPlacement", null);
1004
- h(this, "isRTL", !1);
1005
- h(this, "effectivePillsPosition", "bottom");
1006
- h(this, "justClosedViaClick", !1);
1236
+ u(this, "element");
1237
+ u(this, "instanceId");
1238
+ u(this, "options");
1239
+ u(this, "isOpen", !1);
1240
+ u(this, "selectedValues", /* @__PURE__ */ new Set());
1241
+ u(this, "selectedOptions", /* @__PURE__ */ new Map());
1242
+ u(this, "allOptions", []);
1243
+ u(this, "filteredOptions", []);
1244
+ u(this, "hiddenInputs", []);
1245
+ u(this, "focusedIndex", -1);
1246
+ u(this, "searchTerm", "");
1247
+ u(this, "isLoading", !1);
1248
+ u(this, "showSelectedPopover", !1);
1249
+ u(this, "selectedPopoverPlacement", null);
1250
+ u(this, "dropdownPlacement", null);
1251
+ u(this, "isRTL", !1);
1252
+ u(this, "effectivePillsPosition", "bottom");
1253
+ u(this, "justClosedViaClick", !1);
1007
1254
  // Floating UI cleanup functions
1008
- h(this, "dropdownCleanup", null);
1009
- h(this, "hintCleanup", null);
1010
- h(this, "selectedPopoverCleanup", null);
1255
+ u(this, "dropdownCleanup", null);
1256
+ u(this, "hintCleanup", null);
1257
+ u(this, "selectedPopoverCleanup", null);
1011
1258
  // Pill tooltip storage
1012
- h(this, "pillTooltips", /* @__PURE__ */ new Map());
1013
- h(this, "pillTooltipCleanups", /* @__PURE__ */ new Map());
1259
+ u(this, "pillTooltips", /* @__PURE__ */ new Map());
1260
+ u(this, "pillTooltipCleanups", /* @__PURE__ */ new Map());
1014
1261
  // DOM elements
1015
- h(this, "input");
1016
- h(this, "dropdown");
1017
- h(this, "pillsContainer");
1018
- h(this, "countBadge");
1019
- h(this, "hint");
1020
- h(this, "selectedPopover");
1262
+ u(this, "input");
1263
+ u(this, "dropdown");
1264
+ u(this, "pillsContainer");
1265
+ u(this, "countBadge");
1266
+ u(this, "hint");
1267
+ u(this, "selectedPopover");
1021
1268
  this.element = e, this.instanceId = `MS-${Math.random().toString(36).substr(2, 9)}`, this.options = {
1022
1269
  // String options
1023
1270
  searchHint: e.dataset.searchHint || "",
@@ -1045,6 +1292,7 @@ class zt {
1045
1292
  isSearchEnabled: e.dataset.enableSearch !== "false",
1046
1293
  isAddNewAllowed: e.dataset.allowAddNew === "true",
1047
1294
  isCountBadgeShown: e.dataset.showCountBadge === "true",
1295
+ isKeepOptionsOnSearch: e.dataset.keepOptionsOnSearch !== "false",
1048
1296
  // Data and callbacks
1049
1297
  options: [],
1050
1298
  container: void 0,
@@ -1069,6 +1317,14 @@ class zt {
1069
1317
  getItemDisplayValue(e) {
1070
1318
  return Array.isArray(e) && e.length === 2 ? String(e[1]) : this.options.displayValueMember && e[this.options.displayValueMember] !== void 0 ? String(e[this.options.displayValueMember]) : this.options.getDisplayValueCallback ? this.options.getDisplayValueCallback(e) : "[N/A]";
1071
1319
  }
1320
+ /**
1321
+ * Extract pill display value from item
1322
+ * Precedence: getPillDisplayCallback -> getItemDisplayValue()
1323
+ * This allows customizing pill text separately from dropdown display text
1324
+ */
1325
+ getItemPillDisplayValue(e) {
1326
+ return this.options.getPillDisplayCallback ? this.options.getPillDisplayCallback(e) : this.getItemDisplayValue(e);
1327
+ }
1072
1328
  /**
1073
1329
  * Extract search value from item
1074
1330
  * Precedence: searchValueMember -> getSearchValueCallback -> displayValue
@@ -1116,7 +1372,7 @@ class zt {
1116
1372
  return Array.isArray(e) ? !1 : this.options.disabledMember && e[this.options.disabledMember] !== void 0 ? !!e[this.options.disabledMember] : this.options.getDisabledCallback ? this.options.getDisabledCallback(e) : !1;
1117
1373
  }
1118
1374
  init() {
1119
- this.parseOptions(), this.buildHTML(), this.attachEvents(), this.parseInitialSelection(), f.debug(`Initialized [${this.instanceId}] with options:`, {
1375
+ this.parseOptions(), this.buildHTML(), this.attachEvents(), this.parseInitialSelection(), B.debug(`Initialized [${this.instanceId}] with options:`, {
1120
1376
  placeholder: this.options.searchPlaceholder,
1121
1377
  totalOptions: this.allOptions.length,
1122
1378
  isCloseOnSelect: this.options.isCloseOnSelect,
@@ -1131,21 +1387,21 @@ class zt {
1131
1387
  try {
1132
1388
  this.allOptions = JSON.parse(e);
1133
1389
  } catch (t) {
1134
- console.error("[MultiSelect] Failed to parse data-options:", t), this.allOptions = [];
1390
+ S.error(`[${this.instanceId}] Failed to parse data-options:`, t), this.allOptions = [];
1135
1391
  }
1136
1392
  else this.options.options && (this.allOptions = this.options.options);
1137
1393
  this.filteredOptions = [...this.allOptions];
1138
1394
  }
1139
1395
  buildHTML() {
1140
- const e = this.options.container || document.body, t = this.element.getRootNode(), l = t instanceof ShadowRoot ? t.host : this.element, o = l.getAttribute("dir") === "rtl", s = l.closest('[dir="rtl"]') !== null;
1141
- this.isRTL = o || s, console.log("[MultiSelect RTL Debug]", {
1396
+ const e = this.options.container || document.body, t = this.element.getRootNode(), o = t instanceof ShadowRoot ? t.host : this.element, l = o.getAttribute("dir") === "rtl", s = o.closest('[dir="rtl"]') !== null;
1397
+ this.isRTL = l || s, B.debug(`[${this.instanceId}] RTL Debug:`, {
1142
1398
  isShadowRoot: t instanceof ShadowRoot,
1143
- hostElement: l,
1144
- elementDir: l.getAttribute("dir"),
1145
- hasElementDir: o,
1399
+ hostElement: o,
1400
+ elementDir: o.getAttribute("dir"),
1401
+ hasElementDir: l,
1146
1402
  hasAncestorDir: s,
1147
1403
  isRTL: this.isRTL
1148
- }), this.effectivePillsPosition = this.options.pillsPosition || "bottom", this.isRTL && (this.effectivePillsPosition === "left" ? this.effectivePillsPosition = "right" : this.effectivePillsPosition === "right" && (this.effectivePillsPosition = "left")), this.element.classList.add("ml"), this.isRTL && (this.element.classList.add("ml--rtl"), console.log("[MultiSelect RTL] Added ml--rtl class to element")), (!this.options.isCheckboxesShown || !this.options.isMultipleEnabled) && this.element.classList.add("ml--no-checkboxes");
1404
+ }), this.effectivePillsPosition = this.options.pillsPosition || "bottom", this.isRTL && (this.effectivePillsPosition === "left" ? this.effectivePillsPosition = "right" : this.effectivePillsPosition === "right" && (this.effectivePillsPosition = "left")), this.element.classList.add("ml"), this.isRTL && (this.element.classList.add("ml--rtl"), B.debug(`[${this.instanceId}] Added ml--rtl class to element`)), (!this.options.isCheckboxesShown || !this.options.isMultipleEnabled) && this.element.classList.add("ml--no-checkboxes");
1149
1405
  const n = document.createElement("div");
1150
1406
  n.className = "ml__input-wrapper", this.input = document.createElement("input"), this.input.type = "text", this.input.className = "ml__input", this.input.placeholder = this.options.searchPlaceholder, this.input.autocomplete = "off", this.options.searchInputMode === "readonly" ? this.input.readOnly = !0 : this.options.searchInputMode === "hidden" && (this.input.style.display = "none");
1151
1407
  const r = document.createElement("span");
@@ -1167,33 +1423,33 @@ class zt {
1167
1423
  e += `<div class="ml__empty">${this.options.emptyMessage}</div>`;
1168
1424
  else if (this.options.isGroupsAllowed) {
1169
1425
  const t = this.groupOptions(this.filteredOptions);
1170
- Object.keys(t).forEach((l) => {
1171
- e += '<div class="ml__group">', l !== "__ungrouped__" && (e += `<div class="ml__group-label">${l}</div>`), t[l].forEach((o, s) => {
1172
- e += this.renderOption(o, s);
1426
+ Object.keys(t).forEach((o) => {
1427
+ e += '<div class="ml__group">', o !== "__ungrouped__" && (e += `<div class="ml__group-label">${o}</div>`), t[o].forEach((l, s) => {
1428
+ e += this.renderOption(l, s);
1173
1429
  }), e += "</div>";
1174
1430
  });
1175
1431
  } else
1176
- this.filteredOptions.forEach((t, l) => {
1177
- e += this.renderOption(t, l);
1432
+ this.filteredOptions.forEach((t, o) => {
1433
+ e += this.renderOption(t, o);
1178
1434
  });
1179
1435
  e += "</div>", this.dropdown.innerHTML = e;
1180
1436
  }
1181
1437
  renderOption(e, t) {
1182
- const l = this.getItemValue(e), o = this.getItemDisplayValue(e), s = this.getItemIcon(e), n = this.getItemSubtitle(e), r = this.getItemDisabled(e), a = this.selectedValues.has(String(l)), c = t === this.focusedIndex, p = ["ml__option"];
1183
- a && p.push("ml__option--selected"), c && p.push("ml__option--focused"), r && p.push("ml__option--disabled");
1184
- let d = `<div class="${p.join(" ")}" data-value="${l}" data-index="${t}">`;
1185
- return this.options.isCheckboxesShown && this.options.isMultipleEnabled && (d += `<input type="checkbox" class="ml__checkbox" ${a ? "checked" : ""} ${r ? "disabled" : ""}>`), d += '<div class="ml__option-content">', s && (d += `<span class="ml__option-icon">${s}</span>`), d += '<div class="ml__option-text">', d += `<div class="ml__option-title">${this.highlightMatch(o, this.searchTerm)}</div>`, n && (d += `<div class="ml__option-subtitle">${n}</div>`), d += "</div>", d += "</div>", d += "</div>", d;
1438
+ const o = this.getItemValue(e), l = this.getItemDisplayValue(e), s = this.getItemIcon(e), n = this.getItemSubtitle(e), r = this.getItemDisabled(e), a = this.selectedValues.has(String(o)), p = t === this.focusedIndex, c = ["ml__option"];
1439
+ a && c.push("ml__option--selected"), p && c.push("ml__option--focused"), r && c.push("ml__option--disabled");
1440
+ let d = `<div class="${c.join(" ")}" data-value="${o}" data-index="${t}">`;
1441
+ return this.options.isCheckboxesShown && this.options.isMultipleEnabled && (d += `<input type="checkbox" class="ml__checkbox" ${a ? "checked" : ""} ${r ? "disabled" : ""}>`), d += '<div class="ml__option-content">', s && (d += `<span class="ml__option-icon">${s}</span>`), d += '<div class="ml__option-text">', d += `<div class="ml__option-title">${this.highlightMatch(l, this.searchTerm)}</div>`, n && (d += `<div class="ml__option-subtitle">${n}</div>`), d += "</div>", d += "</div>", d += "</div>", d;
1186
1442
  }
1187
1443
  highlightMatch(e, t) {
1188
1444
  if (!t) return e;
1189
- const l = new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
1190
- return e.replace(l, "<mark>$1</mark>");
1445
+ const o = new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
1446
+ return e.replace(o, "<mark>$1</mark>");
1191
1447
  }
1192
1448
  groupOptions(e) {
1193
1449
  const t = {};
1194
- return e.forEach((l) => {
1195
- const o = this.getItemGroup(l) || "__ungrouped__";
1196
- t[o] || (t[o] = []), t[o].push(l);
1450
+ return e.forEach((o) => {
1451
+ const l = this.getItemGroup(o) || "__ungrouped__";
1452
+ t[l] || (t[l] = []), t[l].push(o);
1197
1453
  }), t;
1198
1454
  }
1199
1455
  renderPills() {
@@ -1202,25 +1458,25 @@ class zt {
1202
1458
  if (!this.options.isMultipleEnabled) {
1203
1459
  this.pillsContainer.innerHTML = "", this.countBadge.style.display = "none";
1204
1460
  const s = e[0] ? this.getItemDisplayValue(e[0]) : void 0;
1205
- f.warn(`[${this.instanceId}] renderPills() single-select mode`, {
1461
+ v.warn(`[${this.instanceId}] renderPills() single-select mode`, {
1206
1462
  isOpen: this.isOpen,
1207
1463
  count: t,
1208
1464
  selectedOptionsLength: e.length,
1209
1465
  willSetValue: !this.isOpen && t > 0 && e.length > 0,
1210
1466
  selectedLabel: s
1211
- }), !this.isOpen && t > 0 && e.length > 0 ? (f.info(`[${this.instanceId}] ✅ SETTING input.value = "${s}"`), this.input.value = s, f.info(`[${this.instanceId}] 🔍 VERIFY input.value = "${this.input.value}"`)) : this.isOpen ? f.info(`[${this.instanceId}] ⏭️ SKIPPING input update (dropdown is open)`) : (f.info(`[${this.instanceId}] ❌ CLEARING input.value (no selection)`), this.input.value = "");
1467
+ }), !this.isOpen && t > 0 && e.length > 0 ? (v.info(`[${this.instanceId}] ✅ SETTING input.value = "${s}"`), this.input.value = s, v.info(`[${this.instanceId}] 🔍 VERIFY input.value = "${this.input.value}"`)) : this.isOpen ? v.info(`[${this.instanceId}] ⏭️ SKIPPING input update (dropdown is open)`) : (v.info(`[${this.instanceId}] ❌ CLEARING input.value (no selection)`), this.input.value = "");
1212
1468
  return;
1213
1469
  }
1214
- let l = this.options.pillsDisplayMode;
1215
- if (this.options.pillsThreshold !== null && t > this.options.pillsThreshold && (l = this.options.pillsThresholdMode || "count"), !this.isOpen)
1216
- if (t > 0 && l === "count") {
1470
+ let o = this.options.pillsDisplayMode;
1471
+ if (this.options.pillsThreshold !== null && t > this.options.pillsThreshold && (o = this.options.pillsThresholdMode || "count"), !this.isOpen)
1472
+ if (t > 0 && o === "count") {
1217
1473
  const s = this.options.getCountPillCallback ? this.options.getCountPillCallback(t) : `${t} selected`;
1218
1474
  this.input.placeholder = s;
1219
1475
  } else
1220
1476
  this.input.placeholder = this.options.searchPlaceholder;
1221
- if (this.options.isCountBadgeShown && t > 0 ? (this.countBadge.textContent = `[${t}]`, this.countBadge.style.display = "") : this.countBadge.style.display = "none", l === "pills")
1477
+ if (this.options.isCountBadgeShown && t > 0 ? (this.countBadge.textContent = `[${t}]`, this.countBadge.style.display = "") : this.countBadge.style.display = "none", o === "pills")
1222
1478
  this.pillsContainer.className = `ml__pills ml__pills--${this.effectivePillsPosition}`, this.pillsContainer.innerHTML = e.map((s) => {
1223
- const n = this.getItemValue(s), r = this.getItemDisplayValue(s);
1479
+ const n = this.getItemValue(s), r = this.getItemPillDisplayValue(s);
1224
1480
  return `
1225
1481
  <div class="ml__pill">
1226
1482
  <span class="ml__pill-text">${r}</span>
@@ -1228,10 +1484,10 @@ class zt {
1228
1484
  </div>
1229
1485
  `;
1230
1486
  }).join("");
1231
- else if (l === "partial") {
1487
+ else if (o === "partial") {
1232
1488
  this.pillsContainer.className = `ml__pills ml__pills--${this.effectivePillsPosition}`;
1233
- const s = this.options.pillsMaxVisible || 3, n = e.slice(0, s), r = t - s, a = n.map((p) => {
1234
- const d = this.getItemValue(p), m = this.getItemDisplayValue(p);
1489
+ const s = this.options.pillsMaxVisible || 3, n = e.slice(0, s), r = t - s, a = n.map((c) => {
1490
+ const d = this.getItemValue(c), m = this.getItemPillDisplayValue(c);
1235
1491
  return `
1236
1492
  <div class="ml__pill">
1237
1493
  <span class="ml__pill-text">${m}</span>
@@ -1239,13 +1495,13 @@ class zt {
1239
1495
  </div>
1240
1496
  `;
1241
1497
  }).join("");
1242
- let c = "";
1243
- r > 0 && (c = `
1498
+ let p = "";
1499
+ r > 0 && (p = `
1244
1500
  <div class="ml__pill ml__pill--more" data-action="show-selected">
1245
1501
  <span class="ml__pill-text">${this.options.getCountPillCallback ? this.options.getCountPillCallback(t, r) : `+${r} more`}</span>
1246
1502
  <button type="button" class="ml__pill-remove" data-action="remove-hidden" aria-label="Remove ${r} hidden items"></button>
1247
1503
  </div>
1248
- `), this.pillsContainer.innerHTML = a + c;
1504
+ `), this.pillsContainer.innerHTML = a + p;
1249
1505
  } else if (this.pillsContainer.className = `ml__count-display ml__count-display--${this.effectivePillsPosition}`, t > 0) {
1250
1506
  const s = this.options.getCountPillCallback ? this.options.getCountPillCallback(t) : `${t} selected`;
1251
1507
  this.pillsContainer.innerHTML = `
@@ -1283,16 +1539,28 @@ class zt {
1283
1539
  async handleSearch(e) {
1284
1540
  if (this.searchTerm = e, !!this.options.isSearchEnabled)
1285
1541
  if (this.options.searchCallback) {
1286
- if (e.length < this.options.minSearchLength) {
1287
- this.filteredOptions = [], this.allOptions = [], this.renderDropdown();
1542
+ let t = e;
1543
+ if (this.options.beforeSearchCallback) {
1544
+ const o = this.options.beforeSearchCallback(e);
1545
+ if (o === null) {
1546
+ S.debug(`[${this.instanceId}] beforeSearchCallback blocked search for term:`, e), this.options.isKeepOptionsOnSearch ? this.filteredOptions = [...this.allOptions] : this.filteredOptions = [], this.renderDropdown();
1547
+ return;
1548
+ }
1549
+ t = o, t !== e && S.debug(`[${this.instanceId}] beforeSearchCallback transformed: "${e}" -> "${t}"`);
1550
+ }
1551
+ if (t.length < this.options.minSearchLength) {
1552
+ this.isLoading = !1, this.options.isKeepOptionsOnSearch ? (this.filteredOptions = [...this.allOptions], S.debug(`[${this.instanceId}] Search term below minimum, showing ${this.allOptions.length} initial options`)) : this.filteredOptions = [], this.renderDropdown();
1288
1553
  return;
1289
1554
  }
1290
- this.isLoading = !0, this.renderDropdown(), f.debug(`[${this.instanceId}] Loading data for search term:`, e);
1555
+ this.isLoading = !0, this.renderDropdown(), S.debug(`[${this.instanceId}] Loading data for search term:`, t);
1291
1556
  try {
1292
- const t = await this.options.searchCallback(e);
1293
- this.searchTerm === e && (this.allOptions = t || [], this.filteredOptions = [...this.allOptions], this.isLoading = !1, this.focusedIndex = this.options.isSearchEnabled && this.filteredOptions.length > 0 ? 0 : -1, this.renderDropdown(), f.debug(`[${this.instanceId}] Loaded ${this.allOptions.length} results`));
1294
- } catch (t) {
1295
- f.error(`[${this.instanceId}] Error loading data:`, t), this.isLoading = !1, this.filteredOptions = [], this.allOptions = [], this.renderDropdown();
1557
+ const o = await this.options.searchCallback(t);
1558
+ if (this.searchTerm === e) {
1559
+ const l = o || [];
1560
+ this.filteredOptions = [...l], this.isLoading = !1, this.focusedIndex = this.options.isSearchEnabled && this.filteredOptions.length > 0 ? 0 : -1, this.renderDropdown(), S.debug(`[${this.instanceId}] Loaded ${l.length} results`);
1561
+ }
1562
+ } catch (o) {
1563
+ S.error(`[${this.instanceId}] Error loading data:`, o), this.isLoading = !1, this.options.isKeepOptionsOnSearch ? this.filteredOptions = [...this.allOptions] : this.filteredOptions = [], this.renderDropdown();
1296
1564
  }
1297
1565
  } else
1298
1566
  e ? this.filteredOptions = this.allOptions.filter((t) => this.getItemSearchValue(t).toLowerCase().includes(e.toLowerCase())) : this.filteredOptions = [...this.allOptions], this.focusedIndex = this.options.isSearchEnabled && this.filteredOptions.length > 0 ? 0 : -1, this.renderDropdown();
@@ -1303,8 +1571,8 @@ class zt {
1303
1571
  return;
1304
1572
  }
1305
1573
  if (!this.options.isSearchEnabled) {
1306
- const t = e.key.length === 1 || e.key === "Backspace" || e.key === "Delete", l = ["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", "Enter", "Escape", "Tab"].includes(e.key);
1307
- if (t && !l) {
1574
+ const t = e.key.length === 1 || e.key === "Backspace" || e.key === "Delete", o = ["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", "Enter", "Escape", "Tab"].includes(e.key);
1575
+ if (t && !o) {
1308
1576
  e.preventDefault();
1309
1577
  return;
1310
1578
  }
@@ -1340,20 +1608,20 @@ class zt {
1340
1608
  }
1341
1609
  }
1342
1610
  handleDropdownClick(e) {
1343
- f.debug(`[${this.instanceId}] Dropdown clicked`, { target: e.target.className }), e.stopPropagation();
1611
+ A.debug(`[${this.instanceId}] Dropdown clicked`, { target: e.target.className }), e.stopPropagation();
1344
1612
  const t = e.target.closest("[data-action]");
1345
1613
  if (t) {
1346
1614
  e.preventDefault();
1347
- const o = t.dataset.action;
1348
- f.debug(`[${this.instanceId}] Action button clicked:`, o), o === "select-all" ? this.selectAll() : o === "clear-all" && this.clearAll();
1615
+ const l = t.dataset.action;
1616
+ A.debug(`[${this.instanceId}] Action button clicked:`, l), l === "select-all" ? this.selectAll() : l === "clear-all" && this.clearAll();
1349
1617
  return;
1350
1618
  }
1351
- const l = e.target.closest(".ml__option");
1352
- if (l && !l.classList.contains("ml__option--disabled")) {
1619
+ const o = e.target.closest(".ml__option");
1620
+ if (o && !o.classList.contains("ml__option--disabled")) {
1353
1621
  e.preventDefault();
1354
- const o = l.dataset.value, s = this.filteredOptions.find((n) => String(this.getItemValue(n)) === o);
1355
- f.debug(`[${this.instanceId}] Option clicked:`, {
1356
- value: o,
1622
+ const l = o.dataset.value, s = this.filteredOptions.find((n) => String(this.getItemValue(n)) === l);
1623
+ A.debug(`[${this.instanceId}] Option clicked:`, {
1624
+ value: l,
1357
1625
  closeOnSelect: this.options.isCloseOnSelect,
1358
1626
  placeholder: this.options.searchPlaceholder
1359
1627
  }), s && this.toggleOption(s);
@@ -1361,53 +1629,53 @@ class zt {
1361
1629
  }
1362
1630
  handlePillClick(e) {
1363
1631
  if (e.target.closest(".ml__count-clear")) {
1364
- e.preventDefault(), e.stopPropagation(), f.debug(`[${this.instanceId}] Count clear button clicked`), this.clearAll();
1632
+ e.preventDefault(), e.stopPropagation(), A.debug(`[${this.instanceId}] Count clear button clicked`), this.clearAll();
1365
1633
  return;
1366
1634
  }
1367
1635
  if (e.target.closest(".ml__count-text")) {
1368
1636
  e.preventDefault(), e.stopPropagation(), this.toggleSelectedPopover();
1369
1637
  return;
1370
1638
  }
1371
- const o = e.target.closest(".ml__pill-remove");
1372
- if (o) {
1373
- if (e.preventDefault(), e.stopPropagation(), o.dataset.action === "remove-hidden") {
1374
- f.debug(`[${this.instanceId}] Remove hidden items button clicked`);
1639
+ const l = e.target.closest(".ml__pill-remove");
1640
+ if (l) {
1641
+ if (e.preventDefault(), e.stopPropagation(), l.dataset.action === "remove-hidden") {
1642
+ A.debug(`[${this.instanceId}] Remove hidden items button clicked`);
1375
1643
  const a = this.options.pillsMaxVisible || 3;
1376
1644
  Array.from(this.selectedOptions.values()).slice(a).forEach((d) => this.deselectOption(d));
1377
1645
  return;
1378
1646
  }
1379
- const n = o.dataset.value, r = this.selectedOptions.get(n);
1647
+ const n = l.dataset.value, r = this.selectedOptions.get(n);
1380
1648
  r && this.deselectOption(r);
1381
1649
  return;
1382
1650
  }
1383
1651
  if (e.target.closest(".ml__pill--more") && !e.target.closest(".ml__pill-remove")) {
1384
- e.preventDefault(), e.stopPropagation(), f.debug(`[${this.instanceId}] '+X more' badge clicked, showing popover`), this.toggleSelectedPopover();
1652
+ e.preventDefault(), e.stopPropagation(), A.debug(`[${this.instanceId}] '+X more' badge clicked, showing popover`), this.toggleSelectedPopover();
1385
1653
  return;
1386
1654
  }
1387
1655
  }
1388
1656
  handleClickOutside(e) {
1389
- var o;
1657
+ var l;
1390
1658
  const t = e.composedPath();
1391
1659
  if (this.showSelectedPopover && !t.some(
1392
1660
  (n) => n instanceof Node && (this.selectedPopover.contains(n) || this.countBadge.contains(n) || n.closest && n.closest(".ml__count-text"))
1393
1661
  )) {
1394
- f.debug(`[${this.instanceId}] Closing selected popover due to click outside`), this.hideSelectedPopover();
1662
+ v.debug(`[${this.instanceId}] Closing selected popover due to click outside`), this.hideSelectedPopover();
1395
1663
  return;
1396
1664
  }
1397
1665
  if (!this.isOpen) return;
1398
- const l = t.some(
1666
+ const o = t.some(
1399
1667
  (s) => s instanceof Node && (this.element.contains(s) || this.dropdown.contains(s) || this.hint && this.hint.contains(s))
1400
1668
  );
1401
- f.debug(`[${this.instanceId}] handleClickOutside`, {
1669
+ A.debug(`[${this.instanceId}] handleClickOutside`, {
1402
1670
  target: e.target.className,
1403
1671
  targetTag: e.target.tagName,
1404
- clickedInside: l,
1672
+ clickedInside: o,
1405
1673
  pathLength: t.length,
1406
- firstInPath: (o = t[0]) == null ? void 0 : o.tagName,
1674
+ firstInPath: (l = t[0]) == null ? void 0 : l.tagName,
1407
1675
  elementContains: t.some((s) => s instanceof Node && this.element.contains(s)),
1408
1676
  dropdownContains: t.some((s) => s instanceof Node && this.dropdown.contains(s)),
1409
1677
  isConnected: this.dropdown.isConnected
1410
- }), l || (f.warn(`[${this.instanceId}] Closing dropdown due to click outside`), this.close());
1678
+ }), o || (A.warn(`[${this.instanceId}] Closing dropdown due to click outside`), this.close());
1411
1679
  }
1412
1680
  focusNext() {
1413
1681
  this.filteredOptions.length !== 0 && (this.focusedIndex = (this.focusedIndex + 1) % this.filteredOptions.length, this.renderDropdown(), this.scrollToFocused());
@@ -1432,40 +1700,40 @@ class zt {
1432
1700
  e && e.scrollIntoView({ block: "nearest", behavior: "smooth" });
1433
1701
  }
1434
1702
  toggleOption(e) {
1435
- const t = this.getItemValue(e), l = String(t);
1436
- if (f.debug(`[${this.instanceId}] toggleOption called`, { value: t, multiple: this.options.isMultipleEnabled }), !this.options.isMultipleEnabled) {
1437
- this.selectedValues.has(l) ? (f.debug(`[${this.instanceId}] Deselecting option in single-select mode`, { value: t }), this.deselectOption(e)) : (f.debug(`[${this.instanceId}] Clearing previous selections and selecting new option`, { value: t }), this.selectedValues.clear(), this.selectedOptions.clear(), this.selectOption(e)), f.info(`[${this.instanceId}] ❌ Closing dropdown (single-select mode)`), this.close();
1703
+ const t = this.getItemValue(e), o = String(t);
1704
+ if (A.debug(`[${this.instanceId}] toggleOption called`, { value: t, multiple: this.options.isMultipleEnabled }), !this.options.isMultipleEnabled) {
1705
+ this.selectedValues.has(o) ? (A.debug(`[${this.instanceId}] Deselecting option in single-select mode`, { value: t }), this.deselectOption(e)) : (A.debug(`[${this.instanceId}] Clearing previous selections and selecting new option`, { value: t }), this.selectedValues.clear(), this.selectedOptions.clear(), this.selectOption(e)), v.info(`[${this.instanceId}] ❌ Closing dropdown (single-select mode)`), this.close();
1438
1706
  return;
1439
1707
  }
1440
- this.selectedValues.has(l) ? (f.debug(`[${this.instanceId}] Deselecting option`, { value: t }), this.deselectOption(e)) : (f.debug(`[${this.instanceId}] Selecting option`, { value: t }), this.selectOption(e)), f.debug(`[${this.instanceId}] Checking closeOnSelect`, {
1708
+ this.selectedValues.has(o) ? (A.debug(`[${this.instanceId}] Deselecting option`, { value: t }), this.deselectOption(e)) : (A.debug(`[${this.instanceId}] Selecting option`, { value: t }), this.selectOption(e)), A.debug(`[${this.instanceId}] Checking closeOnSelect`, {
1441
1709
  closeOnSelect: this.options.isCloseOnSelect,
1442
1710
  willClose: this.options.isCloseOnSelect === !0,
1443
1711
  placeholder: this.options.searchPlaceholder
1444
- }), this.options.isCloseOnSelect ? (f.info(`[${this.instanceId}] ❌ Closing dropdown (closeOnSelect=true)`), this.close()) : f.info(`[${this.instanceId}] ✅ Keeping dropdown open (closeOnSelect=false)`);
1712
+ }), this.options.isCloseOnSelect ? (v.info(`[${this.instanceId}] ❌ Closing dropdown (closeOnSelect=true)`), this.close()) : v.info(`[${this.instanceId}] ✅ Keeping dropdown open (closeOnSelect=false)`);
1445
1713
  }
1446
1714
  async handleAddNew(e) {
1447
1715
  if (this.options.addNewCallback)
1448
1716
  try {
1449
- f.debug(`[${this.instanceId}] Adding new option:`, e);
1717
+ S.debug(`[${this.instanceId}] Adding new option:`, e);
1450
1718
  const t = await this.options.addNewCallback(e);
1451
1719
  this.allOptions.push(t), this.filteredOptions.push(t), this.selectOption(t), this.input.value = "", this.renderDropdown(), this.renderPills(), this.options.isCloseOnSelect && this.close();
1452
1720
  } catch (t) {
1453
- f.error(`[${this.instanceId}] Error adding new option:`, t);
1721
+ S.error(`[${this.instanceId}] Error adding new option:`, t);
1454
1722
  }
1455
1723
  }
1456
1724
  selectOption(e) {
1457
- const t = this.getItemValue(e), l = String(t);
1458
- this.selectedValues.add(l), this.selectedOptions.set(l, e), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.selectCallback && this.options.selectCallback(e), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1725
+ const t = this.getItemValue(e), o = String(t);
1726
+ this.selectedValues.add(o), this.selectedOptions.set(o, e), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.selectCallback && this.options.selectCallback(e), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1459
1727
  }
1460
1728
  deselectOption(e) {
1461
- const t = this.getItemValue(e), l = String(t);
1462
- this.selectedValues.delete(l), this.selectedOptions.delete(l), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.deselectCallback && this.options.deselectCallback(e), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1729
+ const t = this.getItemValue(e), o = String(t);
1730
+ this.selectedValues.delete(o), this.selectedOptions.delete(o), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.deselectCallback && this.options.deselectCallback(e), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1463
1731
  }
1464
1732
  selectAll() {
1465
1733
  this.filteredOptions.forEach((e) => {
1466
1734
  if (!this.getItemDisabled(e)) {
1467
- const t = this.getItemValue(e), l = String(t);
1468
- this.selectedValues.add(l), this.selectedOptions.set(l, e);
1735
+ const t = this.getItemValue(e), o = String(t);
1736
+ this.selectedValues.add(o), this.selectedOptions.set(o, e);
1469
1737
  }
1470
1738
  }), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1471
1739
  }
@@ -1473,37 +1741,37 @@ class zt {
1473
1741
  this.selectedValues.clear(), this.selectedOptions.clear(), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1474
1742
  }
1475
1743
  open() {
1476
- f.debug(`[${this.instanceId}] open() called`, { isOpen: this.isOpen }), !this.isOpen && (this.isOpen = !0, this.element.classList.add("ml--open"), this.dropdown.classList.add("ml__dropdown--visible"), f.info(`[${this.instanceId}] Dropdown opened`), this.input.placeholder = this.options.searchPlaceholder, !this.options.isMultipleEnabled && this.options.isSearchEnabled && (this.input.value = ""), this.renderDropdown(), this.positionDropdown(), this.hint && (this.hint.classList.add("ml__hint--visible"), this.positionHint()));
1744
+ v.debug(`[${this.instanceId}] open() called`, { isOpen: this.isOpen }), !this.isOpen && (this.isOpen = !0, this.element.classList.add("ml--open"), this.dropdown.classList.add("ml__dropdown--visible"), v.info(`[${this.instanceId}] Dropdown opened`), this.input.placeholder = this.options.searchPlaceholder, !this.options.isMultipleEnabled && this.options.isSearchEnabled && (this.input.value = ""), this.options.searchCallback && this.options.isKeepOptionsOnSearch && !this.searchTerm && (this.filteredOptions = [...this.allOptions], v.debug(`[${this.instanceId}] Showing ${this.allOptions.length} initial options on open`)), this.renderDropdown(), this.positionDropdown(), this.hint && (this.hint.classList.add("ml__hint--visible"), this.positionHint()));
1477
1745
  }
1478
1746
  close() {
1479
- if (f.debug(`[${this.instanceId}] close() called`, { isOpen: this.isOpen }), !this.isOpen) return;
1747
+ if (v.debug(`[${this.instanceId}] close() called`, { isOpen: this.isOpen }), !this.isOpen) return;
1480
1748
  this.isOpen = !1, this.element.classList.remove("ml--open"), this.dropdown.classList.remove("ml__dropdown--visible"), this.hint && this.hint.classList.remove("ml__hint--visible"), this.searchTerm = "";
1481
1749
  const e = this.options.isMultipleEnabled || this.options.isSearchEnabled;
1482
- f.warn(`[${this.instanceId}] close() - input clearing decision`, {
1750
+ v.warn(`[${this.instanceId}] close() - input clearing decision`, {
1483
1751
  multiple: this.options.isMultipleEnabled,
1484
1752
  enableSearch: this.options.isSearchEnabled,
1485
1753
  willClearInput: e,
1486
1754
  currentInputValue: this.input.value
1487
- }), e ? (f.info(`[${this.instanceId}] 🧹 close() CLEARING input.value`), this.input.value = "") : f.info(`[${this.instanceId}] 🔒 close() KEEPING input.value = "${this.input.value}"`), this.filteredOptions = [...this.allOptions], this.focusedIndex = -1, f.info(`[${this.instanceId}] 📞 close() CALLING renderPills()`), this.renderPills(), f.info(`[${this.instanceId}] ✅ close() AFTER renderPills(), input.value = "${this.input.value}"`), this.dropdownCleanup && (this.dropdownCleanup(), this.dropdownCleanup = null), this.hintCleanup && (this.hintCleanup(), this.hintCleanup = null), this.dropdownPlacement = null, f.info(`[${this.instanceId}] Dropdown closed. Stack trace:`), console.trace();
1755
+ }), e ? (v.info(`[${this.instanceId}] 🧹 close() CLEARING input.value`), this.input.value = "") : v.info(`[${this.instanceId}] 🔒 close() KEEPING input.value = "${this.input.value}"`), this.filteredOptions = [...this.allOptions], this.focusedIndex = -1, v.info(`[${this.instanceId}] 📞 close() CALLING renderPills()`), this.renderPills(), v.info(`[${this.instanceId}] ✅ close() AFTER renderPills(), input.value = "${this.input.value}"`), this.dropdownCleanup && (this.dropdownCleanup(), this.dropdownCleanup = null), this.hintCleanup && (this.hintCleanup(), this.hintCleanup = null), this.dropdownPlacement = null, v.info(`[${this.instanceId}] Dropdown closed. Stack trace:`), v.trace();
1488
1756
  }
1489
1757
  positionDropdown() {
1490
- this.dropdownCleanup = q(
1758
+ this.dropdownCleanup = le(
1491
1759
  this.input,
1492
1760
  this.dropdown,
1493
1761
  () => {
1494
1762
  const e = this.options.isPlacementLocked && this.dropdownPlacement ? this.dropdownPlacement : "bottom-start", t = [
1495
- Z(4),
1496
- ...this.options.isPlacementLocked && this.dropdownPlacement ? [] : [me()],
1497
- Q({ padding: 8 })
1763
+ se(4),
1764
+ ...this.options.isPlacementLocked && this.dropdownPlacement ? [] : [xe()],
1765
+ ne({ padding: 8 })
1498
1766
  ];
1499
- ee(this.input, this.dropdown, {
1767
+ re(this.input, this.dropdown, {
1500
1768
  placement: e,
1501
1769
  middleware: t
1502
- }).then(({ x: l, y: o, placement: s }) => {
1503
- this.options.isPlacementLocked && !this.dropdownPlacement && (this.dropdownPlacement = s, f.debug(`[${this.instanceId}] Locked dropdown placement:`, s));
1770
+ }).then(({ x: o, y: l, placement: s }) => {
1771
+ this.options.isPlacementLocked && !this.dropdownPlacement && (this.dropdownPlacement = s, v.debug(`[${this.instanceId}] Locked dropdown placement:`, s));
1504
1772
  const n = {
1505
- left: `${l}px`,
1506
- top: `${o}px`,
1773
+ left: `${o}px`,
1774
+ top: `${l}px`,
1507
1775
  width: `${this.input.offsetWidth}px`
1508
1776
  };
1509
1777
  this.options.dropdownMinWidth && (n.minWidth = this.options.dropdownMinWidth), Object.assign(this.dropdown.style, n), this.hint && this.isOpen && this.positionHint();
@@ -1512,22 +1780,22 @@ class zt {
1512
1780
  );
1513
1781
  }
1514
1782
  positionHint() {
1515
- this.hint && (this.hintCleanup && this.hintCleanup(), this.hintCleanup = q(
1783
+ this.hint && (this.hintCleanup && this.hintCleanup(), this.hintCleanup = le(
1516
1784
  this.input,
1517
1785
  this.hint,
1518
1786
  () => {
1519
1787
  let e = "top-start";
1520
- this.dropdownPlacement && (this.dropdownPlacement.startsWith("bottom") ? e = this.dropdownPlacement.replace("bottom", "top") : this.dropdownPlacement.startsWith("top") && (e = this.dropdownPlacement.replace("top", "bottom"))), ee(this.input, this.hint, {
1788
+ this.dropdownPlacement && (this.dropdownPlacement.startsWith("bottom") ? e = this.dropdownPlacement.replace("bottom", "top") : this.dropdownPlacement.startsWith("top") && (e = this.dropdownPlacement.replace("top", "bottom"))), re(this.input, this.hint, {
1521
1789
  placement: e,
1522
1790
  middleware: [
1523
- Z(4),
1791
+ se(4),
1524
1792
  // Don't use flip() - we want hint to stay opposite of dropdown
1525
- Q({ padding: 8 })
1793
+ ne({ padding: 8 })
1526
1794
  ]
1527
- }).then(({ x: t, y: l }) => {
1795
+ }).then(({ x: t, y: o }) => {
1528
1796
  Object.assign(this.hint.style, {
1529
1797
  left: `${t}px`,
1530
- top: `${l}px`
1798
+ top: `${o}px`
1531
1799
  });
1532
1800
  });
1533
1801
  }
@@ -1537,24 +1805,24 @@ class zt {
1537
1805
  const e = this.element.dataset.initialValues;
1538
1806
  if (e)
1539
1807
  try {
1540
- JSON.parse(e).forEach((l) => {
1541
- const o = String(l);
1542
- this.selectedValues.add(o);
1543
- const s = this.allOptions.find((n) => String(this.getItemValue(n)) === o);
1544
- s && this.selectedOptions.set(o, s);
1808
+ JSON.parse(e).forEach((o) => {
1809
+ const l = String(o);
1810
+ this.selectedValues.add(l);
1811
+ const s = this.allOptions.find((n) => String(this.getItemValue(n)) === l);
1812
+ s && this.selectedOptions.set(l, s);
1545
1813
  }), this.renderPills();
1546
1814
  } catch (t) {
1547
- console.error("[MultiSelect] Failed to parse initial values:", t);
1815
+ S.error(`[${this.instanceId}] Failed to parse initial values:`, t);
1548
1816
  }
1549
1817
  }
1550
1818
  toggleSelectedPopover() {
1551
1819
  this.showSelectedPopover ? this.hideSelectedPopover() : this.showPopover();
1552
1820
  }
1553
1821
  showPopover() {
1554
- f.debug(`[${this.instanceId}] showPopover() called`), this.isOpen && this.close(), this.showSelectedPopover = !0, this.renderSelectedPopover(), this.selectedPopover.classList.add("ml__selected-popover--visible"), this.positionSelectedPopover();
1822
+ v.debug(`[${this.instanceId}] showPopover() called`), this.isOpen && this.close(), this.showSelectedPopover = !0, this.renderSelectedPopover(), this.selectedPopover.classList.add("ml__selected-popover--visible"), this.positionSelectedPopover();
1555
1823
  }
1556
1824
  hideSelectedPopover() {
1557
- f.debug(`[${this.instanceId}] hideSelectedPopover() called`), this.showSelectedPopover = !1, this.selectedPopover.classList.remove("ml__selected-popover--visible"), this.selectedPopoverPlacement = null, this.selectedPopoverCleanup && (this.selectedPopoverCleanup(), this.selectedPopoverCleanup = null);
1825
+ v.debug(`[${this.instanceId}] hideSelectedPopover() called`), this.showSelectedPopover = !1, this.selectedPopover.classList.remove("ml__selected-popover--visible"), this.selectedPopoverPlacement = null, this.selectedPopoverCleanup && (this.selectedPopoverCleanup(), this.selectedPopoverCleanup = null);
1558
1826
  }
1559
1827
  renderSelectedPopover() {
1560
1828
  const e = Array.from(this.selectedOptions.values()), t = this.selectedValues.size;
@@ -1564,12 +1832,12 @@ class zt {
1564
1832
  <button type="button" class="ml__selected-popover-close" aria-label="Close">&times;</button>
1565
1833
  </div>
1566
1834
  <div class="ml__selected-popover-body">
1567
- ${e.map((l) => {
1568
- const o = this.getItemValue(l), s = this.getItemDisplayValue(l);
1835
+ ${e.map((o) => {
1836
+ const l = this.getItemValue(o), s = this.getItemPillDisplayValue(o);
1569
1837
  return `
1570
1838
  <div class="ml__pill">
1571
1839
  <span class="ml__pill-text">${s}</span>
1572
- <button type="button" class="ml__pill-remove" data-value="${o}" aria-label="Remove ${s}"></button>
1840
+ <button type="button" class="ml__pill-remove" data-value="${l}" aria-label="Remove ${s}"></button>
1573
1841
  </div>
1574
1842
  `;
1575
1843
  }).join("")}
@@ -1581,31 +1849,31 @@ class zt {
1581
1849
  e.preventDefault(), this.hideSelectedPopover();
1582
1850
  return;
1583
1851
  }
1584
- const l = e.target.closest(".ml__pill-remove");
1585
- if (l) {
1852
+ const o = e.target.closest(".ml__pill-remove");
1853
+ if (o) {
1586
1854
  e.preventDefault();
1587
- const o = l.dataset.value, s = this.selectedOptions.get(o);
1855
+ const l = o.dataset.value, s = this.selectedOptions.get(l);
1588
1856
  s && (this.deselectOption(s), this.renderSelectedPopover(), this.selectedValues.size === 0 && this.hideSelectedPopover());
1589
1857
  }
1590
1858
  }
1591
1859
  positionSelectedPopover() {
1592
- this.selectedPopoverCleanup = q(
1860
+ this.selectedPopoverCleanup = le(
1593
1861
  this.input,
1594
1862
  this.selectedPopover,
1595
1863
  () => {
1596
1864
  const e = this.selectedPopoverPlacement || "bottom-start";
1597
- ee(this.input, this.selectedPopover, {
1865
+ re(this.input, this.selectedPopover, {
1598
1866
  placement: e,
1599
1867
  middleware: [
1600
- Z(4),
1601
- ...this.selectedPopoverPlacement ? [] : [me()],
1602
- Q({ padding: 8 })
1868
+ se(4),
1869
+ ...this.selectedPopoverPlacement ? [] : [xe()],
1870
+ ne({ padding: 8 })
1603
1871
  ]
1604
- }).then(({ x: t, y: l, placement: o }) => {
1605
- this.selectedPopoverPlacement || (this.selectedPopoverPlacement = o, f.debug(`[${this.instanceId}] Locked popover placement:`, o));
1872
+ }).then(({ x: t, y: o, placement: l }) => {
1873
+ this.selectedPopoverPlacement || (this.selectedPopoverPlacement = l, v.debug(`[${this.instanceId}] Locked popover placement:`, l));
1606
1874
  const s = {
1607
1875
  left: `${t}px`,
1608
- top: `${l}px`,
1876
+ top: `${o}px`,
1609
1877
  width: `${this.input.offsetWidth}px`
1610
1878
  };
1611
1879
  this.options.dropdownMinWidth && (s.minWidth = this.options.dropdownMinWidth), Object.assign(this.selectedPopover.style, s);
@@ -1618,20 +1886,20 @@ class zt {
1618
1886
  // ========================================================================
1619
1887
  updateHiddenInput() {
1620
1888
  if (!this.options.formFieldId) return;
1621
- this.hiddenInputs.forEach((o) => o.remove()), this.hiddenInputs = [];
1622
- const e = this.options.valueFormat || "json", t = Array.from(this.selectedOptions.values()).map((o) => this.getItemValue(o)), l = this.options.hostElement || this.element;
1889
+ this.hiddenInputs.forEach((l) => l.remove()), this.hiddenInputs = [];
1890
+ const e = this.options.valueFormat || "json", t = Array.from(this.selectedOptions.values()).map((l) => this.getItemValue(l)), o = this.options.hostElement || this.element;
1623
1891
  if (e === "array")
1624
- t.forEach((o) => {
1892
+ t.forEach((l) => {
1625
1893
  const s = document.createElement("input");
1626
- s.type = "hidden", s.name = `${this.options.formFieldId}[]`, s.value = String(o), l.appendChild(s), this.hiddenInputs.push(s);
1894
+ s.type = "hidden", s.name = `${this.options.formFieldId}[]`, s.value = String(l), o.appendChild(s), this.hiddenInputs.push(s);
1627
1895
  });
1628
1896
  else {
1629
- const o = document.createElement("input");
1630
- o.type = "hidden", o.name = this.options.formFieldId, o.id = this.options.formFieldId, o.value = this.getFormValue(), l.appendChild(o), this.hiddenInputs.push(o);
1897
+ const l = document.createElement("input");
1898
+ l.type = "hidden", l.name = this.options.formFieldId, l.id = this.options.formFieldId, l.value = this.getFormValue(), o.appendChild(l), this.hiddenInputs.push(l);
1631
1899
  }
1632
1900
  }
1633
1901
  getFormValue() {
1634
- const e = Array.from(this.selectedOptions.values()).map((l) => this.getItemValue(l));
1902
+ const e = Array.from(this.selectedOptions.values()).map((o) => this.getItemValue(o));
1635
1903
  return this.options.getValueFormatCallback ? this.options.getValueFormatCallback(e) : (this.options.valueFormat || "json") === "csv" ? e.join(",") : JSON.stringify(e);
1636
1904
  }
1637
1905
  // ========================================================================
@@ -1642,8 +1910,8 @@ class zt {
1642
1910
  }
1643
1911
  setSelected(e) {
1644
1912
  this.selectedValues = new Set(e.map((t) => String(t))), this.selectedOptions.clear(), e.forEach((t) => {
1645
- const l = String(t), o = this.allOptions.find((s) => String(this.getItemValue(s)) === l);
1646
- o && this.selectedOptions.set(l, o);
1913
+ const o = String(t), l = this.allOptions.find((s) => String(this.getItemValue(s)) === o);
1914
+ l && this.selectedOptions.set(o, l);
1647
1915
  }), this.renderDropdown(), this.renderPills(), this.updateHiddenInput();
1648
1916
  }
1649
1917
  get selectedItem() {
@@ -1668,87 +1936,87 @@ class zt {
1668
1936
  // ========================================================================
1669
1937
  attachPillTooltips() {
1670
1938
  if (!this.options.isPillTooltipsEnabled) {
1671
- console.log("[Tooltips] Disabled - isPillTooltipsEnabled is false");
1939
+ v.debug(`[${this.instanceId}] Tooltips disabled - isPillTooltipsEnabled is false`);
1672
1940
  return;
1673
1941
  }
1674
1942
  const e = this.pillsContainer.querySelectorAll(".ml__pill:not(.ml__pill--more)");
1675
- console.log(`[Tooltips] Found ${e.length} pills to attach tooltips to`), e.forEach((l) => {
1676
- const o = l, s = o.querySelector(".ml__pill-remove");
1943
+ v.debug(`[${this.instanceId}] Found ${e.length} pills to attach tooltips to`), e.forEach((o) => {
1944
+ const l = o, s = l.querySelector(".ml__pill-remove");
1677
1945
  if (!s) return;
1678
1946
  const n = s.dataset.value, r = this.selectedOptions.get(n);
1679
1947
  if (!r) return;
1680
- const a = o.querySelector(".ml__pill-text");
1948
+ const a = l.querySelector(".ml__pill-text");
1681
1949
  a && this.createTooltipForElement(a, r, n);
1682
- const c = this.getItemDisplayValue(r);
1683
- this.createRemoveButtonTooltip(s, c, n);
1950
+ const p = this.getItemPillDisplayValue(r);
1951
+ this.createRemoveButtonTooltip(s, p, n);
1684
1952
  });
1685
1953
  const t = this.pillsContainer.querySelector(".ml__pill--more");
1686
1954
  if (t) {
1687
- const l = t.querySelector(".ml__pill-remove");
1688
- if (l && l.dataset.action === "remove-hidden") {
1689
- const o = this.options.pillsMaxVisible || 3, n = Array.from(this.selectedOptions.values()).length - o;
1690
- this.createRemoveButtonTooltip(l, `${n} hidden items`, "more-badge-remove");
1955
+ const o = t.querySelector(".ml__pill-remove");
1956
+ if (o && o.dataset.action === "remove-hidden") {
1957
+ const l = this.options.pillsMaxVisible || 3, n = Array.from(this.selectedOptions.values()).length - l;
1958
+ this.createRemoveButtonTooltip(o, `${n} hidden items`, "more-badge-remove");
1691
1959
  }
1692
1960
  }
1693
1961
  }
1694
- createTooltipForElement(e, t, l) {
1695
- const o = document.createElement("div");
1696
- o.className = "ml__pill-tooltip";
1962
+ createTooltipForElement(e, t, o) {
1963
+ const l = document.createElement("div");
1964
+ l.className = "ml__pill-tooltip";
1697
1965
  let s;
1698
1966
  if (this.options.getPillTooltipCallback)
1699
- s = this.options.getPillTooltipCallback(t), console.log("[Tooltips] Using custom callback for tooltip content");
1967
+ s = this.options.getPillTooltipCallback(t), v.debug(`[${this.instanceId}] Using custom callback for tooltip content`);
1700
1968
  else {
1701
- const d = this.getItemDisplayValue(t), m = this.getItemSubtitle(t);
1969
+ const d = this.getItemPillDisplayValue(t), m = this.getItemSubtitle(t);
1702
1970
  s = m ? `${d}
1703
- ${m}` : d, console.log(`[Tooltips] Using default content: "${s}"`);
1971
+ ${m}` : d, v.debug(`[${this.instanceId}] Using default content: "${s}"`);
1704
1972
  }
1705
- typeof s == "string" ? o.textContent = s : o.appendChild(s), (this.options.container || document.body).appendChild(o), console.log(`[Tooltips] Tooltip element created and appended for "${l}"`), this.pillTooltips.set(l, o);
1973
+ typeof s == "string" ? l.textContent = s : l.appendChild(s), (this.options.container || document.body).appendChild(l), v.debug(`[${this.instanceId}] Tooltip element created and appended for "${o}"`), this.pillTooltips.set(o, l);
1706
1974
  let r, a;
1707
- const c = () => {
1708
- clearTimeout(a), console.log(`[Tooltips] Mouse entered pill "${l}", will show tooltip in ${this.options.pillTooltipDelay || 300}ms`), r = window.setTimeout(() => {
1709
- console.log(`[Tooltips] Showing tooltip for "${l}"`), o.classList.add("ml__pill-tooltip--visible"), this.positionPillTooltip(e, o, l);
1975
+ const p = () => {
1976
+ clearTimeout(a), v.debug(`[${this.instanceId}] Mouse entered pill "${o}", will show tooltip in ${this.options.pillTooltipDelay || 300}ms`), r = window.setTimeout(() => {
1977
+ v.debug(`[${this.instanceId}] Showing tooltip for "${o}"`), l.classList.add("ml__pill-tooltip--visible"), this.positionPillTooltip(e, l, o);
1710
1978
  }, this.options.pillTooltipDelay || 300);
1711
- }, p = () => {
1979
+ }, c = () => {
1712
1980
  clearTimeout(r), a = window.setTimeout(() => {
1713
- o.classList.remove("ml__pill-tooltip--visible"), this.cleanupPillTooltip(l);
1981
+ l.classList.remove("ml__pill-tooltip--visible"), this.cleanupPillTooltip(o);
1714
1982
  }, 100);
1715
1983
  };
1716
- e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", p);
1984
+ e.addEventListener("mouseenter", p), e.addEventListener("mouseleave", c);
1717
1985
  }
1718
- createRemoveButtonTooltip(e, t, l) {
1719
- const o = document.createElement("div");
1720
- o.className = "ml__pill-tooltip", o.textContent = `Remove ${t}`, (this.options.container || document.body).appendChild(o);
1721
- const n = `${l}-remove`;
1722
- this.pillTooltips.set(n, o);
1986
+ createRemoveButtonTooltip(e, t, o) {
1987
+ const l = document.createElement("div");
1988
+ l.className = "ml__pill-tooltip", l.textContent = `Remove ${t}`, (this.options.container || document.body).appendChild(l);
1989
+ const n = `${o}-remove`;
1990
+ this.pillTooltips.set(n, l);
1723
1991
  let r, a;
1724
- const c = () => {
1992
+ const p = () => {
1725
1993
  clearTimeout(a);
1726
- const d = this.pillTooltips.get(l);
1994
+ const d = this.pillTooltips.get(o);
1727
1995
  d && d.classList.remove("ml__pill-tooltip--visible"), r = window.setTimeout(() => {
1728
- o.classList.add("ml__pill-tooltip--visible"), this.positionPillTooltip(e, o, n);
1996
+ l.classList.add("ml__pill-tooltip--visible"), this.positionPillTooltip(e, l, n);
1729
1997
  }, this.options.pillTooltipDelay || 300);
1730
- }, p = () => {
1998
+ }, c = () => {
1731
1999
  clearTimeout(r), a = window.setTimeout(() => {
1732
- o.classList.remove("ml__pill-tooltip--visible"), this.cleanupPillTooltip(n);
2000
+ l.classList.remove("ml__pill-tooltip--visible"), this.cleanupPillTooltip(n);
1733
2001
  }, 100);
1734
2002
  };
1735
- e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", p);
2003
+ e.addEventListener("mouseenter", p), e.addEventListener("mouseleave", c);
1736
2004
  }
1737
- positionPillTooltip(e, t, l) {
1738
- const o = q(e, t, () => {
1739
- ee(e, t, {
2005
+ positionPillTooltip(e, t, o) {
2006
+ const l = le(e, t, () => {
2007
+ re(e, t, {
1740
2008
  placement: this.options.pillTooltipPlacement || "top",
1741
2009
  strategy: "fixed",
1742
2010
  middleware: [
1743
- Z(this.options.pillTooltipOffset || 8),
1744
- me(),
1745
- Q({ padding: 8 })
2011
+ se(this.options.pillTooltipOffset || 8),
2012
+ xe(),
2013
+ ne({ padding: 8 })
1746
2014
  ]
1747
2015
  }).then(({ x: s, y: n }) => {
1748
2016
  Object.assign(t.style, {
1749
2017
  left: `${s}px`,
1750
2018
  top: `${n}px`
1751
- }), console.log(`[Tooltips] Positioned tooltip "${l}" at x:${s}, y:${n}`, {
2019
+ }), v.debug(`[${this.instanceId}] Positioned tooltip "${o}" at x:${s}, y:${n}`, {
1752
2020
  placement: this.options.pillTooltipPlacement || "top",
1753
2021
  tooltipClasses: t.className,
1754
2022
  tooltipDisplay: window.getComputedStyle(t).display,
@@ -1759,7 +2027,7 @@ ${m}` : d, console.log(`[Tooltips] Using default content: "${s}"`);
1759
2027
  });
1760
2028
  });
1761
2029
  });
1762
- this.pillTooltipCleanups.set(l, o);
2030
+ this.pillTooltipCleanups.set(o, l);
1763
2031
  }
1764
2032
  cleanupPillTooltip(e) {
1765
2033
  const t = this.pillTooltipCleanups.get(e);
@@ -1772,52 +2040,54 @@ ${m}` : d, console.log(`[Tooltips] Using default content: "${s}"`);
1772
2040
  // PUBLIC API
1773
2041
  // ========================================================================
1774
2042
  destroy() {
1775
- this.destroyAllPillTooltips(), this.dropdownCleanup && this.dropdownCleanup(), this.hintCleanup && this.hintCleanup(), this.selectedPopoverCleanup && this.selectedPopoverCleanup(), this.dropdown && this.dropdown.remove(), this.hint && this.hint.remove(), this.selectedPopover && this.selectedPopover.remove(), this.element.innerHTML = "", this.element.classList.remove("ml", "ml--open", "ml--no-checkboxes"), console.log("[MultiSelect] Destroyed");
2043
+ this.destroyAllPillTooltips(), this.dropdownCleanup && this.dropdownCleanup(), this.hintCleanup && this.hintCleanup(), this.selectedPopoverCleanup && this.selectedPopoverCleanup(), this.dropdown && this.dropdown.remove(), this.hint && this.hint.remove(), this.selectedPopover && this.selectedPopover.remove(), this.element.innerHTML = "", this.element.classList.remove("ml", "ml--open", "ml--no-checkboxes"), B.info(`[${this.instanceId}] Component destroyed`);
1776
2044
  }
1777
2045
  }
1778
- const Rt = '@charset "UTF-8";multi-select:not(:defined){display:block;min-height:2.5rem;color:transparent!important;background:transparent}.ml-wrapper{display:flex;flex-direction:column;align-items:stretch}.ml-wrapper--inline{flex-direction:row;align-items:flex-start}.ml{position:relative;width:100%}.ml__input-wrapper{position:relative;display:flex;align-items:center}.ml__input{width:100%;padding:var(--ml-input-padding, .5rem .75rem);padding-right:var(--ml-input-padding-right, 2.5rem);font-size:var(--ml-input-font-size, .875rem);border:var(--ml-input-border-style, 1px solid #d1d5db);border-radius:var(--ml-input-border-radius, .375rem);background:var(--ml-input-bg, #ffffff);color:var(--ml-input-text, #111827);cursor:pointer;transition:border-color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__input:focus{outline:none;border-color:var(--ml-input-focus-border-color, #3b82f6)}.ml__input::placeholder{color:var(--ml-input-placeholder-color, #6b7280);opacity:0;transition:opacity var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}:host([data-ready]) .ml__input::placeholder{opacity:var(--ml-placeholder-opacity, .6)}.ml__toggle{position:absolute;right:var(--ml-toggle-right, .75rem);top:50%;transform:var(--ml-transform-center-y, translateY(-50%));pointer-events:none;color:var(--ml-toggle-color, #6b7280);transition:transform var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml--open .ml__toggle{transform:var(--ml-transform-center-y, translateY(-50%)) rotate(var(--ml-transform-rotate-180, 180deg))}.ml__count-badge{position:absolute;right:var(--ml-count-badge-offset, 2rem);top:50%;transform:var(--ml-transform-center-y, translateY(-50%));padding:var(--ml-count-badge-padding, .125rem .25rem);background:var(--ml-count-badge-bg, #3b82f6);color:var(--ml-count-badge-color, #ffffff);font-size:var(--ml-count-badge-font-size, .75rem);font-weight:var(--ml-count-badge-font-weight, 600);border-radius:var(--ml-count-badge-border-radius, .25rem);cursor:pointer;transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-badge:hover{background:var(--ml-count-badge-bg-hover, #2563eb);transform:var(--ml-transform-center-y, translateY(-50%)) scale(var(--ml-transform-scale-hover, 1.1))}.ml__hint{display:none;position:absolute;z-index:var(--ml-z-index-popover, 10000);padding:var(--ml-hint-padding, .5rem .75rem);background:var(--ml-hint-bg, #ffffff);border:var(--ml-hint-border, 1px solid #e5e7eb);border-radius:var(--ml-hint-border-radius, .375rem);box-shadow:var(--ml-hint-box-shadow, 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1));font-size:var(--ml-hint-font-size, .75rem);color:var(--ml-hint-color, #6b7280);line-height:var(--ml-line-height-relaxed, 1.4);max-width:100%}.ml__hint--visible{display:block}.ml__dropdown{display:none;position:absolute;z-index:var(--ml-z-index-dropdown, 9999);background:var(--ml-dropdown-bg, #ffffff);border:var(--ml-dropdown-border, 1px solid #e5e7eb);border-radius:var(--ml-dropdown-border-radius, .375rem);box-shadow:var(--ml-dropdown-box-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1));max-height:var(--ml-dropdown-max-height, 20rem);overflow-y:auto;color:var(--ml-dropdown-color, #111827)}.ml__dropdown--visible{display:block}.ml__actions{display:flex;gap:var(--ml-actions-gap, .25rem);padding:var(--ml-actions-padding, .5rem);border-bottom:var(--ml-actions-border-bottom, 1px solid #e5e7eb)}.ml__actions--sticky{position:sticky;top:0;z-index:var(--ml-z-index-sticky, 1);background:var(--ml-actions-bg, #ffffff)}.ml__action-btn{flex:1;padding:var(--ml-action-btn-padding, .25rem .5rem);font-size:var(--ml-action-btn-font-size, .75rem);border:var(--ml-action-btn-border, 1px solid #e5e7eb);border-radius:var(--ml-action-btn-border-radius, .25rem);background:var(--ml-action-btn-bg, transparent);color:var(--ml-action-btn-color, inherit);cursor:pointer;transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__action-btn:hover{background:var(--ml-action-btn-bg-hover, #f3f4f6);border-color:var(--ml-action-btn-border-color-hover, #3b82f6)}.ml__action-btn:active{transform:scale(var(--ml-transform-scale-active, .98))}.ml__options{padding:var(--ml-options-padding, .25rem 0)}.ml__group+.ml__group{border-top:var(--ml-group-border-top, 1px solid #e5e7eb);margin-top:var(--ml-group-margin-top, .25rem);padding-top:var(--ml-group-padding-top, .25rem)}.ml__group-label{padding:var(--ml-group-label-padding, .25rem .75rem);font-size:var(--ml-group-label-font-size, .75rem);font-weight:var(--ml-group-label-font-weight, 600);color:var(--ml-group-label-color, #6b7280);text-transform:var(--ml-group-label-transform, uppercase);letter-spacing:var(--ml-group-label-letter-spacing, .05em)}.ml__option{display:flex;align-items:flex-start;gap:var(--ml-option-gap, .5rem);padding:var(--ml-option-padding, .5rem .75rem);cursor:pointer;transition:background-color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__option:hover{background:var(--ml-option-bg-hover, #f9fafb)}.ml__option--focused{background:var(--ml-option-bg-focused, #f9fafb);outline:var(--ml-option-outline-focused, 2px solid #3b82f6);outline-offset:var(--ml-option-focus-outline-offset, -2px)}.ml__option--selected{background:var(--ml-option-bg-selected, rgba(59, 130, 246, .1))}.ml__option--disabled{opacity:var(--ml-disabled-opacity, .5);cursor:not-allowed}.ml__option--disabled:hover{background:var(--ml-option-bg, transparent)}.ml__checkbox{flex-shrink:0;margin-top:var(--ml-checkbox-margin-top, .125rem);cursor:pointer}.ml__option--disabled .ml__checkbox{cursor:not-allowed}.ml__option-content{flex:1;display:flex;align-items:flex-start;gap:var(--ml-option-content-gap, .5rem);min-width:0}.ml__option-icon{flex-shrink:0;width:var(--ml-option-icon-size, 1.25rem);height:var(--ml-option-icon-size, 1.25rem);display:flex;align-items:center;justify-content:center;font-size:var(--ml-option-icon-font-size, 1rem)}.ml__option-icon svg{width:100%;height:100%;fill:currentColor}.ml__option-text{flex:1;min-width:0}.ml__option-title{font-size:var(--ml-option-title-font-size, .875rem);color:var(--ml-option-title-color, inherit);line-height:var(--ml-line-height-relaxed, 1.4)}.ml__option-title mark{background:var(--ml-option-mark-bg, rgba(59, 130, 246, .2));color:var(--ml-option-mark-color, inherit);font-weight:var(--ml-option-mark-font-weight, 600)}.ml__option-subtitle{margin-top:var(--ml-option-subtitle-margin-top, .25rem);font-size:var(--ml-option-subtitle-font-size, .75rem);color:var(--ml-option-subtitle-color, #6b7280);line-height:var(--ml-option-subtitle-line-height, 1.3)}.ml__empty{padding:var(--ml-empty-padding, 1rem .75rem);text-align:center;font-size:var(--ml-empty-font-size, .875rem);color:var(--ml-empty-color, #6b7280)}.ml__loader{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--ml-loader-padding, 1rem);gap:var(--ml-loader-gap, .5rem)}.ml__loading-text{font-size:var(--ml-loading-text-font-size, .875rem);color:var(--ml-loading-text-color, #6b7280)}.ml__pills{display:flex;flex-wrap:wrap;gap:var(--ml-pills-gap, .5rem);padding:0}.ml__pills:empty{display:none}.ml__pills--bottom{margin-top:var(--ml-pills-margin-bottom, .5rem)}.ml__pills--top{margin-bottom:var(--ml-pills-margin-top, .5rem);order:var(--ml-order-first, -1)}.ml__pills--left{order:var(--ml-order-first, -1);margin-right:var(--ml-pills-margin-left, .25rem);justify-content:flex-end}.ml__pills--right{margin-left:var(--ml-pills-margin-right, .25rem);justify-content:flex-start}.ml__count-display{display:flex;align-items:center}.ml__count-display:empty{display:none}.ml__count-display--bottom{margin-top:var(--ml-count-display-margin-bottom, .5rem)}.ml__count-display--top{margin-bottom:var(--ml-count-display-margin-top, .5rem);order:var(--ml-order-first, -1)}.ml__count-display--left{order:var(--ml-order-first, -1);margin-right:var(--ml-count-display-margin-left, .5rem);justify-content:flex-start}.ml__count-display--right{margin-left:var(--ml-count-display-margin-right, .5rem);justify-content:flex-end}.ml__count-badge-wrapper{display:inline-flex;align-items:center;gap:var(--ml-count-badge-wrapper-gap, .25rem);background:var(--ml-count-badge-wrapper-bg, transparent);border:var(--ml-count-badge-wrapper-border, 1px solid #e5e7eb);border-radius:var(--ml-count-badge-wrapper-border-radius, .25rem);padding:var(--ml-count-badge-wrapper-padding, .25rem .5rem);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-badge-wrapper:hover{background:var(--ml-count-badge-wrapper-bg-hover, #f9fafb);border-color:var(--ml-count-badge-wrapper-border-color-hover, #3b82f6)}.ml__count-text{display:inline-flex;align-items:center;background:var(--ml-count-text-bg, transparent);border:var(--ml-count-text-border, none);padding:0;font-size:var(--ml-count-text-font-size, .875rem);color:var(--ml-count-text-color, #111827);cursor:pointer;transition:color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:var(--ml-count-clear-size, 1rem);height:var(--ml-count-clear-size, 1rem);padding:0;border:none;background:var(--ml-count-clear-bg, transparent);color:var(--ml-count-clear-color, #6b7280);font-size:var(--ml-count-clear-font-size, 1.125rem);line-height:var(--ml-line-height-none, 1);cursor:pointer;border-radius:var(--ml-count-clear-border-radius, 50%);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-clear:hover{background:var(--ml-count-clear-bg-hover, rgba(59, 130, 246, .2));color:var(--ml-count-clear-color-hover, #3b82f6)}.ml__count-clear:before{content:var(--ml-icon-clear, "×")}.ml__pill{display:inline-flex;align-items:center;height:var(--ml-pill-height, 1.5rem);font-size:var(--ml-pill-font-size, .75rem);font-weight:var(--ml-pill-font-weight, 600);line-height:var(--ml-line-height-none, 1);border-radius:var(--ml-pill-border-radius, .375rem);overflow:hidden;max-width:100%}.ml__pill-text{display:flex;align-items:center;height:100%;padding:var(--ml-pill-text-padding, 0 .5rem);background:var(--ml-pill-text-bg, #eff6ff);color:var(--ml-pill-text-color, #3b82f6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:background-color var(--ml-transition-normal, .2s) ease}.ml__pill-remove{display:flex;align-items:center;justify-content:center;width:var(--ml-pill-remove-width, 1.5rem);height:100%;flex-shrink:0;background:var(--ml-pill-remove-bg, #3b82f6);color:var(--ml-pill-remove-color, #ffffff);border:var(--ml-pill-remove-border, none);cursor:pointer;transition:background-color var(--ml-transition-normal, .2s) ease;font-size:var(--ml-pill-remove-font-size, .75rem)}.ml__pill-remove:hover{background:var(--ml-pill-remove-bg-hover, #2563eb)}.ml__pill-remove:focus{outline:none;box-shadow:var(--ml-pill-remove-box-shadow-focus, 0 0 0 2px rgba(59, 130, 246, .5))}.ml__pill-remove:before{content:var(--ml-icon-remove, "×");font-size:var(--ml-font-size-base, 1rem);line-height:var(--ml-line-height-none, 1)}.ml__pill--more{cursor:pointer}.ml__pill--more .ml__pill-text{background:var(--ml-more-badge-bg, #eff6ff);font-weight:var(--ml-pill-font-weight, 600)}.ml__pill--more:hover .ml__pill-text{background:var(--ml-more-badge-hover-bg, #ffffff)}.ml__pill--more:active .ml__pill-text{background:var(--ml-more-badge-active-bg, #e0f2fe)}.ml__pill-tooltip{position:fixed;z-index:var(--ml-tooltip-z-index, 10000);opacity:0;visibility:hidden;transition:opacity var(--ml-transition-normal, .2s) ease,visibility var(--ml-transition-normal, .2s) ease;background:var(--ml-tooltip-bg, #333);color:var(--ml-tooltip-color, #fff);padding:var(--ml-tooltip-padding, .5rem .75rem);border-radius:var(--ml-tooltip-border-radius, .375rem);font-size:var(--ml-tooltip-font-size, .875rem);line-height:var(--ml-line-height-relaxed, 1.4);max-width:var(--ml-tooltip-max-width, 20rem);word-wrap:break-word;white-space:pre-wrap;box-shadow:var(--ml-tooltip-shadow, 0 2px 8px rgba(0, 0, 0, .15));pointer-events:none}.ml__pill-tooltip--visible{opacity:1;visibility:visible}.ml__selected-popover{display:none;position:absolute;z-index:var(--ml-z-index-popover, 10000);background:var(--ml-selected-popover-bg, #ffffff);border:var(--ml-selected-popover-border, 1px solid #e5e7eb);border-radius:var(--ml-selected-popover-border-radius, .375rem);box-shadow:var(--ml-selected-popover-box-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1));width:var(--ml-selected-popover-width, 20rem);max-height:var(--ml-selected-popover-max-height, 20rem);overflow:hidden}.ml__selected-popover--visible{display:flex;flex-direction:column}.ml__selected-popover-header{display:flex;align-items:center;justify-content:space-between;padding:var(--ml-selected-popover-header-padding, .5rem .75rem);background:var(--ml-selected-popover-header-bg, rgba(59, 130, 246, .1));border-bottom:var(--ml-selected-popover-header-border-bottom, 1px solid #e5e7eb);font-size:var(--ml-selected-popover-header-font-size, .875rem);font-weight:var(--ml-selected-popover-header-font-weight, 600);color:var(--ml-selected-popover-header-color, #111827)}.ml__selected-popover-close{display:flex;align-items:center;justify-content:center;width:var(--ml-popover-close-size, 1.5rem);height:var(--ml-popover-close-size, 1.5rem);padding:0;border:none;background:var(--ml-selected-popover-close-bg, transparent);color:var(--ml-selected-popover-close-color, #6b7280);font-size:var(--ml-selected-popover-close-font-size, 1.25rem);line-height:var(--ml-line-height-none, 1);cursor:pointer;border-radius:var(--ml-selected-popover-close-border-radius, 50%);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__selected-popover-close:hover{background:var(--ml-selected-popover-close-bg-hover, rgba(59, 130, 246, .2));color:var(--ml-selected-popover-close-color-hover, #3b82f6)}.ml__selected-popover-body{display:flex;flex-direction:column;gap:var(--ml-selected-popover-body-gap, .25rem);padding:var(--ml-selected-popover-body-padding, .5rem);overflow-y:auto;max-height:var(--ml-selected-popover-body-max-height, 18rem)}.ml__selected-popover-body .ml__pill{width:100%}.ml__selected-popover-body .ml__pill-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.ml--rtl .ml__input-wrapper{direction:rtl}.ml--rtl .ml__input{text-align:right;padding-left:var(--ml-input-padding-right, 2.5rem);padding-right:var(--ml-input-padding-h, .75rem)}.ml--rtl .ml__toggle{left:var(--ml-toggle-right, .75rem)!important;right:auto!important}.ml--rtl .ml__count-badge{left:var(--ml-count-badge-offset, 2rem)!important;right:auto!important}.ml--rtl .ml__dropdown{direction:rtl;text-align:right}.ml--rtl .ml__option{flex-direction:row-reverse}.ml--rtl .ml__checkbox{margin-left:var(--ml-spacing-sm, .5rem);margin-right:0}.ml--rtl .ml__option-content{text-align:right}.ml--rtl .ml__option-icon{margin-left:var(--ml-spacing-xs, .25rem);margin-right:0}.ml--rtl .ml__pills{direction:rtl}.ml--rtl .ml__pill{flex-direction:row-reverse}.ml--rtl .ml__pill-remove{border-radius:var(--ml-pill-remove-border-radius-rtl, .375rem) 0 0 var(--ml-pill-remove-border-radius-rtl, .375rem);border-left:var(--ml-pill-remove-border, none);border-right:none}.ml--rtl .ml__pill-text{border-radius:0 var(--ml-pill-text-border-radius-rtl, .375rem) var(--ml-pill-text-border-radius-rtl, .375rem) 0}.ml--rtl .ml__count-display{direction:rtl}.ml--rtl .ml__count-badge-wrapper{flex-direction:row-reverse}.ml--rtl .ml__selected-popover{direction:rtl;text-align:right}.ml--rtl .ml__actions{direction:rtl}.ml--rtl .ml__group-label,.ml--rtl .ml__empty{text-align:right}.ml--rtl .ml__hint{direction:rtl;text-align:right}.ml--xs .ml__input{font-size:var(--ml-font-size-xs, .75rem)}.ml--xs .ml__option{padding:var(--ml-spacing-xs, .25rem) var(--ml-spacing-sm, .5rem)}.ml--xs .ml__option-title{font-size:var(--ml-font-size-xs, .75rem)}.ml--xs .ml__pill{font-size:var(--ml-font-size-2xs, .625rem)}.ml--sm .ml__input,.ml--sm .ml__option-title{font-size:var(--ml-font-size-xs, .75rem)}.ml--lg .ml__input,.ml--lg .ml__option-title{font-size:var(--ml-font-size-base, 1rem)}.ml--lg .ml__pill{font-size:var(--ml-font-size-sm, .875rem)}.ml--xl .ml__input,.ml--xl .ml__option-title{font-size:var(--ml-font-size-lg, 1.125rem)}.ml--xl .ml__pill{font-size:var(--ml-font-size-base, 1rem)}.ml--disabled .ml__input{opacity:var(--ml-disabled-input-opacity, .6);cursor:not-allowed;background:var(--ml-input-bg-disabled, rgba(107, 114, 128, .05))}.ml--disabled .ml__toggle{opacity:var(--ml-disabled-input-opacity, .6)}.ml--no-checkboxes .ml__option{gap:0;padding-left:var(--ml-option-padding-h, .75rem)}.ml--no-checkboxes .ml__option-content{padding-left:0}.ml-debug-info{margin-top:.25rem;padding:.25rem;background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:.375rem;font-size:.75rem;color:#111827}.ml-debug-info details summary{cursor:pointer;font-weight:600;color:#2563eb;-webkit-user-select:none;user-select:none;padding:.25rem;border-radius:.25rem}.ml-debug-info details summary:hover{background-color:#f3f4f6}.ml-debug-info details summary:focus{outline:2px solid #3b82f6;outline-offset:2px}.ml-debug-info .ml-debug-stats{display:flex;flex-direction:column;gap:.25rem;margin-top:.25rem;padding:.25rem;background-color:#fff;border-radius:.25rem}.ml-debug-info .ml-debug-stats span{display:flex;justify-content:space-between;padding:2px 4px;font-family:monospace;font-size:.625rem}.ml-debug-info .ml-debug-stats span:before{content:"•";margin-right:.25rem;color:#3b82f6}', Nt = typeof HTMLElement < "u" ? HTMLElement : class {
1779
- }, be = /* @__PURE__ */ new Set();
1780
- function je() {
1781
- return Array.from(be);
2046
+ const di = '@charset "UTF-8";:host{--ml-accent-color: #3b82f6;--ml-accent-color-hover: #2563eb;--ml-accent-color-active: #1d4ed8;--ml-text-primary: #111827;--ml-text-secondary: #6b7280;--ml-text-white: #ffffff;--ml-primary-bg: #f3f4f6;--ml-primary-bg-hover: #e5e7eb;--ml-border-color: #e5e7eb;--ml-input-padding: .5rem .75rem;--ml-input-padding-right: 2.5rem;--ml-input-font-size: .875rem;--ml-input-border-style: 1px solid #d1d5db;--ml-input-border-radius: .375rem;--ml-input-bg: #ffffff;--ml-input-text: #111827;--ml-input-focus-border-color: #3b82f6;--ml-input-placeholder-color: #6b7280;--ml-input-bg-disabled: rgba(107, 114, 128, .05);--ml-toggle-right: .75rem;--ml-toggle-color: #6b7280;--ml-transform-center-y: translateY(-50%);--ml-transform-rotate-180: 180deg;--ml-count-badge-offset: 2rem;--ml-count-badge-padding: .125rem .25rem;--ml-count-badge-bg: #3b82f6;--ml-count-badge-color: #ffffff;--ml-count-badge-font-size: .75rem;--ml-count-badge-font-weight: 600;--ml-count-badge-border-radius: .25rem;--ml-count-badge-bg-hover: #2563eb;--ml-transform-scale-hover: 1.1;--ml-hint-padding: .5rem .75rem;--ml-hint-bg: #ffffff;--ml-hint-border: 1px solid #e5e7eb;--ml-hint-border-radius: .375rem;--ml-hint-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);--ml-hint-font-size: .75rem;--ml-hint-color: #6b7280;--ml-line-height-relaxed: 1.4;--ml-dropdown-bg: #ffffff;--ml-dropdown-border: 1px solid #e5e7eb;--ml-dropdown-border-radius: .375rem;--ml-dropdown-box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);--ml-dropdown-max-height: 20rem;--ml-dropdown-color: #111827;--ml-z-index-dropdown: 9999;--ml-z-index-sticky: 1;--ml-actions-gap: .25rem;--ml-actions-padding: .5rem;--ml-actions-border-bottom: 1px solid #e5e7eb;--ml-actions-bg: #ffffff;--ml-action-btn-padding: .25rem .5rem;--ml-action-btn-font-size: .75rem;--ml-action-btn-border: 1px solid #e5e7eb;--ml-action-btn-border-radius: .25rem;--ml-action-btn-bg: transparent;--ml-action-btn-color: inherit;--ml-action-btn-bg-hover: #f3f4f6;--ml-action-btn-border-color-hover: #3b82f6;--ml-transform-scale-active: .98;--ml-options-padding: .25rem 0;--ml-group-border-top: 1px solid #e5e7eb;--ml-group-margin-top: .25rem;--ml-group-padding-top: .25rem;--ml-group-label-padding: .25rem .75rem;--ml-group-label-font-size: .75rem;--ml-group-label-font-weight: 600;--ml-group-label-color: #6b7280;--ml-group-label-transform: uppercase;--ml-group-label-letter-spacing: .05em;--ml-option-gap: .5rem;--ml-option-padding: .5rem .75rem;--ml-option-padding-h: .75rem;--ml-option-bg: transparent;--ml-option-bg-hover: #f9fafb;--ml-option-bg-focused: #f9fafb;--ml-option-outline-focused: 2px solid #3b82f6;--ml-option-focus-outline-offset: -2px;--ml-option-bg-selected: rgba(59, 130, 246, .1);--ml-disabled-opacity: .5;--ml-option-content-gap: .5rem;--ml-option-icon-size: 1.25rem;--ml-option-icon-font-size: 1rem;--ml-option-title-font-size: .875rem;--ml-option-title-color: inherit;--ml-option-mark-bg: rgba(59, 130, 246, .2);--ml-option-mark-color: inherit;--ml-option-mark-font-weight: 600;--ml-option-subtitle-margin-top: .25rem;--ml-option-subtitle-font-size: .75rem;--ml-option-subtitle-color: #6b7280;--ml-option-subtitle-line-height: 1.3;--ml-checkbox-margin-top: .125rem;--ml-empty-padding: 1rem .75rem;--ml-empty-font-size: .875rem;--ml-empty-color: #6b7280;--ml-loader-padding: 1rem;--ml-loader-gap: .5rem;--ml-loading-text-font-size: .875rem;--ml-loading-text-color: #6b7280;--ml-pills-gap: .5rem;--ml-pills-margin-bottom: .5rem;--ml-pills-margin-top: .5rem;--ml-pills-margin-left: .25rem;--ml-pills-margin-right: .25rem;--ml-pill-gap: .5rem;--ml-pill-height: 1.5rem;--ml-pill-font-size: .75rem;--ml-pill-font-weight: 600;--ml-pill-border-radius: .375rem;--ml-pill-bg: #eff6ff;--ml-pill-bg-hover: #ffffff;--ml-pill-bg-active: #e0f2fe;--ml-order-first: -1;--ml-pill-text-padding: 0 .5rem;--ml-pill-text-bg: #eff6ff;--ml-pill-text-color: #3b82f6;--ml-pill-remove-width: 1.5rem;--ml-pill-remove-bg: #3b82f6;--ml-pill-remove-color: #ffffff;--ml-pill-remove-border: none;--ml-pill-remove-font-size: .75rem;--ml-pill-remove-bg-hover: #2563eb;--ml-pill-remove-box-shadow-focus: 0 0 0 2px rgba(59, 130, 246, .5);--ml-icon-remove: "×";--ml-more-badge-bg: #eff6ff;--ml-more-badge-hover-bg: #ffffff;--ml-more-badge-active-bg: #e0f2fe;--ml-count-display-margin-bottom: .5rem;--ml-count-display-margin-top: .5rem;--ml-count-display-margin-left: .5rem;--ml-count-display-margin-right: .5rem;--ml-count-badge-wrapper-bg: transparent;--ml-count-badge-wrapper-border: 1px solid #e5e7eb;--ml-count-badge-wrapper-border-radius: .25rem;--ml-count-badge-wrapper-padding: .25rem .5rem;--ml-count-badge-wrapper-gap: .25rem;--ml-count-badge-wrapper-bg-hover: #f9fafb;--ml-count-badge-wrapper-border-color-hover: #3b82f6;--ml-count-text-bg: transparent;--ml-count-text-border: none;--ml-count-text-font-size: .875rem;--ml-count-text-color: #111827;--ml-count-clear-size: 1rem;--ml-count-clear-bg: transparent;--ml-count-clear-color: #6b7280;--ml-count-clear-font-size: 1.125rem;--ml-count-clear-border-radius: 50%;--ml-count-clear-bg-hover: rgba(59, 130, 246, .2);--ml-count-clear-color-hover: #3b82f6;--ml-icon-clear: "×";--ml-tooltip-bg: #333;--ml-tooltip-color: #fff;--ml-tooltip-padding: .5rem .75rem;--ml-tooltip-border-radius: .375rem;--ml-tooltip-font-size: .875rem;--ml-tooltip-max-width: 20rem;--ml-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ml-tooltip-z-index: 10000;--ml-z-index-popover: 10000;--ml-selected-popover-width: 20rem;--ml-selected-popover-max-height: 20rem;--ml-selected-popover-bg: #ffffff;--ml-selected-popover-border: 1px solid #e5e7eb;--ml-selected-popover-border-radius: .375rem;--ml-selected-popover-box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);--ml-selected-popover-header-padding: .5rem .75rem;--ml-selected-popover-header-bg: rgba(59, 130, 246, .1);--ml-selected-popover-header-border-bottom: 1px solid #e5e7eb;--ml-selected-popover-header-font-size: .875rem;--ml-selected-popover-header-font-weight: 600;--ml-selected-popover-header-color: #111827;--ml-popover-close-size: 1.5rem;--ml-selected-popover-close-bg: transparent;--ml-selected-popover-close-color: #6b7280;--ml-selected-popover-close-font-size: 1.25rem;--ml-selected-popover-close-border-radius: 50%;--ml-selected-popover-close-bg-hover: rgba(59, 130, 246, .2);--ml-selected-popover-close-color-hover: #3b82f6;--ml-selected-popover-body-gap: .25rem;--ml-selected-popover-body-padding: .5rem;--ml-selected-popover-body-max-height: 18rem;--ml-font-size-2xs: .625rem;--ml-font-size-xs: .75rem;--ml-font-size-sm: .875rem;--ml-font-size-base: 1rem;--ml-font-size-lg: 1.125rem;--ml-font-weight-medium: 500;--ml-font-weight-semibold: 600;--ml-line-height-none: 1;--ml-spacing-xs: .25rem;--ml-spacing-sm: .5rem;--ml-spacing-md: .75rem;--ml-spacing-lg: 1rem;--ml-transition-fast: .15s;--ml-transition-normal: .2s;--ml-easing-snappy: cubic-bezier(.4, 0, .2, 1);--ml-placeholder-opacity: .6;--ml-disabled-input-opacity: .6}multi-select:not(:defined){display:block;min-height:2.5rem;color:transparent!important;background:transparent}.ml-wrapper{display:flex;flex-direction:column;align-items:stretch}.ml-wrapper--inline{flex-direction:row;align-items:flex-start}.ml{position:relative;width:100%}.ml__input-wrapper{position:relative;display:flex;align-items:center}.ml__input{width:100%;padding:var(--ml-input-padding, .5rem .75rem);padding-right:var(--ml-input-padding-right, 2.5rem);font-size:var(--ml-input-font-size, .875rem);border:var(--ml-input-border-style, 1px solid #d1d5db);border-radius:var(--ml-input-border-radius, .375rem);background:var(--ml-input-bg, #ffffff);color:var(--ml-input-text, #111827);cursor:pointer;transition:border-color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__input:focus{outline:none;border-color:var(--ml-input-focus-border-color, #3b82f6)}.ml__input::placeholder{color:var(--ml-input-placeholder-color, #6b7280);opacity:0;transition:opacity var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}:host([data-ready]) .ml__input::placeholder{opacity:var(--ml-placeholder-opacity, .6)}.ml__toggle{position:absolute;right:var(--ml-toggle-right, .75rem);top:50%;transform:var(--ml-transform-center-y, translateY(-50%));pointer-events:none;color:var(--ml-toggle-color, #6b7280);transition:transform var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml--open .ml__toggle{transform:var(--ml-transform-center-y, translateY(-50%)) rotate(var(--ml-transform-rotate-180, 180deg))}.ml__count-badge{position:absolute;right:var(--ml-count-badge-offset, 2rem);top:50%;transform:var(--ml-transform-center-y, translateY(-50%));padding:var(--ml-count-badge-padding, .125rem .25rem);background:var(--ml-count-badge-bg, #3b82f6);color:var(--ml-count-badge-color, #ffffff);font-size:var(--ml-count-badge-font-size, .75rem);font-weight:var(--ml-count-badge-font-weight, 600);border-radius:var(--ml-count-badge-border-radius, .25rem);cursor:pointer;transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-badge:hover{background:var(--ml-count-badge-bg-hover, #2563eb);transform:var(--ml-transform-center-y, translateY(-50%)) scale(var(--ml-transform-scale-hover, 1.1))}.ml__hint{display:none;position:absolute;z-index:var(--ml-z-index-popover, 10000);padding:var(--ml-hint-padding, .5rem .75rem);background:var(--ml-hint-bg, #ffffff);border:var(--ml-hint-border, 1px solid #e5e7eb);border-radius:var(--ml-hint-border-radius, .375rem);box-shadow:var(--ml-hint-box-shadow, 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1));font-size:var(--ml-hint-font-size, .75rem);color:var(--ml-hint-color, #6b7280);line-height:var(--ml-line-height-relaxed, 1.4);max-width:100%}.ml__hint--visible{display:block}.ml__dropdown{display:none;position:absolute;z-index:var(--ml-z-index-dropdown, 9999);background:var(--ml-dropdown-bg, #ffffff);border:var(--ml-dropdown-border, 1px solid #e5e7eb);border-radius:var(--ml-dropdown-border-radius, .375rem);box-shadow:var(--ml-dropdown-box-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1));max-height:var(--ml-dropdown-max-height, 20rem);overflow-y:auto;color:var(--ml-dropdown-color, #111827)}.ml__dropdown--visible{display:block}.ml__actions{display:flex;gap:var(--ml-actions-gap, .25rem);padding:var(--ml-actions-padding, .5rem);border-bottom:var(--ml-actions-border-bottom, 1px solid #e5e7eb)}.ml__actions--sticky{position:sticky;top:0;z-index:var(--ml-z-index-sticky, 1);background:var(--ml-actions-bg, #ffffff)}.ml__action-btn{flex:1;padding:var(--ml-action-btn-padding, .25rem .5rem);font-size:var(--ml-action-btn-font-size, .75rem);border:var(--ml-action-btn-border, 1px solid #e5e7eb);border-radius:var(--ml-action-btn-border-radius, .25rem);background:var(--ml-action-btn-bg, transparent);color:var(--ml-action-btn-color, inherit);cursor:pointer;transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__action-btn:hover{background:var(--ml-action-btn-bg-hover, #f3f4f6);border-color:var(--ml-action-btn-border-color-hover, #3b82f6)}.ml__action-btn:active{transform:scale(var(--ml-transform-scale-active, .98))}.ml__options{padding:var(--ml-options-padding, .25rem 0)}.ml__group+.ml__group{border-top:var(--ml-group-border-top, 1px solid #e5e7eb);margin-top:var(--ml-group-margin-top, .25rem);padding-top:var(--ml-group-padding-top, .25rem)}.ml__group-label{padding:var(--ml-group-label-padding, .25rem .75rem);font-size:var(--ml-group-label-font-size, .75rem);font-weight:var(--ml-group-label-font-weight, 600);color:var(--ml-group-label-color, #6b7280);text-transform:var(--ml-group-label-transform, uppercase);letter-spacing:var(--ml-group-label-letter-spacing, .05em)}.ml__option{display:flex;align-items:flex-start;gap:var(--ml-option-gap, .5rem);padding:var(--ml-option-padding, .5rem .75rem);cursor:pointer;transition:background-color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__option:hover{background:var(--ml-option-bg-hover, #f9fafb)}.ml__option--focused{background:var(--ml-option-bg-focused, #f9fafb);outline:var(--ml-option-outline-focused, 2px solid #3b82f6);outline-offset:var(--ml-option-focus-outline-offset, -2px)}.ml__option--selected{background:var(--ml-option-bg-selected, rgba(59, 130, 246, .1))}.ml__option--disabled{opacity:var(--ml-disabled-opacity, .5);cursor:not-allowed}.ml__option--disabled:hover{background:var(--ml-option-bg, transparent)}.ml__checkbox{flex-shrink:0;margin-top:var(--ml-checkbox-margin-top, .125rem);cursor:pointer}.ml__option--disabled .ml__checkbox{cursor:not-allowed}.ml__option-content{flex:1;display:flex;align-items:flex-start;gap:var(--ml-option-content-gap, .5rem);min-width:0}.ml__option-icon{flex-shrink:0;width:var(--ml-option-icon-size, 1.25rem);height:var(--ml-option-icon-size, 1.25rem);display:flex;align-items:center;justify-content:center;font-size:var(--ml-option-icon-font-size, 1rem)}.ml__option-icon svg{width:100%;height:100%;fill:currentColor}.ml__option-text{flex:1;min-width:0}.ml__option-title{font-size:var(--ml-option-title-font-size, .875rem);color:var(--ml-option-title-color, inherit);line-height:var(--ml-line-height-relaxed, 1.4)}.ml__option-title mark{background:var(--ml-option-mark-bg, rgba(59, 130, 246, .2));color:var(--ml-option-mark-color, inherit);font-weight:var(--ml-option-mark-font-weight, 600)}.ml__option-subtitle{margin-top:var(--ml-option-subtitle-margin-top, .25rem);font-size:var(--ml-option-subtitle-font-size, .75rem);color:var(--ml-option-subtitle-color, #6b7280);line-height:var(--ml-option-subtitle-line-height, 1.3)}.ml__empty{padding:var(--ml-empty-padding, 1rem .75rem);text-align:center;font-size:var(--ml-empty-font-size, .875rem);color:var(--ml-empty-color, #6b7280)}.ml__loader{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--ml-loader-padding, 1rem);gap:var(--ml-loader-gap, .5rem)}.ml__loading-text{font-size:var(--ml-loading-text-font-size, .875rem);color:var(--ml-loading-text-color, #6b7280)}.ml__pills{display:flex;flex-wrap:wrap;gap:var(--ml-pills-gap, .5rem);padding:0}.ml__pills:empty{display:none}.ml__pills--bottom{margin-top:var(--ml-pills-margin-bottom, .5rem)}.ml__pills--top{margin-bottom:var(--ml-pills-margin-top, .5rem);order:var(--ml-order-first, -1)}.ml__pills--left{order:var(--ml-order-first, -1);margin-right:var(--ml-pills-margin-left, .25rem);justify-content:flex-end}.ml__pills--right{margin-left:var(--ml-pills-margin-right, .25rem);justify-content:flex-start}.ml__count-display{display:flex;align-items:center}.ml__count-display:empty{display:none}.ml__count-display--bottom{margin-top:var(--ml-count-display-margin-bottom, .5rem)}.ml__count-display--top{margin-bottom:var(--ml-count-display-margin-top, .5rem);order:var(--ml-order-first, -1)}.ml__count-display--left{order:var(--ml-order-first, -1);margin-right:var(--ml-count-display-margin-left, .5rem);justify-content:flex-start}.ml__count-display--right{margin-left:var(--ml-count-display-margin-right, .5rem);justify-content:flex-end}.ml__count-badge-wrapper{display:inline-flex;align-items:center;gap:var(--ml-count-badge-wrapper-gap, .25rem);background:var(--ml-count-badge-wrapper-bg, transparent);border:var(--ml-count-badge-wrapper-border, 1px solid #e5e7eb);border-radius:var(--ml-count-badge-wrapper-border-radius, .25rem);padding:var(--ml-count-badge-wrapper-padding, .25rem .5rem);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-badge-wrapper:hover{background:var(--ml-count-badge-wrapper-bg-hover, #f9fafb);border-color:var(--ml-count-badge-wrapper-border-color-hover, #3b82f6)}.ml__count-text{display:inline-flex;align-items:center;background:var(--ml-count-text-bg, transparent);border:var(--ml-count-text-border, none);padding:0;font-size:var(--ml-count-text-font-size, .875rem);color:var(--ml-count-text-color, #111827);cursor:pointer;transition:color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:var(--ml-count-clear-size, 1rem);height:var(--ml-count-clear-size, 1rem);padding:0;border:none;background:var(--ml-count-clear-bg, transparent);color:var(--ml-count-clear-color, #6b7280);font-size:var(--ml-count-clear-font-size, 1.125rem);line-height:var(--ml-line-height-none, 1);cursor:pointer;border-radius:var(--ml-count-clear-border-radius, 50%);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-clear:hover{background:var(--ml-count-clear-bg-hover, rgba(59, 130, 246, .2));color:var(--ml-count-clear-color-hover, #3b82f6)}.ml__count-clear:before{content:var(--ml-icon-clear, "×")}.ml__pill{display:inline-flex;align-items:center;height:var(--ml-pill-height, 1.5rem);font-size:var(--ml-pill-font-size, .75rem);font-weight:var(--ml-pill-font-weight, 600);line-height:var(--ml-line-height-none, 1);border-radius:var(--ml-pill-border-radius, .375rem);overflow:hidden;max-width:100%}.ml__pill-text{display:flex;align-items:center;height:100%;padding:var(--ml-pill-text-padding, 0 .5rem);background:var(--ml-pill-text-bg, #eff6ff);color:var(--ml-pill-text-color, #3b82f6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:background-color var(--ml-transition-normal, .2s) ease}.ml__pill-remove{display:flex;align-items:center;justify-content:center;width:var(--ml-pill-remove-width, 1.5rem);height:100%;flex-shrink:0;background:var(--ml-pill-remove-bg, #3b82f6);color:var(--ml-pill-remove-color, #ffffff);border:var(--ml-pill-remove-border, none);cursor:pointer;transition:background-color var(--ml-transition-normal, .2s) ease;font-size:var(--ml-pill-remove-font-size, .75rem)}.ml__pill-remove:hover{background:var(--ml-pill-remove-bg-hover, #2563eb)}.ml__pill-remove:focus{outline:none;box-shadow:var(--ml-pill-remove-box-shadow-focus, 0 0 0 2px rgba(59, 130, 246, .5))}.ml__pill-remove:before{content:var(--ml-icon-remove, "×");font-size:var(--ml-font-size-base, 1rem);line-height:var(--ml-line-height-none, 1)}.ml__pill--more{cursor:pointer}.ml__pill--more .ml__pill-text{background:var(--ml-more-badge-bg, #eff6ff);font-weight:var(--ml-pill-font-weight, 600)}.ml__pill--more:hover .ml__pill-text{background:var(--ml-more-badge-hover-bg, #ffffff)}.ml__pill--more:active .ml__pill-text{background:var(--ml-more-badge-active-bg, #e0f2fe)}.ml__pill-tooltip{position:fixed;z-index:var(--ml-tooltip-z-index, 10000);opacity:0;visibility:hidden;transition:opacity var(--ml-transition-normal, .2s) ease,visibility var(--ml-transition-normal, .2s) ease;background:var(--ml-tooltip-bg, #333);color:var(--ml-tooltip-color, #fff);padding:var(--ml-tooltip-padding, .5rem .75rem);border-radius:var(--ml-tooltip-border-radius, .375rem);font-size:var(--ml-tooltip-font-size, .875rem);line-height:var(--ml-line-height-relaxed, 1.4);max-width:var(--ml-tooltip-max-width, 20rem);word-wrap:break-word;white-space:pre-wrap;box-shadow:var(--ml-tooltip-shadow, 0 2px 8px rgba(0, 0, 0, .15));pointer-events:none}.ml__pill-tooltip--visible{opacity:1;visibility:visible}.ml__selected-popover{display:none;position:absolute;z-index:var(--ml-z-index-popover, 10000);background:var(--ml-selected-popover-bg, #ffffff);border:var(--ml-selected-popover-border, 1px solid #e5e7eb);border-radius:var(--ml-selected-popover-border-radius, .375rem);box-shadow:var(--ml-selected-popover-box-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1));width:var(--ml-selected-popover-width, 20rem);max-height:var(--ml-selected-popover-max-height, 20rem);overflow:hidden}.ml__selected-popover--visible{display:flex;flex-direction:column}.ml__selected-popover-header{display:flex;align-items:center;justify-content:space-between;padding:var(--ml-selected-popover-header-padding, .5rem .75rem);background:var(--ml-selected-popover-header-bg, rgba(59, 130, 246, .1));border-bottom:var(--ml-selected-popover-header-border-bottom, 1px solid #e5e7eb);font-size:var(--ml-selected-popover-header-font-size, .875rem);font-weight:var(--ml-selected-popover-header-font-weight, 600);color:var(--ml-selected-popover-header-color, #111827)}.ml__selected-popover-close{display:flex;align-items:center;justify-content:center;width:var(--ml-popover-close-size, 1.5rem);height:var(--ml-popover-close-size, 1.5rem);padding:0;border:none;background:var(--ml-selected-popover-close-bg, transparent);color:var(--ml-selected-popover-close-color, #6b7280);font-size:var(--ml-selected-popover-close-font-size, 1.25rem);line-height:var(--ml-line-height-none, 1);cursor:pointer;border-radius:var(--ml-selected-popover-close-border-radius, 50%);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__selected-popover-close:hover{background:var(--ml-selected-popover-close-bg-hover, rgba(59, 130, 246, .2));color:var(--ml-selected-popover-close-color-hover, #3b82f6)}.ml__selected-popover-body{display:flex;flex-direction:column;gap:var(--ml-selected-popover-body-gap, .25rem);padding:var(--ml-selected-popover-body-padding, .5rem);overflow-y:auto;max-height:var(--ml-selected-popover-body-max-height, 18rem)}.ml__selected-popover-body .ml__pill{width:100%}.ml__selected-popover-body .ml__pill-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.ml--rtl .ml__input-wrapper{direction:rtl}.ml--rtl .ml__input{text-align:right;padding-left:var(--ml-input-padding-right, 2.5rem);padding-right:var(--ml-input-padding-h, .75rem)}.ml--rtl .ml__toggle{left:var(--ml-toggle-right, .75rem)!important;right:auto!important}.ml--rtl .ml__count-badge{left:var(--ml-count-badge-offset, 2rem)!important;right:auto!important}.ml--rtl .ml__dropdown{direction:rtl;text-align:right}.ml--rtl .ml__option{flex-direction:row-reverse}.ml--rtl .ml__checkbox{margin-left:var(--ml-spacing-sm, .5rem);margin-right:0}.ml--rtl .ml__option-content{text-align:right}.ml--rtl .ml__option-icon{margin-left:var(--ml-spacing-xs, .25rem);margin-right:0}.ml--rtl .ml__pills{direction:rtl}.ml--rtl .ml__pill{flex-direction:row-reverse}.ml--rtl .ml__pill-remove{border-radius:var(--ml-pill-remove-border-radius-rtl, .375rem) 0 0 var(--ml-pill-remove-border-radius-rtl, .375rem);border-left:var(--ml-pill-remove-border, none);border-right:none}.ml--rtl .ml__pill-text{border-radius:0 var(--ml-pill-text-border-radius-rtl, .375rem) var(--ml-pill-text-border-radius-rtl, .375rem) 0}.ml--rtl .ml__count-display{direction:rtl}.ml--rtl .ml__count-badge-wrapper{flex-direction:row-reverse}.ml--rtl .ml__selected-popover{direction:rtl;text-align:right}.ml--rtl .ml__actions{direction:rtl}.ml--rtl .ml__group-label,.ml--rtl .ml__empty{text-align:right}.ml--rtl .ml__hint{direction:rtl;text-align:right}.ml--xs .ml__input{font-size:var(--ml-font-size-xs, .75rem)}.ml--xs .ml__option{padding:var(--ml-spacing-xs, .25rem) var(--ml-spacing-sm, .5rem)}.ml--xs .ml__option-title{font-size:var(--ml-font-size-xs, .75rem)}.ml--xs .ml__pill{font-size:var(--ml-font-size-2xs, .625rem)}.ml--sm .ml__input,.ml--sm .ml__option-title{font-size:var(--ml-font-size-xs, .75rem)}.ml--lg .ml__input,.ml--lg .ml__option-title{font-size:var(--ml-font-size-base, 1rem)}.ml--lg .ml__pill{font-size:var(--ml-font-size-sm, .875rem)}.ml--xl .ml__input,.ml--xl .ml__option-title{font-size:var(--ml-font-size-lg, 1.125rem)}.ml--xl .ml__pill{font-size:var(--ml-font-size-base, 1rem)}.ml--disabled .ml__input{opacity:var(--ml-disabled-input-opacity, .6);cursor:not-allowed;background:var(--ml-input-bg-disabled, rgba(107, 114, 128, .05))}.ml--disabled .ml__toggle{opacity:var(--ml-disabled-input-opacity, .6)}.ml--no-checkboxes .ml__option{gap:0;padding-left:var(--ml-option-padding-h, .75rem)}.ml--no-checkboxes .ml__option-content{padding-left:0}.ml-debug-info{margin-top:.25rem;padding:.25rem;background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:.375rem;font-size:.75rem;color:#111827}.ml-debug-info details summary{cursor:pointer;font-weight:600;color:#2563eb;-webkit-user-select:none;user-select:none;padding:.25rem;border-radius:.25rem}.ml-debug-info details summary:hover{background-color:#f3f4f6}.ml-debug-info details summary:focus{outline:2px solid #3b82f6;outline-offset:2px}.ml-debug-info .ml-debug-stats{display:flex;flex-direction:column;gap:.25rem;margin-top:.25rem;padding:.25rem;background-color:#fff;border-radius:.25rem}.ml-debug-info .ml-debug-stats span{display:flex;justify-content:space-between;padding:2px 4px;font-family:monospace;font-size:.625rem}.ml-debug-info .ml-debug-stats span:before{content:"•";margin-right:.25rem;color:#3b82f6}', pi = typeof HTMLElement < "u" ? HTMLElement : class {
2047
+ }, Se = /* @__PURE__ */ new Set();
2048
+ function st() {
2049
+ return Array.from(Se);
1782
2050
  }
1783
- class Ge extends Nt {
2051
+ class nt extends pi {
1784
2052
  constructor() {
1785
2053
  super();
1786
- h(this, "picker");
1787
- h(this, "containerElement");
1788
- h(this, "shadow");
2054
+ u(this, "picker");
2055
+ u(this, "containerElement");
2056
+ u(this, "shadow");
1789
2057
  // Properties for complex data (not attributes)
1790
- h(this, "_options");
2058
+ u(this, "_options");
1791
2059
  // Member/Callback properties
1792
- h(this, "_valueMember");
1793
- h(this, "_getValueCallback");
1794
- h(this, "_displayValueMember");
1795
- h(this, "_getDisplayValueCallback");
1796
- h(this, "_searchValueMember");
1797
- h(this, "_getSearchValueCallback");
1798
- h(this, "_iconMember");
1799
- h(this, "_getIconCallback");
1800
- h(this, "_subtitleMember");
1801
- h(this, "_getSubtitleCallback");
1802
- h(this, "_groupMember");
1803
- h(this, "_getGroupCallback");
1804
- h(this, "_disabledMember");
1805
- h(this, "_getDisabledCallback");
2060
+ u(this, "_valueMember");
2061
+ u(this, "_getValueCallback");
2062
+ u(this, "_displayValueMember");
2063
+ u(this, "_getDisplayValueCallback");
2064
+ u(this, "_getPillDisplayCallback");
2065
+ u(this, "_searchValueMember");
2066
+ u(this, "_getSearchValueCallback");
2067
+ u(this, "_iconMember");
2068
+ u(this, "_getIconCallback");
2069
+ u(this, "_subtitleMember");
2070
+ u(this, "_getSubtitleCallback");
2071
+ u(this, "_groupMember");
2072
+ u(this, "_getGroupCallback");
2073
+ u(this, "_disabledMember");
2074
+ u(this, "_getDisabledCallback");
1806
2075
  // Value formatting callbacks
1807
- h(this, "_getValueFormatCallback");
2076
+ u(this, "_getValueFormatCallback");
1808
2077
  // Tooltip callbacks
1809
- h(this, "_getPillTooltipCallback");
2078
+ u(this, "_getPillTooltipCallback");
1810
2079
  // Count pill callback
1811
- h(this, "_getCountPillCallback");
2080
+ u(this, "_getCountPillCallback");
1812
2081
  // Event callbacks
1813
- h(this, "_searchCallback");
1814
- h(this, "_addNewCallback");
1815
- h(this, "_selectCallback");
1816
- h(this, "_deselectCallback");
1817
- h(this, "_changeCallback");
2082
+ u(this, "_beforeSearchCallback");
2083
+ u(this, "_searchCallback");
2084
+ u(this, "_addNewCallback");
2085
+ u(this, "_selectCallback");
2086
+ u(this, "_deselectCallback");
2087
+ u(this, "_changeCallback");
1818
2088
  this.shadow = this.attachShadow({ mode: "open" });
1819
2089
  const t = document.createElement("style");
1820
- t.textContent = Rt, this.shadow.appendChild(t), requestAnimationFrame(() => {
2090
+ t.textContent = di, this.shadow.appendChild(t), requestAnimationFrame(() => {
1821
2091
  this.setAttribute("data-ready", "");
1822
2092
  });
1823
2093
  }
@@ -1841,6 +2111,7 @@ class Ge extends Nt {
1841
2111
  "pills-threshold-mode",
1842
2112
  "pills-position",
1843
2113
  "show-count-badge",
2114
+ "keep-options-on-search",
1844
2115
  "max-height",
1845
2116
  "empty-message",
1846
2117
  "loading-message",
@@ -1868,13 +2139,13 @@ class Ge extends Nt {
1868
2139
  ];
1869
2140
  }
1870
2141
  connectedCallback() {
1871
- be.add(this), this.render(), this.initializePicker();
2142
+ Se.add(this), this.render(), this.initializePicker();
1872
2143
  }
1873
2144
  disconnectedCallback() {
1874
- be.delete(this), this.picker && this.picker.destroy();
2145
+ Se.delete(this), this.picker && this.picker.destroy();
1875
2146
  }
1876
- attributeChangedCallback(t, l, o) {
1877
- l !== o && this.picker && t !== "initial-values" && (this.picker.destroy(), this.initializePicker());
2147
+ attributeChangedCallback(t, o, l) {
2148
+ o !== l && this.picker && t !== "initial-values" && (this.picker.destroy(), this.initializePicker());
1878
2149
  }
1879
2150
  render() {
1880
2151
  this.containerElement = document.createElement("div"), this.containerElement.setAttribute("data-multiselect", ""), this.className && (this.containerElement.className = this.className), this.shadow.appendChild(this.containerElement), this.getAttribute("show-debug-info") === "true" && this.renderDebugInfo();
@@ -1882,26 +2153,26 @@ class Ge extends Nt {
1882
2153
  renderDebugInfo() {
1883
2154
  const t = this.shadow.querySelector(".ml-debug-info");
1884
2155
  t && t.remove();
1885
- const l = document.createElement("div");
1886
- l.className = "ml-debug-info";
1887
- const o = document.createElement("details"), s = document.createElement("summary");
2156
+ const o = document.createElement("div");
2157
+ o.className = "ml-debug-info";
2158
+ const l = document.createElement("details"), s = document.createElement("summary");
1888
2159
  s.textContent = "Debug Info";
1889
2160
  const n = document.createElement("div");
1890
- n.className = "ml-debug-stats", o.appendChild(s), o.appendChild(n), l.appendChild(o), this.shadow.appendChild(l), this.updateDebugInfo();
2161
+ n.className = "ml-debug-stats", l.appendChild(s), l.appendChild(n), o.appendChild(l), this.shadow.appendChild(o), this.updateDebugInfo();
1891
2162
  }
1892
2163
  updateDebugInfo() {
1893
- var u, g;
2164
+ var h, f;
1894
2165
  const t = this.shadow.querySelector(".ml-debug-stats");
1895
2166
  if (!t || !this.picker) return;
1896
- const l = "1.0.0-rc04", o = je().length, n = this.picker.getSelected().length, r = ((u = this._options) == null ? void 0 : u.length) || 0, a = this.picker, c = a.isOpen || !1, p = a.searchTerm || "", d = a.isLoading || !1, m = ((g = a.filteredOptions) == null ? void 0 : g.length) || 0;
2167
+ const o = "1.0.0-rc06", l = st().length, n = this.picker.getSelected().length, r = ((h = this._options) == null ? void 0 : h.length) || 0, a = this.picker, p = a.isOpen || !1, c = a.searchTerm || "", d = a.isLoading || !1, m = ((f = a.filteredOptions) == null ? void 0 : f.length) || 0;
1897
2168
  t.innerHTML = `
1898
- <span>Version: ${l}</span>
1899
- <span>Total Instances: ${o}</span>
2169
+ <span>Version: ${o}</span>
2170
+ <span>Total Instances: ${l}</span>
1900
2171
  <span>Options: ${r}</span>
1901
2172
  <span>Filtered: ${m}</span>
1902
2173
  <span>Selected: ${n}</span>
1903
- <span>Dropdown: ${c ? "Open" : "Closed"}</span>
1904
- <span>Search: ${p || "none"}</span>
2174
+ <span>Dropdown: ${p ? "Open" : "Closed"}</span>
2175
+ <span>Search: ${c || "none"}</span>
1905
2176
  <span>Loading: ${d ? "Yes" : "No"}</span>
1906
2177
  `, setTimeout(() => {
1907
2178
  this.getAttribute("show-debug-info") === "true" && this.updateDebugInfo();
@@ -1910,14 +2181,14 @@ class Ge extends Nt {
1910
2181
  initializePicker() {
1911
2182
  if (!this.containerElement) return;
1912
2183
  let t;
1913
- const l = this.getAttribute("initial-values");
1914
- if (l)
2184
+ const o = this.getAttribute("initial-values");
2185
+ if (o)
1915
2186
  try {
1916
- t = JSON.parse(l);
2187
+ t = JSON.parse(o);
1917
2188
  } catch (s) {
1918
- console.error("[MultiSelectElement] Failed to parse initial-values:", s);
2189
+ S.error("[MultiSelectElement] Failed to parse initial-values:", s);
1919
2190
  }
1920
- const o = {
2191
+ const l = {
1921
2192
  // String options
1922
2193
  searchHint: this.getAttribute("search-hint") || void 0,
1923
2194
  searchPlaceholder: this.getAttribute("search-placeholder") || "Search...",
@@ -1945,6 +2216,7 @@ class Ge extends Nt {
1945
2216
  isSearchEnabled: this.getAttribute("enable-search") !== "false",
1946
2217
  isAddNewAllowed: this.getAttribute("allow-add-new") === "true",
1947
2218
  isCountBadgeShown: this.getAttribute("show-count-badge") === "true",
2219
+ isKeepOptionsOnSearch: this.getAttribute("keep-options-on-search") !== "false",
1948
2220
  // Member properties
1949
2221
  valueMember: this.getAttribute("value-member") || this._valueMember,
1950
2222
  displayValueMember: this.getAttribute("display-value-member") || this._displayValueMember,
@@ -1956,6 +2228,7 @@ class Ge extends Nt {
1956
2228
  // Callback properties (JavaScript only)
1957
2229
  getValueCallback: this._getValueCallback,
1958
2230
  getDisplayValueCallback: this._getDisplayValueCallback,
2231
+ getPillDisplayCallback: this._getPillDisplayCallback,
1959
2232
  getSearchValueCallback: this._getSearchValueCallback,
1960
2233
  getIconCallback: this._getIconCallback,
1961
2234
  getSubtitleCallback: this._getSubtitleCallback,
@@ -1975,6 +2248,7 @@ class Ge extends Nt {
1975
2248
  getCountPillCallback: this._getCountPillCallback || ((s, n) => n !== void 0 ? `+${n} more` : `${s} selected`),
1976
2249
  // Data and callbacks
1977
2250
  options: this._options,
2251
+ beforeSearchCallback: this._beforeSearchCallback,
1978
2252
  searchCallback: this._searchCallback,
1979
2253
  addNewCallback: this._addNewCallback,
1980
2254
  selectCallback: (s) => {
@@ -2011,7 +2285,7 @@ class Ge extends Nt {
2011
2285
  // Pass host element (this) for hidden inputs in light DOM
2012
2286
  hostElement: this
2013
2287
  };
2014
- t && (this.containerElement.dataset.initialValues = JSON.stringify(t)), this.picker = new zt(this.containerElement, o);
2288
+ t && (this.containerElement.dataset.initialValues = JSON.stringify(t)), this.picker = new ci(this.containerElement, l);
2015
2289
  }
2016
2290
  reinitialize() {
2017
2291
  this.picker && (this.picker.destroy(), this.initializePicker());
@@ -2082,6 +2356,12 @@ class Ge extends Nt {
2082
2356
  get getDisplayValueCallback() {
2083
2357
  return this._getDisplayValueCallback;
2084
2358
  }
2359
+ set getPillDisplayCallback(t) {
2360
+ this._getPillDisplayCallback = t, this.reinitialize();
2361
+ }
2362
+ get getPillDisplayCallback() {
2363
+ return this._getPillDisplayCallback;
2364
+ }
2085
2365
  set getSearchValueCallback(t) {
2086
2366
  this._getSearchValueCallback = t, this.reinitialize();
2087
2367
  }
@@ -2171,6 +2451,12 @@ class Ge extends Nt {
2171
2451
  return this._getCountPillCallback;
2172
2452
  }
2173
2453
  // Event callbacks
2454
+ get beforeSearchCallback() {
2455
+ return this._beforeSearchCallback;
2456
+ }
2457
+ set beforeSearchCallback(t) {
2458
+ this._beforeSearchCallback = t, this.reinitialize();
2459
+ }
2174
2460
  get searchCallback() {
2175
2461
  return this._searchCallback;
2176
2462
  }
@@ -2226,23 +2512,31 @@ class Ge extends Nt {
2226
2512
  this.picker && this.picker.destroy();
2227
2513
  }
2228
2514
  }
2229
- typeof window < "u" && typeof customElements < "u" && (customElements.get("multi-select") || customElements.define("multi-select", Ge));
2515
+ typeof window < "u" && typeof customElements < "u" && (customElements.get("multi-select") || customElements.define("multi-select", nt));
2230
2516
  typeof window < "u" && (window.keenmate = window.keenmate || {}, window.keenmate.multiselect = {
2231
- version: () => "1.0.0-rc04",
2517
+ version: () => "1.0.0-rc06",
2232
2518
  config: {
2233
2519
  name: "@keenmate/web-multiselect",
2234
- version: "1.0.0-rc04",
2520
+ version: "1.0.0-rc06",
2235
2521
  author: "Keenmate",
2236
2522
  license: "MIT",
2237
2523
  repository: "git+https://github.com/keenmate/web-multiselect.git",
2238
2524
  homepage: "https://github.com/keenmate/web-multiselect#readme"
2239
2525
  },
2240
2526
  register: () => {
2241
- typeof customElements < "u" && !customElements.get("multi-select") && customElements.define("multi-select", Ge);
2527
+ typeof customElements < "u" && !customElements.get("multi-select") && customElements.define("multi-select", nt);
2242
2528
  },
2243
- getInstances: () => je()
2529
+ getInstances: () => st()
2244
2530
  });
2245
2531
  export {
2246
- Ge as MultiSelectElement,
2247
- zt as PureMultiSelect
2532
+ nt as MultiSelectElement,
2533
+ ci as PureMultiSelect,
2534
+ S as dataLogger,
2535
+ ui as disableLogging,
2536
+ fi as enableCategory,
2537
+ hi as enableLogging,
2538
+ B as initLogger,
2539
+ A as interactionLogger,
2540
+ lt as setLogLevel,
2541
+ v as uiLogger
2248
2542
  };