@anoki/fse-ui 1.0.535 → 1.0.536

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 (278) hide show
  1. package/dist/index.cjs105.js +1 -1
  2. package/dist/index.cjs105.js.map +1 -1
  3. package/dist/index.cjs210.js +1 -1
  4. package/dist/index.cjs214.js +1 -1
  5. package/dist/index.cjs221.js +1 -1
  6. package/dist/index.cjs232.js +1 -1
  7. package/dist/index.cjs239.js +1 -1
  8. package/dist/index.cjs244.js +1 -1
  9. package/dist/index.cjs251.js +1 -1
  10. package/dist/index.cjs259.js +1 -1
  11. package/dist/index.cjs298.js +1 -1
  12. package/dist/index.cjs332.js +1 -1
  13. package/dist/index.cjs332.js.map +1 -1
  14. package/dist/index.cjs341.js +1 -1
  15. package/dist/index.cjs341.js.map +1 -1
  16. package/dist/{index.cjs329.js → index.cjs342.js} +1 -1
  17. package/dist/{index.cjs329.js.map → index.cjs342.js.map} +1 -1
  18. package/dist/{index.cjs330.js → index.cjs343.js} +1 -1
  19. package/dist/{index.cjs330.js.map → index.cjs343.js.map} +1 -1
  20. package/dist/index.cjs344.js +1 -1
  21. package/dist/index.cjs344.js.map +1 -1
  22. package/dist/index.cjs345.js +1 -1
  23. package/dist/index.cjs345.js.map +1 -1
  24. package/dist/index.cjs346.js +1 -1
  25. package/dist/index.cjs346.js.map +1 -1
  26. package/dist/index.cjs347.js +1 -1
  27. package/dist/index.cjs347.js.map +1 -1
  28. package/dist/index.cjs348.js +1 -1
  29. package/dist/index.cjs348.js.map +1 -1
  30. package/dist/index.cjs349.js +1 -1
  31. package/dist/index.cjs349.js.map +1 -1
  32. package/dist/index.cjs350.js +1 -1
  33. package/dist/index.cjs350.js.map +1 -1
  34. package/dist/index.cjs351.js +1 -1
  35. package/dist/index.cjs351.js.map +1 -1
  36. package/dist/index.cjs352.js +1 -1
  37. package/dist/index.cjs352.js.map +1 -1
  38. package/dist/index.cjs353.js +1 -1
  39. package/dist/index.cjs353.js.map +1 -1
  40. package/dist/index.cjs354.js +1 -1
  41. package/dist/index.cjs354.js.map +1 -1
  42. package/dist/index.cjs358.js +1 -1
  43. package/dist/index.cjs358.js.map +1 -1
  44. package/dist/index.cjs359.js +1 -1
  45. package/dist/index.cjs359.js.map +1 -1
  46. package/dist/index.cjs360.js +1 -1
  47. package/dist/index.cjs360.js.map +1 -1
  48. package/dist/index.cjs361.js +1 -1
  49. package/dist/index.cjs361.js.map +1 -1
  50. package/dist/index.cjs362.js +1 -1
  51. package/dist/index.cjs362.js.map +1 -1
  52. package/dist/index.cjs366.js +1 -1
  53. package/dist/index.cjs366.js.map +1 -1
  54. package/dist/index.cjs367.js +1 -1
  55. package/dist/index.cjs367.js.map +1 -1
  56. package/dist/index.cjs368.js +1 -1
  57. package/dist/index.cjs368.js.map +1 -1
  58. package/dist/index.cjs370.js +1 -1
  59. package/dist/index.cjs370.js.map +1 -1
  60. package/dist/index.cjs371.js +2 -0
  61. package/dist/index.cjs371.js.map +1 -0
  62. package/dist/index.cjs372.js +2 -0
  63. package/dist/index.cjs372.js.map +1 -0
  64. package/dist/{index.cjs369.js → index.cjs373.js} +2 -2
  65. package/dist/{index.cjs369.js.map → index.cjs373.js.map} +1 -1
  66. package/dist/index.cjs374.js +2 -0
  67. package/dist/index.cjs374.js.map +1 -0
  68. package/dist/index.cjs375.js +2 -0
  69. package/dist/index.cjs375.js.map +1 -0
  70. package/dist/index.cjs376.js +2 -0
  71. package/dist/index.cjs376.js.map +1 -0
  72. package/dist/index.cjs377.js +39 -0
  73. package/dist/index.cjs377.js.map +1 -0
  74. package/dist/index.cjs378.js +2 -0
  75. package/dist/index.cjs378.js.map +1 -0
  76. package/dist/index.cjs379.js +1 -38
  77. package/dist/index.cjs379.js.map +1 -1
  78. package/dist/index.cjs380.js +1 -1
  79. package/dist/index.cjs380.js.map +1 -1
  80. package/dist/index.cjs381.js +1 -1
  81. package/dist/index.cjs381.js.map +1 -1
  82. package/dist/index.cjs382.js +1 -1
  83. package/dist/index.cjs382.js.map +1 -1
  84. package/dist/index.cjs383.js +1 -1
  85. package/dist/index.cjs383.js.map +1 -1
  86. package/dist/index.cjs384.js +2 -0
  87. package/dist/index.cjs384.js.map +1 -0
  88. package/dist/index.cjs385.js +2 -0
  89. package/dist/index.cjs385.js.map +1 -0
  90. package/dist/index.cjs386.js +2 -0
  91. package/dist/index.cjs386.js.map +1 -0
  92. package/dist/{index.cjs357.js → index.cjs387.js} +2 -2
  93. package/dist/{index.cjs357.js.map → index.cjs387.js.map} +1 -1
  94. package/dist/index.cjs388.js +2 -0
  95. package/dist/index.cjs388.js.map +1 -0
  96. package/dist/index.cjs389.js +2 -0
  97. package/dist/index.cjs389.js.map +1 -0
  98. package/dist/index.cjs390.js +2 -0
  99. package/dist/index.cjs390.js.map +1 -0
  100. package/dist/index.cjs391.js +1 -1
  101. package/dist/index.cjs391.js.map +1 -1
  102. package/dist/index.cjs392.js +1 -1
  103. package/dist/index.cjs392.js.map +1 -1
  104. package/dist/index.cjs393.js +1 -1
  105. package/dist/index.cjs393.js.map +1 -1
  106. package/dist/index.cjs394.js +1 -1
  107. package/dist/index.cjs394.js.map +1 -1
  108. package/dist/index.cjs395.js +1 -1
  109. package/dist/index.cjs395.js.map +1 -1
  110. package/dist/index.cjs396.js +1 -1
  111. package/dist/index.cjs396.js.map +1 -1
  112. package/dist/index.cjs406.js +1 -1
  113. package/dist/index.es105.js +13 -13
  114. package/dist/index.es105.js.map +1 -1
  115. package/dist/index.es210.js +7 -7
  116. package/dist/index.es214.js +1 -1
  117. package/dist/index.es221.js +8 -8
  118. package/dist/index.es232.js +14 -14
  119. package/dist/index.es239.js +1 -1
  120. package/dist/index.es244.js +1 -1
  121. package/dist/index.es251.js +1 -1
  122. package/dist/index.es259.js +7 -7
  123. package/dist/index.es298.js +4 -4
  124. package/dist/index.es332.js +15 -30
  125. package/dist/index.es332.js.map +1 -1
  126. package/dist/index.es341.js +7 -15
  127. package/dist/index.es341.js.map +1 -1
  128. package/dist/{index.es329.js → index.es342.js} +1 -1
  129. package/dist/{index.es329.js.map → index.es342.js.map} +1 -1
  130. package/dist/{index.es330.js → index.es343.js} +1 -1
  131. package/dist/{index.es330.js.map → index.es343.js.map} +1 -1
  132. package/dist/index.es344.js +10 -621
  133. package/dist/index.es344.js.map +1 -1
  134. package/dist/index.es345.js +29 -10
  135. package/dist/index.es345.js.map +1 -1
  136. package/dist/index.es346.js +123 -44
  137. package/dist/index.es346.js.map +1 -1
  138. package/dist/index.es347.js +134 -7
  139. package/dist/index.es347.js.map +1 -1
  140. package/dist/index.es348.js +13 -124
  141. package/dist/index.es348.js.map +1 -1
  142. package/dist/index.es349.js +67 -13
  143. package/dist/index.es349.js.map +1 -1
  144. package/dist/index.es350.js +31 -133
  145. package/dist/index.es350.js.map +1 -1
  146. package/dist/index.es351.js +13 -216
  147. package/dist/index.es351.js.map +1 -1
  148. package/dist/index.es352.js +7 -12
  149. package/dist/index.es352.js.map +1 -1
  150. package/dist/index.es353.js +48 -176
  151. package/dist/index.es353.js.map +1 -1
  152. package/dist/index.es354.js +52 -49
  153. package/dist/index.es354.js.map +1 -1
  154. package/dist/index.es358.js +6 -22
  155. package/dist/index.es358.js.map +1 -1
  156. package/dist/index.es359.js +23 -391
  157. package/dist/index.es359.js.map +1 -1
  158. package/dist/index.es360.js +3 -24
  159. package/dist/index.es360.js.map +1 -1
  160. package/dist/index.es361.js +11 -29
  161. package/dist/index.es361.js.map +1 -1
  162. package/dist/index.es362.js +12 -5
  163. package/dist/index.es362.js.map +1 -1
  164. package/dist/index.es366.js +25 -5
  165. package/dist/index.es366.js.map +1 -1
  166. package/dist/index.es367.js +29 -3
  167. package/dist/index.es367.js.map +1 -1
  168. package/dist/index.es368.js +5 -24
  169. package/dist/index.es368.js.map +1 -1
  170. package/dist/index.es370.js +5 -16
  171. package/dist/index.es370.js.map +1 -1
  172. package/dist/index.es371.js +6 -0
  173. package/dist/index.es371.js.map +1 -0
  174. package/dist/index.es372.js +27 -0
  175. package/dist/index.es372.js.map +1 -0
  176. package/dist/{index.es369.js → index.es373.js} +6 -6
  177. package/dist/{index.es369.js.map → index.es373.js.map} +1 -1
  178. package/dist/index.es374.js +19 -0
  179. package/dist/index.es374.js.map +1 -0
  180. package/dist/index.es375.js +625 -0
  181. package/dist/index.es375.js.map +1 -0
  182. package/dist/index.es376.js +68 -0
  183. package/dist/index.es376.js.map +1 -0
  184. package/dist/index.es377.js +72 -0
  185. package/dist/index.es377.js.map +1 -0
  186. package/dist/index.es378.js +12 -0
  187. package/dist/index.es378.js.map +1 -0
  188. package/dist/index.es379.js +13 -68
  189. package/dist/index.es379.js.map +1 -1
  190. package/dist/index.es380.js +61 -8
  191. package/dist/index.es380.js.map +1 -1
  192. package/dist/index.es381.js +45 -13
  193. package/dist/index.es381.js.map +1 -1
  194. package/dist/index.es382.js +8 -62
  195. package/dist/index.es382.js.map +1 -1
  196. package/dist/index.es383.js +213 -60
  197. package/dist/index.es383.js.map +1 -1
  198. package/dist/index.es384.js +181 -0
  199. package/dist/index.es384.js.map +1 -0
  200. package/dist/index.es385.js +7 -0
  201. package/dist/index.es385.js.map +1 -0
  202. package/dist/index.es386.js +26 -0
  203. package/dist/index.es386.js.map +1 -0
  204. package/dist/{index.es357.js → index.es387.js} +3 -3
  205. package/dist/{index.es357.js.map → index.es387.js.map} +1 -1
  206. package/dist/index.es388.js +25 -0
  207. package/dist/index.es388.js.map +1 -0
  208. package/dist/index.es389.js +396 -0
  209. package/dist/index.es389.js.map +1 -0
  210. package/dist/index.es390.js +26 -0
  211. package/dist/index.es390.js.map +1 -0
  212. package/dist/index.es391.js +13 -4
  213. package/dist/index.es391.js.map +1 -1
  214. package/dist/index.es392.js +27 -22
  215. package/dist/index.es392.js.map +1 -1
  216. package/dist/index.es393.js +4 -22
  217. package/dist/index.es393.js.map +1 -1
  218. package/dist/index.es394.js +520 -10
  219. package/dist/index.es394.js.map +1 -1
  220. package/dist/index.es395.js +125 -26
  221. package/dist/index.es395.js.map +1 -1
  222. package/dist/index.es396.js +129 -5
  223. package/dist/index.es396.js.map +1 -1
  224. package/dist/index.es406.js +8 -8
  225. package/package.json +1 -1
  226. package/dist/index.cjs331.js +0 -2
  227. package/dist/index.cjs331.js.map +0 -1
  228. package/dist/index.cjs333.js +0 -2
  229. package/dist/index.cjs333.js.map +0 -1
  230. package/dist/index.cjs334.js +0 -2
  231. package/dist/index.cjs334.js.map +0 -1
  232. package/dist/index.cjs335.js +0 -2
  233. package/dist/index.cjs335.js.map +0 -1
  234. package/dist/index.cjs336.js +0 -2
  235. package/dist/index.cjs336.js.map +0 -1
  236. package/dist/index.cjs337.js +0 -2
  237. package/dist/index.cjs337.js.map +0 -1
  238. package/dist/index.cjs338.js +0 -2
  239. package/dist/index.cjs338.js.map +0 -1
  240. package/dist/index.cjs339.js +0 -2
  241. package/dist/index.cjs339.js.map +0 -1
  242. package/dist/index.cjs355.js +0 -2
  243. package/dist/index.cjs355.js.map +0 -1
  244. package/dist/index.cjs356.js +0 -2
  245. package/dist/index.cjs356.js.map +0 -1
  246. package/dist/index.cjs363.js +0 -2
  247. package/dist/index.cjs363.js.map +0 -1
  248. package/dist/index.cjs364.js +0 -2
  249. package/dist/index.cjs364.js.map +0 -1
  250. package/dist/index.cjs365.js +0 -2
  251. package/dist/index.cjs365.js.map +0 -1
  252. package/dist/index.es331.js +0 -10
  253. package/dist/index.es331.js.map +0 -1
  254. package/dist/index.es333.js +0 -9
  255. package/dist/index.es333.js.map +0 -1
  256. package/dist/index.es334.js +0 -28
  257. package/dist/index.es334.js.map +0 -1
  258. package/dist/index.es335.js +0 -72
  259. package/dist/index.es335.js.map +0 -1
  260. package/dist/index.es336.js +0 -36
  261. package/dist/index.es336.js.map +0 -1
  262. package/dist/index.es337.js +0 -14
  263. package/dist/index.es337.js.map +0 -1
  264. package/dist/index.es338.js +0 -7
  265. package/dist/index.es338.js.map +0 -1
  266. package/dist/index.es339.js +0 -56
  267. package/dist/index.es339.js.map +0 -1
  268. package/dist/index.es355.js +0 -12
  269. package/dist/index.es355.js.map +0 -1
  270. package/dist/index.es356.js +0 -15
  271. package/dist/index.es356.js.map +0 -1
  272. package/dist/index.es363.js +0 -526
  273. package/dist/index.es363.js.map +0 -1
  274. package/dist/index.es364.js +0 -130
  275. package/dist/index.es364.js.map +0 -1
  276. package/dist/index.es365.js +0 -132
  277. package/dist/index.es365.js.map +0 -1
  278. /package/dist/components/ui/{ConsentModal/ConsentModalFooter/ConsentModalFooter.css → DoctorModal/DoctorModalFooter/DoctorModalFooter.css} +0 -0
