scorer-ui-kit 3.0.0-beta.7 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/README.md +14 -11
  2. package/dist/Alerts/atom/AlertBar.d.ts.map +1 -1
  3. package/dist/Alerts/atom/Notification.d.ts.map +1 -1
  4. package/dist/Alerts/atom/Tooltip.d.ts +1 -1
  5. package/dist/Alerts/atom/Tooltip.d.ts.map +1 -1
  6. package/dist/Alerts/index.d.ts +1 -1
  7. package/dist/Alerts/index.d.ts.map +1 -1
  8. package/dist/CameraPanels/atoms/MediaStream.d.ts.map +1 -1
  9. package/dist/CameraPanels/atoms/PanelMetaData.d.ts.map +1 -1
  10. package/dist/CameraPanels/index.d.ts +3 -3
  11. package/dist/CameraPanels/index.d.ts.map +1 -1
  12. package/dist/CameraPanels/molecules/CameraPanel.d.ts.map +1 -1
  13. package/dist/CameraPanels/organisms/CameraPanels.d.ts.map +1 -1
  14. package/dist/Filters/FilterTypes.d.ts +4 -4
  15. package/dist/Filters/FilterTypes.d.ts.map +1 -1
  16. package/dist/Filters/atoms/DateTimeBlock.d.ts.map +1 -1
  17. package/dist/Filters/atoms/FilterButton.d.ts.map +1 -1
  18. package/dist/Filters/atoms/FilterDropHandler.d.ts +2 -1
  19. package/dist/Filters/atoms/FilterDropHandler.d.ts.map +1 -1
  20. package/dist/Filters/atoms/FilterDropdownContainer.d.ts.map +1 -1
  21. package/dist/Filters/atoms/FooterControls.d.ts.map +1 -1
  22. package/dist/Filters/atoms/LoadingBox.d.ts.map +1 -1
  23. package/dist/Filters/atoms/ToggleButton.d.ts +2 -2
  24. package/dist/Filters/atoms/ToggleButton.d.ts.map +1 -1
  25. package/dist/Filters/index.d.ts +8 -8
  26. package/dist/Filters/index.d.ts.map +1 -1
  27. package/dist/Filters/molecules/DatePicker.d.ts +2 -2
  28. package/dist/Filters/molecules/DatePicker.d.ts.map +1 -1
  29. package/dist/Filters/molecules/DropdownDatePicker.d.ts.map +1 -1
  30. package/dist/Filters/molecules/FilterDropdown.d.ts +1 -1
  31. package/dist/Filters/molecules/FilterDropdown.d.ts.map +1 -1
  32. package/dist/Filters/molecules/FilterInputs.d.ts.map +1 -1
  33. package/dist/Filters/molecules/FilterLayout.d.ts.map +1 -1
  34. package/dist/Filters/molecules/FiltersResults.d.ts +1 -1
  35. package/dist/Filters/molecules/FiltersResults.d.ts.map +1 -1
  36. package/dist/Filters/molecules/SortDropdown.d.ts +1 -1
  37. package/dist/Filters/molecules/SortDropdown.d.ts.map +1 -1
  38. package/dist/Filters/organisms/FilterBar.d.ts +1 -1
  39. package/dist/Filters/organisms/FilterBar.d.ts.map +1 -1
  40. package/dist/Form/Form.d.ts.map +1 -1
  41. package/dist/Form/atoms/Button.d.ts +1 -1
  42. package/dist/Form/atoms/Button.d.ts.map +1 -1
  43. package/dist/Form/atoms/ButtonWithIcon.d.ts +1 -1
  44. package/dist/Form/atoms/ButtonWithIcon.d.ts.map +1 -1
  45. package/dist/Form/atoms/ButtonWithLoading.d.ts.map +1 -1
  46. package/dist/Form/atoms/Checkbox.d.ts.map +1 -1
  47. package/dist/Form/atoms/CropArea.d.ts.map +1 -1
  48. package/dist/Form/atoms/DropArea.d.ts.map +1 -1
  49. package/dist/Form/atoms/FilterOption.d.ts.map +1 -1
  50. package/dist/Form/atoms/IconButton.d.ts.map +1 -1
  51. package/dist/Form/atoms/Input.d.ts.map +1 -1
  52. package/dist/Form/atoms/InputFileButton.d.ts +1 -1
  53. package/dist/Form/atoms/InputFileButton.d.ts.map +1 -1
  54. package/dist/Form/atoms/Label.d.ts.map +1 -1
  55. package/dist/Form/atoms/RadioButton.d.ts.map +1 -1
  56. package/dist/Form/atoms/SelectField.d.ts.map +1 -1
  57. package/dist/Form/atoms/SliderInput.d.ts.map +1 -1
  58. package/dist/Form/atoms/SmallInput.d.ts.map +1 -1
  59. package/dist/Form/atoms/SplitButtonOption.d.ts.map +1 -1
  60. package/dist/Form/atoms/Switch.d.ts.map +1 -1
  61. package/dist/Form/atoms/TextArea.d.ts.map +1 -1
  62. package/dist/Form/index.d.ts +18 -18
  63. package/dist/Form/index.d.ts.map +1 -1
  64. package/dist/Form/molecules/ActionButtons.d.ts.map +1 -1
  65. package/dist/Form/molecules/ButtonsStack.d.ts.map +1 -1
  66. package/dist/Form/molecules/CropTool.d.ts.map +1 -1
  67. package/dist/Form/molecules/DurationSlider.d.ts.map +1 -1
  68. package/dist/Form/molecules/PasswordField.d.ts.map +1 -1
  69. package/dist/Form/molecules/PercentageSlider.d.ts +1 -1
  70. package/dist/Form/molecules/PercentageSlider.d.ts.map +1 -1
  71. package/dist/Form/molecules/SplitButton.d.ts +1 -1
  72. package/dist/Form/molecules/SplitButton.d.ts.map +1 -1
  73. package/dist/Form/molecules/TextAreaField.d.ts.map +1 -1
  74. package/dist/Form/molecules/TextField.d.ts +1 -1
  75. package/dist/Form/molecules/TextField.d.ts.map +1 -1
  76. package/dist/Form/organisms/AreaUploadManager.d.ts.map +1 -1
  77. package/dist/Form/organisms/AvatarUploader.d.ts.map +1 -1
  78. package/dist/Global/atoms/CloseButton.d.ts.map +1 -1
  79. package/dist/Global/atoms/ContextItem.d.ts +1 -1
  80. package/dist/Global/atoms/ContextItem.d.ts.map +1 -1
  81. package/dist/Global/atoms/DrawerBottomMenu.d.ts.map +1 -1
  82. package/dist/Global/atoms/Layout.d.ts.map +1 -1
  83. package/dist/Global/atoms/MobileLogoLink.d.ts.map +1 -1
  84. package/dist/Global/atoms/MobileNavbarContent.d.ts.map +1 -1
  85. package/dist/Global/atoms/NavigationItem.d.ts +1 -1
  86. package/dist/Global/atoms/NavigationItem.d.ts.map +1 -1
  87. package/dist/Global/atoms/NotificationItem.d.ts.map +1 -1
  88. package/dist/Global/atoms/TopBarBadge.d.ts.map +1 -1
  89. package/dist/Global/atoms/UserDrawerMeta.d.ts.map +1 -1
  90. package/dist/Global/index.d.ts +5 -5
  91. package/dist/Global/index.d.ts.map +1 -1
  92. package/dist/Global/molecules/MobileUserMenu.d.ts.map +1 -1
  93. package/dist/Global/molecules/NotificationsHistory.d.ts.map +1 -1
  94. package/dist/Global/molecules/Sidebar.d.ts.map +1 -1
  95. package/dist/Global/molecules/TopBar.d.ts.map +1 -1
  96. package/dist/Global/molecules/UserMenu.d.ts.map +1 -1
  97. package/dist/Global/organisms/MainMenu.d.ts.map +1 -1
  98. package/dist/Global/organisms/MobileMenu.d.ts.map +1 -1
  99. package/dist/Global/organisms/MobileNavbar.d.ts +1 -1
  100. package/dist/Global/organisms/MobileNavbar.d.ts.map +1 -1
  101. package/dist/Global/templates/GlobalUI.d.ts.map +1 -1
  102. package/dist/Icons/Icon.d.ts +2 -2
  103. package/dist/Icons/Icon.d.ts.map +1 -1
  104. package/dist/Icons/StatusIcon.d.ts.map +1 -1
  105. package/dist/Indicators/Spinner.d.ts.map +1 -1
  106. package/dist/Layouts/atoms/FullWidthContentBlock.d.ts.map +1 -1
  107. package/dist/Layouts/atoms/ResizeLine.d.ts.map +1 -1
  108. package/dist/Layouts/atoms/UtilityHeaderBack.d.ts.map +1 -1
  109. package/dist/Layouts/atoms/UtilityHeaderShare.d.ts.map +1 -1
  110. package/dist/Layouts/index.d.ts +5 -4
  111. package/dist/Layouts/index.d.ts.map +1 -1
  112. package/dist/Layouts/molecules/SplitLayout.d.ts +2 -2
  113. package/dist/Layouts/molecules/SplitLayout.d.ts.map +1 -1
  114. package/dist/Layouts/molecules/UtilityHeader.d.ts.map +1 -1
  115. package/dist/Layouts/organisms/ContentLayout.d.ts.map +1 -1
  116. package/dist/LineUI/Contexts.d.ts +3 -1
  117. package/dist/LineUI/Contexts.d.ts.map +1 -1
  118. package/dist/LineUI/Control.d.ts +1 -3
  119. package/dist/LineUI/Control.d.ts.map +1 -1
  120. package/dist/LineUI/HandleUnit.d.ts +2 -2
  121. package/dist/LineUI/HandleUnit.d.ts.map +1 -1
  122. package/dist/LineUI/LineReducer.d.ts.map +1 -1
  123. package/dist/LineUI/LineSet.d.ts +2 -2
  124. package/dist/LineUI/LineSet.d.ts.map +1 -1
  125. package/dist/LineUI/LineUI.d.ts.map +1 -1
  126. package/dist/LineUI/LineUIRTC.d.ts.map +1 -1
  127. package/dist/LineUI/LineUIVideo.d.ts +1 -18
  128. package/dist/LineUI/LineUIVideo.d.ts.map +1 -1
  129. package/dist/LineUI/LineUIVideoBase.d.ts +25 -0
  130. package/dist/LineUI/LineUIVideoBase.d.ts.map +1 -0
  131. package/dist/LineUI/LineUnit.d.ts +3 -3
  132. package/dist/LineUI/LineUnit.d.ts.map +1 -1
  133. package/dist/LineUI/index.d.ts +5 -5
  134. package/dist/LineUI/index.d.ts.map +1 -1
  135. package/dist/LineUIHls/LineUIVideoHLS.d.ts +5 -0
  136. package/dist/LineUIHls/LineUIVideoHLS.d.ts.map +1 -0
  137. package/dist/LineUIHls/index.d.ts +4 -0
  138. package/dist/LineUIHls/index.d.ts.map +1 -0
  139. package/dist/LineUIVideoBase-09sEI3pc.mjs +1240 -0
  140. package/dist/LineUIVideoBase-09sEI3pc.mjs.map +1 -0
  141. package/dist/LineUIVideoBase-Bs3WCeWl.js +1335 -0
  142. package/dist/LineUIVideoBase-Bs3WCeWl.js.map +1 -0
  143. package/dist/Misc/atoms/ActionsBar.d.ts.map +1 -1
  144. package/dist/Misc/atoms/BasicSearchInput.d.ts.map +1 -1
  145. package/dist/Misc/atoms/BigIconsSummary.d.ts.map +1 -1
  146. package/dist/Misc/atoms/MediaBox.d.ts.map +1 -1
  147. package/dist/Misc/atoms/Tag.d.ts.map +1 -1
  148. package/dist/Misc/index.d.ts +5 -5
  149. package/dist/Misc/index.d.ts.map +1 -1
  150. package/dist/Misc/molecules/DebouncedSearcher.d.ts.map +1 -1
  151. package/dist/Misc/molecules/Pagination.d.ts.map +1 -1
  152. package/dist/Misc/molecules/TagList.d.ts.map +1 -1
  153. package/dist/Modals/ConfirmationModal.d.ts.map +1 -1
  154. package/dist/Modals/Modal.d.ts.map +1 -1
  155. package/dist/Modals/index.d.ts +2 -2
  156. package/dist/Modals/index.d.ts.map +1 -1
  157. package/dist/Pages/atoms/IntroductionText.d.ts.map +1 -1
  158. package/dist/Pages/atoms/PageTitle.d.ts.map +1 -1
  159. package/dist/Pages/index.d.ts +3 -3
  160. package/dist/Pages/index.d.ts.map +1 -1
  161. package/dist/Pages/molecules/MultilineContent.d.ts.map +1 -1
  162. package/dist/Pages/molecules/PageHeader.d.ts.map +1 -1
  163. package/dist/Tables/atoms/TableHeaderTitle.d.ts.map +1 -1
  164. package/dist/Tables/atoms/TableRowThumbnail.d.ts.map +1 -1
  165. package/dist/Tables/atoms/TypeTableCell.d.ts +1 -1
  166. package/dist/Tables/atoms/TypeTableCell.d.ts.map +1 -1
  167. package/dist/Tables/atoms/TypeTableDeviceStatus.d.ts +1 -1
  168. package/dist/Tables/atoms/TypeTableDeviceStatus.d.ts.map +1 -1
  169. package/dist/Tables/atoms/TypeTableRow.d.ts +2 -2
  170. package/dist/Tables/atoms/TypeTableRow.d.ts.map +1 -1
  171. package/dist/Tables/index.d.ts +6 -6
  172. package/dist/Tables/index.d.ts.map +1 -1
  173. package/dist/Tables/molecules/EditCell.d.ts.map +1 -1
  174. package/dist/Tables/molecules/TypeTableHeader.d.ts.map +1 -1
  175. package/dist/Tables/organisms/TypeTable.d.ts.map +1 -1
  176. package/dist/Tabs/TabContent.d.ts.map +1 -1
  177. package/dist/Tabs/TabList.d.ts.map +1 -1
  178. package/dist/Tabs/Tabs.d.ts.map +1 -1
  179. package/dist/Tabs/atoms/MobileTab.d.ts.map +1 -1
  180. package/dist/Tabs/atoms/Tab.d.ts.map +1 -1
  181. package/dist/Tabs/atoms/TabWithIcon.d.ts.map +1 -1
  182. package/dist/Tabs/index.d.ts +5 -5
  183. package/dist/Tabs/index.d.ts.map +1 -1
  184. package/dist/Tabs/molecules/TabsWithIconBar.d.ts.map +1 -1
  185. package/dist/WebRTCClient.d.ts.map +1 -1
  186. package/dist/common/ContentPlaceholder.d.ts.map +1 -1
  187. package/dist/common/index.d.ts.map +1 -1
  188. package/dist/context/ModalContext.d.ts.map +1 -1
  189. package/dist/context/NotificationContext.d.ts +1 -1
  190. package/dist/context/NotificationContext.d.ts.map +1 -1
  191. package/dist/context/index.d.ts +2 -2
  192. package/dist/context/index.d.ts.map +1 -1
  193. package/dist/fonts/index.d.ts.map +1 -1
  194. package/dist/helpers/cropToolHelpers.d.ts +3 -3
  195. package/dist/helpers/cropToolHelpers.d.ts.map +1 -1
  196. package/dist/helpers/index.d.ts +3 -3
  197. package/dist/helpers/index.d.ts.map +1 -1
  198. package/dist/hls.js +70 -0
  199. package/dist/hls.js.map +1 -0
  200. package/dist/hls.modern.js +68 -0
  201. package/dist/hls.modern.js.map +1 -0
  202. package/dist/hooks/index.d.ts +9 -9
  203. package/dist/hooks/index.d.ts.map +1 -1
  204. package/dist/hooks/useBreakpoints.d.ts.map +1 -1
  205. package/dist/hooks/useClickOutside.d.ts +2 -1
  206. package/dist/hooks/useClickOutside.d.ts.map +1 -1
  207. package/dist/hooks/useCopyToClipboard.d.ts.map +1 -1
  208. package/dist/hooks/useInterval.d.ts.map +1 -1
  209. package/dist/hooks/useLocalStorage.d.ts.map +1 -1
  210. package/dist/hooks/useMediaModal.d.ts.map +1 -1
  211. package/dist/hooks/useMediaQuery.d.ts.map +1 -1
  212. package/dist/hooks/useMenu.d.ts.map +1 -1
  213. package/dist/hooks/useModal.d.ts.map +1 -1
  214. package/dist/hooks/usePoll.d.ts.map +1 -1
  215. package/dist/hooks/useThemeToggle.d.ts.map +1 -1
  216. package/dist/hooks/useTitle.d.ts.map +1 -1
  217. package/dist/index.d.ts +3 -3
  218. package/dist/index.d.ts.map +1 -1
  219. package/dist/index.js +11748 -13001
  220. package/dist/index.js.map +1 -1
  221. package/dist/index.modern.js +10660 -11886
  222. package/dist/index.modern.js.map +1 -1
  223. package/dist/styled.d.ts +7 -0
  224. package/dist/styled.d.ts.map +1 -0
  225. package/dist/svg/AvatarPlaceholder.d.ts +2 -2
  226. package/dist/svg/AvatarPlaceholder.d.ts.map +1 -1
  227. package/dist/svg/Invalid.d.ts +2 -2
  228. package/dist/svg/Invalid.d.ts.map +1 -1
  229. package/dist/svg/LogoMark.d.ts +2 -2
  230. package/dist/svg/LogoMark.d.ts.map +1 -1
  231. package/dist/svg/LogoText.d.ts +2 -2
  232. package/dist/svg/LogoText.d.ts.map +1 -1
  233. package/dist/svg/NoImage.d.ts.map +1 -1
  234. package/dist/svg/NoImageBig.d.ts +2 -2
  235. package/dist/svg/NoImageBig.d.ts.map +1 -1
  236. package/dist/svg/PasswordHide.d.ts +2 -2
  237. package/dist/svg/PasswordHide.d.ts.map +1 -1
  238. package/dist/svg/PasswordShow.d.ts +2 -2
  239. package/dist/svg/PasswordShow.d.ts.map +1 -1
  240. package/dist/svg/Required.d.ts +2 -2
  241. package/dist/svg/Required.d.ts.map +1 -1
  242. package/dist/svg/Success.d.ts +2 -2
  243. package/dist/svg/Success.d.ts.map +1 -1
  244. package/dist/svg/checkmark.d.ts.map +1 -1
  245. package/dist/svg/index.d.ts +4 -4
  246. package/dist/svg/index.d.ts.map +1 -1
  247. package/dist/svg/input.d.ts +1 -1
  248. package/dist/theme/ThemeHelpers.d.ts.map +1 -1
  249. package/dist/theme/ThemeVariables.d.ts.map +1 -1
  250. package/dist/theme/common.d.ts.map +1 -1
  251. package/dist/theme/index.d.ts.map +1 -1
  252. package/dist/theme/legacy/custom.d.ts.map +1 -1
  253. package/dist/theme/legacy/styles.d.ts.map +1 -1
  254. package/dist/theme/legacy/typography.d.ts +1 -1
  255. package/dist/theme/legacy/typography.d.ts.map +1 -1
  256. package/package.json +17 -12
