@webwriter/slides
Version:
Present content as a sequence of slides or tabs.
1,326 lines (1,325 loc) • 1.6 MB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
var __typeError = (msg2) => {
throw TypeError(msg2);
};
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __require = /* @__PURE__ */ ((x3) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x3, {
get: (a5, b4) => (typeof require !== "undefined" ? require : a5)[b4]
}) : x3)(function(x3) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x3 + '" is not supported');
});
var __glob = (map) => (path) => {
var fn = map[path];
if (fn) return fn();
throw new Error("Module not found in bundle: " + path);
};
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require2() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
var __runInitializers = (array, flags, self2, value) => {
for (var i9 = 0, fns = array[flags >> 1], n11 = fns && fns.length; i9 < n11; i9++) flags & 1 ? fns[i9].call(self2) : value = fns[i9].call(self2, value);
return value;
};
var __decorateElement = (array, flags, name, decorators, target, extra) => {
var fn, it2, done, ctx, access, k3 = flags & 7, s6 = !!(flags & 8), p4 = !!(flags & 16);
var j3 = k3 > 3 ? array.length + 1 : k3 ? s6 ? 1 : 2 : 0, key = __decoratorStrings[k3 + 5];
var initializers = k3 > 3 && (array[j3 - 1] = []), extraInitializers = array[j3] || (array[j3] = []);
var desc = k3 && (!p4 && !s6 && (target = target.prototype), k3 < 5 && (k3 > 3 || !p4) && __getOwnPropDesc(k3 < 4 ? target : { get [name]() {
return __privateGet(this, extra);
}, set [name](x3) {
return __privateSet(this, extra, x3);
} }, name));
k3 ? p4 && k3 < 4 && __name(extra, (k3 > 2 ? "set " : k3 > 1 ? "get " : "") + name) : __name(target, name);
for (var i9 = decorators.length - 1; i9 >= 0; i9--) {
ctx = __decoratorContext(k3, name, done = {}, array[3], extraInitializers);
if (k3) {
ctx.static = s6, ctx.private = p4, access = ctx.access = { has: p4 ? (x3) => __privateIn(target, x3) : (x3) => name in x3 };
if (k3 ^ 3) access.get = p4 ? (x3) => (k3 ^ 1 ? __privateGet : __privateMethod)(x3, target, k3 ^ 4 ? extra : desc.get) : (x3) => x3[name];
if (k3 > 2) access.set = p4 ? (x3, y4) => __privateSet(x3, target, y4, k3 ^ 4 ? extra : desc.set) : (x3, y4) => x3[name] = y4;
}
it2 = (0, decorators[i9])(k3 ? k3 < 4 ? p4 ? extra : desc[key] : k3 > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
if (k3 ^ 4 || it2 === void 0) __expectFn(it2) && (k3 > 4 ? initializers.unshift(it2) : k3 ? p4 ? extra = it2 : desc[key] = it2 : target = it2);
else if (typeof it2 !== "object" || it2 === null) __typeError("Object expected");
else __expectFn(fn = it2.get) && (desc.get = fn), __expectFn(fn = it2.set) && (desc.set = fn), __expectFn(fn = it2.init) && initializers.unshift(fn);
}
return k3 || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p4 ? k3 ^ 4 ? extra : desc : target;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __accessCheck = (obj, member, msg2) => member.has(obj) || __typeError("Cannot " + msg2);
var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
// node_modules/mocha/mocha.js
var require_mocha = __commonJS({
"node_modules/mocha/mocha.js"(exports, module) {
(function(global2, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.mocha = factory());
})(exports, function() {
"use strict";
var global$2 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
var global$1 = typeof global$2 !== "undefined" ? global$2 : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
function defaultSetTimout$1() {
throw new Error("setTimeout has not been defined");
}
function defaultClearTimeout$1() {
throw new Error("clearTimeout has not been defined");
}
var cachedSetTimeout$1 = defaultSetTimout$1;
var cachedClearTimeout$1 = defaultClearTimeout$1;
if (typeof global$1.setTimeout === "function") {
cachedSetTimeout$1 = setTimeout;
}
if (typeof global$1.clearTimeout === "function") {
cachedClearTimeout$1 = clearTimeout;
}
function runTimeout$1(fun) {
if (cachedSetTimeout$1 === setTimeout) {
return setTimeout(fun, 0);
}
if ((cachedSetTimeout$1 === defaultSetTimout$1 || !cachedSetTimeout$1) && setTimeout) {
cachedSetTimeout$1 = setTimeout;
return setTimeout(fun, 0);
}
try {
return cachedSetTimeout$1(fun, 0);
} catch (e13) {
try {
return cachedSetTimeout$1.call(null, fun, 0);
} catch (e14) {
return cachedSetTimeout$1.call(this, fun, 0);
}
}
}
function runClearTimeout$1(marker) {
if (cachedClearTimeout$1 === clearTimeout) {
return clearTimeout(marker);
}
if ((cachedClearTimeout$1 === defaultClearTimeout$1 || !cachedClearTimeout$1) && clearTimeout) {
cachedClearTimeout$1 = clearTimeout;
return clearTimeout(marker);
}
try {
return cachedClearTimeout$1(marker);
} catch (e13) {
try {
return cachedClearTimeout$1.call(null, marker);
} catch (e14) {
return cachedClearTimeout$1.call(this, marker);
}
}
}
var queue$1 = [];
var draining$1 = false;
var currentQueue$1;
var queueIndex$1 = -1;
function cleanUpNextTick$1() {
if (!draining$1 || !currentQueue$1) {
return;
}
draining$1 = false;
if (currentQueue$1.length) {
queue$1 = currentQueue$1.concat(queue$1);
} else {
queueIndex$1 = -1;
}
if (queue$1.length) {
drainQueue$1();
}
}
function drainQueue$1() {
if (draining$1) {
return;
}
var timeout2 = runTimeout$1(cleanUpNextTick$1);
draining$1 = true;
var len = queue$1.length;
while (len) {
currentQueue$1 = queue$1;
queue$1 = [];
while (++queueIndex$1 < len) {
if (currentQueue$1) {
currentQueue$1[queueIndex$1].run();
}
}
queueIndex$1 = -1;
len = queue$1.length;
}
currentQueue$1 = null;
draining$1 = false;
runClearTimeout$1(timeout2);
}
function nextTick$1(fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i9 = 1; i9 < arguments.length; i9++) {
args[i9 - 1] = arguments[i9];
}
}
queue$1.push(new Item$1(fun, args));
if (queue$1.length === 1 && !draining$1) {
runTimeout$1(drainQueue$1);
}
}
function Item$1(fun, array2) {
this.fun = fun;
this.array = array2;
}
Item$1.prototype.run = function() {
this.fun.apply(null, this.array);
};
var title$1 = "browser";
var platform$1 = "browser";
var browser$4 = true;
var env$1 = {};
var argv$1 = [];
var version$2 = "";
var versions$1 = {};
var release$1 = {};
var config$1 = {};
function noop$1() {
}
var on$1 = noop$1;
var addListener$1 = noop$1;
var once$1 = noop$1;
var off$1 = noop$1;
var removeListener$1 = noop$1;
var removeAllListeners$1 = noop$1;
var emit$1 = noop$1;
function binding$1(name2) {
throw new Error("process.binding is not supported");
}
function cwd$1() {
return "/";
}
function chdir$1(dir) {
throw new Error("process.chdir is not supported");
}
function umask$1() {
return 0;
}
var performance$1 = global$1.performance || {};
var performanceNow$1 = performance$1.now || performance$1.mozNow || performance$1.msNow || performance$1.oNow || performance$1.webkitNow || function() {
return (/* @__PURE__ */ new Date()).getTime();
};
function hrtime$1(previousTimestamp) {
var clocktime = performanceNow$1.call(performance$1) * 1e-3;
var seconds = Math.floor(clocktime);
var nanoseconds = Math.floor(clocktime % 1 * 1e9);
if (previousTimestamp) {
seconds = seconds - previousTimestamp[0];
nanoseconds = nanoseconds - previousTimestamp[1];
if (nanoseconds < 0) {
seconds--;
nanoseconds += 1e9;
}
}
return [seconds, nanoseconds];
}
var startTime$1 = /* @__PURE__ */ new Date();
function uptime$1() {
var currentTime = /* @__PURE__ */ new Date();
var dif = currentTime - startTime$1;
return dif / 1e3;
}
var process2 = {
nextTick: nextTick$1,
title: title$1,
browser: browser$4,
env: env$1,
argv: argv$1,
version: version$2,
versions: versions$1,
on: on$1,
addListener: addListener$1,
once: once$1,
off: off$1,
removeListener: removeListener$1,
removeAllListeners: removeAllListeners$1,
emit: emit$1,
binding: binding$1,
cwd: cwd$1,
chdir: chdir$1,
umask: umask$1,
hrtime: hrtime$1,
platform: platform$1,
release: release$1,
config: config$1,
uptime: uptime$1
};
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getAugmentedNamespace(n11) {
if (n11.__esModule) return n11;
var a5 = Object.defineProperty({}, "__esModule", { value: true });
Object.keys(n11).forEach(function(k3) {
var d5 = Object.getOwnPropertyDescriptor(n11, k3);
Object.defineProperty(a5, k3, d5.get ? d5 : {
enumerable: true,
get: function() {
return n11[k3];
}
});
});
return a5;
}
function commonjsRequire(path) {
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var domain;
function EventHandlers() {
}
EventHandlers.prototype = /* @__PURE__ */ Object.create(null);
function EventEmitter$2() {
EventEmitter$2.init.call(this);
}
EventEmitter$2.EventEmitter = EventEmitter$2;
EventEmitter$2.usingDomains = false;
EventEmitter$2.prototype.domain = void 0;
EventEmitter$2.prototype._events = void 0;
EventEmitter$2.prototype._maxListeners = void 0;
EventEmitter$2.defaultMaxListeners = 10;
EventEmitter$2.init = function() {
this.domain = null;
if (EventEmitter$2.usingDomains) {
if (domain.active) ;
}
if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
this._events = new EventHandlers();
this._eventsCount = 0;
}
this._maxListeners = this._maxListeners || void 0;
};
EventEmitter$2.prototype.setMaxListeners = function setMaxListeners(n11) {
if (typeof n11 !== "number" || n11 < 0 || isNaN(n11))
throw new TypeError('"n" argument must be a positive number');
this._maxListeners = n11;
return this;
};
function $getMaxListeners(that) {
if (that._maxListeners === void 0)
return EventEmitter$2.defaultMaxListeners;
return that._maxListeners;
}
EventEmitter$2.prototype.getMaxListeners = function getMaxListeners() {
return $getMaxListeners(this);
};
function emitNone(handler, isFn, self2) {
if (isFn)
handler.call(self2);
else {
var len = handler.length;
var listeners = arrayClone(handler, len);
for (var i9 = 0; i9 < len; ++i9)
listeners[i9].call(self2);
}
}
function emitOne(handler, isFn, self2, arg1) {
if (isFn)
handler.call(self2, arg1);
else {
var len = handler.length;
var listeners = arrayClone(handler, len);
for (var i9 = 0; i9 < len; ++i9)
listeners[i9].call(self2, arg1);
}
}
function emitTwo(handler, isFn, self2, arg1, arg2) {
if (isFn)
handler.call(self2, arg1, arg2);
else {
var len = handler.length;
var listeners = arrayClone(handler, len);
for (var i9 = 0; i9 < len; ++i9)
listeners[i9].call(self2, arg1, arg2);
}
}
function emitThree(handler, isFn, self2, arg1, arg2, arg3) {
if (isFn)
handler.call(self2, arg1, arg2, arg3);
else {
var len = handler.length;
var listeners = arrayClone(handler, len);
for (var i9 = 0; i9 < len; ++i9)
listeners[i9].call(self2, arg1, arg2, arg3);
}
}
function emitMany(handler, isFn, self2, args) {
if (isFn)
handler.apply(self2, args);
else {
var len = handler.length;
var listeners = arrayClone(handler, len);
for (var i9 = 0; i9 < len; ++i9)
listeners[i9].apply(self2, args);
}
}
EventEmitter$2.prototype.emit = function emit2(type3) {
var er, handler, len, args, i9, events, domain2;
var doError = type3 === "error";
events = this._events;
if (events)
doError = doError && events.error == null;
else if (!doError)
return false;
domain2 = this.domain;
if (doError) {
er = arguments[1];
if (domain2) {
if (!er)
er = new Error('Uncaught, unspecified "error" event');
er.domainEmitter = this;
er.domain = domain2;
er.domainThrown = false;
domain2.emit("error", er);
} else if (er instanceof Error) {
throw er;
} else {
var err = new Error('Uncaught, unspecified "error" event. (' + er + ")");
err.context = er;
throw err;
}
return false;
}
handler = events[type3];
if (!handler)
return false;
var isFn = typeof handler === "function";
len = arguments.length;
switch (len) {
// fast cases
case 1:
emitNone(handler, isFn, this);
break;
case 2:
emitOne(handler, isFn, this, arguments[1]);
break;
case 3:
emitTwo(handler, isFn, this, arguments[1], arguments[2]);
break;
case 4:
emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);
break;
// slower
default:
args = new Array(len - 1);
for (i9 = 1; i9 < len; i9++)
args[i9 - 1] = arguments[i9];
emitMany(handler, isFn, this, args);
}
return true;
};
function _addListener(target, type3, listener, prepend) {
var m5;
var events;
var existing;
if (typeof listener !== "function")
throw new TypeError('"listener" argument must be a function');
events = target._events;
if (!events) {
events = target._events = new EventHandlers();
target._eventsCount = 0;
} else {
if (events.newListener) {
target.emit(
"newListener",
type3,
listener.listener ? listener.listener : listener
);
events = target._events;
}
existing = events[type3];
}
if (!existing) {
existing = events[type3] = listener;
++target._eventsCount;
} else {
if (typeof existing === "function") {
existing = events[type3] = prepend ? [listener, existing] : [existing, listener];
} else {
if (prepend) {
existing.unshift(listener);
} else {
existing.push(listener);
}
}
if (!existing.warned) {
m5 = $getMaxListeners(target);
if (m5 && m5 > 0 && existing.length > m5) {
existing.warned = true;
var w4 = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + type3 + " listeners added. Use emitter.setMaxListeners() to increase limit");
w4.name = "MaxListenersExceededWarning";
w4.emitter = target;
w4.type = type3;
w4.count = existing.length;
emitWarning$1(w4);
}
}
}
return target;
}
function emitWarning$1(e13) {
typeof console.warn === "function" ? console.warn(e13) : console.log(e13);
}
EventEmitter$2.prototype.addListener = function addListener2(type3, listener) {
return _addListener(this, type3, listener, false);
};
EventEmitter$2.prototype.on = EventEmitter$2.prototype.addListener;
EventEmitter$2.prototype.prependListener = function prependListener2(type3, listener) {
return _addListener(this, type3, listener, true);
};
function _onceWrap(target, type3, listener) {
var fired = false;
function g3() {
target.removeListener(type3, g3);
if (!fired) {
fired = true;
listener.apply(target, arguments);
}
}
g3.listener = listener;
return g3;
}
EventEmitter$2.prototype.once = function once2(type3, listener) {
if (typeof listener !== "function")
throw new TypeError('"listener" argument must be a function');
this.on(type3, _onceWrap(this, type3, listener));
return this;
};
EventEmitter$2.prototype.prependOnceListener = function prependOnceListener(type3, listener) {
if (typeof listener !== "function")
throw new TypeError('"listener" argument must be a function');
this.prependListener(type3, _onceWrap(this, type3, listener));
return this;
};
EventEmitter$2.prototype.removeListener = function removeListener2(type3, listener) {
var list2, events, position, i9, originalListener;
if (typeof listener !== "function")
throw new TypeError('"listener" argument must be a function');
events = this._events;
if (!events)
return this;
list2 = events[type3];
if (!list2)
return this;
if (list2 === listener || list2.listener && list2.listener === listener) {
if (--this._eventsCount === 0)
this._events = new EventHandlers();
else {
delete events[type3];
if (events.removeListener)
this.emit("removeListener", type3, list2.listener || listener);
}
} else if (typeof list2 !== "function") {
position = -1;
for (i9 = list2.length; i9-- > 0; ) {
if (list2[i9] === listener || list2[i9].listener && list2[i9].listener === listener) {
originalListener = list2[i9].listener;
position = i9;
break;
}
}
if (position < 0)
return this;
if (list2.length === 1) {
list2[0] = void 0;
if (--this._eventsCount === 0) {
this._events = new EventHandlers();
return this;
} else {
delete events[type3];
}
} else {
spliceOne(list2, position);
}
if (events.removeListener)
this.emit("removeListener", type3, originalListener || listener);
}
return this;
};
EventEmitter$2.prototype.off = function(type3, listener) {
return this.removeListener(type3, listener);
};
EventEmitter$2.prototype.removeAllListeners = function removeAllListeners2(type3) {
var listeners, events;
events = this._events;
if (!events)
return this;
if (!events.removeListener) {
if (arguments.length === 0) {
this._events = new EventHandlers();
this._eventsCount = 0;
} else if (events[type3]) {
if (--this._eventsCount === 0)
this._events = new EventHandlers();
else
delete events[type3];
}
return this;
}
if (arguments.length === 0) {
var keys2 = Object.keys(events);
for (var i9 = 0, key; i9 < keys2.length; ++i9) {
key = keys2[i9];
if (key === "removeListener") continue;
this.removeAllListeners(key);
}
this.removeAllListeners("removeListener");
this._events = new EventHandlers();
this._eventsCount = 0;
return this;
}
listeners = events[type3];
if (typeof listeners === "function") {
this.removeListener(type3, listeners);
} else if (listeners) {
do {
this.removeListener(type3, listeners[listeners.length - 1]);
} while (listeners[0]);
}
return this;
};
EventEmitter$2.prototype.listeners = function listeners(type3) {
var evlistener;
var ret;
var events = this._events;
if (!events)
ret = [];
else {
evlistener = events[type3];
if (!evlistener)
ret = [];
else if (typeof evlistener === "function")
ret = [evlistener.listener || evlistener];
else
ret = unwrapListeners(evlistener);
}
return ret;
};
EventEmitter$2.listenerCount = function(emitter, type3) {
if (typeof emitter.listenerCount === "function") {
return emitter.listenerCount(type3);
} else {
return listenerCount$1.call(emitter, type3);
}
};
EventEmitter$2.prototype.listenerCount = listenerCount$1;
function listenerCount$1(type3) {
var events = this._events;
if (events) {
var evlistener = events[type3];
if (typeof evlistener === "function") {
return 1;
} else if (evlistener) {
return evlistener.length;
}
}
return 0;
}
EventEmitter$2.prototype.eventNames = function eventNames() {
return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
};
function spliceOne(list2, index) {
for (var i9 = index, k3 = i9 + 1, n11 = list2.length; k3 < n11; i9 += 1, k3 += 1)
list2[i9] = list2[k3];
list2.pop();
}
function arrayClone(arr, i9) {
var copy = new Array(i9);
while (i9--)
copy[i9] = arr[i9];
return copy;
}
function unwrapListeners(arr) {
var ret = new Array(arr.length);
for (var i9 = 0; i9 < ret.length; ++i9) {
ret[i9] = arr[i9].listener || arr[i9];
}
return ret;
}
var _polyfillNode_events = /* @__PURE__ */ Object.freeze({
__proto__: null,
"default": EventEmitter$2,
EventEmitter: EventEmitter$2
});
var lookup$1 = [];
var revLookup$1 = [];
var Arr$1 = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
var inited$1 = false;
function init$1() {
inited$1 = true;
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (var i9 = 0, len = code.length; i9 < len; ++i9) {
lookup$1[i9] = code[i9];
revLookup$1[code.charCodeAt(i9)] = i9;
}
revLookup$1["-".charCodeAt(0)] = 62;
revLookup$1["_".charCodeAt(0)] = 63;
}
function toByteArray$1(b64) {
if (!inited$1) {
init$1();
}
var i9, j3, l6, tmp, placeHolders, arr;
var len = b64.length;
if (len % 4 > 0) {
throw new Error("Invalid string. Length must be a multiple of 4");
}
placeHolders = b64[len - 2] === "=" ? 2 : b64[len - 1] === "=" ? 1 : 0;
arr = new Arr$1(len * 3 / 4 - placeHolders);
l6 = placeHolders > 0 ? len - 4 : len;
var L3 = 0;
for (i9 = 0, j3 = 0; i9 < l6; i9 += 4, j3 += 3) {
tmp = revLookup$1[b64.charCodeAt(i9)] << 18 | revLookup$1[b64.charCodeAt(i9 + 1)] << 12 | revLookup$1[b64.charCodeAt(i9 + 2)] << 6 | revLookup$1[b64.charCodeAt(i9 + 3)];
arr[L3++] = tmp >> 16 & 255;
arr[L3++] = tmp >> 8 & 255;
arr[L3++] = tmp & 255;
}
if (placeHolders === 2) {
tmp = revLookup$1[b64.charCodeAt(i9)] << 2 | revLookup$1[b64.charCodeAt(i9 + 1)] >> 4;
arr[L3++] = tmp & 255;
} else if (placeHolders === 1) {
tmp = revLookup$1[b64.charCodeAt(i9)] << 10 | revLookup$1[b64.charCodeAt(i9 + 1)] << 4 | revLookup$1[b64.charCodeAt(i9 + 2)] >> 2;
arr[L3++] = tmp >> 8 & 255;
arr[L3++] = tmp & 255;
}
return arr;
}
function tripletToBase64$1(num) {
return lookup$1[num >> 18 & 63] + lookup$1[num >> 12 & 63] + lookup$1[num >> 6 & 63] + lookup$1[num & 63];
}
function encodeChunk$1(uint8, start, end) {
var tmp;
var output = [];
for (var i9 = start; i9 < end; i9 += 3) {
tmp = (uint8[i9] << 16) + (uint8[i9 + 1] << 8) + uint8[i9 + 2];
output.push(tripletToBase64$1(tmp));
}
return output.join("");
}
function fromByteArray$1(uint8) {
if (!inited$1) {
init$1();
}
var tmp;
var len = uint8.length;
var extraBytes = len % 3;
var output = "";
var parts = [];
var maxChunkLength = 16383;
for (var i9 = 0, len2 = len - extraBytes; i9 < len2; i9 += maxChunkLength) {
parts.push(encodeChunk$1(uint8, i9, i9 + maxChunkLength > len2 ? len2 : i9 + maxChunkLength));
}
if (extraBytes === 1) {
tmp = uint8[len - 1];
output += lookup$1[tmp >> 2];
output += lookup$1[tmp << 4 & 63];
output += "==";
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
output += lookup$1[tmp >> 10];
output += lookup$1[tmp >> 4 & 63];
output += lookup$1[tmp << 2 & 63];
output += "=";
}
parts.push(output);
return parts.join("");
}
function read$1(buffer, offset3, isLE, mLen, nBytes) {
var e13, m5;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var nBits = -7;
var i9 = isLE ? nBytes - 1 : 0;
var d5 = isLE ? -1 : 1;
var s7 = buffer[offset3 + i9];
i9 += d5;
e13 = s7 & (1 << -nBits) - 1;
s7 >>= -nBits;
nBits += eLen;
for (; nBits > 0; e13 = e13 * 256 + buffer[offset3 + i9], i9 += d5, nBits -= 8) {
}
m5 = e13 & (1 << -nBits) - 1;
e13 >>= -nBits;
nBits += mLen;
for (; nBits > 0; m5 = m5 * 256 + buffer[offset3 + i9], i9 += d5, nBits -= 8) {
}
if (e13 === 0) {
e13 = 1 - eBias;
} else if (e13 === eMax) {
return m5 ? NaN : (s7 ? -1 : 1) * Infinity;
} else {
m5 = m5 + Math.pow(2, mLen);
e13 = e13 - eBias;
}
return (s7 ? -1 : 1) * m5 * Math.pow(2, e13 - mLen);
}
function write$1(buffer, value, offset3, isLE, mLen, nBytes) {
var e13, m5, c7;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
var i9 = isLE ? 0 : nBytes - 1;
var d5 = isLE ? 1 : -1;
var s7 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
value = Math.abs(value);
if (isNaN(value) || value === Infinity) {
m5 = isNaN(value) ? 1 : 0;
e13 = eMax;
} else {
e13 = Math.floor(Math.log(value) / Math.LN2);
if (value * (c7 = Math.pow(2, -e13)) < 1) {
e13--;
c7 *= 2;
}
if (e13 + eBias >= 1) {
value += rt / c7;
} else {
value += rt * Math.pow(2, 1 - eBias);
}
if (value * c7 >= 2) {
e13++;
c7 /= 2;
}
if (e13 + eBias >= eMax) {
m5 = 0;
e13 = eMax;
} else if (e13 + eBias >= 1) {
m5 = (value * c7 - 1) * Math.pow(2, mLen);
e13 = e13 + eBias;
} else {
m5 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
e13 = 0;
}
}
for (; mLen >= 8; buffer[offset3 + i9] = m5 & 255, i9 += d5, m5 /= 256, mLen -= 8) {
}
e13 = e13 << mLen | m5;
eLen += mLen;
for (; eLen > 0; buffer[offset3 + i9] = e13 & 255, i9 += d5, e13 /= 256, eLen -= 8) {
}
buffer[offset3 + i9 - d5] |= s7 * 128;
}
var toString$2 = {}.toString;
var isArray$2 = Array.isArray || function(arr) {
return toString$2.call(arr) == "[object Array]";
};
var INSPECT_MAX_BYTES$1 = 50;
Buffer$1.TYPED_ARRAY_SUPPORT = global$2.TYPED_ARRAY_SUPPORT !== void 0 ? global$2.TYPED_ARRAY_SUPPORT : true;
kMaxLength$1();
function kMaxLength$1() {
return Buffer$1.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
}
function createBuffer$1(that, length) {
if (kMaxLength$1() < length) {
throw new RangeError("Invalid typed array length");
}
if (Buffer$1.TYPED_ARRAY_SUPPORT) {
that = new Uint8Array(length);
that.__proto__ = Buffer$1.prototype;
} else {
if (that === null) {
that = new Buffer$1(length);
}
that.length = length;
}
return that;
}
function Buffer$1(arg, encodingOrOffset, length) {
if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) {
return new Buffer$1(arg, encodingOrOffset, length);
}
if (typeof arg === "number") {
if (typeof encodingOrOffset === "string") {
throw new Error(
"If encoding is specified then the first argument must be a string"
);
}
return allocUnsafe$1(this, arg);
}
return from$1(this, arg, encodingOrOffset, length);
}
Buffer$1.poolSize = 8192;
Buffer$1._augment = function(arr) {
arr.__proto__ = Buffer$1.prototype;
return arr;
};
function from$1(that, value, encodingOrOffset, length) {
if (typeof value === "number") {
throw new TypeError('"value" argument must not be a number');
}
if (typeof ArrayBuffer !== "undefined" && value instanceof ArrayBuffer) {
return fromArrayBuffer$1(that, value, encodingOrOffset, length);
}
if (typeof value === "string") {
return fromString$1(that, value, encodingOrOffset);
}
return fromObject$1(that, value);
}
Buffer$1.from = function(value, encodingOrOffset, length) {
return from$1(null, value, encodingOrOffset, length);
};
if (Buffer$1.TYPED_ARRAY_SUPPORT) {
Buffer$1.prototype.__proto__ = Uint8Array.prototype;
Buffer$1.__proto__ = Uint8Array;
}
function assertSize$1(size3) {
if (typeof size3 !== "number") {
throw new TypeError('"size" argument must be a number');
} else if (size3 < 0) {
throw new RangeError('"size" argument must not be negative');
}
}
function alloc$1(that, size3, fill, encoding) {
assertSize$1(size3);
if (size3 <= 0) {
return createBuffer$1(that, size3);
}
if (fill !== void 0) {
return typeof encoding === "string" ? createBuffer$1(that, size3).fill(fill, encoding) : createBuffer$1(that, size3).fill(fill);
}
return createBuffer$1(that, size3);
}
Buffer$1.alloc = function(size3, fill, encoding) {
return alloc$1(null, size3, fill, encoding);
};
function allocUnsafe$1(that, size3) {
assertSize$1(size3);
that = createBuffer$1(that, size3 < 0 ? 0 : checked$1(size3) | 0);
if (!Buffer$1.TYPED_ARRAY_SUPPORT) {
for (var i9 = 0; i9 < size3; ++i9) {
that[i9] = 0;
}
}
return that;
}
Buffer$1.allocUnsafe = function(size3) {
return allocUnsafe$1(null, size3);
};
Buffer$1.allocUnsafeSlow = function(size3) {
return allocUnsafe$1(null, size3);
};
function fromString$1(that, string, encoding) {
if (typeof encoding !== "string" || encoding === "") {
encoding = "utf8";
}
if (!Buffer$1.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding');
}
var length = byteLength$1(string, encoding) | 0;
that = createBuffer$1(that, length);
var actual = that.write(string, encoding);
if (actual !== length) {
that = that.slice(0, actual);
}
return that;
}
function fromArrayLike$1(that, array2) {
var length = array2.length < 0 ? 0 : checked$1(array2.length) | 0;
that = createBuffer$1(that, length);
for (var i9 = 0; i9 < length; i9 += 1) {
that[i9] = array2[i9] & 255;
}
return that;
}
function fromArrayBuffer$1(that, array2, byteOffset, length) {
array2.byteLength;
if (byteOffset < 0 || array2.byteLength < byteOffset) {
throw new RangeError("'offset' is out of bounds");
}
if (array2.byteLength < byteOffset + (length || 0)) {
throw new RangeError("'length' is out of bounds");
}
if (byteOffset === void 0 && length === void 0) {
array2 = new Uint8Array(array2);
} else if (length === void 0) {
array2 = new Uint8Array(array2, byteOffset);
} else {
array2 = new Uint8Array(array2, byteOffset, length);
}
if (Buffer$1.TYPED_ARRAY_SUPPORT) {
that = array2;
that.__proto__ = Buffer$1.prototype;
} else {
that = fromArrayLike$1(that, array2);
}
return that;
}
function fromObject$1(that, obj) {
if (internalIsBuffer$1(obj)) {
var len = checked$1(obj.length) | 0;
that = createBuffer$1(that, len);
if (that.length === 0) {
return that;
}
obj.copy(that, 0, 0, len);
return that;
}
if (obj) {
if (typeof ArrayBuffer !== "undefined" && obj.buffer instanceof ArrayBuffer || "length" in obj) {
if (typeof obj.length !== "number" || isnan$1(obj.length)) {
return createBuffer$1(that, 0);
}
return fromArrayLike$1(that, obj);
}
if (obj.type === "Buffer" && isArray$2(obj.data)) {
return fromArrayLike$1(that, obj.data);
}
}
throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
}
function checked$1(length) {
if (length >= kMaxLength$1()) {
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + kMaxLength$1().toString(16) + " bytes");
}
return length | 0;
}
Buffer$1.isBuffer = isBuffer$2;
function internalIsBuffer$1(b4) {
return !!(b4 != null && b4._isBuffer);
}
Buffer$1.compare = function compare(a5, b4) {
if (!internalIsBuffer$1(a5) || !internalIsBuffer$1(b4)) {
throw new TypeError("Arguments must be Buffers");
}
if (a5 === b4) return 0;
var x3 = a5.length;
var y5 = b4.length;
for (var i9 = 0, len = Math.min(x3, y5); i9 < len; ++i9) {
if (a5[i9] !== b4[i9]) {
x3 = a5[i9];
y5 = b4[i9];
break;
}
}
if (x3 < y5) return -1;
if (y5 < x3) return 1;
return 0;
};
Buffer$1.isEncoding = function isEncoding(encoding) {
switch (String(encoding).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return true;
default:
return false;
}
};
Buffer$1.concat = function concat(list2, length) {
if (!isArray$2(list2)) {
throw new TypeError('"list" argument must be an Array of Buffers');
}
if (list2.length === 0) {
return Buffer$1.alloc(0);
}
var i9;
if (length === void 0) {
length = 0;
for (i9 = 0; i9 < list2.length; ++i9) {
length += list2[i9].length;
}
}
var buffer = Buffer$1.allocUnsafe(length);
var pos = 0;
for (i9 = 0; i9 < list2.length; ++i9) {
var buf = list2[i9];
if (!internalIsBuffer$1(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers');
}
buf.copy(buffer, pos);
pos += buf.length;
}
return buffer;
};
function byteLength$1(string, encoding) {
if (internalIsBuffer$1(string)) {
return string.length;
}
if (typeof ArrayBuffer !== "undefined" && typeof ArrayBuffer.isView === "function" && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength;
}
if (typeof string !== "string") {
string = "" + string;
}
var len = string.length;
if (len === 0) return 0;
var loweredCase = false;
for (; ; ) {
switch (encoding) {
case "ascii":
case "latin1":
case "binary":
return len;
case "utf8":
case "utf-8":
case void 0:
return utf8ToBytes$1(string).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return len * 2;
case "hex":
return len >>> 1;
case "base64":
return base64ToBytes$1(string).length;
default:
if (loweredCase) return utf8ToBytes$1(string).length;
encoding = ("" + encoding).toLowerCase();
loweredCase = true;
}
}
}
Buffer$1.byteLength = byteLength$1;
function slowToString$1(encoding, start, end) {
var loweredCase = false;
if (start === void 0 || start < 0) {
start = 0;
}
if (start > this.length) {
return "";
}
if (end === void 0 || end > this.length) {
end = this.length;
}
if (end <= 0) {
return "";
}
end >>>= 0;
start >>>= 0;
if (end <= start) {
return "";
}
if (!encoding) encoding = "utf8";
while (true) {
switch (encoding) {
case "hex":
return hexSlice$1(this, start, end);
case "utf8":
case "utf-8":
return utf8Slice$1(this, start, end);
case "ascii":
return asciiSlice$1(this, start, end);
case "latin1":
case "binary":
return latin1Slice$1(this, start, end);
case "base64":
return base64Slice$1(this, start, end);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return utf16leSlice$1(this, start, end);
default:
if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
encoding = (encoding + "").toLowerCase();
loweredCase = true;
}
}
}
Buffer$1.prototype._isBuffer = true;
function swap$1(b4, n11, m5) {
var i9 = b4[n11];
b4[n11] = b4[m5];
b4[m5] = i9;
}
Buffer$1.prototype.swap16 = function swap16() {
var len = this.length;
if (len % 2 !== 0) {
throw new RangeError("Buffer size must be a multiple of 16-bits");
}
for (var i9 = 0; i9 < len; i9 += 2) {
swap$1(this, i9, i9 + 1);
}
return this;
};
Buffer$1.prototype.swap32 = function swap32() {
var len = this.length;
if (len % 4 !== 0) {
throw new RangeError("Buffer size must be a multiple of 32-bits");
}
for (var i9 = 0; i9 < len; i9 += 4) {
swap$1(this, i9, i9 + 3);
swap$1(this, i9 + 1, i9 + 2);
}
return this;
};
Buffer$1.prototype.swap64 = function swap64() {
var len = this.length;
if (len % 8 !== 0) {
throw new RangeError("Buffer size must be a multiple of 64-bits");
}
for (var i9 = 0; i9 < len; i9 += 8) {
swap$1(this, i9, i9 + 7);
swap$1(this, i9 + 1, i9 + 6);
swap$1(this, i9 + 2, i9 + 5);
swap$1(this, i9 + 3, i9 + 4);
}
return this;
};
Buffer$1.prototype.toString = function toString3() {
var length = this.length | 0;
if (length === 0) return "";
if (arguments.length === 0) return utf8Slice$1(this, 0, length);
return slowToString$1.apply(this, arguments);
};
Buffer$1.prototype.equals = function equals(b4) {
if (!internalIsBuffer$1(b4)) throw new TypeError("Argument must be a Buffer");
if (this === b4) return true;
return Buffer$1.compare(this, b4) === 0;
};
Buffer$1.prototype.inspect = function inspect4() {
var str = "";
var max2 = INSPECT_MAX_BYTES$1;
if (this.length > 0) {
str = this.toString("hex", 0, max2).match(/.{2}/g).join(" ");
if (this.length > max2) str += " ... ";
}
return "<Buffer " + str + ">";
};
Buffer$1.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
if (!internalIsBuffer$1(target)) {
throw new TypeError("Argument must be a Buffer");
}
if (start === void 0) {
start = 0;
}
if (end === void 0) {
end = target ? target.length : 0;
}
if (thisStart === void 0) {
thisStart = 0;
}
if (thisEnd === void 0) {
thisEnd = this.length;
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError("out of range index");
}
if (thisStart >= thisEnd && start >= end) {
return 0;
}
if (thisStart >= thisEnd) {
return -1;
}
if (start >= end) {
return 1;
}
start >>>= 0;
end >>>= 0;
thisStart >>>= 0;
thisEnd >>>= 0;
if (this === target) return 0;
var x3 = thisEnd - thisStart;
var y5 = end - start;
var len = Math.min(x3, y5);
var thisCopy = this.slice(thisStart, thisEnd);
var targetCopy = target.slice(start, end);
for (var i9 = 0; i9 < len; ++i9) {
if (thisCopy[i9] !== targetCopy[i9]) {
x3 = thisCopy[i9];
y5 = targetCopy[i9];
break;
}
}
if (x3 < y5) return -1;
if (y5 < x3) return 1;
return 0;
};
function bidirectionalIndexOf$1(buffer, val, byteOffset, encoding, dir) {
if (buffer.length === 0) return -1;
if (typeof byteOffset === "string") {
encoding = byteOffset;
byteOffset = 0;
} else if (byteOffset > 2147483647) {
byteOffset = 2147483647;
} else if (byteOffset < -2147483648) {
byteOffset = -2147483648;
}
byteOffset = +byteOffset;
if (isNaN(byteOffset)) {
byteOffset = dir ? 0 : buffer.length - 1;
}
if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
if (byteOffset >= buffer.length) {
if (dir) return -1;
else byteOffset = buffer.length - 1;
} else if (byteOffset < 0) {
if (dir) byteOffset = 0;
else return -1;
}
if (typeof val === "string") {
val = Buffer$1.from(val, encoding);
}
if (internalIsBuffer$1(val)) {
if (val.length === 0) {
return -1;
}
return arrayIndexOf$1(buffer, val, byteOffset, encoding, dir);
} else if (typeof val === "number") {
val = val & 255;
if (Buffer$1.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === "function") {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
}
}
return arrayIndexOf$1(buffer, [val], byteOffset, encoding, dir);
}
throw new TypeError("val must be string, number or Buffer");
}
function arrayIndexOf$1(arr, val, byteOffset, encoding, dir) {
var indexSize = 1;
var arrLength = arr.length;
var valLength = val.length;
if (encoding !== void 0) {
encoding = String(encoding).toLowerCase();
if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "ut