@@ -1,53 +1,56 @@
1
- var S = function(r) {
2
- if (typeof document > "u")
3
- return null;
4
- var u = Array.isArray(r) ? r[0] : r;
5
- return u.ownerDocument.body;
6
- }, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
7
- return r && (r.host || W(r.parentNode));
8
- }, D = function(r, u) {
9
- return u.map(function(e) {
10
- if (r.contains(e))
11
- return e;
12
- var n = W(e);
13
- return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
14
- }).filter(function(e) {
15
- return !!e;
1
+ import * as l from "react";
2
+ import { composeRefs as y } from "./index.es342.js";
3
+ import { j as f } from "./index.es182.js";
4
+ // @__NO_SIDE_EFFECTS__
5
+ function b(e) {
6
+ const t = /* @__PURE__ */ S(e), o = l.forwardRef((n, r) => {
7
+ const { children: i, ...a } = n, s = l.Children.toArray(i), p = s.find(g);
8
+ if (p) {
9
+ const c = p.props.children, m = s.map((u) => u === p ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : u);
10
+ return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: l.isValidElement(c) ? l.cloneElement(c, void 0, m) : null });
11
+ }
12
+ return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: i });
16
13
  });
17
- }, E = function(r, u, e, n) {
18
- var i = D(u, Array.isArray(r) ? r : [r]);
19
- p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
20
- var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
21
- !t || s.has(t) || (s.add(t), y(t.parentNode));
22
- };
23
- i.forEach(y);
24
- var A = function(t) {
25
- !t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
26
- if (s.has(a))
27
- A(a);
28
- else
29
- try {
30
- var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
31
- f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
32
- } catch (k) {
33
- console.error("aria-hidden: cannot operate on ", a, k);
34
- }
35
- });
36
- };
37
- return A(u), s.clear(), h++, function() {
38
- l.forEach(function(t) {
39
- var a = f.get(t) - 1, c = o.get(t) - 1;
40
- f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
41
- }), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
42
- };
43
- }, C = function(r, u, e) {
44
- e === void 0 && (e = "data-aria-hidden");
45
- var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
46
- return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
47
- return null;
48
- };
49
- };
14
+ return o.displayName = `${e}.Slot`, o;
15
+ }
16
+ // @__NO_SIDE_EFFECTS__
17
+ function S(e) {
18
+ const t = l.forwardRef((o, n) => {
19
+ const { children: r, ...i } = o;
20
+ if (l.isValidElement(r)) {
21
+ const a = x(r), s = E(i, r.props);
22
+ return r.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(r, s);
23
+ }
24
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
25
+ });
26
+ return t.displayName = `${e}.SlotClone`, t;
27
+ }
28
+ var d = Symbol("radix.slottable");
29
+ // @__NO_SIDE_EFFECTS__
30
+ function h(e) {
31
+ const t = ({ children: o }) => /* @__PURE__ */ f.jsx(f.Fragment, { children: o });
32
+ return t.displayName = `${e}.Slottable`, t.__radixId = d, t;
33
+ }
34
+ function g(e) {
35
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
36
+ }
37
+ function E(e, t) {
38
+ const o = { ...t };
39
+ for (const n in t) {
40
+ const r = e[n], i = t[n];
41
+ /^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
42
+ i(...s), r(...s);
43
+ } : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
44
+ }
45
+ return { ...e, ...o };
46
+ }
47
+ function x(e) {
48
+ var n, r;
49
+ let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
50
+ return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
51
+ }
50
52
  export {
51
- C as hideOthers
53
+ b as createSlot,
54
+ h as createSlottable
52
55
  };
