@lm_fe/pages-fubao 0.1.201 → 0.2.2

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 (192) hide show
  1. package/README.md +4 -2
  2. package/dist/a_chunks/.root.js +240 -280
  3. package/dist/a_chunks/.root10.js +9 -15
  4. package/dist/a_chunks/.root11.js +210 -244
  5. package/dist/a_chunks/.root12.js +2 -33
  6. package/dist/a_chunks/.root13.js +300 -331
  7. package/dist/a_chunks/.root14.js +2 -16
  8. package/dist/a_chunks/.root15.js +2 -16
  9. package/dist/a_chunks/.root16.js +4 -6
  10. package/dist/a_chunks/.root17.js +11 -2
  11. package/dist/a_chunks/.root18.js +10 -1
  12. package/dist/a_chunks/.root19.js +16 -27
  13. package/dist/a_chunks/.root2.js +22 -30
  14. package/dist/a_chunks/.root20.js +34 -38
  15. package/dist/a_chunks/.root21.js +16 -18
  16. package/dist/a_chunks/.root22.js +34 -38
  17. package/dist/a_chunks/.root23.js +16 -18
  18. package/dist/a_chunks/.root24.js +10 -14
  19. package/dist/a_chunks/.root25.js +10 -14
  20. package/dist/a_chunks/.root26.js +10 -14
  21. package/dist/a_chunks/.root27.js +16 -27
  22. package/dist/a_chunks/.root28.js +15 -19
  23. package/dist/a_chunks/.root29.js +15 -19
  24. package/dist/a_chunks/.root3.js +4 -6
  25. package/dist/a_chunks/.root30.js +9 -14
  26. package/dist/a_chunks/.root31.js +2 -10
  27. package/dist/a_chunks/.root32.js +11 -19
  28. package/dist/a_chunks/.root33.js +308 -335
  29. package/dist/a_chunks/.root34.js +1 -2
  30. package/dist/a_chunks/.root35.js +14 -154
  31. package/dist/a_chunks/.root36.js +7 -21
  32. package/dist/a_chunks/.root37.js +183 -1481
  33. package/dist/a_chunks/.root38.js +32 -2496
  34. package/dist/a_chunks/.root39.js +56 -83
  35. package/dist/a_chunks/.root4.js +4 -6
  36. package/dist/a_chunks/.root40.js +3 -3
  37. package/dist/a_chunks/.root41.js +56 -83
  38. package/dist/a_chunks/.root42.js +6 -20
  39. package/dist/a_chunks/.root43.js +183 -1526
  40. package/dist/a_chunks/.root44.js +13 -19
  41. package/dist/a_chunks/.root45.js +55 -82
  42. package/dist/a_chunks/.root46.js +55 -82
  43. package/dist/a_chunks/.root47.js +5 -8
  44. package/dist/a_chunks/.root48.js +30 -22
  45. package/dist/a_chunks/.root49.js +30 -43
  46. package/dist/a_chunks/.root5.js +3 -3
  47. package/dist/a_chunks/.root50.js +53 -226
  48. package/dist/a_chunks/.root51.js +64 -188
  49. package/dist/a_chunks/.root52.js +113 -3122
  50. package/dist/a_chunks/.root53.js +85 -134
  51. package/dist/a_chunks/.root54.js +3071 -175
  52. package/dist/a_chunks/.root55.js +127 -478
  53. package/dist/a_chunks/.root56.js +170 -910
  54. package/dist/a_chunks/.root57.js +376 -399
  55. package/dist/a_chunks/.root58.js +808 -687
  56. package/dist/a_chunks/.root59.js +495 -118
  57. package/dist/a_chunks/.root6.js +6 -9
  58. package/dist/a_chunks/.root60.js +773 -45
  59. package/dist/a_chunks/.root61.js +738 -97
  60. package/dist/a_chunks/.root62.js +105 -273
  61. package/dist/a_chunks/.root63.js +38 -22
  62. package/dist/a_chunks/.root64.js +184 -16
  63. package/dist/a_chunks/.root65.js +107 -241
  64. package/dist/a_chunks/.root66.js +132 -0
  65. package/dist/a_chunks/.root67.js +286 -0
  66. package/dist/a_chunks/.root68.js +817 -0
  67. package/dist/a_chunks/.root69.js +28 -0
  68. package/dist/a_chunks/.root7.js +2 -42
  69. package/dist/a_chunks/.root70.js +19 -0
  70. package/dist/a_chunks/.root71.js +247 -0
  71. package/dist/a_chunks/.root8.js +2 -12
  72. package/dist/a_chunks/.root9.js +16 -26
  73. package/dist/a_chunks/Form.js +3 -5
  74. package/dist/a_chunks/ModalForm.js +254 -280
  75. package/dist/a_chunks/api.js +311 -325
  76. package/dist/a_chunks/common.js +0 -1
  77. package/dist/a_chunks/config.js +135 -164
  78. package/dist/a_chunks/form_config.js +11 -130
  79. package/dist/a_chunks/index.js +43 -57
  80. package/dist/a_chunks/index2.js +148 -64
  81. package/dist/a_chunks/index3.js +131 -1151
  82. package/dist/a_chunks/index4.js +57 -1040
  83. package/dist/a_chunks/index5.js +142 -0
  84. package/dist/a_chunks/index6.js +1169 -0
  85. package/dist/a_chunks/index7.js +1006 -0
  86. package/dist/a_chunks/style-inject.es.js +0 -1
  87. package/dist/a_chunks/tslib.es6.js +1 -2
  88. package/dist/a_chunks//344/275/223/346/240/274/346/243/200/346/237/245_config.js +0 -1
  89. package/dist/index.js +10 -5
  90. package/dist/pages/fubao/family-planning/file-management/doctor-desk/components/SurgicalRecordv2/Curettage/index.d.ts +1 -1
  91. package/dist/pages/fubao/family-planning/file-management/doctor-desk/components/VideoReport/method.d.ts +1 -1
  92. package/dist/pages/fubao/folic-acid/file-management/list/index copy.d.ts +1 -1
  93. package/dist/pages/fubao/gynecological-diseases/two-cancers/./344/270/244/347/231/214/351/232/217/350/256/277/index.d.ts +1 -1
  94. package/dist/pages/fubao/pre-pregnancy-care/file-management/edit/form_config.d.ts +2 -1
  95. package/dist/pages/fubao/pre-pregnancy-care/file-management/edit/index copy.d.ts +18 -0
  96. package/dist/pages/fubao/pre-pregnancy-care/file-management/edit/index.d.ts +3 -18
  97. package/dist/pages/fubao/premarital-care/.public-exam/SecondSex/form_config_nv.d.ts +4 -0
  98. package/dist/pages/fubao/premarital-care/file-management/config/table.d.ts +1 -1
  99. package/dist/pages/fubao/premarital-care/file-management/edit/form_config.d.ts +2 -1
  100. package/dist/pages/fubao/premarital-care/file-management/edit/index copy 2.d.ts +17 -0
  101. package/dist/pages/fubao/premarital-care/file-management/edit/index.d.ts +3 -17
  102. package/dist/pages/fubao/statistic/abnormal-breast-cancer/index.d.ts +2 -0
  103. package/dist/pages/fubao/statistic/abnormal-cervical-cancer/index.d.ts +2 -0
  104. package/dist/pages/fubao/statistic/premarital-checkup/./345/251/232/346/243/200/351/232/217/350/256/277/index.d.ts +1 -1
  105. package/dist/pages/fubao/statistic/progestation-checkup/./345/255/225/346/243/200/351/232/217/350/256/277/index.d.ts +1 -1
  106. package/dist/routes/index.d.ts +2 -0
  107. package/dist/routes/meta.d.ts +2 -0
  108. package/package.json +19 -14
  109. package/dist/a_chunks/.root.js.map +0 -1
  110. package/dist/a_chunks/.root10.js.map +0 -1
  111. package/dist/a_chunks/.root11.js.map +0 -1
  112. package/dist/a_chunks/.root12.js.map +0 -1
  113. package/dist/a_chunks/.root13.js.map +0 -1
  114. package/dist/a_chunks/.root14.js.map +0 -1
  115. package/dist/a_chunks/.root15.js.map +0 -1
  116. package/dist/a_chunks/.root16.js.map +0 -1
  117. package/dist/a_chunks/.root17.js.map +0 -1
  118. package/dist/a_chunks/.root18.js.map +0 -1
  119. package/dist/a_chunks/.root19.js.map +0 -1
  120. package/dist/a_chunks/.root2.js.map +0 -1
  121. package/dist/a_chunks/.root20.js.map +0 -1
  122. package/dist/a_chunks/.root21.js.map +0 -1
  123. package/dist/a_chunks/.root22.js.map +0 -1
  124. package/dist/a_chunks/.root23.js.map +0 -1
  125. package/dist/a_chunks/.root24.js.map +0 -1
  126. package/dist/a_chunks/.root25.js.map +0 -1
  127. package/dist/a_chunks/.root26.js.map +0 -1
  128. package/dist/a_chunks/.root27.js.map +0 -1
  129. package/dist/a_chunks/.root28.js.map +0 -1
  130. package/dist/a_chunks/.root29.js.map +0 -1
  131. package/dist/a_chunks/.root3.js.map +0 -1
  132. package/dist/a_chunks/.root30.js.map +0 -1
  133. package/dist/a_chunks/.root31.js.map +0 -1
  134. package/dist/a_chunks/.root32.js.map +0 -1
  135. package/dist/a_chunks/.root33.js.map +0 -1
  136. package/dist/a_chunks/.root34.js.map +0 -1
  137. package/dist/a_chunks/.root35.js.map +0 -1
  138. package/dist/a_chunks/.root36.js.map +0 -1
  139. package/dist/a_chunks/.root37.js.map +0 -1
  140. package/dist/a_chunks/.root38.js.map +0 -1
  141. package/dist/a_chunks/.root39.js.map +0 -1
  142. package/dist/a_chunks/.root4.js.map +0 -1
  143. package/dist/a_chunks/.root40.js.map +0 -1
  144. package/dist/a_chunks/.root41.js.map +0 -1
  145. package/dist/a_chunks/.root42.js.map +0 -1
  146. package/dist/a_chunks/.root43.js.map +0 -1
  147. package/dist/a_chunks/.root44.js.map +0 -1
  148. package/dist/a_chunks/.root45.js.map +0 -1
  149. package/dist/a_chunks/.root46.js.map +0 -1
  150. package/dist/a_chunks/.root47.js.map +0 -1
  151. package/dist/a_chunks/.root48.js.map +0 -1
  152. package/dist/a_chunks/.root49.js.map +0 -1
  153. package/dist/a_chunks/.root5.js.map +0 -1
  154. package/dist/a_chunks/.root50.js.map +0 -1
  155. package/dist/a_chunks/.root51.js.map +0 -1
  156. package/dist/a_chunks/.root52.js.map +0 -1
  157. package/dist/a_chunks/.root53.js.map +0 -1
  158. package/dist/a_chunks/.root54.js.map +0 -1
  159. package/dist/a_chunks/.root55.js.map +0 -1
  160. package/dist/a_chunks/.root56.js.map +0 -1
  161. package/dist/a_chunks/.root57.js.map +0 -1
  162. package/dist/a_chunks/.root58.js.map +0 -1
  163. package/dist/a_chunks/.root59.js.map +0 -1
  164. package/dist/a_chunks/.root6.js.map +0 -1
  165. package/dist/a_chunks/.root60.js.map +0 -1
  166. package/dist/a_chunks/.root61.js.map +0 -1
  167. package/dist/a_chunks/.root62.js.map +0 -1
  168. package/dist/a_chunks/.root63.js.map +0 -1
  169. package/dist/a_chunks/.root64.js.map +0 -1
  170. package/dist/a_chunks/.root65.js.map +0 -1
  171. package/dist/a_chunks/.root7.js.map +0 -1
  172. package/dist/a_chunks/.root8.js.map +0 -1
  173. package/dist/a_chunks/.root9.js.map +0 -1
  174. package/dist/a_chunks/Form.js.map +0 -1
  175. package/dist/a_chunks/ModalForm.js.map +0 -1
  176. package/dist/a_chunks/api.js.map +0 -1
  177. package/dist/a_chunks/common.js.map +0 -1
  178. package/dist/a_chunks/config.js.map +0 -1
  179. package/dist/a_chunks/extends.js +0 -11
  180. package/dist/a_chunks/extends.js.map +0 -1
  181. package/dist/a_chunks/form_config.js.map +0 -1
  182. package/dist/a_chunks/index.js.map +0 -1
  183. package/dist/a_chunks/index2.js.map +0 -1
  184. package/dist/a_chunks/index3.js.map +0 -1
  185. package/dist/a_chunks/index4.js.map +0 -1
  186. package/dist/a_chunks/style-inject.es.js.map +0 -1
  187. package/dist/a_chunks/tslib.es6.js.map +0 -1
  188. package/dist/a_chunks//344/275/223/346/240/274/346/243/200/346/237/245_config.js.map +0 -1
  189. package/dist/index.js.map +0 -1
  190. package/dist/pages/fubao/pre-pregnancy-care/.public-exam/config/adapter.d.ts +0 -2
  191. package/dist/pages/fubao/premarital-care/.public-exam/config/adapter.d.ts +0 -2
  192. /package/dist/pages/fubao/premarital-care/.public-exam/SecondSex/{form_config.d.ts → form_config_nan.d.ts} +0 -0
@@ -1,27 +1,12 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
- import 'antd/es/form/style';
3
- import _Form from 'antd/es/form';
4
- import 'antd/es/message/style';
5
- import _message from 'antd/es/message';
6
- import 'antd/es/popconfirm/style';
7
- import _Popconfirm from 'antd/es/popconfirm';
8
- import 'antd/es/divider/style';
9
- import _Divider from 'antd/es/divider';
10
- import 'antd/es/button/style';
11
- import _Button from 'antd/es/button';
12
- import _isNil from 'lodash/isNil';
13
- import _isArray from 'lodash/isArray';
14
- import _get from 'lodash/get';
15
- import { b as __extends, e as __rest, c as __assign, d as __spreadArray, _ as __awaiter, a as __generator } from './tslib.es6.js';
1
+ import { c as __extends, e as __rest, b as __assign, d as __spreadArray, _ as __awaiter, a as __generator } from './tslib.es6.js';
16
2
  import { EyeOutlined, PrinterOutlined, DeleteOutlined } from '@ant-design/icons';
