@readme/markdown 6.40.0 β 6.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +1 -0
- package/dist/main.js +501 -632
- package/dist/main.node.js +137 -110
- package/package.json +38 -37
package/dist/main.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
var a = typeof exports === 'object' ? factory(require("@readme/variable"), require("react")) : factory(root["@readme/variable"], root["React"]);
|
|
8
8
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
9
9
|
}
|
|
10
|
-
})(self,
|
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__3689__, __WEBPACK_EXTERNAL_MODULE__4466__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -2020,6 +2020,8 @@ module.exports = ErrorReportingPreprocessorMixin;
|
|
|
2020
2020
|
"use strict";
|
|
2021
2021
|
|
|
2022
2022
|
|
|
2023
|
+
var _createClass = __webpack_require__(3913);
|
|
2024
|
+
|
|
2023
2025
|
var _classCallCheck = __webpack_require__(4575);
|
|
2024
2026
|
|
|
2025
2027
|
var _inherits = __webpack_require__(2205);
|
|
@@ -2054,7 +2056,7 @@ var ErrorReportingTokenizerMixin = /*#__PURE__*/function (_ErrorReportingMixinB)
|
|
|
2054
2056
|
return _this;
|
|
2055
2057
|
}
|
|
2056
2058
|
|
|
2057
|
-
return ErrorReportingTokenizerMixin;
|
|
2059
|
+
return _createClass(ErrorReportingTokenizerMixin);
|
|
2058
2060
|
}(ErrorReportingMixinBase);
|
|
2059
2061
|
|
|
2060
2062
|
module.exports = ErrorReportingTokenizerMixin;
|
|
@@ -10153,16 +10155,16 @@ module.exports = TableOfContents;
|
|
|
10153
10155
|
"use strict";
|
|
10154
10156
|
__webpack_require__.r(__webpack_exports__);
|
|
10155
10157
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10156
|
-
/* harmony export */ "GlossaryItem": () => (/* reexport default from dynamic */ _GlossaryItem__WEBPACK_IMPORTED_MODULE_0___default.a),
|
|
10157
|
-
/* harmony export */ "Code": () => (/* reexport default from dynamic */ _Code__WEBPACK_IMPORTED_MODULE_1___default.a),
|
|
10158
|
-
/* harmony export */ "Table": () => (/* reexport default from dynamic */ _Table__WEBPACK_IMPORTED_MODULE_2___default.a),
|
|
10159
10158
|
/* harmony export */ "Anchor": () => (/* reexport default from dynamic */ _Anchor__WEBPACK_IMPORTED_MODULE_3___default.a),
|
|
10160
|
-
/* harmony export */ "Heading": () => (/* reexport default from dynamic */ _Heading__WEBPACK_IMPORTED_MODULE_4___default.a),
|
|
10161
10159
|
/* harmony export */ "Callout": () => (/* reexport default from dynamic */ _Callout__WEBPACK_IMPORTED_MODULE_5___default.a),
|
|
10160
|
+
/* harmony export */ "Code": () => (/* reexport default from dynamic */ _Code__WEBPACK_IMPORTED_MODULE_1___default.a),
|
|
10162
10161
|
/* harmony export */ "CodeTabs": () => (/* reexport default from dynamic */ _CodeTabs__WEBPACK_IMPORTED_MODULE_6___default.a),
|
|
10163
|
-
/* harmony export */ "Image": () => (/* reexport default from dynamic */ _Image__WEBPACK_IMPORTED_MODULE_7___default.a),
|
|
10164
10162
|
/* harmony export */ "Embed": () => (/* reexport default from dynamic */ _Embed__WEBPACK_IMPORTED_MODULE_8___default.a),
|
|
10163
|
+
/* harmony export */ "GlossaryItem": () => (/* reexport default from dynamic */ _GlossaryItem__WEBPACK_IMPORTED_MODULE_0___default.a),
|
|
10165
10164
|
/* harmony export */ "HTMLBlock": () => (/* reexport default from dynamic */ _HTMLBlock__WEBPACK_IMPORTED_MODULE_9___default.a),
|
|
10165
|
+
/* harmony export */ "Heading": () => (/* reexport default from dynamic */ _Heading__WEBPACK_IMPORTED_MODULE_4___default.a),
|
|
10166
|
+
/* harmony export */ "Image": () => (/* reexport default from dynamic */ _Image__WEBPACK_IMPORTED_MODULE_7___default.a),
|
|
10167
|
+
/* harmony export */ "Table": () => (/* reexport default from dynamic */ _Table__WEBPACK_IMPORTED_MODULE_2___default.a),
|
|
10166
10168
|
/* harmony export */ "TableOfContents": () => (/* reexport default from dynamic */ _TableOfContents__WEBPACK_IMPORTED_MODULE_10___default.a)
|
|
10167
10169
|
/* harmony export */ });
|
|
10168
10170
|
/* harmony import */ var _GlossaryItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6566);
|
|
@@ -26282,6 +26284,7 @@ var _typeof = __webpack_require__(8);
|
|
|
26282
26284
|
e.isRequired = e;
|
|
26283
26285
|
var r = {
|
|
26284
26286
|
array: e,
|
|
26287
|
+
bigint: e,
|
|
26285
26288
|
bool: e,
|
|
26286
26289
|
func: e,
|
|
26287
26290
|
number: e,
|
|
@@ -27857,9 +27860,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27857
27860
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4942);
|
|
27858
27861
|
|
|
27859
27862
|
|
|
27860
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
27863
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27861
27864
|
|
|
27862
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
27865
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27863
27866
|
|
|
27864
27867
|
var options = {
|
|
27865
27868
|
compatibilityMode: false,
|
|
@@ -28006,9 +28009,9 @@ module.exports = function DivCompiler() {
|
|
|
28006
28009
|
|
|
28007
28010
|
var _defineProperty = __webpack_require__(9713);
|
|
28008
28011
|
|
|
28009
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
28012
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28010
28013
|
|
|
28011
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
28014
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28012
28015
|
|
|
28013
28016
|
function EmbedCompiler(node) {
|
|
28014
28017
|
var data = node.data.hProperties;
|
|
@@ -28049,9 +28052,9 @@ var _slicedToArray = __webpack_require__(3038);
|
|
|
28049
28052
|
|
|
28050
28053
|
var _defineProperty = __webpack_require__(9713);
|
|
28051
28054
|
|
|
28052
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
28055
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28053
28056
|
|
|
28054
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
28057
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28055
28058
|
|
|
28056
28059
|
var _require = __webpack_require__(7589),
|
|
28057
28060
|
imgSizeByWidth = _require.imgSizeByWidth;
|
|
@@ -28185,7 +28188,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28185
28188
|
/* harmony export */ "rdmePinCompiler": () => (/* reexport default from dynamic */ _pin__WEBPACK_IMPORTED_MODULE_11___default.a),
|
|
28186
28189
|
/* harmony export */ "rdmeVarCompiler": () => (/* reexport default from dynamic */ _var__WEBPACK_IMPORTED_MODULE_12___default.a),
|
|
28187
28190
|
/* harmony export */ "tableCompiler": () => (/* reexport default from dynamic */ _table__WEBPACK_IMPORTED_MODULE_13___default.a),
|
|
28188
|
-
/* harmony export */ "tableHeadCompiler": () => (/* reexport default from dynamic */ _table_head__WEBPACK_IMPORTED_MODULE_14___default.a)
|
|
28191
|
+
/* harmony export */ "tableHeadCompiler": () => (/* reexport default from dynamic */ _table_head__WEBPACK_IMPORTED_MODULE_14___default.a),
|
|
28192
|
+
/* harmony export */ "yamlCompiler": () => (/* reexport default from dynamic */ _yaml__WEBPACK_IMPORTED_MODULE_15___default.a)
|
|
28189
28193
|
/* harmony export */ });
|
|
28190
28194
|
/* harmony import */ var _break__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3688);
|
|
28191
28195
|
/* harmony import */ var _break__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_break__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -28217,6 +28221,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28217
28221
|
/* harmony import */ var _table__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_table__WEBPACK_IMPORTED_MODULE_13__);
|
|
28218
28222
|
/* harmony import */ var _table_head__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(186);
|
|
28219
28223
|
/* harmony import */ var _table_head__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_table_head__WEBPACK_IMPORTED_MODULE_14__);
|
|
28224
|
+
/* harmony import */ var _yaml__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(1773);
|
|
28225
|
+
/* harmony import */ var _yaml__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_yaml__WEBPACK_IMPORTED_MODULE_15__);
|
|
28226
|
+
|
|
28220
28227
|
|
|
28221
28228
|
|
|
28222
28229
|
|
|
@@ -28329,6 +28336,20 @@ module.exports = function RdmeVarCompiler() {
|
|
|
28329
28336
|
|
|
28330
28337
|
/***/ }),
|
|
28331
28338
|
|
|
28339
|
+
/***/ 1773:
|
|
28340
|
+
/***/ ((module) => {
|
|
28341
|
+
|
|
28342
|
+
module.exports = function YamlCompiler() {
|
|
28343
|
+
var Compiler = this.Compiler;
|
|
28344
|
+
var visitors = Compiler.prototype.visitors;
|
|
28345
|
+
|
|
28346
|
+
visitors.yaml = function compile(node) {
|
|
28347
|
+
return "---\n".concat(node.value, "\n---");
|
|
28348
|
+
};
|
|
28349
|
+
};
|
|
28350
|
+
|
|
28351
|
+
/***/ }),
|
|
28352
|
+
|
|
28332
28353
|
/***/ 8399:
|
|
28333
28354
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
28334
28355
|
|
|
@@ -28471,11 +28492,11 @@ var _setPrototypeOf = __webpack_require__(9489);
|
|
|
28471
28492
|
|
|
28472
28493
|
var _slicedToArray = __webpack_require__(3038);
|
|
28473
28494
|
|
|
28474
|
-
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re,
|
|
28495
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, void 0, groups); }; var _super = RegExp.prototype, _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype); } function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { return groups[name] = result[g[name]], groups; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); return result && (result.groups = buildGroups(result, this)), result; }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if ("string" == typeof substitution) { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } if ("function" == typeof substitution) { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; return "object" != _typeof(args[args.length - 1]) && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args); }); } return _super[Symbol.replace].call(this, str, substitution); }, _wrapRegExp.apply(this, arguments); }
|
|
28475
28496
|
|
|
28476
28497
|
function tokenizer(eat, value) {
|
|
28477
28498
|
// eslint-disable-next-line unicorn/no-unsafe-regex
|
|
28478
|
-
var TAB_BLOCK_RGXP = /^(?:(?:^|\n)```(?:(?!\n```)[\s\S])*\n```
|
|
28499
|
+
var TAB_BLOCK_RGXP = /^(?:(?:^|\n)```(?:(?!\n```)[\s\S])*\n```[^\S\n]*){2,}/g;
|
|
28479
28500
|
|
|
28480
28501
|
var _ref = TAB_BLOCK_RGXP.exec(value) || [],
|
|
28481
28502
|
_ref2 = _slicedToArray(_ref, 1),
|
|
@@ -28492,7 +28513,7 @@ function tokenizer(eat, value) {
|
|
|
28492
28513
|
*/
|
|
28493
28514
|
// eslint-disable-next-line unicorn/no-unsafe-regex
|
|
28494
28515
|
|
|
28495
|
-
var CODE_BLOCK_RGXP = /*#__PURE__*/_wrapRegExp(/(?:^|\n)```[\t
|
|
28516
|
+
var CODE_BLOCK_RGXP = /*#__PURE__*/_wrapRegExp(/(?:^|\n)```[ \t]*([^\s]+)?(?: *([^\n]+))?(((?!\n```)[\s\S])*)?\n```/g, {
|
|
28496
28517
|
lang: 1,
|
|
28497
28518
|
meta: 2,
|
|
28498
28519
|
code: 3
|
|
@@ -28801,9 +28822,9 @@ var _defineProperty = __webpack_require__(9713);
|
|
|
28801
28822
|
|
|
28802
28823
|
var _slicedToArray = __webpack_require__(3038);
|
|
28803
28824
|
|
|
28804
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
28825
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28805
28826
|
|
|
28806
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
28827
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28807
28828
|
|
|
28808
28829
|
/* eslint-disable consistent-return */
|
|
28809
28830
|
var RGXP = /^\[block:(.*)\]([^]+?)\[\/block\]/;
|
|
@@ -29286,9 +29307,9 @@ var _defineProperty = __webpack_require__(9713);
|
|
|
29286
29307
|
|
|
29287
29308
|
var _slicedToArray = __webpack_require__(3038);
|
|
29288
29309
|
|
|
29289
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
29310
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29290
29311
|
|
|
29291
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
29312
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29292
29313
|
|
|
29293
29314
|
var flatMap = __webpack_require__(5885);
|
|
29294
29315
|
|
|
@@ -36723,543 +36744,6 @@ function disallowed(code) {
|
|
|
36723
36744
|
}
|
|
36724
36745
|
|
|
36725
36746
|
|
|
36726
|
-
/***/ }),
|
|
36727
|
-
|
|
36728
|
-
/***/ 6470:
|
|
36729
|
-
/***/ ((module) => {
|
|
36730
|
-
|
|
36731
|
-
"use strict";
|
|
36732
|
-
// 'path' module extracted from Node.js v8.11.1 (only the posix part)
|
|
36733
|
-
// transplited with Babel
|
|
36734
|
-
|
|
36735
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
36736
|
-
//
|
|
36737
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
36738
|
-
// copy of this software and associated documentation files (the
|
|
36739
|
-
// "Software"), to deal in the Software without restriction, including
|
|
36740
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
36741
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
36742
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
36743
|
-
// following conditions:
|
|
36744
|
-
//
|
|
36745
|
-
// The above copyright notice and this permission notice shall be included
|
|
36746
|
-
// in all copies or substantial portions of the Software.
|
|
36747
|
-
//
|
|
36748
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
36749
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
36750
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
36751
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
36752
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
36753
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
36754
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
36755
|
-
|
|
36756
|
-
|
|
36757
|
-
|
|
36758
|
-
function assertPath(path) {
|
|
36759
|
-
if (typeof path !== 'string') {
|
|
36760
|
-
throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));
|
|
36761
|
-
}
|
|
36762
|
-
}
|
|
36763
|
-
|
|
36764
|
-
// Resolves . and .. elements in a path with directory names
|
|
36765
|
-
function normalizeStringPosix(path, allowAboveRoot) {
|
|
36766
|
-
var res = '';
|
|
36767
|
-
var lastSegmentLength = 0;
|
|
36768
|
-
var lastSlash = -1;
|
|
36769
|
-
var dots = 0;
|
|
36770
|
-
var code;
|
|
36771
|
-
for (var i = 0; i <= path.length; ++i) {
|
|
36772
|
-
if (i < path.length)
|
|
36773
|
-
code = path.charCodeAt(i);
|
|
36774
|
-
else if (code === 47 /*/*/)
|
|
36775
|
-
break;
|
|
36776
|
-
else
|
|
36777
|
-
code = 47 /*/*/;
|
|
36778
|
-
if (code === 47 /*/*/) {
|
|
36779
|
-
if (lastSlash === i - 1 || dots === 1) {
|
|
36780
|
-
// NOOP
|
|
36781
|
-
} else if (lastSlash !== i - 1 && dots === 2) {
|
|
36782
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {
|
|
36783
|
-
if (res.length > 2) {
|
|
36784
|
-
var lastSlashIndex = res.lastIndexOf('/');
|
|
36785
|
-
if (lastSlashIndex !== res.length - 1) {
|
|
36786
|
-
if (lastSlashIndex === -1) {
|
|
36787
|
-
res = '';
|
|
36788
|
-
lastSegmentLength = 0;
|
|
36789
|
-
} else {
|
|
36790
|
-
res = res.slice(0, lastSlashIndex);
|
|
36791
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf('/');
|
|
36792
|
-
}
|
|
36793
|
-
lastSlash = i;
|
|
36794
|
-
dots = 0;
|
|
36795
|
-
continue;
|
|
36796
|
-
}
|
|
36797
|
-
} else if (res.length === 2 || res.length === 1) {
|
|
36798
|
-
res = '';
|
|
36799
|
-
lastSegmentLength = 0;
|
|
36800
|
-
lastSlash = i;
|
|
36801
|
-
dots = 0;
|
|
36802
|
-
continue;
|
|
36803
|
-
}
|
|
36804
|
-
}
|
|
36805
|
-
if (allowAboveRoot) {
|
|
36806
|
-
if (res.length > 0)
|
|
36807
|
-
res += '/..';
|
|
36808
|
-
else
|
|
36809
|
-
res = '..';
|
|
36810
|
-
lastSegmentLength = 2;
|
|
36811
|
-
}
|
|
36812
|
-
} else {
|
|
36813
|
-
if (res.length > 0)
|
|
36814
|
-
res += '/' + path.slice(lastSlash + 1, i);
|
|
36815
|
-
else
|
|
36816
|
-
res = path.slice(lastSlash + 1, i);
|
|
36817
|
-
lastSegmentLength = i - lastSlash - 1;
|
|
36818
|
-
}
|
|
36819
|
-
lastSlash = i;
|
|
36820
|
-
dots = 0;
|
|
36821
|
-
} else if (code === 46 /*.*/ && dots !== -1) {
|
|
36822
|
-
++dots;
|
|
36823
|
-
} else {
|
|
36824
|
-
dots = -1;
|
|
36825
|
-
}
|
|
36826
|
-
}
|
|
36827
|
-
return res;
|
|
36828
|
-
}
|
|
36829
|
-
|
|
36830
|
-
function _format(sep, pathObject) {
|
|
36831
|
-
var dir = pathObject.dir || pathObject.root;
|
|
36832
|
-
var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');
|
|
36833
|
-
if (!dir) {
|
|
36834
|
-
return base;
|
|
36835
|
-
}
|
|
36836
|
-
if (dir === pathObject.root) {
|
|
36837
|
-
return dir + base;
|
|
36838
|
-
}
|
|
36839
|
-
return dir + sep + base;
|
|
36840
|
-
}
|
|
36841
|
-
|
|
36842
|
-
var posix = {
|
|
36843
|
-
// path.resolve([from ...], to)
|
|
36844
|
-
resolve: function resolve() {
|
|
36845
|
-
var resolvedPath = '';
|
|
36846
|
-
var resolvedAbsolute = false;
|
|
36847
|
-
var cwd;
|
|
36848
|
-
|
|
36849
|
-
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
36850
|
-
var path;
|
|
36851
|
-
if (i >= 0)
|
|
36852
|
-
path = arguments[i];
|
|
36853
|
-
else {
|
|
36854
|
-
if (cwd === undefined)
|
|
36855
|
-
cwd = process.cwd();
|
|
36856
|
-
path = cwd;
|
|
36857
|
-
}
|
|
36858
|
-
|
|
36859
|
-
assertPath(path);
|
|
36860
|
-
|
|
36861
|
-
// Skip empty entries
|
|
36862
|
-
if (path.length === 0) {
|
|
36863
|
-
continue;
|
|
36864
|
-
}
|
|
36865
|
-
|
|
36866
|
-
resolvedPath = path + '/' + resolvedPath;
|
|
36867
|
-
resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;
|
|
36868
|
-
}
|
|
36869
|
-
|
|
36870
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
36871
|
-
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
36872
|
-
|
|
36873
|
-
// Normalize the path
|
|
36874
|
-
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
|
36875
|
-
|
|
36876
|
-
if (resolvedAbsolute) {
|
|
36877
|
-
if (resolvedPath.length > 0)
|
|
36878
|
-
return '/' + resolvedPath;
|
|
36879
|
-
else
|
|
36880
|
-
return '/';
|
|
36881
|
-
} else if (resolvedPath.length > 0) {
|
|
36882
|
-
return resolvedPath;
|
|
36883
|
-
} else {
|
|
36884
|
-
return '.';
|
|
36885
|
-
}
|
|
36886
|
-
},
|
|
36887
|
-
|
|
36888
|
-
normalize: function normalize(path) {
|
|
36889
|
-
assertPath(path);
|
|
36890
|
-
|
|
36891
|
-
if (path.length === 0) return '.';
|
|
36892
|
-
|
|
36893
|
-
var isAbsolute = path.charCodeAt(0) === 47 /*/*/;
|
|
36894
|
-
var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;
|
|
36895
|
-
|
|
36896
|
-
// Normalize the path
|
|
36897
|
-
path = normalizeStringPosix(path, !isAbsolute);
|
|
36898
|
-
|
|
36899
|
-
if (path.length === 0 && !isAbsolute) path = '.';
|
|
36900
|
-
if (path.length > 0 && trailingSeparator) path += '/';
|
|
36901
|
-
|
|
36902
|
-
if (isAbsolute) return '/' + path;
|
|
36903
|
-
return path;
|
|
36904
|
-
},
|
|
36905
|
-
|
|
36906
|
-
isAbsolute: function isAbsolute(path) {
|
|
36907
|
-
assertPath(path);
|
|
36908
|
-
return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;
|
|
36909
|
-
},
|
|
36910
|
-
|
|
36911
|
-
join: function join() {
|
|
36912
|
-
if (arguments.length === 0)
|
|
36913
|
-
return '.';
|
|
36914
|
-
var joined;
|
|
36915
|
-
for (var i = 0; i < arguments.length; ++i) {
|
|
36916
|
-
var arg = arguments[i];
|
|
36917
|
-
assertPath(arg);
|
|
36918
|
-
if (arg.length > 0) {
|
|
36919
|
-
if (joined === undefined)
|
|
36920
|
-
joined = arg;
|
|
36921
|
-
else
|
|
36922
|
-
joined += '/' + arg;
|
|
36923
|
-
}
|
|
36924
|
-
}
|
|
36925
|
-
if (joined === undefined)
|
|
36926
|
-
return '.';
|
|
36927
|
-
return posix.normalize(joined);
|
|
36928
|
-
},
|
|
36929
|
-
|
|
36930
|
-
relative: function relative(from, to) {
|
|
36931
|
-
assertPath(from);
|
|
36932
|
-
assertPath(to);
|
|
36933
|
-
|
|
36934
|
-
if (from === to) return '';
|
|
36935
|
-
|
|
36936
|
-
from = posix.resolve(from);
|
|
36937
|
-
to = posix.resolve(to);
|
|
36938
|
-
|
|
36939
|
-
if (from === to) return '';
|
|
36940
|
-
|
|
36941
|
-
// Trim any leading backslashes
|
|
36942
|
-
var fromStart = 1;
|
|
36943
|
-
for (; fromStart < from.length; ++fromStart) {
|
|
36944
|
-
if (from.charCodeAt(fromStart) !== 47 /*/*/)
|
|
36945
|
-
break;
|
|
36946
|
-
}
|
|
36947
|
-
var fromEnd = from.length;
|
|
36948
|
-
var fromLen = fromEnd - fromStart;
|
|
36949
|
-
|
|
36950
|
-
// Trim any leading backslashes
|
|
36951
|
-
var toStart = 1;
|
|
36952
|
-
for (; toStart < to.length; ++toStart) {
|
|
36953
|
-
if (to.charCodeAt(toStart) !== 47 /*/*/)
|
|
36954
|
-
break;
|
|
36955
|
-
}
|
|
36956
|
-
var toEnd = to.length;
|
|
36957
|
-
var toLen = toEnd - toStart;
|
|
36958
|
-
|
|
36959
|
-
// Compare paths to find the longest common path from root
|
|
36960
|
-
var length = fromLen < toLen ? fromLen : toLen;
|
|
36961
|
-
var lastCommonSep = -1;
|
|
36962
|
-
var i = 0;
|
|
36963
|
-
for (; i <= length; ++i) {
|
|
36964
|
-
if (i === length) {
|
|
36965
|
-
if (toLen > length) {
|
|
36966
|
-
if (to.charCodeAt(toStart + i) === 47 /*/*/) {
|
|
36967
|
-
// We get here if `from` is the exact base path for `to`.
|
|
36968
|
-
// For example: from='/foo/bar'; to='/foo/bar/baz'
|
|
36969
|
-
return to.slice(toStart + i + 1);
|
|
36970
|
-
} else if (i === 0) {
|
|
36971
|
-
// We get here if `from` is the root
|
|
36972
|
-
// For example: from='/'; to='/foo'
|
|
36973
|
-
return to.slice(toStart + i);
|
|
36974
|
-
}
|
|
36975
|
-
} else if (fromLen > length) {
|
|
36976
|
-
if (from.charCodeAt(fromStart + i) === 47 /*/*/) {
|
|
36977
|
-
// We get here if `to` is the exact base path for `from`.
|
|
36978
|
-
// For example: from='/foo/bar/baz'; to='/foo/bar'
|
|
36979
|
-
lastCommonSep = i;
|
|
36980
|
-
} else if (i === 0) {
|
|
36981
|
-
// We get here if `to` is the root.
|
|
36982
|
-
// For example: from='/foo'; to='/'
|
|
36983
|
-
lastCommonSep = 0;
|
|
36984
|
-
}
|
|
36985
|
-
}
|
|
36986
|
-
break;
|
|
36987
|
-
}
|
|
36988
|
-
var fromCode = from.charCodeAt(fromStart + i);
|
|
36989
|
-
var toCode = to.charCodeAt(toStart + i);
|
|
36990
|
-
if (fromCode !== toCode)
|
|
36991
|
-
break;
|
|
36992
|
-
else if (fromCode === 47 /*/*/)
|
|
36993
|
-
lastCommonSep = i;
|
|
36994
|
-
}
|
|
36995
|
-
|
|
36996
|
-
var out = '';
|
|
36997
|
-
// Generate the relative path based on the path difference between `to`
|
|
36998
|
-
// and `from`
|
|
36999
|
-
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
|
37000
|
-
if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {
|
|
37001
|
-
if (out.length === 0)
|
|
37002
|
-
out += '..';
|
|
37003
|
-
else
|
|
37004
|
-
out += '/..';
|
|
37005
|
-
}
|
|
37006
|
-
}
|
|
37007
|
-
|
|
37008
|
-
// Lastly, append the rest of the destination (`to`) path that comes after
|
|
37009
|
-
// the common path parts
|
|
37010
|
-
if (out.length > 0)
|
|
37011
|
-
return out + to.slice(toStart + lastCommonSep);
|
|
37012
|
-
else {
|
|
37013
|
-
toStart += lastCommonSep;
|
|
37014
|
-
if (to.charCodeAt(toStart) === 47 /*/*/)
|
|
37015
|
-
++toStart;
|
|
37016
|
-
return to.slice(toStart);
|
|
37017
|
-
}
|
|
37018
|
-
},
|
|
37019
|
-
|
|
37020
|
-
_makeLong: function _makeLong(path) {
|
|
37021
|
-
return path;
|
|
37022
|
-
},
|
|
37023
|
-
|
|
37024
|
-
dirname: function dirname(path) {
|
|
37025
|
-
assertPath(path);
|
|
37026
|
-
if (path.length === 0) return '.';
|
|
37027
|
-
var code = path.charCodeAt(0);
|
|
37028
|
-
var hasRoot = code === 47 /*/*/;
|
|
37029
|
-
var end = -1;
|
|
37030
|
-
var matchedSlash = true;
|
|
37031
|
-
for (var i = path.length - 1; i >= 1; --i) {
|
|
37032
|
-
code = path.charCodeAt(i);
|
|
37033
|
-
if (code === 47 /*/*/) {
|
|
37034
|
-
if (!matchedSlash) {
|
|
37035
|
-
end = i;
|
|
37036
|
-
break;
|
|
37037
|
-
}
|
|
37038
|
-
} else {
|
|
37039
|
-
// We saw the first non-path separator
|
|
37040
|
-
matchedSlash = false;
|
|
37041
|
-
}
|
|
37042
|
-
}
|
|
37043
|
-
|
|
37044
|
-
if (end === -1) return hasRoot ? '/' : '.';
|
|
37045
|
-
if (hasRoot && end === 1) return '//';
|
|
37046
|
-
return path.slice(0, end);
|
|
37047
|
-
},
|
|
37048
|
-
|
|
37049
|
-
basename: function basename(path, ext) {
|
|
37050
|
-
if (ext !== undefined && typeof ext !== 'string') throw new TypeError('"ext" argument must be a string');
|
|
37051
|
-
assertPath(path);
|
|
37052
|
-
|
|
37053
|
-
var start = 0;
|
|
37054
|
-
var end = -1;
|
|
37055
|
-
var matchedSlash = true;
|
|
37056
|
-
var i;
|
|
37057
|
-
|
|
37058
|
-
if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
|
|
37059
|
-
if (ext.length === path.length && ext === path) return '';
|
|
37060
|
-
var extIdx = ext.length - 1;
|
|
37061
|
-
var firstNonSlashEnd = -1;
|
|
37062
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
37063
|
-
var code = path.charCodeAt(i);
|
|
37064
|
-
if (code === 47 /*/*/) {
|
|
37065
|
-
// If we reached a path separator that was not part of a set of path
|
|
37066
|
-
// separators at the end of the string, stop now
|
|
37067
|
-
if (!matchedSlash) {
|
|
37068
|
-
start = i + 1;
|
|
37069
|
-
break;
|
|
37070
|
-
}
|
|
37071
|
-
} else {
|
|
37072
|
-
if (firstNonSlashEnd === -1) {
|
|
37073
|
-
// We saw the first non-path separator, remember this index in case
|
|
37074
|
-
// we need it if the extension ends up not matching
|
|
37075
|
-
matchedSlash = false;
|
|
37076
|
-
firstNonSlashEnd = i + 1;
|
|
37077
|
-
}
|
|
37078
|
-
if (extIdx >= 0) {
|
|
37079
|
-
// Try to match the explicit extension
|
|
37080
|
-
if (code === ext.charCodeAt(extIdx)) {
|
|
37081
|
-
if (--extIdx === -1) {
|
|
37082
|
-
// We matched the extension, so mark this as the end of our path
|
|
37083
|
-
// component
|
|
37084
|
-
end = i;
|
|
37085
|
-
}
|
|
37086
|
-
} else {
|
|
37087
|
-
// Extension does not match, so our result is the entire path
|
|
37088
|
-
// component
|
|
37089
|
-
extIdx = -1;
|
|
37090
|
-
end = firstNonSlashEnd;
|
|
37091
|
-
}
|
|
37092
|
-
}
|
|
37093
|
-
}
|
|
37094
|
-
}
|
|
37095
|
-
|
|
37096
|
-
if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;
|
|
37097
|
-
return path.slice(start, end);
|
|
37098
|
-
} else {
|
|
37099
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
37100
|
-
if (path.charCodeAt(i) === 47 /*/*/) {
|
|
37101
|
-
// If we reached a path separator that was not part of a set of path
|
|
37102
|
-
// separators at the end of the string, stop now
|
|
37103
|
-
if (!matchedSlash) {
|
|
37104
|
-
start = i + 1;
|
|
37105
|
-
break;
|
|
37106
|
-
}
|
|
37107
|
-
} else if (end === -1) {
|
|
37108
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
37109
|
-
// path component
|
|
37110
|
-
matchedSlash = false;
|
|
37111
|
-
end = i + 1;
|
|
37112
|
-
}
|
|
37113
|
-
}
|
|
37114
|
-
|
|
37115
|
-
if (end === -1) return '';
|
|
37116
|
-
return path.slice(start, end);
|
|
37117
|
-
}
|
|
37118
|
-
},
|
|
37119
|
-
|
|
37120
|
-
extname: function extname(path) {
|
|
37121
|
-
assertPath(path);
|
|
37122
|
-
var startDot = -1;
|
|
37123
|
-
var startPart = 0;
|
|
37124
|
-
var end = -1;
|
|
37125
|
-
var matchedSlash = true;
|
|
37126
|
-
// Track the state of characters (if any) we see before our first dot and
|
|
37127
|
-
// after any path separator we find
|
|
37128
|
-
var preDotState = 0;
|
|
37129
|
-
for (var i = path.length - 1; i >= 0; --i) {
|
|
37130
|
-
var code = path.charCodeAt(i);
|
|
37131
|
-
if (code === 47 /*/*/) {
|
|
37132
|
-
// If we reached a path separator that was not part of a set of path
|
|
37133
|
-
// separators at the end of the string, stop now
|
|
37134
|
-
if (!matchedSlash) {
|
|
37135
|
-
startPart = i + 1;
|
|
37136
|
-
break;
|
|
37137
|
-
}
|
|
37138
|
-
continue;
|
|
37139
|
-
}
|
|
37140
|
-
if (end === -1) {
|
|
37141
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
37142
|
-
// extension
|
|
37143
|
-
matchedSlash = false;
|
|
37144
|
-
end = i + 1;
|
|
37145
|
-
}
|
|
37146
|
-
if (code === 46 /*.*/) {
|
|
37147
|
-
// If this is our first dot, mark it as the start of our extension
|
|
37148
|
-
if (startDot === -1)
|
|
37149
|
-
startDot = i;
|
|
37150
|
-
else if (preDotState !== 1)
|
|
37151
|
-
preDotState = 1;
|
|
37152
|
-
} else if (startDot !== -1) {
|
|
37153
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
|
37154
|
-
// have a good chance at having a non-empty extension
|
|
37155
|
-
preDotState = -1;
|
|
37156
|
-
}
|
|
37157
|
-
}
|
|
37158
|
-
|
|
37159
|
-
if (startDot === -1 || end === -1 ||
|
|
37160
|
-
// We saw a non-dot character immediately before the dot
|
|
37161
|
-
preDotState === 0 ||
|
|
37162
|
-
// The (right-most) trimmed path component is exactly '..'
|
|
37163
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
37164
|
-
return '';
|
|
37165
|
-
}
|
|
37166
|
-
return path.slice(startDot, end);
|
|
37167
|
-
},
|
|
37168
|
-
|
|
37169
|
-
format: function format(pathObject) {
|
|
37170
|
-
if (pathObject === null || typeof pathObject !== 'object') {
|
|
37171
|
-
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
|
|
37172
|
-
}
|
|
37173
|
-
return _format('/', pathObject);
|
|
37174
|
-
},
|
|
37175
|
-
|
|
37176
|
-
parse: function parse(path) {
|
|
37177
|
-
assertPath(path);
|
|
37178
|
-
|
|
37179
|
-
var ret = { root: '', dir: '', base: '', ext: '', name: '' };
|
|
37180
|
-
if (path.length === 0) return ret;
|
|
37181
|
-
var code = path.charCodeAt(0);
|
|
37182
|
-
var isAbsolute = code === 47 /*/*/;
|
|
37183
|
-
var start;
|
|
37184
|
-
if (isAbsolute) {
|
|
37185
|
-
ret.root = '/';
|
|
37186
|
-
start = 1;
|
|
37187
|
-
} else {
|
|
37188
|
-
start = 0;
|
|
37189
|
-
}
|
|
37190
|
-
var startDot = -1;
|
|
37191
|
-
var startPart = 0;
|
|
37192
|
-
var end = -1;
|
|
37193
|
-
var matchedSlash = true;
|
|
37194
|
-
var i = path.length - 1;
|
|
37195
|
-
|
|
37196
|
-
// Track the state of characters (if any) we see before our first dot and
|
|
37197
|
-
// after any path separator we find
|
|
37198
|
-
var preDotState = 0;
|
|
37199
|
-
|
|
37200
|
-
// Get non-dir info
|
|
37201
|
-
for (; i >= start; --i) {
|
|
37202
|
-
code = path.charCodeAt(i);
|
|
37203
|
-
if (code === 47 /*/*/) {
|
|
37204
|
-
// If we reached a path separator that was not part of a set of path
|
|
37205
|
-
// separators at the end of the string, stop now
|
|
37206
|
-
if (!matchedSlash) {
|
|
37207
|
-
startPart = i + 1;
|
|
37208
|
-
break;
|
|
37209
|
-
}
|
|
37210
|
-
continue;
|
|
37211
|
-
}
|
|
37212
|
-
if (end === -1) {
|
|
37213
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
37214
|
-
// extension
|
|
37215
|
-
matchedSlash = false;
|
|
37216
|
-
end = i + 1;
|
|
37217
|
-
}
|
|
37218
|
-
if (code === 46 /*.*/) {
|
|
37219
|
-
// If this is our first dot, mark it as the start of our extension
|
|
37220
|
-
if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;
|
|
37221
|
-
} else if (startDot !== -1) {
|
|
37222
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
|
37223
|
-
// have a good chance at having a non-empty extension
|
|
37224
|
-
preDotState = -1;
|
|
37225
|
-
}
|
|
37226
|
-
}
|
|
37227
|
-
|
|
37228
|
-
if (startDot === -1 || end === -1 ||
|
|
37229
|
-
// We saw a non-dot character immediately before the dot
|
|
37230
|
-
preDotState === 0 ||
|
|
37231
|
-
// The (right-most) trimmed path component is exactly '..'
|
|
37232
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
37233
|
-
if (end !== -1) {
|
|
37234
|
-
if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);
|
|
37235
|
-
}
|
|
37236
|
-
} else {
|
|
37237
|
-
if (startPart === 0 && isAbsolute) {
|
|
37238
|
-
ret.name = path.slice(1, startDot);
|
|
37239
|
-
ret.base = path.slice(1, end);
|
|
37240
|
-
} else {
|
|
37241
|
-
ret.name = path.slice(startPart, startDot);
|
|
37242
|
-
ret.base = path.slice(startPart, end);
|
|
37243
|
-
}
|
|
37244
|
-
ret.ext = path.slice(startDot, end);
|
|
37245
|
-
}
|
|
37246
|
-
|
|
37247
|
-
if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';
|
|
37248
|
-
|
|
37249
|
-
return ret;
|
|
37250
|
-
},
|
|
37251
|
-
|
|
37252
|
-
sep: '/',
|
|
37253
|
-
delimiter: ':',
|
|
37254
|
-
win32: null,
|
|
37255
|
-
posix: null
|
|
37256
|
-
};
|
|
37257
|
-
|
|
37258
|
-
posix.posix = posix;
|
|
37259
|
-
|
|
37260
|
-
module.exports = posix;
|
|
37261
|
-
|
|
37262
|
-
|
|
37263
36747
|
/***/ }),
|
|
37264
36748
|
|
|
37265
36749
|
/***/ 2703:
|
|
@@ -47550,32 +47034,6 @@ function repeat(str, num) {
|
|
|
47550
47034
|
}
|
|
47551
47035
|
|
|
47552
47036
|
|
|
47553
|
-
/***/ }),
|
|
47554
|
-
|
|
47555
|
-
/***/ 8245:
|
|
47556
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
47557
|
-
|
|
47558
|
-
"use strict";
|
|
47559
|
-
|
|
47560
|
-
|
|
47561
|
-
var path = __webpack_require__(6470);
|
|
47562
|
-
|
|
47563
|
-
function replaceExt(npath, ext) {
|
|
47564
|
-
if (typeof npath !== 'string') {
|
|
47565
|
-
return npath;
|
|
47566
|
-
}
|
|
47567
|
-
|
|
47568
|
-
if (npath.length === 0) {
|
|
47569
|
-
return npath;
|
|
47570
|
-
}
|
|
47571
|
-
|
|
47572
|
-
var nFileName = path.basename(npath, path.extname(npath)) + ext;
|
|
47573
|
-
return path.join(path.dirname(npath), nFileName);
|
|
47574
|
-
}
|
|
47575
|
-
|
|
47576
|
-
module.exports = replaceExt;
|
|
47577
|
-
|
|
47578
|
-
|
|
47579
47037
|
/***/ }),
|
|
47580
47038
|
|
|
47581
47039
|
/***/ 6582:
|
|
@@ -49690,48 +49148,66 @@ function parseOrigin(origin) {
|
|
|
49690
49148
|
|
|
49691
49149
|
/***/ }),
|
|
49692
49150
|
|
|
49693
|
-
/***/
|
|
49151
|
+
/***/ 939:
|
|
49152
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
49153
|
+
|
|
49154
|
+
"use strict";
|
|
49155
|
+
|
|
49156
|
+
|
|
49157
|
+
module.exports = __webpack_require__(5905)
|
|
49158
|
+
|
|
49159
|
+
|
|
49160
|
+
/***/ }),
|
|
49161
|
+
|
|
49162
|
+
/***/ 5442:
|
|
49694
49163
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
49695
49164
|
|
|
49696
49165
|
"use strict";
|
|
49697
49166
|
|
|
49698
49167
|
|
|
49699
|
-
var
|
|
49700
|
-
var
|
|
49168
|
+
var p = __webpack_require__(8064)
|
|
49169
|
+
var proc = __webpack_require__(4228)
|
|
49701
49170
|
var buffer = __webpack_require__(8738)
|
|
49702
49171
|
|
|
49703
49172
|
module.exports = VFile
|
|
49704
49173
|
|
|
49705
49174
|
var own = {}.hasOwnProperty
|
|
49706
|
-
var proto = VFile.prototype
|
|
49707
49175
|
|
|
49708
49176
|
// Order of setting (least specific to most), we need this because otherwise
|
|
49709
49177
|
// `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a
|
|
49710
49178
|
// stem can be set.
|
|
49711
49179
|
var order = ['history', 'path', 'basename', 'stem', 'extname', 'dirname']
|
|
49712
49180
|
|
|
49713
|
-
|
|
49181
|
+
VFile.prototype.toString = toString
|
|
49714
49182
|
|
|
49715
49183
|
// Access full path (`~/index.min.js`).
|
|
49716
|
-
Object.defineProperty(
|
|
49184
|
+
Object.defineProperty(VFile.prototype, 'path', {get: getPath, set: setPath})
|
|
49717
49185
|
|
|
49718
49186
|
// Access parent path (`~`).
|
|
49719
|
-
Object.defineProperty(
|
|
49187
|
+
Object.defineProperty(VFile.prototype, 'dirname', {
|
|
49188
|
+
get: getDirname,
|
|
49189
|
+
set: setDirname
|
|
49190
|
+
})
|
|
49720
49191
|
|
|
49721
49192
|
// Access basename (`index.min.js`).
|
|
49722
|
-
Object.defineProperty(
|
|
49193
|
+
Object.defineProperty(VFile.prototype, 'basename', {
|
|
49194
|
+
get: getBasename,
|
|
49195
|
+
set: setBasename
|
|
49196
|
+
})
|
|
49723
49197
|
|
|
49724
49198
|
// Access extname (`.js`).
|
|
49725
|
-
Object.defineProperty(
|
|
49199
|
+
Object.defineProperty(VFile.prototype, 'extname', {
|
|
49200
|
+
get: getExtname,
|
|
49201
|
+
set: setExtname
|
|
49202
|
+
})
|
|
49726
49203
|
|
|
49727
49204
|
// Access stem (`index.min`).
|
|
49728
|
-
Object.defineProperty(
|
|
49205
|
+
Object.defineProperty(VFile.prototype, 'stem', {get: getStem, set: setStem})
|
|
49729
49206
|
|
|
49730
49207
|
// Construct a new file.
|
|
49731
49208
|
function VFile(options) {
|
|
49732
49209
|
var prop
|
|
49733
49210
|
var index
|
|
49734
|
-
var length
|
|
49735
49211
|
|
|
49736
49212
|
if (!options) {
|
|
49737
49213
|
options = {}
|
|
@@ -49748,13 +49224,12 @@ function VFile(options) {
|
|
|
49748
49224
|
this.data = {}
|
|
49749
49225
|
this.messages = []
|
|
49750
49226
|
this.history = []
|
|
49751
|
-
this.cwd =
|
|
49227
|
+
this.cwd = proc.cwd()
|
|
49752
49228
|
|
|
49753
49229
|
// Set path related properties in the correct order.
|
|
49754
49230
|
index = -1
|
|
49755
|
-
length = order.length
|
|
49756
49231
|
|
|
49757
|
-
while (++index < length) {
|
|
49232
|
+
while (++index < order.length) {
|
|
49758
49233
|
prop = order[index]
|
|
49759
49234
|
|
|
49760
49235
|
if (own.call(options, prop)) {
|
|
@@ -49764,7 +49239,7 @@ function VFile(options) {
|
|
|
49764
49239
|
|
|
49765
49240
|
// Set non-path related properties.
|
|
49766
49241
|
for (prop in options) {
|
|
49767
|
-
if (order.indexOf(prop)
|
|
49242
|
+
if (order.indexOf(prop) < 0) {
|
|
49768
49243
|
this[prop] = options[prop]
|
|
49769
49244
|
}
|
|
49770
49245
|
}
|
|
@@ -49777,76 +49252,73 @@ function getPath() {
|
|
|
49777
49252
|
function setPath(path) {
|
|
49778
49253
|
assertNonEmpty(path, 'path')
|
|
49779
49254
|
|
|
49780
|
-
if (path !==
|
|
49255
|
+
if (this.path !== path) {
|
|
49781
49256
|
this.history.push(path)
|
|
49782
49257
|
}
|
|
49783
49258
|
}
|
|
49784
49259
|
|
|
49785
49260
|
function getDirname() {
|
|
49786
|
-
return typeof this.path === 'string' ?
|
|
49261
|
+
return typeof this.path === 'string' ? p.dirname(this.path) : undefined
|
|
49787
49262
|
}
|
|
49788
49263
|
|
|
49789
49264
|
function setDirname(dirname) {
|
|
49790
49265
|
assertPath(this.path, 'dirname')
|
|
49791
|
-
this.path =
|
|
49266
|
+
this.path = p.join(dirname || '', this.basename)
|
|
49792
49267
|
}
|
|
49793
49268
|
|
|
49794
49269
|
function getBasename() {
|
|
49795
|
-
return typeof this.path === 'string' ?
|
|
49270
|
+
return typeof this.path === 'string' ? p.basename(this.path) : undefined
|
|
49796
49271
|
}
|
|
49797
49272
|
|
|
49798
49273
|
function setBasename(basename) {
|
|
49799
49274
|
assertNonEmpty(basename, 'basename')
|
|
49800
49275
|
assertPart(basename, 'basename')
|
|
49801
|
-
this.path =
|
|
49276
|
+
this.path = p.join(this.dirname || '', basename)
|
|
49802
49277
|
}
|
|
49803
49278
|
|
|
49804
49279
|
function getExtname() {
|
|
49805
|
-
return typeof this.path === 'string' ?
|
|
49280
|
+
return typeof this.path === 'string' ? p.extname(this.path) : undefined
|
|
49806
49281
|
}
|
|
49807
49282
|
|
|
49808
49283
|
function setExtname(extname) {
|
|
49809
|
-
|
|
49810
|
-
|
|
49811
|
-
assertPart(ext, 'extname')
|
|
49284
|
+
assertPart(extname, 'extname')
|
|
49812
49285
|
assertPath(this.path, 'extname')
|
|
49813
49286
|
|
|
49814
|
-
if (
|
|
49815
|
-
if (
|
|
49287
|
+
if (extname) {
|
|
49288
|
+
if (extname.charCodeAt(0) !== 46 /* `.` */) {
|
|
49816
49289
|
throw new Error('`extname` must start with `.`')
|
|
49817
49290
|
}
|
|
49818
49291
|
|
|
49819
|
-
if (
|
|
49292
|
+
if (extname.indexOf('.', 1) > -1) {
|
|
49820
49293
|
throw new Error('`extname` cannot contain multiple dots')
|
|
49821
49294
|
}
|
|
49822
49295
|
}
|
|
49823
49296
|
|
|
49824
|
-
this.path =
|
|
49297
|
+
this.path = p.join(this.dirname, this.stem + (extname || ''))
|
|
49825
49298
|
}
|
|
49826
49299
|
|
|
49827
49300
|
function getStem() {
|
|
49828
49301
|
return typeof this.path === 'string'
|
|
49829
|
-
?
|
|
49302
|
+
? p.basename(this.path, this.extname)
|
|
49830
49303
|
: undefined
|
|
49831
49304
|
}
|
|
49832
49305
|
|
|
49833
49306
|
function setStem(stem) {
|
|
49834
49307
|
assertNonEmpty(stem, 'stem')
|
|
49835
49308
|
assertPart(stem, 'stem')
|
|
49836
|
-
this.path =
|
|
49309
|
+
this.path = p.join(this.dirname || '', stem + (this.extname || ''))
|
|
49837
49310
|
}
|
|
49838
49311
|
|
|
49839
49312
|
// Get the value of the file.
|
|
49840
49313
|
function toString(encoding) {
|
|
49841
|
-
|
|
49842
|
-
return buffer(value) ? value.toString(encoding) : String(value)
|
|
49314
|
+
return (this.contents || '').toString(encoding)
|
|
49843
49315
|
}
|
|
49844
49316
|
|
|
49845
|
-
// Assert that `part` is not a path (i.e., does not contain `
|
|
49317
|
+
// Assert that `part` is not a path (i.e., does not contain `p.sep`).
|
|
49846
49318
|
function assertPart(part, name) {
|
|
49847
|
-
if (part.indexOf(
|
|
49319
|
+
if (part && part.indexOf(p.sep) > -1) {
|
|
49848
49320
|
throw new Error(
|
|
49849
|
-
'`' + name + '` cannot be a path: did not expect `' +
|
|
49321
|
+
'`' + name + '` cannot be a path: did not expect `' + p.sep + '`'
|
|
49850
49322
|
)
|
|
49851
49323
|
}
|
|
49852
49324
|
}
|
|
@@ -49868,32 +49340,29 @@ function assertPath(path, name) {
|
|
|
49868
49340
|
|
|
49869
49341
|
/***/ }),
|
|
49870
49342
|
|
|
49871
|
-
/***/
|
|
49343
|
+
/***/ 5905:
|
|
49872
49344
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
49873
49345
|
|
|
49874
49346
|
"use strict";
|
|
49875
49347
|
|
|
49876
49348
|
|
|
49877
49349
|
var VMessage = __webpack_require__(734)
|
|
49878
|
-
var VFile = __webpack_require__(
|
|
49350
|
+
var VFile = __webpack_require__(5442)
|
|
49879
49351
|
|
|
49880
49352
|
module.exports = VFile
|
|
49881
49353
|
|
|
49882
|
-
|
|
49883
|
-
|
|
49884
|
-
|
|
49885
|
-
proto.info = info
|
|
49886
|
-
proto.fail = fail
|
|
49354
|
+
VFile.prototype.message = message
|
|
49355
|
+
VFile.prototype.info = info
|
|
49356
|
+
VFile.prototype.fail = fail
|
|
49887
49357
|
|
|
49888
49358
|
// Create a message with `reason` at `position`.
|
|
49889
49359
|
// When an error is passed in as `reason`, copies the stack.
|
|
49890
49360
|
function message(reason, position, origin) {
|
|
49891
|
-
var filePath = this.path
|
|
49892
49361
|
var message = new VMessage(reason, position, origin)
|
|
49893
49362
|
|
|
49894
|
-
if (
|
|
49895
|
-
message.name =
|
|
49896
|
-
message.file =
|
|
49363
|
+
if (this.path) {
|
|
49364
|
+
message.name = this.path + ':' + message.name
|
|
49365
|
+
message.file = this.path
|
|
49897
49366
|
}
|
|
49898
49367
|
|
|
49899
49368
|
message.fatal = false
|
|
@@ -49923,6 +49392,406 @@ function info() {
|
|
|
49923
49392
|
}
|
|
49924
49393
|
|
|
49925
49394
|
|
|
49395
|
+
/***/ }),
|
|
49396
|
+
|
|
49397
|
+
/***/ 8064:
|
|
49398
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
49399
|
+
|
|
49400
|
+
"use strict";
|
|
49401
|
+
|
|
49402
|
+
|
|
49403
|
+
// A derivative work based on:
|
|
49404
|
+
// <https://github.com/browserify/path-browserify>.
|
|
49405
|
+
// Which is licensed:
|
|
49406
|
+
//
|
|
49407
|
+
// MIT License
|
|
49408
|
+
//
|
|
49409
|
+
// Copyright (c) 2013 James Halliday
|
|
49410
|
+
//
|
|
49411
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
49412
|
+
// this software and associated documentation files (the "Software"), to deal in
|
|
49413
|
+
// the Software without restriction, including without limitation the rights to
|
|
49414
|
+
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
49415
|
+
// the Software, and to permit persons to whom the Software is furnished to do so,
|
|
49416
|
+
// subject to the following conditions:
|
|
49417
|
+
//
|
|
49418
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
49419
|
+
// copies or substantial portions of the Software.
|
|
49420
|
+
//
|
|
49421
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
49422
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
49423
|
+
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
49424
|
+
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
49425
|
+
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
49426
|
+
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
49427
|
+
// A derivative work based on:
|
|
49428
|
+
//
|
|
49429
|
+
// Parts of that are extracted from Nodeβs internal `path` module:
|
|
49430
|
+
// <https://github.com/nodejs/node/blob/master/lib/path.js>.
|
|
49431
|
+
// Which is licensed:
|
|
49432
|
+
//
|
|
49433
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
49434
|
+
//
|
|
49435
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
49436
|
+
// copy of this software and associated documentation files (the
|
|
49437
|
+
// "Software"), to deal in the Software without restriction, including
|
|
49438
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
49439
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
49440
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
49441
|
+
// following conditions:
|
|
49442
|
+
//
|
|
49443
|
+
// The above copyright notice and this permission notice shall be included
|
|
49444
|
+
// in all copies or substantial portions of the Software.
|
|
49445
|
+
//
|
|
49446
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
49447
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
49448
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
49449
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
49450
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
49451
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
49452
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
49453
|
+
|
|
49454
|
+
exports.basename = basename
|
|
49455
|
+
exports.dirname = dirname
|
|
49456
|
+
exports.extname = extname
|
|
49457
|
+
exports.join = join
|
|
49458
|
+
exports.sep = '/'
|
|
49459
|
+
|
|
49460
|
+
function basename(path, ext) {
|
|
49461
|
+
var start = 0
|
|
49462
|
+
var end = -1
|
|
49463
|
+
var index
|
|
49464
|
+
var firstNonSlashEnd
|
|
49465
|
+
var seenNonSlash
|
|
49466
|
+
var extIndex
|
|
49467
|
+
|
|
49468
|
+
if (ext !== undefined && typeof ext !== 'string') {
|
|
49469
|
+
throw new TypeError('"ext" argument must be a string')
|
|
49470
|
+
}
|
|
49471
|
+
|
|
49472
|
+
assertPath(path)
|
|
49473
|
+
index = path.length
|
|
49474
|
+
|
|
49475
|
+
if (ext === undefined || !ext.length || ext.length > path.length) {
|
|
49476
|
+
while (index--) {
|
|
49477
|
+
if (path.charCodeAt(index) === 47 /* `/` */) {
|
|
49478
|
+
// If we reached a path separator that was not part of a set of path
|
|
49479
|
+
// separators at the end of the string, stop now.
|
|
49480
|
+
if (seenNonSlash) {
|
|
49481
|
+
start = index + 1
|
|
49482
|
+
break
|
|
49483
|
+
}
|
|
49484
|
+
} else if (end < 0) {
|
|
49485
|
+
// We saw the first non-path separator, mark this as the end of our
|
|
49486
|
+
// path component.
|
|
49487
|
+
seenNonSlash = true
|
|
49488
|
+
end = index + 1
|
|
49489
|
+
}
|
|
49490
|
+
}
|
|
49491
|
+
|
|
49492
|
+
return end < 0 ? '' : path.slice(start, end)
|
|
49493
|
+
}
|
|
49494
|
+
|
|
49495
|
+
if (ext === path) {
|
|
49496
|
+
return ''
|
|
49497
|
+
}
|
|
49498
|
+
|
|
49499
|
+
firstNonSlashEnd = -1
|
|
49500
|
+
extIndex = ext.length - 1
|
|
49501
|
+
|
|
49502
|
+
while (index--) {
|
|
49503
|
+
if (path.charCodeAt(index) === 47 /* `/` */) {
|
|
49504
|
+
// If we reached a path separator that was not part of a set of path
|
|
49505
|
+
// separators at the end of the string, stop now.
|
|
49506
|
+
if (seenNonSlash) {
|
|
49507
|
+
start = index + 1
|
|
49508
|
+
break
|
|
49509
|
+
}
|
|
49510
|
+
} else {
|
|
49511
|
+
if (firstNonSlashEnd < 0) {
|
|
49512
|
+
// We saw the first non-path separator, remember this index in case
|
|
49513
|
+
// we need it if the extension ends up not matching.
|
|
49514
|
+
seenNonSlash = true
|
|
49515
|
+
firstNonSlashEnd = index + 1
|
|
49516
|
+
}
|
|
49517
|
+
|
|
49518
|
+
if (extIndex > -1) {
|
|
49519
|
+
// Try to match the explicit extension.
|
|
49520
|
+
if (path.charCodeAt(index) === ext.charCodeAt(extIndex--)) {
|
|
49521
|
+
if (extIndex < 0) {
|
|
49522
|
+
// We matched the extension, so mark this as the end of our path
|
|
49523
|
+
// component
|
|
49524
|
+
end = index
|
|
49525
|
+
}
|
|
49526
|
+
} else {
|
|
49527
|
+
// Extension does not match, so our result is the entire path
|
|
49528
|
+
// component
|
|
49529
|
+
extIndex = -1
|
|
49530
|
+
end = firstNonSlashEnd
|
|
49531
|
+
}
|
|
49532
|
+
}
|
|
49533
|
+
}
|
|
49534
|
+
}
|
|
49535
|
+
|
|
49536
|
+
if (start === end) {
|
|
49537
|
+
end = firstNonSlashEnd
|
|
49538
|
+
} else if (end < 0) {
|
|
49539
|
+
end = path.length
|
|
49540
|
+
}
|
|
49541
|
+
|
|
49542
|
+
return path.slice(start, end)
|
|
49543
|
+
}
|
|
49544
|
+
|
|
49545
|
+
function dirname(path) {
|
|
49546
|
+
var end
|
|
49547
|
+
var unmatchedSlash
|
|
49548
|
+
var index
|
|
49549
|
+
|
|
49550
|
+
assertPath(path)
|
|
49551
|
+
|
|
49552
|
+
if (!path.length) {
|
|
49553
|
+
return '.'
|
|
49554
|
+
}
|
|
49555
|
+
|
|
49556
|
+
end = -1
|
|
49557
|
+
index = path.length
|
|
49558
|
+
|
|
49559
|
+
// Prefix `--` is important to not run on `0`.
|
|
49560
|
+
while (--index) {
|
|
49561
|
+
if (path.charCodeAt(index) === 47 /* `/` */) {
|
|
49562
|
+
if (unmatchedSlash) {
|
|
49563
|
+
end = index
|
|
49564
|
+
break
|
|
49565
|
+
}
|
|
49566
|
+
} else if (!unmatchedSlash) {
|
|
49567
|
+
// We saw the first non-path separator
|
|
49568
|
+
unmatchedSlash = true
|
|
49569
|
+
}
|
|
49570
|
+
}
|
|
49571
|
+
|
|
49572
|
+
return end < 0
|
|
49573
|
+
? path.charCodeAt(0) === 47 /* `/` */
|
|
49574
|
+
? '/'
|
|
49575
|
+
: '.'
|
|
49576
|
+
: end === 1 && path.charCodeAt(0) === 47 /* `/` */
|
|
49577
|
+
? '//'
|
|
49578
|
+
: path.slice(0, end)
|
|
49579
|
+
}
|
|
49580
|
+
|
|
49581
|
+
function extname(path) {
|
|
49582
|
+
var startDot = -1
|
|
49583
|
+
var startPart = 0
|
|
49584
|
+
var end = -1
|
|
49585
|
+
// Track the state of characters (if any) we see before our first dot and
|
|
49586
|
+
// after any path separator we find.
|
|
49587
|
+
var preDotState = 0
|
|
49588
|
+
var unmatchedSlash
|
|
49589
|
+
var code
|
|
49590
|
+
var index
|
|
49591
|
+
|
|
49592
|
+
assertPath(path)
|
|
49593
|
+
|
|
49594
|
+
index = path.length
|
|
49595
|
+
|
|
49596
|
+
while (index--) {
|
|
49597
|
+
code = path.charCodeAt(index)
|
|
49598
|
+
|
|
49599
|
+
if (code === 47 /* `/` */) {
|
|
49600
|
+
// If we reached a path separator that was not part of a set of path
|
|
49601
|
+
// separators at the end of the string, stop now.
|
|
49602
|
+
if (unmatchedSlash) {
|
|
49603
|
+
startPart = index + 1
|
|
49604
|
+
break
|
|
49605
|
+
}
|
|
49606
|
+
|
|
49607
|
+
continue
|
|
49608
|
+
}
|
|
49609
|
+
|
|
49610
|
+
if (end < 0) {
|
|
49611
|
+
// We saw the first non-path separator, mark this as the end of our
|
|
49612
|
+
// extension.
|
|
49613
|
+
unmatchedSlash = true
|
|
49614
|
+
end = index + 1
|
|
49615
|
+
}
|
|
49616
|
+
|
|
49617
|
+
if (code === 46 /* `.` */) {
|
|
49618
|
+
// If this is our first dot, mark it as the start of our extension.
|
|
49619
|
+
if (startDot < 0) {
|
|
49620
|
+
startDot = index
|
|
49621
|
+
} else if (preDotState !== 1) {
|
|
49622
|
+
preDotState = 1
|
|
49623
|
+
}
|
|
49624
|
+
} else if (startDot > -1) {
|
|
49625
|
+
// We saw a non-dot and non-path separator before our dot, so we should
|
|
49626
|
+
// have a good chance at having a non-empty extension.
|
|
49627
|
+
preDotState = -1
|
|
49628
|
+
}
|
|
49629
|
+
}
|
|
49630
|
+
|
|
49631
|
+
if (
|
|
49632
|
+
startDot < 0 ||
|
|
49633
|
+
end < 0 ||
|
|
49634
|
+
// We saw a non-dot character immediately before the dot.
|
|
49635
|
+
preDotState === 0 ||
|
|
49636
|
+
// The (right-most) trimmed path component is exactly `..`.
|
|
49637
|
+
(preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)
|
|
49638
|
+
) {
|
|
49639
|
+
return ''
|
|
49640
|
+
}
|
|
49641
|
+
|
|
49642
|
+
return path.slice(startDot, end)
|
|
49643
|
+
}
|
|
49644
|
+
|
|
49645
|
+
function join() {
|
|
49646
|
+
var index = -1
|
|
49647
|
+
var joined
|
|
49648
|
+
|
|
49649
|
+
while (++index < arguments.length) {
|
|
49650
|
+
assertPath(arguments[index])
|
|
49651
|
+
|
|
49652
|
+
if (arguments[index]) {
|
|
49653
|
+
joined =
|
|
49654
|
+
joined === undefined
|
|
49655
|
+
? arguments[index]
|
|
49656
|
+
: joined + '/' + arguments[index]
|
|
49657
|
+
}
|
|
49658
|
+
}
|
|
49659
|
+
|
|
49660
|
+
return joined === undefined ? '.' : normalize(joined)
|
|
49661
|
+
}
|
|
49662
|
+
|
|
49663
|
+
// Note: `normalize` is not exposed as `path.normalize`, so some code is
|
|
49664
|
+
// manually removed from it.
|
|
49665
|
+
function normalize(path) {
|
|
49666
|
+
var absolute
|
|
49667
|
+
var value
|
|
49668
|
+
|
|
49669
|
+
assertPath(path)
|
|
49670
|
+
|
|
49671
|
+
absolute = path.charCodeAt(0) === 47 /* `/` */
|
|
49672
|
+
|
|
49673
|
+
// Normalize the path according to POSIX rules.
|
|
49674
|
+
value = normalizeString(path, !absolute)
|
|
49675
|
+
|
|
49676
|
+
if (!value.length && !absolute) {
|
|
49677
|
+
value = '.'
|
|
49678
|
+
}
|
|
49679
|
+
|
|
49680
|
+
if (value.length && path.charCodeAt(path.length - 1) === 47 /* / */) {
|
|
49681
|
+
value += '/'
|
|
49682
|
+
}
|
|
49683
|
+
|
|
49684
|
+
return absolute ? '/' + value : value
|
|
49685
|
+
}
|
|
49686
|
+
|
|
49687
|
+
// Resolve `.` and `..` elements in a path with directory names.
|
|
49688
|
+
function normalizeString(path, allowAboveRoot) {
|
|
49689
|
+
var result = ''
|
|
49690
|
+
var lastSegmentLength = 0
|
|
49691
|
+
var lastSlash = -1
|
|
49692
|
+
var dots = 0
|
|
49693
|
+
var index = -1
|
|
49694
|
+
var code
|
|
49695
|
+
var lastSlashIndex
|
|
49696
|
+
|
|
49697
|
+
while (++index <= path.length) {
|
|
49698
|
+
if (index < path.length) {
|
|
49699
|
+
code = path.charCodeAt(index)
|
|
49700
|
+
} else if (code === 47 /* `/` */) {
|
|
49701
|
+
break
|
|
49702
|
+
} else {
|
|
49703
|
+
code = 47 /* `/` */
|
|
49704
|
+
}
|
|
49705
|
+
|
|
49706
|
+
if (code === 47 /* `/` */) {
|
|
49707
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
49708
|
+
// Empty.
|
|
49709
|
+
} else if (lastSlash !== index - 1 && dots === 2) {
|
|
49710
|
+
if (
|
|
49711
|
+
result.length < 2 ||
|
|
49712
|
+
lastSegmentLength !== 2 ||
|
|
49713
|
+
result.charCodeAt(result.length - 1) !== 46 /* `.` */ ||
|
|
49714
|
+
result.charCodeAt(result.length - 2) !== 46 /* `.` */
|
|
49715
|
+
) {
|
|
49716
|
+
if (result.length > 2) {
|
|
49717
|
+
lastSlashIndex = result.lastIndexOf('/')
|
|
49718
|
+
|
|
49719
|
+
/* istanbul ignore else - No clue how to cover it. */
|
|
49720
|
+
if (lastSlashIndex !== result.length - 1) {
|
|
49721
|
+
if (lastSlashIndex < 0) {
|
|
49722
|
+
result = ''
|
|
49723
|
+
lastSegmentLength = 0
|
|
49724
|
+
} else {
|
|
49725
|
+
result = result.slice(0, lastSlashIndex)
|
|
49726
|
+
lastSegmentLength = result.length - 1 - result.lastIndexOf('/')
|
|
49727
|
+
}
|
|
49728
|
+
|
|
49729
|
+
lastSlash = index
|
|
49730
|
+
dots = 0
|
|
49731
|
+
continue
|
|
49732
|
+
}
|
|
49733
|
+
} else if (result.length) {
|
|
49734
|
+
result = ''
|
|
49735
|
+
lastSegmentLength = 0
|
|
49736
|
+
lastSlash = index
|
|
49737
|
+
dots = 0
|
|
49738
|
+
continue
|
|
49739
|
+
}
|
|
49740
|
+
}
|
|
49741
|
+
|
|
49742
|
+
if (allowAboveRoot) {
|
|
49743
|
+
result = result.length ? result + '/..' : '..'
|
|
49744
|
+
lastSegmentLength = 2
|
|
49745
|
+
}
|
|
49746
|
+
} else {
|
|
49747
|
+
if (result.length) {
|
|
49748
|
+
result += '/' + path.slice(lastSlash + 1, index)
|
|
49749
|
+
} else {
|
|
49750
|
+
result = path.slice(lastSlash + 1, index)
|
|
49751
|
+
}
|
|
49752
|
+
|
|
49753
|
+
lastSegmentLength = index - lastSlash - 1
|
|
49754
|
+
}
|
|
49755
|
+
|
|
49756
|
+
lastSlash = index
|
|
49757
|
+
dots = 0
|
|
49758
|
+
} else if (code === 46 /* `.` */ && dots > -1) {
|
|
49759
|
+
dots++
|
|
49760
|
+
} else {
|
|
49761
|
+
dots = -1
|
|
49762
|
+
}
|
|
49763
|
+
}
|
|
49764
|
+
|
|
49765
|
+
return result
|
|
49766
|
+
}
|
|
49767
|
+
|
|
49768
|
+
function assertPath(path) {
|
|
49769
|
+
if (typeof path !== 'string') {
|
|
49770
|
+
throw new TypeError(
|
|
49771
|
+
'Path must be a string. Received ' + JSON.stringify(path)
|
|
49772
|
+
)
|
|
49773
|
+
}
|
|
49774
|
+
}
|
|
49775
|
+
|
|
49776
|
+
|
|
49777
|
+
/***/ }),
|
|
49778
|
+
|
|
49779
|
+
/***/ 4228:
|
|
49780
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
49781
|
+
|
|
49782
|
+
"use strict";
|
|
49783
|
+
|
|
49784
|
+
|
|
49785
|
+
// Somewhat based on:
|
|
49786
|
+
// <https://github.com/defunctzombie/node-process/blob/master/browser.js>.
|
|
49787
|
+
// But I donβt think one tiny line of code can be copyrighted. π
|
|
49788
|
+
exports.cwd = cwd
|
|
49789
|
+
|
|
49790
|
+
function cwd() {
|
|
49791
|
+
return '/'
|
|
49792
|
+
}
|
|
49793
|
+
|
|
49794
|
+
|
|
49926
49795
|
/***/ }),
|
|
49927
49796
|
|
|
49928
49797
|
/***/ 7529:
|
|
@@ -51942,9 +51811,9 @@ function _slicedToArray(arr, i) {
|
|
|
51942
51811
|
|
|
51943
51812
|
|
|
51944
51813
|
|
|
51945
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
51814
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
51946
51815
|
|
|
51947
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
51816
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
51948
51817
|
|
|
51949
51818
|
/* eslint-disable no-param-reassign */
|
|
51950
51819
|
__webpack_require__(2787);
|