53
56
  //# sourceMappingURL=index.es354.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es354.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAIA;AACvE,SAAOC,EAAa,cAAc;AACtC,GACIC,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBAAI,QAAS,GACjCC,IAAY,CAAE,GACdC,IAAY,GACZC,IAAa,SAAUC,GAAM;AAC7B,SAAOA,MAASA,EAAK,QAAQD,EAAWC,EAAK,UAAU;AAC3D,GACIC,IAAiB,SAAUC,GAAQC,GAAS;AAC5C,SAAOA,EACF,IAAI,SAAUC,GAAQ;AACvB,QAAIF,EAAO,SAASE,CAAM;AACtB,aAAOA;AAEX,QAAIC,IAAkBN,EAAWK,CAAM;AACvC,WAAIC,KAAmBH,EAAO,SAASG,CAAe,IAC3CA,KAEX,QAAQ,MAAM,eAAeD,GAAQ,2BAA2BF,GAAQ,iBAAiB,GAClF;AAAA,EACV,CAAA,EACI,OAAO,SAAUI,GAAG;AAAE,WAAO,EAAQA;AAAA,GAAK;AACnD,GASIC,IAAyB,SAAUd,GAAgBe,GAAYC,GAAYC,GAAkB;AAC7F,MAAIP,IA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Bf,KACO,WAAY;AACf,IAAAc,EAAY,QAAQ,SAAUZ,GAAM;AAChC,UAAIoB,IAAezB,EAAW,IAAIK,CAAI,IAAI,GACtCqB,IAAcV,EAAc,IAAIX,CAAI,IAAI;AAC5C,MAAAL,EAAW,IAAIK,GAAMoB,CAAY,GACjCT,EAAc,IAAIX,GAAMqB,CAAW,GAC9BD,MACIxB,EAAkB,IAAII,CAAI,KAC3BA,EAAK,gBAAgBU,CAAgB,GAEzCd,EAAkB,OAAOI,CAAI,IAE5BqB,KACDrB,EAAK,gBAAgBS,CAAU;AAAA,IAE/C,CAAS,GACDX,KACKA,MAEDH,IAAa,oBAAI,QAAS,GAC1BA,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBAAI,QAAS,GACjCC,IAAY,CAAE;AAAA,EAErB;AACL,GAQW0B,IAAa,SAAU9B,GAAgBe,GAAYC,GAAY;AACtE,EAAIA,MAAe,WAAUA,IAAa;AAC1C,MAAIN,IAAU,MAAM,KAAK,MAAM,QAAQV,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC,GACtF+B,IAAiChC,EAAiBC,CAAc;AACpE,SAAK+B,KAILrB,EAAQ,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,aAAa,CAAC,CAAC,GACjFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KAJvE,WAAY;AAAE,WAAO;AAAA,EAAO;AAK3C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es354.js","sources":["../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,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- import { j as o } from "./index.es182.js";
