react-table-edit 1.3.2 → 1.3.4
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.
- package/dist/component/table/index.d.ts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +131 -2034
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +111 -2015
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
2
|
import * as React$5 from 'react';
|
|
3
|
-
import React__default, { forwardRef, Component,
|
|
3
|
+
import React__default, { forwardRef, Component, useState, useEffect, Fragment, useRef, useMemo, useLayoutEffect, createElement, cloneElement as cloneElement$1, createRef, useCallback, useImperativeHandle } from 'react';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
5
|
import ReactDOM__default from 'react-dom';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
6
7
|
import { createRoot } from 'react-dom/client';
|
|
8
|
+
import toast from 'react-hot-toast';
|
|
9
|
+
import { useNavigate, Link } from 'react-router-dom';
|
|
7
10
|
|
|
8
11
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
12
|
|
|
@@ -36,12 +39,12 @@ var reactIs_production_min = {};
|
|
|
36
39
|
* This source code is licensed under the MIT license found in the
|
|
37
40
|
* LICENSE file in the root directory of this source tree.
|
|
38
41
|
*/
|
|
39
|
-
var b="function"===typeof Symbol&&Symbol.for,c
|
|
40
|
-
Symbol.for("react.suspense_list"):60120,r$2=b?Symbol.for("react.memo"):60115,t$
|
|
41
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c
|
|
42
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f$1;reactIs_production_min.Suspense=p
|
|
43
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r$2};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f$1};reactIs_production_min.isSuspense=function(a){return z(a)===p
|
|
44
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$
|
|
42
|
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e$1=b?Symbol.for("react.fragment"):60107,f$1=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
43
|
+
Symbol.for("react.suspense_list"):60120,r$2=b?Symbol.for("react.memo"):60115,t$1=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
44
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e$1:case g:case f$1:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t$1:case r$2:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e$1;reactIs_production_min.Lazy=t$1;reactIs_production_min.Memo=r$2;reactIs_production_min.Portal=d;
|
|
45
|
+
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f$1;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e$1};reactIs_production_min.isLazy=function(a){return z(a)===t$1};
|
|
46
|
+
reactIs_production_min.isMemo=function(a){return z(a)===r$2};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f$1};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
47
|
+
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m||a===g||a===f$1||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r$2||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
45
48
|
|
|
46
49
|
var reactIs_development = {};
|
|
47
50
|
|
|
@@ -1283,7 +1286,7 @@ var fromEntries = function fromEntries(entries) {
|
|
|
1283
1286
|
* Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
|
|
1284
1287
|
*/
|
|
1285
1288
|
|
|
1286
|
-
var useIsomorphicLayoutEffect
|
|
1289
|
+
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React$5.useLayoutEffect : React$5.useEffect;
|
|
1287
1290
|
|
|
1288
1291
|
var top = 'top';
|
|
1289
1292
|
var bottom = 'bottom';
|
|
@@ -3287,12 +3290,12 @@ var usePopper = function usePopper(referenceElement, popperElement, options) {
|
|
|
3287
3290
|
}
|
|
3288
3291
|
}, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);
|
|
3289
3292
|
var popperInstanceRef = React$5.useRef();
|
|
3290
|
-
useIsomorphicLayoutEffect
|
|
3293
|
+
useIsomorphicLayoutEffect(function () {
|
|
3291
3294
|
if (popperInstanceRef.current) {
|
|
3292
3295
|
popperInstanceRef.current.setOptions(popperOptions);
|
|
3293
3296
|
}
|
|
3294
3297
|
}, [popperOptions]);
|
|
3295
|
-
useIsomorphicLayoutEffect
|
|
3298
|
+
useIsomorphicLayoutEffect(function () {
|
|
3296
3299
|
if (referenceElement == null || popperElement == null) {
|
|
3297
3300
|
return;
|
|
3298
3301
|
}
|
|
@@ -3402,7 +3405,7 @@ function Popper(_ref) {
|
|
|
3402
3405
|
|
|
3403
3406
|
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
3404
3407
|
|
|
3405
|
-
var warning$
|
|
3408
|
+
var warning$1 = function() {};
|
|
3406
3409
|
|
|
3407
3410
|
if (__DEV__) {
|
|
3408
3411
|
var printWarning = function printWarning(format, args) {
|
|
@@ -3427,7 +3430,7 @@ if (__DEV__) {
|
|
|
3427
3430
|
} catch (x) {}
|
|
3428
3431
|
};
|
|
3429
3432
|
|
|
3430
|
-
warning$
|
|
3433
|
+
warning$1 = function(condition, format, args) {
|
|
3431
3434
|
var len = arguments.length;
|
|
3432
3435
|
args = new Array(len > 2 ? len - 2 : 0);
|
|
3433
3436
|
for (var key = 2; key < len; key++) {
|
|
@@ -3445,7 +3448,7 @@ if (__DEV__) {
|
|
|
3445
3448
|
};
|
|
3446
3449
|
}
|
|
3447
3450
|
|
|
3448
|
-
var warning_1 = warning$
|
|
3451
|
+
var warning_1 = warning$1;
|
|
3449
3452
|
|
|
3450
3453
|
function Reference(_ref) {
|
|
3451
3454
|
var children = _ref.children,
|
|
@@ -3470,7 +3473,7 @@ function Reference(_ref) {
|
|
|
3470
3473
|
});
|
|
3471
3474
|
}
|
|
3472
3475
|
|
|
3473
|
-
function _objectWithoutPropertiesLoose$
|
|
3476
|
+
function _objectWithoutPropertiesLoose$5(r, e) {
|
|
3474
3477
|
if (null == r) return {};
|
|
3475
3478
|
var t = {};
|
|
3476
3479
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
@@ -3909,7 +3912,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
3909
3912
|
_this$props.onExiting;
|
|
3910
3913
|
_this$props.onExited;
|
|
3911
3914
|
_this$props.nodeRef;
|
|
3912
|
-
var childProps = _objectWithoutPropertiesLoose$
|
|
3915
|
+
var childProps = _objectWithoutPropertiesLoose$5(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
3913
3916
|
|
|
3914
3917
|
return (
|
|
3915
3918
|
/*#__PURE__*/
|
|
@@ -4135,7 +4138,7 @@ Transition.ENTERED = ENTERED;
|
|
|
4135
4138
|
Transition.EXITING = EXITING;
|
|
4136
4139
|
var Transition$1 = Transition;
|
|
4137
4140
|
|
|
4138
|
-
function ownKeys$
|
|
4141
|
+
function ownKeys$3(object, enumerableOnly) {
|
|
4139
4142
|
var keys = Object.keys(object);
|
|
4140
4143
|
|
|
4141
4144
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -4158,13 +4161,13 @@ function _objectSpread2(target) {
|
|
|
4158
4161
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4159
4162
|
|
|
4160
4163
|
if (i % 2) {
|
|
4161
|
-
ownKeys$
|
|
4162
|
-
_defineProperty$
|
|
4164
|
+
ownKeys$3(Object(source), true).forEach(function (key) {
|
|
4165
|
+
_defineProperty$4(target, key, source[key]);
|
|
4163
4166
|
});
|
|
4164
4167
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
4165
4168
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4166
4169
|
} else {
|
|
4167
|
-
ownKeys$
|
|
4170
|
+
ownKeys$3(Object(source)).forEach(function (key) {
|
|
4168
4171
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4169
4172
|
});
|
|
4170
4173
|
}
|
|
@@ -4173,7 +4176,7 @@ function _objectSpread2(target) {
|
|
|
4173
4176
|
return target;
|
|
4174
4177
|
}
|
|
4175
4178
|
|
|
4176
|
-
function _defineProperty$
|
|
4179
|
+
function _defineProperty$4(obj, key, value) {
|
|
4177
4180
|
if (key in obj) {
|
|
4178
4181
|
Object.defineProperty(obj, key, {
|
|
4179
4182
|
value: value,
|
|
@@ -4188,8 +4191,8 @@ function _defineProperty$5(obj, key, value) {
|
|
|
4188
4191
|
return obj;
|
|
4189
4192
|
}
|
|
4190
4193
|
|
|
4191
|
-
function _extends$
|
|
4192
|
-
_extends$
|
|
4194
|
+
function _extends$5() {
|
|
4195
|
+
_extends$5 = Object.assign || function (target) {
|
|
4193
4196
|
for (var i = 1; i < arguments.length; i++) {
|
|
4194
4197
|
var source = arguments[i];
|
|
4195
4198
|
|
|
@@ -4203,10 +4206,10 @@ function _extends$9() {
|
|
|
4203
4206
|
return target;
|
|
4204
4207
|
};
|
|
4205
4208
|
|
|
4206
|
-
return _extends$
|
|
4209
|
+
return _extends$5.apply(this, arguments);
|
|
4207
4210
|
}
|
|
4208
4211
|
|
|
4209
|
-
function _objectWithoutPropertiesLoose$
|
|
4212
|
+
function _objectWithoutPropertiesLoose$4(source, excluded) {
|
|
4210
4213
|
if (source == null) return {};
|
|
4211
4214
|
var target = {};
|
|
4212
4215
|
var sourceKeys = Object.keys(source);
|
|
@@ -4224,7 +4227,7 @@ function _objectWithoutPropertiesLoose$5(source, excluded) {
|
|
|
4224
4227
|
function _objectWithoutProperties$1(source, excluded) {
|
|
4225
4228
|
if (source == null) return {};
|
|
4226
4229
|
|
|
4227
|
-
var target = _objectWithoutPropertiesLoose$
|
|
4230
|
+
var target = _objectWithoutPropertiesLoose$4(source, excluded);
|
|
4228
4231
|
|
|
4229
4232
|
var key, i;
|
|
4230
4233
|
|
|
@@ -4312,7 +4315,7 @@ function pick(obj, keys) {
|
|
|
4312
4315
|
return result;
|
|
4313
4316
|
}
|
|
4314
4317
|
let warned = {};
|
|
4315
|
-
function warnOnce$
|
|
4318
|
+
function warnOnce$1(message) {
|
|
4316
4319
|
if (!warned[message]) {
|
|
4317
4320
|
/* istanbul ignore else */
|
|
4318
4321
|
if (typeof console !== 'undefined') {
|
|
@@ -4325,7 +4328,7 @@ function warnOnce$2(message) {
|
|
|
4325
4328
|
function deprecated(propType, explanation) {
|
|
4326
4329
|
return function validate(props, propName, componentName, ...rest) {
|
|
4327
4330
|
if (props[propName] !== null && typeof props[propName] !== 'undefined') {
|
|
4328
|
-
warnOnce$
|
|
4331
|
+
warnOnce$1(`"${propName}" property of "${componentName}" has been deprecated.\n${explanation}`);
|
|
4329
4332
|
}
|
|
4330
4333
|
|
|
4331
4334
|
return propType(props, propName, componentName, ...rest);
|
|
@@ -4408,7 +4411,7 @@ function isObject$1(value) {
|
|
|
4408
4411
|
const type = typeof value;
|
|
4409
4412
|
return value != null && (type === 'object' || type === 'function');
|
|
4410
4413
|
}
|
|
4411
|
-
function isFunction$
|
|
4414
|
+
function isFunction$4(value) {
|
|
4412
4415
|
if (!isObject$1(value)) {
|
|
4413
4416
|
return false;
|
|
4414
4417
|
}
|
|
@@ -4421,7 +4424,7 @@ function findDOMElements(target) {
|
|
|
4421
4424
|
return target.current;
|
|
4422
4425
|
}
|
|
4423
4426
|
|
|
4424
|
-
if (isFunction$
|
|
4427
|
+
if (isFunction$4(target)) {
|
|
4425
4428
|
return target();
|
|
4426
4429
|
}
|
|
4427
4430
|
|
|
@@ -4557,7 +4560,7 @@ const Row = props => {
|
|
|
4557
4560
|
colClasses.push(isXs ? `row-cols-${colSize}` : `row-cols-${colWidth}-${colSize}`);
|
|
4558
4561
|
});
|
|
4559
4562
|
const classes = mapToCssModules(classNames$1(className, noGutters ? 'gx-0' : null, form ? 'form-row' : 'row', colClasses), cssModule);
|
|
4560
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
4563
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
4561
4564
|
className: classes
|
|
4562
4565
|
}));
|
|
4563
4566
|
};
|
|
@@ -4651,7 +4654,7 @@ const Col = props => {
|
|
|
4651
4654
|
}
|
|
4652
4655
|
|
|
4653
4656
|
const classes = mapToCssModules(classNames$1(className, colClasses), cssModule);
|
|
4654
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
4657
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, modifiedAttributes, {
|
|
4655
4658
|
className: classes
|
|
4656
4659
|
}));
|
|
4657
4660
|
};
|
|
@@ -4726,7 +4729,7 @@ const defaultProps$19 = {
|
|
|
4726
4729
|
tag: 'a'
|
|
4727
4730
|
};
|
|
4728
4731
|
|
|
4729
|
-
class NavLink
|
|
4732
|
+
class NavLink extends React__default.Component {
|
|
4730
4733
|
constructor(props) {
|
|
4731
4734
|
super(props);
|
|
4732
4735
|
this.onClick = this.onClick.bind(this);
|
|
@@ -4762,7 +4765,7 @@ class NavLink$1 extends React__default.Component {
|
|
|
4762
4765
|
disabled: attributes.disabled,
|
|
4763
4766
|
active: active
|
|
4764
4767
|
}), cssModule);
|
|
4765
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
4768
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
4766
4769
|
ref: innerRef,
|
|
4767
4770
|
onClick: this.onClick,
|
|
4768
4771
|
className: classes
|
|
@@ -4771,8 +4774,8 @@ class NavLink$1 extends React__default.Component {
|
|
|
4771
4774
|
|
|
4772
4775
|
}
|
|
4773
4776
|
|
|
4774
|
-
NavLink
|
|
4775
|
-
NavLink
|
|
4777
|
+
NavLink.propTypes = propTypes$1b;
|
|
4778
|
+
NavLink.defaultProps = defaultProps$19;
|
|
4776
4779
|
({
|
|
4777
4780
|
tag: tagPropType,
|
|
4778
4781
|
listTag: tagPropType,
|
|
@@ -4856,7 +4859,7 @@ class Button extends React__default.Component {
|
|
|
4856
4859
|
}
|
|
4857
4860
|
|
|
4858
4861
|
const defaultAriaLabel = close ? 'Close' : null;
|
|
4859
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
4862
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
|
|
4860
4863
|
type: Tag === 'button' && attributes.onClick ? 'button' : undefined
|
|
4861
4864
|
}, attributes, {
|
|
4862
4865
|
className: classes,
|
|
@@ -4937,7 +4940,7 @@ class ButtonToggle extends React__default.Component {
|
|
|
4937
4940
|
const classes = mapToCssModules(classNames$1(className, {
|
|
4938
4941
|
focus: this.state.focus
|
|
4939
4942
|
}), this.props.cssModule);
|
|
4940
|
-
return /*#__PURE__*/React__default.createElement(Button$1, _extends$
|
|
4943
|
+
return /*#__PURE__*/React__default.createElement(Button$1, _extends$5({
|
|
4941
4944
|
active: this.state.toggled,
|
|
4942
4945
|
onBlur: this.onBlur,
|
|
4943
4946
|
onFocus: this.onFocus,
|
|
@@ -5220,7 +5223,7 @@ class Dropdown extends React__default.Component {
|
|
|
5220
5223
|
}), cssModule);
|
|
5221
5224
|
return /*#__PURE__*/React__default.createElement(DropdownContext.Provider, {
|
|
5222
5225
|
value: this.getContextValue()
|
|
5223
|
-
}, /*#__PURE__*/React__default.createElement(Manager, null, /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5226
|
+
}, /*#__PURE__*/React__default.createElement(Manager, null, /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attrs, {
|
|
5224
5227
|
[typeof Tag === 'string' ? 'ref' : 'innerRef']: this.containerRef,
|
|
5225
5228
|
onKeyDown: this.handleKeyDown,
|
|
5226
5229
|
className: classes
|
|
@@ -5238,7 +5241,7 @@ const propTypes$15 = {
|
|
|
5238
5241
|
};
|
|
5239
5242
|
|
|
5240
5243
|
const ButtonDropdown = props => {
|
|
5241
|
-
return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$
|
|
5244
|
+
return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$5({
|
|
5242
5245
|
group: true
|
|
5243
5246
|
}, props));
|
|
5244
5247
|
};
|
|
@@ -5370,7 +5373,7 @@ class DropdownItem extends React__default.Component {
|
|
|
5370
5373
|
}
|
|
5371
5374
|
}
|
|
5372
5375
|
|
|
5373
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5376
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
|
|
5374
5377
|
type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined
|
|
5375
5378
|
}, props, {
|
|
5376
5379
|
tabIndex: tabIndex,
|
|
@@ -5479,7 +5482,7 @@ class DropdownMenu extends React__default.Component {
|
|
|
5479
5482
|
if (onMenuRef) onMenuRef(tagRef);
|
|
5480
5483
|
};
|
|
5481
5484
|
|
|
5482
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5485
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
|
|
5483
5486
|
tabIndex: "-1",
|
|
5484
5487
|
role: this.getRole(),
|
|
5485
5488
|
ref: handleRef
|
|
@@ -5498,7 +5501,7 @@ class DropdownMenu extends React__default.Component {
|
|
|
5498
5501
|
}
|
|
5499
5502
|
}
|
|
5500
5503
|
|
|
5501
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5504
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
|
|
5502
5505
|
tabIndex: "-1",
|
|
5503
5506
|
role: this.getRole()
|
|
5504
5507
|
}, attrs, {
|
|
@@ -5597,7 +5600,7 @@ class DropdownToggle extends React__default.Component {
|
|
|
5597
5600
|
}
|
|
5598
5601
|
|
|
5599
5602
|
if (this.context.inNavbar) {
|
|
5600
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5603
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, props, {
|
|
5601
5604
|
className: classes,
|
|
5602
5605
|
onClick: this.onClick,
|
|
5603
5606
|
"aria-expanded": this.context.isOpen,
|
|
@@ -5610,7 +5613,7 @@ class DropdownToggle extends React__default.Component {
|
|
|
5610
5613
|
innerRef: innerRef
|
|
5611
5614
|
}, ({
|
|
5612
5615
|
ref
|
|
5613
|
-
}) => /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5616
|
+
}) => /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, props, {
|
|
5614
5617
|
[typeof Tag === 'string' ? 'ref' : 'innerRef']: ref,
|
|
5615
5618
|
className: classes,
|
|
5616
5619
|
onClick: this.onClick,
|
|
@@ -5667,7 +5670,7 @@ function Fade(props) {
|
|
|
5667
5670
|
return /*#__PURE__*/React__default.createElement(Transition$1, transitionProps, status => {
|
|
5668
5671
|
const isActive = status === 'entered';
|
|
5669
5672
|
const classes = mapToCssModules(classNames$1(className, baseClass, isActive && baseClassActive), cssModule);
|
|
5670
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5673
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
|
|
5671
5674
|
className: classes
|
|
5672
5675
|
}, childProps, {
|
|
5673
5676
|
ref: innerRef
|
|
@@ -5829,7 +5832,7 @@ class Collapse extends Component {
|
|
|
5829
5832
|
} = this.state;
|
|
5830
5833
|
const transitionProps = pick(otherProps, TransitionPropTypeKeys);
|
|
5831
5834
|
const childProps = omit(otherProps, TransitionPropTypeKeys);
|
|
5832
|
-
return /*#__PURE__*/React__default.createElement(Transition$1, _extends$
|
|
5835
|
+
return /*#__PURE__*/React__default.createElement(Transition$1, _extends$5({}, transitionProps, {
|
|
5833
5836
|
in: isOpen,
|
|
5834
5837
|
onEntering: this.onEntering,
|
|
5835
5838
|
onEntered: this.onEntered,
|
|
@@ -5842,7 +5845,7 @@ class Collapse extends Component {
|
|
|
5842
5845
|
const style = dimension === null ? null : {
|
|
5843
5846
|
[horizontal ? 'width' : 'height']: dimension
|
|
5844
5847
|
};
|
|
5845
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5848
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, childProps, {
|
|
5846
5849
|
style: _objectSpread2(_objectSpread2({}, childProps.style), style),
|
|
5847
5850
|
className: classes,
|
|
5848
5851
|
ref: this.props.innerRef
|
|
@@ -5897,7 +5900,7 @@ const Badge = props => {
|
|
|
5897
5900
|
Tag = 'a';
|
|
5898
5901
|
}
|
|
5899
5902
|
|
|
5900
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5903
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
5901
5904
|
className: classes,
|
|
5902
5905
|
ref: innerRef
|
|
5903
5906
|
}));
|
|
@@ -6030,7 +6033,7 @@ class CarouselItem extends React__default.Component {
|
|
|
6030
6033
|
} = _this$props,
|
|
6031
6034
|
transitionProps = _objectWithoutProperties$1(_this$props, _excluded$E);
|
|
6032
6035
|
|
|
6033
|
-
return /*#__PURE__*/React__default.createElement(Transition$1, _extends$
|
|
6036
|
+
return /*#__PURE__*/React__default.createElement(Transition$1, _extends$5({}, transitionProps, {
|
|
6034
6037
|
enter: slide,
|
|
6035
6038
|
exit: slide,
|
|
6036
6039
|
in: isIn,
|
|
@@ -6559,7 +6562,7 @@ class UncontrolledCarousel extends Component {
|
|
|
6559
6562
|
captionHeader: item.header || item.caption
|
|
6560
6563
|
}));
|
|
6561
6564
|
});
|
|
6562
|
-
return /*#__PURE__*/React__default.createElement(Carousel$1, _extends$
|
|
6565
|
+
return /*#__PURE__*/React__default.createElement(Carousel$1, _extends$5({
|
|
6563
6566
|
activeIndex: activeIndex,
|
|
6564
6567
|
next: this.next,
|
|
6565
6568
|
previous: this.previous,
|
|
@@ -6745,7 +6748,7 @@ class PopperContent extends React__default.Component {
|
|
|
6745
6748
|
timeout: fade ? transition.timeout : 0
|
|
6746
6749
|
});
|
|
6747
6750
|
|
|
6748
|
-
return /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
6751
|
+
return /*#__PURE__*/React__default.createElement(Fade, _extends$5({}, popperTransition, attrs, {
|
|
6749
6752
|
in: isOpen,
|
|
6750
6753
|
onExited: this.onClosed,
|
|
6751
6754
|
tag: tag
|
|
@@ -7157,7 +7160,7 @@ class TooltipPopoverWrapper extends React__default.Component {
|
|
|
7157
7160
|
flip: flip
|
|
7158
7161
|
}, ({
|
|
7159
7162
|
update
|
|
7160
|
-
}) => /*#__PURE__*/React__default.createElement("div", _extends$
|
|
7163
|
+
}) => /*#__PURE__*/React__default.createElement("div", _extends$5({}, attributes, {
|
|
7161
7164
|
ref: this.getRef,
|
|
7162
7165
|
className: classes,
|
|
7163
7166
|
role: "tooltip",
|
|
@@ -7185,7 +7188,7 @@ const defaultProps$D = {
|
|
|
7185
7188
|
const Popover = props => {
|
|
7186
7189
|
const popperClasses = classNames$1('popover', 'show', props.popperClassName);
|
|
7187
7190
|
const classes = classNames$1('popover-inner', props.innerClassName);
|
|
7188
|
-
return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$
|
|
7191
|
+
return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$5({}, props, {
|
|
7189
7192
|
arrowClassName: "popover-arrow",
|
|
7190
7193
|
popperClassName: popperClasses,
|
|
7191
7194
|
innerClassName: classes
|
|
@@ -7213,7 +7216,7 @@ class UncontrolledPopover extends Component {
|
|
|
7213
7216
|
}
|
|
7214
7217
|
|
|
7215
7218
|
render() {
|
|
7216
|
-
return /*#__PURE__*/React__default.createElement(Popover$1, _extends$
|
|
7219
|
+
return /*#__PURE__*/React__default.createElement(Popover$1, _extends$5({
|
|
7217
7220
|
isOpen: this.state.isOpen,
|
|
7218
7221
|
toggle: this.toggle
|
|
7219
7222
|
}, omit(this.props, omitKeys$4)));
|
|
@@ -7652,7 +7655,7 @@ class Modal extends React__default.Component {
|
|
|
7652
7655
|
renderModalDialog() {
|
|
7653
7656
|
const attributes = omit(this.props, propsToOmit$1);
|
|
7654
7657
|
const dialogBaseClass = 'modal-dialog';
|
|
7655
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$
|
|
7658
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$5({}, attributes, {
|
|
7656
7659
|
className: mapToCssModules(classNames$1(dialogBaseClass, this.props.className, {
|
|
7657
7660
|
[`modal-${this.props.size}`]: this.props.size,
|
|
7658
7661
|
[`${dialogBaseClass}-centered`]: this.props.centered,
|
|
@@ -7713,7 +7716,7 @@ class Modal extends React__default.Component {
|
|
|
7713
7716
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
7714
7717
|
});
|
|
7715
7718
|
|
|
7716
|
-
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
7719
|
+
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$5({}, backdropTransition, {
|
|
7717
7720
|
in: isOpen && !!backdrop,
|
|
7718
7721
|
cssModule: cssModule,
|
|
7719
7722
|
className: mapToCssModules(classNames$1('modal-backdrop', backdropClassName), cssModule)
|
|
@@ -7724,7 +7727,7 @@ class Modal extends React__default.Component {
|
|
|
7724
7727
|
node: this._element
|
|
7725
7728
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7726
7729
|
className: mapToCssModules(wrapClassName)
|
|
7727
|
-
}, /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
7730
|
+
}, /*#__PURE__*/React__default.createElement(Fade, _extends$5({}, modalAttributes, modalTransition, {
|
|
7728
7731
|
in: isOpen,
|
|
7729
7732
|
onEntered: this.onOpened,
|
|
7730
7733
|
onExited: this.onClosed,
|
|
@@ -7779,7 +7782,7 @@ const ModalBody = props => {
|
|
|
7779
7782
|
attributes = _objectWithoutProperties$1(props, _excluded$u);
|
|
7780
7783
|
|
|
7781
7784
|
const classes = mapToCssModules(classNames$1(className, 'modal-body'), cssModule);
|
|
7782
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
7785
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
7783
7786
|
className: classes
|
|
7784
7787
|
}));
|
|
7785
7788
|
};
|
|
@@ -7803,7 +7806,7 @@ const defaultProps$v = {
|
|
|
7803
7806
|
const Tooltip = props => {
|
|
7804
7807
|
const popperClasses = classNames$1('tooltip', 'show', props.popperClassName);
|
|
7805
7808
|
const classes = classNames$1('tooltip-inner', props.innerClassName);
|
|
7806
|
-
return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$
|
|
7809
|
+
return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$5({}, props, {
|
|
7807
7810
|
arrowClassName: "tooltip-arrow",
|
|
7808
7811
|
popperClassName: popperClasses,
|
|
7809
7812
|
innerClassName: classes
|
|
@@ -7849,7 +7852,7 @@ const defaultProps$s = {
|
|
|
7849
7852
|
tag: 'form'
|
|
7850
7853
|
};
|
|
7851
7854
|
|
|
7852
|
-
class Form
|
|
7855
|
+
class Form extends Component {
|
|
7853
7856
|
constructor(props) {
|
|
7854
7857
|
super(props);
|
|
7855
7858
|
this.getRef = this.getRef.bind(this);
|
|
@@ -7882,7 +7885,7 @@ class Form$1 extends Component {
|
|
|
7882
7885
|
attributes = _objectWithoutProperties$1(_this$props, _excluded$q);
|
|
7883
7886
|
|
|
7884
7887
|
const classes = mapToCssModules(classNames$1(className, inline ? 'form-inline' : false), cssModule);
|
|
7885
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
7888
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
7886
7889
|
ref: innerRef,
|
|
7887
7890
|
className: classes
|
|
7888
7891
|
}));
|
|
@@ -7890,8 +7893,8 @@ class Form$1 extends Component {
|
|
|
7890
7893
|
|
|
7891
7894
|
}
|
|
7892
7895
|
|
|
7893
|
-
Form
|
|
7894
|
-
Form
|
|
7896
|
+
Form.propTypes = propTypes$t;
|
|
7897
|
+
Form.defaultProps = defaultProps$s;
|
|
7895
7898
|
|
|
7896
7899
|
const _excluded$p = ["className", "cssModule", "valid", "tooltip", "tag"];
|
|
7897
7900
|
const propTypes$s = {
|
|
@@ -7919,7 +7922,7 @@ const FormFeedback = props => {
|
|
|
7919
7922
|
|
|
7920
7923
|
const validMode = tooltip ? 'tooltip' : 'feedback';
|
|
7921
7924
|
const classes = mapToCssModules(classNames$1(className, valid ? `valid-${validMode}` : `invalid-${validMode}`), cssModule);
|
|
7922
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
7925
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
7923
7926
|
className: classes
|
|
7924
7927
|
}));
|
|
7925
7928
|
};
|
|
@@ -8028,7 +8031,7 @@ class Input extends React__default.Component {
|
|
|
8028
8031
|
}
|
|
8029
8032
|
|
|
8030
8033
|
if (attributes.size && isNotaNumber.test(attributes.size)) {
|
|
8031
|
-
warnOnce$
|
|
8034
|
+
warnOnce$1('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.');
|
|
8032
8035
|
bsSize = attributes.size;
|
|
8033
8036
|
delete attributes.size;
|
|
8034
8037
|
}
|
|
@@ -8040,11 +8043,11 @@ class Input extends React__default.Component {
|
|
|
8040
8043
|
}
|
|
8041
8044
|
|
|
8042
8045
|
if (attributes.children && !(plaintext || type === 'select' || typeof Tag !== 'string' || Tag === 'select')) {
|
|
8043
|
-
warnOnce$
|
|
8046
|
+
warnOnce$1(`Input with a type of "${type}" cannot have children. Please use "value"/"defaultValue" instead.`);
|
|
8044
8047
|
delete attributes.children;
|
|
8045
8048
|
}
|
|
8046
8049
|
|
|
8047
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8050
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
8048
8051
|
ref: innerRef,
|
|
8049
8052
|
className: classes,
|
|
8050
8053
|
"aria-invalid": invalid
|
|
@@ -8148,7 +8151,7 @@ const Label = props => {
|
|
|
8148
8151
|
}
|
|
8149
8152
|
});
|
|
8150
8153
|
const classes = mapToCssModules(classNames$1(className, hidden ? 'visually-hidden' : false, check ? 'form-check-label' : false, size ? `col-form-label-${size}` : false, colClasses, colClasses.length ? 'col-form-label' : 'form-label'), cssModule);
|
|
8151
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8154
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
|
|
8152
8155
|
htmlFor: htmlFor
|
|
8153
8156
|
}, attributes, {
|
|
8154
8157
|
className: classes
|
|
@@ -8540,7 +8543,7 @@ class Offcanvas extends React__default.Component {
|
|
|
8540
8543
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
8541
8544
|
});
|
|
8542
8545
|
|
|
8543
|
-
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
8546
|
+
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$5({}, backdropTransition, {
|
|
8544
8547
|
in: isOpen && !!backdrop,
|
|
8545
8548
|
innerRef: c => {
|
|
8546
8549
|
this._backdrop = c;
|
|
@@ -8557,7 +8560,7 @@ class Offcanvas extends React__default.Component {
|
|
|
8557
8560
|
const attributes = omit(this.props, propsToOmit);
|
|
8558
8561
|
return /*#__PURE__*/React__default.createElement(Portal$1$1, {
|
|
8559
8562
|
node: this._element
|
|
8560
|
-
}, /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
8563
|
+
}, /*#__PURE__*/React__default.createElement(Fade, _extends$5({}, attributes, offcanvasAttributes, offcanvasTransition, {
|
|
8561
8564
|
in: isOpen,
|
|
8562
8565
|
onEntered: this.onOpened,
|
|
8563
8566
|
onExited: this.onClosed,
|
|
@@ -8681,7 +8684,7 @@ class TabContent extends Component {
|
|
|
8681
8684
|
value: {
|
|
8682
8685
|
activeTabId: this.state.activeTab
|
|
8683
8686
|
}
|
|
8684
|
-
}, /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8687
|
+
}, /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
8685
8688
|
className: classes
|
|
8686
8689
|
})));
|
|
8687
8690
|
}
|
|
@@ -8795,7 +8798,7 @@ const List = forwardRef((props, ref) => {
|
|
|
8795
8798
|
attributes = _objectWithoutProperties$1(props, _excluded$4);
|
|
8796
8799
|
|
|
8797
8800
|
const classes = mapToCssModules(classNames$1(className, type ? `list-${type}` : false), cssModule);
|
|
8798
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8801
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
8799
8802
|
className: classes,
|
|
8800
8803
|
ref: ref
|
|
8801
8804
|
}));
|
|
@@ -8822,7 +8825,7 @@ const ListInlineItem = forwardRef((props, ref) => {
|
|
|
8822
8825
|
attributes = _objectWithoutProperties$1(props, _excluded$3);
|
|
8823
8826
|
|
|
8824
8827
|
const classes = mapToCssModules(classNames$1(className, 'list-inline-item'), cssModule);
|
|
8825
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8828
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
|
|
8826
8829
|
className: classes,
|
|
8827
8830
|
ref: ref
|
|
8828
8831
|
}));
|
|
@@ -8848,7 +8851,7 @@ class UncontrolledButtonDropdown extends Component {
|
|
|
8848
8851
|
}
|
|
8849
8852
|
|
|
8850
8853
|
render() {
|
|
8851
|
-
return /*#__PURE__*/React__default.createElement(ButtonDropdown$1, _extends$
|
|
8854
|
+
return /*#__PURE__*/React__default.createElement(ButtonDropdown$1, _extends$5({
|
|
8852
8855
|
isOpen: this.state.isOpen,
|
|
8853
8856
|
toggle: this.toggle
|
|
8854
8857
|
}, omit(this.props, omitKeys$3)));
|
|
@@ -8904,7 +8907,7 @@ class UncontrolledCollapse extends Component {
|
|
|
8904
8907
|
}
|
|
8905
8908
|
|
|
8906
8909
|
render() {
|
|
8907
|
-
return /*#__PURE__*/React__default.createElement(Collapse$1, _extends$
|
|
8910
|
+
return /*#__PURE__*/React__default.createElement(Collapse$1, _extends$5({
|
|
8908
8911
|
isOpen: this.state.isOpen
|
|
8909
8912
|
}, omit(this.props, omitKeys$2)));
|
|
8910
8913
|
}
|
|
@@ -8936,7 +8939,7 @@ class UncontrolledDropdown extends Component {
|
|
|
8936
8939
|
}
|
|
8937
8940
|
|
|
8938
8941
|
render() {
|
|
8939
|
-
return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$
|
|
8942
|
+
return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$5({
|
|
8940
8943
|
isOpen: this.state.isOpen,
|
|
8941
8944
|
toggle: this.toggle
|
|
8942
8945
|
}, omit(this.props, omitKeys$1)));
|
|
@@ -8965,7 +8968,7 @@ class UncontrolledTooltip extends Component {
|
|
|
8965
8968
|
}
|
|
8966
8969
|
|
|
8967
8970
|
render() {
|
|
8968
|
-
return /*#__PURE__*/React__default.createElement(Tooltip$1, _extends$
|
|
8971
|
+
return /*#__PURE__*/React__default.createElement(Tooltip$1, _extends$5({
|
|
8969
8972
|
isOpen: this.state.isOpen,
|
|
8970
8973
|
toggle: this.toggle
|
|
8971
8974
|
}, omit(this.props, omitKeys)));
|
|
@@ -8976,7 +8979,7 @@ UncontrolledTooltip.propTypes = _objectSpread2({
|
|
|
8976
8979
|
defaultOpen: PropTypes.bool
|
|
8977
8980
|
}, Tooltip$1.propTypes);
|
|
8978
8981
|
|
|
8979
|
-
const _excluded$2
|
|
8982
|
+
const _excluded$2 = ["className", "cssModule", "type", "size", "color", "children", "tag"];
|
|
8980
8983
|
const propTypes$2 = {
|
|
8981
8984
|
tag: tagPropType,
|
|
8982
8985
|
type: PropTypes.string,
|
|
@@ -9002,10 +9005,10 @@ const Spinner = props => {
|
|
|
9002
9005
|
children,
|
|
9003
9006
|
tag: Tag
|
|
9004
9007
|
} = props,
|
|
9005
|
-
attributes = _objectWithoutProperties$1(props, _excluded$2
|
|
9008
|
+
attributes = _objectWithoutProperties$1(props, _excluded$2);
|
|
9006
9009
|
|
|
9007
9010
|
const classes = mapToCssModules(classNames$1(className, size ? `spinner-${type}-${size}` : false, `spinner-${type}`, color ? `text-${color}` : false), cssModule);
|
|
9008
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
9011
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
|
|
9009
9012
|
role: "status"
|
|
9010
9013
|
}, attributes, {
|
|
9011
9014
|
className: classes
|
|
@@ -9118,381 +9121,6 @@ var classnames$1 = {exports: {}};
|
|
|
9118
9121
|
|
|
9119
9122
|
var classnames = classnames$1.exports;
|
|
9120
9123
|
|
|
9121
|
-
function _typeof(o) {
|
|
9122
|
-
"@babel/helpers - typeof";
|
|
9123
|
-
|
|
9124
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
9125
|
-
return typeof o;
|
|
9126
|
-
} : function (o) {
|
|
9127
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
9128
|
-
}, _typeof(o);
|
|
9129
|
-
}
|
|
9130
|
-
|
|
9131
|
-
function toPrimitive(t, r) {
|
|
9132
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
9133
|
-
var e = t[Symbol.toPrimitive];
|
|
9134
|
-
if (void 0 !== e) {
|
|
9135
|
-
var i = e.call(t, r || "default");
|
|
9136
|
-
if ("object" != _typeof(i)) return i;
|
|
9137
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9138
|
-
}
|
|
9139
|
-
return ("string" === r ? String : Number)(t);
|
|
9140
|
-
}
|
|
9141
|
-
|
|
9142
|
-
function toPropertyKey(t) {
|
|
9143
|
-
var i = toPrimitive(t, "string");
|
|
9144
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
9145
|
-
}
|
|
9146
|
-
|
|
9147
|
-
function _defineProperty$4(e, r, t) {
|
|
9148
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
9149
|
-
value: t,
|
|
9150
|
-
enumerable: !0,
|
|
9151
|
-
configurable: !0,
|
|
9152
|
-
writable: !0
|
|
9153
|
-
}) : e[r] = t, e;
|
|
9154
|
-
}
|
|
9155
|
-
|
|
9156
|
-
function _classCallCheck(a, n) {
|
|
9157
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
9158
|
-
}
|
|
9159
|
-
|
|
9160
|
-
function _defineProperties(e, r) {
|
|
9161
|
-
for (var t = 0; t < r.length; t++) {
|
|
9162
|
-
var o = r[t];
|
|
9163
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
9164
|
-
}
|
|
9165
|
-
}
|
|
9166
|
-
function _createClass(e, r, t) {
|
|
9167
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
9168
|
-
writable: !1
|
|
9169
|
-
}), e;
|
|
9170
|
-
}
|
|
9171
|
-
|
|
9172
|
-
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
9173
|
-
var htmlEntities = {
|
|
9174
|
-
'&': '&',
|
|
9175
|
-
'&': '&',
|
|
9176
|
-
'<': '<',
|
|
9177
|
-
'<': '<',
|
|
9178
|
-
'>': '>',
|
|
9179
|
-
'>': '>',
|
|
9180
|
-
''': "'",
|
|
9181
|
-
''': "'",
|
|
9182
|
-
'"': '"',
|
|
9183
|
-
'"': '"',
|
|
9184
|
-
' ': ' ',
|
|
9185
|
-
' ': ' ',
|
|
9186
|
-
'©': '©',
|
|
9187
|
-
'©': '©',
|
|
9188
|
-
'®': '®',
|
|
9189
|
-
'®': '®',
|
|
9190
|
-
'…': '…',
|
|
9191
|
-
'…': '…',
|
|
9192
|
-
'/': '/',
|
|
9193
|
-
'/': '/'
|
|
9194
|
-
};
|
|
9195
|
-
|
|
9196
|
-
var unescapeHtmlEntity = function unescapeHtmlEntity(m) {
|
|
9197
|
-
return htmlEntities[m];
|
|
9198
|
-
};
|
|
9199
|
-
|
|
9200
|
-
var unescape = function unescape(text) {
|
|
9201
|
-
return text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
9202
|
-
};
|
|
9203
|
-
|
|
9204
|
-
var defaultOptions$2 = {
|
|
9205
|
-
bindI18n: 'languageChanged',
|
|
9206
|
-
bindI18nStore: '',
|
|
9207
|
-
transEmptyNodeValue: '',
|
|
9208
|
-
transSupportBasicHtmlNodes: true,
|
|
9209
|
-
transWrapTextNodes: '',
|
|
9210
|
-
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
|
|
9211
|
-
useSuspense: true,
|
|
9212
|
-
unescape: unescape
|
|
9213
|
-
};
|
|
9214
|
-
var i18nInstance;
|
|
9215
|
-
var I18nContext = createContext();
|
|
9216
|
-
function getDefaults() {
|
|
9217
|
-
return defaultOptions$2;
|
|
9218
|
-
}
|
|
9219
|
-
var ReportNamespaces = function () {
|
|
9220
|
-
function ReportNamespaces() {
|
|
9221
|
-
_classCallCheck(this, ReportNamespaces);
|
|
9222
|
-
|
|
9223
|
-
this.usedNamespaces = {};
|
|
9224
|
-
}
|
|
9225
|
-
|
|
9226
|
-
_createClass(ReportNamespaces, [{
|
|
9227
|
-
key: "addUsedNamespaces",
|
|
9228
|
-
value: function addUsedNamespaces(namespaces) {
|
|
9229
|
-
var _this = this;
|
|
9230
|
-
|
|
9231
|
-
namespaces.forEach(function (ns) {
|
|
9232
|
-
if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;
|
|
9233
|
-
});
|
|
9234
|
-
}
|
|
9235
|
-
}, {
|
|
9236
|
-
key: "getUsedNamespaces",
|
|
9237
|
-
value: function getUsedNamespaces() {
|
|
9238
|
-
return Object.keys(this.usedNamespaces);
|
|
9239
|
-
}
|
|
9240
|
-
}]);
|
|
9241
|
-
|
|
9242
|
-
return ReportNamespaces;
|
|
9243
|
-
}();
|
|
9244
|
-
function getI18n() {
|
|
9245
|
-
return i18nInstance;
|
|
9246
|
-
}
|
|
9247
|
-
|
|
9248
|
-
function warn$2() {
|
|
9249
|
-
if (console && console.warn) {
|
|
9250
|
-
var _console;
|
|
9251
|
-
|
|
9252
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9253
|
-
args[_key] = arguments[_key];
|
|
9254
|
-
}
|
|
9255
|
-
|
|
9256
|
-
if (typeof args[0] === 'string') args[0] = "react-i18next:: ".concat(args[0]);
|
|
9257
|
-
|
|
9258
|
-
(_console = console).warn.apply(_console, args);
|
|
9259
|
-
}
|
|
9260
|
-
}
|
|
9261
|
-
var alreadyWarned = {};
|
|
9262
|
-
function warnOnce$1() {
|
|
9263
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
9264
|
-
args[_key2] = arguments[_key2];
|
|
9265
|
-
}
|
|
9266
|
-
|
|
9267
|
-
if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return;
|
|
9268
|
-
if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date();
|
|
9269
|
-
warn$2.apply(void 0, args);
|
|
9270
|
-
}
|
|
9271
|
-
function loadNamespaces(i18n, ns, cb) {
|
|
9272
|
-
i18n.loadNamespaces(ns, function () {
|
|
9273
|
-
if (i18n.isInitialized) {
|
|
9274
|
-
cb();
|
|
9275
|
-
} else {
|
|
9276
|
-
var initialized = function initialized() {
|
|
9277
|
-
setTimeout(function () {
|
|
9278
|
-
i18n.off('initialized', initialized);
|
|
9279
|
-
}, 0);
|
|
9280
|
-
cb();
|
|
9281
|
-
};
|
|
9282
|
-
|
|
9283
|
-
i18n.on('initialized', initialized);
|
|
9284
|
-
}
|
|
9285
|
-
});
|
|
9286
|
-
}
|
|
9287
|
-
|
|
9288
|
-
function oldI18nextHasLoadedNamespace(ns, i18n) {
|
|
9289
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9290
|
-
var lng = i18n.languages[0];
|
|
9291
|
-
var fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
|
|
9292
|
-
var lastLng = i18n.languages[i18n.languages.length - 1];
|
|
9293
|
-
if (lng.toLowerCase() === 'cimode') return true;
|
|
9294
|
-
|
|
9295
|
-
var loadNotPending = function loadNotPending(l, n) {
|
|
9296
|
-
var loadState = i18n.services.backendConnector.state["".concat(l, "|").concat(n)];
|
|
9297
|
-
return loadState === -1 || loadState === 2;
|
|
9298
|
-
};
|
|
9299
|
-
|
|
9300
|
-
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
|
|
9301
|
-
if (i18n.hasResourceBundle(lng, ns)) return true;
|
|
9302
|
-
if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages) return true;
|
|
9303
|
-
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
|
|
9304
|
-
return false;
|
|
9305
|
-
}
|
|
9306
|
-
|
|
9307
|
-
function hasLoadedNamespace(ns, i18n) {
|
|
9308
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9309
|
-
|
|
9310
|
-
if (!i18n.languages || !i18n.languages.length) {
|
|
9311
|
-
warnOnce$1('i18n.languages were undefined or empty', i18n.languages);
|
|
9312
|
-
return true;
|
|
9313
|
-
}
|
|
9314
|
-
|
|
9315
|
-
var isNewerI18next = i18n.options.ignoreJSONStructure !== undefined;
|
|
9316
|
-
|
|
9317
|
-
if (!isNewerI18next) {
|
|
9318
|
-
return oldI18nextHasLoadedNamespace(ns, i18n, options);
|
|
9319
|
-
}
|
|
9320
|
-
|
|
9321
|
-
return i18n.hasLoadedNamespace(ns, {
|
|
9322
|
-
precheck: function precheck(i18nInstance, loadNotPending) {
|
|
9323
|
-
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
|
|
9324
|
-
}
|
|
9325
|
-
});
|
|
9326
|
-
}
|
|
9327
|
-
|
|
9328
|
-
function _arrayWithHoles(r) {
|
|
9329
|
-
if (Array.isArray(r)) return r;
|
|
9330
|
-
}
|
|
9331
|
-
|
|
9332
|
-
function _iterableToArrayLimit(r, l) {
|
|
9333
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9334
|
-
if (null != t) {
|
|
9335
|
-
var e,
|
|
9336
|
-
n,
|
|
9337
|
-
i,
|
|
9338
|
-
u,
|
|
9339
|
-
a = [],
|
|
9340
|
-
f = !0,
|
|
9341
|
-
o = !1;
|
|
9342
|
-
try {
|
|
9343
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
9344
|
-
if (Object(t) !== t) return;
|
|
9345
|
-
f = !1;
|
|
9346
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
9347
|
-
} catch (r) {
|
|
9348
|
-
o = !0, n = r;
|
|
9349
|
-
} finally {
|
|
9350
|
-
try {
|
|
9351
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
9352
|
-
} finally {
|
|
9353
|
-
if (o) throw n;
|
|
9354
|
-
}
|
|
9355
|
-
}
|
|
9356
|
-
return a;
|
|
9357
|
-
}
|
|
9358
|
-
}
|
|
9359
|
-
|
|
9360
|
-
function _arrayLikeToArray(r, a) {
|
|
9361
|
-
(null == a || a > r.length) && (a = r.length);
|
|
9362
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
9363
|
-
return n;
|
|
9364
|
-
}
|
|
9365
|
-
|
|
9366
|
-
function _unsupportedIterableToArray(r, a) {
|
|
9367
|
-
if (r) {
|
|
9368
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
9369
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
9370
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
9371
|
-
}
|
|
9372
|
-
}
|
|
9373
|
-
|
|
9374
|
-
function _nonIterableRest() {
|
|
9375
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9376
|
-
}
|
|
9377
|
-
|
|
9378
|
-
function _slicedToArray(r, e) {
|
|
9379
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
9380
|
-
}
|
|
9381
|
-
|
|
9382
|
-
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
9383
|
-
|
|
9384
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9385
|
-
|
|
9386
|
-
var usePrevious = function usePrevious(value, ignore) {
|
|
9387
|
-
var ref = useRef();
|
|
9388
|
-
useEffect(function () {
|
|
9389
|
-
ref.current = ignore ? ref.current : value;
|
|
9390
|
-
}, [value, ignore]);
|
|
9391
|
-
return ref.current;
|
|
9392
|
-
};
|
|
9393
|
-
|
|
9394
|
-
function useTranslation(ns) {
|
|
9395
|
-
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9396
|
-
var i18nFromProps = props.i18n;
|
|
9397
|
-
|
|
9398
|
-
var _ref = useContext(I18nContext) || {},
|
|
9399
|
-
i18nFromContext = _ref.i18n,
|
|
9400
|
-
defaultNSFromContext = _ref.defaultNS;
|
|
9401
|
-
|
|
9402
|
-
var i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
9403
|
-
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
|
|
9404
|
-
|
|
9405
|
-
if (!i18n) {
|
|
9406
|
-
warnOnce$1('You will need to pass in an i18next instance by using initReactI18next');
|
|
9407
|
-
|
|
9408
|
-
var notReadyT = function notReadyT(k) {
|
|
9409
|
-
return Array.isArray(k) ? k[k.length - 1] : k;
|
|
9410
|
-
};
|
|
9411
|
-
|
|
9412
|
-
var retNotReady = [notReadyT, {}, false];
|
|
9413
|
-
retNotReady.t = notReadyT;
|
|
9414
|
-
retNotReady.i18n = {};
|
|
9415
|
-
retNotReady.ready = false;
|
|
9416
|
-
return retNotReady;
|
|
9417
|
-
}
|
|
9418
|
-
|
|
9419
|
-
if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce$1('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
|
|
9420
|
-
|
|
9421
|
-
var i18nOptions = _objectSpread$3(_objectSpread$3(_objectSpread$3({}, getDefaults()), i18n.options.react), props);
|
|
9422
|
-
|
|
9423
|
-
var useSuspense = i18nOptions.useSuspense,
|
|
9424
|
-
keyPrefix = i18nOptions.keyPrefix;
|
|
9425
|
-
var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
|
|
9426
|
-
namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
|
|
9427
|
-
if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
|
|
9428
|
-
var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) {
|
|
9429
|
-
return hasLoadedNamespace(n, i18n, i18nOptions);
|
|
9430
|
-
});
|
|
9431
|
-
|
|
9432
|
-
function getT() {
|
|
9433
|
-
return i18n.getFixedT(null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
|
|
9434
|
-
}
|
|
9435
|
-
|
|
9436
|
-
var _useState = useState(getT),
|
|
9437
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
9438
|
-
t = _useState2[0],
|
|
9439
|
-
setT = _useState2[1];
|
|
9440
|
-
|
|
9441
|
-
var joinedNS = namespaces.join();
|
|
9442
|
-
var previousJoinedNS = usePrevious(joinedNS);
|
|
9443
|
-
var isMounted = useRef(true);
|
|
9444
|
-
useEffect(function () {
|
|
9445
|
-
var bindI18n = i18nOptions.bindI18n,
|
|
9446
|
-
bindI18nStore = i18nOptions.bindI18nStore;
|
|
9447
|
-
isMounted.current = true;
|
|
9448
|
-
|
|
9449
|
-
if (!ready && !useSuspense) {
|
|
9450
|
-
loadNamespaces(i18n, namespaces, function () {
|
|
9451
|
-
if (isMounted.current) setT(getT);
|
|
9452
|
-
});
|
|
9453
|
-
}
|
|
9454
|
-
|
|
9455
|
-
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
9456
|
-
setT(getT);
|
|
9457
|
-
}
|
|
9458
|
-
|
|
9459
|
-
function boundReset() {
|
|
9460
|
-
if (isMounted.current) setT(getT);
|
|
9461
|
-
}
|
|
9462
|
-
|
|
9463
|
-
if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
|
|
9464
|
-
if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
|
|
9465
|
-
return function () {
|
|
9466
|
-
isMounted.current = false;
|
|
9467
|
-
if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) {
|
|
9468
|
-
return i18n.off(e, boundReset);
|
|
9469
|
-
});
|
|
9470
|
-
if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) {
|
|
9471
|
-
return i18n.store.off(e, boundReset);
|
|
9472
|
-
});
|
|
9473
|
-
};
|
|
9474
|
-
}, [i18n, joinedNS]);
|
|
9475
|
-
var isInitial = useRef(true);
|
|
9476
|
-
useEffect(function () {
|
|
9477
|
-
if (isMounted.current && !isInitial.current) {
|
|
9478
|
-
setT(getT);
|
|
9479
|
-
}
|
|
9480
|
-
|
|
9481
|
-
isInitial.current = false;
|
|
9482
|
-
}, [i18n, keyPrefix]);
|
|
9483
|
-
var ret = [t, i18n, ready];
|
|
9484
|
-
ret.t = t;
|
|
9485
|
-
ret.i18n = i18n;
|
|
9486
|
-
ret.ready = ready;
|
|
9487
|
-
if (ready) return ret;
|
|
9488
|
-
if (!ready && !useSuspense) return ret;
|
|
9489
|
-
throw new Promise(function (resolve) {
|
|
9490
|
-
loadNamespaces(i18n, namespaces, function () {
|
|
9491
|
-
resolve();
|
|
9492
|
-
});
|
|
9493
|
-
});
|
|
9494
|
-
}
|
|
9495
|
-
|
|
9496
9124
|
/******************************************************************************
|
|
9497
9125
|
Copyright (c) Microsoft Corporation.
|
|
9498
9126
|
|
|
@@ -19350,243 +18978,6 @@ function withReactContent(ParentSwal) {
|
|
|
19350
18978
|
};
|
|
19351
18979
|
}
|
|
19352
18980
|
|
|
19353
|
-
let e$1={data:""},t$1=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e$1,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n=/\n+/g,o$1=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o$1(c,n):n+"{"+o$1(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o$1(c,t?t.replace(/([^,])+/g,e=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o$1.p?o$1.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i$1=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n," ").trim();return o[0]})(e);c[d]=o$1(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o$1(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i$1(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t$1(r.target),r.g,r.o,r.k)}u.bind({g:1});u.bind({k:1});function m(e,t,r,l){o$1.p=t;}
|
|
19354
|
-
|
|
19355
|
-
function _extends$8() {
|
|
19356
|
-
_extends$8 = Object.assign || function (target) {
|
|
19357
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
19358
|
-
var source = arguments[i];
|
|
19359
|
-
|
|
19360
|
-
for (var key in source) {
|
|
19361
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
19362
|
-
target[key] = source[key];
|
|
19363
|
-
}
|
|
19364
|
-
}
|
|
19365
|
-
}
|
|
19366
|
-
|
|
19367
|
-
return target;
|
|
19368
|
-
};
|
|
19369
|
-
|
|
19370
|
-
return _extends$8.apply(this, arguments);
|
|
19371
|
-
}
|
|
19372
|
-
|
|
19373
|
-
var isFunction$4 = function isFunction(valOrFunction) {
|
|
19374
|
-
return typeof valOrFunction === 'function';
|
|
19375
|
-
};
|
|
19376
|
-
|
|
19377
|
-
var resolveValue = function resolveValue(valOrFunction, arg) {
|
|
19378
|
-
return isFunction$4(valOrFunction) ? valOrFunction(arg) : valOrFunction;
|
|
19379
|
-
};
|
|
19380
|
-
|
|
19381
|
-
var genId$1 = /*#__PURE__*/function () {
|
|
19382
|
-
var count = 0;
|
|
19383
|
-
return function () {
|
|
19384
|
-
return (++count).toString();
|
|
19385
|
-
};
|
|
19386
|
-
}();
|
|
19387
|
-
|
|
19388
|
-
var TOAST_LIMIT = 20;
|
|
19389
|
-
var ActionType;
|
|
19390
|
-
|
|
19391
|
-
(function (ActionType) {
|
|
19392
|
-
ActionType[ActionType["ADD_TOAST"] = 0] = "ADD_TOAST";
|
|
19393
|
-
ActionType[ActionType["UPDATE_TOAST"] = 1] = "UPDATE_TOAST";
|
|
19394
|
-
ActionType[ActionType["UPSERT_TOAST"] = 2] = "UPSERT_TOAST";
|
|
19395
|
-
ActionType[ActionType["DISMISS_TOAST"] = 3] = "DISMISS_TOAST";
|
|
19396
|
-
ActionType[ActionType["REMOVE_TOAST"] = 4] = "REMOVE_TOAST";
|
|
19397
|
-
ActionType[ActionType["START_PAUSE"] = 5] = "START_PAUSE";
|
|
19398
|
-
ActionType[ActionType["END_PAUSE"] = 6] = "END_PAUSE";
|
|
19399
|
-
})(ActionType || (ActionType = {}));
|
|
19400
|
-
|
|
19401
|
-
var toastTimeouts = /*#__PURE__*/new Map();
|
|
19402
|
-
|
|
19403
|
-
var addToRemoveQueue = function addToRemoveQueue(toastId) {
|
|
19404
|
-
if (toastTimeouts.has(toastId)) {
|
|
19405
|
-
return;
|
|
19406
|
-
}
|
|
19407
|
-
|
|
19408
|
-
var timeout = setTimeout(function () {
|
|
19409
|
-
toastTimeouts["delete"](toastId);
|
|
19410
|
-
dispatch({
|
|
19411
|
-
type: ActionType.REMOVE_TOAST,
|
|
19412
|
-
toastId: toastId
|
|
19413
|
-
});
|
|
19414
|
-
}, 1000);
|
|
19415
|
-
toastTimeouts.set(toastId, timeout);
|
|
19416
|
-
};
|
|
19417
|
-
|
|
19418
|
-
var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
19419
|
-
var timeout = toastTimeouts.get(toastId);
|
|
19420
|
-
|
|
19421
|
-
if (timeout) {
|
|
19422
|
-
clearTimeout(timeout);
|
|
19423
|
-
}
|
|
19424
|
-
};
|
|
19425
|
-
|
|
19426
|
-
var reducer = function reducer(state, action) {
|
|
19427
|
-
switch (action.type) {
|
|
19428
|
-
case ActionType.ADD_TOAST:
|
|
19429
|
-
return _extends$8({}, state, {
|
|
19430
|
-
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
19431
|
-
});
|
|
19432
|
-
|
|
19433
|
-
case ActionType.UPDATE_TOAST:
|
|
19434
|
-
// ! Side effects !
|
|
19435
|
-
if (action.toast.id) {
|
|
19436
|
-
clearFromRemoveQueue(action.toast.id);
|
|
19437
|
-
}
|
|
19438
|
-
|
|
19439
|
-
return _extends$8({}, state, {
|
|
19440
|
-
toasts: state.toasts.map(function (t) {
|
|
19441
|
-
return t.id === action.toast.id ? _extends$8({}, t, action.toast) : t;
|
|
19442
|
-
})
|
|
19443
|
-
});
|
|
19444
|
-
|
|
19445
|
-
case ActionType.UPSERT_TOAST:
|
|
19446
|
-
var toast = action.toast;
|
|
19447
|
-
return state.toasts.find(function (t) {
|
|
19448
|
-
return t.id === toast.id;
|
|
19449
|
-
}) ? reducer(state, {
|
|
19450
|
-
type: ActionType.UPDATE_TOAST,
|
|
19451
|
-
toast: toast
|
|
19452
|
-
}) : reducer(state, {
|
|
19453
|
-
type: ActionType.ADD_TOAST,
|
|
19454
|
-
toast: toast
|
|
19455
|
-
});
|
|
19456
|
-
|
|
19457
|
-
case ActionType.DISMISS_TOAST:
|
|
19458
|
-
var toastId = action.toastId; // ! Side effects ! - This could be execrated into a dismissToast() action, but I'll keep it here for simplicity
|
|
19459
|
-
|
|
19460
|
-
if (toastId) {
|
|
19461
|
-
addToRemoveQueue(toastId);
|
|
19462
|
-
} else {
|
|
19463
|
-
state.toasts.forEach(function (toast) {
|
|
19464
|
-
addToRemoveQueue(toast.id);
|
|
19465
|
-
});
|
|
19466
|
-
}
|
|
19467
|
-
|
|
19468
|
-
return _extends$8({}, state, {
|
|
19469
|
-
toasts: state.toasts.map(function (t) {
|
|
19470
|
-
return t.id === toastId || toastId === undefined ? _extends$8({}, t, {
|
|
19471
|
-
visible: false
|
|
19472
|
-
}) : t;
|
|
19473
|
-
})
|
|
19474
|
-
});
|
|
19475
|
-
|
|
19476
|
-
case ActionType.REMOVE_TOAST:
|
|
19477
|
-
if (action.toastId === undefined) {
|
|
19478
|
-
return _extends$8({}, state, {
|
|
19479
|
-
toasts: []
|
|
19480
|
-
});
|
|
19481
|
-
}
|
|
19482
|
-
|
|
19483
|
-
return _extends$8({}, state, {
|
|
19484
|
-
toasts: state.toasts.filter(function (t) {
|
|
19485
|
-
return t.id !== action.toastId;
|
|
19486
|
-
})
|
|
19487
|
-
});
|
|
19488
|
-
|
|
19489
|
-
case ActionType.START_PAUSE:
|
|
19490
|
-
return _extends$8({}, state, {
|
|
19491
|
-
pausedAt: action.time
|
|
19492
|
-
});
|
|
19493
|
-
|
|
19494
|
-
case ActionType.END_PAUSE:
|
|
19495
|
-
var diff = action.time - (state.pausedAt || 0);
|
|
19496
|
-
return _extends$8({}, state, {
|
|
19497
|
-
pausedAt: undefined,
|
|
19498
|
-
toasts: state.toasts.map(function (t) {
|
|
19499
|
-
return _extends$8({}, t, {
|
|
19500
|
-
pauseDuration: t.pauseDuration + diff
|
|
19501
|
-
});
|
|
19502
|
-
})
|
|
19503
|
-
});
|
|
19504
|
-
}
|
|
19505
|
-
};
|
|
19506
|
-
var listeners = [];
|
|
19507
|
-
var memoryState = {
|
|
19508
|
-
toasts: [],
|
|
19509
|
-
pausedAt: undefined
|
|
19510
|
-
};
|
|
19511
|
-
var dispatch = function dispatch(action) {
|
|
19512
|
-
memoryState = reducer(memoryState, action);
|
|
19513
|
-
listeners.forEach(function (listener) {
|
|
19514
|
-
listener(memoryState);
|
|
19515
|
-
});
|
|
19516
|
-
};
|
|
19517
|
-
|
|
19518
|
-
var createToast = function createToast(message, type, opts) {
|
|
19519
|
-
if (type === void 0) {
|
|
19520
|
-
type = 'blank';
|
|
19521
|
-
}
|
|
19522
|
-
|
|
19523
|
-
return _extends$8({
|
|
19524
|
-
createdAt: Date.now(),
|
|
19525
|
-
visible: true,
|
|
19526
|
-
type: type,
|
|
19527
|
-
ariaProps: {
|
|
19528
|
-
role: 'status',
|
|
19529
|
-
'aria-live': 'polite'
|
|
19530
|
-
},
|
|
19531
|
-
message: message,
|
|
19532
|
-
pauseDuration: 0
|
|
19533
|
-
}, opts, {
|
|
19534
|
-
id: (opts == null ? void 0 : opts.id) || genId$1()
|
|
19535
|
-
});
|
|
19536
|
-
};
|
|
19537
|
-
|
|
19538
|
-
var createHandler = function createHandler(type) {
|
|
19539
|
-
return function (message, options) {
|
|
19540
|
-
var toast = createToast(message, type, options);
|
|
19541
|
-
dispatch({
|
|
19542
|
-
type: ActionType.UPSERT_TOAST,
|
|
19543
|
-
toast: toast
|
|
19544
|
-
});
|
|
19545
|
-
return toast.id;
|
|
19546
|
-
};
|
|
19547
|
-
};
|
|
19548
|
-
|
|
19549
|
-
var toast = function toast(message, opts) {
|
|
19550
|
-
return createHandler('blank')(message, opts);
|
|
19551
|
-
};
|
|
19552
|
-
|
|
19553
|
-
toast.error = /*#__PURE__*/createHandler('error');
|
|
19554
|
-
toast.success = /*#__PURE__*/createHandler('success');
|
|
19555
|
-
toast.loading = /*#__PURE__*/createHandler('loading');
|
|
19556
|
-
toast.custom = /*#__PURE__*/createHandler('custom');
|
|
19557
|
-
|
|
19558
|
-
toast.dismiss = function (toastId) {
|
|
19559
|
-
dispatch({
|
|
19560
|
-
type: ActionType.DISMISS_TOAST,
|
|
19561
|
-
toastId: toastId
|
|
19562
|
-
});
|
|
19563
|
-
};
|
|
19564
|
-
|
|
19565
|
-
toast.remove = function (toastId) {
|
|
19566
|
-
return dispatch({
|
|
19567
|
-
type: ActionType.REMOVE_TOAST,
|
|
19568
|
-
toastId: toastId
|
|
19569
|
-
});
|
|
19570
|
-
};
|
|
19571
|
-
|
|
19572
|
-
toast.promise = function (promise, msgs, opts) {
|
|
19573
|
-
var id = toast.loading(msgs.loading, _extends$8({}, opts, opts == null ? void 0 : opts.loading));
|
|
19574
|
-
promise.then(function (p) {
|
|
19575
|
-
toast.success(resolveValue(msgs.success, p), _extends$8({
|
|
19576
|
-
id: id
|
|
19577
|
-
}, opts, opts == null ? void 0 : opts.success));
|
|
19578
|
-
return p;
|
|
19579
|
-
})["catch"](function (e) {
|
|
19580
|
-
toast.error(resolveValue(msgs.error, e), _extends$8({
|
|
19581
|
-
id: id
|
|
19582
|
-
}, opts, opts == null ? void 0 : opts.error));
|
|
19583
|
-
});
|
|
19584
|
-
return promise;
|
|
19585
|
-
};
|
|
19586
|
-
m();
|
|
19587
|
-
|
|
19588
|
-
var toast$1 = toast;
|
|
19589
|
-
|
|
19590
18981
|
const MySwal = withReactContent(Swal);
|
|
19591
18982
|
const messageHtmlBoxConfirm = (t, message, handle, data, title = 'Important', btnOk = 'Ok', btnCancel = 'Cancel') => {
|
|
19592
18983
|
MySwal.fire({
|
|
@@ -19679,10 +19070,10 @@ const messageBoxError = (t, message, title = 'Important', btnCancel = 'Ok') => {
|
|
|
19679
19070
|
});
|
|
19680
19071
|
};
|
|
19681
19072
|
const notificationError = (param) => {
|
|
19682
|
-
return (toast
|
|
19073
|
+
return (toast.error(jsxs(Fragment, { children: [jsx("div", { className: "toastify-header", children: jsx("div", { className: "title-wrapper", children: jsx("h6", { className: "toast-title", children: param }) }) }), jsx("div", { className: "toastify-body", children: jsx("ul", { className: "list-unstyled mb-0", children: jsx("li", {}) }) })] })));
|
|
19683
19074
|
};
|
|
19684
19075
|
const notificationSuccess = (param) => {
|
|
19685
|
-
return (toast
|
|
19076
|
+
return (toast.success(jsxs(Fragment, { children: [jsx("div", { className: "toastify-header", children: jsx("div", { className: "title-wrapper", children: jsx("h6", { className: "toast-title", children: param }) }) }), jsx("div", { className: "toastify-body", children: jsx("ul", { className: "list-unstyled mb-0", children: jsx("li", {}) }) })] })));
|
|
19686
19077
|
};
|
|
19687
19078
|
const messageBoxConfirm2 = async (t, data, data2, message) => {
|
|
19688
19079
|
return new Promise((resolve) => {
|
|
@@ -25541,11 +24932,11 @@ var React$3 = _interopRequireWildcard$1(React__default);
|
|
|
25541
24932
|
var _reactDraggable = cjs.exports;
|
|
25542
24933
|
var _utils = utils;
|
|
25543
24934
|
var _propTypes$1 = propTypes;
|
|
25544
|
-
var _excluded$
|
|
24935
|
+
var _excluded$1 = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
|
|
25545
24936
|
function _getRequireWildcardCache$1(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache$1 = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25546
24937
|
function _interopRequireWildcard$1(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache$1(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25547
|
-
function _extends$
|
|
25548
|
-
function _objectWithoutPropertiesLoose$
|
|
24938
|
+
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
24939
|
+
function _objectWithoutPropertiesLoose$3(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25549
24940
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25550
24941
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25551
24942
|
function _defineProperty$1(obj, key, value) { key = _toPropertyKey$1(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -25754,7 +25145,7 @@ var Resizable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
25754
25145
|
_this$props2.onResizeStart;
|
|
25755
25146
|
var resizeHandles = _this$props2.resizeHandles;
|
|
25756
25147
|
_this$props2.transformScale;
|
|
25757
|
-
var p = _objectWithoutPropertiesLoose$
|
|
25148
|
+
var p = _objectWithoutPropertiesLoose$3(_this$props2, _excluded$1);
|
|
25758
25149
|
|
|
25759
25150
|
// What we're doing here is getting the child of this element, and cloning it with this element's props.
|
|
25760
25151
|
// We are then defining its children as:
|
|
@@ -25766,7 +25157,7 @@ var Resizable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
25766
25157
|
var _this3$handleRefs$han;
|
|
25767
25158
|
// Create a ref to the handle so that `<DraggableCore>` doesn't have to use ReactDOM.findDOMNode().
|
|
25768
25159
|
var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /*#__PURE__*/React$3.createRef();
|
|
25769
|
-
return /*#__PURE__*/React$3.createElement(_reactDraggable.DraggableCore, _extends$
|
|
25160
|
+
return /*#__PURE__*/React$3.createElement(_reactDraggable.DraggableCore, _extends$4({}, draggableOpts, {
|
|
25770
25161
|
nodeRef: ref,
|
|
25771
25162
|
key: "resizableHandle-" + handleAxis,
|
|
25772
25163
|
onStop: _this3.resizeHandler('onResizeStop', handleAxis),
|
|
@@ -25798,17 +25189,17 @@ var React$2 = _interopRequireWildcard(React__default);
|
|
|
25798
25189
|
var _propTypes = _interopRequireDefault$1(propTypes$1.exports);
|
|
25799
25190
|
var _Resizable = _interopRequireDefault$1(Resizable$2);
|
|
25800
25191
|
var _propTypes2 = propTypes;
|
|
25801
|
-
var _excluded
|
|
25192
|
+
var _excluded = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
|
|
25802
25193
|
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25803
25194
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25804
25195
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25805
|
-
function _extends$
|
|
25196
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
25806
25197
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25807
25198
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25808
25199
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25809
25200
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
25810
25201
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25811
|
-
function _objectWithoutPropertiesLoose$
|
|
25202
|
+
function _objectWithoutPropertiesLoose$2(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25812
25203
|
function _inheritsLoose$2(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
25813
25204
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25814
25205
|
var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
@@ -25871,7 +25262,7 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
25871
25262
|
var resizeHandles = _this$props.resizeHandles,
|
|
25872
25263
|
style = _this$props.style,
|
|
25873
25264
|
transformScale = _this$props.transformScale,
|
|
25874
|
-
props = _objectWithoutPropertiesLoose$
|
|
25265
|
+
props = _objectWithoutPropertiesLoose$2(_this$props, _excluded);
|
|
25875
25266
|
return /*#__PURE__*/React$2.createElement(_Resizable.default, {
|
|
25876
25267
|
axis: axis,
|
|
25877
25268
|
draggableOpts: draggableOpts,
|
|
@@ -25887,7 +25278,7 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
25887
25278
|
resizeHandles: resizeHandles,
|
|
25888
25279
|
transformScale: transformScale,
|
|
25889
25280
|
width: this.state.width
|
|
25890
|
-
}, /*#__PURE__*/React$2.createElement("div", _extends$
|
|
25281
|
+
}, /*#__PURE__*/React$2.createElement("div", _extends$3({}, props, {
|
|
25891
25282
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
25892
25283
|
width: this.state.width + 'px',
|
|
25893
25284
|
height: this.state.height + 'px'
|
|
@@ -41487,7 +40878,7 @@ var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
|
41487
40878
|
|
|
41488
40879
|
var reactInputMask = {exports: {}};
|
|
41489
40880
|
|
|
41490
|
-
function _interopDefault$1(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}var React$1=_interopDefault$1(React__default),reactDom$1=ReactDOM__default;function _defaults2$1(e,t){for(var n=Object.getOwnPropertyNames(t),a=0;a<n.length;a++){var i=n[a],r=Object.getOwnPropertyDescriptor(t,i);r&&r.configurable&&e[i]===undefined&&Object.defineProperty(e,i,r);}return e}function _extends$5(){return (_extends$5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);}return e}).apply(this,arguments)}function _inheritsLoose$1(e,t){e.prototype=Object.create(t.prototype),_defaults2$1(e.prototype.constructor=e,t);}function _objectWithoutPropertiesLoose$2(e,t){if(null==e)return {};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],0<=t.indexOf(n)||(i[n]=e[n]);return i}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var invariant$3=function(e,t,n,a,i,r,o,s){if(!e){var l;if(t===undefined)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else {var u=[n,a,i,r,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation";}throw l.framesToPop=1,l}},invariant_1$1=invariant$3;function setInputSelection$1(e,t,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else {var a=e.createTextRange();a.collapse(!0),a.moveStart("character",t),a.moveEnd("character",n-t),a.select();}}function getInputSelection$1(e){var t=0,n=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,n=e.selectionEnd;else {var a=document.selection.createRange();a.parentElement()===e&&(t=-a.moveStart("character",-e.value.length),n=-a.moveEnd("character",-e.value.length));}return {start:t,end:n,length:n-t}}var defaultFormatChars$1={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},defaultMaskChar$1="_";function parseMask$1(e,t,n){var a="",i="",r=null,o=[];if(t===undefined&&(t=defaultMaskChar$1),null==n&&(n=defaultFormatChars$1),!e||"string"!=typeof e)return {maskChar:t,formatChars:n,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var s=!1;return e.split("").forEach(function(e){s=!s&&"\\"===e||(s||!n[e]?(o.push(a.length),a.length===o.length-1&&(i+=e)):r=a.length+1,a+=e,!1);}),{maskChar:t,formatChars:n,prefix:i,mask:a,lastEditablePosition:r,permanents:o}}function isPermanentCharacter$1(e,t){return -1!==e.permanents.indexOf(t)}function isAllowedCharacter$1(e,t,n){var a=e.mask,i=e.formatChars;if(!n)return !1;if(isPermanentCharacter$1(e,t))return a[t]===n;var r=i[a[t]];return new RegExp(r).test(n)}function isEmpty$1(n,e){return e.split("").every(function(e,t){return isPermanentCharacter$1(n,t)||!isAllowedCharacter$1(n,t,e)})}function getFilledLength$1(e,t){var n=e.maskChar,a=e.prefix;if(!n){for(;t.length>a.length&&isPermanentCharacter$1(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var i=a.length,r=t.length;r>=a.length;r--){var o=t[r];if(!isPermanentCharacter$1(e,r)&&isAllowedCharacter$1(e,r,o)){i=r+1;break}}return i}function isFilled$1(e,t){return getFilledLength$1(e,t)===e.mask.length}function formatValue$1(e,t){var n=e.maskChar,a=e.mask,i=e.prefix;if(!n){for((t=insertString$1(e,"",t,0)).length<i.length&&(t=i);t.length<a.length&&isPermanentCharacter$1(e,t.length);)t+=a[t.length];return t}if(t)return insertString$1(e,formatValue$1(e,""),t,0);for(var r=0;r<a.length;r++)isPermanentCharacter$1(e,r)?t+=a[r]:t+=n;return t}function clearRange$1(n,e,a,t){var i=a+t,r=n.maskChar,o=n.mask,s=n.prefix,l=e.split("");if(r)return l.map(function(e,t){return t<a||i<=t?e:isPermanentCharacter$1(n,t)?o[t]:r}).join("");for(var u=i;u<l.length;u++)isPermanentCharacter$1(n,u)&&(l[u]="");return a=Math.max(s.length,a),l.splice(a,i-a),e=l.join(""),formatValue$1(n,e)}function insertString$1(r,o,e,s){var l=r.mask,u=r.maskChar,c=r.prefix,t=e.split(""),h=isFilled$1(r,o);return !u&&s>o.length&&(o+=l.slice(o.length,s)),t.every(function(e){for(;i=e,isPermanentCharacter$1(r,a=s)&&i!==l[a];){if(s>=o.length&&(o+=l[s]),t=e,n=s,u&&isPermanentCharacter$1(r,n)&&t===u)return !0;if(++s>=l.length)return !1}var t,n,a,i;return !isAllowedCharacter$1(r,s,e)&&e!==u||(s<o.length?o=u||h||s<c.length?o.slice(0,s)+e+o.slice(s+1):(o=o.slice(0,s)+e+o.slice(s),formatValue$1(r,o)):u||(o+=e),++s<l.length)}),o}function getInsertStringLength$1(a,e,t,i){var r=a.mask,o=a.maskChar,n=t.split(""),s=i;return n.every(function(e){for(;n=e,isPermanentCharacter$1(a,t=i)&&n!==r[t];)if(++i>=r.length)return !1;var t,n;return (isAllowedCharacter$1(a,i,e)||e===o)&&i++,i<r.length}),i-s}function getLeftEditablePosition$1(e,t){for(var n=t;0<=n;--n)if(!isPermanentCharacter$1(e,n))return n;return null}function getRightEditablePosition$1(e,t){for(var n=e.mask,a=t;a<n.length;++a)if(!isPermanentCharacter$1(e,a))return a;return null}function getStringValue$1(e){return e||0===e?e+"":""}function processChange$1(e,t,n,a,i){var r=e.mask,o=e.prefix,s=e.lastEditablePosition,l=t,u="",c=0,h=0,f=Math.min(i.start,n.start);if(n.end>i.start?h=(c=getInsertStringLength$1(e,a,u=l.slice(i.start,n.end),f))?i.length:0:l.length<a.length&&(h=a.length-l.length),l=a,h){if(1===h&&!i.length)f=i.start===n.start?getRightEditablePosition$1(e,n.start):getLeftEditablePosition$1(e,n.start);l=clearRange$1(e,l,f,h);}return l=insertString$1(e,l,u,f),(f+=c)>=r.length?f=r.length:f<o.length&&!c?f=o.length:f>=o.length&&f<s&&c&&(f=getRightEditablePosition$1(e,f)),u||(u=null),{value:l=formatValue$1(e,l),enteredString:u,selection:{start:f,end:f}}}function isWindowsPhoneBrowser$1(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),n=navigator.userAgent;return e.test(n)&&t.test(n)}function isFunction$1(e){return "function"==typeof e}function getRequestAnimationFrame$1(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function getCancelAnimationFrame$1(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function defer$1(e){return (!!getCancelAnimationFrame$1()?getRequestAnimationFrame$1():function(){return setTimeout(e,1e3/60)})(e)}function cancelDefer$1(e){(getCancelAnimationFrame$1()||clearTimeout)(e);}var InputElement$1=function(c){function e(e){var f=c.call(this,e)||this;f.focused=!1,f.mounted=!1,f.previousSelection=null,f.selectionDeferId=null,f.saveSelectionLoopDeferId=null,f.saveSelectionLoop=function(){f.previousSelection=f.getSelection(),f.saveSelectionLoopDeferId=defer$1(f.saveSelectionLoop);},f.runSaveSelectionLoop=function(){null===f.saveSelectionLoopDeferId&&f.saveSelectionLoop();},f.stopSaveSelectionLoop=function(){null!==f.saveSelectionLoopDeferId&&(cancelDefer$1(f.saveSelectionLoopDeferId),f.saveSelectionLoopDeferId=null,f.previousSelection=null);},f.getInputDOMNode=function(){if(!f.mounted)return null;var e=reactDom$1.findDOMNode(_assertThisInitialized$1(_assertThisInitialized$1(f))),t="undefined"!=typeof window&&e instanceof window.Element;if(e&&!t)return null;if("INPUT"!==e.nodeName&&(e=e.querySelector("input")),!e)throw new Error("react-input-mask: inputComponent doesn't contain input node");return e},f.getInputValue=function(){var e=f.getInputDOMNode();return e?e.value:null},f.setInputValue=function(e){var t=f.getInputDOMNode();t&&(f.value=e,t.value=e);},f.setCursorToEnd=function(){var e=getFilledLength$1(f.maskOptions,f.value),t=getRightEditablePosition$1(f.maskOptions,e);null!==t&&f.setCursorPosition(t);},f.setSelection=function(e,t,n){void 0===n&&(n={});var a=f.getInputDOMNode(),i=f.isFocused();a&&i&&(n.deferred||setInputSelection$1(a,e,t),null!==f.selectionDeferId&&cancelDefer$1(f.selectionDeferId),f.selectionDeferId=defer$1(function(){f.selectionDeferId=null,setInputSelection$1(a,e,t);}),f.previousSelection={start:e,end:t,length:Math.abs(t-e)});},f.getSelection=function(){return getInputSelection$1(f.getInputDOMNode())},f.getCursorPosition=function(){return f.getSelection().start},f.setCursorPosition=function(e){f.setSelection(e,e);},f.isFocused=function(){return f.focused},f.getBeforeMaskedValueChangeConfig=function(){var e=f.maskOptions,t=e.mask,n=e.maskChar,a=e.permanents,i=e.formatChars;return {mask:t,maskChar:n,permanents:a,alwaysShowMask:!!f.props.alwaysShowMask,formatChars:i}},f.isInputAutofilled=function(e,t,n,a){var i=f.getInputDOMNode();try{if(i.matches(":-webkit-autofill"))return !0}catch(r){}return !f.focused||a.end<n.length&&t.end===e.length},f.onChange=function(e){var t=_assertThisInitialized$1(_assertThisInitialized$1(f)).beforePasteState,n=_assertThisInitialized$1(_assertThisInitialized$1(f)).previousSelection,a=f.props.beforeMaskedValueChange,i=f.getInputValue(),r=f.value,o=f.getSelection();f.isInputAutofilled(i,o,r,n)&&(r=formatValue$1(f.maskOptions,""),n={start:0,end:0,length:0}),t&&(n=t.selection,r=t.value,o={start:n.start+i.length,end:n.start+i.length,length:0},i=r.slice(0,n.start)+i+r.slice(n.end),f.beforePasteState=null);var s=processChange$1(f.maskOptions,i,o,r,n),l=s.enteredString,u=s.selection,c=s.value;if(isFunction$1(a)){var h=a({value:c,selection:u},{value:r,selection:n},l,f.getBeforeMaskedValueChangeConfig());c=h.value,u=h.selection;}f.setInputValue(c),isFunction$1(f.props.onChange)&&f.props.onChange(e),f.isWindowsPhoneBrowser?f.setSelection(u.start,u.end,{deferred:!0}):f.setSelection(u.start,u.end);},f.onFocus=function(e){var t=f.props.beforeMaskedValueChange,n=f.maskOptions,a=n.mask,i=n.prefix;if(f.focused=!0,f.mounted=!0,a){if(f.value)getFilledLength$1(f.maskOptions,f.value)<f.maskOptions.mask.length&&f.setCursorToEnd();else {var r=formatValue$1(f.maskOptions,i),o=formatValue$1(f.maskOptions,r),s=getFilledLength$1(f.maskOptions,o),l=getRightEditablePosition$1(f.maskOptions,s),u={start:l,end:l};if(isFunction$1(t)){var c=t({value:o,selection:u},{value:f.value,selection:null},null,f.getBeforeMaskedValueChangeConfig());o=c.value,u=c.selection;}var h=o!==f.getInputValue();h&&f.setInputValue(o),h&&isFunction$1(f.props.onChange)&&f.props.onChange(e),f.setSelection(u.start,u.end);}f.runSaveSelectionLoop();}isFunction$1(f.props.onFocus)&&f.props.onFocus(e);},f.onBlur=function(e){var t=f.props.beforeMaskedValueChange,n=f.maskOptions.mask;if(f.stopSaveSelectionLoop(),f.focused=!1,n&&!f.props.alwaysShowMask&&isEmpty$1(f.maskOptions,f.value)){var a="";if(isFunction$1(t))a=t({value:a,selection:null},{value:f.value,selection:f.previousSelection},null,f.getBeforeMaskedValueChangeConfig()).value;var i=a!==f.getInputValue();i&&f.setInputValue(a),i&&isFunction$1(f.props.onChange)&&f.props.onChange(e);}isFunction$1(f.props.onBlur)&&f.props.onBlur(e);},f.onMouseDown=function(e){if(!f.focused&&document.addEventListener){f.mouseDownX=e.clientX,f.mouseDownY=e.clientY,f.mouseDownTime=(new Date).getTime();var r=function r(e){if(document.removeEventListener("mouseup",r),f.focused){var t=Math.abs(e.clientX-f.mouseDownX),n=Math.abs(e.clientY-f.mouseDownY),a=Math.max(t,n),i=(new Date).getTime()-f.mouseDownTime;(a<=10&&i<=200||a<=5&&i<=300)&&f.setCursorToEnd();}};document.addEventListener("mouseup",r);}isFunction$1(f.props.onMouseDown)&&f.props.onMouseDown(e);},f.onPaste=function(e){isFunction$1(f.props.onPaste)&&f.props.onPaste(e),e.defaultPrevented||(f.beforePasteState={value:f.getInputValue(),selection:f.getSelection()},f.setInputValue(""));},f.handleRef=function(e){null==f.props.children&&isFunction$1(f.props.inputRef)&&f.props.inputRef(e);};var t=e.mask,n=e.maskChar,a=e.formatChars,i=e.alwaysShowMask,r=e.beforeMaskedValueChange,o=e.defaultValue,s=e.value;f.maskOptions=parseMask$1(t,n,a),null==o&&(o=""),null==s&&(s=o);var l=getStringValue$1(s);if(f.maskOptions.mask&&(i||l)&&(l=formatValue$1(f.maskOptions,l),isFunction$1(r))){var u=e.value;null==e.value&&(u=o),l=r({value:l,selection:null},{value:u=getStringValue$1(u),selection:null},null,f.getBeforeMaskedValueChangeConfig()).value;}return f.value=l,f}_inheritsLoose$1(e,c);var t=e.prototype;return t.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=isWindowsPhoneBrowser$1(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value));},t.componentDidUpdate=function(){var e=this.previousSelection,t=this.props,n=t.beforeMaskedValueChange,a=t.alwaysShowMask,i=t.mask,r=t.maskChar,o=t.formatChars,s=this.maskOptions,l=a||this.isFocused(),u=null!=this.props.value,c=u?getStringValue$1(this.props.value):this.value,h=e?e.start:null;if(this.maskOptions=parseMask$1(i,r,o),this.maskOptions.mask){!s.mask&&this.isFocused()&&this.runSaveSelectionLoop();var f=this.maskOptions.mask&&this.maskOptions.mask!==s.mask;if(s.mask||u||(c=this.getInputValue()),(f||this.maskOptions.mask&&(c||l))&&(c=formatValue$1(this.maskOptions,c)),f){var p=getFilledLength$1(this.maskOptions,c);(null===h||p<h)&&(h=isFilled$1(this.maskOptions,c)?p:getRightEditablePosition$1(this.maskOptions,p));}!this.maskOptions.mask||!isEmpty$1(this.maskOptions,c)||l||u&&this.props.value||(c="");var d={start:h,end:h};if(isFunction$1(n)){var m=n({value:c,selection:d},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());c=m.value,d=m.selection;}this.value=c;var g=this.getInputValue()!==this.value;g?(this.setInputValue(this.value),this.forceUpdate()):f&&this.forceUpdate();var v=!1;null!=d.start&&null!=d.end&&(v=!e||e.start!==d.start||e.end!==d.end),(v||g)&&this.setSelection(d.start,d.end);}else s.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate());},t.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&cancelDefer$1(this.selectionDeferId),this.stopSaveSelectionLoop();},t.render=function(){var t,e=this.props,n=(e.mask,e.alwaysShowMask,e.maskChar,e.formatChars,e.inputRef,e.beforeMaskedValueChange,e.children),a=_objectWithoutPropertiesLoose$2(e,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){isFunction$1(n)||invariant_1$1(!1);var i=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],r=_extends$5({},a);i.forEach(function(e){return delete r[e]}),t=n(r),i.filter(function(e){return null!=t.props[e]&&t.props[e]!==a[e]}).length&&invariant_1$1(!1);}else t=React$1.createElement("input",_extends$5({ref:this.handleRef},a));var o={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(a.disabled||a.readOnly||(o.onChange=this.onChange,o.onPaste=this.onPaste,o.onMouseDown=this.onMouseDown),null!=a.value&&(o.value=this.value)),t=React$1.cloneElement(t,o)},e}(React$1.Component);var reactInputMask_production_min=InputElement$1;
|
|
40881
|
+
function _interopDefault$1(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}var React$1=_interopDefault$1(React__default),reactDom$1=ReactDOM__default;function _defaults2$1(e,t){for(var n=Object.getOwnPropertyNames(t),a=0;a<n.length;a++){var i=n[a],r=Object.getOwnPropertyDescriptor(t,i);r&&r.configurable&&e[i]===undefined&&Object.defineProperty(e,i,r);}return e}function _extends$2(){return (_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);}return e}).apply(this,arguments)}function _inheritsLoose$1(e,t){e.prototype=Object.create(t.prototype),_defaults2$1(e.prototype.constructor=e,t);}function _objectWithoutPropertiesLoose$1(e,t){if(null==e)return {};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],0<=t.indexOf(n)||(i[n]=e[n]);return i}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var invariant$2=function(e,t,n,a,i,r,o,s){if(!e){var l;if(t===undefined)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else {var u=[n,a,i,r,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation";}throw l.framesToPop=1,l}},invariant_1$1=invariant$2;function setInputSelection$1(e,t,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else {var a=e.createTextRange();a.collapse(!0),a.moveStart("character",t),a.moveEnd("character",n-t),a.select();}}function getInputSelection$1(e){var t=0,n=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,n=e.selectionEnd;else {var a=document.selection.createRange();a.parentElement()===e&&(t=-a.moveStart("character",-e.value.length),n=-a.moveEnd("character",-e.value.length));}return {start:t,end:n,length:n-t}}var defaultFormatChars$1={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},defaultMaskChar$1="_";function parseMask$1(e,t,n){var a="",i="",r=null,o=[];if(t===undefined&&(t=defaultMaskChar$1),null==n&&(n=defaultFormatChars$1),!e||"string"!=typeof e)return {maskChar:t,formatChars:n,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var s=!1;return e.split("").forEach(function(e){s=!s&&"\\"===e||(s||!n[e]?(o.push(a.length),a.length===o.length-1&&(i+=e)):r=a.length+1,a+=e,!1);}),{maskChar:t,formatChars:n,prefix:i,mask:a,lastEditablePosition:r,permanents:o}}function isPermanentCharacter$1(e,t){return -1!==e.permanents.indexOf(t)}function isAllowedCharacter$1(e,t,n){var a=e.mask,i=e.formatChars;if(!n)return !1;if(isPermanentCharacter$1(e,t))return a[t]===n;var r=i[a[t]];return new RegExp(r).test(n)}function isEmpty$1(n,e){return e.split("").every(function(e,t){return isPermanentCharacter$1(n,t)||!isAllowedCharacter$1(n,t,e)})}function getFilledLength$1(e,t){var n=e.maskChar,a=e.prefix;if(!n){for(;t.length>a.length&&isPermanentCharacter$1(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var i=a.length,r=t.length;r>=a.length;r--){var o=t[r];if(!isPermanentCharacter$1(e,r)&&isAllowedCharacter$1(e,r,o)){i=r+1;break}}return i}function isFilled$1(e,t){return getFilledLength$1(e,t)===e.mask.length}function formatValue$1(e,t){var n=e.maskChar,a=e.mask,i=e.prefix;if(!n){for((t=insertString$1(e,"",t,0)).length<i.length&&(t=i);t.length<a.length&&isPermanentCharacter$1(e,t.length);)t+=a[t.length];return t}if(t)return insertString$1(e,formatValue$1(e,""),t,0);for(var r=0;r<a.length;r++)isPermanentCharacter$1(e,r)?t+=a[r]:t+=n;return t}function clearRange$1(n,e,a,t){var i=a+t,r=n.maskChar,o=n.mask,s=n.prefix,l=e.split("");if(r)return l.map(function(e,t){return t<a||i<=t?e:isPermanentCharacter$1(n,t)?o[t]:r}).join("");for(var u=i;u<l.length;u++)isPermanentCharacter$1(n,u)&&(l[u]="");return a=Math.max(s.length,a),l.splice(a,i-a),e=l.join(""),formatValue$1(n,e)}function insertString$1(r,o,e,s){var l=r.mask,u=r.maskChar,c=r.prefix,t=e.split(""),h=isFilled$1(r,o);return !u&&s>o.length&&(o+=l.slice(o.length,s)),t.every(function(e){for(;i=e,isPermanentCharacter$1(r,a=s)&&i!==l[a];){if(s>=o.length&&(o+=l[s]),t=e,n=s,u&&isPermanentCharacter$1(r,n)&&t===u)return !0;if(++s>=l.length)return !1}var t,n,a,i;return !isAllowedCharacter$1(r,s,e)&&e!==u||(s<o.length?o=u||h||s<c.length?o.slice(0,s)+e+o.slice(s+1):(o=o.slice(0,s)+e+o.slice(s),formatValue$1(r,o)):u||(o+=e),++s<l.length)}),o}function getInsertStringLength$1(a,e,t,i){var r=a.mask,o=a.maskChar,n=t.split(""),s=i;return n.every(function(e){for(;n=e,isPermanentCharacter$1(a,t=i)&&n!==r[t];)if(++i>=r.length)return !1;var t,n;return (isAllowedCharacter$1(a,i,e)||e===o)&&i++,i<r.length}),i-s}function getLeftEditablePosition$1(e,t){for(var n=t;0<=n;--n)if(!isPermanentCharacter$1(e,n))return n;return null}function getRightEditablePosition$1(e,t){for(var n=e.mask,a=t;a<n.length;++a)if(!isPermanentCharacter$1(e,a))return a;return null}function getStringValue$1(e){return e||0===e?e+"":""}function processChange$1(e,t,n,a,i){var r=e.mask,o=e.prefix,s=e.lastEditablePosition,l=t,u="",c=0,h=0,f=Math.min(i.start,n.start);if(n.end>i.start?h=(c=getInsertStringLength$1(e,a,u=l.slice(i.start,n.end),f))?i.length:0:l.length<a.length&&(h=a.length-l.length),l=a,h){if(1===h&&!i.length)f=i.start===n.start?getRightEditablePosition$1(e,n.start):getLeftEditablePosition$1(e,n.start);l=clearRange$1(e,l,f,h);}return l=insertString$1(e,l,u,f),(f+=c)>=r.length?f=r.length:f<o.length&&!c?f=o.length:f>=o.length&&f<s&&c&&(f=getRightEditablePosition$1(e,f)),u||(u=null),{value:l=formatValue$1(e,l),enteredString:u,selection:{start:f,end:f}}}function isWindowsPhoneBrowser$1(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),n=navigator.userAgent;return e.test(n)&&t.test(n)}function isFunction$1(e){return "function"==typeof e}function getRequestAnimationFrame$1(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function getCancelAnimationFrame$1(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function defer$1(e){return (!!getCancelAnimationFrame$1()?getRequestAnimationFrame$1():function(){return setTimeout(e,1e3/60)})(e)}function cancelDefer$1(e){(getCancelAnimationFrame$1()||clearTimeout)(e);}var InputElement$1=function(c){function e(e){var f=c.call(this,e)||this;f.focused=!1,f.mounted=!1,f.previousSelection=null,f.selectionDeferId=null,f.saveSelectionLoopDeferId=null,f.saveSelectionLoop=function(){f.previousSelection=f.getSelection(),f.saveSelectionLoopDeferId=defer$1(f.saveSelectionLoop);},f.runSaveSelectionLoop=function(){null===f.saveSelectionLoopDeferId&&f.saveSelectionLoop();},f.stopSaveSelectionLoop=function(){null!==f.saveSelectionLoopDeferId&&(cancelDefer$1(f.saveSelectionLoopDeferId),f.saveSelectionLoopDeferId=null,f.previousSelection=null);},f.getInputDOMNode=function(){if(!f.mounted)return null;var e=reactDom$1.findDOMNode(_assertThisInitialized$1(_assertThisInitialized$1(f))),t="undefined"!=typeof window&&e instanceof window.Element;if(e&&!t)return null;if("INPUT"!==e.nodeName&&(e=e.querySelector("input")),!e)throw new Error("react-input-mask: inputComponent doesn't contain input node");return e},f.getInputValue=function(){var e=f.getInputDOMNode();return e?e.value:null},f.setInputValue=function(e){var t=f.getInputDOMNode();t&&(f.value=e,t.value=e);},f.setCursorToEnd=function(){var e=getFilledLength$1(f.maskOptions,f.value),t=getRightEditablePosition$1(f.maskOptions,e);null!==t&&f.setCursorPosition(t);},f.setSelection=function(e,t,n){void 0===n&&(n={});var a=f.getInputDOMNode(),i=f.isFocused();a&&i&&(n.deferred||setInputSelection$1(a,e,t),null!==f.selectionDeferId&&cancelDefer$1(f.selectionDeferId),f.selectionDeferId=defer$1(function(){f.selectionDeferId=null,setInputSelection$1(a,e,t);}),f.previousSelection={start:e,end:t,length:Math.abs(t-e)});},f.getSelection=function(){return getInputSelection$1(f.getInputDOMNode())},f.getCursorPosition=function(){return f.getSelection().start},f.setCursorPosition=function(e){f.setSelection(e,e);},f.isFocused=function(){return f.focused},f.getBeforeMaskedValueChangeConfig=function(){var e=f.maskOptions,t=e.mask,n=e.maskChar,a=e.permanents,i=e.formatChars;return {mask:t,maskChar:n,permanents:a,alwaysShowMask:!!f.props.alwaysShowMask,formatChars:i}},f.isInputAutofilled=function(e,t,n,a){var i=f.getInputDOMNode();try{if(i.matches(":-webkit-autofill"))return !0}catch(r){}return !f.focused||a.end<n.length&&t.end===e.length},f.onChange=function(e){var t=_assertThisInitialized$1(_assertThisInitialized$1(f)).beforePasteState,n=_assertThisInitialized$1(_assertThisInitialized$1(f)).previousSelection,a=f.props.beforeMaskedValueChange,i=f.getInputValue(),r=f.value,o=f.getSelection();f.isInputAutofilled(i,o,r,n)&&(r=formatValue$1(f.maskOptions,""),n={start:0,end:0,length:0}),t&&(n=t.selection,r=t.value,o={start:n.start+i.length,end:n.start+i.length,length:0},i=r.slice(0,n.start)+i+r.slice(n.end),f.beforePasteState=null);var s=processChange$1(f.maskOptions,i,o,r,n),l=s.enteredString,u=s.selection,c=s.value;if(isFunction$1(a)){var h=a({value:c,selection:u},{value:r,selection:n},l,f.getBeforeMaskedValueChangeConfig());c=h.value,u=h.selection;}f.setInputValue(c),isFunction$1(f.props.onChange)&&f.props.onChange(e),f.isWindowsPhoneBrowser?f.setSelection(u.start,u.end,{deferred:!0}):f.setSelection(u.start,u.end);},f.onFocus=function(e){var t=f.props.beforeMaskedValueChange,n=f.maskOptions,a=n.mask,i=n.prefix;if(f.focused=!0,f.mounted=!0,a){if(f.value)getFilledLength$1(f.maskOptions,f.value)<f.maskOptions.mask.length&&f.setCursorToEnd();else {var r=formatValue$1(f.maskOptions,i),o=formatValue$1(f.maskOptions,r),s=getFilledLength$1(f.maskOptions,o),l=getRightEditablePosition$1(f.maskOptions,s),u={start:l,end:l};if(isFunction$1(t)){var c=t({value:o,selection:u},{value:f.value,selection:null},null,f.getBeforeMaskedValueChangeConfig());o=c.value,u=c.selection;}var h=o!==f.getInputValue();h&&f.setInputValue(o),h&&isFunction$1(f.props.onChange)&&f.props.onChange(e),f.setSelection(u.start,u.end);}f.runSaveSelectionLoop();}isFunction$1(f.props.onFocus)&&f.props.onFocus(e);},f.onBlur=function(e){var t=f.props.beforeMaskedValueChange,n=f.maskOptions.mask;if(f.stopSaveSelectionLoop(),f.focused=!1,n&&!f.props.alwaysShowMask&&isEmpty$1(f.maskOptions,f.value)){var a="";if(isFunction$1(t))a=t({value:a,selection:null},{value:f.value,selection:f.previousSelection},null,f.getBeforeMaskedValueChangeConfig()).value;var i=a!==f.getInputValue();i&&f.setInputValue(a),i&&isFunction$1(f.props.onChange)&&f.props.onChange(e);}isFunction$1(f.props.onBlur)&&f.props.onBlur(e);},f.onMouseDown=function(e){if(!f.focused&&document.addEventListener){f.mouseDownX=e.clientX,f.mouseDownY=e.clientY,f.mouseDownTime=(new Date).getTime();var r=function r(e){if(document.removeEventListener("mouseup",r),f.focused){var t=Math.abs(e.clientX-f.mouseDownX),n=Math.abs(e.clientY-f.mouseDownY),a=Math.max(t,n),i=(new Date).getTime()-f.mouseDownTime;(a<=10&&i<=200||a<=5&&i<=300)&&f.setCursorToEnd();}};document.addEventListener("mouseup",r);}isFunction$1(f.props.onMouseDown)&&f.props.onMouseDown(e);},f.onPaste=function(e){isFunction$1(f.props.onPaste)&&f.props.onPaste(e),e.defaultPrevented||(f.beforePasteState={value:f.getInputValue(),selection:f.getSelection()},f.setInputValue(""));},f.handleRef=function(e){null==f.props.children&&isFunction$1(f.props.inputRef)&&f.props.inputRef(e);};var t=e.mask,n=e.maskChar,a=e.formatChars,i=e.alwaysShowMask,r=e.beforeMaskedValueChange,o=e.defaultValue,s=e.value;f.maskOptions=parseMask$1(t,n,a),null==o&&(o=""),null==s&&(s=o);var l=getStringValue$1(s);if(f.maskOptions.mask&&(i||l)&&(l=formatValue$1(f.maskOptions,l),isFunction$1(r))){var u=e.value;null==e.value&&(u=o),l=r({value:l,selection:null},{value:u=getStringValue$1(u),selection:null},null,f.getBeforeMaskedValueChangeConfig()).value;}return f.value=l,f}_inheritsLoose$1(e,c);var t=e.prototype;return t.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=isWindowsPhoneBrowser$1(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value));},t.componentDidUpdate=function(){var e=this.previousSelection,t=this.props,n=t.beforeMaskedValueChange,a=t.alwaysShowMask,i=t.mask,r=t.maskChar,o=t.formatChars,s=this.maskOptions,l=a||this.isFocused(),u=null!=this.props.value,c=u?getStringValue$1(this.props.value):this.value,h=e?e.start:null;if(this.maskOptions=parseMask$1(i,r,o),this.maskOptions.mask){!s.mask&&this.isFocused()&&this.runSaveSelectionLoop();var f=this.maskOptions.mask&&this.maskOptions.mask!==s.mask;if(s.mask||u||(c=this.getInputValue()),(f||this.maskOptions.mask&&(c||l))&&(c=formatValue$1(this.maskOptions,c)),f){var p=getFilledLength$1(this.maskOptions,c);(null===h||p<h)&&(h=isFilled$1(this.maskOptions,c)?p:getRightEditablePosition$1(this.maskOptions,p));}!this.maskOptions.mask||!isEmpty$1(this.maskOptions,c)||l||u&&this.props.value||(c="");var d={start:h,end:h};if(isFunction$1(n)){var m=n({value:c,selection:d},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());c=m.value,d=m.selection;}this.value=c;var g=this.getInputValue()!==this.value;g?(this.setInputValue(this.value),this.forceUpdate()):f&&this.forceUpdate();var v=!1;null!=d.start&&null!=d.end&&(v=!e||e.start!==d.start||e.end!==d.end),(v||g)&&this.setSelection(d.start,d.end);}else s.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate());},t.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&cancelDefer$1(this.selectionDeferId),this.stopSaveSelectionLoop();},t.render=function(){var t,e=this.props,n=(e.mask,e.alwaysShowMask,e.maskChar,e.formatChars,e.inputRef,e.beforeMaskedValueChange,e.children),a=_objectWithoutPropertiesLoose$1(e,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){isFunction$1(n)||invariant_1$1(!1);var i=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],r=_extends$2({},a);i.forEach(function(e){return delete r[e]}),t=n(r),i.filter(function(e){return null!=t.props[e]&&t.props[e]!==a[e]}).length&&invariant_1$1(!1);}else t=React$1.createElement("input",_extends$2({ref:this.handleRef},a));var o={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(a.disabled||a.readOnly||(o.onChange=this.onChange,o.onPaste=this.onPaste,o.onMouseDown=this.onMouseDown),null!=a.value&&(o.value=this.value)),t=React$1.cloneElement(t,o)},e}(React$1.Component);var reactInputMask_production_min=InputElement$1;
|
|
41491
40882
|
|
|
41492
40883
|
/**
|
|
41493
40884
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -41509,7 +40900,7 @@ function _interopDefault$1(e){return e&&"object"==typeof e&&"default"in e?e["def
|
|
|
41509
40900
|
|
|
41510
40901
|
var NODE_ENV = process.env.NODE_ENV;
|
|
41511
40902
|
|
|
41512
|
-
var invariant$
|
|
40903
|
+
var invariant$1 = function(condition, format, a, b, c, d, e, f) {
|
|
41513
40904
|
if (NODE_ENV !== 'production') {
|
|
41514
40905
|
if (format === undefined) {
|
|
41515
40906
|
throw new Error('invariant requires an error message argument');
|
|
@@ -41537,19 +40928,19 @@ var invariant$2 = function(condition, format, a, b, c, d, e, f) {
|
|
|
41537
40928
|
}
|
|
41538
40929
|
};
|
|
41539
40930
|
|
|
41540
|
-
var invariant_1 = invariant$
|
|
40931
|
+
var invariant_1 = invariant$1;
|
|
41541
40932
|
|
|
41542
40933
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
41543
40934
|
|
|
41544
40935
|
var React = _interopDefault(React__default);
|
|
41545
40936
|
var reactDom = ReactDOM__default;
|
|
41546
|
-
var invariant
|
|
41547
|
-
var warning
|
|
40937
|
+
var invariant = _interopDefault(invariant_1);
|
|
40938
|
+
var warning = _interopDefault(warning_1);
|
|
41548
40939
|
|
|
41549
40940
|
function _defaults2(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
41550
40941
|
|
|
41551
|
-
function _extends$
|
|
41552
|
-
_extends$
|
|
40942
|
+
function _extends$1() {
|
|
40943
|
+
_extends$1 = Object.assign || function (target) {
|
|
41553
40944
|
for (var i = 1; i < arguments.length; i++) {
|
|
41554
40945
|
var source = arguments[i];
|
|
41555
40946
|
|
|
@@ -41563,7 +40954,7 @@ function _extends$4() {
|
|
|
41563
40954
|
return target;
|
|
41564
40955
|
};
|
|
41565
40956
|
|
|
41566
|
-
return _extends$
|
|
40957
|
+
return _extends$1.apply(this, arguments);
|
|
41567
40958
|
}
|
|
41568
40959
|
|
|
41569
40960
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -41573,7 +40964,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
41573
40964
|
_defaults2(subClass, superClass);
|
|
41574
40965
|
}
|
|
41575
40966
|
|
|
41576
|
-
function _objectWithoutPropertiesLoose
|
|
40967
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
41577
40968
|
if (source == null) return {};
|
|
41578
40969
|
var target = {};
|
|
41579
40970
|
var sourceKeys = Object.keys(source);
|
|
@@ -42610,18 +42001,18 @@ function (_React$Component) {
|
|
|
42610
42001
|
inputRef = _this$props2.inputRef;
|
|
42611
42002
|
_this$props2.beforeMaskedValueChange;
|
|
42612
42003
|
var children = _this$props2.children,
|
|
42613
|
-
restProps = _objectWithoutPropertiesLoose
|
|
42004
|
+
restProps = _objectWithoutPropertiesLoose(_this$props2, ["mask", "alwaysShowMask", "maskChar", "formatChars", "inputRef", "beforeMaskedValueChange", "children"]);
|
|
42614
42005
|
|
|
42615
42006
|
var inputElement;
|
|
42616
|
-
process.env.NODE_ENV !== "production" ? warning
|
|
42007
|
+
process.env.NODE_ENV !== "production" ? warning( // parse mask to test against actual mask prop as this.maskOptions
|
|
42617
42008
|
// will be updated later in componentDidUpdate
|
|
42618
42009
|
!restProps.maxLength || !parseMask(mask, maskChar, formatChars).mask, 'react-input-mask: maxLength property shouldn\'t be passed to the masked input. It breaks masking and unnecessary because length is limited by the mask length.') : void 0;
|
|
42619
42010
|
|
|
42620
42011
|
if (children) {
|
|
42621
|
-
!isFunction(children) ? process.env.NODE_ENV !== "production" ? invariant
|
|
42012
|
+
!isFunction(children) ? process.env.NODE_ENV !== "production" ? invariant(false, 'react-input-mask: children must be a function') : invariant(false) : void 0;
|
|
42622
42013
|
var controlledProps = ['onChange', 'onPaste', 'onMouseDown', 'onFocus', 'onBlur', 'value', 'disabled', 'readOnly'];
|
|
42623
42014
|
|
|
42624
|
-
var childrenProps = _extends$
|
|
42015
|
+
var childrenProps = _extends$1({}, restProps);
|
|
42625
42016
|
|
|
42626
42017
|
controlledProps.forEach(function (propId) {
|
|
42627
42018
|
return delete childrenProps[propId];
|
|
@@ -42630,10 +42021,10 @@ function (_React$Component) {
|
|
|
42630
42021
|
var conflictProps = controlledProps.filter(function (propId) {
|
|
42631
42022
|
return inputElement.props[propId] != null && inputElement.props[propId] !== restProps[propId];
|
|
42632
42023
|
});
|
|
42633
|
-
!!conflictProps.length ? process.env.NODE_ENV !== "production" ? invariant
|
|
42634
|
-
process.env.NODE_ENV !== "production" ? warning
|
|
42024
|
+
!!conflictProps.length ? process.env.NODE_ENV !== "production" ? invariant(false, "react-input-mask: the following props should be passed to the react-input-mask's component and should not be altered in children's function: " + conflictProps.join(', ')) : invariant(false) : void 0;
|
|
42025
|
+
process.env.NODE_ENV !== "production" ? warning(!inputRef, 'react-input-mask: inputRef is ignored when children is passed, attach ref to the children instead') : void 0;
|
|
42635
42026
|
} else {
|
|
42636
|
-
inputElement = React.createElement("input", _extends$
|
|
42027
|
+
inputElement = React.createElement("input", _extends$1({
|
|
42637
42028
|
ref: this.handleRef
|
|
42638
42029
|
}, restProps));
|
|
42639
42030
|
}
|
|
@@ -43752,1301 +43143,6 @@ const TableEdit = forwardRef((props, ref) => {
|
|
|
43752
43143
|
}) }) : jsx(Fragment$1, {}) })] }) }), toolbarSetting?.showBottomToolbar ? jsx(Fragment$1, { children: renderToolbarBottom() }) : jsx(Fragment$1, {})] }), pagingSetting?.allowPaging ? jsx(PagingComponent, { onChangePage: onChangePage, pageSize: pagingSetting?.pageSize ?? 0, currentPage: pagingSetting?.currentPage ?? 0, pageOptions: pagingSetting?.pageOptions ?? [20, 30, 50, 100], totalItem: pagingClient ? totalCount : (pagingSetting?.totalItem ?? 0), onChangePageSize: onChangePageSize }) : jsx(Fragment$1, {})] }), jsx(SidebarSetColumn, { handleSidebar: () => { setOpenPopupSetupColumn(!openPopupSetupColumn); }, openSidebar: openPopupSetupColumn, column: [...contentColumns], setColumn: setContentColumns })] }));
|
|
43753
43144
|
});
|
|
43754
43145
|
|
|
43755
|
-
/**
|
|
43756
|
-
* @remix-run/router v1.23.0
|
|
43757
|
-
*
|
|
43758
|
-
* Copyright (c) Remix Software Inc.
|
|
43759
|
-
*
|
|
43760
|
-
* This source code is licensed under the MIT license found in the
|
|
43761
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
43762
|
-
*
|
|
43763
|
-
* @license MIT
|
|
43764
|
-
*/
|
|
43765
|
-
function _extends$3() {
|
|
43766
|
-
_extends$3 = Object.assign ? Object.assign.bind() : function (target) {
|
|
43767
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
43768
|
-
var source = arguments[i];
|
|
43769
|
-
for (var key in source) {
|
|
43770
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
43771
|
-
target[key] = source[key];
|
|
43772
|
-
}
|
|
43773
|
-
}
|
|
43774
|
-
}
|
|
43775
|
-
return target;
|
|
43776
|
-
};
|
|
43777
|
-
return _extends$3.apply(this, arguments);
|
|
43778
|
-
}
|
|
43779
|
-
|
|
43780
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
43781
|
-
//#region Types and Constants
|
|
43782
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
43783
|
-
/**
|
|
43784
|
-
* Actions represent the type of change to a location value.
|
|
43785
|
-
*/
|
|
43786
|
-
var Action;
|
|
43787
|
-
(function (Action) {
|
|
43788
|
-
/**
|
|
43789
|
-
* A POP indicates a change to an arbitrary index in the history stack, such
|
|
43790
|
-
* as a back or forward navigation. It does not describe the direction of the
|
|
43791
|
-
* navigation, only that the current index changed.
|
|
43792
|
-
*
|
|
43793
|
-
* Note: This is the default action for newly created history objects.
|
|
43794
|
-
*/
|
|
43795
|
-
Action["Pop"] = "POP";
|
|
43796
|
-
/**
|
|
43797
|
-
* A PUSH indicates a new entry being added to the history stack, such as when
|
|
43798
|
-
* a link is clicked and a new page loads. When this happens, all subsequent
|
|
43799
|
-
* entries in the stack are lost.
|
|
43800
|
-
*/
|
|
43801
|
-
Action["Push"] = "PUSH";
|
|
43802
|
-
/**
|
|
43803
|
-
* A REPLACE indicates the entry at the current index in the history stack
|
|
43804
|
-
* being replaced by a new one.
|
|
43805
|
-
*/
|
|
43806
|
-
Action["Replace"] = "REPLACE";
|
|
43807
|
-
})(Action || (Action = {}));
|
|
43808
|
-
function invariant(value, message) {
|
|
43809
|
-
if (value === false || value === null || typeof value === "undefined") {
|
|
43810
|
-
throw new Error(message);
|
|
43811
|
-
}
|
|
43812
|
-
}
|
|
43813
|
-
function warning(cond, message) {
|
|
43814
|
-
if (!cond) {
|
|
43815
|
-
// eslint-disable-next-line no-console
|
|
43816
|
-
if (typeof console !== "undefined") console.warn(message);
|
|
43817
|
-
try {
|
|
43818
|
-
// Welcome to debugging history!
|
|
43819
|
-
//
|
|
43820
|
-
// This error is thrown as a convenience, so you can more easily
|
|
43821
|
-
// find the source for a warning that appears in the console by
|
|
43822
|
-
// enabling "pause on exceptions" in your JavaScript debugger.
|
|
43823
|
-
throw new Error(message);
|
|
43824
|
-
// eslint-disable-next-line no-empty
|
|
43825
|
-
} catch (e) {}
|
|
43826
|
-
}
|
|
43827
|
-
}
|
|
43828
|
-
/**
|
|
43829
|
-
* Creates a string URL path from the given pathname, search, and hash components.
|
|
43830
|
-
*/
|
|
43831
|
-
function createPath(_ref) {
|
|
43832
|
-
let {
|
|
43833
|
-
pathname = "/",
|
|
43834
|
-
search = "",
|
|
43835
|
-
hash = ""
|
|
43836
|
-
} = _ref;
|
|
43837
|
-
if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
|
|
43838
|
-
if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
43839
|
-
return pathname;
|
|
43840
|
-
}
|
|
43841
|
-
/**
|
|
43842
|
-
* Parses a string URL path into its separate pathname, search, and hash components.
|
|
43843
|
-
*/
|
|
43844
|
-
function parsePath(path) {
|
|
43845
|
-
let parsedPath = {};
|
|
43846
|
-
if (path) {
|
|
43847
|
-
let hashIndex = path.indexOf("#");
|
|
43848
|
-
if (hashIndex >= 0) {
|
|
43849
|
-
parsedPath.hash = path.substr(hashIndex);
|
|
43850
|
-
path = path.substr(0, hashIndex);
|
|
43851
|
-
}
|
|
43852
|
-
let searchIndex = path.indexOf("?");
|
|
43853
|
-
if (searchIndex >= 0) {
|
|
43854
|
-
parsedPath.search = path.substr(searchIndex);
|
|
43855
|
-
path = path.substr(0, searchIndex);
|
|
43856
|
-
}
|
|
43857
|
-
if (path) {
|
|
43858
|
-
parsedPath.pathname = path;
|
|
43859
|
-
}
|
|
43860
|
-
}
|
|
43861
|
-
return parsedPath;
|
|
43862
|
-
}
|
|
43863
|
-
//#endregion
|
|
43864
|
-
|
|
43865
|
-
var ResultType;
|
|
43866
|
-
(function (ResultType) {
|
|
43867
|
-
ResultType["data"] = "data";
|
|
43868
|
-
ResultType["deferred"] = "deferred";
|
|
43869
|
-
ResultType["redirect"] = "redirect";
|
|
43870
|
-
ResultType["error"] = "error";
|
|
43871
|
-
})(ResultType || (ResultType = {}));
|
|
43872
|
-
/**
|
|
43873
|
-
* Performs pattern matching on a URL pathname and returns information about
|
|
43874
|
-
* the match.
|
|
43875
|
-
*
|
|
43876
|
-
* @see https://reactrouter.com/v6/utils/match-path
|
|
43877
|
-
*/
|
|
43878
|
-
function matchPath(pattern, pathname) {
|
|
43879
|
-
if (typeof pattern === "string") {
|
|
43880
|
-
pattern = {
|
|
43881
|
-
path: pattern,
|
|
43882
|
-
caseSensitive: false,
|
|
43883
|
-
end: true
|
|
43884
|
-
};
|
|
43885
|
-
}
|
|
43886
|
-
let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
|
|
43887
|
-
let match = pathname.match(matcher);
|
|
43888
|
-
if (!match) return null;
|
|
43889
|
-
let matchedPathname = match[0];
|
|
43890
|
-
let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
|
|
43891
|
-
let captureGroups = match.slice(1);
|
|
43892
|
-
let params = compiledParams.reduce((memo, _ref, index) => {
|
|
43893
|
-
let {
|
|
43894
|
-
paramName,
|
|
43895
|
-
isOptional
|
|
43896
|
-
} = _ref;
|
|
43897
|
-
// We need to compute the pathnameBase here using the raw splat value
|
|
43898
|
-
// instead of using params["*"] later because it will be decoded then
|
|
43899
|
-
if (paramName === "*") {
|
|
43900
|
-
let splatValue = captureGroups[index] || "";
|
|
43901
|
-
pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
|
|
43902
|
-
}
|
|
43903
|
-
const value = captureGroups[index];
|
|
43904
|
-
if (isOptional && !value) {
|
|
43905
|
-
memo[paramName] = undefined;
|
|
43906
|
-
} else {
|
|
43907
|
-
memo[paramName] = (value || "").replace(/%2F/g, "/");
|
|
43908
|
-
}
|
|
43909
|
-
return memo;
|
|
43910
|
-
}, {});
|
|
43911
|
-
return {
|
|
43912
|
-
params,
|
|
43913
|
-
pathname: matchedPathname,
|
|
43914
|
-
pathnameBase,
|
|
43915
|
-
pattern
|
|
43916
|
-
};
|
|
43917
|
-
}
|
|
43918
|
-
function compilePath(path, caseSensitive, end) {
|
|
43919
|
-
if (caseSensitive === void 0) {
|
|
43920
|
-
caseSensitive = false;
|
|
43921
|
-
}
|
|
43922
|
-
if (end === void 0) {
|
|
43923
|
-
end = true;
|
|
43924
|
-
}
|
|
43925
|
-
warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\"."));
|
|
43926
|
-
let params = [];
|
|
43927
|
-
let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
|
|
43928
|
-
.replace(/^\/*/, "/") // Make sure it has a leading /
|
|
43929
|
-
.replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
|
|
43930
|
-
.replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
|
|
43931
|
-
params.push({
|
|
43932
|
-
paramName,
|
|
43933
|
-
isOptional: isOptional != null
|
|
43934
|
-
});
|
|
43935
|
-
return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
|
|
43936
|
-
});
|
|
43937
|
-
if (path.endsWith("*")) {
|
|
43938
|
-
params.push({
|
|
43939
|
-
paramName: "*"
|
|
43940
|
-
});
|
|
43941
|
-
regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
|
|
43942
|
-
: "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
|
|
43943
|
-
} else if (end) {
|
|
43944
|
-
// When matching to the end, ignore trailing slashes
|
|
43945
|
-
regexpSource += "\\/*$";
|
|
43946
|
-
} else if (path !== "" && path !== "/") {
|
|
43947
|
-
// If our path is non-empty and contains anything beyond an initial slash,
|
|
43948
|
-
// then we have _some_ form of path in our regex, so we should expect to
|
|
43949
|
-
// match only if we find the end of this path segment. Look for an optional
|
|
43950
|
-
// non-captured trailing slash (to match a portion of the URL) or the end
|
|
43951
|
-
// of the path (if we've matched to the end). We used to do this with a
|
|
43952
|
-
// word boundary but that gives false positives on routes like
|
|
43953
|
-
// /user-preferences since `-` counts as a word boundary.
|
|
43954
|
-
regexpSource += "(?:(?=\\/|$))";
|
|
43955
|
-
} else ;
|
|
43956
|
-
let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
|
|
43957
|
-
return [matcher, params];
|
|
43958
|
-
}
|
|
43959
|
-
/**
|
|
43960
|
-
* @private
|
|
43961
|
-
*/
|
|
43962
|
-
function stripBasename(pathname, basename) {
|
|
43963
|
-
if (basename === "/") return pathname;
|
|
43964
|
-
if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
|
|
43965
|
-
return null;
|
|
43966
|
-
}
|
|
43967
|
-
// We want to leave trailing slash behavior in the user's control, so if they
|
|
43968
|
-
// specify a basename with a trailing slash, we should support it
|
|
43969
|
-
let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
|
|
43970
|
-
let nextChar = pathname.charAt(startIndex);
|
|
43971
|
-
if (nextChar && nextChar !== "/") {
|
|
43972
|
-
// pathname does not start with basename/
|
|
43973
|
-
return null;
|
|
43974
|
-
}
|
|
43975
|
-
return pathname.slice(startIndex) || "/";
|
|
43976
|
-
}
|
|
43977
|
-
/**
|
|
43978
|
-
* Returns a resolved path object relative to the given pathname.
|
|
43979
|
-
*
|
|
43980
|
-
* @see https://reactrouter.com/v6/utils/resolve-path
|
|
43981
|
-
*/
|
|
43982
|
-
function resolvePath(to, fromPathname) {
|
|
43983
|
-
if (fromPathname === void 0) {
|
|
43984
|
-
fromPathname = "/";
|
|
43985
|
-
}
|
|
43986
|
-
let {
|
|
43987
|
-
pathname: toPathname,
|
|
43988
|
-
search = "",
|
|
43989
|
-
hash = ""
|
|
43990
|
-
} = typeof to === "string" ? parsePath(to) : to;
|
|
43991
|
-
let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
|
|
43992
|
-
return {
|
|
43993
|
-
pathname,
|
|
43994
|
-
search: normalizeSearch(search),
|
|
43995
|
-
hash: normalizeHash(hash)
|
|
43996
|
-
};
|
|
43997
|
-
}
|
|
43998
|
-
function resolvePathname(relativePath, fromPathname) {
|
|
43999
|
-
let segments = fromPathname.replace(/\/+$/, "").split("/");
|
|
44000
|
-
let relativeSegments = relativePath.split("/");
|
|
44001
|
-
relativeSegments.forEach(segment => {
|
|
44002
|
-
if (segment === "..") {
|
|
44003
|
-
// Keep the root "" segment so the pathname starts at /
|
|
44004
|
-
if (segments.length > 1) segments.pop();
|
|
44005
|
-
} else if (segment !== ".") {
|
|
44006
|
-
segments.push(segment);
|
|
44007
|
-
}
|
|
44008
|
-
});
|
|
44009
|
-
return segments.length > 1 ? segments.join("/") : "/";
|
|
44010
|
-
}
|
|
44011
|
-
function getInvalidPathError(char, field, dest, path) {
|
|
44012
|
-
return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + "a string in <Link to=\"...\"> and the router will parse it for you.";
|
|
44013
|
-
}
|
|
44014
|
-
/**
|
|
44015
|
-
* @private
|
|
44016
|
-
*
|
|
44017
|
-
* When processing relative navigation we want to ignore ancestor routes that
|
|
44018
|
-
* do not contribute to the path, such that index/pathless layout routes don't
|
|
44019
|
-
* interfere.
|
|
44020
|
-
*
|
|
44021
|
-
* For example, when moving a route element into an index route and/or a
|
|
44022
|
-
* pathless layout route, relative link behavior contained within should stay
|
|
44023
|
-
* the same. Both of the following examples should link back to the root:
|
|
44024
|
-
*
|
|
44025
|
-
* <Route path="/">
|
|
44026
|
-
* <Route path="accounts" element={<Link to=".."}>
|
|
44027
|
-
* </Route>
|
|
44028
|
-
*
|
|
44029
|
-
* <Route path="/">
|
|
44030
|
-
* <Route path="accounts">
|
|
44031
|
-
* <Route element={<AccountsLayout />}> // <-- Does not contribute
|
|
44032
|
-
* <Route index element={<Link to=".."} /> // <-- Does not contribute
|
|
44033
|
-
* </Route
|
|
44034
|
-
* </Route>
|
|
44035
|
-
* </Route>
|
|
44036
|
-
*/
|
|
44037
|
-
function getPathContributingMatches(matches) {
|
|
44038
|
-
return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
|
|
44039
|
-
}
|
|
44040
|
-
// Return the array of pathnames for the current route matches - used to
|
|
44041
|
-
// generate the routePathnames input for resolveTo()
|
|
44042
|
-
function getResolveToMatches(matches, v7_relativeSplatPath) {
|
|
44043
|
-
let pathMatches = getPathContributingMatches(matches);
|
|
44044
|
-
// When v7_relativeSplatPath is enabled, use the full pathname for the leaf
|
|
44045
|
-
// match so we include splat values for "." links. See:
|
|
44046
|
-
// https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
|
|
44047
|
-
if (v7_relativeSplatPath) {
|
|
44048
|
-
return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);
|
|
44049
|
-
}
|
|
44050
|
-
return pathMatches.map(match => match.pathnameBase);
|
|
44051
|
-
}
|
|
44052
|
-
/**
|
|
44053
|
-
* @private
|
|
44054
|
-
*/
|
|
44055
|
-
function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
|
|
44056
|
-
if (isPathRelative === void 0) {
|
|
44057
|
-
isPathRelative = false;
|
|
44058
|
-
}
|
|
44059
|
-
let to;
|
|
44060
|
-
if (typeof toArg === "string") {
|
|
44061
|
-
to = parsePath(toArg);
|
|
44062
|
-
} else {
|
|
44063
|
-
to = _extends$3({}, toArg);
|
|
44064
|
-
invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
|
|
44065
|
-
invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
|
|
44066
|
-
invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
|
|
44067
|
-
}
|
|
44068
|
-
let isEmptyPath = toArg === "" || to.pathname === "";
|
|
44069
|
-
let toPathname = isEmptyPath ? "/" : to.pathname;
|
|
44070
|
-
let from;
|
|
44071
|
-
// Routing is relative to the current pathname if explicitly requested.
|
|
44072
|
-
//
|
|
44073
|
-
// If a pathname is explicitly provided in `to`, it should be relative to the
|
|
44074
|
-
// route context. This is explained in `Note on `<Link to>` values` in our
|
|
44075
|
-
// migration guide from v5 as a means of disambiguation between `to` values
|
|
44076
|
-
// that begin with `/` and those that do not. However, this is problematic for
|
|
44077
|
-
// `to` values that do not provide a pathname. `to` can simply be a search or
|
|
44078
|
-
// hash string, in which case we should assume that the navigation is relative
|
|
44079
|
-
// to the current location's pathname and *not* the route pathname.
|
|
44080
|
-
if (toPathname == null) {
|
|
44081
|
-
from = locationPathname;
|
|
44082
|
-
} else {
|
|
44083
|
-
let routePathnameIndex = routePathnames.length - 1;
|
|
44084
|
-
// With relative="route" (the default), each leading .. segment means
|
|
44085
|
-
// "go up one route" instead of "go up one URL segment". This is a key
|
|
44086
|
-
// difference from how <a href> works and a major reason we call this a
|
|
44087
|
-
// "to" value instead of a "href".
|
|
44088
|
-
if (!isPathRelative && toPathname.startsWith("..")) {
|
|
44089
|
-
let toSegments = toPathname.split("/");
|
|
44090
|
-
while (toSegments[0] === "..") {
|
|
44091
|
-
toSegments.shift();
|
|
44092
|
-
routePathnameIndex -= 1;
|
|
44093
|
-
}
|
|
44094
|
-
to.pathname = toSegments.join("/");
|
|
44095
|
-
}
|
|
44096
|
-
from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
|
|
44097
|
-
}
|
|
44098
|
-
let path = resolvePath(to, from);
|
|
44099
|
-
// Ensure the pathname has a trailing slash if the original "to" had one
|
|
44100
|
-
let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
|
|
44101
|
-
// Or if this was a link to the current path which has a trailing slash
|
|
44102
|
-
let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
|
|
44103
|
-
if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
|
|
44104
|
-
path.pathname += "/";
|
|
44105
|
-
}
|
|
44106
|
-
return path;
|
|
44107
|
-
}
|
|
44108
|
-
/**
|
|
44109
|
-
* @private
|
|
44110
|
-
*/
|
|
44111
|
-
const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
|
|
44112
|
-
/**
|
|
44113
|
-
* @private
|
|
44114
|
-
*/
|
|
44115
|
-
const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
|
44116
|
-
/**
|
|
44117
|
-
* @private
|
|
44118
|
-
*/
|
|
44119
|
-
const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
|
|
44120
|
-
|
|
44121
|
-
const validMutationMethodsArr = ["post", "put", "patch", "delete"];
|
|
44122
|
-
["get", ...validMutationMethodsArr];
|
|
44123
|
-
|
|
44124
|
-
/**
|
|
44125
|
-
* React Router v6.30.0
|
|
44126
|
-
*
|
|
44127
|
-
* Copyright (c) Remix Software Inc.
|
|
44128
|
-
*
|
|
44129
|
-
* This source code is licensed under the MIT license found in the
|
|
44130
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
44131
|
-
*
|
|
44132
|
-
* @license MIT
|
|
44133
|
-
*/
|
|
44134
|
-
|
|
44135
|
-
function _extends$2() {
|
|
44136
|
-
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
44137
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
44138
|
-
var source = arguments[i];
|
|
44139
|
-
for (var key in source) {
|
|
44140
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
44141
|
-
target[key] = source[key];
|
|
44142
|
-
}
|
|
44143
|
-
}
|
|
44144
|
-
}
|
|
44145
|
-
return target;
|
|
44146
|
-
};
|
|
44147
|
-
return _extends$2.apply(this, arguments);
|
|
44148
|
-
}
|
|
44149
|
-
|
|
44150
|
-
// Create react-specific types from the agnostic types in @remix-run/router to
|
|
44151
|
-
// export from react-router
|
|
44152
|
-
const DataRouterContext = /*#__PURE__*/React$5.createContext(null);
|
|
44153
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44154
|
-
DataRouterContext.displayName = "DataRouter";
|
|
44155
|
-
}
|
|
44156
|
-
const DataRouterStateContext = /*#__PURE__*/React$5.createContext(null);
|
|
44157
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44158
|
-
DataRouterStateContext.displayName = "DataRouterState";
|
|
44159
|
-
}
|
|
44160
|
-
const AwaitContext = /*#__PURE__*/React$5.createContext(null);
|
|
44161
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44162
|
-
AwaitContext.displayName = "Await";
|
|
44163
|
-
}
|
|
44164
|
-
|
|
44165
|
-
/**
|
|
44166
|
-
* A Navigator is a "location changer"; it's how you get to different locations.
|
|
44167
|
-
*
|
|
44168
|
-
* Every history instance conforms to the Navigator interface, but the
|
|
44169
|
-
* distinction is useful primarily when it comes to the low-level `<Router>` API
|
|
44170
|
-
* where both the location and a navigator must be provided separately in order
|
|
44171
|
-
* to avoid "tearing" that may occur in a suspense-enabled app if the action
|
|
44172
|
-
* and/or location were to be read directly from the history instance.
|
|
44173
|
-
*/
|
|
44174
|
-
|
|
44175
|
-
const NavigationContext = /*#__PURE__*/React$5.createContext(null);
|
|
44176
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44177
|
-
NavigationContext.displayName = "Navigation";
|
|
44178
|
-
}
|
|
44179
|
-
const LocationContext = /*#__PURE__*/React$5.createContext(null);
|
|
44180
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44181
|
-
LocationContext.displayName = "Location";
|
|
44182
|
-
}
|
|
44183
|
-
const RouteContext = /*#__PURE__*/React$5.createContext({
|
|
44184
|
-
outlet: null,
|
|
44185
|
-
matches: [],
|
|
44186
|
-
isDataRoute: false
|
|
44187
|
-
});
|
|
44188
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44189
|
-
RouteContext.displayName = "Route";
|
|
44190
|
-
}
|
|
44191
|
-
const RouteErrorContext = /*#__PURE__*/React$5.createContext(null);
|
|
44192
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44193
|
-
RouteErrorContext.displayName = "RouteError";
|
|
44194
|
-
}
|
|
44195
|
-
|
|
44196
|
-
/**
|
|
44197
|
-
* Returns the full href for the given "to" value. This is useful for building
|
|
44198
|
-
* custom links that are also accessible and preserve right-click behavior.
|
|
44199
|
-
*
|
|
44200
|
-
* @see https://reactrouter.com/v6/hooks/use-href
|
|
44201
|
-
*/
|
|
44202
|
-
function useHref(to, _temp) {
|
|
44203
|
-
let {
|
|
44204
|
-
relative
|
|
44205
|
-
} = _temp === void 0 ? {} : _temp;
|
|
44206
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
44207
|
-
// router loaded. We can help them understand how to avoid that.
|
|
44208
|
-
"useHref() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
44209
|
-
let {
|
|
44210
|
-
basename,
|
|
44211
|
-
navigator
|
|
44212
|
-
} = React$5.useContext(NavigationContext);
|
|
44213
|
-
let {
|
|
44214
|
-
hash,
|
|
44215
|
-
pathname,
|
|
44216
|
-
search
|
|
44217
|
-
} = useResolvedPath(to, {
|
|
44218
|
-
relative
|
|
44219
|
-
});
|
|
44220
|
-
let joinedPathname = pathname;
|
|
44221
|
-
|
|
44222
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
44223
|
-
// to creating the href. If this is a root navigation, then just use the raw
|
|
44224
|
-
// basename which allows the basename to have full control over the presence
|
|
44225
|
-
// of a trailing slash on root links
|
|
44226
|
-
if (basename !== "/") {
|
|
44227
|
-
joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
44228
|
-
}
|
|
44229
|
-
return navigator.createHref({
|
|
44230
|
-
pathname: joinedPathname,
|
|
44231
|
-
search,
|
|
44232
|
-
hash
|
|
44233
|
-
});
|
|
44234
|
-
}
|
|
44235
|
-
|
|
44236
|
-
/**
|
|
44237
|
-
* Returns true if this component is a descendant of a `<Router>`.
|
|
44238
|
-
*
|
|
44239
|
-
* @see https://reactrouter.com/v6/hooks/use-in-router-context
|
|
44240
|
-
*/
|
|
44241
|
-
function useInRouterContext() {
|
|
44242
|
-
return React$5.useContext(LocationContext) != null;
|
|
44243
|
-
}
|
|
44244
|
-
|
|
44245
|
-
/**
|
|
44246
|
-
* Returns the current location object, which represents the current URL in web
|
|
44247
|
-
* browsers.
|
|
44248
|
-
*
|
|
44249
|
-
* Note: If you're using this it may mean you're doing some of your own
|
|
44250
|
-
* "routing" in your app, and we'd like to know what your use case is. We may
|
|
44251
|
-
* be able to provide something higher-level to better suit your needs.
|
|
44252
|
-
*
|
|
44253
|
-
* @see https://reactrouter.com/v6/hooks/use-location
|
|
44254
|
-
*/
|
|
44255
|
-
function useLocation() {
|
|
44256
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
44257
|
-
// router loaded. We can help them understand how to avoid that.
|
|
44258
|
-
"useLocation() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
44259
|
-
return React$5.useContext(LocationContext).location;
|
|
44260
|
-
}
|
|
44261
|
-
|
|
44262
|
-
/**
|
|
44263
|
-
* The interface for the navigate() function returned from useNavigate().
|
|
44264
|
-
*/
|
|
44265
|
-
|
|
44266
|
-
const navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.";
|
|
44267
|
-
|
|
44268
|
-
// Mute warnings for calls to useNavigate in SSR environments
|
|
44269
|
-
function useIsomorphicLayoutEffect(cb) {
|
|
44270
|
-
let isStatic = React$5.useContext(NavigationContext).static;
|
|
44271
|
-
if (!isStatic) {
|
|
44272
|
-
// We should be able to get rid of this once react 18.3 is released
|
|
44273
|
-
// See: https://github.com/facebook/react/pull/26395
|
|
44274
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44275
|
-
React$5.useLayoutEffect(cb);
|
|
44276
|
-
}
|
|
44277
|
-
}
|
|
44278
|
-
|
|
44279
|
-
/**
|
|
44280
|
-
* Returns an imperative method for changing the location. Used by `<Link>`s, but
|
|
44281
|
-
* may also be used by other elements to change the location.
|
|
44282
|
-
*
|
|
44283
|
-
* @see https://reactrouter.com/v6/hooks/use-navigate
|
|
44284
|
-
*/
|
|
44285
|
-
function useNavigate() {
|
|
44286
|
-
let {
|
|
44287
|
-
isDataRoute
|
|
44288
|
-
} = React$5.useContext(RouteContext);
|
|
44289
|
-
// Conditional usage is OK here because the usage of a data router is static
|
|
44290
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44291
|
-
return isDataRoute ? useNavigateStable() : useNavigateUnstable();
|
|
44292
|
-
}
|
|
44293
|
-
function useNavigateUnstable() {
|
|
44294
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
44295
|
-
// router loaded. We can help them understand how to avoid that.
|
|
44296
|
-
"useNavigate() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
44297
|
-
let dataRouterContext = React$5.useContext(DataRouterContext);
|
|
44298
|
-
let {
|
|
44299
|
-
basename,
|
|
44300
|
-
future,
|
|
44301
|
-
navigator
|
|
44302
|
-
} = React$5.useContext(NavigationContext);
|
|
44303
|
-
let {
|
|
44304
|
-
matches
|
|
44305
|
-
} = React$5.useContext(RouteContext);
|
|
44306
|
-
let {
|
|
44307
|
-
pathname: locationPathname
|
|
44308
|
-
} = useLocation();
|
|
44309
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
44310
|
-
let activeRef = React$5.useRef(false);
|
|
44311
|
-
useIsomorphicLayoutEffect(() => {
|
|
44312
|
-
activeRef.current = true;
|
|
44313
|
-
});
|
|
44314
|
-
let navigate = React$5.useCallback(function (to, options) {
|
|
44315
|
-
if (options === void 0) {
|
|
44316
|
-
options = {};
|
|
44317
|
-
}
|
|
44318
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
44319
|
-
|
|
44320
|
-
// Short circuit here since if this happens on first render the navigate
|
|
44321
|
-
// is useless because we haven't wired up our history listener yet
|
|
44322
|
-
if (!activeRef.current) return;
|
|
44323
|
-
if (typeof to === "number") {
|
|
44324
|
-
navigator.go(to);
|
|
44325
|
-
return;
|
|
44326
|
-
}
|
|
44327
|
-
let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
|
|
44328
|
-
|
|
44329
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
44330
|
-
// to handing off to history (but only if we're not in a data router,
|
|
44331
|
-
// otherwise it'll prepend the basename inside of the router).
|
|
44332
|
-
// If this is a root navigation, then we navigate to the raw basename
|
|
44333
|
-
// which allows the basename to have full control over the presence of a
|
|
44334
|
-
// trailing slash on root links
|
|
44335
|
-
if (dataRouterContext == null && basename !== "/") {
|
|
44336
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
44337
|
-
}
|
|
44338
|
-
(!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);
|
|
44339
|
-
}, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);
|
|
44340
|
-
return navigate;
|
|
44341
|
-
}
|
|
44342
|
-
|
|
44343
|
-
/**
|
|
44344
|
-
* Resolves the pathname of the given `to` value against the current location.
|
|
44345
|
-
*
|
|
44346
|
-
* @see https://reactrouter.com/v6/hooks/use-resolved-path
|
|
44347
|
-
*/
|
|
44348
|
-
function useResolvedPath(to, _temp2) {
|
|
44349
|
-
let {
|
|
44350
|
-
relative
|
|
44351
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
44352
|
-
let {
|
|
44353
|
-
future
|
|
44354
|
-
} = React$5.useContext(NavigationContext);
|
|
44355
|
-
let {
|
|
44356
|
-
matches
|
|
44357
|
-
} = React$5.useContext(RouteContext);
|
|
44358
|
-
let {
|
|
44359
|
-
pathname: locationPathname
|
|
44360
|
-
} = useLocation();
|
|
44361
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
44362
|
-
return React$5.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
|
|
44363
|
-
}
|
|
44364
|
-
var DataRouterHook$1 = /*#__PURE__*/function (DataRouterHook) {
|
|
44365
|
-
DataRouterHook["UseBlocker"] = "useBlocker";
|
|
44366
|
-
DataRouterHook["UseRevalidator"] = "useRevalidator";
|
|
44367
|
-
DataRouterHook["UseNavigateStable"] = "useNavigate";
|
|
44368
|
-
return DataRouterHook;
|
|
44369
|
-
}(DataRouterHook$1 || {});
|
|
44370
|
-
var DataRouterStateHook$1 = /*#__PURE__*/function (DataRouterStateHook) {
|
|
44371
|
-
DataRouterStateHook["UseBlocker"] = "useBlocker";
|
|
44372
|
-
DataRouterStateHook["UseLoaderData"] = "useLoaderData";
|
|
44373
|
-
DataRouterStateHook["UseActionData"] = "useActionData";
|
|
44374
|
-
DataRouterStateHook["UseRouteError"] = "useRouteError";
|
|
44375
|
-
DataRouterStateHook["UseNavigation"] = "useNavigation";
|
|
44376
|
-
DataRouterStateHook["UseRouteLoaderData"] = "useRouteLoaderData";
|
|
44377
|
-
DataRouterStateHook["UseMatches"] = "useMatches";
|
|
44378
|
-
DataRouterStateHook["UseRevalidator"] = "useRevalidator";
|
|
44379
|
-
DataRouterStateHook["UseNavigateStable"] = "useNavigate";
|
|
44380
|
-
DataRouterStateHook["UseRouteId"] = "useRouteId";
|
|
44381
|
-
return DataRouterStateHook;
|
|
44382
|
-
}(DataRouterStateHook$1 || {});
|
|
44383
|
-
function getDataRouterConsoleError$1(hookName) {
|
|
44384
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
44385
|
-
}
|
|
44386
|
-
function useDataRouterContext$1(hookName) {
|
|
44387
|
-
let ctx = React$5.useContext(DataRouterContext);
|
|
44388
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
44389
|
-
return ctx;
|
|
44390
|
-
}
|
|
44391
|
-
function useRouteContext(hookName) {
|
|
44392
|
-
let route = React$5.useContext(RouteContext);
|
|
44393
|
-
!route ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
44394
|
-
return route;
|
|
44395
|
-
}
|
|
44396
|
-
|
|
44397
|
-
// Internal version with hookName-aware debugging
|
|
44398
|
-
function useCurrentRouteId(hookName) {
|
|
44399
|
-
let route = useRouteContext(hookName);
|
|
44400
|
-
let thisRoute = route.matches[route.matches.length - 1];
|
|
44401
|
-
!thisRoute.route.id ? process.env.NODE_ENV !== "production" ? invariant(false, hookName + " can only be used on routes that contain a unique \"id\"") : invariant(false) : void 0;
|
|
44402
|
-
return thisRoute.route.id;
|
|
44403
|
-
}
|
|
44404
|
-
|
|
44405
|
-
/**
|
|
44406
|
-
* Returns the ID for the nearest contextual route
|
|
44407
|
-
*/
|
|
44408
|
-
function useRouteId() {
|
|
44409
|
-
return useCurrentRouteId(DataRouterStateHook$1.UseRouteId);
|
|
44410
|
-
}
|
|
44411
|
-
|
|
44412
|
-
/**
|
|
44413
|
-
* Stable version of useNavigate that is used when we are in the context of
|
|
44414
|
-
* a RouterProvider.
|
|
44415
|
-
*/
|
|
44416
|
-
function useNavigateStable() {
|
|
44417
|
-
let {
|
|
44418
|
-
router
|
|
44419
|
-
} = useDataRouterContext$1(DataRouterHook$1.UseNavigateStable);
|
|
44420
|
-
let id = useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable);
|
|
44421
|
-
let activeRef = React$5.useRef(false);
|
|
44422
|
-
useIsomorphicLayoutEffect(() => {
|
|
44423
|
-
activeRef.current = true;
|
|
44424
|
-
});
|
|
44425
|
-
let navigate = React$5.useCallback(function (to, options) {
|
|
44426
|
-
if (options === void 0) {
|
|
44427
|
-
options = {};
|
|
44428
|
-
}
|
|
44429
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
44430
|
-
|
|
44431
|
-
// Short circuit here since if this happens on first render the navigate
|
|
44432
|
-
// is useless because we haven't wired up our router subscriber yet
|
|
44433
|
-
if (!activeRef.current) return;
|
|
44434
|
-
if (typeof to === "number") {
|
|
44435
|
-
router.navigate(to);
|
|
44436
|
-
} else {
|
|
44437
|
-
router.navigate(to, _extends$2({
|
|
44438
|
-
fromRouteId: id
|
|
44439
|
-
}, options));
|
|
44440
|
-
}
|
|
44441
|
-
}, [router, id]);
|
|
44442
|
-
return navigate;
|
|
44443
|
-
}
|
|
44444
|
-
new Promise(() => {});
|
|
44445
|
-
|
|
44446
|
-
/**
|
|
44447
|
-
* React Router DOM v6.30.0
|
|
44448
|
-
*
|
|
44449
|
-
* Copyright (c) Remix Software Inc.
|
|
44450
|
-
*
|
|
44451
|
-
* This source code is licensed under the MIT license found in the
|
|
44452
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
44453
|
-
*
|
|
44454
|
-
* @license MIT
|
|
44455
|
-
*/
|
|
44456
|
-
|
|
44457
|
-
function _extends$1() {
|
|
44458
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
44459
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
44460
|
-
var source = arguments[i];
|
|
44461
|
-
for (var key in source) {
|
|
44462
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
44463
|
-
target[key] = source[key];
|
|
44464
|
-
}
|
|
44465
|
-
}
|
|
44466
|
-
}
|
|
44467
|
-
return target;
|
|
44468
|
-
};
|
|
44469
|
-
return _extends$1.apply(this, arguments);
|
|
44470
|
-
}
|
|
44471
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
44472
|
-
if (source == null) return {};
|
|
44473
|
-
var target = {};
|
|
44474
|
-
var sourceKeys = Object.keys(source);
|
|
44475
|
-
var key, i;
|
|
44476
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
44477
|
-
key = sourceKeys[i];
|
|
44478
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
44479
|
-
target[key] = source[key];
|
|
44480
|
-
}
|
|
44481
|
-
return target;
|
|
44482
|
-
}
|
|
44483
|
-
|
|
44484
|
-
const defaultMethod = "get";
|
|
44485
|
-
const defaultEncType = "application/x-www-form-urlencoded";
|
|
44486
|
-
function isHtmlElement(object) {
|
|
44487
|
-
return object != null && typeof object.tagName === "string";
|
|
44488
|
-
}
|
|
44489
|
-
function isButtonElement(object) {
|
|
44490
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
|
|
44491
|
-
}
|
|
44492
|
-
function isFormElement(object) {
|
|
44493
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
|
|
44494
|
-
}
|
|
44495
|
-
function isInputElement(object) {
|
|
44496
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
|
|
44497
|
-
}
|
|
44498
|
-
function isModifiedEvent(event) {
|
|
44499
|
-
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
44500
|
-
}
|
|
44501
|
-
function shouldProcessLinkClick(event, target) {
|
|
44502
|
-
return event.button === 0 && (
|
|
44503
|
-
// Ignore everything but left clicks
|
|
44504
|
-
!target || target === "_self") &&
|
|
44505
|
-
// Let browser handle "target=_blank" etc.
|
|
44506
|
-
!isModifiedEvent(event) // Ignore clicks with modifier keys
|
|
44507
|
-
;
|
|
44508
|
-
}
|
|
44509
|
-
// One-time check for submitter support
|
|
44510
|
-
let _formDataSupportsSubmitter = null;
|
|
44511
|
-
function isFormDataSubmitterSupported() {
|
|
44512
|
-
if (_formDataSupportsSubmitter === null) {
|
|
44513
|
-
try {
|
|
44514
|
-
new FormData(document.createElement("form"),
|
|
44515
|
-
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
44516
|
-
0);
|
|
44517
|
-
_formDataSupportsSubmitter = false;
|
|
44518
|
-
} catch (e) {
|
|
44519
|
-
_formDataSupportsSubmitter = true;
|
|
44520
|
-
}
|
|
44521
|
-
}
|
|
44522
|
-
return _formDataSupportsSubmitter;
|
|
44523
|
-
}
|
|
44524
|
-
const supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
44525
|
-
function getFormEncType(encType) {
|
|
44526
|
-
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
44527
|
-
process.env.NODE_ENV !== "production" ? warning(false, "\"" + encType + "\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` " + ("and will default to \"" + defaultEncType + "\"")) : void 0;
|
|
44528
|
-
return null;
|
|
44529
|
-
}
|
|
44530
|
-
return encType;
|
|
44531
|
-
}
|
|
44532
|
-
function getFormSubmissionInfo(target, basename) {
|
|
44533
|
-
let method;
|
|
44534
|
-
let action;
|
|
44535
|
-
let encType;
|
|
44536
|
-
let formData;
|
|
44537
|
-
let body;
|
|
44538
|
-
if (isFormElement(target)) {
|
|
44539
|
-
// When grabbing the action from the element, it will have had the basename
|
|
44540
|
-
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
44541
|
-
// re-prefix in the router
|
|
44542
|
-
let attr = target.getAttribute("action");
|
|
44543
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
44544
|
-
method = target.getAttribute("method") || defaultMethod;
|
|
44545
|
-
encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
|
|
44546
|
-
formData = new FormData(target);
|
|
44547
|
-
} else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
|
|
44548
|
-
let form = target.form;
|
|
44549
|
-
if (form == null) {
|
|
44550
|
-
throw new Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
|
|
44551
|
-
}
|
|
44552
|
-
// <button>/<input type="submit"> may override attributes of <form>
|
|
44553
|
-
// When grabbing the action from the element, it will have had the basename
|
|
44554
|
-
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
44555
|
-
// re-prefix in the router
|
|
44556
|
-
let attr = target.getAttribute("formaction") || form.getAttribute("action");
|
|
44557
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
44558
|
-
method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
|
|
44559
|
-
encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
|
|
44560
|
-
// Build a FormData object populated from a form and submitter
|
|
44561
|
-
formData = new FormData(form, target);
|
|
44562
|
-
// If this browser doesn't support the `FormData(el, submitter)` format,
|
|
44563
|
-
// then tack on the submitter value at the end. This is a lightweight
|
|
44564
|
-
// solution that is not 100% spec compliant. For complete support in older
|
|
44565
|
-
// browsers, consider using the `formdata-submitter-polyfill` package
|
|
44566
|
-
if (!isFormDataSubmitterSupported()) {
|
|
44567
|
-
let {
|
|
44568
|
-
name,
|
|
44569
|
-
type,
|
|
44570
|
-
value
|
|
44571
|
-
} = target;
|
|
44572
|
-
if (type === "image") {
|
|
44573
|
-
let prefix = name ? name + "." : "";
|
|
44574
|
-
formData.append(prefix + "x", "0");
|
|
44575
|
-
formData.append(prefix + "y", "0");
|
|
44576
|
-
} else if (name) {
|
|
44577
|
-
formData.append(name, value);
|
|
44578
|
-
}
|
|
44579
|
-
}
|
|
44580
|
-
} else if (isHtmlElement(target)) {
|
|
44581
|
-
throw new Error("Cannot submit element that is not <form>, <button>, or " + "<input type=\"submit|image\">");
|
|
44582
|
-
} else {
|
|
44583
|
-
method = defaultMethod;
|
|
44584
|
-
action = null;
|
|
44585
|
-
encType = defaultEncType;
|
|
44586
|
-
body = target;
|
|
44587
|
-
}
|
|
44588
|
-
// Send body for <Form encType="text/plain" so we encode it into text
|
|
44589
|
-
if (formData && encType === "text/plain") {
|
|
44590
|
-
body = formData;
|
|
44591
|
-
formData = undefined;
|
|
44592
|
-
}
|
|
44593
|
-
return {
|
|
44594
|
-
action,
|
|
44595
|
-
method: method.toLowerCase(),
|
|
44596
|
-
encType,
|
|
44597
|
-
formData,
|
|
44598
|
-
body
|
|
44599
|
-
};
|
|
44600
|
-
}
|
|
44601
|
-
|
|
44602
|
-
const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"],
|
|
44603
|
-
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"],
|
|
44604
|
-
_excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"];
|
|
44605
|
-
// HEY YOU! DON'T TOUCH THIS VARIABLE!
|
|
44606
|
-
//
|
|
44607
|
-
// It is replaced with the proper version at build time via a babel plugin in
|
|
44608
|
-
// the rollup config.
|
|
44609
|
-
//
|
|
44610
|
-
// Export a global property onto the window for React Router detection by the
|
|
44611
|
-
// Core Web Vitals Technology Report. This way they can configure the `wappalyzer`
|
|
44612
|
-
// to detect and properly classify live websites as being built with React Router:
|
|
44613
|
-
// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json
|
|
44614
|
-
const REACT_ROUTER_VERSION = "6";
|
|
44615
|
-
try {
|
|
44616
|
-
window.__reactRouterVersion = REACT_ROUTER_VERSION;
|
|
44617
|
-
} catch (e) {
|
|
44618
|
-
// no-op
|
|
44619
|
-
}
|
|
44620
|
-
const ViewTransitionContext = /*#__PURE__*/React$5.createContext({
|
|
44621
|
-
isTransitioning: false
|
|
44622
|
-
});
|
|
44623
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44624
|
-
ViewTransitionContext.displayName = "ViewTransition";
|
|
44625
|
-
}
|
|
44626
|
-
const FetchersContext = /*#__PURE__*/React$5.createContext(new Map());
|
|
44627
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44628
|
-
FetchersContext.displayName = "Fetchers";
|
|
44629
|
-
}
|
|
44630
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
44631
|
-
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
44632
|
-
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
44633
|
-
/**
|
|
44634
|
-
* The public API for rendering a history-aware `<a>`.
|
|
44635
|
-
*/
|
|
44636
|
-
const Link = /*#__PURE__*/React$5.forwardRef(function LinkWithRef(_ref7, ref) {
|
|
44637
|
-
let {
|
|
44638
|
-
onClick,
|
|
44639
|
-
relative,
|
|
44640
|
-
reloadDocument,
|
|
44641
|
-
replace,
|
|
44642
|
-
state,
|
|
44643
|
-
target,
|
|
44644
|
-
to,
|
|
44645
|
-
preventScrollReset,
|
|
44646
|
-
viewTransition
|
|
44647
|
-
} = _ref7,
|
|
44648
|
-
rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
44649
|
-
let {
|
|
44650
|
-
basename
|
|
44651
|
-
} = React$5.useContext(NavigationContext);
|
|
44652
|
-
// Rendered into <a href> for absolute URLs
|
|
44653
|
-
let absoluteHref;
|
|
44654
|
-
let isExternal = false;
|
|
44655
|
-
if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {
|
|
44656
|
-
// Render the absolute href server- and client-side
|
|
44657
|
-
absoluteHref = to;
|
|
44658
|
-
// Only check for external origins client-side
|
|
44659
|
-
if (isBrowser) {
|
|
44660
|
-
try {
|
|
44661
|
-
let currentUrl = new URL(window.location.href);
|
|
44662
|
-
let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
|
|
44663
|
-
let path = stripBasename(targetUrl.pathname, basename);
|
|
44664
|
-
if (targetUrl.origin === currentUrl.origin && path != null) {
|
|
44665
|
-
// Strip the protocol/origin/basename for same-origin absolute URLs
|
|
44666
|
-
to = path + targetUrl.search + targetUrl.hash;
|
|
44667
|
-
} else {
|
|
44668
|
-
isExternal = true;
|
|
44669
|
-
}
|
|
44670
|
-
} catch (e) {
|
|
44671
|
-
// We can't do external URL detection without a valid URL
|
|
44672
|
-
process.env.NODE_ENV !== "production" ? warning(false, "<Link to=\"" + to + "\"> contains an invalid URL which will probably break " + "when clicked - please update to a valid URL path.") : void 0;
|
|
44673
|
-
}
|
|
44674
|
-
}
|
|
44675
|
-
}
|
|
44676
|
-
// Rendered into <a href> for relative URLs
|
|
44677
|
-
let href = useHref(to, {
|
|
44678
|
-
relative
|
|
44679
|
-
});
|
|
44680
|
-
let internalOnClick = useLinkClickHandler(to, {
|
|
44681
|
-
replace,
|
|
44682
|
-
state,
|
|
44683
|
-
target,
|
|
44684
|
-
preventScrollReset,
|
|
44685
|
-
relative,
|
|
44686
|
-
viewTransition
|
|
44687
|
-
});
|
|
44688
|
-
function handleClick(event) {
|
|
44689
|
-
if (onClick) onClick(event);
|
|
44690
|
-
if (!event.defaultPrevented) {
|
|
44691
|
-
internalOnClick(event);
|
|
44692
|
-
}
|
|
44693
|
-
}
|
|
44694
|
-
return (
|
|
44695
|
-
/*#__PURE__*/
|
|
44696
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
44697
|
-
React$5.createElement("a", _extends$1({}, rest, {
|
|
44698
|
-
href: absoluteHref || href,
|
|
44699
|
-
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
44700
|
-
ref: ref,
|
|
44701
|
-
target: target
|
|
44702
|
-
}))
|
|
44703
|
-
);
|
|
44704
|
-
});
|
|
44705
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44706
|
-
Link.displayName = "Link";
|
|
44707
|
-
}
|
|
44708
|
-
/**
|
|
44709
|
-
* A `<Link>` wrapper that knows if it's "active" or not.
|
|
44710
|
-
*/
|
|
44711
|
-
const NavLink = /*#__PURE__*/React$5.forwardRef(function NavLinkWithRef(_ref8, ref) {
|
|
44712
|
-
let {
|
|
44713
|
-
"aria-current": ariaCurrentProp = "page",
|
|
44714
|
-
caseSensitive = false,
|
|
44715
|
-
className: classNameProp = "",
|
|
44716
|
-
end = false,
|
|
44717
|
-
style: styleProp,
|
|
44718
|
-
to,
|
|
44719
|
-
viewTransition,
|
|
44720
|
-
children
|
|
44721
|
-
} = _ref8,
|
|
44722
|
-
rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);
|
|
44723
|
-
let path = useResolvedPath(to, {
|
|
44724
|
-
relative: rest.relative
|
|
44725
|
-
});
|
|
44726
|
-
let location = useLocation();
|
|
44727
|
-
let routerState = React$5.useContext(DataRouterStateContext);
|
|
44728
|
-
let {
|
|
44729
|
-
navigator,
|
|
44730
|
-
basename
|
|
44731
|
-
} = React$5.useContext(NavigationContext);
|
|
44732
|
-
let isTransitioning = routerState != null &&
|
|
44733
|
-
// Conditional usage is OK here because the usage of a data router is static
|
|
44734
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44735
|
-
useViewTransitionState(path) && viewTransition === true;
|
|
44736
|
-
let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
|
|
44737
|
-
let locationPathname = location.pathname;
|
|
44738
|
-
let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
|
|
44739
|
-
if (!caseSensitive) {
|
|
44740
|
-
locationPathname = locationPathname.toLowerCase();
|
|
44741
|
-
nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
|
|
44742
|
-
toPathname = toPathname.toLowerCase();
|
|
44743
|
-
}
|
|
44744
|
-
if (nextLocationPathname && basename) {
|
|
44745
|
-
nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
|
|
44746
|
-
}
|
|
44747
|
-
// If the `to` has a trailing slash, look at that exact spot. Otherwise,
|
|
44748
|
-
// we're looking for a slash _after_ what's in `to`. For example:
|
|
44749
|
-
//
|
|
44750
|
-
// <NavLink to="/users"> and <NavLink to="/users/">
|
|
44751
|
-
// both want to look for a / at index 6 to match URL `/users/matt`
|
|
44752
|
-
const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
|
|
44753
|
-
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
|
|
44754
|
-
let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
|
|
44755
|
-
let renderProps = {
|
|
44756
|
-
isActive,
|
|
44757
|
-
isPending,
|
|
44758
|
-
isTransitioning
|
|
44759
|
-
};
|
|
44760
|
-
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
|
|
44761
|
-
let className;
|
|
44762
|
-
if (typeof classNameProp === "function") {
|
|
44763
|
-
className = classNameProp(renderProps);
|
|
44764
|
-
} else {
|
|
44765
|
-
// If the className prop is not a function, we use a default `active`
|
|
44766
|
-
// class for <NavLink />s that are active. In v5 `active` was the default
|
|
44767
|
-
// value for `activeClassName`, but we are removing that API and can still
|
|
44768
|
-
// use the old default behavior for a cleaner upgrade path and keep the
|
|
44769
|
-
// simple styling rules working as they currently do.
|
|
44770
|
-
className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
|
|
44771
|
-
}
|
|
44772
|
-
let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
|
|
44773
|
-
return /*#__PURE__*/React$5.createElement(Link, _extends$1({}, rest, {
|
|
44774
|
-
"aria-current": ariaCurrent,
|
|
44775
|
-
className: className,
|
|
44776
|
-
ref: ref,
|
|
44777
|
-
style: style,
|
|
44778
|
-
to: to,
|
|
44779
|
-
viewTransition: viewTransition
|
|
44780
|
-
}), typeof children === "function" ? children(renderProps) : children);
|
|
44781
|
-
});
|
|
44782
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44783
|
-
NavLink.displayName = "NavLink";
|
|
44784
|
-
}
|
|
44785
|
-
/**
|
|
44786
|
-
* A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
|
|
44787
|
-
* that the interaction with the server is with `fetch` instead of new document
|
|
44788
|
-
* requests, allowing components to add nicer UX to the page as the form is
|
|
44789
|
-
* submitted and returns with data.
|
|
44790
|
-
*/
|
|
44791
|
-
const Form = /*#__PURE__*/React$5.forwardRef((_ref9, forwardedRef) => {
|
|
44792
|
-
let {
|
|
44793
|
-
fetcherKey,
|
|
44794
|
-
navigate,
|
|
44795
|
-
reloadDocument,
|
|
44796
|
-
replace,
|
|
44797
|
-
state,
|
|
44798
|
-
method = defaultMethod,
|
|
44799
|
-
action,
|
|
44800
|
-
onSubmit,
|
|
44801
|
-
relative,
|
|
44802
|
-
preventScrollReset,
|
|
44803
|
-
viewTransition
|
|
44804
|
-
} = _ref9,
|
|
44805
|
-
props = _objectWithoutPropertiesLoose(_ref9, _excluded3);
|
|
44806
|
-
let submit = useSubmit();
|
|
44807
|
-
let formAction = useFormAction(action, {
|
|
44808
|
-
relative
|
|
44809
|
-
});
|
|
44810
|
-
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
44811
|
-
let submitHandler = event => {
|
|
44812
|
-
onSubmit && onSubmit(event);
|
|
44813
|
-
if (event.defaultPrevented) return;
|
|
44814
|
-
event.preventDefault();
|
|
44815
|
-
let submitter = event.nativeEvent.submitter;
|
|
44816
|
-
let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;
|
|
44817
|
-
submit(submitter || event.currentTarget, {
|
|
44818
|
-
fetcherKey,
|
|
44819
|
-
method: submitMethod,
|
|
44820
|
-
navigate,
|
|
44821
|
-
replace,
|
|
44822
|
-
state,
|
|
44823
|
-
relative,
|
|
44824
|
-
preventScrollReset,
|
|
44825
|
-
viewTransition
|
|
44826
|
-
});
|
|
44827
|
-
};
|
|
44828
|
-
return /*#__PURE__*/React$5.createElement("form", _extends$1({
|
|
44829
|
-
ref: forwardedRef,
|
|
44830
|
-
method: formMethod,
|
|
44831
|
-
action: formAction,
|
|
44832
|
-
onSubmit: reloadDocument ? onSubmit : submitHandler
|
|
44833
|
-
}, props));
|
|
44834
|
-
});
|
|
44835
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44836
|
-
Form.displayName = "Form";
|
|
44837
|
-
}
|
|
44838
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
44839
|
-
//#endregion
|
|
44840
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
44841
|
-
//#region Hooks
|
|
44842
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
44843
|
-
var DataRouterHook;
|
|
44844
|
-
(function (DataRouterHook) {
|
|
44845
|
-
DataRouterHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
44846
|
-
DataRouterHook["UseSubmit"] = "useSubmit";
|
|
44847
|
-
DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher";
|
|
44848
|
-
DataRouterHook["UseFetcher"] = "useFetcher";
|
|
44849
|
-
DataRouterHook["useViewTransitionState"] = "useViewTransitionState";
|
|
44850
|
-
})(DataRouterHook || (DataRouterHook = {}));
|
|
44851
|
-
var DataRouterStateHook;
|
|
44852
|
-
(function (DataRouterStateHook) {
|
|
44853
|
-
DataRouterStateHook["UseFetcher"] = "useFetcher";
|
|
44854
|
-
DataRouterStateHook["UseFetchers"] = "useFetchers";
|
|
44855
|
-
DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
44856
|
-
})(DataRouterStateHook || (DataRouterStateHook = {}));
|
|
44857
|
-
// Internal hooks
|
|
44858
|
-
function getDataRouterConsoleError(hookName) {
|
|
44859
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
44860
|
-
}
|
|
44861
|
-
function useDataRouterContext(hookName) {
|
|
44862
|
-
let ctx = React$5.useContext(DataRouterContext);
|
|
44863
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
|
|
44864
|
-
return ctx;
|
|
44865
|
-
}
|
|
44866
|
-
// External hooks
|
|
44867
|
-
/**
|
|
44868
|
-
* Handles the click behavior for router `<Link>` components. This is useful if
|
|
44869
|
-
* you need to create custom `<Link>` components with the same click behavior we
|
|
44870
|
-
* use in our exported `<Link>`.
|
|
44871
|
-
*/
|
|
44872
|
-
function useLinkClickHandler(to, _temp) {
|
|
44873
|
-
let {
|
|
44874
|
-
target,
|
|
44875
|
-
replace: replaceProp,
|
|
44876
|
-
state,
|
|
44877
|
-
preventScrollReset,
|
|
44878
|
-
relative,
|
|
44879
|
-
viewTransition
|
|
44880
|
-
} = _temp === void 0 ? {} : _temp;
|
|
44881
|
-
let navigate = useNavigate();
|
|
44882
|
-
let location = useLocation();
|
|
44883
|
-
let path = useResolvedPath(to, {
|
|
44884
|
-
relative
|
|
44885
|
-
});
|
|
44886
|
-
return React$5.useCallback(event => {
|
|
44887
|
-
if (shouldProcessLinkClick(event, target)) {
|
|
44888
|
-
event.preventDefault();
|
|
44889
|
-
// If the URL hasn't changed, a regular <a> will do a replace instead of
|
|
44890
|
-
// a push, so do the same here unless the replace prop is explicitly set
|
|
44891
|
-
let replace = replaceProp !== undefined ? replaceProp : createPath(location) === createPath(path);
|
|
44892
|
-
navigate(to, {
|
|
44893
|
-
replace,
|
|
44894
|
-
state,
|
|
44895
|
-
preventScrollReset,
|
|
44896
|
-
relative,
|
|
44897
|
-
viewTransition
|
|
44898
|
-
});
|
|
44899
|
-
}
|
|
44900
|
-
}, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]);
|
|
44901
|
-
}
|
|
44902
|
-
function validateClientSideSubmission() {
|
|
44903
|
-
if (typeof document === "undefined") {
|
|
44904
|
-
throw new Error("You are calling submit during the server render. " + "Try calling submit within a `useEffect` or callback instead.");
|
|
44905
|
-
}
|
|
44906
|
-
}
|
|
44907
|
-
let fetcherId = 0;
|
|
44908
|
-
let getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";
|
|
44909
|
-
/**
|
|
44910
|
-
* Returns a function that may be used to programmatically submit a form (or
|
|
44911
|
-
* some arbitrary data) to the server.
|
|
44912
|
-
*/
|
|
44913
|
-
function useSubmit() {
|
|
44914
|
-
let {
|
|
44915
|
-
router
|
|
44916
|
-
} = useDataRouterContext(DataRouterHook.UseSubmit);
|
|
44917
|
-
let {
|
|
44918
|
-
basename
|
|
44919
|
-
} = React$5.useContext(NavigationContext);
|
|
44920
|
-
let currentRouteId = useRouteId();
|
|
44921
|
-
return React$5.useCallback(function (target, options) {
|
|
44922
|
-
if (options === void 0) {
|
|
44923
|
-
options = {};
|
|
44924
|
-
}
|
|
44925
|
-
validateClientSideSubmission();
|
|
44926
|
-
let {
|
|
44927
|
-
action,
|
|
44928
|
-
method,
|
|
44929
|
-
encType,
|
|
44930
|
-
formData,
|
|
44931
|
-
body
|
|
44932
|
-
} = getFormSubmissionInfo(target, basename);
|
|
44933
|
-
if (options.navigate === false) {
|
|
44934
|
-
let key = options.fetcherKey || getUniqueFetcherId();
|
|
44935
|
-
router.fetch(key, currentRouteId, options.action || action, {
|
|
44936
|
-
preventScrollReset: options.preventScrollReset,
|
|
44937
|
-
formData,
|
|
44938
|
-
body,
|
|
44939
|
-
formMethod: options.method || method,
|
|
44940
|
-
formEncType: options.encType || encType,
|
|
44941
|
-
flushSync: options.flushSync
|
|
44942
|
-
});
|
|
44943
|
-
} else {
|
|
44944
|
-
router.navigate(options.action || action, {
|
|
44945
|
-
preventScrollReset: options.preventScrollReset,
|
|
44946
|
-
formData,
|
|
44947
|
-
body,
|
|
44948
|
-
formMethod: options.method || method,
|
|
44949
|
-
formEncType: options.encType || encType,
|
|
44950
|
-
replace: options.replace,
|
|
44951
|
-
state: options.state,
|
|
44952
|
-
fromRouteId: currentRouteId,
|
|
44953
|
-
flushSync: options.flushSync,
|
|
44954
|
-
viewTransition: options.viewTransition
|
|
44955
|
-
});
|
|
44956
|
-
}
|
|
44957
|
-
}, [router, basename, currentRouteId]);
|
|
44958
|
-
}
|
|
44959
|
-
// v7: Eventually we should deprecate this entirely in favor of using the
|
|
44960
|
-
// router method directly?
|
|
44961
|
-
function useFormAction(action, _temp2) {
|
|
44962
|
-
let {
|
|
44963
|
-
relative
|
|
44964
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
44965
|
-
let {
|
|
44966
|
-
basename
|
|
44967
|
-
} = React$5.useContext(NavigationContext);
|
|
44968
|
-
let routeContext = React$5.useContext(RouteContext);
|
|
44969
|
-
!routeContext ? process.env.NODE_ENV !== "production" ? invariant(false, "useFormAction must be used inside a RouteContext") : invariant(false) : void 0;
|
|
44970
|
-
let [match] = routeContext.matches.slice(-1);
|
|
44971
|
-
// Shallow clone path so we can modify it below, otherwise we modify the
|
|
44972
|
-
// object referenced by useMemo inside useResolvedPath
|
|
44973
|
-
let path = _extends$1({}, useResolvedPath(action ? action : ".", {
|
|
44974
|
-
relative
|
|
44975
|
-
}));
|
|
44976
|
-
// If no action was specified, browsers will persist current search params
|
|
44977
|
-
// when determining the path, so match that behavior
|
|
44978
|
-
// https://github.com/remix-run/remix/issues/927
|
|
44979
|
-
let location = useLocation();
|
|
44980
|
-
if (action == null) {
|
|
44981
|
-
// Safe to write to this directly here since if action was undefined, we
|
|
44982
|
-
// would have called useResolvedPath(".") which will never include a search
|
|
44983
|
-
path.search = location.search;
|
|
44984
|
-
// When grabbing search params from the URL, remove any included ?index param
|
|
44985
|
-
// since it might not apply to our contextual route. We add it back based
|
|
44986
|
-
// on match.route.index below
|
|
44987
|
-
let params = new URLSearchParams(path.search);
|
|
44988
|
-
let indexValues = params.getAll("index");
|
|
44989
|
-
let hasNakedIndexParam = indexValues.some(v => v === "");
|
|
44990
|
-
if (hasNakedIndexParam) {
|
|
44991
|
-
params.delete("index");
|
|
44992
|
-
indexValues.filter(v => v).forEach(v => params.append("index", v));
|
|
44993
|
-
let qs = params.toString();
|
|
44994
|
-
path.search = qs ? "?" + qs : "";
|
|
44995
|
-
}
|
|
44996
|
-
}
|
|
44997
|
-
if ((!action || action === ".") && match.route.index) {
|
|
44998
|
-
path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
|
|
44999
|
-
}
|
|
45000
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
45001
|
-
// to creating the form action. If this is a root navigation, then just use
|
|
45002
|
-
// the raw basename which allows the basename to have full control over the
|
|
45003
|
-
// presence of a trailing slash on root actions
|
|
45004
|
-
if (basename !== "/") {
|
|
45005
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
45006
|
-
}
|
|
45007
|
-
return createPath(path);
|
|
45008
|
-
}
|
|
45009
|
-
/**
|
|
45010
|
-
* Return a boolean indicating if there is an active view transition to the
|
|
45011
|
-
* given href. You can use this value to render CSS classes or viewTransitionName
|
|
45012
|
-
* styles onto your elements
|
|
45013
|
-
*
|
|
45014
|
-
* @param href The destination href
|
|
45015
|
-
* @param [opts.relative] Relative routing type ("route" | "path")
|
|
45016
|
-
*/
|
|
45017
|
-
function useViewTransitionState(to, opts) {
|
|
45018
|
-
if (opts === void 0) {
|
|
45019
|
-
opts = {};
|
|
45020
|
-
}
|
|
45021
|
-
let vtContext = React$5.useContext(ViewTransitionContext);
|
|
45022
|
-
!(vtContext != null) ? process.env.NODE_ENV !== "production" ? invariant(false, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : invariant(false) : void 0;
|
|
45023
|
-
let {
|
|
45024
|
-
basename
|
|
45025
|
-
} = useDataRouterContext(DataRouterHook.useViewTransitionState);
|
|
45026
|
-
let path = useResolvedPath(to, {
|
|
45027
|
-
relative: opts.relative
|
|
45028
|
-
});
|
|
45029
|
-
if (!vtContext.isTransitioning) {
|
|
45030
|
-
return false;
|
|
45031
|
-
}
|
|
45032
|
-
let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
45033
|
-
let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
45034
|
-
// Transition is active if we're going to or coming from the indicated
|
|
45035
|
-
// destination. This ensures that other PUSH navigations that reverse
|
|
45036
|
-
// an indicated transition apply. I.e., on the list view you have:
|
|
45037
|
-
//
|
|
45038
|
-
// <NavLink to="/details/1" viewTransition>
|
|
45039
|
-
//
|
|
45040
|
-
// If you click the breadcrumb back to the list view:
|
|
45041
|
-
//
|
|
45042
|
-
// <NavLink to="/list" viewTransition>
|
|
45043
|
-
//
|
|
45044
|
-
// We should apply the transition because it's indicated as active going
|
|
45045
|
-
// from /list -> /details/1 and therefore should be active on the reverse
|
|
45046
|
-
// (even though this isn't strictly a POP reverse)
|
|
45047
|
-
return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
|
|
45048
|
-
}
|
|
45049
|
-
|
|
45050
43146
|
const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }) => {
|
|
45051
43147
|
const navigate = useNavigate();
|
|
45052
43148
|
const [dataMenu, setDataMenu] = useState([]);
|