105 lines
5.4 KiB
TypeScript
105 lines
5.4 KiB
TypeScript
/* Metro module 6644; source: modules/markup/MarkupListRule.tsx; dependencies: [3855, 44, 2] */
|
|
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
|
|
import Module03855 from '../../by-id/module-03855.js'; /* Metro dependency 3855 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun52563(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6822:6, offset: 0x013307db, size: 356 bytes, params: 8, frame: 20
|
|
var RegExp;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = RegExp('\\n{2,}$', '');
|
|
const env0_3 = RegExp('(?:^|\\n)( *)$', '');
|
|
RegExp = global.RegExp;
|
|
let value = '(%INDENT_CAPTURE_PATTERN%)((?:[*-]|\\d+\\.)) +'.replace('%INDENT_CAPTURE_PATTERN%', ' *');
|
|
value = '^' + value;
|
|
let regExp = new RegExp(value);
|
|
const env0_5 = RegExp(' *\\n$', '');
|
|
RegExp = global.RegExp;
|
|
regExp = new RegExp('^( *)((?:[*-]|\\d+\\.)) [\\s\\S]+?(?:\\n(?! )(?!\\1(?:[*-]|\\d+\\.) )|$)');
|
|
const env0_7 = RegExp('^[ \\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+$', '');
|
|
object = {};
|
|
copyDataProperties(object, (Module03855).defaultRules.list, undefined);
|
|
object['requiredFirstCharacters'] = ' *-0123456789'.split('');
|
|
object['match'] = match_52564;
|
|
object['parse'] = parse_52565;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/markup/MarkupListRule.tsx');
|
|
exports.default = object;
|
|
function match_52564(a0, a1) { // fn#52564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6822:497, offset: 0x0133093f, size: 136 bytes, params: 3, frame: 15
|
|
var prevCapture;
|
|
var value;
|
|
var value4;
|
|
if (a1.allowList) {
|
|
if (a1._listLevel >= 11) {
|
|
return null;
|
|
}
|
|
prevCapture = a1.prevCapture;
|
|
value = null;
|
|
value4 = env0_3.exec(value == prevCapture ? '' : a1.prevCapture[0]);
|
|
return value == value4 || env0_7.test(value4[0]) ? value : env0_6.exec(a0);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function parse_52565(a0, a1, a2) { // fn#52565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6822:674, offset: 0x013309c7, size: 404 bytes, params: 4, frame: 29
|
|
const env0_0 = a1;
|
|
const env0_1 = a2;
|
|
const property = a0[2];
|
|
let length = property.length;
|
|
const value = length > 1;
|
|
const r2 = value ? global.Math.min(1000000000, global.Math.max(1, Number(property))) : undefined;
|
|
const value5 = 0;
|
|
const value7 = a0[value5].replace(env0_2, '\n');
|
|
const value8 = env0_4.exec(value7);
|
|
length = value8 != null ? value8[value5].length : value5;
|
|
const length2 = value8 != null ? value8[1].length : value5;
|
|
const value11 = '(%INDENT_CAPTURE_PATTERN%)((?:[*-]|\\d+\\.)) +[^\\n]*(?:\\n(?!%INDENT_CAPTURE_PATTERN%(?:[*-]|\\d+\\.) )[^\\n]*)*(\n|$)'.replaceAll('%INDENT_CAPTURE_PATTERN%',
|
|
' {' + length2 + ',' + (length2 + 1) + '}');
|
|
let RegExp = global.RegExp;
|
|
const regExp = new RegExp(value11, 'gm');
|
|
RegExp = global.RegExp;
|
|
const value18 = value7.match(new RegExp('^ {1,' + length + '}', 'gm'));
|
|
(Module00044)(value18 != null, 'markup list items can not be parsed.');
|
|
const object = {ordered: value, start: r2};
|
|
object.items = value18.map(_fun52566);
|
|
return object;
|
|
function _fun52566(a0, a1) { // fn#52566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6822:1181, offset: 0x01330b5b, size: 293 bytes, params: 3, frame: 23
|
|
var environment;
|
|
const replace = a0.replace;
|
|
let value = environment.__proto__;
|
|
const value4 = Reflect.apply(replace, a0, [env1_4, '']).replace(env0_2, '');
|
|
let r7 = value4.indexOf('\n\n') !== -1 || a1 === env0_3.length - 1 && env0_4;
|
|
const inline = importDefault.inline;
|
|
const _list = importDefault._list;
|
|
const _listLevel = importDefault._listLevel;
|
|
importDefault._list = true;
|
|
const value8 = _listLevel != null;
|
|
importDefault._listLevel = (value8 ? _listLevel : 0) + 1;
|
|
if (r7) {
|
|
importDefault.inline = false;
|
|
r7 = value4.replace(env1_5, '\n\n');
|
|
} else {
|
|
importDefault.inline = true;
|
|
r7 = value4.replace(env1_5, '');
|
|
}
|
|
const object = {};
|
|
copyDataProperties(object, importDefault, value8);
|
|
object['allowHeading'] = false;
|
|
value = require(r7, object);
|
|
value = value.map(function(a0) {
|
|
if (a0.type === 'text' && a0.content != null) {
|
|
a0.content = a0.content.replace(RegExp('\\n+\\s*$', ''), '');
|
|
}
|
|
return a0;
|
|
});
|
|
importDefault.inline = inline;
|
|
importDefault._list = _list;
|
|
importDefault._listLevel = _listLevel;
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun52563, 6644, [3855, 44, 2]) /* metro module 6644, dependencies: [3855, 44, 2] */;
|