4
- var v = "Arrow", e = n.forwardRef((r, i) => {
5
- const { children: t, width: s = 10, height: a = 5, ...m } = r;
6
- return /* @__PURE__ */ o.jsx(
7
- p.svg,
8
- {
9
- ...m,
10
- ref: i,
11
- width: s,
12
- height: a,
13
- viewBox: "0 0 30 10",
14
- preserveAspectRatio: "none",
15
- children: r.asChild ? t : /* @__PURE__ */ o.jsx("polygon", { points: "0,0 30,0 15,10" })
16
- }
17
- );
18
- });
19
- e.displayName = v;
20
- var h = e;
1
+ import * as u from "react";
2
+ function t(r) {
3
+ const e = u.useRef({ value: r, previous: r });
4
+ return u.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
5
+ }
21
6
  export {
22
- e as Arrow,
23
- h as Root
7
+ t as usePrevious
24
8
  };
25
9
  //# sourceMappingURL=index.es358.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es358.js","sources":["../node_modules/@radix-ui/react-arrow/dist/index.mjs"],"sourcesContent":["// packages/react/arrow/src/arrow.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Arrow\";\nvar Arrow = React.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.svg,\n {\n ...arrowProps,\n ref: forwardedRef,\n width,\n height,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\",\n children: props.asChild ? children : /* @__PURE__ */ jsx(\"polygon\", { points: \"0,0 30,0 15,10\" })\n }\n );\n});\nArrow.displayName = NAME;\nvar Root = Arrow;\nexport {\n Arrow,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NAME","Arrow","React","props","forwardedRef","children","width","height","arrowProps","jsx","Primitive","Root"],"mappings":";;;AAIA,IAAIA,IAAO,SACPC,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACpD,QAAM,EAAE,UAAAC,GAAU,OAAAC,IAAQ,IAAI,QAAAC,IAAS,GAAG,GAAGC,EAAU,IAAKL;AAC5D,SAAuBM,gBAAAA,EAAG;AAAA,IACxBC,EAAU;AAAA,IACV;AAAA,MACE,GAAGF;AAAA,MACH,KAAKJ;AAAA,MACL,OAAAE;AAAA,MACA,QAAAC;AAAA,MACA,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,UAAUJ,EAAM,UAAUE,IAA2BI,gBAAAA,EAAG,IAAC,WAAW,EAAE,QAAQ,iBAAkB,CAAA;AAAA,IACtG;AAAA,EACG;AACH,CAAC;AACDR,EAAM,cAAcD;AACjB,IAACW,IAAOV;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es358.js","sources":["../node_modules/@radix-ui/react-use-previous/dist/index.mjs"],"sourcesContent":["// packages/react/use-previous/src/use-previous.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["usePrevious","value","ref","React"],"mappings":";AAEA,SAASA,EAAYC,GAAO;AAC1B,QAAMC,IAAMC,EAAM,OAAO,EAAE,OAAAF,GAAO,UAAUA,GAAO;AACnD,SAAOE,EAAM,QAAQ,OACfD,EAAI,QAAQ,UAAUD,MACxBC,EAAI,QAAQ,WAAWA,EAAI,QAAQ,OACnCA,EAAI,QAAQ,QAAQD,IAEfC,EAAI,QAAQ,WAClB,CAACD,CAAK,CAAC;AACZ;","x_google_ignoreList":[0]}
