@wix/editor-react-components 1.2288.0 → 1.2290.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 (155) hide show
  1. package/dist/site/components/AccordionComponent/component.js +1 -1
  2. package/dist/site/components/AccordionComponent/manifest.js +1 -1
  3. package/dist/site/components/AnimatedIcon/manifest.js +1 -1
  4. package/dist/site/components/AudioPlayer/component.js +14 -1112
  5. package/dist/site/components/AudioPlayer/manifest.js +1 -1
  6. package/dist/site/components/BoxContainer/component.js +1 -1
  7. package/dist/site/components/BoxContainer/manifest.js +1 -1
  8. package/dist/site/components/Breadcrumbs/component.js +3 -117
  9. package/dist/site/components/Breadcrumbs/manifest.js +1 -1
  10. package/dist/site/components/Button/manifest.js +1 -1
  11. package/dist/site/components/CollapsibleText/component.js +1 -1
  12. package/dist/site/components/CollapsibleText/manifest.js +1 -1
  13. package/dist/site/components/DatePicker/DatePicker.d.ts +3 -0
  14. package/dist/site/components/DatePicker/DatePicker.types.d.ts +91 -0
  15. package/dist/site/components/DatePicker/component.d.ts +2 -0
  16. package/dist/site/components/DatePicker/component.js +5644 -0
  17. package/dist/site/components/DatePicker/component.preview.d.ts +2 -0
  18. package/dist/site/components/DatePicker/components/DatePickerCalendar.d.ts +5 -0
  19. package/dist/site/components/DatePicker/components/DatePickerField.d.ts +6 -0
  20. package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +6 -0
  21. package/dist/site/components/DatePicker/components/DatePickerTooltip.d.ts +5 -0
  22. package/dist/site/components/DatePicker/constants.d.ts +177 -0
  23. package/dist/site/components/DatePicker/css.css +349 -0
  24. package/dist/site/components/DatePicker/datePickerUtils.d.ts +26 -0
  25. package/dist/site/components/DatePicker/hooks/useDateConstraints.d.ts +12 -0
  26. package/dist/site/components/DatePicker/hooks/useDatePickerValue.d.ts +15 -0
  27. package/dist/site/components/DatePicker/hooks/useUnavailableDates.d.ts +3 -0
  28. package/dist/site/components/DatePicker/index.d.ts +2 -0
  29. package/dist/site/components/DatePicker/index.js +6 -0
  30. package/dist/site/components/DatePicker/manifest.d.ts +5 -0
  31. package/dist/site/components/DatePicker/manifest.js +370 -0
  32. package/dist/site/components/Dropdown/component.js +2 -4
  33. package/dist/site/components/Dropdown/manifest.js +1 -1
  34. package/dist/site/components/HTMLComponent/component.js +1 -1
  35. package/dist/site/components/HipaaIcon/component.js +1 -1
  36. package/dist/site/components/HipaaIcon/manifest.js +1 -1
  37. package/dist/site/components/LinkBar/component.js +1 -1
  38. package/dist/site/components/LinkBar/manifest.js +1 -1
  39. package/dist/site/components/Logo/component.js +1 -1
  40. package/dist/site/components/Logo/manifest.js +1 -1
  41. package/dist/site/components/Logo/sdk.js +1 -1
  42. package/dist/site/components/Lottie/component.js +1 -1
  43. package/dist/site/components/Lottie/manifest.js +1 -1
  44. package/dist/site/components/Menu/component.js +1 -1
  45. package/dist/site/components/Menu/manifest.js +1 -1
  46. package/dist/site/components/MultiStateBox/component.js +1 -1
  47. package/dist/site/components/MultiStateBox/manifest.js +1 -1
  48. package/dist/site/components/ProgressBar/component.js +1 -1
  49. package/dist/site/components/ProgressBar/manifest.js +1 -1
  50. package/dist/site/components/ProgressBar/sdk.js +1 -1
  51. package/dist/site/components/Repeater/component.js +1 -1
  52. package/dist/site/components/Repeater/manifest.js +1 -1
  53. package/dist/site/components/ShareButtons/component.js +1 -1
  54. package/dist/site/components/ShareButtons/manifest.js +1 -1
  55. package/dist/site/components/Tabs/component.js +1 -1
  56. package/dist/site/components/Tabs/manifest.js +1 -1
  57. package/dist/site/components/TextBox/component.js +2 -5
  58. package/dist/site/components/TextBox/manifest.js +1 -1
  59. package/dist/site/components/TextEffects3d/component.js +1 -1
  60. package/dist/site/components/TextEffects3d/manifest.js +1 -1
  61. package/dist/site/components/TextEffectsBauhaus/component.js +1 -1
  62. package/dist/site/components/TextEffectsBauhaus/manifest.js +1 -1
  63. package/dist/site/components/TextEffectsGlass/component.js +1 -1
  64. package/dist/site/components/TextEffectsGlass/manifest.js +1 -1
  65. package/dist/site/components/TextEffectsGlitch/component.js +1 -1
  66. package/dist/site/components/TextEffectsGlitch/manifest.js +1 -1
  67. package/dist/site/components/TextEffectsLetterPress/component.js +1 -1
  68. package/dist/site/components/TextEffectsLetterPress/manifest.js +1 -1
  69. package/dist/site/components/TextEffectsMatrix/component.js +1 -1
  70. package/dist/site/components/TextEffectsMatrix/manifest.js +1 -1
  71. package/dist/site/components/TextEffectsNeonSign/component.js +1 -1
  72. package/dist/site/components/TextEffectsNeonSign/manifest.js +1 -1
  73. package/dist/site/components/TextEffectsNoisy/component.js +1 -1
  74. package/dist/site/components/TextEffectsNoisy/manifest.js +1 -1
  75. package/dist/site/components/TextEffectsOutlineOut/component.js +2 -2
  76. package/dist/site/components/TextEffectsOutlineOut/manifest.js +1 -1
  77. package/dist/site/components/TextEffectsRetro/component.js +1 -1
  78. package/dist/site/components/TextEffectsRetro/manifest.js +1 -1
  79. package/dist/site/components/TextEffectsShook/component.js +1 -1
  80. package/dist/site/components/TextEffectsShook/manifest.js +1 -1
  81. package/dist/site/components/TextEffectsSticker/component.js +1 -1
  82. package/dist/site/components/TextEffectsSticker/manifest.js +2 -2
  83. package/dist/site/components/TextEffectsStriped/component.js +1 -1
  84. package/dist/site/components/TextEffectsStriped/manifest.js +1 -1
  85. package/dist/site/components/TextInput/component.js +173 -465
  86. package/dist/site/components/TextInput/manifest.js +1 -1
  87. package/dist/site/components/TimePicker/TimePicker.d.ts +3 -0
  88. package/dist/site/components/TimePicker/TimePicker.types.d.ts +29 -0
  89. package/dist/site/components/TimePicker/component.d.ts +2 -0
  90. package/dist/site/components/TimePicker/component.js +146 -0
  91. package/dist/site/components/TimePicker/component.preview.d.ts +2 -0
  92. package/dist/site/components/TimePicker/components/TimePickerField.d.ts +4 -0
  93. package/dist/site/components/TimePicker/constants.d.ts +32 -0
  94. package/dist/site/components/TimePicker/css.css +64 -0
  95. package/dist/site/components/TimePicker/hooks/useTimePickerValue.d.ts +10 -0
  96. package/dist/site/components/TimePicker/index.d.ts +2 -0
  97. package/dist/site/components/TimePicker/index.js +6 -0
  98. package/dist/site/components/TimePicker/manifest.d.ts +5 -0
  99. package/dist/site/components/TimePicker/manifest.js +113 -0
  100. package/dist/site/components/TimePicker/timePickerUtils.d.ts +15 -0
  101. package/dist/site/components/chunks/AnimatedIcon.js +1 -1
  102. package/dist/site/components/chunks/Button.js +1 -1
  103. package/dist/site/components/chunks/Button2.js +299 -0
  104. package/dist/site/components/chunks/DateField.js +6763 -0
  105. package/dist/site/components/chunks/DismissSmall.js +7 -0
  106. package/dist/site/components/chunks/Group.js +60 -101
  107. package/dist/site/components/chunks/I18nProvider.js +32 -2
  108. package/dist/site/components/chunks/InfoCircleSmall.js +7 -0
  109. package/dist/site/components/chunks/Input.js +341 -0
  110. package/dist/site/components/chunks/Patterns.js +1 -1
  111. package/dist/site/components/chunks/TextEffectsShared.js +1 -1
  112. package/dist/site/components/chunks/constants10.js +14 -12
  113. package/dist/site/components/chunks/constants11.js +9 -9
  114. package/dist/site/components/chunks/constants12.js +10 -8
  115. package/dist/site/components/chunks/constants13.js +9 -13
  116. package/dist/site/components/chunks/constants14.js +14 -17
  117. package/dist/site/components/chunks/constants15.js +17 -12
  118. package/dist/site/components/chunks/constants16.js +11 -13
  119. package/dist/site/components/chunks/constants17.js +20 -66
  120. package/dist/site/components/chunks/constants18.js +67 -17
  121. package/dist/site/components/chunks/constants19.js +15 -50
  122. package/dist/site/components/chunks/constants2.js +30 -50
  123. package/dist/site/components/chunks/constants20.js +43 -45
  124. package/dist/site/components/chunks/constants21.js +48 -297
  125. package/dist/site/components/chunks/constants22.js +299 -41
  126. package/dist/site/components/chunks/constants23.js +44 -29
  127. package/dist/site/components/chunks/constants24.js +32 -17
  128. package/dist/site/components/chunks/constants25.js +16 -402
  129. package/dist/site/components/chunks/constants26.js +393 -73
  130. package/dist/site/components/chunks/constants27.js +80 -15
  131. package/dist/site/components/chunks/constants28.js +11 -42
  132. package/dist/site/components/chunks/constants29.js +44 -23
  133. package/dist/site/components/chunks/constants3.js +49 -14
  134. package/dist/site/components/chunks/constants30.js +28 -10
  135. package/dist/site/components/chunks/constants31.js +10 -132
  136. package/dist/site/components/chunks/constants32.js +114 -46
  137. package/dist/site/components/chunks/constants33.js +154 -69
  138. package/dist/site/components/chunks/constants34.js +59 -81
  139. package/dist/site/components/chunks/constants35.js +73 -58
  140. package/dist/site/components/chunks/constants36.js +91 -0
  141. package/dist/site/components/chunks/constants37.js +72 -0
  142. package/dist/site/components/chunks/constants4.js +10 -19
  143. package/dist/site/components/chunks/constants5.js +14 -14
  144. package/dist/site/components/chunks/constants6.js +11 -10
  145. package/dist/site/components/chunks/constants7.js +14 -14
  146. package/dist/site/components/chunks/constants8.js +22 -65
  147. package/dist/site/components/chunks/constants9.js +65 -20
  148. package/dist/site/components/chunks/filterDOMProps.js +15 -9
  149. package/dist/site/components/chunks/manifestBase.js +1 -1
  150. package/dist/site/components/chunks/useFocusable.js +118 -0
  151. package/dist/site/components/chunks/useLocalizedStringFormatter.js +122 -0
  152. package/dist/site/components/chunks/usePress.js +825 -0
  153. package/dist/site/components/chunks/utils.js +1 -1
  154. package/dist/site/components/extensions.js +59 -49
  155. package/package.json +4 -3
