@sawport/react-sdk 0.1.0-alpha.31 → 0.1.0-alpha.34
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 +1349 -1423
- package/dist/index.umd.js +10 -10
- package/dist/style.css +6 -1
- package/package.json +3 -4
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 = {};
|
|
@@ -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: {} };
|
|
@@ -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";
|
|
@@ -17679,14 +17621,14 @@ var defaultProps$c = {
|
|
|
17679
17621
|
transition: _objectSpread$4({}, 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,7 +17673,7 @@ 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
17679
|
var extendedModifiers = _objectSpread$4({
|
|
@@ -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
|
}
|
|
@@ -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
|
|
@@ -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];
|
|
@@ -18933,7 +18875,7 @@ var defaultProps$1 = {
|
|
|
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);
|
|
@@ -18980,7 +18922,7 @@ var defaultProps = {
|
|
|
18980
18922
|
children: "Loading..."
|
|
18981
18923
|
};
|
|
18982
18924
|
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$
|
|
18925
|
+
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
18926
|
var classes = mapToCssModules(classNames(className, size ? "spinner-" + type + "-" + size : false, "spinner-" + type, color ? "text-" + color : false), cssModule);
|
|
18985
18927
|
return /* @__PURE__ */ jsx(Tag, {
|
|
18986
18928
|
role: "status",
|
|
@@ -26998,36 +26940,36 @@ function parseQueryArgs(arg1, arg2, arg3) {
|
|
|
26998
26940
|
return arg1;
|
|
26999
26941
|
}
|
|
27000
26942
|
if (typeof arg2 === "function") {
|
|
27001
|
-
return _extends$
|
|
26943
|
+
return _extends$1({}, arg3, {
|
|
27002
26944
|
queryKey: arg1,
|
|
27003
26945
|
queryFn: arg2
|
|
27004
26946
|
});
|
|
27005
26947
|
}
|
|
27006
|
-
return _extends$
|
|
26948
|
+
return _extends$1({}, arg2, {
|
|
27007
26949
|
queryKey: arg1
|
|
27008
26950
|
});
|
|
27009
26951
|
}
|
|
27010
26952
|
function parseMutationArgs(arg1, arg2, arg3) {
|
|
27011
26953
|
if (isQueryKey(arg1)) {
|
|
27012
26954
|
if (typeof arg2 === "function") {
|
|
27013
|
-
return _extends$
|
|
26955
|
+
return _extends$1({}, arg3, {
|
|
27014
26956
|
mutationKey: arg1,
|
|
27015
26957
|
mutationFn: arg2
|
|
27016
26958
|
});
|
|
27017
26959
|
}
|
|
27018
|
-
return _extends$
|
|
26960
|
+
return _extends$1({}, arg2, {
|
|
27019
26961
|
mutationKey: arg1
|
|
27020
26962
|
});
|
|
27021
26963
|
}
|
|
27022
26964
|
if (typeof arg1 === "function") {
|
|
27023
|
-
return _extends$
|
|
26965
|
+
return _extends$1({}, arg2, {
|
|
27024
26966
|
mutationFn: arg1
|
|
27025
26967
|
});
|
|
27026
26968
|
}
|
|
27027
|
-
return _extends$
|
|
26969
|
+
return _extends$1({}, arg1);
|
|
27028
26970
|
}
|
|
27029
26971
|
function parseFilterArgs(arg1, arg2, arg3) {
|
|
27030
|
-
return isQueryKey(arg1) ? [_extends$
|
|
26972
|
+
return isQueryKey(arg1) ? [_extends$1({}, arg2, {
|
|
27031
26973
|
queryKey: arg1
|
|
27032
26974
|
}), arg3] : [arg1 || {}, arg2];
|
|
27033
26975
|
}
|
|
@@ -27193,7 +27135,7 @@ function getAbortController() {
|
|
|
27193
27135
|
}
|
|
27194
27136
|
}
|
|
27195
27137
|
var FocusManager = /* @__PURE__ */ function(_Subscribable) {
|
|
27196
|
-
_inheritsLoose$
|
|
27138
|
+
_inheritsLoose$1(FocusManager2, _Subscribable);
|
|
27197
27139
|
function FocusManager2() {
|
|
27198
27140
|
var _this;
|
|
27199
27141
|
_this = _Subscribable.call(this) || this;
|
|
@@ -27262,7 +27204,7 @@ var FocusManager = /* @__PURE__ */ function(_Subscribable) {
|
|
|
27262
27204
|
}(Subscribable);
|
|
27263
27205
|
var focusManager = new FocusManager();
|
|
27264
27206
|
var OnlineManager = /* @__PURE__ */ function(_Subscribable) {
|
|
27265
|
-
_inheritsLoose$
|
|
27207
|
+
_inheritsLoose$1(OnlineManager2, _Subscribable);
|
|
27266
27208
|
function OnlineManager2() {
|
|
27267
27209
|
var _this;
|
|
27268
27210
|
_this = _Subscribable.call(this) || this;
|
|
@@ -27545,7 +27487,7 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27545
27487
|
var _proto = Query2.prototype;
|
|
27546
27488
|
_proto.setOptions = function setOptions(options) {
|
|
27547
27489
|
var _this$options$cacheTi;
|
|
27548
|
-
this.options = _extends$
|
|
27490
|
+
this.options = _extends$1({}, this.defaultOptions, options);
|
|
27549
27491
|
this.meta = options == null ? void 0 : options.meta;
|
|
27550
27492
|
this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1e3);
|
|
27551
27493
|
};
|
|
@@ -27858,19 +27800,19 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27858
27800
|
var _action$meta, _action$dataUpdatedAt;
|
|
27859
27801
|
switch (action.type) {
|
|
27860
27802
|
case "failed":
|
|
27861
|
-
return _extends$
|
|
27803
|
+
return _extends$1({}, state, {
|
|
27862
27804
|
fetchFailureCount: state.fetchFailureCount + 1
|
|
27863
27805
|
});
|
|
27864
27806
|
case "pause":
|
|
27865
|
-
return _extends$
|
|
27807
|
+
return _extends$1({}, state, {
|
|
27866
27808
|
isPaused: true
|
|
27867
27809
|
});
|
|
27868
27810
|
case "continue":
|
|
27869
|
-
return _extends$
|
|
27811
|
+
return _extends$1({}, state, {
|
|
27870
27812
|
isPaused: false
|
|
27871
27813
|
});
|
|
27872
27814
|
case "fetch":
|
|
27873
|
-
return _extends$
|
|
27815
|
+
return _extends$1({}, state, {
|
|
27874
27816
|
fetchFailureCount: 0,
|
|
27875
27817
|
fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,
|
|
27876
27818
|
isFetching: true,
|
|
@@ -27880,7 +27822,7 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27880
27822
|
status: "loading"
|
|
27881
27823
|
});
|
|
27882
27824
|
case "success":
|
|
27883
|
-
return _extends$
|
|
27825
|
+
return _extends$1({}, state, {
|
|
27884
27826
|
data: action.data,
|
|
27885
27827
|
dataUpdateCount: state.dataUpdateCount + 1,
|
|
27886
27828
|
dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),
|
|
@@ -27894,9 +27836,9 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27894
27836
|
case "error":
|
|
27895
27837
|
var error = action.error;
|
|
27896
27838
|
if (isCancelledError(error) && error.revert && this.revertState) {
|
|
27897
|
-
return _extends$
|
|
27839
|
+
return _extends$1({}, this.revertState);
|
|
27898
27840
|
}
|
|
27899
|
-
return _extends$
|
|
27841
|
+
return _extends$1({}, state, {
|
|
27900
27842
|
error,
|
|
27901
27843
|
errorUpdateCount: state.errorUpdateCount + 1,
|
|
27902
27844
|
errorUpdatedAt: Date.now(),
|
|
@@ -27906,11 +27848,11 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27906
27848
|
status: "error"
|
|
27907
27849
|
});
|
|
27908
27850
|
case "invalidate":
|
|
27909
|
-
return _extends$
|
|
27851
|
+
return _extends$1({}, state, {
|
|
27910
27852
|
isInvalidated: true
|
|
27911
27853
|
});
|
|
27912
27854
|
case "setState":
|
|
27913
|
-
return _extends$
|
|
27855
|
+
return _extends$1({}, state, action.state);
|
|
27914
27856
|
default:
|
|
27915
27857
|
return state;
|
|
27916
27858
|
}
|
|
@@ -27918,7 +27860,7 @@ var Query = /* @__PURE__ */ function() {
|
|
|
27918
27860
|
return Query2;
|
|
27919
27861
|
}();
|
|
27920
27862
|
var QueryCache = /* @__PURE__ */ function(_Subscribable) {
|
|
27921
|
-
_inheritsLoose$
|
|
27863
|
+
_inheritsLoose$1(QueryCache2, _Subscribable);
|
|
27922
27864
|
function QueryCache2(config) {
|
|
27923
27865
|
var _this;
|
|
27924
27866
|
_this = _Subscribable.call(this) || this;
|
|
@@ -28030,7 +27972,7 @@ var QueryCache = /* @__PURE__ */ function(_Subscribable) {
|
|
|
28030
27972
|
}(Subscribable);
|
|
28031
27973
|
var Mutation = /* @__PURE__ */ function() {
|
|
28032
27974
|
function Mutation2(config) {
|
|
28033
|
-
this.options = _extends$
|
|
27975
|
+
this.options = _extends$1({}, config.defaultOptions, config.options);
|
|
28034
27976
|
this.mutationId = config.mutationId;
|
|
28035
27977
|
this.mutationCache = config.mutationCache;
|
|
28036
27978
|
this.observers = [];
|
|
@@ -28178,19 +28120,19 @@ function getDefaultState() {
|
|
|
28178
28120
|
function reducer(state, action) {
|
|
28179
28121
|
switch (action.type) {
|
|
28180
28122
|
case "failed":
|
|
28181
|
-
return _extends$
|
|
28123
|
+
return _extends$1({}, state, {
|
|
28182
28124
|
failureCount: state.failureCount + 1
|
|
28183
28125
|
});
|
|
28184
28126
|
case "pause":
|
|
28185
|
-
return _extends$
|
|
28127
|
+
return _extends$1({}, state, {
|
|
28186
28128
|
isPaused: true
|
|
28187
28129
|
});
|
|
28188
28130
|
case "continue":
|
|
28189
|
-
return _extends$
|
|
28131
|
+
return _extends$1({}, state, {
|
|
28190
28132
|
isPaused: false
|
|
28191
28133
|
});
|
|
28192
28134
|
case "loading":
|
|
28193
|
-
return _extends$
|
|
28135
|
+
return _extends$1({}, state, {
|
|
28194
28136
|
context: action.context,
|
|
28195
28137
|
data: void 0,
|
|
28196
28138
|
error: null,
|
|
@@ -28199,14 +28141,14 @@ function reducer(state, action) {
|
|
|
28199
28141
|
variables: action.variables
|
|
28200
28142
|
});
|
|
28201
28143
|
case "success":
|
|
28202
|
-
return _extends$
|
|
28144
|
+
return _extends$1({}, state, {
|
|
28203
28145
|
data: action.data,
|
|
28204
28146
|
error: null,
|
|
28205
28147
|
status: "success",
|
|
28206
28148
|
isPaused: false
|
|
28207
28149
|
});
|
|
28208
28150
|
case "error":
|
|
28209
|
-
return _extends$
|
|
28151
|
+
return _extends$1({}, state, {
|
|
28210
28152
|
data: void 0,
|
|
28211
28153
|
error: action.error,
|
|
28212
28154
|
failureCount: state.failureCount + 1,
|
|
@@ -28214,13 +28156,13 @@ function reducer(state, action) {
|
|
|
28214
28156
|
status: "error"
|
|
28215
28157
|
});
|
|
28216
28158
|
case "setState":
|
|
28217
|
-
return _extends$
|
|
28159
|
+
return _extends$1({}, state, action.state);
|
|
28218
28160
|
default:
|
|
28219
28161
|
return state;
|
|
28220
28162
|
}
|
|
28221
28163
|
}
|
|
28222
28164
|
var MutationCache = /* @__PURE__ */ function(_Subscribable) {
|
|
28223
|
-
_inheritsLoose$
|
|
28165
|
+
_inheritsLoose$1(MutationCache2, _Subscribable);
|
|
28224
28166
|
function MutationCache2(config) {
|
|
28225
28167
|
var _this;
|
|
28226
28168
|
_this = _Subscribable.call(this) || this;
|
|
@@ -28446,7 +28388,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28446
28388
|
return this.queryCache.findAll(filters).length;
|
|
28447
28389
|
};
|
|
28448
28390
|
_proto.isMutating = function isMutating(filters) {
|
|
28449
|
-
return this.mutationCache.findAll(_extends$
|
|
28391
|
+
return this.mutationCache.findAll(_extends$1({}, filters, {
|
|
28450
28392
|
fetching: true
|
|
28451
28393
|
})).length;
|
|
28452
28394
|
};
|
|
@@ -28492,7 +28434,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28492
28434
|
var _this3 = this;
|
|
28493
28435
|
var _parseFilterArgs3 = parseFilterArgs(arg1, arg2, arg3), filters = _parseFilterArgs3[0], options = _parseFilterArgs3[1];
|
|
28494
28436
|
var queryCache = this.queryCache;
|
|
28495
|
-
var refetchFilters = _extends$
|
|
28437
|
+
var refetchFilters = _extends$1({}, filters, {
|
|
28496
28438
|
active: true
|
|
28497
28439
|
});
|
|
28498
28440
|
return notifyManager.batch(function() {
|
|
@@ -28518,7 +28460,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28518
28460
|
_proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {
|
|
28519
28461
|
var _ref3, _filters$refetchActiv, _filters$refetchInact, _this5 = this;
|
|
28520
28462
|
var _parseFilterArgs5 = parseFilterArgs(arg1, arg2, arg3), filters = _parseFilterArgs5[0], options = _parseFilterArgs5[1];
|
|
28521
|
-
var refetchFilters = _extends$
|
|
28463
|
+
var refetchFilters = _extends$1({}, filters, {
|
|
28522
28464
|
active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,
|
|
28523
28465
|
inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false
|
|
28524
28466
|
});
|
|
@@ -28534,7 +28476,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28534
28476
|
var _parseFilterArgs6 = parseFilterArgs(arg1, arg2, arg3), filters = _parseFilterArgs6[0], options = _parseFilterArgs6[1];
|
|
28535
28477
|
var promises = notifyManager.batch(function() {
|
|
28536
28478
|
return _this6.queryCache.findAll(filters).map(function(query) {
|
|
28537
|
-
return query.fetch(void 0, _extends$
|
|
28479
|
+
return query.fetch(void 0, _extends$1({}, options, {
|
|
28538
28480
|
meta: {
|
|
28539
28481
|
refetchPage: filters == null ? void 0 : filters.refetchPage
|
|
28540
28482
|
}
|
|
@@ -28636,7 +28578,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28636
28578
|
if (options == null ? void 0 : options._defaulted) {
|
|
28637
28579
|
return options;
|
|
28638
28580
|
}
|
|
28639
|
-
var defaultedOptions = _extends$
|
|
28581
|
+
var defaultedOptions = _extends$1({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {
|
|
28640
28582
|
_defaulted: true
|
|
28641
28583
|
});
|
|
28642
28584
|
if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {
|
|
@@ -28651,7 +28593,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28651
28593
|
if (options == null ? void 0 : options._defaulted) {
|
|
28652
28594
|
return options;
|
|
28653
28595
|
}
|
|
28654
|
-
return _extends$
|
|
28596
|
+
return _extends$1({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {
|
|
28655
28597
|
_defaulted: true
|
|
28656
28598
|
});
|
|
28657
28599
|
};
|
|
@@ -28662,7 +28604,7 @@ var QueryClient = /* @__PURE__ */ function() {
|
|
|
28662
28604
|
return QueryClient2;
|
|
28663
28605
|
}();
|
|
28664
28606
|
var MutationObserver = /* @__PURE__ */ function(_Subscribable) {
|
|
28665
|
-
_inheritsLoose$
|
|
28607
|
+
_inheritsLoose$1(MutationObserver2, _Subscribable);
|
|
28666
28608
|
function MutationObserver2(client, options) {
|
|
28667
28609
|
var _this;
|
|
28668
28610
|
_this = _Subscribable.call(this) || this;
|
|
@@ -28713,7 +28655,7 @@ var MutationObserver = /* @__PURE__ */ function(_Subscribable) {
|
|
|
28713
28655
|
if (this.currentMutation) {
|
|
28714
28656
|
this.currentMutation.removeObserver(this);
|
|
28715
28657
|
}
|
|
28716
|
-
this.currentMutation = this.client.getMutationCache().build(this.client, _extends$
|
|
28658
|
+
this.currentMutation = this.client.getMutationCache().build(this.client, _extends$1({}, this.options, {
|
|
28717
28659
|
variables: typeof variables !== "undefined" ? variables : this.options.variables
|
|
28718
28660
|
}));
|
|
28719
28661
|
this.currentMutation.addObserver(this);
|
|
@@ -28721,7 +28663,7 @@ var MutationObserver = /* @__PURE__ */ function(_Subscribable) {
|
|
|
28721
28663
|
};
|
|
28722
28664
|
_proto.updateResult = function updateResult() {
|
|
28723
28665
|
var state = this.currentMutation ? this.currentMutation.state : getDefaultState();
|
|
28724
|
-
var result = _extends$
|
|
28666
|
+
var result = _extends$1({}, state, {
|
|
28725
28667
|
isLoading: state.status === "loading",
|
|
28726
28668
|
isSuccess: state.status === "success",
|
|
28727
28669
|
isError: state.status === "error",
|
|
@@ -28831,7 +28773,7 @@ function useMutation(arg1, arg2, arg3) {
|
|
|
28831
28773
|
if (currentResult.error && shouldThrowError(void 0, obsRef.current.options.useErrorBoundary, [currentResult.error])) {
|
|
28832
28774
|
throw currentResult.error;
|
|
28833
28775
|
}
|
|
28834
|
-
return _extends$
|
|
28776
|
+
return _extends$1({}, currentResult, {
|
|
28835
28777
|
mutate,
|
|
28836
28778
|
mutateAsync: currentResult.mutate
|
|
28837
28779
|
});
|
|
@@ -31744,293 +31686,380 @@ var lib = function(e2) {
|
|
|
31744
31686
|
t2.default = F2;
|
|
31745
31687
|
}]);
|
|
31746
31688
|
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
|
-
type: "text/css"
|
|
31875
|
-
}, "\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", {
|
|
31876
|
-
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",
|
|
31877
|
-
id: "id_101",
|
|
31878
|
-
className: "",
|
|
31879
|
-
fill: "#ffffff"
|
|
31880
|
-
}), /* @__PURE__ */ react.exports.createElement("path", {
|
|
31881
|
-
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",
|
|
31882
|
-
id: "id_102",
|
|
31883
|
-
className: "",
|
|
31884
|
-
fill: "#ffffff"
|
|
31885
|
-
})));
|
|
31886
|
-
const SvgEllipse = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
31887
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
31888
|
-
width: 16,
|
|
31889
|
-
height: 16,
|
|
31890
|
-
fill: "currentColor",
|
|
31891
|
-
className: "bi bi-calendar-range",
|
|
31892
|
-
viewBox: "0 0 16 16",
|
|
31893
|
-
...props
|
|
31894
|
-
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
31895
|
-
d: "M9 7a1 1 0 0 1 1-1h5v2h-5a1 1 0 0 1-1-1zM1 9h4a1 1 0 0 1 0 2H1V9z"
|
|
31896
|
-
}), /* @__PURE__ */ react.exports.createElement("path", {
|
|
31897
|
-
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"
|
|
31898
|
-
}));
|
|
31899
|
-
const SvgBackArrow = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
31900
|
-
id: "Layer_1",
|
|
31901
|
-
"data-name": "Layer 1",
|
|
31902
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
31903
|
-
viewBox: "0 0 122.88 108.06",
|
|
31904
|
-
...props
|
|
31905
|
-
}, /* @__PURE__ */ react.exports.createElement("title", null, "back-arrow"), /* @__PURE__ */ react.exports.createElement("path", {
|
|
31906
|
-
d: "M63.94,24.28a14.28,14.28,0,0,0-20.36-20L4.1,44.42a14.27,14.27,0,0,0,0,20l38.69,39.35a14.27,14.27,0,0,0,20.35-20L48.06,68.41l60.66-.29a14.27,14.27,0,1,0-.23-28.54l-59.85.28,15.3-15.58Z"
|
|
31907
|
-
}));
|
|
31908
|
-
const calendars = (params) => api("/calendars", params);
|
|
31909
|
-
const viewCalendar = (id2, params) => api("/calendars/" + id2, params);
|
|
31910
|
-
const updateCalendar = (id2, params) => api("/calendars/" + id2, params, "put");
|
|
31911
|
-
const schedule = (params) => api("/calendars", params, "post");
|
|
31912
|
-
const Pressable = react.exports.memo(({
|
|
31913
|
-
children,
|
|
31914
|
-
style: style2 = {},
|
|
31915
|
-
...p2
|
|
31916
|
-
}) => /* @__PURE__ */ jsx("div", {
|
|
31917
|
-
...p2,
|
|
31918
|
-
style: {
|
|
31919
|
-
...styles$2.pressable,
|
|
31920
|
-
...style2
|
|
31921
|
-
},
|
|
31922
|
-
children
|
|
31923
|
-
}));
|
|
31924
|
-
const Text = react.exports.memo(({
|
|
31925
|
-
children,
|
|
31926
|
-
...p2
|
|
31927
|
-
}) => /* @__PURE__ */ jsx("div", {
|
|
31928
|
-
...p2,
|
|
31929
|
-
children
|
|
31930
|
-
}));
|
|
31931
|
-
const styles$2 = {
|
|
31932
|
-
pressable: {
|
|
31933
|
-
cursor: "pointer"
|
|
31934
|
-
}
|
|
31935
|
-
};
|
|
31936
|
-
const input = "_input_1ps5x_1";
|
|
31937
|
-
const offline_input = "_offline_input_1ps5x_7";
|
|
31938
|
-
const scheduleBtn = "_scheduleBtn_1ps5x_13";
|
|
31939
|
-
const schTitle = "_schTitle_1ps5x_18";
|
|
31940
|
-
const schAvatar = "_schAvatar_1ps5x_23";
|
|
31941
|
-
const schIconCon = "_schIconCon_1ps5x_29";
|
|
31942
|
-
const schedules = "_schedules_1ps5x_36";
|
|
31943
|
-
const reason = "_reason_1ps5x_40";
|
|
31944
|
-
const schTime = "_schTime_1ps5x_45";
|
|
31945
|
-
const schActionBtn = "_schActionBtn_1ps5x_49";
|
|
31946
|
-
const schActionBtnJoin = "_schActionBtnJoin_1ps5x_49";
|
|
31947
|
-
const schActionBtnPending = "_schActionBtnPending_1ps5x_49";
|
|
31948
|
-
const styles$1 = {
|
|
31949
|
-
input,
|
|
31950
|
-
offline_input,
|
|
31951
|
-
scheduleBtn,
|
|
31952
|
-
schTitle,
|
|
31953
|
-
schAvatar,
|
|
31954
|
-
schIconCon,
|
|
31955
|
-
schedules,
|
|
31956
|
-
reason,
|
|
31957
|
-
schTime,
|
|
31958
|
-
schActionBtn,
|
|
31959
|
-
schActionBtnJoin,
|
|
31960
|
-
schActionBtnPending
|
|
31961
|
-
};
|
|
31962
|
-
var events = { exports: {} };
|
|
31963
|
-
var R = typeof Reflect === "object" ? Reflect : null;
|
|
31964
|
-
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
31965
|
-
return Function.prototype.apply.call(target, receiver, args);
|
|
31966
|
-
};
|
|
31967
|
-
var ReflectOwnKeys;
|
|
31968
|
-
if (R && typeof R.ownKeys === "function") {
|
|
31969
|
-
ReflectOwnKeys = R.ownKeys;
|
|
31970
|
-
} else if (Object.getOwnPropertySymbols) {
|
|
31971
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
31972
|
-
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
31973
|
-
};
|
|
31974
|
-
} else {
|
|
31975
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
31976
|
-
return Object.getOwnPropertyNames(target);
|
|
31977
|
-
};
|
|
31978
|
-
}
|
|
31979
|
-
function ProcessEmitWarning(warning2) {
|
|
31980
|
-
if (console && console.warn)
|
|
31981
|
-
console.warn(warning2);
|
|
31982
|
-
}
|
|
31983
|
-
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value2) {
|
|
31984
|
-
return value2 !== value2;
|
|
31985
|
-
};
|
|
31986
|
-
function EventEmitter() {
|
|
31987
|
-
EventEmitter.init.call(this);
|
|
31988
|
-
}
|
|
31989
|
-
events.exports = EventEmitter;
|
|
31990
|
-
events.exports.once = once2;
|
|
31991
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
31992
|
-
EventEmitter.prototype._events = void 0;
|
|
31993
|
-
EventEmitter.prototype._eventsCount = 0;
|
|
31994
|
-
EventEmitter.prototype._maxListeners = void 0;
|
|
31995
|
-
var defaultMaxListeners = 10;
|
|
31996
|
-
function checkListener(listener) {
|
|
31997
|
-
if (typeof listener !== "function") {
|
|
31998
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
31999
|
-
}
|
|
32000
|
-
}
|
|
32001
|
-
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
32002
|
-
enumerable: true,
|
|
32003
|
-
get: function() {
|
|
32004
|
-
return defaultMaxListeners;
|
|
32005
|
-
},
|
|
32006
|
-
set: function(arg) {
|
|
32007
|
-
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
32008
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
31689
|
+
const PhoneInput$1 = lib.default || lib;
|
|
31690
|
+
const source_url = window.location.href;
|
|
31691
|
+
function WidgetInitForm({
|
|
31692
|
+
companyUser,
|
|
31693
|
+
dataRef,
|
|
31694
|
+
company_id,
|
|
31695
|
+
setState: setParentState,
|
|
31696
|
+
setIsScheduling,
|
|
31697
|
+
fields,
|
|
31698
|
+
widgetColor
|
|
31699
|
+
}) {
|
|
31700
|
+
const [{
|
|
31701
|
+
ipAddress,
|
|
31702
|
+
country,
|
|
31703
|
+
longitude,
|
|
31704
|
+
latitude,
|
|
31705
|
+
location: location2,
|
|
31706
|
+
country_code,
|
|
31707
|
+
continent
|
|
31708
|
+
}, setState] = useState({
|
|
31709
|
+
ipAddress: void 0,
|
|
31710
|
+
country: "",
|
|
31711
|
+
longitude: void 0,
|
|
31712
|
+
latitude: void 0,
|
|
31713
|
+
location: "",
|
|
31714
|
+
country_code: "",
|
|
31715
|
+
continent: ""
|
|
31716
|
+
});
|
|
31717
|
+
const [mobile, setMobile] = useState("");
|
|
31718
|
+
const validSchema = react.exports.useMemo(() => {
|
|
31719
|
+
const shape = {
|
|
31720
|
+
name: create$4().required("Required Field").typeError("Name is expected"),
|
|
31721
|
+
email: create$4().email("Incorrect format").required("Required Field"),
|
|
31722
|
+
message: create$4().required("Required").typeError("message is expected")
|
|
31723
|
+
};
|
|
31724
|
+
const possibleShape = {
|
|
31725
|
+
account: create$3().min(10, "Invalid account no").required("Required").positive().typeError("A number is expected"),
|
|
31726
|
+
bvn: create$3().min(11, "Invalid BVN").required("Required Field").positive().typeError("A number is expected")
|
|
31727
|
+
};
|
|
31728
|
+
const fieldKeys = ["account", "bvn"];
|
|
31729
|
+
fieldKeys.map((key2) => {
|
|
31730
|
+
var _a;
|
|
31731
|
+
if ((_a = fields == null ? void 0 : fields[key2]) == null ? void 0 : _a.show) {
|
|
31732
|
+
shape[key2] = possibleShape[key2];
|
|
31733
|
+
}
|
|
31734
|
+
});
|
|
31735
|
+
return create$1().shape(shape);
|
|
31736
|
+
}, [fields]);
|
|
31737
|
+
react.exports.useEffect(() => {
|
|
31738
|
+
axios.get("https://ipapi.co/json/").then((data2) => {
|
|
31739
|
+
const {
|
|
31740
|
+
ip,
|
|
31741
|
+
region,
|
|
31742
|
+
country_name,
|
|
31743
|
+
longitude: longitude2,
|
|
31744
|
+
latitude: latitude2,
|
|
31745
|
+
country_code: country_code2,
|
|
31746
|
+
timezone: timezone2
|
|
31747
|
+
} = data2.data;
|
|
31748
|
+
const timezoneStringSplit = timezone2.split("/");
|
|
31749
|
+
setState({
|
|
31750
|
+
ipAddress: ip,
|
|
31751
|
+
country: country_name,
|
|
31752
|
+
longitude: longitude2,
|
|
31753
|
+
latitude: latitude2,
|
|
31754
|
+
location: region,
|
|
31755
|
+
country_code: country_code2,
|
|
31756
|
+
continent: timezoneStringSplit[0]
|
|
31757
|
+
});
|
|
31758
|
+
const requestObject = {
|
|
31759
|
+
ip_address: ip,
|
|
31760
|
+
location: location2,
|
|
31761
|
+
country,
|
|
31762
|
+
longitude: longitude2,
|
|
31763
|
+
latitude: latitude2,
|
|
31764
|
+
company: company_id,
|
|
31765
|
+
source_url
|
|
31766
|
+
};
|
|
31767
|
+
createVisitor(requestObject);
|
|
31768
|
+
}).catch((error) => toast.error("Error occured, try again", {
|
|
31769
|
+
autoClose: 2e3
|
|
31770
|
+
}));
|
|
31771
|
+
}, []);
|
|
31772
|
+
const {
|
|
31773
|
+
isError: isError2,
|
|
31774
|
+
isLoading,
|
|
31775
|
+
mutate
|
|
31776
|
+
} = useMutation(({
|
|
31777
|
+
name,
|
|
31778
|
+
email,
|
|
31779
|
+
message,
|
|
31780
|
+
...emptyFields
|
|
31781
|
+
}) => api(`/messages/init`, {
|
|
31782
|
+
name,
|
|
31783
|
+
email,
|
|
31784
|
+
credentials: mobile ? {
|
|
31785
|
+
mobile,
|
|
31786
|
+
...emptyFields
|
|
31787
|
+
} : {
|
|
31788
|
+
...emptyFields
|
|
31789
|
+
},
|
|
31790
|
+
message,
|
|
31791
|
+
company: company_id,
|
|
31792
|
+
ip_address: ipAddress,
|
|
31793
|
+
country,
|
|
31794
|
+
latitude,
|
|
31795
|
+
longitude,
|
|
31796
|
+
location: location2,
|
|
31797
|
+
source_url,
|
|
31798
|
+
continent
|
|
31799
|
+
}, "post"), {
|
|
31800
|
+
onError: (err) => {
|
|
31801
|
+
toast.error("Error occured, try again", {
|
|
31802
|
+
autoClose: 2e3
|
|
31803
|
+
});
|
|
31804
|
+
},
|
|
31805
|
+
onSuccess: async ({
|
|
31806
|
+
status,
|
|
31807
|
+
...data2
|
|
31808
|
+
}) => {
|
|
31809
|
+
if (status) {
|
|
31810
|
+
console.log("customer", data2);
|
|
31811
|
+
dataRef.current = data2;
|
|
31812
|
+
setParentState({
|
|
31813
|
+
chatInit: true
|
|
31814
|
+
});
|
|
31815
|
+
}
|
|
32009
31816
|
}
|
|
32010
|
-
|
|
32011
|
-
|
|
32012
|
-
|
|
32013
|
-
|
|
32014
|
-
|
|
32015
|
-
|
|
32016
|
-
|
|
32017
|
-
|
|
32018
|
-
|
|
32019
|
-
|
|
32020
|
-
|
|
32021
|
-
|
|
32022
|
-
|
|
32023
|
-
|
|
32024
|
-
|
|
32025
|
-
|
|
32026
|
-
|
|
32027
|
-
|
|
32028
|
-
|
|
32029
|
-
|
|
32030
|
-
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
31817
|
+
});
|
|
31818
|
+
const regexPattern = /^[a-zA-Z\s]*$/;
|
|
31819
|
+
return /* @__PURE__ */ jsx("div", {
|
|
31820
|
+
className: "pb-1 chat-init-form m-auto scroller",
|
|
31821
|
+
children: /* @__PURE__ */ jsx(Formik, {
|
|
31822
|
+
validationSchema: validSchema,
|
|
31823
|
+
onSubmit: mutate,
|
|
31824
|
+
initialValues: {
|
|
31825
|
+
email: companyUser == null ? void 0 : companyUser.email,
|
|
31826
|
+
account: companyUser == null ? void 0 : companyUser.account,
|
|
31827
|
+
bvn: companyUser == null ? void 0 : companyUser.bvn,
|
|
31828
|
+
message: "",
|
|
31829
|
+
name: ""
|
|
31830
|
+
},
|
|
31831
|
+
children: (formik) => /* @__PURE__ */ jsxs(Form$1, {
|
|
31832
|
+
onSubmit: formik.handleSubmit,
|
|
31833
|
+
children: [isError2 ? /* @__PURE__ */ jsx(Alert, {
|
|
31834
|
+
className: "mt-2 mb-0 p-0 px-2",
|
|
31835
|
+
color: "danger",
|
|
31836
|
+
children: 'Error has occured... Please try again"'
|
|
31837
|
+
}) : "", /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31838
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31839
|
+
size: "sm",
|
|
31840
|
+
for: "name",
|
|
31841
|
+
children: "Full Name"
|
|
31842
|
+
}), /* @__PURE__ */ jsx(Input$1, {
|
|
31843
|
+
name: "name",
|
|
31844
|
+
onChange: (e2) => {
|
|
31845
|
+
if (e2.target.value === "" || regexPattern.test(e2.target.value)) {
|
|
31846
|
+
return formik.handleChange(e2);
|
|
31847
|
+
}
|
|
31848
|
+
},
|
|
31849
|
+
onBlur: formik.handleBlur,
|
|
31850
|
+
value: formik.values.name,
|
|
31851
|
+
valid: formik.touched.name && !formik.errors.name,
|
|
31852
|
+
invalid: formik.touched.name && !!formik.errors.name,
|
|
31853
|
+
placeholder: "Enter full name",
|
|
31854
|
+
bsSize: "lg",
|
|
31855
|
+
style: {
|
|
31856
|
+
borderRadius: 50,
|
|
31857
|
+
fontSize: 16
|
|
31858
|
+
}
|
|
31859
|
+
}), /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
31860
|
+
invalid: true,
|
|
31861
|
+
children: formik.errors.name
|
|
31862
|
+
})]
|
|
31863
|
+
}), /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31864
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31865
|
+
size: "sm",
|
|
31866
|
+
for: "email",
|
|
31867
|
+
children: "Email Address"
|
|
31868
|
+
}), /* @__PURE__ */ jsx(Input$1, {
|
|
31869
|
+
disabled: !!(companyUser == null ? void 0 : companyUser.email),
|
|
31870
|
+
name: "email",
|
|
31871
|
+
onChange: formik.handleChange,
|
|
31872
|
+
onBlur: formik.handleBlur,
|
|
31873
|
+
value: formik.values.email,
|
|
31874
|
+
valid: formik.touched.email && !formik.errors.email,
|
|
31875
|
+
invalid: formik.touched.email && !!formik.errors.email,
|
|
31876
|
+
placeholder: "",
|
|
31877
|
+
bsSize: "lg",
|
|
31878
|
+
style: {
|
|
31879
|
+
borderRadius: 50,
|
|
31880
|
+
fontSize: 16
|
|
31881
|
+
}
|
|
31882
|
+
}), /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
31883
|
+
invalid: true,
|
|
31884
|
+
children: formik.errors.email
|
|
31885
|
+
})]
|
|
31886
|
+
}), Object.keys(fields || {}).map((key2) => {
|
|
31887
|
+
if (fields[key2].show === true || fields[key2].show === void 0) {
|
|
31888
|
+
if (key2 === "mobile") {
|
|
31889
|
+
return /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31890
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31891
|
+
size: "sm",
|
|
31892
|
+
for: key2,
|
|
31893
|
+
children: fields[key2].label || capitalizeFirstLetters(key2)
|
|
31894
|
+
}), /* @__PURE__ */ jsx(PhoneInput$1, {
|
|
31895
|
+
country: country_code.toLowerCase(),
|
|
31896
|
+
placeholder: fields[key2].placeholder || `Enter ${key2}`,
|
|
31897
|
+
value: mobile,
|
|
31898
|
+
inputProps: {
|
|
31899
|
+
name: key2,
|
|
31900
|
+
required: true
|
|
31901
|
+
},
|
|
31902
|
+
enableSearch: true,
|
|
31903
|
+
onChange: setMobile
|
|
31904
|
+
})]
|
|
31905
|
+
}, key2);
|
|
31906
|
+
} else {
|
|
31907
|
+
return /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31908
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31909
|
+
size: "sm",
|
|
31910
|
+
for: key2,
|
|
31911
|
+
children: fields[key2].label || capitalizeFirstLetters(key2)
|
|
31912
|
+
}), /* @__PURE__ */ jsx(Input$1, {
|
|
31913
|
+
name: key2,
|
|
31914
|
+
type: "number",
|
|
31915
|
+
onChange: formik.handleChange,
|
|
31916
|
+
onBlur: formik.handleBlur,
|
|
31917
|
+
value: formik.values[key2],
|
|
31918
|
+
valid: formik.touched[key2] && !formik.errors[key2],
|
|
31919
|
+
invalid: formik.touched[key2] && !!formik.errors[key2],
|
|
31920
|
+
placeholder: fields[key2].placeholder || `Enter ${key2}`,
|
|
31921
|
+
bsSize: "lg",
|
|
31922
|
+
style: {
|
|
31923
|
+
borderRadius: 50,
|
|
31924
|
+
fontSize: 16
|
|
31925
|
+
}
|
|
31926
|
+
}), /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
31927
|
+
invalid: true,
|
|
31928
|
+
children: formik.errors[key2]
|
|
31929
|
+
})]
|
|
31930
|
+
}, key2);
|
|
31931
|
+
}
|
|
31932
|
+
}
|
|
31933
|
+
}), /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
31934
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
31935
|
+
size: "sm",
|
|
31936
|
+
for: "message",
|
|
31937
|
+
children: "Message"
|
|
31938
|
+
}), /* @__PURE__ */ jsx(Input$1, {
|
|
31939
|
+
name: "message",
|
|
31940
|
+
autoComplete: "off",
|
|
31941
|
+
onChange: formik.handleChange,
|
|
31942
|
+
onBlur: formik.handleBlur,
|
|
31943
|
+
value: formik.values.message,
|
|
31944
|
+
valid: formik.touched.message && !formik.errors.message,
|
|
31945
|
+
invalid: formik.touched.message && !!formik.errors.message,
|
|
31946
|
+
placeholder: "Type your message here",
|
|
31947
|
+
bsSize: "lg",
|
|
31948
|
+
style: {
|
|
31949
|
+
borderRadius: 15,
|
|
31950
|
+
height: 60,
|
|
31951
|
+
fontSize: 16
|
|
31952
|
+
}
|
|
31953
|
+
}), /* @__PURE__ */ jsx(FormFeedback$1, {
|
|
31954
|
+
invalid: true,
|
|
31955
|
+
children: formik.errors.message
|
|
31956
|
+
})]
|
|
31957
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
31958
|
+
className: "mt-3 mb-0",
|
|
31959
|
+
style: {
|
|
31960
|
+
justifyContent: "space-between",
|
|
31961
|
+
alignItems: "center"
|
|
31962
|
+
},
|
|
31963
|
+
children: [/* @__PURE__ */ jsxs(Button$1, {
|
|
31964
|
+
type: "submit",
|
|
31965
|
+
className: "d-flex justify-content-center align-items-center btn btn-lg btn-block btn-login-clr p-0",
|
|
31966
|
+
style: {
|
|
31967
|
+
borderRadius: 50,
|
|
31968
|
+
outline: 0,
|
|
31969
|
+
backgroundColor: `${widgetColor}`
|
|
31970
|
+
},
|
|
31971
|
+
children: [isLoading ? /* @__PURE__ */ jsx(Spinner$2, {
|
|
31972
|
+
color: "light",
|
|
31973
|
+
size: "sm"
|
|
31974
|
+
}) : "", /* @__PURE__ */ jsx("span", {
|
|
31975
|
+
className: "ml-1",
|
|
31976
|
+
children: "Start Banking"
|
|
31977
|
+
})]
|
|
31978
|
+
}), /* @__PURE__ */ jsx(Button$1, {
|
|
31979
|
+
outline: true,
|
|
31980
|
+
onClick: () => setIsScheduling(true),
|
|
31981
|
+
className: "mt-1 mb-1 py-1 px-4 col",
|
|
31982
|
+
children: "Scheduled Meeting"
|
|
31983
|
+
})]
|
|
31984
|
+
})]
|
|
31985
|
+
})
|
|
31986
|
+
})
|
|
31987
|
+
});
|
|
31988
|
+
}
|
|
31989
|
+
const WidgetInitForm$1 = react.exports.memo(WidgetInitForm);
|
|
31990
|
+
const maximizeIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAEAQAAAA5p3UDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAAAGAAAABgAPBrQs8AAAAHdElNRQflCh0XODE9tr5GAAACo0lEQVR42u3dTU7jQBBA4TaaHacJKJgkErDlSFnB7TgNGCPWLhYlIcEMY/ePqXTX+9btVpl+RAgpdggAAAAAAMCLbm6BiMivDtR1szOhnDPrAWCLAJwjAOcIwDkCcI4AnCMA51YKYByD9H2XwPoHgm8k2eurTH1vPT8ypQdABE3IC4AIqpcfABFUbf5wh2FZBMMg03ZrfT+INH+wm43I8zOfBI2aO1JdQwTNWhKAriOCJi0NQNcSQXNiAtD1RNCU2AD0mouLqAjk+tr6PvGDlAD0OiJoQmoAei0RVC8nAL2eCKqWG4DuERPBOBLBCSkRgO5DBFUqFYDuRQTVKRmA7kcEVSkdgO5JBO5pBC8vROCYyOXl4gim93eZbm6sZ0ZhRAAiQEIEcntrPTMKIwIQAYgAgQgQQhDZ7fSfQETgFhEgIYK7O+uZURgRrKOaJ4R03dNTCPf3Iby9zS8+Pw9ht7OeGStY9knw8GA9J1b0/wg4fBf+HQGH78rXCDh8l0QOB5Hj0XoOAAAAAAAAAAAAAAAAAEC1RI5HkcPBeg4YEHl85LuITn0ePl9I9eevwycCP348fCJon/7Bt8Q4iuz31vOiMJH9nodUOEcEiH9IBU80bQ8RgAhABAhEgBAZAW8+aRMRIO7ZxkTQJiIAEYAIEGIjSH9r+tzO1j8H134jAgI4cdERTH0ftz8BnLw1IyCASqwVAQFURCNY+tb0ZREQQGX0renlIiCACpWMgAAqVSoCAqhYiQgIoHK5ERBAA3IiIIBGxEdwdaXXEUAzUiIggMbItN2KDMOyCObXWd8PEsR9EhBAk0Q2mxIRWN8HMpSIwPoekCk3Auv5UUBOBHN7/7G+OW9O7bfyzHoA2CIA5wjAOQJwjgCcIwDnCAAAAAAAAMCJD8ZQvP1zR7rXAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTEwLTI5VDIzOjU2OjQ5KzAwOjAwRquYIgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMC0yOVQyMzo1Njo0OSswMDowMDf2IJ4AAAAASUVORK5CYII=";
|
|
31991
|
+
var events = { exports: {} };
|
|
31992
|
+
var R = typeof Reflect === "object" ? Reflect : null;
|
|
31993
|
+
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
31994
|
+
return Function.prototype.apply.call(target, receiver, args);
|
|
31995
|
+
};
|
|
31996
|
+
var ReflectOwnKeys;
|
|
31997
|
+
if (R && typeof R.ownKeys === "function") {
|
|
31998
|
+
ReflectOwnKeys = R.ownKeys;
|
|
31999
|
+
} else if (Object.getOwnPropertySymbols) {
|
|
32000
|
+
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
32001
|
+
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
32002
|
+
};
|
|
32003
|
+
} else {
|
|
32004
|
+
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
32005
|
+
return Object.getOwnPropertyNames(target);
|
|
32006
|
+
};
|
|
32007
|
+
}
|
|
32008
|
+
function ProcessEmitWarning(warning2) {
|
|
32009
|
+
if (console && console.warn)
|
|
32010
|
+
console.warn(warning2);
|
|
32011
|
+
}
|
|
32012
|
+
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value2) {
|
|
32013
|
+
return value2 !== value2;
|
|
32014
|
+
};
|
|
32015
|
+
function EventEmitter() {
|
|
32016
|
+
EventEmitter.init.call(this);
|
|
32017
|
+
}
|
|
32018
|
+
events.exports = EventEmitter;
|
|
32019
|
+
events.exports.once = once2;
|
|
32020
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
32021
|
+
EventEmitter.prototype._events = void 0;
|
|
32022
|
+
EventEmitter.prototype._eventsCount = 0;
|
|
32023
|
+
EventEmitter.prototype._maxListeners = void 0;
|
|
32024
|
+
var defaultMaxListeners = 10;
|
|
32025
|
+
function checkListener(listener) {
|
|
32026
|
+
if (typeof listener !== "function") {
|
|
32027
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
32028
|
+
}
|
|
32029
|
+
}
|
|
32030
|
+
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
32031
|
+
enumerable: true,
|
|
32032
|
+
get: function() {
|
|
32033
|
+
return defaultMaxListeners;
|
|
32034
|
+
},
|
|
32035
|
+
set: function(arg) {
|
|
32036
|
+
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
32037
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
32038
|
+
}
|
|
32039
|
+
defaultMaxListeners = arg;
|
|
32040
|
+
}
|
|
32041
|
+
});
|
|
32042
|
+
EventEmitter.init = function() {
|
|
32043
|
+
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
32044
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
32045
|
+
this._eventsCount = 0;
|
|
32046
|
+
}
|
|
32047
|
+
this._maxListeners = this._maxListeners || void 0;
|
|
32048
|
+
};
|
|
32049
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n2) {
|
|
32050
|
+
if (typeof n2 !== "number" || n2 < 0 || NumberIsNaN(n2)) {
|
|
32051
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n2 + ".");
|
|
32052
|
+
}
|
|
32053
|
+
this._maxListeners = n2;
|
|
32054
|
+
return this;
|
|
32055
|
+
};
|
|
32056
|
+
function _getMaxListeners(that) {
|
|
32057
|
+
if (that._maxListeners === void 0)
|
|
32058
|
+
return EventEmitter.defaultMaxListeners;
|
|
32059
|
+
return that._maxListeners;
|
|
32060
|
+
}
|
|
32061
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
32062
|
+
return _getMaxListeners(this);
|
|
32034
32063
|
};
|
|
32035
32064
|
EventEmitter.prototype.emit = function emit(type) {
|
|
32036
32065
|
var args = [];
|
|
@@ -41475,7 +41504,222 @@ const useRequest = ({ asyncRequest, params, ...props }, dep) => {
|
|
|
41475
41504
|
);
|
|
41476
41505
|
return { setState, next, ...rest };
|
|
41477
41506
|
};
|
|
41478
|
-
const
|
|
41507
|
+
const SvgCheckedCircle = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41508
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41509
|
+
width: 50.003,
|
|
41510
|
+
height: 50.003,
|
|
41511
|
+
viewBox: "0 0 50.003 50.003",
|
|
41512
|
+
...props
|
|
41513
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41514
|
+
id: "check_1_",
|
|
41515
|
+
"data-name": "check (1)",
|
|
41516
|
+
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",
|
|
41517
|
+
fill: "#083047"
|
|
41518
|
+
}));
|
|
41519
|
+
const SvgPhone = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41520
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41521
|
+
className: "h-6 w-6",
|
|
41522
|
+
fill: "none",
|
|
41523
|
+
viewBox: "0 0 24 24",
|
|
41524
|
+
stroke: "currentColor",
|
|
41525
|
+
...props
|
|
41526
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41527
|
+
strokeLinecap: "round",
|
|
41528
|
+
strokeLinejoin: "round",
|
|
41529
|
+
strokeWidth: 2,
|
|
41530
|
+
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"
|
|
41531
|
+
}));
|
|
41532
|
+
const SvgExpand = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41533
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41534
|
+
className: "h-6 w-6",
|
|
41535
|
+
fill: "none",
|
|
41536
|
+
viewBox: "0 0 24 24",
|
|
41537
|
+
stroke: "currentColor",
|
|
41538
|
+
...props
|
|
41539
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41540
|
+
strokeLinecap: "round",
|
|
41541
|
+
strokeLinejoin: "round",
|
|
41542
|
+
strokeWidth: 2,
|
|
41543
|
+
d: "M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"
|
|
41544
|
+
}));
|
|
41545
|
+
const SvgMic = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41546
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41547
|
+
className: "h-6 w-6",
|
|
41548
|
+
fill: "none",
|
|
41549
|
+
viewBox: "0 0 24 24",
|
|
41550
|
+
stroke: "currentColor",
|
|
41551
|
+
...props
|
|
41552
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41553
|
+
strokeLinecap: "round",
|
|
41554
|
+
strokeLinejoin: "round",
|
|
41555
|
+
strokeWidth: 2,
|
|
41556
|
+
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"
|
|
41557
|
+
}));
|
|
41558
|
+
const SvgMicOffCircle = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41559
|
+
width: "24px",
|
|
41560
|
+
height: "24px",
|
|
41561
|
+
viewBox: "0 0 24 24",
|
|
41562
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41563
|
+
...props
|
|
41564
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41565
|
+
fillRule: "evenodd",
|
|
41566
|
+
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"
|
|
41567
|
+
}));
|
|
41568
|
+
const SvgPhoneMissed = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41569
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41570
|
+
className: "h-6 w-6",
|
|
41571
|
+
fill: "none",
|
|
41572
|
+
viewBox: "0 0 24 24",
|
|
41573
|
+
stroke: "currentColor",
|
|
41574
|
+
...props
|
|
41575
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41576
|
+
strokeLinecap: "round",
|
|
41577
|
+
strokeLinejoin: "round",
|
|
41578
|
+
strokeWidth: 2,
|
|
41579
|
+
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"
|
|
41580
|
+
}));
|
|
41581
|
+
const SvgDesktop = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41582
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41583
|
+
className: "h-6 w-6",
|
|
41584
|
+
fill: "none",
|
|
41585
|
+
viewBox: "0 0 24 24",
|
|
41586
|
+
stroke: "currentColor",
|
|
41587
|
+
...props
|
|
41588
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41589
|
+
strokeLinecap: "round",
|
|
41590
|
+
strokeLinejoin: "round",
|
|
41591
|
+
strokeWidth: 2,
|
|
41592
|
+
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"
|
|
41593
|
+
}));
|
|
41594
|
+
const SvgVideoOff = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41595
|
+
width: "1em",
|
|
41596
|
+
height: "1em",
|
|
41597
|
+
viewBox: "0 0 16 16",
|
|
41598
|
+
className: "bi bi-camera-video-off",
|
|
41599
|
+
fill: "currentColor",
|
|
41600
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41601
|
+
...props
|
|
41602
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41603
|
+
fillRule: "evenodd",
|
|
41604
|
+
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"
|
|
41605
|
+
}));
|
|
41606
|
+
const SvgVideoAlt = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41607
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41608
|
+
className: "h-6 w-6",
|
|
41609
|
+
fill: "none",
|
|
41610
|
+
viewBox: "0 0 24 24",
|
|
41611
|
+
stroke: "currentColor",
|
|
41612
|
+
...props
|
|
41613
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41614
|
+
strokeLinecap: "round",
|
|
41615
|
+
strokeLinejoin: "round",
|
|
41616
|
+
strokeWidth: 2,
|
|
41617
|
+
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"
|
|
41618
|
+
}));
|
|
41619
|
+
const SvgCamera = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41620
|
+
id: "Icons",
|
|
41621
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41622
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
41623
|
+
x: "0px",
|
|
41624
|
+
y: "0px",
|
|
41625
|
+
viewBox: "0 0 32 32",
|
|
41626
|
+
style: {
|
|
41627
|
+
enableBackground: "new 0 0 32 32"
|
|
41628
|
+
},
|
|
41629
|
+
xmlSpace: "preserve",
|
|
41630
|
+
width: 45,
|
|
41631
|
+
height: 26.9022,
|
|
41632
|
+
...props
|
|
41633
|
+
}, /* @__PURE__ */ react.exports.createElement("style", {
|
|
41634
|
+
type: "text/css"
|
|
41635
|
+
}, "\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", {
|
|
41636
|
+
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",
|
|
41637
|
+
id: "id_101",
|
|
41638
|
+
className: "",
|
|
41639
|
+
fill: "#ffffff"
|
|
41640
|
+
}), /* @__PURE__ */ react.exports.createElement("path", {
|
|
41641
|
+
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",
|
|
41642
|
+
id: "id_102",
|
|
41643
|
+
className: "",
|
|
41644
|
+
fill: "#ffffff"
|
|
41645
|
+
})));
|
|
41646
|
+
const SvgEllipse = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41647
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41648
|
+
width: 16,
|
|
41649
|
+
height: 16,
|
|
41650
|
+
fill: "currentColor",
|
|
41651
|
+
className: "bi bi-calendar-range",
|
|
41652
|
+
viewBox: "0 0 16 16",
|
|
41653
|
+
...props
|
|
41654
|
+
}, /* @__PURE__ */ react.exports.createElement("path", {
|
|
41655
|
+
d: "M9 7a1 1 0 0 1 1-1h5v2h-5a1 1 0 0 1-1-1zM1 9h4a1 1 0 0 1 0 2H1V9z"
|
|
41656
|
+
}), /* @__PURE__ */ react.exports.createElement("path", {
|
|
41657
|
+
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"
|
|
41658
|
+
}));
|
|
41659
|
+
const SvgBackArrow = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
|
|
41660
|
+
id: "Layer_1",
|
|
41661
|
+
"data-name": "Layer 1",
|
|
41662
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41663
|
+
viewBox: "0 0 122.88 108.06",
|
|
41664
|
+
...props
|
|
41665
|
+
}, /* @__PURE__ */ react.exports.createElement("title", null, "back-arrow"), /* @__PURE__ */ react.exports.createElement("path", {
|
|
41666
|
+
d: "M63.94,24.28a14.28,14.28,0,0,0-20.36-20L4.1,44.42a14.27,14.27,0,0,0,0,20l38.69,39.35a14.27,14.27,0,0,0,20.35-20L48.06,68.41l60.66-.29a14.27,14.27,0,1,0-.23-28.54l-59.85.28,15.3-15.58Z"
|
|
41667
|
+
}));
|
|
41668
|
+
const calendars = (params) => api("/calendars", params);
|
|
41669
|
+
const viewCalendar = (id2, params) => api("/calendars/" + id2, params);
|
|
41670
|
+
const updateCalendar = (id2, params) => api("/calendars/" + id2, params, "put");
|
|
41671
|
+
const schedule = (params) => api("/calendars", params, "post");
|
|
41672
|
+
const Pressable = react.exports.memo(({
|
|
41673
|
+
children,
|
|
41674
|
+
style: style2 = {},
|
|
41675
|
+
...p2
|
|
41676
|
+
}) => /* @__PURE__ */ jsx("div", {
|
|
41677
|
+
...p2,
|
|
41678
|
+
style: {
|
|
41679
|
+
...styles$2.pressable,
|
|
41680
|
+
...style2
|
|
41681
|
+
},
|
|
41682
|
+
children
|
|
41683
|
+
}));
|
|
41684
|
+
const Text = react.exports.memo(({
|
|
41685
|
+
children,
|
|
41686
|
+
...p2
|
|
41687
|
+
}) => /* @__PURE__ */ jsx("div", {
|
|
41688
|
+
...p2,
|
|
41689
|
+
children
|
|
41690
|
+
}));
|
|
41691
|
+
const styles$2 = {
|
|
41692
|
+
pressable: {
|
|
41693
|
+
cursor: "pointer"
|
|
41694
|
+
}
|
|
41695
|
+
};
|
|
41696
|
+
const input = "_input_1ps5x_1";
|
|
41697
|
+
const offline_input = "_offline_input_1ps5x_7";
|
|
41698
|
+
const scheduleBtn = "_scheduleBtn_1ps5x_13";
|
|
41699
|
+
const schTitle = "_schTitle_1ps5x_18";
|
|
41700
|
+
const schAvatar = "_schAvatar_1ps5x_23";
|
|
41701
|
+
const schIconCon = "_schIconCon_1ps5x_29";
|
|
41702
|
+
const schedules = "_schedules_1ps5x_36";
|
|
41703
|
+
const reason = "_reason_1ps5x_40";
|
|
41704
|
+
const schTime = "_schTime_1ps5x_45";
|
|
41705
|
+
const schActionBtn = "_schActionBtn_1ps5x_49";
|
|
41706
|
+
const schActionBtnJoin = "_schActionBtnJoin_1ps5x_49";
|
|
41707
|
+
const schActionBtnPending = "_schActionBtnPending_1ps5x_49";
|
|
41708
|
+
const styles$1 = {
|
|
41709
|
+
input,
|
|
41710
|
+
offline_input,
|
|
41711
|
+
scheduleBtn,
|
|
41712
|
+
schTitle,
|
|
41713
|
+
schAvatar,
|
|
41714
|
+
schIconCon,
|
|
41715
|
+
schedules,
|
|
41716
|
+
reason,
|
|
41717
|
+
schTime,
|
|
41718
|
+
schActionBtn,
|
|
41719
|
+
schActionBtnJoin,
|
|
41720
|
+
schActionBtnPending
|
|
41721
|
+
};
|
|
41722
|
+
const PhoneInput = lib.default || lib;
|
|
41479
41723
|
const days$1 = {
|
|
41480
41724
|
Monday: 1,
|
|
41481
41725
|
Tuesday: 2,
|
|
@@ -41665,7 +41909,10 @@ const Offline = react.exports.memo(({
|
|
|
41665
41909
|
});
|
|
41666
41910
|
};
|
|
41667
41911
|
return /* @__PURE__ */ jsx("div", {
|
|
41668
|
-
className:
|
|
41912
|
+
className: `signin-page offline pt-1 px-1 m-auto mt-5`,
|
|
41913
|
+
styles: {
|
|
41914
|
+
borderRadius: "8px"
|
|
41915
|
+
},
|
|
41669
41916
|
children: scheduled ? /* @__PURE__ */ jsx(Done, {
|
|
41670
41917
|
name: website_name,
|
|
41671
41918
|
date: (_g = saved.current) == null ? void 0 : _g.date,
|
|
@@ -41675,75 +41922,48 @@ const Offline = react.exports.memo(({
|
|
|
41675
41922
|
done
|
|
41676
41923
|
}) : /* @__PURE__ */ jsxs(Form$1, {
|
|
41677
41924
|
onSubmit: handleSubmit,
|
|
41678
|
-
children: [/* @__PURE__ */ jsx(
|
|
41925
|
+
children: [/* @__PURE__ */ jsx(ScheduleInput, {
|
|
41926
|
+
style: {
|
|
41927
|
+
borderRight: 50
|
|
41928
|
+
},
|
|
41679
41929
|
label: "Full Name",
|
|
41680
41930
|
name: "full_name",
|
|
41681
41931
|
placeholder: "Full Name",
|
|
41682
|
-
style: {
|
|
41683
|
-
borderRadius: 50,
|
|
41684
|
-
fontSize: 16
|
|
41685
|
-
},
|
|
41686
41932
|
handleChange,
|
|
41687
41933
|
handleBlur,
|
|
41688
41934
|
values,
|
|
41689
41935
|
touched,
|
|
41690
41936
|
errors
|
|
41691
|
-
}), /* @__PURE__ */ jsx(
|
|
41937
|
+
}), /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41692
41938
|
label: "Email",
|
|
41693
41939
|
name: "email",
|
|
41694
41940
|
disabled: !!(companyUser == null ? void 0 : companyUser.email),
|
|
41695
41941
|
placeholder: "Example@gmail.com",
|
|
41696
|
-
style: {
|
|
41697
|
-
borderRadius: 50,
|
|
41698
|
-
fontSize: 16
|
|
41699
|
-
},
|
|
41700
41942
|
handleChange,
|
|
41701
41943
|
handleBlur,
|
|
41702
41944
|
values,
|
|
41703
41945
|
touched,
|
|
41704
41946
|
errors
|
|
41705
41947
|
}), /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
41706
|
-
|
|
41707
|
-
|
|
41708
|
-
|
|
41709
|
-
|
|
41710
|
-
|
|
41948
|
+
children: [/* @__PURE__ */ jsx(Label$1, {
|
|
41949
|
+
size: "sm",
|
|
41950
|
+
for: "mobile",
|
|
41951
|
+
children: "Phone No"
|
|
41952
|
+
}), /* @__PURE__ */ jsx(PhoneInput, {
|
|
41953
|
+
country: country_code.toLowerCase(),
|
|
41954
|
+
placeholder: "Enter Phone No",
|
|
41955
|
+
value: mobile,
|
|
41956
|
+
inputProps: {
|
|
41957
|
+
name: "mobile",
|
|
41958
|
+
required: true
|
|
41711
41959
|
},
|
|
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
|
-
})
|
|
41960
|
+
enableSearch: true,
|
|
41961
|
+
onChange: (mobile2) => setState({
|
|
41962
|
+
mobile: mobile2
|
|
41739
41963
|
})
|
|
41740
|
-
})
|
|
41741
|
-
|
|
41742
|
-
children: errors.mobile
|
|
41743
|
-
}) : null]
|
|
41744
|
-
}), /* @__PURE__ */ jsx(FInput, {
|
|
41964
|
+
})]
|
|
41965
|
+
}), /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41745
41966
|
style: {
|
|
41746
|
-
borderRadius: 50,
|
|
41747
41967
|
fontSize: 16
|
|
41748
41968
|
},
|
|
41749
41969
|
label: "Account Number",
|
|
@@ -41756,10 +41976,9 @@ const Offline = react.exports.memo(({
|
|
|
41756
41976
|
touched,
|
|
41757
41977
|
errors
|
|
41758
41978
|
}), /* @__PURE__ */ jsxs(Row$1, {
|
|
41759
|
-
className: "justify-content-between",
|
|
41760
41979
|
children: [/* @__PURE__ */ jsx(Col$1, {
|
|
41761
41980
|
md: 6,
|
|
41762
|
-
children: /* @__PURE__ */ jsx(
|
|
41981
|
+
children: /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41763
41982
|
label: "Date",
|
|
41764
41983
|
name: "date",
|
|
41765
41984
|
type: "date",
|
|
@@ -41770,8 +41989,11 @@ const Offline = react.exports.memo(({
|
|
|
41770
41989
|
errors
|
|
41771
41990
|
})
|
|
41772
41991
|
}), /* @__PURE__ */ jsx(Col$1, {
|
|
41773
|
-
md:
|
|
41774
|
-
children: /* @__PURE__ */ jsx(
|
|
41992
|
+
md: 6,
|
|
41993
|
+
children: /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41994
|
+
style: {
|
|
41995
|
+
fontSize: 16
|
|
41996
|
+
},
|
|
41775
41997
|
label: "Time",
|
|
41776
41998
|
name: "time",
|
|
41777
41999
|
type: "time",
|
|
@@ -41782,7 +42004,7 @@ const Offline = react.exports.memo(({
|
|
|
41782
42004
|
errors
|
|
41783
42005
|
})
|
|
41784
42006
|
})]
|
|
41785
|
-
}), /* @__PURE__ */ jsx(
|
|
42007
|
+
}), /* @__PURE__ */ jsx(ScheduleInput, {
|
|
41786
42008
|
style: {
|
|
41787
42009
|
borderRight: void 0,
|
|
41788
42010
|
fontSize: 16,
|
|
@@ -41811,10 +42033,11 @@ const Offline = react.exports.memo(({
|
|
|
41811
42033
|
className: "mr-1"
|
|
41812
42034
|
}) : "", calendar2 ? "Update Call" : "Request Call"]
|
|
41813
42035
|
}), /* @__PURE__ */ jsx(Button$1, {
|
|
41814
|
-
outline: true,
|
|
41815
42036
|
style: {
|
|
41816
|
-
|
|
42037
|
+
backgroundColor: `${hexcode}`,
|
|
42038
|
+
color: "#fff"
|
|
41817
42039
|
},
|
|
42040
|
+
outline: true,
|
|
41818
42041
|
onClick: () => setIsScheduling(true),
|
|
41819
42042
|
className: "mt-1 mb-1 py-1 px-4 col",
|
|
41820
42043
|
children: "Scheduled Meeting"
|
|
@@ -41978,12 +42201,11 @@ const Schedule = react.exports.memo(function({
|
|
|
41978
42201
|
})]
|
|
41979
42202
|
});
|
|
41980
42203
|
});
|
|
41981
|
-
const
|
|
42204
|
+
const ScheduleInput = react.exports.memo(({
|
|
41982
42205
|
label,
|
|
42206
|
+
Icon,
|
|
41983
42207
|
handleChange,
|
|
41984
|
-
onChange,
|
|
41985
42208
|
handleBlur,
|
|
41986
|
-
onBlur,
|
|
41987
42209
|
touched,
|
|
41988
42210
|
errors,
|
|
41989
42211
|
values,
|
|
@@ -41991,19 +42213,17 @@ const FInput = react.exports.memo(({
|
|
|
41991
42213
|
placeholder,
|
|
41992
42214
|
type,
|
|
41993
42215
|
style: style2 = {},
|
|
41994
|
-
disabled
|
|
41995
|
-
...p2
|
|
42216
|
+
disabled
|
|
41996
42217
|
}) => {
|
|
41997
42218
|
const regexPattern = /^[a-zA-Z\s]*$/;
|
|
41998
42219
|
const onNameChange = (e2) => {
|
|
41999
42220
|
if (e2.target.value === "" || regexPattern.test(e2.target.value)) {
|
|
42000
|
-
return
|
|
42221
|
+
return handleChange(e2);
|
|
42001
42222
|
}
|
|
42002
42223
|
};
|
|
42003
42224
|
return /* @__PURE__ */ jsxs(FormGroup$1, {
|
|
42004
42225
|
className: "mb-2",
|
|
42005
42226
|
children: [/* @__PURE__ */ jsx(Col$1, {
|
|
42006
|
-
className: "pr-0",
|
|
42007
42227
|
style: {
|
|
42008
42228
|
marginBottom: "18px",
|
|
42009
42229
|
paddingLeft: "0px"
|
|
@@ -42017,25 +42237,23 @@ const FInput = react.exports.memo(({
|
|
|
42017
42237
|
children: label
|
|
42018
42238
|
})
|
|
42019
42239
|
})
|
|
42020
|
-
}), /* @__PURE__ */
|
|
42240
|
+
}), /* @__PURE__ */ jsx(InputGroup$1, {
|
|
42021
42241
|
className: "mt-n3",
|
|
42022
|
-
children:
|
|
42023
|
-
...p2,
|
|
42024
|
-
style: style2,
|
|
42242
|
+
children: /* @__PURE__ */ jsx(Input$1, {
|
|
42025
42243
|
className: styles$1.offline_input,
|
|
42026
42244
|
name,
|
|
42027
42245
|
disabled,
|
|
42028
|
-
onChange:
|
|
42029
|
-
onBlur:
|
|
42246
|
+
onChange: name === "full_name" ? onNameChange : handleChange,
|
|
42247
|
+
onBlur: handleBlur,
|
|
42030
42248
|
value: values[name],
|
|
42031
42249
|
valid: touched[name] && !errors[name],
|
|
42032
|
-
invalid: touched[name] && !!errors[name],
|
|
42033
42250
|
placeholder,
|
|
42034
42251
|
type
|
|
42035
|
-
})
|
|
42036
|
-
|
|
42037
|
-
|
|
42038
|
-
|
|
42252
|
+
})
|
|
42253
|
+
}), errors[name] ? /* @__PURE__ */ jsx("p", {
|
|
42254
|
+
className: "text-danger text-small",
|
|
42255
|
+
children: errors[name]
|
|
42256
|
+
}) : null]
|
|
42039
42257
|
});
|
|
42040
42258
|
});
|
|
42041
42259
|
const Done = react.exports.memo(({
|
|
@@ -42062,37 +42280,31 @@ const Done = react.exports.memo(({
|
|
|
42062
42280
|
width: 20,
|
|
42063
42281
|
height: 20,
|
|
42064
42282
|
className: "m-2 align-self-start",
|
|
42065
|
-
onClick: done
|
|
42066
|
-
style: {
|
|
42067
|
-
position: "absolute",
|
|
42068
|
-
top: 10,
|
|
42069
|
-
left: 0
|
|
42070
|
-
}
|
|
42283
|
+
onClick: done
|
|
42071
42284
|
}), /* @__PURE__ */ jsx(SvgCheckedCircle, {
|
|
42072
42285
|
className: "mb-4"
|
|
42073
42286
|
}), /* @__PURE__ */ jsx("h1", {
|
|
42074
|
-
className: "text-alt
|
|
42287
|
+
className: "text-alt font-weight-bold",
|
|
42075
42288
|
children: "Thank You"
|
|
42076
42289
|
}), /* @__PURE__ */ jsx("h6", {
|
|
42077
|
-
className: "text-center
|
|
42290
|
+
className: "text-center text-lg text-alt",
|
|
42078
42291
|
children: "Callback request was scheduled successfully."
|
|
42079
42292
|
}), /* @__PURE__ */ jsx("h6", {
|
|
42080
|
-
className: "text-center
|
|
42293
|
+
className: "text-center text-lg text-alt",
|
|
42081
42294
|
children: "Join the Video Banking"
|
|
42082
42295
|
}), /* @__PURE__ */ jsx("h1", {
|
|
42083
|
-
className: "mt-4 text-alt
|
|
42296
|
+
className: "mt-4 text-alt font-weight-bold",
|
|
42084
42297
|
children: "Date & Time"
|
|
42085
42298
|
}), /* @__PURE__ */ jsx("h6", {
|
|
42086
|
-
className: "text-center
|
|
42299
|
+
className: "text-center text-lg text-alt",
|
|
42087
42300
|
children: hooks(date2).format("dddd, MMMM Do YYYY").toString()
|
|
42088
42301
|
}), /* @__PURE__ */ jsx("h6", {
|
|
42089
|
-
className: "text-center
|
|
42302
|
+
className: "text-center text-lg text-alt",
|
|
42090
42303
|
children: hooks(`${date2}:${time}`).format("hh:mm A").toString()
|
|
42091
42304
|
}), /* @__PURE__ */ jsx("a", {
|
|
42092
42305
|
style: {
|
|
42093
42306
|
backgroundColor: `${hexcode}`,
|
|
42094
|
-
color: "#fff"
|
|
42095
|
-
textDecoration: "none"
|
|
42307
|
+
color: "#fff"
|
|
42096
42308
|
},
|
|
42097
42309
|
className: styles$1.scheduleBtn + " btn mt-5 px-4 text-white",
|
|
42098
42310
|
href: `https://calendar.google.com/calendar/render?action=TEMPLATE&dates=${event.startTime}/${event.endTime}&text=${event.title}&details=${event.description}`,
|
|
@@ -42102,326 +42314,6 @@ const Done = react.exports.memo(({
|
|
|
42102
42314
|
})]
|
|
42103
42315
|
});
|
|
42104
42316
|
});
|
|
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
42317
|
var check = function(it) {
|
|
42426
42318
|
return it && it.Math == Math && it;
|
|
42427
42319
|
};
|
|
@@ -43701,7 +43593,7 @@ function _inherits(subClass, superClass) {
|
|
|
43701
43593
|
writable: false
|
|
43702
43594
|
});
|
|
43703
43595
|
if (superClass)
|
|
43704
|
-
_setPrototypeOf
|
|
43596
|
+
_setPrototypeOf(subClass, superClass);
|
|
43705
43597
|
}
|
|
43706
43598
|
function _typeof(obj) {
|
|
43707
43599
|
"@babel/helpers - typeof";
|
|
@@ -43717,7 +43609,7 @@ function _possibleConstructorReturn(self2, call2) {
|
|
|
43717
43609
|
} else if (call2 !== void 0) {
|
|
43718
43610
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
43719
43611
|
}
|
|
43720
|
-
return _assertThisInitialized
|
|
43612
|
+
return _assertThisInitialized(self2);
|
|
43721
43613
|
}
|
|
43722
43614
|
function _getPrototypeOf(o2) {
|
|
43723
43615
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o3) {
|
|
@@ -44834,7 +44726,7 @@ function createAvatarDataProvider(_ref) {
|
|
|
44834
44726
|
var _this;
|
|
44835
44727
|
_classCallCheck(this, AvatarDataProvider2);
|
|
44836
44728
|
_this = _super.call(this, props);
|
|
44837
|
-
_defineProperty(_assertThisInitialized
|
|
44729
|
+
_defineProperty(_assertThisInitialized(_this), "_createFetcher", function(internal) {
|
|
44838
44730
|
return function(errEvent) {
|
|
44839
44731
|
var cache = _this.props.cache;
|
|
44840
44732
|
if (!internal.isActive(_this.state))
|
|
@@ -44862,7 +44754,7 @@ function createAvatarDataProvider(_ref) {
|
|
|
44862
44754
|
});
|
|
44863
44755
|
};
|
|
44864
44756
|
});
|
|
44865
|
-
_defineProperty(_assertThisInitialized
|
|
44757
|
+
_defineProperty(_assertThisInitialized(_this), "fetch", function() {
|
|
44866
44758
|
var internal = new InternalState();
|
|
44867
44759
|
internal.fetch = _this._createFetcher(internal);
|
|
44868
44760
|
_this.setState({
|
|
@@ -45217,7 +45109,7 @@ var AvatarText = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
45217
45109
|
args[_key] = arguments[_key];
|
|
45218
45110
|
}
|
|
45219
45111
|
_this = _super.call.apply(_super, concat2(_context = [this]).call(_context, args));
|
|
45220
|
-
_defineProperty(_assertThisInitialized
|
|
45112
|
+
_defineProperty(_assertThisInitialized(_this), "_scaleTextNode", function(node) {
|
|
45221
45113
|
var retryTTL = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 16;
|
|
45222
45114
|
var _this$props = _this.props, unstyled = _this$props.unstyled, textSizeRatio = _this$props.textSizeRatio, textMarginRatio = _this$props.textMarginRatio, avatar = _this$props.avatar;
|
|
45223
45115
|
_this._node = node;
|
|
@@ -46082,18 +45974,329 @@ const sendIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAYAAACk
|
|
|
46082
45974
|
const createMessage = (params, config) => api("messages", params, "post", config);
|
|
46083
45975
|
const getMessages = (params) => api("messages", params);
|
|
46084
45976
|
const messageSound = "data:audio/mpeg;base64,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YmFUTBVFgsJskCFTeFAkkNBYsJKwUOmhRcfOd1Fiw2cKhYoUSV3yxYWkxBTUUzLjkyIChhbHBoYSlVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuOTIgKGFscGhhKVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+pIAxIrmj/NjUMGDDBrybiWYMGHjTEAAAaQAAAAAAAA0gAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV";
|
|
46085
|
-
|
|
46086
|
-
|
|
46087
|
-
|
|
46088
|
-
|
|
46089
|
-
|
|
45977
|
+
function ChatWidgetScreen({
|
|
45978
|
+
welcome_message,
|
|
45979
|
+
dataRef,
|
|
45980
|
+
setChatClose,
|
|
45981
|
+
agent,
|
|
45982
|
+
videoRef
|
|
45983
|
+
}) {
|
|
45984
|
+
var _a, _b, _c, _d, _e;
|
|
45985
|
+
const bottomRef = react.exports.useRef();
|
|
45986
|
+
const [{
|
|
45987
|
+
typingEvent
|
|
45988
|
+
}, setEvent] = useState({
|
|
45989
|
+
typingEvent: false
|
|
45990
|
+
});
|
|
45991
|
+
const {
|
|
45992
|
+
state: {
|
|
45993
|
+
data: {
|
|
45994
|
+
data: messages = []
|
|
45995
|
+
}
|
|
45996
|
+
},
|
|
45997
|
+
setState
|
|
45998
|
+
} = useRequest({
|
|
45999
|
+
asyncRequest: getMessages,
|
|
46000
|
+
params: [{
|
|
46001
|
+
conversation: (_a = dataRef.current) == null ? void 0 : _a.wait.conversation.id
|
|
46002
|
+
}]
|
|
46003
|
+
});
|
|
46090
46004
|
react.exports.useEffect(() => {
|
|
46091
|
-
|
|
46092
|
-
|
|
46093
|
-
}, [
|
|
46094
|
-
|
|
46005
|
+
var _a2;
|
|
46006
|
+
(_a2 = bottomRef.current) == null ? void 0 : _a2.scrollIntoView();
|
|
46007
|
+
}, [messages]);
|
|
46008
|
+
const listeners2 = react.exports.useMemo(() => {
|
|
46009
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
46010
|
+
return {
|
|
46011
|
+
[`message.new.${((_a2 = dataRef.current) == null ? void 0 : _a2.wait.conversation.id) || ((_b2 = dataRef.current) == null ? void 0 : _b2.wait.conversation)}`]: ({
|
|
46012
|
+
message
|
|
46013
|
+
}) => {
|
|
46014
|
+
var _a3, _b3, _c3, _d3, _e3;
|
|
46015
|
+
const sender = ((_a3 = message.user) == null ? void 0 : _a3.id) || message.user;
|
|
46016
|
+
const customer = (_b3 = dataRef.current) == null ? void 0 : _b3.customer;
|
|
46017
|
+
const isSender = ((_c3 = customer == null ? void 0 : customer.user) == null ? void 0 : _c3.id) === (((_d3 = message.user) == null ? void 0 : _d3.id) || message.user);
|
|
46018
|
+
message.isSender = isSender;
|
|
46019
|
+
!isSender && videoRef.current.playSound(messageSound, (sound) => sound.loop = false);
|
|
46020
|
+
setState((s2) => {
|
|
46021
|
+
s2.data.data = [...s2.data.data, message];
|
|
46022
|
+
return s2;
|
|
46023
|
+
});
|
|
46024
|
+
if (sender !== ((_e3 = customer == null ? void 0 : customer.user) == null ? void 0 : _e3.id)) {
|
|
46025
|
+
t$1.emit("agent-joined", message.user);
|
|
46026
|
+
}
|
|
46027
|
+
},
|
|
46028
|
+
[`WaitList.closed.${(_c2 = dataRef.current) == null ? void 0 : _c2.wait.id}`]: () => {
|
|
46029
|
+
setChatClose(false);
|
|
46030
|
+
},
|
|
46031
|
+
[`typing.${((_d2 = dataRef.current) == null ? void 0 : _d2.wait.conversation.id) || ((_e2 = dataRef.current) == null ? void 0 : _e2.wait.conversation)}`]: (data2) => {
|
|
46032
|
+
setEvent((state) => {
|
|
46033
|
+
state.typingEvent = true;
|
|
46034
|
+
if (state.timeOut) {
|
|
46035
|
+
clearTimeout(state.timeOut);
|
|
46036
|
+
}
|
|
46037
|
+
state.timeOut = setTimeout(() => {
|
|
46038
|
+
setEvent({
|
|
46039
|
+
timeOut: true,
|
|
46040
|
+
typingEvent: false
|
|
46041
|
+
});
|
|
46042
|
+
}, 2e3);
|
|
46043
|
+
return state;
|
|
46044
|
+
});
|
|
46045
|
+
}
|
|
46046
|
+
};
|
|
46047
|
+
}, [(_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)]);
|
|
46048
|
+
useSocketListeners({
|
|
46049
|
+
listeners: listeners2
|
|
46050
|
+
});
|
|
46051
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
46052
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
46053
|
+
className: "widget-chat-container",
|
|
46054
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
46055
|
+
id: "widget-chat-send",
|
|
46056
|
+
className: "widget-chat-display-container",
|
|
46057
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
46058
|
+
className: "chat-receive-container mb-5 d-flex align-items-center",
|
|
46059
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
46060
|
+
className: `widget-chat-receive mb-0`,
|
|
46061
|
+
children: welcome_message
|
|
46062
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
46063
|
+
children: hooks().calendar()
|
|
46064
|
+
})]
|
|
46065
|
+
}), /* @__PURE__ */ jsx(Messages, {
|
|
46066
|
+
chatMessages: messages,
|
|
46067
|
+
dataRef
|
|
46068
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
46069
|
+
ref: bottomRef,
|
|
46070
|
+
className: "chat-bottom"
|
|
46071
|
+
})]
|
|
46072
|
+
}), /* @__PURE__ */ jsx(ChatInput, {
|
|
46073
|
+
dataRef,
|
|
46074
|
+
agent
|
|
46075
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
46076
|
+
style: {
|
|
46077
|
+
fontStyle: "italic",
|
|
46078
|
+
fontSize: "10px"
|
|
46079
|
+
},
|
|
46080
|
+
children: agent && typingEvent ? `${agent == null ? void 0 : agent.first_name} is typing...` : ""
|
|
46081
|
+
})]
|
|
46082
|
+
})
|
|
46083
|
+
});
|
|
46084
|
+
}
|
|
46085
|
+
const ChatInput = react.exports.memo(function({
|
|
46086
|
+
dataRef,
|
|
46087
|
+
agent,
|
|
46088
|
+
typingEvent
|
|
46089
|
+
}) {
|
|
46090
|
+
var _a;
|
|
46091
|
+
const [{
|
|
46092
|
+
chatFiles
|
|
46093
|
+
}, setState, stateRef] = useState({
|
|
46094
|
+
messageText: "",
|
|
46095
|
+
chatFiles: ""
|
|
46096
|
+
});
|
|
46097
|
+
const {
|
|
46098
|
+
socket: socket2
|
|
46099
|
+
} = useSocket();
|
|
46100
|
+
const sendMessage = async () => {
|
|
46101
|
+
var _a2, _b, _c, _d;
|
|
46102
|
+
if (((_a2 = stateRef.current.messageText) == null ? void 0 : _a2.length) || stateRef.current.chatFiles) {
|
|
46103
|
+
socket2.emit("messageFromClient", {
|
|
46104
|
+
message: stateRef.current.messageText,
|
|
46105
|
+
conversation: (_b = dataRef.current) == null ? void 0 : _b.wait.conversation.id,
|
|
46106
|
+
customer: ((_c = dataRef.current) == null ? void 0 : _c.customer.id) || ((_d = dataRef.current) == null ? void 0 : _d.customer)
|
|
46107
|
+
});
|
|
46108
|
+
}
|
|
46109
|
+
document.getElementById("widget-chat-input-field").value = "";
|
|
46110
|
+
document.getElementById("widget-file-upload-input").value = "";
|
|
46111
|
+
setState({
|
|
46112
|
+
chatFiles: null,
|
|
46113
|
+
messageText: ""
|
|
46114
|
+
});
|
|
46115
|
+
};
|
|
46116
|
+
const sendFile = react.exports.useCallback(async () => {
|
|
46117
|
+
var _a2, _b;
|
|
46118
|
+
try {
|
|
46119
|
+
const data2 = new FormData();
|
|
46120
|
+
data2.append("customer", (_a2 = dataRef.current) == null ? void 0 : _a2.customer.id);
|
|
46121
|
+
data2.append("conversation", (_b = dataRef.current) == null ? void 0 : _b.wait.conversation.id);
|
|
46122
|
+
data2.append("message", stateRef.current.messageText);
|
|
46123
|
+
data2.append("attachment", stateRef.current.chatFiles);
|
|
46124
|
+
await createMessage(data2, {
|
|
46125
|
+
headers: {
|
|
46126
|
+
"Content-Type": "multipart/form-data"
|
|
46127
|
+
}
|
|
46128
|
+
});
|
|
46129
|
+
document.getElementById("widget-chat-input-field").value = "";
|
|
46130
|
+
document.getElementById("widget-file-upload-input").value = "";
|
|
46131
|
+
setState({
|
|
46132
|
+
chatFiles: null,
|
|
46133
|
+
messageText: ""
|
|
46134
|
+
});
|
|
46135
|
+
} catch (error) {
|
|
46136
|
+
console.log(error);
|
|
46137
|
+
}
|
|
46138
|
+
}, [stateRef, dataRef, socket2.connected, stateRef]);
|
|
46139
|
+
const handleFileUpload = (e2) => {
|
|
46140
|
+
setState({
|
|
46141
|
+
chatFiles: e2.target.files[0]
|
|
46142
|
+
});
|
|
46143
|
+
};
|
|
46144
|
+
const handleEnterKeypress = (e2) => {
|
|
46145
|
+
if (e2.key === "Enter") {
|
|
46146
|
+
sendMessage();
|
|
46147
|
+
}
|
|
46148
|
+
};
|
|
46149
|
+
const onChange = (e2) => {
|
|
46150
|
+
var _a2, _b, _c;
|
|
46151
|
+
setState({
|
|
46152
|
+
messageText: e2.target.value
|
|
46153
|
+
});
|
|
46154
|
+
((_a2 = agent == null ? void 0 : agent.user) == null ? void 0 : _a2.id) && socket2.emit("typing", {
|
|
46155
|
+
to: (_b = agent == null ? void 0 : agent.user) == null ? void 0 : _b.id,
|
|
46156
|
+
conversation: (_c = dataRef.current) == null ? void 0 : _c.wait.conversation.id,
|
|
46157
|
+
message: e2.target.value
|
|
46158
|
+
});
|
|
46159
|
+
};
|
|
46160
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
46161
|
+
className: "widget-chat-form-container w-100 d-flex justify-content-between align-items-center",
|
|
46162
|
+
children: [/* @__PURE__ */ jsx("small", {
|
|
46163
|
+
className: "file-name",
|
|
46164
|
+
children: chatFiles == null ? void 0 : chatFiles.name
|
|
46165
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
46166
|
+
className: "widget-file-upload-container d-flex justify-content-between align-items-center",
|
|
46167
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
46168
|
+
className: "widget-file-upload-input",
|
|
46169
|
+
type: "file",
|
|
46170
|
+
onChange: handleFileUpload,
|
|
46171
|
+
id: "widget-file-upload-input"
|
|
46172
|
+
}), /* @__PURE__ */ jsx("img", {
|
|
46173
|
+
src: attachmentIcon,
|
|
46174
|
+
className: "widget-file-upload-button d-flex justify-content-between align-items-center",
|
|
46175
|
+
alt: "attach file",
|
|
46176
|
+
width: "20px"
|
|
46177
|
+
})]
|
|
46178
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
46179
|
+
className: "widget-chat-input-container d-flex justify-content-between align-items-center",
|
|
46180
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
46181
|
+
className: "",
|
|
46182
|
+
type: "text",
|
|
46183
|
+
onChange,
|
|
46184
|
+
onKeyDown: handleEnterKeypress,
|
|
46185
|
+
placeholder: "Type here...",
|
|
46186
|
+
id: "widget-chat-input-field",
|
|
46187
|
+
autoComplete: "off",
|
|
46188
|
+
autoFocus: true,
|
|
46189
|
+
disabled: ((_a = document.getElementById("widget-file-upload-input")) == null ? void 0 : _a.value) !== ""
|
|
46190
|
+
}), /* @__PURE__ */ jsx("img", {
|
|
46191
|
+
onClick: chatFiles ? sendFile : sendMessage,
|
|
46192
|
+
className: "widget-send-img",
|
|
46193
|
+
src: sendIcon,
|
|
46194
|
+
alt: "send message",
|
|
46195
|
+
width: "16px",
|
|
46196
|
+
height: "20px"
|
|
46197
|
+
})]
|
|
46198
|
+
})]
|
|
46199
|
+
});
|
|
46095
46200
|
});
|
|
46096
|
-
const
|
|
46201
|
+
const Messages = react.exports.memo(function({
|
|
46202
|
+
chatMessages,
|
|
46203
|
+
dataRef
|
|
46204
|
+
}) {
|
|
46205
|
+
return chatMessages.map((msg) => {
|
|
46206
|
+
var _a, _b, _c, _d;
|
|
46207
|
+
return /* @__PURE__ */ jsx(Message, {
|
|
46208
|
+
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),
|
|
46209
|
+
...msg
|
|
46210
|
+
}, msg.id);
|
|
46211
|
+
});
|
|
46212
|
+
});
|
|
46213
|
+
const Message = react.exports.memo(function({
|
|
46214
|
+
attachment,
|
|
46215
|
+
...msg
|
|
46216
|
+
}) {
|
|
46217
|
+
var _a, _b, _c, _d, _e;
|
|
46218
|
+
const file = react.exports.useMemo(() => attachment && {
|
|
46219
|
+
name: attachment.split(".").slice(-2, -1),
|
|
46220
|
+
ext: attachment == null ? void 0 : attachment.split(".").pop()
|
|
46221
|
+
}, [attachment]);
|
|
46222
|
+
return msg.isSender ? /* @__PURE__ */ jsx("div", {
|
|
46223
|
+
className: "chat-send-container mb-5",
|
|
46224
|
+
children: ((_a = msg.message) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxs(Fragment, {
|
|
46225
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
46226
|
+
className: "widget-chat-send",
|
|
46227
|
+
children: msg.message
|
|
46228
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
46229
|
+
children: hooks(msg.createdAt).calendar()
|
|
46230
|
+
})]
|
|
46231
|
+
}) : !!attachment ? /* @__PURE__ */ jsxs(Fragment, {
|
|
46232
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
46233
|
+
className: "widget-chat-send widget-chat-file",
|
|
46234
|
+
children: [isFileType(file.ext) === "image" ? /* @__PURE__ */ jsx("a", {
|
|
46235
|
+
target: "_blank",
|
|
46236
|
+
rel: "noreferrer",
|
|
46237
|
+
href: attachment,
|
|
46238
|
+
download: file == null ? void 0 : file.name,
|
|
46239
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
46240
|
+
src: attachment,
|
|
46241
|
+
height: 60,
|
|
46242
|
+
alt: file.name
|
|
46243
|
+
})
|
|
46244
|
+
}) : /* @__PURE__ */ jsx("a", {
|
|
46245
|
+
target: "_blank",
|
|
46246
|
+
rel: "noreferrer",
|
|
46247
|
+
href: attachment,
|
|
46248
|
+
download: file == null ? void 0 : file.name,
|
|
46249
|
+
children: file.name
|
|
46250
|
+
}), " "]
|
|
46251
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
46252
|
+
children: hooks(msg.createdAt).calendar()
|
|
46253
|
+
})]
|
|
46254
|
+
}) : null
|
|
46255
|
+
}, msg.id) : /* @__PURE__ */ jsxs("div", {
|
|
46256
|
+
className: "chat-receive-container mb-5 d-flex align-items-center",
|
|
46257
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
46258
|
+
className: "pt-3 align-items-center text-align-center",
|
|
46259
|
+
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
46260
|
+
size: "30",
|
|
46261
|
+
className: "m-0 mr-2",
|
|
46262
|
+
src: (_c = (_b = msg == null ? void 0 : msg.user) == null ? void 0 : _b.agent) == null ? void 0 : _c.profile_picture,
|
|
46263
|
+
round: true
|
|
46264
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
46265
|
+
style: {
|
|
46266
|
+
color: "black"
|
|
46267
|
+
},
|
|
46268
|
+
className: "m-0 p-0 pt-1",
|
|
46269
|
+
children: (_e = (_d = msg == null ? void 0 : msg.user) == null ? void 0 : _d.agent) == null ? void 0 : _e.first_name
|
|
46270
|
+
})]
|
|
46271
|
+
}), !!attachment ? /* @__PURE__ */ jsx("p", {
|
|
46272
|
+
className: `widget-chat-file mb-0`,
|
|
46273
|
+
children: isFileType(file.ext) === "image" ? /* @__PURE__ */ jsx("a", {
|
|
46274
|
+
target: "_blank",
|
|
46275
|
+
rel: "noreferrer",
|
|
46276
|
+
href: attachment,
|
|
46277
|
+
download: file == null ? void 0 : file.name,
|
|
46278
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
46279
|
+
src: attachment,
|
|
46280
|
+
height: 60,
|
|
46281
|
+
alt: ""
|
|
46282
|
+
})
|
|
46283
|
+
}) : /* @__PURE__ */ jsx("a", {
|
|
46284
|
+
target: "_blank",
|
|
46285
|
+
rel: "noreferrer",
|
|
46286
|
+
href: attachment,
|
|
46287
|
+
download: file == null ? void 0 : file.name,
|
|
46288
|
+
children: file == null ? void 0 : file.name
|
|
46289
|
+
})
|
|
46290
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
46291
|
+
className: `widget-chat-receive mb-0`,
|
|
46292
|
+
children: msg.message
|
|
46293
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
46294
|
+
children: hooks(msg == null ? void 0 : msg.createdAt).calendar()
|
|
46295
|
+
})]
|
|
46296
|
+
}, msg.id);
|
|
46297
|
+
});
|
|
46298
|
+
const ChatWidgetScreen$1 = react.exports.memo(ChatWidgetScreen);
|
|
46299
|
+
const viewCompany = (id2, params) => api("companies/" + id2, params);
|
|
46097
46300
|
const iceServers = [
|
|
46098
46301
|
{
|
|
46099
46302
|
url: "stun:global.stun.twilio.com:3478?transport=udp",
|
|
@@ -46717,7 +46920,7 @@ const ActionBtn = ({
|
|
|
46717
46920
|
style: {
|
|
46718
46921
|
backgroundColor: "rgba(0,0,0,0.4)"
|
|
46719
46922
|
},
|
|
46720
|
-
className: "p-2 px-2
|
|
46923
|
+
className: "p-2 px-2 rounded-circle mx-2 text-white",
|
|
46721
46924
|
...props,
|
|
46722
46925
|
children
|
|
46723
46926
|
});
|
|
@@ -46925,457 +47128,18 @@ function VideoCall({
|
|
|
46925
47128
|
});
|
|
46926
47129
|
}
|
|
46927
47130
|
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
|
-
});
|
|
47131
|
+
const viewCustomer = (id2, params) => api(`customers/${id2}`, params);
|
|
47132
|
+
const Interval = react.exports.memo(({
|
|
47133
|
+
Render,
|
|
47134
|
+
interval = 1e3 * 60 * 5
|
|
47135
|
+
}) => {
|
|
47136
|
+
const [, setState] = react.exports.useState();
|
|
46955
47137
|
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
|
-
});
|
|
47138
|
+
const intv = setInterval(() => setState((bool) => !bool), [interval]);
|
|
47139
|
+
return () => clearInterval(intv);
|
|
47140
|
+
}, [interval]);
|
|
47141
|
+
return /* @__PURE__ */ jsx(Render, {});
|
|
47316
47142
|
});
|
|
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
47143
|
const days = {
|
|
47380
47144
|
Monday: 1,
|
|
47381
47145
|
Tuesday: 2,
|
|
@@ -47637,9 +47401,7 @@ const WidgetFormDisplay = react.exports.memo(({
|
|
|
47637
47401
|
videoRef
|
|
47638
47402
|
}), !!((_c = (_b = dataRef == null ? void 0 : dataRef.current) == null ? void 0 : _b.wait) == null ? void 0 : _c.createdAt) && !stateRef.current.agent && /* @__PURE__ */ jsx(LongestWaitime, {}), /* @__PURE__ */ jsx("div", {
|
|
47639
47403
|
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, {
|
|
47404
|
+
children: isLoadingCustomer ? /* @__PURE__ */ jsx(Spinner$2, {}) : isScheduling ? /* @__PURE__ */ jsx(Schedules, {
|
|
47643
47405
|
setParentState: setState,
|
|
47644
47406
|
customer,
|
|
47645
47407
|
setIsScheduling,
|
|
@@ -47678,36 +47440,141 @@ const WidgetFormDisplay = react.exports.memo(({
|
|
|
47678
47440
|
}), /* @__PURE__ */ jsx(Footer, {})]
|
|
47679
47441
|
});
|
|
47680
47442
|
});
|
|
47443
|
+
const LongestWaitime = react.exports.memo(() => {
|
|
47444
|
+
const {
|
|
47445
|
+
state: {
|
|
47446
|
+
data: {
|
|
47447
|
+
waitList
|
|
47448
|
+
}
|
|
47449
|
+
},
|
|
47450
|
+
setState
|
|
47451
|
+
} = useRequest({
|
|
47452
|
+
asyncRequest: getLongestWaitTime
|
|
47453
|
+
});
|
|
47454
|
+
useSocketListeners({
|
|
47455
|
+
listeners: {
|
|
47456
|
+
"longest-wait": ({
|
|
47457
|
+
waitList: waitList2
|
|
47458
|
+
}) => waitList2 && setState((s2) => {
|
|
47459
|
+
var _a;
|
|
47460
|
+
if ((_a = s2.data) == null ? void 0 : _a.waitList) {
|
|
47461
|
+
s2.data.waitList.createdAt = waitList2.createdAt;
|
|
47462
|
+
} else {
|
|
47463
|
+
s2.data = {
|
|
47464
|
+
waitList: waitList2
|
|
47465
|
+
};
|
|
47466
|
+
}
|
|
47467
|
+
})
|
|
47468
|
+
}
|
|
47469
|
+
});
|
|
47470
|
+
return /* @__PURE__ */ jsxs(Row$1, {
|
|
47471
|
+
className: "justify-content-between align-items-center",
|
|
47472
|
+
children: [/* @__PURE__ */ jsx(Col$1, {
|
|
47473
|
+
children: /* @__PURE__ */ jsx("hr", {
|
|
47474
|
+
style: {
|
|
47475
|
+
border: "1px solid #000"
|
|
47476
|
+
}
|
|
47477
|
+
})
|
|
47478
|
+
}), /* @__PURE__ */ jsx(Badge$1, {
|
|
47479
|
+
color: "warning",
|
|
47480
|
+
children: /* @__PURE__ */ jsx(Interval, {
|
|
47481
|
+
Render: () => {
|
|
47482
|
+
const d2 = hooks.duration(hooks().diff(waitList == null ? void 0 : waitList.createdAt));
|
|
47483
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
47484
|
+
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")]
|
|
47485
|
+
});
|
|
47486
|
+
},
|
|
47487
|
+
interval: 1e3
|
|
47488
|
+
})
|
|
47489
|
+
}), /* @__PURE__ */ jsx(Col$1, {
|
|
47490
|
+
children: /* @__PURE__ */ jsx("hr", {
|
|
47491
|
+
style: {
|
|
47492
|
+
border: "1px solid #000"
|
|
47493
|
+
}
|
|
47494
|
+
})
|
|
47495
|
+
})]
|
|
47496
|
+
});
|
|
47497
|
+
});
|
|
47681
47498
|
const Footer = () => /* @__PURE__ */ jsx("div", {
|
|
47682
47499
|
className: "widget-footer-container",
|
|
47683
47500
|
children: /* @__PURE__ */ jsxs("div", {
|
|
47684
47501
|
className: "d-flex justify-content-center align-items-center",
|
|
47685
47502
|
children: [/* @__PURE__ */ jsx("span", {
|
|
47686
|
-
className: "
|
|
47503
|
+
className: "mb-0",
|
|
47504
|
+
style: {
|
|
47505
|
+
fontSize: 12,
|
|
47506
|
+
marginRight: 4
|
|
47507
|
+
},
|
|
47687
47508
|
children: "Powered by"
|
|
47688
|
-
}), /* @__PURE__ */ jsx("
|
|
47689
|
-
|
|
47690
|
-
|
|
47691
|
-
|
|
47692
|
-
|
|
47509
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
47510
|
+
className: "m-0",
|
|
47511
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
47512
|
+
span: "true",
|
|
47513
|
+
className: "m-0",
|
|
47514
|
+
src: logo,
|
|
47515
|
+
alt: "logo",
|
|
47516
|
+
width: "56px"
|
|
47517
|
+
})
|
|
47693
47518
|
})]
|
|
47694
47519
|
})
|
|
47695
47520
|
});
|
|
47696
|
-
const Widget = react.exports.memo((p2) =>
|
|
47697
|
-
|
|
47698
|
-
|
|
47699
|
-
|
|
47700
|
-
|
|
47701
|
-
|
|
47702
|
-
|
|
47703
|
-
|
|
47704
|
-
children: /* @__PURE__ */ jsx(
|
|
47705
|
-
|
|
47521
|
+
const Widget = react.exports.memo((p2) => {
|
|
47522
|
+
return /* @__PURE__ */ jsx(SawportContext.Provider, {
|
|
47523
|
+
value: {
|
|
47524
|
+
config: sawportConfig,
|
|
47525
|
+
setConfig: setSawportConfig
|
|
47526
|
+
},
|
|
47527
|
+
children: /* @__PURE__ */ jsx(QueryClientProvider, {
|
|
47528
|
+
client: new QueryClient(),
|
|
47529
|
+
children: /* @__PURE__ */ jsx(cjsExports.IoProvider, {
|
|
47530
|
+
children: /* @__PURE__ */ jsx(UnwrapWidget, {
|
|
47531
|
+
...p2
|
|
47532
|
+
})
|
|
47706
47533
|
})
|
|
47707
47534
|
})
|
|
47708
|
-
})
|
|
47709
|
-
})
|
|
47535
|
+
});
|
|
47536
|
+
});
|
|
47710
47537
|
const Widget$1 = react.exports.memo(Widget);
|
|
47538
|
+
const SubTitle = ({
|
|
47539
|
+
from_day,
|
|
47540
|
+
to_time,
|
|
47541
|
+
to_day,
|
|
47542
|
+
from_time
|
|
47543
|
+
}) => /* @__PURE__ */ jsxs(Fragment, {
|
|
47544
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
47545
|
+
className: "m-0 mt-2",
|
|
47546
|
+
children: "Hours of Operation"
|
|
47547
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
47548
|
+
className: "m-0 mt-1",
|
|
47549
|
+
children: [from_day, " - ", to_day, " ", from_time, " - ", to_time]
|
|
47550
|
+
})]
|
|
47551
|
+
});
|
|
47552
|
+
function WidgetOfflineHeader({
|
|
47553
|
+
company
|
|
47554
|
+
}) {
|
|
47555
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
47556
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
47557
|
+
className: "d-flex flex-column justify-content-between align-items-center w-100 py-3 px-2 text-center",
|
|
47558
|
+
style: {
|
|
47559
|
+
fontSize: 16,
|
|
47560
|
+
color: "#fff"
|
|
47561
|
+
},
|
|
47562
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
47563
|
+
className: "mb-0 pb-0",
|
|
47564
|
+
style: {
|
|
47565
|
+
fontSize: 24,
|
|
47566
|
+
fontWeight: "bold"
|
|
47567
|
+
},
|
|
47568
|
+
children: "Video Banking Offline"
|
|
47569
|
+
}), /* @__PURE__ */ jsx(SubTitle, {
|
|
47570
|
+
from_day: company == null ? void 0 : company.from_day,
|
|
47571
|
+
to_day: company == null ? void 0 : company.to_day,
|
|
47572
|
+
from_time: hooks("2020-04-04 " + (company == null ? void 0 : company.from_time)).format("HH:mm"),
|
|
47573
|
+
to_time: hooks("2020-04-04 " + (company == null ? void 0 : company.to_time)).format("HH:mm")
|
|
47574
|
+
})]
|
|
47575
|
+
})
|
|
47576
|
+
});
|
|
47577
|
+
}
|
|
47711
47578
|
function WidgetOnlineHeader() {
|
|
47712
47579
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
47713
47580
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -47733,6 +47600,65 @@ function WidgetOnlineHeader() {
|
|
|
47733
47600
|
})
|
|
47734
47601
|
});
|
|
47735
47602
|
}
|
|
47603
|
+
function WidgetInitOnlineHeader({
|
|
47604
|
+
dataRef,
|
|
47605
|
+
setChatClose,
|
|
47606
|
+
setIsWidgetLaunched,
|
|
47607
|
+
senderObj,
|
|
47608
|
+
quickStopChat,
|
|
47609
|
+
videoRef
|
|
47610
|
+
}) {
|
|
47611
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
47612
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
47613
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
47614
|
+
className: "d-flex justify-content-between align-items-center py-3 px-3",
|
|
47615
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
47616
|
+
className: "mb-0 pb-0 mr-auto",
|
|
47617
|
+
style: {
|
|
47618
|
+
fontSize: 18,
|
|
47619
|
+
color: "#fff"
|
|
47620
|
+
},
|
|
47621
|
+
children: "Video Banking Online"
|
|
47622
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
47623
|
+
className: "widget-option-btn d-flex justify-content-between align-items-center",
|
|
47624
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
47625
|
+
onClick: () => {
|
|
47626
|
+
setIsWidgetLaunched(false);
|
|
47627
|
+
},
|
|
47628
|
+
className: "border-left border-right",
|
|
47629
|
+
style: {
|
|
47630
|
+
width: 25,
|
|
47631
|
+
paddingLeft: 2,
|
|
47632
|
+
paddingRight: 2
|
|
47633
|
+
},
|
|
47634
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
47635
|
+
src: maximizeIcon,
|
|
47636
|
+
alt: "maximize",
|
|
47637
|
+
width: "20px",
|
|
47638
|
+
className: ""
|
|
47639
|
+
})
|
|
47640
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
47641
|
+
className: "w-50 close-chat ml-3",
|
|
47642
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
47643
|
+
src: closeIcon,
|
|
47644
|
+
onClick: () => {
|
|
47645
|
+
senderObj ? setChatClose(false) : quickStopChat();
|
|
47646
|
+
},
|
|
47647
|
+
alt: "close",
|
|
47648
|
+
width: "20px"
|
|
47649
|
+
})
|
|
47650
|
+
})]
|
|
47651
|
+
})]
|
|
47652
|
+
}), /* @__PURE__ */ jsx(Col$1, {
|
|
47653
|
+
className: "m-0 p-0",
|
|
47654
|
+
children: ((_b = (_a = dataRef.current) == null ? void 0 : _a.customer) == null ? void 0 : _b.id) && /* @__PURE__ */ jsx(VideoCall$1, {
|
|
47655
|
+
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),
|
|
47656
|
+
conversation_id: (_h = dataRef.current) == null ? void 0 : _h.wait.conversation.id,
|
|
47657
|
+
ref: videoRef
|
|
47658
|
+
})
|
|
47659
|
+
})]
|
|
47660
|
+
});
|
|
47661
|
+
}
|
|
47736
47662
|
var createRoot;
|
|
47737
47663
|
var m = reactDom.exports;
|
|
47738
47664
|
{
|