@rspress/shared 0.0.0-nightly-20230916160138 → 0.0.2

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/index.mjs DELETED
@@ -1,1236 +0,0 @@
1
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js
2
- function listCacheClear() {
3
- this.__data__ = [];
4
- this.size = 0;
5
- }
6
- var listCacheClear_default = listCacheClear;
7
-
8
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js
9
- function eq(value, other) {
10
- return value === other || value !== value && other !== other;
11
- }
12
- var eq_default = eq;
13
-
14
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js
15
- function assocIndexOf(array, key) {
16
- var length = array.length;
17
- while (length--) {
18
- if (eq_default(array[length][0], key)) {
19
- return length;
20
- }
21
- }
22
- return -1;
23
- }
24
- var assocIndexOf_default = assocIndexOf;
25
-
26
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js
27
- var arrayProto = Array.prototype;
28
- var splice = arrayProto.splice;
29
- function listCacheDelete(key) {
30
- var data = this.__data__, index = assocIndexOf_default(data, key);
31
- if (index < 0) {
32
- return false;
33
- }
34
- var lastIndex = data.length - 1;
35
- if (index == lastIndex) {
36
- data.pop();
37
- } else {
38
- splice.call(data, index, 1);
39
- }
40
- --this.size;
41
- return true;
42
- }
43
- var listCacheDelete_default = listCacheDelete;
44
-
45
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js
46
- function listCacheGet(key) {
47
- var data = this.__data__, index = assocIndexOf_default(data, key);
48
- return index < 0 ? void 0 : data[index][1];
49
- }
50
- var listCacheGet_default = listCacheGet;
51
-
52
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js
53
- function listCacheHas(key) {
54
- return assocIndexOf_default(this.__data__, key) > -1;
55
- }
56
- var listCacheHas_default = listCacheHas;
57
-
58
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js
59
- function listCacheSet(key, value) {
60
- var data = this.__data__, index = assocIndexOf_default(data, key);
61
- if (index < 0) {
62
- ++this.size;
63
- data.push([
64
- key,
65
- value
66
- ]);
67
- } else {
68
- data[index][1] = value;
69
- }
70
- return this;
71
- }
72
- var listCacheSet_default = listCacheSet;
73
-
74
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js
75
- function ListCache(entries) {
76
- var index = -1, length = entries == null ? 0 : entries.length;
77
- this.clear();
78
- while (++index < length) {
79
- var entry = entries[index];
80
- this.set(entry[0], entry[1]);
81
- }
82
- }
83
- ListCache.prototype.clear = listCacheClear_default;
84
- ListCache.prototype["delete"] = listCacheDelete_default;
85
- ListCache.prototype.get = listCacheGet_default;
86
- ListCache.prototype.has = listCacheHas_default;
87
- ListCache.prototype.set = listCacheSet_default;
88
- var ListCache_default = ListCache;
89
-
90
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackClear.js
91
- function stackClear() {
92
- this.__data__ = new ListCache_default();
93
- this.size = 0;
94
- }
95
- var stackClear_default = stackClear;
96
-
97
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackDelete.js
98
- function stackDelete(key) {
99
- var data = this.__data__, result = data["delete"](key);
100
- this.size = data.size;
101
- return result;
102
- }
103
- var stackDelete_default = stackDelete;
104
-
105
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackGet.js
106
- function stackGet(key) {
107
- return this.__data__.get(key);
108
- }
109
- var stackGet_default = stackGet;
110
-
111
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackHas.js
112
- function stackHas(key) {
113
- return this.__data__.has(key);
114
- }
115
- var stackHas_default = stackHas;
116
-
117
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js
118
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
119
- var freeGlobal_default = freeGlobal;
120
-
121
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js
122
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
123
- var root = freeGlobal_default || freeSelf || Function("return this")();
124
- var root_default = root;
125
-
126
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js
127
- var Symbol = root_default.Symbol;
128
- var Symbol_default = Symbol;
129
-
130
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js
131
- var objectProto = Object.prototype;
132
- var hasOwnProperty = objectProto.hasOwnProperty;
133
- var nativeObjectToString = objectProto.toString;
134
- var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
135
- function getRawTag(value) {
136
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
137
- try {
138
- value[symToStringTag] = void 0;
139
- var unmasked = true;
140
- } catch (e) {
141
- }
142
- var result = nativeObjectToString.call(value);
143
- if (unmasked) {
144
- if (isOwn) {
145
- value[symToStringTag] = tag;
146
- } else {
147
- delete value[symToStringTag];
148
- }
149
- }
150
- return result;
151
- }
152
- var getRawTag_default = getRawTag;
153
-
154
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js
155
- var objectProto2 = Object.prototype;
156
- var nativeObjectToString2 = objectProto2.toString;
157
- function objectToString(value) {
158
- return nativeObjectToString2.call(value);
159
- }
160
- var objectToString_default = objectToString;
161
-
162
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js
163
- var nullTag = "[object Null]";
164
- var undefinedTag = "[object Undefined]";
165
- var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
166
- function baseGetTag(value) {
167
- if (value == null) {
168
- return value === void 0 ? undefinedTag : nullTag;
169
- }
170
- return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
171
- }
172
- var baseGetTag_default = baseGetTag;
173
-
174
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js
175
- function isObject(value) {
176
- var type = typeof value;
177
- return value != null && (type == "object" || type == "function");
178
- }
179
- var isObject_default = isObject;
180
-
181
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js
182
- var asyncTag = "[object AsyncFunction]";
183
- var funcTag = "[object Function]";
184
- var genTag = "[object GeneratorFunction]";
185
- var proxyTag = "[object Proxy]";
186
- function isFunction(value) {
187
- if (!isObject_default(value)) {
188
- return false;
189
- }
190
- var tag = baseGetTag_default(value);
191
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
192
- }
193
- var isFunction_default = isFunction;
194
-
195
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js
196
- var coreJsData = root_default["__core-js_shared__"];
197
- var coreJsData_default = coreJsData;
198
-
199
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js
200
- var maskSrcKey = function() {
201
- var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
202
- return uid ? "Symbol(src)_1." + uid : "";
203
- }();
204
- function isMasked(func) {
205
- return !!maskSrcKey && maskSrcKey in func;
206
- }
207
- var isMasked_default = isMasked;
208
-
209
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js
210
- var funcProto = Function.prototype;
211
- var funcToString = funcProto.toString;
212
- function toSource(func) {
213
- if (func != null) {
214
- try {
215
- return funcToString.call(func);
216
- } catch (e) {
217
- }
218
- try {
219
- return func + "";
220
- } catch (e) {
221
- }
222
- }
223
- return "";
224
- }
225
- var toSource_default = toSource;
226
-
227
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js
228
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
229
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
230
- var funcProto2 = Function.prototype;
231
- var objectProto3 = Object.prototype;
232
- var funcToString2 = funcProto2.toString;
233
- var hasOwnProperty2 = objectProto3.hasOwnProperty;
234
- var reIsNative = RegExp("^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
235
- function baseIsNative(value) {
236
- if (!isObject_default(value) || isMasked_default(value)) {
237
- return false;
238
- }
239
- var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
240
- return pattern.test(toSource_default(value));
241
- }
242
- var baseIsNative_default = baseIsNative;
243
-
244
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js
245
- function getValue(object, key) {
246
- return object == null ? void 0 : object[key];
247
- }
248
- var getValue_default = getValue;
249
-
250
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js
251
- function getNative(object, key) {
252
- var value = getValue_default(object, key);
253
- return baseIsNative_default(value) ? value : void 0;
254
- }
255
- var getNative_default = getNative;
256
-
257
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js
258
- var Map = getNative_default(root_default, "Map");
259
- var Map_default = Map;
260
-
261
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js
262
- var nativeCreate = getNative_default(Object, "create");
263
- var nativeCreate_default = nativeCreate;
264
-
265
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js
266
- function hashClear() {
267
- this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
268
- this.size = 0;
269
- }
270
- var hashClear_default = hashClear;
271
-
272
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js
273
- function hashDelete(key) {
274
- var result = this.has(key) && delete this.__data__[key];
275
- this.size -= result ? 1 : 0;
276
- return result;
277
- }
278
- var hashDelete_default = hashDelete;
279
-
280
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js
281
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
282
- var objectProto4 = Object.prototype;
283
- var hasOwnProperty3 = objectProto4.hasOwnProperty;
284
- function hashGet(key) {
285
- var data = this.__data__;
286
- if (nativeCreate_default) {
287
- var result = data[key];
288
- return result === HASH_UNDEFINED ? void 0 : result;
289
- }
290
- return hasOwnProperty3.call(data, key) ? data[key] : void 0;
291
- }
292
- var hashGet_default = hashGet;
293
-
294
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js
295
- var objectProto5 = Object.prototype;
296
- var hasOwnProperty4 = objectProto5.hasOwnProperty;
297
- function hashHas(key) {
298
- var data = this.__data__;
299
- return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty4.call(data, key);
300
- }
301
- var hashHas_default = hashHas;
302
-
303
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js
304
- var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
305
- function hashSet(key, value) {
306
- var data = this.__data__;
307
- this.size += this.has(key) ? 0 : 1;
308
- data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
309
- return this;
310
- }
311
- var hashSet_default = hashSet;
312
-
313
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js
314
- function Hash(entries) {
315
- var index = -1, length = entries == null ? 0 : entries.length;
316
- this.clear();
317
- while (++index < length) {
318
- var entry = entries[index];
319
- this.set(entry[0], entry[1]);
320
- }
321
- }
322
- Hash.prototype.clear = hashClear_default;
323
- Hash.prototype["delete"] = hashDelete_default;
324
- Hash.prototype.get = hashGet_default;
325
- Hash.prototype.has = hashHas_default;
326
- Hash.prototype.set = hashSet_default;
327
- var Hash_default = Hash;
328
-
329
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js
330
- function mapCacheClear() {
331
- this.size = 0;
332
- this.__data__ = {
333
- "hash": new Hash_default(),
334
- "map": new (Map_default || ListCache_default)(),
335
- "string": new Hash_default()
336
- };
337
- }
338
- var mapCacheClear_default = mapCacheClear;
339
-
340
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js
341
- function isKeyable(value) {
342
- var type = typeof value;
343
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
344
- }
345
- var isKeyable_default = isKeyable;
346
-
347
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js
348
- function getMapData(map, key) {
349
- var data = map.__data__;
350
- return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
351
- }
352
- var getMapData_default = getMapData;
353
-
354
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js
355
- function mapCacheDelete(key) {
356
- var result = getMapData_default(this, key)["delete"](key);
357
- this.size -= result ? 1 : 0;
358
- return result;
359
- }
360
- var mapCacheDelete_default = mapCacheDelete;
361
-
362
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js
363
- function mapCacheGet(key) {
364
- return getMapData_default(this, key).get(key);
365
- }
366
- var mapCacheGet_default = mapCacheGet;
367
-
368
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js
369
- function mapCacheHas(key) {
370
- return getMapData_default(this, key).has(key);
371
- }
372
- var mapCacheHas_default = mapCacheHas;
373
-
374
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js
375
- function mapCacheSet(key, value) {
376
- var data = getMapData_default(this, key), size = data.size;
377
- data.set(key, value);
378
- this.size += data.size == size ? 0 : 1;
379
- return this;
380
- }
381
- var mapCacheSet_default = mapCacheSet;
382
-
383
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js
384
- function MapCache(entries) {
385
- var index = -1, length = entries == null ? 0 : entries.length;
386
- this.clear();
387
- while (++index < length) {
388
- var entry = entries[index];
389
- this.set(entry[0], entry[1]);
390
- }
391
- }
392
- MapCache.prototype.clear = mapCacheClear_default;
393
- MapCache.prototype["delete"] = mapCacheDelete_default;
394
- MapCache.prototype.get = mapCacheGet_default;
395
- MapCache.prototype.has = mapCacheHas_default;
396
- MapCache.prototype.set = mapCacheSet_default;
397
- var MapCache_default = MapCache;
398
-
399
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackSet.js
400
- var LARGE_ARRAY_SIZE = 200;
401
- function stackSet(key, value) {
402
- var data = this.__data__;
403
- if (data instanceof ListCache_default) {
404
- var pairs = data.__data__;
405
- if (!Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) {
406
- pairs.push([
407
- key,
408
- value
409
- ]);
410
- this.size = ++data.size;
411
- return this;
412
- }
413
- data = this.__data__ = new MapCache_default(pairs);
414
- }
415
- data.set(key, value);
416
- this.size = data.size;
417
- return this;
418
- }
419
- var stackSet_default = stackSet;
420
-
421
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Stack.js
422
- function Stack(entries) {
423
- var data = this.__data__ = new ListCache_default(entries);
424
- this.size = data.size;
425
- }
426
- Stack.prototype.clear = stackClear_default;
427
- Stack.prototype["delete"] = stackDelete_default;
428
- Stack.prototype.get = stackGet_default;
429
- Stack.prototype.has = stackHas_default;
430
- Stack.prototype.set = stackSet_default;
431
- var Stack_default = Stack;
432
-
433
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_defineProperty.js
434
- var defineProperty = function() {
435
- try {
436
- var func = getNative_default(Object, "defineProperty");
437
- func({}, "", {});
438
- return func;
439
- } catch (e) {
440
- }
441
- }();
442
- var defineProperty_default = defineProperty;
443
-
444
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignValue.js
445
- function baseAssignValue(object, key, value) {
446
- if (key == "__proto__" && defineProperty_default) {
447
- defineProperty_default(object, key, {
448
- "configurable": true,
449
- "enumerable": true,
450
- "value": value,
451
- "writable": true
452
- });
453
- } else {
454
- object[key] = value;
455
- }
456
- }
457
- var baseAssignValue_default = baseAssignValue;
458
-
459
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignMergeValue.js
460
- function assignMergeValue(object, key, value) {
461
- if (value !== void 0 && !eq_default(object[key], value) || value === void 0 && !(key in object)) {
462
- baseAssignValue_default(object, key, value);
463
- }
464
- }
465
- var assignMergeValue_default = assignMergeValue;
466
-
467
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseFor.js
468
- function createBaseFor(fromRight) {
469
- return function(object, iteratee, keysFunc) {
470
- var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
471
- while (length--) {
472
- var key = props[fromRight ? length : ++index];
473
- if (iteratee(iterable[key], key, iterable) === false) {
474
- break;
475
- }
476
- }
477
- return object;
478
- };
479
- }
480
- var createBaseFor_default = createBaseFor;
481
-
482
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFor.js
483
- var baseFor = createBaseFor_default();
484
- var baseFor_default = baseFor;
485
-
486
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneBuffer.js
487
- var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
488
- var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
489
- var moduleExports = freeModule && freeModule.exports === freeExports;
490
- var Buffer = moduleExports ? root_default.Buffer : void 0;
491
- var allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
492
- function cloneBuffer(buffer, isDeep) {
493
- if (isDeep) {
494
- return buffer.slice();
495
- }
496
- var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
497
- buffer.copy(result);
498
- return result;
499
- }
500
- var cloneBuffer_default = cloneBuffer;
501
-
502
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Uint8Array.js
503
- var Uint8Array = root_default.Uint8Array;
504
- var Uint8Array_default = Uint8Array;
505
-
506
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneArrayBuffer.js
507
- function cloneArrayBuffer(arrayBuffer) {
508
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
509
- new Uint8Array_default(result).set(new Uint8Array_default(arrayBuffer));
510
- return result;
511
- }
512
- var cloneArrayBuffer_default = cloneArrayBuffer;
513
-
514
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneTypedArray.js
515
- function cloneTypedArray(typedArray, isDeep) {
516
- var buffer = isDeep ? cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer;
517
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
518
- }
519
- var cloneTypedArray_default = cloneTypedArray;
520
-
521
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyArray.js
522
- function copyArray(source, array) {
523
- var index = -1, length = source.length;
524
- array || (array = Array(length));
525
- while (++index < length) {
526
- array[index] = source[index];
527
- }
528
- return array;
529
- }
530
- var copyArray_default = copyArray;
531
-
532
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseCreate.js
533
- var objectCreate = Object.create;
534
- var baseCreate = function() {
535
- function object() {
536
- }
537
- return function(proto) {
538
- if (!isObject_default(proto)) {
539
- return {};
540
- }
541
- if (objectCreate) {
542
- return objectCreate(proto);
543
- }
544
- object.prototype = proto;
545
- var result = new object();
546
- object.prototype = void 0;
547
- return result;
548
- };
549
- }();
550
- var baseCreate_default = baseCreate;
551
-
552
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js
553
- function overArg(func, transform) {
554
- return function(arg) {
555
- return func(transform(arg));
556
- };
557
- }
558
- var overArg_default = overArg;
559
-
560
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getPrototype.js
561
- var getPrototype = overArg_default(Object.getPrototypeOf, Object);
562
- var getPrototype_default = getPrototype;
563
-
564
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isPrototype.js
565
- var objectProto6 = Object.prototype;
566
- function isPrototype(value) {
567
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto6;
568
- return value === proto;
569
- }
570
- var isPrototype_default = isPrototype;
571
-
572
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneObject.js
573
- function initCloneObject(object) {
574
- return typeof object.constructor == "function" && !isPrototype_default(object) ? baseCreate_default(getPrototype_default(object)) : {};
575
- }
576
- var initCloneObject_default = initCloneObject;
577
-
578
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js
579
- function isObjectLike(value) {
580
- return value != null && typeof value == "object";
581
- }
582
- var isObjectLike_default = isObjectLike;
583
-
584
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsArguments.js
585
- var argsTag = "[object Arguments]";
586
- function baseIsArguments(value) {
587
- return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
588
- }
589
- var baseIsArguments_default = baseIsArguments;
590
-
591
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArguments.js
592
- var objectProto7 = Object.prototype;
593
- var hasOwnProperty5 = objectProto7.hasOwnProperty;
594
- var propertyIsEnumerable = objectProto7.propertyIsEnumerable;
595
- var isArguments = baseIsArguments_default(function() {
596
- return arguments;
597
- }()) ? baseIsArguments_default : function(value) {
598
- return isObjectLike_default(value) && hasOwnProperty5.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
599
- };
600
- var isArguments_default = isArguments;
601
-
602
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js
603
- var isArray = Array.isArray;
604
- var isArray_default = isArray;
605
-
606
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isLength.js
607
- var MAX_SAFE_INTEGER = 9007199254740991;
608
- function isLength(value) {
609
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
610
- }
611
- var isLength_default = isLength;
612
-
613
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLike.js
614
- function isArrayLike(value) {
615
- return value != null && isLength_default(value.length) && !isFunction_default(value);
616
- }
617
- var isArrayLike_default = isArrayLike;
618
-
619
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLikeObject.js
620
- function isArrayLikeObject(value) {
621
- return isObjectLike_default(value) && isArrayLike_default(value);
622
- }
623
- var isArrayLikeObject_default = isArrayLikeObject;
624
-
625
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubFalse.js
626
- function stubFalse() {
627
- return false;
628
- }
629
- var stubFalse_default = stubFalse;
630
-
631
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isBuffer.js
632
- var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
633
- var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
634
- var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
635
- var Buffer2 = moduleExports2 ? root_default.Buffer : void 0;
636
- var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
637
- var isBuffer = nativeIsBuffer || stubFalse_default;
638
- var isBuffer_default = isBuffer;
639
-
640
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.js
641
- var objectTag = "[object Object]";
642
- var funcProto3 = Function.prototype;
643
- var objectProto8 = Object.prototype;
644
- var funcToString3 = funcProto3.toString;
645
- var hasOwnProperty6 = objectProto8.hasOwnProperty;
646
- var objectCtorString = funcToString3.call(Object);
647
- function isPlainObject(value) {
648
- if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag) {
649
- return false;
650
- }
651
- var proto = getPrototype_default(value);
652
- if (proto === null) {
653
- return true;
654
- }
655
- var Ctor = hasOwnProperty6.call(proto, "constructor") && proto.constructor;
656
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString;
657
- }
658
- var isPlainObject_default = isPlainObject;
659
-
660
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsTypedArray.js
661
- var argsTag2 = "[object Arguments]";
662
- var arrayTag = "[object Array]";
663
- var boolTag = "[object Boolean]";
664
- var dateTag = "[object Date]";
665
- var errorTag = "[object Error]";
666
- var funcTag2 = "[object Function]";
667
- var mapTag = "[object Map]";
668
- var numberTag = "[object Number]";
669
- var objectTag2 = "[object Object]";
670
- var regexpTag = "[object RegExp]";
671
- var setTag = "[object Set]";
672
- var stringTag = "[object String]";
673
- var weakMapTag = "[object WeakMap]";
674
- var arrayBufferTag = "[object ArrayBuffer]";
675
- var dataViewTag = "[object DataView]";
676
- var float32Tag = "[object Float32Array]";
677
- var float64Tag = "[object Float64Array]";
678
- var int8Tag = "[object Int8Array]";
679
- var int16Tag = "[object Int16Array]";
680
- var int32Tag = "[object Int32Array]";
681
- var uint8Tag = "[object Uint8Array]";
682
- var uint8ClampedTag = "[object Uint8ClampedArray]";
683
- var uint16Tag = "[object Uint16Array]";
684
- var uint32Tag = "[object Uint32Array]";
685
- var typedArrayTags = {};
686
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
687
- typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag2] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
688
- function baseIsTypedArray(value) {
689
- return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)];
690
- }
691
- var baseIsTypedArray_default = baseIsTypedArray;
692
-
693
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnary.js
694
- function baseUnary(func) {
695
- return function(value) {
696
- return func(value);
697
- };
698
- }
699
- var baseUnary_default = baseUnary;
700
-
701
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nodeUtil.js
702
- var freeExports3 = typeof exports == "object" && exports && !exports.nodeType && exports;
703
- var freeModule3 = freeExports3 && typeof module == "object" && module && !module.nodeType && module;
704
- var moduleExports3 = freeModule3 && freeModule3.exports === freeExports3;
705
- var freeProcess = moduleExports3 && freeGlobal_default.process;
706
- var nodeUtil = function() {
707
- try {
708
- var types = freeModule3 && freeModule3.require && freeModule3.require("util").types;
709
- if (types) {
710
- return types;
711
- }
712
- return freeProcess && freeProcess.binding && freeProcess.binding("util");
713
- } catch (e) {
714
- }
715
- }();
716
- var nodeUtil_default = nodeUtil;
717
-
718
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isTypedArray.js
719
- var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray;
720
- var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default;
721
- var isTypedArray_default = isTypedArray;
722
-
723
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_safeGet.js
724
- function safeGet(object, key) {
725
- if (key === "constructor" && typeof object[key] === "function") {
726
- return;
727
- }
728
- if (key == "__proto__") {
729
- return;
730
- }
731
- return object[key];
732
- }
733
- var safeGet_default = safeGet;
734
-
735
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignValue.js
736
- var objectProto9 = Object.prototype;
737
- var hasOwnProperty7 = objectProto9.hasOwnProperty;
738
- function assignValue(object, key, value) {
739
- var objValue = object[key];
740
- if (!(hasOwnProperty7.call(object, key) && eq_default(objValue, value)) || value === void 0 && !(key in object)) {
741
- baseAssignValue_default(object, key, value);
742
- }
743
- }
744
- var assignValue_default = assignValue;
745
-
746
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyObject.js
747
- function copyObject(source, props, object, customizer) {
748
- var isNew = !object;
749
- object || (object = {});
750
- var index = -1, length = props.length;
751
- while (++index < length) {
752
- var key = props[index];
753
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
754
- if (newValue === void 0) {
755
- newValue = source[key];
756
- }
757
- if (isNew) {
758
- baseAssignValue_default(object, key, newValue);
759
- } else {
760
- assignValue_default(object, key, newValue);
761
- }
762
- }
763
- return object;
764
- }
765
- var copyObject_default = copyObject;
766
-
767
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTimes.js
768
- function baseTimes(n, iteratee) {
769
- var index = -1, result = Array(n);
770
- while (++index < n) {
771
- result[index] = iteratee(index);
772
- }
773
- return result;
774
- }
775
- var baseTimes_default = baseTimes;
776
-
777
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIndex.js
778
- var MAX_SAFE_INTEGER2 = 9007199254740991;
779
- var reIsUint = /^(?:0|[1-9]\d*)$/;
780
- function isIndex(value, length) {
781
- var type = typeof value;
782
- length = length == null ? MAX_SAFE_INTEGER2 : length;
783
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
784
- }
785
- var isIndex_default = isIndex;
786
-
787
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayLikeKeys.js
788
- var objectProto10 = Object.prototype;
789
- var hasOwnProperty8 = objectProto10.hasOwnProperty;
790
- function arrayLikeKeys(value, inherited) {
791
- var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes_default(value.length, String) : [], length = result.length;
792
- for (var key in value) {
793
- if ((inherited || hasOwnProperty8.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
794
- (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
795
- isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
796
- isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
797
- isIndex_default(key, length)))) {
798
- result.push(key);
799
- }
800
- }
801
- return result;
802
- }
803
- var arrayLikeKeys_default = arrayLikeKeys;
804
-
805
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeysIn.js
806
- function nativeKeysIn(object) {
807
- var result = [];
808
- if (object != null) {
809
- for (var key in Object(object)) {
810
- result.push(key);
811
- }
812
- }
813
- return result;
814
- }
815
- var nativeKeysIn_default = nativeKeysIn;
816
-
817
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeysIn.js
818
- var objectProto11 = Object.prototype;
819
- var hasOwnProperty9 = objectProto11.hasOwnProperty;
820
- function baseKeysIn(object) {
821
- if (!isObject_default(object)) {
822
- return nativeKeysIn_default(object);
823
- }
824
- var isProto = isPrototype_default(object), result = [];
825
- for (var key in object) {
826
- if (!(key == "constructor" && (isProto || !hasOwnProperty9.call(object, key)))) {
827
- result.push(key);
828
- }
829
- }
830
- return result;
831
- }
832
- var baseKeysIn_default = baseKeysIn;
833
-
834
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keysIn.js
835
- function keysIn(object) {
836
- return isArrayLike_default(object) ? arrayLikeKeys_default(object, true) : baseKeysIn_default(object);
837
- }
838
- var keysIn_default = keysIn;
839
-
840
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toPlainObject.js
841
- function toPlainObject(value) {
842
- return copyObject_default(value, keysIn_default(value));
843
- }
844
- var toPlainObject_default = toPlainObject;
845
-
846
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMergeDeep.js
847
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
848
- var objValue = safeGet_default(object, key), srcValue = safeGet_default(source, key), stacked = stack.get(srcValue);
849
- if (stacked) {
850
- assignMergeValue_default(object, key, stacked);
851
- return;
852
- }
853
- var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
854
- var isCommon = newValue === void 0;
855
- if (isCommon) {
856
- var isArr = isArray_default(srcValue), isBuff = !isArr && isBuffer_default(srcValue), isTyped = !isArr && !isBuff && isTypedArray_default(srcValue);
857
- newValue = srcValue;
858
- if (isArr || isBuff || isTyped) {
859
- if (isArray_default(objValue)) {
860
- newValue = objValue;
861
- } else if (isArrayLikeObject_default(objValue)) {
862
- newValue = copyArray_default(objValue);
863
- } else if (isBuff) {
864
- isCommon = false;
865
- newValue = cloneBuffer_default(srcValue, true);
866
- } else if (isTyped) {
867
- isCommon = false;
868
- newValue = cloneTypedArray_default(srcValue, true);
869
- } else {
870
- newValue = [];
871
- }
872
- } else if (isPlainObject_default(srcValue) || isArguments_default(srcValue)) {
873
- newValue = objValue;
874
- if (isArguments_default(objValue)) {
875
- newValue = toPlainObject_default(objValue);
876
- } else if (!isObject_default(objValue) || isFunction_default(objValue)) {
877
- newValue = initCloneObject_default(srcValue);
878
- }
879
- } else {
880
- isCommon = false;
881
- }
882
- }
883
- if (isCommon) {
884
- stack.set(srcValue, newValue);
885
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
886
- stack["delete"](srcValue);
887
- }
888
- assignMergeValue_default(object, key, newValue);
889
- }
890
- var baseMergeDeep_default = baseMergeDeep;
891
-
892
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMerge.js
893
- function baseMerge(object, source, srcIndex, customizer, stack) {
894
- if (object === source) {
895
- return;
896
- }
897
- baseFor_default(source, function(srcValue, key) {
898
- stack || (stack = new Stack_default());
899
- if (isObject_default(srcValue)) {
900
- baseMergeDeep_default(object, source, key, srcIndex, baseMerge, customizer, stack);
901
- } else {
902
- var newValue = customizer ? customizer(safeGet_default(object, key), srcValue, key + "", object, source, stack) : void 0;
903
- if (newValue === void 0) {
904
- newValue = srcValue;
905
- }
906
- assignMergeValue_default(object, key, newValue);
907
- }
908
- }, keysIn_default);
909
- }
910
- var baseMerge_default = baseMerge;
911
-
912
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/identity.js
913
- function identity(value) {
914
- return value;
915
- }
916
- var identity_default = identity;
917
-
918
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_apply.js
919
- function apply(func, thisArg, args) {
920
- switch (args.length) {
921
- case 0:
922
- return func.call(thisArg);
923
- case 1:
924
- return func.call(thisArg, args[0]);
925
- case 2:
926
- return func.call(thisArg, args[0], args[1]);
927
- case 3:
928
- return func.call(thisArg, args[0], args[1], args[2]);
929
- }
930
- return func.apply(thisArg, args);
931
- }
932
- var apply_default = apply;
933
-
934
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overRest.js
935
- var nativeMax = Math.max;
936
- function overRest(func, start, transform) {
937
- start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
938
- return function() {
939
- var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
940
- while (++index < length) {
941
- array[index] = args[start + index];
942
- }
943
- index = -1;
944
- var otherArgs = Array(start + 1);
945
- while (++index < start) {
946
- otherArgs[index] = args[index];
947
- }
948
- otherArgs[start] = transform(array);
949
- return apply_default(func, this, otherArgs);
950
- };
951
- }
952
- var overRest_default = overRest;
953
-
954
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/constant.js
955
- function constant(value) {
956
- return function() {
957
- return value;
958
- };
959
- }
960
- var constant_default = constant;
961
-
962
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSetToString.js
963
- var baseSetToString = !defineProperty_default ? identity_default : function(func, string) {
964
- return defineProperty_default(func, "toString", {
965
- "configurable": true,
966
- "enumerable": false,
967
- "value": constant_default(string),
968
- "writable": true
969
- });
970
- };
971
- var baseSetToString_default = baseSetToString;
972
-
973
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_shortOut.js
974
- var HOT_COUNT = 800;
975
- var HOT_SPAN = 16;
976
- var nativeNow = Date.now;
977
- function shortOut(func) {
978
- var count = 0, lastCalled = 0;
979
- return function() {
980
- var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
981
- lastCalled = stamp;
982
- if (remaining > 0) {
983
- if (++count >= HOT_COUNT) {
984
- return arguments[0];
985
- }
986
- } else {
987
- count = 0;
988
- }
989
- return func.apply(void 0, arguments);
990
- };
991
- }
992
- var shortOut_default = shortOut;
993
-
994
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToString.js
995
- var setToString = shortOut_default(baseSetToString_default);
996
- var setToString_default = setToString;
997
-
998
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseRest.js
999
- function baseRest(func, start) {
1000
- return setToString_default(overRest_default(func, start, identity_default), func + "");
1001
- }
1002
- var baseRest_default = baseRest;
1003
-
1004
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIterateeCall.js
1005
- function isIterateeCall(value, index, object) {
1006
- if (!isObject_default(object)) {
1007
- return false;
1008
- }
1009
- var type = typeof index;
1010
- if (type == "number" ? isArrayLike_default(object) && isIndex_default(index, object.length) : type == "string" && index in object) {
1011
- return eq_default(object[index], value);
1012
- }
1013
- return false;
1014
- }
1015
- var isIterateeCall_default = isIterateeCall;
1016
-
1017
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createAssigner.js
1018
- function createAssigner(assigner) {
1019
- return baseRest_default(function(object, sources) {
1020
- var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
1021
- customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
1022
- if (guard && isIterateeCall_default(sources[0], sources[1], guard)) {
1023
- customizer = length < 3 ? void 0 : customizer;
1024
- length = 1;
1025
- }
1026
- object = Object(object);
1027
- while (++index < length) {
1028
- var source = sources[index];
1029
- if (source) {
1030
- assigner(object, source, index, customizer);
1031
- }
1032
- }
1033
- return object;
1034
- });
1035
- }
1036
- var createAssigner_default = createAssigner;
1037
-
1038
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mergeWith.js
1039
- var mergeWith = createAssigner_default(function(object, source, srcIndex, customizer) {
1040
- baseMerge_default(object, source, srcIndex, customizer);
1041
- });
1042
- var mergeWith_default = mergeWith;
1043
-
1044
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isUndefined.js
1045
- function isUndefined(value) {
1046
- return value === void 0;
1047
- }
1048
- var isUndefined_default = isUndefined;
1049
-
1050
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/castArray.js
1051
- function castArray() {
1052
- if (!arguments.length) {
1053
- return [];
1054
- }
1055
- var value = arguments[0];
1056
- return isArray_default(value) ? value : [
1057
- value
1058
- ];
1059
- }
1060
- var castArray_default = castArray;
1061
-
1062
- // src/utils/index.ts
1063
- var QUERY_REGEXP = /\?.*$/s;
1064
- var HASH_REGEXP = /#.*$/s;
1065
- var MDX_REGEXP = /\.mdx?$/;
1066
- var APPEARANCE_KEY = "rspress-theme-appearance";
1067
- var SEARCH_INDEX_NAME = "search_index";
1068
- var RSPRESS_TEMP_DIR = ".rspress";
1069
- var isSCM = () => Boolean(process.env.BUILD_VERSION);
1070
- var isProduction = () => process.env.NODE_ENV === "production";
1071
- var isDebugMode = () => Boolean(process.env.DOC_DEBUG);
1072
- var cleanUrl = (url) => url.replace(HASH_REGEXP, "").replace(QUERY_REGEXP, "");
1073
- function slash(str) {
1074
- return str.replace(/\\/g, "/");
1075
- }
1076
- function normalizePosixPath(id) {
1077
- const path = slash(id);
1078
- const isAbsolutePath = path.startsWith("/");
1079
- const parts = path.split("/");
1080
- const normalizedParts = [];
1081
- for (const part of parts) {
1082
- if (part === "." || part === "") {
1083
- continue;
1084
- } else if (part === "..") {
1085
- if (normalizedParts.length > 0 && normalizedParts[normalizedParts.length - 1] !== "..") {
1086
- normalizedParts.pop();
1087
- } else if (isAbsolutePath) {
1088
- normalizedParts.push("..");
1089
- }
1090
- } else {
1091
- normalizedParts.push(part);
1092
- }
1093
- }
1094
- let normalizedPath = normalizedParts.join("/");
1095
- if (isAbsolutePath) {
1096
- normalizedPath = `/${normalizedPath}`;
1097
- }
1098
- return normalizedPath;
1099
- }
1100
- var inBrowser = () => !process.env.__SSR__;
1101
- function addLeadingSlash(url) {
1102
- return url.charAt(0) === "/" || url.startsWith("https") ? url : `/${url}`;
1103
- }
1104
- function removeLeadingSlash(url) {
1105
- return url.charAt(0) === "/" ? url.slice(1) : url;
1106
- }
1107
- function removeTrailingSlash(url) {
1108
- return url.charAt(url.length - 1) === "/" ? url.slice(0, -1) : url;
1109
- }
1110
- function normalizeSlash(url) {
1111
- return removeTrailingSlash(addLeadingSlash(normalizePosixPath(url)));
1112
- }
1113
- function isExternalUrl(url) {
1114
- return url.startsWith("http://") || url.startsWith("https://") || url.startsWith("mailto:") || url.startsWith("tel:");
1115
- }
1116
- function replaceLang(rawUrl, targetLang, defaultLang, langs, base = "") {
1117
- let url = removeBase(rawUrl, base);
1118
- if (!url) {
1119
- url = "/index.html";
1120
- }
1121
- const originalLang = url.split("/")[1];
1122
- const inDefaultLang = !langs.includes(originalLang);
1123
- let result;
1124
- if (inDefaultLang) {
1125
- if (targetLang === defaultLang) {
1126
- result = url;
1127
- } else {
1128
- result = addLeadingSlash(`${targetLang}${url}`);
1129
- }
1130
- } else if (targetLang === defaultLang) {
1131
- result = url.replace(`/${originalLang}`, "");
1132
- } else {
1133
- result = url.replace(originalLang, targetLang);
1134
- }
1135
- return withBase(result, base);
1136
- }
1137
- var omit = (obj, keys) => {
1138
- const ret = {
1139
- ...obj
1140
- };
1141
- for (const key of keys) {
1142
- delete ret[key];
1143
- }
1144
- return ret;
1145
- };
1146
- var parseUrl = (url) => {
1147
- const [withoutHash2, hash = ""] = url.split("#");
1148
- return {
1149
- url: withoutHash2,
1150
- hash
1151
- };
1152
- };
1153
- function normalizeHref(url) {
1154
- if (!url) {
1155
- return "/";
1156
- }
1157
- if (isExternalUrl(url)) {
1158
- return url;
1159
- }
1160
- let { url: cleanUrl2, hash } = parseUrl(decodeURIComponent(url));
1161
- if (url.startsWith("mailto:") || url.startsWith("tel:")) {
1162
- return url;
1163
- }
1164
- if (!cleanUrl2.endsWith(".html")) {
1165
- if (cleanUrl2.endsWith("/")) {
1166
- cleanUrl2 += "index.html";
1167
- } else {
1168
- cleanUrl2 += ".html";
1169
- }
1170
- }
1171
- return addLeadingSlash(hash ? `${cleanUrl2}#${hash}` : cleanUrl2);
1172
- }
1173
- function withoutLang(path, langs) {
1174
- const langRegexp = new RegExp(`^\\/(${langs.join("|")})`);
1175
- return addLeadingSlash(path.replace(langRegexp, ""));
1176
- }
1177
- function withoutBase(path, base = "") {
1178
- return addLeadingSlash(path).replace(normalizeSlash(base), "");
1179
- }
1180
- function withBase(url = "/", base = "") {
1181
- const normalizedUrl = addLeadingSlash(url);
1182
- const normalizedBase = normalizeSlash(base);
1183
- return normalizedUrl.startsWith(normalizedBase) ? normalizedUrl : `${normalizedBase}${normalizedUrl}`;
1184
- }
1185
- function removeBase(url, base) {
1186
- return addLeadingSlash(url).replace(normalizeSlash(base), "");
1187
- }
1188
- function withoutHash(url) {
1189
- return url.split("#")[0];
1190
- }
1191
- var mergeDocConfig = (...configs) => mergeWith_default({}, ...configs, (target, source) => {
1192
- const pair = [
1193
- target,
1194
- source
1195
- ];
1196
- if (pair.some(isUndefined_default)) {
1197
- return void 0;
1198
- }
1199
- if (pair.some(isArray_default)) {
1200
- return [
1201
- ...castArray_default(target),
1202
- ...castArray_default(source)
1203
- ];
1204
- }
1205
- return void 0;
1206
- });
1207
- export {
1208
- APPEARANCE_KEY,
1209
- HASH_REGEXP,
1210
- MDX_REGEXP,
1211
- QUERY_REGEXP,
1212
- RSPRESS_TEMP_DIR,
1213
- SEARCH_INDEX_NAME,
1214
- addLeadingSlash,
1215
- cleanUrl,
1216
- inBrowser,
1217
- isDebugMode,
1218
- isExternalUrl,
1219
- isProduction,
1220
- isSCM,
1221
- mergeDocConfig,
1222
- normalizeHref,
1223
- normalizePosixPath,
1224
- normalizeSlash,
1225
- omit,
1226
- parseUrl,
1227
- removeBase,
1228
- removeLeadingSlash,
1229
- removeTrailingSlash,
1230
- replaceLang,
1231
- slash,
1232
- withBase,
1233
- withoutBase,
1234
- withoutHash,
1235
- withoutLang
1236
- };