authscape 1.0.658 → 1.0.662
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/index.js +126 -120
- package/package.json +1 -1
- package/src/components/AuthScapeApp.js +7 -7
- package/src/components/RichTextEditor.js +2 -2
- package/src/services/apiService.js +12 -12
- package/src/services/authService.js +3 -3
- package/src/services/signInValidator.js +7 -7
- package/src/services/util.js +23 -1
package/index.js
CHANGED
|
@@ -12,7 +12,6 @@ var _head = _interopRequireDefault(require("next/head"));
|
|
|
12
12
|
var _navigation = require("next/navigation");
|
|
13
13
|
var _axios = _interopRequireDefault(require("axios"));
|
|
14
14
|
var _queryString = _interopRequireDefault(require("query-string"));
|
|
15
|
-
var _jsCookie = _interopRequireDefault(require("js-cookie"));
|
|
16
15
|
var _router = _interopRequireDefault(require("next/router"));
|
|
17
16
|
var _ga4React = _interopRequireDefault(require("ga-4-react"));
|
|
18
17
|
var _zustand = require("zustand");
|
|
@@ -29,7 +28,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
29
28
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
30
29
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
31
30
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
32
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import Cookies from 'js-cookie';
|
|
33
32
|
// comment this out
|
|
34
33
|
// import { authService, apiService, setupOEMProps, OEMStyleSheet } from 'authscape';
|
|
35
34
|
|
|
@@ -109,24 +108,27 @@ function AuthScapeApp(_ref) {
|
|
|
109
108
|
domainHost = window.location.hostname.split('.').slice(-2).join('.');
|
|
110
109
|
window.localStorage.removeItem("verifier");
|
|
111
110
|
_context.next = 17;
|
|
112
|
-
return
|
|
113
|
-
maxAge:
|
|
111
|
+
return setCookie('access_token', response.data.access_token, {
|
|
112
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
113
|
+
// 1 year,
|
|
114
114
|
path: '/',
|
|
115
115
|
domain: domainHost,
|
|
116
116
|
secure: true
|
|
117
117
|
});
|
|
118
118
|
case 17:
|
|
119
119
|
_context.next = 19;
|
|
120
|
-
return
|
|
121
|
-
maxAge:
|
|
120
|
+
return setCookie('expires_in', response.data.expires_in, {
|
|
121
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
122
|
+
// 1 year,
|
|
122
123
|
path: '/',
|
|
123
124
|
domain: domainHost,
|
|
124
125
|
secure: true
|
|
125
126
|
});
|
|
126
127
|
case 19:
|
|
127
128
|
_context.next = 21;
|
|
128
|
-
return
|
|
129
|
-
maxAge:
|
|
129
|
+
return setCookie('refresh_token', response.data.refresh_token, {
|
|
130
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
131
|
+
// 1 year,
|
|
130
132
|
path: '/',
|
|
131
133
|
domain: domainHost,
|
|
132
134
|
secure: true
|
|
@@ -6551,6 +6553,8 @@ var Editor = (0, _dynamic["default"])(function () {
|
|
|
6551
6553
|
var RichTextEditor = function RichTextEditor(_ref) {
|
|
6552
6554
|
var html = _ref.html,
|
|
6553
6555
|
onSave = _ref.onSave,
|
|
6556
|
+
_ref$height = _ref.height,
|
|
6557
|
+
height = _ref$height === void 0 ? 400 : _ref$height,
|
|
6554
6558
|
_ref$isDisabled = _ref.isDisabled,
|
|
6555
6559
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
|
|
6556
6560
|
var _useState = (0, _react.useState)(_draftJs.EditorState.createEmpty()),
|
|
@@ -6577,7 +6581,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
6577
6581
|
editorClassName: "editorClassName",
|
|
6578
6582
|
readOnly: isDisabled,
|
|
6579
6583
|
editorStyle: {
|
|
6580
|
-
height:
|
|
6584
|
+
height: height
|
|
6581
6585
|
},
|
|
6582
6586
|
onEditorStateChange: onEditorStateChange
|
|
6583
6587
|
// mention={{
|
|
@@ -8399,41 +8403,26 @@ var setupDefaultOptions = /*#__PURE__*/function () {
|
|
|
8399
8403
|
case 0:
|
|
8400
8404
|
ctx = _args.length > 0 && _args[0] !== undefined ? _args[0] : null;
|
|
8401
8405
|
defaultOptions = {};
|
|
8402
|
-
if (
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
case 8:
|
|
8416
|
-
accessToken = _context.t0;
|
|
8417
|
-
if (accessToken !== null && accessToken !== undefined && accessToken != "") {
|
|
8418
|
-
defaultOptions = {
|
|
8419
|
-
headers: {
|
|
8420
|
-
Authorization: "Bearer " + accessToken
|
|
8421
|
-
}
|
|
8422
|
-
};
|
|
8406
|
+
if (ctx == null) {
|
|
8407
|
+
accessToken = _jsCookie["default"].get('access_token') || '';
|
|
8408
|
+
if (accessToken !== null && accessToken !== undefined && accessToken != "") {
|
|
8409
|
+
defaultOptions = {
|
|
8410
|
+
headers: {
|
|
8411
|
+
Authorization: "Bearer " + accessToken
|
|
8412
|
+
}
|
|
8413
|
+
};
|
|
8414
|
+
} else {
|
|
8415
|
+
defaultOptions = {
|
|
8416
|
+
headers: {}
|
|
8417
|
+
};
|
|
8418
|
+
}
|
|
8423
8419
|
} else {
|
|
8424
8420
|
defaultOptions = {
|
|
8425
8421
|
headers: {}
|
|
8426
8422
|
};
|
|
8427
8423
|
}
|
|
8428
|
-
_context.next = 13;
|
|
8429
|
-
break;
|
|
8430
|
-
case 12:
|
|
8431
|
-
defaultOptions = {
|
|
8432
|
-
headers: {}
|
|
8433
|
-
};
|
|
8434
|
-
case 13:
|
|
8435
8424
|
return _context.abrupt("return", defaultOptions);
|
|
8436
|
-
case
|
|
8425
|
+
case 4:
|
|
8437
8426
|
case "end":
|
|
8438
8427
|
return _context.stop();
|
|
8439
8428
|
}
|
|
@@ -8449,29 +8438,9 @@ var RefreshToken = /*#__PURE__*/function () {
|
|
|
8449
8438
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
8450
8439
|
while (1) switch (_context2.prev = _context2.next) {
|
|
8451
8440
|
case 0:
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
_context2.t0 = _context2.sent;
|
|
8456
|
-
if (_context2.t0) {
|
|
8457
|
-
_context2.next = 5;
|
|
8458
|
-
break;
|
|
8459
|
-
}
|
|
8460
|
-
_context2.t0 = '';
|
|
8461
|
-
case 5:
|
|
8462
|
-
accessToken = _context2.t0;
|
|
8463
|
-
_context2.next = 8;
|
|
8464
|
-
return _jsCookie["default"].get('refresh_token');
|
|
8465
|
-
case 8:
|
|
8466
|
-
_context2.t1 = _context2.sent;
|
|
8467
|
-
if (_context2.t1) {
|
|
8468
|
-
_context2.next = 11;
|
|
8469
|
-
break;
|
|
8470
|
-
}
|
|
8471
|
-
_context2.t1 = '';
|
|
8472
|
-
case 11:
|
|
8473
|
-
refreshToken = _context2.t1;
|
|
8474
|
-
_context2.next = 14;
|
|
8441
|
+
accessToken = _jsCookie["default"].get('access_token') || '';
|
|
8442
|
+
refreshToken = _jsCookie["default"].get('refresh_token') || '';
|
|
8443
|
+
_context2.next = 4;
|
|
8475
8444
|
return instance.post(process.env.authorityUri + "/connect/token", _queryString["default"].stringify({
|
|
8476
8445
|
grant_type: 'refresh_token',
|
|
8477
8446
|
client_id: process.env.client_id,
|
|
@@ -8483,38 +8452,41 @@ var RefreshToken = /*#__PURE__*/function () {
|
|
|
8483
8452
|
"Authorization": "Bearer " + accessToken
|
|
8484
8453
|
}
|
|
8485
8454
|
});
|
|
8486
|
-
case
|
|
8455
|
+
case 4:
|
|
8487
8456
|
response = _context2.sent;
|
|
8488
8457
|
if (!(response != null && response.status == 200)) {
|
|
8489
|
-
_context2.next =
|
|
8458
|
+
_context2.next = 14;
|
|
8490
8459
|
break;
|
|
8491
8460
|
}
|
|
8492
8461
|
domainHost = window.location.hostname.split('.').slice(-2).join('.');
|
|
8493
8462
|
originalRequest.headers['Authorization'] = 'Bearer ' + response.data.access_token;
|
|
8494
|
-
_context2.next =
|
|
8495
|
-
return
|
|
8496
|
-
maxAge:
|
|
8463
|
+
_context2.next = 10;
|
|
8464
|
+
return setCookie('access_token', response.data.access_token, {
|
|
8465
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
8466
|
+
// 1 year,
|
|
8497
8467
|
path: '/',
|
|
8498
8468
|
domain: domainHost,
|
|
8499
8469
|
secure: true
|
|
8500
8470
|
});
|
|
8501
|
-
case
|
|
8502
|
-
_context2.next =
|
|
8503
|
-
return
|
|
8504
|
-
maxAge:
|
|
8471
|
+
case 10:
|
|
8472
|
+
_context2.next = 12;
|
|
8473
|
+
return setCookie('expires_in', response.data.expires_in, {
|
|
8474
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
8475
|
+
// 1 year,
|
|
8505
8476
|
path: '/',
|
|
8506
8477
|
domain: domainHost,
|
|
8507
8478
|
secure: true
|
|
8508
8479
|
});
|
|
8509
|
-
case
|
|
8510
|
-
_context2.next =
|
|
8511
|
-
return
|
|
8512
|
-
maxAge:
|
|
8480
|
+
case 12:
|
|
8481
|
+
_context2.next = 14;
|
|
8482
|
+
return setCookie('refresh_token', response.data.refresh_token, {
|
|
8483
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
8484
|
+
// 1 year,
|
|
8513
8485
|
path: '/',
|
|
8514
8486
|
domain: domainHost,
|
|
8515
8487
|
secure: true
|
|
8516
8488
|
});
|
|
8517
|
-
case
|
|
8489
|
+
case 14:
|
|
8518
8490
|
case "end":
|
|
8519
8491
|
return _context2.stop();
|
|
8520
8492
|
}
|
|
@@ -8547,7 +8519,7 @@ var apiService = function apiService() {
|
|
|
8547
8519
|
case 0:
|
|
8548
8520
|
originalConfig = error.config;
|
|
8549
8521
|
if (!error.response) {
|
|
8550
|
-
_context3.next =
|
|
8522
|
+
_context3.next = 10;
|
|
8551
8523
|
break;
|
|
8552
8524
|
}
|
|
8553
8525
|
if (!(error.response.status === 401 && !originalConfig._retry)) {
|
|
@@ -8563,36 +8535,50 @@ var apiService = function apiService() {
|
|
|
8563
8535
|
return _context3.abrupt("return", instance.request(originalConfig));
|
|
8564
8536
|
case 7:
|
|
8565
8537
|
if (!(error.response.status === 400)) {
|
|
8566
|
-
_context3.next =
|
|
8567
|
-
break;
|
|
8568
|
-
}
|
|
8569
|
-
if (!error.response.config.url.includes("/connect/token")) {
|
|
8570
|
-
_context3.next = 16;
|
|
8538
|
+
_context3.next = 10;
|
|
8571
8539
|
break;
|
|
8572
8540
|
}
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8541
|
+
// Do something
|
|
8542
|
+
|
|
8543
|
+
if (error.response.config.url.includes("/connect/token"))
|
|
8544
|
+
// remove the access and refresh if invalid
|
|
8545
|
+
{
|
|
8546
|
+
domainHost = window.location.hostname.split('.').slice(-2).join('.');
|
|
8547
|
+
_jsCookie["default"].remove('access_token', {
|
|
8548
|
+
path: '/',
|
|
8549
|
+
domain: domainHost
|
|
8550
|
+
});
|
|
8551
|
+
_jsCookie["default"].remove('refresh_token', {
|
|
8552
|
+
path: '/',
|
|
8553
|
+
domain: domainHost
|
|
8554
|
+
});
|
|
8555
|
+
_jsCookie["default"].remove('expires_in', {
|
|
8556
|
+
path: '/',
|
|
8557
|
+
domain: domainHost
|
|
8558
|
+
});
|
|
8559
|
+
|
|
8560
|
+
// destroyCookie(null, "access_token", {
|
|
8561
|
+
// maxAge: 2147483647,
|
|
8562
|
+
// path: '/',
|
|
8563
|
+
// domain: domainHost
|
|
8564
|
+
// });
|
|
8565
|
+
|
|
8566
|
+
// destroyCookie(null, "refresh_token", {
|
|
8567
|
+
// maxAge: 2147483647,
|
|
8568
|
+
// path: '/',
|
|
8569
|
+
// domain: domainHost
|
|
8570
|
+
// });
|
|
8571
|
+
|
|
8572
|
+
// destroyCookie(null, "expires_in", {
|
|
8573
|
+
// maxAge: 2147483647,
|
|
8574
|
+
// path: '/',
|
|
8575
|
+
// domain: domainHost
|
|
8576
|
+
// });
|
|
8577
|
+
}
|
|
8592
8578
|
return _context3.abrupt("return", Promise.reject(error));
|
|
8593
|
-
case
|
|
8579
|
+
case 10:
|
|
8594
8580
|
return _context3.abrupt("return", Promise.reject(error));
|
|
8595
|
-
case
|
|
8581
|
+
case 11:
|
|
8596
8582
|
case "end":
|
|
8597
8583
|
return _context3.stop();
|
|
8598
8584
|
}
|
|
@@ -9135,24 +9121,19 @@ var authService = function authService() {
|
|
|
9135
9121
|
redirectUri = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : null;
|
|
9136
9122
|
domainHost = window.location.hostname.split('.').slice(-2).join('.');
|
|
9137
9123
|
AuthUri = process.env.authorityUri;
|
|
9138
|
-
|
|
9139
|
-
return _jsCookie["default"].remove('access_token', {
|
|
9124
|
+
_jsCookie["default"].remove('access_token', {
|
|
9140
9125
|
path: '/',
|
|
9141
9126
|
domain: domainHost
|
|
9142
9127
|
});
|
|
9143
|
-
|
|
9144
|
-
_context6.next = 7;
|
|
9145
|
-
return _jsCookie["default"].remove('refresh_token', {
|
|
9128
|
+
_jsCookie["default"].remove('refresh_token', {
|
|
9146
9129
|
path: '/',
|
|
9147
9130
|
domain: domainHost
|
|
9148
9131
|
});
|
|
9149
|
-
|
|
9150
|
-
_context6.next = 9;
|
|
9151
|
-
return _jsCookie["default"].remove('expires_in', {
|
|
9132
|
+
_jsCookie["default"].remove('expires_in', {
|
|
9152
9133
|
path: '/',
|
|
9153
9134
|
domain: domainHost
|
|
9154
9135
|
});
|
|
9155
|
-
|
|
9136
|
+
|
|
9156
9137
|
// destroyCookie({}, "access_token", {
|
|
9157
9138
|
// maxAge: 2147483647,
|
|
9158
9139
|
// path: '/',
|
|
@@ -9178,7 +9159,7 @@ var authService = function authService() {
|
|
|
9178
9159
|
window.location.href = AuthUri + "/connect/logout?redirect=" + redirectUri;
|
|
9179
9160
|
}
|
|
9180
9161
|
}, 500);
|
|
9181
|
-
case
|
|
9162
|
+
case 7:
|
|
9182
9163
|
case "end":
|
|
9183
9164
|
return _context6.stop();
|
|
9184
9165
|
}
|
|
@@ -9274,13 +9255,14 @@ exports.signInValidator = void 0;
|
|
|
9274
9255
|
var _react = _interopRequireWildcard(require("react"));
|
|
9275
9256
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9276
9257
|
var _queryString = _interopRequireDefault(require("query-string"));
|
|
9277
|
-
var _jsCookie = _interopRequireDefault(require("js-cookie"));
|
|
9278
9258
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9279
9259
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9280
9260
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
9281
9261
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
9282
9262
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
9283
9263
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
9264
|
+
// import Cookies from 'js-cookie';
|
|
9265
|
+
|
|
9284
9266
|
var signInValidator = /*#__PURE__*/function () {
|
|
9285
9267
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(queryCode) {
|
|
9286
9268
|
var codeVerifier, headers, queryString, response, domainHost, redirectUri;
|
|
@@ -9312,24 +9294,27 @@ var signInValidator = /*#__PURE__*/function () {
|
|
|
9312
9294
|
domainHost = window.location.hostname.split('.').slice(-2).join('.');
|
|
9313
9295
|
window.localStorage.removeItem("verifier");
|
|
9314
9296
|
_context.next = 11;
|
|
9315
|
-
return
|
|
9316
|
-
maxAge:
|
|
9297
|
+
return setCookie('access_token', response.data.access_token, {
|
|
9298
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
9299
|
+
// 1 year,
|
|
9317
9300
|
path: '/',
|
|
9318
9301
|
domain: domainHost,
|
|
9319
9302
|
secure: true
|
|
9320
9303
|
});
|
|
9321
9304
|
case 11:
|
|
9322
9305
|
_context.next = 13;
|
|
9323
|
-
return
|
|
9324
|
-
maxAge:
|
|
9306
|
+
return setCookie('expires_in', response.data.expires_in, {
|
|
9307
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
9308
|
+
// 1 year,
|
|
9325
9309
|
path: '/',
|
|
9326
9310
|
domain: domainHost,
|
|
9327
9311
|
secure: true
|
|
9328
9312
|
});
|
|
9329
9313
|
case 13:
|
|
9330
9314
|
_context.next = 15;
|
|
9331
|
-
return
|
|
9332
|
-
maxAge:
|
|
9315
|
+
return setCookie('refresh_token', response.data.refresh_token, {
|
|
9316
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
9317
|
+
// 1 year,
|
|
9333
9318
|
path: '/',
|
|
9334
9319
|
domain: domainHost,
|
|
9335
9320
|
secure: true
|
|
@@ -9427,7 +9412,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9427
9412
|
Object.defineProperty(exports, "__esModule", {
|
|
9428
9413
|
value: true
|
|
9429
9414
|
});
|
|
9430
|
-
exports.GetBaseUrl = void 0;
|
|
9415
|
+
exports.setCookie = exports.GetBaseUrl = void 0;
|
|
9431
9416
|
var _react = _interopRequireWildcard(require("react"));
|
|
9432
9417
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9433
9418
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -9435,3 +9420,24 @@ var GetBaseUrl = function GetBaseUrl() {
|
|
|
9435
9420
|
return window.location.protocol + "//" + window.location.host;
|
|
9436
9421
|
};
|
|
9437
9422
|
exports.GetBaseUrl = GetBaseUrl;
|
|
9423
|
+
var setCookie = function setCookie(name, value) {
|
|
9424
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9425
|
+
return new Promise(function (resolve) {
|
|
9426
|
+
var cookieString = "".concat(name, "=").concat(value, ";");
|
|
9427
|
+
if (options.maxAge) {
|
|
9428
|
+
cookieString += "max-age=".concat(options.maxAge, ";");
|
|
9429
|
+
}
|
|
9430
|
+
if (options.path) {
|
|
9431
|
+
cookieString += "path=".concat(options.path, ";");
|
|
9432
|
+
}
|
|
9433
|
+
if (options.domain) {
|
|
9434
|
+
cookieString += "domain=".concat(options.domain, ";");
|
|
9435
|
+
}
|
|
9436
|
+
if (options.secure) {
|
|
9437
|
+
cookieString += "secure;";
|
|
9438
|
+
}
|
|
9439
|
+
document.cookie = cookieString;
|
|
9440
|
+
resolve();
|
|
9441
|
+
});
|
|
9442
|
+
};
|
|
9443
|
+
exports.setCookie = setCookie;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import Head from "next/head";
|
|
|
5
5
|
import { useSearchParams, usePathname } from 'next/navigation';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import querystring from "query-string";
|
|
8
|
-
import Cookies from 'js-cookie';
|
|
8
|
+
// import Cookies from 'js-cookie';
|
|
9
9
|
import Router from 'next/router';
|
|
10
10
|
import GA4React from 'ga-4-react';
|
|
11
11
|
import { create } from 'zustand'
|
|
@@ -69,22 +69,22 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
69
69
|
let domainHost = window.location.hostname.split('.').slice(-2).join('.');
|
|
70
70
|
window.localStorage.removeItem("verifier");
|
|
71
71
|
|
|
72
|
-
await
|
|
73
|
-
maxAge:
|
|
72
|
+
await setCookie('access_token', response.data.access_token, {
|
|
73
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
74
74
|
path: '/',
|
|
75
75
|
domain: domainHost,
|
|
76
76
|
secure: true
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
await
|
|
80
|
-
maxAge:
|
|
79
|
+
await setCookie('expires_in', response.data.expires_in, {
|
|
80
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
81
81
|
path: '/',
|
|
82
82
|
domain: domainHost,
|
|
83
83
|
secure: true
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
await
|
|
87
|
-
maxAge:
|
|
86
|
+
await setCookie('refresh_token', response.data.refresh_token, {
|
|
87
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
88
88
|
path: '/',
|
|
89
89
|
domain: domainHost,
|
|
90
90
|
secure: true
|
|
@@ -10,7 +10,7 @@ const Editor = dynamic(
|
|
|
10
10
|
{ ssr: false }
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
-
export const RichTextEditor = ({html, onSave, isDisabled = false}) => {
|
|
13
|
+
export const RichTextEditor = ({html, onSave, height = 400, isDisabled = false}) => {
|
|
14
14
|
|
|
15
15
|
const [editorState, setEditorState] = useState(EditorState.createEmpty());
|
|
16
16
|
const onEditorStateChange = function (editorState) {
|
|
@@ -39,7 +39,7 @@ const Editor = dynamic(
|
|
|
39
39
|
wrapperClassName="wrapperClassName"
|
|
40
40
|
editorClassName="editorClassName"
|
|
41
41
|
readOnly={isDisabled}
|
|
42
|
-
editorStyle={{height:
|
|
42
|
+
editorStyle={{height:height}}
|
|
43
43
|
onEditorStateChange={onEditorStateChange}
|
|
44
44
|
// mention={{
|
|
45
45
|
// separator: " ",
|
|
@@ -8,7 +8,7 @@ const setupDefaultOptions = async (ctx = null) => {
|
|
|
8
8
|
let defaultOptions = {};
|
|
9
9
|
if (ctx == null)
|
|
10
10
|
{
|
|
11
|
-
let accessToken =
|
|
11
|
+
let accessToken = Cookies.get('access_token') || '';
|
|
12
12
|
|
|
13
13
|
if (accessToken !== null && accessToken !== undefined && accessToken != "") {
|
|
14
14
|
defaultOptions = {
|
|
@@ -37,8 +37,8 @@ const setupDefaultOptions = async (ctx = null) => {
|
|
|
37
37
|
|
|
38
38
|
const RefreshToken = async (originalRequest, instance) => {
|
|
39
39
|
|
|
40
|
-
let accessToken =
|
|
41
|
-
let refreshToken =
|
|
40
|
+
let accessToken = Cookies.get('access_token') || '';
|
|
41
|
+
let refreshToken = Cookies.get('refresh_token') || '';
|
|
42
42
|
|
|
43
43
|
let response = await instance.post(process.env.authorityUri + "/connect/token",
|
|
44
44
|
querystring.stringify({
|
|
@@ -62,22 +62,22 @@ const RefreshToken = async (originalRequest, instance) => {
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
await
|
|
66
|
-
maxAge:
|
|
65
|
+
await setCookie('access_token', response.data.access_token, {
|
|
66
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
67
67
|
path: '/',
|
|
68
68
|
domain: domainHost,
|
|
69
69
|
secure: true
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
await
|
|
73
|
-
maxAge:
|
|
72
|
+
await setCookie('expires_in', response.data.expires_in, {
|
|
73
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
74
74
|
path: '/',
|
|
75
75
|
domain: domainHost,
|
|
76
76
|
secure: true
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
await
|
|
80
|
-
maxAge:
|
|
79
|
+
await setCookie('refresh_token', response.data.refresh_token, {
|
|
80
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
81
81
|
path: '/',
|
|
82
82
|
domain: domainHost,
|
|
83
83
|
secure: true
|
|
@@ -154,9 +154,9 @@ export const apiService = (ctx = null) => {
|
|
|
154
154
|
let domainHost = window.location.hostname.split('.').slice(-2).join('.');
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
Cookies.remove('access_token', { path: '/', domain: domainHost });
|
|
158
|
+
Cookies.remove('refresh_token', { path: '/', domain: domainHost });
|
|
159
|
+
Cookies.remove('expires_in', { path: '/', domain: domainHost });
|
|
160
160
|
|
|
161
161
|
// destroyCookie(null, "access_token", {
|
|
162
162
|
// maxAge: 2147483647,
|
|
@@ -117,9 +117,9 @@ export const authService = () => {
|
|
|
117
117
|
let AuthUri = process.env.authorityUri;
|
|
118
118
|
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
Cookies.remove('access_token', { path: '/', domain: domainHost });
|
|
121
|
+
Cookies.remove('refresh_token', { path: '/', domain: domainHost });
|
|
122
|
+
Cookies.remove('expires_in', { path: '/', domain: domainHost });
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
// destroyCookie({}, "access_token", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import querystring from "query-string";
|
|
4
|
-
import Cookies from 'js-cookie';
|
|
4
|
+
// import Cookies from 'js-cookie';
|
|
5
5
|
|
|
6
6
|
export const signInValidator = async (queryCode) => {
|
|
7
7
|
|
|
@@ -28,22 +28,22 @@ export const signInValidator = async (queryCode) => {
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
await
|
|
32
|
-
maxAge:
|
|
31
|
+
await setCookie('access_token', response.data.access_token, {
|
|
32
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
33
33
|
path: '/',
|
|
34
34
|
domain: domainHost,
|
|
35
35
|
secure: true
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
await
|
|
39
|
-
maxAge:
|
|
38
|
+
await setCookie('expires_in', response.data.expires_in, {
|
|
39
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
40
40
|
path: '/',
|
|
41
41
|
domain: domainHost,
|
|
42
42
|
secure: true
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
await
|
|
46
|
-
maxAge:
|
|
45
|
+
await setCookie('refresh_token', response.data.refresh_token, {
|
|
46
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year,
|
|
47
47
|
path: '/',
|
|
48
48
|
domain: domainHost,
|
|
49
49
|
secure: true
|
package/src/services/util.js
CHANGED
|
@@ -2,4 +2,26 @@ import React, { useState, useRef, useEffect } from "react";
|
|
|
2
2
|
|
|
3
3
|
export const GetBaseUrl = () => {
|
|
4
4
|
return window.location.protocol + "//" + window.location.host;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const setCookie = (name, value, options = {}) => {
|
|
8
|
+
return new Promise((resolve) => {
|
|
9
|
+
let cookieString = `${name}=${value};`;
|
|
10
|
+
|
|
11
|
+
if (options.maxAge) {
|
|
12
|
+
cookieString += `max-age=${options.maxAge};`;
|
|
13
|
+
}
|
|
14
|
+
if (options.path) {
|
|
15
|
+
cookieString += `path=${options.path};`;
|
|
16
|
+
}
|
|
17
|
+
if (options.domain) {
|
|
18
|
+
cookieString += `domain=${options.domain};`;
|
|
19
|
+
}
|
|
20
|
+
if (options.secure) {
|
|
21
|
+
cookieString += `secure;`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
document.cookie = cookieString;
|
|
25
|
+
resolve();
|
|
26
|
+
});
|
|
27
|
+
}
|