@bringg/dashboard-sdk 9.55.0 → 9.57.0
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/BringgDashboardSDK.d.ts +2 -0
- package/dist/BringgDashboardSDK.js +2 -0
- package/dist/BringgDashboardSDK.js.map +1 -1
- package/dist/CapacityPlanningInsights/CapacityInsightsApi.d.ts +13 -0
- package/dist/CapacityPlanningInsights/CapacityInsightsApi.js +165 -0
- package/dist/CapacityPlanningInsights/CapacityInsightsApi.js.map +1 -0
- package/dist/CapacityPlanningInsights/Entity/CapacityInsightsEntity.d.ts +10 -0
- package/dist/CapacityPlanningInsights/Entity/CapacityInsightsEntity.js +120 -0
- package/dist/CapacityPlanningInsights/Entity/CapacityInsightsEntity.js.map +1 -0
- package/dist/CapacityPlanningInsights/types.d.ts +21 -0
- package/dist/CapacityPlanningInsights/types.js +3 -0
- package/dist/CapacityPlanningInsights/types.js.map +1 -0
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/User/Store/UsersStore.d.ts +2 -0
- package/dist/User/Store/UsersStore.js +89 -38
- package/dist/User/Store/UsersStore.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +982 -41
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +211 -12
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +3 -3
|
@@ -2686,6 +2686,7 @@ var ApplicationMerchantConfigurationApi_1 = __importDefault(__webpack_require__(
|
|
|
2686
2686
|
var ApplicationTeamConfigurationApi_1 = __importDefault(__webpack_require__(59306));
|
|
2687
2687
|
var AsyncOperationStatus_1 = __webpack_require__(37360);
|
|
2688
2688
|
var BillingApi_1 = __importDefault(__webpack_require__(25475));
|
|
2689
|
+
var CapacityInsightsApi_1 = __importDefault(__webpack_require__(75494));
|
|
2689
2690
|
var Chat_1 = __importDefault(__webpack_require__(17629));
|
|
2690
2691
|
var ChatConversationApi_1 = __importDefault(__webpack_require__(74617));
|
|
2691
2692
|
var Company_1 = __importDefault(__webpack_require__(97275));
|
|
@@ -3189,6 +3190,7 @@ function init(session) {
|
|
|
3189
3190
|
bringg.orderExecutionActions = new order_execution_actions_api_1.default(session);
|
|
3190
3191
|
bringg.presetViews = new preset_views_api_1.default(session);
|
|
3191
3192
|
bringg.userPresetViews = new user_preset_views_api_1.default(session);
|
|
3193
|
+
bringg.capacityInsights = new CapacityInsightsApi_1.default(session);
|
|
3192
3194
|
// dependent
|
|
3193
3195
|
bringg.crews = new Crew_1.default(session, bringg.users);
|
|
3194
3196
|
bringg.applicationMerchantConfiguration = new ApplicationMerchantConfigurationApi_1.default(session, bringg.merchantConfiguration);
|
|
@@ -3356,6 +3358,305 @@ exports.newConfigurationProvider = newConfigurationProvider;
|
|
|
3356
3358
|
|
|
3357
3359
|
/***/ }),
|
|
3358
3360
|
|
|
3361
|
+
/***/ 75494:
|
|
3362
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3363
|
+
|
|
3364
|
+
"use strict";
|
|
3365
|
+
|
|
3366
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3367
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3368
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3369
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
3370
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
3371
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
3372
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3373
|
+
});
|
|
3374
|
+
};
|
|
3375
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
3376
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
3377
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
3378
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
3379
|
+
function step(op) {
|
|
3380
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
3381
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
3382
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
3383
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
3384
|
+
switch (op[0]) {
|
|
3385
|
+
case 0: case 1: t = op; break;
|
|
3386
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
3387
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
3388
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
3389
|
+
default:
|
|
3390
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
3391
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
3392
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
3393
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
3394
|
+
if (t[2]) _.ops.pop();
|
|
3395
|
+
_.trys.pop(); continue;
|
|
3396
|
+
}
|
|
3397
|
+
op = body.call(thisArg, _);
|
|
3398
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
3399
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
3400
|
+
}
|
|
3401
|
+
};
|
|
3402
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3403
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3404
|
+
if (!m) return o;
|
|
3405
|
+
var i = m.call(o), r, ar = [], e;
|
|
3406
|
+
try {
|
|
3407
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
3408
|
+
}
|
|
3409
|
+
catch (error) { e = { error: error }; }
|
|
3410
|
+
finally {
|
|
3411
|
+
try {
|
|
3412
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
3413
|
+
}
|
|
3414
|
+
finally { if (e) throw e.error; }
|
|
3415
|
+
}
|
|
3416
|
+
return ar;
|
|
3417
|
+
};
|
|
3418
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3419
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3420
|
+
if (ar || !(i in from)) {
|
|
3421
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
3422
|
+
ar[i] = from[i];
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
3426
|
+
};
|
|
3427
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3428
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3429
|
+
};
|
|
3430
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3431
|
+
var moment_1 = __importDefault(__webpack_require__(30381));
|
|
3432
|
+
var CapacityInsightsEntity_1 = __importDefault(__webpack_require__(53948));
|
|
3433
|
+
var DATE_FORMAT = 'YYYY-MM-DD';
|
|
3434
|
+
var CapacityInsightsApi = /** @class */ (function () {
|
|
3435
|
+
function CapacityInsightsApi(session) {
|
|
3436
|
+
this.capacityInsightsEntity = new CapacityInsightsEntity_1.default(session);
|
|
3437
|
+
}
|
|
3438
|
+
CapacityInsightsApi.prototype.getInsightCount = function (params) {
|
|
3439
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3440
|
+
return __generator(this, function (_a) {
|
|
3441
|
+
return [2 /*return*/, this.capacityInsightsEntity.getInsightCount(params)];
|
|
3442
|
+
});
|
|
3443
|
+
});
|
|
3444
|
+
};
|
|
3445
|
+
CapacityInsightsApi.prototype.getInsights = function (params) {
|
|
3446
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3447
|
+
return __generator(this, function (_a) {
|
|
3448
|
+
return [2 /*return*/, this.capacityInsightsEntity.getInsights(params)];
|
|
3449
|
+
});
|
|
3450
|
+
});
|
|
3451
|
+
};
|
|
3452
|
+
CapacityInsightsApi.prototype.updateInsightDone = function (params) {
|
|
3453
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3454
|
+
return __generator(this, function (_a) {
|
|
3455
|
+
return [2 /*return*/, this.capacityInsightsEntity.updateInsightDone(params)];
|
|
3456
|
+
});
|
|
3457
|
+
});
|
|
3458
|
+
};
|
|
3459
|
+
CapacityInsightsApi.prototype.getInsightsForDates = function (dates, teamId) {
|
|
3460
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3461
|
+
var sortedDates, dateStart, dateEnd, insights, insightsByDate;
|
|
3462
|
+
return __generator(this, function (_a) {
|
|
3463
|
+
switch (_a.label) {
|
|
3464
|
+
case 0:
|
|
3465
|
+
if (dates.length === 0) {
|
|
3466
|
+
return [2 /*return*/, {}];
|
|
3467
|
+
}
|
|
3468
|
+
sortedDates = __spreadArray([], __read(dates), false).sort(function (a, b) { return a.valueOf() - b.valueOf(); });
|
|
3469
|
+
dateStart = sortedDates[0].format(DATE_FORMAT);
|
|
3470
|
+
dateEnd = sortedDates[sortedDates.length - 1].format(DATE_FORMAT);
|
|
3471
|
+
return [4 /*yield*/, this.getInsights({
|
|
3472
|
+
teamId: teamId,
|
|
3473
|
+
dateStart: dateStart,
|
|
3474
|
+
dateEnd: dateEnd
|
|
3475
|
+
})];
|
|
3476
|
+
case 1:
|
|
3477
|
+
insights = _a.sent();
|
|
3478
|
+
insightsByDate = {};
|
|
3479
|
+
dates.forEach(function (date) {
|
|
3480
|
+
var dateString = date.format(DATE_FORMAT);
|
|
3481
|
+
insightsByDate[dateString] = insights.filter(function (insight) {
|
|
3482
|
+
var insightDate = (0, moment_1.default)(insight.scheduled_date).format(DATE_FORMAT);
|
|
3483
|
+
return insightDate === dateString;
|
|
3484
|
+
});
|
|
3485
|
+
});
|
|
3486
|
+
return [2 /*return*/, insightsByDate];
|
|
3487
|
+
}
|
|
3488
|
+
});
|
|
3489
|
+
});
|
|
3490
|
+
};
|
|
3491
|
+
CapacityInsightsApi.prototype.getInsightCountsForTeams = function (teamIds, dateStart, dateEnd) {
|
|
3492
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3493
|
+
var BATCH_SIZE, countsMap, i, batch, response;
|
|
3494
|
+
return __generator(this, function (_a) {
|
|
3495
|
+
switch (_a.label) {
|
|
3496
|
+
case 0:
|
|
3497
|
+
if (teamIds.length === 0) {
|
|
3498
|
+
return [2 /*return*/, new Map()];
|
|
3499
|
+
}
|
|
3500
|
+
BATCH_SIZE = 100;
|
|
3501
|
+
countsMap = new Map();
|
|
3502
|
+
i = 0;
|
|
3503
|
+
_a.label = 1;
|
|
3504
|
+
case 1:
|
|
3505
|
+
if (!(i < teamIds.length)) return [3 /*break*/, 4];
|
|
3506
|
+
batch = teamIds.slice(i, i + BATCH_SIZE);
|
|
3507
|
+
return [4 /*yield*/, this.getInsightCount({
|
|
3508
|
+
teamIds: batch,
|
|
3509
|
+
dateStart: dateStart.format(DATE_FORMAT),
|
|
3510
|
+
dateEnd: dateEnd.format(DATE_FORMAT)
|
|
3511
|
+
})];
|
|
3512
|
+
case 2:
|
|
3513
|
+
response = _a.sent();
|
|
3514
|
+
response.forEach(function (item) {
|
|
3515
|
+
countsMap.set(item.team_id, item.insight_count);
|
|
3516
|
+
});
|
|
3517
|
+
_a.label = 3;
|
|
3518
|
+
case 3:
|
|
3519
|
+
i += BATCH_SIZE;
|
|
3520
|
+
return [3 /*break*/, 1];
|
|
3521
|
+
case 4: return [2 /*return*/, countsMap];
|
|
3522
|
+
}
|
|
3523
|
+
});
|
|
3524
|
+
});
|
|
3525
|
+
};
|
|
3526
|
+
return CapacityInsightsApi;
|
|
3527
|
+
}());
|
|
3528
|
+
exports["default"] = CapacityInsightsApi;
|
|
3529
|
+
//# sourceMappingURL=CapacityInsightsApi.js.map
|
|
3530
|
+
|
|
3531
|
+
/***/ }),
|
|
3532
|
+
|
|
3533
|
+
/***/ 53948:
|
|
3534
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3535
|
+
|
|
3536
|
+
"use strict";
|
|
3537
|
+
|
|
3538
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3539
|
+
var extendStatics = function (d, b) {
|
|
3540
|
+
extendStatics = Object.setPrototypeOf ||
|
|
3541
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
3542
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
3543
|
+
return extendStatics(d, b);
|
|
3544
|
+
};
|
|
3545
|
+
return function (d, b) {
|
|
3546
|
+
if (typeof b !== "function" && b !== null)
|
|
3547
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
3548
|
+
extendStatics(d, b);
|
|
3549
|
+
function __() { this.constructor = d; }
|
|
3550
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3551
|
+
};
|
|
3552
|
+
})();
|
|
3553
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3554
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3555
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3556
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
3557
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
3558
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
3559
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3560
|
+
});
|
|
3561
|
+
};
|
|
3562
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
3563
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
3564
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
3565
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
3566
|
+
function step(op) {
|
|
3567
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
3568
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
3569
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
3570
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
3571
|
+
switch (op[0]) {
|
|
3572
|
+
case 0: case 1: t = op; break;
|
|
3573
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
3574
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
3575
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
3576
|
+
default:
|
|
3577
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
3578
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
3579
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
3580
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
3581
|
+
if (t[2]) _.ops.pop();
|
|
3582
|
+
_.trys.pop(); continue;
|
|
3583
|
+
}
|
|
3584
|
+
op = body.call(thisArg, _);
|
|
3585
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
3586
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
3587
|
+
}
|
|
3588
|
+
};
|
|
3589
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3590
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3591
|
+
};
|
|
3592
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3593
|
+
var Entity_1 = __importDefault(__webpack_require__(7483));
|
|
3594
|
+
var CapacityInsightsEntity = /** @class */ (function (_super) {
|
|
3595
|
+
__extends(CapacityInsightsEntity, _super);
|
|
3596
|
+
function CapacityInsightsEntity(session) {
|
|
3597
|
+
return _super.call(this, {
|
|
3598
|
+
session: session,
|
|
3599
|
+
entityName: 'insights',
|
|
3600
|
+
routePrefix: 'capacity-planning-service'
|
|
3601
|
+
}) || this;
|
|
3602
|
+
}
|
|
3603
|
+
CapacityInsightsEntity.prototype.getInsightCount = function (params) {
|
|
3604
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3605
|
+
var queryParams;
|
|
3606
|
+
return __generator(this, function (_a) {
|
|
3607
|
+
queryParams = {
|
|
3608
|
+
team_ids: params.teamIds,
|
|
3609
|
+
date_start: params.dateStart,
|
|
3610
|
+
date_end: params.dateEnd
|
|
3611
|
+
};
|
|
3612
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
3613
|
+
.get('/count')
|
|
3614
|
+
.withQueryString(queryParams)
|
|
3615
|
+
.setException('Failed to fetch insight count')
|
|
3616
|
+
.invoke()];
|
|
3617
|
+
});
|
|
3618
|
+
});
|
|
3619
|
+
};
|
|
3620
|
+
CapacityInsightsEntity.prototype.getInsights = function (params) {
|
|
3621
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3622
|
+
var queryParams;
|
|
3623
|
+
return __generator(this, function (_a) {
|
|
3624
|
+
queryParams = {
|
|
3625
|
+
team_id: params.teamId.toString(),
|
|
3626
|
+
date_start: params.dateStart,
|
|
3627
|
+
date_end: params.dateEnd
|
|
3628
|
+
};
|
|
3629
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
3630
|
+
.get('/')
|
|
3631
|
+
.withQueryString(queryParams)
|
|
3632
|
+
.setException('Failed to fetch insights')
|
|
3633
|
+
.invoke()];
|
|
3634
|
+
});
|
|
3635
|
+
});
|
|
3636
|
+
};
|
|
3637
|
+
CapacityInsightsEntity.prototype.updateInsightDone = function (params) {
|
|
3638
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3639
|
+
var formParams;
|
|
3640
|
+
return __generator(this, function (_a) {
|
|
3641
|
+
formParams = new URLSearchParams();
|
|
3642
|
+
formParams.append('done', params.done.toString());
|
|
3643
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
3644
|
+
.put('/{:insightId}/done')
|
|
3645
|
+
.withRouteParams({ insightId: params.insightId.toString() })
|
|
3646
|
+
.withPayload(formParams.toString())
|
|
3647
|
+
.withHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' })
|
|
3648
|
+
.setException('Failed to update insight done status')
|
|
3649
|
+
.invoke()];
|
|
3650
|
+
});
|
|
3651
|
+
});
|
|
3652
|
+
};
|
|
3653
|
+
return CapacityInsightsEntity;
|
|
3654
|
+
}(Entity_1.default));
|
|
3655
|
+
exports["default"] = CapacityInsightsEntity;
|
|
3656
|
+
//# sourceMappingURL=CapacityInsightsEntity.js.map
|
|
3657
|
+
|
|
3658
|
+
/***/ }),
|
|
3659
|
+
|
|
3359
3660
|
/***/ 17629:
|
|
3360
3661
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3361
3662
|
|
|
@@ -22426,7 +22727,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
22426
22727
|
var BringgException_1 = __webpack_require__(43605);
|
|
22427
22728
|
var Logger_1 = __importDefault(__webpack_require__(55860));
|
|
22428
22729
|
var abort_1 = __webpack_require__(34179);
|
|
22429
|
-
var version = '9.
|
|
22730
|
+
var version = '9.57.0';
|
|
22430
22731
|
function logErrorResponse(response) {
|
|
22431
22732
|
var data = response.data, status = response.status;
|
|
22432
22733
|
try {
|
|
@@ -29118,8 +29419,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29118
29419
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29119
29420
|
};
|
|
29120
29421
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
29422
|
+
exports.MAX_CONCURRENT_CHUNKED_REQUESTS = exports.DEFAULT_CHUNK_SIZE = void 0;
|
|
29121
29423
|
var types_1 = __webpack_require__(63127);
|
|
29122
|
-
var
|
|
29424
|
+
var chunk_1 = __importDefault(__webpack_require__(8400));
|
|
29425
|
+
var forEach_1 = __importDefault(__webpack_require__(84486));
|
|
29426
|
+
var last_1 = __importDefault(__webpack_require__(10928));
|
|
29123
29427
|
var rxjs_1 = __webpack_require__(34143);
|
|
29124
29428
|
var operators_1 = __webpack_require__(11717);
|
|
29125
29429
|
var BaseStore_1 = __importDefault(__webpack_require__(14436));
|
|
@@ -29127,6 +29431,9 @@ var UsersService_1 = __importDefault(__webpack_require__(95401));
|
|
|
29127
29431
|
var User_consts_1 = __webpack_require__(38894);
|
|
29128
29432
|
var UserHelpers_1 = __webpack_require__(2450);
|
|
29129
29433
|
var THROTTLE_TIME = 500;
|
|
29434
|
+
var MIN_INTERVAL_BETWEEN_CHUNKED_REQUESTS = 300;
|
|
29435
|
+
exports.DEFAULT_CHUNK_SIZE = 50;
|
|
29436
|
+
exports.MAX_CONCURRENT_CHUNKED_REQUESTS = 4;
|
|
29130
29437
|
var UsersStore = /** @class */ (function (_super) {
|
|
29131
29438
|
__extends(UsersStore, _super);
|
|
29132
29439
|
function UsersStore(session, throttleTimeValue) {
|
|
@@ -29323,7 +29630,7 @@ var UsersStore = /** @class */ (function (_super) {
|
|
|
29323
29630
|
case 0: return [4 /*yield*/, this.usersService.getAll(page, limit)];
|
|
29324
29631
|
case 1:
|
|
29325
29632
|
response = _a.sent();
|
|
29326
|
-
(0,
|
|
29633
|
+
(0, forEach_1.default)(response.users, function (user) { return (_this.getItem(user.id) ? _this.updateInStore(user) : _this.addToStore(user)); });
|
|
29327
29634
|
return [2 /*return*/, response];
|
|
29328
29635
|
}
|
|
29329
29636
|
});
|
|
@@ -29338,7 +29645,7 @@ var UsersStore = /** @class */ (function (_super) {
|
|
|
29338
29645
|
case 0: return [4 /*yield*/, this.usersService.getAllKeysetPagination(request)];
|
|
29339
29646
|
case 1:
|
|
29340
29647
|
response = _a.sent();
|
|
29341
|
-
(0,
|
|
29648
|
+
(0, forEach_1.default)(response.users, function (user) { return (_this.getItem(user.id) ? _this.updateInStore(user) : _this.addToStore(user)); });
|
|
29342
29649
|
this.initGroups(this.getItems());
|
|
29343
29650
|
return [2 /*return*/, response];
|
|
29344
29651
|
}
|
|
@@ -29531,46 +29838,91 @@ var UsersStore = /** @class */ (function (_super) {
|
|
|
29531
29838
|
};
|
|
29532
29839
|
UsersStore.prototype.getMany = function (ids, commonOptions) {
|
|
29533
29840
|
return __awaiter(this, void 0, void 0, function () {
|
|
29534
|
-
var
|
|
29841
|
+
var idsSet, uniqIds, foundItems, missingIds, missingUsers, missingIdsChunks, concurrentChunks, concurrentChunks_1, concurrentChunks_1_1, concurrentChunk, promises, rejectReason, results, results_1, results_1_1, result, users, e_8_1;
|
|
29842
|
+
var e_8, _a, e_9, _b;
|
|
29535
29843
|
var _this = this;
|
|
29536
|
-
return __generator(this, function (
|
|
29537
|
-
switch (
|
|
29844
|
+
return __generator(this, function (_c) {
|
|
29845
|
+
switch (_c.label) {
|
|
29538
29846
|
case 0:
|
|
29539
|
-
foundedItems = this.getItemsByIds(ids);
|
|
29540
|
-
if (foundedItems.length === ids.length) {
|
|
29541
|
-
return [2 /*return*/, foundedItems];
|
|
29542
|
-
}
|
|
29543
29847
|
idsSet = new Set(ids);
|
|
29544
|
-
|
|
29848
|
+
uniqIds = Array.from(idsSet);
|
|
29849
|
+
foundItems = this.getItemsByIds(uniqIds);
|
|
29850
|
+
if (foundItems.length === uniqIds.length) {
|
|
29851
|
+
return [2 /*return*/, foundItems];
|
|
29852
|
+
}
|
|
29853
|
+
foundItems.forEach(function (user) { return idsSet.delete(user.id); });
|
|
29545
29854
|
missingIds = Array.from(idsSet);
|
|
29546
|
-
|
|
29547
|
-
|
|
29548
|
-
|
|
29549
|
-
|
|
29550
|
-
return __generator(this, function (_a) {
|
|
29551
|
-
switch (_a.label) {
|
|
29552
|
-
case 0: return [4 /*yield*/, this.usersService.getMany({
|
|
29553
|
-
usersIds: missingIds,
|
|
29554
|
-
page: page,
|
|
29555
|
-
limit: 50
|
|
29556
|
-
}, commonOptions)];
|
|
29557
|
-
case 1:
|
|
29558
|
-
response = _a.sent();
|
|
29559
|
-
fetchedUsers = response.users;
|
|
29560
|
-
// Adding here and not after getting all, so we won't stop the event loop for too long, if we have a lot
|
|
29561
|
-
this.addItems(fetchedUsers);
|
|
29562
|
-
return [2 /*return*/, {
|
|
29563
|
-
values: fetchedUsers,
|
|
29564
|
-
hasMore: response.has_next_page,
|
|
29565
|
-
nextCursor: page + 1
|
|
29566
|
-
}];
|
|
29567
|
-
}
|
|
29568
|
-
});
|
|
29569
|
-
});
|
|
29570
|
-
}, { signal: commonOptions === null || commonOptions === void 0 ? void 0 : commonOptions.signal })];
|
|
29855
|
+
missingUsers = [];
|
|
29856
|
+
missingIdsChunks = (0, chunk_1.default)(missingIds, exports.DEFAULT_CHUNK_SIZE);
|
|
29857
|
+
concurrentChunks = (0, chunk_1.default)(missingIdsChunks, exports.MAX_CONCURRENT_CHUNKED_REQUESTS);
|
|
29858
|
+
_c.label = 1;
|
|
29571
29859
|
case 1:
|
|
29572
|
-
|
|
29573
|
-
|
|
29860
|
+
_c.trys.push([1, 6, 7, 8]);
|
|
29861
|
+
concurrentChunks_1 = __values(concurrentChunks), concurrentChunks_1_1 = concurrentChunks_1.next();
|
|
29862
|
+
_c.label = 2;
|
|
29863
|
+
case 2:
|
|
29864
|
+
if (!!concurrentChunks_1_1.done) return [3 /*break*/, 5];
|
|
29865
|
+
concurrentChunk = concurrentChunks_1_1.value;
|
|
29866
|
+
promises = concurrentChunk.map(function (idsChunk) { return __awaiter(_this, void 0, void 0, function () {
|
|
29867
|
+
var chunkResult;
|
|
29868
|
+
return __generator(this, function (_a) {
|
|
29869
|
+
switch (_a.label) {
|
|
29870
|
+
case 0: return [4 /*yield*/, this.usersService.getMany({ usersIds: idsChunk }, commonOptions)];
|
|
29871
|
+
case 1:
|
|
29872
|
+
chunkResult = _a.sent();
|
|
29873
|
+
return [2 /*return*/, chunkResult.users];
|
|
29874
|
+
}
|
|
29875
|
+
});
|
|
29876
|
+
}); });
|
|
29877
|
+
// Rate limit to one set of requests per MIN_INTERVAL_BETWEEN_CHUNKED_REQUESTS
|
|
29878
|
+
if (concurrentChunk !== (0, last_1.default)(concurrentChunks)) {
|
|
29879
|
+
promises.push(new Promise(function (resolve) { return setTimeout(function () { return resolve([]); }, MIN_INTERVAL_BETWEEN_CHUNKED_REQUESTS); }));
|
|
29880
|
+
}
|
|
29881
|
+
rejectReason = null;
|
|
29882
|
+
return [4 /*yield*/, Promise.allSettled(promises)];
|
|
29883
|
+
case 3:
|
|
29884
|
+
results = _c.sent();
|
|
29885
|
+
try {
|
|
29886
|
+
for (results_1 = (e_9 = void 0, __values(results)), results_1_1 = results_1.next(); !results_1_1.done; results_1_1 = results_1.next()) {
|
|
29887
|
+
result = results_1_1.value;
|
|
29888
|
+
if (result.status === 'fulfilled') {
|
|
29889
|
+
users = result.value;
|
|
29890
|
+
missingUsers.push.apply(missingUsers, __spreadArray([], __read(users), false));
|
|
29891
|
+
this.addItems(users);
|
|
29892
|
+
}
|
|
29893
|
+
else {
|
|
29894
|
+
if (!rejectReason) {
|
|
29895
|
+
rejectReason = result.reason;
|
|
29896
|
+
}
|
|
29897
|
+
}
|
|
29898
|
+
}
|
|
29899
|
+
}
|
|
29900
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
29901
|
+
finally {
|
|
29902
|
+
try {
|
|
29903
|
+
if (results_1_1 && !results_1_1.done && (_b = results_1.return)) _b.call(results_1);
|
|
29904
|
+
}
|
|
29905
|
+
finally { if (e_9) throw e_9.error; }
|
|
29906
|
+
}
|
|
29907
|
+
if (rejectReason) {
|
|
29908
|
+
throw rejectReason;
|
|
29909
|
+
}
|
|
29910
|
+
_c.label = 4;
|
|
29911
|
+
case 4:
|
|
29912
|
+
concurrentChunks_1_1 = concurrentChunks_1.next();
|
|
29913
|
+
return [3 /*break*/, 2];
|
|
29914
|
+
case 5: return [3 /*break*/, 8];
|
|
29915
|
+
case 6:
|
|
29916
|
+
e_8_1 = _c.sent();
|
|
29917
|
+
e_8 = { error: e_8_1 };
|
|
29918
|
+
return [3 /*break*/, 8];
|
|
29919
|
+
case 7:
|
|
29920
|
+
try {
|
|
29921
|
+
if (concurrentChunks_1_1 && !concurrentChunks_1_1.done && (_a = concurrentChunks_1.return)) _a.call(concurrentChunks_1);
|
|
29922
|
+
}
|
|
29923
|
+
finally { if (e_8) throw e_8.error; }
|
|
29924
|
+
return [7 /*endfinally*/];
|
|
29925
|
+
case 8: return [2 /*return*/, foundItems.concat(missingUsers)];
|
|
29574
29926
|
}
|
|
29575
29927
|
});
|
|
29576
29928
|
});
|
|
@@ -35730,12 +36082,14 @@ __exportStar(__webpack_require__(21434), exports);
|
|
|
35730
36082
|
__exportStar(__webpack_require__(65111), exports);
|
|
35731
36083
|
__exportStar(__webpack_require__(91758), exports);
|
|
35732
36084
|
__exportStar(__webpack_require__(72285), exports);
|
|
36085
|
+
__exportStar(__webpack_require__(6533), exports);
|
|
35733
36086
|
__exportStar(__webpack_require__(68734), exports);
|
|
35734
36087
|
__exportStar(__webpack_require__(37443), exports);
|
|
35735
36088
|
__exportStar(__webpack_require__(51837), exports);
|
|
35736
36089
|
__exportStar(__webpack_require__(55936), exports);
|
|
35737
36090
|
__exportStar(__webpack_require__(58466), exports);
|
|
35738
36091
|
__exportStar(__webpack_require__(14570), exports);
|
|
36092
|
+
__exportStar(__webpack_require__(29384), exports);
|
|
35739
36093
|
__exportStar(__webpack_require__(97935), exports);
|
|
35740
36094
|
__exportStar(__webpack_require__(18980), exports);
|
|
35741
36095
|
__exportStar(__webpack_require__(15632), exports);
|
|
@@ -35803,6 +36157,7 @@ __exportStar(__webpack_require__(69786), exports);
|
|
|
35803
36157
|
__exportStar(__webpack_require__(52632), exports);
|
|
35804
36158
|
__exportStar(__webpack_require__(87907), exports);
|
|
35805
36159
|
__exportStar(__webpack_require__(97868), exports);
|
|
36160
|
+
__exportStar(__webpack_require__(5220), exports);
|
|
35806
36161
|
__exportStar(__webpack_require__(96425), exports);
|
|
35807
36162
|
__exportStar(__webpack_require__(89220), exports);
|
|
35808
36163
|
__exportStar(__webpack_require__(70242), exports);
|
|
@@ -35814,6 +36169,7 @@ __exportStar(__webpack_require__(87785), exports);
|
|
|
35814
36169
|
__exportStar(__webpack_require__(63413), exports);
|
|
35815
36170
|
__exportStar(__webpack_require__(10228), exports);
|
|
35816
36171
|
__exportStar(__webpack_require__(53543), exports);
|
|
36172
|
+
__exportStar(__webpack_require__(78048), exports);
|
|
35817
36173
|
__exportStar(__webpack_require__(2730), exports);
|
|
35818
36174
|
__exportStar(__webpack_require__(56526), exports);
|
|
35819
36175
|
exports.RouteOptimizer = __webpack_require__(44336);
|
|
@@ -35849,6 +36205,7 @@ __exportStar(__webpack_require__(686), exports);
|
|
|
35849
36205
|
__exportStar(__webpack_require__(23400), exports);
|
|
35850
36206
|
__exportStar(__webpack_require__(67175), exports);
|
|
35851
36207
|
__exportStar(__webpack_require__(46347), exports);
|
|
36208
|
+
__exportStar(__webpack_require__(70467), exports);
|
|
35852
36209
|
__exportStar(__webpack_require__(43048), exports);
|
|
35853
36210
|
__exportStar(__webpack_require__(41164), exports);
|
|
35854
36211
|
__exportStar(__webpack_require__(25443), exports);
|
|
@@ -37205,6 +37562,82 @@ var LOGIN_ERRORS;
|
|
|
37205
37562
|
|
|
37206
37563
|
/***/ }),
|
|
37207
37564
|
|
|
37565
|
+
/***/ 10870:
|
|
37566
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
37567
|
+
|
|
37568
|
+
"use strict";
|
|
37569
|
+
|
|
37570
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
37571
|
+
exports.CapacityPlanningServiceRpcAction = void 0;
|
|
37572
|
+
var CapacityPlanningServiceRpcAction;
|
|
37573
|
+
(function (CapacityPlanningServiceRpcAction) {
|
|
37574
|
+
CapacityPlanningServiceRpcAction["GET_INSIGHTS_BY_OPTIMIZATION_REQUESTS_UUIDS"] = "get_insights_by_optimizations_request_uuids";
|
|
37575
|
+
})(CapacityPlanningServiceRpcAction || (exports.CapacityPlanningServiceRpcAction = CapacityPlanningServiceRpcAction = {}));
|
|
37576
|
+
//# sourceMappingURL=capacity-planning-service-rpc-client.js.map
|
|
37577
|
+
|
|
37578
|
+
/***/ }),
|
|
37579
|
+
|
|
37580
|
+
/***/ 48711:
|
|
37581
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
37582
|
+
|
|
37583
|
+
"use strict";
|
|
37584
|
+
|
|
37585
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
37586
|
+
exports.CapacityPlanningSeverity = exports.CapacityPlanningActionType = exports.CapacityPlanningProblems = exports.CapacityPlanningKPIs = void 0;
|
|
37587
|
+
var CapacityPlanningKPIs;
|
|
37588
|
+
(function (CapacityPlanningKPIs) {
|
|
37589
|
+
CapacityPlanningKPIs[CapacityPlanningKPIs["AdditionalShipments"] = 0] = "AdditionalShipments";
|
|
37590
|
+
CapacityPlanningKPIs[CapacityPlanningKPIs["ServiceCoverage"] = 1] = "ServiceCoverage";
|
|
37591
|
+
})(CapacityPlanningKPIs || (exports.CapacityPlanningKPIs = CapacityPlanningKPIs = {}));
|
|
37592
|
+
var CapacityPlanningProblems;
|
|
37593
|
+
(function (CapacityPlanningProblems) {
|
|
37594
|
+
CapacityPlanningProblems[CapacityPlanningProblems["UnassignedOrders"] = 0] = "UnassignedOrders";
|
|
37595
|
+
CapacityPlanningProblems[CapacityPlanningProblems["NoService"] = 1] = "NoService";
|
|
37596
|
+
CapacityPlanningProblems[CapacityPlanningProblems["LowResources"] = 2] = "LowResources";
|
|
37597
|
+
CapacityPlanningProblems[CapacityPlanningProblems["CapacityLimitation"] = 3] = "CapacityLimitation";
|
|
37598
|
+
CapacityPlanningProblems[CapacityPlanningProblems["UnderUtilization"] = 4] = "UnderUtilization";
|
|
37599
|
+
})(CapacityPlanningProblems || (exports.CapacityPlanningProblems = CapacityPlanningProblems = {}));
|
|
37600
|
+
var CapacityPlanningActionType;
|
|
37601
|
+
(function (CapacityPlanningActionType) {
|
|
37602
|
+
CapacityPlanningActionType[CapacityPlanningActionType["UpdateResources"] = 0] = "UpdateResources";
|
|
37603
|
+
CapacityPlanningActionType[CapacityPlanningActionType["UpdateAreas"] = 1] = "UpdateAreas";
|
|
37604
|
+
})(CapacityPlanningActionType || (exports.CapacityPlanningActionType = CapacityPlanningActionType = {}));
|
|
37605
|
+
var CapacityPlanningSeverity;
|
|
37606
|
+
(function (CapacityPlanningSeverity) {
|
|
37607
|
+
CapacityPlanningSeverity[CapacityPlanningSeverity["High"] = 0] = "High";
|
|
37608
|
+
CapacityPlanningSeverity[CapacityPlanningSeverity["Medium"] = 1] = "Medium";
|
|
37609
|
+
CapacityPlanningSeverity[CapacityPlanningSeverity["Low"] = 2] = "Low";
|
|
37610
|
+
})(CapacityPlanningSeverity || (exports.CapacityPlanningSeverity = CapacityPlanningSeverity = {}));
|
|
37611
|
+
//# sourceMappingURL=capacity_planning_insight.js.map
|
|
37612
|
+
|
|
37613
|
+
/***/ }),
|
|
37614
|
+
|
|
37615
|
+
/***/ 6533:
|
|
37616
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
37617
|
+
|
|
37618
|
+
"use strict";
|
|
37619
|
+
|
|
37620
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
37621
|
+
if (k2 === undefined) k2 = k;
|
|
37622
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
37623
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
37624
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
37625
|
+
}
|
|
37626
|
+
Object.defineProperty(o, k2, desc);
|
|
37627
|
+
}) : (function(o, m, k, k2) {
|
|
37628
|
+
if (k2 === undefined) k2 = k;
|
|
37629
|
+
o[k2] = m[k];
|
|
37630
|
+
}));
|
|
37631
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37632
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37633
|
+
};
|
|
37634
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
37635
|
+
__exportStar(__webpack_require__(48711), exports);
|
|
37636
|
+
__exportStar(__webpack_require__(10870), exports);
|
|
37637
|
+
//# sourceMappingURL=index.js.map
|
|
37638
|
+
|
|
37639
|
+
/***/ }),
|
|
37640
|
+
|
|
37208
37641
|
/***/ 53888:
|
|
37209
37642
|
/***/ ((__unused_webpack_module, exports) => {
|
|
37210
37643
|
|
|
@@ -37420,6 +37853,23 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
37420
37853
|
|
|
37421
37854
|
/***/ }),
|
|
37422
37855
|
|
|
37856
|
+
/***/ 29384:
|
|
37857
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
37858
|
+
|
|
37859
|
+
"use strict";
|
|
37860
|
+
|
|
37861
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
37862
|
+
exports.CostTypeEnum = void 0;
|
|
37863
|
+
var CostTypeEnum;
|
|
37864
|
+
(function (CostTypeEnum) {
|
|
37865
|
+
CostTypeEnum[CostTypeEnum["OVERALL_COST_PER_MINUTE"] = 1] = "OVERALL_COST_PER_MINUTE";
|
|
37866
|
+
CostTypeEnum[CostTypeEnum["ORDER_COST_PERCENTAGE"] = 2] = "ORDER_COST_PERCENTAGE";
|
|
37867
|
+
CostTypeEnum[CostTypeEnum["COST_BREAKDOWN"] = 3] = "COST_BREAKDOWN";
|
|
37868
|
+
})(CostTypeEnum || (exports.CostTypeEnum = CostTypeEnum = {}));
|
|
37869
|
+
//# sourceMappingURL=cost_type.js.map
|
|
37870
|
+
|
|
37871
|
+
/***/ }),
|
|
37872
|
+
|
|
37423
37873
|
/***/ 97935:
|
|
37424
37874
|
/***/ ((__unused_webpack_module, exports) => {
|
|
37425
37875
|
|
|
@@ -38373,12 +38823,17 @@ var EventType;
|
|
|
38373
38823
|
EventType["RunCalculateEtaForRuns"] = "RUN_CALCULATE_ETA_FOR_RUNS";
|
|
38374
38824
|
EventType["WayPointScheduleChanged"] = "way_point:schedule_changed";
|
|
38375
38825
|
EventType["TaskManagedAttributeChanged"] = "task_managed_attribute:changed";
|
|
38826
|
+
EventType["ApplicationMerchantConfigurationCreated"] = "application_merchant_configuration:created";
|
|
38827
|
+
EventType["ApplicationMerchantConfigurationUpdated"] = "application_merchant_configuration:updated";
|
|
38828
|
+
EventType["ApplicationMerchantConfigurationRemoved"] = "application_merchant_configuration:removed";
|
|
38829
|
+
EventType["VehicleUpdated"] = "vehicle:update";
|
|
38376
38830
|
})(EventType || (exports.EventType = EventType = {}));
|
|
38377
38831
|
var AvailabilityCalculationOrigin;
|
|
38378
38832
|
(function (AvailabilityCalculationOrigin) {
|
|
38379
38833
|
AvailabilityCalculationOrigin["QUOTE_ORDERS"] = "QUOTE_ORDERS";
|
|
38380
38834
|
AvailabilityCalculationOrigin["AUTOMATION_PLATFORM"] = "AUTOMATION_PLATFORM";
|
|
38381
38835
|
AvailabilityCalculationOrigin["SIMULATOR"] = "SIMULATOR";
|
|
38836
|
+
AvailabilityCalculationOrigin["ADMIN_BCONTROL"] = "ADMIN_BCONTROL";
|
|
38382
38837
|
})(AvailabilityCalculationOrigin || (exports.AvailabilityCalculationOrigin = AvailabilityCalculationOrigin = {}));
|
|
38383
38838
|
//# sourceMappingURL=event.js.map
|
|
38384
38839
|
|
|
@@ -38499,6 +38954,8 @@ var FleetType;
|
|
|
38499
38954
|
FleetType[FleetType["Eva"] = 38] = "Eva";
|
|
38500
38955
|
FleetType[FleetType["CIL"] = 39] = "CIL";
|
|
38501
38956
|
FleetType[FleetType["RasXps"] = 40] = "RasXps";
|
|
38957
|
+
FleetType[FleetType["DispatchIt"] = 41] = "DispatchIt";
|
|
38958
|
+
FleetType[FleetType["Curri"] = 42] = "Curri";
|
|
38502
38959
|
FleetType[FleetType["EmulatedDeliveryProvider"] = 999] = "EmulatedDeliveryProvider";
|
|
38503
38960
|
})(FleetType || (exports.FleetType = FleetType = {}));
|
|
38504
38961
|
exports.FleetTypeToCapabilities = (_a = {},
|
|
@@ -38574,7 +39031,9 @@ exports.FleetTypeToCapabilities = (_a = {},
|
|
|
38574
39031
|
},
|
|
38575
39032
|
_a[FleetType.Eva] = { create_delivery: true, get_quote: true, update_delivery: true, pickup_eta_available: true },
|
|
38576
39033
|
_a[FleetType.CIL] = { create_delivery: true, get_quote: true, update_delivery: true },
|
|
38577
|
-
_a[FleetType.RasXps] = { create_delivery: true, get_quote: true, update_delivery:
|
|
39034
|
+
_a[FleetType.RasXps] = { create_delivery: true, get_quote: true, update_delivery: true },
|
|
39035
|
+
_a[FleetType.DispatchIt] = { create_delivery: true, get_quote: true, update_delivery: true },
|
|
39036
|
+
_a[FleetType.Curri] = { create_delivery: true, get_quote: true, update_delivery: true },
|
|
38578
39037
|
_a);
|
|
38579
39038
|
//# sourceMappingURL=fleet.js.map
|
|
38580
39039
|
|
|
@@ -39194,6 +39653,8 @@ var OptimizationOrigin;
|
|
|
39194
39653
|
OptimizationOrigin["QUOTES_CACHE_REFRESH"] = "quotes_cache_refresh";
|
|
39195
39654
|
OptimizationOrigin["REALTIME_ETA_APP"] = "realtime_eta_app";
|
|
39196
39655
|
OptimizationOrigin["AGENT_TRIGGERED_OPTIMIZATION"] = "agent_triggered_optimization";
|
|
39656
|
+
OptimizationOrigin["CAPACITY_PLANNING_BACKGROUND"] = "capacity_planning_background";
|
|
39657
|
+
OptimizationOrigin["CAPACITY_SANDBOX_DUMMY_ORDERS_OPTIMIZATION"] = "capacity_sandbox_dummy_orders_optimization";
|
|
39197
39658
|
})(OptimizationOrigin || (exports.OptimizationOrigin = OptimizationOrigin = {}));
|
|
39198
39659
|
var RouteItemType;
|
|
39199
39660
|
(function (RouteItemType) {
|
|
@@ -39458,6 +39919,7 @@ var PrivilegeTypes;
|
|
|
39458
39919
|
PrivilegeTypes["VEHICLE_CREATE_AND_UPDATE"] = "allow_dispatcher_create_vehicle";
|
|
39459
39920
|
PrivilegeTypes["ALLOW_DISPATCHER_EDIT_SERVICE_AREA"] = "allow_dispatcher_edit_service_area";
|
|
39460
39921
|
PrivilegeTypes["SEND_TO_DRIVERS"] = "send_to_drivers";
|
|
39922
|
+
PrivilegeTypes["SEND_TASK_FROM_DISPATCH_TO_PLANNING"] = "send_task_from_dispatch_to_planning";
|
|
39461
39923
|
PrivilegeTypes["OPTIMIZE_ORDERS"] = "optimize_orders";
|
|
39462
39924
|
PrivilegeTypes["ASSIGN_USER_TO_COMPANY"] = "assign_user_to_company";
|
|
39463
39925
|
PrivilegeTypes["ENABLE_WEBHOOKS"] = "enable_webhooks";
|
|
@@ -39493,6 +39955,9 @@ var PrivilegeTypes;
|
|
|
39493
39955
|
PrivilegeTypes["CHANGE_SKILLS"] = "change_skills";
|
|
39494
39956
|
PrivilegeTypes["CREATE_SKILLS"] = "create_skills";
|
|
39495
39957
|
PrivilegeTypes["ALLOW_USING_ROUTE_SIMULATOR"] = "allow_using_route_simulator";
|
|
39958
|
+
PrivilegeTypes["ALLOW_DISPATCHER_EDIT_ROUTE_COST_CALCULATION"] = "allow_dispatcher_edit_route_cost_calculation";
|
|
39959
|
+
PrivilegeTypes["CHANGE_SKILLS_ORDER_PAGE"] = "change_skills_order_page";
|
|
39960
|
+
PrivilegeTypes["ALLOW_DISPATCHER_EDIT_ADDITIONAL_DRIVER_COST_FIELDS"] = "allow_dispatcher_edit_additional_driver_cost_fields";
|
|
39496
39961
|
})(PrivilegeTypes || (exports.PrivilegeTypes = PrivilegeTypes = {}));
|
|
39497
39962
|
exports.PRIVILEGES_DEFAULTS = (_a = {},
|
|
39498
39963
|
_a[PrivilegeTypes.CANCEL_TASK] = true,
|
|
@@ -39551,6 +40016,28 @@ var ApplicationType;
|
|
|
39551
40016
|
|
|
39552
40017
|
/***/ }),
|
|
39553
40018
|
|
|
40019
|
+
/***/ 5220:
|
|
40020
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
40021
|
+
|
|
40022
|
+
"use strict";
|
|
40023
|
+
|
|
40024
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40025
|
+
exports.QuestionnaireStatus = exports.QuestionnaireTrigger = void 0;
|
|
40026
|
+
var QuestionnaireTrigger;
|
|
40027
|
+
(function (QuestionnaireTrigger) {
|
|
40028
|
+
QuestionnaireTrigger[QuestionnaireTrigger["Hidden"] = 0] = "Hidden";
|
|
40029
|
+
QuestionnaireTrigger[QuestionnaireTrigger["BeforeScheduling"] = 1] = "BeforeScheduling";
|
|
40030
|
+
QuestionnaireTrigger[QuestionnaireTrigger["AfterScheduling"] = 2] = "AfterScheduling";
|
|
40031
|
+
})(QuestionnaireTrigger || (exports.QuestionnaireTrigger = QuestionnaireTrigger = {}));
|
|
40032
|
+
var QuestionnaireStatus;
|
|
40033
|
+
(function (QuestionnaireStatus) {
|
|
40034
|
+
QuestionnaireStatus[QuestionnaireStatus["Pending"] = 0] = "Pending";
|
|
40035
|
+
QuestionnaireStatus[QuestionnaireStatus["Completed"] = 1] = "Completed";
|
|
40036
|
+
})(QuestionnaireStatus || (exports.QuestionnaireStatus = QuestionnaireStatus = {}));
|
|
40037
|
+
//# sourceMappingURL=questionnaire_data.js.map
|
|
40038
|
+
|
|
40039
|
+
/***/ }),
|
|
40040
|
+
|
|
39554
40041
|
/***/ 96425:
|
|
39555
40042
|
/***/ ((__unused_webpack_module, exports) => {
|
|
39556
40043
|
|
|
@@ -39941,6 +40428,23 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
39941
40428
|
|
|
39942
40429
|
/***/ }),
|
|
39943
40430
|
|
|
40431
|
+
/***/ 78048:
|
|
40432
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
40433
|
+
|
|
40434
|
+
"use strict";
|
|
40435
|
+
|
|
40436
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40437
|
+
exports.RouteCostModel = void 0;
|
|
40438
|
+
var RouteCostModel;
|
|
40439
|
+
(function (RouteCostModel) {
|
|
40440
|
+
RouteCostModel[RouteCostModel["overall_cost_per_minute"] = 1] = "overall_cost_per_minute";
|
|
40441
|
+
RouteCostModel[RouteCostModel["order_cost_percentage"] = 2] = "order_cost_percentage";
|
|
40442
|
+
RouteCostModel[RouteCostModel["cost_breakdown"] = 3] = "cost_breakdown";
|
|
40443
|
+
})(RouteCostModel || (exports.RouteCostModel = RouteCostModel = {}));
|
|
40444
|
+
//# sourceMappingURL=route_cost.js.map
|
|
40445
|
+
|
|
40446
|
+
/***/ }),
|
|
40447
|
+
|
|
39944
40448
|
/***/ 2730:
|
|
39945
40449
|
/***/ ((__unused_webpack_module, exports) => {
|
|
39946
40450
|
|
|
@@ -40618,6 +41122,7 @@ var TaskHistoryEvent;
|
|
|
40618
41122
|
TaskHistoryEvent[TaskHistoryEvent["way_point_field_value_changed"] = 55] = "way_point_field_value_changed";
|
|
40619
41123
|
TaskHistoryEvent[TaskHistoryEvent["way_point_added"] = 56] = "way_point_added";
|
|
40620
41124
|
TaskHistoryEvent[TaskHistoryEvent["way_point_removed"] = 57] = "way_point_removed";
|
|
41125
|
+
TaskHistoryEvent[TaskHistoryEvent["external_delivery_update_failed"] = 58] = "external_delivery_update_failed";
|
|
40621
41126
|
})(TaskHistoryEvent || (exports.TaskHistoryEvent = TaskHistoryEvent = {}));
|
|
40622
41127
|
var TaskCustomAttributesChangeOrigin;
|
|
40623
41128
|
(function (TaskCustomAttributesChangeOrigin) {
|
|
@@ -40934,6 +41439,27 @@ var TaskServiceType;
|
|
|
40934
41439
|
|
|
40935
41440
|
/***/ }),
|
|
40936
41441
|
|
|
41442
|
+
/***/ 70467:
|
|
41443
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
41444
|
+
|
|
41445
|
+
"use strict";
|
|
41446
|
+
|
|
41447
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41448
|
+
exports.TaskTemplateType = exports.TaskTemplatingActions = void 0;
|
|
41449
|
+
var TaskTemplatingActions;
|
|
41450
|
+
(function (TaskTemplatingActions) {
|
|
41451
|
+
TaskTemplatingActions["CreateTaskFromTaskAndTemplate"] = "create_task_from_task_and_template";
|
|
41452
|
+
TaskTemplatingActions["GetRelatedTaskIds"] = "get_related_task_ids";
|
|
41453
|
+
})(TaskTemplatingActions || (exports.TaskTemplatingActions = TaskTemplatingActions = {}));
|
|
41454
|
+
var TaskTemplateType;
|
|
41455
|
+
(function (TaskTemplateType) {
|
|
41456
|
+
TaskTemplateType["FloatingHelper"] = "FloatingHelper";
|
|
41457
|
+
TaskTemplateType["Meetup"] = "Meetup";
|
|
41458
|
+
})(TaskTemplateType || (exports.TaskTemplateType = TaskTemplateType = {}));
|
|
41459
|
+
//# sourceMappingURL=task_templates.js.map
|
|
41460
|
+
|
|
41461
|
+
/***/ }),
|
|
41462
|
+
|
|
40937
41463
|
/***/ 41164:
|
|
40938
41464
|
/***/ ((__unused_webpack_module, exports) => {
|
|
40939
41465
|
|
|
@@ -41205,7 +41731,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
41205
41731
|
"use strict";
|
|
41206
41732
|
|
|
41207
41733
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41208
|
-
exports.OAuth2RequestType = exports.JWTTokenEncoding = exports.JWTAlgorithm = exports.AuthorizationType = exports.AuthenticationMethod = void 0;
|
|
41734
|
+
exports.ClientCredentialsPlacement = exports.OAuth2RequestType = exports.JWTTokenEncoding = exports.JWTAlgorithm = exports.AuthorizationType = exports.AuthenticationMethod = void 0;
|
|
41209
41735
|
var AuthenticationMethod;
|
|
41210
41736
|
(function (AuthenticationMethod) {
|
|
41211
41737
|
AuthenticationMethod[AuthenticationMethod["WEBHOOKS"] = 0] = "WEBHOOKS";
|
|
@@ -41233,6 +41759,11 @@ var OAuth2RequestType;
|
|
|
41233
41759
|
OAuth2RequestType[OAuth2RequestType["JSON"] = 1] = "JSON";
|
|
41234
41760
|
OAuth2RequestType[OAuth2RequestType["QUERY_STRING"] = 2] = "QUERY_STRING";
|
|
41235
41761
|
})(OAuth2RequestType || (exports.OAuth2RequestType = OAuth2RequestType = {}));
|
|
41762
|
+
var ClientCredentialsPlacement;
|
|
41763
|
+
(function (ClientCredentialsPlacement) {
|
|
41764
|
+
ClientCredentialsPlacement["BODY"] = "body";
|
|
41765
|
+
ClientCredentialsPlacement["HEADER"] = "header";
|
|
41766
|
+
})(ClientCredentialsPlacement || (exports.ClientCredentialsPlacement = ClientCredentialsPlacement = {}));
|
|
41236
41767
|
//# sourceMappingURL=webhook_authentication_configuration.js.map
|
|
41237
41768
|
|
|
41238
41769
|
/***/ }),
|
|
@@ -41537,6 +42068,7 @@ var AttributeDatatype;
|
|
|
41537
42068
|
var EntityDataType;
|
|
41538
42069
|
(function (EntityDataType) {
|
|
41539
42070
|
EntityDataType["Driver"] = "driver";
|
|
42071
|
+
EntityDataType["Task"] = "task";
|
|
41540
42072
|
})(EntityDataType || (exports.EntityDataType = EntityDataType = {}));
|
|
41541
42073
|
var RuleCompareOperator;
|
|
41542
42074
|
(function (RuleCompareOperator) {
|
|
@@ -41613,6 +42145,7 @@ var FactType;
|
|
|
41613
42145
|
FactType["PlannedDeliveryWindow"] = "planned_delivery_window";
|
|
41614
42146
|
FactType["DeliveryWindow"] = "delivery_window";
|
|
41615
42147
|
FactType["ServiceArea"] = "service_area";
|
|
42148
|
+
FactType["Vehicle"] = "vehicle";
|
|
41616
42149
|
})(FactType || (exports.FactType = FactType = {}));
|
|
41617
42150
|
var RuleRequestType;
|
|
41618
42151
|
(function (RuleRequestType) {
|
|
@@ -41628,6 +42161,7 @@ var DisplayFact;
|
|
|
41628
42161
|
DisplayFact["DeliveryWindow"] = "delivery_window";
|
|
41629
42162
|
DisplayFact["ServiceArea"] = "service_area";
|
|
41630
42163
|
DisplayFact["Run"] = "run";
|
|
42164
|
+
DisplayFact["Vehicle"] = "vehicle";
|
|
41631
42165
|
})(DisplayFact || (exports.DisplayFact = DisplayFact = {}));
|
|
41632
42166
|
//# sourceMappingURL=rule_types.js.map
|
|
41633
42167
|
|
|
@@ -41655,6 +42189,7 @@ var SharedLocationPlaceHolderType;
|
|
|
41655
42189
|
SharedLocationPlaceHolderType["ADDRESS"] = "Delivery address";
|
|
41656
42190
|
SharedLocationPlaceHolderType["TEAM_DESCRIPTION"] = "Team description";
|
|
41657
42191
|
SharedLocationPlaceHolderType["UUID"] = "Unique notification ID";
|
|
42192
|
+
SharedLocationPlaceHolderType["VERIFICATION_PIN_CODE"] = "Verification pin code";
|
|
41658
42193
|
})(SharedLocationPlaceHolderType || (exports.SharedLocationPlaceHolderType = SharedLocationPlaceHolderType = {}));
|
|
41659
42194
|
var SharedLocationPlaceHolderLinkType;
|
|
41660
42195
|
(function (SharedLocationPlaceHolderLinkType) {
|
|
@@ -46918,6 +47453,44 @@ var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
|
46918
47453
|
module.exports = baseSetToString;
|
|
46919
47454
|
|
|
46920
47455
|
|
|
47456
|
+
/***/ }),
|
|
47457
|
+
|
|
47458
|
+
/***/ 14259:
|
|
47459
|
+
/***/ ((module) => {
|
|
47460
|
+
|
|
47461
|
+
/**
|
|
47462
|
+
* The base implementation of `_.slice` without an iteratee call guard.
|
|
47463
|
+
*
|
|
47464
|
+
* @private
|
|
47465
|
+
* @param {Array} array The array to slice.
|
|
47466
|
+
* @param {number} [start=0] The start position.
|
|
47467
|
+
* @param {number} [end=array.length] The end position.
|
|
47468
|
+
* @returns {Array} Returns the slice of `array`.
|
|
47469
|
+
*/
|
|
47470
|
+
function baseSlice(array, start, end) {
|
|
47471
|
+
var index = -1,
|
|
47472
|
+
length = array.length;
|
|
47473
|
+
|
|
47474
|
+
if (start < 0) {
|
|
47475
|
+
start = -start > length ? 0 : (length + start);
|
|
47476
|
+
}
|
|
47477
|
+
end = end > length ? length : end;
|
|
47478
|
+
if (end < 0) {
|
|
47479
|
+
end += length;
|
|
47480
|
+
}
|
|
47481
|
+
length = start > end ? 0 : ((end - start) >>> 0);
|
|
47482
|
+
start >>>= 0;
|
|
47483
|
+
|
|
47484
|
+
var result = Array(length);
|
|
47485
|
+
while (++index < length) {
|
|
47486
|
+
result[index] = array[index + start];
|
|
47487
|
+
}
|
|
47488
|
+
return result;
|
|
47489
|
+
}
|
|
47490
|
+
|
|
47491
|
+
module.exports = baseSlice;
|
|
47492
|
+
|
|
47493
|
+
|
|
46921
47494
|
/***/ }),
|
|
46922
47495
|
|
|
46923
47496
|
/***/ 22545:
|
|
@@ -46989,6 +47562,32 @@ function baseToString(value) {
|
|
|
46989
47562
|
module.exports = baseToString;
|
|
46990
47563
|
|
|
46991
47564
|
|
|
47565
|
+
/***/ }),
|
|
47566
|
+
|
|
47567
|
+
/***/ 27561:
|
|
47568
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
47569
|
+
|
|
47570
|
+
var trimmedEndIndex = __webpack_require__(67990);
|
|
47571
|
+
|
|
47572
|
+
/** Used to match leading whitespace. */
|
|
47573
|
+
var reTrimStart = /^\s+/;
|
|
47574
|
+
|
|
47575
|
+
/**
|
|
47576
|
+
* The base implementation of `_.trim`.
|
|
47577
|
+
*
|
|
47578
|
+
* @private
|
|
47579
|
+
* @param {string} string The string to trim.
|
|
47580
|
+
* @returns {string} Returns the trimmed string.
|
|
47581
|
+
*/
|
|
47582
|
+
function baseTrim(string) {
|
|
47583
|
+
return string
|
|
47584
|
+
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|
47585
|
+
: string;
|
|
47586
|
+
}
|
|
47587
|
+
|
|
47588
|
+
module.exports = baseTrim;
|
|
47589
|
+
|
|
47590
|
+
|
|
46992
47591
|
/***/ }),
|
|
46993
47592
|
|
|
46994
47593
|
/***/ 7518:
|
|
@@ -47056,6 +47655,27 @@ function cacheHas(cache, key) {
|
|
|
47056
47655
|
module.exports = cacheHas;
|
|
47057
47656
|
|
|
47058
47657
|
|
|
47658
|
+
/***/ }),
|
|
47659
|
+
|
|
47660
|
+
/***/ 54290:
|
|
47661
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
47662
|
+
|
|
47663
|
+
var identity = __webpack_require__(6557);
|
|
47664
|
+
|
|
47665
|
+
/**
|
|
47666
|
+
* Casts `value` to `identity` if it's not a function.
|
|
47667
|
+
*
|
|
47668
|
+
* @private
|
|
47669
|
+
* @param {*} value The value to inspect.
|
|
47670
|
+
* @returns {Function} Returns cast function.
|
|
47671
|
+
*/
|
|
47672
|
+
function castFunction(value) {
|
|
47673
|
+
return typeof value == 'function' ? value : identity;
|
|
47674
|
+
}
|
|
47675
|
+
|
|
47676
|
+
module.exports = castFunction;
|
|
47677
|
+
|
|
47678
|
+
|
|
47059
47679
|
/***/ }),
|
|
47060
47680
|
|
|
47061
47681
|
/***/ 71811:
|
|
@@ -49834,6 +50454,32 @@ function toSource(func) {
|
|
|
49834
50454
|
module.exports = toSource;
|
|
49835
50455
|
|
|
49836
50456
|
|
|
50457
|
+
/***/ }),
|
|
50458
|
+
|
|
50459
|
+
/***/ 67990:
|
|
50460
|
+
/***/ ((module) => {
|
|
50461
|
+
|
|
50462
|
+
/** Used to match a single whitespace character. */
|
|
50463
|
+
var reWhitespace = /\s/;
|
|
50464
|
+
|
|
50465
|
+
/**
|
|
50466
|
+
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
50467
|
+
* character of `string`.
|
|
50468
|
+
*
|
|
50469
|
+
* @private
|
|
50470
|
+
* @param {string} string The string to inspect.
|
|
50471
|
+
* @returns {number} Returns the index of the last non-whitespace character.
|
|
50472
|
+
*/
|
|
50473
|
+
function trimmedEndIndex(string) {
|
|
50474
|
+
var index = string.length;
|
|
50475
|
+
|
|
50476
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
50477
|
+
return index;
|
|
50478
|
+
}
|
|
50479
|
+
|
|
50480
|
+
module.exports = trimmedEndIndex;
|
|
50481
|
+
|
|
50482
|
+
|
|
49837
50483
|
/***/ }),
|
|
49838
50484
|
|
|
49839
50485
|
/***/ 29018:
|
|
@@ -49921,6 +50567,63 @@ var attempt = baseRest(function(func, args) {
|
|
|
49921
50567
|
module.exports = attempt;
|
|
49922
50568
|
|
|
49923
50569
|
|
|
50570
|
+
/***/ }),
|
|
50571
|
+
|
|
50572
|
+
/***/ 8400:
|
|
50573
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
50574
|
+
|
|
50575
|
+
var baseSlice = __webpack_require__(14259),
|
|
50576
|
+
isIterateeCall = __webpack_require__(16612),
|
|
50577
|
+
toInteger = __webpack_require__(40554);
|
|
50578
|
+
|
|
50579
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
50580
|
+
var nativeCeil = Math.ceil,
|
|
50581
|
+
nativeMax = Math.max;
|
|
50582
|
+
|
|
50583
|
+
/**
|
|
50584
|
+
* Creates an array of elements split into groups the length of `size`.
|
|
50585
|
+
* If `array` can't be split evenly, the final chunk will be the remaining
|
|
50586
|
+
* elements.
|
|
50587
|
+
*
|
|
50588
|
+
* @static
|
|
50589
|
+
* @memberOf _
|
|
50590
|
+
* @since 3.0.0
|
|
50591
|
+
* @category Array
|
|
50592
|
+
* @param {Array} array The array to process.
|
|
50593
|
+
* @param {number} [size=1] The length of each chunk
|
|
50594
|
+
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
50595
|
+
* @returns {Array} Returns the new array of chunks.
|
|
50596
|
+
* @example
|
|
50597
|
+
*
|
|
50598
|
+
* _.chunk(['a', 'b', 'c', 'd'], 2);
|
|
50599
|
+
* // => [['a', 'b'], ['c', 'd']]
|
|
50600
|
+
*
|
|
50601
|
+
* _.chunk(['a', 'b', 'c', 'd'], 3);
|
|
50602
|
+
* // => [['a', 'b', 'c'], ['d']]
|
|
50603
|
+
*/
|
|
50604
|
+
function chunk(array, size, guard) {
|
|
50605
|
+
if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
|
|
50606
|
+
size = 1;
|
|
50607
|
+
} else {
|
|
50608
|
+
size = nativeMax(toInteger(size), 0);
|
|
50609
|
+
}
|
|
50610
|
+
var length = array == null ? 0 : array.length;
|
|
50611
|
+
if (!length || size < 1) {
|
|
50612
|
+
return [];
|
|
50613
|
+
}
|
|
50614
|
+
var index = 0,
|
|
50615
|
+
resIndex = 0,
|
|
50616
|
+
result = Array(nativeCeil(length / size));
|
|
50617
|
+
|
|
50618
|
+
while (index < length) {
|
|
50619
|
+
result[resIndex++] = baseSlice(array, index, (index += size));
|
|
50620
|
+
}
|
|
50621
|
+
return result;
|
|
50622
|
+
}
|
|
50623
|
+
|
|
50624
|
+
module.exports = chunk;
|
|
50625
|
+
|
|
50626
|
+
|
|
49924
50627
|
/***/ }),
|
|
49925
50628
|
|
|
49926
50629
|
/***/ 50361:
|
|
@@ -50113,6 +50816,54 @@ function flatten(array) {
|
|
|
50113
50816
|
module.exports = flatten;
|
|
50114
50817
|
|
|
50115
50818
|
|
|
50819
|
+
/***/ }),
|
|
50820
|
+
|
|
50821
|
+
/***/ 84486:
|
|
50822
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
50823
|
+
|
|
50824
|
+
var arrayEach = __webpack_require__(77412),
|
|
50825
|
+
baseEach = __webpack_require__(89881),
|
|
50826
|
+
castFunction = __webpack_require__(54290),
|
|
50827
|
+
isArray = __webpack_require__(1469);
|
|
50828
|
+
|
|
50829
|
+
/**
|
|
50830
|
+
* Iterates over elements of `collection` and invokes `iteratee` for each element.
|
|
50831
|
+
* The iteratee is invoked with three arguments: (value, index|key, collection).
|
|
50832
|
+
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
50833
|
+
*
|
|
50834
|
+
* **Note:** As with other "Collections" methods, objects with a "length"
|
|
50835
|
+
* property are iterated like arrays. To avoid this behavior use `_.forIn`
|
|
50836
|
+
* or `_.forOwn` for object iteration.
|
|
50837
|
+
*
|
|
50838
|
+
* @static
|
|
50839
|
+
* @memberOf _
|
|
50840
|
+
* @since 0.1.0
|
|
50841
|
+
* @alias each
|
|
50842
|
+
* @category Collection
|
|
50843
|
+
* @param {Array|Object} collection The collection to iterate over.
|
|
50844
|
+
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
50845
|
+
* @returns {Array|Object} Returns `collection`.
|
|
50846
|
+
* @see _.forEachRight
|
|
50847
|
+
* @example
|
|
50848
|
+
*
|
|
50849
|
+
* _.forEach([1, 2], function(value) {
|
|
50850
|
+
* console.log(value);
|
|
50851
|
+
* });
|
|
50852
|
+
* // => Logs `1` then `2`.
|
|
50853
|
+
*
|
|
50854
|
+
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
|
|
50855
|
+
* console.log(key);
|
|
50856
|
+
* });
|
|
50857
|
+
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
50858
|
+
*/
|
|
50859
|
+
function forEach(collection, iteratee) {
|
|
50860
|
+
var func = isArray(collection) ? arrayEach : baseEach;
|
|
50861
|
+
return func(collection, castFunction(iteratee));
|
|
50862
|
+
}
|
|
50863
|
+
|
|
50864
|
+
module.exports = forEach;
|
|
50865
|
+
|
|
50866
|
+
|
|
50116
50867
|
/***/ }),
|
|
50117
50868
|
|
|
50118
50869
|
/***/ 27361:
|
|
@@ -51002,6 +51753,33 @@ function keysIn(object) {
|
|
|
51002
51753
|
module.exports = keysIn;
|
|
51003
51754
|
|
|
51004
51755
|
|
|
51756
|
+
/***/ }),
|
|
51757
|
+
|
|
51758
|
+
/***/ 10928:
|
|
51759
|
+
/***/ ((module) => {
|
|
51760
|
+
|
|
51761
|
+
/**
|
|
51762
|
+
* Gets the last element of `array`.
|
|
51763
|
+
*
|
|
51764
|
+
* @static
|
|
51765
|
+
* @memberOf _
|
|
51766
|
+
* @since 0.1.0
|
|
51767
|
+
* @category Array
|
|
51768
|
+
* @param {Array} array The array to query.
|
|
51769
|
+
* @returns {*} Returns the last element of `array`.
|
|
51770
|
+
* @example
|
|
51771
|
+
*
|
|
51772
|
+
* _.last([1, 2, 3]);
|
|
51773
|
+
* // => 3
|
|
51774
|
+
*/
|
|
51775
|
+
function last(array) {
|
|
51776
|
+
var length = array == null ? 0 : array.length;
|
|
51777
|
+
return length ? array[length - 1] : undefined;
|
|
51778
|
+
}
|
|
51779
|
+
|
|
51780
|
+
module.exports = last;
|
|
51781
|
+
|
|
51782
|
+
|
|
51005
51783
|
/***/ }),
|
|
51006
51784
|
|
|
51007
51785
|
/***/ 96486:
|
|
@@ -68770,6 +69548,169 @@ var templateSettings = {
|
|
|
68770
69548
|
module.exports = templateSettings;
|
|
68771
69549
|
|
|
68772
69550
|
|
|
69551
|
+
/***/ }),
|
|
69552
|
+
|
|
69553
|
+
/***/ 18601:
|
|
69554
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
69555
|
+
|
|
69556
|
+
var toNumber = __webpack_require__(14841);
|
|
69557
|
+
|
|
69558
|
+
/** Used as references for various `Number` constants. */
|
|
69559
|
+
var INFINITY = 1 / 0,
|
|
69560
|
+
MAX_INTEGER = 1.7976931348623157e+308;
|
|
69561
|
+
|
|
69562
|
+
/**
|
|
69563
|
+
* Converts `value` to a finite number.
|
|
69564
|
+
*
|
|
69565
|
+
* @static
|
|
69566
|
+
* @memberOf _
|
|
69567
|
+
* @since 4.12.0
|
|
69568
|
+
* @category Lang
|
|
69569
|
+
* @param {*} value The value to convert.
|
|
69570
|
+
* @returns {number} Returns the converted number.
|
|
69571
|
+
* @example
|
|
69572
|
+
*
|
|
69573
|
+
* _.toFinite(3.2);
|
|
69574
|
+
* // => 3.2
|
|
69575
|
+
*
|
|
69576
|
+
* _.toFinite(Number.MIN_VALUE);
|
|
69577
|
+
* // => 5e-324
|
|
69578
|
+
*
|
|
69579
|
+
* _.toFinite(Infinity);
|
|
69580
|
+
* // => 1.7976931348623157e+308
|
|
69581
|
+
*
|
|
69582
|
+
* _.toFinite('3.2');
|
|
69583
|
+
* // => 3.2
|
|
69584
|
+
*/
|
|
69585
|
+
function toFinite(value) {
|
|
69586
|
+
if (!value) {
|
|
69587
|
+
return value === 0 ? value : 0;
|
|
69588
|
+
}
|
|
69589
|
+
value = toNumber(value);
|
|
69590
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
69591
|
+
var sign = (value < 0 ? -1 : 1);
|
|
69592
|
+
return sign * MAX_INTEGER;
|
|
69593
|
+
}
|
|
69594
|
+
return value === value ? value : 0;
|
|
69595
|
+
}
|
|
69596
|
+
|
|
69597
|
+
module.exports = toFinite;
|
|
69598
|
+
|
|
69599
|
+
|
|
69600
|
+
/***/ }),
|
|
69601
|
+
|
|
69602
|
+
/***/ 40554:
|
|
69603
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
69604
|
+
|
|
69605
|
+
var toFinite = __webpack_require__(18601);
|
|
69606
|
+
|
|
69607
|
+
/**
|
|
69608
|
+
* Converts `value` to an integer.
|
|
69609
|
+
*
|
|
69610
|
+
* **Note:** This method is loosely based on
|
|
69611
|
+
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
69612
|
+
*
|
|
69613
|
+
* @static
|
|
69614
|
+
* @memberOf _
|
|
69615
|
+
* @since 4.0.0
|
|
69616
|
+
* @category Lang
|
|
69617
|
+
* @param {*} value The value to convert.
|
|
69618
|
+
* @returns {number} Returns the converted integer.
|
|
69619
|
+
* @example
|
|
69620
|
+
*
|
|
69621
|
+
* _.toInteger(3.2);
|
|
69622
|
+
* // => 3
|
|
69623
|
+
*
|
|
69624
|
+
* _.toInteger(Number.MIN_VALUE);
|
|
69625
|
+
* // => 0
|
|
69626
|
+
*
|
|
69627
|
+
* _.toInteger(Infinity);
|
|
69628
|
+
* // => 1.7976931348623157e+308
|
|
69629
|
+
*
|
|
69630
|
+
* _.toInteger('3.2');
|
|
69631
|
+
* // => 3
|
|
69632
|
+
*/
|
|
69633
|
+
function toInteger(value) {
|
|
69634
|
+
var result = toFinite(value),
|
|
69635
|
+
remainder = result % 1;
|
|
69636
|
+
|
|
69637
|
+
return result === result ? (remainder ? result - remainder : result) : 0;
|
|
69638
|
+
}
|
|
69639
|
+
|
|
69640
|
+
module.exports = toInteger;
|
|
69641
|
+
|
|
69642
|
+
|
|
69643
|
+
/***/ }),
|
|
69644
|
+
|
|
69645
|
+
/***/ 14841:
|
|
69646
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
69647
|
+
|
|
69648
|
+
var baseTrim = __webpack_require__(27561),
|
|
69649
|
+
isObject = __webpack_require__(13218),
|
|
69650
|
+
isSymbol = __webpack_require__(33448);
|
|
69651
|
+
|
|
69652
|
+
/** Used as references for various `Number` constants. */
|
|
69653
|
+
var NAN = 0 / 0;
|
|
69654
|
+
|
|
69655
|
+
/** Used to detect bad signed hexadecimal string values. */
|
|
69656
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
69657
|
+
|
|
69658
|
+
/** Used to detect binary string values. */
|
|
69659
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
69660
|
+
|
|
69661
|
+
/** Used to detect octal string values. */
|
|
69662
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
69663
|
+
|
|
69664
|
+
/** Built-in method references without a dependency on `root`. */
|
|
69665
|
+
var freeParseInt = parseInt;
|
|
69666
|
+
|
|
69667
|
+
/**
|
|
69668
|
+
* Converts `value` to a number.
|
|
69669
|
+
*
|
|
69670
|
+
* @static
|
|
69671
|
+
* @memberOf _
|
|
69672
|
+
* @since 4.0.0
|
|
69673
|
+
* @category Lang
|
|
69674
|
+
* @param {*} value The value to process.
|
|
69675
|
+
* @returns {number} Returns the number.
|
|
69676
|
+
* @example
|
|
69677
|
+
*
|
|
69678
|
+
* _.toNumber(3.2);
|
|
69679
|
+
* // => 3.2
|
|
69680
|
+
*
|
|
69681
|
+
* _.toNumber(Number.MIN_VALUE);
|
|
69682
|
+
* // => 5e-324
|
|
69683
|
+
*
|
|
69684
|
+
* _.toNumber(Infinity);
|
|
69685
|
+
* // => Infinity
|
|
69686
|
+
*
|
|
69687
|
+
* _.toNumber('3.2');
|
|
69688
|
+
* // => 3.2
|
|
69689
|
+
*/
|
|
69690
|
+
function toNumber(value) {
|
|
69691
|
+
if (typeof value == 'number') {
|
|
69692
|
+
return value;
|
|
69693
|
+
}
|
|
69694
|
+
if (isSymbol(value)) {
|
|
69695
|
+
return NAN;
|
|
69696
|
+
}
|
|
69697
|
+
if (isObject(value)) {
|
|
69698
|
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
69699
|
+
value = isObject(other) ? (other + '') : other;
|
|
69700
|
+
}
|
|
69701
|
+
if (typeof value != 'string') {
|
|
69702
|
+
return value === 0 ? value : +value;
|
|
69703
|
+
}
|
|
69704
|
+
value = baseTrim(value);
|
|
69705
|
+
var isBinary = reIsBinary.test(value);
|
|
69706
|
+
return (isBinary || reIsOctal.test(value))
|
|
69707
|
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
69708
|
+
: (reIsBadHex.test(value) ? NAN : +value);
|
|
69709
|
+
}
|
|
69710
|
+
|
|
69711
|
+
module.exports = toNumber;
|
|
69712
|
+
|
|
69713
|
+
|
|
68773
69714
|
/***/ }),
|
|
68774
69715
|
|
|
68775
69716
|
/***/ 79833:
|