inertia-bootstrap-forms 2.1.20 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.fa.md +468 -0
  2. package/README.md +322 -714
  3. package/dist/inertia-bootstrap-forms.cjs.js +1 -0
  4. package/dist/inertia-bootstrap-forms.es.js +3524 -30
  5. package/index.d.ts +143 -507
  6. package/package.json +89 -70
  7. package/src/AmountInput.vue +81 -76
  8. package/src/CaptchaInput.vue +87 -88
  9. package/src/CheckboxButtonInput.vue +56 -69
  10. package/src/CheckboxInput.vue +60 -79
  11. package/src/CheckboxToggle.vue +53 -136
  12. package/src/ChipsInput.vue +157 -0
  13. package/src/ComboboxInput.vue +556 -0
  14. package/src/DropzoneInput.vue +125 -103
  15. package/src/EditorInput.vue +47 -106
  16. package/src/EmailInput.vue +16 -15
  17. package/src/FileInput.vue +189 -179
  18. package/src/FormAdornInput.vue +75 -0
  19. package/src/FormContainer.vue +288 -251
  20. package/src/FormField.vue +59 -0
  21. package/src/FormLabel.vue +27 -27
  22. package/src/GroupControl.vue +55 -53
  23. package/src/LocationInput.vue +79 -72
  24. package/src/MobileInput.vue +21 -13
  25. package/src/MultiQuantityInput.vue +109 -181
  26. package/src/OTPInput.vue +144 -76
  27. package/src/PasswordInput.vue +151 -17
  28. package/src/PersianDatePickerInput.vue +63 -166
  29. package/src/QuantityInput.vue +100 -119
  30. package/src/RangeInput.vue +96 -0
  31. package/src/SimpleUploader.vue +8 -143
  32. package/src/StarRatingInput.vue +114 -138
  33. package/src/SubmitButton.vue +39 -24
  34. package/src/SwitchInput.vue +58 -83
  35. package/src/TelInput.vue +86 -120
  36. package/src/TextAreaInput.vue +29 -33
  37. package/src/TextInput.vue +42 -51
  38. package/src/UppyInput.vue +237 -324
  39. package/src/composables/useBsInstance.js +66 -0
  40. package/src/composables/useChoice.js +34 -0
  41. package/src/composables/useDisposables.js +59 -0
  42. package/src/composables/useField.js +121 -0
  43. package/src/composables/useFormApi.js +12 -0
  44. package/src/i18n.js +120 -0
  45. package/src/index.js +123 -42
  46. package/src/utils/bootstrap.js +48 -0
  47. package/src/utils/digits.js +21 -0
  48. package/src/utils/http.js +15 -0
  49. package/dist/choices-KiM-I_0P.js +0 -2955
  50. package/dist/dropdown-yh2aQrbw-XuCU1v1F.js +0 -1543
  51. package/dist/index-BRtKc2RA.js +0 -604
  52. package/dist/index-_x4UqcXz.js +0 -4938
  53. package/dist/inertia-bootstrap-forms.umd.js +0 -19
  54. package/dist/range-slider-pips-DTDOg3Q9.js +0 -3506
  55. package/dist/style.css +0 -1
  56. package/src/css/from-select.scss +0 -384
  57. package/src/css/loader.gif +0 -0
  58. package/src/css/location.scss +0 -44
  59. package/src/css/simple-upload.scss +0 -54