17
3
  import { BaseQuery, BaseTableOld, APP_CONFIG, resolveFubaoPath, OkButton, fubaoHistoryPush, BaseListOld } from '@lm_fe/components_m';
18
4
  import { BF_Wrap2, useReadIdNO, MyBaseList, IdNOButton, mchcModal__ } from '@lm_fe/pages';
19
5
  import { formatRangeDate, fubaoRequest } from '@lm_fe/utils';
6
+ import { Tooltip, Form, Button, Divider, Popconfirm, message } from 'antd';
7
+ import { get, isArray, isNil } from 'lodash';
20
8
  import React, { useEffect } from 'react';
21
- import 'antd/es/tooltip/style';
22
- import _Tooltip from 'antd/es/tooltip';
23
- import { createMemoryHistory, createLocation, createPath, createBrowserHistory, createHashHistory } from 'history';
24
- import { _ as _extends } from './extends.js';
9
+ import { Link } from 'react-router-dom';
25
10
  import { ModelService } from '@lm_fe/service';
26
11
  var queryFormDescriptions = {
27
12
  filingDay: {
@@ -74,2454 +59,6 @@ var ProductsTable = function (_super) {
74
59
  }
75
60
  return ProductsTable;
76
61
  }(BaseTableOld);
77
- function _setPrototypeOf(t, e) {
78
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
79
- return t.__proto__ = e, t;
80
- }, _setPrototypeOf(t, e);
81
- }
82
- function _inheritsLoose(t, o) {
83
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
84
- }
85
- var propTypes = {
86
- exports: {}
87
- };
88
- var reactIs$1 = {
89
- exports: {}
90
- };
91
- var reactIs_production_min = {};
92
-
93
- /** @license React v16.13.1
94
- * react-is.production.min.js
95
- *
96
- * Copyright (c) Facebook, Inc. and its affiliates.
97
- *
98
- * This source code is licensed under the MIT license found in the
99
- * LICENSE file in the root directory of this source tree.
100
- */
101
- var b = "function" === typeof Symbol && Symbol["for"],
102
- c = b ? Symbol["for"]("react.element") : 60103,
103
- d = b ? Symbol["for"]("react.portal") : 60106,
104
- e = b ? Symbol["for"]("react.fragment") : 60107,
105
- f = b ? Symbol["for"]("react.strict_mode") : 60108,
106
- g = b ? Symbol["for"]("react.profiler") : 60114,
107
- h = b ? Symbol["for"]("react.provider") : 60109,
108
- k = b ? Symbol["for"]("react.context") : 60110,
109
- l = b ? Symbol["for"]("react.async_mode") : 60111,
110
- m = b ? Symbol["for"]("react.concurrent_mode") : 60111,
111
- n = b ? Symbol["for"]("react.forward_ref") : 60112,
112
- p = b ? Symbol["for"]("react.suspense") : 60113,
113
- q = b ? Symbol["for"]("react.suspense_list") : 60120,
114
- r = b ? Symbol["for"]("react.memo") : 60115,
115
- t = b ? Symbol["for"]("react.lazy") : 60116,
116
- v = b ? Symbol["for"]("react.block") : 60121,
117
- w = b ? Symbol["for"]("react.fundamental") : 60117,
118
- x = b ? Symbol["for"]("react.responder") : 60118,
119
- y = b ? Symbol["for"]("react.scope") : 60119;
120
- function z(a) {
121
- if ("object" === _typeof(a) && null !== a) {
122
- var u = a.$$typeof;
123
- switch (u) {
124
- case c:
125
- switch (a = a.type, a) {
126
- case l:
127
- case m:
128
- case e:
129
- case g:
130
- case f:
131
- case p:
132
- return a;
133
- default:
134
- switch (a = a && a.$$typeof, a) {
135
- case k:
136
- case n:
137
- case t:
138
- case r:
139
- case h:
140
- return a;
141
- default:
142
- return u;
143
- }
144
- }
145
- case d:
146
- return u;
147
- }
148
- }
149
- }
150
- function A(a) {
151
- return z(a) === m;
152
- }
153
- reactIs_production_min.AsyncMode = l;
154
- reactIs_production_min.ConcurrentMode = m;
155
- reactIs_production_min.ContextConsumer = k;
156
- reactIs_production_min.ContextProvider = h;
157
- reactIs_production_min.Element = c;
158
- reactIs_production_min.ForwardRef = n;
159
- reactIs_production_min.Fragment = e;
160
- reactIs_production_min.Lazy = t;
161
- reactIs_production_min.Memo = r;
162
- reactIs_production_min.Portal = d;
163
- reactIs_production_min.Profiler = g;
164
- reactIs_production_min.StrictMode = f;
165
- reactIs_production_min.Suspense = p;
166
- reactIs_production_min.isAsyncMode = function (a) {
167
- return A(a) || z(a) === l;
168
- };
169
- reactIs_production_min.isConcurrentMode = A;
170
- reactIs_production_min.isContextConsumer = function (a) {
171
- return z(a) === k;
172
- };
173
- reactIs_production_min.isContextProvider = function (a) {
174
- return z(a) === h;
175
- };
176
- reactIs_production_min.isElement = function (a) {
177
- return "object" === _typeof(a) && null !== a && a.$$typeof === c;
178
- };
179
- reactIs_production_min.isForwardRef = function (a) {
180
- return z(a) === n;
181
- };
182
- reactIs_production_min.isFragment = function (a) {
183
- return z(a) === e;
184
- };
185
- reactIs_production_min.isLazy = function (a) {
186
- return z(a) === t;
187
- };
188
- reactIs_production_min.isMemo = function (a) {
189
- return z(a) === r;
190
- };
191
- reactIs_production_min.isPortal = function (a) {
192
- return z(a) === d;
193
- };
194
- reactIs_production_min.isProfiler = function (a) {
195
- return z(a) === g;
196
- };
197
- reactIs_production_min.isStrictMode = function (a) {
198
- return z(a) === f;
199
- };
200
- reactIs_production_min.isSuspense = function (a) {
201
- return z(a) === p;
202
- };
203
- reactIs_production_min.isValidElementType = function (a) {
204
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === _typeof(a) && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
205
- };
206
- reactIs_production_min.typeOf = z;
207
- var reactIs_development = {};
208
-
209
- /** @license React v16.13.1
210
- * react-is.development.js
211
- *
212
- * Copyright (c) Facebook, Inc. and its affiliates.
213
- *
214
- * This source code is licensed under the MIT license found in the
215
- * LICENSE file in the root directory of this source tree.
216
- */
217
- if (process.env.NODE_ENV !== "production") {
218
- (function () {
219
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
220
- // nor polyfill, then a plain number is used for performance.
221
- var hasSymbol = typeof Symbol === 'function' && Symbol["for"];
222
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol["for"]('react.element') : 0xeac7;
223
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol["for"]('react.portal') : 0xeaca;
224
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol["for"]('react.fragment') : 0xeacb;
225
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol["for"]('react.strict_mode') : 0xeacc;
226
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol["for"]('react.profiler') : 0xead2;
227
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol["for"]('react.provider') : 0xeacd;
228
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol["for"]('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
229
- // (unstable) APIs that have been removed. Can we remove the symbols?
230
-
231
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol["for"]('react.async_mode') : 0xeacf;
232
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol["for"]('react.concurrent_mode') : 0xeacf;
233
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol["for"]('react.forward_ref') : 0xead0;
234
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol["for"]('react.suspense') : 0xead1;
235
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol["for"]('react.suspense_list') : 0xead8;
236
- var REACT_MEMO_TYPE = hasSymbol ? Symbol["for"]('react.memo') : 0xead3;
237
- var REACT_LAZY_TYPE = hasSymbol ? Symbol["for"]('react.lazy') : 0xead4;
238
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol["for"]('react.block') : 0xead9;
239
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol["for"]('react.fundamental') : 0xead5;
240
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol["for"]('react.responder') : 0xead6;
241
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol["for"]('react.scope') : 0xead7;
242
- function isValidElementType(type) {
243
- return typeof type === 'string' || typeof type === 'function' ||
244
- // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
245
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || _typeof(type) === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
246
- }
247
- function typeOf(object) {
248
- if (_typeof(object) === 'object' && object !== null) {
249
- var $$typeof = object.$$typeof;
250
- switch ($$typeof) {
251
- case REACT_ELEMENT_TYPE:
252
- var type = object.type;
253
- switch (type) {
254
- case REACT_ASYNC_MODE_TYPE:
255
- case REACT_CONCURRENT_MODE_TYPE:
256
- case REACT_FRAGMENT_TYPE:
257
- case REACT_PROFILER_TYPE:
258
- case REACT_STRICT_MODE_TYPE:
259
- case REACT_SUSPENSE_TYPE:
260
- return type;
261
- default:
262
- var $$typeofType = type && type.$$typeof;
263
- switch ($$typeofType) {
264
- case REACT_CONTEXT_TYPE:
265
- case REACT_FORWARD_REF_TYPE:
266
- case REACT_LAZY_TYPE:
267
- case REACT_MEMO_TYPE:
268
- case REACT_PROVIDER_TYPE:
269
- return $$typeofType;
270
- default:
271
- return $$typeof;
272
- }
273
- }
274
- case REACT_PORTAL_TYPE:
275
- return $$typeof;
276
- }
277
- }
278
- return undefined;
279
- } // AsyncMode is deprecated along with isAsyncMode
280
-
281
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
282
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
283
- var ContextConsumer = REACT_CONTEXT_TYPE;
284
- var ContextProvider = REACT_PROVIDER_TYPE;
285
- var Element = REACT_ELEMENT_TYPE;
286
- var ForwardRef = REACT_FORWARD_REF_TYPE;
287
- var Fragment = REACT_FRAGMENT_TYPE;
288
- var Lazy = REACT_LAZY_TYPE;
289
- var Memo = REACT_MEMO_TYPE;
290
- var Portal = REACT_PORTAL_TYPE;
291
- var Profiler = REACT_PROFILER_TYPE;
292
- var StrictMode = REACT_STRICT_MODE_TYPE;
293
- var Suspense = REACT_SUSPENSE_TYPE;
294
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
295
-
296
- function isAsyncMode(object) {
297
- {
298
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
299
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
300
-
301
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
302
- }
303
- }
304
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
305
- }
306
- function isConcurrentMode(object) {
307
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
308
- }
309
- function isContextConsumer(object) {
310
- return typeOf(object) === REACT_CONTEXT_TYPE;
311
- }
312
- function isContextProvider(object) {
313
- return typeOf(object) === REACT_PROVIDER_TYPE;
314
- }
315
- function isElement(object) {
316
- return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
317
- }
318
- function isForwardRef(object) {
319
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
320
- }
321
- function isFragment(object) {
322
- return typeOf(object) === REACT_FRAGMENT_TYPE;
323
- }
324
- function isLazy(object) {
325
- return typeOf(object) === REACT_LAZY_TYPE;
326
- }
327
- function isMemo(object) {
328
- return typeOf(object) === REACT_MEMO_TYPE;
329
- }
330
- function isPortal(object) {
331
- return typeOf(object) === REACT_PORTAL_TYPE;
332
- }
333
- function isProfiler(object) {
334
- return typeOf(object) === REACT_PROFILER_TYPE;
335
- }
336
- function isStrictMode(object) {
337
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
338
- }
339
- function isSuspense(object) {
340
- return typeOf(object) === REACT_SUSPENSE_TYPE;
341
- }
342
- reactIs_development.AsyncMode = AsyncMode;
343
- reactIs_development.ConcurrentMode = ConcurrentMode;
344
- reactIs_development.ContextConsumer = ContextConsumer;
345
- reactIs_development.ContextProvider = ContextProvider;
346
- reactIs_development.Element = Element;
347
- reactIs_development.ForwardRef = ForwardRef;
348
- reactIs_development.Fragment = Fragment;
349
- reactIs_development.Lazy = Lazy;
350
- reactIs_development.Memo = Memo;
351
- reactIs_development.Portal = Portal;
352
- reactIs_development.Profiler = Profiler;
353
- reactIs_development.StrictMode = StrictMode;
354
- reactIs_development.Suspense = Suspense;
355
- reactIs_development.isAsyncMode = isAsyncMode;
356
- reactIs_development.isConcurrentMode = isConcurrentMode;
357
- reactIs_development.isContextConsumer = isContextConsumer;
358
- reactIs_development.isContextProvider = isContextProvider;
359
- reactIs_development.isElement = isElement;
360
- reactIs_development.isForwardRef = isForwardRef;
361
- reactIs_development.isFragment = isFragment;
362
- reactIs_development.isLazy = isLazy;
363
- reactIs_development.isMemo = isMemo;
364
- reactIs_development.isPortal = isPortal;
365
- reactIs_development.isProfiler = isProfiler;
366
- reactIs_development.isStrictMode = isStrictMode;
367
- reactIs_development.isSuspense = isSuspense;
368
- reactIs_development.isValidElementType = isValidElementType;
369
- reactIs_development.typeOf = typeOf;
370
- })();
371
- }
372
- if (process.env.NODE_ENV === 'production') {
373
- reactIs$1.exports = reactIs_production_min;
374
- } else {
375
- reactIs$1.exports = reactIs_development;
376
- }
377
-
378
- /*
379
- object-assign
380
- (c) Sindre Sorhus
381
- @license MIT
382
- */
383
- /* eslint-disable no-unused-vars */
384
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
385
- var hasOwnProperty = Object.prototype.hasOwnProperty;
386
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
387
- function toObject(val) {
388
- if (val === null || val === undefined) {
389
- throw new TypeError('Object.assign cannot be called with null or undefined');
390
- }
391
- return Object(val);
392
- }
393
- function shouldUseNative() {
394
- try {
395
- if (!Object.assign) {
396
- return false;
397
- }
398
-
399
- // Detect buggy property enumeration order in older V8 versions.
400
-
401
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
402
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
403
- test1[5] = 'de';
404
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
405
- return false;
406
- }
407
-
408
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
409
- var test2 = {};
410
- for (var i = 0; i < 10; i++) {
411
- test2['_' + String.fromCharCode(i)] = i;
412
- }
413
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
414
- return test2[n];
415
- });
416
- if (order2.join('') !== '0123456789') {
417
- return false;
418
- }
419
-
420
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
421
- var test3 = {};
422
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
423
- test3[letter] = letter;
424
- });
425
- if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
426
- return false;
427
- }
428
- return true;
429
- } catch (err) {
430
- // We don't expect any of the above to throw, but better to be safe.
431
- return false;
432
- }
433
- }
434
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
435
- var from;
436
- var to = toObject(target);
437
- var symbols;
438
- for (var s = 1; s < arguments.length; s++) {
439
- from = Object(arguments[s]);
440
- for (var key in from) {
441
- if (hasOwnProperty.call(from, key)) {
442
- to[key] = from[key];
443
- }
444
- }
445
- if (getOwnPropertySymbols) {
446
- symbols = getOwnPropertySymbols(from);
447
- for (var i = 0; i < symbols.length; i++) {
448
- if (propIsEnumerable.call(from, symbols[i])) {
449
- to[symbols[i]] = from[symbols[i]];
450
- }
451
- }
452
- }
453
- }
454
- return to;
455
- };
456
-
457
- /**
458
- * Copyright (c) 2013-present, Facebook, Inc.
459
- *
460
- * This source code is licensed under the MIT license found in the
461
- * LICENSE file in the root directory of this source tree.
462
- */
463
- var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
464
- var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
465
- var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
466
-
467
- /**
468
- * Copyright (c) 2013-present, Facebook, Inc.
469
- *
470
- * This source code is licensed under the MIT license found in the
471
- * LICENSE file in the root directory of this source tree.
472
- */
473
- var printWarning$1 = function printWarning$1() {};
474
- if (process.env.NODE_ENV !== 'production') {
475
- var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
476
- var loggedTypeFailures = {};
477
- var has$1 = has$2;
478
- printWarning$1 = function printWarning$1(text) {
479
- var message = 'Warning: ' + text;
480
- if (typeof console !== 'undefined') {
481
- console.error(message);
482
- }
483
- try {
484
- // --- Welcome to debugging React ---
485
- // This error was thrown as a convenience so that you can use this stack
486
- // to find the callsite that caused this warning to fire.
487
- throw new Error(message);
488
- } catch (x) {/**/}
489
- };
490
- }
491
-
492
- /**
493
- * Assert that the values match with the type specs.
494
- * Error messages are memorized and will only be shown once.
495
- *
496
- * @param {object} typeSpecs Map of name to a ReactPropType
497
- * @param {object} values Runtime values that need to be type-checked
498
- * @param {string} location e.g. "prop", "context", "child context"
499
- * @param {string} componentName Name of the component for error messages.
500
- * @param {?Function} getStack Returns the component stack.
501
- * @private
502
- */
503
- function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
504
- if (process.env.NODE_ENV !== 'production') {
505
- for (var typeSpecName in typeSpecs) {
506
- if (has$1(typeSpecs, typeSpecName)) {
507
- var error;
508
- // Prop type validation may throw. In case they do, we don't want to
509
- // fail the render phase where it didn't fail before. So we log it.
510
- // After these have been cleaned up, we'll let them throw.
511
- try {
512
- // This is intentionally an invariant that gets caught. It's the same
513
- // behavior as without this statement except with a better message.
514
- if (typeof typeSpecs[typeSpecName] !== 'function') {
515
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + _typeof(typeSpecs[typeSpecName]) + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
516
- err.name = 'Invariant Violation';
517
- throw err;
518
- }
519
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
520
- } catch (ex) {
521
- error = ex;
522
- }
523
- if (error && !(error instanceof Error)) {
524
- printWarning$1((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
525
- }
526
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
527
- // Only monitor this failure once because there tends to be a lot of the
528
- // same error.
529
- loggedTypeFailures[error.message] = true;
530
- var stack = getStack ? getStack() : '';
531
- printWarning$1('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
532
- }
533
- }
534
- }
535
- }
536
- }
537
-
538
- /**
539
- * Resets warning cache when testing.
540
- *
541
- * @private
542
- */
543
- checkPropTypes$1.resetWarningCache = function () {
544
- if (process.env.NODE_ENV !== 'production') {
545
- loggedTypeFailures = {};
546
- }
547
- };
548
- var checkPropTypes_1 = checkPropTypes$1;
549
-
550
- /**
551
- * Copyright (c) 2013-present, Facebook, Inc.
552
- *
553
- * This source code is licensed under the MIT license found in the
554
- * LICENSE file in the root directory of this source tree.
555
- */
556
- var ReactIs$1 = reactIs$1.exports;
557
- var assign = objectAssign;
558
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
559
- var has = has$2;
560
- var checkPropTypes = checkPropTypes_1;
561
- var printWarning = function printWarning() {};
562
- if (process.env.NODE_ENV !== 'production') {
563
- printWarning = function printWarning(text) {
564
- var message = 'Warning: ' + text;
565
- if (typeof console !== 'undefined') {
566
- console.error(message);
567
- }
568
- try {
569
- // --- Welcome to debugging React ---
570
- // This error was thrown as a convenience so that you can use this stack
571
- // to find the callsite that caused this warning to fire.
572
- throw new Error(message);
573
- } catch (x) {}
574
- };
575
- }
576
- function emptyFunctionThatReturnsNull() {
577
- return null;
578
- }
579
- var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) {
580
- /* global Symbol */
581
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
582
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
583
-
584
- /**
585
- * Returns the iterator method function contained on the iterable object.
586
- *
587
- * Be sure to invoke the function with the iterable as context:
588
- *
589
- * var iteratorFn = getIteratorFn(myIterable);
590
- * if (iteratorFn) {
591
- * var iterator = iteratorFn.call(myIterable);
592
- * ...
593
- * }
594
- *
595
- * @param {?object} maybeIterable
596
- * @return {?function}
597
- */
598
- function getIteratorFn(maybeIterable) {
599
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
600
- if (typeof iteratorFn === 'function') {
601
- return iteratorFn;
602
- }
603
- }
604
-
605
- /**
606
- * Collection of methods that allow declaration and validation of props that are
607
- * supplied to React components. Example usage:
608
- *
609
- * var Props = require('ReactPropTypes');
610
- * var MyArticle = React.createClass({
611
- * propTypes: {
612
- * // An optional string prop named "description".
613
- * description: Props.string,
614
- *
615
- * // A required enum prop named "category".
616
- * category: Props.oneOf(['News','Photos']).isRequired,
617
- *
618
- * // A prop named "dialog" that requires an instance of Dialog.
619
- * dialog: Props.instanceOf(Dialog).isRequired
620
- * },
621
- * render: function() { ... }
622
- * });
623
- *
624
- * A more formal specification of how these methods are used:
625
- *
626
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
627
- * decl := ReactPropTypes.{type}(.isRequired)?
628
- *
629
- * Each and every declaration produces a function with the same signature. This
630
- * allows the creation of custom validation functions. For example:
631
- *
632
- * var MyLink = React.createClass({
633
- * propTypes: {
634
- * // An optional string or URI prop named "href".
635
- * href: function(props, propName, componentName) {
636
- * var propValue = props[propName];
637
- * if (propValue != null && typeof propValue !== 'string' &&
638
- * !(propValue instanceof URI)) {
639
- * return new Error(
640
- * 'Expected a string or an URI for ' + propName + ' in ' +
641
- * componentName
642
- * );
643
- * }
644
- * }
645
- * },
646
- * render: function() {...}
647
- * });
648
- *
649
- * @internal
650
- */
651
-
652
- var ANONYMOUS = '<<anonymous>>';
653
-
654
- // Important!
655
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
656
- var ReactPropTypes = {
657
- array: createPrimitiveTypeChecker('array'),
658
- bigint: createPrimitiveTypeChecker('bigint'),
659
- bool: createPrimitiveTypeChecker('boolean'),
660
- func: createPrimitiveTypeChecker('function'),
661
- number: createPrimitiveTypeChecker('number'),
662
- object: createPrimitiveTypeChecker('object'),
663
- string: createPrimitiveTypeChecker('string'),
664
- symbol: createPrimitiveTypeChecker('symbol'),
665
- any: createAnyTypeChecker(),
666
- arrayOf: createArrayOfTypeChecker,
667
- element: createElementTypeChecker(),
668
- elementType: createElementTypeTypeChecker(),
669
- instanceOf: createInstanceTypeChecker,
670
- node: createNodeChecker(),
671
- objectOf: createObjectOfTypeChecker,
672
- oneOf: createEnumTypeChecker,
673
- oneOfType: createUnionTypeChecker,
674
- shape: createShapeTypeChecker,
675
- exact: createStrictShapeTypeChecker
676
- };
677
-
678
- /**
679
- * inlined Object.is polyfill to avoid requiring consumers ship their own
680
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
681
- */
682
- /*eslint-disable no-self-compare*/
683
- function is(x, y) {
684
- // SameValue algorithm
685
- if (x === y) {
686
- // Steps 1-5, 7-10
687
- // Steps 6.b-6.e: +0 != -0
688
- return x !== 0 || 1 / x === 1 / y;
689
- } else {
690
- // Step 6.a: NaN == NaN
691
- return x !== x && y !== y;
692
- }
693
- }
694
- /*eslint-enable no-self-compare*/
695
-
696
- /**
697
- * We use an Error-like object for backward compatibility as people may call
698
- * PropTypes directly and inspect their output. However, we don't use real
699
- * Errors anymore. We don't inspect their stack anyway, and creating them
700
- * is prohibitively expensive if they are created too often, such as what
701
- * happens in oneOfType() for any type before the one that matched.
702
- */
703
- function PropTypeError(message, data) {
704
- this.message = message;
705
- this.data = data && _typeof(data) === 'object' ? data : {};
706
- this.stack = '';
707
- }
708
- // Make `instanceof Error` still work for returned errors.
709
- PropTypeError.prototype = Error.prototype;
710
- function createChainableTypeChecker(validate) {
711
- if (process.env.NODE_ENV !== 'production') {
712
- var manualPropTypeCallCache = {};
713
- var manualPropTypeWarningCount = 0;
714
- }
715
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
716
- componentName = componentName || ANONYMOUS;
717
- propFullName = propFullName || propName;
718
- if (secret !== ReactPropTypesSecret$1) {
719
- if (throwOnDirectAccess) {
720
- // New behavior only for users of `prop-types` package
721
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
722
- err.name = 'Invariant Violation';
723
- throw err;
724
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
725
- // Old behavior for people using React.PropTypes
726
- var cacheKey = componentName + ':' + propName;
727
- if (!manualPropTypeCallCache[cacheKey] &&
728
- // Avoid spamming the console because they are often not actionable except for lib authors
729
- manualPropTypeWarningCount < 3) {
730
- printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
731
- manualPropTypeCallCache[cacheKey] = true;
732
- manualPropTypeWarningCount++;
733
- }
734
- }
735
- }
736
- if (props[propName] == null) {
737
- if (isRequired) {
738
- if (props[propName] === null) {
739
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
740
- }
741
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
742
- }
743
- return null;
744
- } else {
745
- return validate(props, propName, componentName, location, propFullName);
746
- }
747
- }
748
- var chainedCheckType = checkType.bind(null, false);
749
- chainedCheckType.isRequired = checkType.bind(null, true);
750
- return chainedCheckType;
751
- }
752
- function createPrimitiveTypeChecker(expectedType) {
753
- function validate(props, propName, componentName, location, propFullName, secret) {
754
- var propValue = props[propName];
755
- var propType = getPropType(propValue);
756
- if (propType !== expectedType) {
757
- // `propValue` being instance of, say, date/regexp, pass the 'object'
758
- // check, but we can offer a more precise error message here rather than
759
- // 'of type `object`'.
760
- var preciseType = getPreciseType(propValue);
761
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
762
- expectedType: expectedType
763
- });
764
- }
765
- return null;
766
- }
767
- return createChainableTypeChecker(validate);
768
- }
769
- function createAnyTypeChecker() {
770
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
771
- }
772
- function createArrayOfTypeChecker(typeChecker) {
773
- function validate(props, propName, componentName, location, propFullName) {
774
- if (typeof typeChecker !== 'function') {
775
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
776
- }
777
- var propValue = props[propName];
778
- if (!Array.isArray(propValue)) {
779
- var propType = getPropType(propValue);
780
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
781
- }
782
- for (var i = 0; i < propValue.length; i++) {
783
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
784
- if (error instanceof Error) {
785
- return error;
786
- }
787
- }
788
- return null;
789
- }
790
- return createChainableTypeChecker(validate);
791
- }
792
- function createElementTypeChecker() {
793
- function validate(props, propName, componentName, location, propFullName) {
794
- var propValue = props[propName];
795
- if (!isValidElement(propValue)) {
796
- var propType = getPropType(propValue);
797
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
798
- }
799
- return null;
800
- }
801
- return createChainableTypeChecker(validate);
802
- }
803
- function createElementTypeTypeChecker() {
804
- function validate(props, propName, componentName, location, propFullName) {
805
- var propValue = props[propName];
806
- if (!ReactIs$1.isValidElementType(propValue)) {
807
- var propType = getPropType(propValue);
808
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
809
- }
810
- return null;
811
- }
812
- return createChainableTypeChecker(validate);
813
- }
814
- function createInstanceTypeChecker(expectedClass) {
815
- function validate(props, propName, componentName, location, propFullName) {
816
- if (!(props[propName] instanceof expectedClass)) {
817
- var expectedClassName = expectedClass.name || ANONYMOUS;
818
- var actualClassName = getClassName(props[propName]);
819
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
820
- }
821
- return null;
822
- }
823
- return createChainableTypeChecker(validate);
824
- }
825
- function createEnumTypeChecker(expectedValues) {
826
- if (!Array.isArray(expectedValues)) {
827
- if (process.env.NODE_ENV !== 'production') {
828
- if (arguments.length > 1) {
829
- printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
830
- } else {
831
- printWarning('Invalid argument supplied to oneOf, expected an array.');
832
- }
833
- }
834
- return emptyFunctionThatReturnsNull;
835
- }
836
- function validate(props, propName, componentName, location, propFullName) {
837
- var propValue = props[propName];
838
- for (var i = 0; i < expectedValues.length; i++) {
839
- if (is(propValue, expectedValues[i])) {
840
- return null;
841
- }
842
- }
843
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
844
- var type = getPreciseType(value);
845
- if (type === 'symbol') {
846
- return String(value);
847
- }
848
- return value;
849
- });
850
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
851
- }
852
- return createChainableTypeChecker(validate);
853
- }
854
- function createObjectOfTypeChecker(typeChecker) {
855
- function validate(props, propName, componentName, location, propFullName) {
856
- if (typeof typeChecker !== 'function') {
857
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
858
- }
859
- var propValue = props[propName];
860
- var propType = getPropType(propValue);
861
- if (propType !== 'object') {
862
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
863
- }
864
- for (var key in propValue) {
865
- if (has(propValue, key)) {
866
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
867
- if (error instanceof Error) {
868
- return error;
869
- }
870
- }
871
- }
872
- return null;
873
- }
874
- return createChainableTypeChecker(validate);
875
- }
876
- function createUnionTypeChecker(arrayOfTypeCheckers) {
877
- if (!Array.isArray(arrayOfTypeCheckers)) {
878
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
879
- return emptyFunctionThatReturnsNull;
880
- }
881
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
882
- var checker = arrayOfTypeCheckers[i];
883
- if (typeof checker !== 'function') {
884
- printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
885
- return emptyFunctionThatReturnsNull;
886
- }
887
- }
888
- function validate(props, propName, componentName, location, propFullName) {
889
- var expectedTypes = [];
890
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
891
- var checker = arrayOfTypeCheckers[i];
892
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
893
- if (checkerResult == null) {
894
- return null;
895
- }
896
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
897
- expectedTypes.push(checkerResult.data.expectedType);
898
- }
899
- }
900
- var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
901
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
902
- }
903
- return createChainableTypeChecker(validate);
904
- }
905
- function createNodeChecker() {
906
- function validate(props, propName, componentName, location, propFullName) {
907
- if (!isNode(props[propName])) {
908
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
909
- }
910
- return null;
911
- }
912
- return createChainableTypeChecker(validate);
913
- }
914
- function invalidValidatorError(componentName, location, propFullName, key, type) {
915
- return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
916
- }
917
- function createShapeTypeChecker(shapeTypes) {
918
- function validate(props, propName, componentName, location, propFullName) {
919
- var propValue = props[propName];
920
- var propType = getPropType(propValue);
921
- if (propType !== 'object') {
922
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
923
- }
924
- for (var key in shapeTypes) {
925
- var checker = shapeTypes[key];
926
- if (typeof checker !== 'function') {
927
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
928
- }
929
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
930
- if (error) {
931
- return error;
932
- }
933
- }
934
- return null;
935
- }
936
- return createChainableTypeChecker(validate);
937
- }
938
- function createStrictShapeTypeChecker(shapeTypes) {
939
- function validate(props, propName, componentName, location, propFullName) {
940
- var propValue = props[propName];
941
- var propType = getPropType(propValue);
942
- if (propType !== 'object') {
943
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
944
- }
945
- // We need to check all keys in case some are required but missing from props.
946
- var allKeys = assign({}, props[propName], shapeTypes);
947
- for (var key in allKeys) {
948
- var checker = shapeTypes[key];
949
- if (has(shapeTypes, key) && typeof checker !== 'function') {
950
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
951
- }
952
- if (!checker) {
953
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
954
- }
955
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
956
- if (error) {
957
- return error;
958
- }
959
- }
960
- return null;
961
- }
962
- return createChainableTypeChecker(validate);
963
- }
964
- function isNode(propValue) {
965
- switch (_typeof(propValue)) {
966
- case 'number':
967
- case 'string':
968
- case 'undefined':
969
- return true;
970
- case 'boolean':
971
- return !propValue;
972
- case 'object':
973
- if (Array.isArray(propValue)) {
974
- return propValue.every(isNode);
975
- }
976
- if (propValue === null || isValidElement(propValue)) {
977
- return true;
978
- }
979
- var iteratorFn = getIteratorFn(propValue);
980
- if (iteratorFn) {
981
- var iterator = iteratorFn.call(propValue);
982
- var step;
983
- if (iteratorFn !== propValue.entries) {
984
- while (!(step = iterator.next()).done) {
985
- if (!isNode(step.value)) {
986
- return false;
987
- }
988
- }
989
- } else {
990
- // Iterator will provide entry [k,v] tuples rather than values.
991
- while (!(step = iterator.next()).done) {
992
- var entry = step.value;
993
- if (entry) {
994
- if (!isNode(entry[1])) {
995
- return false;
996
- }
997
- }
998
- }
999
- }
1000
- } else {
1001
- return false;
1002
- }
1003
- return true;
1004
- default:
1005
- return false;
1006
- }
1007
- }
1008
- function isSymbol(propType, propValue) {
1009
- // Native Symbol.
1010
- if (propType === 'symbol') {
1011
- return true;
1012
- }
1013
-
1014
- // falsy value can't be a Symbol
1015
- if (!propValue) {
1016
- return false;
1017
- }
1018
-
1019
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1020
- if (propValue['@@toStringTag'] === 'Symbol') {
1021
- return true;
1022
- }
1023
-
1024
- // Fallback for non-spec compliant Symbols which are polyfilled.
1025
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1026
- return true;
1027
- }
1028
- return false;
1029
- }
1030
-
1031
- // Equivalent of `typeof` but with special handling for array and regexp.
1032
- function getPropType(propValue) {
1033
- var propType = _typeof(propValue);
1034
- if (Array.isArray(propValue)) {
1035
- return 'array';
1036
- }
1037
- if (propValue instanceof RegExp) {
1038
- // Old webkits (at least until Android 4.0) return 'function' rather than
1039
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1040
- // passes PropTypes.object.
1041
- return 'object';
1042
- }
1043
- if (isSymbol(propType, propValue)) {
1044
- return 'symbol';
1045
- }
1046
- return propType;
1047
- }
1048
-
1049
- // This handles more types than `getPropType`. Only used for error messages.
1050
- // See `createPrimitiveTypeChecker`.
1051
- function getPreciseType(propValue) {
1052
- if (typeof propValue === 'undefined' || propValue === null) {
1053
- return '' + propValue;
1054
- }
1055
- var propType = getPropType(propValue);
1056
- if (propType === 'object') {
1057
- if (propValue instanceof Date) {
1058
- return 'date';
1059
- } else if (propValue instanceof RegExp) {
1060
- return 'regexp';
1061
- }
1062
- }
1063
- return propType;
1064
- }
1065
-
1066
- // Returns a string that is postfixed to a warning about an invalid type.
1067
- // For example, "undefined" or "of type array"
1068
- function getPostfixForTypeWarning(value) {
1069
- var type = getPreciseType(value);
1070
- switch (type) {
1071
- case 'array':
1072
- case 'object':
1073
- return 'an ' + type;
1074
- case 'boolean':
1075
- case 'date':
1076
- case 'regexp':
1077
- return 'a ' + type;
1078
- default:
1079
- return type;
1080
- }
1081
- }
1082
-
1083
- // Returns class name of the object, if any.
1084
- function getClassName(propValue) {
1085
- if (!propValue.constructor || !propValue.constructor.name) {
1086
- return ANONYMOUS;
1087
- }
1088
- return propValue.constructor.name;
1089
- }
1090
- ReactPropTypes.checkPropTypes = checkPropTypes;
1091
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1092
- ReactPropTypes.PropTypes = ReactPropTypes;
1093
- return ReactPropTypes;
1094
- };
1095
-
1096
- /**
1097
- * Copyright (c) 2013-present, Facebook, Inc.
1098
- *
1099
- * This source code is licensed under the MIT license found in the
1100
- * LICENSE file in the root directory of this source tree.
1101
- */
1102
- var ReactPropTypesSecret = ReactPropTypesSecret_1;
1103
- function emptyFunction() {}
1104
- function emptyFunctionWithReset() {}
1105
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
1106
- var factoryWithThrowingShims = function factoryWithThrowingShims() {
1107
- function shim(props, propName, componentName, location, propFullName, secret) {
1108
- if (secret === ReactPropTypesSecret) {
1109
- // It is still safe when called from React.
1110
- return;
1111
- }
1112
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
1113
- err.name = 'Invariant Violation';
1114
- throw err;
1115
- }
1116
- shim.isRequired = shim;
1117
- function getShim() {
1118
- return shim;
1119
- }
1120
- // Important!
1121
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1122
- var ReactPropTypes = {
1123
- array: shim,
1124
- bigint: shim,
1125
- bool: shim,
1126
- func: shim,
1127
- number: shim,
1128
- object: shim,
1129
- string: shim,
1130
- symbol: shim,
1131
- any: shim,
1132
- arrayOf: getShim,
1133
- element: shim,
1134
- elementType: shim,
1135
- instanceOf: getShim,
1136
- node: shim,
1137
- objectOf: getShim,
1138
- oneOf: getShim,
1139
- oneOfType: getShim,
1140
- shape: getShim,
1141
- exact: getShim,
1142
- checkPropTypes: emptyFunctionWithReset,
1143
- resetWarningCache: emptyFunction
1144
- };
1145
- ReactPropTypes.PropTypes = ReactPropTypes;
1146
- return ReactPropTypes;
1147
- };
1148
-
1149
- /**
1150
- * Copyright (c) 2013-present, Facebook, Inc.
1151
- *
1152
- * This source code is licensed under the MIT license found in the
1153
- * LICENSE file in the root directory of this source tree.
1154
- */
1155
- if (process.env.NODE_ENV !== 'production') {
1156
- var ReactIs = reactIs$1.exports;
1157
-
1158
- // By explicitly using `prop-types` you are opting into new development behavior.
1159
- // http://fb.me/prop-types-in-prod
1160
- var throwOnDirectAccess = true;
1161
- propTypes.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
1162
- } else {
1163
- // By explicitly using `prop-types` you are opting into new production behavior.
1164
- // http://fb.me/prop-types-in-prod
1165
- propTypes.exports = factoryWithThrowingShims();
1166
- }
1167
- var PropTypes = propTypes.exports;
1168
- var isProduction$1 = process.env.NODE_ENV === 'production';
1169
- function warning(condition, message) {
1170
- if (!isProduction$1) {
1171
- if (condition) {
1172
- return;
1173
- }
1174
- var text = "Warning: " + message;
1175
- if (typeof console !== 'undefined') {
1176
- console.warn(text);
1177
- }
1178
- try {
1179
- throw Error(text);
1180
- } catch (x) {}
1181
- }
1182
- }
1183
- var isProduction = process.env.NODE_ENV === 'production';
1184
- var prefix = 'Invariant failed';
1185
- function invariant(condition, message) {
1186
- if (condition) {
1187
- return;
1188
- }
1189
- if (isProduction) {
1190
- throw new Error(prefix);
1191
- }
1192
- var provided = typeof message === 'function' ? message() : message;
1193
- var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
1194
- throw new Error(value);
1195
- }
1196
- var pathToRegexp$2 = {
1197
- exports: {}
1198
- };
1199
- var isarray$1 = Array.isArray || function (arr) {
1200
- return Object.prototype.toString.call(arr) == '[object Array]';
1201
- };
1202
- var isarray = isarray$1;
1203
-
1204
- /**
1205
- * Expose `pathToRegexp`.
1206
- */
1207
- pathToRegexp$2.exports = pathToRegexp;
1208
- pathToRegexp$2.exports.parse = parse;
1209
- pathToRegexp$2.exports.compile = compile;
1210
- pathToRegexp$2.exports.tokensToFunction = tokensToFunction;
1211
- pathToRegexp$2.exports.tokensToRegExp = tokensToRegExp;
1212
-
1213
- /**
1214
- * The main path matching regexp utility.
1215
- *
1216
- * @type {RegExp}
1217
- */
1218
- var PATH_REGEXP = new RegExp([
1219
- // Match escaped characters that would otherwise appear in future matches.
1220
- // This allows the user to escape special characters that won't transform.
1221
- '(\\\\.)',
1222
- // Match Express-style parameters and un-named parameters with a prefix
1223
- // and optional suffixes. Matches appear as:
1224
- //
1225
- // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
1226
- // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
1227
- // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
1228
- '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'].join('|'), 'g');
1229
-
1230
- /**
1231
- * Parse a string for the raw tokens.
1232
- *
1233
- * @param {string} str
1234
- * @param {Object=} options
1235
- * @return {!Array}
1236
- */
1237
- function parse(str, options) {
1238
- var tokens = [];
1239
- var key = 0;
1240
- var index = 0;
1241
- var path = '';
1242
- var defaultDelimiter = options && options.delimiter || '/';
1243
- var res;
1244
- while ((res = PATH_REGEXP.exec(str)) != null) {
1245
- var m = res[0];
1246
- var escaped = res[1];
1247
- var offset = res.index;
1248
- path += str.slice(index, offset);
1249
- index = offset + m.length;
1250
-
1251
- // Ignore already escaped sequences.
1252
- if (escaped) {
1253
- path += escaped[1];
1254
- continue;
1255
- }
1256
- var next = str[index];
1257
- var prefix = res[2];
1258
- var name = res[3];
1259
- var capture = res[4];
1260
- var group = res[5];
1261
- var modifier = res[6];
1262
- var asterisk = res[7];
1263
-
1264
- // Push the current path onto the tokens.
1265
- if (path) {
1266
- tokens.push(path);
1267
- path = '';
1268
- }
1269
- var partial = prefix != null && next != null && next !== prefix;
1270
- var repeat = modifier === '+' || modifier === '*';
1271
- var optional = modifier === '?' || modifier === '*';
1272
- var delimiter = prefix || defaultDelimiter;
1273
- var pattern = capture || group;
1274
- var prevText = prefix || (typeof tokens[tokens.length - 1] === 'string' ? tokens[tokens.length - 1] : '');
1275
- tokens.push({
1276
- name: name || key++,
1277
- prefix: prefix || '',
1278
- delimiter: delimiter,
1279
- optional: optional,
1280
- repeat: repeat,
1281
- partial: partial,
1282
- asterisk: !!asterisk,
1283
- pattern: pattern ? escapeGroup(pattern) : asterisk ? '.*' : restrictBacktrack(delimiter, prevText)
1284
- });
1285
- }
1286
-
1287
- // Match any characters still remaining.
1288
- if (index < str.length) {
1289
- path += str.substr(index);
1290
- }
1291
-
1292
- // If the path exists, push it onto the end.
1293
- if (path) {
1294
- tokens.push(path);
1295
- }
1296
- return tokens;
1297
- }
1298
- function restrictBacktrack(delimiter, prevText) {
1299
- if (!prevText || prevText.indexOf(delimiter) > -1) {
1300
- return '[^' + escapeString(delimiter) + ']+?';
1301
- }
1302
- return escapeString(prevText) + '|(?:(?!' + escapeString(prevText) + ')[^' + escapeString(delimiter) + '])+?';
1303
- }
1304
-
1305
- /**
1306
- * Compile a string to a template function for the path.
1307
- *
1308
- * @param {string} str
1309
- * @param {Object=} options
1310
- * @return {!function(Object=, Object=)}
1311
- */
1312
- function compile(str, options) {
1313
- return tokensToFunction(parse(str, options), options);
1314
- }
1315
-
1316
- /**
1317
- * Prettier encoding of URI path segments.
1318
- *
1319
- * @param {string}
1320
- * @return {string}
1321
- */
1322
- function encodeURIComponentPretty(str) {
1323
- return encodeURI(str).replace(/[\/?#]/g, function (c) {
1324
- return '%' + c.charCodeAt(0).toString(16).toUpperCase();
1325
- });
1326
- }
1327
-
1328
- /**
1329
- * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
1330
- *
1331
- * @param {string}
1332
- * @return {string}
1333
- */
1334
- function encodeAsterisk(str) {
1335
- return encodeURI(str).replace(/[?#]/g, function (c) {
1336
- return '%' + c.charCodeAt(0).toString(16).toUpperCase();
1337
- });
1338
- }
1339
-
1340
- /**
1341
- * Expose a method for transforming tokens into the path function.
1342
- */
1343
- function tokensToFunction(tokens, options) {
1344
- // Compile all the tokens into regexps.
1345
- var matches = new Array(tokens.length);
1346
-
1347
- // Compile all the patterns before compilation.
1348
- for (var i = 0; i < tokens.length; i++) {
1349
- if (_typeof(tokens[i]) === 'object') {
1350
- matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));
1351
- }
1352
- }
1353
- return function (obj, opts) {
1354
- var path = '';
1355
- var data = obj || {};
1356
- var options = opts || {};
1357
- var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;
1358
- for (var i = 0; i < tokens.length; i++) {
1359
- var token = tokens[i];
1360
- if (typeof token === 'string') {
1361
- path += token;
1362
- continue;
1363
- }
1364
- var value = data[token.name];
1365
- var segment;
1366
- if (value == null) {
1367
- if (token.optional) {
1368
- // Prepend partial segment prefixes.
1369
- if (token.partial) {
1370
- path += token.prefix;
1371
- }
1372
- continue;
1373
- } else {
1374
- throw new TypeError('Expected "' + token.name + '" to be defined');
1375
- }
1376
- }
1377
- if (isarray(value)) {
1378
- if (!token.repeat) {
1379
- throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`');
1380
- }
1381
- if (value.length === 0) {
1382
- if (token.optional) {
1383
- continue;
1384
- } else {
1385
- throw new TypeError('Expected "' + token.name + '" to not be empty');
1386
- }
1387
- }
1388
- for (var j = 0; j < value.length; j++) {
1389
- segment = encode(value[j]);
1390
- if (!matches[i].test(segment)) {
1391
- throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`');
1392
- }
1393
- path += (j === 0 ? token.prefix : token.delimiter) + segment;
1394
- }
1395
- continue;
1396
- }
1397
- segment = token.asterisk ? encodeAsterisk(value) : encode(value);
1398
- if (!matches[i].test(segment)) {
1399
- throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
1400
- }
1401
- path += token.prefix + segment;
1402
- }
1403
- return path;
1404
- };
1405
- }
1406
-
1407
- /**
1408
- * Escape a regular expression string.
1409
- *
1410
- * @param {string} str
1411
- * @return {string}
1412
- */
1413
- function escapeString(str) {
1414
- return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1');
1415
- }
1416
-
1417
- /**
1418
- * Escape the capturing group by escaping special characters and meaning.
1419
- *
1420
- * @param {string} group
1421
- * @return {string}
1422
- */
1423
- function escapeGroup(group) {
1424
- return group.replace(/([=!:$\/()])/g, '\\$1');
1425
- }
1426
-
1427
- /**
1428
- * Attach the keys as a property of the regexp.
1429
- *
1430
- * @param {!RegExp} re
1431
- * @param {Array} keys
1432
- * @return {!RegExp}
1433
- */
1434
- function attachKeys(re, keys) {
1435
- re.keys = keys;
1436
- return re;
1437
- }
1438
-
1439
- /**
1440
- * Get the flags for a regexp from the options.
1441
- *
1442
- * @param {Object} options
1443
- * @return {string}
1444
- */
1445
- function flags(options) {
1446
- return options && options.sensitive ? '' : 'i';
1447
- }
1448
-
1449
- /**
1450
- * Pull out keys from a regexp.
1451
- *
1452
- * @param {!RegExp} path
1453
- * @param {!Array} keys
1454
- * @return {!RegExp}
1455
- */
1456
- function regexpToRegexp(path, keys) {
1457
- // Use a negative lookahead to match only capturing groups.
1458
- var groups = path.source.match(/\((?!\?)/g);
1459
- if (groups) {
1460
- for (var i = 0; i < groups.length; i++) {
1461
- keys.push({
1462
- name: i,
1463
- prefix: null,
1464
- delimiter: null,
1465
- optional: false,
1466
- repeat: false,
1467
- partial: false,
1468
- asterisk: false,
1469
- pattern: null
1470
- });
1471
- }
1472
- }
1473
- return attachKeys(path, keys);
1474
- }
1475
-
1476
- /**
1477
- * Transform an array into a regexp.
1478
- *
1479
- * @param {!Array} path
1480
- * @param {Array} keys
1481
- * @param {!Object} options
1482
- * @return {!RegExp}
1483
- */
1484
- function arrayToRegexp(path, keys, options) {
1485
- var parts = [];
1486
- for (var i = 0; i < path.length; i++) {
1487
- parts.push(pathToRegexp(path[i], keys, options).source);
1488
- }
1489
- var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));
1490
- return attachKeys(regexp, keys);
1491
- }
1492
-
1493
- /**
1494
- * Create a path regexp from string input.
1495
- *
1496
- * @param {string} path
1497
- * @param {!Array} keys
1498
- * @param {!Object} options
1499
- * @return {!RegExp}
1500
- */
1501
- function stringToRegexp(path, keys, options) {
1502
- return tokensToRegExp(parse(path, options), keys, options);
1503
- }
1504
-
1505
- /**
1506
- * Expose a function for taking tokens and returning a RegExp.
1507
- *
1508
- * @param {!Array} tokens
1509
- * @param {(Array|Object)=} keys
1510
- * @param {Object=} options
1511
- * @return {!RegExp}
1512
- */
1513
- function tokensToRegExp(tokens, keys, options) {
1514
- if (!isarray(keys)) {
1515
- options = /** @type {!Object} */keys || options;
1516
- keys = [];
1517
- }
1518
- options = options || {};
1519
- var strict = options.strict;
1520
- var end = options.end !== false;
1521
- var route = '';
1522
-
1523
- // Iterate over the tokens and create our regexp string.
1524
- for (var i = 0; i < tokens.length; i++) {
1525
- var token = tokens[i];
1526
- if (typeof token === 'string') {
1527
- route += escapeString(token);
1528
- } else {
1529
- var prefix = escapeString(token.prefix);
1530
- var capture = '(?:' + token.pattern + ')';
1531
- keys.push(token);
1532
- if (token.repeat) {
1533
- capture += '(?:' + prefix + capture + ')*';
1534
- }
1535
- if (token.optional) {
1536
- if (!token.partial) {
1537
- capture = '(?:' + prefix + '(' + capture + '))?';
1538
- } else {
1539
- capture = prefix + '(' + capture + ')?';
1540
- }
1541
- } else {
1542
- capture = prefix + '(' + capture + ')';
1543
- }
1544
- route += capture;
1545
- }
1546
- }
1547
- var delimiter = escapeString(options.delimiter || '/');
1548
- var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
1549
-
1550
- // In non-strict mode we allow a slash at the end of match. If the path to
1551
- // match already ends with a slash, we remove it for consistency. The slash
1552
- // is valid at the end of a path match, not in the middle. This is important
1553
- // in non-ending mode, where "/test/" shouldn't match "/test//route".
1554
- if (!strict) {
1555
- route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';
1556
- }
1557
- if (end) {
1558
- route += '$';
1559
- } else {
1560
- // In non-ending mode, we need the capturing groups to match as much as
1561
- // possible by using a positive lookahead to the end or next path segment.
1562
- route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';
1563
- }
1564
- return attachKeys(new RegExp('^' + route, flags(options)), keys);
1565
- }
1566
-
1567
- /**
1568
- * Normalize the given path string, returning a regular expression.
1569
- *
1570
- * An empty array can be passed in for the keys, which will hold the
1571
- * placeholder key descriptions. For example, using `/user/:id`, `keys` will
1572
- * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
1573
- *
1574
- * @param {(string|RegExp|Array)} path
1575
- * @param {(Array|Object)=} keys
1576
- * @param {Object=} options
1577
- * @return {!RegExp}
1578
- */
1579
- function pathToRegexp(path, keys, options) {
1580
- if (!isarray(keys)) {
1581
- options = /** @type {!Object} */keys || options;
1582
- keys = [];
1583
- }
1584
- options = options || {};
1585
- if (path instanceof RegExp) {
1586
- return regexpToRegexp(path, /** @type {!Array} */keys);
1587
- }
1588
- if (isarray(path)) {
1589
- return arrayToRegexp(/** @type {!Array} */path, /** @type {!Array} */keys, options);
1590
- }
1591
- return stringToRegexp(/** @type {string} */path, /** @type {!Array} */keys, options);
1592
- }
1593
- var pathToRegexp$1 = pathToRegexp$2.exports;
1594
- function _objectWithoutPropertiesLoose(r, e) {
1595
- if (null == r) return {};
1596
- var t = {};
1597
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
1598
- if (-1 !== e.indexOf(n)) continue;
1599
- t[n] = r[n];
1600
- }
1601
- return t;
1602
- }
1603
- var reactIs = reactIs$1.exports;
1604
- var FORWARD_REF_STATICS = {
1605
- '$$typeof': true,
1606
- render: true,
1607
- defaultProps: true,
1608
- displayName: true,
1609
- propTypes: true
1610
- };
1611
- var MEMO_STATICS = {
1612
- '$$typeof': true,
1613
- compare: true,
1614
- defaultProps: true,
1615
- displayName: true,
1616
- propTypes: true,
1617
- type: true
1618
- };
1619
- var TYPE_STATICS = {};
1620
- TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
1621
- TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
1622
- var MAX_SIGNED_31_BIT_INT = 1073741823;
1623
- var commonjsGlobal = typeof globalThis !== "undefined" // 'global proper'
1624
- ?
1625
- // eslint-disable-next-line no-undef
1626
- globalThis : typeof window !== "undefined" ? window // Browser
1627
- : typeof global !== "undefined" ? global // node.js
1628
- : {};
1629
- function getUniqueId() {
1630
- var key = "__global_unique_id__";
1631
- return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
1632
- } // Inlined Object.is polyfill.
1633
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1634
-
1635
- function objectIs(x, y) {
1636
- if (x === y) {
1637
- return x !== 0 || 1 / x === 1 / y;
1638
- } else {
1639
- // eslint-disable-next-line no-self-compare
1640
- return x !== x && y !== y;
1641
- }
1642
- }
1643
- function createEventEmitter(value) {
1644
- var handlers = [];
1645
- return {
1646
- on: function on(handler) {
1647
- handlers.push(handler);
1648
- },
1649
- off: function off(handler) {
1650
- handlers = handlers.filter(function (h) {
1651
- return h !== handler;
1652
- });
1653
- },
1654
- get: function get() {
1655
- return value;
1656
- },
1657
- set: function set(newValue, changedBits) {
1658
- value = newValue;
1659
- handlers.forEach(function (handler) {
1660
- return handler(value, changedBits);
1661
- });
1662
- }
1663
- };
1664
- }
1665
- function onlyChild(children) {
1666
- return Array.isArray(children) ? children[0] : children;
1667
- }
1668
- function createReactContext(defaultValue, calculateChangedBits) {
1669
- var _Provider$childContex, _Consumer$contextType;
1670
- var contextProp = "__create-react-context-" + getUniqueId() + "__";
1671
- var Provider = /*#__PURE__*/function (_React$Component) {
1672
- _inheritsLoose(Provider, _React$Component);
1673
- function Provider() {
1674
- var _this;
1675
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1676
- args[_key] = arguments[_key];
1677
- }
1678
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1679
- _this.emitter = createEventEmitter(_this.props.value);
1680
- return _this;
1681
- }
1682
- var _proto = Provider.prototype;
1683
- _proto.getChildContext = function getChildContext() {
1684
- var _ref;
1685
- return _ref = {}, _ref[contextProp] = this.emitter, _ref;
1686
- };
1687
- _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
1688
- if (this.props.value !== nextProps.value) {
1689
- var oldValue = this.props.value;
1690
- var newValue = nextProps.value;
1691
- var changedBits;
1692
- if (objectIs(oldValue, newValue)) {
1693
- changedBits = 0; // No change
1694
- } else {
1695
- changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
1696
- if (process.env.NODE_ENV !== "production") {
1697
- process.env.NODE_ENV !== "production" ? warning((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, "calculateChangedBits: Expected the return value to be a " + "31-bit integer. Instead received: " + changedBits) : void 0;
1698
- }
1699
- changedBits |= 0;
1700
- if (changedBits !== 0) {
1701
- this.emitter.set(nextProps.value, changedBits);
1702
- }
1703
- }
1704
- }
1705
- };
1706
- _proto.render = function render() {
1707
- return this.props.children;
1708
- };
1709
- return Provider;
1710
- }(React.Component);
1711
- Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
1712
- var Consumer = /*#__PURE__*/function (_React$Component2) {
1713
- _inheritsLoose(Consumer, _React$Component2);
1714
- function Consumer() {
1715
- var _this2;
1716
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1717
- args[_key2] = arguments[_key2];
1718
- }
1719
- _this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
1720
- _this2.observedBits = void 0;
1721
- _this2.state = {
1722
- value: _this2.getValue()
1723
- };
1724
- _this2.onUpdate = function (newValue, changedBits) {
1725
- var observedBits = _this2.observedBits | 0;
1726
- if ((observedBits & changedBits) !== 0) {
1727
- _this2.setState({
1728
- value: _this2.getValue()
1729
- });
1730
- }
1731
- };
1732
- return _this2;
1733
- }
1734
- var _proto2 = Consumer.prototype;
1735
- _proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
1736
- var observedBits = nextProps.observedBits;
1737
- this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
1738
- : observedBits;
1739
- };
1740
- _proto2.componentDidMount = function componentDidMount() {
1741
- if (this.context[contextProp]) {
1742
- this.context[contextProp].on(this.onUpdate);
1743
- }
1744
- var observedBits = this.props.observedBits;
1745
- this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
1746
- : observedBits;
1747
- };
1748
- _proto2.componentWillUnmount = function componentWillUnmount() {
1749
- if (this.context[contextProp]) {
1750
- this.context[contextProp].off(this.onUpdate);
1751
- }
1752
- };
1753
- _proto2.getValue = function getValue() {
1754
- if (this.context[contextProp]) {
1755
- return this.context[contextProp].get();
1756
- } else {
1757
- return defaultValue;
1758
- }
1759
- };
1760
- _proto2.render = function render() {
1761
- return onlyChild(this.props.children)(this.state.value);
1762
- };
1763
- return Consumer;
1764
- }(React.Component);
1765
- Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
1766
- return {
1767
- Provider: Provider,
1768
- Consumer: Consumer
1769
- };
1770
- }
1771
-
1772
- // MIT License
1773
- var createContext = React.createContext || createReactContext;
1774
-
1775
- // TODO: Replace with React.createContext once we can assume React 16+
1776
-
1777
- var createNamedContext = function createNamedContext(name) {
1778
- var context = createContext();
1779
- context.displayName = name;
1780
- return context;
1781
- };
1782
- var historyContext = /*#__PURE__*/createNamedContext("Router-History");
1783
- var context = /*#__PURE__*/createNamedContext("Router");
1784
-
1785
- /**
1786
- * The public API for putting history on context.
1787
- */
1788
-
1789
- var Router = /*#__PURE__*/function (_React$Component) {
1790
- _inheritsLoose(Router, _React$Component);
1791
- Router.computeRootMatch = function computeRootMatch(pathname) {
1792
- return {
1793
- path: "/",
1794
- url: "/",
1795
- params: {},
1796
- isExact: pathname === "/"
1797
- };
1798
- };
1799
- function Router(props) {
1800
- var _this;
1801
- _this = _React$Component.call(this, props) || this;
1802
- _this.state = {
1803
- location: props.history.location
1804
- }; // This is a bit of a hack. We have to start listening for location
1805
- // changes here in the constructor in case there are any <Redirect>s
1806
- // on the initial render. If there are, they will replace/push when
1807
- // they mount and since cDM fires in children before parents, we may
1808
- // get a new location before the <Router> is mounted.
1809
-
1810
- _this._isMounted = false;
1811
- _this._pendingLocation = null;
1812
- if (!props.staticContext) {
1813
- _this.unlisten = props.history.listen(function (location) {
1814
- _this._pendingLocation = location;
1815
- });
1816
- }
1817
- return _this;
1818
- }
1819
- var _proto = Router.prototype;
1820
- _proto.componentDidMount = function componentDidMount() {
1821
- var _this2 = this;
1822
- this._isMounted = true;
1823
- if (this.unlisten) {
1824
- // Any pre-mount location changes have been captured at
1825
- // this point, so unregister the listener.
1826
- this.unlisten();
1827
- }
1828
- if (!this.props.staticContext) {
1829
- this.unlisten = this.props.history.listen(function (location) {
1830
- if (_this2._isMounted) {
1831
- _this2.setState({
1832
- location: location
1833
- });
1834
- }
1835
- });
1836
- }
1837
- if (this._pendingLocation) {
1838
- this.setState({
1839
- location: this._pendingLocation
1840
- });
1841
- }
1842
- };
1843
- _proto.componentWillUnmount = function componentWillUnmount() {
1844
- if (this.unlisten) {
1845
- this.unlisten();
1846
- this._isMounted = false;
1847
- this._pendingLocation = null;
1848
- }
1849
- };
1850
- _proto.render = function render() {
1851
- return /*#__PURE__*/React.createElement(context.Provider, {
1852
- value: {
1853
- history: this.props.history,
1854
- location: this.state.location,
1855
- match: Router.computeRootMatch(this.state.location.pathname),
1856
- staticContext: this.props.staticContext
1857
- }
1858
- }, /*#__PURE__*/React.createElement(historyContext.Provider, {
1859
- children: this.props.children || null,
1860
- value: this.props.history
1861
- }));
1862
- };
1863
- return Router;
1864
- }(React.Component);
1865
- if (process.env.NODE_ENV !== "production") {
1866
- Router.propTypes = {
1867
- children: PropTypes.node,
1868
- history: PropTypes.object.isRequired,
1869
- staticContext: PropTypes.object
1870
- };
1871
- Router.prototype.componentDidUpdate = function (prevProps) {
1872
- process.env.NODE_ENV !== "production" ? warning(prevProps.history === this.props.history, "You cannot change <Router history>") : void 0;
1873
- };
1874
- }
1875
-
1876
- /**
1877
- * The public API for a <Router> that stores location in memory.
1878
- */
1879
-
1880
- var MemoryRouter = /*#__PURE__*/function (_React$Component) {
1881
- _inheritsLoose(MemoryRouter, _React$Component);
1882
- function MemoryRouter() {
1883
- var _this;
1884
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1885
- args[_key] = arguments[_key];
1886
- }
1887
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1888
- _this.history = createMemoryHistory(_this.props);
1889
- return _this;
1890
- }
1891
- var _proto = MemoryRouter.prototype;
1892
- _proto.render = function render() {
1893
- return /*#__PURE__*/React.createElement(Router, {
1894
- history: this.history,
1895
- children: this.props.children
1896
- });
1897
- };
1898
- return MemoryRouter;
1899
- }(React.Component);
1900
- if (process.env.NODE_ENV !== "production") {
1901
- MemoryRouter.propTypes = {
1902
- initialEntries: PropTypes.array,
1903
- initialIndex: PropTypes.number,
1904
- getUserConfirmation: PropTypes.func,
1905
- keyLength: PropTypes.number,
1906
- children: PropTypes.node
1907
- };
1908
- MemoryRouter.prototype.componentDidMount = function () {
1909
- process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.") : void 0;
1910
- };
1911
- }
1912
- /*#__PURE__*/
1913
- (function (_React$Component) {
1914
- _inheritsLoose(Lifecycle, _React$Component);
1915
- function Lifecycle() {
1916
- return _React$Component.apply(this, arguments) || this;
1917
- }
1918
- var _proto = Lifecycle.prototype;
1919
- _proto.componentDidMount = function componentDidMount() {
1920
- if (this.props.onMount) this.props.onMount.call(this, this);
1921
- };
1922
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
1923
- if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
1924
- };
1925
- _proto.componentWillUnmount = function componentWillUnmount() {
1926
- if (this.props.onUnmount) this.props.onUnmount.call(this, this);
1927
- };
1928
- _proto.render = function render() {
1929
- return null;
1930
- };
1931
- return Lifecycle;
1932
- })(React.Component);
1933
- if (process.env.NODE_ENV !== "production") {
1934
- var messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);
1935
- ({
1936
- when: PropTypes.bool,
1937
- message: messageType.isRequired
1938
- });
1939
- }
1940
- if (process.env.NODE_ENV !== "production") {
1941
- ({
1942
- push: PropTypes.bool,
1943
- from: PropTypes.string,
1944
- to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired
1945
- });
1946
- }
1947
- var cache$1 = {};
1948
- var cacheLimit$1 = 10000;
1949
- var cacheCount$1 = 0;
1950
- function compilePath$1(path, options) {
1951
- var cacheKey = "" + options.end + options.strict + options.sensitive;
1952
- var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
1953
- if (pathCache[path]) return pathCache[path];
1954
- var keys = [];
1955
- var regexp = pathToRegexp$1(path, keys, options);
1956
- var result = {
1957
- regexp: regexp,
1958
- keys: keys
1959
- };
1960
- if (cacheCount$1 < cacheLimit$1) {
1961
- pathCache[path] = result;
1962
- cacheCount$1++;
1963
- }
1964
- return result;
1965
- }
1966
- /**
1967
- * Public API for matching a URL pathname to a path.
1968
- */
1969
-
1970
- function matchPath(pathname, options) {
1971
- if (options === void 0) {
1972
- options = {};
1973
- }
1974
- if (typeof options === "string" || Array.isArray(options)) {
1975
- options = {
1976
- path: options
1977
- };
1978
- }
1979
- var _options = options,
1980
- path = _options.path,
1981
- _options$exact = _options.exact,
1982
- exact = _options$exact === void 0 ? false : _options$exact,
1983
- _options$strict = _options.strict,
1984
- strict = _options$strict === void 0 ? false : _options$strict,
1985
- _options$sensitive = _options.sensitive,
1986
- sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
1987
- var paths = [].concat(path);
1988
- return paths.reduce(function (matched, path) {
1989
- if (!path && path !== "") return null;
1990
- if (matched) return matched;
1991
- var _compilePath = compilePath$1(path, {
1992
- end: exact,
1993
- strict: strict,
1994
- sensitive: sensitive
1995
- }),
1996
- regexp = _compilePath.regexp,
1997
- keys = _compilePath.keys;
1998
- var match = regexp.exec(pathname);
1999
- if (!match) return null;
2000
- var url = match[0],
2001
- values = match.slice(1);
2002
- var isExact = pathname === url;
2003
- if (exact && !isExact) return null;
2004
- return {
2005
- path: path,
2006
- // the path used to match
2007
- url: path === "/" && url === "" ? "/" : url,
2008
- // the matched portion of the URL
2009
- isExact: isExact,
2010
- // whether or not we matched exactly
2011
- params: keys.reduce(function (memo, key, index) {
2012
- memo[key.name] = values[index];
2013
- return memo;
2014
- }, {})
2015
- };
2016
- }, null);
2017
- }
2018
- function isEmptyChildren(children) {
2019
- return React.Children.count(children) === 0;
2020
- }
2021
- function evalChildrenDev(children, props, path) {
2022
- var value = children(props);
2023
- process.env.NODE_ENV !== "production" ? warning(value !== undefined, "You returned `undefined` from the `children` function of " + ("<Route" + (path ? " path=\"" + path + "\"" : "") + ">, but you ") + "should have returned a React element or `null`") : void 0;
2024
- return value || null;
2025
- }
2026
- /**
2027
- * The public API for matching a single path and rendering.
2028
- */
2029
-
2030
- var Route = /*#__PURE__*/function (_React$Component) {
2031
- _inheritsLoose(Route, _React$Component);
2032
- function Route() {
2033
- return _React$Component.apply(this, arguments) || this;
2034
- }
2035
- var _proto = Route.prototype;
2036
- _proto.render = function render() {
2037
- var _this = this;
2038
- return /*#__PURE__*/React.createElement(context.Consumer, null, function (context$1) {
2039
- !context$1 ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Route> outside a <Router>") : invariant(false) : void 0;
2040
- var location = _this.props.location || context$1.location;
2041
- var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
2042
- : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
2043
- var props = _extends({}, context$1, {
2044
- location: location,
2045
- match: match
2046
- });
2047
- var _this$props = _this.props,
2048
- children = _this$props.children,
2049
- component = _this$props.component,
2050
- render = _this$props.render; // Preact uses an empty array as children by
2051
- // default, so use null if that's the case.
2052
-
2053
- if (Array.isArray(children) && isEmptyChildren(children)) {
2054
- children = null;
2055
- }
2056
- return /*#__PURE__*/React.createElement(context.Provider, {
2057
- value: props
2058
- }, props.match ? children ? typeof children === "function" ? process.env.NODE_ENV !== "production" ? evalChildrenDev(children, props, _this.props.path) : children(props) : children : component ? /*#__PURE__*/React.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? process.env.NODE_ENV !== "production" ? evalChildrenDev(children, props, _this.props.path) : children(props) : null);
2059
- });
2060
- };
2061
- return Route;
2062
- }(React.Component);
2063
- if (process.env.NODE_ENV !== "production") {
2064
- Route.propTypes = {
2065
- children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
2066
- component: function component(props, propName) {
2067
- if (props[propName] && !reactIs$1.exports.isValidElementType(props[propName])) {
2068
- return new Error("Invalid prop 'component' supplied to 'Route': the prop is not a valid React component");
2069
- }
2070
- },
2071
- exact: PropTypes.bool,
2072
- location: PropTypes.object,
2073
- path: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
2074
- render: PropTypes.func,
2075
- sensitive: PropTypes.bool,
2076
- strict: PropTypes.bool
2077
- };
2078
- Route.prototype.componentDidMount = function () {
2079
- process.env.NODE_ENV !== "production" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), "You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored") : void 0;
2080
- process.env.NODE_ENV !== "production" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), "You should not use <Route render> and <Route children> in the same route; <Route render> will be ignored") : void 0;
2081
- process.env.NODE_ENV !== "production" ? warning(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored") : void 0;
2082
- };
2083
- Route.prototype.componentDidUpdate = function (prevProps) {
2084
- process.env.NODE_ENV !== "production" ? warning(!(this.props.location && !prevProps.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.') : void 0;
2085
- process.env.NODE_ENV !== "production" ? warning(!(!this.props.location && prevProps.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.') : void 0;
2086
- };
2087
- }
2088
- function addLeadingSlash(path) {
2089
- return path.charAt(0) === "/" ? path : "/" + path;
2090
- }
2091
- function addBasename(basename, location) {
2092
- if (!basename) return location;
2093
- return _extends({}, location, {
2094
- pathname: addLeadingSlash(basename) + location.pathname
2095
- });
2096
- }
2097
- function stripBasename(basename, location) {
2098
- if (!basename) return location;
2099
- var base = addLeadingSlash(basename);
2100
- if (location.pathname.indexOf(base) !== 0) return location;
2101
- return _extends({}, location, {
2102
- pathname: location.pathname.substr(base.length)
2103
- });
2104
- }
2105
- function createURL(location) {
2106
- return typeof location === "string" ? location : createPath(location);
2107
- }
2108
- function staticHandler(methodName) {
2109
- return function () {
2110
- process.env.NODE_ENV !== "production" ? invariant(false, "You cannot %s with <StaticRouter>") : invariant(false);
2111
- };
2112
- }
2113
- function noop() {}
2114
- /**
2115
- * The public top-level API for a "static" <Router>, so-called because it
2116
- * can't actually change the current location. Instead, it just records
2117
- * location changes in a context object. Useful mainly in testing and
2118
- * server-rendering scenarios.
2119
- */
2120
-
2121
- var StaticRouter = /*#__PURE__*/function (_React$Component) {
2122
- _inheritsLoose(StaticRouter, _React$Component);
2123
- function StaticRouter() {
2124
- var _this;
2125
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2126
- args[_key] = arguments[_key];
2127
- }
2128
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2129
- _this.handlePush = function (location) {
2130
- return _this.navigateTo(location, "PUSH");
2131
- };
2132
- _this.handleReplace = function (location) {
2133
- return _this.navigateTo(location, "REPLACE");
2134
- };
2135
- _this.handleListen = function () {
2136
- return noop;
2137
- };
2138
- _this.handleBlock = function () {
2139
- return noop;
2140
- };
2141
- return _this;
2142
- }
2143
- var _proto = StaticRouter.prototype;
2144
- _proto.navigateTo = function navigateTo(location, action) {
2145
- var _this$props = this.props,
2146
- _this$props$basename = _this$props.basename,
2147
- basename = _this$props$basename === void 0 ? "" : _this$props$basename,
2148
- _this$props$context = _this$props.context,
2149
- context = _this$props$context === void 0 ? {} : _this$props$context;
2150
- context.action = action;
2151
- context.location = addBasename(basename, createLocation(location));
2152
- context.url = createURL(context.location);
2153
- };
2154
- _proto.render = function render() {
2155
- var _this$props2 = this.props,
2156
- _this$props2$basename = _this$props2.basename,
2157
- basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
2158
- _this$props2$context = _this$props2.context,
2159
- context = _this$props2$context === void 0 ? {} : _this$props2$context,
2160
- _this$props2$location = _this$props2.location,
2161
- location = _this$props2$location === void 0 ? "/" : _this$props2$location,
2162
- rest = _objectWithoutPropertiesLoose(_this$props2, ["basename", "context", "location"]);
2163
- var history = {
2164
- createHref: function createHref(path) {
2165
- return addLeadingSlash(basename + createURL(path));
2166
- },
2167
- action: "POP",
2168
- location: stripBasename(basename, createLocation(location)),
2169
- push: this.handlePush,
2170
- replace: this.handleReplace,
2171
- go: staticHandler(),
2172
- goBack: staticHandler(),
2173
- goForward: staticHandler(),
2174
- listen: this.handleListen,
2175
- block: this.handleBlock
2176
- };
2177
- return /*#__PURE__*/React.createElement(Router, _extends({}, rest, {
2178
- history: history,
2179
- staticContext: context
2180
- }));
2181
- };
2182
- return StaticRouter;
2183
- }(React.Component);
2184
- if (process.env.NODE_ENV !== "production") {
2185
- StaticRouter.propTypes = {
2186
- basename: PropTypes.string,
2187
- context: PropTypes.object,
2188
- location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
2189
- };
2190
- StaticRouter.prototype.componentDidMount = function () {
2191
- process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.") : void 0;
2192
- };
2193
- }
2194
-
2195
- /**
2196
- * The public API for rendering the first <Route> that matches.
2197
- */
2198
-
2199
- var Switch = /*#__PURE__*/function (_React$Component) {
2200
- _inheritsLoose(Switch, _React$Component);
2201
- function Switch() {
2202
- return _React$Component.apply(this, arguments) || this;
2203
- }
2204
- var _proto = Switch.prototype;
2205
- _proto.render = function render() {
2206
- var _this = this;
2207
- return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {
2208
- !context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Switch> outside a <Router>") : invariant(false) : void 0;
2209
- var location = _this.props.location || context.location;
2210
- var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
2211
- // here because toArray adds keys to all child elements and we do not want
2212
- // to trigger an unmount/remount for two <Route>s that render the same
2213
- // component at different URLs.
2214
-
2215
- React.Children.forEach(_this.props.children, function (child) {
2216
- if (match == null && /*#__PURE__*/React.isValidElement(child)) {
2217
- element = child;
2218
- var path = child.props.path || child.props.from;
2219
- match = path ? matchPath(location.pathname, _extends({}, child.props, {
2220
- path: path
2221
- })) : context.match;
2222
- }
2223
- });
2224
- return match ? /*#__PURE__*/React.cloneElement(element, {
2225
- location: location,
2226
- computedMatch: match
2227
- }) : null;
2228
- });
2229
- };
2230
- return Switch;
2231
- }(React.Component);
2232
- if (process.env.NODE_ENV !== "production") {
2233
- Switch.propTypes = {
2234
- children: PropTypes.node,
2235
- location: PropTypes.object
2236
- };
2237
- Switch.prototype.componentDidUpdate = function (prevProps) {
2238
- process.env.NODE_ENV !== "production" ? warning(!(this.props.location && !prevProps.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.') : void 0;
2239
- process.env.NODE_ENV !== "production" ? warning(!(!this.props.location && prevProps.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.') : void 0;
2240
- };
2241
- }
2242
- React.useContext;
2243
- if (process.env.NODE_ENV !== "production") {
2244
- if (typeof window !== "undefined") {
2245
- var global$1 = window;
2246
- var key = "__react_router_build__";
2247
- var buildNames = {
2248
- cjs: "CommonJS",
2249
- esm: "ES modules",
2250
- umd: "UMD"
2251
- };
2252
- if (global$1[key] && global$1[key] !== "esm") {
2253
- var initialBuildName = buildNames[global$1[key]];
2254
- var secondaryBuildName = buildNames["esm"]; // TODO: Add link to article that explains in detail how to avoid
2255
- // loading 2 different builds.
2256
-
2257
- throw new Error("You are loading the " + secondaryBuildName + " build of React Router " + ("on a page that is already running the " + initialBuildName + " ") + "build, so things won't work right.");
2258
- }
2259
- global$1[key] = "esm";
2260
- }
2261
- }
2262
-
2263
- /**
2264
- * The public API for a <Router> that uses HTML5 history.
2265
- */
2266
-
2267
- var BrowserRouter = /*#__PURE__*/function (_React$Component) {
2268
- _inheritsLoose(BrowserRouter, _React$Component);
2269
- function BrowserRouter() {
2270
- var _this;
2271
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2272
- args[_key] = arguments[_key];
2273
- }
2274
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2275
- _this.history = createBrowserHistory(_this.props);
2276
- return _this;
2277
- }
2278
- var _proto = BrowserRouter.prototype;
2279
- _proto.render = function render() {
2280
- return /*#__PURE__*/React.createElement(Router, {
2281
- history: this.history,
2282
- children: this.props.children
2283
- });
2284
- };
2285
- return BrowserRouter;
2286
- }(React.Component);
2287
- if (process.env.NODE_ENV !== "production") {
2288
- BrowserRouter.propTypes = {
2289
- basename: PropTypes.string,
2290
- children: PropTypes.node,
2291
- forceRefresh: PropTypes.bool,
2292
- getUserConfirmation: PropTypes.func,
2293
- keyLength: PropTypes.number
2294
- };
2295
- BrowserRouter.prototype.componentDidMount = function () {
2296
- process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.") : void 0;
2297
- };
2298
- }
2299
-
2300
- /**
2301
- * The public API for a <Router> that uses window.location.hash.
2302
- */
2303
-
2304
- var HashRouter = /*#__PURE__*/function (_React$Component) {
2305
- _inheritsLoose(HashRouter, _React$Component);
2306
- function HashRouter() {
2307
- var _this;
2308
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2309
- args[_key] = arguments[_key];
2310
- }
2311
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2312
- _this.history = createHashHistory(_this.props);
2313
- return _this;
2314
- }
2315
- var _proto = HashRouter.prototype;
2316
- _proto.render = function render() {
2317
- return /*#__PURE__*/React.createElement(Router, {
2318
- history: this.history,
2319
- children: this.props.children
2320
- });
2321
- };
2322
- return HashRouter;
2323
- }(React.Component);
2324
- if (process.env.NODE_ENV !== "production") {
2325
- HashRouter.propTypes = {
2326
- basename: PropTypes.string,
2327
- children: PropTypes.node,
2328
- getUserConfirmation: PropTypes.func,
2329
- hashType: PropTypes.oneOf(["hashbang", "noslash", "slash"])
2330
- };
2331
- HashRouter.prototype.componentDidMount = function () {
2332
- process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.") : void 0;
2333
- };
2334
- }
2335
- var resolveToLocation = function resolveToLocation(to, currentLocation) {
2336
- return typeof to === "function" ? to(currentLocation) : to;
2337
- };
2338
- var normalizeToLocation = function normalizeToLocation(to, currentLocation) {
2339
- return typeof to === "string" ? createLocation(to, null, null, currentLocation) : to;
2340
- };
2341
- var forwardRefShim = function forwardRefShim(C) {
2342
- return C;
2343
- };
2344
- var forwardRef = React.forwardRef;
2345
- if (typeof forwardRef === "undefined") {
2346
- forwardRef = forwardRefShim;
2347
- }
2348
- function isModifiedEvent(event) {
2349
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
2350
- }
2351
- var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
2352
- var innerRef = _ref.innerRef,
2353
- navigate = _ref.navigate,
2354
- _onClick = _ref.onClick,
2355
- rest = _objectWithoutPropertiesLoose(_ref, ["innerRef", "navigate", "onClick"]);
2356
- var target = rest.target;
2357
- var props = _extends({}, rest, {
2358
- onClick: function onClick(event) {
2359
- try {
2360
- if (_onClick) _onClick(event);
2361
- } catch (ex) {
2362
- event.preventDefault();
2363
- throw ex;
2364
- }
2365
- if (!event.defaultPrevented &&
2366
- // onClick prevented default
2367
- event.button === 0 && (
2368
- // ignore everything but left clicks
2369
- !target || target === "_self") &&
2370
- // let browser handle "target=_blank" etc.
2371
- !isModifiedEvent(event) // ignore clicks with modifier keys
2372
- ) {
2373
- event.preventDefault();
2374
- navigate();
2375
- }
2376
- }
2377
- }); // React 15 compat
2378
-
2379
- if (forwardRefShim !== forwardRef) {
2380
- props.ref = forwardedRef || innerRef;
2381
- } else {
2382
- props.ref = innerRef;
2383
- }
2384
- /* eslint-disable-next-line jsx-a11y/anchor-has-content */
2385
-
2386
- return /*#__PURE__*/React.createElement("a", props);
2387
- });
2388
- if (process.env.NODE_ENV !== "production") {
2389
- LinkAnchor.displayName = "LinkAnchor";
2390
- }
2391
- /**
2392
- * The public API for rendering a history-aware <a>.
2393
- */
2394
-
2395
- var Link = forwardRef(function (_ref2, forwardedRef) {
2396
- var _ref2$component = _ref2.component,
2397
- component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,
2398
- replace = _ref2.replace,
2399
- to = _ref2.to,
2400
- innerRef = _ref2.innerRef,
2401
- rest = _objectWithoutPropertiesLoose(_ref2, ["component", "replace", "to", "innerRef"]);
2402
- return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {
2403
- !context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Link> outside a <Router>") : invariant(false) : void 0;
2404
- var history = context.history;
2405
- var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);
2406
- var href = location ? history.createHref(location) : "";
2407
- var props = _extends({}, rest, {
2408
- href: href,
2409
- navigate: function navigate() {
2410
- var location = resolveToLocation(to, context.location);
2411
- var isDuplicateNavigation = createPath(context.location) === createPath(normalizeToLocation(location));
2412
- var method = replace || isDuplicateNavigation ? history.replace : history.push;
2413
- method(location);
2414
- }
2415
- }); // React 15 compat
2416
-
2417
- if (forwardRefShim !== forwardRef) {
2418
- props.ref = forwardedRef || innerRef;
2419
- } else {
2420
- props.innerRef = innerRef;
2421
- }
2422
- return /*#__PURE__*/React.createElement(component, props);
2423
- });
2424
- });
2425
- if (process.env.NODE_ENV !== "production") {
2426
- var toType = PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func]);
2427
- var refType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({
2428
- current: PropTypes.any
2429
- })]);
2430
- Link.displayName = "Link";
2431
- Link.propTypes = {
2432
- innerRef: refType,
2433
- onClick: PropTypes.func,
2434
- replace: PropTypes.bool,
2435
- target: PropTypes.string,
2436
- to: toType.isRequired
2437
- };
2438
- }
2439
- var forwardRefShim$1 = function forwardRefShim(C) {
2440
- return C;
2441
- };
2442
- var forwardRef$1 = React.forwardRef;
2443
- if (typeof forwardRef$1 === "undefined") {
2444
- forwardRef$1 = forwardRefShim$1;
2445
- }
2446
- function joinClassnames() {
2447
- for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {
2448
- classnames[_key] = arguments[_key];
2449
- }
2450
- return classnames.filter(function (i) {
2451
- return i;
2452
- }).join(" ");
2453
- }
2454
- /**
2455
- * A <Link> wrapper that knows if it's "active" or not.
2456
- */
2457
-
2458
- var NavLink = forwardRef$1(function (_ref, forwardedRef) {
2459
- var _ref$ariaCurrent = _ref["aria-current"],
2460
- ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent,
2461
- _ref$activeClassName = _ref.activeClassName,
2462
- activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName,
2463
- activeStyle = _ref.activeStyle,
2464
- classNameProp = _ref.className,
2465
- exact = _ref.exact,
2466
- isActiveProp = _ref.isActive,
2467
- locationProp = _ref.location,
2468
- sensitive = _ref.sensitive,
2469
- strict = _ref.strict,
2470
- styleProp = _ref.style,
2471
- to = _ref.to,
2472
- innerRef = _ref.innerRef,
2473
- rest = _objectWithoutPropertiesLoose(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
2474
- return /*#__PURE__*/React.createElement(context.Consumer, null, function (context) {
2475
- !context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <NavLink> outside a <Router>") : invariant(false) : void 0;
2476
- var currentLocation = locationProp || context.location;
2477
- var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);
2478
- var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
2479
-
2480
- var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
2481
- var match = escapedPath ? matchPath(currentLocation.pathname, {
2482
- path: escapedPath,
2483
- exact: exact,
2484
- sensitive: sensitive,
2485
- strict: strict
2486
- }) : null;
2487
- var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
2488
- var className = typeof classNameProp === "function" ? classNameProp(isActive) : classNameProp;
2489
- var style = typeof styleProp === "function" ? styleProp(isActive) : styleProp;
2490
- if (isActive) {
2491
- className = joinClassnames(className, activeClassName);
2492
- style = _extends({}, style, activeStyle);
2493
- }
2494
- var props = _extends({
2495
- "aria-current": isActive && ariaCurrent || null,
2496
- className: className,
2497
- style: style,
2498
- to: toLocation
2499
- }, rest); // React 15 compat
2500
-
2501
- if (forwardRefShim$1 !== forwardRef$1) {
2502
- props.ref = forwardedRef || innerRef;
2503
- } else {
2504
- props.innerRef = innerRef;
2505
- }
2506
- return /*#__PURE__*/React.createElement(Link, props);
2507
- });
2508
- });
2509
- if (process.env.NODE_ENV !== "production") {
2510
- NavLink.displayName = "NavLink";
2511
- var ariaCurrentType = PropTypes.oneOf(["page", "step", "location", "date", "time", "true", "false"]);
2512
- NavLink.propTypes = _extends({}, Link.propTypes, {
2513
- "aria-current": ariaCurrentType,
2514
- activeClassName: PropTypes.string,
2515
- activeStyle: PropTypes.object,
2516
- className: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
2517
- exact: PropTypes.bool,
2518
- isActive: PropTypes.func,
2519
- location: PropTypes.object,
2520
- sensitive: PropTypes.bool,
2521
- strict: PropTypes.bool,
2522
- style: PropTypes.oneOfType([PropTypes.object, PropTypes.func])
2523
- });
2524
- }
2525
62
  var tableColumns = [{
2526
63
  title: '建档日期',
2527
64
  dataIndex: 'filingDay',
@@ -2532,7 +69,7 @@ var tableColumns = [{
2532
69
  width: APP_CONFIG.CELL_WIDTH_SMALL,
2533
70
  render: function render(text, record) {
2534
71
  var id = record === null || record === void 0 ? void 0 : record.id;
2535
- return /*#__PURE__*/React.createElement(_Tooltip, {
72
+ return /*#__PURE__*/React.createElement(Tooltip, {
2536
73
  title: "\u70B9\u51FB\u67E5\u770B\u5973\u65B9\u68C0\u67E5\u8BE6\u60C5"
2537
74
  }, /*#__PURE__*/React.createElement(Link, {
2538
75
  to: resolveFubaoPath("/pre-pregnancy-care/wife/wife-exam?id=".concat(id))
@@ -2556,7 +93,7 @@ var tableColumns = [{
2556
93
  width: APP_CONFIG.CELL_WIDTH_SMALL,
2557
94
  render: function render(text, record) {
2558
95
  var id = record === null || record === void 0 ? void 0 : record.id;
2559
- return /*#__PURE__*/React.createElement(_Tooltip, {
96
+ return /*#__PURE__*/React.createElement(Tooltip, {
2560
97
  title: "\u70B9\u51FB\u67E5\u770B\u7537\u65B9\u68C0\u67E5\u8BE6\u60C5"
2561
98
  }, /*#__PURE__*/React.createElement(Link, {
2562
99
  to: resolveFubaoPath("/pre-pregnancy-care/husband/husband-exam?id=".concat(id))
@@ -2609,12 +146,12 @@ var tableColumns = [{
2609
146
  align: 'center',
2610
147
  render: function render(fileStatus, rowData) {
2611
148
  if (fileStatus === 2) {
2612
- return /*#__PURE__*/React.createElement(_Button, {
149
+ return /*#__PURE__*/React.createElement(Button, {
2613
150
  size: "small",
2614
151
  onClick: _this.handleEdit(rowData)
2615
152
  }, "\u5DF2\u5BA1\u6838");
2616
153
  }
2617
- return /*#__PURE__*/React.createElement(_Button, {
154
+ return /*#__PURE__*/React.createElement(Button, {
2618
155
  type: "primary",
2619
156
  size: "small",
2620
157
  onClick: _this.handleEdit(rowData)
@@ -2628,16 +165,16 @@ var tableColumns = [{
2628
165
  width: 330,
2629
166
  align: 'center',
2630
167
  render: function render(value, rowData, index) {
2631
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
168
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
2632
169
  type: "link",
2633
170
  size: "small",
2634
171
  icon: /*#__PURE__*/React.createElement(EyeOutlined, {
2635
172
  className: "global-table-action-icon global-table-action-view"
2636
173
  }),
2637
174
  onClick: _this.handleView(rowData)
2638
- }, "\u67E5\u770B"), /*#__PURE__*/React.createElement(_Divider, {
175
+ }, "\u67E5\u770B"), /*#__PURE__*/React.createElement(Divider, {
2639
176
  type: "vertical"
2640
- }), /*#__PURE__*/React.createElement(_Button, {
177
+ }), /*#__PURE__*/React.createElement(Button, {
2641
178
  type: "link",
2642
179
  size: "small",
2643
180
  icon: /*#__PURE__*/React.createElement(PrinterOutlined, {
@@ -2648,9 +185,9 @@ var tableColumns = [{
2648
185
  style: {
2649
186
  color: '#6c6b6b'
2650
187
  }
2651
- }, "(\u5973\u65B9)")), /*#__PURE__*/React.createElement(_Divider, {
188
+ }, "(\u5973\u65B9)")), /*#__PURE__*/React.createElement(Divider, {
2652
189
  type: "vertical"
2653
- }), /*#__PURE__*/React.createElement(_Button, {
190
+ }), /*#__PURE__*/React.createElement(Button, {
2654
191
  type: "link",
2655
192
  size: "small",
2656
193
  icon: /*#__PURE__*/React.createElement(PrinterOutlined, {
@@ -2661,14 +198,14 @@ var tableColumns = [{
2661
198
  style: {
2662
199
  color: '#6c6b6b'
2663
200
  }
2664
- }, "(\u7537\u65B9)")), /*#__PURE__*/React.createElement(_Divider, {
201
+ }, "(\u7537\u65B9)")), /*#__PURE__*/React.createElement(Divider, {
2665
202
  type: "vertical"
2666
- }), /*#__PURE__*/React.createElement(_Popconfirm, {
2667
- title: "\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A".concat(_get(_this.props, 'baseTitle'), "\u5417?"),
203
+ }), /*#__PURE__*/React.createElement(Popconfirm, {
204
+ title: "\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A".concat(get(_this.props, 'baseTitle'), "\u5417?"),
2668
205
  onConfirm: _this.handleDelete(rowData),
2669
206
  okText: "\u786E\u5B9A",
2670
207
  cancelText: "\u53D6\u6D88"
2671
- }, /*#__PURE__*/React.createElement(_Button, {
208
+ }, /*#__PURE__*/React.createElement(Button, {
2672
209
  type: "link",
2673
210
  size: "small",
2674
211
  icon: /*#__PURE__*/React.createElement(DeleteOutlined, {
@@ -2688,8 +225,8 @@ var tableColumns = [{
2688
225
  if (!baseUrl) {
2689
226
  return [2];
2690
227
  }
2691
- if (!_isNil(editKey)) {
2692
- _message.error('请保存未保存的记录');
228
+ if (!isNil(editKey)) {
229
+ message.error('请保存未保存的记录');
2693
230
  return [2];
2694
231
  }
2695
232
  this.setState({
@@ -2704,7 +241,7 @@ var tableColumns = [{
2704
241
  case 1:
2705
242
  _res = _b.sent();
2706
243
  res = _res.data;
2707
- if (_isArray(res.data.pageData)) {
244
+ if (isArray(res.data.pageData)) {
2708
245
  dataSource = res.data.pageData;
2709
246
  }
2710
247
  if (!isNaN(Number(res.data.totalElements))) {
@@ -2768,7 +305,7 @@ var tableColumns = [{
2768
305
  return __generator(this, function (_a) {
2769
306
  switch (_a.label) {
2770
307
  case 0:
2771
- return [4, fubaoRequest["delete"]("/api/progestation/check/deleteProgestationCheckArchives/".concat(_get(rowData, 'id')))];
308
+ return [4, fubaoRequest["delete"]("/api/progestation/check/deleteProgestationCheckArchives/".concat(get(rowData, 'id')))];
2772
309
  case 1:
2773
310
  _res = _a.sent();
2774
311
  _res.data;
@@ -2821,7 +358,7 @@ var s = new ModelService({
2821
358
  });
2822
359
  function FileManagementList(props) {
2823
360
  var conf_fn = function conf_fn() {
2824
- return import('./.root59.js').then(function (mod) {
361
+ return import('./.root62.js').then(function (mod) {
2825
362
  return mod["default"](true);
2826
363
  });
2827
364
  };
@@ -2830,13 +367,13 @@ function FileManagementList(props) {
2830
367
  title: "\u5B55\u524D\u68C0\u67E5-\u6863\u6848\u5217\u8868",
2831
368
  tableColumns: conf_fn,
2832
369
  searchConfig: function searchConfig() {
2833
- return import('./.root60.js');
370
+ return import('./.root63.js');
2834
371
  }
2835
372
  }
2836
373
  }),
2837
374
  Wrap = _a.Wrap,
2838
375
  config = _a.config;
2839
- var search_form = _Form.useForm()[0];
376
+ var search_form = Form.useForm()[0];
2840
377
  var id_NO_msg = useReadIdNO().id_NO_msg;
2841
378
  useEffect(function () {
2842
379
  if ((id_NO_msg === null || id_NO_msg === void 0 ? void 0 : id_NO_msg.send_id) === 'list') search_form.setFieldsValue({
@@ -2866,7 +403,7 @@ function FileManagementList(props) {
2866
403
  searchForm: search_form,
2867
404
  RenderBtns: function RenderBtns() {
2868
405
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IdNOButton, {
2869
- send_id: "list"
406
+ send_id: 'list'
2870
407
  }), /*#__PURE__*/React.createElement(OkButton, {
2871
408
  onClick: handleAdd
2872
409
  }, "\u65B0\u589E"));
@@ -2880,16 +417,16 @@ function FileManagementList(props) {
2880
417
  fixed: 'right',
2881
418
  width: 330,
2882
419
  render: function render(value, rowData, index) {
2883
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
420
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
2884
421
  type: "link",
2885
422
  size: "small",
2886
423
  onClick: function onClick() {
2887
424
  var id = rowData.id;
2888
425
  fubaoHistoryPush("/pre-pregnancy-care/wife/wife-exam?id=".concat(id), props);
2889
426
  }
2890
- }, "\u67E5\u770B"), /*#__PURE__*/React.createElement(_Divider, {
427
+ }, "\u67E5\u770B"), /*#__PURE__*/React.createElement(Divider, {
2891
428
  type: "vertical"
2892
- }), /*#__PURE__*/React.createElement(_Button, {
429
+ }), /*#__PURE__*/React.createElement(Button, {
2893
430
  type: "link",
2894
431
  size: "small",
2895
432
  onClick: handlePrint(rowData, 'womanProgestationCheckupsPrint')
@@ -2897,9 +434,9 @@ function FileManagementList(props) {
2897
434
  style: {
2898
435
  color: '#6c6b6b'
2899
436
  }
2900
- }, "(\u5973\u65B9)")), /*#__PURE__*/React.createElement(_Divider, {
437
+ }, "(\u5973\u65B9)")), /*#__PURE__*/React.createElement(Divider, {
2901
438
  type: "vertical"
2902
- }), /*#__PURE__*/React.createElement(_Button, {
439
+ }), /*#__PURE__*/React.createElement(Button, {
2903
440
  type: "link",
2904
441
  size: "small",
2905
442
  onClick: handlePrint(rowData, 'manProgestationCheckupsPrint')
@@ -2907,9 +444,9 @@ function FileManagementList(props) {
2907
444
  style: {
2908
445
  color: '#6c6b6b'
2909
446
  }
2910
- }, "(\u7537\u65B9)")), /*#__PURE__*/React.createElement(_Divider, {
447
+ }, "(\u7537\u65B9)")), /*#__PURE__*/React.createElement(Divider, {
2911
448
  type: "vertical"
2912
- }), /*#__PURE__*/React.createElement(_Button, {
449
+ }), /*#__PURE__*/React.createElement(Button, {
2913
450
  onClick: function onClick() {
2914
451
  return handleDelete(rowData);
2915
452
  },
@@ -2953,4 +490,3 @@ function FileManagementList(props) {
2953
490
  }));
2954
491
  }
2955
492
  export { FileManagementList as default };
2956
- //# sourceMappingURL=.root38.js.map