hplx-feature-library 1.0.161 → 1.0.163

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 (195) hide show
  1. package/dist/APIAction-Dwk0qXbN.cjs +9 -0
  2. package/dist/APIAction-Zpy6wLQC.js +4033 -0
  3. package/dist/Attachments/components/document-canvas/document-pen-tool.d.ts +1 -1
  4. package/dist/Attachments/components/drag-drop-overlay.d.ts +1 -1
  5. package/dist/Attachments/components/edit-document-modal.d.ts +1 -1
  6. package/dist/Attachments/components/uploading-toast.d.ts +1 -1
  7. package/dist/Attachments/context/index.d.ts +2 -2
  8. package/dist/Attachments/hooks/useDropdownPosition.d.ts +1 -1
  9. package/dist/Attachments/index.js +12640 -11157
  10. package/dist/CameraCapture/index.d.ts +1 -1
  11. package/dist/PatientAddEdit/index.js +665 -4323
  12. package/dist/PatientPopup/action/APIAction.d.ts +65 -0
  13. package/dist/PatientPopup/app/PatientPopupContainer.d.ts +6 -0
  14. package/dist/PatientPopup/app/PatientPopupContext.d.ts +30 -0
  15. package/dist/PatientPopup/common/common.d.ts +14 -0
  16. package/dist/PatientPopup/components/Lab/HPLXLab.d.ts +8 -0
  17. package/dist/PatientPopup/components/Lab/LISLab.d.ts +8 -0
  18. package/dist/PatientPopup/components/Lab/LabTable.d.ts +5 -0
  19. package/dist/PatientPopup/components/Lab/index.d.ts +5 -0
  20. package/dist/PatientPopup/components/Loader/Loader.d.ts +2 -0
  21. package/dist/PatientPopup/components/Pagination.d.ts +9 -0
  22. package/dist/PatientPopup/components/Profile/Abha.d.ts +11 -0
  23. package/dist/PatientPopup/components/Profile/PatientDetailsModal.d.ts +1 -0
  24. package/dist/PatientPopup/components/Profile/Profile.d.ts +11 -0
  25. package/dist/PatientPopup/components/Profile/Sms.d.ts +2 -0
  26. package/dist/PatientPopup/components/Visits/Table.d.ts +11 -0
  27. package/dist/PatientPopup/components/Visits/index.d.ts +15 -0
  28. package/dist/PatientPopup/components/addBills/AddBillFooter.d.ts +2 -0
  29. package/dist/PatientPopup/components/addBills/AddBills.d.ts +5 -0
  30. package/dist/PatientPopup/components/addBills/AddBillsTable.d.ts +17 -0
  31. package/dist/PatientPopup/components/addBills/DropDown.d.ts +15 -0
  32. package/dist/PatientPopup/components/appointment/AllAppts.d.ts +8 -0
  33. package/dist/PatientPopup/components/appointment/Appointment.d.ts +2 -0
  34. package/dist/PatientPopup/components/appointment/AppointmentsTable.d.ts +10 -0
  35. package/dist/PatientPopup/components/bills/Bills.d.ts +6 -0
  36. package/dist/PatientPopup/components/bills/BillsTable.d.ts +11 -0
  37. package/dist/PatientPopup/components/deposit/DepositSection.d.ts +9 -0
  38. package/dist/PatientPopup/components/mainNavItem/MainNavItem.d.ts +13 -0
  39. package/dist/PatientPopup/components/patientPopupBody/PatientPopupBody.d.ts +8 -0
  40. package/dist/PatientPopup/components/patientPopupHeader/PatientPopupHeader.d.ts +10 -0
  41. package/dist/PatientPopup/components/patientPopupSummary/BillSummary.d.ts +19 -0
  42. package/dist/PatientPopup/components/patientPopupSummary/ConsultationDetails.d.ts +14 -0
  43. package/dist/PatientPopup/components/patientPopupSummary/DeleteItem.d.ts +11 -0
  44. package/dist/PatientPopup/components/patientPopupSummary/DepositRefundSummary.d.ts +8 -0
  45. package/dist/PatientPopup/components/patientPopupSummary/LabServiceDetails.d.ts +13 -0
  46. package/dist/PatientPopup/components/patientPopupSummary/OtherServiceDetails.d.ts +13 -0
  47. package/dist/PatientPopup/components/patientPopupSummary/PatientPopupSummary.d.ts +8 -0
  48. package/dist/PatientPopup/components/patientPopupSummary/PaymentCard.d.ts +25 -0
  49. package/dist/PatientPopup/components/patientPopupSummary/ServiceLevelBillSummary.d.ts +18 -0
  50. package/dist/PatientPopup/components/payments/DepositRefundTable.d.ts +14 -0
  51. package/dist/PatientPopup/components/payments/OtherServicesTable.d.ts +16 -0
  52. package/dist/PatientPopup/components/payments/PaymentEditModal.d.ts +15 -0
  53. package/dist/PatientPopup/components/payments/PaymentHeader.d.ts +7 -0
  54. package/dist/PatientPopup/components/payments/Payments.d.ts +5 -0
  55. package/dist/PatientPopup/components/payments/PaymentsTable.d.ts +14 -0
  56. package/dist/PatientPopup/constants/AppConstants.d.ts +123 -0
  57. package/dist/PatientPopup/index.d.ts +1 -0
  58. package/dist/PatientPopup/index.js +135387 -0
  59. package/dist/PatientPopup/types/hplxAPITypes.d.ts +37 -0
  60. package/dist/PatientPopup/utils/PrintFontLoader.d.ts +4 -0
  61. package/dist/PatientPopup/utils/helperFunctions.d.ts +3 -0
  62. package/dist/PediatricsCalculator/components/PediatricsCalculatorTableContext.d.ts +1 -1
  63. package/dist/PediatricsCalculator/index.js +1 -1
  64. package/dist/PediatricsCalculatorTable-bTvt7SWQ.cjs +9 -0
  65. package/dist/PediatricsCalculatorTable-qu37FR7D.js +1175 -0
  66. package/dist/ReusableModal-2GKjVVbf.cjs +1 -0
  67. package/dist/ReusableModal-BL_DwV8I.js +29 -0
  68. package/dist/Subscription/components/SubscriptionBadge.d.ts +2 -0
  69. package/dist/changePasswordModal/APIAction/APIActions.d.ts +8 -0
  70. package/dist/changePasswordModal/component/ChangePasswordModal.d.ts +14 -0
  71. package/dist/common/APIAction/APIAction.d.ts +17 -44
  72. package/dist/common/utils/NetworkInstance.d.ts +2 -2
  73. package/dist/common/utils/common-utils.d.ts +10 -12
  74. package/dist/components/{customDropdown/CustomDropdown.d.ts → CustomDropdown.d.ts} +2 -2
  75. package/dist/components/{toggleButtons/ToggleButtons.d.ts → ToggleButtons.d.ts} +1 -1
  76. package/dist/constants/CommonConstant.d.ts +13 -1
  77. package/dist/fonts/AnekMalayalam-Bold.ttf +0 -0
  78. package/dist/fonts/AnekMalayalam-Regular.ttf +0 -0
  79. package/dist/fonts/Arial-Bold-Italic.ttf +0 -0
  80. package/dist/fonts/Arial-Bold.ttf +0 -0
  81. package/dist/fonts/Arial-Italic.ttf +0 -0
  82. package/dist/fonts/Arial.ttf +0 -0
  83. package/dist/fonts/IndianRupee.ttf +0 -0
  84. package/dist/fonts/MuktaMaheePunjabi-Bold.ttf +0 -0
  85. package/dist/fonts/MuktaMaheePunjabi-Regular.ttf +0 -0
  86. package/dist/fonts/Noto-Sans-Telugu-Bold.ttf +0 -0
  87. package/dist/fonts/Noto-Sans-Telugu-Regular.ttf +0 -0
  88. package/dist/fonts/NotoNastaliqUrdu-Bold.ttf +0 -0
  89. package/dist/fonts/NotoNastaliqUrdu-Regular.ttf +0 -0
  90. package/dist/fonts/NotoSansArabic-Bold.ttf +0 -0
  91. package/dist/fonts/NotoSansArabic.ttf +0 -0
  92. package/dist/fonts/NotoSansHindi-Bold.ttf +0 -0
  93. package/dist/fonts/NotoSansHindi.ttf +0 -0
  94. package/dist/fonts/NotoSansKannada-Bold.ttf +0 -0
  95. package/dist/fonts/NotoSansKannada.ttf +0 -0
  96. package/dist/fonts/NotoSansOriya-Bold.ttf +0 -0
  97. package/dist/fonts/NotoSansOriya.ttf +0 -0
  98. package/dist/fonts/NotoSansTamil-Bold.ttf +0 -0
  99. package/dist/fonts/NotoSansTamil.ttf +0 -0
  100. package/dist/fonts/NotoSerifGujarati-Bold.ttf +0 -0
  101. package/dist/fonts/NotoSerifGujarati-Regular.ttf +0 -0
  102. package/dist/fonts/Roboto-Regular.ttf +0 -0
  103. package/dist/fonts/Times-Bold-Italic.ttf +0 -0
  104. package/dist/fonts/Times-Bold.ttf +0 -0
  105. package/dist/fonts/Times-Italic.ttf +0 -0
  106. package/dist/fonts/Times.ttf +0 -0
  107. package/dist/fonts/TiroBangla-Bold.ttf +0 -0
  108. package/dist/fonts/TiroBangla-Regular.ttf +0 -0
  109. package/dist/fonts/Verdana-Bold-Italic.ttf +0 -0
  110. package/dist/fonts/Verdana-Bold.ttf +0 -0
  111. package/dist/fonts/Verdana-Italic.ttf +0 -0
  112. package/dist/fonts/Verdana.ttf +0 -0
  113. package/dist/hooks/useMediaQuery.d.ts +1 -0
  114. package/dist/hplx-feature-library.css +1 -1
  115. package/dist/index-BzwuwvT5.js +961 -0
  116. package/dist/index-CJ2AKRoq.cjs +102 -0
  117. package/dist/index-CRCsQdYf.cjs +32 -0
  118. package/dist/{index-Cl3h7bnz.js → index-UPYT3B9g.js} +2823 -2700
  119. package/dist/index.d.ts +0 -5
  120. package/dist/index.js +2 -12
  121. package/dist/nineDots/NineDotsTypes.d.ts +22 -0
  122. package/dist/nineDots/NineDotsUtils.d.ts +3 -0
  123. package/dist/nineDots/nineDots.d.ts +3 -0
  124. package/dist/searchPatients/SearchPatients.d.ts +11 -0
  125. package/dist/types/ApiResponseTypes.d.ts +49 -8
  126. package/dist/types/CommonTypes.d.ts +37 -10
  127. package/dist/types/PatientAddEditTypes.d.ts +2 -8
  128. package/dist/types/PatientPopupTypes/index.js +1 -0
  129. package/dist/types/PatientPopupTypes.d.ts +836 -0
  130. package/dist/userProfile/APIAction/APIActions.d.ts +18 -0
  131. package/dist/userProfile/UserProfile.d.ts +18 -0
  132. package/dist/userProfile/UserProfileItem.d.ts +7 -0
  133. package/dist/warning-BozzKWdr.js +38 -0
  134. package/dist/warning-W0tkkrLJ.cjs +1 -0
  135. package/package.json +22 -33
  136. package/dist/AlertPopup/index.js +0 -79
  137. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +0 -19
  138. package/dist/AllInvestigations/index.d.ts +0 -1
  139. package/dist/AllInvestigations/index.js +0 -4
  140. package/dist/AllInvestigations/utils/test-tange-util.d.ts +0 -8
  141. package/dist/AllInvestigationsTable-9CE_uDGv.cjs +0 -80
  142. package/dist/AllInvestigationsTable-HC9dOdiS.js +0 -16964
  143. package/dist/CustomDropdown/index.js +0 -256
  144. package/dist/DateTimePicker/DateAndTimePicker/index.js +0 -5908
  145. package/dist/PediatricsCalculatorTable-CB1YOoVy.js +0 -833
  146. package/dist/PediatricsCalculatorTable-CPXBdrqk.cjs +0 -1
  147. package/dist/ReusableTable/ReusableTable.d.ts +0 -3
  148. package/dist/ReusableTable/ReusableTableConstants.d.ts +0 -8
  149. package/dist/ReusableTable/ReusableTableTypes.d.ts +0 -96
  150. package/dist/ReusableTable/components/EmptyTableContainer.d.ts +0 -12
  151. package/dist/ReusableTable/components/FilterCheckbox.d.ts +0 -8
  152. package/dist/ReusableTable/components/FilterDropdown.d.ts +0 -17
  153. package/dist/ReusableTable/components/Pagination.d.ts +0 -2
  154. package/dist/ReusableTable/components/TableBody.d.ts +0 -2
  155. package/dist/ReusableTable/components/TableCell.d.ts +0 -3
  156. package/dist/ReusableTable/components/TableFilterSelect.d.ts +0 -12
  157. package/dist/ReusableTable/components/TableHead.d.ts +0 -2
  158. package/dist/ReusableTable/components/TableMain.d.ts +0 -2
  159. package/dist/ReusableTable/components/TableRow.d.ts +0 -3
  160. package/dist/ReusableTable/context/TableContext.d.ts +0 -21
  161. package/dist/ReusableTable/context/TableContextBase.d.ts +0 -26
  162. package/dist/ReusableTable/context/useTableContext.d.ts +0 -2
  163. package/dist/ToggleButtons/index.js +0 -17
  164. package/dist/TrendGraphs/AreaChartComponent.d.ts +0 -9
  165. package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +0 -16
  166. package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +0 -2
  167. package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +0 -2
  168. package/dist/TrendGraphs/LineChartComponent/index.d.ts +0 -2
  169. package/dist/TrendGraphs/context/index.d.ts +0 -2
  170. package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +0 -2
  171. package/dist/TrendGraphs/utils/index.d.ts +0 -4
  172. package/dist/clsx-C11secjj.cjs +0 -1
  173. package/dist/clsx-OuTLNxxd.js +0 -16
  174. package/dist/components/Modal.d.ts +0 -5
  175. package/dist/components/alertPopup/index.d.ts +0 -1
  176. package/dist/components/customDropdown/index.d.ts +0 -1
  177. package/dist/components/dateTimePicker/DateAndTimePicker.d.ts +0 -21
  178. package/dist/components/dateTimePicker/index.d.ts +0 -1
  179. package/dist/components/toggleButtons/index.d.ts +0 -1
  180. package/dist/constants/TrendGraphsConstants.d.ts +0 -2
  181. package/dist/dayjs.min-D8X6dnmr.cjs +0 -1
  182. package/dist/dayjs.min-SMxpcMQi.js +0 -284
  183. package/dist/index-BFfWEART.js +0 -995
  184. package/dist/index-BVfQUI8j.cjs +0 -98
  185. package/dist/index-CHAEpyb1.cjs +0 -32
  186. package/dist/index-CJFGOBPb.js +0 -122
  187. package/dist/index-DfcUmlge.cjs +0 -17
  188. package/dist/parseISO-AwyR5Nhg.cjs +0 -1
  189. package/dist/parseISO-Cso9HWPX.js +0 -1414
  190. package/dist/types/AllInvestigationTypes/index.js +0 -4
  191. package/dist/types/AllInvestigationTypes.d.ts +0 -45
  192. package/dist/types/TrendGraphTypes.d.ts +0 -19
  193. package/dist/useClickOutside-BjJyGTec.js +0 -14
  194. package/dist/useClickOutside-DsVG12Cs.cjs +0 -1
  195. /package/dist/components/{alertPopup/AlertPopup.d.ts → AlertPopup.d.ts} +0 -0
