@okam/stack-ui 1.39.3 → 1.40.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 (337) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/index.d.ts +1 -0
  3. package/index123.js +1 -1
  4. package/index123.mjs +1 -1
  5. package/index125.js +1 -1
  6. package/index125.mjs +2 -2
  7. package/index126.js +1 -1
  8. package/index126.mjs +1 -1
  9. package/index133.js +1 -1
  10. package/index133.mjs +4 -4
  11. package/index134.js +1 -1
  12. package/index134.mjs +2 -2
  13. package/index135.js +1 -1
  14. package/index135.mjs +1 -1
  15. package/index136.js +1 -1
  16. package/index136.mjs +1 -1
  17. package/index137.js +1 -1
  18. package/index137.mjs +3 -3
  19. package/index141.js +1 -1
  20. package/index141.mjs +2 -2
  21. package/index143.js +1 -1
  22. package/index143.mjs +2 -2
  23. package/index144.js +1 -1
  24. package/index144.mjs +5 -5
  25. package/index145.js +1 -1
  26. package/index145.mjs +3 -3
  27. package/index146.js +1 -1
  28. package/index146.mjs +9 -9
  29. package/index152.js +1 -1
  30. package/index152.mjs +2 -2
  31. package/index156.js +1 -1
  32. package/index156.mjs +1 -1
  33. package/index158.js +1 -1
  34. package/index158.mjs +1 -1
  35. package/index159.js +1 -1
  36. package/index159.mjs +1 -1
  37. package/index161.js +1 -1
  38. package/index161.mjs +3 -3
  39. package/index162.js +1 -1
  40. package/index162.mjs +12 -46
  41. package/index163.js +1 -2
  42. package/index163.mjs +46 -13
  43. package/index164.js +1 -1
  44. package/index164.mjs +11 -29
  45. package/index165.js +2 -1
  46. package/index165.mjs +30 -11
  47. package/index168.js +1 -1
  48. package/index168.mjs +1 -1
  49. package/index169.js +1 -1
  50. package/index169.mjs +120 -198
  51. package/index170.js +1 -1
  52. package/index170.mjs +27 -64
  53. package/index171.js +1 -1
  54. package/index171.mjs +70 -140
  55. package/index172.js +1 -1
  56. package/index172.mjs +373 -116
  57. package/index173.js +1 -1
  58. package/index173.mjs +44 -222
  59. package/index174.js +1 -1
  60. package/index174.mjs +4 -191
  61. package/index175.js +1 -1
  62. package/index175.mjs +21 -66
  63. package/index176.js +1 -1
  64. package/index176.mjs +46 -278
  65. package/index177.js +1 -1
  66. package/index177.mjs +4 -97
  67. package/index178.js +1 -1
  68. package/index178.mjs +24 -188
  69. package/index179.js +1 -1
  70. package/index179.mjs +12 -84
  71. package/index180.js +1 -1
  72. package/index180.mjs +4 -58
  73. package/index181.js +1 -1
  74. package/index181.mjs +14 -126
  75. package/index182.js +1 -1
  76. package/index182.mjs +38 -112
  77. package/index183.js +1 -1
  78. package/index183.mjs +55 -120
  79. package/index184.js +1 -1
  80. package/index184.mjs +41 -72
  81. package/index185.js +1 -1
  82. package/index185.mjs +25 -107
  83. package/index186.js +1 -1
  84. package/index186.mjs +31 -52
  85. package/index187.js +1 -1
  86. package/index187.mjs +13 -92
  87. package/index188.js +1 -1
  88. package/index188.mjs +10 -70
  89. package/index189.js +1 -1
  90. package/index189.mjs +27 -55
  91. package/index190.js +1 -1
  92. package/index190.mjs +8 -98
  93. package/index191.js +1 -5
  94. package/index191.mjs +6 -80
  95. package/index192.js +1 -1
  96. package/index192.mjs +5 -2025
  97. package/index193.js +1 -1
  98. package/index193.mjs +7 -59
  99. package/index194.js +1 -1
  100. package/index194.mjs +27 -186
  101. package/index195.js +1 -1
  102. package/index195.mjs +15 -122
  103. package/index196.js +1 -1
  104. package/index196.mjs +12 -26
  105. package/index197.js +1 -1
  106. package/index197.mjs +40 -70
  107. package/index198.js +1 -1
  108. package/index198.mjs +7 -380
  109. package/index199.js +1 -1
  110. package/index199.mjs +16 -45
  111. package/index200.js +1 -1
  112. package/index200.mjs +3 -4
  113. package/index201.js +1 -1
  114. package/index201.mjs +4 -24
  115. package/index202.js +1 -1
  116. package/index202.mjs +19 -47
  117. package/index203.js +1 -1
  118. package/index203.mjs +53 -4
  119. package/index204.js +1 -1
  120. package/index204.mjs +123 -23
  121. package/index205.js +1 -1
  122. package/index205.mjs +133 -11
  123. package/index206.js +1 -1
  124. package/index206.mjs +44 -4
  125. package/index207.js +1 -1
  126. package/index207.mjs +13 -13
  127. package/index208.js +1 -1
  128. package/index208.mjs +92 -39
  129. package/index209.js +1 -1
  130. package/index209.mjs +102 -53
  131. package/index210.js +1 -1
  132. package/index210.mjs +4 -41
  133. package/index211.js +1 -1
  134. package/index211.mjs +3 -28
  135. package/index212.js +1 -1
  136. package/index212.mjs +125 -31
  137. package/index213.js +1 -1
  138. package/index213.mjs +29 -14
  139. package/index214.js +1 -1
  140. package/index214.mjs +51 -10
  141. package/index215.js +1 -1
  142. package/index215.mjs +44 -28
  143. package/index216.js +1 -1
  144. package/index216.mjs +37 -9
  145. package/index217.js +1 -1
  146. package/index217.mjs +113 -6
  147. package/index218.js +1 -1
  148. package/index218.mjs +77 -5
  149. package/index219.js +1 -1
  150. package/index219.mjs +101 -7
  151. package/index220.js +1 -1
  152. package/index220.mjs +98 -30
  153. package/index221.js +1 -1
  154. package/index221.mjs +137 -15
  155. package/index222.js +1 -1
  156. package/index222.mjs +197 -13
  157. package/index223.js +1 -1
  158. package/index223.mjs +22 -43
  159. package/index224.js +1 -1
  160. package/index224.mjs +49 -8
  161. package/index225.js +1 -1
  162. package/index225.mjs +45 -14
  163. package/index226.js +1 -1
  164. package/index226.mjs +98 -3
  165. package/index227.js +1 -1
  166. package/index227.mjs +72 -5
  167. package/index228.js +1 -1
  168. package/index228.mjs +68 -19
  169. package/index229.js +1 -1
  170. package/index229.mjs +7 -54
  171. package/index230.js +1 -1
  172. package/index230.mjs +10 -123
  173. package/index231.js +1 -1
  174. package/index231.mjs +198 -129
  175. package/index232.js +1 -1
  176. package/index232.mjs +63 -43
  177. package/index233.js +1 -1
  178. package/index233.mjs +143 -14
  179. package/index234.js +1 -1
  180. package/index234.mjs +117 -88
  181. package/index235.js +1 -1
  182. package/index235.mjs +220 -102
  183. package/index236.js +1 -1
  184. package/index236.mjs +190 -4
  185. package/index237.js +1 -1
  186. package/index237.mjs +69 -3
  187. package/index238.js +1 -1
  188. package/index238.mjs +269 -115
  189. package/index239.js +1 -1
  190. package/index239.mjs +93 -24
  191. package/index240.js +1 -1
  192. package/index240.mjs +180 -43
  193. package/index241.js +1 -1
  194. package/index241.mjs +84 -44
  195. package/index242.js +1 -1
  196. package/index242.mjs +57 -36
  197. package/index243.js +1 -1
  198. package/index243.mjs +122 -109
  199. package/index244.js +1 -1
  200. package/index244.mjs +113 -74
  201. package/index245.js +1 -1
  202. package/index245.mjs +122 -101
  203. package/index246.js +1 -1
  204. package/index246.mjs +73 -98
  205. package/index247.js +1 -1
  206. package/index247.mjs +107 -137
  207. package/index248.js +1 -1
  208. package/index248.mjs +52 -197
  209. package/index249.js +1 -1
  210. package/index249.mjs +93 -22
  211. package/index250.js +1 -1
  212. package/index250.mjs +67 -46
  213. package/index251.js +1 -1
  214. package/index251.mjs +55 -47
  215. package/index252.js +1 -1
  216. package/index252.mjs +98 -96
  217. package/index253.js +5 -1
  218. package/index253.mjs +81 -72
  219. package/index254.js +1 -1
  220. package/index254.mjs +2015 -58
  221. package/index255.js +1 -1
  222. package/index255.mjs +59 -7
  223. package/index256.js +1 -1
  224. package/index256.mjs +187 -10
  225. package/index258.js +1 -1
  226. package/index258.mjs +3 -3
  227. package/index260.js +1 -1
  228. package/index260.mjs +8 -8
  229. package/index261.js +1 -1
  230. package/index261.mjs +1 -1
  231. package/index262.js +1 -1
  232. package/index262.mjs +3 -130
  233. package/index263.js +1 -1
  234. package/index263.mjs +4 -190
  235. package/index264.js +1 -1
  236. package/index264.mjs +5 -10
  237. package/index265.js +1 -1
  238. package/index265.mjs +5 -4
  239. package/index266.js +1 -1
  240. package/index266.mjs +5 -37
  241. package/index267.js +1 -1
  242. package/index267.mjs +5 -6
  243. package/index268.js +1 -1
  244. package/index268.mjs +5 -30
  245. package/index269.js +1 -1
  246. package/index269.mjs +5 -7
  247. package/index270.js +1 -1
  248. package/index270.mjs +5 -4
  249. package/index271.js +1 -1
  250. package/index271.mjs +5 -5
  251. package/index272.js +1 -1
  252. package/index272.mjs +4 -4
  253. package/index273.js +1 -1
  254. package/index273.mjs +4 -4
  255. package/index274.js +1 -1
  256. package/index274.mjs +1 -1
  257. package/index275.js +1 -1
  258. package/index275.mjs +4 -4
  259. package/index276.js +1 -1
  260. package/index276.mjs +4 -4
  261. package/index277.js +1 -1
  262. package/index277.mjs +4 -4
  263. package/index278.js +1 -1
  264. package/index278.mjs +1 -1
  265. package/index279.js +1 -1
  266. package/index279.mjs +4 -4
  267. package/index280.js +1 -1
  268. package/index280.mjs +4 -4
  269. package/index281.js +1 -1
  270. package/index281.mjs +4 -4
  271. package/index282.js +1 -1
  272. package/index282.mjs +1 -1
  273. package/index283.js +1 -1
  274. package/index283.mjs +4 -4
  275. package/index284.js +1 -1
  276. package/index284.mjs +4 -4
  277. package/index285.js +1 -1
  278. package/index285.mjs +4 -4
  279. package/index286.js +1 -1
  280. package/index286.mjs +4 -4
  281. package/index287.js +1 -1
  282. package/index287.mjs +4 -4
  283. package/index288.js +1 -1
  284. package/index288.mjs +4 -4
  285. package/index289.js +1 -1
  286. package/index289.mjs +4 -4
  287. package/index290.js +1 -1
  288. package/index290.mjs +4 -4
  289. package/index291.js +1 -1
  290. package/index291.mjs +1 -1
  291. package/index292.js +1 -1
  292. package/index292.mjs +4 -4
  293. package/index293.js +1 -1
  294. package/index293.mjs +4 -4
  295. package/index294.js +1 -1
  296. package/index294.mjs +1 -1
  297. package/index295.js +1 -1
  298. package/index295.mjs +4 -4
  299. package/index296.js +1 -1
  300. package/index296.mjs +4 -4
  301. package/index297.js +1 -1
  302. package/index297.mjs +4 -4
  303. package/index298.js +1 -1
  304. package/index298.mjs +130 -4
  305. package/index299.js +1 -1
  306. package/index299.mjs +191 -5
  307. package/index300.js +1 -1
  308. package/index300.mjs +10 -5
  309. package/index301.js +1 -1
  310. package/index301.mjs +4 -5
  311. package/index302.js +1 -1
  312. package/index302.mjs +37 -5
  313. package/index303.js +1 -1
  314. package/index303.mjs +6 -5
  315. package/index304.js +1 -1
  316. package/index304.mjs +30 -5
  317. package/index305.js +1 -1
  318. package/index305.mjs +7 -5
  319. package/index306.js +1 -1
  320. package/index306.mjs +3 -3
  321. package/index308.js +1 -1
  322. package/index308.mjs +2 -2
  323. package/index309.js +1 -1
  324. package/index309.mjs +5 -5
  325. package/index312.js +1 -1
  326. package/index312.mjs +3 -3
  327. package/index315.js +1 -1
  328. package/index315.mjs +5 -5
  329. package/index316.js +1 -1
  330. package/index316.mjs +1 -1
  331. package/index317.js +1 -1
  332. package/index317.mjs +4 -4
  333. package/index318.js +1 -1
  334. package/index318.mjs +1 -1
  335. package/index322.js +1 -1
  336. package/index322.mjs +1 -1
  337. package/package.json +1 -1
