@mchp-mcc/scf-pic8-pwm-v2 4.2.3 → 4.2.4
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/Changelog.md +7 -0
- package/Readme.md +52 -2
- package/lib/generated_module/src/index.js +0 -5
- package/output/autoCreator.js +3214 -0
- package/output/autoCreator.js.map +1 -0
- package/output/autoProcessor.js +3216 -0
- package/output/autoProcessor.js.map +1 -0
- package/output/creator.js +7655 -1339
- package/output/creator.js.map +1 -1
- package/output/nullPrototype.json +7 -1
- package/output/processor.js +5009 -3843
- package/output/processor.js.map +1 -1
- package/output/pwm-v2.c.ftl +15 -24
- package/output/pwm-v2.h.ftl +24 -78
- package/package.json +84 -22
- package/src/CreatorFunctions.ts +2 -2
- package/src/{DerivedData.tsx → DerivedData.ts} +23 -1
- package/src/catalog.json +23 -0
- package/src/moduleConfig.json +46 -5
|
@@ -0,0 +1,3214 @@
|
|
|
1
|
+
var autoCreator =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = "./generated_module/src/autoCreator.ts");
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ "./generated_module/src/Utils.ts":
|
|
91
|
+
/*!***************************************!*\
|
|
92
|
+
!*** ./generated_module/src/Utils.ts ***!
|
|
93
|
+
\***************************************/
|
|
94
|
+
/*! exports provided: getKeys, values, forEach, map, assertNotNull, toDictionary */
|
|
95
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
96
|
+
|
|
97
|
+
"use strict";
|
|
98
|
+
__webpack_require__.r(__webpack_exports__);
|
|
99
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getKeys", function() { return getKeys; });
|
|
100
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; });
|
|
101
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; });
|
|
102
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
|
|
103
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assertNotNull", function() { return assertNotNull; });
|
|
104
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toDictionary", function() { return toDictionary; });
|
|
105
|
+
/** @returns the non-prototype keys of the given object */
|
|
106
|
+
var getKeys = function getKeys(obj) {
|
|
107
|
+
/* eslint-disable-line */
|
|
108
|
+
return Object.getOwnPropertyNames(obj);
|
|
109
|
+
};
|
|
110
|
+
var values = function values(obj) {
|
|
111
|
+
return getKeys(obj).map(function (key) {
|
|
112
|
+
return obj[key];
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
var forEach = function forEach(obj, action) {
|
|
116
|
+
getKeys(obj).forEach(function (key) {
|
|
117
|
+
return action(key, obj[key]);
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
var map = function map(obj, mapper) {
|
|
121
|
+
return getKeys(obj).map(function (key) {
|
|
122
|
+
return mapper(key, obj[key]);
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
var assertNotNull = function assertNotNull(val, msg) {
|
|
126
|
+
if (val == null) {
|
|
127
|
+
throw new Error(msg);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
var toDictionary = function toDictionary(arr, keyMapper, valueMapper) {
|
|
131
|
+
var result = {};
|
|
132
|
+
arr.forEach(function (entry) {
|
|
133
|
+
result[keyMapper(entry)] = valueMapper(entry);
|
|
134
|
+
});
|
|
135
|
+
return result;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/***/ }),
|
|
139
|
+
|
|
140
|
+
/***/ "./generated_module/src/autoCreator.ts":
|
|
141
|
+
/*!*********************************************!*\
|
|
142
|
+
!*** ./generated_module/src/autoCreator.ts ***!
|
|
143
|
+
\*********************************************/
|
|
144
|
+
/*! exports provided: getCreatorFunctions */
|
|
145
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
146
|
+
|
|
147
|
+
"use strict";
|
|
148
|
+
__webpack_require__.r(__webpack_exports__);
|
|
149
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return getCreatorFunctions; });
|
|
150
|
+
/* harmony import */ var _getUserData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getUserData */ "./generated_module/src/getUserData.ts");
|
|
151
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
152
|
+
|
|
153
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
154
|
+
|
|
155
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
var createAutoCreator = function createAutoCreator(getCreatorFunctions) {
|
|
160
|
+
return function () {
|
|
161
|
+
return _objectSpread({
|
|
162
|
+
getModuleConfig: _getUserData__WEBPACK_IMPORTED_MODULE_0__["getModuleConfigFromFile"]
|
|
163
|
+
}, getCreatorFunctions());
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
var getCreatorFunctions = createAutoCreator(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getCreatorFunctions"]);
|
|
168
|
+
|
|
169
|
+
/***/ }),
|
|
170
|
+
|
|
171
|
+
/***/ "./generated_module/src/autoModule/AutoModuleHelpers.ts":
|
|
172
|
+
/*!**************************************************************!*\
|
|
173
|
+
!*** ./generated_module/src/autoModule/AutoModuleHelpers.ts ***!
|
|
174
|
+
\**************************************************************/
|
|
175
|
+
/*! exports provided: castComponent, getDefaultValue, getComboOptions, hasConfigBits, getRegisterValues, getSettingBits, getSettingFromComponent, getOptionValueByName, getSettingDefaultIfPresent, isInterface, getSettingOptionsIfPresent, getProcessedHandle, DependencySelector, getModuleDefaultDescription, getFriendlyInterfaceId */
|
|
176
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
177
|
+
|
|
178
|
+
"use strict";
|
|
179
|
+
__webpack_require__.r(__webpack_exports__);
|
|
180
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "castComponent", function() { return castComponent; });
|
|
181
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultValue", function() { return getDefaultValue; });
|
|
182
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getComboOptions", function() { return getComboOptions; });
|
|
183
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasConfigBits", function() { return hasConfigBits; });
|
|
184
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRegisterValues", function() { return getRegisterValues; });
|
|
185
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSettingBits", function() { return getSettingBits; });
|
|
186
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSettingFromComponent", function() { return getSettingFromComponent; });
|
|
187
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptionValueByName", function() { return getOptionValueByName; });
|
|
188
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSettingDefaultIfPresent", function() { return getSettingDefaultIfPresent; });
|
|
189
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInterface", function() { return isInterface; });
|
|
190
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSettingOptionsIfPresent", function() { return getSettingOptionsIfPresent; });
|
|
191
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProcessedHandle", function() { return getProcessedHandle; });
|
|
192
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DependencySelector", function() { return DependencySelector; });
|
|
193
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleDefaultDescription", function() { return getModuleDefaultDescription; });
|
|
194
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFriendlyInterfaceId", function() { return getFriendlyInterfaceId; });
|
|
195
|
+
/* harmony import */ var _microchip_scf_device_lib_CalculateRegisterValue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/scf-device/lib/CalculateRegisterValue */ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js");
|
|
196
|
+
/* harmony import */ var _microchip_scf_device_lib_CalculateRegisterValue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_device_lib_CalculateRegisterValue__WEBPACK_IMPORTED_MODULE_0__);
|
|
197
|
+
/* harmony import */ var _microchip_scf_device_lib_Setting__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @microchip/scf-device/lib/Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
|
|
198
|
+
/* harmony import */ var _microchip_scf_device_lib_Setting__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_device_lib_Setting__WEBPACK_IMPORTED_MODULE_1__);
|
|
199
|
+
/* harmony import */ var _microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
|
|
200
|
+
/* harmony import */ var _microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_2__);
|
|
201
|
+
/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Utils */ "./generated_module/src/Utils.ts");
|
|
202
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
203
|
+
|
|
204
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
205
|
+
|
|
206
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
207
|
+
|
|
208
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
209
|
+
|
|
210
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
211
|
+
|
|
212
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
213
|
+
|
|
214
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
215
|
+
|
|
216
|
+
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); }
|
|
217
|
+
|
|
218
|
+
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; }
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
var castComponent = function castComponent(component) {
|
|
225
|
+
switch (component.category) {
|
|
226
|
+
case "software":
|
|
227
|
+
return component;
|
|
228
|
+
|
|
229
|
+
case "import":
|
|
230
|
+
return component;
|
|
231
|
+
|
|
232
|
+
case "hardware":
|
|
233
|
+
return component;
|
|
234
|
+
|
|
235
|
+
default:
|
|
236
|
+
throw Error("Unsupported Component Type");
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
var getDefaultValue = function getDefaultValue(overrideDefaultValues, component) {
|
|
240
|
+
var _overrideDefaultValue;
|
|
241
|
+
|
|
242
|
+
return (_overrideDefaultValue = overrideDefaultValues === null || overrideDefaultValues === void 0 ? void 0 : overrideDefaultValues(component.name)) !== null && _overrideDefaultValue !== void 0 ? _overrideDefaultValue : component.type === "ComboBox" ? component.defaultValue.value : component.defaultValue;
|
|
243
|
+
};
|
|
244
|
+
var getComboOptions = function getComboOptions(overrideOptions, component) {
|
|
245
|
+
var _overrideOptions, _component$defaultVal;
|
|
246
|
+
|
|
247
|
+
return (_overrideOptions = overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions(component.name)) !== null && _overrideOptions !== void 0 ? _overrideOptions : component === null || component === void 0 ? void 0 : (_component$defaultVal = component.defaultValue) === null || _component$defaultVal === void 0 ? void 0 : _component$defaultVal["options"];
|
|
248
|
+
};
|
|
249
|
+
var hasConfigBits = function hasConfigBits(interfaceName) {
|
|
250
|
+
var _getFriendlyInterface;
|
|
251
|
+
|
|
252
|
+
return ((_getFriendlyInterface = getFriendlyInterfaceId(interfaceName)) === null || _getFriendlyInterface === void 0 ? void 0 : _getFriendlyInterface.indexOf("configuration_bits")) != -1;
|
|
253
|
+
};
|
|
254
|
+
var getRegisterValues = function getRegisterValues(model, interfaceName) {
|
|
255
|
+
var _model$getDerivedData, _model$getDerivedData2, _config$peripherals;
|
|
256
|
+
|
|
257
|
+
var registers = {};
|
|
258
|
+
var config = (_model$getDerivedData = (_model$getDerivedData2 = model.getDerivedData()).getModuleConfig) === null || _model$getDerivedData === void 0 ? void 0 : _model$getDerivedData.call(_model$getDerivedData2);
|
|
259
|
+
interfaceName = getFriendlyInterfaceId(interfaceName);
|
|
260
|
+
config === null || config === void 0 ? void 0 : (_config$peripherals = config.peripherals) === null || _config$peripherals === void 0 ? void 0 : _config$peripherals.forEach(function (peripheral) {
|
|
261
|
+
var _getFriendlyInterface2, _getKeys, _peripheral$registers;
|
|
262
|
+
|
|
263
|
+
var peripheralName = (_getFriendlyInterface2 = getFriendlyInterfaceId(peripheral.interfaceId.name)) !== null && _getFriendlyInterface2 !== void 0 ? _getFriendlyInterface2 : "";
|
|
264
|
+
if (hasConfigBits(peripheralName)) return;
|
|
265
|
+
if (interfaceName != undefined && peripheralName !== interfaceName || !peripheral.registers) return;
|
|
266
|
+
(_getKeys = Object(_Utils__WEBPACK_IMPORTED_MODULE_3__["getKeys"])((_peripheral$registers = peripheral.registers) !== null && _peripheral$registers !== void 0 ? _peripheral$registers : {})) === null || _getKeys === void 0 ? void 0 : _getKeys.forEach(function (regName) {
|
|
267
|
+
var _model$getHardware, _model$getHardware$ge, _peripheral$registers2, _reg$alias2;
|
|
268
|
+
|
|
269
|
+
var registerValue;
|
|
270
|
+
var reg = (_model$getHardware = model.getHardware(peripheralName)) === null || _model$getHardware === void 0 ? void 0 : (_model$getHardware$ge = _model$getHardware.getPeripheral().registers) === null || _model$getHardware$ge === void 0 ? void 0 : _model$getHardware$ge[regName];
|
|
271
|
+
|
|
272
|
+
if (reg) {
|
|
273
|
+
var _reg$alias;
|
|
274
|
+
|
|
275
|
+
registerValue = {
|
|
276
|
+
comment: "",
|
|
277
|
+
value: 0,
|
|
278
|
+
valueAsHex: "0x00",
|
|
279
|
+
name: reg === null || reg === void 0 ? void 0 : reg.name,
|
|
280
|
+
alias: (_reg$alias = reg === null || reg === void 0 ? void 0 : reg.alias) !== null && _reg$alias !== void 0 ? _reg$alias : reg === null || reg === void 0 ? void 0 : reg.name,
|
|
281
|
+
settings: {}
|
|
282
|
+
};
|
|
283
|
+
} else {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
var registerVal = _microchip_scf_device_lib_CalculateRegisterValue__WEBPACK_IMPORTED_MODULE_0___default.a["for"](reg);
|
|
288
|
+
var comments = [];
|
|
289
|
+
(_peripheral$registers2 = peripheral.registers) === null || _peripheral$registers2 === void 0 ? void 0 : _peripheral$registers2[regName].forEach(function (set) {
|
|
290
|
+
var _reg$settings, _getOptionValueByName, _model$getComponent2;
|
|
291
|
+
|
|
292
|
+
var setting = (_reg$settings = reg.settings) === null || _reg$settings === void 0 ? void 0 : _reg$settings[set.setting];
|
|
293
|
+
|
|
294
|
+
if (setting) {
|
|
295
|
+
var _registerValue;
|
|
296
|
+
|
|
297
|
+
if (setting.type !== "R") {
|
|
298
|
+
//Add Comments
|
|
299
|
+
comments.push("".concat(set.setting, " ").concat(model.getComponentValue(set.name), "; "));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if ((_registerValue = registerValue) === null || _registerValue === void 0 ? void 0 : _registerValue.settings) {
|
|
303
|
+
var _model$getComponent, _config$deviceType;
|
|
304
|
+
|
|
305
|
+
registerValue.settings[setting.alias] = getSettingBits(reg, setting, (_model$getComponent = model.getComponent(set.name)) === null || _model$getComponent === void 0 ? void 0 : _model$getComponent.value, (_config$deviceType = config === null || config === void 0 ? void 0 : config.deviceType) !== null && _config$deviceType !== void 0 ? _config$deviceType : "PIC");
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
switch (set.type) {
|
|
309
|
+
case "ComboBox":
|
|
310
|
+
case "boolean":
|
|
311
|
+
registerVal.withNumberValue(setting, (_getOptionValueByName = getOptionValueByName(setting, (_model$getComponent2 = model.getComponent(set.name)) === null || _model$getComponent2 === void 0 ? void 0 : _model$getComponent2.value)) !== null && _getOptionValueByName !== void 0 ? _getOptionValueByName : 0);
|
|
312
|
+
break;
|
|
313
|
+
|
|
314
|
+
case "number":
|
|
315
|
+
registerVal.withNumberValue(setting, model.getComponentValue(set.name));
|
|
316
|
+
break;
|
|
317
|
+
|
|
318
|
+
case "register":
|
|
319
|
+
case "string":
|
|
320
|
+
registerVal.withNumberValue(setting, Number(model.getComponentValue(set.name)));
|
|
321
|
+
break;
|
|
322
|
+
|
|
323
|
+
default:
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
if (reg.settings) {
|
|
330
|
+
registerValue.value = registerVal.asNumber();
|
|
331
|
+
} else {
|
|
332
|
+
var _model$getComponentVa, _peripheral$registers3, _peripheral$registers4, _peripheral$registers5, _peripheral$registers6;
|
|
333
|
+
|
|
334
|
+
registerValue.value = Number((_model$getComponentVa = model.getComponentValue((_peripheral$registers3 = (_peripheral$registers4 = peripheral.registers) === null || _peripheral$registers4 === void 0 ? void 0 : (_peripheral$registers5 = _peripheral$registers4[regName]) === null || _peripheral$registers5 === void 0 ? void 0 : (_peripheral$registers6 = _peripheral$registers5[0]) === null || _peripheral$registers6 === void 0 ? void 0 : _peripheral$registers6.name) !== null && _peripheral$registers3 !== void 0 ? _peripheral$registers3 : "")) !== null && _model$getComponentVa !== void 0 ? _model$getComponentVa : 0);
|
|
335
|
+
comments.push("".concat(registerValue.name, " ").concat(registerValue.value, "; "));
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
registerValue.valueAsHex = "0x" + registerValue.value.toString(16).toUpperCase();
|
|
339
|
+
registerValue.comment = sortComments(comments, reg);
|
|
340
|
+
registers[(_reg$alias2 = reg === null || reg === void 0 ? void 0 : reg.alias) !== null && _reg$alias2 !== void 0 ? _reg$alias2 : reg.name] = registerValue;
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
return registers;
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
var sortComments = function sortComments(comments, register) {
|
|
347
|
+
comments.sort(function (a, b) {
|
|
348
|
+
var _register$settings, _a$split$, _register$settings2, _b$split;
|
|
349
|
+
|
|
350
|
+
var settingA = (_register$settings = register.settings) === null || _register$settings === void 0 ? void 0 : _register$settings[(_a$split$ = a.split[" "]) === null || _a$split$ === void 0 ? void 0 : _a$split$[0]];
|
|
351
|
+
var settingB = (_register$settings2 = register.settings) === null || _register$settings2 === void 0 ? void 0 : _register$settings2[(_b$split = b.split(" ")) === null || _b$split === void 0 ? void 0 : _b$split[0]];
|
|
352
|
+
return Number(settingB === null || settingB === void 0 ? void 0 : settingB.mask) - Number(settingA === null || settingA === void 0 ? void 0 : settingA.mask);
|
|
353
|
+
});
|
|
354
|
+
return comments.join("");
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
var getSettingBits = function getSettingBits(register, setting, value, deviceType) {
|
|
358
|
+
var _getOptionByAlias$val, _getOptionByAlias;
|
|
359
|
+
|
|
360
|
+
var setValNumber = Number((_getOptionByAlias$val = (_getOptionByAlias = Object(_microchip_scf_device_lib_Setting__WEBPACK_IMPORTED_MODULE_1__["getOptionByAlias"])(value, setting)) === null || _getOptionByAlias === void 0 ? void 0 : _getOptionByAlias.value) !== null && _getOptionByAlias$val !== void 0 ? _getOptionByAlias$val : 0);
|
|
361
|
+
var settingValue = {
|
|
362
|
+
alias: setting.alias,
|
|
363
|
+
name: setting.name,
|
|
364
|
+
value: setValNumber !== null && setValNumber !== void 0 ? setValNumber : 0,
|
|
365
|
+
valueAsHex: "0x" + setValNumber.toString(16).toUpperCase(),
|
|
366
|
+
valueAsDescription: value,
|
|
367
|
+
bitName: deviceType === "PIC" ? "".concat(register.name, "bits.").concat(setting.name) : "".concat(register.name, ".").concat(setting.name)
|
|
368
|
+
};
|
|
369
|
+
return settingValue;
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
var getRegisterFromComponent = function getRegisterFromComponent(hardware, component) {
|
|
373
|
+
var _component$name$repla, _hardware$registers;
|
|
374
|
+
|
|
375
|
+
var registerName = (_component$name$repla = component.name.replace(component.setting.toLowerCase(), "")) === null || _component$name$repla === void 0 ? void 0 : _component$name$repla.toUpperCase();
|
|
376
|
+
var register = hardware === null || hardware === void 0 ? void 0 : (_hardware$registers = hardware.registers) === null || _hardware$registers === void 0 ? void 0 : _hardware$registers[registerName];
|
|
377
|
+
|
|
378
|
+
if (register) {
|
|
379
|
+
return register;
|
|
380
|
+
} else {
|
|
381
|
+
var _component$name$repla2, _hardware$registers2;
|
|
382
|
+
|
|
383
|
+
var regName = (_component$name$repla2 = component.name.replace(component.setting.toLowerCase(), "")) === null || _component$name$repla2 === void 0 ? void 0 : _component$name$repla2.toUpperCase();
|
|
384
|
+
var registers = Object(_Utils__WEBPACK_IMPORTED_MODULE_3__["getKeys"])((_hardware$registers2 = hardware === null || hardware === void 0 ? void 0 : hardware.registers) !== null && _hardware$registers2 !== void 0 ? _hardware$registers2 : {});
|
|
385
|
+
|
|
386
|
+
var _iterator = _createForOfIteratorHelper(registers !== null && registers !== void 0 ? registers : []),
|
|
387
|
+
_step;
|
|
388
|
+
|
|
389
|
+
try {
|
|
390
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
391
|
+
var reg = _step.value;
|
|
392
|
+
var modifiedRegName = reg.replace(/_/g, "");
|
|
393
|
+
|
|
394
|
+
if (regName === modifiedRegName) {
|
|
395
|
+
var _hardware$registers3;
|
|
396
|
+
|
|
397
|
+
return hardware === null || hardware === void 0 ? void 0 : (_hardware$registers3 = hardware.registers) === null || _hardware$registers3 === void 0 ? void 0 : _hardware$registers3[reg];
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
} catch (err) {
|
|
401
|
+
_iterator.e(err);
|
|
402
|
+
} finally {
|
|
403
|
+
_iterator.f();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
var getSettingFromComponent = function getSettingFromComponent(model, component) {
|
|
409
|
+
var _model$getDerivedData3, _model$getDerivedData4;
|
|
410
|
+
|
|
411
|
+
var config = (_model$getDerivedData3 = (_model$getDerivedData4 = model.getDerivedData()).getModuleConfig) === null || _model$getDerivedData3 === void 0 ? void 0 : _model$getDerivedData3.call(_model$getDerivedData4);
|
|
412
|
+
var setting;
|
|
413
|
+
|
|
414
|
+
if (model) {
|
|
415
|
+
var _config$peripherals2;
|
|
416
|
+
|
|
417
|
+
config === null || config === void 0 ? void 0 : (_config$peripherals2 = config.peripherals) === null || _config$peripherals2 === void 0 ? void 0 : _config$peripherals2.forEach(function (peripheral) {
|
|
418
|
+
var _model$getHardware2;
|
|
419
|
+
|
|
420
|
+
if (setting) return;
|
|
421
|
+
var peripheralName = getFriendlyInterfaceId(peripheral.interfaceId.name);
|
|
422
|
+
var hardware = (_model$getHardware2 = model.getHardware(peripheralName)) === null || _model$getHardware2 === void 0 ? void 0 : _model$getHardware2.getPeripheral();
|
|
423
|
+
var register = getRegisterFromComponent(hardware, component);
|
|
424
|
+
|
|
425
|
+
if (register && !register.settings) {
|
|
426
|
+
var _register$alias;
|
|
427
|
+
|
|
428
|
+
//No settings for this particular register. Create one
|
|
429
|
+
setting = {
|
|
430
|
+
alias: (_register$alias = register.alias) !== null && _register$alias !== void 0 ? _register$alias : register.name,
|
|
431
|
+
name: register.name,
|
|
432
|
+
defaultValue: register.defaultValue,
|
|
433
|
+
type: register.type,
|
|
434
|
+
description: register.desc,
|
|
435
|
+
porDefault: register.defaultValue
|
|
436
|
+
};
|
|
437
|
+
} else {
|
|
438
|
+
var _register$settings3;
|
|
439
|
+
|
|
440
|
+
setting = register === null || register === void 0 ? void 0 : (_register$settings3 = register.settings) === null || _register$settings3 === void 0 ? void 0 : _register$settings3[component.setting];
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
return setting;
|
|
446
|
+
};
|
|
447
|
+
var getOptionValueByName = function getOptionValueByName(setting, optionName) {
|
|
448
|
+
if (!setting) return undefined;
|
|
449
|
+
var optionValue = setting.porDefault;
|
|
450
|
+
|
|
451
|
+
if (setting.options) {
|
|
452
|
+
setting.options.forEach(function (option) {
|
|
453
|
+
if (option.name === optionName || option.description === optionName) {
|
|
454
|
+
optionValue = option.value;
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
return Number(optionValue);
|
|
460
|
+
};
|
|
461
|
+
var getSettingDefaultIfPresent = function getSettingDefaultIfPresent(component, setting, overrideDefaultValue) {
|
|
462
|
+
var defaultValue;
|
|
463
|
+
|
|
464
|
+
if (overrideDefaultValue !== undefined) {
|
|
465
|
+
return overrideDefaultValue;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (component.overrideDefaultValue) {
|
|
469
|
+
return component.overrideDefaultValue;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (setting === null || setting === void 0 ? void 0 : setting.defaultValue) {
|
|
473
|
+
var _option, _component$displayOpt;
|
|
474
|
+
|
|
475
|
+
var option = Object(_microchip_scf_device_lib_Setting__WEBPACK_IMPORTED_MODULE_1__["getOptionByName"])(setting.defaultValue, setting);
|
|
476
|
+
defaultValue = (_option = option === null || option === void 0 ? void 0 : option[(_component$displayOpt = component.displayOptionSetting) !== null && _component$displayOpt !== void 0 ? _component$displayOpt : "alias"]) !== null && _option !== void 0 ? _option : setting.defaultValue;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
return defaultValue;
|
|
480
|
+
};
|
|
481
|
+
var isInterface = function isInterface(idA, idB) {
|
|
482
|
+
return idA.name == idB.name;
|
|
483
|
+
};
|
|
484
|
+
var getSettingOptionsIfPresent = function getSettingOptionsIfPresent(component, setting, masterComponentValue) {
|
|
485
|
+
var options = [""];
|
|
486
|
+
|
|
487
|
+
if (setting) {
|
|
488
|
+
var _setting$options;
|
|
489
|
+
|
|
490
|
+
var filteredOptions = component.mode ? filterModeOptions((_setting$options = setting.options) !== null && _setting$options !== void 0 ? _setting$options : [], component, masterComponentValue) : setting.options;
|
|
491
|
+
options = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_2__["map"])(filteredOptions !== null && filteredOptions !== void 0 ? filteredOptions : [], function (option) {
|
|
492
|
+
var _option2, _component$displayOpt2;
|
|
493
|
+
|
|
494
|
+
return (_option2 = option[(_component$displayOpt2 = component.displayOptionSetting) !== null && _component$displayOpt2 !== void 0 ? _component$displayOpt2 : "alias"]) !== null && _option2 !== void 0 ? _option2 : option.alias;
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
return options;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
var filterModeOptions = function filterModeOptions(options, component, masterComponentValue) {
|
|
502
|
+
var _component$mode, _getKeys2, _component$mode$optio, _component$mode2;
|
|
503
|
+
|
|
504
|
+
if (((_component$mode = component.mode) === null || _component$mode === void 0 ? void 0 : _component$mode.operation) != "filterOptions" || masterComponentValue == undefined) return options; //Determine mode
|
|
505
|
+
|
|
506
|
+
var mode = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_2__["find"])((_getKeys2 = Object(_Utils__WEBPACK_IMPORTED_MODULE_3__["getKeys"])((_component$mode$optio = (_component$mode2 = component.mode) === null || _component$mode2 === void 0 ? void 0 : _component$mode2.optionModes) !== null && _component$mode$optio !== void 0 ? _component$mode$optio : {})) !== null && _getKeys2 !== void 0 ? _getKeys2 : [], function (mode) {
|
|
507
|
+
var _component$mode3, _component$mode3$opti;
|
|
508
|
+
|
|
509
|
+
var match = (_component$mode3 = component.mode) === null || _component$mode3 === void 0 ? void 0 : (_component$mode3$opti = _component$mode3.optionModes) === null || _component$mode3$opti === void 0 ? void 0 : _component$mode3$opti[mode];
|
|
510
|
+
|
|
511
|
+
if (match) {
|
|
512
|
+
var _masterComponentValue, _masterComponentValue2;
|
|
513
|
+
|
|
514
|
+
return ((_masterComponentValue = masterComponentValue === null || masterComponentValue === void 0 ? void 0 : (_masterComponentValue2 = masterComponentValue.match(match)) === null || _masterComponentValue2 === void 0 ? void 0 : _masterComponentValue2.length) !== null && _masterComponentValue !== void 0 ? _masterComponentValue : -1) > 0;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
return false;
|
|
518
|
+
});
|
|
519
|
+
var filteredOptions = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_2__["filter"])(options !== null && options !== void 0 ? options : [], function (option) {
|
|
520
|
+
if (option.mode && mode) {
|
|
521
|
+
var _component$mode4, _component$mode4$opti;
|
|
522
|
+
|
|
523
|
+
var match = (_component$mode4 = component.mode) === null || _component$mode4 === void 0 ? void 0 : (_component$mode4$opti = _component$mode4.optionModes) === null || _component$mode4$opti === void 0 ? void 0 : _component$mode4$opti[mode];
|
|
524
|
+
|
|
525
|
+
if (match) {
|
|
526
|
+
var _option$mode$match$le, _option$mode$match;
|
|
527
|
+
|
|
528
|
+
return ((_option$mode$match$le = (_option$mode$match = option.mode.match(match)) === null || _option$mode$match === void 0 ? void 0 : _option$mode$match.length) !== null && _option$mode$match$le !== void 0 ? _option$mode$match$le : -1) > 0;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
return true;
|
|
533
|
+
});
|
|
534
|
+
return filteredOptions;
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
var getProcessedHandle = function getProcessedHandle(handle, payload) {
|
|
538
|
+
if (handle) {
|
|
539
|
+
var _ref, _ref2, _payload$moduleName;
|
|
540
|
+
|
|
541
|
+
handle = _objectSpread(_objectSpread({}, handle), {}, {
|
|
542
|
+
label: (_ref = (_ref2 = (_payload$moduleName = payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _payload$moduleName !== void 0 ? _payload$moduleName : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _ref2 !== void 0 ? _ref2 : handle.label) !== null && _ref !== void 0 ? _ref : handle.providerId + " : " + handle.exportId
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
return handle;
|
|
547
|
+
};
|
|
548
|
+
var DependencySelector = /*#__PURE__*/function () {
|
|
549
|
+
function DependencySelector(model, component) {
|
|
550
|
+
var _this = this;
|
|
551
|
+
|
|
552
|
+
_classCallCheck(this, DependencySelector);
|
|
553
|
+
|
|
554
|
+
_defineProperty(this, "noneSelection", {
|
|
555
|
+
label: "None"
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
_defineProperty(this, "model", void 0);
|
|
559
|
+
|
|
560
|
+
_defineProperty(this, "component", void 0);
|
|
561
|
+
|
|
562
|
+
_defineProperty(this, "createOptionEntry", function (option) {
|
|
563
|
+
return {
|
|
564
|
+
label: _this.createOptionLabel(option.handle, option.payload),
|
|
565
|
+
value: option
|
|
566
|
+
};
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
_defineProperty(this, "createOptionLabel", function (handle, payload) {
|
|
570
|
+
var _getProcessedHandle$l, _getProcessedHandle;
|
|
571
|
+
|
|
572
|
+
return (_getProcessedHandle$l = (_getProcessedHandle = getProcessedHandle(handle, payload)) === null || _getProcessedHandle === void 0 ? void 0 : _getProcessedHandle.label) !== null && _getProcessedHandle$l !== void 0 ? _getProcessedHandle$l : "";
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
this.model = model;
|
|
576
|
+
this.component = component;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
_createClass(DependencySelector, [{
|
|
580
|
+
key: "generateDropdownOptions",
|
|
581
|
+
value: function generateDropdownOptions() {
|
|
582
|
+
var dropdownOptions = [];
|
|
583
|
+
var thisImport = this.model.getImports()[this.component.importId];
|
|
584
|
+
var options = thisImport === null || thisImport === void 0 ? void 0 : thisImport.options;
|
|
585
|
+
|
|
586
|
+
if (this.shouldAllowUnselectDependency(thisImport, options)) {
|
|
587
|
+
dropdownOptions.push(this.noneSelection);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
if (options) {
|
|
591
|
+
for (var option in options) {
|
|
592
|
+
dropdownOptions.push(this.createOptionEntry(options[option]));
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
return dropdownOptions;
|
|
597
|
+
}
|
|
598
|
+
}, {
|
|
599
|
+
key: "getDropdownOptionNames",
|
|
600
|
+
value: function getDropdownOptionNames() {
|
|
601
|
+
var names = [];
|
|
602
|
+
this.generateDropdownOptions().forEach(function (option) {
|
|
603
|
+
return names.push(option.label);
|
|
604
|
+
});
|
|
605
|
+
return names;
|
|
606
|
+
}
|
|
607
|
+
}, {
|
|
608
|
+
key: "shouldAllowUnselectDependency",
|
|
609
|
+
value: function shouldAllowUnselectDependency(thisImport, options) {
|
|
610
|
+
return thisImport != undefined && thisImport.isUnassignable != false && options !== undefined;
|
|
611
|
+
}
|
|
612
|
+
}]);
|
|
613
|
+
|
|
614
|
+
return DependencySelector;
|
|
615
|
+
}();
|
|
616
|
+
function getModuleDefaultDescription() {
|
|
617
|
+
//TODO: Need to refactor this so that gets it from the source.
|
|
618
|
+
//Alternatively, we could get it during the automodule update process and fetch it from there...
|
|
619
|
+
return undefined;
|
|
620
|
+
}
|
|
621
|
+
var getFriendlyInterfaceId = function getFriendlyInterfaceId(interfaceName) {
|
|
622
|
+
var _interfaceName;
|
|
623
|
+
|
|
624
|
+
interfaceName = (_interfaceName = interfaceName) === null || _interfaceName === void 0 ? void 0 : _interfaceName.replace(/ /g, "").replace(/-/g, "_");
|
|
625
|
+
return interfaceName;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
/***/ }),
|
|
629
|
+
|
|
630
|
+
/***/ "./generated_module/src/autoModule/AutoModuleTemplates.ts":
|
|
631
|
+
/*!****************************************************************!*\
|
|
632
|
+
!*** ./generated_module/src/autoModule/AutoModuleTemplates.ts ***!
|
|
633
|
+
\****************************************************************/
|
|
634
|
+
/*! exports provided: getTemplatePayload, getTemplateSettings, getConfigBits */
|
|
635
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
636
|
+
|
|
637
|
+
"use strict";
|
|
638
|
+
__webpack_require__.r(__webpack_exports__);
|
|
639
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTemplatePayload", function() { return getTemplatePayload; });
|
|
640
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTemplateSettings", function() { return getTemplateSettings; });
|
|
641
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfigBits", function() { return getConfigBits; });
|
|
642
|
+
/* harmony import */ var _microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
|
|
643
|
+
/* harmony import */ var _microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_0__);
|
|
644
|
+
/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Utils */ "./generated_module/src/Utils.ts");
|
|
645
|
+
/* harmony import */ var _AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AutoModuleHelpers */ "./generated_module/src/autoModule/AutoModuleHelpers.ts");
|
|
646
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
647
|
+
|
|
648
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
649
|
+
|
|
650
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
var getTemplatePayload = function getTemplatePayload(model) {
|
|
657
|
+
var _model$getDerivedData, _model$getDerivedData2, _values;
|
|
658
|
+
|
|
659
|
+
if (!model) return undefined;
|
|
660
|
+
var config = (_model$getDerivedData = (_model$getDerivedData2 = model.getDerivedData()).getModuleConfig) === null || _model$getDerivedData === void 0 ? void 0 : _model$getDerivedData.call(_model$getDerivedData2);
|
|
661
|
+
var moduleName = model.getName();
|
|
662
|
+
var templatePayload = {
|
|
663
|
+
name: {
|
|
664
|
+
uppercase: moduleName.toUpperCase(),
|
|
665
|
+
lowercase: moduleName.toLowerCase(),
|
|
666
|
+
instance: moduleName
|
|
667
|
+
},
|
|
668
|
+
filename: {
|
|
669
|
+
source: "".concat(moduleName.toLowerCase(), ".c"),
|
|
670
|
+
header: "".concat(moduleName.toLowerCase(), ".h")
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
var components = model.getAutoModuleAppModel().getAllComponents();
|
|
674
|
+
(_values = Object(_Utils__WEBPACK_IMPORTED_MODULE_1__["values"])(components)) === null || _values === void 0 ? void 0 : _values.forEach(function (entry) {
|
|
675
|
+
templatePayload[entry.component.name] = getComponentPayload(entry.component, model);
|
|
676
|
+
});
|
|
677
|
+
templatePayload = _objectSpread(_objectSpread({}, templatePayload), getTemplateSettings(model, config));
|
|
678
|
+
return templatePayload;
|
|
679
|
+
};
|
|
680
|
+
var getTemplateSettings = function getTemplateSettings(model, config) {
|
|
681
|
+
var _model$getHardware, _model$getHardware2;
|
|
682
|
+
|
|
683
|
+
if (!(model === null || model === void 0 ? void 0 : model.getHardware())) return undefined;
|
|
684
|
+
return {
|
|
685
|
+
registers: model.getRegisterValues(undefined),
|
|
686
|
+
interrupts: (_model$getHardware = model.getHardware()) === null || _model$getHardware === void 0 ? void 0 : _model$getHardware.getPeripheral().interrupts,
|
|
687
|
+
properties: (_model$getHardware2 = model.getHardware()) === null || _model$getHardware2 === void 0 ? void 0 : _model$getHardware2.getPeripheral().properties
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
var getConfigBits = function getConfigBits(model) {
|
|
691
|
+
var _model$getDerivedData3, _model$getDerivedData4, _config$peripherals;
|
|
692
|
+
|
|
693
|
+
var config = (_model$getDerivedData3 = (_model$getDerivedData4 = model.getDerivedData()).getModuleConfig) === null || _model$getDerivedData3 === void 0 ? void 0 : _model$getDerivedData3.call(_model$getDerivedData4);
|
|
694
|
+
var configModule = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_0__["find"])((_config$peripherals = config === null || config === void 0 ? void 0 : config.peripherals) !== null && _config$peripherals !== void 0 ? _config$peripherals : [], function (peripheral) {
|
|
695
|
+
return _AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_2__["hasConfigBits"](peripheral.interfaceId.name);
|
|
696
|
+
});
|
|
697
|
+
|
|
698
|
+
if (configModule) {
|
|
699
|
+
var _model$getHardware3, _getKeys;
|
|
700
|
+
|
|
701
|
+
var interfaceName = _AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_2__["getFriendlyInterfaceId"](configModule.interfaceId.name);
|
|
702
|
+
var templateConfigBits = {};
|
|
703
|
+
var registers = (_model$getHardware3 = model.getHardware(interfaceName)) === null || _model$getHardware3 === void 0 ? void 0 : _model$getHardware3.getPeripheral().registers;
|
|
704
|
+
(_getKeys = Object(_Utils__WEBPACK_IMPORTED_MODULE_1__["getKeys"])(registers !== null && registers !== void 0 ? registers : [])) === null || _getKeys === void 0 ? void 0 : _getKeys.forEach(function (configName) {
|
|
705
|
+
var _configModule$registe;
|
|
706
|
+
|
|
707
|
+
var configBits = (_configModule$registe = configModule.registers) === null || _configModule$registe === void 0 ? void 0 : _configModule$registe[configName];
|
|
708
|
+
templateConfigBits = _objectSpread(_objectSpread({}, templateConfigBits), {}, _defineProperty({}, configName, {}));
|
|
709
|
+
configBits === null || configBits === void 0 ? void 0 : configBits.forEach(function (configBit) {
|
|
710
|
+
var _model$getComponent5;
|
|
711
|
+
|
|
712
|
+
var register = registers === null || registers === void 0 ? void 0 : registers[configName];
|
|
713
|
+
var value;
|
|
714
|
+
|
|
715
|
+
if (register && !register.settings) {
|
|
716
|
+
var _model$getComponent$v, _model$getComponent;
|
|
717
|
+
|
|
718
|
+
//missing settings for register
|
|
719
|
+
value = (_model$getComponent$v = (_model$getComponent = model.getComponent(configBit.name)) === null || _model$getComponent === void 0 ? void 0 : _model$getComponent.value) !== null && _model$getComponent$v !== void 0 ? _model$getComponent$v : "";
|
|
720
|
+
} else {
|
|
721
|
+
var _registers$configName, _registers$configName2, _find$name, _find, _setting$options;
|
|
722
|
+
|
|
723
|
+
var setting = registers === null || registers === void 0 ? void 0 : (_registers$configName = registers[configName]) === null || _registers$configName === void 0 ? void 0 : (_registers$configName2 = _registers$configName.settings) === null || _registers$configName2 === void 0 ? void 0 : _registers$configName2[configBit.setting];
|
|
724
|
+
value = (_find$name = (_find = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_0__["find"])((_setting$options = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _setting$options !== void 0 ? _setting$options : [], function (option) {
|
|
725
|
+
var _model$getComponent2, _model$getComponent3, _model$getComponent4;
|
|
726
|
+
|
|
727
|
+
return option.description === ((_model$getComponent2 = model.getComponent(configBit.name)) === null || _model$getComponent2 === void 0 ? void 0 : _model$getComponent2.value) || option.alias === ((_model$getComponent3 = model.getComponent(configBit.name)) === null || _model$getComponent3 === void 0 ? void 0 : _model$getComponent3.value) || option.name === ((_model$getComponent4 = model.getComponent(configBit.name)) === null || _model$getComponent4 === void 0 ? void 0 : _model$getComponent4.value);
|
|
728
|
+
})) === null || _find === void 0 ? void 0 : _find.name) !== null && _find$name !== void 0 ? _find$name : "";
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
templateConfigBits[configName][configBit.setting] = {
|
|
732
|
+
name: configBit.setting,
|
|
733
|
+
value: value,
|
|
734
|
+
description: configBit.description,
|
|
735
|
+
valueAsDescription: (_model$getComponent5 = model.getComponent(configBit.name)) === null || _model$getComponent5 === void 0 ? void 0 : _model$getComponent5.value
|
|
736
|
+
};
|
|
737
|
+
});
|
|
738
|
+
});
|
|
739
|
+
return templateConfigBits;
|
|
740
|
+
} else {
|
|
741
|
+
return {};
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
var getComponentPayload = function getComponentPayload(component, model) {
|
|
746
|
+
var componentValue = model.getComponentValue(component.name);
|
|
747
|
+
|
|
748
|
+
switch (component.type) {
|
|
749
|
+
case "ComboBox":
|
|
750
|
+
if (component.category === "hardware") {
|
|
751
|
+
var _component$mode$maste, _component$mode;
|
|
752
|
+
|
|
753
|
+
var setting = _AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_2__["getSettingFromComponent"](model, component);
|
|
754
|
+
return {
|
|
755
|
+
value: componentValue,
|
|
756
|
+
options: _AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_2__["getSettingOptionsIfPresent"](component, setting, model.getComponentValue((_component$mode$maste = (_component$mode = component.mode) === null || _component$mode === void 0 ? void 0 : _component$mode.masterComponent) !== null && _component$mode$maste !== void 0 ? _component$mode$maste : ""))
|
|
757
|
+
};
|
|
758
|
+
} else if (component.category === "software") {
|
|
759
|
+
return {
|
|
760
|
+
value: componentValue,
|
|
761
|
+
options: Object(_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_2__["getComboOptions"])(model.getDerivedFunctions().overrideOptions, component)
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
break;
|
|
766
|
+
|
|
767
|
+
case "boolean":
|
|
768
|
+
return model.isComponentValue(component.name);
|
|
769
|
+
|
|
770
|
+
case "number":
|
|
771
|
+
case "string":
|
|
772
|
+
case "register":
|
|
773
|
+
default:
|
|
774
|
+
return componentValue;
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
/***/ }),
|
|
779
|
+
|
|
780
|
+
/***/ "./generated_module/src/getUserData.ts":
|
|
781
|
+
/*!*********************************************!*\
|
|
782
|
+
!*** ./generated_module/src/getUserData.ts ***!
|
|
783
|
+
\*********************************************/
|
|
784
|
+
/*! exports provided: getCreatorFunctions, getDerivedData, getPinsDataFromFile, getPinsLogicFromFile, getModuleConfigFromFile */
|
|
785
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
786
|
+
|
|
787
|
+
"use strict";
|
|
788
|
+
__webpack_require__.r(__webpack_exports__);
|
|
789
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsDataFromFile", function() { return getPinsDataFromFile; });
|
|
790
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsLogicFromFile", function() { return getPinsLogicFromFile; });
|
|
791
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleConfigFromFile", function() { return getModuleConfigFromFile; });
|
|
792
|
+
/* harmony import */ var _src_CreatorFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../src/CreatorFunctions */ "./src/CreatorFunctions.ts");
|
|
793
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return _src_CreatorFunctions__WEBPACK_IMPORTED_MODULE_0__["getCreatorFunctions"]; });
|
|
794
|
+
|
|
795
|
+
/* harmony import */ var _src_DerivedData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../src/DerivedData */ "./src/DerivedData.ts");
|
|
796
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return _src_DerivedData__WEBPACK_IMPORTED_MODULE_1__["getDerivedData"]; });
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
var getPinsDataFromFile = function getPinsDataFromFile() {
|
|
801
|
+
try {
|
|
802
|
+
return __webpack_require__(/*! ../../src/pinsdata.json */ "./src/pinsdata.json");
|
|
803
|
+
} catch (_unused) {
|
|
804
|
+
return undefined;
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
var getPinsLogicFromFile = function getPinsLogicFromFile() {
|
|
808
|
+
try {
|
|
809
|
+
return __webpack_require__(/*! ../../src/PinsLogic.ts */ "./src/PinsLogic.ts");
|
|
810
|
+
} catch (_unused2) {
|
|
811
|
+
return undefined;
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
var getModuleConfigFromFile = function getModuleConfigFromFile() {
|
|
815
|
+
try {
|
|
816
|
+
return __webpack_require__(/*! ../../src/moduleConfig.json */ "./src/moduleConfig.json");
|
|
817
|
+
} catch (_unused3) {
|
|
818
|
+
return undefined;
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
/***/ }),
|
|
823
|
+
|
|
824
|
+
/***/ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js":
|
|
825
|
+
/*!**************************************************************************************!*\
|
|
826
|
+
!*** ./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js ***!
|
|
827
|
+
\**************************************************************************************/
|
|
828
|
+
/*! no static exports found */
|
|
829
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
830
|
+
|
|
831
|
+
"use strict";
|
|
832
|
+
|
|
833
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
834
|
+
exports.getAutoSdlHelp = void 0;
|
|
835
|
+
/**
|
|
836
|
+
* Returns the valid link for each component of a module
|
|
837
|
+
*
|
|
838
|
+
* @param dataModel - AppModel for current module
|
|
839
|
+
* @param componentName - Current component under the module
|
|
840
|
+
* @param helpUrl - Generic url
|
|
841
|
+
* @returns Valid link to microchip docs
|
|
842
|
+
*/
|
|
843
|
+
var getAutoSdlHelp = function (dataModel, componentName, helpUrl) {
|
|
844
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
845
|
+
var deviceMeta = dataModel.getImportValue("device_meta");
|
|
846
|
+
var deviceName = (_a = deviceMeta === null || deviceMeta === void 0 ? void 0 : deviceMeta.deviceName) !== null && _a !== void 0 ? _a : "";
|
|
847
|
+
var moduleName = (_d = (_c = (_b = dataModel.getHardware()) === null || _b === void 0 ? void 0 : _b.getPeripheral()) === null || _c === void 0 ? void 0 : _c.group) !== null && _d !== void 0 ? _d : "";
|
|
848
|
+
var dosid = (_g = (_f = (_e = dataModel.getHardware()) === null || _e === void 0 ? void 0 : _e.getPeripheral()) === null || _f === void 0 ? void 0 : _f.dosid) !== null && _g !== void 0 ? _g : "";
|
|
849
|
+
var comp = (_j = (_h = dataModel.getComponent(componentName)) === null || _h === void 0 ? void 0 : _h.component) !== null && _j !== void 0 ? _j : "";
|
|
850
|
+
var setting = (_l = (_k = comp === null || comp === void 0 ? void 0 : comp.setting) === null || _k === void 0 ? void 0 : _k.toLowerCase()) !== null && _l !== void 0 ? _l : "";
|
|
851
|
+
var registerName = componentName.toLowerCase().replace(setting, "");
|
|
852
|
+
var registerAlias = (_m = registerName === null || registerName === void 0 ? void 0 : registerName.toUpperCase()) !== null && _m !== void 0 ? _m : "";
|
|
853
|
+
var deviceRegister = (_r = (_q = (_p = (_o = dataModel.getPeripheralDescription()) === null || _o === void 0 ? void 0 : _o.registers) === null || _p === void 0 ? void 0 : _p[registerAlias]) === null || _q === void 0 ? void 0 : _q.name) !== null && _r !== void 0 ? _r : "";
|
|
854
|
+
var register = registerAlias == deviceRegister ? registerAlias : deviceRegister;
|
|
855
|
+
var url = helpUrl
|
|
856
|
+
.replace("${deviceName}", deviceName !== null && deviceName !== void 0 ? deviceName : "")
|
|
857
|
+
.replace("${registerName}", register !== null && register !== void 0 ? register : "")
|
|
858
|
+
.replace("${moduleName}", moduleName !== null && moduleName !== void 0 ? moduleName : "")
|
|
859
|
+
.replace("${dosId}", dosid !== null && dosid !== void 0 ? dosid : "");
|
|
860
|
+
return url;
|
|
861
|
+
};
|
|
862
|
+
exports.getAutoSdlHelp = getAutoSdlHelp;
|
|
863
|
+
//# sourceMappingURL=ContextualHelp.js.map
|
|
864
|
+
|
|
865
|
+
/***/ }),
|
|
866
|
+
|
|
867
|
+
/***/ "./node_modules/@microchip/scf-common/lib/Processor.js":
|
|
868
|
+
/*!*************************************************************!*\
|
|
869
|
+
!*** ./node_modules/@microchip/scf-common/lib/Processor.js ***!
|
|
870
|
+
\*************************************************************/
|
|
871
|
+
/*! no static exports found */
|
|
872
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
873
|
+
|
|
874
|
+
"use strict";
|
|
875
|
+
|
|
876
|
+
var __assign = (this && this.__assign) || function () {
|
|
877
|
+
__assign = Object.assign || function(t) {
|
|
878
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
879
|
+
s = arguments[i];
|
|
880
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
881
|
+
t[p] = s[p];
|
|
882
|
+
}
|
|
883
|
+
return t;
|
|
884
|
+
};
|
|
885
|
+
return __assign.apply(this, arguments);
|
|
886
|
+
};
|
|
887
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
888
|
+
exports.mapOptionLabels = exports.filterOptions = exports.isSingleton = exports.isUnassigned = exports.isAssigned = exports.hasOptions = exports.AlertTypes = void 0;
|
|
889
|
+
var AlertTypes;
|
|
890
|
+
(function (AlertTypes) {
|
|
891
|
+
AlertTypes["Error"] = "error";
|
|
892
|
+
AlertTypes["Warning"] = "warning";
|
|
893
|
+
AlertTypes["Hint"] = "hint";
|
|
894
|
+
})(AlertTypes = exports.AlertTypes || (exports.AlertTypes = {}));
|
|
895
|
+
/**
|
|
896
|
+
* See User-Defined Type Guards in the Typescript Handbook on Advanced Types
|
|
897
|
+
* @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
|
|
898
|
+
*/
|
|
899
|
+
function hasOptions(dep) {
|
|
900
|
+
return dep.options !== undefined;
|
|
901
|
+
}
|
|
902
|
+
exports.hasOptions = hasOptions;
|
|
903
|
+
/**
|
|
904
|
+
* See User-Defined Type Guards in the Typescript Handbook on Advanced Types
|
|
905
|
+
* @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
|
|
906
|
+
*/
|
|
907
|
+
function isAssigned(dep) {
|
|
908
|
+
return typeof dep.handle !== "undefined";
|
|
909
|
+
}
|
|
910
|
+
exports.isAssigned = isAssigned;
|
|
911
|
+
/**
|
|
912
|
+
* See User-Defined Type Guards in the Typescript Handbook on Advanced Types
|
|
913
|
+
* @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
|
|
914
|
+
*/
|
|
915
|
+
function isUnassigned(dep) {
|
|
916
|
+
return typeof dep.handle === "undefined";
|
|
917
|
+
}
|
|
918
|
+
exports.isUnassigned = isUnassigned;
|
|
919
|
+
/**
|
|
920
|
+
* Type guard function for SingletonExport
|
|
921
|
+
* See User-Defined Type Guards in the Typescript Handbook on Advanced Types
|
|
922
|
+
* @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
|
|
923
|
+
* @param resource the export to check on being a singleton
|
|
924
|
+
* @deprecated No longer used. Replaced with dynamic singleton identification
|
|
925
|
+
* at runtime.
|
|
926
|
+
*/
|
|
927
|
+
function isSingleton(resource) {
|
|
928
|
+
return typeof resource.isSingleton !== "undefined" && resource.isSingleton;
|
|
929
|
+
}
|
|
930
|
+
exports.isSingleton = isSingleton;
|
|
931
|
+
/**
|
|
932
|
+
* Returns a copy of `populatedImport` with all options removed which
|
|
933
|
+
* cause `optionFilter` to return false.
|
|
934
|
+
*/
|
|
935
|
+
function filterOptions(populatedImport, optionFilter) {
|
|
936
|
+
if (populatedImport.options) {
|
|
937
|
+
return __assign(__assign({}, populatedImport), { options: populatedImport.options.filter(optionFilter) });
|
|
938
|
+
}
|
|
939
|
+
return populatedImport;
|
|
940
|
+
}
|
|
941
|
+
exports.filterOptions = filterOptions;
|
|
942
|
+
/**
|
|
943
|
+
* Returns a copy of `populatedImport` with the options' handle labels
|
|
944
|
+
* mapped according to `labelFactory`.
|
|
945
|
+
*/
|
|
946
|
+
function mapOptionLabels(populatedImport, labelFactory) {
|
|
947
|
+
if (populatedImport.options) {
|
|
948
|
+
return __assign(__assign({}, populatedImport), { options: populatedImport.options.map(function (option) {
|
|
949
|
+
return __assign(__assign({}, option), { handle: __assign(__assign({}, option.handle), { label: labelFactory(option) }) });
|
|
950
|
+
}) });
|
|
951
|
+
}
|
|
952
|
+
return populatedImport;
|
|
953
|
+
}
|
|
954
|
+
exports.mapOptionLabels = mapOptionLabels;
|
|
955
|
+
//# sourceMappingURL=Processor.js.map
|
|
956
|
+
|
|
957
|
+
/***/ }),
|
|
958
|
+
|
|
959
|
+
/***/ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js":
|
|
960
|
+
/*!**************************************************************************!*\
|
|
961
|
+
!*** ./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js ***!
|
|
962
|
+
\**************************************************************************/
|
|
963
|
+
/*! no static exports found */
|
|
964
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
965
|
+
|
|
966
|
+
"use strict";
|
|
967
|
+
|
|
968
|
+
var __extends = (this && this.__extends) || (function () {
|
|
969
|
+
var extendStatics = function (d, b) {
|
|
970
|
+
extendStatics = Object.setPrototypeOf ||
|
|
971
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
972
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
973
|
+
return extendStatics(d, b);
|
|
974
|
+
};
|
|
975
|
+
return function (d, b) {
|
|
976
|
+
if (typeof b !== "function" && b !== null)
|
|
977
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
978
|
+
extendStatics(d, b);
|
|
979
|
+
function __() { this.constructor = d; }
|
|
980
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
981
|
+
};
|
|
982
|
+
})();
|
|
983
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
984
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
985
|
+
if (ar || !(i in from)) {
|
|
986
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
987
|
+
ar[i] = from[i];
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
991
|
+
};
|
|
992
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
993
|
+
var Setting_1 = __webpack_require__(/*! ./Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
|
|
994
|
+
var Register_1 = __webpack_require__(/*! ./Register */ "./node_modules/@microchip/scf-device/lib/Register.js");
|
|
995
|
+
var Arrays_1 = __webpack_require__(/*! ./util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
|
|
996
|
+
/** Builder pattern */
|
|
997
|
+
var CalculateRegisterValue = /** @class */ (function () {
|
|
998
|
+
function CalculateRegisterValue(register) {
|
|
999
|
+
var _this = this;
|
|
1000
|
+
this.modifiedSettings = [];
|
|
1001
|
+
/** Assign a numerical value to the given `Setting`. */
|
|
1002
|
+
this.withNumberValue = function (setting, value) {
|
|
1003
|
+
if (setting === undefined) {
|
|
1004
|
+
throw new Error("Cannot assign number value to setting, setting is undefined.");
|
|
1005
|
+
}
|
|
1006
|
+
if (!_this.getSetting(setting)) {
|
|
1007
|
+
throw new Error("Setting ".concat(setting.alias, " is not present in Register ").concat(_this.register.name));
|
|
1008
|
+
}
|
|
1009
|
+
_this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [
|
|
1010
|
+
new NumberSettingValue(setting, value),
|
|
1011
|
+
], false);
|
|
1012
|
+
return _this;
|
|
1013
|
+
};
|
|
1014
|
+
/** Assign the given `Option` to the given `Setting`. */
|
|
1015
|
+
this.withOption = function (setting, option) {
|
|
1016
|
+
if (setting === undefined) {
|
|
1017
|
+
throw new Error("Cannot assign option to setting, setting is undefined.");
|
|
1018
|
+
}
|
|
1019
|
+
if (!_this.getSetting(setting)) {
|
|
1020
|
+
throw new Error("Setting ".concat(setting.alias, " is not present in Register ").concat(_this.register.name));
|
|
1021
|
+
}
|
|
1022
|
+
if (!option || !_this.getOption(setting, option)) {
|
|
1023
|
+
throw new Error("Option ".concat(option === null || option === void 0 ? void 0 : option.name, " is not present in Setting ").concat(setting.name));
|
|
1024
|
+
}
|
|
1025
|
+
_this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [
|
|
1026
|
+
new OptionSettingValue(setting, option),
|
|
1027
|
+
], false);
|
|
1028
|
+
return _this;
|
|
1029
|
+
};
|
|
1030
|
+
/** Assign the `Option` matching the given alias to the given `Setting`. */
|
|
1031
|
+
this.withOptionAlias = function (setting, optionAlias) {
|
|
1032
|
+
if (setting === undefined) {
|
|
1033
|
+
throw new Error("Cannot assign option alias to setting, setting is undefined.");
|
|
1034
|
+
}
|
|
1035
|
+
var option = (0, Setting_1.getOptionByAlias)(optionAlias, setting);
|
|
1036
|
+
if (option === undefined) {
|
|
1037
|
+
throw new Error("Option Alias: \"".concat(optionAlias, "\" not present in Setting: \"").concat(setting.name, "\"."));
|
|
1038
|
+
}
|
|
1039
|
+
return _this.withOption(setting, option);
|
|
1040
|
+
};
|
|
1041
|
+
/** Assign the `Option` matching the given name to the given `Setting`. */
|
|
1042
|
+
this.withOptionName = function (setting, optionName) {
|
|
1043
|
+
if (setting === undefined) {
|
|
1044
|
+
throw new Error("Cannot assign option name to setting, setting is undefined.");
|
|
1045
|
+
}
|
|
1046
|
+
var option = (0, Setting_1.getOptionByName)(optionName, setting);
|
|
1047
|
+
if (option === undefined) {
|
|
1048
|
+
throw new Error("Option Name: \"".concat(optionName, "\" not present in Setting: \"").concat(setting.name, "\"."));
|
|
1049
|
+
}
|
|
1050
|
+
return _this.withOption(setting, option);
|
|
1051
|
+
};
|
|
1052
|
+
/** Assign the `Option` matching the given description to the given `Setting`. */
|
|
1053
|
+
this.withOptionDescription = function (setting, optionDescription) {
|
|
1054
|
+
if (setting === undefined) {
|
|
1055
|
+
throw new Error("Cannot assign option description to setting, setting is undefined.");
|
|
1056
|
+
}
|
|
1057
|
+
var option = (0, Setting_1.getOptionByDescription)(optionDescription, setting);
|
|
1058
|
+
if (option === undefined) {
|
|
1059
|
+
throw new Error("Option Description: \"".concat(optionDescription, "\" not present in Setting: \"").concat(setting.name, "\"."));
|
|
1060
|
+
}
|
|
1061
|
+
return _this.withOption(setting, option);
|
|
1062
|
+
};
|
|
1063
|
+
this.getSetting = function (setting) {
|
|
1064
|
+
return (0, Register_1.getSettingByAlias)(setting.alias, _this.register);
|
|
1065
|
+
};
|
|
1066
|
+
this.getOption = function (setting, option) {
|
|
1067
|
+
return (option === null || option === void 0 ? void 0 : option.name) ? (0, Setting_1.getOptionByName)(option.name, setting) : undefined;
|
|
1068
|
+
};
|
|
1069
|
+
this.calculate = function () {
|
|
1070
|
+
var registerValue = 0;
|
|
1071
|
+
_this.modifiedSettings.forEach(function (modifiedSetting) {
|
|
1072
|
+
registerValue = _this.setValue(modifiedSetting, registerValue);
|
|
1073
|
+
});
|
|
1074
|
+
var unmodifiedSettings = _this.getUnmodifiedSettings();
|
|
1075
|
+
unmodifiedSettings.forEach(function (unmodifiedSetting) {
|
|
1076
|
+
registerValue = _this.setValue(SettingValue.defaultValue(unmodifiedSetting), registerValue);
|
|
1077
|
+
});
|
|
1078
|
+
return Number(registerValue);
|
|
1079
|
+
};
|
|
1080
|
+
this.setValue = function (setting, registerValue) {
|
|
1081
|
+
var value = registerValue;
|
|
1082
|
+
value &= ~setting.getMask(); // Clear bits
|
|
1083
|
+
value |= setting.getShiftedValue(); // Set bits
|
|
1084
|
+
return value;
|
|
1085
|
+
};
|
|
1086
|
+
this.getUnmodifiedSettings = function () {
|
|
1087
|
+
var _a, _b;
|
|
1088
|
+
var modifiedSettingNames = (0, Arrays_1.map)(_this.modifiedSettings, function (setting) {
|
|
1089
|
+
return setting.getName();
|
|
1090
|
+
});
|
|
1091
|
+
return (0, Arrays_1.filter)((_b = (0, Arrays_1.values)((_a = _this.register.settings) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], function (setting) { return modifiedSettingNames.indexOf(setting.name) < 0; });
|
|
1092
|
+
};
|
|
1093
|
+
/** Calculate and print the register's value as a hex string. */
|
|
1094
|
+
this.asHexString = function () { return CalculateRegisterValue.toHexString(_this.calculate()); };
|
|
1095
|
+
/** Calculate and print the register's value as a binary string. */
|
|
1096
|
+
this.asBinaryString = function () {
|
|
1097
|
+
return CalculateRegisterValue.toBinaryString(_this.calculate());
|
|
1098
|
+
};
|
|
1099
|
+
/** Calculate and print the register's value as a decimal string. */
|
|
1100
|
+
this.asDecimalString = function () {
|
|
1101
|
+
return CalculateRegisterValue.toDecimalString(_this.calculate());
|
|
1102
|
+
};
|
|
1103
|
+
/** Calculate and return the register's value as a number. */
|
|
1104
|
+
this.asNumber = function () { return _this.calculate(); };
|
|
1105
|
+
this.register = register;
|
|
1106
|
+
}
|
|
1107
|
+
/** Creates a register value calculation object for the given register. */
|
|
1108
|
+
CalculateRegisterValue.for = function (register) {
|
|
1109
|
+
return new CalculateRegisterValue(register);
|
|
1110
|
+
};
|
|
1111
|
+
/** Format the given number as a hex string value. */
|
|
1112
|
+
CalculateRegisterValue.toHexString = function (value) {
|
|
1113
|
+
if (value == null) {
|
|
1114
|
+
throw new Error("CalculateRegisterValue.toHexString() illegal argument exception. Value must not be null.");
|
|
1115
|
+
}
|
|
1116
|
+
return "0x" + value.toString(16);
|
|
1117
|
+
};
|
|
1118
|
+
/** Format the given number as a binary string value. */
|
|
1119
|
+
CalculateRegisterValue.toBinaryString = function (value) {
|
|
1120
|
+
if (value == null) {
|
|
1121
|
+
throw new Error("CalculateRegisterValue.toBinaryString() illegal argument exception. Value must not be null.");
|
|
1122
|
+
}
|
|
1123
|
+
return "0b" + value.toString(2);
|
|
1124
|
+
};
|
|
1125
|
+
/** Format the given number as a decimal string value. */
|
|
1126
|
+
CalculateRegisterValue.toDecimalString = function (value) {
|
|
1127
|
+
if (value == null) {
|
|
1128
|
+
throw new Error("CalculateRegisterValue.toDecimalString() illegal argument exception. Value must not be null.");
|
|
1129
|
+
}
|
|
1130
|
+
return value.toString();
|
|
1131
|
+
};
|
|
1132
|
+
return CalculateRegisterValue;
|
|
1133
|
+
}());
|
|
1134
|
+
exports.default = CalculateRegisterValue;
|
|
1135
|
+
var SettingValue = /** @class */ (function () {
|
|
1136
|
+
function SettingValue(setting) {
|
|
1137
|
+
var _this = this;
|
|
1138
|
+
this.getMask = function () { return Number(_this.setting.mask); };
|
|
1139
|
+
this.getShift = function () {
|
|
1140
|
+
var mask = _this.getMask();
|
|
1141
|
+
var shiftIndex = 0;
|
|
1142
|
+
while (!(mask & 0x1)) {
|
|
1143
|
+
mask = mask >> 1;
|
|
1144
|
+
shiftIndex++;
|
|
1145
|
+
}
|
|
1146
|
+
return shiftIndex;
|
|
1147
|
+
};
|
|
1148
|
+
this.getShiftedValue = function () { return _this.getValue() << _this.getShift(); };
|
|
1149
|
+
this.getName = function () { return _this.setting.name; };
|
|
1150
|
+
this.setting = setting;
|
|
1151
|
+
}
|
|
1152
|
+
SettingValue.defaultValue = function (setting) {
|
|
1153
|
+
var value = Number(setting.porDefault);
|
|
1154
|
+
return new NumberSettingValue(setting, value);
|
|
1155
|
+
};
|
|
1156
|
+
return SettingValue;
|
|
1157
|
+
}());
|
|
1158
|
+
var NumberSettingValue = /** @class */ (function (_super) {
|
|
1159
|
+
__extends(NumberSettingValue, _super);
|
|
1160
|
+
function NumberSettingValue(setting, value) {
|
|
1161
|
+
var _this = _super.call(this, setting) || this;
|
|
1162
|
+
_this.getValue = function () { return _this.value; };
|
|
1163
|
+
_this.value = value;
|
|
1164
|
+
return _this;
|
|
1165
|
+
}
|
|
1166
|
+
return NumberSettingValue;
|
|
1167
|
+
}(SettingValue));
|
|
1168
|
+
var OptionSettingValue = /** @class */ (function (_super) {
|
|
1169
|
+
__extends(OptionSettingValue, _super);
|
|
1170
|
+
function OptionSettingValue(setting, option) {
|
|
1171
|
+
var _this = _super.call(this, setting) || this;
|
|
1172
|
+
_this.getValue = function () { return Number(_this.option.value); };
|
|
1173
|
+
_this.option = option;
|
|
1174
|
+
return _this;
|
|
1175
|
+
}
|
|
1176
|
+
OptionSettingValue.fromDefaultValue = function (setting, value) {
|
|
1177
|
+
var foundValueByName = (0, Setting_1.getOptionByName)(value, setting);
|
|
1178
|
+
if (foundValueByName)
|
|
1179
|
+
return new OptionSettingValue(setting, foundValueByName);
|
|
1180
|
+
var foundValueByAlias = (0, Setting_1.getOptionByAlias)(value, setting);
|
|
1181
|
+
if (foundValueByAlias)
|
|
1182
|
+
return new OptionSettingValue(setting, foundValueByAlias);
|
|
1183
|
+
throw new Error("Unable to create default value '".concat(value, "' for setting '").concat(setting.name, "'."));
|
|
1184
|
+
};
|
|
1185
|
+
return OptionSettingValue;
|
|
1186
|
+
}(SettingValue));
|
|
1187
|
+
//# sourceMappingURL=CalculateRegisterValue.js.map
|
|
1188
|
+
|
|
1189
|
+
/***/ }),
|
|
1190
|
+
|
|
1191
|
+
/***/ "./node_modules/@microchip/scf-device/lib/Register.js":
|
|
1192
|
+
/*!************************************************************!*\
|
|
1193
|
+
!*** ./node_modules/@microchip/scf-device/lib/Register.js ***!
|
|
1194
|
+
\************************************************************/
|
|
1195
|
+
/*! no static exports found */
|
|
1196
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1197
|
+
|
|
1198
|
+
"use strict";
|
|
1199
|
+
|
|
1200
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1201
|
+
exports.getSettingByAlias = void 0;
|
|
1202
|
+
var getSettingByAlias = function (alias, register) {
|
|
1203
|
+
var _a;
|
|
1204
|
+
return (_a = register.settings) === null || _a === void 0 ? void 0 : _a[alias];
|
|
1205
|
+
};
|
|
1206
|
+
exports.getSettingByAlias = getSettingByAlias;
|
|
1207
|
+
//# sourceMappingURL=Register.js.map
|
|
1208
|
+
|
|
1209
|
+
/***/ }),
|
|
1210
|
+
|
|
1211
|
+
/***/ "./node_modules/@microchip/scf-device/lib/Setting.js":
|
|
1212
|
+
/*!***********************************************************!*\
|
|
1213
|
+
!*** ./node_modules/@microchip/scf-device/lib/Setting.js ***!
|
|
1214
|
+
\***********************************************************/
|
|
1215
|
+
/*! no static exports found */
|
|
1216
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1217
|
+
|
|
1218
|
+
"use strict";
|
|
1219
|
+
|
|
1220
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1221
|
+
exports.getOptionDescriptions = exports.getOptionNames = exports.getOptionByDescription = exports.getOptionByName = exports.getOptionByAlias = exports.getBitRange = exports.getBitLabel = void 0;
|
|
1222
|
+
var Arrays_1 = __webpack_require__(/*! ./util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
|
|
1223
|
+
/**
|
|
1224
|
+
* Converts a hexadecimal string to binary.
|
|
1225
|
+
* Any leading zeros are removed from the returned string.
|
|
1226
|
+
*/
|
|
1227
|
+
var hexToBinary = function (hex) {
|
|
1228
|
+
return parseInt(hex, 16).toString(2);
|
|
1229
|
+
};
|
|
1230
|
+
/**
|
|
1231
|
+
* Returns a string of the corresponding bit position(s).
|
|
1232
|
+
*/
|
|
1233
|
+
var getBitLabel = function (setting) {
|
|
1234
|
+
if (setting.mask === undefined) {
|
|
1235
|
+
return undefined;
|
|
1236
|
+
}
|
|
1237
|
+
var bitRange = (0, exports.getBitRange)(setting);
|
|
1238
|
+
if (!bitRange)
|
|
1239
|
+
return undefined;
|
|
1240
|
+
if (bitRange.high === bitRange.low) {
|
|
1241
|
+
return "bit ".concat(bitRange.high);
|
|
1242
|
+
}
|
|
1243
|
+
return "bit ".concat(bitRange.high, "-").concat(bitRange.low);
|
|
1244
|
+
};
|
|
1245
|
+
exports.getBitLabel = getBitLabel;
|
|
1246
|
+
/**
|
|
1247
|
+
* Converts the hexadecimal mask provided within the register setting
|
|
1248
|
+
* and returns an interface containing the corresponding low and high bit positions.
|
|
1249
|
+
*/
|
|
1250
|
+
var getBitRange = function (setting) {
|
|
1251
|
+
if (!setting.mask)
|
|
1252
|
+
return undefined;
|
|
1253
|
+
var processedHex = hexToBinary(setting.mask);
|
|
1254
|
+
return {
|
|
1255
|
+
high: processedHex.length - 1,
|
|
1256
|
+
low: getBitRangeLow(processedHex),
|
|
1257
|
+
};
|
|
1258
|
+
};
|
|
1259
|
+
exports.getBitRange = getBitRange;
|
|
1260
|
+
var getOptionByAlias = function (alias, setting) {
|
|
1261
|
+
var _a;
|
|
1262
|
+
return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.alias == alias; });
|
|
1263
|
+
};
|
|
1264
|
+
exports.getOptionByAlias = getOptionByAlias;
|
|
1265
|
+
var getOptionByName = function (name, setting) {
|
|
1266
|
+
var _a;
|
|
1267
|
+
return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name == name; });
|
|
1268
|
+
};
|
|
1269
|
+
exports.getOptionByName = getOptionByName;
|
|
1270
|
+
var getOptionByDescription = function (description, setting) {
|
|
1271
|
+
var _a;
|
|
1272
|
+
return (0, Arrays_1.find)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description == description; });
|
|
1273
|
+
};
|
|
1274
|
+
exports.getOptionByDescription = getOptionByDescription;
|
|
1275
|
+
var getOptionNames = function (setting) {
|
|
1276
|
+
var _a;
|
|
1277
|
+
return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name; });
|
|
1278
|
+
};
|
|
1279
|
+
exports.getOptionNames = getOptionNames;
|
|
1280
|
+
var getOptionDescriptions = function (setting) {
|
|
1281
|
+
var _a;
|
|
1282
|
+
return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description; });
|
|
1283
|
+
};
|
|
1284
|
+
exports.getOptionDescriptions = getOptionDescriptions;
|
|
1285
|
+
function getBitRangeLow(processedHex) {
|
|
1286
|
+
if (processedHex.charAt(1) === "1") {
|
|
1287
|
+
var index = 1;
|
|
1288
|
+
while (processedHex.charAt(index) === "1") {
|
|
1289
|
+
index++;
|
|
1290
|
+
}
|
|
1291
|
+
return processedHex.length - index;
|
|
1292
|
+
}
|
|
1293
|
+
else {
|
|
1294
|
+
return processedHex.length - 1;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
//# sourceMappingURL=Setting.js.map
|
|
1298
|
+
|
|
1299
|
+
/***/ }),
|
|
1300
|
+
|
|
1301
|
+
/***/ "./node_modules/@microchip/scf-device/lib/util/Arrays.js":
|
|
1302
|
+
/*!***************************************************************!*\
|
|
1303
|
+
!*** ./node_modules/@microchip/scf-device/lib/util/Arrays.js ***!
|
|
1304
|
+
\***************************************************************/
|
|
1305
|
+
/*! no static exports found */
|
|
1306
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1307
|
+
|
|
1308
|
+
"use strict";
|
|
1309
|
+
|
|
1310
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1311
|
+
exports.values = exports.getKeys = exports.find = exports.filter = exports.map = void 0;
|
|
1312
|
+
var map = function (arr, callback) {
|
|
1313
|
+
var result = [];
|
|
1314
|
+
arr.forEach(function (value, index) {
|
|
1315
|
+
result[index] = callback(value);
|
|
1316
|
+
});
|
|
1317
|
+
return result;
|
|
1318
|
+
};
|
|
1319
|
+
exports.map = map;
|
|
1320
|
+
var filter = function (arr, callback) {
|
|
1321
|
+
var result = [];
|
|
1322
|
+
arr.forEach(function (value) {
|
|
1323
|
+
if (callback(value)) {
|
|
1324
|
+
result.push(value);
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
return result;
|
|
1328
|
+
};
|
|
1329
|
+
exports.filter = filter;
|
|
1330
|
+
/**
|
|
1331
|
+
* Iterates over elements of the array, returning the first element that the predicate returns truthy for.
|
|
1332
|
+
*/
|
|
1333
|
+
var find = function (arr, callback) {
|
|
1334
|
+
for (var i = 0; i < arr.length; i++) {
|
|
1335
|
+
if (callback(arr[i])) {
|
|
1336
|
+
return arr[i];
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
return undefined;
|
|
1340
|
+
};
|
|
1341
|
+
exports.find = find;
|
|
1342
|
+
/** @returns the non-prototype keys of the given object */
|
|
1343
|
+
var getKeys = function (obj) {
|
|
1344
|
+
if (!obj)
|
|
1345
|
+
return undefined;
|
|
1346
|
+
return Object.getOwnPropertyNames(obj);
|
|
1347
|
+
};
|
|
1348
|
+
exports.getKeys = getKeys;
|
|
1349
|
+
var values = function (obj) {
|
|
1350
|
+
var _a;
|
|
1351
|
+
if (!obj)
|
|
1352
|
+
return undefined;
|
|
1353
|
+
return (_a = (0, exports.getKeys)(obj)) === null || _a === void 0 ? void 0 : _a.map(function (key) { return obj[key]; });
|
|
1354
|
+
};
|
|
1355
|
+
exports.values = values;
|
|
1356
|
+
//# sourceMappingURL=Arrays.js.map
|
|
1357
|
+
|
|
1358
|
+
/***/ }),
|
|
1359
|
+
|
|
1360
|
+
/***/ "./node_modules/@microchip/scf-interface/lib/c-function-types.js":
|
|
1361
|
+
/*!***********************************************************************!*\
|
|
1362
|
+
!*** ./node_modules/@microchip/scf-interface/lib/c-function-types.js ***!
|
|
1363
|
+
\***********************************************************************/
|
|
1364
|
+
/*! no static exports found */
|
|
1365
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1366
|
+
|
|
1367
|
+
"use strict";
|
|
1368
|
+
|
|
1369
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1370
|
+
exports.buildSimpleApi = function (functions) {
|
|
1371
|
+
var api = {};
|
|
1372
|
+
for (var key in functions) {
|
|
1373
|
+
api[key] = buildFunction(functions[key]);
|
|
1374
|
+
}
|
|
1375
|
+
return api;
|
|
1376
|
+
};
|
|
1377
|
+
var buildFunction = function (cFunction) {
|
|
1378
|
+
return cFunction.returns + " " + cFunction.name + "(" + buildArguments(cFunction.arguments) + ")";
|
|
1379
|
+
};
|
|
1380
|
+
var buildArguments = function (args) {
|
|
1381
|
+
if (args) {
|
|
1382
|
+
return args.map(function (arg) { return arg.type + " " + arg.name; }).join(", ");
|
|
1383
|
+
}
|
|
1384
|
+
else {
|
|
1385
|
+
return "void";
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
/***/ }),
|
|
1391
|
+
|
|
1392
|
+
/***/ "./node_modules/@microchip/scf-interface/lib/helpers.js":
|
|
1393
|
+
/*!**************************************************************!*\
|
|
1394
|
+
!*** ./node_modules/@microchip/scf-interface/lib/helpers.js ***!
|
|
1395
|
+
\**************************************************************/
|
|
1396
|
+
/*! no static exports found */
|
|
1397
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1398
|
+
|
|
1399
|
+
"use strict";
|
|
1400
|
+
|
|
1401
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1402
|
+
exports.getInterfaceName = function (pkgJson) {
|
|
1403
|
+
var strReplace = "@microchip/";
|
|
1404
|
+
var interfaceName;
|
|
1405
|
+
if (pkgJson) {
|
|
1406
|
+
interfaceName = pkgJson["name"];
|
|
1407
|
+
if (interfaceName) {
|
|
1408
|
+
interfaceName = interfaceName.replace(strReplace, "");
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
if (!interfaceName) {
|
|
1412
|
+
throw new Error("Invalid Interface Name...!");
|
|
1413
|
+
}
|
|
1414
|
+
return interfaceName;
|
|
1415
|
+
};
|
|
1416
|
+
exports.getInterfaceVersion = function (pkgJson) {
|
|
1417
|
+
var versionRegex = new RegExp("\\d+.\\d+.\\d+");
|
|
1418
|
+
var version;
|
|
1419
|
+
if (pkgJson) {
|
|
1420
|
+
version = pkgJson["version"];
|
|
1421
|
+
}
|
|
1422
|
+
if (!version && !versionRegex.test(version)) {
|
|
1423
|
+
throw new Error("Invalid Interface Version...!");
|
|
1424
|
+
}
|
|
1425
|
+
return version;
|
|
1426
|
+
};
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
/***/ }),
|
|
1430
|
+
|
|
1431
|
+
/***/ "./node_modules/@microchip/scf-interface/lib/index.js":
|
|
1432
|
+
/*!************************************************************!*\
|
|
1433
|
+
!*** ./node_modules/@microchip/scf-interface/lib/index.js ***!
|
|
1434
|
+
\************************************************************/
|
|
1435
|
+
/*! no static exports found */
|
|
1436
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1437
|
+
|
|
1438
|
+
"use strict";
|
|
1439
|
+
|
|
1440
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1441
|
+
var c_function_types_1 = __webpack_require__(/*! ./c-function-types */ "./node_modules/@microchip/scf-interface/lib/c-function-types.js");
|
|
1442
|
+
exports.buildSimpleApi = c_function_types_1.buildSimpleApi;
|
|
1443
|
+
var helpers_1 = __webpack_require__(/*! ./helpers */ "./node_modules/@microchip/scf-interface/lib/helpers.js");
|
|
1444
|
+
exports.getInterfaceName = helpers_1.getInterfaceName;
|
|
1445
|
+
exports.getInterfaceVersion = helpers_1.getInterfaceVersion;
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
/***/ }),
|
|
1449
|
+
|
|
1450
|
+
/***/ "./node_modules/core-js/es/math/log10.js":
|
|
1451
|
+
/*!***********************************************!*\
|
|
1452
|
+
!*** ./node_modules/core-js/es/math/log10.js ***!
|
|
1453
|
+
\***********************************************/
|
|
1454
|
+
/*! no static exports found */
|
|
1455
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1456
|
+
|
|
1457
|
+
__webpack_require__(/*! ../../modules/es.math.log10 */ "./node_modules/core-js/modules/es.math.log10.js");
|
|
1458
|
+
var path = __webpack_require__(/*! ../../internals/path */ "./node_modules/core-js/internals/path.js");
|
|
1459
|
+
|
|
1460
|
+
module.exports = path.Math.log10;
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
/***/ }),
|
|
1464
|
+
|
|
1465
|
+
/***/ "./node_modules/core-js/features/math/log10.js":
|
|
1466
|
+
/*!*****************************************************!*\
|
|
1467
|
+
!*** ./node_modules/core-js/features/math/log10.js ***!
|
|
1468
|
+
\*****************************************************/
|
|
1469
|
+
/*! no static exports found */
|
|
1470
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1471
|
+
|
|
1472
|
+
var parent = __webpack_require__(/*! ../../es/math/log10 */ "./node_modules/core-js/es/math/log10.js");
|
|
1473
|
+
|
|
1474
|
+
module.exports = parent;
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
/***/ }),
|
|
1478
|
+
|
|
1479
|
+
/***/ "./node_modules/core-js/internals/an-object.js":
|
|
1480
|
+
/*!*****************************************************!*\
|
|
1481
|
+
!*** ./node_modules/core-js/internals/an-object.js ***!
|
|
1482
|
+
\*****************************************************/
|
|
1483
|
+
/*! no static exports found */
|
|
1484
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1485
|
+
|
|
1486
|
+
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
1487
|
+
|
|
1488
|
+
module.exports = function (it) {
|
|
1489
|
+
if (!isObject(it)) {
|
|
1490
|
+
throw TypeError(String(it) + ' is not an object');
|
|
1491
|
+
} return it;
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
/***/ }),
|
|
1496
|
+
|
|
1497
|
+
/***/ "./node_modules/core-js/internals/array-includes.js":
|
|
1498
|
+
/*!**********************************************************!*\
|
|
1499
|
+
!*** ./node_modules/core-js/internals/array-includes.js ***!
|
|
1500
|
+
\**********************************************************/
|
|
1501
|
+
/*! no static exports found */
|
|
1502
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1503
|
+
|
|
1504
|
+
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
|
|
1505
|
+
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
|
|
1506
|
+
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
|
|
1507
|
+
|
|
1508
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
1509
|
+
var createMethod = function (IS_INCLUDES) {
|
|
1510
|
+
return function ($this, el, fromIndex) {
|
|
1511
|
+
var O = toIndexedObject($this);
|
|
1512
|
+
var length = toLength(O.length);
|
|
1513
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
1514
|
+
var value;
|
|
1515
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
1516
|
+
// eslint-disable-next-line no-self-compare
|
|
1517
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
1518
|
+
value = O[index++];
|
|
1519
|
+
// eslint-disable-next-line no-self-compare
|
|
1520
|
+
if (value != value) return true;
|
|
1521
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
1522
|
+
} else for (;length > index; index++) {
|
|
1523
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
1524
|
+
} return !IS_INCLUDES && -1;
|
|
1525
|
+
};
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
module.exports = {
|
|
1529
|
+
// `Array.prototype.includes` method
|
|
1530
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
|
1531
|
+
includes: createMethod(true),
|
|
1532
|
+
// `Array.prototype.indexOf` method
|
|
1533
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
|
1534
|
+
indexOf: createMethod(false)
|
|
1535
|
+
};
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
/***/ }),
|
|
1539
|
+
|
|
1540
|
+
/***/ "./node_modules/core-js/internals/classof-raw.js":
|
|
1541
|
+
/*!*******************************************************!*\
|
|
1542
|
+
!*** ./node_modules/core-js/internals/classof-raw.js ***!
|
|
1543
|
+
\*******************************************************/
|
|
1544
|
+
/*! no static exports found */
|
|
1545
|
+
/***/ (function(module, exports) {
|
|
1546
|
+
|
|
1547
|
+
var toString = {}.toString;
|
|
1548
|
+
|
|
1549
|
+
module.exports = function (it) {
|
|
1550
|
+
return toString.call(it).slice(8, -1);
|
|
1551
|
+
};
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
/***/ }),
|
|
1555
|
+
|
|
1556
|
+
/***/ "./node_modules/core-js/internals/copy-constructor-properties.js":
|
|
1557
|
+
/*!***********************************************************************!*\
|
|
1558
|
+
!*** ./node_modules/core-js/internals/copy-constructor-properties.js ***!
|
|
1559
|
+
\***********************************************************************/
|
|
1560
|
+
/*! no static exports found */
|
|
1561
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1562
|
+
|
|
1563
|
+
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
|
|
1564
|
+
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
|
|
1565
|
+
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
|
|
1566
|
+
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
|
|
1567
|
+
|
|
1568
|
+
module.exports = function (target, source) {
|
|
1569
|
+
var keys = ownKeys(source);
|
|
1570
|
+
var defineProperty = definePropertyModule.f;
|
|
1571
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
1572
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1573
|
+
var key = keys[i];
|
|
1574
|
+
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
1575
|
+
}
|
|
1576
|
+
};
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
/***/ }),
|
|
1580
|
+
|
|
1581
|
+
/***/ "./node_modules/core-js/internals/create-non-enumerable-property.js":
|
|
1582
|
+
/*!**************************************************************************!*\
|
|
1583
|
+
!*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
|
|
1584
|
+
\**************************************************************************/
|
|
1585
|
+
/*! no static exports found */
|
|
1586
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1587
|
+
|
|
1588
|
+
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
1589
|
+
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
|
|
1590
|
+
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
|
|
1591
|
+
|
|
1592
|
+
module.exports = DESCRIPTORS ? function (object, key, value) {
|
|
1593
|
+
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
1594
|
+
} : function (object, key, value) {
|
|
1595
|
+
object[key] = value;
|
|
1596
|
+
return object;
|
|
1597
|
+
};
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
/***/ }),
|
|
1601
|
+
|
|
1602
|
+
/***/ "./node_modules/core-js/internals/create-property-descriptor.js":
|
|
1603
|
+
/*!**********************************************************************!*\
|
|
1604
|
+
!*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
|
|
1605
|
+
\**********************************************************************/
|
|
1606
|
+
/*! no static exports found */
|
|
1607
|
+
/***/ (function(module, exports) {
|
|
1608
|
+
|
|
1609
|
+
module.exports = function (bitmap, value) {
|
|
1610
|
+
return {
|
|
1611
|
+
enumerable: !(bitmap & 1),
|
|
1612
|
+
configurable: !(bitmap & 2),
|
|
1613
|
+
writable: !(bitmap & 4),
|
|
1614
|
+
value: value
|
|
1615
|
+
};
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
/***/ }),
|
|
1620
|
+
|
|
1621
|
+
/***/ "./node_modules/core-js/internals/descriptors.js":
|
|
1622
|
+
/*!*******************************************************!*\
|
|
1623
|
+
!*** ./node_modules/core-js/internals/descriptors.js ***!
|
|
1624
|
+
\*******************************************************/
|
|
1625
|
+
/*! no static exports found */
|
|
1626
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1627
|
+
|
|
1628
|
+
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1629
|
+
|
|
1630
|
+
// Thank's IE8 for his funny defineProperty
|
|
1631
|
+
module.exports = !fails(function () {
|
|
1632
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
1633
|
+
});
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
/***/ }),
|
|
1637
|
+
|
|
1638
|
+
/***/ "./node_modules/core-js/internals/document-create-element.js":
|
|
1639
|
+
/*!*******************************************************************!*\
|
|
1640
|
+
!*** ./node_modules/core-js/internals/document-create-element.js ***!
|
|
1641
|
+
\*******************************************************************/
|
|
1642
|
+
/*! no static exports found */
|
|
1643
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1644
|
+
|
|
1645
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1646
|
+
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
1647
|
+
|
|
1648
|
+
var document = global.document;
|
|
1649
|
+
// typeof document.createElement is 'object' in old IE
|
|
1650
|
+
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
1651
|
+
|
|
1652
|
+
module.exports = function (it) {
|
|
1653
|
+
return EXISTS ? document.createElement(it) : {};
|
|
1654
|
+
};
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
/***/ }),
|
|
1658
|
+
|
|
1659
|
+
/***/ "./node_modules/core-js/internals/enum-bug-keys.js":
|
|
1660
|
+
/*!*********************************************************!*\
|
|
1661
|
+
!*** ./node_modules/core-js/internals/enum-bug-keys.js ***!
|
|
1662
|
+
\*********************************************************/
|
|
1663
|
+
/*! no static exports found */
|
|
1664
|
+
/***/ (function(module, exports) {
|
|
1665
|
+
|
|
1666
|
+
// IE8- don't enum bug keys
|
|
1667
|
+
module.exports = [
|
|
1668
|
+
'constructor',
|
|
1669
|
+
'hasOwnProperty',
|
|
1670
|
+
'isPrototypeOf',
|
|
1671
|
+
'propertyIsEnumerable',
|
|
1672
|
+
'toLocaleString',
|
|
1673
|
+
'toString',
|
|
1674
|
+
'valueOf'
|
|
1675
|
+
];
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
/***/ }),
|
|
1679
|
+
|
|
1680
|
+
/***/ "./node_modules/core-js/internals/export.js":
|
|
1681
|
+
/*!**************************************************!*\
|
|
1682
|
+
!*** ./node_modules/core-js/internals/export.js ***!
|
|
1683
|
+
\**************************************************/
|
|
1684
|
+
/*! no static exports found */
|
|
1685
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1686
|
+
|
|
1687
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1688
|
+
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
|
|
1689
|
+
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
|
|
1690
|
+
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
|
|
1691
|
+
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");
|
|
1692
|
+
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");
|
|
1693
|
+
var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
|
|
1694
|
+
|
|
1695
|
+
/*
|
|
1696
|
+
options.target - name of the target object
|
|
1697
|
+
options.global - target is the global object
|
|
1698
|
+
options.stat - export as static methods of target
|
|
1699
|
+
options.proto - export as prototype methods of target
|
|
1700
|
+
options.real - real prototype method for the `pure` version
|
|
1701
|
+
options.forced - export even if the native feature is available
|
|
1702
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
1703
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
1704
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
1705
|
+
options.sham - add a flag to not completely full polyfills
|
|
1706
|
+
options.enumerable - export as enumerable property
|
|
1707
|
+
options.noTargetGet - prevent calling a getter on target
|
|
1708
|
+
*/
|
|
1709
|
+
module.exports = function (options, source) {
|
|
1710
|
+
var TARGET = options.target;
|
|
1711
|
+
var GLOBAL = options.global;
|
|
1712
|
+
var STATIC = options.stat;
|
|
1713
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1714
|
+
if (GLOBAL) {
|
|
1715
|
+
target = global;
|
|
1716
|
+
} else if (STATIC) {
|
|
1717
|
+
target = global[TARGET] || setGlobal(TARGET, {});
|
|
1718
|
+
} else {
|
|
1719
|
+
target = (global[TARGET] || {}).prototype;
|
|
1720
|
+
}
|
|
1721
|
+
if (target) for (key in source) {
|
|
1722
|
+
sourceProperty = source[key];
|
|
1723
|
+
if (options.noTargetGet) {
|
|
1724
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1725
|
+
targetProperty = descriptor && descriptor.value;
|
|
1726
|
+
} else targetProperty = target[key];
|
|
1727
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1728
|
+
// contained in target
|
|
1729
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
1730
|
+
if (typeof sourceProperty === typeof targetProperty) continue;
|
|
1731
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1732
|
+
}
|
|
1733
|
+
// add a flag to not completely full polyfills
|
|
1734
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1735
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
1736
|
+
}
|
|
1737
|
+
// extend global
|
|
1738
|
+
redefine(target, key, sourceProperty, options);
|
|
1739
|
+
}
|
|
1740
|
+
};
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
/***/ }),
|
|
1744
|
+
|
|
1745
|
+
/***/ "./node_modules/core-js/internals/fails.js":
|
|
1746
|
+
/*!*************************************************!*\
|
|
1747
|
+
!*** ./node_modules/core-js/internals/fails.js ***!
|
|
1748
|
+
\*************************************************/
|
|
1749
|
+
/*! no static exports found */
|
|
1750
|
+
/***/ (function(module, exports) {
|
|
1751
|
+
|
|
1752
|
+
module.exports = function (exec) {
|
|
1753
|
+
try {
|
|
1754
|
+
return !!exec();
|
|
1755
|
+
} catch (error) {
|
|
1756
|
+
return true;
|
|
1757
|
+
}
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
/***/ }),
|
|
1762
|
+
|
|
1763
|
+
/***/ "./node_modules/core-js/internals/get-built-in.js":
|
|
1764
|
+
/*!********************************************************!*\
|
|
1765
|
+
!*** ./node_modules/core-js/internals/get-built-in.js ***!
|
|
1766
|
+
\********************************************************/
|
|
1767
|
+
/*! no static exports found */
|
|
1768
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1769
|
+
|
|
1770
|
+
var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js");
|
|
1771
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1772
|
+
|
|
1773
|
+
var aFunction = function (variable) {
|
|
1774
|
+
return typeof variable == 'function' ? variable : undefined;
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
module.exports = function (namespace, method) {
|
|
1778
|
+
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
|
|
1779
|
+
: path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
|
|
1780
|
+
};
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
/***/ }),
|
|
1784
|
+
|
|
1785
|
+
/***/ "./node_modules/core-js/internals/global.js":
|
|
1786
|
+
/*!**************************************************!*\
|
|
1787
|
+
!*** ./node_modules/core-js/internals/global.js ***!
|
|
1788
|
+
\**************************************************/
|
|
1789
|
+
/*! no static exports found */
|
|
1790
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1791
|
+
|
|
1792
|
+
/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
|
|
1793
|
+
return it && it.Math == Math && it;
|
|
1794
|
+
};
|
|
1795
|
+
|
|
1796
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
1797
|
+
module.exports =
|
|
1798
|
+
// eslint-disable-next-line no-undef
|
|
1799
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
1800
|
+
check(typeof window == 'object' && window) ||
|
|
1801
|
+
check(typeof self == 'object' && self) ||
|
|
1802
|
+
check(typeof global == 'object' && global) ||
|
|
1803
|
+
// eslint-disable-next-line no-new-func
|
|
1804
|
+
Function('return this')();
|
|
1805
|
+
|
|
1806
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
|
|
1807
|
+
|
|
1808
|
+
/***/ }),
|
|
1809
|
+
|
|
1810
|
+
/***/ "./node_modules/core-js/internals/has.js":
|
|
1811
|
+
/*!***********************************************!*\
|
|
1812
|
+
!*** ./node_modules/core-js/internals/has.js ***!
|
|
1813
|
+
\***********************************************/
|
|
1814
|
+
/*! no static exports found */
|
|
1815
|
+
/***/ (function(module, exports) {
|
|
1816
|
+
|
|
1817
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
1818
|
+
|
|
1819
|
+
module.exports = function (it, key) {
|
|
1820
|
+
return hasOwnProperty.call(it, key);
|
|
1821
|
+
};
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
/***/ }),
|
|
1825
|
+
|
|
1826
|
+
/***/ "./node_modules/core-js/internals/hidden-keys.js":
|
|
1827
|
+
/*!*******************************************************!*\
|
|
1828
|
+
!*** ./node_modules/core-js/internals/hidden-keys.js ***!
|
|
1829
|
+
\*******************************************************/
|
|
1830
|
+
/*! no static exports found */
|
|
1831
|
+
/***/ (function(module, exports) {
|
|
1832
|
+
|
|
1833
|
+
module.exports = {};
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
/***/ }),
|
|
1837
|
+
|
|
1838
|
+
/***/ "./node_modules/core-js/internals/ie8-dom-define.js":
|
|
1839
|
+
/*!**********************************************************!*\
|
|
1840
|
+
!*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
|
|
1841
|
+
\**********************************************************/
|
|
1842
|
+
/*! no static exports found */
|
|
1843
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1844
|
+
|
|
1845
|
+
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
1846
|
+
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1847
|
+
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
|
|
1848
|
+
|
|
1849
|
+
// Thank's IE8 for his funny defineProperty
|
|
1850
|
+
module.exports = !DESCRIPTORS && !fails(function () {
|
|
1851
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
1852
|
+
get: function () { return 7; }
|
|
1853
|
+
}).a != 7;
|
|
1854
|
+
});
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
/***/ }),
|
|
1858
|
+
|
|
1859
|
+
/***/ "./node_modules/core-js/internals/indexed-object.js":
|
|
1860
|
+
/*!**********************************************************!*\
|
|
1861
|
+
!*** ./node_modules/core-js/internals/indexed-object.js ***!
|
|
1862
|
+
\**********************************************************/
|
|
1863
|
+
/*! no static exports found */
|
|
1864
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1865
|
+
|
|
1866
|
+
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1867
|
+
var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
|
|
1868
|
+
|
|
1869
|
+
var split = ''.split;
|
|
1870
|
+
|
|
1871
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
1872
|
+
module.exports = fails(function () {
|
|
1873
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
1874
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
1875
|
+
return !Object('z').propertyIsEnumerable(0);
|
|
1876
|
+
}) ? function (it) {
|
|
1877
|
+
return classof(it) == 'String' ? split.call(it, '') : Object(it);
|
|
1878
|
+
} : Object;
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
/***/ }),
|
|
1882
|
+
|
|
1883
|
+
/***/ "./node_modules/core-js/internals/inspect-source.js":
|
|
1884
|
+
/*!**********************************************************!*\
|
|
1885
|
+
!*** ./node_modules/core-js/internals/inspect-source.js ***!
|
|
1886
|
+
\**********************************************************/
|
|
1887
|
+
/*! no static exports found */
|
|
1888
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1889
|
+
|
|
1890
|
+
var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
|
|
1891
|
+
|
|
1892
|
+
var functionToString = Function.toString;
|
|
1893
|
+
|
|
1894
|
+
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
|
1895
|
+
if (typeof store.inspectSource != 'function') {
|
|
1896
|
+
store.inspectSource = function (it) {
|
|
1897
|
+
return functionToString.call(it);
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
module.exports = store.inspectSource;
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
/***/ }),
|
|
1905
|
+
|
|
1906
|
+
/***/ "./node_modules/core-js/internals/internal-state.js":
|
|
1907
|
+
/*!**********************************************************!*\
|
|
1908
|
+
!*** ./node_modules/core-js/internals/internal-state.js ***!
|
|
1909
|
+
\**********************************************************/
|
|
1910
|
+
/*! no static exports found */
|
|
1911
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1912
|
+
|
|
1913
|
+
var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "./node_modules/core-js/internals/native-weak-map.js");
|
|
1914
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1915
|
+
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
1916
|
+
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
|
|
1917
|
+
var objectHas = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
|
|
1918
|
+
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
|
|
1919
|
+
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
|
|
1920
|
+
|
|
1921
|
+
var WeakMap = global.WeakMap;
|
|
1922
|
+
var set, get, has;
|
|
1923
|
+
|
|
1924
|
+
var enforce = function (it) {
|
|
1925
|
+
return has(it) ? get(it) : set(it, {});
|
|
1926
|
+
};
|
|
1927
|
+
|
|
1928
|
+
var getterFor = function (TYPE) {
|
|
1929
|
+
return function (it) {
|
|
1930
|
+
var state;
|
|
1931
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
1932
|
+
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
1933
|
+
} return state;
|
|
1934
|
+
};
|
|
1935
|
+
};
|
|
1936
|
+
|
|
1937
|
+
if (NATIVE_WEAK_MAP) {
|
|
1938
|
+
var store = new WeakMap();
|
|
1939
|
+
var wmget = store.get;
|
|
1940
|
+
var wmhas = store.has;
|
|
1941
|
+
var wmset = store.set;
|
|
1942
|
+
set = function (it, metadata) {
|
|
1943
|
+
wmset.call(store, it, metadata);
|
|
1944
|
+
return metadata;
|
|
1945
|
+
};
|
|
1946
|
+
get = function (it) {
|
|
1947
|
+
return wmget.call(store, it) || {};
|
|
1948
|
+
};
|
|
1949
|
+
has = function (it) {
|
|
1950
|
+
return wmhas.call(store, it);
|
|
1951
|
+
};
|
|
1952
|
+
} else {
|
|
1953
|
+
var STATE = sharedKey('state');
|
|
1954
|
+
hiddenKeys[STATE] = true;
|
|
1955
|
+
set = function (it, metadata) {
|
|
1956
|
+
createNonEnumerableProperty(it, STATE, metadata);
|
|
1957
|
+
return metadata;
|
|
1958
|
+
};
|
|
1959
|
+
get = function (it) {
|
|
1960
|
+
return objectHas(it, STATE) ? it[STATE] : {};
|
|
1961
|
+
};
|
|
1962
|
+
has = function (it) {
|
|
1963
|
+
return objectHas(it, STATE);
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
module.exports = {
|
|
1968
|
+
set: set,
|
|
1969
|
+
get: get,
|
|
1970
|
+
has: has,
|
|
1971
|
+
enforce: enforce,
|
|
1972
|
+
getterFor: getterFor
|
|
1973
|
+
};
|
|
1974
|
+
|
|
1975
|
+
|
|
1976
|
+
/***/ }),
|
|
1977
|
+
|
|
1978
|
+
/***/ "./node_modules/core-js/internals/is-forced.js":
|
|
1979
|
+
/*!*****************************************************!*\
|
|
1980
|
+
!*** ./node_modules/core-js/internals/is-forced.js ***!
|
|
1981
|
+
\*****************************************************/
|
|
1982
|
+
/*! no static exports found */
|
|
1983
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1984
|
+
|
|
1985
|
+
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1986
|
+
|
|
1987
|
+
var replacement = /#|\.prototype\./;
|
|
1988
|
+
|
|
1989
|
+
var isForced = function (feature, detection) {
|
|
1990
|
+
var value = data[normalize(feature)];
|
|
1991
|
+
return value == POLYFILL ? true
|
|
1992
|
+
: value == NATIVE ? false
|
|
1993
|
+
: typeof detection == 'function' ? fails(detection)
|
|
1994
|
+
: !!detection;
|
|
1995
|
+
};
|
|
1996
|
+
|
|
1997
|
+
var normalize = isForced.normalize = function (string) {
|
|
1998
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
1999
|
+
};
|
|
2000
|
+
|
|
2001
|
+
var data = isForced.data = {};
|
|
2002
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
2003
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
2004
|
+
|
|
2005
|
+
module.exports = isForced;
|
|
2006
|
+
|
|
2007
|
+
|
|
2008
|
+
/***/ }),
|
|
2009
|
+
|
|
2010
|
+
/***/ "./node_modules/core-js/internals/is-object.js":
|
|
2011
|
+
/*!*****************************************************!*\
|
|
2012
|
+
!*** ./node_modules/core-js/internals/is-object.js ***!
|
|
2013
|
+
\*****************************************************/
|
|
2014
|
+
/*! no static exports found */
|
|
2015
|
+
/***/ (function(module, exports) {
|
|
2016
|
+
|
|
2017
|
+
module.exports = function (it) {
|
|
2018
|
+
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
2019
|
+
};
|
|
2020
|
+
|
|
2021
|
+
|
|
2022
|
+
/***/ }),
|
|
2023
|
+
|
|
2024
|
+
/***/ "./node_modules/core-js/internals/is-pure.js":
|
|
2025
|
+
/*!***************************************************!*\
|
|
2026
|
+
!*** ./node_modules/core-js/internals/is-pure.js ***!
|
|
2027
|
+
\***************************************************/
|
|
2028
|
+
/*! no static exports found */
|
|
2029
|
+
/***/ (function(module, exports) {
|
|
2030
|
+
|
|
2031
|
+
module.exports = false;
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
/***/ }),
|
|
2035
|
+
|
|
2036
|
+
/***/ "./node_modules/core-js/internals/native-weak-map.js":
|
|
2037
|
+
/*!***********************************************************!*\
|
|
2038
|
+
!*** ./node_modules/core-js/internals/native-weak-map.js ***!
|
|
2039
|
+
\***********************************************************/
|
|
2040
|
+
/*! no static exports found */
|
|
2041
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2042
|
+
|
|
2043
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
2044
|
+
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
|
|
2045
|
+
|
|
2046
|
+
var WeakMap = global.WeakMap;
|
|
2047
|
+
|
|
2048
|
+
module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
/***/ }),
|
|
2052
|
+
|
|
2053
|
+
/***/ "./node_modules/core-js/internals/object-define-property.js":
|
|
2054
|
+
/*!******************************************************************!*\
|
|
2055
|
+
!*** ./node_modules/core-js/internals/object-define-property.js ***!
|
|
2056
|
+
\******************************************************************/
|
|
2057
|
+
/*! no static exports found */
|
|
2058
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2059
|
+
|
|
2060
|
+
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
2061
|
+
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js");
|
|
2062
|
+
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
|
|
2063
|
+
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
|
|
2064
|
+
|
|
2065
|
+
var nativeDefineProperty = Object.defineProperty;
|
|
2066
|
+
|
|
2067
|
+
// `Object.defineProperty` method
|
|
2068
|
+
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
2069
|
+
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
|
2070
|
+
anObject(O);
|
|
2071
|
+
P = toPrimitive(P, true);
|
|
2072
|
+
anObject(Attributes);
|
|
2073
|
+
if (IE8_DOM_DEFINE) try {
|
|
2074
|
+
return nativeDefineProperty(O, P, Attributes);
|
|
2075
|
+
} catch (error) { /* empty */ }
|
|
2076
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
2077
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
2078
|
+
return O;
|
|
2079
|
+
};
|
|
2080
|
+
|
|
2081
|
+
|
|
2082
|
+
/***/ }),
|
|
2083
|
+
|
|
2084
|
+
/***/ "./node_modules/core-js/internals/object-get-own-property-descriptor.js":
|
|
2085
|
+
/*!******************************************************************************!*\
|
|
2086
|
+
!*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
|
|
2087
|
+
\******************************************************************************/
|
|
2088
|
+
/*! no static exports found */
|
|
2089
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2090
|
+
|
|
2091
|
+
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
2092
|
+
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
|
|
2093
|
+
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
|
|
2094
|
+
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
|
|
2095
|
+
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
|
|
2096
|
+
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
|
|
2097
|
+
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js");
|
|
2098
|
+
|
|
2099
|
+
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2100
|
+
|
|
2101
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
2102
|
+
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
2103
|
+
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
2104
|
+
O = toIndexedObject(O);
|
|
2105
|
+
P = toPrimitive(P, true);
|
|
2106
|
+
if (IE8_DOM_DEFINE) try {
|
|
2107
|
+
return nativeGetOwnPropertyDescriptor(O, P);
|
|
2108
|
+
} catch (error) { /* empty */ }
|
|
2109
|
+
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
|
|
2110
|
+
};
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
/***/ }),
|
|
2114
|
+
|
|
2115
|
+
/***/ "./node_modules/core-js/internals/object-get-own-property-names.js":
|
|
2116
|
+
/*!*************************************************************************!*\
|
|
2117
|
+
!*** ./node_modules/core-js/internals/object-get-own-property-names.js ***!
|
|
2118
|
+
\*************************************************************************/
|
|
2119
|
+
/*! no static exports found */
|
|
2120
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2121
|
+
|
|
2122
|
+
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js");
|
|
2123
|
+
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
|
|
2124
|
+
|
|
2125
|
+
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
2126
|
+
|
|
2127
|
+
// `Object.getOwnPropertyNames` method
|
|
2128
|
+
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
|
2129
|
+
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
2130
|
+
return internalObjectKeys(O, hiddenKeys);
|
|
2131
|
+
};
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
/***/ }),
|
|
2135
|
+
|
|
2136
|
+
/***/ "./node_modules/core-js/internals/object-get-own-property-symbols.js":
|
|
2137
|
+
/*!***************************************************************************!*\
|
|
2138
|
+
!*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
|
|
2139
|
+
\***************************************************************************/
|
|
2140
|
+
/*! no static exports found */
|
|
2141
|
+
/***/ (function(module, exports) {
|
|
2142
|
+
|
|
2143
|
+
exports.f = Object.getOwnPropertySymbols;
|
|
2144
|
+
|
|
2145
|
+
|
|
2146
|
+
/***/ }),
|
|
2147
|
+
|
|
2148
|
+
/***/ "./node_modules/core-js/internals/object-keys-internal.js":
|
|
2149
|
+
/*!****************************************************************!*\
|
|
2150
|
+
!*** ./node_modules/core-js/internals/object-keys-internal.js ***!
|
|
2151
|
+
\****************************************************************/
|
|
2152
|
+
/*! no static exports found */
|
|
2153
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2154
|
+
|
|
2155
|
+
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
|
|
2156
|
+
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
|
|
2157
|
+
var indexOf = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").indexOf;
|
|
2158
|
+
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
|
|
2159
|
+
|
|
2160
|
+
module.exports = function (object, names) {
|
|
2161
|
+
var O = toIndexedObject(object);
|
|
2162
|
+
var i = 0;
|
|
2163
|
+
var result = [];
|
|
2164
|
+
var key;
|
|
2165
|
+
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
|
2166
|
+
// Don't enum bug & hidden keys
|
|
2167
|
+
while (names.length > i) if (has(O, key = names[i++])) {
|
|
2168
|
+
~indexOf(result, key) || result.push(key);
|
|
2169
|
+
}
|
|
2170
|
+
return result;
|
|
2171
|
+
};
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
/***/ }),
|
|
2175
|
+
|
|
2176
|
+
/***/ "./node_modules/core-js/internals/object-property-is-enumerable.js":
|
|
2177
|
+
/*!*************************************************************************!*\
|
|
2178
|
+
!*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
|
|
2179
|
+
\*************************************************************************/
|
|
2180
|
+
/*! no static exports found */
|
|
2181
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2182
|
+
|
|
2183
|
+
"use strict";
|
|
2184
|
+
|
|
2185
|
+
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
|
2186
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2187
|
+
|
|
2188
|
+
// Nashorn ~ JDK8 bug
|
|
2189
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
|
2190
|
+
|
|
2191
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
2192
|
+
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
|
2193
|
+
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
2194
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
2195
|
+
return !!descriptor && descriptor.enumerable;
|
|
2196
|
+
} : nativePropertyIsEnumerable;
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
/***/ }),
|
|
2200
|
+
|
|
2201
|
+
/***/ "./node_modules/core-js/internals/own-keys.js":
|
|
2202
|
+
/*!****************************************************!*\
|
|
2203
|
+
!*** ./node_modules/core-js/internals/own-keys.js ***!
|
|
2204
|
+
\****************************************************/
|
|
2205
|
+
/*! no static exports found */
|
|
2206
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2207
|
+
|
|
2208
|
+
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
|
|
2209
|
+
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
|
|
2210
|
+
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
|
|
2211
|
+
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
|
|
2212
|
+
|
|
2213
|
+
// all object keys, includes non-enumerable and symbols
|
|
2214
|
+
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
2215
|
+
var keys = getOwnPropertyNamesModule.f(anObject(it));
|
|
2216
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
2217
|
+
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
|
2218
|
+
};
|
|
2219
|
+
|
|
2220
|
+
|
|
2221
|
+
/***/ }),
|
|
2222
|
+
|
|
2223
|
+
/***/ "./node_modules/core-js/internals/path.js":
|
|
2224
|
+
/*!************************************************!*\
|
|
2225
|
+
!*** ./node_modules/core-js/internals/path.js ***!
|
|
2226
|
+
\************************************************/
|
|
2227
|
+
/*! no static exports found */
|
|
2228
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2229
|
+
|
|
2230
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
2231
|
+
|
|
2232
|
+
module.exports = global;
|
|
2233
|
+
|
|
2234
|
+
|
|
2235
|
+
/***/ }),
|
|
2236
|
+
|
|
2237
|
+
/***/ "./node_modules/core-js/internals/redefine.js":
|
|
2238
|
+
/*!****************************************************!*\
|
|
2239
|
+
!*** ./node_modules/core-js/internals/redefine.js ***!
|
|
2240
|
+
\****************************************************/
|
|
2241
|
+
/*! no static exports found */
|
|
2242
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2243
|
+
|
|
2244
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
2245
|
+
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
|
|
2246
|
+
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
|
|
2247
|
+
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");
|
|
2248
|
+
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
|
|
2249
|
+
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
|
|
2250
|
+
|
|
2251
|
+
var getInternalState = InternalStateModule.get;
|
|
2252
|
+
var enforceInternalState = InternalStateModule.enforce;
|
|
2253
|
+
var TEMPLATE = String(String).split('String');
|
|
2254
|
+
|
|
2255
|
+
(module.exports = function (O, key, value, options) {
|
|
2256
|
+
var unsafe = options ? !!options.unsafe : false;
|
|
2257
|
+
var simple = options ? !!options.enumerable : false;
|
|
2258
|
+
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
2259
|
+
if (typeof value == 'function') {
|
|
2260
|
+
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
|
|
2261
|
+
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
|
2262
|
+
}
|
|
2263
|
+
if (O === global) {
|
|
2264
|
+
if (simple) O[key] = value;
|
|
2265
|
+
else setGlobal(key, value);
|
|
2266
|
+
return;
|
|
2267
|
+
} else if (!unsafe) {
|
|
2268
|
+
delete O[key];
|
|
2269
|
+
} else if (!noTargetGet && O[key]) {
|
|
2270
|
+
simple = true;
|
|
2271
|
+
}
|
|
2272
|
+
if (simple) O[key] = value;
|
|
2273
|
+
else createNonEnumerableProperty(O, key, value);
|
|
2274
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
2275
|
+
})(Function.prototype, 'toString', function toString() {
|
|
2276
|
+
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
|
2277
|
+
});
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
/***/ }),
|
|
2281
|
+
|
|
2282
|
+
/***/ "./node_modules/core-js/internals/require-object-coercible.js":
|
|
2283
|
+
/*!********************************************************************!*\
|
|
2284
|
+
!*** ./node_modules/core-js/internals/require-object-coercible.js ***!
|
|
2285
|
+
\********************************************************************/
|
|
2286
|
+
/*! no static exports found */
|
|
2287
|
+
/***/ (function(module, exports) {
|
|
2288
|
+
|
|
2289
|
+
// `RequireObjectCoercible` abstract operation
|
|
2290
|
+
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
|
2291
|
+
module.exports = function (it) {
|
|
2292
|
+
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
2293
|
+
return it;
|
|
2294
|
+
};
|
|
2295
|
+
|
|
2296
|
+
|
|
2297
|
+
/***/ }),
|
|
2298
|
+
|
|
2299
|
+
/***/ "./node_modules/core-js/internals/set-global.js":
|
|
2300
|
+
/*!******************************************************!*\
|
|
2301
|
+
!*** ./node_modules/core-js/internals/set-global.js ***!
|
|
2302
|
+
\******************************************************/
|
|
2303
|
+
/*! no static exports found */
|
|
2304
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2305
|
+
|
|
2306
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
2307
|
+
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
|
|
2308
|
+
|
|
2309
|
+
module.exports = function (key, value) {
|
|
2310
|
+
try {
|
|
2311
|
+
createNonEnumerableProperty(global, key, value);
|
|
2312
|
+
} catch (error) {
|
|
2313
|
+
global[key] = value;
|
|
2314
|
+
} return value;
|
|
2315
|
+
};
|
|
2316
|
+
|
|
2317
|
+
|
|
2318
|
+
/***/ }),
|
|
2319
|
+
|
|
2320
|
+
/***/ "./node_modules/core-js/internals/shared-key.js":
|
|
2321
|
+
/*!******************************************************!*\
|
|
2322
|
+
!*** ./node_modules/core-js/internals/shared-key.js ***!
|
|
2323
|
+
\******************************************************/
|
|
2324
|
+
/*! no static exports found */
|
|
2325
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2326
|
+
|
|
2327
|
+
var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
|
|
2328
|
+
var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
|
|
2329
|
+
|
|
2330
|
+
var keys = shared('keys');
|
|
2331
|
+
|
|
2332
|
+
module.exports = function (key) {
|
|
2333
|
+
return keys[key] || (keys[key] = uid(key));
|
|
2334
|
+
};
|
|
2335
|
+
|
|
2336
|
+
|
|
2337
|
+
/***/ }),
|
|
2338
|
+
|
|
2339
|
+
/***/ "./node_modules/core-js/internals/shared-store.js":
|
|
2340
|
+
/*!********************************************************!*\
|
|
2341
|
+
!*** ./node_modules/core-js/internals/shared-store.js ***!
|
|
2342
|
+
\********************************************************/
|
|
2343
|
+
/*! no static exports found */
|
|
2344
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2345
|
+
|
|
2346
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
2347
|
+
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");
|
|
2348
|
+
|
|
2349
|
+
var SHARED = '__core-js_shared__';
|
|
2350
|
+
var store = global[SHARED] || setGlobal(SHARED, {});
|
|
2351
|
+
|
|
2352
|
+
module.exports = store;
|
|
2353
|
+
|
|
2354
|
+
|
|
2355
|
+
/***/ }),
|
|
2356
|
+
|
|
2357
|
+
/***/ "./node_modules/core-js/internals/shared.js":
|
|
2358
|
+
/*!**************************************************!*\
|
|
2359
|
+
!*** ./node_modules/core-js/internals/shared.js ***!
|
|
2360
|
+
\**************************************************/
|
|
2361
|
+
/*! no static exports found */
|
|
2362
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2363
|
+
|
|
2364
|
+
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
|
|
2365
|
+
var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
|
|
2366
|
+
|
|
2367
|
+
(module.exports = function (key, value) {
|
|
2368
|
+
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
2369
|
+
})('versions', []).push({
|
|
2370
|
+
version: '3.6.5',
|
|
2371
|
+
mode: IS_PURE ? 'pure' : 'global',
|
|
2372
|
+
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
|
|
2373
|
+
});
|
|
2374
|
+
|
|
2375
|
+
|
|
2376
|
+
/***/ }),
|
|
2377
|
+
|
|
2378
|
+
/***/ "./node_modules/core-js/internals/to-absolute-index.js":
|
|
2379
|
+
/*!*************************************************************!*\
|
|
2380
|
+
!*** ./node_modules/core-js/internals/to-absolute-index.js ***!
|
|
2381
|
+
\*************************************************************/
|
|
2382
|
+
/*! no static exports found */
|
|
2383
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2384
|
+
|
|
2385
|
+
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");
|
|
2386
|
+
|
|
2387
|
+
var max = Math.max;
|
|
2388
|
+
var min = Math.min;
|
|
2389
|
+
|
|
2390
|
+
// Helper for a popular repeating case of the spec:
|
|
2391
|
+
// Let integer be ? ToInteger(index).
|
|
2392
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
2393
|
+
module.exports = function (index, length) {
|
|
2394
|
+
var integer = toInteger(index);
|
|
2395
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
2396
|
+
};
|
|
2397
|
+
|
|
2398
|
+
|
|
2399
|
+
/***/ }),
|
|
2400
|
+
|
|
2401
|
+
/***/ "./node_modules/core-js/internals/to-indexed-object.js":
|
|
2402
|
+
/*!*************************************************************!*\
|
|
2403
|
+
!*** ./node_modules/core-js/internals/to-indexed-object.js ***!
|
|
2404
|
+
\*************************************************************/
|
|
2405
|
+
/*! no static exports found */
|
|
2406
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2407
|
+
|
|
2408
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
2409
|
+
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
|
|
2410
|
+
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
|
|
2411
|
+
|
|
2412
|
+
module.exports = function (it) {
|
|
2413
|
+
return IndexedObject(requireObjectCoercible(it));
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
/***/ }),
|
|
2418
|
+
|
|
2419
|
+
/***/ "./node_modules/core-js/internals/to-integer.js":
|
|
2420
|
+
/*!******************************************************!*\
|
|
2421
|
+
!*** ./node_modules/core-js/internals/to-integer.js ***!
|
|
2422
|
+
\******************************************************/
|
|
2423
|
+
/*! no static exports found */
|
|
2424
|
+
/***/ (function(module, exports) {
|
|
2425
|
+
|
|
2426
|
+
var ceil = Math.ceil;
|
|
2427
|
+
var floor = Math.floor;
|
|
2428
|
+
|
|
2429
|
+
// `ToInteger` abstract operation
|
|
2430
|
+
// https://tc39.github.io/ecma262/#sec-tointeger
|
|
2431
|
+
module.exports = function (argument) {
|
|
2432
|
+
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
|
2433
|
+
};
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
/***/ }),
|
|
2437
|
+
|
|
2438
|
+
/***/ "./node_modules/core-js/internals/to-length.js":
|
|
2439
|
+
/*!*****************************************************!*\
|
|
2440
|
+
!*** ./node_modules/core-js/internals/to-length.js ***!
|
|
2441
|
+
\*****************************************************/
|
|
2442
|
+
/*! no static exports found */
|
|
2443
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2444
|
+
|
|
2445
|
+
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");
|
|
2446
|
+
|
|
2447
|
+
var min = Math.min;
|
|
2448
|
+
|
|
2449
|
+
// `ToLength` abstract operation
|
|
2450
|
+
// https://tc39.github.io/ecma262/#sec-tolength
|
|
2451
|
+
module.exports = function (argument) {
|
|
2452
|
+
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
/***/ }),
|
|
2457
|
+
|
|
2458
|
+
/***/ "./node_modules/core-js/internals/to-primitive.js":
|
|
2459
|
+
/*!********************************************************!*\
|
|
2460
|
+
!*** ./node_modules/core-js/internals/to-primitive.js ***!
|
|
2461
|
+
\********************************************************/
|
|
2462
|
+
/*! no static exports found */
|
|
2463
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2464
|
+
|
|
2465
|
+
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
2466
|
+
|
|
2467
|
+
// `ToPrimitive` abstract operation
|
|
2468
|
+
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
2469
|
+
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
2470
|
+
// and the second argument - flag - preferred type is a string
|
|
2471
|
+
module.exports = function (input, PREFERRED_STRING) {
|
|
2472
|
+
if (!isObject(input)) return input;
|
|
2473
|
+
var fn, val;
|
|
2474
|
+
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
2475
|
+
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
2476
|
+
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
2477
|
+
throw TypeError("Can't convert object to primitive value");
|
|
2478
|
+
};
|
|
2479
|
+
|
|
2480
|
+
|
|
2481
|
+
/***/ }),
|
|
2482
|
+
|
|
2483
|
+
/***/ "./node_modules/core-js/internals/uid.js":
|
|
2484
|
+
/*!***********************************************!*\
|
|
2485
|
+
!*** ./node_modules/core-js/internals/uid.js ***!
|
|
2486
|
+
\***********************************************/
|
|
2487
|
+
/*! no static exports found */
|
|
2488
|
+
/***/ (function(module, exports) {
|
|
2489
|
+
|
|
2490
|
+
var id = 0;
|
|
2491
|
+
var postfix = Math.random();
|
|
2492
|
+
|
|
2493
|
+
module.exports = function (key) {
|
|
2494
|
+
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2497
|
+
|
|
2498
|
+
/***/ }),
|
|
2499
|
+
|
|
2500
|
+
/***/ "./node_modules/core-js/modules/es.math.log10.js":
|
|
2501
|
+
/*!*******************************************************!*\
|
|
2502
|
+
!*** ./node_modules/core-js/modules/es.math.log10.js ***!
|
|
2503
|
+
\*******************************************************/
|
|
2504
|
+
/*! no static exports found */
|
|
2505
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2506
|
+
|
|
2507
|
+
var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
|
|
2508
|
+
|
|
2509
|
+
var log = Math.log;
|
|
2510
|
+
var LOG10E = Math.LOG10E;
|
|
2511
|
+
|
|
2512
|
+
// `Math.log10` method
|
|
2513
|
+
// https://tc39.github.io/ecma262/#sec-math.log10
|
|
2514
|
+
$({ target: 'Math', stat: true }, {
|
|
2515
|
+
log10: function log10(x) {
|
|
2516
|
+
return log(x) * LOG10E;
|
|
2517
|
+
}
|
|
2518
|
+
});
|
|
2519
|
+
|
|
2520
|
+
|
|
2521
|
+
/***/ }),
|
|
2522
|
+
|
|
2523
|
+
/***/ "./node_modules/webpack/buildin/global.js":
|
|
2524
|
+
/*!***********************************!*\
|
|
2525
|
+
!*** (webpack)/buildin/global.js ***!
|
|
2526
|
+
\***********************************/
|
|
2527
|
+
/*! no static exports found */
|
|
2528
|
+
/***/ (function(module, exports) {
|
|
2529
|
+
|
|
2530
|
+
var g;
|
|
2531
|
+
|
|
2532
|
+
// This works in non-strict mode
|
|
2533
|
+
g = (function() {
|
|
2534
|
+
return this;
|
|
2535
|
+
})();
|
|
2536
|
+
|
|
2537
|
+
try {
|
|
2538
|
+
// This works if eval is allowed (see CSP)
|
|
2539
|
+
g = g || new Function("return this")();
|
|
2540
|
+
} catch (e) {
|
|
2541
|
+
// This works if the window reference is available
|
|
2542
|
+
if (typeof window === "object") g = window;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
// g can still be undefined, but nothing to do about it...
|
|
2546
|
+
// We return undefined, instead of nothing here, so it's
|
|
2547
|
+
// easier to handle this case. if(!global) { ...}
|
|
2548
|
+
|
|
2549
|
+
module.exports = g;
|
|
2550
|
+
|
|
2551
|
+
|
|
2552
|
+
/***/ }),
|
|
2553
|
+
|
|
2554
|
+
/***/ "./src/CreatorFunctions.ts":
|
|
2555
|
+
/*!*********************************!*\
|
|
2556
|
+
!*** ./src/CreatorFunctions.ts ***!
|
|
2557
|
+
\*********************************/
|
|
2558
|
+
/*! exports provided: getCreatorFunctions */
|
|
2559
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2560
|
+
|
|
2561
|
+
"use strict";
|
|
2562
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2563
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return getCreatorFunctions; });
|
|
2564
|
+
var getCreatorFunctions = function getCreatorFunctions() {
|
|
2565
|
+
return {
|
|
2566
|
+
shouldImport: shouldImport,
|
|
2567
|
+
getCreatorImportArgs: getCreatorImportArgs
|
|
2568
|
+
};
|
|
2569
|
+
};
|
|
2570
|
+
|
|
2571
|
+
var shouldImport = function shouldImport(importKey, state) {
|
|
2572
|
+
return true;
|
|
2573
|
+
};
|
|
2574
|
+
|
|
2575
|
+
var getCreatorImportArgs = function getCreatorImportArgs(importKey, state) {
|
|
2576
|
+
return undefined;
|
|
2577
|
+
};
|
|
2578
|
+
|
|
2579
|
+
/***/ }),
|
|
2580
|
+
|
|
2581
|
+
/***/ "./src/DerivedData.ts":
|
|
2582
|
+
/*!****************************!*\
|
|
2583
|
+
!*** ./src/DerivedData.ts ***!
|
|
2584
|
+
\****************************/
|
|
2585
|
+
/*! exports provided: getDerivedData */
|
|
2586
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2587
|
+
|
|
2588
|
+
"use strict";
|
|
2589
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2590
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return getDerivedData; });
|
|
2591
|
+
/* harmony import */ var _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/scf-common/lib/Processor */ "./node_modules/@microchip/scf-common/lib/Processor.js");
|
|
2592
|
+
/* harmony import */ var _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__);
|
|
2593
|
+
/* harmony import */ var _PwmCalculator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PwmCalculator */ "./src/PwmCalculator.tsx");
|
|
2594
|
+
/* harmony import */ var _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interfaces/pwm_general_parameters */ "./src/interfaces/pwm_general_parameters.tsx");
|
|
2595
|
+
/* harmony import */ var _GeneratorModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GeneratorModel */ "./src/GeneratorModel.tsx");
|
|
2596
|
+
/* harmony import */ var _microchip_scf_automodule_impl_lib_autoModule_ContextualHelp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @microchip/scf-automodule-impl/lib/autoModule/ContextualHelp */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js");
|
|
2597
|
+
/* harmony import */ var _microchip_scf_automodule_impl_lib_autoModule_ContextualHelp__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_automodule_impl_lib_autoModule_ContextualHelp__WEBPACK_IMPORTED_MODULE_4__);
|
|
2598
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
2599
|
+
|
|
2600
|
+
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); }
|
|
2601
|
+
|
|
2602
|
+
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; }
|
|
2603
|
+
|
|
2604
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2605
|
+
|
|
2606
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2607
|
+
|
|
2608
|
+
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
|
|
2613
|
+
var getDerivedData = function getDerivedData(dataModel) {
|
|
2614
|
+
if (dataModel) {
|
|
2615
|
+
return new MyDerivedData(dataModel);
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
return new EmptyDerivedData();
|
|
2619
|
+
}; //This data will be used at the creator stage and relies on only the state
|
|
2620
|
+
|
|
2621
|
+
var EmptyDerivedData = function EmptyDerivedData() {
|
|
2622
|
+
_classCallCheck(this, EmptyDerivedData);
|
|
2623
|
+
|
|
2624
|
+
_defineProperty(this, "getMyFunctions", function () {
|
|
2625
|
+
return {};
|
|
2626
|
+
});
|
|
2627
|
+
|
|
2628
|
+
_defineProperty(this, "getModel", function () {
|
|
2629
|
+
return undefined;
|
|
2630
|
+
});
|
|
2631
|
+
}; //This data will be used at the processor stage
|
|
2632
|
+
|
|
2633
|
+
|
|
2634
|
+
var MyDerivedData = function MyDerivedData(dataModel) {
|
|
2635
|
+
var _this = this;
|
|
2636
|
+
|
|
2637
|
+
_classCallCheck(this, MyDerivedData);
|
|
2638
|
+
|
|
2639
|
+
_defineProperty(this, "dataModel", void 0);
|
|
2640
|
+
|
|
2641
|
+
_defineProperty(this, "pwmCalculator", void 0);
|
|
2642
|
+
|
|
2643
|
+
_defineProperty(this, "getPwmCalculator", function () {
|
|
2644
|
+
if (!_this.pwmCalculator) {
|
|
2645
|
+
var _this$dataModel$getIm, _this$dataModel$getIm2;
|
|
2646
|
+
|
|
2647
|
+
_this.pwmCalculator = new _PwmCalculator__WEBPACK_IMPORTED_MODULE_1__["PwmCalculator"](_this.getTimerPrValue(), _this.getTimerPrescaler(), (_this$dataModel$getIm = (_this$dataModel$getIm2 = _this.dataModel.getImportValue("osc_clocks")) === null || _this$dataModel$getIm2 === void 0 ? void 0 : _this$dataModel$getIm2.fosc) !== null && _this$dataModel$getIm !== void 0 ? _this$dataModel$getIm : 0, Number(_this.dataModel.getComponentValue("dutyCycle")));
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
return _this.pwmCalculator;
|
|
2651
|
+
});
|
|
2652
|
+
|
|
2653
|
+
_defineProperty(this, "getMyFunctions", function () {
|
|
2654
|
+
return {
|
|
2655
|
+
overrideDefaultValues: _this.overrideDefaultValues,
|
|
2656
|
+
overrideOptions: _this.overrideDefaultOptions,
|
|
2657
|
+
moduleName: function moduleName() {
|
|
2658
|
+
var _this$dataModel$getHa;
|
|
2659
|
+
|
|
2660
|
+
return (_this$dataModel$getHa = _this.dataModel.getHardware()) === null || _this$dataModel$getHa === void 0 ? void 0 : _this$dataModel$getHa.getName();
|
|
2661
|
+
},
|
|
2662
|
+
pinData: _this.getMyPinData,
|
|
2663
|
+
alerts: _this.getMyAlerts,
|
|
2664
|
+
pwm_general_parameters_payload: _this.pwm_general_parameters_payload,
|
|
2665
|
+
initializer_system_results: _this.initializer_system_results,
|
|
2666
|
+
dutyCycleValidator: _this.dutyCycleValidator,
|
|
2667
|
+
componentName: _this.componentName,
|
|
2668
|
+
pwmdcValue: function pwmdcValue() {
|
|
2669
|
+
return _this.getPwmCalculator().getCCPRValue();
|
|
2670
|
+
},
|
|
2671
|
+
pwmPeriod: function pwmPeriod() {
|
|
2672
|
+
return _this.getPwmCalculator().getPwmPeriod();
|
|
2673
|
+
},
|
|
2674
|
+
pwmFrequency: function pwmFrequency() {
|
|
2675
|
+
return _this.getPwmCalculator().getPwmFrequency();
|
|
2676
|
+
},
|
|
2677
|
+
pwmResolution: function pwmResolution() {
|
|
2678
|
+
return _this.getPwmCalculator().getPwmResolution();
|
|
2679
|
+
},
|
|
2680
|
+
ctselCcptmrs1: _this.ctselCcptmrs1,
|
|
2681
|
+
pwmdchPwmdch: function pwmdchPwmdch() {
|
|
2682
|
+
return Number(_this.dataModel.getComponentValue("pwmdcValue")) >> 2;
|
|
2683
|
+
},
|
|
2684
|
+
pwmdclPwmdcl: function pwmdclPwmdcl() {
|
|
2685
|
+
return Number(_this.dataModel.getComponentValue("pwmdcValue")) & 3;
|
|
2686
|
+
},
|
|
2687
|
+
templateData: function templateData() {
|
|
2688
|
+
return Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getGeneratorModel"])(_this.dataModel);
|
|
2689
|
+
},
|
|
2690
|
+
getHelpUrl: _this.getSdlHelpOverride
|
|
2691
|
+
};
|
|
2692
|
+
});
|
|
2693
|
+
|
|
2694
|
+
_defineProperty(this, "overrideDefaultValues", function (componentName) {
|
|
2695
|
+
var _this$dataModel$getHa2;
|
|
2696
|
+
|
|
2697
|
+
switch (componentName) {
|
|
2698
|
+
case "componentName":
|
|
2699
|
+
return (_this$dataModel$getHa2 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa2 === void 0 ? void 0 : _this$dataModel$getHa2.getName();
|
|
2700
|
+
|
|
2701
|
+
default:
|
|
2702
|
+
return undefined;
|
|
2703
|
+
}
|
|
2704
|
+
});
|
|
2705
|
+
|
|
2706
|
+
_defineProperty(this, "overrideDefaultOptions", function (componentName) {
|
|
2707
|
+
switch (componentName) {
|
|
2708
|
+
case "timerSelection":
|
|
2709
|
+
{
|
|
2710
|
+
var _this$dataModel$getPe, _this$dataModel$getPe2;
|
|
2711
|
+
|
|
2712
|
+
var result = [];
|
|
2713
|
+
var CCPTMRSREG = (_this$dataModel$getPe = _this.dataModel.getPeripheralDescription()) === null || _this$dataModel$getPe === void 0 ? void 0 : (_this$dataModel$getPe2 = _this$dataModel$getPe.registers) === null || _this$dataModel$getPe2 === void 0 ? void 0 : _this$dataModel$getPe2.CCPTMRS1;
|
|
2714
|
+
|
|
2715
|
+
if (CCPTMRSREG) {
|
|
2716
|
+
var _CCPTMRSREG$settings, _CTSELSETT$options;
|
|
2717
|
+
|
|
2718
|
+
var CTSELSETT = (_CCPTMRSREG$settings = CCPTMRSREG.settings) === null || _CCPTMRSREG$settings === void 0 ? void 0 : _CCPTMRSREG$settings.CTSEL;
|
|
2719
|
+
|
|
2720
|
+
var _iterator = _createForOfIteratorHelper((_CTSELSETT$options = CTSELSETT === null || CTSELSETT === void 0 ? void 0 : CTSELSETT.options) !== null && _CTSELSETT$options !== void 0 ? _CTSELSETT$options : []),
|
|
2721
|
+
_step;
|
|
2722
|
+
|
|
2723
|
+
try {
|
|
2724
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2725
|
+
var _optnmatch$length;
|
|
2726
|
+
|
|
2727
|
+
var eachoptn = _step.value;
|
|
2728
|
+
var timeroptnregex = /^pwm[0-9]timer([0-9])$/i;
|
|
2729
|
+
var optnmatch = eachoptn.alias.match(timeroptnregex);
|
|
2730
|
+
var correctOptnName = ((_optnmatch$length = optnmatch === null || optnmatch === void 0 ? void 0 : optnmatch.length) !== null && _optnmatch$length !== void 0 ? _optnmatch$length : 0) > 1 ? "TMR" + (optnmatch === null || optnmatch === void 0 ? void 0 : optnmatch[1]) : "";
|
|
2731
|
+
result.push(correctOptnName);
|
|
2732
|
+
}
|
|
2733
|
+
} catch (err) {
|
|
2734
|
+
_iterator.e(err);
|
|
2735
|
+
} finally {
|
|
2736
|
+
_iterator.f();
|
|
2737
|
+
}
|
|
2738
|
+
} else {
|
|
2739
|
+
result.push("TMR2");
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
return result;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
default:
|
|
2746
|
+
return []
|
|
2747
|
+
/*for other fields - undefined as take options from moduleconfig.json*/
|
|
2748
|
+
;
|
|
2749
|
+
}
|
|
2750
|
+
});
|
|
2751
|
+
|
|
2752
|
+
_defineProperty(this, "getModel", function () {
|
|
2753
|
+
return _this.dataModel;
|
|
2754
|
+
});
|
|
2755
|
+
|
|
2756
|
+
_defineProperty(this, "getMyPinData", function () {
|
|
2757
|
+
return {};
|
|
2758
|
+
});
|
|
2759
|
+
|
|
2760
|
+
_defineProperty(this, "getMyAlerts", function () {
|
|
2761
|
+
var _this$dataModel$getCo, _timerSelection$match, _this$dataModel$getAs, _this$dataModel$getAs2;
|
|
2762
|
+
|
|
2763
|
+
var alerts = [];
|
|
2764
|
+
var timerSelection = (_this$dataModel$getCo = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "";
|
|
2765
|
+
var groupmatch = (_timerSelection$match = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match !== void 0 ? _timerSelection$match : "";
|
|
2766
|
+
var timersuffix = (groupmatch === null || groupmatch === void 0 ? void 0 : groupmatch.length) > 1 ? groupmatch[1] : "";
|
|
2767
|
+
|
|
2768
|
+
if (_this.dataModel.getAssignedImport("Timer") == undefined || ((_this$dataModel$getAs = _this.dataModel.getAssignedImport("Timer")) === null || _this$dataModel$getAs === void 0 ? void 0 : (_this$dataModel$getAs2 = _this$dataModel$getAs.handle) === null || _this$dataModel$getAs2 === void 0 ? void 0 : _this$dataModel$getAs2.label) !== "TMR" + timersuffix) {
|
|
2769
|
+
alerts.push({
|
|
2770
|
+
text: "Please select ".concat(timerSelection, " as the Timer Dependency."),
|
|
2771
|
+
type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Warning
|
|
2772
|
+
});
|
|
2773
|
+
} else {
|
|
2774
|
+
alerts.push({
|
|
2775
|
+
text: "".concat(_this.dataModel.getName(), " uses ").concat(timerSelection, "."),
|
|
2776
|
+
type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint
|
|
2777
|
+
});
|
|
2778
|
+
alerts.push({
|
|
2779
|
+
text: "Postscaler setting in ".concat(timerSelection, " does not affect the calculated parameters in PWM module."),
|
|
2780
|
+
type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint
|
|
2781
|
+
});
|
|
2782
|
+
|
|
2783
|
+
if (Number(_this.dataModel.getComponentValue("pwmdcValue")) / 4 > _this.getTimerPrValue()) {
|
|
2784
|
+
alerts.push({
|
|
2785
|
+
text: "The value for Duty Cycle percentage is crossing 100 because the period value set in tmr is greater than the dutycycle value set in PWM. Set the duty cycle to be less than 100 percent.",
|
|
2786
|
+
type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Warning
|
|
2787
|
+
});
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
return alerts;
|
|
2792
|
+
});
|
|
2793
|
+
|
|
2794
|
+
_defineProperty(this, "getSdlHelpOverride", function (componentName, helpUrl) {
|
|
2795
|
+
if (componentName === "timerSelection") {
|
|
2796
|
+
var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4;
|
|
2797
|
+
|
|
2798
|
+
if ((_this$getModel$getPer = _this.getModel().getPeripheralDescription()) === null || _this$getModel$getPer === void 0 ? void 0 : (_this$getModel$getPer2 = _this$getModel$getPer.registers) === null || _this$getModel$getPer2 === void 0 ? void 0 : _this$getModel$getPer2.CCPTMRS1) {
|
|
2799
|
+
componentName = "ctselCcptmrs1";
|
|
2800
|
+
} else if ((_this$getModel$getPer3 = _this.getModel().getPeripheralDescription()) === null || _this$getModel$getPer3 === void 0 ? void 0 : (_this$getModel$getPer4 = _this$getModel$getPer3.registers) === null || _this$getModel$getPer4 === void 0 ? void 0 : _this$getModel$getPer4.CCPTMRS) {
|
|
2801
|
+
componentName = "ctselCcptmrs";
|
|
2802
|
+
}
|
|
2803
|
+
} else if (componentName === "dutyCycle" || componentName === "pwmdcValue") {
|
|
2804
|
+
var _helpUrl, _this$getModel$getHar, _this$getModel$getHar2;
|
|
2805
|
+
|
|
2806
|
+
helpUrl = (_helpUrl = helpUrl) === null || _helpUrl === void 0 ? void 0 : _helpUrl.replace("${instance}", (_this$getModel$getHar = (_this$getModel$getHar2 = _this.getModel().getHardware()) === null || _this$getModel$getHar2 === void 0 ? void 0 : _this$getModel$getHar2.getName()) !== null && _this$getModel$getHar !== void 0 ? _this$getModel$getHar : "");
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
return Object(_microchip_scf_automodule_impl_lib_autoModule_ContextualHelp__WEBPACK_IMPORTED_MODULE_4__["getAutoSdlHelp"])(_this.getModel(), componentName, helpUrl);
|
|
2810
|
+
});
|
|
2811
|
+
|
|
2812
|
+
_defineProperty(this, "pwm_general_parameters_payload", function () {
|
|
2813
|
+
var _this$dataModel$getCo2;
|
|
2814
|
+
|
|
2815
|
+
return {
|
|
2816
|
+
interfaceApi: _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_2__["Interface"].createFirmwareApi((_this$dataModel$getCo2 = _this.dataModel.getComponentValue("componentName")) !== null && _this$dataModel$getCo2 !== void 0 ? _this$dataModel$getCo2 : "", Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getHeaderFiles"])(_this.dataModel)),
|
|
2817
|
+
customName: _this.dataModel.getComponentValue("componentName"),
|
|
2818
|
+
modulename: _this.dataModel.getName(),
|
|
2819
|
+
isdriverisr: false,
|
|
2820
|
+
ispwmi_enabled: false,
|
|
2821
|
+
ispwmpi_enabled: false,
|
|
2822
|
+
moduleName: _this.dataModel.getName()
|
|
2823
|
+
};
|
|
2824
|
+
});
|
|
2825
|
+
|
|
2826
|
+
_defineProperty(this, "initializer_system_results", function () {
|
|
2827
|
+
return {
|
|
2828
|
+
initializer: {
|
|
2829
|
+
name: _this.dataModel.getComponentValue("componentName") + "_Initialize",
|
|
2830
|
+
header: Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getHeaderFiles"])(_this.dataModel)[0]
|
|
2831
|
+
}
|
|
2832
|
+
};
|
|
2833
|
+
});
|
|
2834
|
+
|
|
2835
|
+
_defineProperty(this, "dutyCycleValidator", function () {
|
|
2836
|
+
return {
|
|
2837
|
+
minimum: 0,
|
|
2838
|
+
maximum: 100
|
|
2839
|
+
};
|
|
2840
|
+
});
|
|
2841
|
+
|
|
2842
|
+
_defineProperty(this, "componentName", function () {
|
|
2843
|
+
var arg = _this.getArg("pwm_general", _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_2__["Interface"]);
|
|
2844
|
+
|
|
2845
|
+
if (arg) {
|
|
2846
|
+
var pwmArg = arg;
|
|
2847
|
+
return pwmArg.customName;
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2850
|
+
return undefined;
|
|
2851
|
+
});
|
|
2852
|
+
|
|
2853
|
+
_defineProperty(this, "ctselCcptmrs1", function () {
|
|
2854
|
+
var _this$dataModel$getHa3, _this$dataModel$getHa4, _this$dataModel$getHa5;
|
|
2855
|
+
|
|
2856
|
+
switch (_this.dataModel.getComponentValue("timerSelection")) {
|
|
2857
|
+
case "TMR2":
|
|
2858
|
+
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "TMR2";
|
|
2859
|
+
|
|
2860
|
+
case "TMR4":
|
|
2861
|
+
return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "TMR4";
|
|
2862
|
+
|
|
2863
|
+
case "TMR6":
|
|
2864
|
+
return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "TMR6";
|
|
2865
|
+
|
|
2866
|
+
default:
|
|
2867
|
+
return undefined;
|
|
2868
|
+
}
|
|
2869
|
+
});
|
|
2870
|
+
|
|
2871
|
+
_defineProperty(this, "getTimerPrValue", function () {
|
|
2872
|
+
var _this$dataModel$getIm3, _this$dataModel$getIm4;
|
|
2873
|
+
|
|
2874
|
+
return (_this$dataModel$getIm3 = (_this$dataModel$getIm4 = _this.dataModel.getImportValue("Timer")) === null || _this$dataModel$getIm4 === void 0 ? void 0 : _this$dataModel$getIm4.periodRegisterValue) !== null && _this$dataModel$getIm3 !== void 0 ? _this$dataModel$getIm3 : 255;
|
|
2875
|
+
});
|
|
2876
|
+
|
|
2877
|
+
_defineProperty(this, "getTimerPrescaler", function () {
|
|
2878
|
+
var _this$dataModel$getIm5, _this$dataModel$getIm6;
|
|
2879
|
+
|
|
2880
|
+
return (_this$dataModel$getIm5 = (_this$dataModel$getIm6 = _this.dataModel.getImportValue("Timer")) === null || _this$dataModel$getIm6 === void 0 ? void 0 : _this$dataModel$getIm6.prescaleValue) !== null && _this$dataModel$getIm5 !== void 0 ? _this$dataModel$getIm5 : 1;
|
|
2881
|
+
});
|
|
2882
|
+
|
|
2883
|
+
_defineProperty(this, "getArg", function (key, id) {
|
|
2884
|
+
var exportInterface = _this.dataModel.getExportInterfaces().getInterface(key, id.getInterfaceId());
|
|
2885
|
+
|
|
2886
|
+
if (exportInterface === null || exportInterface === void 0 ? void 0 : exportInterface.args) {
|
|
2887
|
+
// choose the first requester for now
|
|
2888
|
+
return exportInterface.args[Object.keys(exportInterface.args)[0]];
|
|
2889
|
+
}
|
|
2890
|
+
});
|
|
2891
|
+
|
|
2892
|
+
this.dataModel = dataModel;
|
|
2893
|
+
};
|
|
2894
|
+
|
|
2895
|
+
/***/ }),
|
|
2896
|
+
|
|
2897
|
+
/***/ "./src/GeneratorModel.tsx":
|
|
2898
|
+
/*!********************************!*\
|
|
2899
|
+
!*** ./src/GeneratorModel.tsx ***!
|
|
2900
|
+
\********************************/
|
|
2901
|
+
/*! exports provided: getGeneratorModel, getHeaderFiles */
|
|
2902
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2903
|
+
|
|
2904
|
+
"use strict";
|
|
2905
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2906
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGeneratorModel", function() { return getGeneratorModel; });
|
|
2907
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHeaderFiles", function() { return getHeaderFiles; });
|
|
2908
|
+
/* harmony import */ var _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interfaces/pwm_general_parameters */ "./src/interfaces/pwm_general_parameters.tsx");
|
|
2909
|
+
/* harmony import */ var _generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../generated_module/src/autoModule/AutoModuleHelpers */ "./generated_module/src/autoModule/AutoModuleHelpers.ts");
|
|
2910
|
+
/* harmony import */ var _generated_module_src_autoModule_AutoModuleTemplates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../generated_module/src/autoModule/AutoModuleTemplates */ "./generated_module/src/autoModule/AutoModuleTemplates.ts");
|
|
2911
|
+
/* harmony import */ var _generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../generated_module/src/Utils */ "./generated_module/src/Utils.ts");
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
|
|
2916
|
+
var getGeneratorModel = function getGeneratorModel(model) {
|
|
2917
|
+
var _model$getComponentVa, _model$getPeripheralD, _model$getPeripheralD2, _model$getPeripheralD3, _model$getPeripheralD4, _model$getName, _model$getName2, _pwmInterface$headerF, _model$getImportValue, _templateSettings$reg, _templateSettings$reg2, _templateSettings$reg3, _templateSettings$reg4, _templateSettings$reg5, _templateSettings$reg6, _templateSettings$reg7, _templateSettings$reg8, _templateSettings$reg9, _templateSettings$reg10, _templateSettings$reg11, _templateSettings$reg12, _ctsel$options$length, _ctsel$options;
|
|
2918
|
+
|
|
2919
|
+
if (!model.getHardware()) return {};
|
|
2920
|
+
var pwmInterface = _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi((_model$getComponentVa = model.getComponentValue("componentName")) !== null && _model$getComponentVa !== void 0 ? _model$getComponentVa : "", getHeaderFiles(model));
|
|
2921
|
+
var templateSettings = Object(_generated_module_src_autoModule_AutoModuleTemplates__WEBPACK_IMPORTED_MODULE_2__["getTemplateSettings"])(model);
|
|
2922
|
+
var registerValues = templateSettings === null || templateSettings === void 0 ? void 0 : templateSettings.registers;
|
|
2923
|
+
var initRegisters = Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_3__["values"])(registerValues !== null && registerValues !== void 0 ? registerValues : {});
|
|
2924
|
+
var ctsel = (_model$getPeripheralD = model.getPeripheralDescription()) === null || _model$getPeripheralD === void 0 ? void 0 : (_model$getPeripheralD2 = _model$getPeripheralD.registers) === null || _model$getPeripheralD2 === void 0 ? void 0 : (_model$getPeripheralD3 = _model$getPeripheralD2.CCPTMRS1) === null || _model$getPeripheralD3 === void 0 ? void 0 : (_model$getPeripheralD4 = _model$getPeripheralD3.settings) === null || _model$getPeripheralD4 === void 0 ? void 0 : _model$getPeripheralD4.CTSEL;
|
|
2925
|
+
var CTSELvalue = ctsel ? Object(_generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__["getOptionValueByName"])(ctsel, model.getDerivedFunction("ctselCcptmrs1")) : 1;
|
|
2926
|
+
return {
|
|
2927
|
+
moduleNameLowerCase: (_model$getName = model.getName()) === null || _model$getName === void 0 ? void 0 : _model$getName.toLowerCase(),
|
|
2928
|
+
moduleNameUpperCase: (_model$getName2 = model.getName()) === null || _model$getName2 === void 0 ? void 0 : _model$getName2.toUpperCase(),
|
|
2929
|
+
header: (_pwmInterface$headerF = pwmInterface.headerFiles) === null || _pwmInterface$headerF === void 0 ? void 0 : _pwmInterface$headerF[0],
|
|
2930
|
+
api: pwmInterface.api,
|
|
2931
|
+
simpleApi: pwmInterface.simpleApi,
|
|
2932
|
+
productName: "",
|
|
2933
|
+
productVersion: "",
|
|
2934
|
+
selectedDevice: "PIC18F47Q10",
|
|
2935
|
+
compiler: "XC8 v2.20",
|
|
2936
|
+
tool: "MPLABX v5.40",
|
|
2937
|
+
//From System Manager
|
|
2938
|
+
useWatchdog: (_model$getImportValue = model.getImportValue("wdtEnable")) !== null && _model$getImportValue !== void 0 ? _model$getImportValue : false,
|
|
2939
|
+
//TODO
|
|
2940
|
+
//Registers and Settings
|
|
2941
|
+
initRegisters: initRegisters,
|
|
2942
|
+
PWMDCH: (_templateSettings$reg = templateSettings === null || templateSettings === void 0 ? void 0 : (_templateSettings$reg2 = templateSettings.registers) === null || _templateSettings$reg2 === void 0 ? void 0 : _templateSettings$reg2.PWMDCH.name) !== null && _templateSettings$reg !== void 0 ? _templateSettings$reg : "",
|
|
2943
|
+
PWMDCL: (_templateSettings$reg3 = templateSettings === null || templateSettings === void 0 ? void 0 : (_templateSettings$reg4 = templateSettings.registers) === null || _templateSettings$reg4 === void 0 ? void 0 : (_templateSettings$reg5 = _templateSettings$reg4.PWMDCL) === null || _templateSettings$reg5 === void 0 ? void 0 : _templateSettings$reg5.name) !== null && _templateSettings$reg3 !== void 0 ? _templateSettings$reg3 : "",
|
|
2944
|
+
CCPTMRSregname: (_templateSettings$reg6 = templateSettings === null || templateSettings === void 0 ? void 0 : (_templateSettings$reg7 = templateSettings.registers) === null || _templateSettings$reg7 === void 0 ? void 0 : (_templateSettings$reg8 = _templateSettings$reg7.CCPTMRS1) === null || _templateSettings$reg8 === void 0 ? void 0 : _templateSettings$reg8.name) !== null && _templateSettings$reg6 !== void 0 ? _templateSettings$reg6 : "",
|
|
2945
|
+
CTSELsettingname: (_templateSettings$reg9 = templateSettings === null || templateSettings === void 0 ? void 0 : (_templateSettings$reg10 = templateSettings.registers) === null || _templateSettings$reg10 === void 0 ? void 0 : (_templateSettings$reg11 = _templateSettings$reg10.CCPTMRS1) === null || _templateSettings$reg11 === void 0 ? void 0 : (_templateSettings$reg12 = _templateSettings$reg11.settings) === null || _templateSettings$reg12 === void 0 ? void 0 : _templateSettings$reg12.CTSEL.name) !== null && _templateSettings$reg9 !== void 0 ? _templateSettings$reg9 : "",
|
|
2946
|
+
CTSELvalue: CTSELvalue,
|
|
2947
|
+
timerselpresence: ((_ctsel$options$length = ctsel === null || ctsel === void 0 ? void 0 : (_ctsel$options = ctsel.options) === null || _ctsel$options === void 0 ? void 0 : _ctsel$options.length) !== null && _ctsel$options$length !== void 0 ? _ctsel$options$length : 0) > 0 ? "timerselpresent" : "timerselabsent",
|
|
2948
|
+
pwmdcValue: model.getComponentValue("pwmdcValue")
|
|
2949
|
+
};
|
|
2950
|
+
};
|
|
2951
|
+
var getHeaderFiles = function getHeaderFiles(model) {
|
|
2952
|
+
return [{
|
|
2953
|
+
name: model.getName().toLowerCase() + ".h",
|
|
2954
|
+
path: "pwm/"
|
|
2955
|
+
}];
|
|
2956
|
+
};
|
|
2957
|
+
|
|
2958
|
+
/***/ }),
|
|
2959
|
+
|
|
2960
|
+
/***/ "./src/PinsLogic.ts":
|
|
2961
|
+
/*!**************************!*\
|
|
2962
|
+
!*** ./src/PinsLogic.ts ***!
|
|
2963
|
+
\**************************/
|
|
2964
|
+
/*! exports provided: getCompletePinData, getRowData */
|
|
2965
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2966
|
+
|
|
2967
|
+
"use strict";
|
|
2968
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2969
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCompletePinData", function() { return getCompletePinData; });
|
|
2970
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRowData", function() { return getRowData; });
|
|
2971
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
2972
|
+
|
|
2973
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2974
|
+
|
|
2975
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2976
|
+
|
|
2977
|
+
// provide complete dynamic data for all pin rows. It overrides static pindata.json
|
|
2978
|
+
var getCompletePinData = function getCompletePinData(appModel) {
|
|
2979
|
+
// way to programatically override the json data
|
|
2980
|
+
return {};
|
|
2981
|
+
}; // overrides pin data for a particular row based on model.
|
|
2982
|
+
|
|
2983
|
+
function getRowData(appModel, rowData) {
|
|
2984
|
+
var _appModel$getHardware, _appModel$getHardware2;
|
|
2985
|
+
|
|
2986
|
+
var pwminstancename = (_appModel$getHardware = appModel.getHardware()) === null || _appModel$getHardware === void 0 ? void 0 : (_appModel$getHardware2 = _appModel$getHardware.getPeripheral()) === null || _appModel$getHardware2 === void 0 ? void 0 : _appModel$getHardware2.instance;
|
|
2987
|
+
|
|
2988
|
+
if (rowData.name === "out") {
|
|
2989
|
+
rowData = _objectSpread(_objectSpread({}, rowData), {}, {
|
|
2990
|
+
module: "PWM" + pwminstancename,
|
|
2991
|
+
"function": "PWM" + pwminstancename + "OUT",
|
|
2992
|
+
filter: {
|
|
2993
|
+
module: "PWM" + pwminstancename,
|
|
2994
|
+
aliasReEx: "PWM" + pwminstancename
|
|
2995
|
+
}
|
|
2996
|
+
});
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
return rowData;
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
/***/ }),
|
|
3003
|
+
|
|
3004
|
+
/***/ "./src/PwmCalculator.tsx":
|
|
3005
|
+
/*!*******************************!*\
|
|
3006
|
+
!*** ./src/PwmCalculator.tsx ***!
|
|
3007
|
+
\*******************************/
|
|
3008
|
+
/*! exports provided: PwmCalculator */
|
|
3009
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3010
|
+
|
|
3011
|
+
"use strict";
|
|
3012
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3013
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PwmCalculator", function() { return PwmCalculator; });
|
|
3014
|
+
/* harmony import */ var core_js_features_math_log10__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/features/math/log10 */ "./node_modules/core-js/features/math/log10.js");
|
|
3015
|
+
/* harmony import */ var core_js_features_math_log10__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_features_math_log10__WEBPACK_IMPORTED_MODULE_0__);
|
|
3016
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3017
|
+
|
|
3018
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3019
|
+
|
|
3020
|
+
// Reused from Q43 CCP calculator
|
|
3021
|
+
// TODO: delete this duplicate and add CCP calculator dependency
|
|
3022
|
+
|
|
3023
|
+
var PwmCalculator = function PwmCalculator(prValue, prescaler, fosc, dutyCycle) {
|
|
3024
|
+
var _this = this;
|
|
3025
|
+
|
|
3026
|
+
_classCallCheck(this, PwmCalculator);
|
|
3027
|
+
|
|
3028
|
+
_defineProperty(this, "prValue", void 0);
|
|
3029
|
+
|
|
3030
|
+
_defineProperty(this, "prescaler", void 0);
|
|
3031
|
+
|
|
3032
|
+
_defineProperty(this, "fosc", void 0);
|
|
3033
|
+
|
|
3034
|
+
_defineProperty(this, "dutyCycleRatio", void 0);
|
|
3035
|
+
|
|
3036
|
+
_defineProperty(this, "getPwmPeriod", function () {
|
|
3037
|
+
var pwmPeriod = (_this.prValue + 1) * 4 * _this.prescaler;
|
|
3038
|
+
|
|
3039
|
+
if (_this.fosc > 0) {
|
|
3040
|
+
pwmPeriod = pwmPeriod / _this.fosc;
|
|
3041
|
+
} else {
|
|
3042
|
+
pwmPeriod = 0;
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3045
|
+
return pwmPeriod;
|
|
3046
|
+
});
|
|
3047
|
+
|
|
3048
|
+
_defineProperty(this, "getPwmFrequency", function () {
|
|
3049
|
+
var pwmFrequency = (_this.prValue + 1) * 4 * _this.prescaler;
|
|
3050
|
+
|
|
3051
|
+
if (pwmFrequency > 0) {
|
|
3052
|
+
pwmFrequency = _this.fosc / pwmFrequency;
|
|
3053
|
+
} else {
|
|
3054
|
+
pwmFrequency = 0;
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
pwmFrequency = Math.round(pwmFrequency * 100) / 100;
|
|
3058
|
+
return pwmFrequency;
|
|
3059
|
+
});
|
|
3060
|
+
|
|
3061
|
+
_defineProperty(this, "getPwmResolution", function () {
|
|
3062
|
+
var pwmResolution = core_js_features_math_log10__WEBPACK_IMPORTED_MODULE_0___default()(4 * (_this.prValue + 1)) / core_js_features_math_log10__WEBPACK_IMPORTED_MODULE_0___default()(2);
|
|
3063
|
+
return Math.floor(pwmResolution);
|
|
3064
|
+
});
|
|
3065
|
+
|
|
3066
|
+
_defineProperty(this, "getCCPRValue", function () {
|
|
3067
|
+
var ccprValue = Math.round(_this.dutyCycleRatio * 4 * (_this.prValue + 1) - 1);
|
|
3068
|
+
|
|
3069
|
+
if (ccprValue < 0) {
|
|
3070
|
+
return 0;
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
return ccprValue;
|
|
3074
|
+
});
|
|
3075
|
+
|
|
3076
|
+
_defineProperty(this, "getActualDutyCycle", function () {
|
|
3077
|
+
var dcRatio = _this.getCCPRValue() / (4 * (_this.prValue + 1));
|
|
3078
|
+
return Math.round(dcRatio * 100);
|
|
3079
|
+
});
|
|
3080
|
+
|
|
3081
|
+
_defineProperty(this, "getActualPulseWidth", function () {
|
|
3082
|
+
var pulseWidth = _this.getCCPRValue() * _this.prescaler;
|
|
3083
|
+
|
|
3084
|
+
if (_this.fosc > 0) {
|
|
3085
|
+
pulseWidth = pulseWidth / _this.fosc;
|
|
3086
|
+
} else {
|
|
3087
|
+
pulseWidth = 0;
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
return pulseWidth;
|
|
3091
|
+
});
|
|
3092
|
+
|
|
3093
|
+
this.prValue = prValue;
|
|
3094
|
+
this.prescaler = prescaler;
|
|
3095
|
+
this.fosc = fosc;
|
|
3096
|
+
this.dutyCycleRatio = dutyCycle / 100;
|
|
3097
|
+
};
|
|
3098
|
+
|
|
3099
|
+
/***/ }),
|
|
3100
|
+
|
|
3101
|
+
/***/ "./src/interfaces/pwm_general_parameters.tsx":
|
|
3102
|
+
/*!***************************************************!*\
|
|
3103
|
+
!*** ./src/interfaces/pwm_general_parameters.tsx ***!
|
|
3104
|
+
\***************************************************/
|
|
3105
|
+
/*! exports provided: Interface */
|
|
3106
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3107
|
+
|
|
3108
|
+
"use strict";
|
|
3109
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3110
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Interface", function() { return Interface; });
|
|
3111
|
+
/* harmony import */ var _microchip_scf_interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/scf-interface */ "./node_modules/@microchip/scf-interface/lib/index.js");
|
|
3112
|
+
/* harmony import */ var _microchip_scf_interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_interface__WEBPACK_IMPORTED_MODULE_0__);
|
|
3113
|
+
|
|
3114
|
+
/** The arguments to be provided to the implementation. */
|
|
3115
|
+
|
|
3116
|
+
var getInterfaceId = function getInterfaceId() {
|
|
3117
|
+
return {
|
|
3118
|
+
name: "pwm_general_parameters",
|
|
3119
|
+
version: "0.1.0"
|
|
3120
|
+
};
|
|
3121
|
+
};
|
|
3122
|
+
|
|
3123
|
+
var createPrototypeImport = function createPrototypeImport() {
|
|
3124
|
+
return {
|
|
3125
|
+
interfaceId: getInterfaceId()
|
|
3126
|
+
};
|
|
3127
|
+
};
|
|
3128
|
+
|
|
3129
|
+
var createPrototypeExport = function createPrototypeExport() {
|
|
3130
|
+
return {
|
|
3131
|
+
interfaces: [{
|
|
3132
|
+
interfaceId: getInterfaceId()
|
|
3133
|
+
}]
|
|
3134
|
+
};
|
|
3135
|
+
};
|
|
3136
|
+
|
|
3137
|
+
var createMock = function createMock() {
|
|
3138
|
+
return {
|
|
3139
|
+
interfaceId: getInterfaceId(),
|
|
3140
|
+
payload: {
|
|
3141
|
+
interfaceApi: Interface.createFirmwareApi("MyModule", [{
|
|
3142
|
+
name: "mymodule.h",
|
|
3143
|
+
path: "include/"
|
|
3144
|
+
}])
|
|
3145
|
+
},
|
|
3146
|
+
args: {
|
|
3147
|
+
requestId: {
|
|
3148
|
+
customName: "MyModule"
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
};
|
|
3152
|
+
};
|
|
3153
|
+
|
|
3154
|
+
var createFirmwareApi = function createFirmwareApi(moduleName, headerFiles) {
|
|
3155
|
+
var prefix = moduleName ? moduleName : "undefined";
|
|
3156
|
+
var api = createApi(prefix);
|
|
3157
|
+
return {
|
|
3158
|
+
api: api,
|
|
3159
|
+
simpleApi: _microchip_scf_interface__WEBPACK_IMPORTED_MODULE_0__["buildSimpleApi"](api),
|
|
3160
|
+
headerFiles: headerFiles
|
|
3161
|
+
};
|
|
3162
|
+
};
|
|
3163
|
+
|
|
3164
|
+
var createApi = function createApi(prefix) {
|
|
3165
|
+
return {
|
|
3166
|
+
Initialize: {
|
|
3167
|
+
name: prefix + "_Initialize",
|
|
3168
|
+
returns: "void"
|
|
3169
|
+
},
|
|
3170
|
+
LoadDutyValue: {
|
|
3171
|
+
name: prefix + "_LoadDutyValue",
|
|
3172
|
+
arguments: [{
|
|
3173
|
+
name: "dutyValue",
|
|
3174
|
+
type: "uint16_t"
|
|
3175
|
+
}],
|
|
3176
|
+
returns: "void"
|
|
3177
|
+
}
|
|
3178
|
+
};
|
|
3179
|
+
};
|
|
3180
|
+
|
|
3181
|
+
var Interface = {
|
|
3182
|
+
createPrototypeExport: createPrototypeExport,
|
|
3183
|
+
createPrototypeImport: createPrototypeImport,
|
|
3184
|
+
getInterfaceId: getInterfaceId,
|
|
3185
|
+
createMock: createMock,
|
|
3186
|
+
createFirmwareApi: createFirmwareApi
|
|
3187
|
+
};
|
|
3188
|
+
|
|
3189
|
+
/***/ }),
|
|
3190
|
+
|
|
3191
|
+
/***/ "./src/moduleConfig.json":
|
|
3192
|
+
/*!*******************************!*\
|
|
3193
|
+
!*** ./src/moduleConfig.json ***!
|
|
3194
|
+
\*******************************/
|
|
3195
|
+
/*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, analytics, templates, imports, exports, softwareData, peripherals, default */
|
|
3196
|
+
/***/ (function(module) {
|
|
3197
|
+
|
|
3198
|
+
module.exports = JSON.parse("{\"moduleName\":\"PWM\",\"deviceType\":\"PIC\",\"booleanValues\":{\"true\":\"enabled\",\"false\":\"disabled\"},\"UIGroups\":{\"software\":\"Software Settings\",\"hardware\":\"Hardware Settings\"},\"UIOrder\":{\"software\":[\"*\"],\"hardware\":[\"pwmenPwmcon\",\"timerSelection\",\"dutyCycle\",\"pwmdcValue\",\"pwmpolPwmcon\",\"pwmPeriod\",\"pwmFrequency\",\"pwmResolution\",\"*\"]},\"hasPins\":true,\"tabs\":{\"main\":\"Easy View\",\"register\":\"Register Initialization\"},\"analytics\":{\"logAlwaysComps\":[\"pwmenPwmcon\",\"pwmFrequency\",\"pwmResolution\"],\"logOnChangeComps\":[],\"compMapping\":{\"pwmenPwmcon\":\"PWM_Enable\",\"pwmFrequency\":\"PWM_Frequency\",\"pwmResolution\":\"PWM_Resolution\"}},\"templates\":[{\"src\":\"output/pwm-v2.c.ftl\",\"dest\":\"pwm/src/${sourceFileName}\",\"generateWithHardware\":true},{\"src\":\"output/pwm-v2.h.ftl\",\"dest\":\"pwm/${headerFileName}\",\"generateWithHardware\":true}],\"imports\":{\"initializer_system\":{\"nodeModule\":{\"importName\":\"systemInit\",\"node\":\"@microchip/initializer-system\"},\"import\":{\"interfaceId\":{\"name\":\"initializer-system\",\"version\":\"^0.5.3\"}}},\"scf_pic8_pwm_v2\":{\"import\":{\"interfaceId\":{\"name\":\"scf-pic8-pwm-v2\",\"version\":\"1.0.0\"},\"isRequired\":true}},\"osc_clocks\":{\"import\":{\"interfaceId\":{\"name\":\"osc-clocks\",\"version\":\"^0.2.0\"}}},\"Timer\":{\"import\":{\"interfaceId\":{\"name\":\"timer-2-4-6-general-parameters\",\"version\":\"^0.2.0\"}}},\"pin_standard\":{\"import\":{\"interfaceId\":{\"name\":\"pin-standard\",\"version\":\"^0.1.0\"}}},\"device_meta\":{\"import\":{\"interfaceId\":{\"name\":\"device-meta\",\"version\":\"^1\"}}}},\"exports\":{\"pwm_general\":{\"interfaces\":[{\"interfaceId\":{\"name\":\"pwm_general_parameters\",\"version\":\"0.1.0\"}}]}},\"softwareData\":{\"componentName\":{\"name\":\"componentName\",\"description\":\"Custom Name\",\"type\":\"string\",\"defaultValue\":\"PWM\",\"group\":\"software\",\"tabs\":[\"main\"],\"category\":\"software\"},\"timerSelection\":{\"name\":\"timerSelection\",\"description\":\"Select a Timer\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"defaultValue\":{\"value\":\"TMR2\",\"options\":[\"TMR2\",\"TMR4\",\"TMR6\"]},\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}},\"dutyCycle\":{\"name\":\"dutyCycle\",\"description\":\"Duty Cycle (%)\",\"type\":\"number\",\"defaultValue\":50,\"group\":\"hardware\",\"validation\":true,\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${instance}DC&redirect=true\"}},\"pwmdcValue\":{\"name\":\"pwmdcValue\",\"description\":\"PWMDC Value\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${instance}DC&redirect=true\"}},\"pwmPeriod\":{\"name\":\"pwmPeriod\",\"description\":\"PWM Period (s)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"},\"pwmFrequency\":{\"name\":\"pwmFrequency\",\"description\":\"PWM Frequency (Hz)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"},\"pwmResolution\":{\"name\":\"pwmResolution\",\"description\":\"PWM Resolution (bits)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"}},\"peripherals\":[{\"interfaceId\":{\"name\":\"scf-pic8-pwm-v2\",\"version\":\"1.0.0\"},\"registers\":{\"CCPTMRS1\":[{\"setting\":\"CTSEL\",\"name\":\"ctselCcptmrs1\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}],\"CCPTMRS\":[{\"setting\":\"CTSEL\",\"name\":\"ctselCcptmrs\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"PWMCON\":[{\"setting\":\"PWMPOL\",\"name\":\"pwmpolPwmcon\",\"description\":\"PWM Polarity\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"],\"category\":\"hardware\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}},{\"setting\":\"PWMOUT\",\"name\":\"pwmoutPwmcon\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"},{\"setting\":\"PWMEN\",\"name\":\"pwmenPwmcon\",\"description\":\"PWM Enable\",\"type\":\"boolean\",\"group\":\"hardware\",\"overrideDefaultValue\":\"enabled\",\"tabs\":[\"main\"],\"category\":\"hardware\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}}],\"PWMDCH\":[{\"setting\":\"PWMDCH\",\"name\":\"pwmdchPwmdch\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}],\"PWMDCL\":[{\"setting\":\"PWMDCL\",\"name\":\"pwmdclPwmdcl\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}]}}]}");
|
|
3199
|
+
|
|
3200
|
+
/***/ }),
|
|
3201
|
+
|
|
3202
|
+
/***/ "./src/pinsdata.json":
|
|
3203
|
+
/*!***************************!*\
|
|
3204
|
+
!*** ./src/pinsdata.json ***!
|
|
3205
|
+
\***************************/
|
|
3206
|
+
/*! exports provided: rows, default */
|
|
3207
|
+
/***/ (function(module) {
|
|
3208
|
+
|
|
3209
|
+
module.exports = JSON.parse("{\"rows\":[{\"name\":\"out\",\"module\":\"PWM6\",\"function\":\"PWM6(OUT|$)\",\"direction\":\"output\",\"filter\":{\"module\":\"PWM6\",\"aliasReEx\":\"^PWM6OUT$|PWM6$\"},\"behaviour\":\"PPS\"}]}");
|
|
3210
|
+
|
|
3211
|
+
/***/ })
|
|
3212
|
+
|
|
3213
|
+
/******/ });
|
|
3214
|
+
//# sourceMappingURL=autoCreator.js.map
|