@@ -1,996 +1,20 @@
1
- var __typeError = (msg) => {
2
- throw TypeError(msg);
3
- };
4
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
6
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
7
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
- var _shouldStopPropagation;
9
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
10
2
  import * as React from "react";
11
- import React__default, { useState, useRef, useCallback, useMemo, useEffect, useContext, createContext, forwardRef, useSyncExternalStore } from "react";
3
+ import React__default, { useRef, useCallback, useMemo, useEffect, useState, forwardRef, useContext, createContext, useSyncExternalStore } from "react";
12
4
  import { c as clsx } from "../chunks/clsx.js";
13
5
  import { useService } from "@wix/services-manager-react";
14
6
  import { E as EnvironmentDefinition } from "../chunks/index2.js";
15
7
  import { f as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
16
8
  import { d as directionStyles } from "../chunks/direction.module.js";
17
9
  import Image3 from "../Image3/component.js";
18
- import { A as ARIA_LABELS, s as selectors, d as dataDefaults } from "../chunks/constants34.js";
10
+ import { A as ARIA_LABELS, s as selectors, d as dataDefaults } from "../chunks/constants36.js";
19
11
  import { c as commonjsGlobal } from "../chunks/_commonjsHelpers.js";
20
- import { $ as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, a as $f39a9eba43920ace$export$86427a43e3e48ebb, b as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3, g as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, e as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$2881499e37b75b9a, d as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../chunks/filterDOMProps.js";
21
- import { o as $2add3ce32c6007eb$export$fedb369cb70207f1, p as $d447af545b77c9f1$export$b204af158042fbac, q as $081cb5757e08788e$export$24490316f764c430, r as $d447af545b77c9f1$export$f21a1ffae260145a, s as $48a7d519b337145d$export$4eaf04e54aa8eed6, a as $fe16bffc7a557bf0$export$7f54fc3180508a52, t as $a92dc41f639950be$export$c2b7abe5d61ec696, u as $a92dc41f639950be$export$525bc4921d56d4a, v as $23f2114a1b82827e$export$4282f70798064fe0, c as $23f2114a1b82827e$export$e58f029f0fbfdb29, w as $b5c62b033c25b96d$export$29bf1b5f2c56cf63, x as $a92dc41f639950be$export$cabe61c495ee3649, y as $1969ac565cfec8d0$export$de79e2c695e052f3, z as $b5c62b033c25b96d$export$60278871457622de, f as $bbaa08b3cd72f041$export$9d1611c77c2fe928, A as $b7115c395c64f7b5$export$4debdb1a3f0fa79e, B as $caaf0dd3060ed57c$export$95185d699e05d4d7, C as $a4e76a5424781910$export$e08e3b67e392101e, D as $2add3ce32c6007eb$export$9ac100e40613ea10, h as $d1116acdf220c2da$export$4c014de7c8940b4c, E as $2c9edc598a03d523$export$420e68273165f4ec, d as $0beb20c9744a2065$export$8467354a121f1b9f, b as $8f5a2122b0992be3$export$8397ddfc504fdb9a, F as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, i as $3274bf1495747a7b$export$5add1d006293d136, k as $0c4a58759813079a$export$4e328f61c538687f, j as $e969f22b6713ca4a$export$ae780daf29e6d456, G as $390e54f620492c70$export$f680877a34711e37, g as $3e6197669829fe11$export$40bfa8c7b0832715, l as $01b77f81d0f07f68$export$75b6ee27786ba447, H as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../chunks/Group.js";
22
- import { flushSync } from "react-dom";
23
- import { $ as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "../chunks/I18nProvider.js";
24
- const PauseFilled = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M9.5,7 C10.3284271,7 11,7.67157288 11,8.5 L11,15.5 C11,16.3284271 10.3284271,17 9.5,17 C8.67157288,17 8,16.3284271 8,15.5 L8,8.5 C8,7.67157288 8.67157288,7 9.5,7 Z M14.5,7 C15.3284271,7 16,7.67157288 16,8.5 L16,15.5 C16,16.3284271 15.3284271,17 14.5,17 C13.6715729,17 13,16.3284271 13,15.5 L13,8.5 C13,7.67157288 13.6715729,7 14.5,7 Z" }));
25
- PauseFilled.displayName = "PauseFilled";
26
- var PauseFilled_default = PauseFilled;
27
- const PlayFilled = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M8.26582096,6.80664662 L16.1774936,11.1221044 C16.6623419,11.3865672 16.8409998,11.9940038 16.5765371,12.4788521 C16.4845917,12.6474186 16.3460601,12.7859502 16.1774936,12.8778956 L8.26582096,17.1933534 C7.78097262,17.4578161 7.17353598,17.2791583 6.90907325,16.7943099 C6.8289522,16.6474213 6.78696883,16.4827768 6.78696883,16.3154578 L6.78696883,7.68454219 C6.78696883,7.13225744 7.23468408,6.68454219 7.78696883,6.68454219 C7.95428782,6.68454219 8.11893236,6.72652556 8.26582096,6.80664662 Z" }));
28
- PlayFilled.displayName = "PlayFilled";
29
- var PlayFilled_default = PlayFilled;
30
- const $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY = 7e3;
31
- let $319e236875307eab$var$liveAnnouncer = null;
32
- function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = "assertive", timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
33
- if (!$319e236875307eab$var$liveAnnouncer) {
34
- $319e236875307eab$var$liveAnnouncer = new $319e236875307eab$var$LiveAnnouncer();
35
- if (!(typeof IS_REACT_ACT_ENVIRONMENT === "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest !== "undefined")) setTimeout(() => {
36
- if ($319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === void 0 ? void 0 : $319e236875307eab$var$liveAnnouncer.isAttached()) $319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === void 0 ? void 0 : $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
37
- }, 100);
38
- else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
39
- } else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
40
- }
41
- class $319e236875307eab$var$LiveAnnouncer {
42
- isAttached() {
43
- var _this_node;
44
- return (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.isConnected;
45
- }
46
- createLog(ariaLive) {
47
- let node = document.createElement("div");
48
- node.setAttribute("role", "log");
49
- node.setAttribute("aria-live", ariaLive);
50
- node.setAttribute("aria-relevant", "additions");
51
- return node;
52
- }
53
- destroy() {
54
- if (!this.node) return;
55
- document.body.removeChild(this.node);
56
- this.node = null;
57
- }
58
- announce(message, assertiveness = "assertive", timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
59
- var _this_assertiveLog, _this_politeLog;
60
- if (!this.node) return;
61
- let node = document.createElement("div");
62
- if (typeof message === "object") {
63
- node.setAttribute("role", "img");
64
- node.setAttribute("aria-labelledby", message["aria-labelledby"]);
65
- } else node.textContent = message;
66
- if (assertiveness === "assertive") (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === void 0 ? void 0 : _this_assertiveLog.appendChild(node);
67
- else (_this_politeLog = this.politeLog) === null || _this_politeLog === void 0 ? void 0 : _this_politeLog.appendChild(node);
68
- if (message !== "") setTimeout(() => {
69
- node.remove();
70
- }, timeout);
71
- }
72
- clear(assertiveness) {
73
- if (!this.node) return;
74
- if ((!assertiveness || assertiveness === "assertive") && this.assertiveLog) this.assertiveLog.innerHTML = "";
75
- if ((!assertiveness || assertiveness === "polite") && this.politeLog) this.politeLog.innerHTML = "";
76
- }
77
- constructor() {
78
- this.node = null;
79
- this.assertiveLog = null;
80
- this.politeLog = null;
81
- if (typeof document !== "undefined") {
82
- this.node = document.createElement("div");
83
- this.node.dataset.liveAnnouncer = "true";
84
- Object.assign(this.node.style, {
85
- border: 0,
86
- clip: "rect(0 0 0 0)",
87
- clipPath: "inset(50%)",
88
- height: "1px",
89
- margin: "-1px",
90
- overflow: "hidden",
91
- padding: 0,
92
- position: "absolute",
93
- width: "1px",
94
- whiteSpace: "nowrap"
95
- });
96
- this.assertiveLog = this.createLog("assertive");
97
- this.node.appendChild(this.assertiveLog);
98
- this.politeLog = this.createLog("polite");
99
- this.node.appendChild(this.politeLog);
100
- document.body.prepend(this.node);
101
- }
102
- }
103
- }
104
- let $1dfb119a85e764e5$var$formatterCache = /* @__PURE__ */ new Map();
105
- let $1dfb119a85e764e5$var$supportsSignDisplay = false;
106
- try {
107
- $1dfb119a85e764e5$var$supportsSignDisplay = new Intl.NumberFormat("de-DE", {
108
- signDisplay: "exceptZero"
109
- }).resolvedOptions().signDisplay === "exceptZero";
110
- } catch {
111
- }
112
- let $1dfb119a85e764e5$var$supportsUnit = false;
113
- try {
114
- $1dfb119a85e764e5$var$supportsUnit = new Intl.NumberFormat("de-DE", {
115
- style: "unit",
116
- unit: "degree"
117
- }).resolvedOptions().style === "unit";
118
- } catch {
119
- }
120
- const $1dfb119a85e764e5$var$UNITS = {
121
- degree: {
122
- narrow: {
123
- default: "°",
124
- "ja-JP": " 度",
125
- "zh-TW": "度",
126
- "sl-SI": " °"
127
- }
128
- }
129
- };
130
- class $1dfb119a85e764e5$export$cc77c4ff7e8673c5 {
131
- constructor(locale, options = {}) {
132
- this.numberFormatter = $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options);
133
- this.options = options;
134
- }
135
- /** Formats a number value as a string, according to the locale and options provided to the constructor. */
136
- format(value) {
137
- var _a;
138
- let res = "";
139
- if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) res = $1dfb119a85e764e5$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
140
- else res = this.numberFormatter.format(value);
141
- if (this.options.style === "unit" && !$1dfb119a85e764e5$var$supportsUnit) {
142
- let { unit, unitDisplay = "short", locale } = this.resolvedOptions();
143
- if (!unit) return res;
144
- let values = (_a = $1dfb119a85e764e5$var$UNITS[unit]) == null ? void 0 : _a[unitDisplay];
145
- res += values[locale] || values.default;
146
- }
147
- return res;
148
- }
149
- /** Formats a number to an array of parts such as separators, digits, punctuation, and more. */
150
- formatToParts(value) {
151
- return this.numberFormatter.formatToParts(value);
152
- }
153
- /** Formats a number range as a string. */
154
- formatRange(start, end) {
155
- if (typeof this.numberFormatter.formatRange === "function") return this.numberFormatter.formatRange(start, end);
156
- if (end < start) throw new RangeError("End date must be >= start date");
157
- return `${this.format(start)} – ${this.format(end)}`;
158
- }
159
- /** Formats a number range as an array of parts. */
160
- formatRangeToParts(start, end) {
161
- if (typeof this.numberFormatter.formatRangeToParts === "function") return this.numberFormatter.formatRangeToParts(start, end);
162
- if (end < start) throw new RangeError("End date must be >= start date");
163
- let startParts = this.numberFormatter.formatToParts(start);
164
- let endParts = this.numberFormatter.formatToParts(end);
165
- return [
166
- ...startParts.map((p2) => ({
167
- ...p2,
168
- source: "startRange"
169
- })),
170
- {
171
- type: "literal",
172
- value: " – ",
173
- source: "shared"
174
- },
175
- ...endParts.map((p2) => ({
176
- ...p2,
177
- source: "endRange"
178
- }))
179
- ];
180
- }
181
- /** Returns the resolved formatting options based on the values passed to the constructor. */
182
- resolvedOptions() {
183
- let options = this.numberFormatter.resolvedOptions();
184
- if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) options = {
185
- ...options,
186
- signDisplay: this.options.signDisplay
187
- };
188
- if (!$1dfb119a85e764e5$var$supportsUnit && this.options.style === "unit") options = {
189
- ...options,
190
- style: "unit",
191
- unit: this.options.unit,
192
- unitDisplay: this.options.unitDisplay
193
- };
194
- return options;
195
- }
196
- }
197
- function $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options = {}) {
198
- var _a;
199
- let { numberingSystem } = options;
200
- if (numberingSystem && locale.includes("-nu-")) {
201
- if (!locale.includes("-u-")) locale += "-u-";
202
- locale += `-nu-${numberingSystem}`;
203
- }
204
- if (options.style === "unit" && !$1dfb119a85e764e5$var$supportsUnit) {
205
- let { unit, unitDisplay = "short" } = options;
206
- if (!unit) throw new Error('unit option must be provided with style: "unit"');
207
- if (!((_a = $1dfb119a85e764e5$var$UNITS[unit]) == null ? void 0 : _a[unitDisplay])) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
208
- options = {
209
- ...options,
210
- style: "decimal"
211
- };
212
- }
213
- let cacheKey = locale + (options ? Object.entries(options).sort((a, b2) => a[0] < b2[0] ? -1 : 1).join() : "");
214
- if ($1dfb119a85e764e5$var$formatterCache.has(cacheKey)) return $1dfb119a85e764e5$var$formatterCache.get(cacheKey);
215
- let numberFormatter = new Intl.NumberFormat(locale, options);
216
- $1dfb119a85e764e5$var$formatterCache.set(cacheKey, numberFormatter);
217
- return numberFormatter;
218
- }
219
- function $1dfb119a85e764e5$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
220
- if (signDisplay === "auto") return numberFormat.format(num);
221
- else if (signDisplay === "never") return numberFormat.format(Math.abs(num));
222
- else {
223
- let needsPositiveSign = false;
224
- if (signDisplay === "always") needsPositiveSign = num > 0 || Object.is(num, 0);
225
- else if (signDisplay === "exceptZero") {
226
- if (Object.is(num, -0) || Object.is(num, 0)) num = Math.abs(num);
227
- else needsPositiveSign = num > 0;
228
- }
229
- if (needsPositiveSign) {
230
- let negative = numberFormat.format(-num);
231
- let noSign = numberFormat.format(num);
232
- let minus = negative.replace(noSign, "").replace(/\u200e|\u061C/, "");
233
- if ([
234
- ...minus
235
- ].length !== 1) console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case");
236
- let positive = negative.replace(noSign, "!!!").replace(minus, "+").replace("!!!", noSign);
237
- return positive;
238
- } else return numberFormat.format(num);
239
- }
240
- }
241
- let $cbf007e418543821$var$state = "default";
242
- let $cbf007e418543821$var$savedUserSelect = "";
243
- let $cbf007e418543821$var$modifiedElementMap = /* @__PURE__ */ new WeakMap();
244
- function $cbf007e418543821$export$16a4697467175487(target) {
245
- if ($2add3ce32c6007eb$export$fedb369cb70207f1()) {
246
- if ($cbf007e418543821$var$state === "default") {
247
- const documentObject = $d447af545b77c9f1$export$b204af158042fbac(target);
248
- $cbf007e418543821$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
249
- documentObject.documentElement.style.webkitUserSelect = "none";
250
- }
251
- $cbf007e418543821$var$state = "disabled";
252
- } else if (target instanceof HTMLElement || target instanceof SVGElement) {
253
- let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
254
- $cbf007e418543821$var$modifiedElementMap.set(target, target.style[property]);
255
- target.style[property] = "none";
256
- }
257
- }
258
- function $cbf007e418543821$export$b0d6fa1ab32e3295(target) {
259
- if ($2add3ce32c6007eb$export$fedb369cb70207f1()) {
260
- if ($cbf007e418543821$var$state !== "disabled") return;
261
- $cbf007e418543821$var$state = "restoring";
262
- setTimeout(() => {
263
- $081cb5757e08788e$export$24490316f764c430(() => {
264
- if ($cbf007e418543821$var$state === "restoring") {
265
- const documentObject = $d447af545b77c9f1$export$b204af158042fbac(target);
266
- if (documentObject.documentElement.style.webkitUserSelect === "none") documentObject.documentElement.style.webkitUserSelect = $cbf007e418543821$var$savedUserSelect || "";
267
- $cbf007e418543821$var$savedUserSelect = "";
268
- $cbf007e418543821$var$state = "default";
269
- }
270
- });
271
- }, 300);
272
- } else if (target instanceof HTMLElement || target instanceof SVGElement) {
273
- if (target && $cbf007e418543821$var$modifiedElementMap.has(target)) {
274
- let targetOldUserSelect = $cbf007e418543821$var$modifiedElementMap.get(target);
275
- let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
276
- if (target.style[property] === "none") target.style[property] = targetOldUserSelect;
277
- if (target.getAttribute("style") === "") target.removeAttribute("style");
278
- $cbf007e418543821$var$modifiedElementMap.delete(target);
279
- }
280
- }
281
- }
282
- function $2b2d34ff061957fb$var$getWebpackNonce(doc) {
283
- let ownerWindow = doc == null ? void 0 : doc.defaultView;
284
- return (ownerWindow == null ? void 0 : ownerWindow.__webpack_nonce__) || globalThis["__webpack_nonce__"] || void 0;
285
- }
286
- let $2b2d34ff061957fb$var$nonceCache = /* @__PURE__ */ new WeakMap();
287
- function $2b2d34ff061957fb$export$2b85b721e524d74b(doc) {
288
- let d2 = doc ?? (typeof document !== "undefined" ? document : void 0);
289
- if (!d2) return $2b2d34ff061957fb$var$getWebpackNonce(d2);
290
- if ($2b2d34ff061957fb$var$nonceCache.has(d2)) return $2b2d34ff061957fb$var$nonceCache.get(d2);
291
- let meta = d2.querySelector('meta[property="csp-nonce"]');
292
- let nonce = meta && meta instanceof $d447af545b77c9f1$export$f21a1ffae260145a(meta).HTMLMetaElement && (meta.nonce || meta.content) || $2b2d34ff061957fb$var$getWebpackNonce(d2) || void 0;
293
- if (nonce !== void 0) $2b2d34ff061957fb$var$nonceCache.set(d2, nonce);
294
- return nonce;
295
- }
296
- const $24f9a20f226ad820$export$5165eccb35aaadb5 = React__default.createContext({
297
- register: () => {
298
- }
299
- });
300
- $24f9a20f226ad820$export$5165eccb35aaadb5.displayName = "PressResponderContext";
301
- function $d27d541f9569d26d$var$usePressResponderContext(props) {
302
- let context = useContext($24f9a20f226ad820$export$5165eccb35aaadb5);
303
- if (context) {
304
- let { register, ref, ...contextProps } = context;
305
- props = $bbaa08b3cd72f041$export$9d1611c77c2fe928(contextProps, props);
306
- register();
307
- }
308
- $b7115c395c64f7b5$export$4debdb1a3f0fa79e(context, props.ref);
309
- return props;
310
- }
311
- class $d27d541f9569d26d$var$PressEvent {
312
- constructor(type, pointerType, originalEvent, state) {
313
- __privateAdd(this, _shouldStopPropagation);
314
- __privateSet(this, _shouldStopPropagation, true);
315
- let currentTarget = (state == null ? void 0 : state.target) ?? originalEvent.currentTarget;
316
- const rect = currentTarget == null ? void 0 : currentTarget.getBoundingClientRect();
317
- let x, y2 = 0;
318
- let clientX, clientY = null;
319
- if (originalEvent.clientX != null && originalEvent.clientY != null) {
320
- clientX = originalEvent.clientX;
321
- clientY = originalEvent.clientY;
322
- }
323
- if (rect) {
324
- if (clientX != null && clientY != null) {
325
- x = clientX - rect.left;
326
- y2 = clientY - rect.top;
327
- } else {
328
- x = rect.width / 2;
329
- y2 = rect.height / 2;
330
- }
331
- }
332
- this.type = type;
333
- this.pointerType = pointerType;
334
- this.target = originalEvent.currentTarget;
335
- this.shiftKey = originalEvent.shiftKey;
336
- this.metaKey = originalEvent.metaKey;
337
- this.ctrlKey = originalEvent.ctrlKey;
338
- this.altKey = originalEvent.altKey;
339
- this.x = x;
340
- this.y = y2;
341
- this.key = originalEvent.key;
342
- }
343
- continuePropagation() {
344
- __privateSet(this, _shouldStopPropagation, false);
345
- }
346
- get shouldStopPropagation() {
347
- return __privateGet(this, _shouldStopPropagation);
348
- }
349
- }
350
- _shouldStopPropagation = new WeakMap();
351
- const $d27d541f9569d26d$var$LINK_CLICKED = Symbol("linkClicked");
352
- const $d27d541f9569d26d$var$STYLE_ID = "react-aria-pressable-style";
353
- const $d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE = "data-react-aria-pressable";
354
- function $d27d541f9569d26d$export$45712eceda6fad21(props) {
355
- let { onPress, onPressChange, onPressStart, onPressEnd, onPressUp, onClick, isDisabled, isPressed: isPressedProp, preventFocusOnPress, shouldCancelOnPointerExit, allowTextSelectionOnPress, ref: domRef, ...domProps } = $d27d541f9569d26d$var$usePressResponderContext(props);
356
- let [isPressed, setPressed] = useState(false);
357
- let ref = useRef({
358
- isPressed: false,
359
- ignoreEmulatedMouseEvents: false,
360
- didFirePressStart: false,
361
- isTriggeringEvent: false,
362
- activePointerId: null,
363
- target: null,
364
- isOverTarget: false,
365
- pointerType: null,
366
- disposables: []
367
- });
368
- let { addGlobalListener, removeAllGlobalListeners } = $48a7d519b337145d$export$4eaf04e54aa8eed6();
369
- let triggerPressStart = useCallback((originalEvent, pointerType) => {
370
- let state = ref.current;
371
- if (isDisabled || state.didFirePressStart) return false;
372
- let shouldStopPropagation = true;
373
- state.isTriggeringEvent = true;
374
- if (onPressStart) {
375
- let event = new $d27d541f9569d26d$var$PressEvent("pressstart", pointerType, originalEvent);
376
- onPressStart(event);
377
- shouldStopPropagation = event.shouldStopPropagation;
378
- }
379
- if (onPressChange) onPressChange(true);
380
- state.isTriggeringEvent = false;
381
- state.didFirePressStart = true;
382
- setPressed(true);
383
- return shouldStopPropagation;
384
- }, [
385
- isDisabled,
386
- onPressStart,
387
- onPressChange
388
- ]);
389
- let triggerPressEnd = useCallback((originalEvent, pointerType, wasPressed = true) => {
390
- let state = ref.current;
391
- if (!state.didFirePressStart) return false;
392
- state.didFirePressStart = false;
393
- state.isTriggeringEvent = true;
394
- let shouldStopPropagation = true;
395
- if (onPressEnd) {
396
- let event = new $d27d541f9569d26d$var$PressEvent("pressend", pointerType, originalEvent);
397
- onPressEnd(event);
398
- shouldStopPropagation = event.shouldStopPropagation;
399
- }
400
- if (onPressChange) onPressChange(false);
401
- setPressed(false);
402
- if (onPress && wasPressed && !isDisabled) {
403
- let event = new $d27d541f9569d26d$var$PressEvent("press", pointerType, originalEvent);
404
- onPress(event);
405
- shouldStopPropagation && (shouldStopPropagation = event.shouldStopPropagation);
406
- }
407
- state.isTriggeringEvent = false;
408
- return shouldStopPropagation;
409
- }, [
410
- isDisabled,
411
- onPressEnd,
412
- onPressChange,
413
- onPress
414
- ]);
415
- let triggerPressEndEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(triggerPressEnd);
416
- let triggerPressUp = useCallback((originalEvent, pointerType) => {
417
- let state = ref.current;
418
- if (isDisabled) return false;
419
- if (onPressUp) {
420
- state.isTriggeringEvent = true;
421
- let event = new $d27d541f9569d26d$var$PressEvent("pressup", pointerType, originalEvent);
422
- onPressUp(event);
423
- state.isTriggeringEvent = false;
424
- return event.shouldStopPropagation;
425
- }
426
- return true;
427
- }, [
428
- isDisabled,
429
- onPressUp
430
- ]);
431
- let triggerPressUpEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(triggerPressUp);
432
- let cancel = useCallback((e) => {
433
- let state = ref.current;
434
- if (state.isPressed && state.target) {
435
- if (state.didFirePressStart && state.pointerType != null) triggerPressEnd($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType, false);
436
- state.isPressed = false;
437
- state.isOverTarget = false;
438
- state.activePointerId = null;
439
- state.pointerType = null;
440
- removeAllGlobalListeners();
441
- if (!allowTextSelectionOnPress) $cbf007e418543821$export$b0d6fa1ab32e3295(state.target);
442
- for (let dispose of state.disposables) dispose();
443
- state.disposables = [];
444
- }
445
- }, [
446
- allowTextSelectionOnPress,
447
- removeAllGlobalListeners,
448
- triggerPressEnd
449
- ]);
450
- let cancelEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(cancel);
451
- let cancelOnPointerExit = useCallback((e) => {
452
- if (shouldCancelOnPointerExit) cancel(e);
453
- }, [
454
- shouldCancelOnPointerExit,
455
- cancel
456
- ]);
457
- let triggerClick = useCallback((e) => {
458
- if (isDisabled) return;
459
- onClick == null ? void 0 : onClick(e);
460
- }, [
461
- isDisabled,
462
- onClick
463
- ]);
464
- let triggerSyntheticClick = useCallback((e, target) => {
465
- if (isDisabled) return;
466
- if (onClick) {
467
- let event = new MouseEvent("click", e);
468
- $a92dc41f639950be$export$c2b7abe5d61ec696(event, target);
469
- onClick($a92dc41f639950be$export$525bc4921d56d4a(event));
470
- }
471
- }, [
472
- isDisabled,
473
- onClick
474
- ]);
475
- let pressProps = useMemo(() => {
476
- let state = ref.current;
477
- let pressProps2 = {
478
- onKeyDown(e) {
479
- var _a;
480
- if ($d27d541f9569d26d$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && $23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) {
481
- if ($d27d541f9569d26d$var$shouldPreventDefaultKeyboard($23f2114a1b82827e$export$e58f029f0fbfdb29(e), e.key)) e.preventDefault();
482
- let shouldStopPropagation = true;
483
- if (!state.isPressed && !e.repeat) {
484
- state.target = e.currentTarget;
485
- state.isPressed = true;
486
- state.pointerType = "keyboard";
487
- shouldStopPropagation = triggerPressStart(e, "keyboard");
488
- }
489
- let originalTarget = e.currentTarget;
490
- let pressUp = (e2) => {
491
- if ($d27d541f9569d26d$var$isValidKeyboardEvent(e2, originalTarget) && !e2.repeat && $23f2114a1b82827e$export$4282f70798064fe0(originalTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e2)) && state.target)
492
- triggerPressUpEvent($d27d541f9569d26d$var$createEvent(state.target, e2), "keyboard");
493
- };
494
- addGlobalListener($d447af545b77c9f1$export$b204af158042fbac(e.currentTarget), "keyup", $a4e76a5424781910$export$e08e3b67e392101e(pressUp, onKeyUp), true);
495
- if (shouldStopPropagation) e.stopPropagation();
496
- if (e.metaKey && $2add3ce32c6007eb$export$9ac100e40613ea10()) (_a = state.metaKeyEvents) == null ? void 0 : _a.set(e.key, e.nativeEvent);
497
- } else if (e.key === "Meta") state.metaKeyEvents = /* @__PURE__ */ new Map();
498
- },
499
- onClick(e) {
500
- if (e && !$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
501
- if (e && e.button === 0 && !state.isTriggeringEvent && !$caaf0dd3060ed57c$export$95185d699e05d4d7.isOpening) {
502
- let shouldStopPropagation = true;
503
- if (isDisabled) e.preventDefault();
504
- if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === "virtual" || $b5c62b033c25b96d$export$60278871457622de(e.nativeEvent))) {
505
- let stopPressStart = triggerPressStart(e, "virtual");
506
- let stopPressUp = triggerPressUpEvent(e, "virtual");
507
- let stopPressEnd = triggerPressEndEvent(e, "virtual");
508
- triggerClick(e);
509
- shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;
510
- } else if (state.isPressed && state.pointerType !== "keyboard") {
511
- let pointerType = state.pointerType || e.nativeEvent.pointerType || "virtual";
512
- let stopPressUp = triggerPressUpEvent($d27d541f9569d26d$var$createEvent(e.currentTarget, e), pointerType);
513
- let stopPressEnd = triggerPressEndEvent($d27d541f9569d26d$var$createEvent(e.currentTarget, e), pointerType, true);
514
- shouldStopPropagation = stopPressUp && stopPressEnd;
515
- state.isOverTarget = false;
516
- triggerClick(e);
517
- cancelEvent(e);
518
- }
519
- state.ignoreEmulatedMouseEvents = false;
520
- if (shouldStopPropagation) e.stopPropagation();
521
- }
522
- }
523
- };
524
- let onKeyUp = (e) => {
525
- var _a, _b, _c;
526
- if (state.isPressed && state.target && $d27d541f9569d26d$var$isValidKeyboardEvent(e, state.target)) {
527
- if ($d27d541f9569d26d$var$shouldPreventDefaultKeyboard($23f2114a1b82827e$export$e58f029f0fbfdb29(e), e.key)) e.preventDefault();
528
- let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
529
- let wasPressed = $23f2114a1b82827e$export$4282f70798064fe0(state.target, target);
530
- triggerPressEndEvent($d27d541f9569d26d$var$createEvent(state.target, e), "keyboard", wasPressed);
531
- if (wasPressed) triggerSyntheticClick(e, state.target);
532
- removeAllGlobalListeners();
533
- if (e.key !== "Enter" && $d27d541f9569d26d$var$isHTMLAnchorLink(state.target) && $23f2114a1b82827e$export$4282f70798064fe0(state.target, target) && !e[$d27d541f9569d26d$var$LINK_CLICKED]) {
534
- e[$d27d541f9569d26d$var$LINK_CLICKED] = true;
535
- $caaf0dd3060ed57c$export$95185d699e05d4d7(state.target, e, false);
536
- }
537
- state.isPressed = false;
538
- (_a = state.metaKeyEvents) == null ? void 0 : _a.delete(e.key);
539
- } else if (e.key === "Meta" && ((_b = state.metaKeyEvents) == null ? void 0 : _b.size)) {
540
- let events = state.metaKeyEvents;
541
- state.metaKeyEvents = void 0;
542
- for (let event of events.values()) (_c = state.target) == null ? void 0 : _c.dispatchEvent(new KeyboardEvent("keyup", event));
543
- }
544
- };
545
- if (typeof PointerEvent !== "undefined") {
546
- pressProps2.onPointerDown = (e) => {
547
- if (e.button !== 0 || !$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
548
- if ($b5c62b033c25b96d$export$29bf1b5f2c56cf63(e.nativeEvent)) {
549
- state.pointerType = "virtual";
550
- return;
551
- }
552
- state.pointerType = e.pointerType;
553
- let shouldStopPropagation = true;
554
- if (!state.isPressed) {
555
- state.isPressed = true;
556
- state.isOverTarget = true;
557
- state.activePointerId = e.pointerId;
558
- state.target = e.currentTarget;
559
- if (!allowTextSelectionOnPress) $cbf007e418543821$export$16a4697467175487(state.target);
560
- shouldStopPropagation = triggerPressStart(e, state.pointerType);
561
- let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
562
- if ("releasePointerCapture" in target) {
563
- if ("hasPointerCapture" in target) {
564
- if (target.hasPointerCapture(e.pointerId)) target.releasePointerCapture(e.pointerId);
565
- } else target.releasePointerCapture(e.pointerId);
566
- }
567
- addGlobalListener($d447af545b77c9f1$export$b204af158042fbac(e.currentTarget), "pointerup", onPointerUp, false);
568
- addGlobalListener($d447af545b77c9f1$export$b204af158042fbac(e.currentTarget), "pointercancel", onPointerCancel, false);
569
- }
570
- if (shouldStopPropagation) e.stopPropagation();
571
- };
572
- pressProps2.onMouseDown = (e) => {
573
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
574
- if (e.button === 0) {
575
- if (preventFocusOnPress) {
576
- let dispose = $a92dc41f639950be$export$cabe61c495ee3649(e.target);
577
- if (dispose) state.disposables.push(dispose);
578
- }
579
- e.stopPropagation();
580
- }
581
- };
582
- pressProps2.onPointerUp = (e) => {
583
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e)) || state.pointerType === "virtual") return;
584
- if (e.button === 0 && !state.isPressed)
585
- triggerPressUpEvent(e, state.pointerType || e.pointerType);
586
- };
587
- pressProps2.onPointerEnter = (e) => {
588
- if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {
589
- state.isOverTarget = true;
590
- triggerPressStart($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType);
591
- }
592
- };
593
- pressProps2.onPointerLeave = (e) => {
594
- if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {
595
- state.isOverTarget = false;
596
- triggerPressEndEvent($d27d541f9569d26d$var$createEvent(state.target, e), state.pointerType, false);
597
- cancelOnPointerExit(e);
598
- }
599
- };
600
- let onPointerUp = (e) => {
601
- if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
602
- if ($23f2114a1b82827e$export$4282f70798064fe0(state.target, $23f2114a1b82827e$export$e58f029f0fbfdb29(e)) && state.pointerType != null) {
603
- let clicked = false;
604
- let timeout = setTimeout(() => {
605
- if (state.isPressed && state.target instanceof HTMLElement) {
606
- if (clicked)
607
- cancelEvent(e);
608
- else {
609
- $1969ac565cfec8d0$export$de79e2c695e052f3(state.target);
610
- state.target.click();
611
- }
612
- }
613
- }, 80);
614
- addGlobalListener(e.currentTarget, "click", () => clicked = true, true);
615
- state.disposables.push(() => clearTimeout(timeout));
616
- } else
617
- cancelEvent(e);
618
- state.isOverTarget = false;
619
- }
620
- };
621
- let onPointerCancel = (e) => {
622
- cancelEvent(e);
623
- };
624
- pressProps2.onDragStart = (e) => {
625
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
626
- cancelEvent(e);
627
- };
628
- } else if (process.env.NODE_ENV === "test") {
629
- pressProps2.onMouseDown = (e) => {
630
- if (e.button !== 0 || !$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
631
- if (state.ignoreEmulatedMouseEvents) {
632
- e.stopPropagation();
633
- return;
634
- }
635
- state.isPressed = true;
636
- state.isOverTarget = true;
637
- state.target = e.currentTarget;
638
- state.pointerType = $b5c62b033c25b96d$export$60278871457622de(e.nativeEvent) ? "virtual" : "mouse";
639
- let shouldStopPropagation = flushSync(() => triggerPressStart(e, state.pointerType));
640
- if (shouldStopPropagation) e.stopPropagation();
641
- if (preventFocusOnPress) {
642
- let dispose = $a92dc41f639950be$export$cabe61c495ee3649(e.target);
643
- if (dispose) state.disposables.push(dispose);
644
- }
645
- addGlobalListener($d447af545b77c9f1$export$b204af158042fbac(e.currentTarget), "mouseup", onMouseUp, false);
646
- };
647
- pressProps2.onMouseEnter = (e) => {
648
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
649
- let shouldStopPropagation = true;
650
- if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
651
- state.isOverTarget = true;
652
- shouldStopPropagation = triggerPressStart(e, state.pointerType);
653
- }
654
- if (shouldStopPropagation) e.stopPropagation();
655
- };
656
- pressProps2.onMouseLeave = (e) => {
657
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
658
- let shouldStopPropagation = true;
659
- if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
660
- state.isOverTarget = false;
661
- shouldStopPropagation = triggerPressEndEvent(e, state.pointerType, false);
662
- cancelOnPointerExit(e);
663
- }
664
- if (shouldStopPropagation) e.stopPropagation();
665
- };
666
- pressProps2.onMouseUp = (e) => {
667
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
668
- if (!state.ignoreEmulatedMouseEvents && e.button === 0 && !state.isPressed)
669
- triggerPressUpEvent(e, state.pointerType || "mouse");
670
- };
671
- let onMouseUp = (e) => {
672
- if (e.button !== 0) return;
673
- if (state.ignoreEmulatedMouseEvents) {
674
- state.ignoreEmulatedMouseEvents = false;
675
- return;
676
- }
677
- if (state.target && $23f2114a1b82827e$export$4282f70798064fe0(state.target, $23f2114a1b82827e$export$e58f029f0fbfdb29(e)) && state.pointerType != null) ;
678
- else
679
- cancelEvent(e);
680
- state.isOverTarget = false;
681
- };
682
- pressProps2.onTouchStart = (e) => {
683
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
684
- let touch = $d27d541f9569d26d$var$getTouchFromEvent(e.nativeEvent);
685
- if (!touch) return;
686
- state.activePointerId = touch.identifier;
687
- state.ignoreEmulatedMouseEvents = true;
688
- state.isOverTarget = true;
689
- state.isPressed = true;
690
- state.target = e.currentTarget;
691
- state.pointerType = "touch";
692
- if (!allowTextSelectionOnPress) $cbf007e418543821$export$16a4697467175487(state.target);
693
- let shouldStopPropagation = triggerPressStart($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);
694
- if (shouldStopPropagation) e.stopPropagation();
695
- addGlobalListener($d447af545b77c9f1$export$f21a1ffae260145a(e.currentTarget), "scroll", onScroll, true);
696
- };
697
- pressProps2.onTouchMove = (e) => {
698
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
699
- if (!state.isPressed) {
700
- e.stopPropagation();
701
- return;
702
- }
703
- let touch = $d27d541f9569d26d$var$getTouchById(e.nativeEvent, state.activePointerId);
704
- let shouldStopPropagation = true;
705
- if (touch && $d27d541f9569d26d$var$isOverTarget(touch, e.currentTarget)) {
706
- if (!state.isOverTarget && state.pointerType != null) {
707
- state.isOverTarget = true;
708
- shouldStopPropagation = triggerPressStart($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);
709
- }
710
- } else if (state.isOverTarget && state.pointerType != null) {
711
- state.isOverTarget = false;
712
- shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType, false);
713
- cancelOnPointerExit($d27d541f9569d26d$var$createTouchEvent(state.target, e));
714
- }
715
- if (shouldStopPropagation) e.stopPropagation();
716
- };
717
- pressProps2.onTouchEnd = (e) => {
718
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
719
- if (!state.isPressed) {
720
- e.stopPropagation();
721
- return;
722
- }
723
- let touch = $d27d541f9569d26d$var$getTouchById(e.nativeEvent, state.activePointerId);
724
- let shouldStopPropagation = true;
725
- if (touch && $d27d541f9569d26d$var$isOverTarget(touch, e.currentTarget) && state.pointerType != null) {
726
- triggerPressUpEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);
727
- shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType);
728
- triggerSyntheticClick(e.nativeEvent, state.target);
729
- } else if (state.isOverTarget && state.pointerType != null)
730
- shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e), state.pointerType, false);
731
- if (shouldStopPropagation) e.stopPropagation();
732
- state.isPressed = false;
733
- state.activePointerId = null;
734
- state.isOverTarget = false;
735
- state.ignoreEmulatedMouseEvents = true;
736
- if (state.target && !allowTextSelectionOnPress) $cbf007e418543821$export$b0d6fa1ab32e3295(state.target);
737
- removeAllGlobalListeners();
738
- };
739
- pressProps2.onTouchCancel = (e) => {
740
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
741
- e.stopPropagation();
742
- if (state.isPressed)
743
- cancelEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e));
744
- };
745
- let onScroll = (e) => {
746
- if (state.isPressed && $23f2114a1b82827e$export$4282f70798064fe0($23f2114a1b82827e$export$e58f029f0fbfdb29(e), state.target))
747
- cancelEvent({
748
- currentTarget: state.target,
749
- shiftKey: false,
750
- ctrlKey: false,
751
- metaKey: false,
752
- altKey: false
753
- });
754
- };
755
- pressProps2.onDragStart = (e) => {
756
- if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
757
- cancelEvent(e);
758
- };
759
- }
760
- return pressProps2;
761
- }, [
762
- addGlobalListener,
763
- isDisabled,
764
- preventFocusOnPress,
765
- removeAllGlobalListeners,
766
- allowTextSelectionOnPress,
767
- cancelOnPointerExit,
768
- triggerPressStart,
769
- triggerClick,
770
- triggerSyntheticClick
771
- ]);
772
- useEffect(() => {
773
- if (!domRef || process.env.NODE_ENV === "test") return;
774
- const ownerDocument = $d447af545b77c9f1$export$b204af158042fbac(domRef.current);
775
- if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById($d27d541f9569d26d$var$STYLE_ID)) return;
776
- const style = ownerDocument.createElement("style");
777
- style.id = $d27d541f9569d26d$var$STYLE_ID;
778
- let nonce = $2b2d34ff061957fb$export$2b85b721e524d74b(ownerDocument);
779
- if (nonce) style.nonce = nonce;
780
- style.textContent = `
781
- @layer {
782
- [${$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE}] {
783
- touch-action: pan-x pan-y pinch-zoom;
784
- }
785
- }
786
- `.trim();
787
- ownerDocument.head.prepend(style);
788
- }, [
789
- domRef
790
- ]);
791
- useEffect(() => {
792
- let state = ref.current;
793
- return () => {
794
- if (!allowTextSelectionOnPress) $cbf007e418543821$export$b0d6fa1ab32e3295(state.target ?? void 0);
795
- for (let dispose of state.disposables) dispose();
796
- state.disposables = [];
797
- };
798
- }, [
799
- allowTextSelectionOnPress
800
- ]);
801
- return {
802
- isPressed: isPressedProp || isPressed,
803
- pressProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, pressProps, {
804
- [$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE]: true
805
- })
806
- };
807
- }
808
- function $d27d541f9569d26d$var$isHTMLAnchorLink(target) {
809
- return target.tagName === "A" && target.hasAttribute("href");
810
- }
811
- function $d27d541f9569d26d$var$isValidKeyboardEvent(event, currentTarget) {
812
- const { key, code } = event;
813
- const element = currentTarget;
814
- const role = element.getAttribute("role");
815
- return (key === "Enter" || key === " " || key === "Spacebar" || code === "Space") && !(element instanceof $d447af545b77c9f1$export$f21a1ffae260145a(element).HTMLInputElement && !$d27d541f9569d26d$var$isValidInputKey(element, key) || element instanceof $d447af545b77c9f1$export$f21a1ffae260145a(element).HTMLTextAreaElement || element.isContentEditable) && // Links should only trigger with Enter key
816
- !((role === "link" || !role && $d27d541f9569d26d$var$isHTMLAnchorLink(element)) && key !== "Enter");
817
- }
818
- function $d27d541f9569d26d$var$getTouchFromEvent(event) {
819
- const { targetTouches } = event;
820
- if (targetTouches.length > 0) return targetTouches[0];
821
- return null;
822
- }
823
- function $d27d541f9569d26d$var$getTouchById(event, pointerId) {
824
- const changedTouches = event.changedTouches;
825
- for (let i = 0; i < changedTouches.length; i++) {
826
- const touch = changedTouches[i];
827
- if (touch.identifier === pointerId) return touch;
828
- }
829
- return null;
830
- }
831
- function $d27d541f9569d26d$var$createTouchEvent(target, e) {
832
- let clientX = 0;
833
- let clientY = 0;
834
- if (e.targetTouches && e.targetTouches.length === 1) {
835
- clientX = e.targetTouches[0].clientX;
836
- clientY = e.targetTouches[0].clientY;
837
- }
838
- return {
839
- currentTarget: target,
840
- shiftKey: e.shiftKey,
841
- ctrlKey: e.ctrlKey,
842
- metaKey: e.metaKey,
843
- altKey: e.altKey,
844
- clientX,
845
- clientY
846
- };
847
- }
848
- function $d27d541f9569d26d$var$createEvent(target, e) {
849
- let clientX = e.clientX;
850
- let clientY = e.clientY;
851
- return {
852
- currentTarget: target,
853
- shiftKey: e.shiftKey,
854
- ctrlKey: e.ctrlKey,
855
- metaKey: e.metaKey,
856
- altKey: e.altKey,
857
- clientX,
858
- clientY,
859
- key: e.key
860
- };
861
- }
862
- function $d27d541f9569d26d$var$getPointClientRect(point) {
863
- let offsetX = 0;
864
- let offsetY = 0;
865
- if (point.width !== void 0) offsetX = point.width / 2;
866
- else if (point.radiusX !== void 0) offsetX = point.radiusX;
867
- if (point.height !== void 0) offsetY = point.height / 2;
868
- else if (point.radiusY !== void 0) offsetY = point.radiusY;
869
- return {
870
- top: point.clientY - offsetY,
871
- right: point.clientX + offsetX,
872
- bottom: point.clientY + offsetY,
873
- left: point.clientX - offsetX
874
- };
875
- }
876
- function $d27d541f9569d26d$var$areRectanglesOverlapping(a, b2) {
877
- if (a.left > b2.right || b2.left > a.right) return false;
878
- if (a.top > b2.bottom || b2.top > a.bottom) return false;
879
- return true;
880
- }
881
- function $d27d541f9569d26d$var$isOverTarget(point, target) {
882
- let rect = target.getBoundingClientRect();
883
- let pointRect = $d27d541f9569d26d$var$getPointClientRect(point);
884
- return $d27d541f9569d26d$var$areRectanglesOverlapping(rect, pointRect);
885
- }
886
- function $d27d541f9569d26d$var$shouldPreventDefaultUp(target) {
887
- if (target instanceof HTMLInputElement) return false;
888
- if (target instanceof HTMLButtonElement) return target.type !== "submit" && target.type !== "reset";
889
- if ($d27d541f9569d26d$var$isHTMLAnchorLink(target)) return false;
890
- return true;
891
- }
892
- function $d27d541f9569d26d$var$shouldPreventDefaultKeyboard(target, key) {
893
- if (target instanceof HTMLInputElement) return !$d27d541f9569d26d$var$isValidInputKey(target, key);
894
- return $d27d541f9569d26d$var$shouldPreventDefaultUp(target);
895
- }
896
- const $d27d541f9569d26d$var$nonTextInputTypes = /* @__PURE__ */ new Set([
897
- "checkbox",
898
- "radio",
899
- "range",
900
- "color",
901
- "file",
902
- "image",
903
- "button",
904
- "submit",
905
- "reset"
906
- ]);
907
- function $d27d541f9569d26d$var$isValidInputKey(target, key) {
908
- return target.type === "checkbox" || target.type === "radio" ? key === " " : $d27d541f9569d26d$var$nonTextInputTypes.has(target.type);
909
- }
910
- function $ac4318a9c075bb9f$export$ea18c227d4417cc3(props, ref) {
911
- let { elementType = "button", isDisabled, onPress, onPressStart, onPressEnd, onPressUp, onPressChange, preventFocusOnPress, allowFocusWhenDisabled, onClick, href, target, rel, type = "button" } = props;
912
- let additionalProps;
913
- if (elementType === "button") additionalProps = {
914
- type,
915
- disabled: isDisabled,
916
- form: props.form,
917
- formAction: props.formAction,
918
- formEncType: props.formEncType,
919
- formMethod: props.formMethod,
920
- formNoValidate: props.formNoValidate,
921
- formTarget: props.formTarget,
922
- name: props.name,
923
- value: props.value
924
- };
925
- else additionalProps = {
926
- role: "button",
927
- href: elementType === "a" && !isDisabled ? href : void 0,
928
- target: elementType === "a" ? target : void 0,
929
- type: elementType === "input" ? type : void 0,
930
- disabled: elementType === "input" ? isDisabled : void 0,
931
- "aria-disabled": !isDisabled || elementType === "input" ? void 0 : isDisabled,
932
- rel: elementType === "a" ? rel : void 0
933
- };
934
- let { pressProps, isPressed } = $d27d541f9569d26d$export$45712eceda6fad21({
935
- onPressStart,
936
- onPressEnd,
937
- onPressChange,
938
- onPress,
939
- onPressUp,
940
- onClick,
941
- isDisabled,
942
- preventFocusOnPress,
943
- ref
944
- });
945
- let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c(props, ref);
946
- if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
947
- let buttonProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(focusableProps, pressProps, $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, {
948
- labelable: true
949
- }));
950
- return {
951
- isPressed,
952
- buttonProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(additionalProps, buttonProps, {
953
- "aria-haspopup": props["aria-haspopup"],
954
- "aria-expanded": props["aria-expanded"],
955
- "aria-controls": props["aria-controls"],
956
- "aria-pressed": props["aria-pressed"],
957
- "aria-current": props["aria-current"],
958
- "aria-disabled": props["aria-disabled"]
959
- })
960
- };
961
- }
962
- function $240e9101ba2842f5$export$7d15b64cf5a3a4c4(value, min = -Infinity, max = Infinity) {
963
- let newValue = Math.min(Math.max(value, min), max);
964
- return newValue;
965
- }
966
- function $240e9101ba2842f5$export$e1a7b8e69ef6c52f(value, step) {
967
- let roundedValue = value;
968
- let precision = 0;
969
- let stepString = step.toString();
970
- let eIndex = stepString.toLowerCase().indexOf("e-");
971
- if (eIndex > 0) precision = Math.abs(Math.floor(Math.log10(Math.abs(step)))) + eIndex;
972
- else {
973
- let pointIndex = stepString.indexOf(".");
974
- if (pointIndex >= 0) precision = stepString.length - pointIndex;
975
- }
976
- if (precision > 0) {
977
- let pow = Math.pow(10, precision);
978
- roundedValue = Math.round(roundedValue * pow) / pow;
979
- }
980
- return roundedValue;
981
- }
982
- function $240e9101ba2842f5$export$cb6e0bb50bc19463(value, min, max, step) {
983
- min = Number(min);
984
- max = Number(max);
985
- let remainder = (value - (isNaN(min) ? 0 : min)) % step;
986
- let snappedValue = $240e9101ba2842f5$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
987
- if (!isNaN(min)) {
988
- if (snappedValue < min) snappedValue = min;
989
- else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($240e9101ba2842f5$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;
990
- } else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($240e9101ba2842f5$export$e1a7b8e69ef6c52f(max / step, step)) * step;
991
- snappedValue = $240e9101ba2842f5$export$e1a7b8e69ef6c52f(snappedValue, step);
992
- return snappedValue;
993
- }
12
+ import { a as $240e9101ba2842f5$export$7d15b64cf5a3a4c4, e as $240e9101ba2842f5$export$cb6e0bb50bc19463, $ as $ea3928288112382f$export$439d29a4e110a164, d as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../chunks/Button2.js";
13
+ import { b as $64fa3d84918910a7$export$29f1550f4b0d4415, d as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, f as $64fa3d84918910a7$export$4d86445c2cf5e3, g as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, h as $64fa3d84918910a7$export$2881499e37b75b9a, c as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../chunks/filterDOMProps.js";
14
+ import { v as $48a7d519b337145d$export$4eaf04e54aa8eed6, t as $fe16bffc7a557bf0$export$7f54fc3180508a52, p as $d447af545b77c9f1$export$f21a1ffae260145a, d as $23f2114a1b82827e$export$e58f029f0fbfdb29, D as $0beb20c9744a2065$export$8467354a121f1b9f, C as $8f5a2122b0992be3$export$8397ddfc504fdb9a, c as $bbaa08b3cd72f041$export$9d1611c77c2fe928, K as $1969ac565cfec8d0$export$de79e2c695e052f3, b as $3274bf1495747a7b$export$5add1d006293d136, a as $3e6197669829fe11$export$40bfa8c7b0832715, e as $01b77f81d0f07f68$export$75b6ee27786ba447, B as $e969f22b6713ca4a$export$ae780daf29e6d456, A as $0c4a58759813079a$export$4e328f61c538687f, $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../chunks/Group.js";
15
+ import { a as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "../chunks/I18nProvider.js";
16
+ import { d as $cbf007e418543821$export$b0d6fa1ab32e3295, e as $cbf007e418543821$export$16a4697467175487, $ as $1dfb119a85e764e5$export$cc77c4ff7e8673c5 } from "../chunks/usePress.js";
17
+ import { b as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, $ as $d1116acdf220c2da$export$4c014de7c8940b4c } from "../chunks/useFocusable.js";
994
18
  function $1dfdc54e7eb53ba0$export$36da96379f79f245(props) {
995
19
  let { onMoveStart, onMove, onMoveEnd } = props;
996
20
  let state = useRef({
@@ -1208,47 +232,6 @@ function $1dfdc54e7eb53ba0$export$36da96379f79f245(props) {
1208
232
  moveProps
1209
233
  };
1210
234
  }
1211
- const $ea3928288112382f$var$styles = {
1212
- border: 0,
1213
- clip: "rect(0 0 0 0)",
1214
- clipPath: "inset(50%)",
1215
- height: "1px",
1216
- margin: "-1px",
1217
- overflow: "hidden",
1218
- padding: 0,
1219
- position: "absolute",
1220
- width: "1px",
1221
- whiteSpace: "nowrap"
1222
- };
1223
- function $ea3928288112382f$export$a966af930f325cab(props = {}) {
1224
- let { style, isFocusable } = props;
1225
- let [isFocused, setFocused] = useState(false);
1226
- let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({
1227
- isDisabled: !isFocusable,
1228
- onFocusWithinChange: (val) => setFocused(val)
1229
- });
1230
- let combinedStyles = useMemo(() => {
1231
- if (isFocused) return style;
1232
- else if (style) return {
1233
- ...$ea3928288112382f$var$styles,
1234
- ...style
1235
- };
1236
- else return $ea3928288112382f$var$styles;
1237
- }, [
1238
- isFocused
1239
- ]);
1240
- return {
1241
- visuallyHiddenProps: {
1242
- ...focusWithinProps,
1243
- style: combinedStyles
1244
- }
1245
- };
1246
- }
1247
- function $ea3928288112382f$export$439d29a4e110a164(props) {
1248
- let { children, elementType: Element = "div", isFocusable, style, ...otherProps } = props;
1249
- let { visuallyHiddenProps } = $ea3928288112382f$export$a966af930f325cab(props);
1250
- return /* @__PURE__ */ React__default.createElement(Element, $bbaa08b3cd72f041$export$9d1611c77c2fe928(otherProps, visuallyHiddenProps), children);
1251
- }
1252
235
  function $bd90acf18e792be6$export$b7a616150fdb9f44(options = {}) {
1253
236
  let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
1254
237
  return useMemo(() => new $1dfb119a85e764e5$export$cc77c4ff7e8673c5(locale, options), [
@@ -1550,93 +533,6 @@ function $4a5dd96ecb58ab11$export$8d15029008292ae(opts, state) {
1550
533
  isFocused
1551
534
  };
1552
535
  }
1553
- const $0393f8ab869a0f1a$export$e9f3bf65a26ce129 = /* @__PURE__ */ createContext(null);
1554
- const $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /* @__PURE__ */ createContext({});
1555
- const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function Button(props, ref) {
1556
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1);
1557
- props = $d2b4bc8c273e7be6$var$disablePendingProps(props);
1558
- let ctx = props;
1559
- let { isPending } = ctx;
1560
- let { buttonProps, isPressed } = $ac4318a9c075bb9f$export$ea18c227d4417cc3(props, ref);
1561
- let { focusProps, isFocused, isFocusVisible } = $0c4a58759813079a$export$4e328f61c538687f(props);
1562
- let { hoverProps, isHovered } = $e969f22b6713ca4a$export$ae780daf29e6d456({
1563
- ...props,
1564
- isDisabled: props.isDisabled || isPending
1565
- });
1566
- let renderValues = {
1567
- isHovered,
1568
- isPressed: (ctx.isPressed || isPressed) && !isPending,
1569
- isFocused,
1570
- isFocusVisible,
1571
- isDisabled: props.isDisabled || false,
1572
- isPending: isPending !== null && isPending !== void 0 ? isPending : false
1573
- };
1574
- let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
1575
- ...props,
1576
- values: renderValues,
1577
- defaultClassName: "react-aria-Button"
1578
- });
1579
- let buttonId = $390e54f620492c70$export$f680877a34711e37(buttonProps.id);
1580
- let progressId = $390e54f620492c70$export$f680877a34711e37();
1581
- let ariaLabelledby = buttonProps["aria-labelledby"];
1582
- if (isPending) {
1583
- if (ariaLabelledby) ariaLabelledby = `${ariaLabelledby} ${progressId}`;
1584
- else if (buttonProps["aria-label"]) ariaLabelledby = `${buttonId} ${progressId}`;
1585
- }
1586
- let wasPending = useRef(isPending);
1587
- useEffect(() => {
1588
- let message = {
1589
- "aria-labelledby": ariaLabelledby || buttonId
1590
- };
1591
- if (!wasPending.current && isFocused && isPending) $319e236875307eab$export$a9b970dcc4ae71a9(message, "assertive");
1592
- else if (wasPending.current && isFocused && !isPending) $319e236875307eab$export$a9b970dcc4ae71a9(message, "assertive");
1593
- wasPending.current = isPending;
1594
- }, [
1595
- isPending,
1596
- isFocused,
1597
- ariaLabelledby,
1598
- buttonId
1599
- ]);
1600
- let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
1601
- global: true
1602
- });
1603
- delete DOMProps.onClick;
1604
- return /* @__PURE__ */ React__default.createElement("button", {
1605
- ...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
1606
- // When the button is in a pending state, we want to stop implicit form submission (ie. when the user presses enter on a text input).
1607
- // We do this by changing the button's type to button.
1608
- type: buttonProps.type === "submit" && isPending ? "button" : buttonProps.type,
1609
- id: buttonId,
1610
- ref,
1611
- "aria-labelledby": ariaLabelledby,
1612
- slot: props.slot || void 0,
1613
- "aria-disabled": isPending ? "true" : buttonProps["aria-disabled"],
1614
- "data-disabled": props.isDisabled || void 0,
1615
- "data-pressed": renderValues.isPressed || void 0,
1616
- "data-hovered": isHovered || void 0,
1617
- "data-focused": isFocused || void 0,
1618
- "data-pending": isPending || void 0,
1619
- "data-focus-visible": isFocusVisible || void 0
1620
- }, /* @__PURE__ */ React__default.createElement($0393f8ab869a0f1a$export$e9f3bf65a26ce129.Provider, {
1621
- value: {
1622
- id: progressId
1623
- }
1624
- }, renderProps.children));
1625
- });
1626
- function $d2b4bc8c273e7be6$var$disablePendingProps(props) {
1627
- if (props.isPending) {
1628
- props.onPress = void 0;
1629
- props.onPressStart = void 0;
1630
- props.onPressEnd = void 0;
1631
- props.onPressChange = void 0;
1632
- props.onPressUp = void 0;
1633
- props.onKeyDown = void 0;
1634
- props.onKeyUp = void 0;
1635
- props.onClick = void 0;
1636
- props.href = void 0;
1637
- }
1638
- return props;
1639
- }
1640
536
  const $d806310b82f07e9d$var$DEFAULT_MIN_VALUE = 0;
1641
537
  const $d806310b82f07e9d$var$DEFAULT_MAX_VALUE = 100;
1642
538
  const $d806310b82f07e9d$var$DEFAULT_STEP_VALUE = 1;
@@ -1939,6 +835,12 @@ const $6f909507e6374d18$export$2c1b491743890dec = /* @__PURE__ */ forwardRef(fun
1939
835
  ]
1940
836
  }, renderProps.children));
