@sawport/react-sdk 0.1.0-alpha.32 → 0.1.0-alpha.35
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/index.js +1514 -1551
- package/dist/index.umd.js +10 -10
- package/dist/style.css +6 -1
- package/package.json +4 -7
package/dist/index.js
CHANGED
|
@@ -325,6 +325,7 @@ const SawportContext = react.exports.createContext({
|
|
|
325
325
|
config: sawportConfig,
|
|
326
326
|
setConfig: setSawportConfig
|
|
327
327
|
});
|
|
328
|
+
const bootstrap_min = "";
|
|
328
329
|
const style$1 = "";
|
|
329
330
|
const videoIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAbCAYAAADoOQYqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH0SURBVHgB7Zi7SyRBEMZrZ2fuhcfdcVxw2V12h6KBGAlmiqCxsWBkYCJi5l8g6H9gJBiYGwgGJuZiLiKIooY+Zufpr3ZWHcTHTiOWgh981NI1tftNdXVvV9fyPPdEZBL2w+/wCwyU+Hys+r0awCqbwJerYTjDXjNtMcatNsEfYZUhvMyy7NzzvAM+r+DbFxekaTqTGwDx6+IIzeCoGIDf7RNHqOgfYoNv4git2UiMQJXoUsnbebbRaPz3fX+c9fBTRV+KDZJ2BEdR1BMEwRQvOMbzXxnaVNGp2CB5yKG7FhvEEFmdRugAQ0GxeRXwxQ73ZhnB/+ByvV7vfSjQUnQTCBzELOZFgete/xv767EYc9HgI+wsT/9T8OQNwlw0C679FLdgLpoFJ1XxGjJdWcN7pl8K7wvRBS7lYf7nkiTJGae3w9aJT7N+Af8+FmMuGsEbmD+lds6jZEaYgQkpWsCOuzFaHtXn5xmhx1PtI2EDhvCCF1nFDuPugfPwuByjoj+LDZ5cgAjfhbN87IZz8Kg5Ti3tYLvk5REj6EOVAD1nx3HcqTWdiQ0qlyUvqY3DtpbHidjAuTdV0WtiAKZ6Sxzhk/IFvuBUir1RrxM6uEj5RH+m9RaUqNNZK9mbGyfipdWkXrN829S8aYKx3N407YVhuCSOuAIdERn11Abr9wAAAABJRU5ErkJggg==";
|
|
330
331
|
const closeIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAEAQAAAA5p3UDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAAAGAAAABgAPBrQs8AAAAHdElNRQflCh4AExuboZDiAAAEvUlEQVR42u2dwU4TURiFb41udANdEHSjK2ipAiIY4UncGWLiM+hTGNe+gHvjThJISHwAdacboxQQpu50Yee4mGhLkM78d6bz3//O+baU9vznnJk7vYWpc4QQQgghhBBCCCGEEEIIIYQQQiKkVcWTAJubzj186Fy77dyHD869fNlqJYn2cDEBtNvOPXniXK/nXJI49+pVq/XunbYuBzx7BgyHOMPBAdDpaGuLBaDTyTwdZzgEnj5VFra1dT58lqBK/h/+eAkePFAU9+IFJtLvswT+ZOH3+5M9fv68zGtcKiex3Z788/l55/b2gF6vbvOsAywuOrezk3k4idnZMq9TsgDv3+c/Zm7OubdvgW63apNiJfNqd9e5GzfyH/zxo6LQdvvi9el/ywFLkAfQ7eaf9sevs/LOwtMWnC4sAN++FRN8dIT09m1tk0MFWFwsfkAdHgJLS9qaM+EsQWnk4Qd2XcUS+CML/+gouPDPDsISyDyb9D7fUPijgViC4l5FFv5oMGkJ7tzR1ly/R5GGPxpQsq4dHzepBNGHPxqUJTjviTB860skSzDuRZG9/YjCHw3OEjQ2/JEBzS1B48M/a0SzSiDb2484/JEhzSmBLPzj4+jDHxkjLcHysrZm+YzS8O0W3dMgybqYJMC9e9qaC8+WLi8j/f6d4ecZFWEJGL7UsIhKwPA9iaEESFdWGH4JLJeA4VeE7Mo5SZCur6trZvjVYqkEDH9KWCiBPHx7exmqyK6oB4M6SyALP6zrFVOEWAJgdZXh10hIJQBWV4GTE4ZfM7JT7mCAdGOjcg0MXxfNEjD8QNAogTj8APYmoqbOEsjCr/edSKOpowQMP3CQrqzIAipeAoZvBHlQ9+/nP+fduwzfEFWWgOEbpYoSyMOvfq+BlEBWgh8/xkuQhX96yvCN41MChh8ZwNpathtXMFAMBsUemyTA2pr2fKQAsjMBj/woqa4EDN8ssiv7i8LP3zsgASO7yBvn7DsFYhh5CZoTfsl7BRMSOFwCGox/+CyBecqHzxKYpbrw/8K3g2ZAur5efHuXW8FRIf9ghx8GRYNP+P6/yxIERZnw/Z+DJQiCKoNjCYwxjcBYAiNMMyj5c/OPQ2uljqOUJQiUOk/RLEFgaKzPLEEgaAbBEigTQgAyDfw38coIIXw/LbxRRGlCPOpYgpoIMXxvbSyBjJDD99bIEhTDkrGWtJrAoqEyzbxl7IVYDN9PO28afQ7L4fvNwBL8I4bw/WZhCaJcP1kCGhX1bDSIM9IYzkpDODONmObskX2JdJPD9/Mgoq+RZ/i+XkRQAvnA8Ybv74nREjRmUHrTwAHpUQMHC8Er9HramqsdqMHhe3sWagkYvj/mS8Dwy2O2BGaFB4g5L4Fer/hNlvp9oNvVNjl0ZDe5OjgAbt3SE4v9fYZfPbISvHmjIxLXrgHDYb7Aw0P1U5VBii8Hv34hvXJFQeD168WO/E5H20yrFD8TzMzoCMTXr5PXJ4ZfltwSpJ8+6YnD48cMf/pMLsGjR7risL2N9PPnTMzPn8Dr10hv3tQ2LTaApSVgbw/4/Tvz+ssXYHtbW9eYwNlZpJcva+uIHeDqVaRzc9o6CCGEEEIIIYQQQgghhBBCCCGh8wd9J6YrJINzqgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0xMC0zMFQwMDoxOToyNyswMDowMJdQrwkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMTAtMzBUMDA6MTk6MjcrMDA6MDDmDRe1AAAAAElFTkSuQmCC";
|
|
@@ -1495,8 +1496,8 @@ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
|
|
|
1495
1496
|
function cloneDeep(value2) {
|
|
1496
1497
|
return baseClone$1(value2, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
1497
1498
|
}
|
|
1498
|
-
function _extends$
|
|
1499
|
-
_extends$
|
|
1499
|
+
function _extends$6() {
|
|
1500
|
+
_extends$6 = Object.assign || function(target) {
|
|
1500
1501
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
1501
1502
|
var source = arguments[i2];
|
|
1502
1503
|
for (var key2 in source) {
|
|
@@ -1507,14 +1508,14 @@ function _extends$7() {
|
|
|
1507
1508
|
}
|
|
1508
1509
|
return target;
|
|
1509
1510
|
};
|
|
1510
|
-
return _extends$
|
|
1511
|
+
return _extends$6.apply(this, arguments);
|
|
1511
1512
|
}
|
|
1512
|
-
function _inheritsLoose$
|
|
1513
|
+
function _inheritsLoose$2(subClass, superClass) {
|
|
1513
1514
|
subClass.prototype = Object.create(superClass.prototype);
|
|
1514
1515
|
subClass.prototype.constructor = subClass;
|
|
1515
1516
|
subClass.__proto__ = superClass;
|
|
1516
1517
|
}
|
|
1517
|
-
function _objectWithoutPropertiesLoose$
|
|
1518
|
+
function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
1518
1519
|
if (source == null)
|
|
1519
1520
|
return {};
|
|
1520
1521
|
var target = {};
|
|
@@ -1528,7 +1529,7 @@ function _objectWithoutPropertiesLoose$4(source, excluded) {
|
|
|
1528
1529
|
}
|
|
1529
1530
|
return target;
|
|
1530
1531
|
}
|
|
1531
|
-
function _assertThisInitialized$
|
|
1532
|
+
function _assertThisInitialized$1(self2) {
|
|
1532
1533
|
if (self2 === void 0) {
|
|
1533
1534
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1534
1535
|
}
|
|
@@ -1627,60 +1628,60 @@ function useFormikContext() {
|
|
|
1627
1628
|
function formikReducer(state, msg) {
|
|
1628
1629
|
switch (msg.type) {
|
|
1629
1630
|
case "SET_VALUES":
|
|
1630
|
-
return _extends$
|
|
1631
|
+
return _extends$6({}, state, {
|
|
1631
1632
|
values: msg.payload
|
|
1632
1633
|
});
|
|
1633
1634
|
case "SET_TOUCHED":
|
|
1634
|
-
return _extends$
|
|
1635
|
+
return _extends$6({}, state, {
|
|
1635
1636
|
touched: msg.payload
|
|
1636
1637
|
});
|
|
1637
1638
|
case "SET_ERRORS":
|
|
1638
1639
|
if (reactFastCompare(state.errors, msg.payload)) {
|
|
1639
1640
|
return state;
|
|
1640
1641
|
}
|
|
1641
|
-
return _extends$
|
|
1642
|
+
return _extends$6({}, state, {
|
|
1642
1643
|
errors: msg.payload
|
|
1643
1644
|
});
|
|
1644
1645
|
case "SET_STATUS":
|
|
1645
|
-
return _extends$
|
|
1646
|
+
return _extends$6({}, state, {
|
|
1646
1647
|
status: msg.payload
|
|
1647
1648
|
});
|
|
1648
1649
|
case "SET_ISSUBMITTING":
|
|
1649
|
-
return _extends$
|
|
1650
|
+
return _extends$6({}, state, {
|
|
1650
1651
|
isSubmitting: msg.payload
|
|
1651
1652
|
});
|
|
1652
1653
|
case "SET_ISVALIDATING":
|
|
1653
|
-
return _extends$
|
|
1654
|
+
return _extends$6({}, state, {
|
|
1654
1655
|
isValidating: msg.payload
|
|
1655
1656
|
});
|
|
1656
1657
|
case "SET_FIELD_VALUE":
|
|
1657
|
-
return _extends$
|
|
1658
|
+
return _extends$6({}, state, {
|
|
1658
1659
|
values: setIn(state.values, msg.payload.field, msg.payload.value)
|
|
1659
1660
|
});
|
|
1660
1661
|
case "SET_FIELD_TOUCHED":
|
|
1661
|
-
return _extends$
|
|
1662
|
+
return _extends$6({}, state, {
|
|
1662
1663
|
touched: setIn(state.touched, msg.payload.field, msg.payload.value)
|
|
1663
1664
|
});
|
|
1664
1665
|
case "SET_FIELD_ERROR":
|
|
1665
|
-
return _extends$
|
|
1666
|
+
return _extends$6({}, state, {
|
|
1666
1667
|
errors: setIn(state.errors, msg.payload.field, msg.payload.value)
|
|
1667
1668
|
});
|
|
1668
1669
|
case "RESET_FORM":
|
|
1669
|
-
return _extends$
|
|
1670
|
+
return _extends$6({}, state, msg.payload);
|
|
1670
1671
|
case "SET_FORMIK_STATE":
|
|
1671
1672
|
return msg.payload(state);
|
|
1672
1673
|
case "SUBMIT_ATTEMPT":
|
|
1673
|
-
return _extends$
|
|
1674
|
+
return _extends$6({}, state, {
|
|
1674
1675
|
touched: setNestedObjectValues(state.values, true),
|
|
1675
1676
|
isSubmitting: true,
|
|
1676
1677
|
submitCount: state.submitCount + 1
|
|
1677
1678
|
});
|
|
1678
1679
|
case "SUBMIT_FAILURE":
|
|
1679
|
-
return _extends$
|
|
1680
|
+
return _extends$6({}, state, {
|
|
1680
1681
|
isSubmitting: false
|
|
1681
1682
|
});
|
|
1682
1683
|
case "SUBMIT_SUCCESS":
|
|
1683
|
-
return _extends$
|
|
1684
|
+
return _extends$6({}, state, {
|
|
1684
1685
|
isSubmitting: false
|
|
1685
1686
|
});
|
|
1686
1687
|
default:
|
|
@@ -1690,8 +1691,8 @@ function formikReducer(state, msg) {
|
|
|
1690
1691
|
var emptyErrors = {};
|
|
1691
1692
|
var emptyTouched = {};
|
|
1692
1693
|
function useFormik(_ref) {
|
|
1693
|
-
var _ref$validateOnChange = _ref.validateOnChange, validateOnChange = _ref$validateOnChange === void 0 ? true : _ref$validateOnChange, _ref$validateOnBlur = _ref.validateOnBlur, validateOnBlur = _ref$validateOnBlur === void 0 ? true : _ref$validateOnBlur, _ref$validateOnMount = _ref.validateOnMount, validateOnMount = _ref$validateOnMount === void 0 ? false : _ref$validateOnMount, isInitialValid = _ref.isInitialValid, _ref$enableReinitiali = _ref.enableReinitialize, enableReinitialize = _ref$enableReinitiali === void 0 ? false : _ref$enableReinitiali, onSubmit = _ref.onSubmit, rest = _objectWithoutPropertiesLoose$
|
|
1694
|
-
var props = _extends$
|
|
1694
|
+
var _ref$validateOnChange = _ref.validateOnChange, validateOnChange = _ref$validateOnChange === void 0 ? true : _ref$validateOnChange, _ref$validateOnBlur = _ref.validateOnBlur, validateOnBlur = _ref$validateOnBlur === void 0 ? true : _ref$validateOnBlur, _ref$validateOnMount = _ref.validateOnMount, validateOnMount = _ref$validateOnMount === void 0 ? false : _ref$validateOnMount, isInitialValid = _ref.isInitialValid, _ref$enableReinitiali = _ref.enableReinitialize, enableReinitialize = _ref$enableReinitiali === void 0 ? false : _ref$enableReinitiali, onSubmit = _ref.onSubmit, rest = _objectWithoutPropertiesLoose$3(_ref, ["validateOnChange", "validateOnBlur", "validateOnMount", "isInitialValid", "enableReinitialize", "onSubmit"]);
|
|
1695
|
+
var props = _extends$6({
|
|
1695
1696
|
validateOnChange,
|
|
1696
1697
|
validateOnBlur,
|
|
1697
1698
|
validateOnMount,
|
|
@@ -2228,7 +2229,7 @@ function useFormik(_ref) {
|
|
|
2228
2229
|
var isValid2 = react.exports.useMemo(function() {
|
|
2229
2230
|
return typeof isInitialValid !== "undefined" ? dirty ? state.errors && Object.keys(state.errors).length === 0 : isInitialValid !== false && isFunction$8(isInitialValid) ? isInitialValid(props) : isInitialValid : state.errors && Object.keys(state.errors).length === 0;
|
|
2230
2231
|
}, [isInitialValid, dirty, state.errors, props]);
|
|
2231
|
-
var ctx = _extends$
|
|
2232
|
+
var ctx = _extends$6({}, state, {
|
|
2232
2233
|
initialValues: initialValues.current,
|
|
2233
2234
|
initialErrors: initialErrors.current,
|
|
2234
2235
|
initialTouched: initialTouched.current,
|
|
@@ -2398,7 +2399,7 @@ function useEventCallback(fn) {
|
|
|
2398
2399
|
}, []);
|
|
2399
2400
|
}
|
|
2400
2401
|
var Form$2 = /* @__PURE__ */ react.exports.forwardRef(function(props, ref) {
|
|
2401
|
-
var action = props.action, rest = _objectWithoutPropertiesLoose$
|
|
2402
|
+
var action = props.action, rest = _objectWithoutPropertiesLoose$3(props, ["action"]);
|
|
2402
2403
|
var _action = action != null ? action : "#";
|
|
2403
2404
|
var _useFormikContext = useFormikContext(), handleReset = _useFormikContext.handleReset, handleSubmit = _useFormikContext.handleSubmit;
|
|
2404
2405
|
return react.exports.createElement("form", Object.assign({
|
|
@@ -2444,13 +2445,13 @@ var copyArrayLike = function copyArrayLike2(arrayLike) {
|
|
|
2444
2445
|
}).reduce(function(max2, el2) {
|
|
2445
2446
|
return el2 > max2 ? el2 : max2;
|
|
2446
2447
|
}, 0);
|
|
2447
|
-
return Array.from(_extends$
|
|
2448
|
+
return Array.from(_extends$6({}, arrayLike, {
|
|
2448
2449
|
length: maxIndex + 1
|
|
2449
2450
|
}));
|
|
2450
2451
|
}
|
|
2451
2452
|
};
|
|
2452
2453
|
var FieldArrayInner = /* @__PURE__ */ function(_React$Component) {
|
|
2453
|
-
_inheritsLoose$
|
|
2454
|
+
_inheritsLoose$2(FieldArrayInner2, _React$Component);
|
|
2454
2455
|
function FieldArrayInner2(props) {
|
|
2455
2456
|
var _this;
|
|
2456
2457
|
_this = _React$Component.call(this, props) || this;
|
|
@@ -2468,7 +2469,7 @@ var FieldArrayInner = /* @__PURE__ */ function(_React$Component) {
|
|
|
2468
2469
|
if (isEmptyArray(fieldTouched)) {
|
|
2469
2470
|
fieldTouched = void 0;
|
|
2470
2471
|
}
|
|
2471
|
-
return _extends$
|
|
2472
|
+
return _extends$6({}, prevState, {
|
|
2472
2473
|
values,
|
|
2473
2474
|
errors: alterErrors ? setIn(prevState.errors, name, fieldError) : prevState.errors,
|
|
2474
2475
|
touched: alterTouched ? setIn(prevState.touched, name, fieldTouched) : prevState.touched
|
|
@@ -2567,8 +2568,8 @@ var FieldArrayInner = /* @__PURE__ */ function(_React$Component) {
|
|
|
2567
2568
|
return _this.pop();
|
|
2568
2569
|
};
|
|
2569
2570
|
};
|
|
2570
|
-
_this.remove = _this.remove.bind(_assertThisInitialized$
|
|
2571
|
-
_this.pop = _this.pop.bind(_assertThisInitialized$
|
|
2571
|
+
_this.remove = _this.remove.bind(_assertThisInitialized$1(_this));
|
|
2572
|
+
_this.pop = _this.pop.bind(_assertThisInitialized$1(_this));
|
|
2572
2573
|
return _this;
|
|
2573
2574
|
}
|
|
2574
2575
|
var _proto = FieldArrayInner2.prototype;
|
|
@@ -2629,8 +2630,8 @@ var FieldArrayInner = /* @__PURE__ */ function(_React$Component) {
|
|
|
2629
2630
|
handleUnshift: this.handleUnshift,
|
|
2630
2631
|
handleRemove: this.handleRemove
|
|
2631
2632
|
};
|
|
2632
|
-
var _this$props2 = this.props, component = _this$props2.component, render2 = _this$props2.render, children = _this$props2.children, name = _this$props2.name, _this$props2$formik = _this$props2.formik, restOfFormik = _objectWithoutPropertiesLoose$
|
|
2633
|
-
var props = _extends$
|
|
2633
|
+
var _this$props2 = this.props, component = _this$props2.component, render2 = _this$props2.render, children = _this$props2.children, name = _this$props2.name, _this$props2$formik = _this$props2.formik, restOfFormik = _objectWithoutPropertiesLoose$3(_this$props2$formik, ["validate", "validationSchema"]);
|
|
2634
|
+
var props = _extends$6({}, arrayHelpers, {
|
|
2634
2635
|
form: restOfFormik,
|
|
2635
2636
|
name
|
|
2636
2637
|
});
|
|
@@ -3339,8 +3340,8 @@ class Condition {
|
|
|
3339
3340
|
function toArray$2(value2) {
|
|
3340
3341
|
return value2 == null ? [] : [].concat(value2);
|
|
3341
3342
|
}
|
|
3342
|
-
function _extends$
|
|
3343
|
-
_extends$
|
|
3343
|
+
function _extends$5() {
|
|
3344
|
+
_extends$5 = Object.assign || function(target) {
|
|
3344
3345
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
3345
3346
|
var source = arguments[i2];
|
|
3346
3347
|
for (var key2 in source) {
|
|
@@ -3351,14 +3352,14 @@ function _extends$6() {
|
|
|
3351
3352
|
}
|
|
3352
3353
|
return target;
|
|
3353
3354
|
};
|
|
3354
|
-
return _extends$
|
|
3355
|
+
return _extends$5.apply(this, arguments);
|
|
3355
3356
|
}
|
|
3356
3357
|
let strReg = /\$\{\s*(\w+)\s*\}/g;
|
|
3357
3358
|
class ValidationError extends Error {
|
|
3358
3359
|
static formatError(message, params) {
|
|
3359
3360
|
const path2 = params.label || params.path || "this";
|
|
3360
3361
|
if (path2 !== params.path)
|
|
3361
|
-
params = _extends$
|
|
3362
|
+
params = _extends$5({}, params, {
|
|
3362
3363
|
path: path2
|
|
3363
3364
|
});
|
|
3364
3365
|
if (typeof message === "string")
|
|
@@ -3461,8 +3462,8 @@ var defineProperty$c = function() {
|
|
|
3461
3462
|
} catch (e2) {
|
|
3462
3463
|
}
|
|
3463
3464
|
}();
|
|
3464
|
-
var _defineProperty$
|
|
3465
|
-
var defineProperty$b = _defineProperty$
|
|
3465
|
+
var _defineProperty$1 = defineProperty$c;
|
|
3466
|
+
var defineProperty$b = _defineProperty$1;
|
|
3466
3467
|
function baseAssignValue$2(object2, key2, value2) {
|
|
3467
3468
|
if (key2 == "__proto__" && defineProperty$b) {
|
|
3468
3469
|
defineProperty$b(object2, key2, {
|
|
@@ -4299,8 +4300,8 @@ class Reference {
|
|
|
4299
4300
|
}
|
|
4300
4301
|
}
|
|
4301
4302
|
Reference.prototype.__isYupRef = true;
|
|
4302
|
-
function _extends$
|
|
4303
|
-
_extends$
|
|
4303
|
+
function _extends$4() {
|
|
4304
|
+
_extends$4 = Object.assign || function(target) {
|
|
4304
4305
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
4305
4306
|
var source = arguments[i2];
|
|
4306
4307
|
for (var key2 in source) {
|
|
@@ -4311,9 +4312,9 @@ function _extends$5() {
|
|
|
4311
4312
|
}
|
|
4312
4313
|
return target;
|
|
4313
4314
|
};
|
|
4314
|
-
return _extends$
|
|
4315
|
+
return _extends$4.apply(this, arguments);
|
|
4315
4316
|
}
|
|
4316
|
-
function _objectWithoutPropertiesLoose$
|
|
4317
|
+
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
4317
4318
|
if (source == null)
|
|
4318
4319
|
return {};
|
|
4319
4320
|
var target = {};
|
|
@@ -4336,7 +4337,7 @@ function createValidation(config) {
|
|
|
4336
4337
|
options,
|
|
4337
4338
|
originalValue,
|
|
4338
4339
|
sync
|
|
4339
|
-
} = _ref, rest = _objectWithoutPropertiesLoose$
|
|
4340
|
+
} = _ref, rest = _objectWithoutPropertiesLoose$2(_ref, ["value", "path", "label", "options", "originalValue", "sync"]);
|
|
4340
4341
|
const {
|
|
4341
4342
|
name,
|
|
4342
4343
|
test: test2,
|
|
@@ -4351,7 +4352,7 @@ function createValidation(config) {
|
|
|
4351
4352
|
return Reference.isRef(item) ? item.getValue(value2, parent2, context) : item;
|
|
4352
4353
|
}
|
|
4353
4354
|
function createError(overrides = {}) {
|
|
4354
|
-
const nextParams = mapValues_1(_extends$
|
|
4355
|
+
const nextParams = mapValues_1(_extends$4({
|
|
4355
4356
|
value: value2,
|
|
4356
4357
|
originalValue,
|
|
4357
4358
|
label,
|
|
@@ -4361,7 +4362,7 @@ function createValidation(config) {
|
|
|
4361
4362
|
error.params = nextParams;
|
|
4362
4363
|
return error;
|
|
4363
4364
|
}
|
|
4364
|
-
let ctx = _extends$
|
|
4365
|
+
let ctx = _extends$4({
|
|
4365
4366
|
path: path2,
|
|
4366
4367
|
parent: parent2,
|
|
4367
4368
|
type: name,
|
|
@@ -4492,8 +4493,8 @@ class ReferenceSet {
|
|
|
4492
4493
|
return next;
|
|
4493
4494
|
}
|
|
4494
4495
|
}
|
|
4495
|
-
function _extends$
|
|
4496
|
-
_extends$
|
|
4496
|
+
function _extends$3() {
|
|
4497
|
+
_extends$3 = Object.assign || function(target) {
|
|
4497
4498
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
4498
4499
|
var source = arguments[i2];
|
|
4499
4500
|
for (var key2 in source) {
|
|
@@ -4504,7 +4505,7 @@ function _extends$4() {
|
|
|
4504
4505
|
}
|
|
4505
4506
|
return target;
|
|
4506
4507
|
};
|
|
4507
|
-
return _extends$
|
|
4508
|
+
return _extends$3.apply(this, arguments);
|
|
4508
4509
|
}
|
|
4509
4510
|
class BaseSchema {
|
|
4510
4511
|
constructor(options) {
|
|
@@ -4524,7 +4525,7 @@ class BaseSchema {
|
|
|
4524
4525
|
this.typeError(mixed.notType);
|
|
4525
4526
|
});
|
|
4526
4527
|
this.type = (options == null ? void 0 : options.type) || "mixed";
|
|
4527
|
-
this.spec = _extends$
|
|
4528
|
+
this.spec = _extends$3({
|
|
4528
4529
|
strip: false,
|
|
4529
4530
|
strict: false,
|
|
4530
4531
|
abortEarly: true,
|
|
@@ -4552,12 +4553,12 @@ class BaseSchema {
|
|
|
4552
4553
|
next._blacklistError = this._blacklistError;
|
|
4553
4554
|
next._whitelist = this._whitelist.clone();
|
|
4554
4555
|
next._blacklist = this._blacklist.clone();
|
|
4555
|
-
next.exclusiveTests = _extends$
|
|
4556
|
+
next.exclusiveTests = _extends$3({}, this.exclusiveTests);
|
|
4556
4557
|
next.deps = [...this.deps];
|
|
4557
4558
|
next.conditions = [...this.conditions];
|
|
4558
4559
|
next.tests = [...this.tests];
|
|
4559
4560
|
next.transforms = [...this.transforms];
|
|
4560
|
-
next.spec = clone$2(_extends$
|
|
4561
|
+
next.spec = clone$2(_extends$3({}, this.spec, spec));
|
|
4561
4562
|
return next;
|
|
4562
4563
|
}
|
|
4563
4564
|
label(label) {
|
|
@@ -4586,7 +4587,7 @@ class BaseSchema {
|
|
|
4586
4587
|
throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema.type}`);
|
|
4587
4588
|
let base = this;
|
|
4588
4589
|
let combined = schema.clone();
|
|
4589
|
-
const mergedSpec = _extends$
|
|
4590
|
+
const mergedSpec = _extends$3({}, base.spec, combined.spec);
|
|
4590
4591
|
combined.spec = mergedSpec;
|
|
4591
4592
|
combined._typeError || (combined._typeError = base._typeError);
|
|
4592
4593
|
combined._whitelistError || (combined._whitelistError = base._whitelistError);
|
|
@@ -4620,7 +4621,7 @@ class BaseSchema {
|
|
|
4620
4621
|
return schema;
|
|
4621
4622
|
}
|
|
4622
4623
|
cast(value2, options = {}) {
|
|
4623
|
-
let resolvedSchema = this.resolve(_extends$
|
|
4624
|
+
let resolvedSchema = this.resolve(_extends$3({
|
|
4624
4625
|
value: value2
|
|
4625
4626
|
}, options));
|
|
4626
4627
|
let result = resolvedSchema._cast(value2, options);
|
|
@@ -4652,7 +4653,7 @@ attempted value: ${formattedValue}
|
|
|
4652
4653
|
} = options;
|
|
4653
4654
|
let value2 = _value;
|
|
4654
4655
|
if (!strict) {
|
|
4655
|
-
value2 = this._cast(value2, _extends$
|
|
4656
|
+
value2 = this._cast(value2, _extends$3({
|
|
4656
4657
|
assert: false
|
|
4657
4658
|
}, options));
|
|
4658
4659
|
}
|
|
@@ -4695,7 +4696,7 @@ attempted value: ${formattedValue}
|
|
|
4695
4696
|
});
|
|
4696
4697
|
}
|
|
4697
4698
|
validate(value2, options, maybeCb) {
|
|
4698
|
-
let schema = this.resolve(_extends$
|
|
4699
|
+
let schema = this.resolve(_extends$3({}, options, {
|
|
4699
4700
|
value: value2
|
|
4700
4701
|
}));
|
|
4701
4702
|
return typeof maybeCb === "function" ? schema._validate(value2, options, maybeCb) : new Promise((resolve, reject) => schema._validate(value2, options, (err, value3) => {
|
|
@@ -4706,11 +4707,11 @@ attempted value: ${formattedValue}
|
|
|
4706
4707
|
}));
|
|
4707
4708
|
}
|
|
4708
4709
|
validateSync(value2, options) {
|
|
4709
|
-
let schema = this.resolve(_extends$
|
|
4710
|
+
let schema = this.resolve(_extends$3({}, options, {
|
|
4710
4711
|
value: value2
|
|
4711
4712
|
}));
|
|
4712
4713
|
let result;
|
|
4713
|
-
schema._validate(value2, _extends$
|
|
4714
|
+
schema._validate(value2, _extends$3({}, options, {
|
|
4714
4715
|
sync: true
|
|
4715
4716
|
}), (err, value3) => {
|
|
4716
4717
|
if (err)
|
|
@@ -4963,7 +4964,7 @@ for (const method2 of ["validate", "validateSync"])
|
|
|
4963
4964
|
parentPath,
|
|
4964
4965
|
schema
|
|
4965
4966
|
} = getIn(this, path2, value2, options.context);
|
|
4966
|
-
return schema[method2](parent2 && parent2[parentPath], _extends$
|
|
4967
|
+
return schema[method2](parent2 && parent2[parentPath], _extends$3({}, options, {
|
|
4967
4968
|
parent: parent2,
|
|
4968
4969
|
path: path2
|
|
4969
4970
|
}));
|
|
@@ -5788,8 +5789,8 @@ function sortByKeyOrder(keys5) {
|
|
|
5788
5789
|
return findIndex$1(keys5, a2) - findIndex$1(keys5, b2);
|
|
5789
5790
|
};
|
|
5790
5791
|
}
|
|
5791
|
-
function _extends$
|
|
5792
|
-
_extends$
|
|
5792
|
+
function _extends$2() {
|
|
5793
|
+
_extends$2 = Object.assign || function(target) {
|
|
5793
5794
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
5794
5795
|
var source = arguments[i2];
|
|
5795
5796
|
for (var key2 in source) {
|
|
@@ -5800,7 +5801,7 @@ function _extends$3() {
|
|
|
5800
5801
|
}
|
|
5801
5802
|
return target;
|
|
5802
5803
|
};
|
|
5803
|
-
return _extends$
|
|
5804
|
+
return _extends$2.apply(this, arguments);
|
|
5804
5805
|
}
|
|
5805
5806
|
let isObject$f = (obj) => Object.prototype.toString.call(obj) === "[object Object]";
|
|
5806
5807
|
function unknown(ctx, value2) {
|
|
@@ -5849,7 +5850,7 @@ class ObjectSchema extends BaseSchema {
|
|
|
5849
5850
|
let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;
|
|
5850
5851
|
let props = this._nodes.concat(Object.keys(value2).filter((v2) => this._nodes.indexOf(v2) === -1));
|
|
5851
5852
|
let intermediateValue = {};
|
|
5852
|
-
let innerOptions = _extends$
|
|
5853
|
+
let innerOptions = _extends$2({}, options, {
|
|
5853
5854
|
parent: intermediateValue,
|
|
5854
5855
|
__validating: options.__validating || false
|
|
5855
5856
|
});
|
|
@@ -5917,7 +5918,7 @@ class ObjectSchema extends BaseSchema {
|
|
|
5917
5918
|
let path2 = key2.indexOf(".") === -1 ? (opts.path ? `${opts.path}.` : "") + key2 : `${opts.path || ""}["${key2}"]`;
|
|
5918
5919
|
let field = this.fields[key2];
|
|
5919
5920
|
if (field && "validate" in field) {
|
|
5920
|
-
field.validate(value2[key2], _extends$
|
|
5921
|
+
field.validate(value2[key2], _extends$2({}, opts, {
|
|
5921
5922
|
path: path2,
|
|
5922
5923
|
from: from2,
|
|
5923
5924
|
strict: true,
|
|
@@ -5941,7 +5942,7 @@ class ObjectSchema extends BaseSchema {
|
|
|
5941
5942
|
}
|
|
5942
5943
|
clone(spec) {
|
|
5943
5944
|
const next = super.clone(spec);
|
|
5944
|
-
next.fields = _extends$
|
|
5945
|
+
next.fields = _extends$2({}, this.fields);
|
|
5945
5946
|
next._nodes = this._nodes;
|
|
5946
5947
|
next._excludedEdges = this._excludedEdges;
|
|
5947
5948
|
next._sortErrors = this._sortErrors;
|
|
@@ -6017,7 +6018,7 @@ class ObjectSchema extends BaseSchema {
|
|
|
6017
6018
|
return obj;
|
|
6018
6019
|
let newObj = obj;
|
|
6019
6020
|
if (has_1(obj, from2)) {
|
|
6020
|
-
newObj = _extends$
|
|
6021
|
+
newObj = _extends$2({}, obj);
|
|
6021
6022
|
if (!alias)
|
|
6022
6023
|
delete newObj[from2];
|
|
6023
6024
|
newObj[to2] = fromGetter(obj);
|
|
@@ -6073,8 +6074,8 @@ function create$1(spec) {
|
|
|
6073
6074
|
return new ObjectSchema(spec);
|
|
6074
6075
|
}
|
|
6075
6076
|
create$1.prototype = ObjectSchema.prototype;
|
|
6076
|
-
function _extends$
|
|
6077
|
-
_extends$
|
|
6077
|
+
function _extends$1() {
|
|
6078
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
6078
6079
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
6079
6080
|
var source = arguments[i2];
|
|
6080
6081
|
for (var key2 in source) {
|
|
@@ -6085,9 +6086,9 @@ function _extends$2() {
|
|
|
6085
6086
|
}
|
|
6086
6087
|
return target;
|
|
6087
6088
|
};
|
|
6088
|
-
return _extends$
|
|
6089
|
+
return _extends$1.apply(this, arguments);
|
|
6089
6090
|
}
|
|
6090
|
-
function _objectWithoutPropertiesLoose$
|
|
6091
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
6091
6092
|
if (source == null)
|
|
6092
6093
|
return {};
|
|
6093
6094
|
var target = {};
|
|
@@ -6246,10 +6247,10 @@ function mapToCssModules(className, cssModule) {
|
|
|
6246
6247
|
return cssModule[c2] || c2;
|
|
6247
6248
|
}).join(" ");
|
|
6248
6249
|
}
|
|
6249
|
-
function omit(obj,
|
|
6250
|
+
function omit(obj, omitKeys2) {
|
|
6250
6251
|
var result = {};
|
|
6251
6252
|
Object.keys(obj).forEach(function(key2) {
|
|
6252
|
-
if (
|
|
6253
|
+
if (omitKeys2.indexOf(key2) === -1) {
|
|
6253
6254
|
result[key2] = obj[key2];
|
|
6254
6255
|
}
|
|
6255
6256
|
});
|
|
@@ -6441,7 +6442,7 @@ var defaultProps$h = {
|
|
|
6441
6442
|
widths: rowColWidths
|
|
6442
6443
|
};
|
|
6443
6444
|
var Row = function Row2(props) {
|
|
6444
|
-
var className = props.className, cssModule = props.cssModule, noGutters = props.noGutters, Tag = props.tag, form = props.form, widths = props.widths, attributes = _objectWithoutPropertiesLoose$
|
|
6445
|
+
var className = props.className, cssModule = props.cssModule, noGutters = props.noGutters, Tag = props.tag, form = props.form, widths = props.widths, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$e);
|
|
6445
6446
|
var colClasses = [];
|
|
6446
6447
|
widths.forEach(function(colWidth, i2) {
|
|
6447
6448
|
var colSize = props[colWidth];
|
|
@@ -6493,7 +6494,7 @@ var getColumnSizeClass$1 = function getColumnSizeClass(isXs, colWidth, colSize)
|
|
|
6493
6494
|
return isXs ? "col-" + colSize : "col-" + colWidth + "-" + colSize;
|
|
6494
6495
|
};
|
|
6495
6496
|
var Col = function Col2(props) {
|
|
6496
|
-
var className = props.className, cssModule = props.cssModule, widths = props.widths, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$
|
|
6497
|
+
var className = props.className, cssModule = props.cssModule, widths = props.widths, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$d);
|
|
6497
6498
|
var colClasses = [];
|
|
6498
6499
|
widths.forEach(function(colWidth, i2) {
|
|
6499
6500
|
var columnProp = props[colWidth];
|
|
@@ -6524,23 +6525,23 @@ var Col = function Col2(props) {
|
|
|
6524
6525
|
Col.propTypes = propTypes$g;
|
|
6525
6526
|
Col.defaultProps = defaultProps$g;
|
|
6526
6527
|
const Col$1 = Col;
|
|
6527
|
-
function _assertThisInitialized
|
|
6528
|
+
function _assertThisInitialized(self2) {
|
|
6528
6529
|
if (self2 === void 0) {
|
|
6529
6530
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6530
6531
|
}
|
|
6531
6532
|
return self2;
|
|
6532
6533
|
}
|
|
6533
|
-
function _setPrototypeOf
|
|
6534
|
-
_setPrototypeOf
|
|
6534
|
+
function _setPrototypeOf(o2, p2) {
|
|
6535
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o3, p3) {
|
|
6535
6536
|
o3.__proto__ = p3;
|
|
6536
6537
|
return o3;
|
|
6537
6538
|
};
|
|
6538
|
-
return _setPrototypeOf
|
|
6539
|
+
return _setPrototypeOf(o2, p2);
|
|
6539
6540
|
}
|
|
6540
|
-
function _inheritsLoose$
|
|
6541
|
+
function _inheritsLoose$1(subClass, superClass) {
|
|
6541
6542
|
subClass.prototype = Object.create(superClass.prototype);
|
|
6542
6543
|
subClass.prototype.constructor = subClass;
|
|
6543
|
-
_setPrototypeOf
|
|
6544
|
+
_setPrototypeOf(subClass, superClass);
|
|
6544
6545
|
}
|
|
6545
6546
|
var _excluded$c = ["active", "aria-label", "block", "className", "close", "cssModule", "color", "outline", "size", "tag", "innerRef"];
|
|
6546
6547
|
var propTypes$f = {
|
|
@@ -6564,11 +6565,11 @@ var defaultProps$f = {
|
|
|
6564
6565
|
tag: "button"
|
|
6565
6566
|
};
|
|
6566
6567
|
var Button = /* @__PURE__ */ function(_React$Component) {
|
|
6567
|
-
_inheritsLoose$
|
|
6568
|
+
_inheritsLoose$1(Button2, _React$Component);
|
|
6568
6569
|
function Button2(props) {
|
|
6569
6570
|
var _this;
|
|
6570
6571
|
_this = _React$Component.call(this, props) || this;
|
|
6571
|
-
_this.onClick = _this.onClick.bind(_assertThisInitialized
|
|
6572
|
+
_this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
|
|
6572
6573
|
return _this;
|
|
6573
6574
|
}
|
|
6574
6575
|
var _proto = Button2.prototype;
|
|
@@ -6582,7 +6583,7 @@ var Button = /* @__PURE__ */ function(_React$Component) {
|
|
|
6582
6583
|
}
|
|
6583
6584
|
};
|
|
6584
6585
|
_proto.render = function render() {
|
|
6585
|
-
var _this$props = this.props, active = _this$props.active, ariaLabel = _this$props["aria-label"], block = _this$props.block, className = _this$props.className, close = _this$props.close, cssModule = _this$props.cssModule, color = _this$props.color, outline = _this$props.outline, size = _this$props.size, Tag = _this$props.tag, innerRef = _this$props.innerRef, attributes = _objectWithoutPropertiesLoose$
|
|
6586
|
+
var _this$props = this.props, active = _this$props.active, ariaLabel = _this$props["aria-label"], block = _this$props.block, className = _this$props.className, close = _this$props.close, cssModule = _this$props.cssModule, color = _this$props.color, outline = _this$props.outline, size = _this$props.size, Tag = _this$props.tag, innerRef = _this$props.innerRef, attributes = _objectWithoutPropertiesLoose$1(_this$props, _excluded$c);
|
|
6586
6587
|
if (close && typeof attributes.children === "undefined") {
|
|
6587
6588
|
attributes.children = /* @__PURE__ */ jsx("span", {
|
|
6588
6589
|
"aria-hidden": true,
|
|
@@ -6614,53 +6615,7 @@ var Button = /* @__PURE__ */ function(_React$Component) {
|
|
|
6614
6615
|
Button.propTypes = propTypes$f;
|
|
6615
6616
|
Button.defaultProps = defaultProps$f;
|
|
6616
6617
|
const Button$1 = Button;
|
|
6617
|
-
function
|
|
6618
|
-
if (source == null)
|
|
6619
|
-
return {};
|
|
6620
|
-
var target = {};
|
|
6621
|
-
var sourceKeys = Object.keys(source);
|
|
6622
|
-
var key2, i2;
|
|
6623
|
-
for (i2 = 0; i2 < sourceKeys.length; i2++) {
|
|
6624
|
-
key2 = sourceKeys[i2];
|
|
6625
|
-
if (excluded.indexOf(key2) >= 0)
|
|
6626
|
-
continue;
|
|
6627
|
-
target[key2] = source[key2];
|
|
6628
|
-
}
|
|
6629
|
-
return target;
|
|
6630
|
-
}
|
|
6631
|
-
function _extends$1() {
|
|
6632
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
6633
|
-
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
6634
|
-
var source = arguments[i2];
|
|
6635
|
-
for (var key2 in source) {
|
|
6636
|
-
if (Object.prototype.hasOwnProperty.call(source, key2)) {
|
|
6637
|
-
target[key2] = source[key2];
|
|
6638
|
-
}
|
|
6639
|
-
}
|
|
6640
|
-
}
|
|
6641
|
-
return target;
|
|
6642
|
-
};
|
|
6643
|
-
return _extends$1.apply(this, arguments);
|
|
6644
|
-
}
|
|
6645
|
-
function _setPrototypeOf(o2, p2) {
|
|
6646
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o3, p3) {
|
|
6647
|
-
o3.__proto__ = p3;
|
|
6648
|
-
return o3;
|
|
6649
|
-
};
|
|
6650
|
-
return _setPrototypeOf(o2, p2);
|
|
6651
|
-
}
|
|
6652
|
-
function _inheritsLoose$1(subClass, superClass) {
|
|
6653
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
6654
|
-
subClass.prototype.constructor = subClass;
|
|
6655
|
-
_setPrototypeOf(subClass, superClass);
|
|
6656
|
-
}
|
|
6657
|
-
function _assertThisInitialized(self2) {
|
|
6658
|
-
if (self2 === void 0) {
|
|
6659
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6660
|
-
}
|
|
6661
|
-
return self2;
|
|
6662
|
-
}
|
|
6663
|
-
function _defineProperty$1(obj, key2, value2) {
|
|
6618
|
+
function _defineProperty(obj, key2, value2) {
|
|
6664
6619
|
if (key2 in obj) {
|
|
6665
6620
|
Object.defineProperty(obj, key2, {
|
|
6666
6621
|
value: value2,
|
|
@@ -9149,24 +9104,24 @@ var InnerPopper = /* @__PURE__ */ function(_React$Component) {
|
|
|
9149
9104
|
args[_key] = arguments[_key];
|
|
9150
9105
|
}
|
|
9151
9106
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
9152
|
-
_defineProperty
|
|
9107
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
|
9153
9108
|
data: void 0,
|
|
9154
9109
|
placement: void 0
|
|
9155
9110
|
});
|
|
9156
|
-
_defineProperty
|
|
9157
|
-
_defineProperty
|
|
9158
|
-
_defineProperty
|
|
9159
|
-
_defineProperty
|
|
9111
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "popperInstance", void 0);
|
|
9112
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "popperNode", null);
|
|
9113
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "arrowNode", null);
|
|
9114
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "setPopperNode", function(popperNode) {
|
|
9160
9115
|
if (!popperNode || _this.popperNode === popperNode)
|
|
9161
9116
|
return;
|
|
9162
9117
|
setRef(_this.props.innerRef, popperNode);
|
|
9163
9118
|
_this.popperNode = popperNode;
|
|
9164
9119
|
_this.updatePopperInstance();
|
|
9165
9120
|
});
|
|
9166
|
-
_defineProperty
|
|
9121
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "setArrowNode", function(arrowNode) {
|
|
9167
9122
|
_this.arrowNode = arrowNode;
|
|
9168
9123
|
});
|
|
9169
|
-
_defineProperty
|
|
9124
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "updateStateModifier", {
|
|
9170
9125
|
enabled: true,
|
|
9171
9126
|
order: 900,
|
|
9172
9127
|
fn: function fn(data2) {
|
|
@@ -9178,7 +9133,7 @@ var InnerPopper = /* @__PURE__ */ function(_React$Component) {
|
|
|
9178
9133
|
return data2;
|
|
9179
9134
|
}
|
|
9180
9135
|
});
|
|
9181
|
-
_defineProperty
|
|
9136
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptions", function() {
|
|
9182
9137
|
return {
|
|
9183
9138
|
placement: _this.props.placement,
|
|
9184
9139
|
eventsEnabled: _this.props.eventsEnabled,
|
|
@@ -9195,27 +9150,27 @@ var InnerPopper = /* @__PURE__ */ function(_React$Component) {
|
|
|
9195
9150
|
})
|
|
9196
9151
|
};
|
|
9197
9152
|
});
|
|
9198
|
-
_defineProperty
|
|
9153
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getPopperStyle", function() {
|
|
9199
9154
|
return !_this.popperNode || !_this.state.data ? initialStyle : _extends$1({
|
|
9200
9155
|
position: _this.state.data.offsets.popper.position
|
|
9201
9156
|
}, _this.state.data.styles);
|
|
9202
9157
|
});
|
|
9203
|
-
_defineProperty
|
|
9158
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getPopperPlacement", function() {
|
|
9204
9159
|
return !_this.state.data ? void 0 : _this.state.placement;
|
|
9205
9160
|
});
|
|
9206
|
-
_defineProperty
|
|
9161
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getArrowStyle", function() {
|
|
9207
9162
|
return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;
|
|
9208
9163
|
});
|
|
9209
|
-
_defineProperty
|
|
9164
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOutOfBoundariesState", function() {
|
|
9210
9165
|
return _this.state.data ? _this.state.data.hide : void 0;
|
|
9211
9166
|
});
|
|
9212
|
-
_defineProperty
|
|
9167
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "destroyPopperInstance", function() {
|
|
9213
9168
|
if (!_this.popperInstance)
|
|
9214
9169
|
return;
|
|
9215
9170
|
_this.popperInstance.destroy();
|
|
9216
9171
|
_this.popperInstance = null;
|
|
9217
9172
|
});
|
|
9218
|
-
_defineProperty
|
|
9173
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "updatePopperInstance", function() {
|
|
9219
9174
|
_this.destroyPopperInstance();
|
|
9220
9175
|
var _assertThisInitialize = _assertThisInitialized(_assertThisInitialized(_this)), popperNode = _assertThisInitialize.popperNode;
|
|
9221
9176
|
var referenceElement = _this.props.referenceElement;
|
|
@@ -9223,7 +9178,7 @@ var InnerPopper = /* @__PURE__ */ function(_React$Component) {
|
|
|
9223
9178
|
return;
|
|
9224
9179
|
_this.popperInstance = new PopperJS(referenceElement, popperNode, _this.getOptions());
|
|
9225
9180
|
});
|
|
9226
|
-
_defineProperty
|
|
9181
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scheduleUpdate", function() {
|
|
9227
9182
|
if (_this.popperInstance) {
|
|
9228
9183
|
_this.popperInstance.scheduleUpdate();
|
|
9229
9184
|
}
|
|
@@ -9262,7 +9217,7 @@ var InnerPopper = /* @__PURE__ */ function(_React$Component) {
|
|
|
9262
9217
|
};
|
|
9263
9218
|
return InnerPopper2;
|
|
9264
9219
|
}(react.exports.Component);
|
|
9265
|
-
_defineProperty
|
|
9220
|
+
_defineProperty(InnerPopper, "defaultProps", {
|
|
9266
9221
|
placement: "bottom",
|
|
9267
9222
|
eventsEnabled: true,
|
|
9268
9223
|
referenceElement: void 0,
|
|
@@ -9280,19 +9235,6 @@ function Popper(_ref) {
|
|
|
9280
9235
|
}
|
|
9281
9236
|
});
|
|
9282
9237
|
}
|
|
9283
|
-
function _defineProperty(obj, key2, value2) {
|
|
9284
|
-
if (key2 in obj) {
|
|
9285
|
-
Object.defineProperty(obj, key2, {
|
|
9286
|
-
value: value2,
|
|
9287
|
-
enumerable: true,
|
|
9288
|
-
configurable: true,
|
|
9289
|
-
writable: true
|
|
9290
|
-
});
|
|
9291
|
-
} else {
|
|
9292
|
-
obj[key2] = value2;
|
|
9293
|
-
}
|
|
9294
|
-
return obj;
|
|
9295
|
-
}
|
|
9296
9238
|
var reactDom = { exports: {} };
|
|
9297
9239
|
var reactDom_production_min = {};
|
|
9298
9240
|
var scheduler = { exports: {} };
|
|
@@ -17510,7 +17452,7 @@ var reactTransitionGroup = {
|
|
|
17510
17452
|
CSSTransition: _CSSTransition.default
|
|
17511
17453
|
};
|
|
17512
17454
|
var _excluded$b = ["tag", "baseClass", "baseClassActive", "className", "cssModule", "children", "innerRef"];
|
|
17513
|
-
function ownKeys$
|
|
17455
|
+
function ownKeys$8(object2, enumerableOnly) {
|
|
17514
17456
|
var keys5 = Object.keys(object2);
|
|
17515
17457
|
if (Object.getOwnPropertySymbols) {
|
|
17516
17458
|
var symbols = Object.getOwnPropertySymbols(object2);
|
|
@@ -17523,24 +17465,24 @@ function ownKeys$7(object2, enumerableOnly) {
|
|
|
17523
17465
|
}
|
|
17524
17466
|
return keys5;
|
|
17525
17467
|
}
|
|
17526
|
-
function _objectSpread$
|
|
17468
|
+
function _objectSpread$6(target) {
|
|
17527
17469
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
17528
17470
|
var source = arguments[i2] != null ? arguments[i2] : {};
|
|
17529
17471
|
if (i2 % 2) {
|
|
17530
|
-
ownKeys$
|
|
17472
|
+
ownKeys$8(Object(source), true).forEach(function(key2) {
|
|
17531
17473
|
_defineProperty(target, key2, source[key2]);
|
|
17532
17474
|
});
|
|
17533
17475
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
17534
17476
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
17535
17477
|
} else {
|
|
17536
|
-
ownKeys$
|
|
17478
|
+
ownKeys$8(Object(source)).forEach(function(key2) {
|
|
17537
17479
|
Object.defineProperty(target, key2, Object.getOwnPropertyDescriptor(source, key2));
|
|
17538
17480
|
});
|
|
17539
17481
|
}
|
|
17540
17482
|
}
|
|
17541
17483
|
return target;
|
|
17542
17484
|
}
|
|
17543
|
-
var propTypes$e = _objectSpread$
|
|
17485
|
+
var propTypes$e = _objectSpread$6(_objectSpread$6({}, reactTransitionGroup.Transition.propTypes), {}, {
|
|
17544
17486
|
children: propTypes$i.exports.oneOfType([propTypes$i.exports.arrayOf(propTypes$i.exports.node), propTypes$i.exports.node]),
|
|
17545
17487
|
tag: tagPropType,
|
|
17546
17488
|
baseClass: propTypes$i.exports.string,
|
|
@@ -17549,7 +17491,7 @@ var propTypes$e = _objectSpread$5(_objectSpread$5({}, reactTransitionGroup.Trans
|
|
|
17549
17491
|
cssModule: propTypes$i.exports.object,
|
|
17550
17492
|
innerRef: propTypes$i.exports.oneOfType([propTypes$i.exports.object, propTypes$i.exports.string, propTypes$i.exports.func])
|
|
17551
17493
|
});
|
|
17552
|
-
var defaultProps$e = _objectSpread$
|
|
17494
|
+
var defaultProps$e = _objectSpread$6(_objectSpread$6({}, reactTransitionGroup.Transition.defaultProps), {}, {
|
|
17553
17495
|
tag: "div",
|
|
17554
17496
|
baseClass: "fade",
|
|
17555
17497
|
baseClassActive: "show",
|
|
@@ -17560,7 +17502,7 @@ var defaultProps$e = _objectSpread$5(_objectSpread$5({}, reactTransitionGroup.Tr
|
|
|
17560
17502
|
in: true
|
|
17561
17503
|
});
|
|
17562
17504
|
function Fade(props) {
|
|
17563
|
-
var Tag = props.tag, baseClass = props.baseClass, baseClassActive = props.baseClassActive, className = props.className, cssModule = props.cssModule, children = props.children, innerRef = props.innerRef, otherProps = _objectWithoutPropertiesLoose$
|
|
17505
|
+
var Tag = props.tag, baseClass = props.baseClass, baseClassActive = props.baseClassActive, className = props.className, cssModule = props.cssModule, children = props.children, innerRef = props.innerRef, otherProps = _objectWithoutPropertiesLoose$1(props, _excluded$b);
|
|
17564
17506
|
var transitionProps = pick$1(otherProps, TransitionPropTypeKeys);
|
|
17565
17507
|
var childProps = omit(otherProps, TransitionPropTypeKeys);
|
|
17566
17508
|
return /* @__PURE__ */ jsx(reactTransitionGroup.Transition, {
|
|
@@ -17595,7 +17537,7 @@ var defaultProps$d = {
|
|
|
17595
17537
|
tag: "span"
|
|
17596
17538
|
};
|
|
17597
17539
|
var Badge = function Badge2(props) {
|
|
17598
|
-
var className = props.className, cssModule = props.cssModule, color = props.color, innerRef = props.innerRef, pill = props.pill, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$
|
|
17540
|
+
var className = props.className, cssModule = props.cssModule, color = props.color, innerRef = props.innerRef, pill = props.pill, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$a);
|
|
17599
17541
|
var classes = mapToCssModules(classNames(className, "badge", "badge-" + color, pill ? "badge-pill" : false), cssModule);
|
|
17600
17542
|
if (attributes.href && Tag === "span") {
|
|
17601
17543
|
Tag = "a";
|
|
@@ -17610,7 +17552,7 @@ Badge.propTypes = propTypes$d;
|
|
|
17610
17552
|
Badge.defaultProps = defaultProps$d;
|
|
17611
17553
|
const Badge$1 = Badge;
|
|
17612
17554
|
var _excluded$9 = ["cssModule", "children", "isOpen", "flip", "target", "offset", "fallbackPlacement", "placementPrefix", "arrowClassName", "hideArrow", "popperClassName", "tag", "container", "modifiers", "positionFixed", "boundariesElement", "onClosed", "fade", "transition", "placement"];
|
|
17613
|
-
function ownKeys$
|
|
17555
|
+
function ownKeys$7(object2, enumerableOnly) {
|
|
17614
17556
|
var keys5 = Object.keys(object2);
|
|
17615
17557
|
if (Object.getOwnPropertySymbols) {
|
|
17616
17558
|
var symbols = Object.getOwnPropertySymbols(object2);
|
|
@@ -17623,17 +17565,17 @@ function ownKeys$6(object2, enumerableOnly) {
|
|
|
17623
17565
|
}
|
|
17624
17566
|
return keys5;
|
|
17625
17567
|
}
|
|
17626
|
-
function _objectSpread$
|
|
17568
|
+
function _objectSpread$5(target) {
|
|
17627
17569
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
17628
17570
|
var source = arguments[i2] != null ? arguments[i2] : {};
|
|
17629
17571
|
if (i2 % 2) {
|
|
17630
|
-
ownKeys$
|
|
17572
|
+
ownKeys$7(Object(source), true).forEach(function(key2) {
|
|
17631
17573
|
_defineProperty(target, key2, source[key2]);
|
|
17632
17574
|
});
|
|
17633
17575
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
17634
17576
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
17635
17577
|
} else {
|
|
17636
|
-
ownKeys$
|
|
17578
|
+
ownKeys$7(Object(source)).forEach(function(key2) {
|
|
17637
17579
|
Object.defineProperty(target, key2, Object.getOwnPropertyDescriptor(source, key2));
|
|
17638
17580
|
});
|
|
17639
17581
|
}
|
|
@@ -17676,17 +17618,17 @@ var defaultProps$c = {
|
|
|
17676
17618
|
modifiers: {},
|
|
17677
17619
|
onClosed: noop$3,
|
|
17678
17620
|
fade: true,
|
|
17679
|
-
transition: _objectSpread$
|
|
17621
|
+
transition: _objectSpread$5({}, Fade.defaultProps)
|
|
17680
17622
|
};
|
|
17681
17623
|
var PopperContent = /* @__PURE__ */ function(_React$Component) {
|
|
17682
|
-
_inheritsLoose$
|
|
17624
|
+
_inheritsLoose$1(PopperContent2, _React$Component);
|
|
17683
17625
|
function PopperContent2(props) {
|
|
17684
17626
|
var _this;
|
|
17685
17627
|
_this = _React$Component.call(this, props) || this;
|
|
17686
|
-
_this.setTargetNode = _this.setTargetNode.bind(_assertThisInitialized
|
|
17687
|
-
_this.getTargetNode = _this.getTargetNode.bind(_assertThisInitialized
|
|
17688
|
-
_this.getRef = _this.getRef.bind(_assertThisInitialized
|
|
17689
|
-
_this.onClosed = _this.onClosed.bind(_assertThisInitialized
|
|
17628
|
+
_this.setTargetNode = _this.setTargetNode.bind(_assertThisInitialized(_this));
|
|
17629
|
+
_this.getTargetNode = _this.getTargetNode.bind(_assertThisInitialized(_this));
|
|
17630
|
+
_this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
|
|
17631
|
+
_this.onClosed = _this.onClosed.bind(_assertThisInitialized(_this));
|
|
17690
17632
|
_this.state = {
|
|
17691
17633
|
isOpen: props.isOpen
|
|
17692
17634
|
};
|
|
@@ -17731,10 +17673,10 @@ var PopperContent = /* @__PURE__ */ function(_React$Component) {
|
|
|
17731
17673
|
_this$props.container;
|
|
17732
17674
|
var modifiers2 = _this$props.modifiers, positionFixed = _this$props.positionFixed, boundariesElement = _this$props.boundariesElement;
|
|
17733
17675
|
_this$props.onClosed;
|
|
17734
|
-
var fade = _this$props.fade, transition = _this$props.transition, placement = _this$props.placement, attrs = _objectWithoutPropertiesLoose$
|
|
17676
|
+
var fade = _this$props.fade, transition = _this$props.transition, placement = _this$props.placement, attrs = _objectWithoutPropertiesLoose$1(_this$props, _excluded$9);
|
|
17735
17677
|
var arrowClassName = mapToCssModules(classNames("arrow", _arrowClassName), cssModule);
|
|
17736
17678
|
var popperClassName = mapToCssModules(classNames(_popperClassName, placementPrefix ? placementPrefix + "-auto" : ""), this.props.cssModule);
|
|
17737
|
-
var extendedModifiers = _objectSpread$
|
|
17679
|
+
var extendedModifiers = _objectSpread$5({
|
|
17738
17680
|
offset: {
|
|
17739
17681
|
offset: offset2
|
|
17740
17682
|
},
|
|
@@ -17746,7 +17688,7 @@ var PopperContent = /* @__PURE__ */ function(_React$Component) {
|
|
|
17746
17688
|
boundariesElement
|
|
17747
17689
|
}
|
|
17748
17690
|
}, modifiers2);
|
|
17749
|
-
var popperTransition = _objectSpread$
|
|
17691
|
+
var popperTransition = _objectSpread$5(_objectSpread$5(_objectSpread$5({}, Fade.defaultProps), transition), {}, {
|
|
17750
17692
|
baseClass: fade ? transition.baseClass : "",
|
|
17751
17693
|
timeout: fade ? transition.timeout : 0
|
|
17752
17694
|
});
|
|
@@ -17854,24 +17796,24 @@ function isInDOMSubtrees(element, subtreeRoots) {
|
|
|
17854
17796
|
})[0];
|
|
17855
17797
|
}
|
|
17856
17798
|
var TooltipPopoverWrapper = /* @__PURE__ */ function(_React$Component) {
|
|
17857
|
-
_inheritsLoose$
|
|
17799
|
+
_inheritsLoose$1(TooltipPopoverWrapper2, _React$Component);
|
|
17858
17800
|
function TooltipPopoverWrapper2(props) {
|
|
17859
17801
|
var _this;
|
|
17860
17802
|
_this = _React$Component.call(this, props) || this;
|
|
17861
17803
|
_this._targets = [];
|
|
17862
17804
|
_this.currentTargetElement = null;
|
|
17863
|
-
_this.addTargetEvents = _this.addTargetEvents.bind(_assertThisInitialized
|
|
17864
|
-
_this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized
|
|
17865
|
-
_this.removeTargetEvents = _this.removeTargetEvents.bind(_assertThisInitialized
|
|
17866
|
-
_this.toggle = _this.toggle.bind(_assertThisInitialized
|
|
17867
|
-
_this.showWithDelay = _this.showWithDelay.bind(_assertThisInitialized
|
|
17868
|
-
_this.hideWithDelay = _this.hideWithDelay.bind(_assertThisInitialized
|
|
17869
|
-
_this.onMouseOverTooltipContent = _this.onMouseOverTooltipContent.bind(_assertThisInitialized
|
|
17870
|
-
_this.onMouseLeaveTooltipContent = _this.onMouseLeaveTooltipContent.bind(_assertThisInitialized
|
|
17871
|
-
_this.show = _this.show.bind(_assertThisInitialized
|
|
17872
|
-
_this.hide = _this.hide.bind(_assertThisInitialized
|
|
17873
|
-
_this.onEscKeyDown = _this.onEscKeyDown.bind(_assertThisInitialized
|
|
17874
|
-
_this.getRef = _this.getRef.bind(_assertThisInitialized
|
|
17805
|
+
_this.addTargetEvents = _this.addTargetEvents.bind(_assertThisInitialized(_this));
|
|
17806
|
+
_this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized(_this));
|
|
17807
|
+
_this.removeTargetEvents = _this.removeTargetEvents.bind(_assertThisInitialized(_this));
|
|
17808
|
+
_this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
|
|
17809
|
+
_this.showWithDelay = _this.showWithDelay.bind(_assertThisInitialized(_this));
|
|
17810
|
+
_this.hideWithDelay = _this.hideWithDelay.bind(_assertThisInitialized(_this));
|
|
17811
|
+
_this.onMouseOverTooltipContent = _this.onMouseOverTooltipContent.bind(_assertThisInitialized(_this));
|
|
17812
|
+
_this.onMouseLeaveTooltipContent = _this.onMouseLeaveTooltipContent.bind(_assertThisInitialized(_this));
|
|
17813
|
+
_this.show = _this.show.bind(_assertThisInitialized(_this));
|
|
17814
|
+
_this.hide = _this.hide.bind(_assertThisInitialized(_this));
|
|
17815
|
+
_this.onEscKeyDown = _this.onEscKeyDown.bind(_assertThisInitialized(_this));
|
|
17816
|
+
_this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
|
|
17875
17817
|
_this.state = {
|
|
17876
17818
|
isOpen: props.isOpen
|
|
17877
17819
|
};
|
|
@@ -18121,7 +18063,7 @@ var propTypes$a = {
|
|
|
18121
18063
|
node: propTypes$i.exports.any
|
|
18122
18064
|
};
|
|
18123
18065
|
var Portal = /* @__PURE__ */ function(_React$Component) {
|
|
18124
|
-
_inheritsLoose$
|
|
18066
|
+
_inheritsLoose$1(Portal2, _React$Component);
|
|
18125
18067
|
function Portal2() {
|
|
18126
18068
|
return _React$Component.apply(this, arguments) || this;
|
|
18127
18069
|
}
|
|
@@ -18146,7 +18088,7 @@ var Portal = /* @__PURE__ */ function(_React$Component) {
|
|
|
18146
18088
|
}(React$1.Component);
|
|
18147
18089
|
Portal.propTypes = propTypes$a;
|
|
18148
18090
|
const Portal$1 = Portal;
|
|
18149
|
-
function ownKeys$
|
|
18091
|
+
function ownKeys$6(object2, enumerableOnly) {
|
|
18150
18092
|
var keys5 = Object.keys(object2);
|
|
18151
18093
|
if (Object.getOwnPropertySymbols) {
|
|
18152
18094
|
var symbols = Object.getOwnPropertySymbols(object2);
|
|
@@ -18159,17 +18101,17 @@ function ownKeys$5(object2, enumerableOnly) {
|
|
|
18159
18101
|
}
|
|
18160
18102
|
return keys5;
|
|
18161
18103
|
}
|
|
18162
|
-
function _objectSpread$
|
|
18104
|
+
function _objectSpread$4(target) {
|
|
18163
18105
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
18164
18106
|
var source = arguments[i2] != null ? arguments[i2] : {};
|
|
18165
18107
|
if (i2 % 2) {
|
|
18166
|
-
ownKeys$
|
|
18108
|
+
ownKeys$6(Object(source), true).forEach(function(key2) {
|
|
18167
18109
|
_defineProperty(target, key2, source[key2]);
|
|
18168
18110
|
});
|
|
18169
18111
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
18170
18112
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
18171
18113
|
} else {
|
|
18172
|
-
ownKeys$
|
|
18114
|
+
ownKeys$6(Object(source)).forEach(function(key2) {
|
|
18173
18115
|
Object.defineProperty(target, key2, Object.getOwnPropertyDescriptor(source, key2));
|
|
18174
18116
|
});
|
|
18175
18117
|
}
|
|
@@ -18238,23 +18180,23 @@ var defaultProps$a = {
|
|
|
18238
18180
|
trapFocus: false
|
|
18239
18181
|
};
|
|
18240
18182
|
var Modal = /* @__PURE__ */ function(_React$Component) {
|
|
18241
|
-
_inheritsLoose$
|
|
18183
|
+
_inheritsLoose$1(Modal2, _React$Component);
|
|
18242
18184
|
function Modal2(props) {
|
|
18243
18185
|
var _this;
|
|
18244
18186
|
_this = _React$Component.call(this, props) || this;
|
|
18245
18187
|
_this._element = null;
|
|
18246
18188
|
_this._originalBodyPadding = null;
|
|
18247
|
-
_this.getFocusableChildren = _this.getFocusableChildren.bind(_assertThisInitialized
|
|
18248
|
-
_this.handleBackdropClick = _this.handleBackdropClick.bind(_assertThisInitialized
|
|
18249
|
-
_this.handleBackdropMouseDown = _this.handleBackdropMouseDown.bind(_assertThisInitialized
|
|
18250
|
-
_this.handleEscape = _this.handleEscape.bind(_assertThisInitialized
|
|
18251
|
-
_this.handleStaticBackdropAnimation = _this.handleStaticBackdropAnimation.bind(_assertThisInitialized
|
|
18252
|
-
_this.handleTab = _this.handleTab.bind(_assertThisInitialized
|
|
18253
|
-
_this.onOpened = _this.onOpened.bind(_assertThisInitialized
|
|
18254
|
-
_this.onClosed = _this.onClosed.bind(_assertThisInitialized
|
|
18255
|
-
_this.manageFocusAfterClose = _this.manageFocusAfterClose.bind(_assertThisInitialized
|
|
18256
|
-
_this.clearBackdropAnimationTimeout = _this.clearBackdropAnimationTimeout.bind(_assertThisInitialized
|
|
18257
|
-
_this.trapFocus = _this.trapFocus.bind(_assertThisInitialized
|
|
18189
|
+
_this.getFocusableChildren = _this.getFocusableChildren.bind(_assertThisInitialized(_this));
|
|
18190
|
+
_this.handleBackdropClick = _this.handleBackdropClick.bind(_assertThisInitialized(_this));
|
|
18191
|
+
_this.handleBackdropMouseDown = _this.handleBackdropMouseDown.bind(_assertThisInitialized(_this));
|
|
18192
|
+
_this.handleEscape = _this.handleEscape.bind(_assertThisInitialized(_this));
|
|
18193
|
+
_this.handleStaticBackdropAnimation = _this.handleStaticBackdropAnimation.bind(_assertThisInitialized(_this));
|
|
18194
|
+
_this.handleTab = _this.handleTab.bind(_assertThisInitialized(_this));
|
|
18195
|
+
_this.onOpened = _this.onOpened.bind(_assertThisInitialized(_this));
|
|
18196
|
+
_this.onClosed = _this.onClosed.bind(_assertThisInitialized(_this));
|
|
18197
|
+
_this.manageFocusAfterClose = _this.manageFocusAfterClose.bind(_assertThisInitialized(_this));
|
|
18198
|
+
_this.clearBackdropAnimationTimeout = _this.clearBackdropAnimationTimeout.bind(_assertThisInitialized(_this));
|
|
18199
|
+
_this.trapFocus = _this.trapFocus.bind(_assertThisInitialized(_this));
|
|
18258
18200
|
_this.state = {
|
|
18259
18201
|
isOpen: false,
|
|
18260
18202
|
showStaticBackdropAnimation: false
|
|
@@ -18515,11 +18457,11 @@ var Modal = /* @__PURE__ */ function(_React$Component) {
|
|
|
18515
18457
|
tabIndex: "-1"
|
|
18516
18458
|
};
|
|
18517
18459
|
var hasTransition = this.props.fade;
|
|
18518
|
-
var modalTransition = _objectSpread$
|
|
18460
|
+
var modalTransition = _objectSpread$4(_objectSpread$4(_objectSpread$4({}, Fade.defaultProps), this.props.modalTransition), {}, {
|
|
18519
18461
|
baseClass: hasTransition ? this.props.modalTransition.baseClass : "",
|
|
18520
18462
|
timeout: hasTransition ? this.props.modalTransition.timeout : 0
|
|
18521
18463
|
});
|
|
18522
|
-
var backdropTransition = _objectSpread$
|
|
18464
|
+
var backdropTransition = _objectSpread$4(_objectSpread$4(_objectSpread$4({}, Fade.defaultProps), this.props.backdropTransition), {}, {
|
|
18523
18465
|
baseClass: hasTransition ? this.props.backdropTransition.baseClass : "",
|
|
18524
18466
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
18525
18467
|
});
|
|
@@ -18573,7 +18515,7 @@ var defaultProps$9 = {
|
|
|
18573
18515
|
tag: "div"
|
|
18574
18516
|
};
|
|
18575
18517
|
var ModalBody = function ModalBody2(props) {
|
|
18576
|
-
var className = props.className, cssModule = props.cssModule, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$
|
|
18518
|
+
var className = props.className, cssModule = props.cssModule, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$8);
|
|
18577
18519
|
var classes = mapToCssModules(classNames(className, "modal-body"), cssModule);
|
|
18578
18520
|
return /* @__PURE__ */ jsx(Tag, {
|
|
18579
18521
|
...attributes,
|
|
@@ -18614,12 +18556,12 @@ var defaultProps$7 = {
|
|
|
18614
18556
|
tag: "form"
|
|
18615
18557
|
};
|
|
18616
18558
|
var Form = /* @__PURE__ */ function(_Component) {
|
|
18617
|
-
_inheritsLoose$
|
|
18559
|
+
_inheritsLoose$1(Form2, _Component);
|
|
18618
18560
|
function Form2(props) {
|
|
18619
18561
|
var _this;
|
|
18620
18562
|
_this = _Component.call(this, props) || this;
|
|
18621
|
-
_this.getRef = _this.getRef.bind(_assertThisInitialized
|
|
18622
|
-
_this.submit = _this.submit.bind(_assertThisInitialized
|
|
18563
|
+
_this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
|
|
18564
|
+
_this.submit = _this.submit.bind(_assertThisInitialized(_this));
|
|
18623
18565
|
return _this;
|
|
18624
18566
|
}
|
|
18625
18567
|
var _proto = Form2.prototype;
|
|
@@ -18635,7 +18577,7 @@ var Form = /* @__PURE__ */ function(_Component) {
|
|
|
18635
18577
|
}
|
|
18636
18578
|
};
|
|
18637
18579
|
_proto.render = function render() {
|
|
18638
|
-
var _this$props = this.props, className = _this$props.className, cssModule = _this$props.cssModule, inline = _this$props.inline, Tag = _this$props.tag, innerRef = _this$props.innerRef, attributes = _objectWithoutPropertiesLoose$
|
|
18580
|
+
var _this$props = this.props, className = _this$props.className, cssModule = _this$props.cssModule, inline = _this$props.inline, Tag = _this$props.tag, innerRef = _this$props.innerRef, attributes = _objectWithoutPropertiesLoose$1(_this$props, _excluded$7);
|
|
18639
18581
|
var classes = mapToCssModules(classNames(className, inline ? "form-inline" : false), cssModule);
|
|
18640
18582
|
return /* @__PURE__ */ jsx(Tag, {
|
|
18641
18583
|
...attributes,
|
|
@@ -18662,7 +18604,7 @@ var defaultProps$6 = {
|
|
|
18662
18604
|
valid: void 0
|
|
18663
18605
|
};
|
|
18664
18606
|
var FormFeedback = function FormFeedback2(props) {
|
|
18665
|
-
var className = props.className, cssModule = props.cssModule, valid = props.valid, tooltip = props.tooltip, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$
|
|
18607
|
+
var className = props.className, cssModule = props.cssModule, valid = props.valid, tooltip = props.tooltip, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$6);
|
|
18666
18608
|
var validMode = tooltip ? "tooltip" : "feedback";
|
|
18667
18609
|
var classes = mapToCssModules(classNames(className, valid ? "valid-" + validMode : "invalid-" + validMode), cssModule);
|
|
18668
18610
|
return /* @__PURE__ */ jsx(Tag, {
|
|
@@ -18688,7 +18630,7 @@ var defaultProps$5 = {
|
|
|
18688
18630
|
tag: "div"
|
|
18689
18631
|
};
|
|
18690
18632
|
var FormGroup = function FormGroup2(props) {
|
|
18691
|
-
var className = props.className, cssModule = props.cssModule, row = props.row, disabled = props.disabled, check2 = props.check, inline = props.inline, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$
|
|
18633
|
+
var className = props.className, cssModule = props.cssModule, row = props.row, disabled = props.disabled, check2 = props.check, inline = props.inline, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$5);
|
|
18692
18634
|
var classes = mapToCssModules(classNames(className, row ? "row" : false, check2 ? "form-check" : "form-group", check2 && inline ? "form-check-inline" : false, check2 && disabled ? "disabled" : false), cssModule);
|
|
18693
18635
|
if (Tag === "fieldset") {
|
|
18694
18636
|
attributes.disabled = disabled;
|
|
@@ -18720,12 +18662,12 @@ var defaultProps$4 = {
|
|
|
18720
18662
|
type: "text"
|
|
18721
18663
|
};
|
|
18722
18664
|
var Input = /* @__PURE__ */ function(_React$Component) {
|
|
18723
|
-
_inheritsLoose$
|
|
18665
|
+
_inheritsLoose$1(Input2, _React$Component);
|
|
18724
18666
|
function Input2(props) {
|
|
18725
18667
|
var _this;
|
|
18726
18668
|
_this = _React$Component.call(this, props) || this;
|
|
18727
|
-
_this.getRef = _this.getRef.bind(_assertThisInitialized
|
|
18728
|
-
_this.focus = _this.focus.bind(_assertThisInitialized
|
|
18669
|
+
_this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
|
|
18670
|
+
_this.focus = _this.focus.bind(_assertThisInitialized(_this));
|
|
18729
18671
|
return _this;
|
|
18730
18672
|
}
|
|
18731
18673
|
var _proto = Input2.prototype;
|
|
@@ -18741,7 +18683,7 @@ var Input = /* @__PURE__ */ function(_React$Component) {
|
|
|
18741
18683
|
}
|
|
18742
18684
|
};
|
|
18743
18685
|
_proto.render = function render() {
|
|
18744
|
-
var _this$props = this.props, className = _this$props.className, cssModule = _this$props.cssModule, type = _this$props.type, bsSize = _this$props.bsSize, valid = _this$props.valid, invalid = _this$props.invalid, tag = _this$props.tag, addon = _this$props.addon, plaintext = _this$props.plaintext, innerRef = _this$props.innerRef, attributes = _objectWithoutPropertiesLoose$
|
|
18686
|
+
var _this$props = this.props, className = _this$props.className, cssModule = _this$props.cssModule, type = _this$props.type, bsSize = _this$props.bsSize, valid = _this$props.valid, invalid = _this$props.invalid, tag = _this$props.tag, addon = _this$props.addon, plaintext = _this$props.plaintext, innerRef = _this$props.innerRef, attributes = _objectWithoutPropertiesLoose$1(_this$props, _excluded$4);
|
|
18745
18687
|
var checkInput = ["radio", "checkbox"].indexOf(type) > -1;
|
|
18746
18688
|
var isNotaNumber = new RegExp("\\D", "g");
|
|
18747
18689
|
var fileInput = type === "file";
|
|
@@ -18800,7 +18742,7 @@ var defaultProps$3 = {
|
|
|
18800
18742
|
tag: "div"
|
|
18801
18743
|
};
|
|
18802
18744
|
var InputGroup = function InputGroup2(props) {
|
|
18803
|
-
var className = props.className, cssModule = props.cssModule, Tag = props.tag, size = props.size, attributes = _objectWithoutPropertiesLoose$
|
|
18745
|
+
var className = props.className, cssModule = props.cssModule, Tag = props.tag, size = props.size, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$3);
|
|
18804
18746
|
var classes = mapToCssModules(classNames(className, "input-group", size ? "input-group-" + size : null), cssModule);
|
|
18805
18747
|
return /* @__PURE__ */ jsx(Tag, {
|
|
18806
18748
|
...attributes,
|
|
@@ -18847,7 +18789,7 @@ var getColumnSizeClass2 = function getColumnSizeClass3(isXs, colWidth, colSize)
|
|
|
18847
18789
|
return isXs ? "col-" + colSize : "col-" + colWidth + "-" + colSize;
|
|
18848
18790
|
};
|
|
18849
18791
|
var Label = function Label2(props) {
|
|
18850
|
-
var className = props.className, cssModule = props.cssModule, hidden = props.hidden, widths = props.widths, Tag = props.tag, check2 = props.check, size = props.size, htmlFor = props.for, attributes = _objectWithoutPropertiesLoose$
|
|
18792
|
+
var className = props.className, cssModule = props.cssModule, hidden = props.hidden, widths = props.widths, Tag = props.tag, check2 = props.check, size = props.size, htmlFor = props.for, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$2);
|
|
18851
18793
|
var colClasses = [];
|
|
18852
18794
|
widths.forEach(function(colWidth, i2) {
|
|
18853
18795
|
var columnProp = props[colWidth];
|
|
@@ -18878,7 +18820,7 @@ Label.propTypes = propTypes$2;
|
|
|
18878
18820
|
Label.defaultProps = defaultProps$2;
|
|
18879
18821
|
const Label$1 = Label;
|
|
18880
18822
|
var _excluded$1 = ["className", "closeClassName", "closeAriaLabel", "cssModule", "tag", "color", "isOpen", "toggle", "children", "transition", "fade", "innerRef"];
|
|
18881
|
-
function ownKeys$
|
|
18823
|
+
function ownKeys$5(object2, enumerableOnly) {
|
|
18882
18824
|
var keys5 = Object.keys(object2);
|
|
18883
18825
|
if (Object.getOwnPropertySymbols) {
|
|
18884
18826
|
var symbols = Object.getOwnPropertySymbols(object2);
|
|
@@ -18891,17 +18833,17 @@ function ownKeys$4(object2, enumerableOnly) {
|
|
|
18891
18833
|
}
|
|
18892
18834
|
return keys5;
|
|
18893
18835
|
}
|
|
18894
|
-
function _objectSpread$
|
|
18836
|
+
function _objectSpread$3(target) {
|
|
18895
18837
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
18896
18838
|
var source = arguments[i2] != null ? arguments[i2] : {};
|
|
18897
18839
|
if (i2 % 2) {
|
|
18898
|
-
ownKeys$
|
|
18840
|
+
ownKeys$5(Object(source), true).forEach(function(key2) {
|
|
18899
18841
|
_defineProperty(target, key2, source[key2]);
|
|
18900
18842
|
});
|
|
18901
18843
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
18902
18844
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
18903
18845
|
} else {
|
|
18904
|
-
ownKeys$
|
|
18846
|
+
ownKeys$5(Object(source)).forEach(function(key2) {
|
|
18905
18847
|
Object.defineProperty(target, key2, Object.getOwnPropertyDescriptor(source, key2));
|
|
18906
18848
|
});
|
|
18907
18849
|
}
|
|
@@ -18928,17 +18870,17 @@ var defaultProps$1 = {
|
|
|
18928
18870
|
tag: "div",
|
|
18929
18871
|
closeAriaLabel: "Close",
|
|
18930
18872
|
fade: true,
|
|
18931
|
-
transition: _objectSpread$
|
|
18873
|
+
transition: _objectSpread$3(_objectSpread$3({}, Fade.defaultProps), {}, {
|
|
18932
18874
|
unmountOnExit: true
|
|
18933
18875
|
})
|
|
18934
18876
|
};
|
|
18935
18877
|
function Alert(props) {
|
|
18936
|
-
var className = props.className, closeClassName = props.closeClassName, closeAriaLabel = props.closeAriaLabel, cssModule = props.cssModule, Tag = props.tag, color = props.color, isOpen = props.isOpen, toggle2 = props.toggle, children = props.children, transition = props.transition, fade = props.fade, innerRef = props.innerRef, attributes = _objectWithoutPropertiesLoose$
|
|
18878
|
+
var className = props.className, closeClassName = props.closeClassName, closeAriaLabel = props.closeAriaLabel, cssModule = props.cssModule, Tag = props.tag, color = props.color, isOpen = props.isOpen, toggle2 = props.toggle, children = props.children, transition = props.transition, fade = props.fade, innerRef = props.innerRef, attributes = _objectWithoutPropertiesLoose$1(props, _excluded$1);
|
|
18937
18879
|
var classes = mapToCssModules(classNames(className, "alert", "alert-" + color, {
|
|
18938
18880
|
"alert-dismissible": toggle2
|
|
18939
18881
|
}), cssModule);
|
|
18940
18882
|
var closeClasses = mapToCssModules(classNames("close", closeClassName), cssModule);
|
|
18941
|
-
var alertTransition = _objectSpread$
|
|
18883
|
+
var alertTransition = _objectSpread$3(_objectSpread$3(_objectSpread$3({}, Fade.defaultProps), transition), {}, {
|
|
18942
18884
|
baseClass: fade ? transition.baseClass : "",
|
|
18943
18885
|
timeout: fade ? transition.timeout : 0
|
|
18944
18886
|
});
|
|
@@ -18964,6 +18906,66 @@ function Alert(props) {
|
|
|
18964
18906
|
}
|
|
18965
18907
|
Alert.propTypes = propTypes$1;
|
|
18966
18908
|
Alert.defaultProps = defaultProps$1;
|
|
18909
|
+
function ownKeys$4(object2, enumerableOnly) {
|
|
18910
|
+
var keys5 = Object.keys(object2);
|
|
18911
|
+
if (Object.getOwnPropertySymbols) {
|
|
18912
|
+
var symbols = Object.getOwnPropertySymbols(object2);
|
|
18913
|
+
if (enumerableOnly) {
|
|
18914
|
+
symbols = symbols.filter(function(sym) {
|
|
18915
|
+
return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
|
|
18916
|
+
});
|
|
18917
|
+
}
|
|
18918
|
+
keys5.push.apply(keys5, symbols);
|
|
18919
|
+
}
|
|
18920
|
+
return keys5;
|
|
18921
|
+
}
|
|
18922
|
+
function _objectSpread$2(target) {
|
|
18923
|
+
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
18924
|
+
var source = arguments[i2] != null ? arguments[i2] : {};
|
|
18925
|
+
if (i2 % 2) {
|
|
18926
|
+
ownKeys$4(Object(source), true).forEach(function(key2) {
|
|
18927
|
+
_defineProperty(target, key2, source[key2]);
|
|
18928
|
+
});
|
|
18929
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
18930
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
18931
|
+
} else {
|
|
18932
|
+
ownKeys$4(Object(source)).forEach(function(key2) {
|
|
18933
|
+
Object.defineProperty(target, key2, Object.getOwnPropertyDescriptor(source, key2));
|
|
18934
|
+
});
|
|
18935
|
+
}
|
|
18936
|
+
}
|
|
18937
|
+
return target;
|
|
18938
|
+
}
|
|
18939
|
+
var omitKeys = ["defaultOpen"];
|
|
18940
|
+
var UncontrolledTooltip = /* @__PURE__ */ function(_Component) {
|
|
18941
|
+
_inheritsLoose$1(UncontrolledTooltip2, _Component);
|
|
18942
|
+
function UncontrolledTooltip2(props) {
|
|
18943
|
+
var _this;
|
|
18944
|
+
_this = _Component.call(this, props) || this;
|
|
18945
|
+
_this.state = {
|
|
18946
|
+
isOpen: props.defaultOpen || false
|
|
18947
|
+
};
|
|
18948
|
+
_this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
|
|
18949
|
+
return _this;
|
|
18950
|
+
}
|
|
18951
|
+
var _proto = UncontrolledTooltip2.prototype;
|
|
18952
|
+
_proto.toggle = function toggle2() {
|
|
18953
|
+
this.setState({
|
|
18954
|
+
isOpen: !this.state.isOpen
|
|
18955
|
+
});
|
|
18956
|
+
};
|
|
18957
|
+
_proto.render = function render() {
|
|
18958
|
+
return /* @__PURE__ */ jsx(Tooltip$1, {
|
|
18959
|
+
isOpen: this.state.isOpen,
|
|
18960
|
+
toggle: this.toggle,
|
|
18961
|
+
...omit(this.props, omitKeys)
|
|
18962
|
+
});
|
|
18963
|
+
};
|
|
18964
|
+
return UncontrolledTooltip2;
|
|
18965
|
+
}(react.exports.Component);
|
|
18966
|
+
UncontrolledTooltip.propTypes = _objectSpread$2({
|
|
18967
|
+
defaultOpen: propTypes$i.exports.bool
|
|
18968
|
+
}, Tooltip$1.propTypes);
|
|
18967
18969
|
var _excluded = ["className", "cssModule", "type", "size", "color", "children", "tag"];
|
|
18968
18970
|
var propTypes = {
|
|
18969
18971
|
tag: tagPropType,
|
|
@@ -18980,7 +18982,7 @@ var defaultProps = {
|
|
|
18980
18982
|
children: "Loading..."
|
|
18981
18983
|
};
|
|
18982
18984
|
var Spinner$1 = function Spinner(props) {
|
|
18983
|
-
var className = props.className, cssModule = props.cssModule, type = props.type, size = props.size, color = props.color, children = props.children, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$
|
|
18985
|
+
var className = props.className, cssModule = props.cssModule, type = props.type, size = props.size, color = props.color, children = props.children, Tag = props.tag, attributes = _objectWithoutPropertiesLoose$1(props, _excluded);
|
|
18984
18986
|
var classes = mapToCssModules(classNames(className, size ? "spinner-" + type + "-" + size : false, "spinner-" + type, color ? "text-" + color : false), cssModule);
|
|
18985
18987
|
return /* @__PURE__ */ jsx(Tag, {
|
|
18986
18988
|
role: "status",
|
|
@@ -26998,36 +27000,36 @@ function parseQueryArgs(arg1, arg2, arg3) {
|
|
|
26998
27000
|
return arg1;
|
|
26999
27001
|
}
|
|
27000
27002
|
if (typeof arg2 === "function") {
|
|
27001
|
-
return _extends$
|
|
27003
|
+
return _extends$1({}, arg3, {
|
|
27002
27004
|
queryKey: arg1,
|
|
27003
27005
|
queryFn: arg2
|
|
27004
27006
|
});
|
|
27005
27007
|
}
|
|
27006
|
-
return _extends$
|
|
27008
|
+
return _extends$1({}, arg2, {
|
|
27007
27009
|
queryKey: arg1
|
|
27008
27010
|
});
|
|
27009
27011
|
}
|
|
27010
27012
|
function parseMutationArgs(arg1, arg2, arg3) {
|
|
27011
27013
|
if (isQueryKey(arg1)) {
|
|
27012
27014
|
if (typeof arg2 === "function") {
|
|
27013
|
-
return _extends$
|
|
27015
|
+
return _extends$1({}, arg3, {
|
|
27014
27016
|
mutationKey: arg1,
|
|
27015
27017
|
mutationFn: arg2
|
|
27016
27018
|
});
|
|
27017
27019
|
}
|
|
27018
|
-
return _extends$
|
|
27020
|
+
return _extends$1({}, arg2, {
|
|
27019
27021
|
mutationKey: arg1
|
|
27020
27022
|
});
|
|
27021
27023
|
}
|
|
27022
27024
|
if (typeof arg1 === "function") {
|
|
27023
|
-
return _extends$
|
|
27025
|
+
return _extends$1({}, arg2, {
|
|
27024
27026
|
mutationFn: arg1
|
|
27025
27027
|
});
|
|
27026
27028
|
}
|
|
27027
|
-
return _extends$
|
|
27029
|
+
return _extends$1({}, arg1);
|
|
27028
27030
|
}
|
|
27029
27031
|
function parseFilterArgs(arg1, arg2, arg3) {
|
|
27030
|
-
return isQueryKey(arg1) ? [_extends$
|
|
27032
|
+
return isQueryKey(arg1) ? [_extends$1({}, arg2, {
|
|
27031
27033
|
queryKey: arg1
|
|
27032
27034
|
}), arg3] : [arg1 || {}, arg2];
|
|
27033
27035
|
}
|
|
@@ -27193,7 +27195,7 @@ function getAbortController() {
|
|
|
27193
27195
|
}
|
|
27194
27196
|
}
|
|
27195
27197
|
var FocusManager = /* @__PURE__ */ function(_Subscribable) {
|
|
27196
|
-
_inheritsLoose$
|
|
27198
|
+
_inheritsLoose$1(FocusManager2, _Subscribable);
|
|
27197
27199
|
function FocusManager2() {
|
|
27198
27200
|
var _this;
|
|
27199
27201
|
_this = _Subscribable.call(this) || this;
|
|
@@ -27262,7 +27264,7 @@ var FocusManager = /* @__PURE__ */ function(_Subscribable) {
|
|
|
27262
27264
|
}(Subscribable);
|
|
27263
27265
|
var focusManager = new FocusManager();
|
|
27264
27266
|
var OnlineManager = /* @__PURE__ */ function(_Subscribable) {
|
|
27265
|
-
_inheritsLoose$
|
|
27267
|
+
_inheritsLoose$1(OnlineManager2, _Subscribable);
|
|
27266
27268
|
function OnlineManager2() {
|
|
27267
27269
|
var _this;
|
|
27268
27270
|
_this = _Subscribable.call(this) || this;
|
|
@@ -27545,7 +27547,7 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27545
27547
|
var _proto = Query2.prototype;
|
|
27546
27548
|
_proto.setOptions = function setOptions(options) {
|
|
27547
27549
|
var _this$options$cacheTi;
|
|
27548
|
-
this.options = _extends$
|
|
27550
|
+
this.options = _extends$1({}, this.defaultOptions, options);
|
|
27549
27551
|
this.meta = options == null ? void 0 : options.meta;
|
|
27550
27552
|
this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1e3);
|
|
27551
27553
|
};
|
|
@@ -27858,19 +27860,19 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27858
27860
|
var _action$meta, _action$dataUpdatedAt;
|
|
27859
27861
|
switch (action.type) {
|
|
27860
27862
|
case "failed":
|
|
27861
|
-
return _extends$
|
|
27863
|
+
return _extends$1({}, state, {
|
|
27862
27864
|
fetchFailureCount: state.fetchFailureCount + 1
|
|
27863
27865
|
});
|
|
27864
27866
|
case "pause":
|
|
27865
|
-
return _extends$
|
|
27867
|
+
return _extends$1({}, state, {
|
|
27866
27868
|
isPaused: true
|
|
27867
27869
|
});
|
|
27868
27870
|
case "continue":
|
|
27869
|
-
return _extends$
|
|
27871
|
+
return _extends$1({}, state, {
|
|
27870
27872
|
isPaused: false
|
|
27871
27873
|
});
|
|
27872
27874
|
case "fetch":
|
|
27873
|
-
return _extends$
|
|
27875
|
+
return _extends$1({}, state, {
|
|
27874
27876
|
fetchFailureCount: 0,
|
|
27875
27877
|
fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,
|
|
27876
27878
|
isFetching: true,
|
|
@@ -27880,7 +27882,7 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27880
27882
|
status: "loading"
|
|
27881
27883
|
});
|
|
27882
27884
|
case "success":
|
|
27883
|
-
return _extends$
|
|
27885
|
+
return _extends$1({}, state, {
|
|
27884
27886
|
data: action.data,
|
|
27885
27887
|
dataUpdateCount: state.dataUpdateCount + 1,
|
|
27886
27888
|
dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),
|
|
@@ -27894,9 +27896,9 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27894
27896
|
case "error":
|
|
27895
27897
|
var error = action.error;
|
|
27896
27898
|
if (isCancelledError(error) && error.revert && this.revertState) {
|
|
27897
|
-
return _extends$
|
|
27899
|
+
return _extends$1({}, this.revertState);
|
|
27898
27900
|
}
|
|
27899
|
-
return _extends$
|
|
27901
|
+
return _extends$1({}, state, {
|
|
27900
27902
|
error,
|
|
27901
27903
|
errorUpdateCount: state.errorUpdateCount + 1,
|
|
27902
27904
|
errorUpdatedAt: Date.now(),
|
|
@@ -27906,11 +27908,11 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27906
27908
|
status: "error"
|
|
27907
27909
|
});
|
|
27908
27910
|
case "invalidate":
|
|
27909
|
-
return _extends$
|
|
27911
|
+
return _extends$1({}, state, {
|
|
27910
27912
|
isInvalidated: true
|
|
27911
27913
|
});
|
|
27912
27914
|
case "setState":
|
|
27913
|
-
return _extends$
|
|
27915
|
+
return _extends$1({}, state, action.state);
|
|
27914
27916
|
default:
|
|
27915
27917
|
return state;
|
|
27916
27918
|
}
|
|
@@ -27918,7 +27920,7 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27918
27920
|
return Query2;
|
|
27919
27921
|
}();
|
|
27920
27922
|
var QueryCache = /* @__PURE__ */ function(_Subscribable) {
|
|
27921
|
-
_inheritsLoose$
|
|
27923
|
+
_inheritsLoose$1(QueryCache2, _Subscribable);
|
|
27922
27924
|
function QueryCache2(config) {
|
|
27923
27925
|
var _this;
|
|
27924
27926
|
_this = _Subscribable.call(this) || this;
|
|
@@ -28030,7 +28032,7 @@ var QueryCache = /* @__PURE__ */ function(_Subscribable) {
|
|
|
28030
28032
|
}(Subscribable);
|
|
28031
28033
|
var Mutation = /* @__PURE__ */ function() {
|
|
28032
28034
|
function Mutation2(config) {
|
|
28033
|
-
this.options = _extends$
|
|
28035
|
+
this.options = _extends$1({}, config.defaultOptions, config.options);
|
|
28034
28036
|
this.mutationId = config.mutationId;
|
|
28035
28037
|
this.mutationCache = config.mutationCache;
|
|
28036
28038
|
this.observers = [];
|
|
@@ -28178,19 +28180,19 @@ function getDefaultState() {
|
|
|
28178
28180
|
function reducer(state, action) {
|
|
28179
28181
|
switch (action.type) {
|
|
28180
28182
|
case "failed":
|
|
28181
|
-
return _extends$
|
|
28183
|
+
return _extends$1({}, state, {
|
|
28182
28184
|
failureCount: state.failureCount + 1
|
|
28183
28185
|
});
|
|
28184
28186
|
case "pause":
|
|
28185
|
-
return _extends$
|
|
28187
|
+
return _extends$1({}, state, {
|
|
28186
28188
|
isPaused: true
|
|
28187
28189
|
});
|
|
28188
28190
|
case "continue":
|
|
28189
|
-
return _extends$
|
|
28191
|
+
return _extends$1({}, state, {
|
|
28190
28192
|
isPaused: false
|
|
28191
28193
|
});
|
|
28192
28194
|
case "loading":
|
|
28193
|
-
return _extends$
|
|
28195
|
+
return _extends$1({}, state, {
|
|
28194
28196
|
context: action.context,
|
|
28195
28197
|
data: void 0,
|
|
28196
28198
|
error: null,
|
|
@@ -28199,14 +28201,14 @@ function reducer(state, action) {
|
|
|
28199
28201
|
variables: action.variables
|
|
28200
28202
|
});
|
|
28201
28203
|
case "success":
|
|
28202
|
-
return _extends$
|
|
28204
|
+
return _extends$1({}, state, {
|
|
28203
28205
|
data: action.data,
|
|
28204
28206
|
error: null,
|
|
28205
28207
|
status: "success",
|
|
28206
28208
|
isPaused: false
|
|
28207
28209
|
});
|
|
28208
28210
|
case "error":
|
|
28209
|
-
return _extends$
|
|
28211
|
+
return _extends$1({}, state, {
|
|
28210
28212
|
data: void 0,
|
|
28211
28213
|
error: action.error,
|
|
28212
28214
|
failureCount: state.failureCount + 1,
|
|
@@ -28214,13 +28216,13 @@ function reducer(state, action) {
|
|
|
28214
28216
|
status: "error"
|
|
28215
28217
|
});
|
|
28216
28218
|
case "setState":
|
|
28217
|
-
return _extends$
|
|
28219
|
+
return _extends$1({}, state, action.state);
|
|
28218
28220
|
default:
|
|
28219
28221
|
return state;
|
|
28220
28222
|
}
|
|
28221
28223
|
}
|
|
28222
28224
|
var MutationCache = /* @__PURE__ */ function(_Subscribable) {
|
|
28223
|
-
_inheritsLoose$
|
|
28225
|
+
_inheritsLoose$1(MutationCache2, _Subscribable);
|
|
28224
28226
|
function MutationCache2(config) {
|
|
28225
28227
|
var _this;
|
|
28226
28228
|
_this = _Subscribable.call(this) || this;
|
|
@@ -28446,7 +28448,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28446
28448
|
return this.queryCache.findAll(filters).length;
|
|
28447
28449
|
};
|
|
28448
28450
|
_proto.isMutating = function isMutating(filters) {
|
|
28449
|
-
return this.mutationCache.findAll(_extends$
|
|
28451
|
+
return this.mutationCache.findAll(_extends$1({}, filters, {
|
|
28450
28452
|
fetching: true
|
|
28451
28453
|
})).length;
|
|
28452
28454
|
};
|
|
@@ -28492,7 +28494,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28492
28494
|
var _this3 = this;
|
|
28493
28495
|
var _parseFilterArgs3 = parseFilterArgs(arg1, arg2, arg3), filters = _parseFilterArgs3[0], options = _parseFilterArgs3[1];
|
|
28494
28496
|
var queryCache = this.queryCache;
|
|
28495
|
-
var refetchFilters = _extends$
|
|
28497
|
+
var refetchFilters = _extends$1({}, filters, {
|
|
28496
28498
|
active: true
|
|
28497
28499
|
});
|
|
28498
28500
|
return notifyManager.batch(function() {
|
|
@@ -28518,7 +28520,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28518
28520
|
_proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {
|
|
28519
28521
|
var _ref3, _filters$refetchActiv, _filters$refetchInact, _this5 = this;
|
|
28520
28522
|
var _parseFilterArgs5 = parseFilterArgs(arg1, arg2, arg3), filters = _parseFilterArgs5[0], options = _parseFilterArgs5[1];
|
|
28521
|
-
var refetchFilters = _extends$
|
|
28523
|
+
var refetchFilters = _extends$1({}, filters, {
|
|
28522
28524
|
active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,
|
|
28523
28525
|
inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false
|
|
28524
28526
|
});
|
|
@@ -28534,7 +28536,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28534
28536
|
var _parseFilterArgs6 = parseFilterArgs(arg1, arg2, arg3), filters = _parseFilterArgs6[0], options = _parseFilterArgs6[1];
|
|
28535
28537
|
var promises = notifyManager.batch(function() {
|
|
28536
28538
|
return _this6.queryCache.findAll(filters).map(function(query) {
|
|
28537
|
-
return query.fetch(void 0, _extends$
|
|
28539
|
+
return query.fetch(void 0, _extends$1({}, options, {
|
|
28538
28540
|
meta: {
|
|
28539
28541
|
refetchPage: filters == null ? void 0 : filters.refetchPage
|
|
28540
28542
|
}
|
|
@@ -28636,7 +28638,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28636
28638
|
if (options == null ? void 0 : options._defaulted) {
|
|
28637
28639
|
return options;
|
|
28638
28640
|
}
|
|
28639
|
-
var defaultedOptions = _extends$
|
|
28641
|
+
var defaultedOptions = _extends$1({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {
|
|
28640
28642
|
_defaulted: true
|
|
28641
28643
|
});
|
|
28642
28644
|
if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {
|
|
@@ -28651,7 +28653,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28651
28653
|
if (options == null ? void 0 : options._defaulted) {
|
|
28652
28654
|
return options;
|
|
28653
28655
|
}
|
|
28654
|
-
return _extends$
|
|
28656
|
+
return _extends$1({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {
|
|
28655
28657
|
_defaulted: true
|
|
28656
28658
|
});
|
|
28657
28659
|
};
|
|
@@ -28662,7 +28664,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28662
28664
|
return QueryClient2;
|
|
28663
28665
|
}();
|
|
28664
28666
|
var MutationObserver = /* @__PURE__ */ function(_Subscribable) {
|
|
28665
|
-
_inheritsLoose$
|
|
28667
|
+
_inheritsLoose$1(MutationObserver2, _Subscribable);
|
|
28666
28668
|
function MutationObserver2(client, options) {
|
|
28667
28669
|
var _this;
|
|
28668
28670
|
_this = _Subscribable.call(this) || this;
|
|
@@ -28713,7 +28715,7 @@ var MutationObserver = /* @__PURE__ */ function(_Subscribable) {
|
|
|
28713
28715
|
if (this.currentMutation) {
|
|
28714
28716
|
this.currentMutation.removeObserver(this);
|
|
28715
28717
|
}
|
|
28716
|
-
this.currentMutation = this.client.getMutationCache().build(this.client, _extends$
|
|
28718
|
+
this.currentMutation = this.client.getMutationCache().build(this.client, _extends$1({}, this.options, {
|
|
28717
28719
|
variables: typeof variables !== "undefined" ? variables : this.options.variables
|
|
28718
28720
|
}));
|
|
28719
28721
|
this.currentMutation.addObserver(this);
|
|
@@ -28721,7 +28723,7 @@ var MutationObserver = /* @__PURE__ */ function(_Subscribable) {
|
|
|
28721
28723
|
};
|
|
28722
28724
|
_proto.updateResult = function updateResult() {
|
|
28723
28725
|
var state = this.currentMutation ? this.currentMutation.state : getDefaultState();
|
|
28724
|
-
var result = _extends$
|
|
28726
|
+
var result = _extends$1({}, state, {
|
|
28725
28727
|
isLoading: state.status === "loading",
|
|
28726
28728
|
isSuccess: state.status === "success",
|
|
28727
28729
|
isError: state.status === "error",
|
|
@@ -28831,7 +28833,7 @@ function useMutation(arg1, arg2, arg3) {
|
|
|
28831
28833
|
if (currentResult.error && shouldThrowError(void 0, obsRef.current.options.useErrorBoundary, [currentResult.error])) {
|
|
28832
28834
|
throw currentResult.error;
|
|
28833
28835
|
}
|
|
28834
|
-
return _extends$
|
|
28836
|
+
return _extends$1({}, currentResult, {
|
|
28835
28837
|
mutate,
|
|
28836
28838
|
mutateAsync: currentResult.mutate
|
|
28837
28839
|
});
|
|
@@ -31744,359 +31746,438 @@ var lib = function(e2) {
|
|
|
31744
31746
|
t2.default = F2;
|
|
31745
31747
|
}]);
|
|
31746
31748
|
const style = "";
|
|
31747
|
-
const
|
|
31748
|
-
|
|
31749
|
-
|
|
31750
|
-
|
|
31751
|
-
|
|
31752
|
-
|
|
31753
|
-
|
|
31754
|
-
|
|
31755
|
-
|
|
31756
|
-
|
|
31757
|
-
|
|
31758
|
-
|
|
31759
|
-
|
|
31760
|
-
|
|
31761
|
-
|
|
31762
|
-
|
|
31763
|
-
|
|
31764
|
-
|
|
31765
|
-
|
|
31766
|
-
|
|
31767
|
-
|
|
31768
|
-
|
|
31769
|
-
|
|
31770
|
-
|
|
31771
|
-
|
|
31772
|
-
|
|
31773
|
-
|
|
31774
|
-
|
|
31775
|
-
|
|
31776
|
-
|
|
31777
|
-
|
|
31778
|
-
|
|
31779
|
-
}
|
|
31780
|
-
|
|
31781
|
-
|
|
31782
|
-
|
|
31783
|
-
|
|
31784
|
-
|
|
31785
|
-
|
|
31786
|
-
|
|
31787
|
-
|
|
31788
|
-
|
|
31789
|
-
|
|
31790
|
-
|
|
31791
|
-
|
|
31792
|
-
|
|
31793
|
-
|
|
31794
|
-
|
|
31795
|
-
|
|
31796
|
-
|
|
31797
|
-
|
|
31798
|
-
|
|
31799
|
-
|
|
31800
|
-
|
|
31801
|
-
|
|
31802
|
-
|
|
31803
|
-
|
|
31804
|
-
|
|
31805
|
-
|
|
31806
|
-
|
|
31807
|
-
|
|
31808
|
-
|
|
31809
|
-
|
|
31810
|
-
|
|
31811
|
-
|
|
31812
|
-
|
|
31813
|
-
|
|
31814
|
-
|
|
31815
|
-
|
|
31816
|
-
|
|
31817
|
-
|
|
31818
|
-
|
|
31819
|
-
|
|
31820
|
-
}))
|
|
31821
|
-
|
|
31822
|
-
|
|
31823
|
-
|
|
31824
|
-
|
|
31825
|
-
|
|
31826
|
-
|
|
31827
|
-
|
|
31828
|
-
}
|
|
31829
|
-
|
|
31830
|
-
|
|
31831
|
-
|
|
31832
|
-
|
|
31833
|
-
})
|
|
31834
|
-
|
|
31835
|
-
|
|
31836
|
-
|
|
31837
|
-
|
|
31838
|
-
|
|
31839
|
-
|
|
31840
|
-
|
|
31841
|
-
|
|
31842
|
-
|
|
31843
|
-
|
|
31844
|
-
|
|
31845
|
-
|
|
31846
|
-
|
|
31847
|
-
|
|
31848
|
-
|
|
31849
|
-
|
|
31850
|
-
|
|
31851
|
-
|
|
31852
|
-
|
|
31853
|
-
|
|
31854
|
-
|
|
31855
|
-
|
|
31856
|
-
|
|
31857
|
-
|
|
31858
|
-
|
|
31859
|
-
|
|
31860
|
-
|
|
31861
|
-
|
|
31862
|
-
|
|
31863
|
-
|
|
31864
|
-
|
|
31865
|
-
|
|
31866
|
-
|
|
31867
|
-
|
|
31868
|
-
|
|
31869
|
-
|
|
31870
|
-
|
|
31871
|
-
|
|
31872
|
-
|
|
31873
|
-
|
|
31874
|
-
|
|
31875
|
-
|
|
31876
|
-
|
|
31877
|
-
|
|
31878
|
-
|
|
31879
|
-
|
|
31880
|
-
}
|
|
31881
|
-
|
|
31882
|
-
|
|
31883
|
-
|
|
31884
|
-
|
|
31885
|
-
|
|
31886
|
-
|
|
31887
|
-
|
|
31888
|
-
|
|
31889
|
-
|
|
31890
|
-
|
|
31891
|
-
|
|
31892
|
-
|
|
31893
|
-
|
|
31894
|
-
|
|
31895
|
-
|
|
31896
|
-
|
|
31897
|
-
|
|
31898
|
-
}
|
|
31899
|
-
|
|
31900
|
-
|
|
31901
|
-
|
|
31902
|
-
|
|
31903
|
-
|
|
31904
|
-
|
|
31905
|
-
|
|
31906
|
-
|
|
31907
|
-
|
|
31908
|
-
|
|
31909
|
-
|
|
31910
|
-
|
|
31911
|
-
|
|
31912
|
-
|
|
31913
|
-
|
|
31914
|
-
|
|
31915
|
-
|
|
31916
|
-
|
|
31917
|
-
|
|
31918
|
-
|
|
31919
|
-
|
|
31920
|
-
|
|
31921
|
-
|
|
31922
|
-
|
|
31923
|
-
|
|
31924
|
-
|
|
31925
|
-
|
|
31926
|
-
|
|
31927
|
-
|
|
31928
|
-
|
|
31929
|
-
|
|
31930
|
-
|
|
31931
|
-
|
|
31932
|
-
|
|
31933
|
-
|
|
31934
|
-
|
|
31935
|
-
}
|
|
31936
|
-
|
|
31937
|
-
|
|
31938
|
-
|
|
31939
|
-
|
|
31940
|
-
|
|
31941
|
-
|
|
31942
|
-
|
|
31943
|
-
|
|
31944
|
-
|
|
31945
|
-
|
|
31946
|
-
|
|
31947
|
-
|
|
31948
|
-
|
|
31949
|
-
|
|
31950
|
-
|
|
31951
|
-
|
|
31952
|
-
|
|
31953
|
-
|
|
31954
|
-
|
|
31955
|
-
|
|
31956
|
-
|
|
31957
|
-
|
|
31958
|
-
|
|
31959
|
-
|
|
31960
|
-
|
|
31961
|
-
|
|
31962
|
-
|
|
31963
|
-
|
|
31964
|
-
|
|
31965
|
-
|
|
31966
|
-
|
|
31967
|
-
|
|
31968
|
-
|
|
31969
|
-
|
|
31970
|
-
|
|
31971
|
-
|
|
31972
|
-
|
|
31973
|
-
|
|
31974
|
-
|
|
31975
|
-
|
|
31976
|
-
|
|
31977
|
-
|
|
31978
|
-
|
|
31979
|
-
|
|
31980
|
-
|
|
31981
|
-
|
|
31982
|
-
}
|
|
31983
|
-
|
|
31984
|
-
|
|
31985
|
-
|
|
31986
|
-
|
|
31987
|
-
|
|
31988
|
-
}
|
|
31989
|
-
|
|
31990
|
-
|
|
31991
|
-
|
|
31992
|
-
|
|
31993
|
-
|
|
31994
|
-
|
|
31995
|
-
|
|
31996
|
-
|
|
31997
|
-
|
|
31998
|
-
|
|
31999
|
-
|
|
32000
|
-
|
|
32001
|
-
|
|
32002
|
-
|
|
32003
|
-
|
|
32004
|
-
|
|
32005
|
-
|
|
32006
|
-
|
|
32007
|
-
|
|
32008
|
-
|
|
32009
|
-
|
|
32010
|
-
|
|
32011
|
-
|
|
32012
|
-
}
|
|
32013
|
-
|
|
32014
|
-
|
|
32015
|
-
|
|
32016
|
-
|
|
32017
|
-
|
|
32018
|
-
|
|
32019
|
-
}
|
|
32020
|
-
|
|
32021
|
-
|
|
32022
|
-
|
|
32023
|
-
|
|
32024
|
-
|
|
32025
|
-
|
|
32026
|
-
|
|
32027
|
-
|
|
32028
|
-
|
|
32029
|
-
|
|
32030
|
-
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
32034
|
-
}
|
|
32035
|
-
|
|
32036
|
-
|
|
32037
|
-
|
|
32038
|
-
|
|
32039
|
-
|
|
32040
|
-
|
|
32041
|
-
|
|
32042
|
-
|
|
32043
|
-
|
|
32044
|
-
|
|
32045
|
-
|
|
32046
|
-
|
|
32047
|
-
|
|
32048
|
-
|
|
32049
|
-
|
|
32050
|
-
|
|
32051
|
-
|
|
32052
|
-
|
|
32053
|
-
|
|
32054
|
-
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
if (
|
|
32060
|
-
|
|
32061
|
-
|
|
32062
|
-
|
|
32063
|
-
|
|
32064
|
-
|
|
32065
|
-
|
|
32066
|
-
|
|
32067
|
-
|
|
32068
|
-
|
|
32069
|
-
|
|
32070
|
-
|
|
32071
|
-
|
|
32072
|
-
|
|
32073
|
-
|
|
32074
|
-
|
|
32075
|
-
|
|
32076
|
-
|
|
32077
|
-
|
|
32078
|
-
}
|
|
32079
|
-
|
|
32080
|
-
|
|
32081
|
-
|
|
32082
|
-
|
|
32083
|
-
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
|
|
32087
|
-
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32091
|
-
|
|
32092
|
-
|
|
32093
|
-
|
|
32094
|
-
|
|
32095
|
-
|
|
32096
|
-
|
|
32097
|
-
|
|
32098
|
-
|
|
32099
|
-
|
|
31749
|
+
const PhoneInput$1 = lib.default || lib;
|
|
31750
|
+
const source_url = window.location.href;
|
|
31751
|
+
function WidgetInitForm({
|
|
31752
|
+
companyUser,
|
|
31753
|
+
dataRef,
|
|
31754
|
+
company_id,
|
|
31755
|
+
setState: setParentState,
|
|
31756
|
+
setIsScheduling,
|
|
31757
|
+
fields,
|
|
31758
|
+
widgetColor
|
|
31759
|
+
}) {
|
|
31760
|
+
const [{
|
|
31761
|
+
ipAddress,
|
|
31762
|
+
country,
|
|
31763
|
+
longitude,
|
|
31764
|
+
latitude,
|
|
31765
|
+
location: location2,
|
|
31766
|
+
country_code
|
|
31767
|
+
}, setState] = useState({
|
|
31768
|
+
ipAddress: void 0,
|
|
31769
|
+
country: "",
|
|
31770
|
+
longitude: void 0,
|
|
31771
|
+
latitude: void 0,
|
|
31772
|
+
location: "",
|
|
31773
|
+
country_code: ""
|
|
31774
|
+
});
|
|
31775
|
+
const [mobile, setMobile] = useState("");
|
|
31776
|
+
const validSchema = react.exports.useMemo(() => {
|
|
31777
|
+
const shape = {
|
|
31778
|
+
name: create$4().required("Required Field").typeError("Name is expected"),
|
|
31779
|
+
email: create$4().email("Incorrect format").required("Required Field"),
|
|
31780
|
+
message: create$4().required("Required").typeError("message is expected")
|
|
31781
|
+
};
|
|
31782
|
+
const possibleShape = {
|
|
31783
|
+
account: create$3().min(10, "Invalid account no").required("Required").positive().typeError("A number is expected"),
|
|
31784
|
+
bvn: create$3().min(11, "Invalid BVN").required("Required Field").positive().typeError("A number is expected")
|
|
31785
|
+
};
|
|
31786
|
+
const fieldKeys = ["account", "bvn"];
|
|
31787
|
+
fieldKeys.map((key2) => {
|
|
31788
|
+
if (fields[key2].show) {
|
|
31789
|
+
shape[key2] = possibleShape[key2];
|
|
31790
|
+
}
|
|
31791
|
+
});
|
|
31792
|
+
return create$1().shape(shape);
|
|
31793
|
+
}, [fields]);
|
|
31794
|
+
react.exports.useEffect(() => {
|
|
31795
|
+
axios.get("https://ipapi.co/json/").then((data2) => {
|
|
31796
|
+
const {
|
|
31797
|
+
ip,
|
|
31798
|
+
region,
|
|
31799
|
+
country_name,
|
|
31800
|
+
longitude: longitude2,
|
|
31801
|
+
latitude: latitude2,
|
|
31802
|
+
country_code: country_code2
|
|
31803
|
+
} = data2.data;
|
|
31804
|
+
setState({
|
|
31805
|
+
ipAddress: ip,
|
|
31806
|
+
country: country_name,
|
|
31807
|
+
longitude: longitude2,
|
|
31808
|
+
latitude: latitude2,
|
|
31809
|
+
location: region,
|
|
31810
|
+
country_code: country_code2
|
|
31811
|
+
});
|
|
31812
|
+
const requestObject = {
|
|
31813
|
+
ip_address: ip,
|
|
31814
|
+
location: location2,
|
|
31815
|
+
country,
|
|
31816
|
+
longitude: longitude2,
|
|
31817
|
+
latitude: latitude2,
|
|
31818
|
+
company: company_id,
|
|
31819
|
+
source_url
|
|
31820
|
+
};
|
|
31821
|
+
createVisitor(requestObject);
|
|
31822
|
+
}).catch((error) => toast.error("Error occured, try again", {
|
|
31823
|
+
autoClose: 2e3
|
|
31824
|
+
}));
|
|
31825
|
+
}, []);
|
|
31826
|
+
const {
|
|
31827
|
+
isError: isError2,
|
|
31828
|
+
isLoading,
|
|
31829
|
+
mutate
|
|
31830
|
+
} = useMutation(({
|
|
31831
|
+
name,
|
|
31832
|
+
email,
|
|
31833
|
+
message,
|
|
31834
|
+
...emptyFields
|
|
31835
|
+
}) => api(`/messages/init`, {
|
|
31836
|
+
name,
|
|
31837
|
+
email,
|
|
31838
|
+
credentials: mobile ? {
|
|
31839
|
+
mobile,
|
|
31840
|
+
...emptyFields
|
|
31841
|
+
} : {
|
|
31842
|
+
...emptyFields
|
|
31843
|
+
},
|
|
31844
|
+
message,
|
|
31845
|
+
company: company_id,
|
|
31846
|
+
ip_address: ipAddress,
|
|
31847
|
+
country,
|
|
31848
|
+
latitude,
|
|
31849
|
+
longitude,
|
|
31850
|
+
location: location2,
|
|
31851
|
+
source_url
|
|
31852
|
+
}, "post"), {
|
|
31853
|
+
onError: (err) => {
|
|
31854
|
+
toast.error("Error occured, try again", {
|
|
31855
|
+
autoClose: 2e3
|
|
31856
|
+
});
|
|
31857
|
+
},
|
|
31858
|
+
onSuccess: async ({
|
|
31859
|
+
status,
|
|
31860
|
+
...data2
|
|
31861
|
+
}) => {
|
|
31862
|
+
if (status) {
|
|
31863
|
+
dataRef.current = data2;
|
|
31864
|
+
setParentState({
|
|
31865
|
+
chatInit: true
|
|
31866
|
+
});
|
|
31867
|
+
}
|
|
31868
|
+
}
|
|
31869
|
+
});
|
|
31870
|
+
const regexPattern = /^[a-zA-Z\s]*$/;
|
|
31871
|
+
return /* @__PURE__ */ jsx("div", {
|
|
31872
|
+
className: "pb-1 chat-init-form m-auto scroller",
|
|
31873
|
+
children: /* @__PURE__ */ jsx(Formik, {
|
|
31874
|
+
validationSchema: validSchema,
|
|
31875
|
+
onSubmit: mutate,
|
|
31876
|
+
initialValues: {
|
|
31877
|
+
email: companyUser == null ? void 0 : companyUser.email,
|
|
31878
|
+
account: companyUser == null ? void 0 : companyUser.account,
|
|
31879
|
+
bvn: companyUser == null ? void 0 : companyUser.bvn,
|
|
31880
|
+
message: "",
|
|
31881
|
+
name: ""
|
|
31882
|
+
},
|
|
31883
|
+
children: (formik) => /* @__PURE__ */ jsxs(Form$1, {
|
|
31884
|
+
onSubmit: formik.handleSubmit,
|
|
31885
|
+
children: [isError2 ? /* @__PURE__ */ jsx(Alert, {
|
|
31886
|
+
className: "mt-2 mb-0 p-0 px-2",
|
|
31887
|
+
color: "danger",
|
|
31888
|
+
children: 'Error has occured... Please try again"'
|
|
31889
|
+
}) : "", /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31890
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31891
|
+
size: "sm",
|
|
31892
|
+
for: "name",
|
|
31893
|
+
children: "Full Name"
|
|
31894
|
+
}), /* @__PURE__ */ jsx(Input$1, {
|
|
31895
|
+
name: "name",
|
|
31896
|
+
onChange: (e2) => {
|
|
31897
|
+
if (e2.target.value === "" || regexPattern.test(e2.target.value)) {
|
|
31898
|
+
return formik.handleChange(e2);
|
|
31899
|
+
}
|
|
31900
|
+
},
|
|
31901
|
+
onBlur: formik.handleBlur,
|
|
31902
|
+
value: formik.values.name,
|
|
31903
|
+
valid: formik.touched.name && !formik.errors.name,
|
|
31904
|
+
invalid: formik.touched.name && !!formik.errors.name,
|
|
31905
|
+
placeholder: "Enter full name",
|
|
31906
|
+
bsSize: "lg",
|
|
31907
|
+
style: {
|
|
31908
|
+
borderRadius: 50,
|
|
31909
|
+
fontSize: 16
|
|
31910
|
+
}
|
|
31911
|
+
}), /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
31912
|
+
invalid: true,
|
|
31913
|
+
children: formik.errors.name
|
|
31914
|
+
})]
|
|
31915
|
+
}), /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31916
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31917
|
+
size: "sm",
|
|
31918
|
+
for: "email",
|
|
31919
|
+
children: "Email Address"
|
|
31920
|
+
}), /* @__PURE__ */ jsx(Input$1, {
|
|
31921
|
+
disabled: !!(companyUser == null ? void 0 : companyUser.email),
|
|
31922
|
+
name: "email",
|
|
31923
|
+
onChange: formik.handleChange,
|
|
31924
|
+
onBlur: formik.handleBlur,
|
|
31925
|
+
value: formik.values.email,
|
|
31926
|
+
valid: formik.touched.email && !formik.errors.email,
|
|
31927
|
+
invalid: formik.touched.email && !!formik.errors.email,
|
|
31928
|
+
placeholder: "",
|
|
31929
|
+
bsSize: "lg",
|
|
31930
|
+
style: {
|
|
31931
|
+
borderRadius: 50,
|
|
31932
|
+
fontSize: 16
|
|
31933
|
+
}
|
|
31934
|
+
}), /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
31935
|
+
invalid: true,
|
|
31936
|
+
children: formik.errors.email
|
|
31937
|
+
})]
|
|
31938
|
+
}), Object.keys(fields || {}).map((key2) => {
|
|
31939
|
+
if (fields[key2].show === true) {
|
|
31940
|
+
if (key2 === "mobile") {
|
|
31941
|
+
return /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31942
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31943
|
+
size: "sm",
|
|
31944
|
+
for: key2,
|
|
31945
|
+
children: fields[key2].label || capitalizeFirstLetters(key2)
|
|
31946
|
+
}), /* @__PURE__ */ jsx(PhoneInput$1, {
|
|
31947
|
+
country: country_code.toLowerCase(),
|
|
31948
|
+
placeholder: fields[key2].placeholder || `Enter ${key2}`,
|
|
31949
|
+
value: mobile,
|
|
31950
|
+
inputProps: {
|
|
31951
|
+
name: key2,
|
|
31952
|
+
required: true
|
|
31953
|
+
},
|
|
31954
|
+
enableSearch: true,
|
|
31955
|
+
onChange: setMobile
|
|
31956
|
+
})]
|
|
31957
|
+
}, key2);
|
|
31958
|
+
} else {
|
|
31959
|
+
return /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31960
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31961
|
+
size: "sm",
|
|
31962
|
+
for: key2,
|
|
31963
|
+
children: fields[key2].label || capitalizeFirstLetters(key2)
|
|
31964
|
+
}), /* @__PURE__ */ jsx(Input$1, {
|
|
31965
|
+
name: key2,
|
|
31966
|
+
type: "number",
|
|
31967
|
+
onChange: formik.handleChange,
|
|
31968
|
+
onBlur: formik.handleBlur,
|
|
31969
|
+
value: formik.values[key2],
|
|
31970
|
+
valid: formik.touched[key2] && !formik.errors[key2],
|
|
31971
|
+
invalid: formik.touched[key2] && !!formik.errors[key2],
|
|
31972
|
+
placeholder: fields[key2].placeholder || `Enter ${key2}`,
|
|
31973
|
+
bsSize: "lg",
|
|
31974
|
+
style: {
|
|
31975
|
+
borderRadius: 50,
|
|
31976
|
+
fontSize: 16
|
|
31977
|
+
}
|
|
31978
|
+
}), /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
31979
|
+
invalid: true,
|
|
31980
|
+
children: formik.errors[key2]
|
|
31981
|
+
})]
|
|
31982
|
+
}, key2);
|
|
31983
|
+
}
|
|
31984
|
+
}
|
|
31985
|
+
}), /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31986
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31987
|
+
size: "sm",
|
|
31988
|
+
for: "message",
|
|
31989
|
+
children: "Message"
|
|
31990
|
+
}), /* @__PURE__ */ jsx(Input$1, {
|
|
31991
|
+
name: "message",
|
|
31992
|
+
autoComplete: "off",
|
|
31993
|
+
onChange: formik.handleChange,
|
|
31994
|
+
onBlur: formik.handleBlur,
|
|
31995
|
+
value: formik.values.message,
|
|
31996
|
+
valid: formik.touched.message && !formik.errors.message,
|
|
31997
|
+
invalid: formik.touched.message && !!formik.errors.message,
|
|
31998
|
+
placeholder: "Type your message here",
|
|
31999
|
+
bsSize: "lg",
|
|
32000
|
+
style: {
|
|
32001
|
+
borderRadius: 15,
|
|
32002
|
+
height: 60,
|
|
32003
|
+
fontSize: 16
|
|
32004
|
+
}
|
|
32005
|
+
}), /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
32006
|
+
invalid: true,
|
|
32007
|
+
children: formik.errors.message
|
|
32008
|
+
})]
|
|
32009
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
32010
|
+
className: "mt-3 mb-0",
|
|
32011
|
+
style: {
|
|
32012
|
+
justifyContent: "space-between",
|
|
32013
|
+
alignItems: "center"
|
|
32014
|
+
},
|
|
32015
|
+
children: [/* @__PURE__ */ jsxs(Button$1, {
|
|
32016
|
+
type: "submit",
|
|
32017
|
+
className: "d-flex justify-content-center align-items-center btn btn-lg btn-block btn-login-clr p-0",
|
|
32018
|
+
style: {
|
|
32019
|
+
borderRadius: 50,
|
|
32020
|
+
outline: 0,
|
|
32021
|
+
backgroundColor: `${widgetColor}`
|
|
32022
|
+
},
|
|
32023
|
+
children: [isLoading ? /* @__PURE__ */ jsx(Spinner$2, {
|
|
32024
|
+
color: "light",
|
|
32025
|
+
size: "sm"
|
|
32026
|
+
}) : "", /* @__PURE__ */ jsx("span", {
|
|
32027
|
+
className: "ml-1",
|
|
32028
|
+
children: "Start Banking"
|
|
32029
|
+
})]
|
|
32030
|
+
}), /* @__PURE__ */ jsx(Button$1, {
|
|
32031
|
+
outline: true,
|
|
32032
|
+
onClick: () => setIsScheduling(true),
|
|
32033
|
+
className: "mt-1 mb-1 py-1 px-4 col",
|
|
32034
|
+
children: "Scheduled Meeting"
|
|
32035
|
+
})]
|
|
32036
|
+
})]
|
|
32037
|
+
})
|
|
32038
|
+
})
|
|
32039
|
+
});
|
|
32040
|
+
}
|
|
32041
|
+
const WidgetInitForm$1 = react.exports.memo(WidgetInitForm);
|
|
32042
|
+
const maximizeIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAEAQAAAA5p3UDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAAAGAAAABgAPBrQs8AAAAHdElNRQflCh0XODE9tr5GAAACo0lEQVR42u3dTU7jQBBA4TaaHacJKJgkErDlSFnB7TgNGCPWLhYlIcEMY/ePqXTX+9btVpl+RAgpdggAAAAAAMCLbm6BiMivDtR1szOhnDPrAWCLAJwjAOcIwDkCcI4AnCMA51YKYByD9H2XwPoHgm8k2eurTH1vPT8ypQdABE3IC4AIqpcfABFUbf5wh2FZBMMg03ZrfT+INH+wm43I8zOfBI2aO1JdQwTNWhKAriOCJi0NQNcSQXNiAtD1RNCU2AD0mouLqAjk+tr6PvGDlAD0OiJoQmoAei0RVC8nAL2eCKqWG4DuERPBOBLBCSkRgO5DBFUqFYDuRQTVKRmA7kcEVSkdgO5JBO5pBC8vROCYyOXl4gim93eZbm6sZ0ZhRAAiQEIEcntrPTMKIwIQAYgAgQgQQhDZ7fSfQETgFhEgIYK7O+uZURgRrKOaJ4R03dNTCPf3Iby9zS8+Pw9ht7OeGStY9knw8GA9J1b0/wg4fBf+HQGH78rXCDh8l0QOB5Hj0XoOAAAAAAAAAAAAAAAAAEC1RI5HkcPBeg4YEHl85LuITn0ePl9I9eevwycCP348fCJon/7Bt8Q4iuz31vOiMJH9nodUOEcEiH9IBU80bQ8RgAhABAhEgBAZAW8+aRMRIO7ZxkTQJiIAEYAIEGIjSH9r+tzO1j8H134jAgI4cdERTH0ftz8BnLw1IyCASqwVAQFURCNY+tb0ZREQQGX0renlIiCACpWMgAAqVSoCAqhYiQgIoHK5ERBAA3IiIIBGxEdwdaXXEUAzUiIggMbItN2KDMOyCObXWd8PEsR9EhBAk0Q2mxIRWN8HMpSIwPoekCk3Auv5UUBOBHN7/7G+OW9O7bfyzHoA2CIA5wjAOQJwjgCcIwDnCAAAAAAAAMCJD8ZQvP1zR7rXAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTEwLTI5VDIzOjU2OjQ5KzAwOjAwRquYIgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMC0yOVQyMzo1Njo0OSswMDowMDf2IJ4AAAAASUVORK5CYII=";
|
|
32043
|
+
var events = { exports: {} };
|
|
32044
|
+
var R = typeof Reflect === "object" ? Reflect : null;
|
|
32045
|
+
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
32046
|
+
return Function.prototype.apply.call(target, receiver, args);
|
|
32047
|
+
};
|
|
32048
|
+
var ReflectOwnKeys;
|
|
32049
|
+
if (R && typeof R.ownKeys === "function") {
|
|
32050
|
+
ReflectOwnKeys = R.ownKeys;
|
|
32051
|
+
} else if (Object.getOwnPropertySymbols) {
|
|
32052
|
+
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
32053
|
+
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
32054
|
+
};
|
|
32055
|
+
} else {
|
|
32056
|
+
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
32057
|
+
return Object.getOwnPropertyNames(target);
|
|
32058
|
+
};
|
|
32059
|
+
}
|
|
32060
|
+
function ProcessEmitWarning(warning2) {
|
|
32061
|
+
if (console && console.warn)
|
|
32062
|
+
console.warn(warning2);
|
|
32063
|
+
}
|
|
32064
|
+
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value2) {
|
|
32065
|
+
return value2 !== value2;
|
|
32066
|
+
};
|
|
32067
|
+
function EventEmitter() {
|
|
32068
|
+
EventEmitter.init.call(this);
|
|
32069
|
+
}
|
|
32070
|
+
events.exports = EventEmitter;
|
|
32071
|
+
events.exports.once = once2;
|
|
32072
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
32073
|
+
EventEmitter.prototype._events = void 0;
|
|
32074
|
+
EventEmitter.prototype._eventsCount = 0;
|
|
32075
|
+
EventEmitter.prototype._maxListeners = void 0;
|
|
32076
|
+
var defaultMaxListeners = 10;
|
|
32077
|
+
function checkListener(listener) {
|
|
32078
|
+
if (typeof listener !== "function") {
|
|
32079
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
32080
|
+
}
|
|
32081
|
+
}
|
|
32082
|
+
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
32083
|
+
enumerable: true,
|
|
32084
|
+
get: function() {
|
|
32085
|
+
return defaultMaxListeners;
|
|
32086
|
+
},
|
|
32087
|
+
set: function(arg) {
|
|
32088
|
+
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
32089
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
32090
|
+
}
|
|
32091
|
+
defaultMaxListeners = arg;
|
|
32092
|
+
}
|
|
32093
|
+
});
|
|
32094
|
+
EventEmitter.init = function() {
|
|
32095
|
+
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
32096
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
32097
|
+
this._eventsCount = 0;
|
|
32098
|
+
}
|
|
32099
|
+
this._maxListeners = this._maxListeners || void 0;
|
|
32100
|
+
};
|
|
32101
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n2) {
|
|
32102
|
+
if (typeof n2 !== "number" || n2 < 0 || NumberIsNaN(n2)) {
|
|
32103
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n2 + ".");
|
|
32104
|
+
}
|
|
32105
|
+
this._maxListeners = n2;
|
|
32106
|
+
return this;
|
|
32107
|
+
};
|
|
32108
|
+
function _getMaxListeners(that) {
|
|
32109
|
+
if (that._maxListeners === void 0)
|
|
32110
|
+
return EventEmitter.defaultMaxListeners;
|
|
32111
|
+
return that._maxListeners;
|
|
32112
|
+
}
|
|
32113
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
32114
|
+
return _getMaxListeners(this);
|
|
32115
|
+
};
|
|
32116
|
+
EventEmitter.prototype.emit = function emit(type) {
|
|
32117
|
+
var args = [];
|
|
32118
|
+
for (var i2 = 1; i2 < arguments.length; i2++)
|
|
32119
|
+
args.push(arguments[i2]);
|
|
32120
|
+
var doError = type === "error";
|
|
32121
|
+
var events2 = this._events;
|
|
32122
|
+
if (events2 !== void 0)
|
|
32123
|
+
doError = doError && events2.error === void 0;
|
|
32124
|
+
else if (!doError)
|
|
32125
|
+
return false;
|
|
32126
|
+
if (doError) {
|
|
32127
|
+
var er;
|
|
32128
|
+
if (args.length > 0)
|
|
32129
|
+
er = args[0];
|
|
32130
|
+
if (er instanceof Error) {
|
|
32131
|
+
throw er;
|
|
32132
|
+
}
|
|
32133
|
+
var err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
|
32134
|
+
err.context = er;
|
|
32135
|
+
throw err;
|
|
32136
|
+
}
|
|
32137
|
+
var handler = events2[type];
|
|
32138
|
+
if (handler === void 0)
|
|
32139
|
+
return false;
|
|
32140
|
+
if (typeof handler === "function") {
|
|
32141
|
+
ReflectApply(handler, this, args);
|
|
32142
|
+
} else {
|
|
32143
|
+
var len = handler.length;
|
|
32144
|
+
var listeners2 = arrayClone(handler, len);
|
|
32145
|
+
for (var i2 = 0; i2 < len; ++i2)
|
|
32146
|
+
ReflectApply(listeners2[i2], this, args);
|
|
32147
|
+
}
|
|
32148
|
+
return true;
|
|
32149
|
+
};
|
|
32150
|
+
function _addListener(target, type, listener, prepend) {
|
|
32151
|
+
var m2;
|
|
32152
|
+
var events2;
|
|
32153
|
+
var existing;
|
|
32154
|
+
checkListener(listener);
|
|
32155
|
+
events2 = target._events;
|
|
32156
|
+
if (events2 === void 0) {
|
|
32157
|
+
events2 = target._events = /* @__PURE__ */ Object.create(null);
|
|
32158
|
+
target._eventsCount = 0;
|
|
32159
|
+
} else {
|
|
32160
|
+
if (events2.newListener !== void 0) {
|
|
32161
|
+
target.emit(
|
|
32162
|
+
"newListener",
|
|
32163
|
+
type,
|
|
32164
|
+
listener.listener ? listener.listener : listener
|
|
32165
|
+
);
|
|
32166
|
+
events2 = target._events;
|
|
32167
|
+
}
|
|
32168
|
+
existing = events2[type];
|
|
32169
|
+
}
|
|
32170
|
+
if (existing === void 0) {
|
|
32171
|
+
existing = events2[type] = listener;
|
|
32172
|
+
++target._eventsCount;
|
|
32173
|
+
} else {
|
|
32174
|
+
if (typeof existing === "function") {
|
|
32175
|
+
existing = events2[type] = prepend ? [listener, existing] : [existing, listener];
|
|
32176
|
+
} else if (prepend) {
|
|
32177
|
+
existing.unshift(listener);
|
|
32178
|
+
} else {
|
|
32179
|
+
existing.push(listener);
|
|
32180
|
+
}
|
|
32100
32181
|
m2 = _getMaxListeners(target);
|
|
32101
32182
|
if (m2 > 0 && existing.length > m2 && !existing.warned) {
|
|
32102
32183
|
existing.warned = true;
|
|
@@ -41475,7 +41556,213 @@ const useRequest = ({ asyncRequest, params, ...props }, dep) => {
|
|
|
41475
41556
|
);
|
|
41476
41557
|
return { setState, next, ...rest };
|
|
41477
41558
|
};
|
|
41478
|
-
const
|
|
41559
|
+
const SvgCheckedCircle = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41560
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41561
|
+
width: 50.003,
|
|
41562
|
+
height: 50.003,
|
|
41563
|
+
viewBox: "0 0 50.003 50.003",
|
|
41564
|
+
...props
|
|
41565
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41566
|
+
id: "check_1_",
|
|
41567
|
+
"data-name": "check (1)",
|
|
41568
|
+
d: "M25,0A25,25,0,1,0,50,25,25.029,25.029,0,0,0,25,0ZM37.673,19.7,24.131,33.246a2.081,2.081,0,0,1-2.946,0l-6.771-6.771a2.083,2.083,0,0,1,2.946-2.946l5.3,5.3,12.07-12.069A2.083,2.083,0,1,1,37.673,19.7Zm0,0",
|
|
41569
|
+
fill: "#083047"
|
|
41570
|
+
}));
|
|
41571
|
+
const SvgPhone = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41572
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41573
|
+
className: "h-6 w-6",
|
|
41574
|
+
fill: "none",
|
|
41575
|
+
viewBox: "0 0 24 24",
|
|
41576
|
+
stroke: "currentColor",
|
|
41577
|
+
...props
|
|
41578
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41579
|
+
strokeLinecap: "round",
|
|
41580
|
+
strokeLinejoin: "round",
|
|
41581
|
+
strokeWidth: 2,
|
|
41582
|
+
d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"
|
|
41583
|
+
}));
|
|
41584
|
+
const SvgExpand = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41585
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41586
|
+
className: "h-6 w-6",
|
|
41587
|
+
fill: "none",
|
|
41588
|
+
viewBox: "0 0 24 24",
|
|
41589
|
+
stroke: "currentColor",
|
|
41590
|
+
...props
|
|
41591
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41592
|
+
strokeLinecap: "round",
|
|
41593
|
+
strokeLinejoin: "round",
|
|
41594
|
+
strokeWidth: 2,
|
|
41595
|
+
d: "M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"
|
|
41596
|
+
}));
|
|
41597
|
+
const SvgMic = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41598
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41599
|
+
className: "h-6 w-6",
|
|
41600
|
+
fill: "none",
|
|
41601
|
+
viewBox: "0 0 24 24",
|
|
41602
|
+
stroke: "currentColor",
|
|
41603
|
+
...props
|
|
41604
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41605
|
+
strokeLinecap: "round",
|
|
41606
|
+
strokeLinejoin: "round",
|
|
41607
|
+
strokeWidth: 2,
|
|
41608
|
+
d: "M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"
|
|
41609
|
+
}));
|
|
41610
|
+
const SvgMicOffCircle = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41611
|
+
width: "24px",
|
|
41612
|
+
height: "24px",
|
|
41613
|
+
viewBox: "0 0 24 24",
|
|
41614
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41615
|
+
...props
|
|
41616
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41617
|
+
fillRule: "evenodd",
|
|
41618
|
+
d: "M5.7041396,5.70414456 L19.0710678,19.0710678 C19.4615921,19.4615921 19.4615921,20.0947571 19.0710678,20.4852814 C18.6805435,20.8758057 18.0473786,20.8758057 17.6568543,20.4852814 L16.063838,18.892419 C15.1449713,19.4353613 14.1081016,19.7997927 13.0009551,19.9379871 L13,21 C13,21.5522847 12.5522848,22 12,22 C11.4477153,22 11,21.5522847 11,21 L11.0000487,19.9381123 C7.05371357,19.4460359 4.00000002,16.0796344 4.00000002,12 C4.00000002,11.4477153 4.44771527,11 5.00000002,11 C5.55228477,11 6.00000002,11.4477153 6.00000002,12 C6.00000002,15.3137085 8.68629152,18 12,18 C12.9259358,18 13.8028836,17.7902576 14.5859245,17.4156917 L13.0348641,15.8648402 C12.7047768,15.9530016 12.3578769,16 12,16 C9.79086102,16 8.00000002,14.209139 8.00000002,12 L7.99993201,10.829 L4.29182523,7.12025233 C3.90130094,6.72972804 3.90130094,6.09656306 4.29182523,5.70603877 C4.68171709,5.31614691 5.3134644,5.3155155 5.7041396,5.70414456 Z M19,11 C19.5522848,11 20,11.4477153 20,12 C20,13.483507 19.5962013,14.8727017 18.8925188,16.0636691 L17.4155089,14.5863067 C17.7901893,13.803169 18,12.9260864 18,12 C18,11.4477153 18.4477153,11 19,11 Z M12,2 C14.209139,2 16,3.790861 16,6 L16,12 C16,12.3579355 15.9529862,12.7048904 15.8647969,13.0350263 L13.999932,11.171 L14,6 C14,4.8954305 13.1045695,4 12,4 C10.8954305,4 10,4.8954305 10,6 L9.99993201,7.171 L8.07145159,5.24342122 C8.4251078,3.39603916 10.0495227,2 12,2 Z"
|
|
41619
|
+
}));
|
|
41620
|
+
const SvgPhoneMissed = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41621
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41622
|
+
className: "h-6 w-6",
|
|
41623
|
+
fill: "none",
|
|
41624
|
+
viewBox: "0 0 24 24",
|
|
41625
|
+
stroke: "currentColor",
|
|
41626
|
+
...props
|
|
41627
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41628
|
+
strokeLinecap: "round",
|
|
41629
|
+
strokeLinejoin: "round",
|
|
41630
|
+
strokeWidth: 2,
|
|
41631
|
+
d: "M16 8l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M5 3a2 2 0 00-2 2v1c0 8.284 6.716 15 15 15h1a2 2 0 002-2v-3.28a1 1 0 00-.684-.948l-4.493-1.498a1 1 0 00-1.21.502l-1.13 2.257a11.042 11.042 0 01-5.516-5.517l2.257-1.128a1 1 0 00.502-1.21L9.228 3.683A1 1 0 008.279 3H5z"
|
|
41632
|
+
}));
|
|
41633
|
+
const SvgDesktop = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41634
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41635
|
+
className: "h-6 w-6",
|
|
41636
|
+
fill: "none",
|
|
41637
|
+
viewBox: "0 0 24 24",
|
|
41638
|
+
stroke: "currentColor",
|
|
41639
|
+
...props
|
|
41640
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41641
|
+
strokeLinecap: "round",
|
|
41642
|
+
strokeLinejoin: "round",
|
|
41643
|
+
strokeWidth: 2,
|
|
41644
|
+
d: "M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
|
|
41645
|
+
}));
|
|
41646
|
+
const SvgVideoOff = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41647
|
+
width: "1em",
|
|
41648
|
+
height: "1em",
|
|
41649
|
+
viewBox: "0 0 16 16",
|
|
41650
|
+
className: "bi bi-camera-video-off",
|
|
41651
|
+
fill: "currentColor",
|
|
41652
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41653
|
+
...props
|
|
41654
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41655
|
+
fillRule: "evenodd",
|
|
41656
|
+
d: "M10.961 12.365a1.99 1.99 0 0 0 .522-1.103l3.11 1.382A1 1 0 0 0 16 11.731V4.269a1 1 0 0 0-1.406-.913l-3.111 1.382A2 2 0 0 0 9.5 3H4.272l.714 1H9.5a1 1 0 0 1 1 1v6a1 1 0 0 1-.144.518l.605.847zM1.428 4.18A.999.999 0 0 0 1 5v6a1 1 0 0 0 1 1h5.014l.714 1H2a2 2 0 0 1-2-2V5c0-.675.334-1.272.847-1.634l.58.814zM15 11.73l-3.5-1.555v-4.35L15 4.269v7.462zm-4.407 3.56l-10-14 .814-.58 10 14-.814.58z"
|
|
41657
|
+
}));
|
|
41658
|
+
const SvgVideoAlt = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41659
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41660
|
+
className: "h-6 w-6",
|
|
41661
|
+
fill: "none",
|
|
41662
|
+
viewBox: "0 0 24 24",
|
|
41663
|
+
stroke: "currentColor",
|
|
41664
|
+
...props
|
|
41665
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41666
|
+
strokeLinecap: "round",
|
|
41667
|
+
strokeLinejoin: "round",
|
|
41668
|
+
strokeWidth: 2,
|
|
41669
|
+
d: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"
|
|
41670
|
+
}));
|
|
41671
|
+
const SvgCamera = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41672
|
+
id: "Icons",
|
|
41673
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41674
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
41675
|
+
x: "0px",
|
|
41676
|
+
y: "0px",
|
|
41677
|
+
viewBox: "0 0 32 32",
|
|
41678
|
+
style: {
|
|
41679
|
+
enableBackground: "new 0 0 32 32"
|
|
41680
|
+
},
|
|
41681
|
+
xmlSpace: "preserve",
|
|
41682
|
+
width: 45,
|
|
41683
|
+
height: 26.9022,
|
|
41684
|
+
...props
|
|
41685
|
+
}, /* @__PURE__ */ react.exports.createElement("style", {
|
|
41686
|
+
type: "text/css"
|
|
41687
|
+
}, "\n .st0{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}\n"), /* @__PURE__ */ react.exports.createElement("g", null, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41688
|
+
d: "M17,8H6c-1.7,0-3,1.3-3,3v10c0,1.7,1.3,3,3,3h11c1.7,0,3-1.3,3-3V11C20,9.3,18.7,8,17,8z",
|
|
41689
|
+
id: "id_101",
|
|
41690
|
+
className: "",
|
|
41691
|
+
fill: "#ffffff"
|
|
41692
|
+
}), /* @__PURE__ */ react.exports.createElement("path", {
|
|
41693
|
+
d: "M28.5,8.1c-0.3-0.2-0.7-0.2-1,0l-5,3C22.2,11.3,22,11.6,22,12v8c0,0.4,0.2,0.7,0.5,0.9l5,3C27.6,24,27.8,24,28,24 c0.2,0,0.3,0,0.5-0.1c0.3-0.2,0.5-0.5,0.5-0.9V9C29,8.6,28.8,8.3,28.5,8.1z",
|
|
41694
|
+
id: "id_102",
|
|
41695
|
+
className: "",
|
|
41696
|
+
fill: "#ffffff"
|
|
41697
|
+
})));
|
|
41698
|
+
const SvgEllipse = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41699
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41700
|
+
width: 16,
|
|
41701
|
+
height: 16,
|
|
41702
|
+
fill: "currentColor",
|
|
41703
|
+
className: "bi bi-calendar-range",
|
|
41704
|
+
viewBox: "0 0 16 16",
|
|
41705
|
+
...props
|
|
41706
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41707
|
+
d: "M9 7a1 1 0 0 1 1-1h5v2h-5a1 1 0 0 1-1-1zM1 9h4a1 1 0 0 1 0 2H1V9z"
|
|
41708
|
+
}), /* @__PURE__ */ react.exports.createElement("path", {
|
|
41709
|
+
d: "M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"
|
|
41710
|
+
}));
|
|
41711
|
+
const calendars = (params) => api("/calendars", params);
|
|
41712
|
+
const viewCalendar = (id2, params) => api("/calendars/" + id2, params);
|
|
41713
|
+
const updateCalendar = (id2, params) => api("/calendars/" + id2, params, "put");
|
|
41714
|
+
const schedule = (params) => api("/calendars", params, "post");
|
|
41715
|
+
const Pressable = react.exports.memo(({
|
|
41716
|
+
children,
|
|
41717
|
+
style: style2 = {},
|
|
41718
|
+
...p2
|
|
41719
|
+
}) => /* @__PURE__ */ jsx("div", {
|
|
41720
|
+
...p2,
|
|
41721
|
+
style: {
|
|
41722
|
+
...styles$2.pressable,
|
|
41723
|
+
...style2
|
|
41724
|
+
},
|
|
41725
|
+
children
|
|
41726
|
+
}));
|
|
41727
|
+
const Text = react.exports.memo(({
|
|
41728
|
+
children,
|
|
41729
|
+
...p2
|
|
41730
|
+
}) => /* @__PURE__ */ jsx("div", {
|
|
41731
|
+
...p2,
|
|
41732
|
+
children
|
|
41733
|
+
}));
|
|
41734
|
+
const styles$2 = {
|
|
41735
|
+
pressable: {
|
|
41736
|
+
cursor: "pointer"
|
|
41737
|
+
}
|
|
41738
|
+
};
|
|
41739
|
+
const input = "_input_1ps5x_1";
|
|
41740
|
+
const offline_input = "_offline_input_1ps5x_7";
|
|
41741
|
+
const scheduleBtn = "_scheduleBtn_1ps5x_13";
|
|
41742
|
+
const schTitle = "_schTitle_1ps5x_18";
|
|
41743
|
+
const schAvatar = "_schAvatar_1ps5x_23";
|
|
41744
|
+
const schIconCon = "_schIconCon_1ps5x_29";
|
|
41745
|
+
const schedules = "_schedules_1ps5x_36";
|
|
41746
|
+
const reason = "_reason_1ps5x_40";
|
|
41747
|
+
const schTime = "_schTime_1ps5x_45";
|
|
41748
|
+
const schActionBtn = "_schActionBtn_1ps5x_49";
|
|
41749
|
+
const schActionBtnJoin = "_schActionBtnJoin_1ps5x_49";
|
|
41750
|
+
const schActionBtnPending = "_schActionBtnPending_1ps5x_49";
|
|
41751
|
+
const styles$1 = {
|
|
41752
|
+
input,
|
|
41753
|
+
offline_input,
|
|
41754
|
+
scheduleBtn,
|
|
41755
|
+
schTitle,
|
|
41756
|
+
schAvatar,
|
|
41757
|
+
schIconCon,
|
|
41758
|
+
schedules,
|
|
41759
|
+
reason,
|
|
41760
|
+
schTime,
|
|
41761
|
+
schActionBtn,
|
|
41762
|
+
schActionBtnJoin,
|
|
41763
|
+
schActionBtnPending
|
|
41764
|
+
};
|
|
41765
|
+
const PhoneInput = lib.default || lib;
|
|
41479
41766
|
const days$1 = {
|
|
41480
41767
|
Monday: 1,
|
|
41481
41768
|
Tuesday: 2,
|
|
@@ -41665,7 +41952,10 @@ const Offline = react.exports.memo(({
|
|
|
41665
41952
|
});
|
|
41666
41953
|
};
|
|
41667
41954
|
return /* @__PURE__ */ jsx("div", {
|
|
41668
|
-
className:
|
|
41955
|
+
className: `signin-page offline pt-1 px-1 m-auto mt-5`,
|
|
41956
|
+
styles: {
|
|
41957
|
+
borderRadius: "8px"
|
|
41958
|
+
},
|
|
41669
41959
|
children: scheduled ? /* @__PURE__ */ jsx(Done, {
|
|
41670
41960
|
name: website_name,
|
|
41671
41961
|
date: (_g = saved.current) == null ? void 0 : _g.date,
|
|
@@ -41675,75 +41965,48 @@ const Offline = react.exports.memo(({
|
|
|
41675
41965
|
done
|
|
41676
41966
|
}) : /* @__PURE__ */ jsxs(Form$1, {
|
|
41677
41967
|
onSubmit: handleSubmit,
|
|
41678
|
-
children: [/* @__PURE__ */ jsx(
|
|
41968
|
+
children: [/* @__PURE__ */ jsx(ScheduleInput, {
|
|
41969
|
+
style: {
|
|
41970
|
+
borderRight: 50
|
|
41971
|
+
},
|
|
41679
41972
|
label: "Full Name",
|
|
41680
41973
|
name: "full_name",
|
|
41681
41974
|
placeholder: "Full Name",
|
|
41682
|
-
style: {
|
|
41683
|
-
borderRadius: 50,
|
|
41684
|
-
fontSize: 16
|
|
41685
|
-
},
|
|
41686
41975
|
handleChange,
|
|
41687
41976
|
handleBlur,
|
|
41688
41977
|
values,
|
|
41689
41978
|
touched,
|
|
41690
41979
|
errors
|
|
41691
|
-
}), /* @__PURE__ */ jsx(
|
|
41980
|
+
}), /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41692
41981
|
label: "Email",
|
|
41693
41982
|
name: "email",
|
|
41694
41983
|
disabled: !!(companyUser == null ? void 0 : companyUser.email),
|
|
41695
41984
|
placeholder: "Example@gmail.com",
|
|
41696
|
-
style: {
|
|
41697
|
-
borderRadius: 50,
|
|
41698
|
-
fontSize: 16
|
|
41699
|
-
},
|
|
41700
41985
|
handleChange,
|
|
41701
41986
|
handleBlur,
|
|
41702
41987
|
values,
|
|
41703
41988
|
touched,
|
|
41704
41989
|
errors
|
|
41705
41990
|
}), /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
41706
|
-
|
|
41707
|
-
|
|
41708
|
-
|
|
41709
|
-
|
|
41710
|
-
|
|
41991
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
41992
|
+
size: "sm",
|
|
41993
|
+
for: "mobile",
|
|
41994
|
+
children: "Phone No"
|
|
41995
|
+
}), /* @__PURE__ */ jsx(PhoneInput, {
|
|
41996
|
+
country: country_code.toLowerCase(),
|
|
41997
|
+
placeholder: "Enter Phone No",
|
|
41998
|
+
value: mobile,
|
|
41999
|
+
inputProps: {
|
|
42000
|
+
name: "mobile",
|
|
42001
|
+
required: true
|
|
41711
42002
|
},
|
|
41712
|
-
|
|
41713
|
-
|
|
41714
|
-
|
|
41715
|
-
for: "mobile",
|
|
41716
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
41717
|
-
className: "h6 bg-white text-dark pt-1 pl-2 pr-2",
|
|
41718
|
-
children: "Phone No"
|
|
41719
|
-
})
|
|
41720
|
-
})
|
|
41721
|
-
}), /* @__PURE__ */ jsx(InputGroup$1, {
|
|
41722
|
-
className: "mt-n3",
|
|
41723
|
-
children: /* @__PURE__ */ jsx(PhoneInput$1, {
|
|
41724
|
-
country: country_code.toLowerCase(),
|
|
41725
|
-
style: {
|
|
41726
|
-
borderRadius: 50,
|
|
41727
|
-
fontSize: 16
|
|
41728
|
-
},
|
|
41729
|
-
placeholder: "Enter Phone No",
|
|
41730
|
-
value: mobile,
|
|
41731
|
-
inputProps: {
|
|
41732
|
-
name: "mobile",
|
|
41733
|
-
required: true
|
|
41734
|
-
},
|
|
41735
|
-
enableSearch: true,
|
|
41736
|
-
onChange: (mobile2) => setState({
|
|
41737
|
-
mobile: mobile2
|
|
41738
|
-
})
|
|
42003
|
+
enableSearch: true,
|
|
42004
|
+
onChange: (mobile2) => setState({
|
|
42005
|
+
mobile: mobile2
|
|
41739
42006
|
})
|
|
41740
|
-
})
|
|
41741
|
-
|
|
41742
|
-
children: errors.mobile
|
|
41743
|
-
}) : null]
|
|
41744
|
-
}), /* @__PURE__ */ jsx(FInput, {
|
|
42007
|
+
})]
|
|
42008
|
+
}), /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41745
42009
|
style: {
|
|
41746
|
-
borderRadius: 50,
|
|
41747
42010
|
fontSize: 16
|
|
41748
42011
|
},
|
|
41749
42012
|
label: "Account Number",
|
|
@@ -41756,10 +42019,9 @@ const Offline = react.exports.memo(({
|
|
|
41756
42019
|
touched,
|
|
41757
42020
|
errors
|
|
41758
42021
|
}), /* @__PURE__ */ jsxs(Row$1, {
|
|
41759
|
-
className: "justify-content-between",
|
|
41760
42022
|
children: [/* @__PURE__ */ jsx(Col$1, {
|
|
41761
42023
|
md: 6,
|
|
41762
|
-
children: /* @__PURE__ */ jsx(
|
|
42024
|
+
children: /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41763
42025
|
label: "Date",
|
|
41764
42026
|
name: "date",
|
|
41765
42027
|
type: "date",
|
|
@@ -41770,8 +42032,11 @@ const Offline = react.exports.memo(({
|
|
|
41770
42032
|
errors
|
|
41771
42033
|
})
|
|
41772
42034
|
}), /* @__PURE__ */ jsx(Col$1, {
|
|
41773
|
-
md:
|
|
41774
|
-
children: /* @__PURE__ */ jsx(
|
|
42035
|
+
md: 6,
|
|
42036
|
+
children: /* @__PURE__ */ jsx(ScheduleInput, {
|
|
42037
|
+
style: {
|
|
42038
|
+
fontSize: 16
|
|
42039
|
+
},
|
|
41775
42040
|
label: "Time",
|
|
41776
42041
|
name: "time",
|
|
41777
42042
|
type: "time",
|
|
@@ -41782,7 +42047,7 @@ const Offline = react.exports.memo(({
|
|
|
41782
42047
|
errors
|
|
41783
42048
|
})
|
|
41784
42049
|
})]
|
|
41785
|
-
}), /* @__PURE__ */ jsx(
|
|
42050
|
+
}), /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41786
42051
|
style: {
|
|
41787
42052
|
borderRight: void 0,
|
|
41788
42053
|
fontSize: 16,
|
|
@@ -41811,10 +42076,11 @@ const Offline = react.exports.memo(({
|
|
|
41811
42076
|
className: "mr-1"
|
|
41812
42077
|
}) : "", calendar2 ? "Update Call" : "Request Call"]
|
|
41813
42078
|
}), /* @__PURE__ */ jsx(Button$1, {
|
|
41814
|
-
outline: true,
|
|
41815
42079
|
style: {
|
|
41816
|
-
|
|
42080
|
+
backgroundColor: `${hexcode}`,
|
|
42081
|
+
color: "#fff"
|
|
41817
42082
|
},
|
|
42083
|
+
outline: true,
|
|
41818
42084
|
onClick: () => setIsScheduling(true),
|
|
41819
42085
|
className: "mt-1 mb-1 py-1 px-4 col",
|
|
41820
42086
|
children: "Scheduled Meeting"
|
|
@@ -41978,12 +42244,11 @@ const Schedule = react.exports.memo(function({
|
|
|
41978
42244
|
})]
|
|
41979
42245
|
});
|
|
41980
42246
|
});
|
|
41981
|
-
const
|
|
42247
|
+
const ScheduleInput = react.exports.memo(({
|
|
41982
42248
|
label,
|
|
42249
|
+
Icon,
|
|
41983
42250
|
handleChange,
|
|
41984
|
-
onChange,
|
|
41985
42251
|
handleBlur,
|
|
41986
|
-
onBlur,
|
|
41987
42252
|
touched,
|
|
41988
42253
|
errors,
|
|
41989
42254
|
values,
|
|
@@ -41991,19 +42256,17 @@ const FInput = react.exports.memo(({
|
|
|
41991
42256
|
placeholder,
|
|
41992
42257
|
type,
|
|
41993
42258
|
style: style2 = {},
|
|
41994
|
-
disabled
|
|
41995
|
-
...p2
|
|
42259
|
+
disabled
|
|
41996
42260
|
}) => {
|
|
41997
42261
|
const regexPattern = /^[a-zA-Z\s]*$/;
|
|
41998
42262
|
const onNameChange = (e2) => {
|
|
41999
42263
|
if (e2.target.value === "" || regexPattern.test(e2.target.value)) {
|
|
42000
|
-
return
|
|
42264
|
+
return handleChange(e2);
|
|
42001
42265
|
}
|
|
42002
42266
|
};
|
|
42003
42267
|
return /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
42004
42268
|
className: "mb-2",
|
|
42005
42269
|
children: [/* @__PURE__ */ jsx(Col$1, {
|
|
42006
|
-
className: "pr-0",
|
|
42007
42270
|
style: {
|
|
42008
42271
|
marginBottom: "18px",
|
|
42009
42272
|
paddingLeft: "0px"
|
|
@@ -42017,25 +42280,23 @@ const FInput = react.exports.memo(({
|
|
|
42017
42280
|
children: label
|
|
42018
42281
|
})
|
|
42019
42282
|
})
|
|
42020
|
-
}), /* @__PURE__ */
|
|
42283
|
+
}), /* @__PURE__ */ jsx(InputGroup$1, {
|
|
42021
42284
|
className: "mt-n3",
|
|
42022
|
-
children:
|
|
42023
|
-
...p2,
|
|
42024
|
-
style: style2,
|
|
42285
|
+
children: /* @__PURE__ */ jsx(Input$1, {
|
|
42025
42286
|
className: styles$1.offline_input,
|
|
42026
42287
|
name,
|
|
42027
42288
|
disabled,
|
|
42028
|
-
onChange:
|
|
42029
|
-
onBlur:
|
|
42289
|
+
onChange: name === "full_name" ? onNameChange : handleChange,
|
|
42290
|
+
onBlur: handleBlur,
|
|
42030
42291
|
value: values[name],
|
|
42031
42292
|
valid: touched[name] && !errors[name],
|
|
42032
|
-
invalid: touched[name] && !!errors[name],
|
|
42033
42293
|
placeholder,
|
|
42034
42294
|
type
|
|
42035
|
-
})
|
|
42036
|
-
|
|
42037
|
-
|
|
42038
|
-
|
|
42295
|
+
})
|
|
42296
|
+
}), errors[name] ? /* @__PURE__ */ jsx("p", {
|
|
42297
|
+
className: "text-danger text-small",
|
|
42298
|
+
children: errors[name]
|
|
42299
|
+
}) : null]
|
|
42039
42300
|
});
|
|
42040
42301
|
});
|
|
42041
42302
|
const Done = react.exports.memo(({
|
|
@@ -42057,371 +42318,43 @@ const Done = react.exports.memo(({
|
|
|
42057
42318
|
style: {
|
|
42058
42319
|
color: `${hexcode}`
|
|
42059
42320
|
},
|
|
42060
|
-
children: [/* @__PURE__ */ jsx(
|
|
42061
|
-
|
|
42062
|
-
width: 20,
|
|
42063
|
-
height: 20,
|
|
42064
|
-
className: "m-2 align-self-start",
|
|
42065
|
-
onClick: done,
|
|
42066
|
-
style: {
|
|
42067
|
-
position: "absolute",
|
|
42068
|
-
top: 10,
|
|
42069
|
-
left: 0
|
|
42070
|
-
}
|
|
42071
|
-
}), /* @__PURE__ */ jsx(SvgCheckedCircle, {
|
|
42072
|
-
className: "mb-4"
|
|
42321
|
+
children: [/* @__PURE__ */ jsx(SvgCheckedCircle, {
|
|
42322
|
+
className: "my-4"
|
|
42073
42323
|
}), /* @__PURE__ */ jsx("h1", {
|
|
42074
|
-
className: "text-alt
|
|
42324
|
+
className: "text-alt font-weight-bold",
|
|
42075
42325
|
children: "Thank You"
|
|
42076
42326
|
}), /* @__PURE__ */ jsx("h6", {
|
|
42077
|
-
className: "text-center
|
|
42327
|
+
className: "text-center text-lg text-alt",
|
|
42078
42328
|
children: "Callback request was scheduled successfully."
|
|
42079
42329
|
}), /* @__PURE__ */ jsx("h6", {
|
|
42080
|
-
className: "text-center
|
|
42330
|
+
className: "text-center text-lg text-alt",
|
|
42081
42331
|
children: "Join the Video Banking"
|
|
42082
42332
|
}), /* @__PURE__ */ jsx("h1", {
|
|
42083
|
-
className: "mt-4 text-alt
|
|
42333
|
+
className: "mt-4 text-alt font-weight-bold",
|
|
42084
42334
|
children: "Date & Time"
|
|
42085
42335
|
}), /* @__PURE__ */ jsx("h6", {
|
|
42086
|
-
className: "text-center
|
|
42336
|
+
className: "text-center text-lg text-alt",
|
|
42087
42337
|
children: hooks(date2).format("dddd, MMMM Do YYYY").toString()
|
|
42088
42338
|
}), /* @__PURE__ */ jsx("h6", {
|
|
42089
|
-
className: "text-center
|
|
42339
|
+
className: "text-center text-lg text-alt",
|
|
42090
42340
|
children: hooks(`${date2}:${time}`).format("hh:mm A").toString()
|
|
42091
42341
|
}), /* @__PURE__ */ jsx("a", {
|
|
42092
42342
|
style: {
|
|
42093
42343
|
backgroundColor: `${hexcode}`,
|
|
42094
|
-
color: "#fff"
|
|
42095
|
-
textDecoration: "none"
|
|
42344
|
+
color: "#fff"
|
|
42096
42345
|
},
|
|
42097
42346
|
className: styles$1.scheduleBtn + " btn mt-5 px-4 text-white",
|
|
42098
42347
|
href: `https://calendar.google.com/calendar/render?action=TEMPLATE&dates=${event.startTime}/${event.endTime}&text=${event.title}&details=${event.description}`,
|
|
42099
42348
|
target: "_blank",
|
|
42100
42349
|
rel: "noopener noreferrer",
|
|
42101
42350
|
children: "Add to calendar"
|
|
42351
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
42352
|
+
className: "btn m-2 btn-outline-secondary",
|
|
42353
|
+
onClick: done,
|
|
42354
|
+
children: "Back"
|
|
42102
42355
|
})]
|
|
42103
42356
|
});
|
|
42104
42357
|
});
|
|
42105
|
-
const SubTitle = ({
|
|
42106
|
-
from_day,
|
|
42107
|
-
to_time,
|
|
42108
|
-
to_day,
|
|
42109
|
-
from_time
|
|
42110
|
-
}) => /* @__PURE__ */ jsxs(Fragment, {
|
|
42111
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
42112
|
-
className: "m-0 mt-2",
|
|
42113
|
-
children: "Hours of Operation"
|
|
42114
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
42115
|
-
className: "m-0 mt-1",
|
|
42116
|
-
children: [from_day, " - ", to_day, " ", from_time, " - ", to_time]
|
|
42117
|
-
})]
|
|
42118
|
-
});
|
|
42119
|
-
function WidgetOfflineHeader({
|
|
42120
|
-
company
|
|
42121
|
-
}) {
|
|
42122
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
42123
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
42124
|
-
className: "w-100 py-3 px-2 text-center",
|
|
42125
|
-
style: {
|
|
42126
|
-
fontSize: 16,
|
|
42127
|
-
color: "#fff"
|
|
42128
|
-
},
|
|
42129
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
42130
|
-
className: "my-0 py-0",
|
|
42131
|
-
style: {
|
|
42132
|
-
fontSize: 24,
|
|
42133
|
-
fontWeight: "bold"
|
|
42134
|
-
},
|
|
42135
|
-
children: "Video Banking Offline"
|
|
42136
|
-
}), /* @__PURE__ */ jsx(SubTitle, {
|
|
42137
|
-
from_day: company == null ? void 0 : company.from_day,
|
|
42138
|
-
to_day: company == null ? void 0 : company.to_day,
|
|
42139
|
-
from_time: hooks("2020-04-04 " + (company == null ? void 0 : company.from_time)).format("HH:mm"),
|
|
42140
|
-
to_time: hooks("2020-04-04 " + (company == null ? void 0 : company.to_time)).format("HH:mm")
|
|
42141
|
-
})]
|
|
42142
|
-
})
|
|
42143
|
-
});
|
|
42144
|
-
}
|
|
42145
|
-
const PhoneInput = lib.default || lib;
|
|
42146
|
-
const source_url = window.location.href;
|
|
42147
|
-
function WidgetInitForm({
|
|
42148
|
-
companyUser,
|
|
42149
|
-
dataRef,
|
|
42150
|
-
company_id,
|
|
42151
|
-
setState: setParentState,
|
|
42152
|
-
setIsScheduling,
|
|
42153
|
-
fields,
|
|
42154
|
-
widgetColor
|
|
42155
|
-
}) {
|
|
42156
|
-
const [{
|
|
42157
|
-
ipAddress,
|
|
42158
|
-
country,
|
|
42159
|
-
longitude,
|
|
42160
|
-
latitude,
|
|
42161
|
-
location: location2,
|
|
42162
|
-
country_code,
|
|
42163
|
-
continent
|
|
42164
|
-
}, setState] = useState({
|
|
42165
|
-
ipAddress: void 0,
|
|
42166
|
-
country: "",
|
|
42167
|
-
longitude: void 0,
|
|
42168
|
-
latitude: void 0,
|
|
42169
|
-
location: "",
|
|
42170
|
-
country_code: "",
|
|
42171
|
-
continent: ""
|
|
42172
|
-
});
|
|
42173
|
-
const [mobile, setMobile] = useState("");
|
|
42174
|
-
const validSchema = react.exports.useMemo(() => {
|
|
42175
|
-
const shape = {
|
|
42176
|
-
name: create$4().min(3).required(),
|
|
42177
|
-
email: create$4().email().required(),
|
|
42178
|
-
message: create$4().min(7).required()
|
|
42179
|
-
};
|
|
42180
|
-
const possibleShape = {
|
|
42181
|
-
account: create$3().required().min(10).positive(),
|
|
42182
|
-
bvn: create$3().required().min(11).positive()
|
|
42183
|
-
};
|
|
42184
|
-
const fieldKeys = ["account", "bvn"];
|
|
42185
|
-
fieldKeys.map((key2) => {
|
|
42186
|
-
var _a, _b;
|
|
42187
|
-
if (((_a = fields == null ? void 0 : fields[key2]) == null ? void 0 : _a.show) || ((_b = fields == null ? void 0 : fields[key2]) == null ? void 0 : _b.show) === void 0) {
|
|
42188
|
-
shape[key2] = possibleShape[key2];
|
|
42189
|
-
}
|
|
42190
|
-
});
|
|
42191
|
-
return create$1().shape(shape);
|
|
42192
|
-
}, [fields]);
|
|
42193
|
-
react.exports.useEffect(() => {
|
|
42194
|
-
axios.get("https://ipapi.co/json/").then((data2) => {
|
|
42195
|
-
const {
|
|
42196
|
-
ip,
|
|
42197
|
-
region,
|
|
42198
|
-
country_name,
|
|
42199
|
-
longitude: longitude2,
|
|
42200
|
-
latitude: latitude2,
|
|
42201
|
-
country_code: country_code2,
|
|
42202
|
-
timezone: timezone2
|
|
42203
|
-
} = data2.data;
|
|
42204
|
-
const timezoneStringSplit = timezone2.split("/");
|
|
42205
|
-
setState({
|
|
42206
|
-
ipAddress: ip,
|
|
42207
|
-
country: country_name,
|
|
42208
|
-
longitude: longitude2,
|
|
42209
|
-
latitude: latitude2,
|
|
42210
|
-
location: region,
|
|
42211
|
-
country_code: country_code2,
|
|
42212
|
-
continent: timezoneStringSplit[0]
|
|
42213
|
-
});
|
|
42214
|
-
const requestObject = {
|
|
42215
|
-
ip_address: ip,
|
|
42216
|
-
location: location2,
|
|
42217
|
-
country,
|
|
42218
|
-
longitude: longitude2,
|
|
42219
|
-
latitude: latitude2,
|
|
42220
|
-
company: company_id,
|
|
42221
|
-
source_url
|
|
42222
|
-
};
|
|
42223
|
-
createVisitor(requestObject);
|
|
42224
|
-
}).catch((error) => toast.error("Error occured, try again", {
|
|
42225
|
-
autoClose: 2e3
|
|
42226
|
-
}));
|
|
42227
|
-
}, []);
|
|
42228
|
-
const {
|
|
42229
|
-
isError: isError2,
|
|
42230
|
-
isLoading,
|
|
42231
|
-
mutate
|
|
42232
|
-
} = useMutation(({
|
|
42233
|
-
name,
|
|
42234
|
-
email,
|
|
42235
|
-
message,
|
|
42236
|
-
...emptyFields
|
|
42237
|
-
}) => api(`/messages/init`, {
|
|
42238
|
-
name,
|
|
42239
|
-
email,
|
|
42240
|
-
credentials: mobile ? {
|
|
42241
|
-
mobile,
|
|
42242
|
-
...emptyFields
|
|
42243
|
-
} : {
|
|
42244
|
-
...emptyFields
|
|
42245
|
-
},
|
|
42246
|
-
message,
|
|
42247
|
-
company: company_id,
|
|
42248
|
-
ip_address: ipAddress,
|
|
42249
|
-
country,
|
|
42250
|
-
latitude,
|
|
42251
|
-
longitude,
|
|
42252
|
-
location: location2,
|
|
42253
|
-
source_url,
|
|
42254
|
-
continent
|
|
42255
|
-
}, "post"), {
|
|
42256
|
-
onError: (err) => {
|
|
42257
|
-
toast.error("Error occured, try again", {
|
|
42258
|
-
autoClose: 2e3
|
|
42259
|
-
});
|
|
42260
|
-
},
|
|
42261
|
-
onSuccess: async ({
|
|
42262
|
-
status,
|
|
42263
|
-
...data2
|
|
42264
|
-
}) => {
|
|
42265
|
-
if (status) {
|
|
42266
|
-
console.log("customer", data2);
|
|
42267
|
-
dataRef.current = data2;
|
|
42268
|
-
setParentState({
|
|
42269
|
-
chatInit: true
|
|
42270
|
-
});
|
|
42271
|
-
}
|
|
42272
|
-
}
|
|
42273
|
-
});
|
|
42274
|
-
return /* @__PURE__ */ jsx("div", {
|
|
42275
|
-
className: "m-auto py-2 scroller px-1",
|
|
42276
|
-
children: /* @__PURE__ */ jsx(Formik, {
|
|
42277
|
-
validationSchema: validSchema,
|
|
42278
|
-
onSubmit: mutate,
|
|
42279
|
-
initialValues: {
|
|
42280
|
-
email: companyUser == null ? void 0 : companyUser.email,
|
|
42281
|
-
account: companyUser == null ? void 0 : companyUser.account,
|
|
42282
|
-
bvn: companyUser == null ? void 0 : companyUser.bvn,
|
|
42283
|
-
message: "",
|
|
42284
|
-
name: ""
|
|
42285
|
-
},
|
|
42286
|
-
children: (formik) => /* @__PURE__ */ jsxs(Form$1, {
|
|
42287
|
-
onSubmit: formik.handleSubmit,
|
|
42288
|
-
children: [isError2 ? /* @__PURE__ */ jsx(Alert, {
|
|
42289
|
-
className: "mt-2 mb-0 p-0 px-2",
|
|
42290
|
-
color: "danger",
|
|
42291
|
-
children: 'Error has occured... Please try again"'
|
|
42292
|
-
}) : "", /* @__PURE__ */ jsx(FInput, {
|
|
42293
|
-
label: "Full Name",
|
|
42294
|
-
name: "name",
|
|
42295
|
-
placeholder: "Enter full name",
|
|
42296
|
-
onChange: formik.handleChange,
|
|
42297
|
-
style: {
|
|
42298
|
-
borderRadius: 50,
|
|
42299
|
-
fontSize: 16
|
|
42300
|
-
},
|
|
42301
|
-
onBlur: formik.handleBlur,
|
|
42302
|
-
values: formik.values,
|
|
42303
|
-
touched: formik.touched,
|
|
42304
|
-
errors: formik.errors
|
|
42305
|
-
}), /* @__PURE__ */ jsx(FInput, {
|
|
42306
|
-
label: "Email Address",
|
|
42307
|
-
name: "email",
|
|
42308
|
-
placeholder: "",
|
|
42309
|
-
onChange: formik.handleChange,
|
|
42310
|
-
style: {
|
|
42311
|
-
borderRadius: 50,
|
|
42312
|
-
fontSize: 16
|
|
42313
|
-
},
|
|
42314
|
-
onBlur: formik.handleBlur,
|
|
42315
|
-
values: formik.values,
|
|
42316
|
-
touched: formik.touched,
|
|
42317
|
-
errors: formik.errors,
|
|
42318
|
-
disabled: !!(companyUser == null ? void 0 : companyUser.email)
|
|
42319
|
-
}), Object.keys(fields || {}).map((key2) => {
|
|
42320
|
-
if (fields[key2].show === true || fields[key2].show === void 0) {
|
|
42321
|
-
if (key2 === "mobile") {
|
|
42322
|
-
return /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
42323
|
-
className: "mb-2",
|
|
42324
|
-
children: [/* @__PURE__ */ jsx(Col$1, {
|
|
42325
|
-
style: {
|
|
42326
|
-
marginBottom: "18px",
|
|
42327
|
-
paddingLeft: "0px"
|
|
42328
|
-
},
|
|
42329
|
-
children: /* @__PURE__ */ jsx(Label$1, {
|
|
42330
|
-
size: "sm",
|
|
42331
|
-
className: "",
|
|
42332
|
-
for: key2,
|
|
42333
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
42334
|
-
className: "h6 bg-white text-dark pt-1 pl-2 pr-2",
|
|
42335
|
-
children: fields[key2].label || capitalizeFirstLetters(key2)
|
|
42336
|
-
})
|
|
42337
|
-
})
|
|
42338
|
-
}), /* @__PURE__ */ jsx(InputGroup$1, {
|
|
42339
|
-
className: "mt-n3",
|
|
42340
|
-
children: /* @__PURE__ */ jsx(PhoneInput, {
|
|
42341
|
-
country: country_code.toLowerCase(),
|
|
42342
|
-
placeholder: fields[key2].placeholder || `Enter ${key2}`,
|
|
42343
|
-
value: mobile,
|
|
42344
|
-
inputProps: {
|
|
42345
|
-
name: key2,
|
|
42346
|
-
required: true
|
|
42347
|
-
},
|
|
42348
|
-
enableSearch: true,
|
|
42349
|
-
onChange: setMobile
|
|
42350
|
-
})
|
|
42351
|
-
}), formik.errors[key2] ? /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
42352
|
-
invalid: true,
|
|
42353
|
-
children: formik.errors[key2]
|
|
42354
|
-
}) : null]
|
|
42355
|
-
}, key2);
|
|
42356
|
-
} else {
|
|
42357
|
-
return /* @__PURE__ */ jsx(FInput, {
|
|
42358
|
-
label: fields[key2].label || capitalizeFirstLetters(key2),
|
|
42359
|
-
name: key2,
|
|
42360
|
-
required: fields[key2].required,
|
|
42361
|
-
type: fields[key2].type,
|
|
42362
|
-
placeholder: fields[key2].placeholder || `Enter ${key2}`,
|
|
42363
|
-
onChange: formik.handleChange,
|
|
42364
|
-
style: {
|
|
42365
|
-
borderRadius: 50,
|
|
42366
|
-
fontSize: 16
|
|
42367
|
-
},
|
|
42368
|
-
onBlur: formik.handleBlur,
|
|
42369
|
-
values: formik.values,
|
|
42370
|
-
touched: formik.touched,
|
|
42371
|
-
errors: formik.errors
|
|
42372
|
-
});
|
|
42373
|
-
}
|
|
42374
|
-
}
|
|
42375
|
-
}), /* @__PURE__ */ jsx(FInput, {
|
|
42376
|
-
label: "Message",
|
|
42377
|
-
name: "message",
|
|
42378
|
-
placeholder: "Type your message here",
|
|
42379
|
-
onChange: formik.handleChange,
|
|
42380
|
-
style: {
|
|
42381
|
-
borderRadius: 15,
|
|
42382
|
-
height: 60,
|
|
42383
|
-
fontSize: 16
|
|
42384
|
-
},
|
|
42385
|
-
onBlur: formik.handleBlur,
|
|
42386
|
-
values: formik.values,
|
|
42387
|
-
touched: formik.touched,
|
|
42388
|
-
errors: formik.errors,
|
|
42389
|
-
autoComplete: "off"
|
|
42390
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
42391
|
-
className: "mt-4",
|
|
42392
|
-
style: {
|
|
42393
|
-
justifyContent: "space-between",
|
|
42394
|
-
alignItems: "center"
|
|
42395
|
-
},
|
|
42396
|
-
children: [/* @__PURE__ */ jsxs(Button$1, {
|
|
42397
|
-
type: "submit",
|
|
42398
|
-
className: "d-flex justify-content-center border-0 align-items-center btn-login-clr my-1 py-1 px-4 col",
|
|
42399
|
-
style: {
|
|
42400
|
-
outline: 0,
|
|
42401
|
-
backgroundColor: `${widgetColor}`
|
|
42402
|
-
},
|
|
42403
|
-
children: [isLoading ? /* @__PURE__ */ jsx(Spinner$2, {
|
|
42404
|
-
className: "mr-1",
|
|
42405
|
-
color: "light",
|
|
42406
|
-
size: "sm"
|
|
42407
|
-
}) : "", /* @__PURE__ */ jsx("span", {
|
|
42408
|
-
children: "Start Banking"
|
|
42409
|
-
})]
|
|
42410
|
-
}), /* @__PURE__ */ jsx(Button$1, {
|
|
42411
|
-
style: {
|
|
42412
|
-
borderColor: widgetColor
|
|
42413
|
-
},
|
|
42414
|
-
outline: true,
|
|
42415
|
-
onClick: () => setIsScheduling(true),
|
|
42416
|
-
className: "my-1 py-1 px-4 col",
|
|
42417
|
-
children: "Scheduled Meeting"
|
|
42418
|
-
})]
|
|
42419
|
-
})]
|
|
42420
|
-
})
|
|
42421
|
-
})
|
|
42422
|
-
});
|
|
42423
|
-
}
|
|
42424
|
-
const WidgetInitForm$1 = react.exports.memo(WidgetInitForm);
|
|
42425
42358
|
var check = function(it) {
|
|
42426
42359
|
return it && it.Math == Math && it;
|
|
42427
42360
|
};
|
|
@@ -43701,7 +43634,7 @@ function _inherits(subClass, superClass) {
|
|
|
43701
43634
|
writable: false
|
|
43702
43635
|
});
|
|
43703
43636
|
if (superClass)
|
|
43704
|
-
_setPrototypeOf
|
|
43637
|
+
_setPrototypeOf(subClass, superClass);
|
|
43705
43638
|
}
|
|
43706
43639
|
function _typeof(obj) {
|
|
43707
43640
|
"@babel/helpers - typeof";
|
|
@@ -43717,7 +43650,7 @@ function _possibleConstructorReturn(self2, call2) {
|
|
|
43717
43650
|
} else if (call2 !== void 0) {
|
|
43718
43651
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
43719
43652
|
}
|
|
43720
|
-
return _assertThisInitialized
|
|
43653
|
+
return _assertThisInitialized(self2);
|
|
43721
43654
|
}
|
|
43722
43655
|
function _getPrototypeOf(o2) {
|
|
43723
43656
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o3) {
|
|
@@ -44834,7 +44767,7 @@ function createAvatarDataProvider(_ref) {
|
|
|
44834
44767
|
var _this;
|
|
44835
44768
|
_classCallCheck(this, AvatarDataProvider2);
|
|
44836
44769
|
_this = _super.call(this, props);
|
|
44837
|
-
_defineProperty(_assertThisInitialized
|
|
44770
|
+
_defineProperty(_assertThisInitialized(_this), "_createFetcher", function(internal) {
|
|
44838
44771
|
return function(errEvent) {
|
|
44839
44772
|
var cache = _this.props.cache;
|
|
44840
44773
|
if (!internal.isActive(_this.state))
|
|
@@ -44862,7 +44795,7 @@ function createAvatarDataProvider(_ref) {
|
|
|
44862
44795
|
});
|
|
44863
44796
|
};
|
|
44864
44797
|
});
|
|
44865
|
-
_defineProperty(_assertThisInitialized
|
|
44798
|
+
_defineProperty(_assertThisInitialized(_this), "fetch", function() {
|
|
44866
44799
|
var internal = new InternalState();
|
|
44867
44800
|
internal.fetch = _this._createFetcher(internal);
|
|
44868
44801
|
_this.setState({
|
|
@@ -45217,7 +45150,7 @@ var AvatarText = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
45217
45150
|
args[_key] = arguments[_key];
|
|
45218
45151
|
}
|
|
45219
45152
|
_this = _super.call.apply(_super, concat2(_context = [this]).call(_context, args));
|
|
45220
|
-
_defineProperty(_assertThisInitialized
|
|
45153
|
+
_defineProperty(_assertThisInitialized(_this), "_scaleTextNode", function(node) {
|
|
45221
45154
|
var retryTTL = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 16;
|
|
45222
45155
|
var _this$props = _this.props, unstyled = _this$props.unstyled, textSizeRatio = _this$props.textSizeRatio, textMarginRatio = _this$props.textMarginRatio, avatar = _this$props.avatar;
|
|
45223
45156
|
_this._node = node;
|
|
@@ -45896,7 +45829,6 @@ var Rating = dist.Rating = function(t2) {
|
|
|
45896
45829
|
const createFeedback = (params) => api("feedbacks", params, "post");
|
|
45897
45830
|
const getWaitConnectors = async (data2) => api("wait-connectors", data2);
|
|
45898
45831
|
const getLongestWaitTime = async (data2) => api("waits/longest", data2);
|
|
45899
|
-
const updateWait = async (id2, data2) => api(`waits/${id2}`, data2, "put");
|
|
45900
45832
|
function Feedback({
|
|
45901
45833
|
agent: agent_,
|
|
45902
45834
|
quickStopChat,
|
|
@@ -46082,18 +46014,329 @@ const sendIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAYAAACk
|
|
|
46082
46014
|
const createMessage = (params, config) => api("messages", params, "post", config);
|
|
46083
46015
|
const getMessages = (params) => api("messages", params);
|
|
46084
46016
|
const messageSound = "data:audio/mpeg;base64,SUQzAwAAAAAAEFRDT04AAAAGAAAAQmx1ZXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/+pAARQMAAAKFYUGGSUACVGxIIMm0AAvwbUu5xgABhw2pNzrwAPA4QOB8NvBsA8DRAt48bkf4tiEb/MAJiLFv/zBUFgVxF//jcWB4SC2P//8nkBIF+Isn///MJGPU8kV////FsnceDwkFsfnkhn////88fnjwR4HAwgj2C2YGY3gaDBY54TtP8lwWgOZ/mhmOMef/miBoJmPf/8pjkNDQe49//83NEGGHHub///lwehoXzdzT///8vpx6Gk30DD////80Jcvm5ID0NAAAAAAGBAMBgARkBIAGusXNYmM0tFDCwjMQ+FdDiGtAwNC1XLWrPQcB1AH6wfkAYRYmr947mZUhr1KbNVKtZa08/15lqr9zg+YJvEoEFf0gRAE+fRFTZwy7/qE44qBOoAAAAABAQCgUAEBAMABiKozM0czK5PjB4KzCmKU6GuGaAPDQeqWsqs9AwHpCOtYj6FuOmZuvrnGo04111SmdwWVzeWt9R//4VY9wgPai8SgQV/SBBKBP8VA4RDbv+oTjioEVGuAAsAGSAimFgIaYqxapz3TlHPn/+pIAOV0KCYKjD0mXeMACUwGJQu8YAEnccyk14YABKQSlKrwgAaAhkgjRGIWBoYJwLJgcgTGAQByYGwDZgIAJrCu7O3IaAI3HX3mapIKCv6DmwtaUYChSEU7jpooKNdakEf/2oTSnfAAiABFQOzCaDrMSYnc4tokji7OEMfcWow6QKjBCBNMC0BwwBALzAqAXMAoA1hr8ztyVAFHOv4gwUFBX9BzftpCwFAsUUb6vYoKNMsCuf+H/lKAdXmAqA2YHgMBgpAtGH0NcaE/fxiGESGHgE0YYgTwkCwSgKGBkBEWYQgn4Hq59Ahndsspqb209CRMv8r/K+DhEYPeQdFih9QgdB63R//oANlxkAAwEwFTAyBeMFgFww+hrDQr8AMQwigw8gmDDCCcGgUCEBYwNAIC0CQFNP1bdix79DT/HB9kBn4dNktEB6tfOT0/plqr//7UAAAAUDAdDQbj4fj8gICAs4PBRCDzgw5N2tM0Xzigy1R4xpIGIh+YCHPex+jDhMAgg6iuwF8HYNU003k8JOIUNGMKdnGQIIsiiaT1m6rOS//qSAFAOJ4ADyDtSbnIgAH0HygnO0AAKXGc8HdSAAUcJaQ+4MACFQnyqlQ80ZBV2KhfN39fQNE70zcxdB1v2/23zc5BJzv2Jyhiw///4DSkAACCDDgwwAAAwOCk3PcsAhSbmDmbRruZ+48TGrKRIzwcChiYP5gwOtujbvCwEMxhICTqHeaAHQgWGNcvvHECwMG6jUL2cOkEoGYyib83UzRrDYGbHk2/ZTbojsIGV0/9BBanuRcoltB1v//+VzBly4k7/5QANIA6///gNKTBwQTFAYTGoUTAPeTsidTZ4uzHQTzDgIwMBKRRcpWJ4UVS4KAFTVrrSoCgZJcVQobIQRFKGiILBolyUpSkiRRypSRA0eg0DQNKBo8VCXEuVd1gqCU5aABAaYUDpiAKiPDnNoiauI5iQKmCgCul3mtQNMuS1lyYdlrUKAr1V1ARK7BgJXQaBo6oGgafiIGlA0eKgtwVCkSgrxKCoVBUNdst/LA04skhAAwFEAmMAKAETAawCIwhxTLNYeR/TBWQkcLATAXAMTExHBCtPFONqFml19rLK8P/6kgAvtRgIgoEYSBP4EcBUoxjxfwM4DlR3RbXXgAnvkGamvPABwn5wp0KxrrrR0cK4NgAJmdIAYWJHwBS0lzKKP///P/TYBgLYBoYAwAImA9gHxhOS9ebJspAmDGhTIEAsgqAbm6RfgSGRFIhqQkEt1qmrZXg18i3C2KTU75lH8GSLmgdgmDg2iW1CUU6Gpa3s3/vrTRr/2auqW/////gNhC4BmEoimGa0nIRNmK4XGDADBACJ7mBAGGBgEAoAAUEjSS74CAdDeVBfhIxczLR5+E4OiKchcDQQxkq/f7vd+zv77pR/ujx5T3vTWbwx8AfAAHJDI4fgHtADsBFw/AP+AIwEf/z+7+O///2BA3//+BYAPMBkEEwmw+zDJQ1Npge0xLQvDB8BGMDoB4CgSmCgC0YLgJhgcATAoCRwS/4CAHQ3jQF8BbBvjjR5+E4OiKchcDoQxkq/j7vd+zv7+BEj7pAiU9701m7++/SPeAAdDGY4fgHtCPiKTh/h73fEEf/h//58CP9X/yoAAioaC4fAFMBxUAwY8F8EAua85BnSAAv/+pIAIpAMAAMIFFWebSAAXmKKs82kAAokIzu90YAJVIimd7wwAAAEuybqFvAyl1n/lD3eBDwqGfxWCDJQhJf/RIgxRVlksAA+Ssy59rwa8DIEhGdEvUPMAQeFQk+zxd4PuNCEJAqyW+gCAP44OiIAAiIZi0fAFMBxUAwY8F8EAua85BnSAAsABLsm6hbwMpdZ/5Q93gQ8Khn8VggyUISX/0SIMUVZZLAAPkrMufa8GvNoEiZ0S9Q8AgQeeCWz1vB9xoQjA1lvoQCfxwdEQAAAC02+/oAj6SJg+KxjSuh8oXRpqaJ/u4BkGJBieKxhgEZgUBIkFDQItWv/GLRhkqHINxAS0bFwLT73ZHfx97Lbjg1RRbS76wDenf//6v/dcAAAARWWSsAM/BwCpgkhSGGKUMbDQphkNi5m1+YMYeIRxhMhSGDICeYEwEIKBsRIadKqPHbPOMUMl2FicSDRCeCaxk2eDJZFhDGvEq4ikVvUlgz9710AtkbYABZUGAdGAaE2YSzcBtQIrGYqHKemAiRivAKHNNmNOgRwBIYEAu1dy/9f//qSADWEFwiCehdKO9oRwE+B6Up7wyZKaFUlL2xHAU8KpGXtiOD9rSj6ySu5EcZrCia5S0XGg53uhEoskJ3AIBqBB1v9P/oAABORtoAAuKAANDANCZMJpuA2oEVDMTDpPTIRIxYAEjBPAZMA0BsGAcGAACCBAAXexArykfebCustNHMi/l/61598S2u+NYtKWQ31/O2wlKbukAMBQDUwCwVDAuDXMK2R40CVfDJ3JcPRNvMw1wXDCA1K4xQVOPaiYCllPj39a/BiOdr8vYy4xIOA6geKqWeS1hke2KiwpZDf6GmN92vfo/0KGKqgAMBgEMwDQYjA8D3MNGmg0lWRjLTKyPul+8w9wbDDBNIIxYdOnfCIOjEXx7rDL8GR7TOlqWdZxjocF4nXBs8XJMNhA/QlTW/7TvZ0L+g879+tAABKJJEAAwGgEzAnAgMFQF0xU1djqjXACwIp0qPfGAeA2AgBEHFAzCWBfX5L8iapwVAmJGT5VanQfTdUgeOBpy0OURssUexcB9/qvqfrq3ex9QABTxttAAGAkAeYDoDBgkAnmP/6kgD+/jIJgpEMyVPeETBT48k6eqJKCWhfJU9sZwE/hqSp7wyYlaZRyrqFDgHZyGNlGACAqWYS8EpgaAKIpQl6DVq2OVss2RadbtXYq1u7Vdd1EukiKlrUBA+ChZKRzKEEOrf9P2fqCtRxKEAYBcwPgLjE3HrOoVcAyRgeDjtbXAQhgkHrDjAEcCvQu5nzHn93o4VSsjZv+Qby+Bog2UDBMXjQE7cujrFVbNKFr0f93Qn6QuckRAAb0DARmCEBUYmo9Z1EreGSMDscdLa4GEQFgC1VxQAgwgQXoHrZrSp2OwijUHhG1RE4EAEMGBtIo8gEiQMvWOcLrRTbpimSdW3+7RUqAADqONIAARgBDgD5gAA6GCmm6Z8aQhlYA2m6ggoYZoCpnBQEDBUicKaxiX4BZIDDZJDUBBo0sEA2QOh5hMiI0yhL6Hvq3siBvfs//+7R/KAAD9G2wAACQBhwCkwBAhjBhWLNHFSgzFAfzhaSoMOsB0wKAEAAAUAQGTBQBdaJP6rU11MGdGyglKQ4IVCFaZw898ETiQ0YNtMNf+9fp///+pIAxEVPCIJ9B8nT3tCQU6GJKnvDJgoogydPUGlBSQ1k9e0M4P1L+n9KB3skYAAAwBxgFANmBaCkYVyG5pZFrGbsAEbb4S5h9AIGBOAOBQDQFjgAMQbZkYqTqTvXUu7LhLydLf7CkOourHlX/EihNcyER+n////Vq6/+oFxt2MgAAIBowBgHTAtBQMLBDU0si1jN0AANt8JUw+ADjUhQKPEBwwMZ75rPDf4b17gzlXK/c/V4fMGxFdQ5WhwmAxpJxbnpCt32M//9f5/h+H4AAAFuy2MgABgAQ8AiTAtGGsFObWgEBmVBAmtUa2YZIGZoCBQAxUzV9TkjeGeG88dcLe4W5jtQ70Le4znj7BgPMFyhYoAJl5VpNn1f///X7t7UfxQAAABOOSEAAA4A4mAdIgcjD4DDN6YCoznglzZ2PVMOkD0zAgEBjEmTNyUeIfuZ4Z58/hZvKbejfV5HORtsUGWAkiISgFCnN5H//Tf9xp9v+nRe5QElutiAATJEADGA4emLlTGZQPKZPwTxnIpSGDsCUYCYCICAHMwI8lGhTlvh//qSALuhaYiSoBdJ69kRwFMjOS17QzgKYCEprvsigToGJPXfCJihGbHB4uDIkA5WeCwwPLQFRGBwoHToVWfDDg8AD7G6nlLP////t/WApJbWhxEAGGBokmNmEHzkWnbRcGgmqYYRQLRgMgLmAOAGYCQAxgfANMWlltnpngg8VXWoVYLCxAgEzRqJwbAI9RBYoYmxRv//b//9e39dAACeWtAAAsqBQBjAGA/MGU24zdykTJoCnMdJrMwDAWQsKTAJjwa3VBLuX+Z71/89bS/2sscPTxYKgMmEwAD73D0ibWyoRp/+7/Wz0IRZZ6bUAABe4mQAAYAACAQQMEBJMc/wP9bvOwjDMhZ6UwEAaQYAggoTAVBAa6TEW4OT2aYIPAqSBpRHJIK6T44+SSdOncjQLfVu+dsT7Xknq3fs5lWc5YCupRpAQqEkScTjxwjlimUQFYZcUJxiZgvA6Ch2MUlPwdCATiyIN2AVjmlGgcnNqAI8gCKli7zIobMm2alGqoif1PVjGiwl1tzdfsr13LZbLRYAvoLijQqByROIyI4SSwzKMP/6kgC7fIMJkokWyVPaGcBSIYkad8MmCjgfHy57QkFJBCPlz2hQK4y4IUjEvBgCARRkAAxic/B0vU7sWsv1IHzKRQq8kLBmoixS0OPIvdt6qg5ZbBRgbABXqLZGoc7LO0zyD6hZftoVAAFtyNEABKodBEGCIYt2OfNoeblEyfo7CaNAiRXp/iNw4andrVQquQNCRK1NeJkE4dCYLhsesktBMCtZWJhYlCEekVizKPl+//WuH0dVf1AAC9G2iAAksFQPEAjGLdjnzKJm5hNn6OvmjQHkwTJShWA46oZlVfJVQnFXPKkQ2pFyYqCIAMNMFyY9KyqyklQ1DhMSLnF7fdV/oZaz9QakAAwGwEAIAWYEYMBhAIZmi4QaY6QaJrbEMmL+CabBAYwgZtuYOajpH6AWP1tyweF5A8iUHQidekBsDzmLCrvOgUDOtdNVlKLaC7kS+htPm9O/0AO40QAADgHgIAWYCoJBguGbmasMeYsATZowDOmJCBqciRjCGTKDc1kTdzf7//+vI6Lrq0pSxMuEiwu4NzQqAQnjiayXc63/dWv/+pIAJaydCIJ9B8jTvciQTYEJGne5FAp4HxzPe0JBPwskKeyI4HM79zvaz1IBv1AAkUVgw0fnQO5qcFRmJgDgZg6SxhKAqGAyAyAgEzIMOpBj8st2HpYu2gLkCd4ieZNDBQuyeQLDxUspoqBHDPuTTmrlOdtQTlVBPMo9nUoAAZv9ABFYrBBY7OidzU4KjMTAHAzB0ljCUBUMBsBkBAJmQYdSTH5ZbsbcFhrZyRMidKnmDgoSHBAFiA0GRu9m1hRH0ZqhNsoQUut6/Qa5lQ/WZZ+kFnGwyMuYYAhOYeSEZVxfJgmA7mCUnmYKQIqWz2CQw3UuGeMjVaI6k0JDwsJQ4VIi7AODQOBkXALfv0fVbp1uVTYNFb3J0DKbeaK8sXqV5hQADAcMTEqmDMQNnMFoI0wWFpzBiBTQRPkJEhsEq2evGmnnN2xwM0lyZlggkx6StAx72qpWlxkms97OfOuYEd060q1o4H5IKMeuJBQUG/1VAAAu/gACgAlojAgKTEuLDpWgTLUWDiLUDM8HAWqG6AQ8D80cROpI/srq80ievBjg//qSAHAQuomSiAhIM37IoFTBGQlv2RQJfB0hTvsiQUsD49nfaEhGeGXERQyaF3PGLIgev13KtOo8lxnkkMmjzEMWtCDQee+odUAAJTcZAABZ0KgEYIBKYmxUdK0CZbiwcQakZmg8PAqnYAY8D88ZIupI/o3VqoZW8O9i+YNL7WXyOvutBBvYxSXaFadbKrNZuww4dXelcyvcwiDyZdF8JUo5BAFgKE3NNUbUxFQATNZAxDCDAdeXPLCgXkbLUzqb1///+gNiu7AhoWCLwEGRUMlAaILFZ+07bhhyRELOei5mhYrQu715t64fpPVsYnTWYDdBdVPYIIAebmmqNqYioAJmsgahhBgRmgLJVgvI+NBmz8iEVuDw1xJLHIFmJFQWBFb25hjCpWbMCqS4BEJ+8UcMJNqgNv27DdoucWBk2aUAMMAA0gRgOYACIYd1WcTjSa+lKd9eCZciqYRAsYCAMYFgiYKgy3kvvDT/7uQ0SXrrKjYADEVAYSDHz5PPhfDL4RUqsnOG55c5Z5yLb1DTPc56T4Wd1Mrqe5Z9XUi3RX0P///6kgBQxdYJkpsUyEuzEcBT5CkKdmNKCnBNHM9kRwE8A+OZv2RI/wxADuQAEThUDwsFxhvKJu+LZqaRZ05o5lGIZ2YYBGVJtm8lsxG/8J/LHTJMyFctV/5alqGt+D+d/W9Nd13fffcrXhlR7HP1x5aHCtUWqMnGJiY6egB3tqOxod9+iI0iKpBgCmA4OGLUSmaoE+YmYMBhcpLGA6CMIwA1rkQpOwrXIbX18WE5BJamDbq4XKiqmG1EmMj1DJFlSTIJQ6VRFzolcIGvEjEggEzsCKUkcH7AYbTHMQBH0SquJ7AIBEwDQKDBsJxM84LMxYwdDDXU+MCcFYLgDprjQCJMDYCDIJ9nuvepTa+qr1LXW27G1eqVKVerZutHYmy0fu9Hf+3UR0VgYr3L6rO6xxdRfr8KuunrdYGZV/uKH50AMoAAhUkCTAmY7Dgf0JyaNh2br56ZhAyTA2KgCIQOMGQIAZJiWvt9bMbNNZ7K7olL6OytSzHe/rNpZ9dXqWrrZtlm/ZjS1+29bM/SrasisV2a6ghZCnRla4tXZKiHk67gABr/+pIA5l7vDZMjWcazoRtwXIDo5ne4EktUIRpO+yKBfRtjBeaJcXL9GgCMdB2P7k5NHw9N189MwgZJgbFQBEIHGDIEAAWX/4n//jr67lyWUjrdtlX6/5Ms+ct/U5w53NDVK66HlO2l5z9/73Oy9Ilh+m/zKFqZJnZvbJExT5r+I2UIZWCQEFQvAk8GtjRm6IUHhAcBD/hAYCgBDILhQG4Yr6NzRaAzgFU8zmqQjMznIkYHWAlm7qvHQ78hQzkkBZkj9ufOd5ijikrZQ4jg0+dM3pHSkBy7kgk1dchqUDMUFUH9ME1OE9QuCBUDEwAnw1waE3NC48KDQIf8HBoIgCEYOiIG4cu68gZb5g7ERKjN+nrgONXA787TuXzmdL3bpn9NW9TMiKOkfvI3M6TyZnZkLxAJrPeKWKFUiKmgEzRlXbgRkzJlAALqlvjAAFTENijqsZzVMWjdeaDFAKgKAaYZawwEAYAsgfff3me2bsqpMVEc9FMY5kfbLmjuZF7n/8K25Hz+0jvNSzruKykI9DSeepHub5FcyMSZ+Nfnaj5l/Shu//qSAKQ674nS/lTGs6oS8F6qiNJ1A14MaVkWLoRtwX0rIsXQjbhGgemX8BFUOAIwCBcxHYg6pGs1TFw3dmgxOC4sul+CgAMBAGAeWc3387WjNRdTq63NstpnWI9Fpd+GxT+nTNev9p7Ed48L4s77ciRPqals3lfNu2Z+bFP4+5XqkTH6B4CYhgGANhBgAARiiLp2KgBpyK5kheZiEGKUy6Eeh4MwISY10PZPq18/6uibGM5ymK+qmmfnPInnlkhfM236pFwjf4/WUlNae6Q889abQslYnLrUELJh7ibmCiZa7mQF28N+h1/zsLLpbAYCDE0XTr9AjTkVzJS9TEIM0lGWJpCwZgQlzVR2/0ZTze7HvtopyM9Tnfk/3LMpfuTzLmx/lnX9GpTD865Rz00bczo67na/rGLTp6kajI3PjLRp6zp4E0m8tj4wGPBYAlyCWpmC4MbZBxvbkAZ3JMNIUfBwFDRr0/1R9N7rVUMqb2aoxPXps6r5J1fY+xm4vM+zzNiJvr1dUrAiFi25cbitmbOWxUGh1T4Rrg+bjaJUvMeb9v/6kgA61u0N0xBTxhOnGvBdinjBdONeDFUrFi6oa8l6qWLF1Q14/c5AIdyyoEAAGr6YMpcaAgsaOQcBkSHgAZQrOCgNCYi6K+37s3fbS9nqcY088st/5+zO5Q3oM/L2j/TffTIItRyc0RffpcMoOxxjjwSU4ZsXhfr7GTZbYM8iSOIZnuxh2WXlJUjQFwIY8cp+ZUGhwIdfCQGZgYB2Bl7EZo/rP9fvQxokaFMqZcZFKKkcSDFHqX+xwcPe7lab6qc8TnczmXHLIPw8s+l/vTZDM/oxkXN9cycrRUpESqPqX/P5gzeAiBAXARjpxn7FcaLAR1sFAZmBgDYGIAAlsEaL6K32dfRV7X1mOe6qcfeyn5F5HXn+VUH5P1GpxrtI3WNnF3Kmr55fGc+JOE5cInzYGN2LEPPKkTvRE0RhvBq7qGZaQBTBwUtzDBmPNDIFPM39czB4JcBwGTpjhkmmj6dKVuqGVU92PMMnLMqvBIffLe2iZ9fJIpbl5lrkiU0LJwRodeXmQW9jmmr9sRIgg6J2r5uLVBJtYTzZhAoYMjbV+EP/+pIAB7nqjfLXNsWLhxriYWqIoXTjXgtpaxQOBG3BeSpigcONebRDpdNBgKZZhgzHnhsDnub+uJg8EtIdBf6YYcTN9D/n0vRz7vedqrq73PXnpC8iWLFKIiiFc6YpYbiCfPKeWXHY3n557jYxoDWsQiMqO5KFLzTIMYrKzQ4EeCgVFgLHioevnSwq3iRQ6AxCwDHoeMtigxrSjFIEgGeayoSK3ZDefZZ3exCUY5qrMajK96k8K7l8/+dhUhJDWaP6sbf5w0YnU/iu/CSB3RCQjdGeByGGqmxCdcKxiV2CEChhmPEsZ5ikWxFRG8QBEoBEbCMhiQyyKDGdMMRgKAaZhq4Z79P/w9TIs/zZD8++xrpjmqSrUNyO7Hqn9WMcYnpormeJ/7NE8kq81Q2UiqCszCNwIFdkR9aeoNHKOqORmMMTEo2W5mVVPK5yfBUqelp7smBqR9LITKZpcqTKLrytozLgGun/kd5/SjpO62UzOrrm2VQuON5kRN5xOZXIo+mfiw9qU8XCmfVowPW2GVnVtDiVlo8ooKE1L6x9P6CMFJgj//qSAODw7Y3TEk/Ei4ca8mGqWJBw414L+U8SDghrwYqtIkXBjbiDumxTyfEAeFk7gmAqh9LAPK5o8iTJL3xNsjBrm3/9PXWNWJ1u3VDA6tqv93Py533zPKn7QqnGNM6RPbLmIpuZl6NDKhLULDD0+nlaYZtRjfpiVOyDLAbNZL8z4/G/23ubC644XMbU5MgDEzZEw4esI2803hkLmyAkTJIo21EFk+o9Ugqjkowo619YgnPzmpDZyU1FtktK006efpuyEiU2TP3aanlUI6yEHVzJLeUiJ+bmsPR/Oly/1N8xD3p6VRxCRGsZffNrrmC5janLkAombIiJF1hG/pm0ZBM2QEkySKNtRi0eo9UUtHKEIMRb8ITbjPUsueQ1CVzQqlrJm5PoT2ZZV8ZXK7Eu5Jopy5aOwZt2Yy1eMRo/Ym+frv5mErqZPntXgk7z8dwN1VgS0KTgYoKHQsMZE5y0LpoOv4BI2HEdS8IzAlIzk9TGTZi+cutLrrYjp1pddb1rbb2XWntZ5kmaqTNGqkzVapRqqBiDNVjGrVdjVdSZqsY2Nf/6kgDDOegN0s5PRINiGvJbCWiRbGNeTLVFFC0ka8mPJKKBpI15WMalVjVSb/qxqvS4d9SY6sat1djCoUTZI62OSwJaFJwMUFDoWGUilZaF0wcqGEKaT9QldHVAQ52wsrcroatjsMWE+u90+iggJwEgwoGKoCQYVVJSZqFJmjVSZqJqkxqsYmFUTBVFgsJskCFTeFAkkNBYsJKwUOmhRcfOd1Fiw2cKhYoUSV3yxYWkxBTUUzLjkyIChhbHBoYSlVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuOTIgKGFscGhhKVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+pIAxIrmj/NjUMGDDBrybiWYMGHjTEAAAaQAAAAAAAA0gAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV";
|
|
46085
|
-
|
|
46086
|
-
|
|
46087
|
-
|
|
46088
|
-
|
|
46089
|
-
|
|
46017
|
+
function ChatWidgetScreen({
|
|
46018
|
+
welcome_message,
|
|
46019
|
+
dataRef,
|
|
46020
|
+
setChatClose,
|
|
46021
|
+
agent,
|
|
46022
|
+
videoRef
|
|
46023
|
+
}) {
|
|
46024
|
+
var _a, _b, _c, _d, _e;
|
|
46025
|
+
const bottomRef = react.exports.useRef();
|
|
46026
|
+
const [{
|
|
46027
|
+
typingEvent
|
|
46028
|
+
}, setEvent] = useState({
|
|
46029
|
+
typingEvent: false
|
|
46030
|
+
});
|
|
46031
|
+
const {
|
|
46032
|
+
state: {
|
|
46033
|
+
data: {
|
|
46034
|
+
data: messages = []
|
|
46035
|
+
}
|
|
46036
|
+
},
|
|
46037
|
+
setState
|
|
46038
|
+
} = useRequest({
|
|
46039
|
+
asyncRequest: getMessages,
|
|
46040
|
+
params: [{
|
|
46041
|
+
conversation: (_a = dataRef.current) == null ? void 0 : _a.wait.conversation.id
|
|
46042
|
+
}]
|
|
46043
|
+
});
|
|
46090
46044
|
react.exports.useEffect(() => {
|
|
46091
|
-
|
|
46092
|
-
|
|
46093
|
-
}, [
|
|
46094
|
-
|
|
46045
|
+
var _a2;
|
|
46046
|
+
(_a2 = bottomRef.current) == null ? void 0 : _a2.scrollIntoView();
|
|
46047
|
+
}, [messages]);
|
|
46048
|
+
const listeners2 = react.exports.useMemo(() => {
|
|
46049
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
46050
|
+
return {
|
|
46051
|
+
[`message.new.${((_a2 = dataRef.current) == null ? void 0 : _a2.wait.conversation.id) || ((_b2 = dataRef.current) == null ? void 0 : _b2.wait.conversation)}`]: ({
|
|
46052
|
+
message
|
|
46053
|
+
}) => {
|
|
46054
|
+
var _a3, _b3, _c3, _d3, _e3;
|
|
46055
|
+
const sender = ((_a3 = message.user) == null ? void 0 : _a3.id) || message.user;
|
|
46056
|
+
const customer = (_b3 = dataRef.current) == null ? void 0 : _b3.customer;
|
|
46057
|
+
const isSender = ((_c3 = customer == null ? void 0 : customer.user) == null ? void 0 : _c3.id) === (((_d3 = message.user) == null ? void 0 : _d3.id) || message.user);
|
|
46058
|
+
message.isSender = isSender;
|
|
46059
|
+
!isSender && videoRef.current.playSound(messageSound, (sound) => sound.loop = false);
|
|
46060
|
+
setState((s2) => {
|
|
46061
|
+
s2.data.data = [...s2.data.data, message];
|
|
46062
|
+
return s2;
|
|
46063
|
+
});
|
|
46064
|
+
if (sender !== ((_e3 = customer == null ? void 0 : customer.user) == null ? void 0 : _e3.id)) {
|
|
46065
|
+
t$1.emit("agent-joined", message.user);
|
|
46066
|
+
}
|
|
46067
|
+
},
|
|
46068
|
+
[`WaitList.closed.${(_c2 = dataRef.current) == null ? void 0 : _c2.wait.id}`]: () => {
|
|
46069
|
+
setChatClose(false);
|
|
46070
|
+
},
|
|
46071
|
+
[`typing.${((_d2 = dataRef.current) == null ? void 0 : _d2.wait.conversation.id) || ((_e2 = dataRef.current) == null ? void 0 : _e2.wait.conversation)}`]: (data2) => {
|
|
46072
|
+
setEvent((state) => {
|
|
46073
|
+
state.typingEvent = true;
|
|
46074
|
+
if (state.timeOut) {
|
|
46075
|
+
clearTimeout(state.timeOut);
|
|
46076
|
+
}
|
|
46077
|
+
state.timeOut = setTimeout(() => {
|
|
46078
|
+
setEvent({
|
|
46079
|
+
timeOut: true,
|
|
46080
|
+
typingEvent: false
|
|
46081
|
+
});
|
|
46082
|
+
}, 2e3);
|
|
46083
|
+
return state;
|
|
46084
|
+
});
|
|
46085
|
+
}
|
|
46086
|
+
};
|
|
46087
|
+
}, [(_c = (_b = dataRef.current) == null ? void 0 : _b.customer) == null ? void 0 : _c.id, t$1, setChatClose, ((_d = dataRef.current) == null ? void 0 : _d.wait.conversation.id) || ((_e = dataRef.current) == null ? void 0 : _e.wait.conversation)]);
|
|
46088
|
+
useSocketListeners({
|
|
46089
|
+
listeners: listeners2
|
|
46090
|
+
});
|
|
46091
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
46092
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
46093
|
+
className: "widget-chat-container",
|
|
46094
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
46095
|
+
id: "widget-chat-send",
|
|
46096
|
+
className: "widget-chat-display-container",
|
|
46097
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
46098
|
+
className: "chat-receive-container mb-5 d-flex align-items-center",
|
|
46099
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
46100
|
+
className: `widget-chat-receive mb-0`,
|
|
46101
|
+
children: welcome_message
|
|
46102
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
46103
|
+
children: hooks().calendar()
|
|
46104
|
+
})]
|
|
46105
|
+
}), /* @__PURE__ */ jsx(Messages, {
|
|
46106
|
+
chatMessages: messages,
|
|
46107
|
+
dataRef
|
|
46108
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
46109
|
+
ref: bottomRef,
|
|
46110
|
+
className: "chat-bottom"
|
|
46111
|
+
})]
|
|
46112
|
+
}), /* @__PURE__ */ jsx(ChatInput, {
|
|
46113
|
+
dataRef,
|
|
46114
|
+
agent
|
|
46115
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
46116
|
+
style: {
|
|
46117
|
+
fontStyle: "italic",
|
|
46118
|
+
fontSize: "10px"
|
|
46119
|
+
},
|
|
46120
|
+
children: agent && typingEvent ? `${agent == null ? void 0 : agent.first_name} is typing...` : ""
|
|
46121
|
+
})]
|
|
46122
|
+
})
|
|
46123
|
+
});
|
|
46124
|
+
}
|
|
46125
|
+
const ChatInput = react.exports.memo(function({
|
|
46126
|
+
dataRef,
|
|
46127
|
+
agent,
|
|
46128
|
+
typingEvent
|
|
46129
|
+
}) {
|
|
46130
|
+
var _a;
|
|
46131
|
+
const [{
|
|
46132
|
+
chatFiles
|
|
46133
|
+
}, setState, stateRef] = useState({
|
|
46134
|
+
messageText: "",
|
|
46135
|
+
chatFiles: ""
|
|
46136
|
+
});
|
|
46137
|
+
const {
|
|
46138
|
+
socket: socket2
|
|
46139
|
+
} = useSocket();
|
|
46140
|
+
const sendMessage = async () => {
|
|
46141
|
+
var _a2, _b, _c, _d;
|
|
46142
|
+
if (((_a2 = stateRef.current.messageText) == null ? void 0 : _a2.length) || stateRef.current.chatFiles) {
|
|
46143
|
+
socket2.emit("messageFromClient", {
|
|
46144
|
+
message: stateRef.current.messageText,
|
|
46145
|
+
conversation: (_b = dataRef.current) == null ? void 0 : _b.wait.conversation.id,
|
|
46146
|
+
customer: ((_c = dataRef.current) == null ? void 0 : _c.customer.id) || ((_d = dataRef.current) == null ? void 0 : _d.customer)
|
|
46147
|
+
});
|
|
46148
|
+
}
|
|
46149
|
+
document.getElementById("widget-chat-input-field").value = "";
|
|
46150
|
+
document.getElementById("widget-file-upload-input").value = "";
|
|
46151
|
+
setState({
|
|
46152
|
+
chatFiles: null,
|
|
46153
|
+
messageText: ""
|
|
46154
|
+
});
|
|
46155
|
+
};
|
|
46156
|
+
const sendFile = react.exports.useCallback(async () => {
|
|
46157
|
+
var _a2, _b;
|
|
46158
|
+
try {
|
|
46159
|
+
const data2 = new FormData();
|
|
46160
|
+
data2.append("customer", (_a2 = dataRef.current) == null ? void 0 : _a2.customer.id);
|
|
46161
|
+
data2.append("conversation", (_b = dataRef.current) == null ? void 0 : _b.wait.conversation.id);
|
|
46162
|
+
data2.append("message", stateRef.current.messageText);
|
|
46163
|
+
data2.append("attachment", stateRef.current.chatFiles);
|
|
46164
|
+
await createMessage(data2, {
|
|
46165
|
+
headers: {
|
|
46166
|
+
"Content-Type": "multipart/form-data"
|
|
46167
|
+
}
|
|
46168
|
+
});
|
|
46169
|
+
document.getElementById("widget-chat-input-field").value = "";
|
|
46170
|
+
document.getElementById("widget-file-upload-input").value = "";
|
|
46171
|
+
setState({
|
|
46172
|
+
chatFiles: null,
|
|
46173
|
+
messageText: ""
|
|
46174
|
+
});
|
|
46175
|
+
} catch (error) {
|
|
46176
|
+
console.log(error);
|
|
46177
|
+
}
|
|
46178
|
+
}, [stateRef, dataRef, socket2.connected, stateRef]);
|
|
46179
|
+
const handleFileUpload = (e2) => {
|
|
46180
|
+
setState({
|
|
46181
|
+
chatFiles: e2.target.files[0]
|
|
46182
|
+
});
|
|
46183
|
+
};
|
|
46184
|
+
const handleEnterKeypress = (e2) => {
|
|
46185
|
+
if (e2.key === "Enter") {
|
|
46186
|
+
sendMessage();
|
|
46187
|
+
}
|
|
46188
|
+
};
|
|
46189
|
+
const onChange = (e2) => {
|
|
46190
|
+
var _a2, _b, _c;
|
|
46191
|
+
setState({
|
|
46192
|
+
messageText: e2.target.value
|
|
46193
|
+
});
|
|
46194
|
+
((_a2 = agent == null ? void 0 : agent.user) == null ? void 0 : _a2.id) && socket2.emit("typing", {
|
|
46195
|
+
to: (_b = agent == null ? void 0 : agent.user) == null ? void 0 : _b.id,
|
|
46196
|
+
conversation: (_c = dataRef.current) == null ? void 0 : _c.wait.conversation.id,
|
|
46197
|
+
message: e2.target.value
|
|
46198
|
+
});
|
|
46199
|
+
};
|
|
46200
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
46201
|
+
className: "widget-chat-form-container w-100 d-flex justify-content-between align-items-center",
|
|
46202
|
+
children: [/* @__PURE__ */ jsx("small", {
|
|
46203
|
+
className: "file-name",
|
|
46204
|
+
children: chatFiles == null ? void 0 : chatFiles.name
|
|
46205
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
46206
|
+
className: "widget-file-upload-container d-flex justify-content-between align-items-center",
|
|
46207
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
46208
|
+
className: "widget-file-upload-input",
|
|
46209
|
+
type: "file",
|
|
46210
|
+
onChange: handleFileUpload,
|
|
46211
|
+
id: "widget-file-upload-input"
|
|
46212
|
+
}), /* @__PURE__ */ jsx("img", {
|
|
46213
|
+
src: attachmentIcon,
|
|
46214
|
+
className: "widget-file-upload-button d-flex justify-content-between align-items-center",
|
|
46215
|
+
alt: "attach file",
|
|
46216
|
+
width: "20px"
|
|
46217
|
+
})]
|
|
46218
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
46219
|
+
className: "widget-chat-input-container d-flex justify-content-between align-items-center",
|
|
46220
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
46221
|
+
className: "",
|
|
46222
|
+
type: "text",
|
|
46223
|
+
onChange,
|
|
46224
|
+
onKeyDown: handleEnterKeypress,
|
|
46225
|
+
placeholder: "Type here...",
|
|
46226
|
+
id: "widget-chat-input-field",
|
|
46227
|
+
autoComplete: "off",
|
|
46228
|
+
autoFocus: true,
|
|
46229
|
+
disabled: ((_a = document.getElementById("widget-file-upload-input")) == null ? void 0 : _a.value) !== ""
|
|
46230
|
+
}), /* @__PURE__ */ jsx("img", {
|
|
46231
|
+
onClick: chatFiles ? sendFile : sendMessage,
|
|
46232
|
+
className: "widget-send-img",
|
|
46233
|
+
src: sendIcon,
|
|
46234
|
+
alt: "send message",
|
|
46235
|
+
width: "16px",
|
|
46236
|
+
height: "20px"
|
|
46237
|
+
})]
|
|
46238
|
+
})]
|
|
46239
|
+
});
|
|
46095
46240
|
});
|
|
46096
|
-
const
|
|
46241
|
+
const Messages = react.exports.memo(function({
|
|
46242
|
+
chatMessages,
|
|
46243
|
+
dataRef
|
|
46244
|
+
}) {
|
|
46245
|
+
return chatMessages.map((msg) => {
|
|
46246
|
+
var _a, _b, _c, _d;
|
|
46247
|
+
return /* @__PURE__ */ jsx(Message, {
|
|
46248
|
+
isSender: ((_c = (_b = (_a = dataRef.current) == null ? void 0 : _a.customer) == null ? void 0 : _b.user) == null ? void 0 : _c.id) === (((_d = msg.user) == null ? void 0 : _d.id) || msg.user),
|
|
46249
|
+
...msg
|
|
46250
|
+
}, msg.id);
|
|
46251
|
+
});
|
|
46252
|
+
});
|
|
46253
|
+
const Message = react.exports.memo(function({
|
|
46254
|
+
attachment,
|
|
46255
|
+
...msg
|
|
46256
|
+
}) {
|
|
46257
|
+
var _a, _b, _c, _d, _e;
|
|
46258
|
+
const file = react.exports.useMemo(() => attachment && {
|
|
46259
|
+
name: attachment.split(".").slice(-2, -1),
|
|
46260
|
+
ext: attachment == null ? void 0 : attachment.split(".").pop()
|
|
46261
|
+
}, [attachment]);
|
|
46262
|
+
return msg.isSender ? /* @__PURE__ */ jsx("div", {
|
|
46263
|
+
className: "chat-send-container mb-5",
|
|
46264
|
+
children: ((_a = msg.message) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
46265
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
46266
|
+
className: "widget-chat-send",
|
|
46267
|
+
children: msg.message
|
|
46268
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
46269
|
+
children: hooks(msg.createdAt).calendar()
|
|
46270
|
+
})]
|
|
46271
|
+
}) : !!attachment ? /* @__PURE__ */ jsxs(Fragment, {
|
|
46272
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
46273
|
+
className: "widget-chat-send widget-chat-file",
|
|
46274
|
+
children: [isFileType(file.ext) === "image" ? /* @__PURE__ */ jsx("a", {
|
|
46275
|
+
target: "_blank",
|
|
46276
|
+
rel: "noreferrer",
|
|
46277
|
+
href: attachment,
|
|
46278
|
+
download: file == null ? void 0 : file.name,
|
|
46279
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
46280
|
+
src: attachment,
|
|
46281
|
+
height: 60,
|
|
46282
|
+
alt: file.name
|
|
46283
|
+
})
|
|
46284
|
+
}) : /* @__PURE__ */ jsx("a", {
|
|
46285
|
+
target: "_blank",
|
|
46286
|
+
rel: "noreferrer",
|
|
46287
|
+
href: attachment,
|
|
46288
|
+
download: file == null ? void 0 : file.name,
|
|
46289
|
+
children: file.name
|
|
46290
|
+
}), " "]
|
|
46291
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
46292
|
+
children: hooks(msg.createdAt).calendar()
|
|
46293
|
+
})]
|
|
46294
|
+
}) : null
|
|
46295
|
+
}, msg.id) : /* @__PURE__ */ jsxs("div", {
|
|
46296
|
+
className: "chat-receive-container mb-5 d-flex align-items-center",
|
|
46297
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
46298
|
+
className: "pt-3 align-items-center text-align-center",
|
|
46299
|
+
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
46300
|
+
size: "30",
|
|
46301
|
+
className: "m-0 mr-2",
|
|
46302
|
+
src: (_c = (_b = msg == null ? void 0 : msg.user) == null ? void 0 : _b.agent) == null ? void 0 : _c.profile_picture,
|
|
46303
|
+
round: true
|
|
46304
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
46305
|
+
style: {
|
|
46306
|
+
color: "black"
|
|
46307
|
+
},
|
|
46308
|
+
className: "m-0 p-0 pt-1",
|
|
46309
|
+
children: (_e = (_d = msg == null ? void 0 : msg.user) == null ? void 0 : _d.agent) == null ? void 0 : _e.first_name
|
|
46310
|
+
})]
|
|
46311
|
+
}), !!attachment ? /* @__PURE__ */ jsx("p", {
|
|
46312
|
+
className: `widget-chat-file mb-0`,
|
|
46313
|
+
children: isFileType(file.ext) === "image" ? /* @__PURE__ */ jsx("a", {
|
|
46314
|
+
target: "_blank",
|
|
46315
|
+
rel: "noreferrer",
|
|
46316
|
+
href: attachment,
|
|
46317
|
+
download: file == null ? void 0 : file.name,
|
|
46318
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
46319
|
+
src: attachment,
|
|
46320
|
+
height: 60,
|
|
46321
|
+
alt: ""
|
|
46322
|
+
})
|
|
46323
|
+
}) : /* @__PURE__ */ jsx("a", {
|
|
46324
|
+
target: "_blank",
|
|
46325
|
+
rel: "noreferrer",
|
|
46326
|
+
href: attachment,
|
|
46327
|
+
download: file == null ? void 0 : file.name,
|
|
46328
|
+
children: file == null ? void 0 : file.name
|
|
46329
|
+
})
|
|
46330
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
46331
|
+
className: `widget-chat-receive mb-0`,
|
|
46332
|
+
children: msg.message
|
|
46333
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
46334
|
+
children: hooks(msg == null ? void 0 : msg.createdAt).calendar()
|
|
46335
|
+
})]
|
|
46336
|
+
}, msg.id);
|
|
46337
|
+
});
|
|
46338
|
+
const ChatWidgetScreen$1 = react.exports.memo(ChatWidgetScreen);
|
|
46339
|
+
const viewCompany = (id2, params) => api("companies/" + id2, params);
|
|
46097
46340
|
const iceServers = [
|
|
46098
46341
|
{
|
|
46099
46342
|
url: "stun:global.stun.twilio.com:3478?transport=udp",
|
|
@@ -46717,7 +46960,7 @@ const ActionBtn = ({
|
|
|
46717
46960
|
style: {
|
|
46718
46961
|
backgroundColor: "rgba(0,0,0,0.4)"
|
|
46719
46962
|
},
|
|
46720
|
-
className: "p-2 px-2
|
|
46963
|
+
className: "p-2 px-2 rounded-circle mx-2 text-white",
|
|
46721
46964
|
...props,
|
|
46722
46965
|
children
|
|
46723
46966
|
});
|
|
@@ -46925,457 +47168,18 @@ function VideoCall({
|
|
|
46925
47168
|
});
|
|
46926
47169
|
}
|
|
46927
47170
|
const VideoCall$1 = react.exports.memo(react.exports.forwardRef(VideoCall));
|
|
46928
|
-
|
|
46929
|
-
|
|
46930
|
-
|
|
46931
|
-
|
|
46932
|
-
|
|
46933
|
-
|
|
46934
|
-
}) {
|
|
46935
|
-
var _a, _b, _c, _d, _e;
|
|
46936
|
-
const bottomRef = react.exports.useRef();
|
|
46937
|
-
const [{
|
|
46938
|
-
typingEvent
|
|
46939
|
-
}, setEvent] = useState({
|
|
46940
|
-
typingEvent: false
|
|
46941
|
-
});
|
|
46942
|
-
const {
|
|
46943
|
-
state: {
|
|
46944
|
-
data: {
|
|
46945
|
-
data: messages = []
|
|
46946
|
-
}
|
|
46947
|
-
},
|
|
46948
|
-
setState
|
|
46949
|
-
} = useRequest({
|
|
46950
|
-
asyncRequest: getMessages,
|
|
46951
|
-
params: [{
|
|
46952
|
-
conversation: (_a = dataRef.current) == null ? void 0 : _a.wait.conversation.id
|
|
46953
|
-
}]
|
|
46954
|
-
});
|
|
47171
|
+
const viewCustomer = (id2, params) => api(`customers/${id2}`, params);
|
|
47172
|
+
const Interval = react.exports.memo(({
|
|
47173
|
+
Render,
|
|
47174
|
+
interval = 1e3 * 60 * 5
|
|
47175
|
+
}) => {
|
|
47176
|
+
const [, setState] = react.exports.useState();
|
|
46955
47177
|
react.exports.useEffect(() => {
|
|
46956
|
-
|
|
46957
|
-
(
|
|
46958
|
-
}, [
|
|
46959
|
-
|
|
46960
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
46961
|
-
return {
|
|
46962
|
-
[`message.new.${((_a2 = dataRef.current) == null ? void 0 : _a2.wait.conversation.id) || ((_b2 = dataRef.current) == null ? void 0 : _b2.wait.conversation)}`]: ({
|
|
46963
|
-
message
|
|
46964
|
-
}) => {
|
|
46965
|
-
var _a3, _b3, _c3, _d3, _e3;
|
|
46966
|
-
const sender = ((_a3 = message.user) == null ? void 0 : _a3.id) || message.user;
|
|
46967
|
-
const customer = (_b3 = dataRef.current) == null ? void 0 : _b3.customer;
|
|
46968
|
-
const isSender = ((_c3 = customer == null ? void 0 : customer.user) == null ? void 0 : _c3.id) === (((_d3 = message.user) == null ? void 0 : _d3.id) || message.user);
|
|
46969
|
-
message.isSender = isSender;
|
|
46970
|
-
!isSender && videoRef.current.playSound(messageSound, (sound) => sound.loop = false);
|
|
46971
|
-
setState((s2) => {
|
|
46972
|
-
s2.data.data.unshift(message);
|
|
46973
|
-
return s2;
|
|
46974
|
-
});
|
|
46975
|
-
if (sender !== ((_e3 = customer == null ? void 0 : customer.user) == null ? void 0 : _e3.id)) {
|
|
46976
|
-
t$1.emit("agent-joined", message.user);
|
|
46977
|
-
}
|
|
46978
|
-
},
|
|
46979
|
-
[`WaitList.closed.${(_c2 = dataRef.current) == null ? void 0 : _c2.wait.id}`]: () => {
|
|
46980
|
-
setChatClose(false);
|
|
46981
|
-
},
|
|
46982
|
-
[`typing.${((_d2 = dataRef.current) == null ? void 0 : _d2.wait.conversation.id) || ((_e2 = dataRef.current) == null ? void 0 : _e2.wait.conversation)}`]: (data2) => {
|
|
46983
|
-
setEvent((state) => {
|
|
46984
|
-
state.typingEvent = true;
|
|
46985
|
-
if (state.timeOut) {
|
|
46986
|
-
clearTimeout(state.timeOut);
|
|
46987
|
-
}
|
|
46988
|
-
state.timeOut = setTimeout(() => {
|
|
46989
|
-
setEvent({
|
|
46990
|
-
timeOut: true,
|
|
46991
|
-
typingEvent: false
|
|
46992
|
-
});
|
|
46993
|
-
}, 2e3);
|
|
46994
|
-
return state;
|
|
46995
|
-
});
|
|
46996
|
-
}
|
|
46997
|
-
};
|
|
46998
|
-
}, [(_c = (_b = dataRef.current) == null ? void 0 : _b.customer) == null ? void 0 : _c.id, t$1, setChatClose, ((_d = dataRef.current) == null ? void 0 : _d.wait.conversation.id) || ((_e = dataRef.current) == null ? void 0 : _e.wait.conversation)]);
|
|
46999
|
-
useSocketListeners({
|
|
47000
|
-
listeners: listeners2
|
|
47001
|
-
});
|
|
47002
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
47003
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
47004
|
-
className: "widget-chat-container",
|
|
47005
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
47006
|
-
id: "widget-chat-send",
|
|
47007
|
-
className: "widget-chat-display-container",
|
|
47008
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
47009
|
-
className: "chat-receive-container mb-5 d-flex align-items-center",
|
|
47010
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
47011
|
-
className: `widget-chat-receive mb-0`,
|
|
47012
|
-
children: welcome_message
|
|
47013
|
-
}), /* @__PURE__ */ jsx("small", {
|
|
47014
|
-
children: hooks().calendar()
|
|
47015
|
-
})]
|
|
47016
|
-
}), /* @__PURE__ */ jsx(Messages, {
|
|
47017
|
-
chatMessages: messages,
|
|
47018
|
-
dataRef
|
|
47019
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
47020
|
-
ref: bottomRef,
|
|
47021
|
-
className: "chat-bottom"
|
|
47022
|
-
})]
|
|
47023
|
-
}), /* @__PURE__ */ jsx(ChatInput, {
|
|
47024
|
-
dataRef,
|
|
47025
|
-
agent
|
|
47026
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
47027
|
-
style: {
|
|
47028
|
-
fontStyle: "italic",
|
|
47029
|
-
fontSize: "10px"
|
|
47030
|
-
},
|
|
47031
|
-
children: agent && typingEvent ? `${agent == null ? void 0 : agent.first_name} is typing...` : ""
|
|
47032
|
-
})]
|
|
47033
|
-
})
|
|
47034
|
-
});
|
|
47035
|
-
}
|
|
47036
|
-
const ChatInput = react.exports.memo(function({
|
|
47037
|
-
dataRef,
|
|
47038
|
-
agent,
|
|
47039
|
-
typingEvent
|
|
47040
|
-
}) {
|
|
47041
|
-
var _a;
|
|
47042
|
-
const [{
|
|
47043
|
-
chatFiles
|
|
47044
|
-
}, setState, stateRef] = useState({
|
|
47045
|
-
messageText: "",
|
|
47046
|
-
chatFiles: ""
|
|
47047
|
-
});
|
|
47048
|
-
const {
|
|
47049
|
-
socket: socket2
|
|
47050
|
-
} = useSocket();
|
|
47051
|
-
const sendMessage = async () => {
|
|
47052
|
-
var _a2, _b, _c, _d;
|
|
47053
|
-
if (((_a2 = stateRef.current.messageText) == null ? void 0 : _a2.length) || stateRef.current.chatFiles) {
|
|
47054
|
-
socket2.emit("messageFromClient", {
|
|
47055
|
-
message: stateRef.current.messageText,
|
|
47056
|
-
conversation: (_b = dataRef.current) == null ? void 0 : _b.wait.conversation.id,
|
|
47057
|
-
customer: ((_c = dataRef.current) == null ? void 0 : _c.customer.id) || ((_d = dataRef.current) == null ? void 0 : _d.customer)
|
|
47058
|
-
});
|
|
47059
|
-
}
|
|
47060
|
-
document.getElementById("widget-chat-input-field").value = "";
|
|
47061
|
-
document.getElementById("widget-file-upload-input").value = "";
|
|
47062
|
-
setState({
|
|
47063
|
-
chatFiles: null,
|
|
47064
|
-
messageText: ""
|
|
47065
|
-
});
|
|
47066
|
-
};
|
|
47067
|
-
const sendFile = react.exports.useCallback(async () => {
|
|
47068
|
-
var _a2, _b;
|
|
47069
|
-
try {
|
|
47070
|
-
const data2 = new FormData();
|
|
47071
|
-
data2.append("customer", (_a2 = dataRef.current) == null ? void 0 : _a2.customer.id);
|
|
47072
|
-
data2.append("conversation", (_b = dataRef.current) == null ? void 0 : _b.wait.conversation.id);
|
|
47073
|
-
data2.append("message", stateRef.current.messageText);
|
|
47074
|
-
data2.append("attachment", stateRef.current.chatFiles);
|
|
47075
|
-
await createMessage(data2, {
|
|
47076
|
-
headers: {
|
|
47077
|
-
"Content-Type": "multipart/form-data"
|
|
47078
|
-
}
|
|
47079
|
-
});
|
|
47080
|
-
document.getElementById("widget-chat-input-field").value = "";
|
|
47081
|
-
document.getElementById("widget-file-upload-input").value = "";
|
|
47082
|
-
setState({
|
|
47083
|
-
chatFiles: null,
|
|
47084
|
-
messageText: ""
|
|
47085
|
-
});
|
|
47086
|
-
} catch (error) {
|
|
47087
|
-
console.log(error);
|
|
47088
|
-
}
|
|
47089
|
-
}, [stateRef, dataRef, socket2.connected, stateRef]);
|
|
47090
|
-
const handleFileUpload = (e2) => {
|
|
47091
|
-
setState({
|
|
47092
|
-
chatFiles: e2.target.files[0]
|
|
47093
|
-
});
|
|
47094
|
-
};
|
|
47095
|
-
const handleEnterKeypress = (e2) => {
|
|
47096
|
-
if (e2.key === "Enter") {
|
|
47097
|
-
sendMessage();
|
|
47098
|
-
}
|
|
47099
|
-
};
|
|
47100
|
-
const onChange = (e2) => {
|
|
47101
|
-
var _a2, _b, _c;
|
|
47102
|
-
setState({
|
|
47103
|
-
messageText: e2.target.value
|
|
47104
|
-
});
|
|
47105
|
-
((_a2 = agent == null ? void 0 : agent.user) == null ? void 0 : _a2.id) && socket2.emit("typing", {
|
|
47106
|
-
to: (_b = agent == null ? void 0 : agent.user) == null ? void 0 : _b.id,
|
|
47107
|
-
conversation: (_c = dataRef.current) == null ? void 0 : _c.wait.conversation.id,
|
|
47108
|
-
message: e2.target.value
|
|
47109
|
-
});
|
|
47110
|
-
};
|
|
47111
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
47112
|
-
className: "widget-chat-form-container w-100 d-flex justify-content-between align-items-center",
|
|
47113
|
-
children: [/* @__PURE__ */ jsx("small", {
|
|
47114
|
-
className: "file-name",
|
|
47115
|
-
children: chatFiles == null ? void 0 : chatFiles.name
|
|
47116
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
47117
|
-
className: "widget-file-upload-container d-flex justify-content-between align-items-center",
|
|
47118
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
47119
|
-
className: "widget-file-upload-input",
|
|
47120
|
-
type: "file",
|
|
47121
|
-
onChange: handleFileUpload,
|
|
47122
|
-
id: "widget-file-upload-input"
|
|
47123
|
-
}), /* @__PURE__ */ jsx("img", {
|
|
47124
|
-
src: attachmentIcon,
|
|
47125
|
-
className: "widget-file-upload-button d-flex justify-content-between align-items-center",
|
|
47126
|
-
alt: "attach file",
|
|
47127
|
-
width: "20px"
|
|
47128
|
-
})]
|
|
47129
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
47130
|
-
className: "widget-chat-input-container ml-2 d-flex justify-content-between align-items-center",
|
|
47131
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
47132
|
-
className: "",
|
|
47133
|
-
type: "text",
|
|
47134
|
-
onChange,
|
|
47135
|
-
onKeyDown: handleEnterKeypress,
|
|
47136
|
-
placeholder: "Type here...",
|
|
47137
|
-
id: "widget-chat-input-field",
|
|
47138
|
-
autoComplete: "off",
|
|
47139
|
-
autoFocus: true,
|
|
47140
|
-
disabled: ((_a = document.getElementById("widget-file-upload-input")) == null ? void 0 : _a.value) !== ""
|
|
47141
|
-
}), /* @__PURE__ */ jsx("img", {
|
|
47142
|
-
onClick: chatFiles ? sendFile : sendMessage,
|
|
47143
|
-
className: "widget-send-img",
|
|
47144
|
-
src: sendIcon,
|
|
47145
|
-
alt: "send message",
|
|
47146
|
-
width: "16px",
|
|
47147
|
-
height: "20px"
|
|
47148
|
-
})]
|
|
47149
|
-
})]
|
|
47150
|
-
});
|
|
47151
|
-
});
|
|
47152
|
-
const Messages = react.exports.memo(function({
|
|
47153
|
-
chatMessages,
|
|
47154
|
-
dataRef
|
|
47155
|
-
}) {
|
|
47156
|
-
return chatMessages.slice().reverse().map((msg) => {
|
|
47157
|
-
var _a, _b, _c, _d;
|
|
47158
|
-
return /* @__PURE__ */ jsx(Message, {
|
|
47159
|
-
isSender: ((_c = (_b = (_a = dataRef.current) == null ? void 0 : _a.customer) == null ? void 0 : _b.user) == null ? void 0 : _c.id) === (((_d = msg.user) == null ? void 0 : _d.id) || msg.user),
|
|
47160
|
-
...msg
|
|
47161
|
-
}, msg.id);
|
|
47162
|
-
});
|
|
47163
|
-
});
|
|
47164
|
-
const Message = react.exports.memo(function({
|
|
47165
|
-
attachment,
|
|
47166
|
-
...msg
|
|
47167
|
-
}) {
|
|
47168
|
-
var _a, _b, _c, _d, _e;
|
|
47169
|
-
const file = react.exports.useMemo(() => attachment && {
|
|
47170
|
-
name: attachment.split(".").slice(-2, -1),
|
|
47171
|
-
ext: attachment == null ? void 0 : attachment.split(".").pop()
|
|
47172
|
-
}, [attachment]);
|
|
47173
|
-
return msg.isSender ? /* @__PURE__ */ jsx("div", {
|
|
47174
|
-
className: "chat-send-container mb-5",
|
|
47175
|
-
children: ((_a = msg.message) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
47176
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
47177
|
-
className: "widget-chat-send",
|
|
47178
|
-
children: msg.message
|
|
47179
|
-
}), /* @__PURE__ */ jsx("small", {
|
|
47180
|
-
children: hooks(msg.createdAt).calendar()
|
|
47181
|
-
})]
|
|
47182
|
-
}) : !!attachment ? /* @__PURE__ */ jsxs(Fragment, {
|
|
47183
|
-
children: [/* @__PURE__ */ jsxs("p", {
|
|
47184
|
-
className: "widget-chat-send widget-chat-file",
|
|
47185
|
-
children: [isFileType(file.ext) === "image" ? /* @__PURE__ */ jsx("a", {
|
|
47186
|
-
target: "_blank",
|
|
47187
|
-
rel: "noreferrer",
|
|
47188
|
-
href: attachment,
|
|
47189
|
-
download: file == null ? void 0 : file.name,
|
|
47190
|
-
children: /* @__PURE__ */ jsx("img", {
|
|
47191
|
-
src: attachment,
|
|
47192
|
-
height: 60,
|
|
47193
|
-
alt: file.name
|
|
47194
|
-
})
|
|
47195
|
-
}) : /* @__PURE__ */ jsx("a", {
|
|
47196
|
-
target: "_blank",
|
|
47197
|
-
rel: "noreferrer",
|
|
47198
|
-
href: attachment,
|
|
47199
|
-
download: file == null ? void 0 : file.name,
|
|
47200
|
-
children: file.name
|
|
47201
|
-
}), " "]
|
|
47202
|
-
}), /* @__PURE__ */ jsx("small", {
|
|
47203
|
-
children: hooks(msg.createdAt).calendar()
|
|
47204
|
-
})]
|
|
47205
|
-
}) : null
|
|
47206
|
-
}, msg.id) : /* @__PURE__ */ jsxs("div", {
|
|
47207
|
-
className: "chat-receive-container mb-4 d-flex align-items-center",
|
|
47208
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
47209
|
-
className: "pt-3 mr-1",
|
|
47210
|
-
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
47211
|
-
size: "30",
|
|
47212
|
-
className: "m-0 mr-2",
|
|
47213
|
-
src: (_c = (_b = msg == null ? void 0 : msg.user) == null ? void 0 : _b.agent) == null ? void 0 : _c.profile_picture,
|
|
47214
|
-
round: true
|
|
47215
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
47216
|
-
style: {
|
|
47217
|
-
color: "black"
|
|
47218
|
-
},
|
|
47219
|
-
className: "m-0 p-0 pt-1",
|
|
47220
|
-
children: (_e = (_d = msg == null ? void 0 : msg.user) == null ? void 0 : _d.agent) == null ? void 0 : _e.first_name
|
|
47221
|
-
})]
|
|
47222
|
-
}), !!attachment ? /* @__PURE__ */ jsx("p", {
|
|
47223
|
-
className: `widget-chat-file mb-0`,
|
|
47224
|
-
children: isFileType(file.ext) === "image" ? /* @__PURE__ */ jsx("a", {
|
|
47225
|
-
target: "_blank",
|
|
47226
|
-
rel: "noreferrer",
|
|
47227
|
-
href: attachment,
|
|
47228
|
-
download: file == null ? void 0 : file.name,
|
|
47229
|
-
children: /* @__PURE__ */ jsx("img", {
|
|
47230
|
-
src: attachment,
|
|
47231
|
-
height: 60,
|
|
47232
|
-
alt: ""
|
|
47233
|
-
})
|
|
47234
|
-
}) : /* @__PURE__ */ jsx("a", {
|
|
47235
|
-
target: "_blank",
|
|
47236
|
-
rel: "noreferrer",
|
|
47237
|
-
href: attachment,
|
|
47238
|
-
download: file == null ? void 0 : file.name,
|
|
47239
|
-
children: file == null ? void 0 : file.name
|
|
47240
|
-
})
|
|
47241
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
47242
|
-
className: "w-100",
|
|
47243
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
47244
|
-
className: `widget-chat-receive mb-0`,
|
|
47245
|
-
children: msg.message
|
|
47246
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
47247
|
-
style: {
|
|
47248
|
-
fontSize: 10
|
|
47249
|
-
},
|
|
47250
|
-
className: "m-0 pl-0 text-dark",
|
|
47251
|
-
children: hooks(msg == null ? void 0 : msg.createdAt).calendar()
|
|
47252
|
-
})]
|
|
47253
|
-
}), !!attachment && /* @__PURE__ */ jsx("small", {
|
|
47254
|
-
style: {
|
|
47255
|
-
fontSize: 10
|
|
47256
|
-
},
|
|
47257
|
-
className: "pl-1 text-dark",
|
|
47258
|
-
children: hooks(msg == null ? void 0 : msg.createdAt).calendar()
|
|
47259
|
-
})]
|
|
47260
|
-
}, msg.id);
|
|
47261
|
-
});
|
|
47262
|
-
const LongestWaitime = react.exports.memo(() => {
|
|
47263
|
-
const {
|
|
47264
|
-
state: {
|
|
47265
|
-
data: {
|
|
47266
|
-
waitList
|
|
47267
|
-
}
|
|
47268
|
-
},
|
|
47269
|
-
setState
|
|
47270
|
-
} = useRequest({
|
|
47271
|
-
asyncRequest: getLongestWaitTime
|
|
47272
|
-
});
|
|
47273
|
-
useSocketListeners({
|
|
47274
|
-
listeners: {
|
|
47275
|
-
"longest-wait": ({
|
|
47276
|
-
waitList: waitList2
|
|
47277
|
-
}) => waitList2 && setState((s2) => {
|
|
47278
|
-
var _a;
|
|
47279
|
-
if ((_a = s2.data) == null ? void 0 : _a.waitList) {
|
|
47280
|
-
s2.data.waitList.createdAt = waitList2.createdAt;
|
|
47281
|
-
} else {
|
|
47282
|
-
s2.data = {
|
|
47283
|
-
waitList: waitList2
|
|
47284
|
-
};
|
|
47285
|
-
}
|
|
47286
|
-
})
|
|
47287
|
-
}
|
|
47288
|
-
});
|
|
47289
|
-
return /* @__PURE__ */ jsxs(Row$1, {
|
|
47290
|
-
className: "justify-content-between mt-2 align-items-center",
|
|
47291
|
-
children: [/* @__PURE__ */ jsx(Col$1, {
|
|
47292
|
-
children: /* @__PURE__ */ jsx("hr", {
|
|
47293
|
-
style: {
|
|
47294
|
-
border: "1px solid #000"
|
|
47295
|
-
}
|
|
47296
|
-
})
|
|
47297
|
-
}), /* @__PURE__ */ jsx(Badge$1, {
|
|
47298
|
-
color: "warning",
|
|
47299
|
-
children: /* @__PURE__ */ jsx(Interval, {
|
|
47300
|
-
Render: () => {
|
|
47301
|
-
const d2 = hooks.duration(hooks().diff(waitList == null ? void 0 : waitList.createdAt));
|
|
47302
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
47303
|
-
children: ["Wait Time: ", lodash.exports.padStart(d2._data.hours, 2, "0"), ":", lodash.exports.padStart(d2._data.minutes, 2, "0"), ":", lodash.exports.padStart(d2._data.seconds, 2, "0")]
|
|
47304
|
-
});
|
|
47305
|
-
},
|
|
47306
|
-
interval: 1e3
|
|
47307
|
-
})
|
|
47308
|
-
}), /* @__PURE__ */ jsx(Col$1, {
|
|
47309
|
-
children: /* @__PURE__ */ jsx("hr", {
|
|
47310
|
-
style: {
|
|
47311
|
-
border: "1px solid #000"
|
|
47312
|
-
}
|
|
47313
|
-
})
|
|
47314
|
-
})]
|
|
47315
|
-
});
|
|
47178
|
+
const intv = setInterval(() => setState((bool) => !bool), [interval]);
|
|
47179
|
+
return () => clearInterval(intv);
|
|
47180
|
+
}, [interval]);
|
|
47181
|
+
return /* @__PURE__ */ jsx(Render, {});
|
|
47316
47182
|
});
|
|
47317
|
-
const WidgetInitOnlineHeader = ({
|
|
47318
|
-
dataRef,
|
|
47319
|
-
setChatClose,
|
|
47320
|
-
setIsWidgetLaunched,
|
|
47321
|
-
senderObj,
|
|
47322
|
-
quickStopChat,
|
|
47323
|
-
videoRef
|
|
47324
|
-
}) => {
|
|
47325
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
47326
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
47327
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
47328
|
-
className: "d-flex justify-content-between align-items-center px-3",
|
|
47329
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
47330
|
-
className: "mr-auto",
|
|
47331
|
-
style: {
|
|
47332
|
-
fontSize: 18,
|
|
47333
|
-
color: "#fff"
|
|
47334
|
-
},
|
|
47335
|
-
children: "Video Banking Online"
|
|
47336
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
47337
|
-
className: "widget-option-btn d-flex justify-content-between align-items-center",
|
|
47338
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
47339
|
-
onClick: () => {
|
|
47340
|
-
setIsWidgetLaunched(false);
|
|
47341
|
-
},
|
|
47342
|
-
className: "border-left border-right",
|
|
47343
|
-
style: {
|
|
47344
|
-
width: 25,
|
|
47345
|
-
paddingLeft: 2,
|
|
47346
|
-
paddingRight: 2
|
|
47347
|
-
},
|
|
47348
|
-
children: /* @__PURE__ */ jsx("img", {
|
|
47349
|
-
src: maximizeIcon,
|
|
47350
|
-
alt: "maximize",
|
|
47351
|
-
width: "20px",
|
|
47352
|
-
className: ""
|
|
47353
|
-
})
|
|
47354
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
47355
|
-
className: "w-50 close-chat ml-3",
|
|
47356
|
-
children: /* @__PURE__ */ jsx("img", {
|
|
47357
|
-
src: closeIcon,
|
|
47358
|
-
onClick: () => {
|
|
47359
|
-
senderObj ? setChatClose(false) : quickStopChat();
|
|
47360
|
-
},
|
|
47361
|
-
alt: "close",
|
|
47362
|
-
width: "20px"
|
|
47363
|
-
})
|
|
47364
|
-
})]
|
|
47365
|
-
})]
|
|
47366
|
-
}), /* @__PURE__ */ jsx(Col$1, {
|
|
47367
|
-
className: "m-0 p-0",
|
|
47368
|
-
children: ((_b = (_a = dataRef.current) == null ? void 0 : _a.customer) == null ? void 0 : _b.id) && /* @__PURE__ */ jsx(VideoCall$1, {
|
|
47369
|
-
userId: ((_e = (_d = (_c = dataRef.current) == null ? void 0 : _c.customer) == null ? void 0 : _d.user) == null ? void 0 : _e.id) || ((_g = (_f = dataRef.current) == null ? void 0 : _f.customer) == null ? void 0 : _g.user),
|
|
47370
|
-
conversation_id: (_h = dataRef.current) == null ? void 0 : _h.wait.conversation.id,
|
|
47371
|
-
ref: videoRef
|
|
47372
|
-
})
|
|
47373
|
-
})]
|
|
47374
|
-
});
|
|
47375
|
-
};
|
|
47376
|
-
const ChatWidgetScreen$1 = react.exports.memo(ChatWidgetScreen);
|
|
47377
|
-
const viewCompany = (id2, params) => api("companies/" + id2, params);
|
|
47378
|
-
const viewCustomer = (id2, params) => api(`customers/${id2}`, params);
|
|
47379
47183
|
const days = {
|
|
47380
47184
|
Monday: 1,
|
|
47381
47185
|
Tuesday: 2,
|
|
@@ -47404,7 +47208,6 @@ function UnwrapWidget({
|
|
|
47404
47208
|
}
|
|
47405
47209
|
}, [companyUser]);
|
|
47406
47210
|
const [isWidgetLaunched, setIsWidgetLaunched] = useState(false);
|
|
47407
|
-
const [showTip, setShowTip] = useState(false);
|
|
47408
47211
|
const company_id = projectId || config.projectId;
|
|
47409
47212
|
const {
|
|
47410
47213
|
state: {
|
|
@@ -47432,21 +47235,14 @@ function UnwrapWidget({
|
|
|
47432
47235
|
}
|
|
47433
47236
|
}, [isLoadingCompany, company == null ? void 0 : company.name]);
|
|
47434
47237
|
react.exports.useEffect(() => {
|
|
47435
|
-
|
|
47436
|
-
|
|
47437
|
-
|
|
47438
|
-
return () => {
|
|
47439
|
-
clearTimeout(timeout);
|
|
47440
|
-
clearTimeout(timeout1);
|
|
47441
|
-
};
|
|
47238
|
+
const element = document.getElementById("welcomeMessage");
|
|
47239
|
+
if (element) {
|
|
47240
|
+
element.click();
|
|
47442
47241
|
}
|
|
47443
|
-
}, [
|
|
47444
|
-
if (isLoadingCompany || isLoadingCompany === void 0) {
|
|
47445
|
-
return null;
|
|
47446
|
-
}
|
|
47242
|
+
}, [document.getElementById("welcomeMessage")]);
|
|
47447
47243
|
return /* @__PURE__ */ jsxs("div", {
|
|
47448
47244
|
className: `widget-cover mb-2 ${isWidgetLaunched ? "widget-cover-container" : ""}`,
|
|
47449
|
-
children: [/* @__PURE__ */ jsx(WidgetFormDisplay, {
|
|
47245
|
+
children: [isLoadingCompany || isLoadingCompany === void 0 ? /* @__PURE__ */ jsx(Spinner$2, {}) : /* @__PURE__ */ jsx(WidgetFormDisplay, {
|
|
47450
47246
|
companyIsClosed,
|
|
47451
47247
|
company_id,
|
|
47452
47248
|
company,
|
|
@@ -47454,9 +47250,9 @@ function UnwrapWidget({
|
|
|
47454
47250
|
setIsWidgetLaunched,
|
|
47455
47251
|
isWidgetLaunched
|
|
47456
47252
|
}), /* @__PURE__ */ jsxs("div", {
|
|
47457
|
-
children: [/* @__PURE__ */ jsx(
|
|
47253
|
+
children: [/* @__PURE__ */ jsx(UncontrolledTooltip, {
|
|
47458
47254
|
placement: "right",
|
|
47459
|
-
|
|
47255
|
+
trigger: "click",
|
|
47460
47256
|
target: "welcomeMessage",
|
|
47461
47257
|
style: {
|
|
47462
47258
|
backgroundColor: `${hex_code}`
|
|
@@ -47465,10 +47261,7 @@ function UnwrapWidget({
|
|
|
47465
47261
|
}), /* @__PURE__ */ jsx("div", {
|
|
47466
47262
|
id: "welcomeMessage",
|
|
47467
47263
|
className: `widget-launcher-container mx-5 mb-5 mt-2 ${isWidgetLaunched ? "" : "animate"}`,
|
|
47468
|
-
onClick: () =>
|
|
47469
|
-
setShowTip(false);
|
|
47470
|
-
setIsWidgetLaunched(!isWidgetLaunched);
|
|
47471
|
-
},
|
|
47264
|
+
onClick: () => setIsWidgetLaunched(!isWidgetLaunched),
|
|
47472
47265
|
style: {
|
|
47473
47266
|
backgroundColor: `${hex_code}`
|
|
47474
47267
|
},
|
|
@@ -47522,7 +47315,7 @@ const WidgetFormDisplay = react.exports.memo(({
|
|
|
47522
47315
|
setIsWidgetLaunched,
|
|
47523
47316
|
isWidgetLaunched
|
|
47524
47317
|
}) => {
|
|
47525
|
-
var _a, _b, _c, _d;
|
|
47318
|
+
var _a, _b, _c, _d, _e, _f;
|
|
47526
47319
|
const {
|
|
47527
47320
|
socket: socket2
|
|
47528
47321
|
} = useSocket();
|
|
@@ -47569,18 +47362,26 @@ const WidgetFormDisplay = react.exports.memo(({
|
|
|
47569
47362
|
}
|
|
47570
47363
|
}, [socket2.connected, chatInit, customer == null ? void 0 : customer.id]);
|
|
47571
47364
|
const quickStopChat = react.exports.useCallback(() => {
|
|
47365
|
+
var _a2, _b2, _c2, _d2;
|
|
47572
47366
|
setState({
|
|
47573
47367
|
chatInit: false,
|
|
47574
47368
|
chatClose: true,
|
|
47575
47369
|
companyClosed: companyIsClosed
|
|
47576
47370
|
});
|
|
47371
|
+
((_a2 = dataRef.current) == null ? void 0 : _a2.wait) && socket2.emit("chat.ended", {
|
|
47372
|
+
to: (_b2 = agent == null ? void 0 : agent.user) == null ? void 0 : _b2.id,
|
|
47373
|
+
waitId: (_d2 = (_c2 = dataRef.current) == null ? void 0 : _c2.wait) == null ? void 0 : _d2.id,
|
|
47374
|
+
customer
|
|
47375
|
+
});
|
|
47577
47376
|
dataRef.current = null;
|
|
47578
|
-
}, [companyIsClosed, dataRef]);
|
|
47377
|
+
}, [companyIsClosed, (_b = dataRef.current) == null ? void 0 : _b.wait, (_c = agent == null ? void 0 : agent.user) == null ? void 0 : _c.id, customer]);
|
|
47579
47378
|
const setChatClose = (chatClose2) => {
|
|
47580
|
-
var _a2, _b2;
|
|
47379
|
+
var _a2, _b2, _c2;
|
|
47581
47380
|
t$1.emit("chat-ended");
|
|
47582
|
-
|
|
47583
|
-
|
|
47381
|
+
socket2.emit("chat.ended", {
|
|
47382
|
+
to: (_a2 = agent == null ? void 0 : agent.user) == null ? void 0 : _a2.id,
|
|
47383
|
+
waitId: (_c2 = (_b2 = dataRef.current) == null ? void 0 : _b2.wait) == null ? void 0 : _c2.id,
|
|
47384
|
+
customer
|
|
47584
47385
|
});
|
|
47585
47386
|
setState({
|
|
47586
47387
|
chatClose: chatClose2
|
|
@@ -47635,11 +47436,9 @@ const WidgetFormDisplay = react.exports.memo(({
|
|
|
47635
47436
|
quickStopChat,
|
|
47636
47437
|
company,
|
|
47637
47438
|
videoRef
|
|
47638
|
-
}), !!((
|
|
47439
|
+
}), !!((_e = (_d = dataRef == null ? void 0 : dataRef.current) == null ? void 0 : _d.wait) == null ? void 0 : _e.createdAt) && !stateRef.current.agent && /* @__PURE__ */ jsx(LongestWaitime, {}), /* @__PURE__ */ jsx("div", {
|
|
47639
47440
|
className: `widget-body-container px-3 ${companyClosed && "widget-body-container-offline"} `,
|
|
47640
|
-
children: isLoadingCustomer
|
|
47641
|
-
className: "d-flex align-self-center m-5 mx-auto"
|
|
47642
|
-
}) : isScheduling ? /* @__PURE__ */ jsx(Schedules, {
|
|
47441
|
+
children: isLoadingCustomer ? /* @__PURE__ */ jsx(Spinner$2, {}) : isScheduling ? /* @__PURE__ */ jsx(Schedules, {
|
|
47643
47442
|
setParentState: setState,
|
|
47644
47443
|
customer,
|
|
47645
47444
|
setIsScheduling,
|
|
@@ -47659,7 +47458,7 @@ const WidgetFormDisplay = react.exports.memo(({
|
|
|
47659
47458
|
}) : chatInit && !chatClose ? /* @__PURE__ */ jsx(Feedback$1, {
|
|
47660
47459
|
quickStopChat,
|
|
47661
47460
|
agent,
|
|
47662
|
-
conversation_id: (
|
|
47461
|
+
conversation_id: (_f = dataRef.current) == null ? void 0 : _f.wait.conversation.id
|
|
47663
47462
|
}) : !chatInit ? /* @__PURE__ */ jsx(WidgetInitForm$1, {
|
|
47664
47463
|
company_id,
|
|
47665
47464
|
companyUser,
|
|
@@ -47678,36 +47477,141 @@ const WidgetFormDisplay = react.exports.memo(({
|
|
|
47678
47477
|
}), /* @__PURE__ */ jsx(Footer, {})]
|
|
47679
47478
|
});
|
|
47680
47479
|
});
|
|
47480
|
+
const LongestWaitime = react.exports.memo(() => {
|
|
47481
|
+
const {
|
|
47482
|
+
state: {
|
|
47483
|
+
data: {
|
|
47484
|
+
waitList
|
|
47485
|
+
}
|
|
47486
|
+
},
|
|
47487
|
+
setState
|
|
47488
|
+
} = useRequest({
|
|
47489
|
+
asyncRequest: getLongestWaitTime
|
|
47490
|
+
});
|
|
47491
|
+
useSocketListeners({
|
|
47492
|
+
listeners: {
|
|
47493
|
+
"longest-wait": ({
|
|
47494
|
+
waitList: waitList2
|
|
47495
|
+
}) => waitList2 && setState((s2) => {
|
|
47496
|
+
var _a;
|
|
47497
|
+
if ((_a = s2.data) == null ? void 0 : _a.waitList) {
|
|
47498
|
+
s2.data.waitList.createdAt = waitList2.createdAt;
|
|
47499
|
+
} else {
|
|
47500
|
+
s2.data = {
|
|
47501
|
+
waitList: waitList2
|
|
47502
|
+
};
|
|
47503
|
+
}
|
|
47504
|
+
})
|
|
47505
|
+
}
|
|
47506
|
+
});
|
|
47507
|
+
return /* @__PURE__ */ jsxs(Row$1, {
|
|
47508
|
+
className: "justify-content-between align-items-center",
|
|
47509
|
+
children: [/* @__PURE__ */ jsx(Col$1, {
|
|
47510
|
+
children: /* @__PURE__ */ jsx("hr", {
|
|
47511
|
+
style: {
|
|
47512
|
+
border: "1px solid #000"
|
|
47513
|
+
}
|
|
47514
|
+
})
|
|
47515
|
+
}), /* @__PURE__ */ jsx(Badge$1, {
|
|
47516
|
+
color: "warning",
|
|
47517
|
+
children: /* @__PURE__ */ jsx(Interval, {
|
|
47518
|
+
Render: () => {
|
|
47519
|
+
const d2 = hooks.duration(hooks().diff(waitList == null ? void 0 : waitList.createdAt));
|
|
47520
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
47521
|
+
children: ["Wait Time: ", lodash.exports.padStart(d2._data.hours, 2, "0"), ":", lodash.exports.padStart(d2._data.minutes, 2, "0"), ":", lodash.exports.padStart(d2._data.seconds, 2, "0")]
|
|
47522
|
+
});
|
|
47523
|
+
},
|
|
47524
|
+
interval: 1e3
|
|
47525
|
+
})
|
|
47526
|
+
}), /* @__PURE__ */ jsx(Col$1, {
|
|
47527
|
+
children: /* @__PURE__ */ jsx("hr", {
|
|
47528
|
+
style: {
|
|
47529
|
+
border: "1px solid #000"
|
|
47530
|
+
}
|
|
47531
|
+
})
|
|
47532
|
+
})]
|
|
47533
|
+
});
|
|
47534
|
+
});
|
|
47681
47535
|
const Footer = () => /* @__PURE__ */ jsx("div", {
|
|
47682
47536
|
className: "widget-footer-container",
|
|
47683
47537
|
children: /* @__PURE__ */ jsxs("div", {
|
|
47684
47538
|
className: "d-flex justify-content-center align-items-center",
|
|
47685
47539
|
children: [/* @__PURE__ */ jsx("span", {
|
|
47686
|
-
className: "
|
|
47540
|
+
className: "mb-0",
|
|
47541
|
+
style: {
|
|
47542
|
+
fontSize: 12,
|
|
47543
|
+
marginRight: 4
|
|
47544
|
+
},
|
|
47687
47545
|
children: "Powered by"
|
|
47688
|
-
}), /* @__PURE__ */ jsx("
|
|
47689
|
-
|
|
47690
|
-
|
|
47691
|
-
|
|
47692
|
-
|
|
47546
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
47547
|
+
className: "m-0",
|
|
47548
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
47549
|
+
span: "true",
|
|
47550
|
+
className: "m-0",
|
|
47551
|
+
src: logo,
|
|
47552
|
+
alt: "logo",
|
|
47553
|
+
width: "56px"
|
|
47554
|
+
})
|
|
47693
47555
|
})]
|
|
47694
47556
|
})
|
|
47695
47557
|
});
|
|
47696
|
-
const Widget = react.exports.memo((p2) =>
|
|
47697
|
-
|
|
47698
|
-
|
|
47699
|
-
|
|
47700
|
-
|
|
47701
|
-
|
|
47702
|
-
|
|
47703
|
-
|
|
47704
|
-
children: /* @__PURE__ */ jsx(
|
|
47705
|
-
|
|
47558
|
+
const Widget = react.exports.memo((p2) => {
|
|
47559
|
+
return /* @__PURE__ */ jsx(SawportContext.Provider, {
|
|
47560
|
+
value: {
|
|
47561
|
+
config: sawportConfig,
|
|
47562
|
+
setConfig: setSawportConfig
|
|
47563
|
+
},
|
|
47564
|
+
children: /* @__PURE__ */ jsx(QueryClientProvider, {
|
|
47565
|
+
client: new QueryClient(),
|
|
47566
|
+
children: /* @__PURE__ */ jsx(cjsExports.IoProvider, {
|
|
47567
|
+
children: /* @__PURE__ */ jsx(UnwrapWidget, {
|
|
47568
|
+
...p2
|
|
47569
|
+
})
|
|
47706
47570
|
})
|
|
47707
47571
|
})
|
|
47708
|
-
})
|
|
47709
|
-
})
|
|
47572
|
+
});
|
|
47573
|
+
});
|
|
47710
47574
|
const Widget$1 = react.exports.memo(Widget);
|
|
47575
|
+
const SubTitle = ({
|
|
47576
|
+
from_day,
|
|
47577
|
+
to_time,
|
|
47578
|
+
to_day,
|
|
47579
|
+
from_time
|
|
47580
|
+
}) => /* @__PURE__ */ jsxs(Fragment, {
|
|
47581
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
47582
|
+
className: "m-0 mt-2",
|
|
47583
|
+
children: "Hours of Operation"
|
|
47584
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
47585
|
+
className: "m-0 mt-1",
|
|
47586
|
+
children: [from_day, " - ", to_day, " ", from_time, " - ", to_time]
|
|
47587
|
+
})]
|
|
47588
|
+
});
|
|
47589
|
+
function WidgetOfflineHeader({
|
|
47590
|
+
company
|
|
47591
|
+
}) {
|
|
47592
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
47593
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
47594
|
+
className: "d-flex flex-column justify-content-between align-items-center w-100 py-3 px-2 text-center",
|
|
47595
|
+
style: {
|
|
47596
|
+
fontSize: 16,
|
|
47597
|
+
color: "#fff"
|
|
47598
|
+
},
|
|
47599
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
47600
|
+
className: "mb-0 pb-0",
|
|
47601
|
+
style: {
|
|
47602
|
+
fontSize: 24,
|
|
47603
|
+
fontWeight: "bold"
|
|
47604
|
+
},
|
|
47605
|
+
children: "Video Banking Offline"
|
|
47606
|
+
}), /* @__PURE__ */ jsx(SubTitle, {
|
|
47607
|
+
from_day: company == null ? void 0 : company.from_day,
|
|
47608
|
+
to_day: company == null ? void 0 : company.to_day,
|
|
47609
|
+
from_time: hooks("2020-04-04 " + (company == null ? void 0 : company.from_time)).format("HH:mm"),
|
|
47610
|
+
to_time: hooks("2020-04-04 " + (company == null ? void 0 : company.to_time)).format("HH:mm")
|
|
47611
|
+
})]
|
|
47612
|
+
})
|
|
47613
|
+
});
|
|
47614
|
+
}
|
|
47711
47615
|
function WidgetOnlineHeader() {
|
|
47712
47616
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
47713
47617
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -47733,6 +47637,65 @@ function WidgetOnlineHeader() {
|
|
|
47733
47637
|
})
|
|
47734
47638
|
});
|
|
47735
47639
|
}
|
|
47640
|
+
function WidgetInitOnlineHeader({
|
|
47641
|
+
dataRef,
|
|
47642
|
+
setChatClose,
|
|
47643
|
+
setIsWidgetLaunched,
|
|
47644
|
+
senderObj,
|
|
47645
|
+
quickStopChat,
|
|
47646
|
+
videoRef
|
|
47647
|
+
}) {
|
|
47648
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
47649
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
47650
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
47651
|
+
className: "d-flex justify-content-between align-items-center py-3 px-3",
|
|
47652
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
47653
|
+
className: "mb-0 pb-0 mr-auto",
|
|
47654
|
+
style: {
|
|
47655
|
+
fontSize: 18,
|
|
47656
|
+
color: "#fff"
|
|
47657
|
+
},
|
|
47658
|
+
children: "Video Banking Online"
|
|
47659
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
47660
|
+
className: "widget-option-btn d-flex justify-content-between align-items-center",
|
|
47661
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
47662
|
+
onClick: () => {
|
|
47663
|
+
setIsWidgetLaunched(false);
|
|
47664
|
+
},
|
|
47665
|
+
className: "border-left border-right",
|
|
47666
|
+
style: {
|
|
47667
|
+
width: 25,
|
|
47668
|
+
paddingLeft: 2,
|
|
47669
|
+
paddingRight: 2
|
|
47670
|
+
},
|
|
47671
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
47672
|
+
src: maximizeIcon,
|
|
47673
|
+
alt: "maximize",
|
|
47674
|
+
width: "20px",
|
|
47675
|
+
className: ""
|
|
47676
|
+
})
|
|
47677
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
47678
|
+
className: "w-50 close-chat ml-3",
|
|
47679
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
47680
|
+
src: closeIcon,
|
|
47681
|
+
onClick: () => {
|
|
47682
|
+
senderObj ? setChatClose(false) : quickStopChat();
|
|
47683
|
+
},
|
|
47684
|
+
alt: "close",
|
|
47685
|
+
width: "20px"
|
|
47686
|
+
})
|
|
47687
|
+
})]
|
|
47688
|
+
})]
|
|
47689
|
+
}), /* @__PURE__ */ jsx(Col$1, {
|
|
47690
|
+
className: "m-0 p-0",
|
|
47691
|
+
children: ((_b = (_a = dataRef.current) == null ? void 0 : _a.customer) == null ? void 0 : _b.id) && /* @__PURE__ */ jsx(VideoCall$1, {
|
|
47692
|
+
userId: ((_e = (_d = (_c = dataRef.current) == null ? void 0 : _c.customer) == null ? void 0 : _d.user) == null ? void 0 : _e.id) || ((_g = (_f = dataRef.current) == null ? void 0 : _f.customer) == null ? void 0 : _g.user),
|
|
47693
|
+
conversation_id: (_h = dataRef.current) == null ? void 0 : _h.wait.conversation.id,
|
|
47694
|
+
ref: videoRef
|
|
47695
|
+
})
|
|
47696
|
+
})]
|
|
47697
|
+
});
|
|
47698
|
+
}
|
|
47736
47699
|
var createRoot;
|
|
47737
47700
|
var m = reactDom.exports;
|
|
47738
47701
|
{
|