@@ -0,0 +1,1335 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ let styled_components = require("styled-components");
24
+ styled_components = __toESM(styled_components);
25
+ let react = require("react");
26
+ let react_jsx_runtime = require("react/jsx-runtime");
27
+ let _future_standard_icons = require("@future-standard/icons");
28
+ let immutability_helper = require("immutability-helper");
29
+ immutability_helper = __toESM(immutability_helper);
30
+ //#region src/theme/common.tsx
31
+ var fontFamily = {
32
+ ui: "Monorale, Hiragino Sans, \"ヒラギノ角ゴシック\", Hiragino Kaku Gothic ProN, \"ヒラギノ角ゴ ProN W3\", Roboto, YuGothic, \"游ゴシック\", Meiryo, \"メイリオ\", sans-serif;",
33
+ data: "Lato, Hiragino Sans, \"ヒラギノ角ゴシック\", Hiragino Kaku Gothic ProN, \"ヒラギノ角ゴ ProN W3\", Roboto, YuGothic, \"游ゴシック\", Meiryo, \"メイリオ\", sans-serif;"
34
+ };
35
+ var dimensions = {
36
+ icons: { weights: {
37
+ light: 1,
38
+ regular: 1.5,
39
+ heavy: 3,
40
+ strong: 5
41
+ } },
42
+ form: {
43
+ button: {
44
+ xsmall: {
45
+ height: "20px",
46
+ padding: "0 10px",
47
+ iconSize: 12
48
+ },
49
+ small: {
50
+ height: "30px",
51
+ padding: "0 20px",
52
+ iconSize: 14
53
+ },
54
+ normal: {
55
+ height: "40px",
56
+ padding: "0 20px",
57
+ iconSize: 16
58
+ },
59
+ large: {
60
+ height: "60px",
61
+ padding: "0 20px",
62
+ iconSize: 20
63
+ }
64
+ },
65
+ input: { height: "40px" },
66
+ switch: {
67
+ outer: {
68
+ width: "38px",
69
+ height: "22px",
70
+ borderRadius: "11px"
71
+ },
72
+ inner: {
73
+ width: "16px",
74
+ height: "16px",
75
+ borderRadius: "8px"
76
+ },
77
+ positions: {
78
+ top: "2px",
79
+ off: "2px",
80
+ neutral: "10px",
81
+ locked: "2px",
82
+ on: "18px"
83
+ }
84
+ }
85
+ },
86
+ global: { mainMenu: { width: {
87
+ open: "280px",
88
+ closed: "80px"
89
+ } } }
90
+ };
91
+ var animation$1 = {
92
+ easing: { primary: {
93
+ inOut: "cubic-bezier(0.87, 0, 0.13, 1)",
94
+ out: "cubic-bezier(0.16, 1, 0.3, 1)",
95
+ in: "cubic-bezier(0.7, 0, 0.84, 0)"
96
+ } },
97
+ speed: {
98
+ faster: "0.085s",
99
+ fast: "0.175s",
100
+ normal: "0.35s",
101
+ slow: "0.7s",
102
+ slower: "1.4s",
103
+ slowest: "2.8s"
104
+ }
105
+ };
106
+ var deviceSize = {
107
+ small: 0,
108
+ medium: 768,
109
+ large: 1024,
110
+ xlarge: 1280,
111
+ xxlarge: 1536
112
+ };
113
+ var deviceMediaQuery = {
114
+ small: `(min-width: ${deviceSize.small}px)`,
115
+ medium: `(min-width: ${deviceSize.medium}px)`,
116
+ large: `(min-width: ${deviceSize.large}px)`,
117
+ xlarge: `(min-width: ${deviceSize.xlarge}px)`,
118
+ xxlarge: `(min-width: ${deviceSize.xxlarge}px)`
119
+ };
120
+ //#endregion
121
+ //#region src/Icons/Icon.tsx
122
+ var wrapperCss = styled_components.css`
123
+
124
+ line-height: 0;
125
+
126
+ svg {
127
+ overflow: visible;
128
+ vector-effect: non-scaling-stroke;
129
+
130
+ line, path, circle, ellipse, foreignObject, polygon, polyline, rect, text, textPath, tspan {
131
+ vector-effect: non-scaling-stroke;
132
+ transition: stroke var(--speed-normal) var(--easing-primary-out);
133
+ }
134
+ }
135
+ `;
136
+ var IconWrapper = styled_components.default.div`
137
+ ${wrapperCss};
138
+ `;
139
+ var IconWrapperForSVG = styled_components.default.g`
140
+ ${wrapperCss};
141
+ `;
142
+ var Icon = ({ icon, size = 24, weight = "regular", color = "grey-12", forSvgUsage = false }) => {
143
+ const iconWeight = dimensions.icons.weights[weight];
144
+ const IconSVG = _future_standard_icons.IconSVGs[icon];
145
+ return IconSVG != null ? forSvgUsage ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconWrapperForSVG, { children: IconSVG({
146
+ size,
147
+ weight: iconWeight,
148
+ color: `var(--${color}, var(--grey-12))`
149
+ }) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconWrapper, { children: IconSVG({
150
+ size,
151
+ weight: iconWeight,
152
+ color: `var(--${color}, var(--grey-12))`
153
+ }) }) : null;
154
+ };
155
+ //#endregion
156
+ //#region src/Indicators/Spinner.tsx
157
+ var circumference = (radius) => {
158
+ return 2 * Math.PI * radius;
159
+ };
160
+ var animation = (radius) => {
161
+ const c = circumference(radius);
162
+ return styled_components.keyframes`
163
+ 0% {
164
+ stroke-dashoffset: -${c * .85};
165
+ }
166
+ 50% {
167
+ stroke-dashoffset: -${c * .5};
168
+ }
169
+ 100% {
170
+ stroke-dashoffset: -${c * .85};
171
+ }
172
+ `;
173
+ };
174
+ var rotate = styled_components.keyframes`
175
+ 0% {
176
+ transform: rotate(0deg);
177
+ }
178
+ 100% {
179
+ transform: rotate(360deg);
180
+ }
181
+ `;
182
+ var BaseCircle = styled_components.default.circle`
183
+ stroke: ${({ $styling, $customColor }) => $customColor ? $customColor : `var(--spinner-${$styling}-base, var(--grey-a8))`};
184
+ fill: none;
185
+ `;
186
+ var RotatingCircle = styled_components.default.circle`
187
+ stroke: ${({ $styling, $customColor }) => $customColor ? $customColor : `var(--spinner-${$styling}-top, var(--white-1))`};
188
+ fill: none;
189
+ stroke-dasharray: ${({ r }) => circumference(r)};
190
+ stroke-dashoffset: ${({ r }) => 2 * Math.PI * r / 2};
191
+ animation:
192
+ ${({ r }) => animation(r)} 4s linear infinite,
193
+ ${rotate} 1s linear infinite;
194
+ stroke-linecap: round;
195
+ `;
196
+ var getButtonDesign = (value) => {
197
+ if (value === "primary" || value === "secondary" || value === "warning") return value;
198
+ else if (value === "danger") {
199
+ console.warn("Button.tsx - Warning, the design prop value `danger` is being deprecated. Use `warning` instead.");
200
+ return "danger";
201
+ }
202
+ return "simple";
203
+ };
204
+ var sizeGuide = {
205
+ xsmall: 12,
206
+ small: 16,
207
+ medium: 24,
208
+ large: 36,
209
+ xlarge: 48
210
+ };
211
+ var Spinner = ({ size = "medium", styling = "primary", custom = {} }) => {
212
+ const { baseColor, topColor } = custom;
213
+ const sizeVal = custom?.size ? custom.size : sizeGuide[size];
214
+ const strokeWidth = sizeVal / 5.333;
215
+ const circleRadius = sizeVal / 2 - strokeWidth / 2;
216
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
217
+ viewBox: `-${sizeVal / 2} -${sizeVal / 2} ${sizeVal} ${sizeVal}`,
218
+ width: sizeVal,
219
+ height: sizeVal,
220
+ xmlns: "http://www.w3.org/2000/svg",
221
+ role: "img",
222
+ "aria-label": "Loading",
223
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BaseCircle, {
224
+ cx: "0",
225
+ cy: "0",
226
+ r: circleRadius,
227
+ strokeWidth,
228
+ $styling: getButtonDesign(styling),
229
+ $customColor: baseColor
230
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RotatingCircle, {
231
+ cx: "0",
232
+ cy: "0",
233
+ r: circleRadius,
234
+ strokeWidth,
235
+ $styling: getButtonDesign(styling),
236
+ $customColor: topColor
237
+ })]
238
+ });
239
+ };
240
+ //#endregion
241
+ //#region src/LineUI/Contexts.tsx
242
+ var LineSetContext = (0, react.createContext)({});
243
+ //#endregion
244
+ //#region src/LineUI/HandleUnit.tsx
245
+ var HandleTouchReactionKeyframes = styled_components.keyframes`
246
+ 0% {
247
+ transform: scale(1);
248
+ }
249
+
250
+ 75% {
251
+ transform: scale(3);
252
+ }
253
+
254
+ 100% {
255
+ transform: scale(1.75);
256
+ }
257
+ `;
258
+ var HandleMouseReactionKeyframes = styled_components.keyframes`
259
+ 0% {
260
+ transform: scale(1);
261
+ }
262
+
263
+ 75% {
264
+ transform: scale(0);
265
+ }
266
+
267
+ 100% {
268
+ transform: scale(0.5);
269
+ }
270
+ `;
271
+ var HandleBase = styled_components.default.svg`
272
+ touch-action: none;
273
+ user-select: none;
274
+ overflow: visible;
275
+ cursor: pointer;
276
+ fill: ${({ theme, $styling }) => theme.custom.lines[$styling].handleBase.fill};
277
+ appearance: none;
278
+ `;
279
+ var HandleRingLayer = styled_components.default.circle`
280
+ fill: none;
281
+ stroke: ${({ theme, $styling }) => theme.custom.lines[$styling].handleRingLayer.stroke};
282
+ mask: url(#${(props) => props.$maskID});
283
+ `;
284
+ var HandleReactiveGroup = styled_components.default.g`
285
+ opacity: 0.65;
286
+ cursor: pointer;
287
+ transform: scale(1);
288
+
289
+ ${(props) => props.$touchDragging && styled_components.css`
290
+ animation: ${HandleTouchReactionKeyframes} 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275) 1;
291
+ `}
292
+
293
+ ${(props) => props.$mouseDragging && styled_components.css`
294
+ animation: ${HandleMouseReactionKeyframes} 0.25s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275) 1;
295
+ `}
296
+
297
+ `;
298
+ var HandleReactiveFill = styled_components.default.circle`
299
+ mix-blend-mode: multiply;
300
+ fill: ${({ theme, $styling }) => theme.custom.lines[$styling].handleReactiveFill.fill};
301
+ stroke: none;
302
+ `;
303
+ var HandleReactiveRing = styled_components.default.circle`
304
+ fill: none;
305
+ stroke: ${({ theme, $styling }) => theme.custom.lines[$styling].handleReactiveRing.stroke};
306
+ `;
307
+ var HandleContrastLayer = styled_components.default.circle`
308
+ overflow: visible;
309
+ mix-blend-mode: multiply;
310
+ fill: none;
311
+ stroke: ${({ theme, $styling }) => theme.custom.lines[$styling].handleContrastLayer.stroke};
312
+ `;
313
+ var HandleShadowLayer = styled_components.default.circle`
314
+ mix-blend-mode: multiply;
315
+ fill: url(#${(props) => props.$fillID});
316
+ `;
317
+ var GrabHandleIndexGroup$1 = styled_components.default.g`
318
+ opacity: 0;
319
+ pointer-events: none;
320
+ ${(props) => props.$showIndex && styled_components.css`
321
+ opacity: 1;
322
+ `};
323
+
324
+ `;
325
+ var StopStart = styled_components.default.stop`
326
+ stop-color: ${({ theme, $styling }) => theme.custom.lines[$styling].stopStart.stopColor};
327
+ `;
328
+ var StopEnd = styled_components.default.stop`
329
+ stop-color: ${({ theme, $styling }) => theme.custom.lines[$styling].stopEnd.stopColor};
330
+ `;
331
+ var GrabHandleIndexText$1 = styled_components.default.text`
332
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
333
+ stroke: ${({ theme, $styling }) => theme.custom.lines[$styling].grabHandleText.stroke};
334
+ text-align: center;
335
+
336
+ font-weight: bold;
337
+ transition: opacity 250ms ease;
338
+ pointer-events: none;
339
+
340
+
341
+ `;
342
+ var IconGroup = styled_components.default.g`
343
+
344
+ `;
345
+ var HandleUnit = (props) => {
346
+ const { index, useAngles, angle, unit, size, lineSetId, x, y, moveCallback, moveEndCB = () => {}, Icon, rotate = 0, options, readOnlyHandle = false, styling = "primary" } = props;
347
+ const handleInstance = (0, react.useRef)(null);
348
+ const [touchDragging, setTouchDragging] = (0, react.useState)(false);
349
+ const [mouseDragging, setMouseDragging] = (0, react.useState)(false);
350
+ const [touchIndex, setTouchIndex] = (0, react.useState)(null);
351
+ /** --- Toucher Events Section --- */
352
+ const handleTouchStart = (0, react.useCallback)((e) => {
353
+ e.preventDefault();
354
+ if (readOnlyHandle) return;
355
+ for (let i = 0; i < e.touches.length; i++) {
356
+ const touchTarget = e.touches[i].target;
357
+ if (touchTarget.parentNode?.parentElement === handleInstance.current || touchTarget.parentNode?.parentElement?.parentElement) {
358
+ setTouchDragging(true);
359
+ setTouchIndex(i);
360
+ }
361
+ }
362
+ }, [readOnlyHandle]);
363
+ const handleTouchEnd = (0, react.useCallback)(() => {
364
+ if (readOnlyHandle) return;
365
+ setTouchDragging(false);
366
+ setTouchIndex(null);
367
+ moveEndCB();
368
+ }, [moveEndCB, readOnlyHandle]);
369
+ const handleTouchMove = (0, react.useCallback)((e) => {
370
+ if (readOnlyHandle) return;
371
+ for (let i = 0; i < e.touches.length; i++) if (i === touchIndex) moveCallback({
372
+ x: e.touches[i].pageX,
373
+ y: e.touches[i].pageY
374
+ }, index);
375
+ }, [
376
+ index,
377
+ moveCallback,
378
+ readOnlyHandle,
379
+ touchIndex
380
+ ]);
381
+ /** --- Mouse Events Section --- */
382
+ const handleMouseMoveRef = (0, react.useRef)(null);
383
+ const handleMouseUpRef = (0, react.useRef)(null);
384
+ const cleanupMouseListeners = (0, react.useCallback)(() => {
385
+ if (handleMouseMoveRef.current) {
386
+ window.removeEventListener("mousemove", handleMouseMoveRef.current);
387
+ handleMouseMoveRef.current = null;
388
+ }
389
+ if (handleMouseUpRef.current) {
390
+ window.removeEventListener("mouseup", handleMouseUpRef.current);
391
+ handleMouseUpRef.current = null;
392
+ }
393
+ }, []);
394
+ const handleMouseMove = (0, react.useCallback)((e) => {
395
+ e.preventDefault();
396
+ if (readOnlyHandle) return;
397
+ moveCallback({
398
+ x: e.pageX,
399
+ y: e.pageY
400
+ }, index);
401
+ }, [
402
+ index,
403
+ moveCallback,
404
+ readOnlyHandle
405
+ ]);
406
+ const handleMouseUp = (0, react.useCallback)((e) => {
407
+ e.preventDefault();
408
+ if (readOnlyHandle) return;
409
+ setMouseDragging(false);
410
+ cleanupMouseListeners();
411
+ moveCallback({
412
+ x: e.pageX,
413
+ y: e.pageY
414
+ }, index);
415
+ setTimeout(moveEndCB);
416
+ }, [
417
+ cleanupMouseListeners,
418
+ index,
419
+ moveCallback,
420
+ moveEndCB,
421
+ readOnlyHandle
422
+ ]);
423
+ const handleMouseDown = (0, react.useCallback)((e) => {
424
+ e.preventDefault();
425
+ if (readOnlyHandle) return;
426
+ cleanupMouseListeners();
427
+ setMouseDragging(true);
428
+ handleMouseMoveRef.current = handleMouseMove;
429
+ handleMouseUpRef.current = handleMouseUp;
430
+ window.addEventListener("mousemove", handleMouseMove);
431
+ window.addEventListener("mouseup", handleMouseUp);
432
+ }, [
433
+ cleanupMouseListeners,
434
+ handleMouseMove,
435
+ handleMouseUp,
436
+ readOnlyHandle
437
+ ]);
438
+ (0, react.useEffect)(() => {
439
+ return cleanupMouseListeners;
440
+ }, [cleanupMouseListeners]);
441
+ const maskID = useAngles ? `mask-${lineSetId}-${index}` : "";
442
+ const shadowGradientID = `shadowGradient-${lineSetId}-${index}`;
443
+ const { showPointHandle = true, showPointLabel = false, pointIndexOffset } = options;
444
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HandleBase, {
445
+ ref: handleInstance,
446
+ $styling: styling,
447
+ x,
448
+ y,
449
+ $mouseDragging: mouseDragging,
450
+ onTouchStart: handleTouchStart,
451
+ onTouchEnd: handleTouchEnd,
452
+ onTouchMove: handleTouchMove,
453
+ onMouseDown: handleMouseDown,
454
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("defs", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("mask", {
455
+ id: maskID,
456
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
457
+ width: "100%",
458
+ height: "100%",
459
+ x: "-50%",
460
+ y: "-50%",
461
+ fill: "white"
462
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
463
+ width: size / 3,
464
+ height: size / .9,
465
+ x: -(size / 3 / 2),
466
+ y: -(size / .9 + 5),
467
+ fill: "black",
468
+ transform: `rotate(${angle || 0} 0 0)`
469
+ })]
470
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("radialGradient", {
471
+ id: shadowGradientID,
472
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StopStart, {
473
+ $styling: styling,
474
+ offset: "0%"
475
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StopEnd, {
476
+ $styling: styling,
477
+ offset: "80%"
478
+ })]
479
+ })] }), Icon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconGroup, {
480
+ transform: `scale(${unit * 1.5}) translate(-21 -21) rotate(${rotate}, 21, 21 )`,
481
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
482
+ height: "42",
483
+ width: "42"
484
+ })
485
+ }) : showPointHandle && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
486
+ transform: `scale(${unit})`,
487
+ children: [
488
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HandleShadowLayer, {
489
+ r: size * 1,
490
+ $fillID: shadowGradientID
491
+ }),
492
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HandleContrastLayer, {
493
+ $styling: styling,
494
+ r: size / 2.4,
495
+ strokeWidth: size / 3
496
+ }),
497
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HandleReactiveGroup, {
498
+ $touchDragging: touchDragging,
499
+ $mouseDragging: mouseDragging,
500
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HandleReactiveFill, {
501
+ $styling: styling,
502
+ r: size / 1.8
503
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HandleReactiveRing, {
504
+ $styling: styling,
505
+ r: size / 2.25,
506
+ strokeWidth: size / 3
507
+ })]
508
+ }),
509
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HandleRingLayer, {
510
+ $styling: styling,
511
+ r: size / 2,
512
+ strokeWidth: size / 6,
513
+ $maskID: maskID
514
+ }),
515
+ showPointLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GrabHandleIndexGroup$1, {
516
+ $showIndex: true,
517
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GrabHandleIndexText$1, {
518
+ $styling: styling,
519
+ transform: "translate(-5,6)",
520
+ fontSize: "20px",
521
+ $showIndex: true,
522
+ children: index + pointIndexOffset
523
+ })
524
+ })
525
+ ]
526
+ })]
527
+ });
528
+ };
529
+ //#endregion
530
+ //#region src/LineUI/LineUnit.tsx
531
+ var ContrastLine = styled_components.default.line`
532
+ stroke: ${({ theme, $styling }) => theme.custom.lines[$styling].contrastLine.stroke};
533
+ mix-blend-mode: multiply;
534
+ stroke-width: ${({ $lineClickSensing }) => $lineClickSensing}px;
535
+ stroke-opacity: ${({ $showLineBorder }) => $showLineBorder ? "0.35" : "0"};
536
+ cursor: pointer;
537
+ `;
538
+ var HighlightLine = styled_components.default.line`
539
+ pointer-events: none;
540
+ stroke: ${({ theme, $styling }) => theme.custom.lines[$styling].highlightLineBorder.stroke};
541
+ `;
542
+ var GrabHandle = styled_components.default.circle`
543
+ fill: ${({ theme, $styling }) => theme.custom.lines[$styling].grabHandle.fill};
544
+ stroke: ${({ theme, $styling }) => theme.custom.lines[$styling].grabHandle.stroke};
545
+ opacity: 1;
546
+ transition: opacity 250ms ease;
547
+ cursor: grab;
548
+
549
+ ${(props) => props.$hide && styled_components.css`
550
+ pointer-events: none;
551
+ opacity: 0;
552
+ `};
553
+ `;
554
+ var GrabHandleIndexGroup = styled_components.default.g`
555
+ opacity: 0;
556
+ pointer-events: none;
557
+ ${(props) => props.$showIndex && styled_components.css`
558
+ opacity: 1;
559
+ `};
560
+
561
+ `;
562
+ var GrabHandleIndexText = styled_components.default.text`
563
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
564
+ text-align: center;
565
+ fill: ${({ theme, $styling }) => theme.custom.lines[$styling].grabHandleText.stroke};
566
+ font-weight: bold;
567
+ transition: opacity 250ms ease;
568
+ pointer-events: none;
569
+ `;
570
+ var LabelText = styled_components.default.text`
571
+ text-align: center;
572
+ fill: ${({ theme, $styling }) => theme.custom.lines[$styling].label.fill};
573
+ font-weight: bold;
574
+ transition: opacity 250ms ease;
575
+ cursor: pointer;
576
+ ${({ $showLabelShadow }) => $showLabelShadow && styled_components.css`
577
+ text-shadow:
578
+ -1px -1px 0 #000,
579
+ 1px -1px 0 #000,
580
+ -1px 1px 0 #000,
581
+ 1px 1px 0 #000;
582
+ `}
583
+ `;
584
+ var GrabHandleContrast = (0, styled_components.default)(GrabHandle)`
585
+ fill: none;
586
+ stroke: ${({ theme, $styling }) => theme.custom.lines[$styling].grabHandleContrast.stroke};
587
+ `;
588
+ var GrabHandleGroup = styled_components.default.g`
589
+
590
+ ${GrabHandle}, ${GrabHandleContrast} {
591
+ transition: r 250ms ease;
592
+ }
593
+
594
+ ${(props) => props.$showIndex && styled_components.css`
595
+ ${GrabHandle}, ${GrabHandleContrast} {
596
+ pointer-events: none;
597
+ r: ${props.$originalRadius * 1.75};
598
+ }
599
+ `};
600
+ `;
601
+ var DMCircle = styled_components.default.circle`
602
+ fill: hsla(203, 100%, 35%, 0.49);
603
+ cursor: pointer;
604
+ `;
605
+ var IconFormat = (0, styled_components.default)(Icon)`
606
+ cursor: pointer;
607
+ `;
608
+ var LineUnit = (props) => {
609
+ const { x1, y1, x2, y2, unit, lineMoveCallback, lineMoveStartCallback, options, lineSetId, label, styling = "primary", moveEndCB = () => {}, lineClickCallback = () => {}, showSmallDirectionMark = false, overrideShowMoveHandle = true } = props;
610
+ const { handleFinderActive, revealSetIndex, showMoveHandle, setIndexOffset, showDirectionMark, showLabelShadow = false } = options;
611
+ const [showLineBorder, setShowLineBorder] = (0, react.useState)();
612
+ const hideGrabHandle = !showMoveHandle || !overrideShowMoveHandle;
613
+ const lineClickSensing = parseInt(props.lineClickSensingBorder, 10);
614
+ /** --- Toucher Events Section --- */
615
+ const grabTouchMove = (e) => {
616
+ for (let i = 0; i < e.touches.length; i++) lineMoveCallback({
617
+ x: e.touches[i].pageX,
618
+ y: e.touches[i].pageY
619
+ });
620
+ moveEndCB();
621
+ };
622
+ const grabTouchStart = (e) => {
623
+ for (let i = 0; i < e.touches.length; i++) lineMoveStartCallback({
624
+ x: e.touches[i].pageX,
625
+ y: e.touches[i].pageY
626
+ });
627
+ };
628
+ /** --- Mouse Events Section --- */
629
+ const mouseMoveRef = (0, react.useRef)(null);
630
+ const mouseUpRef = (0, react.useRef)(null);
631
+ const cleanupMouseListeners = (0, react.useCallback)(() => {
632
+ if (mouseMoveRef.current) {
633
+ window.removeEventListener("mousemove", mouseMoveRef.current);
634
+ mouseMoveRef.current = null;
635
+ }
636
+ if (mouseUpRef.current) {
637
+ window.removeEventListener("mouseup", mouseUpRef.current);
638
+ mouseUpRef.current = null;
639
+ }
640
+ }, []);
641
+ const handleMouseMove = (0, react.useCallback)((e) => {
642
+ lineMoveCallback({
643
+ x: e.pageX,
644
+ y: e.pageY
645
+ });
646
+ e.preventDefault();
647
+ }, [lineMoveCallback]);
648
+ const handleMouseUp = (0, react.useCallback)((e) => {
649
+ cleanupMouseListeners();
650
+ lineMoveCallback({
651
+ x: e.pageX,
652
+ y: e.pageY
653
+ });
654
+ moveEndCB();
655
+ e.preventDefault();
656
+ }, [
657
+ cleanupMouseListeners,
658
+ lineMoveCallback,
659
+ moveEndCB
660
+ ]);
661
+ const handleMouseDown = (0, react.useCallback)((e) => {
662
+ cleanupMouseListeners();
663
+ lineMoveStartCallback({
664
+ x: e.pageX,
665
+ y: e.pageY
666
+ });
667
+ mouseMoveRef.current = handleMouseMove;
668
+ mouseUpRef.current = handleMouseUp;
669
+ window.addEventListener("mousemove", handleMouseMove);
670
+ window.addEventListener("mouseup", handleMouseUp);
671
+ e.preventDefault();
672
+ }, [
673
+ cleanupMouseListeners,
674
+ lineMoveStartCallback,
675
+ handleMouseMove,
676
+ handleMouseUp
677
+ ]);
678
+ (0, react.useEffect)(() => {
679
+ return cleanupMouseListeners;
680
+ }, [cleanupMouseListeners]);
681
+ const midpoint = {
682
+ x: (x2 + x1) / 2,
683
+ y: (y2 + y1) / 2
684
+ };
685
+ const directionMarkCoordinate = () => {
686
+ const angle = Math.atan2(y2 - y1, x2 - x1);
687
+ const angleMode = Math.PI / 2 - angle;
688
+ const x = midpoint.x + Math.sin(angleMode) - 5;
689
+ const y = midpoint.y + Math.cos(angleMode);
690
+ const rotate = 180 / Math.PI * Math.atan2(y2 - y1, x2 - x1);
691
+ return {
692
+ x,
693
+ y,
694
+ rotate,
695
+ labelRotate: -rotate
696
+ };
697
+ };
698
+ const getDirectionMarkLine = () => {
699
+ const dmCoordinate = directionMarkCoordinate();
700
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
701
+ transform: `translate(${dmCoordinate.x},${dmCoordinate.y}) rotate(${dmCoordinate.rotate}) scale(${unit * 1})`,
702
+ style: { cursor: "pointer" },
703
+ children: [
704
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
705
+ onClick: () => lineClickCallback(lineSetId),
706
+ transform: "translate(-3,-30) scale(0.8)",
707
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DMCircle, {
708
+ r: 12,
709
+ cx: 6,
710
+ cy: 7
711
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconFormat, {
712
+ color: "inverse",
713
+ icon: "Up",
714
+ size: 12,
715
+ weight: "heavy",
716
+ forSvgUsage: true
717
+ })]
718
+ }),
719
+ showSmallDirectionMark && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
720
+ onClick: () => lineClickCallback(lineSetId),
721
+ transform: "translate(5,25) rotate(-180) scale(0.8)",
722
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DMCircle, {
723
+ r: 8,
724
+ cx: 3.5,
725
+ cy: 4.5
726
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconFormat, {
727
+ color: "inverse",
728
+ icon: "Up",
729
+ size: 7,
730
+ weight: "heavy",
731
+ forSvgUsage: true
732
+ })]
733
+ }),
734
+ label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("g", {
735
+ transform: `translate(0,${showSmallDirectionMark ? 45 : 30}) rotate(${dmCoordinate.labelRotate})`,
736
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LabelText, {
737
+ onClick: () => lineClickCallback(lineSetId),
738
+ textAnchor: showSmallDirectionMark ? dmCoordinate.labelRotate < 0 ? "end" : "start" : "middle",
739
+ dominantBaseline: "middle",
740
+ $styling: styling,
741
+ fontSize: `14px`,
742
+ x: 0,
743
+ y: 0,
744
+ $showIndex: revealSetIndex || handleFinderActive,
745
+ $showLabelShadow: showLabelShadow,
746
+ children: label
747
+ })
748
+ })
749
+ ]
750
+ });
751
+ };
752
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", { children: [
753
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContrastLine, {
754
+ onMouseOver: (0, react.useCallback)(() => {
755
+ if (props.hasClickSensingBorder) setShowLineBorder(true);
756
+ }, [props.hasClickSensingBorder]),
757
+ onMouseOut: (0, react.useCallback)(() => {
758
+ if (props.hasClickSensingBorder) setShowLineBorder(false);
759
+ }, [props.hasClickSensingBorder]),
760
+ $lineClickSensing: lineClickSensing,
761
+ $showLineBorder: showLineBorder,
762
+ onClick: () => lineClickCallback(lineSetId),
763
+ $styling: styling,
764
+ strokeLinecap: "round",
765
+ x1,
766
+ y1,
767
+ x2,
768
+ y2,
769
+ strokeWidth: 4 * unit
770
+ }),
771
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HighlightLine, {
772
+ $styling: styling,
773
+ x1,
774
+ y1,
775
+ x2,
776
+ y2,
777
+ strokeWidth: 2 * unit
778
+ }),
779
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(GrabHandleGroup, {
780
+ $styling: styling,
781
+ $showIndex: handleFinderActive && revealSetIndex,
782
+ $originalRadius: 8 * unit,
783
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(GrabHandleContrast, {
784
+ $styling: styling,
785
+ r: 8 * unit,
786
+ strokeWidth: 4 * unit,
787
+ cx: midpoint.x,
788
+ cy: midpoint.y,
789
+ $hide: hideGrabHandle
790
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GrabHandle, {
791
+ $styling: styling,
792
+ textAnchor: "middle",
793
+ r: 8 * unit,
794
+ strokeWidth: 1 * unit,
795
+ cx: midpoint.x,
796
+ cy: midpoint.y,
797
+ $hide: hideGrabHandle,
798
+ onTouchMove: grabTouchMove,
799
+ onTouchStart: grabTouchStart,
800
+ onMouseDown: handleMouseDown
801
+ })]
802
+ }),
803
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GrabHandleIndexGroup, {
804
+ $showIndex: !hideGrabHandle && (handleFinderActive || revealSetIndex),
805
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GrabHandleIndexText, {
806
+ $styling: styling,
807
+ fontSize: `${unit * 10}px`,
808
+ x: midpoint.x - 3 * unit,
809
+ y: midpoint.y + 4 * unit,
810
+ $showIndex: revealSetIndex || handleFinderActive,
811
+ children: lineSetId + setIndexOffset
812
+ })
813
+ }),
814
+ showDirectionMark ? getDirectionMarkLine() : label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LabelText, {
815
+ $styling: styling,
816
+ fontSize: `${unit * 14}px`,
817
+ x: midpoint.x - 16 * unit,
818
+ y: midpoint.y - 15 * unit,
819
+ $showIndex: revealSetIndex || handleFinderActive,
820
+ $showLabelShadow: showLabelShadow,
821
+ children: label
822
+ })
823
+ ] });
824
+ };
825
+ //#endregion
826
+ //#region src/LineUI/LineSet.tsx
827
+ var FilledPolygon = styled_components.default.polygon`
828
+ fill: ${({ $color }) => $color};
829
+ opacity: ${({ $opacity }) => $opacity};
830
+ `;
831
+ var Point = styled_components.default.circle`
832
+ fill: ${({ theme, $styling }) => theme.custom.lines[$styling].point.fill};
833
+ `;
834
+ var AreaLabelText = styled_components.default.text`
835
+ text-align: center;
836
+ fill: ${({ theme, $styling }) => theme.custom.lines[$styling].label.fill};
837
+ font-weight: bold;
838
+ transition: opacity 250ms ease;
839
+ pointer-events: none;
840
+ ${({ $showAreaLabelShadow }) => $showAreaLabelShadow && styled_components.css`
841
+ text-shadow:
842
+ -1px -1px 0 #000,
843
+ 1px -1px 0 #000,
844
+ -1px 1px 0 #000,
845
+ 1px 1px 0 #000;
846
+ `}
847
+ `;
848
+ var AreaLabel = ({ lineSetData, unit, showAreaLabelShadow }) => {
849
+ const pointsLength = lineSetData.points.length;
850
+ if (pointsLength < 3) return null;
851
+ let midpoint = {
852
+ x: 0,
853
+ y: 0
854
+ };
855
+ lineSetData.points.map(({ x, y }) => {
856
+ midpoint.x += x;
857
+ midpoint.y += y;
858
+ return null;
859
+ });
860
+ midpoint = {
861
+ x: midpoint.x / pointsLength,
862
+ y: midpoint.y / pointsLength
863
+ };
864
+ const Textlen = lineSetData.areaName?.length || 1;
865
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AreaLabelText, {
866
+ fontSize: `${unit * 14}px`,
867
+ $styling: lineSetData.styling || "primary",
868
+ x: midpoint.x - 4 * Textlen * unit,
869
+ y: midpoint.y + 6 * unit,
870
+ $showAreaLabelShadow: showAreaLabelShadow,
871
+ children: lineSetData.areaName
872
+ });
873
+ };
874
+ var LineSet = ({ getCTM, boundaries, unit, size, lineSetId, options, onLineMoveEnd, onLineClick, lineClickSensingBorder, hasClickSensingBorder }) => {
875
+ const { state, dispatch } = (0, react.useContext)(LineSetContext);
876
+ const lineSetData = state[lineSetId];
877
+ const { showLabelShadow = false } = options;
878
+ const [handleAngles, setHandleAngles] = (0, react.useState)([]);
879
+ const handleRelation = (0, react.useRef)([]);
880
+ const handleRadius = size / 2;
881
+ const handleUsesAngles = lineSetData.points.length === 2;
882
+ /**
883
+ * Ensure provided position vector is within the boundaries (of the container)
884
+ * @param {IVector2} position Vector to be enforced.
885
+ * @returns {IVector2} The position updated clamped to range.
886
+ */
887
+ const enforceBoundaries = (0, react.useCallback)((position) => {
888
+ if (position.x < boundaries.x.min) position.x = boundaries.x.min;
889
+ else if (position.x > boundaries.x.max) position.x = boundaries.x.max;
890
+ if (position.y < boundaries.y.min) position.y = boundaries.y.min;
891
+ else if (position.y > boundaries.y.max) position.y = boundaries.y.max;
892
+ return position;
893
+ }, [boundaries]);
894
+ const handleMoveCallback = (0, react.useCallback)((pointerPosition, index) => {
895
+ const screenCTM = getCTM();
896
+ if (!screenCTM) return;
897
+ const pointer = enforceBoundaries({
898
+ x: (pointerPosition.x - window.scrollX - screenCTM.e) / screenCTM.a,
899
+ y: (pointerPosition.y - window.scrollY - screenCTM.f) / screenCTM.d
900
+ });
901
+ const point = {
902
+ x: Math.round(pointer.x),
903
+ y: Math.round(pointer.y)
904
+ };
905
+ dispatch({
906
+ type: "UPDATE",
907
+ index: lineSetId,
908
+ data: (0, immutability_helper.default)(lineSetData, { points: { [index]: { $merge: point } } })
909
+ });
910
+ }, [
911
+ getCTM,
912
+ enforceBoundaries,
913
+ lineSetData,
914
+ dispatch,
915
+ lineSetId
916
+ ]);
917
+ const lineDragStart = (0, react.useCallback)((pointerPosition) => {
918
+ const screenCTM = getCTM();
919
+ if (!screenCTM) return;
920
+ const pointer = {
921
+ x: (pointerPosition.x - window.scrollX - screenCTM.e) / screenCTM.a - handleRadius,
922
+ y: (pointerPosition.y - window.scrollY - screenCTM.f) / screenCTM.d - handleRadius
923
+ };
924
+ handleRelation.current = lineSetData.points.map((handle) => {
925
+ return {
926
+ offsetX: pointer.x - handle.x,
927
+ offsetY: pointer.y - handle.y
928
+ };
929
+ });
930
+ }, [
931
+ handleRadius,
932
+ lineSetData.points,
933
+ getCTM
934
+ ]);
935
+ const lineDragUpdate = (0, react.useCallback)((pointerPosition) => {
936
+ const screenCTM = getCTM();
937
+ if (!screenCTM) return;
938
+ const { points } = lineSetData;
939
+ const pointer = {
940
+ x: (pointerPosition.x - window.scrollX - screenCTM.e) / screenCTM.a - handleRadius,
941
+ y: (pointerPosition.y - window.scrollY - screenCTM.f) / screenCTM.d - handleRadius
942
+ };
943
+ const newPoints = points.map((_handle, index) => {
944
+ const { offsetX = 0, offsetY = 0 } = handleRelation.current[index] || {};
945
+ return enforceBoundaries({
946
+ x: Math.round(pointer.x - offsetX),
947
+ y: Math.round(pointer.y - offsetY)
948
+ });
949
+ });
950
+ dispatch({
951
+ type: "UPDATE",
952
+ index: lineSetId,
953
+ data: {
954
+ ...lineSetData,
955
+ points: [...newPoints]
956
+ }
957
+ });
958
+ }, [
959
+ getCTM,
960
+ lineSetData,
961
+ handleRadius,
962
+ dispatch,
963
+ lineSetId,
964
+ enforceBoundaries
965
+ ]);
966
+ const calcAngle = (0, react.useCallback)((originX, originY, towardsX, towardsY) => {
967
+ return Math.atan2(towardsY - originY, towardsX - originX) * 180 / Math.PI + 90;
968
+ }, []);
969
+ const updateHandleAngles = (0, react.useCallback)((inputHandleData) => {
970
+ const { points } = inputHandleData;
971
+ const outputData = [];
972
+ inputHandleData.points.forEach((handle, index) => {
973
+ const nextHandle = points[index + 2 > points.length ? 0 : index + 1];
974
+ const angle = calcAngle(handle.x, handle.y, nextHandle.x, nextHandle.y);
975
+ outputData.push(angle);
976
+ });
977
+ setHandleAngles(outputData);
978
+ }, [calcAngle]);
979
+ (0, react.useEffect)(() => {
980
+ if (handleUsesAngles) updateHandleAngles(lineSetData);
981
+ }, [
982
+ lineSetData,
983
+ updateHandleAngles,
984
+ handleUsesAngles
985
+ ]);
986
+ const initialClampDone = (0, react.useRef)(false);
987
+ (0, react.useEffect)(() => {
988
+ if (boundaries.x.max === 0 && boundaries.y.max === 0) return;
989
+ if (initialClampDone.current) return;
990
+ initialClampDone.current = true;
991
+ if (lineSetData.points.some(({ x, y }) => x < boundaries.x.min || x > boundaries.x.max || y < boundaries.y.min || y > boundaries.y.max)) {
992
+ const clampedPoints = lineSetData.points.map((point) => enforceBoundaries({ ...point }));
993
+ dispatch({
994
+ type: "UPDATE",
995
+ index: lineSetId,
996
+ data: {
997
+ ...lineSetData,
998
+ points: clampedPoints
999
+ }
1000
+ });
1001
+ }
1002
+ }, [
1003
+ boundaries,
1004
+ lineSetData.points.some,
1005
+ dispatch,
1006
+ lineSetData.points.map,
1007
+ lineSetId,
1008
+ lineSetData,
1009
+ enforceBoundaries
1010
+ ]);
1011
+ const handles = (lineSetData?.showPointHandle === void 0 || lineSetData?.showPointHandle) && lineSetData.points.map(({ x, y }, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HandleUnit, {
1012
+ lineSetId,
1013
+ rotate: lineSetData.rotate,
1014
+ Icon: lineSetData.icon,
1015
+ index,
1016
+ unit,
1017
+ size,
1018
+ useAngles: handleUsesAngles,
1019
+ angle: handleAngles[index],
1020
+ x,
1021
+ y,
1022
+ moveEndCB: onLineMoveEnd,
1023
+ moveCallback: handleMoveCallback,
1024
+ options,
1025
+ styling: lineSetData.styling,
1026
+ readOnlyHandle: lineSetData.readOnly
1027
+ }, index + lineSetId));
1028
+ const points = options.showPoint && lineSetData.points.map(({ x, y }, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Point, {
1029
+ $styling: lineSetData.styling || "primary",
1030
+ r: unit,
1031
+ cx: x,
1032
+ cy: y
1033
+ }, index));
1034
+ const lines = lineSetData.points.map(({ x: x1, y: y1 }, index) => {
1035
+ const { points, name, styling = "primary" } = lineSetData;
1036
+ const nextIndex = index + 1 >= points.length ? 0 : index + 1;
1037
+ if (index === 1 && nextIndex === 0) return null;
1038
+ const { x: x2, y: y2 } = points[nextIndex];
1039
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineUnit, {
1040
+ moveEndCB: onLineMoveEnd,
1041
+ lineSetId,
1042
+ options,
1043
+ x1,
1044
+ y1,
1045
+ x2,
1046
+ y2,
1047
+ unit,
1048
+ label: name,
1049
+ styling,
1050
+ lineClickCallback: onLineClick,
1051
+ lineMoveCallback: lineDragUpdate,
1052
+ lineMoveStartCallback: lineDragStart,
1053
+ showSmallDirectionMark: lineSetData.showSmallDirectionMark,
1054
+ overrideShowMoveHandle: lineSetData.showMoveHandle,
1055
+ lineClickSensingBorder,
1056
+ hasClickSensingBorder
1057
+ }, index);
1058
+ });
1059
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", { children: [
1060
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FilledPolygon, {
1061
+ points: lineSetData.points.map((point) => `${point.x},${point.y}`).join(" "),
1062
+ $color: lineSetData.areaFillColor ? lineSetData.areaFillColor : "transparent",
1063
+ $opacity: lineSetData.areaTransparencyLevel ? lineSetData.areaTransparencyLevel / 100 : 0
1064
+ }),
1065
+ lines,
1066
+ handles,
1067
+ points,
1068
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AreaLabel, {
1069
+ lineSetData,
1070
+ unit,
1071
+ showAreaLabelShadow: showLabelShadow
1072
+ })
1073
+ ] });
1074
+ };
1075
+ //#endregion
1076
+ //#region src/LineUI/LineUIVideoBase.tsx
1077
+ var Container = styled_components.default.div`
1078
+ position: relative;
1079
+ line-height: 0;
1080
+ user-select: none;
1081
+ touch-action: none;
1082
+ width: auto;
1083
+ `;
1084
+ var Video = styled_components.default.video`
1085
+ width: 100%;
1086
+ height: 100%;
1087
+ border-radius: 3px;
1088
+ background-color: hsla(0deg, 0%, 0%, 35%);
1089
+ `;
1090
+ var LoadingOverlay = styled_components.default.div`
1091
+ position: absolute;
1092
+ top: 0;
1093
+ bottom: 0;
1094
+ left: 0;
1095
+ right: 0;
1096
+ display: flex;
1097
+ flex-direction: column;
1098
+ align-items: center;
1099
+ justify-content: center;
1100
+ `;
1101
+ var Frame = styled_components.default.svg`
1102
+ touch-action: none;
1103
+ user-select: none;
1104
+ margin: 0;
1105
+
1106
+ overflow: visible;
1107
+
1108
+ position: absolute;
1109
+ top: 0;
1110
+ right: 0;
1111
+ left: 0;
1112
+ bottom: 0;
1113
+ height: 100%;
1114
+ width: 100%;
1115
+ transition: background 250ms ease;
1116
+ background: hsla(0deg, 0%, 0%, 0%);
1117
+
1118
+ ${(props) => props.$transcalent && styled_components.css`
1119
+ background: hsla(0deg, 0%, 0%, 35%);
1120
+ `}
1121
+ `;
1122
+ var LineUIVideoBase = ({ videoRef, onSizeChange = () => {}, onLineMoveEnd = () => {}, onLineClick = () => {}, onLoaded = () => {}, lineClickSensingBorder = "65", hasClickSensingBorder = true, videoOptions: { loop = false, autoPlay = false, controls = false, muted = true, ...videoOptions }, options: { showHandleFinder, showSetIndex, showPointLabel = false, showPointHandle, showLabelShadow, showMoveHandle, showGrabHandle, setIndexOffset = 0, pointIndexOffset = 0, showPoint = false, boundaryOffset = 0, showDirectionMark = false } = {} }) => {
1123
+ const frame = (0, react.useRef)(null);
1124
+ const [boundaries, setBoundaries] = (0, react.useState)({
1125
+ x: {
1126
+ min: 0,
1127
+ max: 0
1128
+ },
1129
+ y: {
1130
+ min: 0,
1131
+ max: 0
1132
+ }
1133
+ });
1134
+ const { state } = (0, react.useContext)(LineSetContext);
1135
+ const [handleFinder, setHandleFinder] = (0, react.useState)(false);
1136
+ const [videoSize, setVideoSize] = (0, react.useState)({
1137
+ h: 768,
1138
+ w: 1024
1139
+ });
1140
+ const [unit, setUnit] = (0, react.useState)(1);
1141
+ const [loaded, setLoaded] = (0, react.useState)(false);
1142
+ const initScaleAndBounds = (0, react.useCallback)(() => {
1143
+ if (!videoRef.current) return;
1144
+ const { videoHeight, videoWidth, clientHeight } = videoRef.current;
1145
+ if (videoHeight !== videoSize.h || videoWidth !== videoSize.w) {
1146
+ setVideoSize({
1147
+ h: videoHeight,
1148
+ w: videoWidth
1149
+ });
1150
+ onSizeChange({
1151
+ h: videoHeight,
1152
+ w: videoWidth
1153
+ });
1154
+ }
1155
+ if (videoHeight / clientHeight !== unit) setUnit(videoHeight / clientHeight);
1156
+ }, [
1157
+ videoSize.h,
1158
+ videoSize.w,
1159
+ unit,
1160
+ onSizeChange,
1161
+ videoRef
1162
+ ]);
1163
+ const handlePositionTipShow = (e) => {
1164
+ if (e.target === frame.current) setHandleFinder(!handleFinder === false && true);
1165
+ };
1166
+ const handlePositionTipHide = () => {
1167
+ setHandleFinder(showHandleFinder || false);
1168
+ };
1169
+ const calculateCTM = (0, react.useCallback)(() => {
1170
+ if (!frame.current) return null;
1171
+ return frame.current.getScreenCTM();
1172
+ }, []);
1173
+ (0, react.useEffect)(() => {
1174
+ if (!frame.current || !loaded) return;
1175
+ const { viewBox } = frame.current;
1176
+ setBoundaries({
1177
+ x: {
1178
+ min: viewBox.baseVal.x + boundaryOffset,
1179
+ max: viewBox.baseVal.x + viewBox.baseVal.width - boundaryOffset
1180
+ },
1181
+ y: {
1182
+ min: viewBox.baseVal.y + boundaryOffset,
1183
+ max: viewBox.baseVal.y + viewBox.baseVal.height - boundaryOffset
1184
+ }
1185
+ });
1186
+ }, [
1187
+ videoSize,
1188
+ loaded,
1189
+ boundaryOffset
1190
+ ]);
1191
+ const onLoadedMetadata = (0, react.useCallback)(({ target }) => {
1192
+ if (target) {
1193
+ setLoaded(true);
1194
+ initScaleAndBounds();
1195
+ const { videoHeight = 1, videoWidth = 1 } = target;
1196
+ onLoaded({
1197
+ height: videoHeight,
1198
+ width: videoWidth
1199
+ });
1200
+ }
1201
+ }, [initScaleAndBounds, onLoaded]);
1202
+ (0, react.useEffect)(() => {
1203
+ window.addEventListener("resize", initScaleAndBounds);
1204
+ return () => {
1205
+ window.removeEventListener("resize", initScaleAndBounds);
1206
+ };
1207
+ }, [initScaleAndBounds]);
1208
+ const options = {
1209
+ handleFinderActive: handleFinder,
1210
+ revealSetIndex: showSetIndex !== false && (showSetIndex || state.length > 1),
1211
+ showPointLabel,
1212
+ showLabelShadow,
1213
+ showPointHandle: showPointHandle || showPointHandle !== false && showGrabHandle !== false,
1214
+ showMoveHandle: showMoveHandle || showMoveHandle !== false && showGrabHandle !== false,
1215
+ setIndexOffset,
1216
+ pointIndexOffset,
1217
+ showPoint,
1218
+ showDirectionMark
1219
+ };
1220
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Container, { children: [
1221
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Video, {
1222
+ ref: videoRef,
1223
+ controls,
1224
+ muted,
1225
+ autoPlay,
1226
+ loop,
1227
+ ...videoOptions,
1228
+ onLoadedMetadata,
1229
+ id: "1",
1230
+ children: " "
1231
+ }),
1232
+ !loaded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoadingOverlay, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, {
1233
+ size: "large",
1234
+ styling: "primary"
1235
+ }) }),
1236
+ loaded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Frame, {
1237
+ ref: frame,
1238
+ viewBox: `0 0 ${videoSize.w} ${videoSize.h} `,
1239
+ version: "1.1",
1240
+ xmlns: "http://www.w3.org/2000/svg",
1241
+ onPointerDown: handlePositionTipShow,
1242
+ onPointerUp: handlePositionTipHide,
1243
+ onPointerLeave: handlePositionTipHide,
1244
+ $transcalent: handleFinder,
1245
+ children: state.map((lineSet, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineSet, {
1246
+ hasClickSensingBorder,
1247
+ lineClickSensingBorder,
1248
+ onLineMoveEnd,
1249
+ onLineClick,
1250
+ lineSetId: index,
1251
+ lineData: lineSet,
1252
+ getCTM: calculateCTM,
1253
+ boundaries,
1254
+ unit,
1255
+ size: 30,
1256
+ options
1257
+ }, index))
1258
+ })
1259
+ ] });
1260
+ };
1261
+ //#endregion
1262
+ Object.defineProperty(exports, "Icon", {
1263
+ enumerable: true,
1264
+ get: function() {
1265
+ return Icon;
1266
+ }
1267
+ });
1268
+ Object.defineProperty(exports, "IconWrapper", {
1269
+ enumerable: true,
1270
+ get: function() {
1271
+ return IconWrapper;
1272
+ }
1273
+ });
1274
+ Object.defineProperty(exports, "LineSet", {
1275
+ enumerable: true,
1276
+ get: function() {
1277
+ return LineSet;
1278
+ }
1279
+ });
1280
+ Object.defineProperty(exports, "LineSetContext", {
1281
+ enumerable: true,
1282
+ get: function() {
1283
+ return LineSetContext;
1284
+ }
1285
+ });
1286
+ Object.defineProperty(exports, "LineUIVideoBase", {
1287
+ enumerable: true,
1288
+ get: function() {
1289
+ return LineUIVideoBase;
1290
+ }
1291
+ });
1292
+ Object.defineProperty(exports, "Spinner", {
1293
+ enumerable: true,
1294
+ get: function() {
1295
+ return Spinner;
1296
+ }
1297
+ });
1298
+ Object.defineProperty(exports, "__toESM", {
1299
+ enumerable: true,
1300
+ get: function() {
1301
+ return __toESM;
1302
+ }
1303
+ });
1304
+ Object.defineProperty(exports, "animation", {
1305
+ enumerable: true,
1306
+ get: function() {
1307
+ return animation$1;
1308
+ }
1309
+ });
1310
+ Object.defineProperty(exports, "deviceMediaQuery", {
1311
+ enumerable: true,
1312
+ get: function() {
1313
+ return deviceMediaQuery;
1314
+ }
1315
+ });
1316
+ Object.defineProperty(exports, "deviceSize", {
1317
+ enumerable: true,
1318
+ get: function() {
1319
+ return deviceSize;
1320
+ }
1321
+ });
1322
+ Object.defineProperty(exports, "dimensions", {
1323
+ enumerable: true,
1324
+ get: function() {
1325
+ return dimensions;
1326
+ }
1327
+ });
1328
+ Object.defineProperty(exports, "fontFamily", {
1329
+ enumerable: true,
1330
+ get: function() {
1331
+ return fontFamily;
1332
+ }
1333
+ });
1334
+
1335
+ //# sourceMappingURL=LineUIVideoBase-Bs3WCeWl.js.map