@@ -1,1543 +0,0 @@
1
- const K = /* @__PURE__ */ new Map(), Ne = {
2
- set(t, e, n) {
3
- K.has(t) || K.set(t, /* @__PURE__ */ new Map());
4
- const r = K.get(t);
5
- if (!r.has(e) && r.size !== 0) {
6
- console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);
7
- return;
8
- }
9
- r.set(e, n);
10
- },
11
- get(t, e) {
12
- return K.has(t) && K.get(t).get(e) || null;
13
- },
14
- remove(t, e) {
15
- if (!K.has(t))
16
- return;
17
- const n = K.get(t);
18
- n.delete(e), n.size === 0 && K.delete(t);
19
- }
20
- }, xn = 1e3, Ie = "transitionend", Pt = (t) => (t && window.CSS && window.CSS.escape && (t = t.replace(/#([^\s"#']+)/g, (e, n) => `#${CSS.escape(n)}`)), t), _n = (t) => t == null ? `${t}` : Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(), En = (t) => {
21
- if (!t)
22
- return 0;
23
- let { transitionDuration: e, transitionDelay: n } = window.getComputedStyle(t);
24
- const r = Number.parseFloat(e), o = Number.parseFloat(n);
25
- return !r && !o ? 0 : (e = e.split(",")[0], n = n.split(",")[0], (Number.parseFloat(e) + Number.parseFloat(n)) * xn);
26
- }, An = (t) => {
27
- t.dispatchEvent(new Event(Ie));
28
- }, G = (t) => !t || typeof t != "object" ? !1 : (typeof t.jquery < "u" && (t = t[0]), typeof t.nodeType < "u"), qe = (t) => G(t) ? t.jquery ? t[0] : t : typeof t == "string" && t.length > 0 ? document.querySelector(Pt(t)) : null, Tt = (t) => {
29
- if (!G(t) || t.getClientRects().length === 0)
30
- return !1;
31
- const e = getComputedStyle(t).getPropertyValue("visibility") === "visible", n = t.closest("details:not([open])");
32
- if (!n)
33
- return e;
34
- if (n !== t) {
35
- const r = t.closest("summary");
36
- if (r && r.parentNode !== n || r === null)
37
- return !1;
38
- }
39
- return e;
40
- }, Re = (t) => !t || t.nodeType !== Node.ELEMENT_NODE || t.classList.contains("disabled") ? !0 : typeof t.disabled < "u" ? t.disabled : t.hasAttribute("disabled") && t.getAttribute("disabled") !== "false", vt = () => {
41
- }, Lt = () => window.jQuery && !document.body.hasAttribute("data-bs-no-jquery") ? window.jQuery : null, Se = [], jn = (t) => {
42
- document.readyState === "loading" ? (Se.length || document.addEventListener("DOMContentLoaded", () => {
43
- for (const e of Se)
44
- e();
45
- }), Se.push(t)) : t();
46
- }, pe = () => document.documentElement.dir === "rtl", Dn = (t) => {
47
- jn(() => {
48
- const e = Lt();
49
- if (e) {
50
- const n = t.NAME, r = e.fn[n];
51
- e.fn[n] = t.jQueryInterface, e.fn[n].Constructor = t, e.fn[n].noConflict = () => (e.fn[n] = r, t.jQueryInterface);
52
- }
53
- });
54
- }, Ve = (t, e = [], n = t) => typeof t == "function" ? t.call(...e) : n, $n = (t, e, n = !0) => {
55
- if (!n) {
56
- Ve(t);
57
- return;
58
- }
59
- const r = En(e) + 5;
60
- let o = !1;
61
- const i = ({ target: s }) => {
62
- s === e && (o = !0, e.removeEventListener(Ie, i), Ve(t));
63
- };
64
- e.addEventListener(Ie, i), setTimeout(() => {
65
- o || An(e);
66
- }, r);
67
- }, Cn = (t, e, n, r) => {
68
- const o = t.length;
69
- let i = t.indexOf(e);
70
- return i === -1 ? !n && r ? t[o - 1] : t[0] : (i += n ? 1 : -1, r && (i = (i + o) % o), t[Math.max(0, Math.min(i, o - 1))]);
71
- }, Mn = /[^.]*(?=\..*)\.|.*/, kn = /\..*/, Pn = /::\d+$/, We = {};
72
- let yt = 1;
73
- const Nt = {
74
- mouseenter: "mouseover",
75
- mouseleave: "mouseout"
76
- }, Tn = /* @__PURE__ */ new Set([
77
- "click",
78
- "dblclick",
79
- "mouseup",
80
- "mousedown",
81
- "contextmenu",
82
- "mousewheel",
83
- "DOMMouseScroll",
84
- "mouseover",
85
- "mouseout",
86
- "mousemove",
87
- "selectstart",
88
- "selectend",
89
- "keydown",
90
- "keypress",
91
- "keyup",
92
- "orientationchange",
93
- "touchstart",
94
- "touchmove",
95
- "touchend",
96
- "touchcancel",
97
- "pointerdown",
98
- "pointermove",
99
- "pointerup",
100
- "pointerleave",
101
- "pointercancel",
102
- "gesturestart",
103
- "gesturechange",
104
- "gestureend",
105
- "focus",
106
- "blur",
107
- "change",
108
- "reset",
109
- "select",
110
- "submit",
111
- "focusin",
112
- "focusout",
113
- "load",
114
- "unload",
115
- "beforeunload",
116
- "resize",
117
- "move",
118
- "DOMContentLoaded",
119
- "readystatechange",
120
- "error",
121
- "abort",
122
- "scroll"
123
- ]);
124
- function St(t, e) {
125
- return e && `${e}::${yt++}` || t.uidEvent || yt++;
126
- }
127
- function Wt(t) {
128
- const e = St(t);
129
- return t.uidEvent = e, We[e] = We[e] || {}, We[e];
130
- }
131
- function Ln(t, e) {
132
- return function n(r) {
133
- return ze(r, { delegateTarget: t }), n.oneOff && k.off(t, r.type, e), e.apply(t, [r]);
134
- };
135
- }
136
- function Nn(t, e, n) {
137
- return function r(o) {
138
- const i = t.querySelectorAll(e);
139
- for (let { target: s } = o; s && s !== this; s = s.parentNode)
140
- for (const c of i)
141
- if (c === s)
142
- return ze(o, { delegateTarget: s }), r.oneOff && k.off(t, o.type, e, n), n.apply(s, [o]);
143
- };
144
- }
145
- function Bt(t, e, n = null) {
146
- return Object.values(t).find((r) => r.callable === e && r.delegationSelector === n);
147
- }
148
- function Ht(t, e, n) {
149
- const r = typeof e == "string", o = r ? n : e || n;
150
- let i = It(t);
151
- return Tn.has(i) || (i = t), [r, o, i];
152
- }
153
- function bt(t, e, n, r, o) {
154
- if (typeof e != "string" || !t)
155
- return;
156
- let [i, s, c] = Ht(e, n, r);
157
- e in Nt && (s = /* @__PURE__ */ ((d) => function(m) {
158
- if (!m.relatedTarget || m.relatedTarget !== m.delegateTarget && !m.delegateTarget.contains(m.relatedTarget))
159
- return d.call(this, m);
160
- })(s));
161
- const a = Wt(t), f = a[c] || (a[c] = {}), u = Bt(f, s, i ? n : null);
162
- if (u) {
163
- u.oneOff = u.oneOff && o;
164
- return;
165
- }
166
- const h = St(s, e.replace(Mn, "")), p = i ? Nn(t, n, s) : Ln(t, s);
167
- p.delegationSelector = i ? n : null, p.callable = s, p.oneOff = o, p.uidEvent = h, f[h] = p, t.addEventListener(c, p, i);
168
- }
169
- function Fe(t, e, n, r, o) {
170
- const i = Bt(e[n], r, o);
171
- i && (t.removeEventListener(n, i, !!o), delete e[n][i.uidEvent]);
172
- }
173
- function Sn(t, e, n, r) {
174
- const o = e[n] || {};
175
- for (const [i, s] of Object.entries(o))
176
- i.includes(r) && Fe(t, e, n, s.callable, s.delegationSelector);
177
- }
178
- function It(t) {
179
- return t = t.replace(kn, ""), Nt[t] || t;
180
- }
181
- const k = {
182
- on(t, e, n, r) {
183
- bt(t, e, n, r, !1);
184
- },
185
- one(t, e, n, r) {
186
- bt(t, e, n, r, !0);
187
- },
188
- off(t, e, n, r) {
189
- if (typeof e != "string" || !t)
190
- return;
191
- const [o, i, s] = Ht(e, n, r), c = s !== e, a = Wt(t), f = a[s] || {}, u = e.startsWith(".");
192
- if (typeof i < "u") {
193
- if (!Object.keys(f).length)
194
- return;
195
- Fe(t, a, s, i, o ? n : null);
196
- return;
197
- }
198
- if (u)
199
- for (const h of Object.keys(a))
200
- Sn(t, a, h, e.slice(1));
201
- for (const [h, p] of Object.entries(f)) {
202
- const d = h.replace(Pn, "");
203
- (!c || e.includes(d)) && Fe(t, a, s, p.callable, p.delegationSelector);
204
- }
205
- },
206
- trigger(t, e, n) {
207
- if (typeof e != "string" || !t)
208
- return null;
209
- const r = Lt(), o = It(e), i = e !== o;
210
- let s = null, c = !0, a = !0, f = !1;
211
- i && r && (s = r.Event(e, n), r(t).trigger(s), c = !s.isPropagationStopped(), a = !s.isImmediatePropagationStopped(), f = s.isDefaultPrevented());
212
- const u = ze(new Event(e, { bubbles: c, cancelable: !0 }), n);
213
- return f && u.preventDefault(), a && t.dispatchEvent(u), u.defaultPrevented && s && s.preventDefault(), u;
214
- }
215
- };
216
- function ze(t, e = {}) {
217
- for (const [n, r] of Object.entries(e))
218
- try {
219
- t[n] = r;
220
- } catch {
221
- Object.defineProperty(t, n, {
222
- configurable: !0,
223
- get() {
224
- return r;
225
- }
226
- });
227
- }
228
- return t;
229
- }
230
- function wt(t) {
231
- if (t === "true")
232
- return !0;
233
- if (t === "false")
234
- return !1;
235
- if (t === Number(t).toString())
236
- return Number(t);
237
- if (t === "" || t === "null")
238
- return null;
239
- if (typeof t != "string")
240
- return t;
241
- try {
242
- return JSON.parse(decodeURIComponent(t));
243
- } catch {
244
- return t;
245
- }
246
- }
247
- function Be(t) {
248
- return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
249
- }
250
- const De = {
251
- setDataAttribute(t, e, n) {
252
- t.setAttribute(`data-bs-${Be(e)}`, n);
253
- },
254
- removeDataAttribute(t, e) {
255
- t.removeAttribute(`data-bs-${Be(e)}`);
256
- },
257
- getDataAttributes(t) {
258
- if (!t)
259
- return {};
260
- const e = {}, n = Object.keys(t.dataset).filter((r) => r.startsWith("bs") && !r.startsWith("bsConfig"));
261
- for (const r of n) {
262
- let o = r.replace(/^bs/, "");
263
- o = o.charAt(0).toLowerCase() + o.slice(1), e[o] = wt(t.dataset[r]);
264
- }
265
- return e;
266
- },
267
- getDataAttribute(t, e) {
268
- return wt(t.getAttribute(`data-bs-${Be(e)}`));
269
- }
270
- };
271
- class Wn {
272
- // Getters
273
- static get Default() {
274
- return {};
275
- }
276
- static get DefaultType() {
277
- return {};
278
- }
279
- static get NAME() {
280
- throw new Error('You have to implement the static method "NAME", for each component!');
281
- }
282
- _getConfig(e) {
283
- return e = this._mergeConfigObj(e), e = this._configAfterMerge(e), this._typeCheckConfig(e), e;
284
- }
285
- _configAfterMerge(e) {
286
- return e;
287
- }
288
- _mergeConfigObj(e, n) {
289
- const r = G(n) ? De.getDataAttribute(n, "config") : {};
290
- return {
291
- ...this.constructor.Default,
292
- ...typeof r == "object" ? r : {},
293
- ...G(n) ? De.getDataAttributes(n) : {},
294
- ...typeof e == "object" ? e : {}
295
- };
296
- }
297
- _typeCheckConfig(e, n = this.constructor.DefaultType) {
298
- for (const [r, o] of Object.entries(n)) {
299
- const i = e[r], s = G(i) ? "element" : _n(i);
300
- if (!new RegExp(o).test(s))
301
- throw new TypeError(
302
- `${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${o}".`
303
- );
304
- }
305
- }
306
- }
307
- const Bn = "5.3.6";
308
- let Hn = class extends Wn {
309
- constructor(e, n) {
310
- super(), e = qe(e), e && (this._element = e, this._config = this._getConfig(n), Ne.set(this._element, this.constructor.DATA_KEY, this));
311
- }
312
- // Public
313
- dispose() {
314
- Ne.remove(this._element, this.constructor.DATA_KEY), k.off(this._element, this.constructor.EVENT_KEY);
315
- for (const e of Object.getOwnPropertyNames(this))
316
- this[e] = null;
317
- }
318
- // Private
319
- _queueCallback(e, n, r = !0) {
320
- $n(e, n, r);
321
- }
322
- _getConfig(e) {
323
- return e = this._mergeConfigObj(e, this._element), e = this._configAfterMerge(e), this._typeCheckConfig(e), e;
324
- }
325
- // Static
326
- static getInstance(e) {
327
- return Ne.get(qe(e), this.DATA_KEY);
328
- }
329
- static getOrCreateInstance(e, n = {}) {
330
- return this.getInstance(e) || new this(e, typeof n == "object" ? n : null);
331
- }
332
- static get VERSION() {
333
- return Bn;
334
- }
335
- static get DATA_KEY() {
336
- return `bs.${this.NAME}`;
337
- }
338
- static get EVENT_KEY() {
339
- return `.${this.DATA_KEY}`;
340
- }
341
- static eventName(e) {
342
- return `${e}${this.EVENT_KEY}`;
343
- }
344
- };
345
- const He = (t) => {
346
- let e = t.getAttribute("data-bs-target");
347
- if (!e || e === "#") {
348
- let n = t.getAttribute("href");
349
- if (!n || !n.includes("#") && !n.startsWith("."))
350
- return null;
351
- n.includes("#") && !n.startsWith("#") && (n = `#${n.split("#")[1]}`), e = n && n !== "#" ? n.trim() : null;
352
- }
353
- return e ? e.split(",").map((n) => Pt(n)).join(",") : null;
354
- }, H = {
355
- find(t, e = document.documentElement) {
356
- return [].concat(...Element.prototype.querySelectorAll.call(e, t));
357
- },
358
- findOne(t, e = document.documentElement) {
359
- return Element.prototype.querySelector.call(e, t);
360
- },
361
- children(t, e) {
362
- return [].concat(...t.children).filter((n) => n.matches(e));
363
- },
364
- parents(t, e) {
365
- const n = [];
366
- let r = t.parentNode.closest(e);
367
- for (; r; )
368
- n.push(r), r = r.parentNode.closest(e);
369
- return n;
370
- },
371
- prev(t, e) {
372
- let n = t.previousElementSibling;
373
- for (; n; ) {
374
- if (n.matches(e))
375
- return [n];
376
- n = n.previousElementSibling;
377
- }
378
- return [];
379
- },
380
- // TODO: this is now unused; remove later along with prev()
381
- next(t, e) {
382
- let n = t.nextElementSibling;
383
- for (; n; ) {
384
- if (n.matches(e))
385
- return [n];
386
- n = n.nextElementSibling;
387
- }
388
- return [];
389
- },
390
- focusableChildren(t) {
391
- const e = [
392
- "a",
393
- "button",
394
- "input",
395
- "textarea",
396
- "select",
397
- "details",
398
- "[tabindex]",
399
- '[contenteditable="true"]'
400
- ].map((n) => `${n}:not([tabindex^="-"])`).join(",");
401
- return this.find(e, t).filter((n) => !Re(n) && Tt(n));
402
- },
403
- getSelectorFromElement(t) {
404
- const e = He(t);
405
- return e && H.findOne(e) ? e : null;
406
- },
407
- getElementFromSelector(t) {
408
- const e = He(t);
409
- return e ? H.findOne(e) : null;
410
- },
411
- getMultipleElementsFromSelector(t) {
412
- const e = He(t);
413
- return e ? H.find(e) : [];
414
- }
415
- };
416
- var C = "top", T = "bottom", L = "right", M = "left", Ce = "auto", de = [C, T, L, M], te = "start", ae = "end", qt = "clippingParents", Qe = "viewport", ie = "popper", Rt = "reference", Ke = /* @__PURE__ */ de.reduce(function(t, e) {
417
- return t.concat([e + "-" + te, e + "-" + ae]);
418
- }, []), Je = /* @__PURE__ */ [].concat(de, [Ce]).reduce(function(t, e) {
419
- return t.concat([e, e + "-" + te, e + "-" + ae]);
420
- }, []), Vt = "beforeRead", Ft = "read", Kt = "afterRead", Ut = "beforeMain", Yt = "main", zt = "afterMain", Qt = "beforeWrite", Jt = "write", Zt = "afterWrite", Xt = [Vt, Ft, Kt, Ut, Yt, zt, Qt, Jt, Zt];
421
- function R(t) {
422
- return t ? (t.nodeName || "").toLowerCase() : null;
423
- }
424
- function N(t) {
425
- if (t == null)
426
- return window;
427
- if (t.toString() !== "[object Window]") {
428
- var e = t.ownerDocument;
429
- return e && e.defaultView || window;
430
- }
431
- return t;
432
- }
433
- function ne(t) {
434
- var e = N(t).Element;
435
- return t instanceof e || t instanceof Element;
436
- }
437
- function S(t) {
438
- var e = N(t).HTMLElement;
439
- return t instanceof e || t instanceof HTMLElement;
440
- }
441
- function Ze(t) {
442
- if (typeof ShadowRoot > "u")
443
- return !1;
444
- var e = N(t).ShadowRoot;
445
- return t instanceof e || t instanceof ShadowRoot;
446
- }
447
- function In(t) {
448
- var e = t.state;
449
- Object.keys(e.elements).forEach(function(n) {
450
- var r = e.styles[n] || {}, o = e.attributes[n] || {}, i = e.elements[n];
451
- !S(i) || !R(i) || (Object.assign(i.style, r), Object.keys(o).forEach(function(s) {
452
- var c = o[s];
453
- c === !1 ? i.removeAttribute(s) : i.setAttribute(s, c === !0 ? "" : c);
454
- }));
455
- });
456
- }
457
- function qn(t) {
458
- var e = t.state, n = {
459
- popper: {
460
- position: e.options.strategy,
461
- left: "0",
462
- top: "0",
463
- margin: "0"
464
- },
465
- arrow: {
466
- position: "absolute"
467
- },
468
- reference: {}
469
- };
470
- return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
471
- Object.keys(e.elements).forEach(function(r) {
472
- var o = e.elements[r], i = e.attributes[r] || {}, s = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), c = s.reduce(function(a, f) {
473
- return a[f] = "", a;
474
- }, {});
475
- !S(o) || !R(o) || (Object.assign(o.style, c), Object.keys(i).forEach(function(a) {
476
- o.removeAttribute(a);
477
- }));
478
- });
479
- };
480
- }
481
- const Xe = {
482
- name: "applyStyles",
483
- enabled: !0,
484
- phase: "write",
485
- fn: In,
486
- effect: qn,
487
- requires: ["computeStyles"]
488
- };
489
- function I(t) {
490
- return t.split("-")[0];
491
- }
492
- var ee = Math.max, $e = Math.min, ce = Math.round;
493
- function Ue() {
494
- var t = navigator.userAgentData;
495
- return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
496
- return e.brand + "/" + e.version;
497
- }).join(" ") : navigator.userAgent;
498
- }
499
- function Gt() {
500
- return !/^((?!chrome|android).)*safari/i.test(Ue());
501
- }
502
- function fe(t, e, n) {
503
- e === void 0 && (e = !1), n === void 0 && (n = !1);
504
- var r = t.getBoundingClientRect(), o = 1, i = 1;
505
- e && S(t) && (o = t.offsetWidth > 0 && ce(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && ce(r.height) / t.offsetHeight || 1);
506
- var s = ne(t) ? N(t) : window, c = s.visualViewport, a = !Gt() && n, f = (r.left + (a && c ? c.offsetLeft : 0)) / o, u = (r.top + (a && c ? c.offsetTop : 0)) / i, h = r.width / o, p = r.height / i;
507
- return {
508
- width: h,
509
- height: p,
510
- top: u,
511
- right: f + h,
512
- bottom: u + p,
513
- left: f,
514
- x: f,
515
- y: u
516
- };
517
- }
518
- function Ge(t) {
519
- var e = fe(t), n = t.offsetWidth, r = t.offsetHeight;
520
- return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
521
- x: t.offsetLeft,
522
- y: t.offsetTop,
523
- width: n,
524
- height: r
525
- };
526
- }
527
- function en(t, e) {
528
- var n = e.getRootNode && e.getRootNode();
529
- if (t.contains(e))
530
- return !0;
531
- if (n && Ze(n)) {
532
- var r = e;
533
- do {
534
- if (r && t.isSameNode(r))
535
- return !0;
536
- r = r.parentNode || r.host;
537
- } while (r);
538
- }
539
- return !1;
540
- }
541
- function F(t) {
542
- return N(t).getComputedStyle(t);
543
- }
544
- function Rn(t) {
545
- return ["table", "td", "th"].indexOf(R(t)) >= 0;
546
- }
547
- function U(t) {
548
- return ((ne(t) ? t.ownerDocument : (
549
- // $FlowFixMe[prop-missing]
550
- t.document
551
- )) || window.document).documentElement;
552
- }
553
- function Me(t) {
554
- return R(t) === "html" ? t : (
555
- // this is a quicker (but less type safe) way to save quite some bytes from the bundle
556
- // $FlowFixMe[incompatible-return]
557
- // $FlowFixMe[prop-missing]
558
- t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
559
- t.parentNode || // DOM Element detected
560
- (Ze(t) ? t.host : null) || // ShadowRoot detected
561
- // $FlowFixMe[incompatible-call]: HTMLElement is a Node
562
- U(t)
563
- );
564
- }
565
- function Ot(t) {
566
- return !S(t) || // https://github.com/popperjs/popper-core/issues/837
567
- F(t).position === "fixed" ? null : t.offsetParent;
568
- }
569
- function Vn(t) {
570
- var e = /firefox/i.test(Ue()), n = /Trident/i.test(Ue());
571
- if (n && S(t)) {
572
- var r = F(t);
573
- if (r.position === "fixed")
574
- return null;
575
- }
576
- var o = Me(t);
577
- for (Ze(o) && (o = o.host); S(o) && ["html", "body"].indexOf(R(o)) < 0; ) {
578
- var i = F(o);
579
- if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none")
580
- return o;
581
- o = o.parentNode;
582
- }
583
- return null;
584
- }
585
- function ye(t) {
586
- for (var e = N(t), n = Ot(t); n && Rn(n) && F(n).position === "static"; )
587
- n = Ot(n);
588
- return n && (R(n) === "html" || R(n) === "body" && F(n).position === "static") ? e : n || Vn(t) || e;
589
- }
590
- function et(t) {
591
- return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
592
- }
593
- function ge(t, e, n) {
594
- return ee(t, $e(e, n));
595
- }
596
- function Fn(t, e, n) {
597
- var r = ge(t, e, n);
598
- return r > n ? n : r;
599
- }
600
- function tn() {
601
- return {
602
- top: 0,
603
- right: 0,
604
- bottom: 0,
605
- left: 0
606
- };
607
- }
608
- function nn(t) {
609
- return Object.assign({}, tn(), t);
610
- }
611
- function rn(t, e) {
612
- return e.reduce(function(n, r) {
613
- return n[r] = t, n;
614
- }, {});
615
- }
616
- var Kn = function(t, e) {
617
- return t = typeof t == "function" ? t(Object.assign({}, e.rects, {
618
- placement: e.placement
619
- })) : t, nn(typeof t != "number" ? t : rn(t, de));
620
- };
621
- function Un(t) {
622
- var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, c = I(n.placement), a = et(c), f = [M, L].indexOf(c) >= 0, u = f ? "height" : "width";
623
- if (!(!i || !s)) {
624
- var h = Kn(o.padding, n), p = Ge(i), d = a === "y" ? C : M, m = a === "y" ? T : L, l = n.rects.reference[u] + n.rects.reference[a] - s[a] - n.rects.popper[u], y = s[a] - n.rects.reference[a], b = ye(i), O = b ? a === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, x = l / 2 - y / 2, g = h[d], v = O - p[u] - h[m], w = O / 2 - p[u] / 2 + x, _ = ge(g, w, v), E = a;
625
- n.modifiersData[r] = (e = {}, e[E] = _, e.centerOffset = _ - w, e);
626
- }
627
- }
628
- function Yn(t) {
629
- var e = t.state, n = t.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
630
- o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || en(e.elements.popper, o) && (e.elements.arrow = o));
631
- }
632
- const on = {
633
- name: "arrow",
634
- enabled: !0,
635
- phase: "main",
636
- fn: Un,
637
- effect: Yn,
638
- requires: ["popperOffsets"],
639
- requiresIfExists: ["preventOverflow"]
640
- };
641
- function ue(t) {
642
- return t.split("-")[1];
643
- }
644
- var zn = {
645
- top: "auto",
646
- right: "auto",
647
- bottom: "auto",
648
- left: "auto"
649
- };
650
- function Qn(t, e) {
651
- var n = t.x, r = t.y, o = e.devicePixelRatio || 1;
652
- return {
653
- x: ce(n * o) / o || 0,
654
- y: ce(r * o) / o || 0
655
- };
656
- }
657
- function xt(t) {
658
- var e, n = t.popper, r = t.popperRect, o = t.placement, i = t.variation, s = t.offsets, c = t.position, a = t.gpuAcceleration, f = t.adaptive, u = t.roundOffsets, h = t.isFixed, p = s.x, d = p === void 0 ? 0 : p, m = s.y, l = m === void 0 ? 0 : m, y = typeof u == "function" ? u({
659
- x: d,
660
- y: l
661
- }) : {
662
- x: d,
663
- y: l
664
- };
665
- d = y.x, l = y.y;
666
- var b = s.hasOwnProperty("x"), O = s.hasOwnProperty("y"), x = M, g = C, v = window;
667
- if (f) {
668
- var w = ye(n), _ = "clientHeight", E = "clientWidth";
669
- if (w === N(n) && (w = U(n), F(w).position !== "static" && c === "absolute" && (_ = "scrollHeight", E = "scrollWidth")), w = w, o === C || (o === M || o === L) && i === ae) {
670
- g = T;
671
- var A = h && w === v && v.visualViewport ? v.visualViewport.height : (
672
- // $FlowFixMe[prop-missing]
673
- w[_]
674
- );
675
- l -= A - r.height, l *= a ? 1 : -1;
676
- }
677
- if (o === M || (o === C || o === T) && i === ae) {
678
- x = L;
679
- var j = h && w === v && v.visualViewport ? v.visualViewport.width : (
680
- // $FlowFixMe[prop-missing]
681
- w[E]
682
- );
683
- d -= j - r.width, d *= a ? 1 : -1;
684
- }
685
- }
686
- var D = Object.assign({
687
- position: c
688
- }, f && zn), W = u === !0 ? Qn({
689
- x: d,
690
- y: l
691
- }, N(n)) : {
692
- x: d,
693
- y: l
694
- };
695
- if (d = W.x, l = W.y, a) {
696
- var $;
697
- return Object.assign({}, D, ($ = {}, $[g] = O ? "0" : "", $[x] = b ? "0" : "", $.transform = (v.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + l + "px)" : "translate3d(" + d + "px, " + l + "px, 0)", $));
698
- }
699
- return Object.assign({}, D, (e = {}, e[g] = O ? l + "px" : "", e[x] = b ? d + "px" : "", e.transform = "", e));
700
- }
701
- function Jn(t) {
702
- var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, s = i === void 0 ? !0 : i, c = n.roundOffsets, a = c === void 0 ? !0 : c, f = {
703
- placement: I(e.placement),
704
- variation: ue(e.placement),
705
- popper: e.elements.popper,
706
- popperRect: e.rects.popper,
707
- gpuAcceleration: o,
708
- isFixed: e.options.strategy === "fixed"
709
- };
710
- e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, xt(Object.assign({}, f, {
711
- offsets: e.modifiersData.popperOffsets,
712
- position: e.options.strategy,
713
- adaptive: s,
714
- roundOffsets: a
715
- })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, xt(Object.assign({}, f, {
716
- offsets: e.modifiersData.arrow,
717
- position: "absolute",
718
- adaptive: !1,
719
- roundOffsets: a
720
- })))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
721
- "data-popper-placement": e.placement
722
- });
723
- }
724
- const tt = {
725
- name: "computeStyles",
726
- enabled: !0,
727
- phase: "beforeWrite",
728
- fn: Jn,
729
- data: {}
730
- };
731
- var Ee = {
732
- passive: !0
733
- };
734
- function Zn(t) {
735
- var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? !0 : o, s = r.resize, c = s === void 0 ? !0 : s, a = N(e.elements.popper), f = [].concat(e.scrollParents.reference, e.scrollParents.popper);
736
- return i && f.forEach(function(u) {
737
- u.addEventListener("scroll", n.update, Ee);
738
- }), c && a.addEventListener("resize", n.update, Ee), function() {
739
- i && f.forEach(function(u) {
740
- u.removeEventListener("scroll", n.update, Ee);
741
- }), c && a.removeEventListener("resize", n.update, Ee);
742
- };
743
- }
744
- const nt = {
745
- name: "eventListeners",
746
- enabled: !0,
747
- phase: "write",
748
- fn: function() {
749
- },
750
- effect: Zn,
751
- data: {}
752
- };
753
- var Xn = {
754
- left: "right",
755
- right: "left",
756
- bottom: "top",
757
- top: "bottom"
758
- };
759
- function Ae(t) {
760
- return t.replace(/left|right|bottom|top/g, function(e) {
761
- return Xn[e];
762
- });
763
- }
764
- var Gn = {
765
- start: "end",
766
- end: "start"
767
- };
768
- function _t(t) {
769
- return t.replace(/start|end/g, function(e) {
770
- return Gn[e];
771
- });
772
- }
773
- function rt(t) {
774
- var e = N(t), n = e.pageXOffset, r = e.pageYOffset;
775
- return {
776
- scrollLeft: n,
777
- scrollTop: r
778
- };
779
- }
780
- function ot(t) {
781
- return fe(U(t)).left + rt(t).scrollLeft;
782
- }
783
- function er(t, e) {
784
- var n = N(t), r = U(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, c = 0, a = 0;
785
- if (o) {
786
- i = o.width, s = o.height;
787
- var f = Gt();
788
- (f || !f && e === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
789
- }
790
- return {
791
- width: i,
792
- height: s,
793
- x: c + ot(t),
794
- y: a
795
- };
796
- }
797
- function tr(t) {
798
- var e, n = U(t), r = rt(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i = ee(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = ee(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), c = -r.scrollLeft + ot(t), a = -r.scrollTop;
799
- return F(o || n).direction === "rtl" && (c += ee(n.clientWidth, o ? o.clientWidth : 0) - i), {
800
- width: i,
801
- height: s,
802
- x: c,
803
- y: a
804
- };
805
- }
806
- function it(t) {
807
- var e = F(t), n = e.overflow, r = e.overflowX, o = e.overflowY;
808
- return /auto|scroll|overlay|hidden/.test(n + o + r);
809
- }
810
- function sn(t) {
811
- return ["html", "body", "#document"].indexOf(R(t)) >= 0 ? t.ownerDocument.body : S(t) && it(t) ? t : sn(Me(t));
812
- }
813
- function ve(t, e) {
814
- var n;
815
- e === void 0 && (e = []);
816
- var r = sn(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = N(r), s = o ? [i].concat(i.visualViewport || [], it(r) ? r : []) : r, c = e.concat(s);
817
- return o ? c : (
818
- // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
819
- c.concat(ve(Me(s)))
820
- );
821
- }
822
- function Ye(t) {
823
- return Object.assign({}, t, {
824
- left: t.x,
825
- top: t.y,
826
- right: t.x + t.width,
827
- bottom: t.y + t.height
828
- });
829
- }
830
- function nr(t, e) {
831
- var n = fe(t, !1, e === "fixed");
832
- return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
833
- }
834
- function Et(t, e, n) {
835
- return e === Qe ? Ye(er(t, n)) : ne(e) ? nr(e, n) : Ye(tr(U(t)));
836
- }
837
- function rr(t) {
838
- var e = ve(Me(t)), n = ["absolute", "fixed"].indexOf(F(t).position) >= 0, r = n && S(t) ? ye(t) : t;
839
- return ne(r) ? e.filter(function(o) {
840
- return ne(o) && en(o, r) && R(o) !== "body";
841
- }) : [];
842
- }
843
- function or(t, e, n, r) {
844
- var o = e === "clippingParents" ? rr(t) : [].concat(e), i = [].concat(o, [n]), s = i[0], c = i.reduce(function(a, f) {
845
- var u = Et(t, f, r);
846
- return a.top = ee(u.top, a.top), a.right = $e(u.right, a.right), a.bottom = $e(u.bottom, a.bottom), a.left = ee(u.left, a.left), a;
847
- }, Et(t, s, r));
848
- return c.width = c.right - c.left, c.height = c.bottom - c.top, c.x = c.left, c.y = c.top, c;
849
- }
850
- function an(t) {
851
- var e = t.reference, n = t.element, r = t.placement, o = r ? I(r) : null, i = r ? ue(r) : null, s = e.x + e.width / 2 - n.width / 2, c = e.y + e.height / 2 - n.height / 2, a;
852
- switch (o) {
853
- case C:
854
- a = {
855
- x: s,
856
- y: e.y - n.height
857
- };
858
- break;
859
- case T:
860
- a = {
861
- x: s,
862
- y: e.y + e.height
863
- };
864
- break;
865
- case L:
866
- a = {
867
- x: e.x + e.width,
868
- y: c
869
- };
870
- break;
871
- case M:
872
- a = {
873
- x: e.x - n.width,
874
- y: c
875
- };
876
- break;
877
- default:
878
- a = {
879
- x: e.x,
880
- y: e.y
881
- };
882
- }
883
- var f = o ? et(o) : null;
884
- if (f != null) {
885
- var u = f === "y" ? "height" : "width";
886
- switch (i) {
887
- case te:
888
- a[f] = a[f] - (e[u] / 2 - n[u] / 2);
889
- break;
890
- case ae:
891
- a[f] = a[f] + (e[u] / 2 - n[u] / 2);
892
- break;
893
- }
894
- }
895
- return a;
896
- }
897
- function le(t, e) {
898
- e === void 0 && (e = {});
899
- var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, c = n.boundary, a = c === void 0 ? qt : c, f = n.rootBoundary, u = f === void 0 ? Qe : f, h = n.elementContext, p = h === void 0 ? ie : h, d = n.altBoundary, m = d === void 0 ? !1 : d, l = n.padding, y = l === void 0 ? 0 : l, b = nn(typeof y != "number" ? y : rn(y, de)), O = p === ie ? Rt : ie, x = t.rects.popper, g = t.elements[m ? O : p], v = or(ne(g) ? g : g.contextElement || U(t.elements.popper), a, u, s), w = fe(t.elements.reference), _ = an({
900
- reference: w,
901
- element: x,
902
- placement: o
903
- }), E = Ye(Object.assign({}, x, _)), A = p === ie ? E : w, j = {
904
- top: v.top - A.top + b.top,
905
- bottom: A.bottom - v.bottom + b.bottom,
906
- left: v.left - A.left + b.left,
907
- right: A.right - v.right + b.right
908
- }, D = t.modifiersData.offset;
909
- if (p === ie && D) {
910
- var W = D[o];
911
- Object.keys(j).forEach(function($) {
912
- var Y = [L, T].indexOf($) >= 0 ? 1 : -1, z = [C, T].indexOf($) >= 0 ? "y" : "x";
913
- j[$] += W[z] * Y;
914
- });
915
- }
916
- return j;
917
- }
918
- function ir(t, e) {
919
- e === void 0 && (e = {});
920
- var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, c = n.flipVariations, a = n.allowedAutoPlacements, f = a === void 0 ? Je : a, u = ue(r), h = u ? c ? Ke : Ke.filter(function(m) {
921
- return ue(m) === u;
922
- }) : de, p = h.filter(function(m) {
923
- return f.indexOf(m) >= 0;
924
- });
925
- p.length === 0 && (p = h);
926
- var d = p.reduce(function(m, l) {
927
- return m[l] = le(t, {
928
- placement: l,
929
- boundary: o,
930
- rootBoundary: i,
931
- padding: s
932
- })[I(l)], m;
933
- }, {});
934
- return Object.keys(d).sort(function(m, l) {
935
- return d[m] - d[l];
936
- });
937
- }
938
- function sr(t) {
939
- if (I(t) === Ce)
940
- return [];
941
- var e = Ae(t);
942
- return [_t(t), e, _t(e)];
943
- }
944
- function ar(t) {
945
- var e = t.state, n = t.options, r = t.name;
946
- if (!e.modifiersData[r]._skip) {
947
- for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, c = s === void 0 ? !0 : s, a = n.fallbackPlacements, f = n.padding, u = n.boundary, h = n.rootBoundary, p = n.altBoundary, d = n.flipVariations, m = d === void 0 ? !0 : d, l = n.allowedAutoPlacements, y = e.options.placement, b = I(y), O = b === y, x = a || (O || !m ? [Ae(y)] : sr(y)), g = [y].concat(x).reduce(function(J, V) {
948
- return J.concat(I(V) === Ce ? ir(e, {
949
- placement: V,
950
- boundary: u,
951
- rootBoundary: h,
952
- padding: f,
953
- flipVariations: m,
954
- allowedAutoPlacements: l
955
- }) : V);
956
- }, []), v = e.rects.reference, w = e.rects.popper, _ = /* @__PURE__ */ new Map(), E = !0, A = g[0], j = 0; j < g.length; j++) {
957
- var D = g[j], W = I(D), $ = ue(D) === te, Y = [C, T].indexOf(W) >= 0, z = Y ? "width" : "height", P = le(e, {
958
- placement: D,
959
- boundary: u,
960
- rootBoundary: h,
961
- altBoundary: p,
962
- padding: f
963
- }), B = Y ? $ ? L : M : $ ? T : C;
964
- v[z] > w[z] && (B = Ae(B));
965
- var be = Ae(B), Q = [];
966
- if (i && Q.push(P[W] <= 0), c && Q.push(P[B] <= 0, P[be] <= 0), Q.every(function(J) {
967
- return J;
968
- })) {
969
- A = D, E = !1;
970
- break;
971
- }
972
- _.set(D, Q);
973
- }
974
- if (E)
975
- for (var we = m ? 3 : 1, Pe = function(J) {
976
- var V = g.find(function(xe) {
977
- var me = _.get(xe);
978
- if (me)
979
- return me.slice(0, J).every(function(oe) {
980
- return oe;
981
- });
982
- });
983
- if (V)
984
- return A = V, "break";
985
- }, he = we; he > 0; he--) {
986
- var Oe = Pe(he);
987
- if (Oe === "break") break;
988
- }
989
- e.placement !== A && (e.modifiersData[r]._skip = !0, e.placement = A, e.reset = !0);
990
- }
991
- }
992
- const cn = {
993
- name: "flip",
994
- enabled: !0,
995
- phase: "main",
996
- fn: ar,
997
- requiresIfExists: ["offset"],
998
- data: {
999
- _skip: !1
1000
- }
1001
- };
1002
- function At(t, e, n) {
1003
- return n === void 0 && (n = {
1004
- x: 0,
1005
- y: 0
1006
- }), {
1007
- top: t.top - e.height - n.y,
1008
- right: t.right - e.width + n.x,
1009
- bottom: t.bottom - e.height + n.y,
1010
- left: t.left - e.width - n.x
1011
- };
1012
- }
1013
- function jt(t) {
1014
- return [C, L, T, M].some(function(e) {
1015
- return t[e] >= 0;
1016
- });
1017
- }
1018
- function cr(t) {
1019
- var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = le(e, {
1020
- elementContext: "reference"
1021
- }), c = le(e, {
1022
- altBoundary: !0
1023
- }), a = At(s, r), f = At(c, o, i), u = jt(a), h = jt(f);
1024
- e.modifiersData[n] = {
1025
- referenceClippingOffsets: a,
1026
- popperEscapeOffsets: f,
1027
- isReferenceHidden: u,
1028
- hasPopperEscaped: h
1029
- }, e.attributes.popper = Object.assign({}, e.attributes.popper, {
1030
- "data-popper-reference-hidden": u,
1031
- "data-popper-escaped": h
1032
- });
1033
- }
1034
- const fn = {
1035
- name: "hide",
1036
- enabled: !0,
1037
- phase: "main",
1038
- requiresIfExists: ["preventOverflow"],
1039
- fn: cr
1040
- };
1041
- function fr(t, e, n) {
1042
- var r = I(t), o = [M, C].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, {
1043
- placement: t
1044
- })) : n, s = i[0], c = i[1];
1045
- return s = s || 0, c = (c || 0) * o, [M, L].indexOf(r) >= 0 ? {
1046
- x: c,
1047
- y: s
1048
- } : {
1049
- x: s,
1050
- y: c
1051
- };
1052
- }
1053
- function ur(t) {
1054
- var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = Je.reduce(function(u, h) {
1055
- return u[h] = fr(h, e.rects, i), u;
1056
- }, {}), c = s[e.placement], a = c.x, f = c.y;
1057
- e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += a, e.modifiersData.popperOffsets.y += f), e.modifiersData[r] = s;
1058
- }
1059
- const un = {
1060
- name: "offset",
1061
- enabled: !0,
1062
- phase: "main",
1063
- requires: ["popperOffsets"],
1064
- fn: ur
1065
- };
1066
- function lr(t) {
1067
- var e = t.state, n = t.name;
1068
- e.modifiersData[n] = an({
1069
- reference: e.rects.reference,
1070
- element: e.rects.popper,
1071
- placement: e.placement
1072
- });
1073
- }
1074
- const st = {
1075
- name: "popperOffsets",
1076
- enabled: !0,
1077
- phase: "read",
1078
- fn: lr,
1079
- data: {}
1080
- };
1081
- function pr(t) {
1082
- return t === "x" ? "y" : "x";
1083
- }
1084
- function dr(t) {
1085
- var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, c = s === void 0 ? !1 : s, a = n.boundary, f = n.rootBoundary, u = n.altBoundary, h = n.padding, p = n.tether, d = p === void 0 ? !0 : p, m = n.tetherOffset, l = m === void 0 ? 0 : m, y = le(e, {
1086
- boundary: a,
1087
- rootBoundary: f,
1088
- padding: h,
1089
- altBoundary: u
1090
- }), b = I(e.placement), O = ue(e.placement), x = !O, g = et(b), v = pr(g), w = e.modifiersData.popperOffsets, _ = e.rects.reference, E = e.rects.popper, A = typeof l == "function" ? l(Object.assign({}, e.rects, {
1091
- placement: e.placement
1092
- })) : l, j = typeof A == "number" ? {
1093
- mainAxis: A,
1094
- altAxis: A
1095
- } : Object.assign({
1096
- mainAxis: 0,
1097
- altAxis: 0
1098
- }, A), D = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, W = {
1099
- x: 0,
1100
- y: 0
1101
- };
1102
- if (w) {
1103
- if (i) {
1104
- var $, Y = g === "y" ? C : M, z = g === "y" ? T : L, P = g === "y" ? "height" : "width", B = w[g], be = B + y[Y], Q = B - y[z], we = d ? -E[P] / 2 : 0, Pe = O === te ? _[P] : E[P], he = O === te ? -E[P] : -_[P], Oe = e.elements.arrow, J = d && Oe ? Ge(Oe) : {
1105
- width: 0,
1106
- height: 0
1107
- }, V = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : tn(), xe = V[Y], me = V[z], oe = ge(0, _[P], J[P]), mn = x ? _[P] / 2 - we - oe - xe - j.mainAxis : Pe - oe - xe - j.mainAxis, gn = x ? -_[P] / 2 + we + oe + me + j.mainAxis : he + oe + me + j.mainAxis, Te = e.elements.arrow && ye(e.elements.arrow), vn = Te ? g === "y" ? Te.clientTop || 0 : Te.clientLeft || 0 : 0, ct = ($ = D == null ? void 0 : D[g]) != null ? $ : 0, yn = B + mn - ct - vn, bn = B + gn - ct, ft = ge(d ? $e(be, yn) : be, B, d ? ee(Q, bn) : Q);
1108
- w[g] = ft, W[g] = ft - B;
1109
- }
1110
- if (c) {
1111
- var ut, wn = g === "x" ? C : M, On = g === "x" ? T : L, Z = w[v], _e = v === "y" ? "height" : "width", lt = Z + y[wn], pt = Z - y[On], Le = [C, M].indexOf(b) !== -1, dt = (ut = D == null ? void 0 : D[v]) != null ? ut : 0, ht = Le ? lt : Z - _[_e] - E[_e] - dt + j.altAxis, mt = Le ? Z + _[_e] + E[_e] - dt - j.altAxis : pt, gt = d && Le ? Fn(ht, Z, mt) : ge(d ? ht : lt, Z, d ? mt : pt);
1112
- w[v] = gt, W[v] = gt - Z;
1113
- }
1114
- e.modifiersData[r] = W;
1115
- }
1116
- }
1117
- const ln = {
1118
- name: "preventOverflow",
1119
- enabled: !0,
1120
- phase: "main",
1121
- fn: dr,
1122
- requiresIfExists: ["offset"]
1123
- };
1124
- function hr(t) {
1125
- return {
1126
- scrollLeft: t.scrollLeft,
1127
- scrollTop: t.scrollTop
1128
- };
1129
- }
1130
- function mr(t) {
1131
- return t === N(t) || !S(t) ? rt(t) : hr(t);
1132
- }
1133
- function gr(t) {
1134
- var e = t.getBoundingClientRect(), n = ce(e.width) / t.offsetWidth || 1, r = ce(e.height) / t.offsetHeight || 1;
1135
- return n !== 1 || r !== 1;
1136
- }
1137
- function vr(t, e, n) {
1138
- n === void 0 && (n = !1);
1139
- var r = S(e), o = S(e) && gr(e), i = U(e), s = fe(t, o, n), c = {
1140
- scrollLeft: 0,
1141
- scrollTop: 0
1142
- }, a = {
1143
- x: 0,
1144
- y: 0
1145
- };
1146
- return (r || !r && !n) && ((R(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1147
- it(i)) && (c = mr(e)), S(e) ? (a = fe(e, !0), a.x += e.clientLeft, a.y += e.clientTop) : i && (a.x = ot(i))), {
1148
- x: s.left + c.scrollLeft - a.x,
1149
- y: s.top + c.scrollTop - a.y,
1150
- width: s.width,
1151
- height: s.height
1152
- };
1153
- }
1154
- function yr(t) {
1155
- var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
1156
- t.forEach(function(i) {
1157
- e.set(i.name, i);
1158
- });
1159
- function o(i) {
1160
- n.add(i.name);
1161
- var s = [].concat(i.requires || [], i.requiresIfExists || []);
1162
- s.forEach(function(c) {
1163
- if (!n.has(c)) {
1164
- var a = e.get(c);
1165
- a && o(a);
1166
- }
1167
- }), r.push(i);
1168
- }
1169
- return t.forEach(function(i) {
1170
- n.has(i.name) || o(i);
1171
- }), r;
1172
- }
1173
- function br(t) {
1174
- var e = yr(t);
1175
- return Xt.reduce(function(n, r) {
1176
- return n.concat(e.filter(function(o) {
1177
- return o.phase === r;
1178
- }));
1179
- }, []);
1180
- }
1181
- function wr(t) {
1182
- var e;
1183
- return function() {
1184
- return e || (e = new Promise(function(n) {
1185
- Promise.resolve().then(function() {
1186
- e = void 0, n(t());
1187
- });
1188
- })), e;
1189
- };
1190
- }
1191
- function Or(t) {
1192
- var e = t.reduce(function(n, r) {
1193
- var o = n[r.name];
1194
- return n[r.name] = o ? Object.assign({}, o, r, {
1195
- options: Object.assign({}, o.options, r.options),
1196
- data: Object.assign({}, o.data, r.data)
1197
- }) : r, n;
1198
- }, {});
1199
- return Object.keys(e).map(function(n) {
1200
- return e[n];
1201
- });
1202
- }
1203
- var Dt = {
1204
- placement: "bottom",
1205
- modifiers: [],
1206
- strategy: "absolute"
1207
- };
1208
- function $t() {
1209
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
1210
- e[n] = arguments[n];
1211
- return !e.some(function(r) {
1212
- return !(r && typeof r.getBoundingClientRect == "function");
1213
- });
1214
- }
1215
- function ke(t) {
1216
- t === void 0 && (t = {});
1217
- var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o = e.defaultOptions, i = o === void 0 ? Dt : o;
1218
- return function(s, c, a) {
1219
- a === void 0 && (a = i);
1220
- var f = {
1221
- placement: "bottom",
1222
- orderedModifiers: [],
1223
- options: Object.assign({}, Dt, i),
1224
- modifiersData: {},
1225
- elements: {
1226
- reference: s,
1227
- popper: c
1228
- },
1229
- attributes: {},
1230
- styles: {}
1231
- }, u = [], h = !1, p = {
1232
- state: f,
1233
- setOptions: function(l) {
1234
- var y = typeof l == "function" ? l(f.options) : l;
1235
- m(), f.options = Object.assign({}, i, f.options, y), f.scrollParents = {
1236
- reference: ne(s) ? ve(s) : s.contextElement ? ve(s.contextElement) : [],
1237
- popper: ve(c)
1238
- };
1239
- var b = br(Or([].concat(r, f.options.modifiers)));
1240
- return f.orderedModifiers = b.filter(function(O) {
1241
- return O.enabled;
1242
- }), d(), p.update();
1243
- },
1244
- // Sync update – it will always be executed, even if not necessary. This
1245
- // is useful for low frequency updates where sync behavior simplifies the
1246
- // logic.
1247
- // For high frequency updates (e.g. `resize` and `scroll` events), always
1248
- // prefer the async Popper#update method
1249
- forceUpdate: function() {
1250
- if (!h) {
1251
- var l = f.elements, y = l.reference, b = l.popper;
1252
- if ($t(y, b)) {
1253
- f.rects = {
1254
- reference: vr(y, ye(b), f.options.strategy === "fixed"),
1255
- popper: Ge(b)
1256
- }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(E) {
1257
- return f.modifiersData[E.name] = Object.assign({}, E.data);
1258
- });
1259
- for (var O = 0; O < f.orderedModifiers.length; O++) {
1260
- if (f.reset === !0) {
1261
- f.reset = !1, O = -1;
1262
- continue;
1263
- }
1264
- var x = f.orderedModifiers[O], g = x.fn, v = x.options, w = v === void 0 ? {} : v, _ = x.name;
1265
- typeof g == "function" && (f = g({
1266
- state: f,
1267
- options: w,
1268
- name: _,
1269
- instance: p
1270
- }) || f);
1271
- }
1272
- }
1273
- }
1274
- },
1275
- // Async and optimistically optimized update – it will not be executed if
1276
- // not necessary (debounced to run at most once-per-tick)
1277
- update: wr(function() {
1278
- return new Promise(function(l) {
1279
- p.forceUpdate(), l(f);
1280
- });
1281
- }),
1282
- destroy: function() {
1283
- m(), h = !0;
1284
- }
1285
- };
1286
- if (!$t(s, c))
1287
- return p;
1288
- p.setOptions(a).then(function(l) {
1289
- !h && a.onFirstUpdate && a.onFirstUpdate(l);
1290
- });
1291
- function d() {
1292
- f.orderedModifiers.forEach(function(l) {
1293
- var y = l.name, b = l.options, O = b === void 0 ? {} : b, x = l.effect;
1294
- if (typeof x == "function") {
1295
- var g = x({
1296
- state: f,
1297
- name: y,
1298
- instance: p,
1299
- options: O
1300
- }), v = function() {
1301
- };
1302
- u.push(g || v);
1303
- }
1304
- });
1305
- }
1306
- function m() {
1307
- u.forEach(function(l) {
1308
- return l();
1309
- }), u = [];
1310
- }
1311
- return p;
1312
- };
1313
- }
1314
- var xr = /* @__PURE__ */ ke(), _r = [nt, st, tt, Xe], Er = /* @__PURE__ */ ke({
1315
- defaultModifiers: _r
1316
- }), Ar = [nt, st, tt, Xe, un, cn, ln, on, fn], pn = /* @__PURE__ */ ke({
1317
- defaultModifiers: Ar
1318
- });
1319
- const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1320
- __proto__: null,
1321
- afterMain: zt,
1322
- afterRead: Kt,
1323
- afterWrite: Zt,
1324
- applyStyles: Xe,
1325
- arrow: on,
1326
- auto: Ce,
1327
- basePlacements: de,
1328
- beforeMain: Ut,
1329
- beforeRead: Vt,
1330
- beforeWrite: Qt,
1331
- bottom: T,
1332
- clippingParents: qt,
1333
- computeStyles: tt,
1334
- createPopper: pn,
1335
- createPopperBase: xr,
1336
- createPopperLite: Er,
1337
- detectOverflow: le,
1338
- end: ae,
1339
- eventListeners: nt,
1340
- flip: cn,
1341
- hide: fn,
1342
- left: M,
1343
- main: Yt,
1344
- modifierPhases: Xt,
1345
- offset: un,
1346
- placements: Je,
1347
- popper: ie,
1348
- popperGenerator: ke,
1349
- popperOffsets: st,
1350
- preventOverflow: ln,
1351
- read: Ft,
1352
- reference: Rt,
1353
- right: L,
1354
- start: te,
1355
- top: C,
1356
- variationPlacements: Ke,
1357
- viewport: Qe,
1358
- write: Jt
1359
- }, Symbol.toStringTag, { value: "Module" })), Ct = "dropdown", Dr = "bs.dropdown", re = `.${Dr}`, at = ".data-api", $r = "Escape", Mt = "Tab", Cr = "ArrowUp", kt = "ArrowDown", Mr = 2, kr = `hide${re}`, Pr = `hidden${re}`, Tr = `show${re}`, Lr = `shown${re}`, dn = `click${re}${at}`, hn = `keydown${re}${at}`, Nr = `keyup${re}${at}`, se = "show", Sr = "dropup", Wr = "dropend", Br = "dropstart", Hr = "dropup-center", Ir = "dropdown-center", X = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)', qr = `${X}.${se}`, je = ".dropdown-menu", Rr = ".navbar", Vr = ".navbar-nav", Fr = ".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)", Kr = pe() ? "top-end" : "top-start", Ur = pe() ? "top-start" : "top-end", Yr = pe() ? "bottom-end" : "bottom-start", zr = pe() ? "bottom-start" : "bottom-end", Qr = pe() ? "left-start" : "right-start", Jr = pe() ? "right-start" : "left-start", Zr = "top", Xr = "bottom", Gr = {
1360
- autoClose: !0,
1361
- boundary: "clippingParents",
1362
- display: "dynamic",
1363
- offset: [0, 2],
1364
- popperConfig: null,
1365
- reference: "toggle"
1366
- }, eo = {
1367
- autoClose: "(boolean|string)",
1368
- boundary: "(string|element)",
1369
- display: "string",
1370
- offset: "(array|string|function)",
1371
- popperConfig: "(null|object|function)",
1372
- reference: "(string|element|object)"
1373
- };
1374
- class q extends Hn {
1375
- constructor(e, n) {
1376
- super(e, n), this._popper = null, this._parent = this._element.parentNode, this._menu = H.next(this._element, je)[0] || H.prev(this._element, je)[0] || H.findOne(je, this._parent), this._inNavbar = this._detectNavbar();
1377
- }
1378
- // Getters
1379
- static get Default() {
1380
- return Gr;
1381
- }
1382
- static get DefaultType() {
1383
- return eo;
1384
- }
1385
- static get NAME() {
1386
- return Ct;
1387
- }
1388
- // Public
1389
- toggle() {
1390
- return this._isShown() ? this.hide() : this.show();
1391
- }
1392
- show() {
1393
- if (Re(this._element) || this._isShown())
1394
- return;
1395
- const e = {
1396
- relatedTarget: this._element
1397
- };
1398
- if (!k.trigger(this._element, Tr, e).defaultPrevented) {
1399
- if (this._createPopper(), "ontouchstart" in document.documentElement && !this._parent.closest(Vr))
1400
- for (const n of [].concat(...document.body.children))
1401
- k.on(n, "mouseover", vt);
1402
- this._element.focus(), this._element.setAttribute("aria-expanded", !0), this._menu.classList.add(se), this._element.classList.add(se), k.trigger(this._element, Lr, e);
1403
- }
1404
- }
1405
- hide() {
1406
- if (Re(this._element) || !this._isShown())
1407
- return;
1408
- const e = {
1409
- relatedTarget: this._element
1410
- };
1411
- this._completeHide(e);
1412
- }
1413
- dispose() {
1414
- this._popper && this._popper.destroy(), super.dispose();
1415
- }
1416
- update() {
1417
- this._inNavbar = this._detectNavbar(), this._popper && this._popper.update();
1418
- }
1419
- // Private
1420
- _completeHide(e) {
1421
- if (!k.trigger(this._element, kr, e).defaultPrevented) {
1422
- if ("ontouchstart" in document.documentElement)
1423
- for (const n of [].concat(...document.body.children))
1424
- k.off(n, "mouseover", vt);
1425
- this._popper && this._popper.destroy(), this._menu.classList.remove(se), this._element.classList.remove(se), this._element.setAttribute("aria-expanded", "false"), De.removeDataAttribute(this._menu, "popper"), k.trigger(this._element, Pr, e), this._element.focus();
1426
- }
1427
- }
1428
- _getConfig(e) {
1429
- if (e = super._getConfig(e), typeof e.reference == "object" && !G(e.reference) && typeof e.reference.getBoundingClientRect != "function")
1430
- throw new TypeError(`${Ct.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
1431
- return e;
1432
- }
1433
- _createPopper() {
1434
- if (typeof jr > "u")
1435
- throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");
1436
- let e = this._element;
1437
- this._config.reference === "parent" ? e = this._parent : G(this._config.reference) ? e = qe(this._config.reference) : typeof this._config.reference == "object" && (e = this._config.reference);
1438
- const n = this._getPopperConfig();
1439
- this._popper = pn(e, this._menu, n);
1440
- }
1441
- _isShown() {
1442
- return this._menu.classList.contains(se);
1443
- }
1444
- _getPlacement() {
1445
- const e = this._parent;
1446
- if (e.classList.contains(Wr))
1447
- return Qr;
1448
- if (e.classList.contains(Br))
1449
- return Jr;
1450
- if (e.classList.contains(Hr))
1451
- return Zr;
1452
- if (e.classList.contains(Ir))
1453
- return Xr;
1454
- const n = getComputedStyle(this._menu).getPropertyValue("--bs-position").trim() === "end";
1455
- return e.classList.contains(Sr) ? n ? Ur : Kr : n ? zr : Yr;
1456
- }
1457
- _detectNavbar() {
1458
- return this._element.closest(Rr) !== null;
1459
- }
1460
- _getOffset() {
1461
- const { offset: e } = this._config;
1462
- return typeof e == "string" ? e.split(",").map((n) => Number.parseInt(n, 10)) : typeof e == "function" ? (n) => e(n, this._element) : e;
1463
- }
1464
- _getPopperConfig() {
1465
- const e = {
1466
- placement: this._getPlacement(),
1467
- modifiers: [
1468
- {
1469
- name: "preventOverflow",
1470
- options: {
1471
- boundary: this._config.boundary
1472
- }
1473
- },
1474
- {
1475
- name: "offset",
1476
- options: {
1477
- offset: this._getOffset()
1478
- }
1479
- }
1480
- ]
1481
- };
1482
- return (this._inNavbar || this._config.display === "static") && (De.setDataAttribute(this._menu, "popper", "static"), e.modifiers = [{
1483
- name: "applyStyles",
1484
- enabled: !1
1485
- }]), {
1486
- ...e,
1487
- ...Ve(this._config.popperConfig, [void 0, e])
1488
- };
1489
- }
1490
- _selectMenuItem({ key: e, target: n }) {
1491
- const r = H.find(Fr, this._menu).filter((o) => Tt(o));
1492
- r.length && Cn(r, n, e === kt, !r.includes(n)).focus();
1493
- }
1494
- // Static
1495
- static jQueryInterface(e) {
1496
- return this.each(function() {
1497
- const n = q.getOrCreateInstance(this, e);
1498
- if (typeof e == "string") {
1499
- if (typeof n[e] > "u")
1500
- throw new TypeError(`No method named "${e}"`);
1501
- n[e]();
1502
- }
1503
- });
1504
- }
1505
- static clearMenus(e) {
1506
- if (e.button === Mr || e.type === "keyup" && e.key !== Mt)
1507
- return;
1508
- const n = H.find(qr);
1509
- for (const r of n) {
1510
- const o = q.getInstance(r);
1511
- if (!o || o._config.autoClose === !1)
1512
- continue;
1513
- const i = e.composedPath(), s = i.includes(o._menu);
1514
- if (i.includes(o._element) || o._config.autoClose === "inside" && !s || o._config.autoClose === "outside" && s || o._menu.contains(e.target) && (e.type === "keyup" && e.key === Mt || /input|select|option|textarea|form/i.test(e.target.tagName)))
1515
- continue;
1516
- const c = { relatedTarget: o._element };
1517
- e.type === "click" && (c.clickEvent = e), o._completeHide(c);
1518
- }
1519
- }
1520
- static dataApiKeydownHandler(e) {
1521
- const n = /input|textarea/i.test(e.target.tagName), r = e.key === $r, o = [Cr, kt].includes(e.key);
1522
- if (!o && !r || n && !r)
1523
- return;
1524
- e.preventDefault();
1525
- const i = this.matches(X) ? this : H.prev(this, X)[0] || H.next(this, X)[0] || H.findOne(X, e.delegateTarget.parentNode), s = q.getOrCreateInstance(i);
1526
- if (o) {
1527
- e.stopPropagation(), s.show(), s._selectMenuItem(e);
1528
- return;
1529
- }
1530
- s._isShown() && (e.stopPropagation(), s.hide(), i.focus());
1531
- }
1532
- }
1533
- k.on(document, hn, X, q.dataApiKeydownHandler);
1534
- k.on(document, hn, je, q.dataApiKeydownHandler);
1535
- k.on(document, dn, q.clearMenus);
1536
- k.on(document, Nr, q.clearMenus);
1537
- k.on(document, dn, X, function(t) {
1538
- t.preventDefault(), q.getOrCreateInstance(this).toggle();
1539
- });
1540
- Dn(q);
1541
- export {
1542
- q as default
1543
- };