package/index172.mjs CHANGED
@@ -1,127 +1,384 @@
1
- import { c as w } from "./index264.mjs";
2
- import { m as l } from "./index263.mjs";
3
- function N(x) {
4
- let {
5
- swiper: a,
6
- extendParams: C,
7
- on: c,
8
- emit: g
9
- } = x;
10
- C({
11
- navigation: {
12
- nextEl: null,
13
- prevEl: null,
14
- hideOnClick: !1,
15
- disabledClass: "swiper-button-disabled",
16
- hiddenClass: "swiper-button-hidden",
17
- lockClass: "swiper-button-lock",
18
- navigationDisabledClass: "swiper-navigation-disabled"
19
- }
20
- }), a.navigation = {
21
- nextEl: null,
22
- prevEl: null
23
- };
24
- function u(i) {
25
- let n;
26
- return i && typeof i == "string" && a.isElement && (n = a.el.querySelector(i) || a.hostEl.querySelector(i), n) ? n : (i && (typeof i == "string" && (n = [...document.querySelectorAll(i)]), a.params.uniqueNavElements && typeof i == "string" && n && n.length > 1 && a.el.querySelectorAll(i).length === 1 ? n = a.el.querySelector(i) : n && n.length === 1 && (n = n[0])), i && !n ? i : n);
27
- }
28
- function f(i, n) {
29
- const t = a.params.navigation;
30
- i = l(i), i.forEach((e) => {
31
- e && (e.classList[n ? "add" : "remove"](...t.disabledClass.split(" ")), e.tagName === "BUTTON" && (e.disabled = n), a.params.watchOverflow && a.enabled && e.classList[a.isLocked ? "add" : "remove"](t.lockClass));
32
- });
33
- }
34
- function d() {
35
- const {
36
- nextEl: i,
37
- prevEl: n
38
- } = a.navigation;
39
- if (a.params.loop) {
40
- f(n, !1), f(i, !1);
41
- return;
42
- }
43
- f(n, a.isBeginning && !a.params.rewind), f(i, a.isEnd && !a.params.rewind);
44
- }
45
- function E(i) {
46
- i.preventDefault(), !(a.isBeginning && !a.params.loop && !a.params.rewind) && (a.slidePrev(), g("navigationPrev"));
1
+ import { setEventTarget as se, createSyntheticEvent as oe, preventFocus as B } from "./index309.mjs";
2
+ import { restoreTextSelection as A, disableTextSelection as N } from "./index312.mjs";
3
+ import { PressResponderContext as le } from "./index307.mjs";
4
+ import { _ as fe } from "./index313.mjs";
5
+ import { _ as ue } from "./index210.mjs";
6
+ import { _ as W } from "./index314.mjs";
7
+ import { chain as ce } from "./index177.mjs";
8
+ import { nodeContains as p, getEventTarget as c } from "./index178.mjs";
9
+ import { getOwnerDocument as Y, getOwnerWindow as I } from "./index179.mjs";
10
+ import { mergeProps as te } from "./index134.mjs";
11
+ import { focusWithoutScrolling as pe } from "./index182.mjs";
12
+ import { openLink as z } from "./index183.mjs";
13
+ import { useGlobalListeners as de } from "./index186.mjs";
14
+ import { useSyncRef as ge } from "./index190.mjs";
15
+ import { isMac as ve } from "./index184.mjs";
16
+ import { isVirtualPointerEvent as Te, isVirtualClick as j } from "./index198.mjs";
17
+ import { useEffectEvent as K } from "./index196.mjs";
18
+ import { flushSync as Pe } from "react-dom";
19
+ import { useState as ye, useRef as $e, useMemo as he, useEffect as q, useContext as me } from "react";
20
+ function Ee(n) {
21
+ let i = me(le);
22
+ if (i) {
23
+ let { register: o, ...l } = i;
24
+ n = te(l, n), o();
47
25
  }
48
- function h(i) {
49
- i.preventDefault(), !(a.isEnd && !a.params.loop && !a.params.rewind) && (a.slideNext(), g("navigationNext"));
26
+ return ge(i, n.ref), n;
27
+ }
28
+ var _ = /* @__PURE__ */ new WeakMap();
29
+ class U {
30
+ continuePropagation() {
31
+ W(this, _, !1);
50
32
  }
51
- function v() {
52
- const i = a.params.navigation;
53
- if (a.params.navigation = w(a, a.originalParams.navigation, a.params.navigation, {
54
- nextEl: "swiper-button-next",
55
- prevEl: "swiper-button-prev"
56
- }), !(i.nextEl || i.prevEl)) return;
57
- let n = u(i.nextEl), t = u(i.prevEl);
58
- Object.assign(a.navigation, {
59
- nextEl: n,
60
- prevEl: t
61
- }), n = l(n), t = l(t);
62
- const e = (s, p) => {
63
- s && s.addEventListener("click", p === "next" ? h : E), !a.enabled && s && s.classList.add(...i.lockClass.split(" "));
64
- };
65
- n.forEach((s) => e(s, "next")), t.forEach((s) => e(s, "prev"));
33
+ get shouldStopPropagation() {
34
+ return fe(this, _);
66
35
  }
67
- function m() {
68
- let {
69
- nextEl: i,
70
- prevEl: n
71
- } = a.navigation;
72
- i = l(i), n = l(n);
73
- const t = (e, s) => {
74
- e.removeEventListener("click", s === "next" ? h : E), e.classList.remove(...a.params.navigation.disabledClass.split(" "));
75
- };
76
- i.forEach((e) => t(e, "next")), n.forEach((e) => t(e, "prev"));
36
+ constructor(i, o, l, d) {
37
+ ue(this, _, {
38
+ writable: !0,
39
+ value: void 0
40
+ }), W(this, _, !0);
41
+ var $;
42
+ let h = ($ = d == null ? void 0 : d.target) !== null && $ !== void 0 ? $ : l.currentTarget;
43
+ const v = h == null ? void 0 : h.getBoundingClientRect();
44
+ let C, S = 0, w, T = null;
45
+ l.clientX != null && l.clientY != null && (w = l.clientX, T = l.clientY), v && (w != null && T != null ? (C = w - v.left, S = T - v.top) : (C = v.width / 2, S = v.height / 2)), this.type = i, this.pointerType = o, this.target = l.currentTarget, this.shiftKey = l.shiftKey, this.metaKey = l.metaKey, this.ctrlKey = l.ctrlKey, this.altKey = l.altKey, this.x = C, this.y = S;
77
46
  }
78
- c("init", () => {
79
- a.params.navigation.enabled === !1 ? b() : (v(), d());
80
- }), c("toEdge fromEdge lock unlock", () => {
81
- d();
82
- }), c("destroy", () => {
83
- m();
84
- }), c("enable disable", () => {
85
- let {
86
- nextEl: i,
87
- prevEl: n
88
- } = a.navigation;
89
- if (i = l(i), n = l(n), a.enabled) {
90
- d();
91
- return;
47
+ }
48
+ const J = Symbol("linkClicked");
49
+ function We(n) {
50
+ let { onPress: i, onPressChange: o, onPressStart: l, onPressEnd: d, onPressUp: $, onClick: h, isDisabled: v, isPressed: C, preventFocusOnPress: S, shouldCancelOnPointerExit: w, allowTextSelectionOnPress: T, ref: L, ...ne } = Ee(n), [ie, V] = ye(!1), k = $e({
51
+ isPressed: !1,
52
+ ignoreEmulatedMouseEvents: !1,
53
+ didFirePressStart: !1,
54
+ isTriggeringEvent: !1,
55
+ activePointerId: null,
56
+ target: null,
57
+ isOverTarget: !1,
58
+ pointerType: null,
59
+ disposables: []
60
+ }), { addGlobalListener: x, removeAllGlobalListeners: D } = de(), m = K((e, a) => {
61
+ let g = k.current;
62
+ if (v || g.didFirePressStart) return !1;
63
+ let r = !0;
64
+ if (g.isTriggeringEvent = !0, l) {
65
+ let u = new U("pressstart", a, e);
66
+ l(u), r = u.shouldStopPropagation;
67
+ }
68
+ return o && o(!0), g.isTriggeringEvent = !1, g.didFirePressStart = !0, V(!0), r;
69
+ }), y = K((e, a, g = !0) => {
70
+ let r = k.current;
71
+ if (!r.didFirePressStart) return !1;
72
+ r.didFirePressStart = !1, r.isTriggeringEvent = !0;
73
+ let u = !0;
74
+ if (d) {
75
+ let t = new U("pressend", a, e);
76
+ d(t), u = t.shouldStopPropagation;
77
+ }
78
+ if (o && o(!1), V(!1), i && g && !v) {
79
+ let t = new U("press", a, e);
80
+ i(t), u && (u = t.shouldStopPropagation);
92
81
  }
93
- [...i, ...n].filter((t) => !!t).forEach((t) => t.classList.add(a.params.navigation.lockClass));
94
- }), c("click", (i, n) => {
95
- let {
96
- nextEl: t,
97
- prevEl: e
98
- } = a.navigation;
99
- t = l(t), e = l(e);
100
- const s = n.target;
101
- let p = e.includes(s) || t.includes(s);
102
- if (a.isElement && !p) {
103
- const o = n.path || n.composedPath && n.composedPath();
104
- o && (p = o.find((r) => t.includes(r) || e.includes(r)));
82
+ return r.isTriggeringEvent = !1, u;
83
+ }), O = K((e, a) => {
84
+ let g = k.current;
85
+ if (v) return !1;
86
+ if ($) {
87
+ g.isTriggeringEvent = !0;
88
+ let r = new U("pressup", a, e);
89
+ return $(r), g.isTriggeringEvent = !1, r.shouldStopPropagation;
105
90
  }
106
- if (a.params.navigation.hideOnClick && !p) {
107
- if (a.pagination && a.params.pagination && a.params.pagination.clickable && (a.pagination.el === s || a.pagination.el.contains(s))) return;
108
- let o;
109
- t.length ? o = t[0].classList.contains(a.params.navigation.hiddenClass) : e.length && (o = e[0].classList.contains(a.params.navigation.hiddenClass)), g(o === !0 ? "navigationShow" : "navigationHide"), [...t, ...e].filter((r) => !!r).forEach((r) => r.classList.toggle(a.params.navigation.hiddenClass));
91
+ return !0;
92
+ }), P = K((e) => {
93
+ let a = k.current;
94
+ if (a.isPressed && a.target) {
95
+ a.didFirePressStart && a.pointerType != null && y(M(a.target, e), a.pointerType, !1), a.isPressed = !1, a.isOverTarget = !1, a.activePointerId = null, a.pointerType = null, D(), T || A(a.target);
96
+ for (let g of a.disposables) g();
97
+ a.disposables = [];
110
98
  }
111
- });
112
- const k = () => {
113
- a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")), v(), d();
114
- }, b = () => {
115
- a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")), m();
99
+ }), X = K((e) => {
100
+ w && P(e);
101
+ }), F = K((e) => {
102
+ h == null || h(e);
103
+ }), R = K((e, a) => {
104
+ if (h) {
105
+ let g = new MouseEvent("click", e);
106
+ se(g, a), h(oe(g));
107
+ }
108
+ }), ae = he(() => {
109
+ let e = k.current, a = {
110
+ onKeyDown(r) {
111
+ if (H(r.nativeEvent, r.currentTarget) && p(r.currentTarget, c(r.nativeEvent))) {
112
+ var u;
113
+ ee(c(r.nativeEvent), r.key) && r.preventDefault();
114
+ let t = !0;
115
+ if (!e.isPressed && !r.repeat) {
116
+ e.target = r.currentTarget, e.isPressed = !0, e.pointerType = "keyboard", t = m(r, "keyboard");
117
+ let s = r.currentTarget, f = (E) => {
118
+ H(E, s) && !E.repeat && p(s, c(E)) && e.target && O(M(e.target, E), "keyboard");
119
+ };
120
+ x(Y(r.currentTarget), "keyup", ce(f, g), !0);
121
+ }
122
+ t && r.stopPropagation(), r.metaKey && ve() && ((u = e.metaKeyEvents) === null || u === void 0 || u.set(r.key, r.nativeEvent));
123
+ } else r.key === "Meta" && (e.metaKeyEvents = /* @__PURE__ */ new Map());
124
+ },
125
+ onClick(r) {
126
+ if (!(r && !p(r.currentTarget, c(r.nativeEvent))) && r && r.button === 0 && !e.isTriggeringEvent && !z.isOpening) {
127
+ let u = !0;
128
+ if (v && r.preventDefault(), !e.ignoreEmulatedMouseEvents && !e.isPressed && (e.pointerType === "virtual" || j(r.nativeEvent))) {
129
+ let t = m(r, "virtual"), s = O(r, "virtual"), f = y(r, "virtual");
130
+ F(r), u = t && s && f;
131
+ } else if (e.isPressed && e.pointerType !== "keyboard") {
132
+ let t = e.pointerType || r.nativeEvent.pointerType || "virtual";
133
+ u = y(M(r.currentTarget, r), t, !0), e.isOverTarget = !1, F(r), P(r);
134
+ }
135
+ e.ignoreEmulatedMouseEvents = !1, u && r.stopPropagation();
136
+ }
137
+ }
138
+ }, g = (r) => {
139
+ var u;
140
+ if (e.isPressed && e.target && H(r, e.target)) {
141
+ var t;
142
+ ee(c(r), r.key) && r.preventDefault();
143
+ let f = c(r), E = p(e.target, c(r));
144
+ y(M(e.target, r), "keyboard", E), E && R(r, e.target), D(), r.key !== "Enter" && G(e.target) && p(e.target, f) && !r[J] && (r[J] = !0, z(e.target, r, !1)), e.isPressed = !1, (t = e.metaKeyEvents) === null || t === void 0 || t.delete(r.key);
145
+ } else if (r.key === "Meta" && (!((u = e.metaKeyEvents) === null || u === void 0) && u.size)) {
146
+ var s;
147
+ let f = e.metaKeyEvents;
148
+ e.metaKeyEvents = void 0;
149
+ for (let E of f.values()) (s = e.target) === null || s === void 0 || s.dispatchEvent(new KeyboardEvent("keyup", E));
150
+ }
151
+ };
152
+ if (typeof PointerEvent < "u") {
153
+ a.onPointerDown = (t) => {
154
+ if (t.button !== 0 || !p(t.currentTarget, c(t.nativeEvent))) return;
155
+ if (Te(t.nativeEvent)) {
156
+ e.pointerType = "virtual";
157
+ return;
158
+ }
159
+ e.pointerType = t.pointerType;
160
+ let s = !0;
161
+ if (!e.isPressed) {
162
+ e.isPressed = !0, e.isOverTarget = !0, e.activePointerId = t.pointerId, e.target = t.currentTarget, T || N(e.target), s = m(t, e.pointerType);
163
+ let f = c(t.nativeEvent);
164
+ "releasePointerCapture" in f && f.releasePointerCapture(t.pointerId), x(Y(t.currentTarget), "pointerup", r, !1), x(Y(t.currentTarget), "pointercancel", u, !1);
165
+ }
166
+ s && t.stopPropagation();
167
+ }, a.onMouseDown = (t) => {
168
+ if (p(t.currentTarget, c(t.nativeEvent)) && t.button === 0) {
169
+ if (S) {
170
+ let s = B(t.target);
171
+ s && e.disposables.push(s);
172
+ }
173
+ t.stopPropagation();
174
+ }
175
+ }, a.onPointerUp = (t) => {
176
+ !p(t.currentTarget, c(t.nativeEvent)) || e.pointerType === "virtual" || t.button === 0 && O(t, e.pointerType || t.pointerType);
177
+ }, a.onPointerEnter = (t) => {
178
+ t.pointerId === e.activePointerId && e.target && !e.isOverTarget && e.pointerType != null && (e.isOverTarget = !0, m(M(e.target, t), e.pointerType));
179
+ }, a.onPointerLeave = (t) => {
180
+ t.pointerId === e.activePointerId && e.target && e.isOverTarget && e.pointerType != null && (e.isOverTarget = !1, y(M(e.target, t), e.pointerType, !1), X(t));
181
+ };
182
+ let r = (t) => {
183
+ if (t.pointerId === e.activePointerId && e.isPressed && t.button === 0 && e.target) {
184
+ if (p(e.target, c(t)) && e.pointerType != null) {
185
+ let s = !1, f = setTimeout(() => {
186
+ e.isPressed && e.target instanceof HTMLElement && (s ? P(t) : (pe(e.target), e.target.click()));
187
+ }, 80);
188
+ x(t.currentTarget, "click", () => s = !0, !0), e.disposables.push(() => clearTimeout(f));
189
+ } else P(t);
190
+ e.isOverTarget = !1;
191
+ }
192
+ }, u = (t) => {
193
+ P(t);
194
+ };
195
+ a.onDragStart = (t) => {
196
+ p(t.currentTarget, c(t.nativeEvent)) && P(t);
197
+ };
198
+ } else if (process.env.NODE_ENV === "test") {
199
+ a.onMouseDown = (t) => {
200
+ if (t.button !== 0 || !p(t.currentTarget, c(t.nativeEvent))) return;
201
+ if (e.ignoreEmulatedMouseEvents) {
202
+ t.stopPropagation();
203
+ return;
204
+ }
205
+ if (e.isPressed = !0, e.isOverTarget = !0, e.target = t.currentTarget, e.pointerType = j(t.nativeEvent) ? "virtual" : "mouse", Pe(() => m(t, e.pointerType)) && t.stopPropagation(), S) {
206
+ let f = B(t.target);
207
+ f && e.disposables.push(f);
208
+ }
209
+ x(Y(t.currentTarget), "mouseup", r, !1);
210
+ }, a.onMouseEnter = (t) => {
211
+ if (!p(t.currentTarget, c(t.nativeEvent))) return;
212
+ let s = !0;
213
+ e.isPressed && !e.ignoreEmulatedMouseEvents && e.pointerType != null && (e.isOverTarget = !0, s = m(t, e.pointerType)), s && t.stopPropagation();
214
+ }, a.onMouseLeave = (t) => {
215
+ if (!p(t.currentTarget, c(t.nativeEvent))) return;
216
+ let s = !0;
217
+ e.isPressed && !e.ignoreEmulatedMouseEvents && e.pointerType != null && (e.isOverTarget = !1, s = y(t, e.pointerType, !1), X(t)), s && t.stopPropagation();
218
+ }, a.onMouseUp = (t) => {
219
+ p(t.currentTarget, c(t.nativeEvent)) && !e.ignoreEmulatedMouseEvents && t.button === 0 && O(t, e.pointerType || "mouse");
220
+ };
221
+ let r = (t) => {
222
+ if (t.button === 0) {
223
+ if (e.ignoreEmulatedMouseEvents) {
224
+ e.ignoreEmulatedMouseEvents = !1;
225
+ return;
226
+ }
227
+ e.target && e.target.contains(t.target) && e.pointerType != null || P(t), e.isOverTarget = !1;
228
+ }
229
+ };
230
+ a.onTouchStart = (t) => {
231
+ if (!p(t.currentTarget, c(t.nativeEvent))) return;
232
+ let s = be(t.nativeEvent);
233
+ if (!s) return;
234
+ e.activePointerId = s.identifier, e.ignoreEmulatedMouseEvents = !0, e.isOverTarget = !0, e.isPressed = !0, e.target = t.currentTarget, e.pointerType = "touch", T || N(e.target), m(b(e.target, t), e.pointerType) && t.stopPropagation(), x(I(t.currentTarget), "scroll", u, !0);
235
+ }, a.onTouchMove = (t) => {
236
+ if (!p(t.currentTarget, c(t.nativeEvent))) return;
237
+ if (!e.isPressed) {
238
+ t.stopPropagation();
239
+ return;
240
+ }
241
+ let s = Q(t.nativeEvent, e.activePointerId), f = !0;
242
+ s && Z(s, t.currentTarget) ? !e.isOverTarget && e.pointerType != null && (e.isOverTarget = !0, f = m(b(e.target, t), e.pointerType)) : e.isOverTarget && e.pointerType != null && (e.isOverTarget = !1, f = y(b(e.target, t), e.pointerType, !1), X(b(e.target, t))), f && t.stopPropagation();
243
+ }, a.onTouchEnd = (t) => {
244
+ if (!p(t.currentTarget, c(t.nativeEvent))) return;
245
+ if (!e.isPressed) {
246
+ t.stopPropagation();
247
+ return;
248
+ }
249
+ let s = Q(t.nativeEvent, e.activePointerId), f = !0;
250
+ s && Z(s, t.currentTarget) && e.pointerType != null ? (O(b(e.target, t), e.pointerType), f = y(b(e.target, t), e.pointerType), R(t.nativeEvent, e.target)) : e.isOverTarget && e.pointerType != null && (f = y(b(e.target, t), e.pointerType, !1)), f && t.stopPropagation(), e.isPressed = !1, e.activePointerId = null, e.isOverTarget = !1, e.ignoreEmulatedMouseEvents = !0, e.target && !T && A(e.target), D();
251
+ }, a.onTouchCancel = (t) => {
252
+ p(t.currentTarget, c(t.nativeEvent)) && (t.stopPropagation(), e.isPressed && P(b(e.target, t)));
253
+ };
254
+ let u = (t) => {
255
+ e.isPressed && p(c(t), e.target) && P({
256
+ currentTarget: e.target,
257
+ shiftKey: !1,
258
+ ctrlKey: !1,
259
+ metaKey: !1,
260
+ altKey: !1
261
+ });
262
+ };
263
+ a.onDragStart = (t) => {
264
+ p(t.currentTarget, c(t.nativeEvent)) && P(t);
265
+ };
266
+ }
267
+ return a;
268
+ }, [
269
+ x,
270
+ v,
271
+ S,
272
+ D,
273
+ T,
274
+ P,
275
+ X,
276
+ y,
277
+ m,
278
+ O,
279
+ F,
280
+ R
281
+ ]);
282
+ return q(() => {
283
+ let e = L == null ? void 0 : L.current;
284
+ e && e instanceof I(e).Element && I(e).getComputedStyle(e).touchAction === "auto" && (e.style.touchAction = "pan-x pan-y pinch-zoom");
285
+ }, [
286
+ L
287
+ ]), q(() => {
288
+ let e = k.current;
289
+ return () => {
290
+ var a;
291
+ T || A((a = e.target) !== null && a !== void 0 ? a : void 0);
292
+ for (let g of e.disposables) g();
293
+ e.disposables = [];
294
+ };
295
+ }, [
296
+ T
297
+ ]), {
298
+ isPressed: C || ie,
299
+ pressProps: te(ne, ae)
116
300
  };
117
- Object.assign(a.navigation, {
118
- enable: k,
119
- disable: b,
120
- update: d,
121
- init: v,
122
- destroy: m
123
- });
301
+ }
302
+ function G(n) {
303
+ return n.tagName === "A" && n.hasAttribute("href");
304
+ }
305
+ function H(n, i) {
306
+ const { key: o, code: l } = n, d = i, $ = d.getAttribute("role");
307
+ return (o === "Enter" || o === " " || o === "Spacebar" || l === "Space") && !(d instanceof I(d).HTMLInputElement && !re(d, o) || d instanceof I(d).HTMLTextAreaElement || d.isContentEditable) && // Links should only trigger with Enter key
308
+ !(($ === "link" || !$ && G(d)) && o !== "Enter");
309
+ }
310
+ function be(n) {
311
+ const { targetTouches: i } = n;
312
+ return i.length > 0 ? i[0] : null;
313
+ }
314
+ function Q(n, i) {
315
+ const o = n.changedTouches;
316
+ for (let l = 0; l < o.length; l++) {
317
+ const d = o[l];
318
+ if (d.identifier === i) return d;
319
+ }
320
+ return null;
321
+ }
322
+ function b(n, i) {
323
+ let o = 0, l = 0;
324
+ return i.targetTouches && i.targetTouches.length === 1 && (o = i.targetTouches[0].clientX, l = i.targetTouches[0].clientY), {
325
+ currentTarget: n,
326
+ shiftKey: i.shiftKey,
327
+ ctrlKey: i.ctrlKey,
328
+ metaKey: i.metaKey,
329
+ altKey: i.altKey,
330
+ clientX: o,
331
+ clientY: l
332
+ };
333
+ }
334
+ function M(n, i) {
335
+ let o = i.clientX, l = i.clientY;
336
+ return {
337
+ currentTarget: n,
338
+ shiftKey: i.shiftKey,
339
+ ctrlKey: i.ctrlKey,
340
+ metaKey: i.metaKey,
341
+ altKey: i.altKey,
342
+ clientX: o,
343
+ clientY: l
344
+ };
345
+ }
346
+ function Se(n) {
347
+ let i = 0, o = 0;
348
+ return n.width !== void 0 ? i = n.width / 2 : n.radiusX !== void 0 && (i = n.radiusX), n.height !== void 0 ? o = n.height / 2 : n.radiusY !== void 0 && (o = n.radiusY), {
349
+ top: n.clientY - o,
350
+ right: n.clientX + i,
351
+ bottom: n.clientY + o,
352
+ left: n.clientX - i
353
+ };
354
+ }
355
+ function xe(n, i) {
356
+ return !(n.left > i.right || i.left > n.right || n.top > i.bottom || i.top > n.bottom);
357
+ }
358
+ function Z(n, i) {
359
+ let o = i.getBoundingClientRect(), l = Se(n);
360
+ return xe(o, l);
361
+ }
362
+ function Ke(n) {
363
+ return n instanceof HTMLInputElement ? !1 : n instanceof HTMLButtonElement ? n.type !== "submit" && n.type !== "reset" : !G(n);
364
+ }
365
+ function ee(n, i) {
366
+ return n instanceof HTMLInputElement ? !re(n, i) : Ke(n);
367
+ }
368
+ const ke = /* @__PURE__ */ new Set([
369
+ "checkbox",
370
+ "radio",
371
+ "range",
372
+ "color",
373
+ "file",
374
+ "image",
375
+ "button",
376
+ "submit",
377
+ "reset"
378
+ ]);
379
+ function re(n, i) {
380
+ return n.type === "checkbox" || n.type === "radio" ? i === " " : ke.has(n.type);
124
381
  }
125
382
  export {
126
- N as default
383
+ We as usePress
127
384
  };
package/index173.js CHANGED
@@ -1 +1 @@
1
- "use strict";const $=require("./index265.js"),q=require("./index264.js"),f=require("./index263.js");function w(S){let{swiper:e,extendParams:H,on:u,emit:v}=S;const d="swiper-pagination";H({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:a=>a,formatFractionTotal:a=>a,bulletClass:`${d}-bullet`,bulletActiveClass:`${d}-bullet-active`,modifierClass:`${d}-`,currentClass:`${d}-current`,totalClass:`${d}-total`,hiddenClass:`${d}-hidden`,progressbarFillClass:`${d}-progressbar-fill`,progressbarOppositeClass:`${d}-progressbar-opposite`,clickableClass:`${d}-clickable`,lockClass:`${d}-lock`,horizontalClass:`${d}-horizontal`,verticalClass:`${d}-vertical`,paginationDisabledClass:`${d}-disabled`}}),e.pagination={el:null,bullets:[]};let b,m=0;function k(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function x(a,s){const{bulletActiveClass:i}=e.params.pagination;a&&(a=a[`${s==="prev"?"previous":"next"}ElementSibling`],a&&(a.classList.add(`${i}-${s}`),a=a[`${s==="prev"?"previous":"next"}ElementSibling`],a&&a.classList.add(`${i}-${s}-${s}`)))}function I(a,s,i){if(a=a%i,s=s%i,s===a+1)return"next";if(s===a-1)return"previous"}function D(a){const s=a.target.closest($.c(e.params.pagination.bulletClass));if(!s)return;a.preventDefault();const i=f.h(s)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===i)return;const t=I(e.realIndex,i,e.slides.length);t==="next"?e.slideNext():t==="previous"?e.slidePrev():e.slideToLoop(i)}else e.slideTo(i)}function h(){const a=e.rtl,s=e.params.pagination;if(k())return;let i=e.pagination.el;i=f.m(i);let t,c;const C=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,z=e.params.loop?Math.ceil(C/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(c=e.previousRealIndex||0,t=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(t=e.snapIndex,c=e.previousSnapIndex):(c=e.previousIndex||0,t=e.activeIndex||0),s.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const l=e.pagination.bullets;let g,p,L;if(s.dynamicBullets&&(b=f.f(l[0],e.isHorizontal()?"width":"height"),i.forEach(n=>{n.style[e.isHorizontal()?"width":"height"]=`${b*(s.dynamicMainBullets+4)}px`}),s.dynamicMainBullets>1&&c!==void 0&&(m+=t-(c||0),m>s.dynamicMainBullets-1?m=s.dynamicMainBullets-1:m<0&&(m=0)),g=Math.max(t-m,0),p=g+(Math.min(l.length,s.dynamicMainBullets)-1),L=(p+g)/2),l.forEach(n=>{const r=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(o=>`${s.bulletActiveClass}${o}`)].map(o=>typeof o=="string"&&o.includes(" ")?o.split(" "):o).flat();n.classList.remove(...r)}),i.length>1)l.forEach(n=>{const r=f.h(n);r===t?n.classList.add(...s.bulletActiveClass.split(" ")):e.isElement&&n.setAttribute("part","bullet"),s.dynamicBullets&&(r>=g&&r<=p&&n.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),r===g&&x(n,"prev"),r===p&&x(n,"next"))});else{const n=l[t];if(n&&n.classList.add(...s.bulletActiveClass.split(" ")),e.isElement&&l.forEach((r,o)=>{r.setAttribute("part",o===t?"bullet-active":"bullet")}),s.dynamicBullets){const r=l[g],o=l[p];for(let y=g;y<=p;y+=1)l[y]&&l[y].classList.add(...`${s.bulletActiveClass}-main`.split(" "));x(r,"prev"),x(o,"next")}}if(s.dynamicBullets){const n=Math.min(l.length,s.dynamicMainBullets+4),r=(b*n-b)/2-L*b,o=a?"right":"left";l.forEach(y=>{y.style[e.isHorizontal()?o:"top"]=`${r}px`})}}i.forEach((l,g)=>{if(s.type==="fraction"&&(l.querySelectorAll($.c(s.currentClass)).forEach(p=>{p.textContent=s.formatFractionCurrent(t+1)}),l.querySelectorAll($.c(s.totalClass)).forEach(p=>{p.textContent=s.formatFractionTotal(z)})),s.type==="progressbar"){let p;s.progressbarOpposite?p=e.isHorizontal()?"vertical":"horizontal":p=e.isHorizontal()?"horizontal":"vertical";const L=(t+1)/z;let n=1,r=1;p==="horizontal"?n=L:r=L,l.querySelectorAll($.c(s.progressbarFillClass)).forEach(o=>{o.style.transform=`translate3d(0,0,0) scaleX(${n}) scaleY(${r})`,o.style.transitionDuration=`${e.params.speed}ms`})}s.type==="custom"&&s.renderCustom?(l.innerHTML=s.renderCustom(e,t+1,z),g===0&&v("paginationRender",l)):(g===0&&v("paginationRender",l),v("paginationUpdate",l)),e.params.watchOverflow&&e.enabled&&l.classList[e.isLocked?"add":"remove"](s.lockClass)})}function B(){const a=e.params.pagination;if(k())return;const s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let i=e.pagination.el;i=f.m(i);let t="";if(a.type==="bullets"){let c=e.params.loop?Math.ceil(s/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&c>s&&(c=s);for(let C=0;C<c;C+=1)a.renderBullet?t+=a.renderBullet.call(e,C,a.bulletClass):t+=`<${a.bulletElement} ${e.isElement?'part="bullet"':""} class="${a.bulletClass}"></${a.bulletElement}>`}a.type==="fraction"&&(a.renderFraction?t=a.renderFraction.call(e,a.currentClass,a.totalClass):t=`<span class="${a.currentClass}"></span> / <span class="${a.totalClass}"></span>`),a.type==="progressbar"&&(a.renderProgressbar?t=a.renderProgressbar.call(e,a.progressbarFillClass):t=`<span class="${a.progressbarFillClass}"></span>`),e.pagination.bullets=[],i.forEach(c=>{a.type!=="custom"&&(c.innerHTML=t||""),a.type==="bullets"&&e.pagination.bullets.push(...c.querySelectorAll($.c(a.bulletClass)))}),a.type!=="custom"&&v("paginationRender",i[0])}function A(){e.params.pagination=q.c(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const a=e.params.pagination;if(!a.el)return;let s;typeof a.el=="string"&&e.isElement&&(s=e.el.querySelector(a.el)),!s&&typeof a.el=="string"&&(s=[...document.querySelectorAll(a.el)]),s||(s=a.el),!(!s||s.length===0)&&(e.params.uniqueNavElements&&typeof a.el=="string"&&Array.isArray(s)&&s.length>1&&(s=[...e.el.querySelectorAll(a.el)],s.length>1&&(s=s.filter(i=>f.a(i,".swiper")[0]===e.el)[0])),Array.isArray(s)&&s.length===1&&(s=s[0]),Object.assign(e.pagination,{el:s}),s=f.m(s),s.forEach(i=>{a.type==="bullets"&&a.clickable&&i.classList.add(...(a.clickableClass||"").split(" ")),i.classList.add(a.modifierClass+a.type),i.classList.add(e.isHorizontal()?a.horizontalClass:a.verticalClass),a.type==="bullets"&&a.dynamicBullets&&(i.classList.add(`${a.modifierClass}${a.type}-dynamic`),m=0,a.dynamicMainBullets<1&&(a.dynamicMainBullets=1)),a.type==="progressbar"&&a.progressbarOpposite&&i.classList.add(a.progressbarOppositeClass),a.clickable&&i.addEventListener("click",D),e.enabled||i.classList.add(a.lockClass)}))}function M(){const a=e.params.pagination;if(k())return;let s=e.pagination.el;s&&(s=f.m(s),s.forEach(i=>{i.classList.remove(a.hiddenClass),i.classList.remove(a.modifierClass+a.type),i.classList.remove(e.isHorizontal()?a.horizontalClass:a.verticalClass),a.clickable&&(i.classList.remove(...(a.clickableClass||"").split(" ")),i.removeEventListener("click",D))})),e.pagination.bullets&&e.pagination.bullets.forEach(i=>i.classList.remove(...a.bulletActiveClass.split(" ")))}u("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const a=e.params.pagination;let{el:s}=e.pagination;s=f.m(s),s.forEach(i=>{i.classList.remove(a.horizontalClass,a.verticalClass),i.classList.add(e.isHorizontal()?a.horizontalClass:a.verticalClass)})}),u("init",()=>{e.params.pagination.enabled===!1?P():(A(),B(),h())}),u("activeIndexChange",()=>{typeof e.snapIndex>"u"&&h()}),u("snapIndexChange",()=>{h()}),u("snapGridLengthChange",()=>{B(),h()}),u("destroy",()=>{M()}),u("enable disable",()=>{let{el:a}=e.pagination;a&&(a=f.m(a),a.forEach(s=>s.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),u("lock unlock",()=>{h()}),u("click",(a,s)=>{const i=s.target,t=f.m(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&t&&t.length>0&&!i.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&i===e.navigation.nextEl||e.navigation.prevEl&&i===e.navigation.prevEl))return;const c=t[0].classList.contains(e.params.pagination.hiddenClass);v(c===!0?"paginationShow":"paginationHide"),t.forEach(C=>C.classList.toggle(e.params.pagination.hiddenClass))}});const O=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:a}=e.pagination;a&&(a=f.m(a),a.forEach(s=>s.classList.remove(e.params.pagination.paginationDisabledClass))),A(),B(),h()},P=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:a}=e.pagination;a&&(a=f.m(a),a.forEach(s=>s.classList.add(e.params.pagination.paginationDisabledClass))),M()};Object.assign(e.pagination,{enable:O,disable:P,render:B,update:h,init:A,destroy:M})}module.exports=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index134.js"),R=require("./index160.js"),C=require("./index199.js"),u=require("./index172.js"),F=require("./index316.js");function I(s,l,a){let{isDisabled:r=!1,isReadOnly:i=!1,value:n,name:c,children:b,"aria-label":P,"aria-labelledby":p,validationState:t="valid",isInvalid:d}=s,v=e=>{e.stopPropagation(),l.setSelected(e.target.checked)},f=b!=null,g=P!=null||p!=null;!f&&!g&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:m,isPressed:y}=u.usePress({isDisabled:r}),{pressProps:h,isPressed:D}=u.usePress({onPress(){var e;l.toggle(),(e=a.current)===null||e===void 0||e.focus()},isDisabled:r||i}),{focusableProps:S}=F.useFocusable(s,a),O=o.mergeProps(m,S),q=R.filterDOMProps(s,{labelable:!0});return C.useFormReset(a,l.isSelected,l.setSelected),{labelProps:o.mergeProps(h,{onClick:e=>e.preventDefault()}),inputProps:o.mergeProps(q,{"aria-invalid":d||t==="invalid"||void 0,"aria-errormessage":s["aria-errormessage"],"aria-controls":s["aria-controls"],"aria-readonly":i||void 0,onChange:v,disabled:r,...n==null?{}:{value:n},name:c,type:"checkbox",...O}),isSelected:l.isSelected,isPressed:y||D,isDisabled:r,isReadOnly:i,isInvalid:d||t==="invalid"}}exports.useToggle=I;