@@ -1,396 +1,28 @@
1
- import { offset as ot, shift as st, flip as rt, size as ct, hide as lt, limitShift as ft, computePosition as ut, arrow as ht } from "./index.es363.js";
2
- import { createCoords as m, round as A, max as E, min as V, rectToClientRect as J, floor as D } from "./index.es364.js";
3
- import { isElement as v, getDocumentElement as O, getOverflowAncestors as $, getComputedStyle as R, isHTMLElement as b, getWindow as L, isTopLayer as S, getParentNode as W, isLastTraversableNode as H, isTableElement as at, isContainingBlock as Q, getContainingBlock as dt, getNodeName as M, isOverflowElement as _, getNodeScroll as N, getFrameElement as K, isWebKit as Y } from "./index.es365.js";
4
- function Z(t) {
5
- const e = R(t);
6
- let i = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
7
- const o = b(t), r = o ? t.offsetWidth : i, s = o ? t.offsetHeight : n, c = A(i) !== r || A(n) !== s;
8
- return c && (i = r, n = s), {
9
- width: i,
10
- height: n,
11
- $: c
12
- };
13
- }
14
- function q(t) {
15
- return v(t) ? t : t.contextElement;
16
- }
17
- function F(t) {
18
- const e = q(t);
19
- if (!b(e))
20
- return m(1);
21
- const i = e.getBoundingClientRect(), {
22
- width: n,
23
- height: o,
24
- $: r
25
- } = Z(e);
26
- let s = (r ? A(i.width) : i.width) / n, c = (r ? A(i.height) : i.height) / o;
27
- return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
28
- x: s,
29
- y: c
30
- };
31
- }
32
- const gt = /* @__PURE__ */ m(0);
33
- function X(t) {
34
- const e = L(t);
35
- return !Y() || !e.visualViewport ? gt : {
36
- x: e.visualViewport.offsetLeft,
37
- y: e.visualViewport.offsetTop
38
- };
39
- }
40
- function pt(t, e, i) {
41
- return e === void 0 && (e = !1), !i || e && i !== L(t) ? !1 : e;
42
- }
43
- function T(t, e, i, n) {
44
- e === void 0 && (e = !1), i === void 0 && (i = !1);
45
- const o = t.getBoundingClientRect(), r = q(t);
46
- let s = m(1);
47
- e && (n ? v(n) && (s = F(n)) : s = F(t));
48
- const c = pt(r, i, n) ? X(r) : m(0);
49
- let l = (o.left + c.x) / s.x, f = (o.top + c.y) / s.y, u = o.width / s.x, h = o.height / s.y;
50
- if (r) {
51
- const p = L(r), a = n && v(n) ? L(n) : n;
52
- let y = p, g = K(y);
53
- for (; g && n && a !== y; ) {
54
- const w = F(g), d = g.getBoundingClientRect(), x = R(g), C = d.left + (g.clientLeft + parseFloat(x.paddingLeft)) * w.x, B = d.top + (g.clientTop + parseFloat(x.paddingTop)) * w.y;
55
- l *= w.x, f *= w.y, u *= w.x, h *= w.y, l += C, f += B, y = L(g), g = K(y);
56
- }
57
- }
58
- return J({
59
- width: u,
60
- height: h,
61
- x: l,
62
- y: f
63
- });
64
- }
65
- function k(t, e) {
66
- const i = N(t).scrollLeft;
67
- return e ? e.left + i : T(O(t)).left + i;
68
- }
69
- function tt(t, e, i) {
70
- i === void 0 && (i = !1);
71
- const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - (i ? 0 : (
72
- // RTL <body> scrollbar.
73
- k(t, n)
74
- )), r = n.top + e.scrollTop;
75
- return {
76
- x: o,
77
- y: r
78
- };
79
- }
80
- function wt(t) {
81
- let {
82
- elements: e,
83
- rect: i,
84
- offsetParent: n,
85
- strategy: o
86
- } = t;
87
- const r = o === "fixed", s = O(n), c = e ? S(e.floating) : !1;
88
- if (n === s || c && r)
89
- return i;
90
- let l = {
91
- scrollLeft: 0,
92
- scrollTop: 0
93
- }, f = m(1);
94
- const u = m(0), h = b(n);
95
- if ((h || !h && !r) && ((M(n) !== "body" || _(s)) && (l = N(n)), b(n))) {
96
- const a = T(n);
97
- f = F(n), u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
98
- }
99
- const p = s && !h && !r ? tt(s, l, !0) : m(0);
100
- return {
101
- width: i.width * f.x,
102
- height: i.height * f.y,
103
- x: i.x * f.x - l.scrollLeft * f.x + u.x + p.x,
104
- y: i.y * f.y - l.scrollTop * f.y + u.y + p.y
105
- };
106
- }
107
- function mt(t) {
108
- return Array.from(t.getClientRects());
109
- }
110
- function yt(t) {
111
- const e = O(t), i = N(t), n = t.ownerDocument.body, o = E(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = E(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
112
- let s = -i.scrollLeft + k(t);
113
- const c = -i.scrollTop;
114
- return R(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - o), {
115
- width: o,
116
- height: r,
117
- x: s,
118
- y: c
119
- };
120
- }
121
- function xt(t, e) {
122
- const i = L(t), n = O(t), o = i.visualViewport;
123
- let r = n.clientWidth, s = n.clientHeight, c = 0, l = 0;
124
- if (o) {
125
- r = o.width, s = o.height;
126
- const f = Y();
127
- (!f || f && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
128
- }
129
- return {
130
- width: r,
131
- height: s,
132
- x: c,
133
- y: l
134
- };
135
- }
136
- function vt(t, e) {
137
- const i = T(t, !0, e === "fixed"), n = i.top + t.clientTop, o = i.left + t.clientLeft, r = b(t) ? F(t) : m(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = o * r.x, f = n * r.y;
138
- return {
139
- width: s,
140
- height: c,
141
- x: l,
142
- y: f
143
- };
144
- }
145
- function j(t, e, i) {
146
- let n;
147
- if (e === "viewport")
148
- n = xt(t, i);
149
- else if (e === "document")
150
- n = yt(O(t));
151
- else if (v(e))
152
- n = vt(e, i);
153
- else {
154
- const o = X(t);
155
- n = {
156
- x: e.x - o.x,
157
- y: e.y - o.y,
158
- width: e.width,
159
- height: e.height
160
- };
161
- }
162
- return J(n);
163
- }
164
- function et(t, e) {
165
- const i = W(t);
166
- return i === e || !v(i) || H(i) ? !1 : R(i).position === "fixed" || et(i, e);
167
- }
168
- function Rt(t, e) {
169
- const i = e.get(t);
170
- if (i)
171
- return i;
172
- let n = $(t, [], !1).filter((c) => v(c) && M(c) !== "body"), o = null;
173
- const r = R(t).position === "fixed";
174
- let s = r ? W(t) : t;
175
- for (; v(s) && !H(s); ) {
176
- const c = R(s), l = Q(s);
177
- !l && c.position === "fixed" && (o = null), (r ? !l && !o : !l && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || _(s) && !l && et(t, s)) ? n = n.filter((u) => u !== s) : o = c, s = W(s);
178
- }
179
- return e.set(t, n), n;
180
- }
181
- function Ot(t) {
182
- let {
183
- element: e,
184
- boundary: i,
185
- rootBoundary: n,
186
- strategy: o
187
- } = t;
188
- const s = [...i === "clippingAncestors" ? S(e) ? [] : Rt(e, this._c) : [].concat(i), n], c = s[0], l = s.reduce((f, u) => {
189
- const h = j(e, u, o);
190
- return f.top = E(h.top, f.top), f.right = V(h.right, f.right), f.bottom = V(h.bottom, f.bottom), f.left = E(h.left, f.left), f;
191
- }, j(e, c, o));
192
- return {
193
- width: l.right - l.left,
194
- height: l.bottom - l.top,
195
- x: l.left,
196
- y: l.top
197
- };
198
- }
199
- function bt(t) {
200
- const {
201
- width: e,
202
- height: i
203
- } = Z(t);
204
- return {
205
- width: e,
206
- height: i
207
- };
208
- }
209
- function Ct(t, e, i) {
210
- const n = b(e), o = O(e), r = i === "fixed", s = T(t, !0, r, e);
211
- let c = {
212
- scrollLeft: 0,
213
- scrollTop: 0
214
- };
215
- const l = m(0);
216
- if (n || !n && !r)
217
- if ((M(e) !== "body" || _(o)) && (c = N(e)), n) {
218
- const p = T(e, !0, r, e);
219
- l.x = p.x + e.clientLeft, l.y = p.y + e.clientTop;
220
- } else o && (l.x = k(o));
221
- const f = o && !n && !r ? tt(o, c) : m(0), u = s.left + c.scrollLeft - l.x - f.x, h = s.top + c.scrollTop - l.y - f.y;
222
- return {
223
- x: u,
224
- y: h,
225
- width: s.width,
226
- height: s.height
227
- };
228
- }
229
- function I(t) {
230
- return R(t).position === "static";
231
- }
232
- function G(t, e) {
233
- if (!b(t) || R(t).position === "fixed")
234
- return null;
235
- if (e)
236
- return e(t);
237
- let i = t.offsetParent;
238
- return O(t) === i && (i = i.ownerDocument.body), i;
239
- }
240
- function it(t, e) {
241
- const i = L(t);
242
- if (S(t))
243
- return i;
244
- if (!b(t)) {
245
- let o = W(t);
246
- for (; o && !H(o); ) {
247
- if (v(o) && !I(o))
248
- return o;
249
- o = W(o);
250
- }
251
- return i;
252
- }
253
- let n = G(t, e);
254
- for (; n && at(n) && I(n); )
255
- n = G(n, e);
256
- return n && H(n) && I(n) && !Q(n) ? i : n || dt(t) || i;
257
- }
258
- const Lt = async function(t) {
259
- const e = this.getOffsetParent || it, i = this.getDimensions, n = await i(t.floating);
260
- return {
261
- reference: Ct(t.reference, await e(t.floating), t.strategy),
262
- floating: {
263
- x: 0,
264
- y: 0,
265
- width: n.width,
266
- height: n.height
267
- }
268
- };
269
- };
270
- function Tt(t) {
271
- return R(t).direction === "rtl";
272
- }
273
- const Et = {
274
- convertOffsetParentRelativeRectToViewportRelativeRect: wt,
275
- getDocumentElement: O,
276
- getClippingRect: Ot,
277
- getOffsetParent: it,
278
- getElementRects: Lt,
279
- getClientRects: mt,
280
- getDimensions: bt,
281
- getScale: F,
282
- isElement: v,
283
- isRTL: Tt
284
- };
285
- function nt(t, e) {
286
- return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
287
- }
288
- function Ft(t, e) {
289
- let i = null, n;
290
- const o = O(t);
291
- function r() {
292
- var c;
293
- clearTimeout(n), (c = i) == null || c.disconnect(), i = null;
294
- }
295
- function s(c, l) {
296
- c === void 0 && (c = !1), l === void 0 && (l = 1), r();
297
- const f = t.getBoundingClientRect(), {
298
- left: u,
299
- top: h,
300
- width: p,
301
- height: a
302
- } = f;
303
- if (c || e(), !p || !a)
304
- return;
305
- const y = D(h), g = D(o.clientWidth - (u + p)), w = D(o.clientHeight - (h + a)), d = D(u), C = {
306
- rootMargin: -y + "px " + -g + "px " + -w + "px " + -d + "px",
307
- threshold: E(0, V(1, l)) || 1
308
- };
309
- let B = !0;
310
- function P(U) {
311
- const z = U[0].intersectionRatio;
312
- if (z !== l) {
313
- if (!B)
314
- return s();
315
- z ? s(!1, z) : n = setTimeout(() => {
316
- s(!1, 1e-7);
317
- }, 1e3);
318
- }
319
- z === 1 && !nt(f, t.getBoundingClientRect()) && s(), B = !1;
320
- }
321
- try {
322
- i = new IntersectionObserver(P, {
323
- ...C,
324
- // Handle <iframe>s
325
- root: o.ownerDocument
1
+ import * as h from "react";
2
+ import { useLayoutEffect as z } from "./index.es360.js";
3
+ function c(r) {
4
+ const [d, e] = h.useState(void 0);
5
+ return z(() => {
6
+ if (r) {
7
+ e({ width: r.offsetWidth, height: r.offsetHeight });
8
+ const f = new ResizeObserver((i) => {
9
+ if (!Array.isArray(i) || !i.length)
10
+ return;
11
+ const b = i[0];
12
+ let o, t;
13
+ if ("borderBoxSize" in b) {
14
+ const s = b.borderBoxSize, u = Array.isArray(s) ? s[0] : s;
15
+ o = u.inlineSize, t = u.blockSize;
16
+ } else
17
+ o = r.offsetWidth, t = r.offsetHeight;
18
+ e({ width: o, height: t });
326
19
  });
327
- } catch {
328
- i = new IntersectionObserver(P, C);
329
- }
330
- i.observe(t);
331
- }
332
- return s(!0), r;
333
- }
334
- function Dt(t, e, i, n) {
335
- n === void 0 && (n = {});
336
- const {
337
- ancestorScroll: o = !0,
338
- ancestorResize: r = !0,
339
- elementResize: s = typeof ResizeObserver == "function",
340
- layoutShift: c = typeof IntersectionObserver == "function",
341
- animationFrame: l = !1
342
- } = n, f = q(t), u = o || r ? [...f ? $(f) : [], ...$(e)] : [];
343
- u.forEach((d) => {
344
- o && d.addEventListener("scroll", i, {
345
- passive: !0
346
- }), r && d.addEventListener("resize", i);
347
- });
348
- const h = f && c ? Ft(f, i) : null;
349
- let p = -1, a = null;
350
- s && (a = new ResizeObserver((d) => {
351
- let [x] = d;
352
- x && x.target === f && a && (a.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
353
- var C;
354
- (C = a) == null || C.observe(e);
355
- })), i();
356
- }), f && !l && a.observe(f), a.observe(e));
357
- let y, g = l ? T(t) : null;
358
- l && w();
359
- function w() {
360
- const d = T(t);
361
- g && !nt(g, d) && i(), g = d, y = requestAnimationFrame(w);
362
- }
363
- return i(), () => {
364
- var d;
365
- u.forEach((x) => {
366
- o && x.removeEventListener("scroll", i), r && x.removeEventListener("resize", i);
367
- }), h == null || h(), (d = a) == null || d.disconnect(), a = null, l && cancelAnimationFrame(y);
368
- };
20
+ return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
21
+ } else
22
+ e(void 0);
23
+ }, [r]), d;
369
24
  }
370
- const At = ot, Ht = st, Nt = rt, It = ct, Vt = lt, $t = ht, St = ft, Mt = (t, e, i) => {
371
- const n = /* @__PURE__ */ new Map(), o = {
372
- platform: Et,
373
- ...i
374
- }, r = {
375
- ...o.platform,
376
- _c: n
377
- };
378
- return ut(t, e, {
379
- ...o,
380
- platform: r
381
- });
382
- };
383
25
  export {
384
- $t as arrow,
385
- Dt as autoUpdate,
386
- Mt as computePosition,
387
- Nt as flip,
388
- $ as getOverflowAncestors,
389
- Vt as hide,
390
- St as limitShift,
391
- At as offset,
392
- Et as platform,
393
- Ht as shift,
394
- It as size
26
+ c as useSize
395
27
  };
396
28
  //# sourceMappingURL=index.es359.js.map