UNPKG

cloudcmd

Version:

File manager for the web with console and editor

2,022 lines (1,484 loc) 413 kB
(globalThis["webpackChunkcloudcmd"] = globalThis["webpackChunkcloudcmd"] || []).push([[267],{ /***/ 6735 (module) { "use strict"; module.exports = navigator.clipboard || { readText, writeText, }; function readText() { return Promise.reject(); } async function writeText(value) { const el = document.createElement('textarea'); el.value = value; document.body.appendChild(el); el.select(); const is = document.execCommand('copy'); document.body.removeChild(el); if (is) return; return Promise.reject(); } /***/ }, /***/ 407 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; const currify = __webpack_require__(4299); const query = (a) => document.querySelector(`[data-name="${a}"]`); const setAttribute = currify((el, obj, name) => el.setAttribute(name, obj[name])); const set = currify((el, obj, name) => el[name] = obj[name]); const not = currify((f, a) => !f(a)); const isCamelCase = (a) => a != a.toLowerCase(); module.exports = (name, options = {}) => { const { dataName, notAppend, parent = document.body, uniq = true, ...restOptions } = options; const elFound = isElementPresent(dataName); if (uniq && elFound) return elFound; const el = document.createElement(name); if (dataName) el.dataset.name = dataName; Object.keys(restOptions) .filter(isCamelCase) .map(set(el, options)); Object.keys(restOptions) .filter(not(isCamelCase)) .map(setAttribute(el, options)); if (!notAppend) parent.appendChild(el); return el; }; module.exports.isElementPresent = isElementPresent; function isElementPresent(dataName) { if (!dataName) return; return query(dataName); } /***/ }, /***/ 1362 (module) { "use strict"; const identityLoginURL = 'static.olark.com/jsclient/loader.js'; if (!window.olark) { const el = document.createElement('script'); const [script] = document.getElementsByTagName('script'); el.async = 1; el.src = '//' + identityLoginURL; script.parentNode.insertBefore(el, script); const olark = window.olark = (...args) => { k.s.push(args); k.t.push(Number(new Date)); }; /** * @param {?} i * @param {?} src * @return {undefined} */ olark.extend = (i, src) => { olark('extend', i, src); }; /** * @param {string} o * @return {undefined} */ olark.identify = (o) => { olark('identify', k.i = o); }; /** * @param {?} key * @param {?} callback * @return {undefined} */ olark.configure = (key, callback) => { olark('configure', key, callback); k.c[key] = callback; }; const k = olark._ = { s: [], t: [Number(new Date)], c: {}, l: identityLoginURL, }; } module.exports = window.olark; /***/ }, /***/ 7023 (module) { "use strict"; module.exports = (fn, ...a) => { check(fn); return (...b) => { const args = [ ...a, ...b, ]; return fn(...args); }; }; function check(fn) { if (typeof fn !== 'function') throw Error('fn should be function!'); } /***/ }, /***/ 3144 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(6743); var $apply = __webpack_require__(1002); var $call = __webpack_require__(76); var $reflectApply = __webpack_require__(7119); /** @type {import('./actualApply')} */ module.exports = $reflectApply || bind.call($call, $apply); /***/ }, /***/ 2205 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(6743); var $apply = __webpack_require__(1002); var actualApply = __webpack_require__(3144); /** @type {import('./applyBind')} */ module.exports = function applyBind() { return actualApply(bind, $apply, arguments); }; /***/ }, /***/ 1002 (module) { "use strict"; /** @type {import('./functionApply')} */ module.exports = Function.prototype.apply; /***/ }, /***/ 76 (module) { "use strict"; /** @type {import('./functionCall')} */ module.exports = Function.prototype.call; /***/ }, /***/ 3126 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(6743); var $TypeError = __webpack_require__(9675); var $call = __webpack_require__(76); var $actualApply = __webpack_require__(3144); /** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ module.exports = function callBindBasic(args) { if (args.length < 1 || typeof args[0] !== 'function') { throw new $TypeError('a function is required'); } return $actualApply(bind, $call, args); }; /***/ }, /***/ 7119 (module) { "use strict"; /** @type {import('./reflectApply')} */ module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; /***/ }, /***/ 487 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var setFunctionLength = __webpack_require__(6897); var $defineProperty = __webpack_require__(655); var callBindBasic = __webpack_require__(3126); var applyBind = __webpack_require__(2205); module.exports = function callBind(originalFunction) { var func = callBindBasic(arguments); var adjustedLength = 1 + originalFunction.length - (arguments.length - 1); return setFunctionLength( func, adjustedLength > 0 ? adjustedLength : 0, true ); }; if ($defineProperty) { $defineProperty(module.exports, 'apply', { value: applyBind }); } else { module.exports.apply = applyBind; } /***/ }, /***/ 6556 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var GetIntrinsic = __webpack_require__(453); var callBindBasic = __webpack_require__(3126); /** @type {(thisArg: string, searchString: string, position?: number) => number} */ var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]); /** @type {import('.')} */ module.exports = function callBoundIntrinsic(name, allowMissing) { /* eslint no-extra-parens: 0 */ var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing)); if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { return callBindBasic(/** @type {const} */ ([intrinsic])); } return intrinsic; }; /***/ }, /***/ 4299 (module) { "use strict"; const f = (fn) => [ /*eslint no-unused-vars: 0*/ function (a) {return fn(...arguments);}, function (a, b) {return fn(...arguments);}, function (a, b, c) {return fn(...arguments);}, function (a, b, c, d) {return fn(...arguments);}, function (a, b, c, d, e) {return fn(...arguments);}, ]; const currify = (fn, ...args) => { check(fn); if (args.length >= fn.length) return fn(...args); const again = (...args2) => { return currify(fn, ...[...args, ...args2]); }; const count = fn.length - args.length - 1; const func = f(again)[count]; return func || again; }; module.exports = currify; function check(fn) { if (typeof fn !== 'function') throw Error('fn should be function!'); } /***/ }, /***/ 41 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(655); var $SyntaxError = __webpack_require__(8068); var $TypeError = __webpack_require__(9675); var gopd = __webpack_require__(5795); /** @type {import('.')} */ module.exports = function defineDataProperty( obj, property, value ) { if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { throw new $TypeError('`obj` must be an object or a function`'); } if (typeof property !== 'string' && typeof property !== 'symbol') { throw new $TypeError('`property` must be a string or a symbol`'); } if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); } if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); } if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); } if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { throw new $TypeError('`loose`, if provided, must be a boolean'); } var nonEnumerable = arguments.length > 3 ? arguments[3] : null; var nonWritable = arguments.length > 4 ? arguments[4] : null; var nonConfigurable = arguments.length > 5 ? arguments[5] : null; var loose = arguments.length > 6 ? arguments[6] : false; /* @type {false | TypedPropertyDescriptor<unknown>} */ var desc = !!gopd && gopd(obj, property); if ($defineProperty) { $defineProperty(obj, property, { configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, value: value, writable: nonWritable === null && desc ? desc.writable : !nonWritable }); } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable obj[property] = value; // eslint-disable-line no-param-reassign } else { throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); } }; /***/ }, /***/ 9915 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var Emitify = __webpack_require__(8278); module.exports = function (entry) { var emitter = Emitify(); setTimeout(function () { FindIt(emitter, entry); }, 0); return emitter; }; function FindIt(emitter, entry) { if (!(this instanceof FindIt)) return new FindIt(emitter, entry); this._dirs = 0; this._first = true; this._find(emitter, entry); } FindIt.prototype._find = function (emitter, entry) { var _this = this; if (entry.isFile) { emitter.emit('file', entry.fullPath, entry); if (this._first) emitter.emit('end'); return; } if (this._first) this._first = false; emitter.emit('directory', entry.fullPath, entry); ++this._dirs; entry.createReader().readEntries(function (entries) { [].forEach.call(entries, function (entry) { _this._find(emitter, entry); }); --_this._dirs; if (!_this._dirs) emitter.emit('end'); }); }; /***/ }, /***/ 8278 (module, __unused_webpack_exports, __webpack_require__) { module.exports = __webpack_require__(4261); /***/ }, /***/ 4261 (module) { "use strict"; module.exports = Emitify; function Emitify() { if (!(this instanceof Emitify)) return new Emitify(); this._all = {}; } Emitify.prototype.on = function (event, callback) { var funcs = this._all[event]; check(event, callback); if (funcs) funcs.push(callback);else this._all[event] = [callback]; return this; }; Emitify.prototype.addListener = Emitify.prototype.on; Emitify.prototype.once = function (event, callback) { var self = this; check(event, callback); self.on(event, function fn() { callback.apply(null, arguments); self.off(event, fn); }); return this; }; Emitify.prototype.off = function (event, callback) { var events = this._all[event] || []; var index = events.indexOf(callback); check(event, callback); while (~index) { events.splice(index, 1); index = events.indexOf(callback); } return this; }; Emitify.prototype.removeListener = Emitify.prototype.off; Emitify.prototype.emit = function (event) { var args = [].slice.call(arguments, 1); var funcs = this._all[event]; checkEvent(event); if (!funcs && event === 'error') throw args[0]; if (!funcs) return this; funcs.forEach(function (fn) { fn.apply(null, args); }); return this; }; Emitify.prototype.removeAllListeners = function (event) { checkEvent(event); this._all[event] = []; return this; }; function checkEvent(event) { if (typeof event !== 'string') throw Error('event should be string!'); } function checkFn(callback) { if (typeof callback !== 'function') throw Error('callback should be function!'); } function check(event, callback) { checkEvent(event); checkFn(callback); } /***/ }, /***/ 7176 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var callBind = __webpack_require__(3126); var gOPD = __webpack_require__(5795); var hasProtoAccessor; try { // eslint-disable-next-line no-extra-parens, no-proto hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; } catch (e) { if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { throw e; } } // eslint-disable-next-line no-extra-parens var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); var $Object = Object; var $getPrototypeOf = $Object.getPrototypeOf; /** @type {import('./get')} */ module.exports = desc && typeof desc.get === 'function' ? callBind([desc.get]) : typeof $getPrototypeOf === 'function' ? /** @type {import('./get')} */ function getDunder(value) { // eslint-disable-next-line eqeqeq return $getPrototypeOf(value == null ? value : $Object(value)); } : false; /***/ }, /***/ 7411 (module) { "use strict"; module.exports = Emitify; function Emitify() { if (!(this instanceof Emitify)) return new Emitify(); this._all = {}; } Emitify.prototype.on = function(event, callback) { const funcs = this._all[event]; check(event, callback); if (funcs) funcs.push(callback); else this._all[event] = [callback]; return this; }; Emitify.prototype.addListener = Emitify.prototype.on; Emitify.prototype.once = function(event, callback) { const self = this; check(event, callback); this.on(event, function fn(...args) { callback(...args); self.off(event, fn); }); return this; }; Emitify.prototype.off = function(event, callback) { const events = this._all[event] || []; let index = events.indexOf(callback); check(event, callback); while (~index) { events.splice(index, 1); index = events.indexOf(callback); } return this; }; Emitify.prototype.removeListener = Emitify.prototype.off; Emitify.prototype.emit = function(event, ...args) { const funcs = this._all[event]; checkEvent(event); if (!funcs && event === 'error') throw args[0]; if (!funcs) return this; for (const fn of funcs) { fn(...args); } return this; }; Emitify.prototype.removeAllListeners = function(event) { checkEvent(event); this._all[event] = []; return this; }; function checkEvent(event) { if (typeof event !== 'string') throw Error('event should be string!'); } function checkFn(callback) { if (typeof callback !== 'function') throw Error('callback should be function!'); } function check(event, callback) { checkEvent(event); checkFn(callback); } /***/ }, /***/ 655 (module) { "use strict"; /** @type {import('.')} */ var $defineProperty = Object.defineProperty || false; if ($defineProperty) { try { $defineProperty({}, 'a', { value: 1 }); } catch (e) { // IE 8 has a broken defineProperty $defineProperty = false; } } module.exports = $defineProperty; /***/ }, /***/ 1237 (module) { "use strict"; /** @type {import('./eval')} */ module.exports = EvalError; /***/ }, /***/ 9383 (module) { "use strict"; /** @type {import('.')} */ module.exports = Error; /***/ }, /***/ 9290 (module) { "use strict"; /** @type {import('./range')} */ module.exports = RangeError; /***/ }, /***/ 9538 (module) { "use strict"; /** @type {import('./ref')} */ module.exports = ReferenceError; /***/ }, /***/ 8068 (module) { "use strict"; /** @type {import('./syntax')} */ module.exports = SyntaxError; /***/ }, /***/ 9675 (module) { "use strict"; /** @type {import('./type')} */ module.exports = TypeError; /***/ }, /***/ 5345 (module) { "use strict"; /** @type {import('./uri')} */ module.exports = URIError; /***/ }, /***/ 9612 (module) { "use strict"; /** @type {import('.')} */ module.exports = Object; /***/ }, /***/ 9168 (module) { (function(global) { 'use strict'; if ( true && module.exports) module.exports = new ExecProto(); else global.exec = new ExecProto(); function ExecProto() { var slice = Array.prototype.slice, /** * function do save exec of function * @param callback * @param arg1 * ... * @param argN */ exec = function(callback) { var ret, isFunc = typeof callback === 'function', args = slice.call(arguments, 1); if (isFunc) ret = callback.apply(null, args); return ret; }; /* * return function that calls callback with arguments */ exec.with = function(callback) { var slice = Array.prototype.slice, args = slice.call(arguments, 1); return function() { var array = slice.call(arguments), all = args.concat(array); return callback.apply(null, all); }; }; /** * return save exec function * @param callback */ exec.ret = function() { var result, args = slice.call(arguments); args.unshift(exec); result = exec.with.apply(null, args); return result; }; /** * function do conditional save exec of function * @param condition * @param callback * @param func */ exec.if = function(condition, callback, func) { var ret; if (condition) exec(callback); else exec(func, callback); return ret; }; /** * exec function if it exist in object * * @param obj * @param name * @param arg */ exec.ifExist = function(obj, name, arg) { var ret, func = obj && obj[name]; if (func) func = func.apply(obj, arg); return ret; }; exec.parallel = function(funcs, callback) { var ERROR = 'could not be empty!', keys = [], callbackWas = false, arr = [], obj = {}, count = 0, countFuncs = 0, type = getType(funcs); if (!funcs) throw Error('funcs ' + ERROR); if (!callback) throw Error('callback ' + ERROR); switch(type) { case 'array': countFuncs = funcs.length; funcs.forEach(function(func, num) { exec(func, function() { checkFunc(num, arguments); }); }); break; case 'object': keys = Object.keys(funcs); countFuncs = keys.length; keys.forEach(function(name) { var func = funcs[name]; exec(func, function() { checkFunc(name, arguments, obj); }); }); break; } function checkFunc(num, data) { var args = slice.call(data, 1), isLast = false, error = data[0], length = args.length; ++count; isLast = count === countFuncs; if (!error) if (length >= 2) arr[num] = args; else arr[num] = args[0]; if (!callbackWas && (error || isLast)) { callbackWas = true; if (type === 'array') callback.apply(null, [error].concat(arr)); else callback(error, arr); } } }; /** * load functions thrue callbacks one-by-one * @param funcs {Array} - array of functions */ exec.series = function(funcs, callback) { var fn, i = funcs.length, check = function(error) { var done; --i; if (!i || error) { done = true; exec(callback, error); } return done; }; if (!Array.isArray(funcs)) throw Error('funcs should be array!'); fn = funcs.shift(); exec(fn, function(error) { if (!check(error)) exec.series(funcs, callback); }); }; exec.each = function(array, iterator, callback) { var listeners = array.map(function(item) { return iterator.bind(null, item); }); if (!listeners.length) callback(); else exec.parallel(listeners, callback); }; exec.eachSeries = function(array, iterator, callback) { var listeners = array.map(function(item) { return iterator.bind(null, item); }); if (typeof callback !== 'function') throw Error('callback should be function'); if (!listeners.length) callback(); else exec.series(listeners, callback); }; /** * function execute param function in * try...catch block * * @param callback */ exec.try = function(callback) { var ret; try { ret = callback(); } catch(error) { ret = error; } return ret; }; function getType(variable) { var regExp = new RegExp('\\s([a-zA-Z]+)'), str = {}.toString.call(variable), typeBig = str.match(regExp)[1], result = typeBig.toLowerCase(); return result; } return exec; } })(this); /***/ }, /***/ 5291 (module) { "use strict"; const setValue = (fn, obj) => (key) => fn(key, obj[key]); module.exports = (fn, obj) => { Object .keys(obj) .forEach(setValue(fn, obj)); }; /***/ }, /***/ 2682 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var isCallable = __webpack_require__(9600); var toStr = Object.prototype.toString; var hasOwnProperty = Object.prototype.hasOwnProperty; /** @type {<This, A extends readonly unknown[]>(arr: A, iterator: (this: This | void, value: A[number], index: number, arr: A) => void, receiver: This | undefined) => void} */ var forEachArray = function forEachArray(array, iterator, receiver) { for (var i = 0, len = array.length; i < len; i++) { if (hasOwnProperty.call(array, i)) { if (receiver == null) { iterator(array[i], i, array); } else { iterator.call(receiver, array[i], i, array); } } } }; /** @type {<This, S extends string>(string: S, iterator: (this: This | void, value: S[number], index: number, string: S) => void, receiver: This | undefined) => void} */ var forEachString = function forEachString(string, iterator, receiver) { for (var i = 0, len = string.length; i < len; i++) { // no such thing as a sparse string. if (receiver == null) { iterator(string.charAt(i), i, string); } else { iterator.call(receiver, string.charAt(i), i, string); } } }; /** @type {<This, O>(obj: O, iterator: (this: This | void, value: O[keyof O], index: keyof O, obj: O) => void, receiver: This | undefined) => void} */ var forEachObject = function forEachObject(object, iterator, receiver) { for (var k in object) { if (hasOwnProperty.call(object, k)) { if (receiver == null) { iterator(object[k], k, object); } else { iterator.call(receiver, object[k], k, object); } } } }; /** @type {(x: unknown) => x is readonly unknown[]} */ function isArray(x) { return toStr.call(x) === '[object Array]'; } /** @type {import('.')._internal} */ module.exports = function forEach(list, iterator, thisArg) { if (!isCallable(iterator)) { throw new TypeError('iterator must be a function'); } var receiver; if (arguments.length >= 3) { receiver = thisArg; } if (isArray(list)) { forEachArray(list, iterator, receiver); } else if (typeof list === 'string') { forEachString(list, iterator, receiver); } else { forEachObject(list, iterator, receiver); } }; /***/ }, /***/ 1730 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; module.exports.addSlashToEnd = (path) => { if (!path) throw Error('path could not be empty!'); const length = path.length - 1; const isSlash = path[length] === '/'; if (isSlash) return path; return `${path}/`; }; /** Функция получает короткие размеры * конвертируя байт в килобайты, мегабойты, * гигайбайты и терабайты * @pSize - размер в байтах */ module.exports.size = (size) => { const isNumber = typeof size === 'number'; const l1KB = 1024; const l1MB = l1KB * l1KB; const l1GB = l1MB * l1KB; const l1TB = l1GB * l1KB; const l1PB = l1TB * l1KB; if (!isNumber) return size; if (size < l1KB) return size + 'b'; if (size < l1MB) return (size / l1KB).toFixed(2) + 'kb'; if (size < l1GB) return (size / l1MB).toFixed(2) + 'mb'; if (size < l1TB) return (size / l1GB).toFixed(2) + 'gb'; if (size < l1PB) return (size / l1TB).toFixed(2) + 'tb'; return (size / l1PB).toFixed(2) + 'pb'; }; module.exports.permissions = __webpack_require__(2234); /***/ }, /***/ 2234 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; const currify = __webpack_require__(4299); /* S_IRUSR 0000400 protection: readable by owner S_IWUSR 0000200 writable by owner S_IXUSR 0000100 executable by owner S_IRGRP 0000040 readable by group S_IWGRP 0000020 writable by group S_IXGRP 0000010 executable by group S_IROTH 0000004 readable by all S_IWOTH 0000002 writable by all S_IXOTH 0000001 executable by all */ const R = { name: 'r', value: 4, }; const W = { name: 'w', value: 2, }; const X = { name: 'x', value: 1, }; const getModeName = currify((value, m) => { if (value & m.value) return m.name; return '-'; }); const toStrMode = currify((fn, value) => { return [R, W, X] .map(fn(value)) .join(''); }); /** * Функция переводит права из цыфрового вида в символьный * @param perms - строка с правами доступа * к файлу в 8-миричной системе */ module.exports.symbolic = (perms) => { let permissions = ''; const is = typeof perms !== 'undefined'; if (!is) return permissions; const permsStr = perms.slice(-3); /* Переводим в двоичную систему */ const owner = Number(permsStr[0]).toString(2); const group = Number(permsStr[1]).toString(2); const all = Number(permsStr[2]).toString(2); const allPermissions = [ owner, group, all, ]; return allPermissions .map(toStrMode(getModeName)) .join(' '); }; /** * Функция конвертирует права доступа к файлам из символьного вида * в цыфровой */ module.exports.numeric = (perms) => { const length = perms && perms.length === 11; if (!length) throw Error('permissions should be in format "xxx xxx xxx"'); const R = 4; const W = 2; const X = 1; const N = 0; const owner = (perms[0] === 'r' ? R : N) + (perms[1] === 'w' ? W : N) + (perms[2] === 'x' ? X : N); const group = (perms[4] === 'r' ? R : N) + (perms[5] === 'w' ? W : N) + (perms[6] === 'x' ? X : N); const all = (perms[8] === 'r' ? R : N) + (perms[9] === 'w' ? W : N) + (perms[10] === 'x' ? X : N); /* добавляем 2 цифры до 5 */ return '00' + owner + group + all; }; /***/ }, /***/ 9353 (module) { "use strict"; /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; var toStr = Object.prototype.toString; var max = Math.max; var funcType = '[object Function]'; var concatty = function concatty(a, b) { var arr = []; for (var i = 0; i < a.length; i += 1) { arr[i] = a[i]; } for (var j = 0; j < b.length; j += 1) { arr[j + a.length] = b[j]; } return arr; }; var slicy = function slicy(arrLike, offset) { var arr = []; for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { arr[j] = arrLike[i]; } return arr; }; var joiny = function (arr, joiner) { var str = ''; for (var i = 0; i < arr.length; i += 1) { str += arr[i]; if (i + 1 < arr.length) { str += joiner; } } return str; }; module.exports = function bind(that) { var target = this; if (typeof target !== 'function' || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } var args = slicy(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; } return target.apply( that, concatty(args, arguments) ); }; var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { boundArgs[i] = '$' + i; } bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); if (target.prototype) { var Empty = function Empty() {}; Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; /***/ }, /***/ 6743 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var implementation = __webpack_require__(9353); module.exports = Function.prototype.bind || implementation; /***/ }, /***/ 4233 (module) { "use strict"; // eslint-disable-next-line no-extra-parens, no-empty-function const cached = /** @type {GeneratorFunctionConstructor} */ (function* () {}.constructor); /** @type {import('.')} */ module.exports = () => cached; /***/ }, /***/ 453 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var undefined; var $Object = __webpack_require__(9612); var $Error = __webpack_require__(9383); var $EvalError = __webpack_require__(1237); var $RangeError = __webpack_require__(9290); var $ReferenceError = __webpack_require__(9538); var $SyntaxError = __webpack_require__(8068); var $TypeError = __webpack_require__(9675); var $URIError = __webpack_require__(5345); var abs = __webpack_require__(1514); var floor = __webpack_require__(8968); var max = __webpack_require__(6188); var min = __webpack_require__(8002); var pow = __webpack_require__(5880); var round = __webpack_require__(414); var sign = __webpack_require__(3093); var $Function = Function; // eslint-disable-next-line consistent-return var getEvalledConstructor = function (expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); } catch (e) {} }; var $gOPD = __webpack_require__(5795); var $defineProperty = __webpack_require__(655); var throwTypeError = function () { throw new $TypeError(); }; var ThrowTypeError = $gOPD ? (function () { try { // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties arguments.callee; // IE 8 does not throw here return throwTypeError; } catch (calleeThrows) { try { // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') return $gOPD(arguments, 'callee').get; } catch (gOPDthrows) { return throwTypeError; } } }()) : throwTypeError; var hasSymbols = __webpack_require__(4039)(); var getProto = __webpack_require__(3628); var $ObjectGPO = __webpack_require__(1064); var $ReflectGPO = __webpack_require__(8648); var $apply = __webpack_require__(1002); var $call = __webpack_require__(76); var needsEval = {}; var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); var INTRINSICS = { __proto__: null, '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, '%Array%': Array, '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, '%AsyncFromSyncIteratorPrototype%': undefined, '%AsyncFunction%': needsEval, '%AsyncGenerator%': needsEval, '%AsyncGeneratorFunction%': needsEval, '%AsyncIteratorPrototype%': needsEval, '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, '%Boolean%': Boolean, '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, '%Date%': Date, '%decodeURI%': decodeURI, '%decodeURIComponent%': decodeURIComponent, '%encodeURI%': encodeURI, '%encodeURIComponent%': encodeURIComponent, '%Error%': $Error, '%eval%': eval, // eslint-disable-line no-eval '%EvalError%': $EvalError, '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, '%Function%': $Function, '%GeneratorFunction%': needsEval, '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, '%isFinite%': isFinite, '%isNaN%': isNaN, '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, '%JSON%': typeof JSON === 'object' ? JSON : undefined, '%Map%': typeof Map === 'undefined' ? undefined : Map, '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), '%Math%': Math, '%Number%': Number, '%Object%': $Object, '%Object.getOwnPropertyDescriptor%': $gOPD, '%parseFloat%': parseFloat, '%parseInt%': parseInt, '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, '%RangeError%': $RangeError, '%ReferenceError%': $ReferenceError, '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, '%RegExp%': RegExp, '%Set%': typeof Set === 'undefined' ? undefined : Set, '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, '%String%': String, '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, '%Symbol%': hasSymbols ? Symbol : undefined, '%SyntaxError%': $SyntaxError, '%ThrowTypeError%': ThrowTypeError, '%TypedArray%': TypedArray, '%TypeError%': $TypeError, '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, '%URIError%': $URIError, '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, '%Function.prototype.call%': $call, '%Function.prototype.apply%': $apply, '%Object.defineProperty%': $defineProperty, '%Object.getPrototypeOf%': $ObjectGPO, '%Math.abs%': abs, '%Math.floor%': floor, '%Math.max%': max, '%Math.min%': min, '%Math.pow%': pow, '%Math.round%': round, '%Math.sign%': sign, '%Reflect.getPrototypeOf%': $ReflectGPO }; if (getProto) { try { null.error; // eslint-disable-line no-unused-expressions } catch (e) { // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 var errorProto = getProto(getProto(e)); INTRINSICS['%Error.prototype%'] = errorProto; } } var doEval = function doEval(name) { var value; if (name === '%AsyncFunction%') { value = getEvalledConstructor('async function () {}'); } else if (name === '%GeneratorFunction%') { value = getEvalledConstructor('function* () {}'); } else if (name === '%AsyncGeneratorFunction%') { value = getEvalledConstructor('async function* () {}'); } else if (name === '%AsyncGenerator%') { var fn = doEval('%AsyncGeneratorFunction%'); if (fn) { value = fn.prototype; } } else if (name === '%AsyncIteratorPrototype%') { var gen = doEval('%AsyncGenerator%'); if (gen && getProto) { value = getProto(gen.prototype); } } INTRINSICS[name] = value; return value; }; var LEGACY_ALIASES = { __proto__: null, '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], '%ArrayPrototype%': ['Array', 'prototype'], '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], '%ArrayProto_values%': ['Array', 'prototype', 'values'], '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], '%BooleanPrototype%': ['Boolean', 'prototype'], '%DataViewPrototype%': ['DataView', 'prototype'], '%DatePrototype%': ['Date', 'prototype'], '%ErrorPrototype%': ['Error', 'prototype'], '%EvalErrorPrototype%': ['EvalError', 'prototype'], '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], '%FunctionPrototype%': ['Function', 'prototype'], '%Generator%': ['GeneratorFunction', 'prototype'], '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], '%JSONParse%': ['JSON', 'parse'], '%JSONStringify%': ['JSON', 'stringify'], '%MapPrototype%': ['Map', 'prototype'], '%NumberPrototype%': ['Number', 'prototype'], '%ObjectPrototype%': ['Object', 'prototype'], '%ObjProto_toString%': ['Object', 'prototype', 'toString'], '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], '%PromisePrototype%': ['Promise', 'prototype'], '%PromiseProto_then%': ['Promise', 'prototype', 'then'], '%Promise_all%': ['Promise', 'all'], '%Promise_reject%': ['Promise', 'reject'], '%Promise_resolve%': ['Promise', 'resolve'], '%RangeErrorPrototype%': ['RangeError', 'prototype'], '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], '%RegExpPrototype%': ['RegExp', 'prototype'], '%SetPrototype%': ['Set', 'prototype'], '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], '%StringPrototype%': ['String', 'prototype'], '%SymbolPrototype%': ['Symbol', 'prototype'], '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], '%TypedArrayPrototype%': ['TypedArray', 'prototype'], '%TypeErrorPrototype%': ['TypeError', 'prototype'], '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], '%URIErrorPrototype%': ['URIError', 'prototype'], '%WeakMapPrototype%': ['WeakMap', 'prototype'], '%WeakSetPrototype%': ['WeakSet', 'prototype'] }; var bind = __webpack_require__(6743); var hasOwn = __webpack_require__(9957); var $concat = bind.call($call, Array.prototype.concat); var $spliceApply = bind.call($apply, Array.prototype.splice); var $replace = bind.call($call, String.prototype.replace); var $strSlice = bind.call($call, String.prototype.slice); var $exec = bind.call($call, RegExp.prototype.exec); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); if (first === '%' && last !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); } else if (last === '%' && first !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); } var result = []; $replace(string, rePropName, function (match, number, quote, subString) { result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; }); return result; }; /* end adaptation */ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { var intrinsicName = name; var alias; if (hasOwn(LEGACY_ALIASES, intrinsicName)) { alias = LEGACY_ALIASES[intrinsicName]; intrinsicName = '%' + alias[0] + '%'; } if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; if (value === needsEval) { value = doEval(intrinsicName); } if (typeof value === 'undefined' && !allowMissing) { throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); } return { alias: alias, name: intrinsicName, value: value }; } throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); }; module.exports = function GetIntrinsic(name, allowMissing) { if (typeof name !== 'string' || name.length === 0) { throw new $TypeError('intrinsic name must be a non-empty string'); } if (arguments.length > 1 && typeof allowMissing !== 'boolean') { throw new $TypeError('"allowMissing" argument must be a boolean'); } if ($exec(/^%?[^%]*%?$/, name) === null) { throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); } var parts = stringToPath(name); var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); var intrinsicRealName = intrinsic.name; var value = intrinsic.value; var skipFurtherCaching = false; var alias = intrinsic.alias; if (alias) { intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ( ( (first === '"' || first === "'" || first === '`') || (last === '"' || last === "'" || last === '`') ) && first !== last ) { throw new $SyntaxError('property names with quotes must have matching quotes'); } if (part === 'constructor' || !isOwn) { skipFurtherCaching = true; } intrinsicBaseName += '.' + part; intrinsicRealName = '%' + intrinsicBaseName + '%'; if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { if (!(part in value)) { if (!allowMissing) { throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); } return void undefined; } if ($gOPD && (i + 1) >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; // By convention, when a data property is converted to an accessor // property to emulate a data property that does not suffer from // the override mistake, that accessor's getter is marked with // an `originalValue` property. Here, when we detect this, we // uphold the illusion by pretending to see that original data // property, i.e., returning the value rather than the getter // itself. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { value = desc.get; } else { value = value[part]; } } else { isOwn = hasOwn(value, part); value = value[part]; } if (isOwn && !skipFurtherCaching) { INTRINSICS[intrinsicRealName] = value; } } } return value; }; /***/ }, /***/ 1064 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $Object = __webpack_require__(9612); /** @type {import('./Object.getPrototypeOf')} */ module.exports = $Object.getPrototypeOf || null; /***/ }, /***/ 8648 (module) { "use strict"; /** @type {import('./Reflect.getPrototypeOf')} */ module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; /***/ }, /***/ 3628 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var reflectGetProto = __webpack_require__(8648); var originalGetProto = __webpack_require__(1064); var getDunderProto = __webpack_require__(7176); /** @type {import('.')} */ module.exports = reflectGetProto ? function getProto(O) { // @ts-expect-error TS can't narrow inside a closure, for some reason return reflectGetProto(O); } : originalGetProto ? function getProto(O) { if (!O || (typeof O !== 'object' && typeof O !== 'function')) { throw new TypeError('getProto: not an object'); } // @ts-expect-error TS can't narrow inside a closure, for some reason return originalGetProto(O); } : getDunderProto ? function getProto(O) { // @ts-expect-error TS can't narrow inside a closure, for some reason return getDunderProto(O); } : null; /***/ }, /***/ 6549 (module) { "use strict"; /** @type {import('./gOPD')} */ module.exports = Object.getOwnPropertyDescriptor; /***/ }, /***/ 5795 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; /** @type {import('.')} */ var $gOPD = __webpack_require__(6549); if ($gOPD) { try { $gOPD([], 'length'); } catch (e) { // IE 8 has a broken gOPD $gOPD = null; } } module.exports = $gOPD; /***/ }, /***/ 592 (module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(655); var hasPropertyDescriptors = function hasPropertyDescriptors() { return !!$defineProperty; }; hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { // node v0.6 has a bug where array lengths can be Set but not Defined if (!$defineProperty) { return null; } try { return $defineProperty([], 'length', { value: 1 }).length !== 1; } catch (e) { // In Firefox 4-22, defining length on an array throws an exception. return true; } }; module.exports = hasPropertyDescriptors; /***/ }, /***/ 4039 (module, __unused_webpack_exports, __we