1941
837
  });
838
+ const PauseFilled = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M9.5,7 C10.3284271,7 11,7.67157288 11,8.5 L11,15.5 C11,16.3284271 10.3284271,17 9.5,17 C8.67157288,17 8,16.3284271 8,15.5 L8,8.5 C8,7.67157288 8.67157288,7 9.5,7 Z M14.5,7 C15.3284271,7 16,7.67157288 16,8.5 L16,15.5 C16,16.3284271 15.3284271,17 14.5,17 C13.6715729,17 13,16.3284271 13,15.5 L13,8.5 C13,7.67157288 13.6715729,7 14.5,7 Z" }));
839
+ PauseFilled.displayName = "PauseFilled";
840
+ var PauseFilled_default = PauseFilled;
841
+ const PlayFilled = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M8.26582096,6.80664662 L16.1774936,11.1221044 C16.6623419,11.3865672 16.8409998,11.9940038 16.5765371,12.4788521 C16.4845917,12.6474186 16.3460601,12.7859502 16.1774936,12.8778956 L8.26582096,17.1933534 C7.78097262,17.4578161 7.17353598,17.2791583 6.90907325,16.7943099 C6.8289522,16.6474213 6.78696883,16.4827768 6.78696883,16.3154578 L6.78696883,7.68454219 C6.78696883,7.13225744 7.23468408,6.68454219 7.78696883,6.68454219 C7.95428782,6.68454219 8.11893236,6.72652556 8.26582096,6.80664662 Z" }));
842
+ PlayFilled.displayName = "PlayFilled";
843
+ var PlayFilled_default = PlayFilled;
1942
844
  var howler = {};
1943
845
  /*!
1944
846
  * howler.js v2.2.4