gatsby-cli
Version:
Gatsby command-line interface for creating new sites and running Gatsby commands
1,888 lines (1,846 loc) • 356 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var lodash_1 = require('lodash');
var signalExit = require('signal-exit');
var require$$0$1 = require('yoga-layout-prebuilt');
var stripAnsi = require('strip-ansi');
var require$$0$2 = require('chalk');
var stream_1 = require('stream');
var require$$0$4 = require('fs');
var require$$0$3 = require('module');
var redux = require('../../redux');
var gatsbyCoreUtils = require('gatsby-core-utils');
var convertHrtime = require('convert-hrtime');
var path = require('path');
var parseComponentPath = require('gatsby-core-utils/parse-component-path');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var lodash_1__default = /*#__PURE__*/_interopDefaultLegacy(lodash_1);
var signalExit__default = /*#__PURE__*/_interopDefaultLegacy(signalExit);
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
var stripAnsi__default = /*#__PURE__*/_interopDefaultLegacy(stripAnsi);
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
var stream_1__default = /*#__PURE__*/_interopDefaultLegacy(stream_1);
var require$$0__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
var convertHrtime__default = /*#__PURE__*/_interopDefaultLegacy(convertHrtime);
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function createCommonjsModule(fn) {
var module = { exports: {} };
return fn(module, module.exports), module.exports;
}
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var l = Symbol.for("react.element"),
n = Symbol.for("react.portal"),
p = Symbol.for("react.fragment"),
q = Symbol.for("react.strict_mode"),
r = Symbol.for("react.profiler"),
t = Symbol.for("react.provider"),
u = Symbol.for("react.context"),
v = Symbol.for("react.forward_ref"),
w = Symbol.for("react.suspense"),
x = Symbol.for("react.memo"),
y = Symbol.for("react.lazy"),
z = Symbol.iterator;
function A(a) {
if (null === a || "object" !== typeof a) return null;
a = z && a[z] || a["@@iterator"];
return "function" === typeof a ? a : null;
}
var B = {
isMounted: function () {
return !1;
},
enqueueForceUpdate: function () {},
enqueueReplaceState: function () {},
enqueueSetState: function () {}
},
C = Object.assign,
D = {};
function E(a, b, e) {
this.props = a;
this.context = b;
this.refs = D;
this.updater = e || B;
}
E.prototype.isReactComponent = {};
E.prototype.setState = function (a, b) {
if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
this.updater.enqueueSetState(this, a, b, "setState");
};
E.prototype.forceUpdate = function (a) {
this.updater.enqueueForceUpdate(this, a, "forceUpdate");
};
function F() {}
F.prototype = E.prototype;
function G(a, b, e) {
this.props = a;
this.context = b;
this.refs = D;
this.updater = e || B;
}
var H = G.prototype = new F();
H.constructor = G;
C(H, E.prototype);
H.isPureReactComponent = !0;
var I = Array.isArray,
J = Object.prototype.hasOwnProperty,
K = {
current: null
},
L = {
key: !0,
ref: !0,
__self: !0,
__source: !0
};
function M(a, b, e) {
var d,
c = {},
k = null,
h = null;
if (null != b) for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = "" + b.key), b) J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);
var g = arguments.length - 2;
if (1 === g) c.children = e;else if (1 < g) {
for (var f = Array(g), m = 0; m < g; m++) f[m] = arguments[m + 2];
c.children = f;
}
if (a && a.defaultProps) for (d in g = a.defaultProps, g) void 0 === c[d] && (c[d] = g[d]);
return {
$$typeof: l,
type: a,
key: k,
ref: h,
props: c,
_owner: K.current
};
}
function N(a, b) {
return {
$$typeof: l,
type: a.type,
key: b,
ref: a.ref,
props: a.props,
_owner: a._owner
};
}
function O(a) {
return "object" === typeof a && null !== a && a.$$typeof === l;
}
function escape(a) {
var b = {
"=": "=0",
":": "=2"
};
return "$" + a.replace(/[=:]/g, function (a) {
return b[a];
});
}
var P = /\/+/g;
function Q(a, b) {
return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
}
function R(a, b, e, d, c) {
var k = typeof a;
if ("undefined" === k || "boolean" === k) a = null;
var h = !1;
if (null === a) h = !0;else switch (k) {
case "string":
case "number":
h = !0;
break;
case "object":
switch (a.$$typeof) {
case l:
case n:
h = !0;
}
}
if (h) return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function (a) {
return a;
})) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
h = 0;
d = "" === d ? "." : d + ":";
if (I(a)) for (var g = 0; g < a.length; g++) {
k = a[g];
var f = d + Q(k, g);
h += R(k, b, e, f, c);
} else if (f = A(a), "function" === typeof f) for (a = f.call(a), g = 0; !(k = a.next()).done;) k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c);else if ("object" === k) throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
return h;
}
function S(a, b, e) {
if (null == a) return a;
var d = [],
c = 0;
R(a, d, "", "", function (a) {
return b.call(e, a, c++);
});
return d;
}
function T(a) {
if (-1 === a._status) {
var b = a._result;
b = b();
b.then(function (b) {
if (0 === a._status || -1 === a._status) a._status = 1, a._result = b;
}, function (b) {
if (0 === a._status || -1 === a._status) a._status = 2, a._result = b;
});
-1 === a._status && (a._status = 0, a._result = b);
}
if (1 === a._status) return a._result.default;
throw a._result;
}
var U = {
current: null
},
V = {
transition: null
},
W = {
ReactCurrentDispatcher: U,
ReactCurrentBatchConfig: V,
ReactCurrentOwner: K
};
var Children = {
map: S,
forEach: function (a, b, e) {
S(a, function () {
b.apply(this, arguments);
}, e);
},
count: function (a) {
var b = 0;
S(a, function () {
b++;
});
return b;
},
toArray: function (a) {
return S(a, function (a) {
return a;
}) || [];
},
only: function (a) {
if (!O(a)) throw Error("React.Children.only expected to receive a single React element child.");
return a;
}
};
var Component = E;
var Fragment = p;
var Profiler = r;
var PureComponent = G;
var StrictMode = q;
var Suspense = w;
var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
var cloneElement = function (a, b, e) {
if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
var d = C({}, a.props),
c = a.key,
k = a.ref,
h = a._owner;
if (null != b) {
void 0 !== b.ref && (k = b.ref, h = K.current);
void 0 !== b.key && (c = "" + b.key);
if (a.type && a.type.defaultProps) var g = a.type.defaultProps;
for (f in b) J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);
}
var f = arguments.length - 2;
if (1 === f) d.children = e;else if (1 < f) {
g = Array(f);
for (var m = 0; m < f; m++) g[m] = arguments[m + 2];
d.children = g;
}
return {
$$typeof: l,
type: a.type,
key: c,
ref: k,
props: d,
_owner: h
};
};
var createContext = function (a) {
a = {
$$typeof: u,
_currentValue: a,
_currentValue2: a,
_threadCount: 0,
Provider: null,
Consumer: null,
_defaultValue: null,
_globalName: null
};
a.Provider = {
$$typeof: t,
_context: a
};
return a.Consumer = a;
};
var createElement = M;
var createFactory = function (a) {
var b = M.bind(null, a);
b.type = a;
return b;
};
var createRef = function () {
return {
current: null
};
};
var forwardRef = function (a) {
return {
$$typeof: v,
render: a
};
};
var isValidElement = O;
var lazy = function (a) {
return {
$$typeof: y,
_payload: {
_status: -1,
_result: a
},
_init: T
};
};
var memo = function (a, b) {
return {
$$typeof: x,
type: a,
compare: void 0 === b ? null : b
};
};
var startTransition = function (a) {
var b = V.transition;
V.transition = {};
try {
a();
} finally {
V.transition = b;
}
};
var unstable_act = function () {
throw Error("act(...) is not supported in production builds of React.");
};
var useCallback = function (a, b) {
return U.current.useCallback(a, b);
};
var useContext = function (a) {
return U.current.useContext(a);
};
var useDebugValue = function () {};
var useDeferredValue = function (a) {
return U.current.useDeferredValue(a);
};
var useEffect = function (a, b) {
return U.current.useEffect(a, b);
};
var useId = function () {
return U.current.useId();
};
var useImperativeHandle = function (a, b, e) {
return U.current.useImperativeHandle(a, b, e);
};
var useInsertionEffect = function (a, b) {
return U.current.useInsertionEffect(a, b);
};
var useLayoutEffect = function (a, b) {
return U.current.useLayoutEffect(a, b);
};
var useMemo = function (a, b) {
return U.current.useMemo(a, b);
};
var useReducer = function (a, b, e) {
return U.current.useReducer(a, b, e);
};
var useRef = function (a) {
return U.current.useRef(a);
};
var useState = function (a) {
return U.current.useState(a);
};
var useSyncExternalStore = function (a, b, e) {
return U.current.useSyncExternalStore(a, b, e);
};
var useTransition = function () {
return U.current.useTransition();
};
var version = "18.2.0";
var react_production_min = {
Children: Children,
Component: Component,
Fragment: Fragment,
Profiler: Profiler,
PureComponent: PureComponent,
StrictMode: StrictMode,
Suspense: Suspense,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
cloneElement: cloneElement,
createContext: createContext,
createElement: createElement,
createFactory: createFactory,
createRef: createRef,
forwardRef: forwardRef,
isValidElement: isValidElement,
lazy: lazy,
memo: memo,
startTransition: startTransition,
unstable_act: unstable_act,
useCallback: useCallback,
useContext: useContext,
useDebugValue: useDebugValue,
useDeferredValue: useDeferredValue,
useEffect: useEffect,
useId: useId,
useImperativeHandle: useImperativeHandle,
useInsertionEffect: useInsertionEffect,
useLayoutEffect: useLayoutEffect,
useMemo: useMemo,
useReducer: useReducer,
useRef: useRef,
useState: useState,
useSyncExternalStore: useSyncExternalStore,
useTransition: useTransition,
version: version
};
var react = createCommonjsModule(function (module) {
{
module.exports = react_production_min;
}
});
var ansiEscapes_1 = createCommonjsModule(function (module) {
const ansiEscapes = module.exports;
// TODO: remove this in the next major version
module.exports.default = ansiEscapes;
const ESC = '\u001B[';
const OSC = '\u001B]';
const BEL = '\u0007';
const SEP = ';';
const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
ansiEscapes.cursorTo = (x, y) => {
if (typeof x !== 'number') {
throw new TypeError('The `x` argument is required');
}
if (typeof y !== 'number') {
return ESC + (x + 1) + 'G';
}
return ESC + (y + 1) + ';' + (x + 1) + 'H';
};
ansiEscapes.cursorMove = (x, y) => {
if (typeof x !== 'number') {
throw new TypeError('The `x` argument is required');
}
let ret = '';
if (x < 0) {
ret += ESC + -x + 'D';
} else if (x > 0) {
ret += ESC + x + 'C';
}
if (y < 0) {
ret += ESC + -y + 'A';
} else if (y > 0) {
ret += ESC + y + 'B';
}
return ret;
};
ansiEscapes.cursorUp = (count = 1) => ESC + count + 'A';
ansiEscapes.cursorDown = (count = 1) => ESC + count + 'B';
ansiEscapes.cursorForward = (count = 1) => ESC + count + 'C';
ansiEscapes.cursorBackward = (count = 1) => ESC + count + 'D';
ansiEscapes.cursorLeft = ESC + 'G';
ansiEscapes.cursorSavePosition = isTerminalApp ? '\u001B7' : ESC + 's';
ansiEscapes.cursorRestorePosition = isTerminalApp ? '\u001B8' : ESC + 'u';
ansiEscapes.cursorGetPosition = ESC + '6n';
ansiEscapes.cursorNextLine = ESC + 'E';
ansiEscapes.cursorPrevLine = ESC + 'F';
ansiEscapes.cursorHide = ESC + '?25l';
ansiEscapes.cursorShow = ESC + '?25h';
ansiEscapes.eraseLines = count => {
let clear = '';
for (let i = 0; i < count; i++) {
clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : '');
}
if (count) {
clear += ansiEscapes.cursorLeft;
}
return clear;
};
ansiEscapes.eraseEndLine = ESC + 'K';
ansiEscapes.eraseStartLine = ESC + '1K';
ansiEscapes.eraseLine = ESC + '2K';
ansiEscapes.eraseDown = ESC + 'J';
ansiEscapes.eraseUp = ESC + '1J';
ansiEscapes.eraseScreen = ESC + '2J';
ansiEscapes.scrollUp = ESC + 'S';
ansiEscapes.scrollDown = ESC + 'T';
ansiEscapes.clearScreen = '\u001Bc';
ansiEscapes.clearTerminal = process.platform === 'win32' ? `${ansiEscapes.eraseScreen}${ESC}0f` :
// 1. Erases the screen (Only done in case `2` is not supported)
// 2. Erases the whole screen including scrollback buffer
// 3. Moves cursor to the top-left position
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
ansiEscapes.beep = BEL;
ansiEscapes.link = (text, url) => {
return [OSC, '8', SEP, SEP, url, BEL, text, OSC, '8', SEP, SEP, BEL].join('');
};
ansiEscapes.image = (buffer, options = {}) => {
let ret = `${OSC}1337;File=inline=1`;
if (options.width) {
ret += `;width=${options.width}`;
}
if (options.height) {
ret += `;height=${options.height}`;
}
if (options.preserveAspectRatio === false) {
ret += ';preserveAspectRatio=0';
}
return ret + ':' + buffer.toString('base64') + BEL;
};
ansiEscapes.iTerm = {
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
annotation: (message, options = {}) => {
let ret = `${OSC}1337;`;
const hasX = typeof options.x !== 'undefined';
const hasY = typeof options.y !== 'undefined';
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== 'undefined')) {
throw new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');
}
message = message.replace(/\|/g, '');
ret += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';
if (options.length > 0) {
ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join('|');
} else {
ret += message;
}
return ret + BEL;
}
};
});
const mimicFn = (to, from) => {
for (const prop of Reflect.ownKeys(from)) {
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
}
return to;
};
var mimicFn_1 = mimicFn;
// TODO: Remove this for the next major release
var _default$H = mimicFn;
mimicFn_1.default = _default$H;
const calledFunctions = new WeakMap();
const onetime = (function_, options = {}) => {
if (typeof function_ !== 'function') {
throw new TypeError('Expected a function');
}
let returnValue;
let callCount = 0;
const functionName = function_.displayName || function_.name || '<anonymous>';
const onetime = function (...arguments_) {
calledFunctions.set(onetime, ++callCount);
if (callCount === 1) {
returnValue = function_.apply(this, arguments_);
function_ = null;
} else if (options.throw === true) {
throw new Error(`Function \`${functionName}\` can only be called once`);
}
return returnValue;
};
mimicFn_1(onetime, function_);
calledFunctions.set(onetime, callCount);
return onetime;
};
var onetime_1 = onetime;
// TODO: Remove this for the next major release
var _default$G = onetime;
var callCount = function_ => {
if (!calledFunctions.has(function_)) {
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
}
return calledFunctions.get(function_);
};
onetime_1.default = _default$G;
onetime_1.callCount = callCount;
var restoreCursor = onetime_1(() => {
signalExit__default["default"](() => {
process.stderr.write('\u001B[?25h');
}, {
alwaysLast: true
});
});
var cliCursor = createCommonjsModule(function (module, exports) {
let isHidden = false;
exports.show = (writableStream = process.stderr) => {
if (!writableStream.isTTY) {
return;
}
isHidden = false;
writableStream.write('\u001B[?25h');
};
exports.hide = (writableStream = process.stderr) => {
if (!writableStream.isTTY) {
return;
}
restoreCursor();
isHidden = true;
writableStream.write('\u001B[?25l');
};
exports.toggle = (force, writableStream) => {
if (force !== undefined) {
isHidden = force;
}
if (isHidden) {
exports.show(writableStream);
} else {
exports.hide(writableStream);
}
};
});
var __importDefault$p = commonjsGlobal && commonjsGlobal.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
const ansi_escapes_1$1 = __importDefault$p(ansiEscapes_1);
const cli_cursor_1$1 = __importDefault$p(cliCursor);
const create = (stream, {
showCursor = false
} = {}) => {
let previousLineCount = 0;
let previousOutput = '';
let hasHiddenCursor = false;
const render = str => {
if (!showCursor && !hasHiddenCursor) {
cli_cursor_1$1.default.hide();
hasHiddenCursor = true;
}
const output = str + '\n';
if (output === previousOutput) {
return;
}
previousOutput = output;
stream.write(ansi_escapes_1$1.default.eraseLines(previousLineCount) + output);
previousLineCount = output.split('\n').length;
};
render.clear = () => {
stream.write(ansi_escapes_1$1.default.eraseLines(previousLineCount));
previousOutput = '';
previousLineCount = 0;
};
render.done = () => {
previousOutput = '';
previousLineCount = 0;
if (!showCursor) {
cli_cursor_1$1.default.show();
hasHiddenCursor = false;
}
};
return render;
};
var _default$F = {
create
};
var logUpdate = /*#__PURE__*/Object.defineProperty({
default: _default$F
}, '__esModule', {value: true});
var vendors = [{
name: "AppVeyor",
constant: "APPVEYOR",
env: "APPVEYOR",
pr: "APPVEYOR_PULL_REQUEST_NUMBER"
}, {
name: "Azure Pipelines",
constant: "AZURE_PIPELINES",
env: "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
pr: "SYSTEM_PULLREQUEST_PULLREQUESTID"
}, {
name: "Bamboo",
constant: "BAMBOO",
env: "bamboo_planKey"
}, {
name: "Bitbucket Pipelines",
constant: "BITBUCKET",
env: "BITBUCKET_COMMIT",
pr: "BITBUCKET_PR_ID"
}, {
name: "Bitrise",
constant: "BITRISE",
env: "BITRISE_IO",
pr: "BITRISE_PULL_REQUEST"
}, {
name: "Buddy",
constant: "BUDDY",
env: "BUDDY_WORKSPACE_ID",
pr: "BUDDY_EXECUTION_PULL_REQUEST_ID"
}, {
name: "Buildkite",
constant: "BUILDKITE",
env: "BUILDKITE",
pr: {
env: "BUILDKITE_PULL_REQUEST",
ne: "false"
}
}, {
name: "CircleCI",
constant: "CIRCLE",
env: "CIRCLECI",
pr: "CIRCLE_PULL_REQUEST"
}, {
name: "Cirrus CI",
constant: "CIRRUS",
env: "CIRRUS_CI",
pr: "CIRRUS_PR"
}, {
name: "AWS CodeBuild",
constant: "CODEBUILD",
env: "CODEBUILD_BUILD_ARN"
}, {
name: "Codeship",
constant: "CODESHIP",
env: {
CI_NAME: "codeship"
}
}, {
name: "Drone",
constant: "DRONE",
env: "DRONE",
pr: {
DRONE_BUILD_EVENT: "pull_request"
}
}, {
name: "dsari",
constant: "DSARI",
env: "DSARI"
}, {
name: "GitLab CI",
constant: "GITLAB",
env: "GITLAB_CI"
}, {
name: "GoCD",
constant: "GOCD",
env: "GO_PIPELINE_LABEL"
}, {
name: "Hudson",
constant: "HUDSON",
env: "HUDSON_URL"
}, {
name: "Jenkins",
constant: "JENKINS",
env: ["JENKINS_URL", "BUILD_ID"],
pr: {
any: ["ghprbPullId", "CHANGE_ID"]
}
}, {
name: "Magnum CI",
constant: "MAGNUM",
env: "MAGNUM"
}, {
name: "Netlify CI",
constant: "NETLIFY",
env: "NETLIFY_BUILD_BASE",
pr: {
env: "PULL_REQUEST",
ne: "false"
}
}, {
name: "Sail CI",
constant: "SAIL",
env: "SAILCI",
pr: "SAIL_PULL_REQUEST_NUMBER"
}, {
name: "Semaphore",
constant: "SEMAPHORE",
env: "SEMAPHORE",
pr: "PULL_REQUEST_NUMBER"
}, {
name: "Shippable",
constant: "SHIPPABLE",
env: "SHIPPABLE",
pr: {
IS_PULL_REQUEST: "true"
}
}, {
name: "Solano CI",
constant: "SOLANO",
env: "TDDIUM",
pr: "TDDIUM_PR_ID"
}, {
name: "Strider CD",
constant: "STRIDER",
env: "STRIDER"
}, {
name: "TaskCluster",
constant: "TASKCLUSTER",
env: ["TASK_ID", "RUN_ID"]
}, {
name: "TeamCity",
constant: "TEAMCITY",
env: "TEAMCITY_VERSION"
}, {
name: "Travis CI",
constant: "TRAVIS",
env: "TRAVIS",
pr: {
env: "TRAVIS_PULL_REQUEST",
ne: "false"
}
}];
var ciInfo = createCommonjsModule(function (module, exports) {
var env = process.env;
// Used for testing only
Object.defineProperty(exports, '_vendors', {
value: vendors.map(function (v) {
return v.constant;
})
});
exports.name = null;
exports.isPR = null;
vendors.forEach(function (vendor) {
var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
var isCI = envs.every(function (obj) {
return checkEnv(obj);
});
exports[vendor.constant] = isCI;
if (isCI) {
exports.name = vendor.name;
switch (typeof vendor.pr) {
case 'string':
// "pr": "CIRRUS_PR"
exports.isPR = !!env[vendor.pr];
break;
case 'object':
if ('env' in vendor.pr) {
// "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
} else if ('any' in vendor.pr) {
// "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
exports.isPR = vendor.pr.any.some(function (key) {
return !!env[key];
});
} else {
// "pr": { "DRONE_BUILD_EVENT": "pull_request" }
exports.isPR = checkEnv(vendor.pr);
}
break;
default:
// PR detection not supported for this vendor
exports.isPR = null;
}
}
});
exports.isCI = !!(env.CI ||
// Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
env.CONTINUOUS_INTEGRATION ||
// Travis CI, Cirrus CI
env.BUILD_NUMBER ||
// Jenkins, TeamCity
env.RUN_ID ||
// TaskCluster, dsari
exports.name || false);
function checkEnv(obj) {
if (typeof obj === 'string') return !!env[obj];
return Object.keys(obj).every(function (k) {
return env[k] === obj[k];
});
}
});
var isCi = ciInfo.isCI;
// Gets all non-builtin properties up the prototype chain
const getAllProperties = object => {
const properties = new Set();
do {
for (const key of Reflect.ownKeys(object)) {
properties.add([object, key]);
}
} while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
return properties;
};
var autoBind = (self, {
include,
exclude
} = {}) => {
const filter = key => {
const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);
if (include) {
return include.some(match);
}
if (exclude) {
return !exclude.some(match);
}
return true;
};
for (const [object, key] of getAllProperties(self.constructor.prototype)) {
if (key === 'constructor' || !filter(key)) {
continue;
}
const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
if (descriptor && typeof descriptor.value === 'function') {
self[key] = self[key].bind(self);
}
}
return self;
};
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var scheduler_production_min = createCommonjsModule(function (module, exports) {
var f, g, h, k;
if ("object" === typeof performance && "function" === typeof performance.now) {
var l = performance;
exports.unstable_now = function () {
return l.now();
};
} else {
var p = Date,
q = p.now();
exports.unstable_now = function () {
return p.now() - q;
};
}
if ("undefined" === typeof window || "function" !== typeof MessageChannel) {
var t = null,
u = null,
w = function () {
if (null !== t) try {
var a = exports.unstable_now();
t(!0, a);
t = null;
} catch (b) {
throw setTimeout(w, 0), b;
}
};
f = function (a) {
null !== t ? setTimeout(f, 0, a) : (t = a, setTimeout(w, 0));
};
g = function (a, b) {
u = setTimeout(a, b);
};
h = function () {
clearTimeout(u);
};
exports.unstable_shouldYield = function () {
return !1;
};
k = exports.unstable_forceFrameRate = function () {};
} else {
var x = window.setTimeout,
y = window.clearTimeout;
if ("undefined" !== typeof console) {
var z = window.cancelAnimationFrame;
"function" !== typeof window.requestAnimationFrame && console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");
"function" !== typeof z && console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");
}
var A = !1,
B = null,
C = -1,
D = 5,
E = 0;
exports.unstable_shouldYield = function () {
return exports.unstable_now() >= E;
};
k = function () {};
exports.unstable_forceFrameRate = function (a) {
0 > a || 125 < a ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : D = 0 < a ? Math.floor(1E3 / a) : 5;
};
var F = new MessageChannel(),
G = F.port2;
F.port1.onmessage = function () {
if (null !== B) {
var a = exports.unstable_now();
E = a + D;
try {
B(!0, a) ? G.postMessage(null) : (A = !1, B = null);
} catch (b) {
throw G.postMessage(null), b;
}
} else A = !1;
};
f = function (a) {
B = a;
A || (A = !0, G.postMessage(null));
};
g = function (a, b) {
C = x(function () {
a(exports.unstable_now());
}, b);
};
h = function () {
y(C);
C = -1;
};
}
function H(a, b) {
var c = a.length;
a.push(b);
a: for (;;) {
var d = c - 1 >>> 1,
e = a[d];
if (void 0 !== e && 0 < I(e, b)) a[d] = b, a[c] = e, c = d;else break a;
}
}
function J(a) {
a = a[0];
return void 0 === a ? null : a;
}
function K(a) {
var b = a[0];
if (void 0 !== b) {
var c = a.pop();
if (c !== b) {
a[0] = c;
a: for (var d = 0, e = a.length; d < e;) {
var m = 2 * (d + 1) - 1,
n = a[m],
v = m + 1,
r = a[v];
if (void 0 !== n && 0 > I(n, c)) void 0 !== r && 0 > I(r, n) ? (a[d] = r, a[v] = c, d = v) : (a[d] = n, a[m] = c, d = m);else if (void 0 !== r && 0 > I(r, c)) a[d] = r, a[v] = c, d = v;else break a;
}
}
return b;
}
return null;
}
function I(a, b) {
var c = a.sortIndex - b.sortIndex;
return 0 !== c ? c : a.id - b.id;
}
var L = [],
M = [],
N = 1,
O = null,
P = 3,
Q = !1,
R = !1,
S = !1;
function T(a) {
for (var b = J(M); null !== b;) {
if (null === b.callback) K(M);else if (b.startTime <= a) K(M), b.sortIndex = b.expirationTime, H(L, b);else break;
b = J(M);
}
}
function U(a) {
S = !1;
T(a);
if (!R) if (null !== J(L)) R = !0, f(V);else {
var b = J(M);
null !== b && g(U, b.startTime - a);
}
}
function V(a, b) {
R = !1;
S && (S = !1, h());
Q = !0;
var c = P;
try {
T(b);
for (O = J(L); null !== O && (!(O.expirationTime > b) || a && !exports.unstable_shouldYield());) {
var d = O.callback;
if ("function" === typeof d) {
O.callback = null;
P = O.priorityLevel;
var e = d(O.expirationTime <= b);
b = exports.unstable_now();
"function" === typeof e ? O.callback = e : O === J(L) && K(L);
T(b);
} else K(L);
O = J(L);
}
if (null !== O) var m = !0;else {
var n = J(M);
null !== n && g(U, n.startTime - b);
m = !1;
}
return m;
} finally {
O = null, P = c, Q = !1;
}
}
var W = k;
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (a) {
a.callback = null;
};
exports.unstable_continueExecution = function () {
R || Q || (R = !0, f(V));
};
exports.unstable_getCurrentPriorityLevel = function () {
return P;
};
exports.unstable_getFirstCallbackNode = function () {
return J(L);
};
exports.unstable_next = function (a) {
switch (P) {
case 1:
case 2:
case 3:
var b = 3;
break;
default:
b = P;
}
var c = P;
P = b;
try {
return a();
} finally {
P = c;
}
};
exports.unstable_pauseExecution = function () {};
exports.unstable_requestPaint = W;
exports.unstable_runWithPriority = function (a, b) {
switch (a) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
a = 3;
}
var c = P;
P = a;
try {
return b();
} finally {
P = c;
}
};
exports.unstable_scheduleCallback = function (a, b, c) {
var d = exports.unstable_now();
"object" === typeof c && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d + c : d) : c = d;
switch (a) {
case 1:
var e = -1;
break;
case 2:
e = 250;
break;
case 5:
e = 1073741823;
break;
case 4:
e = 1E4;
break;
default:
e = 5E3;
}
e = c + e;
a = {
id: N++,
callback: b,
priorityLevel: a,
startTime: c,
expirationTime: e,
sortIndex: -1
};
c > d ? (a.sortIndex = c, H(M, a), null === J(L) && a === J(M) && (S ? h() : S = !0, g(U, c - d))) : (a.sortIndex = e, H(L, a), R || Q || (R = !0, f(V)));
return a;
};
exports.unstable_wrapCallback = function (a) {
var b = P;
return function () {
var c = P;
P = b;
try {
return a.apply(this, arguments);
} finally {
P = c;
}
};
};
});
var scheduler = createCommonjsModule(function (module) {
{
module.exports = scheduler_production_min;
}
});
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
test3[letter] = letter;
});
if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
}
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
to[key] = from[key];
}
}
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
/** @license React v0.26.2
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var reactReconciler_production_min = createCommonjsModule(function (module) {
module.exports = function $$$reconciler($$$hostConfig) {
var exports = {};
var aa = objectAssign,
ba = react,
m = scheduler;
function q(a) {
for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++) b += "&args[]=" + encodeURIComponent(arguments[c]);
return "Minified React error #" + a + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
var ca = ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
da = 60103,
ea = 60106,
fa = 60107,
ha = 60108,
ia = 60114,
ja = 60109,
ka = 60110,
la = 60112,
ma = 60113,
na = 60120,
oa = 60115,
pa = 60116,
qa = 60121,
ra = 60129,
sa = 60130,
ta = 60131;
if ("function" === typeof Symbol && Symbol.for) {
var r = Symbol.for;
da = r("react.element");
ea = r("react.portal");
fa = r("react.fragment");
ha = r("react.strict_mode");
ia = r("react.profiler");
ja = r("react.provider");
ka = r("react.context");
la = r("react.forward_ref");
ma = r("react.suspense");
na = r("react.suspense_list");
oa = r("react.memo");
pa = r("react.lazy");
qa = r("react.block");
r("react.scope");
ra = r("react.debug_trace_mode");
sa = r("react.offscreen");
ta = r("react.legacy_hidden");
}
var ua = "function" === typeof Symbol && Symbol.iterator;
function va(a) {
if (null === a || "object" !== typeof a) return null;
a = ua && a[ua] || a["@@iterator"];
return "function" === typeof a ? a : null;
}
function wa(a) {
if (null == a) return null;
if ("function" === typeof a) return a.displayName || a.name || null;
if ("string" === typeof a) return a;
switch (a) {
case fa:
return "Fragment";
case ea:
return "Portal";
case ia:
return "Profiler";
case ha:
return "StrictMode";
case ma:
return "Suspense";
case na:
return "SuspenseList";
}
if ("object" === typeof a) switch (a.$$typeof) {
case ka:
return (a.displayName || "Context") + ".Consumer";
case ja:
return (a._context.displayName || "Context") + ".Provider";
case la:
var b = a.render;
b = b.displayName || b.name || "";
return a.displayName || ("" !== b ? "ForwardRef(" + b + ")" : "ForwardRef");
case oa:
return wa(a.type);
case qa:
return wa(a._render);
case pa:
b = a._payload;
a = a._init;
try {
return wa(a(b));
} catch (c) {}
}
return null;
}
function xa(a) {
var b = a,
c = a;
if (a.alternate) for (; b.return;) b = b.return;else {
a = b;
do b = a, 0 !== (b.flags & 1026) && (c = b.return), a = b.return; while (a);
}
return 3 === b.tag ? c : null;
}
function ya(a) {
if (xa(a) !== a) throw Error(q(188));
}
function za(a) {
var b = a.alternate;
if (!b) {
b = xa(a);
if (null === b) throw Error(q(188));
return b !== a ? null : a;
}
for (var c = a, d = b;;) {
var e = c.return;
if (null === e) break;
var f = e.alternate;
if (null === f) {
d = e.return;
if (null !== d) {
c = d;
continue;
}
break;
}
if (e.child === f.child) {
for (f = e.child; f;) {
if (f === c) return ya(e), a;
if (f === d) return ya(e), b;
f = f.sibling;
}
throw Error(q(188));
}
if (c.return !== d.return) c = e, d = f;else {
for (var g = !1, h = e.child; h;) {
if (h === c) {
g = !0;
c = e;
d = f;
break;
}
if (h === d) {
g = !0;
d = e;
c = f;
break;
}
h = h.sibling;
}
if (!g) {
for (h = f.child; h;) {
if (h === c) {
g = !0;
c = f;
d = e;
break;
}
if (h === d) {
g = !0;
d = f;
c = e;
break;
}
h = h.sibling;
}
if (!g) throw Error(q(189));
}
}
if (c.alternate !== d) throw Error(q(190));
}
if (3 !== c.tag) throw Error(q(188));
return c.stateNode.current === c ? a : b;
}
function Aa(a) {
a = za(a);
if (!a) return null;
for (var b = a;;) {
if (5 === b.tag || 6 === b.tag) return b;
if (b.child) b.child.return = b, b = b.child;else {
if (b === a) break;
for (; !b.sibling;) {
if (!b.return || b.return === a) return null;
b = b.return;
}
b.sibling.return = b.return;
b = b.sibling;
}
}
return null;
}
function Ba(a) {
a = za(a);
if (!a) return null;
for (var b = a;;) {
if (5 === b.tag || 6 === b.tag) return b;
if (b.child && 4 !== b.tag) b.child.return = b, b = b.child;else {
if (b === a) break;
for (; !b.sibling;) {
if (!b.return || b.return === a) return null;
b = b.return;
}
b.sibling.return = b.return;
b = b.sibling;
}
}
return null;
}
function Ca(a, b) {
for (var c = a.alternate; null !== b;) {
if (b === a || b === c) return !0;
b = b.return;
}
return !1;
}
var Da = $$$hostConfig.getPublicInstance,
Ea = $$$hostConfig.getRootHostContext,
Fa = $$$hostConfig.getChildHostContext,
Ga = $$$hostConfig.prepareForCommit,
Ha = $$$hostConfig.resetAfterCommit,
Ia = $$$hostConfig.createInstance,
Ja = $$$hostConfig.appendInitialChild,
Ka = $$$hostConfig.finalizeInitialChildren,
La = $$$hostConfig.prepareUpdate,
Ma = $$$hostConfig.shouldSetTextContent,
Na = $$$hostConfig.createTextInstance,
Pa = $$$hostConfig.scheduleTimeout,
Qa = $$$hostConfig.cancelTimeout,
Ra = $$$hostConfig.noTimeout,
Sa = $$$hostConfig.isPrimaryRenderer,
Ta = $$$hostConfig.supportsMutation,
Ua = $$$hostConfig.supportsPersistence,
Va = $$$hostConfig.supportsHydration,
Wa = $$$hostConfig.getInstanceFromNode,
Xa = $$$hostConfig.makeOpaqueHydratingObject,
Ya = $$$hostConfig.makeClientId,
Za = $$$hostConfig.beforeActiveInstanceBlur,
$a = $$$hostConfig.afterActiveInstanceBlur,
ab = $$$hostConfig.preparePortalMount,
bb = $$$hostConfig.supportsTestSelectors,
cb = $$$hostConfig.findFiberRoot,
db = $$$hostConfig.getBoundingRect,
eb = $$$hostConfig.getTextContent,
fb = $$$hostConfig.isHiddenSubtree,
gb = $$$hostConfig.matchAccessibilityRole,
hb = $$$hostConfig.setFocusIfFocusable,
ib = $$$hostConfig.setupIntersectionObserver,
jb = $$$hostConfig.appendChild,
kb = $$$hostConfig.appendChildToContainer,
lb = $$$hostConfig.commitTextUpdate,
mb = $$$hostConfig.commitMount,
nb = $$$hostConfig.commitUpdate,
ob = $$$hostConfig.insertBefore,
pb = $$$hostConfig.insertInContainerBefore,
qb = $$$hostConfig.removeChild,
rb = $$$hostConfig.removeChildFromContainer,
sb = $$$hostConfig.resetTextContent,
tb = $$$hostConfig.hideInstance,
ub = $$$hostConfig.hideTextInstance,
vb = $$$hostConfig.unhideInstance,
wb = $$$hostConfig.unhideTextInstance,
xb = $$$hostConfig.clearContainer,
yb = $$$hostConfig.cloneInstance,
zb = $$$hostConfig.createContainerChildSet,
Ab = $$$hostConfig.appendChildToContainerChildSet,
Bb = $$$hostConfig.finalizeContainerChildren,
Cb = $$$hostConfig.replaceContainerChildren,
Db = $$$hostConfig.cloneHiddenInstance,
Eb = $$$hostConfig.cloneHiddenTextInstance,
Fb = $$$hostConfig.canHydrateInstance,
Gb = $$$hostConfig.canHydrateTextInstance,
Hb = $$$hostConfig.isSuspenseInstancePending,
Ib = $$$hostConfig.isSuspenseInstanceFallback,
Jb = $$$hostConfig.getNextHydratableSibling,
Kb = $$$hostConfig.getFirstHydratableChild,
Lb = $$$hostConfig.hydrateInstance,
Mb = $$$hostConfig.hydrateTextInstance,
Nb = $$$hostConfig.getNextHydratableInstanceAfterSuspenseInstance,
Ob = $$$hostConfig.commitHydratedContainer,
Pb = $$$hostConfig.commitHydratedSuspenseInstance,
Qb;
function Rb(a) {
if (void 0 === Qb) try {
throw Error();
} catch (c) {
var b = c.stack.trim().match(/\n( *(at )?)/);
Qb = b && b[1] || "";
}
return "\n" + Qb + a;
}
var Sb = !1;
function Tb(a, b) {
if (!a || Sb) return "";
Sb = !0;
var c = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
try {
if (b) {
if (b = function () {
throw Error();
}, Object.defineProperty(b.prototype, "props", {
set: function () {
throw Error();
}
}), "object" === typeof Reflect && Reflect.construct) {
try {
Reflect.construct(b, []);
} catch (k) {
var d = k;
}
Reflect.construct(a, [], b);
} else {
try {
b.call();
} catch (k) {
d = k;
}
a.call(b.prototype);
}
} else {
try {
throw Error();
} catch (k) {
d = k;
}
a();
}
} catch (k) {
if (k && d && "string" === typeof k.stack) {
for (var e = k.stack.split("\n"), f = d.stack.split("\n"), g = e.length - 1, h = f.length - 1; 1 <= g && 0 <= h && e[g] !== f[h];) h--;
for (; 1 <= g && 0 <= h; g--, h--) if (e[g] !== f[h]) {
if (1 !== g || 1 !== h) {
do if (g--, h--, 0 > h || e[g] !== f[h]) return "\n" + e[g].replace(" at new ", " at "); while (1 <= g && 0 <= h);
}
break;
}
}
} finally {
Sb = !1, Error.prepareStackTrace = c;
}
return (a = a ? a.displayName || a.name : "") ? Rb(a) : "";
}
var Ub = [],
Vb = -1;
function Wb(a) {
return {
current: a
};
}
function z(a) {
0 > Vb || (a.current = Ub[Vb], Ub[Vb] = null, Vb--);
}
function A(a, b) {
Vb++;
Ub[Vb] = a.current;
a.current = b;
}
var Xb = {},
B = Wb(Xb),
D = Wb(!1),
Yb = Xb;
function Zb(a, b) {
var c = a.type.contextTypes;
if (!c) return Xb;
var d = a.stateNode;
if (d && d.__reactInternalMemoizedUnmaskedChildContext === b) return d.__reactInternalMemoizedMaskedChildContext;
var e = {},
f;
for (f in c) e[f] = b[f];
d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b, a.__reactInternalMemoizedMaskedChildContext = e);
return e;
}
function E(a) {
a = a.childContextTypes;
return null !== a && void 0 !== a;
}
function $b() {
z(D);
z(B);
}
function ac(a, b, c) {
if (B.current !== Xb) throw Error(q(168));
A(B, b);
A(D, c);
}
function bc(a, b, c) {
var d = a.stateNode;
a = b.childContextTypes;
if ("function" !== typeof d.getChildContext) return c;
d = d.getChildContext();
for (var e in d) if (!(e in a)) throw Error(q(108, wa(b) || "Unknown", e));
return aa({}, c, d);
}
function cc(a) {
a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Xb;
Yb = B.current;
A(B, a);
A(D, D.current);
return !0;
}
function dc(a, b, c) {
var d = a.stateNode;
if (!d) throw Error(q(169));
c ? (a = bc(a, b, Yb), d.__reactInternalMemoizedMergedChildContext = a, z(D), z(B), A(B, a)) : z(D);
A(D, c);
}
var ec = null,
fc = null,
gc = m.unstable_now;
gc();
var hc = 0,
F = 8;
function ic(a) {
if (0 !== (1 & a)) return F = 15, 1;
if (0 !== (2 & a)) return F = 14, 2;
if (0 !== (4 & a)) return F = 13, 4;
var b = 24 & a;
if (0 !== b) return F = 12, b;
if (0 !== (a & 32)) return F = 11, 32;
b = 192 & a;
if (0 !== b) return F = 10, b;
if (0 !== (a & 256)) return F = 9, 256;
b = 3584 & a;
if (0 !== b) return F = 8, b;
if (0 !== (a & 4096)) return F = 7, 4096;
b = 4186112 & a;
if (0 !== b) return F = 6, b;
b = 62914560 & a;
if (0 !== b) return F = 5, b;
if (a & 67108864) return F = 4, 67108864;
if (0 !== (a & 134217728)) return F = 3, 134217728;
b = 805306368 & a;
if (0 !== b) return F = 2, b;
if (0 !== (1073741824 & a)) return F = 1, 1073741824;
F = 8;
return a;
}
function jc(a) {
switch (a) {
case 99:
return 15;
case 98:
return 10;
case 97:
case 96:
return 8;
case 95:
return 2;
default:
return 0;
}
}
function kc(a) {
switch (a) {
case 15:
case 14:
return 99;
case 13:
case 12:
case 11:
case 10:
return 98;
case 9:
case 8:
case 7:
case 6:
case 4:
case 5:
return 97;
case 3:
case 2:
case 1:
return 95;
case 0:
return 90;
default:
throw Error(q(358, a));
}
}
function lc(a, b) {
var c = a.pendingLanes;
if (0 === c) return F = 0;
var d = 0,
e = 0,
f = a.expiredLanes,
g = a.suspendedLanes,
h = a.pingedLanes;
if (0 !== f) d = f, e = F = 15;else if (f = c & 134217727, 0 !== f) {
var k = f & ~g;
0 !== k ? (d = ic(k), e = F) : (h &= f, 0 !== h && (d = ic(h), e = F));
} else f = c & ~g, 0 !== f ? (d = ic(f), e = F) : 0 !== h && (d = ic(h), e = F);
if (0 === d) return 0;
d = 31 - mc(d);
d = c & ((0 > d ? 0 : 1 << d) << 1) - 1;
if (0 !== b && b !== d && 0 === (b & g)) {
ic(b);
if (e <= F) return b;
F = e;
}
b = a.entangledLanes;
if (0 !== b) for (a = a.entanglements, b &= d; 0 < b;) c = 31 - mc(b), e = 1 << c, d |= a[c], b &= ~e;
return d;
}
function nc(a) {
a = a.pendingLanes & -1073741825;
return 0 !== a ? a : a & 1073741824 ? 1073741824 : 0;
}
function oc(a, b) {
switch (a) {
case 15:
return 1;
case 14:
return 2;
case 12:
return a = pc(24 & ~b), 0 === a ? oc(10, b) : a;
case 10:
return a = pc(192 & ~b), 0 === a ? oc(8, b) : a;
case 8:
return a = pc(3584 & ~b), 0 === a && (a = pc(4186112 & ~b), 0 === a && (a = 512)), a;
case 2:
return b = pc(805306368 & ~b), 0 === b && (b = 268435456), b;
}
throw Error(q(358, a));
}
function pc(a) {
return a & -a;
}
function qc(a) {
for (var b = [], c = 0; 31 > c; c++) b.push(a);
return b;
}
function rc(a, b, c) {
a.pendingLanes |= b;
var d = b - 1;
a.suspendedLanes &= d;
a.pingedLanes &= d;
a = a.eventTimes;
b = 31 - mc(b);
a[b] = c;
}
var mc = Math.clz32 ? Math.clz32 : sc,
tc = Math.log,
uc = Math.LN2;
function sc(a) {
return 0 === a ? 32 : 31 - (tc(a) / uc | 0) | 0;
}
var vc = m.unstable_runWithPriority,
wc = m.unstable_scheduleCallback,
xc = m.unstable_cancelCallback,
yc = m.unstable_shouldYield,
zc = m.unstable_requestPaint,
Ac = m.unstable_now,
Bc = m.unstable_getCurrentPriorityLevel,
Cc = m.unstable_ImmediatePriority,
Dc = m.unstable_UserBlockingPriority,
Ec = m.unstable_NormalPriority,
Fc = m.unstable_LowPriority,
Gc = m.unstable_IdlePriority,
Hc = {},
Ic = void 0 !== zc ? zc : function () {},
Jc = null,
Kc = null,
Lc = !1,
Mc = Ac(),
G = 1E4 > Mc ? Ac : function () {
return Ac() - Mc;
};
function Nc() {
switch (Bc()) {
case Cc:
return 99;
case Dc:
return 98;
case Ec:
return 97;
case Fc:
return 96;
case Gc:
return 95;
default:
throw Error(q(332));
}
}
function Oc(a) {
switch (a) {
case 99:
return Cc