UNPKG

@sports-alliance/sports-lib

Version:

A Library to for importing / exporting and processing GPX, TCX, FIT and JSON files from services such as Strava, Movescount, Garmin, Polar etc

25 lines (24 loc) 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RouteParsingOptions = void 0; class RouteParsingOptions { constructor(options = {}) { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; this.streams = { smooth: { altitudeSmooth: (_c = (_b = (_a = options.streams) === null || _a === void 0 ? void 0 : _a.smooth) === null || _b === void 0 ? void 0 : _b.altitudeSmooth) !== null && _c !== void 0 ? _c : true, grade: (_f = (_e = (_d = options.streams) === null || _d === void 0 ? void 0 : _d.smooth) === null || _e === void 0 ? void 0 : _e.grade) !== null && _f !== void 0 ? _f : true, gradeSmooth: (_j = (_h = (_g = options.streams) === null || _g === void 0 ? void 0 : _g.smooth) === null || _h === void 0 ? void 0 : _h.gradeSmooth) !== null && _j !== void 0 ? _j : true } }; if ((_k = options.streams) === null || _k === void 0 ? void 0 : _k.includeTypes) { this.streams.includeTypes = [...options.streams.includeTypes]; } this.gpx = { importTimedTracksAsRoutes: (_m = (_l = options.gpx) === null || _l === void 0 ? void 0 : _l.importTimedTracksAsRoutes) !== null && _m !== void 0 ? _m : false }; this.generateUnitStreams = (_o = options.generateUnitStreams) !== null && _o !== void 0 ? _o : true; } } exports.RouteParsingOptions = RouteParsingOptions; RouteParsingOptions.DEFAULT = new RouteParsingOptions();