@@ -1,995 +0,0 @@
1
- import { r as ve, a as Se, g as Me } from "./index-Cl3h7bnz.js";
2
- import me from "react";
3
- import Ne from "react-dom";
4
- var Y = { exports: {} }, H = {}, G = { exports: {} }, T = {}, J = { exports: {} }, te;
5
- function he() {
6
- return te || (te = 1, function(p, a) {
7
- Object.defineProperty(a, "__esModule", {
8
- value: !0
9
- }), a.default = s;
10
- /*!
11
- * Adapted from jQuery UI core
12
- *
13
- * http://jqueryui.com
14
- *
15
- * Copyright 2014 jQuery Foundation and other contributors
16
- * Released under the MIT license.
17
- * http://jquery.org/license
18
- *
19
- * http://api.jqueryui.com/category/ui-core/
20
- */
21
- var h = "none", l = "contents", u = /^(input|select|textarea|button|object|iframe)$/;
22
- function c(n, f) {
23
- return f.getPropertyValue("overflow") !== "visible" || // if 'overflow: visible' set, check if there is actually any overflow
24
- n.scrollWidth <= 0 && n.scrollHeight <= 0;
25
- }
26
- function O(n) {
27
- var f = n.offsetWidth <= 0 && n.offsetHeight <= 0;
28
- if (f && !n.innerHTML) return !0;
29
- try {
30
- var i = window.getComputedStyle(n), y = i.getPropertyValue("display");
31
- return f ? y !== l && c(n, i) : y === h;
32
- } catch {
33
- return console.warn("Failed to inspect element style"), !1;
34
- }
35
- }
36
- function e(n) {
37
- for (var f = n, i = n.getRootNode && n.getRootNode(); f && f !== document.body; ) {
38
- if (i && f === i && (f = i.host.parentNode), O(f)) return !1;
39
- f = f.parentNode;
40
- }
41
- return !0;
42
- }
43
- function g(n, f) {
44
- var i = n.nodeName.toLowerCase(), y = u.test(i) && !n.disabled || i === "a" && n.href || f;
45
- return y && e(n);
46
- }
47
- function m(n) {
48
- var f = n.getAttribute("tabindex");
49
- f === null && (f = void 0);
50
- var i = isNaN(f);
51
- return (i || f >= 0) && g(n, !i);
52
- }
53
- function s(n) {
54
- var f = [].slice.call(n.querySelectorAll("*"), 0).reduce(function(i, y) {
55
- return i.concat(y.shadowRoot ? s(y.shadowRoot) : [y]);
56
- }, []);
57
- return f.filter(m);
58
- }
59
- p.exports = a.default;
60
- }(J, J.exports)), J.exports;
61
- }
62
- var ne;
63
- function Re() {
64
- if (ne) return T;
65
- ne = 1, Object.defineProperty(T, "__esModule", {
66
- value: !0
67
- }), T.resetState = O, T.log = e, T.handleBlur = g, T.handleFocus = m, T.markForFocusLater = s, T.returnFocus = n, T.popWithoutFocus = f, T.setupScopedFocus = i, T.teardownScopedFocus = y;
68
- var p = he(), a = h(p);
69
- function h(_) {
70
- return _ && _.__esModule ? _ : { default: _ };
71
- }
72
- var l = [], u = null, c = !1;
73
- function O() {
74
- l = [];
75
- }
76
- function e() {
77
- process.env.NODE_ENV !== "production" && (console.log("focusManager ----------"), l.forEach(function(_) {
78
- var w = _ || {};
79
- console.log(w.nodeName, w.className, w.id);
80
- }), console.log("end focusManager ----------"));
81
- }
82
- function g() {
83
- c = !0;
84
- }
85
- function m() {
86
- if (c) {
87
- if (c = !1, !u)
88
- return;
89
- setTimeout(function() {
90
- if (!u.contains(document.activeElement)) {
91
- var _ = (0, a.default)(u)[0] || u;
92
- _.focus();
93
- }
94
- }, 0);
95
- }
96
- }
97
- function s() {
98
- l.push(document.activeElement);
99
- }
100
- function n() {
101
- var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, w = null;
102
- try {
103
- l.length !== 0 && (w = l.pop(), w.focus({ preventScroll: _ }));
104
- return;
105
- } catch {
106
- console.warn(["You tried to return focus to", w, "but it is not in the DOM anymore"].join(" "));
107
- }
108
- }
109
- function f() {
110
- l.length > 0 && l.pop();
111
- }
112
- function i(_) {
113
- u = _, window.addEventListener ? (window.addEventListener("blur", g, !1), document.addEventListener("focus", m, !0)) : (window.attachEvent("onBlur", g), document.attachEvent("onFocus", m));
114
- }
115
- function y() {
116
- u = null, window.addEventListener ? (window.removeEventListener("blur", g), document.removeEventListener("focus", m)) : (window.detachEvent("onBlur", g), document.detachEvent("onFocus", m));
117
- }
118
- return T;
119
- }
120
- var Q = { exports: {} }, oe;
121
- function Te() {
122
- return oe || (oe = 1, function(p, a) {
123
- Object.defineProperty(a, "__esModule", {
124
- value: !0
125
- }), a.default = O;
126
- var h = he(), l = u(h);
127
- function u(e) {
128
- return e && e.__esModule ? e : { default: e };
129
- }
130
- function c() {
131
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
132
- return e.activeElement.shadowRoot ? c(e.activeElement.shadowRoot) : e.activeElement;
133
- }
134
- function O(e, g) {
135
- var m = (0, l.default)(e);
136
- if (!m.length) {
137
- g.preventDefault();
138
- return;
139
- }
140
- var s = void 0, n = g.shiftKey, f = m[0], i = m[m.length - 1], y = c();
141
- if (e === y) {
142
- if (!n) return;
143
- s = i;
144
- }
145
- if (i === y && !n && (s = f), f === y && n && (s = i), s) {
146
- g.preventDefault(), s.focus();
147
- return;
148
- }
149
- var _ = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent), w = _ != null && _[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null;
150
- if (w) {
151
- var R = m.indexOf(y);
152
- if (R > -1 && (R += n ? -1 : 1), s = m[R], typeof s > "u") {
153
- g.preventDefault(), s = n ? i : f, s.focus();
154
- return;
155
- }
156
- g.preventDefault(), s.focus();
157
- }
158
- }
159
- p.exports = a.default;
160
- }(Q, Q.exports)), Q.exports;
161
- }
162
- var D = {}, X, re;
163
- function De() {
164
- if (re) return X;
165
- re = 1;
166
- var p = process.env.NODE_ENV !== "production", a = function() {
167
- };
168
- if (p) {
169
- var h = function(u, c) {
170
- var O = arguments.length;
171
- c = new Array(O > 1 ? O - 1 : 0);
172
- for (var e = 1; e < O; e++)
173
- c[e - 1] = arguments[e];
174
- var g = 0, m = "Warning: " + u.replace(/%s/g, function() {
175
- return c[g++];
176
- });
177
- typeof console < "u" && console.error(m);
178
- try {
179
- throw new Error(m);
180
- } catch {
181
- }
182
- };
183
- a = function(l, u, c) {
184
- var O = arguments.length;
185
- c = new Array(O > 2 ? O - 2 : 0);
186
- for (var e = 2; e < O; e++)
187
- c[e - 2] = arguments[e];
188
- if (u === void 0)
189
- throw new Error(
190
- "`warning(condition, format, ...args)` requires a warning message argument"
191
- );
192
- l || h.apply(null, [u].concat(c));
193
- };
194
- }
195
- return X = a, X;
196
- }
197
- var P = {}, Z = { exports: {} };
198
- /*!
199
- Copyright (c) 2015 Jed Watson.
200
- Based on code that is Copyright 2013-2015, Facebook, Inc.
201
- All rights reserved.
202
- */
203
- var ae;
204
- function Ae() {
205
- return ae || (ae = 1, function(p) {
206
- (function() {
207
- var a = !!(typeof window < "u" && window.document && window.document.createElement), h = {
208
- canUseDOM: a,
209
- canUseWorkers: typeof Worker < "u",
210
- canUseEventListeners: a && !!(window.addEventListener || window.attachEvent),
211
- canUseViewport: a && !!window.screen
212
- };
213
- p.exports ? p.exports = h : window.ExecutionEnvironment = h;
214
- })();
215
- }(Z)), Z.exports;
216
- }
217
- var le;
218
- function ee() {
219
- if (le) return P;
220
- le = 1, Object.defineProperty(P, "__esModule", {
221
- value: !0
222
- }), P.canUseDOM = P.SafeNodeList = P.SafeHTMLCollection = void 0;
223
- var p = Ae(), a = h(p);
224
- function h(c) {
225
- return c && c.__esModule ? c : { default: c };
226
- }
227
- var l = a.default, u = l.canUseDOM ? window.HTMLElement : {};
228
- return P.SafeHTMLCollection = l.canUseDOM ? window.HTMLCollection : {}, P.SafeNodeList = l.canUseDOM ? window.NodeList : {}, P.canUseDOM = l.canUseDOM, P.default = u, P;
229
- }
230
- var se;
231
- function ye() {
232
- if (se) return D;
233
- se = 1, Object.defineProperty(D, "__esModule", {
234
- value: !0
235
- }), D.resetState = c, D.log = O, D.assertNodeList = e, D.setElement = g, D.validateElement = m, D.hide = s, D.show = n, D.documentNotReadyOrSSRTesting = f;
236
- var p = De(), a = l(p), h = ee();
237
- function l(i) {
238
- return i && i.__esModule ? i : { default: i };
239
- }
240
- var u = null;
241
- function c() {
242
- u && (u.removeAttribute ? u.removeAttribute("aria-hidden") : u.length != null ? u.forEach(function(i) {
243
- return i.removeAttribute("aria-hidden");
244
- }) : document.querySelectorAll(u).forEach(function(i) {
245
- return i.removeAttribute("aria-hidden");
246
- })), u = null;
247
- }
248
- function O() {
249
- if (process.env.NODE_ENV !== "production") {
250
- var i = u || {};
251
- console.log("ariaAppHider ----------"), console.log(i.nodeName, i.className, i.id), console.log("end ariaAppHider ----------");
252
- }
253
- }
254
- function e(i, y) {
255
- if (!i || !i.length)
256
- throw new Error("react-modal: No elements were found for selector " + y + ".");
257
- }
258
- function g(i) {
259
- var y = i;
260
- if (typeof y == "string" && h.canUseDOM) {
261
- var _ = document.querySelectorAll(y);
262
- e(_, y), y = _;
263
- }
264
- return u = y || u, u;
265
- }
266
- function m(i) {
267
- var y = i || u;
268
- return y ? Array.isArray(y) || y instanceof HTMLCollection || y instanceof NodeList ? y : [y] : ((0, a.default)(!1, ["react-modal: App element is not defined.", "Please use `Modal.setAppElement(el)` or set `appElement={el}`.", "This is needed so screen readers don't see main content", "when modal is opened. It is not recommended, but you can opt-out", "by setting `ariaHideApp={false}`."].join(" ")), []);
269
- }
270
- function s(i) {
271
- var y = !0, _ = !1, w = void 0;
272
- try {
273
- for (var R = m(i)[Symbol.iterator](), A; !(y = (A = R.next()).done); y = !0) {
274
- var q = A.value;
275
- q.setAttribute("aria-hidden", "true");
276
- }
277
- } catch (L) {
278
- _ = !0, w = L;
279
- } finally {
280
- try {
281
- !y && R.return && R.return();
282
- } finally {
283
- if (_)
284
- throw w;
285
- }
286
- }
287
- }
288
- function n(i) {
289
- var y = !0, _ = !1, w = void 0;
290
- try {
291
- for (var R = m(i)[Symbol.iterator](), A; !(y = (A = R.next()).done); y = !0) {
292
- var q = A.value;
293
- q.removeAttribute("aria-hidden");
294
- }
295
- } catch (L) {
296
- _ = !0, w = L;
297
- } finally {
298
- try {
299
- !y && R.return && R.return();
300
- } finally {
301
- if (_)
302
- throw w;
303
- }
304
- }
305
- }
306
- function f() {
307
- u = null;
308
- }
309
- return D;
310
- }
311
- var k = {}, ie;
312
- function Pe() {
313
- if (ie) return k;
314
- ie = 1, Object.defineProperty(k, "__esModule", {
315
- value: !0
316
- }), k.resetState = l, k.log = u;
317
- var p = {}, a = {};
318
- function h(m, s) {
319
- m.classList.remove(s);
320
- }
321
- function l() {
322
- var m = document.getElementsByTagName("html")[0];
323
- for (var s in p)
324
- h(m, p[s]);
325
- var n = document.body;
326
- for (var f in a)
327
- h(n, a[f]);
328
- p = {}, a = {};
329
- }
330
- function u() {
331
- if (process.env.NODE_ENV !== "production") {
332
- var m = document.getElementsByTagName("html")[0].className, s = `Show tracked classes:
333
-
334
- `;
335
- s += "<html /> (" + m + `):
336
- `;
337
- for (var n in p)
338
- s += " " + n + " " + p[n] + `
339
- `;
340
- m = document.body.className, s += `
341
-
342
- doc.body (` + m + `):
343
- `;
344
- for (var f in a)
345
- s += " " + f + " " + a[f] + `
346
- `;
347
- s += `
348
- `, console.log(s);
349
- }
350
- }
351
- var c = function(s, n) {
352
- return s[n] || (s[n] = 0), s[n] += 1, n;
353
- }, O = function(s, n) {
354
- return s[n] && (s[n] -= 1), n;
355
- }, e = function(s, n, f) {
356
- f.forEach(function(i) {
357
- c(n, i), s.add(i);
358
- });
359
- }, g = function(s, n, f) {
360
- f.forEach(function(i) {
361
- O(n, i), n[i] === 0 && s.remove(i);
362
- });
363
- };
364
- return k.add = function(s, n) {
365
- return e(s.classList, s.nodeName.toLowerCase() == "html" ? p : a, n.split(" "));
366
- }, k.remove = function(s, n) {
367
- return g(s.classList, s.nodeName.toLowerCase() == "html" ? p : a, n.split(" "));
368
- }, k;
369
- }
370
- var V = {}, ue;
371
- function be() {
372
- if (ue) return V;
373
- ue = 1, Object.defineProperty(V, "__esModule", {
374
- value: !0
375
- }), V.log = l, V.resetState = u;
376
- function p(c, O) {
377
- if (!(c instanceof O))
378
- throw new TypeError("Cannot call a class as a function");
379
- }
380
- var a = function c() {
381
- var O = this;
382
- p(this, c), this.register = function(e) {
383
- if (O.openInstances.indexOf(e) !== -1) {
384
- process.env.NODE_ENV !== "production" && console.warn("React-Modal: Cannot register modal instance that's already open");
385
- return;
386
- }
387
- O.openInstances.push(e), O.emit("register");
388
- }, this.deregister = function(e) {
389
- var g = O.openInstances.indexOf(e);
390
- if (g === -1) {
391
- process.env.NODE_ENV !== "production" && console.warn("React-Modal: Unable to deregister " + e + " as it was never registered");
392
- return;
393
- }
394
- O.openInstances.splice(g, 1), O.emit("deregister");
395
- }, this.subscribe = function(e) {
396
- O.subscribers.push(e);
397
- }, this.emit = function(e) {
398
- O.subscribers.forEach(function(g) {
399
- return g(
400
- e,
401
- // shallow copy to avoid accidental mutation
402
- O.openInstances.slice()
403
- );
404
- });
405
- }, this.openInstances = [], this.subscribers = [];
406
- }, h = new a();
407
- function l() {
408
- console.log("portalOpenInstances ----------"), console.log(h.openInstances.length), h.openInstances.forEach(function(c) {
409
- return console.log(c);
410
- }), console.log("end portalOpenInstances ----------");
411
- }
412
- function u() {
413
- h = new a();
414
- }
415
- return V.default = h, V;
416
- }
417
- var j = {}, fe;
418
- function Le() {
419
- if (fe) return j;
420
- fe = 1, Object.defineProperty(j, "__esModule", {
421
- value: !0
422
- }), j.resetState = O, j.log = e;
423
- var p = be(), a = h(p);
424
- function h(s) {
425
- return s && s.__esModule ? s : { default: s };
426
- }
427
- var l = void 0, u = void 0, c = [];
428
- function O() {
429
- for (var s = [l, u], n = 0; n < s.length; n++) {
430
- var f = s[n];
431
- f && f.parentNode && f.parentNode.removeChild(f);
432
- }
433
- l = u = null, c = [];
434
- }
435
- function e() {
436
- console.log("bodyTrap ----------"), console.log(c.length);
437
- for (var s = [l, u], n = 0; n < s.length; n++) {
438
- var f = s[n], i = f || {};
439
- console.log(i.nodeName, i.className, i.id);
440
- }
441
- console.log("edn bodyTrap ----------");
442
- }
443
- function g() {
444
- if (c.length === 0) {
445
- process.env.NODE_ENV !== "production" && console.warn("React-Modal: Open instances > 0 expected");
446
- return;
447
- }
448
- c[c.length - 1].focusContent();
449
- }
450
- function m(s, n) {
451
- !l && !u && (l = document.createElement("div"), l.setAttribute("data-react-modal-body-trap", ""), l.style.position = "absolute", l.style.opacity = "0", l.setAttribute("tabindex", "0"), l.addEventListener("focus", g), u = l.cloneNode(), u.addEventListener("focus", g)), c = n, c.length > 0 ? (document.body.firstChild !== l && document.body.insertBefore(l, document.body.firstChild), document.body.lastChild !== u && document.body.appendChild(u)) : (l.parentElement && l.parentElement.removeChild(l), u.parentElement && u.parentElement.removeChild(u));
452
- }
453
- return a.default.subscribe(m), j;
454
- }
455
- var ce;
456
- function Fe() {
457
- return ce || (ce = 1, function(p, a) {
458
- Object.defineProperty(a, "__esModule", {
459
- value: !0
460
- });
461
- var h = Object.assign || function(r) {
462
- for (var o = 1; o < arguments.length; o++) {
463
- var E = arguments[o];
464
- for (var t in E)
465
- Object.prototype.hasOwnProperty.call(E, t) && (r[t] = E[t]);
466
- }
467
- return r;
468
- }, l = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
469
- return typeof r;
470
- } : function(r) {
471
- return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
472
- }, u = /* @__PURE__ */ function() {
473
- function r(o, E) {
474
- for (var t = 0; t < E.length; t++) {
475
- var d = E[t];
476
- d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(o, d.key, d);
477
- }
478
- }
479
- return function(o, E, t) {
480
- return E && r(o.prototype, E), t && r(o, t), o;
481
- };
482
- }(), c = me, O = /* @__PURE__ */ ve(), e = B(O), g = Re(), m = L(g), s = Te(), n = B(s), f = ye(), i = L(f), y = Pe(), _ = L(y), w = ee(), R = B(w), A = be(), q = B(A);
483
- Le();
484
- function L(r) {
485
- if (r && r.__esModule)
486
- return r;
487
- var o = {};
488
- if (r != null)
489
- for (var E in r)
490
- Object.prototype.hasOwnProperty.call(r, E) && (o[E] = r[E]);
491
- return o.default = r, o;
492
- }
493
- function B(r) {
494
- return r && r.__esModule ? r : { default: r };
495
- }
496
- function F(r, o) {
497
- if (!(r instanceof o))
498
- throw new TypeError("Cannot call a class as a function");
499
- }
500
- function K(r, o) {
501
- if (!r)
502
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
503
- return o && (typeof o == "object" || typeof o == "function") ? o : r;
504
- }
505
- function $(r, o) {
506
- if (typeof o != "function" && o !== null)
507
- throw new TypeError("Super expression must either be null or a function, not " + typeof o);
508
- r.prototype = Object.create(o && o.prototype, { constructor: { value: r, enumerable: !1, writable: !0, configurable: !0 } }), o && (Object.setPrototypeOf ? Object.setPrototypeOf(r, o) : r.__proto__ = o);
509
- }
510
- var U = {
511
- overlay: "ReactModal__Overlay",
512
- content: "ReactModal__Content"
513
- }, W = function(o) {
514
- return o.code === "Tab" || o.keyCode === 9;
515
- }, b = function(o) {
516
- return o.code === "Escape" || o.keyCode === 27;
517
- }, v = 0, C = function(r) {
518
- $(o, r);
519
- function o(E) {
520
- F(this, o);
521
- var t = K(this, (o.__proto__ || Object.getPrototypeOf(o)).call(this, E));
522
- return t.setOverlayRef = function(d) {
523
- t.overlay = d, t.props.overlayRef && t.props.overlayRef(d);
524
- }, t.setContentRef = function(d) {
525
- t.content = d, t.props.contentRef && t.props.contentRef(d);
526
- }, t.afterClose = function() {
527
- var d = t.props, M = d.appElement, S = d.ariaHideApp, N = d.htmlOpenClassName, x = d.bodyOpenClassName, I = d.parentSelector, z = I && I().ownerDocument || document;
528
- x && _.remove(z.body, x), N && _.remove(z.getElementsByTagName("html")[0], N), S && v > 0 && (v -= 1, v === 0 && i.show(M)), t.props.shouldFocusAfterRender && (t.props.shouldReturnFocusAfterClose ? (m.returnFocus(t.props.preventScroll), m.teardownScopedFocus()) : m.popWithoutFocus()), t.props.onAfterClose && t.props.onAfterClose(), q.default.deregister(t);
529
- }, t.open = function() {
530
- t.beforeOpen(), t.state.afterOpen && t.state.beforeClose ? (clearTimeout(t.closeTimer), t.setState({ beforeClose: !1 })) : (t.props.shouldFocusAfterRender && (m.setupScopedFocus(t.node), m.markForFocusLater()), t.setState({ isOpen: !0 }, function() {
531
- t.openAnimationFrame = requestAnimationFrame(function() {
532
- t.setState({ afterOpen: !0 }), t.props.isOpen && t.props.onAfterOpen && t.props.onAfterOpen({
533
- overlayEl: t.overlay,
534
- contentEl: t.content
535
- });
536
- });
537
- }));
538
- }, t.close = function() {
539
- t.props.closeTimeoutMS > 0 ? t.closeWithTimeout() : t.closeWithoutTimeout();
540
- }, t.focusContent = function() {
541
- return t.content && !t.contentHasFocus() && t.content.focus({ preventScroll: !0 });
542
- }, t.closeWithTimeout = function() {
543
- var d = Date.now() + t.props.closeTimeoutMS;
544
- t.setState({ beforeClose: !0, closesAt: d }, function() {
545
- t.closeTimer = setTimeout(t.closeWithoutTimeout, t.state.closesAt - Date.now());
546
- });
547
- }, t.closeWithoutTimeout = function() {
548
- t.setState({
549
- beforeClose: !1,
550
- isOpen: !1,
551
- afterOpen: !1,
552
- closesAt: null
553
- }, t.afterClose);
554
- }, t.handleKeyDown = function(d) {
555
- W(d) && (0, n.default)(t.content, d), t.props.shouldCloseOnEsc && b(d) && (d.stopPropagation(), t.requestClose(d));
556
- }, t.handleOverlayOnClick = function(d) {
557
- t.shouldClose === null && (t.shouldClose = !0), t.shouldClose && t.props.shouldCloseOnOverlayClick && (t.ownerHandlesClose() ? t.requestClose(d) : t.focusContent()), t.shouldClose = null;
558
- }, t.handleContentOnMouseUp = function() {
559
- t.shouldClose = !1;
560
- }, t.handleOverlayOnMouseDown = function(d) {
561
- !t.props.shouldCloseOnOverlayClick && d.target == t.overlay && d.preventDefault();
562
- }, t.handleContentOnClick = function() {
563
- t.shouldClose = !1;
564
- }, t.handleContentOnMouseDown = function() {
565
- t.shouldClose = !1;
566
- }, t.requestClose = function(d) {
567
- return t.ownerHandlesClose() && t.props.onRequestClose(d);
568
- }, t.ownerHandlesClose = function() {
569
- return t.props.onRequestClose;
570
- }, t.shouldBeClosed = function() {
571
- return !t.state.isOpen && !t.state.beforeClose;
572
- }, t.contentHasFocus = function() {
573
- return document.activeElement === t.content || t.content.contains(document.activeElement);
574
- }, t.buildClassName = function(d, M) {
575
- var S = (typeof M > "u" ? "undefined" : l(M)) === "object" ? M : {
576
- base: U[d],
577
- afterOpen: U[d] + "--after-open",
578
- beforeClose: U[d] + "--before-close"
579
- }, N = S.base;
580
- return t.state.afterOpen && (N = N + " " + S.afterOpen), t.state.beforeClose && (N = N + " " + S.beforeClose), typeof M == "string" && M ? N + " " + M : N;
581
- }, t.attributesFromObject = function(d, M) {
582
- return Object.keys(M).reduce(function(S, N) {
583
- return S[d + "-" + N] = M[N], S;
584
- }, {});
585
- }, t.state = {
586
- afterOpen: !1,
587
- beforeClose: !1
588
- }, t.shouldClose = null, t.moveFromContentToOverlay = null, t;
589
- }
590
- return u(o, [{
591
- key: "componentDidMount",
592
- value: function() {
593
- this.props.isOpen && this.open();
594
- }
595
- }, {
596
- key: "componentDidUpdate",
597
- value: function(t, d) {
598
- process.env.NODE_ENV !== "production" && (t.bodyOpenClassName !== this.props.bodyOpenClassName && console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'), t.htmlOpenClassName !== this.props.htmlOpenClassName && console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.')), this.props.isOpen && !t.isOpen ? this.open() : !this.props.isOpen && t.isOpen && this.close(), this.props.shouldFocusAfterRender && this.state.isOpen && !d.isOpen && this.focusContent();
599
- }
600
- }, {
601
- key: "componentWillUnmount",
602
- value: function() {
603
- this.state.isOpen && this.afterClose(), clearTimeout(this.closeTimer), cancelAnimationFrame(this.openAnimationFrame);
604
- }
605
- }, {
606
- key: "beforeOpen",
607
- value: function() {
608
- var t = this.props, d = t.appElement, M = t.ariaHideApp, S = t.htmlOpenClassName, N = t.bodyOpenClassName, x = t.parentSelector, I = x && x().ownerDocument || document;
609
- N && _.add(I.body, N), S && _.add(I.getElementsByTagName("html")[0], S), M && (v += 1, i.hide(d)), q.default.register(this);
610
- }
611
- // Don't steal focus from inner elements
612
- }, {
613
- key: "render",
614
- value: function() {
615
- var t = this.props, d = t.id, M = t.className, S = t.overlayClassName, N = t.defaultStyles, x = t.children, I = M ? {} : N.content, z = S ? {} : N.overlay;
616
- if (this.shouldBeClosed())
617
- return null;
618
- var Ee = {
619
- ref: this.setOverlayRef,
620
- className: this.buildClassName("overlay", S),
621
- style: h({}, z, this.props.style.overlay),
622
- onClick: this.handleOverlayOnClick,
623
- onMouseDown: this.handleOverlayOnMouseDown
624
- }, Ce = h({
625
- id: d,
626
- ref: this.setContentRef,
627
- style: h({}, I, this.props.style.content),
628
- className: this.buildClassName("content", M),
629
- tabIndex: "-1",
630
- onKeyDown: this.handleKeyDown,
631
- onMouseDown: this.handleContentOnMouseDown,
632
- onMouseUp: this.handleContentOnMouseUp,
633
- onClick: this.handleContentOnClick,
634
- role: this.props.role,
635
- "aria-label": this.props.contentLabel
636
- }, this.attributesFromObject("aria", h({ modal: !0 }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), {
637
- "data-testid": this.props.testId
638
- }), we = this.props.contentElement(Ce, x);
639
- return this.props.overlayElement(Ee, we);
640
- }
641
- }]), o;
642
- }(c.Component);
643
- C.defaultProps = {
644
- style: {
645
- overlay: {},
646
- content: {}
647
- },
648
- defaultStyles: {}
649
- }, C.propTypes = {
650
- isOpen: e.default.bool.isRequired,
651
- defaultStyles: e.default.shape({
652
- content: e.default.object,
653
- overlay: e.default.object
654
- }),
655
- style: e.default.shape({
656
- content: e.default.object,
657
- overlay: e.default.object
658
- }),
659
- className: e.default.oneOfType([e.default.string, e.default.object]),
660
- overlayClassName: e.default.oneOfType([e.default.string, e.default.object]),
661
- parentSelector: e.default.func,
662
- bodyOpenClassName: e.default.string,
663
- htmlOpenClassName: e.default.string,
664
- ariaHideApp: e.default.bool,
665
- appElement: e.default.oneOfType([e.default.instanceOf(R.default), e.default.instanceOf(w.SafeHTMLCollection), e.default.instanceOf(w.SafeNodeList), e.default.arrayOf(e.default.instanceOf(R.default))]),
666
- onAfterOpen: e.default.func,
667
- onAfterClose: e.default.func,
668
- onRequestClose: e.default.func,
669
- closeTimeoutMS: e.default.number,
670
- shouldFocusAfterRender: e.default.bool,
671
- shouldCloseOnOverlayClick: e.default.bool,
672
- shouldReturnFocusAfterClose: e.default.bool,
673
- preventScroll: e.default.bool,
674
- role: e.default.string,
675
- contentLabel: e.default.string,
676
- aria: e.default.object,
677
- data: e.default.object,
678
- children: e.default.node,
679
- shouldCloseOnEsc: e.default.bool,
680
- overlayRef: e.default.func,
681
- contentRef: e.default.func,
682
- id: e.default.string,
683
- overlayElement: e.default.func,
684
- contentElement: e.default.func,
685
- testId: e.default.string
686
- }, a.default = C, p.exports = a.default;
687
- }(G, G.exports)), G.exports;
688
- }
689
- function Oe() {
690
- var p = this.constructor.getDerivedStateFromProps(this.props, this.state);
691
- p != null && this.setState(p);
692
- }
693
- function ge(p) {
694
- function a(h) {
695
- var l = this.constructor.getDerivedStateFromProps(p, h);
696
- return l ?? null;
697
- }
698
- this.setState(a.bind(this));
699
- }
700
- function _e(p, a) {
701
- try {
702
- var h = this.props, l = this.state;
703
- this.props = p, this.state = a, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
704
- h,
705
- l
706
- );
707
- } finally {
708
- this.props = h, this.state = l;
709
- }
710
- }
711
- Oe.__suppressDeprecationWarning = !0;
712
- ge.__suppressDeprecationWarning = !0;
713
- _e.__suppressDeprecationWarning = !0;
714
- function xe(p) {
715
- var a = p.prototype;
716
- if (!a || !a.isReactComponent)
717
- throw new Error("Can only polyfill class components");
718
- if (typeof p.getDerivedStateFromProps != "function" && typeof a.getSnapshotBeforeUpdate != "function")
719
- return p;
720
- var h = null, l = null, u = null;
721
- if (typeof a.componentWillMount == "function" ? h = "componentWillMount" : typeof a.UNSAFE_componentWillMount == "function" && (h = "UNSAFE_componentWillMount"), typeof a.componentWillReceiveProps == "function" ? l = "componentWillReceiveProps" : typeof a.UNSAFE_componentWillReceiveProps == "function" && (l = "UNSAFE_componentWillReceiveProps"), typeof a.componentWillUpdate == "function" ? u = "componentWillUpdate" : typeof a.UNSAFE_componentWillUpdate == "function" && (u = "UNSAFE_componentWillUpdate"), h !== null || l !== null || u !== null) {
722
- var c = p.displayName || p.name, O = typeof p.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
723
- throw Error(
724
- `Unsafe legacy lifecycles will not be called for components using new component APIs.
725
-
726
- ` + c + " uses " + O + " but also contains the following legacy lifecycles:" + (h !== null ? `
727
- ` + h : "") + (l !== null ? `
728
- ` + l : "") + (u !== null ? `
729
- ` + u : "") + `
730
-
731
- The above lifecycles should be removed. Learn more about this warning here:
732
- https://fb.me/react-async-component-lifecycle-hooks`
733
- );
734
- }
735
- if (typeof p.getDerivedStateFromProps == "function" && (a.componentWillMount = Oe, a.componentWillReceiveProps = ge), typeof a.getSnapshotBeforeUpdate == "function") {
736
- if (typeof a.componentDidUpdate != "function")
737
- throw new Error(
738
- "Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype"
739
- );
740
- a.componentWillUpdate = _e;
741
- var e = a.componentDidUpdate;
742
- a.componentDidUpdate = function(m, s, n) {
743
- var f = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : n;
744
- e.call(this, m, s, f);
745
- };
746
- }
747
- return p;
748
- }
749
- const qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
750
- __proto__: null,
751
- polyfill: xe
752
- }, Symbol.toStringTag, { value: "Module" })), Ue = /* @__PURE__ */ Se(qe);
753
- var de;
754
- function We() {
755
- if (de) return H;
756
- de = 1, Object.defineProperty(H, "__esModule", {
757
- value: !0
758
- }), H.bodyOpenClassName = H.portalClassName = void 0;
759
- var p = Object.assign || function(b) {
760
- for (var v = 1; v < arguments.length; v++) {
761
- var C = arguments[v];
762
- for (var r in C)
763
- Object.prototype.hasOwnProperty.call(C, r) && (b[r] = C[r]);
764
- }
765
- return b;
766
- }, a = /* @__PURE__ */ function() {
767
- function b(v, C) {
768
- for (var r = 0; r < C.length; r++) {
769
- var o = C[r];
770
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(v, o.key, o);
771
- }
772
- }
773
- return function(v, C, r) {
774
- return C && b(v.prototype, C), r && b(v, r), v;
775
- };
776
- }(), h = me, l = w(h), u = Ne, c = w(u), O = /* @__PURE__ */ ve(), e = w(O), g = Fe(), m = w(g), s = ye(), n = _(s), f = ee(), i = w(f), y = Ue;
777
- function _(b) {
778
- if (b && b.__esModule)
779
- return b;
780
- var v = {};
781
- if (b != null)
782
- for (var C in b)
783
- Object.prototype.hasOwnProperty.call(b, C) && (v[C] = b[C]);
784
- return v.default = b, v;
785
- }
786
- function w(b) {
787
- return b && b.__esModule ? b : { default: b };
788
- }
789
- function R(b, v) {
790
- if (!(b instanceof v))
791
- throw new TypeError("Cannot call a class as a function");
792
- }
793
- function A(b, v) {
794
- if (!b)
795
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
796
- return v && (typeof v == "object" || typeof v == "function") ? v : b;
797
- }
798
- function q(b, v) {
799
- if (typeof v != "function" && v !== null)
800
- throw new TypeError("Super expression must either be null or a function, not " + typeof v);
801
- b.prototype = Object.create(v && v.prototype, { constructor: { value: b, enumerable: !1, writable: !0, configurable: !0 } }), v && (Object.setPrototypeOf ? Object.setPrototypeOf(b, v) : b.__proto__ = v);
802
- }
803
- var L = H.portalClassName = "ReactModalPortal", B = H.bodyOpenClassName = "ReactModal__Body--open", F = f.canUseDOM && c.default.createPortal !== void 0, K = function(v) {
804
- return document.createElement(v);
805
- }, $ = function() {
806
- return F ? c.default.createPortal : c.default.unstable_renderSubtreeIntoContainer;
807
- };
808
- function U(b) {
809
- return b();
810
- }
811
- var W = function(b) {
812
- q(v, b);
813
- function v() {
814
- var C, r, o, E;
815
- R(this, v);
816
- for (var t = arguments.length, d = Array(t), M = 0; M < t; M++)
817
- d[M] = arguments[M];
818
- return E = (r = (o = A(this, (C = v.__proto__ || Object.getPrototypeOf(v)).call.apply(C, [this].concat(d))), o), o.removePortal = function() {
819
- !F && c.default.unmountComponentAtNode(o.node);
820
- var S = U(o.props.parentSelector);
821
- S && S.contains(o.node) ? S.removeChild(o.node) : console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.');
822
- }, o.portalRef = function(S) {
823
- o.portal = S;
824
- }, o.renderPortal = function(S) {
825
- var N = $(), x = N(o, l.default.createElement(m.default, p({ defaultStyles: v.defaultStyles }, S)), o.node);
826
- o.portalRef(x);
827
- }, r), A(o, E);
828
- }
829
- return a(v, [{
830
- key: "componentDidMount",
831
- value: function() {
832
- if (f.canUseDOM) {
833
- F || (this.node = K("div")), this.node.className = this.props.portalClassName;
834
- var r = U(this.props.parentSelector);
835
- r.appendChild(this.node), !F && this.renderPortal(this.props);
836
- }
837
- }
838
- }, {
839
- key: "getSnapshotBeforeUpdate",
840
- value: function(r) {
841
- var o = U(r.parentSelector), E = U(this.props.parentSelector);
842
- return { prevParent: o, nextParent: E };
843
- }
844
- }, {
845
- key: "componentDidUpdate",
846
- value: function(r, o, E) {
847
- if (f.canUseDOM) {
848
- var t = this.props, d = t.isOpen, M = t.portalClassName;
849
- r.portalClassName !== M && (this.node.className = M);
850
- var S = E.prevParent, N = E.nextParent;
851
- N !== S && (S.removeChild(this.node), N.appendChild(this.node)), !(!r.isOpen && !d) && !F && this.renderPortal(this.props);
852
- }
853
- }
854
- }, {
855
- key: "componentWillUnmount",
856
- value: function() {
857
- if (!(!f.canUseDOM || !this.node || !this.portal)) {
858
- var r = this.portal.state, o = Date.now(), E = r.isOpen && this.props.closeTimeoutMS && (r.closesAt || o + this.props.closeTimeoutMS);
859
- E ? (r.beforeClose || this.portal.closeWithTimeout(), setTimeout(this.removePortal, E - o)) : this.removePortal();
860
- }
861
- }
862
- }, {
863
- key: "render",
864
- value: function() {
865
- if (!f.canUseDOM || !F)
866
- return null;
867
- !this.node && F && (this.node = K("div"));
868
- var r = $();
869
- return r(l.default.createElement(m.default, p({
870
- ref: this.portalRef,
871
- defaultStyles: v.defaultStyles
872
- }, this.props)), this.node);
873
- }
874
- }], [{
875
- key: "setAppElement",
876
- value: function(r) {
877
- n.setElement(r);
878
- }
879
- /* eslint-disable react/no-unused-prop-types */
880
- /* eslint-enable react/no-unused-prop-types */
881
- }]), v;
882
- }(h.Component);
883
- return W.propTypes = {
884
- isOpen: e.default.bool.isRequired,
885
- style: e.default.shape({
886
- content: e.default.object,
887
- overlay: e.default.object
888
- }),
889
- portalClassName: e.default.string,
890
- bodyOpenClassName: e.default.string,
891
- htmlOpenClassName: e.default.string,
892
- className: e.default.oneOfType([e.default.string, e.default.shape({
893
- base: e.default.string.isRequired,
894
- afterOpen: e.default.string.isRequired,
895
- beforeClose: e.default.string.isRequired
896
- })]),
897
- overlayClassName: e.default.oneOfType([e.default.string, e.default.shape({
898
- base: e.default.string.isRequired,
899
- afterOpen: e.default.string.isRequired,
900
- beforeClose: e.default.string.isRequired
901
- })]),
902
- appElement: e.default.oneOfType([e.default.instanceOf(i.default), e.default.instanceOf(f.SafeHTMLCollection), e.default.instanceOf(f.SafeNodeList), e.default.arrayOf(e.default.instanceOf(i.default))]),
903
- onAfterOpen: e.default.func,
904
- onRequestClose: e.default.func,
905
- closeTimeoutMS: e.default.number,
906
- ariaHideApp: e.default.bool,
907
- shouldFocusAfterRender: e.default.bool,
908
- shouldCloseOnOverlayClick: e.default.bool,
909
- shouldReturnFocusAfterClose: e.default.bool,
910
- preventScroll: e.default.bool,
911
- parentSelector: e.default.func,
912
- aria: e.default.object,
913
- data: e.default.object,
914
- role: e.default.string,
915
- contentLabel: e.default.string,
916
- shouldCloseOnEsc: e.default.bool,
917
- overlayRef: e.default.func,
918
- contentRef: e.default.func,
919
- id: e.default.string,
920
- overlayElement: e.default.func,
921
- contentElement: e.default.func
922
- }, W.defaultProps = {
923
- isOpen: !1,
924
- portalClassName: L,
925
- bodyOpenClassName: B,
926
- role: "dialog",
927
- ariaHideApp: !0,
928
- closeTimeoutMS: 0,
929
- shouldFocusAfterRender: !0,
930
- shouldCloseOnEsc: !0,
931
- shouldCloseOnOverlayClick: !0,
932
- shouldReturnFocusAfterClose: !0,
933
- preventScroll: !1,
934
- parentSelector: function() {
935
- return document.body;
936
- },
937
- overlayElement: function(v, C) {
938
- return l.default.createElement(
939
- "div",
940
- v,
941
- C
942
- );
943
- },
944
- contentElement: function(v, C) {
945
- return l.default.createElement(
946
- "div",
947
- v,
948
- C
949
- );
950
- }
951
- }, W.defaultStyles = {
952
- overlay: {
953
- position: "fixed",
954
- top: 0,
955
- left: 0,
956
- right: 0,
957
- bottom: 0,
958
- backgroundColor: "rgba(255, 255, 255, 0.75)"
959
- },
960
- content: {
961
- position: "absolute",
962
- top: "40px",
963
- left: "40px",
964
- right: "40px",
965
- bottom: "40px",
966
- border: "1px solid #ccc",
967
- background: "#fff",
968
- overflow: "auto",
969
- WebkitOverflowScrolling: "touch",
970
- borderRadius: "4px",
971
- outline: "none",
972
- padding: "20px"
973
- }
974
- }, (0, y.polyfill)(W), process.env.NODE_ENV !== "production" && (W.setCreateHTMLElement = function(b) {
975
- return K = b;
976
- }), H.default = W, H;
977
- }
978
- var pe;
979
- function He() {
980
- return pe || (pe = 1, function(p, a) {
981
- Object.defineProperty(a, "__esModule", {
982
- value: !0
983
- });
984
- var h = We(), l = u(h);
985
- function u(c) {
986
- return c && c.__esModule ? c : { default: c };
987
- }
988
- a.default = l.default, p.exports = a.default;
989
- }(Y, Y.exports)), Y.exports;
990
- }
991
- var Ie = He();
992
- const Ke = /* @__PURE__ */ Me(Ie);
993
- export {
994
- Ke as M
995
- };